From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id 56F461AFF for ; Mon, 24 Sep 2018 15:07:38 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 24 Sep 2018 06:07:37 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.54,298,1534834800"; d="scan'208";a="266200378" Received: from irsmsx151.ger.corp.intel.com ([163.33.192.59]) by fmsmga006.fm.intel.com with ESMTP; 24 Sep 2018 06:07:19 -0700 Received: from irsmsx109.ger.corp.intel.com ([169.254.13.156]) by IRSMSX151.ger.corp.intel.com ([169.254.4.94]) with mapi id 14.03.0319.002; Mon, 24 Sep 2018 14:07:18 +0100 From: "Pattan, Reshma" To: "longtb5@viettel.com.vn" CC: "Ananyev, Konstantin" , "dev@dpdk.org" Thread-Topic: [PATCH] latencystats: fix timestamp marking and latency calculation Thread-Index: AQHUUcR8+BpEkWljakW68pBrFc8fu6T7i/QAgAPeYRA= Date: Mon, 24 Sep 2018 13:07:18 +0000 Message-ID: <3AEA2BF9852C6F48A459DA490692831F2A39E20E@IRSMSX109.ger.corp.intel.com> References: <1537545703-9599-1-git-send-email-reshma.pattan@intel.com> <000201d45221$394a8350$abdf89f0$@viettel.com.vn> In-Reply-To: <000201d45221$394a8350$abdf89f0$@viettel.com.vn> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.0.200.100 dlp-reaction: no-action x-originating-ip: [163.33.239.180] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH] latencystats: fix timestamp marking and latency calculation X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Sep 2018 13:07:38 -0000 Hi, > -----Original Message----- > From: longtb5@viettel.com.vn [mailto:longtb5@viettel.com.vn] > Sent: Saturday, September 22, 2018 3:58 AM > To: Pattan, Reshma ; Ananyev, Konstantin > ; dev@dpdk.org > Subject: RE: [PATCH] latencystats: fix timestamp marking and latency > calculation >=20 > Hi Reshma, >=20 > > -----Original Message----- > > From: reshma.pattan@intel.com [mailto:reshma.pattan@intel.com] > > Sent: Friday, September 21, 2018 11:02 PM > > To: longtb5@viettel.com.vn; konstantin.ananyev@intel.com; > dev@dpdk.org > > Cc: Reshma Pattan > > 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. > > >=20 > 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. >=20 Do you mean latency stats document? Or Mbuf doc. =20 Thanks, Reshma