[openib-general] Re: [PATCH] handle QP0/1 send queue overrun
Hal Rosenstock
halr at voltaire.com
Wed Nov 10 14:20:39 PST 2004
On Wed, 2004-11-10 at 16:30, Sean Hefty wrote:
> Hal Rosenstock wrote:
> > 1. Why was BUG_ON removed from dequeue_mad ?
>
> That can be put back. I removed queue_mad, and was going to remove
> dequeue_mad, but decided to leave it.
I added this back in.
> > 2. A couple of questions related to send_wr->num_sge checking.
> > a. Should this be pushed down to mthca and detected there rather than at
> > the MAD layer ?
> > b. If it is to stay at the MAD layer, shouldn't there be a check inside
> > the while (send_wr) loop rather than above it ?
>
> I put this check in the MAD layer, since it may be more restrictive than
> what mthca provides. Looking at that part of the code, we can push the
> check to mthca by making the following changes:
>
> Move sg_list[] in ib_mad_send_wr_private to the end of the structure.
> Change the sg_list array size from IB_MAD_SEND_REQ_MAX_SG to 1.
> Change the kmalloc in ib_post_send_mad() to use sizeof *mad_send_wr +
> sizeof *mad_send_wr->sg_list * (send_wr->num_sge - 1)
>
> You are correct that the check needs to be within the while loop if it
> remains in the MAD code.
I made the above changes by hand (moving the check down for at least the
time being).
Thanks! Applied.
(Nice work).
-- Hal
More information about the general
mailing list