From owner-freebsd-hackers Tue Mar 11 13:08:59 1997 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.5/8.8.5) id NAA10149 for hackers-outgoing; Tue, 11 Mar 1997 13:08:59 -0800 (PST) Received: from root.com (implode.root.com [198.145.90.17]) by freefall.freebsd.org (8.8.5/8.8.5) with ESMTP id NAA10131 for ; Tue, 11 Mar 1997 13:08:48 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by root.com (8.8.5/8.6.5) with SMTP id NAA21256; Tue, 11 Mar 1997 13:08:55 -0800 (PST) Message-Id: <199703112108.NAA21256@root.com> X-Authentication-Warning: implode.root.com: localhost [127.0.0.1] didn't use HELO protocol To: Luigi Rizzo cc: msmith@atrad.adelaide.edu.au, bde@zeta.org.au, bag@sinbin.demos.su, hackers@FreeBSD.ORG Subject: Re: performance (was: 100 Mb/s cards) In-reply-to: Your message of "Tue, 11 Mar 1997 12:12:22 +0100." <199703111112.MAA29471@labinfo.iet.unipi.it> From: David Greenman Reply-To: dg@root.com Date: Tue, 11 Mar 1997 13:08:55 -0800 Sender: owner-hackers@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk >> >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. >... > >> Alpha. Both the de and fxp drivers DMA the packet with the ethernet header >> aligned on a 32bit boundry, which means that the packet minus the ether >> header is not 32bit aligned (only 16bit alignment). Due to the architecture >> of the DC21x4x, it's not possible to work around this. It is possible to >> use different alignment with the Pro/100B chip (82557), but I don't currently >> do that in the driver - it was easier not to bother. I might change this >> in the future. > >I just checked the data sheets of the 21140; too bad, it appears >that the 21140 can use unaligned buffers on the TRANSMIT side but >not on the receive side. As other controllers, a packet can be >split into multiple buffers though, so that a sensible (and >sufficiently general) fix would be to store the ethernet header >(12 bytes) in the first mbuf, and the body of the packet (starting >with the IP header) in the following mbuf cluster. The size of the first DMA has to be 'aligned' to 32bits, so you can't get the desired alignment by splitting the DMA into two chunks. -DG David Greenman Core-team/Principal Architect, The FreeBSD Project