DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] net/ixgbe: delete MAC control frame fwd in struct adapter
@ 2020-05-22  6:12 Guinan Sun
  2020-05-22  7:46 ` Yang, Qiming
                   ` (3 more replies)
  0 siblings, 4 replies; 12+ 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] 12+ messages in thread

* Re: [dpdk-dev] [PATCH] net/ixgbe: delete MAC control frame fwd in struct adapter
  2020-05-22  6:12 [dpdk-dev] [PATCH] net/ixgbe: delete MAC control frame fwd in struct adapter Guinan Sun
@ 2020-05-22  7:46 ` Yang, Qiming
  2020-05-22  9:42 ` Zhao1, Wei
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 12+ messages in thread
From: Yang, Qiming @ 2020-05-22  7:46 UTC (permalink / raw)
  To: Sun, GuinanX, dev; +Cc: Zhao1, Wei, Sun, GuinanX, stable

Hi, Guinan
I don't make sense for this commit log. Don't write like a test case. Please use technical expression.

Qiming
> -----Original Message-----
> From: dev <dev-bounces@dpdk.org> On Behalf Of Guinan Sun
> Sent: Friday, May 22, 2020 14:12
> To: dev@dpdk.org
> Cc: Zhao1, Wei <wei.zhao1@intel.com>; Sun, GuinanX
> <guinanx.sun@intel.com>; stable@dpdk.org
> Subject: [dpdk-dev] [PATCH] 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 stop port stop 0 port
> testpmd> start 0 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] 12+ messages in thread

* Re: [dpdk-dev] [PATCH] net/ixgbe: delete MAC control frame fwd in struct adapter
  2020-05-22  6:12 [dpdk-dev] [PATCH] net/ixgbe: delete MAC control frame fwd in struct adapter Guinan Sun
  2020-05-22  7:46 ` Yang, Qiming
@ 2020-05-22  9:42 ` Zhao1, Wei
  2020-05-22  9:46 ` Zhao1, Wei
  2020-05-23  5:22 ` [dpdk-dev] [PATCH v2 0/2] fix MAC ctrl frame fwd get Guinan Sun
  3 siblings, 0 replies; 12+ messages in thread
From: Zhao1, Wei @ 2020-05-22  9:42 UTC (permalink / raw)
  To: Sun, GuinanX, dev; +Cc: stable, Ye, Xiaolong, Yang, Qiming


Hi, Guinan
 
> -----Original Message-----
> From: Sun, GuinanX <guinanx.sun@intel.com>
> Sent: Friday, May 22, 2020 2:12 PM
> To: dev@dpdk.org
> Cc: Zhao1, Wei <wei.zhao1@intel.com>; Sun, GuinanX
> <guinanx.sun@intel.com>; stable@dpdk.org
> Subject: [PATCH] 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 stop port stop 0 port
> testpmd> start 0 start

This test step seems confused.

> 
> 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] 12+ messages in thread

* Re: [dpdk-dev] [PATCH] net/ixgbe: delete MAC control frame fwd in struct adapter
  2020-05-22  6:12 [dpdk-dev] [PATCH] net/ixgbe: delete MAC control frame fwd in struct adapter Guinan Sun
  2020-05-22  7:46 ` Yang, Qiming
  2020-05-22  9:42 ` Zhao1, Wei
@ 2020-05-22  9:46 ` Zhao1, Wei
  2020-05-23  2:35   ` Sun, GuinanX
  2020-05-23  5:22 ` [dpdk-dev] [PATCH v2 0/2] fix MAC ctrl frame fwd get Guinan Sun
  3 siblings, 1 reply; 12+ messages in thread
From: Zhao1, Wei @ 2020-05-22  9:46 UTC (permalink / raw)
  To: Sun, GuinanX, dev; +Cc: stable, Yang, Qiming, Ye, Xiaolong

Hi,

> -----Original Message-----
> From: Sun, GuinanX <guinanx.sun@intel.com>
> Sent: Friday, May 22, 2020 2:12 PM
> To: dev@dpdk.org
> Cc: Zhao1, Wei <wei.zhao1@intel.com>; Sun, GuinanX
> <guinanx.sun@intel.com>; stable@dpdk.org
> Subject: [PATCH] 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 stop port stop 0 port
> testpmd> start 0 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;
> +


Error, that is not right!!

>  	if (mflcn_reg & (IXGBE_MFLCN_RPFCE | IXGBE_MFLCN_RFCE))
>  		rx_pause = 1;
>  	else
> --
> 2.17.1


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

* Re: [dpdk-dev] [PATCH] net/ixgbe: delete MAC control frame fwd in struct adapter
  2020-05-22  9:46 ` Zhao1, Wei
