On Sun, Sep 12, 2004 at 06:01:14AM -0400, Jeff Garzik wrote:
>
> Oh and update Documentation/networking/netdevice.txt.
>
> If people are going to screw with the TX path, at least do it right and
> make it non-mysterious for everyone else.
>
> See Al Viro's Documentation/filesystem/directory-locking doc for a
> proper way to document a locking change that potentially affects every
> net driver in the kernel.
<broken record mode>
No it doesn't. It only affects every driver who sets NETIF_F_LLTX.
For drivers that don't set this flag there is no change at all.
</record>
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.
-Andi
---------------------------------------------------------------------
Add documentation for new NETIF_F_LLTX feature.
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:
+ 0 everything ok.
+ 1 Cannot transmit packet, try later
+ (usually a bug, means queue start/stop flow control is broken in your
+ driver)
+ -1 Locking failed, please retry quickly. Only valid when
+ NETIF_F_LLTX is set.
dev->tx_timeout:
Synchronization: dev->xmit_lock spinlock.
|