aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/utils/prefs.cpp
Commit message (Collapse)AuthorAgeFilesLines
* uhd: paths: Harmonize around XDG Base Directory specificationMartin Braun2020-04-021-4/+24
| | | | | | | | | | | | | | | | | | | | | | Up until now, we completely ignore the XDG specification. This commit does the following to change that: - It uses XDG_DATA_HOME and XDG_CONFIG_HOME for cal and config data, respectively. - If config data is in ~/.uhd/uhd.conf, that is still accepted, but if it conflicts with $XDG_CONFIG_HOME/uhd.conf, it is ignored and a warning is displayed - The default location for cal data is thus ${HOME}/.local/share/uhd/cal on Unix, and %LOCALAPPDATA%\uhd\cal on Windows. This is a change in location! - The UHD_CONFIG_DIR environment variable was confusingly named and is now removed. It provided an alternative location than the home directory. The same purpose is now much better served by XDG_DATA_HOME and XDG_CONFIG_HOME. The specification can be found here: specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html
* uhd: Apply clang-format against all .cpp and .hpp files in host/Martin Braun2020-03-031-71/+55
| | | | | Note: template_lvbitx.{cpp,hpp} need to be excluded from the list of files that clang-format gets applied against.
* prefs: Output debug trace when config file cannot be located or loadedAaron Rossetto2019-12-171-7/+13
|
* prefs: Set init_done flag to true after loading config filesMartin Braun2019-12-051-0/+1
| | | | | | | The prefs API is supposed to load the config files once, and stash them away for the process to consume at will. Because the init_done is never set, it will read the config files every time it's asked for them. This is usually not a problem, but it causes the logging output to be messy.
* docs: Change DPDK version to 18.11 and make args use underscoresAlex Williams2019-11-261-1/+1
| | | | | Swap out hyphens for underscores in the DPDK args. Also update list of distributions with the correct DPDK version in the repos.
* mpmd,transport,prefs: Add xport_mgr for dpdk_zero_copyAlex Williams2019-01-251-11/+34
| | | | | | | | | | | | | | | | | | | | | | | Add configuration sections to the UHD config file for NIC entries. Keys are based on MAC addresses, and the entries beneath the section describe which CPU and I/O thread to use for the NIC and its IPv4 address. Make ring sizes configurable for uhd-dpdk. Ring size is now an argument for packet buffers. Note that the maximum number of available buffers is still determined at init! Add ability to receive broadcasts to uhd-dpdk. This is controllable by a boolean in the sockarg during socket creation. dpdk_zero_copy will filter broadcast packets out. Add dpdk_simple transport (to mirror udp_simple). This transport allows receiving from broadcast addresses, but it only permits one outstanding buffer at a time. Fix IP checksum handling in UHD-DPDK. TX checksums were not being calculated in the NIC, and in RX, the check for IP checksums allowed values of zero (reported as none). Now packets with bad IP checksums will be dropped.
* lib: Fixing config file path for some Windows buildsAndrew Lynch2018-03-281-0/+1
|
* lib: Add 'prefs' APIMartin Braun2018-02-201-0/+101
This defines and reads configuration files that can be used to customize UHD's behaviour. On Unix systems, they default to: /etc/uhd/uhd.conf $APPDATA/.uhd/uhd.conf On Windows systems, it will look in: %ProgramData%/uhd/uhd.conf %AppData%/.uhd/uhd.conf