From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by dpdk.org (Postfix) with ESMTP id 7211F4CA0 for ; Fri, 21 Sep 2018 13:15:34 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 21 Sep 2018 04:15:33 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.54,284,1534834800"; d="scan'208";a="88133720" Received: from irsmsx105.ger.corp.intel.com ([163.33.3.28]) by fmsmga002.fm.intel.com with ESMTP; 21 Sep 2018 04:15:24 -0700 Received: from irsmsx155.ger.corp.intel.com (163.33.192.3) by irsmsx105.ger.corp.intel.com (163.33.3.28) with Microsoft SMTP Server (TLS) id 14.3.319.2; Fri, 21 Sep 2018 12:15:06 +0100 Received: from irsmsx109.ger.corp.intel.com ([169.254.13.156]) by irsmsx155.ger.corp.intel.com ([169.254.14.243]) with mapi id 14.03.0319.002; Fri, 21 Sep 2018 12:15:06 +0100 From: "Pattan, Reshma" To: "longtb5@viettel.com.vn" CC: "dev@dpdk.org" Thread-Topic: Incorrect latencystats implementation Thread-Index: AQHUT/E39/whJiLATkuTiCuR+qc2OqT5JRqAgADHUQCAAJXUQA== Date: Fri, 21 Sep 2018 11:15:05 +0000 Message-ID: <3AEA2BF9852C6F48A459DA490692831F2A39D6A8@IRSMSX109.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> In-Reply-To: <000001d4514f$9f77ecd0$de67c670$@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.182] 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 11:15:35 -0000 Hi, > -----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 >=20 > Hi Reshma, >=20 > > -----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 RX > > > 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 mbuf? > > In such case, can application set the timestamp to 0 before freeing > > the > mbuf, > > instead of making these changes in latency library.? > > >=20 > Yes, applications can set the mbuf timestamp before freeing. But in my > opinion that would not be a clean solution. Applications should not have = to > worry about the timestamp field at all, since that is an implementation d= etail > 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-ho= c > 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 existi= ng > codebase other than adding codes that use the APIs. >=20 I will send a patch to add timestamp reset in rte_pktmbuf_free(). That wi= ll be a cleaner way I think. Let's see what other says on the patch. Thanks, Reshma