[dpdk-dev] [PATCH v4] net/ixgbe: fix flow ctrl mode setting

Zhao1, Wei wei.zhao1 at intel.com
Sat May 9 11:49:19 CEST 2020


Hi,guinan

	More info for this problem:
If some user set mac_ctrl_frame_fwd to 1 from fc ops, then he do a port reset process of

"
1. testpmd> start
2. testpmd> set flow_ctrl mac_ctrl_frame_fwd on 0 
3. testpmd> stop 
4. testpmd> port stop 0 
5. testpmd> port start 0 
6. 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. 
Another problem is "add mac_ctrl_frame_fwd in ixgbe_flow_ctrl_get() for FC info get", it is Independent on the above one.

> -----Original Message-----
> From: Sun, GuinanX <guinanx.sun at intel.com>
> Sent: Saturday, May 9, 2020 4:55 PM
> To: Zhao1, Wei <wei.zhao1 at intel.com>; dev at dpdk.org
> Cc: Lu, Wenzhuo <wenzhuo.lu at intel.com>; Yang, Qiming
> <qiming.yang at intel.com>; Zhang, Qi Z <qi.z.zhang at intel.com>;
> stable at dpdk.org; Guo, Jia <jia.guo at intel.com>
> Subject: RE: [dpdk-dev] [PATCH v4] net/ixgbe: fix flow ctrl mode setting
> 
> Hi ,zhaowei
> 
> > -----Original Message-----
> > From: Zhao1, Wei
> > Sent: Saturday, May 9, 2020 3:35 PM
> > To: Sun, GuinanX <guinanx.sun at intel.com>; dev at dpdk.org
> > Cc: Lu, Wenzhuo <wenzhuo.lu at intel.com>; Yang, Qiming
> > <qiming.yang at intel.com>; Zhang, Qi Z <qi.z.zhang at intel.com>; Sun,
> > GuinanX <guinanx.sun at intel.com>; stable at dpdk.org; Guo, Jia
> > <jia.guo at intel.com>
> > Subject: RE: [dpdk-dev] [PATCH v4] net/ixgbe: fix flow ctrl mode
> > setting
> >
> > Hi, guinan
> >
> >  In this patch, you have add a new parameter of mac_ctrl_frame_fwd, it
> > should not be clear in ixgbe_dev_stop(), Or it will be over write when
> > do port reset, and also you should add mac_ctrl_frame_fwd in
> > ixgbe_flow_ctrl_get() for FC info get.
> > Although this patch has been merged, please commit fix patch for it, thanks!
> >
> 
> For this question, I need to confirm the requirements with Konieczny TomaszX
> before I can decide whether to make changes.
> 
> >
> >
> > > -----Original Message-----
> > > From: dev <dev-bounces at dpdk.org> On Behalf Of Guinan Sun
> > > Sent: Tuesday, February 18, 2020 11:40 AM
> > > To: dev at dpdk.org
> > > Cc: Lu, Wenzhuo <wenzhuo.lu at intel.com>; Yang, Qiming
> > > <qiming.yang at intel.com>; Zhang, Qi Z <qi.z.zhang at intel.com>; Sun,
> > > GuinanX <guinanx.sun at intel.com>; stable at dpdk.org
> > > Subject: [dpdk-dev] [PATCH v4] net/ixgbe: fix flow ctrl mode setting
> > >
> > > When the port starts, the hw register is reset first, and then the
> > > required parameters are set again.
> > > If the parameters to be used are not set after resetting the
> > > register, a read register error will occur. This patch is used to fix the
> problem.
> > >
> > > Fixes: af75078fece3 ("first public release")
> > > Cc: stable at dpdk.org
> > >
> > > Signed-off-by: Guinan Sun <guinanx.sun at intel.com>
> > > ---
> > > v4: changes
> > > * rebase to dpdk-next-net-intel
> > >
> > > v3: changes
> > > * wrap duplication code into a function
> > > * Modify checkpatch warnings
> > >
> > > v2: changes
> > > * Modify the initial value of requested_mode and current_mode
> > > ---
> > >  drivers/net/ixgbe/ixgbe_ethdev.c | 76
> > > +++++++++++++++++++++----------- drivers/net/ixgbe/ixgbe_ethdev.h |
> > > +++++++++++++++++++++1
> > > +
> > >  2 files changed, 51 insertions(+), 26 deletions(-)
> > >
> > > diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c
> > > b/drivers/net/ixgbe/ixgbe_ethdev.c
> > > index 3aab24e82..08b4cc689 100644
> > > --- a/drivers/net/ixgbe/ixgbe_ethdev.c
> > > +}
> > > +
> > >  err = ixgbe_dev_rxtx_start(dev);
> > >  if (err < 0) {
> > >  PMD_INIT_LOG(ERR, "Unable to start rxtx queues"); @@ -2900,6
> > > +2939,8 @@ ixgbe_dev_stop(struct rte_eth_dev *dev)
> > >
> > >  adapter->rss_reta_updated = 0;
> > >
> > > +adapter->mac_ctrl_frame_fwd = 0;
> > > +
> >
> > Delete it please.
> >
> >
> >
> >
> >
> 



More information about the dev mailing list