[Madwifi-devel] Throughput reduction
Status: Beta
Brought to you by:
otaku
From: Derek S. <de...@in...> - 2009-04-01 01:16:39
|
Hi, With madwifi r3952 trunk, when there are two nodes on my desk, both running adhoc+minstrel, the measured throughput between the nodes is 17MBit/sec (Using a packet generator, where both nodes end up sending streams of UDP packets to the other). Minstrel reports that the rate used on the air is (typically) 54 MBit/sec, with a success chance of around 85%. Switching back to a much earlier build (madwifi r3952 branch 094) the measured throughput is 22Mbit/sec. Minstrel reports that the rate used on the air is (typically) 54 MBit/sec, with a success chance of around 93%. I used wireshark to see how the different versions behaved in the air. the 094 branch: one node would do: data|ack|data|ack|data|ack gap and then the other node would do data|ack|data|ack|data|ack gap and then the first node would do data|ack|data|ack gap and so on. The gap is of variable size, but is between 300 and 1000 us. There is a minimal (if any) gap between the data|ack|data|ack packets. =================== The trunk r3952 one node would do data|ack gap and then the other node would do data|ack gap sometimes one node would do: data|ack gap data|ack (where the gap is variable, but is between 300 and 1000us). ================================================== Curious as to the cause of this reduced throughput, I pulled zillions of different svn versions from madwifi project. The trunk version, r3755 behaved like the 094 build described above. The trunk version, r3756 behaved like the trunk 3952 build described above. So what changed in the code? Mentor did a change of: "Remove, rename, and move various mystery meat defines" and the change in question was: --- ath/if_ath.c (revision 3755) +++ ath/if_ath.c (revision 3756) @@ -7188,8 +7180,6 @@ static int ath_txq_update(struct ath_softc *sc, struct ath_txq *txq, int ac) { -#define ATH_EXPONENT_TO_VALUE(v) ((1<<v)-1) -#define ATH_TXOP_TO_US(v) (v<<5) struct ieee80211com *ic = &sc->sc_ic; struct wmeParams *wmep = &ic->ic_wme.wme_chanParams.cap_wmeParams[ac]; struct ath_hal *ah = sc->sc_ah; @@ -7197,9 +7187,9 @@ ath_hal_gettxqueueprops(ah, txq->axq_qnum, &qi); qi.tqi_aifs = wmep->wmep_aifsn; - qi.tqi_cwmin = ATH_EXPONENT_TO_VALUE(wmep->wmep_logcwmin); - qi.tqi_cwmax = ATH_EXPONENT_TO_VALUE(wmep->wmep_logcwmax); - qi.tqi_burstTime = ATH_TXOP_TO_US(wmep->wmep_txopLimit); + qi.tqi_cwmin = (1 << wmep->wmep_logcwmin) - 1; + qi.tqi_cwmax = (1 << wmep->wmep_logcwmax) - 1; + qi.tqi_burstTime = wmep->wmep_txopLimit / 32; /* 32 us units. */ if (!ath_hal_settxqueueprops(ah, txq->axq_qnum, &qi)) { EPRINTF(sc, "Unable to update hardware queue " The bursttime in the 3755 build is wmep->wmep_txopLimit<<5 The bursttime in the 3756 build is wmep->wmep_txopLimit/32 Now, give the commit the benefit of the doubt.. But I think the commit is wrong. Any comment? Derek. -- Derek Smithies Ph.D. IndraNet Technologies Ltd. Email: de...@in... ph +64 3 365 6485 Web: http://www.indranet-technologies.com/ |