From: stsp Date: Wed, 26 Apr 2017 07:53:17 +0000 (+0000) Subject: Tell MiRA about the actual number of retries instead of pretending that X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=0cff17d9126d1a90364d9b28b1d7ef78034b037a;p=openbsd Tell MiRA about the actual number of retries instead of pretending that 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@ --- diff --git a/sys/dev/ic/ar5008.c b/sys/dev/ic/ar5008.c index 805f4e0de5f..544a0e99321 100644 --- a/sys/dev/ic/ar5008.c +++ b/sys/dev/ic/ar5008.c @@ -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 @@ -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) { diff --git a/sys/dev/pci/if_iwm.c b/sys/dev/pci/if_iwm.c index fd3aa8430b7..04692b847ef 100644 --- a/sys/dev/pci/if_iwm.c +++ b/sys/dev/pci/if_iwm.c @@ -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 @@ -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) diff --git a/sys/dev/pci/if_iwn.c b/sys/dev/pci/if_iwn.c index 6013d7486f1..eacf967fc62 100644 --- a/sys/dev/pci/if_iwn.c +++ b/sys/dev/pci/if_iwn.c @@ -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 @@ -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)