[v3] net/ice: fix RSS advanced rule invalid issue
diff mbox series

Message ID 20200401062949.19408-1-junyux.jiang@intel.com
State Superseded, archived
Delegated to: xiaolong ye
Headers show
Series
  • [v3] net/ice: fix RSS advanced rule invalid issue
Related show

Checks

Context Check Description
ci/travis-robot success Travis build: passed
ci/Intel-compilation success Compilation OK
ci/checkpatch warning coding style issues

Commit Message

Junyu Jiang April 1, 2020, 6:29 a.m. UTC
This patch moved the ice_init_rss into ice_dev_configure to fix RSS
advanced rule invalid after running port stop and port start.

Fixes: 5ad3db8d4bdd ("net/ice: enable advanced RSS")
Cc: stable@dpdk.org

Signed-off-by: Junyu Jiang <junyux.jiang@intel.com>
---
 drivers/net/ice/ice_ethdev.c | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

Patch
diff mbox series

diff --git a/drivers/net/ice/ice_ethdev.c b/drivers/net/ice/ice_ethdev.c
index 85ef83e92..1d94d2a41 100644
--- a/drivers/net/ice/ice_ethdev.c
+++ b/drivers/net/ice/ice_ethdev.c
@@ -155,6 +155,7 @@  static int ice_dev_udp_tunnel_port_add(struct rte_eth_dev *dev,
 			struct rte_eth_udp_tunnel *udp_tunnel);
 static int ice_dev_udp_tunnel_port_del(struct rte_eth_dev *dev,
 			struct rte_eth_udp_tunnel *udp_tunnel);
+static int ice_init_rss(struct ice_pf *pf);
 
 static const struct rte_pci_id pci_id_ice_map[] = {
 	{ RTE_PCI_DEVICE(ICE_INTEL_VENDOR_ID, ICE_DEV_ID_E810C_BACKPLANE) },
@@ -2451,6 +2452,8 @@  ice_dev_configure(struct rte_eth_dev *dev)
 {
 	struct ice_adapter *ad =
 		ICE_DEV_PRIVATE_TO_ADAPTER(dev->data->dev_private);
+	struct ice_pf *pf = ICE_DEV_PRIVATE_TO_PF(dev->data->dev_private);
+	int ret;
 
 	/* Initialize to TRUE. If any of Rx queues doesn't meet the
 	 * bulk allocation or vector Rx preconditions we will reset it.
@@ -2461,6 +2464,10 @@  ice_dev_configure(struct rte_eth_dev *dev)
 	if (dev->data->dev_conf.rxmode.mq_mode & ETH_MQ_RX_RSS_FLAG)
 		dev->data->dev_conf.rxmode.offloads |= DEV_RX_OFFLOAD_RSS_HASH;
 
+	ret = ice_init_rss(pf);
+	if (ret)
+		PMD_DRV_LOG(ERR, "Failed to enable rss for PF");
+
 	return 0;
 }
 
@@ -2797,12 +2804,6 @@  ice_dev_start(struct rte_eth_dev *dev)
 		}
 	}
 
-	ret = ice_init_rss(pf);
-	if (ret) {
-		PMD_DRV_LOG(ERR, "Failed to enable rss for PF");
-		goto rx_err;
-	}
-
 	ice_set_rx_function(dev);
 	ice_set_tx_function(dev);