Skip to content

Networking

Node1 edited this page Jun 18, 2026 · 4 revisions

Networking

Purpose

This page defines the low-latency TCP/UDP networking direction for XAI OS.

Contents

Goal

XAI OS prioritizes low-latency app-agent command traffic over generic maximum throughput. The target is a per-core TCP/UDP path that avoids the generic kernel socket hot path where safe.

Queue Ownership

Networking should support:

  • per-core RX/TX queue ownership;
  • flow-to-core pinning;
  • RSS or equivalent flow steering where hardware supports it;
  • stable packet processing on the owning core;
  • NIC queues assigned to AI Cells where hardware and safety allow.

QEMU Implementation Status

Milestone 36 completes the QEMU network maturity contract. The current QEMU path proves:

  • deterministic flow-to-queue routing;
  • UDP flow reuse on the owning queue;
  • UDP idle expiry;
  • TCP establishment and closed-state accounting;
  • TCP retransmit-before-timeout policy for SYN-received flows;
  • queue RX/TX/completion telemetry;
  • zero queue backpressure drops in the QEMU gate;
  • zero flow/core mismatches in the QEMU gate.

This is a correctness contract, not a physical NIC performance claim. Hardware-specific queue steering, interrupt moderation, and throughput tuning remain post-full-OS platform work.

Polling and Interrupts

Active traffic should use adaptive polling. Idle traffic should fall back to interrupts.

Hot AI cores should not receive unrelated interrupts.

Copy Policy

The initial policy is copy-small and zero-copy-large:

  • small command packets are copied if that reduces overhead;
  • large payloads use zero-copy where ownership is clear;
  • buffer ownership must be explicit.

Metrics

Track p50, p95, p99, and p999 latency. Also track packet drops, queue depth, core handoffs, interrupts, and cross-core processing.

Implementation Requirements

  • Each hot flow must have an owner core.
  • Queue depth must be observable per RX/TX queue.
  • Active flows use polling; idle flows fall back to interrupts.
  • Small command packets may be copied when cheaper than ownership transfer.
  • Large payloads require explicit zero-copy buffer ownership.
  • Generic kernel socket buffers are not on the hot path for performance-critical embedded app agent traffic.

Benchmark Requirements

Compare against:

  • tuned Linux/BSD kernel TCP and UDP paths;
  • kernel-bypass baselines such as DPDK, AF_XDP, or netmap where relevant;
  • idle and loaded inference scenarios;
  • build/test interference scenarios.

Related Pages

Clone this wiki locally