OSFLAGS += -DSUSE_11
endif
+if DEFINE_ATTR_LINK_LAYER
+XFLAGS = -DDEFINE_ATTR_LINK_LAYER
+endif
+
if DEBUG
AM_CFLAGS = -g -Wall -D_GNU_SOURCE -DDAPL_DBG -DDAT_CONF="\"$(sysconfdir)/dat.conf\""
else
AC_MSG_ERROR([<infiniband/verbs.h> not found. Is libibverbs installed?]))
fi
+if test "$disable_libcheck" != "yes"
+then
+AC_CHECK_MEMBER(struct ibv_port_attr.link_layer,
+ AM_CONDITIONAL(DEFINE_ATTR_LINK_LAYER, test "yes" = "yes"),
+ [], [#include <infiniband/verbs.h>])
+fi
+
AC_CACHE_CHECK(whether ld accepts --version-script, ac_cv_version_script,
if test -n "`$LD --help < /dev/null 2>/dev/null | grep version-script`"; then
ac_cv_version_script=yes
hca_ptr->ib_trans.ack_timer);
hca_ptr->ib_trans.mtu = DAPL_MIN(port_attr.active_mtu,
hca_ptr->ib_trans.mtu);
+#ifdef DEFINE_ATTR_LINK_LAYER
+ if (port_attr.link_layer == IBV_LINK_LAYER_ETHERNET)
+ hca_ptr->ib_trans.global = 1;
+
+ dapl_log(DAPL_DBG_TYPE_UTIL,
+ " query_hca: port.link_layer = 0x%x\n",
+ port_attr.link_layer);
+#endif
dapl_dbg_log (DAPL_DBG_TYPE_UTIL,
" query_hca: (%x.%x) ep %d ep_q %d evd %d evd_q %d mtu %d\n",
ia_attr->hardware_version_major,