diff --git a/cmake_targets/CMakeLists.txt b/cmake_targets/CMakeLists.txt index 232693dd28cdc609bb7020f9584a6996e52a5998..eb3c0480391b48874a4d046c8298728746b56e3d 100644 --- a/cmake_targets/CMakeLists.txt +++ b/cmake_targets/CMakeLists.txt @@ -675,7 +675,12 @@ add_boolean_option(UE_EXPANSION False "enable UE_EXPANSION w add_boolean_option(PHY_TX_THREAD False "enable UE_EXPANSION with max 256 UE") add_boolean_option(PRE_SCD_THREAD False "enable UE_EXPANSION with max 256 UE") -######################## +############################################################################# +# Flag for UE compilation to avoid issues in common eNB/UE PDCP/RLC functions +############################################################################# + +add_boolean_option(UETARGET False "set UE as target for compiler") + # Include order ########################## add_boolean_option(ENB_MODE True "Swap the include directories between openair2 and openair3" ) diff --git a/cmake_targets/build_oai b/cmake_targets/build_oai index 54683af1ccdcf7ee0c0c415ab88efc5b81ed059b..f099b0cd3716ac3f0250db34ee1329b4fd3c0364 100755 --- a/cmake_targets/build_oai +++ b/cmake_targets/build_oai @@ -69,6 +69,7 @@ DISABLE_LOG_X="False" USRP_REC_PLAY="False" BUILD_ECLIPSE=0 UE_NAS_USE_TUN="False" +UETARGET="False" BASIC_SIMULATOR=0 trap handle_ctrl_c INT @@ -226,6 +227,7 @@ function main() { shift;; --UE) UE=1 + UETARGET="True" echo_info "Will compile UE" shift;; --mu) @@ -573,6 +575,9 @@ function main() { echo "set (UE_TIMING_TRACE $UE_TIMING_TRACE)" >> $cmake_file echo "set (DISABLE_LOG_X $DISABLE_LOG_X)" >> $cmake_file echo "set (USRP_REC_PLAY $USRP_REC_PLAY)" >> $cmake_file + if [ "$UE" = 1 ] ; then + echo "set (UETARGET $UETARGET )" >> $cmake_file + fi if [ "$UE" = 1 -a "$NOS1" = "0" ] ; then echo_info "Compiling UE S1 build : enabling Linux and NETLINK" echo "set (LINUX True )" >> $cmake_file @@ -927,6 +932,7 @@ fi echo "set (USRP_REC_PLAY $USRP_REC_PLAY)" >> $cmake_file echo "set (LINUX True )" >> $cmake_file echo "set (PDCP_USE_NETLINK True )" >> $cmake_file + echo "set (UETARGET True )" >> $cmake_file echo "set (BASIC_SIMULATOR \"True\" )" >> $cmake_file echo "set (UE_NAS_USE_TUN \"True\" )" >> $cmake_file echo 'include(${CMAKE_CURRENT_SOURCE_DIR}/../../CMakeLists.txt)' >> $cmake_file diff --git a/openair2/LAYER2/PDCP_v10.1.0/pdcp.c b/openair2/LAYER2/PDCP_v10.1.0/pdcp.c index 681a6e32f88b7c9e78b9ed6ddb33703197e6db15..f07419d3cafc419568adc782c452dfe59507c4d6 100644 --- a/openair2/LAYER2/PDCP_v10.1.0/pdcp.c +++ b/openair2/LAYER2/PDCP_v10.1.0/pdcp.c @@ -374,6 +374,7 @@ boolean_t pdcp_data_req( "[MSG] PDCP DL %s PDU on rb_id %d\n",(srb_flagP)? "CONTROL" : "DATA", rb_idP); LOG_F(PDCP,"\n"); +#ifndef UETARGET static cudu_params_t *cudu = NULL; if (ctxt_pP->enb_flag == 1) { @@ -439,7 +440,7 @@ boolean_t pdcp_data_req( #endif ); } - +#endif /*UETARGET*/ } switch (rlc_status) { diff --git a/openair2/LAYER2/RLC/rlc.c b/openair2/LAYER2/RLC/rlc.c index b4685a07644afa052d6e4ca77eda23e095d7326a..b886d9278387dba01c58e5e3a46fff61228b0f83 100644 --- a/openair2/LAYER2/RLC/rlc.c +++ b/openair2/LAYER2/RLC/rlc.c @@ -54,6 +54,7 @@ extern boolean_t pdcp_data_ind( #include "rlc_proto_agent_primitives.h" // PROTO AGENT +#ifndef UETARGET void async_server_thread_init (void) { @@ -111,7 +112,7 @@ async_server_thread_finalize (void) return err; } - +#endif /*UETARGET*/ //----------------------------------------------------------------------------- void rlc_util_print_hex_octets(comp_name_t componentP, unsigned char* dataP, const signed long sizeP) @@ -675,7 +676,7 @@ void rlc_data_ind ( if (ctxt_pP->enb_flag) T(T_ENB_RLC_UL, T_INT(ctxt_pP->module_id), T_INT(ctxt_pP->rnti), T_INT(rb_idP), T_INT(sdu_sizeP)); #endif - +#ifndef UETARGET if ((!srb_flagP) && (ctxt_pP->enb_flag == 1)) { proto_agent_send_pdcp_data_ind(ctxt_pP, @@ -686,6 +687,7 @@ void rlc_data_ind ( sdu_pP); } else +#endif /*UETARGET*/ { pdcp_data_ind ( ctxt_pP, @@ -765,6 +767,8 @@ rlc_module_init (void) pool_buffer_init(); + +#ifndef UETARGET /* Launch the RLC listening server * as a separate thread */ @@ -774,7 +778,7 @@ rlc_module_init (void) async_server_thread_init(); started = 1; } - +#endif /*UETARGET*/ return(0); } diff --git a/openair2/UTIL/MEM/mem_block.h b/openair2/UTIL/MEM/mem_block.h index 0f3b98b04aba8acce4957ce101d0f47d60f6a34c..313e10d24f1977de76adf59a68d50521cd81c2d4 100644 --- a/openair2/UTIL/MEM/mem_block.h +++ b/openair2/UTIL/MEM/mem_block.h @@ -124,7 +124,7 @@ void check_free_mem_block (mem_block_t * leP); # define MEM_MNGT_MB12_BLOCK_SIZE MEM_MNGT_MB0_BLOCK_SIZE*4096 // 262144 -# define MEM_MNGT_MB12_NB_BLOCKS 1024 * MEM_SCALE +# define MEM_MNGT_MB12_NB_BLOCKS 32 * MEM_SCALE //# define MEM_MNGT_MB12_NB_BLOCKS 4096 * MEM_SCALE # define MEM_MNGT_POOL_ID12 12