Commit eedc4226 authored by Raymond Knopp's avatar Raymond Knopp

modifications for SRB0 to allow multiple UE contexts in case of delayed CCCH...

modifications for SRB0 to allow multiple UE contexts in case of delayed CCCH reception in CU/DU split (moved SRB0 from carrier to UE context)
parent 6f11dc77
...@@ -832,7 +832,8 @@ generate_Msg4(module_id_t module_idP, int CC_idP, frame_t frameP, ...@@ -832,7 +832,8 @@ generate_Msg4(module_id_t module_idP, int CC_idP, frame_t frameP,
/*rrc_sdu_length = mac_rrc_data_req(module_idP, CC_idP, frameP, CCCH, 1, // 1 transport block /*rrc_sdu_length = mac_rrc_data_req(module_idP, CC_idP, frameP, CCCH, 1, // 1 transport block
&cc[CC_idP].CCCH_pdu.payload[0], ENB_FLAG_YES, module_idP, 0); // not used in this case*/ &cc[CC_idP].CCCH_pdu.payload[0], ENB_FLAG_YES, module_idP, 0); // not used in this case*/
rrc_sdu_length = mac_rrc_data_req(module_idP, CC_idP, frameP, CCCH, 1, // 1 transport block rrc_sdu_length = mac_rrc_data_req(module_idP, CC_idP, frameP, CCCH,
UE_RNTI(module_idP,UE_id),1, // 1 transport block
&cc[CC_idP].CCCH_pdu.payload[0], 0); // not used in this case &cc[CC_idP].CCCH_pdu.payload[0], 0); // not used in this case
LOG_D(MAC, LOG_D(MAC,
...@@ -1017,7 +1018,8 @@ generate_Msg4(module_id_t module_idP, int CC_idP, frame_t frameP, ...@@ -1017,7 +1018,8 @@ generate_Msg4(module_id_t module_idP, int CC_idP, frame_t frameP,
&cc[CC_idP].CCCH_pdu.payload[0], ENB_FLAG_YES, module_idP, 0); // not used in this case*/ &cc[CC_idP].CCCH_pdu.payload[0], ENB_FLAG_YES, module_idP, 0); // not used in this case*/
// check if there's data on the CCCH to send with Msg4 // check if there's data on the CCCH to send with Msg4
rrc_sdu_length = mac_rrc_data_req(module_idP, CC_idP, frameP, CCCH, 1, // 1 transport block rrc_sdu_length = mac_rrc_data_req(module_idP, CC_idP, frameP, CCCH,
UE_RNTI(module_idP,UE_id),1, // 1 transport block
&cc[CC_idP].CCCH_pdu.payload[0], 0); // not used in this case &cc[CC_idP].CCCH_pdu.payload[0], 0); // not used in this case
LOG_D(MAC, LOG_D(MAC,
......
...@@ -193,7 +193,7 @@ schedule_SIB1_BR(module_id_t module_idP, ...@@ -193,7 +193,7 @@ schedule_SIB1_BR(module_id_t module_idP,
n_NB = Sj[((cc->physCellId % N_S_NB) + (i * N_S_NB / m)) % N_S_NB]; n_NB = Sj[((cc->physCellId % N_S_NB) + (i * N_S_NB / m)) % N_S_NB];
bcch_sdu_length = mac_rrc_data_req(module_idP, CC_id, frameP, BCCH_SIB1_BR, 1, &cc->BCCH_BR_pdu[0].payload[0], 0); // not used in this case bcch_sdu_length = mac_rrc_data_req(module_idP, CC_id, frameP, BCCH_SIB1_BR, 0xFFFF, 1, &cc->BCCH_BR_pdu[0].payload[0], 0); // not used in this case
AssertFatal(cc->mib->message.schedulingInfoSIB1_BR_r13 < 19, AssertFatal(cc->mib->message.schedulingInfoSIB1_BR_r13 < 19,
"schedulingInfoSIB1_BR_r13 %d > 18\n", "schedulingInfoSIB1_BR_r13 %d > 18\n",
...@@ -382,7 +382,7 @@ schedule_SI_BR(module_id_t module_idP, frame_t frameP, ...@@ -382,7 +382,7 @@ schedule_SI_BR(module_id_t module_idP, frame_t frameP,
if ((sf_mod_period < si_WindowLength_BR_r13) if ((sf_mod_period < si_WindowLength_BR_r13)
&& ((frameP & (((1 << si_RepetitionPattern_r13) - 1))) == 0)) { // this SIB is to be scheduled && ((frameP & (((1 << si_RepetitionPattern_r13) - 1))) == 0)) { // this SIB is to be scheduled
bcch_sdu_length = mac_rrc_data_req(module_idP, CC_id, frameP, BCCH_SI_BR + i, 1, &cc->BCCH_BR_pdu[i + 1].payload[0], 0); // not used in this case bcch_sdu_length = mac_rrc_data_req(module_idP, CC_id, frameP, BCCH_SI_BR + i, 0xFFFF, 1, &cc->BCCH_BR_pdu[i + 1].payload[0], 0); // not used in this case
AssertFatal(bcch_sdu_length > 0, AssertFatal(bcch_sdu_length > 0,
"RRC returned 0 bytes for SI-BR %d\n", i); "RRC returned 0 bytes for SI-BR %d\n", i);
...@@ -524,7 +524,7 @@ schedule_mib(module_id_t module_idP, frame_t frameP, sub_frame_t subframeP) ...@@ -524,7 +524,7 @@ schedule_mib(module_id_t module_idP, frame_t frameP, sub_frame_t subframeP)
dl_req = &dl_config_request->dl_config_request_body; dl_req = &dl_config_request->dl_config_request_body;
cc = &eNB->common_channels[CC_id]; cc = &eNB->common_channels[CC_id];
mib_sdu_length = mac_rrc_data_req(module_idP, CC_id, frameP, MIBCH, 1, &cc->MIB_pdu.payload[0], 0); // not used in this case mib_sdu_length = mac_rrc_data_req(module_idP, CC_id, frameP, MIBCH, 0xFFFF, 1, &cc->MIB_pdu.payload[0], 0); // not used in this case
LOG_D(MAC, "Frame %d, subframe %d: BCH PDU length %d\n", frameP, subframeP, mib_sdu_length); LOG_D(MAC, "Frame %d, subframe %d: BCH PDU length %d\n", frameP, subframeP, mib_sdu_length);
...@@ -611,7 +611,7 @@ schedule_SI(module_id_t module_idP, frame_t frameP, sub_frame_t subframeP) ...@@ -611,7 +611,7 @@ schedule_SI(module_id_t module_idP, frame_t frameP, sub_frame_t subframeP)
dl_req = &eNB->DL_req[CC_id].dl_config_request_body; dl_req = &eNB->DL_req[CC_id].dl_config_request_body;
bcch_sdu_length = mac_rrc_data_req(module_idP, CC_id, frameP, BCCH, 1, &cc->BCCH_pdu.payload[0], 0); // not used in this case bcch_sdu_length = mac_rrc_data_req(module_idP, CC_id, frameP, BCCH, 0xFFFF,1, &cc->BCCH_pdu.payload[0], 0); // not used in this case
if (bcch_sdu_length > 0) { if (bcch_sdu_length > 0) {
LOG_D(MAC, "[eNB %d] Frame %d : BCCH->DLSCH CC_id %d, Received %d bytes \n", module_idP, frameP, CC_id, bcch_sdu_length); LOG_D(MAC, "[eNB %d] Frame %d : BCCH->DLSCH CC_id %d, Received %d bytes \n", module_idP, frameP, CC_id, bcch_sdu_length);
......
...@@ -731,10 +731,14 @@ schedule_ue_spec(module_id_t module_idP,slice_id_t slice_idP, ...@@ -731,10 +731,14 @@ schedule_ue_spec(module_id_t module_idP,slice_id_t slice_idP,
aggregation = 2; aggregation = 2;
} }
} }
int ccecond = CCE_allocation_infeasible(module_idP, CC_id, 1, subframeP,
aggregation, rnti);
if (!ccecond) {
// check for CCCH
}
/* if (continue_flag != 1 */ /* if (continue_flag != 1 */
if ((ue_sched_ctl->pre_nb_available_rbs[CC_id] == 0) || // no RBs allocated if ((ue_sched_ctl->pre_nb_available_rbs[CC_id] == 0) || // no RBs allocated
CCE_allocation_infeasible(module_idP, CC_id, 1, subframeP, ccecond) {
aggregation, rnti)) {
LOG_D(MAC, LOG_D(MAC,
"[eNB %d] Frame %d : no RB allocated for UE %d on CC_id %d: continue \n", "[eNB %d] Frame %d : no RB allocated for UE %d on CC_id %d: continue \n",
module_idP, frameP, UE_id, CC_id); module_idP, frameP, UE_id, CC_id);
...@@ -1836,7 +1840,7 @@ void schedule_PCH(module_id_t module_idP,frame_t frameP,sub_frame_t subframeP) ...@@ -1836,7 +1840,7 @@ void schedule_PCH(module_id_t module_idP,frame_t frameP,sub_frame_t subframeP)
pcch_sdu_length = mac_rrc_data_req(module_idP, pcch_sdu_length = mac_rrc_data_req(module_idP,
CC_id, CC_id,
frameP, frameP,
PCCH,1, PCCH,0xFFFE,1,
&cc->PCCH_pdu.payload[0], &cc->PCCH_pdu.payload[0],
i); // used for ue index i); // used for ue index
if (pcch_sdu_length == 0) { if (pcch_sdu_length == 0) {
......
...@@ -542,7 +542,7 @@ schedule_MBMS(module_id_t module_idP, uint8_t CC_id, frame_t frameP, ...@@ -542,7 +542,7 @@ schedule_MBMS(module_id_t module_idP, uint8_t CC_id, frame_t frameP,
"[eNB %d] CC_id %d Frame %d Subframe %d: Schedule MCCH MESSAGE (area %d, sfAlloc %d)\n", "[eNB %d] CC_id %d Frame %d Subframe %d: Schedule MCCH MESSAGE (area %d, sfAlloc %d)\n",
module_idP, CC_id, frameP, subframeP, i, j); module_idP, CC_id, frameP, subframeP, i, j);
mcch_sdu_length = mac_rrc_data_req(module_idP, CC_id, frameP, MCCH, 1, &cc->MCCH_pdu.payload[0], mcch_sdu_length = mac_rrc_data_req(module_idP, CC_id, frameP, MCCH, 0xFFFC, 1, &cc->MCCH_pdu.payload[0],
i); // this is the mbsfn sync area index i); // this is the mbsfn sync area index
if (mcch_sdu_length > 0) { if (mcch_sdu_length > 0) {
......
...@@ -39,6 +39,7 @@ mac_rrc_data_req( ...@@ -39,6 +39,7 @@ mac_rrc_data_req(
const int CC_idP, const int CC_idP,
const frame_t frameP, const frame_t frameP,
const rb_id_t srb_idP, const rb_id_t srb_idP,
const rnti_t rntiP,
const uint8_t nb_tbP, const uint8_t nb_tbP,
uint8_t* const buffer_pP, uint8_t* const buffer_pP,
const uint8_t mbsfn_sync_areaP const uint8_t mbsfn_sync_areaP
......
...@@ -53,6 +53,7 @@ mac_rrc_data_req( ...@@ -53,6 +53,7 @@ mac_rrc_data_req(
const int CC_id, const int CC_id,
const frame_t frameP, const frame_t frameP,
const rb_id_t Srb_id, const rb_id_t Srb_id,
const rnti_t rnti,
const uint8_t Nb_tb, const uint8_t Nb_tb,
uint8_t* const buffer_pP, uint8_t* const buffer_pP,
const uint8_t mbsfn_sync_area const uint8_t mbsfn_sync_area
...@@ -105,9 +106,6 @@ mac_rrc_data_req( ...@@ -105,9 +106,6 @@ mac_rrc_data_req(
return (RC.rrc[Mod_idP]->carrier[CC_id].sizeof_SIB1); return (RC.rrc[Mod_idP]->carrier[CC_id].sizeof_SIB1);
} // All RFN mod 8 transmit SIB2-3 in SF 5 } // All RFN mod 8 transmit SIB2-3 in SF 5
else if ((frameP%8) == 1) { else if ((frameP%8) == 1) {
LOG_I(RRC,"Copying SIB23 @ %p to mac %d bytes\n",
RC.rrc[Mod_idP]->carrier[CC_id].SIB23,
RC.rrc[Mod_idP]->carrier[CC_id].sizeof_SIB23);
memcpy(&buffer_pP[0], memcpy(&buffer_pP[0],
RC.rrc[Mod_idP]->carrier[CC_id].SIB23, RC.rrc[Mod_idP]->carrier[CC_id].SIB23,
RC.rrc[Mod_idP]->carrier[CC_id].sizeof_SIB23); RC.rrc[Mod_idP]->carrier[CC_id].sizeof_SIB23);
...@@ -144,14 +142,19 @@ mac_rrc_data_req( ...@@ -144,14 +142,19 @@ mac_rrc_data_req(
} }
if( (Srb_id & RAB_OFFSET ) == CCCH) { if( (Srb_id & RAB_OFFSET ) == CCCH) {
LOG_T(RRC,"[eNB %d] Frame %d CCCH request (Srb_id %d)\n",Mod_idP,frameP, Srb_id);
if(RC.rrc[Mod_idP]->carrier[CC_id].Srb0.Active==0) { struct rrc_eNB_ue_context_s *ue_context_p = rrc_eNB_get_ue_context(RC.rrc[Mod_idP],rnti);
if (ue_context_p == NULL) return(0);
eNB_RRC_UE_t *ue_p = &ue_context_p->ue_context;
LOG_T(RRC,"[eNB %d] Frame %d CCCH request (Srb_id %d, rnti %x)\n",Mod_idP,frameP, Srb_id,rnti);
if(ue_p->Srb0.Active==0) {
LOG_E(RRC,"[eNB %d] CCCH Not active\n",Mod_idP); LOG_E(RRC,"[eNB %d] CCCH Not active\n",Mod_idP);
return -1; return(0);
} }
Srb_info=&RC.rrc[Mod_idP]->carrier[CC_id].Srb0; Srb_info=&ue_p->Srb0;
// check if data is there for MAC // check if data is there for MAC
if(Srb_info->Tx_buffer.payload_size>0) { //Fill buffer if(Srb_info->Tx_buffer.payload_size>0) { //Fill buffer
...@@ -301,15 +304,11 @@ mac_rrc_data_ind( ...@@ -301,15 +304,11 @@ mac_rrc_data_ind(
PROTOCOL_CTXT_SET_BY_MODULE_ID(&ctxt, module_idP, ENB_FLAG_YES, rntiP, frameP, sub_frameP,0); PROTOCOL_CTXT_SET_BY_MODULE_ID(&ctxt, module_idP, ENB_FLAG_YES, rntiP, frameP, sub_frameP,0);
if((srb_idP & RAB_OFFSET) == CCCH) { if((srb_idP & RAB_OFFSET) == CCCH) {
Srb_info = &RC.rrc[module_idP]->carrier[CC_id].Srb0; LOG_D(RRC,"[eNB %d] Received SDU for CCCH on SRB 0\n",module_idP);
LOG_D(RRC,"[eNB %d] Received SDU for CCCH on SRB %d\n",module_idP,Srb_info->Srb_id);
// msg("\n******INST %d Srb_info %p, Srb_id=%d****\n\n",Mod_id,Srb_info,Srb_info->Srb_id); // msg("\n******INST %d Srb_info %p, Srb_id=%d****\n\n",Mod_id,Srb_info,Srb_info->Srb_id);
if (sdu_lenP > 0) { if (sdu_lenP > 0) rrc_eNB_decode_ccch(&ctxt, sduP, sdu_lenP, CC_id);
memcpy(Srb_info->Rx_buffer.Payload,sduP,sdu_lenP);
Srb_info->Rx_buffer.payload_size = sdu_lenP;
rrc_eNB_decode_ccch(&ctxt, Srb_info, CC_id);
}
} }
if((srb_idP & RAB_OFFSET) == DCCH) { if((srb_idP & RAB_OFFSET) == DCCH) {
struct rrc_eNB_ue_context_s* ue_context_p = NULL; struct rrc_eNB_ue_context_s* ue_context_p = NULL;
......
...@@ -671,7 +671,6 @@ typedef struct { ...@@ -671,7 +671,6 @@ typedef struct {
SystemInformationBlockType21_r14_t *sib21; SystemInformationBlockType21_r14_t *sib21;
// End - TTN // End - TTN
SRB_INFO SI; SRB_INFO SI;
SRB_INFO Srb0;
uint8_t *paging[MAX_MOBILES_PER_ENB]; uint8_t *paging[MAX_MOBILES_PER_ENB];
uint32_t sizeof_paging[MAX_MOBILES_PER_ENB]; uint32_t sizeof_paging[MAX_MOBILES_PER_ENB];
} rrc_eNB_carrier_data_t; } rrc_eNB_carrier_data_t;
......
This diff is collapsed.
...@@ -219,13 +219,15 @@ uint8_t rrc_eNB_get_next_transaction_identifier(module_id_t module_idP); ...@@ -219,13 +219,15 @@ uint8_t rrc_eNB_get_next_transaction_identifier(module_id_t module_idP);
/**\brief Entry routine to decode a UL-CCCH-Message. Invokes PER decoder and parses message. /**\brief Entry routine to decode a UL-CCCH-Message. Invokes PER decoder and parses message.
\param ctxt_pP Running context \param ctxt_pP Running context
\param Srb_info Pointer to SRB0 information structure (buffer, etc.)*/ \param buffer Pointer to SDU
int \param buffer_length length of SDU in bytes
rrc_eNB_decode_ccch( \param CC_id component carrier index*/
protocol_ctxt_t* const ctxt_pP,
const SRB_INFO* const Srb_info, int rrc_eNB_decode_ccch(protocol_ctxt_t* const ctxt_pP,
uint8_t *buffer,
int buffer_length,
const int CC_id const int CC_id
); );
/**\brief Entry routine to decode a UL-DCCH-Message. Invokes PER decoder and parses message. /**\brief Entry routine to decode a UL-DCCH-Message. Invokes PER decoder and parses message.
\param ctxt_pP Context \param ctxt_pP Context
...@@ -411,6 +413,7 @@ mac_rrc_data_req( ...@@ -411,6 +413,7 @@ mac_rrc_data_req(
const int CC_id, const int CC_id,
const frame_t frameP, const frame_t frameP,
const rb_id_t Srb_id, const rb_id_t Srb_id,
const rnti_t rnti,
const uint8_t Nb_tb, const uint8_t Nb_tb,
uint8_t* const buffer_pP, uint8_t* const buffer_pP,
const uint8_t mbsfn_sync_area const uint8_t mbsfn_sync_area
......
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