wengzhe opened a new pull request, #7334:
URL: https://github.com/apache/incubator-nuttx/pull/7334

   ## Summary
   - arch/sim: calling txdone callback after devif_loopback in netdriver
     - When devif_loopback handles a packet (like a ping targeting at this 
dev), it does not call the txdone callback, breaking the tx pipeline and may 
left some packets unhandled, delayed until next transmit on the network 
interface.
   
   - arch/sim: change g_avail_work and g_recv_work to array in netdriver
     - Share one worker between multiple simulated network devices may work 
most of the time, but sometimes breaks the tx pipeline when sending packets on 
more than one interface at the same time, and leaves some packets unprocessed 
in network stack, delayed until next transmit on the network interface. The rx 
process is likely delayed in packet processing under similar situation, so keep 
g_avail_work and g_recv_work the same number as interfaces.
   ```
   dev0         tx1 avail              tx1 done
                   v                      v
   shared_work  dev0 tx1 -> dev0 tx1 -> empty -> dev1 tx2 -> dev1 tx3 -> empty
                               ^                    ^           ^          ^
   dev1             tx2 avail (failed to queue)  tx3 avail   tx2 done   tx3 done
   ```
   
   ## Impact
   Netdriver in sim.
   
   ## Testing
   Tested on Ubuntu 22.04 x86_64
   


-- 
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: commits-unsubscr...@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to