Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • O OSKernel2026-StellarOS
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Terraform modules
  • Monitor
    • Monitor
    • Metrics
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • StellarOS
  • OSKernel2026-StellarOS
  • Merge requests
  • !13

feat(net): network module implementation & SMP migration guide

  • Review changes

  • Download
  • Patches
  • Plain diff
Merged StellarOS requested to merge net into main Mar 19, 2026
  • Overview 2
  • Commits 44
  • Pipelines 0
  • Changes 33

Created by: Alic3r3L1cwhk

This pull request introduces a major architectural refactor and feature expansion for the network subsystem, aligning it with Solaris FireEngine/Crossbow and Linux kernel designs, and adds a new PLIC (interrupt controller) driver. It also updates documentation to reflect these changes, including a detailed breakdown of the new network stack, device abstraction, and future roadmap. Key highlights include a new block+wakeup socket model, a NetDevice trait for network drivers, dynamic device registration, flow counters, and PLIC-based interrupt support.

Network Subsystem Refactor and Enhancements:

  • Introduced a new NetDevice trait (os/src/drivers/net/net_device.rs) to abstract network devices, following Solaris GLDv3's minimal interface, and implemented dynamic registration through a global NET_DEVICES BTreeMap. This enables support for multiple network devices and easier extension [1] [2].
  • Refactored the VirtIO-Net driver to implement the NetDevice trait (VirtIONetDevice), and provided a compatibility layer for smoltcp integration during migration [1] [2].
  • Added per-socket block+wakeup synchronization using WaitQueue, replacing busy-wait yield polling, which improves CPU efficiency and aligns with Solaris squeue and Linux sock->sk_wq models.
  • Implemented flow counters for RX/TX packets and bytes, with atomic operations for thread safety, and exposed a function to retrieve traffic statistics [1] [2] [3].

Interrupt Controller (PLIC) Support:

  • Added a new PLIC driver (os/src/drivers/plic.rs) for configuring and handling hardware interrupts, including device IRQ registration, priority setting, and claim/complete operations. The VirtIO-Net driver now registers its IRQ with the PLIC [1] [2].

Documentation and Roadmap Updates:

  • Updated README.md to document the new network architecture, device abstraction, flow counters, block+wakeup model, and PLIC-driven interrupts. Added a new section on the network subsystem's completion status and design highlights [1] [2] [3] [4].
  • Revised the project structure and next-step recommendations to prioritize SMP multicore support and VFS refactoring, and to reflect the increased syscall count and new user programs [1] [2] [3] [4].

Miscellaneous:

  • Removed kernel-side DNS support and the socket-dns feature, delegating DNS resolution to user space for better Linux compatibility [1] [2].
  • Increased the number of user programs linked in the system from 7 to 10.

These changes lay the groundwork for advanced networking features, improved scalability, and future multicore support.

References:
[1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14] [15] [16]

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: net