/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
*/
eib_chan_init(void)
{
/*
* Allocate a eib_chan_t to store stuff about admin qp and
* initialize some basic stuff
*/
return (chan);
}
void
{
if (chan) {
}
}
int
{
int wndx;
int i;
/*
* We don't want to post beyond the maximum rwqe size for this channel
*/
/*
* Grab a chunk of rwqes
*/
/*
* When eib_chan_post_rx() is called to post a bunch of rwqes,
* it is either during the vnic setup or when we're refilling
* the data channel. Neither situation is important enough for
* us to grab the wqes reserved for sending keepalives of
* previously established vnics.
*/
if (ret != EIB_E_SUCCESS)
break;
/*
* Post work requests from the rwqes we just grabbed
*/
for (i = 0; i < n_got; i++) {
if (ret == EIB_E_SUCCESS) {
n_good++;
} else {
}
}
/*
* If we got less rwqes than we asked for during the grab
* earlier, we'll stop asking for more and quit now.
*/
break;
}
/*
* If we posted absolutely nothing, we return failure; otherwise
* return success.
*/
if (n_good == 0)
return (EIB_E_FAILURE);
if (n_posted)
return (EIB_E_SUCCESS);
}
/*ARGSUSED*/
int
{
/*
* If this channel has receive buffer alignment restrictions, make
* sure the requirements are met
*/
if (chan->ch_ip_hdr_align) {
}
/*
* If the receive buffer for this channel needs to have an mblk
* allocated, do it
*/
if (chan->ch_alloc_mp) {
"desballoc(base=0x%llx, len=0x%llx) failed",
return (EIB_E_FAILURE);
}
}
/*
* Check if the recv queue is already full or if we can post one more
*/
"too many rwqes posted already, posted=0x%lx, max=0x%lx",
return (EIB_E_FAILURE);
}
if (ret != IBT_SUCCESS) {
"ibt_post_recv() failed, ret=%d", ret);
return (EIB_E_FAILURE);
}
chan->ch_rx_posted++;
return (EIB_E_SUCCESS);
}