FelipeMdeO commented on PR #20156:
URL: https://github.com/apache/nuttx/pull/20156#issuecomment-5686380245

   ## Reproduced before/after on QEMU's esp32s3 machine
   
   Same firmware image (esp32s3-xiao, `CONFIG_ESP32S3_OPENETH=y`), rebuilt only 
toggling this diff, booted with `-s -S` and a GDB breakpoint counter on 
`openeth_isr_handler()` (`tools/qemu/run-qemu.sh -- -s -S`, then 
`xtensa-esp32s3-elf-gdb -batch -x count_isr.gdb`), same ~30s window each run.
   
   **Before** (interrupt never enabled) — 0 ISR hits, and the network stack 
never sees an inbound packet:
   ```
   Breakpoint 1 at 0x40376afc: file common/espressif/esp_openeth.c, line 241.
   [boots to NSH]
   nsh> ntpc_get_ntp_sample: ERROR: recvfrom() failed: 11
   ntpc_get_ntp_sample: ERROR: recvfrom() failed: 11
   ```
   (no "ISR FIRED" lines at all over the run)
   
   **After** (this patch) — ISR fires repeatedly, and the stack genuinely 
receives (SLIRP ICMP unreachable replies show up as `icmp_input`, which cannot 
happen without a working RX path):
   ```
   Breakpoint 1 at 0x40376afc: file common/espressif/esp_openeth.c, line 241.
   ISR FIRED #1
   ISR FIRED #2
   ISR FIRED #3
   ISR FIRED #4
   ISR FIRED #5
   ISR FIRED #6
   ISR FIRED #7
   [boots to NSH]
   nsh> icmp_input: WARNING: Unknown ICMP cmd: 3
   ntpc_get_ntp_sample: ERROR: recvfrom() failed: 11
   icmp_input: WARNING: Unknown ICMP cmd: 3
   ntpc_get_ntp_sample: ERROR: recvfrom() failed: 11
   icmp_input: WARNING: Unknown ICMP cmd: 3
   ```
   (the remaining `ntpc` timeout is unrelated to this fix — QEMU's SLIRP has no 
real NTP server to answer; the point is the stack is now actually receiving 
frames instead of zero)
   
   `count_isr.gdb` used:
   ```gdb
   set pagination off
   set confirm off
   break openeth_isr_handler
   set $n = 0
   commands
     silent
     set $n = $n + 1
     printf "ISR FIRED #%d\n", $n
     continue
   end
   continue
   ```


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