aboutsummaryrefslogtreecommitdiffstats
path: root/resources/libraries/python
diff options
context:
space:
mode:
Diffstat (limited to 'resources/libraries/python')
-rw-r--r--resources/libraries/python/Constants.py1
-rw-r--r--resources/libraries/python/InterfaceUtil.py2
2 files changed, 3 insertions, 0 deletions
diff --git a/resources/libraries/python/Constants.py b/resources/libraries/python/Constants.py
index da61f539da..cb66a5d8d5 100644
--- a/resources/libraries/python/Constants.py
+++ b/resources/libraries/python/Constants.py
@@ -111,6 +111,7 @@ class Constants(object):
"Intel-X710": 10000000000,
"Intel-XL710": 24500000000,
"Intel-XXV710": 24500000000,
+ "virtual": 100000000,
}
# Suite file names use somewhat more rich (less readable) codes for NICs.
diff --git a/resources/libraries/python/InterfaceUtil.py b/resources/libraries/python/InterfaceUtil.py
index 7706c14e06..22e7160dc9 100644
--- a/resources/libraries/python/InterfaceUtil.py
+++ b/resources/libraries/python/InterfaceUtil.py
@@ -1650,6 +1650,8 @@ class InterfaceUtil(object):
"""
worker_id = 0
worker_cnt = len(VPPUtil.vpp_show_threads(node)) - 1
+ if not worker_cnt:
+ return
for placement in InterfaceUtil.vpp_sw_interface_rx_placement_dump(node):
for interface in node['interfaces'].values():
if placement['sw_if_index'] == interface['vpp_sw_index'] \