From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by dpdk.org (Postfix) with ESMTP id 0C2B5F04 for ; Fri, 21 Sep 2018 14:14:29 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 21 Sep 2018 05:14:28 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.54,285,1534834800"; d="scan'208";a="85446016" Received: from irsmsx154.ger.corp.intel.com ([163.33.192.96]) by orsmga003.jf.intel.com with ESMTP; 21 Sep 2018 05:14:26 -0700 Received: from irsmsx105.ger.corp.intel.com ([169.254.7.54]) by IRSMSX154.ger.corp.intel.com ([169.254.12.187]) with mapi id 14.03.0319.002; Fri, 21 Sep 2018 13:14:26 +0100 From: "Ananyev, Konstantin" To: "Pattan, Reshma" , "longtb5@viettel.com.vn" CC: "dev@dpdk.org" Thread-Topic: Incorrect latencystats implementation Thread-Index: AQHUUZyBxwb4EV0ZUky4NggnmIRddqT6nKmQ Date: Fri, 21 Sep 2018 12:14:25 +0000 Message-ID: <2601191342CEEE43887BDE71AB977258EA9598D6@irsmsx105.ger.corp.intel.com> References: <1537345496-70207-1-git-send-email-longtb5@viettel.com.vn> <3AEA2BF9852C6F48A459DA490692831F2A39B32D@IRSMSX109.ger.corp.intel.com> <000001d4514f$9f77ecd0$de67c670$@viettel.com.vn> <3AEA2BF9852C6F48A459DA490692831F2A39D6A8@IRSMSX109.ger.corp.intel.com> In-Reply-To: <3AEA2BF9852C6F48A459DA490692831F2A39D6A8@IRSMSX109.ger.corp.intel.com> Accept-Language: en-IE, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiNWVjZDE0ZTAtYjUyMi00ZDJhLWIxOTAtYzBkNDgzNGMxMDU1IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiTjlHMFZvYVNOdmZVOGtVWnEyTktkY1NUM2FlREtMcXF2WWVyQTdSNXBvMWk4SU9QUTVOZFFpZ0xSblh0OW1JdSJ9 x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.0.400.15 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] Incorrect latencystats implementation 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: Fri, 21 Sep 2018 12:14:30 -0000 Hi Reshma, > -----Original Message----- > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Pattan, Reshma > Sent: Friday, September 21, 2018 12:15 PM > To: longtb5@viettel.com.vn > Cc: dev@dpdk.org > Subject: Re: [dpdk-dev] Incorrect latencystats implementation >=20 > Hi, >=20 > > -----Original Message----- > > From: longtb5@viettel.com.vn [mailto:longtb5@viettel.com.vn] > > Sent: Friday, September 21, 2018 2:58 AM > > To: Pattan, Reshma > > Cc: dev@dpdk.org > > Subject: RE: Incorrect latencystats implementation > > > > Hi Reshma, > > > > > -----Original Message----- > > > From: reshma.pattan@intel.com [mailto:reshma.pattan@intel.com] > > > Sent: Thursday, September 20, 2018 8:09 PM > > > To: longtb5@viettel.com.vn > > > Cc: dev@dpdk.org > > > Subject: RE: Incorrect latencystats implementation > > > > > > > > > > > > > -----Original Message----- > > > > From: longtb5@viettel.com.vn [mailto:longtb5@viettel.com.vn] > > > > Sent: Wednesday, September 19, 2018 9:17 AM > > > > To: Pattan, Reshma > > > > Cc: dev@dpdk.org; Bao-Long Tran > > > > Subject: Incorrect latencystats implementation > > > > > > > > > > > > I have submit a patch to implement the trivial fix. For the drop > > > > case I can think of 2 options. We can either clear timestamp when > > > > putting mbufs back to their pool, or change lib latencystats > > > > implementation to perform packet selection at TX callback and let R= X > > > > callback add > > timestamp > > > to every packet. > > > > Both option could affect performance but I think the second option > > > > is less aggressive. > > > > > > What happens when applications drop the packets? Do they free the mbu= f? > > > In such case, can application set the timestamp to 0 before freeing > > > the > > mbuf, > > > instead of making these changes in latency library.? > > > > > > > Yes, applications can set the mbuf timestamp before freeing. But in my > > opinion that would not be a clean solution. Applications should not hav= e to > > worry about the timestamp field at all, since that is an implementation= detail > > of the library. For simple apps, wrapping rte_pktmbuf_free() to perform > > timestamp reset could be done without much hassle, but that kind of ad-= hoc > > solution would become messy for more complex ones where packets are > > dropped at different places. From a usability point of view, as an user= I want > > the lib to provide latency measurements without me having to touch exis= ting > > codebase other than adding codes that use the APIs. > > >=20 > I will send a patch to add timestamp reset in rte_pktmbuf_free(). That = will be a cleaner way I think. > Let's see what other says on the patch. That would probably affect performance. Actually, looking at rte_mbuf.h - timestamp field supposed to be valid only= if PKT_RX_TIMESTAMP is set. >>From other side, as I remember, PMD RX routine should reset RX flags of the= received PMD. So in theory you can rely on PKT_RX_TIMESTAMP to determine use this mbuf fo= r latency calcs or not. Would that help? Konstantin >=20 > Thanks, > Reshma