Commit 415c6b71 authored by heshanyun's avatar heshanyun Committed by Haruki NAOI

modify threshold of rlc buffer and add count for rlc out of resource for every ue

(cherry picked from commit c4417387a19dd3f51e8a972ada8176898f348a76)

# Conflicts:
#	openair2/LAYER2/RLC/rlc.c
parent fb6cfc0b
...@@ -637,13 +637,17 @@ eNB_dlsch_ulsch_scheduler(module_id_t module_idP, ...@@ -637,13 +637,17 @@ eNB_dlsch_ulsch_scheduler(module_id_t module_idP,
UE_scheduling_control = &(UE_list->UE_sched_ctrl[UE_id]); UE_scheduling_control = &(UE_list->UE_sched_ctrl[UE_id]);
if (((frameP & 127) == 0) && (subframeP == 0)) { if (((frameP & 127) == 0) && (subframeP == 0)) {
LOG_I(MAC,"UE rnti %x : %s, PHR %d dB DL CQI %d PUSCH SNR %d PUCCH SNR %d\n", LOG_I(MAC,"UE rnti %x : %s, PHR %d dB DL CQI %d PUSCH SNR %d PUCCH SNR %d RLC discard %d\n",
rnti, rnti,
UE_scheduling_control->ul_out_of_sync == 0 ? "in synch" : "out of sync", UE_scheduling_control->ul_out_of_sync == 0 ? "in synch" : "out of sync",
UE_list->UE_template[CC_id][UE_id].phr_info, UE_list->UE_template[CC_id][UE_id].phr_info,
UE_scheduling_control->dl_cqi[CC_id], UE_scheduling_control->dl_cqi[CC_id],
UE_scheduling_control->pusch_snr_avg[CC_id], UE_scheduling_control->pusch_snr_avg[CC_id],
UE_scheduling_control->pucch1_snr[CC_id]); UE_scheduling_control->pucch1_snr[CC_id],
UE_scheduling_control->rlc_out_of_resources_cnt);
pthread_mutex_lock(&(UE_scheduling_control->rlc_out_of_resources_lock));
UE_scheduling_control->rlc_out_of_resources_cnt = 0;
pthread_mutex_unlock(&(UE_scheduling_control->rlc_out_of_resources_lock));
} }
RC.eNB[module_idP][CC_id]->pusch_stats_bsr[UE_id][(frameP * 10) + subframeP] = -63; RC.eNB[module_idP][CC_id]->pusch_stats_bsr[UE_id][(frameP * 10) + subframeP] = -63;
......
...@@ -2662,6 +2662,9 @@ add_new_ue(module_id_t mod_idP, ...@@ -2662,6 +2662,9 @@ add_new_ue(module_id_t mod_idP,
UE_list->UE_sched_ctrl[UE_id].volte_configured = FALSE; UE_list->UE_sched_ctrl[UE_id].volte_configured = FALSE;
UE_list->UE_sched_ctrl[UE_id].ul_periodic_timer_exp_flag = FALSE; UE_list->UE_sched_ctrl[UE_id].ul_periodic_timer_exp_flag = FALSE;
UE_list->UE_sched_ctrl[UE_id].rlc_out_of_resources_cnt = 0;
pthread_mutex_init(&UE_list->UE_sched_ctrl[UE_id].rlc_out_of_resources_lock, NULL);
for (j = 0; j < 8; j++) { for (j = 0; j < 8; j++) {
UE_list->UE_template[cc_idP][UE_id].oldNDI[j][TB1] = (j == 0) ? 1 : 0; // 1 because first transmission is with format1A (Msg4) for harq_pid 0 UE_list->UE_template[cc_idP][UE_id].oldNDI[j][TB1] = (j == 0) ? 1 : 0; // 1 because first transmission is with format1A (Msg4) for harq_pid 0
UE_list->UE_template[cc_idP][UE_id].oldNDI[j][TB2] = 1; UE_list->UE_template[cc_idP][UE_id].oldNDI[j][TB2] = 1;
......
...@@ -1111,6 +1111,8 @@ typedef struct { ...@@ -1111,6 +1111,8 @@ typedef struct {
uint8_t select_tb[NFAPI_CC_MAX][MAX_HARQ_PID]; uint8_t select_tb[NFAPI_CC_MAX][MAX_HARQ_PID];
uint8_t swap_flag[NFAPI_CC_MAX][MAX_HARQ_PID]; uint8_t swap_flag[NFAPI_CC_MAX][MAX_HARQ_PID];
uint8_t rsn[NFAPI_CC_MAX][MAX_HARQ_PID][MAX_NUM_TB]; uint8_t rsn[NFAPI_CC_MAX][MAX_HARQ_PID][MAX_NUM_TB];
uint32_t rlc_out_of_resources_cnt;
pthread_mutex_t rlc_out_of_resources_lock;
} UE_sched_ctrl_t; } UE_sched_ctrl_t;
/*! \brief eNB template for the Random access information */ /*! \brief eNB template for the Random access information */
......
...@@ -124,6 +124,7 @@ boolean_t pdcp_data_req( ...@@ -124,6 +124,7 @@ boolean_t pdcp_data_req(
hashtable_rc_t h_rc; hashtable_rc_t h_rc;
uint8_t rb_offset= (srb_flagP == 0) ? DTCH -1 : 0; uint8_t rb_offset= (srb_flagP == 0) ? DTCH -1 : 0;
uint16_t pdcp_uid=0; uint16_t pdcp_uid=0;
int UE_id = -1;
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PDCP_DATA_REQ,VCD_FUNCTION_IN); VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PDCP_DATA_REQ,VCD_FUNCTION_IN);
CHECK_CTXT_ARGS(ctxt_pP); CHECK_CTXT_ARGS(ctxt_pP);
#if T_TRACER #if T_TRACER
...@@ -398,7 +399,13 @@ boolean_t pdcp_data_req( ...@@ -398,7 +399,13 @@ boolean_t pdcp_data_req(
break; break;
case RLC_OP_STATUS_OUT_OF_RESSOURCES: case RLC_OP_STATUS_OUT_OF_RESSOURCES:
LOG_W(PDCP, "Data sending request over RLC failed with 'Out of Resources' reason!\n"); UE_id = find_UE_id(ctxt_pP->module_id, ctxt_pP->rnti);
if(UE_id != -1){
pthread_mutex_lock(&(RC.mac[ctxt_pP->module_id]->UE_list.UE_sched_ctrl[UE_id].rlc_out_of_resources_lock));
RC.mac[ctxt_pP->module_id]->UE_list.UE_sched_ctrl[UE_id].rlc_out_of_resources_cnt++;
pthread_mutex_unlock(&(RC.mac[ctxt_pP->module_id]->UE_list.UE_sched_ctrl[UE_id].rlc_out_of_resources_lock));
}
LOG_D(PDCP, "Data sending request over RLC failed with 'Out of Resources' reason!\n");
ret= FALSE; ret= FALSE;
break; break;
...@@ -457,7 +464,13 @@ boolean_t pdcp_data_req( ...@@ -457,7 +464,13 @@ boolean_t pdcp_data_req(
break; break;
case RLC_OP_STATUS_OUT_OF_RESSOURCES: case RLC_OP_STATUS_OUT_OF_RESSOURCES:
LOG_W(PDCP, "Data sending request over RLC failed with 'Out of Resources' reason!\n"); UE_id = find_UE_id(ctxt_pP->module_id, ctxt_pP->rnti);
if(UE_id != -1){
pthread_mutex_lock(&(RC.mac[ctxt_pP->module_id]->UE_list.UE_sched_ctrl[UE_id].rlc_out_of_resources_lock));
RC.mac[ctxt_pP->module_id]->UE_list.UE_sched_ctrl[UE_id].rlc_out_of_resources_cnt++;
pthread_mutex_unlock(&(RC.mac[ctxt_pP->module_id]->UE_list.UE_sched_ctrl[UE_id].rlc_out_of_resources_lock));
}
LOG_D(PDCP, "Data sending request over RLC failed with 'Out of Resources' reason!\n");
ret= FALSE; ret= FALSE;
break; break;
......
...@@ -471,16 +471,14 @@ rlc_op_status_t rlc_data_req (const protocol_ctxt_t *const ctxt_pP, ...@@ -471,16 +471,14 @@ rlc_op_status_t rlc_data_req (const protocol_ctxt_t *const ctxt_pP,
break; break;
case RLC_MODE_UM: case RLC_MODE_UM:
#if 0
/* TODO: this is a hack, needs better solution. Let's not use too /* TODO: this is a hack, needs better solution. Let's not use too
* much memory and store at maximum 5 millions bytes. * much memory and store at maximum 5 millions bytes.
*/ */
/* look for HACK_RLC_UM_LIMIT for others places related to the hack. Please do not remove this comment. */ /* look for HACK_RLC_UM_LIMIT for others places related to the hack. Please do not remove this comment. */
if (rlc_um_get_buffer_occupancy(&rlc_union_p->rlc.um) > 5000000) { if (rlc_um_get_buffer_occupancy(&rlc_union_p->rlc.um) > 32000000) {
free_mem_block(sdu_pP, __func__); free_mem_block(sdu_pP, __func__);
return RLC_OP_STATUS_OUT_OF_RESSOURCES; return RLC_OP_STATUS_OUT_OF_RESSOURCES;
} }
#endif
new_sdu_p = get_free_mem_block (sdu_sizeP + sizeof (struct rlc_um_data_req_alloc), __func__); new_sdu_p = get_free_mem_block (sdu_sizeP + sizeof (struct rlc_um_data_req_alloc), __func__);
if (new_sdu_p != NULL) { if (new_sdu_p != NULL) {
......
...@@ -458,7 +458,7 @@ NwGtpv1uRcT gtpv1u_eNB_process_stack_req( ...@@ -458,7 +458,7 @@ NwGtpv1uRcT gtpv1u_eNB_process_stack_req(
if (ctxt.configured == FALSE ) if (ctxt.configured == FALSE )
LOG_W(GTPU, "PDCP data request failed, cause: [UE:%x]RB is not configured!\n", ctxt.rnti) ; LOG_W(GTPU, "PDCP data request failed, cause: [UE:%x]RB is not configured!\n", ctxt.rnti) ;
else else
LOG_W(GTPU, "PDCP data request failed\n"); LOG_D(GTPU, "PDCP data request failed\n");
return NW_GTPV1U_FAILURE; return NW_GTPV1U_FAILURE;
} }
......
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