IPv6: SocketAddrV6 through UdpSocket#62
Conversation
Implement IPv6 sub-task 3 from the roadmap: SocketAddrV6 through UdpSocket. Changes: - bind() now accepts IPv6 addresses ([::]:port, [2001:db8::1]:port, etc.) - send_to() builds IPv6/UDP frames when destination is SocketAddrV6 - recv_from() already returned SocketAddrV6 (RX path was done); now the socket can be bound to IPv6 so the full path works end-to-end - connect()/peer_addr()/local_addr() work with IPv6 addresses - Added AddressFamily enum (IPv4/IPv6) and address_family() accessor - Added set_only_v6()/only_v6() socket option (IPV6_V6ONLY equivalent) - When only_v6 is true, IPv4 frames are rejected in process_frame_zerocopy - Added NdpHandler field for IPv6 neighbor resolution on TX path - Gratuitous NA sent on bind for IPv6 sockets (parallel to GARP for IPv4) - bind_with_backend() also accepts IPv6 addresses 18 new tests covering: - bind with various IPv6 addresses (unspecified, specific, loopback, link-local) - connect with IPv6 peer - send_to with IPv6 destination - recv_from returning V6 source address - set_only_v6/only_v6 accessors - only_v6 filtering (rejects IPv4, accepts IPv6) - address_family accessor - connected socket filtering with IPv6 - roundtrip (bind V6 + receive V6 frame)
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
Avg sync/async ratio: 0.9x, worst: 1.0x
|
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
Avg sync/async ratio: 0.9x, worst: 1.0x
|
[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)
|
[Perf] Stage: DeployDeploying |
✅ Integration Tests Passed (Run 26632384723)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 |
[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) |
Performance test results from GH Actions run 26633424088: - rust-dpdk 700K/64B: 695,587 RX (0.6% drop) — no regression vs Run #25 - rust-dpdk 700K/512B: 693,903 RX (0.9% drop) — no regression - tokio-dpdk caps at ~311K PPS — unchanged - native-dpdk baseline: 698,590 at 700K/64B Conclusion: IPv6 socket address support is performance-neutral.
[Perf] Stage: Results[11:54:11] 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
Avg sync/async ratio: 0.9x, worst: 1.0x
|
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
Avg sync/async ratio: 1.0x, worst: 1.1x
|
[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 26635758677)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
IPv6 sub-task 3:
SocketAddrV6throughUdpSocket—bind/send_to/recv_from/connect/local_addr/peer_addraccept and return IPv6 addresses.set_only_v6/only_v6socket option.AddressFamilystate on the socket so the send/recv paths pick the right wire format.Changes
bind()now accepts IPv6 addresses ([::]:port,[2001:db8::1]:port, etc.)send_to()builds IPv6/UDP frames when destination isSocketAddrV6, usingbuild_udp6_frame_intoand NDP for neighbor resolutionrecv_from()already returnedSocketAddrV6(RX path was done in prior PRs); now the socket can be bound to IPv6 so the full path works end-to-endconnect()/peer_addr()/local_addr()work with IPv6 addressesAddressFamilyenum (IPv4/IPv6) andaddress_family()accessorset_only_v6()/only_v6()socket option (IPV6_V6ONLYequivalent) — when true, IPv4 frames are rejectedNdpHandlerfield on socket for IPv6 neighbor resolution on TX pathbind_with_backend()also accepts IPv6 addressesTests Added
18 new unit tests (625 total, all passing):
Tradeoffs
set_only_v6(true)to restrict./proc/net/ipv6/routeyet). MTU is inherited from the DPDK port config.