Commit Graph
146 Commits
Author SHA1 Message Date
Laurent THOMAS e54738c7e4 flush command line printf, it is called before log module initialisation 2025-10-30 11:53:57 +01:00
Robert Schmidt cdbfaf835e params_yaml has no dependency on UTIL
These libraries have no dependencies on UTIL, so it's better to omit it.
However, then the test is missing symbols for the config (which likely,
indirectly came through UTIL -> LOG -> CONFIG_LIB, so add it now onto
the test.
2025-09-29 09:04:02 +02:00
Robert Schmidt 197705f232 Provide T headers via log.h
It seems that many compilation units include T.h through the config
module (as evidenced when taking out T.h from
config_load_configmodule.h). This is strange, because T.h is only used
in the logging headers. Hence, move it to there, where it is used.
2025-09-29 09:04:02 +02:00
Laurent THOMAS 278d2cbca1 fix several not tested malloc or calloc return value 2025-09-09 18:04:26 +02:00
Robert Schmidt 89e6e53f8c Remove --emulate-rf option and corresponding code
With the RFemulator, there is no need for a dedicated --emulate-rf
option anymore. For all uses of --emulate-rf, RFemulator should be used
instead.
2025-08-21 10:53:03 +02:00
Robert Schmidt a4b4fbe96b Merge remote-tracking branch 'origin/fixes-itti-gtp-config' into integration_2025_w24 (!3473)
Fix various bugs and inconsistencies in config read, SCTP, ITTI, GTP

Fix bugs across various layers, mostly layer 3, including memory leaks.
See the commits for more details.
2025-06-11 18:36:39 +02:00
Robert Schmidt 0f78aade97 Remove useless printf in config reading
This printf just shows which config sections are being read, but this
has no useful information for a user. It was introduced in 7731f5bd2d
but was not present prior to this commit, either.
2025-06-10 18:00:49 +02:00
Robert Schmidt db663d124b Merge remote-tracking branch 'origin/yaml-config-fixes' into integration_2025_w24 (!3466)
YAML related updates

- Add common function config_common_getdefault
- Handle exceptions from the yaml-cpp library, transform them into
  understandable errors written to stderr
- Add some unit tests.
2025-06-10 15:02:42 +02:00
Bartosz Podrygajlo 5cb1113674 Handle YAML Exceptions 2025-06-05 12:55:41 +02:00
Bartosz Podrygajlo c1c4c65a93 Unify setting default parameters in config libraries
Add common function config_common_getdefault
2025-06-05 12:54:05 +02:00
Cedric Roux 93d9abd9b8 increase max number of check values
This will be needed for NR RLC and NR PDCP parameters.
2025-06-05 08:58:07 +02:00
Bartosz Podrygajlo 5354ad8a26 Add support for TYPE_IPV4ADDR in yaml config module 2025-05-15 11:20:10 +02:00
Guido Casati 7731f5bd2d Introduce macros to get parameters in gnb_config.c
* this commit introduces macro to reduce redundant code in gNB configuration
2025-04-15 15:27:38 +02:00
ndomingues b92af6b6be Implementation of TYPE_INT8 in config_yaml.cpp file 2025-03-20 18:13:12 +01:00
Robert Schmidt a7d0e609ed config module: check that memory is enough, allow more restarts
A later commit implements the "restart" of the L1. The L1 reads
configuration options. First, allow to re-read configurations by
increasing the amount of memory the config module might allocate. Then,
avoid an out-of-bound write by checking that we still have memory
available (and assert if not possible).
2024-12-16 16:16:44 +01:00
Bartosz Podrygajlo 08279ab9f6 Align return value of config_yaml_get to libconfig implementation
Now return value should be equal to number of processed input parameters like
in params_libconfig.
2024-12-02 15:26:39 +01:00
Bartosz Podrygajlo b6b377ffc0 Align YAML config getlist with libconfig implementation
This aligns the behavior of params_yaml with params_config library so that
when a mapping is read using getlist it returns the number of elements in
the mapping instead of 0.
2024-12-02 13:32:19 +01:00
Robert Schmidt 85e198b178 Config module: use printf_params() to print log messages 2024-10-29 09:37:10 +01:00
Bartosz Podrygajlo e086334a08 Update yaml-cpp dependency handling
- Added CPM fallback in case package is not found automatically.
 - Using yaml-cpp::yaml-cpp target instead of yaml-cpp to silence deprecation
   warnings on newer cmake versions.
2024-10-28 18:02:34 +01:00
Bartosz Podrygajlo 65f14490c3 Remove additional unnecessary includes 2024-09-26 15:07:35 +02:00
Bartosz Podrygajlo 9b59ba6326 Enable configuration of NR UE through a YAML file
This commit adds yaml-cpp library to required docker images and build commands. There is one workaround
in cross-compilation for apt behavior for installing libyaml-cpp-dev. Apt will uninistall previous
versions of the package whenever another one is installed. This means that installing the arm version
breaks amd version and vice versa. This makes it impossible to have both libs installed at the same
time which is required by the cross-compilation build command (it calls cmake twice, once with native
and once with target architecture)
2024-09-06 08:34:18 +02:00
Bartosz Podrygajlo 0b684732ee YAML as a drop-in replacement for libconfig
This commit introduces a substitute module library for setting up softmodems using YAML instead of libconfig.
The softmodems should work the same with both types of files. Extra care was put to make sure the behavior
of both modules is the same.

Example yaml config files were added for the UE and gNB
2024-09-06 08:33:10 +02:00
Robert Schmidt 32d9e75dc5 Remove --nokrnmod option, as we never use the kernel anyway 2024-08-01 18:22:46 +02:00
Bartosz Podrygajlo dc91550e2c Remove unused flag single_thread_flag from softmodems. 2024-07-18 09:31:29 +02:00
Robert Schmidt 7a8b2fe4a9 config module: print clear error when config file does not exist
Print a clear error if a config file does not exist (unclear previously,
when the user would get a confusing, unspecific, "file I/O error" on
line 0)

I tried to free the memory that had been allocated at that point, and
verified that using the address sanitizer. Nevertheless, the function
does too much, and is too complicated for refactoring.
2024-06-03 12:37:33 +02:00
Robert Schmidt b9fd5a6f75 config module: make it less verbose 2024-06-03 12:37:33 +02:00
Thomas Schlichter 5ac881b7c1 rfsimulator: add support to simulate a long propagation delay
Add the option `--rfsimulator.prop_delay` to specify the simulated receive-path (gNB: UL, UE: DL) propagation delay in ms.
This option can be used e.g. to simulate a simple GEO satellite channel by specifying `--rfsimulator.prop_delay 238.74` to both, the gNB and the UE.

This is part of the work developed by Fraunhofer IIS within the ESA-funded project 5G-GOA (https://connectivity.esa.int/projects/5ggoa).
2024-05-07 20:46:37 +02:00
Robert Schmidt c114d2f547 Fix memory sanitizer warning: uninitialized read
Memsan complains that uninitialized reads originate because of these
warnings. Most of the corresponding variables are actually read into
through by libconfig; nevertheless, initializing them should not have a
bad side-effect (because the initialized value is overwritten).
2024-04-18 14:16:09 +02:00
francescomani b30c9c8f3c uselessAssignmentPtrArg 2024-04-09 16:55:51 +02:00
francescomani 8404da759f nullPointerRedundantCheck 2024-04-09 16:55:51 +02:00
Laurent THOMAS 63b64d4fce move common code file in common directory
remove several unused files
remove mem_block_t that is never used in a different way than a simple heap buffer
move up IP address type and remove duplications of the same struct declaration
2023-12-19 10:37:10 +01:00
Robert Schmidt 610a886da7 Merge remote-tracking branch 'origin/multi-config' into integration_2023_w44 2023-11-12 05:14:36 +01:00
Laurent THOMAS f50d5f5a9b make multiple config instead of one implicit global 2023-11-10 10:23:11 +01:00
mir e0ff84f67c Scan build: Argument with 'nonnull' attribute passed null 2023-10-31 11:53:42 +01:00
Laurent THOMAS bba9aac079 fix most of doxygen warnings and errors 2023-10-26 16:47:19 +02:00
Robert Schmidt ca96b9e9bf Improve and reformat documentation of config module 2023-08-18 13:02:18 +02:00
Robert Schmidt ff4c48f952 Align all configuration structs, and guard them to not be formatted with clang-format 2023-03-09 19:01:47 +01:00
francescomani 2385bc364a fixing most warning when compiling nr-softmodem 2023-03-09 19:01:46 +01:00
frtabu 21b3484e02 Initial web server implementation 2022-11-30 11:34:54 +01:00
laurent bc95466e1e fix check error in config module, for array types 2022-09-06 13:50:38 +02:00
laurent d6d4d87e0b code review comments 2022-08-18 16:43:26 +02:00
laurent 8b159d6ddc remove unclear function free_configmodule(), as we have end_configmodule() that do the same 2022-08-18 09:47:44 +02:00
frtabu 983c956b77 Fix config module memory leaks 2022-08-16 17:58:55 +02:00
laurent 65b399fcd7 fix bugs in config module and config usage
fix bug from this MR

fix bug from this MR

stupid-mistake
2022-08-16 09:22:15 +02:00
Robert Schmidt 00e058537d Remove MSC library, it is not used anywhere 2022-01-27 10:53:07 +01:00
Laurent Thomas 1eb1c17f0c merge develo 2022-01-19 16:46:46 +01:00
hardy ec286386dc Merge remote-tracking branch 'origin/NR-LogsSanAddrFix' into integration_2022_wk02 2022-01-12 14:27:00 +01:00
Laurent THOMAS b4b457345d merge develop 2022-01-10 12:49:47 +01:00
frtabu e4d3bf9f41 Fixes after MR 1257 1225: sanitize address error introduced in ldpctest when using alternatives ldpc libraries and LOG flooding introduced in nrUE. Also improved openCL ldpc library build 2022-01-04 15:15:09 +01:00
Laurent THOMAS 764ec5a234 improve log header 2021-12-26 15:44:10 +01:00