aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/usrp/mpmd/mpmd_mboard_impl.cpp
Commit message (Collapse)AuthorAgeFilesLines
* mpmd: Release resources on destructionVirendra Kakade2019-05-211-3/+3
| | | | | This will clear the property tree, block registry, transport managers, and motherboard list on destruction of mpmd_impl.
* mpmd: Fix spurious reclaim call after unclaimVirendra Kakade2019-05-211-3/+6
| | | | | | | | | The reclaim task loop is asnychronous to the main thread which can result in spurious reclaim call to the device after unclaim has been called. This is especially risky if the device has already entered a non-serviceable state after unclaim e.g. idle state. Signed-off-by: Virendra Kakade <virendra.kakade@ni.com>
* mpmd: Allow reclaim failures on component updatesMartin Braun2019-02-221-12/+28
| | | | | | | | | | | | MPM has a flag that identifies component reloads as requiring to restart the RPC server. This change honours that flag, and doesn't cause a fatal failure when reclaims fail to ack for certain operations. For example, running uhd_image_loader on an N310 could fail after the FPGA was reloaded because the communication to the RPC server was temporarily interrupted. This is not always avoidable, since the RPC server does actually go down, and Ethernet connections might also be lost. So, we cut our losses and accept failures in that case.
* mpmd: implement get_*x_hintsTrung Tran2019-01-211-6/+9
| | | | Fix transport related arguments passed down the stack.
* uhd: mpm: apply clang-format to all filesBrent Stapleton2019-01-161-296/+220
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Applying formatting changes to all .cpp and .hpp files in the following directories: ``` find host/examples/ -iname *.hpp -o -iname *.cpp | \ xargs clang-format -i -style=file find host/tests/ -iname *.hpp -o -iname *.cpp | \ xargs clang-format -i -style=file find host/lib/usrp/dboard/neon/ -iname *.hpp -o -iname *.cpp | \ xargs clang-format -i -style=file find host/lib/usrp/dboard/magnesium/ -iname *.hpp -o -iname *.cpp | \ xargs clang-format -i -style=file find host/lib/usrp/device3/ -iname *.hpp -o -iname *.cpp | \ xargs clang-format -i -style=file find host/lib/usrp/mpmd/ -iname *.hpp -o -iname *.cpp | \ xargs clang-format -i -style=file find host/lib/usrp/x300/ -iname *.hpp -o -iname *.cpp | \ xargs clang-format -i -style=file find host/utils/ -iname *.hpp -o -iname *.cpp | \ xargs clang-format -i -style=file find mpm/ -iname *.hpp -o -iname *.cpp | \ xargs clang-format -i -style=file ``` Also formatted host/include/, except Cpp03 was used as a the language standard instead of Cpp11. ``` sed -i 's/ Cpp11/ Cpp03/g' .clang-format find host/include/ -iname *.hpp -o -iname *.cpp | \ xargs clang-format -i -style=file ``` Formatting style was designated by the .clang-format file.
* mpmd: increase claim_rpc call timeout.Trung Tran2019-01-141-3/+4
| | | | | | | | | | | 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.
* rpc,mpmd: replace all set_timeout() to new apiTrung Tran2019-01-141-33/+5
| | | | | Using new rpc client new API that ensure atomic setting of timeout on each rpc call.
* mpmd_impl: move timeout constants to headerTrung Tran2019-01-141-9/+0
|
* mpmd: Add set_timeout_init() API call to mpmd_mboard_implMartin Braun2018-07-181-2/+8
|
* mpmd: Use separate rpc connection for claim loopTrung N Tran2018-04-301-25/+44
| | | | | We need a separate RPC connection for the claim loop such that it is not blocked by other long executions of rpc calls.
* mpmd: tighten reclaiming time.Trung N Tran2018-04-021-2/+3
| | | | | Reclaming interval was exec_time(claim+dump_logs)+MPMD_RECLAIM_INTERNVAL; this change will MAX(exec_time(claim+dump_logs),MPM_RECLAIM_INTERVAL)
* mpmd: Fixed MPM marking wrong device as reachableBrent Stapleton2018-03-301-1/+12
| | | | | | | | During MPMd find routine, added a check when connecting to a CHDR interface to make sure we're talking to the correct device. Without this check MPMd would sometimes incorrectly mark a device as reachable because they shared an addr (ie. 192.168.10.2 existed on multiple devices).
* uhd: Update license headersMartin Braun2018-02-191-1/+1
| | | | | | | All copyright is now attributed to "Ettus Research, a National Instruments company". SPDX headers were also updated to latest version 3.0.
* mpmd: Fix compiler issuesMartin Braun2018-02-101-1/+1
| | | | | | - Initialization of device_addr_t from another using auto doesn't work across compilers - Moved MPMD_DISC_RESPONSE_PREAMBLE to mpmd_find where it belongs
* mpmd: Let 'find' via broadcast check for reachabilityMartin Braun2018-02-071-1/+124
| | | | | | | | | In particular, when running uhd_find_devices, this will limit the devices to ones that can actually be reached via CHDR. There is a new key, find_all, which allows finding all devices even those not reachable from UHD. Reviewed-by: Brent Stapleton <brent.stapleton@ettus.com>
* mpm/mpmd: Report device state using get_init_status() and verifyMartin Braun2018-01-161-0/+9
| | | | | | When trying to run init(), mpmd will first query the initialization status of the MPM device. If it is found to be in a bad state, it will not go forward with initialization, but instead print the error message.
* mpmd: Poll logs on claim and exitMartin Braun2018-01-101-0/+6
|
* mpmd: Add API to read back logs from device and send to native loggingMartin Braun2018-01-101-0/+66
|
* mpmd: Refactor device initialization for better parallelizabilityMartin Braun2018-01-081-16/+18
| | | | | | | | | | Note: This doesn't add any concurrency, rather, it changes the structure of the code to allow that. Notable changes: - All prop tree inits in one place - No access to containers in methods that might be run in parallel - Split initialization and claiming in mpmd_mboard_impl, calling ctor will no longer run the full initialization. - Added comments to identify parallelizable spots
* mpm: Increase RPC timeout during update_componentBrent Stapleton2018-01-051-0/+7
| | | | | | | Increases the host's timeout during update_component times, then resets it to the default RPC timeout after the call is complete. Reviewed-by: Martin Braun <martin.braun@ettus.com>
* mpmd: Allow user-overrides for MPM portsMartin Braun2018-01-041-1/+5
| | | | | | | Adds two device args: discovery_port and rpc_port. Both are integers which override the respective constants. Reviewed-by: Ashish Chaudhari <ashish.chaudhari@ettus.com>
* mpmd: Add latency measurement functionalityMartin Braun2018-01-041-1/+43
| | | | | | | | | | By adding measure_rpc_latency, mpmd_impl will run a ping command in a loop at initialization, and estimate average and maximum RPC command latency. Note that the ping() RPC call only does an internal logging call and returns its argument, so it is a very coarse approximation to how fast RPC latency is. Reviewed-by: Ashish Chaudhari <ashish.chaudhari@ettus.com>
* mpmd: Expose get_mtu() API to mpmd_mboard_impl and to prop treeMartin Braun2017-12-221-0/+5
|
* mpmd: Refactor MPM transport architecture, use managersMartin Braun2017-12-221-48/+82
| | | | | | | | | | | | | | This splits up the transport code in mpmd_impl across multiple classes to properly leverage the request_xport/commit_xport API in MPM. Different types of transport (UDP, liberio) use their own distinct classes, which are generated dynamically on request. This is a true refactoring despite the large amount of changes; there are no functional differences. Reviewed-By: Brent Stapleton <brent.stapleton@ettus.com> Reviewed-By: Trung Tran <trung.tran@ettus.com> Reviewed-By: Ashish Chaudhari <ashish.chaudhari@ettus.com>
* mpmd: More gracefully quite the reclaim loop on failureMartin Braun2017-12-221-1/+6
|
* mpmd: Bump init timeout to 120 seconds (sic)Martin Braun2017-12-221-1/+1
|
* mpmd: Bump initialization timeout to 45 secondsMartin Braun2017-12-221-1/+1
|
* mpmd: Use the get_last_error feature from the RPC clientMartin Braun2017-12-221-2/+5
| | | | | The RPC client will now query the MPM server for details when an error occured.
* mpmd: added support for the skip_init key in the device argsBrent Stapleton2017-12-221-0/+5
| | | | Adding skip_init to the device args makes it so rfnoc blocks, etc. are not initialized.
* mpm/mpmd: Dboard info is now stored in mboard info; refactored initializationMartin Braun2017-12-221-37/+71
|
* mpmd/mpm/n310: Added clock and time source APIsMartin Braun2017-12-221-0/+4
|
* mpm/mpmd: Call init() during UHD session init, not on hwd spawnMartin Braun2017-12-221-7/+32
|
* mpm/mpmd: Allow SID increment; more fixes for multi-usrp operationMartin Braun2017-12-221-10/+14
|
* mpmd: Explicitly unclaim devices on destructionMartin Braun2017-12-221-1/+7
|
* rpc: Changed API to request/notify for better distinction between the twoMartin Braun2017-12-221-6/+7
|
* mpm/mpmd: Further improvements on multi-device operationsMartin Braun2017-12-221-11/+39
| | | | | | | - Crossbar local addr is now written during initialization of UHD session - Support for multiple crossbars per device (at least on UHD side) - Crossbars are now sequentially given a unique address
* mpmd: Refactored code to allow multi-device initializationMartin Braun2017-12-221-0/+111