net/fm10k: fix RSS hash config
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: 57033cdf8f
("fm10k: add PF RSS")
Reported-by: Xueqin Lin <xueqin.lin@intel.com>
Signed-off-by: Xiao Wang <xiao.w.wang@intel.com>
This commit is contained in:
parent
a280e64c08
commit
7a2c46695f
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user