@@ -552,7 +552,7 @@ struct ibv_ah *__ibv_create_ah(struct ibv_pd *pd, struct ibv_ah_attr *attr)
int err;
struct ibv_ah *ah = NULL;
#ifndef NRESOLVE_NEIGH
- struct ibv_port_attr port_attr;
+ struct ibv_port_attr_ex port_attr;
int dst_family;
int src_family;
int oif;
@@ -572,7 +572,9 @@ struct ibv_ah *__ibv_create_ah(struct ibv_pd *pd, struct ibv_ah_attr *attr)
goto return_ah;
}
- err = ibv_query_port(pd->context, attr->port_num, &port_attr);
+ port_attr.comp_mask = IBV_QUERY_PORT_EX_LINK_LAYER |
+ IBV_QUERY_PORT_EX_CAP_FLAGS;
+ err = ibv_query_port_ex(pd->context, attr->port_num, &port_attr);
if (err) {
fprintf(stderr, PFX "ibv_create_ah failed to query port.\n");