@@ -90,6 +90,7 @@ int ibv_cmd_query_port(struct ibv_context *context, uint8_t port_num,
case SUCCESS:
copy_query_port_resp_to_port_attr(port_attr,
&resp_ex.legacy_resp);
+ port_attr->port_cap_flags2 = resp_ex.port_cap_flags2;
break;
default:
return ret;
@@ -584,6 +584,7 @@ static int print_hca_cap(struct ibv_device *ib_dev, uint8_t ib_port)
if (verbose) {
printf("\t\t\tmax_msg_sz:\t\t0x%x\n", port_attr.max_msg_sz);
printf("\t\t\tport_cap_flags:\t\t0x%08x\n", port_attr.port_cap_flags);
+ printf("\t\t\tport_cap_flags2:\t0x%04x\n", port_attr.port_cap_flags2);
printf("\t\t\tmax_vl_num:\t\t%s (%d)\n",
vl_str(port_attr.max_vl_num), port_attr.max_vl_num);
printf("\t\t\tbad_pkey_cntr:\t\t0x%x\n", port_attr.bad_pkey_cntr);
@@ -47,6 +47,7 @@ uint8_t active_speed; /* Currently active link speed */
uint8_t phys_state; /* Physical port state */
uint8_t link_layer; /* link layer protocol of the port */
uint8_t flags; /* Port flags */
+uint16_t port_cap_flags2;/* Port capabilities */
.in -8
};
.sp
@@ -346,6 +346,7 @@ enum ibv_port_cap_flags {
IBV_PORT_SYS_IMAGE_GUID_SUP = 1 << 11,
IBV_PORT_PKEY_SW_EXT_PORT_TRAP_SUP = 1 << 12,
IBV_PORT_EXTENDED_SPEEDS_SUP = 1 << 14,
+ IBV_PORT_CAP_MASK2_SUP = 1 << 15,
IBV_PORT_CM_SUP = 1 << 16,
IBV_PORT_SNMP_TUNNEL_SUP = 1 << 17,
IBV_PORT_REINIT_SUP = 1 << 18,
@@ -359,6 +360,15 @@ enum ibv_port_cap_flags {
IBV_PORT_IP_BASED_GIDS = 1 << 26
};
+enum ibv_port_cap_flags2 {
+ IBV_PORT_SET_NODE_DESC_SUP = 1 << 0,
+ IBV_PORT_INFO_EXT_SUP = 1 << 1,
+ IBV_PORT_VIRT_SUP = 1 << 2,
+ IBV_PORT_SWITCH_PORT_STATE_TABLE_SUP = 1 << 3,
+ IBV_PORT_LINK_WIDTH_2X_SUP = 1 << 4,
+ IBV_PORT_LINK_SPEED_HDR_SUP = 1 << 5,
+};
+
struct ibv_port_attr {
enum ibv_port_state state;
enum ibv_mtu max_mtu;
@@ -381,6 +391,7 @@ struct ibv_port_attr {
uint8_t phys_state;
uint8_t link_layer;
uint8_t flags;
+ uint16_t port_cap_flags2;
};
enum ibv_event_type {