aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/usrp/mpmd
diff options
context:
space:
mode:
authormichael-west <michael.west@ettus.com>2021-02-06 14:34:19 -0800
committerAaron Rossetto <aaron.rossetto@ni.com>2021-02-11 07:16:48 -0600
commit13f1dc28f162c74cc0eac6673d3c12d5195238d1 (patch)
tree84ebc1d923efe5d6d61e035e7d17c2f236d29fb8 /host/lib/usrp/mpmd
parent910db73c9aa9446479f00a4e90521a213568bffa (diff)
downloaduhd-13f1dc28f162c74cc0eac6673d3c12d5195238d1.tar.gz
uhd-13f1dc28f162c74cc0eac6673d3c12d5195238d1.tar.bz2
uhd-13f1dc28f162c74cc0eac6673d3c12d5195238d1.zip
mpmd: Skip find if "resource" key is specified
MPM devices were being discovered when trying to locate PCIe connected devices. Adding filter to exclude them if the "resource" key is specified in the device address arguments. Replaces "lib: disable non pcie types in find with resource" to reduce impact to older devices and remove API change. Signed-off-by: michael-west <michael.west@ettus.com>
Diffstat (limited to 'host/lib/usrp/mpmd')
-rw-r--r--host/lib/usrp/mpmd/mpmd_find.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/host/lib/usrp/mpmd/mpmd_find.cpp b/host/lib/usrp/mpmd/mpmd_find.cpp
index 77f7486dd..5d5aab1ba 100644
--- a/host/lib/usrp/mpmd/mpmd_find.cpp
+++ b/host/lib/usrp/mpmd/mpmd_find.cpp
@@ -139,6 +139,9 @@ device_addrs_t mpmd_find_with_addrs(const device_addrs_t& hints)
device_addrs_t found_devices;
found_devices.reserve(hints.size());
for (const auto& hint : hints) {
+ if (hint.has_key("resource")) {
+ continue;
+ }
if (not(hint.has_key(xport::FIRST_ADDR_KEY) or hint.has_key(MGMT_ADDR_KEY))) {
UHD_LOG_DEBUG("MPMD FIND", "No address given in hint " << hint.to_string());
continue;
@@ -169,6 +172,9 @@ device_addrs_t mpmd_find_with_addrs(const device_addrs_t& hints)
device_addrs_t mpmd_find_with_bcast(const device_addr_t& hint)
{
device_addrs_t addrs;
+ if (hint.has_key("resource")) {
+ return addrs;
+ }
UHD_LOG_TRACE(
"MPMD FIND", "Broadcasting on all available interfaces to find MPM devices.");
std::vector<std::future<device_addrs_t>> task_list;
@@ -224,12 +230,6 @@ device_addrs_t mpmd_find(const device_addr_t& hint_)
return {};
}
}
- if (hint_.has_key_with_prefix("resource")) {
- UHD_LOG_TRACE(
- "MPMD FIND", "Returning early, PCIe is not support with mpm devices.");
- return {};
- }
-
UHD_LOG_TRACE("MPMD FIND", "Finding with " << hints.size() << " different hint(s).");
// Scenario 1): User gave us at least one address