]> git.baikalelectronics.ru Git - kernel.git/commit
net: calxedaxgmac: ip align receive buffers
authorRob Herring <rob.herring@calxeda.com>
Mon, 5 Nov 2012 06:22:24 +0000 (06:22 +0000)
committerDavid S. Miller <davem@davemloft.net>
Wed, 7 Nov 2012 08:51:14 +0000 (03:51 -0500)
commit524abab043f1b32d9df31c6d6524f44a4e7b7379
treed35fbd28b721184859eb2e754faf659fef491724
parent3ae67bdfb355e24064ac95f43bbfc7d018ea7695
net: calxedaxgmac: ip align receive buffers

On gcc 4.7, we will get alignment traps in the ip stack if we don't align
the ip headers on receive. The h/w can support this, so use ip aligned
allocations.

Cut down the unnecessary padding on the allocation. The buffer can start on
any byte alignment, but the size including the begining offset must be 8
byte aligned. So the h/w buffer size must include the NET_IP_ALIGN offset.

Thanks to Eric Dumazet for the initial patch highlighting the padding issues.

Signed-off-by: Rob Herring <rob.herring@calxeda.com>
Acked-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/calxeda/xgmac.c