ovs-dpdk port setup: specify PCI slot. 89/26889/1
authorAntonio_Fischetti <antonio.fischetti@intel.com>
Fri, 6 Jan 2017 19:39:17 +0000 (19:39 +0000)
committerAntonio_Fischetti <antonio.fischetti@intel.com>
Wed, 11 Jan 2017 17:29:35 +0000 (17:29 +0000)
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>
vswitches/ovs_dpdk_vhost.py

index 67011d2..a273147 100644 (file)
@@ -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 \