CV-Bowen opened a new pull request, #22616:
URL: https://github.com/apache/nuttx/pull/22616
## Summary
- `rptun: increase the default stack size to 8192`: the rptun kernel
thread's default 4096-byte stack is not enough for the ivshmem vhost and
virtio device registration path; the thread runs out of stack
(`nxsched_checkstackoverflow`, USED 100%) while registering devices. The
ivshmem board configs already carry `CONFIG_RPTUN_STACKSIZE=8192`; raise
the default so a config that relies on it gets the same headroom.
- `drivers/rptun: add the CAN, crypto, ping and GPIO vdevs to
rptun_ivshmem`: the ivshmem resource table carries the vdevs of the vhost
backends, but it only knows RNG, rpmsg, vsock, net, i2c, spi and RPMB, so
a peer that publishes a CAN, crypto, ping or GPIO vdev gets no matching
entry. Add the four, gated on their backend like the existing ones, with
the virtqueues and config space those backends define. Each vdev gets its
own shm size instead of sharing one, so an entry that needs more (the CAN
frame pool, ping's text buffer) can grow it.
## Impact
The rptun default thread stack doubles (4 KiB to 8 KiB) unless a board sets
`CONFIG_RPTUN_STACKSIZE`. The ivshmem resource table layout changes when any
of the CAN, crypto, ping or GPIO backends is enabled, so both ends of an
ivshmem link must run the same configuration. Nothing changes when they are
off.
## 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:rpproxy with `CONFIG_NET_CAN=y CONFIG_DRIVERS_VHOST_CAN=y
CONFIG_ALLOW_BSD_COMPONENTS=y CONFIG_CRYPTO=y CONFIG_CRYPTO_CRYPTODEV=y
CONFIG_DRIVERS_VHOST_CRYPTO=y CONFIG_I2C=y CONFIG_I2C_DRIVER=y
CONFIG_DRIVERS_VHOST_I2C=y CONFIG_SPI=y CONFIG_SPI_DRIVER=y
CONFIG_DRIVERS_VHOST_SPI=y CONFIG_DRIVERS_VHOST_PING=y
CONFIG_NET_VSOCK_VHOST` builds with 0 warnings, so every new table entry is
compiled. `CONFIG_DRIVERS_VHOST_GPIO=y` compiles too but the link needs a
board-provided `vhost_gpio_get_ioe()`, which this board does not have.
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. checkpatch passes.
--
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]