CV-Bowen opened a new pull request, #21301:
URL: https://github.com/apache/nuttx/pull/21301
## Summary
`rpmsg_port_ns_callback()` parsed the name service message in place, so
the rx buffer stayed held while the bind, unbind and bound callbacks of
the application ran. Like the name service handling in rpmsg_virtio,
copy the message to a local variable, release the rx buffer right away
and return `RPMSG_SUCCESS_BUFFER_RELEASED` so that
`rpmsg_port_rx_callback()` does not release it again. The rx buffer is
then available for new frames while the callbacks run.
## Impact
None beyond the earlier buffer release. No API or Kconfig change.
## 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
The qemu-armv8a server/proxy configurations bring up a port uart link
on /dev/ttyV0 (server2 <==> proxy2). Its endpoints are bound through
name service messages handled by `rpmsg_port_ns_callback()`, so the
`rpmsg ping all` cases below (`buffer_len: 2008` in the ping output is
the port uart device) only pass if the name service path works with
the early release.
Baseline (`test.sh`, cases: baseline.yaml):
- 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
- tested: nuttx eea53d8c693 apps c374fb2c9
- qemu-armv8a built with test-only overlay: disabled LIBC_ENVPATH
BINFMT_CHECKEXEC
- sim:rpserver + sim:rpproxy: PASS
- [x] `uname -a` (server)
- [x] `rpmsg dump all` (server)
- [x] `rpmsg ping all 10 1024 3 0` (server)
- [x] `uname -a` (proxy)
- [x] `rpmsg ping all 10 1024 3 0` (proxy)
- [x] `mount -t rpmsgfs -o cpu=server,fs=/proc /sp` (proxy)
- [x] `cat /sp/version` (proxy)
- [x] `rpmsg dump all` (proxy)
- qemu-armv8a:rpserver + qemu-armv8a:rpproxy: PASS
- [x] `uname -a` (server)
- [x] `uname -a` (proxy)
- [x] `rpmsg dump all` (server)
- [x] `rpmsg ping all 10 1024 3 0` (server)
- [x] `rpmsg ping all 10 1024 3 0` (proxy)
- [x] `mount -t rpmsgfs -o cpu=server,fs=/proc /sp` (proxy)
- [x] `cat /sp/version` (proxy)
--
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]