aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/include/uhdlib/rfnoc/mb_iface.hpp
diff options
context:
space:
mode:
authorAlex Williams <alex.williams@ni.com>2019-08-13 09:13:46 -0700
committerMartin Braun <martin.braun@ettus.com>2019-11-26 11:49:40 -0800
commita4274c19ebb42db112aa68a26fa499a52b9dd103 (patch)
tree5c29db76e72b00f5fc6247fce0752fae2abd2ddc /host/lib/include/uhdlib/rfnoc/mb_iface.hpp
parent81bd7896940dcd39181d0aee331e08abe4df1655 (diff)
downloaduhd-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/mb_iface.hpp')
-rw-r--r--host/lib/include/uhdlib/rfnoc/mb_iface.hpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/host/lib/include/uhdlib/rfnoc/mb_iface.hpp b/host/lib/include/uhdlib/rfnoc/mb_iface.hpp
index 1a06d44e2..abfc9d1c4 100644
--- a/host/lib/include/uhdlib/rfnoc/mb_iface.hpp
+++ b/host/lib/include/uhdlib/rfnoc/mb_iface.hpp
@@ -7,6 +7,7 @@
#ifndef INCLUDED_LIBUHD_MB_IFACE_HPP
#define INCLUDED_LIBUHD_MB_IFACE_HPP
+#include <uhd/transport/adapter_id.hpp>
#include <uhd/types/endianness.hpp>
#include <uhdlib/rfnoc/chdr_ctrl_xport.hpp>
#include <uhdlib/rfnoc/chdr_rx_data_xport.hpp>
@@ -66,6 +67,16 @@ public:
*/
virtual std::vector<device_id_t> get_local_device_ids() = 0;
+ /*! Return the uhd::transport::adapter_id for the link associated with
+ * \p local_device_id
+ *
+ * A transport must be created on the adapter before this will be valid.
+ * Since link_stream_managers always create a chdr_ctrl_xport on
+ * construction, the requirement is satisfied.
+ */
+ virtual uhd::transport::adapter_id_t get_adapter_id(
+ const device_id_t local_device_id) = 0;
+
/*! Reset the device
*/
virtual void reset_network() = 0;