Skip to content

Commit cadb02e

Browse files
committed
test(stack-coexist): add R4 kernel-coexist perf baseline
Add a SOCK_KERNEL host-epoll HTTP bench mode to helloworld_stacksel and record the v4 perf baseline. F-Stack fast-path A/B (coexist off vs on, same window) shows no regression (T2 +1.5%, all within noise); kernel-side bypass PERF-3 is error-free. Rewrite 10-perf-baseline-report (zh/en) to the true-coexistence basis and refresh 08-review-gate with PERF-1/2/3 results and the ABI-skew bounce note.
1 parent 8ca1fc4 commit cadb02e

5 files changed

Lines changed: 353 additions & 171 deletions

File tree

docs/kernel_event_support_spec/08-review-gate.md

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
> **Document ID**: SPEC-KE-08
44
> **Version**: v4 (coexistence-paradigm rework)
55
> **Date**: 2026-06-16
6-
> **Status**: In progress (R1 spec gate; R2-R5 implementation gate done)
6+
> **Status**: R1 spec gate PASS + R2-R4 implementation gate PASS (incl. real-hardware perf baseline PERF-1/2/3); R5 commit wrap-up
77
> **Scope**: Gate verification of the v4 spec and implementation for "consistency with the actual code / coexistence-paradigm correctness / zero regression".
88
99
---
@@ -60,19 +60,24 @@
6060

6161
> Through `ff_socket(SOCK_KERNEL)`→managed kernel fd→bind/listen/accept + client connect/send/recv/close, the full chain runs through, validating socket-side coexistence and fd-ownership routing.
6262
63-
### I.4 Skip (no physical NIC in the environment)
64-
- The full "F-Stack business plane + SOCK_KERNEL kernel listen + ff_epoll merge" end-to-end coexistence requires `ff_init`/`ff_run` + a DPDK data plane (NIC/hugepages); this sandbox has no physical NIC → skipped per Q1, to be supplemented on real hardware per `07`'s integration plan. The socket side, config, unit tests, and zero regression are all green under the hard gate.
63+
### I.4 Performance Baseline (PERF-1/2/3, real-hardware DPDK NIC)
64+
The environment now has a DPDK NIC (`00:09.0`→igb_uio) + a two-machine f-stack-client, measured per `10-perf-baseline-report.md`:
65+
- **PERF-1/2 (vector A, F-Stack fast-path A/B; helloworld 438B keep-alive, same binary, same window toggling only config `kernel_coexist` 0 vs 1)**: T1 **−0.66%** / T2 **+1.49%** / T3 **+4.62%**, all within trial noise (coexist-on equal-or-slightly-faster); T2 p99 ~700us equal → **the coexistence switch causes no regression on the F-Stack business fast path (NFR-1/2/3)**.
66+
- **PERF-3 (vector B, local loopback against the `SOCK_KERNEL` kernel listener bench; single-thread host-epoll, 15B body)**: T1 132,385 / T2 127,501 / T3 113,641 req/s, **zero socket errors across 9 trials** → kernel-side bypass management plane works correctly and error-free (basis: single-host serial lower bound, not comparable to vector A absolutes).
67+
- Background cross-reference: existing 15.0 CVM T2 203,933 matches this A0 207,723 closely (cross-confirms NFR-1).
6568

6669
### I.5 Bounce Record
6770
| # | Trigger | Handling | Re-verification |
6871
|---|---|---|---|
6972
| self-fix | ff_host_interface.c missing `<unistd.h>`/`_GNU_SOURCE` | added includes in the same step | compiles |
7073
| self-fix | socklen_t undefined across namespaces | header declarations use `unsigned int` (same type, compatible) | compiles |
7174
| self-fix | test_ff_epoll missing ff_host_epoll_* at link | added no-op stubs in the test | 21/21 PASS |
72-
- bounce: 0 cross-step bounces (all same-step immediate self-fixes, < 3 limit).
75+
| **bounce-1 (R4 perf cross-step)** | helloworld relinked against the current lib segfaulted at startup in `ff_log_close→fclose(dangling)` | root cause = `ff_config.h` adding `kernel_coexist` shifted the `log` offset + lib Makefile lacks header-dep tracking → leftover objects mixing old/new layout (ABI skew); not a source bug. `rm_tmp_file.sh` cleared all 245 .o + libfstack.a, full rebuild | helloworld retest enters ff_run normally (exit 124); 13.0-baseline cross-check in the same env does not crash → env healthy; the full PERF A/B then ran through |
76+
- bounce: **1 cross-step bounce (R4 perf, root-caused and fixed, < 3 limit, no manual escalation)**; the rest are same-step immediate self-fixes.
7377

7478
### I.6 Implementation-Phase Conclusion
75-
**PASS (hard gate)**: compilation + cmocka unit tests all green + socket-side coexistence selftest actually run + zero regression. Native ff_api dual-stack coexistence (socket side + ff_epoll merge) is implemented; the F-Stack business-plane end-to-end coexistence awaits real hardware (skip + note).
79+
**PASS (hard gate)**: compilation + cmocka unit tests all green + socket-side coexistence selftest actually run + zero regression + **R4 real-hardware performance baseline (PERF-1/2/3) measured PASS** (coexistence has no fast-path regression; kernel-side bypass is error-free). Native ff_api dual-stack coexistence (socket side + ff_epoll merge) is implemented and validated on a real NIC.
80+
> **Build note**: after changing struct headers like `ff_config.h`, a clean full lib rebuild is mandatory (lib/Makefile lacks header-dependency tracking — an existing F-Stack trait); otherwise an incremental build yields an ABI-skew runtime crash.
7681
7782
---
7883

@@ -83,4 +88,4 @@
8388
- bounce: 0 (< 3 limit).
8489

8590
## 6. Current Conclusion
86-
**R1 spec gate PASS** (coexistence paradigm correct, v3 bypass/default-to-kernel wording removed, code anchors consistent). The R2-R5 implementation gate is PASS (hard gate) with the F-Stack-business-plane end-to-end coexistence pending real hardware.
91+
**R1 spec gate PASS** (coexistence paradigm correct, v3 bypass/default-to-kernel wording removed, code anchors consistent). **R2-R4 implementation gate PASS**: compilation/cmocka all green, socket-side coexistence selftest run, zero regression, and the real-hardware performance baseline PERF-1/2/3 measured PASS (coexistence has no fast-path regression; kernel-side bypass is error-free — see `10-perf-baseline-report.md`). One cross-step bounce in R4 (ABI skew, root-caused and fixed, < 3 limit). R5 commit wrap-up remains.

0 commit comments

Comments
 (0)