aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMytnyk, Volodymyr <volodymyrx.mytnyk@intel.com>2018-10-04 15:24:56 +0100
committerVolodymyr Mytnyk <volodymyrx.mytnyk@intel.com>2018-10-04 14:59:36 +0000
commitadcc29e56130f0f047b99528ce72b6f149643da7 (patch)
treed11b4c54b3ecbc67d3b4ee22bb7ac83affa1014f
parent4faa5ea500f65cca2b606a27fd2c22ed19358941 (diff)
Configure n_rxq DPDK port option when adding the port
On some platform, setting n_rxq option on port separately does not work well and causes issues like port link down, so changed the logic to set n_rxq DPDK port option during adding the port to the bridge which help to resolve the problem. JIRA: YARDSTICK-1463 Change-Id: Icdb064153a38afd53b835de8742e6fcef08f66bb Signed-off-by: Mytnyk, Volodymyr <volodymyrx.mytnyk@intel.com>
-rw-r--r--yardstick/benchmark/contexts/standalone/ovs_dpdk.py12
1 files changed, 5 insertions, 7 deletions
diff --git a/yardstick/benchmark/contexts/standalone/ovs_dpdk.py b/yardstick/benchmark/contexts/standalone/ovs_dpdk.py
index 73311f0c2..469f79931 100644
--- a/yardstick/benchmark/contexts/standalone/ovs_dpdk.py
+++ b/yardstick/benchmark/contexts/standalone/ovs_dpdk.py
@@ -166,8 +166,7 @@ class OvsDpdkContext(base.Context):
version = self.ovs_properties.get('version', {})
ovs_ver = [int(x) for x in version.get('ovs', self.DEFAULT_OVS).split('.')]
ovs_add_port = ('ovs-vsctl add-port {br} {port} -- '
- 'set Interface {port} type={type_}{dpdk_args}')
- ovs_add_queue = 'ovs-vsctl set Interface {port} options:n_rxq={queue}'
+ 'set Interface {port} type={type_}{dpdk_args}{dpdk_rxq}')
chmod_vpath = 'chmod 0777 {0}/var/run/openvswitch/dpdkvhostuser*'
cmd_list = [
@@ -176,6 +175,8 @@ class OvsDpdkContext(base.Context):
'ovs-vsctl add-br {0} -- set bridge {0} datapath_type=netdev'.
format(MAIN_BRIDGE)
]
+ dpdk_rxq = " options:n_rxq={queue}".format(
+ queue=self.ovs_properties.get("queues", 1))
ordered_network = collections.OrderedDict(self.networks)
for index, vnf in enumerate(ordered_network.values()):
@@ -183,10 +184,7 @@ class OvsDpdkContext(base.Context):
dpdk_args = " options:dpdk-devargs=%s" % vnf.get("phy_port")
dpdk_list.append(ovs_add_port.format(
br=MAIN_BRIDGE, port='dpdk%s' % vnf.get("port_num", 0),
- type_='dpdk', dpdk_args=dpdk_args))
- dpdk_list.append(ovs_add_queue.format(
- port='dpdk%s' % vnf.get("port_num", 0),
- queue=self.ovs_properties.get("queues", 1)))
+ type_='dpdk', dpdk_args=dpdk_args, dpdk_rxq=dpdk_rxq))
# Sorting the array to make sure we execute dpdk0... in the order
list.sort(dpdk_list)
@@ -196,7 +194,7 @@ class OvsDpdkContext(base.Context):
for index, _ in enumerate(ordered_network):
cmd_list.append(ovs_add_port.format(
br=MAIN_BRIDGE, port='dpdkvhostuser%s' % index,
- type_='dpdkvhostuser', dpdk_args=""))
+ type_='dpdkvhostuser', dpdk_args="", dpdk_rxq=""))
ovs_flow = ("ovs-ofctl add-flow {0} in_port=%s,action=output:%s".
format(MAIN_BRIDGE))