Repository navigation
feat: 802.1Q VLAN tag insert/strip support - #36
Conversation
…test Add full 802.1Q VLAN support to the socket layer: - VlanConfig type with VLAN ID (0-4094), PCP priority (0-7), DEI - build_udp_frame_into_vlan() for VLAN-tagged frame construction - parse_udp_packet/parse_udp_packet_ref transparently handle VLAN tags - verify_ipv4_checksum/verify_udp_checksum work on VLAN-tagged frames - process_frame_zerocopy dispatches ARP/ICMP/UDP correctly for tagged frames - ARP and ICMP parsers handle VLAN-tagged frames via detect_vlan() helper - Per-socket VLAN config via set_vlan()/vlan() and NetworkConfig::with_vlan() - UdpSocketBuilder applies VLAN config from NetworkConfig - 16 new unit tests covering build/parse/checksum/roundtrip/config Also adds Tier 4 jumbo frame echo integration test that exercises the jumbo frame feature (PR #32) with 1400/4000/8000-byte payloads on EC2. https://claude.ai/code/session_01Tumf1bXMixEaMKzgLvcBbD
[CI] Stage: DeployInfrastructure ready.
|
[CI] Stage: SummaryAll tests PASSED. ARP seeding: kernel /proc/net/arp (automatic)
|
✅ Integration Tests Passed (Run 24312137815)Branch: Test Results
Application Logs (last 20 lines)receiver-echo-server.log sender-echo-server.log sender-test-client.log receiver-test-client-iperf.log sender-test-client-iperf.log Full Application Logs (last 200 lines each)receiver-echo-server.logsender-echo-server.logsender-test-client.logreceiver-test-client-iperf.logsender-test-client-iperf.log
|
…ring Add VlanMode enum matching Linux 8021q subinterface semantics: - Access: RX accepts untagged + matching VID (strip), TX sends untagged - Trunk: RX accepts allowed VID set + optional native VLAN, TX tags - PortTagging (default): RX only matching VID (strip), TX always tags RX filtering in process_frame_zerocopy drops frames before protocol dispatch (ARP/ICMP/UDP) based on the configured mode. TX path in send_to_addr respects mode: Access sends untagged, Trunk/PortTagging send tagged. 28 new unit tests covering all mode/frame combinations. https://claude.ai/code/session_01Tumf1bXMixEaMKzgLvcBbD
Measures process_frame_zerocopy throughput across all VLAN modes: - No config baseline: ~839K PPS (untagged) - PortTagging/Access/Trunk: ~760-853K PPS (<10% overhead) - DROP paths: >11M PPS (early reject) Run with: cargo test -p dpdk-stdlib-udp -- --nocapture vlan_pps_benchmark https://claude.ai/code/session_01Tumf1bXMixEaMKzgLvcBbD
[Perf] Stage: DeployDeploying |
Synthetic benchmark shows ~9-10% CPU overhead for VLAN-tagged frames. Hardware TRex results pending from perf-tests workflow. https://claude.ai/code/session_01Tumf1bXMixEaMKzgLvcBbD
Include VLAN PPS benchmark in every perf-test-log entry going forward. Runs in ~5s alongside cargo test, no hardware needed. https://claude.ai/code/session_01Tumf1bXMixEaMKzgLvcBbD
[CI] Stage: DeployInfrastructure ready.
|
[Perf] Stage: Instances Ready
|
[Perf] Stage: TRex ConfigStarting TRex configuration (MAC discovery + NIC binding)... |
[Perf] Stage: TRex Config OK
|
[Perf] Stage: TRex StartedTRex server running. Beginning benchmarks... |
[Perf] DUT ReadyDUT instance |
[Perf] Stage: Benchmark (1/4)Running |
[Perf] Benchmark Diag:
|
[Perf] Benchmark Diag:
|
[Perf] Stage: Benchmark (2/4)Running |
[Perf] Benchmark Diag:
|
[CI] Stage: SummaryAll tests PASSED. ARP seeding: kernel /proc/net/arp (automatic)
|
✅ Integration Tests Passed (Run 24312929132)Branch: Test Results
Application Logs (last 20 lines)receiver-echo-server.log sender-echo-server.log sender-test-client.log receiver-test-client-iperf.log sender-test-client-iperf.log Full Application Logs (last 200 lines each)receiver-echo-server.logsender-echo-server.logsender-test-client.logreceiver-test-client-iperf.logsender-test-client-iperf.log
|
Explains how DPDK port 0 is selected by default (PCI bus order), when explicit port selection is needed, and provides code examples for all backend configurations including DPDK port selection, AF_PACKET, MMAP, VLAN, and routing via the builder API. https://claude.ai/code/session_01Tumf1bXMixEaMKzgLvcBbD
[Perf] Benchmark Diag:
|
[Perf] Stage: Benchmark (3/4)Running |
[Perf] Benchmark Diag:
|
[CI] Stage: DeployInfrastructure ready.
|
[Perf] Benchmark Diag:
|
[Perf] Stage: Benchmark (4/4)Running |
[Perf] Benchmark Diag:
|
[Perf] Benchmark Diag:
|
[Perf] Diag: testpmd logtestpmd output (last 30 lines) |
No performance regression from 802.1Q VLAN changes. rust-dpdk delivers 690K RX at 700K PPS (1.3% drop) vs kernel's 399K (42.9% drop) — 1.73x throughput advantage. Within 0.6% of native C DPDK (695K RX). https://claude.ai/code/session_01Tumf1bXMixEaMKzgLvcBbD
[Perf] Stage: Results[19:02:04] INFO Generating markdown summary... Performance Test Results — unknownCommit: 64B packets
512B packets
1400B packets
8500B packets
NIC Drops Instrumentation Self-CheckCompares
plain-rust Kernel NIC Drops (ethtool -S delta)ethtool snapshots not available — baseline or final file missing in |
[CI] Stage: SummarySome tests FAILED (exit code: 1). ARP seeding: kernel /proc/net/arp (automatic)
|
Integration Test Failure (Run 24313040593)Branch: No failure-summary.json found receiver-user-data.log (8237 bytes, last 80 lines)sender-user-data.log (8237 bytes, last 80 lines)receiver-console-output.log (32733 bytes, last 80 lines)sender-console-output.log (33280 bytes, last 80 lines)All instance-logs files |
❌ Integration Tests Failed (Run 24313040593)Branch: Test Results
Application Logs (last 20 lines)receiver-echo-server.log sender-echo-server.log sender-test-client.log receiver-test-client-iperf.log sender-test-client-iperf.log Full Application Logs (last 200 lines each)receiver-echo-server.logsender-echo-server.logsender-test-client.logreceiver-test-client-iperf.logsender-test-client-iperf.log
|
[CI] Stage: DeployInfrastructure ready.
|
[CI] Stage: SummaryAll tests PASSED. ARP seeding: kernel /proc/net/arp (automatic)
|
✅ Integration Tests Passed (Run 24314062570)Branch: Test Results
Application Logs (last 20 lines)receiver-echo-server.log sender-echo-server.log sender-test-client.log receiver-test-client-iperf.log sender-test-client-iperf.log Full Application Logs (last 200 lines each)receiver-echo-server.logsender-echo-server.logsender-test-client.logreceiver-test-client-iperf.logsender-test-client-iperf.log
|
ROADMAP item #36: EC2 integration test CI jobs with non-blocking TCP. Changes: 1. TCP tier orchestration (scripts/run-integration-tests.sh): - Added run_tcp_tier1, run_tcp_tier2, run_tcp_tier3 functions - TCP tier 1: handshake, echo, shutdown (DPDK<->DPDK) - TCP tier 2: retransmission under loss, flow control/persist probes - TCP tier 3: kernel interop (ncat/iperf3), std-parity - Extended --tier filter to accept tcp1, tcp1a, tcp2, tcp3 - TCP tiers run after UDP tier 4 when no filter is specified - tcp_cleanup_processes() kills stale DPDK processes before/between TCP tests to prevent /dev/vfio/noiommu-0 busy errors - DELETE_FAILED stack state recovery before CDK deploy 2. Non-blocking exit code (print_summary): - TCP test results (*tcp*.xml) excluded from exit code - TCP failures reported but don't block CI 3. Dedicated TCP workflow (scripts/ci/tcp-integration-tests.yml): - Ready-to-activate workflow with continue-on-error: true - Blocked by PAT lacking 'workflow' scope; staged for manual move 4. CI workflow fixes (.github/workflows/integration-tests.yml): - Exclude TCP tier XMLs from dorny fail-on-error reporter - Only UDP tier patterns in path glob (TCP handled separately) 5. tier1-tcp-echo.sh: accept server/client role aliases (was listener/sender), fixing 'Invalid role' errors that prevented TCP echo tests from running 6. ROADMAP housekeeping: ticked #35 (PR #117), tasks 15.2-15.4 Spec: .kiro/specs/tcp-support/ tasks 15.4, 16.1
ROADMAP item #36: EC2 integration test CI jobs with non-blocking TCP. Changes: 1. TCP tier orchestration (scripts/run-integration-tests.sh): - Added run_tcp_tier1, run_tcp_tier2, run_tcp_tier3 functions - TCP tier 1: handshake, echo, shutdown (DPDK<->DPDK) - TCP tier 2: retransmission under loss, flow control/persist probes - TCP tier 3: kernel interop (ncat/iperf3), std-parity - Extended --tier filter to accept tcp1, tcp1a, tcp2, tcp3 - TCP tiers run after UDP tier 4 when no filter is specified - tcp_cleanup_processes() kills stale DPDK processes before/between TCP tests to prevent /dev/vfio/noiommu-0 busy errors - DELETE_FAILED stack state recovery before CDK deploy 2. Non-blocking exit code (print_summary): - TCP test results (*tcp*.xml) excluded from exit code - TCP failures reported but don't block CI 3. Dedicated TCP workflow (scripts/ci/tcp-integration-tests.yml): - Ready-to-activate workflow with continue-on-error: true - Blocked by PAT lacking 'workflow' scope; staged for manual move 4. CI workflow fixes (.github/workflows/integration-tests.yml): - Exclude TCP tier XMLs from dorny fail-on-error reporter - Only UDP tier patterns in path glob (TCP handled separately) 5. tier1-tcp-echo.sh: accept server/client role aliases (was listener/sender), fixing 'Invalid role' errors that prevented TCP echo tests from running 6. ROADMAP housekeeping: ticked #35 (PR #117), tasks 15.2-15.4 Spec: .kiro/specs/tcp-support/ tasks 15.4, 16.1
ROADMAP item #36: EC2 integration test CI jobs with non-blocking TCP. Changes: 1. TCP tier orchestration (scripts/run-integration-tests.sh): - Added run_tcp_tier1, run_tcp_tier2, run_tcp_tier3 functions - TCP tier 1: handshake, echo, shutdown (DPDK<->DPDK) - TCP tier 2: retransmission under loss, flow control/persist probes - TCP tier 3: kernel interop (ncat/iperf3), std-parity - Extended --tier filter to accept tcp1, tcp1a, tcp2, tcp3 - TCP tiers run after UDP tier 4 when no filter is specified - tcp_cleanup_processes() kills stale DPDK processes before/between TCP tests to prevent /dev/vfio/noiommu-0 busy errors - DELETE_FAILED stack state recovery before CDK deploy 2. Non-blocking exit code (print_summary): - TCP test results (*tcp*.xml) excluded from exit code - TCP failures reported but don't block CI 3. Dedicated TCP workflow (scripts/ci/tcp-integration-tests.yml): - Ready-to-activate workflow with continue-on-error: true - Blocked by PAT lacking 'workflow' scope; staged for manual move 4. CI workflow fixes (.github/workflows/integration-tests.yml): - Exclude TCP tier XMLs from dorny fail-on-error reporter - Only UDP tier patterns in path glob (TCP handled separately) 5. tier1-tcp-echo.sh: accept server/client role aliases (was listener/sender), fixing 'Invalid role' errors that prevented TCP echo tests from running 6. ROADMAP housekeeping: ticked #35 (PR #117), tasks 15.2-15.4 Spec: .kiro/specs/tcp-support/ tasks 15.4, 16.1
## Summary Implements ROADMAP item #36: **dpdk-stdlib-tcp: EC2 CI jobs and remove continue-on-error gate**. Spec: `.kiro/specs/tcp-support/` tasks 15.4, 16.1 ### Changes **`integration-tests.yml`:** - Added `tcp-synthetic-perf` job: runs `tcp-synthetic-bench` (mock PacketBackend, no AWS needed) on every PR. Posts markdown results as a PR comment. Uploads results as artifacts with 30-day retention. - Added `tcp-integration-tests` job with `continue-on-error: true`: runs the full TCP test suite (tier1-tcp-handshake, tier1-tcp-echo, tier1-tcp-shutdown, tier2-tcp-retransmit, tier2-tcp-flow-control, tier3-tcp-kernel-interop, tier3-tcp-std-parity) on EC2. Uses `dorny/test-reporter` for PR checks UI. Posts structured PR comments with pass/fail/skip counts, app logs, and network state. Uploads JUnit XML + instance logs with 30-day retention. **`scripts/run-integration-tests.sh`:** - Added `--tier tcp-full` option for running the complete TCP test suite. - Added `run_tcp_full()` orchestrator function that sequences all TCP test tiers with proper ENI bind/unbind between each. - Added `_run_tcp_dpdk_pair()` helper (server/client roles) and `_run_tcp_dpdk_pair_lr()` helper (listener/sender roles) for DPDK↔DPDK tests. - Added `_run_tcp_kernel_interop()` helper for kernel↔DPDK tests. ### Task 16.1 (gate removal) The `continue-on-error: true` gate stays until ≥10/10 recent scheduled CI runs pass all MVP requirements. Recent runs show TCP tests are not yet passing consistently — gate removal will be a follow-up once the TCP stack matures. ### Tests - `cargo build && cargo test` pass locally (all 394+ tests, 0 failures) - This is a CI/scripts-only change — no Rust code modified --------- Co-authored-by: Agent Router <agent@agent-router.dev>
## Summary Marks ROADMAP item #36 (**dpdk-stdlib-tcp: EC2 CI jobs and remove continue-on-error gate**) as complete. ### Context The implementation was delivered in PR #120 (merged to development), which added: - `tcp-integration-tests` job with `continue-on-error: true` - PR comments with pass/fail/skip counts, app logs, network state - JUnit XML artifacts with 30-day retention - `dorny/test-reporter` for PR checks UI However, PR #120 did not update ROADMAP.md or tasks.md. This PR closes that gap. ### Changes - **ROADMAP.md**: Mark item #36 as `[x] Complete · PR: #120` - **tasks.md**: Mark task 15.4 as complete ### Task 16.1 (gate removal) Task 16.1 (remove `continue-on-error: true`) remains unchecked. The prerequisite (≥10/10 recent TCP CI runs passing) is not yet met — recent runs show TCP integration tests still failing. Gate removal will happen in a future session once the TCP stack matures. ### Tests - `cargo build && cargo test` pass (all tests ok, 0 failures) - Docs-only change — no Rust code modified Co-authored-by: Agent Router <agent@agentrouter.dev>
Summary
set_vlan()or throughNetworkConfig::with_vlan().Changes
VLAN (802.1Q) Implementation
VlanConfigtype with builder pattern (VlanConfig::new(100).with_priority(3).with_dei(true))build_udp_frame_into_vlan()— frame builder with 4-byte VLAN tag insertiondetect_vlan()helper — determines L3 offset for both tagged and untagged framesparse_udp_packet/parse_udp_packet_refto handle VLAN-tagged frames (returnsvlan_id: Option<u16>)verify_ipv4_checksum/verify_udp_checksumfor correct VLAN offsetsprocess_frame_zerocopyto dispatch ARP/ICMP/UDP correctly for tagged framesparse_arp_packet) and ICMP parsers (parse_icmp_packet,parse_icmp_error) for VLANUdpSocket::set_vlan()/vlan()for per-socket VLAN configNetworkConfig::with_vlan()for builder-based configIntegration Test
tier4-jumbo-echo.sh— sends 1400B, 4000B, 8000B payloads via DPDK echorun-integration-tests.shas Tier 4Test plan
cargo buildpasses (all crates)cargo testpasses (321 tests, 0 failures, including 16 new VLAN tests)https://claude.ai/code/session_01Tumf1bXMixEaMKzgLvcBbD