Repository navigation
dpdk-stdlib-tcp: Contract types, TcpState, Clock, and IsnGenerator - #80
Conversation
Implement spec tasks 5.1, 5.2, 5.3, 5.4 for roadmap item #16. New modules: - state.rs: TcpState enum (11 states) + FourTuple - clock.rs: Clock trait, SystemClock, MockClock (deterministic testing) - isn.rs: IsnGenerator per RFC 6528 (SipHash-2-4 + per-boot secret) - contract.rs: ConnectionHandle, EngineCommand, SocketOption, CommandSender, OneshotSender/Receiver, EngineWakeup, AtomicWaker Dependencies added: getrandom, siphasher. All 65 TCP tests pass (55 unit + 10 property).
Synthetic Performance Results — Graviton (run)Commit: ✅ synthetic UDP socket bound to 10.0.0.1:9000 (MAC: 02:00:00:00:00:01) Synthetic UDP Performance ResultsMeasures framework overhead: sync IPv4 Baseline
IPv6
IPv6 vs IPv4 Comparison (sync path)
IPv4 avg sync/async ratio: 0.9x, worst: 1.0x | IPv6 vs IPv4 worst ratio: 1.32x (OK)
|
Synthetic Performance Results (run)Commit: ✅ synthetic UDP socket bound to 10.0.0.1:9000 (MAC: 02:00:00:00:00:01) Synthetic UDP Performance ResultsMeasures framework overhead: sync IPv4 Baseline
IPv6
IPv6 vs IPv4 Comparison (sync path)
IPv4 avg sync/async ratio: 0.9x, worst: 1.0x | IPv6 vs IPv4 worst ratio: 1.32x (OK)
|
[CI] Stage: DeployInfrastructure ready.
|
[CI] Stage: DeployInfrastructure ready.
|
[CI] Stage: SummaryAll tests PASSED. ARP seeding: kernel /proc/net/arp (automatic)
|
1 similar comment
[CI] Stage: SummaryAll tests PASSED. ARP seeding: kernel /proc/net/arp (automatic)
|
✅ Integration Tests Passed — Graviton (run)Branch: Test Results
Application Logs (last 20 lines)receiver-echo-server.log sender-echo-server.log sender-test-client.log |
[Perf] Stage: DeployDeploying |
✅ Integration Tests Passed (Run 27475357505)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
|
[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:
|
[Perf] Benchmark Diag:
|
[Perf] Stage: Benchmark (3/4)Running |
[Perf] Benchmark Diag:
|
[Perf] Benchmark Diag:
|
[Perf] Stage: Benchmark (4/4)Running |
[Perf] Benchmark Diag:
|
[Perf] Benchmark Diag:
|
[Perf] Diag: testpmd logtestpmd output (last 30 lines) |
[Perf] Stage: Results[19:55:06] 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 |
Synthetic Performance Results (run)Commit: ✅ synthetic UDP socket bound to 10.0.0.1:9000 (MAC: 02:00:00:00:00:01) Synthetic UDP Performance ResultsMeasures framework overhead: sync IPv4 Baseline
IPv6
IPv6 vs IPv4 Comparison (sync path)
IPv4 avg sync/async ratio: 0.9x, worst: 1.0x | IPv6 vs IPv4 worst ratio: 1.32x (OK)
|
Synthetic Performance Results — Graviton (run)Commit: ✅ synthetic UDP socket bound to 10.0.0.1:9000 (MAC: 02:00:00:00:00:01) Synthetic UDP Performance ResultsMeasures framework overhead: sync IPv4 Baseline
IPv6
IPv6 vs IPv4 Comparison (sync path)
IPv4 avg sync/async ratio: 0.9x, worst: 1.0x | IPv6 vs IPv4 worst ratio: 1.29x (OK)
|
[CI] Stage: DeployInfrastructure ready.
|
[CI] Stage: DeployInfrastructure ready.
|
[CI] Stage: SummaryAll tests PASSED. ARP seeding: kernel /proc/net/arp (automatic)
|
1 similar comment
[CI] Stage: SummaryAll tests PASSED. ARP seeding: kernel /proc/net/arp (automatic)
|
✅ Integration Tests Passed (Run 27477428925)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
|
✅ Integration Tests Passed — Graviton (run)Branch: Test Results
Application Logs (last 20 lines)receiver-echo-server.log sender-echo-server.log sender-test-client.log |
Roadmap Item
Implements #16:
dpdk-stdlib-tcp: Contract types, TcpState, Clock, and IsnGeneratorSpec tasks: 5.1, 5.2, 5.3, 5.4
Changes
Four new source modules in
dpdk-stdlib-tcp/src/:TcpStateenum (11 states per RFC 9293) +FourTuple(Hash, Eq, serializable to bytes)Clocktrait +SystemClock+MockClock(withadvance()/set()for deterministic testing)IsnGeneratorper RFC 6528 (128-bit per-boot secret via getrandom, SipHash-2-4 of FourTuple, M = elapsed µs / 4)ConnectionHandle(SPSC rings, atomic state, condvar wake, AtomicWaker),EngineCommandenum,SocketOptionenum,CommandSender(wraps mpsc + EngineWakeup signal),OneshotSender/OneshotReceiver,EngineWakeup,AtomicWakerUpdated
lib.rswith module declarations andCargo.tomlwithgetrandom+siphasherdependencies.Tests
Tradeoffs
AtomicWakerusesMutex<Option<Waker>>for simplicity (no unsafe, no external dep). Sufficient for MVP; can be replaced with lock-free implementation if contention is measured.EngineWakeupuses AtomicBool + Condvar (portable). Linux eventfd optimization deferred to engine loop implementation.OneshotSender/OneshotReceiveravoid tokio dependency per spec (CI enforces no tokio dep in dpdk-stdlib-tcp).