aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/usrp/e300
diff options
context:
space:
mode:
authorSugandha Gupta <sugandha.gupta@ettus.com>2019-01-25 17:36:26 -0800
committermichael-west <michael.west@ettus.com>2019-05-21 17:20:42 -0700
commit2960e559515348dce83bfdbdd6ef39e551235045 (patch)
tree1a603f4c28f23c5bccd298b9be57b92a5991defc /host/lib/usrp/e300
parent41f732a4c8bb9df116a01958f0914708475097df (diff)
downloaduhd-2960e559515348dce83bfdbdd6ef39e551235045.tar.gz
uhd-2960e559515348dce83bfdbdd6ef39e551235045.tar.bz2
uhd-2960e559515348dce83bfdbdd6ef39e551235045.zip
device3: Constraint send/recv_frame_size based on down/upstream MTU
We need to properly contraint the send/recv_frame_size based on the minimum MTU of all the down/upstream blocks. This fixes the issue with E310 tx/rx streaming as it has smaller MTU sizes than the other usrps.
Diffstat (limited to 'host/lib/usrp/e300')
-rw-r--r--host/lib/usrp/e300/e300_impl.cpp5
-rw-r--r--host/lib/usrp/e300/e300_impl.hpp3
2 files changed, 8 insertions, 0 deletions
diff --git a/host/lib/usrp/e300/e300_impl.cpp b/host/lib/usrp/e300/e300_impl.cpp
index 59a8cec88..5a6376039 100644
--- a/host/lib/usrp/e300/e300_impl.cpp
+++ b/host/lib/usrp/e300/e300_impl.cpp
@@ -731,6 +731,11 @@ uhd::both_xports_t e300_impl::make_transport(
return xports;
}
+size_t e300_impl::get_mtu(const size_t /*mb_index*/, const uhd::direction_t dir) {
+ return (dir == RX_DIRECTION) ? _data_xport_params.recv_frame_size :
+ _data_xport_params.send_frame_size;
+}
+
void e300_impl::_update_clock_source(const std::string &source)
{
if (source != "internal") {
diff --git a/host/lib/usrp/e300/e300_impl.hpp b/host/lib/usrp/e300/e300_impl.hpp
index 2e919cf9b..0a6f153eb 100644
--- a/host/lib/usrp/e300/e300_impl.hpp
+++ b/host/lib/usrp/e300/e300_impl.hpp
@@ -166,6 +166,9 @@ private: // methods
return uhd::ENDIANNESS_LITTLE;
};
+ //! get mtu
+ size_t get_mtu(const size_t, const uhd::direction_t);
+
/************************************************************************
* Helpers
***********************************************************************/