]> git.openfabrics.org - ~tnikolova/compat/.git/commitdiff
rdma.m4: Added macros to support NFSRDMA on RHEL6.8 origin/ofed_3_18_2 origin/ofed_3_18_x vofed-3.18-3-20170126-0142
authorVladimir Sokolovsky <vlad@mellanox.com>
Sun, 15 Jan 2017 14:54:15 +0000 (16:54 +0200)
committerVladimir Sokolovsky <vlad@mellanox.com>
Sun, 15 Jan 2017 14:54:15 +0000 (16:54 +0200)
Signed-off-by: Vladimir Sokolovsky <vlad@mellanox.com>
config/rdma.m4

index 19e8f126eb7feba642f7dd4dbeaf9aa244623461..84d6b92e56f91598e8d8779c602d4c9c98cef08c 100644 (file)
@@ -2438,6 +2438,181 @@ AC_DEFUN([LINUX_CONFIG_COMPAT],
        ],[
                AC_MSG_RESULT(no)
        ])
+
+       AC_MSG_CHECKING([if svc_xprt.h struct svc_xprt_ops has *xpo_secure_port])
+       LB_LINUX_TRY_COMPILE([
+               #include <linux/sunrpc/svc_xprt.h>
+       ],[
+               struct svc_xprt_ops x = {
+                       .xpo_secure_port = NULL,
+               };
+
+               return 0;
+       ],[
+               AC_MSG_RESULT(yes)
+               AC_DEFINE(HAVE_XPO_SECURE_PORT, 1,
+                         [xpo_secure_port is defined])
+       ],[
+               AC_MSG_RESULT(no)
+       ])
+
+       AC_MSG_CHECKING([if svc_xprt.h svc_xprt_init has 4 params])
+       LB_LINUX_TRY_COMPILE([
+               #include <linux/sunrpc/svc_xprt.h>
+       ],[
+               svc_xprt_init(NULL, NULL, NULL, NULL);
+
+               return 0;
+       ],[
+               AC_MSG_RESULT(yes)
+               AC_DEFINE(HAVE_SVC_XPRT_INIT_4_PARAMS, 1,
+                         [svc_xprt_init has 4 parameters])
+       ],[
+               AC_MSG_RESULT(no)
+       ])
+
+       AC_MSG_CHECKING([if svcxprt_rdma has sc_reader])
+       LB_LINUX_TRY_COMPILE([
+               #include <linux/sunrpc/svc_rdma.h>
+       ],[
+               struct svcxprt_rdma x = {
+                       .sc_reader = NULL,
+               };
+
+               return 0;
+       ],[
+               AC_MSG_RESULT(yes)
+               AC_DEFINE(HAVE_SVCXPRT_RDMA_SC_READER, 1,
+                         [sc_reader defined])
+       ],[
+               AC_MSG_RESULT(no)
+       ])
+
+       AC_MSG_CHECKING([if svc.h struct svc_rqst has member rq_next_page])
+       LB_LINUX_TRY_COMPILE([
+               #include <linux/sunrpc/svc.h>
+       ],[
+               struct svc_rqst x;
+               x.rq_next_page = NULL;
+
+               return 0;
+       ],[
+               AC_MSG_RESULT(yes)
+               AC_DEFINE(HAVE_RQ_NEXT_PAGE, 1,
+                         [rq_next_page is defined])
+       ],[
+               AC_MSG_RESULT(no)
+       ])
+
+       AC_MSG_CHECKING([if svc_rdma.h has svc_rdma_rcl_chunk_counts])
+       LB_LINUX_TRY_COMPILE([
+               #include <linux/sunrpc/svc_rdma.h>
+       ],[
+               svc_rdma_rcl_chunk_counts(NULL, NULL, NULL);
+
+               return 0;
+       ],[
+               AC_MSG_RESULT(yes)
+               AC_DEFINE(HAVE_SVC_RDMA_RCL_CHUNK_COUNTS, 1,
+                         [svc_rdma_rcl_chunk_counts defined])
+       ],[
+               AC_MSG_RESULT(no)
+       ])
+
+       AC_MSG_CHECKING([if highmem.h kmap_atomic has 1 param])
+       LB_LINUX_TRY_COMPILE([
+               #include <linux/highmem.h>
+       ],[
+               kmap_atomic(NULL);
+
+               return 0;
+       ],[
+               AC_MSG_RESULT(yes)
+               AC_DEFINE(HAVE_KMAP_ATOMIC_1_PARAM, 1,
+                         [kmap_atomic has 1 parameter])
+       ],[
+               AC_MSG_RESULT(no)
+       ])
+
+       AC_MSG_CHECKING([if xprt.h rpc_xprt_ops.connect has 2 params])
+       LB_LINUX_TRY_COMPILE([
+               #include <linux/sunrpc/xprt.h>
+
+               static void xprt_rdma_connect(struct rpc_xprt *xprt, struct rpc_task *task)
+               {
+                       return;
+               }
+       ],[
+               struct rpc_xprt_ops x = {
+                       .connect = xprt_rdma_connect,
+               };
+
+               return 0;
+       ],[
+               AC_MSG_RESULT(yes)
+               AC_DEFINE(HAVE_RPC_XPRT_OPS_CONNECT_2_PARAMS, 1,
+                         [rpc_xprt_ops.connect has 2 params])
+       ],[
+               AC_MSG_RESULT(no)
+       ])
+
+       AC_MSG_CHECKING([if linux/sunrpc/addr.h exists])
+       LB_LINUX_TRY_COMPILE([
+               #include <linux/sunrpc/addr.h>
+       ],[
+               return 0;
+       ],[
+               AC_MSG_RESULT(yes)
+               AC_DEFINE(HAVE_SUNRPC_ADDR_H, 1,
+                         [linux/sunrpc/addr.h exists])
+       ],[
+               AC_MSG_RESULT(no)
+       ])
+
+       AC_MSG_CHECKING([if xprt.h xprt_alloc has 3 params])
+       LB_LINUX_TRY_COMPILE([
+               #include <linux/sunrpc/xprt.h>
+       ],[
+               xprt_alloc(NULL, 0, 0);
+
+               return 0;
+       ],[
+               AC_MSG_RESULT(yes)
+               AC_DEFINE(HAVE_XPRT_ALLOC_HAS_3_PARAMS, 1,
+                         [xprt_alloc has 3 params is defined])
+       ],[
+               AC_MSG_RESULT(no)
+       ])
+
+       AC_MSG_CHECKING([if xprt.h xprt_alloc has 4 params])
+       LB_LINUX_TRY_COMPILE([
+               #include <linux/sunrpc/xprt.h>
+       ],[
+               xprt_alloc(NULL, 0, 0, 0);
+
+               return 0;
+       ],[
+               AC_MSG_RESULT(yes)
+               AC_DEFINE(HAVE_XPRT_ALLOC_HAS_4_PARAMS, 1,
+                         [xprt_alloc has 4 params is defined])
+       ],[
+               AC_MSG_RESULT(no)
+       ])
+
+       AC_MSG_CHECKING([if xprt.h struct rpc_xprt has xprt_alloc_slot])
+       LB_LINUX_TRY_COMPILE([
+               #include <linux/sunrpc/xprt.h>
+       ],[
+               xprt_alloc_slot(NULL, NULL);
+
+               return 0;
+       ],[
+               AC_MSG_RESULT(yes)
+               AC_DEFINE(HAVE_XPRT_ALLOC_SLOT, 1,
+                         [xprt_alloc_slot is defined])
+       ],[
+               AC_MSG_RESULT(no)
+       ])
 ])
 #
 # COMPAT_CONFIG_HEADERS