From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-yw0-f174.google.com (mail-yw0-f174.google.com [209.85.161.174]) by dpdk.org (Postfix) with ESMTP id A13EA2A5E for ; Tue, 6 Dec 2016 16:40:50 +0100 (CET) Received: by mail-yw0-f174.google.com with SMTP id t125so275410706ywc.1 for ; Tue, 06 Dec 2016 07:40:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nyu-edu.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=yjDUWggKYBNekyeIewoAM7P4yKDteebcifpXXsEwKC0=; b=pOacmCTVDieuGphbje3tujd8t9lwB9RGWf3DDg+WmrKnp4sxA2WjwZKkdktFJCe7cx RgQCI4doiByPZycNPol0usZBL+LslSbkfHUeZsSQ7jCFa7/1Vh6vyRqeVx4IMevJ8wwq 1f9LOihuj2l33w2pgL/6r8AdeyJsehDXUCscggQXZGQ+UAG6CXaat+DxGQFstPmvQvV+ 2YDOdo8Ajz+jeZfZHZymXpzeSv022kQSCNa4Ngf1WaiU0vbt0+5gSxwPwhhjS/Maaoze oMN5hmNM9eTlfx8B0vN9br5cgZbTXbKNgC7n1LcH6LaCpjSA4cl6bnM6R1YpJc7w5OnU Kl/w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=yjDUWggKYBNekyeIewoAM7P4yKDteebcifpXXsEwKC0=; b=Q1QCnexLh+o0zqHOXyhlNpycPqKoBujCD3IpOfuFRSN43e9JB5UlPfp/tpI4RNO/gU 35FuOSM6yTDyg9e84FkjauQYKcxDilNugZkau1k4fU8faToCnRLictggVuFuOGwBUq7i kqDp24yFfUpHRhZwn4lqvyvltxsn6OKKkcUPb9gJm1WT828/l5S1RKN9L3X+wgJ7cU6c Ortle3bxCWw2g9MKEDCYL3dAN10LKgZYtuxxwvJu9Il/6lXBcWoPJ5+MldknM5BlkY2b mHgf7lWJyTxbHEjAZJpk0FQctjI2JWV7KiOK5sjcp+BsvDQyXqHZeSXTx5heZHQqgq/Q G/Rw== X-Gm-Message-State: AKaTC03y837XaNskdlwSAsHKdS9gAwsylu61KgfKCinC3fu5y1esy3tSdKnDo642ShsGR4XPQV5XjbahWV90tELs X-Received: by 10.129.107.68 with SMTP id g65mr59994486ywc.218.1481038849999; Tue, 06 Dec 2016 07:40:49 -0800 (PST) MIME-Version: 1.0 Received: by 10.37.208.195 with HTTP; Tue, 6 Dec 2016 07:40:49 -0800 (PST) In-Reply-To: <58A6F009-9B14-4CA2-87E5-54ABDB18D5F7@net.in.tum.de> References: <30743c45-8247-ebf6-45ae-55d95e9bdfce@net.in.tum.de> <7c6da649-dcc4-5225-2ff8-165e27576967@net.in.tum.de> <6D8B2530-CC42-4FA6-947F-50DE77E414B3@usi.ch> <58A6F009-9B14-4CA2-87E5-54ABDB18D5F7@net.in.tum.de> From: Ajinkya D Kadam Date: Tue, 6 Dec 2016 10:40:49 -0500 Message-ID: To: Paul Emmerich Cc: Huynhtu Dang , "users@dpdk.org" Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: Re: [dpdk-users] TimeStamping Packets Generated and Received via Pktgen Application X-BeenThere: users@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK usage discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Dec 2016 15:40:51 -0000 Hi Paul, If I am not wrong this [1] script enables only timestamps for PTP or UDP packets. Is this similar functionality available for TCP packets ? I am generating multiple TCP flows and I just want to time-stamp first packet of each flow. Is this possible using the NICs hardware time-stamping capability ? [1] : https://github.com/libmoon/libmoon/blob/b5f6c2cac42c02db64073b57dd8ca= 8 2692d3858c/examples/hardware-timestamping.lua On Tue, Oct 25, 2016 at 6:57 AM, Paul Emmerich wrote: > Hi, > > the examples in "timestamping-tests.lua" are only meant as a demonstratio= n > of the different timestamping capabilities (and/or as a starting point fo= r > a custom script). > > In your case, you could use a device counter to print the whole throughpu= t > of the device. You can use the default stats task to do that by adding th= e > following call in the master task: > > stats.startStatsTask({rxDev, txDev}) > > I'll also add the call to the example script in the repository later toda= y > as having this is probably a good idea :) > > Paul > > > Am 22.10.2016 um 12:19 schrieb Huynhtu Dang : > > > > Hello Emmerich, > > > > MoonGen is really helpful in measuring performance of network devices. > > I wonder if we could get some information about packet loss > > while running timestamps-software.lua? > > > > Thanks, > > Tu > > > > On Oct 17, 2016, at 12:41 PM, Paul Emmerich mailto:emmericp@net.in.tum.de>> wrote: > > > > Hi, > > > > Ajinkya D Kadam: > > I was reading through your paper and I think this tool will be much mor= e > > helpful to me. Btw I am using quad X710 and dual X520 NICs. > > Is this [1] the right code to look at if i want to see how you have > > achieved hardware based time stamping ? > > > > Yes, run this example script with two directly connected ports for a > simple demo and test of your hardware's capabilities. It will work with > both of your NICs. > > > > In addition, I want to confirm my understanding of why MoonGen is bette= r > > than PktGen in time stamping context. > > PktGen reads the value of rdtsc which it then appends to packet, this > > adds more delay and hence the precision is bad. > > > > Software timestamping by writing the TSC to the packet is also supporte= d > (but the API is less nice, see issue #153): > > > > See examples/timestamping-tests/timestamps-software.lua for an example. > > > > The main problem is that there is unpredictable jitter from the NIC and > PCIe transfer and other random errors. Especially if you are running this > at higher packet rates. > > This leads to the 200-300ns random error that I've previously mentioned= . > > > > > > In case of MoonGen how does this work ? I am not sure. Could you please > > elaborate ? > > > > MoonGen enables the hardware timestamping feature of the NIC and uses > it. The NIC will store the timestamp in a register which needs to be read > before another packet can be timestamped, this limits the throughput of > timestamped packets. However, I've found that you rarely need to timestam= p > *all* packets in a packet generator. You'll have to use software > timestamping if you really need that. > > > > > > Paul > > > > > > Thanks, > > Ajinkya > > > > > > [1] https://github.com/libmoon/libmoon/blob/ > b5f6c2cac42c02db64073b57dd8ca82692d3858c/examples/hardware- > timestamping.lua > > > > =E1=90=A7 > > > > On Sun, Oct 16, 2016 at 6:55 PM, Paul Emmerich mailto:emmericp@net.in.tum.de> > > > wrote: > > > > Hi, > > > > > > Ajinkya D Kadam: > > > > If yes I would like to modify the pktgen code so that each > > transmitting and > > received packet is timestamped. Right now I am exploring the > > example > > applications like rxtx_callbacks which timestamps packets in > > DPDK, Is this > > the right direction to go ? > > > > > > Check out my packet generator MoonGen > > https://github.com/emmericp/MoonGen > > > > > > It uses the hardware timestamping features (PTP) to do latency > > measurements in the nanosecond-range. > > > > However, if you will run into hardware limitations if you want to > > timestamp *all* packets. This is sometimes supported on RX (e.g., > > i310, X550) but I don't know a NIC that supports this on TX. > > > > As for the precision that is achievable: ~10ns (depending on the > > NIC) with hardware support. Software timestamping will typically > > result in a standard deviation of 200-300ns under load and there > > will be huge outliers. > > > > > > Paul > >