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 @@ ...@@ -51,7 +51,7 @@
#include "executables/softmodem-common.h" #include "executables/softmodem-common.h"
#include "executables/nr-uesoftmodem.h" #include "executables/nr-uesoftmodem.h"
#include "LAYER2/NR_MAC_UE/mac_proto.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 DEBUG_PHY_PROC
#define NR_PDCCH_SCHED #define NR_PDCCH_SCHED
......
...@@ -347,13 +347,22 @@ typedef struct f1ap_rb_failed_to_be_setup_s { ...@@ -347,13 +347,22 @@ typedef struct f1ap_rb_failed_to_be_setup_s {
typedef struct cu_to_du_rrc_information_s { typedef struct cu_to_du_rrc_information_s {
uint8_t * cG_ConfigInfo; uint8_t * cG_ConfigInfo;
uint8_t cG_ConfigInfo_length; uint32_t cG_ConfigInfo_length;
uint8_t * uE_CapabilityRAT_ContainerList; uint8_t * uE_CapabilityRAT_ContainerList;
uint8_t uE_CapabilityRAT_ContainerList_length; uint32_t uE_CapabilityRAT_ContainerList_length;
uint8_t * measConfig; uint8_t * measConfig;
uint8_t measConfig_length; uint32_t measConfig_length;
}cu_to_du_rrc_information_t; }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 { typedef enum QoS_information_e {
NG_RAN_QoS = 0, NG_RAN_QoS = 0,
EUTRAN_QoS = 1, EUTRAN_QoS = 1,
...@@ -379,10 +388,13 @@ typedef struct f1ap_ue_context_setup_s { ...@@ -379,10 +388,13 @@ typedef struct f1ap_ue_context_setup_s {
uint32_t servCellId; uint32_t servCellId;
cu_to_du_rrc_information_t *cu_to_du_rrc_information; cu_to_du_rrc_information_t *cu_to_du_rrc_information;
uint8_t cu_to_du_rrc_information_length; uint8_t cu_to_du_rrc_information_length;
uint8_t *du_to_cu_rrc_information; //uint8_t *du_to_cu_rrc_information;
uint8_t du_to_cu_rrc_information_length; du_to_cu_rrc_information_t *du_to_cu_rrc_information;
f1ap_drb_to_be_setup_t *drbs_to_be_setup; // BK: need to replace by s1ap_initial_context_setup_req uint32_t du_to_cu_rrc_information_length;
uint8_t drbs_to_be_setup_length; // BK: need to replace by s1ap_initial_context_setup_req 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; QoS_information_t QoS_information_type;
uint8_t drbs_failed_to_be_setup_length; uint8_t drbs_failed_to_be_setup_length;
f1ap_rb_failed_to_be_setup_t *drbs_failed_to_be_setup; f1ap_rb_failed_to_be_setup_t *drbs_failed_to_be_setup;
...@@ -390,29 +402,11 @@ typedef struct f1ap_ue_context_setup_s { ...@@ -390,29 +402,11 @@ typedef struct f1ap_ue_context_setup_s {
uint8_t srbs_to_be_setup_length; uint8_t srbs_to_be_setup_length;
uint8_t srbs_failed_to_be_setup_length; uint8_t srbs_failed_to_be_setup_length;
f1ap_rb_failed_to_be_setup_t *srbs_failed_to_be_setup; 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; ReconfigurationCompl_t ReconfigComplOutcome;
// coniatner for the rrc_eNB_generate_SecurityModeCommand message
uint8_t *rrc_container; uint8_t *rrc_container;
int rrc_container_length; int rrc_container_length;
} f1ap_ue_context_setup_t; } 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 { typedef enum F1ap_Cause_e {
F1AP_CAUSE_NOTHING, /* No components present */ F1AP_CAUSE_NOTHING, /* No components present */
F1AP_CAUSE_RADIO_NETWORK, F1AP_CAUSE_RADIO_NETWORK,
......
...@@ -172,25 +172,20 @@ int DU_send_F1_SETUP_REQUEST(instance_t instance) { ...@@ -172,25 +172,20 @@ 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); MCC_MNC_TO_PLMNID(cell->mcc, cell->mnc, cell->mnc_digit_length, &servedPLMN_item->pLMN_Identity);
// // /* - CHOICE NR-MODE-Info */ // // /* - CHOICE NR-MODE-Info */
F1AP_NR_Mode_Info_t *nR_Mode_Info= &served_cell_information->nR_Mode_Info; F1AP_NR_Mode_Info_t *nR_Mode_Info= &served_cell_information->nR_Mode_Info;
//if(0){ F1AP_ProtocolExtensionContainer_154P34_t *p_154P34=calloc(1,sizeof(* p_154P34));
//F1AP_ProtocolExtensionContainer_154P260_t *p_154P260=calloc(1, sizeof(* p_154P260)); servedPLMN_item->iE_Extensions = (struct F1AP_ProtocolExtensionContainer *)p_154P34;
F1AP_ProtocolExtensionContainer_154P34_t *p_154P34=calloc(1,sizeof(* p_154P34)); asn1cSequenceAdd(p_154P34->list, F1AP_ServedPLMNs_ItemExtIEs_t , served_plmns_itemExtIEs);
servedPLMN_item->iE_Extensions = (struct F1AP_ProtocolExtensionContainer *)p_154P34; served_plmns_itemExtIEs->criticality = F1AP_Criticality_ignore;
asn1cSequenceAdd(p_154P34->list, F1AP_ServedPLMNs_ItemExtIEs_t , served_plmns_itemExtIEs); served_plmns_itemExtIEs->id = F1AP_ProtocolIE_ID_id_TAISliceSupportList;
served_plmns_itemExtIEs->criticality = F1AP_Criticality_ignore; served_plmns_itemExtIEs->extensionValue.present = F1AP_ServedPLMNs_ItemExtIEs__extensionValue_PR_SliceSupportList;
served_plmns_itemExtIEs->id = F1AP_ProtocolIE_ID_id_TAISliceSupportList; F1AP_SliceSupportList_t *slice_support_list = &served_plmns_itemExtIEs->extensionValue.choice.SliceSupportList;
served_plmns_itemExtIEs->extensionValue.present = F1AP_ServedPLMNs_ItemExtIEs__extensionValue_PR_SliceSupportList;
F1AP_SliceSupportList_t *slice_support_list = &served_plmns_itemExtIEs->extensionValue.choice.SliceSupportList; asn1cSequenceAdd(slice_support_list->list, F1AP_SliceSupportItem_t, SliceSupport_item);
INT8_TO_OCTET_STRING(1,&SliceSupport_item->sNSSAI.sST);
asn1cSequenceAdd(slice_support_list->list, F1AP_SliceSupportItem_t, SliceSupport_item); asn1cCalloc(SliceSupport_item->sNSSAI.sD, tmp);
INT8_TO_OCTET_STRING(1,&SliceSupport_item->sNSSAI.sST); INT24_TO_OCTET_STRING(10203,tmp);
//OCTET_STRING_fromBuf(&SliceSupport_item->sNSSAI.sST, "1", 1); //INT24_TO_OCTET_STRING(1,tmp);
asn1cCalloc(SliceSupport_item->sNSSAI.sD, tmp);
INT24_TO_OCTET_STRING(10203,tmp);
//OCTET_STRING_fromBuf(tmp, "1",1);
//}
if (f1ap_req(false, instance)->fdd_flag) { // FDD if (f1ap_req(false, instance)->fdd_flag) { // FDD
nR_Mode_Info->present = F1AP_NR_Mode_Info_PR_fDD; nR_Mode_Info->present = F1AP_NR_Mode_Info_PR_fDD;
asn1cCalloc(nR_Mode_Info->choice.fDD, fDD_Info); asn1cCalloc(nR_Mode_Info->choice.fDD, fDD_Info);
......
...@@ -1958,11 +1958,7 @@ int RCconfig_NR_DU_F1(MessageDef *msg_p, uint32_t i) { ...@@ -1958,11 +1958,7 @@ int RCconfig_NR_DU_F1(MessageDef *msg_p, uint32_t i) {
f1Setup->ranac[k] = 0; f1Setup->ranac[k] = 0;
f1Setup->mib[k] = rrc->carrier.MIB; f1Setup->mib[k] = rrc->carrier.MIB;
f1Setup->mib_length[k] = rrc->carrier.sizeof_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; NR_BCCH_DL_SCH_Message_t *bcch_message = NULL;
asn_dec_rval_t dec_rval = uper_decode_complete( 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) { ...@@ -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 ); xer_fprint(stdout, &asn_DEF_NR_SIB1,(void *)bcch_message->message.choice.c1->choice.systemInformationBlockType1 );
//} //}
f1Setup->sib1_length[k] = (enc_rval.encoded+7)/8; f1Setup->sib1_length[k] = (enc_rval.encoded+7)/8;
}
break; break;
} }
} }
......
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
#include "mac_defs.h" #include "mac_defs.h"
#include "LAYER2/NR_MAC_COMMON/nr_mac_extern.h" #include "LAYER2/NR_MAC_COMMON/nr_mac_extern.h"
#include "LAYER2/NR_MAC_UE/mac_proto.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" #include "NR_P-Max.h"
// Implementation of 6.2.4 Configured ransmitted power // 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 @@ ...@@ -41,7 +41,7 @@
#include "LAYER2/NR_MAC_COMMON/nr_mac_extern.h" #include "LAYER2/NR_MAC_COMMON/nr_mac_extern.h"
#include "NR_MAC_COMMON/nr_mac.h" #include "NR_MAC_COMMON/nr_mac.h"
#include "LAYER2/NR_MAC_UE/mac_proto.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> #include <executables/softmodem-common.h>
......
...@@ -908,10 +908,6 @@ void nr_schedule_ue_spec(module_id_t module_id, ...@@ -908,10 +908,6 @@ void nr_schedule_ue_spec(module_id_t module_id,
//if (slot==7 || slot == 17) return; //if (slot==7 || slot == 17) return;
/* PREPROCESSOR */ /* 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); gNB_mac->pre_processor_dl(module_id, frame, slot);
const int CC_id = 0; const int CC_id = 0;
NR_ServingCellConfigCommon_t *scc = gNB_mac->common_channels[CC_id].ServingCellConfigCommon; NR_ServingCellConfigCommon_t *scc = gNB_mac->common_channels[CC_id].ServingCellConfigCommon;
......
...@@ -36,6 +36,7 @@ ...@@ -36,6 +36,7 @@
#include <openair2/UTIL/OPT/opt.h> #include <openair2/UTIL/OPT/opt.h>
#include "LAYER2/NR_MAC_COMMON/nr_mac_extern.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) { int get_dci_format(NR_UE_sched_ctrl_t *sched_ctrl) {
......
...@@ -274,9 +274,8 @@ static void do_pdcp_data_ind( ...@@ -274,9 +274,8 @@ static void do_pdcp_data_ind(
if (rb != NULL) { if (rb != NULL) {
rb->recv_pdu(rb, (char *)sdu_buffer->data, sdu_buffer_size); rb->recv_pdu(rb, (char *)sdu_buffer->data, sdu_buffer_size);
} else { } 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); __FILE__, __LINE__, __FUNCTION__, rb_id, srb_flagP);
exit(1);
} }
nr_pdcp_manager_unlock(nr_pdcp_ue_manager); nr_pdcp_manager_unlock(nr_pdcp_ue_manager);
......
This diff is collapsed.
...@@ -1058,39 +1058,34 @@ rrc_gNB_process_NGAP_PDUSESSION_SETUP_REQ( ...@@ -1058,39 +1058,34 @@ rrc_gNB_process_NGAP_PDUSESSION_SETUP_REQ(
MessageDef *message_p; MessageDef *message_p;
message_p = itti_alloc_new_message (TASK_RRC_GNB, 0, F1AP_UE_CONTEXT_MODIFICATION_REQ); 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); 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->rnti = ue_context_p->ue_context.rnti;
req->mcc = RC.nrrrc[ctxt.module_id]->configuration.mcc[0]; req->mcc = RC.nrrrc[ctxt.module_id]->configuration.mcc[0];
req->mnc = RC.nrrrc[ctxt.module_id]->configuration.mnc[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->mnc_digit_length = RC.nrrrc[ctxt.module_id]->configuration.mnc_digit_length[0];
req->nr_cellid = RC.nrrrc[ctxt.module_id]->nr_cellid; 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*/
/*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 = malloc(1*sizeof(f1ap_srb_to_be_setup_t)); req->srbs_to_be_setup_length = 1;
req->srbs_to_be_setup_length = 1; f1ap_srb_to_be_setup_t *SRBs=req->srbs_to_be_setup;
f1ap_srb_to_be_setup_t *SRBs=req->srbs_to_be_setup; SRBs[0].srb_id = 2;
SRBs[0].srb_id = 2; SRBs[0].lcid = 2;
SRBs[0].lcid = 2;
/*Instruction towards the DU for DRB configuration and tunnel creation*/
/*Instruction towards the DU for DRB configuration and tunnel creation*/ gtpv1u_gnb_create_tunnel_req_t create_tunnel_req;
gtpv1u_gnb_create_tunnel_req_t create_tunnel_req; memset(&create_tunnel_req, 0, sizeof(gtpv1u_gnb_create_tunnel_req_t));
memset(&create_tunnel_req, 0, sizeof(gtpv1u_gnb_create_tunnel_req_t)); req->drbs_to_be_setup = malloc(1*sizeof(f1ap_drb_to_be_setup_t));
req->drbs_to_be_setup = malloc(1*sizeof(f1ap_drb_to_be_setup_t)); req->drbs_to_be_setup_length = 1;
req->drbs_to_be_setup_length = 1; f1ap_drb_to_be_setup_t *DRBs=req->drbs_to_be_setup;
f1ap_drb_to_be_setup_t *DRBs=req->drbs_to_be_setup; LOG_D(RRC, "Length of DRB list:%d \n", req->drbs_to_be_setup_length);
LOG_I(RRC, "Length of DRB list:%d \n", req->drbs_to_be_setup_length); DRBs[0].drb_id = 1;
DRBs[0].drb_id = 1; DRBs[0].rlc_mode = RLC_MODE_AM;
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);
DRBs[0].up_ul_tnl[0].tl_address = inet_addr(RC.nrrrc[ctxt.module_id]->eth_params_s.my_addr); DRBs[0].up_ul_tnl[0].port=RC.nrrrc[ctxt.module_id]->eth_params_s.my_portd;
DRBs[0].up_ul_tnl[0].port=RC.nrrrc[ctxt.module_id]->eth_params_s.my_portd; DRBs[0].up_ul_tnl_length = 1;
DRBs[0].up_ul_tnl_length = 1; 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].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[0].port=RC.nrrrc[ctxt.module_id]->eth_params_s.remote_portd; DRBs[0].up_dl_tnl_length = 1;
DRBs[0].up_dl_tnl_length = 1;
//}
itti_send_msg_to_task (TASK_CU_F1, ctxt.module_id, message_p); 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