[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1327332314.2525.25.camel@edumazet-HP-Compaq-6005-Pro-SFF-PC>
Date: Mon, 23 Jan 2012 16:25:14 +0100
From: Eric Dumazet <eric.dumazet@...il.com>
To: Stefan Gula <steweg@...t.sk>
Cc: Patrick McHardy <kaber@...sh.net>, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [patch v1, kernel version 3.2.1] Source mode for macvlan
interaface
Le lundi 23 janvier 2012 à 13:30 +0100, Stefan Gula a écrit :
> +static void macvlan_forward_sources_one(struct sk_buff *skb,
> + struct macvlan_dev *vlan)
> +{
> + struct sk_buff *nskb;
> + struct net_device *dev;
> + int len;
> + int ret;
> +
> + dev = vlan->dev;
> + if (unlikely(!(dev->flags & IFF_UP)))
> + return;
> +
> + nskb = skb_clone(skb, GFP_ATOMIC);
> + if (!nskb)
> + return;
> +
> + len = nskb->len + ETH_HLEN;
> + nskb = skb_share_check(nskb, GFP_ATOMIC);
> + if (!nskb)
> + return;
I am trying to understand how/why skb_share_check() is needed/useful
after skb_clone() ...
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists