Extract dpdk-stdlib-net shared crate#65
Conversation
Move PacketBackend trait, BackendConfig, BackendType, DpdkBackend, RawSocketBackend, ring_buffer, ipv4_checksum, and udp_pseudo_header_checksum from dpdk-udp into the new dpdk-stdlib-net crate. Add NeighborResolver trait and ArpResolver implementation. dpdk-udp re-exports all moved items for backward compatibility. dpdk-stdlib-tcp skeleton crate added to workspace (depends on dpdk-stdlib-net, NOT dpdk-udp). No behavior change — all 704 existing tests pass.
Add RxReadiness enum (Fd/PollOnly/Condvar) and rx_readiness() method to the PacketBackend trait. This enables the TCP engine loop to adapt its wait strategy per backend: epoll for AF_PACKET, busy-poll for DPDK, condvar wait for stubs/tests. - DpdkBackend returns PollOnly - RawSocketBackend returns Fd(socket_fd) - SyntheticBackend (bench) returns PollOnly All 704 tests pass.
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.1x | IPv6 vs IPv4 worst ratio: 1.48x (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.1x | IPv6 vs IPv4 worst ratio: 1.31x (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 27028139038)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[18:38:57] 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.32x (OK)
|
[CI] Stage: DeployInfrastructure ready.
|
[CI] Stage: DeployInfrastructure ready.
|
[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 |
[CI] Stage: SummaryAll tests PASSED. ARP seeding: kernel /proc/net/arp (automatic)
|
✅ Integration Tests Passed (Run 27035725623)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
Implements Roadmap Item #1: Extract
dpdk-stdlib-netshared crate.Changes
Commit 1.1a — Crate extraction + re-exports (no behavior change)
dpdk-stdlib-netcrate with:PacketBackendtrait,BackendConfig,BackendType,create_backend()DpdkBackendimplementationRawSocketBackendimplementationring_buffer(PACKET_MMAP structures)ipv4_checksum()andudp_pseudo_header_checksum()helpersNeighborResolvertrait +ArpResolver(with gateway-MAC support)dpdk-udpmodules replaced with re-exports fromdpdk-stdlib-netdpdk-stdlib-tcpskeleton crate added (depends ondpdk-stdlib-net, NOTdpdk-udp)Cargo.tomlupdated with both new membersCommit 1.1b — Add
rx_readiness()to traitRxReadinessenum (Fd/PollOnly/Condvar) toPacketBackendtraitDpdkBackend→PollOnly(dedicated-core busy-poll)RawSocketBackend→Fd(socket_fd)(epoll-compatible)SyntheticBackend(bench) →PollOnlyTests
dpdk-stdlib-net(backend, checksum, neighbor, ring_buffer)dpdk-stdlib-tcpdepends ondpdk-stdlib-net, notdpdk-udpTradeoffs