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

master
Pedro Alvarez 4 years ago
parent 30216fe1fc
commit bb0e31feda

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

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

@ -240,6 +240,7 @@ bool ue_stack_lte::get_metrics(stack_metrics_t* metrics)
// use stack thread to query metrics // use stack thread to query metrics
ue_task_queue.try_push([this]() { ue_task_queue.try_push([this]() {
stack_metrics_t metrics{}; stack_metrics_t metrics{};
metrics.ul_dropped_sdus = ul_dropped_sdus;
mac.get_metrics(metrics.mac); mac.get_metrics(metrics.mac);
rlc.get_metrics(metrics.rlc, metrics.mac[0].nof_tti); rlc.get_metrics(metrics.rlc, metrics.mac[0].nof_tti);
nas.get_metrics(&metrics.nas); 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)); }; 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; bool ret = gw_queue_id.try_push(std::bind(task, std::move(sdu))).first;
if (not ret) { 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++;
} }
} }

Loading…
Cancel
Save