aboutsummaryrefslogtreecommitdiffstats
path: root/host
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2010-10-16 01:18:47 -0700
committerJosh Blum <josh@joshknows.com>2010-10-16 01:18:47 -0700
commit816a07bee54e998e4fb25beeb44b9ac3888189bf (patch)
treeba9ca84d0981fd192f6afddc8188143dce6654cb /host
parent39ca8e25fc7f9b3170cb517b72640a62b15d253f (diff)
downloaduhd-816a07bee54e998e4fb25beeb44b9ac3888189bf.tar.gz
uhd-816a07bee54e998e4fb25beeb44b9ac3888189bf.tar.bz2
uhd-816a07bee54e998e4fb25beeb44b9ac3888189bf.zip
usrp2: make the booty smaller than the number of recv frames
This may fix some of our woes when the host cannot keep up. That is, with a smaller booty, the managed buffers will get freed up and the call to get buffer will never block waiting for a buffer to become free. This has several side effects: 1) Overflows are more likely to occur in the pirate thread. Pirate-based overflows will overwrite old packets, whereas socket-based overflows will discard newer incoming packets. 2) The pirate thread will continue to pull in async packets rather than loosing them in a socket-based overflow.
Diffstat (limited to 'host')
-rw-r--r--host/lib/usrp/usrp2/io_impl.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/host/lib/usrp/usrp2/io_impl.cpp b/host/lib/usrp/usrp2/io_impl.cpp
index eba704059..bbe9c273f 100644
--- a/host/lib/usrp/usrp2/io_impl.cpp
+++ b/host/lib/usrp/usrp2/io_impl.cpp
@@ -46,7 +46,7 @@ struct usrp2_impl::io_impl{
io_impl(size_t num_frames, size_t width):
packet_handler_recv_state(width),
- recv_pirate_booty(alignment_buffer_type::make(num_frames, width)),
+ recv_pirate_booty(alignment_buffer_type::make(num_frames-3, width)),
async_msg_fifo(bounded_buffer<async_metadata_t>::make(100/*messages deep*/))
{
/* NOP */