From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp-3.sys.kth.se (smtp-3.sys.kth.se [130.237.48.192]) by dpdk.org (Postfix) with ESMTP id BE2F41559 for ; Wed, 5 Sep 2018 09:11:22 +0200 (CEST) Received: from smtp-3.sys.kth.se (localhost.localdomain [127.0.0.1]) by smtp-3.sys.kth.se (Postfix) with ESMTP id 6B48B3A44; Wed, 5 Sep 2018 09:11:22 +0200 (CEST) X-Virus-Scanned: by amavisd-new at kth.se Received: from smtp-3.sys.kth.se ([127.0.0.1]) by smtp-3.sys.kth.se (smtp-3.sys.kth.se [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 4qW-looBhJEj; Wed, 5 Sep 2018 09:11:19 +0200 (CEST) Received: from exdb01.ug.kth.se (unknown [192.168.32.111]) by smtp-3.sys.kth.se (Postfix) with ESMTPS id 6D5274095; Wed, 5 Sep 2018 09:11:17 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kth.se; s=default; t=1536131479; bh=orxCmggmwdKVbIu1cOM5nWrDY47vx7m1PuchX5+KwNo=; h=From:To:CC:Subject:Date:References:In-Reply-To; b=TfR9JlyjtOgxrjcj4QEsd0g1b+rU85Qj9TBKQ6sKtsVOKbYJgCIfTNgiZCvuccjSo jcE1/nq1iJxwJX7862KraQq0e0h+Kft512xyXYwDCcQTjnF5ymQH8L+hmJe0bGlnl+ 7T+szgeTzV3eu9G0nvzX/+3X5shX/3fNM5zdRK8o= Received: from exdb05.ug.kth.se (192.168.32.115) by exdb01.ug.kth.se (192.168.32.111) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Wed, 5 Sep 2018 09:11:16 +0200 Received: from exdb05.ug.kth.se ([192.168.32.115]) by exdb05.ug.kth.se ([192.168.32.115]) with mapi id 15.00.1367.000; Wed, 5 Sep 2018 09:11:16 +0200 From: Tom Barbette To: Shahaf Shuler , "dev@dpdk.org" CC: Yongseok Koh , "john.mcnamara@intel.com" , "marko.kovacevic@intel.com" Thread-Topic: MLX5 should define the timestamp field in the doc Thread-Index: AQHURFrn477t1+S0lkKGIf1HTd0m9KThJ7twgAAZ7Bc= Date: Wed, 5 Sep 2018 07:11:16 +0000 Message-ID: <1536131476329.46769@kth.se> References: <1536071162684.44442@kth.se>, In-Reply-To: Accept-Language: fr-FR, sv-SE, en-US Content-Language: fr-FR X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [130.237.202.15] MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: Re: [dpdk-dev] MLX5 should define the timestamp field in the doc 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: Wed, 05 Sep 2018 07:11:23 -0000 Thanks for your answer Shahaf ! We're trying to measure the latency of packets going through various servic= e chains inside individual "server". Eg. we can see that on Server 1, the = latency for the service chain handling HTTP packets is ~800ns (+ max and mi= ns, tail latency, etc). What we do now is to timestamp packets right after = they are received, and compute the difference with the timestamp just befor= e they are sent. Over a cluster this shows us where the latency is happenin= g. We would like this "box" latency to include the time spent in queues, and f= or that the hardware timestamp seems fit-for-purpose as it would timestamp = the packets before the software queues. Moreover, as we use batching, we lo= se a lot of precision as we timestamp a whole batch at once. I'm pretty sure this use case is of interest for many others. Tail latency = is of the essence nowadays, and finding where packets get delayed precisely= is important. ? Instead of converting the timestamp to real time, in this very use case it = seems the Mellanox card could actually be our unique source of time, we jus= t need to be able to convert ticks to seconds. Any chance we can run an equivalent of mlx5_read_internal_timer (https://el= ixir.bootlin.com/linux/v4.18.5/source/drivers/net/ethernet/mellanox/mlx5/co= re/main.c#L623) ?from userspace ? Are these registers also mapped, or can b= e done so with a few changes? With only that we can actually derive the fre= quency and the offset easily.? Tom