aboutsummaryrefslogtreecommitdiffstats
path: root/host
diff options
context:
space:
mode:
authorWade Fife <wade.fife@ettus.com>2021-11-15 17:15:53 -0600
committerAaron Rossetto <aaron.rossetto@ni.com>2021-12-08 12:09:39 -0800
commit551e1588ba2119a7a984f3482caff4fb1822c908 (patch)
tree6e95ec7331f5b22ebdbea21d05a9b5b5929e1d33 /host
parentc1465e606e01a5d11f87c32ab6adc171ff3cb619 (diff)
downloaduhd-551e1588ba2119a7a984f3482caff4fb1822c908.tar.gz
uhd-551e1588ba2119a7a984f3482caff4fb1822c908.tar.bz2
uhd-551e1588ba2119a7a984f3482caff4fb1822c908.zip
rfnoc: Add ops pending to management op
The ops pending for each operation was stored implicitly in the data structure. This adds it explicitly, which is useful for debugging and packet dissection.
Diffstat (limited to 'host')
-rw-r--r--host/include/uhd/rfnoc/chdr_types.hpp12
-rw-r--r--host/lib/rfnoc/chdr_types.cpp3
2 files changed, 12 insertions, 3 deletions
diff --git a/host/include/uhd/rfnoc/chdr_types.hpp b/host/include/uhd/rfnoc/chdr_types.hpp
index ceeb8d12a..7b64bc9a0 100644
--- a/host/include/uhd/rfnoc/chdr_types.hpp
+++ b/host/include/uhd/rfnoc/chdr_types.hpp
@@ -700,12 +700,19 @@ public:
}
};
- mgmt_op_t(const op_code_t op_code, const payload_t op_payload = 0)
- : _op_code(op_code), _op_payload(op_payload)
+ mgmt_op_t(const op_code_t op_code, const payload_t op_payload = 0,
+ const uint8_t ops_pending = 0)
+ : _op_code(op_code), _op_payload(op_payload), _ops_pending(ops_pending)
{
}
mgmt_op_t(const mgmt_op_t& rhs) = default;
+ //! Get the ops pending for this transaction
+ inline uint8_t get_ops_pending() const
+ {
+ return _ops_pending;
+ }
+
//! Get the op-code for this transaction
inline op_code_t get_op_code() const
{
@@ -730,6 +737,7 @@ public:
private:
op_code_t _op_code;
payload_t _op_payload;
+ uint8_t _ops_pending;
};
//! A class that represents a single management hop
diff --git a/host/lib/rfnoc/chdr_types.cpp b/host/lib/rfnoc/chdr_types.cpp
index aea76dbc4..d5600c1dd 100644
--- a/host/lib/rfnoc/chdr_types.cpp
+++ b/host/lib/rfnoc/chdr_types.cpp
@@ -450,7 +450,8 @@ void mgmt_hop_t::deserialize(std::list<uint64_t>& src,
uint64_t op_word = conv_byte_order(src.front());
ops_remaining = static_cast<size_t>(op_word & 0xFF);
mgmt_op_t op(static_cast<mgmt_op_t::op_code_t>((op_word >> 8) & 0xFF),
- static_cast<uint64_t>((op_word >> 16)));
+ static_cast<uint64_t>((op_word >> 16)),
+ static_cast<uint8_t>(op_word & 0xFF));
_ops.push_back(op);
src.pop_front();
for (size_t i = 0; i < padding_size; i++) {