summaryrefslogtreecommitdiffstats
path: root/host/lib
diff options
context:
space:
mode:
Diffstat (limited to 'host/lib')
-rw-r--r--host/lib/usrp/usrp_e/io_impl.cpp6
-rw-r--r--host/lib/usrp/usrp_e/usrp_e_mmap_zero_copy.cpp12
2 files changed, 15 insertions, 3 deletions
diff --git a/host/lib/usrp/usrp_e/io_impl.cpp b/host/lib/usrp/usrp_e/io_impl.cpp
index 1e577a4df..2802a6b87 100644
--- a/host/lib/usrp/usrp_e/io_impl.cpp
+++ b/host/lib/usrp/usrp_e/io_impl.cpp
@@ -130,12 +130,12 @@ void usrp_e_impl::io_impl::recv_pirate_loop(
continue;
}
+ //same number of frames as the data transport -> always immediate
+ recv_pirate_booty->push_with_wait(buff);
+
}catch(const std::exception &e){
std::cerr << "Error (usrp-e recv pirate loop): " << e.what() << std::endl;
}
-
- //usrp-e back-pressures on receive: push with wait
- recv_pirate_booty->push_with_wait(buff);
}
}
diff --git a/host/lib/usrp/usrp_e/usrp_e_mmap_zero_copy.cpp b/host/lib/usrp/usrp_e/usrp_e_mmap_zero_copy.cpp
index e62205a3f..9e25ed088 100644
--- a/host/lib/usrp/usrp_e/usrp_e_mmap_zero_copy.cpp
+++ b/host/lib/usrp/usrp_e/usrp_e_mmap_zero_copy.cpp
@@ -112,6 +112,12 @@ public:
if (poll_ret <= 0) return managed_recv_buffer::sptr();
}
+ //check that the frame is really ready
+ if (not (info->flags & RB_USER)){
+ if (fp_verbose) std::cout << " flags: not ready" << std::endl;
+ return managed_recv_buffer::sptr();
+ }
+
//increment the index for the next call
if (++_recv_index == size_t(_rb_size.num_rx_frames)) _recv_index = 0;
@@ -144,6 +150,12 @@ public:
if (poll_ret <= 0) return managed_send_buffer::sptr();
}
+ //check that the frame is really ready
+ if (not (info->flags & RB_KERNEL)){
+ if (fp_verbose) std::cout << " flags: not ready" << std::endl;
+ return managed_send_buffer::sptr();
+ }
+
//increment the index for the next call
if (++_send_index == size_t(_rb_size.num_tx_frames)) _send_index = 0;