diff options
author | Harald Welte <laforge@osmocom.org> | 2024-03-17 09:42:52 +0100 |
---|---|---|
committer | Harald Welte <laforge@osmocom.org> | 2024-03-18 10:09:47 +0100 |
commit | aec0422c8f3693721935a600fbd808bb2bd1216c (patch) | |
tree | 06bff28bc0e21677c9a7b2da074c87987cf202b5 /src/common/lchan.c | |
parent | 3c133dc3863415ca86c3e453e664667aea44cf13 (diff) |
common: Add RTP related rate counters
Let's add some rate counters to add visibility to the BTS on what is
happening in terms of received and/or transmitted RTP packets.
This should help during debugging any RTP related issues.
Change-Id: Ide674bde10b0e4b501d6a48947b983090342dfec
Diffstat (limited to 'src/common/lchan.c')
-rw-r--r-- | src/common/lchan.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/common/lchan.c b/src/common/lchan.c index f4ed5033..5b41a158 100644 --- a/src/common/lchan.c +++ b/src/common/lchan.c @@ -652,9 +652,11 @@ void lchan_rtp_socket_free(struct gsm_lchan *lchan) /*! limit number of queue entries to %u; drops any surplus messages */ void lchan_dl_tch_queue_enqueue(struct gsm_lchan *lchan, struct msgb *msg, unsigned int limit) { - if (lchan->dl_tch_queue_len > limit) - LOGPLCHAN(lchan, DL1P, LOGL_NOTICE, "freeing %d queued frames\n", - lchan->dl_tch_queue_len - limit); + if (lchan->dl_tch_queue_len > limit) { + unsigned int excess = lchan->dl_tch_queue_len - limit; + LOGPLCHAN(lchan, DL1P, LOGL_NOTICE, "freeing %d queued frames\n", excess); + rate_ctr_add2(lchan->ts->trx->bts->ctrs, BTS_CTR_RTP_RX_DROP_OVERFLOW, excess); + } while (lchan->dl_tch_queue_len > limit) { struct msgb *tmp = msgb_dequeue_count(&lchan->dl_tch_queue, &lchan->dl_tch_queue_len); msgb_free(tmp); |