[openib-general] [PATCH] ib_cm: fix REJ due to invalid GID

Michael S. Tsirkin mst at mellanox.co.il
Wed Jul 19 00:43:27 PDT 2006


Quoting r. Sean Hefty <sean.hefty at intel.com>:
> Subject: [PATCH] ib_cm: fix REJ due to invalid GID
> 
> The following patch should set the reject code properly when
> rejecting a request that contains an invalid GID.  A suitable
> GID is returned by the IB CM in the additional reject information
> (ARI).
> 
> Signed-off-by: Sean Hefty <sean.hefty at intel.com>
> ---
> Index: cm.c
> ===================================================================
> --- cm.c	(revision 8484)
> +++ cm.c	(working copy)
> @@ -1372,12 +1372,23 @@ static int cm_req_handler(struct cm_work
>  
>  	cm_format_paths_from_req(req_msg, &work->path[0], &work->path[1]);
>  	ret = cm_init_av_by_path(&work->path[0], &cm_id_priv->av);
> -	if (ret)
> +	if (ret) {
> +		ib_get_cached_gid(work->port->cm_dev->device,
> +				  work->port->port_num, 0, &work->path[0].sgid);
> +		cm_issue_rej(work->port, work->mad_recv_wc,
> +			     IB_CM_REJ_INVALID_GID, CM_MSG_RESPONSE_REQ,
> +			     &work->path[0].sgid, sizeof work->path[0].sgid);
>  		goto error3;
> +	}

Should we be worried that this also sends IB_CM_REJ_INVALID_GID if
find_cached_pkey fails?

-- 
MST




More information about the general mailing list