summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormortenhillbom <mhillbom@cisco.com>2018-04-13 17:41:48 -0700
committermortenhillbom <mhillbom@cisco.com>2018-04-16 14:22:11 -0700
commite456fff7801702f1cf672d9ebda54eabd5100ece (patch)
tree6d72c5cd6c5f8d89e9a2c5ba9dd44ab296e6d389
parent63bab64fe0babc5a198d0a0457c4fb0a58cfe32f (diff)
NFVBENCH-85 Add option to verify L2 loopback at TOR switch
Change-Id: I2c67ae66883ddb1214d39a55723772841b57b3bc Signed-off-by: mortenhillbom <mhillbom@cisco.com>
-rw-r--r--nfvbench/nfvbench.py17
1 files changed, 16 insertions, 1 deletions
diff --git a/nfvbench/nfvbench.py b/nfvbench/nfvbench.py
index dd4a1a3..1cb5a9c 100644
--- a/nfvbench/nfvbench.py
+++ b/nfvbench/nfvbench.py
@@ -434,6 +434,11 @@ def parse_opts_from_cli():
action='store',
help='Custom label for performance records')
+ parser.add_argument('--l2-loopback', '--l2loopback', dest='l2_loopback',
+ action='store',
+ metavar='<vlan>',
+ help='Port to port or port to switch to port L2 loopback with VLAN id')
+
opts, unknown_opts = parser.parse_known_args()
return opts, unknown_opts
@@ -569,8 +574,18 @@ def main():
if opts.no_int_config:
config.no_int_config = opts.no_int_config
+ if opts.l2_loopback:
+ if config.service_chain != ChainType.EXT:
+ LOG.info('Changing service chain type to EXT')
+ config.service_chain = ChainType.EXT
+ if not config.no_arp:
+ LOG.info('Disabling ARP')
+ config.no_arp = True
+ config.vlans = [int(opts.l2_loopback), int(opts.l2_loopback)]
+ LOG.info('Running L2 loopback: using EXT chain and no ARP')
+
if opts.use_sriov_middle_net:
- if (not config.sriov) or (not config.service_chain == ChainType.PVVP):
+ if (not config.sriov) or (config.service_chain != ChainType.PVVP):
raise Exception("--use-sriov-middle-net is only valid for PVVP with SRIOV")
config.use_sriov_middle_net = True