From patchwork Thu Oct 5 23:06:44 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Hemminger X-Patchwork-Id: 228 Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 7F4B1426C7; Fri, 6 Oct 2023 01:07:01 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0DCFE402B9; Fri, 6 Oct 2023 01:07:01 +0200 (CEST) Received: from mail-pf1-f176.google.com (mail-pf1-f176.google.com [209.85.210.176]) by mails.dpdk.org (Postfix) with ESMTP id CF126402A8 for ; Fri, 6 Oct 2023 01:06:59 +0200 (CEST) Received: by mail-pf1-f176.google.com with SMTP id d2e1a72fcca58-690f7bf73ddso1233416b3a.2 for ; Thu, 05 Oct 2023 16:06:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1696547218; x=1697152018; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=BfgsV6yufoyuFmHKo/QhNRgXrYS4t8u8car33AjFV6U=; b=VFlUOFwdfMrxeH3nPCizInUQ1XoIo7RW5ZD8VNZPVYB4vpy6vGWkUintTVHTnQ5aVJ zSXk2feL2J3Dx434bOTu/8tcorBWpZKYhmadpFUHlxcV4+l+7JejcvvgX5Dj1DrTJG27 JpyW43FD5lNcnCThMc6zXLND50ZoWayeqT7V86iu35MuAuHefeBKDXodS7rGQeWg4xFc uZt/I0sOq77ANLF4iBnUJFU0w5NpqMrh1LAi6eygzJPYhsF4KDYntp++jcGrgYeY0LLi iVd0ey6BVoyL2oxIpZfcq0FuChLnKHVVK973jr5MY3qkbmxMt8yG/oR386BQ8PEY8MLR kR9g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696547218; x=1697152018; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=BfgsV6yufoyuFmHKo/QhNRgXrYS4t8u8car33AjFV6U=; b=nXDtVDeqR5myjCmmtOjjaBqDdco/Z4NQf9VfvthYIl2QC5uPCrbqE1KVNsvdc5Dwgw WNFa2+1z2to2+k+MtEgRRXWul1Ebv8bldPIB88jkha7bK/9PM6r9FNj51V6F76t/vtjV Zdpp9Rz5nkuxqAzvMsHby9K19MSiddNA7OnBKwKc8HO/i7t9aW3vjq0UimdgZr9Zyhjy TTH0ZO+RjSbDg2ZSoTkrLMri0qQm3UyD1EmvSuHMCctCVFPQIHYWzUeWhlGf9qQ2hM0D ZdEqFI0SjQ/uVjR5veKaFEU3zULt3pAF3t6H1rOD/vS/9fXs8lUmeDFBuUe+u02ZUMaH MBfQ== X-Gm-Message-State: AOJu0YxAvFx3xwNbISgH6lWYxIpqL0GtDWpbvfbrUrGIQpr/47Mja4qv eFka2ZlofPbr3Di00wWJDeZsAg/euSi/PcS7h6k= X-Google-Smtp-Source: AGHT+IEG3CcRKw/NkXMH+7augW9jUF5W6B4MQ4N4cbm4PB05cAK2OSH5SZ41mPeql8v+OLvsL/+tZQ== X-Received: by 2002:a05:6a20:7d84:b0:15c:b7ba:9137 with SMTP id v4-20020a056a207d8400b0015cb7ba9137mr8102711pzj.2.1696547218198; Thu, 05 Oct 2023 16:06:58 -0700 (PDT) Received: from hermes.local (204-195-126-68.wavecable.com. [204.195.126.68]) by smtp.gmail.com with ESMTPSA id d13-20020aa7814d000000b00690cd981652sm112665pfn.61.2023.10.05.16.06.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 Oct 2023 16:06:57 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger Subject: [PATCH v2 0/4] dumpcap and pcapng fixes Date: Thu, 5 Oct 2023 16:06:44 -0700 Message-Id: <20231005230648.68244-1-stephen@networkplumber.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230921042349.104150-1-stephen@networkplumber.org> References: <20230921042349.104150-1-stephen@networkplumber.org> MIME-Version: 1.0 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org This version slightly modifies the pcapng API to fix issues related to timestamping. The design choices are to maximize performance in the primary process; and do all the time adjustment in the secondary (dumpcap) since the dumpcap needs to system calls anyway to write the result. This patches set changes where the adjustment is calculated into the pcapng portion that opens the output file. All details of the format of timestamp are contained inside pcapng (data hiding). Stephen Hemminger (4): pdump: fix setting rte_errno on mp error dumpcap: allow multiple invocations pcapng: modify timestamp calculation test: cleanups to pcapng test app/dumpcap/main.c | 53 +++--- app/test/meson.build | 2 +- app/test/test_pcapng.c | 378 +++++++++++++++++++++++++--------------- lib/graph/graph_pcap.c | 2 +- lib/pcapng/rte_pcapng.c | 119 +++++-------- lib/pcapng/rte_pcapng.h | 19 +- lib/pdump/rte_pdump.c | 9 +- 7 files changed, 318 insertions(+), 264 deletions(-)