svn commit: r301312 - stable/10/sys/dev/sfxge

Andrew Rybchenko arybchik at FreeBSD.org
Sat Jun 4 14:06:23 UTC 2016


Author: arybchik
Date: Sat Jun  4 14:06:22 2016
New Revision: 301312
URL: https://svnweb.freebsd.org/changeset/base/301312

Log:
  MFC r301065
  
  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.
  
  Sponsored by:   Solarflare Communications, Inc.

Modified:
  stable/10/sys/dev/sfxge/sfxge_rx.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/dev/sfxge/sfxge_rx.c
==============================================================================
--- stable/10/sys/dev/sfxge/sfxge_rx.c	Sat Jun  4 10:19:07 2016	(r301311)
+++ stable/10/sys/dev/sfxge/sfxge_rx.c	Sat Jun  4 14:06:22 2016	(r301312)
@@ -174,13 +174,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-stable mailing list