Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 1 Nov 2018 21:39:34 +0000 (UTC)
From:      John Baldwin <jhb@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r340021 - head/sys/dev/cxgbe
Message-ID:  <201811012139.wA1LdYaK013067@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jhb
Date: Thu Nov  1 21:39:33 2018
New Revision: 340021
URL: https://svnweb.freebsd.org/changeset/base/340021

Log:
  Assert that reclaim_tx_descs() is always making forward progress.
  
  MFC after:	2 months
  Sponsored by:	Chelsio Communications

Modified:
  head/sys/dev/cxgbe/t4_sge.c

Modified: head/sys/dev/cxgbe/t4_sge.c
==============================================================================
--- head/sys/dev/cxgbe/t4_sge.c	Thu Nov  1 21:34:17 2018	(r340020)
+++ head/sys/dev/cxgbe/t4_sge.c	Thu Nov  1 21:39:33 2018	(r340021)
@@ -5079,6 +5079,9 @@ reclaim_tx_descs(struct sge_txq *txq, u_int n)
 		KASSERT(can_reclaim >= ndesc,
 		    ("%s: unexpected number of credits: %d, %d",
 		    __func__, can_reclaim, ndesc));
+		KASSERT(ndesc != 0,
+		    ("%s: descriptor with no credits: cidx %d",
+		    __func__, eq->cidx));
 
 		for (m = txsd->m; m != NULL; m = nextpkt) {
 			nextpkt = m->m_nextpkt;



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