From d89149a84ffc1cf2cd39d4e64d9793a2c1bb38af Mon Sep 17 00:00:00 2001 From: Trung Tran Date: Fri, 11 Jan 2019 10:11:12 -0800 Subject: 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. --- host/lib/usrp/mpmd/mpmd_mboard_impl.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'host/lib/usrp/mpmd/mpmd_mboard_impl.cpp') 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("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)) -- cgit v1.2.3