Subject: Re: [PATCH net-next v2] net: filter: constify detection of pkt_type_offset

From: Daniel Borkmann <[email-masked]>
Date: Fri, 12 Sep 2014 19:11:21 +0200

On 09/12/2014 07:06 PM, Cong Wang wrote:
> On Fri, Sep 12, 2014 at 9:06 AM, Alexei Starovoitov
> <[email-masked]> wrote:
>> On Fri, Sep 12, 2014 at 02:04:43PM +0200, Hannes Frederic Sowa wrote:
>>> Currently we have 2 pkt_type_offset functions doing the same thing and
>>> spread across the architecture files. Remove those and replace them
>>> with a PKT_TYPE_OFFSET macro helper which gets the constant value from a
>>> zero sized sk_buff member right in front of the bitfield with offsetof.
>>> This new offset marker does not change size of struct sk_buff.
>>>
>>> Cc: Eric Dumazet <[email-masked]>
>>> Cc: Markos Chandras <[email-masked]>
>>> Cc: Martin Schwidefsky <[email-masked]>
>>> Cc: Daniel Borkmann <[email-masked]>
>>> Cc: Alexei Starovoitov <[email-masked]>
>>> Signed-off-by: Denis Kirjanov <[email-masked]>
>>> Signed-off-by: Hannes Frederic Sowa <[email-masked]>
>>> ---
>>>
>>> v2) Incorporated Daniel's feedback. I first misinterpreted the feedback
>>>      as something not related to pkt_type_offset.
>>
>> Thanks! It's a nice cleanup.
>>
>> Acked-by: Alexei Starovoitov <[email-masked]>
>
> Wait... Isn't there a same patch before?
>
> http://www.spinics.net/lists/netdev/msg294839.html
>
> Maybe not exactly the same, but roughly same from the stats....

Yes, this is what the whole discussion is about, to unify it to a
central place.