From: James Simmons Date: Thu, 29 Aug 2013 14:50:35 +0000 (-0400) Subject: LU-3617 o2ib: Correctly detect infiniband features X-Git-Url: https://git.whamcloud.com/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F88%2F7488%2F3;p=fs%2Flustre-release.git LU-3617 o2ib: Correctly detect infiniband features 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 Change-Id: I9e6a9726dec04b3acd5898d6f633ef510144e4b2 Reviewed-on: http://review.whamcloud.com/7488 Tested-by: Hudson Tested-by: Maloo Reviewed-by: Liang Zhen Reviewed-by: Johann Lombardi --- diff --git a/lnet/autoconf/lustre-lnet.m4 b/lnet/autoconf/lustre-lnet.m4 index dfc8ade..b8c264f 100644 --- a/lnet/autoconf/lustre-lnet.m4 +++ b/lnet/autoconf/lustre-lnet.m4 @@ -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 + #endif #include ],[ rdma_create_id(NULL, NULL, 0, 0); diff --git a/lnet/autoconf/ofed.m4 b/lnet/autoconf/ofed.m4 index aefc27d..143e365 100644 --- a/lnet/autoconf/ofed.m4 +++ b/lnet/autoconf/ofed.m4 @@ -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 + #endif #include ],[ 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 + #endif #include ],[ return (RDMA_CM_EVENT_TIMEWAIT_EXIT == 0);