[rds-devel] IB/rds: suggested minor code change

Andy Grover andy.grover at oracle.com
Fri Dec 5 18:16:27 PST 2008


Ralph Campbell wrote:
> rdsdebug() prints the current function name so it doesn't need
> to be in the format string a second time.
> 
> rdma_disconnect() will put the QP into the error state if
> the transport is an IB connection so it is not necessary
> for RDS to do this a second time.
> 
> Signed-off-by: Ralph Campbell <ralph.campbell at qlogic.com>
> 
> --- ib_cm.c.old	2008-12-01 17:52:58.000000000 -0800
> +++ ib_cm.c	2008-12-05 17:15:46.832910000 -0800
> @@ -711,25 +711,8 @@ void rds_ib_conn_shutdown(struct rds_con
>  			/* Actually this may happen quite frequently, when
>  			 * an outgoing connect raced with an incoming connect.
>  			 */
> -			rdsdebug("rds_ib_conn_shutdown: failed to disconnect,"
> -				   " cm: %p err %d\n", ic->i_cm_id, err);
> -		}
> -
> -		/* For IB, we have to move the QP to error state.
> -		 * This is not needed for iWARP */
> -		if (ic->i_cm_id->qp && !ic->i_iwarp) {
> -			qp_attr.qp_state = IB_QPS_ERR;
> -			err = ib_modify_qp(ic->i_cm_id->qp, &qp_attr, IB_QP_STATE);
> -			if (err) {
> -				printk(KERN_WARNING "rds_ib_conn_shutdown: failed to"
> -					   " modify QP to ERR state: id %p qp %p err %d\n",
> -					   ic->i_cm_id, ic->i_cm_id->qp, err);
> -
> -				while (!rds_ib_ring_empty(&ic->i_send_ring))
> -					rds_ib_ring_unalloc(&ic->i_send_ring, 1);
> -				while (!rds_ib_ring_empty(&ic->i_recv_ring))
> -					rds_ib_ring_unalloc(&ic->i_recv_ring, 1);
> -			}
> +			rdsdebug("failed to disconnect, cm: %p err %d\n",
> +				 ic->i_cm_id, err);
>  		}
>  
>  		wait_event(rds_ib_ring_empty_wait,
> 
> 
> 
> _______________________________________________
> rds-devel mailing list
> rds-devel at oss.oracle.com
> http://oss.oracle.com/mailman/listinfo/rds-devel
> 

(CCing list)

Thanks, applied.

Regards -- Andy



More information about the rds-devel mailing list