Whamcloud - gitweb
LU-12405 lnet: Oracle OFED extensions default to on 92/35292/6
authorShaun Tancheff <stancheff@cray.com>
Fri, 19 Jul 2019 05:17:54 +0000 (00:17 -0500)
committerOleg Drokin <green@whamcloud.com>
Fri, 2 Aug 2019 06:03:11 +0000 (06:03 +0000)
Oracle UEK kernel ships with OFED extensions on by default.
Enable building if Oracle OFED extensions are not suppressed.

Introduce and use kib_fmr_pool_map wrapper for ib_fmr_pool_map_phys

Test-Parameters: trivial
Cray-bug-id: LUS-7440
Signed-off-by: Shaun Tancheff <stancheff@cray.com>
Change-Id: I2b15293454ce2e4f55ca0a47117c8072326e2d3a
Reviewed-on: https://review.whamcloud.com/35292
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Petros Koutoupis <pkoutoupis@cray.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lnet/autoconf/lustre-lnet.m4
lnet/klnds/o2iblnd/o2iblnd.c
lnet/klnds/o2iblnd/o2iblnd.h

index 8494135..85125f2 100644 (file)
@@ -743,6 +743,26 @@ EXTRA_KCFLAGS="$tmp_flags"
 ]) # LN_CONFIG_SOCK_ACCEPT
 
 #
+# LN_HAVE_ORACLE_OFED_EXTENSIONS
+#
+# Oracle UEK 5
+#
+AC_DEFUN([LN_HAVE_ORACLE_OFED_EXTENSIONS], [
+LB_CHECK_COMPILE([if Oracle OFED Extensions are enabled],
+oracle_ofed_ext, [
+       #include <rdma/ib_fmr_pool.h>
+],[
+       struct ib_fmr_pool_param param = {
+               .relaxed           = 0
+       };
+       (void)param;
+],[
+       AC_DEFINE(HAVE_ORACLE_OFED_EXTENSIONS, 1,
+               [if Oracle OFED Extensions are enabled])
+])
+]) # LN_HAVE_ORACLE_OFED_EXTENSIONS
+
+#
 # LN_CONFIG_SOCK_GETNAME
 #
 # 4.17 commit 9b2c45d479d0fb8647c9e83359df69162b5fbe5f getname()
@@ -837,6 +857,8 @@ LN_CONFIG_SK_DATA_READY
 LN_CONFIG_SOCK_CREATE_KERN
 # 4.11
 LN_CONFIG_SOCK_ACCEPT
+# 4.14
+LN_HAVE_ORACLE_OFED_EXTENSIONS
 # 4.17
 LN_CONFIG_SOCK_GETNAME
 # 5.0
index d37237a..eaf59fc 100644 (file)
@@ -1863,8 +1863,8 @@ again:
                                tx_pages_mapped = 1;
                        }
 
-                       pfmr = ib_fmr_pool_map_phys(fpo->fmr.fpo_fmr_pool,
-                                                   pages, npages, iov);
+                       pfmr = kib_fmr_pool_map(fpo->fmr.fpo_fmr_pool,
+                                               pages, npages, iov);
                        if (likely(!IS_ERR(pfmr))) {
                                fmr->fmr_key  = is_rx ? pfmr->fmr->rkey
                                                      : pfmr->fmr->lkey;
index fd6f97c..b0ca501 100644 (file)
@@ -354,6 +354,14 @@ struct kib_fmr {
        u32                              fmr_key;
 };
 
+#ifdef HAVE_ORACLE_OFED_EXTENSIONS
+#define kib_fmr_pool_map(pool, pgs, n, iov) \
+       ib_fmr_pool_map_phys((pool), (pgs), (n), (iov), NULL)
+#else
+#define kib_fmr_pool_map(pool, pgs, n, iov) \
+       ib_fmr_pool_map_phys((pool), (pgs), (n), (iov))
+#endif
+
 struct kib_net {
        /* chain on struct kib_dev::ibd_nets */
        struct list_head        ibn_list;