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

   ## Summary
   
   `!drivers/rpmsg/rpmsg_port: add Go-Back-N retransmission`: a frame lost
   or corrupted on a port link was gone, because the port had no way to ask
   for it again. This adds a Go-Back-N ARQ, `CONFIG_RPMSG_PORT_RETX`
   (default y):
   
   - the frame header (`struct rpmsg_port_header_s`) carries `seqno`,
     `ackno` and `min_seq`;
   - unacknowledged DATA frames stay on a per-port retransmission queue,
     with a retry count per node;
   - two duplicate ACKs trigger a fast retransmit, up to `retx_max_retry`
     attempts;
   - the SPI master and slave drivers fill in and check the new fields, and
     the option selects `RPMSG_PORT_SPI_CRC` so that a corrupted frame is
     detected.
   
   ## BREAKING CHANGE
   
   With the default `RPMSG_PORT_RETX=y` the port frame header grows by 8
   bytes on every rpmsg_port transport (SPI and UART), so a peer built
   without this change cannot talk to one built with it. Quick fix: set
   `CONFIG_RPMSG_PORT_RETX=n` on both sides to keep the old frame format,
   or update both sides together.
   
   ## Impact
   
   - New Kconfig `RPMSG_PORT_RETX`, default y; every configuration with
     `RPMSG_PORT` gets it (in tree: qemu-armv8a:rpserver/rpproxy,
     qemu-armv7a:rpserver/rpproxy, sim:rpserver_uart/rpproxy_uart).
   - Wire format of the port frame header: see above.
   
   ## 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 with 0 warnings: sim:rpserver, sim:rpproxy, qemu-armv8a:rpserver
   and qemu-armv8a:rpproxy (the qemu-armv8a ones use rpmsg_port_uart and so
   get `RPMSG_PORT_RETX=y` by default).
   
   qemu-armv8a:rpproxy with `RPMSG_PORT_SPI`, `RPMSG_PORT_SPI_SLAVE`
   (`SPI`, `SPI_SLAVE`, `IOEXPANDER_DUMMY`), with and without
   `RPMSG_PORT_RETX`: the new code compiles; the build stops only on four
   `-Werror=int-to-pointer-cast` errors in `rpmsg_port_spi_init_gpio()`
   (`(FAR void *)invert`, `(FAR void *)intcfg`), which master has on
   64-bit targets too.
   
   qemu-armv8a:rpserver + qemu-armv8a:rpproxy, `RPMSG_PORT_RETX=y` (the
   default) on both cores, links ivshmem and rpmsg_port_uart: the fixed
   rpmsg cases pass, `rpmsg ping all` over both links included.
   
   Not tested: retransmission itself (no in-tree board with an SPI rpmsg
   port, and no lossy link to test it on).
   
   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]

  • [PR] !drivers/rpmsg/rpmsg_por... CV-Bowen (via GitHub) via commits

Reply via email to