1 [PATCHv7 2/4] libibverbs: change kernel API to accept link layer
3 Modify the code to allow passing the link layer of a port from kernel to user.
4 Update ibv_query_port.3 man page with the change.
6 Signed-off-by: Eli Cohen <eli@mellanox.co.il>
8 include/infiniband/kern-abi.h | 3 ++-
9 man/ibv_query_port.3 | 1 +
11 3 files changed, 4 insertions(+), 1 deletions(-)
13 Index: libibverbs/include/infiniband/kern-abi.h
14 ===================================================================
15 --- libibverbs.orig/include/infiniband/kern-abi.h 2010-06-08 11:08:57.895171000 +0300
16 +++ libibverbs/include/infiniband/kern-abi.h 2010-06-08 11:09:10.172540000 +0300
17 @@ -231,7 +231,8 @@ struct ibv_query_port_resp {
27 Index: libibverbs/man/ibv_query_port.3
28 ===================================================================
29 --- libibverbs.orig/man/ibv_query_port.3 2010-06-08 11:08:57.951172000 +0300
30 +++ libibverbs/man/ibv_query_port.3 2010-06-08 11:09:10.177543000 +0300
31 @@ -44,6 +44,7 @@ uint8_t init_type_reply;
32 uint8_t active_width; /* Currently active link width */
33 uint8_t active_speed; /* Currently active link speed */
34 uint8_t phys_state; /* Physical port state */
35 +uint8_t link_layer; /* link layer protocol of the port */
39 Index: libibverbs/src/cmd.c
40 ===================================================================
41 --- libibverbs.orig/src/cmd.c 2010-06-08 11:08:57.999167000 +0300
42 +++ libibverbs/src/cmd.c 2010-06-08 11:09:10.186539000 +0300
43 @@ -196,6 +196,7 @@ int ibv_cmd_query_port(struct ibv_contex
44 port_attr->active_width = resp.active_width;
45 port_attr->active_speed = resp.active_speed;
46 port_attr->phys_state = resp.phys_state;
47 + port_attr->link_layer = resp.link_layer;