From 2960e559515348dce83bfdbdd6ef39e551235045 Mon Sep 17 00:00:00 2001 From: Sugandha Gupta Date: Fri, 25 Jan 2019 17:36:26 -0800 Subject: 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. --- host/lib/rfnoc/source_block_ctrl_base.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'host/lib/rfnoc/source_block_ctrl_base.cpp') diff --git a/host/lib/rfnoc/source_block_ctrl_base.cpp b/host/lib/rfnoc/source_block_ctrl_base.cpp index 656ab26af..d06b6632d 100644 --- a/host/lib/rfnoc/source_block_ctrl_base.cpp +++ b/host/lib/rfnoc/source_block_ctrl_base.cpp @@ -143,6 +143,16 @@ void source_block_ctrl_base::configure_flow_control_out(const bool enable_fc_out sr_write(SR_FLOW_CTRL_EN, config, block_port); } +size_t source_block_ctrl_base::get_mtu(size_t block_port) const +{ + if (_tree->exists(_root_path / "mtu" / std::to_string(block_port))) { + return _tree->access(_root_path / "mtu" / std::to_string(block_port)) + .get(); + } + return 0; +} + + /*********************************************************************** * Hooks **********************************************************************/ -- cgit v1.2.3