net/mlx5: fix the modify field action flag checking
PATCH 1/1 net/mlx5: fix the modify field action flag checking
The introduced MODIFY_FIELD action was used to manipulate the packet header field through copy or set operations.
These modify header actions should be counted as one action in low level, the current code used wrong actions flags checking for modify field action.
This patch update the action flags checking into the correct MODIFY_HDR_ACTIONS set.
--- drivers/net/mlx5/mlx5_flow_dv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/mlx5/mlx5_flow_dv.c +1 -1
@@ -7573,7 +7573,7 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,if (action_flags &MLX5_FLOW_ACTION_SAMPLE ) modify_after_mirror =1 ;/* Count all modify-header actions as one action. */ -if (!(action_flags &MLX5_FLOW_ACTION_MODIFY_FIELD )) +if (!(action_flags &MLX5_FLOW_MODIFY_HDR_ACTIONS )) ++actions_n; action_flags |=MLX5_FLOW_ACTION_MODIFY_FIELD ; rw_act_num += ret;
Signature · 1 line
2.18.1
Hi,
Quoted 18 lines
-----Original Message-----
From: Jiawei(Jonny) Wang <[email protected]>
Sent: Monday, June 28, 2021 1:58 PM
To: Slava Ovsiienko <[email protected]>; Matan Azrad <[email protected]>; Ori Kam <[email protected]>; NBU-Contact-Thomas Monjalon <[email protected]>; Shahaf Shuler <[email protected]>; Alexander Kozyrev <[email protected]>
Cc: [email protected]; Raslan Darawsheh <[email protected]>; [email protected]
Subject: [PATCH] net/mlx5: fix the modify field action flag checkingThe introduced
MODIFY_FIELDaction was used to manipulate the packet header field through copy or set operations.These modify header actions should be counted as one action in low level, the current code used wrong actions flags checking for modify field action.
Quoted 8 lines
This patch update the action flags checking into the correct
MODIFY_HDR_ACTIONSset.Fixes 641dbe4fb053 ("net/mlx5: support modify field flow action")Signed-off-by Jiawei Wang <[email protected]>
Patch applied to next-net-mlx,
Kindest regards,
Raslan Darawsheh