From 94d105e9136f6d82ad452881a0d46aaf07948cfe Mon Sep 17 00:00:00 2001 From: Markus Lehtonen Date: Fri, 13 May 2022 12:21:53 +0300 Subject: [PATCH] source/network: ignore interface operational state Ignore the operational state of network interface when creating the network SR-IOV labels. Previously NFD only considered interfaces which were "up". Pre v0.9 we used to check the "administrative state" of interfaces (managed by the sysadmin with e.g. with ip link set dev down/up). In v0.10 we changed to checking the "operational state" of interfaces, reflecting whether the it is actually able to transfer data. Both these checks have caused confusion among users and it is more understandable and more aligned with other HW discovery functions in NFD to just drop the state check. Also, the documentation is aligned with this behavior. --- source/network/network.go | 3 --- 1 file changed, 3 deletions(-) diff --git a/source/network/network.go b/source/network/network.go index e66bd6d26e..452b1ad05f 100644 --- a/source/network/network.go +++ b/source/network/network.go @@ -70,9 +70,6 @@ func (s *networkSource) GetLabels() (source.FeatureLabels, error) { for _, dev := range features.Instances[DeviceFeature].Elements { attrs := dev.Attributes - if attrs["operstate"] != "up" { - continue - } for attr, feature := range map[string]string{ "sriov_totalvfs": "sriov.capable", "sriov_numvfs": "sriov.configured"} {