[dpdk-stable] [PATCH 2/2] qede: make driver accept bigger rss tables

Devendra Singh Rawat dsinghrawat at marvell.com
Thu Mar 11 10:28:52 CET 2021



> -----Original Message-----
> From: Igor Russkikh <irusskikh at marvell.com>
> Sent: Sunday, February 21, 2021 4:47 PM
> To: dev at dpdk.org
> Cc: Rasesh Mody <rmody at marvell.com>; Devendra Singh Rawat
> <dsinghrawat at marvell.com>; Igor Russkikh <irusskikh at marvell.com>;
> stable at dpdk.org
> Subject: [PATCH 2/2] qede: make driver accept bigger rss tables
> 
> We found some dpdk applications blindly pass fixed side rss hash tables, and
> do not check driver/device capabilities.
> 
> Moreover, many other drivers do not do such a strong check as well.
> 
> So here we fix it, making qede accept any size rss_key. For larger key tables we
> just crop it with notice trace message.
> 
> CC: stable at dpdk.org
> Signed-off-by: Igor Russkikh <irusskikh at marvell.com>
> ---
>  drivers/net/qede/qede_ethdev.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/net/qede/qede_ethdev.c b/drivers/net/qede/qede_ethdev.c
> index ab5f5b106..7363d98f2 100644
> --- a/drivers/net/qede/qede_ethdev.c
> +++ b/drivers/net/qede/qede_ethdev.c
> @@ -2139,8 +2139,8 @@ int qede_rss_hash_update(struct rte_eth_dev
> *eth_dev,
>  		/* RSS hash key */
>  		if (key) {
>  			if (len > (ECORE_RSS_KEY_SIZE * sizeof(uint32_t))) {
> -				DP_ERR(edev, "RSS key length exceeds
> limit\n");
> -				return -EINVAL;
> +				len = ECORE_RSS_KEY_SIZE * sizeof(uint32_t);
> +				DP_NOTICE(edev, false, "RSS key length
> exceeds limit\n");

IMO, it will be better if the log message also states that RSS key is trimmed to 'len' size.

Thanks,
Devendra


More information about the stable mailing list