From owner-svn-src-user@FreeBSD.ORG Tue Oct 18 03:57:44 2011 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9ACD4106566C; Tue, 18 Oct 2011 03:57:44 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 718DE8FC0A; Tue, 18 Oct 2011 03:57:44 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9I3vik6055086; Tue, 18 Oct 2011 03:57:44 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9I3viQi055084; Tue, 18 Oct 2011 03:57:44 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201110180357.p9I3viQi055084@svn.freebsd.org> From: Adrian Chadd Date: Tue, 18 Oct 2011 03:57:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226492 - user/adrian/if_ath_tx/sys/dev/ath X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Oct 2011 03:57:44 -0000 Author: adrian Date: Tue Oct 18 03:57:44 2011 New Revision: 226492 URL: http://svn.freebsd.org/changeset/base/226492 Log: Teach ath_tx_processq() to not reschedule more frames. This isn't used just yet - but when TX is being non-delete flushed (ie, when packets are completed but in-progress frames are not deleted), sched should not occur. Modified: user/adrian/if_ath_tx/sys/dev/ath/if_ath.c Modified: user/adrian/if_ath_tx/sys/dev/ath/if_ath.c ============================================================================== --- user/adrian/if_ath_tx/sys/dev/ath/if_ath.c Tue Oct 18 03:32:18 2011 (r226491) +++ user/adrian/if_ath_tx/sys/dev/ath/if_ath.c Tue Oct 18 03:57:44 2011 (r226492) @@ -4505,7 +4505,7 @@ ath_tx_update_ratectrl(struct ath_softc * particular task. */ static int -ath_tx_processq(struct ath_softc *sc, struct ath_txq *txq) +ath_tx_processq(struct ath_softc *sc, struct ath_txq *txq, int dosched) { struct ath_hal *ah = sc->sc_ah; struct ath_buf *bf, *last; @@ -4632,9 +4632,11 @@ ath_tx_processq(struct ath_softc *sc, st #endif /* Kick the TXQ scheduler */ - ATH_TXQ_LOCK(txq); - ath_txq_sched(sc, txq); - ATH_TXQ_UNLOCK(txq); + if (dosched) { + ATH_TXQ_LOCK(txq); + ath_txq_sched(sc, txq); + ATH_TXQ_UNLOCK(txq); + } return nacked; } @@ -4657,11 +4659,11 @@ ath_tx_proc_q0(void *arg, int npending) sc->sc_txq_active &= ~txqs; ATH_UNLOCK(sc); - if (TXQACTIVE(txqs, 0) && ath_tx_processq(sc, &sc->sc_txq[0])) + if (TXQACTIVE(txqs, 0) && ath_tx_processq(sc, &sc->sc_txq[0], 1)) /* XXX why is lastrx updated in tx code? */ sc->sc_lastrx = ath_hal_gettsf64(sc->sc_ah); if (TXQACTIVE(txqs, sc->sc_cabq->axq_qnum)) - ath_tx_processq(sc, sc->sc_cabq); + ath_tx_processq(sc, sc->sc_cabq, 1); ifp->if_drv_flags &= ~IFF_DRV_OACTIVE; sc->sc_wd_timer = 0; @@ -4693,15 +4695,15 @@ ath_tx_proc_q0123(void *arg, int npendin */ nacked = 0; if (TXQACTIVE(txqs, 0)) - nacked += ath_tx_processq(sc, &sc->sc_txq[0]); + nacked += ath_tx_processq(sc, &sc->sc_txq[0], 1); if (TXQACTIVE(txqs, 1)) - nacked += ath_tx_processq(sc, &sc->sc_txq[1]); + nacked += ath_tx_processq(sc, &sc->sc_txq[1], 1); if (TXQACTIVE(txqs, 2)) - nacked += ath_tx_processq(sc, &sc->sc_txq[2]); + nacked += ath_tx_processq(sc, &sc->sc_txq[2], 1); if (TXQACTIVE(txqs, 3)) - nacked += ath_tx_processq(sc, &sc->sc_txq[3]); + nacked += ath_tx_processq(sc, &sc->sc_txq[3], 1); if (TXQACTIVE(txqs, sc->sc_cabq->axq_qnum)) - ath_tx_processq(sc, sc->sc_cabq); + ath_tx_processq(sc, sc->sc_cabq, 1); if (nacked) sc->sc_lastrx = ath_hal_gettsf64(sc->sc_ah); @@ -4736,7 +4738,7 @@ ath_tx_proc(void *arg, int npending) nacked = 0; for (i = 0; i < HAL_NUM_TX_QUEUES; i++) if (ATH_TXQ_SETUP(sc, i) && TXQACTIVE(txqs, i)) - nacked += ath_tx_processq(sc, &sc->sc_txq[i]); + nacked += ath_tx_processq(sc, &sc->sc_txq[i], 1); if (nacked) sc->sc_lastrx = ath_hal_gettsf64(sc->sc_ah);