dapl_lmr_sync_rdma.c revision 9517:b4839b0aa7a4
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 2004 Sun Microsystems, Inc. All rights reserved. 24 * Use is subject to license terms. 25 */ 26 27/* 28 * 29 * MODULE: dapl_lmr_sync_rdma.c 30 * 31 * PURPOSE: Non-coherent Memory Support 32 * Description: Interfaces in this file are completely described in 33 * the DAPL 1.2 API, Chapter 6, section 7 34 * 35 */ 36 37#include "dapl.h" 38#include "dapl_adapter_util.h" 39 40/* 41 * dapl_lmr_sync_rdma_read 42 * 43 * uDAPL: User Direct Access Program Library Version 1.2, 6.7.4.1 44 * 45 * make memory changes visible to an incoming RDMA Read operation. 46 * This operation guarantees consistency by locally flushing the non-coherent 47 * cache prior to it being retrieved by remote peer RDMA read operation(s) 48 * 49 * Input: 50 * ia_handle 51 * local_segments 52 * num_segments 53 * 54 * Output: 55 * none 56 * 57 * Returns: 58 * DAT_SUCCESS 59 * DAT_INVALID_HANDLE 60 * DAT_INVALID_PARAMETER 61 */ 62 63DAT_RETURN 64dapl_lmr_sync_rdma_read( 65 IN DAT_IA_HANDLE ia_handle, 66 IN const DAT_LMR_TRIPLET *local_segments, 67 IN DAT_VLEN num_segments) 68{ 69 return (dapls_ib_lmr_sync_rdma_common(ia_handle, local_segments, 70 num_segments, DAPL_MR_SYNC_RDMA_RD)); 71} 72 73/* 74 * dapl_lmr_sync_rdma_write 75 * 76 * uDAPL: User Direct Access Program Library Version 1.2, 6.7.4.1 77 * 78 * make effects of an incoming RDMA Write operation visible to Consumer. 79 * This operation guarantees consistency by locally invalidating the 80 * non-coherent cache whose buffer has been populated by remote peer 81 * RDMA write operation(s). 82 * 83 * Input: 84 * ia_handle 85 * local_segments 86 * num_segments 87 * 88 * Output: 89 * none 90 * 91 * Returns: 92 * DAT_SUCCESS 93 * DAT_INVALID_HANDLE 94 * DAT_INVALID_PARAMETER 95 */ 96 97DAT_RETURN 98dapl_lmr_sync_rdma_write( 99 IN DAT_IA_HANDLE ia_handle, 100 IN const DAT_LMR_TRIPLET *local_segments, 101 IN DAT_VLEN num_segments) 102{ 103 return (dapls_ib_lmr_sync_rdma_common(ia_handle, local_segments, 104 num_segments, DAPL_MR_SYNC_RDMA_WR)); 105} 106