Skip to content

test: Measure how XDP and tc handle tagged transport - #1536

Merged
privateip merged 4 commits into
epic/1399-vlan-transportfrom
feat/issue-1401
Nov 30, 2026
Merged

privateip merged 4 commits into
epic/1399-vlan-transportfrom
feat/issue-1401

Conversation

@privateip

@privateip privateip commented Nov 30, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #1401

Summary

This records how the kernel and today's datapath handle an 802.1Q-tagged transport side, before the epic changes any forwarding code. A root-only probe test measured the kernel. A baseline report answers the contract's six open questions, labelling each answer probe-measured or source-inferred, and maps each expected failure to #1402, #1403 or #1404. CI's root job reran the probe on kernel 7.0.0 and matched every tag observation, but its receiver accepted none of the redirected test packets, so the redirect answers rest on what reached the wire. Lab tooling for tagged sjc cells is included but has not run; the epic moved every lab row to the end-of-epic pass in #1405.

Test plan

@privateip privateip self-assigned this Nov 30, 2026
@privateip

Copy link
Copy Markdown
Contributor Author

Where things are and how they were checked

Part Location
Kernel probe internal/plumbing/ebpf/vlanprobe (TestVLANTransportProbe, testdata/probe.c)
Lab variant deploy/containerlab/scripts/vlan-transport.sh, resources/vlan-transport/cells.env, row runners vlan-transport-{baseline,inject,interrupt}.sh and vlan-inject.py, Taskfile variant:vlan-transport:* and baseline:vlan-transport, README "Tagged transport variant"
Pinning override UPLINK_DEV in verify-gateway-ingress{,-ipv4}.sh and EDGE_CONFORMANCE_UPLINK_DEV in tests/edgeconformance/listener_test.go, so a VIP can be pinned through a VLAN on the transit router
Report docs/archive/benchmarks/vlan-transport-baseline-2026-11-30.md, linked from the archive index, the contract's section 10 and the acceptance matrix
Check Result
Probe as root (go test -c binary in a privileged fabric-router container, VLANPROBE_OBJ prebuilt) Passed twice, with identical outcomes
golangci-lint v2.12.2 (task lint, isolated cache) 0 issues
yamlfmt -lint Passed
task test:unit Passed; the probe skips unprivileged
task docs:check Passed, 139 files
shellcheck v0.10.0 on the new scripts and both gateway verify scripts Clean
vlan-transport.sh plan for C1 to C4 and C6, both selections, IDs 1234/3456, and dfw-worker3 C2 Printed the expected interfaces; rejected VLAN IDs 0, 4095 and abc, cell C5 and an unknown selection
task test:unit-root, task test:e2e, lab, hardware Not run locally. Root tests ran in a container instead of through the task. Lab and hardware are deferred to #1405 and #1406

@privateip privateip changed the title Measure how XDP and tc handle tagged transport before the VLAN work test: Measure how XDP and tc handle tagged transport Nov 30, 2026
Add a root-only characterization test for the transport contract's
questions Q1 to Q5. It builds veth and 802.3ad bond parents with VLANs
101 and 202 in throwaway network namespaces, attaches small probe
programs at XDP and tc, and records which attach modes a VLAN netdevice
accepts, where the tag sits at each hook with VLAN offloads on and off,
whether the XDP VLAN metadata kfunc separates two VLANs on one parent,
what bpf_fib_lookup returns through a VLAN, and what XDP and tc
redirects toward a VLAN put on the wire.

The probe object is compiled when the test runs, the package has no
non-test code, and the test skips unless run as root. Its assertions are
positive controls only; VLANPROBE_REPORT writes every observation.
The lab builds untagged bonds only. Add scripts/vlan-transport.sh, which
moves sjc's public and fabric sides between 802.1Q and untagged
transport at run time for the contract's cells C1 to C4 and C6, points
the gateway, NAT and CNI DaemonSets at the chosen interfaces, and
reverts to the deployed settings. A plan subcommand prints the changes
without a lab. VLAN IDs and parents come from cells.env or PUB_VID and
FAB_VID, never from the scripts.

Add the row runners that record a cell's baseline with captures on
every link, the isolation injector, and the interruption prober, plus
Taskfile targets and a README section. The gateway verify scripts and
the listener conformance test accept an override for tr's device so
they can pin a VIP through a VLAN.
Answer the contract's questions Q1 to Q6 from the kernel probe and from
source, labelling each answer, and record the expected result of every
packet path on main, the owner of each expected failure, the gaps, and
proposed task refinements. Every lab row is deferred to the epic's
end-of-epic lab pass and none is reported as passed.

Link the report from the evidence archive, the contract and the
acceptance matrix.

The probe also ran in CI's root unit-test job on kernel 7.0.0. It saw
the same tag representation at every hook and on every wire, but its
receiver accepted none of the redirected datagrams, including untagged
ones, so the Q4 and Q5 answers rest on the wire observations.
@privateip
privateip marked this pull request as ready for review November 30, 2026 18:46
@privateip
privateip requested a review from a team as a code owner November 30, 2026 18:46
@privateip
privateip merged commit 8e67f49 into epic/1399-vlan-transport Nov 30, 2026
25 checks passed
@privateip

Copy link
Copy Markdown
Contributor Author

Review

Pass Reviewer Verdict Ran
1, head f4294360 adversarial merge, after two hedges go vet, go test (the probe skipped unprivileged), bash -n on the scripts, and checks of the cited source lines and doc links
1, head f4294360 conventions hold PR metadata, collisions with open PRs, and a trial merge with #1535
2, head bb2898cc re-review of fixes hold, on commit-message nits only shellcheck 0.10.0 on all six scripts (clean), and the CI root job log, which shows TestVLANTransportProbe ran and passed on kernel 7.0.0
2, head bb2898cc conventions merge PR metadata and collisions
3, head 97d25ae3 re-review of the restack merge Tree identical to bb2898cc, signed commits, no trailers
3, head 97d25ae3 conventions merge A collision check with #1532 and the body; asked for one Summary sentence on the CI probe run and two comment trims, both applied in c416dc8b

Fixed:

  • the title prefix;
  • the Summary and Test plan in the body;
  • em dashes in the script headers;
  • the report now records the CI kernel's probe run;
  • the fix-up commits are folded into three logical commits. The tree is identical to the reviewed bb2898cc;
  • c416dc8b trims two comments that repeat the README, and the body now notes the CI probe run.

Open:

@privateip
privateip deleted the feat/issue-1401 branch November 30, 2026 18:47
privateip added a commit that referenced this pull request Dec 2, 2026
test: Measure how XDP and tc handle tagged transport
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant