From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.6 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 50470C47404 for ; Mon, 7 Oct 2019 16:53:19 +0000 (UTC) Received: from dpdk.org (dpdk.org [92.243.14.124]) by mail.kernel.org (Postfix) with ESMTP id 7FB222070B for ; Mon, 7 Oct 2019 16:53:18 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=networkplumber-org.20150623.gappssmtp.com header.i=@networkplumber-org.20150623.gappssmtp.com header.b="nn+TL7LT" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7FB222070B Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=networkplumber.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=dev-bounces@dpdk.org 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