rlc_um: fix bearer name in logging after re-configuration

the RLC bearer name was empty after reestablishing a UM bearer.

we need to pass the RLF config and RB name to the internal configure()
call of the Rx entity, like we already do for the Tx side
This commit is contained in:
Andre Puschmann 2020-11-23 14:16:43 +01:00
parent 225bc9d260
commit 6d3af2d2bd
6 changed files with 13 additions and 9 deletions

View File

@ -117,7 +117,7 @@ protected:
public:
rlc_um_base_rx(rlc_um_base* parent_);
virtual ~rlc_um_base_rx();
virtual bool configure() = 0;
virtual bool configure(const rlc_config_t& cnfg_, std::string rb_name_) = 0;
virtual void stop() = 0;
virtual void reestablish() = 0;

View File

@ -83,7 +83,7 @@ private:
~rlc_um_lte_rx();
void stop();
void reestablish();
bool configure();
bool configure(const rlc_config_t& cnfg_, std::string rb_name_);
void handle_data_pdu(uint8_t* payload, uint32_t nof_bytes);
void reassemble_rx_sdus();
bool pdu_belongs_to_rx_sdu();

View File

@ -81,7 +81,7 @@ private:
public:
rlc_um_nr_rx(rlc_um_base* parent_);
bool configure();
bool configure(const rlc_config_t& cnfg_, std::string rb_name_);
void handle_data_pdu(uint8_t* payload, uint32_t nof_bytes);
void reestablish();

View File

@ -147,7 +147,7 @@ void rlc::reestablish()
void rlc::reestablish(uint32_t lcid)
{
if (valid_lcid(lcid)) {
rlc_log->info("Reestablishing LCID %d\n", lcid);
rlc_log->info("Reestablishing %s\n", rrc->get_rb_name(lcid).c_str());
rlc_array.at(lcid)->reestablish();
} else {
rlc_log->warning("RLC LCID %d doesn't exist.\n", lcid);

View File

@ -50,7 +50,7 @@ bool rlc_um_lte::configure(const rlc_config_t& cnfg_)
cfg = cnfg_;
rx.reset(new rlc_um_lte_rx(this));
if (not rx->configure()) {
if (not rx->configure(cfg, rb_name)) {
return false;
}
@ -236,8 +236,10 @@ rlc_um_lte::rlc_um_lte_rx::rlc_um_lte_rx(rlc_um_base* parent_) :
rlc_um_lte::rlc_um_lte_rx::~rlc_um_lte_rx() {}
bool rlc_um_lte::rlc_um_lte_rx::configure()
bool rlc_um_lte::rlc_um_lte_rx::configure(const rlc_config_t& cnfg_, std::string rb_name_)
{
cfg = cnfg_;
if (cfg.um.rx_mod == 0) {
log->error("Error configuring %s RLC UM: rx_mod==0\n", rb_name.c_str());
return false;
@ -254,6 +256,8 @@ bool rlc_um_lte::rlc_um_lte_rx::configure()
reordering_timer.set(static_cast<uint32_t>(cfg.um.t_reordering), [this](uint32_t tid) { timer_expired(tid); });
}
rb_name = rb_name_;
return true;
}
@ -292,7 +296,7 @@ void rlc_um_lte::rlc_um_lte_rx::handle_data_pdu(uint8_t* payload, uint32_t nof_b
{
rlc_umd_pdu_header_t header;
rlc_um_read_data_pdu_header(payload, nof_bytes, cfg.um.rx_sn_field_length, &header);
log->info_hex(payload, nof_bytes, "RX %s Rx data PDU SN=%d (%d B)", rb_name.c_str(), header.sn, nof_bytes);
log->info_hex(payload, nof_bytes, "%s Rx data PDU SN=%d (%d B)", rb_name.c_str(), header.sn, nof_bytes);
if (RX_MOD_BASE(header.sn) >= RX_MOD_BASE(vr_uh - cfg.um.rx_window_size) &&
RX_MOD_BASE(header.sn) < RX_MOD_BASE(vr_ur)) {

View File

@ -48,7 +48,7 @@ bool rlc_um_nr::configure(const rlc_config_t& cnfg_)
cfg = cnfg_;
rx.reset(new rlc_um_nr_rx(this));
if (not rx->configure()) {
if (not rx->configure(cfg, rb_name)) {
return false;
}
@ -223,7 +223,7 @@ rlc_um_nr::rlc_um_nr_rx::rlc_um_nr_rx(rlc_um_base* parent_) :
reassembly_timer(timers->get_unique_timer())
{}
bool rlc_um_nr::rlc_um_nr_rx::configure()
bool rlc_um_nr::rlc_um_nr_rx::configure(const rlc_config_t& cnfg_, std::string rb_name_)
{
if (cfg.um_nr.mod == 0) {
log->error("Error configuring %s RLC UM: rx_mod==0\n", rb_name.c_str());