DPDK patches and discussions
 help / color / mirror / Atom feed
From: Jerin Jacob <jerin.jacob@caviumnetworks.com>
To: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Cc: dev@dpdk.org, dan.daly@intel.com
Subject: Re: [dpdk-dev] [RFC] P4 enablement in DPDK
Date: Wed, 20 Jun 2018 11:43:00 +0530	[thread overview]
Message-ID: <20180620061258.GA31043@jerin> (raw)
In-Reply-To: <1524072121-237519-1-git-send-email-cristian.dumitrescu@intel.com>

-----Original Message-----
> Date: Wed, 18 Apr 2018 18:22:01 +0100
> From: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
> To: dev@dpdk.org
> CC: dan.daly@intel.com
> Subject: [dpdk-dev] [RFC] P4 enablement in DPDK
> X-Mailer: git-send-email 2.7.4
> 
> P4 is a language for programming the data plane of network devices [1]. The P4
> language is developed by p4.org which is joining ONF and Linux Foundation [2].
> 
> This API provides a way to program P4 capable devices through DPDK. The purpose
> of this API is to enable P4 compilers [3] to generate high performance DPDK code
> out of P4 programs.
> 
> The main advantage of this approach is that P4 enablement of network devices can
> be done through DPDK in a unified way:
> 
>    1. This API serves as the interface between the P4 compiler front-end (target
>       independent) and the P4 compiler backe-ends (target specific).
> 
>    2. Device vendors develop their device drivers as part of DPDK by
>       implementing this API. The device driver is agostic of being called by the
>       P4 front-end. The device driver serves as the P4 compiler taget specific
>       back-end.
> 
>    3. The P4 compiler front-end is target independent. The amount of C code it
>       generates is minimized by calling this API directly for every P4 feature
>       as opposed to vendor-specific free-style C code generation.
> 
> This API introduces a pipeline device (PDEV) by using a similar approach to the
> existing ethdev and eventdev DPDK device-like APIs implemented by the DPDK Poll
> Mode Drivers (PMDs). Main features:
> 
>    1. Discovery of built-in pipeline devices and their capabilities.
> 
>    2. Creation of new pipelines out of input ports, output ports, tables and
>       actions.
> 
>    3. Registration of packet protocol header and meta-data fields.
> 
>    4. Action definition for input ports, output ports and tables.
> 
>    5. Pipeline run-time API for table population, statistics read, etc.
> 
> This API targets P4 capable devices such as NICs, FPGAs, NPUs, ASICs, etc, as
> well as CPUs. Let’s remember that the first P in P4 stands for Programmable, and
> the CPUs are arguably the most programmable devices. The implementation for the
> CPU SW target is expected to use the DPDK Packet Framework libraries such as
> librte_pipeline, librte_port, librte_table with some expected but moderate API
> and implementation adjustments.
> 
> Links:
> 
>    [1] P4-16 language specification:
>        https://p4lang.github.io/p4-spec/docs/P4-16-v1.0.0-spec.pdf
> 
>    [2] p4.org to join ONF and LF: https://p4.org/p4/onward-and-upward.html
> 
>    [3] p4c: https://github.com/p4lang/p4c
> 
> Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
> ---
>  lib/librte_pipeline/rte_pdev.h        | 1654 +++++++++++++++++++++++++++++++++
>  lib/librte_pipeline/rte_pdev_driver.h |  283 ++++++

How about moving this as separate library(pipeline dev) with driver(plugin) interface
and librte_pipeline based API being used as one plugin/driver. This will enable us
to hook another HW based or HW-SW combination of plugins in future.

Eventdev has capability to create pipeline that can be add in future
as plugin/driver. The code to deal with rte_tm etc in plugin, you can
make it as common code in the library. So that new plugin can be created based eventdev
+ other building blocks such as rte_tm.


/Jerin

  parent reply	other threads:[~2018-06-20  6:14 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-18 17:22 Cristian Dumitrescu
2018-04-19  5:04 ` Kuusisaari, Juhamatti
2018-06-15 23:25 ` antonin
2018-06-19 17:52   ` Dumitrescu, Cristian
2018-06-20  6:13 ` Jerin Jacob [this message]
2018-06-20 11:56   ` Dumitrescu, Cristian

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=20180620061258.GA31043@jerin \
    --to=jerin.jacob@caviumnetworks.com \
    --cc=cristian.dumitrescu@intel.com \
    --cc=dan.daly@intel.com \
    --cc=dev@dpdk.org \
    /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).