* [PATCH 6/7] net/mlx5: fix the error set for age pool initialization
@ 2023-06-30 6:38 Bing Zhao
2023-06-30 10:26 ` [PATCH v2] " Bing Zhao
0 siblings, 1 reply; 3+ messages in thread
From: Bing Zhao @ 2023-06-30 6:38 UTC (permalink / raw)
To: matan, viacheslavo, orika, suanmingm, rasland; +Cc: dev, michaelba
The rte_flow_error needs to be set when the age pool initialization
has a failure. Or else the application will crash due to the access
of the invalid "message" field.
Fixes: 04a4de756e14 ("net/mlx5: support flow age action with HWS")
Cc: michaelba@nvidia.com
Signed-off-by: Bing Zhao <bingz@nvidia.com>
Acked-by: Ori Kam <orika@nvidia.com>
---
drivers/net/mlx5/mlx5_flow_hw.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/net/mlx5/mlx5_flow_hw.c b/drivers/net/mlx5/mlx5_flow_hw.c
index 4163fe23e6..20941b4fc7 100644
--- a/drivers/net/mlx5/mlx5_flow_hw.c
+++ b/drivers/net/mlx5/mlx5_flow_hw.c
@@ -7913,8 +7913,11 @@ flow_hw_configure(struct rte_eth_dev *dev,
goto err;
}
ret = mlx5_hws_age_pool_init(dev, port_attr, nb_queue);
- if (ret < 0)
+ if (ret < 0) {
+ rte_flow_error_set(error, -ret, RTE_FLOW_ERROR_TYPE_UNSPECIFIED,
+ NULL, "Failed to init age pool.");
goto err;
+ }
}
ret = flow_hw_create_vlan(dev);
if (ret)
--
2.34.1
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH v2] net/mlx5: fix the error set for age pool initialization
2023-06-30 6:38 [PATCH 6/7] net/mlx5: fix the error set for age pool initialization Bing Zhao
@ 2023-06-30 10:26 ` Bing Zhao
2023-07-03 13:57 ` Raslan Darawsheh
0 siblings, 1 reply; 3+ messages in thread
From: Bing Zhao @ 2023-06-30 10:26 UTC (permalink / raw)
To: matan, viacheslavo, orika, suanmingm, rasland; +Cc: dev, michaelba, stable
The rte_flow_error needs to be set when the age pool initialization
has a failure. Or else the application will crash due to the access
of the invalid "message" field.
Fixes: 04a4de756e14 ("net/mlx5: support flow age action with HWS")
Cc: michaelba@nvidia.com
Cc: stable@dpdk.org
Signed-off-by: Bing Zhao <bingz@nvidia.com>
Acked-by: Ori Kam <orika@nvidia.com>
---
v2: add CC stable
---
drivers/net/mlx5/mlx5_flow_hw.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/net/mlx5/mlx5_flow_hw.c b/drivers/net/mlx5/mlx5_flow_hw.c
index 4163fe23e6..20941b4fc7 100644
--- a/drivers/net/mlx5/mlx5_flow_hw.c
+++ b/drivers/net/mlx5/mlx5_flow_hw.c
@@ -7913,8 +7913,11 @@ flow_hw_configure(struct rte_eth_dev *dev,
goto err;
}
ret = mlx5_hws_age_pool_init(dev, port_attr, nb_queue);
- if (ret < 0)
+ if (ret < 0) {
+ rte_flow_error_set(error, -ret, RTE_FLOW_ERROR_TYPE_UNSPECIFIED,
+ NULL, "Failed to init age pool.");
goto err;
+ }
}
ret = flow_hw_create_vlan(dev);
if (ret)
--
2.34.1
^ permalink raw reply [flat|nested] 3+ messages in thread
* RE: [PATCH v2] net/mlx5: fix the error set for age pool initialization
2023-06-30 10:26 ` [PATCH v2] " Bing Zhao
@ 2023-07-03 13:57 ` Raslan Darawsheh
0 siblings, 0 replies; 3+ messages in thread
From: Raslan Darawsheh @ 2023-07-03 13:57 UTC (permalink / raw)
To: Bing Zhao, Matan Azrad, Slava Ovsiienko, Ori Kam, Suanming Mou
Cc: dev, Michael Baum, stable
Hi,
> -----Original Message-----
> From: Bing Zhao <bingz@nvidia.com>
> Sent: Friday, June 30, 2023 1:27 PM
> To: Matan Azrad <matan@nvidia.com>; Slava Ovsiienko
> <viacheslavo@nvidia.com>; Ori Kam <orika@nvidia.com>; Suanming Mou
> <suanmingm@nvidia.com>; Raslan Darawsheh <rasland@nvidia.com>
> Cc: dev@dpdk.org; Michael Baum <michaelba@nvidia.com>;
> stable@dpdk.org
> Subject: [PATCH v2] net/mlx5: fix the error set for age pool initialization
>
> The rte_flow_error needs to be set when the age pool initialization has a
> failure. Or else the application will crash due to the access of the invalid
> "message" field.
>
> Fixes: 04a4de756e14 ("net/mlx5: support flow age action with HWS")
> Cc: michaelba@nvidia.com
> Cc: stable@dpdk.org
>
> Signed-off-by: Bing Zhao <bingz@nvidia.com>
> Acked-by: Ori Kam <orika@nvidia.com>
Patch applied to next-net-mlx,
Kindest regards,
Raslan Darawsheh
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-07-03 13:57 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-30 6:38 [PATCH 6/7] net/mlx5: fix the error set for age pool initialization Bing Zhao
2023-06-30 10:26 ` [PATCH v2] " Bing Zhao
2023-07-03 13:57 ` 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).