Subject: Re: TX pre-headers...

From: Inaky Perez-Gonzalez <[email-masked]>
Date: Fri, 6 Feb 2009 10:53:46 -0800

On Friday 06 February 2009, [email-masked] wrote:
> David Miller <[email-masked]> wrote on 06/02/2009 09:41:07:
> > Some NIC hardware wants a pre-header pushed in front of the packet
> > data on transmit.
> >
> > When routing or bridging this will cause a reallocation of skb->data
> > on every packet forwarded because there will only be NET_IP_ALIGN
> > space reserved at the head by the device receive path.
> >
> > NIU is one such NIC and I only noticed this because of some things I
> > saw in some of Robert Olsson's routing stress test oprofile dumps.
>
> Many of the usbnet drivers do this as well - for example smsc95xx needs
> either 8 or 12 bytes for its pre-header (depending whether tx checksum
> offload is enabled) and does this in its tx_fixup:

The wimax i2400m has a similar thing, but on top, it requires packets to
be coalesced and then yet another header with packet descriptors 
has to be added to them.

(header  pld0 pld1 pld2...padding pl0 pl1 pl2....)

pld - payload descriptor
pl - payload

Each IP packet payload has a prefix header too in the payload.

So it would not be able to take advantage of this (using a FIFO right now).
I wanted to explore doing all that coalescing using a sg vector, but 
until the USB and SDIO stacks support it without too much overhead, is 
not worth the effort.

-- 
Inaky