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 89FE9A00C4; Thu, 28 Jul 2022 01:03:25 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9B3BC42BF3; Thu, 28 Jul 2022 01:02:00 +0200 (CEST) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by mails.dpdk.org (Postfix) with ESMTP id 0251C42B81 for ; Thu, 28 Jul 2022 01:01:51 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1658962912; x=1690498912; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=o4Hv29nJvXbm18Jgb9+CWzggR1QJ4e4cPLOPwngu8bs=; b=CHEi7cwywL3qyYUmr7BCUWan1HimMDKUHEdmaDo2MtI9GjJOor8BDfPZ 2rZR/DWmkMPh8gJQgZJ4p9TkRdWORkec9g1K2Nk8RlrLLlRV7vEV6CbXE IG51zAyCMO5p/CN1uSmejfvbkw3odeLlb5BC270kqbcitVUUhaCJFyIx5 uXxQ6gD7YNIvP2N2LaAPb9jyex3EOu1hWIxYnKtiGXJRl7ldKgGvyMpr/ TB5hIsRqUZnJgQWvTbukFmVttXcOB8s7PsuPVdOwsRCXy0XkHCYFeLafU WBzaJGkaO5IfT68lzyatUQOtrEZUoxt/ShTwSPxEWNDqv/TR5X52zVSir g==; X-IronPort-AV: E=McAfee;i="6400,9594,10421"; a="289135848" X-IronPort-AV: E=Sophos;i="5.93,196,1654585200"; d="scan'208";a="289135848" Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Jul 2022 16:01:51 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.93,196,1654585200"; d="scan'208";a="846444412" Received: from silpixa00400573.ir.intel.com (HELO silpixa00400573.ger.corp.intel.com.) ([10.237.223.157]) by fmsmga006.fm.intel.com with ESMTP; 27 Jul 2022 16:01:50 -0700 From: Cristian Dumitrescu To: dev@dpdk.org Cc: "Kamalakannan R ." Subject: [PATCH V5 17/17] examples/pipeline: call the code generation and build CLI commands Date: Wed, 27 Jul 2022 23:01:32 +0000 Message-Id: <20220727230132.601114-17-cristian.dumitrescu@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220727230132.601114-1-cristian.dumitrescu@intel.com> References: <20220727225431.600913-1-cristian.dumitrescu@intel.com> <20220727230132.601114-1-cristian.dumitrescu@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 Update the example CLI scripts with the commands for code generation and shared object library build. Signed-off-by: Cristian Dumitrescu Signed-off-by: Kamalakannan R. --- examples/pipeline/examples/ethdev.io | 27 +++++++++ examples/pipeline/examples/fib.cli | 44 +++++++------- examples/pipeline/examples/hash_func.cli | 41 ++++++------- examples/pipeline/examples/l2fwd.cli | 44 ++++++++------ examples/pipeline/examples/l2fwd_macswp.cli | 44 ++++++++------ .../pipeline/examples/l2fwd_macswp_pcap.cli | 35 +++++++---- examples/pipeline/examples/l2fwd_pcap.cli | 35 +++++++---- examples/pipeline/examples/learner.cli | 43 +++++++------- examples/pipeline/examples/meter.cli | 58 +++++++++++-------- examples/pipeline/examples/mirroring.cli | 46 ++++++++------- examples/pipeline/examples/pcap.io | 27 +++++++++ examples/pipeline/examples/recirculation.cli | 41 ++++++------- examples/pipeline/examples/registers.cli | 53 +++++++++-------- examples/pipeline/examples/selector.cli | 55 +++++++++++------- examples/pipeline/examples/varbit.cli | 41 ++++++------- examples/pipeline/examples/vxlan.cli | 48 ++++++++++----- examples/pipeline/examples/vxlan_pcap.cli | 39 +++++++++---- 17 files changed, 444 insertions(+), 277 deletions(-) create mode 100644 examples/pipeline/examples/ethdev.io create mode 100644 examples/pipeline/examples/pcap.io diff --git a/examples/pipeline/examples/ethdev.io b/examples/pipeline/examples/ethdev.io new file mode 100644 index 0000000000..cf2f3e20bd --- /dev/null +++ b/examples/pipeline/examples/ethdev.io @@ -0,0 +1,27 @@ +; SPDX-License-Identifier: BSD-3-Clause +; Copyright(c) 2022 Intel Corporation + +; +; Pipeline packet mirroring. +; +mirroring slots 4 sessions 64 + +; +; Pipeline input ports. +; +; Note: Customize the parameters below to match your setup. +; +port in 0 ethdev 0000:18:00.0 rxq 0 bsz 32 +port in 1 ethdev 0000:18:00.1 rxq 0 bsz 32 +port in 2 ethdev 0000:3b:00.0 rxq 0 bsz 32 +port in 3 ethdev 0000:3b:00.1 rxq 0 bsz 32 + +; +; Pipeline output ports. +; +; Note: Customize the parameters below to match your setup. +; +port out 0 ethdev 0000:18:00.0 txq 0 bsz 32 +port out 1 ethdev 0000:18:00.1 txq 0 bsz 32 +port out 2 ethdev 0000:3b:00.0 txq 0 bsz 32 +port out 3 ethdev 0000:3b:00.1 txq 0 bsz 32 diff --git a/examples/pipeline/examples/fib.cli b/examples/pipeline/examples/fib.cli index 93ab2b08f8..4e30c1320f 100644 --- a/examples/pipeline/examples/fib.cli +++ b/examples/pipeline/examples/fib.cli @@ -1,38 +1,38 @@ ; SPDX-License-Identifier: BSD-3-Clause ; Copyright(c) 2020 Intel Corporation +# Example command line: +# ./build/examples/dpdk-pipeline -l0-1 -- -s ./examples/pipeline/examples/fib.cli +# +# Once the application has started, the command to get the CLI prompt is: +# telnet 0.0.0.0 8086 + ; -; Customize the LINK parameters to match your setup. +; Pipeline code generation & shared object library build. ; -mempool MEMPOOL0 buffer 2304 pool 32K cache 256 cpu 0 - -link LINK0 dev 0000:18:00.0 rxq 1 128 MEMPOOL0 txq 1 512 promiscuous on -link LINK1 dev 0000:18:00.1 rxq 1 128 MEMPOOL0 txq 1 512 promiscuous on -link LINK2 dev 0000:3b:00.0 rxq 1 128 MEMPOOL0 txq 1 512 promiscuous on -link LINK3 dev 0000:3b:00.1 rxq 1 128 MEMPOOL0 txq 1 512 promiscuous on +pipeline codegen ./examples/pipeline/examples/fib.spec /tmp/fib.c +pipeline libbuild /tmp/fib.c /tmp/fib.so ; -; PIPELINE0 setup. +; List of DPDK devices. ; -pipeline PIPELINE0 create 0 - -pipeline PIPELINE0 port in 0 link LINK0 rxq 0 bsz 32 -pipeline PIPELINE0 port in 1 link LINK1 rxq 0 bsz 32 -pipeline PIPELINE0 port in 2 link LINK2 rxq 0 bsz 32 -pipeline PIPELINE0 port in 3 link LINK3 rxq 0 bsz 32 - -pipeline PIPELINE0 port out 0 link LINK0 txq 0 bsz 32 -pipeline PIPELINE0 port out 1 link LINK1 txq 0 bsz 32 -pipeline PIPELINE0 port out 2 link LINK2 txq 0 bsz 32 -pipeline PIPELINE0 port out 3 link LINK3 txq 0 bsz 32 +; Note: Customize the parameters below to match your setup. +; +mempool MEMPOOL0 buffer 2304 pool 32K cache 256 cpu 0 +ethdev 0000:18:00.0 rxq 1 128 MEMPOOL0 txq 1 512 promiscuous on +ethdev 0000:18:00.1 rxq 1 128 MEMPOOL0 txq 1 512 promiscuous on +ethdev 0000:3b:00.0 rxq 1 128 MEMPOOL0 txq 1 512 promiscuous on +ethdev 0000:3b:00.1 rxq 1 128 MEMPOOL0 txq 1 512 promiscuous on -pipeline PIPELINE0 build ./examples/pipeline/examples/fib.spec +; +; List of pipelines. +; +pipeline PIPELINE0 build lib /tmp/fib.so io ./examples/pipeline/examples/ethdev.io numa 0 ; ; Initial set of table entries. ; -; The table entries can later be updated at run-time through the CLI commands. Once the application -; has been successfully started, the command to get the CLI prompt is: telnet 0.0.0.0 8086. +; The table entries can later be updated at run-time through the CLI commands. ; pipeline PIPELINE0 table routing_table add ./examples/pipeline/examples/fib_routing_table.txt pipeline PIPELINE0 selector nexthop_group_table group add diff --git a/examples/pipeline/examples/hash_func.cli b/examples/pipeline/examples/hash_func.cli index d65cd62d17..b2e219e4c9 100644 --- a/examples/pipeline/examples/hash_func.cli +++ b/examples/pipeline/examples/hash_func.cli @@ -1,32 +1,33 @@ ; SPDX-License-Identifier: BSD-3-Clause ; Copyright(c) 2022 Intel Corporation +# Example command line: +# ./build/examples/dpdk-pipeline -l0-1 -- -s ./examples/pipeline/examples/hash_func.cli +# +# Once the application has started, the command to get the CLI prompt is: +# telnet 0.0.0.0 8086 + ; -; Customize the LINK parameters to match your setup. +; Pipeline code generation & shared object library build. ; -mempool MEMPOOL0 buffer 2304 pool 32K cache 256 cpu 0 - -link LINK0 dev 0000:18:00.0 rxq 1 128 MEMPOOL0 txq 1 512 promiscuous on -link LINK1 dev 0000:18:00.1 rxq 1 128 MEMPOOL0 txq 1 512 promiscuous on -link LINK2 dev 0000:3b:00.0 rxq 1 128 MEMPOOL0 txq 1 512 promiscuous on -link LINK3 dev 0000:3b:00.1 rxq 1 128 MEMPOOL0 txq 1 512 promiscuous on +pipeline codegen ./examples/pipeline/examples/hash_func.spec /tmp/hash_func.c +pipeline libbuild /tmp/hash_func.c /tmp/hash_func.so ; -; PIPELINE0 setup. +; List of DPDK devices. ; -pipeline PIPELINE0 create 0 - -pipeline PIPELINE0 port in 0 link LINK0 rxq 0 bsz 32 -pipeline PIPELINE0 port in 1 link LINK1 rxq 0 bsz 32 -pipeline PIPELINE0 port in 2 link LINK2 rxq 0 bsz 32 -pipeline PIPELINE0 port in 3 link LINK3 rxq 0 bsz 32 - -pipeline PIPELINE0 port out 0 link LINK0 txq 0 bsz 32 -pipeline PIPELINE0 port out 1 link LINK1 txq 0 bsz 32 -pipeline PIPELINE0 port out 2 link LINK2 txq 0 bsz 32 -pipeline PIPELINE0 port out 3 link LINK3 txq 0 bsz 32 +; Note: Customize the parameters below to match your setup. +; +mempool MEMPOOL0 buffer 2304 pool 32K cache 256 cpu 0 +ethdev 0000:18:00.0 rxq 1 128 MEMPOOL0 txq 1 512 promiscuous on +ethdev 0000:18:00.1 rxq 1 128 MEMPOOL0 txq 1 512 promiscuous on +ethdev 0000:3b:00.0 rxq 1 128 MEMPOOL0 txq 1 512 promiscuous on +ethdev 0000:3b:00.1 rxq 1 128 MEMPOOL0 txq 1 512 promiscuous on -pipeline PIPELINE0 build ./examples/pipeline/examples/hash_func.spec +; +; List of pipelines. +; +pipeline PIPELINE0 build lib /tmp/hash_func.so io ./examples/pipeline/examples/ethdev.io numa 0 ; ; Pipelines-to-threads mapping. diff --git a/examples/pipeline/examples/l2fwd.cli b/examples/pipeline/examples/l2fwd.cli index d89caf2d0a..27e37021b9 100644 --- a/examples/pipeline/examples/l2fwd.cli +++ b/examples/pipeline/examples/l2fwd.cli @@ -1,25 +1,35 @@ ; SPDX-License-Identifier: BSD-3-Clause ; Copyright(c) 2020 Intel Corporation -mempool MEMPOOL0 buffer 2304 pool 32K cache 256 cpu 0 - -link LINK0 dev 0000:18:00.0 rxq 1 128 MEMPOOL0 txq 1 512 promiscuous on -link LINK1 dev 0000:18:00.1 rxq 1 128 MEMPOOL0 txq 1 512 promiscuous on -link LINK2 dev 0000:3b:00.0 rxq 1 128 MEMPOOL0 txq 1 512 promiscuous on -link LINK3 dev 0000:3b:00.1 rxq 1 128 MEMPOOL0 txq 1 512 promiscuous on +# Example command line: +# ./build/examples/dpdk-pipeline -l0-1 -- -s ./examples/pipeline/examples/l2fwd.cli +# +# Once the application has started, the command to get the CLI prompt is: +# telnet 0.0.0.0 8086 -pipeline PIPELINE0 create 0 +; +; Pipeline code generation & shared object library build. +; +pipeline codegen ./examples/pipeline/examples/l2fwd.spec /tmp/l2fwd.c +pipeline libbuild /tmp/l2fwd.c /tmp/l2fwd.so -pipeline PIPELINE0 port in 0 link LINK0 rxq 0 bsz 32 -pipeline PIPELINE0 port in 1 link LINK1 rxq 0 bsz 32 -pipeline PIPELINE0 port in 2 link LINK2 rxq 0 bsz 32 -pipeline PIPELINE0 port in 3 link LINK3 rxq 0 bsz 32 - -pipeline PIPELINE0 port out 0 link LINK0 txq 0 bsz 32 -pipeline PIPELINE0 port out 1 link LINK1 txq 0 bsz 32 -pipeline PIPELINE0 port out 2 link LINK2 txq 0 bsz 32 -pipeline PIPELINE0 port out 3 link LINK3 txq 0 bsz 32 +; +; List of DPDK devices. +; +; Note: Customize the parameters below to match your setup. +; +mempool MEMPOOL0 buffer 2304 pool 32K cache 256 cpu 0 +ethdev 0000:18:00.0 rxq 1 128 MEMPOOL0 txq 1 512 promiscuous on +ethdev 0000:18:00.1 rxq 1 128 MEMPOOL0 txq 1 512 promiscuous on +ethdev 0000:3b:00.0 rxq 1 128 MEMPOOL0 txq 1 512 promiscuous on +ethdev 0000:3b:00.1 rxq 1 128 MEMPOOL0 txq 1 512 promiscuous on -pipeline PIPELINE0 build ./examples/pipeline/examples/l2fwd.spec +; +; List of pipelines. +; +pipeline PIPELINE0 build lib /tmp/l2fwd.so io ./examples/pipeline/examples/ethdev.io numa 0 +; +; Pipelines-to-threads mapping. +; thread 1 pipeline PIPELINE0 enable diff --git a/examples/pipeline/examples/l2fwd_macswp.cli b/examples/pipeline/examples/l2fwd_macswp.cli index 0f2a89ac5b..11bb4543b9 100644 --- a/examples/pipeline/examples/l2fwd_macswp.cli +++ b/examples/pipeline/examples/l2fwd_macswp.cli @@ -1,25 +1,35 @@ ; SPDX-License-Identifier: BSD-3-Clause ; Copyright(c) 2020 Intel Corporation -mempool MEMPOOL0 buffer 2304 pool 32K cache 256 cpu 0 - -link LINK0 dev 0000:18:00.0 rxq 1 128 MEMPOOL0 txq 1 512 promiscuous on -link LINK1 dev 0000:18:00.1 rxq 1 128 MEMPOOL0 txq 1 512 promiscuous on -link LINK2 dev 0000:3b:00.0 rxq 1 128 MEMPOOL0 txq 1 512 promiscuous on -link LINK3 dev 0000:3b:00.1 rxq 1 128 MEMPOOL0 txq 1 512 promiscuous on +# Example command line: +# ./build/examples/dpdk-pipeline -l0-1 -- -s ./examples/pipeline/examples/l2fwd_macswp.cli +# +# Once the application has started, the command to get the CLI prompt is: +# telnet 0.0.0.0 8086 -pipeline PIPELINE0 create 0 +; +; Pipeline code generation & shared object library build. +; +pipeline codegen ./examples/pipeline/examples/l2fwd_macswp.spec /tmp/l2fwd_macswp.c +pipeline libbuild /tmp/l2fwd_macswp.c /tmp/l2fwd_macswp.so -pipeline PIPELINE0 port in 0 link LINK0 rxq 0 bsz 32 -pipeline PIPELINE0 port in 1 link LINK1 rxq 0 bsz 32 -pipeline PIPELINE0 port in 2 link LINK2 rxq 0 bsz 32 -pipeline PIPELINE0 port in 3 link LINK3 rxq 0 bsz 32 - -pipeline PIPELINE0 port out 0 link LINK0 txq 0 bsz 32 -pipeline PIPELINE0 port out 1 link LINK1 txq 0 bsz 32 -pipeline PIPELINE0 port out 2 link LINK2 txq 0 bsz 32 -pipeline PIPELINE0 port out 3 link LINK3 txq 0 bsz 32 +; +; List of DPDK devices. +; +; Note: Customize the parameters below to match your setup. +; +mempool MEMPOOL0 buffer 2304 pool 32K cache 256 cpu 0 +ethdev 0000:18:00.0 rxq 1 128 MEMPOOL0 txq 1 512 promiscuous on +ethdev 0000:18:00.1 rxq 1 128 MEMPOOL0 txq 1 512 promiscuous on +ethdev 0000:3b:00.0 rxq 1 128 MEMPOOL0 txq 1 512 promiscuous on +ethdev 0000:3b:00.1 rxq 1 128 MEMPOOL0 txq 1 512 promiscuous on -pipeline PIPELINE0 build ./examples/pipeline/examples/l2fwd_macswp.spec +; +; List of pipelines. +; +pipeline PIPELINE0 build lib /tmp/l2fwd_macswp.so io ./examples/pipeline/examples/ethdev.io numa 0 +; +; Pipelines-to-threads mapping. +; thread 1 pipeline PIPELINE0 enable diff --git a/examples/pipeline/examples/l2fwd_macswp_pcap.cli b/examples/pipeline/examples/l2fwd_macswp_pcap.cli index e9656fe3c2..8724dae3b0 100644 --- a/examples/pipeline/examples/l2fwd_macswp_pcap.cli +++ b/examples/pipeline/examples/l2fwd_macswp_pcap.cli @@ -1,20 +1,31 @@ ; SPDX-License-Identifier: BSD-3-Clause ; Copyright(c) 2020 Intel Corporation -mempool MEMPOOL0 buffer 2304 pool 32K cache 256 cpu 0 - -pipeline PIPELINE0 create 0 +# Example command line: +# ./build/examples/dpdk-pipeline -l0-1 -- -s ./examples/pipeline/examples/l2fwd_macswp_pcap.cli +# +# Once the application has started, the command to get the CLI prompt is: +# telnet 0.0.0.0 8086 -pipeline PIPELINE0 port in 0 source MEMPOOL0 ./examples/pipeline/examples/packet.pcap loop 1 -pipeline PIPELINE0 port in 1 source MEMPOOL0 ./examples/pipeline/examples/packet.pcap loop 1 -pipeline PIPELINE0 port in 2 source MEMPOOL0 ./examples/pipeline/examples/packet.pcap loop 1 -pipeline PIPELINE0 port in 3 source MEMPOOL0 ./examples/pipeline/examples/packet.pcap loop 1 +; +; Pipeline code generation & shared object library build. +; +pipeline codegen ./examples/pipeline/examples/l2fwd_macswp.spec /tmp/l2fwd_macswp.c +pipeline libbuild /tmp/l2fwd_macswp.c /tmp/l2fwd_macswp.so -pipeline PIPELINE0 port out 0 sink none -pipeline PIPELINE0 port out 1 sink none -pipeline PIPELINE0 port out 2 sink none -pipeline PIPELINE0 port out 3 sink none +; +; List of DPDK devices. +; +; Note: Customize the parameters below to match your setup. +; +mempool MEMPOOL0 buffer 2304 pool 32K cache 256 cpu 0 -pipeline PIPELINE0 build ./examples/pipeline/examples/l2fwd_macswp.spec +; +; List of pipelines. +; +pipeline PIPELINE0 build lib /tmp/l2fwd_macswp.so io ./examples/pipeline/examples/pcap.io numa 0 +; +; Pipelines-to-threads mapping. +; thread 1 pipeline PIPELINE0 enable diff --git a/examples/pipeline/examples/l2fwd_pcap.cli b/examples/pipeline/examples/l2fwd_pcap.cli index 23fcb199f1..4db0a0dc56 100644 --- a/examples/pipeline/examples/l2fwd_pcap.cli +++ b/examples/pipeline/examples/l2fwd_pcap.cli @@ -1,20 +1,31 @@ ; SPDX-License-Identifier: BSD-3-Clause ; Copyright(c) 2020 Intel Corporation -mempool MEMPOOL0 buffer 2304 pool 32K cache 256 cpu 0 - -pipeline PIPELINE0 create 0 +# Example command line: +# ./build/examples/dpdk-pipeline -l0-1 -- -s ./examples/pipeline/examples/l2fwd_pcap.cli +# +# Once the application has started, the command to get the CLI prompt is: +# telnet 0.0.0.0 8086 -pipeline PIPELINE0 port in 0 source MEMPOOL0 ./examples/pipeline/examples/packet.pcap loop 1 -pipeline PIPELINE0 port in 1 source MEMPOOL0 ./examples/pipeline/examples/packet.pcap loop 1 -pipeline PIPELINE0 port in 2 source MEMPOOL0 ./examples/pipeline/examples/packet.pcap loop 1 -pipeline PIPELINE0 port in 3 source MEMPOOL0 ./examples/pipeline/examples/packet.pcap loop 1 +; +; Pipeline code generation & shared object library build. +; +pipeline codegen ./examples/pipeline/examples/l2fwd.spec /tmp/l2fwd.c +pipeline libbuild /tmp/l2fwd.c /tmp/l2fwd.so -pipeline PIPELINE0 port out 0 sink none -pipeline PIPELINE0 port out 1 sink none -pipeline PIPELINE0 port out 2 sink none -pipeline PIPELINE0 port out 3 sink none +; +; List of DPDK devices. +; +; Note: Customize the parameters below to match your setup. +; +mempool MEMPOOL0 buffer 2304 pool 32K cache 256 cpu 0 -pipeline PIPELINE0 build ./examples/pipeline/examples/l2fwd.spec +; +; List of pipelines. +; +pipeline PIPELINE0 build lib /tmp/l2fwd.so io ./examples/pipeline/examples/pcap.io numa 0 +; +; Pipelines-to-threads mapping. +; thread 1 pipeline PIPELINE0 enable diff --git a/examples/pipeline/examples/learner.cli b/examples/pipeline/examples/learner.cli index 688ce34f34..6c8aa3921e 100644 --- a/examples/pipeline/examples/learner.cli +++ b/examples/pipeline/examples/learner.cli @@ -1,36 +1,35 @@ ; SPDX-License-Identifier: BSD-3-Clause ; Copyright(c) 2020 Intel Corporation +# Example command line: +# ./build/examples/dpdk-pipeline -l0-1 -- -s ./examples/pipeline/examples/learner.cli +# +# Once the application has started, the command to get the CLI prompt is: +# telnet 0.0.0.0 8086 + ; -; Customize the LINK parameters to match your setup. +; Pipeline code generation & shared object library build. ; -mempool MEMPOOL0 buffer 2304 pool 32K cache 256 cpu 0 - -link LINK0 dev 0000:18:00.0 rxq 1 128 MEMPOOL0 txq 1 512 promiscuous on -link LINK1 dev 0000:18:00.1 rxq 1 128 MEMPOOL0 txq 1 512 promiscuous on -link LINK2 dev 0000:3b:00.0 rxq 1 128 MEMPOOL0 txq 1 512 promiscuous on -link LINK3 dev 0000:3b:00.1 rxq 1 128 MEMPOOL0 txq 1 512 promiscuous on +pipeline codegen ./examples/pipeline/examples/learner.spec /tmp/learner.c +pipeline libbuild /tmp/learner.c /tmp/learner.so ; -; PIPELINE0 setup. +; List of DPDK devices. ; -pipeline PIPELINE0 create 0 - -pipeline PIPELINE0 port in 0 link LINK0 rxq 0 bsz 32 -pipeline PIPELINE0 port in 1 link LINK1 rxq 0 bsz 32 -pipeline PIPELINE0 port in 2 link LINK2 rxq 0 bsz 32 -pipeline PIPELINE0 port in 3 link LINK3 rxq 0 bsz 32 - -pipeline PIPELINE0 port out 0 link LINK0 txq 0 bsz 32 -pipeline PIPELINE0 port out 1 link LINK1 txq 0 bsz 32 -pipeline PIPELINE0 port out 2 link LINK2 txq 0 bsz 32 -pipeline PIPELINE0 port out 3 link LINK3 txq 0 bsz 32 +; Note: Customize the parameters below to match your setup. +; +mempool MEMPOOL0 buffer 2304 pool 32K cache 256 cpu 0 +ethdev 0000:18:00.0 rxq 1 128 MEMPOOL0 txq 1 512 promiscuous on +ethdev 0000:18:00.1 rxq 1 128 MEMPOOL0 txq 1 512 promiscuous on +ethdev 0000:3b:00.0 rxq 1 128 MEMPOOL0 txq 1 512 promiscuous on +ethdev 0000:3b:00.1 rxq 1 128 MEMPOOL0 txq 1 512 promiscuous on -pipeline PIPELINE0 build ./examples/pipeline/examples/learner.spec +; +; List of pipelines. +; +pipeline PIPELINE0 build lib /tmp/learner.so io ./examples/pipeline/examples/ethdev.io numa 0 ; ; Pipelines-to-threads mapping. ; thread 1 pipeline PIPELINE0 enable - -; Once the application has started, the command to get the CLI prompt is: telnet 0.0.0.0 8086 diff --git a/examples/pipeline/examples/meter.cli b/examples/pipeline/examples/meter.cli index b29ed24022..c1b88c882a 100644 --- a/examples/pipeline/examples/meter.cli +++ b/examples/pipeline/examples/meter.cli @@ -1,31 +1,43 @@ ; SPDX-License-Identifier: BSD-3-Clause ; Copyright(c) 2020 Intel Corporation -; Example command line: -; ./build/examples/dpdk-pipeline -l0-1 -- -s ./examples/pipeline/examples/meter.cli - +# Example command line: +# ./build/examples/dpdk-pipeline -l0-1 -- -s ./examples/pipeline/examples/meter.cli +# +# Once the application has started, the command to get the CLI prompt is: +# telnet 0.0.0.0 8086 + +; +; Pipeline code generation & shared object library build. +; +pipeline codegen ./examples/pipeline/examples/meter.spec /tmp/meter.c +pipeline libbuild /tmp/meter.c /tmp/meter.so + +; +; List of DPDK devices. +; +; Note: Customize the parameters below to match your setup. +; mempool MEMPOOL0 buffer 2304 pool 32K cache 256 cpu 0 - -link LINK0 dev 0000:18:00.0 rxq 1 128 MEMPOOL0 txq 1 512 promiscuous on -link LINK1 dev 0000:18:00.1 rxq 1 128 MEMPOOL0 txq 1 512 promiscuous on -link LINK2 dev 0000:3b:00.0 rxq 1 128 MEMPOOL0 txq 1 512 promiscuous on -link LINK3 dev 0000:3b:00.1 rxq 1 128 MEMPOOL0 txq 1 512 promiscuous on - -pipeline PIPELINE0 create 0 - -pipeline PIPELINE0 port in 0 link LINK0 rxq 0 bsz 32 -pipeline PIPELINE0 port in 1 link LINK1 rxq 0 bsz 32 -pipeline PIPELINE0 port in 2 link LINK2 rxq 0 bsz 32 -pipeline PIPELINE0 port in 3 link LINK3 rxq 0 bsz 32 - -pipeline PIPELINE0 port out 0 link LINK0 txq 0 bsz 32 -pipeline PIPELINE0 port out 1 link LINK1 txq 0 bsz 32 -pipeline PIPELINE0 port out 2 link LINK2 txq 0 bsz 32 -pipeline PIPELINE0 port out 3 link LINK3 txq 0 bsz 32 - -pipeline PIPELINE0 build ./examples/pipeline/examples/meter.spec - +ethdev 0000:18:00.0 rxq 1 128 MEMPOOL0 txq 1 512 promiscuous on +ethdev 0000:18:00.1 rxq 1 128 MEMPOOL0 txq 1 512 promiscuous on +ethdev 0000:3b:00.0 rxq 1 128 MEMPOOL0 txq 1 512 promiscuous on +ethdev 0000:3b:00.1 rxq 1 128 MEMPOOL0 txq 1 512 promiscuous on + +; +; List of pipelines. +; +pipeline PIPELINE0 build lib /tmp/meter.so io ./examples/pipeline/examples/ethdev.io numa 0 + +; +; Initial set of table entries. +; +; The table entries can later be updated at run-time through the CLI commands. +; pipeline PIPELINE0 meter profile platinum add cir 46000000 pir 138000000 cbs 1000000 pbs 1000000 pipeline PIPELINE0 meter meters from 0 to 15 set profile platinum +; +; Pipelines-to-threads mapping. +; thread 1 pipeline PIPELINE0 enable diff --git a/examples/pipeline/examples/mirroring.cli b/examples/pipeline/examples/mirroring.cli index 46d57db4ec..1d439e04d3 100644 --- a/examples/pipeline/examples/mirroring.cli +++ b/examples/pipeline/examples/mirroring.cli @@ -1,36 +1,38 @@ ; SPDX-License-Identifier: BSD-3-Clause ; Copyright(c) 2022 Intel Corporation +# Example command line: +# ./build/examples/dpdk-pipeline -l0-1 -- -s ./examples/pipeline/examples/mirroring.cli +# +# Once the application has started, the command to get the CLI prompt is: +# telnet 0.0.0.0 8086 + ; -; Customize the LINK parameters to match your setup. +; Pipeline code generation & shared object library build. ; -mempool MEMPOOL0 buffer 2304 pool 32K cache 256 cpu 0 - -link LINK0 dev 0000:18:00.0 rxq 1 128 MEMPOOL0 txq 1 512 promiscuous on -link LINK1 dev 0000:18:00.1 rxq 1 128 MEMPOOL0 txq 1 512 promiscuous on -link LINK2 dev 0000:3b:00.0 rxq 1 128 MEMPOOL0 txq 1 512 promiscuous on -link LINK3 dev 0000:3b:00.1 rxq 1 128 MEMPOOL0 txq 1 512 promiscuous on +pipeline codegen ./examples/pipeline/examples/mirroring.spec /tmp/mirroring.c +pipeline libbuild /tmp/mirroring.c /tmp/mirroring.so ; -; PIPELINE0 setup. +; List of DPDK devices. ; -pipeline PIPELINE0 create 0 -pipeline PIPELINE0 mirror slots 4 sessions 16 - -pipeline PIPELINE0 port in 0 link LINK0 rxq 0 bsz 32 -pipeline PIPELINE0 port in 1 link LINK1 rxq 0 bsz 32 -pipeline PIPELINE0 port in 2 link LINK2 rxq 0 bsz 32 -pipeline PIPELINE0 port in 3 link LINK3 rxq 0 bsz 32 - -pipeline PIPELINE0 port out 0 link LINK0 txq 0 bsz 32 -pipeline PIPELINE0 port out 1 link LINK1 txq 0 bsz 32 -pipeline PIPELINE0 port out 2 link LINK2 txq 0 bsz 32 -pipeline PIPELINE0 port out 3 link LINK3 txq 0 bsz 32 +; Note: Customize the parameters below to match your setup. +; +mempool MEMPOOL0 buffer 2304 pool 32K cache 256 cpu 0 +ethdev 0000:18:00.0 rxq 1 128 MEMPOOL0 txq 1 512 promiscuous on +ethdev 0000:18:00.1 rxq 1 128 MEMPOOL0 txq 1 512 promiscuous on +ethdev 0000:3b:00.0 rxq 1 128 MEMPOOL0 txq 1 512 promiscuous on +ethdev 0000:3b:00.1 rxq 1 128 MEMPOOL0 txq 1 512 promiscuous on -pipeline PIPELINE0 build ./examples/pipeline/examples/mirroring.spec +; +; List of pipelines. +; +pipeline PIPELINE0 build lib /tmp/mirroring.so io ./examples/pipeline/examples/ethdev.io numa 0 ; -; Packet mirroring sessions. +; Initial set of table entries. +; +; The table entries can later be updated at run-time through the CLI commands. ; pipeline PIPELINE0 mirror session 0 port 1 clone fast truncate 0 pipeline PIPELINE0 mirror session 1 port 2 clone slow truncate 0 diff --git a/examples/pipeline/examples/pcap.io b/examples/pipeline/examples/pcap.io new file mode 100644 index 0000000000..111f61afae --- /dev/null +++ b/examples/pipeline/examples/pcap.io @@ -0,0 +1,27 @@ +; SPDX-License-Identifier: BSD-3-Clause +; Copyright(c) 2022 Intel Corporation + +; +; Pipeline packet mirroring. +; +mirroring slots 4 sessions 64 + +; +; Pipeline input ports. +; +; Note: Customize the parameters below to match your setup. +; +port in 0 source mempool MEMPOOL0 file ./examples/pipeline/examples/packet.pcap loop 1 packets 0 +port in 1 source mempool MEMPOOL0 file ./examples/pipeline/examples/packet.pcap loop 1 packets 0 +port in 2 source mempool MEMPOOL0 file ./examples/pipeline/examples/packet.pcap loop 1 packets 0 +port in 3 source mempool MEMPOOL0 file ./examples/pipeline/examples/packet.pcap loop 1 packets 0 + +; +; Pipeline output ports. +; +; Note: Customize the parameters below to match your setup. +; +port out 0 sink file none +port out 1 sink file none +port out 2 sink file none +port out 3 sink file none diff --git a/examples/pipeline/examples/recirculation.cli b/examples/pipeline/examples/recirculation.cli index f855c5c327..52d0894f12 100644 --- a/examples/pipeline/examples/recirculation.cli +++ b/examples/pipeline/examples/recirculation.cli @@ -1,32 +1,33 @@ ; SPDX-License-Identifier: BSD-3-Clause ; Copyright(c) 2022 Intel Corporation +# Example command line: +# ./build/examples/dpdk-pipeline -l0-1 -- -s ./examples/pipeline/examples/recirculation.cli +# +# Once the application has started, the command to get the CLI prompt is: +# telnet 0.0.0.0 8086 + ; -; Customize the LINK parameters to match your setup. +; Pipeline code generation & shared object library build. ; -mempool MEMPOOL0 buffer 2304 pool 32K cache 256 cpu 0 - -link LINK0 dev 0000:18:00.0 rxq 1 128 MEMPOOL0 txq 1 512 promiscuous on -link LINK1 dev 0000:18:00.1 rxq 1 128 MEMPOOL0 txq 1 512 promiscuous on -link LINK2 dev 0000:3b:00.0 rxq 1 128 MEMPOOL0 txq 1 512 promiscuous on -link LINK3 dev 0000:3b:00.1 rxq 1 128 MEMPOOL0 txq 1 512 promiscuous on +pipeline codegen ./examples/pipeline/examples/recirculation.spec /tmp/recirculation.c +pipeline libbuild /tmp/recirculation.c /tmp/recirculation.so ; -; PIPELINE0 setup. +; List of DPDK devices. ; -pipeline PIPELINE0 create 0 - -pipeline PIPELINE0 port in 0 link LINK0 rxq 0 bsz 32 -pipeline PIPELINE0 port in 1 link LINK1 rxq 0 bsz 32 -pipeline PIPELINE0 port in 2 link LINK2 rxq 0 bsz 32 -pipeline PIPELINE0 port in 3 link LINK3 rxq 0 bsz 32 - -pipeline PIPELINE0 port out 0 link LINK0 txq 0 bsz 32 -pipeline PIPELINE0 port out 1 link LINK1 txq 0 bsz 32 -pipeline PIPELINE0 port out 2 link LINK2 txq 0 bsz 32 -pipeline PIPELINE0 port out 3 link LINK3 txq 0 bsz 32 +; Note: Customize the parameters below to match your setup. +; +mempool MEMPOOL0 buffer 2304 pool 32K cache 256 cpu 0 +ethdev 0000:18:00.0 rxq 1 128 MEMPOOL0 txq 1 512 promiscuous on +ethdev 0000:18:00.1 rxq 1 128 MEMPOOL0 txq 1 512 promiscuous on +ethdev 0000:3b:00.0 rxq 1 128 MEMPOOL0 txq 1 512 promiscuous on +ethdev 0000:3b:00.1 rxq 1 128 MEMPOOL0 txq 1 512 promiscuous on -pipeline PIPELINE0 build ./examples/pipeline/examples/recirculation.spec +; +; List of pipelines. +; +pipeline PIPELINE0 build lib /tmp/recirculation.so io ./examples/pipeline/examples/ethdev.io numa 0 ; ; Pipelines-to-threads mapping. diff --git a/examples/pipeline/examples/registers.cli b/examples/pipeline/examples/registers.cli index 8d026294cb..3516f76a5b 100644 --- a/examples/pipeline/examples/registers.cli +++ b/examples/pipeline/examples/registers.cli @@ -1,28 +1,35 @@ ; SPDX-License-Identifier: BSD-3-Clause ; Copyright(c) 2020 Intel Corporation -; Example command line: -; ./build/examples/dpdk-pipeline -l0-1 -- -s ./examples/pipeline/examples/registers.cli - +# Example command line: +# ./build/examples/dpdk-pipeline -l0-1 -- -s ./examples/pipeline/examples/registers.cli +# +# Once the application has started, the command to get the CLI prompt is: +# telnet 0.0.0.0 8086 + +; +; Pipeline code generation & shared object library build. +; +pipeline codegen ./examples/pipeline/examples/registers.spec /tmp/registers.c +pipeline libbuild /tmp/registers.c /tmp/registers.so + +; +; List of DPDK devices. +; +; Note: Customize the parameters below to match your setup. +; mempool MEMPOOL0 buffer 2304 pool 32K cache 256 cpu 0 - -link LINK0 dev 0000:18:00.0 rxq 1 128 MEMPOOL0 txq 1 512 promiscuous on -link LINK1 dev 0000:18:00.1 rxq 1 128 MEMPOOL0 txq 1 512 promiscuous on -link LINK2 dev 0000:3b:00.0 rxq 1 128 MEMPOOL0 txq 1 512 promiscuous on -link LINK3 dev 0000:3b:00.1 rxq 1 128 MEMPOOL0 txq 1 512 promiscuous on - -pipeline PIPELINE0 create 0 - -pipeline PIPELINE0 port in 0 link LINK0 rxq 0 bsz 32 -pipeline PIPELINE0 port in 1 link LINK1 rxq 0 bsz 32 -pipeline PIPELINE0 port in 2 link LINK2 rxq 0 bsz 32 -pipeline PIPELINE0 port in 3 link LINK3 rxq 0 bsz 32 - -pipeline PIPELINE0 port out 0 link LINK0 txq 0 bsz 32 -pipeline PIPELINE0 port out 1 link LINK1 txq 0 bsz 32 -pipeline PIPELINE0 port out 2 link LINK2 txq 0 bsz 32 -pipeline PIPELINE0 port out 3 link LINK3 txq 0 bsz 32 - -pipeline PIPELINE0 build ./examples/pipeline/examples/registers.spec - +ethdev 0000:18:00.0 rxq 1 128 MEMPOOL0 txq 1 512 promiscuous on +ethdev 0000:18:00.1 rxq 1 128 MEMPOOL0 txq 1 512 promiscuous on +ethdev 0000:3b:00.0 rxq 1 128 MEMPOOL0 txq 1 512 promiscuous on +ethdev 0000:3b:00.1 rxq 1 128 MEMPOOL0 txq 1 512 promiscuous on + +; +; List of pipelines. +; +pipeline PIPELINE0 build lib /tmp/registers.so io ./examples/pipeline/examples/ethdev.io numa 0 + +; +; Pipelines-to-threads mapping. +; thread 1 pipeline PIPELINE0 enable diff --git a/examples/pipeline/examples/selector.cli b/examples/pipeline/examples/selector.cli index 123782c57b..f0e251b657 100644 --- a/examples/pipeline/examples/selector.cli +++ b/examples/pipeline/examples/selector.cli @@ -1,30 +1,45 @@ ; SPDX-License-Identifier: BSD-3-Clause ; Copyright(c) 2020 Intel Corporation +# Example command line: +# ./build/examples/dpdk-pipeline -l0-1 -- -s ./examples/pipeline/examples/selector.cli +# +# Once the application has started, the command to get the CLI prompt is: +# telnet 0.0.0.0 8086 + +; +; Pipeline code generation & shared object library build. +; +pipeline codegen ./examples/pipeline/examples/selector.spec /tmp/selector.c +pipeline libbuild /tmp/selector.c /tmp/selector.so + +; +; List of DPDK devices. +; +; Note: Customize the parameters below to match your setup. +; mempool MEMPOOL0 buffer 2304 pool 32K cache 256 cpu 0 - -link LINK0 dev 0000:18:00.0 rxq 1 128 MEMPOOL0 txq 1 512 promiscuous on -link LINK1 dev 0000:18:00.1 rxq 1 128 MEMPOOL0 txq 1 512 promiscuous on -link LINK2 dev 0000:3b:00.0 rxq 1 128 MEMPOOL0 txq 1 512 promiscuous on -link LINK3 dev 0000:3b:00.1 rxq 1 128 MEMPOOL0 txq 1 512 promiscuous on - -pipeline PIPELINE0 create 0 - -pipeline PIPELINE0 port in 0 link LINK0 rxq 0 bsz 32 -pipeline PIPELINE0 port in 1 link LINK1 rxq 0 bsz 32 -pipeline PIPELINE0 port in 2 link LINK2 rxq 0 bsz 32 -pipeline PIPELINE0 port in 3 link LINK3 rxq 0 bsz 32 - -pipeline PIPELINE0 port out 0 link LINK0 txq 0 bsz 32 -pipeline PIPELINE0 port out 1 link LINK1 txq 0 bsz 32 -pipeline PIPELINE0 port out 2 link LINK2 txq 0 bsz 32 -pipeline PIPELINE0 port out 3 link LINK3 txq 0 bsz 32 - -pipeline PIPELINE0 build ./examples/pipeline/examples/selector.spec - +ethdev 0000:18:00.0 rxq 1 128 MEMPOOL0 txq 1 512 promiscuous on +ethdev 0000:18:00.1 rxq 1 128 MEMPOOL0 txq 1 512 promiscuous on +ethdev 0000:3b:00.0 rxq 1 128 MEMPOOL0 txq 1 512 promiscuous on +ethdev 0000:3b:00.1 rxq 1 128 MEMPOOL0 txq 1 512 promiscuous on + +; +; List of pipelines. +; +pipeline PIPELINE0 build lib /tmp/selector.so io ./examples/pipeline/examples/ethdev.io numa 0 + +; +; Initial set of table entries. +; +; The table entries can later be updated at run-time through the CLI commands. +; pipeline PIPELINE0 selector s group add pipeline PIPELINE0 selector s group member add ./examples/pipeline/examples/selector.txt pipeline PIPELINE0 commit pipeline PIPELINE0 selector s show +; +; Pipelines-to-threads mapping. +; thread 1 pipeline PIPELINE0 enable diff --git a/examples/pipeline/examples/varbit.cli b/examples/pipeline/examples/varbit.cli index 9caeb9ca26..0f89990471 100644 --- a/examples/pipeline/examples/varbit.cli +++ b/examples/pipeline/examples/varbit.cli @@ -1,32 +1,33 @@ ; SPDX-License-Identifier: BSD-3-Clause ; Copyright(c) 2020 Intel Corporation +# Example command line: +# ./build/examples/dpdk-pipeline -l0-1 -- -s ./examples/pipeline/examples/varbit.cli +# +# Once the application has started, the command to get the CLI prompt is: +# telnet 0.0.0.0 8086 + ; -; Customize the LINK parameters to match your setup. +; Pipeline code generation & shared object library build. ; -mempool MEMPOOL0 buffer 2304 pool 32K cache 256 cpu 0 - -link LINK0 dev 0000:18:00.0 rxq 1 128 MEMPOOL0 txq 1 512 promiscuous on -link LINK1 dev 0000:18:00.1 rxq 1 128 MEMPOOL0 txq 1 512 promiscuous on -link LINK2 dev 0000:3b:00.0 rxq 1 128 MEMPOOL0 txq 1 512 promiscuous on -link LINK3 dev 0000:3b:00.1 rxq 1 128 MEMPOOL0 txq 1 512 promiscuous on +pipeline codegen ./examples/pipeline/examples/varbit.spec /tmp/varbit.c +pipeline libbuild /tmp/varbit.c /tmp/varbit.so ; -; PIPELINE0 setup. +; List of DPDK devices. ; -pipeline PIPELINE0 create 0 - -pipeline PIPELINE0 port in 0 link LINK0 rxq 0 bsz 32 -pipeline PIPELINE0 port in 1 link LINK1 rxq 0 bsz 32 -pipeline PIPELINE0 port in 2 link LINK2 rxq 0 bsz 32 -pipeline PIPELINE0 port in 3 link LINK3 rxq 0 bsz 32 - -pipeline PIPELINE0 port out 0 link LINK0 txq 0 bsz 32 -pipeline PIPELINE0 port out 1 link LINK1 txq 0 bsz 32 -pipeline PIPELINE0 port out 2 link LINK2 txq 0 bsz 32 -pipeline PIPELINE0 port out 3 link LINK3 txq 0 bsz 32 +; Note: Customize the parameters below to match your setup. +; +mempool MEMPOOL0 buffer 2304 pool 32K cache 256 cpu 0 +ethdev 0000:18:00.0 rxq 1 128 MEMPOOL0 txq 1 512 promiscuous on +ethdev 0000:18:00.1 rxq 1 128 MEMPOOL0 txq 1 512 promiscuous on +ethdev 0000:3b:00.0 rxq 1 128 MEMPOOL0 txq 1 512 promiscuous on +ethdev 0000:3b:00.1 rxq 1 128 MEMPOOL0 txq 1 512 promiscuous on -pipeline PIPELINE0 build ./examples/pipeline/examples/varbit.spec +; +; List of pipelines. +; +pipeline PIPELINE0 build lib /tmp/varbit.so io ./examples/pipeline/examples/ethdev.io numa 0 ; ; Pipelines-to-threads mapping. diff --git a/examples/pipeline/examples/vxlan.cli b/examples/pipeline/examples/vxlan.cli index 444f3f7bd8..1fbd1be6e4 100644 --- a/examples/pipeline/examples/vxlan.cli +++ b/examples/pipeline/examples/vxlan.cli @@ -1,27 +1,43 @@ ; SPDX-License-Identifier: BSD-3-Clause ; Copyright(c) 2020 Intel Corporation -mempool MEMPOOL0 buffer 2304 pool 32K cache 256 cpu 0 - -link LINK0 dev 0000:18:00.0 rxq 1 128 MEMPOOL0 txq 1 512 promiscuous on -link LINK1 dev 0000:18:00.1 rxq 1 128 MEMPOOL0 txq 1 512 promiscuous on -link LINK2 dev 0000:3b:00.0 rxq 1 128 MEMPOOL0 txq 1 512 promiscuous on -link LINK3 dev 0000:3b:00.1 rxq 1 128 MEMPOOL0 txq 1 512 promiscuous on +# Example command line: +# ./build/examples/dpdk-pipeline -l0-1 -- -s ./examples/pipeline/examples/vxlan.cli +# +# Once the application has started, the command to get the CLI prompt is: +# telnet 0.0.0.0 8086 -pipeline PIPELINE0 create 0 +; +; Pipeline code generation & shared object library build. +; +pipeline codegen ./examples/pipeline/examples/vxlan.spec /tmp/vxlan.c +pipeline libbuild /tmp/vxlan.c /tmp/vxlan.so -pipeline PIPELINE0 port in 0 link LINK0 rxq 0 bsz 32 -pipeline PIPELINE0 port in 1 link LINK1 rxq 0 bsz 32 -pipeline PIPELINE0 port in 2 link LINK2 rxq 0 bsz 32 -pipeline PIPELINE0 port in 3 link LINK3 rxq 0 bsz 32 +; +; List of DPDK devices. +; +; Note: Customize the parameters below to match your setup. +; +mempool MEMPOOL0 buffer 2304 pool 32K cache 256 cpu 0 +ethdev 0000:18:00.0 rxq 1 128 MEMPOOL0 txq 1 512 promiscuous on +ethdev 0000:18:00.1 rxq 1 128 MEMPOOL0 txq 1 512 promiscuous on +ethdev 0000:3b:00.0 rxq 1 128 MEMPOOL0 txq 1 512 promiscuous on +ethdev 0000:3b:00.1 rxq 1 128 MEMPOOL0 txq 1 512 promiscuous on -pipeline PIPELINE0 port out 0 link LINK0 txq 0 bsz 32 -pipeline PIPELINE0 port out 1 link LINK1 txq 0 bsz 32 -pipeline PIPELINE0 port out 2 link LINK2 txq 0 bsz 32 -pipeline PIPELINE0 port out 3 link LINK3 txq 0 bsz 32 +; +; List of pipelines. +; +pipeline PIPELINE0 build lib /tmp/vxlan.so io ./examples/pipeline/examples/ethdev.io numa 0 -pipeline PIPELINE0 build ./examples/pipeline/examples/vxlan.spec +; +; Initial set of table entries. +; +; The table entries can later be updated at run-time through the CLI commands. +; pipeline PIPELINE0 table vxlan_table add ./examples/pipeline/examples/vxlan_table.txt pipeline PIPELINE0 commit +; +; Pipelines-to-threads mapping. +; thread 1 pipeline PIPELINE0 enable diff --git a/examples/pipeline/examples/vxlan_pcap.cli b/examples/pipeline/examples/vxlan_pcap.cli index 83fca8d0d9..adc7f73312 100644 --- a/examples/pipeline/examples/vxlan_pcap.cli +++ b/examples/pipeline/examples/vxlan_pcap.cli @@ -1,22 +1,39 @@ ; SPDX-License-Identifier: BSD-3-Clause ; Copyright(c) 2020 Intel Corporation -mempool MEMPOOL0 buffer 2304 pool 32K cache 256 cpu 0 +# Example command line: +# ./build/examples/dpdk-pipeline -l0-1 -- -s ./examples/pipeline/examples/vxlan_pcap.cli +# +# Once the application has started, the command to get the CLI prompt is: +# telnet 0.0.0.0 8086 -pipeline PIPELINE0 create 0 +; +; Pipeline code generation & shared object library build. +; +pipeline codegen ./examples/pipeline/examples/vxlan.spec /tmp/vxlan.c +pipeline libbuild /tmp/vxlan.c /tmp/vxlan.so -pipeline PIPELINE0 port in 0 source MEMPOOL0 ./examples/pipeline/examples/packet.pcap loop 1 -pipeline PIPELINE0 port in 1 source MEMPOOL0 ./examples/pipeline/examples/packet.pcap loop 1 -pipeline PIPELINE0 port in 2 source MEMPOOL0 ./examples/pipeline/examples/packet.pcap loop 1 -pipeline PIPELINE0 port in 3 source MEMPOOL0 ./examples/pipeline/examples/packet.pcap loop 1 +; +; List of DPDK devices. +; +; Note: Customize the parameters below to match your setup. +; +mempool MEMPOOL0 buffer 2304 pool 32K cache 256 cpu 0 -pipeline PIPELINE0 port out 0 sink none -pipeline PIPELINE0 port out 1 sink none -pipeline PIPELINE0 port out 2 sink none -pipeline PIPELINE0 port out 3 sink none +; +; List of pipelines. +; +pipeline PIPELINE0 build lib /tmp/vxlan.so io ./examples/pipeline/examples/pcap.io numa 0 -pipeline PIPELINE0 build ./examples/pipeline/examples/vxlan.spec +; +; Initial set of table entries. +; +; The table entries can later be updated at run-time through the CLI commands. +; pipeline PIPELINE0 table vxlan_table add ./examples/pipeline/examples/vxlan_table.txt pipeline PIPELINE0 commit +; +; Pipelines-to-threads mapping. +; thread 1 pipeline PIPELINE0 enable -- 2.34.1