]> git.baikalelectronics.ru Git - kernel.git/commit
tg3: Use NET_IP_ALIGN
authorMatt Carlson <mcarlson@broadcom.com>
Sat, 22 Nov 2008 01:16:16 +0000 (17:16 -0800)
committerDavid S. Miller <davem@davemloft.net>
Sat, 22 Nov 2008 01:16:16 +0000 (17:16 -0800)
commitaadf8209436a0891178aa59c6a2bb9b954bde543
tree37f8552bf329967dd3c2e08382216dece0d87913
parent65e7985062565593db9ff234fac12c6650aa77d8
tg3: Use NET_IP_ALIGN

This patch replaces hardcoded 2's with the NET_IP_ALIGN constant or
TG3_RAW_IP_ALIGN where appropriate.  Some platforms can redefine the
NET_IP_ALIGN definition to zero if unaligned DMA transfers cost more
than the IP header alignment gains.  This patch represents a
performance improvement when using the 5701 on these platforms.
The copy path can be avoided.

TG3_RAW_IP_ALIGN is used in cases where we always want to align the
IP header on dword boundaries.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/tg3.c