1IBV_QUERY_PORT(3) Libibverbs Programmer's Manual IBV_QUERY_PORT(3)
2
3
4
6 ibv_query_port - query an RDMA port's attributes
7
9 #include <infiniband/verbs.h>
10
11 int ibv_query_port(struct ibv_context *context, uint8_t port_num,
12 struct ibv_port_attr *port_attr);
13
15 ibv_query_port() returns the attributes of port port_num for device
16 context context through the pointer port_attr. The argument port_attr
17 is an ibv_port_attr struct, as defined in <infiniband/verbs.h>.
18
19 struct ibv_port_attr {
20 enum ibv_port_state state; /* Logical port state */
21 enum ibv_mtu max_mtu; /* Max MTU supported by port */
22 enum ibv_mtu active_mtu; /* Actual MTU */
23 int gid_tbl_len; /* Length of source GID table */
24 uint32_t port_cap_flags; /* Port capabilities */
25 uint32_t max_msg_sz; /* Maximum message size */
26 uint32_t bad_pkey_cntr; /* Bad P_Key counter */
27 uint32_t qkey_viol_cntr; /* Q_Key violation counter */
28 uint16_t pkey_tbl_len; /* Length of partition table */
29 uint16_t lid; /* Base port LID */
30 uint16_t sm_lid; /* SM LID */
31 uint8_t lmc; /* LMC of LID */
32 uint8_t max_vl_num; /* Maximum number of VLs */
33 uint8_t sm_sl; /* SM service level */
34 uint8_t subnet_timeout; /* Subnet propagation delay */
35 uint8_t init_type_reply;/* Type of initialization performed by SM */
36 uint8_t active_width; /* Currently active link width */
37 uint8_t active_speed; /* Currently active link speed */
38 uint8_t phys_state; /* Physical port state */
39 };
40
41
43 ibv_query_port() returns 0 on success, or the value of errno on failure
44 (which indicates the failure reason).
45
47 ibv_create_qp(3), ibv_destroy_qp(3), ibv_query_qp(3), ibv_create_ah(3)
48
50 Dotan Barak <dotanba@gmail.com>
51
52
53
54libibverbs 2006-10-31 IBV_QUERY_PORT(3)