/*
* 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
*/
/*
* Copyright (c) 2002-2003, Network Appliance, Inc. All rights reserved.
*/
/*
* Copyright 2009 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
/*
*
* MODULE: dapl_rmr_bind.c
*
* PURPOSE: Memory management
* Description: Interfaces in this file are completely described in
* the DAPL 1.1 API, Chapter 6, section 6
*
* $Id: dapl_rmr_bind.c,v 1.14 2003/07/11 18:23:31 jlentini Exp $
*/
#include "dapl.h"
#include "dapl_rmr_util.h"
#include "dapl_ep_util.h"
#include "dapl_cookie.h"
#include "dapl_adapter_util.h"
/*
*
* Function Prototypes
*
*/
static DAT_RETURN
static DAT_RETURN
/*
*
* Function Definitions
*
*/
static DAT_RETURN
{
(DAPL_HASH_DATA *) &lmr);
if (DAT_SUCCESS != dat_status) {
goto bail;
}
/*
* if the ep in unconnected return an error. IB requires that the
* QP be connected to change a memory window binding since:
*
* - memory window bind operations are WQEs placed on a QP's
* send queue
*
* - QP's only process WQEs on the send queue when the QP is in
* the RTS state
*/
goto bail;
}
if (DAT_FALSE == dapl_mr_bounds_check(
goto bail;
}
/* If the LMR, RMR, and EP are not in the same PZ, there is an error */
goto bail;
}
goto bail;
}
if (DAT_SUCCESS != dat_status) {
goto bail;
}
if (DAT_SUCCESS != dat_status) {
goto bail;
}
/* if the RMR was previously bound */
}
bail:
return (dat_status);
}
static DAT_RETURN
{
/*
* if the ep in unconnected return an error. IB requires that the
* QP be connected to change a memory window binding since:
*
* - memory window bind operations are WQEs placed on a QP's
* send queue
*
* - QP's only process WQEs on the send queue when the QP is in
* the RTS state
*/
goto bail1;
}
/* If the RMR and EP are not in the same PZ, there is an error */
goto bail1;
}
goto bail1;
}
user_cookie, &cookie);
if (DAT_SUCCESS != dat_status) {
goto bail1;
}
if (DAT_SUCCESS != dat_status) {
goto bail1;
}
/* if the RMR was previously bound */
}
return (dat_status);
}
/*
* dapl_rmr_bind
*
* DAPL Requirements Version xxx, 6.6.4.4
*
* Bind the RMR to the specified memory region within the LMR and
* provide a new rmr_context value.
*
* Input:
* Output:
*/
{
}
}
/* if the rmr should be bound */
if (0 != lmr_triplet->segment_length) {
return (dapli_rmr_bind_fuse(rmr,
rmr_context));
} else { /* the rmr should be unbound */
return (dapli_rmr_bind_unfuse(rmr,
}
}