From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id E79E5239 for ; Tue, 19 Mar 2019 14:33:00 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 19 Mar 2019 06:33:00 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.58,498,1544515200"; d="scan'208";a="308487889" Received: from fyigit-mobl.ger.corp.intel.com (HELO [10.237.221.46]) ([10.237.221.46]) by orsmga005.jf.intel.com with ESMTP; 19 Mar 2019 06:32:57 -0700 To: Tom Barbette , Ferruh Yigit , Shahaf Shuler , "dev@dpdk.org" , Thomas Monjalon , Andrew Rybchenko Cc: "bruce.richardson@intel.com" , "john.mcnamara@intel.com" , Yongseok Koh , Alejandro Lucero , Konstantin Ananyev References: <3811860b2a7b4bd2be2e9d3fd7de23c0@exdb05.ug.kth.se> <1546947039501.61612@kth.se> From: "Yigit, Ferruh" Message-ID: <688f9052-b861-0446-5eda-44952bb39f1e@linux.intel.com> Date: Tue, 19 Mar 2019 13:32:56 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.5.3 MIME-Version: 1.0 In-Reply-To: <1546947039501.61612@kth.se> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH 1/3] rte_ethdev: Add API function to read dev clock 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: Tue, 19 Mar 2019 13:33:01 -0000 On 1/8/2019 11:30 AM, Tom Barbette wrote: > Ferruh Yigit wrote: >> Why timestamp offloading become useless? When timestamp offloading enabled, >> device fills 'mbuf.timestamp' and you can use it. > But the frequency is unknown, and the reference time neither. So it can be used only to know that "some time passed" between packets. > >> For your case this timestamp for mlx is device clock and you are adding this API >> to be able to convert device clock to real time, this is not something enables >> the timestamp offload. > I get your point, but a keyboard is highly required to use a computer. It's pretty much useless without it. Without this API, the timestamp offload makes no sense. It's a random number generator at best... > >> Technically driver can set the 'mbuf.timestamp' with the real clock right, if it >> is required? Or this can be defined by a devarg? > I don't think so. Device have no sense of system time. And doing it in the driver is tricky because it depends on the user needs. Catch-up with NTP updates would need a timer and various parameters... Hence we prefer to give a simple working code, and users may do this if they want. > > > For the other comments it's not my call... I would just underline that timestamp offload is not usable in the current state, and there is a lot of use case for monitoring latency-sensitive applications. Hi Thomas, Andrew, CAn you please comment on patch, it adds a new 'rte_eth_read_clock()' API to read device clock to read timestamp value, later to use this value to map to the actual time. So that can convert timestamp information from each packet into real time. My question was if this is common requirement or specific to single device? And if can be handles in driver level. Thanks, ferruh From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id 8A0CBA00E6 for ; Tue, 19 Mar 2019 14:33:03 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 9345E11A4; Tue, 19 Mar 2019 14:33:02 +0100 (CET) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id E79E5239 for ; Tue, 19 Mar 2019 14:33:00 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 19 Mar 2019 06:33:00 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.58,498,1544515200"; d="scan'208";a="308487889" Received: from fyigit-mobl.ger.corp.intel.com (HELO [10.237.221.46]) ([10.237.221.46]) by orsmga005.jf.intel.com with ESMTP; 19 Mar 2019 06:32:57 -0700 To: Tom Barbette , Ferruh Yigit , Shahaf Shuler , "dev@dpdk.org" , Thomas Monjalon , Andrew Rybchenko Cc: "bruce.richardson@intel.com" , "john.mcnamara@intel.com" , Yongseok Koh , Alejandro Lucero , Konstantin Ananyev References: <3811860b2a7b4bd2be2e9d3fd7de23c0@exdb05.ug.kth.se> <1546947039501.61612@kth.se> From: "Yigit, Ferruh" Message-ID: <688f9052-b861-0446-5eda-44952bb39f1e@linux.intel.com> Date: Tue, 19 Mar 2019 13:32:56 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.5.3 MIME-Version: 1.0 In-Reply-To: <1546947039501.61612@kth.se> Content-Type: text/plain; charset="UTF-8" Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH 1/3] rte_ethdev: Add API function to read dev clock 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Message-ID: <20190319133256.Racd58cCe1OTgQ8p_V_u34AUashRd8Eay-YGgEeNs3Q@z> On 1/8/2019 11:30 AM, Tom Barbette wrote: > Ferruh Yigit wrote: >> Why timestamp offloading become useless? When timestamp offloading enabled, >> device fills 'mbuf.timestamp' and you can use it. > But the frequency is unknown, and the reference time neither. So it can be used only to know that "some time passed" between packets. > >> For your case this timestamp for mlx is device clock and you are adding this API >> to be able to convert device clock to real time, this is not something enables >> the timestamp offload. > I get your point, but a keyboard is highly required to use a computer. It's pretty much useless without it. Without this API, the timestamp offload makes no sense. It's a random number generator at best... > >> Technically driver can set the 'mbuf.timestamp' with the real clock right, if it >> is required? Or this can be defined by a devarg? > I don't think so. Device have no sense of system time. And doing it in the driver is tricky because it depends on the user needs. Catch-up with NTP updates would need a timer and various parameters... Hence we prefer to give a simple working code, and users may do this if they want. > > > For the other comments it's not my call... I would just underline that timestamp offload is not usable in the current state, and there is a lot of use case for monitoring latency-sensitive applications. Hi Thomas, Andrew, CAn you please comment on patch, it adds a new 'rte_eth_read_clock()' API to read device clock to read timestamp value, later to use this value to map to the actual time. So that can convert timestamp information from each packet into real time. My question was if this is common requirement or specific to single device? And if can be handles in driver level. Thanks, ferruh