From a4274c19ebb42db112aa68a26fa499a52b9dd103 Mon Sep 17 00:00:00 2001 From: Alex Williams Date: Tue, 13 Aug 2019 09:13:46 -0700 Subject: 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. --- host/lib/include/uhdlib/rfnoc/link_stream_manager.hpp | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'host/lib/include/uhdlib/rfnoc/link_stream_manager.hpp') 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 +#include #include #include #include #include -#include #include #include #include @@ -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 -- cgit v1.2.3