diff options
author | mattprost <matt.prost@ni.com> | 2021-03-31 11:33:33 -0500 |
---|---|---|
committer | Aaron Rossetto <aaron.rossetto@ni.com> | 2021-04-29 14:35:26 -0500 |
commit | d689df23fb4bf38e1abc23b06767fc26aa27c163 (patch) | |
tree | b89a640a8e86ec572958d7602cc2c9d834f68fdf /host/lib/usrp/x300/x300_pcie_mgr.cpp | |
parent | 99e5230e4bf26166ee1accce1e57ff24b0629826 (diff) | |
download | uhd-d689df23fb4bf38e1abc23b06767fc26aa27c163.tar.gz uhd-d689df23fb4bf38e1abc23b06767fc26aa27c163.tar.bz2 uhd-d689df23fb4bf38e1abc23b06767fc26aa27c163.zip |
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 <matt.prost@ni.com>
Diffstat (limited to 'host/lib/usrp/x300/x300_pcie_mgr.cpp')
-rw-r--r-- | host/lib/usrp/x300/x300_pcie_mgr.cpp | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/host/lib/usrp/x300/x300_pcie_mgr.cpp b/host/lib/usrp/x300/x300_pcie_mgr.cpp index 0ca918e3c..64ce5df55 100644 --- a/host/lib/usrp/x300/x300_pcie_mgr.cpp +++ b/host/lib/usrp/x300/x300_pcie_mgr.cpp @@ -347,6 +347,9 @@ both_links_t pcie_manager::get_links(link_type_t link_type, + ", no such device associated with this motherboard!"); } + const bool enable_fc = not link_args.has_key("enable_fc") + || uhd::cast::from_str<bool>(link_args.get("enable_fc")); + const uint32_t dma_channel_num = allocate_pcie_dma_chan(remote_epid, link_type); // Note: The nirio_link object's factory has a lot of code for sanity // checking the link params, and merging the link_args with the default @@ -358,6 +361,11 @@ both_links_t pcie_manager::get_links(link_type_t link_type, auto link = nirio_link::make(_rio_fpga_interface, dma_channel_num, link_params, link_args, recv_buff_size, send_buff_size); - return std::make_tuple( - link, send_buff_size, link, recv_buff_size, false /*not lossy*/, false); + return std::make_tuple(link, + send_buff_size, + link, + recv_buff_size, + false /*not lossy*/, + false, + enable_fc); } |