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

Arne Redlich arne.redlich at xiranet.com
Wed Jul 19 00:46:07 PDT 2006


Am Dienstag, den 18.07.2006, 15:09 -0700 schrieb Sean Hefty:
> 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;

Won't this lead to a second REJ (IB_CM_REJ_CONSUMER_DEFINED) being
issued by cm_destroy_id()? That's actually what I tried to prevent using
the "reject" param.

Arne
-- 
Arne Redlich
Xiranet Communications GmbH





More information about the general mailing list