aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/rfnoc/fosphor_block_control_python.hpp
diff options
context:
space:
mode:
authorMartin Braun <martin.braun@ettus.com>2022-01-11 19:56:31 +0100
committerAaron Rossetto <aaron.rossetto@ni.com>2022-01-13 14:33:12 -0600
commit0caed55298060735bc7f79fafda07c83d3cc2ee6 (patch)
treea72e512eb85152f3c51a9442716a25b022db5b5c /host/lib/rfnoc/fosphor_block_control_python.hpp
parent9ad4bedd86c68824179d31b25f5ff1b5fa96bdcf (diff)
downloaduhd-0caed55298060735bc7f79fafda07c83d3cc2ee6.tar.gz
uhd-0caed55298060735bc7f79fafda07c83d3cc2ee6.tar.bz2
uhd-0caed55298060735bc7f79fafda07c83d3cc2ee6.zip
rfnoc: Always clear response queue in ctrlport_endpoint
This changes the behaviour of ctrlport_endpoint (the register interface for block controllers) to always check for an ACK after doing a poke or poll of any kind. Previously, the behaviour was to only check for an ACK if the policy was set that way, or if the user requested the ACK to be received. The problem with the former approach was that if many pokes were performed without ever requesting an ACK or a poll, the response queue would fill up without ever getting emptied, eventually draining the available heap space. Note that this is not a memory leak in the usual sense, as the response queue was correctly holding on to the response packets. With this change, ctrlport_endpoint::wait_for_ack() now receives a require_ack parameter. If it is false, the behaviour of wait_for_ack() is changed as follows: - If the response queue is empty, immediately return with an empty response payload object. - Otherwise, continue reading elements out of the response queue until it is either depleted (in which case the previous rule kicks in), or we find the ACK corresponding to the command previously sent out. Note that this replicates the corresponding behaviour in UHD 3 (see ctrl_iface_impl::wait_for_ack()).
Diffstat (limited to 'host/lib/rfnoc/fosphor_block_control_python.hpp')
0 files changed, 0 insertions, 0 deletions