diff options
author | Eric Dumazet <eric.dumazet@gmail.com> | 2009-10-13 01:34:20 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-10-13 14:48:18 -0400 |
commit | 89d71a66c40d629e3b1285def543ab1425558cd5 (patch) | |
tree | 45159e85418170fe36e4e023d9617693625d1740 /drivers/net/ixgbe | |
parent | bff1c09640b3006bca711e18ef08a5fb955ad9b5 (diff) |
net: Use netdev_alloc_skb_ip_align()
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ixgbe')
-rw-r--r-- | drivers/net/ixgbe/ixgbe_main.c | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/drivers/net/ixgbe/ixgbe_main.c b/drivers/net/ixgbe/ixgbe_main.c index eb3abd79e4ee..4c8a44919705 100644 --- a/drivers/net/ixgbe/ixgbe_main.c +++ b/drivers/net/ixgbe/ixgbe_main.c | |||
@@ -616,22 +616,14 @@ static void ixgbe_alloc_rx_buffers(struct ixgbe_adapter *adapter, | |||
616 | 616 | ||
617 | if (!bi->skb) { | 617 | if (!bi->skb) { |
618 | struct sk_buff *skb; | 618 | struct sk_buff *skb; |
619 | skb = netdev_alloc_skb(adapter->netdev, | 619 | skb = netdev_alloc_skb_ip_align(adapter->netdev, |
620 | (rx_ring->rx_buf_len + | 620 | rx_ring->rx_buf_len); |
621 | NET_IP_ALIGN)); | ||
622 | 621 | ||
623 | if (!skb) { | 622 | if (!skb) { |
624 | adapter->alloc_rx_buff_failed++; | 623 | adapter->alloc_rx_buff_failed++; |
625 | goto no_buffers; | 624 | goto no_buffers; |
626 | } | 625 | } |
627 | 626 | ||
628 | /* | ||
629 | * Make buffer alignment 2 beyond a 16 byte boundary | ||
630 | * this will result in a 16 byte aligned IP header after | ||
631 | * the 14 byte MAC header is removed | ||
632 | */ | ||
633 | skb_reserve(skb, NET_IP_ALIGN); | ||
634 | |||
635 | bi->skb = skb; | 627 | bi->skb = skb; |
636 | bi->dma = pci_map_single(pdev, skb->data, | 628 | bi->dma = pci_map_single(pdev, skb->data, |
637 | rx_ring->rx_buf_len, | 629 | rx_ring->rx_buf_len, |