Change in osmo-trx[master]: lms: Catch and log dropped packets by HW during recv

Pau Espin Pedrol gerrit-no-reply at lists.osmocom.org
Thu Apr 25 21:27:46 UTC 2019


Pau Espin Pedrol has uploaded this change for review. ( https://gerrit.osmocom.org/13789


Change subject: lms: Catch and log dropped packets by HW during recv
......................................................................

lms: Catch and log dropped packets by HW during recv

Change-Id: I23554d95b0aff585024610fc12920c9da4f3ba9e
---
M Transceiver52M/device/lms/LMSDevice.cpp
M Transceiver52M/device/lms/LMSDevice.h
2 files changed, 9 insertions(+), 0 deletions(-)



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

diff --git a/Transceiver52M/device/lms/LMSDevice.cpp b/Transceiver52M/device/lms/LMSDevice.cpp
index e65c93d..7071589 100644
--- a/Transceiver52M/device/lms/LMSDevice.cpp
+++ b/Transceiver52M/device/lms/LMSDevice.cpp
@@ -54,6 +54,7 @@
 
 	m_last_rx_underruns.resize(chans, 0);
 	m_last_rx_overruns.resize(chans, 0);
+	m_last_rx_dropped.resize(chans, 0);
 	m_last_tx_underruns.resize(chans, 0);
 }
 
@@ -587,6 +588,13 @@
 					  << status.overrun << ")";
 		}
 		m_last_rx_overruns[chan] = status.overrun;
+
+		if (status.droppedPackets > m_last_rx_dropped[chan]) {
+			LOGC(DDEV, ERROR) << "chan " << chan << ": recv Dropped packets by HW! ("
+					  << m_last_rx_dropped[chan] << " -> "
+					  << status.droppedPackets << ")";
+		}
+		m_last_rx_dropped[chan] = m_last_rx_overruns[chan];
 	}
 }
 
diff --git a/Transceiver52M/device/lms/LMSDevice.h b/Transceiver52M/device/lms/LMSDevice.h
index 4bf2b32..225839d 100644
--- a/Transceiver52M/device/lms/LMSDevice.h
+++ b/Transceiver52M/device/lms/LMSDevice.h
@@ -50,6 +50,7 @@
 
 	std::vector<uint32_t> m_last_rx_underruns;
 	std::vector<uint32_t> m_last_rx_overruns;
+	std::vector<uint32_t> m_last_rx_dropped;
 	std::vector<uint32_t> m_last_tx_underruns;
 
 	double actualSampleRate;	///< the actual USRP sampling rate

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

Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I23554d95b0aff585024610fc12920c9da4f3ba9e
Gerrit-Change-Number: 13789
Gerrit-PatchSet: 1
Gerrit-Owner: Pau Espin Pedrol <pespin at sysmocom.de>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190425/5579d3f3/attachment.html>


More information about the gerrit-log mailing list