diff options
author | Alex Williams <alex.williams@ni.com> | 2019-08-13 09:13:46 -0700 |
---|---|---|
committer | Martin Braun <martin.braun@ettus.com> | 2019-11-26 11:49:40 -0800 |
commit | a4274c19ebb42db112aa68a26fa499a52b9dd103 (patch) | |
tree | 5c29db76e72b00f5fc6247fce0752fae2abd2ddc /host/lib/include/uhdlib/rfnoc/link_stream_manager.hpp | |
parent | 81bd7896940dcd39181d0aee331e08abe4df1655 (diff) | |
download | uhd-a4274c19ebb42db112aa68a26fa499a52b9dd103.tar.gz uhd-a4274c19ebb42db112aa68a26fa499a52b9dd103.tar.bz2 uhd-a4274c19ebb42db112aa68a26fa499a52b9dd103.zip |
rfnoc: Use adapter_id_t for balancing load across links
Since the mb_iface allocates local device IDs, also have it track
the associated adapter IDs and provide a facility to retrieve them.
Incorporate the adapter IDs in the user API to select the adapter
for streamers.
Diffstat (limited to 'host/lib/include/uhdlib/rfnoc/link_stream_manager.hpp')
-rw-r--r-- | host/lib/include/uhdlib/rfnoc/link_stream_manager.hpp | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/host/lib/include/uhdlib/rfnoc/link_stream_manager.hpp b/host/lib/include/uhdlib/rfnoc/link_stream_manager.hpp index 72f1cf1c7..b1a934891 100644 --- a/host/lib/include/uhdlib/rfnoc/link_stream_manager.hpp +++ b/host/lib/include/uhdlib/rfnoc/link_stream_manager.hpp @@ -7,11 +7,12 @@ #ifndef INCLUDED_LIBUHD_RFNOC_LINK_STREAM_MANAGER_HPP #define INCLUDED_LIBUHD_RFNOC_LINK_STREAM_MANAGER_HPP +#include <uhd/transport/adapter_id.hpp> +#include <uhdlib/rfnoc/chdr_rx_data_xport.hpp> #include <uhdlib/rfnoc/client_zero.hpp> #include <uhdlib/rfnoc/ctrlport_endpoint.hpp> #include <uhdlib/rfnoc/epid_allocator.hpp> #include <uhdlib/rfnoc/mb_iface.hpp> -#include <uhdlib/rfnoc/chdr_rx_data_xport.hpp> #include <functional> #include <memory> #include <set> @@ -26,6 +27,9 @@ namespace uhd { namespace rfnoc { * and thus, the host's device_id_t uniquely identifies the host-side transport adapter * to use for packet transmission/reception. * + * For convenience, the link_stream_manager also provides a method to get the + * host's transport adapter ID directly. + * * There must be one instance of this class per logical link. */ class link_stream_manager @@ -37,10 +41,16 @@ public: /*! \brief Get the software device ID associated with this instance * - * \return A vector of addresses for all reachable endpoints + * \return The software device ID associated with this instance */ virtual device_id_t get_self_device_id() const = 0; + /*! \brief Get the transport adapter ID associated with this instance + * + * \return The adapter ID associated with this instance + */ + virtual uhd::transport::adapter_id_t get_adapter_id() const = 0; + /*! \brief Get all the endpoints reachable from this link * * \return A vector of addresses for all reachable endpoints |