Reduce log level of SDUs dropped in the stack to info. Added ul_dropped_sdus to stack metrics.

This commit is contained in:
Pedro Alvarez 2021-02-05 15:29:42 +00:00
parent 30216fe1fc
commit bb0e31feda
3 changed files with 7 additions and 1 deletions

View File

@ -195,6 +195,9 @@ private:
#endif
srsue::nas nas;
std::unique_ptr<usim_base> usim;
// Metrics helper
uint32_t ul_dropped_sdus = 0;
};
} // namespace srsue

View File

@ -27,6 +27,7 @@
namespace srsue {
typedef struct {
uint32_t ul_dropped_sdus;
mac_metrics_t mac[SRSLTE_MAX_CARRIERS];
srslte::rlc_metrics_t rlc;
nas_metrics_t nas;

View File

@ -240,6 +240,7 @@ bool ue_stack_lte::get_metrics(stack_metrics_t* metrics)
// use stack thread to query metrics
ue_task_queue.try_push([this]() {
stack_metrics_t metrics{};
metrics.ul_dropped_sdus = ul_dropped_sdus;
mac.get_metrics(metrics.mac);
rlc.get_metrics(metrics.rlc, metrics.mac[0].nof_tti);
nas.get_metrics(&metrics.nas);
@ -277,7 +278,8 @@ void ue_stack_lte::write_sdu(uint32_t lcid, srslte::unique_byte_buffer_t sdu)
auto task = [this, lcid](srslte::unique_byte_buffer_t& sdu) { pdcp.write_sdu(lcid, std::move(sdu)); };
bool ret = gw_queue_id.try_push(std::bind(task, std::move(sdu))).first;
if (not ret) {
pdcp_logger.warning("GW SDU with lcid=%d was discarded.", lcid);
pdcp_logger.info("GW SDU with lcid=%d was discarded.", lcid);
ul_dropped_sdus++;
}
}