From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-yw0-f170.google.com (mail-yw0-f170.google.com [209.85.161.170]) by dpdk.org (Postfix) with ESMTP id 80D2A2B95 for ; Mon, 17 Oct 2016 10:01:18 +0200 (CEST) Received: by mail-yw0-f170.google.com with SMTP id t192so110639900ywf.0 for ; Mon, 17 Oct 2016 01:01:18 -0700 (PDT) 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=6LvnzGfClroXrQ5esFeSnIt+K4mZp52KbnJ60fGYM2E=; b=NnDJqK5z3bGnZEV5iO9PqhFrGKN2vAp5YWZ6whLElPoqryZBpqXNnjKlsIJtwTGLHY /yrk8nMBo+foxdxk+Y6EKzm3FB6MRA8NhlolPA/EiLlBzVm5fXClKDA0mgrTmoNggidF 5pGjLJmhKdwSI1PLJLi9ZXSwdTn78btJF9waWxNonM/Xvd2BNVAjFi582eJlenQKemgm 5auIzsy9R1gOLZc3IWs63tCw1bSJypPeoqBMyg+9cScZu+DSpXmew65lxi6wcQ5kpwb+ E584/YshvkSxTs7sl8XLswleoEaEhwOnd3PBdLzuT7rbAvJKJzYW64Hc2dJIc4yMN4E9 6Vgg== 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=6LvnzGfClroXrQ5esFeSnIt+K4mZp52KbnJ60fGYM2E=; b=QzLvM+PRJhT4S3E+eEddhZqr8j9HtG87NwVNx0x6dlcZ501jeLg8z569aPUTjl2PU9 kGN3c5USFCufVMD0GiIizpoJHGYqT66l6tdByKplk11ViRpWUipd/jCGE3Ph1wxEsYJ5 DYJRguX/qouClU3ngbfupOlw+CK+opSLf2E48sUFh7NPXcmOo0aGSEX90iLa7o/SBjh0 O04GA+8IGoSv9FlULPGGRtq8/XR+E/wuFcT/0OjiEYjv+mpHrc5D55kCt2EekUDTlQ98 tem4icIVkFp/soU2A4BuBle4xqYSrFs67nwOSyUGZvlhPb8kRQB8QXo4NCkpuy6eanq3 f2Vg== X-Gm-Message-State: AA6/9Rl2QbqP2oWdpmZvadXPGfjG9EQ0O+eEihdxDDGBiHD+aDz2Fx/Xe0C858FmxYHIAjlFjSO9LwdKq7bcs4yd X-Received: by 10.129.108.141 with SMTP id h135mr21435269ywc.153.1476691277909; Mon, 17 Oct 2016 01:01:17 -0700 (PDT) MIME-Version: 1.0 Received: by 10.37.45.40 with HTTP; Mon, 17 Oct 2016 01:01:17 -0700 (PDT) In-Reply-To: <30743c45-8247-ebf6-45ae-55d95e9bdfce@net.in.tum.de> References: <30743c45-8247-ebf6-45ae-55d95e9bdfce@net.in.tum.de> From: Ajinkya D Kadam Date: Mon, 17 Oct 2016 04:01:17 -0400 Message-ID: To: Paul Emmerich Cc: 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: usage discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Oct 2016 08:01:18 -0000 Hi Paul, Thanks a lot for your help. I was reading through your paper and I think this tool will be much more 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 ? In addition, I want to confirm my understanding of why MoonGen is better 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. In case of MoonGen how does this work ? I am not sure. Could you please elaborate ? Thanks, Ajinkya [1] https://github.com/libmoon/libmoon/blob/b5f6c2cac42c02db64073b57dd8ca82692d= 3858c/examples/hardware-timestamping.lua =E1=90=A7 On Sun, Oct 16, 2016 at 6:55 PM, Paul Emmerich 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) wit= h > hardware support. Software timestamping will typically result in a standa= rd > deviation of 200-300ns under load and there will be huge outliers. > > > Paul >