RLC reestablish to re-enable tx_enabled

This commit is contained in:
Ismael Gomez 2018-07-09 00:26:58 +02:00
parent 30dd539220
commit 3122d8e959
8 changed files with 23 additions and 6 deletions

View File

@ -163,6 +163,7 @@ public:
srslte::mac_interface_timers *mac_timers_) = 0;
virtual void configure(srslte_rlc_config_t cnfg) = 0;
virtual void stop() = 0;
virtual void reestablish() = 0;
virtual void empty_queue() = 0;
virtual rlc_mode_t get_mode() = 0;

View File

@ -49,6 +49,7 @@ public:
mac_interface_timers *mac_timers);
void configure(srslte_rlc_config_t cnfg);
void stop();
void reestablish();
void empty_queue();
rlc_mode_t get_mode();

View File

@ -57,6 +57,7 @@ public:
srsue::rrc_interface_rlc *rrc_,
mac_interface_timers *mac_timers_);
void configure(srslte_rlc_config_t cnfg);
void reestablish();
void stop();
void empty_queue();
bool is_mrb();

View File

@ -130,11 +130,7 @@ void rlc::reestablish() {
// defaul lcid=0 is created
void rlc::reset()
{
for(uint32_t i=0; i<SRSLTE_N_RADIO_BEARERS; i++) {
if(rlc_array[i].active())
rlc_array[i].stop();
}
stop();
rlc_array[0].init(RLC_MODE_TM, rlc_log, default_lcid, pdcp, rrc, mac_timers, buffer_size); // SRB0
}

View File

@ -104,6 +104,12 @@ void rlc_am::empty_queue() {
while(tx_sdu_queue.try_read(&buf)) {
pool->deallocate(buf);
}
tx_sdu_queue.reset();
}
void rlc_am::reestablish() {
stop();
tx_enabled = true;
}
void rlc_am::stop()

View File

@ -87,7 +87,7 @@ void rlc_entity::configure(srslte_rlc_config_t cnfg)
// Reestablishment stops the entity but does not destroy it. Mode will not change
void rlc_entity::reestablish() {
rlc->stop();
rlc->reestablish();
}
// A call to stop() stops the entity and clears deletes the instance. Next time this entity can be used for other mode.

View File

@ -68,6 +68,12 @@ void rlc_tm::empty_queue()
while(ul_queue.try_read(&buf)) {
pool->deallocate(buf);
}
ul_queue.reset();
}
void rlc_tm::reestablish() {
stop();
tx_enabled = true;
}
void rlc_tm::stop()

View File

@ -122,6 +122,7 @@ void rlc_um::empty_queue() {
while(tx_sdu_queue.try_read(&buf)) {
pool->deallocate(buf);
}
tx_sdu_queue.reset();
}
bool rlc_um::is_mrb()
@ -129,6 +130,11 @@ bool rlc_um::is_mrb()
return cfg.is_mrb;
}
void rlc_um::reestablish() {
stop();
tx_enabled = true;
}
void rlc_um::stop()
{
// Empty tx_sdu_queue before locking the mutex