From c778b7a39f30ffbb8326f81389668dc5f6f30888 Mon Sep 17 00:00:00 2001 From: Guinan Sun Date: Sat, 23 May 2020 05:22:39 +0000 Subject: [PATCH] net/ixgbe: fix flow control status mac_ctrl_frame_fwd assignment is missing, so setting mac_ctrl_frame_fwd should be added in ixgbe_flow_ctrl_get(). The patch fixes the issue. Fixes: 56ea46a997b7 ("ethdev: retrieve flow control configuration") Cc: stable@dpdk.org Signed-off-by: Guinan Sun Reviewed-by: Wei Zhao Acked-by: Qi Zhang Tested-by: Bo Chen --- drivers/net/ixgbe/ixgbe_ethdev.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c index 74c3c6b5db..fd0cb9b0e2 100644 --- a/drivers/net/ixgbe/ixgbe_ethdev.c +++ b/drivers/net/ixgbe/ixgbe_ethdev.c @@ -4743,6 +4743,11 @@ ixgbe_flow_ctrl_get(struct rte_eth_dev *dev, struct rte_eth_fc_conf *fc_conf) * MFLCN register. */ mflcn_reg = IXGBE_READ_REG(hw, IXGBE_MFLCN); + if (mflcn_reg & IXGBE_MFLCN_PMCF) + fc_conf->mac_ctrl_frame_fwd = 1; + else + fc_conf->mac_ctrl_frame_fwd = 0; + if (mflcn_reg & (IXGBE_MFLCN_RPFCE | IXGBE_MFLCN_RFCE)) rx_pause = 1; else -- 2.20.1