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

   ## Summary
   
   `drivers/rptun: select what RPTUNIOC_DUMP dumps`: `RPTUNIOC_DUMP`
   ignored its argument and only dumped the peer's syslog buffer. The
   argument is now a mask:
   
   - `RPTUN_DUMP_SYSLOG` (1): the peer's syslog buffer, as before. The halt
     notifier now passes it explicitly.
   - `RPTUN_DUMP_RSC` (2): the resource table, through
     `rptun_dump_resource()`. The new `CONFIG_RPTUN_RSC_DUMP` (default n)
     builds this call, so a build that does not need it keeps the dump code
     out.
   
   The nsh `rptun dump <path> [mask]` command that uses it is in
   apache/nuttx-apps#A153.
   
   ## Impact
   
   - New `RPTUN_DUMP_SYSLOG` / `RPTUN_DUMP_RSC` in
     `include/nuttx/rptun/rptun.h`, new Kconfig `RPTUN_RSC_DUMP`.
   - A caller passing 0 to `RPTUNIOC_DUMP` now dumps nothing instead of
     the syslog buffer. In tree only the halt notifier issued it, and it now
     passes `RPTUN_DUMP_SYSLOG`; the nsh command in nuttx-apps never
     reached it (see the 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
   
   Builds sim:rpserver, sim:rpproxy, qemu-armv8a:rpserver and
   qemu-armv8a:rpproxy with 0 warnings, and sim:rpserver/rpproxy with
   `CONFIG_RPTUN_RSC_DUMP=y`.
   
   **`rptun dump` (sim:rpserver + sim:rpproxy with `CONFIG_RPTUN_RSC_DUMP=y`,
   with apache/nuttx-apps#A153).** Before = nuttx master with
   nuttx-apps master:
   
   | command | before | this PR |
   |---|---|---|
   | `rptun dump /dev/rptun/proxy 2`; `echo $?` | 1, nothing printed (nsh sent 
`RPMSGIOC_DUMP`) | 0, the resource table |
   | `rptun dump all`; `echo $?` | 1 | 0 (sim has no `RSC_TRACE`, so no syslog 
to dump) |
   | `rpmsg ping all 3 64 1 0` | passes | passes |
   
   <details><summary>this PR, rptun dump /dev/rptun/proxy 2 (end)</summary>
   
   ```
   [    5.062055] [server] [carveout] da 0x0003029c pa 0xffffffff len 65536 
flags 0x0 reserved 0
   ```
   </details>
   
   imx93-qsb:rpmsg (`RPTUN_RSC_DUMP` off), arm-gnu-toolchain 13.2: ITCM
   127456 → 127648 bytes with this PR and the apps PR (of 129024).
   
   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