Tested-by: Chen, BoX C <[email protected]>
-----Original Message-----
From: dev [mailto:[email protected]] On Behalf Of Guinan Sun
Sent: Saturday, May 23, 2020 1:23 PM
To: [email protected]
Cc: Zhao1, Wei <[email protected]>; Yang, Qiming <[email protected]>;
Sun, GuinanX <[email protected]>; [email protected]
Subject: [dpdk-dev] [PATCH v2 2/2] net/ixgbe: fix flow control status get
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: [email protected]
Signed-off-by: Guinan Sun <[email protected]>
---
v2 changes:
* Set fc mac_ctrl_frame_fwd by bit operation.
* Modified commit messge.
---
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 42947ba40..890d756e4 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.c
+++ b/drivers/net/ixgbe/ixgbe_ethdev.c
@@ -4752,6 +4752,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.17.1