Date: Thu, 28 Apr 2005 10:00:47 -0700 From: Luigi Rizzo <rizzo@icir.org> To: Bruce M Simpson <bms@spc.org> Cc: Sten Spans <sten@blinkenlights.nl> Subject: Re: if_tap unaligned access problem Message-ID: <20050428100047.B92681@xorpc.icir.org> In-Reply-To: <20050428165026.GG747@empiric.icir.org>; from bms@spc.org on Thu, Apr 28, 2005 at 05:50:26PM %2B0100 References: <20050428135120.GB21428@cell.sick.ru> <427111BF.2050607@savvis.net> <20050428165026.GG747@empiric.icir.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Apr 28, 2005 at 05:50:26PM +0100, Bruce M Simpson wrote: ... > jmg's suggestion of bringing in the NetBSD patches to allow the entire > network stack to be compiled with unaligned accesses (for those platforms > which support it) is interesting because it can simplify or eliminate > some of the acrobatics needed in network drivers to deal with the mbuf > alignment. very true. If a module has requirement alignments it should solve it by itself and not put the burden on dozens of other modules (i.e. device drivers) upstream. Beside being hard to maintain, the result leads to all sort of inefficiencies. E.g. some time ago when i worked on polling, i removed (only on i386) the aligment-bcopy from the "rl" driver. People complained that further up in the stack the misalgnment would cause a slowdown, but it turns out that the aligmnent-bcopy (which had to operate on unaligned data) was a lot more inefficient than the unaligned accesses in the upper layer, as you would end up paying the overhead for all packets and their entire size, instead of doing that only when strictly necessary. cheers luigi
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050428100047.B92681>