aboutsummaryrefslogtreecommitdiffstats
path: root/stacks/lwip_stack/release
diff options
context:
space:
mode:
Diffstat (limited to 'stacks/lwip_stack/release')
-rw-r--r--stacks/lwip_stack/release/configure/ip_data.json25
-rw-r--r--stacks/lwip_stack/release/configure/network_data_tonStack.json22
-rwxr-xr-xstacks/lwip_stack/release/lwip_helper_files/download_lwip.sh4
-rwxr-xr-xstacks/lwip_stack/release/script/nstack_fun.sh4
-rwxr-xr-xstacks/lwip_stack/release/script/nstack_var.sh4
-rwxr-xr-xstacks/lwip_stack/release/script/run_nstack_main.sh3
-rwxr-xr-xstacks/lwip_stack/release/start_nstack.sh46
7 files changed, 48 insertions, 60 deletions
diff --git a/stacks/lwip_stack/release/configure/ip_data.json b/stacks/lwip_stack/release/configure/ip_data.json
index f29103e..1d52b77 100644
--- a/stacks/lwip_stack/release/configure/ip_data.json
+++ b/stacks/lwip_stack/release/configure/ip_data.json
@@ -1,31 +1,8 @@
{
- "containerID": "9112d2b6aa31",
- "primary_port": "PortA",
"ports_list": [
{
"port_name": "PortA",
- "ref_nic": [
- "eth7"
- ],
- "mac": [
- "00:54:32:19:3d:19"
- ],
- "net_name": "IDX-M",
- "ip_cidr": ["192.168.1.207/24"],
- "multicast_id": [
- {
- "group_id": "cast_group_1",
- "group_ip": "239.0.0.1"
- },
- {
- "group_id": "cast_group_2",
- "group_ip": "239.0.0.2"
- }
- ],
- "vlan_id": 42,
- "vlan_inside": true,
- "vxlan_id": -1,
- "vxlan_inside": false
+ "ip_cidr": ["192.168.1.207/24"]
}
]
}
diff --git a/stacks/lwip_stack/release/configure/network_data_tonStack.json b/stacks/lwip_stack/release/configure/network_data_tonStack.json
index 7c059ef..7b734b0 100644
--- a/stacks/lwip_stack/release/configure/network_data_tonStack.json
+++ b/stacks/lwip_stack/release/configure/network_data_tonStack.json
@@ -1,31 +1,15 @@
[
{
- "cniVersion": "0.2.0",
- "name": "IDX-M",
- "multi_entry": "3",
+ "name": "network1",
"type": "nstack-dpdk",
- "vlanID": 42,
- "vlan_inside": true,
"ipam": {
- "type": "canal-ipam",
- "subnet": "192.168.1.1/24",
- "gateway": "192.168.1.254",
- "range-start": "192.168.1.198",
- "range-end": "192.168.1.209",
- "routes": [
- {
- "dst": "192.168.1.0/24",
- "gw": "192.168.1.254"
- }
- ]
+ "subnet": "192.168.1.1/24"
},
"args": {
"phynet": {
"ref_nic": [
"eth7"
- ],
- "bond_name": "",
- "bond_mode": -1
+ ]
}
}
},
diff --git a/stacks/lwip_stack/release/lwip_helper_files/download_lwip.sh b/stacks/lwip_stack/release/lwip_helper_files/download_lwip.sh
index 316859b..bbb8afb 100755
--- a/stacks/lwip_stack/release/lwip_helper_files/download_lwip.sh
+++ b/stacks/lwip_stack/release/lwip_helper_files/download_lwip.sh
@@ -23,7 +23,7 @@ echo $LWIP_DOWNLOAD_DIR
if [ ! -d "${LWIP_DOWNLOAD_DIR}/lwip/" ]; then
mkdir -p ${LWIP_DOWNLOAD_DIR}/lwip/
cd ${LWIP_DOWNLOAD_DIR}/
- wget -N --no-check-certificate http://download.savannah.nongnu.org/releases/lwip/lwip-2.0.3.zip
+ wget -N --no-check-certificate http://download-mirror.savannah.nongnu.org/releases/lwip/lwip-2.0.3.zip
unzip ${LWIP_DOWNLOAD_DIR}/lwip-2.0.3.zip "lwip-2.0.3/src/*" -d ${LWIP_DOWNLOAD_DIR}/lwip
mv ${LWIP_DOWNLOAD_DIR}/lwip/lwip-2.0.3/src/* ${LWIP_DOWNLOAD_DIR}/lwip/
rm -rf ${LWIP_DOWNLOAD_DIR}/lwip/lwip-2.0.3/
@@ -32,4 +32,4 @@ if [ ! -d "${LWIP_DOWNLOAD_DIR}/lwip/" ]; then
cp -r ${SCRIPT_DIR}/core/* ${LWIP_DOWNLOAD_DIR}/lwip/core/
cp -r ${SCRIPT_DIR}/include/* ${LWIP_DOWNLOAD_DIR}/lwip/include/lwip/
mv ${LWIP_DOWNLOAD_DIR}/lwip/include/lwip/errno.h ${LWIP_DOWNLOAD_DIR}/lwip/include/lwip/lwip_errno.h
-fi \ No newline at end of file
+fi
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/nstack_var.sh b/stacks/lwip_stack/release/script/nstack_var.sh
index 9a1c612..a654d34 100755
--- a/stacks/lwip_stack/release/script/nstack_var.sh
+++ b/stacks/lwip_stack/release/script/nstack_var.sh
@@ -50,8 +50,10 @@ DPDK_NIC_LIST_FILE=$RUNTIME_DIR/.nstack_dpdk_nic_list
MAX_LOG_FILE_SIZE=52428800
HUGE_PAGES=2048
HUGE_DIR=/mnt/nstackhuge
+
SLEEP_INTERVAL=100 # tcpip thread sleep time, unit: us
-BIND_CPU=0
+BIND_CPU=1
+
MEM_SIZE=3072
RTP_CORE_MASK=2
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"