From patchwork Thu Nov 9 19:45:52 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Hemminger X-Patchwork-Id: 380 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 6DBF9432EA; Thu, 9 Nov 2023 20:46:09 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5E9B440A6E; Thu, 9 Nov 2023 20:46:09 +0100 (CET) Received: from mail-pl1-f172.google.com (mail-pl1-f172.google.com [209.85.214.172]) by mails.dpdk.org (Postfix) with ESMTP id 234984026B for ; Thu, 9 Nov 2023 20:46:08 +0100 (CET) Received: by mail-pl1-f172.google.com with SMTP id d9443c01a7336-1cc3388621cso18681475ad.1 for ; Thu, 09 Nov 2023 11:46:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1699559167; x=1700163967; 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=EywmvEKF4rA1AQg6/FHdR5JxXivWnGf0paoGaWu+CZc=; b=MTGs+80Vivx9NrA0XhHjTVXPw553f7okCiMUVd/ZQzwHwhIHR0PKwbjwt8IVG3ML43 JJMPgKYg9VHwHRcRnmYlrn/3UMmC6QsIwx2eM121pcFH+EABAFa7D3meMZiWMIjy4TIT T4sk9/frMiKLWRqq+0OR/f9+D12mSkwZEwRiVeXnv4PH10gjGmjUXj2QbPO+ZlVvaCoa ZaQDk6Ye+V6UPiJrJDw7p0D3+4fFadeiSnb9yJ29vDdf+wTD482WhjWRCHxMpmnzibr+ QDT49M7Hpw7g9dOXQgO/IyKx12iePHksC4sHU9kGf8zkDCocXHGvZhKkZMB/6T5ZvQ4H TQZQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699559167; x=1700163967; 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=EywmvEKF4rA1AQg6/FHdR5JxXivWnGf0paoGaWu+CZc=; b=LgiMl2uXc28rvUrtzpj+4Aqc6NwtXl+TKBESXIMmaYpr/28Xmx2X31f3CS+OZ1qWfj EiBeyKiyZr8qjGEoqUUY8J99uTXgf6zR5O1aKJ0MR1BjX8vNVC63udEFKY84qYQLDrGr mtdDYCS0o4J7nGlx4gNp3HzqFXyJWP+7M+FgI7UaVXRzzJXiezwK3mN4yzMSpHxQae0u w6W5gqytUBSApUROB+AtuMaFtVLuA/8NuZDXa0q7jEDxje+FhD4YTrdWCLBUeqQiVci0 vD7uh/q0G8fyyloVy5bgDFZO6+a6rcvQyfKJ5ix9B8eRArqOV8xgER71zaZ3fr4vWAn0 qyMw== X-Gm-Message-State: AOJu0YwaSUfqEBe9xpGNEFE7M3l77Yk0IS7YQ4oijN1SnrK0OVb4BdIE yvtOLBHPTIEm8SyCOvXqCnotv5ClWG4qPjL7CkI= X-Google-Smtp-Source: AGHT+IGk9DT02/V23cCMdwbBvm4tNjXaNFpmHshaIID2yE0/GiITUV0lqkESUrnHCRNhiwT6o3fuJg== X-Received: by 2002:a17:902:fb08:b0:1c9:dba6:417a with SMTP id le8-20020a170902fb0800b001c9dba6417amr320531plb.9.1699559166751; Thu, 09 Nov 2023 11:46:06 -0800 (PST) Received: from hermes.local (204-195-123-141.wavecable.com. [204.195.123.141]) by smtp.gmail.com with ESMTPSA id j191-20020a6380c8000000b0059b782e8541sm5176101pgd.28.2023.11.09.11.46.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 Nov 2023 11:46:06 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger Subject: [PATCH v5 0/5] dumpcap and pcapng fixes Date: Thu, 9 Nov 2023 11:45:52 -0800 Message-Id: <20231109194557.111350-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 series has bugfixes and tests for dumpcap and pcapng. It should be in 23.11! It fixes 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). v5 - fix format of getpid in capture name v4 - incorporate review feedback v3 - don't use alloca() since can have VLA type issues Stephen Hemminger (5): pdump: fix setting rte_errno on mp error dumpcap: allow multiple invocations pcapng: modify timestamp calculation pcapng: avoid using alloca() test: cleanups to pcapng test app/dumpcap/main.c | 53 ++--- app/test/meson.build | 2 +- app/test/test_pcapng.c | 418 +++++++++++++++++++++++++++------------- lib/graph/graph_pcap.c | 2 +- lib/pcapng/rte_pcapng.c | 156 ++++++--------- lib/pcapng/rte_pcapng.h | 19 +- lib/pdump/rte_pdump.c | 9 +- 7 files changed, 374 insertions(+), 285 deletions(-)