diff options
author | stephen hemminger <stephen@networkplumber.org> | 2013-03-20 05:02:41 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-03-20 15:24:40 -0400 |
commit | e76d120b68d2e0f159ba999b1210920a5a0ed53d (patch) | |
tree | a40ae13219c92ec353466268d1d17e6f49a534fc /drivers/net | |
parent | a6f68034de8a5784dfeabb337506254c80b4c8c6 (diff) |
chelsio: use netdev_alloc_skb_ip_align
Use netdev_alloc_sk_ip_align in the case where packet is copied.
This handles case where NET_IP_ALIGN == 0 as well as adding required header
padding.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/ethernet/chelsio/cxgb/sge.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/net/ethernet/chelsio/cxgb/sge.c b/drivers/net/ethernet/chelsio/cxgb/sge.c index 89bef504d9dc..55fe8c9f0484 100644 --- a/drivers/net/ethernet/chelsio/cxgb/sge.c +++ b/drivers/net/ethernet/chelsio/cxgb/sge.c | |||
@@ -1046,11 +1046,10 @@ static inline struct sk_buff *get_packet(struct pci_dev *pdev, | |||
1046 | const struct freelQ_ce *ce = &fl->centries[fl->cidx]; | 1046 | const struct freelQ_ce *ce = &fl->centries[fl->cidx]; |
1047 | 1047 | ||
1048 | if (len < copybreak) { | 1048 | if (len < copybreak) { |
1049 | skb = alloc_skb(len + 2, GFP_ATOMIC); | 1049 | skb = netdev_alloc_skb_ip_align(NULL, len); |
1050 | if (!skb) | 1050 | if (!skb) |
1051 | goto use_orig_buf; | 1051 | goto use_orig_buf; |
1052 | 1052 | ||
1053 | skb_reserve(skb, 2); /* align IP header */ | ||
1054 | skb_put(skb, len); | 1053 | skb_put(skb, len); |
1055 | pci_dma_sync_single_for_cpu(pdev, | 1054 | pci_dma_sync_single_for_cpu(pdev, |
1056 | dma_unmap_addr(ce, dma_addr), | 1055 | dma_unmap_addr(ce, dma_addr), |