From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by dpdk.org (Postfix) with ESMTP id 05C234C77 for ; Fri, 25 Jan 2019 21:27:04 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 25 Jan 2019 12:27:04 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,522,1539673200"; d="scan'208";a="138843415" Received: from silpixa00399126.ir.intel.com (HELO silpixa00399126.ger.corp.intel.com) ([10.237.222.236]) by fmsmga004.fm.intel.com with ESMTP; 25 Jan 2019 12:27:03 -0800 From: Bruce Richardson To: dev@dpdk.org Cc: Bruce Richardson Date: Fri, 25 Jan 2019 20:26:42 +0000 Message-Id: <20190125202642.66559-5-bruce.richardson@intel.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190125202642.66559-1-bruce.richardson@intel.com> References: <20190125202642.66559-1-bruce.richardson@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH 4/4] test/bpf: move to examples folder X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Jan 2019 20:27:05 -0000 The bpf folder didn't actual contain a test application, but instead basic examples of BPF code for use with testpmd. Therefore we can move it to the `examples` folder. Being different, it also needs a README with it, explaining what it is and how to use it. References to the code from the testpmd docs are suitably updated. Signed-off-by: Bruce Richardson --- doc/guides/testpmd_app_ug/testpmd_funcs.rst | 8 ++++---- examples/bpf/README | 8 ++++++++ {test => examples}/bpf/dummy.c | 0 {test => examples}/bpf/mbuf.h | 0 examples/bpf/meson.build | 6 ++++++ {test => examples}/bpf/t1.c | 0 {test => examples}/bpf/t2.c | 0 {test => examples}/bpf/t3.c | 0 8 files changed, 18 insertions(+), 4 deletions(-) create mode 100644 examples/bpf/README rename {test => examples}/bpf/dummy.c (100%) rename {test => examples}/bpf/mbuf.h (100%) create mode 100644 examples/bpf/meson.build rename {test => examples}/bpf/t1.c (100%) rename {test => examples}/bpf/t2.c (100%) rename {test => examples}/bpf/t3.c (100%) diff --git a/doc/guides/testpmd_app_ug/testpmd_funcs.rst b/doc/guides/testpmd_app_ug/testpmd_funcs.rst index 854af2d5f..ad382ddb3 100644 --- a/doc/guides/testpmd_app_ug/testpmd_funcs.rst +++ b/doc/guides/testpmd_app_ug/testpmd_funcs.rst @@ -4487,20 +4487,20 @@ For example: .. code-block:: console - cd test/bpf + cd examples/bpf clang -O2 -target bpf -c t1.c Then to load (and JIT compile) t1.o at RX queue 0, port 1:: .. code-block:: console - testpmd> bpf-load rx 1 0 J ./dpdk.org/test/bpf/t1.o + testpmd> bpf-load rx 1 0 J ./dpdk.org/examples/bpf/t1.o To load (not JITed) t1.o at TX queue 0, port 0:: .. code-block:: console - testpmd> bpf-load tx 0 0 - ./dpdk.org/test/bpf/t1.o + testpmd> bpf-load tx 0 0 - ./dpdk.org/examples/bpf/t1.o bpf-unload ~~~~~~~~~~ @@ -4513,4 +4513,4 @@ For example to unload BPF filter from TX queue 0, port 0: .. code-block:: console - testpmd> bpf-load tx 0 0 - ./dpdk.org/test/bpf/t1.o + testpmd> bpf-unload tx 0 0 diff --git a/examples/bpf/README b/examples/bpf/README new file mode 100644 index 000000000..d714180a5 --- /dev/null +++ b/examples/bpf/README @@ -0,0 +1,8 @@ +This folder contains example BPF programs for use with the DPDK bpf +library. To get details of each program and how to compile it, see +the header on the '.c' file itself. + +Once compiled, these example programs can be loaded into `testpmd` +for execution on a packet stream. See `bpf-load` and `bpf-unload` +commands documented in the `Testpmd Application User Guide` for +details on how to do so. diff --git a/test/bpf/dummy.c b/examples/bpf/dummy.c similarity index 100% rename from test/bpf/dummy.c rename to examples/bpf/dummy.c diff --git a/test/bpf/mbuf.h b/examples/bpf/mbuf.h similarity index 100% rename from test/bpf/mbuf.h rename to examples/bpf/mbuf.h diff --git a/examples/bpf/meson.build b/examples/bpf/meson.build new file mode 100644 index 000000000..bf1c4f831 --- /dev/null +++ b/examples/bpf/meson.build @@ -0,0 +1,6 @@ +# SPDX-License-Identifier: BSD-3-Clause +# Copyright(c) 2019 Intel Corporation + +# This contains BPF example code for use in testing BPF with testpmd, +# therefore it should not be built as part of a meson build. +build=false diff --git a/test/bpf/t1.c b/examples/bpf/t1.c similarity index 100% rename from test/bpf/t1.c rename to examples/bpf/t1.c diff --git a/test/bpf/t2.c b/examples/bpf/t2.c similarity index 100% rename from test/bpf/t2.c rename to examples/bpf/t2.c diff --git a/test/bpf/t3.c b/examples/bpf/t3.c similarity index 100% rename from test/bpf/t3.c rename to examples/bpf/t3.c -- 2.20.1