Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 31 May 2016 18:31:17 +0000 (UTC)
From:      Andrew Rybchenko <arybchik@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r301065 - head/sys/dev/sfxge
Message-ID:  <201605311831.u4VIVH46039378@repo.freebsd.org>

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



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