From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from bilemail1.empirix.com (bilemail1.empirix.com [208.67.76.245]) by dpdk.org (Postfix) with ESMTP id 896495921 for ; Fri, 9 Oct 2015 17:30:39 +0200 (CEST) Received: from BILEMAIL1.empirix.com (10.17.8.30) by bilemail1.empirix.com (10.17.8.30) with Microsoft SMTP Server (TLS) id 15.0.775.38; Fri, 9 Oct 2015 11:30:20 -0400 Received: from BILEMAIL1.empirix.com ([fe80::f9e0:9293:2523:f021]) by bilemail1.empirix.com ([fe80::f9e0:9293:2523:f021%22]) with mapi id 15.00.0775.031; Fri, 9 Oct 2015 11:30:20 -0400 From: "Montorsi, Francesco" To: "dev@dpdk.org" Thread-Topic: Accurate timestamps in received packets Thread-Index: AdECoeRGBbnp2n4lTluzoJeGQ8/Ktg== Date: Fri, 9 Oct 2015 15:30:19 +0000 Message-ID: <825e846fd8934cc0b34293a8a1542bd2@bilemail1.empirix.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.12.50.106] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: [dpdk-dev] Accurate timestamps in received packets X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Oct 2015 15:30:39 -0000 Hi all, I'm using rte_eth_rx_burst() to successfully retrieve packets from a DPDK-e= nabled port. I can process the packet and everything works fine. My only is= sue is that I cannot find any mean to retrieve a timestamp for every single= packet. As a dirty-workaround I'm using gettimeofday() to timestamp incomi= ng packets but I would rather like to retrieve a more accurate and realisti= c timestamp from the Ethernet PHY layer instead. For example if I receive 3= 2 packets in a single burst I'm just assigning the packets timestamp with 1= ns of difference (using gettimeofday() for the initial time offset). Is there a way to retrieve a realistic timestamp from the Ethernet PHY laye= r? I found this patch searching on the web: =20 http://www.wand.net.nz/trac/libtrace/browser/Intel%20DPDK%20Patches/= hardware_timestamp.patch that is however related to an older DPDK version and works only for INTEL 8= 2580 controllers... do you know if that simple patch linked above could be = similarly ported to Intel 82599 and 82571 controllers? Is there any better/= easier way to do that? Thanks a lot, Francesco Montorsi