CV-Bowen opened a new pull request, #4112: URL: https://github.com/apache/nuttx-apps/pull/4112
## Summary Add a `ping` subcommand to the nsh `virtio` and `vhost` commands: ``` virtio ping <name> <times> <len> <period(ms)> vhost ping <name> <times> <len> <period(ms)> ``` It fills a `struct virtio_ping_s` and issues `VIRTIOIOC_PING` on `/dev/virtio` (or `VHOSTIOC_PING` on `/dev/vhost`); the kernel prints the result to syslog. `<name>` is the ping instance name shown by `virtio dump` / `vhost dump`, or `all`. The maximum argument count of both commands goes from 3 to 6 so the extra arguments reach the handler. Depends on apache/nuttx#22167 (the ping device and the ioctl). ## Impact nsh `virtio` / `vhost` only. `dump` behaves as before; the help text gains the ping usage. ## Testing Host: Ubuntu 22.04.5 LTS x86_64, QEMU version 10.2.1, sim: cc (Ubuntu 13.1.0-8ubuntu1~22.04) 13.1.0, qemu-armv8a: aarch64-none-elf-gcc (Arm GNU Toolchain 12.2.Rel1 (Build arm-12.24)) 12.2.1 20221205 Built and used together with apache/nuttx#22167 on qemu-armv8a:rpserver + qemu-armv8a:rpproxy (rptun over ivshmem, with a test-only ping vdev in the resource table) and on sim:rpserver + sim:rpproxy. See that PR for the measurements. ``` server> virtio ping all 100 64 0 [server] ping device: ping0 [server] ping times: 100, send_len: 64 [server] avg: 0 s, 113525 ns [server] min: 0 s, 86704 ns [server] max: 0 s, 1554287 ns [server] rate: 5.426117 Mbits/sec server> virtio ping nosuch 10 64 0 nsh: virtio: ioctl failed: 19 ``` `virtio dump all` / `vhost dump all` unchanged (baseline cases below). No regression in rpmsg: sim:rpserver/rpproxy and qemu-armv8a:rpserver/rpproxy boot and pass the fixed rpmsg cases (dump, ping, rpmsgfs; 15/15). No regression in virtio: qemu-armv8a:netnsh boot and pass the fixed virtio cases (rng, blk on mmio and pci, net, 9p; 24/24). qemu-armv8a was built with LIBC_ENVPATH and BINFMT_CHECKEXEC disabled, which current master needs for nxinit to start nsh there; unrelated to this 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
