[openib-general] [PATCH] ofed_1-2 IWCM - Set iniator depth and responder resources to device max values.

Steve Wise swise at opengridcomputing.com
Mon Feb 12 08:20:07 PST 2007


BTW:  We need this for the alpha1 build or DAPL applications won't work
over iWARP devices.

Steve.

On Sun, 2007-02-11 at 13:58 -0600, Steve WIse wrote:
> IWCM - Set initiator depth and responder resources to device max values.
> 
> For OFED 1.2, the IWCM will set the initiator depth and responder
> resources to the device max values for new connect request events.
> 
>     
> Signed-off-by: Steve Wise <swise at opengridcomputing.com>
> ---
> 
>  kernel_patches/fixes/iwcm_ordird.patch |   43 ++++++++++++++++++++++++++++++++
>  1 files changed, 43 insertions(+), 0 deletions(-)
> 
> diff --git a/kernel_patches/fixes/iwcm_ordird.patch b/kernel_patches/fixes/iwcm_ordird.patch
> new file mode 100644
> index 0000000..3a9f643
> --- /dev/null
> +++ b/kernel_patches/fixes/iwcm_ordird.patch
> @@ -0,0 +1,43 @@
> +commit 7175034c7adf6b5fb5ba311929376af7501387a1
> +Author: Steve Wise <swise at opengridcomputing.com>
> +Date:   Sat Feb 10 14:16:35 2007 -0600
> +
> +    IWCM - Set iniator depth and responder resources to device max values.
> +    
> +    For OFED 1.2, the IWCM will set the initiator depth and responder
> +    resources to the device max values for new connect request events.
> +    
> +    Signed-off-by: Steve Wise <swise at opengridcomputing.com>
> +
> +diff --git a/drivers/infiniband/core/cma.c b/drivers/infiniband/core/cma.c
> +index 9e0ab04..e3afdf8 100644
> +--- a/drivers/infiniband/core/cma.c
> ++++ b/drivers/infiniband/core/cma.c
> +@@ -1137,6 +1137,7 @@ static int iw_conn_req_handler(struct iw
> + 	struct net_device *dev = NULL;
> + 	struct rdma_cm_event event;
> + 	int ret;
> ++	struct ib_device_attr attr;
> + 
> + 	listen_id = cm_id->context;
> + 	atomic_inc(&listen_id->dev_remove);
> +@@ -1189,10 +1190,19 @@ static int iw_conn_req_handler(struct iw
> + 	sin = (struct sockaddr_in *) &new_cm_id->route.addr.dst_addr;
> + 	*sin = iw_event->remote_addr;
> + 
> ++	ret = ib_query_device(conn_id->id.device, &attr);
> ++	if (ret) {
> ++		cma_release_remove(conn_id);
> ++		rdma_destroy_id(new_cm_id);
> ++		goto out;
> ++	}
> ++	
> + 	memset(&event, 0, sizeof event);
> + 	event.event = RDMA_CM_EVENT_CONNECT_REQUEST;
> + 	event.param.conn.private_data = iw_event->private_data;
> + 	event.param.conn.private_data_len = iw_event->private_data_len;
> ++	event.param.conn.initiator_depth = attr.max_qp_init_rd_atom;	
> ++	event.param.conn.responder_resources = attr.max_qp_rd_atom;
> + 	ret = conn_id->id.event_handler(&conn_id->id, &event);
> + 	if (ret) {
> + 		/* User wants to destroy the CM ID */
> 
> 
> _______________________________________________
> openib-general mailing list
> openib-general at openib.org
> http://openib.org/mailman/listinfo/openib-general
> 
> To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general
> 





More information about the general mailing list