From patchwork Fri Jan 25 20:26:39 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bruce Richardson X-Patchwork-Id: 50058 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 28B733257; Fri, 25 Jan 2019 21:26:57 +0100 (CET) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by dpdk.org (Postfix) with ESMTP id 709D33256 for ; Fri, 25 Jan 2019 21:26:55 +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:26:55 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,522,1539673200"; d="scan'208";a="138843390" 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:26:54 -0800 From: Bruce Richardson To: dev@dpdk.org Cc: Bruce Richardson Date: Fri, 25 Jan 2019 20:26:39 +0000 Message-Id: <20190125202642.66559-2-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 Subject: [dpdk-dev] [PATCH 1/4] test/cmdline_test: move to app directory 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Move app to "app" directory and enable with meson build. Signed-off-by: Bruce Richardson --- app/Makefile | 1 + {test => app}/cmdline_test/Makefile | 0 {test => app}/cmdline_test/cmdline_test.c | 0 {test => app}/cmdline_test/cmdline_test.h | 0 {test => app}/cmdline_test/cmdline_test.py | 0 {test => app}/cmdline_test/cmdline_test_data.py | 0 {test => app}/cmdline_test/commands.c | 0 app/cmdline_test/meson.build | 5 +++++ app/meson.build | 3 ++- test/Makefile | 1 - 10 files changed, 8 insertions(+), 2 deletions(-) rename {test => app}/cmdline_test/Makefile (100%) rename {test => app}/cmdline_test/cmdline_test.c (100%) rename {test => app}/cmdline_test/cmdline_test.h (100%) rename {test => app}/cmdline_test/cmdline_test.py (100%) rename {test => app}/cmdline_test/cmdline_test_data.py (100%) rename {test => app}/cmdline_test/commands.c (100%) create mode 100644 app/cmdline_test/meson.build diff --git a/app/Makefile b/app/Makefile index d6641ef1c..3515097d9 100644 --- a/app/Makefile +++ b/app/Makefile @@ -6,6 +6,7 @@ include $(RTE_SDK)/mk/rte.vars.mk DIRS-$(CONFIG_RTE_TEST_PMD) += test-pmd DIRS-$(CONFIG_RTE_PROC_INFO) += proc-info DIRS-$(CONFIG_RTE_LIBRTE_PDUMP) += pdump +DIRS-$(CONFIG_RTE_LIBRTE_CMDLINE) += cmdline_test ifeq ($(CONFIG_RTE_LIBRTE_BBDEV),y) DIRS-$(CONFIG_RTE_TEST_BBDEV) += test-bbdev diff --git a/test/cmdline_test/Makefile b/app/cmdline_test/Makefile similarity index 100% rename from test/cmdline_test/Makefile rename to app/cmdline_test/Makefile diff --git a/test/cmdline_test/cmdline_test.c b/app/cmdline_test/cmdline_test.c similarity index 100% rename from test/cmdline_test/cmdline_test.c rename to app/cmdline_test/cmdline_test.c diff --git a/test/cmdline_test/cmdline_test.h b/app/cmdline_test/cmdline_test.h similarity index 100% rename from test/cmdline_test/cmdline_test.h rename to app/cmdline_test/cmdline_test.h diff --git a/test/cmdline_test/cmdline_test.py b/app/cmdline_test/cmdline_test.py similarity index 100% rename from test/cmdline_test/cmdline_test.py rename to app/cmdline_test/cmdline_test.py diff --git a/test/cmdline_test/cmdline_test_data.py b/app/cmdline_test/cmdline_test_data.py similarity index 100% rename from test/cmdline_test/cmdline_test_data.py rename to app/cmdline_test/cmdline_test_data.py diff --git a/test/cmdline_test/commands.c b/app/cmdline_test/commands.c similarity index 100% rename from test/cmdline_test/commands.c rename to app/cmdline_test/commands.c diff --git a/app/cmdline_test/meson.build b/app/cmdline_test/meson.build new file mode 100644 index 000000000..47d3f3791 --- /dev/null +++ b/app/cmdline_test/meson.build @@ -0,0 +1,5 @@ +# SPDX-License-Identifier: BSD-3-Clause +# Copyright(c) 2019 Intel Corporation + +sources = files('commands.c', 'cmdline_test.c') +deps += 'cmdline' diff --git a/app/meson.build b/app/meson.build index 47a2a8615..9fc9b4fdc 100644 --- a/app/meson.build +++ b/app/meson.build @@ -1,7 +1,8 @@ # SPDX-License-Identifier: BSD-3-Clause # Copyright(c) 2017 Intel Corporation -apps = ['pdump', +apps = ['cmdline_test', + 'pdump', 'proc-info', 'test-bbdev', 'test-compress-perf', diff --git a/test/Makefile b/test/Makefile index 6656374fc..4ffc087a0 100644 --- a/test/Makefile +++ b/test/Makefile @@ -6,6 +6,5 @@ include $(RTE_SDK)/mk/rte.vars.mk DIRS-$(CONFIG_RTE_APP_TEST) += test DIRS-$(CONFIG_RTE_LIBRTE_ACL) += test-acl DIRS-$(CONFIG_RTE_LIBRTE_PIPELINE) += test-pipeline -DIRS-$(CONFIG_RTE_LIBRTE_CMDLINE) += cmdline_test include $(RTE_SDK)/mk/rte.subdir.mk From patchwork Fri Jan 25 20:26:40 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bruce Richardson X-Patchwork-Id: 50059 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id CF7A9326C; Fri, 25 Jan 2019 21:26:59 +0100 (CET) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by dpdk.org (Postfix) with ESMTP id 22A13F72 for ; Fri, 25 Jan 2019 21:26:57 +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:26:57 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,522,1539673200"; d="scan'208";a="138843396" 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:26:57 -0800 From: Bruce Richardson To: dev@dpdk.org Cc: Bruce Richardson Date: Fri, 25 Jan 2019 20:26:40 +0000 Message-Id: <20190125202642.66559-3-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 Subject: [dpdk-dev] [PATCH 2/4] test/test-acl: move to app directory 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Move to "app" directory and enable with meson build. Signed-off-by: Bruce Richardson --- app/Makefile | 1 + app/meson.build | 1 + {test => app}/test-acl/Makefile | 0 {test => app}/test-acl/main.c | 0 app/test-acl/meson.build | 5 +++++ test/Makefile | 1 - 6 files changed, 7 insertions(+), 1 deletion(-) rename {test => app}/test-acl/Makefile (100%) rename {test => app}/test-acl/main.c (100%) create mode 100644 app/test-acl/meson.build diff --git a/app/Makefile b/app/Makefile index 3515097d9..7f397f3d5 100644 --- a/app/Makefile +++ b/app/Makefile @@ -7,6 +7,7 @@ DIRS-$(CONFIG_RTE_TEST_PMD) += test-pmd DIRS-$(CONFIG_RTE_PROC_INFO) += proc-info DIRS-$(CONFIG_RTE_LIBRTE_PDUMP) += pdump DIRS-$(CONFIG_RTE_LIBRTE_CMDLINE) += cmdline_test +DIRS-$(CONFIG_RTE_LIBRTE_ACL) += test-acl ifeq ($(CONFIG_RTE_LIBRTE_BBDEV),y) DIRS-$(CONFIG_RTE_TEST_BBDEV) += test-bbdev diff --git a/app/meson.build b/app/meson.build index 9fc9b4fdc..5865d5e01 100644 --- a/app/meson.build +++ b/app/meson.build @@ -4,6 +4,7 @@ apps = ['cmdline_test', 'pdump', 'proc-info', + 'test-acl', 'test-bbdev', 'test-compress-perf', 'test-crypto-perf', diff --git a/test/test-acl/Makefile b/app/test-acl/Makefile similarity index 100% rename from test/test-acl/Makefile rename to app/test-acl/Makefile diff --git a/test/test-acl/main.c b/app/test-acl/main.c similarity index 100% rename from test/test-acl/main.c rename to app/test-acl/main.c diff --git a/app/test-acl/meson.build b/app/test-acl/meson.build new file mode 100644 index 000000000..6875bc128 --- /dev/null +++ b/app/test-acl/meson.build @@ -0,0 +1,5 @@ +# SPDX-License-Identifier: BSD-3-Clause +# Copyright(c) 2019 Intel Corporation + +sources = files('main.c') +deps += ['acl', 'net'] diff --git a/test/Makefile b/test/Makefile index 4ffc087a0..0b7a3ed96 100644 --- a/test/Makefile +++ b/test/Makefile @@ -4,7 +4,6 @@ include $(RTE_SDK)/mk/rte.vars.mk DIRS-$(CONFIG_RTE_APP_TEST) += test -DIRS-$(CONFIG_RTE_LIBRTE_ACL) += test-acl DIRS-$(CONFIG_RTE_LIBRTE_PIPELINE) += test-pipeline include $(RTE_SDK)/mk/rte.subdir.mk From patchwork Fri Jan 25 20:26:41 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bruce Richardson X-Patchwork-Id: 50060 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 2CFCD3977; Fri, 25 Jan 2019 21:27:02 +0100 (CET) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by dpdk.org (Postfix) with ESMTP id 9845E3572 for ; Fri, 25 Jan 2019 21:27:00 +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:00 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,522,1539673200"; d="scan'208";a="138843401" 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:26:59 -0800 From: Bruce Richardson To: dev@dpdk.org Cc: Bruce Richardson Date: Fri, 25 Jan 2019 20:26:41 +0000 Message-Id: <20190125202642.66559-4-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 Subject: [dpdk-dev] [PATCH 3/4] test/test-pipeline: move to app directory 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Move to the app directory, and add to meson build. Signed-off-by: Bruce Richardson --- app/Makefile | 1 + app/meson.build | 1 + {test => app}/test-pipeline/Makefile | 0 {test => app}/test-pipeline/config.c | 0 {test => app}/test-pipeline/init.c | 0 {test => app}/test-pipeline/main.c | 0 {test => app}/test-pipeline/main.h | 0 app/test-pipeline/meson.build | 14 ++++++++++++++ {test => app}/test-pipeline/pipeline_acl.c | 0 {test => app}/test-pipeline/pipeline_hash.c | 0 {test => app}/test-pipeline/pipeline_lpm.c | 0 {test => app}/test-pipeline/pipeline_lpm_ipv6.c | 0 {test => app}/test-pipeline/pipeline_stub.c | 0 {test => app}/test-pipeline/runtime.c | 0 test/Makefile | 1 - 15 files changed, 16 insertions(+), 1 deletion(-) rename {test => app}/test-pipeline/Makefile (100%) rename {test => app}/test-pipeline/config.c (100%) rename {test => app}/test-pipeline/init.c (100%) rename {test => app}/test-pipeline/main.c (100%) rename {test => app}/test-pipeline/main.h (100%) create mode 100644 app/test-pipeline/meson.build rename {test => app}/test-pipeline/pipeline_acl.c (100%) rename {test => app}/test-pipeline/pipeline_hash.c (100%) rename {test => app}/test-pipeline/pipeline_lpm.c (100%) rename {test => app}/test-pipeline/pipeline_lpm_ipv6.c (100%) rename {test => app}/test-pipeline/pipeline_stub.c (100%) rename {test => app}/test-pipeline/runtime.c (100%) diff --git a/app/Makefile b/app/Makefile index 7f397f3d5..2940ac38f 100644 --- a/app/Makefile +++ b/app/Makefile @@ -8,6 +8,7 @@ DIRS-$(CONFIG_RTE_PROC_INFO) += proc-info DIRS-$(CONFIG_RTE_LIBRTE_PDUMP) += pdump DIRS-$(CONFIG_RTE_LIBRTE_CMDLINE) += cmdline_test DIRS-$(CONFIG_RTE_LIBRTE_ACL) += test-acl +DIRS-$(CONFIG_RTE_LIBRTE_PIPELINE) += test-pipeline ifeq ($(CONFIG_RTE_LIBRTE_BBDEV),y) DIRS-$(CONFIG_RTE_TEST_BBDEV) += test-bbdev diff --git a/app/meson.build b/app/meson.build index 5865d5e01..6053af7c1 100644 --- a/app/meson.build +++ b/app/meson.build @@ -9,6 +9,7 @@ apps = ['cmdline_test', 'test-compress-perf', 'test-crypto-perf', 'test-eventdev', + 'test-pipeline', 'test-pmd'] # for BSD only diff --git a/test/test-pipeline/Makefile b/app/test-pipeline/Makefile similarity index 100% rename from test/test-pipeline/Makefile rename to app/test-pipeline/Makefile diff --git a/test/test-pipeline/config.c b/app/test-pipeline/config.c similarity index 100% rename from test/test-pipeline/config.c rename to app/test-pipeline/config.c diff --git a/test/test-pipeline/init.c b/app/test-pipeline/init.c similarity index 100% rename from test/test-pipeline/init.c rename to app/test-pipeline/init.c diff --git a/test/test-pipeline/main.c b/app/test-pipeline/main.c similarity index 100% rename from test/test-pipeline/main.c rename to app/test-pipeline/main.c diff --git a/test/test-pipeline/main.h b/app/test-pipeline/main.h similarity index 100% rename from test/test-pipeline/main.h rename to app/test-pipeline/main.h diff --git a/app/test-pipeline/meson.build b/app/test-pipeline/meson.build new file mode 100644 index 000000000..274391c61 --- /dev/null +++ b/app/test-pipeline/meson.build @@ -0,0 +1,14 @@ +# SPDX-License-Identifier: BSD-3-Clause +# Copyright(c) 2019 Intel Corporation + +sources = files( + 'config.c', + 'init.c', + 'main.c', + 'pipeline_acl.c', + 'pipeline_hash.c', + 'pipeline_lpm.c', + 'pipeline_lpm_ipv6.c', + 'pipeline_stub.c', + 'runtime.c') +deps += 'pipeline' diff --git a/test/test-pipeline/pipeline_acl.c b/app/test-pipeline/pipeline_acl.c similarity index 100% rename from test/test-pipeline/pipeline_acl.c rename to app/test-pipeline/pipeline_acl.c diff --git a/test/test-pipeline/pipeline_hash.c b/app/test-pipeline/pipeline_hash.c similarity index 100% rename from test/test-pipeline/pipeline_hash.c rename to app/test-pipeline/pipeline_hash.c diff --git a/test/test-pipeline/pipeline_lpm.c b/app/test-pipeline/pipeline_lpm.c similarity index 100% rename from test/test-pipeline/pipeline_lpm.c rename to app/test-pipeline/pipeline_lpm.c diff --git a/test/test-pipeline/pipeline_lpm_ipv6.c b/app/test-pipeline/pipeline_lpm_ipv6.c similarity index 100% rename from test/test-pipeline/pipeline_lpm_ipv6.c rename to app/test-pipeline/pipeline_lpm_ipv6.c diff --git a/test/test-pipeline/pipeline_stub.c b/app/test-pipeline/pipeline_stub.c similarity index 100% rename from test/test-pipeline/pipeline_stub.c rename to app/test-pipeline/pipeline_stub.c diff --git a/test/test-pipeline/runtime.c b/app/test-pipeline/runtime.c similarity index 100% rename from test/test-pipeline/runtime.c rename to app/test-pipeline/runtime.c diff --git a/test/Makefile b/test/Makefile index 0b7a3ed96..e9ae64b59 100644 --- a/test/Makefile +++ b/test/Makefile @@ -4,6 +4,5 @@ include $(RTE_SDK)/mk/rte.vars.mk DIRS-$(CONFIG_RTE_APP_TEST) += test -DIRS-$(CONFIG_RTE_LIBRTE_PIPELINE) += test-pipeline include $(RTE_SDK)/mk/rte.subdir.mk From patchwork Fri Jan 25 20:26:42 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bruce Richardson X-Patchwork-Id: 50061 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id BFA674C77; Fri, 25 Jan 2019 21:27:06 +0100 (CET) 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 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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