Commit c43281a7 authored by Raymond Knopp's avatar Raymond Knopp

Merge branch 'feature-127-protocol-split' of...

Merge branch 'feature-127-protocol-split' of https://gitlab.eurecom.fr/oai/openairinterface5g into feature-127-protocol-split
parents 4cdc0138 876e9efd
...@@ -416,7 +416,7 @@ void RCconfig_macrlc(int macrlc_has_f1[MAX_MAC_INST]) { ...@@ -416,7 +416,7 @@ void RCconfig_macrlc(int macrlc_has_f1[MAX_MAC_INST]) {
} }
int RCconfig_RRC(uint32_t i, eNB_RRC_INST *rrc) { int RCconfig_RRC(uint32_t i, eNB_RRC_INST *rrc, int macrlc_has_f1) {
int num_enbs = 0; int num_enbs = 0;
...@@ -637,10 +637,7 @@ int RCconfig_RRC(uint32_t i, eNB_RRC_INST *rrc) { ...@@ -637,10 +637,7 @@ int RCconfig_RRC(uint32_t i, eNB_RRC_INST *rrc) {
LOG_I(RRC,"Instance %d: Southbound Transport %s\n",i,*(ENBParamList.paramarray[i][ENB_TRANSPORT_S_PREFERENCE_IDX].strptr)); LOG_I(RRC,"Instance %d: Southbound Transport %s\n",i,*(ENBParamList.paramarray[i][ENB_TRANSPORT_S_PREFERENCE_IDX].strptr));
if (strcmp(*(ENBParamList.paramarray[i][ENB_TRANSPORT_S_PREFERENCE_IDX].strptr), "local_mac") == 0) { if (strcmp(*(ENBParamList.paramarray[i][ENB_TRANSPORT_S_PREFERENCE_IDX].strptr), "f1") == 0) {
rrc->node_type = ngran_eNB;
}
else if (strcmp(*(ENBParamList.paramarray[i][ENB_TRANSPORT_S_PREFERENCE_IDX].strptr), "f1") == 0) {
paramdef_t SCTPParams[] = SCTPPARAMS_DESC; paramdef_t SCTPParams[] = SCTPPARAMS_DESC;
char aprefix[MAX_OPTNAME_SIZE*2 + 8]; char aprefix[MAX_OPTNAME_SIZE*2 + 8];
...@@ -675,9 +672,11 @@ int RCconfig_RRC(uint32_t i, eNB_RRC_INST *rrc) { ...@@ -675,9 +672,11 @@ int RCconfig_RRC(uint32_t i, eNB_RRC_INST *rrc) {
} }
else { // no F1 else {
// set to ngran_eNB for now, it will get set to ngran_DU if macrlc entity which uses F1 is present // set to ngran_eNB for now, it will get set to ngran_eNB_DU if macrlc entity which uses F1 is present
rrc->node_type = ngran_eNB; // Note: we will have to handle the case of ngran_ng_eNB_DU
if (macrlc_has_f1 == 0) rrc->node_type = ngran_eNB;
else rrc->node_type = ngran_eNB_DU;
} }
// MCC and MNC // MCC and MNC
...@@ -744,7 +743,7 @@ int RCconfig_RRC(uint32_t i, eNB_RRC_INST *rrc) { ...@@ -744,7 +743,7 @@ int RCconfig_RRC(uint32_t i, eNB_RRC_INST *rrc) {
nb_cc++; nb_cc++;
if (rrc->node_type != ngran_eNB_CU && rrc->node_type != ngran_ng_eNB_CU) { if ( (rrc->node_type != ngran_eNB_CU) || (rrc->node_type != ngran_ng_eNB_CU) || (rrc->node_type != ngran_gNB_CU) ) {
// Cell params, MIB/SIB1 in DU // Cell params, MIB/SIB1 in DU
RRC_CONFIGURATION_REQ (msg_p).tdd_config[j] = tdd_config; RRC_CONFIGURATION_REQ (msg_p).tdd_config[j] = tdd_config;
...@@ -822,7 +821,7 @@ int RCconfig_RRC(uint32_t i, eNB_RRC_INST *rrc) { ...@@ -822,7 +821,7 @@ int RCconfig_RRC(uint32_t i, eNB_RRC_INST *rrc) {
RRC_CONFIGURATION_REQ (msg_p).nb_antenna_ports[j] = nb_antenna_ports; RRC_CONFIGURATION_REQ (msg_p).nb_antenna_ports[j] = nb_antenna_ports;
} }
else {//this is CU, SIB2-20 in CU if (rrc->node_type != ngran_eNB_DU) {//this is CU or eNB, SIB2-20 in CU
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0)) #if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
if (!pbch_repetition) if (!pbch_repetition)
...@@ -1825,9 +1824,9 @@ int RCconfig_RRC(uint32_t i, eNB_RRC_INST *rrc) { ...@@ -1825,9 +1824,9 @@ int RCconfig_RRC(uint32_t i, eNB_RRC_INST *rrc) {
RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_ResourceConfig_subframeBitmap_choice_bs_bits_unused[j] = discRxPoolPS_ResourceConfig_subframeBitmap_choice_bs_bits_unused; RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_ResourceConfig_subframeBitmap_choice_bs_bits_unused[j] = discRxPoolPS_ResourceConfig_subframeBitmap_choice_bs_bits_unused;
} // node_type!=ngran_eNB_DU
} }
} if ( (rrc->node_type == ngran_eNB_CU) || (rrc->node_type == ngran_ng_eNB_CU) || (rrc->node_type == ngran_gNB_CU) ) {
if (rrc->node_type == ngran_eNB_CU || rrc->node_type == ngran_ng_eNB_CU) {
char srb1path[MAX_OPTNAME_SIZE*2 + 8]; char srb1path[MAX_OPTNAME_SIZE*2 + 8];
sprintf(srb1path,"%s.%s",enbpath,ENB_CONFIG_STRING_SRB1); sprintf(srb1path,"%s.%s",enbpath,ENB_CONFIG_STRING_SRB1);
int npar = config_get( SRB1Params,sizeof(SRB1Params)/sizeof(paramdef_t), srb1path); int npar = config_get( SRB1Params,sizeof(SRB1Params)/sizeof(paramdef_t), srb1path);
...@@ -2179,6 +2178,8 @@ int RCconfig_RRC(uint32_t i, eNB_RRC_INST *rrc) { ...@@ -2179,6 +2178,8 @@ int RCconfig_RRC(uint32_t i, eNB_RRC_INST *rrc) {
#endif #endif
} }
LOG_I(RRC,"Node type %d \n ", rrc->node_type);
return 0; return 0;
} }
...@@ -3010,10 +3011,9 @@ void read_config_and_init() ...@@ -3010,10 +3011,9 @@ void read_config_and_init()
RC.rrc[enb_id] = malloc(sizeof(eNB_RRC_INST)); RC.rrc[enb_id] = malloc(sizeof(eNB_RRC_INST));
AssertFatal(RC.rrc[enb_id], "RRC context for eNB %d not allocated\n", enb_id); AssertFatal(RC.rrc[enb_id], "RRC context for eNB %d not allocated\n", enb_id);
memset((void *)RC.rrc[enb_id], 0, sizeof(eNB_RRC_INST)); memset((void *)RC.rrc[enb_id], 0, sizeof(eNB_RRC_INST));
RCconfig_RRC(enb_id, RC.rrc[enb_id]); RCconfig_RRC(enb_id, RC.rrc[enb_id],macrlc_has_f1[enb_id]);
if (macrlc_has_f1[enb_id]) RC.rrc[enb_id]->node_type = ngran_eNB_DU;
} }
if (RC.nb_macrlc_inst == 0) if (RC.rrc[0]->node_type != ngran_eNB_DU)
pdcp_layer_init(); pdcp_layer_init();
} }
...@@ -115,7 +115,7 @@ extern void RCConfig(void); ...@@ -115,7 +115,7 @@ extern void RCConfig(void);
void enb_config_display(void); void enb_config_display(void);
void ru_config_display(void); void ru_config_display(void);
int RCconfig_RRC(uint32_t i, eNB_RRC_INST *rrc); int RCconfig_RRC(uint32_t i, eNB_RRC_INST *rrc, int macrlc_has_f1);
int RCconfig_S1(MessageDef *msg_p, uint32_t i); int RCconfig_S1(MessageDef *msg_p, uint32_t i);
void read_config_and_init(void); void read_config_and_init(void);
......
...@@ -314,6 +314,7 @@ int DU_handle_DL_RRC_MESSAGE_TRANSFER(instance_t instance, ...@@ -314,6 +314,7 @@ int DU_handle_DL_RRC_MESSAGE_TRANSFER(instance_t instance,
"Unknown message\n"); "Unknown message\n");
break; break;
}// switch case }// switch case
return(0);
} else if (srb_id == 1) { } else if (srb_id == 1) {
// rrc_rlc_config_asn1_req(&ctxt, // rrc_rlc_config_asn1_req(&ctxt,
// SRB_configList, // SRB_configList,
...@@ -325,7 +326,90 @@ int DU_handle_DL_RRC_MESSAGE_TRANSFER(instance_t instance, ...@@ -325,7 +326,90 @@ int DU_handle_DL_RRC_MESSAGE_TRANSFER(instance_t instance,
// # endif // # endif
// ); // );
LOG_I(DU_F1AP, "Received DL RRC Transfer on srb_id 1\n"); DL_DCCH_Message_t* dl_dcch_msg=NULL;
asn_dec_rval_t dec_rval;
dec_rval = uper_decode(NULL,
&asn_DEF_DL_DCCH_Message,
(void**)&dl_dcch_msg,
ie->value.choice.RRCContainer.buf,
rrc_dl_sdu_len,0,0);
if (dl_dcch_msg->message.present == DL_DCCH_MessageType_PR_c1) {
switch (dl_dcch_msg->message.choice.c1.present) {
case DL_DCCH_MessageType__c1_PR_NOTHING:
LOG_I(RRC, "Received PR_NOTHING on DL-DCCH-Message\n");
return;
case DL_DCCH_MessageType__c1_PR_csfbParametersResponseCDMA2000:
case DL_DCCH_MessageType__c1_PR_dlInformationTransfer:
case DL_DCCH_MessageType__c1_PR_handoverFromEUTRAPreparationRequest:
case DL_DCCH_MessageType__c1_PR_mobilityFromEUTRACommand:
break;
case DL_DCCH_MessageType__c1_PR_rrcConnectionReconfiguration:
// handle RRCConnectionReconfiguration
LOG_I(RRC,
"Logical Channel DL-DCCH (SRB1), Received RRCConnectionReconfiguration DU_ID %x/RNTI %x\n",
du_ue_f1ap_id,
f1ap_get_rnti_by_du_id(&f1ap_du_ue[instance],du_ue_f1ap_id));
RRCConnectionReconfiguration_t* rrcConnectionReconfiguration = &dl_dcch_msg->message.choice.c1.choice.rrcConnectionReconfiguration;
if (rrcConnectionReconfiguration->criticalExtensions.present == RRCConnectionReconfiguration__criticalExtensions_PR_c1) {
if (rrcConnectionReconfiguration->criticalExtensions.choice.c1.present ==
RRCConnectionReconfiguration__criticalExtensions__c1_PR_rrcConnectionReconfiguration_r8) {
RRCConnectionReconfiguration_r8_IEs_t* rrcConnectionReconfiguration_r8 =
&rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8;
if (rrcConnectionReconfiguration_r8->mobilityControlInfo) {
LOG_I(RRC,"Mobility Control Information is present\n");
AssertFatal(1==0,"Can't handle this yet in DU\n");
}
if (rrcConnectionReconfiguration_r8->measConfig != NULL) {
LOG_I(RRC,"Measurement Configuration is present\n");
}
if (rrcConnectionReconfiguration_r8->radioResourceConfigDedicated) {
LOG_I(RRC,"Radio Resource Configuration is present\n");
RadioResourceConfigDedicated_t* radioResourceConfigDedicated = rrcConnectionReconfiguration_r8->radioResourceConfigDedicated;
long SRB_id,DRB_id;
int i,cnt;
LogicalChannelConfig_t *SRB1_logicalChannelConfig,*SRB2_logicalChannelConfig;
// radioResourceConfigDedicated->physicalConfigDedicated;
}
break;
case DL_DCCH_MessageType__c1_PR_rrcConnectionRelease:
// handle RRCConnectionRelease
break;
case DL_DCCH_MessageType__c1_PR_securityModeCommand:
case DL_DCCH_MessageType__c1_PR_ueCapabilityEnquiry:
case DL_DCCH_MessageType__c1_PR_counterCheck:
#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0))
case DL_DCCH_MessageType__c1_PR_loggedMeasurementConfiguration_r10:
case DL_DCCH_MessageType__c1_PR_rnReconfiguration_r10:
#endif
case DL_DCCH_MessageType__c1_PR_spare1:
case DL_DCCH_MessageType__c1_PR_spare2:
case DL_DCCH_MessageType__c1_PR_spare3:
#if (RRC_VERSION < MAKE_VERSION(14, 0, 0))
case DL_DCCH_MessageType__c1_PR_spare4:
#endif
break;
}
}
}
}
}
else if (srb_id == 2) {
}
LOG_I(DU_F1AP, "Received DL RRC Transfer on srb_id %d\n",srb_id);
rlc_op_status_t rlc_status; rlc_op_status_t rlc_status;
boolean_t ret = TRUE; boolean_t ret = TRUE;
mem_block_t *pdcp_pdu_p = NULL; mem_block_t *pdcp_pdu_p = NULL;
...@@ -376,9 +460,7 @@ int DU_handle_DL_RRC_MESSAGE_TRANSFER(instance_t instance, ...@@ -376,9 +460,7 @@ int DU_handle_DL_RRC_MESSAGE_TRANSFER(instance_t instance,
return ret; return ret;
} // if pdcp_pdu_p } // if pdcp_pdu_p
} else if (srb_id == 2) {
}
#endif #endif
return 0; return 0;
......
...@@ -59,10 +59,12 @@ int proto_agent_start(mod_id_t mod_id, const cudu_params_t *p) ...@@ -59,10 +59,12 @@ int proto_agent_start(mod_id_t mod_id, const cudu_params_t *p)
{ {
int channel_id; int channel_id;
DevAssert(p->local_ipv4_address); // RS: CUDU does not work!
DevAssert(p->local_port > 1024); // "unprivileged" port //DevAssert(p->local_interface);
DevAssert(p->remote_ipv4_address); //DevAssert(p->local_ipv4_address);
DevAssert(p->remote_port > 1024); // "unprivileged" port //DevAssert(p->local_port > 1024); // "unprivileged" port
//DevAssert(p->remote_ipv4_address);
//DevAssert(p->remote_port > 1024); // "unprivileged" port
proto_agent[mod_id].mod_id = mod_id; proto_agent[mod_id].mod_id = mod_id;
......
...@@ -150,7 +150,7 @@ mac_rrc_data_req( ...@@ -150,7 +150,7 @@ mac_rrc_data_req(
LOG_T(RRC,"[eNB %d] Frame %d CCCH request (Srb_id %d, rnti %x)\n",Mod_idP,frameP, Srb_id,rnti); LOG_T(RRC,"[eNB %d] Frame %d CCCH request (Srb_id %d, rnti %x)\n",Mod_idP,frameP, Srb_id,rnti);
if(ue_p->Srb0.Active==0) { if(ue_p->Srb0.Active==0) {
LOG_E(RRC,"[eNB %d] CCCH Not active\n",Mod_idP); LOG_E(RRC,"[eNB %d] CCCH Not active (%p, rnti %x)\n",Mod_idP,ue_p,ue_p->rnti);
return(0); return(0);
} }
...@@ -304,9 +304,31 @@ mac_rrc_data_ind( ...@@ -304,9 +304,31 @@ mac_rrc_data_ind(
PROTOCOL_CTXT_SET_BY_MODULE_ID(&ctxt, module_idP, ENB_FLAG_YES, rntiP, frameP, sub_frameP,0); PROTOCOL_CTXT_SET_BY_MODULE_ID(&ctxt, module_idP, ENB_FLAG_YES, rntiP, frameP, sub_frameP,0);
if((srb_idP & RAB_OFFSET) == CCCH) { if((srb_idP & RAB_OFFSET) == CCCH) {
LOG_D(RRC,"[eNB %d] Received SDU for CCCH on SRB 0\n",module_idP); LOG_I(RRC,"[eNB %d] Received SDU for CCCH on SRB 0 (%d,%x)\n",module_idP,
ctxt.module_id,ctxt.rnti);
/*
// create a ue_context with rnti as random value, will be updated when Attach Request is received
struct rrc_eNB_ue_context_s *ue_context_p = rrc_eNB_get_next_free_ue_context(&ctxt,
rntiP
);
eNB_RRC_UE_t *ue_p = &ue_context_p->ue_context;
SRB_INFO *srb_info_p = &ue_p->Srb0;
LOG_I(RRC,"Decoding CCCH : inst %d, CC_id %d, ue_context %p (rnti %x), sib_info_p->Rx_buffer.payload_size %d\n",
module_idP,CC_id,ue_p, ue_p->rnti,sdu_lenP);
AssertFatal(sdu_lenP <= RRC_BUFFER_SIZE_MAX,
"CCCH message has size %d > %d\n",sdu_lenP,RRC_BUFFER_SIZE_MAX);
memcpy(srb_info_p->Rx_buffer.Payload,
sduP,
sdu_lenP);
srb_info_p->Rx_buffer.payload_size = sdu_lenP;
srb_info_p->Active = 1;
*/
// msg("\n******INST %d Srb_info %p, Srb_id=%d****\n\n",Mod_id,Srb_info,Srb_info->Srb_id);
if (sdu_lenP > 0) rrc_eNB_decode_ccch(&ctxt, sduP, sdu_lenP, CC_id); if (sdu_lenP > 0) rrc_eNB_decode_ccch(&ctxt, sduP, sdu_lenP, CC_id);
} }
......
This diff is collapsed.
...@@ -24,12 +24,12 @@ eNBs = ...@@ -24,12 +24,12 @@ eNBs =
tr_s_preference = "f1" tr_s_preference = "f1"
local_s_if_name = "lo"; local_s_if_name = "lo";
remote_s_address = "127.0.0.1"; remote_s_address = "127.0.0.3";
local_s_address = "127.0.0.2"; local_s_address = "127.0.0.4";
local_s_portc = 60001; local_s_portc = 501;
remote_s_portc = 60000; remote_s_portc = 500;
local_s_portd = 60011; local_s_portd = 601;
remote_s_portd = 60010; remote_s_portd = 600;
////////// Physical parameters: ////////// Physical parameters:
......
...@@ -13,9 +13,9 @@ eNBs = ...@@ -13,9 +13,9 @@ eNBs =
// Tracking area code, 0x0000 and 0xfffe are reserved values // Tracking area code, 0x0000 and 0xfffe are reserved values
tracking_area_code = "1"; tracking_area_code = "1";
mobile_country_code = "001"; mobile_country_code = "208";
mobile_network_code = "01"; mobile_network_code = "93";
nr_cellid = 12345678L nr_cellid = 12345678L
...@@ -60,13 +60,13 @@ MACRLCs = ( ...@@ -60,13 +60,13 @@ MACRLCs = (
num_cc = 1; num_cc = 1;
tr_s_preference = "local_L1"; tr_s_preference = "local_L1";
tr_n_preference = "f1"; tr_n_preference = "f1";
local_n_if_name = "vlan203"; local_n_if_name = "lo";
remote_n_address = "192.168.203.16"; remote_n_address = "127.0.0.4";
local_n_address = "192.168.203.242"; local_n_address = "127.0.0.3";
local_n_portc = 60000; local_n_portc = 500;
remote_n_portc = 60001; remote_n_portc = 501;
local_n_portd = 60010; local_n_portd = 600;
remote_n_portd = 60011; remote_n_portd = 601;
} }
); );
...@@ -80,8 +80,8 @@ L1s = ( ...@@ -80,8 +80,8 @@ L1s = (
RUs = ( RUs = (
{ {
local_if_name = "enp4s0f1"; local_if_name = "enp4s0f1";
local_address = "192.168.41.3"; local_address = "127.0.0.1";
remote_address = "192.168.41.1"; remote_address = "127.0.0.2";
local_portc = 50000; local_portc = 50000;
remote_portc = 50000; remote_portc = 50000;
local_portd = 50001; local_portd = 50001;
......
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