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

   ## Summary
   
   Two changes to the rpmsg_port queue:
   
   - `rpmsg_port_add_node()`/`rpmsg_port_remove_node()` update `free.num`
     and `ready.num` under the list spinlock, but
     `rpmsg_port_queue_navail()`/`rpmsg_port_queue_nused()` read them with
     `atomic_read()`, which does not synchronize with that lock. Read each
     counter under its own list lock.
   - replace the raw `list_node` pointers in `rpmsg_port_queue_s` with a
     `struct rpmsg_port_node_s` that embeds the `list_node`, so per-buffer
     metadata (e.g. a retransmission count) can be added later.
   
   ## Impact
   
   rpmsg_port only (`drivers/rpmsg/rpmsg_port.[ch]`, private). No API or
   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
   
   qemu-armv8a:rpserver/rpproxy connect over `rpmsg_port_uart`, so the
   `rpmsg ping` / `rpmsg dump` / rpmsgfs cases below go through the
   rpmsg_port queues on that target.
   
   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 6c50dd46dbe 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