CDDL HEADER START
The contents of this file are subject to the terms of the
Common Development and Distribution License (the "License").
You may not use this file except in compliance with the License.
You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
or http://www.opensolaris.org/os/licensing.
See the License for the specific language governing permissions
and limitations under the License.
When distributing Covered Code, include this CDDL HEADER in each
file and include the License file at usr/src/OPENSOLARIS.LICENSE.
If applicable, add the following below this CDDL HEADER, with the
fields enclosed by brackets "[]" replaced with your own identifying
information: Portions Copyright [yyyy] [name of copyright owner]
CDDL HEADER END
Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
-*- nroff -*-
#include <infiniband/verbs.h> "int ibv_register_sm_events(struct ibv_context *context, "ibv_sm_event_type_t event, int gid_num, union ibv_gid *gids) "int ibv_unregister_sm_events(struct ibv_context *context, "ibv_sm_event_type_t event, int gid_num, union ibv_gid *gids)context: Device context
event: Logical OR of events to register for, valid values are:
IBV_SM_EVENT_MGID Request notification of Multicast GID events
IBV_SM_EVENT_UGID Request notification of Unicast GID events
IBV_SM_EVENT_UGID_ALL Request notification of ALL Unicast GID events
IBV_SM_EVENT_MGID_ALL Request notification of ALL Multicast GID events
IBV_SM_EVENT_ALL Request notification of ALL Multicast and Unicast GID events
gid_num: 0 or the number of gids in the array of gids pointed to by gids.
gids: NULL, or an array of GIDS.
"DESCRIPTION"ibv_register_sm_events() registers for the specified subnet events for the specified GID(s). ibv_unregister_sm_events() unregisters for the specified subnet events for the specified GID(s). These events are delivered on the async fd (see ibv_get_async_event(3)), from a previously opened device (see ibv_open_device()). It is only necessary to call ibv_register_sm_events() on a single device connected to each unique fabric, partition. For example, if a node has 4 HCAs attached to the same fabric, with all ports in the same partition, then it is only necessary to call ibv_register_sm_events() on one of them.The following ibv_event_type events can be passed to ibv_register_sm_events():
IBV_EVENT_MCG_CREATED An MCG specified by the new "gid" member of the ibv_async_event struct has been created.
IBV_EVENT_MCG_DELETED The MCG specified by the "gid" member of the ibv_async_event struct has been deleted.
IBV_EVENT_GID_AVAIL The GID specified by the "gid" member of the ibv_async_event struct is available on this subnet.
IBV_EVENT_GID_UNAVAIL The GID specified by the "gid" member of the ibv_async_event struct is no longer available on this subnet.
"RETURN VALUE"ibv_register_sm_events(), ibv_unregister_sm_events() returns 0 on success, and -1 on error."NOTES"