1/* 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 22/* 23 * Copyright (c) 2002-2003, Network Appliance, Inc. All rights reserved. 24 */ 25 26/* 27 * Copyright 2009 Sun Microsystems, Inc. All rights reserved. 28 * Use is subject to license terms. 29 */ 30 31/* 32 * 33 * MODULE: dapl_ep_post_rdma_read.c 34 * 35 * PURPOSE: Endpoint management 36 * Description: Interfaces in this file are completely described in 37 * the DAPL 1.1 API, Chapter 6, section 5 38 * 39 * $Id: dapl_ep_post_rdma_read.c,v 1.8 2003/08/14 21:23:37 jlentini Exp $ 40 */ 41 42#include "dapl_ep_util.h" 43 44/* 45 * dapl_ep_post_rdma_read 46 * 47 * DAPL Requirements Version xxx, 6.5.12 48 * 49 * Request the xfer of all data specified by the remote_iov over the 50 * connection of ep handle Endpint into the local_iov 51 * 52 * Input: 53 * ep_handle 54 * num_segments 55 * local_iov 56 * user_cookie 57 * remote_iov 58 * completion_flags 59 * 60 * Output: 61 * None. 62 * 63 * Returns: 64 * DAT_SUCCESS 65 * DAT_INSUFFICIENT_RESOURCES 66 * DAT_INVALID_PARAMETER 67 * DAT_INVALID_STATE 68 * DAT_LENGTH_ERROR 69 * DAT_PROTECTION_VIOLATION 70 * DAT_PRIVILEGES_VIOLATION 71 */ 72DAT_RETURN 73dapl_ep_post_rdma_read( 74 IN DAT_EP_HANDLE ep_handle, 75 IN DAT_COUNT num_segments, 76 IN DAT_LMR_TRIPLET *local_iov, 77 IN DAT_DTO_COOKIE user_cookie, 78 IN const DAT_RMR_TRIPLET *remote_iov, 79 IN DAT_COMPLETION_FLAGS completion_flags) 80{ 81 82 DAT_RETURN dat_status; 83 84 dapl_dbg_log(DAPL_DBG_TYPE_API, 85 "dapl_ep_post_rdma_read (%p, %d, %p, %p, %p, %x)\n", 86 ep_handle, 87 num_segments, 88 local_iov, 89 user_cookie.as_64, 90 remote_iov, 91 completion_flags); 92 93 dat_status = dapl_ep_post_send_req(ep_handle, 94 num_segments, 95 local_iov, 96 user_cookie, 97 remote_iov, 98 completion_flags, 99 DAPL_DTO_TYPE_RDMA_READ, 100 OP_RDMA_READ); 101 102 dapl_dbg_log(DAPL_DBG_TYPE_RTN, 103 "dapl_ep_post_rdma_read () returns 0x%x", dat_status); 104 105 return (dat_status); 106} 107