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: 56ea46a997 ("ethdev: retrieve flow control configuration")
Cc: stable@dpdk.org

Signed-off-by: Guinan Sun <guinanx.sun@intel.com>
Reviewed-by: Wei Zhao <wei.zhao1@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Tested-by: Bo Chen <box.c.chen@intel.com>
This commit is contained in:
Guinan Sun 2020-05-23 05:22:39 +00:00 committed by Ferruh Yigit
parent 7b053b86d8
commit c778b7a39f

View File

@ -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