From: Jakub Kicinski <kuba@kernel.org>
To: John Fastabend <john.fastabend@gmail.com>
Cc: "Toke Høiland-Jørgensen" <toke@redhat.com>,
"Stanislav Fomichev" <sdf@google.com>,
"Alexei Starovoitov" <alexei.starovoitov@gmail.com>,
"Donald Hunter" <donald.hunter@gmail.com>,
bpf <bpf@vger.kernel.org>, "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>,
"KP Singh" <kpsingh@kernel.org>, "Hao Luo" <haoluo@google.com>,
"Jiri Olsa" <jolsa@kernel.org>,
"Network Development" <netdev@vger.kernel.org>
Subject: Re: [RFC bpf-next v2 11/11] net/mlx5e: Support TX timestamp metadata
Date: Mon, 3 Jul 2023 12:33:03 -0700 [thread overview]
Message-ID: <20230703123303.220ee6ef@kernel.org> (raw)
In-Reply-To: <64a313d41bd2c_5fc9a20839@john.notmuch>
On Mon, 03 Jul 2023 11:30:44 -0700 John Fastabend wrote:
> Jakub Kicinski wrote:
> > On Fri, 30 Jun 2023 17:52:05 -0700 John Fastabend wrote:
> > > I would expect BPF/driver experts would write the libraries for the
> > > datapath API that the network/switch developer is going to use. I would
> > > even put the BPF programs in kernel and ship them with the release
> > > if that helps.
> > >
> > > We have different visions on who the BPF user is that writes XDP
> > > programs I think.
> >
> > Yes, crucially. What I've seen talking to engineers working on TC/XDP
> > BPF at Meta (and I may not be dealing with experts, Martin would have
> > a broader view) is that they don't understand basics like s/g or
> > details of checksums.
>
> Interesting data point. But these same engineers will want to get
> access to the checksum, but don't understand it? Seems if your
> going to start reading/writing descriptors even through kfuncs
> we need to get some docs/notes on how to use them correctly then.
> We certainly wont put guardrails on the read/writes for performance
> reasons.
Dunno about checksum, but it's definitely the same kind of person
that'd want access to timestamps.
> > I don't think it is reasonable to call you, Maxim, Nik and co. "users".
> > We're risking building system so complex normal people will _need_ an
> > overlay on top to make it work.
>
> I consider us users. We write networking CNI and observability/sec
> tooling on top of BPF. Most of what we create is driven by customer
> environments and performance. Maybe not typical users I guess, but
> also Meta users are not typical and have their own set of constraints
> and insights.
One thing Meta certainly does (and I think is a large part of success
of BPF) is delegating the development of applications away from the core
kernel team. Meta is different than a smaller company in that it _has_
a kernel team, but the "network application" teams I suspect are fairly
typical.
> > > Its pushing complexity into the kernel that we maintain in kernel
> > > when we could push the complexity into BPF and maintain as user
> > > space code and BPF codes. Its a choice to make I think.
> >
> > Right, and I believe having the code in the kernel, appropriately
> > integrated with the drivers is beneficial. The main argument against
> > it is that in certain environments kernels are old. But that's a very
> > destructive argument.
>
> My main concern here is we forget some kfunc that we need and then
> we are stuck. We don't have the luxury of upgrading kernels easily.
> It doesn't need to be an either/or discussion if we have a ctx()
> call we can drop into BTF over the descriptor and use kfuncs for
> the most common things. Other option is to simply write a kfunc
> for every field I see that could potentially have some use even
> if I don't fully understand it at the moment.
>
> I suspect I am less concerned about raw access because we already
> have BTF infra built up around our network observability/sec
> solution so we already handle per kernel differences and desc.
> just looks like another BTF object we want to read. And we
> know what dev and types we are attaching to so we don't have
> issues with is this a mlx or intel or etc device.
>
> Also as a more practical concern how do we manage nic specific
> things?
What are the NIC specific things?
> Have nic spcific kfuncs? Per descriptor tx_flags and
> status flags. Other things we need are ptr to skb and access
> to the descriptor ring so we can pull stats off the ring. I'm
> not arguing it can't be done with kfuncs, but if we go kfunc
> route be prepared for a long list of kfuncs and driver specific
> ones.
IDK why you say that, I gave the base list of offloads in an earlier
email.
next prev parent reply other threads:[~2023-07-03 19:33 UTC|newest]
Thread overview: 51+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-21 17:02 [RFC bpf-next v2 00/11] bpf: Netdev TX metadata Stanislav Fomichev
2023-06-21 17:02 ` [RFC bpf-next v2 01/11] bpf: Rename some xdp-metadata functions into dev-bound Stanislav Fomichev
2023-06-21 17:02 ` [RFC bpf-next v2 02/11] bpf: Resolve single typedef when walking structs Stanislav Fomichev
2023-06-22 5:17 ` Alexei Starovoitov
2023-06-22 17:55 ` Stanislav Fomichev
2023-06-21 17:02 ` [RFC bpf-next v2 04/11] bpf: Implement devtx hook points Stanislav Fomichev
2023-06-21 17:02 ` [RFC bpf-next v2 05/11] bpf: Implement devtx timestamp kfunc Stanislav Fomichev
2023-06-22 12:07 ` Jesper D. Brouer
2023-06-22 17:55 ` Stanislav Fomichev
2023-06-21 17:02 ` [RFC bpf-next v2 06/11] net: veth: Implement devtx timestamp kfuncs Stanislav Fomichev
2023-06-23 23:29 ` Vinicius Costa Gomes
2023-06-26 17:00 ` Stanislav Fomichev
2023-06-26 22:00 ` Vinicius Costa Gomes
2023-06-26 23:29 ` Stanislav Fomichev
2023-06-27 1:38 ` Vinicius Costa Gomes
2023-06-21 17:02 ` [RFC bpf-next v2 09/11] selftests/bpf: Extend xdp_metadata with devtx kfuncs Stanislav Fomichev
2023-06-23 11:12 ` Jesper D. Brouer
2023-06-23 17:40 ` Stanislav Fomichev
2023-06-21 17:02 ` [RFC bpf-next v2 10/11] selftests/bpf: Extend xdp_hw_metadata " Stanislav Fomichev
2023-06-21 17:02 ` [RFC bpf-next v2 11/11] net/mlx5e: Support TX timestamp metadata Stanislav Fomichev
2023-06-22 19:57 ` Alexei Starovoitov
2023-06-22 20:13 ` Stanislav Fomichev
2023-06-22 21:47 ` Alexei Starovoitov
2023-06-22 22:13 ` Stanislav Fomichev
2023-06-23 2:35 ` Alexei Starovoitov
2023-06-23 10:16 ` Maryam Tahhan
2023-06-23 16:32 ` Alexei Starovoitov
2023-06-23 17:47 ` Maryam Tahhan
2023-06-23 17:24 ` Stanislav Fomichev
2023-06-23 18:57 ` Donald Hunter
2023-06-24 0:25 ` John Fastabend
2023-06-24 2:52 ` Alexei Starovoitov
2023-06-24 21:38 ` Jakub Kicinski
2023-06-25 1:12 ` Stanislav Fomichev
2023-06-26 21:36 ` Stanislav Fomichev
2023-06-26 22:37 ` Alexei Starovoitov
2023-06-26 23:29 ` Stanislav Fomichev
2023-06-27 13:35 ` Toke Høiland-Jørgensen
2023-06-27 21:43 ` John Fastabend
2023-06-27 22:56 ` Stanislav Fomichev
2023-06-27 23:33 ` John Fastabend
2023-06-27 23:50 ` Alexei Starovoitov
2023-06-28 18:52 ` Jakub Kicinski
2023-06-29 11:43 ` Toke Høiland-Jørgensen
2023-06-30 18:54 ` Stanislav Fomichev
2023-07-01 0:52 ` John Fastabend
2023-07-01 3:11 ` Jakub Kicinski
2023-07-03 18:30 ` John Fastabend
2023-07-03 19:33 ` Jakub Kicinski [this message]
2023-06-22 8:41 ` [RFC bpf-next v2 00/11] bpf: Netdev TX metadata Jesper Dangaard Brouer
2023-06-22 17:55 ` Stanislav Fomichev
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=20230703123303.220ee6ef@kernel.org \
--to=kuba@kernel.org \
--cc=alexei.starovoitov@gmail.com \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=donald.hunter@gmail.com \
--cc=haoluo@google.com \
--cc=john.fastabend@gmail.com \
--cc=jolsa@kernel.org \
--cc=kpsingh@kernel.org \
--cc=martin.lau@linux.dev \
--cc=netdev@vger.kernel.org \
--cc=sdf@google.com \
--cc=song@kernel.org \
--cc=toke@redhat.com \
--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;
as well as URLs for NNTP newsgroup(s).