lgcosta
90c51f43fc
M5: queue gate 15 green (hfsc in the data path, pfctl -s queue works); vendor OpenBSD net/hfsc.h + net/fq_codel.h so kernel and pfctl share the ABI; pflog payload anchored; splassert no longer BUGs
2026-11-12 03:10:46 -03:00
lgcosta
14ff7d1c39
ifq: real ifq_start (drain+transmit), dequeue cookie fix, pf_kifq_input hook in the data path; 14/14 suite unchanged
2026-11-12 01:15:26 -03:00
lgcosta
f34c4f92a9
M5 step 1: build OpenBSD hfsc/fq_codel back ends into pf.ko (ml_* API, ifq_q handshake, scheduler types); priq still attached, 14/14 suite unchanged
2026-11-12 00:48:56 -03:00
lgcosta
1bda8b4fa2
route-to: forced nexthop via rt_gw4/rt_gw_family (Linux resolves neighbours from the gateway only when the route says so); cleanup of debug instrumentation
2026-11-11 23:08:11 -03:00
lgcosta
dc73274b19
route-to: fix skb reference imbalance in if_output_tso (stack output consumed the queue's ref -> double kfree_skb, wedging the box); look up the forced route by destination only
2026-11-11 22:35:05 -03:00
lgcosta
7a81076c6a
pflog: /dev/pflog chardev backend (BSD pflog_hdr layout, DLT_PFLOG) + tools/pflogd + gate 12
2026-11-11 21:52:36 -03:00
lgcosta
0fe4d83b93
docs: divert status corrected after AF_DIVERT restore (COMPILES untested, M4 e2e gate defined)
2026-11-11 18:50:29 -03:00
lgcosta
a0941b77fe
M2 data path: BSD netisr workqueue + lock reentrancy fixes + diagnostics
...
- hooks: packets are queued to pfk_netisr ordered wq (process context) and
re-injected with an skb->mark guard (PFK_MARK_PASSED); softirq-safe,
documented divergence vs OpenBSD in-place ip_input continuation
- pfk_rwlock: per-task writer recursion (NET/PF lock nesting like OpenBSD)
- pfk_net: holder-task+depth reentrancy (pid-based hack removed)
- ifnet events deferred to ordered workqueue (rtnl AB-BA fix)
- idr iteration start index fix (kifs were never attached -> kif==NULL drop)
- pfk_lock_trace module param for lock diagnostics
- tests/vm: 01-state 02-block 03-tables 04-anchors + lib; vm-run-tests.sh
- docs/en/install.md: apply/build guide (core patch set currently EMPTY)
2026-11-11 17:05:53 -03:00
lgcosta
5323ee2c71
M2: live netfilter data path (pf_test per direction), pfattach bring-up, NET_LOCK reentrancy fix, static pfctl
...
- pfk_hooks: PRE→PF_IN, LOCAL_OUT/POST→PF_OUT v4+v6; replacement/buffer
handling with NF_STOLEN + re-injection (documented divergence: re-entry)
- pfk_mod: pf_status_init/pfattach + pfi attach via pfk_if event callback
- pfk_kern: NET_LOCK holder reentrancy (fix deadlock when notifier fires
under the write lock — observed as full-VM network hang)
- tools: static pfctl link for musl VMs
2026-11-11 15:20:01 -03:00
lgcosta
0119e70960
M1: pf.c compiles into pf.ko
2026-11-11 14:55:20 -03:00
lgcosta
1fcd7b3046
M1 progress: engine port compiles except pf.c; AF_DIVERT socket family; ifq framework
...
- compat layer extended through the full BSD API surface pf_ioctl/pf_lb/
pf_if/pf_norm/pf_table/pf_ruleset/radix/md5/sha2 need (all compile):
cpumem/counters model, ifaddr/ifg groups, cred view, endian+in6 names,
NAT46/64, SipHash24, mbuf_list, frag6 helpers, ip6 forward/checksum,
tcp options/FSM names, taskqueue & sysctl shims (documented in
docs/porting-notes.md)
- pfsrc/divert_sock.c: real BSD divert(4) as runtime-registered PF_DIVERT=32
socket family inside the module (sock_register; NPROTO=AF_MAX=45 -> zero
core patches); divert_packet/divert6_packet wired for pf.c
- compat/pfk_ifq.c: OpenBSD 8.0 ifq framework with priq back end; hfsc and
fq_codel aliases pending M5 (recorded in feature matrix as pending)
- design + plan updated for the divert decision (user-requested)
- stage-port.sh: single deterministic rename program for headers and .c
2026-11-11 13:35:53 -03:00
lgcosta
a84b2c91f3
M1: vendored sha2/md5 (OpenBSD 8.0) + endian/swap compat; module builds green
2026-11-11 12:20:27 -03:00
lgcosta
da2e9b679a
M1: compat layer + pf.ko skeleton builds against Linux 7.3.4
...
- pfk.h: BSD types/ioctl encoding (OpenBSD bit layout), locks (NET_LOCK=rwsem),
pools, timeouts, mbuf shim over sk_buff, ifnet registry, toeplitz/siphash
- pfk_mod/pfk_hooks: misc /dev/pf (0600), IPv4 netfilter hook skeleton,
DIOCGETSTATUS answered (M1 skeleton; engine ioctls land with pf_ioctl.c)
- vendorize/stage-port scripts: deterministic upstream staging with seds
(struct renames, IFF_*->PFIFF_*, sa_len drops) logged to docs/porting-notes
- fixes: modules_prepare+Module.symvers for out-of-tree builds
2026-11-11 12:09:34 -03:00