Re: [PATCH] net: increase skb->users instead of skb_clone()

Junchang Wang
2010-12-17T00:24:51Z

On Thu, Dec 16, 2010 at 10:41 PM, Eric Dumazet <eric.dumazet@gmail.com> wrote:
>> But, if we have N receivers, we get only the last one win - the first N-1 will
>> call deliver_skb().
>>
>
> Yes, but you want to, because each receiver has to make a private copy
> of the skb.
>
> The big win is that if packet if filtered out (not accepted by the
> socket filter), you end with no extra skb_clone() at all.
>
> Say you have 8 receivers, with a filter matching some hash/cpu, and only
> one af_packet socket will take the message.
>
> Before patch : 8 skb_clones()
>
> After patch : one skb_clone()
>
Now I understand. :)
The patch is fine. Thanks Changli and Eric.

--
--Junchang