svn commit: r301065 - head/sys/dev/sfxge

Andrew Rybchenko arybchik at FreeBSD.org
Tue May 31 18:31:18 UTC 2016


Author: arybchik
Date: Tue May 31 18:31:17 2016
New Revision: 301065
URL: https://svnweb.freebsd.org/changeset/base/301065

Log:
  sfxge(4): zero should be used as RxQ label in SW event
  
  The buggy code was using the rxq index but should use the evq label
  associated with the rxq. It was missed in r298735.
  
  Reviewed by:    gnn
  Sponsored by:   Solarflare Communications, Inc.
  MFC after:      2 days
  Differential Revision:  https://reviews.freebsd.org/D6661

Modified:
  head/sys/dev/sfxge/sfxge_rx.c

Modified: head/sys/dev/sfxge/sfxge_rx.c
==============================================================================
--- head/sys/dev/sfxge/sfxge_rx.c	Tue May 31 18:30:33 2016	(r301064)
+++ head/sys/dev/sfxge/sfxge_rx.c	Tue May 31 18:31:17 2016	(r301065)
@@ -175,13 +175,17 @@ sfxge_rx_post_refill(void *arg)
 	struct sfxge_softc *sc;
 	unsigned int index;
 	struct sfxge_evq *evq;
+	unsigned int label;
 	uint16_t magic;
 
 	sc = rxq->sc;
 	index = rxq->index;
 	evq = sc->evq[index];
 
-	magic = SFXGE_MAGIC_RX_QREFILL | index;
+	label = 0;
+	KASSERT((label & SFXGE_MAGIC_DMAQ_LABEL_MASK) == label,
+	    ("(label & SFXGE_MAGIC_DMAQ_LABEL_MASK) != level"));
+	magic = SFXGE_MAGIC_RX_QREFILL | label;
 
 	/* This is guaranteed due to the start/stop order of rx and ev */
 	KASSERT(evq->init_state == SFXGE_EVQ_STARTED,


More information about the svn-src-head mailing list