Handle and use Linux capabilities, logging improvements, cleanup, documentation
This MR is somewhat a successor to !1812 (closed) in that it can allow the softmodem(s) (tested: 5G) to run without root privileges. However, no explicit option is necessary to do this. More generally, in this MR we check for some capabilities (notably, SYS_NICE) and handle some errors (for NET_ADMIN) to allow this. However, the scope of this MR is wider, in that it attempts to make use and handle Linux capabilities (see capabilities(7)), in particular for containerized workloads. More concretely:
- Remove many attempts to change or workarounds around host system configuration:
- Remove
set_latency_target()
, which sets DMA latency target and modifies CPU scaling, and page locking: this might not be allowed or possible inside a container - Remove attempt to change kernel socket buffer sizes in RFsim, and put it into documentation
- don't check for fedora (completely unclear why)
- Remove
- Handle capabilities, and harmonize code:
- check for SYS_NICE (either via
libcap
, or a workaround if not present) and only change thread affinity/priority if present -> allows gNB to run without privileges, UE partially - handle missing
IPC_LOCK
gracefully (but print a warning) - handle problems with
NET_ADMIN
(interface creation, configuration) gracefully instead of stopping softmodem -> allows UE and gNB to run without privileges - use
threadCreate()
withOAI_PRIORITY_RT
consistently in (n)FAPI code
- check for SYS_NICE (either via
- Correctly set capabilities in all docker-compose files
- Add documentation on:
- performance tuning and capabilities
- physical simulators (not directly linked to this MR, but still)
- Cleanup and fixes:
- Reduce amount of useless logging from ITTI, config, utils for threading, RFsim, L1
- fix a bug in CI where the wrong image might be used for unit tests
Labels 5G-NR and 4G-LTE because while the focus is on 5G, there is common code with 4G as well
Follow-up work will go into better define, configure, and document threads (notably ITTI, RLC, PDCP).