[openib-general] Re: [PATCH] uDAPL openib_cma: fixed address bindings, getaddrinfo, and added debug messages for rejects

James Lentini jlentini at netapp.com
Thu Apr 27 12:57:56 PDT 2006



On Wed, 26 Apr 2006, Arlin Davis wrote:
<snip>
> Index: dapl/openib_cma/dapl_ib_cm.c
> ===================================================================
> --- dapl/openib_cma/dapl_ib_cm.c	(revision 6672)
> +++ dapl/openib_cma/dapl_ib_cm.c	(working copy)
<snip>
> @@ -343,13 +356,58 @@ static void dapli_cm_passive_cb(struct d
>  				 	  event->private_data, new_conn->sp);
>  		break;
>  	case RDMA_CM_EVENT_UNREACHABLE:
> +		dapls_cr_callback(conn, IB_CME_DESTINATION_UNREACHABLE,
> +				 NULL, conn->sp);
> +
>  	case RDMA_CM_EVENT_CONNECT_ERROR:
> +
> +		dapl_dbg_log(
> +			DAPL_DBG_TYPE_WARN,
> +			" dapli_cm_passive_handler: CONN_ERR "
> +			" event=0x%x status=%d\n",
> +			event->event, event->status );
> +
> +		dapl_dbg_log(
> +			DAPL_DBG_TYPE_WARN, 
> +			" dapli_cm_passive_handler: CONN_ERR "
> +			" on SRC 0x%x,0x%x DST 0x%x,0x%x \n", 
> +			ntohl(((struct sockaddr_in *)
> +				&ipaddr->src_addr)->sin_addr.s_addr),
> +			ntohs(((struct sockaddr_in *)
> +				&ipaddr->src_addr)->sin_port),
> +			ntohl(((struct sockaddr_in *)
> +				&ipaddr->dst_addr)->sin_addr.s_addr),
> +			ntohs(((struct sockaddr_in *)
> +				&ipaddr->dst_addr)->sin_port)
> +			 );
> +
>  		dapls_cr_callback(conn, IB_CME_DESTINATION_UNREACHABLE,
>  				 NULL, conn->sp);
>  		break;

Why not combine these two into a signel dapl_dbg_log call?

> +
>  	case RDMA_CM_EVENT_REJECTED:
> -		dapls_cr_callback(conn, IB_CME_DESTINATION_REJECT, NULL,
> -				 conn->sp);
> +
> +		dapl_dbg_log(
> +			DAPL_DBG_TYPE_WARN,
> +			" dapli_cm_passive_handler: REJECTED reason=%d\n",	
> +			event->status);
> +
> +		dapl_dbg_log(
> +			DAPL_DBG_TYPE_WARN, 
> +			" dapli_cm_passive_handler: REJECTED "
> +			" on SRC 0x%x,0x%x DST 0x%x,0x%x \n", 
> +			ntohl(((struct sockaddr_in *)
> +				&ipaddr->src_addr)->sin_addr.s_addr),
> +			ntohs(((struct sockaddr_in *)
> +				&ipaddr->src_addr)->sin_port),
> +			ntohl(((struct sockaddr_in *)
> +				&ipaddr->dst_addr)->sin_addr.s_addr),
> +			ntohs(((struct sockaddr_in *)
> +				&ipaddr->dst_addr)->sin_port)
> +			 );
> +
> +		dapls_cr_callback(conn, IB_CME_DESTINATION_REJECT, 
> +				  NULL, conn->sp);
>  		break;
>  	case RDMA_CM_EVENT_ESTABLISHED:
>  		

ditto



More information about the general mailing list