Re: rx_copybreak value for non-i386 architectures

David S. Miller (davem@redhat.com)
Tue, 27 Feb 2001 18:44:30 -0800 (PST)


Jun Sun writes:
> I notice that many net drivers set rx_copybreak to 1518 (the max packet size)
> 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?

Most non-x86 architectures take a large hit for unaligned accesses.
If the ethernet chip cannot land the beginning of the packet at an
arbitrary byte offset (a modulo 2 offset for ethernet is needed for an
aligned IP header) then the rx_copybreak is set to the ethernet MTU
so that all packets get copied into new buffers where they can have
their header aligned.

Later,
David S. Miller
davem@redhat.com

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