Skip to contentSkip to conversation

net/ixgbe: fix RSS RETA be reset after port start

PATCH Superseded Murphy Yang 2 participants 2 messages Mar 29, 2021 Network drivers

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net/ixgbe: fix RSS RETA be reset after port start

If one calls ‘rte_eth_dev_rss_reta_update’ with ixgbe before starting the device (but after setting everything else), then RSS RETA configuration be zero after starting the device.

This patch gives a notification if the port not started.

Bugzilla ID: 664

Fixes 249358424eab ("ixgbe: RSS RETA configuration")
---
 drivers/net/ixgbe/ixgbe_ethdev.c | 8 ++++++++
 1 file changed, 8 insertions(+)
drivers/net/ixgbe/ixgbe_ethdev.c +8 -0
index 8a9a21e7c2..41068fe646 100644
@@ -5015,11 +5015,19 @@ ixgbe_dev_rss_reta_update(struct rte_eth_dev *dev,
 	uint32_t reta, r;
 	uint16_t idx, shift;
 	struct ixgbe_adapter *adapter = dev->data->dev_private;
+	struct rte_eth_dev_data *dev_data = dev->data;
 	struct ixgbe_hw *hw = IXGBE_DEV_PRIVATE_TO_HW(dev->data->dev_private);
 	uint32_t reta_reg;
 
 	PMD_INIT_FUNC_TRACE();
 
+	if (!dev_data->dev_started) {
+		PMD_DRV_LOG(ERR,
+			"port %d must be started before configuration",
+			 dev_data->port_id);
+		return -EBUSY;
+	}
+
 	if (!ixgbe_rss_update_sp(hw->mac.type)) {
 		PMD_DRV_LOG(ERR, "RSS reta update is not supported on this "
 			"NIC.");
Signature · 1 line
2.17.1
#1 lore raw
Quoted 32 lines

-----Original Message-----
From: Yang, MurphyX <[email protected]>
Sent: Monday, March 29, 2021 15:20
To: [email protected]
Cc: Yang, Qiming <[email protected]>; Wang, Haiyue <[email protected]>; Guo, Jia <[email protected]>; Yang, SteveX <[email protected]>; Zhang, RobinX <[email protected]>; Yang, MurphyX <[email protected]>
Subject: [PATCH] net/ixgbe: fix RSS RETA be reset after port start

If one calls ‘rte_eth_dev_rss_reta_update’ with ixgbe before starting the device (but after setting everything else), then RSS RETA configuration be zero after starting the device.

This patch gives a notification if the port not started.

Bugzilla ID: 664

Fixes 249358424eab ("ixgbe: RSS RETA configuration")
---
 drivers/net/ixgbe/ixgbe_ethdev.c | 8 ++++++++
 1 file changed, 8 insertions(+)
drivers/net/ixgbe/ixgbe_ethdev.c +1 -0
index 8a9a21e7c2..41068fe646 100644
@@ -5015,11 +5015,19 @@ ixgbe_dev_rss_reta_update(struct rte_eth_dev *dev,
 	uint32_t reta, r;
 	uint16_t idx, shift;
 	struct ixgbe_adapter *adapter = dev->data->dev_private;
+	struct rte_eth_dev_data *dev_data = dev->data;

drivers/net/ixgbe/ixgbe_ethdev.c ixgbe_dev_rss_reta_update(struct rte_eth_dev *dev, · line 5028

Quoted 10 lines
drivers/net/ixgbe/ixgbe_ethdev.c +5 -0
 	struct ixgbe_hw *hw = IXGBE_DEV_PRIVATE_TO_HW(dev->data->dev_private);
 	uint32_t reta_reg;
 
 	PMD_INIT_FUNC_TRACE();
 
+	if (!dev_data->dev_started) {
+		PMD_DRV_LOG(ERR,
+			"port %d must be started before configuration",
+			 dev_data->port_id);
+		return -EBUSY;

-EIO is better ? Since no started, no busy at all. ;-)

Quoted 2 lines
drivers/net/ixgbe/ixgbe_ethdev.c +0 -1
--

2.17.1