Debian Codegraph @

libibverbs/man/ibv_create_ah.3

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