Skip to content

Commit

Permalink
source/network: ignore interface operational state
Browse files Browse the repository at this point in the history
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 <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.
  • Loading branch information
marquiz committed May 13, 2022
1 parent 869c7cd commit 94d105e
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions source/network/network.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"} {
Expand Down

0 comments on commit 94d105e

Please sign in to comment.