Commit graph

8 commits

Author SHA1 Message Date
Martin Braun
1383fde345 uhd: paths: Harmonize around XDG Base Directory specification
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
2020-04-02 12:36:20 -05:00
Martin Braun
876d4150aa uhd: Apply clang-format against all .cpp and .hpp files in host/
Note: template_lvbitx.{cpp,hpp} need to be excluded from the list of
files that clang-format gets applied against.
2020-03-03 08:51:32 -06:00
Aaron Rossetto
8fab267ea6 prefs: Output debug trace when config file cannot be located or loaded 2019-12-17 11:24:15 -08:00
Martin Braun
910ccc214d prefs: Set init_done flag to true after loading config files
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.
2019-12-05 09:51:32 -08:00
Alex Williams
07e04cd760 docs: Change DPDK version to 18.11 and make args use underscores
Swap out hyphens for underscores in the DPDK args. Also update list
of distributions with the correct DPDK version in the repos.
2019-11-26 12:21:33 -08:00
Alex Williams
ad2720d718 mpmd,transport,prefs: Add xport_mgr for dpdk_zero_copy
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.
2019-01-25 13:30:22 -08:00
Andrew Lynch
92a6c10979 lib: Fixing config file path for some Windows builds 2018-03-28 14:07:20 -07:00
Martin Braun
9fb055a78a lib: Add 'prefs' API
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
2018-02-20 16:23:46 -08:00