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.txt15
1 files changed, 8 insertions, 7 deletions
diff --git a/Documentation/networking/netdevices.txt b/Documentation/networking/netdevices.txt
index ce1361f95243..a6cab674b676 100644
--- a/Documentation/networking/netdevices.txt
+++ b/Documentation/networking/netdevices.txt
@@ -20,7 +20,6 @@ private data which gets freed when the network device is freed. If
20separately allocated data is attached to the network device 20separately allocated data is attached to the network device
21(dev->priv) then it is up to the module exit handler to free that. 21(dev->priv) then it is up to the module exit handler to free that.
22 22
23
24struct net_device synchronization rules 23struct net_device synchronization rules
25======================================= 24=======================================
26dev->open: 25dev->open:
@@ -43,16 +42,17 @@ dev->get_stats:
43 42
44dev->hard_start_xmit: 43dev->hard_start_xmit:
45 Synchronization: netif_tx_lock spinlock. 44 Synchronization: netif_tx_lock spinlock.
45
46 When the driver sets NETIF_F_LLTX in dev->features this will be 46 When the driver sets NETIF_F_LLTX in dev->features this will be
47 called without holding netif_tx_lock. In this case the driver 47 called without holding netif_tx_lock. In this case the driver
48 has to lock by itself when needed. It is recommended to use a try lock 48 has to lock by itself when needed. It is recommended to use a try lock
49 for this and return -1 when the spin lock fails. 49 for this and return NETDEV_TX_LOCKED when the spin lock fails.
50 The locking there should also properly protect against 50 The locking there should also properly protect against
51 set_multicast_list 51 set_multicast_list.
52 Context: Process with BHs disabled or BH (timer). 52
53 Notes: netif_queue_stopped() is guaranteed false 53 Context: Process with BHs disabled or BH (timer),
54 Interrupts must be enabled when calling hard_start_xmit. 54 will be called with interrupts disabled by netconsole.
55 (Interrupts must also be enabled when enabling the BH handler.) 55
56 Return codes: 56 Return codes:
57 o NETDEV_TX_OK everything ok. 57 o NETDEV_TX_OK everything ok.
58 o NETDEV_TX_BUSY Cannot transmit packet, try later 58 o NETDEV_TX_BUSY Cannot transmit packet, try later
@@ -74,4 +74,5 @@ dev->poll:
74 Synchronization: __LINK_STATE_RX_SCHED bit in dev->state. See 74 Synchronization: __LINK_STATE_RX_SCHED bit in dev->state. See
75 dev_close code and comments in net/core/dev.c for more info. 75 dev_close code and comments in net/core/dev.c for more info.
76 Context: softirq 76 Context: softirq
77 will be called with interrupts disabled by netconsole.
77 78