freebsd-nq/contrib/ofed/libibverbs/fixes/rocee_kernel_accept_link_layer.patch
2011-03-21 09:58:24 +00:00

51 lines
2.0 KiB
Diff

[PATCHv7 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.
Signed-off-by: Eli Cohen <eli@mellanox.co.il>
---
include/infiniband/kern-abi.h | 3 ++-
man/ibv_query_port.3 | 1 +
src/cmd.c | 1 +
3 files changed, 4 insertions(+), 1 deletions(-)
Index: libibverbs/include/infiniband/kern-abi.h
===================================================================
--- libibverbs.orig/include/infiniband/kern-abi.h 2010-06-08 11:08:57.895171000 +0300
+++ libibverbs/include/infiniband/kern-abi.h 2010-06-08 11:09:10.172540000 +0300
@@ -231,7 +231,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 {
Index: libibverbs/man/ibv_query_port.3
===================================================================
--- libibverbs.orig/man/ibv_query_port.3 2010-06-08 11:08:57.951172000 +0300
+++ libibverbs/man/ibv_query_port.3 2010-06-08 11:09:10.177543000 +0300
@@ -44,6 +44,7 @@ uint8_t init_type_reply;
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
Index: libibverbs/src/cmd.c
===================================================================
--- libibverbs.orig/src/cmd.c 2010-06-08 11:08:57.999167000 +0300
+++ libibverbs/src/cmd.c 2010-06-08 11:09:10.186539000 +0300
@@ -196,6 +196,7 @@ int ibv_cmd_query_port(struct ibv_contex
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;
}