From 0e720a2e22505762e79a52cf4fa708d4e01e254b Mon Sep 17 00:00:00 2001 From: Radek Zetik Date: Fri, 2 Oct 2015 14:10:30 +0100 Subject: Default config picks up OVS variants Running a test with vanilla-ovs, vhost-user-ovs, vhost-cuse-ovs,... does not require any building or configuration changes - the vswitch needs only to specified on the command line. The config file contains new variables for particular ovs build. OvsVanilla: OVS_DIR_VANILLA, QEMU_DIR_VANILLA VhostCuse: RTE_SDK_CUSE, OVS_DIR_CUSE, QEMU_DIR_CUSE VhostUser: RTE_SDK_USER, OVS_DIR_USER, QEMU_DIR_USER The vspef chooses right paths according to command line switches '--vswitch' (or 'VSWITCH') and '--vnf' (or 'VNF') JIRA: VSPERF-86 Change-Id: I22e3a7f9e21d6ceb13830e444716b4274314560c Signed-off-by: Radek Zetik Reviewed-by: Maryam Tahhan Reviewed-by: Brian Castelli Reviewed-by: Gene Snider Reviewed-by: Al Morton Reviewed-by: Tv Rao --- vsperf | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'vsperf') diff --git a/vsperf b/vsperf index 310e1a40..7a442658 100755 --- a/vsperf +++ b/vsperf @@ -388,6 +388,28 @@ def main(): logger.error("No tests matched --test option or positional args. Done.") sys.exit(1) + # set dpdk, ovs and qemu paths accorfing to VNF and VSWITCH + if settings.getValue('VSWITCH').endswith('Vanilla'): + # settings paths for Vanilla + settings.setValue('OVS_DIR', (settings.getValue('OVS_DIR_VANILLA'))) + settings.setValue('QEMU_DIR', (settings.getValue('QEMU_DIR_VANILLA'))) + elif settings.getValue('VSWITCH').endswith('Vhost'): + if settings.getValue('VNF').endswith('Cuse'): + # settings paths for Cuse + settings.setValue('RTE_SDK', (settings.getValue('RTE_SDK_CUSE'))) + settings.setValue('OVS_DIR', (settings.getValue('OVS_DIR_CUSE'))) + settings.setValue('QEMU_DIR', (settings.getValue('QEMU_DIR_CUSE'))) + else: + # settings paths for VhostUser + settings.setValue('RTE_SDK', (settings.getValue('RTE_SDK_USER'))) + settings.setValue('OVS_DIR', (settings.getValue('OVS_DIR_USER'))) + settings.setValue('QEMU_DIR', (settings.getValue('QEMU_DIR_USER'))) + else: + # default - set to VHOST USER but can be changed during enhancement + settings.setValue('RTE_SDK', (settings.getValue('RTE_SDK_USER'))) + settings.setValue('OVS_DIR', (settings.getValue('OVS_DIR_USER'))) + settings.setValue('QEMU_DIR', (settings.getValue('QEMU_DIR_USER'))) + # create results directory if not os.path.exists(results_path): logger.info("Creating result directory: " + results_path) -- cgit 1.2.3-korg