Skip to contentSkip to conversation

ib_core: return link layer type of the port

PATCH Superseded Eli Cohen 1 participant 1 message Aug 6, 2010 InfiniBand

v9 of 10 Superseded Latest is v10 →

lore
Share & tools
lore

Eli Cohen

author
#0 lore raw

PATCH v9 6/12 ib_core: return link layer type of the port

Kernel changes to return the port's link layer to userspace through the query port verb.

---
 drivers/infiniband/core/uverbs_cmd.c |    1 +
 include/rdma/ib_user_verbs.h         |    3 ++-
 2 files changed, 3 insertions(+), 1 deletions(-)
drivers/infiniband/core/uverbs_cmd.c +1 -0
index 6fcfbeb..41fe487 100644
@@ -460,6 +460,7 @@ ssize_t ib_uverbs_query_port(struct ib_uverbs_file *file,
 	resp.active_width    = attr.active_width;
 	resp.active_speed    = attr.active_speed;
 	resp.phys_state      = attr.phys_state;
+	resp.link_layer	     = attr.link_layer;
 
 	if (copy_to_user((void __user *) (unsigned long) cmd.response,
 			 &resp, sizeof resp))
include/rdma/ib_user_verbs.h +2 -1
index a17f771..fe5b051 100644
@@ -205,7 +205,8 @@ struct ib_uverbs_query_port_resp {
 	__u8  active_width;
 	__u8  active_speed;
 	__u8  phys_state;
-	__u8  reserved[3];
+	__u8  link_layer;
+	__u8  reserved[2];
 };
 
 struct ib_uverbs_alloc_pd {
Signature · 6 lines
1.7.2

--
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