From cb9c97d643ac51279e61439c4e7caae9b1212c7d Mon Sep 17 00:00:00 2001 From: Michael West Date: Thu, 16 Nov 2017 11:59:45 -0800 Subject: 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. --- host/include/uhd/rfnoc/sink_block_ctrl_base.hpp | 4 ++-- host/include/uhd/rfnoc/source_block_ctrl_base.hpp | 8 ++++---- host/include/uhd/transport/zero_copy.hpp | 10 ++++++++++ 3 files changed, 16 insertions(+), 6 deletions(-) (limited to 'host/include') diff --git a/host/include/uhd/rfnoc/sink_block_ctrl_base.hpp b/host/include/uhd/rfnoc/sink_block_ctrl_base.hpp index f90361cf1..57c398ce3 100644 --- a/host/include/uhd/rfnoc/sink_block_ctrl_base.hpp +++ b/host/include/uhd/rfnoc/sink_block_ctrl_base.hpp @@ -80,8 +80,8 @@ public: * \param block_port Set up flow control for a stream coming in on this particular block port. */ virtual void configure_flow_control_in( - size_t bytes, - size_t block_port=0 + const size_t bytes, + const size_t block_port=0 ); /*! Configure the behaviour for errors on incoming packets diff --git a/host/include/uhd/rfnoc/source_block_ctrl_base.hpp b/host/include/uhd/rfnoc/source_block_ctrl_base.hpp index 39e7411f3..c9976b774 100644 --- a/host/include/uhd/rfnoc/source_block_ctrl_base.hpp +++ b/host/include/uhd/rfnoc/source_block_ctrl_base.hpp @@ -111,10 +111,10 @@ public: * not sufficient to set the flow control, and as such is rarely used. */ virtual void configure_flow_control_out( - bool enable_output, - size_t buf_size_bytes, - size_t pkt_limit=0, - size_t block_port=0, + const bool enable_output, + const size_t buf_size_bytes, + const size_t pkt_limit=0, + const size_t block_port=0, const uhd::sid_t &sid=uhd::sid_t() ); diff --git a/host/include/uhd/transport/zero_copy.hpp b/host/include/uhd/transport/zero_copy.hpp index 73d1686b8..4218ab2f9 100644 --- a/host/include/uhd/transport/zero_copy.hpp +++ b/host/include/uhd/transport/zero_copy.hpp @@ -128,10 +128,20 @@ namespace uhd{ namespace transport{ * Transport parameters */ struct zero_copy_xport_params { + zero_copy_xport_params() : + recv_frame_size(0), + send_frame_size(0), + num_recv_frames(0), + num_send_frames(0), + recv_buff_size(0), + send_buff_size(0) + { /* NOP */ } size_t recv_frame_size; size_t send_frame_size; size_t num_recv_frames; size_t num_send_frames; + size_t recv_buff_size; + size_t send_buff_size; }; /*! -- cgit v1.2.3