Skip to content

Commit

Permalink
Device is always "00" when it is calculated without sysfs
Browse files Browse the repository at this point in the history
Signed-off-by: Guvenc Gulce <[email protected]>
  • Loading branch information
guvenc committed Mar 14, 2024
1 parent 6019907 commit 899cb7a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion controllers/networkinterface_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -1323,7 +1323,7 @@ func (r *NetworkInterfaceReconciler) convertToDPDKDevice(addr ghw.PCIAddress) (s
pciDev, err := r.SysFS.PCIDevice(addr)
if err != nil {
// Calculate based on the offset parameter if sysfs not available
return fmt.Sprintf("%s:%s:%02x.0_representor_vf%d", addr.Domain, addr.Bus, pciDevice, pciFunction-uint64(r.PfToVfOffset)), nil
return fmt.Sprintf("%s:%s:00.0_representor_vf%d", addr.Domain, addr.Bus, pciFunction-uint64(r.PfToVfOffset)), nil
} else {
physFn, err := pciDev.Physfn()
if err != nil {
Expand Down

0 comments on commit 899cb7a

Please sign in to comment.