Soft Patch Panel
 help / color / mirror / Atom feed
From: x-fn-spp-ml@ntt-tx.co.jp
To: spp@dpdk.org, ferruh.yigit@intel.com, yasufum.o@gmail.com
Subject: [spp] [PATCH v2 11/17] bin: add parameter for hardrare offload
Date: Wed, 19 Feb 2020 20:49:41 +0900
Message-ID: <20200219114947.14134-12-x-fn-spp-ml@ntt-tx.co.jp> (raw)
In-Reply-To: <20200218063720.6597-1-x-fn-spp-ml@ntt-tx.co.jp>

From: Hideyuki Yamashita <yamashita.hideyuki@ntt-tx.co.jp>

This patch adds config for the following to support hardware offload:
  - multi-queue setting
  - whitelist

Signed-off-by: Hideyuki Yamashita <yamashita.hideyuki@ntt-tx.co.jp>
Signed-off-by: Yasufumi Ogawa <yasufum.o@gmail.com>
---
 bin/sample/config.sh | 15 +++++++++++++++
 bin/spp_pri.sh       | 26 +++++++++++++++++++++++++-
 bin/start.sh         |  2 ++
 3 files changed, 42 insertions(+), 1 deletion(-)

diff --git a/bin/sample/config.sh b/bin/sample/config.sh
index ec4d4b8..214757e 100644
--- a/bin/sample/config.sh
+++ b/bin/sample/config.sh
@@ -29,3 +29,18 @@ PRI_PORTMASK=0x03  # total num of ports of spp_primary.
 # Log files are created in 'spp/log/'.
 SPP_CTL_LOG=spp_ctl.log
 PRI_LOG=spp_primary.log
+
+# number of ports for multi-queue setting.
+#PRI_PORT_QUEUE=(
+#    "0 rxq 16 txq 16"
+#)
+
+# Add a PCI device in white list.
+# `dv_flow_en=1` is required for HW offload with Mellanox NIC.
+# Set a nonzero value to enables the DV flow steering assuming it is
+# supported by the driver.
+# https://doc.dpdk.org/guides/nics/mlx5.html
+#PRI_WHITE_LIST=(
+#    "0000:04:00.0,dv_flow_en=1"
+#    "0000:05:00.0"
+#)
diff --git a/bin/spp_pri.sh b/bin/spp_pri.sh
index c0b0e1e..6238ee1 100644
--- a/bin/spp_pri.sh
+++ b/bin/spp_pri.sh
@@ -9,6 +9,8 @@ SPP_PRI_RING=""
 SPP_PRI_TAP=""
 SPP_PRI_MEMIF=""
 SPP_PRI_VDEVS=""
+SPP_PRI_PORT_QUEUE=""
+SPP_PRI_WHITE_LIST=""
 
 SOCK_VHOST="/tmp/sock"
 SOCK_MEMIF="/tmp/spp-memif.sock"
@@ -64,6 +66,26 @@ function setup_vdevs() {
     fi
 }
 
