Skip to content

feat: dpf: DpuFlavor changes for BF4.#3195

Merged
abvarshney-nv merged 1 commit into
NVIDIA:mainfrom
abvarshney-nv:bf4_generic_deployment
Jul 7, 2026
Merged

feat: dpf: DpuFlavor changes for BF4.#3195
abvarshney-nv merged 1 commit into
NVIDIA:mainfrom
abvarshney-nv:bf4_generic_deployment

Conversation

@abvarshney-nv

Copy link
Copy Markdown
Contributor

DpuFlavor changes for BF4.

Related issues

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.)

Additional Notes

@abvarshney-nv abvarshney-nv requested a review from a team as a code owner July 7, 2026 09:54
@coderabbitai

coderabbitai Bot commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Summary by CodeRabbit

  • New Features
    • Added support for an additional DPU deployment flavor, including BF4-specific startup and networking configuration.
    • Improved default flavor selection so the system now chooses the appropriate flavor based on deployment type.
    • Updated the default configuration flow to apply BF4-specific system and service settings automatically.

Walkthrough

Adds BF4-generic flavor support to the DPU flavor module: a new flavor_bf4 builder using bf4_grub_params and a BF4-specific OVS raw config script generator, a DEFAULT_FLAVOR_NAME constant, and updated dispatch logic in default_flavor_for selecting flavors by DpuDeploymentType.

Changes

BF4 Flavor Support

Layer / File(s) Summary
Deployment-type dispatch
crates/dpf/src/flavor.rs
default_flavor_for now matches on DpuDeploymentType, calling flavor_bf4 for Bf4Generic and default_flavor for Bf3, replacing the prior unconditional default behavior.
BF4 flavor builder and grub params
crates/dpf/src/flavor.rs
Adds flavor_bf4 which constructs a DPUFlavor spec with BF4 grub parameters (via new bf4_grub_params), BF4 OVS raw config script, and default nvconfig; adds DEFAULT_FLAVOR_NAME constant and extends generated-type imports.
BF4 OVS raw config script
crates/dpf/src/flavor.rs
Adds get_bf4_ovs_defaults generating a script that removes existing OVS bridges, deletes the kernel-side OVS datapath, restarts the Open vSwitch service, and recreates/configures br-sfc/p0 with DPDK and datapath parameters.

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

Sequence Diagram(s)

sequenceDiagram
    participant Caller
    participant default_flavor_for
    participant flavor_bf4
    participant bf4_grub_params
    participant get_bf4_ovs_defaults
    participant default_flavor

    Caller->>default_flavor_for: request flavor(deployment_type)
    alt deployment_type is Bf4Generic
        default_flavor_for->>flavor_bf4: build BF4 flavor
        flavor_bf4->>bf4_grub_params: get grub params
        flavor_bf4->>get_bf4_ovs_defaults: get OVS raw config script
        flavor_bf4-->>default_flavor_for: DPUFlavor
    else deployment_type is Bf3
        default_flavor_for->>default_flavor: build default flavor
        default_flavor-->>default_flavor_for: DPUFlavor
    end
    default_flavor_for-->>Caller: Result<DPUFlavor, DpfError>
Loading

Possibly related PRs

  • NVIDIA/infra-controller#3084: Both PRs thread DpuDeploymentType through default_flavor_for to select flavor construction logic based on deployment type.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title is concise and accurately reflects the BF4 DpuFlavor changes in this PR.
Description check ✅ Passed The description is clearly related to the BF4 DpuFlavor changes and matches the PR objective.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@crates/dpf/src/flavor.rs`:
- Around line 68-79: The cleanup loop in get_bf4_ovs_defaults() is bypassing the
existing _ovs-vsctl timeout wrapper by calling ovs-vsctl directly, so update the
del-br loop to use _ovs-vsctl instead. Keep the BF4 cleanup path consistent with
the rest of the helper commands in get_bf4_ovs_defaults() so all OVSDB
operations remain bounded by the 15s timeout.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 45d78a93-f878-4c25-a2d3-f23b257b4f01

📥 Commits

Reviewing files that changed from the base of the PR and between eb644a2 and c989c93.

📒 Files selected for processing (1)
  • crates/dpf/src/flavor.rs

Comment thread crates/dpf/src/flavor.rs
@github-actions

github-actions Bot commented Jul 7, 2026

Copy link
Copy Markdown

🔍 Container Scan Summary

Service Total Critical High Medium Low Other
boot-artifacts-aarch64 3 0 0 3 0 0
boot-artifacts-x86_64 3 0 0 3 0 0
forge-admin-cli-x86_64 270 13 33 91 7 126
machine-validation-runner 771 37 219 281 40 194
machine_validation 771 37 219 281 40 194
machine_validation-aarch64 771 37 219 281 40 194
nvmetal-carbide 771 37 219 281 40 194
TOTAL 3360 161 909 1221 167 902

Per-CVE detail lives in the per-service grype-* artifacts (JSON + SARIF). Severity counts only — no CVE IDs published here.

@abvarshney-nv abvarshney-nv merged commit dedba7b into NVIDIA:main Jul 7, 2026
59 checks passed
@abvarshney-nv abvarshney-nv deleted the bf4_generic_deployment branch July 7, 2026 15:07
@coderabbitai coderabbitai Bot mentioned this pull request Jul 9, 2026
10 tasks
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.

2 participants