Merge remote-tracking branch 'origin/nr-rlc-pdcp-config-file' into integration_2025_w24 (!3383)
Add configurable values of NR RLC and NR PDCP to the configuration file This is for the gNB (the UE gets the values from the gNB). The physical simulators were also adapted (we put the previously hardcoded values that were everywhere in the code into the simulators themselves). I don't think we need to have those values configurable for the simulators, but I can study the possibility to add this if someone tells me it's important (if not important I prefer not to do it, I am not sure if it is trivial to do or not).
This commit is contained in:
@@ -3326,7 +3326,7 @@ bool prepare_initial_ul_rrc_message(gNB_MAC_INST *mac, NR_UE_info_t *UE)
|
||||
int srb_id = 1;
|
||||
const NR_ServingCellConfigCommon_t *scc = mac->common_channels[CC_id].ServingCellConfigCommon;
|
||||
const NR_ServingCellConfig_t *sccd = UE->is_redcap ? NULL : mac->common_channels[CC_id].pre_ServingCellConfig;
|
||||
NR_CellGroupConfig_t *cellGroupConfig = get_initial_cellGroupConfig(UE->uid, scc, sccd, &mac->radio_config);
|
||||
NR_CellGroupConfig_t *cellGroupConfig = get_initial_cellGroupConfig(UE->uid, scc, sccd, &mac->radio_config, &mac->rlc_config);
|
||||
ASN_STRUCT_FREE(asn_DEF_NR_CellGroupConfig, UE->CellGroup);
|
||||
UE->CellGroup = cellGroupConfig;
|
||||
|
||||
|
||||
@@ -34,6 +34,7 @@
|
||||
#include "LAYER2/NR_MAC_gNB/nr_mac_gNB.h"
|
||||
#include "NR_TAG-Id.h"
|
||||
#include "common/ngran_types.h"
|
||||
#include "openair2/LAYER2/nr_pdcp/nr_pdcp_configuration.h"
|
||||
|
||||
void set_cset_offset(uint16_t);
|
||||
void get_K1_K2(int N1, int N2, int *K1, int *K2, int layers);
|
||||
@@ -52,7 +53,8 @@ void delete_nr_ue_data(NR_UE_info_t *UE, NR_COMMON_channels_t *ccPtr, uid_alloca
|
||||
void mac_top_init_gNB(ngran_node_t node_type,
|
||||
NR_ServingCellConfigCommon_t *scc,
|
||||
NR_ServingCellConfig_t *scd,
|
||||
const nr_mac_config_t *conf);
|
||||
const nr_mac_config_t *conf,
|
||||
const nr_rlc_configuration_t *default_rlc_config);
|
||||
void mac_top_destroy_gNB(gNB_MAC_INST *mac);
|
||||
void nr_mac_send_f1_setup_req(void);
|
||||
|
||||
|
||||
@@ -221,19 +221,21 @@ void gnb_du_configuration_update_acknowledge(const f1ap_gnb_du_configuration_upd
|
||||
LOG_I(MAC, "received gNB-DU configuration update acknowledge\n");
|
||||
}
|
||||
|
||||
static NR_RLC_BearerConfig_t *get_bearerconfig_from_srb(const f1ap_srb_to_be_setup_t *srb)
|
||||
static NR_RLC_BearerConfig_t *get_bearerconfig_from_srb(const f1ap_srb_to_be_setup_t *srb,
|
||||
const nr_rlc_configuration_t *rlc_config)
|
||||
{
|
||||
long priority = srb->srb_id == 2 ? 3 : 1; // see 38.331 sec 9.2.1
|
||||
e_NR_LogicalChannelConfig__ul_SpecificParameters__bucketSizeDuration bucket =
|
||||
NR_LogicalChannelConfig__ul_SpecificParameters__bucketSizeDuration_ms5;
|
||||
return get_SRB_RLC_BearerConfig(get_lcid_from_srbid(srb->srb_id), priority, bucket);
|
||||
return get_SRB_RLC_BearerConfig(get_lcid_from_srbid(srb->srb_id), priority, bucket, rlc_config);
|
||||
}
|
||||
|
||||
static int handle_ue_context_srbs_setup(NR_UE_info_t *UE,
|
||||
int srbs_len,
|
||||
const f1ap_srb_to_be_setup_t *req_srbs,
|
||||
f1ap_srb_to_be_setup_t **resp_srbs,
|
||||
NR_CellGroupConfig_t *cellGroupConfig)
|
||||
NR_CellGroupConfig_t *cellGroupConfig,
|
||||
const nr_rlc_configuration_t *rlc_config)
|
||||
{
|
||||
DevAssert(req_srbs != NULL && resp_srbs != NULL && cellGroupConfig != NULL);
|
||||
|
||||
@@ -241,7 +243,7 @@ static int handle_ue_context_srbs_setup(NR_UE_info_t *UE,
|
||||
AssertFatal(*resp_srbs != NULL, "out of memory\n");
|
||||
for (int i = 0; i < srbs_len; i++) {
|
||||
const f1ap_srb_to_be_setup_t *srb = &req_srbs[i];
|
||||
NR_RLC_BearerConfig_t *rlc_BearerConfig = get_bearerconfig_from_srb(srb);
|
||||
NR_RLC_BearerConfig_t *rlc_BearerConfig = get_bearerconfig_from_srb(srb, rlc_config);
|
||||
nr_rlc_add_srb(UE->rnti, srb->srb_id, rlc_BearerConfig);
|
||||
|
||||
int priority = rlc_BearerConfig->mac_LogicalChannelConfig->ul_SpecificParameters->priority;
|
||||
@@ -265,11 +267,12 @@ static int handle_ue_context_srbs_setup(NR_UE_info_t *UE,
|
||||
return srbs_len;
|
||||
}
|
||||
|
||||
static NR_RLC_BearerConfig_t *get_bearerconfig_from_drb(const f1ap_drb_to_be_setup_t *drb)
|
||||
static NR_RLC_BearerConfig_t *get_bearerconfig_from_drb(const f1ap_drb_to_be_setup_t *drb,
|
||||
const nr_rlc_configuration_t *rlc_config)
|
||||
{
|
||||
const NR_RLC_Config_PR rlc_conf = drb->rlc_mode == F1AP_RLC_MODE_AM ? NR_RLC_Config_PR_am : NR_RLC_Config_PR_um_Bi_Directional;
|
||||
long priority = 13; // hardcoded for the moment
|
||||
return get_DRB_RLC_BearerConfig(get_lcid_from_drbid(drb->drb_id), drb->drb_id, rlc_conf, priority);
|
||||
return get_DRB_RLC_BearerConfig(get_lcid_from_drbid(drb->drb_id), drb->drb_id, rlc_conf, priority, rlc_config);
|
||||
}
|
||||
|
||||
static int get_non_dynamic_priority(int fiveqi)
|
||||
@@ -304,7 +307,8 @@ static int handle_ue_context_drbs_setup(NR_UE_info_t *UE,
|
||||
int drbs_len,
|
||||
const f1ap_drb_to_be_setup_t *req_drbs,
|
||||
f1ap_drb_to_be_setup_t **resp_drbs,
|
||||
NR_CellGroupConfig_t *cellGroupConfig)
|
||||
NR_CellGroupConfig_t *cellGroupConfig,
|
||||
const nr_rlc_configuration_t *rlc_config)
|
||||
{
|
||||
DevAssert(req_drbs != NULL && resp_drbs != NULL && cellGroupConfig != NULL);
|
||||
instance_t f1inst = get_f1_gtp_instance();
|
||||
@@ -316,7 +320,7 @@ static int handle_ue_context_drbs_setup(NR_UE_info_t *UE,
|
||||
for (int i = 0; i < drbs_len; i++) {
|
||||
const f1ap_drb_to_be_setup_t *drb = &req_drbs[i];
|
||||
f1ap_drb_to_be_setup_t *resp_drb = &(*resp_drbs)[i];
|
||||
NR_RLC_BearerConfig_t *rlc_BearerConfig = get_bearerconfig_from_drb(drb);
|
||||
NR_RLC_BearerConfig_t *rlc_BearerConfig = get_bearerconfig_from_drb(drb, rlc_config);
|
||||
nr_rlc_add_drb(UE->rnti, drb->drb_id, rlc_BearerConfig);
|
||||
|
||||
nr_lc_config_t c = {.lcid = rlc_BearerConfig->logicalChannelIdentity, .nssai = drb->nssai};
|
||||
@@ -557,7 +561,7 @@ static NR_UE_info_t *create_new_UE(gNB_MAC_INST *mac, uint32_t cu_id, const NR_C
|
||||
const NR_ServingCellConfig_t *sccd = cc->pre_ServingCellConfig;
|
||||
const nr_mac_config_t *configuration = &mac->radio_config;
|
||||
if (is_SA) {
|
||||
cellGroupConfig = get_initial_cellGroupConfig(UE->uid, scc, sccd, &mac->radio_config);
|
||||
cellGroupConfig = get_initial_cellGroupConfig(UE->uid, scc, sccd, &mac->radio_config, &mac->rlc_config);
|
||||
cellGroupConfig->spCellConfig->reconfigurationWithSync = get_reconfiguration_with_sync(UE->rnti, UE->uid, scc);
|
||||
} else {
|
||||
NR_UE_NR_Capability_t *cap = get_ue_nr_cap_from_cg_config_info(cgci);
|
||||
@@ -649,7 +653,8 @@ void ue_context_setup_request(const f1ap_ue_context_setup_t *req)
|
||||
req->srbs_to_be_setup_length,
|
||||
req->srbs_to_be_setup,
|
||||
&resp.srbs_to_be_setup,
|
||||
new_CellGroup);
|
||||
new_CellGroup,
|
||||
&mac->rlc_config);
|
||||
}
|
||||
|
||||
if (req->drbs_to_be_setup_length > 0) {
|
||||
@@ -657,7 +662,8 @@ void ue_context_setup_request(const f1ap_ue_context_setup_t *req)
|
||||
req->drbs_to_be_setup_length,
|
||||
req->drbs_to_be_setup,
|
||||
&resp.drbs_to_be_setup,
|
||||
new_CellGroup);
|
||||
new_CellGroup,
|
||||
&mac->rlc_config);
|
||||
}
|
||||
|
||||
if (req->rrc_container != NULL) {
|
||||
@@ -747,7 +753,8 @@ void ue_context_modification_request(const f1ap_ue_context_modif_req_t *req)
|
||||
req->srbs_to_be_setup_length,
|
||||
req->srbs_to_be_setup,
|
||||
&resp.srbs_to_be_setup,
|
||||
new_CellGroup);
|
||||
new_CellGroup,
|
||||
&mac->rlc_config);
|
||||
}
|
||||
|
||||
if (req->drbs_to_be_setup_length > 0) {
|
||||
@@ -755,7 +762,8 @@ void ue_context_modification_request(const f1ap_ue_context_modif_req_t *req)
|
||||
req->drbs_to_be_setup_length,
|
||||
req->drbs_to_be_setup,
|
||||
&resp.drbs_to_be_setup,
|
||||
new_CellGroup);
|
||||
new_CellGroup,
|
||||
&mac->rlc_config);
|
||||
}
|
||||
|
||||
if (req->drbs_to_be_released_length > 0) {
|
||||
|
||||
@@ -236,7 +236,8 @@ static void mac_rrc_init(gNB_MAC_INST *mac, ngran_node_t node_type)
|
||||
void mac_top_init_gNB(ngran_node_t node_type,
|
||||
NR_ServingCellConfigCommon_t *scc,
|
||||
NR_ServingCellConfig_t *scd,
|
||||
const nr_mac_config_t *config)
|
||||
const nr_mac_config_t *config,
|
||||
const nr_rlc_configuration_t *default_rlc_config)
|
||||
{
|
||||
module_id_t i;
|
||||
gNB_MAC_INST *nrmac;
|
||||
@@ -272,6 +273,7 @@ void mac_top_init_gNB(ngran_node_t node_type,
|
||||
|
||||
RC.nrmac[i]->common_channels[0].ServingCellConfigCommon = scc;
|
||||
RC.nrmac[i]->radio_config = *config;
|
||||
RC.nrmac[i]->rlc_config = *default_rlc_config;
|
||||
|
||||
RC.nrmac[i]->common_channels[0].pre_ServingCellConfig = scd;
|
||||
|
||||
|
||||
@@ -45,6 +45,7 @@
|
||||
#include "common/utils/ds/seq_arr.h"
|
||||
#include "common/utils/nr/nr_common.h"
|
||||
#include "common/utils/ds/byte_array.h"
|
||||
#include "openair2/LAYER2/nr_rlc/nr_rlc_configuration.h"
|
||||
|
||||
#define NR_SCHED_LOCK(lock) \
|
||||
do { \
|
||||
@@ -899,6 +900,7 @@ typedef struct gNB_MAC_INST_s {
|
||||
nr_pp_impl_ul pre_processor_ul;
|
||||
|
||||
nr_mac_config_t radio_config;
|
||||
nr_rlc_configuration_t rlc_config;
|
||||
|
||||
NR_UE_sched_ctrl_t *sched_ctrlCommon;
|
||||
NR_sched_pdcch_t *sched_pdcch_otherSI;
|
||||
|
||||
@@ -40,6 +40,7 @@
|
||||
#include "openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h"
|
||||
#include "openair2/LAYER2/NR_MAC_gNB/mac_proto.h"
|
||||
#include "openair3/UTILS/conversions.h"
|
||||
#include "LAYER2/nr_rlc/nr_rlc_asn1_utils.h"
|
||||
|
||||
#include "NR_MeasurementTimingConfiguration.h"
|
||||
#include "uper_decoder.h"
|
||||
@@ -3338,7 +3339,10 @@ static NR_SpCellConfig_t *get_initial_SpCellConfig(int uid,
|
||||
return SpCellConfig;
|
||||
}
|
||||
|
||||
NR_RLC_BearerConfig_t *get_SRB_RLC_BearerConfig(long channelId, long priority, long bucketSizeDuration)
|
||||
NR_RLC_BearerConfig_t *get_SRB_RLC_BearerConfig(long channelId,
|
||||
long priority,
|
||||
long bucketSizeDuration,
|
||||
const nr_rlc_configuration_t *default_rlc_config)
|
||||
{
|
||||
NR_RLC_BearerConfig_t *rlc_BearerConfig = NULL;
|
||||
rlc_BearerConfig = calloc(1, sizeof(NR_RLC_BearerConfig_t));
|
||||
@@ -3352,15 +3356,15 @@ NR_RLC_BearerConfig_t *get_SRB_RLC_BearerConfig(long channelId, long priority, l
|
||||
rlc_Config->present = NR_RLC_Config_PR_am;
|
||||
rlc_Config->choice.am = calloc(1, sizeof(*rlc_Config->choice.am));
|
||||
rlc_Config->choice.am->dl_AM_RLC.sn_FieldLength = calloc(1, sizeof(NR_SN_FieldLengthAM_t));
|
||||
*(rlc_Config->choice.am->dl_AM_RLC.sn_FieldLength) = NR_SN_FieldLengthAM_size12;
|
||||
rlc_Config->choice.am->dl_AM_RLC.t_Reassembly = NR_T_Reassembly_ms35;
|
||||
rlc_Config->choice.am->dl_AM_RLC.t_StatusProhibit = NR_T_StatusProhibit_ms0;
|
||||
*(rlc_Config->choice.am->dl_AM_RLC.sn_FieldLength) = encode_sn_field_length_am(default_rlc_config->srb.sn_field_length);
|
||||
rlc_Config->choice.am->dl_AM_RLC.t_Reassembly = encode_t_reassembly(default_rlc_config->srb.t_reassembly);
|
||||
rlc_Config->choice.am->dl_AM_RLC.t_StatusProhibit = encode_t_status_prohibit(default_rlc_config->srb.t_status_prohibit);
|
||||
rlc_Config->choice.am->ul_AM_RLC.sn_FieldLength = calloc(1, sizeof(NR_SN_FieldLengthAM_t));
|
||||
*(rlc_Config->choice.am->ul_AM_RLC.sn_FieldLength) = NR_SN_FieldLengthAM_size12;
|
||||
rlc_Config->choice.am->ul_AM_RLC.t_PollRetransmit = NR_T_PollRetransmit_ms45;
|
||||
rlc_Config->choice.am->ul_AM_RLC.pollPDU = NR_PollPDU_infinity;
|
||||
rlc_Config->choice.am->ul_AM_RLC.pollByte = NR_PollByte_infinity;
|
||||
rlc_Config->choice.am->ul_AM_RLC.maxRetxThreshold = NR_UL_AM_RLC__maxRetxThreshold_t8;
|
||||
*(rlc_Config->choice.am->ul_AM_RLC.sn_FieldLength) = encode_sn_field_length_am(default_rlc_config->srb.sn_field_length);
|
||||
rlc_Config->choice.am->ul_AM_RLC.t_PollRetransmit = encode_t_poll_retransmit(default_rlc_config->srb.t_poll_retransmit);
|
||||
rlc_Config->choice.am->ul_AM_RLC.pollPDU = encode_poll_pdu(default_rlc_config->srb.poll_pdu);
|
||||
rlc_Config->choice.am->ul_AM_RLC.pollByte = encode_poll_byte(default_rlc_config->srb.poll_byte);
|
||||
rlc_Config->choice.am->ul_AM_RLC.maxRetxThreshold = encode_max_retx_threshold(default_rlc_config->srb.max_retx_threshold);
|
||||
rlc_BearerConfig->rlc_Config = rlc_Config;
|
||||
|
||||
NR_LogicalChannelConfig_t *logicalChannelConfig = calloc(1, sizeof(NR_LogicalChannelConfig_t));
|
||||
@@ -3381,7 +3385,9 @@ NR_RLC_BearerConfig_t *get_SRB_RLC_BearerConfig(long channelId, long priority, l
|
||||
return rlc_BearerConfig;
|
||||
}
|
||||
|
||||
static void nr_drb_config(struct NR_RLC_Config *rlc_Config, NR_RLC_Config_PR rlc_config_pr)
|
||||
static void nr_drb_config(struct NR_RLC_Config *rlc_Config,
|
||||
NR_RLC_Config_PR rlc_config_pr,
|
||||
const nr_rlc_configuration_t *default_rlc_config)
|
||||
{
|
||||
switch (rlc_config_pr) {
|
||||
case NR_RLC_Config_PR_um_Bi_Directional:
|
||||
@@ -3390,25 +3396,25 @@ static void nr_drb_config(struct NR_RLC_Config *rlc_Config, NR_RLC_Config_PR rlc
|
||||
rlc_Config->choice.um_Bi_Directional = calloc(1, sizeof(*rlc_Config->choice.um_Bi_Directional));
|
||||
rlc_Config->choice.um_Bi_Directional->ul_UM_RLC.sn_FieldLength =
|
||||
calloc(1, sizeof(*rlc_Config->choice.um_Bi_Directional->ul_UM_RLC.sn_FieldLength));
|
||||
*rlc_Config->choice.um_Bi_Directional->ul_UM_RLC.sn_FieldLength = NR_SN_FieldLengthUM_size12;
|
||||
*rlc_Config->choice.um_Bi_Directional->ul_UM_RLC.sn_FieldLength = encode_sn_field_length_um(default_rlc_config->drb_um.sn_field_length);
|
||||
rlc_Config->choice.um_Bi_Directional->dl_UM_RLC.sn_FieldLength =
|
||||
calloc(1, sizeof(*rlc_Config->choice.um_Bi_Directional->dl_UM_RLC.sn_FieldLength));
|
||||
*rlc_Config->choice.um_Bi_Directional->dl_UM_RLC.sn_FieldLength = NR_SN_FieldLengthUM_size12;
|
||||
rlc_Config->choice.um_Bi_Directional->dl_UM_RLC.t_Reassembly = NR_T_Reassembly_ms15;
|
||||
*rlc_Config->choice.um_Bi_Directional->dl_UM_RLC.sn_FieldLength = encode_sn_field_length_um(default_rlc_config->drb_um.sn_field_length);
|
||||
rlc_Config->choice.um_Bi_Directional->dl_UM_RLC.t_Reassembly = encode_t_reassembly(default_rlc_config->drb_um.t_reassembly);
|
||||
break;
|
||||
case NR_RLC_Config_PR_am:
|
||||
// RLC AM Bearer configuration
|
||||
rlc_Config->choice.am = calloc(1, sizeof(*rlc_Config->choice.am));
|
||||
rlc_Config->choice.am->ul_AM_RLC.sn_FieldLength = calloc(1, sizeof(*rlc_Config->choice.am->ul_AM_RLC.sn_FieldLength));
|
||||
*rlc_Config->choice.am->ul_AM_RLC.sn_FieldLength = NR_SN_FieldLengthAM_size18;
|
||||
rlc_Config->choice.am->ul_AM_RLC.t_PollRetransmit = NR_T_PollRetransmit_ms45;
|
||||
rlc_Config->choice.am->ul_AM_RLC.pollPDU = NR_PollPDU_p64;
|
||||
rlc_Config->choice.am->ul_AM_RLC.pollByte = NR_PollByte_kB500;
|
||||
rlc_Config->choice.am->ul_AM_RLC.maxRetxThreshold = NR_UL_AM_RLC__maxRetxThreshold_t32;
|
||||
*rlc_Config->choice.am->ul_AM_RLC.sn_FieldLength = encode_sn_field_length_am(default_rlc_config->drb_am.sn_field_length);
|
||||
rlc_Config->choice.am->ul_AM_RLC.t_PollRetransmit = encode_t_poll_retransmit(default_rlc_config->drb_am.t_poll_retransmit);
|
||||
rlc_Config->choice.am->ul_AM_RLC.pollPDU = encode_poll_pdu(default_rlc_config->drb_am.poll_pdu);
|
||||
rlc_Config->choice.am->ul_AM_RLC.pollByte = encode_poll_byte(default_rlc_config->drb_am.poll_byte);
|
||||
rlc_Config->choice.am->ul_AM_RLC.maxRetxThreshold = encode_max_retx_threshold(default_rlc_config->drb_am.max_retx_threshold);
|
||||
rlc_Config->choice.am->dl_AM_RLC.sn_FieldLength = calloc(1, sizeof(*rlc_Config->choice.am->dl_AM_RLC.sn_FieldLength));
|
||||
*rlc_Config->choice.am->dl_AM_RLC.sn_FieldLength = NR_SN_FieldLengthAM_size18;
|
||||
rlc_Config->choice.am->dl_AM_RLC.t_Reassembly = NR_T_Reassembly_ms15;
|
||||
rlc_Config->choice.am->dl_AM_RLC.t_StatusProhibit = NR_T_StatusProhibit_ms15;
|
||||
*rlc_Config->choice.am->dl_AM_RLC.sn_FieldLength = encode_sn_field_length_am(default_rlc_config->drb_am.sn_field_length);
|
||||
rlc_Config->choice.am->dl_AM_RLC.t_Reassembly = encode_t_reassembly(default_rlc_config->drb_am.t_reassembly);
|
||||
rlc_Config->choice.am->dl_AM_RLC.t_StatusProhibit = encode_t_status_prohibit(default_rlc_config->drb_am.t_status_prohibit);
|
||||
break;
|
||||
default:
|
||||
AssertFatal(false, "RLC config type %d not handled\n", rlc_config_pr);
|
||||
@@ -3417,7 +3423,11 @@ static void nr_drb_config(struct NR_RLC_Config *rlc_Config, NR_RLC_Config_PR rlc
|
||||
rlc_Config->present = rlc_config_pr;
|
||||
}
|
||||
|
||||
NR_RLC_BearerConfig_t *get_DRB_RLC_BearerConfig(long lcChannelId, long drbId, NR_RLC_Config_PR rlc_conf, long priority)
|
||||
NR_RLC_BearerConfig_t *get_DRB_RLC_BearerConfig(long lcChannelId,
|
||||
long drbId,
|
||||
NR_RLC_Config_PR rlc_conf,
|
||||
long priority,
|
||||
const nr_rlc_configuration_t *default_rlc_config)
|
||||
{
|
||||
NR_RLC_BearerConfig_t *rlc_BearerConfig = calloc(1, sizeof(NR_RLC_BearerConfig_t));
|
||||
rlc_BearerConfig->logicalChannelIdentity = lcChannelId;
|
||||
@@ -3427,7 +3437,7 @@ NR_RLC_BearerConfig_t *get_DRB_RLC_BearerConfig(long lcChannelId, long drbId, NR
|
||||
rlc_BearerConfig->reestablishRLC = NULL;
|
||||
|
||||
NR_RLC_Config_t *rlc_Config = calloc(1, sizeof(NR_RLC_Config_t));
|
||||
nr_drb_config(rlc_Config, rlc_conf);
|
||||
nr_drb_config(rlc_Config, rlc_conf, default_rlc_config);
|
||||
rlc_BearerConfig->rlc_Config = rlc_Config;
|
||||
|
||||
NR_LogicalChannelConfig_t *logicalChannelConfig = calloc(1, sizeof(NR_LogicalChannelConfig_t));
|
||||
@@ -3451,7 +3461,8 @@ NR_RLC_BearerConfig_t *get_DRB_RLC_BearerConfig(long lcChannelId, long drbId, NR
|
||||
NR_CellGroupConfig_t *get_initial_cellGroupConfig(int uid,
|
||||
const NR_ServingCellConfigCommon_t *scc,
|
||||
const NR_ServingCellConfig_t *servingcellconfigdedicated,
|
||||
const nr_mac_config_t *configuration)
|
||||
const nr_mac_config_t *configuration,
|
||||
const nr_rlc_configuration_t *default_rlc_config)
|
||||
{
|
||||
NR_CellGroupConfig_t *cellGroupConfig = calloc(1, sizeof(*cellGroupConfig));
|
||||
cellGroupConfig->cellGroupId = 0;
|
||||
@@ -3460,7 +3471,7 @@ NR_CellGroupConfig_t *get_initial_cellGroupConfig(int uid,
|
||||
/* TS38.331 9.2.1 Default SRB configurations */
|
||||
cellGroupConfig->rlc_BearerToAddModList = calloc(1, sizeof(*cellGroupConfig->rlc_BearerToAddModList));
|
||||
NR_RLC_BearerConfig_t *rlc_BearerConfig =
|
||||
get_SRB_RLC_BearerConfig(1, 1, NR_LogicalChannelConfig__ul_SpecificParameters__bucketSizeDuration_ms1000);
|
||||
get_SRB_RLC_BearerConfig(1, 1, NR_LogicalChannelConfig__ul_SpecificParameters__bucketSizeDuration_ms1000, default_rlc_config);
|
||||
asn1cSeqAdd(&cellGroupConfig->rlc_BearerToAddModList->list, rlc_BearerConfig);
|
||||
|
||||
cellGroupConfig->rlc_BearerToReleaseList = NULL;
|
||||
|
||||
@@ -31,6 +31,7 @@
|
||||
#include "NR_UL-CCCH-Message.h"
|
||||
#include "f1ap_messages_types.h"
|
||||
#include "common/platform_types.h"
|
||||
#include "openair2/LAYER2/nr_rlc/nr_rlc_configuration.h"
|
||||
struct NR_MeasurementTimingConfiguration;
|
||||
struct NR_PDSCH_TimeDomainResourceAllocationList;
|
||||
|
||||
@@ -84,7 +85,8 @@ NR_SIB19_r17_t *get_SIB19_NR(const NR_ServingCellConfigCommon_t *scc);
|
||||
NR_CellGroupConfig_t *get_initial_cellGroupConfig(int uid,
|
||||
const NR_ServingCellConfigCommon_t *scc,
|
||||
const NR_ServingCellConfig_t *servingcellconfigdedicated,
|
||||
const nr_mac_config_t *configuration);
|
||||
const nr_mac_config_t *configuration,
|
||||
const nr_rlc_configuration_t *default_rlc_config);
|
||||
void update_cellGroupConfig(NR_CellGroupConfig_t *cellGroupConfig,
|
||||
const int uid,
|
||||
NR_UE_NR_Capability_t *uecap,
|
||||
@@ -107,7 +109,14 @@ NR_CellGroupConfig_t *get_default_secondaryCellGroup(const NR_ServingCellConfigC
|
||||
|
||||
NR_ReconfigurationWithSync_t *get_reconfiguration_with_sync(rnti_t rnti, uid_t uid, const NR_ServingCellConfigCommon_t *scc);
|
||||
|
||||
NR_RLC_BearerConfig_t *get_SRB_RLC_BearerConfig(long channelId, long priority, long bucketSizeDuration);
|
||||
NR_RLC_BearerConfig_t *get_DRB_RLC_BearerConfig(long lcChannelId, long drbId, NR_RLC_Config_PR rlc_conf, long priority);
|
||||
NR_RLC_BearerConfig_t *get_SRB_RLC_BearerConfig(long channelId,
|
||||
long priority,
|
||||
long bucketSizeDuration,
|
||||
const nr_rlc_configuration_t *default_rlc_config);
|
||||
NR_RLC_BearerConfig_t *get_DRB_RLC_BearerConfig(long lcChannelId,
|
||||
long drbId,
|
||||
NR_RLC_Config_PR rlc_conf,
|
||||
long priority,
|
||||
const nr_rlc_configuration_t *default_rlc_config);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -19,63 +19,30 @@
|
||||
* contact@openairinterface.org
|
||||
*/
|
||||
|
||||
#include "nr_pdcp_asn1_utils.h"
|
||||
#include "common/utils/LOG/log.h"
|
||||
#include "nr_pdcp_entity.h"
|
||||
#include "nr_pdcp_configuration.h"
|
||||
|
||||
int decode_t_reordering(int v)
|
||||
{
|
||||
static const int tab[36] = {0, 1, 2, 4, 5, 8, 10, 15, 20, 30, 40, 50, 60, 80, 100, 120, 140, 160,
|
||||
180, 200, 220, 240, 260, 280, 300, 500, 750, 1000, 1250, 1500, 1750, 2000, 2250, 2500, 2750, 3000};
|
||||
|
||||
if (v < 0 || v > 35) {
|
||||
LOG_E(RLC, "%s:%d:%s: fatal\n", __FILE__, __LINE__, __FUNCTION__);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
return tab[v];
|
||||
#define ENCODE_DECODE(a, b) \
|
||||
int decode_##a(int v) \
|
||||
{ \
|
||||
static const int tab[] = { VALUES_NR_PDCP_##b }; \
|
||||
AssertFatal(v >= 0 && v < SIZEOF_NR_PDCP_##b, \
|
||||
"bad encoded value " #a " %d\n", v); \
|
||||
return tab[v]; \
|
||||
} \
|
||||
\
|
||||
int encode_##a(int v) \
|
||||
{ \
|
||||
static const int tab[] = { VALUES_NR_PDCP_##b }; \
|
||||
for (int ret = 0; ret < SIZEOF_NR_PDCP_##b; ret++) \
|
||||
if (tab[ret] == v) \
|
||||
return ret; \
|
||||
AssertFatal(0, "bad " #a " value %d\n", v); \
|
||||
}
|
||||
|
||||
int decode_sn_size_ul(long s)
|
||||
{
|
||||
if (s == 0) return SHORT_SN_SIZE;
|
||||
if (s == 1) return LONG_SN_SIZE;
|
||||
LOG_E(RLC, "%s:%d:%s: fatal\n", __FILE__, __LINE__, __FUNCTION__);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
int decode_sn_size_dl(long s)
|
||||
{
|
||||
if (s == 0) return SHORT_SN_SIZE;
|
||||
if (s == 1) return LONG_SN_SIZE;
|
||||
LOG_E(RLC, "%s:%d:%s: fatal\n", __FILE__, __LINE__, __FUNCTION__);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
int decode_discard_timer(long v)
|
||||
{
|
||||
static const int tab[16] = {
|
||||
10,
|
||||
20,
|
||||
30,
|
||||
40,
|
||||
50,
|
||||
60,
|
||||
75,
|
||||
100,
|
||||
150,
|
||||
200,
|
||||
250,
|
||||
300,
|
||||
500,
|
||||
750,
|
||||
1500,
|
||||
-1,
|
||||
};
|
||||
|
||||
if (v < 0 || v > 15) {
|
||||
LOG_E(RLC, "%s:%d:%s: fatal\n", __FILE__, __LINE__, __FUNCTION__);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
return tab[v];
|
||||
}
|
||||
ENCODE_DECODE(t_reordering, T_REORDERING)
|
||||
ENCODE_DECODE(sn_size_ul, SN_SIZE)
|
||||
ENCODE_DECODE(sn_size_dl, SN_SIZE)
|
||||
ENCODE_DECODE(discard_timer, DISCARD_TIMER)
|
||||
|
||||
@@ -23,8 +23,13 @@
|
||||
#define _OPENAIR2_LAYER2_NR_PDCP_ASN1_UTILS_H_
|
||||
|
||||
int decode_t_reordering(int v);
|
||||
int decode_sn_size_ul(long s);
|
||||
int decode_sn_size_dl(long s);
|
||||
int decode_discard_timer(long v);
|
||||
int decode_sn_size_ul(int v);
|
||||
int decode_sn_size_dl(int v);
|
||||
int decode_discard_timer(int v);
|
||||
|
||||
int encode_t_reordering(int v);
|
||||
int encode_sn_size_ul(int v);
|
||||
int encode_sn_size_dl(int v);
|
||||
int encode_discard_timer(int v);
|
||||
|
||||
#endif /* _OPENAIR2_LAYER2_NR_PDCP_ASN1_UTILS_H_ */
|
||||
|
||||
@@ -0,0 +1,70 @@
|
||||
/*
|
||||
* 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
|
||||
*/
|
||||
|
||||
#ifndef _NR_PDCP_CONFIGURATION_H_
|
||||
#define _NR_PDCP_CONFIGURATION_H_
|
||||
|
||||
#ifndef INT_LIST_SIZE
|
||||
#define INT_LIST_SIZE(x) (sizeof((int[]){x})/sizeof(int))
|
||||
#endif
|
||||
|
||||
/* values taken from 3GPP TS 38.331 version 17.3.0 */
|
||||
|
||||
#define VALUES_NR_PDCP_SN_SIZE \
|
||||
12, 18
|
||||
|
||||
#define VALUES_NR_PDCP_SN_SIZE_STR \
|
||||
"len12bits", "len18bits"
|
||||
|
||||
#define SIZEOF_NR_PDCP_SN_SIZE INT_LIST_SIZE(VALUES_NR_PDCP_SN_SIZE)
|
||||
|
||||
#define VALUES_NR_PDCP_T_REORDERING \
|
||||
0, 1, 2, 4, 5, 8, 10, 15, 20, 30, 40, 50, \
|
||||
60, 80, 100, 120, 140, 160, 180, 200, 220, 240, 260, 280, \
|
||||
300, 500, 750, 1000, 1250, 1500, 1750, 2000, 2250, 2500, 2750, 3000, \
|
||||
-1 /* -1 means infinity */ \
|
||||
|
||||
#define VALUES_NR_PDCP_T_REORDERING_STR \
|
||||
"ms0", "ms1", "ms2", "ms4", "ms5", "ms8", "ms10", "ms15", "ms20", "ms30", "ms40", "ms50", \
|
||||
"ms60", "ms80", "ms100", "ms120", "ms140", "ms160", "ms180", "ms200", "ms220", "ms240", "ms260", "ms280", \
|
||||
"ms300", "ms500", "ms750", "ms1000", "ms1250", "ms1500", "ms1750", "ms2000", "ms2250", "ms2500", "ms2750", "ms3000", \
|
||||
"infinity"
|
||||
|
||||
#define SIZEOF_NR_PDCP_T_REORDERING INT_LIST_SIZE(VALUES_NR_PDCP_T_REORDERING)
|
||||
|
||||
#define VALUES_NR_PDCP_DISCARD_TIMER \
|
||||
10, 20, 30, 40, 50, 60, 75, 100, 150, 200, 250, 300, 500, 750, 1500, -1 /* -1 means infinity */
|
||||
|
||||
#define VALUES_NR_PDCP_DISCARD_TIMER_STR \
|
||||
"ms10", "ms20", "ms30", "ms40", "ms50", "ms60", "ms75", "ms100", "ms150", "ms200", "ms250", "ms300", "ms500", "ms750", "ms1500", "infinity"
|
||||
|
||||
#define SIZEOF_NR_PDCP_DISCARD_TIMER INT_LIST_SIZE(VALUES_NR_PDCP_DISCARD_TIMER)
|
||||
|
||||
/* configuration of NR PDCP, coming from configuration file */
|
||||
typedef struct {
|
||||
struct {
|
||||
int sn_size;
|
||||
int t_reordering;
|
||||
int discard_timer;
|
||||
} drb;
|
||||
} nr_pdcp_configuration_t;
|
||||
|
||||
#endif /* _NR_PDCP_CONFIGURATION_H_ */
|
||||
@@ -19,157 +19,33 @@
|
||||
* contact@openairinterface.org
|
||||
*/
|
||||
|
||||
#include "nr_rlc_asn1_utils.h"
|
||||
#include "rlc.h"
|
||||
#include "nr_rlc_configuration.h"
|
||||
|
||||
int decode_t_reassembly(int v)
|
||||
{
|
||||
static const int tab[31] = {0, 5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 75,
|
||||
80, 85, 90, 95, 100, 110, 120, 130, 140, 150, 160, 170, 180, 190, 200};
|
||||
|
||||
if (v < 0 || v > 30) {
|
||||
LOG_E(RLC, "%s:%d:%s: fatal\n", __FILE__, __LINE__, __FUNCTION__);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
return tab[v];
|
||||
#define ENCODE_DECODE(a, b) \
|
||||
int decode_##a(int v) \
|
||||
{ \
|
||||
static const int tab[] = { VALUES_NR_RLC_##b }; \
|
||||
AssertFatal(v >= 0 && v < SIZEOF_NR_RLC_##b, \
|
||||
"bad encoded value " #a " %d\n", v); \
|
||||
return tab[v]; \
|
||||
} \
|
||||
\
|
||||
int encode_##a(int v) \
|
||||
{ \
|
||||
static const int tab[] = { VALUES_NR_RLC_##b }; \
|
||||
for (int ret = 0; ret < SIZEOF_NR_RLC_##b; ret++) \
|
||||
if (tab[ret] == v) \
|
||||
return ret; \
|
||||
AssertFatal(0, "bad " #a " value %d\n", v); \
|
||||
}
|
||||
|
||||
int decode_t_status_prohibit(int v)
|
||||
{
|
||||
static const int tab[62] = {0, 5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 75,
|
||||
80, 85, 90, 95, 100, 105, 110, 115, 120, 125, 130, 135, 140, 145, 150, 155,
|
||||
160, 165, 170, 175, 180, 185, 190, 195, 200, 205, 210, 215, 220, 225, 230, 235,
|
||||
240, 245, 250, 300, 350, 400, 450, 500, 800, 1000, 1200, 1600, 2000, 2400};
|
||||
|
||||
if (v < 0 || v > 61) {
|
||||
LOG_E(RLC, "%s:%d:%s: fatal\n", __FILE__, __LINE__, __FUNCTION__);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
return tab[v];
|
||||
}
|
||||
|
||||
int decode_t_poll_retransmit(int v)
|
||||
{
|
||||
static const int tab[59] = {5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 75, 80, 85, 90, 95, 100,
|
||||
105, 110, 115, 120, 125, 130, 135, 140, 145, 150, 155, 160, 165, 170, 175, 180, 185, 190, 195, 200,
|
||||
205, 210, 215, 220, 225, 230, 235, 240, 245, 250, 300, 350, 400, 450, 500, 800, 1000, 2000, 4000};
|
||||
|
||||
if (v < 0 || v > 58) {
|
||||
LOG_E(RLC, "%s:%d:%s: fatal\n", __FILE__, __LINE__, __FUNCTION__);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
return tab[v];
|
||||
}
|
||||
|
||||
int decode_poll_pdu(int v)
|
||||
{
|
||||
static const int tab[24] = {
|
||||
4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 6144,
|
||||
8192, 12288, 16384, 20480, 24576, 28672, 32768, 40960, 49152, 57344, 65536, -1 /* -1 means infinity */
|
||||
};
|
||||
|
||||
if (v < 0 || v > 23) {
|
||||
LOG_E(RLC, "%s:%d:%s: fatal\n", __FILE__, __LINE__, __FUNCTION__);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
return tab[v];
|
||||
}
|
||||
|
||||
int decode_poll_byte(int v)
|
||||
{
|
||||
static const int tab[44] = {
|
||||
/* KB */
|
||||
1024 * 1,
|
||||
1024 * 2,
|
||||
1024 * 5,
|
||||
1024 * 8,
|
||||
1024 * 10,
|
||||
1024 * 15,
|
||||
1024 * 25,
|
||||
1024 * 50,
|
||||
1024 * 75,
|
||||
1024 * 100,
|
||||
1024 * 125,
|
||||
1024 * 250,
|
||||
1024 * 375,
|
||||
1024 * 500,
|
||||
1024 * 750,
|
||||
1024 * 1000,
|
||||
1024 * 1250,
|
||||
1024 * 1500,
|
||||
1024 * 2000,
|
||||
1024 * 3000,
|
||||
1024 * 4000,
|
||||
1024 * 4500,
|
||||
1024 * 5000,
|
||||
1024 * 5500,
|
||||
1024 * 6000,
|
||||
1024 * 6500,
|
||||
1024 * 7000,
|
||||
1024 * 7500,
|
||||
/* MB */
|
||||
1024 * 1024 * 8,
|
||||
1024 * 1024 * 9,
|
||||
1024 * 1024 * 10,
|
||||
1024 * 1024 * 11,
|
||||
1024 * 1024 * 12,
|
||||
1024 * 1024 * 13,
|
||||
1024 * 1024 * 14,
|
||||
1024 * 1024 * 15,
|
||||
1024 * 1024 * 16,
|
||||
1024 * 1024 * 17,
|
||||
1024 * 1024 * 18,
|
||||
1024 * 1024 * 20,
|
||||
1024 * 1024 * 25,
|
||||
1024 * 1024 * 30,
|
||||
1024 * 1024 * 40,
|
||||
-1 /* -1 means infinity */
|
||||
};
|
||||
|
||||
if (v < 0 || v > 43) {
|
||||
LOG_E(RLC, "%s:%d:%s: fatal\n", __FILE__, __LINE__, __FUNCTION__);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
if (tab[v] == -1) return -1;
|
||||
return tab[v];
|
||||
}
|
||||
|
||||
int decode_max_retx_threshold(int v)
|
||||
{
|
||||
static const int tab[8] = {1, 2, 3, 4, 6, 8, 16, 32};
|
||||
|
||||
if (v < 0 || v > 7) {
|
||||
LOG_E(RLC, "%s:%d:%s: fatal\n", __FILE__, __LINE__, __FUNCTION__);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
return tab[v];
|
||||
}
|
||||
|
||||
int decode_sn_field_length_um(int v)
|
||||
{
|
||||
static const int tab[2] = {6, 12};
|
||||
|
||||
if (v < 0 || v > 1) {
|
||||
LOG_E(RLC, "%s:%d:%s: fatal\n", __FILE__, __LINE__, __FUNCTION__);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
return tab[v];
|
||||
}
|
||||
|
||||
int decode_sn_field_length_am(int v)
|
||||
{
|
||||
static const int tab[2] = {12, 18};
|
||||
|
||||
if (v < 0 || v > 1) {
|
||||
LOG_E(RLC, "%s:%d:%s: fatal\n", __FILE__, __LINE__, __FUNCTION__);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
return tab[v];
|
||||
}
|
||||
ENCODE_DECODE(t_reassembly, T_REASSEMBLY)
|
||||
ENCODE_DECODE(t_status_prohibit, T_STATUS_PROHIBIT)
|
||||
ENCODE_DECODE(t_poll_retransmit, T_POLL_RETRANSMIT)
|
||||
ENCODE_DECODE(poll_pdu, POLL_PDU)
|
||||
ENCODE_DECODE(poll_byte, POLL_BYTE)
|
||||
ENCODE_DECODE(max_retx_threshold, MAX_RETX_THRESHOLD)
|
||||
ENCODE_DECODE(sn_field_length_am, SN_FIELD_LENGTH_AM)
|
||||
ENCODE_DECODE(sn_field_length_um, SN_FIELD_LENGTH_UM)
|
||||
|
||||
@@ -31,4 +31,13 @@ int decode_max_retx_threshold(int v);
|
||||
int decode_sn_field_length_um(int v);
|
||||
int decode_sn_field_length_am(int v);
|
||||
|
||||
int encode_t_reassembly(int v);
|
||||
int encode_t_status_prohibit(int v);
|
||||
int encode_t_poll_retransmit(int v);
|
||||
int encode_poll_pdu(int v);
|
||||
int encode_poll_byte(int v);
|
||||
int encode_max_retx_threshold(int v);
|
||||
int encode_sn_field_length_um(int v);
|
||||
int encode_sn_field_length_am(int v);
|
||||
|
||||
#endif /* _OPENAIR2_LAYER2_NR_RLC_ASN1_UTILS_H_ */
|
||||
|
||||
@@ -0,0 +1,160 @@
|
||||
/*
|
||||
* 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
|
||||
*/
|
||||
|
||||
#ifndef _NR_RLC_CONFIGURATION_H_
|
||||
#define _NR_RLC_CONFIGURATION_H_
|
||||
|
||||
#ifndef INT_LIST_SIZE
|
||||
#define INT_LIST_SIZE(x) (sizeof((int[]){x})/sizeof(int))
|
||||
#endif
|
||||
|
||||
/* values taken from 3GPP TS 38.331 version 17.3.0 */
|
||||
|
||||
#define VALUES_NR_RLC_T_POLL_RETRANSMIT \
|
||||
5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70, \
|
||||
75, 80, 85, 90, 95, 100, 105, 110, 115, 120, 125, 130, 135, 140, \
|
||||
145, 150, 155, 160, 165, 170, 175, 180, 185, 190, 195, 200, 205, 210, \
|
||||
215, 220, 225, 230, 235, 240, 245, 250, 300, 350, 400, 450, 500, 800, \
|
||||
1000, 2000, 4000, 1, 2, 4
|
||||
|
||||
#define VALUES_NR_RLC_T_POLL_RETRANSMIT_STR \
|
||||
"ms5", "ms10", "ms15", "ms20", "ms25", "ms30", "ms35", "ms40", "ms45", "ms50", "ms55", "ms60", "ms65", "ms70", \
|
||||
"ms75", "ms80", "ms85", "ms90", "ms95", "ms100", "ms105", "ms110", "ms115", "ms120", "ms125", "ms130", "ms135", "ms140", \
|
||||
"ms145", "ms150", "ms155", "ms160", "ms165", "ms170", "ms175", "ms180", "ms185", "ms190", "ms195", "ms200", "ms205", "ms210", \
|
||||
"ms215", "ms220", "ms225", "ms230", "ms235", "ms240", "ms245", "ms250", "ms300", "ms350", "ms400", "ms450", "ms500", "ms800", \
|
||||
"ms1000", "ms2000", "ms4000", "ms1", "ms2", "ms4"
|
||||
|
||||
#define SIZEOF_NR_RLC_T_POLL_RETRANSMIT INT_LIST_SIZE(VALUES_NR_RLC_T_POLL_RETRANSMIT)
|
||||
|
||||
#define VALUES_NR_RLC_T_REASSEMBLY \
|
||||
0, 5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 75, \
|
||||
80, 85, 90, 95, 100, 110, 120, 130, 140, 150, 160, 170, 180, 190, 200
|
||||
|
||||
#define VALUES_NR_RLC_T_REASSEMBLY_STR \
|
||||
"ms0", "ms5", "ms10", "ms15", "ms20", "ms25", "ms30", "ms35", "ms40", "ms45", "ms50", "ms55", "ms60", "ms65", "ms70", "ms75", \
|
||||
"ms80", "ms85", "ms90", "ms95", "ms100", "ms110", "ms120", "ms130", "ms140", "ms150", "ms160", "ms170", "ms180", "ms190", "ms200"
|
||||
|
||||
#define SIZEOF_NR_RLC_T_REASSEMBLY INT_LIST_SIZE(VALUES_NR_RLC_T_REASSEMBLY)
|
||||
|
||||
#define VALUES_NR_RLC_T_STATUS_PROHIBIT \
|
||||
0, 5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, \
|
||||
60, 65, 70, 75, 80, 85, 90, 95, 100, 105, 110, 115, \
|
||||
120, 125, 130, 135, 140, 145, 150, 155, 160, 165, 170, 175, \
|
||||
180, 185, 190, 195, 200, 205, 210, 215, 220, 225, 230, 235, \
|
||||
240, 245, 250, 300, 350, 400, 450, 500, 800, 1000, 1200, 1600, \
|
||||
2000, 2400
|
||||
|
||||
#define VALUES_NR_RLC_T_STATUS_PROHIBIT_STR \
|
||||
"ms0", "ms5", "ms10", "ms15", "ms20", "ms25", "ms30", "ms35", "ms40", "ms45", "ms50", "ms55", \
|
||||
"ms60", "ms65", "ms70", "ms75", "ms80", "ms85", "ms90", "ms95", "ms100", "ms105", "ms110", "ms115", \
|
||||
"ms120", "ms125", "ms130", "ms135", "ms140", "ms145", "ms150", "ms155", "ms160", "ms165", "ms170", "ms175", \
|
||||
"ms180", "ms185", "ms190", "ms195", "ms200", "ms205", "ms210", "ms215", "ms220", "ms225", "ms230", "ms235", \
|
||||
"ms240", "ms245", "ms250", "ms300", "ms350", "ms400", "ms450", "ms500", "ms800", "ms1000", "ms1200", "ms1600", \
|
||||
"ms2000", "ms2400"
|
||||
|
||||
#define SIZEOF_NR_RLC_T_STATUS_PROHIBIT INT_LIST_SIZE(VALUES_NR_RLC_T_STATUS_PROHIBIT)
|
||||
|
||||
#define VALUES_NR_RLC_POLL_PDU \
|
||||
4, 8, 16, 32, 64, 128, 256, 512, 1024, \
|
||||
2048, 4096, 6144, 8192, 12288, 16384, 20480, 24576, 28672, \
|
||||
32768, 40960, 49152, 57344, 65536, -1 /* -1 means infinity */
|
||||
|
||||
#define VALUES_NR_RLC_POLL_PDU_STR \
|
||||
"p4", "p8", "p16", "p32", "p64", "p128", "p256", "p512", "p1024", \
|
||||
"p2048", "p4096", "p6144", "p8192", "p12288", "p16384", "p20480", "p24576", "p28672", \
|
||||
"p32768", "p40960", "p49152", "p57344", "p65536", "infinity"
|
||||
|
||||
#define SIZEOF_NR_RLC_POLL_PDU INT_LIST_SIZE(VALUES_NR_RLC_POLL_PDU)
|
||||
|
||||
#define VALUES_NR_RLC_POLL_BYTE \
|
||||
/* KB */ \
|
||||
1024 * 1, 1024 * 2, 1024 * 5, 1024 * 8, 1024 * 10, 1024 * 15, 1024 * 25, 1024 * 50, 1024 * 75, \
|
||||
1024 * 100, 1024 * 125, 1024 * 250, 1024 * 375, 1024 * 500, 1024 * 750, 1024 * 1000, 1024 * 1250, \
|
||||
1024 * 1500, 1024 * 2000, 1024 * 3000, 1024 * 4000, 1024 * 4500, 1024 * 5000, 1024 * 5500, \
|
||||
1024 * 6000, 1024 * 6500, 1024 * 7000, 1024 * 7500, \
|
||||
/* MB */ \
|
||||
1024 * 1024 * 8, 1024 * 1024 * 9, 1024 * 1024 * 10, 1024 * 1024 * 11, 1024 * 1024 * 12, \
|
||||
1024 * 1024 * 13, 1024 * 1024 * 14, 1024 * 1024 * 15, 1024 * 1024 * 16, 1024 * 1024 * 17, \
|
||||
1024 * 1024 * 18, 1024 * 1024 * 20, 1024 * 1024 * 25, 1024 * 1024 * 30, 1024 * 1024 * 40, \
|
||||
-1 /* -1 means infinity */
|
||||
|
||||
#define VALUES_NR_RLC_POLL_BYTE_STR \
|
||||
"kB1", "kB2", "kB5", "kB8", "kB10", "kB15", "kB25", "kB50", "kB75", \
|
||||
"kB100", "kB125", "kB250", "kB375", "kB500", "kB750", "kB1000", "kB1250", \
|
||||
"kB1500", "kB2000", "kB3000", "kB4000", "kB4500", "kB5000", "kB5500", \
|
||||
"kB6000", "kB6500", "kB7000", "kB7500", \
|
||||
"mB8", "mB9", "mB10", "mB11", "mB12", "mB13", "mB14", "mB15", \
|
||||
"mB16", "mB17", "mB18", "mB20", "mB25", "mB30", "mB40", \
|
||||
"infinity"
|
||||
|
||||
#define SIZEOF_NR_RLC_POLL_BYTE INT_LIST_SIZE(VALUES_NR_RLC_POLL_BYTE)
|
||||
|
||||
#define VALUES_NR_RLC_MAX_RETX_THRESHOLD \
|
||||
1, 2, 3, 4, 6, 8, 16, 32
|
||||
|
||||
#define VALUES_NR_RLC_MAX_RETX_THRESHOLD_STR \
|
||||
"t1", "t2", "t3", "t4", "t6", "t8", "t16", "t32"
|
||||
|
||||
#define SIZEOF_NR_RLC_MAX_RETX_THRESHOLD INT_LIST_SIZE(VALUES_NR_RLC_MAX_RETX_THRESHOLD)
|
||||
|
||||
#define VALUES_NR_RLC_SN_FIELD_LENGTH_AM \
|
||||
12, 18
|
||||
|
||||
#define VALUES_NR_RLC_SN_FIELD_LENGTH_AM_STR \
|
||||
"size12", "size18"
|
||||
|
||||
#define SIZEOF_NR_RLC_SN_FIELD_LENGTH_AM INT_LIST_SIZE(VALUES_NR_RLC_SN_FIELD_LENGTH_AM)
|
||||
|
||||
#define VALUES_NR_RLC_SN_FIELD_LENGTH_UM \
|
||||
6, 12
|
||||
|
||||
#define VALUES_NR_RLC_SN_FIELD_LENGTH_UM_STR \
|
||||
"size6", "size12"
|
||||
|
||||
#define SIZEOF_NR_RLC_SN_FIELD_LENGTH_UM INT_LIST_SIZE(VALUES_NR_RLC_SN_FIELD_LENGTH_UM)
|
||||
|
||||
/* configuration of NR RLC, coming from configuration file */
|
||||
typedef struct {
|
||||
struct {
|
||||
int t_poll_retransmit;
|
||||
int t_reassembly;
|
||||
int t_status_prohibit;
|
||||
int poll_pdu;
|
||||
int poll_byte;
|
||||
int max_retx_threshold;
|
||||
int sn_field_length;
|
||||
} srb;
|
||||
struct {
|
||||
int t_poll_retransmit;
|
||||
int t_reassembly;
|
||||
int t_status_prohibit;
|
||||
int poll_pdu;
|
||||
int poll_byte;
|
||||
int max_retx_threshold;
|
||||
int sn_field_length;
|
||||
} drb_am;
|
||||
struct {
|
||||
int t_reassembly;
|
||||
int sn_field_length;
|
||||
} drb_um;
|
||||
} nr_rlc_configuration_t;
|
||||
|
||||
#endif /* _NR_RLC_CONFIGURATION_H_ */
|
||||
Reference in New Issue
Block a user