diff options
author | Pau Espin Pedrol <pespin@sysmocom.de> | 2019-04-25 20:11:46 +0200 |
---|---|---|
committer | Pau Espin Pedrol <pespin@sysmocom.de> | 2019-04-25 20:16:10 +0200 |
commit | 2876785f5069a3b1d5c39f0a8af59fb497e5267a (patch) | |
tree | fdb30c5474acf01127db7e2de55be32ef93ea47d | |
parent | 713b4d81cda884a927b2a1941ed2e1101ebafd1b (diff) |
lms: Catch and log dropped packets by HW during recv
Change-Id: I23554d95b0aff585024610fc12920c9da4f3ba9e
-rw-r--r-- | Transceiver52M/device/lms/LMSDevice.cpp | 8 | ||||
-rw-r--r-- | Transceiver52M/device/lms/LMSDevice.h | 1 |
2 files changed, 9 insertions, 0 deletions
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 @@ LMSDevice::LMSDevice(size_t tx_sps, size_t rx_sps, InterfaceType iface, size_t c 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 @@ void LMSDevice::update_stream_stats(size_t chan, bool * underrun, bool * overrun << 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 @@ private: 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 |