net/qede: accept bigger RSS table
authorIgor Russkikh <irusskikh@marvell.com>
Fri, 19 Mar 2021 09:46:56 +0000 (10:46 +0100)
committerJerin Jacob <jerinj@marvell.com>
Mon, 22 Mar 2021 14:53:07 +0000 (15:53 +0100)
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.

Fix it by making qede accept any size rss_key. For larger key
tables we just crop it with notice trace message.

Cc: stable@dpdk.org
Signed-off-by: Igor Russkikh <irusskikh@marvell.com>
Acked-by: Rasesh Mody <rmody@marvell.com>
drivers/net/qede/qede_ethdev.c

index ab5f5b1..bfd38a9 100644 (file)
@@ -2139,8 +2139,10 @@ 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 too big, trimmed to %d\n",
+                                         len);
                        }
                        DP_INFO(edev, "Applying user supplied hash key\n");
                        rss_params.update_rss_key = 1;