From 6f69e836a891d713296fa0850fe06cddaa7d4ec2 Mon Sep 17 00:00:00 2001 From: Melissa Elkadi Date: Thu, 18 Nov 2021 11:45:47 -0800 Subject: [PATCH] This commit allows IP traffic to work for 2 UEs in NSA mode The nr_rrc_ue_process_RadioBearerConfig() function call in the RRC layer of the NRUE was removed when it should not have been for NSA mode. This is now added back in for NSA mode. Also, the call to pdcp_run should only be when were NOT in NOS1 mode and ARE in SA mode. This was fixed as well. Ue-to-Ue IP traffic in NSA works, but eventually the NSA UE will crash due to an incorrect PDCCH configuration. This is a bug we will need to look into. It doesnt always crash, only about 40% of the time. And even when the NRUE does crash, it happens towards the end of the simulation. --- executables/nr-ue.c | 2 +- openair2/RRC/NR_UE/rrc_UE.c | 14 +++++++++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/executables/nr-ue.c b/executables/nr-ue.c index 9c1d896238..01444167b0 100644 --- a/executables/nr-ue.c +++ b/executables/nr-ue.c @@ -492,7 +492,7 @@ static void *NRUE_phy_stub_standalone_pnf_task(void *arg) nr_ue_ul_indication(&ul_info); check_nr_prach(mac, &ul_info, &prach_resources); } - if(IS_SOFTMODEM_NOS1 && get_softmodem_params()->sa) { + if (!IS_SOFTMODEM_NOS1 && get_softmodem_params()->sa) { NR_UE_MAC_INST_t *mac = get_mac_inst(0); protocol_ctxt_t ctxt; PROTOCOL_CTXT_SET_BY_MODULE_ID(&ctxt, 0, ENB_FLAG_NO, mac->crnti, frame, slot, 0); diff --git a/openair2/RRC/NR_UE/rrc_UE.c b/openair2/RRC/NR_UE/rrc_UE.c index e02f500e63..f11dc65195 100644 --- a/openair2/RRC/NR_UE/rrc_UE.c +++ b/openair2/RRC/NR_UE/rrc_UE.c @@ -397,7 +397,19 @@ void process_nsa_message(NR_UE_RRC_INST_t *rrc, nsa_message_t nsa_message_type, SEQUENCE_free( &asn_DEF_NR_RadioBearerConfig, RadioBearerConfig, 1 ); return; } - if ( LOG_DEBUGFLAG(DEBUG_ASN1) ) { + if (get_softmodem_params()->nsa) { + protocol_ctxt_t ctxt; + NR_UE_MAC_INST_t *mac = get_mac_inst(module_id); + PROTOCOL_CTXT_SET_BY_MODULE_ID(&ctxt, module_id, ENB_FLAG_YES, mac->crnti, 0, 0, 0); + xer_fprint(stdout, &asn_DEF_NR_RadioBearerConfig, (const void*)RadioBearerConfig); + LOG_D(NR_RRC, "Calling fill_default_rbconfig_ue at %d with: e_rab_id = %ld, drbID = %ld, cipher_algo = %ld, key = %ld \n", + __LINE__, RadioBearerConfig->drb_ToAddModList->list.array[0]->cnAssociation->choice.eps_BearerIdentity, + RadioBearerConfig->drb_ToAddModList->list.array[0]->drb_Identity, + RadioBearerConfig->securityConfig->securityAlgorithmConfig->cipheringAlgorithm, + *RadioBearerConfig->securityConfig->keyToUse); + nr_rrc_ue_process_RadioBearerConfig(&ctxt, 0, RadioBearerConfig); + } + else if ( LOG_DEBUGFLAG(DEBUG_ASN1) ) { xer_fprint(stdout, &asn_DEF_NR_RadioBearerConfig, (const void *) RadioBearerConfig); } }