net/nfp: fix RSS hash configuration reporting

Message ID 20200710142846.14110-1-heinrich.kuhn@netronome.com (mailing list archive)
State Accepted, archived
Delegated to: Ferruh Yigit
Headers
Series net/nfp: fix RSS hash configuration reporting |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/iol-broadcom-Performance success Performance Testing PASS
ci/Intel-compilation success Compilation OK
ci/iol-testing fail Testing issues
ci/iol-intel-Performance success Performance Testing PASS

Commit Message

Heinrich Kuhn July 10, 2020, 2:28 p.m. UTC
  Prior to this fix the NFP PMD implementation of the .rss_hash_conf_get
callback did not propagate the current hardware state of rss_hf back up
to the caller. Users of the hash_conf_get callback would receive an
incorrect representation of what the RSS configuration currently is in
hardware.

Fixes: 934e4c60fbff ("nfp: add RSS")
Cc: stable@dpdk.org

Signed-off-by: Heinrich Kuhn <heinrich.kuhn@netronome.com>
Signed-off-by: Simon Horman <simon.horman@netronome.com>
---
 drivers/net/nfp/nfp_net.c | 3 +++
 1 file changed, 3 insertions(+)
  

Comments

Ferruh Yigit July 10, 2020, 10:59 p.m. UTC | #1
On 7/10/2020 3:28 PM, Heinrich Kuhn wrote:
> Prior to this fix the NFP PMD implementation of the .rss_hash_conf_get
> callback did not propagate the current hardware state of rss_hf back up
> to the caller. Users of the hash_conf_get callback would receive an
> incorrect representation of what the RSS configuration currently is in
> hardware.
> 
> Fixes: 934e4c60fbff ("nfp: add RSS")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Heinrich Kuhn <heinrich.kuhn@netronome.com>
> Signed-off-by: Simon Horman <simon.horman@netronome.com>

Applied to dpdk-next-net/master, thanks.
  

Patch

diff --git a/drivers/net/nfp/nfp_net.c b/drivers/net/nfp/nfp_net.c
index 88e3f01d6..f47200cc4 100644
--- a/drivers/net/nfp/nfp_net.c
+++ b/drivers/net/nfp/nfp_net.c
@@ -2626,6 +2626,9 @@  nfp_net_rss_hash_conf_get(struct rte_eth_dev *dev,
 	if (cfg_rss_ctrl & NFP_NET_CFG_RSS_IPV6)
 		rss_hf |= ETH_RSS_NONFRAG_IPV4_UDP | ETH_RSS_NONFRAG_IPV6_UDP;
 
+	/* Propagate current RSS hash functions to caller */
+	rss_conf->rss_hf = rss_hf;
+
 	/* Reading the key size */
 	rss_conf->rss_key_len = nn_cfg_readl(hw, NFP_NET_CFG_RSS_KEY_SZ);