Repository navigation
feat(tcp): sync socket — engine loop and DpdkTcpStream - #91
Conversation
Implement tasks 8.1, 8.2, 8.3 from .kiro/specs/tcp-support/: - engine_loop(backend, engine, cmd_rx, wakeup): select on rx_readiness | engine_wakeup | timer_deadline; dispatch parse_tcp_packet→on_segment, cmd_rx→on_command, on_tick; send outbound frames via backend.send_frame. - connect_v4 + connect_timeout: resolve dst_mac via NeighborResolver, create ConnectionHandle, send EngineCommand::Connect, park on oneshot response. - DpdkTcpStream: io::Read with P0-B recheck-under-lock, io::Write with push to tx_ring + signal engine_wakeup + block if full, honor set_nonblocking (WouldBlock) and read/write timeouts (condvar.wait_timeout), Drop sends Close on last handle. Also adds clock() and next_timer_deadline() to TcpEngine, and wakeup() accessor to CommandSender.
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.1x | IPv6 vs IPv4 worst ratio: 1.33x (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.30x (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 |
✅ Integration Tests Passed (Run 27756733016)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: DeployDeploying |
[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[13:05:03] 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.33x (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.33x (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 27761477447)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
#27 dpdk-stdlib-tcp: Sync socket — engine loop and DpdkTcpStreamSpec:
.kiro/specs/tcp-support/· tasks 8.1, 8.2, 8.3Changes
engine_loop (task 8.2)
rx_readiness|engine_wakeup| timer deadlineparse_tcp_packet→on_segment,cmd_rx.try_recv()→on_command,on_tick(clock.now())RxReadinessvariants (Condvar/PollOnly/Fd)backend.send_frameconnect_v4 + connect_timeout (task 8.1)
NeighborResolver.resolve()ConnectionHandlewith SPSC ringsEngineCommand::Connectwith resolved MACsconnect_timeoutusesrecv_timeoutfor bounded waitDpdkTcpStream (task 8.3)
io::Readwith P0-B recheck-under-lock pattern (check error → try rx_ring.read → check eof → lock notify_lock → recheck → condvar.wait)io::Writewith push to tx_ring, signal engine_wakeup, block if fullset_nonblocking(→WouldBlock) andread_timeout/write_timeout(condvar.wait_timeout →TimedOut)Drop→ decrement app_refcount → send Close on last handleSupporting changes
clock()andnext_timer_deadline()toTcpEnginewakeup()accessor toCommandSenderTests Added
12 new unit tests covering:
Validation
cargo build && cargo test: all 1007 workspace tests pass