CV-Bowen opened a new pull request, #22488:
URL: https://github.com/apache/nuttx/pull/22488

   ## Summary
   
   Depends on apache/nuttx#22486
   
   `drivers/rpmsg/rpmsg_port: keep exchanging while frames await ack`: the SPI
   completion handler and PM callback used `rpmsg_port_retx_is_pending()` to
   decide whether there is still work, but that only reports that fast
   retransmit has triggered (`ackdup_count >= 2`), not that a frame is still
   unacknowledged. When a frame was lost with `ackdup_count` at 1 and an empty
   tx queue, both sides went idle, the frame was never retransmitted, and the
   peer waited for its sequence number until the watchdog fired.
   
   Add `rpmsg_port_retx_is_empty()` and use it for those two decisions, so an
   unacknowledged frame keeps the exchange running and holds the wakelock. The
   exchange path still uses `is_pending()` to choose the frame to send, so the
   dup-ack threshold is unchanged.
   
   ## Impact
   
   With `RPMSG_PORT_RETX`, an SPI link with an unacknowledged frame keeps
   exchanging until it is acknowledged. No change without RETX.
   
   ## Testing
   
   Host: Ubuntu 22.04.5 LTS x86_64.
   
   No in-tree configuration enables the SPI port drivers, so the commit was 
built
   with a test-only overlay on top of the rpserver configurations:
   `CONFIG_SPI=y CONFIG_SPI_SLAVE=y CONFIG_IOEXPANDER=y 
CONFIG_IOEXPANDER_RPMSG=y
   CONFIG_RPMSG_PORT_SPI=y CONFIG_RPMSG_PORT_SPI_SLAVE=y`, plus the 64-bit
   cast fix of apache/nuttx#P221 for the qemu-armv8a builds (master does not
   build the SPI ports on 64-bit targets without it). 0 warnings for the commit
   in all of:
   
   - `qemu-armv8a:rpserver` + overlay (aarch64-none-elf-gcc 13.4), RETX on
   - the same with `RPMSG_PORT_RETX=n` and `RPMSG_PORT_SPI_CRC=n`
   - `qemu-armv7a:rpserver` + overlay (arm-none-eabi-gcc 10.3), RETX on
   - `sim:rpserver_uart` (rpmsg_port_uart)
   
   No SPI hardware is available, so the SPI changes are build-only.
   
   No regression in rpmsg: sim:rpserver/rpproxy and qemu-armv8a:rpserver/rpproxy
   boot and pass the fixed rpmsg cases (dump, ping, rpmsgfs). The qemu-armv8a
   pair talks over rpmsg_port_uart as well as ivshmem (`rpmsg ping all` covers
   both), with `RPMSG_PORT_RETX=y`.
   
   checkpatch passes on the commit.
   


-- 
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]

Reply via email to