Skip to contentSkip to conversation

ixgbe: reset hardware stat when initialize

PATCH Applied Qiu, Michael 3 participants 5 messages May 20, 2015 – Jul 10, 2015 1 message not in the archive Network drivers

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

Any comments about this patch?

Thanks,
Michael

Quoted 35 lines · Michael Qiu

From: Michael Qiu <[email protected]>

When initialize the hardware, the stat should be reset. Otherwise when detach then attach port, the stat will not be re-init to zero.

---
 lib/librte_pmd_ixgbe/ixgbe_ethdev.c | 6 ++++++
 1 file changed, 6 insertions(+)
lib/librte_pmd_ixgbe/ixgbe_ethdev.c +6 -0
index 1b3b4b5..dbcc12a 100644
@@ -840,6 +840,9 @@ eth_ixgbe_dev_init(struct rte_eth_dev *eth_dev)
 		return -EIO;
 	}
 
+	/* Reset the hw statistics */
+	ixgbe_dev_stats_reset(eth_dev);
+
 	/* disable interrupt */
 	ixgbe_disable_intr(hw);
 
@@ -1015,6 +1018,9 @@ eth_ixgbevf_dev_init(struct rte_eth_dev *eth_dev)
 	/* Disable the interrupts for VF */
 	ixgbevf_intr_disable(hw);
 
+	/* Reset the hw statistics */
+	ixgbevf_dev_stats_reset(eth_dev);
+
 	hw->mac.num_rar_entries = 128; /* The MAX of the underlying PF */
 	diag = hw->mac.ops.reset_hw(hw);
 
#2 lore raw

PATCH v2 1/1 ixgbe: reset hardware stat when initialize

In reply to a message not in the archive

When initialize the hardware, the stat should be reset. Otherwise when detach then attach port, the stat will not be re-init to zero.

---
Change log:

	v2 --> v1:
	change the folder of driver
 drivers/net/ixgbe/ixgbe_ethdev.c | 6 ++++++
 1 file changed, 6 insertions(+)
drivers/net/ixgbe/ixgbe_ethdev.c +6 -0
index 0d9f9b2..e0415a7 100644
@@ -840,6 +840,9 @@ eth_ixgbe_dev_init(struct rte_eth_dev *eth_dev)
 		return -EIO;
 	}
 
+	/* Reset the hw statistics */
+	ixgbe_dev_stats_reset(eth_dev);
+
 	/* disable interrupt */
 	ixgbe_disable_intr(hw);
 
@@ -1012,6 +1015,9 @@ eth_ixgbevf_dev_init(struct rte_eth_dev *eth_dev)
 	/* init_mailbox_params */
 	hw->mbx.ops.init_params(hw);
 
+	/* Reset the hw statistics */
+	ixgbevf_dev_stats_reset(eth_dev);
+
 	/* Disable the interrupts for VF */
 	ixgbevf_intr_disable(hw);
 
Signature · 1 line
1.9.3
Acked-by on v2 1/1
#3 lore raw
Quoted 7 lines

-----Original Message-----
From: Qiu, Michael
Sent: Thursday, June 11, 2015 8:30 AM
To: [email protected]
Cc: Iremonger, Bernard; [email protected]; Qiu, Michael
Subject: [PATCH v2] ixgbe: reset hardware stat when initialize

Quoted 5 lines

When initialize the hardware, the stat should be reset.
Otherwise when detach then attach port, the stat will not be re-init to zero.

---

#4 lore raw

Hi, all

Any comments on this patch?

Thanks,
Michael

Quoted 15 lines · Bernard
Quoted 7 lines

-----Original Message-----
From: Qiu, Michael
Sent: Thursday, June 11, 2015 8:30 AM
To: [email protected]
Cc: Iremonger, Bernard; [email protected]; Qiu, Michael
Subject: [PATCH v2] ixgbe: reset hardware stat when initialize

Quoted 5 lines

When initialize the hardware, the stat should be reset.
Otherwise when detach then attach port, the stat will not be re-init to zero.

---