From patchwork Wed Nov 8 18:35: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: 374 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 7DDB9432D9; Wed, 8 Nov 2023 19:36:10 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 65AA3410EA; Wed, 8 Nov 2023 19:36:10 +0100 (CET) Received: from mail-oa1-f53.google.com (mail-oa1-f53.google.com [209.85.160.53]) by mails.dpdk.org (Postfix) with ESMTP id 0DB8E402A7 for ; Wed, 8 Nov 2023 19:36:08 +0100 (CET) Received: by mail-oa1-f53.google.com with SMTP id 586e51a60fabf-1f03fdfcfacso4087371fac.0 for ; Wed, 08 Nov 2023 10:36:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1699468568; x=1700073368; 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=kLtT5/lkbUm0zWzTxI3UTc6dJ25RNmK8vx7Yl79WEbo=; b=kkrd4FpaV8RD3SaTY0eHv4/n1dlsBDmPGeM/0MwQCe5mxl0hL9FDvFg2wXwtRDwiNZ Bd/yr9XdkCsJjMXpDcK/qg/G8kSSd9lcfDUDTiB92EiAIIuanCD7m3pBznIt+NbBUbCC jny/fWxINjdsjrABnDesTLu44sAwO/Bn76Hb0Zx6wgL3Gkjx+f6YfrJuuJbTVnhP+D7q P7WDjHFZqpadt21zjIlVz39+X8CEE7beJ1GI47qal0QqeingFLXJSr1sDequGE+O7t0p 1yfsbeR9tHQnOARkN8xtNnNcag8D4VQ4y1oamzdoqVJzg/nzmCnx9S8X7SC8jC8zTjEj 69sw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699468568; x=1700073368; 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=kLtT5/lkbUm0zWzTxI3UTc6dJ25RNmK8vx7Yl79WEbo=; b=FDjhBSTmN6nXkEnYIQWI+uPUg1T5bHglNIWtPhoNs9F7rckZ3EWJkRBllRaRZHkfHL sHkkqE2yzc7MkjoNkds0tTlQtQYgQNwBuGQ8QKoykLAxBYfsn6EbyMUStYa9JVxjabBr Mw63Dk/3YsKL0l23PmYQXe++2PODPZA3JgYr5JzRWaX1ZZh6fZXYEBZ0YgJIiEjDUlEv hzCOfIQy2rk4DZDXtfRINwXLPNDiiFaDVA9T6fePcTq4h1beGU3GQ05+OuhwDG0WlcYr CNEZN0mKWAuwA+xRhDU71Rs2iw3CthP4Pe1hH2ZreIkbgZOEQ0ddWyLNHp/lhH3l57M2 304A== X-Gm-Message-State: AOJu0YwUhH13ilqC+IG1dVaZqpCT+2asW3mQLvGGkjDiy0kb+zUoIvYq iLeraVIaB9VTDzpGbjmPLhqbTye+Ozza8Gi3Xs8= X-Google-Smtp-Source: AGHT+IH1VxIKf9DL9vxOMI0xQ1q4D6MtM25YCxAIoBzMX4Tp5lTjgQeZKrFW+F9c6zgfRvYi0mcz9w== X-Received: by 2002:a05:6871:e70d:b0:1e9:e975:4413 with SMTP id qa13-20020a056871e70d00b001e9e9754413mr3555296oac.27.1699468567779; Wed, 08 Nov 2023 10:36:07 -0800 (PST) Received: from hermes.local (204-195-123-141.wavecable.com. [204.195.123.141]) by smtp.gmail.com with ESMTPSA id p25-20020a635b19000000b005b944b20f34sm3402522pgb.85.2023.11.08.10.36.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Nov 2023 10:36:07 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger Subject: [PATCH v3 0/5] dumpcap and pcapng fixes Date: Wed, 8 Nov 2023 10:35:52 -0800 Message-Id: <20231108183557.381955-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 has bugfixes and tests for dumpcap and pcapng. It should be in 23.11 but seems to have been ignored. 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). 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 | 153 ++++++--------- lib/pcapng/rte_pcapng.h | 19 +- lib/pdump/rte_pdump.c | 9 +- 7 files changed, 371 insertions(+), 285 deletions(-)