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 7AEF9A04C3; Fri, 22 Nov 2019 18:00:32 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 0CF692BC7; Fri, 22 Nov 2019 18:00:26 +0100 (CET) Received: from mail-il1-f170.google.com (mail-il1-f170.google.com [209.85.166.170]) by dpdk.org (Postfix) with ESMTP id 408D12BA3 for ; Fri, 22 Nov 2019 18:00:22 +0100 (CET) Received: by mail-il1-f170.google.com with SMTP id q1so7544651ile.13 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=B57DrcfVRWzUiVINeONAR0OOBO7Dcx51NIhKbvAkar4zUKScwJGdla1eOyidxCR0X/ zuOabwZr90AgQoJT6z2HsULOlfdDwIBCwIPzdhhmBl0XPFGhBCgzXt6Eo2z+Z3q2qilI cDe1V+/xavqK6jrIFjpEbhS+DC6nqVZ3MaGRuycMl8dOufZgQ8cUnlA5Y6rdVmHC1m0V dIs4CAhyelNuHP0/mzqjo9Oe0Bf8tqBmhO0I66eYsBRsWIfzjCEhrUzMj/DqXp5dPMXI Xlcc6wSPh2dEnhq/rIjuNgD7TikpfNjeDaarWwQOVXWQrZkOx8Fgiz9f/iSu6YjGbtmX F2tQ== X-Gm-Message-State: APjAAAULB6ogTF708gKmgcqHdGzURsyeqpAoSVUjoS9hlYwFDhD5W161 eQJBw3FLzzPQkYG6Js7GiW5VBNf89XdBy91dmso36Q== 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-dev] [dpdk-users] What is the 'unit of timestamp' assigned to mbuf packet in DPDK? 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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*? > > > > > > > >