diff options
author | michael-west <michael.west@ettus.com> | 2019-01-30 15:37:57 -0800 |
---|---|---|
committer | Ashish Chaudhari <ashish.chaudhari@ettus.com> | 2019-01-31 13:55:21 -0800 |
commit | ac025ebf40ad9ab6cb9945e25bad87016ae77128 (patch) | |
tree | 864c5d3c9753c7daf3770b506ee2e92783bd93c1 /host/lib/rfnoc | |
parent | 73104a90f081c912cc6d700d6db1896e4e23dadf (diff) | |
download | uhd-ac025ebf40ad9ab6cb9945e25bad87016ae77128.tar.gz uhd-ac025ebf40ad9ab6cb9945e25bad87016ae77128.tar.bz2 uhd-ac025ebf40ad9ab6cb9945e25bad87016ae77128.zip |
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 <michael.west@ettus.com>
Diffstat (limited to 'host/lib/rfnoc')
-rw-r--r-- | host/lib/rfnoc/ctrl_iface.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
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: |