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>
This commit is contained in:

gecommit door
David S. Miller

bovenliggende
bff1c09640
commit
89d71a66c4
@@ -170,18 +170,12 @@ static void igbvf_alloc_rx_buffers(struct igbvf_ring *rx_ring,
|
||||
}
|
||||
|
||||
if (!buffer_info->skb) {
|
||||
skb = netdev_alloc_skb(netdev, bufsz + NET_IP_ALIGN);
|
||||
skb = netdev_alloc_skb_ip_align(netdev, bufsz);
|
||||
if (!skb) {
|
||||
adapter->alloc_rx_buff_failed++;
|
||||
goto no_buffers;
|
||||
}
|
||||
|
||||
/* Make buffer alignment 2 beyond a 16 byte boundary
|
||||
* this will result in a 16 byte aligned IP header after
|
||||
* the 14 byte MAC header is removed
|
||||
*/
|
||||
skb_reserve(skb, NET_IP_ALIGN);
|
||||
|
||||
buffer_info->skb = skb;
|
||||
buffer_info->dma = pci_map_single(pdev, skb->data,
|
||||
bufsz,
|
||||
|
Verwijs in nieuw issue
Block a user