lkml.org 
[lkml]   [2012]   [Jan]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [patch v1, kernel version 3.2.1] Source mode for macvlan interaface
From
Date
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@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2012-01-23 16:27    [W:0.215 / U:0.012 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site