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

   ## Summary
   
   rptun log output and the dump of the peer's syslog buffer:
   
   - `log the reset wait and the trace dump, use _emerg()`: the wait for
     the peer to take a reset request (up to
     `CONFIG_RPTUN_STATUS_TIMEOUT_MS`) printed nothing, so a stuck peer left
     no trace. The time left is printed once a second, and the dump names
     the core. The EMERG messages use `_emerg()`.
   - `drop the SYSLOG_RPMSG_SERVER guards around the dump`:
     `syslog_rpmsg_dump()` is a static inline that does not depend on
     `CONFIG_SYSLOG_RPMSG_SERVER`; the guards only made `RPTUNIOC_DUMP`
     fail with -ENOTTY.
   - `add RPTUN_TRACE_DUMP to choose the peer syslog dump`: a peer that
     keeps its syslog buffer across a reboot sends the old log again after
     the next boot, so dumping it at halt too prints the crash log twice
     and can push the start of the local crash log out of a ramlog. The
     new option lets such a board turn the dump off; it defaults to y, so
     nothing changes for existing boards.
   
   ## Impact
   
   - New Kconfig `RPTUN_TRACE_DUMP` (default y, depends on
     `SYSLOG_RPMSG_SERVER`); with the default the peer syslog is dumped as
     before.
   - `RPTUNIOC_DUMP` is accepted without `SYSLOG_RPMSG_SERVER` (no-op)
     instead of returning -ENOTTY.
   - `rptun_dev_reset()` prints a line per second while it waits.
   
   ## 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
   
   Every commit builds sim:rpserver, sim:rpproxy, qemu-armv8a:rpserver and
   qemu-armv8a:rpproxy with 0 warnings, plus sim:rpserver with
   `CONFIG_RPTUN_TRACE_DUMP=n` and with `CONFIG_SYSLOG_RPMSG_SERVER=n`.
   
   **Reset wait (qemu-armv8a:rpserver + rpproxy).** The proxy stops its
   side (`rptun stop /dev/rptun/server`), so it no longer answers; then
   `rptun reset /dev/rptun/proxy 1` on the server waits the full
   `CONFIG_RPTUN_STATUS_TIMEOUT_MS`. master prints nothing; this PR:
   
   ```
   [    8.644564] [ 8] [ EMERG] [server] rptun_dev_reset: Waiting proxy reset, 
timeout left 4000 ms
   [    9.746060] [ 8] [ EMERG] [server] rptun_dev_reset: Waiting proxy reset, 
timeout left 3000 ms
   [   10.846539] [ 8] [ EMERG] [server] rptun_dev_reset: Waiting proxy reset, 
timeout left 2000 ms
   [   11.949064] [ 8] [ EMERG] [server] rptun_dev_reset: Waiting proxy reset, 
timeout left 1000 ms
   [   13.213981] [ 8] [ EMERG] [server] rptun_dev_reset: Waiting proxy reset, 
timeout left 0 ms
   ```
   
   Not tested: the trace dump at halt with `CONFIG_RPTUN_TRACE_DUMP=y`
   (no in-tree resource table has an `RSC_TRACE` entry; build only).
   
   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