summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/chelsio
diff options
context:
space:
mode:
authorstephen hemminger <stephen@networkplumber.org>2013-03-20 13:02:41 +0400
committerDavid S. Miller <davem@davemloft.net>2013-03-20 23:24:40 +0400
commite76d120b68d2e0f159ba999b1210920a5a0ed53d (patch)
treea40ae13219c92ec353466268d1d17e6f49a534fc /drivers/net/ethernet/chelsio
parenta6f68034de8a5784dfeabb337506254c80b4c8c6 (diff)
downloadlinux-e76d120b68d2e0f159ba999b1210920a5a0ed53d.tar.xz
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/ethernet/chelsio')
-rw-r--r--drivers/net/ethernet/chelsio/cxgb/sge.c3
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,
const struct freelQ_ce *ce = &fl->centries[fl->cidx];
if (len < copybreak) {
- skb = alloc_skb(len + 2, GFP_ATOMIC);
+ skb = netdev_alloc_skb_ip_align(NULL, len);
if (!skb)
goto use_orig_buf;
- skb_reserve(skb, 2); /* align IP header */
skb_put(skb, len);
pci_dma_sync_single_for_cpu(pdev,
dma_unmap_addr(ce, dma_addr),