patches for DPDK stable branches
 help / color / mirror / Atom feed
From: Ajit Khaparde <ajit.khaparde@broadcom.com>
To: dev@dpdk.org
Cc: ferruh.yigit@intel.com,
	Lance Richardson <lance.richardson@broadcom.com>,
	stable@dpdk.org
Subject: [dpdk-stable] [PATCH v2 3/4] net/bnxt: release hwrm lock before returning
Date: Mon,  4 Nov 2019 15:02:24 -0800	[thread overview]
Message-ID: <20191104230225.98450-4-ajit.khaparde@broadcom.com> (raw)
In-Reply-To: <20191104230225.98450-1-ajit.khaparde@broadcom.com>

From: Lance Richardson <lance.richardson@broadcom.com>

The function bnxt_vnic_rss_configure_thor() returns early when
all receive queues are stopped without releasing the hwrm
spinlock, which causes subsequent HWRM operations to hang. Fix
by ensuring that the lock is released before returning from
this function.

Fixes: 38412304b50a ("net/bnxt: enable RSS for thor-based controllers")
Cc: stable@dpdk.org

Signed-off-by: Lance Richardson <lance.richardson@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
 drivers/net/bnxt/bnxt_hwrm.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c
index ab6cb1dc3..bb4dcf4b2 100644
--- a/drivers/net/bnxt/bnxt_hwrm.c
+++ b/drivers/net/bnxt/bnxt_hwrm.c
@@ -4337,8 +4337,10 @@ bnxt_vnic_rss_configure_thor(struct bnxt *bp, struct bnxt_vnic_info *vnic)
 			}
 
 			/* Return if no rings are active. */
-			if (cnt == max_rings)
+			if (cnt == max_rings) {
+				HWRM_UNLOCK();
 				return 0;
+			}
 
 			/* Add rx/cp ring pair to RSS table. */
 			rxr = rxqs[k]->rx_ring;
-- 
2.21.0 (Apple Git-122)


  parent reply	other threads:[~2019-11-04 23:02 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CADyeNEB7K_iMcDnmpjzbXtTeXQj=Kxn+MMx=r02nkfH+2sCiqw@mail.gmail.com>
     [not found] ` <20191104230225.98450-1-ajit.khaparde@broadcom.com>
2019-11-04 23:02   ` [dpdk-stable] [PATCH v2 2/4] net/bnxt: keep consistent rxq start/stop state Ajit Khaparde
2019-11-04 23:02   ` Ajit Khaparde [this message]
2019-11-04 23:02   ` [dpdk-stable] [PATCH v2 4/4] net/bnxt: fix rxq start/stop for Thor based NICs 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=20191104230225.98450-4-ajit.khaparde@broadcom.com \
    --to=ajit.khaparde@broadcom.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=lance.richardson@broadcom.com \
    --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).