Skip to content

Commit

Permalink
Merge pull request #39 from e0ne/dpu-mode-fix
Browse files Browse the repository at this point in the history
Do not return DPU mode on error
  • Loading branch information
e0ne authored Jan 6, 2025
2 parents af38712 + 7fc8e0e commit 73f66a5
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions pkg/vendors/mellanox/mellanox.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,27 +99,27 @@ func (m *mellanoxHelper) GetMellanoxBlueFieldMode(PciAddress string) (BlueFieldM

internalCPUPageSupplierstatus, exist := mstCurrentData[internalCPUPageSupplier]
if !exist {
return 0, fmt.Errorf("failed to find %s in the mstconfig output command", internalCPUPageSupplier)
return -1, fmt.Errorf("failed to find %s in the mstconfig output command", internalCPUPageSupplier)
}

internalCPUEswitchManagerStatus, exist := mstCurrentData[internalCPUEswitchManager]
if !exist {
return 0, fmt.Errorf("failed to find %s in the mstconfig output command", internalCPUEswitchManager)
return -1, fmt.Errorf("failed to find %s in the mstconfig output command", internalCPUEswitchManager)
}

internalCPUIbVportoStatus, exist := mstCurrentData[internalCPUIbVporto]
if !exist {
return 0, fmt.Errorf("failed to find %s in the mstconfig output command", internalCPUIbVporto)
return -1, fmt.Errorf("failed to find %s in the mstconfig output command", internalCPUIbVporto)
}

internalCPUOffloadEngineStatus, exist := mstCurrentData[internalCPUOffloadEngine]
if !exist {
return 0, fmt.Errorf("failed to find %s in the mstconfig output command", internalCPUOffloadEngine)
return -1, fmt.Errorf("failed to find %s in the mstconfig output command", internalCPUOffloadEngine)
}

internalCPUModelStatus, exist := mstCurrentData[internalCPUModel]
if !exist {
return 0, fmt.Errorf("failed to find %s in the mstconfig output command", internalCPUModel)
return -1, fmt.Errorf("failed to find %s in the mstconfig output command", internalCPUModel)
}

// check for DPU
Expand Down

0 comments on commit 73f66a5

Please sign in to comment.