1UMAD_SET_GRH(3)           OpenIB Programmer's Manual           UMAD_SET_GRH(3)
2
3
4

NAME

6       umad_set_grh - set GRH fields within umad buffer using host ordering
7

SYNOPSIS

9       #include <infiniband/umad.h>
10
11       int umad_set_grh(void *umad, void *mad_addr);
12

DESCRIPTION

14       umad_set_grh()  sets the GRH fields (grh_present, gid, hop_limit, traf‐
15       fic_class, flow_label) within the specified umad buffer  based  on  the
16       mad_addr  supplied.  The provided mad_addr fields are expected to be in
17       host order.  If the mad_addr pointer supplied is NULL, no GRH  is  set.
18       The argument mad_addr is a pointer to an ib_mad_addr_t struct, as spec‐
19       ified in <infiniband/umad.h>.  The argument umad is  a  pointer  to  an
20       ib_user_mad_t struct, as specified in <infiniband/umad.h>.
21
22       typedef struct ib_mad_addr {
23               uint32_t qpn;
24               uint32_t qkey;
25               uint16_t lid;
26               uint8_t  sl;
27               uint8_t  path_bits;
28               uint8_t  grh_present;
29               uint8_t  gid_index;
30               uint8_t  hop_limit;
31               uint8_t  traffic_class;
32               uint8_t  gid[16];
33               uint32_t flow_label;
34       } ib_mad_addr_t;
35
36       typedef struct ib_user_mad {
37               uint32_t agent_id;
38               uint32_t status;
39               uint32_t timeout_ms;
40               uint32_t retries;
41               uint32_t length;
42               ib_mad_addr_t addr;
43               uint8_t  data[0];
44       } ib_user_mad_t;
45

RETURN VALUE

47       umad_set_grh()  returns  0  on success, and a negative value on errors.
48       Currently, there are no errors indicated.
49

SEE ALSO

51       umad_set_grh_net(3)
52

AUTHOR

54       Hal Rosenstock <halr@voltaire.com>
55
56
57
58OpenIB                           May 24, 2007                  UMAD_SET_GRH(3)
Impressum