netdevice: Kill netdev->priv
This is the last shoot of this series. After I removing all directly reference of netdev->priv, I am killing "priv" of "struct net_device" and fixing relative comments/docs. Anyone will not be allowed to reference netdev->priv directly. If you want to reference the memory of private data, use netdev_priv() instead. If the private data is not allocted when alloc_netdev(), use netdev->ml_priv to point that memory after you creating that private data. Signed-off-by: Wang Chen <wangchen@cn.fujitsu.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
5a001a070e
commit
b74ca3a896
@@ -191,12 +191,13 @@ IIId. Synchronization
|
||||
|
||||
The driver runs as two independent, single-threaded flows of control. One
|
||||
is the send-packet routine, which enforces single-threaded use by the
|
||||
dev->priv->lock spinlock. The other thread is the interrupt handler, which
|
||||
is single threaded by the hardware and interrupt handling software.
|
||||
netdev_priv(dev)->lock spinlock. The other thread is the interrupt handler,
|
||||
which is single threaded by the hardware and interrupt handling software.
|
||||
|
||||
The send packet thread has partial control over the Tx ring. It locks the
|
||||
dev->priv->lock whenever it's queuing a Tx packet. If the next slot in the ring
|
||||
is not available it stops the transmit queue by calling netif_stop_queue.
|
||||
netdev_priv(dev)->lock whenever it's queuing a Tx packet. If the next slot in
|
||||
the ring is not available it stops the transmit queue by
|
||||
calling netif_stop_queue.
|
||||
|
||||
The interrupt handler has exclusive control over the Rx ring and records stats
|
||||
from the Tx ring. After reaping the stats, it marks the Tx queue entry as
|
||||
|
Reference in New Issue
Block a user