Boundary mode: performance optimizations + boundary filter
Performance optimizations: - Move TLSF allocator pool to PSRAM (frees ~170KB internal SRAM) - Raise TCP_IF_MAX_CLIENTS from 4 to 8 in BOUNDARY_MODE - Raise path_table_maxsize from 48 to 128, persist from 16 to 32 - Add -DNDEBUG to boundary build: compiles out TRACE/DEBUG macros - Log level defaults to LOG_VERBOSE when NDEBUG defined - Serial baud 115200 -> 921600 in BOUNDARY_MODE (reduces CPU blocking) Previous changes included in this commit: - Comprehensive boundary filter with transitive whitelisting (7 checks) - destination_table erase+insert fix (std::map::insert no-overwrite bug) - Backbone-to-backbone routing guard in next-hop forwarding - KISS serial output disabled for boundary mode - flash.py updates for boundary mode support
This commit is contained in:
@@ -647,13 +647,12 @@ void setup() {
|
||||
// ── Boundary Mode: Load config and optionally set up WiFi + TCP ──
|
||||
HEAD("Boundary Mode: Initializing...", RNS::LOG_TRACE);
|
||||
|
||||
// Reduce table sizes to conserve heap on ESP32.
|
||||
// Default 100 entries for each table fragments heap to critical levels.
|
||||
// 48 entries gives enough room for local paths plus some backbone paths.
|
||||
// With TLSF pool moved to PSRAM we have plenty of room.
|
||||
// 128 path entries supports ~15-20 devices comfortably.
|
||||
// cull_path_table() is patched to evict backbone paths first, preserving
|
||||
// local (LoRa / local-TCP) paths needed for inbound message delivery.
|
||||
RNS::Transport::path_table_maxsize(48);
|
||||
RNS::Transport::path_table_maxpersist(16);
|
||||
RNS::Transport::path_table_maxsize(128);
|
||||
RNS::Transport::path_table_maxpersist(32);
|
||||
boundary_load_config();
|
||||
|
||||
// Start WiFi if enabled
|
||||
|
||||
Reference in New Issue
Block a user