]> CyberLeo.Net >> Repos - FreeBSD/releng/10.0.git/blob - contrib/ofed/libibverbs/man/ibv_create_ah.3
- Copy stable/10 (r259064) to releng/10.0 as part of the
[FreeBSD/releng/10.0.git] / contrib / ofed / libibverbs / man / ibv_create_ah.3
1 .\" -*- nroff -*-
2 .\"
3 .TH IBV_CREATE_AH 3 2006-10-31 libibverbs "Libibverbs Programmer's Manual"
4 .SH "NAME"
5 ibv_create_ah, ibv_destroy_ah \- create or destroy an address handle (AH)
6 .SH "SYNOPSIS"
7 .nf
8 .B #include <infiniband/verbs.h>
9 .sp
10 .BI "struct ibv_ah *ibv_create_ah(struct ibv_pd " "*pd" ",
11 .BI "                             struct ibv_ah_attr " "*attr" ");
12 .sp
13 .BI "int ibv_destroy_ah(struct ibv_ah " "*ah" ");
14 .fi
15 .SH "DESCRIPTION"
16 .B ibv_create_ah()
17 creates an address handle (AH) associated with the protection domain
18 .I pd\fR.
19 The argument
20 .I attr
21 is an ibv_ah_attr struct, as defined in <infiniband/verbs.h>.
22 .PP
23 .nf
24 struct ibv_ah_attr {
25 .in +8
26 struct ibv_global_route grh;            /* Global Routing Header (GRH) attributes */
27 uint16_t                dlid;           /* Destination LID */
28 uint8_t                 sl;             /* Service Level */
29 uint8_t                 src_path_bits;  /* Source path bits */
30 uint8_t                 static_rate;    /* Maximum static rate */
31 uint8_t                 is_global;      /* GRH attributes are valid */
32 uint8_t                 port_num;       /* Physical port number */
33 .in -8
34 };
35 .sp
36 .nf
37 struct ibv_global_route {
38 .in +8
39 union ibv_gid           dgid;           /* Destination GID or MGID */
40 uint32_t                flow_label;     /* Flow label */
41 uint8_t                 sgid_index;     /* Source GID index */
42 uint8_t                 hop_limit;      /* Hop limit */
43 uint8_t                 traffic_class;  /* Traffic class */
44 .in -8
45 };
46 .fi
47 .sp
48 .PP
49 .B ibv_destroy_ah()
50 destroys the AH
51 .I ah\fR.
52 .SH "RETURN VALUE"
53 .B ibv_create_ah()
54 returns a pointer to the created AH, or NULL if the request fails.
55 .PP
56 .B ibv_destroy_ah()
57 returns 0 on success, or the value of errno on failure (which indicates the failure reason).
58 .SH "SEE ALSO"
59 .BR ibv_alloc_pd (3),
60 .BR ibv_init_ah_from_wc (3),
61 .BR ibv_create_ah_from_wc (3)
62 .SH "AUTHORS"
63 .TP
64 Dotan Barak <dotanb@mellanox.co.il>