ICMPv6 error handling#58
Conversation
Implement ICMPv6 error message parsing and handling (IPv6 roadmap task 8): - Destination Unreachable (type 1): no route, admin prohibited, beyond scope, address unreachable, port unreachable - Packet Too Big (type 2): carries Next-Hop MTU - Time Exceeded (type 3): hop limit exceeded, fragment reassembly - Parameter Problem (type 4): erroneous header, unrecognized next header Adds: - Icmpv6ErrorInfo struct with to_io_error() mapping (mirrors IcmpErrorInfo) - parse_icmpv6_error() extracts original IPv6+UDP headers from error payload - Icmpv6Action enum (Reply | Error) paralleling IcmpAction - process_icmpv6_full() on Icmpv6Handler for combined echo+error handling - RX path integration: errors matched to socket via original src port, queued via existing error_queue/take_error() infrastructure 24 new tests covering all error types, edge cases, io::Error mappings, handler routing, and a synthetic parse performance benchmark.
Implement ICMPv6 error message parsing and handling (IPv6 roadmap task 8): - Destination Unreachable (type 1): no route, admin prohibited, beyond scope, address unreachable, port unreachable - Packet Too Big (type 2): carries Next-Hop MTU - Time Exceeded (type 3): hop limit exceeded, fragment reassembly - Parameter Problem (type 4): erroneous header, unrecognized next header Adds Icmpv6ErrorInfo, parse_icmpv6_error(), Icmpv6Action enum, process_icmpv6_full() on Icmpv6Handler, and RX path integration via the existing error_queue/take_error() infrastructure. 24 new tests, no performance regression (Run #17 in perf-test-log.md).
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.1x
|
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.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 — 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 26162064326)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
IPv6 task 8: ICMPv6 error handling — Destination Unreachable, Packet Too Big (with Next-Hop MTU), Time Exceeded, and Parameter Problem parsed and matched back to the originating socket.
Changes
Adds ICMPv6 error message parsing and handling to
dpdk-udp/src/icmpv6.rs, mirroring the existing IPv4 ICMP error handling pattern inicmp.rs:Icmpv6ErrorInfostruct: captures error type/code, error source, original src/dst IP and ports, MTUparse_icmpv6_error(): parses raw ICMPv6 error frames, walks extension headers in the embedded original packet to locate the UDP headerIcmpv6Actionenum:Reply(Vec<u8>)|Error(Icmpv6ErrorInfo)— parallelsIcmpActionprocess_icmpv6_full()onIcmpv6Handler: combined echo + error processinglib.rs: errors matched to socket via original source port, queued via existingerror_queue/take_error()infrastructureError type → io::ErrorKind mapping
Tests added
24 new unit tests covering:
to_io_error()mapping for each error kindprocess_icmpv6_full()handler routing (echo reply, error for our IP, ignore other IPs)Tradeoffs
queue_icmp_errorpath, same 16-entry bound). This matches the existing design wheretake_error()returns errors from both protocols.build_icmpv6_error_framehelper is#[cfg(test)]only — not exposed in the public API.