CV-Bowen opened a new pull request, #22512: URL: https://github.com/apache/nuttx/pull/22512
## Summary Depends on apache/nuttx#22490 `rpmsg_port_header_s` carries `tx_nsec`/`rx_nsec` only with `CONFIG_RPMSG_PORT_RETX`; without it they sit in the last 16 bytes of the buffer. The frame layout, the payload size helpers and both timestamp accessors therefore have two variants, and reading a tail timestamp needs a check that the frame did not run into it. Keep the timestamps in the header in both cases. They are at a fixed offset, `RPMSG_PORT_TAIL_SIZE` and the tail accessors go away, and `rpmsg_port_get_timestamp()`/`rpmsg_port_update_timestamp()` have a single path. ## Impact BREAKING CHANGE: without `CONFIG_RPMSG_PORT_RETX` the port header grows from 8 to 24 bytes and the timestamps move from the tail of the buffer into it. Both ends of an rpmsg_port link (SPI or UART) must use the same layout, so update them together. With `CONFIG_RPMSG_PORT_RETX` (the default) nothing changes. The payload a buffer can carry is the same in both cases: the 16 bytes come out of the header instead of the tail. ## Testing Host: Ubuntu 22.04.5 LTS x86_64. **Build**, 0 warnings each, with the rpmsg_port SPI master/slave and UART ports compiled in: qemu-armv8a with RETX, qemu-armv8a without RETX and without SPI CRC, qemu-armv7a with RETX, and `sim:rpserver_uart`. The 64-bit builds carry apache/nuttx#22491, which master needs to build the SPI ports on 64-bit. **Runtime**: `qemu-armv8a:rpserver`/`rpproxy` talk over rpmsg_port_uart. Built with `CONFIG_RPMSG_PORT_RETX` off on both sides, the rpmsg cases (dump, ping both ways, rpmsgfs) pass before and after this change, which covers the new layout without RETX. The default (RETX) build passes the same cases. **Not run**: the SPI ports, for lack of hardware. 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]
