aboutsummaryrefslogtreecommitdiffstats
path: root/vswitches/vpp_dpdk_vhost.py
diff options
context:
space:
mode:
Diffstat (limited to 'vswitches/vpp_dpdk_vhost.py')
-rw-r--r--vswitches/vpp_dpdk_vhost.py17
1 files changed, 15 insertions, 2 deletions
diff --git a/vswitches/vpp_dpdk_vhost.py b/vswitches/vpp_dpdk_vhost.py
index 2ac70a1a..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,8 +72,20 @@ 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:
+ tmp_rxqs = " {{ num-rx-queues {} }}".format(mqs)
+
+ # configure physical ports
for nic in S.getValue('NICS'):
- tmp_args['dpdk'].append("dev {}".format(nic['pci']))
+ tmp_args['dpdk'].append("dev {}{}".format(nic['pci'], tmp_rxqs))
self._vswitch_args = self._process_vpp_args(tmp_args)
def _get_nic_info(self, key='Name'):
@@ -365,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)
#