Skip to content

WIP: Add firmware-search-path option to nvcdi package#317

Open
cdesiniotis wants to merge 2 commits intoNVIDIA:mainfrom
cdesiniotis:CNT-4736/custom-fw-search-paths-toolkit-ctr
Open

WIP: Add firmware-search-path option to nvcdi package#317
cdesiniotis wants to merge 2 commits intoNVIDIA:mainfrom
cdesiniotis:CNT-4736/custom-fw-search-paths-toolkit-ctr

Conversation

@cdesiniotis
Copy link
Contributor

@cdesiniotis cdesiniotis commented Jan 30, 2024

Signed-off-by: Christopher Desiniotis <cdesiniotis@nvidia.com>
Signed-off-by: Christopher Desiniotis <cdesiniotis@nvidia.com>
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds a new option to allow specifying custom firmware search paths for generating the CDI specification. Key changes include:

  • Introducing a new CLI flag ("cdi-firmware-search-paths") in toolkit.go.
  • Adding the WithFirmwareSearchPaths option and updating related function signatures across the nvcdi package.
  • Propagating the firmware search paths parameter to NVML- and management-mode driver discoverers.

Reviewed Changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
tools/container/toolkit/toolkit.go Added a new CLI flag and updated generateCDISpec to pass custom firmware search paths
pkg/nvcdi/options.go Introduced WithFirmwareSearchPaths to set firmware search paths in the nvcdilib structure
pkg/nvcdi/management.go Modified newDriverVersionDiscoverer call to include firmware search paths
pkg/nvcdi/lib.go Extended nvcdilib to include a firmwareSearchPaths field
pkg/nvcdi/driver-nvml.go Updated NewDriverDiscoverer and related functions to accept and propagate firmware search paths
pkg/nvcdi/common-nvml.go Passed firmware search paths to NewDriverDiscoverer from the NVML discoverer
Comments suppressed due to low confidence (1)

tools/container/toolkit/toolkit.go:221

  • Consider adding test cases to cover scenarios when custom firmware search paths are provided, ensuring they are correctly parsed and passed to generate the CDI specification.
&cli.StringSliceFlag{


// WithFirmwareSearchPaths sets the firmware search paths.
// This is currently only used for NVML- and Management-Mode.
func WithFirmwareSearchPaths(paths []string) Option {
Copy link

Copilot AI May 24, 2025

Choose a reason for hiding this comment

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

[nitpick] Augment the function comment to include expected input formats and examples for firmware search paths to help clarify usage for future maintainers.

Copilot uses AI. Check for mistakes.
}

func getFirmwareSearchPaths(logger logger.Interface) ([]string, error) {
func getFirmwareSearchPaths(logger logger.Interface, fwSearchPaths ...string) ([]string, error) {
Copy link

Copilot AI May 24, 2025

Choose a reason for hiding this comment

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

[nitpick] While the fallback behavior is clear from the implementation, adding a brief note in the function comment about how custom firmware search paths override defaults would improve clarity.

Copilot uses AI. Check for mistakes.
@ArangoGutierrez ArangoGutierrez added the needs-rebase Pull request has merge conflicts label May 24, 2025
@elezar elezar removed the needs-rebase Pull request has merge conflicts label Sep 16, 2025
@github-actions
Copy link

This PR is stale because it has been open 90 days with no activity. This PR will be closed in 30 days unless new comments are made or the stale label is removed. To skip these checks, apply the "lifecycle/frozen" label.

@github-actions github-actions bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Feb 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants