From 7ffc236a1adf8ccb112bffb997e7f105ca067a39 Mon Sep 17 00:00:00 2001 From: Francisco Paisana Date: Mon, 14 Dec 2020 10:55:18 +0000 Subject: [PATCH] enable log line when rlc tx pdu last segment is sent but the latency log is disabled --- lib/include/srslte/upper/rlc_am_lte.h | 1 - lib/include/srslte/upper/rlc_um_lte.h | 1 - lib/src/upper/rlc_am_lte.cc | 5 ++++- lib/src/upper/rlc_um_lte.cc | 5 ++++- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/lib/include/srslte/upper/rlc_am_lte.h b/lib/include/srslte/upper/rlc_am_lte.h index b89036f15..f2d3774ab 100644 --- a/lib/include/srslte/upper/rlc_am_lte.h +++ b/lib/include/srslte/upper/rlc_am_lte.h @@ -185,7 +185,6 @@ private: pthread_mutex_t mutex; // Metrics - uint64_t tx_byte_count = 0; #ifdef ENABLE_TIMESTAMP srslte::rolling_average mean_pdu_latency_us; #endif diff --git a/lib/include/srslte/upper/rlc_um_lte.h b/lib/include/srslte/upper/rlc_um_lte.h index f5f08da9d..205bda235 100644 --- a/lib/include/srslte/upper/rlc_um_lte.h +++ b/lib/include/srslte/upper/rlc_um_lte.h @@ -65,7 +65,6 @@ private: uint32_t vt_us = 0; // Send state. SN to be assigned for next PDU. // Metrics - uint64_t tx_byte_count = 0; #ifdef ENABLE_TIMESTAMP srslte::rolling_average mean_pdu_latency_us; #endif diff --git a/lib/src/upper/rlc_am_lte.cc b/lib/src/upper/rlc_am_lte.cc index 529047c88..1270288ed 100644 --- a/lib/src/upper/rlc_am_lte.cc +++ b/lib/src/upper/rlc_am_lte.cc @@ -844,6 +844,8 @@ int rlc_am_lte::rlc_am_lte_tx::build_data_pdu(uint8_t* payload, uint32_t nof_byt RB_NAME, latency_us, (long)mean_pdu_latency_us.value()); +#else + log->debug("%s Complete SDU scheduled for tx.\n", rb_name.c_str()); #endif tx_sdu.reset(); } @@ -890,6 +892,8 @@ int rlc_am_lte::rlc_am_lte_tx::build_data_pdu(uint8_t* payload, uint32_t nof_byt RB_NAME, latency_us, (long)mean_pdu_latency_us.value()); +#else + log->debug("%s Complete SDU scheduled for tx.\n", rb_name.c_str()); #endif tx_sdu.reset(); } @@ -951,7 +955,6 @@ int rlc_am_lte::rlc_am_lte_tx::build_data_pdu(uint8_t* payload, uint32_t nof_byt log->debug("%s\n", rlc_amd_pdu_header_to_string(header).c_str()); debug_state(); - tx_byte_count += buffer_ptr->N_bytes; return total_len; } diff --git a/lib/src/upper/rlc_um_lte.cc b/lib/src/upper/rlc_um_lte.cc index c74aad2fc..e3c77054d 100644 --- a/lib/src/upper/rlc_um_lte.cc +++ b/lib/src/upper/rlc_um_lte.cc @@ -152,6 +152,8 @@ int rlc_um_lte::rlc_um_lte_tx::build_data_pdu(unique_byte_buffer_t pdu, uint8_t* rb_name.c_str(), latency_us, (long)mean_pdu_latency_us.value()); +#else + log->debug("%s Complete SDU scheduled for tx.\n", rb_name.c_str()); #endif tx_sdu.reset(); } @@ -189,6 +191,8 @@ int rlc_um_lte::rlc_um_lte_tx::build_data_pdu(unique_byte_buffer_t pdu, uint8_t* rb_name.c_str(), latency_us, (long)mean_pdu_latency_us.value()); +#else + log->debug("%s Complete SDU scheduled for tx.\n", rb_name.c_str()); #endif tx_sdu.reset(); } @@ -210,7 +214,6 @@ int rlc_um_lte::rlc_um_lte_tx::build_data_pdu(unique_byte_buffer_t pdu, uint8_t* log->info_hex(payload, pdu->N_bytes, "%s Tx PDU SN=%d (%d B)\n", rb_name.c_str(), header.sn, pdu->N_bytes); debug_state(); - tx_byte_count += pdu->N_bytes; return pdu->N_bytes; }