diff options
author | Trung Tran <trung.tran@ettus.com> | 2019-01-11 10:11:12 -0800 |
---|---|---|
committer | Brent Stapleton <brent.stapleton@ettus.com> | 2019-01-14 09:43:56 -0800 |
commit | d89149a84ffc1cf2cd39d4e64d9793a2c1bb38af (patch) | |
tree | 5b9669e8797872dd5724ccdd7a0076d6343de3c3 /host/lib/usrp/mpmd/mpmd_mboard_impl.cpp | |
parent | a8ac2016ee18e37bddbde05bf299c97a896a7f56 (diff) | |
download | uhd-d89149a84ffc1cf2cd39d4e64d9793a2c1bb38af.tar.gz uhd-d89149a84ffc1cf2cd39d4e64d9793a2c1bb38af.tar.bz2 uhd-d89149a84ffc1cf2cd39d4e64d9793a2c1bb38af.zip |
mpmd: increase claim_rpc call timeout.
During certain RPC calls (e.g. update_component), the MPM RPC server is
slow to respond to reclaim requests, which can causes RPC timeouts.
These changes fix those timeouts.
By setting the reclaiming timeout to twice the timeout of an RPC call,
we have some margin for error on the host side, while not affecting the
underlying claiming logic in MPM. The loop should still operate on a 5
second period, but now has more leeway during stressful conditions.
Diffstat (limited to 'host/lib/usrp/mpmd/mpmd_mboard_impl.cpp')
-rw-r--r-- | host/lib/usrp/mpmd/mpmd_mboard_impl.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/host/lib/usrp/mpmd/mpmd_mboard_impl.cpp b/host/lib/usrp/mpmd/mpmd_mboard_impl.cpp index fe92f132e..a49651f10 100644 --- a/host/lib/usrp/mpmd/mpmd_mboard_impl.cpp +++ b/host/lib/usrp/mpmd/mpmd_mboard_impl.cpp @@ -193,7 +193,8 @@ namespace { */ uhd::rpc_client::sptr make_mpm_rpc_client( const std::string& rpc_server_addr, - const uhd::device_addr_t& mb_args + const uhd::device_addr_t& mb_args, + const size_t timeout_ms = MPMD_DEFAULT_RPC_TIMEOUT ){ return uhd::rpc_client::make( rpc_server_addr, @@ -201,7 +202,7 @@ namespace { uhd::mpmd::mpmd_impl::MPM_RPC_PORT_KEY, uhd::mpmd::mpmd_impl::MPM_RPC_PORT ), - MPMD_DEFAULT_RPC_TIMEOUT, + timeout_ms, uhd::mpmd::mpmd_impl::MPM_RPC_GET_LAST_ERROR_CMD); } @@ -305,7 +306,7 @@ mpmd_mboard_impl::mpmd_mboard_impl( ) : mb_args(mb_args_) , rpc(make_mpm_rpc_client(rpc_server_addr, mb_args_)) , num_xbars(rpc->request<size_t>("get_num_xbars")) - , _claim_rpc(make_mpm_rpc_client(rpc_server_addr, mb_args_)) + , _claim_rpc(make_mpm_rpc_client(rpc_server_addr, mb_args, MPMD_CLAIMER_RPC_TIMEOUT)) // xbar_local_addrs is not yet valid after this! , xbar_local_addrs(num_xbars, 0xFF) , _xport_mgr(xport::mpmd_xport_mgr::make(mb_args)) |