From ffde9596bdef76e56d305be9a83401ceb580226f Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Sun, 3 Jul 2011 11:39:25 -0700 Subject: usrp2: set the set_alignment_failure_threshold to match default socket buffer size --- host/lib/usrp/usrp2/io_impl.cpp | 4 ++++ 1 file changed, 4 insertions(+) (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 8809ac709..3a3afff02 100644 --- a/host/lib/usrp/usrp2/io_impl.cpp +++ b/host/lib/usrp/usrp2/io_impl.cpp @@ -282,6 +282,10 @@ void usrp2_impl::io_init(void){ _io_impl->send_handler.set_vrt_packer(&vrt::if_hdr_pack_be, vrt_send_header_offset_words32); _io_impl->send_handler.set_converter(_tx_otw_type); _io_impl->send_handler.set_max_samples_per_packet(get_max_send_samps_per_packet()); + + //set the packet threshold to be an entire socket buffer's worth + const size_t packets_per_sock_buff = 50e6/_mbc[_mbc.keys().front()].dsp_xports[0]->get_recv_frame_size(); + _io_impl->recv_handler.set_alignment_failure_threshold(packets_per_sock_buff); } void usrp2_impl::update_tick_rate(const double rate){ -- cgit v1.2.3