[ofa-general] Re: [ewg] [PATCH] libibverbs - return valid bad_wr from ibv_cmd_post_send()

Dotan Barak dotanb at dev.mellanox.co.il
Mon Nov 12 22:23:06 PST 2007


Hi.

I believe that the same bug exactly exists in ibv_cmd_post_recv and 
ibv_post_srq_recv.

thanks
Dotan



Ralph Campbell wrote:
> There are error cases in ib_uverbs_post_send() where the return
> value is negative (i.e., an error) and yet a non-zero resp.bad_wr
> is not written back to ibv_cmd_post_send().  In this case,
> ibv_cmd_post_send() should still set the bad_wr pointer.
>
> It seems to me that this should go into OFED 1.3.
> I will leave the mechanics of how that happens to Roland and Vlad.
>
> Signed-off-by: Ralph Campbell <ralph.campbell at qlogic.com>
>
> diff --git a/src/cmd.c b/src/cmd.c
> index 6d4331f..305e263 100644
> --- a/src/cmd.c
> +++ b/src/cmd.c
> @@ -884,7 +884,8 @@ int ibv_cmd_post_send(struct ibv_qp *ibqp, struct ibv_send_wr *wr,
>  		while (--wr_count)
>  			i = i->next;
>  		*bad_wr = i;
> -	}
> +	} else if (ret)
> +		*bad_wr = wr;
>  
>  	return ret;
>  }
>
>
> _______________________________________________
> ewg mailing list
> ewg at lists.openfabrics.org
> http://lists.openfabrics.org/cgi-bin/mailman/listinfo/ewg
>
>   




More information about the general mailing list