aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/networking/netdevices.txt
diff options
context:
space:
mode:
Diffstat (limited to 'Documentation/networking/netdevices.txt')
-rw-r--r--Documentation/networking/netdevices.txt25
1 files changed, 12 insertions, 13 deletions
diff --git a/Documentation/networking/netdevices.txt b/Documentation/networking/netdevices.txt
index 89358341682a..c7ecc7080494 100644
--- a/Documentation/networking/netdevices.txt
+++ b/Documentation/networking/netdevices.txt
@@ -47,26 +47,25 @@ packets is preferred.
47 47
48struct net_device synchronization rules 48struct net_device synchronization rules
49======================================= 49=======================================
50dev->open: 50ndo_open:
51 Synchronization: rtnl_lock() semaphore. 51 Synchronization: rtnl_lock() semaphore.
52 Context: process 52 Context: process
53 53
54dev->stop: 54ndo_stop:
55 Synchronization: rtnl_lock() semaphore. 55 Synchronization: rtnl_lock() semaphore.
56 Context: process 56 Context: process
57 Note1: netif_running() is guaranteed false 57 Note: netif_running() is guaranteed false
58 Note2: dev->poll() is guaranteed to be stopped
59 58
60dev->do_ioctl: 59ndo_do_ioctl:
61 Synchronization: rtnl_lock() semaphore. 60 Synchronization: rtnl_lock() semaphore.
62 Context: process 61 Context: process
63 62
64dev->get_stats: 63ndo_get_stats:
65 Synchronization: dev_base_lock rwlock. 64 Synchronization: dev_base_lock rwlock.
66 Context: nominally process, but don't sleep inside an rwlock 65 Context: nominally process, but don't sleep inside an rwlock
67 66
68dev->hard_start_xmit: 67ndo_start_xmit:
69 Synchronization: netif_tx_lock spinlock. 68 Synchronization: __netif_tx_lock spinlock.
70 69
71 When the driver sets NETIF_F_LLTX in dev->features this will be 70 When the driver sets NETIF_F_LLTX in dev->features this will be
72 called without holding netif_tx_lock. In this case the driver 71 called without holding netif_tx_lock. In this case the driver
@@ -87,20 +86,20 @@ dev->hard_start_xmit:
87 o NETDEV_TX_LOCKED Locking failed, please retry quickly. 86 o NETDEV_TX_LOCKED Locking failed, please retry quickly.
88 Only valid when NETIF_F_LLTX is set. 87 Only valid when NETIF_F_LLTX is set.
89 88
90dev->tx_timeout: 89ndo_tx_timeout:
91 Synchronization: netif_tx_lock spinlock. 90 Synchronization: netif_tx_lock spinlock; all TX queues frozen.
92 Context: BHs disabled 91 Context: BHs disabled
93 Notes: netif_queue_stopped() is guaranteed true 92 Notes: netif_queue_stopped() is guaranteed true
94 93
95dev->set_rx_mode: 94ndo_set_rx_mode:
96 Synchronization: netif_tx_lock spinlock. 95 Synchronization: netif_addr_lock spinlock.
97 Context: BHs disabled 96 Context: BHs disabled
98 97
99struct napi_struct synchronization rules 98struct napi_struct synchronization rules
100======================================== 99========================================
101napi->poll: 100napi->poll:
102 Synchronization: NAPI_STATE_SCHED bit in napi->state. Device 101 Synchronization: NAPI_STATE_SCHED bit in napi->state. Device
103 driver's dev->close method will invoke napi_disable() on 102 driver's ndo_stop method will invoke napi_disable() on
104 all NAPI instances which will do a sleeping poll on the 103 all NAPI instances which will do a sleeping poll on the
105 NAPI_STATE_SCHED napi->state bit, waiting for all pending 104 NAPI_STATE_SCHED napi->state bit, waiting for all pending
106 NAPI activity to cease. 105 NAPI activity to cease.