[ofa-general] Re: [PATCH 5 of 5] mlx4: Do not allocate an extra (unneeded) CQE when creating a CQ

Jack Morgenstein jackm at dev.mellanox.co.il
Mon Oct 29 23:26:21 PDT 2007


On Tuesday 30 October 2007 07:09, Roland Dreier wrote:
> I'm missing something with this patch set... 
> 
>  > Leave create_cq for userspace CQs as before, to avoid breaking ABI.
>  > (Handle this in separate libmlx4 patch)
> 
> You don't want to break the ABI, which is very good.  But...
> 
>  > -	dev->caps.max_cqes	     = dev_cap->max_cq_sz - 1;
>  > +	dev->caps.max_cqes	     = dev_cap->max_cq_sz;
> 
> Unless I'm confused, this will lead to userspace seeing a larger limit
> for the max number of CQEs.  Which will mean that an old libmlx4 will
> fail to create a CQ if the consumer asks for the largest possible CQ, right?
> 
You are correct, that is an unfortunate side-effect of the change, that
I missed. The largest CQ that an old libmlx4 will accept is 0x3fffff
(hard-coded in file libmlx4/src/verbs.c, procedure mlx4_create_cq() ).
The new limit returned in dev_lim is 0x400000.

Does this mean that you prefer to increment the ABI?

- Jack



More information about the general mailing list