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 A34B2A00E6 for ; Wed, 20 Mar 2019 16:57:35 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id CF5DD1B14C; Wed, 20 Mar 2019 16:57:34 +0100 (CET) Received: from dispatch1-us1.ppe-hosted.com (dispatch1-us1.ppe-hosted.com [148.163.129.52]) by dpdk.org (Postfix) with ESMTP id D51681B142 for ; Wed, 20 Mar 2019 16:57:32 +0100 (CET) X-Virus-Scanned: Proofpoint Essentials engine Received: from webmail.solarflare.com (uk.solarflare.com [193.34.186.16]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by mx1-us3.ppe-hosted.com (Proofpoint Essentials ESMTP Server) with ESMTPS id 67676B4008C; Wed, 20 Mar 2019 15:57:30 +0000 (UTC) Received: from [192.168.38.17] (91.220.146.112) by ukex01.SolarFlarecom.com (10.17.10.4) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Wed, 20 Mar 2019 15:57:21 +0000 To: Thomas Monjalon , "Yigit, Ferruh" CC: , Tom Barbette , Ferruh Yigit , Shahaf Shuler , "bruce.richardson@intel.com" , "john.mcnamara@intel.com" , Yongseok Koh , Alejandro Lucero , Konstantin Ananyev References: <3811860b2a7b4bd2be2e9d3fd7de23c0@exdb05.ug.kth.se> <1546947039501.61612@kth.se> <688f9052-b861-0446-5eda-44952bb39f1e@linux.intel.com> <3407362.WhE9PAp8Q4@xps> From: Andrew Rybchenko Message-ID: Date: Wed, 20 Mar 2019 18:57:18 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.5.1 MIME-Version: 1.0 In-Reply-To: <3407362.WhE9PAp8Q4@xps> Content-Language: en-GB X-Originating-IP: [91.220.146.112] X-ClientProxiedBy: ocex03.SolarFlarecom.com (10.20.40.36) To ukex01.SolarFlarecom.com (10.17.10.4) X-TM-AS-Product-Ver: SMEX-12.5.0.1300-8.5.1010-24500.003 X-TM-AS-Result: No-20.157100-8.000000-10 X-TMASE-MatchedRID: Jm7Yxmmj9OkOwH4pD14DsPHkpkyUphL9AGqL073hbdWCsBeCv8CM/R8+ XHETeZCzxphflU1kRp1gz/N1Xpt58I5S/4bo68NboxWB033D5MI99zlLlc49bCG8WMGwsRk0dg5 Us4K5ZbAqQdsTRcTY/iiiMolJ83wlAM0/G7XUdeNtzb3s8Aa1ZnnL427v8Q46nyns0uPuBWQeCd clEIdN9qe17iS7Ihirkw2ZbbtG7Ygal+okeY4Paxes/RxhysDbMx981lgKTcM+iF5IB1Aly7JnP h8w+R5o6vlvsLEmeLBej0XbjkO3/Bk7w4DfFB3D7I0RzvPYnMKusS9CiBzL8eOxOq7LQlGLszZB FC2730Sxj+cG/tVNvoyrjWOq1vxFy37Zd74yArMthMwJZwfKET5ZauPuz7KfB4sIhfTjqIFKslM 7VUaEwXb4Bm7FqQnLz1+7FJCqpLLIDWKFjjZHby+PrAd8gbHJCFEIkVv1y6x5UICQcvBF48Uzzd Iu4oxhTej7fNvaEqD/voIzhn8wZuVHGbcDbAq6OX/V8P8ail1ZDL1gLmoa/PoA9r2LThYYeSC65 CityAzIjUouWqHUMLeAUd5oZoDaNpcEDbSenBspLhyd8DUlVn7cGd19dSFd X-TM-AS-User-Approved-Sender: Yes X-TM-AS-User-Blocked-Sender: No X-TMASE-Result: 10--20.157100-8.000000 X-TMASE-Version: SMEX-12.5.0.1300-8.5.1010-24500.003 X-MDID: 1553097451-oRQWrBC7mi0G Content-Type: text/plain; charset="UTF-8"; format="flowed" Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.15 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: <20190320155718.Fu3pyxGHuRpSn0Yj5kzbJsl4_x83Y5TMIzH21b4DK7w@z> On 3/20/19 5:48 PM, Thomas Monjalon wrote: > 19/03/2019 14:32, Yigit, Ferruh: >> 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. > The approach is smart in my opinion. > It is requesting the time generator (at its source) and allowing > the app to do any kind of time handling strategy. > >> My question was if this is common requirement or specific to single device? > It will work with any device providing some timestamps. > There is nothing specific here in my opinion. > >> And if can be handles in driver level. > Yes, it may be handled differently. > But this approach looks to be the most flexible and reliable. > > Acked-by: Thomas Monjalon Taking into account that timestamp in mbuf is not normalized (neither unit nor reference) and the API helps to normalize units, it makes sense. I recall discussion about timestamp if should be normalized or not, the decision was to keep it undefined. Acked-by: Andrew Rybchenko