net/ixgbe: delete MAC control frame fwd in struct adapter
PATCH 1/1 net/ixgbe: delete MAC control frame fwd in struct adapter
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.
--- drivers/net/ixgbe/ixgbe_ethdev.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/net/ixgbe/ixgbe_ethdev.c +2 -2
@@ -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
Signature · 1 line
2.17.1
Hi, Guinan
I don't make sense for this commit log. Don't write like a test case. Please use technical expression.
Qiming
Quoted 56 lines
-----Original Message-----
From: dev <[email protected]> On Behalf Of Guinan Sun
Sent: Friday, May 22, 2020 14:12
To: [email protected]
Cc: Zhao1, Wei <[email protected]>; Sun, GuinanX <[email protected]>; [email protected]
Subject: [dpdk-dev] [PATCH] net/ixgbe: delete MAC control frame fwd in struct adapterIf some user set
mac_ctrl_frame_fwdto 1 from fc ops, then he do a port reset process oftestpmd> start
testpmd> setflow_ctrlmac_ctrl_frame_fwdon 0 stop port stop 0 port testpmd> start 0 startThen after this process, the
mac_ctrl_frame_fwdhas 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_fwdin theixgbe_flow_ctrl_get() function.Fixes a524f550da6e ("net/ixgbe: fix flow control mode setting")Signed-off-by SunGuinan <[email protected]>--- drivers/net/ixgbe/ixgbe_ethdev.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/net/ixgbe/ixgbe_ethdev.c +2
-2@@ -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
Hi, Guinan
Quoted 8 lines
-----Original Message-----
From: Sun, GuinanX <[email protected]>
Sent: Friday, May 22, 2020 2:12 PM
To: [email protected]
Cc: Zhao1, Wei <[email protected]>; Sun, GuinanX <[email protected]>; [email protected]
Subject: [PATCH] net/ixgbe: delete MAC control frame fwd in struct adapter
Quoted 6 lines
If some user set
mac_ctrl_frame_fwdto 1 from fc ops, then he do a port reset process oftestpmd> start
testpmd> setflow_ctrlmac_ctrl_frame_fwdon 0 stop port stop 0 port testpmd> start 0 start
This test step seems confused.
Quoted 41 lines
Then after this process, the
mac_ctrl_frame_fwdhas 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_fwdin theixgbe_flow_ctrl_get() function.Fixes a524f550da6e ("net/ixgbe: fix flow control mode setting")Signed-off-by SunGuinan <[email protected]>--- drivers/net/ixgbe/ixgbe_ethdev.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/net/ixgbe/ixgbe_ethdev.c +2
-2@@ -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, structrte_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
Hi,
Quoted 44 lines
-----Original Message-----
From: Sun, GuinanX <[email protected]>
Sent: Friday, May 22, 2020 2:12 PM
To: [email protected]
Cc: Zhao1, Wei <[email protected]>; Sun, GuinanX <[email protected]>; [email protected]
Subject: [PATCH] net/ixgbe: delete MAC control frame fwd in struct adapterIf some user set
mac_ctrl_frame_fwdto 1 from fc ops, then he do a port reset process oftestpmd> start
testpmd> setflow_ctrlmac_ctrl_frame_fwdon 0 stop port stop 0 port testpmd> start 0 startThen after this process, the
mac_ctrl_frame_fwdhas 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_fwdin theixgbe_flow_ctrl_get() function.Fixes a524f550da6e ("net/ixgbe: fix flow control mode setting")Signed-off-by SunGuinan <[email protected]>--- drivers/net/ixgbe/ixgbe_ethdev.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/net/ixgbe/ixgbe_ethdev.c +0
-2@@ -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; }
drivers/net/ixgbe/ixgbe_ethdev.c ixgbe_flow_ctrl_get(struct rte_eth_dev *dev, struct · line 4757
Quoted 6 lines
drivers/net/ixgbe/ixgbe_ethdev.c +2
-0@@ -4754,6 +4752,8 @@ ixgbe_flow_ctrl_get(struct rte_eth_dev *dev, structrte_eth_fc_conf *fc_conf) * MFLCN register. */ mflcn_reg =IXGBE_READ_REG (hw,IXGBE_MFLCN ); + fc_conf->mac_ctrl_frame_fwd = mflcn_reg; +
Error, that is not right!!
Quoted 5 lines
drivers/net/ixgbe/ixgbe_ethdev.c +0
-0if (mflcn_reg & (IXGBE_MFLCN_RPFCE |IXGBE_MFLCN_RFCE )) rx_pause =1 ;else
--
2.17.1
Hi
Quoted 54 lines
-----Original Message-----
From: Zhao1, Wei
Sent: Friday, May 22, 2020 5:47 PM
To: Sun, GuinanX <[email protected]>; [email protected]
Cc: [email protected]; Yang, Qiming <[email protected]>; Ye, Xiaolong <[email protected]>
Subject: RE: [PATCH] net/ixgbe: delete MAC control frame fwd in struct adapterHi,
Quoted 44 lines
-----Original Message-----
From: Sun, GuinanX <[email protected]>
Sent: Friday, May 22, 2020 2:12 PM
To: [email protected]
Cc: Zhao1, Wei <[email protected]>; Sun, GuinanX <[email protected]>; [email protected]
Subject: [PATCH] net/ixgbe: delete MAC control frame fwd in struct adapterIf some user set
mac_ctrl_frame_fwdto 1 from fc ops, then he do a port reset process oftestpmd> start
testpmd> setflow_ctrlmac_ctrl_frame_fwdon 0 stop port stop 0 port testpmd> start 0 startThen after this process, the
mac_ctrl_frame_fwdhas 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_fwdin theixgbe_flow_ctrl_get() function.Fixes a524f550da6e ("net/ixgbe: fix flow control mode setting")Signed-off-by SunGuinan <[email protected]>--- drivers/net/ixgbe/ixgbe_ethdev.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/net/ixgbe/ixgbe_ethdev.c +0
-2@@ -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; }
Quoted 10 lines
drivers/net/ixgbe/ixgbe_ethdev.c ixgbe_flow_ctrl_get(struct rte_eth_dev *dev, · line 4757
Quoted 7 lines
drivers/net/ixgbe/ixgbe_ethdev.c +2
-0@@ -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; +Error, that is not right!!
You are right, I will make corrections later.
In addition, the problem of ixgbe_flow_ctrl_get () and the timing of mac_ctrl_frame_fwd are two problems. I will make a patch set and release it later.
Quoted 6 lines
Quoted 5 lines
drivers/net/ixgbe/ixgbe_ethdev.c +0
-0if (mflcn_reg & (IXGBE_MFLCN_RPFCE | IXGBE_MFLCN_RFCE)) rx_pause =1; else
--
2.17.1
v2 cover fix MAC ctrl frame fwd get
In reply to Guinan SunFix incorrect MAC control frame forward.
Fix flow control status get.
---
v2 changes:
* Rebase.
* Split into two patches.
* Set fc mac_ctrl_frame_fwd by bit operation.
* Modify commit messge.
Guinan Sun (2):
net/ixgbe: fix incorrect MAC control frame forward net/ixgbe: fix flow control status get
drivers/net/ixgbe/ixgbe_ethdev.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)
Signature · 1 line
2.17.1
PATCH v2 1/2 net/ixgbe: fix incorrect MAC control frame forward
mac_ctrl_frame_fwd shouldn't be cleared when port stop, otherwise it will be inconsistent with the actual status. This patch fixes the issue.
---
v2 changes:
* Modified commit messge.
--- drivers/net/ixgbe/ixgbe_ethdev.c | 2 -- 1 file changed, 2 deletions(-)
drivers/net/ixgbe/ixgbe_ethdev.c +0 -2
@@ -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; }
Signature · 1 line
2.17.1
PATCH v2 2/2 net/ixgbe: fix flow control status get
In reply to Guinan Sunmac_ctrl_frame_fwd assignment is missing, so
setting mac_ctrl_frame_fwd should be added inixgbe_flow_ctrl_get().
The patch fixes the issue.
---
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(+)
drivers/net/ixgbe/ixgbe_ethdev.c +5 -0
@@ -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
Signature · 1 line
2.17.1
Re: [dpdk-dev] [PATCH v2 2/2] net/ixgbe: fix flow control status get
-----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.
---
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(+)
drivers/net/ixgbe/ixgbe_ethdev.c +5 -0
@@ -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
Re: [dpdk-dev] [PATCH v2 0/2] fix MAC ctrl frame fwd get
In reply to Guinan SunQuoted 26 lines
-----Original Message-----
From: Sun, GuinanX <[email protected]>
Sent: Saturday, May 23, 2020 1:23 PM
To: [email protected]
Cc: Zhao1, Wei <[email protected]>; Yang, Qiming <[email protected]>; Sun, GuinanX <[email protected]>
Subject: [PATCH v2 0/2] fix MAC ctrl frame fwd getFix incorrect MAC control frame forward.
Fix flow control status get.
---
v2 changes:
* Rebase.
* Split into two patches.
* Set fcmac_ctrl_frame_fwdby bit operation.
* Modify commit messge.Guinan Sun (2):
net/ixgbe: fix incorrect MAC control frame forward net/ixgbe: fix flow control status getdrivers/net/ixgbe/ixgbe_ethdev.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)--
2.17.1
Re: [dpdk-dev] [PATCH v2 0/2] fix MAC ctrl frame fwd get
In reply to Guinan SunQuoted 26 lines
-----Original Message-----
From: Sun, GuinanX <[email protected]>
Sent: Saturday, May 23, 2020 1:23 PM
To: [email protected]
Cc: Zhao1, Wei <[email protected]>; Yang, Qiming <[email protected]>; Sun, GuinanX <[email protected]>
Subject: [PATCH v2 0/2] fix MAC ctrl frame fwd getFix incorrect MAC control frame forward.
Fix flow control status get.
---
v2 changes:
* Rebase.
* Split into two patches.
* Set fcmac_ctrl_frame_fwdby bit operation.
* Modify commit messge.Guinan Sun (2):
net/ixgbe: fix incorrect MAC control frame forward net/ixgbe: fix flow control status getdrivers/net/ixgbe/ixgbe_ethdev.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)--
2.17.1
Re: [dpdk-dev] [PATCH v2 0/2] fix MAC ctrl frame fwd get
In reply to Guinan SunQuoted 23 lines
-----Original Message-----
From: dev <[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]>
Subject: [dpdk-dev] [PATCH v2 0/2] fix MAC ctrl frame fwd getFix incorrect MAC control frame forward.
Fix flow control status get.
---
v2 changes:
* Rebase.
* Split into two patches.
* Set fcmac_ctrl_frame_fwdby bit operation.
* Modify commit messge.Guinan Sun (2):
net/ixgbe: fix incorrect MAC control frame forward net/ixgbe: fix flow control status get
Quoted 5 lines
drivers/net/ixgbe/ixgbe_ethdev.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)--
2.17.1
Applied to dpdk-next-net-intel.
Thanks
Qi