diff options
author | arybchik <arybchik@FreeBSD.org> | 2016-05-31 18:31:17 +0000 |
---|---|---|
committer | arybchik <arybchik@FreeBSD.org> | 2016-05-31 18:31:17 +0000 |
commit | a2e427a148f6688e4ea3b76fcf75f1b64d47e50f (patch) | |
tree | 864d48f7162f0da9635fc3754910ac31a2c45f76 | |
parent | 5434b2eda229154efc60ce1dc572203e0d77d7b1 (diff) | |
download | FreeBSD-src-a2e427a148f6688e4ea3b76fcf75f1b64d47e50f.zip FreeBSD-src-a2e427a148f6688e4ea3b76fcf75f1b64d47e50f.tar.gz |
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
-rw-r--r-- | sys/dev/sfxge/sfxge_rx.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/dev/sfxge/sfxge_rx.c b/sys/dev/sfxge/sfxge_rx.c index 24415a1..9bb6496 100644 --- a/sys/dev/sfxge/sfxge_rx.c +++ b/sys/dev/sfxge/sfxge_rx.c @@ -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, |