xref: /titanic_51/usr/src/lib/udapl/libdat/include/dat/udat.h (revision 03494a9880d80f834bec10a1e8f0a2f8f7c97bf4)
17c478bd9Sstevel@tonic-gate /*
27c478bd9Sstevel@tonic-gate  * CDDL HEADER START
37c478bd9Sstevel@tonic-gate  *
47c478bd9Sstevel@tonic-gate  * The contents of this file are subject to the terms of the
5*03494a98SBill Taylor  * Common Development and Distribution License (the "License").
6*03494a98SBill Taylor  * You may not use this file except in compliance with the License.
77c478bd9Sstevel@tonic-gate  *
87c478bd9Sstevel@tonic-gate  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
97c478bd9Sstevel@tonic-gate  * or http://www.opensolaris.org/os/licensing.
107c478bd9Sstevel@tonic-gate  * See the License for the specific language governing permissions
117c478bd9Sstevel@tonic-gate  * and limitations under the License.
127c478bd9Sstevel@tonic-gate  *
137c478bd9Sstevel@tonic-gate  * When distributing Covered Code, include this CDDL HEADER in each
147c478bd9Sstevel@tonic-gate  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
157c478bd9Sstevel@tonic-gate  * If applicable, add the following below this CDDL HEADER, with the
167c478bd9Sstevel@tonic-gate  * fields enclosed by brackets "[]" replaced with your own identifying
177c478bd9Sstevel@tonic-gate  * information: Portions Copyright [yyyy] [name of copyright owner]
187c478bd9Sstevel@tonic-gate  *
197c478bd9Sstevel@tonic-gate  * CDDL HEADER END
207c478bd9Sstevel@tonic-gate  */
217c478bd9Sstevel@tonic-gate /*
227c478bd9Sstevel@tonic-gate  * Copyright (c) 2002-2004, Network Appliance, Inc. All rights reserved.
237c478bd9Sstevel@tonic-gate  */
247c478bd9Sstevel@tonic-gate 
257c478bd9Sstevel@tonic-gate /*
26*03494a98SBill Taylor  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
277c478bd9Sstevel@tonic-gate  * Use is subject to license terms.
287c478bd9Sstevel@tonic-gate  */
297c478bd9Sstevel@tonic-gate 
307c478bd9Sstevel@tonic-gate 
317c478bd9Sstevel@tonic-gate #ifndef _UDAT_H_
327c478bd9Sstevel@tonic-gate #define	_UDAT_H_
337c478bd9Sstevel@tonic-gate 
347c478bd9Sstevel@tonic-gate /*
357c478bd9Sstevel@tonic-gate  *
367c478bd9Sstevel@tonic-gate  * HEADER: udat.h
377c478bd9Sstevel@tonic-gate  *
387c478bd9Sstevel@tonic-gate  * PURPOSE: defines the user DAT API
397c478bd9Sstevel@tonic-gate  *
407c478bd9Sstevel@tonic-gate  * Description: Header file for "uDAPL: User Direct Access Programming
417c478bd9Sstevel@tonic-gate  *              Library, Version: 1.2"
427c478bd9Sstevel@tonic-gate  *
437c478bd9Sstevel@tonic-gate  * Mapping rules:
447c478bd9Sstevel@tonic-gate  *      All global symbols are prepended with "DAT_" or "dat_"
457c478bd9Sstevel@tonic-gate  *      All DAT objects have an 'api' tag which, such as 'ep' or 'lmr'
467c478bd9Sstevel@tonic-gate  *      The method table is in the provider definition structure.
477c478bd9Sstevel@tonic-gate  *
487c478bd9Sstevel@tonic-gate  *
497c478bd9Sstevel@tonic-gate  */
507c478bd9Sstevel@tonic-gate 
517c478bd9Sstevel@tonic-gate #ifdef __cplusplus
527c478bd9Sstevel@tonic-gate extern "C" {
537c478bd9Sstevel@tonic-gate #endif
547c478bd9Sstevel@tonic-gate 
557c478bd9Sstevel@tonic-gate #include <dat/udat_config.h>
567c478bd9Sstevel@tonic-gate 
577c478bd9Sstevel@tonic-gate #include <dat/dat_platform_specific.h>
587c478bd9Sstevel@tonic-gate 
597c478bd9Sstevel@tonic-gate typedef enum dat_mem_type
607c478bd9Sstevel@tonic-gate {
617c478bd9Sstevel@tonic-gate 	/* Shared between udat and kdat */
627c478bd9Sstevel@tonic-gate 	DAT_MEM_TYPE_VIRTUAL		= 0x00,
637c478bd9Sstevel@tonic-gate 	DAT_MEM_TYPE_LMR		= 0x01,
647c478bd9Sstevel@tonic-gate 	/* udat specific */
65*03494a98SBill Taylor 	DAT_MEM_TYPE_SHARED_VIRTUAL	= 0x02,
66*03494a98SBill Taylor 	DAT_MEM_TYPE_SO_VIRTUAL		= 0x03
677c478bd9Sstevel@tonic-gate } DAT_MEM_TYPE;
687c478bd9Sstevel@tonic-gate 
697c478bd9Sstevel@tonic-gate /* dat handle types */
707c478bd9Sstevel@tonic-gate typedef enum dat_handle_type
717c478bd9Sstevel@tonic-gate {
727c478bd9Sstevel@tonic-gate 	DAT_HANDLE_TYPE_CR,
737c478bd9Sstevel@tonic-gate 	DAT_HANDLE_TYPE_EP,
747c478bd9Sstevel@tonic-gate 	DAT_HANDLE_TYPE_EVD,
757c478bd9Sstevel@tonic-gate 	DAT_HANDLE_TYPE_IA,
767c478bd9Sstevel@tonic-gate 	DAT_HANDLE_TYPE_LMR,
777c478bd9Sstevel@tonic-gate 	DAT_HANDLE_TYPE_PSP,
787c478bd9Sstevel@tonic-gate 	DAT_HANDLE_TYPE_PZ,
797c478bd9Sstevel@tonic-gate 	DAT_HANDLE_TYPE_RMR,
807c478bd9Sstevel@tonic-gate 	DAT_HANDLE_TYPE_RSP,
817c478bd9Sstevel@tonic-gate 	DAT_HANDLE_TYPE_CNO,
827c478bd9Sstevel@tonic-gate 	DAT_HANDLE_TYPE_SRQ
837c478bd9Sstevel@tonic-gate } DAT_HANDLE_TYPE;
847c478bd9Sstevel@tonic-gate 
857c478bd9Sstevel@tonic-gate /*
867c478bd9Sstevel@tonic-gate  * EVD state consists of 3 orthogonal substates. One for
877c478bd9Sstevel@tonic-gate  * enabled/disabled, one for waitable/unwaitable, and one
887c478bd9Sstevel@tonic-gate  * for configuration. Within each substates the values are
897c478bd9Sstevel@tonic-gate  * mutually exclusive.
907c478bd9Sstevel@tonic-gate  */
917c478bd9Sstevel@tonic-gate typedef enum dat_evd_state
927c478bd9Sstevel@tonic-gate {
937c478bd9Sstevel@tonic-gate 	DAT_EVD_STATE_ENABLED 		= 0x01,
947c478bd9Sstevel@tonic-gate 	DAT_EVD_STATE_DISABLED 		= 0x02,
957c478bd9Sstevel@tonic-gate 	DAT_EVD_STATE_WAITABLE 		= 0x04,
967c478bd9Sstevel@tonic-gate 	DAT_EVD_STATE_UNWAITABLE 	= 0x08,
977c478bd9Sstevel@tonic-gate 	DAT_EVD_STATE_CONFIG_NOTIFY 	= 0x10,
987c478bd9Sstevel@tonic-gate 	DAT_EVD_STATE_CONFIG_SOLICITED 	= 0x20,
997c478bd9Sstevel@tonic-gate 	DAT_EVD_STATE_CONFIG_THRESHOLD 	= 0x30
1007c478bd9Sstevel@tonic-gate } DAT_EVD_STATE;
1017c478bd9Sstevel@tonic-gate 
1027c478bd9Sstevel@tonic-gate typedef enum dat_evd_param_mask
1037c478bd9Sstevel@tonic-gate {
1047c478bd9Sstevel@tonic-gate 	DAT_EVD_FIELD_IA_HANDLE    	= 0x01,
1057c478bd9Sstevel@tonic-gate 	DAT_EVD_FIELD_EVD_QLEN		= 0x02,
1067c478bd9Sstevel@tonic-gate 	DAT_EVD_FIELD_EVD_STATE    	= 0x04,
1077c478bd9Sstevel@tonic-gate 	DAT_EVD_FIELD_CNO		= 0x08,
1087c478bd9Sstevel@tonic-gate 	DAT_EVD_FIELD_EVD_FLAGS		= 0x10,
1097c478bd9Sstevel@tonic-gate 
1107c478bd9Sstevel@tonic-gate 	DAT_EVD_FIELD_ALL		= 0x1F
1117c478bd9Sstevel@tonic-gate } DAT_EVD_PARAM_MASK;
1127c478bd9Sstevel@tonic-gate 
1137c478bd9Sstevel@tonic-gate typedef DAT_UINT64 DAT_PROVIDER_ATTR_MASK;
1147c478bd9Sstevel@tonic-gate 
1157c478bd9Sstevel@tonic-gate #include <dat/dat.h>
1167c478bd9Sstevel@tonic-gate 
1177c478bd9Sstevel@tonic-gate typedef DAT_HANDLE	DAT_CNO_HANDLE;
1187c478bd9Sstevel@tonic-gate 
1197c478bd9Sstevel@tonic-gate struct dat_evd_param
1207c478bd9Sstevel@tonic-gate {
1217c478bd9Sstevel@tonic-gate 	DAT_IA_HANDLE		ia_handle;
1227c478bd9Sstevel@tonic-gate 	DAT_COUNT		evd_qlen;
1237c478bd9Sstevel@tonic-gate 	DAT_EVD_STATE		evd_state;
1247c478bd9Sstevel@tonic-gate 	DAT_CNO_HANDLE		cno_handle;
1257c478bd9Sstevel@tonic-gate 	DAT_EVD_FLAGS		evd_flags;
1267c478bd9Sstevel@tonic-gate };
1277c478bd9Sstevel@tonic-gate 
1287c478bd9Sstevel@tonic-gate #define	DAT_LMR_COOKIE_SIZE 40 /* size of DAT_LMR_COOKIE in bytes */
1297c478bd9Sstevel@tonic-gate typedef char (* DAT_LMR_COOKIE)[DAT_LMR_COOKIE_SIZE];
1307c478bd9Sstevel@tonic-gate 
1317c478bd9Sstevel@tonic-gate /* Format for OS wait proxy agent function */
1327c478bd9Sstevel@tonic-gate 
1337c478bd9Sstevel@tonic-gate typedef void (*DAT_AGENT_FUNC)(
1347c478bd9Sstevel@tonic-gate 	DAT_PVOID,	/* instance data   */
1357c478bd9Sstevel@tonic-gate 	DAT_EVD_HANDLE  /* Event Dispatcher*/);
1367c478bd9Sstevel@tonic-gate 
1377c478bd9Sstevel@tonic-gate /* Definition */
1387c478bd9Sstevel@tonic-gate 
1397c478bd9Sstevel@tonic-gate typedef struct dat_os_wait_proxy_agent
1407c478bd9Sstevel@tonic-gate {
1417c478bd9Sstevel@tonic-gate 	DAT_PVOID instance_data;
1427c478bd9Sstevel@tonic-gate 	DAT_AGENT_FUNC proxy_agent_func;
1437c478bd9Sstevel@tonic-gate } DAT_OS_WAIT_PROXY_AGENT;
1447c478bd9Sstevel@tonic-gate 
1457c478bd9Sstevel@tonic-gate /* Define NULL Proxy agent */
1467c478bd9Sstevel@tonic-gate 
1477c478bd9Sstevel@tonic-gate #define	DAT_OS_WAIT_PROXY_AGENT_NULL \
1487c478bd9Sstevel@tonic-gate 	(DAT_OS_WAIT_PROXY_AGENT) { \
1497c478bd9Sstevel@tonic-gate 	(DAT_PVOID) NULL, \
1507c478bd9Sstevel@tonic-gate 	(DAT_AGENT_FUNC) NULL }
1517c478bd9Sstevel@tonic-gate 
1527c478bd9Sstevel@tonic-gate 
1537c478bd9Sstevel@tonic-gate /* Flags */
1547c478bd9Sstevel@tonic-gate 
1557c478bd9Sstevel@tonic-gate /*
1567c478bd9Sstevel@tonic-gate  * The value specified by the uDAPL Consumer for dat_ia_open to indicate
1577c478bd9Sstevel@tonic-gate  * that not async EVD should be created for the opening instance of an IA.
1587c478bd9Sstevel@tonic-gate  * The same IA have been open before that has the only async EVD to
1597c478bd9Sstevel@tonic-gate  * handle async errors for all open instances of the IA.
1607c478bd9Sstevel@tonic-gate  */
1617c478bd9Sstevel@tonic-gate 
1627c478bd9Sstevel@tonic-gate #define	DAT_EVD_ASYNC_EXISTS (DAT_EVD_HANDLE) 0x1
1637c478bd9Sstevel@tonic-gate 
1647c478bd9Sstevel@tonic-gate /*
1657c478bd9Sstevel@tonic-gate  * The value return by the dat_ia_query for the case when there is no
1667c478bd9Sstevel@tonic-gate  * async EVD for the IA instance. Consumer had specified the value of
1677c478bd9Sstevel@tonic-gate  * DAT_EVD_ASYNC_EXISTS for the async_evd_handle for dat_ia_open.
1687c478bd9Sstevel@tonic-gate  */
1697c478bd9Sstevel@tonic-gate 
1707c478bd9Sstevel@tonic-gate #define	DAT_EVD_OUT_OF_SCOPE (DAT_EVD_HANDLE) 0x2
1717c478bd9Sstevel@tonic-gate 
1727c478bd9Sstevel@tonic-gate /*
1737c478bd9Sstevel@tonic-gate  * Memory types
1747c478bd9Sstevel@tonic-gate  *
1757c478bd9Sstevel@tonic-gate  * Specifing memory type for LMR create. A consumer must use a single
1767c478bd9Sstevel@tonic-gate  * value when registering memory. The union of any of these
1777c478bd9Sstevel@tonic-gate  * flags is used in the provider parameters to indicate what memory
1787c478bd9Sstevel@tonic-gate  * type provider supports for LMR memory creation.
1797c478bd9Sstevel@tonic-gate  */
1807c478bd9Sstevel@tonic-gate 
1817c478bd9Sstevel@tonic-gate 
1827c478bd9Sstevel@tonic-gate 
1837c478bd9Sstevel@tonic-gate /* For udapl only */
1847c478bd9Sstevel@tonic-gate 
1857c478bd9Sstevel@tonic-gate typedef struct dat_shared_memory
1867c478bd9Sstevel@tonic-gate {
1877c478bd9Sstevel@tonic-gate 	DAT_PVOID		virtual_address;
1887c478bd9Sstevel@tonic-gate 	DAT_LMR_COOKIE		shared_memory_id;
1897c478bd9Sstevel@tonic-gate } DAT_SHARED_MEMORY;
1907c478bd9Sstevel@tonic-gate 
1917c478bd9Sstevel@tonic-gate typedef union dat_region_description
1927c478bd9Sstevel@tonic-gate {
1937c478bd9Sstevel@tonic-gate 	DAT_PVOID		for_va;
1947c478bd9Sstevel@tonic-gate 	DAT_LMR_HANDLE		for_lmr_handle;
1957c478bd9Sstevel@tonic-gate 	DAT_SHARED_MEMORY	for_shared_memory;	/* For udapl only */
1967c478bd9Sstevel@tonic-gate } DAT_REGION_DESCRIPTION;
1977c478bd9Sstevel@tonic-gate 
1987c478bd9Sstevel@tonic-gate /* LMR Arguments */
1997c478bd9Sstevel@tonic-gate 
2007c478bd9Sstevel@tonic-gate struct dat_lmr_param
2017c478bd9Sstevel@tonic-gate {
2027c478bd9Sstevel@tonic-gate 	DAT_IA_HANDLE		ia_handle;
2037c478bd9Sstevel@tonic-gate 	DAT_MEM_TYPE		mem_type;
2047c478bd9Sstevel@tonic-gate 	DAT_REGION_DESCRIPTION	region_desc;
2057c478bd9Sstevel@tonic-gate 	DAT_VLEN		length;
2067c478bd9Sstevel@tonic-gate 	DAT_PZ_HANDLE		pz_handle;
2077c478bd9Sstevel@tonic-gate 	DAT_MEM_PRIV_FLAGS	mem_priv;
2087c478bd9Sstevel@tonic-gate 	DAT_LMR_CONTEXT		lmr_context;
2097c478bd9Sstevel@tonic-gate 	DAT_RMR_CONTEXT		rmr_context;
2107c478bd9Sstevel@tonic-gate 	DAT_VLEN		registered_size;
2117c478bd9Sstevel@tonic-gate 	DAT_VADDR		registered_address;
2127c478bd9Sstevel@tonic-gate };
2137c478bd9Sstevel@tonic-gate 
2147c478bd9Sstevel@tonic-gate 
2157c478bd9Sstevel@tonic-gate typedef struct dat_cno_param
2167c478bd9Sstevel@tonic-gate {
2177c478bd9Sstevel@tonic-gate 	DAT_IA_HANDLE		ia_handle;
2187c478bd9Sstevel@tonic-gate 	DAT_OS_WAIT_PROXY_AGENT	agent;
2197c478bd9Sstevel@tonic-gate } DAT_CNO_PARAM;
2207c478bd9Sstevel@tonic-gate 
2217c478bd9Sstevel@tonic-gate typedef enum dat_cno_param_mask
2227c478bd9Sstevel@tonic-gate {
2237c478bd9Sstevel@tonic-gate 	DAT_CNO_FIELD_IA_HANDLE	= 0x1,
2247c478bd9Sstevel@tonic-gate 	DAT_CNO_FIELD_AGENT	= 0x2,
2257c478bd9Sstevel@tonic-gate 
2267c478bd9Sstevel@tonic-gate 	DAT_CNO_FIELD_ALL	= 0x3
2277c478bd9Sstevel@tonic-gate } DAT_CNO_PARAM_MASK;
2287c478bd9Sstevel@tonic-gate 
2297c478bd9Sstevel@tonic-gate 
2307c478bd9Sstevel@tonic-gate /* General Provider attributes. udat specific. */
2317c478bd9Sstevel@tonic-gate typedef enum dat_pz_support
2327c478bd9Sstevel@tonic-gate {
2337c478bd9Sstevel@tonic-gate 	DAT_PZ_UNIQUE,
2347c478bd9Sstevel@tonic-gate 	DAT_PZ_SAME,
2357c478bd9Sstevel@tonic-gate 	DAT_PZ_SHAREABLE
2367c478bd9Sstevel@tonic-gate } DAT_PZ_SUPPORT;
2377c478bd9Sstevel@tonic-gate 
2387c478bd9Sstevel@tonic-gate /*
2397c478bd9Sstevel@tonic-gate  * Provider should support merging of all event stream types. Provider
2407c478bd9Sstevel@tonic-gate  * attribute specify support for merging different event stream types.
2417c478bd9Sstevel@tonic-gate  * It is a 2D binary matrix where each row and column represents an event
2427c478bd9Sstevel@tonic-gate  * stream type. Each binary entry is 1 if the event streams of its raw
2437c478bd9Sstevel@tonic-gate  * and column can fed the same EVD, and 0 otherwise. The order of event
2447c478bd9Sstevel@tonic-gate  * streams in row and column is the same as in the definition of
2457c478bd9Sstevel@tonic-gate  * DAT_EVD_FLAGS: index 0 - Software Event, 1- Connection Request,
2467c478bd9Sstevel@tonic-gate  * 2 - DTO Completion, 3 - Connection event, 4 - RMR Bind Completion,
2477c478bd9Sstevel@tonic-gate  * 5 - Asynchronous event. By definition each diagonal entry is 1.
2487c478bd9Sstevel@tonic-gate  * Consumer allocates an array for it and passes it IN as a pointer
2497c478bd9Sstevel@tonic-gate  * for the array that Provider fills. Provider must fill the array
2507c478bd9Sstevel@tonic-gate  * that Consumer passes.
2517c478bd9Sstevel@tonic-gate  */
2527c478bd9Sstevel@tonic-gate 
2537c478bd9Sstevel@tonic-gate struct dat_provider_attr
2547c478bd9Sstevel@tonic-gate {
2557c478bd9Sstevel@tonic-gate 	char				provider_name[DAT_NAME_MAX_LENGTH];
2567c478bd9Sstevel@tonic-gate 	DAT_UINT32			provider_version_major;
2577c478bd9Sstevel@tonic-gate 	DAT_UINT32			provider_version_minor;
2587c478bd9Sstevel@tonic-gate 	DAT_UINT32			dapl_version_major;
2597c478bd9Sstevel@tonic-gate 	DAT_UINT32			dapl_version_minor;
2607c478bd9Sstevel@tonic-gate 	DAT_MEM_TYPE			lmr_mem_types_supported;
2617c478bd9Sstevel@tonic-gate 	DAT_IOV_OWNERSHIP		iov_ownership_on_return;
2627c478bd9Sstevel@tonic-gate 	DAT_QOS				dat_qos_supported;
2637c478bd9Sstevel@tonic-gate 	DAT_COMPLETION_FLAGS		completion_flags_supported;
2647c478bd9Sstevel@tonic-gate 	DAT_BOOLEAN			is_thread_safe;
2657c478bd9Sstevel@tonic-gate 	DAT_COUNT			max_private_data_size;
2667c478bd9Sstevel@tonic-gate 	DAT_BOOLEAN			supports_multipath;
2677c478bd9Sstevel@tonic-gate 	DAT_EP_CREATOR_FOR_PSP		ep_creator;
2687c478bd9Sstevel@tonic-gate 	DAT_PZ_SUPPORT			pz_support;
2697c478bd9Sstevel@tonic-gate 	DAT_UINT32			optimal_buffer_alignment;
2707c478bd9Sstevel@tonic-gate 	const DAT_BOOLEAN		evd_stream_merging_supported[6][6];
2717c478bd9Sstevel@tonic-gate 	DAT_BOOLEAN			srq_supported;
2727c478bd9Sstevel@tonic-gate 	DAT_COUNT			srq_watermarks_supported;
2737c478bd9Sstevel@tonic-gate 	DAT_BOOLEAN			srq_ep_pz_difference_supported;
2747c478bd9Sstevel@tonic-gate 	DAT_COUNT			srq_info_supported;
2757c478bd9Sstevel@tonic-gate 	DAT_COUNT			ep_recv_info_supported;
2767c478bd9Sstevel@tonic-gate 	DAT_BOOLEAN			lmr_sync_req;
2777c478bd9Sstevel@tonic-gate 	DAT_BOOLEAN			dto_async_return_guaranteed;
2787c478bd9Sstevel@tonic-gate 	DAT_BOOLEAN			rdma_write_for_rdma_read_req;
2797c478bd9Sstevel@tonic-gate 	DAT_COUNT			num_provider_specific_attr;
2807c478bd9Sstevel@tonic-gate 	DAT_NAMED_ATTR *		provider_specific_attr;
2817c478bd9Sstevel@tonic-gate };
2827c478bd9Sstevel@tonic-gate 
2837c478bd9Sstevel@tonic-gate #define	DAT_PROVIDER_FIELD_PROVIDER_NAME		UINT64_C(0x0000001)
2847c478bd9Sstevel@tonic-gate #define	DAT_PROVIDER_FIELD_PROVIDER_VERSION_MAJOR	UINT64_C(0x0000002)
2857c478bd9Sstevel@tonic-gate #define	DAT_PROVIDER_FIELD_PROVIDER_VERSION_MINOR	UINT64_C(0x0000004)
2867c478bd9Sstevel@tonic-gate #define	DAT_PROVIDER_FIELD_DAPL_VERSION_MAJOR		UINT64_C(0x0000008)
2877c478bd9Sstevel@tonic-gate #define	DAT_PROVIDER_FIELD_DAPL_VERSION_MINOR		UINT64_C(0x0000010)
2887c478bd9Sstevel@tonic-gate #define	DAT_PROVIDER_FIELD_LMR_MEM_TYPE_SUPPORTED	UINT64_C(0x0000020)
2897c478bd9Sstevel@tonic-gate #define	DAT_PROVIDER_FIELD_IOV_OWNERSHIP		UINT64_C(0x0000040)
2907c478bd9Sstevel@tonic-gate #define	DAT_PROVIDER_FIELD_DAT_QOS_SUPPORTED		UINT64_C(0x0000080)
2917c478bd9Sstevel@tonic-gate #define	DAT_PROVIDER_FIELD_COMPLETION_FLAGS_SUPPORTED	UINT64_C(0x0000100)
2927c478bd9Sstevel@tonic-gate #define	DAT_PROVIDER_FIELD_IS_THREAD_SAFE		UINT64_C(0x0000200)
2937c478bd9Sstevel@tonic-gate #define	DAT_PROVIDER_FIELD_MAX_PRIVATE_DATA_SIZE	UINT64_C(0x0000400)
2947c478bd9Sstevel@tonic-gate #define	DAT_PROVIDER_FIELD_SUPPORTS_MULTIPATH		UINT64_C(0x0000800)
2957c478bd9Sstevel@tonic-gate #define	DAT_PROVIDER_FIELD_EP_CREATOR			UINT64_C(0x0001000)
2967c478bd9Sstevel@tonic-gate #define	DAT_PROVIDER_FIELD_PZ_SUPPORT			UINT64_C(0x0002000)
2977c478bd9Sstevel@tonic-gate #define	DAT_PROVIDER_FIELD_OPTIMAL_BUFFER_ALIGNMENT	UINT64_C(0x0004000)
2987c478bd9Sstevel@tonic-gate #define	DAT_PROVIDER_FIELD_EVD_STREAM_MERGING_SUPPORTED	UINT64_C(0x0008000)
2997c478bd9Sstevel@tonic-gate #define	DAT_PROVIDER_FIELD_SRQ_SUPPORTED		UINT64_C(0x0010000)
3007c478bd9Sstevel@tonic-gate #define	DAT_PROVIDER_FIELD_SRQ_WATERMARKS_SUPPORTED	UINT64_C(0x0020000)
3017c478bd9Sstevel@tonic-gate #define	DAT_PROVIDER_FIELD_SRQ_EP_PZ_DIFFERENCE_SUPPORTED \
3027c478bd9Sstevel@tonic-gate 							UINT64_C(0x0040000)
3037c478bd9Sstevel@tonic-gate #define	DAT_PROVIDER_FIELD_SRQ_INFO_SUPPORTED		UINT64_C(0x0080000)
3047c478bd9Sstevel@tonic-gate #define	DAT_PROVIDER_FIELD_EP_RECV_INFO_SUPPORTED	UINT64_C(0x0100000)
3057c478bd9Sstevel@tonic-gate #define	DAT_PROVIDER_FIELD_LMR_SYNC_REQ			UINT64_C(0x0200000)
3067c478bd9Sstevel@tonic-gate #define	DAT_PROVIDER_FIELD_DTO_ASYNC_RETURN_GUARANTEED	UINT64_C(0x0400000)
3077c478bd9Sstevel@tonic-gate #define	DAT_PROVIDER_FIELD_RDMA_WRITE_FOR_RDMA_READ_REQ	UINT64_C(0x0800000)
3087c478bd9Sstevel@tonic-gate #define	DAT_PROVIDER_FIELD_NUM_PROVIDER_SPECIFIC_ATTR	UINT64_C(0x1000000)
3097c478bd9Sstevel@tonic-gate #define	DAT_PROVIDER_FIELD_PROVIDER_SPECIFIC_ATTR	UINT64_C(0x2000000)
3107c478bd9Sstevel@tonic-gate 
3117c478bd9Sstevel@tonic-gate #define	DAT_PROVIDER_FIELD_ALL				UINT64_C(0x3FFFFFF)
3127c478bd9Sstevel@tonic-gate #define	DAT_PROVIDER_FIELD_NONE				UINT64_C(0x0)
3137c478bd9Sstevel@tonic-gate 
3147c478bd9Sstevel@tonic-gate #include <dat/udat_vendor_specific.h>
3157c478bd9Sstevel@tonic-gate 
3167c478bd9Sstevel@tonic-gate /* ************************************************************************ */
3177c478bd9Sstevel@tonic-gate 
3187c478bd9Sstevel@tonic-gate /*
3197c478bd9Sstevel@tonic-gate  * User DAT functions definitions.
3207c478bd9Sstevel@tonic-gate  */
3217c478bd9Sstevel@tonic-gate 
3227c478bd9Sstevel@tonic-gate 
3237c478bd9Sstevel@tonic-gate extern DAT_RETURN dat_lmr_create(
3247c478bd9Sstevel@tonic-gate 	IN	DAT_IA_HANDLE,		/* ia_handle		*/
3257c478bd9Sstevel@tonic-gate 	IN	DAT_MEM_TYPE,		/* mem_type		*/
3267c478bd9Sstevel@tonic-gate 	IN	DAT_REGION_DESCRIPTION,	/* region_description   */
3277c478bd9Sstevel@tonic-gate 	IN	DAT_VLEN,		/* length		*/
3287c478bd9Sstevel@tonic-gate 	IN	DAT_PZ_HANDLE,		/* pz_handle		*/
3297c478bd9Sstevel@tonic-gate 	IN	DAT_MEM_PRIV_FLAGS,	/* privileges		*/
3307c478bd9Sstevel@tonic-gate 	OUT	DAT_LMR_HANDLE *,	/* lmr_handle		*/
3317c478bd9Sstevel@tonic-gate 	OUT	DAT_LMR_CONTEXT *,	/* lmr_context		*/
3327c478bd9Sstevel@tonic-gate 	OUT	DAT_RMR_CONTEXT *,	/* rmr_context		*/
3337c478bd9Sstevel@tonic-gate 	OUT	DAT_VLEN *,		/* registered_length	*/
3347c478bd9Sstevel@tonic-gate 	OUT	DAT_VADDR *);		/* registered_address   */
3357c478bd9Sstevel@tonic-gate 
3367c478bd9Sstevel@tonic-gate /* Event Functions */
3377c478bd9Sstevel@tonic-gate 
3387c478bd9Sstevel@tonic-gate extern DAT_RETURN dat_evd_create(
3397c478bd9Sstevel@tonic-gate 	IN	DAT_IA_HANDLE,		/* ia_handle		*/
3407c478bd9Sstevel@tonic-gate 	IN	DAT_COUNT,		/* evd_min_qlen		*/
3417c478bd9Sstevel@tonic-gate 	IN	DAT_CNO_HANDLE,		/* cno_handle		*/
3427c478bd9Sstevel@tonic-gate 	IN	DAT_EVD_FLAGS,		/* evd_flags		*/
3437c478bd9Sstevel@tonic-gate 	OUT	DAT_EVD_HANDLE *);	/* evd_handle		*/
3447c478bd9Sstevel@tonic-gate 
3457c478bd9Sstevel@tonic-gate extern DAT_RETURN dat_evd_modify_cno(
3467c478bd9Sstevel@tonic-gate 	IN	DAT_EVD_HANDLE,		/* evd_handle		*/
3477c478bd9Sstevel@tonic-gate 	IN	DAT_CNO_HANDLE);	/* cno_handle		*/
3487c478bd9Sstevel@tonic-gate 
3497c478bd9Sstevel@tonic-gate extern DAT_RETURN dat_cno_create(
3507c478bd9Sstevel@tonic-gate 	IN	DAT_IA_HANDLE,		/* ia_handle		*/
3517c478bd9Sstevel@tonic-gate 	IN	DAT_OS_WAIT_PROXY_AGENT,	/* agent		*/
3527c478bd9Sstevel@tonic-gate 	OUT	DAT_CNO_HANDLE *);	/* cno_handle		*/
3537c478bd9Sstevel@tonic-gate 
3547c478bd9Sstevel@tonic-gate extern DAT_RETURN dat_cno_modify_agent(
3557c478bd9Sstevel@tonic-gate 	IN	DAT_CNO_HANDLE,			/* cno_handle		*/
3567c478bd9Sstevel@tonic-gate 	IN	DAT_OS_WAIT_PROXY_AGENT);	/* agent		*/
3577c478bd9Sstevel@tonic-gate 
3587c478bd9Sstevel@tonic-gate extern DAT_RETURN dat_cno_query(
3597c478bd9Sstevel@tonic-gate 	IN	DAT_CNO_HANDLE,		/* cno_handle		*/
3607c478bd9Sstevel@tonic-gate 	IN	DAT_CNO_PARAM_MASK,	/* cno_param_mask	*/
3617c478bd9Sstevel@tonic-gate 	OUT	DAT_CNO_PARAM *);	/* cno_param		*/
3627c478bd9Sstevel@tonic-gate 
3637c478bd9Sstevel@tonic-gate extern DAT_RETURN dat_cno_free(
3647c478bd9Sstevel@tonic-gate 	IN DAT_CNO_HANDLE);		/* cno_handle		*/
3657c478bd9Sstevel@tonic-gate 
3667c478bd9Sstevel@tonic-gate extern DAT_RETURN dat_cno_wait(
3677c478bd9Sstevel@tonic-gate 	IN	DAT_CNO_HANDLE,		/* cno_handle		*/
3687c478bd9Sstevel@tonic-gate 	IN	DAT_TIMEOUT,		/* timeout		*/
3697c478bd9Sstevel@tonic-gate 	OUT	DAT_EVD_HANDLE *);	/* evd_handle		*/
3707c478bd9Sstevel@tonic-gate 
3717c478bd9Sstevel@tonic-gate extern DAT_RETURN dat_evd_enable(
3727c478bd9Sstevel@tonic-gate 	IN	DAT_EVD_HANDLE);	/* evd_handle		*/
3737c478bd9Sstevel@tonic-gate 
3747c478bd9Sstevel@tonic-gate extern DAT_RETURN dat_evd_wait(
3757c478bd9Sstevel@tonic-gate 	IN	DAT_EVD_HANDLE,		/* evd_handle		*/
3767c478bd9Sstevel@tonic-gate 	IN	DAT_TIMEOUT,		/* Timeout		*/
3777c478bd9Sstevel@tonic-gate 	IN	DAT_COUNT,		/* Threshold		*/
3787c478bd9Sstevel@tonic-gate 	OUT	DAT_EVENT *,		/* event		*/
3797c478bd9Sstevel@tonic-gate 	OUT	DAT_COUNT *);		/* N more events	*/
3807c478bd9Sstevel@tonic-gate 
3817c478bd9Sstevel@tonic-gate extern DAT_RETURN dat_evd_disable(
3827c478bd9Sstevel@tonic-gate 	IN	DAT_EVD_HANDLE);	/* evd_handle		*/
3837c478bd9Sstevel@tonic-gate 
3847c478bd9Sstevel@tonic-gate extern DAT_RETURN dat_evd_set_unwaitable(
3857c478bd9Sstevel@tonic-gate 	IN DAT_EVD_HANDLE);		/* evd_handle */
3867c478bd9Sstevel@tonic-gate 
3877c478bd9Sstevel@tonic-gate extern DAT_RETURN dat_evd_clear_unwaitable(
3887c478bd9Sstevel@tonic-gate 	IN DAT_EVD_HANDLE); /* evd_handle */
3897c478bd9Sstevel@tonic-gate 
3907c478bd9Sstevel@tonic-gate #ifdef __cplusplus
3917c478bd9Sstevel@tonic-gate }
3927c478bd9Sstevel@tonic-gate #endif
3937c478bd9Sstevel@tonic-gate 
3947c478bd9Sstevel@tonic-gate #endif /* _UDAT_H_ */
395