diff options
-rw-r--r-- | app_example/perf-test/multi_tcp_common_app_Cli.c | 2 | ||||
-rwxr-xr-x | scripts/build.sh | 21 | ||||
-rw-r--r-- | src/framework/include/nsfw_mgr_com_api.h | 2 | ||||
-rw-r--r-- | src/framework/ipc/mgr_com/mgr_com.c | 2 |
4 files changed, 19 insertions, 8 deletions
diff --git a/app_example/perf-test/multi_tcp_common_app_Cli.c b/app_example/perf-test/multi_tcp_common_app_Cli.c index 5c1fada..e395848 100644 --- a/app_example/perf-test/multi_tcp_common_app_Cli.c +++ b/app_example/perf-test/multi_tcp_common_app_Cli.c @@ -255,7 +255,7 @@ process_client (void) sizeof (g_dest)); if (errconn[i] < 0) { - printf ("client %d Connect Failed %d\n", i, errno); + printf ("client %d Connect Failed %s\n", i, strerror(errno)); _CLOSE (c_socketfd[i]); c_socketfd[i] = -1; continue; diff --git a/scripts/build.sh b/scripts/build.sh index 0fa8af2..6379ed1 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -48,7 +48,13 @@ echo KERNEL_MACHINE: $KERNEL_MACHINE echo KERNEL_RELEASE: $KERNEL_RELEASE echo KERNEL_VERSION: $KERNEL_VERSION echo OS_ID: $OS_ID -echo OS_VERSION_ID: $OS_ID +echo OS_VERSION_ID: $OS_VERSION_ID + + +# add inherited proxy for sudo user +LINE='Defaults env_keep += "ftp_proxy http_proxy https_proxy no_proxy"' +FILE=/etc/sudoers +grep -qF -- "$LINE" "$FILE" || sudo echo "$LINE" >> "$FILE" #DPDK download path DPDK_DOWNLOAD_PATH=/tmp/dpdk @@ -74,7 +80,7 @@ elif [ "$OS_ID" == "debian" ]; then sudo apt-get update ${APT_OPTS} sudo DEBIAN_FRONTEND=noninteractive apt-get install -yq git cmake gcc g++ automake libtool wget lsof lshw pciutils net-tools tcpdump libpcre3 libpcre3-dev zlibc zlib1g zlib1g-dev vim elif [ "$OS_ID" == "centos" ]; then - sudo yum install -y deltarpm git cmake gcc g++ automake libtool wget lsof lshw pciutils net-tools tcpdump vim sudo yum-utils pcre-devel zlib-devel libiverbs tk tcl tcsh + sudo yum install -y deltarpm git cmake gcc g++ automake libtool wget lsof lshw pciutils net-tools tcpdump vim sudo yum-utils pcre-devel zlib-devel libiverbs tk tcl tcsh redhat-lsb-core elif [ "$OS_ID" == "opensuse" ]; then echo "not tested for opensuse and exit" exit 1 @@ -261,11 +267,14 @@ if [ "$OS_ID" == "ubuntu" ]; then tar -zxvf MLNX_OFED_LINUX-4.4-1.0.0.0-ubuntu16.04-x86_64.tgz cd MLNX_OFED_LINUX-4.4-1.0.0.0-ubuntu16.04-x86_64 elif [ "$OS_ID" == "centos" ]; then - wget http://www.mellanox.com/downloads/ofed/MLNX_OFED-4.4-1.0.0.0/MLNX_OFED_LINUX-4.4-1.0.0.0-rhel7.2-x86_64.tgz - tar -zxvf MLNX_OFED_LINUX-4.4-1.0.0.0-rhel7.2-x86_64.tgz - cd MLNX_OFED_LINUX-4.4-1.0.0.0-rhel7.2-x86_64 + CENT_VERSION=`grep -oE '[0-9]+\.[0-9]+' /etc/redhat-release` + wget http://www.mellanox.com/downloads/ofed/MLNX_OFED-4.4-1.0.0.0/MLNX_OFED_LINUX-4.4-1.0.0.0-rhel${CENT_VERSION}-x86_64.tgz + tar -zxvf MLNX_OFED_LINUX-4.4-1.0.0.0-rhel${CENT_VERSION}-x86_64.tgz + cd MLNX_OFED_LINUX-4.4-1.0.0.0-rhel${CENT_VERSION}-x86_64 fi -./mlnxofedinstall --force + +./mlnxofedinstall --force || exit 1 + cd $BUILD_DIR make dmm_rsocket if [ $? -eq 0 ]; then diff --git a/src/framework/include/nsfw_mgr_com_api.h b/src/framework/include/nsfw_mgr_com_api.h index 094043e..dcb602c 100644 --- a/src/framework/include/nsfw_mgr_com_api.h +++ b/src/framework/include/nsfw_mgr_com_api.h @@ -107,7 +107,7 @@ typedef enum _fw_poc_type NSFW_PROC_MAX = 16 } fw_poc_type; -#define NSFW_DOMAIN_DIR "/var/run" +#define NSFW_DOMAIN_DIR "/var/run/" #define NSTACK_MAX_PROC_NAME_LEN 20 typedef enum _nsfw_mgr_msg_rsp_code diff --git a/src/framework/ipc/mgr_com/mgr_com.c b/src/framework/ipc/mgr_com/mgr_com.c index 2b35e2c..25d8bff 100644 --- a/src/framework/ipc/mgr_com/mgr_com.c +++ b/src/framework/ipc/mgr_com/mgr_com.c @@ -1859,6 +1859,8 @@ nsfw_mgr_com_module_init (void *param) return -1; } + //TODO: check the path exist or not + NSFW_LOGINF ("module mgr init]NSFW_PROC_MAIN domain_path=%s", mgr_cfg->domain_path); |