Skip to content

fix(api-model): recognize hyphenated BlueField-3 DPU models - #4829

Merged
behroozrafii merged 1 commit into
NVIDIA:mainfrom
behroozrafii:codex/4804-bf3-model
Aug 11, 2026
Merged

fix(api-model): recognize hyphenated BlueField-3 DPU models#4829
behroozrafii merged 1 commit into
NVIDIA:mainfrom
behroozrafii:codex/4804-bf3-model

Conversation

@behroozrafii

Copy link
Copy Markdown
Contributor

Redfish reports from affected BF3 cards use the chassis model BlueField-3 DPU. EndpointExplorationReport::identify_dpu() previously duplicated model parsing and only recognized the space-separated form, so these reports were classified as Unknown. That prevented the BF3 BMC eth0 PF0 MAC fallback from running when the system-image MAC was unavailable.

This change reuses the shared DpuModel parser, which normalizes hyphens, and covers both model spellings through DPU identification, BF3/BF4 topology discrimination, and PF MAC derivation. It also changes EndpointExplorationReport::model() for affected reports from unknown to bluefield3.

Related issues

Fixes #4804

Type of Change

  • Add - New feature or capability
  • Change - Changes in existing functionality
  • Fix - Bug fixes
  • Remove - Removed features or deprecated functionality
  • Internal - Internal changes (refactoring, tests, docs, etc.)

Breaking Changes

  • This PR contains breaking changes

Testing

  • Unit tests added/updated

  • Integration tests added/updated

  • Manual testing performed

  • No testing required (docs, internal refactor, etc.)

  • cargo fmt --check

  • cargo test -p carbide-api-model identify_dpu

  • Linux with PostgreSQL: cargo test -p carbide-api-model -p carbide-site-explorer --lib — 424 and 59 tests passed

  • Linux with PostgreSQL: cargo test -p carbide-firmware --lib — 23 tests passed

  • cargo clippy -p carbide-api-model --all-targets

  • Linux: cargo clippy -p carbide-api-model -p carbide-site-explorer --all-targets

Additional Notes

EndpointExplorationReport::model() feeds firmware config lookup: site exploration stores its result on the report, and FirmwareConfig::find_fw_info_for_host_report() also invokes it as a fallback. That entry point has no direct unit coverage; it is exercised through preingestion-manager’s PostgreSQL-backed integration tests in CI. FirmwareConfig::find() independently normalizes model strings through DpuModel::from, so lookups already handled both spellings.

The process-local SQLx integration executable in crates/site-explorer/tests/integration/main.rs was not run locally. CI provides its PostgreSQL-backed integration coverage.

Reuse the shared DpuModel parser when identifying DPUs so Redfish chassis
models such as "BlueField-3 DPU" classify as BlueField3. This lets the BF3
BMC eth0 PF0 MAC fallback run when the system-image MAC is unavailable and
changes model() from "unknown" to "bluefield3".

Cover both BF3 spellings, BF2 and unknown models, the BF3 topology guard,
and PF MAC derivation. The process-local site-explorer integration
executable was not run locally and remains covered by CI.

Fixes NVIDIA#4804
@behroozrafii
behroozrafii requested a review from a team as a code owner August 11, 2026 18:27
@coderabbitai

coderabbitai Bot commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 24a26dd1-0c6a-4220-9c31-3a8331cdd9fa

📥 Commits

Reviewing files that changed from the base of the PR and between a69c085 and 5b919eb.

📒 Files selected for processing (2)
  • crates/api-model/src/site_explorer/mod.rs
  • crates/site-explorer/src/lib.rs

Summary by CodeRabbit

  • Bug Fixes
    • Improved detection of BlueField 2 and BlueField 3 systems across supported model-name variants.
    • Improved network identification when the legacy system-image value is unavailable by deriving the PF MAC from the BMC network interface.
    • Prevented locally administered MAC addresses from being accepted as valid hardware identifiers.
    • Added handling for unknown models and non-BlueField systems.

Walkthrough

The change returns parsed DPU models directly and expands BlueField-3 coverage. Tests cover model variants, unknown systems, locally administered BMC MACs, and PF MAC derivation from BMC eth0 when system-image data is empty.

Changes

BlueField detection and MAC fallback

Layer / File(s) Summary
DPU model identification
crates/api-model/src/site_explorer/mod.rs
identify_dpu returns the parsed DpuModel directly. Tests cover BlueField-2, BlueField-3, unknown, and non-BlueField models.
BlueField-3 MAC fallback coverage
crates/site-explorer/src/lib.rs
Fixtures and parameterized tests cover both BlueField-3 model variants, reject locally administered BMC MACs, and derive the PF MAC from synchronized BMC eth0 data when the system-image version is empty.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the primary fix: recognition of hyphenated BlueField-3 DPU model names.
Description check ✅ Passed The description explains the bug, implementation, affected fallback behavior, tests, and linked issue.
Linked Issues check ✅ Passed The changes reuse DpuModel parsing, recognize BlueField-3 DPU, enable BF3 MAC fallback, and add targeted tests for issue #4804.
Out of Scope Changes check ✅ Passed The code and test changes remain within the linked issue scope of DPU identification and BF3 PF0 MAC fallback.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands.

@behroozrafii
behroozrafii merged commit 2e2989a into NVIDIA:main Aug 11, 2026
65 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.

bug: BF3 PF0 MAC fallback fails for Redfish model "BlueField-3 DPU"

2 participants