[dts] [PATCH 4/6] framewark:project_dpdk : Enable MLX4 and MLX5 PMD's before compiling and disable binding
Raslan Darawsheh
rasland at mellanox.com
Tue Oct 27 07:07:53 CET 2015
From: Raslsn Darawsheh <rdarawsheh at asaltech.com>
Signed-off-by: Raslsn Darawsheh <rdarawsheh at asaltech.com>
---
framework/project_dpdk.py | 15 +++++++++++++--
1 file changed, 13 insertions(+), 2 deletions(-)
diff --git a/framework/project_dpdk.py b/framework/project_dpdk.py
index e0009d3..a51a2a4 100644
--- a/framework/project_dpdk.py
+++ b/framework/project_dpdk.py
@@ -160,6 +160,11 @@ class DPDKdut(Dut):
"""
# clean all
self.send_expect("rm -rf " + target, "#")
+ # if Configured device is a Mellanox then need to enable MLX4 PMD
+ if self.isMellanox and self.mellanoxCardType == "cx3" :
+ self.send_expect("sed -i '/CONFIG_RTE_LIBRTE_MLX4_PMD=n/c\CONFIG_RTE_LIBRTE_MLX4_PMD=y' config/common_linuxapp" ,"#")
+ elif self.isMellanox and self.mellanoxCardType == "cx4" :
+ self.send_expect("sed -i '/CONFIG_RTE_LIBRTE_MLX5_PMD=n/c\CONFIG_RTE_LIBRTE_MLX5_PMD=y' config/common_linuxapp","#")
# compile
out = self.send_expect("make -j install T=%s %s" % (target, extra_options), "# ", 120)
@@ -269,7 +274,10 @@ class DPDKdut(Dut):
binding_list += '%s ' % (port_info['pci'])
current_nic += 1
- self.send_expect('tools/dpdk_nic_bind.py %s' % binding_list, '# ')
+ if self.isMellanox:
+ pass
+ else:
+ self.send_expect('tools/dpdk_nic_bind.py %s' % binding_list, '# ')
def unbind_interfaces_linux(self, nics_to_bind=None):
"""
@@ -284,7 +292,10 @@ class DPDKdut(Dut):
binding_list += '%s ' % (port_info['pci'])
current_nic += 1
- self.send_expect('tools/dpdk_nic_bind.py %s' % binding_list, '# ', 30)
+ if self.isMellanox:
+ pass
+ else:
+ self.send_expect('tools/dpdk_nic_bind.py %s' % binding_list, '# ', 30)
def build_dpdk_apps(self, folder, extra_options=''):
"""
--
1.8.3.1
More information about the dts
mailing list