summaryrefslogtreecommitdiff
path: root/tests/accel-cmd/test_cmd_basic.py
diff options
context:
space:
mode:
authorDenys Fedoryshchenko <denys.f@collabora.com>2026-06-03 02:23:41 +0300
committerDenys Fedoryshchenko <denys.f@collabora.com>2026-06-03 14:57:45 +0300
commit8afec90643a6e6d923032ae5c50d6c18e7a8b0c3 (patch)
tree3d97ec841068a6d5a32fd3c2ac9a3555e61c2e7a /tests/accel-cmd/test_cmd_basic.py
parent8494d63943e69e2f7217ca401f6b9ba46b44cca8 (diff)
downloadaccel-ppp-8afec90643a6e6d923032ae5c50d6c18e7a8b0c3.tar.gz
accel-ppp-8afec90643a6e6d923032ae5c50d6c18e7a8b0c3.zip
ippool/ipv6pool: bitmap allocator + online reconfiguration
Replace the pre-generated free-list (one heap node per allocatable address/prefix) with a per-pool bitmap. Each pool holds a list of contiguous ranges, each range owning one bitmap (1 bit per unit); a lease is a small per-session malloc wrapper around the ipdb item, so pool memory is no longer shared or mutated by sessions. Memory now scales with capacity at ~1 bit/unit instead of ~96B (v4) / ~128B (v6) per unit; startup, `show ippool`, and backup-restore are O(1) instead of O(N)/O(N*M). Oversized IPv6 ranges (prefix_len-mask > 24) are rejected at parse time instead of OOMing in the malloc loop. The ipdb_t vtable, the owner-based put dispatch, ipdb.h structs, and struct ap_session are unchanged; RADIUS and chap-secrets backends are untouched (reconcile filters by owner). Preserved behavior: p2p/net30 allocators (via a step/gw_offset/ peer_offset geometry triple), shuffle (randomized scan start), named pools, next-chains, gw-ip-address, RADIUS pool-name attrs, and the USE_BACKUP save/restore path. `gw=` is now accepted-and-ignored (its per-address local gateway was already overridden at allocation time). New: online reconfiguration. An EV_CONFIG_RELOAD handler rebuilds the pool set and reconciles live sessions (sessions are the source of truth, the bitmap is rebuilt from them) under pool_set_rwlock(write) -> ses_lock(read) -> per-pool spinlock. Sessions whose address left the pools are handled per a new `reload-orphan = keep|disconnect` knob (default keep); foreign in-range addresses are reserved to avoid duplicate assignment. Adds extra/bitpool.h (shared bit-array helpers) and a standalone extra/bitpool_test.c (not wired into cmake) covering the bitmap and the v4/v6 address<->bit math, cross-checked against an __int128 reference. Signed-off-by: Denys Fedoryshchenko <denys.f@collabora.com>
Diffstat (limited to 'tests/accel-cmd/test_cmd_basic.py')
0 files changed, 0 insertions, 0 deletions