[PATCH v5] common/sfc_efx/base: fix Rx queue creation without RSS hash prefix

Artemii Morozov Artemii.Morozov at arknetworks.am
Thu Jun 22 15:52:51 CEST 2023


On 6/22/23 17:13, Ferruh Yigit wrote:
> On 6/22/2023 1:31 PM, Artemii Morozov wrote:
>> If the prefix for the RSS hash was not chosen the ENOTSUP error should
>> be returned.
>>
>> Before this patch success was returned for this case causing Rx queue
>> creation to fail.
>>
>> Fixing return value to indicate failure.
>>
> It looks like you used sample commit log as it is, so can you please
> confirm this is the actual case (because this was my assumption without
> really knowing the actual problem), problem is not crash or undefined
> behavior because of 'erpp' was not set etc..?
The main problem is that if the RSS prefix was requested and an error 
occurred when creating the Rx queue, then this is ignored. Now the 
commit message reflects this.
>
>> Fixes: f784cdc5cbb1 ("common/sfc_efx/base: provide control to deliver RSS hash")
>> Cc: stable at dpdk.org
>>
>> Signed-off-by: Artemii Morozov <artemii.morozov at arknetworks.am>
>> Reviewed-by: Andy Moreton <amoreton at xilinx.com>
>> Acked-by: Andrew Rybchenko <andrew.rybchenko at oktetlabs.ru>
>> ---
>> v5: update commit message
>>
>> v4: add Cc: stable at dpdk.org and transform rss to RSS
>>    
>> v3: update commit log as fix commit
>>
>> v2: don't use capital letters in email
>>
>>   drivers/common/sfc_efx/base/efx_rx.c | 4 +++-
>>   1 file changed, 3 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/common/sfc_efx/base/efx_rx.c b/drivers/common/sfc_efx/base/efx_rx.c
>> index 68f42f5cac..61726a9f0b 100644
>> --- a/drivers/common/sfc_efx/base/efx_rx.c
>> +++ b/drivers/common/sfc_efx/base/efx_rx.c
>> @@ -937,8 +937,10 @@ efx_rx_qcreate_internal(
>>   
>>   		rss_hash_field =
>>   		    &erplp->erpl_fields[EFX_RX_PREFIX_FIELD_RSS_HASH];
>> -		if (rss_hash_field->erpfi_width_bits == 0)
>> +		if (rss_hash_field->erpfi_width_bits == 0) {
>> +			rc = ENOTSUP;
>>   			goto fail5;
>> +		}
>>   	}
>>   
>>   	enp->en_rx_qcount++;


More information about the stable mailing list