Re: Can someone help me understand the reason for this code in ib_isert.c?

Or Gerlitz
2014-10-28T10:06:06Z

On 10/26/2014 4:08 PM, Eli Cohen wrote:
> On Sun, Oct 26, 2014 at 01:57:33PM +0100, Bart Van Assche wrote:
>> Applications really need a way to query what the maximum supported
>> number of scatter/gather entries per work request is. The current
>> approach, namely using "dev_attr.max_sge - <magic value>" is
>> cumbersome since this approach doesn't work if the value of max_sge
>> reported by the HCA is small. I see two possible solutions: either
>> modify the max_sge value reported by the mlx4 and mlx5 drivers or
>> introduce a new parameter in struct ib_device_attr.
>>
> we already have reported max_sge value. Maybe what we need is another
> field, "guarnateed_num_sge" so applicatios providing this value can be
> sure it would succeed (or there is some other problem). Then they can
> either use this value or iterate from max_sge down to
> guarnateed_num_sge to find the highest possible value.
>
Eli, can we be a bit more restrictive and report something which would
work?