Commit c2058d17 authored by Haruki NAOI's avatar Haruki NAOI

Fix: MACSCD performance improvement. (decode Msg3 on RRC_task)

parent 2c4dc473
......@@ -1236,20 +1236,65 @@ generate_Msg4(module_id_t module_idP,
}
} // CCE Allocation feasible
} else {
LOG_I(MAC,
"eNB %d][RAPROC] CC_id %d Frame %d, subframeP %d: Delaying Msg4 for RRC Piggyback (RNTI %x)\n",
module_idP, CC_idP, frameP, subframeP, ra->rnti);
ra->Msg4_subframe ++;
ra->Msg4_delay_cnt++;
if (ra->Msg4_delay_cnt==10){
fill_nfapi_rnti_release(module_idP, ra->rnti);
put_UE_in_freelist(module_idP,ra->rnti,0);
cancel_ra_proc(module_idP, CC_idP, frameP, ra->rnti);
}else{
if(mac->common_channels[CC_idP].tdd_Config != NULL) {
switch(mac->common_channels[CC_idP].tdd_Config->subframeAssignment) {
case 1:
if((ra->Msg4_subframe == 0) || (ra->Msg4_subframe == 5)){
ra->Msg4_subframe = ra->Msg4_subframe+4;
}
else if((ra->Msg4_subframe == 4) || (ra->Msg4_subframe == 9))
{
if(ra->Msg4_subframe == 9){
ra->Msg4_frame++;
ra->Msg4_frame&=1023;
}
ra->Msg4_subframe = (ra->Msg4_subframe+1)%10;
}
break;
if (ra->Msg4_delay_cnt==10) cancel_ra_proc(module_idP, CC_idP, frameP, ra->rnti);
case 2:
if((ra->Msg4_subframe == 0) || (ra->Msg4_subframe == 5)){
ra->Msg4_subframe = ra->Msg4_subframe+3;
}
else if((ra->Msg4_subframe == 3) || (ra->Msg4_subframe == 8))
{
ra->Msg4_subframe = ra->Msg4_subframe+1;
}
else if((ra->Msg4_subframe == 4) || (ra->Msg4_subframe == 9))
{
if(ra->Msg4_subframe == 9){
ra->Msg4_frame++;
ra->Msg4_frame&=1023;
}
ra->Msg4_subframe = (ra->Msg4_subframe+1)%10;
}
break;
default:
printf("%s:%d: TODO\n", __FILE__, __LINE__);
abort();
// TODO need to be complete for other tdd configs.
}
} else {
ra->Msg4_subframe ++;
if (ra->Msg4_subframe == 10) {
ra->Msg4_frame++;
ra->Msg4_frame&=1023;
ra->Msg4_subframe = 0;
}
}
}
LOG_I(MAC,
"eNB %d][RAPROC] CC_id %d Frame %d, subframeP %d: Delaying Msg4 for RRC Piggyback (RNTI %x) Msg4 frame %d subframe %d\n",
module_idP, CC_idP, frameP, subframeP, ra->rnti, ra->Msg4_frame, ra->Msg4_subframe);
}
} // msg4 frame/subframe
} // else rach_resource_type
}
......
......@@ -335,10 +335,17 @@ mac_rrc_data_ind(
rrc_eNB_decode_ccch(&ctxt, Srb_info, CC_id);
}*/
if (sdu_lenP > 0) {
if (rrc_eNB_decode_ccch(&ctxt, sduP, sdu_lenP, CC_id) == -1) {
LOG_E(RRC, "rrc_eNB_decode_ccch failed\n");
return -2;
}
MessageDef *message_p;
message_p = itti_alloc_new_message (TASK_MAC_ENB, RRC_MAC_CCCH_DATA_IND);
RRC_MAC_CCCH_DATA_IND (message_p).frame = frameP;
RRC_MAC_CCCH_DATA_IND (message_p).sub_frame = sub_frameP;
RRC_MAC_CCCH_DATA_IND (message_p).enb_index = module_idP;
RRC_MAC_CCCH_DATA_IND (message_p).CC_id = CC_id;
RRC_MAC_CCCH_DATA_IND (message_p).rnti = rntiP;
RRC_MAC_CCCH_DATA_IND (message_p).sdu_size = sdu_lenP;
memset (RRC_MAC_CCCH_DATA_IND (message_p).sdu, 0, CCCH_SDU_SIZE);
memcpy (RRC_MAC_CCCH_DATA_IND (message_p).sdu, sduP, sdu_lenP);
itti_send_msg_to_task (TASK_RRC_ENB, ctxt.instance, message_p);
}
}
......
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