@ 2020-05-23  2:35   ` Sun, GuinanX
  0 siblings, 0 replies; 12+ messages in thread
From: Sun, GuinanX @ 2020-05-23  2:35 UTC (permalink / raw)
  To: Zhao1, Wei, dev; +Cc: stable, Yang, Qiming, Ye, Xiaolong

Hi

> -----Original Message-----
> From: Zhao1, Wei
> Sent: Friday, May 22, 2020 5:47 PM
> To: Sun, GuinanX <guinanx.sun@intel.com>; dev@dpdk.org
> Cc: stable@dpdk.org; Yang, Qiming <qiming.yang@intel.com>; Ye, Xiaolong
> <xiaolong.ye@intel.com>
> Subject: RE: [PATCH] net/ixgbe: delete MAC control frame fwd in struct adapter
> 
> Hi,
> 
> > -----Original Message-----
> > From: Sun, GuinanX <guinanx.sun@intel.com>
> > Sent: Friday, May 22, 2020 2:12 PM
> > To: dev@dpdk.org
> > Cc: Zhao1, Wei <wei.zhao1@intel.com>; Sun, GuinanX
> > <guinanx.sun@intel.com>; stable@dpdk.org
> > Subject: [PATCH] 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 stop port stop 0 port
> > testpmd> start 0 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;
> > +
> 
> 
> 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.

> 
> >  if (mflcn_reg & (IXGBE_MFLCN_RPFCE | IXGBE_MFLCN_RFCE))  rx_pause =
> > 1;  else
> > --
> > 2.17.1
> 


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

* [dpdk-dev] [PATCH v2 0/2] fix MAC ctrl frame fwd get
  2020-05-22  6:12 [dpdk-dev] [PATCH] net/ixgbe: delete MAC control frame fwd in struct adapter Guinan Sun
                   ` (2 preceding siblings ...)
  2020-05-22  9:46 ` Zhao1, Wei
@ 2020-05-23  5:22 ` Guinan Sun
  2020-05-23  5:22   ` [dpdk-dev] [PATCH v2 1/2] net/ixgbe: fix incorrect MAC control frame forward Guinan Sun
                     ` (4 more replies)
  3 siblings, 5 replies; 12+ messages in thread
From: Guinan Sun @ 2020-05-23  5:22 UTC (permalink / raw)
  To: dev; +Cc: Zhao1 Wei, Qiming Yang, Guinan Sun

Fix 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(-)

-- 
2.17.1


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

* [dpdk-dev] [PATCH v2 1/2] net/ixgbe: fix incorrect MAC control frame forward
  2020-05-23  5:22 ` [dpdk-dev] [PATCH v2 0/2] fix MAC ctrl frame fwd get Guinan Sun
@ 2020-05-23  5:22   ` Guinan Sun
  2020-05-23  5:22   ` [dpdk-dev] [PATCH v2 2/2] net/ixgbe: fix flow control status get Guinan Sun
                     ` (3 subsequent siblings)
  4 siblings, 0 replies; 12+ messages in thread
From: Guinan Sun @ 2020-05-23  5:22 UTC (permalink / raw)
  To: dev; +Cc: Zhao1 Wei, Qiming Yang, Guinan Sun, stable

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.

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

