Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 27 May 2021 06:00:41 GMT
From:      Navdeep Parhar <np@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: 5ef87bf8b687 - main - cxgbe(4): Fix an incorrect assert.
Message-ID:  <202105270600.14R60fSB007537@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by np:

URL: https://cgit.FreeBSD.org/src/commit/?id=5ef87bf8b687575bee010967e23cd2c552b43ad9

commit 5ef87bf8b687575bee010967e23cd2c552b43ad9
Author:     Navdeep Parhar <np@FreeBSD.org>
AuthorDate: 2021-05-27 02:18:42 +0000
Commit:     Navdeep Parhar <np@FreeBSD.org>
CommitDate: 2021-05-27 05:57:06 +0000

    cxgbe(4): Fix an incorrect assert.
    
    CTRL and OFLD tx queues do not have automatic tx credit flush enabled so
    it is okay for the cidx not to be the same as the pidx when the queue is
    destroyed.
    
    Reported by:    Jithesh Arakkan @ Chelsio
    MFC after:      1 week
    Sponsored by:   Chelsio Communications
---
 sys/dev/cxgbe/t4_sge.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/sys/dev/cxgbe/t4_sge.c b/sys/dev/cxgbe/t4_sge.c
index 0b429c602a91..5091c8f992bd 100644
--- a/sys/dev/cxgbe/t4_sge.c
+++ b/sys/dev/cxgbe/t4_sge.c
@@ -4346,7 +4346,8 @@ static void
 free_eq(struct adapter *sc, struct sge_eq *eq)
 {
 	MPASS(eq->flags & EQ_SW_ALLOCATED);
-	MPASS(eq->pidx == eq->cidx);
+	if (eq->type == EQ_ETH)
+		MPASS(eq->pidx == eq->cidx);
 
 	free_ring(sc, eq->desc_tag, eq->desc_map, eq->ba, eq->desc);
 	mtx_destroy(&eq->eq_lock);
@@ -4499,6 +4500,8 @@ free_wrq(struct adapter *sc, struct sge_wrq *wrq)
 {
 	free_eq(sc, &wrq->eq);
 	MPASS(wrq->nwr_pending == 0);
+	MPASS(TAILQ_EMPTY(&wrq->incomplete_wrs));
+	MPASS(STAILQ_EMPTY(&wrq->wr_list));
 	bzero(wrq, sizeof(*wrq));
 }
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202105270600.14R60fSB007537>