Commit 2521e465 authored by Cedric Roux's avatar Cedric Roux

Merge remote-tracking branch 'origin/F1C_extensions_develop' into F1_interop_ACC_n78

Conflicts:
	openair2/F1AP/f1ap_du_interface_management.c
	openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c
	openair2/LAYER2/NR_MAC_gNB/main.c
	openair2/RRC/NR/MESSAGES/asn1_msg.c
	openair2/RRC/NR/MESSAGES/asn1_msg.h
	openair2/RRC/NR/rrc_gNB.c
	openair3/ocp-gtpu/gtp_itf.cpp
parents 33b69bdf f9e5c987
......@@ -51,7 +51,7 @@
#include "executables/softmodem-common.h"
#include "executables/nr-uesoftmodem.h"
#include "LAYER2/NR_MAC_UE/mac_proto.h"
//#include "LAYER2/NR_MAC_UE/nr_l1_helpers.h"
#include "LAYER2/NR_MAC_UE/nr_l1_helpers.h"
//#define DEBUG_PHY_PROC
#define NR_PDCCH_SCHED
......
......@@ -347,13 +347,22 @@ typedef struct f1ap_rb_failed_to_be_setup_s {
typedef struct cu_to_du_rrc_information_s {
uint8_t * cG_ConfigInfo;
uint8_t cG_ConfigInfo_length;
uint32_t cG_ConfigInfo_length;
uint8_t * uE_CapabilityRAT_ContainerList;
uint8_t uE_CapabilityRAT_ContainerList_length;
uint32_t uE_CapabilityRAT_ContainerList_length;
uint8_t * measConfig;
uint8_t measConfig_length;
uint32_t measConfig_length;
}cu_to_du_rrc_information_t;
typedef struct du_to_du_rrc_information_s {
uint8_t * cellGroupConfig;
uint8_t cellGroupConfig_length;
uint8_t * measGapConfig;
uint8_t measGapConfig_length;
uint8_t * requestedP_MaxFR1;
uint8_t requestedP_MaxFR1_length;
}du_to_cu_rrc_information_t;
typedef enum QoS_information_e {
NG_RAN_QoS = 0,
EUTRAN_QoS = 1,
......@@ -379,10 +388,13 @@ typedef struct f1ap_ue_context_setup_s {
uint32_t servCellId;
cu_to_du_rrc_information_t *cu_to_du_rrc_information;
uint8_t cu_to_du_rrc_information_length;
uint8_t *du_to_cu_rrc_information;
uint8_t du_to_cu_rrc_information_length;
f1ap_drb_to_be_setup_t *drbs_to_be_setup; // BK: need to replace by s1ap_initial_context_setup_req
uint8_t drbs_to_be_setup_length; // BK: need to replace by s1ap_initial_context_setup_req
//uint8_t *du_to_cu_rrc_information;
du_to_cu_rrc_information_t *du_to_cu_rrc_information;
uint32_t du_to_cu_rrc_information_length;
f1ap_drb_to_be_setup_t *drbs_to_be_setup;
uint8_t drbs_to_be_setup_length;
f1ap_drb_to_be_setup_t *drbs_to_be_modified;
uint8_t drbs_to_be_modified_length;
QoS_information_t QoS_information_type;
uint8_t drbs_failed_to_be_setup_length;
f1ap_rb_failed_to_be_setup_t *drbs_failed_to_be_setup;
......@@ -390,29 +402,11 @@ typedef struct f1ap_ue_context_setup_s {
uint8_t srbs_to_be_setup_length;
uint8_t srbs_failed_to_be_setup_length;
f1ap_rb_failed_to_be_setup_t *srbs_failed_to_be_setup;
s1ap_initial_context_setup_req_t *s1ap_initial_context_setup_req;
ReconfigurationCompl_t ReconfigComplOutcome;
// coniatner for the rrc_eNB_generate_SecurityModeCommand message
uint8_t *rrc_container;
int rrc_container_length;
} f1ap_ue_context_setup_t;
typedef struct f1ap_ue_context_setup_resp_s {
uint32_t gNB_CU_ue_id; // BK: need to replace by use from rnti
uint32_t gNB_DU_ue_id;
uint16_t rnti;
uint8_t du_to_cu_rrc_information[1024 /*Arbitrarily big enough*/];
uint32_t du_to_cu_rrc_information_length;
f1ap_drb_to_be_setup_t *drbs_setup; // BK: need to replace by s1ap_initial_context_setup_req
uint8_t drbs_setup_length; // BK: need to replace by s1ap_initial_context_setup_req
f1ap_srb_to_be_setup_t *srbs_setup;
uint8_t srbs_setup_length;
uint8_t srbs_failed_to_be_setup_length;
f1ap_rb_failed_to_be_setup_t *srbs_failed_to_be_setup;
uint8_t drbs_failed_to_be_setup_length;
f1ap_rb_failed_to_be_setup_t *drbs_failed_to_be_setup;
} f1ap_ue_context_setup_resp_t;
typedef enum F1ap_Cause_e {
F1AP_CAUSE_NOTHING, /* No components present */
F1AP_CAUSE_RADIO_NETWORK,
......
......@@ -135,9 +135,9 @@ int CU_send_UE_CONTEXT_SETUP_REQUEST(instance_t instance,
/* optional */
/* 6.1 cG_ConfigInfo */
if(f1ap_ue_context_setup_req->cu_to_du_rrc_information->cG_ConfigInfo!=NULL){
const char cG_ConfigInfoStr[]="asdsa1d32sa1d31asd31as";
asn1cCalloc(ie6->value.choice.CUtoDURRCInformation.cG_ConfigInfo, cG_ConfigInfo);
OCTET_STRING_fromBuf(cG_ConfigInfo, cG_ConfigInfoStr, strlen(cG_ConfigInfoStr)) ;
OCTET_STRING_fromBuf(cG_ConfigInfo, (const char *)f1ap_ue_context_setup_req->cu_to_du_rrc_information->cG_ConfigInfo,
f1ap_ue_context_setup_req->cu_to_du_rrc_information->cG_ConfigInfo_length);
}
/* optional */
/* 6.2 uE_CapabilityRAT_ContainerList */
......@@ -149,9 +149,9 @@ int CU_send_UE_CONTEXT_SETUP_REQUEST(instance_t instance,
/* optional */
/* 6.3 measConfig */
if(f1ap_ue_context_setup_req->cu_to_du_rrc_information->measConfig!=NULL){
const char measConfigStr[]="asdsa1d32sa1d31asd31as";
asn1cCalloc(ie6->value.choice.CUtoDURRCInformation.measConfig, measConfig);
OCTET_STRING_fromBuf(measConfig, measConfigStr, strlen(measConfigStr)) ;
OCTET_STRING_fromBuf(measConfig, (const char*)f1ap_ue_context_setup_req->cu_to_du_rrc_information->measConfig,
f1ap_ue_context_setup_req->cu_to_du_rrc_information->measConfig_length);
}
}
......@@ -254,7 +254,6 @@ int CU_send_UE_CONTEXT_SETUP_REQUEST(instance_t instance,
ie11->value.present = F1AP_UEContextSetupRequestIEs__value_PR_SRBs_ToBeSetup_List;
for (int i=0; i<f1ap_ue_context_setup_req->srbs_to_be_setup_length; i++) {
//
asn1cSequenceAdd(ie11->value.choice.SRBs_ToBeSetup_List.list, F1AP_SRBs_ToBeSetup_ItemIEs_t, srbs_toBeSetup_item_ies);
srbs_toBeSetup_item_ies->id = F1AP_ProtocolIE_ID_id_SRBs_ToBeSetup_Item; // 73
srbs_toBeSetup_item_ies->criticality = F1AP_Criticality_ignore;
......@@ -265,10 +264,8 @@ int CU_send_UE_CONTEXT_SETUP_REQUEST(instance_t instance,
srbs_toBeSetup_item->sRBID = f1ap_ue_context_setup_req->srbs_to_be_setup[i].srb_id;
/* OPTIONAL */
/* 11.1.2 duplicationIndication */
//if (0) {
asn1cCallocOne(srbs_toBeSetup_item->duplicationIndication,
F1AP_DuplicationIndication_true); // enum
//}
}
}
......@@ -673,9 +670,10 @@ int CU_handle_UE_CONTEXT_SETUP_RESPONSE(instance_t instance,
return -1;
}
f1ap_ue_context_setup_resp->du_to_cu_rrc_information = (uint8_t *)calloc(1,ie->value.choice.DUtoCURRCInformation.cellGroupConfig.size);
memcpy(f1ap_ue_context_setup_resp->du_to_cu_rrc_information, ie->value.choice.DUtoCURRCInformation.cellGroupConfig.buf, ie->value.choice.DUtoCURRCInformation.cellGroupConfig.size);
f1ap_ue_context_setup_resp->du_to_cu_rrc_information_length = ie->value.choice.DUtoCURRCInformation.cellGroupConfig.size;
f1ap_ue_context_setup_resp->du_to_cu_rrc_information = (du_to_cu_rrc_information_t *)calloc(1,sizeof(du_to_cu_rrc_information_t));
f1ap_ue_context_setup_resp->du_to_cu_rrc_information->cellGroupConfig = (uint8_t *)calloc(1,ie->value.choice.DUtoCURRCInformation.cellGroupConfig.size);
memcpy(f1ap_ue_context_setup_resp->du_to_cu_rrc_information->cellGroupConfig, ie->value.choice.DUtoCURRCInformation.cellGroupConfig.buf, ie->value.choice.DUtoCURRCInformation.cellGroupConfig.size);
f1ap_ue_context_setup_resp->du_to_cu_rrc_information->cellGroupConfig_length = ie->value.choice.DUtoCURRCInformation.cellGroupConfig.size;
// DRBs_Setup_List
F1AP_FIND_PROTOCOLIE_BY_ID(F1AP_UEContextSetupResponseIEs_t, ie, container,
F1AP_ProtocolIE_ID_id_DRBs_Setup_List, false);
......@@ -1143,7 +1141,7 @@ int CU_send_UE_CONTEXT_MODIFICATION_REQUEST(instance_t instance, f1ap_ue_context
/* optional */
/* c7. RRCRconfigurationCompleteIndicator */
if (0) {
if (f1ap_ue_context_modification_req->ReconfigComplOutcome == RRCreconf_success) {
asn1cSequenceAdd(out->protocolIEs.list, F1AP_UEContextModificationRequestIEs_t, ie71);
ie71->id = F1AP_ProtocolIE_ID_id_RRCReconfigurationCompleteIndicator;
ie71->criticality = F1AP_Criticality_ignore;
......@@ -1153,13 +1151,13 @@ int CU_send_UE_CONTEXT_MODIFICATION_REQUEST(instance_t instance, f1ap_ue_context
/* optional */
/* c8. RRCContainer */
if (0) {
if (f1ap_ue_context_modification_req->rrc_container != NULL) {
asn1cSequenceAdd(out->protocolIEs.list, F1AP_UEContextModificationRequestIEs_t, ie81);
ie81->id = F1AP_ProtocolIE_ID_id_RRCContainer;
ie81->criticality = F1AP_Criticality_ignore;
ie81->value.present = F1AP_UEContextModificationRequestIEs__value_PR_RRCContainer;
OCTET_STRING_fromBuf(&ie81->value.choice.RRCContainer, "asdsa1d32sa1d31asd31as",
strlen("asdsa1d32sa1d31asd31as"));
OCTET_STRING_fromBuf(&ie81->value.choice.RRCContainer, (const char*)f1ap_ue_context_modification_req->rrc_container,
f1ap_ue_context_modification_req->rrc_container_length);
}
/* optional */
......@@ -1232,10 +1230,8 @@ int CU_send_UE_CONTEXT_MODIFICATION_REQUEST(instance_t instance, f1ap_ue_context
srbs_toBeSetupMod_item->sRBID = f1ap_ue_context_modification_req->srbs_to_be_setup[i].srb_id;
/* OPTIONAL */
/* 11.1.2 duplicationIndication */
//if (0) {
asn1cCallocOne(srbs_toBeSetupMod_item->duplicationIndication,
F1AP_DuplicationIndication_true); // enum
//}
}
}
......@@ -1682,10 +1678,11 @@ int CU_handle_UE_CONTEXT_MODIFICATION_RESPONSE(instance_t instance,
F1AP_FIND_PROTOCOLIE_BY_ID(F1AP_UEContextModificationResponseIEs_t, ie, container,
F1AP_ProtocolIE_ID_id_DUtoCURRCInformation, false);
if(ie!=NULL){
f1ap_ue_context_modification_resp->du_to_cu_rrc_information = (uint8_t *)calloc(1,ie->value.choice.DUtoCURRCInformation.cellGroupConfig.size);
f1ap_ue_context_modification_resp->du_to_cu_rrc_information = (du_to_cu_rrc_information_t *)calloc(1, sizeof(du_to_cu_rrc_information_t));
f1ap_ue_context_modification_resp->du_to_cu_rrc_information->cellGroupConfig = (uint8_t *)calloc(1,ie->value.choice.DUtoCURRCInformation.cellGroupConfig.size);
memcpy(f1ap_ue_context_modification_resp->du_to_cu_rrc_information, ie->value.choice.DUtoCURRCInformation.cellGroupConfig.buf, ie->value.choice.DUtoCURRCInformation.cellGroupConfig.size);
f1ap_ue_context_modification_resp->du_to_cu_rrc_information_length = ie->value.choice.DUtoCURRCInformation.cellGroupConfig.size;
memcpy(f1ap_ue_context_modification_resp->du_to_cu_rrc_information->cellGroupConfig, ie->value.choice.DUtoCURRCInformation.cellGroupConfig.buf, ie->value.choice.DUtoCURRCInformation.cellGroupConfig.size);
f1ap_ue_context_modification_resp->du_to_cu_rrc_information->cellGroupConfig_length = ie->value.choice.DUtoCURRCInformation.cellGroupConfig.size;
}
// DRBs_SetupMod_List
......
......@@ -172,8 +172,6 @@ int DU_send_F1_SETUP_REQUEST(instance_t instance) {
MCC_MNC_TO_PLMNID(cell->mcc, cell->mnc, cell->mnc_digit_length, &servedPLMN_item->pLMN_Identity);
// // /* - CHOICE NR-MODE-Info */
F1AP_NR_Mode_Info_t *nR_Mode_Info= &served_cell_information->nR_Mode_Info;
//if(0){
//F1AP_ProtocolExtensionContainer_154P260_t *p_154P260=calloc(1, sizeof(* p_154P260));
F1AP_ProtocolExtensionContainer_154P34_t *p_154P34=calloc(1,sizeof(* p_154P34));
servedPLMN_item->iE_Extensions = (struct F1AP_ProtocolExtensionContainer *)p_154P34;
asn1cSequenceAdd(p_154P34->list, F1AP_ServedPLMNs_ItemExtIEs_t , served_plmns_itemExtIEs);
......@@ -184,12 +182,9 @@ int DU_send_F1_SETUP_REQUEST(instance_t instance) {
asn1cSequenceAdd(slice_support_list->list, F1AP_SliceSupportItem_t, SliceSupport_item);
INT8_TO_OCTET_STRING(1,&SliceSupport_item->sNSSAI.sST);
//OCTET_STRING_fromBuf(&SliceSupport_item->sNSSAI.sST, "1", 1);
asn1cCalloc(SliceSupport_item->sNSSAI.sD, tmp);
INT24_TO_OCTET_STRING(10203,tmp);
//OCTET_STRING_fromBuf(tmp, "1",1);
//}
//INT24_TO_OCTET_STRING(1,tmp);
if (f1ap_req(false, instance)->fdd_flag) { // FDD
nR_Mode_Info->present = F1AP_NR_Mode_Info_PR_fDD;
......
......@@ -1958,11 +1958,7 @@ int RCconfig_NR_DU_F1(MessageDef *msg_p, uint32_t i) {
f1Setup->ranac[k] = 0;
f1Setup->mib[k] = rrc->carrier.MIB;
f1Setup->mib_length[k] = rrc->carrier.sizeof_MIB;
if(0){
f1Setup->sib1[k] = rrc->carrier.SIB1;
f1Setup->sib1_length[k] = rrc->carrier.sizeof_SIB1;
}
else{
NR_BCCH_DL_SCH_Message_t *bcch_message = NULL;
asn_dec_rval_t dec_rval = uper_decode_complete( NULL,
......@@ -1993,7 +1989,6 @@ int RCconfig_NR_DU_F1(MessageDef *msg_p, uint32_t i) {
xer_fprint(stdout, &asn_DEF_NR_SIB1,(void *)bcch_message->message.choice.c1->choice.systemInformationBlockType1 );
//}
f1Setup->sib1_length[k] = (enc_rval.encoded+7)/8;
}
break;
}
}
......
......@@ -35,7 +35,7 @@
#include "mac_defs.h"
#include "LAYER2/NR_MAC_COMMON/nr_mac_extern.h"
#include "LAYER2/NR_MAC_UE/mac_proto.h"
//#include "LAYER2/NR_MAC_UE/nr_l1_helpers.h"
#include "LAYER2/NR_MAC_UE/nr_l1_helpers.h"
#include "NR_P-Max.h"
// Implementation of 6.2.4 Configured ransmitted power
......
/*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
* except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/
/** \brief Function to compute configured maximum output power according to clause 6.2.4 of 3GPP TS 38.101-1 version 16.5.0 Release 16
@param Mod_id Module id of UE
*/
long nr_get_Pcmax(module_id_t mod_id);
/** @}*/
......@@ -41,7 +41,7 @@
#include "LAYER2/NR_MAC_COMMON/nr_mac_extern.h"
#include "NR_MAC_COMMON/nr_mac.h"
#include "LAYER2/NR_MAC_UE/mac_proto.h"
//#include "LAYER2/NR_MAC_UE/nr_l1_helpers.h"
#include "LAYER2/NR_MAC_UE/nr_l1_helpers.h"
#include <executables/softmodem-common.h>
......
......@@ -908,10 +908,6 @@ void nr_schedule_ue_spec(module_id_t module_id,
//if (slot==7 || slot == 17) return;
/* PREPROCESSOR */
//Following commented section condition should be removed before update with develop.
/*if(slot!= 1 && slot!=11){
return;
}*/
gNB_mac->pre_processor_dl(module_id, frame, slot);
const int CC_id = 0;
NR_ServingCellConfigCommon_t *scc = gNB_mac->common_channels[CC_id].ServingCellConfigCommon;
......
......@@ -36,6 +36,7 @@
#include <openair2/UTIL/OPT/opt.h>
#include "LAYER2/NR_MAC_COMMON/nr_mac_extern.h"
extern void process_CellGroup(NR_CellGroupConfig_t *CellGroup, NR_UE_sched_ctrl_t *sched_ctrl);
int get_dci_format(NR_UE_sched_ctrl_t *sched_ctrl) {
......
......@@ -274,9 +274,8 @@ static void do_pdcp_data_ind(
if (rb != NULL) {
rb->recv_pdu(rb, (char *)sdu_buffer->data, sdu_buffer_size);
} else {
LOG_E(PDCP, "%s:%d:%s: fatal: no RB found (rb_id %ld, srb_flag %d)\n",
LOG_E(PDCP, "%s:%d:%s: no RB found (rb_id %ld, srb_flag %d)\n",
__FILE__, __LINE__, __FUNCTION__, rb_id, srb_flagP);
exit(1);
}
nr_pdcp_manager_unlock(nr_pdcp_ue_manager);
......
This diff is collapsed.
......@@ -1058,16 +1058,12 @@ rrc_gNB_process_NGAP_PDUSESSION_SETUP_REQ(
MessageDef *message_p;
message_p = itti_alloc_new_message (TASK_RRC_GNB, 0, F1AP_UE_CONTEXT_MODIFICATION_REQ);
f1ap_ue_context_setup_t *req=&F1AP_UE_CONTEXT_MODIFICATION_REQ (message_p);
//UE_IDs will be extracted from F1AP layer
req->gNB_CU_ue_id = 0;
req->gNB_DU_ue_id = 0;
req->rnti = ue_context_p->ue_context.rnti;
req->mcc = RC.nrrrc[ctxt.module_id]->configuration.mcc[0];
req->mnc = RC.nrrrc[ctxt.module_id]->configuration.mnc[0];
req->mnc_digit_length = RC.nrrrc[ctxt.module_id]->configuration.mnc_digit_length[0];
req->nr_cellid = RC.nrrrc[ctxt.module_id]->nr_cellid;
//if (ue_context_p->ue_context.established_pdu_sessions_flag == 1) {
/*Instruction towards the DU for SRB2 configuration*/
req->srbs_to_be_setup = malloc(1*sizeof(f1ap_srb_to_be_setup_t));
req->srbs_to_be_setup_length = 1;
......@@ -1081,7 +1077,7 @@ rrc_gNB_process_NGAP_PDUSESSION_SETUP_REQ(
req->drbs_to_be_setup = malloc(1*sizeof(f1ap_drb_to_be_setup_t));
req->drbs_to_be_setup_length = 1;
f1ap_drb_to_be_setup_t *DRBs=req->drbs_to_be_setup;
LOG_I(RRC, "Length of DRB list:%d \n", req->drbs_to_be_setup_length);
LOG_D(RRC, "Length of DRB list:%d \n", req->drbs_to_be_setup_length);
DRBs[0].drb_id = 1;
DRBs[0].rlc_mode = RLC_MODE_AM;
DRBs[0].up_ul_tnl[0].tl_address = inet_addr(RC.nrrrc[ctxt.module_id]->eth_params_s.my_addr);
......@@ -1090,7 +1086,6 @@ rrc_gNB_process_NGAP_PDUSESSION_SETUP_REQ(
DRBs[0].up_dl_tnl[0].tl_address = inet_addr(RC.nrrrc[ctxt.module_id]->eth_params_s.remote_addr);
DRBs[0].up_dl_tnl[0].port=RC.nrrrc[ctxt.module_id]->eth_params_s.remote_portd;
DRBs[0].up_dl_tnl_length = 1;
//}
itti_send_msg_to_task (TASK_CU_F1, ctxt.module_id, message_p);
}
......
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