DPDK patches and discussions
 help / color / mirror / Atom feed
From: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
To: dev@dpdk.org
Cc: Yogesh Jangra <yogesh.jangra@intel.com>
Subject: [PATCH V2 21/21] net/softnic: update the default device program
Date: Fri, 26 Aug 2022 13:17:37 +0000	[thread overview]
Message-ID: <20220826131737.1741743-22-cristian.dumitrescu@intel.com> (raw)
In-Reply-To: <20220826131737.1741743-1-cristian.dumitrescu@intel.com>

Update the default device program.

Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Signed-off-by: Yogesh Jangra <yogesh.jangra@intel.com>
---
 drivers/net/softnic/firmware.cli   | 51 ++++++++++++++++++++----------
 drivers/net/softnic/firmware.spec  | 19 +++++++++++
 drivers/net/softnic/firmware_rx.io | 30 ++++++++++++++++++
 drivers/net/softnic/firmware_tx.io | 30 ++++++++++++++++++
 4 files changed, 114 insertions(+), 16 deletions(-)
 create mode 100644 drivers/net/softnic/firmware.spec
 create mode 100644 drivers/net/softnic/firmware_rx.io
 create mode 100644 drivers/net/softnic/firmware_tx.io

diff --git a/drivers/net/softnic/firmware.cli b/drivers/net/softnic/firmware.cli
index 300cf6e33f..7d2c1aad21 100644
--- a/drivers/net/softnic/firmware.cli
+++ b/drivers/net/softnic/firmware.cli
@@ -1,21 +1,40 @@
 ; SPDX-License-Identifier: BSD-3-Clause
-; Copyright(c) 2018 Intel Corporation
+; Copyright(c) 2022 Intel Corporation
 
-link LINK dev 0000:02:00.0
+# Example command line for the DPDK test-pmd application. Out of the 3 application cores (see the
+# -c <core_mask> argument), core 0 is running the control thread doing configuration and CLI, core 1
+# is running the forwarding thread, and core 2 is setup as service core (see the -s <core_mask>
+# argument) for the purpose of running the Soft NIC device:
+#
+#	./build/app/dpdk-testpmd -c 7 -s 4 --vdev 'net_softnic0,firmware=./drivers/net/softnic/firmware.cli,cpu_id=0,conn_port=8086' -- -i
+#
+# Commands from within the DPDK test-pmd application:
+#
+# 	testpmd> set portlist <softnic_port_id>
+#	testpmd> show config fwd
+#	testpmd> start
+#
+# To setup the CLI prompt to the Soft NIC device, the DPDK test-pmd application needs to be modified
+# to call the rte_pmd_softnic_manage() function. Once the Soft NIC device is started, the command to
+# get the CLI prompt is:
+#
+#	telnet 0.0.0.0 8086
 
-pipeline RX period 10 offset_port_id 0
-pipeline RX port in bsz 32 link LINK rxq 0
-pipeline RX port out bsz 32 swq RXQ0
-pipeline RX table match stub
-pipeline RX port in 0 table 0
-pipeline RX table 0 rule add match default action fwd port 0
+;
+; Pipeline code generation & shared object library build.
+;
+pipeline codegen ./drivers/net/softnic/firmware.spec /tmp/firmware.c
+pipeline libbuild /tmp/firmware.c /tmp/firmware.so
 
-pipeline TX period 10 offset_port_id 0
-pipeline TX port in bsz 32 swq TXQ0
-pipeline TX port out bsz 32 link LINK txq 0
-pipeline TX table match stub
-pipeline TX port in 0 table 0
-pipeline TX table 0 rule add match default action fwd port 0
+;
+; List of pipelines.
+;
+pipeline RX build lib /tmp/firmware.so io ./drivers/net/softnic/firmware_rx.io numa 0
+pipeline TX build lib /tmp/firmware.so io ./drivers/net/softnic/firmware_tx.io numa 0
 
