Skip to content

Commit efba57d

Browse files
fix
fix Signed-off-by: 张浩宇 <zhanghaoyu.zhy@bytedance.com>
1 parent 0893066 commit efba57d

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

pkg/util/machine/network.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ const (
4545
NicDriverVirtioNet = "virtio_net"
4646
NicDriverI40E = "i40e"
4747
NicDriverIXGBE = "ixgbe"
48+
NicDriverUnknown = "unknownNicDriver"
4849
)
4950

5051
// ioctl constants from <linux/sockios.h>, <linux/ethtool.h>

pkg/util/machine/sriov_linux.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ func isSriovPf(sysFsDir string, ifName string) bool {
155155
// detectSriovPFDriver returns the sriov supported driver name of PF.
156156
// We use ethtool as the standard way to get the driver name, other than reading file or link under /sys because
157157
// it might have different behaviors between nic vendors.
158-
func detectSriovPFDriver(ifName string) (NicDriver, error) {
158+
func detectSriovPFDriver(ifName string) (string, error) {
159159
driverName, err := ethtool.DriverName(ifName)
160160
if err != nil {
161161
return NicDriverUnknown, fmt.Errorf("failed to get driver name, err %w", err)

0 commit comments

Comments
 (0)