]> git.baikalelectronics.ru Git - kernel.git/commit
b44: fix misalignment and wasted space in rx handling
authorFelix Fietkau <nbd@openwrt.org>
Fri, 9 Jan 2009 02:39:57 +0000 (02:39 +0000)
committerDavid S. Miller <davem@davemloft.net>
Sun, 11 Jan 2009 08:04:12 +0000 (00:04 -0800)
commit97c45cabc2fed3badc9be0bf03068f793fd148e5
tree4046e0a5a973ec383935ae07d577bd237e40f909
parent8294236cb2d5aa8d863fbfa236129dc35579b977
b44: fix misalignment and wasted space in rx handling

Broadcom 4400 puts a header of configurable size (apparently needs
to be at least 28 bytes) in front of received packets. When handling
this, the previous code accidentally added the offset 30 *twice* for
the software and once for the hardware, thereby cancelling out the
IP alignment effect of the 30 byte padding and wasting an additional
30 bytes of memory per packet.

This patch fixes this problem and improves routing throughput by
about 30% on MIPS, where unaligned access is expensive.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/b44.c