diff options
Diffstat (limited to 'drivers/net/ixgb/ixgb_main.c')
-rw-r--r-- | drivers/net/ixgb/ixgb_main.c | 12 |
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; |
2076 | map_skb: | 2068 | map_skb: |