Commit 64a1214c authored by Raymond Knopp's avatar Raymond Knopp

For GTPV1U


git-svn-id: http://svn.eurecom.fr/openair4G/trunk@7434 818b1a75-f10b-46b9-bf7c-635c3b92a50f
parent ef3df363
...@@ -24,7 +24,7 @@ set ( ENABLE_VCD_FIFO False ) ...@@ -24,7 +24,7 @@ set ( ENABLE_VCD_FIFO False )
set ( ENB_MODE False ) set ( ENB_MODE False )
set ( EPC_BUILD True ) set ( EPC_BUILD True )
set ( EXMIMO_IOT False ) 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 ( HARD_RT False )
set ( JUMBO_FRAME False ) set ( JUMBO_FRAME False )
set ( LARGE_SCALE False ) set ( LARGE_SCALE False )
......
...@@ -50,6 +50,8 @@ function help() ...@@ -50,6 +50,8 @@ function help()
echo_error " -c, --clean Clean the build generated files (build from scratch)" echo_error " -c, --clean Clean the build generated files (build from scratch)"
echo_error " -d, --debug Compile with debug informations." echo_error " -d, --debug Compile with debug informations."
echo_error " -h, --help Print this help." 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 " -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 " -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)." echo_error " -r, --realm realm Realm of the MME (if not specified, is extracted from this host FQDN)."
...@@ -70,6 +72,7 @@ function main() ...@@ -70,6 +72,7 @@ function main()
local cmake_args=" " local cmake_args=" "
local make_args="-j $NUM_CPU" local make_args="-j $NUM_CPU"
local realm="" local realm=""
local gtpu_cmake_arg="-DFLAG_GTPV1U_KERNEL_THREAD_SOCK_NO_WAIT=False"
local hss_fqdn="" local hss_fqdn=""
local hss_hostname="" local hss_hostname=""
local hss_ip="" local hss_ip=""
...@@ -89,6 +92,15 @@ function main() ...@@ -89,6 +92,15 @@ function main()
echo "Compile with debug informations" echo "Compile with debug informations"
shift; 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) -h | --help)
help help
shift; shift;
...@@ -147,6 +159,8 @@ function main() ...@@ -147,6 +159,8 @@ function main()
esac esac
done done
cmake_args="$cmake_args $gtpu_cmake_arg"
# extra arguments processing # extra arguments processing
if [[ z$hss_fqdn = z ]]; then if [[ z$hss_fqdn = z ]]; then
hss_fqdn=`hostname --fqdn` hss_fqdn=`hostname --fqdn`
...@@ -222,8 +236,6 @@ function main() ...@@ -222,8 +236,6 @@ function main()
############################################################################## ##############################################################################
# Compile EPC # Compile EPC
############################################################################## ##############################################################################
...@@ -268,6 +280,8 @@ function main() ...@@ -268,6 +280,8 @@ function main()
echo_fatal "not installed EPC config files: not found" echo_fatal "not installed EPC config files: not found"
fi fi
} }
......
...@@ -52,9 +52,7 @@ ...@@ -52,9 +52,7 @@
# error "Kernel version is not defined!!!! Exiting." # error "Kernel version is not defined!!!! Exiting."
#endif #endif
#undef THREAD_SOCK_NO_WAIT
#define TRACE_IN_KERN_LOG 1 #define TRACE_IN_KERN_LOG 1
#define TRACE_ICMP_IN_KERN_LOG 1
#if defined(TRACE_IN_KERN_LOG) #if defined(TRACE_IN_KERN_LOG)
#define PR_INFO(fORMAT, aRGS...) pr_info(fORMAT, ##aRGS) #define PR_INFO(fORMAT, aRGS...) pr_info(fORMAT, ##aRGS)
...@@ -301,8 +299,10 @@ static int _udp_thread(void *data) ...@@ -301,8 +299,10 @@ static int _udp_thread(void *data)
{ {
int size, tx_size; int size, tx_size;
int bufsize = 8192; int bufsize = 8192;
#if defined(FLAG_GTPV1U_KERNEL_THREAD_SOCK_NO_WAIT)
int success_read = 0; int success_read = 0;
int failed_read = 0; int failed_read = 0;
#endif
unsigned char buf[bufsize+1]; unsigned char buf[bufsize+1];
unsigned char gtp_resp[1024]; unsigned char gtp_resp[1024];
...@@ -321,18 +321,20 @@ static int _udp_thread(void *data) ...@@ -321,18 +321,20 @@ static int _udp_thread(void *data)
size = _gtpuah_ksocket_receive(_gtpuah_sock.sock, &_gtpuah_sock.addr, buf, bufsize); size = _gtpuah_ksocket_receive(_gtpuah_sock.sock, &_gtpuah_sock.addr, buf, bufsize);
if (size <= 0) { if (size <= 0) {
success_read = 0;
failed_read += 1;
if (failed_read > 10) failed_read = 10;
if (size != -EAGAIN) { if (size != -EAGAIN) {
pr_info(MODULE_NAME": error getting datagram, sock_recvmsg error = %d\n", size); 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); usleep_range(failed_read*20,failed_read*200);
#endif #endif
} else { } else {
#if defined(FLAG_GTPV1U_KERNEL_THREAD_SOCK_NO_WAIT)
success_read += 1; success_read += 1;
failed_read = 0; failed_read = 0;
#endif
PR_INFO(MODULE_NAME": received %d bytes\n", size); PR_INFO(MODULE_NAME": received %d bytes\n", size);
if ((tx_size = _gtpuah_ksocket_process_gtp(buf, size, gtp_resp)) > 0) { 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 ...@@ -493,7 +495,7 @@ static int _gtpuah_ksocket_receive(struct socket* sock_pP, struct sockaddr_in* a
iov.iov_base = buf_pP; iov.iov_base = buf_pP;
iov.iov_len = lenP; iov.iov_len = lenP;
#if defined(THREAD_SOCK_NO_WAIT) #if defined(FLAG_GTPV1U_KERNEL_THREAD_SOCK_NO_WAIT)
msg.msg_flags = MSG_DONTWAIT; msg.msg_flags = MSG_DONTWAIT;
#else #else
msg.msg_flags = 0; msg.msg_flags = 0;
......
...@@ -19,7 +19,7 @@ eNBs = ...@@ -19,7 +19,7 @@ eNBs =
mobile_country_code = "208"; mobile_country_code = "208";
mobile_network_code = "92"; mobile_network_code = "93";
////////// Physical parameters: ////////// Physical parameters:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment