From b30ab2418691ffea23ba8c0478db4154f1192bd1 Mon Sep 17 00:00:00 2001 From: Vasilis Remmas Date: Wed, 8 May 2024 12:34:28 +0200 Subject: [PATCH] Drop MAC address check and rename LinkAdmState Signed-off-by: Vasilis Remmas --- api/v1/helper.go | 17 +- api/v1/sriovnetworknodestate_types.go | 2 +- ...k.openshift.io_sriovnetworknodestates.yaml | 2 +- ...k.openshift.io_sriovnetworknodestates.yaml | 2 +- pkg/consts/constants.go | 3 +- pkg/host/internal/sriov/sriov.go | 20 +- pkg/plugins/generic/generic_plugin_test.go | 464 +++++++----------- 7 files changed, 200 insertions(+), 310 deletions(-) diff --git a/api/v1/helper.go b/api/v1/helper.go index 1c0a778e6..27ccb4c14 100644 --- a/api/v1/helper.go +++ b/api/v1/helper.go @@ -272,8 +272,8 @@ func NeedToUpdateSriov(ifaceSpec *Interface, ifaceStatus *InterfaceExt) bool { return true } - if ifaceStatus.LinkAdmState == "down" { - log.V(2).Info("NeedToUpdateSriov(): PF link status needs update", "desired to include", "up", "current", ifaceStatus.LinkAdmState) + if ifaceStatus.LinkAdminState == "down" { + log.V(2).Info("NeedToUpdateSriov(): PF link status needs update", "desired to include", "up", "current", ifaceStatus.LinkAdminState) return true } @@ -307,20 +307,11 @@ func NeedToUpdateSriov(ifaceSpec *Interface, ifaceStatus *InterfaceExt) bool { } if strings.EqualFold(ifaceStatus.LinkType, consts.LinkTypeETH) { - // We do this check only if a MAC address is set to ensure that we were able to read the MAC - // address. We intentionally skip empty MAC address in vfStatus because this may happen - // when the VF is allocated to a workload. - if vfStatus.Mac == consts.DefaultMAC { - log.V(2).Info("NeedToUpdateSriov(): VF MAC Address needs update", - "vf", vfStatus.VfID, "current", vfStatus.Mac) - return true - } - if groupSpec.IsRdma { // We do this check only if a Node GUID is set to ensure that we were able to read the // Node GUID. We intentionally skip empty Node GUID in vfStatus because this may happen // when the VF is allocated to a workload. - if vfStatus.GUID == consts.DefaultNodeGUID { + if vfStatus.GUID == consts.UninitializedNodeGUID { log.V(2).Info("NeedToUpdateSriov(): VF GUID needs update", "vf", vfStatus.VfID, "current", vfStatus.GUID) return true @@ -330,7 +321,7 @@ func NeedToUpdateSriov(ifaceSpec *Interface, ifaceStatus *InterfaceExt) bool { // We do this check only if a Node GUID is set to ensure that we were able to read the // Node GUID. We intentionally skip empty Node GUID in vfStatus because this may happen // when the VF is allocated to a workload. - if vfStatus.GUID == consts.DefaultNodeGUID { + if vfStatus.GUID == consts.UninitializedNodeGUID { log.V(2).Info("NeedToUpdateSriov(): VF GUID needs update", "vf", vfStatus.VfID, "current", vfStatus.GUID) return true diff --git a/api/v1/sriovnetworknodestate_types.go b/api/v1/sriovnetworknodestate_types.go index 78b24f75b..d1d8a4ce8 100644 --- a/api/v1/sriovnetworknodestate_types.go +++ b/api/v1/sriovnetworknodestate_types.go @@ -63,7 +63,7 @@ type InterfaceExt struct { NumVfs int `json:"numVfs,omitempty"` LinkSpeed string `json:"linkSpeed,omitempty"` LinkType string `json:"linkType,omitempty"` - LinkAdmState string `json:"linkAdmState,omitempty"` + LinkAdminState string `json:"linkAdminState,omitempty"` EswitchMode string `json:"eSwitchMode,omitempty"` ExternallyManaged bool `json:"externallyManaged,omitempty"` TotalVfs int `json:"totalvfs,omitempty"` diff --git a/config/crd/bases/sriovnetwork.openshift.io_sriovnetworknodestates.yaml b/config/crd/bases/sriovnetwork.openshift.io_sriovnetworknodestates.yaml index c84e5cd20..2787b48fd 100644 --- a/config/crd/bases/sriovnetwork.openshift.io_sriovnetworknodestates.yaml +++ b/config/crd/bases/sriovnetwork.openshift.io_sriovnetworknodestates.yaml @@ -137,7 +137,7 @@ spec: type: string externallyManaged: type: boolean - linkAdmState: + linkAdminState: type: string linkSpeed: type: string diff --git a/deployment/sriov-network-operator/crds/sriovnetwork.openshift.io_sriovnetworknodestates.yaml b/deployment/sriov-network-operator/crds/sriovnetwork.openshift.io_sriovnetworknodestates.yaml index c84e5cd20..2787b48fd 100644 --- a/deployment/sriov-network-operator/crds/sriovnetwork.openshift.io_sriovnetworknodestates.yaml +++ b/deployment/sriov-network-operator/crds/sriovnetwork.openshift.io_sriovnetworknodestates.yaml @@ -137,7 +137,7 @@ spec: type: string externallyManaged: type: boolean - linkAdmState: + linkAdminState: type: string linkSpeed: type: string diff --git a/pkg/consts/constants.go b/pkg/consts/constants.go index 893172a17..3123107a8 100644 --- a/pkg/consts/constants.go +++ b/pkg/consts/constants.go @@ -43,8 +43,7 @@ const ( LinkTypeIB = "IB" LinkTypeETH = "ETH" - DefaultNodeGUID = "0000:0000:0000:0000" - DefaultMAC = "00:00:00:00:00:00" + UninitializedNodeGUID = "0000:0000:0000:0000" DeviceTypeVfioPci = "vfio-pci" DeviceTypeNetDevice = "netdevice" diff --git a/pkg/host/internal/sriov/sriov.go b/pkg/host/internal/sriov/sriov.go index 1e9d0c6bb..0f0e60624 100644 --- a/pkg/host/internal/sriov/sriov.go +++ b/pkg/host/internal/sriov/sriov.go @@ -261,16 +261,16 @@ func (s *sriov) DiscoverSriovDevices(storeManager store.ManagerInterface) ([]sri } iface := sriovnetworkv1.InterfaceExt{ - Name: pfNetName, - PciAddress: device.Address, - Driver: driver, - Vendor: device.Vendor.ID, - DeviceID: device.Product.ID, - Mtu: link.Attrs().MTU, - Mac: link.Attrs().HardwareAddr.String(), - LinkType: s.encapTypeToLinkType(link.Attrs().EncapType), - LinkSpeed: s.networkHelper.GetNetDevLinkSpeed(pfNetName), - LinkAdmState: s.networkHelper.GetNetDevLinkAdminState(pfNetName), + Name: pfNetName, + PciAddress: device.Address, + Driver: driver, + Vendor: device.Vendor.ID, + DeviceID: device.Product.ID, + Mtu: link.Attrs().MTU, + Mac: link.Attrs().HardwareAddr.String(), + LinkType: s.encapTypeToLinkType(link.Attrs().EncapType), + LinkSpeed: s.networkHelper.GetNetDevLinkSpeed(pfNetName), + LinkAdminState: s.networkHelper.GetNetDevLinkAdminState(pfNetName), } pfStatus, exist, err := storeManager.LoadPfsStatus(iface.PciAddress) diff --git a/pkg/plugins/generic/generic_plugin_test.go b/pkg/plugins/generic/generic_plugin_test.go index 9358f241e..cf16efd75 100644 --- a/pkg/plugins/generic/generic_plugin_test.go +++ b/pkg/plugins/generic/generic_plugin_test.go @@ -53,19 +53,19 @@ var _ = Describe("Generic plugin", func() { }, Status: sriovnetworkv1.SriovNetworkNodeStateStatus{ Interfaces: sriovnetworkv1.InterfaceExts{{ - PciAddress: "0000:00:00.0", - NumVfs: 1, - TotalVfs: 1, - DeviceID: "1015", - Vendor: "15b3", - Name: "sriovif1", - Mtu: 1500, - Mac: "0c:42:a1:55:ee:46", - Driver: "mlx5_core", - EswitchMode: "legacy", - LinkSpeed: "25000 Mb/s", - LinkType: "ETH", - LinkAdmState: "up", + PciAddress: "0000:00:00.0", + NumVfs: 1, + TotalVfs: 1, + DeviceID: "1015", + Vendor: "15b3", + Name: "sriovif1", + Mtu: 1500, + Mac: "0c:42:a1:55:ee:46", + Driver: "mlx5_core", + EswitchMode: "legacy", + LinkSpeed: "25000 Mb/s", + LinkType: "ETH", + LinkAdminState: "up", VFs: []sriovnetworkv1.VirtualFunction{{ PciAddress: "0000:00:00.1", DeviceID: "1016", @@ -102,19 +102,19 @@ var _ = Describe("Generic plugin", func() { }, Status: sriovnetworkv1.SriovNetworkNodeStateStatus{ Interfaces: sriovnetworkv1.InterfaceExts{{ - PciAddress: "0000:00:00.0", - NumVfs: 1, - TotalVfs: 1, - DeviceID: "1015", - Vendor: "15b3", - Name: "sriovif1", - Mtu: 300, // Bad MTU value, changed by the user application - Mac: "0c:42:a1:55:ee:46", - Driver: "mlx5_core", - EswitchMode: "legacy", - LinkSpeed: "25000 Mb/s", - LinkType: "ETH", - LinkAdmState: "up", + PciAddress: "0000:00:00.0", + NumVfs: 1, + TotalVfs: 1, + DeviceID: "1015", + Vendor: "15b3", + Name: "sriovif1", + Mtu: 300, // Bad MTU value, changed by the user application + Mac: "0c:42:a1:55:ee:46", + Driver: "mlx5_core", + EswitchMode: "legacy", + LinkSpeed: "25000 Mb/s", + LinkType: "ETH", + LinkAdminState: "up", VFs: []sriovnetworkv1.VirtualFunction{{ PciAddress: "0000:00:00.1", DeviceID: "1016", @@ -152,19 +152,19 @@ var _ = Describe("Generic plugin", func() { }, Status: sriovnetworkv1.SriovNetworkNodeStateStatus{ Interfaces: sriovnetworkv1.InterfaceExts{{ - PciAddress: "0000:00:00.0", - NumVfs: 2, // Bad numVFs value, changed by the user application - TotalVfs: 1, - DeviceID: "1015", - Vendor: "15b3", - Name: "sriovif1", - Mtu: 1500, - Mac: "0c:42:a1:55:ee:46", - Driver: "mlx5_core", - EswitchMode: "legacy", - LinkSpeed: "25000 Mb/s", - LinkType: "ETH", - LinkAdmState: "up", + PciAddress: "0000:00:00.0", + NumVfs: 2, // Bad numVFs value, changed by the user application + TotalVfs: 1, + DeviceID: "1015", + Vendor: "15b3", + Name: "sriovif1", + Mtu: 1500, + Mac: "0c:42:a1:55:ee:46", + Driver: "mlx5_core", + EswitchMode: "legacy", + LinkSpeed: "25000 Mb/s", + LinkType: "ETH", + LinkAdminState: "up", VFs: []sriovnetworkv1.VirtualFunction{{ PciAddress: "0000:00:00.1", DeviceID: "1016", @@ -202,19 +202,19 @@ var _ = Describe("Generic plugin", func() { }, Status: sriovnetworkv1.SriovNetworkNodeStateStatus{ Interfaces: sriovnetworkv1.InterfaceExts{{ - PciAddress: "0000:00:00.0", - NumVfs: 1, - TotalVfs: 1, - DeviceID: "1015", - Vendor: "15b3", - Name: "sriovif1", - Mtu: 1500, - Mac: "0c:42:a1:55:ee:46", - Driver: "mlx5_core", - EswitchMode: "legacy", - LinkSpeed: "25000 Mb/s", - LinkType: "IB", - LinkAdmState: "down", + PciAddress: "0000:00:00.0", + NumVfs: 1, + TotalVfs: 1, + DeviceID: "1015", + Vendor: "15b3", + Name: "sriovif1", + Mtu: 1500, + Mac: "0c:42:a1:55:ee:46", + Driver: "mlx5_core", + EswitchMode: "legacy", + LinkSpeed: "25000 Mb/s", + LinkType: "IB", + LinkAdminState: "down", VFs: []sriovnetworkv1.VirtualFunction{{ PciAddress: "0000:00:00.1", DeviceID: "1016", @@ -251,19 +251,19 @@ var _ = Describe("Generic plugin", func() { }, Status: sriovnetworkv1.SriovNetworkNodeStateStatus{ Interfaces: sriovnetworkv1.InterfaceExts{{ - PciAddress: "0000:00:00.0", - NumVfs: 1, - TotalVfs: 1, - DeviceID: "1015", - Vendor: "15b3", - Name: "sriovif1", - Mtu: 1500, - Mac: "0c:42:a1:55:ee:46", - Driver: "mlx5_core", - EswitchMode: "legacy", - LinkSpeed: "25000 Mb/s", - LinkType: "IB", - LinkAdmState: "", + PciAddress: "0000:00:00.0", + NumVfs: 1, + TotalVfs: 1, + DeviceID: "1015", + Vendor: "15b3", + Name: "sriovif1", + Mtu: 1500, + Mac: "0c:42:a1:55:ee:46", + Driver: "mlx5_core", + EswitchMode: "legacy", + LinkSpeed: "25000 Mb/s", + LinkType: "IB", + LinkAdminState: "", VFs: []sriovnetworkv1.VirtualFunction{{ PciAddress: "0000:00:00.1", DeviceID: "1016", @@ -300,19 +300,19 @@ var _ = Describe("Generic plugin", func() { }, Status: sriovnetworkv1.SriovNetworkNodeStateStatus{ Interfaces: sriovnetworkv1.InterfaceExts{{ - PciAddress: "0000:00:00.0", - NumVfs: 1, - TotalVfs: 1, - DeviceID: "1015", - Vendor: "15b3", - Name: "sriovif1", - Mtu: 1500, - Mac: "0c:42:a1:55:ee:46", - Driver: "mlx5_core", - EswitchMode: "legacy", - LinkSpeed: "25000 Mb/s", - LinkType: "ETH", - LinkAdmState: "up", + PciAddress: "0000:00:00.0", + NumVfs: 1, + TotalVfs: 1, + DeviceID: "1015", + Vendor: "15b3", + Name: "sriovif1", + Mtu: 1500, + Mac: "0c:42:a1:55:ee:46", + Driver: "mlx5_core", + EswitchMode: "legacy", + LinkSpeed: "25000 Mb/s", + LinkType: "ETH", + LinkAdminState: "up", VFs: []sriovnetworkv1.VirtualFunction{{ PciAddress: "0000:00:00.1", DeviceID: "1016", @@ -350,19 +350,19 @@ var _ = Describe("Generic plugin", func() { }, Status: sriovnetworkv1.SriovNetworkNodeStateStatus{ Interfaces: sriovnetworkv1.InterfaceExts{{ - PciAddress: "0000:00:00.0", - NumVfs: 2, - TotalVfs: 2, - DeviceID: "1015", - Vendor: "15b3", - Name: "sriovif1", - Mtu: 1500, - Mac: "0c:42:a1:55:ee:46", - Driver: "mlx5_core", - EswitchMode: "legacy", - LinkSpeed: "25000 Mb/s", - LinkType: "ETH", - LinkAdmState: "up", + PciAddress: "0000:00:00.0", + NumVfs: 2, + TotalVfs: 2, + DeviceID: "1015", + Vendor: "15b3", + Name: "sriovif1", + Mtu: 1500, + Mac: "0c:42:a1:55:ee:46", + Driver: "mlx5_core", + EswitchMode: "legacy", + LinkSpeed: "25000 Mb/s", + LinkType: "ETH", + LinkAdminState: "up", VFs: []sriovnetworkv1.VirtualFunction{{ PciAddress: "0000:00:00.1", DeviceID: "1016", @@ -389,106 +389,6 @@ var _ = Describe("Generic plugin", func() { Expect(needDrain).To(BeTrue()) }) - It("should drain because MAC address value is the default one on VF of type netdevice and link type ETH", func() { - networkNodeState := &sriovnetworkv1.SriovNetworkNodeState{ - Spec: sriovnetworkv1.SriovNetworkNodeStateSpec{ - Interfaces: sriovnetworkv1.Interfaces{{ - PciAddress: "0000:00:00.0", - NumVfs: 1, - Mtu: 1500, - VfGroups: []sriovnetworkv1.VfGroup{{ - DeviceType: "netdevice", - PolicyName: "policy-1", - ResourceName: "resource-1", - VfRange: "0-0", - VfRange: "0-1", - Mtu: 1500, - }}}}, - }, - Status: sriovnetworkv1.SriovNetworkNodeStateStatus{ - Interfaces: sriovnetworkv1.InterfaceExts{{ - PciAddress: "0000:00:00.0", - NumVfs: 1, - TotalVfs: 1, - DeviceID: "1015", - Vendor: "15b3", - Name: "sriovif1", - Mtu: 1500, - Mac: "0c:42:a1:55:ee:46", - Driver: "mlx5_core", - EswitchMode: "legacy", - LinkSpeed: "25000 Mb/s", - LinkType: "ETH", - LinkAdmState: "up", - VFs: []sriovnetworkv1.VirtualFunction{{ - PciAddress: "0000:00:00.1", - DeviceID: "1016", - Vendor: "15b3", - VfID: 0, - Name: "sriovif1v0", - Mtu: 1500, - Mac: "00:00:00:00:00:00", - Driver: "mlx5_core", - }}, - }}, - }, - } - - needDrain, needReboot, err := genericPlugin.OnNodeStateChange(networkNodeState) - Expect(err).ToNot(HaveOccurred()) - Expect(needReboot).To(BeFalse()) - Expect(needDrain).To(BeTrue()) - }) - - It("should not drain if MAC address value is not set on VF of type netdevice and link type ETH", func() { - networkNodeState := &sriovnetworkv1.SriovNetworkNodeState{ - Spec: sriovnetworkv1.SriovNetworkNodeStateSpec{ - Interfaces: sriovnetworkv1.Interfaces{{ - PciAddress: "0000:00:00.0", - NumVfs: 1, - Mtu: 1500, - VfGroups: []sriovnetworkv1.VfGroup{{ - DeviceType: "netdevice", - PolicyName: "policy-1", - ResourceName: "resource-1", - VfRange: "0-1", - Mtu: 1500, - }}}}, - }, - Status: sriovnetworkv1.SriovNetworkNodeStateStatus{ - Interfaces: sriovnetworkv1.InterfaceExts{{ - PciAddress: "0000:00:00.0", - NumVfs: 1, - TotalVfs: 1, - DeviceID: "1015", - Vendor: "15b3", - Name: "sriovif1", - Mtu: 1500, - Mac: "0c:42:a1:55:ee:46", - Driver: "mlx5_core", - EswitchMode: "legacy", - LinkSpeed: "25000 Mb/s", - LinkType: "ETH", - LinkAdmState: "up", - VFs: []sriovnetworkv1.VirtualFunction{{ - PciAddress: "0000:00:00.1", - DeviceID: "1016", - Vendor: "15b3", - VfID: 0, - Name: "sriovif1v0", - Mtu: 1500, - Driver: "mlx5_core", - }}, - }}, - }, - } - - needDrain, needReboot, err := genericPlugin.OnNodeStateChange(networkNodeState) - Expect(err).ToNot(HaveOccurred()) - Expect(needReboot).To(BeFalse()) - Expect(needDrain).To(BeFalse()) - }) - It("should drain because GUID address value is the default one on VF of type netdevice, rdma enabled and link type ETH", func() { networkNodeState := &sriovnetworkv1.SriovNetworkNodeState{ Spec: sriovnetworkv1.SriovNetworkNodeStateSpec{ @@ -507,19 +407,19 @@ var _ = Describe("Generic plugin", func() { }, Status: sriovnetworkv1.SriovNetworkNodeStateStatus{ Interfaces: sriovnetworkv1.InterfaceExts{{ - PciAddress: "0000:00:00.0", - NumVfs: 1, - TotalVfs: 1, - DeviceID: "1015", - Vendor: "15b3", - Name: "sriovif1", - Mtu: 1500, - Mac: "0c:42:a1:55:ee:46", - Driver: "mlx5_core", - EswitchMode: "legacy", - LinkSpeed: "25000 Mb/s", - LinkType: "ETH", - LinkAdmState: "up", + PciAddress: "0000:00:00.0", + NumVfs: 1, + TotalVfs: 1, + DeviceID: "1015", + Vendor: "15b3", + Name: "sriovif1", + Mtu: 1500, + Mac: "0c:42:a1:55:ee:46", + Driver: "mlx5_core", + EswitchMode: "legacy", + LinkSpeed: "25000 Mb/s", + LinkType: "ETH", + LinkAdminState: "up", VFs: []sriovnetworkv1.VirtualFunction{{ PciAddress: "0000:00:00.1", DeviceID: "1016", @@ -559,19 +459,19 @@ var _ = Describe("Generic plugin", func() { }, Status: sriovnetworkv1.SriovNetworkNodeStateStatus{ Interfaces: sriovnetworkv1.InterfaceExts{{ - PciAddress: "0000:00:00.0", - NumVfs: 1, - TotalVfs: 1, - DeviceID: "1015", - Vendor: "15b3", - Name: "sriovif1", - Mtu: 1500, - Mac: "0c:42:a1:55:ee:46", - Driver: "mlx5_core", - EswitchMode: "legacy", - LinkSpeed: "25000 Mb/s", - LinkType: "ETH", - LinkAdmState: "up", + PciAddress: "0000:00:00.0", + NumVfs: 1, + TotalVfs: 1, + DeviceID: "1015", + Vendor: "15b3", + Name: "sriovif1", + Mtu: 1500, + Mac: "0c:42:a1:55:ee:46", + Driver: "mlx5_core", + EswitchMode: "legacy", + LinkSpeed: "25000 Mb/s", + LinkType: "ETH", + LinkAdminState: "up", VFs: []sriovnetworkv1.VirtualFunction{{ PciAddress: "0000:00:00.1", DeviceID: "1016", @@ -609,19 +509,19 @@ var _ = Describe("Generic plugin", func() { }, Status: sriovnetworkv1.SriovNetworkNodeStateStatus{ Interfaces: sriovnetworkv1.InterfaceExts{{ - PciAddress: "0000:00:00.0", - NumVfs: 1, - TotalVfs: 1, - DeviceID: "1015", - Vendor: "15b3", - Name: "sriovif1", - Mtu: 1500, - Mac: "0c:42:a1:55:ee:46", - Driver: "mlx5_core", - EswitchMode: "legacy", - LinkSpeed: "25000 Mb/s", - LinkType: "ETH", - LinkAdmState: "up", + PciAddress: "0000:00:00.0", + NumVfs: 1, + TotalVfs: 1, + DeviceID: "1015", + Vendor: "15b3", + Name: "sriovif1", + Mtu: 1500, + Mac: "0c:42:a1:55:ee:46", + Driver: "mlx5_core", + EswitchMode: "legacy", + LinkSpeed: "25000 Mb/s", + LinkType: "ETH", + LinkAdminState: "up", VFs: []sriovnetworkv1.VirtualFunction{{ PciAddress: "0000:00:00.1", DeviceID: "1016", @@ -660,19 +560,19 @@ var _ = Describe("Generic plugin", func() { }, Status: sriovnetworkv1.SriovNetworkNodeStateStatus{ Interfaces: sriovnetworkv1.InterfaceExts{{ - PciAddress: "0000:00:00.0", - NumVfs: 1, - TotalVfs: 1, - DeviceID: "1015", - Vendor: "15b3", - Name: "sriovif1", - Mtu: 1500, - Mac: "0c:42:a1:55:ee:46", - Driver: "mlx5_core", - EswitchMode: "legacy", - LinkSpeed: "25000 Mb/s", - LinkType: "IB", - LinkAdmState: "up", + PciAddress: "0000:00:00.0", + NumVfs: 1, + TotalVfs: 1, + DeviceID: "1015", + Vendor: "15b3", + Name: "sriovif1", + Mtu: 1500, + Mac: "0c:42:a1:55:ee:46", + Driver: "mlx5_core", + EswitchMode: "legacy", + LinkSpeed: "25000 Mb/s", + LinkType: "IB", + LinkAdminState: "up", VFs: []sriovnetworkv1.VirtualFunction{{ PciAddress: "0000:00:00.1", DeviceID: "1016", @@ -710,19 +610,19 @@ var _ = Describe("Generic plugin", func() { }, Status: sriovnetworkv1.SriovNetworkNodeStateStatus{ Interfaces: sriovnetworkv1.InterfaceExts{{ - PciAddress: "0000:00:00.0", - NumVfs: 1, - TotalVfs: 1, - DeviceID: "1015", - Vendor: "15b3", - Name: "sriovif1", - Mtu: 1500, - Mac: "0c:42:a1:55:ee:46", - Driver: "mlx5_core", - EswitchMode: "legacy", - LinkSpeed: "25000 Mb/s", - LinkType: "IB", - LinkAdmState: "up", + PciAddress: "0000:00:00.0", + NumVfs: 1, + TotalVfs: 1, + DeviceID: "1015", + Vendor: "15b3", + Name: "sriovif1", + Mtu: 1500, + Mac: "0c:42:a1:55:ee:46", + Driver: "mlx5_core", + EswitchMode: "legacy", + LinkSpeed: "25000 Mb/s", + LinkType: "IB", + LinkAdminState: "up", VFs: []sriovnetworkv1.VirtualFunction{{ PciAddress: "0000:00:00.1", DeviceID: "1016", @@ -760,19 +660,19 @@ var _ = Describe("Generic plugin", func() { }, Status: sriovnetworkv1.SriovNetworkNodeStateStatus{ Interfaces: sriovnetworkv1.InterfaceExts{{ - PciAddress: "0000:00:00.0", - NumVfs: 1, - TotalVfs: 1, - DeviceID: "1015", - Vendor: "15b3", - Name: "sriovif1", - Mtu: 1500, - Mac: "0c:42:a1:55:ee:46", - Driver: "mlx5_core", - EswitchMode: "legacy", - LinkSpeed: "25000 Mb/s", - LinkType: "ETH", - LinkAdmState: "up", + PciAddress: "0000:00:00.0", + NumVfs: 1, + TotalVfs: 1, + DeviceID: "1015", + Vendor: "15b3", + Name: "sriovif1", + Mtu: 1500, + Mac: "0c:42:a1:55:ee:46", + Driver: "mlx5_core", + EswitchMode: "legacy", + LinkSpeed: "25000 Mb/s", + LinkType: "ETH", + LinkAdminState: "up", VFs: []sriovnetworkv1.VirtualFunction{{ PciAddress: "0000:00:00.1", DeviceID: "1016", @@ -812,19 +712,19 @@ var _ = Describe("Generic plugin", func() { }, Status: sriovnetworkv1.SriovNetworkNodeStateStatus{ Interfaces: sriovnetworkv1.InterfaceExts{{ - PciAddress: "0000:00:00.0", - NumVfs: 1, - TotalVfs: 1, - DeviceID: "1015", - Vendor: "15b3", - Name: "sriovif1", - Mtu: 1500, - Mac: "0c:42:a1:55:ee:46", - Driver: "mlx5_core", - EswitchMode: "legacy", - LinkSpeed: "25000 Mb/s", - LinkType: "ETH", - LinkAdmState: "up", + PciAddress: "0000:00:00.0", + NumVfs: 1, + TotalVfs: 1, + DeviceID: "1015", + Vendor: "15b3", + Name: "sriovif1", + Mtu: 1500, + Mac: "0c:42:a1:55:ee:46", + Driver: "mlx5_core", + EswitchMode: "legacy", + LinkSpeed: "25000 Mb/s", + LinkType: "ETH", + LinkAdminState: "up", VFs: []sriovnetworkv1.VirtualFunction{{ PciAddress: "0000:00:00.1", DeviceID: "1016",