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>
]) # 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()
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
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;
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;