aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Braun <martin.braun@ettus.com>2020-07-02 15:19:06 +0200
committermichael-west <michael.west@ettus.com>2020-07-09 00:39:11 -0700
commit5f79b8e3789247b74ce99a1a20c0158d77581688 (patch)
tree0dbc81558d1f8251fa56bb3ae2412572c9e97b06
parenta252a2f3d8ff70b9628d097dfcd99ac9935dbe33 (diff)
downloaduhd-5f79b8e3789247b74ce99a1a20c0158d77581688.tar.gz
uhd-5f79b8e3789247b74ce99a1a20c0158d77581688.tar.bz2
uhd-5f79b8e3789247b74ce99a1a20c0158d77581688.zip
docs: Add comments on mpm.conf
This adds some more details on mpm.conf, what it does, how it works, and which keys it accepts.
-rw-r--r--host/docs/configfiles.dox45
-rw-r--r--host/docs/configuration.dox22
-rw-r--r--mpm/python/usrp_mpm/prefs.py1
3 files changed, 66 insertions, 2 deletions
diff --git a/host/docs/configfiles.dox b/host/docs/configfiles.dox
index f32274e73..ae524bddf 100644
--- a/host/docs/configfiles.dox
+++ b/host/docs/configfiles.dox
@@ -44,7 +44,50 @@ ext_adc_self_test=1
~~~~
This will act as if this key/value pair had been passed to the device args
-directly.
+directly. This means the valid key/value pairs for the config files are the
+same as those for the device args (see \ref config_devaddr).
+
+\section configfiles_usrps_dpdk Configuring DPDK
+
+DPDK is a special case. Because there are so many things to configure for
+DPDK, it is highly recommended to use config files. The section headers for
+DPDK configurations depend on on the network device used, not the USRP device.
+For more details, see \ref dpdk_nic_config.
+
+\section configfiles_usrps_mpm Configuring MPM
+
+MPM devices (N3xx, E3xx) have their own configuration file (`mpm.conf`)
+which is read once during initialization of MPM. It controls different things
+than the `uhd.conf` file (both can be used for a session, but the UHD
+configuration will be used at every UHD session, whereas the MPM configuration
+file is only read once during MPM initialization). To reload the MPM
+configuration file, a restart of MPM is required.
+
+The `mpm.conf` files are structured a bit differently from `uhd.conf`, so here's
+an example:
+
+~~~~{.ini}
+; This section is for any MPM behaviour
+[mpm]
+; Default log level for journald, can be overwritten by -v when starting manually
+log_level=info
+; Number of log records to buffer for the next get_log_buf() API call
+log_buf_size=100
+
+; Device-specific behaviour is set here. This allows having the same file for
+; different device types, e.g., when a fleet of different devices are
+; managed via Salt or similar tools. The key here is the same as what you would
+; use in device args as a type value.
+[n3xx]
+KEY=VALUE
+
+; Alternatively, specify a product value.
+[n310]
+KEY=VALUE
+~~~~
+
+The key/value pairs for the `type` or `product` sections are documented
+in \ref config_mpm.
\section configfiles_location Location of configuration files
diff --git a/host/docs/configuration.dox b/host/docs/configuration.dox
index 333b90bdc..48b8cea59 100644
--- a/host/docs/configuration.dox
+++ b/host/docs/configuration.dox
@@ -37,7 +37,6 @@ and possible more options.
recover_mb_eeprom | Disable version checks. Can damage hardware. Only recommended for recovering devices with corrupted EEPROMs. | X3x0 | recover_mb_eeprom=1
skip_dram | Ignore DRAM FIFO block. Connect TX streamers straight into DUC or radio. | X3x0, N3xx | skip_dram=1
-
In addition, many of the streaming-related options can be set per-device at configuration time.
See \ref config_stream_args and \ref page_transport for more details.
@@ -261,5 +260,26 @@ simple examples of channel mappings with subdev specs:
USRP, this is a more versatile solution than setting the subdev globally to
`B:0`.
+\section config_mpm Device Configuration through MPM configuration files
+
+For more detail on how MPM is configured, see also \ref configfiles_usrps_mpm.
+
+The following key/value pairs are understood:
+
+ Key | Description | Supported Devices | Example Value
+---------------------|------------------------------------------------------------------------------|-------------------|---------------------
+ enable_gps | Enable/disable power to the GPSDO. | N3xx, E320 | enable_gps=0
+ enable_fp_gpio | Enable/disable power to the front-panel GPIOs. | N3xx, E320 | enable_fp_gpio=0
+ skip_boot_init | Don't init the device during MPM boot, but on the first UHD run. | N3xx | skip_boot_init=1
+ clock_source | Default clock source for this device (can be overridden by UHD). | N3xx, E320, E31x | clock_source=external
+ time_source | Default time source for this device (can be overridden by UHD). | N3xx, E320, E31x | time_source=external
+ rx_lo_source | Default source for the RX LO (can be overridden by UHD). | N310 | rx_lo_source=external
+ tx_lo_source | Default source for the TX LO (can be overridden by UHD). | N310 | tx_lo_source=external
+ pps_export | Default PPS export value (can be overridden by UHD). | N3xx | pps_export=0
+ forward_eth | Set forwarding policy for Ethernet packets | N3xx | forward_eth=1
+ forward_bcast | Set forwarding policy for broadcast packets | N3xx | forward_bcast=1
+ no_reload_fpga | Don't load an idle image after session terminates | E31x | no_reload_fpga=1
+ master_clock_rate | Default master clock rate (can be overridden by UHD) | N3xx, E320, E31x | master_clock_rate=1e6
+
*/
// vim:ft=doxygen:
diff --git a/mpm/python/usrp_mpm/prefs.py b/mpm/python/usrp_mpm/prefs.py
index 55b6d803d..eb0cec21b 100644
--- a/mpm/python/usrp_mpm/prefs.py
+++ b/mpm/python/usrp_mpm/prefs.py
@@ -34,6 +34,7 @@ class _MPMPrefs(configparser.ConfigParser):
Said dictionary needs to be compatible with the ConfigParser.read_dict()
API call (refer to the Python documentation).
"""
+ # Note: When changing this, you might also want to update host/docs/configfiles.dox
default_prefs = {
'mpm': {
'log_level': MPM_DEFAULT_LOG_LEVEL,