Skip to content

Commit

Permalink
bugfix: fix for detection when a PF does not have any VFs or cannot h…
Browse files Browse the repository at this point in the history
…ave any PFs
  • Loading branch information
bryanvaz committed May 29, 2023
1 parent 84ea4a6 commit 811eb57
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/detection.py
Original file line number Diff line number Diff line change
Expand Up @@ -322,6 +322,11 @@ def detect_network_devices():

# Go through pfs and check if they have any VFs
for pf_pci_address, pf in _physical_nics.items():
# check if ip_link_output has key pf['interface']
if pf['interface'] not in ip_link_output:
continue
if 'vfinfo_list' not in ip_link_output[pf['interface']]:
continue
ip_link_vfinfo_list = ip_link_output[pf['interface']]['vfinfo_list']
# iterate through the virtfn dictionary
for vf_name, virtfn in pf['virtfn'].items():
Expand Down

0 comments on commit 811eb57

Please sign in to comment.