Tested-by: Jiang, YuX <[email protected]>

-----Original Message-----
From: dev [mailto:[email protected]] On Behalf Of Guinan Sun
Sent: Friday, May 8, 2020 4:30 PM
To: [email protected]
Cc: Sun, GuinanX <[email protected]>; [email protected]
Subject: [dpdk-dev] [PATCH] net/ixgbe: fix statistics error in flow control mode

The register autoneg can't be updated synchronously with flow control mode 
setting in the state of port start , so NIC statistics error occurs. The patch 
fixes the issue.

Fixes: a524f550da6e ("net/ixgbe: fix flow control mode setting")
Cc: [email protected]

Signed-off-by: Guinan Sun <[email protected]>
---
 drivers/net/ixgbe/ixgbe_ethdev.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
index cf5f1fe70..e6c747aef 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.c
+++ b/drivers/net/ixgbe/ixgbe_ethdev.c
@@ -2543,6 +2543,8 @@ ixgbe_flow_ctrl_enable(struct rte_eth_dev *dev, struct 
ixgbe_hw *hw)
        int err;
        uint32_t mflcn;
 
+       hw->mac.ops.setup_fc(hw);
+
        err = ixgbe_fc_enable(hw);
 
        /* Not negotiated is not an error case */
--
2.17.1

Reply via email to