[PATCH 20.11] net/mlx5: destroy indirect actions on port stop

Dmitry Kozlyuk dkozlyuk at nvidia.com
Thu Aug 11 09:37:16 CEST 2022


[ 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 at 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



More information about the stable mailing list