intrig-unicamp / mininet-wifi

Emulator for Software-Defined Wireless Networks
https://mn-wifi.readthedocs.io/
Other
431 stars 239 forks source link

Why is_cwnd_limited==False and packets_in_flight < cwnd in Mininet-wifi? #452

Closed hexiangdong0 closed 1 year ago

hexiangdong0 commented 1 year ago

I created a simplest topo with Mininet-wifi:

sudo mn --wifi

and let sta1 iperf sta2. I found that the value of tcp_is_cwnd_limited(sk) was always false, and because of that, the Linux kernel didn't call congestion control algorithm when an Acked occured. According to RFC2861, is_cwnd_limited==False is because of the lackness of data from application, but this shouldn't happen to iperf. Further, I found packets_in_flight(about 14) < cwnd (about 40). These doesn't happen when I use Mininet.

Is there a problem with the settings of Mininet-wifi or is it because of the characteristics of wireless network? If it is because of the characteristics of wireless network, does this mean that congestion control algorithm is useless (kernel doesn't call the congestion control algorithm at all) ?

ramonfontes commented 1 year ago

Honestly,

I have never investigated cwnd with mac80211_hwsim. The only pointer I could find is https://github.com/torvalds/linux/blob/8c0427842aaef161a38ac83b7e8d8fe050b4be04/drivers/net/wireless/mac80211_hwsim.c#L2471

hexiangdong0 commented 1 year ago

I debug in Linux kernel. The reason seems to be the consequence of tsq(TCP small queue) and wireless aggregation. https://lwn.net/Articles/757643/