svn commit: r340021 - head/sys/dev/cxgbe

John Baldwin jhb at FreeBSD.org
Thu Nov 1 21:39:34 UTC 2018


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;


More information about the svn-src-head mailing list