Change in ...osmo-trx[master]: lms: Fix stream_stats checks with overrun/underrun

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

pespin gerrit-no-reply at lists.osmocom.org
Tue Jun 4 14:44:22 UTC 2019


pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-trx/+/14368


Change subject: lms: Fix stream_stats checks with overrun/underrun
......................................................................

lms: Fix stream_stats checks with overrun/underrun

It was initially thought that underruns/overrun fields were
increasing-over-time values.
However, after reading LimeSuite code, it seems overrun and
underrun fields are actually reset upon every call to
LMS_GetStreamStatus().

Related: osmo-trx.git 928177125654c1e596ec3450a68882c031ebb929
Related: https://github.com/myriadrf/LimeSuite/issues/265
Change-Id: I677232a7b12ee83d26aa34d92f76a91d4b5a63a6
---
M Transceiver52M/device/lms/LMSDevice.cpp
1 file changed, 4 insertions(+), 4 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-trx refs/changes/68/14368/1

diff --git a/Transceiver52M/device/lms/LMSDevice.cpp b/Transceiver52M/device/lms/LMSDevice.cpp
index 7d3ce81..0253d4c 100644
--- a/Transceiver52M/device/lms/LMSDevice.cpp
+++ b/Transceiver52M/device/lms/LMSDevice.cpp
@@ -583,23 +583,23 @@
 		return;
 	}
 
-	if (status.underrun > m_ctr[chan].rx_underruns) {
+	if (status.underrun) {
 		changed = true;
 		*underrun = true;
 		LOGCHAN(chan, DDEV, ERROR) << "recv Underrun! ("
 					   << m_ctr[chan].rx_underruns << " -> "
 					   << status.underrun << ")";
 	}
-	m_ctr[chan].rx_underruns = status.underrun;
+	m_ctr[chan].rx_underruns += status.underrun;
 
-	if (status.overrun > m_ctr[chan].rx_overruns) {
+	if (status.overrun) {
 		changed = true;
 		*overrun = true;
 		LOGCHAN(chan, DDEV, ERROR) << "recv Overrun! ("
 					   << m_ctr[chan].rx_overruns << " -> "
 					   << status.overrun << ")";
 	}
-	m_ctr[chan].rx_overruns = status.overrun;
+	m_ctr[chan].rx_overruns += status.overrun;
 
 	if (status.droppedPackets) {
 		changed = true;

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-trx/+/14368
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-Change-Id: I677232a7b12ee83d26aa34d92f76a91d4b5a63a6
Gerrit-Change-Number: 14368
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin at sysmocom.de>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190604/d4e74dc4/attachment.htm>


More information about the gerrit-log mailing list