diff --git a/cmake_targets/epc_build_oai/CMakeLists.template b/cmake_targets/epc_build_oai/CMakeLists.template index 091298619dc2249c0669793d84773b4d3a09419a..b93370b5034df57632165cbd20aebb26a1bb02de 100644 --- a/cmake_targets/epc_build_oai/CMakeLists.template +++ b/cmake_targets/epc_build_oai/CMakeLists.template @@ -24,7 +24,7 @@ set ( ENABLE_VCD_FIFO False ) set ( ENB_MODE False ) set ( EPC_BUILD True ) set ( EXMIMO_IOT False ) -set ( FLAG_GTPV1U_KERNEL_THREAD_SOCK_NO_WAIT True) +set ( FLAG_GTPV1U_KERNEL_THREAD_SOCK_NO_WAIT False) set ( HARD_RT False ) set ( JUMBO_FRAME False ) set ( LARGE_SCALE False ) diff --git a/cmake_targets/tools/build_epc b/cmake_targets/tools/build_epc index cf62c18431f2a0e3de4866f2020e9fdb2b223f99..4494790cbf2fe4416421de2744aecfc70a9a02f7 100755 --- a/cmake_targets/tools/build_epc +++ b/cmake_targets/tools/build_epc @@ -50,6 +50,8 @@ function help() echo_error " -c, --clean Clean the build generated files (build from scratch)" echo_error " -d, --debug Compile with debug informations." echo_error " -h, --help Print this help." + echo_error " -g, --gtpu-easy-module Used for debugging GTPU (kernel module can be easily removed)" + echo_error " -G, --gtpu-full-speed Best GTPU throughput performance, but cannot be removed (default)." echo_error " -H, --hss hostname HSS hostname (with FQDN), default is this host (hostname)." echo_error " -i, --check-installed-software Check installed software packages necessary to build and run EPC (support Ubuntu 14.04)." echo_error " -r, --realm realm Realm of the MME (if not specified, is extracted from this host FQDN)." @@ -70,6 +72,7 @@ function main() local cmake_args=" " local make_args="-j $NUM_CPU" local realm="" + local gtpu_cmake_arg="-DFLAG_GTPV1U_KERNEL_THREAD_SOCK_NO_WAIT=False" local hss_fqdn="" local hss_hostname="" local hss_ip="" @@ -89,6 +92,15 @@ function main() echo "Compile with debug informations" shift; ;; + -g | --gtpu-easy-module) + gtpu_cmake_arg="-DFLAG_GTPV1U_KERNEL_THREAD_SOCK_NO_WAIT=True" + echo "Compile with not optimized GTPU kernel module option (but kernel module easy to remove)" + shift; + ;; + -G | --gtpu-full-speed) + echo "Compile with best performance GTPU kernel module option" + shift; + ;; -h | --help) help shift; @@ -146,6 +158,8 @@ function main() ;; esac done + + cmake_args="$cmake_args $gtpu_cmake_arg" # extra arguments processing if [[ z$hss_fqdn = z ]]; then @@ -197,7 +211,7 @@ function main() local dconf=$OPENAIR_DIR/targets/bin mkdir -m 777 -p $dbin $dlog - + ############################################################################## # Compile userspace executable ############################################################################## @@ -220,8 +234,6 @@ function main() mkdir -m 777 -p -v build fi - - ############################################################################## @@ -267,6 +279,8 @@ function main() else echo_fatal "not installed EPC config files: not found" fi + + } diff --git a/openair-cn/GTPV1-U/GTPUAH/xt_GTPUAH.c b/openair-cn/GTPV1-U/GTPUAH/xt_GTPUAH.c index 9970222e358df42283e7343f878182270a09c131..9e5d9bc49f18a23d496b6fca151ce6b369e7240a 100755 --- a/openair-cn/GTPV1-U/GTPUAH/xt_GTPUAH.c +++ b/openair-cn/GTPV1-U/GTPUAH/xt_GTPUAH.c @@ -52,9 +52,7 @@ # error "Kernel version is not defined!!!! Exiting." #endif -#undef THREAD_SOCK_NO_WAIT #define TRACE_IN_KERN_LOG 1 -#define TRACE_ICMP_IN_KERN_LOG 1 #if defined(TRACE_IN_KERN_LOG) #define PR_INFO(fORMAT, aRGS...) pr_info(fORMAT, ##aRGS) @@ -301,8 +299,10 @@ static int _udp_thread(void *data) { int size, tx_size; int bufsize = 8192; +#if defined(FLAG_GTPV1U_KERNEL_THREAD_SOCK_NO_WAIT) int success_read = 0; int failed_read = 0; +#endif unsigned char buf[bufsize+1]; unsigned char gtp_resp[1024]; @@ -321,18 +321,20 @@ static int _udp_thread(void *data) size = _gtpuah_ksocket_receive(_gtpuah_sock.sock, &_gtpuah_sock.addr, buf, bufsize); if (size <= 0) { - success_read = 0; - failed_read += 1; - if (failed_read > 10) failed_read = 10; if (size != -EAGAIN) { pr_info(MODULE_NAME": error getting datagram, sock_recvmsg error = %d\n", size); } -#if defined(THREAD_SOCK_NO_WAIT) +#if defined(FLAG_GTPV1U_KERNEL_THREAD_SOCK_NO_WAIT) + success_read = 0; + failed_read += 1; + if (failed_read > 10) failed_read = 10; usleep_range(failed_read*20,failed_read*200); #endif } else { +#if defined(FLAG_GTPV1U_KERNEL_THREAD_SOCK_NO_WAIT) success_read += 1; failed_read = 0; +#endif PR_INFO(MODULE_NAME": received %d bytes\n", size); if ((tx_size = _gtpuah_ksocket_process_gtp(buf, size, gtp_resp)) > 0) { @@ -493,7 +495,7 @@ static int _gtpuah_ksocket_receive(struct socket* sock_pP, struct sockaddr_in* a iov.iov_base = buf_pP; iov.iov_len = lenP; -#if defined(THREAD_SOCK_NO_WAIT) +#if defined(FLAG_GTPV1U_KERNEL_THREAD_SOCK_NO_WAIT) msg.msg_flags = MSG_DONTWAIT; #else msg.msg_flags = 0; diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.local.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.local.conf index f6d1164a97b3cf11c30d25830d23accdd0dc3c4a..2503e3b31eac3eedb1a3f84ff0f996ed1d32c194 100644 --- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.local.conf +++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.local.conf @@ -19,7 +19,7 @@ eNBs = mobile_country_code = "208"; - mobile_network_code = "92"; + mobile_network_code = "93"; ////////// Physical parameters: