aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ixgb
diff options
context:
space:
mode:
authorEric Dumazet <eric.dumazet@gmail.com>2009-10-13 01:34:20 -0400
committerDavid S. Miller <davem@davemloft.net>2009-10-13 14:48:18 -0400
commit89d71a66c40d629e3b1285def543ab1425558cd5 (patch)
tree45159e85418170fe36e4e023d9617693625d1740 /drivers/net/ixgb
parentbff1c09640b3006bca711e18ef08a5fb955ad9b5 (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/ixgb')
-rw-r--r--drivers/net/ixgb/ixgb_main.c12
1 files changed, 2 insertions, 10 deletions
diff --git a/drivers/net/ixgb/ixgb_main.c b/drivers/net/ixgb/ixgb_main.c
index f9f633c134bd..1bd0ca1b0465 100644
--- a/drivers/net/ixgb/ixgb_main.c
+++ b/drivers/net/ixgb/ixgb_main.c
@@ -1972,9 +1972,8 @@ ixgb_clean_rx_irq(struct ixgb_adapter *adapter, int *work_done, int work_to_do)
1972 * of reassembly being done in the stack */ 1972 * of reassembly being done in the stack */
1973 if (length < copybreak) { 1973 if (length < copybreak) {
1974 struct sk_buff *new_skb = 1974 struct sk_buff *new_skb =
1975 netdev_alloc_skb(netdev, length + NET_IP_ALIGN); 1975 netdev_alloc_skb_ip_align(netdev, length);
1976 if (new_skb) { 1976 if (new_skb) {
1977 skb_reserve(new_skb, NET_IP_ALIGN);
1978 skb_copy_to_linear_data_offset(new_skb, 1977 skb_copy_to_linear_data_offset(new_skb,
1979 -NET_IP_ALIGN, 1978 -NET_IP_ALIGN,
1980 (skb->data - 1979 (skb->data -
@@ -2057,20 +2056,13 @@ ixgb_alloc_rx_buffers(struct ixgb_adapter *adapter, int cleaned_count)
2057 goto map_skb; 2056 goto map_skb;
2058 } 2057 }
2059 2058
2060 skb = netdev_alloc_skb(netdev, adapter->rx_buffer_len 2059 skb = netdev_alloc_skb_ip_align(netdev, adapter->rx_buffer_len);
2061 + NET_IP_ALIGN);
2062 if (unlikely(!skb)) { 2060 if (unlikely(!skb)) {
2063 /* Better luck next round */ 2061 /* Better luck next round */
2064 adapter->alloc_rx_buff_failed++; 2062 adapter->alloc_rx_buff_failed++;
2065 break; 2063 break;
2066 } 2064 }
2067 2065
2068 /* Make buffer alignment 2 beyond a 16 byte boundary
2069 * this will result in a 16 byte aligned IP header after
2070 * the 14 byte MAC header is removed
2071 */
2072 skb_reserve(skb, NET_IP_ALIGN);
2073
2074 buffer_info->skb = skb; 2066 buffer_info->skb = skb;
2075 buffer_info->length = adapter->rx_buffer_len; 2067 buffer_info->length = adapter->rx_buffer_len;
2076map_skb: 2068map_skb: