Commit 569b9fc5 authored by laurent's avatar laurent

fix srb2 addition, simplify and remove dead code, fix one race

parent 9fa89151
...@@ -112,7 +112,10 @@ void fill_DRB_configList(const protocol_ctxt_t *const ctxt_pP, rrc_gNB_ue_contex ...@@ -112,7 +112,10 @@ void fill_DRB_configList(const protocol_ctxt_t *const ctxt_pP, rrc_gNB_ue_contex
{ {
abort(); abort();
} }
NR_SRB_ToAddModList_t **generateSRB2_confList(gNB_RRC_UE_t *ue, NR_SRB_ToAddModList_t *SRB_configList, uint8_t xid)
{
abort();
}
int main(int argc, char **argv) int main(int argc, char **argv)
{ {
/// static configuration for NR at the moment /// static configuration for NR at the moment
......
...@@ -80,10 +80,6 @@ const char *__asan_default_options() ...@@ -80,10 +80,6 @@ const char *__asan_default_options()
/* don't do leak checking in nr_ulsim, not finished yet */ /* don't do leak checking in nr_ulsim, not finished yet */
return "detect_leaks=0"; return "detect_leaks=0";
} }
LCHAN_DESC DCCH_LCHAN_DESC,DTCH_DL_LCHAN_DESC,DTCH_UL_LCHAN_DESC;
rlc_info_t Rlc_info_um,Rlc_info_am_config;
PHY_VARS_gNB *gNB; PHY_VARS_gNB *gNB;
PHY_VARS_NR_UE *UE; PHY_VARS_NR_UE *UE;
RAN_CONTEXT_t RC; RAN_CONTEXT_t RC;
......
...@@ -59,8 +59,6 @@ ...@@ -59,8 +59,6 @@
#define NR_PRACH_DEBUG 1 #define NR_PRACH_DEBUG 1
#define PRACH_WRITE_OUTPUT_DEBUG 1 #define PRACH_WRITE_OUTPUT_DEBUG 1
LCHAN_DESC DCCH_LCHAN_DESC,DTCH_DL_LCHAN_DESC,DTCH_UL_LCHAN_DESC;
rlc_info_t Rlc_info_um,Rlc_info_am_config;
THREAD_STRUCT thread_struct; THREAD_STRUCT thread_struct;
char *parallel_config = NULL; char *parallel_config = NULL;
char *worker_config = NULL; char *worker_config = NULL;
......
...@@ -77,9 +77,6 @@ const char *__asan_default_options() ...@@ -77,9 +77,6 @@ const char *__asan_default_options()
return "detect_leaks=0"; return "detect_leaks=0";
} }
LCHAN_DESC DCCH_LCHAN_DESC,DTCH_DL_LCHAN_DESC,DTCH_UL_LCHAN_DESC;
rlc_info_t Rlc_info_um,Rlc_info_am_config;
PHY_VARS_gNB *gNB; PHY_VARS_gNB *gNB;
PHY_VARS_NR_UE *UE; PHY_VARS_NR_UE *UE;
RAN_CONTEXT_t RC; RAN_CONTEXT_t RC;
......
...@@ -26,12 +26,6 @@ ...@@ -26,12 +26,6 @@
#include "NR_ServingCellConfigCommon.h" #include "NR_ServingCellConfigCommon.h"
#include "NR_MIB.h" #include "NR_MIB.h"
void apply_macrlc_config(gNB_RRC_INST *rrc,
rrc_gNB_ue_context_t *const ue_context_pP,
const protocol_ctxt_t *const ctxt_pP ) {
abort();
}
bool sdap_data_req(protocol_ctxt_t *ctxt_p, bool sdap_data_req(protocol_ctxt_t *ctxt_p,
const ue_id_t ue_id, const ue_id_t ue_id,
const srb_flag_t srb_flag, const srb_flag_t srb_flag,
......
...@@ -2254,7 +2254,5 @@ void nr_read_config_and_init(void) { ...@@ -2254,7 +2254,5 @@ void nr_read_config_and_init(void) {
if (NODE_IS_CU(RC.nrrrc[0]->node_type) && RC.nrrrc[0]->node_type != ngran_gNB_CUCP) { if (NODE_IS_CU(RC.nrrrc[0]->node_type) && RC.nrrrc[0]->node_type != ngran_gNB_CUCP) {
pdcp_layer_init(); pdcp_layer_init();
// nr_DRB_preconfiguration(0x1234);
rrc_init_nr_global_param();
} }
} }
...@@ -254,9 +254,6 @@ void mac_top_init_gNB(ngran_node_t node_type) ...@@ -254,9 +254,6 @@ void mac_top_init_gNB(ngran_node_t node_type)
if(IS_SOFTMODEM_NOS1 && get_softmodem_params()->phy_test) if(IS_SOFTMODEM_NOS1 && get_softmodem_params()->phy_test)
nr_DRB_preconfiguration(0x1234); nr_DRB_preconfiguration(0x1234);
rrc_init_nr_global_param();
} else { } else {
RC.nrmac = NULL; RC.nrmac = NULL;
} }
......
...@@ -1112,12 +1112,7 @@ void nr_DRB_preconfiguration(ue_id_t crntiMaybeUEid) ...@@ -1112,12 +1112,7 @@ void nr_DRB_preconfiguration(ue_id_t crntiMaybeUEid)
nr_pdcp_add_drbs(ctxt.enb_flag, ctxt.rntiMaybeUEid, rbconfig->drb_ToAddModList, 0, NULL, NULL, Rlc_Bearer_ToAdd_list); nr_pdcp_add_drbs(ctxt.enb_flag, ctxt.rntiMaybeUEid, rbconfig->drb_ToAddModList, 0, NULL, NULL, Rlc_Bearer_ToAdd_list);
nr_rrc_rlc_config_asn1_req (&ctxt, nr_rrc_rlc_config_asn1_req(&ctxt, (NR_SRB_ToAddModList_t *)NULL, rbconfig->drb_ToAddModList, NULL, (LTE_PMCH_InfoList_r9_t *)NULL, Rlc_Bearer_ToAdd_list);
(NR_SRB_ToAddModList_t *) NULL,
rbconfig->drb_ToAddModList,
rbconfig->drb_ToReleaseList,
(LTE_PMCH_InfoList_r9_t *) NULL,
Rlc_Bearer_ToAdd_list);
LOG_D(PDCP, "%s:%d: done RRC PDCP/RLC ASN1 request for UE ID/RNTI %ld\n", __FUNCTION__, __LINE__, ctxt.rntiMaybeUEid); LOG_D(PDCP, "%s:%d: done RRC PDCP/RLC ASN1 request for UE ID/RNTI %ld\n", __FUNCTION__, __LINE__, ctxt.rntiMaybeUEid);
} }
......
...@@ -185,12 +185,13 @@ static void cucp_cuup_bearer_context_setup_direct(e1ap_bearer_setup_req_t *const ...@@ -185,12 +185,13 @@ static void cucp_cuup_bearer_context_setup_direct(e1ap_bearer_setup_req_t *const
fill_DRB_configList(&ctxt, ue_context_p); fill_DRB_configList(&ctxt, ue_context_p);
gNB_RRC_INST *rrc = RC.nrrrc[ctxt.module_id]; gNB_RRC_INST *rrc = RC.nrrrc[ctxt.module_id];
NR_SRB_ToAddModList_t **SRB_configList2 = generateSRB2_confList(&ue_context_p->ue_context, ue_context_p->ue_context.SRB_configList, 1);
// GTP tunnel for UL // GTP tunnel for UL
int ret = drb_config_gtpu_create(&ctxt, int ret = drb_config_gtpu_create(&ctxt,
ue_context_p, ue_context_p,
req, req,
ue_context_p->ue_context.DRB_configList, ue_context_p->ue_context.DRB_configList,
ue_context_p->ue_context.SRB_configList, *SRB_configList2,
rrc->gtpInstN3); rrc->gtpInstN3);
if (ret < 0) AssertFatal(false, "Unable to configure DRB or to create GTP Tunnel\n"); if (ret < 0) AssertFatal(false, "Unable to configure DRB or to create GTP Tunnel\n");
......
...@@ -49,35 +49,14 @@ extern UE_MAC_INST *UE_mac_inst; ...@@ -49,35 +49,14 @@ extern UE_MAC_INST *UE_mac_inst;
extern mui_t rrc_gNB_mui; extern mui_t rrc_gNB_mui;
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
int rrc_init_nr_global_param(void){ void rrc_init_nr_srb_param(NR_LCHAN_DESC *chan)
{
rrc_rlc_register_rrc (rrc_data_ind, NULL); //register with rlc rrc_rlc_register_rrc (rrc_data_ind, NULL); //register with rlc
DCCH_LCHAN_DESC.transport_block_size = 4; chan->transport_block_size = 4;
DCCH_LCHAN_DESC.max_transport_blocks = 16; chan->max_transport_blocks = 16;
DCCH_LCHAN_DESC.Delay_class = 1; chan->Delay_class = 1;
DTCH_DL_LCHAN_DESC.transport_block_size = 52; return;
DTCH_DL_LCHAN_DESC.max_transport_blocks = 20;
DTCH_DL_LCHAN_DESC.Delay_class = 1;
DTCH_UL_LCHAN_DESC.transport_block_size = 52;
DTCH_UL_LCHAN_DESC.max_transport_blocks = 20;
DTCH_UL_LCHAN_DESC.Delay_class = 1;
Rlc_info_um.rlc_mode = RLC_MODE_UM;
Rlc_info_um.rlc.rlc_um_info.timer_reordering = 5;
Rlc_info_um.rlc.rlc_um_info.sn_field_length = 10;
Rlc_info_um.rlc.rlc_um_info.is_mXch = 0;
//Rlc_info_um.rlc.rlc_um_info.sdu_discard_mode=16;
Rlc_info_am_config.rlc_mode = RLC_MODE_AM;
Rlc_info_am_config.rlc.rlc_am_info.max_retx_threshold = 50;
Rlc_info_am_config.rlc.rlc_am_info.poll_pdu = 8;
Rlc_info_am_config.rlc.rlc_am_info.poll_byte = 1000;
Rlc_info_am_config.rlc.rlc_am_info.t_poll_retransmit = 15;
Rlc_info_am_config.rlc.rlc_am_info.t_reordering = 50;
Rlc_info_am_config.rlc.rlc_am_info.t_status_prohibit = 10;
return 0;
} }
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
......
...@@ -51,13 +51,10 @@ extern unsigned char NB_eNB_INST; ...@@ -51,13 +51,10 @@ extern unsigned char NB_eNB_INST;
extern uint16_t NB_UE_INST; extern uint16_t NB_UE_INST;
extern void* bigphys_malloc(int); extern void* bigphys_malloc(int);
// CONSTANTS
//CONSTANTS // uint8_t RACH_TIME_ALLOC;
extern rlc_info_t Rlc_info_um,Rlc_info_am_config;
//uint8_t RACH_TIME_ALLOC;
extern uint16_t RACH_FREQ_ALLOC; extern uint16_t RACH_FREQ_ALLOC;
//uint8_t NB_RACH; // uint8_t NB_RACH;
extern LCHAN_DESC BCCH_LCHAN_DESC,CCCH_LCHAN_DESC,DCCH_LCHAN_DESC,DTCH_DL_LCHAN_DESC,DTCH_UL_LCHAN_DESC;
extern MAC_MEAS_T BCCH_MEAS_TRIGGER,CCCH_MEAS_TRIGGER,DCCH_MEAS_TRIGGER,DTCH_MEAS_TRIGGER; extern MAC_MEAS_T BCCH_MEAS_TRIGGER,CCCH_MEAS_TRIGGER,DCCH_MEAS_TRIGGER,DTCH_MEAS_TRIGGER;
extern MAC_AVG_T BCCH_MEAS_AVG,CCCH_MEAS_AVG,DCCH_MEAS_AVG, DTCH_MEAS_AVG; extern MAC_AVG_T BCCH_MEAS_AVG,CCCH_MEAS_AVG,DCCH_MEAS_AVG, DTCH_MEAS_AVG;
...@@ -75,7 +72,6 @@ extern UE_PF_PO_t UE_PF_PO[NFAPI_CC_MAX][MAX_MOBILES_PER_ENB]; ...@@ -75,7 +72,6 @@ extern UE_PF_PO_t UE_PF_PO[NFAPI_CC_MAX][MAX_MOBILES_PER_ENB];
extern pthread_mutex_t ue_pf_po_mutex; extern pthread_mutex_t ue_pf_po_mutex;
extern uint16_t reestablish_rnti_map[MAX_MOBILES_PER_ENB][2]; extern uint16_t reestablish_rnti_map[MAX_MOBILES_PER_ENB][2];
char openair_rrc_gNB_configuration(const module_id_t gnb_mod_idP, gNB_RrcConfigurationReq *configuration);
#endif #endif
......
...@@ -44,12 +44,7 @@ ...@@ -44,12 +44,7 @@
#include "NR_SecurityConfig.h" #include "NR_SecurityConfig.h"
#define NR_MAX_SUPPORTED_DL_LAYERS 2 #define NR_MAX_SUPPORTED_DL_LAYERS 2
void rrc_init_nr_srb_param(NR_LCHAN_DESC *chan);
int rrc_init_nr_global_param(void);
void rrc_config_nr_buffer(NR_SRB_INFO* Srb_info,
uint8_t Lchan_type,
uint8_t Role);
uint16_t mac_rrc_nr_data_req(const module_id_t Mod_idP, uint16_t mac_rrc_nr_data_req(const module_id_t Mod_idP,
const int CC_id, const int CC_id,
...@@ -104,18 +99,6 @@ int generate_CG_Config(gNB_RRC_INST *rrc, ...@@ -104,18 +99,6 @@ int generate_CG_Config(gNB_RRC_INST *rrc,
NR_RRCReconfiguration_t *reconfig, NR_RRCReconfiguration_t *reconfig,
NR_RadioBearerConfig_t *rbconfig); NR_RadioBearerConfig_t *rbconfig);
void apply_macrlc_config(gNB_RRC_INST *rrc,
rrc_gNB_ue_context_t *const ue_context_pP,
const protocol_ctxt_t *const ctxt_pP );
void
rrc_gNB_generate_RRCSetup(
const protocol_ctxt_t *const ctxt_pP,
rrc_gNB_ue_context_t *const ue_context_pP,
const uint8_t *masterCellGroup,
int masterCellGroup_len,
NR_ServingCellConfigCommon_t *scc);
int parse_CG_ConfigInfo(gNB_RRC_INST *rrc, NR_CG_ConfigInfo_t *CG_ConfigInfo, x2ap_ENDC_sgnb_addition_req_t *m); int parse_CG_ConfigInfo(gNB_RRC_INST *rrc, NR_CG_ConfigInfo_t *CG_ConfigInfo, x2ap_ENDC_sgnb_addition_req_t *m);
void void
...@@ -124,10 +107,7 @@ rrc_gNB_generate_SecurityModeCommand( ...@@ -124,10 +107,7 @@ rrc_gNB_generate_SecurityModeCommand(
rrc_gNB_ue_context_t *const ue_context_pP rrc_gNB_ue_context_t *const ue_context_pP
); );
uint8_t unsigned int rrc_gNB_get_next_transaction_identifier(module_id_t gnb_mod_idP);
rrc_gNB_get_next_transaction_identifier(
module_id_t gnb_mod_idP
);
void void
rrc_gNB_generate_UECapabilityEnquiry( rrc_gNB_generate_UECapabilityEnquiry(
......
This diff is collapsed.
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