You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2022/01/14 08:52:41 UTC

[GitHub] [incubator-nuttx] a-lunev opened a new pull request #5226: sim/netdev: eliminated RX data stream congestion in case of high TX network traffic

a-lunev opened a new pull request #5226:
URL: https://github.com/apache/incubator-nuttx/pull/5226


   ## Summary
   
   Fixed an issue with RX data stream congestion in case of high TX network traffic.
   In case of high TX network traffic, netdriver_loop() that reads data from netdev was invoked via up_idle() only after high TX network traffic had stopped. That resulted in massive delay and drop of TCP ACK packets and any other packets from netdev (tun/tap device).
   
   As a result, TCP throughput on Linux host achieves 234 Mbits/sec.
   
   ## Impact
   
   arch/sim/netdev(tun/tap)
   
   ## Testing
   
   Build NuttX:
   ```
   $ ./tools/configure.sh -l sim:tcpblaster
   $ make menuconfig (enable CONFIG_NETUTILS_NETCAT_SENDFILE, disable CONFIG_NET_TCP_WRITE_BUFFERS)
   $ make
   ```
   Enable TUN/TAP on Linux host:
   ```
   $ sudo setcap cap_net_admin+ep ./nuttx
   $ sudo ./tools/simhostroute.sh wlan0 on
   ```
   Run iperf server on Linux host:
   `$ iperf -s -p 5471 -i 1 -w 416K`
   
   Run NuttX on Linux host:
   ```
   $ ./nuttx
   NuttShell (NSH) NuttX-10.2.0
   nsh> ifconfig eth0 10.0.1.2
   nsh> ifup eth0
   ifup eth0...OK
   nsh> dd if=/dev/zero of=/tmp/test.bin count=10000
   nsh> netcat LINUX_HOST_IP_ADDRESS 5471 /tmp/test.bin
   nsh> poweroff
   ```
   
   iperf on Linux host:
   ```
   $ iperf -s -p 5471 -i 1 -w 416K
   ------------------------------------------------------------
   Server listening on TCP port 5471
   TCP window size:  416 KByte
   ------------------------------------------------------------
   [  4] local 192.168.1.68 port 5471 connected with 10.0.1.2 port 25367
   [ ID] Interval       Transfer     Bandwidth
   [  4]  0.0- 0.2 sec  4.88 MBytes   234 Mbits/sec
   ```
   
   Disable TUN/TAP on Linux host:
   `$ sudo ./tools/simhostroute.sh wlan0 off`


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-nuttx] xiaoxiang781216 commented on pull request #5226: sim/netdev: eliminated RX data stream congestion in case of high TX network traffic

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 commented on pull request #5226:
URL: https://github.com/apache/incubator-nuttx/pull/5226#issuecomment-1012929794


   @a-lunev what's the perf number before change?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-nuttx] a-lunev commented on pull request #5226: sim/netdev: eliminated RX data stream congestion in case of high TX network traffic

Posted by GitBox <gi...@apache.org>.
a-lunev commented on pull request #5226:
URL: https://github.com/apache/incubator-nuttx/pull/5226#issuecomment-1012956135


   > @a-lunev what's the perf number before change?
   
   Actually, this throughput increase is due to https://github.com/apache/incubator-nuttx-apps/pull/952 enhancement in netcat. This PR #5226 just fixes the bug (hang-up) at high traffic. In https://github.com/apache/incubator-nuttx-apps/pull/952 I wrote that before enabling sendfile for netcat the TCP throughput was only 205 Kbit/s (not depending on the transmitted file size). After I enabled sendfile in netcat, the TCP throughput was up to 8.19 Mbit/s (the transmitted file was 1000 KB). However, if I tried to send larger file (10 MB), the TCP connection hung up.
   Thus PR #5226 fixes the issue with TCP connection hang-up because of RX stream congestion. After that I was able to test the performance using a larger file (10 MB). If the file size is 10 MB or larger, TCP throughput on Linux host (my setup) achieves now 234 Mbits/sec.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-nuttx] xiaoxiang781216 merged pull request #5226: sim/netdev: eliminated RX data stream congestion in case of high TX network traffic

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 merged pull request #5226:
URL: https://github.com/apache/incubator-nuttx/pull/5226


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org