From owner-svn-src-all@freebsd.org Sun Jan 22 05:45:43 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D7924CBC82E; Sun, 22 Jan 2017 05:45:43 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 78A78A5A; Sun, 22 Jan 2017 05:45:43 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0M5jgZw044632; Sun, 22 Jan 2017 05:45:42 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0M5jgch044631; Sun, 22 Jan 2017 05:45:42 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201701220545.v0M5jgch044631@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Sun, 22 Jan 2017 05:45:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312612 - head/sys/dev/ath X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Jan 2017 05:45:43 -0000 Author: adrian Date: Sun Jan 22 05:45:42 2017 New Revision: 312612 URL: https://svnweb.freebsd.org/changeset/base/312612 Log: [ath] only apply the AR9300 delimiter workaround for the first sub-frame. This is supposed to only be applied to the first subframe and only if RTS/CTS is being done. I'm still not yet checking RTS/CTS exchange status so it's just happening for all subframes on AR9380 and later. This gets MCS23 throughput up from around 250mbit to 303mbit with RTS/CTS protection enabled, and around 330mbit with no HT protection enabled. Now, MCS23 has a PHY rate of 450mbit and we should be seeing closer to 400mbit for a straight one-way UDP test, but this beats the previous maximum throughput. Tested: * AR9380 (STA) -> AR9580 (AP) - STA with the modifications, doing UDP TX test using iperf. Modified: head/sys/dev/ath/if_ath_tx_ht.c Modified: head/sys/dev/ath/if_ath_tx_ht.c ============================================================================== --- head/sys/dev/ath/if_ath_tx_ht.c Sun Jan 22 05:28:26 2017 (r312611) +++ head/sys/dev/ath/if_ath_tx_ht.c Sun Jan 22 05:45:42 2017 (r312612) @@ -402,7 +402,7 @@ ath_tx_rate_fill_rcflags(struct ath_soft */ static int ath_compute_num_delims(struct ath_softc *sc, struct ath_buf *first_bf, - uint16_t pktlen) + uint16_t pktlen, int is_first) { #define MS(_v, _f) (((_v) & _f) >> _f##_S) const HAL_RATE_TABLE *rt = sc->sc_currates; @@ -458,11 +458,12 @@ ath_compute_num_delims(struct ath_softc * For AR9380, there's a minimum number of delimeters * required when doing RTS. * - * XXX TODO: this is only needed if (a) RTS/CTS is enabled, and - * XXX (b) this is the first sub-frame in the aggregate. + * XXX TODO: this is only needed if (a) RTS/CTS is enabled for + * this exchange, and (b) (done) this is the first sub-frame + * in the aggregate. */ if (sc->sc_use_ent && (sc->sc_ent_cfg & AH_ENT_RTSCTS_DELIM_WAR) - && ndelim < AH_FIRST_DESC_NDELIMS) + && ndelim < AH_FIRST_DESC_NDELIMS && is_first) ndelim = AH_FIRST_DESC_NDELIMS; /* @@ -975,7 +976,7 @@ ath_tx_form_aggr(struct ath_softc *sc, s */ bf->bf_state.bfs_ndelim = ath_compute_num_delims(sc, bf_first, - bf->bf_state.bfs_pktlen); + bf->bf_state.bfs_pktlen, (bf_first == bf)); /* * Calculate the padding needed from this set of delimiters,