rlc_am_lte: remove unused rx/tx metrics members

those variables aren't used and are included in the bearer metrics already
master
Andre Puschmann 4 years ago
parent 3c169e6be1
commit cff9f03a11

@ -106,8 +106,6 @@ private:
bool has_data();
uint32_t get_buffer_state();
uint32_t get_num_tx_bytes();
void reset_metrics();
// Timeout callback interface
void timer_expired(uint32_t timeout_id);
@ -184,9 +182,6 @@ private:
// Mutexes
pthread_mutex_t mutex;
// Metrics
uint32_t num_tx_bytes = 0;
};
// Receiver sub-class
@ -203,7 +198,6 @@ private:
void write_pdu(uint8_t* payload, uint32_t nof_bytes);
uint32_t get_num_rx_bytes();
void reset_metrics();
// Timeout callback interface
void timer_expired(uint32_t timeout_id);
@ -255,9 +249,6 @@ private:
std::map<uint32_t, rlc_amd_rx_pdu_t> rx_window;
std::map<uint32_t, rlc_amd_rx_pdu_segments_t> rx_segments;
// Metrics
uint32_t num_rx_bytes = 0;
bool poll_received = false;
bool do_status = false;

@ -18,11 +18,10 @@ int handler_registered = 0;
void get_time_interval(struct timeval* tdata)
{
tdata[0].tv_sec = tdata[2].tv_sec - tdata[1].tv_sec;
tdata[0].tv_usec = tdata[2].tv_usec - tdata[1].tv_usec;
if (tdata[0].tv_usec < 0) {
tdata[0].tv_sec--;
tdata[0].tv_usec += 1000000;
}
}
}

@ -104,8 +104,7 @@ rlc_bearer_metrics_t rlc_am_lte::get_metrics()
void rlc_am_lte::reset_metrics()
{
tx.reset_metrics();
rx.reset_metrics();
metrics = {};
}
/****************************************************************************
@ -424,7 +423,6 @@ int rlc_am_lte::rlc_am_lte_tx::read_pdu(uint8_t* payload, uint32_t nof_bytes)
pdu_size = build_data_pdu(payload, nof_bytes);
unlock_and_exit:
num_tx_bytes += pdu_size;
pthread_mutex_unlock(&mutex);
return pdu_size;
}
@ -464,18 +462,6 @@ void rlc_am_lte::rlc_am_lte_tx::retransmit_random_pdu()
}
}
uint32_t rlc_am_lte::rlc_am_lte_tx::get_num_tx_bytes()
{
return num_tx_bytes;
}
void rlc_am_lte::rlc_am_lte_tx::reset_metrics()
{
pthread_mutex_lock(&mutex);
num_tx_bytes = 0;
pthread_mutex_unlock(&mutex);
}
/****************************************************************************
* Helper functions
***************************************************************************/
@ -1577,25 +1563,12 @@ bool rlc_am_lte::rlc_am_lte_rx::get_do_status()
return do_status;
}
uint32_t rlc_am_lte::rlc_am_lte_rx::get_num_rx_bytes()
{
return num_rx_bytes;
}
void rlc_am_lte::rlc_am_lte_rx::reset_metrics()
{
pthread_mutex_lock(&mutex);
num_rx_bytes = 0;
pthread_mutex_unlock(&mutex);
}
void rlc_am_lte::rlc_am_lte_rx::write_pdu(uint8_t* payload, const uint32_t nof_bytes)
{
if (nof_bytes < 1)
return;
pthread_mutex_lock(&mutex);
num_rx_bytes += nof_bytes;
if (rlc_am_is_control_pdu(payload)) {
// unlock mutex and pass to Tx subclass

Loading…
Cancel
Save