patches for DPDK stable branches
 help / color / mirror / Atom feed
* [dpdk-stable] [PATCH] net/ixgbe: delete MAC control frame fwd in struct adapter
@ 2020-05-22  6:12 Guinan Sun
  2020-05-22  7:46 ` [dpdk-stable] [dpdk-dev] " Yang, Qiming
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Guinan Sun @ 2020-05-22  6:12 UTC (permalink / raw)
  To: dev; +Cc: Zhao1 Wei, Guinan Sun, stable

If some user set mac_ctrl_frame_fwd to 1 from fc ops,
then he do a port reset process of

testpmd> start
testpmd> set flow_ctrl mac_ctrl_frame_fwd on 0
testpmd> stop
testpmd> port stop 0
testpmd> port start 0
testpmd> start

Then after this process, the mac_ctrl_frame_fwd has been change to "off",
so we should delete "adapter->mac_ctrl_frame_fwd = 0;" from dev-stop.

In addition, add a value to mac_ctrl_frame_fwd in
the ixgbe_flow_ctrl_get () function.

Fixes: a524f550da6e ("net/ixgbe: fix flow control mode setting")
Cc: stable@dpdk.org

Signed-off-by: SunGuinan <guinanx.sun@intel.com>
---
 drivers/net/ixgbe/ixgbe_ethdev.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
index f8a84c565..dd4023f01 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.c
+++ b/drivers/net/ixgbe/ixgbe_ethdev.c
@@ -2939,8 +2939,6 @@ ixgbe_dev_stop(struct rte_eth_dev *dev)
 
 	adapter->rss_reta_updated = 0;
 
-	adapter->mac_ctrl_frame_fwd = 0;
-
 	hw->adapter_stopped = true;
 }
 
@@ -4754,6 +4752,8 @@ 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);
+	fc_conf->mac_ctrl_frame_fwd = mflcn_reg;
+
 	if (mflcn_reg & (IXGBE_MFLCN_RPFCE | IXGBE_MFLCN_RFCE))
 		rx_pause = 1;
 	else
-- 
2.17.1


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2020-06-02 10:54 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-22  6:12 [dpdk-stable] [PATCH] net/ixgbe: delete MAC control frame fwd in struct adapter Guinan Sun
2020-05-22  7:46 ` [dpdk-stable] [dpdk-dev] " Yang, Qiming
2020-05-22  9:42 ` [dpdk-stable] " Zhao1, Wei
2020-05-22  9:46 ` Zhao1, Wei
2020-05-23  2:35   ` Sun, GuinanX
     [not found] ` <20200523052239.62928-1-guinanx.sun@intel.com>
2020-05-23  5:22   ` [dpdk-stable] [PATCH v2 1/2] net/ixgbe: fix incorrect MAC control frame forward Guinan Sun
2020-05-23  5:22   ` [dpdk-stable] [PATCH v2 2/2] net/ixgbe: fix flow control status get Guinan Sun
2020-06-02 10:54     ` [dpdk-stable] [dpdk-dev] " Jiang, YuX

patches for DPDK stable branches

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://inbox.dpdk.org/stable/0 stable/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 stable stable/ https://inbox.dpdk.org/stable \
		stable@dpdk.org
	public-inbox-index stable

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.stable


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git