aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/transport
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2010-12-22 17:45:25 -0800
committerJosh Blum <josh@joshknows.com>2010-12-22 17:45:25 -0800
commit434ee07c4ba1ce9faee8ecf3a309042ca424cbda (patch)
treea286584d98a0550ad9e8196e828295e52a133c83 /host/lib/transport
parent67e89717659605e4d8e0ddd26e4ccef4dec24eb2 (diff)
parentde45f2234ca7ce8a1efd79525323bef55f1f9d44 (diff)
downloaduhd-434ee07c4ba1ce9faee8ecf3a309042ca424cbda.tar.gz
uhd-434ee07c4ba1ce9faee8ecf3a309042ca424cbda.tar.bz2
uhd-434ee07c4ba1ce9faee8ecf3a309042ca424cbda.zip
Merge branch 'udp_ports' into next
Conflicts: firmware/microblaze/apps/txrx_uhd.c host/lib/usrp/usrp2/mboard_impl.cpp host/lib/usrp/usrp2/usrp2_impl.cpp host/lib/usrp/usrp2/usrp2_impl.hpp
Diffstat (limited to 'host/lib/transport')
-rw-r--r--host/lib/transport/udp_zero_copy_asio.cpp7
-rw-r--r--host/lib/transport/vrt_packet_handler.hpp1
2 files changed, 5 insertions, 3 deletions
diff --git a/host/lib/transport/udp_zero_copy_asio.cpp b/host/lib/transport/udp_zero_copy_asio.cpp
index c758fa894..bbd63836c 100644
--- a/host/lib/transport/udp_zero_copy_asio.cpp
+++ b/host/lib/transport/udp_zero_copy_asio.cpp
@@ -37,14 +37,15 @@ namespace asio = boost::asio;
**********************************************************************/
//Define this to the the boost async io calls to perform receive.
//Otherwise, get_recv_buff uses a blocking receive with timeout.
-//#define USE_ASIO_ASYNC_RECV
+#define USE_ASIO_ASYNC_RECV
//Define this to the the boost async io calls to perform send.
//Otherwise, the commit callback uses a blocking send.
//#define USE_ASIO_ASYNC_SEND
-//enough buffering for half a second of samples at full rate on usrp2
-static const size_t MIN_RECV_SOCK_BUFF_SIZE = size_t(4 * 25e6 * 0.5);
+//By default, this buffer is sized insufficiently small.
+//For peformance, this buffer should be 10s of megabytes.
+static const size_t MIN_RECV_SOCK_BUFF_SIZE = size_t(10e3);
//Large buffers cause more underflow at high rates.
//Perhaps this is due to the kernel scheduling,
diff --git a/host/lib/transport/vrt_packet_handler.hpp b/host/lib/transport/vrt_packet_handler.hpp
index 278bcfeaa..7f8d84308 100644
--- a/host/lib/transport/vrt_packet_handler.hpp
+++ b/host/lib/transport/vrt_packet_handler.hpp
@@ -91,6 +91,7 @@ template <typename T> UHD_INLINE T get_context_code(
//vrt unpack each managed buffer
uhd::transport::vrt::if_packet_info_t if_packet_info;
for (size_t i = 0; i < state.width; i++){
+ if (state.managed_buffs[i].get() == NULL) continue; //better have a message packet coming up...
//extract packet words and check thats its enough to move on
size_t num_packet_words32 = state.managed_buffs[i]->size()/sizeof(boost::uint32_t);