summaryrefslogtreecommitdiffstats
path: root/nfvbench
diff options
context:
space:
mode:
authorahothan <ahothan@cisco.com>2018-11-27 17:50:54 -0800
committerahothan <ahothan@cisco.com>2018-11-27 18:02:33 -0800
commit5cc38f190fdd8bb61a1dd9a53a814460ae41b0e7 (patch)
tree34ab3f283c6153192374f6cb52438788e5cfa5ce /nfvbench
parent4a80fac56ca122a34de5d03c0876e424cc7c6c56 (diff)
NFVBENCH-114 SRIOV run fails while creating VM
Change-Id: I1010a722805d0b101f93f0c93c1d26672e469be7 Signed-off-by: ahothan <ahothan@cisco.com>
Diffstat (limited to 'nfvbench')
-rw-r--r--nfvbench/chaining.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/nfvbench/chaining.py b/nfvbench/chaining.py
index 04fd3de..5446f34 100644
--- a/nfvbench/chaining.py
+++ b/nfvbench/chaining.py
@@ -377,13 +377,13 @@ class ChainVnf(object):
can use vswitch or SR-IOV based on config.use_sriov_middle_net
"""
if self.manager.config.sriov:
- if self.manager.config.use_sriov_middle_net:
+ chain_length = self.chain.get_length()
+ if self.manager.config.use_sriov_middle_net or chain_length == 1:
return 'direct'
- if self.vnf_id == 0:
+ if self.vnf_id == 0 and port_index == 0:
# first VNF in chain must use sriov for left port
- if port_index == 0:
- return 'direct'
- elif (self.vnf_id == self.chain.get_length() - 1) and (port_index == 1):
+ return 'direct'
+ if (self.vnf_id == chain_length - 1) and (port_index == 1):
# last VNF in chain must use sriov for right port
return 'direct'
return 'normal'