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 * See the License for the specific language governing permissions 2N/A * and limitations under the License. 2N/A * When distributing Covered Code, include this CDDL HEADER in each 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 * Copyright 2004 Sun Microsystems, Inc. All rights reserved. 2N/A * Use is subject to license terms. 2N/A * PURPOSE: Shared Receive Queue 2N/A * Description: Interfaces in this file are completely described in 2N/A * the DAPL 1.2 API, Chapter 6, section 5 2N/A * uDAPL: User Direct Access Program Library Version 1.2, 6.5.1 2N/A * creates an instance of a Shared Receive Queue (SRQ) that is provided 2N/A * to the Consumer as srq_handle. 2N/A * DAT_INSUFFICIENT_RESOURCES 2N/A * DAT_INVALID_HANDLE 2N/A * DAT_INVALID_PARAMETER 2N/A * DAT_MODEL_NOT_SUPPORTED 2N/A /* Verify the attributes against the transport */ 2N/A /* Take a reference on the PZ handle */ 2N/A /* Link it onto the IA */ 2N/A * uDAPL: User Direct Access Program Library Version 1.2, 6.5.5 2N/A * destroys an instance of the SRQ. The SRQ cannot be destroyed if it is 2N/A * DAT_INVALID_HANDLE 2N/A "dapl_srq_free: Free SRQ: %p, refcnt %d\n",
2N/A /* Remove link from the IA */ 2N/A * dapl_srq_post_recv 2N/A * uDAPL: User Direct Access Program Library Version 1.2, 6.5.8 2N/A * posts the receive buffer that can be used for the incoming message into 2N/A * the local_iov by any connected EP that uses SRQ. 2N/A * DAT_INVALID_HANDLE 2N/A * DAT_INSUFFICIENT_RESOURCES 2N/A * DAT_INVALID_PARAMETER 2N/A * DAT_PROTECTION_VIOLATION 2N/A * DAT_PRIVILEGES_VIOLATION 2N/A "dapl_srq_post_recv (%p, %d, %p, %P)\n",
2N/A * Synchronization ok since this buffer is only used for receive 2N/A * requests, which aren't allowed to race with each other. 2N/A * Invoke provider specific routine to post DTO 2N/A * uDAPL: User Direct Access Program Library Version 1.2, 6.5.6 2N/A * provides to the Consumer SRQ parameters. The Consumer passes in a pointer 2N/A * to the Consumer-allocated structures for SRQ parameters that the Provider 2N/A * DAT_INVALID_HANDLE 2N/A * DAT_INVALID_PARAMETER 2N/A /* Do a struct copy */ 2N/A /* update the outstanding dto count */ 2N/A * uDAPL: User Direct Access Program Library Version 1.2, 6.5.4 2N/A * sets the low watermark value for SRQ and arms SRQ for generating an 2N/A * asynchronous event for low watermark. An asynchronous event will be 2N/A * generated when the number of buffers on SRQ is below the low watermark 2N/A * for the first time. This may happen during this call or when an 2N/A * associated EP takes a buffer from the SRQ. 2N/A * DAT_INVALID_HANDLE 2N/A * DAT_INVALID_PARAMETER 2N/A * DAT_MODEL_NOT_SUPPORTED 2N/A * uDAPL: User Direct Access Program Library Version 1.2, 6.5.7 2N/A * modifies the size of the queue of SRQ. Resizing of SRQ shall not cause 2N/A * any incoming messages on any of the EPs that use the SRQ to be lost. 2N/A * DAT_INVALID_HANDLE 2N/A * DAT_INVALID_PARAMETER 2N/A * DAT_INSUFFICIENT_RESOURCES 2N/A /* can't shrink below the number of outstanding recvs */ 2N/A * shrinking SRQs is not supported on tavor return success without 2N/A /* Verify the attributes against the transport */