patches for DPDK stable branches
 help / color / mirror / Atom feed
From: Dmitry Kozlyuk <dkozlyuk@nvidia.com>
To: <stable@dpdk.org>
Cc: Xueming Li <xuemingl@nvidia.com>
Subject: [PATCH 20.11] net/mlx5: destroy indirect actions on port stop
Date: Thu, 11 Aug 2022 10:37:16 +0300	[thread overview]
Message-ID: <20220811073716.3631212-1-dkozlyuk@nvidia.com> (raw)

[ 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


             reply	other threads:[~2022-08-11  7:37 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-11  7:37 Dmitry Kozlyuk [this message]
2022-08-12  7:21 ` Xueming(Steven) Li

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220811073716.3631212-1-dkozlyuk@nvidia.com \
    --to=dkozlyuk@nvidia.com \
    --cc=stable@dpdk.org \
    --cc=xuemingl@nvidia.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).