diff options
author | Martin Braun <martin.braun@ettus.com> | 2022-05-12 16:18:17 +0200 |
---|---|---|
committer | Aaron Rossetto <aaron.rossetto@ni.com> | 2022-06-10 13:24:04 -0500 |
commit | f9327a4a400269769329512ac145a4b845b480e6 (patch) | |
tree | 54a22d1eb03605297068e14cbd2931683645ff7f | |
parent | e040326c51e3f67e70fd59a1eba244d6180abb47 (diff) | |
download | uhd-f9327a4a400269769329512ac145a4b845b480e6.tar.gz uhd-f9327a4a400269769329512ac145a4b845b480e6.tar.bz2 uhd-f9327a4a400269769329512ac145a4b845b480e6.zip |
rfnoc: Fix register_xport_hop_cfg_fns() usage
Note: This function is currently unused. However, it is not correctly
implemented. During init, it would call the routing configuration
function instead of the init configuration function.
-rw-r--r-- | host/lib/include/uhdlib/rfnoc/mgmt_portal.hpp | 11 | ||||
-rw-r--r-- | host/lib/rfnoc/mgmt_portal.cpp | 4 |
2 files changed, 11 insertions, 4 deletions
diff --git a/host/lib/include/uhdlib/rfnoc/mgmt_portal.hpp b/host/lib/include/uhdlib/rfnoc/mgmt_portal.hpp index dcb93772b..46ff96b4d 100644 --- a/host/lib/include/uhdlib/rfnoc/mgmt_portal.hpp +++ b/host/lib/include/uhdlib/rfnoc/mgmt_portal.hpp @@ -197,10 +197,17 @@ public: //! Define custom configuration functions for custom transports // - // \param xport_type The type of the custom transport + // The intention of this is to allow adding custom management operations to + // be inserted for specific types of transports. For example, if IPv4 + // transport adapters were to require additional Ethernet-specific routing + // information, this function could add more configuration packets specific + // to this purpose. + // + // \param xport_type The type of the custom transport (e.g. '1' for IPV4, + // see rfnoc_xport_types.vh for a list of valid values). // \param init_hop_cfg_fn The function to call when initializing the custom xport // \param rtcfg_hop_cfg_fn The function to call when configuring routing for the - // custom xport + // custom xport // virtual void register_xport_hop_cfg_fns(uint8_t xport_subtype, xport_cfg_fn_t init_hop_cfg_fn, diff --git a/host/lib/rfnoc/mgmt_portal.cpp b/host/lib/rfnoc/mgmt_portal.cpp index 56160ae82..d800b4b38 100644 --- a/host/lib/rfnoc/mgmt_portal.cpp +++ b/host/lib/rfnoc/mgmt_portal.cpp @@ -1031,8 +1031,8 @@ private: // Functions case node_type::NODE_TYPE_XPORT: { uint8_t node_subtype = static_cast<uint8_t>(node.extended_info & 0xFF); // Run a hop configuration function for custom transports - if (_rtcfg_cfg_fns.count(node_subtype)) { - _rtcfg_cfg_fns.at(node_subtype)( + if (_init_cfg_fns.count(node_subtype)) { + _init_cfg_fns.at(node_subtype)( node.device_id, node.inst, node_subtype, init_hop); } else { // For a generic transport, just advertise the transaction to the |