From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 3ECB8A04C3 for ; Fri, 22 Nov 2019 18:00:26 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 2871E2BAE; Fri, 22 Nov 2019 18:00:25 +0100 (CET) Received: from mail-il1-f169.google.com (mail-il1-f169.google.com [209.85.166.169]) by dpdk.org (Postfix) with ESMTP id 433732BAE for ; Fri, 22 Nov 2019 18:00:22 +0100 (CET) Received: by mail-il1-f169.google.com with SMTP id a7so7567262ild.6 for ; Fri, 22 Nov 2019 09:00:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nitk-edu-in.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=+UwBLfioWS9MF8mdd87pqRiWhMLT40NwRx6nSD9XSDw=; b=xVbwH24YNyf+ulIGWYOCN0vodTp9A/siQIUXp8gBBUjCxJ+y0sx4DNogPgydrq2fs2 dOb26wkBhuOBPJqnmaCEBRa8KXywpszNV0+BCKNaDC7iPZO++l4o2KJ/PLbzUps2eRw1 +QBq3Onu56Q5DliDJnR4Yd7ooryAK7ozAOreVedU1WxbWtTFqq6kED/fzPIsbW+oeT6t b/6GpkLD07f13vTqXlFktRNqb4wHQ02jdclmx0kB+sdgmRTSsrpN4b76E6NmQSen8LIU NuRGsQcOewo7nN/Fh7LboaAUxtgmYOEj2OhnfjYiUIXH2GQQ9LevhVtJdhooam15jh0A Hx2g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=+UwBLfioWS9MF8mdd87pqRiWhMLT40NwRx6nSD9XSDw=; b=PySDe3RPGh+MPPMGbij9h++5eVGUAnDaKch7rlMFrfpU1vAXKhUFwePE7gBVMdoFn+ zS9Jh2sCX3FZNwBNhiXBa9uByKauaedlz/I7SV5i7ytY9X8zczTGk2k98+OFmr49LNOQ JRZLtCIHoPJcUAg6v9yjGa1EkzZvgLfWHyTGnMw4//Vm+GwQxRrzKlfkH9L1IywBu9YN 0y6BmRsO/t+hwOGg5/XK30A4xgJwg8TWPu8HLHAJAbk7eUw3LD7aoEP0s24NATm7riJ9 o+JwBLuIhxQaryrgVKt7OE4rCFNKzo70S/TLuHPQC08t/pR1ICOpjfxYADlXoCNW/O+c rWfA== X-Gm-Message-State: APjAAAX2f9Q+Q5K13Mc6LKEz8bZeekZU36Ckl+axMIk4ARE4SjqUldhQ qFBzsHzS/+U3Tfxp+z3nkMvQ1qiUrFYMliuVb8q9Pw== X-Google-Smtp-Source: APXvYqyA31OLCwcg+84q4VEzoG0j6VowBYG+vmmSXOMml2ZUYC4shyAX+Xrdrdk+KrzOB9wUXqBAFqy2Ax7Nyz3If04= X-Received: by 2002:a92:5d8d:: with SMTP id e13mr17745559ilg.32.1574442022066; Fri, 22 Nov 2019 09:00:22 -0800 (PST) MIME-Version: 1.0 References: <6a0d3205-e506-c0cb-3482-3224b875c650@intel.com> In-Reply-To: <6a0d3205-e506-c0cb-3482-3224b875c650@intel.com> From: Gokul Bargaje Date: Fri, 22 Nov 2019 22:30:11 +0530 Message-ID: To: Ferruh Yigit Cc: dev@dpdk.org, users@dpdk.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: Re: [dpdk-users] What is the 'unit of timestamp' assigned to mbuf packet in DPDK? 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: , Errors-To: users-bounces@dpdk.org Sender: "users" Thank you for the clarification. But I am still unable to understand how exactly timestamp is calculated before assigning to a timestamp field. Could you please tell me the steps to calculate the timestamp in DPDK? I have to implement the PIE AQM algorithm in DPDK and for that, I need to calculate the total time spent by the packet waiting in queue (i.e. the difference between enqueue time and dequeue time). Thanks, Gokul On Fri, Nov 22, 2019 at 8:18 PM Ferruh Yigit wrote: > On 11/18/2019 2:29 PM, Gokul Bargaje wrote: > > Hi, > > > > The timestamp assigned to packet at the time of enqueue (value of > timestamp > > field in mbuf), is it in milliseconds or microseconds or in cpu cycles? > > The unit is not defined [1]. 'rte_eth_read_clock()' was added [2] to help > converting it to time when it is clock counter. > > [1] > 918ae9dc775e ("mbuf: add a timestamp field") > > [2] > 5e741377657c ("ethdev: add API to read device clock") > > > > > How this timestamp is calculated? Is it calculated using the > *rte_cycles.h*? > > > > > > > >