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 24FE5A0547; Fri, 10 Sep 2021 01:33:35 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8DBCB4067E; Fri, 10 Sep 2021 01:33:34 +0200 (CEST) Received: from mail-pj1-f44.google.com (mail-pj1-f44.google.com [209.85.216.44]) by mails.dpdk.org (Postfix) with ESMTP id 2218F4003E for ; Fri, 10 Sep 2021 01:33:33 +0200 (CEST) Received: by mail-pj1-f44.google.com with SMTP id k23so170549pji.0 for ; Thu, 09 Sep 2021 16:33:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=c/t4IUC1iS2aMFWYl0JS9qjB6OM+hmwHkfi/jJe8bWM=; b=UHo3d6IAWHYV28fkwIl2VtaTfQeTasmrbxh6kR0VsXSbq20/UR+cBRRkk4oEt/Sdde HQSVTVc8UOxWzUCUe1wyO7SUaP2EJ0x/Wl92C32H/KkNxbwwWiIrGU1vT5Sx0c17BIOm /Ea/KJ2lSHjLK7aPEk0Gu6KMAT5MqrVnyKwymTDiLHyJGE62quweEvMLUb5xyh4rcMKa G2xdstVYQzpcpzj1yBb/qLhvT+BJA8wdTUTI3Z1qziVGxHhtugQo36TQwTBbUTDHfg1/ 61T1+yQEtwYRDlN3k/p5ThnTyXG838hwGVz1Z0CX33Vjb4oT3caeOyF6XkXq5YbzVphU js5Q== 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=c/t4IUC1iS2aMFWYl0JS9qjB6OM+hmwHkfi/jJe8bWM=; b=mrSKDXODcbw7qQnSSgcvaTPKKqZrvoIXkseDbRP5gBL4Y7qGlZ0th5LQqXxUQ50LSl 96YsH3H6cvQX087iItm16SuynFuxhPSies9vTb+Qn22oWfr0JA0rIQEMIye7EaoATIP1 ybz+wdUPBVu+p+oze4cIugMlxc9SdXcGfUipf3y2toh2hr6MA3eynqeJ2wYnQcMvLzgq 5gVi0Kedagcfsge56O+EjlmA7D2q9MGEszXi17VHXAWIBSUUQIABi5JAE0aXqObJGziw 5lMzACt1iQb5UoCFWQaxF3qU0mK0Pjp/mj5W+Ql1coSjpEZ/pqPve7fZTdgMQ48krQvk dQcQ== X-Gm-Message-State: AOAM533WQ8u1Z7BpR6Kwf7G+bOCN8ceQXyfPqi+R+33lmgbhWG0hYTZQ GB9h6GVfp7IZVsAF4IJAukwBBfIymgLJfg== X-Google-Smtp-Source: ABdhPJyWHpJnfTd2T0n6ETuFQmp/Z7fVL25Q0mhWuin6FEqIBmvuGnhVA0+iLOzsBTf030xlIOvmyQ== X-Received: by 2002:a17:903:1c4:b0:13a:8c8:92b7 with SMTP id e4-20020a17090301c400b0013a08c892b7mr4939845plh.87.1631230411756; Thu, 09 Sep 2021 16:33:31 -0700 (PDT) Received: from hermes.local (204-195-33-123.wavecable.com. [204.195.33.123]) by smtp.gmail.com with ESMTPSA id z6sm3172255pjn.27.2021.09.09.16.33.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 Sep 2021 16:33:30 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger Date: Thu, 9 Sep 2021 16:33:19 -0700 Message-Id: <20210909233329.190021-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 v6 00/10] 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 It preserves the old pdump command as is for those people who never want to change. v6 changes: - add a test for bpf converter (and fix one bug it found). v5 changes: - 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 changes: - minor checkpatch fixes. Note: some of the checkpatch warnings are bogus and won't be fixed. - fix build of dumpcap on FreeBSD v3 changes: - 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 Stephen Hemminger (10): librte_pcapng: add new library for writing pcapng files bpf: allow self-xor operation bpf: add function to convert classic BPF to DPDK BPF bpf: add function to dump eBPF instructions test: add test for bpf_convert lib: pdump is not supported on Windows pdump: support pcapng and filtering app/dumpcap: add new packet capture application doc: changes for new pcapng and dumpcap MAINTAINERS: add entry for new pcapng and dumper MAINTAINERS | 6 + app/dumpcap/main.c | 827 ++++++++++++++++++ app/dumpcap/meson.build | 16 + app/meson.build | 1 + app/test/test_bpf.c | 148 ++++ 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 | 118 +++ lib/bpf/bpf_validate.c | 8 +- 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 | 437 ++++++--- lib/pdump/rte_pdump.h | 110 ++- lib/pdump/version.map | 8 + 31 files changed, 3330 insertions(+), 216 deletions(-) create mode 100644 app/dumpcap/main.c create mode 100644 app/dumpcap/meson.build 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