From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 8CB3DA0525 for ; Tue, 18 Feb 2020 07:37:36 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 851E6288C; Tue, 18 Feb 2020 07:37:36 +0100 (CET) Received: from dish-sg.nttdocomo.co.jp (dish-sg.nttdocomo.co.jp [202.19.227.74]) by dpdk.org (Postfix) with ESMTP id 93C481DA1C for ; Tue, 18 Feb 2020 07:37:34 +0100 (CET) X-dD-Source: Outbound Received: from zssg-mailmd102.ddreams.local (zssg-mailmd900.ddreams.local [10.160.172.63]) by zssg-mailou104.ddreams.local (Postfix) with ESMTP id D8E9F120101; Tue, 18 Feb 2020 15:37:33 +0900 (JST) Received: from zssg-mailmf104.ddreams.local (zssg-mailmf900.ddreams.local [10.160.172.84]) by zssg-mailmd102.ddreams.local (dDREAMS) with ESMTP id <0Q5V01413X2LK5B0@dDREAMS>; Tue, 18 Feb 2020 15:37:33 +0900 (JST) Received: from zssg-mailmf104.ddreams.local (unknown [127.0.0.1]) by zssg-mailmf104.ddreams.local (Postfix) with ESMTP id BB7EA7E603D; Tue, 18 Feb 2020 15:37:33 +0900 (JST) Received: from zssg-mailmf104.ddreams.local (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id BA1368E6060; Tue, 18 Feb 2020 15:37:33 +0900 (JST) Received: from localhost (unknown [127.0.0.1]) by IMSVA (Postfix) with SMTP id B96EE8E605E; Tue, 18 Feb 2020 15:37:33 +0900 (JST) X-IMSS-HAND-OFF-DIRECTIVE: localhost:10026 Received: from zssg-mailmf104.ddreams.local (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 4680B8E6050; Tue, 18 Feb 2020 15:37:33 +0900 (JST) Received: from davinci.ntt-tx.co.jp (unknown [10.160.183.139]) by zssg-mailmf104.ddreams.local (Postfix) with ESMTP; Tue, 18 Feb 2020 15:37:33 +0900 (JST) From: x-fn-spp-ml@ntt-tx.co.jp To: ferruh.yigit@intel.com, yasufum.o@gmail.com Cc: spp@dpdk.org Date: Tue, 18 Feb 2020 15:37:14 +0900 Message-id: <20200218063720.6597-12-x-fn-spp-ml@ntt-tx.co.jp> X-Mailer: git-send-email 2.18.0 In-reply-to: <20200218063720.6597-1-x-fn-spp-ml@ntt-tx.co.jp> References: <20200218063720.6597-1-x-fn-spp-ml@ntt-tx.co.jp> X-TM-AS-GCONF: 00 Subject: [spp] [PATCH 11/17] bin: add parameter for hardrare offload X-BeenThere: spp@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Soft Patch Panel List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: spp-bounces@dpdk.org Sender: "spp" From: Hideyuki Yamashita This patch adds config for the followings to support hardware offload: - multi-queue setting - whitelist Signed-off-by: Hideyuki Yamashita Signed-off-by: Yasufumi Ogawa --- 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