obsolete magics in dev->hard_start_xmit() ?

Henner Eisen (eis@baty.hanse.de)
Thu, 31 Jul 1997 19:36:01 +0200


Many net device drivers contain certain magic peaces of code in their
dev->hard_start_xmit() method. My impression is that those code fragments are
obsolete with current kernels. But could somebody please confirm this?

if (test_and_set_bit(0, (void*)&dev->tbusy) != 0){
/* Transmitter access conflict ... */

This protection against reentrant calls should be obsolete because
the kernel (for version 1.2.9 and above?) guarantees that there will
never be more than one (per device) hard_start_xmit() function
running simultaneously.

if ( skb==NULL ){
dev_tint( dev );
return 0;

I'm wondering what this is/was for. With the dev_queue_xmit(skb) of the
current kernels there is no way for the protocol layers to submit a NULL
skb to a device. And there don't seem to be any other routines which
intentionally call dev->hard_start_xmit() with a NULL skb pointer.

Is this correct?