summaryrefslogtreecommitdiffstats
path: root/vswitches/ovs_dpdk_vhost.py
diff options
context:
space:
mode:
authorDino Simeon Madarang <dino.simeonx.madarang@intel.com>2015-10-15 16:01:14 +0100
committerMaryam Tahhan <maryam.tahhan@intel.com>2015-10-28 10:19:05 +0000
commit67b0760d2b123ee834f8552057aed0e68a282257 (patch)
tree861923d1f30559d302988fb28d4442a0b8600860 /vswitches/ovs_dpdk_vhost.py
parentf1227a6fc81552c59fa56fe63db872871982adcc (diff)
Stop OVS from generating misleading add-br errors
Create bridge and set datapath_type in 1 transaction to prevent OVS from generating misleading error messages which jenkins considers as build errors. Update vswitch interface to include optional parameters. Change-Id: I668f474ea909b284f3726807aab42d52ae2fb504 JIRA: VSPERF-122 Signed-off-by: Dino Simeon Madarang <dino.simeonx.madarang@intel.com> Reviewed-by: Maryam Tahhan <maryam.tahhan@intel.com> Reviewed-by: Billy O Mahony <billy.o.mahony@intel.com> Reviewed-by: Gene Snider <eugene.snider@huawei.com> Reviewed-by: Martin Klozik <martinx.klozik@intel.com> Reviewed-by: Radek Zetik <radekx.zetik@intel.com>
Diffstat (limited to 'vswitches/ovs_dpdk_vhost.py')
-rw-r--r--vswitches/ovs_dpdk_vhost.py12
1 files changed, 8 insertions, 4 deletions
diff --git a/vswitches/ovs_dpdk_vhost.py b/vswitches/ovs_dpdk_vhost.py
index 874cc97b..553915bc 100644
--- a/vswitches/ovs_dpdk_vhost.py
+++ b/vswitches/ovs_dpdk_vhost.py
@@ -69,11 +69,17 @@ class OvsDpdkVhost(IVSwitch):
dpdk.cleanup()
dpdk.remove_vhost_modules()
- def add_switch(self, switch_name):
+ def add_switch(self, switch_name, params=None):
"""See IVswitch for general description
"""
bridge = OFBridge(switch_name)
- bridge.create()
+ if params is None:
+ bridge.create(['--', 'set', 'bridge', switch_name,
+ 'datapath_type=netdev'])
+ else:
+ bridge.create(['--', 'set', 'bridge', switch_name,
+ 'datapath_type=netdev'] + params)
+
bridge.set_db_attribute('Open_vSwitch', '.',
'other_config:max-idle',
settings.getValue('VSWITCH_FLOW_TIMEOUT'))
@@ -85,8 +91,6 @@ class OvsDpdkVhost(IVSwitch):
'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
def del_switch(self, switch_name):