Glorious Network Stack Rewrite (using my own brain and hands this time) - #188
Open
FlareCoding wants to merge 20 commits into
Open
Glorious Network Stack Rewrite (using my own brain and hands this time)#188FlareCoding wants to merge 20 commits into
FlareCoding wants to merge 20 commits into
Conversation
…f the network stack daemon task
…t sent the request
…default nullable generic ops and socket specific ops
…gh the socket ops table
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Note
High Risk
Full rewrite of kernel networking and driver/stack boundaries; only virtio-net is registered, so hardware Ethernet paths lose DHCP and stack connectivity until re-integrated.
Overview
Replaces the old
netifcallback + deferred TX/DHCP model with apacket/interfacestack: drivers hand frames in throughreceive(), layers useeth→ipv4→ ICMP/ARP, andnetstkdages the ARP table. Virtio-net is the only driver wired end-to-end today—it subclassesnet::interface, registers asethN, copies RX into packets, and transmits viatransmit(packet*)with a temporary QEMU static IPv4 config.BCM GENET and RTL8168 are stripped back to link-layer only: embedded
m_mac, instancetransmit(frame), noregister_netif, no DHCP/link callbacks, and RX no longer feeds the stack (placeholder until a protocol stack attaches). The monolithicinet_socket,dhcp,loopback, andethernetmodules are removed in favor ofeth, typedipv4/ethaddresses, refactored checksum/byteorder, non-blocking ARP with pending packet queues, and ICMP ping sockets viainet::create_socket. UDP/TCP are not carried forward yet—IPv4 logs and drops them. Style rules add documentation voice guidance usinginterface.has the reference.Reviewed by Cursor Bugbot for commit d876ab5. Bugbot is set up for automated code reviews on this repo. Configure here.