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 1196DA04F7 for ; Fri, 20 Dec 2019 08:41:17 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 098F5330; Fri, 20 Dec 2019 08:41:17 +0100 (CET) Received: from mail-pg1-f194.google.com (mail-pg1-f194.google.com [209.85.215.194]) by dpdk.org (Postfix) with ESMTP id B53D42C52 for ; Fri, 20 Dec 2019 08:41:14 +0100 (CET) Received: by mail-pg1-f194.google.com with SMTP id k3so4526574pgc.3 for ; Thu, 19 Dec 2019 23:41:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:in-reply-to:references; bh=NOiaxNSSEIagfkdv2Rx8Fg1pc7Jzvd2Ig4oDCBx2GAI=; b=vNUmM/MReMj0eA+tL+whuRU/4pph6TG4HXtOipijRh5sF6ju4sbfEUS5WwqOA3kz20 3fwnaUWS48sGPPrr35bE7DQjSbQ5dO/OwwRuw1bTQtxIN2RfKwUpYe4JhMOwbelKJ9i1 NuVZPm81KWWXp8Z+lU9xK8NIjkiPDcMane1DlEnQcLuyVHDd57UTJhVx4Rv304w+tLE/ mianxgbUN1Nd5CAun55qW0XqKRIeO3o4ALCQMsZ0gVjdGRVN0/gasemfPbJeHzr6VBNs MzrIaol5nOzLPFxAFIwy5kH3yFYxqCdEiHycH5uHGZbGo0P6CRy459/Edwp7D0gObudJ EGPA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references; bh=NOiaxNSSEIagfkdv2Rx8Fg1pc7Jzvd2Ig4oDCBx2GAI=; b=nRv268mf8sdVwzahs9+pjbuJj268hDNt8Mv/XvKXneK+IHq7diBEVHPPG/UaCSo3W5 xraoutyPlzl+90pj9gSiZ4fGBW2hRP/NAwQXhSvYqSCkQo2Ncr/pdMh7NRRR8GVc1Dfs NWh+zGs4IuQYqmMhAeev8Q9A8aiP85EUU26UBM/e2CDn5ZYuio6Vf0kQlP33/l1sdcy6 EfJjO26NnEl8HqUa3UgCtpTGjfSJ+harIi6F/AWmD0yoa5s/7+yqSOByjn/BmsayPfmj mm+sbMbYZBhI2CrIt060fIW9mC5DjxXzllEa1UYtwHgsRBdHfOTbTP/6EGUQB5IokPPa ACMA== X-Gm-Message-State: APjAAAUh9VOTqrUItbiSJtRtDCivNfKeM6SJOV37ROm/W/jGu6tn6wkn YvdkpTDBLYLFuNO7BLUWlaiDGaqS X-Google-Smtp-Source: APXvYqxKsJnv4Ei5hM4f3JAKbDtyqA53aqdxFtgoqJebLh65dbyHv+X26Vfg6ofxaKf4G1kv5nF9Gg== X-Received: by 2002:aa7:8181:: with SMTP id g1mr14591257pfi.215.1576827673933; Thu, 19 Dec 2019 23:41:13 -0800 (PST) Received: from localhost.localdomain ([192.47.164.146]) by smtp.gmail.com with ESMTPSA id i3sm9641378pfo.72.2019.12.19.23.41.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Dec 2019 23:41:13 -0800 (PST) From: yasufum.o@gmail.com To: spp@dpdk.org, ferruh.yigit@intel.com, yasufum.o@gmail.com Date: Fri, 20 Dec 2019 16:41:00 +0900 Message-Id: <20191220074103.14065-4-yasufum.o@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191220074103.14065-1-yasufum.o@gmail.com> References: <20191220074103.14065-1-yasufum.o@gmail.com> Subject: [spp] [PATCH 3/6] bin: add SPP_FILE_PREFIX env variable 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: Yasufumi Ogawa Add environmental variable SPP_FILE_PREFIX in startup scripts for launching all of SPP processes with the same file prefix. Signed-off-by: Yasufumi Ogawa --- bin/sample/config.sh | 4 +++- bin/spp_pri.sh | 7 ++++++- bin/start.sh | 6 ++++-- 3 files changed, 13 insertions(+), 4 deletions(-) diff --git a/bin/sample/config.sh b/bin/sample/config.sh index 6dfd89d..e797956 100644 --- a/bin/sample/config.sh +++ b/bin/sample/config.sh @@ -1,7 +1,9 @@ # SPDX-License-Identifier: BSD-3-Clause # Copyright(c) 2019 Nippon Telegraph and Telephone Corporation -SPP_HOST_IP=127.0.0.1 +SPP_CTL_IP=127.0.0.1 +SPP_FILE_PREFIX=spp # used for --file-prefix option + SPP_HUGEPAGES=/dev/hugepages # spp_primary options diff --git a/bin/spp_pri.sh b/bin/spp_pri.sh index f08a178..5e21572 100644 --- a/bin/spp_pri.sh +++ b/bin/spp_pri.sh @@ -55,6 +55,10 @@ function setup_vdevs() { function spp_pri() { SPP_PRI_BIN=${SPP_DIR}/src/primary/${RTE_TARGET}/spp_primary + if [ ${SPP_FILE_PREFIX} ]; then + FILE_PREFIX_OPT="--file-prefix ${SPP_FILE_PREFIX}" + fi + cmd="sudo ${SPP_PRI_BIN} \ -l ${PRI_CORE_LIST} \ -n ${PRI_MEMCHAN} \ @@ -62,6 +66,7 @@ function spp_pri() { --huge-dir ${SPP_HUGEPAGES} \ --proc-type primary \ --base-virtaddr 0x100000000 \ + ${FILE_PREFIX_OPT} \ --log-level ${LOGLEVEL} \ ${SPP_PRI_VHOST} \ ${SPP_PRI_RING} \ @@ -70,7 +75,7 @@ function spp_pri() { -- \ -p ${PRI_PORTMASK} \ -n ${NUM_RINGS} \ - -s ${SPP_HOST_IP}:5555" + -s ${SPP_CTL_IP}:5555" if [ ${DRY_RUN} ]; then echo ${cmd} diff --git a/bin/start.sh b/bin/start.sh index 2f4e31a..ce3ce26 100755 --- a/bin/start.sh +++ b/bin/start.sh @@ -29,7 +29,7 @@ do done function start_spp_ctl() { - cmd="python3 ${SPP_DIR}/src/spp-ctl/spp-ctl -b ${SPP_HOST_IP}" + cmd="python3 ${SPP_DIR}/src/spp-ctl/spp-ctl -b ${SPP_CTL_IP}" if [ ${DRY_RUN} ]; then echo ${cmd} else @@ -65,5 +65,7 @@ start_spp_pri if [ ! ${DRY_RUN} ]; then sleep 1 # wait for spp-ctl is ready - python3 ${SPP_DIR}/src/spp.py -b ${SPP_HOST_IP} --wait-pri + SPP_CTL_IP=${SPP_CTL_IP} \ + SPP_FILE_PREFIX=${SPP_FILE_PREFIX} \ + python3 ${SPP_DIR}/src/spp.py -b ${SPP_CTL_IP} --wait-pri fi -- 2.17.1