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:
committed by
David S. Miller
parent
bff1c09640
commit
89d71a66c4
@@ -549,14 +549,12 @@ rx_status_loop:
|
||||
pr_debug("%s: rx slot %d status 0x%x len %d\n",
|
||||
dev->name, rx_tail, status, len);
|
||||
|
||||
new_skb = netdev_alloc_skb(dev, buflen + NET_IP_ALIGN);
|
||||
new_skb = netdev_alloc_skb_ip_align(dev, buflen);
|
||||
if (!new_skb) {
|
||||
dev->stats.rx_dropped++;
|
||||
goto rx_next;
|
||||
}
|
||||
|
||||
skb_reserve(new_skb, NET_IP_ALIGN);
|
||||
|
||||
dma_unmap_single(&cp->pdev->dev, mapping,
|
||||
buflen, PCI_DMA_FROMDEVICE);
|
||||
|
||||
@@ -1057,12 +1055,10 @@ static int cp_refill_rx(struct cp_private *cp)
|
||||
struct sk_buff *skb;
|
||||
dma_addr_t mapping;
|
||||
|
||||
skb = netdev_alloc_skb(dev, cp->rx_buf_sz + NET_IP_ALIGN);
|
||||
skb = netdev_alloc_skb_ip_align(dev, cp->rx_buf_sz);
|
||||
if (!skb)
|
||||
goto err_out;
|
||||
|
||||
skb_reserve(skb, NET_IP_ALIGN);
|
||||
|
||||
mapping = dma_map_single(&cp->pdev->dev, skb->data,
|
||||
cp->rx_buf_sz, PCI_DMA_FROMDEVICE);
|
||||
cp->rx_skb[i] = skb;
|
||||
|
Reference in New Issue
Block a user