Merge remote-tracking branch 'origin/NR_UE_RRC_manage_RLC_PDCP' into integration_2023_w38
This commit is contained in:
@@ -154,8 +154,7 @@ static int drb_config_gtpu_create(const protocol_ctxt_t *const ctxt_p,
|
||||
DRB_configList,
|
||||
(UE->integrity_algorithm << 4) | UE->ciphering_algorithm,
|
||||
kUPenc,
|
||||
kUPint,
|
||||
get_softmodem_params()->sa ? UE->masterCellGroup->rlc_BearerToAddModList : NULL);
|
||||
kUPint);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -28,11 +28,12 @@
|
||||
|
||||
#define NR_RRC_HEADER_SIZE_MAX 64
|
||||
#define NR_RRC_BUFFER_SIZE_MAX 1024
|
||||
#define NR_NUM_SRB 4
|
||||
|
||||
typedef struct {
|
||||
char Payload[NR_RRC_BUFFER_SIZE_MAX];
|
||||
char Header[NR_RRC_HEADER_SIZE_MAX];
|
||||
uint16_t payload_size;
|
||||
char Payload[NR_RRC_BUFFER_SIZE_MAX];
|
||||
char Header[NR_RRC_HEADER_SIZE_MAX];
|
||||
uint16_t payload_size;
|
||||
} NR_RRC_BUFFER;
|
||||
|
||||
typedef enum UE_STATE_NR_e {
|
||||
@@ -45,17 +46,17 @@ typedef enum UE_STATE_NR_e {
|
||||
} NR_UE_STATE_t;
|
||||
|
||||
typedef struct {
|
||||
unsigned short transport_block_size; /*!< \brief Minimum PDU size in bytes provided by RLC to MAC layer interface */
|
||||
unsigned short max_transport_blocks; /*!< \brief Maximum PDU size in bytes provided by RLC to MAC layer interface */
|
||||
unsigned long Guaranteed_bit_rate; /*!< \brief Guaranteed Bit Rate (average) to be offered by MAC layer scheduling*/
|
||||
unsigned long Max_bit_rate; /*!< \brief Maximum Bit Rate that can be offered by MAC layer scheduling*/
|
||||
uint8_t Delay_class; /*!< \brief Delay class offered by MAC layer scheduling*/
|
||||
uint8_t Target_bler; /*!< \brief Target Average Transport Block Error rate*/
|
||||
uint8_t Lchan_t; /*!< \brief Logical Channel Type (BCCH,CCCH,DCCH,DTCH_B,DTCH,MRBCH)*/
|
||||
unsigned short transport_block_size; /*!< \brief Minimum PDU size in bytes provided by RLC to MAC layer interface */
|
||||
unsigned short max_transport_blocks; /*!< \brief Maximum PDU size in bytes provided by RLC to MAC layer interface */
|
||||
unsigned long Guaranteed_bit_rate; /*!< \brief Guaranteed Bit Rate (average) to be offered by MAC layer scheduling*/
|
||||
unsigned long Max_bit_rate; /*!< \brief Maximum Bit Rate that can be offered by MAC layer scheduling*/
|
||||
uint8_t Delay_class; /*!< \brief Delay class offered by MAC layer scheduling*/
|
||||
uint8_t Target_bler; /*!< \brief Target Average Transport Block Error rate*/
|
||||
uint8_t Lchan_t; /*!< \brief Logical Channel Type (BCCH,CCCH,DCCH,DTCH_B,DTCH,MRBCH)*/
|
||||
} __attribute__ ((__packed__)) NR_LCHAN_DESC;
|
||||
|
||||
typedef struct RB_INFO_NR_s {
|
||||
uint16_t Rb_id; //=Lchan_id
|
||||
uint16_t Rb_id; //=Lchan_id
|
||||
NR_LCHAN_DESC Lchan_desc[2];
|
||||
//MAC_MEAS_REQ_ENTRY *Meas_entry; //may not needed for NB-IoT
|
||||
} NR_RB_INFO;
|
||||
@@ -66,8 +67,8 @@ typedef struct NR_SRB_INFO_s {
|
||||
} NR_SRB_INFO;
|
||||
|
||||
typedef struct SRB_INFO_TABLE_ENTRY_NR_s {
|
||||
NR_SRB_INFO Srb_info;
|
||||
uint8_t Active;
|
||||
NR_SRB_INFO Srb_info;
|
||||
uint8_t Active;
|
||||
uint8_t status;
|
||||
} NR_SRB_INFO_TABLE_ENTRY;
|
||||
|
||||
|
||||
@@ -155,8 +155,7 @@ void nr_pdcp_add_drbs(eNB_flag_t enb_flag,
|
||||
NR_DRB_ToAddModList_t *const drb2add_list,
|
||||
const uint8_t security_modeP,
|
||||
uint8_t *const kUPenc,
|
||||
uint8_t *const kUPint,
|
||||
struct NR_CellGroupConfig__rlc_BearerToAddModList *rlc_bearer2add_list);
|
||||
uint8_t *const kUPint);
|
||||
|
||||
int rrc_gNB_generate_pcch_msg(uint32_t tmsi, uint8_t paging_drx, instance_t instance, uint8_t CC_id);
|
||||
|
||||
|
||||
@@ -938,8 +938,7 @@ static void rrc_gNB_process_RRCReconfigurationComplete(const protocol_ctxt_t *co
|
||||
DRB_configList,
|
||||
(ue_p->integrity_algorithm << 4) | ue_p->ciphering_algorithm,
|
||||
kUPenc,
|
||||
kUPint,
|
||||
get_softmodem_params()->sa ? ue_p->masterCellGroup->rlc_BearerToAddModList : NULL);
|
||||
kUPint);
|
||||
|
||||
/* Loop through DRBs and establish if necessary */
|
||||
if (DRB_configList != NULL) {
|
||||
|
||||
@@ -389,8 +389,7 @@ void rrc_add_nsa_user(gNB_RRC_INST *rrc, rrc_gNB_ue_context_t *ue_context_p, x2a
|
||||
ue_context_p->ue_context.rb_config->drb_ToAddModList,
|
||||
(ue_context_p->ue_context.integrity_algorithm << 4) | ue_context_p->ue_context.ciphering_algorithm,
|
||||
kUPenc,
|
||||
kUPint,
|
||||
ue_context_p->ue_context.secondaryCellGroup->rlc_BearerToAddModList);
|
||||
kUPint);
|
||||
|
||||
ctxt.rntiMaybeUEid = du_ue_id;
|
||||
// assume only a single bearer
|
||||
|
||||
@@ -133,14 +133,16 @@ int8_t nr_mac_rrc_data_req_ue(const module_id_t Mod_idP,
|
||||
switch(Srb_id) {
|
||||
|
||||
case CCCH:
|
||||
|
||||
LOG_D(NR_RRC, "nr_mac_rrc_data_req_ue: Payload size = %i\n", NR_UE_rrc_inst[Mod_idP].Srb0[gNB_id].Tx_buffer.payload_size);
|
||||
memcpy(buffer_pP, (uint8_t*)NR_UE_rrc_inst[Mod_idP].Srb0[gNB_id].Tx_buffer.Payload, NR_UE_rrc_inst[Mod_idP].Srb0[gNB_id].Tx_buffer.payload_size);
|
||||
for(int i = 0; i<NR_UE_rrc_inst[Mod_idP].Srb0[gNB_id].Tx_buffer.payload_size; i++) {
|
||||
LOG_D(NR_RRC,
|
||||
"nr_mac_rrc_data_req_ue: Payload size = %i\n",
|
||||
NR_UE_rrc_inst[Mod_idP].Srb[gNB_id][0].srb_buffers.Tx_buffer.payload_size);
|
||||
NR_UE_RRC_SRB_INFO_t *Srb0 = &NR_UE_rrc_inst[Mod_idP].Srb[gNB_id][0];
|
||||
memcpy(buffer_pP, (uint8_t *)Srb0->srb_buffers.Tx_buffer.Payload, Srb0->srb_buffers.Tx_buffer.payload_size);
|
||||
for (int i = 0; i < Srb0->srb_buffers.Tx_buffer.payload_size; i++) {
|
||||
LOG_D(NR_RRC,"(%i): %i\n", i, buffer_pP[i]);
|
||||
}
|
||||
|
||||
return NR_UE_rrc_inst[Mod_idP].Srb0[gNB_id].Tx_buffer.payload_size;
|
||||
return Srb0->srb_buffers.Tx_buffer.payload_size;
|
||||
|
||||
case DCCH:
|
||||
AssertFatal(1==0, "SRB1 not implemented yet!\n");
|
||||
|
||||
+337
-512
File diff suppressed because it is too large
Load Diff
@@ -39,6 +39,7 @@
|
||||
|
||||
#include "platform_types.h"
|
||||
#include "commonDef.h"
|
||||
#include "common/platform_constants.h"
|
||||
|
||||
#include "NR_asn_constant.h"
|
||||
#include "NR_MeasConfig.h"
|
||||
@@ -56,11 +57,10 @@
|
||||
|
||||
#include "RRC/NR/nr_rrc_common.h"
|
||||
#include "as_message.h"
|
||||
#include "common/utils/nr/nr_common.h"
|
||||
|
||||
#define NB_NR_UE_INST 1
|
||||
#define NB_CNX_UE 2//MAX_MANAGED_RG_PER_MOBILE
|
||||
#define NB_SIG_CNX_UE 2 //MAX_MANAGED_RG_PER_MOBILE
|
||||
|
||||
#define MAX_MEAS_OBJ 7
|
||||
#define MAX_MEAS_CONFIG 7
|
||||
#define MAX_MEAS_ID 7
|
||||
@@ -178,6 +178,13 @@ typedef enum {
|
||||
IN_SYNC = 1
|
||||
} nr_sync_msg_t;
|
||||
|
||||
typedef enum { RB_NOT_PRESENT, RB_ESTABLISHED, RB_SUSPENDED } NR_RB_status_t;
|
||||
|
||||
typedef struct NR_UE_RRC_SRB_INFO_s {
|
||||
NR_RB_status_t status;
|
||||
NR_SRB_INFO srb_buffers;
|
||||
} NR_UE_RRC_SRB_INFO_t;
|
||||
|
||||
typedef struct NR_UE_RRC_INST_s {
|
||||
NR_MeasConfig_t *meas_config;
|
||||
NR_CellGroupConfig_t *cell_group_config;
|
||||
@@ -191,17 +198,13 @@ typedef struct NR_UE_RRC_INST_s {
|
||||
NR_MeasIdToAddMod_t *MeasId[NB_CNX_UE][MAX_MEAS_ID];
|
||||
NR_MeasGapConfig_t *measGapConfig[NB_CNX_UE];
|
||||
NR_RSRP_Range_t s_measure;
|
||||
NR_SRB_ToAddMod_t *SRB1_config[NB_CNX_UE];
|
||||
NR_SRB_ToAddMod_t *SRB2_config[NB_CNX_UE];
|
||||
NR_DRB_ToAddMod_t *DRB_config[NB_CNX_UE][8];
|
||||
rb_id_t *defaultDRB; // remember the ID of the default DRB
|
||||
|
||||
char *uecap_file;
|
||||
rnti_t rnti;
|
||||
|
||||
NR_SRB_INFO Srb0[NB_SIG_CNX_UE];
|
||||
NR_SRB_INFO_TABLE_ENTRY Srb1[NB_CNX_UE];
|
||||
NR_SRB_INFO_TABLE_ENTRY Srb2[NB_CNX_UE];
|
||||
NR_UE_RRC_SRB_INFO_t Srb[NB_CNX_UE][NR_NUM_SRB];
|
||||
bool active_DRBs[NB_CNX_UE][MAX_DRBS_PER_UE];
|
||||
bool active_RLC_entity[NB_CNX_UE][NR_MAX_NUM_LCID];
|
||||
|
||||
OAI_NR_UECapability_t *UECap;
|
||||
uint8_t *UECapability;
|
||||
@@ -213,7 +216,7 @@ typedef struct NR_UE_RRC_INST_s {
|
||||
|
||||
plmn_t plmnID;
|
||||
|
||||
NR_UE_RRC_SI_INFO SInfo[NB_SIG_CNX_UE];
|
||||
NR_UE_RRC_SI_INFO SInfo[NB_CNX_UE];
|
||||
|
||||
NR_MIB_t *mib;
|
||||
|
||||
@@ -227,6 +230,7 @@ typedef struct NR_UE_RRC_INST_s {
|
||||
//RRC_LIST_TYPE(NR_SecurityAlgorithmConfig_t, NR_SecurityAlgorithmConfig) SecurityAlgorithmConfig_list;
|
||||
NR_CipheringAlgorithm_t cipheringAlgorithm;
|
||||
e_NR_IntegrityProtAlgorithm integrityProtAlgorithm;
|
||||
long keyToUse;
|
||||
bool as_security_activated;
|
||||
|
||||
long selected_plmn_identity;
|
||||
|
||||
@@ -65,14 +65,6 @@ NR_UE_RRC_INST_t *nr_l3_init_ue(char *, char *, char *);
|
||||
/**\brief Initial the top level RRC structure instance*/
|
||||
NR_UE_RRC_INST_t *openair_rrc_top_init_ue_nr(char *, char *, char *);
|
||||
|
||||
/**\brief Decode RRC Connection Reconfiguration, sent from E-UTRA RRC Connection Reconfiguration v1510 carring EN-DC config
|
||||
\param buffer encoded NR-RRC-Connection-Reconfiguration/Secondary-Cell-Group-Config message.
|
||||
\param size length of buffer*/
|
||||
//TODO check to use which one
|
||||
//int8_t nr_rrc_ue_decode_rrcReconfiguration(const uint8_t *buffer, const uint32_t size);
|
||||
int8_t nr_rrc_ue_decode_secondary_cellgroup_config(const module_id_t module_id, const uint8_t *buffer, const uint32_t size);
|
||||
|
||||
|
||||
/**\brief Process NR RRC connection reconfiguration via SRB3
|
||||
\param rrcReconfiguration decoded rrc connection reconfiguration*/
|
||||
int8_t nr_rrc_ue_process_rrcReconfiguration(const module_id_t module_id, NR_RRCReconfiguration_t *rrcReconfiguration);
|
||||
@@ -81,9 +73,9 @@ int8_t nr_rrc_ue_process_rrcReconfiguration(const module_id_t module_id, NR_RRCR
|
||||
\param meas_config measurement configuration*/
|
||||
int8_t nr_rrc_ue_process_meas_config(NR_MeasConfig_t *meas_config);
|
||||
|
||||
/**\prief Process radio bearer config from NR RRC connection reconfiguration message
|
||||
\param radio_bearer_config radio bearer configuration*/
|
||||
int8_t nr_rrc_ue_process_radio_bearer_config(NR_RadioBearerConfig_t *radio_bearer_config);
|
||||
void nr_rrc_ue_process_RadioBearerConfig(const protocol_ctxt_t *const ctxt_pP,
|
||||
const uint8_t gNB_index,
|
||||
NR_RadioBearerConfig_t *const radioBearerConfig);
|
||||
|
||||
/**\brief decode NR BCCH-BCH (MIB) message
|
||||
\param module_idP module id
|
||||
@@ -171,6 +163,12 @@ void handle_rlf_sync(NR_UE_Timers_Constants_t *tac,
|
||||
void nr_rrc_handle_SetupRelease_RLF_TimersAndConstants(NR_UE_RRC_INST_t *rrc,
|
||||
struct NR_SetupRelease_RLF_TimersAndConstants *rlf_TimersAndConstants);
|
||||
|
||||
void nr_rrc_manage_rlc_bearers(const NR_CellGroupConfig_t *cellGroupConfig,
|
||||
NR_UE_RRC_INST_t *rrc,
|
||||
int gNB_index,
|
||||
module_id_t module_id,
|
||||
int rnti);
|
||||
|
||||
int configure_NR_SL_Preconfig(int sync_source);
|
||||
/** @}*/
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user