From: Paolo Abeni <pabeni@redhat.com>
To: Alexei Starovoitov <alexei.starovoitov@gmail.com>
Cc: netdev@vger.kernel.org, deb.chatterjee@intel.com,
anjali.singhai@intel.com, namrata.limaye@intel.com,
tom@sipanda.io, mleitner@redhat.com, Mahesh.Shirshyad@amd.com,
tomasz.osinski@intel.com, jiri@resnulli.us,
xiyou.wangcong@gmail.com, davem@davemloft.net,
edumazet@google.com, kuba@kernel.org, vladbu@nvidia.com,
horms@kernel.org, khalidm@nvidia.com, toke@redhat.com,
victor@mojatatu.com, pctammela@mojatatu.com, Vipin.Jain@amd.com,
dan.daly@intel.com, andy.fingerhut@gmail.com,
chris.sommers@keysight.com, mattyk@nvidia.com,
bpf@vger.kernel.org, Jamal Hadi Salim <jhs@mojatatu.com>
Subject: Re: [PATCH net-next v16 00/15] Introducing P4TC (series 1)
Date: Fri, 26 Apr 2024 19:21:31 +0200 [thread overview]
Message-ID: <82ee1013ca0164053e9fb1259eaf676343c430e8.camel@redhat.com> (raw)
In-Reply-To: <CAM0EoMmfDoZ9_ZdK-ZjHjFAjuNN8fVK+R57_UaFqAm=wA0AWVA@mail.gmail.com>
On Fri, 2024-04-26 at 13:12 -0400, Jamal Hadi Salim wrote:
> On Fri, Apr 19, 2024 at 2:01 PM Jamal Hadi Salim <jhs@mojatatu.com> wrote:
> >
> > On Fri, Apr 19, 2024 at 1:20 PM Paolo Abeni <pabeni@redhat.com> wrote:
> > >
> > > On Fri, 2024-04-19 at 08:08 -0400, Jamal Hadi Salim wrote:
> > > > On Thu, Apr 11, 2024 at 12:24 PM Jamal Hadi Salim <jhs@mojatatu.com> wrote:
> > > > >
> > > > > On Thu, Apr 11, 2024 at 10:07 AM Paolo Abeni <pabeni@redhat.com> wrote:
> > > > > >
> > > > > > On Wed, 2024-04-10 at 10:01 -0400, Jamal Hadi Salim wrote:
> > > > > > > The only change that v16 makes is to add a nack to patch 14 on kfuncs
> > > > > > > from Daniel and John. We strongly disagree with the nack; unfortunately I
> > > > > > > have to rehash whats already in the cover letter and has been discussed over
> > > > > > > and over and over again:
> > > > > >
> > > > > > I feel bad asking, but I have to, since all options I have here are
> > > > > > IMHO quite sub-optimal.
> > > > > >
> > > > > > How bad would be dropping patch 14 and reworking the rest with
> > > > > > alternative s/w datapath? (I guess restoring it from oldest revision of
> > > > > > this series).
> > > > >
> > > > >
> > > > > We want to keep using ebpf for the s/w datapath if that is not clear by now.
> > > > > I do not understand the obstructionism tbh. Are users allowed to use
> > > > > kfuncs as part of infra or not? My understanding is yes.
> > > > > This community is getting too political and my worry is that we have
> > > > > corporatism creeping in like it is in standards bodies.
> > > > > We started by not using ebpf. The same people who are objecting now
> > > > > went up in arms and insisted we use ebpf. As a member of this
> > > > > community, my motivation was to meet them in the middle by
> > > > > compromising. We invested another year to move to that middle ground.
> > > > > Now they are insisting we do not use ebpf because they dont like our
> > > > > design or how we are using ebpf or maybe it's not a use case they have
> > > > > any need for or some other politics. I lost track of the moving goal
> > > > > posts. Open source is about solving your itch. This code is entirely
> > > > > on TC, zero code changed in ebpf core. The new goalpost is based on
> > > > > emotional outrage over use of functions. The whole thing is getting
> > > > > extremely toxic.
> > > > >
> > > >
> > > > Paolo,
> > > > Following up since no movement for a week now;->
> > > > I am going to give benefit of doubt that there was miscommunication or
> > > > misunderstanding for all the back and forth that has happened so far
> > > > with the nackers. I will provide a summary below on the main points
> > > > raised and then provide responses:
> > > >
> > > > 1) "Use maps"
> > > >
> > > > It doesnt make sense for our requirement. The reason we are using TC
> > > > is because a) P4 has an excellent fit with TC match action paradigm b)
> > > > we are targeting both s/w and h/w and the TC model caters well for
> > > > this. The objects belong to TC, shared between s/w, h/w and control
> > > > plane (and netlink is the API). Maybe this diagram would help:
> > > > https://github.com/p4tc-dev/docs/blob/main/images/why-p4tc/p4tc-runtime-pipeline.png
> > > >
> > > > While the s/w part stands on its own accord (as elaborated many
> > > > times), for TC which has offloads, the s/w twin is introduced before
> > > > the h/w equivalent. This is what this series is doing.
> > > >
> > > > 2) "but ... it is not performant"
> > > > This has been brought up in regards to netlink and kfuncs. Performance
> > > > is a lower priority to P4 correctness and expressibility.
> > > > Netlink provides us the abstractions we need, it works with TC for
> > > > both s/w and h/w offload and has a lot of knowledge base for
> > > > expressing control plane APIs. We dont believe reinventing all that
> > > > makes sense.
> > > > Kfuncs are a means to an end - they provide us the gluing we need to
> > > > have an ebpf s/w datapath to the TC objects. Getting an extra
> > > > 10-100Kpps is not a driving factor.
> > > >
> > > > 3) "but you did it wrong, here's how you do it..."
> > > >
> > > > I gave up on responding to this - but do note this sentiment is a big
> > > > theme in the exchanges and consumed most of the electrons. We are
> > > > _never_ going to get any consensus with statements like "tc actions
> > > > are a mistake" or "use tcx".
> > > >
> > > > 4) "... drop the kfunc patch"
> > > >
> > > > kfuncs essentially boil down to function calls. They don't require any
> > > > special handling by the eBPF verifier nor introduce new semantics to
> > > > eBPF. They are similar in nature to the already existing kfuncs
> > > > interacting with other kernel objects such as nf_conntrack.
> > > > The precedence (repeated in conferences and email threads multiple
> > > > times) is: kfuncs dont have to be sent to ebpf list or reviewed by
> > > > folks in the ebpf world. And We believe that rule applies to us as
> > > > well. Either kfuncs (and frankly ebpf) is infrastructure glue or it's
> > > > not.
> > > >
> > > > Now for a little rant:
> > > >
> > > > Open source is not a zero-sum game. Ebpf already coexists with
> > > > netfilter, tc, etc and various subsystems happily.
> > > > I hope our requirement is clear and i dont have to keep justifying why
> > > > P4 or relitigate over and over again why we need TC. Open source is
> > > > about scratching your itch and our itch is totally contained within
> > > > TC. I cant help but feel that this community is getting way too
> > > > pervasive with politics and obscure agendas. I understand agendas, I
> > > > just dont understand the zero-sum thinking.
> > > > My view is this series should still be applied with the nacks since it
> > > > sits entirely on its own silo within networking/TC (and has nothing to
> > > > do with ebpf).
> > >
> > > It's really hard for me - meaning I'll not do that - applying a series
> > > that has been so fiercely nacked, especially given that the other
> > > maintainers are not supporting it.
> > >
> > > I really understand this is very bad for you.
> > >
> > > Let me try to do an extreme attempt to find some middle ground between
> > > this series and the bpf folks.
> > >
> > > My understanding is that the most disliked item is the lifecycle for
> > > the objects allocated via the kfunc(s).
> > >
> > > If I understand correctly, the hard requirement on bpf side is that any
> > > kernel object allocated by kfunc must be released at program unload
> > > time. p4tc postpone such allocation to recycle the structure.
> > >
> > > While there are other arguments, my reading of the past few iterations
> > > is that solving the above node should lift the nack, am I correct?
> > >
> > > Could p4tc pre-allocate all the p4tc_table_entry_act_bpf_kern entries
> > > and let p4a_runt_create_bpf() fail if the pool is empty? would that
> > > satisfy the bpf requirement?
> >
> > Let me think about it and weigh the consequences.
> >
>
> Sorry, was busy evaluating. Yes, we can enforce the memory allocation
> constraints such that when the ebpf program is removed any entries
> added by said ebpf program can be removed from the datapath.
I suggested the such changes based on my interpretation of this long
and complex discussion, I can have missed some or many relevant points.
@Alexei: could you please double check the above and eventually,
hopefully, confirm that such change would lift your nacked-by?
Thanks!
Paolo
next prev parent reply other threads:[~2024-04-26 17:21 UTC|newest]
Thread overview: 66+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-10 14:01 [PATCH net-next v16 00/15] Introducing P4TC (series 1) Jamal Hadi Salim
2024-04-10 14:01 ` [PATCH net-next v16 01/15] net: sched: act_api: Introduce P4 actions list Jamal Hadi Salim
2024-04-10 14:01 ` [PATCH net-next v16 02/15] net/sched: act_api: increase action kind string length Jamal Hadi Salim
2024-04-10 14:01 ` [PATCH net-next v16 03/15] net/sched: act_api: Update tc_action_ops to account for P4 actions Jamal Hadi Salim
2024-04-10 14:01 ` [PATCH net-next v16 04/15] net/sched: act_api: add struct p4tc_action_ops as a parameter to lookup callback Jamal Hadi Salim
2024-04-10 14:01 ` [PATCH net-next v16 05/15] net: sched: act_api: Add support for preallocated P4 action instances Jamal Hadi Salim
2024-04-10 14:01 ` [PATCH net-next v16 06/15] p4tc: add P4 data types Jamal Hadi Salim
2024-04-10 14:01 ` [PATCH net-next v16 07/15] p4tc: add template API Jamal Hadi Salim
2024-04-10 14:01 ` [PATCH net-next v16 08/15] p4tc: add template pipeline create, get, update, delete Jamal Hadi Salim
2024-04-10 14:01 ` [PATCH net-next v16 09/15] p4tc: add template action create, update, delete, get, flush and dump Jamal Hadi Salim
2024-04-10 14:01 ` [PATCH net-next v16 10/15] p4tc: add runtime action support Jamal Hadi Salim
2024-04-10 14:01 ` [PATCH net-next v16 11/15] p4tc: add template table create, update, delete, get, flush and dump Jamal Hadi Salim
2024-04-10 14:01 ` [PATCH net-next v16 12/15] p4tc: add runtime table entry create and update Jamal Hadi Salim
2024-04-10 14:01 ` [PATCH net-next v16 13/15] p4tc: add runtime table entry get, delete, flush and dump Jamal Hadi Salim
2024-04-10 14:01 ` [PATCH net-next v16 14/15] p4tc: add set of P4TC table kfuncs Jamal Hadi Salim
2024-04-10 14:01 ` [PATCH net-next v16 15/15] p4tc: add P4 classifier Jamal Hadi Salim
2024-04-11 14:07 ` [PATCH net-next v16 00/15] Introducing P4TC (series 1) Paolo Abeni
2024-04-11 16:24 ` Jamal Hadi Salim
2024-04-19 12:08 ` Jamal Hadi Salim
2024-04-19 14:23 ` Alexei Starovoitov
2024-04-19 14:33 ` Jamal Hadi Salim
2024-04-19 14:37 ` Alexei Starovoitov
2024-04-19 14:45 ` Jamal Hadi Salim
2024-04-19 14:49 ` Alexei Starovoitov
2024-04-19 14:55 ` Jamal Hadi Salim
2024-04-19 17:20 ` Paolo Abeni
2024-04-19 18:01 ` Jamal Hadi Salim
2024-04-26 17:12 ` Jamal Hadi Salim
2024-04-26 17:21 ` Paolo Abeni [this message]
2024-04-26 17:43 ` Alexei Starovoitov
2024-04-26 18:03 ` Jamal Hadi Salim
2024-05-20 15:34 ` Jamal Hadi Salim
2024-05-21 12:35 ` On the NACKs on P4TC patches Jamal Hadi Salim
2024-05-22 22:19 ` Jakub Kicinski
2024-05-22 23:03 ` Jamal Hadi Salim
2024-05-23 0:30 ` Singhai, Anjali
[not found] ` <MW4PR12MB71927C9E4B94871B45F845DF97F52@MW4PR12MB7192.namprd12.prod.outlook.com>
2024-05-25 16:43 ` Jain, Vipin
2024-05-28 20:17 ` John Fastabend
2024-05-28 22:17 ` Singhai, Anjali
2024-05-28 23:01 ` Tom Herbert
2024-05-28 23:43 ` Chris Sommers
2024-05-29 11:10 ` Jamal Hadi Salim
[not found] ` <CAM0EoMnyn9Bfufar5rv6cbRRTHKCaZ1q-b93T2EWUKcBv_ibNw@mail.gmail.com>
2024-05-29 14:45 ` Tom Herbert
2024-05-30 16:59 ` Jamal Hadi Salim
2024-05-30 18:16 ` Tom Herbert
2024-05-28 23:45 ` John Fastabend
2024-05-29 1:55 ` IR for Programmable Datapaths [WAS Re: On the NACKs on P4TC patches] Tom Herbert
2024-05-29 11:21 ` On the NACKs on P4TC patches Jamal Hadi Salim
2024-05-29 11:22 ` Jamal Hadi Salim
[not found] ` <MW4PR12MB71928072B3524CCC71B191F497F22@MW4PR12MB7192.namprd12.prod.outlook.com>
2024-05-29 1:44 ` Jain, Vipin
2024-05-23 0:44 ` Chris Sommers
[not found] ` <SN6PR17MB211069668AF4C8031B116B9D96EB2@SN6PR17MB2110.namprd17.prod.outlook.com>
2024-05-23 0:54 ` Tom Herbert
2024-05-23 1:13 ` DSL vs low level language WAS(Re: " Jamal Hadi Salim
2024-05-23 2:29 ` Chris Sommers
2024-05-23 3:34 ` Tom Herbert
2024-05-24 16:50 ` Tom Herbert
2024-05-24 18:45 ` Jamal Hadi Salim
2024-05-24 22:36 ` Chris Sommers
2024-06-11 14:21 ` [PATCH net-next v16 00/15] Introducing P4TC (series 1) Jakub Kicinski
2024-06-11 15:10 ` Jamal Hadi Salim
2024-06-11 15:33 ` Jakub Kicinski
2024-06-11 15:53 ` Jamal Hadi Salim
2024-06-11 16:34 ` Tom Herbert
2024-06-11 17:21 ` John Fastabend
2024-06-11 17:53 ` Jakub Kicinski
2024-06-11 19:13 ` Jamal Hadi Salim
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=82ee1013ca0164053e9fb1259eaf676343c430e8.camel@redhat.com \
--to=pabeni@redhat.com \
--cc=Mahesh.Shirshyad@amd.com \
--cc=Vipin.Jain@amd.com \
--cc=alexei.starovoitov@gmail.com \
--cc=andy.fingerhut@gmail.com \
--cc=anjali.singhai@intel.com \
--cc=bpf@vger.kernel.org \
--cc=chris.sommers@keysight.com \
--cc=dan.daly@intel.com \
--cc=davem@davemloft.net \
--cc=deb.chatterjee@intel.com \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=jhs@mojatatu.com \
--cc=jiri@resnulli.us \
--cc=khalidm@nvidia.com \
--cc=kuba@kernel.org \
--cc=mattyk@nvidia.com \
--cc=mleitner@redhat.com \
--cc=namrata.limaye@intel.com \
--cc=netdev@vger.kernel.org \
--cc=pctammela@mojatatu.com \
--cc=toke@redhat.com \
--cc=tom@sipanda.io \
--cc=tomasz.osinski@intel.com \
--cc=victor@mojatatu.com \
--cc=vladbu@nvidia.com \
--cc=xiyou.wangcong@gmail.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