Brijesh-Thakkar commented on issue #17282:
URL: https://github.com/apache/nuttx/issues/17282#issuecomment-6359800569

   Hi, I checked current master and open PRs. None of the four features exist 
yet, so I’d like to work on this, starting with syslog over netdev 
(netconsole-style). The same TX path can then be reused for note, gdbstub, and 
console.
   
   Proposed design:
   Add optional poll_xmit / poll_reclaim ops to netdev_ops_s, for polled TX 
that bypasses the network stack (similar to Linux netpoll). Only drivers that 
implement them can be used by the channel. This addresses @anchao’s concern: an 
unprepared driver can never be called from interrupt or panic context.
   Add a small core that builds the Ethernet/IPv4/UDP frame in a static 
per-target buffer, using ipv4_chksum() and UDP checksum 0. At runtime there is 
no IOB allocation, no ARP, and no net lock.
   Add a new syslog channel on top. On the panic path it uses sc_write_force, 
takes driver locks with trylock, drops the record if a lock is held, and has a 
re-entrancy guard.
   The first PR would be IPv4-only and cover the framework plus sim TAP. 
virtio-net would follow in a separate PR.
   Questions before I start:
   Are new optional ops in netdev_ops_s acceptable? If so, should the core own 
the frame buffer (my preference, since it avoids the IOB lock at panic), or 
should drivers supply an IOB?
   For the destination MAC: resolve it via ARP at setup time, or make it a 
static Kconfig/runtime setting? The static option would also allow early-boot 
logs.
   @xiaoxiang781216: is anyone already working on this internally?
   cc @raiden00pl


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