[openib-general] Re: [PATCH] mthca: fix max wr for arbel

Michael S. Tsirkin mst at mellanox.co.il
Wed Nov 30 09:38:14 PST 2005


Quoting r. Roland Dreier <rolandd at cisco.com>:
> Subject: Re: [PATCH] mthca: fix max wr for arbel
> 
>     Michael> Unlike tavor, max QP/SRQ size is a power of 2 for arbel
>     Michael> mode, despite what the documentation (of the query dev
>     Michael> lim command) says.  Without this patch, on Arbel, we can
>     Michael> start with a qp of a legal size and get above the device
>     Michael> limit after rounding to the next power of two.
> 
> This looks fine but I'm a little confused by the explanation.  If the
> firmware reports a limit of say 14, then the current code will turn
> that into a limit of 16383 work queue entries, but the actual hardware
> limit is 16384 entries.
> 
> So the code in mthca_set_qp_size() will reject attempts to create a QP
> with more than 16383 entries.  If someone tries to create a QP with
> more than 8192 entries, the size will get rounded up to 16384, which
> will still work with the hardware.

Yes but if you the try to use the attribute that you get from creating
this qp to create a new qp, you get an error, since the driver checks
the device limits first thing.

> 
> Or did you just mean that sometimes a QP will be created with a size
> bigger than the limit reported by the driver?  I agree that's not
> ideal but it doesn't seem to be a major problem.
> 
>  - R.
> 

I dont claim its a major problem, but its a bit ugly and the fix is easy.

MST

-- 
MST



More information about the general mailing list