Skip to content

Characterize tagged and untagged TC and XDP forwarding #1401

Done

Description

@privateip

Parent: #1399

Dependencies

Deliverable

A checked-in lab variant and source-pinned baseline report covering both external-router-to-edge-public and edge-to-compute links, explaining where independently configured tagged and untagged transport work, bypass classification, drop, or fail during transmission.

Work items

  • Create a tagged/untagged transport lab variant (main has none; deploy/containerlab builds untagged bonds only) with a configurable external-router/public-edge segment. Run all four public/fabric mode combinations, using different public and fabric IDs when both are tagged; record both segments' logical/physical interfaces and packet representations.
  • Trace external client gateway requests, same-node gateway delivery with GALACTIC_GATEWAY_LOCAL_DELIVERY on (unless Define configurable tagged and untagged transport contracts #1400 excludes it), DSR replies back to the client, NAT66/NAT64 public outbound and return, ARP/ND, and configured routing control traffic on the public interface. Observe both segments across cold/warm neighbors, direct transmission, and host-stack fallback.
  • Build tagged and untagged edge/compute links for the contract's topologies and record interfaces, kernel/driver versions, XDP modes, MTUs, and verified offload state. Treat untagged operation as a required supported mode. Exercise two different configured VLAN IDs, configurable parents, and multiple VLANs on a shared parent; verify selected configuration rather than relying on a fixed fixture ID.
  • Trace tenant IPv4/IPv6, gateway-to-backend, DSR return, compute-to-NAT, and NAT-to-compute directions. Observe tag-in-bytes and metadata cases where supported, cold/warm neighbors, direct redirects, and host-stack fallback, including NAT's re-encapsulated neighbor fallback.
  • Record logical adjacency versus FIB result and physical transmission, MAC/neighbor selection, tag insertion/removal, drop/pass/redirect outcomes, and gaps. Refine implementation tasks and effort estimates from measured evidence.

Acceptance

Lab runs deferred. Under #1399's 2026-11-30 decision, this PR delivers the real-kernel probe rig with executed results, the tagged lab-variant tooling (checked, not run), and the baseline report. The report answers each design question from the probe rig and source analysis and labels its basis. Lab-captured rows are marked deferred to #1405 and are not a merge gate here.

  • Baseline evidence separately identifies the public-side and fabric-side tag, logical adjacency, neighbor/FIB context, and actual transmit device. Captures at external router, public edge link, fabric link, and workload distinguish missing classification from egress/tagging failure; no same-VLAN-ID assumption hides a gap.
  • The untagged baseline uses no VLAN interfaces or VLAN IDs. Tagged baselines prove operator-selected IDs appear on the wire. Record configuration/discovery behavior and invalid-setting diagnostics, and characterize VLAN ID/parent changes and tagged-to-untagged transitions.
  • Reproducible commands and fixtures demonstrate each required baseline result with packet captures at sender, transport, and destination plus relevant counters/trace observations. A redirect verdict alone is not transmission evidence.
  • Report distinguishes source facts, historical observations, newly executed measurements, and unknowns. Unavailable hardware-only representations are tracked for qualification rather than marked passed.
  • Expected baseline failures are documented and attributable; each requires a linked implementation outcome or explicit contract exclusion, followed by passing final retests.
  • The delivering PR carries the baseline and discovery-gate decisions. No successful end-to-end or hardware support claim is made solely from mocked interface discovery.

Activity

  1. added theissue type on Nov 14, 2026
  2. changed the title [-]Characterize tagged TC and XDP forwarding in a reproducible lab[/-] [+]Characterize tagged and untagged TC and XDP forwarding[/+] on Nov 14, 2026
  3. privateip commented on Nov 30, 2026

    @privateip
    ContributorAuthor

    Approved plan

    Verdict: valid. The epic branch still has no tagged lab variant; deploy/containerlab builds untagged LACP bonds only. The contract from #1400 (docs/designs/vlan-transport/) assigns Q1 to Q6 in §10 to this task.

    Measurement tiers

    1. Probe rig (environment U). A test-only package, internal/plumbing/ebpf/vlanprobe/, holds a small probe program and a root test run by task test:unit-root. It skips when unprivileged, and no production binary imports it. The test builds network namespaces with veth NICs, an 802.3ad bond, VLANs 101 and 202 (including two VLANs on one parent) and 802.1ad and stacked negative cases, with rxvlan and txvlan on and off. It records:

      • native and generic XDP attach to a VLAN, a bond member and a bond (Q1);
      • where the tag is at XDP and at tc: packet data, skb metadata or the XDP VLAN metadata kfunc (Q2, Q3);
      • XDP_PASS delivery to the VLAN netdevice (Q2);
      • bpf_fib_lookup through a VLAN, and whether XDP and tc redirects to a VLAN transmit with the tag (Q4, Q5).
    2. Lab variant (environment L). It runs on one site of the containerlab lab: external router, edge node, compute node and the off-fabric host. scripts/vlan-transport.sh apply|capture|snapshot|revert with cells C1 to C6 in resources/vlan-transport/cells.env. VLAN IDs and parents are parameters; C4 runs a second time with different IDs. Each tagged cell runs two selections:

      • logical: names the VLAN netdevice, as the contract requires;
      • parent: names the parent, which shows how the real programs classify, bypass, drop or send each frame.

      The variant changes only live interfaces and DaemonSet environment, never config/. revert restores C1 and passes the site baseline.

    Rows

    Rows Method
    V01, V02, V03, V04, V05, V06, V07 Captured at the receiving end of each link: external router, public parent, fabric parents and the tenant veth. Counters: xmitdrops, neigh_fallbacks and drop reasons.
    V08 Two cells.
    V10 On the site whose conformance test covers local delivery.
    V11, V12, V13, V15 Raw-frame injection, as baseline observations.
    V14 Probe rig, plus a lab stretch.
    V17, V18, V19 Startup and readiness behaviour with valid and invalid selections.
    V21, V23, V24, V25, V27, V28 Untagged and tagged interruption baselines, sampled every 20 ms.

    Recorded as gaps

    Each expected failure maps to #1402, #1403 or #1404.

    Report

    docs/archive/benchmarks/vlan-transport-baseline-<date>.md, indexed and linked from the contract and acceptance matrix. It separates source facts, executed measurements and unknowns, and answers Q1 to Q6. Checked-in evidence uses lab documentation values only.

    Validation: task ci, task test:unit-root, task docs:check and shellcheck. The lab is restored to baseline after each run.

    The PR targets epic/1399-vlan-transport with a closing reference to this issue.

  4. self-assigned this
    on Nov 30, 2026
  5. privateip commented on Nov 30, 2026

    @privateip
    ContributorAuthor

    Delivered by #1536, merged into the epic branch epic/1399-vlan-transport as 8e67f49. The kernel probe (internal/plumbing/ebpf/vlanprobe) answered Q1–Q5, and Q6 is answered from the source. The report is docs/archive/benchmarks/vlan-transport-baseline-2026-11-30.md; it maps each expected failure to #1402, #1403 or #1404. The tagged lab-variant tooling is included but was not run; its lab rows run in #1405's end-of-epic pass, as #1399 decided. Closed by hand because Fixes only fires when the epic branch merges into main.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Fields

Priority

None yet

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions