From de45f2234ca7ce8a1efd79525323bef55f1f9d44 Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Wed, 22 Dec 2010 16:02:09 -0800 Subject: udp_ports: enable async recv in xport, set performance params in top level, things working --- host/lib/usrp/usrp2/io_impl.cpp | 2 +- host/lib/usrp/usrp2/usrp2_impl.cpp | 11 +++++++++-- 2 files changed, 10 insertions(+), 3 deletions(-) (limited to 'host/lib/usrp') diff --git a/host/lib/usrp/usrp2/io_impl.cpp b/host/lib/usrp/usrp2/io_impl.cpp index d11031f3c..5a6c0983c 100644 --- a/host/lib/usrp/usrp2/io_impl.cpp +++ b/host/lib/usrp/usrp2/io_impl.cpp @@ -356,7 +356,7 @@ static UHD_INLINE void extract_packet_info( time = extract_time_spec(next_info); clear = extract_time_spec(prev_info) > time; - msg = prev_info.packet_type != vrt::if_packet_info_t::PACKET_TYPE_DATA; + msg = next_info.packet_type != vrt::if_packet_info_t::PACKET_TYPE_DATA; prev_info = next_info; } diff --git a/host/lib/usrp/usrp2/usrp2_impl.cpp b/host/lib/usrp/usrp2/usrp2_impl.cpp index 3f8da5fda..f910999d4 100644 --- a/host/lib/usrp/usrp2/usrp2_impl.cpp +++ b/host/lib/usrp/usrp2/usrp2_impl.cpp @@ -197,7 +197,14 @@ static device_addrs_t usrp2_find(const device_addr_t &hint_){ * Make **********************************************************************/ static device::sptr usrp2_make(const device_addr_t &device_addr){ -sep_indexed_dev_addrs(device_addr); + + //setup the dsp transport hints (default to a large recv buff) + device_addr_t dsp_xport_hints = device_addr; + if (not dsp_xport_hints.has_key("recv_buff_size")){ + //set to half-a-second of buffering at max rate + dsp_xport_hints["recv_buff_size"] = "50e6"; + } + //create a ctrl and data transport for each address std::vector ctrl_transports; std::vector data_transports; @@ -209,7 +216,7 @@ sep_indexed_dev_addrs(device_addr); dev_addr_i["addr"], num2str(USRP2_UDP_CTRL_PORT) )); data_transports.push_back(udp_zero_copy::make( - dev_addr_i["addr"], num2str(USRP2_UDP_DATA_PORT), device_addr + dev_addr_i["addr"], num2str(USRP2_UDP_DATA_PORT), dsp_xport_hints )); err0_transports.push_back(udp_zero_copy::make( dev_addr_i["addr"], num2str(USRP2_UDP_ERR0_PORT), device_addr_t() -- cgit v1.2.3