jerpelea opened a new pull request, #20301:
URL: https://github.com/apache/nuttx/pull/20301

   ## Summary
   
   openeth_receive() (arch/xtensa/src/common/espressif/esp_openeth.c) tracks 
the next expected RX descriptor in priv->cur_rx_desc, an int initialized to 0 
exactly once, in esp_openeth_initialize(). QEMU's esp32s3 machine models the 
OpenCores MAC's DMA ring pointer as resetting to descriptor 0 every time RXEN 
is toggled off and back on (openeth_disable()/openeth_enable(), called from 
ifdown()/ifup()), but nothing rewinds the driver's own index to match. On the 
very first bring-up both start at 0, so nothing looks wrong; from the second 
ifup() onward the two permanently disagree, openeth_receive() keeps inspecting 
the wrong descriptor, finds it still marked "owned by HW" (e=1), and silently 
drops the notification. This breaks all inbound traffic on the interface, not 
just application sockets -- ARP replies and ICMP echo replies are RX frames 
too, so ping breaks identically.
   
   Re-run the same descriptor initialization esp_openeth_initialize() does at 
boot -- re-arm every RX/TX descriptor, rewind cur_rx_desc/cur_tx_desc to 0 -- 
inside openeth_ifup(), under the same critical section that already toggles 
RXEN.
   
   Board-independent code, and open_eth only exists as a QEMU peripheral, so 
there is no real-hardware regression risk.
   
   ## Impact
   
   RELEASE
   
   ## Testing
   
   CI


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