diff options
author | Josh Blum <josh@joshknows.com> | 2011-02-22 14:53:47 -0800 |
---|---|---|
committer | Josh Blum <josh@joshknows.com> | 2011-02-22 14:53:47 -0800 |
commit | fecb6365d8c547362f62ecfb36ea85140f1e9290 (patch) | |
tree | 02a349c1d6568f43fdbe0ef00ea21239a43e4b71 /host/lib/usrp/usrp2 | |
parent | a75f38f971d36424b261bc3fbe571e5b9efbf3f1 (diff) | |
download | uhd-fecb6365d8c547362f62ecfb36ea85140f1e9290.tar.gz uhd-fecb6365d8c547362f62ecfb36ea85140f1e9290.tar.bz2 uhd-fecb6365d8c547362f62ecfb36ea85140f1e9290.zip |
usrp2: fixed flow control monitors indexing, fixed multi-usrp send bug
Diffstat (limited to 'host/lib/usrp/usrp2')
-rw-r--r-- | host/lib/usrp/usrp2/io_impl.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/host/lib/usrp/usrp2/io_impl.cpp b/host/lib/usrp/usrp2/io_impl.cpp index 6d7f0cce8..b4f3e0873 100644 --- a/host/lib/usrp/usrp2/io_impl.cpp +++ b/host/lib/usrp/usrp2/io_impl.cpp @@ -126,8 +126,7 @@ struct usrp2_impl::io_impl{ get_send_buffs_fcn(boost::bind(&usrp2_impl::io_impl::get_send_buffs, this, _1)), async_msg_fifo(100/*messages deep*/) { - size_t num_monitors = dsp_xports.size()/usrp2_mboard_impl::MAX_NUM_DSPS*usrp2_mboard_impl::NUM_TX_DSPS; - for (size_t i = 0; i < num_monitors; i++){ + for (size_t i = 0; i < dsp_xports.size(); i++){ fc_mons.push_back(flow_control_monitor::sptr(new flow_control_monitor( usrp2_impl::sram_bytes/dsp_xports.front()->get_send_frame_size() )));; @@ -211,6 +210,9 @@ void usrp2_impl::io_impl::recv_pirate_loop( spawn_mutex.unlock(); + //store a reference to the flow control monitor (offset by max dsps) + flow_control_monitor &fc_mon = *(this->fc_mons[index*usrp2_mboard_impl::MAX_NUM_DSPS]); + while(recv_pirate_crew_raiding){ managed_recv_buffer::sptr buff = err_xport->get_recv_buff(); if (not buff.get()) continue; //ignore timeout/error buffers @@ -237,7 +239,7 @@ void usrp2_impl::io_impl::recv_pirate_loop( //catch the flow control packets and react if (metadata.event_code == 0){ boost::uint32_t fc_word32 = (vrt_hdr + if_packet_info.num_header_words32)[1]; - this->fc_mons[index]->update_fc_condition(uhd::ntohx(fc_word32)); + fc_mon.update_fc_condition(uhd::ntohx(fc_word32)); continue; } |