summaryrefslogtreecommitdiffstats
path: root/vswitches/ovs_dpdk_vhost.py
diff options
context:
space:
mode:
authorAntonio_Fischetti <antonio.fischetti@intel.com>2017-01-06 19:39:17 +0000
committerAntonio_Fischetti <antonio.fischetti@intel.com>2017-01-11 17:29:35 +0000
commitb769c6c95aa66942415fbe2187b18f9bd340d9b5 (patch)
treea1bad6b1c304efe837934b7095fb3f7f9dd2fc63 /vswitches/ovs_dpdk_vhost.py
parent5bd06d3527c2ade600cab62764aed06f344986bc (diff)
ovs-dpdk port setup: specify PCI slot.
Update to use options:dpdk-devargs coming from the Arbitray Port Naming feature lately upstreamed in Ovs-DPDK project. See Commit ID: 55e075e65ef9ecbd70e5e0fada2704c3d73724d8. By this new param you can explicitly select a PCI slot for a dpdk port. JIRA: VSPERF-449 Change-Id: Id6028cc4efbaf228a99c6f0a346a8e96a82e43a6 Signed-off-by: Antonio Fischetti <antonio.fischetti@intel.com> Reviewed-by: Maryam Tahhan <maryam.tahhan@intel.com> Reviewed-by: Martin Klozik martinx.klozik@intel.com Reviewed-by: Al Morton <acmorton@att.com> Reviewed-by: Christian Trautman <ctrautma@redhat.com> Reviewed-by: <bmichalo@redhat.com> Reviewed-by: <sridhar.rao@spirent.com>
Diffstat (limited to 'vswitches/ovs_dpdk_vhost.py')
-rw-r--r--vswitches/ovs_dpdk_vhost.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/vswitches/ovs_dpdk_vhost.py b/vswitches/ovs_dpdk_vhost.py
index 67011d20..a2731478 100644
--- a/vswitches/ovs_dpdk_vhost.py
+++ b/vswitches/ovs_dpdk_vhost.py
@@ -108,7 +108,11 @@ class OvsDpdkVhost(IVSwitchOvs):
bridge = self._bridges[switch_name]
dpdk_count = self._get_port_count('type=dpdk')
port_name = 'dpdk' + str(dpdk_count)
- params = ['--', 'set', 'Interface', port_name, 'type=dpdk']
+ # PCI info. Please note there must be no blank space, eg must be
+ # like 'options:dpdk-devargs=0000:06:00.0'
+ _NICS = settings.getValue('NICS')
+ nic_pci = 'options:dpdk-devargs=' + _NICS[dpdk_count]['pci']
+ params = ['--', 'set', 'Interface', port_name, 'type=dpdk', nic_pci]
# multi-queue enable
if int(settings.getValue('VSWITCH_DPDK_MULTI_QUEUES')) and \