Re: [patch v1, kernel version 3.2.1] Source mode for macvlaninteraface

From: Eric Dumazet
Date: Mon Jan 23 2012 - 10:25:18 EST


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@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/