+# Add queue number to port
+function setup_queue_number() {
+    if [ ${#PRI_PORT_QUEUE[@]} ]; then
+        for (( i=0; i < ${#PRI_PORT_QUEUE[@]}; i++)); do
+            SPP_PRI_PORT_QUEUE="
+                ${SPP_PRI_PORT_QUEUE} --port-num ${PRI_PORT_QUEUE[${i}]}"
+        done
+    fi
+}
+
+# Add whitelist
+function setup_whitelist() {
+    if [ ${#PRI_WHITE_LIST[@]} ]; then
+        for (( i=0; i < ${#PRI_WHITE_LIST[@]}; i++)); do
+            SPP_PRI_WHITE_LIST="
+                ${SPP_PRI_WHITE_LIST} -w ${PRI_WHITE_LIST[${i}]}"
+        done
+    fi
+}
+
 # Launch spp_primary.
 function spp_pri() {
     SPP_PRI_BIN=${SPP_DIR}/src/primary/${RTE_TARGET}/spp_primary
@@ -86,10 +108,12 @@ function spp_pri() {
         ${SPP_PRI_TAP} \
         ${SPP_PRI_MEMIF} \
         ${SPP_PRI_VDEVS} \
+        ${SPP_PRI_WHITE_LIST} \
         -- \
         -p ${PRI_PORTMASK} \
         -n ${NUM_RINGS} \
-        -s ${SPP_CTL_IP}:5555"
+        -s ${SPP_CTL_IP}:5555 \
+        ${SPP_PRI_PORT_QUEUE}"
 
     if [ ${DRY_RUN} ]; then
         echo ${cmd}
diff --git a/bin/start.sh b/bin/start.sh
index eecb2ed..28dc3d9 100755
--- a/bin/start.sh
+++ b/bin/start.sh
@@ -45,6 +45,8 @@ function start_spp_pri() {
     setup_tap_vdevs  # setup vdevs of net_tap
     setup_memif_vdevs  # setup vdevs of net_memif
     setup_vdevs  # setup any of vdevs
+    setup_queue_number  # setup port number
+    setup_whitelist  # setup whitelist
     spp_pri  # launch spp_primary
 }
 
-- 
2.17.1


  parent reply	other threads:[~2020-02-19 11:50 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-18  6:37 [spp] [PATCH 00/17] Adding Hardware offload capability x-fn-spp-ml
2020-02-18  6:37 ` [spp] [PATCH 01/17] shared: add support of multi-queue x-fn-spp-ml
2020-02-18  6:37 ` [spp] [PATCH 02/17] spp_vf: " x-fn-spp-ml
2020-02-18  6:37 ` [spp] [PATCH 03/17] spp_mirror: " x-fn-spp-ml
2020-02-18  6:37 ` [spp] [PATCH 04/17] spp_pcap: " x-fn-spp-ml
2020-02-18  6:37 ` [spp] [PATCH 05/17] spp_primary: " x-fn-spp-ml
2020-02-18  6:37 ` [spp] [PATCH 06/17] spp_primary: add support of rte_flow x-fn-spp-ml
2020-02-19  2:24   ` Yasufumi Ogawa
2020-02-19 11:57     ` [spp] (x-fn-spp-ml 118) " Hideyuki Yamashita
2020-02-18  6:37 ` [spp] [PATCH 07/17] spp_primary: add common function " x-fn-spp-ml
2020-02-18  6:37 ` [spp] [PATCH 08/17] spp_primary: add attribute " x-fn-spp-ml
2020-02-18  6:37 ` [spp] [PATCH 09/17] spp_primary: add patterns " x-fn-spp-ml
2020-02-18  6:37 ` [spp] [PATCH 10/17] spp_primary: add actions " x-fn-spp-ml
2020-02-18  6:37 ` [spp] [PATCH 11/17] bin: add parameter for hardrare offload x-fn-spp-ml
2020-02-18  6:37 ` [spp] [PATCH 12/17] cli: add support of hardware offload x-fn-spp-ml
2020-02-18  6:37 ` [spp] [PATCH 13/17] cli: add support of rte_flow in vf x-fn-spp-ml
2020-02-18  6:37 ` [spp] [PATCH 14/17] cli: add support of rte_flow in mirror x-fn-spp-ml
2020-02-18  6:37 ` [spp] [PATCH 15/17] cli: add support of rte_flow in nfv x-fn-spp-ml
2020-02-18  6:37 ` [spp] [PATCH 16/17] spp-ctl: add APIs for flow rules x-fn-spp-ml
2020-02-18  6:37 ` [spp] [PATCH 17/17] spp_nfv: add support of multi-queue x-fn-spp-ml
2020-02-19 11:49 ` [spp] [PATCH v2 00/17] Adding Hardware offload capability x-fn-spp-ml
2020-02-21  8:17   ` Yasufumi Ogawa
2020-02-25  5:49     ` [spp] (x-fn-spp-ml 177) " Hideyuki Yamashita
2020-02-19 11:49 ` [spp] [PATCH v2 01/17] shared: add support of multi-queue x-fn-spp-ml
2020-02-19 11:49 ` [spp] [PATCH v2 02/17] spp_vf: " x-fn-spp-ml
2020-02-19 11:49 ` [spp] [PATCH v2 03/17] spp_mirror: " x-fn-spp-ml
2020-02-19 11:49 ` [spp] [PATCH v2 04/17] spp_pcap: " x-fn-spp-ml
2020-02-19 11:49 ` [spp] [PATCH v2 05/17] spp_primary: " x-fn-spp-ml
2020-02-19 11:49 ` [spp] [PATCH v2 06/17] spp_primary: add support of rte_flow x-fn-spp-ml
2020-02-19 11:49 ` [spp] [PATCH v2 07/17] spp_primary: add common function " x-fn-spp-ml
2020-02-19 11:49 ` [spp] [PATCH v2 08/17] spp_primary: add attribute " x-fn-spp-ml
2020-02-19 11:49 ` [spp] [PATCH v2 09/17] spp_primary: add patterns " x-fn-spp-ml
2020-02-19 11:49 ` [spp] [PATCH v2 10/17] spp_primary: add actions " x-fn-spp-ml
2020-02-19 11:49 ` x-fn-spp-ml [this message]
2020-02-19 11:49 ` [spp] [PATCH v2 12/17] cli: add support of hardware offload x-fn-spp-ml
2020-02-19 11:49 ` [spp] [PATCH v2 13/17] cli: add support of rte_flow in vf x-fn-spp-ml
2020-02-19 11:49 ` [spp] [PATCH v2 14/17] cli: add support of rte_flow in mirror x-fn-spp-ml
2020-02-19 11:49 ` [spp] [PATCH v2 15/17] cli: add support of rte_flow in nfv x-fn-spp-ml
2020-02-19 11:49 ` [spp] [PATCH v2 16/17] spp-ctl: add APIs for flow rules x-fn-spp-ml
2020-02-19 11:49 ` [spp] [PATCH v2 17/17] spp_nfv: add support of multi-queue x-fn-spp-ml

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=20200219114947.14134-12-x-fn-spp-ml@ntt-tx.co.jp \
    --to=x-fn-spp-ml@ntt-tx.co.jp \
    --cc=ferruh.yigit@intel.com \
    --cc=spp@dpdk.org \
    --cc=yasufum.o@gmail.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

Soft Patch Panel

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://inbox.dpdk.org/spp/0 spp/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 spp spp/ https://inbox.dpdk.org/spp \
		spp@dpdk.org
	public-inbox-index spp

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.spp


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git