Merge branch 'episys/nsa_epc_gnb_updates' into episys/david/multiUE_with_crnti_checking
This commit is contained in:
@@ -219,6 +219,10 @@ typedef struct kenb_refresh_req_s {
|
||||
Byte_t kenb[32];
|
||||
} kenb_refresh_req_t;
|
||||
|
||||
typedef struct nsa_oai_tun_nsa_s {
|
||||
uint8_t buffer[500]; //Melissa TODO
|
||||
} nas_oai_tun_nsa_t;
|
||||
|
||||
/*
|
||||
* NAS->AS - Cell Information request
|
||||
* NAS request AS to search for a suitable cell belonging to the selected
|
||||
|
||||
@@ -65,6 +65,8 @@ MESSAGE_DEF(NAS_UPLINK_DATA_REQ, MESSAGE_PRIORITY_MED, NasUlDataReq
|
||||
|
||||
MESSAGE_DEF(NAS_RAB_ESTABLI_RSP, MESSAGE_PRIORITY_MED, NasRabEstRsp, nas_rab_est_rsp)
|
||||
|
||||
MESSAGE_DEF(NAS_OAI_TUN_NSA, MESSAGE_PRIORITY_MED, NasOaiTunNsa, nas_oai_tun_nsa)
|
||||
|
||||
// UE: RRC -> NAS messages
|
||||
MESSAGE_DEF(NAS_CELL_SELECTION_CNF, MESSAGE_PRIORITY_MED, NasCellSelectionCnf, nas_cell_selection_cnf)
|
||||
MESSAGE_DEF(NAS_CELL_SELECTION_IND, MESSAGE_PRIORITY_MED, NasCellSelectionInd, nas_cell_selection_ind)
|
||||
|
||||
@@ -89,6 +89,8 @@
|
||||
|
||||
#define RLC_SDU_INDICATION(mSGpTR) (mSGpTR)->ittiMsg.rlc_sdu_indication
|
||||
|
||||
#define NAS_OAI_TUN_NSA(mSGpTR) (mSGpTR)->ittiMsg.nas_oai_tun_nsa
|
||||
|
||||
//-------------------------------------------------------------------------------------------//
|
||||
typedef struct RrcStateInd_s {
|
||||
Rrc_State_t state;
|
||||
@@ -420,6 +422,8 @@ typedef ul_info_transfer_req_t NasUlDataReq;
|
||||
|
||||
typedef rab_establish_rsp_t NasRabEstRsp;
|
||||
|
||||
typedef nas_oai_tun_nsa_t NasOaiTunNsa;
|
||||
|
||||
// UE: RRC -> NAS messages
|
||||
typedef cell_info_cnf_t NasCellSelectionCnf;
|
||||
typedef cell_info_ind_t NasCellSelectionInd;
|
||||
|
||||
@@ -1923,7 +1923,7 @@ void nr_ue_process_mac_pdu(nr_downlink_indication_t *dl_info,
|
||||
mac_subheader_len = 2;
|
||||
}
|
||||
|
||||
LOG_D(MAC, "[UE %d] Frame %d : DLSCH -> DL-DTCH %d (gNB %d, %d bytes)\n", module_idP, frameP, rx_lcid, gNB_index, mac_sdu_len);
|
||||
LOG_I(MAC, "Melissa Elkadi [UE %d] Frame %d : DLSCH -> DL-DTCH %d (gNB %d, %d bytes)\n", module_idP, frameP, rx_lcid, gNB_index, mac_sdu_len);
|
||||
|
||||
#if defined(ENABLE_MAC_PAYLOAD_DEBUG)
|
||||
LOG_T(MAC, "[UE %d] First 32 bytes of DLSCH : \n", module_idP);
|
||||
@@ -1934,7 +1934,7 @@ void nr_ue_process_mac_pdu(nr_downlink_indication_t *dl_info,
|
||||
LOG_T(MAC, "\n");
|
||||
#endif
|
||||
|
||||
if (IS_SOFTMODEM_NOS1){
|
||||
if (IS_SOFTMODEM_NOS1 || get_softmodem_params()->nsa){
|
||||
if (rx_lcid < NB_RB_MAX && rx_lcid >= DL_SCH_LCID_DTCH) {
|
||||
|
||||
mac_rlc_data_ind(module_idP,
|
||||
@@ -1996,7 +1996,8 @@ uint16_t nr_generate_ulsch_pdu(uint8_t *sdus_payload,
|
||||
// Generating UL MAC subPDUs including MAC SDU and subheader
|
||||
|
||||
for (i = 0; i < num_sdus; i++) {
|
||||
LOG_D(MAC, "[UE] Generating UL MAC subPDUs for SDU with lenght %d ( num_sdus %d )\n", sdu_lengths[i], num_sdus);
|
||||
LOG_I(MAC, "Melissa Elkadi [UE] Generating UL MAC subPDUs for SDU with length %d ( num_sdus %d ) and LCID %d\n",
|
||||
sdu_lengths[i], num_sdus, sdu_lcids[i]);
|
||||
|
||||
if (sdu_lcids[i] != UL_SCH_LCID_CCCH){
|
||||
if (sdu_lengths[i] < 128) {
|
||||
|
||||
@@ -897,7 +897,7 @@ NR_UE_L2_STATE_t nr_ue_scheduler(nr_downlink_indication_t *dl_info, nr_uplink_in
|
||||
uint16_t TBS_bytes = ulcfg_pdu->pusch_config_pdu.pusch_data.tb_size;
|
||||
|
||||
// Push data from MAC to PHY only when NDI toggles
|
||||
if (IS_SOFTMODEM_NOS1 && (mac->UL_ndi[ulcfg_pdu->pusch_config_pdu.pusch_data.harq_process_id] != ulcfg_pdu->pusch_config_pdu.pusch_data.new_data_indicator)){
|
||||
if (mac->UL_ndi[ulcfg_pdu->pusch_config_pdu.pusch_data.harq_process_id] != ulcfg_pdu->pusch_config_pdu.pusch_data.new_data_indicator){
|
||||
// Getting IP traffic to be transmitted
|
||||
data_existing = nr_ue_get_sdu(mod_id,
|
||||
cc_id,
|
||||
@@ -911,7 +911,7 @@ NR_UE_L2_STATE_t nr_ue_scheduler(nr_downlink_indication_t *dl_info, nr_uplink_in
|
||||
|
||||
mac->UL_ndi[ulcfg_pdu->pusch_config_pdu.pusch_data.harq_process_id] = ulcfg_pdu->pusch_config_pdu.pusch_data.new_data_indicator;
|
||||
//Random traffic to be transmitted if there is no IP traffic available for this Tx opportunity
|
||||
if (!IS_SOFTMODEM_NOS1 || !data_existing) {
|
||||
if (IS_SOFTMODEM_NOS1 || !data_existing) {
|
||||
//Use zeros for the header bytes in noS1 mode, in order to make sure that the LCID is not valid
|
||||
//and block this traffic from being forwarded to the upper layers at the gNB
|
||||
LOG_D(PHY, "In %s: Random data to be transmitted: TBS_bytes %d \n", __FUNCTION__, TBS_bytes);
|
||||
@@ -1816,8 +1816,8 @@ nr_ue_get_sdu(module_id_t module_idP, int CC_id, frame_t frameP,
|
||||
|
||||
buflen_remain =
|
||||
buflen - (total_rlc_pdu_header_len + sdu_length_total + MAX_RLC_SDU_SUBHEADER_SIZE);
|
||||
LOG_D(MAC,
|
||||
"[UE %d] Frame %d : UL-DXCH -> ULSCH, RLC %d has %d bytes to "
|
||||
LOG_I(MAC,
|
||||
"Melissa Elkadi [UE %d] Frame %d : UL-DXCH -> ULSCH, RLC %d has %d bytes to "
|
||||
"send (Transport Block size %d SDU Length Total %d , mac header len %d, buflen_remain %d )\n", //BSR byte before Tx=%d
|
||||
module_idP, frameP, lcid, lcid_buffer_occupancy_new,
|
||||
buflen, sdu_length_total,
|
||||
@@ -1832,7 +1832,7 @@ nr_ue_get_sdu(module_id_t module_idP, int CC_id, frame_t frameP,
|
||||
ENB_FLAG_NO,
|
||||
MBMS_FLAG_NO,
|
||||
lcid,
|
||||
buflen_remain,
|
||||
buflen_remain-MAX_RLC_SDU_SUBHEADER_SIZE,
|
||||
(char *)&ulsch_sdus[sdu_length_total],0,
|
||||
0);
|
||||
|
||||
|
||||
@@ -1032,8 +1032,8 @@ void nr_schedule_ue_spec(module_id_t module_id,
|
||||
0,
|
||||
0);
|
||||
|
||||
LOG_D(MAC,
|
||||
"%4d.%2d RNTI %04x: %d bytes from DTCH %d (ndata %d, remaining size %d)\n",
|
||||
LOG_I(MAC,
|
||||
"Melissa Elkadi %4d.%2d RNTI %04x: %d bytes from DTCH %d (ndata %d, remaining size %d)\n",
|
||||
frame,
|
||||
slot,
|
||||
rnti,
|
||||
|
||||
@@ -259,7 +259,7 @@ void nr_process_mac_pdu(
|
||||
mac_subheader_len = 2;
|
||||
}
|
||||
|
||||
LOG_D(MAC, "[UE %d] Frame %d : ULSCH -> UL-DTCH %d (gNB %d, %d bytes)\n", module_idP, frameP, rx_lcid, module_idP, mac_sdu_len);
|
||||
LOG_I(MAC, "Melissa Elkadi [UE %d] Frame %d : ULSCH -> UL-DTCH %d (gNB %d, %d bytes)\n", module_idP, frameP, rx_lcid, module_idP, mac_sdu_len);
|
||||
int UE_id = find_nr_UE_id(module_idP, rnti);
|
||||
RC.nrmac[module_idP]->UE_info.mac_stats[UE_id].lc_bytes_rx[rx_lcid] += mac_sdu_len;
|
||||
#if defined(ENABLE_MAC_PAYLOAD_DEBUG)
|
||||
|
||||
@@ -1196,7 +1196,7 @@ pdcp_run (
|
||||
|
||||
// IP/NAS -> PDCP traffic : TX, read the pkt from the upper layer buffer
|
||||
// if (LINK_ENB_PDCP_TO_GTPV1U && ctxt_pP->enb_flag == ENB_FLAG_NO) {
|
||||
if (!EPC_MODE_ENABLED || ctxt_pP->enb_flag == ENB_FLAG_NO ) {
|
||||
if (!get_softmodem_params()->nsa) {
|
||||
pdcp_fifo_read_input_sdus(ctxt_pP);
|
||||
}
|
||||
|
||||
@@ -1206,8 +1206,9 @@ pdcp_run (
|
||||
} else {
|
||||
start_meas(&UE_pdcp_stats[ctxt_pP->module_id].pdcp_ip);
|
||||
}
|
||||
|
||||
pdcp_fifo_flush_sdus(ctxt_pP);
|
||||
if(!get_softmodem_params()->nsa) {
|
||||
pdcp_fifo_flush_sdus(ctxt_pP);
|
||||
}
|
||||
|
||||
if (ctxt_pP->enb_flag) {
|
||||
stop_meas(&eNB_pdcp_stats[ctxt_pP->module_id].pdcp_ip);
|
||||
|
||||
@@ -25,13 +25,17 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include "common/utils/LOG/log.h"
|
||||
#include "assertions.h"
|
||||
|
||||
void nr_pdcp_entity_drb_am_recv_pdu(nr_pdcp_entity_t *_entity, char *buffer, int size)
|
||||
{
|
||||
nr_pdcp_entity_drb_am_t *entity = (nr_pdcp_entity_drb_am_t *)_entity;
|
||||
int sn;
|
||||
|
||||
if (size < 3) abort();
|
||||
if (size < 3) {
|
||||
LOG_I(PDCP, "Size < 3. Size = %d. No data, so discarding.", size);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!(buffer[0] & 0x80))
|
||||
LOG_E(PDCP, "%s:%d:%s: fatal\n", __FILE__, __LINE__, __FUNCTION__);
|
||||
|
||||
@@ -377,10 +377,10 @@ uint64_t nr_pdcp_module_init(uint64_t _pdcp_optmask, int id)
|
||||
nas_getparams();
|
||||
|
||||
if(UE_NAS_USE_TUN) {
|
||||
/* TODO: Brute force changes made below to allow nr-UE to have unique tunnel interfaces.
|
||||
/* Melissa TODO: Brute force changes made below to allow nr-UE to have unique tunnel interfaces.
|
||||
When the NODE_NUMBER param is not used to determine functionality and LTE tunnel
|
||||
interfaces, we should update the netlink_init_tun() and nas_config() calls below as well. */
|
||||
int num_if = (NFAPI_MODE == NFAPI_UE_STUB_PNF || IS_SOFTMODEM_SIML1 )? MAX_MOBILES_PER_ENB : 1;
|
||||
int num_if = (NFAPI_MODE == NFAPI_UE_STUB_PNF || IS_SOFTMODEM_SIML1 || NFAPI_MODE == NFAPI_MODE_STANDALONE_PNF)? MAX_MOBILES_PER_ENB : 1;
|
||||
netlink_init_tun("nrue", num_if, id);
|
||||
//Add --nr-ip-over-lte option check for next line
|
||||
if (IS_SOFTMODEM_NOS1)
|
||||
@@ -411,9 +411,11 @@ static void deliver_sdu_drb(void *_ue, nr_pdcp_entity_t *entity,
|
||||
uint8_t *gtpu_buffer_p;
|
||||
int rb_id;
|
||||
int i;
|
||||
LOG_I(PDCP, "Melissa Elkadi we got here %s\n", __FUNCTION__);
|
||||
|
||||
if(IS_SOFTMODEM_NOS1){
|
||||
if(!IS_SOFTMODEM_NOS1 || get_softmodem_params()->nsa){
|
||||
len = write(nas_sock_fd[0], buf, size);
|
||||
LOG_I(PDCP, "Melissa Elkadi Writing %d bytes to tunnel interface\n", len);
|
||||
if (len != size) {
|
||||
LOG_E(PDCP, "%s:%d:%s: fatal\n", __FILE__, __LINE__, __FUNCTION__);
|
||||
}
|
||||
@@ -442,7 +444,7 @@ static void deliver_sdu_drb(void *_ue, nr_pdcp_entity_t *entity,
|
||||
GTPV1U_ENB_TUNNEL_DATA_REQ(message_p).offset = GTPU_HEADER_OVERHEAD_MAX;
|
||||
GTPV1U_ENB_TUNNEL_DATA_REQ(message_p).rnti = ue->rnti;
|
||||
GTPV1U_ENB_TUNNEL_DATA_REQ(message_p).rab_id = rb_id + 4;
|
||||
LOG_D(PDCP, "%s() (drb %d) sending message to gtp size %d\n", __func__, rb_id, size);
|
||||
LOG_I(PDCP, "Melissa Elkadi %s() (drb %d) sending message to gtp size %d\n", __func__, rb_id, size);
|
||||
//for (i = 0; i < size; i++) printf(" %2.2x", (unsigned char)buf[i]);
|
||||
//printf("\n");
|
||||
itti_send_msg_to_task(TASK_GTPV1_U, INSTANCE_DEFAULT, message_p);
|
||||
@@ -625,9 +627,11 @@ static void add_drb_am(int is_gnb, int rnti, struct NR_DRB_ToAddMod *s,
|
||||
nr_pdcp_manager_lock(nr_pdcp_ue_manager);
|
||||
ue = nr_pdcp_manager_get_ue(nr_pdcp_ue_manager, rnti);
|
||||
if (ue->drb[drb_id-1] != NULL) {
|
||||
LOG_D(PDCP, "%s:%d:%s: warning DRB %d already exist for ue %d, do nothing\n",
|
||||
LOG_I(PDCP, "Melissa Elkadi %s:%d:%s: warning DRB %d already exist for ue %d, do nothing\n",
|
||||
__FILE__, __LINE__, __FUNCTION__, drb_id, rnti);
|
||||
} else {
|
||||
LOG_I(PDCP, "%s:%d:%s: Melissa Elkadi, we will call deliver_sdu_drb\n", __FILE__, __LINE__, __FUNCTION__);
|
||||
|
||||
pdcp_drb = new_nr_pdcp_entity_drb_am(is_gnb, drb_id,
|
||||
deliver_sdu_drb, ue, deliver_pdu_drb, ue,
|
||||
sn_size_dl, t_reordering, discard_timer,
|
||||
|
||||
@@ -282,25 +282,31 @@ static void copy_tx_data_req_to_dl_info(nr_downlink_indication_t *dl_info, nfapi
|
||||
{
|
||||
nfapi_nr_pdu_t *pdu_list = &tx_data_request->pdu_list[i];
|
||||
AssertFatal(pdu_list->num_TLV < sizeof(pdu_list->TLVs) / sizeof(pdu_list->TLVs[0]), "Num TLVs exceeds TLV array size");
|
||||
|
||||
if (tx_data_request->Slot == 7) { //Melissa this means we have an RAR, sorta hacky though
|
||||
if( get_mac_inst(dl_info->module_id)->crnti == get_mac_inst(dl_info->module_id)->ra.t_crnti )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
dl_info->rx_ind->rx_indication_body[i].pdu_type = FAPI_NR_RX_PDU_TYPE_RAR;
|
||||
}
|
||||
else if (tx_data_request->Slot != 7 && get_softmodem_params()->nsa) {
|
||||
dl_info->rx_ind->rx_indication_body[i].pdu_type = FAPI_NR_RX_PDU_TYPE_DLSCH;
|
||||
}
|
||||
|
||||
int length = 0;
|
||||
for (int j = 0; j < pdu_list->num_TLV; j++)
|
||||
{
|
||||
length += pdu_list->TLVs[j].length;
|
||||
}
|
||||
LOG_I(NR_PHY, "%s: num_tlv %d and length %d, pdu index %d\n",
|
||||
__FUNCTION__, pdu_list->num_TLV, length, i);
|
||||
uint8_t *pdu = malloc(length);
|
||||
dl_info->rx_ind->rx_indication_body[i].pdsch_pdu.pdu = pdu;
|
||||
for (int j = 0; j < pdu_list->num_TLV; j++)
|
||||
{
|
||||
const uint32_t *ptr;
|
||||
if (pdu_list->TLVs[j].tag)
|
||||
dl_info->rx_ind->rx_indication_body[i].pdsch_pdu.pdu = (void*) pdu_list->TLVs[j].value.ptr; // Melissa, fix me!
|
||||
else if (!pdu_list->TLVs[j].tag)
|
||||
dl_info->rx_ind->rx_indication_body[i].pdsch_pdu.pdu = (void*) pdu_list->TLVs[j].value.direct; // Melissa, fix me!
|
||||
dl_info->rx_ind->rx_indication_body[i].pdsch_pdu.pdu_length = pdu_list->TLVs[j].length;
|
||||
ptr = pdu_list->TLVs[j].value.ptr;
|
||||
else
|
||||
ptr = pdu_list->TLVs[j].value.direct;
|
||||
memcpy(pdu, ptr, pdu_list->TLVs[j].length);
|
||||
pdu += pdu_list->TLVs[j].length;
|
||||
}
|
||||
dl_info->rx_ind->rx_indication_body[i].pdsch_pdu.pdu_length = length;
|
||||
if (tx_data_request->Slot == 7) { //Melissa this means we have an RAR, sorta hacky though
|
||||
dl_info->rx_ind->rx_indication_body[i].pdu_type = FAPI_NR_RX_PDU_TYPE_RAR;
|
||||
}
|
||||
else {
|
||||
dl_info->rx_ind->rx_indication_body[i].pdu_type = FAPI_NR_RX_PDU_TYPE_DLSCH;
|
||||
}
|
||||
}
|
||||
dl_info->slot = tx_data_request->Slot;
|
||||
|
||||
@@ -2057,6 +2057,7 @@ rrc_ue_process_rrcConnectionReconfiguration(
|
||||
NAS_CONN_ESTABLI_CNF(msg_p).nasMsg.data = pdu_buffer;
|
||||
itti_send_msg_to_task(TASK_NAS_UE, ctxt_pP->instance, msg_p);
|
||||
}
|
||||
LOG_I(RRC, "Melissa Elkadi, we have sent NAS_CONN_ESTABLI_CNF to NAS layer via itti!\n");
|
||||
|
||||
free (r_r8->dedicatedInfoNASList);
|
||||
}
|
||||
@@ -2513,7 +2514,8 @@ rrc_ue_decode_dcch(
|
||||
// Save ueCapabilityEnquiry so we can use in nsa mode after nrUE response is received
|
||||
UE_RRC_INFO *info = &UE_rrc_inst[ctxt_pP->module_id].Info[eNB_indexP];
|
||||
if (info->dl_dcch_msg != NULL) {
|
||||
SEQUENCE_free(&asn_DEF_LTE_DL_DCCH_Message, info->dl_dcch_msg, ASFM_FREE_EVERYTHING);
|
||||
info->dl_dcch_msg = NULL;
|
||||
//SEQUENCE_free(&asn_DEF_LTE_DL_DCCH_Message, info->dl_dcch_msg, ASFM_FREE_EVERYTHING); Melissa
|
||||
}
|
||||
info->dl_dcch_msg = dl_dcch_msg;
|
||||
dl_dcch_msg = NULL;
|
||||
@@ -2528,7 +2530,8 @@ rrc_ue_decode_dcch(
|
||||
// Save ueCapabilityEnquiry so we can use in nsa mode after nrUE response is received
|
||||
UE_RRC_INFO *info = &UE_rrc_inst[ctxt_pP->module_id].Info[eNB_indexP];
|
||||
if (info->dl_dcch_msg != NULL) {
|
||||
SEQUENCE_free(&asn_DEF_LTE_DL_DCCH_Message, info->dl_dcch_msg, ASFM_FREE_EVERYTHING);
|
||||
info->dl_dcch_msg = NULL;
|
||||
//SEQUENCE_free(&asn_DEF_LTE_DL_DCCH_Message, info->dl_dcch_msg, ASFM_FREE_EVERYTHING); Melissa
|
||||
}
|
||||
info->dl_dcch_msg = dl_dcch_msg;
|
||||
dl_dcch_msg = NULL;
|
||||
@@ -4621,7 +4624,7 @@ void ue_measurement_report_triggering(protocol_ctxt_t *const ctxt_pP, const uint
|
||||
if (is_state_connected && is_t304_inactive && have_meas_flag) {
|
||||
LOG_I(RRC,"[UE %d] Frame %d: Triggering generation of Meas Report for NR_r15. count = %d\n",
|
||||
ctxt_pP->module_id, ctxt_pP->frame, ue->subframeCount);
|
||||
|
||||
usleep(200000);
|
||||
if (ue->measReportList[i][j] == NULL) {
|
||||
ue->measReportList[i][j] = malloc(sizeof(MEAS_REPORT_LIST));
|
||||
}
|
||||
@@ -5060,6 +5063,16 @@ void *rrc_ue_task( void *args_p ) {
|
||||
AssertFatal (result == EXIT_SUCCESS, "Failed to free memory (%d)!\n", result);
|
||||
break;
|
||||
}
|
||||
case NAS_OAI_TUN_NSA:
|
||||
{
|
||||
LOG_I(NAS, "Melissa Elkadi Received %s: length %lu. About to send this to the NR UE\n", ITTI_MSG_NAME (msg_p),
|
||||
sizeof(NAS_OAI_TUN_NSA (msg_p).buffer));
|
||||
char buffer[RRC_BUF_SIZE];
|
||||
memcpy(buffer, NAS_OAI_TUN_NSA(msg_p).buffer, sizeof(buffer));
|
||||
nsa_sendmsg_to_nrue(buffer, sizeof(buffer), OAI_TUN_IFACE_NSA);
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
case NAS_KENB_REFRESH_REQ:
|
||||
memcpy((void *)UE_rrc_inst[ue_mod_id].kenb, (void *)NAS_KENB_REFRESH_REQ(msg_p).kenb, sizeof(UE_rrc_inst[ue_mod_id].kenb));
|
||||
|
||||
@@ -4606,10 +4606,10 @@ rrc_eNB_process_MeasurementReport(
|
||||
|
||||
memcpy(X2AP_ENDC_SGNB_ADDITION_REQ(msg).rrc_buffer,enc_buf,enc_size);
|
||||
X2AP_ENDC_SGNB_ADDITION_REQ(msg).rrc_buffer_size = enc_size;
|
||||
#if 0 //Melissa: We hacked this:
|
||||
|
||||
X2AP_ENDC_SGNB_ADDITION_REQ(msg).target_physCellId
|
||||
= measResults2->measResultNeighCells->choice.measResultListEUTRA.list.array[0]->physCellId;
|
||||
#endif
|
||||
|
||||
X2AP_ENDC_SGNB_ADDITION_REQ(msg).target_physCellId = 0;
|
||||
//For the moment we have a single E-RAB which will be the one to be added to the gNB
|
||||
//Not sure how to select bearers to be added if there are multiple.
|
||||
@@ -7703,7 +7703,7 @@ rrc_eNB_decode_dcch(
|
||||
/*FK: left the condition as is for the case MME is used (S1 mode) but setting dedicated_DRB = 1 otherwise (noS1 mode) so that no second RRCReconfiguration message activationg more DRB is sent as this causes problems with the nasmesh driver.*/
|
||||
int flexran_agent_handover = 0;
|
||||
|
||||
if (1) { //Melissa: This is a hack. We are bypassing EPC mode here.
|
||||
if (1) { //Melissa: This is a hack. We are bypassing EPC mode here. if(EPC_MODE_ENABLED)
|
||||
if (ue_context_p->ue_context.Status == RRC_RECONFIGURED) {
|
||||
dedicated_DRB = 1;
|
||||
LOG_I(RRC,
|
||||
|
||||
@@ -592,14 +592,20 @@ rrc_eNB_send_S1AP_INITIAL_CONTEXT_SETUP_RESP(
|
||||
S1AP_INITIAL_CONTEXT_SETUP_RESP (msg_p).eNB_ue_s1ap_id = ue_context_pP->ue_context.eNB_ue_s1ap_id;
|
||||
|
||||
for (e_rab = 0; e_rab < ue_context_pP->ue_context.nb_of_e_rabs; e_rab++) {
|
||||
if (ue_context_pP->ue_context.e_rab[e_rab].status == E_RAB_STATUS_DONE) {
|
||||
if (ue_context_pP->ue_context.e_rab[e_rab].status == E_RAB_STATUS_DONE || ue_context_pP->ue_context.e_rab[e_rab].status == E_RAB_STATUS_TOMODIFY) {
|
||||
e_rabs_done++;
|
||||
S1AP_INITIAL_CONTEXT_SETUP_RESP (msg_p).e_rabs[e_rab].e_rab_id = ue_context_pP->ue_context.e_rab[e_rab].param.e_rab_id;
|
||||
// TODO add other information from S1-U when it will be integrated
|
||||
S1AP_INITIAL_CONTEXT_SETUP_RESP (msg_p).e_rabs[e_rab].gtp_teid = ue_context_pP->ue_context.enb_gtp_teid[e_rab];
|
||||
S1AP_INITIAL_CONTEXT_SETUP_RESP (msg_p).e_rabs[e_rab].eNB_addr = ue_context_pP->ue_context.enb_gtp_addrs[e_rab];
|
||||
S1AP_INITIAL_CONTEXT_SETUP_RESP (msg_p).e_rabs[e_rab].eNB_addr.length = 4;
|
||||
ue_context_pP->ue_context.e_rab[e_rab].status = E_RAB_STATUS_ESTABLISHED;
|
||||
if (ue_context_pP->ue_context.e_rab[e_rab].status == E_RAB_STATUS_DONE) {
|
||||
ue_context_pP->ue_context.e_rab[e_rab].status = E_RAB_STATUS_ESTABLISHED;
|
||||
S1AP_INITIAL_CONTEXT_SETUP_RESP (msg_p).nb_of_e_rabs = e_rabs_done;
|
||||
S1AP_INITIAL_CONTEXT_SETUP_RESP (msg_p).nb_of_e_rabs_failed = e_rabs_failed;
|
||||
itti_send_msg_to_task (TASK_S1AP, ctxt_pP->instance, msg_p);
|
||||
}
|
||||
|
||||
} else {
|
||||
e_rabs_failed++;
|
||||
ue_context_pP->ue_context.e_rab[e_rab].status = E_RAB_STATUS_FAILED;
|
||||
@@ -618,9 +624,6 @@ rrc_eNB_send_S1AP_INITIAL_CONTEXT_SETUP_RESP(
|
||||
ue_context_pP->ue_id_rnti,
|
||||
S1AP_INITIAL_CONTEXT_SETUP_RESP (msg_p).eNB_ue_s1ap_id,
|
||||
e_rabs_done, e_rabs_failed);
|
||||
S1AP_INITIAL_CONTEXT_SETUP_RESP (msg_p).nb_of_e_rabs = e_rabs_done;
|
||||
S1AP_INITIAL_CONTEXT_SETUP_RESP (msg_p).nb_of_e_rabs_failed = e_rabs_failed;
|
||||
itti_send_msg_to_task (TASK_S1AP, ctxt_pP->instance, msg_p);
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
@@ -70,7 +70,8 @@ typedef enum Rrc_Msg_Type_e {
|
||||
RRC_MEASUREMENT_PROCEDURE,
|
||||
NR_UE_RRC_MEASUREMENT,
|
||||
RRC_CONFIG_COMPLETE_REQ,
|
||||
NR_RRC_CONFIG_COMPLETE_REQ
|
||||
NR_RRC_CONFIG_COMPLETE_REQ,
|
||||
OAI_TUN_IFACE_NSA
|
||||
} Rrc_Msg_Type_t;
|
||||
|
||||
|
||||
|
||||
@@ -280,18 +280,18 @@ void rrc_add_nsa_user(gNB_RRC_INST *rrc,struct rrc_gNB_ue_context_s *ue_context_
|
||||
create_tunnel_req.num_tunnels = m->nb_e_rabs_tobeadded;
|
||||
RB_INSERT(rrc_nr_ue_tree_s, &RC.nrrrc[rrc->module_id]->rrc_ue_head, ue_context_p);
|
||||
PROTOCOL_CTXT_SET_BY_MODULE_ID(&ctxt, rrc->module_id, GNB_FLAG_YES, ue_context_p->ue_id_rnti, 0, 0,rrc->module_id);
|
||||
#if 1 //Melissa this is a hack: we are bypassing the EPC functionality.
|
||||
memset(&create_tunnel_resp, 0, sizeof(create_tunnel_resp));
|
||||
#else
|
||||
gtpv1u_create_s1u_tunnel(
|
||||
ctxt.instance,
|
||||
&create_tunnel_req,
|
||||
&create_tunnel_resp);
|
||||
rrc_gNB_process_GTPV1U_CREATE_TUNNEL_RESP(
|
||||
&ctxt,
|
||||
&create_tunnel_resp,
|
||||
&inde_list[0]);
|
||||
#endif
|
||||
if (!IS_SOFTMODEM_NOS1) {
|
||||
LOG_I(RRC, "Melissa Elkadi calling gtpv1u_create_s1u_tunnel()\n");
|
||||
gtpv1u_create_s1u_tunnel(
|
||||
ctxt.instance,
|
||||
&create_tunnel_req,
|
||||
&create_tunnel_resp);
|
||||
rrc_gNB_process_GTPV1U_CREATE_TUNNEL_RESP(
|
||||
&ctxt,
|
||||
&create_tunnel_resp,
|
||||
&inde_list[0]);
|
||||
}
|
||||
X2AP_ENDC_SGNB_ADDITION_REQ_ACK(msg).nb_e_rabs_admitted_tobeadded = m->nb_e_rabs_tobeadded;
|
||||
X2AP_ENDC_SGNB_ADDITION_REQ_ACK(msg).target_assoc_id = m->target_assoc_id;
|
||||
|
||||
|
||||
@@ -3132,6 +3132,19 @@ void process_lte_nsa_msg(nsa_msg_t *msg, int msg_len)
|
||||
break;
|
||||
}
|
||||
|
||||
case OAI_TUN_IFACE_NSA:
|
||||
{
|
||||
LOG_I(NR_RRC, "We got an OAI_TUN_IFACE_NSA!!\n");
|
||||
char cmd_line[RRC_BUF_SIZE];
|
||||
memcpy(cmd_line, msg_buffer, sizeof(cmd_line));
|
||||
LOG_I(NR_RRC, "Melissa Elkadi, this is the command line we got: %s\n", cmd_line);
|
||||
if (background_system(cmd_line) != 0)
|
||||
{
|
||||
LOG_E(NR_RRC, "ESM-PROC - failed command '%s'", cmd_line);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
default:
|
||||
LOG_E(NR_RRC, "No NSA Message Found\n");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user