⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 lustre-lnet.m4

📁 lustre 1.6.5 source code
💻 M4
📖 第 1 页 / 共 3 页
字号:
## LN_CONFIG_MAX_PAYLOAD## configure maximum payload#AC_DEFUN([LN_CONFIG_MAX_PAYLOAD],[AC_MSG_CHECKING([for non-default maximum LNET payload])AC_ARG_WITH([max-payload-mb],	AC_HELP_STRING([--with-max-payload-mb=MBytes],                       [set maximum lnet payload in MBytes]),        [		AC_MSG_RESULT([$with_max_payload_mb])	        LNET_MAX_PAYLOAD_MB=$with_max_payload_mb		LNET_MAX_PAYLOAD="(($with_max_payload_mb)<<20)"	], [		AC_MSG_RESULT([no])		LNET_MAX_PAYLOAD="LNET_MTU"	])        AC_DEFINE_UNQUOTED(LNET_MAX_PAYLOAD, $LNET_MAX_PAYLOAD,			   [Max LNET payload])])## LN_CHECK_GCC_VERSION## Check compiler version#AC_DEFUN([LN_CHECK_GCC_VERSION],[AC_MSG_CHECKING([compiler version])PTL_CC_VERSION=`$CC --version | awk '/^gcc/{print $ 3}'`PTL_MIN_CC_VERSION="3.2.2"v2n() {	awk -F. '{printf "%d\n", (($ 1)*100+($ 2))*100+($ 3)}'}if test -z "$PTL_CC_VERSION" -o \        `echo $PTL_CC_VERSION | v2n` -ge `echo $PTL_MIN_CC_VERSION | v2n`; then	AC_MSG_RESULT([ok])else	AC_MSG_RESULT([Buggy compiler found])	AC_MSG_ERROR([Need gcc version >= $PTL_MIN_CC_VERSION])fi])## LN_CONFIG_CDEBUG## whether to enable various libcfs debugs (CDEBUG, ENTRY/EXIT, LASSERT, etc.)#AC_DEFUN([LN_CONFIG_CDEBUG],[AC_MSG_CHECKING([whether to enable CDEBUG, CWARN])AC_ARG_ENABLE([libcfs_cdebug],	AC_HELP_STRING([--disable-libcfs-cdebug],			[disable libcfs CDEBUG, CWARN]),	[],[enable_libcfs_cdebug='yes'])AC_MSG_RESULT([$enable_libcfs_cdebug])if test x$enable_libcfs_cdebug = xyes; then   AC_DEFINE(CDEBUG_ENABLED, 1, [enable libcfs CDEBUG, CWARN])else   AC_DEFINE(CDEBUG_ENABLED, 0, [disable libcfs CDEBUG, CWARN])fiAC_MSG_CHECKING([whether to enable ENTRY/EXIT])AC_ARG_ENABLE([libcfs_trace],	AC_HELP_STRING([--disable-libcfs-trace],			[disable libcfs ENTRY/EXIT]),	[],[enable_libcfs_trace='yes'])AC_MSG_RESULT([$enable_libcfs_trace])if test x$enable_libcfs_trace = xyes; then   AC_DEFINE(CDEBUG_ENTRY_EXIT, 1, [enable libcfs ENTRY/EXIT])else   AC_DEFINE(CDEBUG_ENTRY_EXIT, 0, [disable libcfs ENTRY/EXIT])fiAC_MSG_CHECKING([whether to enable LASSERT, LASSERTF])AC_ARG_ENABLE([libcfs_assert],	AC_HELP_STRING([--disable-libcfs-assert],			[disable libcfs LASSERT, LASSERTF]),	[],[enable_libcfs_assert='yes'])AC_MSG_RESULT([$enable_libcfs_assert])if test x$enable_libcfs_assert = xyes; then   AC_DEFINE(LIBCFS_DEBUG, 1, [enable libcfs LASSERT, LASSERTF])fi])## LN_CONFIG_AFFINITY## check if cpu affinity is available/wanted#AC_DEFUN([LN_CONFIG_AFFINITY],[AC_ARG_ENABLE([affinity],	AC_HELP_STRING([--disable-affinity],		       [disable process/irq affinity]),	[],[enable_affinity='yes'])AC_MSG_CHECKING([for CPU affinity support])if test x$enable_affinity = xno ; then	AC_MSG_RESULT([no (by request)])else	LB_LINUX_TRY_COMPILE([		#include <linux/sched.h>	],[		struct task_struct t;		#if HAVE_CPUMASK_T		cpumask_t     m;	        #else	        unsigned long m;		#endif		set_cpus_allowed(&t, m);	],[		AC_DEFINE(CPU_AFFINITY, 1, [kernel has cpu affinity support])		AC_MSG_RESULT([yes])	],[		AC_MSG_RESULT([no (no kernel support)])	])fi])## LN_CONFIG_PORTALS## configure support for Portals#AC_DEFUN([LN_CONFIG_PORTALS],[AC_MSG_CHECKING([for portals])AC_ARG_WITH([portals],	AC_HELP_STRING([--with-portals=path],                       [set path to portals]),        [		case $with_portals in			no)     ENABLEPORTALS=0				;;			*)	PORTALS="${with_portals}"				ENABLEPORTALS=1				;;		esac	], [		ENABLEPORTALS=0	])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_ERROR([bad --with-portals path])else        AC_MSG_RESULT([$PORTALS])        PTLLNDCPPFLAGS="-I${PORTALS}/include"fiAC_SUBST(PTLLNDCPPFLAGS)])## LN_CONFIG_BACKOFF## check if tunable tcp backoff is available/wanted#AC_DEFUN([LN_CONFIG_BACKOFF],[AC_MSG_CHECKING([for tunable backoff TCP support])AC_ARG_ENABLE([backoff],       AC_HELP_STRING([--disable-backoff],                      [disable socknal tunable backoff]),       [],[enable_backoff='yes'])if test x$enable_backoff = xno ; then       AC_MSG_RESULT([no (by request)])else       BOCD="`grep -c TCP_BACKOFF $LINUX/include/linux/tcp.h`"       if test "$BOCD" != 0 ; then               AC_DEFINE(SOCKNAL_BACKOFF, 1, [use tunable backoff TCP])               AC_MSG_RESULT(yes)       else               AC_MSG_RESULT([no (no kernel support)])       fifi])## LN_CONFIG_PANIC_DUMPLOG## check if tunable panic_dumplog is wanted#AC_DEFUN([LN_CONFIG_PANIC_DUMPLOG],[AC_MSG_CHECKING([for tunable panic_dumplog support])AC_ARG_ENABLE([panic_dumplog],       AC_HELP_STRING([--enable-panic_dumplog],                      [enable panic_dumplog]),       [],[enable_panic_dumplog='no'])if test x$enable_panic_dumplog = xyes ; then       AC_DEFINE(LNET_DUMP_ON_PANIC, 1, [use dumplog on panic])       AC_MSG_RESULT([yes (by request)])else       AC_MSG_RESULT([no])fi])## LN_CONFIG_PTLLND## configure support for Portals LND#AC_DEFUN([LN_CONFIG_PTLLND],[if test -z "$ENABLEPORTALS"; then	LN_CONFIG_PORTALSfiAC_MSG_CHECKING([whether to build the kernel portals LND])PTLLND=""if test $ENABLEPORTALS -ne 0; then	AC_MSG_RESULT([yes])	PTLLND="ptllnd"else	AC_MSG_RESULT([no])fiAC_SUBST(PTLLND)])## LN_CONFIG_UPTLLND## configure support for Portals LND#AC_DEFUN([LN_CONFIG_UPTLLND],[if test -z "$ENABLEPORTALS"; then	LN_CONFIG_PORTALSfiAC_MSG_CHECKING([whether to build the userspace portals LND])UPTLLND=""if test $ENABLEPORTALS -ne 0; then	AC_MSG_RESULT([yes])	UPTLLND="ptllnd"else	AC_MSG_RESULT([no])fiAC_SUBST(UPTLLND)])## LN_CONFIG_USOCKLND## configure support for userspace TCP/IP LND#AC_DEFUN([LN_CONFIG_USOCKLND],[AC_MSG_CHECKING([whether to build usocklnd])AC_ARG_ENABLE([usocklnd],       	AC_HELP_STRING([--disable-usocklnd],                      	[disable usocklnd]),       	[],[enable_usocklnd='yes'])if test x$enable_usocklnd = xyes ; then	if test "$ENABLE_LIBPTHREAD" = "yes" ; then		AC_MSG_RESULT([yes])      		USOCKLND="usocklnd"	else		AC_MSG_RESULT([no (libpthread not present or disabled)])		USOCKLND=""	fielse	AC_MSG_RESULT([no (disabled explicitly)])     	USOCKLND=""fiAC_SUBST(USOCKLND)])## LN_CONFIG_QUADRICS## check if quadrics support is in this kernel#AC_DEFUN([LN_CONFIG_QUADRICS],[AC_MSG_CHECKING([for QsNet sources])AC_ARG_WITH([qsnet],	AC_HELP_STRING([--with-qsnet=path],		       [set path to qsnet source (default=$LINUX)]),	[QSNET=$with_qsnet],	[QSNET=$LINUX])AC_MSG_RESULT([$QSNET])AC_MSG_CHECKING([if quadrics kernel headers are present])if test -d $QSNET/drivers/net/qsnet ; then	AC_MSG_RESULT([yes])	QSWLND="qswlnd"	AC_MSG_CHECKING([for multirail EKC])	if test -f $QSNET/include/elan/epcomms.h; then		AC_MSG_RESULT([supported])		QSWCPPFLAGS="-I$QSNET/include -DMULTIRAIL_EKC=1"	else		AC_MSG_RESULT([not supported])		AC_MSG_ERROR([Need multirail EKC])	fi	if test x$QSNET = x$LINUX ; then		LB_LINUX_CONFIG([QSNET],[],[			LB_LINUX_CONFIG([QSNET_MODULE],[],[				AC_MSG_WARN([QSNET is not enabled in this kernel; not building qswlnd.])				QSWLND=""				QSWCPPFLAGS=""			])		])	fielse	AC_MSG_RESULT([no])	QSWLND=""	QSWCPPFLAGS=""fiAC_SUBST(QSWCPPFLAGS)AC_SUBST(QSWLND)])## LN_CONFIG_GM## check if GM support is available#AC_DEFUN([LN_CONFIG_GM],[AC_MSG_CHECKING([whether to enable GM support])AC_ARG_WITH([gm],        AC_HELP_STRING([--with-gm=path-to-gm-source-tree],	               [build gmlnd against path]),	[	        case $with_gm in                no)    ENABLE_GM=0	               ;;                *)     ENABLE_GM=1                       GM_SRC="$with_gm"		       ;;                esac        ],[                ENABLE_GM=0        ])AC_ARG_WITH([gm-install],        AC_HELP_STRING([--with-gm-install=path-to-gm-install-tree],	               [say where GM has been installed]),	[	        GM_INSTALL=$with_gm_install        ],[                GM_INSTALL="/opt/gm"        ])if test $ENABLE_GM -eq 0; then        AC_MSG_RESULT([no])else        AC_MSG_RESULT([yes])	GMLND="gmlnd"        GMCPPFLAGS="-I$GM_SRC/include -I$GM_SRC/drivers -I$GM_SRC/drivers/linux/gm"	if test -f $GM_INSTALL/lib/libgm.a -o \                -f $GM_INSTALL/lib64/libgm.a; then	        GMLIBS="-L$GM_INSTALL/lib -L$GM_INSTALL/lib64"        else	        AC_MSG_ERROR([Cant find GM libraries under $GM_INSTALL])        fi	EXTRA_KCFLAGS_save="$EXTRA_KCFLAGS"	EXTRA_KCFLAGS="$GMCPPFLAGS -DGM_KERNEL $EXTRA_KCFLAGS"        AC_MSG_CHECKING([that code using GM compiles with given path])	LB_LINUX_TRY_COMPILE([		#define GM_STRONG_TYPES 1		#ifdef VERSION		#undef VERSION		#endif	        #include "gm.h"		#include "gm_internal.h"        ],[	        struct gm_port *port = NULL;		gm_recv_event_t *rxevent = gm_blocking_receive_no_spin(port);                return 0;        ],[		AC_MSG_RESULT([yes])        ],[		AC_MSG_RESULT([no])		AC_MSG_ERROR([Bad --with-gm path])        ])	AC_MSG_CHECKING([that GM has gm_register_memory_ex_phys()])	LB_LINUX_TRY_COMPILE([		#define GM_STRONG_TYPES 1		#ifdef VERSION		#undef VERSION		#endif	        #include "gm.h"		#include "gm_internal.h"	],[		gm_status_t     gmrc;		struct gm_port *port = NULL;		gm_u64_t        phys = 0;		gm_up_t         pvma = 0;		gmrc = gm_register_memory_ex_phys(port, phys, 100, pvma);		return 0;	],[		AC_MSG_RESULT([yes])	],[		AC_MSG_RESULT([no.Please patch the GM sources as follows...    cd $GM_SRC    patch -p0 < $PWD/lnet/klnds/gmlnd/gm-reg-phys.patch...then rebuild and re-install them])                AC_MSG_ERROR([Can't build GM without gm_register_memory_ex_phys()])        ])	EXTRA_KCFLAGS="$EXTRA_KCFLAGS_save"fiAC_SUBST(GMCPPFLAGS)AC_SUBST(GMLIBS)AC_SUBST(GMLND)])## LN_CONFIG_MX#AC_DEFUN([LN_CONFIG_MX],[AC_MSG_CHECKING([whether to enable Myrinet MX support])# set defaultMXPATH="/opt/mx"AC_ARG_WITH([mx],       AC_HELP_STRING([--with-mx=path],                      [build mxlnd against path]),       [               case $with_mx in               yes)    ENABLEMX=2                       ;;               no)     ENABLEMX=0                       ;;               *)      MXPATH=$with_mx                       ENABLEMX=3                       ;;               esac       ],[               ENABLEMX=1       ])if test $ENABLEMX -eq 0; then       AC_MSG_RESULT([disabled])elif test ! \( -f ${MXPATH}/include/myriexpress.h -a \              -f ${MXPATH}/include/mx_kernel_api.h -a \              -f ${MXPATH}/include/mx_pin.h \); then       AC_MSG_RESULT([no])       case $ENABLEMX in       1) ;;       2) AC_MSG_ERROR([Myrinet MX kernel headers not present]);;       3) AC_MSG_ERROR([bad --with-mx path]);;       *) AC_MSG_ERROR([internal error]);;       esacelse       MXCPPFLAGS="-I$MXPATH/include"       EXTRA_KCFLAGS_save="$EXTRA_KCFLAGS"       EXTRA_KCFLAGS="$EXTRA_KCFLAGS $MXCPPFLAGS"       MXLIBS="-L$MXPATH/lib"       LB_LINUX_TRY_COMPILE([               #define MX_KERNEL 1               #include <mx_extensions.h>               #include <myriexpress.h>       ],[               mx_endpoint_t   end;               mx_status_t     status;               mx_request_t    request;               int             result;               mx_init();               mx_open_endpoint(MX_ANY_NIC, MX_ANY_ENDPOINT, 0, NULL, 0, &end);	       mx_register_unexp_handler(end, (mx_unexp_handler_t) NULL, NULL);               mx_wait_any(end, MX_INFINITE, 0LL, 0LL, &status, &result);               mx_iconnect(end, 0LL, 0, 0, 0, NULL, &request);               return 0;       ],[               AC_MSG_RESULT([yes])               MXLND="mxlnd"       ],[               AC_MSG_RESULT([no])               case $ENABLEMX in               1) ;;               2) AC_MSG_ERROR([can't compile with Myrinet MX kernel headers]);;               3) AC_MSG_ERROR([can't compile with Myrinet MX headers under $MXPATH]);;               *) AC_MSG_ERROR([internal error]);;               esac               MXLND=""               MXCPPFLAGS=""       ])       EXTRA_KCFLAGS="$EXTRA_KCFLAGS_save"fiAC_SUBST(MXCPPFLAGS)AC_SUBST(MXLIBS)AC_SUBST(MXLND)])## LN_CONFIG_O2IB#AC_DEFUN([LN_CONFIG_O2IB],[AC_MSG_CHECKING([whether to enable OpenIB gen2 support])# set defaultAC_ARG_WITH([o2ib],	AC_HELP_STRING([--with-o2ib=path],	               [build o2iblnd against path]),	[		case $with_o2ib in		yes)    O2IBPATHS="$LINUX $LINUX/drivers/infiniband"			ENABLEO2IB=2			;;		no)     ENABLEO2IB=0			;;		*)      O2IBPATHS=$with_o2ib			ENABLEO2IB=3			;;		esac	],[		O2IBPATHS="$LINUX $LINUX/drivers/infiniband"		ENABLEO2IB=1	])if test $ENABLEO2IB -eq 0; then	AC_MSG_RESULT([disabled])

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -