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
@@ -793,7 +793,7 @@ static void _sc92031_rx_tasklet(struct net_device *dev)
|
||||
|
||||
rx_len -= rx_size_align + 4;
|
||||
|
||||
skb = netdev_alloc_skb(dev, pkt_size + NET_IP_ALIGN);
|
||||
skb = netdev_alloc_skb_ip_align(dev, pkt_size);
|
||||
if (unlikely(!skb)) {
|
||||
if (printk_ratelimit())
|
||||
printk(KERN_ERR "%s: Couldn't allocate a skb_buff for a packet of size %u\n",
|
||||
@@ -801,8 +801,6 @@ static void _sc92031_rx_tasklet(struct net_device *dev)
|
||||
goto next;
|
||||
}
|
||||
|
||||
skb_reserve(skb, NET_IP_ALIGN);
|
||||
|
||||
if ((rx_ring_offset + pkt_size) > RX_BUF_LEN) {
|
||||
memcpy(skb_put(skb, RX_BUF_LEN - rx_ring_offset),
|
||||
rx_ring + rx_ring_offset, RX_BUF_LEN - rx_ring_offset);
|
||||
|
Reference in New Issue
Block a user