Subject: Re: [PATCH] macvtap: fix two races

From: Vlad Yasevich <[email-masked]>
Date: Fri, 09 Aug 2013 14:01:00 -0400

On 08/09/2013 01:41 PM, Eric Dumazet wrote:
> On Fri, 2013-08-09 at 13:16 -0400, Vlad Yasevich wrote:
>
>> I was looking at this a bit more and I think this call to
>> macvlan_count_rx() is double counting the packets.
>>
>> In macvlan_handle_frame(), we call macvlan_count_rx() after we call
>> vlan->receive().  For macvtap, receive() function is essentially
>> macvtap_forward() which just tacks the data onto the queue.
>>
>> Then, the above code counts the data again as we pull it off the queue
>> socket queue to give to the user.
>
> Hmm, it seems a different issue, and probably needs a patch on its own.
>
> When was this problem added ?
>
>

Looks like both macvlan and macvtap packet counting has been there since
the beginning...

-vlad