Skip to content

Add crash diagnostics and fix EAL lifecycle management - #15

Merged
gspivey merged 3 commits into
mainfrom
claude/dpdk-segfault-analysis-8Ldeu
Feb 26, 2026
Merged

gspivey merged 3 commits into
mainfrom
claude/dpdk-segfault-analysis-8Ldeu

Conversation

@gspivey

@gspivey gspivey commented Feb 26, 2026

Copy link
Copy Markdown
Owner

Summary

This PR adds comprehensive crash diagnostics to integration tests and fixes a critical bug in EAL (Environment Abstraction Layer) lifecycle management that could cause segmentation faults when DPDK resources are used after EAL cleanup.

Key Changes

EAL Lifecycle Management Fix

  • dpdk/src/eal.rs: Added unit tests that verify EAL initialization and cleanup behavior, including a test that reproduces the use-after-cleanup segfault scenario
  • dpdk-sys/src/stubs.rs: Implemented stateful EAL lifecycle tracking with three states (never initialized, initialized, cleaned up) to detect and prevent use-after-cleanup bugs in stub functions
  • dpdk-udp/src/backend_dpdk.rs and dpdk-udp/src/lib.rs: Fixed the critical bug by storing the Eal handle in DpdkBackend and DpdkResources structs, ensuring EAL stays alive for the lifetime of all DPDK resources

Crash Diagnostics Infrastructure

  • scripts/integration-tests/harness-common.sh: Added check_process_crash() helper function that detects when background processes crash (killed by signal), captures signal information, extracts kernel dmesg output, retrieves coredump backtraces via GDB, and writes a crash summary report
  • scripts/integration-tests/tier1-dpdk-echo.sh and tier3-iperf-interop.sh: Integrated crash detection into test harnesses; enabled coredumps via ulimit -c unlimited and call check_process_crash() when background processes exit unexpectedly
  • scripts/run-integration-tests.sh: Added log collection for crash diagnostics (dmesg, coredump listings, crash reports) from EC2 instances
  • deploy/cdk/lib/dpdk-test-stack.ts: Configured EC2 instances to enable coredumps at boot time by setting ulimit -c unlimited, creating /tmp/coredumps directory, and configuring kernel core_pattern

Notable Implementation Details

  • The EAL state machine in stubs uses atomic operations to safely track lifecycle across threads
  • Mempool creation is blocked (returns NULL) only when EAL was explicitly cleaned up, not when never initialized, maintaining backward compatibility with existing tests
  • Crash diagnostics include filtered dmesg output, full GDB backtraces from coredumps, and persistent crash report files for log collection
  • Integration tests now enable coredumps before launching background processes to ensure crash data is captured

https://claude.ai/code/session_01AZJMrh5NfoHGEYuNHfiwP1

The Eal struct returned by Eal::init() was not bound to a variable in
get_or_init_dpdk(), causing it to be dropped immediately. Eal::drop()
calls rte_eal_cleanup(), which tears down the DPDK memory subsystem
and NULLs rte_config->mem_config. The subsequent rte_pktmbuf_pool_create()
then segfaults dereferencing NULL+8.

Fix: store the Eal handle in DpdkResources so it lives as long as DPDK
resources are in use. rte_eal_cleanup() now only runs when all socket
references are dropped.

Also adds crash diagnostics to integration tests:
- Enable coredumps on EC2 instances (core_pattern -> /tmp/coredumps/)
- check_process_crash() in harness-common.sh detects signal-killed
  processes, captures dmesg, coredump listings, and GDB backtraces
- Crash reports written to /tmp/crash-report-*.txt for log collection
- run-integration-tests.sh now collects dmesg, coredumps, and crash
  reports as part of instance log artifacts

https://claude.ai/code/session_01AZJMrh5NfoHGEYuNHfiwP1
The stubs were previously stateless — rte_eal_cleanup was a no-op and
rte_pktmbuf_pool_create always succeeded. This meant the Eal drop bug
(init -> cleanup -> use) was invisible in unit tests.

Changes:
- stubs.rs: Track EAL state (never-init / initialized / cleaned-up).
  rte_pktmbuf_pool_create returns NULL when EAL has been cleaned up,
  matching the segfault behavior of real DPDK.
- eal.rs: Add 3 unit tests that verify EAL lifecycle and catch the
  exact bug pattern that caused the production segfault.
- backend_dpdk.rs: Fix same Eal drop bug (Eal::init return discarded).
  DpdkBackend::new() now stores the Eal handle.

