diff options
author | Alex Williams <alex.williams@ni.com> | 2019-12-12 10:29:11 -0800 |
---|---|---|
committer | Brent Stapleton <brent.stapleton@ettus.com> | 2019-12-20 16:32:22 -0800 |
commit | 691f191a1ea1a8d655976c9f7b9fdfe7b4b36a41 (patch) | |
tree | cfa48579158488852d8a7832da1cda14d7904373 /host/lib/usrp/x300/x300_eth_mgr.cpp | |
parent | cb400696bf2fbe82eea0f38d04a1771ccf6fd868 (diff) | |
download | uhd-691f191a1ea1a8d655976c9f7b9fdfe7b4b36a41.tar.gz uhd-691f191a1ea1a8d655976c9f7b9fdfe7b4b36a41.tar.bz2 uhd-691f191a1ea1a8d655976c9f7b9fdfe7b4b36a41.zip |
transport,usrp: Make available packet-based flow control
DPDK provides a fixed number of fixed-size buffers for the receive
window, so it needs packet-based flow control to avoid dropping
packets. This change enables counting by packets.
Co-authored-by: Ciro Nishiguchi <ciro.nishiguchi@ni.com>
Diffstat (limited to 'host/lib/usrp/x300/x300_eth_mgr.cpp')
-rw-r--r-- | host/lib/usrp/x300/x300_eth_mgr.cpp | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/host/lib/usrp/x300/x300_eth_mgr.cpp b/host/lib/usrp/x300/x300_eth_mgr.cpp index fd826e484..02f9abe0f 100644 --- a/host/lib/usrp/x300/x300_eth_mgr.cpp +++ b/host/lib/usrp/x300/x300_eth_mgr.cpp @@ -263,25 +263,27 @@ both_links_t eth_manager::get_links(link_type_t link_type, link_params.num_send_frames = std::max(uhd::rfnoc::MIN_NUM_FRAMES, link_params.num_send_frames); link_params.num_recv_frames = std::max(uhd::rfnoc::MIN_NUM_FRAMES, link_params.num_recv_frames); - // Dummy variables for populating the return tuple - size_t recv_buff_size, send_buff_size; if (_args.get_use_dpdk()) { #ifdef HAVE_DPDK - auto link = uhd::transport::udp_dpdk_link::make( - conn.addr, BOOST_STRINGIZE(X300_VITA_UDP_PORT), link_params); - return std::make_tuple(link, send_buff_size, link, recv_buff_size, true); + auto link = uhd::transport::udp_dpdk_link::make( + conn.addr, BOOST_STRINGIZE(X300_VITA_UDP_PORT), link_params); + return std::make_tuple(link, + link_params.send_buff_size, + link, + link_params.recv_buff_size, + true, + true); #else UHD_LOG_WARNING("X300", "Cannot create DPDK transport, falling back to UDP"); #endif } - - // No DPDK, then return regular/kernel UDP auto link = uhd::transport::udp_boost_asio_link::make(conn.addr, BOOST_STRINGIZE(X300_VITA_UDP_PORT), link_params, - recv_buff_size, - send_buff_size); - return std::make_tuple(link, send_buff_size, link, recv_buff_size, true); + link_params.recv_buff_size, + link_params.send_buff_size); + return std::make_tuple( + link, link_params.send_buff_size, link, link_params.recv_buff_size, true, false); } /****************************************************************************** |