SRDX-NET-RT-PASS: fbtap=ok encode=ok wire=ok decode=ok pixel=ok. The first time a sigilOS frame has been captured, delta-encoded, fragmented, transmitted over a raw NIC transport, reassembled, decoded, and presented to a display — all proven on x86 QEMU. tests/test_srdx_net_rt.sg (sigil-video 905c968) runs the complete end-to-end pipeline: fbtap_init(64,64) → fill two-tone (blue top, red bottom) → fb_tap_commit/acquire → srdx_encode_frame (1 tile dirty → 16,448 B packet) → fragment into 11 × ≤1,506 B raw-NIC frames (8 B header each) → srdx_wire_raw_send + srdx_wire_raw_recv per fragment (nic_iface.sg loopback) → reassemble 16,448 B in receive buffer → srdx_decode_frame → VESA framebuffer at 0x500000 → pixel verify: (row 16, col 32) = blue ✓, (row 48, col 32) = red ✓. This commit also includes the raw-NIC wire additions from 487d00a: srdx_wire_raw_send/recv/link/mac (4 wrappers over sys 113–116) + SRDX-RAW-PASS (link=ok mac=ok send=ok recv=ok magic=ok). (sigil-video 487d00a, 905c968)
What the 0.6.0 SRDX milestone means
sigilOS 0.6.0's SRDX goal was: prove a complete pixel-to-pixel round-trip from the compositor's framebuffer to a remote display, using the kernel's native transport, without a real network card or a real remote machine — just QEMU RAM and the loopback stub. This commit achieves that.
The two commits together complete the raw-NIC wire surface (487d00a) and the end-to-end round-trip proof (905c968). The raw-NIC wire surface additions from 487d00a:
| Function | Syscall | What it does |
|---|---|---|
srdx_wire_raw_send(buf, len) | sys 113 | Send one raw NIC frame (direct NIC, no TCP overhead) |
srdx_wire_raw_recv(buf, cap) | sys 114 | Receive one raw NIC frame |
srdx_wire_link() | sys 115 | NIC link status: 1=UP, 0=DOWN |
srdx_wire_mac(out) | sys 116 | 6-byte MAC address into out |
The SRDX wire surface is now complete: TCP path (sys 109–112, srdx_wire_listen/send/recv/close) for session setup and reliable interop; raw-NIC path (sys 113–116, srdx_wire_raw_send/recv/link/mac) for the low-latency SRDX frame stream. Both loopback-proven on x86.
The SRDX-RAW-PASS test (487d00a — test_srdx_raw.sg)
The raw NIC loopback test establishes the wire layer before the full round-trip test can run. Step sequence: nic_init() → srdx_wire_link() = 1 (link UP) → srdx_wire_mac(out) = 02:00:00:00:00:01 (loopback stub MAC) → srdx_wire_raw_send(pkt, 32) (32-byte SRDX header) → srdx_wire_raw_recv(rbuf, 100) → srdx_decode_magic_ok(rbuf) = 1.
SRDX-RAW-PASS: link=ok mac=ok send=ok recv=ok magic=ok.
The SRDX-NET-RT-PASS test — step by step (905c968 — test_srdx_net_rt.sg)
The full round-trip test uses a 64×64 framebuffer — manageable for a QEMU test, covers all code paths. 1 tile dirty = the full 64×64 tile. Uncompressed pixel data per tile: 64×64×4 = 16,384 bytes. SRDX packet = 32 B header + 32 B rect header + 16,384 B pixels = 16,448 B.
The raw-NIC MTU is 1,514 B (standard Ethernet MTU = 1,500 B payload + 14 B Ethernet header; minus 8 B SRDX fragment header = 1,506 B usable per fragment). 16,448 / 1,506 = 10.92 → 11 fragments.
Fragment protocol: each fragment carries an 8-byte header: [frag_idx: 4B][total_frags: 4B]. The receiver allocates a reassembly buffer and copies each fragment into buf + (frag_idx * MAX_PAYLOAD) until all total_frags fragments are received.
Step-by-step walkthrough:
fbtap_init(64, 64): register the 64×64 tap.- Two-tone fill: rows 0–31 = blue (0x000000FF in ARGB), rows 32–63 = red (0x00FF0000). Written pixel-by-pixel to the framebuffer.
fb_tap_commit(0, 0, 63, 63): full frame dirty, seq=1.fb_tap_acquire(): SRDX encode path gets the buffer.srdx_encode_frame(): encodes the full tile. Produces a 16,448 B packet. fbtap=ok.fb_tap_release(): compositor can write next frame.- Fragment loop (i = 0 to 10): each iteration calls
srdx_wire_raw_send(frag_buf, frag_len)then immediatelysrdx_wire_raw_recv(reassembly_buf, cap)— thenic_iface.sgloopback stub makes send→recv instantaneous. Copy received bytes torecv_buf + (frag_idx * MAX_PAYLOAD). After 11 iterations: wire=ok (11 fragments, 16,448 B total reassembled). srdx_decode_frame(recv_buf, 0x500000): decodes the reassembled packet to the VESA framebuffer at 0x500000. decode=ok.- Pixel verify:
fb_read_pixel(0x500000, 64, 16, 32)→ blue ✓;fb_read_pixel(0x500000, 64, 48, 32)→ red ✓. pixel=ok.
SRDX-NET-RT-PASS: fbtap=ok encode=ok wire=ok decode=ok pixel=ok.
The complete SRDX 0.6.0 pipeline — milestone status
COMPOSITOR (display path)
fb_tap_commit(dirty_rect) [kernel fbtap.sg]
fb_tap_acquire() [kernel fbtap.sg]
srdx_encode_frame() [video srdx_encode.sg]
→ 16448B packet (for 64×64 tile)
WIRE LAYER (two paths, both proven)
TCP path: srdx_wire_send(h, pkt, len) → sys 110 → netconn → TCP stack
Raw path: srdx_wire_raw_send(frag, len) → sys 113 → nic_send(loopback)
[11 fragments × 1506B for 16448B packet]
RECEIVE (reassemble + decode)
srdx_wire_raw_recv(buf, cap) [×11] [video srdx_wire.sg + sys 114]
srdx_decode_frame(recv_buf, vesa_fb) [video srdx_decode.sg]
pixel verify: (16,32)=blue (48,32)=red ✓
SRDX-NET-RT-PASS ← THIS COMMIT
Final status table for 0.6.0 SRDX — all components:
| Component | Status |
|---|---|
| sys 109–112 TCP netconn | WIRED |
| sys 113–116 raw-NIC | WIRED |
nic_iface.sg NIC ABI + loopback | PASS |
core/fbtap.sg compositor tap | PASS |
srdx_encode_frame delta encoder | PASS |
srdx_decode_frame + VESA blit | PASS |
srdx_wire TCP + raw-NIC paths | WIRE-PASS + RAW-PASS |
test_srdx_net_rt | NET-RT-PASS ← 0.6.0 milestone |
kbc-inject HID reverse channel | PASS |
| USB HID + Xbox One BT + DS4 gamepads | PASS |
srdx_persist.sg VFS persistence | PASS |
| RetroPie savestates (7 cores) | PASS |
| e1000 NIC (Drivers team) | in progress |
| RDP/VNC interop layer | RFC |
| 2→16 node mesh | 0.7.x |