Re: rx_copybreak value for non-i386 architectures

From: Alan Cox (alan@lxorguk.ukuu.org.uk)
Date: Wed Feb 28 2001 - 04:42:51 EST


> for non-i386 architectures. Once I thought I understood it and it seems
> related to cache line alignment. However, I am not sure exactly about the
> reason now. Can someone enlighten me a little bit?

A lot of pci net cards can only start packets on a 4 byte boundary. A lot
of CPU's need 4 byte aligned read/writes for performance. The ethernet header
is howerver 14 bytes long.

For CPU's with poor unaligned performance it turns out better to copy or
copy/checksum the data so the IP/TCP headers are aligned. If the card can
hit 16bit boundaries then you will see card drivers doing

        alloc_skb(blah)

        skb_reserve(skb, 2);

to align the header of he buffer so that the IP data is aligned

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



This archive was generated by hypermail 2b29 : Wed Feb 28 2001 - 21:00:16 EST