From: David Ahern <dsahern@kernel.org>
To: "Toke Høiland-Jørgensen" <toke@redhat.com>,
"Avinash Duduskar" <avinash.duduskar@gmail.com>,
ast@kernel.org, daniel@iogearbox.net, andrii@kernel.org
Cc: eddyz87@gmail.com, memxor@gmail.com, martin.lau@linux.dev,
song@kernel.org, yonghong.song@linux.dev, jolsa@kernel.org,
emil@etsalapatis.com, john.fastabend@gmail.com, sdf@fomichev.me,
davem@davemloft.net, edumazet@google.com, kuba@kernel.org,
pabeni@redhat.com, horms@kernel.org, shuah@kernel.org,
hawk@kernel.org, yatsenko@meta.com, leon.hwang@linux.dev,
kpsingh@kernel.org, a.s.protopopov@gmail.com,
ameryhung@gmail.com, rongtao@cestc.cn, eyal.birger@gmail.com,
bpf@vger.kernel.org, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org
Subject: Re: [PATCH bpf-next v5 1/3] bpf: Add BPF_FIB_LOOKUP_VLAN flag to bpf_fib_lookup() helper
Date: Mon, 29 Jun 2026 09:49:26 -0600 [thread overview]
Message-ID: <2ffa32dd-5c88-488a-aa23-deef13465eb9@kernel.org> (raw)
In-Reply-To: <87se65bd04.fsf@toke.dk>
On 6/29/26 9:08 AM, Toke Høiland-Jørgensen wrote:
> David Ahern <dsahern@kernel.org> writes:
>
>> On 6/23/26 9:05 PM, Avinash Duduskar wrote:
>>> diff --git a/include/uapi/linux/bpf.h b/include/uapi/linux/bpf.h
>>> index 89b36de5fdbb..e00f0392e728 100644
>>> --- a/include/uapi/linux/bpf.h
>>> +++ b/include/uapi/linux/bpf.h
>>> @@ -3532,6 +3532,29 @@ union bpf_attr {
>>> * Use the mark present in *params*->mark for the fib lookup.
>>> * This option should not be used with BPF_FIB_LOOKUP_DIRECT,
>>> * as it only has meaning for full lookups.
>>> + * **BPF_FIB_LOOKUP_VLAN**
>>
>> This flag should not be needed. Patches for vlan support were never
>> submitted (I have them in some old branch). Since the vlan params are
>> initialized to 0, no new flag should be needed. Besides, these are
>> output parameters.
>
> There's no enforcement from the kernel side of the parameters being
> zero, though? So we do need the flag for feature detection; unless we
> expect applications to do that out of band? But then we'd need a
> mechanism to do that which could be... the presence of the flag in the
> ENUM (and thus in BTF)? :)
>
This is output direction - return from the fib lookup. It does not make
sense to require a flag to get lookup output. vlan proto of 0 is not
valid, so it is a clear indication that the vlan output parameters were
not set during the lookup.
next prev parent reply other threads:[~2026-06-29 15:49 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-24 3:05 [PATCH bpf-next v5 0/3] bpf: bidirectional VLAN support for bpf_fib_lookup() Avinash Duduskar
2026-06-24 3:05 ` [PATCH bpf-next v5 1/3] bpf: Add BPF_FIB_LOOKUP_VLAN flag to bpf_fib_lookup() helper Avinash Duduskar
2026-06-24 9:33 ` Toke Høiland-Jørgensen
2026-06-24 11:54 ` Avinash Duduskar
2026-06-29 15:11 ` Toke Høiland-Jørgensen
2026-06-26 16:25 ` David Ahern
2026-06-29 15:08 ` Toke Høiland-Jørgensen
2026-06-29 15:49 ` David Ahern [this message]
2026-06-30 10:00 ` Toke Høiland-Jørgensen
2026-06-30 14:18 ` David Ahern
2026-06-30 16:04 ` Toke Høiland-Jørgensen
2026-06-30 17:13 ` David Ahern
2026-07-01 11:02 ` Toke Høiland-Jørgensen
2026-07-01 15:08 ` David Ahern
2026-07-02 14:47 ` Toke Høiland-Jørgensen
2026-07-03 21:34 ` David Ahern
2026-06-24 3:05 ` [PATCH bpf-next v5 2/3] bpf: Add BPF_FIB_LOOKUP_VLAN_INPUT " Avinash Duduskar
2026-06-24 3:05 ` [PATCH bpf-next v5 3/3] selftests/bpf: Add bpf_fib_lookup() VLAN flag tests Avinash Duduskar
2026-06-24 3:15 ` sashiko-bot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2ffa32dd-5c88-488a-aa23-deef13465eb9@kernel.org \
--to=dsahern@kernel.org \
--cc=a.s.protopopov@gmail.com \
--cc=ameryhung@gmail.com \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=avinash.duduskar@gmail.com \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=davem@davemloft.net \
--cc=eddyz87@gmail.com \
--cc=edumazet@google.com \
--cc=emil@etsalapatis.com \
--cc=eyal.birger@gmail.com \
--cc=hawk@kernel.org \
--cc=horms@kernel.org \
--cc=john.fastabend@gmail.com \
--cc=jolsa@kernel.org \
--cc=kpsingh@kernel.org \
--cc=kuba@kernel.org \
--cc=leon.hwang@linux.dev \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=martin.lau@linux.dev \
--cc=memxor@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=rongtao@cestc.cn \
--cc=sdf@fomichev.me \
--cc=shuah@kernel.org \
--cc=song@kernel.org \
--cc=toke@redhat.com \
--cc=yatsenko@meta.com \
--cc=yonghong.song@linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.