From 651807d116a4a5e12fc8d976e8fdac98b0b2fc11 Mon Sep 17 00:00:00 2001 From: michael-west Date: Mon, 28 Aug 2017 16:04:59 -0700 Subject: X300: Reduce Ethernet frame size to 4000 This is to avoid underruns caused by flow control packets being blocked by data packets at high rates. --- host/lib/usrp/x300/x300_impl.cpp | 6 +++--- host/lib/usrp/x300/x300_impl.hpp | 5 ++--- 2 files changed, 5 insertions(+), 6 deletions(-) (limited to 'host/lib') diff --git a/host/lib/usrp/x300/x300_impl.cpp b/host/lib/usrp/x300/x300_impl.cpp index 351cb4e10..60be75f2b 100644 --- a/host/lib/usrp/x300/x300_impl.cpp +++ b/host/lib/usrp/x300/x300_impl.cpp @@ -705,7 +705,7 @@ void x300_impl::setup_mb(const size_t mb_i, const uhd::device_addr_t &dev_addr) } _tree->create(mb_path / "mtu/recv").set(_max_frame_sizes.recv_frame_size); - _tree->create(mb_path / "mtu/send").set(std::min(_max_frame_sizes.send_frame_size, X300_ETH_DATA_FRAME_MAX_TX_SIZE)); + _tree->create(mb_path / "mtu/send").set(_max_frame_sizes.send_frame_size); _tree->create(mb_path / "link_max_rate").set(X300_MAX_RATE_10GIGE); } @@ -1313,7 +1313,7 @@ uhd::both_xports_t x300_impl::make_transport( << boost::format("For this connection, UHD recommends a send frame size of at least %lu for best\nperformance, but your system's MTU will only allow %lu.") % eth_data_rec_frame_size % _max_frame_sizes.send_frame_size - << "This will negatively impact your maximum achievable sample rate." + << "This may negatively impact your maximum achievable sample rate." ; } @@ -1322,7 +1322,7 @@ uhd::both_xports_t x300_impl::make_transport( << boost::format("For this connection, UHD recommends a receive frame size of at least %lu for best\nperformance, but your system's MTU will only allow %lu.") % eth_data_rec_frame_size % _max_frame_sizes.recv_frame_size - << "This will negatively impact your maximum achievable sample rate." + << "This may negatively impact your maximum achievable sample rate." ; } diff --git a/host/lib/usrp/x300/x300_impl.hpp b/host/lib/usrp/x300/x300_impl.hpp index 35bd8ce8f..e67242aa3 100644 --- a/host/lib/usrp/x300/x300_impl.hpp +++ b/host/lib/usrp/x300/x300_impl.hpp @@ -57,11 +57,10 @@ static const size_t X300_PCIE_MAX_CHANNELS = 6; static const size_t X300_PCIE_MAX_MUXED_CTRL_XPORTS = 32; static const size_t X300_PCIE_MAX_MUXED_ASYNC_XPORTS = 4; -static const size_t X300_10GE_DATA_FRAME_MAX_SIZE = 8000; // CHDR packet size in bytes +//Reduced to 4000 to make sure flow control packets are not blocked for too long at high rates +static const size_t X300_10GE_DATA_FRAME_MAX_SIZE = 4000; // CHDR packet size in bytes static const size_t X300_1GE_DATA_FRAME_MAX_SIZE = 1472; // CHDR packet size in bytes static const size_t X300_ETH_MSG_FRAME_SIZE = uhd::transport::udp_simple::mtu; //bytes -// MTU throttling for ethernet/TX (see above): -static const size_t X300_ETH_DATA_FRAME_MAX_TX_SIZE = 8000; static const double X300_THREAD_BUFFER_TIMEOUT = 0.1; // Time in seconds -- cgit v1.2.3