From: "Toke Høiland-Jørgensen" <toke@redhat.com>
To: Jamal Hadi Salim <jhs@mojatatu.com>, netdev@vger.kernel.org
Cc: deb.chatterjee@intel.com, anjali.singhai@intel.com,
namrata.limaye@intel.com, tom@sipanda.io, mleitner@redhat.com,
Mahesh.Shirshyad@amd.com, Vipin.Jain@amd.com,
tomasz.osinski@intel.com, jiri@resnulli.us,
xiyou.wangcong@gmail.com, davem@davemloft.net,
edumazet@google.com, kuba@kernel.org, pabeni@redhat.com,
vladbu@nvidia.com, horms@kernel.org, khalidm@nvidia.com,
daniel@iogearbox.net, victor@mojatatu.com,
pctammela@mojatatu.com, dan.daly@intel.com,
andy.fingerhut@gmail.com, chris.sommers@keysight.com,
mattyk@nvidia.com, bpf@vger.kernel.org
Subject: Re: [PATCH net-next v13 00/15] Introducing P4TC (series 1)
Date: Tue, 02 Apr 2024 23:43:30 +0200 [thread overview]
Message-ID: <877chfmoe5.fsf@toke.dk> (raw)
In-Reply-To: <20240325142834.157411-1-jhs@mojatatu.com>
Jamal Hadi Salim <jhs@mojatatu.com> writes:
> This is the first patchset of two. In this patch we are submitting 15 which
> cover the minimal viable P4 PNA architecture.
> Please, if you want to discuss a slightly tangential subject like offload or
> even your politics then start another thread with a different subject line.
> The way you do it is to change the subject line to for example
> "<Your New Subject here> (WAS: <original subject line here>)".
>
> In this cover letter i am restoring text i took out in V10 which stated "our
> requirements".
>
> Martin, please look at patch 14 again. The bpf selftests for kfuncs is
> sloted for series 2. Paolo, please take a look at 1, 3, 6 for the changes
> you suggested. Marcelo, because we made changes to patch 14, I have
> removed your reviewed-by. Can you please take another look at that patch?
>
> __Description of these Patches__
>
> These Patches are constrained entirely within the TC domain with very tiny
> changes made in patch 1-5. eBPF is used as an infrastructure component for
> the software datapath and no changes are made to any eBPF code, only kfuncs
> are introduced in patch 14.
>
> Patch #1 adds infrastructure for per-netns P4 actions that can be created on
> as need basis for the P4 program requirement. This patch makes a small
> incision into act_api. Patches 2-4 are minimalist enablers for P4TC and have
> no effect on the classical tc action (example patch#2 just increases the size
> of the action names from 16->64B).
> Patch 5 adds infrastructure support for preallocation of dynamic actions
> needed for P4.
>
> The core P4TC code implements several P4 objects.
> 1) Patch #6 introduces P4 data types which are consumed by the rest of the
> code
> 2) Patch #7 introduces the templating API. i.e. CRUD commands for templates
> 3) Patch #8 introduces the concept of templating Pipelines. i.e CRUD
> commands for P4 pipelines.
> 4) Patch #9 introduces the action templates and associated CRUD commands.
> 5) Patch #10 introduce the action runtime infrastructure.
> 6) Patch #11 introduces the concept of P4 table templates and associated
> CRUD commands for tables.
> 7) Patch #12 introduces runtime table entry infra and associated CU
> commands.
> 8) Patch #13 introduces runtime table entry infra and associated RD
> commands.
> 9) Patch #14 introduces interaction of eBPF to P4TC tables via kfunc.
> 10) Patch #15 introduces the TC classifier P4 used at runtime.
>
> There are a few more patches not in this patchset that deal with externs,
> test cases, etc.
Unfortunately I don't have the bandwidth to review these in details ATM,
but I think it makes sense to have P4 be a conceptual entity in TC, and
using eBPF as the infrastructure to execute the programs. So, on that
conceptual level only:
Acked-by: Toke Høiland-Jørgensen <toke@redhat.com>
[...]
> To summarize in presence of eBPF: The debugging idea is probably still
> alive. One could dump, with proper tooling(bpftool for example), the
> loaded eBPF code and be able to check for differences. But this is not the
> interesting part.
> The concept of going back from whats in the kernel to P4 is a lot more
> difficult to implement mostly due to scoping of DSL vs general purpose. It
> may be lost. We have been discussing ways to use BTF and embedding
> annotations in the eBPF code and binary but more thought is required and we
> welcome suggestions.
One thought on this: I don't believe there's any strict requirement that
the source lines in the "BTF lineinfo" information has to be C source
code. So if the P4 compiler can relate the generated BPF instructions
back to the original P4, couldn't it just embed the P4 program itself
(in some suitable syntax) as the lineinfo?
-Toke
next prev parent reply other threads:[~2024-04-02 21:43 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-25 14:28 [PATCH net-next v13 00/15] Introducing P4TC (series 1) Jamal Hadi Salim
2024-03-25 14:28 ` [PATCH net-next v13 01/15] net: sched: act_api: Introduce P4 actions list Jamal Hadi Salim
2024-03-25 14:28 ` [PATCH net-next v13 02/15] net/sched: act_api: increase action kind string length Jamal Hadi Salim
2024-03-25 14:28 ` [PATCH net-next v13 03/15] net/sched: act_api: Update tc_action_ops to account for P4 actions Jamal Hadi Salim
2024-03-25 14:28 ` [PATCH net-next v13 04/15] net/sched: act_api: add struct p4tc_action_ops as a parameter to lookup callback Jamal Hadi Salim
2024-03-25 14:28 ` [PATCH net-next v13 05/15] net: sched: act_api: Add support for preallocated P4 action instances Jamal Hadi Salim
2024-03-25 14:28 ` [PATCH net-next v13 06/15] p4tc: add P4 data types Jamal Hadi Salim
2024-03-26 14:47 ` Paolo Abeni
2024-03-26 23:13 ` Jamal Hadi Salim
2024-03-25 14:28 ` [PATCH net-next v13 07/15] p4tc: add template API Jamal Hadi Salim
2024-03-25 14:28 ` [PATCH net-next v13 08/15] p4tc: add template pipeline create, get, update, delete Jamal Hadi Salim
2024-03-25 14:28 ` [PATCH net-next v13 09/15] p4tc: add template action create, update, delete, get, flush and dump Jamal Hadi Salim
2024-03-25 14:28 ` [PATCH net-next v13 10/15] p4tc: add runtime action support Jamal Hadi Salim
2024-03-25 14:28 ` [PATCH net-next v13 11/15] p4tc: add template table create, update, delete, get, flush and dump Jamal Hadi Salim
2024-03-25 14:28 ` [PATCH net-next v13 12/15] p4tc: add runtime table entry create and update Jamal Hadi Salim
2024-03-25 14:28 ` [PATCH net-next v13 13/15] p4tc: add runtime table entry get, delete, flush and dump Jamal Hadi Salim
2024-03-25 14:28 ` [PATCH net-next v13 14/15] p4tc: add set of P4TC table kfuncs Jamal Hadi Salim
2024-04-01 19:17 ` Marcelo Ricardo Leitner
2024-03-25 14:28 ` [PATCH net-next v13 15/15] p4tc: add P4 classifier Jamal Hadi Salim
2024-04-02 21:43 ` Toke Høiland-Jørgensen [this message]
2024-04-02 23:13 ` [PATCH net-next v13 00/15] Introducing P4TC (series 1) 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=877chfmoe5.fsf@toke.dk \
--to=toke@redhat.com \
--cc=Mahesh.Shirshyad@amd.com \
--cc=Vipin.Jain@amd.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=daniel@iogearbox.net \
--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=pabeni@redhat.com \
--cc=pctammela@mojatatu.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;
as well as URLs for NNTP newsgroup(s).