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/rfnoc_common.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/rfnoc_common.hpp')
-rw-r--r-- | host/lib/include/uhdlib/rfnoc/rfnoc_common.hpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/host/lib/include/uhdlib/rfnoc/rfnoc_common.hpp b/host/lib/include/uhdlib/rfnoc/rfnoc_common.hpp index 4785949e7..c2ec4e0e3 100644 --- a/host/lib/include/uhdlib/rfnoc/rfnoc_common.hpp +++ b/host/lib/include/uhdlib/rfnoc/rfnoc_common.hpp @@ -36,6 +36,8 @@ constexpr size_t chdr_w_to_bits(chdr_w_t chdr_w) } } +//! Device ID Type +using device_id_t = uint16_t; //! Stream Endpoint Instance Number Type using sep_inst_t = uint16_t; //! Stream Endpoint Physical Address Type @@ -49,6 +51,8 @@ using sep_id_pair_t = std::pair<sep_id_t, sep_id_t>; //! Stream Endpoint Virtual Channel Type using sep_vc_t = uint8_t; +//! NULL/unassigned device ID +static constexpr device_id_t NULL_DEVICE_ID = 0; //! NULL/unassigned device address static constexpr sep_addr_t NULL_DEVICE_ADDR{NULL_DEVICE_ID, 0}; //! NULL/unassigned stream endpoint ID |