|
1 '\" te |
|
2 .\" CDDL HEADER START |
|
3 .\" |
|
4 .\" The contents of this file are subject to the terms of the |
|
5 .\" Common Development and Distribution License (the "License"). |
|
6 .\" You may not use this file except in compliance with the License. |
|
7 .\" |
|
8 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE |
|
9 .\" or http://www.opensolaris.org/os/licensing. |
|
10 .\" See the License for the specific language governing permissions |
|
11 .\" and limitations under the License. |
|
12 .\" |
|
13 .\" When distributing Covered Code, include this CDDL HEADER in each |
|
14 .\" file and include the License file at usr/src/OPENSOLARIS.LICENSE. |
|
15 .\" If applicable, add the following below this CDDL HEADER, with the |
|
16 .\" fields enclosed by brackets "[]" replaced with your own identifying |
|
17 .\" information: Portions Copyright [yyyy] [name of copyright owner] |
|
18 .\" |
|
19 .\" CDDL HEADER END |
|
20 .\" |
|
21 .\" Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. |
|
22 .\" |
|
23 .\" -*- nroff -*- |
|
24 .\" |
|
25 .TH IBV_REGISTER_SM_EVENTS 3 2012-08-08 libibverbs "Libibverbs Programmer's Manual" |
|
26 .SH "NAME" |
|
27 ibv_register_sm_events, ibv_unregister_sm_events \- registers or unregisters |
|
28 the specified subnet events for the specified GID(s). |
|
29 .sp |
|
30 .SH "SYNOPSIS" |
|
31 .nf |
|
32 .B #include <infiniband/verbs.h> |
|
33 .sp |
|
34 .BI "int ibv_register_sm_events(struct ibv_context *context, |
|
35 .BI "ibv_sm_event_type_t event, int gid_num, union ibv_gid *gids) |
|
36 .sp |
|
37 .BI "int ibv_unregister_sm_events(struct ibv_context *context, |
|
38 .BI "ibv_sm_event_type_t event, int gid_num, union ibv_gid *gids) |
|
39 .if |
|
40 .TP |
|
41 .B context:\fR Device context |
|
42 .TP |
|
43 .B event:\fR |
|
44 Logical OR of events to register for, valid values are: |
|
45 .TP |
|
46 .in +5 |
|
47 .B IBV_SM_EVENT_MGID |
|
48 .in -5 |
|
49 .in +15 |
|
50 .B Request notification of Multicast GID events |
|
51 .in -15 |
|
52 .TP |
|
53 .in +5 |
|
54 .B IBV_SM_EVENT_UGID |
|
55 .in -5 |
|
56 .in +15 |
|
57 .B Request notification of Unicast GID events |
|
58 .in -15 |
|
59 .TP |
|
60 .in +5 |
|
61 .B IBV_SM_EVENT_UGID_ALL |
|
62 .in -5 |
|
63 .in +15 |
|
64 .B Request notification of ALL Unicast GID events |
|
65 .in -15 |
|
66 .TP |
|
67 .in +5 |
|
68 .B IBV_SM_EVENT_MGID_ALL |
|
69 .in -5 |
|
70 .in +15 |
|
71 .B Request notification of ALL Multicast GID events |
|
72 .in -15 |
|
73 .TP |
|
74 .in +5 |
|
75 .B IBV_SM_EVENT_ALL |
|
76 .in -5 |
|
77 .in +15 |
|
78 .B Request notification of ALL Multicast and Unicast GID events |
|
79 .in -15 |
|
80 .TP |
|
81 .B gid_num: |
|
82 0 or the number of gids in the array of gids pointed to by gids. |
|
83 .TP |
|
84 .B gids: |
|
85 NULL, or an array of GIDS. |
|
86 .sp |
|
87 .SH "DESCRIPTION" |
|
88 .B ibv_register_sm_events() |
|
89 registers for the specified subnet events for the specified GID(s). |
|
90 ibv_unregister_sm_events() unregisters for the specified subnet events |
|
91 for the specified GID(s). These events are delivered on the async fd |
|
92 (see ibv_get_async_event(3)), from a previously opened device (see |
|
93 ibv_open_device()). It is only necessary to call ibv_register_sm_events() |
|
94 on a single device connected to each unique fabric, partition. For |
|
95 example, if a node has 4 HCAs attached to the same fabric, with all |
|
96 ports in the same partition, then it is only necessary to call |
|
97 ibv_register_sm_events() on one of them. |
|
98 .sp |
|
99 .TP |
|
100 .B The following ibv_event_type events can be passed to |
|
101 ibv_register_sm_events(): |
|
102 .TP |
|
103 .in +5 |
|
104 .B IBV_EVENT_MCG_CREATED |
|
105 .in -5 |
|
106 .in +12 |
|
107 An MCG specified by the new "gid" member of the ibv_async_event |
|
108 struct has been created. |
|
109 .in -12 |
|
110 .TP |
|
111 .in +5 |
|
112 .B IBV_EVENT_MCG_DELETED |
|
113 .in -5 |
|
114 .in +12 |
|
115 The MCG specified by the "gid" member of the ibv_async_event struct |
|
116 has been deleted. |
|
117 .in -12 |
|
118 .TP |
|
119 .in +5 |
|
120 .B IBV_EVENT_GID_AVAIL |
|
121 .in -5 |
|
122 .in +12 |
|
123 The GID specified by the "gid" member of the ibv_async_event struct |
|
124 is available on this subnet. |
|
125 .in -12 |
|
126 .TP |
|
127 .in +5 |
|
128 .B IBV_EVENT_GID_UNAVAIL |
|
129 .in -5 |
|
130 .in +12 |
|
131 The GID specified by the "gid" member of the ibv_async_event struct |
|
132 is no longer available on this subnet. |
|
133 .in -12 |
|
134 .sp |
|
135 .SH "RETURN VALUE" |
|
136 .B ibv_register_sm_events(), ibv_unregister_sm_events() |
|
137 returns 0 on success, and \-1 on error. |
|
138 .SH "NOTES" |
|
139 .TP |