From a3ac6bb9958c96340cff07d7e464bf1028344318 Mon Sep 17 00:00:00 2001 From: Dino Simeon Madarang Date: Tue, 18 Aug 2015 23:44:36 +0100 Subject: vswitches: Affinitize vswitch threads for OVS-DPDK JIRA: VSPERF-64 Change-Id: I7cefd05479da6fe17357da4da558f466175dd6fc Signed-off-by: Dino Simeon Madarang Reviewed-by: Maryam Tahhan Reviewed-by: Al Morton --- vswitches/ovs_dpdk_vhost.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'vswitches') diff --git a/vswitches/ovs_dpdk_vhost.py b/vswitches/ovs_dpdk_vhost.py index 3ff41260..154d5357 100644 --- a/vswitches/ovs_dpdk_vhost.py +++ b/vswitches/ovs_dpdk_vhost.py @@ -65,7 +65,16 @@ class OvsDpdkVhost(IVSwitch): bridge = OFBridge(switch_name) bridge.create() bridge.set_db_attribute('Open_vSwitch', '.', - 'other_config:max-idle', '60000') + 'other_config:max-idle', + settings.getValue('VSWITCH_FLOW_TIMEOUT')) + + if settings.getValue('VSWITCH_AFFINITIZATION_ON') == 1: + # Sets the PMD core mask to VSWITCH_PMD_CPU_MASK + # for CPU core affinitization + bridge.set_db_attribute('Open_vSwitch', '.', + 'other_config:pmd-cpu-mask', + settings.getValue('VSWITCH_PMD_CPU_MASK')) + bridge.set_db_attribute('Bridge', bridge.br_name, 'datapath_type', 'netdev') self._bridges[switch_name] = bridge -- cgit 1.2.3-korg