From: Long Wu <long...@corigine.com>

Use Rx offloads flag to control RSS offload configuration.

Signed-off-by: Long Wu <long...@corigine.com>
Reviewed-by: Chaoyong He <chaoyong...@corigine.com>
---
 drivers/net/nfp/nfp_ethdev.c    | 2 +-
 drivers/net/nfp/nfp_ethdev_vf.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/nfp/nfp_ethdev.c b/drivers/net/nfp/nfp_ethdev.c
index 52446c530d..3e148b6956 100644
--- a/drivers/net/nfp/nfp_ethdev.c
+++ b/drivers/net/nfp/nfp_ethdev.c
@@ -353,7 +353,7 @@ nfp_net_start(struct rte_eth_dev *dev)
        nfp_net_params_setup(net_hw);
 
        rxmode = &dev->data->dev_conf.rxmode;
-       if ((rxmode->mq_mode & RTE_ETH_MQ_RX_RSS) != 0) {
+       if ((rxmode->offloads & RTE_ETH_RX_OFFLOAD_RSS_HASH) != 0) {
                nfp_net_rss_config_default(dev);
                update |= NFP_NET_CFG_UPDATE_RSS;
                new_ctrl |= nfp_net_cfg_ctrl_rss(hw->cap);
diff --git a/drivers/net/nfp/nfp_ethdev_vf.c b/drivers/net/nfp/nfp_ethdev_vf.c
index bd3745a5c5..a422bcd057 100644
--- a/drivers/net/nfp/nfp_ethdev_vf.c
+++ b/drivers/net/nfp/nfp_ethdev_vf.c
@@ -75,7 +75,7 @@ nfp_netvf_start(struct rte_eth_dev *dev)
        dev_conf = &dev->data->dev_conf;
        rxmode = &dev_conf->rxmode;
 
-       if ((rxmode->mq_mode & RTE_ETH_MQ_RX_RSS) != 0) {
+       if ((rxmode->offloads & RTE_ETH_RX_OFFLOAD_RSS_HASH) != 0) {
                nfp_net_rss_config_default(dev);
                update |= NFP_NET_CFG_UPDATE_RSS;
                new_ctrl |= nfp_net_cfg_ctrl_rss(hw->cap);
-- 
2.39.1

Reply via email to