patches for DPDK stable branches
 help / color / mirror / Atom feed
From: Igor Russkikh <irusskikh@marvell.com>
To: <dev@dpdk.org>
Cc: Rasesh Mody <rmody@marvell.com>,
	Devendra Singh Rawat <dsinghrawat@marvell.com>,
	Igor Russkikh <irusskikh@marvell.com>, <stable@dpdk.org>
Subject: [dpdk-stable] [PATCH 2/2] qede: make driver accept bigger rss tables
Date: Sun, 21 Feb 2021 12:16:37 +0100	[thread overview]
Message-ID: <20210221111637.31193-3-irusskikh@marvell.com> (raw)
In-Reply-To: <20210221111637.31193-1-irusskikh@marvell.com>

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@dpdk.org
Signed-off-by: Igor Russkikh <irusskikh@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");
 			}
 			DP_INFO(edev, "Applying user supplied hash key\n");
 			rss_params.update_rss_key = 1;
-- 
2.25.1


  parent reply	other threads:[~2021-02-21 11:16 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20210221111637.31193-1-irusskikh@marvell.com>
2021-02-21 11:16 ` [dpdk-stable] [PATCH 1/2] qede: reduce trace verbosity level Igor Russkikh
2021-03-11  9:13   ` Devendra Singh Rawat
2021-02-21 11:16 ` Igor Russkikh [this message]
2021-03-08 19:02   ` [dpdk-stable] [dpdk-dev] [PATCH 2/2] qede: make driver accept bigger rss tables Jerin Jacob
2021-03-11  9:28   ` [dpdk-stable] " Devendra Singh Rawat
2021-03-19  9:48     ` Igor Russkikh
2021-03-22  5:22       ` Devendra Singh Rawat

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210221111637.31193-3-irusskikh@marvell.com \
    --to=irusskikh@marvell.com \
    --cc=dev@dpdk.org \
    --cc=dsinghrawat@marvell.com \
    --cc=rmody@marvell.com \
    --cc=stable@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).