* [PATCH] net/mlx5/hws: fix range definer error recovery
@ 2024-10-27 13:07 Gregory Etelson
2024-10-28 13:14 ` Raslan Darawsheh
0 siblings, 1 reply; 2+ messages in thread
From: Gregory Etelson @ 2024-10-27 13:07 UTC (permalink / raw)
To: dev
Cc: getelson, ,
rasland, stable, Dariusz Sosnowski, Viacheslav Ovsiienko,
Bing Zhao, Ori Kam, Suanming Mou, Matan Azrad, Alex Vesker
PMD did not assign rte_errno value after it discovered an error in
matcher range parameters.
As a result, the calling function was not notified about the fault.
The patch assigns EINVAL to rte_errno if matcher range definition was
invalid.
Fixes: 9732ffe13bd6 ("net/mlx5/hws: add range definer creation")
Cc: stable@dpdk.org
Signed-off-by: Gregory Etelson <getelson@nvidia.com>
Acked-by: Dariusz Sosnowski <dsosnowski@nvidia.com>
---
drivers/net/mlx5/hws/mlx5dr_definer.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/mlx5/hws/mlx5dr_definer.c b/drivers/net/mlx5/hws/mlx5dr_definer.c
index a9fa5d06ed..fd0a9b15d8 100644
--- a/drivers/net/mlx5/hws/mlx5dr_definer.c
+++ b/drivers/net/mlx5/hws/mlx5dr_definer.c
@@ -4056,6 +4056,7 @@ mlx5dr_definer_matcher_range_init(struct mlx5dr_context *ctx,
if (i && ((is_range && !has_range) || (!is_range && has_range))) {
DR_LOG(ERR, "Using range and non range templates is not allowed");
+ rte_errno = EINVAL;
goto free_definers;
}
--
2.43.0
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] net/mlx5/hws: fix range definer error recovery
2024-10-27 13:07 [PATCH] net/mlx5/hws: fix range definer error recovery Gregory Etelson
@ 2024-10-28 13:14 ` Raslan Darawsheh
0 siblings, 0 replies; 2+ messages in thread
From: Raslan Darawsheh @ 2024-10-28 13:14 UTC (permalink / raw)
To: Gregory Etelson, dev
Cc: Maayan Kashani, stable, Dariusz Sosnowski, Slava Ovsiienko,
Bing Zhao, Ori Kam, Suanming Mou, Matan Azrad, Alex Vesker
Hi,
From: Gregory Etelson <getelson@nvidia.com>
Sent: Sunday, October 27, 2024 3:07 PM
To: dev@dpdk.org
Cc: Gregory Etelson; Maayan Kashani; Raslan Darawsheh; stable@dpdk.org; Dariusz Sosnowski; Slava Ovsiienko; Bing Zhao; Ori Kam; Suanming Mou; Matan Azrad; Alex Vesker
Subject: [PATCH] net/mlx5/hws: fix range definer error recovery
PMD did not assign rte_errno value after it discovered an error in
matcher range parameters.
As a result, the calling function was not notified about the fault.
The patch assigns EINVAL to rte_errno if matcher range definition was
invalid.
Fixes: 9732ffe13bd6 ("net/mlx5/hws: add range definer creation")
Cc: stable@dpdk.org
Signed-off-by: Gregory Etelson <getelson@nvidia.com>
Acked-by: Dariusz Sosnowski <dsosnowski@nvidia.com>
Patch applied to next-net-mlx,
Kindest regards,
Raslan Darawsheh
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-10-28 13:14 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-10-27 13:07 [PATCH] net/mlx5/hws: fix range definer error recovery Gregory Etelson
2024-10-28 13: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).