anchao commented on PR #7830:
URL: https://github.com/apache/nuttx/pull/7830#issuecomment-1344776611

   > > > Do you have sanity testing for virtio drvier? It seems virtio driver 
is not stable, why not use openamp to implement it?
   > > 
   > > 
   > > @anchao Oh, really? I tested the driver with `iperf -c`, `iperf -s`, 
`telnetd` and `renew`. They were stable and the performance was good when my PR 
#7673 was merged.
   
   There is a issue with the the virtio driver before 
https://github.com/apache/nuttx/pull/7616 merged, if the UDP protocol is used 
and bandwidth is set to 100M, the virtio driver will can not receive any 
interrupts, and  virtio (available/used) index will not continue to increase,
   
   Host iperf client, set bandwidth to 100M
   ```
   $ iperf -c 127.0.0.1 -i 1 -p 15001 -u -b 100M
   ------------------------------------------------------------
   Client connecting to 127.0.0.1, UDP port 15001
   Sending 1470 byte datagrams, IPG target: 112.15 us (kalman adjust)
   UDP buffer size:  208 KByte (default)
   ------------------------------------------------------------
   [  3] local 127.0.0.1 port 47139 connected with 127.0.0.1 port 15001
   [ ID] Interval       Transfer     Bandwidth
   [  3]  0.0- 1.0 sec  12.5 MBytes   105 Mbits/sec
   [  3]  1.0- 2.0 sec  12.5 MBytes   105 Mbits/sec
   [  3]  2.0- 3.0 sec  12.5 MBytes   105 Mbits/sec
   ```
   
   nuttx (checkout before https://github.com/apache/nuttx/pull/7616 merged, and 
setup udp forward port hostfwd=udp:127.0.0.1:15001-10.0.2.15:5001)
   ```
   incubator-nuttx$ qemu-system-aarch64 -cpu cortex-a53 -smp 4 -nographic 
-machine virt,virtualization=on,gic-version=3 -chardev stdio,id=con,mux=on 
-serial chardev:con -global virtio-mmio.force-legacy=false -netdev 
user,id=u1,hostfwd=tcp:127.0.0.1:10023-10.0.2.15:23,hostfwd=tcp:127.0.0.1:15001-10.0.2.15:5001,hostfwd=tcp:127.0.0.1:15002-10.0.2.15:5002,hostfwd=udp:127.0.0.1:15001-10.0.2.15:5001
 -device virtio-net-device,netdev=u1,bus=virtio-mmio-bus.0 -mon 
chardev=con,mode=readline -kernel ./nuttx
   telnetd [4:100]
   
   NuttShell (NSH) NuttX-10.4.0
   nsh> iperf -s -u -i 1
          IP: 10.0.2.15
   
    mode=udp-server sip=10.0.2.15:5001,dip=0.0.0.0:5001, interval=1, time=0
   want recv=16384
   
              Interval         Transfer         Bandwidth
   
      0.00-   1.01 sec       5880 Bytes    0.00 Mbits/sec
      1.01-   2.02 sec       5880 Bytes    0.00 Mbits/sec
      2.02-   3.03 sec       5880 Bytes    0.00 Mbits/sec
      3.03-   4.04 sec       5880 Bytes    0.00 Mbits/sec
      4.04-   5.05 sec       5880 Bytes    0.00 Mbits/sec
      5.05-   6.06 sec       5880 Bytes    0.00 Mbits/sec
      6.06-   7.07 sec       5880 Bytes    0.00 Mbits/sec
   ```
   
   
   After PR https://github.com/apache/nuttx/pull/7616 is merged, the schedule 
timing will changed, this issue will easier to reproduce on TCP protocol, also 
that the rx queue cannot receive any data from host, I think the most 
fundamental issue is that why virtio driver will hang up on the UDP protocol if 
bandwidth is set to 100M.
   @masayuki2009 san, Do you have any suggestions? since I am not familiar with 
the virtio driver yet.
   


-- 
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-unsubscr...@nuttx.apache.org

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

Reply via email to