Signed-off-by: Guinan Sun <guinanx.sun@intel.com>
---
v2 changes:
* Modified commit messge.
---
 drivers/net/ixgbe/ixgbe_ethdev.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
index f8a84c565..42947ba40 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;
 }
 
-- 
2.17.1


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

* [dpdk-dev] [PATCH v2 2/2] net/ixgbe: fix flow control status get
  2020-05-23  5:22 ` [dpdk-dev] [PATCH v2 0/2] fix MAC ctrl frame fwd get Guinan Sun
  2020-05-23  5:22   ` [dpdk-dev] [PATCH v2 1/2] net/ixgbe: fix incorrect MAC control frame forward Guinan Sun
@ 2020-05-23  5:22   ` Guinan Sun
  2020-06-02 10:54     ` Jiang, YuX
  2020-05-23  9:43   ` [dpdk-dev] [PATCH v2 0/2] fix MAC ctrl frame fwd get Zhao1, Wei
                     ` (2 subsequent siblings)
  4 siblings, 1 reply; 12+ messages in thread
From: Guinan Sun @ 2020-05-23  5:22 UTC (permalink / raw)
  To: dev; +Cc: Zhao1 Wei, Qiming Yang, Guinan Sun, stable

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 <guinanx.sun@intel.com>
---
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


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

* Re: [dpdk-dev] [PATCH v2 0/2] fix MAC ctrl frame fwd get
  2020-05-23  5:22 ` [dpdk-dev] [PATCH v2 0/2] fix MAC ctrl frame fwd get Guinan Sun
  2020-05-23  5:22   ` [dpdk-dev] [PATCH v2 1/2] net/ixgbe: fix incorrect MAC control frame forward Guinan Sun
  2020-05-23  5:22   ` [dpdk-dev] [PATCH v2 2/2] net/ixgbe: fix flow control status get Guinan Sun
@ 2020-05-23  9:43   ` Zhao1, Wei
  2020-07-20  9:56   ` Zhao1, Wei
  2020-07-20 10:42   ` Zhang, Qi Z
  4 siblings, 0 replies; 12+ messages in thread
From: Zhao1, Wei @ 2020-05-23  9:43 UTC (permalink / raw)
  To: Sun, GuinanX, dev; +Cc: Yang, Qiming

Reviewed-by: Wei Zhao <wei.zhao1@intel.com>

> -----Original Message-----
> From: Sun, GuinanX <guinanx.sun@intel.com>
> Sent: Saturday, May 23, 2020 1:23 PM
> To: dev@dpdk.org
> Cc: Zhao1, Wei <wei.zhao1@intel.com>; Yang, Qiming
> <qiming.yang@intel.com>; Sun, GuinanX <guinanx.sun@intel.com>
> Subject: [PATCH v2 0/2] fix MAC ctrl frame fwd get
> 
> Fix 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(-)
> 
> --
> 2.17.1


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

* Re: [dpdk-dev] [PATCH v2 2/2] net/ixgbe: fix flow control status get
  2020-05-23  5:22   ` [dpdk-dev] [PATCH v2 2/2] net/ixgbe: fix flow control status get Guinan Sun
@ 2020-06-02 10:54     ` Jiang, YuX
  0 siblings, 0 replies; 12+ messages in thread
From: Jiang, YuX @ 2020-06-02 10:54 UTC (permalink / raw)
  To: Sun, GuinanX, dev, Chen, BoX C
  Cc: Zhao1, Wei, Yang, Qiming, Sun, GuinanX, stable

Tested-by: Chen, BoX C <box.c.chen@intel.com>

-----Original Message-----
From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Guinan Sun
Sent: Saturday, May 23, 2020 1:23 PM
To: dev@dpdk.org
Cc: Zhao1, Wei <wei.zhao1@intel.com>; Yang, Qiming <qiming.yang@intel.com>; Sun, GuinanX <guinanx.sun@intel.com>; stable@dpdk.org
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: stable@dpdk.org

Signed-off-by: Guinan Sun <guinanx.sun@intel.com>
---
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


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