https://claude.ai/code/session_01AZJMrh5NfoHGEYuNHfiwP1
The EAL lifecycle tests mutate a global atomic (STUB_EAL_STATE). Running
them in parallel with other tests is a race condition waiting to happen.

- Add serial_test crate, mark all EAL tests with #[serial(eal)]
- Add stub_eal_reset() for clean test setup/teardown instead of the
  hack of calling rte_eal_init(0, null) to paper over dirty state
- Each test now calls stub_eal_reset() at start and end

https://claude.ai/code/session_01AZJMrh5NfoHGEYuNHfiwP1
@gspivey
gspivey merged commit b0b055d into main Feb 26, 2026
1 check passed
@gspivey
gspivey deleted the claude/dpdk-segfault-analysis-8Ldeu branch February 26, 2026 09:00
@github-actions

Copy link
Copy Markdown

Integration Test Failure (Run 22434997569)

Branch: 15/merge | Commit: 7dd5f51e74136fc799cf36b0894762cfeb88db55

No failure-summary.json found

receiver-user-data.log (7094 bytes, last 80 lines)

   Compiling proc-macro2 v1.0.106
   Compiling unicode-ident v1.0.24
   Compiling quote v1.0.44
   Compiling libc v0.2.182
   Compiling glob v0.3.3
   Compiling syn v2.0.117
   Compiling clang-sys v1.8.1
   Compiling prettyplease v0.2.37
   Compiling cfg-if v1.0.4
   Compiling minimal-lexical v0.2.1
   Compiling memchr v2.8.0
   Compiling regex-syntax v0.8.10
   Compiling regex-automata v0.4.14
   Compiling nom v7.1.3
   Compiling libloading v0.8.9
   Compiling shlex v1.3.0
   Compiling either v1.15.0
   Compiling bindgen v0.70.1
   Compiling itertools v0.13.0
   Compiling cexpr v0.6.0
   Compiling regex v1.12.3
   Compiling find-msvc-tools v0.1.9
   Compiling utf8parse v0.2.2
   Compiling bitflags v2.11.0
   Compiling rustc-hash v1.1.0
   Compiling log v0.4.29
   Compiling thiserror v1.0.69
   Compiling parking_lot_core v0.9.12
   Compiling anstyle-parse v0.2.7
   Compiling cc v1.2.56
   Compiling thiserror-impl v1.0.69
   Compiling anstyle v1.0.13
   Compiling smallvec v1.15.1
   Compiling scopeguard v1.2.0
   Compiling colorchoice v1.0.4
   Compiling anstyle-query v1.1.5
   Compiling is_terminal_polyfill v1.70.2
   Compiling pkg-config v0.3.32
   Compiling anstream v0.6.21
   Compiling lock_api v0.4.14
   Compiling errno v0.3.14
   Compiling clap_lex v1.0.0
   Compiling heck v0.5.0
   Compiling strsim v0.11.1
   Compiling dpdk-sys v0.1.0 (/opt/dpdk-stdlib/dpdk-sys)
warning: unused import: `std::fs`
   --> dpdk-sys/build.rs:129:9
    |
129 |     use std::fs;
    |         ^^^^^^^
    |
    = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default

   Compiling clap_builder v4.5.60
warning: `dpdk-sys` (build script) generated 1 warning
   Compiling clap_derive v4.5.55
   Compiling signal-hook-registry v1.4.8
   Compiling parking_lot v0.12.5
   Compiling tokio-macros v2.6.0
   Compiling socket2 v0.6.2
   Compiling mio v1.1.1
   Compiling bytes v1.11.1
   Compiling pin-project-lite v0.2.16
   Compiling tokio v1.49.0
   Compiling clap v4.5.60
   Compiling dpdk v0.1.0 (/opt/dpdk-stdlib/dpdk)
   Compiling async-trait v0.1.89
   Compiling dpdk-udp v0.1.0 (/opt/dpdk-stdlib/dpdk-udp)
   Compiling echo v0.1.0 (/opt/dpdk-stdlib/apps/echo)
   Compiling dpdk-tokio v0.1.0 (/opt/dpdk-stdlib/dpdk-tokio)
   Compiling tokio-echo v0.1.0 (/opt/dpdk-stdlib/apps/tokio-echo)
   Compiling test-client v0.1.0 (/opt/dpdk-stdlib/apps/test-client)
    Finished `release` profile [optimized] target(s) in 1m 04s
