net/mlx5: fix count actions query in sample flow
PATCH 1/1 net/mlx5: fix count actions query in sample flow
If the count action was presented in sample actions list, MLX5 PMD created the counter resource and saved the index of counter in the sample resource only, the counter index of flow was not updated.
This patch removes the counter index in the sampler resource and saves it into the flow, and adds the checking to make sure only one count be created once per flow, it's used for all sample sub flows.
--- drivers/net/mlx5/mlx5_flow.h | 1 - drivers/net/mlx5/mlx5_flow_dv.c | 62 +++++++++++++++++++++++++---------------- 2 files changed, 38 insertions(+), 25 deletions(-)
drivers/net/mlx5/mlx5_flow.h +0 -1
@@ -578,7 +578,6 @@ struct mlx5_flow_sub_actions_list {struct mlx5_flow_sub_actions_idx {uint32_t rix_hrxq;/**< Hash Rx queue object index. */ uint32_t rix_tag;/**< Index to the tag action. */ -uint32_t cnt;uint32_t rix_port_id_action;/**< Index to port ID action resource. */ uint32_t rix_encap_decap;/**< Index to encap/decap resource. */ uint32_t rix_jump;/**< Index to the jump action resource. */
drivers/net/mlx5/mlx5_flow_dv.c +38 -24
146 lines not on this page · raw message
Signature · 1 line
1.8.3.1
Hi,
Quoted 18 lines
-----Original Message-----
From: dev <[email protected]> On Behalf Of Jiawei Wang
Sent: Tuesday, January 26, 2021 5:38 PM
To: Slava Ovsiienko <[email protected]>; Ori Kam <[email protected]>; NBU-Contact-Thomas Monjalon <[email protected]>; [email protected]
Cc: [email protected]; [email protected]
Subject: [dpdk-dev] [PATCH] net/mlx5: fix count actions query in sample flowIf the count action was presented in sample actions list, MLX5 PMD created the counter resource and saved the index of counter in the sample resource only, the counter index of flow was not updated.
This patch removes the counter index in the sampler resource and saves it into the flow, and adds the checking to make sure only one count be created once per flow, it's used for all sample sub flows.
Quoted 7 lines
Fixes 0756228b2704 ("net/mlx5: update translate function for sampleaction")
Cc: [email protected]Signed-off-by Jiawei Wang <[email protected]>---
Patch applied to next-net-mlx,
Kindest regards,
Raslan Darawsheh