dev->hard_header() calling mess

From: Matthew Grant (grantma@anathoth.gen.nz)
Date: Sun Jan 09 2000 - 14:59:57 EST


Hi There!

We have a problem in 2.2.x with the way the device->hard_header
function is called. In many places in the kernel its return value is
not checked. This means that in the Sangoma drivers when an
incompatible frame type is transmitted the hard_header function
returns 0, sets skb->protocol to zero, and discards the packet down
in the hard_header_xmit routine AFTER sending the packet throught the
device transmit queue. If the return value was checked from calls to
the hard_header routine, the packet could be immediately discarded
instead of wasting time and CPU cycles feeding it throught the device
transmit queues.

The place where this return value is not checked that come to mind are
in the IPv4 ARP code, IPv6 ARP and Multicast code, and maybe IPX.

Thoughts?

I would like to see this cleaned up in 2.2.x and 2.3.x.

Cheers,

Matthew Grant
   

-
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/



This archive was generated by hypermail 2b29 : Sat Jan 15 2000 - 21:00:14 EST