From owner-freebsd-net@FreeBSD.ORG Sat Apr 12 10:19:39 2014 Return-Path: Delivered-To: net@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2CAE1352 for ; Sat, 12 Apr 2014 10:19:39 +0000 (UTC) Received: from shelob.oktetlabs.ru (shelob.oktetlabs.ru [188.134.15.200]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BB98915EA for ; Sat, 12 Apr 2014 10:19:38 +0000 (UTC) Received: from [192.168.38.17] (aros.oktetlabs.ru [192.168.38.17]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by shelob.oktetlabs.ru (Postfix) with ESMTPSA id 987B87F4E9; Sat, 12 Apr 2014 14:12:10 +0400 (MSK) X-DKIM: Sendmail DKIM Filter v2.8.2 shelob.oktetlabs.ru 987B87F4E9 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=oktetlabs.ru; s=default; t=1397297530; bh=SBhNDfENeMCi4+pZ01dQGibWbBj6qXSU41UJKgp4k+U=; l=4720; h=Message-ID:Date:From:MIME-Version:To:CC:Subject:Content-Type; b=Vtpm03xLbfXnpCU7S/6sHZOhvUmokmVv4QyFceMrCz14TbBjX/omwonm+xustvfIn Fdv0Cr8sruPZG/ac/kzyLVIoYDZcx6GtKwbiw4vwSR/KGQTswIBzTbD4DGbbaIuBOK waWFt5AN6m575A9l4+Bu5mcMOsD4VFWSfFEWb6T8= Message-ID: <5349117B.4050505@oktetlabs.ru> Date: Sat, 12 Apr 2014 14:12:11 +0400 From: Andrew Rybchenko Organization: OKTET Labs User-Agent: Mozilla/5.0 (X11; Linux i686 on x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.4.0 MIME-Version: 1.0 To: net@FreeBSD.org Subject: [PATCH 1/3] sfxge: RXQ index (not label) comes from FW in flush done/failed events Content-Type: multipart/mixed; boundary="------------080206030102090207050106" X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 Apr 2014 10:19:39 -0000 This is a multi-part message in MIME format. --------------080206030102090207050106 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit sfxge: RXQ index (not label) comes from FW in flush done/failed events Change the second argument name of the efx_rxq_flush_done_ev_t and efx_rxq_flush_failed_ev_t prototypes to highlight that RXQ index (not label) comes from FW in flush done and failed events. Submitted by: Andrew Rybchenko Sponsored by: Solarflare Communications, Inc. --------------080206030102090207050106 Content-Type: text/x-patch; name="1-sfxge-rxq_index.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="1-sfxge-rxq_index.patch" sfxge: RXQ index (not label) comes from FW in flush done/failed events Change the second argument name of the efx_rxq_flush_done_ev_t and efx_rxq_flush_failed_ev_t prototypes to highlight that RXQ index (not label) comes from FW in flush done and failed events. Submitted by: Andrew Rybchenko Sponsored by: Solarflare Communications, Inc. diff -r 303a89ceaefe -r 74ea9e0f7842 sys/dev/sfxge/common/efx.h --- a/sys/dev/sfxge/common/efx.h Wed Mar 19 14:41:05 2014 +0000 +++ b/sys/dev/sfxge/common/efx.h Thu Apr 10 14:23:34 2014 +0400 @@ -1379,12 +1379,12 @@ typedef __checkReturn boolean_t (*efx_rxq_flush_done_ev_t)( __in_opt void *arg, - __in uint32_t label); + __in uint32_t rxq_index); typedef __checkReturn boolean_t (*efx_rxq_flush_failed_ev_t)( __in_opt void *arg, - __in uint32_t label); + __in uint32_t rxq_index); typedef __checkReturn boolean_t (*efx_txq_flush_done_ev_t)( diff -r 303a89ceaefe -r 74ea9e0f7842 sys/dev/sfxge/common/efx_ev.c --- a/sys/dev/sfxge/common/efx_ev.c Wed Mar 19 14:41:05 2014 +0000 +++ b/sys/dev/sfxge/common/efx_ev.c Thu Apr 10 14:23:34 2014 +0400 @@ -420,10 +420,10 @@ break; } case FSE_AZ_RX_DESCQ_FLS_DONE_EV: { - uint32_t label; + uint32_t rxq_index; uint32_t failed; - label = EFX_QWORD_FIELD(*eqp, FSF_AZ_DRIVER_EV_RX_DESCQ_ID); + rxq_index = EFX_QWORD_FIELD(*eqp, FSF_AZ_DRIVER_EV_RX_DESCQ_ID); failed = EFX_QWORD_FIELD(*eqp, FSF_AZ_DRIVER_EV_RX_FLUSH_FAIL); EFSYS_ASSERT(eecp->eec_rxq_flush_done != NULL); @@ -432,15 +432,15 @@ if (failed) { EFX_EV_QSTAT_INCR(eep, EV_DRIVER_RX_DESCQ_FLS_FAILED); - EFSYS_PROBE1(rx_descq_fls_failed, uint32_t, label); + EFSYS_PROBE1(rx_descq_fls_failed, uint32_t, rxq_index); - should_abort = eecp->eec_rxq_flush_failed(arg, label); + should_abort = eecp->eec_rxq_flush_failed(arg, rxq_index); } else { EFX_EV_QSTAT_INCR(eep, EV_DRIVER_RX_DESCQ_FLS_DONE); - EFSYS_PROBE1(rx_descq_fls_done, uint32_t, label); + EFSYS_PROBE1(rx_descq_fls_done, uint32_t, rxq_index); - should_abort = eecp->eec_rxq_flush_done(arg, label); + should_abort = eecp->eec_rxq_flush_done(arg, rxq_index); } break; diff -r 303a89ceaefe -r 74ea9e0f7842 sys/dev/sfxge/sfxge_ev.c --- a/sys/dev/sfxge/sfxge_ev.c Wed Mar 19 14:41:05 2014 +0000 +++ b/sys/dev/sfxge/sfxge_ev.c Thu Apr 10 14:23:34 2014 +0400 @@ -155,17 +155,18 @@ } static boolean_t -sfxge_ev_rxq_flush_done(void *arg, uint32_t label) +sfxge_ev_rxq_flush_done(void *arg, uint32_t rxq_index) { struct sfxge_evq *evq; struct sfxge_softc *sc; struct sfxge_rxq *rxq; unsigned int index; + unsigned int label; uint16_t magic; evq = (struct sfxge_evq *)arg; sc = evq->sc; - rxq = sc->rxq[label]; + rxq = sc->rxq[rxq_index]; KASSERT(rxq != NULL, ("rxq == NULL")); @@ -173,6 +174,7 @@ index = rxq->index; evq = sc->evq[index]; + label = rxq_index; KASSERT((label & SFXGE_MAGIC_DMAQ_LABEL_MASK) == label, ("(label & SFXGE_MAGIC_DMAQ_LABEL_MASK) != level")); magic = SFXGE_MAGIC_RX_QFLUSH_DONE | label; @@ -185,17 +187,18 @@ } static boolean_t -sfxge_ev_rxq_flush_failed(void *arg, uint32_t label) +sfxge_ev_rxq_flush_failed(void *arg, uint32_t rxq_index) { struct sfxge_evq *evq; struct sfxge_softc *sc; struct sfxge_rxq *rxq; unsigned int index; + unsigned int label; uint16_t magic; evq = (struct sfxge_evq *)arg; sc = evq->sc; - rxq = sc->rxq[label]; + rxq = sc->rxq[rxq_index]; KASSERT(rxq != NULL, ("rxq == NULL")); @@ -203,6 +206,7 @@ index = rxq->index; evq = sc->evq[index]; + label = rxq_index; KASSERT((label & SFXGE_MAGIC_DMAQ_LABEL_MASK) == label, ("(label & SFXGE_MAGIC_DMAQ_LABEL_MASK) != label")); magic = SFXGE_MAGIC_RX_QFLUSH_FAILED | label; --------------080206030102090207050106--