summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorarybchik <arybchik@FreeBSD.org>2016-06-04 14:06:22 +0000
committerarybchik <arybchik@FreeBSD.org>2016-06-04 14:06:22 +0000
commitb10040d4913abc69913858ca274d26a5e8c1b7fa (patch)
tree31974920610878e2a8f702b9369d83e966945fed
parent04420e89e8d6cbffc1e8c68928dc4df844c1b369 (diff)
downloadFreeBSD-src-b10040d4913abc69913858ca274d26a5e8c1b7fa.zip
FreeBSD-src-b10040d4913abc69913858ca274d26a5e8c1b7fa.tar.gz
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.
-rw-r--r--sys/dev/sfxge/sfxge_rx.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/dev/sfxge/sfxge_rx.c b/sys/dev/sfxge/sfxge_rx.c
index 7b3228d..55bfbd5 100644
--- a/sys/dev/sfxge/sfxge_rx.c
+++ b/sys/dev/sfxge/sfxge_rx.c
@@ -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,
OpenPOWER on IntegriCloud