[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <550D911D.9070604@plumgrid.com>
Date: Sat, 21 Mar 2015 08:41:17 -0700
From: Alexei Starovoitov <ast@...mgrid.com>
To: Daniel Borkmann <daniel@...earbox.net>,
Michal Sekletar <msekleta@...hat.com>
CC: netdev@...r.kernel.org, Jiri Pirko <jpirko@...hat.com>,
Ralf Baechle <ralf@...ux-mips.org>,
Russell King <linux@....linux.org.uk>,
Benjamin Herrenschmidt <benh@...nel.crashing.org>,
Martin Schwidefsky <schwidefsky@...ibm.com>,
"David S. Miller" <davem@...emloft.net>
Subject: Re: [PATCH net-next v2] filter: introduce SKF_AD_VLAN_TPID BPF extension
On 3/21/15 2:49 AM, Daniel Borkmann wrote:
> On 03/21/2015 03:23 AM, Alexei Starovoitov wrote:
>> On 3/20/15 3:27 AM, Michal Sekletar wrote:
>>> On Thu, Mar 19, 2015 at 09:08:35AM -0700, Alexei Starovoitov wrote:
>>>> Since it's a new field, I think it makes sense not to do ntohs at all.
>>>> Let bpf programs do htons(PROTO_CONSTANT), since it can be done at
>>>> compile time instead of run-time.
>>>
>>> Doing htons is not needed for vlan_tci thus I wanted to avoid
>>> surprise for
>>> users. But of course I'll do whatever you think is the best.
>>
>> ok. then let's not add ntohs for vlan_tpid
>
> Why? What speaks against handling this the exact same way as we
> do now with skb->protocol?
hmm. I think you miss read it. It's exactly the same way as
skb->protocol for extended. No point doing it differently for classic.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists