summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorEric Dumazet2009-10-13 07:34:20 +0200
committerDavid S. Miller2009-10-13 20:48:18 +0200
commit89d71a66c40d629e3b1285def543ab1425558cd5 (patch)
tree45159e85418170fe36e4e023d9617693625d1740 /net
parentsb1250-mac: duplicate setting of bit V_MAC_RX_PL_THRSH(4) in sbmac_channel_st... (diff)
downloadkernel-qcow2-linux-89d71a66c40d629e3b1285def543ab1425558cd5.tar.gz
kernel-qcow2-linux-89d71a66c40d629e3b1285def543ab1425558cd5.tar.xz
kernel-qcow2-linux-89d71a66c40d629e3b1285def543ab1425558cd5.zip
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 'net')
-rw-r--r--net/core/dev.c13
1 files changed, 3 insertions, 10 deletions
diff --git a/net/core/dev.c b/net/core/dev.c
index 510ff205d5db..28b0b9e992a0 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -2604,20 +2604,13 @@ EXPORT_SYMBOL(napi_reuse_skb);
struct sk_buff *napi_get_frags(struct napi_struct *napi)
{
- struct net_device *dev = napi->dev;
struct sk_buff *skb = napi->skb;
if (!skb) {
- skb = netdev_alloc_skb(dev, GRO_MAX_HEAD + NET_IP_ALIGN);
- if (!skb)
- goto out;
-
- skb_reserve(skb, NET_IP_ALIGN);
-
- napi->skb = skb;
+ skb = netdev_alloc_skb_ip_align(napi->dev, GRO_MAX_HEAD);
+ if (skb)
+ napi->skb = skb;
}
-
-out:
return skb;
}
EXPORT_SYMBOL(napi_get_frags);