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

   ## Summary
   
   Depends on apache/nuttx#22484
   
   Two fixes for the port without `CONFIG_RPMSG_PORT_RETX`:
   
   - `drivers/rpmsg/rpmsg_port_spi: return the tx buffer without RETX`: since
     apache/nuttx#22362 the SPI completion paths no longer return a sent DATA
     frame to the tx queue (with retransmission the frame waits for its ack).
     Without retransmission nothing returns it, so every sent frame leaks a tx
     buffer, and once they are all gone senders wait for one forever. Return
     it there when RETX is disabled. The slave also restarted an exchange
     after every transfer; restart it only when another one was requested
     meanwhile (`transferring > 1`), as the master does.
   - `drivers/rpmsg/rpmsg_port: keep the timestamps at the tail without RETX`:
     keep `tx_nsec`/`rx_nsec` at the buffer tail when RETX is disabled, so that
     configuration keeps a 16 byte smaller header and its frame layout from
     before apache/nuttx#22483.
   
   ## Impact
   
   - `RPMSG_PORT_RETX=n` SPI ports no longer run out of tx buffers.
   - With `RPMSG_PORT_RETX=n` the frame layout is the one before
     apache/nuttx#22483; with RETX (the default) nothing changes.
   
   ## Testing
   
   Host: Ubuntu 22.04.5 LTS x86_64.
   
   No in-tree configuration enables the SPI port drivers, so each 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 each 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)
   
   The `RPMSG_PORT_RETX=n` paths are built but not run: the in-tree
   rpmsg_port_uart configurations use the default `RPMSG_PORT_RETX=y`.
   
   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 all commits.
   


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