Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 11 Mar 1997 10:24:13 +0100 (MET)
From:      Luigi Rizzo <luigi@labinfo.iet.unipi.it>
To:        msmith@atrad.adelaide.edu.au (Michael Smith)
Cc:        dg@root.com, bde@zeta.org.au, bag@sinbin.demos.su, hackers@freebsd.org
Subject:   Re: performance (was: 100 Mb/s cards)
Message-ID:  <199703110924.KAA29182@labinfo.iet.unipi.it>
In-Reply-To: <199703110125.LAA11553@genesis.atrad.adelaide.edu.au> from "Michael Smith" at Mar 11, 97 11:55:32 am

next in thread | previous in thread | raw e-mail | index | archive | help
> There is also a comment in the de driver that implies that the packets
> that come in from the card are wrongly aligned (in some fashion) and
> have to be copied anyway, which may account for the overhead.

I believe it is the 21040 which requires buffers to be 32-bit
aligned. Since ethernet headers are 14 bytes long, IP/TCP/UDP
headers and data are misaligned if they are in the same mbuf or
mbuf cluster, and copying/operating on them is more expensive.
Things would be much better if the link-level header was saved in
a separate mbuf (or if packets are saved starting at a 16-bit
boundary). For outgoing data the former might already be the case.
For incoming data, a bit of care in the allocation of buffers is
probably necessary (so that the ethernet header goes into a separate
mbuf). I have no idea if any of our drivers does this, but probably it
would be a nice thing to have.

David, do you know something about this ?

	Luigi
-----------------------------+--------------------------------------
Luigi Rizzo                  |  Dip. di Ingegneria dell'Informazione
email: luigi@iet.unipi.it    |  Universita' di Pisa
tel: +39-50-568533           |  via Diotisalvi 2, 56126 PISA (Italy)
fax: +39-50-568522           |  http://www.iet.unipi.it/~luigi/
_____________________________|______________________________________



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199703110924.KAA29182>