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

Ferruh Yigit ferruh.yigit at amd.com
Wed Oct 11 20:00:02 CEST 2023


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()' ?


More information about the dev mailing list