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

   ## Summary
   
   Two rpmsg_port changes:
   
   - **Pass the endpoint priority to the transport TX ops.** openamp patch
     0018 added a priority to `struct rpmsg_endpoint`, but the
     `send_offchannel_raw` and `get_tx_payload_buffer` device ops never
     received it, so a transport could not order or schedule its TX traffic
     by endpoint. Extend 0018 with the rest of the change: a `priority`
     argument on both ops, `ept->priority` passed from
     `rpmsg_send_offchannel_raw()`/`rpmsg_get_tx_payload_buffer()`, and
     `rpmsg_set_priority()`. rpmsg_port and rpmsg_router_edge implement these
     ops, so they change in the same commit to keep every commit building;
     rpmsg_router_edge forwards the priority to its hub device, rpmsg_virtio
     accepts and ignores it.
   - **Align the queue buffers to the cache line.** On SPI ports the TX/RX
     buffers are moved by DMA, and the cache maintenance around a DMA
     transfer works on whole cache lines. Allocate the buffer area with
     `kmm_memalign(64, ...)` instead of `kmm_malloc()`.
   
   ## Impact
   
   - `rpmsg_device_ops.send_offchannel_raw` and `.get_tx_payload_buffer` take
     an extra `uint8_t priority`. In tree only rpmsg_port, rpmsg_router_edge
     and open-amp's rpmsg_virtio implement them, all updated here; an out-of
     tree transport implementing these ops needs the extra argument.
   - New `rpmsg_set_priority()`.
   - No Kconfig 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
   
   - Patch chain: on a fresh `open-amp-2025.10.0` tree all 21 patches listed
     in `open-amp.defs` apply; the CMake build below fetches open-amp and
     applies the new 0018.
   - `qemu-armv8a:rpserver` with `CONFIG_RPMSG_ROUTER=y` builds
     rpmsg_router_edge and rpmsg_port without warnings.
   - qemu-armv8a:rpserver/rpproxy talk over `rpmsg_port_uart`, so the rpmsg
     cases below send through the rpmsg_port ops with the new argument and
     through the realigned queue buffers. The alignment itself has no visible
     effect without DMA.
   
   Baseline (`test.sh`, cases: baseline.yaml):
   
   - 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
   - tested: nuttx 0e1370c9223 apps 5f1100d02
   - qemu-armv8a built with test-only overlay: disabled LIBC_ENVPATH 
BINFMT_CHECKEXEC
   - sim:rpserver + sim:rpproxy: PASS
     - [x] `uname -a` (server)
     - [x] `rpmsg dump all` (server)
     - [x] `rpmsg ping all 10 1024 3 0` (server)
     - [x] `uname -a` (proxy)
     - [x] `rpmsg ping all 10 1024 3 0` (proxy)
     - [x] `mount -t rpmsgfs -o cpu=server,fs=/proc /sp` (proxy)
     - [x] `cat /sp/version` (proxy)
     - [x] `rpmsg dump all` (proxy)
   - qemu-armv8a:rpserver + qemu-armv8a:rpproxy: PASS
     - [x] `uname -a` (server)
     - [x] `uname -a` (proxy)
     - [x] `rpmsg dump all` (server)
     - [x] `rpmsg ping all 10 1024 3 0` (server)
     - [x] `rpmsg ping all 10 1024 3 0` (proxy)
     - [x] `mount -t rpmsgfs -o cpu=server,fs=/proc /sp` (proxy)
     - [x] `cat /sp/version` (proxy)
   


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