From: Long Wu <[email protected]>

"NFP_NET_CFG_RSS_IPV4" and "NFP_NET_CFG_RSS_IPV6" represent that firmware
will calculate RSS base on l3 rather than udp or tcp information from
packets. So the logic of return RSS configuration in driver is wrong.
Modify code to return the right configuration.

Fixes: 934e4c60fbff ("nfp: add RSS")
Cc: [email protected]
Cc: [email protected]

Signed-off-by: Long Wu <[email protected]>
Reviewed-by: Chaoyong He <[email protected]>
Reviewed-by: Niklas Söderlund <[email protected]>
---
 drivers/net/nfp/nfp_common.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/nfp/nfp_common.c b/drivers/net/nfp/nfp_common.c
index cfc38db65a..a025c67e3b 100644
--- a/drivers/net/nfp/nfp_common.c
+++ b/drivers/net/nfp/nfp_common.c
@@ -1420,7 +1420,7 @@ nfp_net_rss_hash_conf_get(struct rte_eth_dev *dev,
        cfg_rss_ctrl = nn_cfg_readl(hw, NFP_NET_CFG_RSS_CTRL);
 
        if (cfg_rss_ctrl & NFP_NET_CFG_RSS_IPV4)
-               rss_hf |= RTE_ETH_RSS_NONFRAG_IPV4_TCP | 
RTE_ETH_RSS_NONFRAG_IPV4_UDP;
+               rss_hf |= RTE_ETH_RSS_IPV4;
 
        if (cfg_rss_ctrl & NFP_NET_CFG_RSS_IPV4_TCP)
                rss_hf |= RTE_ETH_RSS_NONFRAG_IPV4_TCP;
@@ -1435,7 +1435,7 @@ nfp_net_rss_hash_conf_get(struct rte_eth_dev *dev,
                rss_hf |= RTE_ETH_RSS_NONFRAG_IPV6_UDP;
 
        if (cfg_rss_ctrl & NFP_NET_CFG_RSS_IPV6)
-               rss_hf |= RTE_ETH_RSS_NONFRAG_IPV4_UDP | 
RTE_ETH_RSS_NONFRAG_IPV6_UDP;
+               rss_hf |= RTE_ETH_RSS_IPV6;
 
        if (cfg_rss_ctrl & NFP_NET_CFG_RSS_IPV4_SCTP)
                rss_hf |= RTE_ETH_RSS_NONFRAG_IPV4_SCTP;
-- 
2.29.3

Reply via email to