diff --git a/srsue/hdr/stack/ue_stack_lte.h b/srsue/hdr/stack/ue_stack_lte.h index 64a6f2f63..2f5c331df 100644 --- a/srsue/hdr/stack/ue_stack_lte.h +++ b/srsue/hdr/stack/ue_stack_lte.h @@ -195,6 +195,9 @@ private: #endif srsue::nas nas; std::unique_ptr usim; + + // Metrics helper + uint32_t ul_dropped_sdus = 0; }; } // namespace srsue diff --git a/srsue/hdr/ue_metrics_interface.h b/srsue/hdr/ue_metrics_interface.h index 837f925af..e28af6f05 100644 --- a/srsue/hdr/ue_metrics_interface.h +++ b/srsue/hdr/ue_metrics_interface.h @@ -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; diff --git a/srsue/src/stack/ue_stack_lte.cc b/srsue/src/stack/ue_stack_lte.cc index 2e364e048..1f44f42f0 100644 --- a/srsue/src/stack/ue_stack_lte.cc +++ b/srsue/src/stack/ue_stack_lte.cc @@ -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++; } }