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....@intel.com> > Sent: Saturday, May 9, 2020 4:55 PM > To: Zhao1, Wei <wei.zh...@intel.com>; dev@dpdk.org > Cc: Lu, Wenzhuo <wenzhuo...@intel.com>; Yang, Qiming > <qiming.y...@intel.com>; Zhang, Qi Z <qi.z.zh...@intel.com>; > sta...@dpdk.org; Guo, Jia <jia....@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....@intel.com>; dev@dpdk.org > > Cc: Lu, Wenzhuo <wenzhuo...@intel.com>; Yang, Qiming > > <qiming.y...@intel.com>; Zhang, Qi Z <qi.z.zh...@intel.com>; Sun, > > GuinanX <guinanx....@intel.com>; sta...@dpdk.org; Guo, Jia > > <jia....@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-boun...@dpdk.org> On Behalf Of Guinan Sun > > > Sent: Tuesday, February 18, 2020 11:40 AM > > > To: dev@dpdk.org > > > Cc: Lu, Wenzhuo <wenzhuo...@intel.com>; Yang, Qiming > > > <qiming.y...@intel.com>; Zhang, Qi Z <qi.z.zh...@intel.com>; Sun, > > > GuinanX <guinanx....@intel.com>; sta...@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: sta...@dpdk.org > > > > > > Signed-off-by: Guinan Sun <guinanx....@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. > > > > > > > > > > >