CV-Bowen opened a new pull request, #22366:
URL: https://github.com/apache/nuttx/pull/22366
## Summary
Two changes to the rpmsg router edge:
- `drivers/rpmsg/rpmsg_router_edge: destroy the router endpoints with
the edge`: a router endpoint on the hub device ("r:<cpu>:<name>")
keeps the user endpoint of the edge in its priv. When the remote edge
disconnects, the edge device is freed, but a service whose
ns_unbind_cb only marks the connection unbound (rpmsg_socket) never
destroys its user endpoint, so the router endpoint stays on the hub
device. When the edge reconnects, NS_CREATE_ACK matches the stale
router endpoint and `rpmsg_router_edge_bound()` calls
`usr_ept->ns_bound_cb` from freed or reused memory. Destroy every
router endpoint of the edge on the hub device before the edge is
freed.
- `drivers/rpmsg/rpmsg_router_edge: implement the dump op`: the edge
registered no dump op, so `RPMSGIOC_DUMP` showed nothing for a routed
channel. Print the edge identity, the negotiated tx/rx buffer sizes,
the hub device and, with verbose, the endpoint list. Like the other
transports it is built only when `RPMSG_DUMP_LEVEL` is above 0.
## Impact
Router configurations only (`CONFIG_RPMSG_ROUTER`). No API 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
Every commit builds sim:rpserver, sim:rpproxy, qemu-armv8a:rpserver and
qemu-armv8a:rpproxy with `RPMSG_ROUTER` enabled. qemu-armv8a has 0
warnings; sim reports one `-Wformat-truncation` warning in
`rpmsg_router_edge_send_offchannel_raw()`, which master reports as
well with the same configuration.
Not tested at runtime: no in-tree configuration sets up a hub and two
edges. imx93-qsb:rpmsg is unaffected (`RPMSG_ROUTER` is not enabled
there).
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]