Skip to contentSkip to conversation

libibverbs: change kernel API to accept link layer

PATCH Superseded Eli Cohen 1 participant 1 message Jan 5, 2010 InfiniBand

v7 of 8 Superseded Latest is v8 →

lore
Share & tools
lore

Eli Cohen

author
#0 lore raw

PATCH v7 2/4 libibverbs: change kernel API to accept link layer

Modify the code to allow passing the link layer of a port from kernel to user. Update ibv_query_port.3 man page with the change.

---
 include/infiniband/kern-abi.h |    3 ++-
 man/ibv_query_port.3          |    1 +
 src/cmd.c                     |    1 +
 3 files changed, 4 insertions(+), 1 deletions(-)
include/infiniband/kern-abi.h +2 -1
index 0db083a..619ea7e 100644
@@ -223,7 +223,8 @@ struct ibv_query_port_resp {
 	__u8  active_width;
 	__u8  active_speed;
 	__u8  phys_state;
-	__u8  reserved[3];
+	__u8  link_layer;
+	__u8  reserved[2];
 };
 
 struct ibv_alloc_pd {
man/ibv_query_port.3 +1 -0
index 882470d..6d8b873 100644
@@ -44,6 +44,7 @@ uint8_t                 init_type_reply;/* Type of initialization performed by S
 uint8_t                 active_width;   /* Currently active link width */
 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 */		 
 .in -8
 };
 .sp
src/cmd.c +1 -0
index cbd5288..39af833 100644
@@ -196,6 +196,7 @@ int ibv_cmd_query_port(struct ibv_context *context, uint8_t port_num,
 	port_attr->active_width    = resp.active_width;
 	port_attr->active_speed    = resp.active_speed;
 	port_attr->phys_state      = resp.phys_state;
+	port_attr->link_layer      = resp.link_layer;
 
 	return 0;
 }
Signature · 6 lines
1.6.6

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html