[PATCH v5 26/40] net/mvpp2: check RSS hash algorithms

Jie Hai haijie1 at huawei.com
Thu Oct 12 04:21:29 CEST 2023


On 2023/10/12 2:00, Ferruh Yigit wrote:
> On 10/11/2023 10:27 AM, Jie Hai wrote:
>> A new field 'algorithm' has been added to rss_conf, check it
>> in case of ignoring unsupported values.
>>
>> Signed-off-by: Jie Hai <haijie1 at huawei.com>
>> ---
>>   drivers/net/mvpp2/mrvl_ethdev.c | 3 +++
>>   1 file changed, 3 insertions(+)
>>
>> diff --git a/drivers/net/mvpp2/mrvl_ethdev.c b/drivers/net/mvpp2/mrvl_ethdev.c
>> index 359a5d1df7ab..817153af2ef1 100644
>> --- a/drivers/net/mvpp2/mrvl_ethdev.c
>> +++ b/drivers/net/mvpp2/mrvl_ethdev.c
>> @@ -440,6 +440,9 @@ mrvl_configure_rss(struct mrvl_priv *priv, struct rte_eth_rss_conf *rss_conf)
>>   	if (rss_conf->rss_key)
>>   		MRVL_LOG(WARNING, "Changing hash key is not supported");
>>   
>> +	if (rss_conf->algorithm != RTE_ETH_HASH_FUNCTION_DEFAULT)
>> +		return -EINVAL;
>> +
>>   	if (rss_conf->rss_hf == 0) {
>>   		priv->ppio_params.inqs_params.hash_type = PP2_PPIO_HASH_T_NONE;
>>   	} else if (rss_conf->rss_hf & RTE_ETH_RSS_IPV4) {
> 
> what about updating 'mrvl_dev_configure()' ?
> .
Hi, Ferruh Yigit,

Both mrvl_dev_configure() and mrvl_rss_hash_update() calls 
mrvl_configure_rss(), I update this for less code.
It may be clearer to verify the two separately.
Will change.

Thanks,
Jie Hai


More information about the dev mailing list