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

📄 lustre-lnet.m4

📁 lustre 1.6.5 source code
💻 M4
📖 第 1 页 / 共 3 页
字号:
else	o2ib_found=false	for O2IBPATH in $O2IBPATHS; do		if test \( -f ${O2IBPATH}/include/rdma/rdma_cm.h -a \			   -f ${O2IBPATH}/include/rdma/ib_cm.h -a \			   -f ${O2IBPATH}/include/rdma/ib_verbs.h -a \			   -f ${O2IBPATH}/include/rdma/ib_fmr_pool.h \); then			o2ib_found=true			break 		fi	done	if ! $o2ib_found; then		AC_MSG_RESULT([no])		case $ENABLEO2IB in			1) ;;			2) AC_MSG_ERROR([kernel OpenIB gen2 headers not present]);;			3) AC_MSG_ERROR([bad --with-o2ib path]);;			*) AC_MSG_ERROR([internal error]);;		esac	else		O2IBCPPFLAGS="-I$O2IBPATH/include"		EXTRA_KCFLAGS_save="$EXTRA_KCFLAGS"		EXTRA_KCFLAGS="$EXTRA_KCFLAGS $O2IBCPPFLAGS"		EXTRA_LNET_INCLUDE="$O2IBCPPFLAGS $EXTRA_LNET_INCLUDE"		LB_LINUX_TRY_COMPILE([		        #include <linux/version.h>		        #include <linux/pci.h>		        #if !HAVE_GFP_T		        typedef int gfp_t;		        #endif		        #include <rdma/rdma_cm.h>		        #include <rdma/ib_cm.h>		        #include <rdma/ib_verbs.h>		        #include <rdma/ib_fmr_pool.h>		],[		        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;		        cm_id = rdma_create_id(NULL, NULL, RDMA_PS_TCP);		        return PTR_ERR(cm_id);		],[		        AC_MSG_RESULT([yes])		        O2IBLND="o2iblnd"		],[		        AC_MSG_RESULT([no])		        case $ENABLEO2IB in		        1) ;;		        2) AC_MSG_ERROR([can't compile with kernel OpenIB gen2 headers]);;		        3) AC_MSG_ERROR([can't compile with OpenIB gen2 headers under $O2IBPATH]);;		        *) AC_MSG_ERROR([internal error]);;		        esac		        O2IBLND=""		        O2IBCPPFLAGS=""		])		# we know at this point that the found OFED source is good		if test \( $ENABLEO2IB = 3 \); then			if test \( -f $O2IBPATH/Module.symvers \); then				AC_MSG_NOTICE([adding $O2IBPATH/Module.symvers to $PWD/Module.symvers])				cat $O2IBPATH/Module.symvers >> $PWD/Module.symvers			else				AC_MSG_ERROR([an external source tree was specified for o2iblnd however I could not find a $O2IBPATH/Module.symvers there])			fi		fi		# version checking is a hack and isn't reliable,		# we need verify it with each new ofed release		if grep -q ib_dma_map_single \			${O2IBPATH}/include/rdma/ib_verbs.h; then			if grep -q comp_vector \				${O2IBPATH}/include/rdma/ib_verbs.h; then				IBLND_OFED_VERSION="1025"			else				IBLND_OFED_VERSION="1020"			fi		else			IBLND_OFED_VERSION="1010"		fi		AC_DEFINE_UNQUOTED(IBLND_OFED_VERSION, $IBLND_OFED_VERSION,				   [OFED version])		EXTRA_KCFLAGS="$EXTRA_KCFLAGS_save"	fifiAC_SUBST(EXTRA_LNET_INCLUDE)AC_SUBST(O2IBCPPFLAGS)AC_SUBST(O2IBLND)])## LN_CONFIG_OPENIB## check for OpenIB in the kernelAC_DEFUN([LN_CONFIG_OPENIB],[AC_MSG_CHECKING([whether to enable OpenIB support])# set defaultOPENIBPATH="$LINUX/drivers/infiniband"AC_ARG_WITH([openib],	AC_HELP_STRING([--with-openib=path],	               [build openiblnd against path]),	[		case $with_openib in		yes)    ENABLEOPENIB=2			;;		no)     ENABLEOPENIB=0			;;		*)      OPENIBPATH="$with_openib"			ENABLEOPENIB=3			;;		esac	],[		ENABLEOPENIB=1	])if test $ENABLEOPENIB -eq 0; then	AC_MSG_RESULT([disabled])elif test ! \( -f ${OPENIBPATH}/include/ts_ib_core.h -a \               -f ${OPENIBPATH}/include/ts_ib_cm.h -a \	       -f ${OPENIBPATH}/include/ts_ib_sa_client.h \); then	AC_MSG_RESULT([no])	case $ENABLEOPENIB in	1) ;;	2) AC_MSG_ERROR([kernel OpenIB headers not present]);;	3) AC_MSG_ERROR([bad --with-openib path]);;	*) AC_MSG_ERROR([internal error]);;	esacelse	case $ENABLEOPENIB in	1|2) OPENIBCPPFLAGS="-I$OPENIBPATH/include -DIN_TREE_BUILD";;	3)   OPENIBCPPFLAGS="-I$OPENIBPATH/include";;	*)   AC_MSG_RESULT([no])	     AC_MSG_ERROR([internal error]);;	esac	OPENIBCPPFLAGS="$OPENIBCPPFLAGS -DIB_NTXRXPARAMS=4"	EXTRA_KCFLAGS_save="$EXTRA_KCFLAGS"	EXTRA_KCFLAGS="$EXTRA_KCFLAGS $OPENIBCPPFLAGS"	LB_LINUX_TRY_COMPILE([		#include <ts_ib_core.h>		#include <ts_ib_cm.h>	        #include <ts_ib_sa_client.h>	],[	        struct ib_device_properties dev_props;	        struct ib_cm_active_param   cm_active_params;	        tTS_IB_CLIENT_QUERY_TID     tid;	        int                         enum1 = IB_QP_ATTRIBUTE_STATE;		int                         enum2 = IB_ACCESS_LOCAL_WRITE;		int                         enum3 = IB_CQ_CALLBACK_INTERRUPT;		int                         enum4 = IB_CQ_PROVIDER_REARM;		return 0;	],[		AC_MSG_RESULT([yes])		OPENIBLND="openiblnd"	],[		AC_MSG_RESULT([no])		case $ENABLEOPENIB in		1) ;;		2) AC_MSG_ERROR([can't compile with kernel OpenIB headers]);;		3) AC_MSG_ERROR([can't compile with OpenIB headers under $OPENIBPATH]);;		*) AC_MSG_ERROR([internal error]);;		esac		OPENIBLND=""		OPENIBCPPFLAGS=""	])	EXTRA_KCFLAGS="$EXTRA_KCFLAGS_save"fiAC_SUBST(OPENIBCPPFLAGS)AC_SUBST(OPENIBLND)])## LN_CONFIG_CIBLND#AC_DEFUN([LN_CONFIG_CIB],[AC_MSG_CHECKING([whether to enable Cisco/TopSpin IB support])# set defaultCIBPATH=""CIBLND=""AC_ARG_WITH([cib],	AC_HELP_STRING([--with-cib=path],	               [build ciblnd against path]),	[		case $with_cib in		no)     AC_MSG_RESULT([no]);;		*)      CIBPATH="$with_cib"	                if test -d "$CIBPATH"; then	                 	AC_MSG_RESULT([yes])                        else				AC_MSG_RESULT([no])				AC_MSG_ERROR([No directory $CIBPATH])			fi;;		esac	],[		AC_MSG_RESULT([no])	])if test -n "$CIBPATH"; then	CIBCPPFLAGS="-I${CIBPATH}/ib/ts_api_ng/include -I${CIBPATH}/all/kernel_services/include -DUSING_TSAPI"	CIBCPPFLAGS="$CIBCPPFLAGS -DIB_NTXRXPARAMS=3"	EXTRA_KCFLAGS_save="$EXTRA_KCFLAGS"	EXTRA_KCFLAGS="$EXTRA_KCFLAGS $CIBCPPFLAGS"	LB_LINUX_TRY_COMPILE([		#include <ts_ib_core.h>		#include <ts_ib_cm.h>	        #include <ts_ib_sa_client.h>	],[	        struct ib_device_properties dev_props;	        struct ib_cm_active_param   cm_active_params;	        tTS_IB_CLIENT_QUERY_TID     tid;	        int                         enum1 = TS_IB_QP_ATTRIBUTE_STATE;		int                         enum2 = TS_IB_ACCESS_LOCAL_WRITE;		int                         enum3 = TS_IB_CQ_CALLBACK_INTERRUPT;		int                         enum4 = TS_IB_CQ_PROVIDER_REARM;		return 0;	],[		CIBLND="ciblnd"	],[		AC_MSG_ERROR([can't compile ciblnd with given path])	        CIBCPPFLAGS=""	])	EXTRA_KCFLAGS="$EXTRA_KCFLAGS_save"fiAC_SUBST(CIBCPPFLAGS)AC_SUBST(CIBLND)])## LN_CONFIG_IIB## check for infinicon infiniband support#AC_DEFUN([LN_CONFIG_IIB],[AC_MSG_CHECKING([whether to enable Infinicon support])# set defaultIIBPATH="/usr/include"AC_ARG_WITH([iib],	AC_HELP_STRING([--with-iib=path],	               [build iiblnd against path]),	[		case $with_iib in		yes)    ENABLEIIB=2			;;		no)     ENABLEIIB=0			;;		*)      IIBPATH="${with_iib}/include"			ENABLEIIB=3			;;		esac	],[		ENABLEIIB=1	])if test $ENABLEIIB -eq 0; then	AC_MSG_RESULT([disabled])elif test ! \( -f ${IIBPATH}/linux/iba/ibt.h \); then	AC_MSG_RESULT([no])	case $ENABLEIIB in	1) ;;	2) AC_MSG_ERROR([default Infinicon headers not present]);;	3) AC_MSG_ERROR([bad --with-iib path]);;	*) AC_MSG_ERROR([internal error]);;	esacelse	IIBCPPFLAGS="-I$IIBPATH"	if test $IIBPATH != "/usr/include"; then		# we need /usr/include come what may		IIBCPPFLAGS="$IIBCPPFLAGS -I/usr/include"        fi	EXTRA_KCFLAGS_save="$EXTRA_KCFLAGS"	EXTRA_KCFLAGS="$EXTRA_KCFLAGS $IIBCPPFLAGS"	LB_LINUX_TRY_COMPILE([		#include <linux/iba/ibt.h>	],[	        IBT_INTERFACE_UNION interfaces;        	FSTATUS             rc;	         rc = IbtGetInterfaceByVersion(IBT_INTERFACE_VERSION_2,					       &interfaces);		return rc == FSUCCESS ? 0 : 1;	],[		AC_MSG_RESULT([yes])		IIBLND="iiblnd"	],[		AC_MSG_RESULT([no])		case $ENABLEIIB in		1) ;;		2) AC_MSG_ERROR([can't compile with default Infinicon headers]);;		3) AC_MSG_ERROR([can't compile with Infinicon headers under $IIBPATH]);;		*) AC_MSG_ERROR([internal error]);;		esac		IIBLND=""		IIBCPPFLAGS=""	])	EXTRA_KCFLAGS="$EXTRA_KCFLAGS_save"fiAC_SUBST(IIBCPPFLAGS)AC_SUBST(IIBLND)])## LN_CONFIG_VIB## check for Voltaire infiniband support#AC_DEFUN([LN_CONFIG_VIB],[AC_MSG_CHECKING([whether to enable Voltaire IB support])VIBPATH=""AC_ARG_WITH([vib],	AC_HELP_STRING([--with-vib=path],		       [build viblnd against path]),	[		case $with_vib in		no)     AC_MSG_RESULT([no]);;		*)	VIBPATH="${with_vib}/src/nvigor/ib-code"			if test -d "$with_vib" -a -d "$VIBPATH"; then	                        AC_MSG_RESULT([yes])			else				AC_MSG_RESULT([no])				AC_MSG_ERROR([No directory $VIBPATH])                        fi;;		esac	],[		AC_MSG_RESULT([no])	])if test -z "$VIBPATH"; then	VIBLND=""else	VIBCPPFLAGS="-I${VIBPATH}/include -I${VIBPATH}/cm"	EXTRA_KCFLAGS_save="$EXTRA_KCFLAGS"	EXTRA_KCFLAGS="$EXTRA_KCFLAGS $VIBCPPFLAGS"	LB_LINUX_TRY_COMPILE([		#include <linux/list.h>		#include <asm/byteorder.h>		#ifdef __BIG_ENDIAN		# define CPU_BE 1                # define CPU_LE 0		#endif		#ifdef __LITTLE_ENDIAN		# define CPU_BE 0		# define CPU_LE 1		#endif		#include <vverbs.h>	        #include <ib-cm.h>	        #include <ibat.h>	],[	        vv_hca_h_t       kib_hca;		vv_return_t      vvrc;	        cm_cep_handle_t  cep;	        ibat_arp_data_t  arp_data;		ibat_stat_t      ibatrc;		vvrc = vv_hca_open("ANY_HCA", NULL, &kib_hca);	        cep = cm_create_cep(cm_cep_transp_rc);	        ibatrc = ibat_get_ib_data((uint32_t)0, (uint32_t)0,                                          ibat_paths_primary, &arp_data,					  (ibat_get_ib_data_reply_fn_t)NULL,                                          NULL, 0);		return 0;	],[		VIBLND="viblnd"	],[	        AC_MSG_ERROR([can't compile viblnd with given path])	])	EXTRA_KCFLAGS="$EXTRA_KCFLAGS_save"fiif test -n "$VIBLND"; then	EXTRA_KCFLAGS_save="$EXTRA_KCFLAGS"	EXTRA_KCFLAGS="$EXTRA_KCFLAGS $VIBCPPFLAGS"	AC_MSG_CHECKING([if Voltaire still uses void * sg addresses])	LB_LINUX_TRY_COMPILE([		#include <linux/list.h>		#include <asm/byteorder.h>		#ifdef __BIG_ENDIAN		# define CPU_BE 1                # define CPU_LE 0		#endif		#ifdef __LITTLE_ENDIAN		# define CPU_BE 0		# define CPU_LE 1		#endif		#include <vverbs.h>	        #include <ib-cm.h>	        #include <ibat.h>	],[	        vv_scatgat_t  sg;	        return &sg.v_address[3] == NULL;	],[	        AC_MSG_RESULT([yes])	        VIBCPPFLAGS="$VIBCPPFLAGS -DIBNAL_VOIDSTAR_SGADDR=1"	],[	        AC_MSG_RESULT([no])	])	EXTRA_KCFLAGS="$EXTRA_KCFLAGS_save"fiAC_SUBST(VIBCPPFLAGS)AC_SUBST(VIBLND)])## LN_CONFIG_RALND## check whether to use the RapidArray lnd#AC_DEFUN([LN_CONFIG_RALND],[#### Rapid ArrayAC_MSG_CHECKING([if RapidArray kernel headers are present])# placeholderRACPPFLAGS="-I${LINUX}/drivers/xd1/include"EXTRA_KCFLAGS_save="$EXTRA_KCFLAGS"EXTRA_KCFLAGS="$EXTRA_KCFLAGS $RACPPFLAGS"LB_LINUX_TRY_COMPILE([	#include <linux/types.h>	#include <rapl.h>],[        RAP_RETURN          rc;	RAP_PVOID           dev_handle;        rc = RapkGetDeviceByIndex(0, NULL, &dev_handle);	return rc == RAP_SUCCESS ? 0 : 1;],[	AC_MSG_RESULT([yes])	RALND="ralnd"],[	AC_MSG_RESULT([no])	RALND=""	RACPPFLAGS=""])EXTRA_KCFLAGS="$EXTRA_KCFLAGS_save"AC_SUBST(RACPPFLAGS)AC_SUBST(RALND)])## LN_STRUCT_PAGE_LIST## 2.6.4 no longer has page->list#AC_DEFUN([LN_STRUCT_PAGE_LIST],[AC_MSG_CHECKING([if struct page has a list field])LB_LINUX_TRY_COMPILE([	#include <linux/mm.h>],[	struct page page;	&page.list;],[	AC_MSG_RESULT([yes])	AC_DEFINE(HAVE_PAGE_LIST, 1, [struct page has a list field])],[	AC_MSG_RESULT([no])])])## LN_STRUCT_SIGHAND## red hat 2.4 adds sighand to struct task_struct#AC_DEFUN([LN_STRUCT_SIGHAND],[AC_MSG_CHECKING([if task_struct has a sighand field])LB_LINUX_TRY_COMPILE([	#include <linux/sched.h>],[	struct task_struct p;	p.sighand = NULL;],[	AC_DEFINE(CONFIG_RH_2_4_20, 1, [this kernel contains Red Hat 2.4.20 patches])	AC_MSG_RESULT([yes])],[	AC_MSG_RESULT([no])])])## LN_FUNC_CPU_ONLINE## cpu_online is different in rh 2.4, vanilla 2.4, and 2.6#AC_DEFUN([LN_FUNC_CPU_ONLINE],[AC_MSG_CHECKING([if kernel defines cpu_online()])LB_LINUX_TRY_COMPILE([	#include <linux/sched.h>],[	cpu_online(0);],[	AC_MSG_RESULT([yes])	AC_DEFINE(HAVE_CPU_ONLINE, 1, [cpu_online found])],[	AC_MSG_RESULT([no])])])## LN_TYPE_GFP_T## check if gfp_t is typedef-ed#AC_DEFUN([LN_TYPE_GFP_T],[AC_MSG_CHECKING([if kernel defines gfp_t])LB_LINUX_TRY_COMPILE([        #include <linux/gfp.h>],[	return sizeof(gfp_t);],[	AC_MSG_RESULT([yes])	AC_DEFINE(HAVE_GFP_T, 1, [gfp_t found])],[	AC_MSG_RESULT([no])])])## LN_TYPE_CPUMASK_T## same goes for cpumask_t

⌨️ 快捷键说明

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