diff options
author | Sugandha Gupta <sugandha.gupta@ettus.com> | 2019-01-25 17:36:26 -0800 |
---|---|---|
committer | Brent Stapleton <brent.stapleton@ettus.com> | 2019-05-01 15:17:23 -0700 |
commit | fe3fa1dd31b6da9c90cf181d64d6829313804cdd (patch) | |
tree | 2e81322cfe66e3e5cc1cb0ec58b29c7d3199e609 /host/lib/rfnoc/block_ctrl_base.cpp | |
parent | 178b35569b1a25180a80a23b945b10b04c9f10f5 (diff) | |
download | uhd-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/rfnoc/block_ctrl_base.cpp')
-rw-r--r-- | host/lib/rfnoc/block_ctrl_base.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/host/lib/rfnoc/block_ctrl_base.cpp b/host/lib/rfnoc/block_ctrl_base.cpp index ed8068b5b..e70267b96 100644 --- a/host/lib/rfnoc/block_ctrl_base.cpp +++ b/host/lib/rfnoc/block_ctrl_base.cpp @@ -94,12 +94,16 @@ block_ctrl_base::block_ctrl_base(const make_args_t& make_args) // Set source addresses: sr_write(SR_BLOCK_SID, get_address(ctrl_port), ctrl_port); // Set sink buffer sizes: - settingsbus_reg_t reg = SR_READBACK_REG_FIFOSIZE; - size_t buf_size_bytes = size_t(sr_read64(reg, ctrl_port)); + settingsbus_reg_t reg_fifo = SR_READBACK_REG_FIFOSIZE; + size_t buf_size_bytes = size_t(sr_read64(reg_fifo, ctrl_port)); if (buf_size_bytes > 0) n_valid_input_buffers++; _tree->create<size_t>(_root_path / "input_buffer_size" / ctrl_port) .set(buf_size_bytes); + // Set MTU size and convert to bytes: + settingsbus_reg_t reg_mtu = SR_READBACK_REG_MTU; + size_t mtu = 8 * (1 << size_t(sr_read64(reg_mtu, ctrl_port))); + _tree->create<size_t>(_root_path / "mtu" / ctrl_port).set(mtu); // Set default destination SIDs // Otherwise, the default is someone else's SID, which we don't want sr_write(SR_RESP_IN_DST_SID, 0xFFFF, ctrl_port); |