Date: Tue, 11 Mar 1997 14:51:34 +0000 From: Matt Thomas <matt@lkg.dec.com> To: dennis <dennis@etinc.com> Cc: Michael Smith <msmith@atrad.adelaide.edu.au>, hackers@FreeBSD.ORG Subject: Re: performance (was: 100 Mb/s cards) Message-ID: <199703111451.OAA11618@whydos.lkg.dec.com> In-Reply-To: Your message of "Tue, 11 Mar 1997 10:23:48 EST." <3.0.32.19970311102342.00b05710@etinc.com>
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. > > > The comment implies that there is something "stupid" about the controllers > quad alignment requirement, but whoever wrote that should know that all > PCI bus master accesses MUST be quad aligned as a basic requirement > of the spec. Let me respectively say: bullshit! The problem is that lots of BSD networking makes assumption that the payload part of an Ethernet packet is longword aligned. However an Ethernet header is 14 byte in length (ie. not a multiple of 4). So if you can, you want to have the Ethernet packet start on 2 address with the bottom 3 bits set to 010 so the payload will be longword (or quadword with 0010). However, this is not possible with the 21x4x chips. I've have asked the chip designers for a way to tell the chip to obliterate those first 2 bytes and write the packet but to avail. Now I know with the PCI bus, I could have the chip preserve those two bytes but I don't care and so seek the easiest solution. The unalignment doesn't hurt intel platforms that much but is painful for more RISCy targets such as Alpha or PPC. The networking code should detect the data is unaligned and only copy what it needs to an aligned buffer and then use that. It's stupid for the driver to copy the data so it's all aligned when in reality, TCP needs only 40 or so bytes to be aligned. -- Matt Thomas Internet: matt@3am-software.com 3am Software Foundry WWW URL: http://www.3am-software.com/bio/matt.html Westford, MA Disclaimer: I disavow all knowledge of this message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199703111451.OAA11618>