diff options
author | Martin Braun <martin.braun@ettus.com> | 2019-09-10 19:45:01 -0700 |
---|---|---|
committer | Martin Braun <martin.braun@ettus.com> | 2019-11-26 11:49:46 -0800 |
commit | 96dd8f437ec88f3c60e7273d0880347239a91426 (patch) | |
tree | 2bdcbf06581988954bc30cb82d8b3acf63fe3d64 /host/lib/rfnoc | |
parent | ebef8c34191ce3f26b62776f35f7da32a34cc660 (diff) | |
download | uhd-96dd8f437ec88f3c60e7273d0880347239a91426.tar.gz uhd-96dd8f437ec88f3c60e7273d0880347239a91426.tar.bz2 uhd-96dd8f437ec88f3c60e7273d0880347239a91426.zip |
rfnoc: radio: Interpret MTU as max payload size
This matches the streamer code.
Diffstat (limited to 'host/lib/rfnoc')
-rw-r--r-- | host/lib/rfnoc/radio_control_impl.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/host/lib/rfnoc/radio_control_impl.cpp b/host/lib/rfnoc/radio_control_impl.cpp index b5907cf03..758f9be6c 100644 --- a/host/lib/rfnoc/radio_control_impl.cpp +++ b/host/lib/rfnoc/radio_control_impl.cpp @@ -168,10 +168,10 @@ radio_control_impl::radio_control_impl(make_args_ptr make_args) {&_spp_prop.back()}, [this, chan, &spp = _spp_prop.back()]() { RFNOC_LOG_TRACE("Calling resolver for spp@" << chan); - // TODO: Replace the magic number 16 (the protocol overhead) - // with something else that is calculated based on the CHDR width + // MTU is max payload size, header with timestamp is already + // accounted for const int mtu = - static_cast<int>(get_mtu({res_source_info::OUTPUT_EDGE, chan})) - 16; + static_cast<int>(get_mtu({res_source_info::OUTPUT_EDGE, chan})); const int mtu_samps = mtu / (_samp_width / 8); const int max_spp_per_mtu = mtu_samps - (mtu_samps % _spc); if (spp.get() > max_spp_per_mtu) { |