-thread 1 pipeline RX enable
-thread 1 pipeline TX enable
+;
+; Pipelines-to-threads mapping. For the Soft NIC devices, the pipelines can be mapped to any of the
+; application service cores (see the -s <core_mask> argument):
+;
+thread 2 pipeline RX enable
+thread 2 pipeline TX enable
diff --git a/drivers/net/softnic/firmware.spec b/drivers/net/softnic/firmware.spec
new file mode 100644
index 0000000000..106caae735
--- /dev/null
+++ b/drivers/net/softnic/firmware.spec
@@ -0,0 +1,19 @@
+; SPDX-License-Identifier: BSD-3-Clause
+; Copyright(c) 2022 Intel Corporation
+
+//
+// Meta-data.
+//
+struct metadata_t {
+	bit<32> port
+}
+
+metadata instanceof metadata_t
+
+//
+// Pipeline.
+//
+apply {
+	rx m.port
+	tx m.port
+}
diff --git a/drivers/net/softnic/firmware_rx.io b/drivers/net/softnic/firmware_rx.io
new file mode 100644
index 0000000000..9baa4612b1
--- /dev/null
+++ b/drivers/net/softnic/firmware_rx.io
@@ -0,0 +1,30 @@
+; SPDX-License-Identifier: BSD-3-Clause
+; Copyright(c) 2022 Intel Corporation
+
+;
+; Pipeline input ports.
+;
+; Syntax:
+;
+;    port in <port_id> ethdev <ethdev_name> rxq <queue_id> bsz <burst_size>
+;    port in <port_id> ring <ring_name> bsz <burst_size>
+;    port in <port_id> source mempool <mempool_name> file <file_name> loop <n_loops> packets <n_pkts_max>
+;    port in <port_id> fd <file_descriptor> mtu <mtu> mempool <mempool_name> bsz <burst_size>
+;
+; Note: Customize the parameters below to match your setup.
+;
+port in 0 ethdev 0000:18:00.0 rxq 0 bsz 32
+
+;
+; Pipeline output ports.
+;
+; Syntax:
+;
+;    port out <port_id> ethdev <ethdev_name> txq <queue_id> bsz <burst_size>
+;    port out <port_id> ring <ring_name> bsz <burst_size>
+;    port out <port_id> sink file <file_name> | none
+;    port out <port_id> fd <file_descriptor> bsz <burst_size>
+;
+; Note: Customize the parameters below to match your setup.
+;
+port out 0 ring RXQ0 bsz 32
diff --git a/drivers/net/softnic/firmware_tx.io b/drivers/net/softnic/firmware_tx.io
new file mode 100644
index 0000000000..4c4608b105
--- /dev/null
+++ b/drivers/net/softnic/firmware_tx.io
@@ -0,0 +1,30 @@
+; SPDX-License-Identifier: BSD-3-Clause
+; Copyright(c) 2022 Intel Corporation
+
+;
+; Pipeline input ports.
+;
+; Syntax:
+;
+;    port in <port_id> ethdev <ethdev_name> rxq <queue_id> bsz <burst_size>
+;    port in <port_id> ring <ring_name> bsz <burst_size>
+;    port in <port_id> source mempool <mempool_name> file <file_name> loop <n_loops> packets <n_pkts_max>
+;    port in <port_id> fd <file_descriptor> mtu <mtu> mempool <mempool_name> bsz <burst_size>
+;
+; Note: Customize the parameters below to match your setup.
+;
+port in 0 ring TXQ0 bsz 32
+
+;
+; Pipeline output ports.
+;
+; Syntax:
+;
+;    port out <port_id> ethdev <ethdev_name> txq <queue_id> bsz <burst_size>
+;    port out <port_id> ring <ring_name> bsz <burst_size>
+;    port out <port_id> sink file <file_name> | none
+;    port out <port_id> fd <file_descriptor> bsz <burst_size>
+;
+; Note: Customize the parameters below to match your setup.
+;
+port out 0 ethdev 0000:18:00.0 txq 0 bsz 32
-- 
2.34.1


  parent reply	other threads:[~2022-08-26 13:20 UTC|newest]

