Skip to content

E21: Port-Time Configurability #217

Description

@DavidCozens

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    epicEpic issue

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions