Change in osmo-trx[master]: lms: Fix stream_stats checks with droppedPackets

Harald Welte gerrit-no-reply at lists.osmocom.org
Sun May 26 09:11:31 UTC 2019


Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14166 )

Change subject: lms: Fix stream_stats checks with droppedPackets
......................................................................

lms: Fix stream_stats checks with droppedPackets

Existing code had a typo (value was assigned from wrong variable).
Furthermore, it was experimentally found that:
while underrun/overrun are documented as "FIFO overrun
count" in LimeSuite.h, it seems droppedPackets ("Number of dropped
packets by HW") is not actually an incrementing counter like the others,
but simply a value set every time LMS_RecvStream() is called. Since we
are actually interested in keeping the count over time, adjust code to
achieve that.

Change-Id: Id93d33400e11360b9536f56a31904328549cfbbf
---
M Transceiver52M/device/lms/LMSDevice.cpp
1 file changed, 5 insertions(+), 3 deletions(-)

Approvals:
  Jenkins Builder: Verified
  Vadim Yanitskiy: Looks good to me, but someone else must approve
  Harald Welte: Looks good to me, approved



diff --git a/Transceiver52M/device/lms/LMSDevice.cpp b/Transceiver52M/device/lms/LMSDevice.cpp
index c320540..a1ca983 100644
--- a/Transceiver52M/device/lms/LMSDevice.cpp
+++ b/Transceiver52M/device/lms/LMSDevice.cpp
@@ -597,12 +597,14 @@
 		}
 		m_last_rx_overruns[chan] = status.overrun;
 
-		if (status.droppedPackets > m_last_rx_dropped[chan]) {
+		if (status.droppedPackets) {
 			LOGCHAN(chan, DDEV, ERROR) << "recv Dropped packets by HW! ("
 						   << m_last_rx_dropped[chan] << " -> "
-						   << status.droppedPackets << ")";
+						   << m_last_rx_dropped[chan] +
+						      status.droppedPackets
+						   << ")";
 		}
-		m_last_rx_dropped[chan] = m_last_rx_overruns[chan];
+		m_last_rx_dropped[chan] += status.droppedPackets;
 	}
 }
 

-- 
To view, visit https://gerrit.osmocom.org/14166
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: Id93d33400e11360b9536f56a31904328549cfbbf
Gerrit-Change-Number: 14166
Gerrit-PatchSet: 1
Gerrit-Owner: Pau Espin Pedrol <pespin at sysmocom.de>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder (1000002)
Gerrit-Reviewer: Vadim Yanitskiy <axilirator at gmail.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190526/6a3caa41/attachment.html>


More information about the gerrit-log mailing list