From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 90FC7A0C47; Fri, 17 Sep 2021 00:26:35 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0F36C4069E; Fri, 17 Sep 2021 00:26:35 +0200 (CEST) Received: from mail-pj1-f53.google.com (mail-pj1-f53.google.com [209.85.216.53]) by mails.dpdk.org (Postfix) with ESMTP id A9B6140689 for ; Fri, 17 Sep 2021 00:26:34 +0200 (CEST) Received: by mail-pj1-f53.google.com with SMTP id mv7-20020a17090b198700b0019c843e7233so2141599pjb.4 for ; Thu, 16 Sep 2021 15:26:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20210112.gappssmtp.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=1ZPrqyac+QoDbEZDDb+M3139N81rpmAE4/a7zHHDVwk=; b=UQdReuzOTROdenU+3UtFkaNP2xdWR3RDzlAnkhF4B1K73wS/TXsEY62LwTcjNAGIdp JLavYxNNe0hXIMq1fngQplMhKD99WyPnrJNCwzokW2qERLp35f5gaQQd05OzxmBL+vys pf8q8KsZS7NNvEVS40ygNkXXgPQUD25Xr1ZQTRl/JA7isfrzaOS0wwmShWadUzzQHs7K PlExF/0xys6MVUDvRKmqLSX3k6OFgtSq0wjyEyb+Bp8fZnWdNIWzODVJ8iDiVqICWz3p PuAReBT2odUVvqfdHFLUzXgYSThE1B+1dzA5SC12MR2uFHDotK/LGs+WAZponkCNJ4Fh LoeQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=1ZPrqyac+QoDbEZDDb+M3139N81rpmAE4/a7zHHDVwk=; b=Y4ogiVG/os5HaATBLRHarTuqnsBzFpQXUvo+Gg5QRz5P769xvI0e2enNMlckeOkQGa E+MO0ro0bx9w6+VdZR/iueWXY1cLaNhUsn49RGsRvM1ykgA6Fi6GNmN2J8tej/MyVUYv IbaCwMZVTCdve1hay0B48w7Au1OlwdVjYQFx5JzQQ9pM2JyJCwI+Tmjvub2yh4u/k1dw cnhYUSwdh/N1317QO2PEIlIONtIQuJu9yG5x7vMrNSlYTsCbgFlsCDfFVpe2KrokfUHo 1NpFdkcDyPVQ0lIDNZ+IOSK1Ppoet9hjn5jvQL5rq5xPozEa0EpooGdkMLzRyxFPVs4U xjaA== X-Gm-Message-State: AOAM532CiFC2tjEpWEkhCadLrKmBomC076idkmO8TapCkfFtl7vrp4lb RjVaOTushI5PgjtsqLICGNQsw+Dcd4dwkw== X-Google-Smtp-Source: ABdhPJyNk8MutlBeoXy1DU65qVSybCw6GyPrQrFNmm+hb9qDTT8z9mlcU2BT4gWFHx0dkTQ7hwi4Gw== X-Received: by 2002:a17:902:7ec9:b0:13d:8e79:8e37 with SMTP id p9-20020a1709027ec900b0013d8e798e37mr157146plb.48.1631831193176; Thu, 16 Sep 2021 15:26:33 -0700 (PDT) Received: from hermes.local (204-195-33-123.wavecable.com. [204.195.33.123]) by smtp.gmail.com with ESMTPSA id 3sm3937169pfp.112.2021.09.16.15.26.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Sep 2021 15:26:32 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger Date: Thu, 16 Sep 2021 15:26:18 -0700 Message-Id: <20210916222630.71543-1-stephen@networkplumber.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210903004732.109023-1-stephen@networkplumber.org> References: <20210903004732.109023-1-stephen@networkplumber.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH v10 00/12] Packet capture framework enhancements 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 Sender: "dev" This patch set is a more complete version of the the enhanced packet capture support described last year. The new capture library and utility are: - faster avoids lots of extra I/O, does bursting, etc. - gives more information (multiple ports, queues, etc) - has a better user interface (same as Wireshark dumpcap) - fixes structural problems with VLAN's and timestamps There are no blocker items. The following are worth noting: * some of the patches get bogus checkpatch warnings * enabling BPF tests causes CI to see a pre-existing bug * filtering for stripped VLAN tags requires changes to libpcap (to be addressed in future) v10: - fix to rte_bpf_dump to handle more instructions make sure all bpf_test cases are decoded v9: - incorporate suggested change to BPF XOR - make autotest for pcapng more complete by reading the resulting file with libpcap v8: - enable BPF tests in autotest - add more BPF test strings - use rte_strscpy to satisfy checkpatch - merge MAINTAINERS (put this in with existing pdump) v7: - add functional tests for pcapng lib - bug fix for error returns in pcapng lib - handle long osname on FreeBSD - resolve almost all checkpatch issues v5: - minor build and checkpatch fixes for RHEL/FreeBSD - disable lib/pdump on Windows. It was not useful before and now pdump depends on bpf. v4: - minor checkpatch fixes. Note: some of the checkpatch warnings are bogus and won't be fixed. - fix build of dumpcap on FreeBSD v3: - introduce packet filters using classic BPF to eBPF converter required small fix to DPDK BPF interpreter - introduce function to decode eBPF instructions - add option to dumpcap to show both classic BPF and eBPF result - drop some un-useful stubs - minor checkpatch warning cleanup v2: fix formatting of packet blocks fix the new packet capture statistics fix crash when primary process exits record start/end time various whitespace/checkpatch warnings Stephen Hemminger (12): librte_pcapng: add new library for writing pcapng files lib: pdump is not supported on Windows bpf: allow self-xor operation bpf: add function to convert classic BPF to DPDK BPF bpf: add function to dump eBPF instructions pdump: support pcapng and filtering app/dumpcap: add new packet capture application test: add test for bpf_convert test: add a test for pcapng library test: enable bpf autotest doc: changes for new pcapng and dumpcap MAINTAINERS: add entry for new packet capture features MAINTAINERS | 11 +- app/dumpcap/main.c | 844 ++++++++++++++++++ app/dumpcap/meson.build | 16 + app/meson.build | 1 + app/test/meson.build | 6 + app/test/test_bpf.c | 200 +++++ app/test/test_pcapng.c | 272 ++++++ doc/api/doxy-api-index.md | 1 + doc/api/doxy-api.conf.in | 1 + .../howto/img/packet_capture_framework.svg | 96 +- doc/guides/howto/packet_capture_framework.rst | 67 +- doc/guides/prog_guide/index.rst | 1 + doc/guides/prog_guide/pcapng_lib.rst | 24 + doc/guides/prog_guide/pdump_lib.rst | 28 +- doc/guides/rel_notes/release_21_11.rst | 10 + doc/guides/tools/dumpcap.rst | 86 ++ doc/guides/tools/index.rst | 1 + lib/bpf/bpf_convert.c | 575 ++++++++++++ lib/bpf/bpf_dump.c | 139 +++ lib/bpf/bpf_validate.c | 9 +- lib/bpf/meson.build | 6 + lib/bpf/rte_bpf.h | 39 + lib/bpf/version.map | 7 + lib/meson.build | 6 +- lib/pcapng/meson.build | 8 + lib/pcapng/pcapng_proto.h | 129 +++ lib/pcapng/rte_pcapng.c | 574 ++++++++++++ lib/pcapng/rte_pcapng.h | 194 ++++ lib/pcapng/version.map | 12 + lib/pdump/meson.build | 2 +- lib/pdump/rte_pdump.c | 441 ++++++--- lib/pdump/rte_pdump.h | 110 ++- lib/pdump/version.map | 8 + 33 files changed, 3704 insertions(+), 220 deletions(-) create mode 100644 app/dumpcap/main.c create mode 100644 app/dumpcap/meson.build create mode 100644 app/test/test_pcapng.c create mode 100644 doc/guides/prog_guide/pcapng_lib.rst create mode 100644 doc/guides/tools/dumpcap.rst create mode 100644 lib/bpf/bpf_convert.c create mode 100644 lib/bpf/bpf_dump.c create mode 100644 lib/pcapng/meson.build create mode 100644 lib/pcapng/pcapng_proto.h create mode 100644 lib/pcapng/rte_pcapng.c create mode 100644 lib/pcapng/rte_pcapng.h create mode 100644 lib/pcapng/version.map -- 2.30.2