diff options
Diffstat (limited to 'host/lib/usrp/mpmd/mpmd_mboard_impl.cpp')
-rw-r--r-- | host/lib/usrp/mpmd/mpmd_mboard_impl.cpp | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/host/lib/usrp/mpmd/mpmd_mboard_impl.cpp b/host/lib/usrp/mpmd/mpmd_mboard_impl.cpp index ecf503f28..852ece5d3 100644 --- a/host/lib/usrp/mpmd/mpmd_mboard_impl.cpp +++ b/host/lib/usrp/mpmd/mpmd_mboard_impl.cpp @@ -207,11 +207,13 @@ boost::optional<device_addr_t> mpmd_mboard_impl::is_device_reachable( // 3) Check for network-reachable device // Note: This makes the assumption that devices will always allow RPC // connections on their CHDR addresses. - const std::vector<std::string> addr_keys = {"second_addr", "addr"}; + const std::vector<std::string> addr_keys = {"second_addr", "addr", "third_addr", "fourth_addr"}; + bool addr_key_found = false; for (const auto& addr_key : addr_keys) { if (not device_info_dict.count(addr_key)) { continue; } + addr_key_found = true; const std::string chdr_addr = device_info_dict.at(addr_key); UHD_LOG_TRACE("MPMD", "Checking reachability via network addr " << chdr_addr); try { @@ -247,6 +249,18 @@ boost::optional<device_addr_t> mpmd_mboard_impl::is_device_reachable( "MPMD", "Failed to reach device on network addr " << chdr_addr << "."); } } + if(!addr_key_found) + { + // 4) get_device_info didn't give us CHDR info + // This could be because the device isn't fully + // initialized (e.g. e31x with a power save FPGA). + // For UHD 4.0+, the mgmt interface will always + // route CHDR packets when fully initialized + // via Virtual NIC packet fowarding. + device_addr_t device_addr_copy = device_addr; + device_addr_copy["addr"] = rpc_addr; + return boost::optional<device_addr_t>(device_addr_copy); + } // If everything fails, we probably can't talk to this chap. UHD_LOG_TRACE( "MPMD", "All reachability checks failed -- assuming device is not reachable."); |