3 .TH IBV_QUERY_PORT 3 2006-10-31 libibverbs "Libibverbs Programmer's Manual"
5 ibv_query_port \- query an RDMA port's attributes
8 .B #include <infiniband/verbs.h>
10 .BI "int ibv_query_port(struct ibv_context " "*context" ", uint8_t " "port_num" ,
11 .BI " struct ibv_port_attr " "*port_attr" ");
15 returns the attributes of port
23 is an ibv_port_attr struct, as defined in <infiniband/verbs.h>.
26 struct ibv_port_attr {
28 enum ibv_port_state state; /* Logical port state */
29 enum ibv_mtu max_mtu; /* Max MTU supported by port */
30 enum ibv_mtu active_mtu; /* Actual MTU */
31 int gid_tbl_len; /* Length of source GID table */
32 uint32_t port_cap_flags; /* Port capabilities */
33 uint32_t max_msg_sz; /* Maximum message size */
34 uint32_t bad_pkey_cntr; /* Bad P_Key counter */
35 uint32_t qkey_viol_cntr; /* Q_Key violation counter */
36 uint16_t pkey_tbl_len; /* Length of partition table */
37 uint16_t lid; /* Base port LID */
38 uint16_t sm_lid; /* SM LID */
39 uint8_t lmc; /* LMC of LID */
40 uint8_t max_vl_num; /* Maximum number of VLs */
41 uint8_t sm_sl; /* SM service level */
42 uint8_t subnet_timeout; /* Subnet propagation delay */
43 uint8_t init_type_reply;/* Type of initialization performed by SM */
44 uint8_t active_width; /* Currently active link width */
45 uint8_t active_speed; /* Currently active link speed */
46 uint8_t phys_state; /* Physical port state */
47 uint8_t link_layer; /* link layer protocol of the port */
54 returns 0 on success, or the value of errno on failure (which indicates the failure reason).
56 .BR ibv_create_qp (3),
57 .BR ibv_destroy_qp (3),
62 Dotan Barak <dotanb@mellanox.co.il>