mirror of
https://github.com/apache/nuttx.git
synced 2026-09-29 02:23:51 +00:00
Implements the device end of virtio-net, so a peer running the stock virtio-net driver sees this side as a network card, and registers a netdev lowerhalf. Ring layout follows the peer's numbering: vq[0] is its RX queue, which we fill to transmit, and vq[1] its TX queue, which we harvest. No features are negotiated, so every frame carries the zeroed legacy virtio_net_hdr. Peer buffers are reached by raw 64-bit address through an arch-provided translation window -- the AM67 RAT, identity mapping elsewhere -- splitting copies that straddle it. Also gives DRIVERS_VHOST a prompt; it was promptless and so unselectable without a driver forcing it. Verified on t3-gem-o1 against an unmodified Linux virtio_net: eth0 registers, ifup brings it to RUNNING, and the peer pings it 5/5 at 0.27 ms and 60/60 with 0% loss. Assisted-by: Claude Code:claude-fable-5 Signed-off-by: Ulaş Sertan Kemeç <sertan.usk@gmail.com> |
||
|---|---|---|
| .. | ||
| CMakeLists.txt | ||
| Kconfig | ||
| Make.defs | ||
| vhost-net.c | ||
| vhost-net.h | ||
| vhost-rng.c | ||
| vhost-rng.h | ||
| vhost-rpmsg.c | ||
| vhost-rpmsg.h | ||
| vhost.c | ||