svn commit: r340445 - head/sys/net

Stephen Hurd shurd at FreeBSD.org
Wed Nov 14 20:36:20 UTC 2018


Author: shurd
Date: Wed Nov 14 20:36:18 2018
New Revision: 340445
URL: https://svnweb.freebsd.org/changeset/base/340445

Log:
  Clear RX completion queue state veriables in iflib_stop()
  
  iflib_stop() was not resetting the rxq completion queue state variables.
  This meant that for any driver that has receive completion queues, after a
  reinit, iflib would start asking what's available on the rx side starting at
  whatever the completion queue index was prior to the stop, instead of at 0.
  
  Submitted by:	pkelsey
  Reported by:	pkelsey
  MFC after:	3 days
  Sponsored by:	Limelight Networks

Modified:
  head/sys/net/iflib.c

Modified: head/sys/net/iflib.c
==============================================================================
--- head/sys/net/iflib.c	Wed Nov 14 20:35:04 2018	(r340444)
+++ head/sys/net/iflib.c	Wed Nov 14 20:36:18 2018	(r340445)
@@ -2414,6 +2414,7 @@ iflib_stop(if_ctx_t ctx)
 	for (i = 0; i < scctx->isc_nrxqsets; i++, rxq++) {
 		/* make sure all transmitters have completed before proceeding XXX */
 
+		rxq->ifr_cq_gen = rxq->ifr_cq_cidx = rxq->ifr_cq_pidx = 0;
 		for (j = 0, di = rxq->ifr_ifdi; j < sctx->isc_nrxqs; j++, di++)
 			bzero((void *)di->idi_vaddr, di->idi_size);
 		/* also resets the free lists pidx/cidx */


More information about the svn-src-all mailing list