Skip to content

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

Open
dleshchev wants to merge 5 commits into
mainfrom
feat/315-config-validator
Open

dleshchev wants to merge 5 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.

Signed-off-by: Denis Leshchev <dleshchev@nvidia.com>
@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

The PR appears safe to merge; the previously reported validation bypass is resolved and no new actionable failures were found.

Summary

Adds an installed, hardware-free configuration validator and strengthens production configuration parsing and shared semantic validation.

  • Introduces daqiri_config_validate with build, installation, container, and local-check integration.
  • Applies common semantic validation across DPDK, ibverbs, RDMA, and socket initialization paths.
  • Tightens YAML scalar, mapping, endpoint, queue, flow, memory-region, and reorder validation.
  • Adds a hardware-free CTest regression and focused checked-in configuration checks.
  • Updates API, build, testing, and configuration documentation.

Reviews (5) · Last reviewed commit: "#315 - Complete validator documentation ..."

Comment thread src/engine.cpp
Signed-off-by: Denis Leshchev <dleshchev@nvidia.com>
@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
Signed-off-by: Denis Leshchev <dleshchev@nvidia.com>
@dleshchev
dleshchev marked this pull request as ready for review September 22, 2026 19:12
Signed-off-by: Denis Leshchev <dleshchev@nvidia.com>
Signed-off-by: Denis Leshchev <dleshchev@nvidia.com>

This branch has not been deployed

No deployments
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