netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: Tom Herbert <tom@herbertland.com>
Cc: "Singhai, Anjali" <anjali.singhai@intel.com>,
	Jamal Hadi Salim <hadi@mojatatu.com>,
	Jakub Kicinski <kuba@kernel.org>,
	Jamal Hadi Salim <jhs@mojatatu.com>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"kernel@mojatatu.com" <kernel@mojatatu.com>,
	"Chatterjee, Deb" <deb.chatterjee@intel.com>,
	"Limaye, Namrata" <namrata.limaye@intel.com>,
	"khalidm@nvidia.com" <khalidm@nvidia.com>,
	"tom@sipanda.io" <tom@sipanda.io>,
	"pratyush@sipanda.io" <pratyush@sipanda.io>,
	"jiri@resnulli.us" <jiri@resnulli.us>,
	"xiyou.wangcong@gmail.com" <xiyou.wangcong@gmail.com>,
	"davem@davemloft.net" <davem@davemloft.net>,
	"edumazet@google.com" <edumazet@google.com>,
	"pabeni@redhat.com" <pabeni@redhat.com>,
	"vladbu@nvidia.com" <vladbu@nvidia.com>,
	"simon.horman@corigine.com" <simon.horman@corigine.com>,
	"stefanc@marvell.com" <stefanc@marvell.com>,
	"seong.kim@amd.com" <seong.kim@amd.com>,
	"mattyk@nvidia.com" <mattyk@nvidia.com>,
	"Daly, Dan" <dan.daly@intel.com>,
	"Fingerhut, John Andy" <john.andy.fingerhut@intel.com>
Subject: Re: [PATCH net-next RFC 00/20] Introducing P4TC
Date: Sat, 28 Jan 2023 18:09:45 -0800	[thread overview]
Message-ID: <20230128180945.6b4d6cb1@hermes.local> (raw)
In-Reply-To: <CALx6S36akGgRKohduW-aApgRCbZqjJ5uDzTeGQpD=pPietN2Dg@mail.gmail.com>

On Sat, 28 Jan 2023 13:17:35 -0800
Tom Herbert <tom@herbertland.com> wrote:

> On Fri, Jan 27, 2023 at 5:34 PM Singhai, Anjali
> <anjali.singhai@intel.com> wrote:
> >
> > P4 is definitely the language of choice for defining a Dataplane in HW for IPUs/DPUs/FNICs and Switches. As a vendor I can definitely say that the smart devices implement a very programmable ASIC as each customer Dataplane defers quite a bit and P4 is the language of choice for specifying the Dataplane definitions. A lot of customer deploy proprietary protocols that run in HW and there is no good way right now in kernel to support these proprietary protcols. If we enable these protocol in the kernel it takes a huge effort and they don’t evolve well.
> > Being able to define in P4 and offload into HW using tc mechanism really helps in supporting the customer's Dataplane and protcols without having to wait months and years to get the kernel updated. Here is a link to our IPU offering that is P4 programmable  
> 
> Anjali,
> 
> P4 may be the language of choice for programming HW datapath, however
> it's not the language of choice for programming SW datapaths-- that's
> C over XDP/eBPF. And while XDP/eBPF also doesn't depend on kernel
> updates, it has a major advantage over P4 in that it doesn't require
> fancy hardware either.
> 
> Even at full data center deployment of P4 devices, there will be at
> least an order of magnitude more deployment of SW programmed
> datapaths; and unless someone is using P4 hardware, there's zero value
> in rewriting programs in P4 instead of C. IMO, we will never see
> networking developers moving to P4 en masse-- P4 will always be a
> niche market relative to the programmable datapath space and the skill
> sets required to support serious scalable deployment. That being said,
> there will be a nontrivial contingent of users who need to run the
> same programs in both SW and HW environments. Expecting them to
> maintain two very different code bases to support two disparate models
> is costly and prohibitive to them. So for their benefit, we need a
> solution to reconcile these two models. P4TC is one means to
> accomplish that.
> 
> We want to consider both the permutations: 1) compile C code to run in
> P4 hardware 2) compile P4 to run in SW. If we establish a common IR,
> then we can generalize the problem: programmer writes their datapath
> in the language of their choosing (P4, C, Python, Rust, etc.), they
> compile the program to whatever backend they are using (HW, SW,
> XDP/eBPF, etc.). The P4TC CLI serves as one such IR as there's nothing
> that prevents someone from compiling a program from another language
> to the CLI (for instance, we've implemented the compiler to output the
> parser CLI from PANDA-C). The CLI natively runs in kernel SW, and with
> the right hooks could be offloaded to HW-- not just P4 hardware but
> potentially other hardware targets as well.

Rather than more kernel network software, if instead this was
targeting userspace or eBPF for the SW version; then there would
be less exposed security risk and also less long term technical debt
here.

  reply	other threads:[~2023-01-29  2:09 UTC|newest]

Thread overview: 66+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-24 17:03 [PATCH net-next RFC 00/20] Introducing P4TC Jamal Hadi Salim
2023-01-26 23:30 ` Jakub Kicinski
2023-01-27 13:33   ` Jamal Hadi Salim
2023-01-27 17:18     ` Jakub Kicinski
2023-01-27 19:42       ` Jamal Hadi Salim
2023-01-28  1:34         ` Singhai, Anjali
2023-01-28 21:17           ` Tom Herbert
2023-01-29  2:09             ` Stephen Hemminger [this message]
2023-01-30  3:09             ` Singhai, Anjali
2023-01-30 17:05               ` Tom Herbert
2023-01-27 18:26   ` Jiri Pirko
2023-01-27 20:04     ` Jamal Hadi Salim
2023-01-27 22:26       ` sdf
2023-01-27 23:06         ` Tom Herbert
2023-01-28  0:47           ` Stanislav Fomichev
2023-01-28  1:32             ` Tom Herbert
2023-01-27 23:27         ` Jamal Hadi Salim
2023-01-28  0:47           ` Stanislav Fomichev
2023-01-28 13:37             ` Willem de Bruijn
2023-01-28 15:10               ` Jamal Hadi Salim
2023-01-28 15:33                 ` Willem de Bruijn
2023-01-29  5:39                   ` John Fastabend
2023-01-29 11:11                     ` Jamal Hadi Salim
2023-01-29 11:19                       ` Jamal Hadi Salim
2023-01-30  4:30                       ` John Fastabend
2023-01-30 10:13                         ` Jiri Pirko
2023-01-30 11:26                           ` Toke Høiland-Jørgensen
2023-01-30 14:06                             ` Jamal Hadi Salim
2023-01-30 14:42                               ` Andrew Lunn
2023-01-30 15:31                                 ` Jamal Hadi Salim
2023-01-30 17:04                               ` Toke Høiland-Jørgensen
2023-01-30 19:02                                 ` Jamal Hadi Salim
2023-01-30 20:21                                   ` Toke Høiland-Jørgensen
2023-01-30 21:10                                     ` John Fastabend
2023-01-30 21:20                                       ` Toke Høiland-Jørgensen
2023-01-30 22:53                                         ` Jamal Hadi Salim
2023-01-30 23:24                                           ` Singhai, Anjali
2023-01-31  0:06                                             ` John Fastabend
2023-01-31  0:26                                               ` Jamal Hadi Salim
2023-01-31  4:12                                                 ` Jakub Kicinski
2023-01-31 10:27                                                   ` Jamal Hadi Salim
2023-01-31 10:30                                                     ` Jamal Hadi Salim
2023-01-31 19:10                                                       ` Jakub Kicinski
2023-01-31 22:32                                                         ` Jamal Hadi Salim
2023-01-31 22:36                                                           ` Jakub Kicinski
2023-01-31 22:50                                                             ` Jamal Hadi Salim
2023-01-30 23:32                                           ` John Fastabend
2023-01-31 12:17                                           ` Toke Høiland-Jørgensen
2023-01-31 12:37                                             ` Jiri Pirko
2023-01-31 14:38                                             ` Jiri Pirko
2023-01-31 17:01                                               ` Toke Høiland-Jørgensen
2023-01-31 22:23                                                 ` Jamal Hadi Salim
2023-01-31 22:53                                                   ` Toke Høiland-Jørgensen
2023-01-31 23:31                                                     ` Jamal Hadi Salim
2023-02-01 18:08                                                       ` Toke Høiland-Jørgensen
2023-02-02 18:50                                                         ` Jamal Hadi Salim
2023-02-02 23:34                                                           ` Tom Herbert
2023-01-30 22:41                                       ` Tom Herbert
2023-02-14 17:07                               ` Edward Cree
2023-02-14 20:44                                 ` Jamal Hadi Salim
2023-02-16 20:24                                   ` Jamal Hadi Salim
2023-01-29 11:02                   ` Jamal Hadi Salim
2023-01-29 22:14                     ` Toke Høiland-Jørgensen
2023-01-28 13:41             ` Jamal Hadi Salim
2023-01-27 23:02       ` Daniel Borkmann
2023-01-27 23:57         ` 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=20230128180945.6b4d6cb1@hermes.local \
    --to=stephen@networkplumber.org \
    --cc=anjali.singhai@intel.com \
    --cc=dan.daly@intel.com \
    --cc=davem@davemloft.net \
    --cc=deb.chatterjee@intel.com \
    --cc=edumazet@google.com \
    --cc=hadi@mojatatu.com \
    --cc=jhs@mojatatu.com \
    --cc=jiri@resnulli.us \
    --cc=john.andy.fingerhut@intel.com \
    --cc=kernel@mojatatu.com \
    --cc=khalidm@nvidia.com \
    --cc=kuba@kernel.org \
    --cc=mattyk@nvidia.com \
    --cc=namrata.limaye@intel.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=pratyush@sipanda.io \
    --cc=seong.kim@amd.com \
    --cc=simon.horman@corigine.com \
    --cc=stefanc@marvell.com \
    --cc=tom@herbertland.com \
    --cc=tom@sipanda.io \
    --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).