From: Thierry Herbelot <thierry.herbelot@6wind.com>
To: dev@dpdk.org
Cc: Thierry Herbelot <thierry.herbelot@6wind.com>,
Thomas Monjalon <thomas@monjalon.net>,
Bruce Richardson <bruce.richardson@intel.com>,
Anatoly Burakov <anatoly.burakov@intel.com>,
stable@dpdk.org, Olivier Matz <olivier.matz@6wind.com>
Subject: [V2] net/intel: update key_len when getting RSS key
Date: Fri, 16 Jan 2026 14:54:35 +0100 [thread overview]
Message-ID: <20260116135435.3463443-1-thierry.herbelot@6wind.com> (raw)
In-Reply-To: <20260112135311.2507243-1-thierry.herbelot@6wind.com>
When adding the i40e PMD, the rss_hash_conf_get function was changed
to update the RSS key len.
The corresponding functions for ixgbe & e1000 were not updated to
follow the new convention.
Fixes: 8a387fa85f02 ("ethdev: more RSS flags")
Signed-off-by: Thierry Herbelot <thierry.herbelot@6wind.com>
---
V2: For igb & ixgbe, a hard-coded integer is replaced a symbolic constant.
---
drivers/net/intel/e1000/igb_rxtx.c | 3 ++-
drivers/net/intel/e1000/igc_ethdev.c | 1 +
drivers/net/intel/ixgbe/ixgbe_rxtx.c | 3 ++-
3 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/drivers/net/intel/e1000/igb_rxtx.c b/drivers/net/intel/e1000/igb_rxtx.c
index cdd7a3338f61..14b28588174f 100644
--- a/drivers/net/intel/e1000/igb_rxtx.c
+++ b/drivers/net/intel/e1000/igb_rxtx.c
@@ -2035,13 +2035,14 @@ int eth_igb_rss_hash_conf_get(struct rte_eth_dev *dev,
hash_key = rss_conf->rss_key;
if (hash_key != NULL) {
/* Return RSS hash key */
- for (i = 0; i < 10; i++) {
+ for (i = 0; i < IGB_HKEY_MAX_INDEX; i++) {
rss_key = E1000_READ_REG_ARRAY(hw, E1000_RSSRK(0), i);
hash_key[(i * 4)] = rss_key & 0x000000FF;
hash_key[(i * 4) + 1] = (rss_key >> 8) & 0x000000FF;
hash_key[(i * 4) + 2] = (rss_key >> 16) & 0x000000FF;
hash_key[(i * 4) + 3] = (rss_key >> 24) & 0x000000FF;
}
+ rss_conf->rss_key_len = IGB_HKEY_MAX_INDEX * sizeof(uint32_t);
}
/* Get RSS functions configured in MRQC register */
diff --git a/drivers/net/intel/e1000/igc_ethdev.c b/drivers/net/intel/e1000/igc_ethdev.c
index b9c91d2446c0..9f6ada3bc6cd 100644
--- a/drivers/net/intel/e1000/igc_ethdev.c
+++ b/drivers/net/intel/e1000/igc_ethdev.c
@@ -2559,6 +2559,7 @@ eth_igc_rss_hash_conf_get(struct rte_eth_dev *dev,
/* read RSS key from register */
for (i = 0; i < IGC_HKEY_MAX_INDEX; i++)
hash_key[i] = E1000_READ_REG_LE_VALUE(hw, E1000_RSSRK(i));
+ rss_conf->rss_key_len = IGC_HKEY_MAX_INDEX * sizeof(uint32_t);
}
/* get RSS functions configured in MRQC register */
diff --git a/drivers/net/intel/ixgbe/ixgbe_rxtx.c b/drivers/net/intel/ixgbe/ixgbe_rxtx.c
index a7583c178a14..e830bb9495b8 100644
--- a/drivers/net/intel/ixgbe/ixgbe_rxtx.c
+++ b/drivers/net/intel/ixgbe/ixgbe_rxtx.c
@@ -3749,13 +3749,14 @@ ixgbe_dev_rss_hash_conf_get(struct rte_eth_dev *dev,
hash_key = rss_conf->rss_key;
if (hash_key != NULL) {
/* Return RSS hash key */
- for (i = 0; i < 10; i++) {
+ for (i = 0; i < IXGBE_HKEY_MAX_INDEX; i++) {
rss_key = IXGBE_READ_REG_ARRAY(hw, rssrk_reg, i);
hash_key[(i * 4)] = rss_key & 0x000000FF;
hash_key[(i * 4) + 1] = (rss_key >> 8) & 0x000000FF;
hash_key[(i * 4) + 2] = (rss_key >> 16) & 0x000000FF;
hash_key[(i * 4) + 3] = (rss_key >> 24) & 0x000000FF;
}
+ rss_conf->rss_key_len = IXGBE_HKEY_MAX_INDEX * sizeof(uint32_t);
}
if (!ixgbe_rss_enabled(hw)) { /* RSS is disabled */
--
2.39.2
next prev parent reply other threads:[~2026-01-16 13:54 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-12 13:53 [PATCH] net/intel: update key_len when getting RSS key Thierry Herbelot
2026-01-16 13:02 ` Bruce Richardson
2026-01-16 13:11 ` Thierry Herbelot
2026-01-16 13:54 ` Thierry Herbelot [this message]
2026-01-16 14:12 ` [V2] " Bruce Richardson
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=20260116135435.3463443-1-thierry.herbelot@6wind.com \
--to=thierry.herbelot@6wind.com \
--cc=anatoly.burakov@intel.com \
--cc=bruce.richardson@intel.com \
--cc=dev@dpdk.org \
--cc=olivier.matz@6wind.com \
--cc=stable@dpdk.org \
--cc=thomas@monjalon.net \
/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