2N/A/*
2N/A * CDDL HEADER START
2N/A *
2N/A * The contents of this file are subject to the terms of the
2N/A * Common Development and Distribution License (the "License").
2N/A * You may not use this file except in compliance with the License.
2N/A *
2N/A * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
2N/A * or http://www.opensolaris.org/os/licensing.
2N/A * See the License for the specific language governing permissions
2N/A * and limitations under the License.
2N/A *
2N/A * When distributing Covered Code, include this CDDL HEADER in each
2N/A * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
2N/A * If applicable, add the following below this CDDL HEADER, with the
2N/A * fields enclosed by brackets "[]" replaced with your own identifying
2N/A * information: Portions Copyright [yyyy] [name of copyright owner]
2N/A *
2N/A * CDDL HEADER END
2N/A */
2N/A
2N/A/*
2N/A * Copyright (c) 2002-2003, Network Appliance, Inc. All rights reserved.
2N/A */
2N/A
2N/A/*
2N/A * Copyright 2003 Sun Microsystems, Inc. All rights reserved.
2N/A * Use is subject to license terms.
2N/A */
2N/A
2N/A/*
2N/A *
2N/A * HEADER: dapl_evd_util.h
2N/A *
2N/A * PURPOSE: Utility defs & routines for the EVD data structure
2N/A *
2N/A * $Id: dapl_evd_util.h,v 1.10 2003/06/13 12:21:09 sjs2 Exp $
2N/A *
2N/A */
2N/A
2N/A#ifndef _DAPL_EVD_UTIL_H_
2N/A#define _DAPL_EVD_UTIL_H_
2N/A
2N/A#ifdef __cplusplus
2N/Aextern "C" {
2N/A#endif
2N/A
2N/A#include "dapl.h"
2N/A
2N/ADAT_RETURN
2N/Adapls_evd_internal_create(
2N/A IN DAPL_IA *ia_ptr,
2N/A IN DAPL_CNO *cno_ptr,
2N/A IN DAT_COUNT min_qlen,
2N/A IN DAT_EVD_FLAGS evd_flags,
2N/A OUT DAPL_EVD **evd_ptr_ptr);
2N/A
2N/ADAPL_EVD *
2N/Adapls_evd_alloc(
2N/A IN DAPL_IA *ia_ptr,
2N/A IN DAPL_CNO *cno_ptr,
2N/A IN DAT_EVD_FLAGS evd_flags,
2N/A IN DAT_COUNT qlen);
2N/A
2N/ADAT_RETURN
2N/Adapls_evd_dealloc(
2N/A IN DAPL_EVD *evd_ptr);
2N/A
2N/A/*
2N/A * Each of these functions will retrieve a free event from
2N/A * the specified EVD, fill in the elements of that event, and
2N/A * post the event back to the EVD. If there is no EVD available,
2N/A * an overflow event will be posted to the async EVD associated
2N/A * with the EVD.
2N/A *
2N/A * DAT_INSUFFICIENT_RESOURCES will be returned on overflow,
2N/A * DAT_SUCCESS otherwise.
2N/A */
2N/A
2N/ADAT_RETURN
2N/Adapls_evd_post_cr_arrival_event(
2N/A IN DAPL_EVD *evd_ptr,
2N/A IN DAT_EVENT_NUMBER event_number,
2N/A IN DAT_SP_HANDLE sp_handle,
2N/A DAT_IA_ADDRESS_PTR ia_address_ptr,
2N/A DAT_CONN_QUAL conn_qual,
2N/A DAT_CR_HANDLE cr_handle);
2N/A
2N/ADAT_RETURN
2N/Adapls_evd_post_connection_event(
2N/A IN DAPL_EVD *evd_ptr,
2N/A IN DAT_EVENT_NUMBER event_number,
2N/A IN DAT_EP_HANDLE ep_handle,
2N/A IN DAT_COUNT private_data_size,
2N/A IN DAT_PVOID private_data);
2N/A
2N/ADAT_RETURN
2N/Adapls_evd_post_async_error_event(
2N/A IN DAPL_EVD *evd_ptr,
2N/A IN DAT_EVENT_NUMBER event_number,
2N/A IN DAT_IA_HANDLE ia_handle);
2N/A
2N/ADAT_RETURN
2N/Adapls_evd_post_software_event(
2N/A IN DAPL_EVD *evd_ptr,
2N/A IN DAT_EVENT_NUMBER event_number,
2N/A IN DAT_PVOID pointer);
2N/A
2N/A/*
2N/A * dapl internal callbacks functions
2N/A */
2N/A
2N/A/* connection verb callback */
2N/Aextern void dapl_evd_connection_callback(
2N/A IN ib_cm_handle_t ib_cm_handle,
2N/A IN const ib_cm_events_t ib_cm_events,
2N/A IN const void *instant_data_p,
2N/A IN const void * context);
2N/A
2N/A/* dto verb callback */
2N/Aextern void dapl_evd_dto_callback(
2N/A IN ib_hca_handle_t ib_hca_handle,
2N/A IN ib_cq_handle_t ib_cq_handle,
2N/A IN void* context);
2N/A
2N/A/* async verb callbacks */
2N/Aextern void dapl_evd_un_async_error_callback(
2N/A IN ib_hca_handle_t ib_hca_handle,
2N/A IN ib_error_record_t *cause_ptr,
2N/A IN void *context);
2N/A
2N/Aextern void dapl_evd_cq_async_error_callback(
2N/A IN ib_hca_handle_t ib_hca_handle,
2N/A IN ib_cq_handle_t ib_cq_handle,
2N/A IN ib_error_record_t *cause_ptr,
2N/A IN void *context);
2N/A
2N/Aextern void dapl_evd_qp_async_error_callback(
2N/A IN ib_hca_handle_t ib_hca_handle,
2N/A IN ib_qp_handle_t ib_qp_handle,
2N/A IN ib_error_record_t *cause_ptr,
2N/A IN void *context);
2N/A
2N/Aextern void dapls_cr_callback(
2N/A ib_cm_handle_t ib_cm_handle,
2N/A IN const ib_cm_events_t ib_cm_event,
2N/A IN const void *instant_data_p,
2N/A IN const void *context);
2N/A
2N/Aextern void dapls_evd_copy_cq(
2N/A IN DAPL_EVD *evd_ptr,
2N/A OUT int *nevents);
2N/A
2N/Aextern DAT_RETURN dapls_evd_copy_events(
2N/A DAPL_EVD *evd_ptr,
2N/A DAT_TIMEOUT timeout);
2N/A
2N/Aextern void dapls_evd_post_premature_events(
2N/A DAPL_EP *ep_ptr);
2N/A
2N/Aextern DAT_RETURN dapls_evd_cq_poll_to_event(
2N/A IN DAPL_EVD *evd_ptr,
2N/A OUT DAT_EVENT *event);
2N/A
2N/A#ifdef __cplusplus
2N/A}
2N/A#endif
2N/A
2N/A#endif /* _DAPL_EVD_UTIL_H_ */