From: James Simmons Date: Wed, 9 Sep 2015 15:28:52 +0000 (-0400) Subject: LU-6215 ofed: strengthen ib_create_cq test in 4.2+ kernels X-Git-Tag: 2.7.60~24 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=d7223c0ccda11f120e50cd0195d84583d6ee4a29;hp=3a7d56b3078906f66e59a96f03d1e36fc27c7460;p=fs%2Flustre-release.git LU-6215 ofed: strengthen ib_create_cq test in 4.2+ kernels External infinband stacks tend to keep their kernel headers in sync with the latest kernels but this is not the case with the driver code itself. Since this is the case we can not trust testing for API changes using OFED headers but need to be test driver code API changes. Update the autoconf test to see if ib_create_cq() uses struct ib_cq_init_attr. Change-Id: I9875b6787723589b9cbdb55ef088b146b6900b2a Signed-off-by: James Simmons Reviewed-on: http://review.whamcloud.com/16342 Tested-by: Jenkins Reviewed-by: Alexander Boyko Reviewed-by: frank zago Reviewed-by: Bob Glossman Tested-by: Maloo Reviewed-by: Oleg Drokin --- diff --git a/lnet/autoconf/lustre-lnet.m4 b/lnet/autoconf/lustre-lnet.m4 index 40595d7..4398253 100644 --- a/lnet/autoconf/lustre-lnet.m4 +++ b/lnet/autoconf/lustre-lnet.m4 @@ -329,10 +329,14 @@ AS_IF([test $ENABLEO2IB != "no"], [ ]) ]) # -# 4.2 introduced struct ib_cq_init_attr +# 4.2 introduced struct ib_cq_init_attr which is used +# by ib_create_cq(). Note some OFED stacks only keep +# their headers in sync with latest kernels but not +# the functionality which means for infiniband testing +# we need to always test functionality testings. # AS_IF([test $ENABLEO2IB != "no"], [ - LB_CHECK_COMPILE([if 'struct ib_cq_init_attr' exist], + LB_CHECK_COMPILE([if 'struct ib_cq_init_attr' is used], ib_cq_init_attr, [ #ifdef HAVE_COMPAT_RDMA #include @@ -341,10 +345,10 @@ AS_IF([test $ENABLEO2IB != "no"], [ ],[ struct ib_cq_init_attr cq_attr; - cq_attr.comp_vector = NULL; + ib_create_cq(NULL, NULL, NULL, NULL, &cq_attr); ],[ AC_DEFINE(HAVE_IB_CQ_INIT_ATTR, 1, - [struct ib_cq_init_attr exist]) + [struct ib_cq_init_attr is used by ib_create_cq]) ]) ]) ]) # LN_CONFIG_O2IB