[dpdk-dev] [PATCH] app/testpmd: fix flow rules list after port stop

Gregory Etelson getelson at nvidia.com
Thu Aug 20 10:40:54 CEST 2020


Hello,

Is this patch scheduled for merge with dpdk.org ?
Please update me.

Regards,
Gregory

> -----Original Message-----
> From: Gregory Etelson <getelson at mellanox.com>
> Sent: Monday, August 10, 2020 19:15
> To: dev at dpdk.org
> Cc: Gregory Etelson <getelson at nvidia.com>; Matan Azrad
> <matan at nvidia.com>; Raslan Darawsheh <rasland at nvidia.com>;
> stable at dpdk.org; Ori Kam <orika at mellanox.com>; Wenzhuo Lu
> <wenzhuo.lu at intel.com>; Beilei Xing <beilei.xing at intel.com>; Bernard
> Iremonger <bernard.iremonger at intel.com>
> Subject: [PATCH] app/testpmd: fix flow rules list after port stop
> 
> According to current RTE API, port flow rules must not be kept after port
> stop.
> 
> Testpmd did not flush port flow rules after `port stop' command was called.
> As the result, after the port was restarted, it showed bogus flow rules.
> 
> Fixes: ce8d561418d4 ("app/testpmd: add port configuration settings")
> 
> Cc: stable at dpdk.org
> 
> Signed-off-by: Gregory Etelson <getelson at mellanox.com>
> Acked-by: Ori Kam <orika at mellanox.com>
> ---
>  app/test-pmd/testpmd.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c index
> 7842c3b781..4ba5c41c6e 100644
> --- a/app/test-pmd/testpmd.c
> +++ b/app/test-pmd/testpmd.c
> @@ -2627,6 +2627,9 @@ stop_port(portid_t pid)
>  						RTE_PORT_HANDLING) == 0)
>  			continue;
> 
> +		if (port->flow_list)
> +			port_flow_flush(pi);
> +
>  		rte_eth_dev_stop(pi);
> 
>  		if (rte_atomic16_cmpset(&(port->port_status),
> --
> 2.25.1



More information about the dev mailing list