diff options
author | rainbow_0206 <jiangwenjiang@huawei.com> | 2018-10-19 17:04:02 +0800 |
---|---|---|
committer | rainbow_0206 <jiangwenjiang@huawei.com> | 2018-10-29 17:03:49 +0800 |
commit | 4ed7096d4a4aff47a812a79252edd0834277ee30 (patch) | |
tree | b009b4341f123a69869b507504973a4ab42b7e7a /stacks/lwip_stack/release/start_nstack.sh | |
parent | 0e8e4b657d5d388a6ac988b9da97f1f81740a0b0 (diff) |
Feat: support vhost-user in lwip stack
Change-Id: I6685fae6dafb4a4ac4f03bd868aa5ca636ce7054
Signed-off-by: rainbow_0206 <jiangwenjiang@huawei.com>
Diffstat (limited to 'stacks/lwip_stack/release/start_nstack.sh')
-rw-r--r-- | stacks/lwip_stack/release/start_nstack.sh | 46 |
1 files changed, 35 insertions, 11 deletions
diff --git a/stacks/lwip_stack/release/start_nstack.sh b/stacks/lwip_stack/release/start_nstack.sh index db0c084..35fe9df 100644 --- 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" |