From d1145851ad5cb9b5abe963ee97491aa694d389dc Mon Sep 17 00:00:00 2001 From: Martin Klozik Date: Mon, 27 Feb 2017 09:00:50 +0000 Subject: vpp: Initial support of VPP vSwitch Support of VPP was implemented into VSPERF. Initial implementation uses step driven testcases to configure P2P, PVP and PVVP network scenarios. These testcases were prepared for three RFC2544 traffic types, i.e. throughput, continuous stream and back to back. VPP configuration is driven by new configuration option VSWITCH_VPP_ARGS. It is possible to use three types of l2 port connection supported by VPP, i.e. l2 xconnect (default), l2patch and l2 bridge features. Configuration is driven by parameter VSWITCH_VPP_L2_CONNECT_MODE. JIRA: VSPERF-495 Change-Id: Idebef9b10fb0d70796adb3405fec77302de00a7e Signed-off-by: Martin Klozik Reviewed-by: Al Morton Reviewed-by: Christian Trautman Reviewed-by: Sridhar Rao Reviewed-by: Trevor Cooper --- testcases/testcase.py | 29 +++++++---------------------- 1 file changed, 7 insertions(+), 22 deletions(-) (limited to 'testcases/testcase.py') diff --git a/testcases/testcase.py b/testcases/testcase.py index d74f34ad..4fbf9c04 100644 --- a/testcases/testcase.py +++ b/testcases/testcase.py @@ -257,9 +257,6 @@ class TestCase(object): # umount hugepages if mounted self._umount_hugepages() - # restore original settings - S.load_from_dict(self._settings_original) - # cleanup any namespaces created if os.path.isdir('/tmp/namespaces'): namespace_list = os.listdir('/tmp/namespaces') @@ -333,6 +330,9 @@ class TestCase(object): # report test results self.run_report() + # restore original settings + S.load_from_dict(self._settings_original) + def _update_settings(self, param, value): """ Check value of given configuration parameter In case that new value is different, then testcase @@ -460,26 +460,11 @@ class TestCase(object): # get hugepage amounts for each socket on dpdk sock0_mem, sock1_mem = 0, 0 + if S.getValue('VSWITCH').lower().count('dpdk'): - # the import below needs to remain here and not put into the module - # imports because of an exception due to settings not yet loaded - from vswitches import ovs_dpdk_vhost - if ovs_dpdk_vhost.OvsDpdkVhost.old_dpdk_config(): - match = re.search( - r'-socket-mem\s+(\d+),(\d+)', - ''.join(S.getValue('VSWITCHD_DPDK_ARGS'))) - if match: - sock0_mem, sock1_mem = (int(match.group(1)) * 1024 / hugepage_size, - int(match.group(2)) * 1024 / hugepage_size) - else: - logging.info( - 'Could not parse socket memory config in dpdk params.') - else: - sock0_mem, sock1_mem = ( - S.getValue( - 'VSWITCHD_DPDK_CONFIG')['dpdk-socket-mem'].split(',')) - sock0_mem, sock1_mem = (int(sock0_mem) * 1024 / hugepage_size, - int(sock1_mem) * 1024 / hugepage_size) + sock_mem = S.getValue('DPDK_SOCKET_MEM') + sock0_mem, sock1_mem = (int(sock_mem[0]) * 1024 / hugepage_size, + int(sock_mem[1]) * 1024 / hugepage_size) # If hugepages needed, verify the amounts are free if any([hugepages_needed, sock0_mem, sock1_mem]): -- cgit 1.2.3-korg