CV-Bowen opened a new pull request, #22372: URL: https://github.com/apache/nuttx/pull/22372
## Summary `drivers/rpmsg/rpmsg_port: call ns_bound_cb when data arrives before the ns ack`: an endpoint created on the announcing side learns the peer address from the first message it receives. When that is a data message instead of the NS ack, `rpmsg_port_rx_callback()` only sets `ept->dest_addr`, so the service's `ns_bound_cb` is never called and it never learns that the endpoint is bound. Call `ns_bound_cb` in that case too, after setting `dest_addr` under `rdev->lock`, as the NS ack path does. The endpoint is already referenced across the callback by `rpmsg_port_rx_callback()`. ## Impact rpmsg_port transports only (`rpmsg_port_uart`, `rpmsg_port_spi`). A service's `ns_bound_cb` now also runs when the peer's first message is a data message; services without `ns_bound_cb` are unaffected. ## 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 Builds sim:rpserver, sim:rpproxy, qemu-armv8a:rpserver and qemu-armv8a:rpproxy with 0 warnings. qemu-armv8a:rpserver and rpproxy are also connected over rpmsg_port_uart, so the baseline ping runs over the changed path. Not tested: the ordering itself (data before the NS ack); no in-tree service sends before its NS ack on a port transport. 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]
