[ofa-general] Re: [PATCH] libmlx4: fix adjustments for minimum qp capabilities in mlx4_create_qp

Roland Dreier rdreier at cisco.com
Thu Jun 21 13:17:15 PDT 2007


 > Need to adjust minimum qp capability values prior to size and max resource
 > calculations.

Is this actually fixing a problem?  I don't see how it could make a difference:

 > +	attr->cap.max_recv_wr = attr->cap.max_recv_wr ? attr->cap.max_recv_wr : 1;

align_queue_size() always returns at least 1 so I don't see why this matters.

 > +	attr->cap.max_recv_sge = attr->cap.max_recv_sge ? attr->cap.max_recv_sge : 1;

I don't see anything that uses max_recv_sge before it gets set in the
current code.

 > +	attr->cap.max_send_wr = attr->cap.max_send_wr ? attr->cap.max_send_wr : 1;

If max_send_wr is 0 then the call to align_queue_size will always add
at least one more WQE because sq_spare_wqes will never be a power of 2.

 > +	attr->cap.max_send_sge = attr->cap.max_send_sge ? attr->cap.max_send_sge : 1;

mlx4_calc_sq_wqe_size() will always end up with at least a 64-byte WQE
size so does this matter?  Oh, I guess a UD QP could end up with 0
send gather entries, but I'm not sure that's a big deal -- after all,
the user gets what he asked for, and the HW shouldn't be bothered,
should it?

 - R.



More information about the general mailing list