summaryrefslogtreecommitdiffstats
path: root/linux_dpdk
diff options
context:
space:
mode:
authorHanoh Haim <hhaim@cisco.com>2017-03-16 11:55:04 +0200
committerHanoh Haim <hhaim@cisco.com>2017-03-16 11:55:04 +0200
commita933bd1addc181fe623ad9f60b0631bbad539190 (patch)
treef65f38ef7cfab153dc49b8d50b5110da142fdf1c /linux_dpdk
parentb3ffe2a0aa4b06920a75761ccc010c884ff8609d (diff)
early support mlx4 driver for connectX-3
Signed-off-by: Hanoh Haim <hhaim@cisco.com>
Diffstat (limited to 'linux_dpdk')
-rwxr-xr-xlinux_dpdk/ws_main.py44
1 files changed, 44 insertions, 0 deletions
diff --git a/linux_dpdk/ws_main.py b/linux_dpdk/ws_main.py
index 9b348d4d..703bb6ac 100755
--- a/linux_dpdk/ws_main.py
+++ b/linux_dpdk/ws_main.py
@@ -533,6 +533,11 @@ mlx5_dpdk_src = SrcGroup(dir='src/dpdk/',
'drivers/net/mlx5/mlx5_vlan.c',
]);
+mlx4_dpdk_src = SrcGroup(dir='src/dpdk/',
+ src_list=[
+ 'drivers/net/mlx4/mlx4.c',
+ ]);
+
bp_dpdk =SrcGroups([
dpdk_src
]);
@@ -541,6 +546,10 @@ mlx5_dpdk =SrcGroups([
mlx5_dpdk_src
]);
+mlx4_dpdk =SrcGroups([
+ mlx4_dpdk_src
+ ]);
+
# this is the library dp going to falcon (and maybe other platforms)
bp =SrcGroups([
@@ -821,9 +830,15 @@ class build_option:
def get_mlx5_target (self):
return self.update_executable_name("mlx5");
+ def get_mlx4_target (self):
+ return self.update_executable_name("mlx4");
+
def get_mlx5so_target (self):
return self.update_executable_name("libmlx5")+'.so';
+ def get_mlx4so_target (self):
+ return self.update_executable_name("libmlx4")+'.so';
+
def get_common_flags (self):
if self.isPIE():
flags = copy.copy(common_flags_old)
@@ -917,8 +932,19 @@ def build_prog (bld, build_obj):
source = mlx5_dpdk.file_list(top),
target = build_obj.get_mlx5_target()
+ )
+
+ bld.shlib(
+ features='c',
+ includes = dpdk_includes_path+dpdk_includes_verb_path,
+ cflags = (build_obj.get_c_flags()+DPDK_FLAGS ),
+ use =['ibverbs'],
+ source = mlx4_dpdk.file_list(top),
+ target = build_obj.get_mlx4_target()
)
+
+
bld.program(features='cxx cxxprogram',
includes =includes_path,
cxxflags =(build_obj.get_cxx_flags()+['-std=gnu++11',]),
@@ -986,6 +1012,11 @@ def install_single_system (bld, exec_p, build_obj):
dest_mlx_file = exec_p + build_obj.get_mlx5so_target()
do_create_link(src_mlx_file,dest_mlx_file,exec_p);
+ src_mlx4_file = os.path.realpath(o+build_obj.get_mlx4so_target())
+ dest_mlx4_file = exec_p + build_obj.get_mlx4so_target()
+ do_create_link(src_mlx4_file,dest_mlx4_file,exec_p);
+
+
def pre_build(bld):
@@ -1080,6 +1111,15 @@ def _copy_single_system2 (bld, exec_p, build_obj):
os.system("cp %s %s " %(src_file,dest_file));
os.system("chmod +x %s " %(dest_file));
+def _copy_single_system3 (bld, exec_p, build_obj):
+ o='../scripts/';
+ src_file = os.path.realpath(o+build_obj.get_mlx4so_target())
+ print(src_file)
+ if os.path.exists(src_file):
+ dest_file = exec_p +build_obj.get_mlx4so_target()
+ os.system("cp %s %s " %(src_file,dest_file));
+ os.system("chmod +x %s " %(dest_file));
+
def copy_single_system (bld, exec_p, build_obj):
_copy_single_system (bld, exec_p, build_obj)
@@ -1090,6 +1130,9 @@ def copy_single_system1 (bld, exec_p, build_obj):
def copy_single_system2 (bld, exec_p, build_obj):
_copy_single_system2 (bld, exec_p, build_obj)
+def copy_single_system3 (bld, exec_p, build_obj):
+ _copy_single_system3 (bld, exec_p, build_obj)
+
files_list=[
'libzmq.so.3',
@@ -1206,6 +1249,7 @@ def release(bld, custom_dir = None):
copy_single_system(bld,exec_p,obj)
copy_single_system1(bld,exec_p,obj)
copy_single_system2(bld,exec_p,obj)
+ copy_single_system3(bld,exec_p,obj)
for obj in files_list:
src_file = '../scripts/'+obj