Commit d1170526 authored by Roberto Louro Magueta's avatar Roberto Louro Magueta

Merge remote-tracking branch 'origin/develop' into develop-CSI-Measurements

# Conflicts:
#	openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c
#	openair2/RRC/NR/MESSAGES/asn1_msg.c
parents 91189bd4 d7dae8fa
......@@ -88,7 +88,7 @@
<id>nrmodule2_quectel</id>
<ping_args>-c 20</ping_args>
<ping_packetloss_threshold>1</ping_packetloss_threshold>
<ping_rttavg_threshold>40</ping_rttavg_threshold>
<ping_rttavg_threshold>60</ping_rttavg_threshold>
</testCase>
<testCase id="050001">
<class>Ping</class>
......@@ -96,7 +96,7 @@
<id>nrmodule2_quectel</id>
<ping_args>-c 100 -s 1024 -i 0,2</ping_args>
<ping_packetloss_threshold>1</ping_packetloss_threshold>
<ping_rttavg_threshold>40</ping_rttavg_threshold>
<ping_rttavg_threshold>60</ping_rttavg_threshold>
</testCase>
......
......@@ -88,7 +88,7 @@
<id>nrmodule2_quectel</id>
<ping_args>-c 20</ping_args>
<ping_packetloss_threshold>1</ping_packetloss_threshold>
<ping_rttavg_threshold>40</ping_rttavg_threshold>
<ping_rttavg_threshold>60</ping_rttavg_threshold>
</testCase>
<testCase id="050003">
<class>Ping</class>
......@@ -96,7 +96,7 @@
<id>nrmodule2_quectel</id>
<ping_args>-c 100 -s 1024 -i 0,2</ping_args>
<ping_packetloss_threshold>1</ping_packetloss_threshold>
<ping_rttavg_threshold>40</ping_rttavg_threshold>
<ping_rttavg_threshold>60</ping_rttavg_threshold>
</testCase>
......
......@@ -713,11 +713,11 @@ function main() {
# simlist="ldpctest"
for f in $simlist ; do
compilations \
ran_build $f \
$BUILD_DIR $f \
$f $dbin/$f.$REL
done
compilations \
ran_build coding \
$BUILD_DIR coding \
libcoding.so $dbin/libcoding.so
fi
......@@ -729,7 +729,7 @@ function main() {
simlist="secu_knas_encrypt_eia1 secu_kenb aes128_ctr_encrypt aes128_ctr_decrypt secu_knas_encrypt_eea2 secu_knas secu_knas_encrypt_eea1 kdf aes128_cmac_encrypt secu_knas_encrypt_eia2"
for f in $simlist ; do
compilations \
ran_build test_$f \
$BUILD_DIR test_$f \
test_$f $dbin/test_$f.$REL
done
fi
......
......@@ -167,7 +167,7 @@ typedef struct RadioResourceConfig_s {
long ue_TransmissionMode;
long ue_multiple_max;
//SIB2 BR Options
long *preambleTransMax_CE_r13;
long preambleTransMax_CE_r13;
BOOLEAN_t prach_ConfigCommon_v1310;
BOOLEAN_t *mpdcch_startSF_CSS_RA_r13;
long mpdcch_startSF_CSS_RA_r13_val;
......
......@@ -681,6 +681,58 @@ void fill_eMTC_configuration(MessageDef *msg_p, ccparams_eMTC_t *eMTCconfig, in
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for rach_maxHARQ_Msg3Tx choice: 1..8!\n",
config_fname, cell_idx,eMTCconfig->ccparams.rach_maxHARQ_Msg3Tx);
switch (eMTCconfig->preambleTransMax_CE_r13) {
case 3:
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].preambleTransMax_CE_r13= LTE_PreambleTransMax_n3;
break;
case 4:
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].preambleTransMax_CE_r13= LTE_PreambleTransMax_n4;
break;
case 5:
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].preambleTransMax_CE_r13= LTE_PreambleTransMax_n5;
break;
case 6:
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].preambleTransMax_CE_r13= LTE_PreambleTransMax_n6;
break;
case 7:
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].preambleTransMax_CE_r13= LTE_PreambleTransMax_n7;
break;
case 8:
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].preambleTransMax_CE_r13= LTE_PreambleTransMax_n8;
break;
case 10:
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].preambleTransMax_CE_r13= LTE_PreambleTransMax_n10;
break;
case 20:
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].preambleTransMax_CE_r13= LTE_PreambleTransMax_n20;
break;
case 50:
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].preambleTransMax_CE_r13= LTE_PreambleTransMax_n50;
break;
case 100:
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].preambleTransMax_CE_r13= LTE_PreambleTransMax_n100;
break;
case 200:
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].preambleTransMax_CE_r13= LTE_PreambleTransMax_n200;
break;
default:
AssertFatal (0,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for rach_preambleTransMax_CE_r13 choice: 3,4,5,6,7,8,10,20,50,100,200!\n",
config_fname, cell_idx,eMTCconfig->preambleTransMax_CE_r13);
break;
}
switch (eMTCconfig->ccparams.pcch_defaultPagingCycle) {
case 32:
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].pcch_defaultPagingCycle= LTE_PCCH_Config__defaultPagingCycle_rf32;
......
......@@ -147,7 +147,7 @@ typedef struct ccparams_eMTC_s {
int interval_DLHoppingConfigCommonModeA_r13_val;
int interval_DLHoppingConfigCommonModeB_r13_val;
int mpdcch_pdsch_HoppingOffset_r13;
char *preambleTransMax_CE_r13;
int preambleTransMax_CE_r13;
int prach_HoppingOffset_r13;
int schedulingInfoSIB1_BR_r13;
int64_t fdd_DownlinkOrTddSubframeBitmapBR_val_r13;
......@@ -253,7 +253,7 @@ typedef struct ccparams_eMTC_s {
{ENB_CONFIG_STRING_INTERVAL_DL_HOPPING_CONFIG_COMMON_MODE_B_R13, NULL, 0, strptr:&eMTCconfig->interval_DLHoppingConfigCommonModeB_r13, defstrval:"interval-FDD-r13", TYPE_STRING, 0}, \
{ENB_CONFIG_STRING_INTERVAL_DL_HOPPING_CONFIG_COMMON_MODE_B_R13_VAL, NULL, 0, iptr:&eMTCconfig->interval_DLHoppingConfigCommonModeB_r13_val, defintval:0, TYPE_UINT, 0}, \
{ENB_CONFIG_STRING_MPDCCH_PDSCH_HOPPING_OFFSET_R13, NULL, 0, iptr:&eMTCconfig->mpdcch_pdsch_HoppingOffset_r13, defintval:1, TYPE_UINT, 0}, \
{ENB_CONFIG_STRING_PREAMBLE_TRANSMAX_CE_R13, NULL, 0, strptr:&eMTCconfig->preambleTransMax_CE_r13, defstrval:"n10", TYPE_STRING, 0}, \
{ENB_CONFIG_STRING_PREAMBLE_TRANSMAX_CE_R13, NULL, 0, iptr:&eMTCconfig->preambleTransMax_CE_r13, defintval:10, TYPE_UINT, 0}, \
{ENB_CONFIG_STRING_PUCCH_NUM_REPETITION_CE_MSG4_LEVEL0, NULL, 0, strptr:&eMTCconfig->pucch_NumRepetitionCE_Msg4_Level0_r13, defstrval:"n1", TYPE_STRING, 0}, \
{ENB_CONFIG_STRING_PUCCH_NUM_REPETITION_CE_MSG4_LEVEL1, NULL, 0, strptr:&eMTCconfig->pucch_NumRepetitionCE_Msg4_Level1_r13, defstrval:"", TYPE_STRING, 0}, \
{ENB_CONFIG_STRING_PUCCH_NUM_REPETITION_CE_MSG4_LEVEL2, NULL, 0, strptr:&eMTCconfig->pucch_NumRepetitionCE_Msg4_Level2_r13, defstrval:"", TYPE_STRING, 0}, \
......
......@@ -3938,25 +3938,17 @@ void fill_searchSpaceZero(NR_SearchSpace_t *ss0, NR_Type0_PDCCH_CSS_config_t *ty
if(ss0->searchSpaceType->choice.common->dci_Format0_0_AndFormat1_0 == NULL)
ss0->searchSpaceType->choice.common->dci_Format0_0_AndFormat1_0 = calloc(1,sizeof(*ss0->searchSpaceType->choice.common->dci_Format0_0_AndFormat1_0));
uint32_t duration,periodicity,offset;
uint16_t symbols,max_agg;
AssertFatal(type0_PDCCH_CSS_config!=NULL,"No type0 CSS configuration\n");
max_agg = (type0_PDCCH_CSS_config->num_symbols*type0_PDCCH_CSS_config->num_rbs)/6;
symbols = (1-(1<<type0_PDCCH_CSS_config->num_symbols))<<type0_PDCCH_CSS_config->first_symbol_index;
duration = type0_PDCCH_CSS_config->search_space_duration;
periodicity = type0_PDCCH_CSS_config->search_space_frame_period;
if (type0_PDCCH_CSS_config->type0_pdcch_ss_mux_pattern == 1)
offset = type0_PDCCH_CSS_config->n_0;
else
offset = type0_PDCCH_CSS_config->n_c;
const uint32_t periodicity = type0_PDCCH_CSS_config->search_space_frame_period;
const uint32_t offset = type0_PDCCH_CSS_config->type0_pdcch_ss_mux_pattern == 1
? type0_PDCCH_CSS_config->n_0 : type0_PDCCH_CSS_config->n_c;
ss0->searchSpaceId = 0;
*ss0->controlResourceSetId = 0;
ss0->monitoringSlotPeriodicityAndOffset = calloc(1,sizeof(*ss0->monitoringSlotPeriodicityAndOffset));
set_monitoring_periodicity_offset(ss0,periodicity,offset);
const uint32_t duration = type0_PDCCH_CSS_config->search_space_duration;
if (duration==1)
ss0->duration = NULL;
else{
......@@ -3964,6 +3956,7 @@ void fill_searchSpaceZero(NR_SearchSpace_t *ss0, NR_Type0_PDCCH_CSS_config_t *ty
*ss0->duration = duration;
}
const uint16_t symbols = SL_to_bitmap(type0_PDCCH_CSS_config->first_symbol_index, type0_PDCCH_CSS_config->num_symbols);
ss0->monitoringSymbolsWithinSlot->size = 2;
ss0->monitoringSymbolsWithinSlot->bits_unused = 2;
ss0->monitoringSymbolsWithinSlot->buf[1] = 0;
......@@ -3973,6 +3966,7 @@ void fill_searchSpaceZero(NR_SearchSpace_t *ss0, NR_Type0_PDCCH_CSS_config_t *ty
ss0->monitoringSymbolsWithinSlot->buf[0] |= ((symbols>>i)&0x01)<<(7-i);
}
const uint16_t max_agg = (type0_PDCCH_CSS_config->num_symbols*type0_PDCCH_CSS_config->num_rbs)/6;
// max values are set according to TS38.213 Section 10.1 Table 10.1-1
ss0->nrofCandidates->aggregationLevel1 = NR_SearchSpace__nrofCandidates__aggregationLevel1_n0;
ss0->nrofCandidates->aggregationLevel2 = NR_SearchSpace__nrofCandidates__aggregationLevel2_n0;
......
......@@ -331,11 +331,12 @@ int nr_process_mac_pdu( instance_t module_idP,
0);
break;
case UL_SCH_LCID_DTCH:
// check if LCID is valid at current time.
if (!get_mac_len(pduP, pdu_len, &mac_len, &mac_subheader_len)) {
return 0;
}
case UL_SCH_LCID_DTCH ... (UL_SCH_LCID_DTCH + 28):
// check if LCID is valid at current time.
if (!get_mac_len(pduP, pdu_len, &mac_len, &mac_subheader_len)) {
return 0;
}
LOG_D(NR_MAC, "[UE %04x] %d.%d : ULSCH -> UL-%s %d (gNB %ld, %d bytes)\n",
UE->rnti,
......@@ -508,7 +509,7 @@ void nr_rx_sdu(const module_id_t gnb_mod_idP,
LOG_D(NR_MAC, "rx_sdu for rnti %04x\n", current_rnti);
const int target_snrx10 = gNB_mac->pusch_target_snrx10;
const int pusch_failure_thres = gNB_mac->pusch_failure_thres;
NR_UE_info_t* UE = find_nr_UE(&gNB_mac->UE_info, current_rnti);
if (UE) {
NR_UE_sched_ctrl_t *UE_scheduling_control = &UE->UE_sched_ctrl;
......@@ -609,7 +610,7 @@ void nr_rx_sdu(const module_id_t gnb_mod_idP,
T(T_GNB_MAC_UL_PDU_WITH_DATA, T_INT(gnb_mod_idP), T_INT(CC_idP),
T_INT(rntiP), T_INT(frameP), T_INT(slotP), T_INT(-1) /* harq_pid */,
T_BUFFER(sduP, sdu_lenP));
/* we don't know this UE (yet). Check whether there is a ongoing RA (Msg 3)
* and check the corresponding UE's RNTI match, in which case we activate
* it. */
......@@ -617,7 +618,7 @@ void nr_rx_sdu(const module_id_t gnb_mod_idP,
NR_RA_t *ra = &gNB_mac->common_channels[CC_idP].ra[i];
if (ra->state != WAIT_Msg3)
continue;
if(no_sig) {
LOG_D(NR_MAC, "Random Access %i failed at state %i (no signal)\n", i, ra->state);
nr_mac_remove_ra_rnti(gnb_mod_idP, ra->rnti);
......@@ -1024,7 +1025,7 @@ void pf_ul(module_id_t module_id,
gNB_MAC_INST *nrmac = RC.nrmac[module_id];
NR_ServingCellConfigCommon_t *scc = nrmac->common_channels[CC_id].ServingCellConfigCommon;
const NR_SIB1_t *sib1 = RC.nrmac[module_id]->common_channels[0].sib1 ? RC.nrmac[module_id]->common_channels[0].sib1->message.choice.c1->choice.systemInformationBlockType1 : NULL;
const int min_rb = 5;
// UEs that could be scheduled
UEsched_t UE_sched[MAX_MOBILES_PER_GNB] = {0};
......@@ -1082,7 +1083,7 @@ void pf_ul(module_id_t module_id,
return;
continue;
}
}
const int B = max(0, sched_ctrl->estimated_ul_buffer - sched_ctrl->sched_ul_bytes);
/* preprocessor computed sched_frame/sched_slot */
const bool do_sched = nr_UE_is_to_be_scheduled(scc, 0, UE, sched_pusch->frame, sched_pusch->slot, nrmac->ulsch_max_frame_inactivity);
......@@ -1210,7 +1211,7 @@ void pf_ul(module_id_t module_id,
qsort(UE_sched, sizeof(*UE_sched), sizeofArray(UE_sched), comparator);
UEsched_t *iterator=UE_sched;
const int min_rbSize = 5;
/* Loop UE_sched to find max coeff and allocate transmission */
while (remainUEs> 0 && n_rb_sched >= min_rbSize && iterator->UE != NULL) {
......@@ -1349,8 +1350,8 @@ bool nr_fr1_ulsch_preprocessor(module_id_t module_id, frame_t frame, sub_frame_t
const int mu = scc ? scc->uplinkConfigCommon->initialUplinkBWP->genericParameters.subcarrierSpacing :
scc_sib1->uplinkConfigCommon->initialUplinkBWP.genericParameters.subcarrierSpacing;
// no UEs
if (nr_mac->UE_info.list[0] == NULL)
// no UEs
return false;
const int CC_id = 0;
......
......@@ -977,11 +977,6 @@ static void add_drb_am(int is_gnb, int rnti, struct NR_DRB_ToAddMod *s,
exit(1);
}
if (drb_id != 1) {
LOG_E(PDCP, "%s:%d:%s: fatal, bad drb id %d\n",
__FILE__, __LINE__, __FUNCTION__, drb_id);
exit(1);
}
nr_pdcp_manager_lock(nr_pdcp_ue_manager);
ue = nr_pdcp_manager_get_ue(nr_pdcp_ue_manager, rnti);
......
......@@ -123,7 +123,7 @@ void nr_drb_config(struct NR_RLC_Config *rlc_Config, NR_RLC_Config_PR rlc_config
rlc_Config->choice.am->dl_AM_RLC.t_StatusProhibit = NR_T_StatusProhibit_ms15;
break;
default:
LOG_E (RLC, "Error in %s: RLC config type %d is not handled\n", __FUNCTION__, rlc_config_pr);
AssertFatal(0, "RLC config type %d not handled\n", rlc_config_pr);
break;
}
......
......@@ -1331,10 +1331,8 @@ uint8_t do_SIB23(uint8_t Mod_id,
(*sib2)->radioResourceConfigCommon.rach_ConfigCommon.ext1 = calloc(1, sizeof(struct LTE_RACH_ConfigCommon__ext1));
memset((*sib2)->radioResourceConfigCommon.rach_ConfigCommon.ext1, 0, sizeof(struct LTE_RACH_ConfigCommon__ext1));
if (rrconfig->preambleTransMax_CE_r13) {
(*sib2)->radioResourceConfigCommon.rach_ConfigCommon.ext1->preambleTransMax_CE_r13 = calloc(1, sizeof(LTE_PreambleTransMax_t));
*(*sib2)->radioResourceConfigCommon.rach_ConfigCommon.ext1->preambleTransMax_CE_r13 = *rrconfig->preambleTransMax_CE_r13; // to be re-initialized when we find the enum
} else (*sib2)->radioResourceConfigCommon.rach_ConfigCommon.ext1->preambleTransMax_CE_r13 = NULL;
(*sib2)->radioResourceConfigCommon.rach_ConfigCommon.ext1->preambleTransMax_CE_r13 = calloc(1, sizeof(LTE_PreambleTransMax_t));
*(*sib2)->radioResourceConfigCommon.rach_ConfigCommon.ext1->preambleTransMax_CE_r13 = rrconfig->preambleTransMax_CE_r13; // to be re-initialized when we find the enum
(*sib2)->radioResourceConfigCommon.rach_ConfigCommon.ext1->rach_CE_LevelInfoList_r13 = calloc(1, sizeof(LTE_RACH_CE_LevelInfoList_r13_t));
memset((*sib2)->radioResourceConfigCommon.rach_ConfigCommon.ext1->rach_CE_LevelInfoList_r13, 0, sizeof(LTE_RACH_CE_LevelInfoList_r13_t));
......
This diff is collapsed.
......@@ -117,7 +117,13 @@ void update_cellGroupConfig(NR_CellGroupConfig_t *cellGroupConfig,
NR_UE_NR_Capability_t *uecap,
const gNB_RrcConfigurationReq *configuration);
void fill_mastercellGroupConfig(NR_CellGroupConfig_t *cellGroupConfig, NR_CellGroupConfig_t *ue_context_mastercellGroup, int use_rlc_um_for_drb);
void fill_mastercellGroupConfig(NR_CellGroupConfig_t *cellGroupConfig,
NR_CellGroupConfig_t *ue_context_mastercellGroup,
int use_rlc_um_for_drb,
uint8_t configure_srb,
uint8_t bearer_id_start,
uint8_t nb_bearers_to_setup,
long *priority);
int16_t do_RRCSetup(rrc_gNB_ue_context_t *const ue_context_pP,
uint8_t *const buffer,
......
......@@ -845,6 +845,9 @@ rrc_gNB_generate_dedicatedRRCReconfiguration(
int qos_flow_index = 0;
int pdu_sessions_done = 0;
int i;
uint8_t drb_id_to_setup_start = 1;
uint8_t nb_drb_to_setup = 0;
long drb_priority[1] = {13}; // For now, we assume only one drb per pdu sessions with a default preiority (will be dynamique in future)
NR_CellGroupConfig_t *cellGroupConfig;
uint8_t xid = rrc_gNB_get_next_transaction_identifier(ctxt_pP->module_id);
......@@ -887,6 +890,8 @@ rrc_gNB_generate_dedicatedRRCReconfiguration(
DRB_config = CALLOC(1, sizeof(*DRB_config));
DRB_config->drb_Identity = i+1;
if (drb_id_to_setup_start == 1) drb_id_to_setup_start = DRB_config->drb_Identity;
nb_drb_to_setup++;
DRB_config->cnAssociation = CALLOC(1, sizeof(*DRB_config->cnAssociation));
DRB_config->cnAssociation->present = NR_DRB_ToAddMod__cnAssociation_PR_sdap_Config;
// sdap_Config
......@@ -1000,8 +1005,8 @@ rrc_gNB_generate_dedicatedRRCReconfiguration(
memset(buffer, 0, sizeof(buffer));
cellGroupConfig = calloc(1, sizeof(NR_CellGroupConfig_t));
fill_mastercellGroupConfig(cellGroupConfig, ue_context_pP->ue_context.masterCellGroup,
rrc->um_on_default_drb);
fill_mastercellGroupConfig(cellGroupConfig, ue_context_pP->ue_context.masterCellGroup, rrc->um_on_default_drb, (drb_id_to_setup_start < 2) ? 1 : 0, drb_id_to_setup_start, nb_drb_to_setup, drb_priority);
size = do_RRCReconfiguration(ctxt_pP, buffer, sizeof(buffer),
xid,
*SRB_configList2,
......@@ -3245,10 +3250,9 @@ static void rrc_DU_process_ue_context_setup_request(MessageDef *msg_p, const cha
f1ap_ue_context_setup_t * resp=&F1AP_UE_CONTEXT_SETUP_RESP(message_p);
uint32_t incoming_teid = 0;
NR_CellGroupConfig_t *cellGroupConfig;
cellGroupConfig = calloc(1, sizeof(NR_CellGroupConfig_t));
fill_mastercellGroupConfig(cellGroupConfig, ue_context_p->ue_context.masterCellGroup,rrc->um_on_default_drb);
uint8_t drb_id_to_setup_start = 0;
uint8_t nb_drb_to_setup = 0;
long drb_priority[1] = {13}; // For now, we assume only one drb per pdu sessions with a default preiority (will be dynamique in future)
/* Configure SRB2 */
NR_SRB_ToAddMod_t *SRB2_config = NULL;
......@@ -3277,6 +3281,7 @@ static void rrc_DU_process_ue_context_setup_request(MessageDef *msg_p, const cha
ue_context_p->ue_context.DRB_configList = CALLOC(1, sizeof(*ue_context_p->ue_context.DRB_configList));
}
DRB_configList = ue_context_p->ue_context.DRB_configList;
nb_drb_to_setup = req->drbs_to_be_setup_length;
for (int i=0; i<req->drbs_to_be_setup_length; i++){
DRB_config = CALLOC(1, sizeof(*DRB_config));
DRB_config->drb_Identity = req->drbs_to_be_setup[i].drb_id;
......@@ -3286,6 +3291,7 @@ static void rrc_DU_process_ue_context_setup_request(MessageDef *msg_p, const cha
memcpy(addr.buffer, &drb_p.up_ul_tnl[0].tl_address, sizeof(drb_p.up_ul_tnl[0].tl_address));
addr.length=sizeof(drb_p.up_ul_tnl[0].tl_address)*8;
extern instance_t DUuniqInstance;
if (!drb_id_to_setup_start) drb_id_to_setup_start = drb_p.drb_id;
incoming_teid=newGtpuCreateTunnel(DUuniqInstance,
req->rnti,
drb_p.drb_id,
......@@ -3297,6 +3303,10 @@ static void rrc_DU_process_ue_context_setup_request(MessageDef *msg_p, const cha
}
}
NR_CellGroupConfig_t *cellGroupConfig;
cellGroupConfig = calloc(1, sizeof(NR_CellGroupConfig_t));
fill_mastercellGroupConfig(cellGroupConfig, ue_context_p->ue_context.masterCellGroup, rrc->um_on_default_drb, SRB2_config ? 1 : 0, drb_id_to_setup_start, nb_drb_to_setup, drb_priority);
apply_macrlc_config(rrc, ue_context_p, &ctxt);
/* Fill the UE context setup response ITTI message to send to F1AP */
resp->gNB_CU_ue_id = req->gNB_CU_ue_id;
......
......@@ -905,7 +905,7 @@ rrc_gNB_send_NGAP_PDUSESSION_SETUP_RESP(
for (pdusession = 0; pdusession < ue_context_pP->ue_context.setup_pdu_sessions; pdusession++) {
// if (xid == ue_context_pP->ue_context.pdusession[pdusession].xid) {
if (ue_context_pP->ue_context.pduSession[pdusession].status == PDU_SESSION_STATUS_DONE) {
pdusession_setup_t * tmp=&NGAP_PDUSESSION_SETUP_RESP(msg_p).pdusessions[pdusession];
pdusession_setup_t * tmp=&NGAP_PDUSESSION_SETUP_RESP(msg_p).pdusessions[pdu_sessions_done];
tmp->pdusession_id = ue_context_pP->ue_context.pduSession[pdusession].param.pdusession_id;
// tmp->pdusession_id = 1;
tmp->nb_of_qos_flow = ue_context_pP->ue_context.pduSession[pdusession].param.nb_qos;
......
......@@ -450,7 +450,7 @@ nr_sdap_entity_t *nr_sdap_get_entity(uint16_t rnti, int pdusession_id) {
if(sdap_entity == NULL)
return NULL;
while(sdap_entity->rnti != rnti && sdap_entity->next_entity != NULL) {
while(( sdap_entity->rnti != rnti || sdap_entity->pdusession_id != pdusession_id ) && sdap_entity->next_entity != NULL) {
sdap_entity = sdap_entity->next_entity;
}
......@@ -460,6 +460,7 @@ nr_sdap_entity_t *nr_sdap_get_entity(uint16_t rnti, int pdusession_id) {
return NULL;
}
void delete_nr_sdap_entity(uint16_t rnti) {
nr_sdap_entity_t *entityPtr, *entityPrev = NULL;
entityPtr = sdap_info.sdap_entity_llist;
......
......@@ -462,7 +462,7 @@ teid_t newGtpuCreateTunnel(instance_t instance, rnti_t rnti, int incoming_bearer
auto inst=&globGtp.instances[instance];
auto it=inst->ue2te_mapping.find(rnti);
if ( it != inst->ue2te_mapping.end() ) {
if ( it != inst->ue2te_mapping.end() && it->second.bearers.find(outgoing_bearer_id) != it->second.bearers.end()) {
LOG_W(GTPU,"[%ld] Create a config for a already existing GTP tunnel (rnti %x)\n", instance, rnti);
inst->ue2te_mapping.erase(it);
}
......
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