DPDK patches and discussions
 help / color / mirror / Atom feed
From: Ori Kam <orika@nvidia.com>
To: Ivan Malov <ivan.malov@arknetworks.am>,
	Tomer Shmilovich <tshmilovich@nvidia.com>
Cc: "NBU-Contact-Thomas Monjalon (EXTERNAL)" <thomas@monjalon.net>,
	Ferruh Yigit <ferruh.yigit@amd.com>,
	Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>,
	"dev@dpdk.org" <dev@dpdk.org>
Subject: RE: [RFC] ethdev: add group set miss actions API
Date: Tue, 8 Aug 2023 16:53:20 +0000	[thread overview]
Message-ID: <MW2PR12MB4666738EE5612FD39E6D4E58D60DA@MW2PR12MB4666.namprd12.prod.outlook.com> (raw)
In-Reply-To: <42031422-f567-f376-195d-6aad89f56489@arknetworks.am>

Hi Ivan and Tomer,

The RFC looks good to me, some comments inline.

> -----Original Message-----
> From: Ivan Malov <ivan.malov@arknetworks.am>
> Sent: Tuesday, August 8, 2023 7:15 PM
> 
> Hi Tomer,
> 
> OK, let's see what others will say.
> Minor comment below.
> 
> On Tue, 8 Aug 2023, Tomer Shmilovich wrote:
> 
> > Hi Ivan, please see inline comments.
> >
> > Thanks, Tomer
> >
> >> -----Original Message-----
> >> From: Ivan Malov <ivan.malov@arknetworks.am>
> >> Sent: Tuesday, 8 August 2023 2:03
> >> To: Tomer Shmilovich <tshmilovich@nvidia.com>
> >> Cc: Ori Kam <orika@nvidia.com>; NBU-Contact-Thomas Monjalon
> >> (EXTERNAL) <thomas@monjalon.net>; Ferruh Yigit <ferruh.yigit@amd.com>;
> >> Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>; dev@dpdk.org
> >> Subject: Re: [RFC] ethdev: add group set miss actions API
> >>
> >> External email: Use caution opening links or attachments
> >>
> >>
> >> Hi Tomer,
> >>
> >> This is a good proposal overall, but it's a bit questionable with regard to the
> >> transfer domain and precisely group 0.
> >>
> >> Say, the user starts a DPDK application and plugs a PF to it, also plugs a
> >> representor for a VF. If I'm not mistaken, in this case, default behaviour is
> >> hardly "undefined" for group 0. Packets sent by a VF are expected to reach
> the
> >> representor (and vice versa). Also, packets arriving on the physical port are
> >> expected to hit the PF port, ethdev 0, for instance.
> >>
> >
> > True.
> >
> >> Does this new API intend to re-define this? I mean, if the application fails to
> set
> >> the default action for group 0 (ENOTSUP), shall it assume that the behaviour
> >> will be as described above? And if it succeeds, then assume that such implicit
> >> interconnections cease functioning?
> >>
> >> So, this API is something like "isolated mode"
> >> in the case of non-transfer API, but allowing to choose a "default" action
> >> rather than DROP?
> >
> > You have a point. These are the default "miss actions" for all use cases as I
> understand them:
> > Transfer - miss group 0 - goes to the other side of the connection: rep --> VF,
> VF --> rep.
> > Transfer - miss group > 0 - goes to E-switch manager (proxy port).
> > Ingress - miss group 0 - goes to application when expected (i.e. promiscuous
> mode); otherwise drop/go to kernel in case of bifurcated driver.
> > Ingress - miss group > 0 - drop.
> > Egress - miss any group - goes to wire.
> >
> > I suggest documenting these default "miss actions", and have the new
> function update the miss actions for a given group.
> > If an application sets the group's miss actions as none (i.e. actions[0].type ==
> RTE_FLOW_ACTION_TYPE_END), the miss actions should be restored to the
> aforementioned default miss actions.
> 
> There is also an action "PASSTHRU". It can potentially be used with this
> meaning as "use implicit defaults", as "PASSTHRU" + "END".
> Or just "END", as you suggest. Perhaps others will
> take a look at this, too.
> 
> Thank you.
> 
According to my understanding "PASSTHRU" action
means that a packet after hitting a rule will continue in the same table trying to match lower priority/different rules.
"PASSTHRU" doesn't define what happens to flows that matched the first rule but didn't match
any other rule. 
Based on the above if we combine the two we can set all rules for example with the "PASSTHRU"
set the requested default action. This will result in all rules having the same terminating action.

Might be nice since using this you can change with one command all the terminating action for all flows.

Best,
Ori

[Snip]

      reply	other threads:[~2023-08-08 16:53 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-07 13:36 Tomer Shmilovich
2023-08-07 23:03 ` Ivan Malov
2023-08-08 16:05   ` Tomer Shmilovich
2023-08-08 16:14     ` Ivan Malov
2023-08-08 16:53       ` Ori Kam [this message]

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=MW2PR12MB4666738EE5612FD39E6D4E58D60DA@MW2PR12MB4666.namprd12.prod.outlook.com \
    --to=orika@nvidia.com \
    --cc=andrew.rybchenko@oktetlabs.ru \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@amd.com \
    --cc=ivan.malov@arknetworks.am \
    --cc=thomas@monjalon.net \
    --cc=tshmilovich@nvidia.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).