summaryrefslogtreecommitdiffstats
path: root/stacks/lwip_stack/release
diff options
context:
space:
mode:
authoryalei wang <wylandrea@gmail.com>2018-10-30 07:40:15 +0000
committerGerrit Code Review <gerrit@fd.io>2018-10-30 07:40:15 +0000
commitdbc4c0c8284eddb91e5294ba00e0b43c8faab930 (patch)
tree615beff297ee2e0681169fb5929017d35be7fc5a /stacks/lwip_stack/release
parent3dd2a5fdd89db1d532229d2ec29078e8e4b23689 (diff)
parent4ed7096d4a4aff47a812a79252edd0834277ee30 (diff)
Merge "Feat: support vhost-user in lwip stack"
Diffstat (limited to 'stacks/lwip_stack/release')
-rwxr-xr-xstacks/lwip_stack/release/script/nstack_fun.sh4
-rwxr-xr-xstacks/lwip_stack/release/script/run_nstack_main.sh3
-rwxr-xr-xstacks/lwip_stack/release/start_nstack.sh46
3 files changed, 39 insertions, 14 deletions
diff --git a/stacks/lwip_stack/release/script/nstack_fun.sh b/stacks/lwip_stack/release/script/nstack_fun.sh
index 5e16283..fed3588 100755
--- a/stacks/lwip_stack/release/script/nstack_fun.sh
+++ b/stacks/lwip_stack/release/script/nstack_fun.sh
@@ -332,10 +332,10 @@ run_nStackMain()
log $LINENO "$env DPDK_TOOL_DIR=$DPDK_TOOL_DIR"
log $LINENO "$env LD_LIBRARY_PATH=$LD_LIBRARY_PATH"
log $LINENO "$env DPDK_LIB_PATH=$DPDK_LIB_PATH"
- log $LINENO "./nStackMain -c $1 -n 4 --huge-dir=$2 --proc-type=primary --file-prefix nStackMain -m $3 stack -c $4 -sleep $5 -bind_cpu $6"
+ log $LINENO "./nStackMain -c $1 -n 4 --huge-dir=$2 --proc-type=primary --file-prefix nStackMain -m $3 $7 $8 stack -c $4 -sleep $5 -bind_cpu $6"
check_file_size $DPDK_FILE
cd ..; cd bin/
- ./nStackMain -c $1 -n 4 --huge-dir=$2 --proc-type=primary --file-prefix nStackMain -m $3 stack -c $4 -sleep $5 -bind_cpu $6 >> $DPDK_FILE &
+ ./nStackMain -c $1 -n 4 --huge-dir=$2 --proc-type=primary --file-prefix nStackMain -m $3 $7 $8 stack -c $4 -sleep $5 -bind_cpu $6 >> $DPDK_FILE &
}
diff --git a/stacks/lwip_stack/release/script/run_nstack_main.sh b/stacks/lwip_stack/release/script/run_nstack_main.sh
index 2bd9e0d..9d6049a 100755
--- a/stacks/lwip_stack/release/script/run_nstack_main.sh
+++ b/stacks/lwip_stack/release/script/run_nstack_main.sh
@@ -20,7 +20,8 @@ init_network
CORE_MASK=1
log $LINENO "start run nstackmain"
log $LINENO "COREMASK=$CORE_MASK, HUGE_DIR=$1, MEM_SIZE=$2, RTP_CORE_MASK=$RTP_CORE_MASK, SLEEP_INTERVAL=$SLEEP_INTERVAL, BIND_CPU=$BIND_CPU"
+log $LINENO "VDEV=$VDEV, NO_PCI=$NO_PCI"
-run_nStackMain $CORE_MASK $1 $2 $RTP_CORE_MASK $SLEEP_INTERVAL $BIND_CPU
+run_nStackMain $CORE_MASK $1 $2 $RTP_CORE_MASK $SLEEP_INTERVAL $BIND_CPU $3 $4
exit 0
diff --git a/stacks/lwip_stack/release/start_nstack.sh b/stacks/lwip_stack/release/start_nstack.sh
index db0c084..35fe9df 100755
--- a/stacks/lwip_stack/release/start_nstack.sh
+++ b/stacks/lwip_stack/release/start_nstack.sh
@@ -16,16 +16,40 @@ fi
##get the log info from the parameter of ./start -l XXX -a XXX ###
nstack_log_path=""
hostinfo_path=""
-while getopts "l:i:a:" arg
+ARGS=`getopt -o "l:i:a:" -l "vdev:,file-prefix:,no-pci" -n "start_nstack.sh" -- "$@"`
+eval set -- "${ARGS}"
+while true
do
- case $arg in
- l)
- nstack_log_path="$OPTARG"
- ;;
- i)
- hostinfo_path="$OPTARG"
- ;;
- esac
+ case "$1" in
+ -l)
+ nstack_log_path="$2"
+ shift 2
+ ;;
+ -i)
+ hostinfo_path="$2"
+ shift 2
+ ;;
+ --vdev)
+ VDEV="--vdev=$2"
+ shift 2
+ ;;
+ --file-prefix)
+ FILE_PREFIX="--file-prefix=$2"
+ shift 2
+ ;;
+ --no-pci)
+ NO_PCI="--no-pci"
+ shift 1
+ ;;
+ --)
+ shift
+ break
+ ;;
+ *)
+ echo "Option illegal, please check input!"
+ exit 1
+ ;;
+ esac
done
hostinfo_stat=0
@@ -116,8 +140,8 @@ install_config
########################################################
core_mask=1
START_TYPE="primary"
-log $LINENO "./script/run_nstack_main.sh ${core_mask} $HUGE_DIR $MEM_SIZE $START_TYPE"
-${script_path}/script/run_nstack_main.sh $HUGE_DIR $MEM_SIZE
+log $LINENO "./script/run_nstack_main.sh ${core_mask} $HUGE_DIR $MEM_SIZE $START_TYPE $VDEV $NO_PCI"
+${script_path}/script/run_nstack_main.sh $HUGE_DIR $MEM_SIZE $VDEV $NO_PCI
print_pid=$(ps -ux | grep nStackMain | awk '{print $2}' | awk 'NR == 2')
echo "nStackMain PID:$print_pid"