From owner-freebsd-wireless@FreeBSD.ORG Mon Jun 11 07:30:21 2012 Return-Path: Delivered-To: freebsd-wireless@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 68E5E106566C for ; Mon, 11 Jun 2012 07:30:21 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 3ACB88FC20 for ; Mon, 11 Jun 2012 07:30:21 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id q5B7ULuW015070 for ; Mon, 11 Jun 2012 07:30:21 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id q5B7ULf2015066; Mon, 11 Jun 2012 07:30:21 GMT (envelope-from gnats) Date: Mon, 11 Jun 2012 07:30:21 GMT Message-Id: <201206110730.q5B7ULf2015066@freefall.freebsd.org> To: freebsd-wireless@FreeBSD.org From: dfilter@FreeBSD.ORG (dfilter service) Cc: Subject: Re: kern/166190: commit references a PR X-BeenThere: freebsd-wireless@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: dfilter service List-Id: "Discussions of 802.11 stack, tools device driver development." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Jun 2012 07:30:21 -0000 The following reply was made to PR kern/166190; it has been noted by GNATS. From: dfilter@FreeBSD.ORG (dfilter service) To: bug-followup@FreeBSD.org Cc: Subject: Re: kern/166190: commit references a PR Date: Mon, 11 Jun 2012 07:29:38 +0000 (UTC) Author: adrian Date: Mon Jun 11 07:29:25 2012 New Revision: 236877 URL: http://svn.freebsd.org/changeset/base/236877 Log: When scheduling frames in an aggregate session, the frames should be scheduled from the head of the software queue rather than trying to queue the newly given frame. This leads to some rather unfortunate out of order (but still valid as it's inside the BAW) frame TX. This now: * Always queues the frame at the end of the software queue; * Tries to direct dispatch the frame at the head of the software queue, to try and fill up the hardware queue. TODO: * I should likely try to queue as many frames to the hardware as I can at this point, rather than doing one at a time; * ath_tx_xmit_aggr() may fail and this code assumes that it'll schedule the TID. Otherwise TX may stall. PR: kern/166190 Modified: head/sys/dev/ath/if_ath_tx.c Modified: head/sys/dev/ath/if_ath_tx.c ============================================================================== --- head/sys/dev/ath/if_ath_tx.c Mon Jun 11 07:15:48 2012 (r236876) +++ head/sys/dev/ath/if_ath_tx.c Mon Jun 11 07:29:25 2012 (r236877) @@ -2402,7 +2402,22 @@ ath_tx_swq(struct ath_softc *sc, struct /* XXX sched? */ } else if (ath_tx_ampdu_running(sc, an, tid)) { /* AMPDU running, attempt direct dispatch if possible */ + + /* + * Always queue the frame to the tail of the list. + */ + ATH_TXQ_INSERT_TAIL(atid, bf, bf_list); + + /* + * If the hardware queue isn't busy, direct dispatch + * the head frame in the list. Don't schedule the + * TID - let it build some more frames first? + * + * Otherwise, schedule the TID. + */ if (txq->axq_depth < sc->sc_hwq_limit) { + bf = TAILQ_FIRST(&atid->axq_q); + ATH_TXQ_REMOVE(atid, bf, bf_list); ath_tx_xmit_aggr(sc, an, bf); DPRINTF(sc, ATH_DEBUG_SW_TX, "%s: xmit_aggr\n", @@ -2411,7 +2426,6 @@ ath_tx_swq(struct ath_softc *sc, struct DPRINTF(sc, ATH_DEBUG_SW_TX, "%s: ampdu; swq'ing\n", __func__); - ATH_TXQ_INSERT_TAIL(atid, bf, bf_list); ath_tx_tid_sched(sc, atid); } } else if (txq->axq_depth < sc->sc_hwq_limit) { _______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"