On Sat, Mar 31, 2012 at 11:02 PM, dan dandenson@gmail.com wrote:
Hello Dan,
there is not such mechanism in batman-adv right now. It is a really good idea and we already started to think about that during WBMv5. Personally, I'm applying to the GSOC2012 and I'm proposing something similar.
I also think that packet loss is not the correct way to go.
Regarding your idea, how would you measure the maximum throughput?
An easy way might be to just pull the info from ifconfig on a timer:
eth0 RX bytes:2841699391 (2.6 GiB) TX bytes:2681928474 (2.4 GiB)
- 5 seconds
RX bytes:2842069649 (2.6 GiB) TX bytes:2682282969 (2.4 GiB)
=RX of 361.5Kb, TX of 346.2Kb
just update a value for the MAX of both as they change
Compare the stored value to the last 5 second interval so see what amount of the connection is available. In my case, I have a 20Mb/10Mb connection so I have 19.3Mb/9.3Mb available.
That sounds like a nice start! I'm not sure, though, if that number includes retransmissions and/or unacknowledged frames. IIRC i think i've seen that TX number grow in an interface with such a lossy link that was just sending traffic (trying to reach the distant ap) but getting nothing in return (ap couldn't hear me)
So far, with openwrt and ath9k / ath9k_htc, i've found the "tx bitrate" (or MCS level) a fair indicator of the link capacity. if it says "65.0 MBit/s MCS 7" i cannot tell exactly how much goodput it will have, but i can be pretty confident that it will be better than when it says "6.5 MBit/s MCS 1"