Commit 49352bf1 authored by Vaibhav Shrivastava's avatar Vaibhav Shrivastava

8_1_5_1_1 Passed Commit

parent f5fbde5b
...@@ -386,7 +386,6 @@ int create_gNB_tasks(uint32_t gnb_nb) { ...@@ -386,7 +386,6 @@ int create_gNB_tasks(uint32_t gnb_nb) {
} }
if(itti_create_task(TASK_VTP, ss_gNB_vtp_task, NULL) < 0) { if(itti_create_task(TASK_VTP, ss_gNB_vtp_task, NULL) < 0) {
LOG_E(SCTP, "Create task for TASK_VTP failed\n"); LOG_E(SCTP, "Create task for TASK_VTP failed\n");
return -1; return -1;
......
...@@ -2054,7 +2054,6 @@ uint64_t from_nrarfcn(int nr_bandP, ...@@ -2054,7 +2054,6 @@ uint64_t from_nrarfcn(int nr_bandP,
} }
} }
LOG_D(NR_MAC, "swetank: nrarfcn:%d nr_table_index:%d\n", nrarfcn, i);
LOG_D(NR_MAC, "Frequency from NR-ARFCN for N_OFFs %lu, duplex spacing %d KHz, deltaFglobal %d KHz\n", N_OFFs, delta_duplex, deltaFglobal); LOG_D(NR_MAC, "Frequency from NR-ARFCN for N_OFFs %lu, duplex spacing %d KHz, deltaFglobal %d KHz\n", N_OFFs, delta_duplex, deltaFglobal);
AssertFatal(nrarfcn >= N_OFFs,"nrarfcn %u < N_OFFs[%d] %llu\n", nrarfcn, nr_bandtable[i].band, (long long unsigned int)N_OFFs); AssertFatal(nrarfcn >= N_OFFs,"nrarfcn %u < N_OFFs[%d] %llu\n", nrarfcn, nr_bandtable[i].band, (long long unsigned int)N_OFFs);
...@@ -3510,17 +3509,6 @@ void get_type0_PDCCH_CSS_config_parameters(NR_Type0_PDCCH_CSS_config_t *type0_PD ...@@ -3510,17 +3509,6 @@ void get_type0_PDCCH_CSS_config_parameters(NR_Type0_PDCCH_CSS_config_t *type0_PD
type0_PDCCH_CSS_config->num_rbs = -1; type0_PDCCH_CSS_config->num_rbs = -1;
type0_PDCCH_CSS_config->num_symbols = -1; type0_PDCCH_CSS_config->num_symbols = -1;
type0_PDCCH_CSS_config->rb_offset = -1; type0_PDCCH_CSS_config->rb_offset = -1;
LOG_D(NR_MAC,"swetank: NR_SubcarrierSpacing_kHz30 %d, scs_ssb %d, scs_pdcch %d, min_chan_bw %d\n",(int)NR_SubcarrierSpacing_kHz30,(int)scs_ssb,(int)scs_pdcch,min_channel_bw);
LOG_D(NR_MAC,"swetank: fxn:%s pdcch_ConfigSIB1.controlResourceSetZero:%d pdcch_ConfigSIB1.searchSpaceZero:%d\n", __FUNCTION__, mib->pdcch_ConfigSIB1.controlResourceSetZero, mib->pdcch_ConfigSIB1.searchSpaceZero);
LOG_D(NR_MAC,"swetank: fxn:%s num_slot_per_frame:%d ssb_subcarrier_offset:%d ssb_start_symbol:%d frequency_range:%d ssb_index:%d ssb_period:%d \n",
__FUNCTION__,
num_slot_per_frame,
ssb_subcarrier_offset,
ssb_start_symbol,
frequency_range,
ssb_index,
ssb_period
);
// type0-pdcch coreset // type0-pdcch coreset
switch( ((int)scs_ssb << 3) | (int)scs_pdcch ){ switch( ((int)scs_ssb << 3) | (int)scs_pdcch ){
...@@ -3839,7 +3827,6 @@ void get_type0_PDCCH_CSS_config_parameters(NR_Type0_PDCCH_CSS_config_t *type0_PD ...@@ -3839,7 +3827,6 @@ void get_type0_PDCCH_CSS_config_parameters(NR_Type0_PDCCH_CSS_config_t *type0_PD
type0_PDCCH_CSS_config->n_0 = ((uint32_t)(big_o*(1<<scs_pdcch)) + (uint32_t)(type0_PDCCH_CSS_config->ssb_index*big_m))%num_slot_per_frame; type0_PDCCH_CSS_config->n_0 = ((uint32_t)(big_o*(1<<scs_pdcch)) + (uint32_t)(type0_PDCCH_CSS_config->ssb_index*big_m))%num_slot_per_frame;
type0_PDCCH_CSS_config->cset_start_rb = ssb_offset_point_a - type0_PDCCH_CSS_config->rb_offset; type0_PDCCH_CSS_config->cset_start_rb = ssb_offset_point_a - type0_PDCCH_CSS_config->rb_offset;
LOG_E(NR_MAC,"swetank: fxn:%s cset_start_rb:%d ssb_offset_point_a:%d rb_offset:%d \n", __FUNCTION__, type0_PDCCH_CSS_config->cset_start_rb, ssb_offset_point_a, type0_PDCCH_CSS_config->rb_offset);
} }
......
...@@ -1210,30 +1210,26 @@ void nr_generate_Msg2(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra ...@@ -1210,30 +1210,26 @@ void nr_generate_Msg2(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra
bwp = ra->CellGroup->spCellConfig->spCellConfigDedicated->downlinkBWP_ToAddModList->list.array[ra->bwp_id-1]; bwp = ra->CellGroup->spCellConfig->spCellConfigDedicated->downlinkBWP_ToAddModList->list.array[ra->bwp_id-1];
genericParameters = &bwp->bwp_Common->genericParameters; genericParameters = &bwp->bwp_Common->genericParameters;
pdsch_TimeDomainAllocationList = bwp->bwp_Common->pdsch_ConfigCommon->choice.setup->pdsch_TimeDomainAllocationList; pdsch_TimeDomainAllocationList = bwp->bwp_Common->pdsch_ConfigCommon->choice.setup->pdsch_TimeDomainAllocationList;
LOG_D(NR_MAC, "swetank: fxn:%s line:%d \n", __FUNCTION__, __LINE__);
} }
else { else {
genericParameters= &scc->downlinkConfigCommon->initialDownlinkBWP->genericParameters; genericParameters= &scc->downlinkConfigCommon->initialDownlinkBWP->genericParameters;
pdsch_TimeDomainAllocationList = scc->downlinkConfigCommon->initialDownlinkBWP->pdsch_ConfigCommon->choice.setup->pdsch_TimeDomainAllocationList; pdsch_TimeDomainAllocationList = scc->downlinkConfigCommon->initialDownlinkBWP->pdsch_ConfigCommon->choice.setup->pdsch_TimeDomainAllocationList;
LOG_D(NR_MAC, "swetank: fxn:%s line:%d \n", __FUNCTION__, __LINE__);
} }
long BWPStart = 0; long BWPStart = 0;
long BWPSize = 0; long BWPSize = 0;
NR_Type0_PDCCH_CSS_config_t *type0_PDCCH_CSS_config = NULL; NR_Type0_PDCCH_CSS_config_t *type0_PDCCH_CSS_config = NULL;
LOG_D(NR_MAC, "swetank: controlResourceSetId:%d locationAndBandwidth:%d genericParameters.locationAndBandwidth:%d \n", LOG_D(NR_MAC, "controlResourceSetId:%d locationAndBandwidth:%d genericParameters.locationAndBandwidth:%d \n",
*ss->controlResourceSetId, *ss->controlResourceSetId,
genericParameters->locationAndBandwidth, genericParameters->locationAndBandwidth,
scc->downlinkConfigCommon->initialDownlinkBWP->genericParameters.locationAndBandwidth); scc->downlinkConfigCommon->initialDownlinkBWP->genericParameters.locationAndBandwidth);
if(*ss->controlResourceSetId!=0) { if(*ss->controlResourceSetId!=0) {
BWPStart = NRRIV2PRBOFFSET(genericParameters->locationAndBandwidth, MAX_BWP_SIZE); BWPStart = NRRIV2PRBOFFSET(genericParameters->locationAndBandwidth, MAX_BWP_SIZE);
BWPSize = NRRIV2BW(scc->downlinkConfigCommon->initialDownlinkBWP->genericParameters.locationAndBandwidth, MAX_BWP_SIZE); BWPSize = NRRIV2BW(scc->downlinkConfigCommon->initialDownlinkBWP->genericParameters.locationAndBandwidth, MAX_BWP_SIZE);
LOG_D(NR_MAC, "swetank: BWPStart:%d BWPSize:%d\n", BWPStart, BWPSize);
} else { } else {
type0_PDCCH_CSS_config = &nr_mac->type0_PDCCH_CSS_config[ra->beam_id]; type0_PDCCH_CSS_config = &nr_mac->type0_PDCCH_CSS_config[ra->beam_id];
BWPStart = type0_PDCCH_CSS_config->cset_start_rb; BWPStart = type0_PDCCH_CSS_config->cset_start_rb;
BWPSize = type0_PDCCH_CSS_config->num_rbs; BWPSize = type0_PDCCH_CSS_config->num_rbs;
LOG_D(NR_MAC, "swetank: BWPStart:%d BWPSize:%d beam_id:%d \n", BWPStart, BWPSize, ra->beam_id);
} }
if (RC.ss.mode == SS_SOFTMODEM) if (RC.ss.mode == SS_SOFTMODEM)
...@@ -1249,7 +1245,6 @@ void nr_generate_Msg2(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra ...@@ -1249,7 +1245,6 @@ void nr_generate_Msg2(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra
AssertFatal(coreset!=NULL,"Coreset cannot be null for RA-Msg2\n"); AssertFatal(coreset!=NULL,"Coreset cannot be null for RA-Msg2\n");
LOG_D(NR_MAC, "swetank: BWPStart:%d rbStart:%d rbSize:%d BWPSize:%d startSymbolIndex:%d nrOfSymbols:%d \n", BWPStart, rbStart, rbSize, BWPSize, nrOfSymbols);
uint16_t *vrb_map = cc[CC_id].vrb_map; uint16_t *vrb_map = cc[CC_id].vrb_map;
for (int i = 0; (i < rbSize) && (rbStart <= (BWPSize - rbSize)); i++) { for (int i = 0; (i < rbSize) && (rbStart <= (BWPSize - rbSize)); i++) {
if (vrb_map[BWPStart + rbStart + i]&SL_to_bitmap(startSymbolIndex, nrOfSymbols)) { if (vrb_map[BWPStart + rbStart + i]&SL_to_bitmap(startSymbolIndex, nrOfSymbols)) {
...@@ -1710,7 +1705,7 @@ void nr_generate_Msg4(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra ...@@ -1710,7 +1705,7 @@ void nr_generate_Msg4(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra
rbSize, nrOfSymbols, N_PRB_DMRS * N_DMRS_SLOT, 0, tb_scaling,1) >> 3; rbSize, nrOfSymbols, N_PRB_DMRS * N_DMRS_SLOT, 0, tb_scaling,1) >> 3;
} while (harq->tb_size < ra->mac_pdu_length && mcsIndex<=28); } while (harq->tb_size < ra->mac_pdu_length && mcsIndex<=28);
LOG_D(NR_MAC, "swetank: rbSize:%d rbStart:%d BWPSize:%d BWPStart:%d startSymbolIndex:%d nrOfSymbols:%d\n", LOG_D(NR_MAC, "rbSize:%d rbStart:%d BWPSize:%d BWPStart:%d startSymbolIndex:%d nrOfSymbols:%d\n",
rbSize, rbSize,
rbStart, rbStart,
BWPSize, BWPSize,
......
...@@ -383,7 +383,7 @@ uint32_t schedule_control_sib1(module_id_t module_id, ...@@ -383,7 +383,7 @@ uint32_t schedule_control_sib1(module_id_t module_id,
// if (RC.ss.mode >= SS_SOFTMODEM) // if (RC.ss.mode >= SS_SOFTMODEM)
// gNB_mac->sched_ctrlCommon->cce_index = 0; // gNB_mac->sched_ctrlCommon->cce_index = 0;
LOG_D(MAC,"swetank: cce_index: %d\n", gNB_mac->sched_ctrlCommon->cce_index); LOG_D(MAC,"cce_index: %d\n", gNB_mac->sched_ctrlCommon->cce_index);
AssertFatal(gNB_mac->sched_ctrlCommon->cce_index >= 0, "Could not find CCE for coreset0\n"); AssertFatal(gNB_mac->sched_ctrlCommon->cce_index >= 0, "Could not find CCE for coreset0\n");
const uint16_t bwpSize = type0_PDCCH_CSS_config->num_rbs; const uint16_t bwpSize = type0_PDCCH_CSS_config->num_rbs;
...@@ -452,11 +452,6 @@ uint32_t schedule_control_sib1(module_id_t module_id, ...@@ -452,11 +452,6 @@ uint32_t schedule_control_sib1(module_id_t module_id,
LOG_D(MAC,"N_PRB_DMRS = %d\n",N_PRB_DMRS); LOG_D(MAC,"N_PRB_DMRS = %d\n",N_PRB_DMRS);
LOG_D(MAC,"mappingtype = %d\n", mappingtype); LOG_D(MAC,"mappingtype = %d\n", mappingtype);
// Mark the corresponding RBs as used */ // Mark the corresponding RBs as used */
LOG_D(NR_MAC, "swetank: CC_id:%d gNB_mac->sched_ctrlCommon->cce_index:%d aggregation_level:%d sched_pdsch.rbSize:%d \n",
CC_id,
gNB_mac->sched_ctrlCommon->cce_index,
gNB_mac->sched_ctrlCommon->aggregation_level,
gNB_mac->sched_ctrlCommon->sched_pdsch.rbSize);
fill_pdcch_vrb_map(gNB_mac, fill_pdcch_vrb_map(gNB_mac,
CC_id, CC_id,
&gNB_mac->sched_ctrlCommon->sched_pdcch, &gNB_mac->sched_ctrlCommon->sched_pdcch,
...@@ -614,7 +609,6 @@ void schedule_nr_sib1(module_id_t module_idP, frame_t frameP, sub_frame_t slotP) ...@@ -614,7 +609,6 @@ void schedule_nr_sib1(module_id_t module_idP, frame_t frameP, sub_frame_t slotP)
int time_domain_allocation = gNB_mac->sib1_tda; int time_domain_allocation = gNB_mac->sib1_tda;
LOG_D(NR_MAC, "swetank: scc->ssb_PositionsInBurst->present:%d\n", scc->ssb_PositionsInBurst->present);
int L_max; int L_max;
switch (scc->ssb_PositionsInBurst->present) { switch (scc->ssb_PositionsInBurst->present) {
case 1: case 1:
......
...@@ -404,18 +404,6 @@ int find_pdcch_candidate(gNB_MAC_INST *mac, ...@@ -404,18 +404,6 @@ int find_pdcch_candidate(gNB_MAC_INST *mac,
const int L = pdcch->RegBundleSize; const int L = pdcch->RegBundleSize;
const int C = R>0 ? N_regs/(L*R) : 0; const int C = R>0 ? N_regs/(L*R) : 0;
const int B_rb = L/N_symb; // nb of RBs occupied by each REG bundle const int B_rb = L/N_symb; // nb of RBs occupied by each REG bundle
LOG_D(NR_MAC,"swetank: cc_id:%d aggregation:%d nr_of_candidates:%d N_rb:%d N_symb:%d N_regs:%d N_cces%d R:%d L:%d C:%d B_rb:%d :\n",
cc_id,
aggregation,
nr_of_candidates,
N_rb,
N_symb,
N_regs,
N_cces,
R,
L,
C,
B_rb);
// loop over all the available candidates // loop over all the available candidates
// this implements TS 38.211 Sec. 7.3.2.2 // this implements TS 38.211 Sec. 7.3.2.2
...@@ -425,10 +413,8 @@ int find_pdcch_candidate(gNB_MAC_INST *mac, ...@@ -425,10 +413,8 @@ int find_pdcch_candidate(gNB_MAC_INST *mac,
for (int j=first_cce; (j<first_cce+aggregation) && !taken; j++) { // loop over CCEs for (int j=first_cce; (j<first_cce+aggregation) && !taken; j++) { // loop over CCEs
for (int k=6*j/L; (k<(6*j/L+6/L)) && !taken; k++) { // loop over REG bundles for (int k=6*j/L; (k<(6*j/L+6/L)) && !taken; k++) { // loop over REG bundles
int f = cce_to_reg_interleaving(R, k, pdcch->ShiftIndex, C, L, N_regs); int f = cce_to_reg_interleaving(R, k, pdcch->ShiftIndex, C, L, N_regs);
LOG_D(NR_MAC,"swetank: pdcch->ShiftIndex:%d\n", pdcch->ShiftIndex);
for(int rb=0; rb<B_rb; rb++) { // loop over the RBs of the bundle for(int rb=0; rb<B_rb; rb++) { // loop over the RBs of the bundle
if(vrb_map[pdcch->BWPStart + f*B_rb + rb]&SL_to_bitmap(pdcch->StartSymbolIndex,N_symb)) { if(vrb_map[pdcch->BWPStart + f*B_rb + rb]&SL_to_bitmap(pdcch->StartSymbolIndex,N_symb)) {
LOG_D(NR_MAC,"swetank: pdcch->BWPStart:%d pdcch->StartSymbolIndex:%d \n", pdcch->BWPStart, pdcch->StartSymbolIndex);
taken = true; taken = true;
break; break;
} }
...@@ -442,10 +428,8 @@ int find_pdcch_candidate(gNB_MAC_INST *mac, ...@@ -442,10 +428,8 @@ int find_pdcch_candidate(gNB_MAC_INST *mac,
m = 0; m = 0;
first_cce = 0; first_cce = 0;
} }
LOG_D(NR_MAC,"swetank: taken:%d m:%d \n", taken, m);
if(!taken){ if(!taken){
mac->pdcch_cand[coreset->controlResourceSetId] = m++; // using candidate m, next available is m+1 mac->pdcch_cand[coreset->controlResourceSetId] = m++; // using candidate m, next available is m+1
LOG_D(NR_MAC,"swetank: coreset->controlResourceSetId:%d mac->pdcch_cand[coreset->controlResourceSetId]:%d\n", coreset->controlResourceSetId, mac->pdcch_cand[coreset->controlResourceSetId]);
return first_cce; return first_cce;
} }
} }
......
...@@ -754,7 +754,7 @@ static void deliver_sdu_srb(void *_ue, nr_pdcp_entity_t *entity, ...@@ -754,7 +754,7 @@ static void deliver_sdu_srb(void *_ue, nr_pdcp_entity_t *entity,
srb_found: srb_found:
{ {
LOG_I(PDCP,"PDCP Sending DCCH PDU_IND to SS \n"); LOG_I(PDCP,"PDCP Sending DCCH_PDU_IND/SS_NRRRC_PDU_IND (msg_Id:%d) to TASK_SS_SRB \n", SS_NRRRC_PDU_IND);
MessageDef *message_p = itti_alloc_new_message (TASK_SS_SRB, 0, SS_NRRRC_PDU_IND); MessageDef *message_p = itti_alloc_new_message (TASK_SS_SRB, 0, SS_NRRRC_PDU_IND);
if (message_p) { if (message_p) {
/* Populate the message and send to SS */ /* Populate the message and send to SS */
...@@ -768,7 +768,7 @@ static void deliver_sdu_srb(void *_ue, nr_pdcp_entity_t *entity, ...@@ -768,7 +768,7 @@ static void deliver_sdu_srb(void *_ue, nr_pdcp_entity_t *entity,
int send_res = itti_send_msg_to_task (TASK_SS_SRB, 0, message_p); int send_res = itti_send_msg_to_task (TASK_SS_SRB, 0, message_p);
if(send_res < 0) { if(send_res < 0) {
LOG_E(PDCP,"Error in itti_send_msg_to_task"); LOG_E(PDCP,"Error in sending DCCH_PDU_IND/SS_NRRRC_PDU_IND(msg_Id:%d) to TASK_SS_SRB\n", SS_NRRRC_PDU_IND);
} }
} }
} }
......
...@@ -342,7 +342,7 @@ mac_rrc_data_ind( ...@@ -342,7 +342,7 @@ mac_rrc_data_ind(
//#ifdef ENB_SS //#ifdef ENB_SS
if (RC.ss.mode >= SS_SOFTMODEM && RC.ss.State >= SS_STATE_CELL_ACTIVE) if (RC.ss.mode >= SS_SOFTMODEM && RC.ss.State >= SS_STATE_CELL_ACTIVE)
{ {
LOG_I(RRC,"RRC Sending CCCH PDU_IND to SS \n"); LOG_I(RRC,"RRC Sending CCCH PDU_IND/SS_RRC_PDU_IND(msg_Id:%d) to TASK_SS_SRB \n", SS_RRC_PDU_IND);
MessageDef *message_p = itti_alloc_new_message (TASK_RRC_ENB, 0, SS_RRC_PDU_IND); MessageDef *message_p = itti_alloc_new_message (TASK_RRC_ENB, 0, SS_RRC_PDU_IND);
if (message_p) { if (message_p) {
/* Populate the message to SS */ /* Populate the message to SS */
...@@ -357,7 +357,7 @@ mac_rrc_data_ind( ...@@ -357,7 +357,7 @@ mac_rrc_data_ind(
int send_res = itti_send_msg_to_task (TASK_SS_SRB, 0, message_p); int send_res = itti_send_msg_to_task (TASK_SS_SRB, 0, message_p);
if(send_res < 0) { if(send_res < 0) {
LOG_E(RRC,"Error in itti_send_msg_to_task"); LOG_E(RRC,"Error in ending PDU_IND/SS_RRC_PDU_IND(msg_Id:%d) to TASK_SS_SRB\n", SS_RRC_PDU_IND);
} }
} }
} }
......
...@@ -125,7 +125,7 @@ rrc_data_ind( ...@@ -125,7 +125,7 @@ rrc_data_ind(
//#ifdef ENB_SS //#ifdef ENB_SS
if (RC.ss.mode >= SS_SOFTMODEM && RC.ss.State >= SS_STATE_CELL_ACTIVE) if (RC.ss.mode >= SS_SOFTMODEM && RC.ss.State >= SS_STATE_CELL_ACTIVE)
{ {
LOG_I(RRC,"L2 Interface Sending DCCH PDU_IND to SS \n"); LOG_I(RRC,"L2 Interface Sending DCCH PDU_IND /SS_RRC_PDU_IND (msg_Id:%d )to TASK_SS_SRB\n", SS_RRC_PDU_IND);
MessageDef *message_p = itti_alloc_new_message (TASK_RRC_ENB, 0, SS_RRC_PDU_IND); MessageDef *message_p = itti_alloc_new_message (TASK_RRC_ENB, 0, SS_RRC_PDU_IND);
if (message_p) { if (message_p) {
/* Populate the message and send to SS */ /* Populate the message and send to SS */
...@@ -143,7 +143,7 @@ rrc_data_ind( ...@@ -143,7 +143,7 @@ rrc_data_ind(
int send_res = itti_send_msg_to_task (TASK_SS_SRB, 0, message_p); int send_res = itti_send_msg_to_task (TASK_SS_SRB, 0, message_p);
if(send_res < 0) { if(send_res < 0) {
LOG_E(RRC,"Error in itti_send_msg_to_task"); LOG_E(RRC,"Error in sending PDU_IND /SS_RRC_PDU_IND (msg_Id:%d )to TASK_SS_SRB\n", SS_RRC_PDU_IND);
} }
} }
} }
......
...@@ -353,7 +353,8 @@ int8_t nr_mac_rrc_data_ind(const module_id_t module_idP, ...@@ -353,7 +353,8 @@ int8_t nr_mac_rrc_data_ind(const module_id_t module_idP,
LOG_D(NR_RRC, "[gNB %d] Received SDU for CCCH on SRB %ld\n", module_idP, srb_idP); LOG_D(NR_RRC, "[gNB %d] Received SDU for CCCH on SRB %ld\n", module_idP, srb_idP);
ctxt.brOption = brOption; ctxt.brOption = brOption;
if (sdu_lenP > 0) { if (sdu_lenP > 0) {
LOG_I(RRC,"RRC Sending CCCH PDU_IND to SS @ [SFN: %d, SF: %d] \n", ctxt.frame, ctxt.subframe); LOG_I(NR_RRC,"NRRRC Sending CCCH_PDU_IND/SS_NRRRC_PDU_IND to TASK_SS_SRB (msg_Id:%d) [SFN: %d, SF: %d] \n",
SS_NRRRC_PDU_IND, ctxt.frame, ctxt.subframe);
MessageDef *message_p = itti_alloc_new_message (TASK_SS_SRB, INSTANCE_DEFAULT, SS_NRRRC_PDU_IND); MessageDef *message_p = itti_alloc_new_message (TASK_SS_SRB, INSTANCE_DEFAULT, SS_NRRRC_PDU_IND);
if (message_p) { if (message_p) {
/* Populate the message to SS */ /* Populate the message to SS */
...@@ -367,7 +368,7 @@ int8_t nr_mac_rrc_data_ind(const module_id_t module_idP, ...@@ -367,7 +368,7 @@ int8_t nr_mac_rrc_data_ind(const module_id_t module_idP,
int send_res = itti_send_msg_to_task (TASK_SS_SRB, INSTANCE_DEFAULT, message_p); int send_res = itti_send_msg_to_task (TASK_SS_SRB, INSTANCE_DEFAULT, message_p);
if(send_res < 0) { if(send_res < 0) {
LOG_E(RRC,"Error in itti_send_msg_to_task"); LOG_E(RRC,"Error in sending CCCH_PDU_IND/SS_NRRRC_PDU_IND to TASK_SS_SRB (msg_Id:%d) to TASK_SS_SRB\n", SS_NRRRC_PDU_IND);
} }
} }
nr_rrc_gNB_decode_ccch(&ctxt, sduP, sdu_lenP, NULL, CC_id); nr_rrc_gNB_decode_ccch(&ctxt, sduP, sdu_lenP, NULL, CC_id);
......
...@@ -368,7 +368,7 @@ static inline void ss_eNB_read_from_socket(acpCtx_t ctx) ...@@ -368,7 +368,7 @@ static inline void ss_eNB_read_from_socket(acpCtx_t ctx)
//Send Dummy Wake up ITTI message to SRB task. //Send Dummy Wake up ITTI message to SRB task.
if (RC.ss.mode >= SS_SOFTMODEM && SS_context.SSCell_list[cell_index_pm].State >= SS_STATE_CELL_ACTIVE) if (RC.ss.mode >= SS_SOFTMODEM && SS_context.SSCell_list[cell_index_pm].State >= SS_STATE_CELL_ACTIVE)
{ {
LOG_A(ENB_SS,"[SS-PORTMAN] Sending Wake up signal to SRB task \n"); LOG_A(ENB_SS,"[SS-PORTMAN] Sending Wake up signal/SS_RRC_PDU_IND (msg_Id:%d) to TASK_SS_SRB task \n", SS_RRC_PDU_IND);
MessageDef *message_p = itti_alloc_new_message(TASK_SS_PORTMAN, 0, SS_RRC_PDU_IND); MessageDef *message_p = itti_alloc_new_message(TASK_SS_PORTMAN, 0, SS_RRC_PDU_IND);
if (message_p) if (message_p)
{ {
...@@ -382,7 +382,7 @@ static inline void ss_eNB_read_from_socket(acpCtx_t ctx) ...@@ -382,7 +382,7 @@ static inline void ss_eNB_read_from_socket(acpCtx_t ctx)
int send_res = itti_send_msg_to_task(TASK_SS_SRB, 0, message_p); int send_res = itti_send_msg_to_task(TASK_SS_SRB, 0, message_p);
if (send_res < 0) if (send_res < 0)
{ {
LOG_A(ENB_SS, "Error in itti_send_msg_to_task"); LOG_A(ENB_SS, "Error in sending Wake up signal /SS_RRC_PDU_IND (msg_Id:%d) to TASK_SS_SRB\n", SS_RRC_PDU_IND);
} }
} }
} }
......
...@@ -261,6 +261,12 @@ static inline void ss_gNB_read_from_socket(acpCtx_t ctx) ...@@ -261,6 +261,12 @@ static inline void ss_gNB_read_from_socket(acpCtx_t ctx)
SidlStatus sidlStatus = -1; SidlStatus sidlStatus = -1;
acpGetMsgSidlStatus(msgSize, buffer, &sidlStatus); acpGetMsgSidlStatus(msgSize, buffer, &sidlStatus);
} }
else if (userId == -ACP_PEER_DISCONNECTED){
LOG_A(GNB_APP, "[SS-PORTMAN-GNB] Peer ordered shutdown\n");
}
else if (userId == -ACP_PEER_CONNECTED){
LOG_A(GNB_APP, "[SS-PORTMAN-GNB] Peer connection established\n");
}
else else
{ {
LOG_A(GNB_APP, "[SS-PORTMAN-GNB] fxn:%s line:%d\n", __FUNCTION__, __LINE__); LOG_A(GNB_APP, "[SS-PORTMAN-GNB] fxn:%s line:%d\n", __FUNCTION__, __LINE__);
...@@ -271,6 +277,27 @@ static inline void ss_gNB_read_from_socket(acpCtx_t ctx) ...@@ -271,6 +277,27 @@ static inline void ss_gNB_read_from_socket(acpCtx_t ctx)
{ {
LOG_A(GNB_APP, "[SS-PORTMAN-GNB] fxn:%s userId:0\n", __FUNCTION__); LOG_A(GNB_APP, "[SS-PORTMAN-GNB] fxn:%s userId:0\n", __FUNCTION__);
// No message (timeout on socket) // No message (timeout on socket)
if (RC.ss.mode >= SS_SOFTMODEM && RC.ss.State >= SS_STATE_CELL_ACTIVE)
{
LOG_A(ENB_SS,"[SS-PORTMAN] Sending Wake up signal/SS_RRC_PDU_IND (msg_Id:%d) to TASK_SS_SRB task \n", SS_NRRRC_PDU_IND);
MessageDef *message_p = itti_alloc_new_message(TASK_SS_PORTMAN, 0, SS_RRC_PDU_IND);
if (message_p)
{
/* Populate the message to SS */
SS_NRRRC_PDU_IND(message_p).sdu_size = 1;
SS_NRRRC_PDU_IND(message_p).srb_id = -1;
SS_NRRRC_PDU_IND(message_p).rnti = -1;
SS_NRRRC_PDU_IND(message_p).frame = -1;
SS_NRRRC_PDU_IND(message_p).subframe = -1;
int send_res = itti_send_msg_to_task(TASK_SS_SRB, 0, message_p);
if (send_res < 0)
{
LOG_A(ENB_SS, "Error in sending Wake up signal /SS_NRRRC_PDU_IND (msg_Id:%d) to TASK_SS_SRB\n", SS_NRRRC_PDU_IND);
}
}
}
} }
else else
{ {
......
...@@ -288,7 +288,10 @@ ss_gNB_read_from_srb_socket(acpCtx_t ctx) ...@@ -288,7 +288,10 @@ ss_gNB_read_from_srb_socket(acpCtx_t ctx)
// No message (timeout on socket) // No message (timeout on socket)
if (isConnected == true){ if (isConnected == true){
break; break;
} }
else
LOG_A(GNB_APP, "[SS_SRB] Connection stopped isConnected:false\n)");
} }
else if (MSG_NrSysSrbProcessFromSS_userId == userId) else if (MSG_NrSysSrbProcessFromSS_userId == userId)
{ {
...@@ -382,9 +385,9 @@ void *ss_gNB_srb_process_itti_msg(void *notUsed) ...@@ -382,9 +385,9 @@ void *ss_gNB_srb_process_itti_msg(void *notUsed)
{ {
switch (ITTI_MSG_ID(received_msg)) switch (ITTI_MSG_ID(received_msg))
{ {
LOG_A(GNB_APP, "[SS_SRB] Received msg_Id:%d\n", ITTI_MSG_ID(received_msg));
case SS_NRRRC_PDU_IND: case SS_NRRRC_PDU_IND:
{ {
#if 0
task_id_t origin_task = ITTI_MSG_ORIGIN_ID(received_msg); task_id_t origin_task = ITTI_MSG_ORIGIN_ID(received_msg);
if (origin_task == TASK_SS_PORTMAN) if (origin_task == TASK_SS_PORTMAN)
...@@ -392,7 +395,6 @@ void *ss_gNB_srb_process_itti_msg(void *notUsed) ...@@ -392,7 +395,6 @@ void *ss_gNB_srb_process_itti_msg(void *notUsed)
LOG_D(GNB_APP, "[SS_SRB] DUMMY WAKEUP receviedfrom PORTMAN state %d \n", SS_context.State); LOG_D(GNB_APP, "[SS_SRB] DUMMY WAKEUP receviedfrom PORTMAN state %d \n", SS_context.State);
} }
else else
#endif
{ {
LOG_A(GNB_APP, "[SS_SRB] Received SS_NRRRC_PDU_IND from RRC\n"); LOG_A(GNB_APP, "[SS_SRB] Received SS_NRRRC_PDU_IND from RRC\n");
if (SS_context.State >= SS_STATE_CELL_ACTIVE) if (SS_context.State >= SS_STATE_CELL_ACTIVE)
......
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