1219820Sjeff[PATCHv7 2/4] libibverbs: change kernel API to accept link layer
2219820Sjeff
3219820SjeffModify the code to allow passing the link layer of a port from kernel to user.
4219820SjeffUpdate ibv_query_port.3 man page with the change.
5219820Sjeff
6219820SjeffSigned-off-by: Eli Cohen <eli@mellanox.co.il>
7219820Sjeff---
8219820Sjeff include/infiniband/kern-abi.h |    3 ++-
9219820Sjeff man/ibv_query_port.3          |    1 +
10219820Sjeff src/cmd.c                     |    1 +
11219820Sjeff 3 files changed, 4 insertions(+), 1 deletions(-)
12219820Sjeff
13219820SjeffIndex: libibverbs/include/infiniband/kern-abi.h
14219820Sjeff===================================================================
15219820Sjeff--- libibverbs.orig/include/infiniband/kern-abi.h	2010-06-08 11:08:57.895171000 +0300
16219820Sjeff+++ libibverbs/include/infiniband/kern-abi.h	2010-06-08 11:09:10.172540000 +0300
17219820Sjeff@@ -231,7 +231,8 @@ struct ibv_query_port_resp {
18219820Sjeff 	__u8  active_width;
19219820Sjeff 	__u8  active_speed;
20219820Sjeff 	__u8  phys_state;
21219820Sjeff-	__u8  reserved[3];
22219820Sjeff+	__u8  link_layer;
23219820Sjeff+	__u8  reserved[2];
24219820Sjeff };
25219820Sjeff 
26219820Sjeff struct ibv_alloc_pd {
27219820SjeffIndex: libibverbs/man/ibv_query_port.3
28219820Sjeff===================================================================
29219820Sjeff--- libibverbs.orig/man/ibv_query_port.3	2010-06-08 11:08:57.951172000 +0300
30219820Sjeff+++ libibverbs/man/ibv_query_port.3	2010-06-08 11:09:10.177543000 +0300
31219820Sjeff@@ -44,6 +44,7 @@ uint8_t                 init_type_reply;
32219820Sjeff uint8_t                 active_width;   /* Currently active link width */
33219820Sjeff uint8_t                 active_speed;   /* Currently active link speed */
34219820Sjeff uint8_t                 phys_state;     /* Physical port state */
35219820Sjeff+uint8_t                 link_layer;     /* link layer protocol of the port */
36219820Sjeff .in -8
37219820Sjeff };
38219820Sjeff .sp
39219820SjeffIndex: libibverbs/src/cmd.c
40219820Sjeff===================================================================
41219820Sjeff--- libibverbs.orig/src/cmd.c	2010-06-08 11:08:57.999167000 +0300
42219820Sjeff+++ libibverbs/src/cmd.c	2010-06-08 11:09:10.186539000 +0300
43219820Sjeff@@ -196,6 +196,7 @@ int ibv_cmd_query_port(struct ibv_contex
44219820Sjeff 	port_attr->active_width    = resp.active_width;
45219820Sjeff 	port_attr->active_speed    = resp.active_speed;
46219820Sjeff 	port_attr->phys_state      = resp.phys_state;
47219820Sjeff+	port_attr->link_layer      = resp.link_layer;
48219820Sjeff 
49219820Sjeff 	return 0;
50219820Sjeff }
51