From patchwork Thu Nov 9 17:34:07 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Hemminger X-Patchwork-Id: 379 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 09C4A432E9; Thu, 9 Nov 2023 18:34:26 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E29104026B; Thu, 9 Nov 2023 18:34:25 +0100 (CET) Received: from mail-pl1-f171.google.com (mail-pl1-f171.google.com [209.85.214.171]) by mails.dpdk.org (Postfix) with ESMTP id 376154021E for ; Thu, 9 Nov 2023 18:34:24 +0100 (CET) Received: by mail-pl1-f171.google.com with SMTP id d9443c01a7336-1cc29f39e7aso8852865ad.0 for ; Thu, 09 Nov 2023 09:34:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1699551263; x=1700156063; 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=uG5LfoB+oyVAqsbGyKLqomg0/ASfEklaxPU/zOOGxGg=; b=hRZ5c3w0ZoCqmIomrqCVI8W0tlROOek3Svvp6oojr1U1jUFnbeMpvovWWu+B4eHCV7 CeNzhdBaDAlMXYCYYfBHLzWpwHoA/G0Sa/+ukajyRlYTqPyNI55F92mGecRRUPpmXhxI WVWlnrkZPerDbxTaDBZ97B8q+tyU1LtSFkVoXUQDwcNSAi4QXvOYu/ljQZfqjXMrwGRf DoBZ1dXmBT1eMSuLySsKuhH2vaoEdYaXeexXuSHUzkIrL7viiqKq0WYiI59qxZiYTwms 6bpeDxo+n7kbIS9fao+xALGxH7QXMKKcPhI/FBSdzoO9drwIbI4sazYCX5pApmJIJzyl LErQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699551263; x=1700156063; 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=uG5LfoB+oyVAqsbGyKLqomg0/ASfEklaxPU/zOOGxGg=; b=jWSbZSwZVBCLvg5VpLD41+sU6z8zqDu46PljZqkIpuvJ4ujMMV+wfnaIQ7El9HBIH+ FzVsogDI11vyT1gwSW6x1Myv0afnuVmGpWdnix50V/wC+dqKLMhSdZ9Vn4MH/RUQMe+N R8zde5hbltBbDfzGx2N61m6mXIHvqvSnJpy5XLScliS0+yEIYlHM9ZPy91GZgbhhq8OZ k+UOw9sA8Mod3ERqEf0/MixZ+kJIHdLHylfNkT9IY4bs98zPiHsYeZryZ+28252pRI9i Iowz1Iz/C7O/xkjfx+A32uQcH6blzQ4voMB4JSGrJZs1BoPmB8wUEJf646acV6YANLTB /+mA== X-Gm-Message-State: AOJu0Yx6imUOihnGWqruuC5+VrV0Oap7sf30ok6gxKejrjdYK+vS/gtd eoZWwVpoLO7gtxSiONFL2wDUO4xA5czaS0WP+J0= X-Google-Smtp-Source: AGHT+IElNet2L0wzZobW8du/C+yOzpSn74NT5aQwTlGGVo0VjUCSTXmfx+HZUWNH0FSPRPTKdbA8HQ== X-Received: by 2002:a17:902:7c8e:b0:1cb:dc81:379a with SMTP id y14-20020a1709027c8e00b001cbdc81379amr5514443pll.53.1699551262917; Thu, 09 Nov 2023 09:34:22 -0800 (PST) Received: from hermes.local (204-195-123-141.wavecable.com. [204.195.123.141]) by smtp.gmail.com with ESMTPSA id f7-20020a170902ab8700b001c76fcccee8sm3787356plr.156.2023.11.09.09.34.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 Nov 2023 09:34:22 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger Subject: [PATCH v4 0/5] dumpcap and pcapng fixes Date: Thu, 9 Nov 2023 09:34:07 -0800 Message-Id: <20231109173412.108093-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). 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(-)