rlc_um: fix reestablishment for sending UM entity

we've reset the rx state variables during reestablishment but not
the tx state variable.
master
Andre Puschmann 5 years ago
parent 218fa5cf55
commit ff96336f91

@ -105,6 +105,7 @@ protected:
// helper functions // helper functions
virtual void debug_state() = 0; virtual void debug_state() = 0;
virtual void reset() = 0;
}; };
// Receiver sub-class base // Receiver sub-class base

@ -63,6 +63,8 @@ private:
uint32_t get_buffer_state(); uint32_t get_buffer_state();
private: private:
void reset();
/**************************************************************************** /****************************************************************************
* State variables and counters * State variables and counters
* Ref: 3GPP TS 36.322 v10.0.0 Section 7 * Ref: 3GPP TS 36.322 v10.0.0 Section 7

@ -63,6 +63,8 @@ private:
uint32_t get_buffer_state(); uint32_t get_buffer_state();
private: private:
void reset();
uint32_t TX_Next = 0; // send state as defined in TS 38.322 v15.3 Section 7 uint32_t TX_Next = 0; // send state as defined in TS 38.322 v15.3 Section 7
// It holds the value of the SN to be assigned for the next newly generated UMD PDU with // It holds the value of the SN to be assigned for the next newly generated UMD PDU with
// segment. It is initially set to 0, and is updated after the UM RLC entity submits a UMD PDU // segment. It is initially set to 0, and is updated after the UM RLC entity submits a UMD PDU

@ -215,6 +215,7 @@ rlc_um_base::rlc_um_base_tx::~rlc_um_base_tx() {}
void rlc_um_base::rlc_um_base_tx::stop() void rlc_um_base::rlc_um_base_tx::stop()
{ {
empty_queue(); empty_queue();
reset();
} }
void rlc_um_base::rlc_um_base_tx::reestablish() void rlc_um_base::rlc_um_base_tx::reestablish()

@ -219,6 +219,11 @@ void rlc_um_lte::rlc_um_lte_tx::debug_state()
log->debug("%s vt_us = %d\n", rb_name.c_str(), vt_us); log->debug("%s vt_us = %d\n", rb_name.c_str(), vt_us);
} }
void rlc_um_lte::rlc_um_lte_tx::reset()
{
vt_us = 0;
}
/**************************************************************************** /****************************************************************************
* Rx subclass implementation * Rx subclass implementation
***************************************************************************/ ***************************************************************************/

@ -205,7 +205,13 @@ int rlc_um_nr::rlc_um_nr_tx::build_data_pdu(unique_byte_buffer_t pdu, uint8_t* p
void rlc_um_nr::rlc_um_nr_tx::debug_state() void rlc_um_nr::rlc_um_nr_tx::debug_state()
{ {
log->debug("%s TX_Next = %d\n", rb_name.c_str(), TX_Next); log->debug("%s TX_Next=%d, next_so=%d\n", rb_name.c_str(), TX_Next, next_so);
}
void rlc_um_nr::rlc_um_nr_tx::reset()
{
TX_Next = 0;
next_so = 0;
} }
/**************************************************************************** /****************************************************************************

Loading…
Cancel
Save