[v3,11/11] app/testpmd: adjust cleanup sequence when quitting

Message ID 20230130132000.1715473-12-rongweil@nvidia.com (mailing list archive)
State Superseded, archived
Delegated to: Ferruh Yigit
Headers
Series [v3,01/11] ethdev: add flex item modify field support |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation warning apply issues

Commit Message

Rongwei Liu Jan. 30, 2023, 1:20 p.m. UTC
  If flex item is referenced in async flow either by
pattern template or action template, currently testpmd
complains "flex item has flow references". Flex items should
be flushed after async flow resources cleanup.

Signed-off-by: Rongwei Liu <rongweil@nvidia.com>
Acked-by: Ori Kam <orika@nvidia.com>
---
 app/test-pmd/testpmd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

Singh, Aman Deep Feb. 3, 2023, 11 a.m. UTC | #1
On 1/30/2023 6:50 PM, Rongwei Liu wrote:
> If flex item is referenced in async flow either by
> pattern template or action template, currently testpmd
> complains "flex item has flow references". Flex items should
> be flushed after async flow resources cleanup.
>
> Signed-off-by: Rongwei Liu <rongweil@nvidia.com>
> Acked-by: Ori Kam <orika@nvidia.com>

Acked-by: Aman Singh <aman.deep.singh@intel.com>

> ---
>   app/test-pmd/testpmd.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c
> index 134d79a555..e35f7a0e7a 100644
> --- a/app/test-pmd/testpmd.c
> +++ b/app/test-pmd/testpmd.c
> @@ -3298,10 +3298,10 @@ flush_port_owned_resources(portid_t pi)
>   {
>   	mcast_addr_pool_destroy(pi);
>   	port_flow_flush(pi);
> -	port_flex_item_flush(pi);
>   	port_flow_template_table_flush(pi);
>   	port_flow_pattern_template_flush(pi);
>   	port_flow_actions_template_flush(pi);
> +	port_flex_item_flush(pi);
>   	port_action_handle_flush(pi);
>   }
>
  

Patch

diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c
index 134d79a555..e35f7a0e7a 100644
--- a/app/test-pmd/testpmd.c
+++ b/app/test-pmd/testpmd.c
@@ -3298,10 +3298,10 @@  flush_port_owned_resources(portid_t pi)
 {
 	mcast_addr_pool_destroy(pi);
 	port_flow_flush(pi);
-	port_flex_item_flush(pi);
 	port_flow_template_table_flush(pi);
 	port_flow_pattern_template_flush(pi);
 	port_flow_actions_template_flush(pi);
+	port_flex_item_flush(pi);
 	port_action_handle_flush(pi);
 }