summaryrefslogtreecommitdiffstats
path: root/vswitches/vpp_dpdk_vhost.py
diff options
context:
space:
mode:
authorMartin Klozik <martinx.klozik@intel.com>2017-11-14 12:55:09 +0000
committerMartin Klozik <martinx.klozik@intel.com>2017-11-14 13:25:58 +0000
commit31770a64cd8a5c40ee3657ac97e87a900f7aeca5 (patch)
tree2cca08a0ea7e1ed643789d716d709909e7037762 /vswitches/vpp_dpdk_vhost.py
parent1653f5d6a12febed50f138076dcf8c191d9f24e6 (diff)
vpp: Define vppctl socket name
Newer versions of VPP require an explicit definition of CLI socket file for proper functionality. Otherwise vppctl is not able to connect to running vpp process and thus vsperf is not able to configure and control vpp. Change-Id: Id0df75fd0894e22b1b4d7fa05e16f49efe20d3ab Signed-off-by: Martin Klozik <martinx.klozik@intel.com> Reviewed-by: Al Morton <acmorton@att.com> Reviewed-by: Christian Trautman <ctrautma@redhat.com> Reviewed-by: Sridhar Rao <sridhar.rao@spirent.com> Reviewed-by: Trevor Cooper <trevor.cooper@intel.com>
Diffstat (limited to 'vswitches/vpp_dpdk_vhost.py')
-rw-r--r--vswitches/vpp_dpdk_vhost.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/vswitches/vpp_dpdk_vhost.py b/vswitches/vpp_dpdk_vhost.py
index bb472788..c62e28d4 100644
--- a/vswitches/vpp_dpdk_vhost.py
+++ b/vswitches/vpp_dpdk_vhost.py
@@ -50,6 +50,7 @@ class VppDpdkVhost(IVSwitch, tasks.Process):
self._phy_ports = []
self._virt_ports = []
self._switches = {}
+ self._vpp_ctl = ['sudo', S.getValue('TOOLS')['vppctl']]
# configure DPDK NICs
tmp_args = copy.deepcopy(S.getValue('VSWITCH_VPP_ARGS'))
@@ -71,6 +72,12 @@ class VppDpdkVhost(IVSwitch, tasks.Process):
# configure path to the plugins
tmp_args['plugin_path'] = S.getValue('TOOLS')['vpp_plugin_path']
+ # cli sock file must be used for VPP 17.10 and newer
+ if S.getValue('VSWITCH_VPP_CLI_SOCK'):
+ self._vpp_ctl += ['-s', S.getValue('VSWITCH_VPP_CLI_SOCK')]
+ tmp_args['unix'].append('cli-listen {}'.format(
+ S.getValue('VSWITCH_VPP_CLI_SOCK')))
+
mqs = int(S.getValue('VSWITCH_DPDK_MULTI_QUEUES'))
tmp_rxqs = ''
if mqs:
@@ -371,7 +378,7 @@ class VppDpdkVhost(IVSwitch, tasks.Process):
:return: None
"""
- cmd = ['sudo', S.getValue('TOOLS')['vppctl']] + args
+ cmd = self._vpp_ctl + args
return tasks.run_task(cmd, self._logger, 'Running vppctl...', check_error)
#