ib_rdma.c revision c0dd49bdd68c0d758a67d56f07826f3b45cfc664
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * CDDL HEADER START
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * The contents of this file are subject to the terms of the
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * Common Development and Distribution License (the "License").
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * You may not use this file except in compliance with the License.
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * See the License for the specific language governing permissions
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * and limitations under the License.
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * When distributing Covered Code, include this CDDL HEADER in each
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * If applicable, add the following below this CDDL HEADER, with the
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * fields enclosed by brackets "[]" replaced with your own identifying
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * information: Portions Copyright [yyyy] [name of copyright owner]
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * CDDL HEADER END
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * Copyright (c) 2006 Oracle. All rights reserved.
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * This software is available to you under a choice of one of two
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * licenses. You may choose to be licensed under the terms of the GNU
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * General Public License (GPL) Version 2, available from the file
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * COPYING in the main directory of this source tree, or the
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * OpenIB.org BSD license below:
struct rdsv3_ib_mr {
unsigned int remap_count;
unsigned int sg_len;
int sg_dma_len;
struct rdsv3_ib_mr_pool {
unsigned long max_items;
unsigned long max_items_soft;
unsigned long max_free_pinned;
*rds_ibdev);
static struct rdsv3_ib_device *
list) {
return (rds_ibdev);
return (NULL);
if (!i_ipaddr)
return (-ENOMEM);
list) {
if (rds_ibdev_old)
return (-ENOMEM);
return (-ENOMEM);
int umem_flags;
int ret;
return (ibmr);
if (ret != 0) {
return (ibmr);
if (ret == 0) {
return (ibmr);
ret);
static struct rdsv3_ib_mr *
KM_SLEEP);
return (ibmr);
return (-ENOMEM);
return (-ENOBUFS);
return (-EINVAL);
rdsv3_ib_flush_mrs(void)
if (invalidate) {
pool_hdl);