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

   ## Summary
   
   `rpmsg ping` only exercises the work-queue receive path: its endpoint
   has the default priority, so its callback never runs in the receive
   interrupt that #21593 added for `RPMSG_PRIO_RT` endpoints.
   
   - drivers/rpmsg/rpmsg_ping: add a real-time ping endpoint
     - Create a second endpoint, "rpmsg-ping-rt", with `RPMSG_PRIO_RT`,
       and send over it when bit 3 (0x8) of the ping command is set. The
       two endpoints are kept in a new `struct rpmsg_ping_dev_s` in
       `drivers/rpmsg/rpmsg_ping.h`.
   
   ## Impact
   
   - New command bit for `RPMSGIOC_PING`: 0x8 selects the RT endpoint.
     Existing commands (bits 0-2) behave as before.
   - Each rpmsg device creates one more endpoint ("rpmsg-ping-rt") when
     `CONFIG_RPMSG_PING` is enabled.
   - No Kconfig change. The nsh help text for the new bit is in a
     follow-up apps PR.
   
   ## 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 + qemu-armv8a:rpproxy (rptun ivshmem), with a
   test-only log in `rpmsg_ping_ept_cb()` that prints the endpoint name
   and `up_interrupt_context()` the first time each combination is seen:
   
   ```
   server> rpmsg ping all 20 1024 3 0     # ack + check
   server> rpmsg ping all 20 1024 11 0    # ack + check + RT
   proxy>  rpmsg ping all 20 1024 11 0
   ```
   
   All three complete 20/20 with every byte checked, on master and with
   this PR.
   
   | | master | this PR |
   |---|---|---|
   | cmd 3 | rpmsg-ping, irq=0 | rpmsg-ping, irq=0 |
   | cmd 11 | bit 3 ignored: rpmsg-ping, irq=0 | rpmsg-ping-rt, irq=1 once the 
peer address is bound; the first message, before the name service handshake 
completes, goes through the work queue (irq=0) |
   
   <details><summary>this PR</summary>
   
   ```
   [ 8] [  INFO] [proxy] PINGPATH rpmsg-ping in irq=0
   
   [ 9] [  INFO] [server] PINGPATH rpmsg-ping in irq=0
   
   [ 0] [  INFO] [proxy] PINGPATH rpmsg-ping-rt in irq=1
   
   [ 5] [  INFO] [proxy] PINGPATH rpmsg-ping-rt in irq=0
   
   [ 0] [  INFO] [server] PINGPATH rpmsg-ping-rt in irq=1
   
   [ 5] [  INFO] [server] PINGPATH rpmsg-ping-rt in irq=0
   
   ```
   </details>
   
   <details><summary>master</summary>
   
   ```
   [ 9] [  INFO] [proxy] PINGPATH rpmsg-ping in irq=0
   
   [ 9] [  INFO] [server] PINGPATH rpmsg-ping in irq=0
   
   ```
   </details>
   
   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]

Reply via email to