From ac025ebf40ad9ab6cb9945e25bad87016ae77128 Mon Sep 17 00:00:00 2001 From: michael-west Date: Wed, 30 Jan 2019 15:37:57 -0800 Subject: RFNoC: Limit number of control packets in flight Limit number of unacknowledged control packets to the number of receive frames in the transport to prevent the transport from getting locked up or being overrun by ACK packets. Signed-off-by: michael-west --- host/lib/rfnoc/ctrl_iface.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'host/lib/rfnoc') diff --git a/host/lib/rfnoc/ctrl_iface.cpp b/host/lib/rfnoc/ctrl_iface.cpp index e0fc03eab..a441ffbc3 100644 --- a/host/lib/rfnoc/ctrl_iface.cpp +++ b/host/lib/rfnoc/ctrl_iface.cpp @@ -35,9 +35,9 @@ public: : _xports(xports) , _name(name) , _seq_out(0) - , _max_outstanding_acks( - uhd::rfnoc::CMD_FIFO_SIZE / uhd::rfnoc::MAX_CMD_PKT_SIZE) + , _max_outstanding_acks(xports.recv->get_num_recv_frames()) { + UHD_ASSERT_THROW(bool(_xports.send)); UHD_ASSERT_THROW(bool(_xports.recv)); // Flush the response transport in case we have something over: -- cgit v1.2.3