Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 59024
b: refs/heads/master
c: 1722933
h: refs/heads/master
v: v3
  • Loading branch information
Stephen Hemminger authored and David S. Miller committed Jul 11, 2007
1 parent 6b40d52 commit 9d1589d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 963bd949b12158d9b5380b718b31c4b33372ed73
refs/heads/master: 1722933323b70f44b0548131604f1f3454c2aa8f
15 changes: 8 additions & 7 deletions trunk/Documentation/networking/netdevices.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ private data which gets freed when the network device is freed. If
separately allocated data is attached to the network device
(dev->priv) then it is up to the module exit handler to free that.


struct net_device synchronization rules
=======================================
dev->open:
Expand All @@ -43,16 +42,17 @@ dev->get_stats:

dev->hard_start_xmit:
Synchronization: netif_tx_lock spinlock.

When the driver sets NETIF_F_LLTX in dev->features this will be
called without holding netif_tx_lock. In this case the driver
has to lock by itself when needed. It is recommended to use a try lock
for this and return -1 when the spin lock fails.
for this and return NETDEV_TX_LOCKED when the spin lock fails.
The locking there should also properly protect against
set_multicast_list
Context: Process with BHs disabled or BH (timer).
Notes: netif_queue_stopped() is guaranteed false
Interrupts must be enabled when calling hard_start_xmit.
(Interrupts must also be enabled when enabling the BH handler.)
set_multicast_list.

Context: Process with BHs disabled or BH (timer),
will be called with interrupts disabled by netconsole.

Return codes:
o NETDEV_TX_OK everything ok.
o NETDEV_TX_BUSY Cannot transmit packet, try later
Expand All @@ -74,4 +74,5 @@ dev->poll:
Synchronization: __LINK_STATE_RX_SCHED bit in dev->state. See
dev_close code and comments in net/core/dev.c for more info.
Context: softirq
will be called with interrupts disabled by netconsole.

0 comments on commit 9d1589d

Please sign in to comment.