From: yasufum.o@gmail.com
To: spp@dpdk.org, ferruh.yigit@intel.com, yasufum.o@gmail.com
Subject: [spp] [PATCH 3/6] bin: add SPP_FILE_PREFIX env variable
Date: Fri, 20 Dec 2019 16:41:00 +0900 [thread overview]
Message-ID: <20191220074103.14065-4-yasufum.o@gmail.com> (raw)
In-Reply-To: <20191220074103.14065-1-yasufum.o@gmail.com>
From: Yasufumi Ogawa <yasufum.o@gmail.com>
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 <yasufum.o@gmail.com>
---
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
next prev parent reply other threads:[~2019-12-20 7:41 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-20 7:40 [spp] [PATCH 0/6] Run SPP with --file-prefix option yasufum.o
2019-12-20 7:40 ` [spp] [PATCH 1/6] cli: add env command yasufum.o
2019-12-20 7:40 ` [spp] [PATCH 2/6] cli: add file prefix opt for launch cmd yasufum.o
2019-12-20 7:41 ` yasufum.o [this message]
2019-12-20 7:41 ` [spp] [PATCH 4/6] readme: update example of config.sh yasufum.o
2019-12-20 7:41 ` [spp] [PATCH 5/6] docs: add desc for env command yasufum.o
2019-12-20 7:41 ` [spp] [PATCH 6/6] docs: add file prefix option in usecases yasufum.o
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=20191220074103.14065-4-yasufum.o@gmail.com \
--to=yasufum.o@gmail.com \
--cc=ferruh.yigit@intel.com \
--cc=spp@dpdk.org \
/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).