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/mpmd/mpmd_link_if_ctrl_udp.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/mpmd/mpmd_link_if_ctrl_udp.cpp')
-rw-r--r-- | host/lib/usrp/mpmd/mpmd_link_if_ctrl_udp.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/host/lib/usrp/mpmd/mpmd_link_if_ctrl_udp.cpp b/host/lib/usrp/mpmd/mpmd_link_if_ctrl_udp.cpp index aeb1c6436..3a2b3f59e 100644 --- a/host/lib/usrp/mpmd/mpmd_link_if_ctrl_udp.cpp +++ b/host/lib/usrp/mpmd/mpmd_link_if_ctrl_udp.cpp @@ -32,7 +32,7 @@ const uhd::rfnoc::chdr::chdr_packet_factory mpmd_link_if_ctrl_udp::_pkt_factory( namespace { //! Maximum CHDR packet size in bytes -const size_t MPMD_10GE_DATA_FRAME_MAX_SIZE = 8000; +const size_t MPMD_10GE_DATA_FRAME_MAX_SIZE = 8000; const size_t MPMD_1GE_DATA_FRAME_MAX_SIZE = 1472; const size_t MPMD_1GE_ASYNCMSG_FRAME_MAX_SIZE = 1472; @@ -366,8 +366,12 @@ uhd::transport::both_links_t mpmd_link_if_ctrl_udp::get_link(const size_t link_i if (_mb_args.has_key("use_dpdk")) { // FIXME use constrained device args #ifdef HAVE_DPDK auto link = uhd::transport::udp_dpdk_link::make(ip_addr, udp_port, link_params); - return std::make_tuple( - link, link_params.send_buff_size, link, link_params.recv_buff_size, true); + 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 @@ -378,7 +382,7 @@ uhd::transport::both_links_t mpmd_link_if_ctrl_udp::get_link(const size_t link_i 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); + link, link_params.send_buff_size, link, link_params.recv_buff_size, true, false); } size_t mpmd_link_if_ctrl_udp::get_num_links() const |