DPDK patches and discussions
 help / color / mirror / Atom feed
From: Jerin Jacob <jerinjacobk@gmail.com>
To: "Zhang, Qi Z" <qi.z.zhang@intel.com>
Cc: Ori Kam <orika@nvidia.com>, "dev@dpdk.org" <dev@dpdk.org>,
	 "techboard@dpdk.org" <techboard@dpdk.org>,
	"Richardson, Bruce" <bruce.richardson@intel.com>,
	 "Burakov, Anatoly" <anatoly.burakov@intel.com>,
	"Wiles, Keith" <keith.wiles@intel.com>,
	 "Liang, Cunming" <cunming.liang@intel.com>,
	"Wu, Jingjing" <jingjing.wu@intel.com>,
	 "Zhang, Helin" <helin.zhang@intel.com>,
	"Mcnamara, John" <john.mcnamara@intel.com>,
	 "Xu, Rosen" <rosen.xu@intel.com>,
	Kiran Kumar K <kirankumark@marvell.com>,
	 Satheesh Paul <psatheesh@marvell.com>
Subject: Re: seeking community input on adapting DPDK to P4Runtime backend
Date: Wed, 24 May 2023 20:30:13 +0530	[thread overview]
Message-ID: <CALBAE1PXDYPL3UOpQcvE1meRh7NgWUDO3zE5YjppYf=4hsJ4MA@mail.gmail.com> (raw)
In-Reply-To: <DM4PR11MB5994A61AA0CBBDCE3616D101D7439@DM4PR11MB5994.namprd11.prod.outlook.com>

On Mon, May 22, 2023 at 10:42 AM Zhang, Qi Z <qi.z.zhang@intel.com> wrote:
>
>
>
> > -----Original Message-----
> > From: Ori Kam <orika@nvidia.com>
> > Sent: Thursday, May 18, 2023 10:34 PM
> > To: Zhang, Qi Z <qi.z.zhang@intel.com>; dev@dpdk.org
> > Cc: techboard@dpdk.org; Richardson, Bruce <bruce.richardson@intel.com>;
> > Burakov, Anatoly <anatoly.burakov@intel.com>; Wiles, Keith
> > <keith.wiles@intel.com>; Liang, Cunming <cunming.liang@intel.com>; Wu,
> > Jingjing <jingjing.wu@intel.com>; Zhang, Helin <helin.zhang@intel.com>;
> > Mcnamara, John <john.mcnamara@intel.com>; Xu, Rosen
> > <rosen.xu@intel.com>
> > Subject: RE: seeking community input on adapting DPDK to P4Runtime
> > backend

We did some study to use rte_flow on table driven _HW_ (HW has similar
capability to p4 table)
Following are the observations that need improvement in rte_flow.


1) HW engines require more resources for ACL (considering the
algorithmic HW implementation and table size is in handful of
millions),
whereas EM, LPM needs less HW resources, In p4, we have means to
express this, in rte_flow, in general assumption it is ACL.
We may need to express the mode in rte_flow_template_table_create() or
so. Otherwise,
more than one rte_flow_pattern_template* templates
pattern_template_index of rte_flow_async_create() creates
conflicting modes. In p4, mode is associated with a table, and it has
fixed KEY and VALUE.  This area in the rte_flow requires
improvement if we need to use with p4 type HW.

2) rte_flow is purely in working "inline" mode, If CPU core needs to
do lookup on the table created. We require some APIs
to look-aside mode support.

3) Handling of raw action data

a) In p4, Action value is opaque, so maybe we need to have action RAW
where value can be running
number from 0 to VALUE - 1.

b) Expressing the handling compute operation after lookup.
rte_flow_actions are fixed in nature, which
would suffice for a lot of use case. Expressing the following case may
be difficult with rte_flow now.

For example:
value_from_lookup = lookup(packet, key);
if ((packet.filed[x] && value_value_from_lookup) == value_x) {
packet.field[x] += value_y;
packet.field[x] ^= value_z;
}

I think, such general programming paradigm kind of action may need
ePBF kind program to express.
Where we can add new RTE_FLOW_ACTION_LOAD_EPF_PROGRAM to run through a
simple program after table lookup.

Either, we can update the rte_flow to address the cases reported in the thread
or enhance the current rte_table library(which already has a function
pointer based backend) and
create an object using the rte_table API and connect the table object
with rte_flow API.

I think, we should try to enhance rte_flow for more native table
support if possible.

  reply	other threads:[~2023-05-24 15:00 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-08  6:39 Zhang, Qi Z
2023-05-17 15:18 ` Ori Kam
2023-05-18 10:33   ` Zhang, Qi Z
2023-05-18 14:33     ` Ori Kam
2023-05-22  5:12       ` Zhang, Qi Z
2023-05-24 15:00         ` Jerin Jacob [this message]
2023-05-24 15:43           ` Thomas Monjalon
2023-05-18 14:45     ` Honnappa Nagarahalli
2023-05-22  4:58       ` Zhang, Qi Z

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='CALBAE1PXDYPL3UOpQcvE1meRh7NgWUDO3zE5YjppYf=4hsJ4MA@mail.gmail.com' \
    --to=jerinjacobk@gmail.com \
    --cc=anatoly.burakov@intel.com \
    --cc=bruce.richardson@intel.com \
    --cc=cunming.liang@intel.com \
    --cc=dev@dpdk.org \
    --cc=helin.zhang@intel.com \
    --cc=jingjing.wu@intel.com \
    --cc=john.mcnamara@intel.com \
    --cc=keith.wiles@intel.com \
    --cc=kirankumark@marvell.com \
    --cc=orika@nvidia.com \
    --cc=psatheesh@marvell.com \
    --cc=qi.z.zhang@intel.com \
    --cc=rosen.xu@intel.com \
    --cc=techboard@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).