[openib-general] [PATCH 2/3] kDAPL: consolidate dapl_rsp*.c into one file

Tom Duffy tduffy at sun.com
Thu May 26 11:49:57 PDT 2005


Signed-off-by: Tom Duffy <tduffy at sun.com>

diff -Nurp -X /home/tduffy/dontdiff linux-kernel-srq/dat-provider/dapl_rsp.c linux-kernel-rsp/dat-provider/dapl_rsp.c
--- linux-kernel-srq/dat-provider/dapl_rsp.c	1969-12-31 16:00:00.000000000 -0800
+++ linux-kernel-rsp/dat-provider/dapl_rsp.c	2005-05-25 14:58:10.928006000 -0700
@@ -0,0 +1,315 @@
+/*
+ * Copyright (c) 2002-2005, Network Appliance, Inc. All rights reserved.
+ *
+ * This Software is licensed under one of the following licenses:
+ *
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/cpl.php.
+ *
+ * 2) under the terms of the "The BSD License" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ *
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a
+ *    copy of which is available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * Licensee has the right to choose one of the above licenses.
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice and one of the license notices.
+ *
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ */
+
+/*
+ * $Id$
+ */
+
+#include "dapl.h"
+#include "dapl_sp_util.h"
+#include "dapl_ia_util.h"
+#include "dapl_ep_util.h"
+#include "dapl_openib_util.h"
+
+/*
+ * dapl_rsp_create
+ *
+ * Create a Resereved Service Point with the specified Endpoint
+ * that generates at most one Connection Request that is
+ * delivered to the specified Event Dispatcher in a notification
+ * event
+ *
+ * Input:
+ *	ia_handle
+ *	conn_qual
+ *	ep_handle
+ *	evd_handle
+ *
+ * Output:
+ *	rsp_handle
+ *
+ * Returns:
+ *	DAT_SUCCESS
+ *	DAT_INSUFFICIENT_RESOURCES
+ *	DAT_INVALID_PARAMETER
+ *	DAT_INVALID_STATE
+ *	DAT_CONN_QUAL_IN_USE
+ */
+u32 dapl_rsp_create(DAT_IA_HANDLE ia_handle, DAT_CONN_QUAL conn_qual,
+		    DAT_EP_HANDLE ep_handle, DAT_EVD_HANDLE evd_handle,
+		    DAT_RSP_HANDLE *rsp_handle)
+{
+	struct dapl_ia *ia_ptr;
+	struct dapl_sp *sp_ptr;
+	struct dapl_evd *evd_ptr;
+	struct dapl_ep *ep_ptr;
+	boolean_t sp_found;
+	u32 status = DAT_SUCCESS;
+
+	ia_ptr = (struct dapl_ia *)ia_handle;
+
+	dapl_dbg_log(DAPL_DBG_TYPE_CM,
+		     ">>> dapl_rsp_free conn_qual: %x EP: %p\n",
+		     conn_qual, ep_handle);
+
+	if (DAPL_BAD_HANDLE(ia_ptr, DAPL_MAGIC_IA)) {
+		status = DAT_ERROR(DAT_INVALID_HANDLE, DAT_INVALID_HANDLE_IA);
+		goto bail;
+	}
+	if (DAPL_BAD_HANDLE(ep_handle, DAPL_MAGIC_EP)) {
+		status = DAT_ERROR(DAT_INVALID_HANDLE, DAT_INVALID_HANDLE_EP);
+		goto bail;
+	}
+	if (DAPL_BAD_HANDLE(evd_handle, DAPL_MAGIC_EVD)) {
+		status = DAT_ERROR(DAT_INVALID_HANDLE,
+				   DAT_INVALID_HANDLE_EVD_CR);
+		goto bail;
+	}
+
+	if (rsp_handle == NULL) {
+		status = DAT_ERROR(DAT_INVALID_PARAMETER, DAT_INVALID_ARG5);
+		goto bail;
+	}
+
+	ep_ptr = (struct dapl_ep *)ep_handle;
+	if (ep_ptr->param.ep_state != DAT_EP_STATE_UNCONNECTED) {
+		status = DAT_ERROR(DAT_INVALID_STATE,
+				   dapl_ep_state_subtype(ep_ptr));
+		goto bail;
+	}
+
+	evd_ptr = (struct dapl_evd *)evd_handle;
+	if (!(evd_ptr->evd_flags & DAT_EVD_CR_FLAG)) {
+		status = DAT_ERROR(DAT_INVALID_HANDLE,
+				   DAT_INVALID_HANDLE_EVD_CR);
+		goto bail;
+	}
+
+	sp_ptr = dapl_ia_sp_search(ia_ptr, conn_qual, FALSE);
+	sp_found = TRUE;
+	if (sp_ptr == NULL) {
+		sp_found = FALSE;
+
+		/* Allocate RSP */
+		sp_ptr = dapl_sp_alloc(ia_ptr, FALSE);
+		if (sp_ptr == NULL) {
+			status = DAT_ERROR(DAT_INSUFFICIENT_RESOURCES,
+					   DAT_RESOURCE_MEMORY);
+			goto bail;
+		}
+	}
+
+	/*
+	 * Fill out the RSP args
+	 */
+	sp_ptr->ia_handle = ia_handle;
+	sp_ptr->conn_qual = conn_qual;
+	sp_ptr->evd_handle = evd_handle;
+	sp_ptr->psp_flags = 0;
+	sp_ptr->ep_handle = ep_handle;
+
+	/*
+	 * Take a reference on the EVD handle
+	 */
+	atomic_inc(&evd_ptr->evd_ref_count);
+
+	/*
+	 * Update the EP state indicating the provider now owns it
+	 */
+	ep_ptr->param.ep_state = DAT_EP_STATE_RESERVED;
+
+	/* 
+	 * Set up a listener for a connection. Connections can arrive
+	 * even before this call returns!
+	 */
+	sp_ptr->state = DAPL_SP_STATE_RSP_LISTENING;
+	sp_ptr->listening = TRUE;
+
+	if (sp_found == FALSE) {
+		/* Link it onto the IA */
+		dapl_ia_link_rsp(ia_ptr, sp_ptr);
+
+		status = dapl_ib_setup_conn_listener(ia_ptr, sp_ptr);
+
+		if (status != DAT_SUCCESS) {
+			/*
+			 * Have a problem setting up the connection, something
+			 * wrong!  Decrements the EVD refcount & release it. Set 
+			 * the state to FREE, so we know the call failed.
+			 */
+			atomic_dec(&evd_ptr->evd_ref_count);
+			sp_ptr->evd_handle = NULL;
+			sp_ptr->state = DAPL_SP_STATE_FREE;
+			dapl_ia_unlink_sp(ia_ptr, sp_ptr);
+			dapl_sp_dealloc(sp_ptr);
+
+			dapl_dbg_log(DAPL_DBG_TYPE_CM,
+				     "--> dapl_rsp_create setup_conn_listener failed: %x\n",
+				     status);
+
+			goto bail;
+		}
+	}
+
+	/*
+	 * Return handle to the user
+	 */
+	*rsp_handle = (DAT_RSP_HANDLE)sp_ptr;
+
+bail:
+	return status;
+}
+
+/*
+ * dapl_rsp_free
+ *
+ * Destroy a specific instance of a Reserved Service Point.
+ *
+ * Input:
+ *	rsp_handle
+ *
+ * Output:
+ *	none
+ *
+ * Returns:
+ *	DAT_SUCCESS
+ *	DAT_INVALID_HANDLE
+ */
+u32 dapl_rsp_free(DAT_RSP_HANDLE rsp_handle)
+{
+	struct dapl_ia *ia_ptr;
+	struct dapl_sp *sp_ptr;
+	struct dapl_ep *ep_ptr;
+	u32 status = DAT_SUCCESS;
+
+	sp_ptr = (struct dapl_sp *)rsp_handle;
+	/*
+	 * Verify handle
+	 */
+	dapl_dbg_log(DAPL_DBG_TYPE_CM, ">>> dapl_rsp_free %p\n", rsp_handle);
+	if (DAPL_BAD_HANDLE(sp_ptr, DAPL_MAGIC_RSP)) {
+		status = DAT_ERROR(DAT_INVALID_HANDLE, DAT_INVALID_HANDLE_RSP);
+		goto bail;
+	}
+
+	/* ia_ptr = (struct dapl_ia *)sp_ptr->header.owner_ia; */
+	ia_ptr = sp_ptr->header.owner_ia;
+
+	/*
+	 * Remove the connection listener if there are no connections.  If
+	 * we defer removing the sp it becomes something of a zombie
+	 * container until disconnection, after which it will be cleaned up.
+	 */
+	spin_lock_irqsave(&sp_ptr->header.lock, sp_ptr->header.flags);
+
+	/*
+	 * Make sure we don't leave a dangling EP. If the state is still
+	 * RESERVED then the RSP still owns it.
+	 */
+	ep_ptr = (struct dapl_ep *)sp_ptr->ep_handle;
+	if (ep_ptr != NULL && ep_ptr->param.ep_state == DAT_EP_STATE_RESERVED)
+		ep_ptr->param.ep_state = DAT_EP_STATE_UNCONNECTED;
+	sp_ptr->ep_handle = NULL;
+
+	/*
+	 * Release reference on EVD. If an error was encountered in a previous
+	 * free the evd_handle will be NULL
+	 */
+	if (sp_ptr->evd_handle) {
+		atomic_dec(&((struct dapl_evd *)sp_ptr->evd_handle)->
+				   evd_ref_count);
+		sp_ptr->evd_handle = NULL;
+	}
+
+	/*
+	 * Release the base resource if there are no outstanding connections;
+	 * else the last disconnect on this RSP will free it up. The RSP
+	 * is used to contain CR records for each connection, which 
+	 * contain information necessary to disconnect.
+	 * sp_ptr->listening will be TRUE if there has never been a
+	 * connection event, and FALSE if a connection attempt resulted
+	 * in a reject.
+	 */
+	if (sp_ptr->cr_list_count == 0) {
+		/* This RSP has never been used. Clean it up */
+		sp_ptr->listening = FALSE;
+		sp_ptr->state = DAPL_SP_STATE_FREE;
+		spin_unlock_irqrestore(&sp_ptr->header.lock, 
+				       sp_ptr->header.flags);
+
+		status = dapl_ib_remove_conn_listener(ia_ptr, sp_ptr);
+		if (status != DAT_SUCCESS) {
+			sp_ptr->state = DAPL_SP_STATE_RSP_LISTENING;
+			goto bail;
+		}
+		dapl_ia_unlink_sp(ia_ptr, sp_ptr);
+		dapl_sp_dealloc(sp_ptr);
+	} else {
+		/*
+		 * The RSP is now in the pending state, where it will sit until
+		 * the connection terminates or the app uses the same
+		 * ServiceID again, which will reactivate it.
+		 */
+		sp_ptr->state = DAPL_SP_STATE_RSP_PENDING;
+		spin_unlock_irqrestore(&sp_ptr->header.lock, 
+				       sp_ptr->header.flags);
+	}
+
+bail:
+	return status;
+}
+
+u32 dapl_rsp_query(DAT_RSP_HANDLE rsp_handle, struct dat_rsp_param *rsp_param)
+{
+	struct dapl_sp *sp_ptr;
+	u32 status;
+
+	if (DAPL_BAD_HANDLE(rsp_handle, DAPL_MAGIC_RSP)) {
+		status = DAT_ERROR(DAT_INVALID_HANDLE, DAT_INVALID_HANDLE_RSP);
+		goto bail;
+	}
+
+	if (NULL == rsp_param) {
+		status = DAT_ERROR(DAT_INVALID_PARAMETER, DAT_INVALID_ARG3);
+		goto bail;
+	}
+
+	sp_ptr = (struct dapl_sp *)rsp_handle;
+
+	/*
+	 * Fill in the RSP params
+	 */
+	rsp_param->ia_handle = sp_ptr->ia_handle;
+	rsp_param->conn_qual = sp_ptr->conn_qual;
+	rsp_param->evd_handle = sp_ptr->evd_handle;
+	rsp_param->ep_handle = sp_ptr->ep_handle;
+
+	status = DAT_SUCCESS;
+
+bail:
+	return status;
+}
diff -Nurp -X /home/tduffy/dontdiff linux-kernel-srq/dat-provider/dapl_rsp_create.c linux-kernel-rsp/dat-provider/dapl_rsp_create.c
--- linux-kernel-srq/dat-provider/dapl_rsp_create.c	2005-05-23 22:21:46.240013000 -0700
+++ linux-kernel-rsp/dat-provider/dapl_rsp_create.c	1969-12-31 16:00:00.000000000 -0800
@@ -1,188 +0,0 @@
-/*
- * Copyright (c) 2002-2005, Network Appliance, Inc. All rights reserved.
- *
- * This Software is licensed under one of the following licenses:
- *
- * 1) under the terms of the "Common Public License 1.0" a copy of which is
- *    available from the Open Source Initiative, see
- *    http://www.opensource.org/licenses/cpl.php.
- *
- * 2) under the terms of the "The BSD License" a copy of which is
- *    available from the Open Source Initiative, see
- *    http://www.opensource.org/licenses/bsd-license.php.
- *
- * 3) under the terms of the "GNU General Public License (GPL) Version 2" a
- *    copy of which is available from the Open Source Initiative, see
- *    http://www.opensource.org/licenses/gpl-license.php.
- *
- * Licensee has the right to choose one of the above licenses.
- *
- * Redistributions of source code must retain the above copyright
- * notice and one of the license notices.
- *
- * Redistributions in binary form must reproduce both the above copyright
- * notice, one of the license notices in the documentation
- * and/or other materials provided with the distribution.
- */
-
-/*
- * $Id: dapl_rsp_create.c 2462 2005-05-24 02:28:24Z jlentini $
- */
-
-#include "dapl.h"
-#include "dapl_sp_util.h"
-#include "dapl_ia_util.h"
-#include "dapl_ep_util.h"
-#include "dapl_openib_util.h"
-
-/*
- * dapl_rsp_create
- *
- * Create a Resereved Service Point with the specified Endpoint
- * that generates at most one Connection Request that is
- * delivered to the specified Event Dispatcher in a notification
- * event
- *
- * Input:
- *	ia_handle
- *	conn_qual
- *	ep_handle
- *	evd_handle
- *
- * Output:
- *	rsp_handle
- *
- * Returns:
- *	DAT_SUCCESS
- *	DAT_INSUFFICIENT_RESOURCES
- *	DAT_INVALID_PARAMETER
- *	DAT_INVALID_STATE
- *	DAT_CONN_QUAL_IN_USE
- */
-u32 dapl_rsp_create(DAT_IA_HANDLE ia_handle, DAT_CONN_QUAL conn_qual,
-		    DAT_EP_HANDLE ep_handle, DAT_EVD_HANDLE evd_handle,
-		    DAT_RSP_HANDLE *rsp_handle)
-{
-	struct dapl_ia *ia_ptr;
-	struct dapl_sp *sp_ptr;
-	struct dapl_evd *evd_ptr;
-	struct dapl_ep *ep_ptr;
-	boolean_t sp_found;
-	u32 dat_status = DAT_SUCCESS;
-
-	ia_ptr = (struct dapl_ia *)ia_handle;
-
-	dapl_dbg_log(DAPL_DBG_TYPE_CM,
-		     ">>> dapl_rsp_free conn_qual: %x EP: %p\n",
-		     conn_qual, ep_handle);
-
-	if (DAPL_BAD_HANDLE(ia_ptr, DAPL_MAGIC_IA)) {
-		dat_status =
-		    DAT_ERROR(DAT_INVALID_HANDLE, DAT_INVALID_HANDLE_IA);
-		goto bail;
-	}
-	if (DAPL_BAD_HANDLE(ep_handle, DAPL_MAGIC_EP)) {
-		dat_status =
-		    DAT_ERROR(DAT_INVALID_HANDLE, DAT_INVALID_HANDLE_EP);
-		goto bail;
-	}
-	if (DAPL_BAD_HANDLE(evd_handle, DAPL_MAGIC_EVD)) {
-		dat_status =
-		    DAT_ERROR(DAT_INVALID_HANDLE, DAT_INVALID_HANDLE_EVD_CR);
-		goto bail;
-	}
-
-	if (rsp_handle == NULL) {
-		dat_status = DAT_ERROR(DAT_INVALID_PARAMETER, DAT_INVALID_ARG5);
-		goto bail;
-	}
-
-	ep_ptr = (struct dapl_ep *)ep_handle;
-	if (ep_ptr->param.ep_state != DAT_EP_STATE_UNCONNECTED) {
-		dat_status =
-		    DAT_ERROR(DAT_INVALID_STATE, dapl_ep_state_subtype(ep_ptr));
-		goto bail;
-	}
-
-	evd_ptr = (struct dapl_evd *)evd_handle;
-	if (!(evd_ptr->evd_flags & DAT_EVD_CR_FLAG)) {
-		dat_status =
-		    DAT_ERROR(DAT_INVALID_HANDLE, DAT_INVALID_HANDLE_EVD_CR);
-		goto bail;
-	}
-
-	sp_ptr = dapl_ia_sp_search(ia_ptr, conn_qual, FALSE);
-	sp_found = TRUE;
-	if (sp_ptr == NULL) {
-		sp_found = FALSE;
-
-		/* Allocate RSP */
-		sp_ptr = dapl_sp_alloc(ia_ptr, FALSE);
-		if (sp_ptr == NULL) {
-			dat_status =
-			    DAT_ERROR(DAT_INSUFFICIENT_RESOURCES,
-				      DAT_RESOURCE_MEMORY);
-			goto bail;
-		}
-	}
-
-	/*
-	 * Fill out the RSP args
-	 */
-	sp_ptr->ia_handle = ia_handle;
-	sp_ptr->conn_qual = conn_qual;
-	sp_ptr->evd_handle = evd_handle;
-	sp_ptr->psp_flags = 0;
-	sp_ptr->ep_handle = ep_handle;
-
-	/*
-	 * Take a reference on the EVD handle
-	 */
-	atomic_inc(&evd_ptr->evd_ref_count);
-
-	/*
-	 * Update the EP state indicating the provider now owns it
-	 */
-	ep_ptr->param.ep_state = DAT_EP_STATE_RESERVED;
-
-	/* 
-	 * Set up a listener for a connection. Connections can arrive
-	 * even before this call returns!
-	 */
-	sp_ptr->state = DAPL_SP_STATE_RSP_LISTENING;
-	sp_ptr->listening = TRUE;
-
-	if (sp_found == FALSE) {
-		/* Link it onto the IA */
-		dapl_ia_link_rsp(ia_ptr, sp_ptr);
-
-		dat_status = dapl_ib_setup_conn_listener(ia_ptr, sp_ptr);
-
-		if (dat_status != DAT_SUCCESS) {
-			/*
-			 * Have a problem setting up the connection, something
-			 * wrong!  Decrements the EVD refcount & release it. Set 
-			 * the state to FREE, so we know the call failed.
-			 */
-			atomic_dec(&evd_ptr->evd_ref_count);
-			sp_ptr->evd_handle = NULL;
-			sp_ptr->state = DAPL_SP_STATE_FREE;
-			dapl_ia_unlink_sp(ia_ptr, sp_ptr);
-			dapl_sp_dealloc(sp_ptr);
-
-			dapl_dbg_log(DAPL_DBG_TYPE_CM,
-				     "--> dapl_rsp_create setup_conn_listener failed: %x\n",
-				     dat_status);
-
-			goto bail;
-		}
-	}
-
-	/*
-	 * Return handle to the user
-	 */
-	*rsp_handle = (DAT_RSP_HANDLE) sp_ptr;
-
-      bail:
-	return dat_status;
-}
diff -Nurp -X /home/tduffy/dontdiff linux-kernel-srq/dat-provider/dapl_rsp_free.c linux-kernel-rsp/dat-provider/dapl_rsp_free.c
--- linux-kernel-srq/dat-provider/dapl_rsp_free.c	2005-05-20 22:55:18.517008000 -0700
+++ linux-kernel-rsp/dat-provider/dapl_rsp_free.c	1969-12-31 16:00:00.000000000 -0800
@@ -1,133 +0,0 @@
-/*
- * Copyright (c) 2002-2005, Network Appliance, Inc. All rights reserved.
- *
- * This Software is licensed under one of the following licenses:
- *
- * 1) under the terms of the "Common Public License 1.0" a copy of which is
- *    available from the Open Source Initiative, see
- *    http://www.opensource.org/licenses/cpl.php.
- *
- * 2) under the terms of the "The BSD License" a copy of which is
- *    available from the Open Source Initiative, see
- *    http://www.opensource.org/licenses/bsd-license.php.
- *
- * 3) under the terms of the "GNU General Public License (GPL) Version 2" a
- *    copy of which is available from the Open Source Initiative, see
- *    http://www.opensource.org/licenses/gpl-license.php.
- *
- * Licensee has the right to choose one of the above licenses.
- *
- * Redistributions of source code must retain the above copyright
- * notice and one of the license notices.
- *
- * Redistributions in binary form must reproduce both the above copyright
- * notice, one of the license notices in the documentation
- * and/or other materials provided with the distribution.
- */
-
-/*
- * $Id: dapl_rsp_free.c 2433 2005-05-21 04:11:03Z jlentini $
- */
-
-#include "dapl.h"
-#include "dapl_sp_util.h"
-#include "dapl_ia_util.h"
-#include "dapl_openib_util.h"
-
-/*
- * dapl_rsp_free
- *
- * Destroy a specific instance of a Reserved Service Point.
- *
- * Input:
- *	rsp_handle
- *
- * Output:
- *	none
- *
- * Returns:
- *	DAT_SUCCESS
- *	DAT_INVALID_HANDLE
- */
-u32 dapl_rsp_free(DAT_RSP_HANDLE rsp_handle)
-{
-	struct dapl_ia *ia_ptr;
-	struct dapl_sp *sp_ptr;
-	struct dapl_ep *ep_ptr;
-	u32 dat_status = DAT_SUCCESS;
-
-	sp_ptr = (struct dapl_sp *)rsp_handle;
-	/*
-	 * Verify handle
-	 */
-	dapl_dbg_log(DAPL_DBG_TYPE_CM, ">>> dapl_rsp_free %p\n", rsp_handle);
-	if (DAPL_BAD_HANDLE(sp_ptr, DAPL_MAGIC_RSP)) {
-		dat_status =
-		    DAT_ERROR(DAT_INVALID_HANDLE, DAT_INVALID_HANDLE_RSP);
-		goto bail;
-	}
-
-	/* ia_ptr = (struct dapl_ia *)sp_ptr->header.owner_ia; */
-	ia_ptr = sp_ptr->header.owner_ia;
-
-	/*
-	 * Remove the connection listener if there are no connections.  If
-	 * we defer removing the sp it becomes something of a zombie
-	 * container until disconnection, after which it will be cleaned up.
-	 */
-	spin_lock_irqsave(&sp_ptr->header.lock, sp_ptr->header.flags);
-
-	/*
-	 * Make sure we don't leave a dangling EP. If the state is still
-	 * RESERVED then the RSP still owns it.
-	 */
-	ep_ptr = (struct dapl_ep *)sp_ptr->ep_handle;
-	if (ep_ptr != NULL && ep_ptr->param.ep_state == DAT_EP_STATE_RESERVED)
-		ep_ptr->param.ep_state = DAT_EP_STATE_UNCONNECTED;
-	sp_ptr->ep_handle = NULL;
-
-	/* Release reference on EVD. If an error was encountered in a previous
-	 * free the evd_handle will be NULL
-	 */
-	if (sp_ptr->evd_handle) {
-		atomic_dec(&((struct dapl_evd *)sp_ptr->evd_handle)->
-				   evd_ref_count);
-		sp_ptr->evd_handle = NULL;
-	}
-
-	/*
-	 * Release the base resource if there are no outstanding connections;
-	 * else the last disconnect on this RSP will free it up. The RSP
-	 * is used to contain CR records for each connection, which 
-	 * contain information necessary to disconnect.
-	 * sp_ptr->listening will be TRUE if there has never been a
-	 * connection event, and FALSE if a connection attempt resulted
-	 * in a reject.
-	 */
-	if (sp_ptr->cr_list_count == 0) {
-		/* This RSP has never been used. Clean it up */
-		sp_ptr->listening = FALSE;
-		sp_ptr->state = DAPL_SP_STATE_FREE;
-		spin_unlock_irqrestore(&sp_ptr->header.lock, 
-				       sp_ptr->header.flags);
-
-		dat_status = dapl_ib_remove_conn_listener(ia_ptr, sp_ptr);
-		if (dat_status != DAT_SUCCESS) {
-			sp_ptr->state = DAPL_SP_STATE_RSP_LISTENING;
-			goto bail;
-		}
-		dapl_ia_unlink_sp(ia_ptr, sp_ptr);
-		dapl_sp_dealloc(sp_ptr);
-	} else {
-		/* The RSP is now in the pending state, where it will sit until
-		 * the connection terminates or the app uses the same
-		 * ServiceID again, which will reactivate it.
-		 */
-		sp_ptr->state = DAPL_SP_STATE_RSP_PENDING;
-		spin_unlock_irqrestore(&sp_ptr->header.lock, 
-				       sp_ptr->header.flags);
-	}
-
-bail:
-	return dat_status;
-}
diff -Nurp -X /home/tduffy/dontdiff linux-kernel-srq/dat-provider/dapl_rsp_query.c linux-kernel-rsp/dat-provider/dapl_rsp_query.c
--- linux-kernel-srq/dat-provider/dapl_rsp_query.c	2005-05-20 22:55:18.990015000 -0700
+++ linux-kernel-rsp/dat-provider/dapl_rsp_query.c	1969-12-31 16:00:00.000000000 -0800
@@ -1,63 +0,0 @@
-/*
- * Copyright (c) 2002-2005, Network Appliance, Inc. All rights reserved.
- *
- * This Software is licensed under one of the following licenses:
- *
- * 1) under the terms of the "Common Public License 1.0" a copy of which is
- *    available from the Open Source Initiative, see
- *    http://www.opensource.org/licenses/cpl.php.
- *
- * 2) under the terms of the "The BSD License" a copy of which is
- *    available from the Open Source Initiative, see
- *    http://www.opensource.org/licenses/bsd-license.php.
- *
- * 3) under the terms of the "GNU General Public License (GPL) Version 2" a
- *    copy of which is available from the Open Source Initiative, see
- *    http://www.opensource.org/licenses/gpl-license.php.
- *
- * Licensee has the right to choose one of the above licenses.
- *
- * Redistributions of source code must retain the above copyright
- * notice and one of the license notices.
- *
- * Redistributions in binary form must reproduce both the above copyright
- * notice, one of the license notices in the documentation
- * and/or other materials provided with the distribution.
- */
-
-/*
- * $Id: dapl_rsp_query.c 2433 2005-05-21 04:11:03Z jlentini $
- */
-
-#include "dapl.h"
-
-u32 dapl_rsp_query(DAT_RSP_HANDLE rsp_handle, struct dat_rsp_param *rsp_param)
-{
-	struct dapl_sp *sp_ptr;
-	u32 status;
-
-	if (DAPL_BAD_HANDLE(rsp_handle, DAPL_MAGIC_RSP)) {
-		status = DAT_ERROR(DAT_INVALID_HANDLE, DAT_INVALID_HANDLE_RSP);
-		goto bail;
-	}
-
-	if (NULL == rsp_param) {
-		status = DAT_ERROR(DAT_INVALID_PARAMETER, DAT_INVALID_ARG3);
-		goto bail;
-	}
-
-	sp_ptr = (struct dapl_sp *)rsp_handle;
-
-	/*
-	 * Fill in the RSP params
-	 */
-	rsp_param->ia_handle = sp_ptr->ia_handle;
-	rsp_param->conn_qual = sp_ptr->conn_qual;
-	rsp_param->evd_handle = sp_ptr->evd_handle;
-	rsp_param->ep_handle = sp_ptr->ep_handle;
-
-	status = DAT_SUCCESS;
-
-bail:
-	return status;
-}
diff -Nurp -X /home/tduffy/dontdiff linux-kernel-srq/dat-provider/Makefile linux-kernel-rsp/dat-provider/Makefile
--- linux-kernel-srq/dat-provider/Makefile	2005-05-25 14:48:11.375001000 -0700
+++ linux-kernel-rsp/dat-provider/Makefile	2005-05-25 15:01:00.683014000 -0700
@@ -77,9 +77,7 @@ PROVIDER_MODULES := \
         dapl_pz                         \
         dapl_ring_buffer_util         	\
         dapl_rmr                 	\
-        dapl_rsp_create               	\
-        dapl_rsp_free                 	\
-        dapl_rsp_query                	\
+        dapl_rsp 	              	\
         dapl_set_consumer_context     	\
         dapl_sp_util                  	\
         dapl_srq                 	\
diff -Nurp -X /home/tduffy/dontdiff linux-kernel-srq/patches/alt_dat_provider_makefile linux-kernel-rsp/patches/alt_dat_provider_makefile
--- linux-kernel-srq/patches/alt_dat_provider_makefile	2005-05-25 14:49:44.866002000 -0700
+++ linux-kernel-rsp/patches/alt_dat_provider_makefile	2005-05-25 14:53:43.453015000 -0700
@@ -71,9 +71,7 @@ PROVIDER_MODULES := \
         dapl_pz                  	\
         dapl_ring_buffer_util         	\
         dapl_rmr                        \
-        dapl_rsp_create               	\
-        dapl_rsp_free                 	\
-        dapl_rsp_query                	\
+        dapl_rsp                	\
         dapl_set_consumer_context     	\
         dapl_sp_util                  	\
         dapl_srq                 	\




More information about the general mailing list