Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 14 Nov 2018 20:36:19 +0000 (UTC)
From:      Stephen Hurd <shurd@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r340445 - head/sys/net
Message-ID:  <201811142036.wAEKaJWW031949@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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 */



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