From owner-freebsd-hackers Tue Mar 11 02:15:52 1997 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.5/8.8.5) id CAA11020 for hackers-outgoing; Tue, 11 Mar 1997 02:15:52 -0800 (PST) Received: from labinfo.iet.unipi.it (labinfo.iet.unipi.it [131.114.9.5]) by freefall.freebsd.org (8.8.5/8.8.5) with SMTP id CAA11014 for ; Tue, 11 Mar 1997 02:15:45 -0800 (PST) Received: from localhost (luigi@localhost) by labinfo.iet.unipi.it (8.6.5/8.6.5) id KAA29182; Tue, 11 Mar 1997 10:24:13 +0100 From: Luigi Rizzo Message-Id: <199703110924.KAA29182@labinfo.iet.unipi.it> Subject: Re: performance (was: 100 Mb/s cards) To: msmith@atrad.adelaide.edu.au (Michael Smith) Date: Tue, 11 Mar 1997 10:24:13 +0100 (MET) Cc: dg@root.com, bde@zeta.org.au, bag@sinbin.demos.su, hackers@freebsd.org In-Reply-To: <199703110125.LAA11553@genesis.atrad.adelaide.edu.au> from "Michael Smith" at Mar 11, 97 11:55:32 am X-Mailer: ELM [version 2.4 PL23] Content-Type: text Sender: owner-hackers@freebsd.org X-Loop: FreeBSD.org Precedence: bulk > 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/ _____________________________|______________________________________