enb,configuration: allow to specify enb specific max nof RLC retxs

master
Francisco 4 years ago committed by Ismael Gomez
parent b5b2f8190e
commit 2a31daca4a

@ -14,6 +14,7 @@
#define SRSLOG_SHARED_TYPES_H
#include <functional>
#include <string>
namespace srslog {
@ -21,8 +22,7 @@ namespace srslog {
using error_handler = std::function<void(const std::string&)>;
/// Backend priority levels.
enum class backend_priority
{
enum class backend_priority {
/// Default priority of the operating system.
normal,
/// Thread will be given a high priority.

@ -31,12 +31,18 @@ struct rrc_cfg_sr_t {
};
struct rrc_cfg_qci_t {
bool configured = false;
bool configured = false;
int enb_dl_max_retx_thres = -1;
asn1::rrc::lc_ch_cfg_s::ul_specific_params_s_ lc_cfg;
asn1::rrc::pdcp_cfg_s pdcp_cfg;
asn1::rrc::rlc_cfg_c rlc_cfg;
};
struct srb_cfg_t {
int enb_dl_max_retx_thres = -1;
asn1::rrc::srb_to_add_mod_s::rlc_cfg_c_ rlc_cfg;
};
struct rrc_cfg_t {
uint32_t enb_id; ///< Required to pack SIB1
// Per eNB SIBs
@ -62,8 +68,8 @@ struct rrc_cfg_t {
uint32_t max_mac_dl_kos;
uint32_t max_mac_ul_kos;
uint32_t rlf_release_timer_ms;
asn1::rrc::srb_to_add_mod_s::rlc_cfg_c_ srb1_cfg;
asn1::rrc::srb_to_add_mod_s::rlc_cfg_c_ srb2_cfg;
srb_cfg_t srb1_cfg;
srb_cfg_t srb2_cfg;
};
constexpr uint32_t UE_PCELL_CC_IDX = 0;

@ -13,6 +13,9 @@
// t_status_prohibit = 0;
// };
// };
// enb_specific = {
// dl_max_retx_thresh = 32;
// };
// }
// srb2_config = {
@ -28,6 +31,9 @@
// t_status_prohibit = 0;
// };
// };
// enb_specific = {
// dl_max_retx_thresh = 32;
// };
// }
qci_config = (
@ -53,6 +59,9 @@ qci_config = (
bucket_size_duration = 100;
log_chan_group = 2;
};
enb_specific = {
dl_max_retx_thresh = 32;
};
},
{
qci=9;
@ -78,6 +87,9 @@ qci_config = (
bucket_size_duration = 100;
log_chan_group = 3;
};
enb_specific = {
dl_max_retx_thresh = 32;
};
}
);

@ -400,7 +400,7 @@ int phr_cnfg_parser::parse(libconfig::Setting& root)
int field_srb::parse(libconfig::Setting& root)
{
// Parse RLC AM section
rlc_cfg_c* rlc_cfg = &cfg.set_explicit_value();
rlc_cfg_c* rlc_cfg = &cfg.rlc_cfg.set_explicit_value();
if (root.exists("ul_am") && root.exists("dl_am")) {
rlc_cfg->set_am();
}
@ -455,6 +455,11 @@ int field_srb::parse(libconfig::Setting& root)
return SRSRAN_ERROR;
}
}
if (root.exists("enb_specific")) {
cfg.enb_dl_max_retx_thres = (int)root["enb_specific"]["dl_max_retx_thresh"];
}
return 0;
}
@ -616,6 +621,11 @@ int field_qci::parse(libconfig::Setting& root)
parser::field<uint8> log_chan_group("log_chan_group", &lc_cfg->lc_ch_group);
lc_cfg->lc_ch_group_present = not log_chan_group.parse(q["logical_channel_config"]);
qcicfg.configured = true;
if (q.exists("enb_specific")) {
qcicfg.enb_dl_max_retx_thres = (int)q["enb_specific"]["dl_max_retx_thresh"];
}
cfg.insert(std::make_pair(qci, qcicfg));
}
@ -1752,10 +1762,10 @@ int parse_drb(all_args_t* args_, rrc_cfg_t* rrc_cfg_)
int ret = p.parse();
if (not srb1_present) {
rrc_cfg_->srb1_cfg.set_default_value();
rrc_cfg_->srb1_cfg.rlc_cfg.set_default_value();
}
if (not srb2_present) {
rrc_cfg_->srb2_cfg.set_default_value();
rrc_cfg_->srb2_cfg.rlc_cfg.set_default_value();
}
return ret;

@ -149,13 +149,13 @@ private:
class field_srb final : public parser::field_itf
{
public:
explicit field_srb(asn1::rrc::srb_to_add_mod_s::rlc_cfg_c_& cfg_) : cfg(cfg_) {}
explicit field_srb(srb_cfg_t& cfg_) : cfg(cfg_) {}
const char* get_name() override { return "field_srb"; }
int parse(Setting& root) override;
private:
asn1::rrc::srb_to_add_mod_s::rlc_cfg_c_& cfg;
srb_cfg_t& cfg;
};
class field_qci final : public parser::field_itf

@ -103,24 +103,13 @@ int32_t rrc::init(const rrc_cfg_t& cfg_,
running = true;
if (cfg.srb1_cfg.type() == srb_to_add_mod_s::rlc_cfg_c_::types::explicit_value) {
if (logger.debug.enabled()) {
asn1::json_writer js{};
cfg.srb1_cfg.to_json(js);
logger.debug("SRB1 explicit configuration: %s", js.to_string().c_str());
}
} else {
logger.debug("SRB1 default configuration");
}
if (cfg.srb2_cfg.type() == srb_to_add_mod_s::rlc_cfg_c_::types::explicit_value) {
if (logger.debug.enabled()) {
asn1::json_writer js{};
cfg.srb2_cfg.to_json(js);
logger.debug("SRB2 configuration: %s", js.to_string().c_str());
}
} else {
logger.debug("SRB2 default configuration");
if (logger.debug.enabled()) {
asn1::json_writer js{};
cfg.srb1_cfg.rlc_cfg.to_json(js);
logger.debug("SRB1 configuration: %s", js.to_string().c_str());
js = {};
cfg.srb2_cfg.rlc_cfg.to_json(js);
logger.debug("SRB2 configuration: %s", js.to_string().c_str());
}
return SRSRAN_SUCCESS;
}

@ -1412,19 +1412,27 @@ void rrc::ue::apply_pdcp_drb_updates(const rr_cfg_ded_s& pending_rr_cfg)
void rrc::ue::apply_rlc_rb_updates(const rr_cfg_ded_s& pending_rr_cfg)
{
for (const srb_to_add_mod_s& srb : pending_rr_cfg.srb_to_add_mod_list) {
srsran_assert(srb.srb_id == 1 || srb.srb_id == 2, "Trying to configure invalid SRB Id.");
srb_cfg_t* srb_cfg;
if (srb.srb_id == 1) {
if (parent->cfg.srb1_cfg.type() == srb_to_add_mod_s::rlc_cfg_c_::types_opts::explicit_value) {
parent->rlc->add_bearer(rnti, srb.srb_id, srsran::make_rlc_config_t(parent->cfg.srb1_cfg.explicit_value()));
} else {
parent->rlc->add_bearer(rnti, srb.srb_id, srsran::rlc_config_t::srb_config(srb.srb_id));
}
srb_cfg = &parent->cfg.srb1_cfg;
} else if (srb.srb_id == 2) {
if (parent->cfg.srb2_cfg.type() == srb_to_add_mod_s::rlc_cfg_c_::types_opts::explicit_value) {
parent->rlc->add_bearer(rnti, srb.srb_id, srsran::make_rlc_config_t(parent->cfg.srb2_cfg.explicit_value()));
} else {
parent->rlc->add_bearer(rnti, srb.srb_id, srsran::rlc_config_t::srb_config(srb.srb_id));
srb_cfg = &parent->cfg.srb2_cfg;
} else {
srsran_terminate("Invalid LTE SRB id=%d", srb.srb_id);
}
if (srb_cfg->rlc_cfg.type() == srb_to_add_mod_s::rlc_cfg_c_::types_opts::explicit_value) {
srsran::rlc_config_t rlc_cfg = srsran::make_rlc_config_t(srb_cfg->rlc_cfg.explicit_value());
if (rlc_cfg.rlc_mode == srsran::rlc_mode_t::am and srb_cfg->enb_dl_max_retx_thres > 0) {
rlc_cfg.am.max_retx_thresh = srb_cfg->enb_dl_max_retx_thres;
}
parent->rlc->add_bearer(rnti, srb.srb_id, rlc_cfg);
} else {
srsran::rlc_config_t rlc_cfg = srsran::rlc_config_t::srb_config(srb.srb_id);
if (rlc_cfg.rlc_mode == srsran::rlc_mode_t::am and srb_cfg->enb_dl_max_retx_thres > 0) {
rlc_cfg.am.max_retx_thresh = srb_cfg->enb_dl_max_retx_thres;
}
parent->rlc->add_bearer(rnti, srb.srb_id, rlc_cfg);
}
}
@ -1437,7 +1445,13 @@ void rrc::ue::apply_rlc_rb_updates(const rr_cfg_ded_s& pending_rr_cfg)
if (not drb.rlc_cfg_present) {
parent->logger.warning("Default RLC DRB config not supported");
}
parent->rlc->add_bearer(rnti, drb.lc_ch_id, srsran::make_rlc_config_t(drb.rlc_cfg));
srsran::rlc_config_t rlc_cfg = srsran::make_rlc_config_t(drb.rlc_cfg);
const bearer_cfg_handler::erab_t& erab = bearer_list.get_erabs().at(drb.eps_bearer_id);
if (rlc_cfg.rlc_mode == srsran::rlc_mode_t::am and
parent->cfg.qci_cfg.at(erab.qos_params.qci).enb_dl_max_retx_thres > 0) {
rlc_cfg.am.max_retx_thresh = parent->cfg.qci_cfg.at(erab.qos_params.qci).enb_dl_max_retx_thres;
}
parent->rlc->add_bearer(rnti, drb.lc_ch_id, rlc_cfg);
}
}

@ -54,11 +54,11 @@ void fill_srbs_reconf(srb_to_add_mod_list_l& srbs, const srb_to_add_mod_list_l&
{
// NOTE: In case of Handover, the Reconf includes SRB1
if (srsran::find_rrc_obj_id(current_srbs, 1) == current_srbs.end()) {
add_srb(srbs, 1, enb_cfg.srb1_cfg);
add_srb(srbs, 1, enb_cfg.srb1_cfg.rlc_cfg);
}
if (srsran::find_rrc_obj_id(current_srbs, 2) == current_srbs.end()) {
add_srb(srbs, 2, enb_cfg.srb2_cfg);
add_srb(srbs, 2, enb_cfg.srb2_cfg.rlc_cfg);
}
}
@ -299,7 +299,7 @@ void fill_rr_cfg_ded_setup(asn1::rrc::rr_cfg_ded_s& rr_cfg,
// (Re)establish SRB1
rr_cfg.srb_to_add_mod_list_present = true;
add_srb(rr_cfg.srb_to_add_mod_list, 1, enb_cfg.srb1_cfg);
add_srb(rr_cfg.srb_to_add_mod_list, 1, enb_cfg.srb1_cfg.rlc_cfg);
// Setup SR/CQI configs
rr_cfg.phys_cfg_ded_present = true;

Loading…
Cancel
Save