* Re: [dpdk-dev] [PATCH v2 0/2] fix MAC ctrl frame fwd get
  2020-05-23  5:22 ` [dpdk-dev] [PATCH v2 0/2] fix MAC ctrl frame fwd get Guinan Sun
                     ` (2 preceding siblings ...)
  2020-05-23  9:43   ` [dpdk-dev] [PATCH v2 0/2] fix MAC ctrl frame fwd get Zhao1, Wei
@ 2020-07-20  9:56   ` Zhao1, Wei
  2020-07-20 10:42   ` Zhang, Qi Z
  4 siblings, 0 replies; 12+ messages in thread
From: Zhao1, Wei @ 2020-07-20  9:56 UTC (permalink / raw)
  To: Sun, GuinanX, dev; +Cc: Yang, Qiming

Reviewed-by: Wei Zhao <wei.zhao1@intel.com>


> -----Original Message-----
> From: Sun, GuinanX <guinanx.sun@intel.com>
> Sent: Saturday, May 23, 2020 1:23 PM
> To: dev@dpdk.org
> Cc: Zhao1, Wei <wei.zhao1@intel.com>; Yang, Qiming
> <qiming.yang@intel.com>; Sun, GuinanX <guinanx.sun@intel.com>
> Subject: [PATCH v2 0/2] fix MAC ctrl frame fwd get
> 
> Fix 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(-)
> 
> --
> 2.17.1


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

* Re: [dpdk-dev] [PATCH v2 0/2] fix MAC ctrl frame fwd get
  2020-05-23  5:22 ` [dpdk-dev] [PATCH v2 0/2] fix MAC ctrl frame fwd get Guinan Sun
                     ` (3 preceding siblings ...)
  2020-07-20  9:56   ` Zhao1, Wei
@ 2020-07-20 10:42   ` Zhang, Qi Z
  4 siblings, 0 replies; 12+ messages in thread
From: Zhang, Qi Z @ 2020-07-20 10:42 UTC (permalink / raw)
  To: Sun, GuinanX, dev; +Cc: Zhao1, Wei, Yang, Qiming, Sun, GuinanX



> -----Original Message-----
> From: dev <dev-bounces@dpdk.org> On Behalf Of Guinan Sun
> Sent: Saturday, May 23, 2020 1:23 PM
> To: dev@dpdk.org
> Cc: Zhao1, Wei <wei.zhao1@intel.com>; Yang, Qiming
> <qiming.yang@intel.com>; Sun, GuinanX <guinanx.sun@intel.com>
> Subject: [dpdk-dev] [PATCH v2 0/2] fix MAC ctrl frame fwd get
> 
> Fix 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(-)
> 
> --
> 2.17.1


Acked-by: Qi Zhang <qi.z.zhang@intel.com>

Applied to dpdk-next-net-intel.

Thanks
Qi

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

end of thread, other threads:[~2020-07-20 10:44 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-22  6:12 [dpdk-dev] [PATCH] net/ixgbe: delete MAC control frame fwd in struct adapter Guinan Sun
2020-05-22  7:46 ` Yang, Qiming
2020-05-22  9:42 ` Zhao1, Wei
2020-05-22  9:46 ` Zhao1, Wei
2020-05-23  2:35   ` Sun, GuinanX
2020-05-23  5:22 ` [dpdk-dev] [PATCH v2 0/2] fix MAC ctrl frame fwd get Guinan Sun
2020-05-23  5:22   ` [dpdk-dev] [PATCH v2 1/2] net/ixgbe: fix incorrect MAC control frame forward Guinan Sun
2020-05-23  5:22   ` [dpdk-dev] [PATCH v2 2/2] net/ixgbe: fix flow control status get Guinan Sun
2020-06-02 10:54     ` Jiang, YuX
2020-05-23  9:43   ` [dpdk-dev] [PATCH v2 0/2] fix MAC ctrl frame fwd get Zhao1, Wei
2020-07-20  9:56   ` Zhao1, Wei
2020-07-20 10:42   ` Zhang, Qi Z

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).