Change the second argument name of the efx_txq_flush_done_ev_t prototype to highlight that TXQ index (not label) comes from FW in flush done event.
sfxge: TXQ index (not label) comes from FW in flush done event
Change the second argument name of the efx_txq_flush_done_ev_t prototype to highlight that TXQ index (not label) comes from FW in flush done event. Submitted by: Andrew Rybchenko <Andrew.Rybchenko at oktetlabs.ru> Sponsored by: Solarflare Communications, Inc. diff -r 74ea9e0f7842 -r 42f27b037ebb sys/dev/sfxge/common/efx.h --- a/sys/dev/sfxge/common/efx.h Thu Apr 10 14:23:34 2014 +0400 +++ b/sys/dev/sfxge/common/efx.h Thu Apr 10 14:23:36 2014 +0400 @@ -1389,7 +1389,7 @@ typedef __checkReturn boolean_t (*efx_txq_flush_done_ev_t)( __in_opt void *arg, - __in uint32_t label); + __in uint32_t txq_index); typedef __checkReturn boolean_t (*efx_software_ev_t)( diff -r 74ea9e0f7842 -r 42f27b037ebb sys/dev/sfxge/common/efx_ev.c --- a/sys/dev/sfxge/common/efx_ev.c Thu Apr 10 14:23:34 2014 +0400 +++ b/sys/dev/sfxge/common/efx_ev.c Thu Apr 10 14:23:36 2014 +0400 @@ -406,16 +406,16 @@ switch (EFX_QWORD_FIELD(*eqp, FSF_AZ_DRIVER_EV_SUBCODE)) { case FSE_AZ_TX_DESCQ_FLS_DONE_EV: { - uint32_t label; + uint32_t txq_index; EFX_EV_QSTAT_INCR(eep, EV_DRIVER_TX_DESCQ_FLS_DONE); - label = EFX_QWORD_FIELD(*eqp, FSF_AZ_DRIVER_EV_SUBDATA); + txq_index = EFX_QWORD_FIELD(*eqp, FSF_AZ_DRIVER_EV_SUBDATA); - EFSYS_PROBE1(tx_descq_fls_done, uint32_t, label); + EFSYS_PROBE1(tx_descq_fls_done, uint32_t, txq_index); EFSYS_ASSERT(eecp->eec_txq_flush_done != NULL); - should_abort = eecp->eec_txq_flush_done(arg, label); + should_abort = eecp->eec_txq_flush_done(arg, txq_index); break; } diff -r 74ea9e0f7842 -r 42f27b037ebb sys/dev/sfxge/sfxge_ev.c --- a/sys/dev/sfxge/sfxge_ev.c Thu Apr 10 14:23:34 2014 +0400 +++ b/sys/dev/sfxge/sfxge_ev.c Thu Apr 10 14:23:36 2014 +0400 @@ -260,16 +260,17 @@ } static boolean_t -sfxge_ev_txq_flush_done(void *arg, uint32_t label) +sfxge_ev_txq_flush_done(void *arg, uint32_t txq_index) { struct sfxge_evq *evq; struct sfxge_softc *sc; struct sfxge_txq *txq; + unsigned int label; uint16_t magic; evq = (struct sfxge_evq *)arg; sc = evq->sc; - txq = sc->txq[label]; + txq = sc->txq[txq_index]; KASSERT(txq != NULL, ("txq == NULL")); KASSERT(txq->init_state == SFXGE_TXQ_INITIALIZED, @@ -278,6 +279,7 @@ /* Resend a software event on the correct queue */ evq = sc->evq[txq->evq_index]; + label = txq_index; KASSERT((label & SFXGE_MAGIC_DMAQ_LABEL_MASK) == label, ("(label & SFXGE_MAGIC_DMAQ_LABEL_MASK) != label")); magic = SFXGE_MAGIC_TX_QFLUSH_DONE | label;
_______________________________________________ freebsd-net@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-net To unsubscribe, send any mail to "freebsd-net-unsubscr...@freebsd.org"