peeking the netdevice queue

Jan Kasprzak (kas@informatics.muni.cz)
Tue, 05 Jan 1999 14:44:48 +0100


Hello,

Is it possible for the network device driver to test whether
there is any packet/skb waiting for transmittion over its device, or
even to obtain the skb for transmitting it itself (instead of waiting for the
next call of dev->hard_start_xmit())?

In my COSA driver (www.fi.muni.cz/~kas/cosa) it would help
to improve the effectivity of the driver, because in the end-of-transmit
interrupt the driver should tell the device if it has another packet
ready for transmit. The present driver tells the card there are no more
packets waiting for transmit and lets the dev->hard_start_xmit() to start
the new transmit later.

I have looked at other drivers - for example the 3c59x.c
implements its own internal queue of packets waiting for transmit
so that when the traffic is high enough, this queue its pre-filled by
dev->hard_start_xmit() and when the end-of-transmit interrupt comes,
the driver can directly start the new transmit. This seems a bit
ugly because something like that may already be available inside the
kernel.

Should I implement the internal packet queue for my driver,
or can I get some support for that from the upper layers of the networking
code?

-Yenya

--
\ Jan "Yenya" Kasprzak <kas at fi.muni.cz>       http://www.fi.muni.cz/~kas/
\\ PGP: finger kas at aisa.fi.muni.cz   0D99A7FB206605D7 8B35FCDE05B18A5E //
\\\             Czech Linux Homepage:  http://www.linux.cz/              ///
///    Can you say "ignored email" three times quickly while chewing     \\\
//     on an apple?                                 --Linus Torvalds      \\

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/