[openib-general] Re: [PATCH] handle QP0/1 send queue overrun

Sean Hefty mshefty at ichips.intel.com
Wed Nov 10 13:30:13 PST 2004


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.

> 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.

- Sean



More information about the general mailing list