Skip to content

Commit

Permalink
IB/BASE: Adding m4 check for older verbs
Browse files Browse the repository at this point in the history
  • Loading branch information
shamisp committed Oct 18, 2022
1 parent cfbeb6c commit 2fbd35f
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 6 deletions.
18 changes: 12 additions & 6 deletions src/uct/ib/base/ib_md.c
Original file line number Diff line number Diff line change
Expand Up @@ -1233,16 +1233,22 @@ static uct_md_ops_t UCS_V_UNUSED uct_ib_md_global_odp_ops = {
static const char *uct_ib_device_transport_type_name(struct ibv_device *device)
{
switch (device->transport_type) {
case 0:
case IBV_TRANSPORT_IB:
return "InfiniBand";
case 1:
case IBV_TRANSPORT_IWARP:
return "iWARP";
case 2:
#if HAVE_DECL_IBV_TRANSPORT_USNIC
case IBV_TRANSPORT_USNIC:
return "usNIC";
case 3:
#endif
#if HAVE_DECL_IBV_TRANSPORT_USNIC_UDP
case IBV_TRANSPORT_USNIC_UDP:
return "usNIC UDP";
case 4:
#endif
#if HAVE_DECL_IBV_TRANSPORT_UNSPECIFIED
case IBV_TRANSPORT_UNSPECIFIED:
return "Unspecified";
#endif
default:
return "Unknown";
}
Expand All @@ -1254,7 +1260,7 @@ static int uct_ib_device_is_supported(struct ibv_device *device)
int ret = device->transport_type == IBV_TRANSPORT_IB;
if (!ret) {
ucs_debug("device %s of type %s is not supported",
device->dev_name, uct_ib_device_transport_to_name(device));
device->dev_name, uct_ib_device_transport_type_name(device));
}

return ret;
Expand Down
3 changes: 3 additions & 0 deletions src/uct/ib/configure.m4
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,9 @@ AS_IF([test "x$with_ib" = "xyes"],
AC_CHECK_DECLS([IBV_LINK_LAYER_INFINIBAND,
IBV_LINK_LAYER_ETHERNET,
IBV_EVENT_GID_CHANGE,
IBV_TRANSPORT_USNIC,
IBV_TRANSPORT_USNIC_UDP,
IBV_TRANSPORT_UNSPECIFIED,
ibv_create_qp_ex,
ibv_create_cq_ex,
ibv_create_srq_ex],
Expand Down

0 comments on commit 2fbd35f

Please sign in to comment.