Repository navigation
Done
Description
Parent: #1399
Dependencies
- Define configurable tagged and untagged transport contracts #1400 — Define configurable tagged and untagged transport contracts
- Characterize tagged and untagged TC and XDP forwarding #1401 — Characterize tagged and untagged TC and XDP forwarding
- Let operators force a host-wide XDP attach mode for generic-mode testing #1534 — Let operators force a host-wide XDP attach mode for generic-mode testing (generic-mode lab rows)
- Base-branch decision recorded in Support configurable tagged and untagged public and fabric transport #1399: whether this PR targets
mainorintegration/galactic-worker(Deliver Galactic Worker with Local and Fabric delivery for tenant services #1430).
Deliverable
Gateway and NAT XDP paths that classify and transmit correctly across independently configurable public-side and fabric-side tagged/untagged transport in each required attach mode.
Work items
- Implement independent public-facing and fabric-facing interface/tag context for gateway and NAT. Public ingress uses the configured external-router adjacency; gateway encapsulation and NAT return select fabric context; DSR return and NAT outbound select public context. Never reuse an ingress VLAN ID as the egress VLAN ID without resolving the destination segment.
- Support public-side IPv4/IPv6 ARP/ND and routing control traffic through the intended host-stack path. Verify logical/public VLAN interface versus physical hook selection, FIB/neighbor scope, mode-specific tag handling, and cold-neighbor fallback independently on each side.
- Consume or derive the configured transport mode, logical interface, parent, and VLAN context consistently with TC and infrastructure provisioning. Support operator-selected IDs/parents and no-VLAN operation without a hard-coded tag or a required VLAN netdevice.
- Resolve measured classification and packet-layout gaps in gateway ingress/return and NAT leaves, including offsets through encapsulation/translation and the contract's supported tag representations.
- Implement the chosen egress strategy for FIB-selected VLAN adjacency, actual transmit device, MAC/neighbor resolution, and exactly one configured tag in tagged mode or no transport tag in untagged mode. Cover direct forwarding and host-stack continuation, including NAT return neighbor fallback and gateway fallback where applicable.
- Verify direct and shared-dispatch operation where supported. Preserve unclaimed packets and slot continuation; keep the dispatcher free of packet parsing unless a separately justified design change is approved. Enforce the defined transport-context claim policy.
Acceptance
Lab checks deferred. Under #1399's 2026-11-30 decision, this PR carries unit tests and real-kernel root tests. Every check below that needs the shared containerlab lab runs in #1405's end-of-epic lab pass instead, and is not a merge gate here.
- All four public/fabric mode combinations pass gateway requests from an external client (including same-node delivery if Define configurable tagged and untagged transport contracts #1400 requires it), backend DSR replies to that client, and NAT66/NAT64 public outbound and return traffic, including different IDs for tagged/tagged and cold/warm neighbors. Captures on each link prove correct independent tags without cross-side leakage.
- Unclaimed public control traffic remains available to the host stack, and wrong public/fabric VLANs do not bypass the defined claim/isolation rules. Direct and shared-dispatch paths retain the correct per-side context without requiring packet parsing in the dispatcher.
- Execute every required gateway/DSR/NAT direction in both modes, with at least two configured VLAN IDs and two VLANs sharing a parent. Untagged cases require no VLAN device/ID. Wire observations prove mode-specific tag behavior and configured-context isolation through direct transmission, dispatcher continuation, and host-stack fallback.
- Gateway ingress, backend DSR replies, NAT66, and NAT64 pass end to end for their supported families, using cold/warm neighbors and each required native/generic mode.
- Captures prove correct tags and payloads at actual transmission and receipt. Asynchronous redirect failures and unsupported transmit targets are observable; successful helper return alone is not a pass.
- Shared-hook gateway/NAT tests prove unclaimed and unrelated traffic reaches the intended next slot or host stack without corruption, double tagging, or cross-VLAN claims. Negative observations include possible unintended tenant destinations.
- The delivering PR carries real-kernel and lab regression results, relevant mandatory checks, and compatibility/rollback notes; it makes no unexecuted hardware qualification claim.
Activity
[-]Complete gateway and NAT forwarding over VLAN transport[/-][+]Complete gateway and NAT forwarding for both transport modes[/+]privateip commentedon Nov 30, 2026
Starting implementation on
feat/issue-1403, based onepic/1399-vlan-transport(which now includes #1536).Design (agreed with the epic coordinator):
GALACTIC_XDP_MODE/xdpmode). The dispatcher andxdpattachresolve the mode per interface, and the host-wide claim is unchanged.edgedsr.candnat.ceach get avlan_egressmap, VLAN ifindex to lower ifindex and VID, filled from netlink for the configured sides' logical interfaces. Whenbpf_fib_lookupreturns a mapped VLAN netdevice, the program pushes exactly one 802.1Q tag and redirects to the lower device, or usesXDP_TXwhen the lower device is the ingress. A native redirect to the VLAN netdevice, which drops every frame (Characterize tagged and untagged TC and XDP forwarding #1401 Q4), never happens.XDP_PASSstay in the VLAN context, because the hook runs on the VLAN netdevice.Tests. Unit tests for target and map resolution. Real-kernel root tests in both
GALACTIC_XDP_MODE=nativeandgeneric:XDP_TX;XDP_PASSfallback staying in the VLAN context.Lab rows are deferred to #1405.
Docs. Contract §6, §8 and §10, and
docs/operations/xdp-attach-mode.md.privateip commentedon Nov 30, 2026
Delivered by #1540, merged into the epic branch
epic/1399-vlan-transportas 705dede. A tagged side's gateway and NAT XDP hooks run generic on its VLAN netdevice, so the kernel separates VLANs before XDP runs.vlan_egresspushes exactly one 802.1Q tag and redirects to the lower device. CI's root job passed the new tests across all four public/fabric combinations, in both host modes, covering gateway ingress, DSR return, NAT66 and NAT64, isolation from other VLANs, cold-neighbour fallback and same-node delivery. #1539 adds the combinedusid_ingressclaim check for same-node delivery. Lab rows run in #1405. Closed by hand becauseFixesonly fires when the epic branch merges intomain.