Message ID | 20200522061208.31694-1-guinanx.sun@intel.com (mailing list archive) |
---|---|
State | Superseded, archived |
Delegated to: | xiaolong ye |
Headers | show |
Series | net/ixgbe: delete MAC control frame fwd in struct adapter | expand |
Context | Check | Description |
---|---|---|
ci/Intel-compilation | success | Compilation OK |
ci/travis-robot | success | Travis build: passed |
ci/iol-testing | fail | Testing issues |
ci/iol-mellanox-Performance | success | Performance Testing PASS |
ci/iol-nxp-Performance | success | Performance Testing PASS |
ci/iol-intel-Performance | success | Performance Testing PASS |
ci/checkpatch | warning | coding style issues |
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
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
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
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 >
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
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(-)