aboutsummaryrefslogtreecommitdiffstats
path: root/host
diff options
context:
space:
mode:
authorTom Bereknyei <tom@dds.mil>2017-09-10 14:53:56 -0400
committermichael-west <michael.west@ettus.com>2017-12-19 17:29:20 -0800
commitf8701eb80d9fd3bf8ce2997041c864e27790b043 (patch)
treee8fec870b6d5650a9248e4b16aaef97bad1a7ac8 /host
parent57876913b0dfd0236d9805b705c5eb862051cd73 (diff)
downloaduhd-f8701eb80d9fd3bf8ce2997041c864e27790b043.tar.gz
uhd-f8701eb80d9fd3bf8ce2997041c864e27790b043.tar.bz2
uhd-f8701eb80d9fd3bf8ce2997041c864e27790b043.zip
rfnoc: Do not pop a sequence number early
The ctrl_iface class will assume that a response packet is available. There are cases where no response packet is available, in which case sequence numbers should not get popped from the stack prematurely.
Diffstat (limited to 'host')
-rw-r--r--host/lib/rfnoc/ctrl_iface.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/host/lib/rfnoc/ctrl_iface.cpp b/host/lib/rfnoc/ctrl_iface.cpp
index b2ac1778e..288f3f065 100644
--- a/host/lib/rfnoc/ctrl_iface.cpp
+++ b/host/lib/rfnoc/ctrl_iface.cpp
@@ -187,7 +187,6 @@ private:
//get seq to ack from outstanding packets list
UHD_ASSERT_THROW(not _outstanding_seqs.empty());
const size_t seq_to_ack = _outstanding_seqs.front();
- _outstanding_seqs.pop();
//parse the packet
vrt::if_packet_info_t packet_info;
@@ -204,6 +203,7 @@ private:
{
UHD_ASSERT_THROW(bool(buff));
UHD_ASSERT_THROW(buff->size() > 0);
+ _outstanding_seqs.pop();
}
catch(const std::exception &ex)
{
@@ -236,6 +236,7 @@ private:
accum_timeout += short_timeout;
UHD_ASSERT_THROW(accum_timeout < _timeout);
}
+ _outstanding_seqs.pop();
pkt = resp_buff.data;
packet_info.num_packet_words32 = sizeof(resp_buff)/sizeof(uint32_t);