Tell MiRA about the actual number of retries instead of pretending that
authorstsp <stsp@openbsd.org>
Wed, 26 Apr 2017 07:53:17 +0000 (07:53 +0000)
committerstsp <stsp@openbsd.org>
Wed, 26 Apr 2017 07:53:17 +0000 (07:53 +0000)
a frame which was retried N times was retried just once.
This punishes retry-heavy data rates even more and should reduce latency.
It does not seem to have a noticable effect on net throughput in my testing.
If this change causes throughput problems for anyone, let me know.
ok tb@ mlarkin@

sys/dev/ic/ar5008.c
sys/dev/pci/if_iwm.c
sys/dev/pci/if_iwn.c

index 805f4e0..544a0e9 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: ar5008.c,v 1.43 2017/03/08 12:02:41 mpi Exp $ */
+/*     $OpenBSD: ar5008.c,v 1.44 2017/04/26 07:53:17 stsp Exp $        */
 
 /*-
  * Copyright (c) 2009 Damien Bergamini <damien.bergamini@free.fr>
@@ -1015,7 +1015,7 @@ ar5008_tx_process(struct athn_softc *sc, int qid)
                an->mn.ampdu_size = bf->bf_m->m_pkthdr.len + IEEE80211_CRC_LEN;
                an->mn.agglen = 1; /* XXX We do not yet support Tx agg. */
                if (failcnt > 0)
-                       an->mn.retries++;
+                       an->mn.retries += failcnt;
                if (txfail)
                        an->mn.txfail++;
                if (ic->ic_state == IEEE80211_S_RUN) {
index fd3aa84..04692b8 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: if_iwm.c,v 1.172 2017/04/24 09:48:42 stsp Exp $       */
+/*     $OpenBSD: if_iwm.c,v 1.173 2017/04/26 07:53:17 stsp Exp $       */
 
 /*
  * Copyright (c) 2014, 2016 genua gmbh <info@genua.de>
@@ -3423,7 +3423,7 @@ iwm_rx_tx_cmd_single(struct iwm_softc *sc, struct iwm_rx_packet *pkt,
                in->in_mn.ampdu_size = le16toh(tx_resp->byte_cnt);
                in->in_mn.agglen = tx_resp->frame_count;
                if (tx_resp->failure_frame > 0)
-                       in->in_mn.retries++;
+                       in->in_mn.retries += tx_resp->failure_frame;
                if (txfail)
                        in->in_mn.txfail += tx_resp->frame_count;
                if (ic->ic_state == IEEE80211_S_RUN)
index 6013d74..eacf967 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: if_iwn.c,v 1.185 2017/03/08 12:02:41 mpi Exp $        */
+/*     $OpenBSD: if_iwn.c,v 1.186 2017/04/26 07:53:17 stsp Exp $       */
 
 /*-
  * Copyright (c) 2007-2010 Damien Bergamini <damien.bergamini@free.fr>
@@ -2386,7 +2386,7 @@ iwn_tx_done(struct iwn_softc *sc, struct iwn_rx_desc *desc, uint8_t nframes,
                wn->mn.ampdu_size = len;
                wn->mn.agglen = nframes; 
                if (ackfailcnt > 0)
-                       wn->mn.retries++;
+                       wn->mn.retries += ackfailcnt;
                if (txfail)
                        wn->mn.txfail += nframes;
                if (ic->ic_state == IEEE80211_S_RUN)