diff options
author | Josh Blum <josh@joshknows.com> | 2011-07-03 11:39:25 -0700 |
---|---|---|
committer | Josh Blum <josh@joshknows.com> | 2011-07-03 11:39:25 -0700 |
commit | ffde9596bdef76e56d305be9a83401ceb580226f (patch) | |
tree | c69de646cc02f36e1d72b795abe1b2bae3ae8ac8 /host | |
parent | 2c833a175f7e6feaf07568bae278c6e4cafd6a10 (diff) | |
download | uhd-ffde9596bdef76e56d305be9a83401ceb580226f.tar.gz uhd-ffde9596bdef76e56d305be9a83401ceb580226f.tar.bz2 uhd-ffde9596bdef76e56d305be9a83401ceb580226f.zip |
usrp2: set the set_alignment_failure_threshold to match default socket buffer size
Diffstat (limited to 'host')
-rw-r--r-- | host/lib/usrp/usrp2/io_impl.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
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){ |