From 861ca8b1e97c68727cbafbb859cc6c2ff017801e Mon Sep 17 00:00:00 2001 From: Guinan Sun Date: Tue, 12 May 2020 08:13:06 +0000 Subject: [PATCH] net/ixgbe: fix statistics 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. AUTO_NEG Advt register should be updated by ixgbe_setup_fc() when enabling flow control. The patch fixes the issue. Fixes: a524f550da6e ("net/ixgbe: fix flow control mode setting") Cc: stable@dpdk.org Signed-off-by: Guinan Sun Reviewed-by: Wei Zhao --- 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 a4e5c539de..f8a84c565f 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; + ixgbe_setup_fc(hw); + err = ixgbe_fc_enable(hw); /* Not negotiated is not an error case */ -- 2.20.1