On Mon, 1 Nov 2004 15:01:26 -0800
Shirley Ma <[EMAIL PROTECTED]> wrote:

> I am using my unix account to send the patch. Hope it works.
> 
> diff -urN access/mad.c access.patch2/mad.c
> --- access/mad.c      2004-11-01 14:51:41.356902216 -0800
> +++ access.patch2/mad.c       2004-11-01 14:53:37.003321288 -0800
> @@ -368,16 +368,15 @@
>       struct ib_mad_agent_private     *mad_agent_priv;
>       struct ib_mad_port_private      *port_priv;
>  
> -     cur_send_wr = send_wr;
>       /* Validate supplied parameters */
>       if (!mad_agent || !send_wr) {
> -             *bad_send_wr = cur_send_wr;
> +             *bad_send_wr = send_wr;
>               return -EINVAL;
>       }
>  
>       if (!mad_agent->send_handler ||
>           (send_wr->wr.ud.timeout_ms && !mad_agent->recv_handler)) {
> -             *bad_send_wr = cur_send_wr;
> +             *bad_send_wr = send_wr;
>               return -EINVAL;
>       }

Patch looks good to me, and should be applied

It raises an issue with the current code, though.  There are checks for
a valid mad_agent, valid_wr, but not a valid *bad_send_wr.  I'm
wondering if we should convert these checks to BUG_ON, or add in a check
for a *bad_send_wr.  As a minor optimization, we could make bad_send_wr
optional for cases where only a single work request is being posted.

- Sean
_______________________________________________
openib-general mailing list
[EMAIL PROTECTED]
http://openib.org/mailman/listinfo/openib-general

To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general

Reply via email to