aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/usrp/x300
diff options
context:
space:
mode:
authorSugandha Gupta <sugandha.gupta@ettus.com>2019-01-25 17:36:26 -0800
committerBrent Stapleton <brent.stapleton@ettus.com>2019-05-01 15:17:23 -0700
commitfe3fa1dd31b6da9c90cf181d64d6829313804cdd (patch)
tree2e81322cfe66e3e5cc1cb0ec58b29c7d3199e609 /host/lib/usrp/x300
parent178b35569b1a25180a80a23b945b10b04c9f10f5 (diff)
downloaduhd-fe3fa1dd31b6da9c90cf181d64d6829313804cdd.tar.gz
uhd-fe3fa1dd31b6da9c90cf181d64d6829313804cdd.tar.bz2
uhd-fe3fa1dd31b6da9c90cf181d64d6829313804cdd.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/x300')
-rw-r--r--host/lib/usrp/x300/x300_impl.cpp7
-rw-r--r--host/lib/usrp/x300/x300_impl.hpp3
2 files changed, 9 insertions, 1 deletions
diff --git a/host/lib/usrp/x300/x300_impl.cpp b/host/lib/usrp/x300/x300_impl.cpp
index 796d422ad..b9b4a06f9 100644
--- a/host/lib/usrp/x300/x300_impl.cpp
+++ b/host/lib/usrp/x300/x300_impl.cpp
@@ -1526,7 +1526,7 @@ uhd::both_xports_t x300_impl::make_transport(const uhd::sid_t& address,
// Increasing number of recv frames here because ctrl_iface uses it
// to determine how many control packets can be in flight before it
// must wait for an ACK
- default_buff_args.num_recv_frames =
+ default_buff_args.num_recv_frames =
uhd::rfnoc::CMD_FIFO_SIZE / uhd::rfnoc::MAX_CMD_PKT_SIZE;
} else if (xport_type == TX_DATA) {
size_t default_frame_size = conn.link_rate == x300::MAX_RATE_1GIGE
@@ -1993,6 +1993,11 @@ x300_impl::frame_size_t x300_impl::determine_max_frame_size(
return frame_size;
}
+size_t x300_impl::get_mtu(const size_t /*mb_index*/, const uhd::direction_t dir) {
+ return (dir == RX_DIRECTION) ? _max_frame_sizes.recv_frame_size :
+ _max_frame_sizes.send_frame_size;
+}
+
/***********************************************************************
* compat checks
**********************************************************************/
diff --git a/host/lib/usrp/x300/x300_impl.hpp b/host/lib/usrp/x300/x300_impl.hpp
index c101b3032..8d50f9914 100644
--- a/host/lib/usrp/x300/x300_impl.hpp
+++ b/host/lib/usrp/x300/x300_impl.hpp
@@ -173,6 +173,9 @@ private:
const xport_type_t xport_type,
const uhd::device_addr_t& args);
+ //! get mtu
+ size_t get_mtu(const size_t, const uhd::direction_t);
+
struct frame_size_t
{
size_t recv_frame_size;