From: Xiao Wang <xiao.w.wang@intel.com>
To: dev@dpdk.org
Cc: jing.d.chen@intel.com, xueqin.lin@intel.com,
Xiao Wang <xiao.w.wang@intel.com>
Subject: [dpdk-dev] [PATCH] net/fm10k: fix RSS hash config
Date: Thu, 21 Jul 2016 16:24:30 +0800 [thread overview]
Message-ID: <1469089470-5764-1-git-send-email-xiao.w.wang@intel.com> (raw)
Sometimes app just wants to update the RSS hash function and no RSS key
update is needed, but fm10k pmd will return EINVAL for this case.
If the rss_key is NULL, we don't need to check the rss_key_len.
Fixes: 57033cdf8fdc ("fm10k: add PF RSS")
Reported-by: Xueqin Lin <xueqin.lin@intel.com>
Signed-off-by: Xiao Wang <xiao.w.wang@intel.com>
---
drivers/net/fm10k/fm10k_ethdev.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/net/fm10k/fm10k_ethdev.c b/drivers/net/fm10k/fm10k_ethdev.c
index 144b2de..01f4a72 100644
--- a/drivers/net/fm10k/fm10k_ethdev.c
+++ b/drivers/net/fm10k/fm10k_ethdev.c
@@ -2159,8 +2159,8 @@ fm10k_rss_hash_update(struct rte_eth_dev *dev,
PMD_INIT_FUNC_TRACE();
- if (rss_conf->rss_key_len < FM10K_RSSRK_SIZE *
- FM10K_RSSRK_ENTRIES_PER_REG)
+ if (key && (rss_conf->rss_key_len < FM10K_RSSRK_SIZE *
+ FM10K_RSSRK_ENTRIES_PER_REG))
return -EINVAL;
if (hf == 0)
@@ -2202,8 +2202,8 @@ fm10k_rss_hash_conf_get(struct rte_eth_dev *dev,
PMD_INIT_FUNC_TRACE();
- if (rss_conf->rss_key_len < FM10K_RSSRK_SIZE *
- FM10K_RSSRK_ENTRIES_PER_REG)
+ if (key && (rss_conf->rss_key_len < FM10K_RSSRK_SIZE *
+ FM10K_RSSRK_ENTRIES_PER_REG))
return -EINVAL;
if (key != NULL)
--
1.9.3
next reply other threads:[~2016-07-21 8:24 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-21 8:24 Xiao Wang [this message]
2016-07-21 8:48 ` Chen, Jing D
2016-07-21 9:35 ` Wang, Xiao W
2016-07-22 8:21 ` Thomas Monjalon
2016-07-22 8:23 ` Chen, Jing D
2016-07-22 8:28 ` Thomas Monjalon
2016-07-22 9:05 ` Chen, Jing D
2016-07-22 9:53 ` Thomas Monjalon
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=1469089470-5764-1-git-send-email-xiao.w.wang@intel.com \
--to=xiao.w.wang@intel.com \
--cc=dev@dpdk.org \
--cc=jing.d.chen@intel.com \
--cc=xueqin.lin@intel.com \
/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).