[dpdk-dev] [PATCH] net/ixgbevf: fix stats update after a PF reset

Dai, Wei wei.dai at intel.com
Wed Mar 29 11:22:55 CEST 2017


First of all, I don't agree the method in this patch because the register can also rewind to 0 in normal mode except
reset/PF down.

In the function void ixgbe_down(struct ixgbe_adapter *adapter) of ixgbe_main.c in the ixgbe kernel PF driver (version 5.0.4),
the PF in kernel driver will ping all the active vfs to let them know PF is going down by mailbox messages.

On other side, ixgbe VF in DPDK PMD will handle the ping mailbox message in ixgbevf_dev_interrupt_handler( ) which is
registered interrupt routine. 
And ixgbevf_dev_interrupt_handler( ) will call ixgbevf_mbx_process( ) to process mailbox message from PF.

So it is in ixgbevf_mbx_process( ) where the SW stats registers of VF can be fixed.
There is more than one line to send ping message to VF in kernel PF drvier codes.
I am studying it to make it clear how to identify the ping message due to PF down.

So can we defer this patch first.
And another patch in above way should be submitted.

Thanks

> -----Original Message-----
> From: Thomas Monjalon [mailto:thomas.monjalon at 6wind.com]
> Sent: Tuesday, March 28, 2017 11:23 PM
> To: Zhang, Helin <helin.zhang at intel.com>; Ananyev, Konstantin
> <konstantin.ananyev at intel.com>
> Cc: dev at dpdk.org; Olivier Matz <olivier.matz at 6wind.com>; Dai, Wei
> <wei.dai at intel.com>; Guo Fengtian <fengtian.guo at 6wind.com>; Yigit, Ferruh
> <ferruh.yigit at intel.com>
> Subject: Re: [dpdk-dev] [PATCH] net/ixgbevf: fix stats update after a PF reset
> 
> Please ixgbe maintainers, what can be done for this fix?
> 
> 2017-03-24 15:11, Olivier Matz:
> > Hi,
> >
> > (remove stable at dpdk.org)
> >
> > On Tue, 14 Mar 2017 10:46:40 +0100, Olivier Matz <olivier.matz at 6wind.com>
> wrote:
> > > Hi Wei,
> > >
> > > On Thu, 16 Feb 2017 17:49:22 +0100, Olivier Matz
> <olivier.matz at 6wind.com> wrote:
> > > > Hi Wei,
> > > >
> > > > On Thu, 9 Feb 2017 14:50:05 +0000, "Dai, Wei" <wei.dai at intel.com>
> wrote:
> > > > > > -----Original Message-----
> > > > > > From: Dai, Wei
> > > > > > Sent: Thursday, February 9, 2017 10:38 PM
> > > > > > To: 'Olivier Matz' <olivier.matz at 6wind.com>; dev at dpdk.org;
> > > > > > Zhang, Helin <helin.zhang at intel.com>; Ananyev, Konstantin
> > > > > > <konstantin.ananyev at intel.com>
> > > > > > Cc: Guo Fengtian <fengtian.guo at 6wind.com>; stable at dpdk.org
> > > > > > Subject: RE: [dpdk-dev] [PATCH] net/ixgbevf: fix stats update
> > > > > > after a PF reset
> > > > > >
> > > > > > The stats register can rewind to zero when the port is running
> > > > > > for a long period. So I am afraid that this check is not always correct.
> > > > > > Why not introduce a variable to directly indicate whether the
> > > > > > resulted stats should be updated or not.
> > > > >
> > > > > Another way is to clear
> > > > > hw_stats->last_vfgprc/last_vfgorc/last_vfgptc/last_vfmprc at the
> > > > > same time PF is set down.
> > > > >
> > > >
> > > > Can we know easily in VF if the PF was set down?
> > >
> > > Any guideline for this? Or is it something we cannot fix?
> > >
> >
> > Is any maintainer available to help to fix that?
> >
> > Unfortunately I don't have enough knowledge on this driver to do the
> > fix by myself. It would be helpful to have some guidelines by a
> > maintainer so I can understand what is the proper way to fix the issue.
> >
> > Thanks,
> > Olivier
> 



More information about the dev mailing list