net/mlx5: fix next L3 protocol fetching
PATCH 1/1 net/mlx5: fix next L3 protocol fetching
During flow pattern validation in DV, the next protocol type should be calculated if and only if protocol mask is defined.
--- drivers/net/mlx5/mlx5_flow_dv.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/net/mlx5/mlx5_flow_dv.c +2 -2
@@ -7524,9 +7524,9 @@ mlx5_flow_l3_next_protocol(const struct rte_flow_item *l3_item,uint8_t next_protocol;if (l3_item->mask !=NULL && l3_item->spec !=NULL ) { - next_protocol =MLX5_L3_NEXT_PROTOCOL (l3_item, spec); + next_protocol =MLX5_L3_NEXT_PROTOCOL (l3_item, mask);if (next_protocol) - next_protocol &=MLX5_L3_NEXT_PROTOCOL (l3_item, mask); + next_protocol &=MLX5_L3_NEXT_PROTOCOL (l3_item, spec);else next_protocol =0xff ; }else if (key_type ==MLX5_SET_MATCHER_HS_M && l3_item->mask !=NULL ) {
Signature · 1 line
2.39.2
Hi,
Quoted 9 lines
-----Original Message-----
From: Dariusz Sosnowski <[email protected]>
Sent: Thursday, March 14, 2024 12:59 PM
To: Slava Ovsiienko <[email protected]>; Ori Kam <[email protected]>; Suanming Mou <[email protected]>; Matan Azrad <[email protected]>; Gregory Etelson <[email protected]>
Cc: [email protected]; Raslan Darawsheh <[email protected]>
Subject: [PATCH] net/mlx5: fix next L3 protocol fetching
Quoted 8 lines
During flow pattern validation in DV, the next protocol type should be calculated if and only if protocol mask is defined.
Fixes 1d7b7ec3a236 ("net/mlx5: remove code duplications")Signed-off-by Dariusz Sosnowski <[email protected]>
Patch squashed into relevant commit in next-net-mlx,
Kindest regards,
Raslan Darawsheh