net/mlx5: fix the GRE mask set on root table
PATCH 1/1 net/mlx5: fix the GRE mask set on root table
From: Bing Zhao <[email protected]>
When setting the value, the GRE mask cannot reuse the one from the value, or else the value cannot be really ANDed with the proper input mask from the user. If the value contains more valid bits than the mask, the rule insertion on the root table will get a failure due to the extra bits in the value field.
Using the input mask or the default mask will help to clear the extra bits and solve the issue.
--- drivers/net/mlx5/mlx5_flow_dv.c | 2 -- 1 file changed, 2 deletions(-)
drivers/net/mlx5/mlx5_flow_dv.c +0 -2
@@ -9853,8 +9853,6 @@ flow_dv_translate_item_gre(void *key, const struct rte_flow_item *item, }else if (!gre_m) { gre_m = &rte_flow_item_gre_mask; } -if (key_type ==MLX5_SET_MATCHER_HS_V ) - gre_m = gre_v; } gre_crks_rsvd0_ver_m.value =rte_be_to_cpu_16 (gre_m->c_rsvd0_ver); gre_crks_rsvd0_ver_v.value =rte_be_to_cpu_16 (gre_v->c_rsvd0_ver);
Signature · 1 line
2.45.2
Hi,
From: Gregory Etelson <[email protected]>
Sent: Monday, February 10, 2025 12:14 PM
To: [email protected]
Cc: Gregory Etelson; Maayan Kashani; Raslan Darawsheh; Bing Zhao; [email protected]
Subject: [PATCH] net/mlx5: fix the GRE mask set on root table
From: Bing Zhao <[email protected]>
When setting the value, the GRE mask cannot reuse the one from the value, or else the value cannot be really ANDed with the proper input mask from the user. If the value contains more valid bits than the mask, the rule insertion on the root table will get a failure due to the extra bits in the value field.
Using the input mask or the default mask will help to clear the extra bits and solve the issue.
dropping this patch as it's a duplicate of this:
https://patches.dpdk.org/project/dpdk/patch/[email protected]/
Kindest regards
Raslan Darawsheh