@@ -72,6 +72,7 @@ static const char *transport_str(enum ibv_transport_type transport)
switch (transport) {
case IBV_TRANSPORT_IB: return "InfiniBand";
case IBV_TRANSPORT_IWARP: return "iWARP";
+ case IBV_TRANSPORT_USNIC: return "usNIC";
default: return "invalid transport";
}
}
@@ -68,13 +68,15 @@ enum ibv_node_type {
IBV_NODE_CA = 1,
IBV_NODE_SWITCH,
IBV_NODE_ROUTER,
- IBV_NODE_RNIC
+ IBV_NODE_RNIC,
+ IBV_NODE_USNIC,
};
enum ibv_transport_type {
IBV_TRANSPORT_UNKNOWN = -1,
IBV_TRANSPORT_IB = 0,
- IBV_TRANSPORT_IWARP
+ IBV_TRANSPORT_IWARP,
+ IBV_TRANSPORT_USNIC,
};
enum ibv_device_cap_flags {
@@ -38,10 +38,11 @@ const char *ibv_node_type_str(enum ibv_node_type node_type)
[IBV_NODE_CA] = "InfiniBand channel adapter",
[IBV_NODE_SWITCH] = "InfiniBand switch",
[IBV_NODE_ROUTER] = "InfiniBand router",
- [IBV_NODE_RNIC] = "iWARP NIC"
+ [IBV_NODE_RNIC] = "iWARP NIC",
+ [IBV_NODE_USNIC] = "usNIC",
};
- if (node_type < IBV_NODE_CA || node_type > IBV_NODE_RNIC)
+ if (node_type < IBV_NODE_CA || node_type > IBV_NODE_USNIC)
return "unknown";
return node_type_str[node_type];
@@ -346,7 +346,7 @@ static struct ibv_device *try_driver(struct ibv_driver *driver,
dev->node_type = IBV_NODE_UNKNOWN;
} else {
dev->node_type = strtol(value, NULL, 10);
- if (dev->node_type < IBV_NODE_CA || dev->node_type > IBV_NODE_RNIC)
+ if (dev->node_type < IBV_NODE_CA || dev->node_type > IBV_NODE_USNIC)
dev->node_type = IBV_NODE_UNKNOWN;
}
@@ -359,6 +359,9 @@ static struct ibv_device *try_driver(struct ibv_driver *driver,
case IBV_NODE_RNIC:
dev->transport_type = IBV_TRANSPORT_IWARP;
break;
+ case IBV_NODE_USNIC:
+ dev->transport_type = IBV_TRANSPORT_USNIC;
+ break;
default:
dev->transport_type = IBV_TRANSPORT_UNKNOWN;
break;
180771a3707a4c0577cbf4f830c754dbabfdfccb adds core support for usNIC node and transport in the kernel. This patch adds the corresponding support to libibverbs. Signed-off-by: Upinder Malhi <umalhi@cisco.com> --- examples/devinfo.c | 1 + include/infiniband/verbs.h | 6 ++++-- src/enum_strs.c | 5 +++-- src/init.c | 5 ++++- 4 files changed, 12 insertions(+), 5 deletions(-)