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 5C76BA2EEB for ; Mon, 7 Oct 2019 18:53:18 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 87BE81D177; Mon, 7 Oct 2019 18:52:52 +0200 (CEST) Received: from mail-pl1-f178.google.com (mail-pl1-f178.google.com [209.85.214.178]) by dpdk.org (Postfix) with ESMTP id DE8BE1D14C for ; Mon, 7 Oct 2019 18:52:45 +0200 (CEST) Received: by mail-pl1-f178.google.com with SMTP id s17so7138541plp.6 for ; Mon, 07 Oct 2019 09:52:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=++z2Xrd5o2eyNFSZGX4ZyNqTuNJEUnljgEHeD1bVnjk=; b=nn+TL7LToUV5GWEZ+MtLmFi73cMoAmTL1jspJ5mTyUi8zZ7h3k+PUAylM6dH87Wfkc HvgMg61f0aTrk/ElBXN7478c08nmDA1+qd/As2dj0XBsQza2zETiqy1a7k3pu8FRlbmk tqqqmFYu7p11NTe7QvkQ80+XkyL9OQyRsVtxY+6tmFaGSBiCSEpMUAzau22AV+2rxh25 8Jz0sYeOQVRUwWChQqrG8AGqJKDkTjaw6425wb9KYgrVvkbSdilfAOaFiY3WkwzXbxZY IdwfZMMpltmomzeugadX7uxuHDg2S9q5tzyUtIDraVO+H2ZaXmP+f7bl4RLdmyAdcKl2 gVjQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=++z2Xrd5o2eyNFSZGX4ZyNqTuNJEUnljgEHeD1bVnjk=; b=YmNpXGeEI0XmPtvwQyj/MY9GtaA4f7QkmFZ79Ax4E/MvbWjZquK1t8ue+r3K4XSVcO b3vNCDxxMy3BEC7+wVAV3cIJaXkYf8MbaBfP13GT2GGTmNmW3k8VLKYJ/cVaT4IJilkX EpD6InLvLB3MdXMG+yBf+idPjyRUOujEoo4dDGks0s3oyYV59xztliYDgQQrVHvNcNB9 N/30SJGss8q3MJr9XRhEn+OMYPxXkti+Z0UKtzfzMPKoIfh13z7hjpq8/VsxcABuMdeY q00uEm8OPB/sHghPgBR37XSxQiKLkJVWyEmWB6K6ReYG3KkGMQjIKwqkpcwxzVaNMqQG Mjag== X-Gm-Message-State: APjAAAXGBOdw7m0IfCQUruGIacyvX234zcj6Oj2ORDMhEhFy+lMo4Lke 8JrpHsMGTivewkJ1eZ/7AgJIc55aWXdh0g== X-Google-Smtp-Source: APXvYqzcuozx/fayI4YG0VNZkCf29+r/WqCRz6S9VjCWBxU9EftPF2VBajOAXkr4ZIVm7TU74E9DLw== X-Received: by 2002:a17:902:ff12:: with SMTP id f18mr31231515plj.266.1570467164709; Mon, 07 Oct 2019 09:52:44 -0700 (PDT) Received: from hermes.lan (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id w5sm15920979pfn.96.2019.10.07.09.52.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 07 Oct 2019 09:52:43 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger Date: Mon, 7 Oct 2019 09:52:28 -0700 Message-Id: <20191007165232.14535-5-stephen@networkplumber.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20191007165232.14535-1-stephen@networkplumber.org> References: <20191007165232.14535-1-stephen@networkplumber.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [RFC 4/8] pdump: stamp packets with current timestamp 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" Put the current cycle count in as timestamp when they are placed in the ring for packet capture. Signed-off-by: Stephen Hemminger --- lib/librte_pdump/rte_pdump.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/librte_pdump/rte_pdump.c b/lib/librte_pdump/rte_pdump.c index 830decef91e2..41f2ec17a26b 100644 --- a/lib/librte_pdump/rte_pdump.c +++ b/lib/librte_pdump/rte_pdump.c @@ -75,6 +75,7 @@ pdump_copy(uint16_t port, struct rte_mbuf **pkts, unsigned i; int ring_enq; uint16_t d_pkts = 0; + uint64_t now = rte_get_tsc_cycles(); struct rte_mbuf *dup_bufs[nb_pkts]; struct pdump_rxtx_cbs *cbs; struct rte_ring *ring; @@ -88,6 +89,7 @@ pdump_copy(uint16_t port, struct rte_mbuf **pkts, p = rte_pktmbuf_copy(pkts[i], mp, 0, UINT32_MAX); if (p) { p->port = port; + p->timestamp = now; dup_bufs[d_pkts++] = p; } } -- 2.20.1