[PATCH 3/3] net/mlx5: fix missing adjustment MPRQ stride devargs

Ferruh Yigit ferruh.yigit at intel.com
Wed Dec 8 15:00:45 CET 2021


On 12/8/2021 12:52 PM, Michael Baum wrote:
> 
> On 12/07/2021 3:41 PM, ferruh.yigit at intel.com wrote:
>>
>> On 11/23/2021 6:38 PM, michaelba at nvidia.com wrote:
>>> From: Michael Baum<michaelba at nvidia.com>
>>>
>>> In Multy-Packet RQ creation, the user can choose the number of strides
>>
>> Multi-Packet ?
> 
> Yes, you're right. It should have been Multi-Packet, thank you for that.
> 
>>
>>> and their size in bytes. The user updates it using specific devargs
>>> for both of these parameters.
>>> The above two parameters determine the size of the WQE which is
>>> actually their product of multiplication.
>>>
>>> If the user selects values that are not in the supported range, the
>>> PMD changes them to default values. However, apart from the range
>>> limitations for each parameter individually there is also a minimum
>>> value on their multiplication. When the user selects values that their
>>> multiplication are lower than minimum value, no adjustment is made and
>>> the creation of the WQE fails.
>>>> This patch adds an adjustment in these cases as well. When the user
>>> selects values whose multiplication is lower than the minimum, they
>>> are replaced with the default values.
>>>
>>> Fixes: ecb160456aed ("net/mlx5: add device parameter for MPRQ stride
>>> size") Cc:stable at dpdk.org
>>>
>>
>> Again, not sure if we can backport this patch, this looks a behavior change
>> more than a fix.
>>
>> Previously if the user provided values ends up being invalid, PMD seems
>> returning error.
>> With this patch, instead of returning error PMD prefers to use default values
>> and doesn't return error.
> 
> It isn't behavior change.
> It existed before, except that it is concentrated into one function.
> 
>>
>> I am not sure if it is correct thing to ignore (adjust) user provided values, but
>> that can be up to the PMD as long as the behavior is documented.
> 
> Adjustment is the likely thing to do because the range depends on the device and the user does not necessarily know it.
> This behavior is documented here https://doc.dpdk.org/guides/nics/mlx5.html#run-time-configuration (Run-time configuration -> Driver options -> mprq_log_stride_num/size)
> 

It is documented that adjustments will be done if any specific argument
is not in the range of the device capability.

It is not clear what will happen if the calculated value from both variables
are not valid.
If it is not documented before, and previously it was returning error,
now adjusting values to make it work looks like behavior change to me.

This is more of a process question, than technical detail in the driver,
so @Luca, @Kevin, @Christian, can you please comment? I will follow your
suggestion.


>>
>> But I think it is wrong to backport the behavior change.
>>
>>> Signed-off-by: Michael Baum<michaelba at nvidia.com>
>>> Acked-by: Matan Azrad<matan at nvidia.com>
>>> ---
> 



More information about the stable mailing list