diff options
-rw-r--r-- | host/lib/include/uhdlib/transport/nirio_link.hpp | 8 | ||||
-rw-r--r-- | host/lib/transport/nirio_link.cpp | 7 | ||||
-rw-r--r-- | host/lib/usrp/x300/x300_pcie_mgr.cpp | 2 |
3 files changed, 12 insertions, 5 deletions
diff --git a/host/lib/include/uhdlib/transport/nirio_link.hpp b/host/lib/include/uhdlib/transport/nirio_link.hpp index cf1bb1d75..84d55113d 100644 --- a/host/lib/include/uhdlib/transport/nirio_link.hpp +++ b/host/lib/include/uhdlib/transport/nirio_link.hpp @@ -79,13 +79,15 @@ public: * \param addr a string representing the destination address * \param port a string representing the destination port * \param params Values for frame sizes, num frames, and buffer sizes - * \param[out] recv_socket_buff_size Returns the recv socket buffer size - * \param[out] send_socket_buff_size Returns the send socket buffer size + * \param[out] recv_buff_size Returns the recv buffer size + * \param[out] send_buff_size Returns the send buffer size */ static sptr make(uhd::niusrprio::niusrprio_session::sptr fpga_session, const uint32_t instance, const link_params_t& params, - const uhd::device_addr_t& hints); + const uhd::device_addr_t& hints, + size_t& recv_buff_size, + size_t& send_buff_size); /*! * Get the physical adapter ID used for this link diff --git a/host/lib/transport/nirio_link.cpp b/host/lib/transport/nirio_link.cpp index adef8b5a0..b5c4845d8 100644 --- a/host/lib/transport/nirio_link.cpp +++ b/host/lib/transport/nirio_link.cpp @@ -170,7 +170,9 @@ nirio_link::~nirio_link() nirio_link::sptr nirio_link::make(uhd::niusrprio::niusrprio_session::sptr fpga_session, const uint32_t instance, const uhd::transport::link_params_t& default_params, - const uhd::device_addr_t& hints) + const uhd::device_addr_t& hints, + size_t& recv_buff_size, + size_t& send_buff_size) { UHD_ASSERT_THROW(default_params.num_recv_frames != 0); UHD_ASSERT_THROW(default_params.num_send_frames != 0); @@ -292,6 +294,9 @@ nirio_link::sptr nirio_link::make(uhd::niusrprio::niusrprio_session::sptr fpga_s .str()); } + recv_buff_size = link_params.num_recv_frames * link_params.recv_frame_size; + send_buff_size = link_params.num_send_frames * link_params.send_frame_size; + return nirio_link::sptr(new nirio_link(fpga_session, instance, link_params)); } diff --git a/host/lib/usrp/x300/x300_pcie_mgr.cpp b/host/lib/usrp/x300/x300_pcie_mgr.cpp index d3f4eba27..0ca918e3c 100644 --- a/host/lib/usrp/x300/x300_pcie_mgr.cpp +++ b/host/lib/usrp/x300/x300_pcie_mgr.cpp @@ -356,7 +356,7 @@ both_links_t pcie_manager::get_links(link_type_t link_type, // PCIe: Lossless, and little endian size_t recv_buff_size, send_buff_size; auto link = - nirio_link::make(_rio_fpga_interface, dma_channel_num, link_params, link_args); + 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); |