patches for DPDK stable branches
 help / color / mirror / Atom feed
From: Dmitry Kozlyuk <dkozlyuk@nvidia.com>
To: "Singh, Aman Deep" <aman.deep.singh@intel.com>,
	"dev@dpdk.org" <dev@dpdk.org>
Cc: "stable@dpdk.org" <stable@dpdk.org>,
	Matan Azrad <matan@nvidia.com>, Xiaoyun Li <xiaoyun.li@intel.com>,
	Yuying Zhang <yuying.zhang@intel.com>
Subject: RE: [PATCH] app/testpmd: fix use of indirect action after port close
Date: Wed, 30 Mar 2022 22:56:34 +0000	[thread overview]
Message-ID: <BL1PR12MB59459A68EED05B900B91072EB91F9@BL1PR12MB5945.namprd12.prod.outlook.com> (raw)
In-Reply-To: <4f68f319-a533-5170-149b-623acf8bb30d@intel.com>

Hi Aman,

> From: Singh, Aman Deep <aman.deep.singh@intel.com>
> Sent: Wednesday, March 30, 2022 5:24 PM
> [...]
> On 3/7/2022 10:18 PM, Dmitry Kozlyuk wrote:
> > When a port was closed, indirect actions could remain
> > with their handles no longer valid.
> > If a newly attached device was assigned the same ID as the closed port,
> > those indirect actions became accessible again.
> > Any attempt to use them resulted in an undefined behavior.
> > Automatically flush indirect actions when a port is closed.
> >
> > Fixes: 4b61b8774be9 ("ethdev: introduce indirect flow action")
> > Cc: stable@dpdk.org
> >
> > Signed-off-by: Dmitry Kozlyuk <dkozlyuk@nvidia.com>
> > Acked-by: Matan Azrad <matan@nvidia.com>
> > ---
> From: guides/prog_guide/rte_flow.rst
> /"If ``RTE_ETH_DEV_CAPA_FLOW_SHARED_OBJECT_KEEP`` is advertised,//
> //this means that the PMD can keep at least some indirect actions//
> //across device stop and start.
> 
> /Please check, if we are inline with the guidelines given in the section.

This patch is related to port closing, not port stopping.
Flow API resources are owned by the port,
so they cannot be valid when the port is closed and its ethdev removed.
TestPMD was keeping indirect action handles contrary to this.

As for RTE_ETH_DEV_CAPA_FLOW_SHARED_OBJECT_KEEP,
there is already "flow indirect_action destroy"
to erase indirect actions before stopping the port if this is desired.
I had another patch in mind to add "flow indirect_action flush"
for convenience, but it is independent of this fix.

  reply	other threads:[~2022-03-30 22:56 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-07 16:48 Dmitry Kozlyuk
2022-03-30 14:23 ` Singh, Aman Deep
2022-03-30 22:56   ` Dmitry Kozlyuk [this message]
2022-04-10 20:31     ` Dmitry Kozlyuk
2022-04-12  5:41       ` Singh, Aman Deep
2022-05-25 10:52         ` Thomas Monjalon

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=BL1PR12MB59459A68EED05B900B91072EB91F9@BL1PR12MB5945.namprd12.prod.outlook.com \
    --to=dkozlyuk@nvidia.com \
    --cc=aman.deep.singh@intel.com \
    --cc=dev@dpdk.org \
    --cc=matan@nvidia.com \
    --cc=stable@dpdk.org \
    --cc=xiaoyun.li@intel.com \
    --cc=yuying.zhang@intel.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).