Skip to content

#315 - Add hardware-free configuration validation - #316

Merged
dleshchev merged 7 commits into
mainfrom
feat/315-config-validator
Sep 28, 2026
Merged

dleshchev merged 7 commits into
mainfrom
feat/315-config-validator

Conversation

@dleshchev

@dleshchev dleshchev commented Sep 21, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Add an installed, hardware-free C++ configuration validator that uses DAQIRI's production YAML parser and the same common semantic checks as daqiri_init(). Validation does not allocate packet memory, initialize a transport engine, or touch a NIC.

Related issue

Closes #315.

This is the validation foundation for #302 and #307.

Changes

  • Add daqiri_config_validate <config.yaml> [...], with exit status 0 when every file is valid, 1 when any file is invalid, and 2 for incorrect usage.
  • Share hardware-independent semantic validation between the standalone tool and every production engine initialization path.
  • Reject unsupported YAML scalar forms and common semantic errors before engine initialization, including malformed queue cores, endpoints, flow targets, and transformed frame sizes.
  • Build and install the tool independently of DAQIRI_BUILD_EXAMPLES.
  • Validate representative checked-in configurations and focused parser/common-semantic regressions from the local PR and container-release paths.
  • Register a hardware-free CTest regression that exercises common validation through daqiri_init() before socket initialization.
  • Document the validator and configuration-check workflow.

Validation

  • Privileged project-container Release configure/build with DAQIRI_BUILD_EXAMPLES=OFF, DAQIRI_ENGINE="dpdk ibverbs", and GPU/hugepage access: passed.
  • Installed daqiri_config_validate presence and execution: passed.
  • Production daqiri_init_from_yaml_string() regression for a UDP queue referencing an undefined memory region: 1/1 CTest passed, with rejection before socket initialization.
  • Focused valid/invalid parser and semantic cases, including usage exit status, strict booleans and integers, cpu_core: -1, malformed endpoints, missing memory regions, unknown flow queues, unknown reorder flow references, duplicate static flow IDs, per-interface DPDK flow ID 0 compatibility, and oversized transformed frames: passed.
  • scripts/check_pr.sh: 9 portable tests, 7 representative checked-in configurations, 1 compatibility case, 14 expected-invalid parser/common-semantic regressions, strict MkDocs build, HTML links, and documentation-reference checks passed.
  • Diff-scoped clang-format and test-source clang-format --dry-run --Werror: passed.
  • DCO trailers and git diff --check: passed.

Dependencies or follow-up

PR #307 is based on this branch and supplies deterministic configuration generation plus the broader retained/generated configuration matrices. Parser and common-semantic rejection coverage remains in this foundation PR; PR #307 checks that valid generated output crosses the Python/C++ boundary successfully. This PR intentionally contains no Python generator or schema implementation.

@dleshchev
dleshchev force-pushed the feat/315-config-validator branch from 9109f0a to 6f73e7c Compare September 22, 2026 17:35
@dleshchev
dleshchev marked this pull request as ready for review September 22, 2026 17:37
@dleshchev
dleshchev requested review from RamyaGuru and cliffburdick and removed request for cliffburdick September 22, 2026 17:37
@greptile-apps

greptile-apps Bot commented Sep 22, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 5/5

[Medium risk] Adds configuration validation tooling and tests.

The PR appears safe to merge; no outstanding finding or new actionable issue was identified.

Summary

The PR adds an installed, hardware-free configuration validator, shares semantic checks with engine initialization, strengthens YAML parsing, and adds configuration and CTest coverage. Since the previous review, the only change clarifies contributor guidance for extending that coverage.

Reviews (8) · Last reviewed commit: "#315 - Document configuration validation..."

Comment thread src/engine.cpp
@dleshchev
dleshchev force-pushed the feat/315-config-validator branch from 6f73e7c to a4ed917 Compare September 22, 2026 18:31
@dleshchev
dleshchev marked this pull request as draft September 22, 2026 18:33
@dleshchev
dleshchev marked this pull request as ready for review September 22, 2026 19:12
@dleshchev
dleshchev force-pushed the feat/315-config-validator branch from 03166cb to 6be5a13 Compare September 28, 2026 19:57
@dleshchev
dleshchev merged commit 73dd724 into main Sep 28, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEA] Add hardware-free configuration validation

2 participants