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, Version 1.0 only 6 * (the "License"). You may not use this file except in compliance 7 * with the License. 8 * 9 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 10 * or http://www.opensolaris.org/os/licensing. 11 * See the License for the specific language governing permissions 12 * and limitations under the License. 13 * 14 * When distributing Covered Code, include this CDDL HEADER in each 15 * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 16 * If applicable, add the following below this CDDL HEADER, with the 17 * fields enclosed by brackets "[]" replaced with your own identifying 18 * information: Portions Copyright [yyyy] [name of copyright owner] 19 * 20 * CDDL HEADER END 21 */ 22 /* 23 * Copyright 2003 Sun Microsystems, Inc. All rights reserved. 24 * Use is subject to license terms. 25 */ 26 27 #include <sys/ib/ibtl/impl/ibtl.h> 28 29 /* 30 * ibtl_wr.c 31 * These routines simply pass the request to the proper HCA. 32 */ 33 34 /* 35 * Globals 36 */ 37 static char ibtf_wr[] = "ibtl_wr"; 38 39 /* 40 * Function: 41 * ibt_post_send 42 * Input: 43 * chan - QP. 44 * wr_list - Address of array[size] of work requests. 45 * size - Number of work requests. 46 * Output: 47 * posted - Address to return the number of work requests 48 * successfully posted. May be NULL. 49 * Description: 50 * Post one or more send work requests to the channel. 51 */ 52 53 ibt_status_t 54 ibt_post_send(ibt_channel_hdl_t chan, ibt_send_wr_t *wr_list, uint_t size, 55 uint_t *posted) 56 { 57 IBTF_DPRINTF_L4(ibtf_wr, "ibt_post_send(%p, %p, %d)", 58 chan, wr_list, size); 59 60 return (IBTL_CHAN2CIHCAOPS_P(chan)->ibc_post_send(IBTL_CHAN2CIHCA(chan), 61 chan->ch_qp.qp_ibc_qp_hdl, wr_list, size, posted)); 62 } 63 64 /* 65 * Function: 66 * ibt_post_recv 67 * Input: 68 * chan - QP. 69 * wr_list - Address of array[size] of work requests. 70 * size - Number of work requests. 71 * Output: 72 * posted - Address to return the number of work requests 73 * successfully posted. May be NULL. 74 * Description: 75 * Post one or more receive work requests to the channel. 76 */ 77 78 ibt_status_t 79 ibt_post_recv(ibt_channel_hdl_t chan, ibt_recv_wr_t *wr_list, uint_t size, 80 uint_t *posted) 81 { 82 IBTF_DPRINTF_L4(ibtf_wr, "ibt_post_recv(%p, %p, %d)", 83 chan, wr_list, size); 84 85 return (IBTL_CHAN2CIHCAOPS_P(chan)->ibc_post_recv(IBTL_CHAN2CIHCA(chan), 86 chan->ch_qp.qp_ibc_qp_hdl, wr_list, size, posted)); 87 } 88