Andi Kleen <ak@xxxxxxx> :
[...]
> I wasn't aware of Documentation/netdevices.txt, but I agree it
> would be a good idea to update it. Patch for that attached.
> DaveM, please apply.
I have modified your patch so as to include a bit from a message
of Jamal on netdev the 05/07/2004.
diff -u linux-2.6.8-work/Documentation/networking/netdevices.txt-o
linux-2.6.8-work/Documentation/networking/netdevices.txt
--- linux-2.6.8-work/Documentation/networking/netdevices.txt-o 2004-03-21
21:12:11.000000000 +0100
+++ linux-2.6.8-work/Documentation/networking/netdevices.txt 2004-09-12
12:24:02.000000000 +0200
@@ -43,8 +43,21 @@
dev->hard_start_xmit:
Synchronization: dev->xmit_lock spinlock.
+ When the driver sets NETIF_F_LLTX in dev->features this will be
+ called without holding xmit_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.
+ The locking there should also properly protect against
+ set_multicast_list
Context: BHs disabled
Notes: netif_queue_stopped() is guaranteed false
+ Return codes:
+ o 0 everything ok.
+ o 1 Cannot transmit packet, try later
+ Usually a bug, means queue start/stop flow control is broken in
+ the driver. Note: the driver must NOT put the skb in its DMA ring.
+ o -1 Locking failed, please retry quickly. Only valid when
+ NETIF_F_LLTX is set.
dev->tx_timeout:
Synchronization: dev->xmit_lock spinlock.
|