patches for DPDK stable branches
 help / color / mirror / Atom feed
From: Ajit Khaparde <ajit.khaparde@broadcom.com>
To: dev@dpdk.org
Cc: stable@dpdk.org
Subject: [dpdk-stable] [PATCH] net/bnxt: fix RSS context cleanup
Date: Wed, 17 Mar 2021 17:47:30 -0700	[thread overview]
Message-ID: <20210318004730.24360-1-ajit.khaparde@broadcom.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 1137 bytes --]

The PMD is allocating an extra RSS context with each port start.
But it is freeing only one RSS context during port stop. So at some point
we run out of RSS contexts when we do multiple port stop/start sequences.
bnxt_hwrm_vnic_ctx_alloc() is called by bnxt_setup_one_vnic(), but
bnxt_hwrm_vnic_ctx_free() is not called in the corresponding
bnxt_free_one_vnic().

Fix this by calling bnxt_hwrm_vnic_ctx_free() in bnxt_free_one_vnic().

Fixes: 7fe5668d2ea3 ("net/bnxt: support VLAN filter and strip")
Cc: stable@dpdk.org

Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
 drivers/net/bnxt/bnxt_ethdev.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index 1997783a7d..ff92f999db 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -2531,6 +2531,10 @@ static int bnxt_free_one_vnic(struct bnxt *bp, uint16_t vnic_id)
 	}
 	bnxt_del_dflt_mac_filter(bp, vnic);
 
+	rc = bnxt_hwrm_vnic_ctx_free(bp, vnic);
+	if (rc)
+		return rc;
+
 	rc = bnxt_hwrm_vnic_free(bp, vnic);
 	if (rc)
 		return rc;
-- 
2.21.1 (Apple Git-122.3)


             reply	other threads:[~2021-03-18  0:47 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-18  0:47 Ajit Khaparde [this message]
2021-03-19  0:05 ` Ajit Khaparde

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=20210318004730.24360-1-ajit.khaparde@broadcom.com \
    --to=ajit.khaparde@broadcom.com \
    --cc=dev@dpdk.org \
    --cc=stable@dpdk.org \
    /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).