[PATCH] app/testpmd: cleanup port resources after implicit close

Andrew Rybchenko andrew.rybchenko at oktetlabs.ru
Thu Jun 23 13:17:28 CEST 2022


On 6/16/22 02:12, Dmitry Kozlyuk wrote:
> When a port was closed implicitly closed by the PMD, for example,
> if it was a representor port and its master port was detached,
> flow 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.
> Flow flex items had no such issue on close, but had it on detach.
> 
> Introduce flush_port_owned_resources() function
> for consistent cleanup and call it when a port is closed or detached.
> Make it flush flow rules and multicast addresses too
> because they logically belong to the port being removed.
> 
> Fixes: 55509e3a49fb ("app/testpmd: support shared flow action")
> Fixes: 59f3a8acbcdb ("app/testpmd: add flex item commands")
> Cc: stable at dpdk.org
> 
> Signed-off-by: Dmitry Kozlyuk <dkozlyuk at nvidia.com>
> Acked-by: Matan Azrad <matan at nvidia.com>

Acked-by: Andrew Rybchenko <andrew.rybchenko at oktetlabs.ru>

Resolved merge conflict on apply to dpdk-next-net/main,
applied, thanks.


More information about the dev mailing list