Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 12 Apr 2014 14:16:14 +0400
From:      Andrew Rybchenko <Andrew.Rybchenko@oktetlabs.ru>
To:        net@FreeBSD.org
Subject:   [PATCH 2/3] sfxge: TXQ index (not label) comes from FW in flush done event
Message-ID:  <5349126E.2060209@oktetlabs.ru>

next in thread | raw e-mail | index | archive | help
This is a multi-part message in MIME format.
--------------010101060407030209010801
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

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.

--------------010101060407030209010801
Content-Type: text/x-patch;
 name="2-sfxge-txq_index.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
 filename="2-sfxge-txq_index.patch"

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;

--------------010101060407030209010801--



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