From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel Borkmann Subject: Re: [PATCH net-next v2] net: filter: constify detection of pkt_type_offset Date: Fri, 12 Sep 2014 22:48:17 +0200 Message-ID: <54135C11.1010201@redhat.com> References: <5412D9B9.2020300@redhat.com> <3e68956a7e5b8bb9de226bfcc09092c6852a0a0a.1410523297.git.hannes@stressinduktion.org> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: netdev@vger.kernel.org, Eric Dumazet , Markos Chandras , Martin Schwidefsky , Alexei Starovoitov , Denis Kirjanov To: Hannes Frederic Sowa Return-path: Received: from mx1.redhat.com ([209.132.183.28]:61439 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751644AbaILUsi (ORCPT ); Fri, 12 Sep 2014 16:48:38 -0400 In-Reply-To: <3e68956a7e5b8bb9de226bfcc09092c6852a0a0a.1410523297.git.hannes@stressinduktion.org> Sender: netdev-owner@vger.kernel.org List-ID: On 09/12/2014 02:04 PM, 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 > Cc: Markos Chandras > Cc: Martin Schwidefsky > Cc: Daniel Borkmann > Cc: Alexei Starovoitov > Signed-off-by: Denis Kirjanov > Signed-off-by: Hannes Frederic Sowa Looks good to me, thanks! Acked-by: Daniel Borkmann