From: Quentin Monnet <quentin@isovalent.com>
To: "Niklas Söderlund" <niklas.soderlund@corigine.com>,
"Larysa Zaremba" <larysa.zaremba@intel.com>
Cc: Stanislav Fomichev <sdf@google.com>,
Alexei Starovoitov <ast@kernel.org>,
Daniel Borkmann <daniel@iogearbox.net>,
Andrii Nakryiko <andrii@kernel.org>,
Martin KaFai Lau <martin.lau@linux.dev>,
Song Liu <song@kernel.org>, Yonghong Song <yhs@fb.com>,
John Fastabend <john.fastabend@gmail.com>,
KP Singh <kpsingh@kernel.org>, Hao Luo <haoluo@google.com>,
Jiri Olsa <jolsa@kernel.org>,
bpf@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH bpf-next] bpftool: specify XDP Hints ifname when loading program
Date: Mon, 15 May 2023 17:55:42 +0100 [thread overview]
Message-ID: <f804f5f2-1114-4aeb-2199-4dda597e1f5e@isovalent.com> (raw)
In-Reply-To: <ZGJePGCkfuCITRxn@oden.dyn.berto.se>
2023-05-15 18:30 UTC+0200 ~ Niklas Söderlund <niklas.soderlund@corigine.com>
> On 2023-05-12 15:36:47 +0200, Larysa Zaremba wrote:
>> [You don't often get email from larysa.zaremba@intel.com. Learn why this is important at https://aka.ms/LearnAboutSenderIdentification ]
>>
>> On Fri, May 12, 2023 at 11:23:00AM +0100, Quentin Monnet wrote:
>>> 2023-05-11 17:13 UTC+0200 ~ Larysa Zaremba <larysa.zaremba@intel.com>
>>>> Add ability to specify a network interface used to resolve
>>>> XDP Hints kfuncs when loading program through bpftool.
>>>>
>>>> Usage:
>>>> bpftool prog load <bpf_obj_path> <pin_path> dev xdpmeta <ifname>
>>>
>>> Thanks for this patch!
>>>
>>> Regarding the command-line syntax, I'm not a big fan of the optional
>>> sub-keyword for the device for XDP hints. I must admit I had not
>>> anticipated other another use for the "dev" keyword. Instead, have you
>>> considered one of the following:
>>>
>>> 1) Adding a different keyword ("xdpmeta_dev"?) and making it
>>> incompatible with "dev"
>>>
>>> 2) Another alternative would be adding a sub-keyword for offload too:
>>>
>>> bpftool p l [...] dev <[offload <ifname> | xdpmeta <ifname>]>
>>>
>>> If the ifname is provided with no sub-keyword, we would consider it for
>>> offload for legacy support, possibly warn that the syntax is deprecated.
>>>
>>> What do you think?
>>>
>>
>> I think first option would look a little bit nicer, but I like the idea to
>> deprecate "dev <ifname>". In my current version, forgetting to add "xdpmeta"
>> resulted in not very descriptive errors, this may confuse new users. So what
>> about:
>
> I agree the first option looks a little bit nicer, but I think both
> options would work.
>
>>
>> bpftool prog load [...] xdpmeta_dev/offload_dev <ifname>
>>
>> "dev <ifname>" syntax would still work, but with a big warning, like this:
>>
>> 'bpftool prog [...] dev <ifname>' syntax is deprecated. Going further, please
>> use 'offload_dev <ifname>' to offload program to device. For XDP hints
>> applications, use 'xdpmeta_dev <ifname>'.
OK let's go with this
Thanks,
Quentin
prev parent reply other threads:[~2023-05-15 16:55 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-11 15:13 Larysa Zaremba
2023-05-12 10:23 ` Quentin Monnet
2023-05-12 13:36 ` Larysa Zaremba
2023-05-15 16:30 ` Niklas Söderlund
2023-05-15 16:55 ` Quentin Monnet [this message]
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=f804f5f2-1114-4aeb-2199-4dda597e1f5e@isovalent.com \
--to=quentin@isovalent.com \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=haoluo@google.com \
--cc=john.fastabend@gmail.com \
--cc=jolsa@kernel.org \
--cc=kpsingh@kernel.org \
--cc=larysa.zaremba@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=martin.lau@linux.dev \
--cc=niklas.soderlund@corigine.com \
--cc=sdf@google.com \
--cc=song@kernel.org \
--cc=yhs@fb.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®