summaryrefslogtreecommitdiffstats
path: root/vswitches
diff options
context:
space:
mode:
authorDino Simeon Madarang <dino.simeonx.madarang@intel.com>2015-07-15 09:22:07 +0100
committerMaryam Tahhan <maryam.tahhan@intel.com>2015-08-18 14:51:12 +0000
commit3af55a78fcd572f93b1a46178bffc4c8e90534f2 (patch)
treefeece4539f8d62c4a261ff777723205b918bc32a /vswitches
parentc4541ffb52274b3917c76e32733c0257ca3bbb76 (diff)
vnfs: Enable PVP using vhost-user
Enable booting of a VM with DPDK and run testpmd for PVP testing. * Added throughput and back2back tests with pvp deployment scenario in 01_testcases.conf * PVP requires DPDK 2.0 with VHOST_USER enabled and QEMU 2.2.0 * Tested on CentOS7 and Fedora 20 * Fix conflict with change 1078 Recent Changes: * Fix merge conflict (testcase.py and testcases.conf) * Remove QEMU_DIR. User must set QEMU_BIN * Set bidir traffic to True * Add flow for bi-directional traffic * Use working OVS_TAG ad2e649834be20dd01b1632799fe778106a96a2d * Merge change 1096 (src: Add QEMU makefile) * Set virtio-net-pci csum=off and other variables to off * Move hardcoded values to conf/* JIRA: VSPERF-56 Change-Id: I4ad184531064855493483d9833a7722c9f7d3576 Signed-off-by: Madarang, Dino Simeon <dino.simeonx.madarang@intel.com> Signed-off-by: Meghan Halton <meghan.halton@intel.com> Reviewed-by: Billy O Mahony <billy.o.mahony@intel.com> Reviewed-by: Maryam Tahhan <maryam.tahhan@intel.com> Reviewed-by: Martin Klozik <martinx.klozik@intel.com>
Diffstat (limited to 'vswitches')
-rw-r--r--vswitches/ovs_dpdk_vhost.py14
1 files changed, 8 insertions, 6 deletions
diff --git a/vswitches/ovs_dpdk_vhost.py b/vswitches/ovs_dpdk_vhost.py
index 7b5034c5..3ff41260 100644
--- a/vswitches/ovs_dpdk_vhost.py
+++ b/vswitches/ovs_dpdk_vhost.py
@@ -20,7 +20,7 @@ from vswitches.vswitch import IVSwitch
from src.ovs import VSwitchd, OFBridge
from src.dpdk import dpdk
-VSWITCHD_CONST_ARGS = ['--', '--log-file']
+_VSWITCHD_CONST_ARGS = ['--', '--log-file']
class OvsDpdkVhost(IVSwitch):
"""VSwitch implementation using DPDK and vhost ports
@@ -36,10 +36,11 @@ class OvsDpdkVhost(IVSwitch):
def __init__(self):
vswitchd_args = ['--dpdk']
vswitchd_args += settings.getValue('VSWITCHD_DPDK_ARGS')
- vswitchd_args += VSWITCHD_CONST_ARGS
+ vswitchd_args += _VSWITCHD_CONST_ARGS
self._vswitchd = VSwitchd(vswitchd_args=vswitchd_args,
- expected_cmd=r'EAL: Master l*core \d+ is ready')
+ expected_cmd=
+ r'EAL: Master l*core \d+ is ready')
self._bridges = {}
def start(self):
@@ -98,9 +99,10 @@ class OvsDpdkVhost(IVSwitch):
from 0
"""
bridge = self._bridges[switch_name]
- vhost_count = self._get_port_count(bridge, 'type=dpdkvhost')
- port_name = 'dpdkvhost' + str(vhost_count)
- params = ['--', 'set', 'Interface', port_name, 'type=dpdkvhost']
+ # Changed dpdkvhost to dpdkvhostuser to be able to run in Qemu 2.2
+ vhost_count = self._get_port_count(bridge, 'type=dpdkvhostuser')
+ port_name = 'dpdkvhostuser' + str(vhost_count)
+ params = ['--', 'set', 'Interface', port_name, 'type=dpdkvhostuser']
of_port = bridge.add_port(port_name, params)
return (port_name, of_port)