]> CyberLeo.Net >> Repos - FreeBSD/releng/10.0.git/blob - contrib/ofed/libibverbs/man/ibv_query_port.3
- Copy stable/10 (r259064) to releng/10.0 as part of the
[FreeBSD/releng/10.0.git] / contrib / ofed / libibverbs / man / ibv_query_port.3
1 .\" -*- nroff -*-
2 .\"
3 .TH IBV_QUERY_PORT 3 2006-10-31 libibverbs "Libibverbs Programmer's Manual"
4 .SH "NAME"
5 ibv_query_port \- query an RDMA port's attributes
6 .SH "SYNOPSIS"
7 .nf
8 .B #include <infiniband/verbs.h>
9 .sp
10 .BI "int ibv_query_port(struct ibv_context " "*context" ", uint8_t " "port_num" ,
11 .BI "                   struct ibv_port_attr " "*port_attr" ");
12 .fi
13 .SH "DESCRIPTION"
14 .B ibv_query_port()
15 returns the attributes of port
16 .I port_num
17 for device context
18 .I context
19 through the pointer
20 .I port_attr\fR.
21 The argument
22 .I port_attr
23 is an ibv_port_attr struct, as defined in <infiniband/verbs.h>.
24 .PP
25 .nf
26 struct ibv_port_attr {
27 .in +8
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 */
48 .in -8
49 };
50 .sp
51 .fi
52 .SH "RETURN VALUE"
53 .B ibv_query_port()
54 returns 0 on success, or the value of errno on failure (which indicates the failure reason).
55 .SH "SEE ALSO"
56 .BR ibv_create_qp (3),
57 .BR ibv_destroy_qp (3),
58 .BR ibv_query_qp (3),
59 .BR ibv_create_ah (3)
60 .SH "AUTHORS"
61 .TP
62 Dotan Barak <dotanb@mellanox.co.il>