Commit ca8106ea authored by Remi Hardy's avatar Remi Hardy
Browse files

integration_2021_wk27

MR !1188 : NR_gNB_initial_MIB_fix  
This MR fixes a bug for which the gNB would send an empty MIB in the first frames of execution. This is because MIB is generated every 8 frames but the first MIB wouldn't be generated before frame 8 at the beginning of each run.

MR !1184 : x2_handle_sctp_shutdown
Avoid eNB exiting after gNB tries to reconnect over X2 for NSA
parents 2d4e8cc3 cc89d360
......@@ -157,10 +157,14 @@ void schedule_nr_mib(module_id_t module_idP, frame_t frameP, sub_frame_t slotP)
dl_req = &dl_tti_request->dl_tti_request_body;
// get MIB every 8 frames
if((slotP == 0) && (frameP & 7) == 0) {
if(((slotP == 0) && (frameP & 7) == 0) ||
gNB->first_MIB) {
mib_sdu_length = mac_rrc_nr_data_req(module_idP, CC_id, frameP, MIBCH, 0, 1, &cc->MIB_pdu.payload[0]);
// flag to avoid sending an empty MIB in the first frames of execution since gNB doesn't get at the beginning in frame 0 slot 0
gNB->first_MIB = false;
LOG_D(MAC,
"[gNB %d] Frame %d : MIB->BCH CC_id %d, Received %d bytes\n",
module_idP,
......
......@@ -551,7 +551,7 @@ bool allocate_dl_retransmission(module_id_t module_id,
}
float thr_ue[MAX_MOBILES_PER_GNB];
uint32_t pf_tbs[3][28]; // pre-computed, approximate TBS values for PF coefficient
uint32_t pf_tbs[3][29]; // pre-computed, approximate TBS values for PF coefficient
void pf_dl(module_id_t module_id,
frame_t frame,
......
......@@ -146,7 +146,7 @@ void nr_schedule_css_dlsch_phytest(module_id_t module_idP,
int startSymbolAndLength=0;
int StartSymbolIndex=-1,NrOfSymbols=14;
int StartSymbolIndex_tmp,NrOfSymbols_tmp;
int mappingtype_tmp, mappingtype;
int mappingtype_tmp, mappingtype=0;
for (int i=0;
i<scc->downlinkConfigCommon->initialDownlinkBWP->pdsch_ConfigCommon->choice.setup->pdsch_TimeDomainAllocationList->list.count;
......
......@@ -952,7 +952,7 @@ void update_ul_ue_R_Qm(NR_sched_pusch_t *sched_pusch, const NR_pusch_semi_static
}
float ul_thr_ue[MAX_MOBILES_PER_GNB];
uint32_t ul_pf_tbs[3][28]; // pre-computed, approximate TBS values for PF coefficient
uint32_t ul_pf_tbs[3][29]; // pre-computed, approximate TBS values for PF coefficient
void pf_ul(module_id_t module_id,
frame_t frame,
sub_frame_t slot,
......
......@@ -81,6 +81,8 @@ void mac_top_init_gNB(void)
RC.nrmac[i]->ul_handle = 0;
RC.nrmac[i]->first_MIB = true;
if (get_softmodem_params()->phy_test) {
RC.nrmac[i]->pre_processor_dl = nr_preprocessor_phytest;
RC.nrmac[i]->pre_processor_ul = nr_ul_preprocessor_phytest;
......
......@@ -747,6 +747,7 @@ typedef struct gNB_MAC_INST_s {
NR_UE_sched_ctrl_t *sched_ctrlCommon;
NR_Type0_PDCCH_CSS_config_t type0_PDCCH_CSS_config[64];
bool first_MIB;
} gNB_MAC_INST;
#endif /*__LAYER2_NR_MAC_GNB_H__ */
......@@ -115,7 +115,12 @@ void x2ap_eNB_handle_sctp_association_resp(instance_t instance, sctp_new_associa
if (x2ap_enb_data_p != NULL) {
/* some sanity check - to be refined at some point */
if (sctp_new_association_resp->sctp_state != SCTP_STATE_ESTABLISHED) {
X2AP_ERROR("x2ap_enb_data_p not NULL and sctp state not SCTP_STATE_ESTABLISHED, what to do?\n");
X2AP_ERROR("x2ap_enb_data_p not NULL and sctp state not SCTP_STATE_ESTABLISHED?\n");
if (sctp_new_association_resp->sctp_state == SCTP_STATE_SHUTDOWN){
RB_REMOVE(x2ap_enb_map, &instance_p->x2ap_enb_head, x2ap_enb_data_p);
return;
}
exit(1);
}
......
......@@ -985,6 +985,7 @@ sctp_eNB_read_from_socket(
if (SCTP_SHUTDOWN_EVENT == snp->sn_header.sn_type) {
itti_unsubscribe_event_fd(TASK_SCTP, sctp_cnx->sd);
SCTP_WARN("Received SCTP SHUTDOWN EVENT\n");
close(sctp_cnx->sd);
sctp_itti_send_association_resp(
......
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