X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=blobdiff_plain;f=lnet%2Fautoconf%2Flustre-lnet.m4;h=bb30405336a6ef9792d475bb7b938c4255ff5913;hp=e509eae9e4560c5af0d962db797f27ff6d3fa394;hb=413b6c2e365cf3ff986611e20dd77186ed25a3ac;hpb=a9a2db6102821fe2fefa0da72433cdbe9656ca1c diff --git a/lnet/autoconf/lustre-lnet.m4 b/lnet/autoconf/lustre-lnet.m4 index e509eae..bb30405 100644 --- a/lnet/autoconf/lustre-lnet.m4 +++ b/lnet/autoconf/lustre-lnet.m4 @@ -117,11 +117,12 @@ PTLLNDCPPFLAGS="" if test $ENABLEPORTALS -eq 0; then AC_MSG_RESULT([no]) elif test ! \( -f ${PORTALS}/include/portals/p30.h \); then - AC_MSG_RESULT([no]) + AC_MSG_RESULT([no]) AC_MSG_ERROR([bad --with-portals path]) else - AC_MSG_RESULT([$PORTALS]) - PTLLNDCPPFLAGS="-I${PORTALS}/include" + PORTALS=$(readlink --canonicalize $PORTALS) + AC_MSG_RESULT([$PORTALS]) + PTLLNDCPPFLAGS="-I${PORTALS}/include" fi AC_SUBST(PTLLNDCPPFLAGS) ]) @@ -247,6 +248,7 @@ if test -d $QSNET/drivers/net/qsnet ; then QSWLND="qswlnd" AC_MSG_CHECKING([for multirail EKC]) if test -f $QSNET/include/elan/epcomms.h; then + QSNET=$(readlink --canonicalize $QSNET) AC_MSG_RESULT([supported]) QSWCPPFLAGS="-I$QSNET/include -DMULTIRAIL_EKC=1" else @@ -309,6 +311,7 @@ elif test ! \( -f ${MXPATH}/include/myriexpress.h -a \ *) AC_MSG_ERROR([internal error]);; esac else + MXPATH=$(readlink --canonicalize $MXPATH) MXCPPFLAGS="-I$MXPATH/include" EXTRA_KCFLAGS_save="$EXTRA_KCFLAGS" EXTRA_KCFLAGS="$EXTRA_KCFLAGS $MXCPPFLAGS" @@ -404,6 +407,7 @@ else *) AC_MSG_ERROR([internal error]);; esac else + O2IBPATH=$(readlink --canonicalize $O2IBPATH) O2IBCPPFLAGS="-I$O2IBPATH/include" EXTRA_KCFLAGS_save="$EXTRA_KCFLAGS" EXTRA_KCFLAGS="$EXTRA_KCFLAGS $O2IBCPPFLAGS" @@ -412,20 +416,18 @@ else LB_LINUX_TRY_COMPILE([ #include #include - #if !HAVE_GFP_T - typedef int gfp_t; - #endif + #include #include #include #include #include ],[ - struct rdma_cm_id *cm_id; - struct rdma_conn_param conn_param; - struct ib_device_attr device_attr; - struct ib_qp_attr qp_attr; - struct ib_pool_fmr pool_fmr; - enum ib_cm_rej_reason rej_reason; + struct rdma_cm_id *cm_idi __attribute__ ((unused)); + struct rdma_conn_param conn_param __attribute__ ((unused)); + struct ib_device_attr device_attr __attribute__ ((unused)); + struct ib_qp_attr qp_attr __attribute__ ((unused)); + struct ib_pool_fmr pool_fmr __attribute__ ((unused)); + enum ib_cm_rej_reason rej_reason __attribute__ ((unused)); rdma_destroy_id(NULL); ],[ @@ -528,13 +530,88 @@ AC_SUBST(RACPPFLAGS) AC_SUBST(RALND) ]) +# +# LN_CONFIG_GNILND +# +# check whether to use the Gemini Network Interface lnd +# +AC_DEFUN([LN_CONFIG_GNILND], +[#### Gemini Network Interface +AC_MSG_CHECKING([whether to enable GNI lnd]) +AC_ARG_ENABLE([gni], + AC_HELP_STRING([--enable-gni], + [enable GNI lnd]), + [],[enable_gni='no']) +AC_MSG_RESULT([$enable_gni]) + +if test x$enable_gni = xyes ; then + AC_MSG_CHECKING([if GNI kernel headers are present]) + # placeholder + # GNICPPFLAGS was set in spec file + EXTRA_KCFLAGS_save="$EXTRA_KCFLAGS" + EXTRA_KCFLAGS="$EXTRA_KCFLAGS $GNICPPFLAGS" + LB_LINUX_TRY_COMPILE([ + #include + #include + ],[ + gni_cdm_handle_t kgni_domain; + gni_return_t rc; + int rrc; + + rc = gni_cdm_create(0, 1, 1, 0, &kgni_domain); + + rrc = (rc == GNI_RC_SUCCESS) ? 0 : 1; + + return rrc; + ],[ + AC_MSG_RESULT([yes]) + GNILND="gnilnd" + ],[ + AC_MSG_RESULT([no]) + AC_MSG_ERROR([can't compile gnilnd with given GNICPPFLAGS: $GNICPPFLAGS]) + ]) + # at this point, we have gnilnd basic support, now check for extra features + AC_MSG_CHECKING([to use RCA in gnilnd]) + LB_LINUX_TRY_COMPILE([ + #include + #include + #include + ],[ + gni_cdm_handle_t kgni_domain; + gni_return_t rc; + krca_ticket_t ticket = KRCA_NULL_TICKET; + int rrc; + __u32 nid = 0, nic_addr; + + rc = gni_cdm_create(0, 1, 1, 0, &kgni_domain); + + rrc = (rc == GNI_RC_SUCCESS) ? 0 : 1; + + rrc += krca_nid_to_nicaddrs(nid, 1, &nic_addr); + + rrc += krca_register(&ticket, RCA_MAKE_SERVICE_INDEX(RCA_IO_CLASS, 9), 99, 0); + + return rrc; + ],[ + AC_MSG_RESULT([yes]) + GNICPPFLAGS="$GNICPPFLAGS -DGNILND_USE_RCA=1" + GNILNDRCA="gnilndrca" + ],[ + AC_MSG_RESULT([no]) + ]) + EXTRA_KCFLAGS="$EXTRA_KCFLAGS_save" +fi +AC_SUBST(GNICPPFLAGS) +AC_SUBST(GNILNDRCA) +AC_SUBST(GNILND) +]) # # # LN_CONFIG_USERSPACE # -# This is defined but empty because it is called from +# This is defined but empty because it is called from # build/autconf/lustre-build.m4 which is shared by all branches. # AC_DEFUN([LN_CONFIG_USERSPACE], @@ -553,7 +630,7 @@ LB_LINUX_TRY_COMPILE([ size_t *lenp = NULL; loff_t *ppos = NULL; - proc_handler *proc_handler; + proc_handler *proc_handler = NULL; proc_handler(table, write, buffer, lenp, ppos); ],[ @@ -600,6 +677,7 @@ LN_CONFIG_BACKOFF LN_CONFIG_QUADRICS LN_CONFIG_O2IB LN_CONFIG_RALND +LN_CONFIG_GNILND LN_CONFIG_PTLLND LN_CONFIG_MX # 2.6.32 @@ -639,11 +717,6 @@ AC_CHECK_FUNCS([gethostbyname socket connect]) # lnet/utils/debug.c AC_CHECK_HEADERS([linux/version.h]) -AC_CHECK_TYPE([spinlock_t], - [AC_DEFINE(HAVE_SPINLOCK_T, 1, [spinlock_t is defined])], - [], - [#include ]) - # lnet/utils/wirecheck.c AC_CHECK_FUNCS([strnlen]) @@ -747,8 +820,9 @@ AC_DEFUN([LN_CONDITIONALS], AM_CONDITIONAL(BUILD_MXLND, test x$MXLND = "xmxlnd") AM_CONDITIONAL(BUILD_O2IBLND, test x$O2IBLND = "xo2iblnd") AM_CONDITIONAL(BUILD_RALND, test x$RALND = "xralnd") +AM_CONDITIONAL(BUILD_GNILND, test x$GNILND = "xgnilnd") +AM_CONDITIONAL(BUILD_GNILND_RCA, test x$GNILNDRCA = "xgnilndrca") AM_CONDITIONAL(BUILD_PTLLND, test x$PTLLND = "xptllnd") -AM_CONDITIONAL(BUILD_UPTLLND, test x$UPTLLND = "xptllnd") AM_CONDITIONAL(BUILD_USOCKLND, test x$USOCKLND = "xusocklnd") ]) @@ -777,6 +851,8 @@ lnet/klnds/qswlnd/Makefile lnet/klnds/qswlnd/autoMakefile lnet/klnds/ralnd/Makefile lnet/klnds/ralnd/autoMakefile +lnet/klnds/gnilnd/Makefile +lnet/klnds/gnilnd/autoMakefile lnet/klnds/socklnd/Makefile lnet/klnds/socklnd/autoMakefile lnet/klnds/ptllnd/Makefile @@ -788,7 +864,6 @@ lnet/selftest/autoMakefile lnet/ulnds/Makefile lnet/ulnds/autoMakefile lnet/ulnds/socklnd/Makefile -lnet/ulnds/ptllnd/Makefile lnet/utils/Makefile lnet/include/lnet/darwin/Makefile ])