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 7EB51A04C2; Mon, 25 Nov 2019 11:56:25 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 23E8058C3; Mon, 25 Nov 2019 11:56:21 +0100 (CET) Received: from mail-pl1-f194.google.com (mail-pl1-f194.google.com [209.85.214.194]) by dpdk.org (Postfix) with ESMTP id E434A28EE; Mon, 25 Nov 2019 11:56:17 +0100 (CET) Received: by mail-pl1-f194.google.com with SMTP id t8so6277551plr.8; Mon, 25 Nov 2019 02:56:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:from:organization:message-id:date:user-agent :mime-version:in-reply-to:content-language; bh=kUBiP4TLH/XULDw/MyEd/x38A1EHmjOp6XpaGHCY8Uw=; b=X8vEG3ULtyUA08AqnPakMxXo+NpET55wLfTh7BGeCrS+NPYaZIMHZsFTmxfMGk3h8t uHVn8o5EUDRUh1gIUQ+LDVygPtTGwXA5nhWP7P3wnSVJAABvB1RteLlHdEacKrKkVjYs vaUnkMc+vfueeysvfo0Qq4sEp9IQLek6AdTHo39ppi2jpKYSME/F4chKsDTjuTtXRFHT QCy+QTwQlkCXtghK/32vwHLT2JypKVGK257eIz6yiiwxnU+hzij+NJ311zMSLDPrM6HS 0lvC1jGYQNkEjNlbtIjs1IKJ4dXba6t3BJwefh3ySZYUUEbPjg3tdkePimL/aLORWjcz PkOQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:organization :message-id:date:user-agent:mime-version:in-reply-to :content-language; bh=kUBiP4TLH/XULDw/MyEd/x38A1EHmjOp6XpaGHCY8Uw=; b=eTHbrHS/ZnRwgiNRXHxefLv997RlBXaZI55Bu1icOwC8pLGGbgI9ocu8vnJfwZBL0F rh4ZRPd2ZICkXOli9zm3mVMb8n5OuaNkMZctI5fzUdrV5Al8t/EibXc9bQ06EkNHrbPA o7chqPRkrzOkl2lL/mGFbJFTBNVksvH90JgQ0vsJmMLLahMfzVoKOKzVrv45Vyr7b8NO ZARedRjXeBShDAvhePud+hkPWOfCO5Dw5g7l3zxpcme/DUPF0nzfWGM0uHenvLLu/E+7 cfj7kGy/JlIemRexe3pzFeFAdwcU8DWz7IaMVOq4/phTg80csrY4+njqSrIedhx30bYk FlUQ== X-Gm-Message-State: APjAAAXUvlqoBAUdVyazuWB88dBd5sUjyMtQOmOiX8NFZF36NByvLJ/n /fdL6BNzCn7H9i834Jqr7eQ7971K8tQ= X-Google-Smtp-Source: APXvYqzPe7Auvq6Zo4hexpnlMg+1UBqv4OA02V2TTv6dPYuACgXEycXDJF8+okQwz3lnlSLPAJYKpQ== X-Received: by 2002:a17:90a:380d:: with SMTP id w13mr38011330pjb.133.1574679376868; Mon, 25 Nov 2019 02:56:16 -0800 (PST) Received: from [10.53.114.95] ([218.248.46.107]) by smtp.gmail.com with ESMTPSA id j4sm8154826pjf.25.2019.11.25.02.56.11 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 25 Nov 2019 02:56:16 -0800 (PST) To: Gokul Bargaje , dev@dpdk.org, users@dpdk.org References: From: Archit Pandey Organization: National Institute of Technology Surathkal Message-ID: <5a2c9787-c9e1-f295-3d25-89a42a5390ca@gmail.com> Date: Mon, 25 Nov 2019 16:26:05 +0530 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.9.1 MIME-Version: 1.0 In-Reply-To: Content-Language: en-US Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit 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" From lib/librte_mbuf/rte_mbuf_core.h: |605 /** Valid if PKT_RX_TIMESTAMP is set. The unit and time reference 606 * are not normalized but are always the same for a given port. 607 * Some devices allow to query rte_eth_read_clock that will return the 608 * current device timestamp. 609 */ 610 uint64_t timestamp;| |I believe the timestamp in mbuf is set by the NIC. If it isn't, librte_eventdev sets it using rte_get_tsc_cycle(). From /lib/librte_eventdev/rte_event_eth_rx_adapter.h | 22 * The adapter uses a EAL service core function for SW based packet transfer 23 * and uses the eventdev PMD functions to configure HW based packet transfer 24 * between the ethernet device and the event device. For SW based packet 25 * transfer, if the mbuf does not have a timestamp set, the adapter adds a 26 * timestamp to the mbuf using rte_get_tsc_cycles(), this provides a more 27 * accurate timestamp as compared to if the application were to set the time 28 * stamp since it avoids event device schedule latency. Hope that helps! On 11/18/2019 7:59 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? > > How this timestamp is calculated? Is it calculated using the *rte_cycles.h*? > > Thanks in advance! > --Gokul -- Archit Pandey Senior Year Undergraduate Student Department of Computer Science and Engineering National Institute of Technology Karnataka Surathkal, India