Thread overview: 69+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-04 16:58 [PATCH 00/21] net/softnic: replace the legacy pipeline with SWX pipeline Cristian Dumitrescu
2022-08-04 16:58 ` [PATCH 01/21] net/softnic: remove the traffic manager support Cristian Dumitrescu
2022-08-04 16:58 ` [PATCH 02/21] net/softnic: remove flow support Cristian Dumitrescu
2022-08-04 16:58 ` [PATCH 03/21] net/softnic: remove the meter support Cristian Dumitrescu
2022-08-04 16:58 ` [PATCH 04/21] net/softnic: remove cryptodev support Cristian Dumitrescu
2022-08-04 16:58 ` [PATCH 05/21] net/softnic: remove tap support Cristian Dumitrescu
2022-08-04 16:58 ` [PATCH 06/21] net/softnic: remove the legacy pipeline CLI commands Cristian Dumitrescu
2022-08-04 16:58 ` [PATCH 07/21] net/softnic: replace the legacy pipeline with the SWX pipeline Cristian Dumitrescu
2022-08-04 16:58 ` [PATCH 08/21] net/softnic: remove the list of Ethernet devices Cristian Dumitrescu
2022-08-04 16:58 ` [PATCH 09/21] net/softnic: remove unused text parsing functions Cristian Dumitrescu
2022-08-04 16:58 ` [PATCH 10/21] net/softnic: add pipeline code generation CLI command Cristian Dumitrescu
2022-08-04 16:58 ` [PATCH 11/21] net/softnic: add pipeline library build " Cristian Dumitrescu
2022-08-04 16:58 ` [PATCH 12/21] net/softnic: add pipeline " Cristian Dumitrescu
2022-08-04 16:58 ` [PATCH 13/21] net/softnic: add pipeline table CLI commands Cristian Dumitrescu
2022-08-04 16:58 ` [PATCH 14/21] net/softnic: add pipeline selector " Cristian Dumitrescu
2022-08-04 16:58 ` [PATCH 15/21] net/softnic: add pipeline learner " Cristian Dumitrescu
2022-08-04 16:58 ` [PATCH 16/21] net/softnic: add pipeline commit and abort " Cristian Dumitrescu
2022-08-04 16:58 ` [PATCH 17/21] net/softnic: add the pipeline register read/write " Cristian Dumitrescu
2022-08-04 16:58 ` [PATCH 18/21] net/softnic: add the pipeline meter " Cristian Dumitrescu
2022-08-04 16:58 ` [PATCH 19/21] net/softnic: add pipeline statistics CLI command Cristian Dumitrescu
2022-08-04 16:58 ` [PATCH 20/21] net/softnic: add pipeline mirroring " Cristian Dumitrescu
2022-08-04 16:58 ` [PATCH 21/21] net/softnic: update the default device program Cristian Dumitrescu
2022-08-26 13:17 ` [PATCH V2 00/21] net/softnic: replace the legacy pipeline with SWX pipeline Cristian Dumitrescu
2022-08-26 13:17   ` [PATCH V2 01/21] net/softnic: remove the traffic manager support Cristian Dumitrescu
2022-08-26 13:17   ` [PATCH V2 02/21] net/softnic: remove flow support Cristian Dumitrescu
2022-08-26 13:17   ` [PATCH V2 03/21] net/softnic: remove the meter support Cristian Dumitrescu
2022-08-26 13:17   ` [PATCH V2 04/21] net/softnic: remove cryptodev support Cristian Dumitrescu
2022-08-26 13:17   ` [PATCH V2 05/21] net/softnic: remove tap support Cristian Dumitrescu
2022-08-26 13:17   ` [PATCH V2 06/21] net/softnic: remove the legacy pipeline CLI commands Cristian Dumitrescu
2022-08-26 13:17   ` [PATCH V2 07/21] net/softnic: replace the legacy pipeline with the SWX pipeline Cristian Dumitrescu
2022-08-26 13:17   ` [PATCH V2 08/21] net/softnic: remove the list of Ethernet devices Cristian Dumitrescu
2022-08-26 13:17   ` [PATCH V2 09/21] net/softnic: remove unused text parsing functions Cristian Dumitrescu
2022-08-26 13:17   ` [PATCH V2 10/21] net/softnic: add pipeline code generation CLI command Cristian Dumitrescu
2022-08-26 13:17   ` [PATCH V2 11/21] net/softnic: add pipeline library build " Cristian Dumitrescu
2022-08-26 13:17   ` [PATCH V2 12/21] net/softnic: add pipeline " Cristian Dumitrescu
2022-08-26 13:17   ` [PATCH V2 13/21] net/softnic: add pipeline table CLI commands Cristian Dumitrescu
2022-08-26 13:17   ` [PATCH V2 14/21] net/softnic: add pipeline selector " Cristian Dumitrescu
2022-08-26 13:17   ` [PATCH V2 15/21] net/softnic: add pipeline learner " Cristian Dumitrescu
2022-08-26 13:17   ` [PATCH V2 16/21] net/softnic: add pipeline commit and abort " Cristian Dumitrescu
2022-08-26 13:17   ` [PATCH V2 17/21] net/softnic: add the pipeline register read/write " Cristian Dumitrescu
2022-08-26 13:17   ` [PATCH V2 18/21] net/softnic: add the pipeline meter " Cristian Dumitrescu
2022-08-26 13:17   ` [PATCH V2 19/21] net/softnic: add pipeline statistics CLI command Cristian Dumitrescu
2022-08-26 13:17   ` [PATCH V2 20/21] net/softnic: add pipeline mirroring " Cristian Dumitrescu
2022-08-26 13:17   ` Cristian Dumitrescu [this message]
2022-09-01 14:20 ` [PATCH V3 00/21] net/softnic: replace the legacy pipeline with SWX pipeline Cristian Dumitrescu
2022-09-01 14:20   ` [PATCH V3 01/21] net/softnic: remove the traffic manager support Cristian Dumitrescu
2022-09-01 14:20   ` [PATCH V3 02/21] net/softnic: remove flow support Cristian Dumitrescu
2022-11-30 11:18     ` Ferruh Yigit
2022-12-01 11:27       ` Dumitrescu, Cristian
2022-09-01 14:20   ` [PATCH V3 03/21] net/softnic: remove the meter support Cristian Dumitrescu
2022-09-01 14:20   ` [PATCH V3 04/21] net/softnic: remove cryptodev support Cristian Dumitrescu
2022-09-01 14:20   ` [PATCH V3 05/21] net/softnic: remove tap support Cristian Dumitrescu
2022-09-01 14:20   ` [PATCH V3 06/21] net/softnic: remove the legacy pipeline CLI commands Cristian Dumitrescu
2022-09-01 14:20   ` [PATCH V3 07/21] net/softnic: replace the legacy pipeline with the SWX pipeline Cristian Dumitrescu
2022-09-01 14:20   ` [PATCH V3 08/21] net/softnic: remove the list of Ethernet devices Cristian Dumitrescu
2022-09-01 14:20   ` [PATCH V3 09/21] net/softnic: remove unused text parsing functions Cristian Dumitrescu
2022-09-01 14:20   ` [PATCH V3 10/21] net/softnic: add pipeline code generation CLI command Cristian Dumitrescu
2022-09-01 14:20   ` [PATCH V3 11/21] net/softnic: add pipeline library build " Cristian Dumitrescu
2022-09-01 14:20   ` [PATCH V3 12/21] net/softnic: add pipeline " Cristian Dumitrescu
2022-09-01 14:20   ` [PATCH V3 13/21] net/softnic: add pipeline table CLI commands Cristian Dumitrescu
2022-09-01 14:20   ` [PATCH V3 14/21] net/softnic: add pipeline selector " Cristian Dumitrescu
2022-09-01 14:20   ` [PATCH V3 15/21] net/softnic: add pipeline learner " Cristian Dumitrescu
2022-09-01 14:20   ` [PATCH V3 16/21] net/softnic: add pipeline commit and abort " Cristian Dumitrescu
2022-09-01 14:20   ` [PATCH V3 17/21] net/softnic: add the pipeline register read/write " Cristian Dumitrescu
2022-09-01 14:20   ` [PATCH V3 18/21] net/softnic: add the pipeline meter " Cristian Dumitrescu
2022-09-01 14:20   ` [PATCH V3 19/21] net/softnic: add pipeline statistics CLI command Cristian Dumitrescu
2022-09-01 14:20   ` [PATCH V3 20/21] net/softnic: add pipeline mirroring " Cristian Dumitrescu
2022-09-01 14:20   ` [PATCH V3 21/21] net/softnic: update the default device program Cristian Dumitrescu
2022-09-21 11:48   ` [PATCH V3 00/21] net/softnic: replace the legacy pipeline with SWX pipeline Thomas Monjalon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220826131737.1741743-22-cristian.dumitrescu@intel.com \
    --to=cristian.dumitrescu@intel.com \
    --cc=dev@dpdk.org \
    --cc=yogesh.jangra@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).