From 816a07bee54e998e4fb25beeb44b9ac3888189bf Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Sat, 16 Oct 2010 01:18:47 -0700 Subject: 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. --- host/lib/usrp/usrp2/io_impl.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'host/lib/usrp/usrp2') 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::make(100/*messages deep*/)) { /* NOP */ -- cgit v1.2.3