diff options
Diffstat (limited to 'host/lib')
-rw-r--r-- | host/lib/transport/udp_common.hpp | 3 | ||||
-rw-r--r-- | host/lib/transport/udp_zero_copy.cpp | 16 | ||||
-rw-r--r-- | host/lib/usrp/common/max287x.hpp | 6 |
3 files changed, 17 insertions, 8 deletions
diff --git a/host/lib/transport/udp_common.hpp b/host/lib/transport/udp_common.hpp index 82eee237b..d6e73cc5f 100644 --- a/host/lib/transport/udp_common.hpp +++ b/host/lib/transport/udp_common.hpp @@ -23,6 +23,9 @@ namespace uhd{ namespace transport{ + // Jumbo frames are limited to 9000; + static const size_t MAX_ETHERNET_MTU = 9000; + typedef boost::shared_ptr<boost::asio::ip::udp::socket> socket_sptr; /*! diff --git a/host/lib/transport/udp_zero_copy.cpp b/host/lib/transport/udp_zero_copy.cpp index 121bb9b64..68970f332 100644 --- a/host/lib/transport/udp_zero_copy.cpp +++ b/host/lib/transport/udp_zero_copy.cpp @@ -310,22 +310,22 @@ udp_zero_copy::sptr udp_zero_copy::make( xport_params.num_send_frames = size_t(hints.cast<double>("num_send_frames", default_buff_args.num_send_frames)); //extract buffer size hints from the device addr - size_t usr_recv_buff_size = size_t(hints.cast<double>("recv_buff_size", 0.0)); - size_t usr_send_buff_size = size_t(hints.cast<double>("send_buff_size", 0.0)); + size_t usr_recv_buff_size = size_t(hints.cast<double>("recv_buff_size", xport_params.num_recv_frames * MAX_ETHERNET_MTU)); + size_t usr_send_buff_size = size_t(hints.cast<double>("send_buff_size", xport_params.num_send_frames * MAX_ETHERNET_MTU)); if (hints.has_key("recv_buff_size")) { - if (usr_recv_buff_size < xport_params.recv_frame_size * xport_params.num_recv_frames) { + if (usr_recv_buff_size < xport_params.num_recv_frames * MAX_ETHERNET_MTU) { throw uhd::value_error((boost::format( - "recv_buff_size must be equal to or greater than (num_recv_frames * recv_frame_size) where num_recv_frames=%d, recv_frame_size=%d") - % xport_params.num_recv_frames % xport_params.recv_frame_size).str()); + "recv_buff_size must be equal to or greater than %d") + % (xport_params.num_recv_frames * MAX_ETHERNET_MTU)).str()); } } if (hints.has_key("send_buff_size")) { - if (usr_send_buff_size < xport_params.send_frame_size * xport_params.num_send_frames) { + if (usr_send_buff_size < xport_params.num_send_frames * MAX_ETHERNET_MTU) { throw uhd::value_error((boost::format( - "send_buff_size must be equal to or greater than (num_send_frames * send_frame_size) where num_send_frames=%d, send_frame_size=%d") - % xport_params.num_send_frames % xport_params.send_frame_size).str()); + "send_buff_size must be equal to or greater than %d") + % (xport_params.num_send_frames * MAX_ETHERNET_MTU)).str()); } } diff --git a/host/lib/usrp/common/max287x.hpp b/host/lib/usrp/common/max287x.hpp index 1209d194e..a0400f651 100644 --- a/host/lib/usrp/common/max287x.hpp +++ b/host/lib/usrp/common/max287x.hpp @@ -900,6 +900,12 @@ void max287x<max287x_regs_t>::commit() } else { try { changed_regs = _regs.template get_changed_addrs<uint32_t> (); + // register 0 must be written to apply double buffered fields + if (changed_regs.size() > 0) + { + changed_regs.insert(0); + } + for (int addr = 5; addr >= 0; addr--) { if (changed_regs.find(uint32_t(addr)) != changed_regs.end()) |