fix: Get devlink parameters for the first device only#142
Conversation
This will return PF parameters only if PF PCI address provided and VF parameters for VF PC address. Signed-off-by: Ivan Kolodiazhnyi <ikolodiazhny@nvidia.com>
|
Thanks for your PR,
To skip the vendors CIs, Maintainers can use one of:
|
Greptile SummaryAdded deduplication logic to
Confidence Score: 4/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant Caller
participant GetDevlinkDeviceParams
participant netlinkLib
participant Deduplication
participant Merging
Caller->>GetDevlinkDeviceParams: Request params for PCI address
GetDevlinkDeviceParams->>netlinkLib: DevlinkGetDeviceParams(bus, pciAddr)
netlinkLib-->>GetDevlinkDeviceParams: Return []*DevlinkParam (may have duplicates)
GetDevlinkDeviceParams->>Deduplication: Deduplicate by name
Note over Deduplication: Keep only first occurrence<br/>of each param name
Deduplication-->>GetDevlinkDeviceParams: pfParams (deduplicated list)
GetDevlinkDeviceParams->>Merging: Merge params by name and CMODE
Note over Merging: Group by name, then by CMODE<br/>(runtime, driverinit, permanent)
Merging-->>GetDevlinkDeviceParams: devlinkParams (final list)
GetDevlinkDeviceParams-->>Caller: Return []DevlinkParam
|
Greptile's behavior is changing!From now on, if a review finishes with no comments, we will not post an additional "statistics" comment to confirm that our review found nothing to comment on. However, you can confirm that we reviewed your changes in the status check section. This feature can be toggled off in your Code Review Settings by deselecting "Create a status check for each PR". |
|
Can there be a case where values on different PFs are different? |
212232b
into
Mellanox:network-operator-26.1.x
This will return PF parameters only if PF PCI address provided and VF parameters for VF PC address.