=== Build complete ===
-rwxr-xr-x. 2 root root 1172768 Feb 26 09:08 target/release/echo
-rwxr-xr-x. 2 root root 1607608 Feb 26 09:09 target/release/test-client
=== Setup complete! ===
Rust project built successfully
Instance ready for testing
Project location: /opt/dpdk-stdlib

sender-user-data.log (7094 bytes, last 80 lines)

   Compiling proc-macro2 v1.0.106
   Compiling quote v1.0.44
   Compiling unicode-ident v1.0.24
   Compiling libc v0.2.182
   Compiling syn v2.0.117
   Compiling glob v0.3.3
   Compiling clang-sys v1.8.1
   Compiling prettyplease v0.2.37
   Compiling regex-syntax v0.8.10
   Compiling cfg-if v1.0.4
   Compiling memchr v2.8.0
   Compiling minimal-lexical v0.2.1
   Compiling nom v7.1.3
   Compiling libloading v0.8.9
   Compiling regex-automata v0.4.14
   Compiling bindgen v0.70.1
   Compiling shlex v1.3.0
   Compiling either v1.15.0
   Compiling itertools v0.13.0
   Compiling regex v1.12.3
   Compiling cexpr v0.6.0
   Compiling find-msvc-tools v0.1.9
   Compiling utf8parse v0.2.2
   Compiling rustc-hash v1.1.0
   Compiling parking_lot_core v0.9.12
   Compiling log v0.4.29
   Compiling bitflags v2.11.0
   Compiling thiserror v1.0.69
   Compiling anstyle-parse v0.2.7
   Compiling cc v1.2.56
   Compiling thiserror-impl v1.0.69
   Compiling pkg-config v0.3.32
   Compiling anstyle v1.0.13
   Compiling smallvec v1.15.1
   Compiling anstyle-query v1.1.5
   Compiling scopeguard v1.2.0
   Compiling is_terminal_polyfill v1.70.2
   Compiling colorchoice v1.0.4
   Compiling anstream v0.6.21
   Compiling lock_api v0.4.14
   Compiling errno v0.3.14
   Compiling clap_lex v1.0.0
   Compiling strsim v0.11.1
   Compiling dpdk-sys v0.1.0 (/opt/dpdk-stdlib/dpdk-sys)
warning: unused import: `std::fs`
   --> dpdk-sys/build.rs:129:9
    |
129 |     use std::fs;
    |         ^^^^^^^
    |
    = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default

warning: `dpdk-sys` (build script) generated 1 warning
   Compiling heck v0.5.0
   Compiling clap_derive v4.5.55
   Compiling clap_builder v4.5.60
   Compiling signal-hook-registry v1.4.8
   Compiling parking_lot v0.12.5
   Compiling tokio-macros v2.6.0
   Compiling mio v1.1.1
   Compiling socket2 v0.6.2
   Compiling pin-project-lite v0.2.16
   Compiling bytes v1.11.1
   Compiling tokio v1.49.0
   Compiling clap v4.5.60
   Compiling dpdk v0.1.0 (/opt/dpdk-stdlib/dpdk)
   Compiling async-trait v0.1.89
   Compiling dpdk-udp v0.1.0 (/opt/dpdk-stdlib/dpdk-udp)
   Compiling echo v0.1.0 (/opt/dpdk-stdlib/apps/echo)
   Compiling dpdk-tokio v0.1.0 (/opt/dpdk-stdlib/dpdk-tokio)
   Compiling test-client v0.1.0 (/opt/dpdk-stdlib/apps/test-client)
   Compiling tokio-echo v0.1.0 (/opt/dpdk-stdlib/apps/tokio-echo)
    Finished `release` profile [optimized] target(s) in 58.21s
=== Build complete ===
-rwxr-xr-x. 2 root root 1172768 Feb 26 09:08 target/release/echo
-rwxr-xr-x. 2 root root 1607608 Feb 26 09:08 target/release/test-client
=== Setup complete! ===
Rust project built successfully
Instance ready for testing
Project location: /opt/dpdk-stdlib

receiver-console-output.log (25403 bytes, last 80 lines)

[  128.887582] cloud-init[1727]:    Compiling strsim v0.11.1
[  129.468371] cloud-init[1727]:    Compiling dpdk-sys v0.1.0 (/opt/dpdk-stdlib/dpdk-sys)
[  129.506834] cloud-init[1727]: warning: unused import: `std::fs`
[  129.509283] cloud-init[1727]:    --> dpdk-sys/build.rs:129:9
[  129.510355] cloud-init[1727]:     |
[  129.512160] cloud-init[1727]: 129 |     use std::fs;
[  129.513972] cloud-init[1727]:     |         ^^^^^^^
[  129.515955] cloud-init[1727]:     |
[  129.517265] cloud-init[1727]:     = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default
[  129.915923] cloud-init[1727]:    Compiling clap_builder v4.5.60
[  129.920129] cloud-init[1727]: warning: `dpdk-sys` (build script) generated 1 warning
[  140.477935] cloud-init[1727]:    Compiling clap_derive v4.5.55
[  142.368762] cloud-init[1727]:    Compiling signal-hook-registry v1.4.8
[  142.962419] cloud-init[1727]:    Compiling parking_lot v0.12.5
[  143.812384] cloud-init[1727]:    Compiling tokio-macros v2.6.0
[  144.228105] cloud-init[1727]:    Compiling socket2 v0.6.2
[  145.244800] cloud-init[1727]:    Compiling mio v1.1.1
[  145.630548] cloud-init[1727]:    Compiling bytes v1.11.1
[  145.961516] cloud-init[1727]:    Compiling pin-project-lite v0.2.16
[  146.719052] cloud-init[1727]:    Compiling tokio v1.49.0
[  147.227686] cloud-init[1727]:    Compiling clap v4.5.60
[  147.263481] cloud-init[1727]:    Compiling dpdk v0.1.0 (/opt/dpdk-stdlib/dpdk)
[  147.870556] cloud-init[1727]:    Compiling async-trait v0.1.89
[  148.758220] cloud-init[1727]:    Compiling dpdk-udp v0.1.0 (/opt/dpdk-stdlib/dpdk-udp)
[  150.824108] cloud-init[1727]:    Compiling echo v0.1.0 (/opt/dpdk-stdlib/apps/echo)
[  153.478226] cloud-init[1727]:    Compiling dpdk-tokio v0.1.0 (/opt/dpdk-stdlib/dpdk-tokio)
[  159.083658] cloud-init[1727]:    Compiling tokio-echo v0.1.0 (/opt/dpdk-stdlib/apps/tokio-echo)
[  159.087397] cloud-init[1727]:    Compiling test-client v0.1.0 (/opt/dpdk-stdlib/apps/test-client)
[  163.585879] cloud-init[1727]:     Finished `release` profile [optimized] target(s) in 1m 04s
[  163.620799] cloud-init[1727]: === Build complete ===
[  163.624837] cloud-init[1727]: -rwxr-xr-x. 2 root root 1172768 Feb 26 09:08 target/release/echo
[  163.628496] cloud-init[1727]: -rwxr-xr-x. 2 root root 1607608 Feb 26 09:09 target/release/test-client
[  163.632350] cloud-init[1727]: === Setup complete! ===
[  163.634515] cloud-init[1727]: Rust project built successfully
[  163.636971] cloud-init[1727]: Instance ready for testing
[  163.639163] cloud-init[1727]: Project location: /opt/dpdk-stdlib
ci-info: +++++++++++++++++++++++++++++++++++++++++++++Authorized keys from /home/ec2-user/.ssh/authorized_keys for user ec2-user++++++++++++++++++++++++++++++++++++++++++++++
ci-info: +---------+-------------------------------------------------------------------------------------------------+---------+---------------------------------------------+
ci-info: | Keytype |                                       Fingerprint (sha256)                                      | Options |                   Comment                   |
ci-info: +---------+-------------------------------------------------------------------------------------------------+---------+---------------------------------------------+
ci-info: | ssh-rsa | 04:4a:98:17:d1:ec:e8:84:25:1a:65:b1:4b:b9:9f:d5:e0:b5:79:8d:17:53:3a:2d:24:02:66:cb:47:fa:67:45 |    -    | packer_699ffc37-ff1b-d4b9-9477-990d8b6113ea |
ci-info: +---------+-------------------------------------------------------------------------------------------------+---------+---------------------------------------------+
<14>Feb 26 09:09:09 cloud-init: #############################################################
<14>Feb 26 09:09:09 cloud-init: -----BEGIN SSH HOST KEY FINGERPRINTS-----
<14>Feb 26 09:09:09 cloud-init: 256 SHA256:twu2OpwZG99PTycBksQHmUorIi62pd9P5Uf5j/VszjE root@ip-10-0-1-88.ec2.internal (ECDSA)
<14>Feb 26 09:09:09 cloud-init: 256 SHA256:fcCh2zurzIijcuyhPKpA64JO4QAqHmNLi9zlTRsoP98 root@ip-10-0-1-88.ec2.internal (ED25519)
<14>Feb 26 09:09:09 cloud-init: -----END SSH HOST KEY FINGERPRINTS-----
<14>Feb 26 09:09:09 cloud-init: #############################################################
-----BEGIN SSH HOST KEY KEYS-----
ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBOjKZicQ/vrMif6O7Izi9DnEp5Zl7RlsmiaW9X501vIdG9dq+z1Zw6OVq6+aOaxgDxdqyQqY1c4lVWAOgAEyFpk= root@ip-10-0-1-88.ec2.internal
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEuOUXqrGIASHPNwZ1xESP0fB0iAsO5UeXyqbk9DQG5i root@ip-10-0-1-88.ec2.internal
-----END SSH HOST KEY KEYS-----
[  165.340332] cloud-init[1727]: Cloud-init v. 22.2.2 finished at Thu, 26 Feb 2026 09:09:09 +0000. Datasource DataSourceEc2.  Up 165.33 seconds
[  170.426028] pci 0000:00:06.0: [1d0f:ec20] type 00 class 0x020000
[  170.427193] pci 0000:00:06.0: reg 0x10: [mem 0x00000000-0x00003fff]
[  170.428398] pci 0000:00:06.0: reg 0x18: [mem 0x00000000-0x000fffff pref]
[  170.429769] pci 0000:00:06.0: enabling Extended Tags
[  170.431629] pci 0000:00:06.0: BAR 2: assigned [mem 0xc0600000-0xc06fffff pref]
[  170.432721] pci 0000:00:06.0: BAR 0: assigned [mem 0xc0508000-0xc050bfff]
[  170.433919] ena 0000:00:06.0: enabling device (0000 -> 0002)
[  170.443826] ena 0000:00:06.0: ENA device version: 0.10
[  170.444619] ena 0000:00:06.0: ENA controller version: 0.0.1 implementation version 1
[  170.543829] ena 0000:00:06.0: ENA Large LLQ is disabled
[  170.555959] ena 0000:00:06.0: Elastic Network Adapter (ENA) found at mem c0508000, mac addr 02:14:d5:62:91:11
[  170.613860] ena 0000:00:06.0 ens6: renamed from eth0
[  170.761656] zram_generator::config[3696]: zram0: system has too much memory (5027MB), limit is 800MB, ignoring.
[  170.945677] ena 0000:00:06.0 ens6: Local page cache is disabled for less than 16 channels
[  203.544924] vfio-pci 0000:00:06.0: Adding to iommu group 0
[  203.546396] vfio-pci 0000:00:06.0: Adding kernel taint for vfio-noiommu group on device
[  203.605530] zram_generator::config[5097]: zram0: system has too much memory (5027MB), limit is 800MB, ignoring.
[  211.806062] vfio-pci 0000:00:06.0: vfio-noiommu device opened by user (echo:5353)
[  321.872140] vfio-pci 0000:00:06.0: Relaying device request to user (#0)
[  333.109502] vfio-pci 0000:00:06.0: Removing from iommu group 0
[  333.122512] ena 0000:00:06.0: ENA device version: 0.10
[  333.123290] ena 0000:00:06.0: ENA controller version: 0.0.1 implementation version 1
[  333.217621] ena 0000:00:06.0: ENA Large LLQ is disabled
[  333.230774] ena 0000:00:06.0: Elastic Network Adapter (ENA) found at mem c0508000, mac addr 02:14:d5:62:91:11
[  333.292642] ena 0000:00:06.0 ens6: renamed from eth0
[  333.465044] zram_generator::config[7194]: zram0: system has too much memory (5027MB), limit is 800MB, ignoring.
[  333.612835] ena 0000:00:06.0 ens6: Local page cache is disabled for less than 16 channels

sender-console-output.log (25598 bytes, last 80 lines)

[   87.449683] cloud-init[1736]:    --> dpdk-sys/build.rs:129:9
[   87.451882] cloud-init[1736]:     |
[   87.453042] cloud-init[1736]: 129 |     use std::fs;
[   87.454218] cloud-init[1736]:     |         ^^^^^^^
[   87.455191] cloud-init[1736]:     |
[   87.456474] cloud-init[1736]:     = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default
[   87.828309] cloud-init[1736]: warning: `dpdk-sys` (build script) generated 1 warning
[   87.829938] cloud-init[1736]:    Compiling heck v0.5.0
[   87.975275] cloud-init[1736]:    Compiling clap_derive v4.5.55
[   89.285811] cloud-init[1736]:    Compiling clap_builder v4.5.60
[   99.739210] cloud-init[1736]:    Compiling signal-hook-registry v1.4.8
[  100.295923] cloud-init[1736]:    Compiling parking_lot v0.12.5
[  101.185421] cloud-init[1736]:    Compiling tokio-macros v2.6.0
[  101.558497] cloud-init[1736]:    Compiling mio v1.1.1
[  102.102948] cloud-init[1736]:    Compiling socket2 v0.6.2
[  103.073488] cloud-init[1736]:    Compiling pin-project-lite v0.2.16
[  103.104730] cloud-init[1736]:    Compiling bytes v1.11.1
[  104.067601] cloud-init[1736]:    Compiling tokio v1.49.0
[  104.609075] cloud-init[1736]:    Compiling clap v4.5.60
[  104.641771] cloud-init[1736]:    Compiling dpdk v0.1.0 (/opt/dpdk-stdlib/dpdk)
[  105.218840] cloud-init[1736]:    Compiling async-trait v0.1.89
[  106.079305] cloud-init[1736]:    Compiling dpdk-udp v0.1.0 (/opt/dpdk-stdlib/dpdk-udp)
[  108.031557] cloud-init[1736]:    Compiling echo v0.1.0 (/opt/dpdk-stdlib/apps/echo)
[  110.667072] cloud-init[1736]:    Compiling dpdk-tokio v0.1.0 (/opt/dpdk-stdlib/dpdk-tokio)
[  115.944360] cloud-init[1736]:    Compiling test-client v0.1.0 (/opt/dpdk-stdlib/apps/test-client)
[  115.947813] cloud-init[1736]:    Compiling tokio-echo v0.1.0 (/opt/dpdk-stdlib/apps/tokio-echo)
[  120.331061] cloud-init[1736]:     Finished `release` profile [optimized] target(s) in 58.21s
[  120.362993] cloud-init[1736]: === Build complete ===
[  120.366144] cloud-init[1736]: -rwxr-xr-x. 2 root root 1172768 Feb 26 09:08 target/release/echo
[  120.368128] cloud-init[1736]: -rwxr-xr-x. 2 root root 1607608 Feb 26 09:08 target/release/test-client
[  120.370771] cloud-init[1736]: === Setup complete! ===
[  120.372846] cloud-init[1736]: Rust project built successfully
[  120.375250] cloud-init[1736]: Instance ready for testing
[  120.377408] cloud-init[1736]: Project location: /opt/dpdk-stdlib
ci-info: +++++++++++++++++++++++++++++++++++++++++++++Authorized keys from /home/ec2-user/.ssh/authorized_keys for user ec2-user++++++++++++++++++++++++++++++++++++++++++++++
ci-info: +---------+-------------------------------------------------------------------------------------------------+---------+---------------------------------------------+
ci-info: | Keytype |                                       Fingerprint (sha256)                                      | Options |                   Comment                   |
ci-info: +---------+-------------------------------------------------------------------------------------------------+---------+---------------------------------------------+
ci-info: | ssh-rsa | 04:4a:98:17:d1:ec:e8:84:25:1a:65:b1:4b:b9:9f:d5:e0:b5:79:8d:17:53:3a:2d:24:02:66:cb:47:fa:67:45 |    -    | packer_699ffc37-ff1b-d4b9-9477-990d8b6113ea |
ci-info: +---------+-------------------------------------------------------------------------------------------------+---------+---------------------------------------------+
<14>Feb 26 09:08:25 cloud-init: #############################################################
<14>Feb 26 09:08:25 cloud-init: -----BEGIN SSH HOST KEY FINGERPRINTS-----
<14>Feb 26 09:08:25 cloud-init: 256 SHA256:e3PXnKihWbsTbQ+lt2UwGn08xpFyEl2Q5wE3xJ25GT8 root@ip-10-0-1-17.ec2.internal (ECDSA)
<14>Feb 26 09:08:25 cloud-init: 256 SHA256:pYxBW+meTe9ZTZsLXcpU6R8EHiZ83/wyh/ZiLjqKrqY root@ip-10-0-1-17.ec2.internal (ED25519)
<14>Feb 26 09:08:25 cloud-init: -----END SSH HOST KEY FINGERPRINTS-----
<14>Feb 26 09:08:25 cloud-init: #############################################################
-----BEGIN SSH HOST KEY KEYS-----
ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBGhGsibnO3tgKtT9xmKqkUUDSmSmGhzEcL2/5fF3dVtBKI1D5jb/rSRGm4FANPC3HfzxXfif3e8N8jDoJY7Up44= root@ip-10-0-1-17.ec2.internal
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIA9kBZqklX8Msf6TyjweNzyu20drQu7CFbedHGbw3ibt root@ip-10-0-1-17.ec2.internal
-----END SSH HOST KEY KEYS-----
[  122.203775] cloud-init[1736]: Cloud-init v. 22.2.2 finished at Thu, 26 Feb 2026 09:08:25 +0000. Datasource DataSourceEc2.  Up 122.19 seconds
[  130.167283] pci 0000:00:06.0: [1d0f:ec20] type 00 class 0x020000
[  130.168356] pci 0000:00:06.0: reg 0x10: [mem 0x00000000-0x00003fff]
[  130.169388] pci 0000:00:06.0: reg 0x18: [mem 0x00000000-0x000fffff pref]
[  130.170651] pci 0000:00:06.0: enabling Extended Tags
[  130.172476] pci 0000:00:06.0: BAR 2: assigned [mem 0xc0600000-0xc06fffff pref]
[  130.173538] pci 0000:00:06.0: BAR 0: assigned [mem 0xc0508000-0xc050bfff]
[  130.174600] ena 0000:00:06.0: enabling device (0000 -> 0002)
[  130.184472] ena 0000:00:06.0: ENA device version: 0.10
[  130.185243] ena 0000:00:06.0: ENA controller version: 0.0.1 implementation version 1
[  130.284453] ena 0000:00:06.0: ENA Large LLQ is disabled
[  130.296683] ena 0000:00:06.0: Elastic Network Adapter (ENA) found at mem c0508000, mac addr 02:12:13:ee:a7:ed
[  130.354691] ena 0000:00:06.0 ens6: renamed from eth0
[  130.539440] zram_generator::config[3682]: zram0: system has too much memory (5027MB), limit is 800MB, ignoring.
[  130.750271] ena 0000:00:06.0 ens6: Local page cache is disabled for less than 16 channels
[  197.665790] vfio-pci 0000:00:06.0: Adding to iommu group 0
[  197.667112] vfio-pci 0000:00:06.0: Adding kernel taint for vfio-noiommu group on device
[  197.838339] zram_generator::config[5669]: zram0: system has too much memory (5027MB), limit is 800MB, ignoring.
[  316.002621] vfio-pci 0000:00:06.0: Removing from iommu group 0
[  316.013793] ena 0000:00:06.0: ENA device version: 0.10
[  316.014569] ena 0000:00:06.0: ENA controller version: 0.0.1 implementation version 1
[  316.113547] ena 0000:00:06.0: ENA Large LLQ is disabled
[  316.125654] ena 0000:00:06.0: Elastic Network Adapter (ENA) found at mem c0508000, mac addr 02:12:13:ee:a7:ed
[  316.173575] ena 0000:00:06.0 ens6: renamed from eth0
[  316.330527] zram_generator::config[7794]: zram0: system has too much memory (5027MB), limit is 800MB, ignoring.
[  316.479608] ena 0000:00:06.0 ens6: Local page cache is disabled for less than 16 channels
[  341.203855] vfio-pci 0000:00:06.0: Adding to iommu group 0
[  341.205148] vfio-pci 0000:00:06.0: Adding kernel taint for vfio-noiommu group on device
[  341.299906] zram_generator::config[8201]: zram0: system has too much memory (5027MB), limit is 800MB, ignoring.
[  449.545406] vfio-pci 0000:00:06.0: vfio-noiommu device opened by user (echo:9768)

All instance-logs files

total 200
drwxr-xr-x  2 runner runner  4096 Feb 26 09:18 .
drwxr-xr-x 18 runner runner  4096 Feb 26 09:16 ..
-rw-r--r--  1 runner runner  1267 Feb 26 09:17 receiver-build-listing.log
-rw-r--r--  1 runner runner   268 Feb 26 09:17 receiver-cfn-init.log
-rw-r--r--  1 runner runner 14371 Feb 26 09:17 receiver-cloud-init-output.log
-rw-r--r--  1 runner runner 25403 Feb 26 09:17 receiver-console-output.log
-rw-r--r--  1 runner runner     8 Feb 26 09:18 receiver-coredump-listing.log
-rw-r--r--  1 runner runner    17 Feb 26 09:18 receiver-crash-reports.log
-rw-r--r--  1 runner runner  1412 Feb 26 09:18 receiver-dmesg-crashes.log
-rw-r--r--  1 runner runner 24001 Feb 26 09:18 receiver-journal.log
-rw-r--r--  1 runner runner  7094 Feb 26 09:17 receiver-user-data.log
-rw-r--r--  1 runner runner  1267 Feb 26 09:16 sender-build-listing.log
-rw-r--r--  1 runner runner   266 Feb 26 09:16 sender-cfn-init.log
-rw-r--r--  1 runner runner 14371 Feb 26 09:16 sender-cloud-init-output.log
-rw-r--r--  1 runner runner 25598 Feb 26 09:16 sender-console-output.log
-rw-r--r--  1 runner runner     8 Feb 26 09:17 sender-coredump-listing.log
-rw-r--r--  1 runner runner    17 Feb 26 09:17 sender-crash-reports.log
-rw-r--r--  1 runner runner  1412 Feb 26 09:17 sender-dmesg-crashes.log
-rw-r--r--  1 runner runner 24001 Feb 26 09:16 sender-journal.log
-rw-r--r--  1 runner runner  7094 Feb 26 09:16 sender-user-data.log

gspivey pushed a commit that referenced this pull request Apr 13, 2026
No regression from hardware VLAN offload changes. At 700K PPS with 64B
packets: rust-dpdk 665K RX (4.9% drop) vs native-dpdk 685K (2.1% drop)
vs kernel 344K (50.8% drop). 1.93x throughput advantage over kernel.

https://claude.ai/code/session_01WRu2gZPeAMT14C5met7oqL
gspivey added a commit that referenced this pull request Jun 13, 2026
## Roadmap Item

Implements roadmap item **#15**: `dpdk-stdlib-tcp`: Codec implementation
and property tests.

Tasks: 3.7, 3.8, 3.9, 3.10, 3.11 from `.kiro/specs/tcp-support/`

## Changes

### Codec functions (~500 LOC)
- `build_tcp_frame(params) -> Vec<u8>`: Constructs Eth + IPv4 + TCP
frames with full option serialization
- `tcp_checksum(src_ip, dst_ip, tcp_segment) -> u16`: Parameterized
pseudo-header checksum (ready for IPv6)
- `compute_mss(mtu, ip_header_len) -> u16`: MSS calculation from MTU
- `parse_tcp_packet(frame) -> ParsedTcpSegment`: Validates data-offset ≥
5, parses all TCP options (MSS, WScale, SACK-Perm, Timestamps, SACK
blocks)
- `build_tcp_packet(mbuf, params)`: Zero-copy DPDK Mbuf path,
byte-identical output to `build_tcp_frame`

### Automatic SYN option injection
SYN/SYN-ACK frames always include MSS, WScale, SACK-Permitted, and
Timestamps options (per spec requirement).

### Property tests (proptest, 256+ cases each)
1. **Round-trip**: `parse(build(params)) == params` for arbitrary valid
segments
2. **Mbuf equivalence**: `build_tcp_frame` and `build_tcp_packet`
produce identical bytes
3. **Invalid frame rejection**: Frames < 54B or invalid data-offset
return error
4. **SYN required options**: SYN/SYN-ACK always contain MSS, WScale,
SACK-Perm, Timestamps
5. **MSS bound**: `compute_mss` matches expected value
6. **Checksum validity**: Valid checksum verifies to 0; single-bit flip
fails verification
7. **Sequence transitivity**: a < b < c ⟹ a < c (within half-space); n <
n+1 always

### Unit tests
- 32 unit tests covering flags, options, frame building, parsing,
checksum validation, error cases

## Testing
- `cargo build && cargo test` passes across the full workspace
- All 42 unit tests + 10 property tests green
- No regressions in existing crates

## Tradeoffs
- `build_tcp_packet` pre-sets `data_len` to the full available data room
before writing, then resets it to the actual frame length. This is
necessary because stub mbufs start with data_len=0.

Co-authored-by: Agent Router <agent@agent-router.dev>
gspivey pushed a commit that referenced this pull request Jun 13, 2026
- Append Run #42 results (no regression) from GH Actions run 27476064107
- Mark roadmap item #15 complete (PR #79, already merged)
- Mark roadmap item #16 complete (PR #80)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants