From: Nithin Dabilpuram <ndabilpuram@marvell.com>
To: Nithin Dabilpuram <ndabilpuram@marvell.com>,
Kiran Kumar K <kirankumark@marvell.com>,
Sunil Kumar Kori <skori@marvell.com>,
Satha Rao <skoteshwar@marvell.com>
Cc: <jerinj@marvell.com>, <dev@dpdk.org>,
Rakesh Kudurumalla <rkudurumalla@marvell.com>
Subject: [PATCH 03/15] net/cnxk: release LBK bpid for after freeing resources
Date: Fri, 3 Mar 2023 13:40:01 +0530 [thread overview]
Message-ID: <20230303081013.589868-3-ndabilpuram@marvell.com> (raw)
In-Reply-To: <20230303081013.589868-1-ndabilpuram@marvell.com>
From: Rakesh Kudurumalla <rkudurumalla@marvell.com>
bpids are not disabled while freeing resources for NIX
device as a result a new bpid is assigned which leads
to exhaustion of bpid's after soft exit of application.
This patch fixes the same
Signed-off-by: Rakesh Kudurumalla <rkudurumalla@marvell.com>
---
drivers/net/cnxk/cnxk_ethdev.c | 28 ++++++++++++++++++++++++++++
1 file changed, 28 insertions(+)
diff --git a/drivers/net/cnxk/cnxk_ethdev.c b/drivers/net/cnxk/cnxk_ethdev.c
index 22072d29b0..e99335b117 100644
--- a/drivers/net/cnxk/cnxk_ethdev.c
+++ b/drivers/net/cnxk/cnxk_ethdev.c
@@ -900,6 +900,27 @@ cnxk_rss_ethdev_to_nix(struct cnxk_eth_dev *dev, uint64_t ethdev_rss,
return flowkey_cfg;
}
+static int
+nix_rxchan_cfg_disable(struct cnxk_eth_dev *dev)
+{
+ struct roc_nix *nix = &dev->nix;
+ struct roc_nix_fc_cfg fc_cfg;
+ int rc;
+
+ if (!roc_nix_is_lbk(nix))
+ return 0;
+
+ memset(&fc_cfg, 0, sizeof(struct roc_nix_fc_cfg));
+ fc_cfg.type = ROC_NIX_FC_RXCHAN_CFG;
+ fc_cfg.rxchan_cfg.enable = false;
+ rc = roc_nix_fc_config_set(nix, &fc_cfg);
+ if (rc) {
+ plt_err("Failed to setup flow control, rc=%d(%s)", rc, roc_error_msg_get(rc));
+ return rc;
+ }
+ return 0;
+}
+
static void
nix_free_queue_mem(struct cnxk_eth_dev *dev)
{
@@ -1218,6 +1239,7 @@ cnxk_nix_configure(struct rte_eth_dev *eth_dev)
goto fail_configure;
roc_nix_tm_fini(nix);
+ nix_rxchan_cfg_disable(dev);
roc_nix_lf_free(nix);
}
@@ -1456,6 +1478,7 @@ cnxk_nix_configure(struct rte_eth_dev *eth_dev)
roc_nix_tm_fini(nix);
free_nix_lf:
nix_free_queue_mem(dev);
+ rc |= nix_rxchan_cfg_disable(dev);
rc |= roc_nix_lf_free(nix);
fail_configure:
dev->configured = 0;
@@ -2026,6 +2049,11 @@ cnxk_eth_dev_uninit(struct rte_eth_dev *eth_dev, bool reset)
/* Free ROC RQ's, SQ's and CQ's memory */
nix_free_queue_mem(dev);
+ /* free nix bpid */
+ rc = nix_rxchan_cfg_disable(dev);
+ if (rc)
+ plt_err("Failed to free nix bpid, rc=%d", rc);
+
/* Free nix lf resources */
rc = roc_nix_lf_free(nix);
if (rc)
--
2.25.1
next prev parent reply other threads:[~2023-03-03 8:11 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-03 8:09 [PATCH 01/15] net/cnxk: resolve sefgault caused during transmit completion Nithin Dabilpuram
2023-03-03 8:10 ` [PATCH 02/15] net/cnxk: fix data len for first seg with multi seg pkt Nithin Dabilpuram
2023-03-03 8:10 ` Nithin Dabilpuram [this message]
2023-03-03 8:10 ` [PATCH 04/15] common/cnxk: add separate inline dev stats API Nithin Dabilpuram
2023-03-03 8:10 ` [PATCH 05/15] common/cnxk: distribute SQ's to sdp channels Nithin Dabilpuram
2023-03-03 8:10 ` [PATCH 06/15] common/cnxk: remove flow control config at queue setup Nithin Dabilpuram
2023-03-03 8:10 ` [PATCH 07/15] common/cnxk: enable 10K B0 support for inline IPsec Nithin Dabilpuram
2023-03-03 8:10 ` [PATCH 08/15] net/cnxk: check flow control config per queue on dev start Nithin Dabilpuram
2023-03-03 8:10 ` [PATCH 09/15] net/cnxk: don't allow PFC configuration on started port Nithin Dabilpuram
2023-03-03 8:10 ` [PATCH 10/15] net/cnxk: aura handle for fastpath Rx queues Nithin Dabilpuram
2023-03-03 8:10 ` [PATCH 11/15] common/cnxk: support of per NIX LF meta aura Nithin Dabilpuram
2023-03-03 8:10 ` [PATCH 12/15] common/cnxk: enable one to one SQ QINT mapping Nithin Dabilpuram
2023-03-03 8:10 ` [PATCH 13/15] common/cnxk: add RSS error messages on mbox failure Nithin Dabilpuram
2023-03-03 8:10 ` [PATCH 14/15] common/cnxk: add memory clobber to steor and ldeor Nithin Dabilpuram
2023-03-03 8:10 ` [PATCH 15/15] common/cnxk: enable SDP channel backpressure to TL4 Nithin Dabilpuram
2023-03-06 9:55 ` Jerin Jacob
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=20230303081013.589868-3-ndabilpuram@marvell.com \
--to=ndabilpuram@marvell.com \
--cc=dev@dpdk.org \
--cc=jerinj@marvell.com \
--cc=kirankumark@marvell.com \
--cc=rkudurumalla@marvell.com \
--cc=skori@marvell.com \
--cc=skoteshwar@marvell.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).