[dpdk-dev] [PATCH v3 26/29] app/testpmd: align behaviour of multi-port detach

Ferruh Yigit ferruh.yigit at intel.com
Wed Sep 30 14:17:52 CEST 2020


On 9/29/2020 12:14 AM, Thomas Monjalon wrote:
> A port can be closed in multiple situations:
> 	- close command calling close_port() -> rte_eth_dev_close()
> 	- exit calling close_port() -> rte_eth_dev_close()
> 	- hotplug calling close_port() -> rte_eth_dev_close()
> 	- hotplug calling detach_device() -> rte_dev_remove()
> 	- port detach command, detach_device() -> rte_dev_remove()
> 	- device detach command, detach_devargs() -> rte_eal_hotplug_remove()
> 
> The flow rules are flushed before each close.
> It was already done in close_port(), detach_devargs() and
> detach_port_device() which calls detach_device(),
> but not in detach_device(). As a consequence, it was missing for siblings
> of port detach command and unplugged device.
> The check before calling port_flow_flush() is moved inside the function.
> 
> The state of the port to close is checked to be stopped.
> As above, this check was missing in detach_device(),
> impacting the cases of a multi-port device unplugged or detached
> with the port detach command.
> 
> Signed-off-by: Thomas Monjalon <thomas at monjalon.net>
>

Reviewed-by: Ferruh Yigit <ferruh.yigit at intel.com>



More information about the dev mailing list