mlx5, enforce OFED 4.0
authorHanoh Haim <[email protected]>
Mon, 27 Feb 2017 13:06:14 +0000 (15:06 +0200)
committerHanoh Haim <[email protected]>
Mon, 27 Feb 2017 13:44:33 +0000 (15:44 +0200)
Signed-off-by: Hanoh Haim <[email protected]>
linux_dpdk/ws_main.py
scripts/dpdk_setup_ports.py
src/dpdk/drivers/net/mlx5/mlx5_prm.h

index fba7540..a55fe6b 100755 (executable)
@@ -143,8 +143,11 @@ def missing_pkg_msg(fedora, ubuntu):
 def check_ofed(ctx):
     ctx.start_msg('Checking for OFED')
     ofed_info='/usr/bin/ofed_info'
-    ofed_ver= '-3.4-'
-    ofed_ver_show= 'v3.4'
+
+    ofed_ver_re = re.compile('.*[-](\d)[.](\d)[-].*')
+
+    ofed_ver= 40
+    ofed_ver_show= '4.0'
 
     if not os.path.isfile(ofed_info):
         ctx.end_msg('not found', 'YELLOW')
@@ -160,8 +163,14 @@ def check_ofed(ctx):
         ctx.end_msg('Expected several output lines from %s, got:\n%s' % (ofed_info, out), 'YELLOW')
         return False
 
-    if ofed_ver not in lines[0]:
-        ctx.end_msg('Expected version: %s, got: %s.' % (ofed_ver, lines[0]), 'YELLOW')
+    m= ofed_ver_re.match(str(lines[0]))
+    if m:
+        ver=int(m.group(1))*10+int(m.group(2))
+        if ver < ofed_ver:
+          ctx.end_msg("installed OFED version is '%s' should be at least '%s' and up" % (lines[0],ofed_ver_show),'YELLOW')
+          return False
+    else:
+        ctx.end_msg("not found valid  OFED version '%s' " % (lines[0]),'YELLOW')
         return False
 
     ctx.end_msg('Found needed version %s' % ofed_ver_show)
index f619bc6..c956b6c 100755 (executable)
@@ -366,8 +366,8 @@ Other network devices
 
         ofed_ver_re = re.compile('.*[-](\d)[.](\d)[-].*')
 
-        ofed_ver= 34
-        ofed_ver_show= '3.4-1'
+        ofed_ver= 40
+        ofed_ver_show= '4.0'
 
 
         if not os.path.isfile(ofed_info):
index 755b5d7..0a4cb8b 100644 (file)
@@ -80,6 +80,7 @@
 /* Room for inline data in multi-packet WQE. */
 #define MLX5_MWQE64_INL_DATA 28
 
+#define HAVE_VERBS_MLX5_OPCODE_TSO
 #ifndef HAVE_VERBS_MLX5_OPCODE_TSO
 #define MLX5_OPCODE_TSO MLX5_OPCODE_LSO_MPW /* Compat with OFED 3.3. */
 #endif