rlc,rrc,nr: remove rb_type from rlc_um_config

Signed-off-by: Carlo Galiotto <carlo@srs.io>
master
Carlo Galiotto 3 years ago committed by carlo-gal
parent 9c2099f680
commit ba50bbfb76

@ -134,10 +134,7 @@ bool make_mac_dl_harq_cfg_nr_t(const asn1::rrc_nr::pdsch_ser
/***************************
* RLC Config
**************************/
int make_rlc_config_t(const asn1::rrc_nr::rlc_cfg_c& asn1_type,
uint8_t bearer_id,
rlc_rb_type_t rb_type,
rlc_config_t* rlc_config_out);
int make_rlc_config_t(const asn1::rrc_nr::rlc_cfg_c& asn1_type, uint8_t bearer_id, rlc_config_t* rlc_config_out);
/***************************
* PDCP Config

@ -70,8 +70,6 @@ inline uint16_t to_number(const rlc_am_nr_sn_size_t& sn_size)
return enum_to_number(options, (uint32_t)rlc_mode_t::nulltype, (uint32_t)sn_size);
}
typedef enum { RLC_RB_IS_SRB, RLC_RB_IS_DRB } rlc_rb_type_t;
struct rlc_am_config_t {
/****************************************************************************
* Configurable parameters
@ -114,7 +112,6 @@ struct rlc_um_nr_config_t {
rlc_um_nr_sn_size_t sn_field_length; // Number of bits used for sequence number
int32_t t_reassembly_ms; // Timer used by rx to detect PDU loss (ms)
uint8_t bearer_id; // This is not in the 3GPP TS 38.322
rlc_rb_type_t rb_type; // This is not in the 3GPP TS 38.322
};
#define RLC_TX_QUEUE_LEN (256)

@ -101,7 +101,7 @@ rach_nr_cfg_t make_mac_rach_cfg(const rach_cfg_common_s& asn1_type)
return rach_nr_cfg;
};
int make_rlc_config_t(const rlc_cfg_c& asn1_type, uint8_t bearer_id, rlc_rb_type_t rb_type, rlc_config_t* cfg_out)
int make_rlc_config_t(const rlc_cfg_c& asn1_type, uint8_t bearer_id, rlc_config_t* cfg_out)
{
rlc_config_t rlc_cfg = rlc_config_t::default_rlc_um_nr_config();
rlc_cfg.rat = srsran_rat_t::nr;
@ -113,7 +113,6 @@ int make_rlc_config_t(const rlc_cfg_c& asn1_type, uint8_t bearer_id, rlc_rb_type
rlc_cfg.rlc_mode = rlc_mode_t::um;
rlc_cfg.um_nr.t_reassembly_ms = asn1_type.um_bi_dir().dl_um_rlc.t_reassembly.to_number();
rlc_cfg.um_nr.bearer_id = bearer_id;
rlc_cfg.um_nr.rb_type = rb_type;
if (asn1_type.um_bi_dir().dl_um_rlc.sn_field_len_present &&
asn1_type.um_bi_dir().ul_um_rlc.sn_field_len_present &&
asn1_type.um_bi_dir().dl_um_rlc.sn_field_len != asn1_type.um_bi_dir().ul_um_rlc.sn_field_len) {

@ -67,12 +67,7 @@ bool rlc_um_nr::configure(const rlc_config_t& cnfg_)
std::string rlc_um_nr::get_rb_name() const
{
fmt::memory_buffer fmtbuf;
// currently we only support DRB 1 (hardcoded)
if (cfg.um_nr.bearer_id == 1) {
fmt::format_to(fmtbuf, "{}{}", cfg.um_nr.rb_type == RLC_RB_IS_SRB ? "SRB" : "DRB", cfg.um_nr.bearer_id);
} else {
fmt::format_to(fmtbuf, "DRB N/A");
}
fmt::format_to(fmtbuf, "DRB{}", cfg.um_nr.bearer_id);
return fmt::to_string(fmtbuf);
}

@ -36,7 +36,7 @@ int test_rlc_config()
rlc_config_t rlc_cfg;
// We hard-code the bearer_id=1 and rb_type=DRB
TESTASSERT(make_rlc_config_t(rlc_cfg_asn1, /* bearer_id */ 1, /*rb_type*/ RLC_RB_IS_DRB, &rlc_cfg) == SRSRAN_SUCCESS);
TESTASSERT(make_rlc_config_t(rlc_cfg_asn1, /* bearer_id */ 1, &rlc_cfg) == SRSRAN_SUCCESS);
TESTASSERT(rlc_cfg.rat == srsran_rat_t::nr);
TESTASSERT(rlc_cfg.um_nr.sn_field_length == rlc_um_nr_sn_size_t::size12bits);
return SRSRAN_SUCCESS;

@ -1405,7 +1405,6 @@ int rrc_nr::ue::add_drb()
/// NOTE, we need to pass the radio-bearer to the rlc_config
if (srsran::make_rlc_config_t(cell_group_cfg.rlc_bearer_to_add_mod_list[0].rlc_cfg,
rlc_bearer.served_radio_bearer.drb_id(),
srsran::RLC_RB_IS_DRB,
&rlc_cfg) != SRSRAN_SUCCESS) {
parent->logger.error("Failed to build RLC config");
return SRSRAN_ERROR;

@ -457,15 +457,15 @@ bool rrc_nr::apply_rlc_add_mod(const rlc_bearer_cfg_s& rlc_bearer_cfg)
uint32_t drb_id = 0;
uint32_t srb_id = 0;
rlc_config_t rlc_cfg;
// We change this to RLC_RB_IS_DRB if below we detect it's a DRB
rlc_rb_type_t rb_type = RLC_RB_IS_SRB;
// We set this to true if below we detect it's a DRB
bool isDRB = false;
lc_ch_id = rlc_bearer_cfg.lc_ch_id;
if (rlc_bearer_cfg.served_radio_bearer_present == true) {
if (rlc_bearer_cfg.served_radio_bearer.type() == rlc_bearer_cfg_s::served_radio_bearer_c_::types::drb_id) {
drb_id = rlc_bearer_cfg.served_radio_bearer.drb_id();
add_lcid_drb(lc_ch_id, drb_id);
rb_type = RLC_RB_IS_DRB;
isDRB = true;
}
} else {
logger.error("In RLC bearer cfg does not contain served radio bearer");
@ -473,8 +473,8 @@ bool rrc_nr::apply_rlc_add_mod(const rlc_bearer_cfg_s& rlc_bearer_cfg)
}
if (rlc_bearer_cfg.rlc_cfg_present == true) {
uint8_t bearer_id = static_cast<uint8_t>(rb_type == RLC_RB_IS_SRB ? srb_id : drb_id);
if (srsran::make_rlc_config_t(rlc_bearer_cfg.rlc_cfg, bearer_id, rb_type, &rlc_cfg) != SRSRAN_SUCCESS) {
uint8_t bearer_id = static_cast<uint8_t>(isDRB ? drb_id : srb_id);
if (srsran::make_rlc_config_t(rlc_bearer_cfg.rlc_cfg, bearer_id, &rlc_cfg) != SRSRAN_SUCCESS) {
logger.error("Failed to build RLC config");
return false;
}

Loading…
Cancel
Save