Whamcloud - gitweb
LU-3617 o2ib: Correctly detect infiniband features 88/7488/3
authorJames Simmons <uja.ornl@gmail.com>
Thu, 29 Aug 2013 14:50:35 +0000 (10:50 -0400)
committerJohann Lombardi <johann.lombardi@intel.com>
Wed, 25 Sep 2013 22:42:47 +0000 (22:42 +0000)
The header file rdma_cm.h refers to the fc_compat.h
header for a function declaration. Lustre test to
see if certain infiniband features are available but
in order for those test to work properly the
fc_compact.h header must be included. Otherwise the
test will always fail thus disabling potential
features. This patch includes fc_compact.h when needed.

Signed-off-by: James Simmons <uja.ornl@gmail.com>
Change-Id: I9e6a9726dec04b3acd5898d6f633ef510144e4b2
Reviewed-on: http://review.whamcloud.com/7488
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Liang Zhen <liang.zhen@intel.com>
Reviewed-by: Johann Lombardi <johann.lombardi@intel.com>
lnet/autoconf/lustre-lnet.m4
lnet/autoconf/ofed.m4

index dfc8ade..b8c264f 100644 (file)
@@ -635,6 +635,9 @@ AC_SUBST(O2IBLND)
 if test $ENABLEO2IB -ne 0; then
        AC_MSG_CHECKING([if rdma_create_id wants four args])
        LB_LINUX_TRY_COMPILE([
+               #if !defined(HAVE_OFED_BACKPORT_H) && defined(HAVE_SCSI_FC_COMPAT_H)
+               #include <scsi/fc_compat.h>
+               #endif
                #include <rdma/rdma_cm.h>
        ],[
                rdma_create_id(NULL, NULL, 0, 0);
index aefc27d..143e365 100644 (file)
@@ -65,6 +65,9 @@ AC_DEFUN([LN_CONFIG_OFED_SPEC],
                #if !HAVE_GFP_T
                typedef int gfp_t;
                #endif
+               #if !defined(HAVE_OFED_BACKPORT_H) && defined(HAVE_SCSI_FC_COMPAT_H)
+               #include <scsi/fc_compat.h>
+               #endif
                #include <rdma/rdma_cm.h>
        ],[
                return (RDMA_CM_EVENT_ADDR_CHANGE == 0);
@@ -83,6 +86,9 @@ AC_DEFUN([LN_CONFIG_OFED_SPEC],
                #if !HAVE_GFP_T
                typedef int gfp_t;
                #endif
+               #if !defined(HAVE_OFED_BACKPORT_H) && defined(HAVE_SCSI_FC_COMPAT_H)
+               #include <scsi/fc_compat.h>
+               #endif
                #include <rdma/rdma_cm.h>
        ],[
                return (RDMA_CM_EVENT_TIMEWAIT_EXIT == 0);