[PATCH] app/testpmd: fix use of indirect action after port close

Dmitry Kozlyuk dkozlyuk at nvidia.com
Sun Apr 10 22:31:10 CEST 2022


Hi Aman,

> From: Dmitry Kozlyuk <dkozlyuk at nvidia.com>
> Sent: Thursday, March 31, 2022 1:57 AM
> [...]
> > From: Singh, Aman Deep <aman.deep.singh at 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 at dpdk.org
> > >
> > > Signed-off-by: Dmitry Kozlyuk <dkozlyuk at nvidia.com>
> > > Acked-by: Matan Azrad <matan at 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.

Did my response clear up your concern?
In short: this patch is aligned with the defined flow resource behavior.


More information about the stable mailing list