From d689df23fb4bf38e1abc23b06767fc26aa27c163 Mon Sep 17 00:00:00 2001 From: mattprost Date: Wed, 31 Mar 2021 11:33:33 -0500 Subject: rfnoc: Add option to disable flow control on rx streaming Disabling this feature will allow the USRP to send a continuous stream of Rx data to a host machine without throttling due to lack of flow control credits. This is unnecessary overhead on lossless transports such as pcie or aurora. Usage: add 'enable_fc=false' to stream_args.args Signed-off-by: mattprost --- host/lib/usrp/x300/x300_eth_mgr.cpp | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) (limited to 'host/lib/usrp/x300/x300_eth_mgr.cpp') diff --git a/host/lib/usrp/x300/x300_eth_mgr.cpp b/host/lib/usrp/x300/x300_eth_mgr.cpp index f428fc98e..dcc8195ae 100644 --- a/host/lib/usrp/x300/x300_eth_mgr.cpp +++ b/host/lib/usrp/x300/x300_eth_mgr.cpp @@ -20,6 +20,7 @@ #include #include #include +#include #include #include #include @@ -227,6 +228,10 @@ both_links_t eth_manager::get_links(link_type_t link_type, x300_eth_conn_t conn = eth_conns[local_device_id]; zero_copy_xport_params default_buff_args; + const bool enable_fc = not link_args.has_key("enable_fc") + || uhd::cast::from_str(link_args.get("enable_fc")); + const bool lossy_xport = enable_fc; + const size_t send_mtu = get_mtu(uhd::TX_DIRECTION); const size_t recv_mtu = get_mtu(uhd::RX_DIRECTION); @@ -278,8 +283,9 @@ both_links_t eth_manager::get_links(link_type_t link_type, link_params.send_buff_size, link, link_params.recv_buff_size, + lossy_xport, true, - true); + enable_fc); #else UHD_LOG_WARNING("X300", "Cannot create DPDK transport, falling back to UDP"); #endif @@ -289,8 +295,13 @@ both_links_t eth_manager::get_links(link_type_t link_type, link_params, 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); + return std::make_tuple(link, + link_params.send_buff_size, + link, + link_params.recv_buff_size, + lossy_xport, + false, + enable_fc); } /****************************************************************************** -- cgit v1.2.3