Overview
Some library-internal constants are deliberately tuned for a default
hosted/embedded balance, but real users on memory-constrained or
latency-sensitive targets will want to tune them at build time. This
epic gathers those candidates under a single CMake override
mechanism, plus the documentation needed for a porter to actually
use it.
Approach
The shape, already in place from S21.01 (#347):
-D<NAME>=<value> -> #define <NAME> <value> -> enum default guarded by #ifndef
CMake exposes cache variables that surface as preprocessor defines.
Each tunable lives as an enum default in code, guarded by #ifndef
so a -D override wins. Per-target overrides flow through
SOLIDSYSLOG_USER_TUNABLES_FILE (a single integrator-owned header).
Done
Absorbed by other epics
Story — Store block-size architecture — S21.04 (#527)
The SolidSyslogBlockDevice vtable gains a GetBlockSize operation so
the device becomes the single source of truth, MaxBlockSize drops out
of SolidSyslogBlockStoreConfig, and all file-backed devices share one
SOLIDSYSLOG_FILE_BLOCK_SIZE tunable. API-breaking — scheduled into
the 0.x beta window so it lands before 1.0.0 (additive-only). Full
shape, blast radius, and acceptance criteria live in the story (#527).
Explicitly rejected
MAX_BLOCK_INDEX = 99 in SolidSyslogFileBlockDevice.c. Coupled
to the two-digit on-disk sequence in filenames and to
BlockSequence::SEQUENCE_MODULUS = 100 for wrap detection. The
100-block cap is high enough for any realistic use case and the
value consumes no runtime memory. Leave hardcoded.
Documentation — folded into E23 (#246)
The porting / tunables documentation page (full list of overridable
constants, recommended ranges, -D / preset / SOLIDSYSLOG_USER_TUNABLES_FILE
usage, memory and test/BDD implications) is tracked under E23
(Documentation site), not as a separate E21 story — it belongs with
the rest of the porting docs rather than duplicating the docs workflow
here. The current per-tunable header comments in
Core/Interface/SolidSyslogTunablesDefaults.h remain the interim docs
(per S21.01's "the defaults header is the docs" decision) until E23
collects them.
Stories
| Story |
Title |
Status |
| S21.01 (#347) |
SOLIDSYSLOG_MAX_MESSAGE_SIZE as the first tunable — mechanism |
Done |
| S21.02 (#349) |
Tune SOLIDSYSLOG_MAX_MESSAGE_SIZE to 512 on freertos-cross |
Done |
| S21.03 (#446) |
Lift MAX_PATH_SIZE and MAX_INTEGRITY_SIZE to tunables |
Done |
| — |
TCP connect + TLS handshake timeout tunables (compile-time side) |
Absorbed by S12.17 (#282) |
| S21.04 (#527) |
BlockDevice reports block size + single SOLIDSYSLOG_FILE_BLOCK_SIZE tunable |
Todo |
| — |
Porting / tunables documentation page |
Moved to E23 (#246) |
Overview
Some library-internal constants are deliberately tuned for a default
hosted/embedded balance, but real users on memory-constrained or
latency-sensitive targets will want to tune them at build time. This
epic gathers those candidates under a single CMake override
mechanism, plus the documentation needed for a porter to actually
use it.
Approach
The shape, already in place from S21.01 (#347):
CMake exposes cache variables that surface as preprocessor defines.
Each tunable lives as an
enumdefault in code, guarded by#ifndefso a
-Doverride wins. Per-target overrides flow throughSOLIDSYSLOG_USER_TUNABLES_FILE(a single integrator-owned header).Done
SOLIDSYSLOG_MAX_MESSAGE_SIZE— S21.01 (S21.01: SOLIDSYSLOG_MAX_MESSAGE_SIZE as the first build-time tunable — mbedTLS-style override mechanism #347, mechanism + firsttunable, default unchanged at 2048) and S21.02 (S21.02: Tune SOLIDSYSLOG_MAX_MESSAGE_SIZE to 512 on the freertos-cross preset #349, retuned to 512
on the freertos-cross preset).
SOLIDSYSLOG_MAX_PATH_SIZEandSOLIDSYSLOG_MAX_INTEGRITY_SIZE— S21.03 (S21.03: Lift MAX_PATH_SIZE and MAX_INTEGRITY_SIZE to tunables #446) lifted both into
SolidSyslogTunablesDefaults.hinone bundled story. Defaults unchanged (128 and 32); floors 32 and 4
respectively.
Absorbed by other epics
under
SEND_TIMEOUT_*(since renamed toCONNECT_TIMEOUT_*andHANDSHAKE_TIMEOUT_*during S12.14/S12.16). Delivered byS12.17 (S12.17: Tunable + runtime-overridable TCP connect and TLS handshake timeouts #282, merged PR feat: S12.17 tunable + runtime-overridable TCP connect and TLS handshake timeouts #447) under E12, which uses the E21
tunables mechanism for the compile-time defaults
(
SOLIDSYSLOG_TCP_CONNECT_TIMEOUT_MS,SOLIDSYSLOG_TLS_HANDSHAKE_TIMEOUT_MS) and overlays a per-instanceruntime getter + Null Object on top so integrators can also
live-tune without rebuilding firmware.
Story — Store block-size architecture — S21.04 (#527)
The
SolidSyslogBlockDevicevtable gains aGetBlockSizeoperation sothe device becomes the single source of truth,
MaxBlockSizedrops outof
SolidSyslogBlockStoreConfig, and all file-backed devices share oneSOLIDSYSLOG_FILE_BLOCK_SIZEtunable. API-breaking — scheduled intothe 0.x beta window so it lands before 1.0.0 (additive-only). Full
shape, blast radius, and acceptance criteria live in the story (#527).
Explicitly rejected
MAX_BLOCK_INDEX = 99inSolidSyslogFileBlockDevice.c. Coupledto the two-digit on-disk sequence in filenames and to
BlockSequence::SEQUENCE_MODULUS = 100for wrap detection. The100-block cap is high enough for any realistic use case and the
value consumes no runtime memory. Leave hardcoded.
Documentation — folded into E23 (#246)
The porting / tunables documentation page (full list of overridable
constants, recommended ranges,
-D/ preset /SOLIDSYSLOG_USER_TUNABLES_FILEusage, memory and test/BDD implications) is tracked under E23
(Documentation site), not as a separate E21 story — it belongs with
the rest of the porting docs rather than duplicating the docs workflow
here. The current per-tunable header comments in
Core/Interface/SolidSyslogTunablesDefaults.hremain the interim docs(per S21.01's "the defaults header is the docs" decision) until E23
collects them.
Stories
SOLIDSYSLOG_MAX_MESSAGE_SIZEas the first tunable — mechanismSOLIDSYSLOG_MAX_MESSAGE_SIZEto 512 on freertos-crossMAX_PATH_SIZEandMAX_INTEGRITY_SIZEto tunablesSOLIDSYSLOG_FILE_BLOCK_SIZEtunable