net/softnic: update default device program
Update the default device program. Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com> Signed-off-by: Yogesh Jangra <yogesh.jangra@intel.com>
This commit is contained in:
parent
de0a728a17
commit
e415acd861
@ -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
|
||||
|
19
drivers/net/softnic/firmware.spec
Normal file
19
drivers/net/softnic/firmware.spec
Normal file
@ -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
|
||||
}
|
30
drivers/net/softnic/firmware_rx.io
Normal file
30
drivers/net/softnic/firmware_rx.io
Normal file
@ -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
|
30
drivers/net/softnic/firmware_tx.io
Normal file
30
drivers/net/softnic/firmware_tx.io
Normal file
@ -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
|
Loading…
Reference in New Issue
Block a user