[dpdk-dev] [PATCH 3/5] app/testpmd: add missing transmit errors stats

David Marchand david.marchand at redhat.com
Thu Feb 14 18:39:40 CET 2019


On Thu, Feb 14, 2019 at 5:30 PM Bruce Richardson <bruce.richardson at intel.com>
wrote:

> On Thu, Feb 14, 2019 at 04:42:50PM +0100, David Marchand wrote:
> > pmd can report transmit errors but those stats are not accounted here.
> >
> > Signed-off-by: David Marchand <david.marchand at redhat.com>
> > ---
> >  app/test-pmd/testpmd.c | 1 +
> >  1 file changed, 1 insertion(+)
> >
> > diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c
> > index 984155a..3acd97b 100644
> > --- a/app/test-pmd/testpmd.c
> > +++ b/app/test-pmd/testpmd.c
> > @@ -1838,6 +1838,7 @@ struct extmem_param {
> >               total_recv += stats.ipackets;
> >               total_xmit += stats.opackets;
> >               total_rx_dropped += stats.imissed;
> > +             port->tx_dropped += stats.oerrors;
> >               total_tx_dropped += port->tx_dropped;
> >               total_rx_nombuf  += stats.rx_nombuf;
> >
> >
> Without knowing as to whether the line is needed or not, the line itself
> looks out of place. All other lines are assignments to local variables,
> apart from this. Should a local variable be defined for consistency?
>

Indeed this looks wrong to add it to port->tx_dropped.
It actually "works" since this part is called when stopping forwarding and
port->tx_dropped gets reset later when starting forwarding again.

I suppose I should move this to total_tx_dropped instead.

Thanks Bruce.


-- 
David Marchand


More information about the dev mailing list