From: Xiao Wang Date: Thu, 21 Jul 2016 08:24:30 +0000 (+0800) Subject: net/fm10k: fix RSS hash config X-Git-Tag: spdx-start~6112 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=7a2c46695ff7af71963a9b84e5820e21e96dffe7;p=dpdk.git 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: 57033cdf8fdc ("fm10k: add PF RSS") Reported-by: Xueqin Lin Signed-off-by: Xiao Wang --- diff --git a/drivers/net/fm10k/fm10k_ethdev.c b/drivers/net/fm10k/fm10k_ethdev.c index 144b2de887..01f4a72c60 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)