File: umad_set_grh.3

package info (click to toggle)
rdma-core 56.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 17,196 kB
  • sloc: ansic: 171,361; python: 13,724; sh: 2,774; perl: 1,465; makefile: 73
file content (76 lines) | stat: -rw-r--r-- 1,605 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
.\" -*- nroff -*-
.\" Licensed under the OpenIB.org BSD license (FreeBSD Variant) - See COPYING.md
.\"
.TH UMAD_SET_GRH 3  "May 24, 2007" "OpenIB" "OpenIB Programmer's Manual"
.SH "NAME"
umad_set_grh \- set GRH fields within umad buffer using host ordering
.SH "SYNOPSIS"
.nf
.B #include <infiniband/umad.h>
.sp
.BI "int umad_set_grh(void " "*umad" ", void " "*mad_addr");
.fi
.SH "DESCRIPTION"
.B umad_set_grh()
sets the GRH fields (grh_present, gid, hop_limit, traffic_class, flow_label)
within the specified
.I umad\fR
buffer based on the
.I mad_addr\fR
supplied. The provided
.I mad_addr\fR
fields are expected to be in host order.
If the
.I mad_addr\fR
pointer supplied is NULL, no GRH is set.
The argument
.I mad_addr
is a pointer to an
.I ib_mad_addr_t
struct, as specified in
.I <infiniband/umad.h>.
The argument
.I umad
is a pointer to an
.I ib_user_mad_t
struct, as specified in
.I <infiniband/umad.h>.
.PP
.nf
typedef struct ib_mad_addr {
.in +8
uint32_t qpn;
uint32_t qkey;
uint16_t lid;
uint8_t  sl;
uint8_t  path_bits;
uint8_t  grh_present;
uint8_t  gid_index;
uint8_t  hop_limit;
uint8_t  traffic_class;
uint8_t  gid[16];
uint32_t flow_label;
.in -8
} ib_mad_addr_t;
.PP
typedef struct ib_user_mad {
.in +8
uint32_t agent_id;
uint32_t status;
uint32_t timeout_ms;
uint32_t retries;
uint32_t length;
ib_mad_addr_t addr;
uint8_t  data[0];
.in -8
} ib_user_mad_t;
.fi
.SH "RETURN VALUE"
.B umad_set_grh()
returns 0 on success, and a negative value on errors. Currently, there
are no errors indicated.
.SH "SEE ALSO"
.BR umad_set_grh_net (3)
.SH "AUTHOR"
.TP
Hal Rosenstock <halr@voltaire.com>