From 5fdc3077db40c461c8aac2cc7afd402d01bec77b Mon Sep 17 00:00:00 2001 From: Cedric Roux Date: Fri, 23 Mar 2018 10:07:47 +0100 Subject: [PATCH 1/4] disable U-plane inactivity timer. It is annoying and does not seem to work properly. To be checked/reworked if needed. Keep in mind that we also want oaisim to be functional. --- openair2/LAYER2/MAC/eNB_scheduler.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/openair2/LAYER2/MAC/eNB_scheduler.c b/openair2/LAYER2/MAC/eNB_scheduler.c index a7c79a70d5..8dab2a9b71 100644 --- a/openair2/LAYER2/MAC/eNB_scheduler.c +++ b/openair2/LAYER2/MAC/eNB_scheduler.c @@ -423,12 +423,15 @@ check_ul_failure(module_id_t module_idP, int CC_id, int UE_id, } } // ul_failure_timer>0 +#if 0 + /* U-plane inactivity timer is disabled. Uncomment to re-enable. */ UE_list->UE_sched_ctrl[UE_id].uplane_inactivity_timer++; if(UE_list->UE_sched_ctrl[UE_id].uplane_inactivity_timer > (U_PLANE_INACTIVITY_VALUE*subframe_num(&RC.eNB[module_idP][CC_id]->frame_parms))){ LOG_D(MAC,"UE %d rnti %x: U-Plane Failure after repeated PDCCH orders: Triggering RRC \n",UE_id,rnti); mac_eNB_rrc_uplane_failure(module_idP,CC_id,frameP,subframeP,rnti); UE_list->UE_sched_ctrl[UE_id].uplane_inactivity_timer = 0; }// time > 60s +#endif } void From e7bca7fdacdf8c37da91dde390710f4e12709b4d Mon Sep 17 00:00:00 2001 From: Cedric Roux Date: Fri, 23 Mar 2018 10:13:41 +0100 Subject: [PATCH 2/4] Disable ITTI dump If anyone needs it, it's a simple matter of reverting this basic commit. --- common/utils/itti/intertask_interface.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/common/utils/itti/intertask_interface.c b/common/utils/itti/intertask_interface.c index 85b5fef509..1d38a3692b 100644 --- a/common/utils/itti/intertask_interface.c +++ b/common/utils/itti/intertask_interface.c @@ -325,8 +325,11 @@ int itti_send_msg_to_task(task_id_t destination_task_id, instance_t instance, Me /* Increment the global message number */ message_number = itti_increment_message_number (); +#if 0 + /* itti dump is disabled */ itti_dump_queue_message (origin_task_id, message_number, message, itti_desc.messages_info[message_id].name, sizeof(MessageHeader) + message->ittiMsgHeader.ittiMsgSize); +#endif if (destination_task_id != TASK_UNKNOWN) { @@ -421,8 +424,11 @@ int itti_try_send_msg_to_task(task_id_t destination_task_id, instance_t instance /* Increment the global message number */ message_number = itti_increment_message_number (); +#if 0 + /* itti dump is disabled */ itti_dump_queue_message (origin_task_id, message_number, message, itti_desc.messages_info[message_id].name, sizeof(MessageHeader) + message->ittiMsgHeader.ittiMsgSize); +#endif if (destination_task_id != TASK_UNKNOWN) { @@ -716,8 +722,11 @@ void itti_mark_task_ready(task_id_t task_id) AssertFatal (thread_id < itti_desc.thread_max, "Thread id (%d) is out of range (%d)!\n", thread_id, itti_desc.thread_max); +#if 0 + /* itti dump is disabled */ /* Register the thread in itti dump */ itti_dump_thread_use_ring_buffer(); +#endif /* Mark the thread as using LFDS queue */ lfds611_queue_use(itti_desc.tasks[task_id].message_queue); @@ -848,7 +857,10 @@ int itti_init(task_id_t task_max, thread_id_t thread_max, MessagesIds messages_i itti_desc.wait_tasks = 0; itti_desc.created_tasks = 0; itti_desc.ready_tasks = 0; +#if 0 + /* itti dump is disabled */ itti_dump_init (messages_definition_xml, dump_file_name); +#endif CHECK_INIT_RETURN(timer_init ()); @@ -915,7 +927,10 @@ void itti_wait_tasks_end(void) exit (0); } +#if 0 + /* itti dump is disabled */ itti_dump_exit(); +#endif } void itti_send_terminate_message(task_id_t task_id) From 3a0d9339dc136cb5acce1760a0c2bd9eaeb7b5fd Mon Sep 17 00:00:00 2001 From: Cedric Roux Date: Fri, 23 Mar 2018 10:14:55 +0100 Subject: [PATCH 3/4] bugfix: fix a memory leak When doing TCP downlink traffic with iperf for several hours, the memory consumption of lte-softmodem does not stop to grow. After analysis, this commit seems to be the only fix needed. To be checked somehow. --- openair3/GTPV1-U/gtpv1u_eNB.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/openair3/GTPV1-U/gtpv1u_eNB.c b/openair3/GTPV1-U/gtpv1u_eNB.c index 7f63e8c1ce..7ba3d88a87 100644 --- a/openair3/GTPV1-U/gtpv1u_eNB.c +++ b/openair3/GTPV1-U/gtpv1u_eNB.c @@ -290,6 +290,7 @@ NwGtpv1uRcT gtpv1u_eNB_process_stack_req( hashtable_rc_t hash_rc = HASH_TABLE_KEY_NOT_EXISTS; gtpv1u_teid_data_t *gtpv1u_teid_data_p = NULL; protocol_ctxt_t ctxt; + NwGtpv1uRcT rc; switch(pUlpApi->apiType) { /* Here there are two type of messages handled: @@ -314,6 +315,12 @@ NwGtpv1uRcT gtpv1u_eNB_process_stack_req( gtpv1u_eNB_write_dump_socket(buffer,buffer_len); #endif + rc = nwGtpv1uMsgDelete(RC.gtpv1u_data_g->gtpv1u_stack, + pUlpApi->apiInfo.recvMsgInfo.hMsg); + if (rc != NW_GTPV1U_OK) { + LOG_E(GTPU, "nwGtpv1uMsgDelete failed: 0x%x\n", rc); + } + //----------------------- // GTPV1U->PDCP mapping //----------------------- From 16cb7eba64b70fb054451b5c60619e5539524c36 Mon Sep 17 00:00:00 2001 From: Cedric Roux Date: Fri, 23 Mar 2018 10:23:05 +0100 Subject: [PATCH 4/4] remove start_background_system from eNB softmodem This is only needed by the UE code, to setup IP settings. The eNB does not need this. (To be reverted if this is wrong.) --- targets/RT/USER/lte-softmodem.c | 1 - 1 file changed, 1 deletion(-) diff --git a/targets/RT/USER/lte-softmodem.c b/targets/RT/USER/lte-softmodem.c index 03313146df..48169adffa 100644 --- a/targets/RT/USER/lte-softmodem.c +++ b/targets/RT/USER/lte-softmodem.c @@ -904,7 +904,6 @@ int main( int argc, char **argv ) int ret; #endif - start_background_system(); if ( load_configmodule(argc,argv) == NULL) { exit_fun("[SOFTMODEM] Error, configuration module init failed\n"); }