* [PATCH 20.11] net/mlx5: destroy indirect actions on port stop
@ 2022-08-11 7:37 Dmitry Kozlyuk
2022-08-12 7:21 ` Xueming(Steven) Li
0 siblings, 1 reply; 2+ messages in thread
From: Dmitry Kozlyuk @ 2022-08-11 7:37 UTC (permalink / raw)
To: stable; +Cc: Xueming Li
[ Upstream commit ec4e11d41d129ebc7c395b567827492e56fb08b7
cannot be backported, because it avoids the issue
by advertising and using a new capability
of keeping indirect actions across restart.
The behavior was unspecified before then,
so it is correct for 20.11 with this patch
to behave differently compared to the upstream. ]
Shared RSS actions were not destroyed on port stop,
preventing release of involved RX queue resources.
As a result, associated pool of such queues was exhaused
after a number of port stop and start operations.
Diagnostic message from rte_eth_dev_start():
Rx queue allocation failed: Cannot allocate memory
When built with RTE_LIBRTE_MLX5_DEBUG,
the following assert was triggered:
testpmd> port start 0
PANIC in mlx5_rxq_start():
line 169 assert "!rxq_ctrl->obj" failed
Destroy indirect actions on port stop to release the resources.
Fixes: d7cfcddded61 ("net/mlx5: translate shared action for RSS action")
Signed-off-by: Dmitry Kozlyuk <dkozlyuk@nvidia.com>
---
drivers/net/mlx5/mlx5_trigger.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/net/mlx5/mlx5_trigger.c b/drivers/net/mlx5/mlx5_trigger.c
index 6273122e40..c8dc0398ea 100644
--- a/drivers/net/mlx5/mlx5_trigger.c
+++ b/drivers/net/mlx5/mlx5_trigger.c
@@ -13,6 +13,7 @@
#include <mlx5_malloc.h>
#include "mlx5.h"
+#include "mlx5_flow.h"
#include "mlx5_mr.h"
#include "mlx5_rxtx.h"
#include "mlx5_utils.h"
@@ -1192,6 +1193,7 @@ mlx5_dev_stop(struct rte_eth_dev *dev)
mlx5_traffic_disable(dev);
/* All RX queue flags will be cleared in the flush interface. */
mlx5_flow_list_flush(dev, &priv->flows, true);
+ mlx5_shared_action_flush(dev);
mlx5_rx_intr_vec_disable(dev);
priv->sh->port[priv->dev_port - 1].ih_port_id = RTE_MAX_ETHPORTS;
priv->sh->port[priv->dev_port - 1].devx_ih_port_id = RTE_MAX_ETHPORTS;
--
2.25.1
^ permalink raw reply [flat|nested] 2+ messages in thread
* RE: [PATCH 20.11] net/mlx5: destroy indirect actions on port stop
2022-08-11 7:37 [PATCH 20.11] net/mlx5: destroy indirect actions on port stop Dmitry Kozlyuk
@ 2022-08-12 7:21 ` Xueming(Steven) Li
0 siblings, 0 replies; 2+ messages in thread
From: Xueming(Steven) Li @ 2022-08-12 7:21 UTC (permalink / raw)
To: Dmitry Kozlyuk, stable
Thanks, applied to 20.11 LTS queue.
> -----Original Message-----
> From: Dmitry Kozlyuk <dkozlyuk@nvidia.com>
> Sent: Thursday, August 11, 2022 3:37 PM
> To: stable@dpdk.org
> Cc: Xueming(Steven) Li <xuemingl@nvidia.com>
> Subject: [PATCH 20.11] net/mlx5: destroy indirect actions on port stop
>
> [ Upstream commit ec4e11d41d129ebc7c395b567827492e56fb08b7
> cannot be backported, because it avoids the issue
> by advertising and using a new capability
> of keeping indirect actions across restart.
> The behavior was unspecified before then,
> so it is correct for 20.11 with this patch
> to behave differently compared to the upstream. ]
>
> Shared RSS actions were not destroyed on port stop, preventing release of involved RX queue resources.
> As a result, associated pool of such queues was exhaused after a number of port stop and start operations.
> Diagnostic message from rte_eth_dev_start():
>
> Rx queue allocation failed: Cannot allocate memory
>
> When built with RTE_LIBRTE_MLX5_DEBUG,
> the following assert was triggered:
>
> testpmd> port start 0
> PANIC in mlx5_rxq_start():
> line 169 assert "!rxq_ctrl->obj" failed
>
> Destroy indirect actions on port stop to release the resources.
>
> Fixes: d7cfcddded61 ("net/mlx5: translate shared action for RSS action")
>
> Signed-off-by: Dmitry Kozlyuk <dkozlyuk@nvidia.com>
> ---
> drivers/net/mlx5/mlx5_trigger.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/net/mlx5/mlx5_trigger.c b/drivers/net/mlx5/mlx5_trigger.c index 6273122e40..c8dc0398ea 100644
> --- a/drivers/net/mlx5/mlx5_trigger.c
> +++ b/drivers/net/mlx5/mlx5_trigger.c
> @@ -13,6 +13,7 @@
> #include <mlx5_malloc.h>
>
> #include "mlx5.h"
> +#include "mlx5_flow.h"
> #include "mlx5_mr.h"
> #include "mlx5_rxtx.h"
> #include "mlx5_utils.h"
> @@ -1192,6 +1193,7 @@ mlx5_dev_stop(struct rte_eth_dev *dev)
> mlx5_traffic_disable(dev);
> /* All RX queue flags will be cleared in the flush interface. */
> mlx5_flow_list_flush(dev, &priv->flows, true);
> + mlx5_shared_action_flush(dev);
> mlx5_rx_intr_vec_disable(dev);
> priv->sh->port[priv->dev_port - 1].ih_port_id = RTE_MAX_ETHPORTS;
> priv->sh->port[priv->dev_port - 1].devx_ih_port_id = RTE_MAX_ETHPORTS;
> --
> 2.25.1
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-08-12 7:21 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-11 7:37 [PATCH 20.11] net/mlx5: destroy indirect actions on port stop Dmitry Kozlyuk
2022-08-12 7:21 ` Xueming(Steven) Li
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).