CV-Bowen opened a new pull request, #20897:
URL: https://github.com/apache/nuttx/pull/20897

   ## Summary
   
   virtio-serial changes:
   
   - move the virtqueue indexes and struct virtio_serial_config_s to
     include/nuttx/virtio/virtio-serial.h and add struct
     vhost_serial_config_s, so a vhost-serial backend can share them with
     the frontend (no functional change)
   - raise the default of DRIVERS_VIRTIO_SERIAL_BUFSIZE from 256 to 1024
   - allocate the ring buffers with virtio_malloc_buf() instead of
     virtio_zalloc_buf(); the ring only reads bytes it has written, so the
     memset at probe time is not needed
   
   The first commit only fixes existing nxstyle errors in
   virtio-serial.c.
   
   ## Impact
   
   virtio-serial only. Adds the public header
   `include/nuttx/virtio/virtio-serial.h`. Default buffer size changes from
   256 to 1024 bytes per direction.
   
   ## 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
   
   `qemu-armv8a:netnsh` with a virtconsole on a host socket:
   
   ```
   qemu-system-aarch64 -cpu cortex-a53 -nographic \
     -machine virt,virtualization=on,gic-version=3 \
     -global virtio-mmio.force-legacy=false \
     -device virtio-serial-device,bus=virtio-mmio-bus.0 \
     -chardev socket,path=vs.sock,server=on,wait=off,id=vs0 \
     -device virtconsole,chardev=vs0 \
     -kernel ./nuttx
   ```
   
   - guest to host: `dd if=/dev/zero of=/dev/ttyV0 bs=512 count=16`, host
     received 8192/8192 bytes
   - host to guest: host sent `PING42`, `dd if=/dev/ttyV0 of=/dev/console`
     printed it
   
   Same result on master.
   
   No regression in rpmsg: sim:rpserver/rpproxy and 
qemu-armv8a:rpserver/rpproxy boot and pass the fixed rpmsg cases (dump, ping, 
rpmsgfs; 15/15). 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]

Reply via email to