aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/rfnoc/source_block_ctrl_base.cpp
diff options
context:
space:
mode:
authorMichael West <michael.west@ettus.com>2017-11-16 11:59:45 -0800
committerMartin Braun <martin.braun@ettus.com>2018-07-25 15:34:03 -0700
commitcb9c97d643ac51279e61439c4e7caae9b1212c7d (patch)
treec6f7ff98dae9b979a75a924aab3c843963d7fd0c /host/lib/rfnoc/source_block_ctrl_base.cpp
parent7ed7b207735fee5f7bd055472e591935b5f96cf5 (diff)
downloaduhd-cb9c97d643ac51279e61439c4e7caae9b1212c7d.tar.gz
uhd-cb9c97d643ac51279e61439c4e7caae9b1212c7d.tar.bz2
uhd-cb9c97d643ac51279e61439c4e7caae9b1212c7d.zip
X300: Change Ethernet buffering
Ethernet buffering is now done so that most of the buffering is done in the socket buffers and multiple frames are only used to support the receive side offload of the socket I/O. Eliminates dropped packets at high full duplex rates.
Diffstat (limited to 'host/lib/rfnoc/source_block_ctrl_base.cpp')
-rw-r--r--host/lib/rfnoc/source_block_ctrl_base.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/host/lib/rfnoc/source_block_ctrl_base.cpp b/host/lib/rfnoc/source_block_ctrl_base.cpp
index afec6ba1b..0f1c31e4f 100644
--- a/host/lib/rfnoc/source_block_ctrl_base.cpp
+++ b/host/lib/rfnoc/source_block_ctrl_base.cpp
@@ -77,10 +77,10 @@ void source_block_ctrl_base::set_destination(
}
void source_block_ctrl_base::configure_flow_control_out(
- bool enable_fc_output,
- size_t buf_size_bytes,
- size_t pkt_limit,
- size_t block_port,
+ const bool enable_fc_output,
+ const size_t buf_size_bytes,
+ const size_t pkt_limit,
+ const size_t block_port,
UHD_UNUSED(const uhd::sid_t &sid)
) {
UHD_RFNOC_BLOCK_TRACE() << "source_block_ctrl_base::configure_flow_control_out() buf_size_bytes==" << buf_size_bytes;
@@ -113,7 +113,7 @@ void source_block_ctrl_base::configure_flow_control_out(
//based flow control
const bool enable_byte_fc = (buf_size_bytes != 0);
const bool enable_pkt_cnt_fc = (pkt_limit != 0);
- const size_t config = enable_fc_output + (enable_byte_fc << 1) + (enable_pkt_cnt_fc << 2);
+ const uint32_t config = (enable_fc_output ? 1 : 0) | (enable_byte_fc << 1) | (enable_pkt_cnt_fc << 2);
//Resize the FC window.
//Precondition: No data can be buffered upstream.