DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH] net/mlx5: fix next L3 protocol fetching
@ 2024-03-14 10:59 Dariusz Sosnowski
  2024-03-14 11:14 ` Raslan Darawsheh
  0 siblings, 1 reply; 2+ messages in thread
From: Dariusz Sosnowski @ 2024-03-14 10:59 UTC (permalink / raw)
  To: Viacheslav Ovsiienko, Ori Kam, Suanming Mou, Matan Azrad,
	Gregory Etelson
  Cc: dev, Raslan Darawsheh

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")
Cc: getelson@nvidia.com

Signed-off-by: Dariusz Sosnowski <dsosnowski@nvidia.com>
Acked-by: Ori Kam <orika@nvidia.com>
---
 drivers/net/mlx5/mlx5_flow_dv.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
index 815f74ec5c..d434c678c8 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
@@ -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) {
-- 
2.39.2


^ permalink raw reply	[flat|nested] 2+ messages in thread

* RE: [PATCH] net/mlx5: fix next L3 protocol fetching
  2024-03-14 10:59 [PATCH] net/mlx5: fix next L3 protocol fetching Dariusz Sosnowski
@ 2024-03-14 11:14 ` Raslan Darawsheh
  0 siblings, 0 replies; 2+ messages in thread
From: Raslan Darawsheh @ 2024-03-14 11:14 UTC (permalink / raw)
  To: Dariusz Sosnowski, Slava Ovsiienko, Ori Kam, Suanming Mou,
	Matan Azrad, Gregory Etelson
  Cc: dev

Hi,

> -----Original Message-----
> From: Dariusz Sosnowski <dsosnowski@nvidia.com>
> Sent: Thursday, March 14, 2024 12:59 PM
> To: Slava Ovsiienko <viacheslavo@nvidia.com>; Ori Kam <orika@nvidia.com>;
> Suanming Mou <suanmingm@nvidia.com>; Matan Azrad
> <matan@nvidia.com>; Gregory Etelson <getelson@nvidia.com>
> Cc: dev@dpdk.org; Raslan Darawsheh <rasland@nvidia.com>
> Subject: [PATCH] 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.
> 
> Fixes: 1d7b7ec3a236 ("net/mlx5: remove code duplications")
> Cc: getelson@nvidia.com
> 
> Signed-off-by: Dariusz Sosnowski <dsosnowski@nvidia.com>
> Acked-by: Ori Kam <orika@nvidia.com>[Raslan Darawsheh] 

Patch squashed into relevant commit in next-net-mlx,

Kindest regards,
Raslan Darawsheh

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-03-14 11:14 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-14 10:59 [PATCH] net/mlx5: fix next L3 protocol fetching Dariusz Sosnowski
2024-03-14 11:14 ` Raslan Darawsheh

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).