* better checking/error messages on OpenIB automagic
AC_DEFUN([LP_CONFIG_OPENIB],[
AC_MSG_CHECKING([whether to enable OpenIB support])
# set default
AC_DEFUN([LP_CONFIG_OPENIB],[
AC_MSG_CHECKING([whether to enable OpenIB support])
# set default
-DFLTOPENIBCPPFLAGS="-I$LINUX/drivers/infiniband/include -DIN_TREE_BUILD"
+OPENIBPATH="$LINUX/drivers/infiniband"
AC_ARG_WITH([openib],
AC_HELP_STRING([--with-openib=path],
[build openibnal against path]),
[
case $with_openib in
AC_ARG_WITH([openib],
AC_HELP_STRING([--with-openib=path],
[build openibnal against path]),
[
case $with_openib in
- yes) OPENIBCPPFLAGS="$DFLTOPENIBCPPFLAGS"
- ENABLEOPENIB=2
- *) OPENIBCPPFLAGS="-I$with_openib/include"
+ *) OPENIBPATH="$with_openib"
ENABLEOPENIB=3
;;
esac
],[
ENABLEOPENIB=3
;;
esac
],[
- OPENIBCPPFLAGS="$DFLTOPENIBCPPFLAGS"
ENABLEOPENIB=1
])
if test $ENABLEOPENIB -eq 0; then
AC_MSG_RESULT([disabled])
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_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]);;
+ esac
+ 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
EXTRA_KCFLAGS_save="$EXTRA_KCFLAGS"
EXTRA_KCFLAGS="$EXTRA_KCFLAGS $OPENIBCPPFLAGS"
LB_LINUX_TRY_COMPILE([
#include <ts_ib_core.h>
EXTRA_KCFLAGS_save="$EXTRA_KCFLAGS"
EXTRA_KCFLAGS="$EXTRA_KCFLAGS $OPENIBCPPFLAGS"
LB_LINUX_TRY_COMPILE([
#include <ts_ib_core.h>
+ #include <ts_ib_sa_client.h>
],[
struct ib_device_properties props;
],[
struct ib_device_properties props;
+ struct ib_common_attrib_services svc;
return 0;
],[
AC_MSG_RESULT([yes])
return 0;
],[
AC_MSG_RESULT([yes])
AC_MSG_RESULT([no])
case $ENABLEOPENIB in
1) ;;
AC_MSG_RESULT([no])
case $ENABLEOPENIB in
1) ;;
- 2) AC_MSG_ERROR([default openib headers not present]);;
- 3) AC_MSG_ERROR([bad --with-openib path]);;
+ 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
OPENIBNAL=""
*) AC_MSG_ERROR([internal error]);;
esac
OPENIBNAL=""
libcfs_nal_cmd_unregister(OPENIBNAL);
/* No new peers */
libcfs_nal_cmd_unregister(OPENIBNAL);
/* No new peers */
- /* resetting my NID to unadvertises me, removes my
+ /* resetting my NID unadvertises me, removes my
* listener and nukes all current peers */
kibnal_set_mynid (PTL_NID_ANY);
* listener and nukes all current peers */
kibnal_set_mynid (PTL_NID_ANY);