Commit 4139198
committed
feat(M6): enable FF_NETGRAPH + FF_IPFW combo (Phase-2 P0)
Phase-2 first milestone of FreeBSD 15.0 feature-enable work (after M0~M5 + runtime-fix + rib-fix + Phase-5b NFR-1 PASS).
Goal: enable lib/Makefile FF_NETGRAPH=1 + FF_IPFW=1 by default; full
end-to-end verification of ipfw user-space tooling against helloworld
primary process via DPDK secondary IPC.
Code changes (4 files, +98/-4):
- lib/Makefile: uncomment FF_NETGRAPH=1 + FF_IPFW=1; add ip_fw_compat.c
to NETIPFW_SRCS (provides IP_FW3 v0/v1 sopt dispatch table).
- lib/ff_stub_14_extra.c (+82 lines): 7 link-only stubs surfaced by the
new netgraph + ipfw paths during helloworld link. Signatures from
upstream freebsd-src-releng-15.0 sys/netpfil/ipfw/ip_fw_private.h:
ipfw_bpf_init/uninit/tap/mtap/mtap2; sys/netinet/sctp_crc32.h:
sctp_calculate_cksum; sys/prng.h: prng32_bounded. struct mbuf is
forward-declared (cannot include <sys/mbuf.h> due to existing
m_rcvif_restore stub signature divergence).
- tools/ipfw/ipfw2.c (+2 lines): set op3->version = IP_FW3_OPVER in
do_set3 + do_get3 (was missing — F-Stack lagged behind upstream
15.0 sbin/ipfw/ipfw2.c:677,718). Without it the kernel ipfw_ctl3
dispatched to the v0 stub bank (ip_fw_compat.c) and returned
EOPNOTSUPP.
- tools/compat/include/netinet/ip_fw.h (+10/-2): backport upstream
IP_FW3_OPVER_{0,1} + IP_FW3_OPVER macros, and widen
ipfw_range_tlv.start_rule / end_rule from uint16_t to uint32_t to
match the kernel-side v1 layout (the comment for IP_FW3_OPVER_1
literally says '32bit rulenum'). Without this widening
sd->valsize != sizeof(*rh) and del_rules returned EINVAL. Old v0
copy preserved at freebsd-src-releng-15.0/f-stack-lib/tools/compat/
include/netinet/ip_fw.h.preM6_v0era.
Verification:
- G1.1 lib make all: exit=0, 0 errors, 57 warnings (baseline 55+5,
threshold 60), libfstack.a 6.5 MB (was 5.4 MB; +21% reflecting
netgraph 41 + ipfw 14 kernel objects).
- G1.5 tools/ipfw make: exit=0, tools/sbin/ipfw 25 MB binary produced
(absent when FF_IPFW=0).
- G2.1 helloworld primary smoke: ALIVE >=10s, log shows
'ipfw2 (+ipv6) initialized, divert loadable, nat loadable, default
to accept', tcp_bbr / TCP_ratelimit init clean, no SIGSEGV.
- G3.1 ipfw add 100 deny ip from 1.2.3.4 to any: PASS (rule echoed).
- G3.2 ipfw show: PASS (rule visible alongside default 65535
count + allow, with packet/byte counters incrementing).
- G3.3 ipfw delete 100 + show: PASS (rule disappears).
- G3.4 ngctl list: exit=0 (acceptable per spec G3.4).
- G3.5 OQ-4 downgrade path: not triggered.
Bounce ledger: 3 formal bounces, all gate(G2/G3)->code, all resolved
within the same milestone (no escalation, no pause).
Documentation:
- docs/freebsd_13_to_15_upgrade_spec/zh_cn/phase2-feature-enable-plan.md
(NEW, parent plan for M6-M13 + M-Final)
- docs/freebsd_13_to_15_upgrade_spec/zh_cn/phase2-M6-spec.md (NEW)
- docs/freebsd_13_to_15_upgrade_spec/zh_cn/phase2-M6-execution-log.md
(NEW, full evidence + bounce ledger + observations)
- docs/01-LAYER1-ARCHITECTURE.md + zh_cn mirror: anchor sentence
appended noting M6 + libfstack/ipfw size deltas.
- docs/F-Stack_Knowledge_Base_Summary.md + zh_cn mirror: scope tag
amended with Phase-2 M6.
Compliance: 0 direct rm/kill/chmod calls used (all routed through
/data/workspace/{rm_tmp_file,kill_process,chmod_modify}.sh).
Local commit only; not pushed (per workspace policy).1 parent 07f9bb0 commit 4139198
11 files changed
Lines changed: 1088 additions & 6 deletions
File tree
- docs
- freebsd_13_to_15_upgrade_spec/zh_cn
- zh_cn
- lib
- tools
- compat/include/netinet
- ipfw
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
139 | 139 | | |
140 | 140 | | |
141 | 141 | | |
| 142 | + | |
142 | 143 | | |
143 | 144 | | |
144 | 145 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| |||
Lines changed: 182 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
0 commit comments