1IBV_CREATE_AH(3)        Libibverbs Programmer's Manual        IBV_CREATE_AH(3)
2
3
4

NAME

6       ibv_create_ah,  ibv_destroy_ah  -  create  or destroy an address handle
7       (AH)
8

SYNOPSIS

10       #include <infiniband/verbs.h>
11
12       struct ibv_ah *ibv_create_ah(struct ibv_pd *pd,
13                                    struct ibv_ah_attr *attr);
14
15       int ibv_destroy_ah(struct ibv_ah *ah);
16

DESCRIPTION

18       ibv_create_ah() creates an address handle (AH) associated with the pro‐
19       tection  domain  pd.   The  argument  attr is an ibv_ah_attr struct, as
20       defined in <infiniband/verbs.h>.
21
22       struct ibv_ah_attr {
23               struct ibv_global_route grh;            /* Global Routing Header (GRH) attributes */
24               uint16_t                dlid;           /* Destination LID */
25               uint8_t                 sl;             /* Service Level */
26               uint8_t                 src_path_bits;  /* Source path bits */
27               uint8_t                 static_rate;    /* Maximum static rate */
28               uint8_t                 is_global;      /* GRH attributes are valid */
29               uint8_t                 port_num;       /* Physical port number */
30       };
31
32       struct ibv_global_route {
33               union ibv_gid           dgid;           /* Destination GID or MGID */
34               uint32_t                flow_label;     /* Flow label */
35               uint8_t                 sgid_index;     /* Source GID index */
36               uint8_t                 hop_limit;      /* Hop limit */
37               uint8_t                 traffic_class;  /* Traffic class */
38       };
39
40
41       ibv_destroy_ah() destroys the AH ah.
42

RETURN VALUE

44       ibv_create_ah() returns a pointer to the created AH,  or  NULL  if  the
45       request fails.
46

NOTES

48       If  port  flag IBV_QPF_GRH_REQUIRED is set then ibv_create_ah() must be
49       created with definition of 'struct ibv_ah_attr { .is_global = 1; .grh =
50       {...}; }'.
51
52       ibv_destroy_ah() returns 0 on success, or the value of errno on failure
53       (which indicates the failure reason).
54

SEE ALSO

56       ibv_alloc_pd(3), ibv_init_ah_from_wc(3), ibv_create_ah_from_wc(3)
57

AUTHORS

59       Dotan Barak <dotanba@gmail.com>
60
61
62
63libibverbs                        2006-10-31                  IBV_CREATE_AH(3)
Impressum