[dpdk-dev] [PATCH] latencystats: fix timestamp marking and latency calculation
longtb5 at viettel.com.vn
longtb5 at viettel.com.vn
Tue Sep 25 17:22:37 CEST 2018
Hi Reshma,
I mean in the latencystats document. A few lines about what is taken away
by the library (the mbuf timestamp when PKT_RX_TIMESTAMP is set) would be
very helpful.
Best regards,
BL
----- Original Message -----
From: "reshma pattan" <reshma.pattan at intel.com>
To: longtb5 at viettel.com.vn
Cc: "Konstantin Ananyev" <konstantin.ananyev at intel.com>, dev at dpdk.org
Sent: Monday, September 24, 2018 8:07:18 PM
Subject: RE: [PATCH] latencystats: fix timestamp marking and latency calculation
Hi,
> -----Original Message-----
> From: longtb5 at viettel.com.vn [mailto:longtb5 at viettel.com.vn]
> Sent: Saturday, September 22, 2018 3:58 AM
> To: Pattan, Reshma <reshma.pattan at intel.com>; Ananyev, Konstantin
> <konstantin.ananyev at intel.com>; dev at dpdk.org
> Subject: RE: [PATCH] latencystats: fix timestamp marking and latency
> calculation
>
> Hi Reshma,
>
> > -----Original Message-----
> > From: reshma.pattan at intel.com [mailto:reshma.pattan at intel.com]
> > Sent: Friday, September 21, 2018 11:02 PM
> > To: longtb5 at viettel.com.vn; konstantin.ananyev at intel.com;
> dev at dpdk.org
> > Cc: Reshma Pattan <reshma.pattan at intel.com>
> > Subject: [PATCH] latencystats: fix timestamp marking and latency
> calculation
> >
> > Latency calculation logic is not correct for the case where packets
> > gets dropped before TX. As for the dropped packets, the timestamp is
> > not cleared, and such packets still gets counted for latency
> > calculation in
> next
> > runs, that will result in inaccurate latency measurement.
> >
> > So fix this issue as below,
> >
> > Before setting timestamp in mbuf, check mbuf don't have any prior
> > valid time stamp flag set and after marking the timestamp, set mbuf
> > flags to indicate timestamp is valid.
> >
> > Before calculating timestamp check mbuf flags are set to indicate
> timestamp
> > is valid.
> >
>
> This solution as suggested by Konstantin is great. Not only does it solve the
> problem but also now the usage of mbuf->timestamp is not exclusive to
> latencystats anymore. The application can make use of timestamp at the
> same as latencystats simply by toggling PKT_RX_TIMESTAMP. I think we
> should update the doc to include this information.
>
Do you mean latency stats document? Or Mbuf doc.
Thanks,
Reshma
More information about the dev
mailing list