For GTPV1U
git-svn-id: http://svn.eurecom.fr/openair4G/trunk@7434 818b1a75-f10b-46b9-bf7c-635c3b92a50f
This commit is contained in:
@@ -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 )
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -19,7 +19,7 @@ eNBs =
|
||||
|
||||
mobile_country_code = "208";
|
||||
|
||||
mobile_network_code = "92";
|
||||
mobile_network_code = "93";
|
||||
|
||||
////////// Physical parameters:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user