From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <dev-bounces@dpdk.org>
Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124])
	by inbox.dpdk.org (Postfix) with ESMTP id C774EA0032;
	Fri,  1 Oct 2021 18:30:41 +0200 (CEST)
Received: from [217.70.189.124] (localhost [127.0.0.1])
	by mails.dpdk.org (Postfix) with ESMTP id 745044067E;
	Fri,  1 Oct 2021 18:30:41 +0200 (CEST)
Received: from mail-pf1-f182.google.com (mail-pf1-f182.google.com
 [209.85.210.182])
 by mails.dpdk.org (Postfix) with ESMTP id 026D74067A
 for <dev@dpdk.org>; Fri,  1 Oct 2021 18:30:39 +0200 (CEST)
Received: by mail-pf1-f182.google.com with SMTP id w14so8439555pfu.2
 for <dev@dpdk.org>; Fri, 01 Oct 2021 09:30:39 -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=OComxdiRpxO95Lwy9dK9TkkqlnKqEkB94pa4Kot61iU=;
 b=0G+jhp0uDP7V/N95vja9fTSBlv4t0g+RsGmGV4bYR4/rL4oY0Dr+ahW4+pIwsEnQXQ
 JemtUw2S8JQWSfRFw94AkLKc6+s5PerZw5+DAYrDn0HY080ejWZ0o+4nEMEjdm/Qz+tO
 sJO8laUOxjE88IcFC4jMJT2qUbzbZXuL+6yZ0aDYUmT41Ln/Hk31RcQUnTPLuJs5Hcvo
 eKXWWSECW8qlXJmoFI3GnbG0S8g0AnqI7iqm1Lmj3xlWG7XXdNkEbLayFIkpvbbvRxUr
 hxgXw2YCjTy7c0A3oOdi9rx+joaP7etGvnMgaBOV7sySlBneqffYh3iR6H5j3Nx7qhbi
 Qb8g==
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=OComxdiRpxO95Lwy9dK9TkkqlnKqEkB94pa4Kot61iU=;
 b=fskHuBmHGGxzvJF0dlaXYINIf7OJDWx+HUvLJLDuo7C4pvL8lwxjFptNP7ODuw4Hcz
 Y/I80weUCQBlyLNRP2bQ/Dlw7VbpkvdBVwjzG5RoKMIaMjuliKh0XEj4yhTWc9aPF3Kf
 f7eBZJVXtOZWu9aMUOcXcRgaUpdRi8IIh6XBhzOMNW4aovoA5RpcVL4YHi53P8QeA69r
 fTb6NQRv5U7F696pyBoXwO+Jh1mzbAsDsjs90SwW+2cE1wtGkjp1HORkplNQ7vjQi8Lp
 h4xiEfeFgsUg0fQZRxDrUONhK4/gdlrD9DgHXUW9k5Ws/n944PCD89ALv9lfDPzuZq8B
 DZMw==
X-Gm-Message-State: AOAM533I5T1PWGLezXe+/MkKeFyjc9JliDn/BR/Mxik5CEy25hCEWuyR
 ckS05AsH3JkTchQDasOT0a7w1450vj4dag==
X-Google-Smtp-Source: ABdhPJyoge4jGmYBU87TZo/RHjEdlADsJ5xjDUqodqjZKkTw6xaSwn3Ps9n058hcnn9Ld/2JRoPNCQ==
X-Received: by 2002:a63:d34f:: with SMTP id u15mr10424419pgi.200.1633105838051; 
 Fri, 01 Oct 2021 09:30:38 -0700 (PDT)
Received: from hermes.local (204-195-33-123.wavecable.com. [204.195.33.123])
 by smtp.gmail.com with ESMTPSA id u2sm1450432pfi.120.2021.10.01.09.30.37
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Fri, 01 Oct 2021 09:30:37 -0700 (PDT)
From: Stephen Hemminger <stephen@networkplumber.org>
To: dev@dpdk.org
Cc: Stephen Hemminger <stephen@networkplumber.org>
Date: Fri,  1 Oct 2021 09:26:53 -0700
Message-Id: <20211001162705.442298-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 v12 00/12] Packet capture framework update
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: DPDK patches and discussions <dev.dpdk.org>
List-Unsubscribe: <https://mails.dpdk.org/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://mails.dpdk.org/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <https://mails.dpdk.org/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
Errors-To: dev-bounces@dpdk.org
Sender: "dev" <dev-bounces@dpdk.org>

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:
  * bogus checkpatch warnings
	- the correct flag to open is O_CREAT
        - intentionally keeping macro with goto since that
          was in original code and is clearer
        - the tempfile name can not be const since it is
          overwritten by tmpfile() call

  * enabling BPF tests causes CI to see a pre-existing bug
    https://bugs.dpdk.org/show_bug.cgi?id=811

  * future filtering for stripped VLAN tags needs collabration
    with libpcap project to fix pcap_compile_filter().

v12
  - fixes for capture offloaded VLAN tags.
    look at direction flag and handle QinQ offload.

v11
  - address review comments for pdump (patch 6)

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):
  lib: pdump is not supported on Windows
  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
  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                       | 613 +++++++++++++
 lib/pcapng/rte_pcapng.h                       | 194 ++++
 lib/pcapng/version.map                        |  12 +
 lib/pdump/meson.build                         |   2 +-
 lib/pdump/rte_pdump.c                         | 427 ++++++---
 lib/pdump/rte_pdump.h                         | 113 ++-
 lib/pdump/version.map                         |   8 +
 33 files changed, 3733 insertions(+), 219 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