Compare commits

...

6068 Commits

Author SHA1 Message Date
Bartosz Podrygajlo
fe7bad3c35 Use cmake to enable a C/C++ compiler warning in a subdirectory 2026-03-03 18:16:53 +01:00
Robert Schmidt
46b7670672 Merge branch 'integration_2026_w09' into 'develop'
Integration `2026.w09`

* !3944 Fail early if configuration module can not initialize properly
* !3945 gNB: Reset NDI only after usage in case of disable HARQ
* !3822 NR UE: fix PRACH k1 calculation at MAC when handover
* !3874 print better message for rsrp: invalid doesn't mean it is not measures, it...
* !3928 NR UE: correctly compute writeTimestamp for SCS > 30 kHz with rf-simulator
* !3949 fix: removed the nssai_sd parameter in the ue.conf file
* !3897 Change Aerial config file in targets to match Nvidia's CI setup
* !3951 Fix handling of IPv4v6 PDU sessions
* !3940 IPV6 support for telnet socket binding
* !3947 Add missing packing for CONFIG.request parameter BetaPSS
* !3871 Support for up to 12 ports in NR gNB
* !3943 Remove L1 dependence from NR band number
* !3892 Synchronize multiple gNBs by aliging their the slot boundaries
* !3952 Fixes for Initial UE Context Setup
* !3953 Improvements in compilation dependence
* change dl_absoluteFrequencyPointA in targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.24PRB.usrpb210.conf to 640032
* !3900 [CI] Pull Ubuntu base image from internal registry
* !3910 GPU Channel Simulation: nr_dlsim/nr_ulsim Integration + CI Test
* !3942 CI: rework log analysis to simplify and allow new use cases
* !3870 Configure CSI-RS according to beam_id used by UE

Closes #897 and #834

See merge request oai/openairinterface5g!3950
2026-02-27 08:41:22 +00:00
Jaroslava Fiedlerova
6f9e624193 Merge remote-tracking branch 'origin/config_csi_beam' into integration_2026_w09 (!3870)
Configure CSI-RS according to beam_id used by UE

This MR is to configure CSI-RS according to beam_id used by UE and
reconfigure upon beam change.

It has been tested with RFSIM, Liteon and Microamp under multiple beams.
2026-02-26 22:43:19 +01:00
Jaroslava Fiedlerova
f12b8cb44d Merge remote-tracking branch 'origin/ci-rework-logs' into integration_2026_w09 (!3942)
CI: rework log analysis to simplify and allow new use cases

The CI has some log analysis, but it is unmaintainable (huge functions
that mix eNB/gNB or lteUE/nrUE, are not tested, most of it is not used
or useful...) or limited to specific use cases (the timing-phytest time
analysis is hardcoded to source builds instead of also handling analysis
when running from docker images). This MR reimplements both functions.
For the log analysis, the CI team decided to throw away the old
analysis, and reimplement a mechanism that checks the couple of things
we care for.

- Allow to analyze phy-test timing analysis from docker files, and add a
  unit test
- Rework existing log analysis to remove useless checks, and make it
  more composable
  * The undeployment steps (Undeploy_Object(), Terminate_eNB()) take an
    <analysis> XML object which then either has a <services> subelement
    with check that are whitespace delimited (similar to how other xml
    task steps have <services>). For checks that contain whitespace,
    they can use <service> (singular) that encodes a single check, such
    that e.g., arguments could include spaces.
  * Each check is of form service=check[=arguments], where service is
    the docker services, check is a checking function (implemented as a
    class with run(file, options) function inside cls_loganalysis.py,
    and options arguments after the second = that is to be read by run()
    (basically, options will contain arguments that can be freeform)
  * these definitions can occur multiple times, e.g., it could be
    serviceA=Check1 and serviceA=Check2=Args and it will execute both
    Check1 and Check2
  * if a service is declared, it will execute alse the Default check
    which currently checks for an assertion
  * Implemented (and inspired from the existing CI analysis) are:
    - Default check to check for assertions (will be extended, to e.g.,
      address/undefined behavior sanitizer analysis)
    - RetxCheck: retransmission check as used in the CI
    - LastLineContains to check the last line containes a specific
      string
    - ContainsString to check a specific string appears in logs
    - EndsWithBye: check that towards the end (but not necessarily the
      last line), there is a Bye. string (a workaround since we don't
      always terminate with 0)
- There is a plan to use return codes after stopping in docker, but most
  executables do not end with 0 most of the time, such that we needed to
  abandon this plan.
- Additional fixes (see commit messages) and delete unused code
2026-02-26 22:39:29 +01:00
Jaroslava Fiedlerova
3eabd5363a Merge remote-tracking branch 'origin/multipath-testing-ci-physim' into integration_2026_w09 (!3910)
GPU Channel Simulation: nr_dlsim/nr_ulsim Integration + CI Test

This MR is a follow-up to !3886 (merged) and extends CUDA-based channel
simulation support to nr_dlsim and nr_ulsim, together with the
corresponding CI tests.

The MR incorporates:

- Cherry-picked commits e0c204f7 and 5f344876 from !3588
- Integration of new CI physim tests using GPU-accelerated channel
simulation in nr_dlsim and nr_ulsim tests, see commit c727b3bb

New CI job: RAN-Channel-Simulation
https://jenkins-oai.eurecom.fr/job/RAN-Channel-Simulation/
2026-02-26 22:38:15 +01:00
Jaroslava Fiedlerova
da28708459 CI: Add config files for phytest with 7.2 2026-02-26 17:34:07 +00:00
Mario Joa-Ng
f51f5d1f6e Get ssb_index using UE_beam_index under different beam_mode correctly. 2026-02-26 18:20:58 +01:00
Mario Joa-Ng
a77ba75b10 Configure CSI-RS according to beam_id used by UE and reconfigure upon beam change.
No need to call get_config_srs() anymore in update_cellGroupConfig_for_BWP_switch().
2026-02-26 18:20:25 +01:00
Jaroslava Fiedlerova
0a437db57c CI: Add physim tests with CUDA channel simulation 2026-02-26 17:03:54 +00:00
Robert Schmidt
e7360679f4 Merge remote-tracking branch 'origin/pull-noble-internal' into integration_2026_w09 (!3900)
[CI] Pull Ubuntu base image from internal registry

This MR updates the Docker build process for OAI images to use a private
registry for the Ubuntu base image ubuntu:noble. This will reduce the
possibility for CI disruption if no internet connection exists.

  - Replace FROM ubuntu:noble with FROM <DEFAULT_REGISTRY>/ubuntu:noble in Ubuntu Dockerfiles

This change overcomes the pull rate limit issues from DockerHub in the
CI.

The <DEFAULT_REGISTRY> contains a multi-architecture image (arm64 and
amd64)

    $ docker buildx imagetools inspect gracehopper3-oai.sboai.cs.eurecom.fr/ubuntu:noble | grep Platform
      Platform:  linux/amd64
      Platform:  linux/arm64

- The scripts run from the jenkins server everyday using a crontab.
- It pulls the AMD and ARM ubuntu:noble image on respective servers and
  checks if the internal registry is in sync.
- If not, it pushes the ubuntu:noble image to the registry to remain in
  sync with dockerhub.
2026-02-26 16:52:44 +01:00
Robert Schmidt
af19e6bce8 Fix dl_absoluteFrequencyPointA in config file
Analogously to other files under ci-scripts/.
2026-02-26 16:51:58 +01:00
Robert Schmidt
378d3a7a6b Add AnalyzeRTStatsObject() XML step 2026-02-26 14:17:28 +01:00
Robert Schmidt
c6bb50edb1 Add LogAnalysis in all XML files
I try to retain/match the previous log checks, without adding new
checks.
2026-02-26 14:17:28 +01:00
Robert Schmidt
5165834051 Introduce EndsWithBye log analysis check
It was initially foreseen to just check the program exit code, but most
executables don't return with 0 (so the CI would always fail). Add a
separate check that will check for the Bye., only going through the last
X lines instead of the entire file.
2026-02-26 14:17:28 +01:00
Robert Schmidt
735058f5c4 New log-analysis checker LastLineContains 2026-02-26 14:17:28 +01:00
Robert Schmidt
366df408a1 Default checker: check for assertions 2026-02-26 14:17:28 +01:00
Robert Schmidt
30a27432f0 Remove unused logging and unused imports 2026-02-26 14:17:28 +01:00
Robert Schmidt
707cb560d5 Implement retransmission checker, include unit test 2026-02-26 14:17:28 +01:00
Robert Schmidt
fe464ec6d0 Initial code for log analysis
- we agreed to basically throw away the old log checker (as it is
  unmaintainable)
- now: provide list of analysis to do
  * all checkers in cls_log_analysis, can be unit tested (see also next
    commit)
  * looked up dynamically to simplify adding of new tests + config
  * configured with

      <analysis>
        <services>DESCRIPTION [DESCRIPTION...]</services>
        <service>DESCRIPTION</service>
        ...
      </analysis>

    where DESCRIPTION follows service=func[=options]:
    - service is name of service to check
    - func is function to call, which receives filename
    - option are arbitary options to pass to func
    <services> is whitespace delimited (so can take multiple service
    analysis definitions)
    <service> exists to allow service definitions with whitespace
    changes that would not work in <services>
- I initially planned to check return code, but most softmodems actually
  exit with non-zero return code, so this is still TODO
- Default analyzer (checking for assertions, ...) is always run if a
  service is listed
- checks for file size
- add unit tests
2026-02-26 14:17:28 +01:00
Robert Schmidt
03f56c10e7 GetDeployedServices(): return container ID
will be relevant to get the return code in the next commit.
2026-02-26 13:39:39 +01:00
Robert Schmidt
2e85f67646 Remove air_interface: it's not used 2026-02-26 13:39:39 +01:00
Robert Schmidt
9e35799ca6 Remove X2HO eNBmbmsEnables variables
- it is spaghetti code: difficult to understand which code paths are
  taken
- the only effect seems to be in the UE log analysis function: it might
  make the log fail. However, we test that iperf is successful
  (Iperf2_Unidir()), and would detect before the log analysis if MBMS
  traffic does not work
- the rest is only messages that likely nobody reads

The real reason for this change is to reduce the number of class members
in the ran.py class, to simplify the functioning of the eNB analysis
function (no self) to reduce dependencies on the ran.py class.
2026-02-26 13:39:39 +01:00
Robert Schmidt
65dab3e027 Add unit test phytest analysis 2026-02-26 13:39:39 +01:00
Robert Schmidt
e809841aea Move Real-Time Stats Analysis to separate step
Factor out to make existing log analysis simpler. It will also allow to
more easily port this functionality to docker-based setups.
2026-02-26 13:39:39 +01:00
Robert Schmidt
41a6188c04 Change bash set options to improve run_locally.sh
set -e makes the script exit on error. However, there is code to handle
a non-zero return code of the script, and -e prevents from writing the
footer.

add set -x to see all the commands that are being executed.
2026-02-26 13:39:39 +01:00
Robert Schmidt
44ad255195 Remove unused USRP_IPAddress 2026-02-26 13:39:39 +01:00
Robert Schmidt
92997fba2b Update tests/README.md 2026-02-26 13:39:39 +01:00
Robert Schmidt
4a2f6cd823 Remove unused docker file 2026-02-26 13:39:39 +01:00
Robert Schmidt
84a49886d8 Move unused configs to untested 2026-02-26 13:39:39 +01:00
Robert Schmidt
cc1d663190 Remove unused code in args_parse.py 2026-02-26 13:39:39 +01:00
Robert Schmidt
7fe3183d1e Remove dead code 2026-02-26 13:39:39 +01:00
Robert Schmidt
0b219bf443 Fix invalid escape sequences
Use a raw string as suggested:

    ci-scripts/cls_static_code_analysis.py:93: SyntaxWarning: invalid escape sequence '\:'
      result = re.search('([a-zA-Z0-9\:\-\.\/])+\.git', self.ranRepository)
    ci-scripts/cls_static_code_analysis.py:125: SyntaxWarning: invalid escape sequence '\.'
      ret = re.search('cppcheck version="(?P<version>[0-9\.]+)"', str(line))
    ci-scripts/cls_oai_html.py:221: SyntaxWarning: invalid escape sequence '\/'
      cmd = "sed -i -e 's/__STATE_" + self.htmlTabNames[0] + "__/<span class=\"glyphicon glyphicon-remove\"><\/span>/' test_results.html"
    ci-scripts/ran.py:428: SyntaxWarning: "\[" is an invalid escape sequence. Such sequences will not work in the future. Did you mean "\\["? A raw string is also an option.
      result = re.search('\[gNB [0-9]+\]\[RAPROC\] PUSCH with TC_RNTI 0x[0-9a-fA-F]+ received correctly, adding UE MAC Context RNTI 0x[0-9a-fA-F]+', str(line))
    ci-scripts/ran.py:457: SyntaxWarning: "\[" is an invalid escape sequence. Such sequences will not work in the future. Did you mean "\\["? A raw string is also an option.
      result = re.search('\[PHY\]\s+problem receiving samples', str(line))
    ci-scripts/ran.py:461: SyntaxWarning: "\[" is an invalid escape sequence. Such sequences will not work in the future. Did you mean "\\["? A raw string is also an option.
      result = re.search('\[MAC\]\s+Removing UE', str(line))
2026-02-26 13:39:39 +01:00
Robert Schmidt
3a9fdb674a Shorten logging output to time
I am not sure we ever need the millisecond output. The date is typically
also clear from the output (we could print the date at the beginning,
once, instead, but this is not done here. Finally, in Jenkins, we
typically get time stamps. Thus, it's not necessary to print this by
default.

On the other hand, since it might be useful when running locally, make
time stamps in logs configurable.
2026-02-26 13:39:39 +01:00
Robert Schmidt
e1b7e91f8a Use nocolor in various CI pipelines 2026-02-26 13:39:39 +01:00
Jaroslava Fiedlerova
a6bf72e895 Fix compilation
Fix compilation error:
/oai-ran/openair1/SIMULATION/NR_PHY/dlsim.c:932:42: error: variable 'h_channel_coeffs' set but not used [-Werror,-Wunused-but-set-variable]
  932 |                                   float *h_channel_coeffs = NULL;
      |                                          ^
2026-02-26 11:32:14 +00:00
Jaroslava Fiedlerova
c32d881be8 doc: Add instructions about dlsim/ulsim with cuda channel simulation 2026-02-26 11:32:14 +00:00
Jaroslava Fiedlerova
864d378a25 nr_ulsim: add -f option to support feature flags (e.g. CUDA)
- Introduce usage of the -f option in ulsim to allow enabling specific
  feature flags at runtime.
- Add support for the "cuda" flag to enable CUDA channel simulation when
  compiled with CUDA support. If an unsupported flag is provided, nr_ulsim
  reports an error.
2026-02-26 11:32:13 +00:00
Nika Ghaderi
afc52abb8a Integrate CUDA Channel Pipeline into UL Simulator
This commit integrates the GPU-based channel simulation pipeline into
the ulsim.

A `--cuda` command-line flag is added to enable the GPU path at
runtime. When activated, the simulator will:
- Allocate all necessary GPU and pinned host memory via the
  `init_cuda_chsim_buffers` helper function.
- In the main simulation loop, call the `run_channel_pipeline_cuda`
  function to perform the channel simulation on the GPU, bypassing the
  CPU-based functions.
- Clean up all CUDA resources on exit using the
  `free_cuda_chsim_buffers` helper.
The cpu path is also updated to use multipath_channel_float and add_noise_float.
2026-02-26 11:32:13 +00:00
Jaroslava Fiedlerova
de3dfee0c2 nr_dlsim: add -f feature flag support and remove unused SCG handling
- Replace previous handling of -f with a generic feature flag option.
- Add support for the "cuda" flag to enable CUDA channel simulation when
  compiled with ENABLE_CUDA.
- Remove unused SCGroupConfig file handling (scg_fd) and related code.
- Clean up deprecated code and variables associated with SCG reading - not
  required anymore after b232be94ed
2026-02-26 11:32:09 +00:00
Robert Schmidt
96a465c02b Merge remote-tracking branch 'origin/compil_improv' into integration_2026_w09 (!3953)
Improvements in compilation dependence

Once more I ended up in a long trip inside OAI intricate compilation
2026-02-26 11:01:24 +01:00
Robert Schmidt
10c26a79a5 Link log_headers to ldpc_aal to also force build of T headers 2026-02-26 11:00:37 +01:00
francescomani
e9cef10491 other small minor cleanup 2026-02-26 11:00:37 +01:00
francescomani
fd69dc0823 include license header in nr_prs.c 2026-02-26 11:00:37 +01:00
francescomani
a35c272e04 improvements in NR_REFSIG headers 2026-02-26 11:00:37 +01:00
francescomani
8c4fe047d0 remove some LTE dependence in NR files 2026-02-26 11:00:37 +01:00
francescomani
d6759b35d2 remove unnecessary gNB DLSCH header in UE dlsch demodulation 2026-02-26 11:00:37 +01:00
francescomani
96bc3a0ee9 remove unnecessary defs_gNB from LTE files 2026-02-26 11:00:37 +01:00
francescomani
4447d67650 remove unnecessary gNB header dependence in coding files 2026-02-26 11:00:37 +01:00
Robert Schmidt
4f7cd88e4c Merge remote-tracking branch 'origin/fixes-initial-context-setup' into integration_2026_w09 (!3952)
Fixes for Initial UE Context Setup

This MR fixes DRB aggregation from E1 so DRBs from multiple PDU sessions
are appended correctly into the F1 DRB array instead of overwriting
existing entries. It also makes NGAP Initial Context Setup skip PDU
sessions that are already established for the UE, only setting up new
sessions.

DRB aggregation from E1: Adjust fill_drb_to_be_setup_from_e1_resp to
pass &drbs[nb_drb] into fill_f1_drbs_from_e1, ensuring DRBs from later
PDU sessions are appended after the current count.

Duplicate PDU sessions in NGAP Initial Context Setup: In
rrc_gNB_process_NGAP_INITIAL_CONTEXT_SETUP_REQ, detect requested PDU
session IDs that already exist with PDU_SESSION_STATUS_ESTABLISHED, log
a warning, and skip them so they are not added to UE->initial_pdus.
2026-02-26 10:59:54 +01:00
Robert Schmidt
433bd7be3f Merge remote-tracking branch 'origin/multi_gNB_sync' into integration_2026_w09 (!3892)
Synchronize multiple gNBs by aligning the slot boundaries

Currently, we derive frame and slot number based on proc->timestamp_rx
using

    proc->frame_rx = (proc->timestamp_rx / (fp->samples_per_subframe*10))&1023;
    proc->tti_rx = get_slot_from_timestamp(proc->timestamp_rx, fp);

This ignores the samples

    proc->timestamp_rx % fp->samples_per_frame

while computing the frame and slot number creating a mis-alignment with
the slot boundaries. A detailed description of the slot misalignment
in a pictorial representation can be seen in an attachment in the MR [1].

We fix this alignment issue by compensating these samples during the
first reception.

We can test the synchronization of the multiple gNBs from the estimated
ToAs from the PRS in the Downlink and the estimated ToAs from the SRS in
the Uplink using rfsim.

In order to test this, make sure you build gNB and nrUE along with the
telnetsrv flag using the option --build-lib telnetsrv.

Also, enable the following log in the function
nr_est_srs_timing_advance_offset() in
openair1/PHY/NR_ESTIMATION/nr_measurements_gNB.c to observe SRS ToAs

    LOG_I(NR_PHY, "SRS estimatd ToA %d [RX ant %d]: TA offset %d, TA offset ns %d (max_val %ld, mean_val %ld, max_idx %d)\n", srs_toa, ant, *ta_offset, *ta_offset_nsec, max_val, mean_val, max_idx);

Furthermore, update the option Active_gNBs = 2; in
targets/PROJECTS/GENERIC-NR-5GC/CONF/ue.nr.prs.fr1.106prb.conf to enable
decoding PRS transmitted from two gNBs

To run:

nrUE:

    sudo ./nr-uesoftmodem -r 106 --numerology 1 --band 78 -C 3619200000 --uicc0.imsi 001010000000001 --rfsim --phy-test -O ../../../targets/PROJECTS/GENERIC-NR-5GC/CONF/ue.nr.prs.fr1.106prb.conf --rfsimulator.serveraddr server

gNB 0:

    sudo ./nr-softmodem -O ../../../targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb0.prs.band78.fr1.106PRB.usrpx310.conf --gNBs.[0].min_rxtxtime 6 --rfsim --phy-test --rfsimulator.[0].serveraddr 127.0.0.1 --rfsimulator.[0].options chanmod --rfsimulator.[0].modelname AWGN --telnetsrv

gNB 1:

    sudo ./nr-softmodem -O ../../../targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb1.prs.band78.fr1.106PRB.usrpx310.conf --gNBs.[0].min_rxtxtime 6 --rfsim --phy-test --rfsimulator.[0].serveraddr 127.0.0.1 --rfsimulator.[0].options chanmod --rfsimulator.[0].modelname AWGN --telnetsrv

When we run the nrUE, gNB0 and gNB1, we can see the following logs

nrUE:

    [PHY] [gNB 0][rsc 0][Rx 0][sfn 976][slot 2] DL PRS ToA ==> 0.0 / 2048 samples, peak channel power -16.4 dBm, SNR +4.0 dB, rsrp -42.2 dBm
    [PHY] [gNB 1][rsc 0][Rx 0][sfn 976][slot 3] DL PRS ToA ==> 0.0 / 2048 samples, peak channel power -16.4 dBm, SNR +4.0 dB, rsrp -42.2 dBm

gNB 0:

    [NR_PHY] SRS estimatd ToA 0 [RX ant 0]: TA offset 31, TA offset ns 0 (max_val 99820162, mean_val 80176, max_idx 0)

gNB 1:

    [NR_PHY] SRS estimatd ToA 0 [RX ant 0]: TA offset 31, TA offset ns 0 (max_val 98784562, mean_val 79369, max_idx 0)

From the above logs, when we run the rfsim and when no delays introduced, we can observe the following results

In the Downlink at the UE, the estimated ToAs using PRS from both gNB0
and gNB1 are 0 and in the uplink, the ToA estimated from the SRS
transmitted by the UE at both the gNBs are also 0. This indicates that
both the gNBs are synchronized along with their slot boundaries. We also
highlight that this is not the case in the current develop branch since
the slot boundaries are not aligned.

We also can test the multi gNB synchronization by introducing delays
using telnet as follows,

Introduce new_offset (delay) of 4 samples to the gNB 0 from UE in the
uplink as follows,

    openairinterface5g$ echo rfsimu setdistance rfsimu_channel_enB0 20 | ncat --idle 1 127.0.0.80 9080
    softmodem_gnb> rfsimu_setdistance_cmd: new_offset 4, new (exact) distance 19.518 m, new delay 0.000065 ms
    Ncat: Idle timeout expired (1000 ms).

We can oberve this delay of 4 samples being reflected in the estimated
SRS ToAs at gNB 0 while not changing the ToA in gNB 1

    [NR_PHY] SRS estimatd ToA 4 [RX ant 0]: TA offset 31, TA offset ns 65 (max_val 98803636, mean_val 79430, max_idx 8)

similarly, Introduce new_offset (delay) of 2 samples to the gNB 1 from
UE in the uplink as follows,

    openairinterface5g$ echo rfsimu setdistance rfsimu_channel_enB0 10 | ncat --idle 1 127.0.0.81 9081
    softmodem_gnb> rfsimu_setdistance_cmd: new_offset 2, new (exact) distance 9.759 m, new delay 0.000033 ms
    Ncat: Idle timeout expired (1000 ms).

We can oberve this delay of 2 samples being reflected in the estimated
SRS ToAs at gNB 1 while not changing the ToA in gNB 0

    [NR_PHY] SRS estimatd ToA 2 [RX ant 0]: TA offset 31, TA offset ns 32 (max_val 98962768, mean_val 79552, max_idx 4)

Closes #897

[1] https://gitlab.eurecom.fr/oai/openairinterface5g/-/merge_requests/3892
2026-02-26 08:42:47 +01:00
Robert Schmidt
6715464b3a Merge remote-tracking branch 'origin/band_number_improv' into integration_2026_w09 (!3943)
Remove L1 dependence from NR band number

L1 band information relied on get_band function that couldn't provide an
unambiguous result. Also there is no SCF compliant parameter for L1 and
generally we don't really need that information in L1.

The MR also remove a RU section that used nr_band but was never really
accessed in NR.
2026-02-26 08:42:16 +01:00
Robert Schmidt
d81bda5760 Merge remote-tracking branch 'origin/NR_more_than_4_antennas' into integration_2026_w09 (!3871)
Support for up to 12 ports in NR gNB
2026-02-26 08:41:16 +01:00
Robert Schmidt
d3f851127e Merge remote-tracking branch 'origin/fix_config_request_beta_pss_tlv' into integration_2026_w09 (!3947)
Add missing packing for CONFIG.request parameter BetaPSS

Adds the packing procedure for the parameter BetaPSS, as well as adding this
parameter to the utility functions where it is missing
2026-02-26 08:40:49 +01:00
Robert Schmidt
6dc7c4fe60 Merge remote-tracking branch 'mahmoudb/telnet-IPV6-support' into integration_2026_w09 (!3940)
IPV6 support for telnet socket binding

Now, the listening telnet socket is only bound to the dedicated interface IPs in
config file, both for V4 and V6

Closes #834
2026-02-26 08:40:19 +01:00
Jaroslava Fiedlerova
cde53141be Merge remote-tracking branch 'origin/fix-handling-ipv4v6-pdu-sess' into integration_2026_w09 (!3951)
Fix handling of IPv4v6 PDU sessions

The code previously checked that the supplied PDU sessions's type is
exactly what we requested. However, at least OAI 5GC will only give us
an IPv4 PDU session if we request IPv4v6 (so the check would fail).

Extend the validation to either check exact match, or, if IPv4v6
requested, that it is either IPv4 or IPv6.
2026-02-25 18:50:33 +01:00
francescomani
2bd3685d6b add check for input number of antennas to be compliant with NB_ANTENNAS_TX and NB_ANTENNAS_RX 2026-02-25 16:26:21 +01:00
Robert Schmidt
cdfe069c34 Remove unused cmake macros 2026-02-25 16:26:21 +01:00
Robert Schmidt
bb72c4d057 Fix alignment problem in nr_dlsim
Fix error

    openair1/SIMULATION/NR_PHY/dlsim.c:1057:37: runtime error: member access within misaligned address 0x7f8a67e01010 for type 'struct NR_Sched_Rsp_t', which requires 32 byte alignment
2026-02-25 16:26:21 +01:00
Robert Schmidt
1b619bed03 Remove unused sched_response_id 2026-02-25 16:26:21 +01:00
Robert Schmidt
5b9d4550ba Remove unused defines 2026-02-25 16:26:21 +01:00
Robert Schmidt
0ea119ec39 Align t_nrPolar_params allocation to 32 bytes 2026-02-25 16:26:21 +01:00
Robert Schmidt
448f273248 Write NB_ANTENNAS_RX/TX to header file and use in stack
Prior to this commit, constants NB_ANTENNAS_RX/TX are provided on the
command line to each compiler invocation. This has the drawback (1) that
also files that don't need that get the constants, and (2) it is not
easy to find them using ctags or similar, as the only definition is in
CMakeLists.txt (where it is not found).

In this commit, use cmake configure_file() to write a header file with
these constants. The file will be generated during cmake invocation, and
written to <build-dir>/common/cmake_defs.h. The relevant files that
need this definition will pick it from the header.

This has been used previously also in a commit to write git information.

See-also: 8bffd1666d ("Avoid complete rebuild on cmake run with git info change")
2026-02-25 16:26:21 +01:00
francescomani
0a79dce24b configuration of PUCCH2 PRB number depending on antenna ports 2026-02-25 16:26:07 +01:00
Behrad Mahmoudi
7f8e0b2cd5 Now, the listening telnet socket is only bound to the dedicated interface IPs in config file, both for V4 and V6 2026-02-25 14:53:32 +01:00
francescomani
862f84bb68 remove band from frame parameters and get_band function not used anymore 2026-02-25 14:32:03 +01:00
francescomani
3c2853e1c0 remove RU functios gated by has_ctrl_prt parameter never set in NR code 2026-02-25 14:32:03 +01:00
francescomani
8180a5db03 remove L1 nr_band dependence in frame parameters 2026-02-25 14:31:58 +01:00
Jaroslava Fiedlerova
68ecf9f860 Merge remote-tracking branch 'origin/aerial-targets-config' into integration_2026_w09 (!3897)
Change Aerial config file in targets to match Nvidia's CI setup and modify tutorial
2026-02-25 14:12:13 +01:00
francescomani
5ed309166b use FAPI field to set SSB case from upper layers 2026-02-25 12:43:10 +01:00
Rúben Soares Silva
f66a7b2108 Add SSB Case V3 vendor extension TLV to CONFIG.request pack/unpack and to utility functions 2026-02-25 12:43:10 +01:00
Robert Schmidt
0219e4d3c7 Remove band number from openair0_config_t 2026-02-25 12:43:10 +01:00
francescomani
530b692208 simplified version of to_nrarfcn function to remove not necessary checks for band consistency 2026-02-25 12:43:07 +01:00
Guido Casati
3f4b72df67 Handle duplicate PDU sessions in NGAP InitialContextSetup
Ensure the CU-CP only sets up PDU sessions that are not already
established for the UE, skipping duplicates while keeping the NG UE
context valid. This aligns with 3GPP TS 38.413 PDU Session setup
semantics for duplicate session IDs

Changes:
- Change rrc_gNB_process_NGAP_INITIAL_CONTEXT_SETUP_REQ to scan requested
  PDU sessions and detect IDs that already exist in UE->pduSessions with
  PDU_SESSION_STATUS_ESTABLISHED
- Log a warning and skip already established PDU session IDs so they are
  not added to UE->initial_pdus
- Collect only non-established PDU sessions into a temporary stack array,
  allocate UE->initial_pdus with the exact count, copy them in, update
  UE->n_initial_pdu, and only refresh UE AMBR when there is at least one
  session to set up
2026-02-25 09:50:27 +01:00
Rakesh Mundlamuri
af438ef5e5 Handover doc: mention ssb_PositionsInBurst_Bitmap config 2026-02-25 08:58:33 +01:00
Robert Schmidt
4e9a853696 Fix ssb_PositionsInBurst_Bitmap to work with slot-synchronization
Since the grand-parent commit, if possible, the gNBs synchronize on a
slot-level boundary. Some configuration files/command line overrides
left the same SSB position for two DUs in RFsim-based handover
scenarios, which then makes that the UE cannot decode the SSB.

This commit changes the positions such that this is possible again. In
the F1 HO docker-compose
(ci-scripts/yaml_files/5g_f1_rfsimulator/docker-compose.yaml), we set it
to 2 to send only one SSB (not 2 with bitmap 3).
2026-02-25 07:58:57 +01:00
Guido Casati
dae251ddcb Fix DRB array offset when aggregating E1 DRBs
Ensure DRBs from multiple PDU sessions are appended into the F1 DRB array
without overwriting previously filled entries.

Update fill_drb_to_be_setup_from_e1_resp to call fill_f1_drbs_from_e1
with &drbs[nb_drb] so each PDU session’s DRBs are written after the
current count
2026-02-24 12:55:24 +01:00
Jaroslava Fiedlerova
800b238492 Merge remote-tracking branch 'origin/fix-ueconf-nssaisd' into integration_2026_w09 (!3949)
fix: removed the nssai_sd parameter in the ue.conf file

Following the tutorial in the RF simulator, the PDU session cannot
be established because the  Slice Differentiator to request(nssai_sd)
parameter in the ue.conf file is 1(integer) but in the documentation
the default value of the nssai_sd is 0xFFFFF(meaning "no SD")

Now the nssai_sd parameter is removed in the ue.conf to establish the
PDU session.
2026-02-24 10:44:56 +01:00
Jaroslava Fiedlerova
71041877fd Merge remote-tracking branch 'origin/nrue_write_timestamp_fix' into integration_2026_w09 (!3928)
NR UE: correctly compute writeTimestamp for SCS > 30 kHz with rf-simulator

Contains also two minor cleanups for nr-ue.c:
- make fp point to constant NR_DL_FRAME_PARMS where possible
- use c16_t type for I/Q sample arrays
2026-02-24 10:43:58 +01:00
Jaroslava Fiedlerova
b8ac4869c5 Merge remote-tracking branch 'origin/fix-rsrp-range' into integration_2026_w09 (!3874)
print better message for rsrp: invalid doesn't mean it is not measured

print better message for rsrp: invalid doesn't mean it is not measured,
it means it is out of usable range
2026-02-24 10:40:55 +01:00
Jaroslava Fiedlerova
a628cd9602 Merge remote-tracking branch 'origin/fix-ue-ho-msg1fdm' into integration_2026_w09 (!3822)
NR UE: fix PRACH k1 calculation at MAC when handover

The k1 for PRACH calculation in config_common_ue() should be the same as in
config_common_ue_sa(), otherwise k1 is wrong when handover to target cell if
msg1-FDM not 0 in reconfigurationWithSync.

Verified with 3rd-party gNB.
2026-02-24 10:39:51 +01:00
Robert Schmidt
933984fab1 Fix handling of IPv4v6 PDU sessions
The code previously checked that the supplied PDU sessions's type is
exactly what we requested. However, at least OAI 5GC will only give us
an IPv4 PDU session if we request IPv4v6 (so the check would fail).

Extend the validation to either check exact match, or, if IPv4v6
requested, that it is either IPv4 or IPv6.
2026-02-24 08:37:36 +01:00
Robert Schmidt
90bf723eae nr-uesoftmodem: end with Bye.
Similarly to gNB, eNB, lteUE, end with a "Bye." that the CI (will) check
for.

The right way to do this would be to use the exit code, but most
executables do not actually end with 0, such that we need to check for
this. Thus, this commit is only to harmonize with other executables.
2026-02-24 08:24:02 +01:00
aswanthkc
ac9232d6fc fix: updated the nssai_sd paramter in the ue.conf file
Following the tutorial in the RF simulator, the PDU session cannot
be established because the  Slice Differentiator to request(nssai_sd)
parameter in the ue.conf file is 1(integer) but in the documentation
the default value of the nssai_sd is 0xFFFFF(meaning "no SD")

Now the nssai_sd parameter is removed in the ue.conf to establish the
PDU session.
2026-02-23 10:36:52 -05:00
Shubhika Garg
0a9c3a07eb ci: Pull ubuntu:noble image from our internal docker registry to build ubuntu images
- This is to overcome the issue of pull rate limits from DockerHub
        - Make Ubuntu base image configurable via build-arg
2026-02-23 16:34:06 +01:00
Nika Ghaderi
5fb9a9c665 Integrate CUDA Channel Pipeline into DL Simulator
This commit integrates the CUDA-based channel simulation pipeline into
the nr_dlsim.

A new `--cuda` command-line flag is added to enable the GPU path at
runtime. When activated, the simulator will:
- Allocate all necessary GPU and pinned host memory via the new
  `init_cuda_chsim_buffers` helper function.
- In the main simulation loop, call the `run_channel_pipeline_cuda`
  function to perform the channel simulation on the GPU, bypassing the
  CPU-based functions.
- Clean up all CUDA resources on exit using the
  `free_cuda_chsim_buffers` helper.
Additionally, dlsim is now using the float version of channel_multipath and add_noise functions.
Also, The input data is formatted as interleaved IQ, with separate antennas to ensure a fair comparison with the GPU operation.
2026-02-23 13:14:26 +00:00
Laurent THOMAS
59aed14153 print better message for rsrp: invalid doesn't mean it is not measures, it means it is out of usable range 2026-02-23 13:00:09 +01:00
Laurent THOMAS
66efe92551 separate report list from each report as a table of struct instead of a struct of tables 2026-02-23 13:00:09 +01:00
Jaroslava Fiedlerova
b5634c6615 Merge remote-tracking branch 'origin/NR_fix_ndi_reset' into integration_2026_w09 (!3945)
gNB: Reset NDI only after usage in case of disable HARQ

Solves this warnings seen in the UE trace:
NDI indicates re-transmission but computed TBS 3968 doesn't match with what previously stored 3368

Issue happens only if feature disable_harq is enabled. GNB resets the harq
process (including NDI) as PUCCH will not be sent for this harq process, but
before the harq process is used in DCI payload preparation.

Fix is to reset the harq process after harq process in case of no PUCCH.
2026-02-23 10:19:53 +01:00
Jaroslava Fiedlerova
10ac7a2711 Merge remote-tracking branch 'origin/fail-early-no-config' into integration_2026_w09 (!3944)
Fail early if configuration module can not initialize properly

In the case that the config module cannot load the driver for libconfig or yaml,
currently, there might be a cascade of errors that are difficult for users to
understand. For instance (partially redacted for clarity):

[CONFIG] Error calling dlopen(libparams_libconfig.so): libparams_libconfig.so: cannot open shared object file: No such file or directory
[CONFIG] config module "libconfig" couldn't be loaded
[CONFIG] config_get, section log_config skipped, config module not properly initialized
[LOG] init aborted, configuration couldn't be performed
[CONFIG] config_get, section (null) skipped, config module not properly initialized
[CONFIG] /home/francesco/openairinterface5g/common/config/config_userapi.c 68 nfapi has no processed integer availablle
[CONFIG] config_get, section (null) skipped, config module not properly initialized

Assertion (get_softmodem_params()->default_pdu_session_id == -1) failed!
In get_common_options() /home/francesco/openairinterface5g/executables/softmodem-common.c:161
Use uicc0.pdu_sessions.[0].id to change the requested PDU session ID (is 0)

Here, the error is the missing shared object, but a user is more likely to look
at the last error instead of the first.

This commit addresses it by checking early for CONFIG_ISFLAGSET(CONFIG_ABORT),
and stopping if it is set. Additionally changes include making functions static,
removing late CONFIG_ISFLAGSET() checks, and the CONFIG_ISFLAGSET() in
load_configmodule(), because at that time "uniqCfg" is not set yet and thus does
not do anything (this is likely a regression of an earlier cleanup).

See-also: f50d5f5a ("make multiple config instead of one implicit global")
2026-02-23 10:17:01 +01:00
Rúben Soares Silva
46d4659706 Add missing packing for CONFIG.request parameter BetaPSS
Adds the packing procedure for the parameter BetaPSS, as well as adding this parameter to the utility functions where it is missing
2026-02-20 13:29:57 +00:00
francescomani
db2bcf0eee preventing include of log.h in nr_common.h by moving function in nr_common.c 2026-02-20 11:05:43 +01:00
francescomani
7a59f28ae3 RRC CSI-RS config for 8 and 12 ports 2026-02-20 11:05:43 +01:00
francescomani
b53f4a6e37 using constants for FAPI precoding weigths instead of hardcoded values 2026-02-20 11:05:43 +01:00
Thomas Schlichter
f7265977ad NR UE: when compensating for large timing_advance changes, set writeBlockSize to 0 instead of 1 2026-02-20 09:59:54 +01:00
Thomas Schlichter
ba0ead6809 NR UE: correctly compute the writeBlockSize in readFrame() and the writeTimestamp in syncInFrame() 2026-02-20 09:59:54 +01:00
Thomas Schlichter
09b3fc03c7 NR UE: make RX and TX pointer arrays of type c16_t instead of void in nr-ue.c 2026-02-20 09:52:42 +01:00
Thomas Schlichter
1707aafc2c NR UE: make fp pointer to a _constant_ NR_DL_FRAME_PARMS in nr-ue.c 2026-02-20 09:52:42 +01:00
Rakesh Mundlamuri
5e0e359dd6 Update PRS configuration files to test multi gNB synchronization 2026-02-20 13:27:26 +05:30
Rakesh Mundlamuri
b1f32ea049 Synchronize multiple gNBs by aliging to the slot boundary
Currently, we derive frame and slot number based on `proc->timestamp_rx`
using
`proc->frame_rx    = (proc->timestamp_rx / (fp->samples_per_subframe*10))&1023;` and
`proc->tti_rx = get_slot_from_timestamp(proc->timestamp_rx, fp);`

This ignores the samples `proc->timestamp_rx % fp->samples_per_frame`
while computing the frame and slot number creating a mis-alignment with the slot boundaries.
We fix this alignment by compensating these samples during the first reception.
2026-02-20 13:27:26 +05:30
Robert Schmidt
520360a629 Merge branch 'integration_2026_w08' into 'develop'
Integration: `2026.w08`

* !3934 Fix Ubuntu build: reinstate -Werror
* !3803 remove cblas and atlas dependancy
* !3918 Add a simple GTP unit test
* !3924 T: macpdu2wireshark: gentle exit (and some other minor work in the T tracer)
* !3925 Fix race condition on double RA during RRC reestablishment
* !3930 bugfix: add PCell to serving_cells in fallback path and refactor update logic
* !3936 [FHI72] Remove support for xran E release
* !3893 NR Paging on CU

See merge request oai/openairinterface5g!3939
2026-02-20 06:46:39 +00:00
Raghavendra Dinavahi
e129fd0ede GNB: RESET NDI only after usage in case of disable HARQ
solves this warnings seen in the trace
NDI indicates re-transmission but computed TBS 3968 doesn't match with what previously stored 3368
2026-02-19 19:37:54 +01:00
Robert Schmidt
82315ead3e Fail early if configuration module can not initialize properly
In the case that the config module cannot load the driver for libconfig
or yaml, currently, there might be a cascade of errors that are
difficult for users to understand. For instance (partially redacted for
clarity):

    [CONFIG] Error calling dlopen(libparams_libconfig.so): libparams_libconfig.so: cannot open shared object file: No such file or directory
    [CONFIG] config module "libconfig" couldn't be loaded
    [CONFIG] config_get, section log_config skipped, config module not properly initialized
    [LOG] init aborted, configuration couldn't be performed
    [CONFIG] config_get, section (null) skipped, config module not properly initialized
    [CONFIG] /home/francesco/openairinterface5g/common/config/config_userapi.c 68 nfapi has no processed integer availablle
    [CONFIG] config_get, section (null) skipped, config module not properly initialized

    Assertion (get_softmodem_params()->default_pdu_session_id == -1) failed!
    In get_common_options() /home/francesco/openairinterface5g/executables/softmodem-common.c:161
    Use uicc0.pdu_sessions.[0].id to change the requested PDU session ID (is 0)

Here, the error is the missing shared object, but a user is more likely
to look at the last error instead of the first.

This commit addresses it by checking early for
CONFIG_ISFLAGSET(CONFIG_ABORT), and stopping if it is set. Additionally
changes include making functions static, removing late
CONFIG_ISFLAGSET() checks, and the CONFIG_ISFLAGSET() in
load_configmodule(), because at that time "uniqCfg" is not set yet and
thus does not do anything (this is likely a regression of an earlier
cleanup).

See-also: f50d5f5a9b ("make multiple config instead of one implicit
  global")
2026-02-19 17:06:29 +01:00
Robert Schmidt
90c6bbce65 Merge remote-tracking branch 'origin/nr-paging-cu' into integration_2026_w08 (!3893)
NR Paging on CU

Implements the NR paging path on the CU:

- NGAP Paging is decoded and passed to RRC
- RRC builds F1AP Paging, and distributes it to DUs via F1 callback

Changes:

- Refactor and extend F1AP Paging encode/decode libraries
  * add missing enc/dec/eq/cp functions
  * add unit test
  * IEs: CN UE 5G-S-TMSI, RAN UE I-RNTI; optional DRX/priority/origin)
- Refactor CU callback CU_send_Paging
- Refactor DU handler DU_handle_Paging
- Refactor old F1 callback for Paging indication, extend it and align
  with existing F1 callbacks in stack
- Refactor and extend NGAP Paging encode/decode lib
  * add missing enc/dec/eq/cp functions
  * add unit test
  * Fixes NGAP paging to accept Paging only on SCTP stream 0 per TS
    38.412
- Includes supporting refactors (PDU session split, shared 5G-S-TMSI
  helpers, NGAP/F1AP cleanups)

Testing

- NGAP and F1AP Paging lib unit tests (enc/dec)
- Stream-0 fix validated with Open5GS AMF

This MR does not address the DU changes besides the F1 handler. F1AP
Paging does not have an RRC container to pass the PCCH message to the
DU, and F1 DL RRC Message Transfer does not apply to PCCH. PCCH-Message
shall be built at DU per TS 38.331 §5.3.2, with padding as per §8.5 and
delivered as RLC SDU per §8.2. For each cell in Paging Cell List that
belongs to this DU, queue for MAC. MAC schedules at PF/PO per TS 38.304
§7.

Refs:

- F1AP 3GPP TS 38.473 version 16.21.0 Release 16
- NGAP 3GPP TS 38.413 version 16.17.0 Release 16
2026-02-18 16:06:09 +01:00
Jaroslava Fiedlerova
e2f20eea8a Merge remote-tracking branch 'origin/remove-xran-e' into integration_2026_w08 (!3936)
[FHI72] Remove support for xran E release

All the use cases we tested with E release are working end-to-end with F release.
The near future plan is to support K release which is ongoing in the MR !3444.
2026-02-18 15:03:58 +01:00
Robert Schmidt
2b7f3e2f72 Merge remote-tracking branch 'origin/rrc-fix-rrcsetup-fallback' into integration_2026_w08 (!3930)
bugfix: add PCell to serving_cells in fallback path and refactor update logic

Fix assertion failure in rrc_gNB_send_NGAP_NAS_FIRST_REQ() when RRC
Reestablishment falls back to RRC Setup. The fallback path was not
adding the PCell to the UE's serving_cells array, causing
rrc_get_pcell_for_ue() to return NULL.

Major changes:

- Add rrc_update_ue_pcell() helper function that handles PCell updates
  for both new UEs (fallback) and existing UEs (normal reestablishment)
- Refactor normal reestablishment path to use rrc_update_ue_pcell()
  helper instead of manual cleanup + add sequence
- Add PCell update to fallback_rrc_setup path using the same helper
- Move C-RNTI validation after current_cell fetch to ensure current_cell
  is initialized before fallback_rrc_setup label
- Change error handling: return instead of fallback when PCell add fails
  in normal reestablishment path

Fixes CI failure in !3908
2026-02-18 10:44:38 +01:00
Teodora
5a339d66f2 Use the same pattern for checking the existance of F_RELEASE definition
In general, `#ifdef` and `#if defined` are the same.

Note: `#elif` is not the same as `#elif defined`.
2026-02-18 09:46:27 +01:00
Teodora
c68068f144 Remove support for xran E release
All the use cases we tested so far, are supported with xran F release.
Therefore, we can proceed with removing the support with E release.

In addition, our plan is to bring the support for K release which is ongoing activity in
the MR https://gitlab.eurecom.fr/oai/openairinterface5g/-/merge_requests/3444.
2026-02-18 09:44:08 +01:00
Robert Schmidt
3520eb3c0d Merge remote-tracking branch 'origin/rrc-race-condition' into integration_2026_w08 (!3925)
Fix race condition on double RA during RRC reestablishment

Sometimes, especially in poor channel conditions, a UE can trigger
multiple RA procedures during RRC reestablishment, causing
reconfigCellGroup to be overwritten with a CellGroup that already has
spCellConfig removed, leading to an assertion failure in
update_cellgroup_for_reestablishment(). See logs below

    [NR_MAC]  456.13 UE 991d: Received Ack of Msg4. CBRA procedure succeeded (UE Connected)
    [NR_MAC] Adding new UE context with RNTI 0x991d
    [NR_PHY] [RAPROC] 461.9 Initiating RA procedure with preamble 8, energy 48.0 dB (I0 274, thres 130), delay 21 start symbol 2 freq index 0
    [NR_MAC] 461.9 UE RA-RNTI 0081 TC-RNTI ecd8: initiating RA procedure
    [NR_MAC] UE ecd8: Sync beam index 0
    [NR_MAC] UE ecd8: Msg3 scheduled at 462.3 (461.18 TDA 2) start 0 RBs 8
    [NR_MAC] UE ecd8: 461.18 Generating RA-Msg2 DCI, RA RNTI 0x81, state 1, preamble_index(RAPID) 8, timing_offset = 21 (estimated distance 820.3 [m])
    [NR_MAC]  462. 3 PUSCH with TC_RNTI 0xecd8 received correctly
    [NR_MAC] Received a MAC CE for C-RNTI with 991d
    [NR_MAC] Remove NR rnti 0xecd8
    [NR_MAC]  462. 3 RA with C-RNTI 991d complete
    [NR_PHY] [RAPROC] 471.19 Initiating RA procedure with preamble 6, energy 51.0 dB (I0 276, thres 130), delay 21 start symbol 2 freq index 0
    [NR_MAC] 471.19 UE RA-RNTI 010d TC-RNTI 022d: initiating RA procedure
    [NR_MAC] UE 022d: Sync beam index 0
    [NR_MAC] UE 022d: Msg3 scheduled at 472.13 (472.8 TDA 2) start 0 RBs 8
    [NR_MAC] UE 022d: 472.8 Generating RA-Msg2 DCI, RA RNTI 0x10d, state 1, preamble_index(RAPID) 6, timing_offset = 21 (estimated distance 820.3 [m])
    [NR_MAC]  472.13 PUSCH with TC_RNTI 0x022d received correctly
    [NR_MAC] Received a MAC CE for C-RNTI with 991d
    [NR_MAC] Remove NR rnti 0x022d
    [NR_MAC]  472.13 RA with C-RNTI 991d complete
    [NR_RRC] [UL] (cellID 1, UE ID 1 RNTI 991d) Received RRCReestablishmentComplete
    [NR_RRC] UE 1 Processing NR_RRCReestablishmentComplete from UE
    [NR_MAC] UE 991d: gNB-DU Configuration Query received, will include CellGroupConfig in response

    Assertion (new_CellGroup->spCellConfig) failed!
    In update_cellgroup_for_reestablishment() /phy/openairinterface5g/openair2/LAYER2/NR_MAC_gNB/mac_rrc_dl_handler.c:666

This MR solves it by skipping the reconfigCellGroup overwrite when it
already holds a valid config with spCellConfig, and by replacing the
fatal assertion on missing spCellConfig with an early return.
2026-02-17 18:16:27 +01:00
Robert Schmidt
a264937825 Merge remote-tracking branch 'origin/T-macpdu-fix' into integration_2026_w08 (!3924)
T: macpdu2wireshark: gentle exit (and some other minor work in the T tracer)

When outputting to a file, typing ctrl+c exits the program without
calling fclose(), leading to loss of traces in the output file.

Let's intercept ctrl+c and exit gently, calling fclose().

Also include a small fix for compilation of _check_vcd, some work on
extract and hacks/plot-ofdm, minor stuff.
2026-02-17 18:10:59 +01:00
Robert Schmidt
8abb535481 Merge remote-tracking branch 'origin/gtp-unit-test' into integration_2026_w08 (!3918)
Add a simple GTP unit test

Add a simple unit test for GTP that as of now tests the main
functionality, i.e., for a single UE, set up a bearer between two
endpoints and checking that traffic sending works. This is a start to
extend it further, e.g., with API changes, extensions to support new
functionality such as IPv6, and refactorings.

A number of supporting cleanup has been done as well.
2026-02-17 18:10:04 +01:00
Robert Schmidt
3671a47a7d Merge remote-tracking branch 'origin/remove-blas-atlas-dep' into integration_2026_w08 (!3803)
remove cblas and atlas dependancy

With new Fedora, we have again the cblas.h place not working

cblas+atlas dependancy is annoying for years

i start this MR to remove this dependancy

first commit: only cleaning: remove dead code, make static functions,
simplify code

after this commit, we see we use blas only in: conjugate_transpose()
that is a quite trivial function H_hermH_plus_sigma2I() a bit more
complex, but still possible to recode mutl_matrix_matrix_col_based() i
think we have the same elsewhere in OAI

atlas is used only in: lin_eq_solver() in don't know if replacement is
hard

We can observe all is related to MMSE, that is also coded in OAI 5G, so
maybe the solution is to use 5G code in 4G

Since nothing seems to be used, we can remove it.
2026-02-17 18:09:09 +01:00
alexjiao
9e7822cf1c NR UE: fix PRACH k1 calculation at MAC when handover
The k1 for PRACH calculation in config_common_ue() should be the same as in config_common_ue_sa(),
otherwise k1 is wrong when handover to target cell if msg1-FDM not 0 in reconfigurationWithSync.
2026-02-17 17:46:18 +01:00
Robert Schmidt
2a925d6cd4 GTP: add second test for tunnels without QFI 2026-02-17 13:56:07 +01:00
Robert Schmidt
d6c7321077 Implement removal of endpoint
For unit testing, allow to remove endpoints such that we could reuse a
port/IP combination.

The function does not take care of endpoints that are still "dangling",
it is the user's responsibility to remove all existing TEIDs.
2026-02-17 13:52:32 +01:00
Robert Schmidt
d290850e59 Add basic GTP unit test
Add a simple unit test that tests sending unidirectional traffic. So
far, it merely replicates what is already in nr-cuup-load-test, but it's
a single executable (so easier to handle), and could be more easily
extended to further tests (e.g., IPv6).

A couple of ideas for refactoring/improvements have been added in
comments in the test.
2026-02-17 13:52:32 +01:00
Guido Casati
df11c946f9 Paging (NGAP): fix stream handling to comply with TS 38.412
Paging messages are classified as non-UE-associated signalling per
3GPP TS 38.412 clause 7 (TL), which requires them to be sent on
stream 0 (or a reserved stream pair).

Paging message is received when UE is in RRC_IDLE or RRC_INACTIVE
state, as the RAN has no active UE context and paging targets the
UE by 5G-S-TMSI rather than RAN-UE-NGAP-ID.

The previous implementation incorrectly rejected paging messages
received on stream 0, causing paging failures when using Open5GS AMF.

Changes:
- Accept paging on stream 0 (non-UE-associated signalling)
- Reject paging on non-zero streams (UE-associated streams)
- Add documentation
2026-02-17 12:25:58 +01:00
Guido Casati
8209dcb5d9 Paging (RRC): refactor NGAP Paging handler in CUCP
RRC now builds F1AP paging messages directly by calling F1AP/direct
callbacks and aligning the CU/DU intergace with the F1AP design in the CU.
Messages are forwarded based on TAI-based cell matching across DUs.

- Remove F1AP_PAGING_IND message def and f1ap_paging_ind_t.
  RRC no longer sends ITTI F1AP_PAGING_IND; it builds f1ap_paging_t
  and passes it to the DU path.

- rrc_gNB_process_PAGING_IND: new signature (rrc, instance, msg)
  with const where appropriate; call in rrc_gnb_task() updated.

- NGAP handler logic: For each TAI, match (PLMN + TAC) to
  rrc->configuration; collect matching TAIs. Build one f1ap_paging_t
  (5G-S-TMSI via nr_construct_5g_s_tmsi(), identity type
  F1AP_PAGING_IDENTITY_CN_UE, optional drx/priority/origin copied
  from ngap_paging_ind_t), call rrc_send_paging_to_dus(), then
  free_f1ap_paging(). Remove the previous AssertFatal stub, CC loop,
  NODE_IS_CU branch, and UE lookup logic: it is now handled by
  F1AP/direct CU callbacks.

- rrc_gNB_du: Add rrc_send_paging_to_dus(rrc, tais, n_tai, msg).
  Iterate DUs with RB_FOREACH; for each DU, fill msg->cells from
  du->cells whose (PLMN + TAC) matches any requested TAI, set
  n_cells, then call rrc->mac_rrc.paging_transfer(du->assoc_id,
  msg). Skip DUs with no matching cells. Prevents duplicate paging
  when multiple TAIs map to the same PLMN.
2026-02-17 12:25:58 +01:00
Guido Casati
6022ac8bf1 Paging (F1AP): wire paging through mac_rrc_dl and use F1AP free/decoding lib on CU/DU
Introduce paging_transfer in the mac_rrc_dl interface so the CU can pass
paging to the DU (F1 or direct). Use the F1AP paging lib on both CU and DU
for decode/free and to avoid leaking the message after send.

- Add f1_paging_transfer_func_t and paging_transfer to nr_mac_rrc_dl_if_s
  (mac_rrc_dl.h, nr_rrc_defs.h).
- F1AP path: paging_f1ap() allocates F1AP_PAGING, copies with cp_f1ap_paging(),
  sends via ITTI to TASK_CU_F1. Direct path: f1_paging_transfer_direct() stub
- CU task: call free_f1ap_paging() after CU_send_Paging() to release the message.
- DU: DU_handle_Paging() uses decode_f1ap_paging()/free_f1ap_paging() from lib,
  returns on decode failure; remove inline ASN.1 IE parsing.
- cleanup outdated header comments in header files
- Left a TODO not in DU code to build PCCH (in F1 and direct paths)
2026-02-17 12:25:58 +01:00
Guido Casati
cf7879f038 Paging (F1AP): refactor CU_send_Paging() to use PAGING message
- Add F1AP_PAGING message type and macro; F1AP defines Paging, not
  Paging Indication. CU task now handles F1AP_PAGING instead of
  F1AP_PAGING_IND.
- In CU_send_Paging(): take const f1ap_paging_t *; replace inline
  ASN.1 encoding with encode_f1ap_paging(); refine memory management;
  clean up in the process

Note: F1AP_PAGING_IND definitions left in place and still used in the
RRC callback - to be removed in a follow-up commit.
2026-02-17 12:25:58 +01:00
Guido Casati
08f0f9369c Paging (F1AP): add F1 paging library (9.2.6.1 3GPP TS 38.473)
Add F1AP Paging library and new message type to follow the existing F1AP
library pattern and to support multi-cell paging and both RAN UE (I-RNTI)
and CN UE (5G-S-TMSI) paging identities at the library level per TS 38.473.

* New library (f1ap_paging.c/h, f1ap_lib_includes.h, CMakeLists.txt)
  - Implement encode/decode/copy/eq/free for F1AP Paging (procedure 9.2.6).
  - Add ASN.1 includes for Paging, PagingIdentity, CN/RAN UE identities.
  - Enables unit testing of Paging enc/dec in f1ap_lib_test.c.

* New types in f1ap_messages_types.h (existing f1ap_paging_ind_t unchanged)
  - f1ap_paging_t: UE Identity Index, paging identity (union + type enum),
    optional paging_drx, paging_priority, paging_origin, and paging_cells[].
  - f1ap_paging_cell_item_t, f1ap_paging_identity_type_t, f1ap_paging_identity_t
    for multi-cell list and RAN/CN identity discrimination.
  - Paging Origin IE is optional per F1AP 8.7.1.2.

Tests: test_f1ap_paging() roundtrip and copy for CN UE (5G-S-TMSI) and
RAN UE (I-RNTI) cases, with optional IEs.
2026-02-17 12:25:58 +01:00
Guido Casati
b026e6b4ee Paging (NGAP): add paging encode/decode library and unit tests (3GPP TS 38.413)
- Refactor ngap_paging_ind_t (openair2/COMMON/ngap_messages_types.h):
  - optional paging_drx and paging_priority as pointers
  - TAI list as tai_list[] and n_tai
  - add optional IEs: Paging Origin, Paging Attempt Information,
    UE Radio Capability for Paging.
  - Introduce nr_tai_t, ngap_paging_attempt_info_t, ngap_paging_origin_t;
  - generate paging enums via FOREACH macros.
- Add NGAP Paging encode/decode/eq/free in openair3/NGAP/ngap_gNB_paging.c
  (encode_ng_paging, decode_ng_paging, eq_ng_paging, free_ng_paging).
- Replace inline Paging decode in ngap_gNB_handle_paging() with
  decode_ng_paging() and add error handling; add eq_ngap_plmn() in
  ngap_common.
- Update rrc_gNB_NGAP.c to use tai_list/n_tai and optional paging_drx
  when forwarding paging to F1AP.
- Add ASN.1 includes for Paging in ngap_msg_includes.h; register
  ngap_gNB_paging.c in root CMakeLists.txt.
- Add NGAP unit test (openair3/NGAP/tests/ngap_lib_test.c): encode/decode
  roundtrip for Paging; tests subdirectory and executable under
  ENABLE_TESTS in openair3/NGAP/CMakeLists.txt.
2026-02-17 12:25:58 +01:00
Guido Casati
41942c96d2 Refactor (NGAP): split out NGAP utilities from common lib
ngap_common.h is for common IEs enc/dec functions, utilities
should go into a separate file. Changes in this commit:

* Add ngap_utils.h (utilities)
* Move helper macros (NGAP_ERROR, NGAP_DEBUG, NGAP_FIND_PROTOCOLIE_BY_ID, etc.) to ngap_utils.h
* Move equality check macros (_NGAP_EQ_CHECK_*) to ngap_utils.h
* Clean up includes

This change is preparatory to the introduction the paging lib with unit
tests, with the goal of reducing the inter-dependency between concurrent
NGAP libs.
2026-02-17 12:25:58 +01:00
Guido Casati
c436f05ea9 Refactor (NGAP): adopt TO_ENUM/TO_TEXT pattern for NGAP enums
TO_ENUM/TO_TEXT are already used in NAS, and can be adopted in NGAP.
To avoid duplication, the following changes are introduced:

* Move text_info_t, TO_ENUM, TO_TEXT to common/utils/utils.h
* Include utils.h include to ngap_messages_types.h, fgs_nas_utils.h, and fgmm_lib.h
* RRC establishment cause: refactor to FOREACH_RRC_ESTABLISHMENT_CAUSE macro
* Cause Group: refactor to FOREACH_CAUSE_GROUP macro
* Radio Network Cause: refactor to FOREACH_CAUSE_RADIO_NETWORK macro
* Protocol Cause: refactor to FOREACH_CAUSE_PROTOCOL macro

This change is preparatory to the introduction the paging lib with unit
tests, with the goal of reducing the inter-dependency between concurrent
NGAP libs.
2026-02-17 12:25:58 +01:00
Guido Casati
3dc8647a58 Refactor (NGAP): add conversion functions to ngap_common.c
These conversion functions will be needed across different
NGAP libraries upon refactoring: tnl_to_bitstring, bitstring_to_tnl
Therefore, they are moved to the common lib.
2026-02-17 12:25:58 +01:00
Guido Casati
e062f40137 Refactor (NGAP): extract PDU session management procedures to dedicated library
PDU session related NGAP messages do not belong to NAS procedures lib.

* Create ngap_gNB_pdu_session_management.c and .h
* Move out ngap_gNB_pdusession_setup_resp, ngap_gNB_pdusession_modify_resp,
  ngap_gNB_pdusession_release_resp from ngap_gNB_nas_procedures.c
* Move encode_ngap_pdusession_setup_response_transfer to ngap_common.c:
  this transfer IE is common used both in PDU Session Management and
  Initial Context Setup, so it's moved to the common lib
* Add ngap_gNB_pdu_session_management.c to CMakeLists.txt
2026-02-17 12:25:58 +01:00
Guido Casati
563a0cfa61 Refactor: unify equality-check macros across protocol libs
This commit centralizes equality-check behavior and removes duplicated
macro implementations across protocol stacks.

Major changes:
- add `common/utils/eq_check.h` with shared `_EQ_CHECK_*`,
  `EQ_CHECK_GENERIC`, and optional-IE pointer helpers
- replace E1AP/F1AP/NAS local equality macros and call sites with
  the shared helpers
- remove duplicated layer-specific error/equality macro definitions from
  common headers and switch includes to `eq_check.h`
- update CMake test flags to define `ENABLE_TESTS` for `e1ap_lib`,
  and 5GS NAS libraries; drop `E1AP_LOG_ERRORS` - equality-check/error
  printing is now consistently controlled by `ENABLE_TESTS`
2026-02-17 12:25:58 +01:00
Guido Casati
f295252b2e Refactor 5G-S-TMSI: harmonize 5G-S-TMSI handling with centralized helpers
Centralizes 5G-S-TMSI bit manipulation logic for consistency and
maintainability. All manual bit operations replaced with documented
helper functions following TS 23.003 bit layout specification.

- Add helper functions for 5G-S-TMSI operations:

  * nr_construct_5g_s_tmsi_part1: 5G-S-TMSI construction is defined
    in 3GPP TS 23.003 and relevant at both gNB and UE side
    * Add helper functions to be later used in NG Paging
    * Adopt in NAS UE
  * nr_extract_5g_s_tmsi_part1() - extract Part1 (39 bits) from full
  * nr_extract_5g_s_tmsi_part2() - extract Part2 (9 bits) from full
  * nr_build_full_5g_s_tmsi() - reconstruct full from Part1+Part2
  * nr_deconstruct_5g_s_tmsi() - deconstruct into components
- Refactor manual bit manipulation to use helper functions:
  * asn1_msg.c: use nr_extract_5g_s_tmsi_part1() in RRCSetupRequest
  * asn1_msg.c: use nr_extract_5g_s_tmsi_part2() in RRCSetupComplete
  * rrc_gNB.c: use nr_build_full_5g_s_tmsi() when reconstructing from parts
  * rrc_gNB.c: use nr_deconstruct_5g_s_tmsi() when extracting components
- Optimize nr_construct_5g_s_tmsi_part1() to reuse extract function
2026-02-17 12:25:58 +01:00
Guido Casati
3c164ef138 Minor (NGAP): clarify ngap_register_gnb_req_t actually refers to NG SETUP REQUEST
There is no such thing as NG Register message, the naming is
inaccurate, however the goal of this commit is only to clarify that
and major refactoring is not yet carried out.
2026-02-17 12:25:58 +01:00
Guido Casati
b27833fbd2 Cleanup (NGAP): remove unused message definitions
* NGAP_PATH_SWITCH_REQ_LOG, NGAP_PATH_SWITCH_REQ_ACK_LOG
* NGAP_UE_CTXT_MODIFICATION_RESP, NGAP_UE_CTXT_MODIFICATION_FAIL, NGAP_UE_CTXT_MODIFICATION_REQ
2026-02-17 12:25:58 +01:00
Guido Casati
2da094dd66 Cleanup (NGAP): remove NR_HandoverPreparationInformation.h from NGAP includes
this is not an NGAP header and does not belong to ngap_msg_includes.h
2026-02-17 12:25:58 +01:00
Guido Casati
372f121cf6 Refactor (RRC): extract rrc_update_ue_pcell() to public API and adopt consistently
Move rrc_update_ue_pcell() from static function in rrc_gNB.c to public
function in rrc_cell_management.c, making it reusable across RRC code
paths. Replace duplicate PCell addition logic in handover paths
(intra-CU and inter-CU) and RRCSetup path with calls to this shared
function.

This eliminates code duplication between handover and RRCSetup paths,
centralizes PCell update logic (including cleanup of old PCell's DU
serving cells) in a single reusable function and makes the function
available for future use in other RRC procedures
2026-02-17 11:36:25 +01:00
Guido Casati
f247a6cc2e fix(RRC): add PCell to serving_cells in fallback path and refactor update logic
Fix assertion failure in rrc_gNB_send_NGAP_NAS_FIRST_REQ() when RRC
Reestablishment falls back to RRC Setup. The fallback path was not
adding the PCell to the UE's serving_cells array, causing
rrc_get_pcell_for_ue() to return NULL.

Major changes:
- Add rrc_update_ue_pcell() helper function that handles PCell updates
  for both new UEs (fallback) and existing UEs (normal reestablishment)
- Refactor normal reestablishment path to use rrc_update_ue_pcell()
  helper instead of manual cleanup + add sequence
- Add PCell update to fallback_rrc_setup path using the same helper
- Move C-RNTI validation after current_cell fetch to ensure current_cell
  is initialized before fallback_rrc_setup label
- Change error handling: return instead of fallback when PCell add fails
  in normal reestablishment path
2026-02-17 11:36:25 +01:00
Cedric Roux
c1f41caa8d T: hacks: plot-ofdm: handle more skipped samples 2026-02-17 11:18:37 +01:00
Cedric Roux
61bdee3e61 T: extract: extract all traces by default 2026-02-17 11:18:37 +01:00
Cedric Roux
0c4655448f T: minor: fix compilation of _check_vcd
"make _check_vcd" was failing.
2026-02-17 11:18:37 +01:00
Cedric Roux
7e74d4c43e T: macpdu2wireshark: gentle exit
When outputting to a file, typing ctrl+c exits the program without calling
fclose(), leading to loss of traces in the output file.

Let's intercept ctrl+c and exit gently, calling fclose().
2026-02-17 11:18:37 +01:00
Teodora
dcfd16bd83 Remove useless definitions for E&F releases in _BySymbol() functions
Those functions are already encapsulated in #ifdef F_RELEASE condition.
2026-02-17 09:58:24 +01:00
Robert Schmidt
8925654c07 Remove unused 4G MMSE code
Since the parent commit, USE_MMSE is not defined. Thus, the
corresponding code is commented out. Since there are no linker problems,
it is obvious that this code is never called, and we can remove it.
2026-02-16 20:05:05 +01:00
Laurent THOMAS
da7897be04 remove cblas and lapack dependency, as the calling code can't be called in present master branch (likely never worked/fished code 2026-02-16 20:05:04 +01:00
Laurent THOMAS
345b44d9b3 re-order the functions to have them in natural C order (function implemented before call). Add a #if to be able to disable never called code, but the flag is not activated in this commit 2026-02-16 20:04:29 +01:00
Laurent THOMAS
b6171949cd only cleaning: remove dead code, make static functions, simplify code 2026-02-16 20:04:29 +01:00
Robert Schmidt
40e61d59a6 Merge branch 'fix-ubuntu-build' into 'develop' (!3934)
Fix Ubuntu build: reinstate -Werror

See merge request oai/openairinterface5g!3934
2026-02-16 14:31:23 +00:00
Robert Schmidt
a159f1b78a Revert "Compile everything in Ubuntu builder"
This reverts commit 16c333b1a3.

I tried to build everything in Ubuntu images, but

- this introduced a regression (ignores $BUILD_OPTION)
- made that we don't use -Werror (when we should)

I tried to fix the use of the first, but it would involve more changes
than I prefer. On the second, we cannot enable -Werror, as FlexRIC does
not build warning-free (in Release mode). We thus have to build only the
targets that we require, and therefore we can keep using build_oai,
which is the simplest option (cf. the first point).
2026-02-16 11:04:11 +01:00
Robert Schmidt
9c1603cfbb Remove BUILD_ARG: Will never build sanitize
xran does not work with Address Sanitizer. Thus, there is no reason to
keep these build arguments.
2026-02-16 11:01:37 +01:00
Jaroslava Fiedlerova
7fa4d018d4 Merge branch 'integration_2026_w07' into 'develop'
Integration: `2026.w07`

* !3899 Solving issues caused by invalid RRC configuration
* !3905 Add undocumented Aerial ERROR.indication vendor specific error codes
* !3896 Add fallbacks for ARMv8a to make it compile
* !3734 vrtsim: add CIR DB playback with CLI flags
* !3886 Integrate GPU-Accelerated Channel Simulation + CI Test Pipeline
* !3907 RRC QoS refactor: PDU Session Modify support, SDAP fixes, and code improvements
* !3891 Fix for split 7.2 DU configurations including DU & RU ethernet addresses
* !3913 Remove VCD signal dumper from NR code
* !3783 RRC: Multi-cell handling architecture
* !3916 CI: Rename RAN-SA-2x2-Module-CN5G pipeline
* !3922 Fix and update tracy tag to v0.13.1
* !3917 Fix SRS power computation
* !3915 Cleanup Cmake: remove some double compilation
* !3883 Improvements in handling beamforming inputs
* !3906 fix(ci): remove git reset command from Jenkinsfile
* !3894 Reimplement BladeRF radio driver, make it work for 5G

Closes #845

See merge request oai/openairinterface5g!3908
2026-02-13 11:41:25 +00:00
Robert Schmidt
bf325466b3 Merge remote-tracking branch 'origin/bladerf_testing' into integration_2026_w07 (!3894)
Reimplement BladeRF radio driver, make it work for 5G

This MR reimplements the BladeRF radio driver such that it is usable for
5G. On the way, we remove unused code, refactor it for readability, and
update configuration.

Tested:

- 40MHz carrier as gNB
- 20MHz carries as gNB

An initial focus was 2x2, but I did not manage to do this yet.
Documentation on the format is here [1] and there is a helper [2]. I
will do this later.

[1] https://www.nuand.com/bladeRF-doc/libbladeRF/v2.6.0/group___s_t_r_e_a_m_i_n_g___f_o_r_m_a_t.html#gga4c61587834fd4de51a8e2d34e14a73b2a92cfbda7a5577c809e2ff6123f8f30b6
[2] https://www.nuand.com/bladeRF-doc/libbladeRF/v2.6.0/group___s_t_r_e_a_m_i_n_g___f_o_r_m_a_t.html#gac754a927c12cd8aa3fc270e9dd9c108e
2026-02-12 17:04:10 +01:00
Maxime
37cb854319 Fix crash on double reestablishment: guard reconfigCellGroup overwrite 2026-02-12 11:03:23 -05:00
Robert Schmidt
d87696e583 Merge remote-tracking branch 'origin/fix-ci-reset' into integration_2026_w07 (!3906)
fix(ci): remove git reset command from Jenkinsfile

- By default, the variable eNB_CommitID is set as 'develop' in the
  config
- When OAI-FLEXRIC-RAN-Integration-Test is triggered by upstream FlexRIC
  push events, it takes develop
- Triggered by RAN takes commit SHA where origin/SHA does not work

Below are issues seen after this week's merge to develop:

    https://jenkins-oai.eurecom.fr/view/RAN/job/RAN-Ubuntu-ARM-Image-Builder/4103/pipeline-overview/?selected-node=44

    08:43:07  + git reset --hard origin/9777d23173a740de7cf982659fae13ad6627d3aa
    08:43:07  fatal: ambiguous argument 'origin/9777d23173a740de7cf982659fae13ad6627d3aa': unknown revision or path not in the working tree.

When triggered through upstream FlexRIC (as a PUSH Event), it is taking
the branch as shown in the logs:

    https://jenkins-oai.eurecom.fr/job/OAI-FLEXRIC-RAN-Integration-Test/3832/pipeline-overview/?selected-node=47

    13:45:27  + git reset --hard origin/develop
    13:45:27  HEAD is now at 9777d23173 Merge branch 'integration_2026_w06' into 'develop'
2026-02-12 15:31:05 +01:00
Reem Bahsoun
8f9abfb7f4 Tutorial improvement 2026-02-12 14:37:56 +01:00
Robert Schmidt
76c2dbf23f Merge remote-tracking branch 'origin/beam_fix' into integration_2026_w07 (!3883)
Improvements in handling beamforming inputs

Fix a bug in setting analog beamforming structure and improves config
file parameter
2026-02-12 12:04:22 +01:00
Robert Schmidt
7bf290d674 Merge remote-tracking branch 'origin/cleanup-cmake' into integration_2026_w07 (!3915)
Cleanup Cmake: remove some double compilation

Harmonize some cmake code to avoid double compilation, notably around
polar and smallblock. In develop, we just add their sources to other
targets, whereas now we define STATIC libraries (further changed to
shared library in !3856) to avoid double compilation.

With this command line:

    cmake .. -GNinja -DENABLE_TESTS=ON && ninja

shows that before we compile 12631 files, where after it is 12583

there is additional supporting cleanup (move code, remove headers,
types, ...).

there is more harmonization to do, I limited myself to some easy wins.
For instance, we do the same with PDCP/SDAP, and this should be
refactored into STATIC libraries as well.
2026-02-12 12:00:24 +01:00
Robert Schmidt
5d004818d4 Merge remote-tracking branch 'origin/fix-srs-power' into integration_2026_w07 (!3917)
Fix SRS power computation

The SRS symbols have been remapped recently in
srs_estimated_channel_freq, and therefore the calculation of the SRS
power has to retrieve the symbols from different positions.
2026-02-12 11:57:42 +01:00
Robert Schmidt
4d14aac494 Merge remote-tracking branch 'origin/tracy-fix' into integration_2026_w07 (!3922)
Fix and update tracy tag to v0.13.1
2026-02-12 11:57:03 +01:00
Bartosz Podrygajlo
144f0de222 Fix and update tracy tag to v0.13.1 2026-02-12 11:45:02 +01:00
Robert Schmidt
37e969d1ed Merge remote-tracking branch 'origin/ci-pipeline-rename' into integration_2026_w07 (!3916)
CI: Rename RAN-SA-2x2-Module-CN5G pipeline

RAN-SA-2x2-Module-CN5G performs tests not only with 2x2 but also with a
4x4 MIMO configuration. The pipeline name has been generalized to
RAN-SA-Multi-Antenna-CN5G to cover multiple antenna configurations.
2026-02-12 09:08:55 +01:00
Robert Schmidt
a0d2c172ad Merge remote-tracking branch 'origin/rrc-multi-cell' into integration_2026_w07 (!3783)
RRC: Multi-cell handling architecture

This MR implements a foundational multi-cell handling architecture for
RRC by separating DU management from cell management and establishing a
hierarchical cell organization within each DU container. The changes
enable proper multi-cell support where each DU can serve multiple cells,
addressing the previous limitation where DU and cell management were
tightly coupled with the assumption of one cell per DU.

Key Changes:

- Data Structure Separation: Separated for DU containers (DU-specific
  info) from cell containers (cell-specific data)
- Global DU and Cell Trees: Cells are now stored in global RB trees in
  RRC, similarly to DUs
- Du-specific cell seq_arr: within each DU container (du->cells) is
  stored a seq_arr of cells belonging to the DU
- UE Cell Association Framework: Introduced serving_cells array to track
  PCell and SCells for each UE with servCellIndex indexing
- Cell Management Library: Extracted cell management functions into
  rrc_cell_management.c/h for better testability and maintainability

Other relevant changes:

- F1AP Refactoring: cell list definitions, heap allocation to prevent
  stack overflow
- 5G-S-TMSI Helpers: Common helper functions for 3GPP TS 23.003
  compliant construction
- Integration Tests: Comprehensive test suite for DU lookup, cell
  lookup, and UE cell association
- Cell Duplication Checks: Validation in F1 DU configuration update to
  prevent duplicate cells
- Documentation: Updated RRC developer documentation with multi-cell
  architecture details

Validated with RFsim in re-establishment and handover scenarios.
2026-02-12 09:07:58 +01:00
Robert Schmidt
0464329eed Make 5G RRC not depend on LTE code 2026-02-12 08:47:08 +01:00
Robert Schmidt
4d4d0d4dd4 Move RRC config to RRC header, rename
openair2/COMMON/rrc_messages_types.h has mostly 4G types. The only 5G
(gNB) RRC type is gNB_RrcConfigurationReq, which we can move to a header
in the corresponding directory (where it is used).

This allows to separate 5G gNB RRC module from the 4G types in
rrc_messages_types.h in the next commit.
2026-02-12 08:47:08 +01:00
Robert Schmidt
12e9ab1412 Remove unused type 2026-02-12 08:47:08 +01:00
Robert Schmidt
d1aa6b1d7c Remove unused headers 2026-02-12 08:47:07 +01:00
Robert Schmidt
b14127b3ff Remove double-declared C files
Is already linked in through MAC_NR_COMMON.
2026-02-12 08:47:07 +01:00
Robert Schmidt
7da5d3889f Split common_lib.c in separate compilation unit
This avoids double compilation.
2026-02-12 08:47:07 +01:00
Robert Schmidt
e1736b2fb5 Move softmodem-common.c to separate library
This potentially reduces multiple compilation of the same file.
2026-02-12 08:47:07 +01:00
Robert Schmidt
ee1f9dfede Move hashtable to ds/ folder
Notably, remove the include_directories(), which is not necessary, as
most files do not actually use this.
2026-02-12 08:47:07 +01:00
Robert Schmidt
49eeba339a Move smallblock cmake code to subdirectory 2026-02-12 08:47:06 +01:00
Robert Schmidt
f159d22499 Move crc_byte cmake code to subdirectory 2026-02-12 08:47:06 +01:00
Robert Schmidt
76a5aad7c4 Move polar coding cmake code to subdirectory 2026-02-12 08:47:06 +01:00
Robert Schmidt
cc33a01cee Remove unused -lz from simulators
We don't use zlib in the simulators, we don't need this.
2026-02-12 08:47:06 +01:00
Robert Schmidt
7a7ffc18e2 Move reverse_bits*() to separate source file
reversing bits is not NR specific. Think of it like this: LTE code might
use reverse_bits*() as well, but in the old location, it would pull in a
bunch of NR dependencies that are superfluous.
2026-02-12 08:47:06 +01:00
Robert Schmidt
bfc0f9e2a3 Merge remote-tracking branch 'origin/remove_nr_vcd' into integration_2026_w07 (!3913)
Remove VCD signal dumper from NR code

We don't test VCD in 5G NR code (and haven't tested it in 4G for years).
Remove the VCD traces in 5G code to avoid any ambiguity. 4G code remains
in place, as well as the tools to analyze existing traces.
2026-02-12 08:43:27 +01:00
Robert Schmidt
be4461ccca Move GTPV1U cmake code to subdirectory
Move the module cmake code to its subdirectory for better organization,
and  remove superfluous include_directories() that are not recommended
to be used (as it populates all other targets with those directories,
most of which don't need it anyway).

Slightly clean up the module by removing headers to unused dependencies.
The GTP module has a dependency to 4G and 5G RLC, which should not exist
(the RLC modules have a dependency on GTP, not the other way around),
but in this commit, make as little modifications as possible.
2026-02-12 06:48:52 +01:00
Robert Schmidt
11c2791527 Remove 5G code from LTE RRC 2026-02-12 06:14:49 +01:00
Robert Schmidt
9a248b4411 Move rrc_eNB_GTPV1U.c from GTP to LTE RRC module in cmake 2026-02-12 06:14:35 +01:00
Robert Schmidt
d9d18f07fd Remove unused functions 2026-02-12 06:06:19 +01:00
Robert Schmidt
40cfe2e5f2 Remove unused GTP types 2026-02-12 06:02:59 +01:00
Robert Schmidt
abe3ee9624 Fixes bladerf install scripts
- at least in CI, there is no bladerf, so don't try to upgrade a
  firmware (we don't do that either with USRPs)
- the base distro for ubuntu is debian
2026-02-11 18:37:45 +01:00
Robert Schmidt
054d0f55cd base&build: install with BladeRF 2026-02-11 18:37:45 +01:00
Robert Schmidt
16c333b1a3 Compile everything in Ubuntu builder
Compile all targets in Ubuntu build to avoid breakage of software.
Remove ldd in build dockerfile, as we don't need that (can also be
inspected manually).
2026-02-11 18:37:45 +01:00
Robert Schmidt
0a585c1235 Add BladeRF configs 2026-02-11 18:37:45 +01:00
Reem Bahsoun
f83b53d6d1 Update BladeRF documentation 2026-02-11 18:37:45 +01:00
Robert Schmidt
80b5d4ef22 Make functions static, reformat, use logging module
This commit does not introduce a functional change.
2026-02-11 18:37:45 +01:00
Robert Schmidt
792e1ed7d9 Rewrite BladeRF's device_init()
- Add more sampling rates to support, e.g., 40MHz in 5G
- Allocate memory only at end to avoid memory leaks in case of failure
- Group recurring configuration functionality in configure_channel() to
  reduced code duplication and uniform output
- Read maximum TX gain to set maximum automatically, and analogous to
  USRP radio lib
- Check if BladeRF config (buffer size, num transfers, ...) fulfills
  requirements as specified in documentation [1]
- Set BladeRF logging early to see BladeRF output

[1] https://www.nuand.com/bladeRF-doc/libbladeRF/v2.6.0/group___f_n___s_t_r_e_a_m_i_n_g___a_s_y_n_c.html#ga72752f2a047b95544e7686596a409abd

Co-authored-by: Brice Robert <robert@eurecom.fr>
Closes: #845
2026-02-11 18:37:45 +01:00
Robert Schmidt
f14aa8283c Active BladeRF on startup only, introduce BLADERF_CHECK
Don't enable radios twice, and only do it on device startup. Simplify
that function by using a new BLADERF_CHECK macro that checks return
codes and that will be reused in the following commits.
2026-02-11 18:37:45 +01:00
Brice Robert
4fdcb11edd BladeRF: Use global constant for used sampling format 2026-02-11 18:37:45 +01:00
Robert Schmidt
5fdec24b52 Delete unused or useless code
Note: device->Mod_id is deleted in !3831. The calibration table has no
purpose.

Co-authored-by: Brice Robert <robert@eurecom.fr>
2026-02-11 18:37:45 +01:00
Robert Schmidt
93c37e96e6 Make BladeRF library compile
Fixes: dd8a25524a ("remove dead code in common_lib.h")
2026-02-11 18:37:45 +01:00
Robert Schmidt
4e5d92401b Add Debian 12 to list of supported distributions 2026-02-11 18:37:45 +01:00
Robert Schmidt
38975ef120 Allow installation of multiple hardwares in same build_oai invocation
There is no reason to not allow

    ./build_oai -I -w USRP -w BLADERF

To install USRP and BladeRF together (which will be used in the CI in a
later commit). Fix this.
2026-02-11 18:37:45 +01:00
Robert Schmidt
977c484524 Remove option --disable-hardware-dependency 2026-02-11 18:37:45 +01:00
Robert Schmidt
c5834e6c1b Fix nr_srssim linking problems when building with E2 support
In this case, there are a number of linker errors:

    /usr/bin/ld: libL2_NR.a(rrc_gNB.c.o): in function `nr_rrc_transfer_protected_rrc_message':
    /home/richie/oai/openair2/RRC/NR/rrc_gNB.c:330:(.text+0x6f6): undefined reference to `signal_rrc_msg'

However, nr_srssim does not need RRC, while it is being linked in. Thus,
link without nr_rrc and L2. For the remaining two linker problems:

- provide a definition of NR_IF_Module_init() as in most other
  simulators
- move rrc_get_max_nr_csrs() to nr_common.c. It is already declared in
  the corresponding header, and itself does not have anything to do with
  RRC radio configuration, therefore it does not belong to
  nr_radio_config.c
2026-02-11 18:37:45 +01:00
Robert Schmidt
7fd9e99f5c Merge remote-tracking branch 'origin/fix-mplane-du-address' into integration_2026_w07 (!3891)
Fix for split 7.2 DU configurations including DU & RU ethernet addresses

Fix parsing of DU configurations that include both RU and DU ethernet
addresses in the fhi_72 section. The extraneous DU addresses are used in
MPlane to configure the RU.
2026-02-11 15:03:35 +01:00
Robert Schmidt
2a4cbda212 Merge remote-tracking branch 'origin/rrc-qos-refactor' into integration_2026_w07 (!3907)
RRC QoS refactor: PDU Session Modify support, SDAP fixes, and code improvements

The goal of this MR is to prepare the RRC/NGAP layer for the multi-QoS
support. The MR:

- enables PDU Session Resource Modify support in RRC/NGAP/E1AP
- fixes SDAP header mapping
- enables SDAP by default
- refactors QoS flow handling in RRC/NGAP
- improves error handling, and code maintainability in RRC/NGAP

Changes:

- NGAP PDU Session Modify:
  * add NGAP PDU Session Resource Modify Request/Response handling with
    proper error reporting for unrecognized sessions and AMF UE NGAP ID
    validation
- E1AP Bearer Context Modification:
  * add DRB To Remove List IE to support DRB release during modify
  * rename numQosFlow2Setup to numQosFlowsMod in DRB To Modify List
- RRC QoS flow handling:
  * enable multi-QoS flow support per DRB
  * add utilities to map NGAP QoS parameters to E1AP
  * filter QoS flows by DRB ID
- SDAP configuration:
  * Fix SDAP header UL/DL mapping between internal representation and
    ASN.1 enum (invert mapping)
  * change SDAP header fields from long to bool for clarity
- F1 DRB setup refactoring:
  * Extract shared helpers for F1 DRB setup list filling
  * reduce duplication between E1 response and direct DRB setup paths
- AMBR management:
  * Store AMBR in UE context
  * validate AMBR is set before bearer setup
- Configuration:
  * remove unused drbs configuration parameter
  * enable SDAP by default (change default from false to true)
2026-02-11 15:02:01 +01:00
rmagueta
b2093089ab Fix SRS power computation 2026-02-11 11:24:21 +00:00
Jaroslava Fiedlerova
abd2bc0e45 CI: Rename RAN-SA-2x2-Module-CN5G pipeline
RAN-SA-2x2-Module-CN5G performs tests not only with 2x2 but also with a 4x4 MIMO
configuration. The pipeline name has been generalized to RAN-SA-Multi-Antenna-CN5G
to cover multiple antenna configurations.
2026-02-11 11:58:16 +01:00
francescomani
0a447fd304 remove VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME from NR code and remaining unused header include 2026-02-11 10:30:07 +01:00
Robert Schmidt
f8d9c54eff Merge remote-tracking branch 'origin/multipath-testing-ci' into integration_2026_w07 (!3886)
Integrate GPU-Accelerated Channel Simulation + CI Test Pipeline

This MR builds on top of MR !3588 (feat: GPU Accelerated Channel
Simulation Pipeline).

The main portion of the changes is directly taken from MR !3588, and
focuses on integrating the GPU-accelerated channel simulation. On top of
that, this MR adds CI-related configurations to introduce a new channel
simulation testing pipeline into the CI --> RAN-Channel-Simulation

This MR introduces a CUDA-based pipeline to offload the
multipath_channel and add_noise channel simulation functions to the GPU.
This enables large-scale, real-time physical layer simulations not
possible on the CPU.

For full documentation, please see the file at openair1/SIMULATION/TOOLS/DOC/gpu_acceleration.md.

System & Compiler Requirements: An NVIDIA GPU with a compatible driver
and the CUDA Toolkit installed.

This feature was developed and tested on the GH200 server using the GCC
12 toolchain. To ensure reproducibility, building with GCC 12 is highly
recommended.  Build Instructions

The primary flag to enable this feature is -DCUDA_ENABLE=ON. The
following command shows a sample configuration used during development
on the GH200 server:

    ./build_oai --phy_simulators --cmake-opt "\
      -DCUDA_ENABLE=ON \
      -DUSE_UNIFIED_MEMORY=ON \
      -DUSE_ATS_MEMORY=OFF \
      -DCMAKE_C_COMPILER=/usr/bin/gcc-12 \
      -DCMAKE_CXX_COMPILER=/usr/bin/g++-12 \
      -DENABLE_TESTS=ON"

Memory Model Configuration

The pipeline supports multiple CUDA memory management modes, which can
be configured at compile time. ATS Memory (-DUSE_ATS_MEMORY=ON) is
enabled by default. To use another memory model, you must first disable
ATS.

For a detailed explanation of these models, please refer to Section 3 of
the gpu_acceleration.md report.
2026-02-11 10:21:44 +01:00
Robert Schmidt
9f5acb7242 Merge remote-tracking branch 'origin/vrtsim_cirdb_read' into integration_2026_w07 (!3734)
vrtsim: add CIR DB playback with CLI flags

VRTSIM: CIR DB playback via CLI

This change adds an optional in-process CIR DB path to VRTSIM. When
enabled with --vrtsim.cirdb and optional --vrtsim.cirdb-path, VRTSIM
reads precomputed taps from cir_db.bin. Default behavior is unchanged
when the flag is not set.

Build

    cmake ../../ -GNinja -DOAI_VRTSIM_CIRDB=ON -DOAI_VRTSIM_TAPS_CLIENT=OFF
    cmake --build . --target vrtsim

How to run

gNB

    sudo ./nr-softmodem \
      -O ./targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.usrpb210.conf \
      --device.name vrtsim \
      --vrtsim.role server \
      --gNBs.[0].min_rxtxtime 3 \
      --vrtsim.cirdb 1 \
      --vrtsim.cirdb-path /home/merkeb/oai-cir-emitter/cir_db.bin

UE

    sudo ./nr-uesoftmodem \
      -C 3619200000 -r 106 --numerology 1 --ssb 516 --band 78 \
      --device.name vrtsim

Expected logs

- VRTSIM prints that channel modelling is active and uses DB backed taps
- CIRDB ready: model=..., shape=Tx x Rx, L=..., S=..., fs=..., dt=...,
  speed=...

CLI behavior and fallbacks

- TAPS client and chanmod paths are unchanged
- If --vrtsim.cirdb is not set or equals 0, VRTSIM uses the existing
  channel model path
2026-02-11 10:20:28 +01:00
Merkebu Girmay
33cc04b3e1 Add CIRDB playback test pipeline
Increase retx threshold in vrtsim with CIRDB.
2026-02-10 21:19:34 -08:00
francescomani
8410ecac29 remove VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME from gNB code 2026-02-10 16:26:24 +01:00
Robert Schmidt
42ef7bac98 Merge remote-tracking branch 'origin/armv8-a-compatibility' into integration_2026_w07 (!3896)
Add fallbacks for ARMv8a to make it compile

The current code, on ARM, uses ARMv8.1-A RDM instructions. Add a
fallback for processors that do not have this instruction set.

Add some specific compile options for this platform.

Add debian 12 to the list of architectures.
2026-02-10 14:46:57 +01:00
Eric Mittag
d7ea319b59 cmac0_prec128()/rotate_cpx_vector(): Add ARMv8.0-A fallback
The current code, on ARM, uses ARMv8.1-A RDM instructions. Add a
fallback for processors that do not have this instruction set.
2026-02-10 14:45:20 +01:00
Eric Mittag
15ee75980b Set ARMv8.2-A (Cortex-A53) specific compile options 2026-02-10 14:45:15 +01:00
Eric Mittag
7b86f61383 Add support for Debian 12 in build_oai 2026-02-10 14:45:10 +01:00
Jaroslava Fiedlerova
66e55acca0 CI: Add new pipeline to CI doc 2026-02-10 09:02:47 +00:00
Nika Ghaderi
b9df7eb84f add markdown report for gpu benchmark 2026-02-10 08:38:50 +00:00
francescomani
f15994da14 improvement in config file parameter to set analog beamforming 2026-02-10 09:04:18 +01:00
Merkebu Girmay
a707094196 vrtsim: implement batched TX writes for channel modelling
- Move buffer allocation per-batch
- Convert and write per batch
- Fix saved_samples gap handling bug
2026-02-09 23:23:10 -08:00
Merkebu Girmay
ccf5021072 radio/vrtsim: Add CIRDB support for precomputed channel taps
Integrate Channel Impulse Response Database (CIRDB) to enable playback
of precomputed realistic channel taps in vrtsim, with runtime selection
via YAML metadata.

Features:
- Read precomputed channel taps from binary database with YAML sidecar
- Runtime enable via --vrtsim.cirdb with optional paths (cirdb_yaml, cirdb_file, cirdb_path)
- Channel parameter configuration: model_id (TDL-A..E), delay spread (ds_ns), UE speed (speed_mps)
- Fallback to existing channel model options when disabled
- Time-driven snapshot progression based on elapsed simulation time

Fixes:
- RNG initialization: Add randominit() call before gaussZiggurat()
- FlatBuffers linking: Handle both 'FlatBuffers' and 'flatbuffers' package names when working with external channel emmulator
- Address review comments: use pthread directly, update calloc_or_fail, simplify CMake
2026-02-09 23:22:40 -08:00
Guido Casati
d1150d90e1 NR RRC/SDAP: enable SDAP by default and update CI/docs
- Change gNB RRC enable_sdap default to true
- Update RRC and RUNMODEM docs to reflect new default behavior
- Clean up CI gNB configs by removing redundant enable_sdap=1
- Keep explicit SDAP disable config for NFAPI gNB VNF
2026-02-09 17:01:25 +01:00
Guido Casati
3d41d28f1d RRC: enhance AMBR management in CU-CP
According to TS 38.413:

* AMBR is conditional to PDU Session Resource to setup in the Initial UE
  Context Setup procedure
* The UE Aggregate Maximum Bit Rate IE should be sent to the NG-RAN node
  if the AMF has not sent it previously. If it is included in the PDU
  SESSION RESOURCE SETUP REQUEST message, the NG-RAN node shall store
  it in the UE context
* Range is INTEGER [0..4,000,000,000,000]

To this purpose, changes in the commit:
* Init AMBR to out of range value when creating UE context
* Store AMBR in UE context whenever is received
* Assert if not set at the time of Bearer Setup (should be known at that stage)
2026-02-09 17:01:25 +01:00
Bartosz Podrygajlo
85f8d70376 Fix for split 7.2 DU configurations including DU & RU ethernet addresses
Fix parsing of DU configurations that include both RU and DU ethernet
addresses in the fhi_72 section. The extraneous DU addresses are used
in MPlane to configure the RU.
2026-02-09 16:36:50 +01:00
Jaroslava Fiedlerova
33ab261ac8 Add RAN-Channel-Simulation into parent CI pipeline 2026-02-09 15:19:07 +00:00
Jaroslava Fiedlerova
036793f55e CI: ensure proper alignment of ctest log report 2026-02-09 15:19:07 +00:00
Jaroslava Fiedlerova
50411ad86d CI: build and run CUDA channel simulation unit tests 2026-02-09 15:19:07 +00:00
Jaroslava Fiedlerova
2c4885c662 CI: Add XML for channel simulator testing 2026-02-09 15:19:07 +00:00
Jaroslava Fiedlerova
34e072823d CI: Unify PhySim build/deploy actions and select script from XML 2026-02-09 15:19:07 +00:00
Jaroslava Fiedlerova
400e7b7ea3 CI: Add Dockerfile for channel simulation build on GH with CUDA support 2026-02-09 15:19:07 +00:00
Jaroslava Fiedlerova
4d7ed95179 CI: Add cmake file for CUDA channel simulation ctest threshold check 2026-02-09 15:18:50 +00:00
Jaroslava Fiedlerova
1ef9812e59 Add ctests for test_channel_scalability
For now, test in the following configuration:
- 16 parallel channels
- channel length of 32 and 128
- with 61440 and 122880 samples
- 12 trials per each test (due to CUDA kernel loading delay in first iterations)
- multiple MIMO configurations: 2TX - 2/4/8/32 RX, 2/4/8/32 TX - 2RX
2026-02-09 15:01:05 +00:00
Robert Schmidt
9dddad86a1 Merge remote-tracking branch 'origin/add_undocumented_aerial_error_codes' into integration_2026_w07 (!3905)
Add undocumented Aerial ERROR.indication vendor specific error codes

This MR adds the remaining vendor-specific ERROR.indication error codes
that are undocumented in the Aerial online documentation, but are
present in the cuPHY-CP/scfl2adapter/lib/scf_5g_fapi/scf_5g_fapi.h
header file.

This change stems from the appearance of an undocumented error code
during testing (SCF_ERROR_CODE_L1_MISSING_UL_IQ = 0x44) It aims to ease
the comprehension of the errors thrown by Aerial L1.
2026-02-09 14:40:52 +01:00
Robert Schmidt
a1f1726d92 Merge remote-tracking branch 'origin/check_rrc_config_ue' into integration_2026_w07 (!3899)
Solving issues caused by invalid RRC configuration

Verify RRC configuration.
2026-02-09 14:39:43 +01:00
Guido Casati
5ad1f14cb8 RRC: refactor F1 DRB setup list filling into shared helpers
Extract common code from `fill_drb_to_be_setup_from_e1_resp` and
`rrc_fill_f1_drb_to_setup` into reusable helper functions to reduce
duplication and improve maintainability. This refactoring enables
multi-QoS flow handling per DRB and prepares helpers for upcoming
PDU Session Modify changes.

Impact:
- Enables multi-QoS flow support: `rrc_fill_f1_drb_to_setup` now
  collects all QFIs mapped to a DRB instead of only the first one
- Reduces code duplication between E1 response and direct DRB setup
  code paths
- Improves maintainability by centralizing F1 DRB setup logic

Major changes:
- Add `fill_f1_drb_info_nr`: fills DRB information IE including QoS
  flows from QFI list
- Add `fill_f1_drb_to_be_setup`: creates F1 DRB to setup structure
  from RRC DRB, PDU session, and QFI list
- Add `fill_f1_drbs_from_e1`: processes DRBs from E1 response and
  extracts QFIs from drb_config->qosFlows
- Refactor `fill_drb_to_be_setup_from_e1_resp` to use
  `fill_f1_drbs_from_e1`
- Refactor `rrc_fill_f1_drb_to_setup` to collect all QFIs mapped to
  each DRB and use `fill_f1_drb_to_be_setup`
2026-02-09 14:02:12 +01:00
Guido Casati
2ed28c84b3 RRC/NGAP: refactor rrc_gNB_process_NGAP_PDUSESSION_MODIFY_REQ
TS 38.413 8.2.3 PDU Session Modify:

> For each PDU session which failed to be modified, the PDU Session Resource Modify
> Unsuccessful Transfer IE shall be included containing the failure cause

> If the NG-RAN node receives a PDU SESSION RESOURCE MODIFY REQUEST message containing
> some PDU Session ID IEs (in the PDU Session Resource Modify Request List IE) that the
> NG-RAN node does not recognize, the NG-RAN node shall report the corresponding invalid
> PDU sessions as failed in the PDU SESSION RESOURCE MODIFY RESPONSE message
> with an appropriate cause value

Changes in the commit:

* add rrc_gNB_ngap_pdusession_mod_failure helper function to handle
  abnormal conditions and send NGAP response with (all) failed PDU sessions
  * improve error handling: send NGAP response instead of silently returning -1
    when UE context lookup fails (unknown RAN UE NGAP ID)
  * add AMF UE NGAP ID validation: check stored AMF UE NGAP ID matches request
    and send failure response if mismatch (per 3GPP TS 38.413)
* handle unrecognized PDU Session IDs per 3GPP TS 38.413 8.2.3.4: add to
  failed list to be sent in the reponse message
* simplify failure path: reuse rrc_gNB_send_NGAP_PDUSESSION_MODIFY_RESP
  instead of manually constructing response message
* remove failed PDU sessions from RRC list in rrc_gNB_send_NGAP_PDUSESSION_MODIFY_RESP
* remove redundant code and improve code organization
* add bounds checking
* improve function signature
2026-02-09 14:01:50 +01:00
Guido Casati
eaf27acb3b RRC/NGAP: refactor rrc_gNB_send_NGAP_PDUSESSION_MODIFY_RESP
This commit refactors the rrc_gNB_send_NGAP_PDUSESSION_MODIFY_RESP function
to improve code clarity, fix bugs, and ensure compliance with 3GPP TS 38.413
section 9.2.1.6.

The main improvement is ensuring the PDU Session Resource Modify Response message
is always sent with mandatory IEs, even when there are no PDU sessions to report
in the optional lists.

Key changes:
- Initialize message structure parameters to 0 by leveraging structure
  initialization, ensuring clean state
- Replace local counter variables (pdu_sessions_done, pdu_sessions_failed)
  with direct access to resp->nb_of_pdusessions and resp->nb_of_pdusessions_failed,
  eliminating redundant state tracking and improving code clarity
- Remove conditional message sending: always send the response message
  (per 3GPP TS 38.413 9.2.1.6, PDUSessionResourceModifyResponse must always
  be sent with mandatory IEs: AMF-UE-NGAP-ID and RAN-UE-NGAP-ID, even when
  optional lists are empty)
- Fix duplicate assignment: remove redundant p->pdusession_id assignment
  (was assigned twice in the PDU_SESSION_STATUS_DONE case)
- Improve failed PDU session handling: use direct structure assignment
  (failed->cause = session->cause) instead of field-by-field copying,
  making the code more maintainable
- Remove failed PDU session upon response
- Enhance logging: improve log messages for better debugging and clarity
- Add function documentation comment
2026-02-09 14:01:50 +01:00
Guido Casati
7982374f6a RRC/NGAP: add utility function to fill E1 QoS to setup list from NGAP
Introduce fill_e1_qos_flow_to_setup to translate pdusession_level_qos_parameter_t (NGAP)
into qos_flow_to_setup_t (E1), including ARP and QoS characteristics (dynamic/non-dynamic).

Refactor fill_e1_drb_to_setup to use the new helper for building QoS flows.
* Only include QoS flows whose drb_id matches the target DRB.
* Add DevAssert(drb_ngran.numQosFlow2Setup > 0) to ensure at least one QoS flow is added.

This change centralizes and simplifies QoS mapping logic between NGAP inputs
and E1 DRB configuration. It ensures correctness by associating QoS flows
to the appropriate DRB.

Major changes:
- Extract QoS flow mapping logic into fill_e1_qos_flow_to_setup helper function
- Filter QoS flows by matching drb_id before adding to DRB setup list
- Replace inline mapping code with helper function call
- Add assertion to verify at least one QoS flow is added per DRB
2026-02-09 14:01:08 +01:00
Guido Casati
2923e50ed0 RRC/E1AP: Fix SDAP header mapping in E1AP and test callback header handling
This commit fixes two related issues:

1. SDAP Header Mapping Bug (cucp_cuup_handler.c):
   The original code incorrectly mapped SDAP header configuration from
   internal E1AP representation to ASN.1 enum values. The internal
   representation (`bearer_context_sdap_config_t`) uses true=present/false=absent,
   while ASN.1 enum (`E1AP_SDAP_Configuration_t`) uses
   0=present/1=absent. The fix correctly inverts the mapping:
   - Internal true (1) → ASN.1 0 (present)
   - Internal false (0) → ASN.1 1 (absent)

The commit also clarifies internal representation in the stack.

2. Test Overhead Adjustment (nr-cuup-load-test.c):
   The change in (1) led to a failure in nr_cuup_functional_test
   with assertion: "size % 4 == 0" in recv_ng()

   - Changed UL packet overhead from 3 bytes to 2 bytes in sender_thread()
   - Before the SDAP fix, the test incorrectly accounted for 3 bytes:
     * 2 bytes PDCP header (correct)
     * 1 byte SDAP header (incorrectly included)
   - After the SDAP fix, SDAP headers are correctly set to absent, so
     only 2 bytes (PDCP header) are needed

   This ensures the test sends packets with the correct header size,
   matching what CU-UP expects after the SDAP configuration fix.

The load test does not enable SDAP headers, therefore the original 3-byte
overhead was possibly a workaround for the SDAP header bug.
With the bug fixed, the test correctly uses 2-byte overhead (PDCP header).
2026-02-09 13:19:02 +01:00
Guido Casati
53c0d2d306 NGAP: refactor PDU Session Resource Modify struct definition
This commit refactors the PDU Session Resource Modify Response message
structures to improve naming, documentation, and compliance with 3GPP TS 38.413 9.2.1.6.

Changes in NGAP:
- Rename qos_flow_tobe_modified_t to qos_flow_addmod_response_item_t to better
  reflect its purpose as a QoS Flow Add or Modify Response Item IE (as per specs)
- Add mandatory AMF UE NGAP ID field to ngap_pdusession_modify_resp_t structure
- Optimize field types: change nb_of_pdusessions and nb_of_pdusessions_failed
  from uint16_t to uint8_t (NGAP_MAX_PDU_SESSION limit) (ref 3GPP TS 38.413, 9.2.1.6)
- Update PDU Session Modify Response encoder to use amf_ue_ngap_id from the
  message structure (pdusession_modify_resp_p->amf_ue_ngap_id) instead of
  retrieving it from UE context (ue_context_p->amf_ue_ngap_id)
- Add comprehensive comments with 3GPP TS 38.413 section references throughout

Changes in RRC/NGAP:
- Populate amf_ue_ngap_id field in PDU Session Modify Response message from
  UE context
- Update type reference to qos_flow_addmod_response_item_t
2026-02-09 13:19:02 +01:00
Guido Casati
fa0542f845 NGAP: fix NGAP PDU Session Modify transfer encoding
Encode response/unsuccessful transfers using existing stack-allocated transfer structs.
2026-02-09 13:19:02 +01:00
Guido Casati
c679b5953b E1AP: rename numQosFlow2Setup to numQosFlowsMod in DRB To Modify List
A DRB To Modify Item contains a Flow Mapping Information,
which overrides previous mapping information. For consistency,
rename the count member to reflect a QoS Flow modification,
since it is not limited to setup only.

- Rename DRB flow mapping counters to `numQosFlowsMod`
  for a DRB To Modify List
- Adjust encode/decode/equality + E1AP tests
2026-02-09 13:19:02 +01:00
Guido Casati
e490faa60c E1AP: add DRB To Remove list to E1 Bearer Context Modification lib
Add DRB To Remove List IE to PDU Session To Modify list, which is sent
in the Bearer Context Modification request. This allows the CUCP to
inform the CUUP about DRBs to be released in a specific PDU session
during a MODIFY procedure.

Changes:

* Add struct definition
* Add enc/dec/eq/cp func
* Add test
2026-02-09 13:19:02 +01:00
Guido Casati
d38188e153 RRC: remove unused drbs configuration parameter
- Delete drbs field from gNB_RrcConfigurationReq and its use in RCconfig_NRRRC()
- Remove GNB_CONFIG_STRING_DRBS, help text, index, and GNBPARAMS_CHECK entry from gnb_paramdef.h
- Drop DU-side verification and DRB count logging in gnb_config.c
2026-02-09 13:19:02 +01:00
Jaroslava Fiedlerova
b40d2f60c5 Adjust output reporting of test_channel_scalability
This modification enables us to use the same analysis function in CI
as we use for physims.
2026-02-09 09:29:36 +00:00
Nika Ghaderi
44875e1c58 Add Scalability Benchmark
This commit introduces a new, configurable benchmark,
`test_channel_scalability`, designed to measure the performance and
scalability of the CUDA channel simulation pipeline under various
conditions.

This benchmark provides several key features:
- It supports multiple GPU execution models, including a high-throughput
  "batch" mode, an asynchronous "stream" mode, and a "serial" mode for
  baseline measurements.
- It includes an optional interference simulation mode, activated by the
  `--sum-outputs` flag, which sums the outputs of multiple parallel
  channels.
- Simulation parameters (MIMO configuration, signal length,
  channel length, and batch size) are configurable via command-line
  arguments.
- It runs the full simulation pipeline on both the CPU and the GPU,
  reporting the average execution time for each and calculating the
  overall speedup.
2026-02-09 09:29:36 +00:00
Nika Ghaderi
affab00c90 Add Batched and Streamed Functions for Scalability
This commit extends the CUDA API with new functions designed for
high-throughput scalability testing and advanced concurrency.

Key additions include:
- Batched versions of the kernels (`..._batched`) that use the
  `blockIdx.z` grid dimension to process many independent channel
  simulations in parallel.

- A C-callable wrapper, `run_channel_pipeline_cuda_batched`, to
  orchestrate the execution of these new kernels.

- A "streamed" version of the pipeline,
  `run_channel_pipeline_cuda_streamed`, which accepts a
  `cudaStream_t` as an argument. This allows the calling
  application to manage the execution stream, enabling overlap
  with other GPU or CPU tasks.
2026-02-09 09:29:36 +00:00
Nika Ghaderi
d43d267626 Add Performance Benchmark for Full Channel Pipeline
This commit adds a performance benchmark for the end-to-end channel simulation pipeline, named `test_channel_simulation`. Its methodology is as follows:

- It systematically iterates through a matrix of test cases, varying
  MIMO configuration (Tx/Rx antennas), signal length, and channel
  length.
- For each case, it runs both the full CPU pipeline (`multipath_channel_float`
  followed by `add_noise_float`) and the single `run_channel_pipeline_cuda`
  function.
- It measures the average execution time for both implementations over
  many trials and calculates the resulting speedup.

This provides a performance characterization of the GPU pipeline across different workloads and directly compares it to the CPU baseline.
2026-02-09 09:29:36 +00:00
Nika Ghaderi
2cb960df4e Create End-to-End CUDA Channel Simulation Pipeline
This commit introduces the main C-callable pipeline function,
`run_channel_pipeline_cuda`, located in a new `channel_pipeline.cu`
file.

This function serves as the primary entry point for the GPU channel
simulation. It orchestrates the entire sequence of operations:
- Manages Host-to-Device data transfers for the input signal and
  channel coefficients.
- Launches the `multipath_channel_kernel` and the
  `add_noise_and_phase_noise_kernel` in the correct order.
- Manages the Device-to-Host data transfer for the final output signal.
- Synchronizes to ensure completion before returning.
2026-02-09 09:29:36 +00:00
Nika Ghaderi
7101dc04d1 Add Performance Benchmark for Noise Generation
This commit adds a new standalone benchmark, `test_noise`, to measure
and compare the performance of the CPU and CUDA implementations of noise
generation.

The benchmark's methodology is as follows:
- It iterates through various configurations, including different
  numbers of receive antennas and signal lengths.
- For each configuration, it runs both the CPU (`add_noise_float`)
  and CUDA (`add_noise_cuda`) functions multiple times to get a stable
  average execution time.
- It prints a formatted table comparing the CPU and GPU latencies and
  calculates the resulting speedup.
2026-02-09 09:29:36 +00:00
Nika Ghaderi
257b296e41 Implement CUDA Noise and Phase Noise Kernel
This commit adds the CUDA implementation for adding Additive White
Gaussian Noise (AWGN) and phase noise to the signal. The code is
located in phase_noise.cu.

- The `add_noise_and_phase_noise_kernel` uses the NVIDIA cuRAND
  library for efficient parallel random number generation.
- Helper functions are included to create, initialize, and destroy
  the cuRAND states required by the kernel.
- Placeholder for a C-callable wrapper, `add_noise_cuda`, is also
  provided.
2026-02-09 09:29:36 +00:00
Nika Ghaderi
97a14c3960 Add Unit Test for CUDA Multipath Channel Kernel
This commit adds a new standalone unit test, `test_multipath`, to
validate the CUDA implementation of the multipath channel.

The test performs the following steps:
- Generates a random input signal and channel model.
- Runs the CPU version (`multipath_channel_float`) to get a baseline result.
- Runs the CUDA version (`multipath_channel_cuda`) with the same inputs.
- Compares the two outputs by calculating the Mean Squared Error (MSE)
  and ensures it is below a small tolerance.
2026-02-09 09:29:36 +00:00
Nika Ghaderi
77d854bdf3 Implement CUDA Multipath Channel Simulation
This commit introduces the CUDA implementation of the multipath channel
model in `multipath_channel.cu`.

- Implements `multipath_channel_kernel` using shared memory for
  efficient, high-performance convolution.

- Provides a C-callable wrapper, `multipath_channel_cuda`, to
  orchestrate the full pipeline of data transfers and kernel
  launches.

- The wrapper includes support for multiple memory models (Explicit
  Copy, Unified Memory, ATS) via preprocessor directives to adapt to
  different build configurations.

- Adds a `interleave_channel_output_cuda` utility to convert signal
  data from the CPU's planar format to the GPU's interleaved format.
2026-02-09 09:29:36 +00:00
Nika Ghaderi
c54f0f7955 Refactor and extend CPU channel model with float support
This commit refactors the CPU-based channel model for improved reusability and extends it with single-precision floating-point support.
This serves as a performance and correctness baseline for the new CUDA implementation.

Key changes include:

	- The original double-based multipath_channel function is refactored to remove hardcoded antenna dimensions from its signature. It now accepts dynamically sized arrays, making it more flexible for use in simulators like dlsim and ulsim.

	- A new multipath_channel_float function is introduced to operate on float data types, matching the GPU's native format.

	- A corresponding add_noise_float function is also added to complete the floating-point CPU pipeline.

	- The new float-based functions are designed to work with an interleaved IQ sample format ([I, Q, I, Q]), which is more suitable for vectorized (SSE) and GPU processing.
2026-02-09 09:29:36 +00:00
Nika Ghaderi
70726903f3 Configure CMake for CUDA and SSE simulations
This commit adds the initial infrastructure for building accelerated simulation components.

   - Adds the CUDA_ENABLE option and logic to find the CUDA toolkit.

   - Adds the CHANNEL_SSE option to enable SSE-specific code paths.

   - Sets required properties on the SIMU target to allow linking with CUDA-compiled objects.

   - Creates the initial oai_cuda.h header for the public API.
2026-02-09 09:29:36 +00:00
francescomani
1d5e2d84c2 add safety check to prevent segfault when dealing with DMRS mapping type for DLSCH and ULSCH (#1019) 2026-02-08 09:13:00 +01:00
francescomani
9b381f5d10 declare RLF to re-establish or restart the connection if the ASN1 decoding fails 2026-02-08 09:13:00 +01:00
francescomani
296fb2bd72 checking csi-rs resource mapping consistency to handle #1017 2026-02-08 09:12:58 +01:00
francescomani
562fcd322f checking SRS symbol mapping consistency to handle #1016 2026-02-08 09:09:44 +01:00
francescomani
833ff548c5 checking consistency in CSI-ResourceConfigId for channel and interference measurements in received RRC configuration
This handles issue #1018
2026-02-08 09:07:22 +01:00
francescomani
0b500d412a adding a function to check the received RRC configuration (function to be expanded in later commits)
also move functions to check RRC configuration to a new file not to overload the already big rrc_UE.c
2026-02-08 08:51:17 +01:00
Shubhika Garg
824d9035c1 fix(ci): remove git reset command from Jenkinsfile
- By default, eNB_CommitID is set as 'develop' in the config
       - When OAI-FLEXRIC-RAN-Integration-Test is triggered by upstream FlexRIC push events, it takes `develop`
       - Triggered by RAN takes commit SHA where `origin/SHA` does not work
2026-02-06 13:16:12 +01:00
Rúben Soares Silva
1271f166e0 Add undocumented Aerial ERROR.indication vendor specific error codes 2026-02-06 10:09:02 +00:00
francescomani
a2a354a447 fix analog beamforming fapi structure generation 2026-02-06 09:03:32 +01:00
Jaroslava Fiedlerova
9777d23173 Merge branch 'integration_2026_w06' into 'develop'
Integration `2026.w06`

* !3690 [FHI72] Support large DU delay profiles in the xran F, and include ProtO-RU emulator designed to run 7.2 with an USRP
* !3887 Update RHEL UBI image source to `registry.redhat.io`
* !3882 Change Aerial to pack directly in nvIPC message buffer
* !3895 CI: Ensure OAI-FLEXRIC-RAN-Integration-Test pipeline always uses latest commit for non-MR builds
* !3873 Ensure noise power is non-zero
* !3889 Enable imscope for split7.2
* !3801 Resolve "7.2 split ru_thread slot miss
* !3898 Fix config_libconfig_get for string
* !3876 Removing the duplicate loop in ULSCH power computation

Closes #972

See merge request oai/openairinterface5g!3888
2026-02-06 07:42:09 +00:00
Jaroslava Fiedlerova
068e91ad0c Merge remote-tracking branch 'origin/string_libconfig_fix' into integration_2026_w06 (!3898)
Fix config_libconfig_get for string

Change in libconfig reading input for string to reject if it is not of type
string with an error message
2026-02-05 17:53:45 +01:00
Jaroslava Fiedlerova
543fab819e Merge remote-tracking branch 'origin/fix-ulsch_power' into integration_2026_w06 (!3876)
Removing the duplicate loop in ULSCH power computation

- Removing the duplicate loop in ULSCH power computation.
- The logs obtained are as follows:

[NR_MAC] UE dc65: 134.11 Generating RA-Msg2 DCI, RA RNTI 0x113, state 1, preamble_index(RAPID) 42, timing_offset = 5 (estimated distance 195.3 [m])
[PHY]    PUSCH not detected in 134.17 (307,302,50)
[PHY]    PUSCH not detected in 134.17 (311,309,50)
[NR_MAC]  135 4: RA RNTI 41c5 CC_id 0 Scheduling retransmission of Msg3 in (135,8)
[NR_MAC]  135 4: RA RNTI a3cc CC_id 0 Scheduling retransmission of Msg3 in (135,8)
[PHY]    PUSCH not detected in 134.18 (310,312,50)
[NR_MAC]  135 5: RA RNTI dc65 CC_id 0 Scheduling retransmission of Msg3 in (135,9)
[PHY]    PUSCH not detected in 135.8 (309,309,50)
[PHY]    PUSCH not detected in 135.8 (313,308,50)
[NR_MAC]  13515: RA RNTI 41c5 CC_id 0 Scheduling retransmission of Msg3 in (135,19)
[NR_MAC]  13515: RA RNTI a3cc CC_id 0 Scheduling retransmission of Msg3 in (135,19)
[PHY]    PUSCH not detected in 135.9 (308,300,50)
[NR_MAC]  136 4: RA RNTI dc65 CC_id 0 Scheduling retransmission of Msg3 in (136,8)
[NR_PHY] [RAPROC] 135.19 Initiating RA procedure with preamble 6, energy 19.1 dB (I0 63, thres 120), delay 4 start symbol 0 freq index 0
[PHY]    PUSCH not detected in 135.19 (310,310,50)
[PHY]    PUSCH not detected in 135.19 (312,310,50)
[NR_MAC] 135.19 UE RA-RNTI 010b TC-RNTI 0888: initiating RA procedure
[NR_MAC] UE 0888: Sync beam index 0
[NR_MAC] UE 0888: Msg3 scheduled at 136.17 (136.10 TDA 2) start 0 RBs 8
[NR_MAC] UE 0888: 136.10 Generating RA-Msg2 DCI, RA RNTI 0x10b, state 1, preamble_index(RAPID) 6, timing_offset = 4 (estimated distance 156.3 [m])

- For the same scenario, develop branch gives exactly the same result. When
  there is no PUSCH, the power measured for ULSCH and noise are practically
  the same. Furthermore, the value in develop branch is also approximately
  310 for the same noise level.
2026-02-05 17:49:06 +01:00
Guido Casati
337cc4bbe7 Doc: update RRC documentation with new multi-cell architecture
Expand RRC developer and usage documentation to match the current
multi-cell design with separate DU and cell management.

- rrc-dev.md: Document DU and cell data structures and key functions
  (get_du_by_assoc_id, get_cell_by_cell_id, rrc_add_cell_to_du, etc.);
  add DU and cell lifecycle (F1 Setup, config update, disconnection)
  and UE cell association (serving cells, PCell/SCells) with sequence
  diagrams; add handover and cell association update flow; update UE
  context description.
- rrc-usage.md: Update DU/cell list output format and description
  (e.g. integrated DU-CU) and multi-cell per DU wording.
2026-02-05 16:57:31 +01:00
Guido Casati
e75399707c RRC multi-cell (finalise): add informative comments and logging
This commit adds documentation comments and logging to improve
code readability and debugging capabilities for the multi-cell
architecture.

Changes:
- gnb_config.c: Add logging when configuring DU with cell ID and PCI
- rrc_gNB_du.c: Add documentation comment for ssb_arfcn_mtc()
- rrc_gNB_du.c: Add documentation comment for dump_du_info()
2026-02-05 16:57:31 +01:00
Guido Casati
9bfe62b85b RRC multi-cell (finalise): make internal helper functions static
After introduction of new cell management design, these helper functions
are now only used internally within their respective modules and do not
need to be part of the public API. They are made static and their
declarations are removed from public headers.

Changes:
- f1ap_interface_management.c: Make free_f1ap_cell() and
  copy_f1ap_served_cell_info() static
- f1ap_interface_management.h: Remove declarations for the above functions
- rrc_gNB_du.c: Make get_dl_band() and get_ssb_scs() static
- rrc_gNB_du.h: Remove declarations for get_dl_band() and get_ssb_scs()
2026-02-05 16:57:31 +01:00
Guido Casati
bd2fc0d237 RRC multi-cell: enable multiple cell in F1 Setup
Remove the single-cell limit in F1 Setup Request processing and
refactor to loop-based cell handling. Move cell validation (PLMN
check, neighbor configuration validation, system info extraction),
cell creation, SIB encoding, and neighbor labeling inside a loop
over all available cells.

Update F1 Setup Response to include all cells instead of hardcoding to 1.

Add warning log when more than one cell is received. Add proper
cleanup with free_f1ap_setup_response() on error paths.

Impact:
- F1 Setup now accepts and processes multiple cells from a single
  DU, enabling multi-cell deployments
- All cells are validated, created, and included in the setup
  response
2026-02-05 16:55:32 +01:00
Jaroslava Fiedlerova
0858ee8877 Merge remote-tracking branch 'origin/972-7-2-split-ru_thread-slot-miss' into integration_2026_w06 (!3801)
Resolve "7.2 split ru_thread slot miss"

Closes #972
2026-02-05 15:21:25 +01:00
rmagueta
0c2a9384d0 Removing the duplicate loop 2026-02-05 13:33:03 +00:00
francescomani
269880f89d change in libconfig for string to reject an input that is not of type string with error message 2026-02-05 13:35:13 +01:00
Robert Schmidt
12fc8112d9 Merge remote-tracking branch 'origin/imscope-for-7.2' into integration_2026_w06 (!3889)
Enable imscope for split7.2
2026-02-05 13:28:08 +01:00
andrewse
95c8fa468a fhi_72: Track delay processing via atomic variable
Add xran_queue_length atomic variable to count the number of messages in
oran_sync_fifo (as notifiedFIFO_t does not do this). Use this to
tolerate some double messages (e.g. excessive processing delay), but
start to skip if messages accumulate.

Prior to this change, "Detected double sync message" was printed each
time there was more than one message, which reflected the previous
behavior when using polling, but the gNB might catch up if it is only
once. The new logic ensure that we don't skip individual slots but do so
once messages start to accumulate.
2026-02-05 13:19:12 +01:00
Guido Casati
d471046623 RRC multi-cell: complete migration to cell container architecture
Finalize the migration from single-cell-per-DU to the multi-cell
architecture: remove legacy DU/cell fields and refactor RRC procedures
to use cell containers and UE serving cells instead of DU-based lookups.

Data structure changes:
- Remove nr_cellid from gNB_RRC_UE_t; cell identity comes from the UE's
  serving_cells (PCell entry via ue_get_pcell_entry(ue)). UE_LOG_ARGS
  and LOG_UE_* macros take a PCell entry pointer for null-safe cell_id
  in logs; all call sites pass ue_get_pcell_entry(ue).
- Remove setup_req, mib, sib1, mtc from nr_rrc_du_container_t (held in
  cell containers); remove nr_cellid from gNB_RRC_INST and its
  assignment in gnb_config.c.

Function and signature updates:
- get_ssb_arfcn(): take cell container instead of DU.
- label_intra_frequency_neighbours(): drop du parameter, use cell only.
- Handover: Handover context (source and target) now stores cell
  pointers (source->cell, target->cell) instead of DU pointers. When
  the context is created (N2: on Handover Request; F1: in
  nr_rrc_trigger_f1_ho), the target cell is set in ho_context->target->cell
  and, for F1, the source cell in ho_context->source->cell.
  nr_initiate_handover() takes only source_cell and reads the target
  from ho_ctx->target->cell, so it no longer takes a target parameter.
  The target is known at handover creation time, while the UE’s
  serving_cells are only updated after F1 UE Context Setup Response.
- nr_rrc_trigger_f1_ho() and the N2 handover path pass cell pointers
  and set ho_context->target->cell (and for F1, source->cell) when
  the handover is triggered.

Procedure refactoring:
- Lookups: replace get_du_by_cell_id() with get_cell_by_cell_id()/
  get_cell_by_pci(); remove get_du_by_cell_id() and
  get_cell_information_by_phycellId().
  Rationale: cell-specific data (MIB, SIB1, mtc, info) now lives in
  cell containers, and a DU can host multiple cells. Callers need the
  cell (to use cell->info, cell->mtc, etc.), not the DU. Looking up
  by cell_id therefore returns the cell container
  (get_cell_by_cell_id()); when the DU is needed, use
  cell->assoc_id and get_du_by_assoc_id(). Looking up by PCI is
  scoped (e.g. get_cell_by_pci_for_du() for a given DU, or via the
  UE’s serving cells) because PCI is not globally unique.
- Setup/Reestablishment: resolve cell, register as PCell via
  rrc_add_ue_serving_cell(); reestablishment resolves cell by PCI
  (rrc_get_cell_by_pci_for_du), then rrc_remove_ue_scells_from_du +
  rrc_add_ue_serving_cell; validate_ue_cell_association() after update.
- Measurement config: use cell->info (SCS/band) and cell->mtc.
- Handover: use cell containers end-to-end; after UE context
  modification response call nr_rrc_update_cell_assoc_after_ho().
- NGAP: cell_id and TAC from UE PCell via rrc_get_pcell_for_ue();
  Handover Notify: get cell for message content, use get_du_for_ue() for
  DU existence check; paging resolves UE by 5G-S-TMSI-Part1 and uses that
  UE's PCell (rrc_get_pcell_for_ue) for F1AP_PAGING_IND nr_cellid.

Performance and robustness:
- Use rrc_get_pcell_for_ue() when cell data is needed; use
  get_du_for_ue() when only the DU is needed (F1/N2 HO trigger,
  Handover Notify DU check) for efficiency.
- Reestablishment: remove old PCell before adding new; error handling
  for PCell add and validation.

Code cleanup:
- F1 setup: stop copying/storing setup request in DU container; F1
  disconnect only frees cell containers via rrc_free_cell_container().
- dump_du_info(): iterate du->cells and show all cells per DU.
- telnetsrv_ci.c: use du->gNB_DU_id directly and fix format (%ld).
- UeContextSetupRequest servCellIndex set to RRC_PCELL_INDEX; remove
  servCellIndex from F1AP UE context modification request.
2026-02-05 11:44:10 +01:00
Guido Casati
5980dbcb40 RRC multi-cell: use cell lookups in NGAP Handover Request handling
In rrc_gNB_NGAP.c, rrc_gNB_process_Handover_Request() is updated to
resolve the target by cell instead of by DU, then resolve the DU from
the cell's assoc_id. This aligns Handover Request with the new
cell-centric model and cell management APIs.

- Resolve target with get_cell_by_cell_id(&rrc->cells, msg->nr_cell_id)
  instead of get_du_by_cell_id(); on failure, log "no cell found" and
  send NGAP handover failure.
- Resolve DU with get_du_by_assoc_id(rrc, cell->assoc_id); add a
  failure path (log, NGAP handover failure, return -1) when no DU
  exists for the cell's assoc_id.
- Use cell->info (nr_rrc_cell_info_t) for logging and for key
  derivation (nr_derive_key_ng_ran_star); use du->assoc_id
  for UE context creation instead of du->setup_req->cell[0].info.

get_ssb_arfcn(du) is unchanged and still takes the DU; other DU-based
lookups are kept where still required.
2026-02-05 11:44:10 +01:00
Guido Casati
15c79b0288 RRC multi-cell: adopt cell management in F1 DU configuration update procedures
Migrate F1 DU configuration update procedures in openair2/RRC/NR/rrc_gNB_du.c
to use the cell management API instead of accessing cell data through
setup_req, completing the transition to the new multi-cell architecture.

1. update_cell_info:
   - Refactored to use cell management API: takes RRC instance, old cell_id,
     and new cell info; finds cell via get_cell_by_cell_id() internally.
   - Returns cell container pointer (or NULL on failure) instead of void.
   - When cell_id changes: removes cell from RB tree (old key), updates via
     cp_f1_served_cell_info_to_cell(), re-inserts (new key); validates no
     duplicate cell_id/PCI before allowing change.
   - Frees old MTC when new measurement timing config is present.
   - Encapsulates cell lookup and update logic.

2. rrc_gNB_process_f1_du_configuration_update:
   - Uses update_cell_info() for cell modify; validates cell belongs to DU
     (assoc_id) after update.
   - Duplicate checking via get_cell_by_cell_id() and
     rrc_get_cell_by_pci_for_du()
   - For cells to add: validates duplicate cell_id globally and duplicate
     PCI within DU; rejects with logging.
   - MIB/SIB1 updated in cell container (cell->mib, cell->sib1); uses
     du->gNB_DU_id; passes cell to label_intra_frequency_neighbours();
     removes direct setup_req->cell[0] access.

Backward compatibility: setup_req remains until migration is completed;
cell-specific data is managed in the cell container and accessed via
the cell management API. Improves separation of concerns and enables
proper multi-cell support.
2026-02-05 11:44:09 +01:00
Guido Casati
95d35b9b7d RRC multi-cell: integrate cell containers into F1 setup flow
Refactor F1 setup processing to create and manage cell containers during DU
initialization, establishing the foundation for multi-cell architecture where
cells are managed independently from DUs.

Why: Cell information is currently tied to F1AP structures (f1ap_served_cell_info_t),
which complicates multi-cell support. Introducing cell containers at F1 setup
decouples RRC cell management from F1AP and allows cells to be managed
independently while keeping existing code paths working.

Key changes:

1. Cell container creation (cp_f1_served_cell_info_to_cell):
   New helper copying F1AP served cell info into nr_rrc_cell_container_t (cell_id,
   pci, plmn, tac, TDD/FDD frequency info). Extracts and stores MTC in the cell.

2. Function signature updates:
   get_cell_neighbour_list() and label_intra_frequency_neighbours() now take
   nr_rrc_cell_container_t* and use cell->info; improved logging (cell_id, PCI,
   SSB ARFCN).

3. valid_du_in_neighbour_configs:
   Removed ssb_arfcn parameter; MTC is extracted and freed inside the function.

4. F1 Setup (rrc_gNB_process_f1_setup_req):
   Initialize DU cell tree (RB_INIT(&du->cells)). Populate DU-only fields
   (gNB_DU_id, gNB_DU_name, rrc_ver).
   Flow:
   - create cell with cp_f1_served_cell_info_to_cell
   - add to global tree via rrc_add_cell()
   - add DU via rrc_add_du()
   - attach cell to DU with rrc_add_cell_to_du().
   Store MIB/SIB1/MTC in cell.
   Use cell container for neighbour labeling and SIB encoding.

5. Duplicate cell detection:
   Use rrc_add_cell() for global cell tree insert; collision return indicates
   duplicate cell_id. Clearer error messages for Cell ID vs PCI conflicts.
   Use F1AP_CauseRadioNetwork_cell_not_available for cell conflicts.

6. DU configuration update:
   Use get_cell_by_cell_id() to find cell, check assoc_id, pass cell container
   to label_intra_frequency_neighbours().

7. DU disconnection:
   Use rrc_cleanup_du() to remove cells from global tree and free resources;
   logging uses DU fields (gNB_DU_id, gNB_DU_name).

8. Global cell tree:
   Initialize rrc->cells in openair_rrc_gNB_configuration().

Backward compatibility: setup_req still built via cp_f1ap_setup_request();
du->mib, du->sib1, du->mtc remain set (shared with cell container).
2026-02-05 11:44:09 +01:00
Guido Casati
c453c342ed RRC multi-cell: add integration tests
Add integration tests for RRC cell and DU management and UE serving-cell
logic so that multi-cell behaviour and regressions can be validated
without running the full stack.

* test_du_lookup() – DU container lookup by assoc_id:
  - Multiple DU creation and insertion into RRC DU tree
  - Lookup of existing DUs by assoc_id
  - Non-existing and invalid assoc_ids
  - Cleanup of DU containers and cells

* test_cell_lookup() – Cell management and UE association:
  - Cell lookup by cell_id and PCI (global and per-DU)
  - DU-specific lookup: rrc_get_cell_for_du(), rrc_get_cell_by_pci_for_du()
  - Duplicate cell and PCI collision handling (including PCI reuse across
    DUs and rejection of duplicate PCI within same DU)
  - Cell–DU association (add/remove cells from DU containers)
  - UE serving cell: add PCell/SCells, get by ID, get PCell, max serving
    cells limit, single PCell enforcement
  - validate_ue_cell_association(), rrc_remove_ue_scells_from_du()
  - Edge cases and error handling

Add openair2/RRC/NR/tests/rrc_cell_management_test.c and extend
openair2/RRC/NR/tests/CMakeLists.txt to build and register the test.
2026-02-05 11:44:09 +01:00
Guido Casati
2ff071a52e RRC multi-cell: add UE serving cell management functions
Add functions to manage UE serving cells so the RRC can track which cells
a UE is using (PCell and SCells) for multi-cell UE context and future
SCell management.

- rrc_cell_management.c / rrc_cell_management.h:
  * rrc_get_ue_serving_cell_by_id(): return serving cell by servCellIndex
    (O(k) linear search, k ≤ 32).
  * rrc_add_ue_serving_cell(ue, cell, serving_cell_id): add entry to UE
    serving_cells with validation: reject duplicate servCellIndex with
    different nci, enforce max 32 serving cells (TS 38.331), keep PCell
    at index 0 for O(1) access; return existing entry if same
    servCellIndex and nci.
  * rrc_remove_ue_scells_from_du(ue, assoc_id): remove all serving cells
    for the given DU (handover/DU disconnect); use stored assoc_id for
    O(k) comparison.
  * ue_get_pcell_entry(): return PCell entry (first element, O(1)).
  * rrc_get_pcell_for_ue(): return PCell container from cell tree using
    UE's PCell entry.
  * Header: RRC_PCELL_INDEX (0), RRC_MAX_NUM_SERVING_CELLS (32), and
    declarations for the above.

- UE context lifecycle:
  * rrc_gNB_create_ue_context(): seq_arr_init(serving_cells).
  * rrc_delete_ue_data(): seq_arr_free(serving_cells).
2026-02-05 11:44:09 +01:00
Guido Casati
6d0c7945c2 RRC multi-cell: extract DU management to cell management library
Move DU tree management from rrc_gNB_du.c into rrc_cell_management so that
DU and cell lookup logic live in one place, improving maintainability and
testability (there is no DU lib).

- rrc_cell_management: add du_compare(), RB_GENERATE(rrc_du_tree),
  get_du_by_assoc_id(), rrc_add_du(), rrc_rm_du(), rrc_cleanup_du(),
  rrc_free_du_container(); declare them in rrc_cell_management.h.
- rrc_gNB_du: move du_compare(), RB_GENERATE, get_du_by_assoc_id()
  to rrc_cell_management
2026-02-05 11:44:09 +01:00
Guido Casati
3dfdc66c41 RRC multi-cell: add cell management library with lookup and cleanup
This commit introduces a new library module (rrc_cell_management.c/h)
to centralise functions that provides cell lookup, DU-specific cell
management, and cell lifecycle managements.

The design uses a dual-tree architecture:
- Global cell tree: RB-tree at RRC level (rrc->cells) keyed by cell_id,
  used for O(log N_CELL) lookups and for maintaining num_cells.
- DU-specific storage: seq_arr_t per DU (du->cells) for iteration and
  management of cells belonging to each DU.

API added:
- Global tree: get_cell_by_cell_id()(finds cell using global RB-tree
  lookup (O(log N_CELL) complexity); rrc_add_cell(); rrc_rm_cell()
  (rrc_rm_cell removes from tree, decrements num_cells, and frees the
  cell via rrc_free_cell_container).
- DU-local seq_arr: rrc_get_cell_for_du(), rrc_get_cell_by_pci_for_du(),
  rrc_add_cell_to_du() (with duplicate cell_id/PCI checks).
- Cleanup: rrc_free_cell_container() (frees ASN.1 MIB/SIB1/MTC and
  container

Build: add rrc_cell_management static library in openair2/RRC/NR;
link it into nr_rrc from top-level CMakeLists.txt.
2026-02-05 11:44:09 +01:00
Guido Casati
b699884ae4 RRC multi-cell: add data structure definitions for multi-cell architecture
Add foundational data structures in nr_rrc_defs.h for multi-cell handling
in RRC, separating DU management from cell management.
Design uses a global cell tree for O(log N) lookups while keeping cell
ownership in DUs for locality and maintenance.

The implementation maintains backward compatibility and follows the same
patterns as existing DU and CUUP management in the codebase, i.e. RB-trees
with logarithmic complexity for scalable multi-cell deployments.

- Cell container structures:
  * nr_rrc_cell_container_t: cell-specific data (cell_id, pci, plmn, tac,
    frequency info, mib, sib1, mtc)
  * nr_rrc_cell_info_t: TDD/FDD modes; frequency structs nr_rrc_freq_info_t,
    nr_rrc_tdd_info_t, nr_rrc_fdd_info_t

- UE serving cell tracking:
  * ue_serving_cell_t: nci, serving_cell_id (ServCellIndex TS 38.331,
    0=PCell, 1-31=SCell), assoc_id for fast DU lookup
  * gNB_RRC_UE_t: seq_arr_t serving_cells, with PCell always being the
    first in the sequence

- DU container refactoring:
  * nr_rrc_du_container_t: DU-only fields (gNB_DU_id, gNB_DU_name, rrc_ver);
    seq_arr_t cells for per-DU iteration; setup_req/mib/sib1/mtc kept for
    backward compatibility

- Global cell tree:
  * gNB_RRC_INST_s: RB_HEAD(rrc_cell_tree, nr_rrc_cell_container_t) cells,
    num_cells (data only; lookup helpers get_cell_by_cell_id/get_cell_by_pci
    to be added separately)
2026-02-05 11:44:09 +01:00
Guido Casati
c6229a9c7a RRC multi-cell: enforce unique PCI in per-cell neighbour lists
Neighbour lists are built per serving cell in fill_neighbour_cell_configuration.
Each neighbour in a list is identified by PCI; having two entries with the same
PCI in one cell's list would be ambiguous and indicate a configuration error.
This commit adds validation so that duplicate PCIs within a cell's neighbour
list are detected at configuration load time and cause a fatal assertion with
a clear error message.

Changes:
- Add eq_neighbour_pci() and get_neighbour_by_pci() using
  common/utils/alg/find.h to look up a neighbour by PCI in a seq_arr.
- In fill_neighbour_cell_configuration(), before appending each
  cell's neighbour list, iterate over neighbours and assert that no PCI
  appears more than once
2026-02-05 11:44:09 +01:00
Guido Casati
4c56c6b2de Refactor (RRC): improve UE context removal logging
Replace generic UE event log with explicit INFO log including UE ID and RNTI
when removing a UE context and centralize access to UE fields via a local
pointer.

rrc_delete_ue_data removes the all the list in the UE context, including the
serving cells, and therefore the cell id should not be logged in the function
responsible for the removal of the UE context, which at this point is already
emptied and while the cells themselves are still there (in the DU/global cell
structures), the lists in the UE context are empty.
2026-02-05 11:43:59 +01:00
Jaroslava Fiedlerova
f4b9e04c61 Merge remote-tracking branch 'origin/fix-noise-calc' into integration_2026_w06 (!3873)
Ensure noise power is non-zero

Prior to this commit, noise power estimation could be zero because of a
call to clearArray() in gNB_I0_measurements(). This is problematic, as
this can lead to a noise power of 0 if all symbols in a RB are used,
which in turn leads to a spike in SNR.

To avoid this, use an intermediate array to store noise power, and only
update n0_subband_power if not all RBs are used (i.e., we can detect
noise power). Further, use an exponential moving average to smoothen
noise estimation.

Fixes: fb4235fd ("changes in PUCCH0 SNR measurement, testing for
PUCCH power control")
2026-02-05 10:20:45 +01:00
Reem Bahsoun
b285f91968 Change Aerial config file in targets to match Nvidia's CI setup 2026-02-05 10:13:01 +01:00
Laurent THOMAS
74b998a0d8 Rewrite n0_subband_power_avg_dB calculation with better locality 2026-02-04 19:22:00 +01:00
Laurent THOMAS
ee00eb346e Reformat dump_nr_I0_stats() 2026-02-04 19:11:10 +01:00
Laurent THOMAS
656b1d52a0 Remove unused global variables 2026-02-04 19:09:38 +01:00
Robert Schmidt
b533127553 Ensure noise power is non-zero
Prior to this commit, noise power estimation could be zero because of a
call to clearArray() in gNB_I0_measurements(). This is problematic, as
this can lead to a noise power of 0 if all symbols in a RB are used,
which in turn leads to a spike in SNR.

To avoid this, use an intermediate array to store noise power, and only
update n0_subband_power if not all RBs are used (i.e., we can detect
noise power). Further, use an exponential moving average to smoothen
noise estimation.

Fixes: fb4235fd50 ("changes in PUCCH0 SNR measurement, testing for
    PUCCH power control")
2026-02-04 18:36:08 +01:00
Robert Schmidt
ec0b97beae Merge remote-tracking branch 'origin/ci-fix-jenkinsfile' into integration_2026_w06 (!3895)
CI: Ensure OAI-FLEXRIC-RAN-Integration-Test pipeline always uses latest commit for non-MR builds

Related MR -> mosaic5g/flexric!77

For push events, we have:

    sh "git fetch"
    sh "git checkout -f ${commitID}"

We need to do a reset hard so that the run is executed on synchronized
develop branch.

In the pipeline, we see:

    17:38:34  + git checkout -f develop
    17:38:34  Previous HEAD position was 9cb79027e4 Merge branch 'integration_2026_w05' into 'develop'
    17:38:34  Switched to branch 'develop'
    17:38:34  Your branch is behind 'origin/develop' by 526 commits, and can be fast-forwarded.
    17:38:34    (use "git pull" to update your local branch)

After implementing the fix:

Below are the runs for pipeline triggered by a merge request event:

    https://jenkins-oai.eurecom.fr/job/OAI-FLEXRIC/229/
    https://jenkins-oai.eurecom.fr/job/OAI-FLEXRIC-RAN-Integration-Test/3788/

In the OAI-FLEXRIC-RAN-Integration-Test pipeline, which is executed by
Build with Parameters from OAI-FLEXRIC

We see the pipeline took the latest develop:

    11:26:02  + git reset --hard origin/develop
    11:26:02  HEAD is now at 9cb79027e4 Merge branch 'integration_2026_w05' into 'develop'
2026-02-04 12:55:33 +01:00
Robert Schmidt
357496a88a Merge remote-tracking branch 'origin/Change_nvIPC_send_functions' into integration_2026_w06 (!3882)
Change Aerial to pack directly in nvIPC message buffer

This MR changes the Aerial pack/send procedures to pack the messages
directly into the nvIPC message buffers.

This saves the use of some memcopy calls, as well as clean up the code.

The P7 message packing/send is now only handled in the file
`fapi_nv_p7.c`

Add 3 functions in fapi_nvIPC.c to allow message allocation, release and
send from fapi_vnf_p7.c

Add 2 functions to access the memory pool sizes allocated from nvIPC, as
we can't use sizeof to report the buffer size to the packing functions

Remove now unused aerial_send_P5_msg , aerial_send_P7_msg and
aerial_send_P7_msg_with_data functions

Now Aerial only has one function to handle sending P5 and another to
send P7 messages

Remove fapi_phy_api_msg from fapi_nvIPC.h as it is duplicated in
nr_fapi.h
2026-02-04 12:12:47 +01:00
Shubhika Garg
df7db3ab27 ci-fix: Ensure downstream pipeline always uses latest commit for non-MR events
- ensure the local branch is synchronized with the latest commit from the remote.
     - Related MR!77 on mosaic5g/Flexric repository
2026-02-04 11:15:18 +01:00
Rúben Soares Silva
b7867a4053 Change data_len type in aerial_pack_tx_data_request to match with nv_ipc_msg_t.data_len type 2026-02-03 10:20:45 +00:00
Rúben Soares Silva
54076927ba Remove duplicated FAPI header struct from fapi_nvIPC.h 2026-02-03 10:20:45 +00:00
Rúben Soares Silva
aeba59a9ad Change Aerial to pack directly in nvIPC message buffer.
Get mempool sizes from nvIPC for usage in the packing procedures.

Remove now unused functions.
2026-02-03 10:20:45 +00:00
Bartosz Podrygajlo
315fe92253 Enable imscope for split7.2 2026-02-03 10:04:42 +01:00
Jaroslava Fiedlerova
2c1687e44f Merge remote-tracking branch 'origin/rhel-fix' into integration_2026_w06 (!3887)
Update RHEL UBI image source to registry.redhat.io

This merge request updates the RHEL UBI base image source to registry.redhat.io,
aligning with Red Hat’s supported container registry and avoiding potential
access or availability issues with registry.access.redhat.com.
2026-02-03 08:12:06 +01:00
Jaroslava Fiedlerova
358c17ce58 Merge remote-tracking branch 'origin/xran-large-delay-profile' into integration_2026_w06 (!3690)
[FHI72] Support large DU delay profiles in the xran F, and include ProtO-RU
emulator designed to run 7.2 with an USRP

This MR does the following:
- we patch xRAN to support large DU delay profiles (i.e., T1a/Ta4 values larger
  than a TTI)
- we update the FHI72 docs to introduce ProtO-RU, a software implementation of a
  Split-7.2 O-RU with large delay profile
- we provide an example configuration for ProtO-RU

Details on the xRAN patch:
In xRAN, it appears that T1a/Ta4 values are assumed to be within a TTI. When
T1a/Ta4 values larger than a TTI are used, this causes two issues:
(1) C-plane packets to be generated later than expected, and
(2) oai_xran_fh_rx_callback() receives the wrong timing information, resulting
    in potentially empty/stale PUSCH/PRACH data to be read.
In the xRAN patch, we modify xRAN to make it handle large T1a/Ta4 values properly.
The changes include:
(1) three additional variables in offset_num_slots_* (xran_dev.h),
(2) modify "xran_timing_create_cbs" and "xran_timer_arm_for_deadline"
    (xran_cb_proc.c), and
(3) revise "tx_cp_dl_cb" and "tx_cp_ul_cb" (xran_main.c).
Additionally, we add additional guard conditions to prevent xran_tx_proc.c from
sending U-plane packets when it is not a downlink slot.
2026-02-03 08:07:56 +01:00
Xin Zhe Khooi
95df8b174e protoru: fix doc indent 2026-02-02 15:28:06 +00:00
Guido Casati
5d657c801c Refactor (F1AP): align cell lists definitions with TS 38.473
* Commit applies to Setup Request, CU/DU Configuration Update
* Set standard compliant max number of cells per DU
* Allocate large lists on the heap to prevent stack overflow
  due to the large size
* Update relevant free functions
* Also, fix bug in eq_f1ap_cu_configuration_update

Also, improve comments in struct definition.
2026-02-02 16:26:10 +01:00
Guido Casati
d73a9148de Refactor: add common helper functions to construct 5G-S-TMSI
* 5G-S-TMSI construction is defined in 3GPP TS 23.003 and
  relevant at both gNB and UE side
* Add helper functions to be later used in NG Paging
* Adopt in NAS UE
2026-02-02 16:25:47 +01:00
Xin Zhe Khooi
34c001d488 protoru: sample config update 2026-02-02 15:07:42 +00:00
Xin Zhe Khooi
0388bf0e67 protoru: add docs and sample config 2026-02-02 15:01:44 +00:00
Xin Zhe Khooi
003d72c859 fhi7.2: introduce support for T1a and Ta4 values larger than TTI interval
In xRAN, it appears that T1a/Ta4 values are assumed to be within a TTI.
When T1a/Ta4 values with larger than a TTI are used, this causes two issues: (1) C-plane packets to be generated later than expected and (2) oai_xran_fh_rx_callback() receives the wrong timing information resulting in potentially empty/stale PUSCH/PRACH data to be read.

In this patch, we modify xRAN to make it handle large T1a/Ta4 values properly.
The changes include: (1) three additional variables in offset_num_slots_* (xran_dev.h), (2) modify "xran_timing_create_cbs" and "xran_timer_arm_for_deadline" (xran_cb_proc.c), and (3) revise "tx_cp_dl_cb" and "tx_cp_ul_cb" (xran_main.c).
Additionally, we add additional guard conditions to prevent xran_tx_proc.c from sending U-plane packets when it is not a downlink slot.
2026-02-02 15:00:01 +00:00
Robert Schmidt
9cb79027e4 Merge branch 'integration_2026_w05' into 'develop'
Integration `2026.w05`

* !3850 Update vrtsim timing job thread
* !3853 Clear memory in shm_td_iq_channel after RX
* !3823 Fix RSRP overflow
* !3766 UE support to send CSI report on PUSCH
* !3848 Initial implementation of O-RU for 7.2 emulator
* !3860 NGAP: improve error handling in RRCReconfiguration from Handover Command decoding
* !3507 Create Debian and Redhat packages with CPack
* !3875 Fix FFT size for xran_fh_tx_send_slot_BySymbol() and xran_fh_rx_read_slot_BySymbol()
* !3593 NR UE: add support for multiple RF frontends
* !3769 Add Ethernet PDU session support and make PDU session request configurable
* !3831 semi-manual remove of not used #define commands
* Update RFsim4G UE configs for RFsim changes after !3593
* !3821 [FHI72] [xran F] Handle fragmented (un)compressed packets
* !3732 Implement TS 38.473 transparency for CellGroupConfig forwarding and handle re-establishment on a different DU
* !3880 Prevent the PNF from sending P7 messages after sending a STOP.indication
* !3868 CI: Upgrade Aerial pipeline to 25-3
* Revert one CI XML change after !3732

Closes #1045, #837, and #1043

See merge request oai/openairinterface5g!3877
2026-01-30 16:38:25 +00:00
Robert Schmidt
50e133f791 Revert "CI: upgrade RAN-SA-Handover-CN5G F1 handover test to test Reestablishment on a different DU"
The CI test proved not as stable as expected (because the UE triggers A3
events which we don't want), so revert this functionality while we work
on a new pipeline.

This reverts commit bc62e8abca.
2026-01-30 15:55:33 +01:00
Jaroslava Fiedlerova
5ff032f9a7 Merge remote-tracking branch 'origin/aerial_25-3' into integration_2026_w05 (!3868)
CI: Upgrade Aerial pipeline to 25-3

Upgrade Aerial CI pipeline to 25-3 after aerial-cuda-accelerated-ran became
open source.
2026-01-30 12:17:10 +01:00
Reem Bahsoun
81eb336add Add -l option to DL throughput tests in the Aerial pipeline 2026-01-30 12:13:05 +01:00
Reem Bahsoun
37b1a0a9f3 Align configuration file in targets/ with the configuration file in ci-scripts/ and fix spacing. 2026-01-30 12:13:05 +01:00
Reem Bahsoun
283063f3da Update tutorial to align with the new Aerial release (25-3) 2026-01-30 12:13:01 +01:00
Shubhika Garg
f393300da1 RHEL: switch registry to registry.redhat.io
- Switched base image source from registry.access.redhat.com to registry.redhat.io for all RHEL9 variants.
2026-01-30 10:11:21 +01:00
Jaroslava Fiedlerova
7ba52783fb CI: fix missing rfsimulator section in UE conf file in 5G RF-Sim
Update UE config introduced in !3769 to align with changes from !3593.
2026-01-30 09:18:23 +01:00
Robert Schmidt
a0ff4828cf Merge remote-tracking branch 'origin/prevent-p7-msg-after-stop-indication' into integration_2026_w05 (!3880)
Prevent the PNF from sending P7 messages after sending a STOP.indication

Upon stopping the PNF, when sending the STOP.indication to the VNF, set
pnf_p7->terminate to 1.

Add a check on the PNF P7 send functions to not send a message after
pnf_p7->terminate is set.

This prevents the PNF from sending SLOT.indications after stopping,
which sometimes was causing the VNF to process a SLOT.indication after
it had received the indication to STOP.

Also, this MR adds a sanity check on the VNF P7 message handler to
ignore any P7 messages it receives after having it's own terminate flag
set to 1

This MR closes issue #1045
2026-01-29 17:22:15 +01:00
Robert Schmidt
bc6f710b23 Merge remote-tracking branch 'origin/uncompressed-f' into integration_2026_w05 (!3821)
[FHI72] [xran F] Handle fragmented (un)compressed packets

In both E and F, the radio-transport fragmentation is not supported, and
all the "fragmented" (not seen as fragments in the xran, only as
sections) packets contain "E-bit" equal to 1. Per spec, the value 1 for
"E-bit" signifies the last fragment of one symbol. For more info, please
see "ecpriSeqid" section in the spec.

In E:

- nRBStart and nRBSize is updated according to the sent/received packet;
- max sections = 1;
- when a packet is fragmented, the xran uses memcpy(pos, iq_data_start,
  size) function, and nothing is stored in start_prbu , num_prbu ,...

In F:

- nRBStart and nRBSize is only used for C-plane messages;
- nPrbElm represents the number of sections for DL only;
- based on the nPrbElm, each section contains UP_nRBStart and UP_nRBSize
  parameters which represent the start and number of PRBs in one section
  or one fragment;
- when a packet is fragmented, the xran uses nSecDesc and sec_desc to
  extract the packet section content, and the data is stored in
  start_prbu , num_prbu ,...

Previous work on the fragmentation in F:

- #884
- !3394 - only increases the XRAN_MAX_FRAGMENT from 4 to 6, since it was
  only tested with BFP 8, but not end-to-end unfortunately. But this MR
  fixes all the issues.

Tested with VVDN RU, 2x2, 16 bits, 100MHz, 30kHz, MTU <= 9216 B, and
Quectel UE RM520N-GL Revision: RM520NGLAAR03A03M4G.
2026-01-29 17:20:54 +01:00
Robert Schmidt
c8bcfedae0 Merge remote-tracking branch 'origin/issue-837' into integration_2026_w05 (!3732)
Implement TS 38.473 transparency for CellGroupConfig forwarding and handle re-establishment on a different DU

This MR implements the following fixes that are relevant in RRC
procedures (e.g. re-establishment, reconfiguration):

1. Transparent CellGroupConfig forwarding

This MR implements TS 38.473 transparency requirements by ensuring that
the CellGroupConfig IE is transparently forwarded from the gNB-DU to the
UE without any re-encoding at the gNB-CU. The CU stores and forwards the
encoded bytes transparently, while the DU is responsible for all
encoding and modifications (e.g., reestablishRLC flags).  Motivation

Motivation: The 3GPP TS 38.473 specification mandates that the
CellGroupConfig IE shall be transparently signaled to the UE.
Previously, the CU was re-encoding CellGroupConfig depending on the
scenario, instead of retrieving it from the DU, violating the
transparency requirement. CU may decode for internal use but must not
re-encode for forwarding.  Solution

Solution: Core Principle: The CU stores the encoded CellGroupConfig
bytes received from the DU and forwards them directly to the UE without
any re-encoding. The DU handles all encoding and modifications.

Key Changes:

  1. Transparent Forwarding in RRC Reconfiguration
     - Modified build_RRCReconfiguration_IEs() to use pre-encoded bytes
       directly
     - Changed parameter from cell_group_config to cgc (encoded byte
       array with buffer and size)
  2. Encoded Bytes Storage
     - Added byte_array_t mcg field to RRC UE structure to store encoded
       CellGroupConfig
     - Added store_cgc() helper function to save encoded cell group in
       the RRC UE Context at gNB (from F1AP messages)
  3. DU Encoding Responsibilities
     - Add gNB-DU Configuration Query IE support to trigger cgc encoding
       to request CellGroupConfig from DU
     - DU encodes CellGroupConfig with proper reestablishRLC flags
       during re-establishment
     - DU removes SRB1 from rlc-BearerToAddModList during
       re-establishment (SRB1 re-establishment is done before
       RRCReconfiguration)
  4. New functions
     - Add rrc_detect_reestablishment() function to detect
       re-establishment during UE Context Modification
     - Extracted rrc_gNB_first_reconfiguration_after_reestablishment()
       function to handle first reconfiguration after re-establishment
     - Added dump_cgc() and dump_mcg() utility functions for debugging
       purposes
  5. Re-establishment Flow
     - rrc_gNB_process_RRCReestablishmentComplete() requests
       CellGroupConfig from DU via gNB_DU_Configuration_Query in UE
       Context Modification Request
     - DU detects re-establishment and add reestablishRLC IEs
     - CU stores encoded CGC from the UE Context Modification Response
       and forwards it transparently in subsequent RRC Reconfiguration

Testing

Manual Testing:

  - RRC re-establishment procedure completes successfully
  - RRC Reconfiguration after re-establishment includes all DU-provided information

Issues fixed

Closes issue #837

2. Trigger UE Context Setup fallback upon reestablishment on DU
   different from the original one

As per 38.401 §8.7: if the UE accesses a DU different from the original
one during re-establishment, the CU must trigger UE Context Setup toward
the new DU. This refers to steps 9-10 and steps 9’-10’. Either one or
the other can be executed during re-establishment.

e.g. if this happens during handover, it shall trigger a UE Context
Setup fallback on the CU.

This MR implements the required behavior by:

- Adding a new helper function rrc_handle_f1_ho_reestab_on_target() to
  handle F1 handover reestablishment on target DU. The function triggers
  UE Context Setup procedure when the UE reestablishes on the target DU
  during an ongoing F1 handover.
- Calling this function when detecting that the UE is reestablishing on
  the target DU during handover, i.e.: (1) from
  handle_rrcReestablishmentComplete(), as per 38.401 §8.7, NOTE on steps
  9-10: CU gets UL RRC MESSAGE TRANSFER from a DU different than the
  original (2) from rrc_CU_process_ue_modification_required, as per
  38.401 §8.7, NOTE on steps 9'-10': CU gets a UE CONTEXT MODIFICATION
  REQUIRED from a DU different from the original one.

Also:

- add helper rrc_fill_f1_ue_context_setup and adopt it in handover
- move DRB list filler fill_drb_to_be_setup into rrc_gNB.c and rename it
  rrc_fill_f1_drb_to_setup for consistency

See also TS 38.401 Figure 8.7-1 "RRC connection reestablishment
procedure" for reference

3. DU: Handle missing old UE context in DL RRC Message Transfer

During F1 handover reestablishment, the CU may forward a DL RRC Message
Transfer to the target DU with old_gNB_DU_ue_id included, even though
the target DU does not have the old UE context yet.

The code previously used AssertFatal when the old UE context was not
found, causing a crash: "CU claims we should know UE %04x, but we don't"

According to TS 38.473, the gNB-DU shall release the old gNB-DU UE F1AP ID only:

> if the gNB-DU identifies the UE-associated logical F1-connection If
> there is no matching connection, there is nothing to release.

Fix:

- Check if old UE context exists before accessing it
- If old UE does not exist, log error, clean up any stale F1 UE data,
  and return early (do not deliver RRC message since reestablishment
  can't be completed)

The goal is to address a recurrent issue in the F1 pipeline, see
jenkins-oai.eurecom.fr/job/RAN-SA-Handover-CN5G/514:

    Assertion (oldUE) failed!
    In dl_rrc_message_transfer() /oai-ran/openair2/LAYER2/NR_MAC_gNB/mac_rrc_dl_handler.c:956
    CU claims we should know UE 35ce, but we don't
2026-01-29 17:20:43 +01:00
Reem Bahsoun
de0d100d67 Update nvIPC library to match the new cuBB image 2026-01-29 15:45:52 +01:00
Reem Bahsoun
bf78ef08e1 Add Nvidia L1 configuration file in sa_gnb_aerial and sa_gnb_aerial_ul 2026-01-29 15:45:42 +01:00
Thomas Schlichter
9048ab1860 CI: fix missing rfsimulator section in UE conf files for 4G RF-Sim tests 2026-01-29 14:49:21 +01:00
Teodora
b24fd337ba Update xran F release patch
The sufficient number of fragments needed for MTU 1500 and 8b compression is 6.
However, XRAN_MAX_FRAGMENT must be incremented by one (6+1 = 7).

In the MR https://gitlab.eurecom.fr/oai/openairinterface5g/-/merge_requests/3394, XRAN_MAX_FRAGMENT was increased to 6,
but the Tx data was actually copied 5 times, and unfortunately I haven't tested end-to-end back then.

This commit was successfully tested with Liteon FR1.
2026-01-29 10:59:24 +01:00
Teodora
109569e38c Add Benetel 550 config file for 2x2 100MHz uncompressed mode 2026-01-29 10:59:24 +01:00
Teodora
88c74dc07f Correct the MTU for 7.2 config files
Even though the jumbo frame has 9600 bytes by the spec, the max MTU is limited to the MTU of a switch, if any used.
However, the value can be < max MTU of a switch.

This is very important for fragmentation purposes. If not properly set, the PDSCH packets will be missing.
2026-01-29 10:59:15 +01:00
luis_pereira87
bc62e8abca CI: upgrade RAN-SA-Handover-CN5G F1 handover test to test Reestablishment on a different DU
- increase requirements for Event A3 trigger to avoid unwanted handovers
  and allow testing reestablishment on different DUs
- increase ping_packetloss_threshold from 5 to 30 because we are forcing
  a reestablishment, thus, packet loss will inevitably happen
- further adjustments to avoid A3 Events
2026-01-29 10:17:42 +01:00
Guido Casati
3c35bad530 Doc: update RRC re-establishment documentation 2026-01-29 10:17:42 +01:00
luis_pereira87
d401cf0d31 Prevent CU to process UE context release requests from DUs for UEs with outdated or unexpected association ids 2026-01-29 10:17:42 +01:00
Guido Casati
84a49e93ad DU: Handle missing old UE context in DL RRC Message Transfer
During F1 handover reestablishment, the CU may forward a DL RRC
Message Transfer to the target DU with old_gNB_DU_ue_id included,
even though the target DU does not have the old UE context yet.

The code previously used AssertFatal when the old UE context was
not found, causing a crash: CU claims we should know UE %04x, but we don't

According to TS 38.473, the gNB-DU shall release the old gNB-DU UE
F1AP ID only "if the gNB-DU identifies the UE-associated logical
F1-connection". If there is no matching connection, there is nothing
to release.

However, the primary purpose of DL RRC MESSAGE TRANSFER is to deliver
the RRC message to the UE. The RRC message delivery is independent of
whether the old UE context can be retrieved. Per TS 38.473, the RRC
message must be delivered to the new UE regardless of old context
retrieval status.

Additionally, per TS 38.331 5.3.7.2 and 5.3.7.4, during reestablishment:
- The UE releases spCellConfig, which must be removed from CellGroupConfig
- SRB1 RLC must be reconfigured with specific parameters

These operations are required for the new UE during reestablishment and
are independent of whether the old UE context can be retrieved.

Fixes:
- Check if old UE context exists before accessing it
- If old UE does not exist, log error and clean up any stale F1 UE data,
  but continue to deliver the RRC message
- Restructure code so context transfer only happens when oldUE exists
- Keep GTP-U update and RLC context transfer inside oldUE check (they
  require old UE context to exist)
- Move spCellConfig handling and reestablish_rlc flag to execute
  regardless during re-establishemnt (per TS 38.331 5.3.7.2)
- Move SRB1 RLC reconfiguration outside the oldUE check so it executes
  regardless during re-establishment (per TS 38.331 5.3.7.4)
- Add function documentation and improve spec references in comments
2026-01-29 10:17:42 +01:00
Guido Casati
fc8e537f20 RRC: align SRB and PDCP re-establishment timing with TS 38.331 specifications
This commit fixes the timing of SRB and DRB PDCP re-establishment
during RRC connection re-establishment to align with 3GPP TS 38.331
specifications.

Key Changes:

1. SRB1 activation and re-establishment (TS 38.331 5.3.7.4):
   - Move SRB1 activation to rrc_gNB_generate_RRCReestablishment()
   - Use SRB1 constant instead of magic number 1 for clarity
   - Remove redundant security configuration loop (handled by
     nr_pdcp_reestablishment internally)

2. SRB2 re-establishment (TS 38.331 5.3.5.6.3 SRB addition/modification):
   - Move SRB2 PDCP re-establishment from rrc_gNB_process_RRCReestablishmentComplete()
   to rrc_gNB_generate_dedicatedRRCReconfiguration(): per spec: SRB2
   should be re-established in the first RRCReconfiguration after
   re-establishment (with reestablishPDCP=true flag)

3. DRB re-establishment (TS 38.331 5.3.5.6.5 DRB addition/modification):
   - Move cuup_notify_reestablishment() from rrc_gNB_process_RRCReestablishmentComplete()
   to rrc_gNB_generate_dedicatedRRCReconfiguration(). e.g at the first
   reconfiguration after reestablishment
   - Ensures CU-UP is notified at the correct time
2026-01-29 10:17:42 +01:00
Guido Casati
c5787aa9a9 RRC: Trigger UE Context Setup upon re-establishment on different DU
As per TS 38.401 §8.7: if the UE accesses a DU different from the original
one during re-establishment, the CU must trigger UE Context Setup toward
the new DU. This refers to steps 9-10 and steps 9'-10'. Either one or the
other can be executed during re-establishment.

e.g. if this happens during F1 handover, it shall trigger a
UE Context Setup fallback on the CU.

This commit implements the required behavior:

1. Detection mechanism:
   - Add `old_du_assoc_id` field to `f1_ue_data_t` to store the original
     DU association ID
   - At RRCReestablishmentRequest: Store original `du_assoc_id` in
     `old_du_assoc_id` and update `du_assoc_id` to the new DU
   - At RRCReestablishmentComplete: Compare `old_du_assoc_id` with the
     `assoc_id` from the Complete message to detect different DU

2. UE Context Setup trigger:
   - In `rrc_gNB_process_RRCReestablishmentComplete()`: When different DU
     is detected, call `rrc_f1_ue_context_setup_for_target_du()` to trigger
     UE Context Setup procedure (per TS 38.401 §8.7, NOTE on steps 9-10)
     upon reception of UL RRC MESSAGE TRANSFER
   - In `rrc_CU_process_ue_modification_required()`: Refuse UE Context
     Modification Required when `old_du_assoc_id != 0` to avoid conflicts
     with the ongoing UE Context Setup procedure (per TS 38.401 §8.7, NOTE
     on steps 9'-10')

3. UE Context Setup:
   - Replace `clone_CellGroupConfig()` with `get_cellgroup_config()` in
     UE Context Setup handler
   - Call `update_cellgroup_for_reestablishment()` during UE Context Setup
     when `reestablish_rlc` flag is set to prepare CellGroupConfig with
     reestablishRLC flags
   - Clean up `old_du_assoc_id` in `rrc_CU_process_ue_context_setup_response()`
   - Add `free_ue_context_mod_req()` call after UE Context Modification request

4. Function signature updates:
   - Update `handle_rrcReestablishmentComplete()` to accept `gNB_DU_ue_id`
     and `assoc_id` parameters, change return type from `int` to `void`
   - Update `rrc_gNB_process_RRCReestablishmentComplete()` to accept
     `assoc_id` parameter
   - Update `rrc_gNB_decode_dcch()` to accept and forward `assoc_id` parameter

Re-establishment on different DU flow (TS 38.401 §8.7, steps 9-10):
1. UE sends RRCReestablishmentRequest to new DU
2. DU forwards to CU via UL RRC MESSAGE TRANSFER
3. CU detects different DU (`assoc_id != ue_data.du_assoc_id`):
   - Stores `old_du_assoc_id = ue_data.du_assoc_id` (original DU)
   - Updates `ue_data.du_assoc_id = assoc_id` (new DU)
4. CU sends RRCReestablishment to UE
5. UE sends RRCReestablishmentComplete to new DU
6. DU forwards to CU via UL RRC MESSAGE TRANSFER
7. CU detects different DU scenario (with old_du_assoc_id):
   - Triggers UE Context Setup Request to new DU via `rrc_f1_ue_context_setup_for_target_du()`
8. DU receives UE Context Setup Request:
   - Detects re-establishment (`UE->reestablish_rlc` flag)
   - Calls `update_cellgroup_for_reestablishment()` to set reestablishRLC flags
   - Encodes CellGroupConfig with reestablishRLC flags and sends to CU
9. CU receives UE Context Setup Response:
   - Stores encoded CellGroupConfig
   - Clears `old_du_assoc_id = 0`
10. CU sends RRC Reconfiguration with transparent CellGroupConfig to UE
2026-01-29 10:17:42 +01:00
Guido Casati
806a15da01 Implement TS 38.473 transparency for CellGroupConfig forwarding
This commit implements transparent forwarding of CellGroupConfig
as required by TS 38.473, eliminating CU-side decode/re-encode
cycles that violate transparency requirements.

Main Design Change:
- Before: CU decoded CellGroupConfig from DU, stored in the UE
  context then re-encoded when sending to UE. CU constructed
  new CellGroupConfig after RRCReestablishmentComplete.
- After: CU requests CellGroupConfig from DU via UE Context Modification
  Request with `gNB_DU_Configuration_Query=true`, DU sends CellGroupConfig
  which CU stores as encoded `byte_array_t` and forwards transparently
  via reconfiguration without decode/re-encode cycles

To this purpose, all decode operations of CellGroupConfig were removed
from DU and all encode operations were removed from the CU.

Key Changes:

CU:
- Replace NR_CellGroupConfig_t* masterCellGroup with byte_array_t mcg in
  gNB_RRC_UE_t for storing encoded CellGroupConfig
- Rename cell_group_config to cgc in nr_rrc_reconfig_param_t for brevity
- Implement transparent forwarding in build_RRCReconfiguration_IEs()
- Add helper functions:
  - `store_cgc()` to store encoded bytes
  - `get_meas_gap_config()`: Decode MeasGapConfig from DU to CU response
  - `rrc_detect_reestablishment()` to detect re-establishment by decoding
    temporarily (only for detection)
- Remove legacy decode/re-encode paths in RRC message generation
- Update all CellGroupConfig storage to use encoded bytes
- Update reconfiguration generation to accept is_reestablishment parameter

DU:
- Add `get_cellgroup_config()` to select source (CellGroup vs reconfigCellGroup)
  based on re-establishment state
- Add re-establishment detection logic in `ue_context_modification_request()`
- Add `update_cellgroup_for_reestablishment()` to set reestablishRLC flags and
  remove SRB1 from bearer list
- When `gNB_DU_Configuration_Query` is present and re-establishment detected:
  - Clones from reconfigCellGroup (which contains spCellConfig) instead of
    CellGroup (where spCellConfig was removed)
  - Sets `reestablishRLC` flags for all bearers except SRB1
  - Removes SRB1 from bearer list (already re-established)

Data Structure Changes:
- gNB_RRC_UE_t: Add byte_array_t mcg field
- nr_rrc_reconfig_param_t: Change cell_group_config to cgc (byte_array_t*)
- Remove masterCellGroup field usage in favor of encoded mcg

New re-establishment flow:
1. UE sends RRCReestablishmentRequest
2. CU processes -> sends RRCReestablishment
3. CU sends RRCReestablishmentComplete
4. CU sends UE Context Modification Request to DU with `gNB_DU_Configuration_Query=true`
5. DU detects re-establishment (`UE->reestablish_rlc && UE->reconfigCellGroup != NULL`):
   - Clones `UE->reconfigCellGroup` -> `new_CellGroup` (contains spCellConfig)
   - Sets `reestablishRLC` flags for all bearers except SRB1
   - Removes SRB1 from bearer list (already re-established)
   - Encodes `new_CellGroup` and sends to CU
6. CU receives encoded CellGroupConfig -> stores in `UE->mcg` via `store_cgc()`
7. CU detects re-establishment via `rrc_detect_reestablishment()`
8. CU calls `rrc_gNB_generate_dedicatedRRCReconfiguration()` with `is_reestablishment=true`:
   - Creates SRB/DRB lists with re-establishment flags
   - Generates RRC Reconfiguration with transparent CellGroupConfig
   - Sends to UE

Why spCellConfig must be added in the DU in case of re-establishment:

With transparent forwarding, CU requests CellGroupConfig from DU instead
of constructing it. During re-establishment, DU's runtime CellGroup has
spCellConfig = NULL (removed per TS 38.331 §5.3.7.2). However, for the
gNB_DU_Configuration_Query response, DU must provide a complete CellGroupConfig
including spCellConfig. Therefore, DU restores spCellConfig by encoding
reconfigCellGroup (with the original spCellConfig) in CellGroupConfig.
In the old design CU constructed CellGroupConfig itself in
`rrc_gNB_process_RRCReestablishmentComplete()` and used `spCellConfig`
from its stored `masterCellGroup`.

Closes #837
2026-01-29 10:17:42 +01:00
Guido Casati
50de6bd8fb F1: encode CGC in UE Context Modification Response upon GNB-DU Configuration Query
Apply CGC encoding through GNB-DU Configuration Query. This applies to the
pdu session release path (rrc_gNB_send_f1_drb_release_request) and E1 bearer
mod / DRB add+release path (rrc_gNB_generate_UeContextModificationRequest).

This is necessary to implement 3GPP TS 38.473 requirement for
gNB-DU Configuration Query IE in UE Context Modification Request:

"If the GNB-DU Configuration Query IE is contained in the UE CONTEXT
MODIFICATION REQUEST message, gNB-DU shall include the CellGroupConfig
IE in the DU To CU RRC Information IE in the UE CONTEXT MODIFICATION
RESPONSE message."

i.e.: The DU sends the CGC only when this IE is enabled in the REQ
message from the CU. The only other scenario according to the same
specs is when the Full Configuration IE is present. Outside of these
two cases, CGC shall not be sent.
2026-01-29 10:17:42 +01:00
Guido Casati
b74cd9c612 F1AP: Add gNB-DU Configuration Query IE support
This field will be adopted to trigger cgc encoding at DU,
according to the specs (see subsequent commit for details).

Changes:
- Add gNB_DU_Configuration_Query field to f1ap_ue_context_mod_req_t
- Implement encoding/decoding
- Add to cp, eq, and free functions for the new field
- Update tests to include the new field
2026-01-29 10:17:42 +01:00
Guido Casati
129b62e708 Telnet: improve fetch_du_by_ue_id to auto-detect connected UE
Issue: sometimes it happens that an ul failure occurs in the handover
pipeline, UE reconnects with different UE ID and fetch_du_by_ue_id fails.

- Modified fetch_du_by_ue_id in telnetsrv_ci.c to automatically find
  the connected UE when no UE ID is provided, similar to other
  telnet commands like rrc_gNB_trigger_f1_ho
- Updated test cases in container_sa_f1_ho_b210_quectel.xml to use
  the improved command without hardcoded UE ID parameter
- This makes the command more robust and easier to use in CI tests
2026-01-29 10:17:42 +01:00
Guido Casati
aff0ea5760 RRC logging: add utility function to dump ASN1 MCG
Add debugging utilities dump_cgc() and dump_mcg() to decode and
print CellGroupConfig in XER format when DEBUG_ASN1 flag is enabled.
This helps debug RRC Reconfiguration messages containing masterCellGroup.
2026-01-29 10:17:42 +01:00
Guido Casati
9a11690f81 RRC: Improve UE context lookup for re-establishment on different DU
Add intermediate fallback to rrc_gNB_get_ue_context_by_rnti_any_du() in
re-establishment request handling to better handle cases where UE
re-establishes on a different DU.

RNTI is NOT globally unique - different DUs can assign the same RNTI to
different UEs. The assoc_id check in rrc_gNB_get_ue_context_by_rnti()
disambiguates RNTI across DUs and prevents returning the wrong UE.

However, during re-establishment on a different DU, du_assoc_id hasn't
been updated yet (message comes from new DU, but ue_data.du_assoc_id
still points to old DU), causing the primary lookup to fail even though
the UE exists.

The lookup now uses a three-tier fallback:
1. Primary: rrc_gNB_get_ue_context_by_rnti() with assoc_id check
   (normal case: same DU)
2. Fallback 1: rrc_gNB_get_ue_context_by_rnti_any_du() by RNTI only
   (re-establishment on different DU)
3. Fallback 2: rrc_gNB_get_ue_context_source_cell() using physCellId
   (handover scenarios)
2026-01-29 10:17:42 +01:00
Guido Casati
d18c2d27f2 RRC: cleanup and improve safety of rrc_gNB_generate_RRCReestablishment()
- Remove unused masterCellGroup_from_DU parameter from rrc_gNB_generate_RRCReestablishment() as it is not used in the RRC
re-establishment generation, RRCReestablishment message does not contain CellGroupConfig which is obtained later via UE Context Modification Request/Response
- Update function documentation
- Initialize security_parameters struct to zero for safety
- Add check on ciphering and integrity algorithm ranges
2026-01-29 10:17:42 +01:00
Guido Casati
825cbcdb47 RRC: Allow re-establishment on different DU when physCellId differs
When a UE re-establishes on a different DU, the physCellId in the
re-establishment request (from the old cell) will differ from the
new DU's physCellId. The previous check incorrectly treated this as
a "too fast movement" scenario and triggered fallback to RRC setup.

This fix distinguishes between two scenarios:
1. Different DU scenario: physCellId differs because UE is on a
   different DU - this is legitimate and should be allowed. UE
   Context Setup will be triggered at RRCReestablishmentComplete.
2. Same DU but different physCellId: "too fast movement" scenario
   - fallback to RRC setup as before.

The fix checks if assoc_id != ue_data.du_assoc_id to detect a
different DU scenario and allows re-establishment in that case.

This addresses the issue where re-establishment on a different DU
was incorrectly rejected, preventing proper UE Context Setup per
TS 38.401 Section 8.7.
2026-01-29 10:17:42 +01:00
Guido Casati
290306d1f8 RRC: Refactor re-establishment request handling
- Extract old_rnti as const variable and reuse consistently
- Move as_security_active check earlier for fail-fast validation
- Move ue_data declaration earlier to avoid duplicates
- Improve code organization and readability

No functional changes.
2026-01-29 10:17:42 +01:00
Guido Casati
ebc9158ca4 RRC/F1: provide DU UE ID for re-establishment scenario
Handle target DU UE context setup when handover preparation info
is unavailable (i.e. re-establishment scenario) by retrieving
secondary UE ID from F1 UE data.

rrc_f1_ue_context_setup_for_target_du is either applying to
handover or re-establishment. In the latter scenario, populate
DU UE ID, which should be known.
2026-01-29 10:17:42 +01:00
Robert Schmidt
a0a68d56d5 Merge remote-tracking branch 'origin/remove-dead-code' into integration_2026_w05 (!3831)
semi-manual remove of not used #define commands

As i was upset to see all these #define with no code under, i made a
global pass to remove the obvious cases semi-manual remove of not used
bodies

manual script, then a lot of manual review

    grep -IRs "#define" ../openair* ../common/* ../executables/ ../nfapi/ ../radio/ | \
        fgrep -v '(' | fgrep -v '//' |awk '{print $2}' | egrep -v "#define *$n"| \
            while read n ; do
              grep -IRs $n ../openair* ../common/* ../executables/ ../nfapi/ ../radio/  | grep -v "#define *$n" | grep -q $n || echo $n;
            done

will give a decent list of #define never used.  Then, I think we should
keep lists of # define when it comes from standards, even if the code
doesn't use it right now
2026-01-29 08:23:41 +01:00
Robert Schmidt
0eb33e69c7 Merge remote-tracking branch 'origin/add-support-eth-pdu-sess' into integration_2026_w05 (!3769)
Add Ethernet PDU session support and make PDU session request configurable

This MR adds support for Ethernet PDU sessions, and makes PDU sessions
configurable: per-PDU session ID, type (IPv4/IPv4v6/IPv6/Ethernet [1]),
DNN, NSSAI.

Concretely, it adds a new configuration file section pdu_sessions below
uicc0 that looks like this if everything is specified (default values
are shown):

    uicc0:
      [...]
      pdu_sessions:
        - id: 1
          type: "IPv4"
          nssai_sst: 1
          nssai_sd: 0xffffff
          dnn: "oai"

It is possible to list multiple PDU sessions (add new line   - id: 2 to
request a second PDU session). It is backwards-compatible to the current
PDU session configuration (uicc0.dnn/nssai_sst/etc), the idea being that
either legacy or new configuration could be used, but (1) if
pdu_sessions exist, it will overwrite the legacy configuration, and (2)
multiple PDU sessions, and type, can only be configured using the new
config. The old parameters --extra-pdu-id and --default-pdu-id are not
accepted anymore. Documentation has been added to the UE tutorial.

It is possible to test an Ethernet PDU session [1]. It is possible to
test the PDU session inside the UE by verifying it has an TAP interface
oaitap_ue1, and ARPing the data network (arping has been added to
oai-nr-ue container for that purpose):

    ip addr add 192.168.72.140/26 dev oaitap_ue1  # same subnet as data network!
    ip link set dev oaitap_ue1 up
    arping -c 20 -I oaitap_ue1 192.168.72.135     # will send ARP request in Ethernet frame to get IP address of data network

[1] See description MR !3769 for more information. On the UE side, only
the type has to be changed to "Ethernet".
2026-01-29 07:52:48 +01:00
Jaroslava Fiedlerova
e1a327ca4f Merge remote-tracking branch 'origin/nr_ue_multiple_rf' into integration_2026_w05 (!3593)
NR UE: add support for multiple RF frontends

This MR adds basic support for multiple RF-frontends at the UE.
There are multiple reasons why we might want this:
1. There might be different antennas needed for different bands (e.g. NTN or
   TN antennas). These antennas might be connected to different RF-frontends.
   In case of Handover, the UE needs to dynamically switch between these
   RF-frontends.
2. Each rf-simulator connection carries baseband I/Q samples. To be able to
   perform a handover between two cells at different frequencies, there must
   be two rf-simulator connections, as the baseband channels should not
   interfere and thus cannot simply be added.
3. When we want to support multiple UE simulation within one instance of
   nr-uesoftmodem, and allow multiple cells and probably even handover between
   these cells, we need either:
   1. dedicated RF-frontends for each simulated UE, or
   2. dedicated RF-frontends for each connected cell and dynamically assign
      simulated UEs accordingly.

This MR implements what is needed for 1., 2. and 3.1.
2026-01-28 20:19:48 +01:00
Jaroslava Fiedlerova
db902afbe4 Merge remote-tracking branch 'origin/liteon_FFT' into integration_2026_w05 (!3875)
Fix FFT size for xran_fh_tx_send_slot_BySymbol() and xran_fh_rx_read_slot_BySymbol()

This MR handles
- Fix FFT size for xran_fh_tx_send_slot_BySymbol() and
  xran_fh_rx_read_slot_BySymbol() (!3809)
- Fix E release build
2026-01-28 20:17:20 +01:00
Jaroslava Fiedlerova
efdd43cf66 Merge remote-tracking branch 'origin/debian_redhat_packages' into integration_2026_w05 (!3507)
Create Debian and Redhat packages with CPack

Use CPack in CMakelists in order to create packages, creation command is
available in build_oai script and options description is available in
packages.md
2026-01-28 20:16:22 +01:00
Robert Schmidt
780a2467aa Add documentation for multi-PDU session configuration 2026-01-28 17:48:43 +01:00
Robert Schmidt
6e69491f4a Convert legacy PDU session config to new format 2026-01-28 17:48:43 +01:00
Rúben Soares Silva
e82e3a35fe Add a check on the VNF P7 message handler to ignore P7 messages after it received a STOP.indication from the PNF 2026-01-28 16:08:50 +00:00
Rúben Soares Silva
f76e530f90 Prevent the PNF from sending P7 messages after sending a STOP.indication
Upon stopping the PNF, when sending the STOP.indication to the VNF, set pnf_p7->terminate to 1.

Add a check on the PNF P7 send functions to not send a message after pnf_p7->terminate is set
2026-01-28 16:08:03 +00:00
Reem Bahsoun
a5e8e10acf Mount the L1 config file in the volumes of the cuBB container,
update cuBB image name and change L2 log to UTC time
2026-01-28 14:40:56 +01:00
Reem Bahsoun
f22769a80f Update the entrypoint script:
- Remove unused line
- Change L1 config file
- Update directories
2026-01-28 14:40:49 +01:00
Mario Joa-Ng
f65b8f564f Correctly extract the PUSCH PRBs from an internet frame (one fragment)
Prior to this commit, all the PRBs had no signal. Only the "PRACH I0" was ~40dB which is expected.

The L1 stats with this commit:
```
Blacklisted PRBs 0/273
 0.-1.-1. 0. 0.-1.-1.-1. 0. 0. 0.-1.-1. 0.-1.-1. 0. 0.-1.-1. 0. 0.-1. 0. 4.
-1. 0. 0.-1. 0. 0.-1. 0.-1. 0. 0. 0.-1.-1.-1. 0. 0. 0. 0. 0. 0.-1.-1.-1. 0.
-1. 0. 0. 0. 0. 0. 0.-1.-1.-1.-1. 0.-1.-1.-1.-1.-1.-1.-1.-1.-1.-1.-1.-1.-1.
-1.-1.-1.-1.-1.-2.-1.-1.-2.-2.-1.-2.-1.-1.-2.-1.-1.-2.-1.-2.-1.-1.-1.-1.-2.
-1.-1.-1.-2.-1.-1.-1.-1.-1.-1.-1.-1.-1.-1.-1.-1.-1.-1.-1.-1.-1.-1.-1.-1.-1.
-1.-1.-1.-1.-1.-1.-1.-1.-1.-1.-1.-20. 3. 0. 0.-1.-1.-1.-1.-1.-1.-1.-1.-1.-1.
-1. 0.-1.-1. 0.-1.-1. 0. 0.-1. 0.-1. 0. 0.-1.-1.-1. 0. 0. 0.-1. 1. 0.-1.-1.
 0. 0. 0. 0.-1. 0.-1. 0. 0. 0. 0. 0. 0. 0. 0.-1. 0.-1. 0. 0.-1. 0.-1.-1. 0.
 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 1. 0. 0. 0. 0. 0. 0.
 1. 0. 0. 1. 0. 0. 0.-1. 0. 0. 1. 1. 0. 1. 0. 0. 1. 0. 0. 0. 1. 0. 1. 0. 0.
 0. 1. 0. 0. 1. 0. 0. 0. 1. 1. 1. 1. 0. 0. 0. 1. 1. 1. 1. 0. 1. 1. 1.
max_IO = 24 (24), min_I0 = 0 (136), avg_I0 = 20 dB(19.20.)
PRACH I0 = 42.1 dB
```

Co-authored-by: Teodora Vladić <teodora.vladic@openairinterface.org>
2026-01-28 13:00:24 +01:00
Teodora
8b60466916 Correct the UL C-plane packet
Even after this commit, we still have duplicated UL C-plane packets due to xran F release internal architecture.

Note: in E, all PRBs were in one section of one C-plane DL and UL. It is working even though the U-plane has "fragmented" packets.

Co-authored-by: Mario Joa-Ng <mario.joa-ng@openairinterface.com>
2026-01-28 13:00:24 +01:00
Teodora
cf8f24710b Resolves the missing DL symbols
Previously, in F, only the following (subframe, slot, symbol) combinations were sent every frame:
(0, 0, 0)
(2, 1, 0)
(5, 0, 0)
(7, 1, 0)

Now, all the DL symbols are sent.

Notes:
In both E and F, the radio-transport fragmentation is not supported, and
all the "fragmented" (not seen as fragments in the xran, only as sections)
packets contain "E-bit" equal to 1.
Per spec, the value 1 for "E-bit" signifies the last fragment of one symbol.
For more info, please see "ecpriSeqid" section in the spec.

In E:
- nRBStart and nRBSize is updated according to the sent/received packet;
- max sections = 1.

In F:
- nRBStart and nRBSize is only used for C-plane messages;
- nPrbElm represents the number of sections for DL only;
- based on the nPrbElm, each section contains UP_nRBStart and UP_nRBSize parameters
  which represent the start and number of PRBs in one section or one fragment.

Co-authored-by: Mario Joa-Ng <mario.joa-ng@openairinterface.com>
2026-01-28 13:00:18 +01:00
calvin_peyron
f7e714894a Add documentation to package creation and installation 2026-01-28 11:43:44 +01:00
calvin_peyron
26d24dbd0b Create Debian and RPM packages from CMakeLists
Packages must have a name, a version, a section, an architecture, a maintainer, a description (long and summary), dependencies
Shared libraries must be stripped, have soversion, version (debug symbols are found in separate packages), since MODULE is used instead of SHARED it works as a plugin library which is opened using dlopen-like functionality, see:  https://cmake.org/cmake/help/latest/command/add_library.html
Packages must have postin and postun scripts
Since it is not recommended to modify CMAKE_EXE_LINKER_FLAGS, cmake's path variables are used : https://discourse.cmake.org/t/how-do-i-replace-the-compiler-options-for-one-target/7815/5
2026-01-28 11:36:34 +01:00
Jaroslava Fiedlerova
ee406b06a4 Merge remote-tracking branch 'origin/issue-1043' into integration_2026_w05 (!3860)
NGAP: improve error handling in RRCReconfiguration from Handover Command decoding

This MR refactors doRRCReconfiguration_from_HandoverCommand for consistency and
safety, and enables NGAP Handover Cancel encoding/decoding.
- Refactored doRRCReconfiguration_from_HandoverCommand function:
  - Changed signature to return byte_array_t instead of taking a buffer parameter
  - Prevents buffer overflow by auto-sizing memory with uper_encode_to_new_buffer
  - Input validation
  - HandoverCommand structure validation
  - Error handling and cleanup for encode/decode failures
  - ASN.1 structure cleanup on all error paths
  - Updated caller in rrc_gNB_NGAP.c: use new byte_array_t return signature,
    added buffer cleanup with free_byte_array(), sends Handover Cancel to AMF on
    decoding failure (source gNB)
  - Improved error logging
- NGAP Handover Cancel encoding/decoding support
  - Added missing Handover Cancel ack case handler for
    NGAP_ProcedureCode_id_HandoverCancel in ngap_gNB_decode_initiating_message()
    to decode and log incoming Handover Cancel Ack message
  - Added NGAP_ProcedureCode_id_HandoverCancel to the list of supported
    initiating message procedure codes in ngap_gNB_encode_initiating() allowing
    the gNB to encode and send Handover Cancel messages

Note: The Handover Cancel procedure is already implemented elsewhere in the NGAP
stack; these changes complete support by ensuring the procedure code is
recognized in both encoder and decoder.

Closes #1043
2026-01-27 20:30:51 +01:00
Jaroslava Fiedlerova
c2d3a3d0c2 Merge remote-tracking branch 'origin/oru-rebased' into integration_2026_w05 (!3848)
Initial implementation of O-RU for 7.2 emulator

Added new executable nr-oru which acts as a 7.2 O-RU.
2026-01-27 20:30:12 +01:00
Thomas Schlichter
fce8185467 use function pointer instead of weak function for openair0_write_reorder_common() 2026-01-27 16:46:02 +01:00
Robert Schmidt
f9e7e5199d Remove remaining unused RAL code 2026-01-27 13:28:35 +01:00
Laurent THOMAS
dd8a25524a remove dead code in common_lib.h 2026-01-27 13:23:18 +01:00
Laurent THOMAS
5b0d34c3ad semi-manual remove of not used #define commands. I let the unused defintions that come from standard bodies 2026-01-27 13:23:10 +01:00
Robert Schmidt
831e407298 Remove outdated comment 2026-01-27 11:47:40 +01:00
Robert Schmidt
eea52e4384 Dockerfile nrUE ubuntu: install arping
The CN team would like to test the ethernet PDU session capabilities of
the UPF. Install arping in the UE by default for ubuntu to help them
test the PDU session by pinging over ARP.
2026-01-27 11:47:40 +01:00
Robert Schmidt
dc968d4dc9 Handle PDU session type Ethernet in NAS and SDAP 2026-01-27 11:47:40 +01:00
Robert Schmidt
78720d5d9c Make default oaitun_ueY name for default (first) PDU session
Look up the index of a PDU session in the list of PDU sessions upon
accept to determine if the PDU session is the default (first PDU
session) or not. If it is the default, it will not append a suffix to
the interface name (oaitun_ueY), otherwise append the PDU session ID
(e.g., for 5: oaitun_ueYp5).
2026-01-27 11:47:40 +01:00
Robert Schmidt
27e01e081b Read PDU session configuration and request
Use the new PDU session configuration functionality of the parent
commit. It is now possible to request multiple PDU sessions, and to
request specific PDU session types. While the new uicc0.pdu_sessions is
preferred, it is still possible to use the "legacy"
uicc0.dnn/nssai_sst/nssai_sd.

The old parameters --default-pdu-id and --extra-pdu-id are not allowed
anymore, as it is possible to manually define this in the UE
configuration. Correspondingly, fix the use of those options, where
applicable.

Note: since the default_pdu_id is changed to -1, all interface names
will have pX to interface names appended (oaitun_ue1pX). The next commit
will correct this.
2026-01-27 11:47:40 +01:00
Robert Schmidt
9b4898ee57 Add new PDU session list configuration
Add new configuration description for PDU sessions, including conformity
checks.
2026-01-27 11:47:40 +01:00
Thomas Schlichter
a91838937f Add documentation on multiple NR UE RF-frontends to RUNMODEM.md 2026-01-27 11:30:16 +01:00
Thomas Schlichter
3435fcc010 update documentation and configuration files reflecting the rfsimulator changes 2026-01-27 11:30:16 +01:00
Thomas Schlichter
4d215b5c95 rfsimulator: add support for providing different parameters to each instance 2026-01-27 11:30:16 +01:00
Thomas Schlichter
ce83a78271 remove unused variables from struct openair0_config 2026-01-27 11:30:16 +01:00
Thomas Schlichter
b24052d2dc rfsimulator: remove static variable last_TS from function rxAddInput()
This static variable creates issues when there are multiple instances of the LEO channel model in use.
2026-01-27 11:30:16 +01:00
Thomas Schlichter
fb9e848d5b NR UE: don't allocate unnecessary data buffers
When writing dummy data or reading to trash, we don't need to allocate data buffers for each antenna.
We can allocate just for one antenna and use this buffer for each antenna.
2026-01-27 11:30:16 +01:00
Thomas Schlichter
8e18e5b3aa NR UE: wrap all direct trx_*() function calls in nr_ue_ru_*() functions 2026-01-27 11:30:14 +01:00
Thomas Schlichter
6297c40423 remove unused variables from struct openair0_config 2026-01-27 11:10:54 +01:00
Thomas Schlichter
0b06d55f5f NR UE: introduce support to define multiple cells
This feature shall allow in future to simulate an arbitratry number of UEs connected to an other arbitrary number of cells.
Therefore each RF-frontend (also called RU) needs to be configured for one specific cell.
In case of handover of a UE from one cell to another cell, it needs to switch RUs accordingly (TODO).

There has to be a 1-to-1 mapping between RUs and cells.
Each UE will be assigned to one of the defined cells.
Initially all UEs are assigned to cell 0.
2026-01-27 11:10:53 +01:00
Thomas Schlichter
bcccfd90b8 NR UE: don't use downlink_frequency[cc_idP][0] and uplink_frequency_offset[cc_idP][0] in MAC, store mac->dl_frequency instead 2026-01-27 10:24:54 +01:00
Thomas Schlichter
dfb217ad0e NR UE: don't use get_softmodem_params()->numerology in MAC, store mac->numerology instead 2026-01-27 10:24:54 +01:00
Thomas Schlichter
b495576c83 make sure defint64val is set for TYPE_UINT64 configuration parameters 2026-01-27 10:24:54 +01:00
Thomas Schlichter
168f329491 NR UE: remove unused array of PHY_VARS_NR_UE pointers 2026-01-27 10:24:53 +01:00
Thomas Schlichter
90ad9fac1a NR UE: introduce support to define multiple RUs 2026-01-27 10:23:01 +01:00
Jaroslava Fiedlerova
623dc19d22 Merge remote-tracking branch 'origin/uci_csi_on_pusch' into integration_2026_w05 (!3766)
UE support to send CSI report on PUSCH

Earlier work on UCI on PUSCH implemented only ACK/NACK. This MR extends that
to send CSI report too.

This branch is verified with MATLAB implementation for multiplexing CSI part 1
and part 2 on PUSCH. It is also verified with srsRAN gNB which successfully
decodes CSI part 1 on PUSCH.
2026-01-26 16:21:31 +01:00
Jaroslava Fiedlerova
b68b42c6e8 Merge remote-tracking branch 'origin/fix_rsrp_overflow' into integration_2026_w05 (!3823)
Fix RSRP overflow

If UE L1 measure an RSRP = 0 it would report to L2 and RSRP value of -INT_MAX
dBm causing overflow in the qsort to determine the best RSRPs
2026-01-26 11:46:41 +01:00
Thomas Schlichter
256a54ce6c NR UE: move initialization of frame_parms->N_RB_DL and frame_parms->ssb_start_subcarrier to nr_init_frame_parms_ue_sa()
This harmonizes the implementations of nr_init_frame_parms_ue(), nr_init_frame_parms_ue_sa() and nr_init_frame_parms_ue_sl().
2026-01-26 11:41:33 +01:00
Thomas Schlichter
eed98b2bf9 NR UE: support nr_get_carrier_frequencies() on constant PHY_VARS_NR_UE 2026-01-26 11:41:33 +01:00
Thomas Schlichter
877b8ed0a0 remove some unused global variables from nr-softmodem.c and nr-uesoftmodem.c 2026-01-26 11:41:33 +01:00
Thomas Schlichter
af4ceea12c NR UE: remove global variable rx_gain_off, which has no function
The global variable rx_gain_off was always 0.0, as it was not even modified by the NR UE command line parameter --ue-rxgain-off.
That command line parameter modified only a parameter in the struct nrUE_params_t, which was not used at all and is removed in this commit, too.
Also, the global variable rx_gain_off was just added to rx_total_gain_dB and subtracted from it again in nr_rf_card_config_gain().
So we simplify that function slightly, too.
2026-01-26 11:41:33 +01:00
Thomas Schlichter
fef4e7b23e NR UE: move openair0_config_t and openair0_device_t out of PHY_VARS_NR_UE and consistently use UE->rf_map.card 2026-01-26 11:41:33 +01:00
Jaroslava Fiedlerova
7c64fe0f60 Merge remote-tracking branch 'origin/shm-channel-fix' into integration_2026_w05 (!3853)
Clear memory in shm_td_iq_channel after RX

Clear memory in shm_td_iq_channel after RX. This prevents the IQ
from being read twice. This can happen if the application crashes
and will keep the other side reading historical IQ samples.
2026-01-26 10:43:20 +01:00
Jaroslava Fiedlerova
2acc8b6a08 Merge remote-tracking branch 'origin/vrtsim-fix-timing' into integration_2026_w05 (!3850)
Update vrtsim timing job thread

List of changes:
- avoid calculating accumulated rounding error by calculating absolute
  sample index based on CLOCK_REALTIME every time.
- use threadCreate instead of plain pthread_create which assigns a unique
  thread name and simplifies debugging
2026-01-26 10:42:18 +01:00
Sakthivel Velumani
f9fb02b1d7 clean-up: minimize code repetition
harmonize ACK and CSI mapping into a single function.
2026-01-26 10:02:30 +01:00
Sakthivel Velumani
36a5dbdfff mac: harmonize function to get csi reports
Use nr_get_csi_measurements() function to get CSI report for PUCCH and
UCI on PUSCH.

Harmonize filling csi report for UCI on PUSCH for periodic and aperiodic
CSI reports.
2026-01-26 10:02:30 +01:00
Sakthivel Velumani
cecfec82a8 mac: harmonize csi_payload_t struct
1. Reuse csi_payload_t struct to hold CSI report payload on PUSCH and
PUCCH PDU.
2. Move the struct to fapi header file
2026-01-26 10:02:30 +01:00
Sakthivel Velumani
d1febb5fc2 clean-up: reduce nested if in CSI meas function 2026-01-26 10:02:30 +01:00
Sakthivel Velumani
207b061e22 ulsim: enable CSI part 2 in unit test 2026-01-26 10:02:30 +01:00
Sakthivel Velumani
1ba8502bdd phy: map CSI part 2 bits on PUSCH 2026-01-26 10:02:30 +01:00
Sakthivel Velumani
b464ff6bd7 ulsim: enable CSI part 1 in unit test
Update matlab script too.
2026-01-26 10:02:30 +01:00
Sakthivel Velumani
bea7afcbd3 phy: map CSI part 1 bits on PUSCH 2026-01-26 10:02:30 +01:00
Sakthivel Velumani
004a472c52 fix: return value assigned inside function 2026-01-26 10:02:30 +01:00
Sakthivel Velumani
84aa1f8ff5 clean-up: fix code repetition 2026-01-26 10:02:24 +01:00
Sakthivel Velumani
dc70b621a5 clean-up: Add const to input pointers 2026-01-26 09:45:02 +01:00
Thomas Schlichter
75df29a333 consistenty use suffix _t for openair0_* types 2026-01-23 18:30:39 +01:00
Laurent THOMAS
7e0440433a remove used definitions, and group dupilcated extern for cpuf global var 2026-01-23 10:57:44 +01:00
calvin_peyron
8496e88a10 On Fedora libusb-devel is called libusb1-devel 2026-01-23 09:39:38 +01:00
Calvin Peyron
6af6789f65 Fix python-tk has no installation candidate 2026-01-23 09:39:38 +01:00
Guido Casati
b621929f9b Refactor (MAC): extract RRC container handling into shared function
Extract the common RRC container handling logic from
ue_context_setup_request() and ue_context_modification_request() into
a new static function handle_ue_context_rrc_container().

This refactoring:
- Eliminates code duplication between the two functions
- Centralizes RRC container forwarding logic
- Improves code maintainability and consistency
2026-01-22 14:56:11 +00:00
Guido Casati
0b8fb49a38 Refactor (MAC): extract CellGroupConfig encoding into shared function
Extract common CellGroupConfig encoding logic from
ue_context_setup_request() and ue_context_modification_request() into
encode_cellgroup_config().

Replace uper_encode_to_buffer() with uper_encode_to_new_buffer() to:
- Remove 1024-byte buffer size limit
- Automatically allocate correct buffer size
- Simplify code (no manual bit-to-byte conversion)
- Align with other protocol encoders
2026-01-22 14:56:11 +00:00
Guido Casati
94bb169ac5 RRC/F1: add documentation/logs for F1 UE context setup functions
- Add function documentation blocks for `rrc_fill_f1_ue_context_setup`,
  `rrc_f1_ue_context_setup_for_target_du`, and `rrc_f1_ue_context_setup_from_e1_response`
  explaining their purpose, parameters, and usage scenarios
- Add inline comments throughout these functions
2026-01-22 14:56:11 +00:00
Guido Casati
0ea07517fb Refactor (RRC/F1): extract common F1 UE context setup code
Improve maintainability by centralizing common F1AP UE context setup
logic into reusable helper functions, enabling consistent handling
and clear serving/target DU entry points for different scenarios.

Code duplication prevention is a beneficial side effect, since at
least one helper function is adopted in subsequent commits.

Major changes:

- Move DRB list filler from external file into rrc_gNB.c and rename
  fill_drb_to_be_setup to rrc_fill_f1_drb_to_setup for naming
  consistency
- Add static helper rrc_fill_f1_ue_context_setup to populate common
  fields shared between serving DU and target DU scenarios:
- Rename rrc_gNB_generate_UeContextSetupRequest to
  rrc_f1_ue_context_setup_from_e1_response to clarify it prepares
  F1AP context setup from E1AP bearer setup response for serving DU
- Add rrc_f1_ue_context_setup_for_target_du (for target DU in
  handover/reestablishment scenarios)
- Adopt helper rrc_fill_f1_ue_context_setup in both functions
2026-01-22 14:56:11 +00:00
Guido Casati
0c879cdf62 MAC: clarify reconfigCellGroup warning for handover scenario
Document that reconfigCellGroup remaining present is expected during
handover (target DU doesn't send RRC Reconfiguration).
2026-01-22 14:56:11 +00:00
Guido Casati
1c6acfbc20 RRC Bugfix: Propagate DU association ID from PDCP to RRC via ITTI message header
When processing UL RRC messages from PDCP, the DU association ID (assoc_id)
was not being propagated to RRC, resulting in assoc_id being 0 in
rrc_gNB_decode_dcch.

Fix by setting originInstance in the ITTI message header to the stored
du_assoc_id from ue_data when PDCP creates the F1AP_UL_RRC_MESSAGE.
2026-01-22 14:56:11 +00:00
Guido Casati
b8c44aaf2c OAI UE bugfix: set is_srb flag to false for DRBs 2026-01-22 14:56:11 +00:00
Jaroslava Fiedlerova
ed4cca814a Merge branch 'integration_2026_w04' into 'develop'
Integration `2026.w04`

* !3787 CI: disable aerial x86 build pipeline
* !3820 Integrate F1AP messages required for NRPPa
* !3789 fix A3 event configuration
* !3861 add a csv T tracer
* !3669 NR UE: add neighboring cell measurements and measurement report of event A3
* !3866 nr-softmodem: ensure RU is ready before L1 init in NFAPI PNF mode
* !3402 Test FDM PRACH in CI
* !3852 Cleanup nr_slot_fep_ul
* !3782 Improvements to support CSET0 multiplexing pattern 3 for FR2
* !3862 Check for PDSCH overlapping CORESET during RA
* !3430 NR gNB handling TCI state indication for beam switching
* !3872 Fix compilation issues with vrtsim taps client
* !3687 Standardize Documentation Formatting and Navigation for MkDocs

Closes #705

See merge request oai/openairinterface5g!3867
2026-01-22 14:27:15 +00:00
Jaroslava Fiedlerova
e84b0714d3 Merge remote-tracking branch 'origin/fix-docs' into integration_2026_w04 (!3687)
Standardize Documentation Formatting and Navigation for MkDocs

This merge request improves and organizes the documentation to align with MkDocs
requirements. The following guidelines have been applied:

Guidelines Followed

Fix Broken Links and Paths
- Updated all links with proper paths to ensure correct rendering in MkDocs.

Correct Headings
- Removed multiple H1 headings (#).
- Subheadings use H2–H6 (## to ######) for consistent structure.

Proper URL Formatting
- All URLs now follow standard Markdown syntax,
  e.g., [Example](https://www.example.com).

Proper Syntax
- Tables, lists, and code blocks use standard Markdown formatting to ensure
  correct rendering.

Remove HTML Formatting
- Removed unnecessary inline HTML styling from documents, retaining only the
  content.

Notes and Warnings
- Converted notes and warnings into blockquote syntax (>).

This ensures the documentation is properly structured, consistent, and
MkDocs-friendly.
2026-01-22 11:48:14 +01:00
Shubhika Garg
a1da4b716c docs: Add Documentation Best Practices guide for contributors
- Add it as a reference in README.md
2026-01-22 10:55:29 +01:00
Shubhika Garg
4d5f9d3cb3 docs(episys): Convert README text files to markdown files
- Include functions/file_names in backticks for readability
     - Include the images directly inside the document (rather than plain image file name)
     - Give relevant spacing if required
2026-01-22 10:55:05 +01:00
Shubhika Garg
87410b1d25 docs: updated HTML <img> tags in the doc/ to use standard Markdown image syntax 2026-01-22 10:55:05 +01:00
Shubhika Garg
a025ce30ff doc: fix internal anchor links for section references in system_requirements.md
-  Updated links to use proper Markdown anchor format for section references(e.g. `#simulated-radio`)
2026-01-22 10:55:05 +01:00
Shubhika Garg
17c6d0feb2 docs: replace HTML header with Markdown heading
- Removed HTML table and font tags for the OAI titles and replaced them with a clean Markdown H1 heading
      - Added missing # H1 headings in some files
2026-01-22 10:55:05 +01:00
Robert Schmidt
5c480ffd50 docs: Standardize documentation headings (remove multiple # H1)
- Remove multiple single top-level (# H1) headings per file
 - Use (# H2 and ###### H6) sub-headings for consistency
 - Remove any trailing # in the headings
 - This ensures proper table of contents rendering in MkDocs.

 - Also removed RUN_NR_multiple_BWPs.md as it is moved to MAC usage
2026-01-22 10:55:05 +01:00
Shubhika Garg
a9ba6290b9 docs(architecture): Remove HTML Formatting: retain only the contents and not styling 2026-01-22 10:55:05 +01:00
Shubhika Garg
ed2acc135c docs(architecture): use inline code formatting with backticks
- To improve readability
2026-01-22 10:54:43 +01:00
Shubhika Garg
34d3b5d386 doc(episys): format test-setup and current status blocks for clarity and consistency
- bold current status for clarity and add spacing for better readability
     - Wrap processes in the test setup block inside code blocks as they were rendered as GitLab issues
     - Remove extra spacing in the test setup block
2026-01-22 10:50:50 +01:00
Shubhika Garg
ed734c389f doc(tutorials): ORAN FHI 7.2 - Fix internal links to match the correct heading anchors
- Replace incorrect anchors with the correct formatting
- Ensures that references navigate correctly within the document
2026-01-22 10:50:50 +01:00
Shubhika Garg
273b9fba4d doc: Fix the formatting of gNB RACH Processing document
- Organize into a main title and sub-headings
      - Put var/func as inline code
      - Add anchor links for the referenced step
2026-01-22 10:50:50 +01:00
Shubhika Garg
1aa13e4f23 doc: Fix formatting for mkdocs parsing
- Give a line in between bullet points to reflect bullet points correctly
        - Split long statement into bullet points for readability
        - Format the document for proper rendering
        - Fix table formatting
        - Use standard TOC syntax in 5GNAS
2026-01-22 10:50:50 +01:00
Shubhika Garg
57f8e69c13 doc: render HTML-like tag correctly by escaping
- The parser was incorrectly interpreting `</` as the start of an HTML closing tag, leading to a crash in mkdocs
     - Replace with HTML entity to ensure it is treated as a plain text.
2026-01-22 10:50:50 +01:00
Shubhika Garg
c0d0bab0d8 docs: standardize Markdown links to [Text](URL) format
- Fixed inconsistent or raw URL links across multiple documentation files
  - Ensure proper link formatting for Markdown rendering
2026-01-22 10:50:50 +01:00
Shubhika Garg
f5501ed725 docs: enhance readability of Notes, Cautions, Issues, and Attention sections
- Standardized appearance of Notes, Cautions, Issues, and Attention blocks for better clarity
2026-01-22 10:50:45 +01:00
Mario Joa-Ng
2f6b30cdb4 Fix FFT size for xran_fh_tx_send_slot_BySymbol() and xran_fh_rx_read_slot_BySymbol() 2026-01-22 02:54:03 +01:00
Jaroslava Fiedlerova
7cf6181ff4 Merge remote-tracking branch 'origin/vrtsim-compilation-fix' into integration_2026_w04 (!3872)
Fix compilation issues with vrtsim taps client

Fix two issues regarding vrtsims taps client implementation:
- Incorrect #define used to enable taps socket handling
- flatbuffers package name changing between ubuntu versions
2026-01-21 21:17:11 +01:00
Jaroslava Fiedlerova
5225f60194 Merge remote-tracking branch 'origin/NR_TCI_states' into integration_2026_w04 (!3430)
NR gNB handling TCI state indication for beam switching

This MR implements the procedure to send in DLSCH MAC-CE for TCI state
indication to UE
- if new beam is reported via SSB RSRP, gNB allocates MAC-CE with TCI
  indication
- DLSCH is scheduled to be transmitted with priority
- a timer is started when receiving ACK according to the delay mandated
  by standard (8.10.3 of 38.133)
- at timer expiry the gNB switches beam
2026-01-21 17:37:15 +01:00
Bartosz Podrygajlo
9ac9e3ba91 Add support for taps client to ubuntu gNB & nrUE images 2026-01-21 12:58:09 +01:00
Jaroslava Fiedlerova
4d19b4732e Merge remote-tracking branch 'origin/issue-705' into integration_2026_w04 (!3862)
Check for PDSCH overlapping CORESET during RA

CORESET 0 is configured in the configuration file by
'initialDLBWPcontrolResourceSetZero' and PDSCH TDA list is configured based on
the current BWP size.

It may happen that the user configures a 2 symbol CORESET 0 for a BWP >= 48 PRBs
(which is a valid 3GPP configuration) but in function 'nr_rrc_config_dl_tda'
this scenario is not taken in account causing an overlap between PDSCH and PDCCH
symbols during RA.

This leads to very unreliable Msg2 and Msg4 decoding at the UE, but from time to
time it succeeds, which becomes hard to identify this issue.

closes #705
2026-01-21 11:55:42 +01:00
Bartosz Podrygajlo
13f46a0c0a Fix compilation issues with vrtsim taps client
Fix two issues regarding vrtsims taps client implementation:
 - Incorrect #define used to enable taps socket handling
 - flatbuffers package name changing between ubuntu versions
2026-01-21 11:35:12 +01:00
Jaroslava Fiedlerova
231966753d Merge remote-tracking branch 'origin/fix_mux_23' into integration_2026_w04 (!3782)
Improvements to support CSET0 multiplexing pattern 3 for FR2
2026-01-21 11:02:40 +01:00
francescomani
bcfa68347f fix bug in selecting MSG3 re-transmission slot 2026-01-21 03:53:25 +01:00
francescomani
c903d9f640 refactoring nr_generate_Msg3_retransmission
replacing if(X) logic with if(!X) logic
2026-01-21 03:53:25 +01:00
francescomani
9031b26cf8 add safety check to avoid scheduling MSG4 ACK if there is less than 2 symbols in mixed slot
(PUCCH for MSG4 ACK is 2 symbols)
2026-01-21 03:53:25 +01:00
francescomani
15bd09dd24 use commonControlResourceSet instead of CSET0 as coreset for common SearchSpaces in case of MUX pattern 3 2026-01-21 03:53:22 +01:00
francescomani
5e6d9dbbc6 fix for SSB larger than 7 at UE 2026-01-21 03:48:17 +01:00
Jaroslava Fiedlerova
705fbb3818 Merge remote-tracking branch 'origin/cleanup-nr-slot-fep' into integration_2026_w04 (!3852)
Cleanup nr_slot_fep_ul

Rename nr_slot_fep_ul to nr_symbol_fep_ul to relfect its function

Simplify logic so that the function does not require RU context and
the implementation is not dependent on the implementation of RU buffer
management.

This makes the function easier to understand and moves the responsibility
to set the correct buffer offset on the caller.
2026-01-20 20:48:08 +01:00
Jaroslava Fiedlerova
2a8683202e Merge remote-tracking branch 'origin/prach-fdm-ci' into integration_2026_w04 (!3402)
Test FDM PRACH in CI
2026-01-20 14:46:32 +01:00
Jaroslava Fiedlerova
1411b03c4f Merge remote-tracking branch 'origin/nfapi-pnf-l1-xran-race-cond-fix' into integration_2026_w04 (!3866)
nr-softmodem: ensure RU is ready before L1 init in NFAPI PNF mode

PROBLEM: In PNF mode, L1 is started from nfapi_pnf.c without verifying RU
readiness. The only gate is config_sync_var, but nr_softmodem.c sets this before
the RU  (e.g., FHI-72) is actually started. As a result, START_REQUEST can
trigger L1  init while the RU is not yet ready -- this is an issue when using
FHI72 with  DPDK BBDEV, where a pre-mature L1 init will crash the entire program
as DPDK BBDEV depends on xRAN's DPDK EAL. Note that this issue is more like a
"race" condition, so it may not always manifest, and happens at random.

FIX: Perform RU readiness checks before setting config_sync_var in NFAPI PNF mode.
This aligns PNF behavior with other modes and prevents L1 from starting before the
RU is operational.
2026-01-20 14:45:38 +01:00
Sakthivel Velumani
31c6d1d3d6 Test FDM PRACH in CI
SSB position in burst is set to 2 so only SSB index 1 is transmitted.
prach_msg1_FDM is set to 1 so there are two occasions per time slot.
All the UE connecting to gNB will receive SSB index 1 and trigger PRACH
in the second FDM prach occasion.
2026-01-20 12:38:13 +01:00
Robert Schmidt
3fa6b7e59e Check that there is more than zero PRACH FD occasion
FHI 7.2 does not have a field for the number of RACH Occasions.
It seems this needs to be manually configured, and M plane has field
num-prach-re to set the number of frequency domain PRACH occasions.
2026-01-20 12:38:13 +01:00
Bartosz Podrygajlo
28d821bd0f Cleanup nr_slot_fep_ul
Rename nr_slot_fep_ul to nr_symbol_fep_ul to relfect its function

Simplify logic so that the function does not require RU context and
the implementation is not dependent on the implementation of RU buffer management.

This makes the function easier to understand and moves the responsibility
to set the correct buffer offset on the caller.
2026-01-20 12:18:18 +01:00
Robert Schmidt
69edfa25cb Extend PDU session types and make PDU session req flexible 2026-01-20 11:47:28 +01:00
Robert Schmidt
0eddb4d3e3 get_user_nssai_idx(): make NSSAI check configurable
We need to check arbitrary PDU session configurations in a later commit,
so make this configurable.
2026-01-20 11:43:15 +01:00
Robert Schmidt
542b2d017e Add configurable DNN in PDU session request encoding 2026-01-20 11:43:15 +01:00
Robert Schmidt
cadd031c81 Modify TUN interface handling to also handle TAP
Modify all functions to also handle TAP (where applicable). The actual
TAP interface code is not used in this commit, it will be used later.

To make the interface creation stand out, make "Interface XXX
successfully configured" a LOG_A.
2026-01-20 11:42:08 +01:00
Robert Schmidt
1e5c28279e Rename tun_if.{c,h} => tuntap_if.c{c,h}
The next commit introduces functions to also manage TAP interfaces.
2026-01-20 11:11:36 +01:00
Robert Schmidt
7ede84cb1d SDAP entity: store interface name
Simplify interface handling by storing the name: this allows to simplify
to remove_ip_if(), which does not need to recreate a valid name, and
will simplify handling of ethernet PDU sessions with a possibly
different name.
2026-01-20 11:11:36 +01:00
Robert Schmidt
2557df87f5 Hardcode (noS1) PDU session ID to 10
Defacto, the PDU session ID for noS1 modes is already hardcoded, as
starting the nr-softmodem with --noS1 --default-pdu-id 1 leads to

    Assertion (entity != ((void *)0)) failed!
    In start_sdap_tun_gnb_first_ue_default_pdu_session() openair2/SDAP/nr_sdap/nr_sdap.c:163

Further, the --default-pdu-id parameter will be deactivated in a later
commit, and we cannot rely on it. Therefore:

- hardcode noS1 PDU ID (also used in --do-ra/--phy-test modes) to 10 and
  use in gNB&UE
- pass the PDU session ID used in SDAP entity initialization down to
  start_sdap_tun_gnb_first_ue_default_pdu_session() to always use the
  correct one
2026-01-20 11:11:36 +01:00
Robert Schmidt
e9ac0c70c8 Separate change_interface_state() into get/set_if_flags()
For configuring a TAP interface, we need to set different options, which
is not easily feasible with the current change_interface_state() API (or
would make it more complex). To simplify while allowing to set flags
more flexibly, separate into two functions get/set_if_flags().
2026-01-20 11:11:28 +01:00
Robert Schmidt
42fd19dc5c Bugfix: Abort processing on PDU session establishment accept decode failure 2026-01-20 11:11:19 +01:00
Robert Schmidt
345d5315e5 config_module: make pointers const 2026-01-20 10:02:38 +01:00
Xin Zhe Khooi
c978d1664f nr-softmodem: ensure RU is ready before L1 init in NFAPI PNF mode
PROBLEM: In PNF mode, L1 is started from nfapi_pnf.c without verifying RU
readiness. The only gate is config_sync_var, but nr_softmodem.c sets this before
the RU  (e.g., FHI-72) is actually started. As a result, START_REQUEST can
trigger L1  init while the RU is not yet ready -- this is an issue when using
FHI72 with  DPDK BBDEV, where a pre-mature L1 init will crash the entire program
as DPDK BBDEV depends on xRAN's DPDK EAL.

FIX: Perform RU readiness checks before setting config_sync_var in NFAPI PNF mode.
This aligns PNF behavior with other modes and prevents L1 from starting before the
RU is operational.
2026-01-19 17:04:13 +01:00
Robert Schmidt
53095c7239 Remove unnecessary header function declaration 2026-01-19 15:44:01 +01:00
Robert Schmidt
48f9d8a56d Clean up: header not required 2026-01-19 15:36:11 +01:00
Jaroslava Fiedlerova
775051c5d2 Merge remote-tracking branch 'origin/meas-report-a3' into integration_2026_w04 (!3669)
NR UE: add neighboring cell measurements and measurement report of event A3

This is a rework of MR !2385 (closed), the goal is to add neighboring cell
measurements and measurement report of event A3 for NR UE.

This MR was tested with:
- 3rd-party gNB
- 2 OAI-gNB-DUs

The neighboring cell measurements and measurement report of event A3 for OAI-UE
are working as expected.
2026-01-19 14:00:57 +01:00
Jaroslava Fiedlerova
ecd600f38b Merge remote-tracking branch 'origin/t-tracer-csv' into integration_2026_w04 (!3861)
add a csv T tracer

Add a CSV T tracer to dump stuff to a CSV file.
2026-01-19 13:58:12 +01:00
Jaroslava Fiedlerova
70322348f8 Merge remote-tracking branch 'origin/fix-a3-event' into integration_2026_w04 (!3789)
fix A3 event configuration

See commit message for more information.
As a reference, for comparison purpose, PCAPs and TXT files for various tests
done in develop and in this MR are available in the MR description.
2026-01-19 13:55:40 +01:00
Cedric Roux
63b805a5a4 minor: T tracer: add generated binaries to .gitignore 2026-01-19 11:32:47 +01:00
Cedric Roux
d4ebb76e45 T: fix compilation of tracee
there is a warning, but so be it, at least it compiles and run,
no need for more, it's a quick hack
2026-01-19 11:32:47 +01:00
Cedric Roux
152dfae7bc T tracer: log to stderr
stdout messes up with the new csv tracer
2026-01-19 11:32:47 +01:00
Cedric Roux
34a58676ce T tracer: add a csv tracer 2026-01-19 11:32:40 +01:00
Jaroslava Fiedlerova
08edcb43ea Merge remote-tracking branch 'origin/nrppa_f1ap_integration' into integration_2026_w04 (!3820)
Integrate F1AP messages required for NRPPa

This MR is one of the several MRs that will follow in the integration of NRPPa
protocol (!2437) required for positioning in 5G NR. We specifically introduce
encoding and decoding of several F1AP messages including unit tests for
verification in this MR.

The details of the F1AP messages introduced here can be seen below:
- POSITIONING INFORMATION REQUEST
- POSITIONING INFORMATION RESPONSE
  - Supported optional field: SRS Configuration
- POSITIONING INFORMATION FAILURE
- POSITIONING INFORMATION UPDATE
  - Supported optional field: SRS Configuration
- POSITIONING ACTIVATION REQUEST
- POSITIONING ACTIVATION RESPONSE
- POSITIONING ACTIVATION FAILURE
- POSITIONING DEACTIVATION
- TRP INFORMATION REQUEST
- TRP INFORMATION RESPONSE
  - Supported : NR PCI, NG-RAN CGI, NR ARFCN, Geogarphical Coordinates
- TRP INFORMATION FAILURE
- POSITIONING MEASUREMENT REQUEST
  - Supported optional field: SRS Configuration
- POSITIONING MEASUREMENT RESPONSE
- POSITIONING MEASUREMENT FAILURE
- POSITIONING MEASUREMENT REPORT
- POSITIONING MEASUREMENT ABORT
- POSITIONING MEASUREMENT FAILURE INDICATION
- POSITIONING MEASUREMENT UPDATE
  - Supported optional field: SRS Configuration

The reference to these messages can be found in 3GPP 38.473 v16.21.0
2026-01-19 10:28:22 +01:00
Jaroslava Fiedlerova
8df5bcc533 Merge remote-tracking branch 'origin/remove-aerial-x86' into integration_2026_w04 (!3787)
CI: disable aerial x86 build pipeline

We use Aerial exclusively on ARM/gracehopper, so no need to build it on
x86. On this occasion, rename the "kind" (ID which images to build) to
x86 for clarity and align with the other "kinds" (build_cross_arm,
native_armv9, ...).
2026-01-19 10:23:55 +01:00
Cedric Roux
ac535b6338 fix A3 event configuration
While testing the gNB with two hypotetical neighbors, some issues were found
with A3 event configuration.

The configuration of neighbors is:

neighbour_list = (
  {
    nr_cellid = 12345679L;

    neighbour_cell_configuration = (
      {
        gNB_ID              = 0xba0;
        nr_cellid           = 720898;
        physical_cellId     = 1;
        absoluteFrequencySSB= 621312;
        subcarrierSpacing   = 1;
        band                = 78;
        plmn                = { mcc = 505; mnc = 01; mnc_length = 2 };
        tracking_area_code  = 1;
      },
      {
        gNB_ID              = 0xea0;
        nr_cellid           = 1345678L;
        physical_cellId     = 2;
        absoluteFrequencySSB= 640000;
        subcarrierSpacing   = 1;
        band                = 78;
        plmn                = { mcc = 505; mnc = 01; mnc_length = 2 };
        tracking_area_code  = 1;
      }
    );
  }
);

There were two problems.

The first problem is:
- when only default A3 event is configured, it is duplicated in the
  RRC Reconfiguration Report Config To AddMod list with IDs 4 and 5

To test this case, the event configuration is:

nr_measurement_configuration = {
  Periodical = {
    enable                     = 1;
    includeBeamMeasurements    = 1;
    maxNrofRS_IndexesToReport  = 4;
  };

  A2 = {
    enable          = 1;
    threshold       = 60;
    time_to_trigger = 1;
  };

  A3 = (
  {
    physCellId      = -1;
    offset          = 15;
    hysteresis      = 2;
    time_to_trigger = 3
  }
  );
};

The second problem is:
- when configuring an A3 event with an unknown physCellId, the gNB
  does not include any A3 event in the RRC Reconfiguration Report
  Config To AddMod list (which is correct), but configures some
  meas ID with nonexistant Report Config IDs

To test this case, the event configuration is:

nr_measurement_configuration = {
  Periodical = {
    enable                     = 1;
    includeBeamMeasurements    = 1;
    maxNrofRS_IndexesToReport  = 4;
  };

  A2 = {
    enable          = 1;
    threshold       = 60;
    time_to_trigger = 1;
  };

  A3 = (
  {
    physCellId      = 10;
    offset          = 15;
    hysteresis      = 2;
    time_to_trigger = 3
  }
  );
};

Reworking A3 event configuration as done in this commit solves both
issues.
2026-01-17 23:00:32 +01:00
luis_pereira87
03d3a94038 Check for PDSCH overlapping CORESET during RA
CORESET 0 is configured in the configuration file by 'initialDLBWPcontrolResourceSetZero' and PDSCH TDA list is configured based on the current BWP size.
It may happen that the user configures a 2 symbol CORESET 0 for a BWP >= 48 PRBs (which is a valid 3GPP configuration) but in function 'nr_rrc_config_dl_tda' this scenario is not taken in account causing an overlap between PDSCH and PDCCH symbols.
This leads to very unreliable Msg2 and Msg4 decoding at the UE, but from time to time it succeeds, which becomes hard to identify this issue.
2026-01-16 11:54:48 +00:00
Bartosz Podrygajlo
ee2af75bff O-RU: Add Dockerfile and image build step 2026-01-16 11:56:33 +01:00
Bartosz Podrygajlo
27a21cc8aa O-RU: update build_oai to build nr-oru 2026-01-16 11:56:33 +01:00
Raymond Knopp
48bcbc316c Initial implementation of O-RU for 7.2 emulator
Added new executable oainr_ru which acts as a 7.2 O-RU.

Co-authored-by: Bartosz Podrygajlo <bartosz.podrygajlo@openairinterface.org>
Co-authored-by: Mario Joa-Ng <mario.joa-ng@openairinterface.org>
2026-01-16 11:56:25 +01:00
francescomani
64091c9a51 remove workaround to take into account first symbol index, necessary when only SS for SSB 0 was pre-computed 2026-01-16 00:55:04 +01:00
francescomani
e22c6c8438 change sched_ctrlCommon to be SIB1 specific and to allow to store search spaces for each SSB at pre-configuration 2026-01-16 00:55:04 +01:00
francescomani
def635ad7d type int for aggregation level and candidates 2026-01-16 00:55:04 +01:00
francescomani
39e32c5998 simplify SIB1 scheduling by removing unnecessary storage of information in sched_ctrlCommon 2026-01-16 00:55:04 +01:00
francescomani
e0af1a2e75 convert RFsim FR2 32 PRB test into 66 PRB to test MUX pattern 3 2026-01-16 00:55:02 +01:00
francescomani
143a2f87a7 fix in ld condition in DMRS function 2026-01-16 00:43:00 +01:00
francescomani
75820422a4 check if CSET0 exceeds upper BW limit 2026-01-16 00:43:00 +01:00
francescomani
28f3037581 fix for PDCCH channel estimation start subcarrier 2026-01-16 00:43:00 +01:00
francescomani
7173bb6cac formatting 2026-01-16 00:43:00 +01:00
francescomani
b64c4e5708 fixes to make multiplexing pattern 2 and 3 work for Type0-PDCCH CSS
Correct how the slot for SIB1 is computed in case of MUX pattern 2 and 3.
Renamed n_0 to slot for clarity. n_c was never used outside of the function, so
remove it where it is not used.
2026-01-16 00:43:00 +01:00
Robert Schmidt
6317fdd9df CI: Remove kind from RunTests: not used 2026-01-15 15:55:59 +01:00
Robert Schmidt
f2de345b09 CI: don't build Aerial on x86
We use Aerial exclusively on ARM/gracehopper, so no need to build it on
x86. On this occasion, rename the "kind" (ID which images to build) to
x86 for clarity and align with the other "kinds" (build_cross_arm,
native_armv9, ...).
2026-01-15 15:55:20 +01:00
Rakesh Mundlamuri
180e06112f Add F1AP positioning measurement update message enc/dec + test
Reference: 3GPP 38.473 v16.21.0
Mandatory fields:
Transaction ID (supported)
LMF Measurement ID (supported)
RAN Measurement ID (supported)
Optional fields:
SRS Configuration (supported)
2026-01-15 15:26:35 +05:30
Rakesh Mundlamuri
57ab56cce2 Add F1AP positioning measurement abort message enc/dec + test
Reference: 3GPP 38.473 v16.21.0
Mandatory fields:
Transaction ID (supported)
LMF Measurement ID (supported)
RAN Measurement ID (supported)

Add F1AP positioning measurement failure indication message enc/dec + test
Reference: 3GPP 38.473 v16.21.0
Mandatory fields:
Transaction ID (supported)
LMF Measurement ID (supported)
RAN Measurement ID (supported)
Cause (supported)
2026-01-15 15:26:35 +05:30
Rakesh Mundlamuri
4eec984159 Add F1AP positioning measurement report message enc/dec + test
Reference: 3GPP 38.473 v16.21.0
Mandatory fields:
Transaction ID (supported)
LMF Measurement ID (supported)
RAN Measurement ID (supported)
Positioning Measurement Result List (range: 1)
 > Positioning Measurement Result List Item (range: 1..64)
   >> Positioning Measurement Result (supported)
   >> TRP ID (supported)
2026-01-15 15:26:35 +05:30
Rakesh Mundlamuri
8a97d94725 Add F1AP positioning measurement failure message enc/dec + test
Reference: 3GPP 38.473 v16.21.0
Mandatory fields:
Transaction ID (supported)
LMF Measurement ID (supported)
RAN Measurement ID (supported)
Cause (supported)
Optional fields:
Criticality Diagnostics (not supported)
2026-01-15 15:26:35 +05:30
Rakesh Mundlamuri
372ab68056 Add F1AP positioning measurement response message enc/dec + test
Reference: 3GPP 38.473 v16.21.0
Mandatory fields:
Transcation ID (supported)
LMF Measurement ID (supported)
RAN Measurement ID (supported)
Positioning Measurement Result List (range: 0..1)
 > Positioning Measurement Result List Item (range: 1..64)
   >> Positioning Measurement Result (supported)
   >> TRP ID (supported)

Optional fields:
Criticality Diagnostics (not supported)
2026-01-15 15:26:35 +05:30
Rakesh Mundlamuri
e8ae7cb711 Add F1AP positioning measurement request message enc/dec + test
Reference: 3GPP 38.473 v16.21.0
Mandatory fields:
Transcation ID (supported)
LMF Measurement ID (supported)
RAN Measurement ID (supported)
TRP Measurement Request List (range : 1)
 > TRP Measurement Request Item (range : 1..64)
   >> TRP ID (supported)
   >> Search Window Information (optional : not supported)
Positioning Report Characteristics (supported)
Positioning Measurement Periodicity (supported)
Positioning Measurement Quantities (range : 1)
 > Positioning Measurement Quantities Item (range : 1..16384)
   >> Positioning Measurement Type (supported)
   >> Timing Reporting Granularity Factor (optional: not supported)
Optional fields:
SFN Initialisation Time (not supported)
SRS Configuration (supported)
Measurement Beam Information Request (not supported)
System Frame Number (not supported)
Slot Number (not supported)
2026-01-15 15:26:35 +05:30
Rakesh Mundlamuri
6240ad40aa Add F1AP trp information failure message enc/dec + test
Reference: 3GPP 38.473 v16.21.0
Mandatory fields:
Transcation ID (supported)
Cause (supported)
Optional fields:
Criticality Diagnostics (not supported)
2026-01-15 15:26:35 +05:30
Rakesh Mundlamuri
30d3479782 Add F1AP trp information response message enc/dec + test
Reference: 3GPP 38.473 v16.21.0
Mandatory fields:
Transcation ID (supported)
TRP Information List (range : 1)
 > TRP Information Item (range : 1..65535)
   >> TRP Information (supported)

Further details of TRP Information:
TRP ID
TRP Information Type Response List (range : 1)
 > TRP Information Type Response Item (range : 1..64)
   >> CHOICE TRP Information Type Response Item
      >>> NR PCI (madatory : supported)
      >>> NG-RAN CGI (madatory : supported)
      >>> NR ARFCN (madatory : supported)
      >>> PRS Configuration (madatory : not supported)
      >>> SSB Information (madatory : not supported)
      >>> SFN Initialisation Time (madatory : not supported)
      >>> Spatial Direction Information (madatory : not supported)
      >>> Geographical Coordinates (madatory : supported)

For now, we only use Geographical Coordinates.

Optional fields:
Criticality Diagnostics (not supported)
2026-01-15 15:26:28 +05:30
Rakesh Mundlamuri
af4a030997 Add F1AP trp information request message enc/dec + test
Reference: 3GPP 38.473 v16.21.0
Mandatory fields:
Transcation ID (supported)
TRP list (range : 0..1)
 > TRP list Item (range : 1..65535)
   >> TRP ID (supported)
TRP Information Type List (range : 1)
 > TRP Information Type Item (range : 1..64)
   >> TRP Information Type Item (supported)
2026-01-15 15:00:31 +05:30
Rakesh Mundlamuri
a6b83a6ed7 Add F1AP positioning information update message enc/dec + test
Reference: 3GPP 38.473 v16.21.0
Mandatory fields:
gNB-CU UE F1AP ID (supported)
gNB-DU UE F1AP ID (supported)
Optional fields:
SRS Configuration (supported)
SFN Initialisation Time (not supported)
2026-01-15 15:00:31 +05:30
Rakesh Mundlamuri
f579e03b16 Add F1AP positioning deactivation message enc/dec + test
Reference: 3GPP 38.473 v16.21.0
Mandatory fields:
gNB-CU UE F1AP ID (supported)
gNB-DU UE F1AP ID (supported)
CHOICE Abort Transmission
 > SRS Resource Set ID deactivation
 > Release ALL
2026-01-15 15:00:31 +05:30
Rakesh Mundlamuri
99b1bfbdfd Add F1AP positioning activation failure message enc/dec + test
Reference: 3GPP 38.473 v16.21.0
Mandatory fields:
gNB-CU UE F1AP ID (supported)
gNB-DU UE F1AP ID (supported)
Cause (supported)
Optional fields:
Criticality Diagnostics (not supported)
2026-01-15 15:00:31 +05:30
Rakesh Mundlamuri
cf5467e4cc Add F1AP positioning activation response message enc/dec + test
Reference: 3GPP 38.473 v16.21.0
Mandatory fields:
gNB-CU UE F1AP ID (supported)
gNB-DU UE F1AP ID (supported)
Optional fields:
System Frame Number (not supported)
Slot Number (not supported)
Criticality Diagnostics (not supported)
2026-01-15 15:00:31 +05:30
Rakesh Mundlamuri
9b64634652 Add F1AP positioning activation request message enc/dec + test
Reference: 3GPP 38.473 v16.21.0
Mandatory fields:
gNB-CU UE F1AP ID (supported)
gNB-DU UE F1AP ID (supported)
CHOCIE SRStype (supported)
 > Semi-persistent
   >> SRS Resource Set ID (supported)
   >> SRS Spatial Relation (optional : not supported)
 > Aperiodic
   >> Aperiodic (supported)
   >> SRS Resource Trigger (optional : not supported)
Optional fields:
Activation Time (not supported)
2026-01-15 15:00:31 +05:30
Rakesh Mundlamuri
746d12b2d2 Add F1AP positioning information failure message enc/dec + test
Reference: 3GPP 38.473 v16.21.0
Mandatory fields:
gNB-CU UE F1AP ID (supported)
gNB-DU UE F1AP ID (supported)
Cause (supported)
Optional fields:
Criticality Diagnostics (not supported)
2026-01-15 15:00:31 +05:30
Rakesh Mundlamuri
9cd6c68623 Add F1AP positioning information response message enc/dec + test
Reference: 3GPP 38.473 v16.21.0
Mandatory fields:
gNB-CU UE F1AP ID (supported)
gNB-DU UE F1AP ID (supported)
Optional fields:
SRS Configuration (supported)
SFN Initialisation Time (not supported)
Criticality Diagnostics (not supported)
2026-01-15 15:00:31 +05:30
Rakesh Mundlamuri
32718da5a5 Add F1AP positioning information request message enc/dec + test
Reference: 3GPP 38.473 v16.21.0
Mandatory fields:
gNB-CU UE F1AP ID (supported)
gNB-DU UE F1AP ID (supported)
Optional fields:
Requested SRS Transmission Characteristics (not supported)
2026-01-15 15:00:31 +05:30
Robert Schmidt
8f2e98a475 Upgrade F1AP to version 16.21.0
While implementing NRPPA-related F1AP messages, we remarked that
extension field "UL-AoA-ExtIEs" needs to be OPTIONAL (e.g., in NRPPA it
is optional in the OAI-compiled version), but it was not marked as such.
This later version 16.21.0 fixes this.
2026-01-15 15:00:31 +05:30
Robert Schmidt
102965a669 Merge branch 'integration_2026_w03' into 'develop'
Integration: `2026.w03`

* !3818 Update threadCreate
* !3845 Update physim timing thresholds in gNB-N300-Timing-Phytest-LDPC
* !3849 Make gpd config utility global
* !3812 Fix reestablishment after handover
* !3826 Define speed of light
* !3799 Fix for threadpool abort function
* !3791 fix array lenght errors, k variable wrapping threshold. Make the code smaller and more efficient
* !3718 Introduce SRS physical simulator and improvements
* !3857 Fix bug "no AMF for UE"
* !3858 remove function decode_cellGroupConfig
* !3668 Support beam index for LiteON FR2 RU that needs per symbol section in CP packets
* !3844 CI: Remove testcase ids from XML files
* !3620 update multi-RU 7.2 documentation for DAS scenario
* !3788 Fix handover documentation and configuration files for event configuration

See merge request oai/openairinterface5g!3854
2026-01-15 09:07:10 +00:00
Robert Schmidt
22b6298e44 Merge remote-tracking branch 'origin/fix-handover-doc' into integration_2026_w03 (!3788)
Fix handover documentation and configuration files for event configuration
2026-01-15 07:53:51 +01:00
Robert Schmidt
75f53384ca Merge remote-tracking branch 'origin/update_72_doc_with_das' into integration_2026_w03 (!3620)
update multi-RU 7.2 documentation for DAS scenario
2026-01-15 07:53:17 +01:00
Jaroslava Fiedlerova
e47452987d Merge remote-tracking branch 'origin/ci-remove-testcase-ids' into integration_2026_w03 (!3844)
CI: Remove testcase ids from XML files

Automatically enumerate testcases given in XML files
2026-01-15 00:40:09 +01:00
Jaroslava Fiedlerova
dab44db9aa CI: Update ShowTestID to include the source file and line
Replace xml.etree.ElementTree with lxml.etree for to enable line tracking.
Update ShowTestID to include the source file and line number for each
test.
2026-01-14 23:43:08 +01:00
Jaroslava Fiedlerova
3893d5c8ef CI: harmonize test case identifier
Remove unused testCase_id definitions and replace all occurrences of test_id
with test_idx across the ci-scripts folder.
2026-01-14 23:43:08 +01:00
Jaroslava Fiedlerova
0166bbd493 CI: Remove requested and exclusion test parsing and validation
Requested and exclusion test lists are no longer present in the XML files,
so related parsing, format checks, and filtering logic have been removed.
2026-01-14 23:43:08 +01:00
Jaroslava Fiedlerova
12f4167f99 CI: Automatically enumerate test cases, remove hardcoded IDs
Update all XML files in ci-scripts folder, using Python script
attached in MR !3844.
https://gitlab.eurecom.fr/oai/openairinterface5g/-/merge_requests/3844#note_198132
2026-01-14 23:43:03 +01:00
Guido Casati
d613cf7b0b RRC: improve error handling in doRRCReconfiguration_from_HandoverCommand
- Refactor function to return byte_array_t instead of taking buffer
  parameter for consistency with other encoding functions
  (do_RRCReconfiguration, do_HO_RRCReconfiguration) and to prevent buffer
  overflow issues since the memory size is determined automatically

- Add comprehensive error checking:
  * Input validation
  * Check return of each decode (HandoverCommand
    and RRCReconfiguration)
  * Validate HandoverCommand structure before access
  * Validate OCTET_STRING before decoding RRCReconfiguration
  * Error handling and cleanup for enc/dec failures

- Update caller in rrc_gNB_NGAP.c
  * use new signature
  * free buffer
  * send HO Cancel on decoding failure (source gNB)

Closes #1043
2026-01-14 17:05:35 +01:00
Guido Casati
f6d23422aa NGAP: enable Handover Cancel encoding
This commit adds support for the Handover Cancel initiating message
procedure code (NGAP_ProcedureCode_id_HandoverCancel).

Changes:
- ngap_gNB_decoder.c: Added case handler for Handover Cancel in
  ngap_gNB_decode_initiating_message() to properly decode and log
  incoming Handover Cancel messages from the AMF.

- ngap_gNB_encoder.c: Added Handover Cancel to the list of supported
  initiating message procedure codes in ngap_gNB_encode_initiating(),
  allowing the gNB to encode and send Handover Cancel messages.

The Handover Cancel procedure is already implemented in other parts of
the NGAP stack, these changes were missing to complete the support
by ensuring the procedure code is properly recognized in both the encoder
and decoder switch statements, following the same pattern as other
procedure codes.
2026-01-14 17:05:35 +01:00
Robert Schmidt
91e0388180 Merge remote-tracking branch 'origin/liteon_develop_F' into integration_2026_w03 (!3668)
Support beam index for LiteON FR2 RU that needs per symbol section in CP packets

This branch supports beam index for LiteOn FR2 RU and others. It adds
the support of beam index for LiteOn RU that uses per-symbol CP packet
and is a sequel of MR !3605 (merged) that supports beam index for RU
that uses per-slot CP packets.

A. To support LiteOn FR2 RU, the following are needed.

a. Per symbol beamforming. Need separate section for each symbol on CP packet.

b. Handle these two bugs:

- section ID on UP packet is set wrongly to 13 for all sections
- prach eAxC offset starts from 0 instead of from last antenna port
  number used by other channels.

B. Implementation

a. set fh_config->RunSlotPrbMapBySymbolEnable based on the setting in the configuration file

- if disable, the existing per-slot scheme is run on xran.
- if enable, RunSlotPrbMapBySymbolEnable mode is on in xran so that xran
  will generate PrbElm per symbol (aka total of 14)and perform
  per-symbol processing on the corresponding PrbElm.

b. set fh_config->LiteOnIgnoreUPSectionIdEnable based on the setting in
the configuration file if enable, handle 2 "features" of Liteon:

- To handle the section_id = 13 issue on Liteon where section ID is set
  wrongly to 13 for all sections
- To handle the prach eAxC offset issue on Liteon where it starts from 0
  instead of from the end of last antenna port number

c. if fh_config->RunSlotPrbMapBySymbolEnable, OAI FHI

- invoke xran_fh_rx_read_slot_BySymbol() instead of xran_fh_rx_read_slot()
- invoke xran_fh_tx_send_slot_BySymbol() instead of xran_fh_tx_send_slot()

C. Testing

a. Command to test benetel RU

    sudo LD_LIBRARY_PATH=.:$DPDK_INST/lib/x86_64-linux-gnu/ ./nr-softmodem -O /etc/ran_development/CONFs/gnb.sa.band77.273prb.fhi72.4x4-benetel550_c0.conf --thread-pool 21,22,23,24,25,26,27,28

    Results:
    iperf UDP uplink
    [  5]   0.00-10.22  sec  87.3 MBytes  71.6 Mbits/sec  0.100 ms  370/63081 (0.59%)  receiver
    iperf UDP downlink
    [  5]   0.00-10.00  sec   796 MBytes   668 Mbits/sec  0.017 ms  1824/586404 (0.31%)  receiver

b. Command to test LiteOn FR2 RU

    sudo LD_LIBRARY_PATH=.:$DPDK_INST/lib/x86_64-linux-gnu/ ./nr-softmodem -O /etc/ran_development/CONFs/gnb.sa.band78.66prb.fhi72.2x2-liteon-F-Release.conf--thread-pool 21,22,23,24,25,26,27,28

    Result:
    iperf UDP uplink
    [  5]   0.00-10.20  sec  89.9 MBytes  73.9 Mbits/sec  0.156 ms  212/64848 (0.33%)  receiver
    iperf UDP downlink
    [  5]   0.00-10.00  sec   361 MBytes   303 Mbits/sec  0.077 ms  277662/542891 (51%)  receiver

D. Difference between LiteOn FR2 E release configuration file and that for F release is

    diff gnb.sa.band78.66prb.fhi72.2x2-liteon-KB.conf gnb.sa.band78.66prb.fhi72.2x2-liteon-F-Release.conf 39d38

    <     beam_weights = [1, 1];
    225a225
    >     beam_weights = [1];
    312c312,313
    <   mtu = 1500; # check if xran uses this properly
    ---
    >   #mtu = 1500; # check if xran uses this properly
    >   mtu = 9000; # check if xran uses this properly
    313a315,316
    >   RunSlotPrbMapBySymbol = 1;
    >   LiteOnIgnoreUPSectionId = 1;
2026-01-14 14:47:52 +01:00
Mario Joa-Ng
c96aa4e740 use a single OAI FHI to handle both liteon and others. liteon uses xran_fh_tx_send_slot_BySymbol() and xran_fh_rx_read_slot_BySymbol() to send CP one section per sysmbol 2026-01-14 14:34:18 +01:00
Mario Joa-Ng
48247ecc1d Add F release patch fh_config parameters RunSlotPrbMapBySymbol and LiteOnIgnoreUPSectionId.
Add the F patch that work on both Benetel and LiteOn RU. support
fh_config parameters RunSlotPrbMapBySymbol and LiteOnIgnoreUPSectionId.
Change version number.
2026-01-14 14:33:30 +01:00
francescomani
f09a74fbb3 Add 7.2 documentation and a reference DU config file for DAS scenario
Co-authored-by: Teodora Vladić <teodora.vladic@openairinterface.org>
2026-01-14 14:32:35 +01:00
Reem Bahsoun
4e4023a455 Align config fields in N2 HO config files 2026-01-14 14:02:56 +01:00
Robert Schmidt
b8b2a36a30 Merge remote-tracking branch 'origin/remove_decode_cellGroupConfig' into integration_2026_w03 (!3858)
remove function decode_cellGroupConfig

it's never used
2026-01-14 11:06:50 +01:00
Robert Schmidt
bd6ce9bad9 Merge remote-tracking branch 'origin/fix-bug-release-no-amf' into integration_2026_w03 (!3857)
Fix bug "no AMF for UE"

It might happen that the RRC does not know the AMF UE NGAP ID, yet. Even
in that case, we should forward the release request to the NGAP module,
which can either forward a message to the AMF, or reply back to release
the UE. This avoids an error where the CU claims there was no AMF, when
there actually is.

One possible problematic behavior is if a UE disconnects before the gNB
receives an NGAP Initial Context Setup. In this case, the AMF UE NGAP ID
was not forwarded to the RRC (although it was known at NGAP), thus
blocking the release of the UE.

This is the main fix, the rest are minor fixes:

- store AMF UE NGAP ID as early as possible
- warn in MAC if UE unknown for UE context release command
- show TEIDs with correct endianness in GTP
- avoid NG Setup Failure+Setup log.
2026-01-14 11:06:15 +01:00
francescomani
c00b5b8c1c remove function decode_cellGroupConfig since it is declared but never used anywhere 2026-01-14 10:14:20 +01:00
Robert Schmidt
93b3a5aedb Merge remote-tracking branch 'origin/srs_phy_simulator' into integration_2026_w03 (!3718)
Introduce SRS physical simulator and improvements

This MR consists of two parts:

- Introduces SRS physical simulator to test different configurations of
  SRS
- Improvements in the SRS channel estimation (Addressing the comments
  from old, unfinished MR !2875)
  - rewrite nr_srs_channel_estimation() to loop over rx antennas and
    antenna ports to be able to parallelize
  - Improvements in timing_advance_offset and timing_advance_offset_nsec
    computation
  - Introduce SRS multi-symbol channel estimation
    - The channel impulse response is estimated from the averaged
      channel frequency response over multiple symbols
    - The channel frequency estimates are left as they are to be able to
      estimate doppler in the future
  - Simplify SRS channel estimation to handle memory alignment in the
    case of different SRS configurations (eg: comboffset)

To use multiple symbols when running gNB, the following parameters needs
to be edited in the function get_srs_resource()

- srs_res->resourceMapping.startPosition with a range from {0,1,..,5}
  corresponds to the start symbol {13, 12, .. 8} with in a slot
- srs_res->resourceMapping.nrofSymbols indicates the number of symbols
  {n1, n2, and n4}

Make sure the that start symbol + number of symbols is < 14

The timing results for SRS in develop and srs_phy_simulator are as follows:

Command used: sudo ./nr_ulsim -n1000 -s50 -S50 -R273 -W2 -y2 -z2 -E 1 -P

develop

|__ RX SRS time                            124.94 us (1000 trials)		(124.94 total [ms])
    |__ Generate SRS sequence time           0.05 us (1000 trials)		(  0.05 total [ms])
    |__ Get SRS signal time                 19.41 us (1000 trials)		( 19.41 total [ms])
    |__ SRS channel estimation time         89.11 us (1000 trials)		( 89.11 total [ms])
    |__ SRS timing advance estimation time  13.10 us (1000 trials)		( 13.10 total [ms])
    |__ SRS report TLV build time            2.80 us (1000 trials)		(  2.80 total [ms])
        |__ SRS beam report build time       0.00 us (  0 trials)
        |__ SRS IQ matrix build time         2.73 us (1000 trials)

srs_phy_simulator

|__ RX SRS time                            211.93 us (1000 trials)		(211.93 total [ms])
    |__ Generate SRS sequence time           0.04 us (1000 trials)		(  0.04 total [ms])
    |__ Get SRS signal time                 19.55 us (1000 trials)		( 19.55 total [ms])
    |__ SRS channel estimation time        152.05 us (1000 trials)		(152.05 total [ms])
    |__ SRS timing advance estimation time  36.67 us (1000 trials)		( 36.67 total [ms])
    |__ SRS report TLV build time            2.96 us (1000 trials)		(  2.96 total [ms])
        |__ SRS beam report build time       0.00 us (  0 trials)
        |__ SRS IQ matrix build time         2.88 us (1000 trials)

Note that in srs_phy_simulator, to compute timing offset ns, an
oversampling factor of 2 is performed. Also, for peak detection, we
average the channel estimates for every port.
2026-01-13 13:39:32 +01:00
Robert Schmidt
0fdc095da5 Merge remote-tracking branch 'origin/fix-simplify-prach-nrue' into integration_2026_w03 (!3791)
fix array lenght errors, k variable wrapping threshold. Make the code smaller and more efficient

generate_nr_prach() has several errors coming from replace int16_t by
c16_t, and also older error in k wrapping at the end of the symbol

the code is also ridiculously complex, wasting memory and cpu time in
intermediate useless buffers and headache usage of memmove()
2026-01-13 13:37:23 +01:00
Robert Schmidt
5fa624b206 Move NGSetupResponse message to avoid confusion
On NGSetupFailure, before moving, we might have

    [NGAP]   Received NG setup failure for AMF... please check your parameters
    [NGAP]   Received NGSetupResponse from AMF
2026-01-13 13:28:46 +01:00
Robert Schmidt
d7a940baba Log TEID in host order
All over the GTP module, we use ntohl()/htonl() to convert between local
and network order. It seems to have been forgotten here.
2026-01-13 13:28:46 +01:00
Robert Schmidt
b60a37ebb8 Log NGAP Initial Context Setup
For debugging, it might notably be useful to see the AMF UE NGAP ID. Log
it in the single Initial Context Setup message.
2026-01-13 13:28:46 +01:00
Robert Schmidt
89b3eb0132 NR MAC: warn on release for unknown UE 2026-01-13 13:28:46 +01:00
Robert Schmidt
f1db9cb158 Forward AMF UE NGAP ID to RRC on DL NAS Message
In the Initial Context Setup message, the NGAP forwards the AMF UE ID,
but not in the DL NAS Message, although 38.413 says, in $8.3.1.2 either

> The NG-RAN node shall use the AMF UE NGAP ID IE and RAN UE NGAP ID IE
> received in the INITIAL CONTEXT SETUP REQUEST message as identification
> of the logical connection

or in $8.6.2.2

> The NG-RAN node shall use the AMF UE NGAP ID IE and RAN UE NGAP ID IE
> received in the DOWNLINK NAS TRANSPORT message as identification of the
> logical connection

So forward in both cases for harmonization.
2026-01-13 13:27:24 +01:00
Robert Schmidt
c003096176 Always send release request at RRC
It might happen that the RRC does not know the AMF UE NGAP ID, yet. Even
in that case, we should forward the release request to the NGAP module,
which can either forward a message to the AMF, or reply back to release
the UE.

Reported-By: Jegor Zelenjak <jzelenjak@proton.me>
2026-01-13 11:53:42 +01:00
Robert Schmidt
815a5719cd Merge remote-tracking branch 'origin/define_c' into integration_2026_w03 (!3826)
Define speed of light

Common definition for speed of light constant, instead of multiple local
definitions
2026-01-13 11:23:49 +01:00
Robert Schmidt
d456b1901f Merge remote-tracking branch 'origin/tpool-fix' into integration_2026_w03 (!3799)
Fix for threadpool abort function
2026-01-13 11:23:19 +01:00
Sakthivel Velumani
ae8319dbb6 phy: add warning when choosing higher 3/4 sampling 2026-01-13 11:07:17 +01:00
Laurent THOMAS
1e861ac04e fix array lenght errors, k variable wrapping threshold. Make the code smaller and more efficient 2026-01-13 11:07:13 +01:00
Robert Schmidt
3d05c084ba Merge remote-tracking branch 'origin/fix_reestablishment_after_handover' into integration_2026_w03 (!3812)
Fix reestablishment after handover
2026-01-13 10:01:00 +01:00
Robert Schmidt
788cc5f79d Merge remote-tracking branch 'origin/gpd' into integration_2026_w03 (!3849)
Make gpd config utility global

Make gpd a global utility macro for reading config/command line
parameters. Add a corresponding function with full name for clarity,
keep the short name for the macro for backward compatibility and ease of
use.

The main benefit of gpd/config_get_paramdef_from_name macro/function is
that it does not require maintaining a separate parameter index list.
2026-01-12 16:38:13 +01:00
Robert Schmidt
6eeb8d3d4d Merge remote-tracking branch 'origin/ulsch_timing_test_threshold_update' into integration_2026_w03 (!3845)
Update physim timing thresholds in gNB-N300-Timing-Phytest-LDPC

The lower bound for the tests are too tight and any slight improvement
in the timing can result in a test failure. For example, these tests
were failing due to the improvements from the MR !3718
2026-01-12 16:37:44 +01:00
Robert Schmidt
fdf0fdf9f7 Merge remote-tracking branch 'origin/affinity-fix' into integration_2026_w03 (!3818)
Update threadCreate

if the name is too long, the thread name is shortened to the maximum
pthread name (16 characters).
2026-01-12 16:37:17 +01:00
Bartosz Podrygajlo
407d175f5d Clear memory in shm_td_iq_channel after RX
Clear memory in shm_td_iq_channel after RX. This prevents the IQ
from being read twice. This can happen if the application crashes
and will keep the other side reading historical IQ samples.
2026-01-12 11:50:39 +01:00
Rakesh Mundlamuri
25ee8cd7e9 Update the average value of the dlsim, ulsim timing test
The lower bound for the tests are too tight and any slight improvement in the timing can result in a test failure.
For example, these tests were failing due to the improvements from the MR 3718
2026-01-12 15:28:27 +05:30
Rakesh Mundlamuri
5d545a6cc5 Add srssim to the feature set 2026-01-09 20:49:46 +05:30
Rakesh Mundlamuri
a752f43ad6 Harmonize phy_simulators to use compute_tx_energy_level() and compute_noise_variance() 2026-01-09 20:49:46 +05:30
Rakesh Mundlamuri
f84ed0bbcf Make nb_antenna as a input parameter to generate_srs_nr()
- We use the same function at gNB and UE.
 - We always use nb_antennas_tx to check the max possible number of ports (which is wrong).
 - At gNB, we should use nb_antennas_rx and at the UE, we should use nb_antennas_tx.
2026-01-09 20:49:46 +05:30
Rakesh Mundlamuri
dea4508f89 Update docker file to compile nr_srssim to fix tests in gracehopper 2026-01-09 20:49:46 +05:30
Rakesh Mundlamuri
be3ad2beba rewrite srs channel estimation to fix memory alignment in SRS channel estimation
The memory alignment is required to use c16multaddVectRealComplex
in SRS channel interpolation. With a change in SRS comb_offset, the
existing algorithm was giving segmentation fault.

The existing srs channel estimation required memory alignment at two
stages. 1. When k = 0 (the first srs subcarrier), 2. When subcarrier <
K_TC (wrapped around after ofdm_symbol_size). Thus two memory alignments
are required leading to complications.

The srs channel estimation is now simplified to do it linearly instead of
wrapping around. This simplified the memory alignment required only when
k = 0.
2026-01-09 20:49:46 +05:30
Rakesh Mundlamuri
7b698531a9 update phy_simulators testcases 2026-01-09 20:49:38 +05:30
alexjiao
34d53549f3 Refactor SSB RSRP reporting
Add send_ssb_rsrp_meas() helper function to reduce code duplication.
2026-01-09 20:05:17 +08:00
alexjiao
9077a89f17 Add PHY and RRC features in FEATURE_SET.md 2026-01-09 20:05:17 +08:00
alexjiao
83f5e30610 UE sends the measurement report for event A3
UE sends the measurement report for event A3

Co-authored-by: Roberto Louro Magueta <rmagueta@allbesmart.pt>
2026-01-09 20:05:17 +08:00
alexjiao
3fdbe01157 Add neighboring cell measurements
Implement intra-frequency neighboring cell measurements including:
- Measurement configuration structures
- Blind search and known PCI validation
- RSRP measurements for neighbor cells

Co-authored-by: Roberto Louro Magueta <rmagueta@allbesmart.pt>
2026-01-09 20:05:11 +08:00
Rakesh Mundlamuri
bfb0c707fe Fix tdd pattern of phy_simulators for mu = 0, 3 2026-01-09 16:58:34 +05:30
Rakesh Mundlamuri
4c48d91538 Fix issues detected using address sanitizer 2026-01-09 16:58:34 +05:30
Rakesh Mundlamuri
0b197891cc Introduce SRS multi-symbol channel estimation 2026-01-09 16:58:34 +05:30
Rakesh Mundlamuri
0b0dce9995 Update T traces to record toa in ns and SRS time/frequency channel over multiple rx antennas and ports 2026-01-09 16:58:34 +05:30
Rakesh Mundlamuri
729dc02b88 Split the code in the SNR loop as functions for readability
- Introduce signal energy and noise variance functions
- Combine rotation and OFDM modulation RX as a function
- Harmonize the use of number of antennas across the code
- Rename nr_ue_pusch_common_procedures() to nr_tx_rotation_and_ofdm_mod() to decribe the functionality better
2026-01-09 16:58:34 +05:30
Rakesh Mundlamuri
14cfbbf425 fix do_tdd_config_sim() while filling uplink slots 2026-01-09 16:58:34 +05:30
Rakesh Mundlamuri
9a0a89fa88 fix nr_phy_config_request_sim that overwrites threequarter sampling rate parameter 2026-01-09 16:58:34 +05:30
Rakesh Mundlamuri
1b974c6ab2 merge timing_advance_offset and timing_advance_offset_ns computation 2026-01-09 16:58:34 +05:30
Rakesh Mundlamuri
b378acf2e0 Introduce SRS oversampling for better accuracy in estimating nanoseconds 2026-01-09 16:58:34 +05:30
Rakesh Mundlamuri
7846d83b07 use intermediate variables to improve readability and avoid additional computations 2026-01-09 16:58:34 +05:30
Rakesh Mundlamuri
a5a09676ad rewrite nr_srs_channel_estimation() to loop over rx antennas and antenna ports to be able to parallelize 2026-01-09 16:58:34 +05:30
Rakesh Mundlamuri
1ffb1cfe16 Adding testcases to test nr_srssim 2026-01-09 16:58:34 +05:30
Rakesh Mundlamuri
3d68a44da0 Introduce SRS physical simulator 2026-01-09 16:58:26 +05:30
Rakesh Mundlamuri
5803e2037e bugfix to avoid error after enabling DEBUG_CH 2026-01-09 09:26:48 +05:30
Rakesh Mundlamuri
4b102ea237 Make SRS receive procedures as a function 2026-01-09 09:26:48 +05:30
Rakesh Mundlamuri
3684c3e0e8 Declare ue_srs_procedures_nr in a header file to use in nr_srssim 2026-01-09 09:26:48 +05:30
alexjiao
dfd3ad267e Refactor pss_search_time_nr() with configurable search window
Add search_start and search_length parameters to pss_search_time_nr()
to support targeted PSS searches within specific time windows.
2026-01-09 11:25:16 +08:00
alexjiao
13933f9db8 Refactor SSB search to common function
Extract common SSB search logic into nr_search_ssb_common() to enable
code reuse between initial sync and neighbor cell measurements.
2026-01-09 11:25:16 +08:00
francescomani
d4e3c5d384 define speed of light in utils to avoid multiple local definitions 2026-01-09 02:16:49 +01:00
Jaroslava Fiedlerova
699a5453a0 Merge branch 'integration_2026_w02' into 'develop'
Integration: `2026.w02`

* !3828 L2 UE files code cleanup for static functions
* !3839 Couple rfsim fixes
* !3835 Correctly include cblas include directories for RHEL
* !3840 Fix missing return statements in SIB1 TDA validation
* !3836 move NTN UE L1 functions to a new file
* !3793 CI: Remove redundant Jenkinsfiles
* !3770 RRC UE: Implement proper NH chain synchronization for RRC Reestablishment
* !3843 fix(documentation): issue 1042
* !3842 Remove unused cmake_targets files
* !3832 Remove global iq_txshift and iq_rxrescale
* !3847 Minor CI and nr_ulsim reporting adjustments
* !3838 NR NGAP (N2HO) : Fix Time UE Stayed in Cell IE type and calculation
* !3677 Support prach with start symbol of PRACH not at symbol 0

Closes #1042 and #857

See merge request oai/openairinterface5g!3841
2026-01-08 17:10:47 +00:00
Bartosz Podrygajlo
afb861dc0c Update vrtsim timing job thread
List of changes:
 - avoid calculating accumulated rounding error by calculating absolute
   sample index based on CLOCK_REALTIME every time.
 - use threadCreate instead of plain pthread_create which assigns a unique
   thread name and simplifies debugging
2026-01-08 14:11:15 +01:00
Bartosz Podrygajlo
11ae7e7993 Make gpd config utility global
Make gpd a global utility macro for reading config/command line parameters.
Add a corresponding function with full name for clarity, keep the short name
for the macro for backward compatibility and ease of use.

The main benefit of gpd/config_get_paramdef_from_name macro/function is that
it does not require maintaining a separate parameter index list.
2026-01-08 13:57:13 +01:00
Robert Schmidt
c8866651fb Merge remote-tracking branch 'origin/oran_prach_start_symbol' into integration_2026_w02 (!3677)
Support prach with start symbol of PRACH not at symbol 0

The following PRACH indice have been tested.

    index / format (nf mod x = y) / Subframe/ start_symbol /no_of_slot / occ / duration
    152     B4     2 1                4,9          0               2      1    12
    151     B4     2 1                4,9          2               1      1    12
    157     B4     1 0                 4           0               1      1    12
    159     B4     1 0                 9           0               1      1    12
2026-01-08 13:03:39 +01:00
Jaroslava Fiedlerova
16c5f59e9a Merge remote-tracking branch 'Rakesh_B_B/fix-ngap-time-in-cell' into integration_2026_w02 (!3838)
NR NGAP (N2HO) : Fix Time UE Stayed in Cell IE type and calculation

According to 3GPP TS 38.413, the 'Time UE Stayed in Cell' IE is an
integer ranging from 0 to 4095. This patch updates the data structure
to reflect the correct bit width and implements the dynamic calculation
based on the UE's residence time.

- Change time_in_cell from long to uint16_t in ngap_messages_types.h.
- Replace dummy value with real-time calculation in rrc_gNB_NGAP.c.
- Implement a ceiling of 4095 to comply with the 12-bit protocol limit.

Ref: 3GPP TS 38.413 Section 9.3.1.97
2026-01-08 12:16:48 +01:00
Jaroslava Fiedlerova
4b32dc58e6 Merge remote-tracking branch 'origin/fix-usage-iq_rxrescale-iq_txshift' into integration_2026_w02 (!3832)
Remove global iq_txshift and iq_rxrescale

iq_txshift and iq_rxrescale are defined but not used, this commit fixes it
2026-01-08 12:14:15 +01:00
Jaroslava Fiedlerova
937a90ee6e Merge remote-tracking branch 'origin/minor-adjustments' into integration_2026_w02 (!3847)
Minor CI and nr_ulsim reporting adjustments
2026-01-08 12:13:39 +01:00
Mario Joa-Ng
0ddf21db12 support prach with non-zero start symbol. 2026-01-07 21:31:48 +01:00
Jaroslava Fiedlerova
1ff1cb1200 Adjustment of nr_ulsim timing report 2026-01-07 12:10:17 +01:00
Jaroslava Fiedlerova
c382d78051 CI: include VNF container in xNB log analysis 2026-01-07 12:09:59 +01:00
Bartosz Podrygajlo
47ff7010a4 Update threadCreate
- if the name is too long, the thread name is shortened to maximum
   pthread name (16 characters).
2026-01-07 10:58:17 +01:00
Jaroslava Fiedlerova
f9edf20ae8 Merge remote-tracking branch 'origin/cleanup-cmake-modules' into integration_2026_w02 (!3842)
Remove unused cmake_targets files

See individual commits
2026-01-06 22:24:20 +01:00
Jaroslava Fiedlerova
c54daeaf54 Merge remote-tracking branch 'origin/fix_issue_1042' into integration_2026_w02 (!3843)
fix(documentation): issue 1042

A merge conflict header was left by mistake in
openair1/PHY/CODING/DOC/LDPCImplementation.md

Closes #1042
2026-01-06 20:05:31 +01:00
Jaroslava Fiedlerova
82bccfb9fe Merge remote-tracking branch 'origin/fix-nhcc-reestablishment' into integration_2026_w02 (!3770)
Refactor key derivation logic to properly handle Next Hop (NH) chain
synchronization according to 3GPP TS 33.501 specifications for both RRC
Reestablishment and Master Key Update procedures.

Changes in rrc_gNB.c:
- Clarify key derivation in rrc_gNB_generate_RRCReestablishment by explicitly
  selecting base key (NH or KgNB) based on nh_ncc value
- Add comment explaining vertical vs horizontal derivation logic

Changes in rrc_UE.c:
Refactored the NH chain synchronization and key derivation code to match
TS 33.501 terminology:
- nr_sync_nh_chain(): Common helper to synchronize NH parameter chain per
  TS 33.501 Annex A.10, supporting both Master Key Update and RRC Reestablishment
  procedures
- nr_derive_kgnb_horizontal(): Derive KNG-RAN* from current KgNB when NCC values
  match (horizontal derivation per TS 33.501 A.11/A.12)
- nr_derive_kgnb_vertical(): Derive KNG-RAN* from synchronized NH after NH chain
  sync (vertical derivation per TS 33.501 A.11/A.12)
- nr_update_kgnb_from_ncc(): Unified function implementing TS 33.501 6.9.2.3.4
  logic for updating KgNB based on received nextHopChainingCount
- Refactor as_security_key_update(): Use new nr_update_kgnb_from_ncc() helper
  function for cleaner, more maintainable code
- Fix nr_rrc_ue_process_rrcReestablishment(): Properly handle received
  nextHopChainingCount and update KgNB using unified helper function
- Replaced the previous nr_rrc_nh_update() helper with these functions to
  improve clarity and alignment with the specification.
- Add debug logging for key derivation process

Key NAS deriver utils:
- update derive_kgnb documentation and protect input keys with const attribute

Closes #857
2026-01-06 20:01:57 +01:00
Jaroslava Fiedlerova
ec739c23fa Merge remote-tracking branch 'origin/Jenkinsfiles-cleanup' into integration_2026_w02 (!3793)
CI: Remove redundant Jenkinsfiles

All the removed files can be replaced by Jenkinsfile introduced in !3738
2026-01-06 20:01:13 +01:00
Rakesh B B
e7bcca88bb Add time units for better clarity and readability. 2026-01-06 15:01:17 +05:30
Jaroslava Fiedlerova
c13b2294eb Merge remote-tracking branch 'origin/move_ntn_l1_files' into integration_2026_w02 (!3836)
move NTN UE L1 functions to a new file

Moved from nr-ue not to overload that file with functions of a specific mode
2026-01-06 10:00:10 +01:00
Jaroslava Fiedlerova
cd19acd65a Merge remote-tracking branch 'origin/fix-sib1-tda-check' into integration_2026_w02 (!3840)
Fix missing return statements in SIB1 TDA validation

Provides fix to commit d7cc1c2c in MR !3641 (merged).
2026-01-06 09:45:58 +01:00
Jaroslava Fiedlerova
2dcb515930 Merge remote-tracking branch 'origin/change-method-cblas-variant' into integration_2026_w02 (!3835)
Correctly include cblas include directories for RHEL
2026-01-06 09:45:16 +01:00
Romain Beurdouche
35e2289bc6 fix(documentation): issue 1042
A merge conflict header was left by mistake in
`openair1/PHY/CODING/DOC/LDPCImplementation.md`
2026-01-06 09:28:16 +01:00
Laurent THOMAS
6313c71b83 remove unused iq_txshift and iq_rxrescale variables
improve comments in usrp_lib.cpp
2026-01-06 09:02:08 +01:00
Robert Schmidt
b1fa6e6cdf Remove unused CMake helper files
These files are not used anywhere. The only remaining cmake find files
are:

- findarmral and findxran: used by FHI7.2 driver
- findsctp: used by top-level CMakeLists.txt
- findgnutls: NOT actually used but GnuTLS is a dependency of websrv, so
  I leave it for the moment (should be removed if the webserver is
  removed)

Signed-off-by: Robert Schmidt <robert.schmidt@openairinterface.org>
2026-01-06 08:35:12 +01:00
Robert Schmidt
ca707b3987 Remove old MME/eNB instructions
There is no HSS/MME in this repository, which is the majority of this
file. Remove it, since it is outdated.

Signed-off-by: Robert Schmidt <robert.schmidt@openairinterface.org>
2026-01-06 08:26:45 +01:00
Robert Schmidt
8176fd3063 Remove old FlexRAN file
Setup routes was added by the author of FlexRAN. The UEs always set up
routes automatically, and this file is therefore not needed.

See-also: 287c182925 ("Remove FlexRAN")
Signed-off-by: Robert Schmidt <robert.schmidt@openairinterface.org>
2026-01-06 08:25:55 +01:00
Rakesh BB
d5cf363bfe NR NGAP: Fix Time UE Stayed in Cell IE type and calculation
According to 3GPP TS 38.413, the 'Time UE Stayed in Cell' IE is an
integer ranging from 0 to 4095. This patch updates the data structure
to reflect the correct bit width and implements the dynamic calculation
based on the UE's residence time.

- Change time_in_cell from long to uint16_t in ngap_messages_types.h.
- Replace dummy value with real-time calculation in rrc_gNB_NGAP.c.
- Implement a ceiling of 4095 to comply with the 12-bit protocol limit.

Ref: 3GPP TS 38.413 Section 9.3.1.97
2026-01-06 12:51:39 +05:30
Robert Schmidt
40ea8f7592 Remove unused snap_environment.sh
Signed-off-by: Robert Schmidt <robert.schmidt@openairinterface.org>
2026-01-06 08:18:34 +01:00
Laurent THOMAS
98e278b0d5 Correctly include cblas include directories
RHEL uses a dedicated cblas include directory. Correctly include this
for the one target PHY_UE that relies on this.

Co-authored-by: Robert Schmidt <robert.schmidt@openairinterface.org>
2026-01-05 16:56:33 +01:00
Cedric Roux
b91a4c33bd fix configuration files
'timeToTrigger' has to be 'time_to_trigger'.

For A3 events, 'cell_id' has to be 'physCellId' and the value has to be
the one of the physical cell ID.
2026-01-05 16:25:28 +01:00
Cedric Roux
f917a2a2fa fix: use correct variables' names
- timeToTrigger must be named time_to_trigger
- cell_id must be named physCellId
2026-01-05 16:24:42 +01:00
Cedric Roux
a1712ce774 fix utf-ascii problem and clamp text to 80 columns 2026-01-05 16:11:12 +01:00
Jaroslava Fiedlerova
9657cbecd3 Merge remote-tracking branch 'origin/rfsim-fixes' into integration_2026_w02 (!3839)
Couple rfsim fixes
2026-01-05 15:49:17 +01:00
Jaroslava Fiedlerova
b1d9279655 Merge remote-tracking branch 'origin/more_static_cleanup' into integration_2026_w02 (!3828)
L2 UE files code cleanup for static functions

No functional change, just re-arranging code
2026-01-05 15:48:30 +01:00
Jaroslava Fiedlerova
692b3cf99c Fix missing return statements in SIB1 TDA validation
Provides fix to commit d7cc1c2c1d (MR !3641).
Addresses an issue with low DL throughput in 100 MHz 2×2 test case observed
in CI.
2026-01-05 14:54:44 +01:00
Bartosz Podrygajlo
f8f7bc890b rfsim: fix replay_node when used for rfsim without beamforming 2026-01-05 08:49:20 +01:00
Bartosz Podrygajlo
2a94a42397 rfsim: fix linking issue
Fix an issue caused by assuming C++ linkage of get_currentchannels_type
2026-01-05 08:43:13 +01:00
Guido Casati
605b39bd9d Fix RRCReestablishment key derivation to use horizontal derivation
Per TS 33.501 6.9.2.3.4 and Fig 6.9.2.1.1-1, when sending
RRCReestablishment with nextHopChainingCount, the gNB is staying at
the same NCC level (not advancing). Therefore, horizontal derivation
from the currently active KgNB must be used, not vertical derivation
from NH.

Vertical derivation (from NH) is only used when advancing to a new
NCC level, which happens during handover or masterKeyUpdate procedures.

The previous implementation incorrectly used vertical derivation from
NH whenever nh_ncc > 0, which caused key mismatch between gNB and UE
during reestablishment after handover, leading to integrity check
failures.

This fix ensures both gNB and UE use horizontal derivation when
nextHopChainingCount matches the current NCC level, aligning with the
specification's "virtual NH at NCC=0" model where:
- Horizontal derivation = derive KNG-RAN* from currently active KgNB
- Vertical derivation = derive KNG-RAN* from NH (only when advancing NCC)
2025-12-29 13:31:22 +01:00
Guido Casati
91a08b1ba7 Fix MAC frequency overwrite during handover causing integrity check failures
During N2 handover, the UE receives reconfigurationWithSync which correctly
sets the target cell frequency in mac->phy_config.config_req.carrier_config
via config_common_ue() call.

However, when SIB1 is decoded after reconfiguration,
nr_rrc_mac_config_req_sib1() calls config_common_ue_sa() which unconditionally
overwrites the frequency with the command-line parameter (downlink_frequency),
which corresponds to the source cell frequency.

This causes a critical issue during RRC re-establishment:
- The UE uses the wrong frequency (source cell) for key derivation (kgnb*)
- The gNB uses the correct frequency (target cell) for key derivation
- This mismatch results in different kgnb* keys on UE and gNB
- Integrity check fails: "Integrity of RRCReestablishment failed, going to IDLE"

Root cause:
config_common_ue_sa() is used for SIB1 processing (initial cell selection) and
uses ServingCellConfigCommonSIB which doesn't contain absoluteFrequencyPointA.
It must derive frequency from command-line parameters. However, after handover,
the frequency has already been correctly set by config_common_ue() (used for
reconfigurationWithSync) which uses ServingCellConfigCommon with absolute
frequency information.

Solution:
Modify config_common_ue_sa() to preserve the existing frequency if it's already
initialized (non-zero). Only set frequency from command-line parameters during
initial cell selection when dl_frequency is 0. This ensures:
- Initial cell selection: frequency derived from command-line parameter, just once
- After handover: frequency preserved from reconfigurationWithSync
- MAC maintains its own frequency state independently

The fix applies to both DL and UL frequencies to maintain consistency.
There is probably room for more refactoring to the resync flow, since
the functionalities in config_common_ue and config_common_ue_sa are
partially overlapping and upon reconfigurationWithSync some other
configurations might be applied twice.
2025-12-29 13:31:22 +01:00
Guido Casati
eebf79a097 Add logs to inform about cell updates in MAC-PHY and RRCReestablishment failures
These logs are very helpful to identify cell configuration
changes in MAC/PHY, for monitoring purposes, and to rapidly
signal integrity failures during re-establishment.
2025-12-29 13:31:22 +01:00
Guido Casati
4f8feaf513 RRC: update RNTI after N2 HO acknowledge
The RNTI from the target context was not updated after HO acknowledge
this led to a failure in the first re-establishment after HO.

This commit is introducing the function nr_rrc_apply_target_context
in nr_rrc_n2_ho_acknowledge() and also updates the cell ID for
consistency.
2025-12-29 13:31:22 +01:00
Guido Casati
b0d8c1f3b6 RRC (refactor): extract target context application into dedicated function
Refactor handover target context application logic into a reusable
function nr_rrc_apply_target_context() that updates both F1AP
associations (secondary UE and DU association) and RNTI from the
target handover context.

And apply to rrc_CU_process_ue_context_modification_response()
2025-12-29 13:31:22 +01:00
francescomani
3aad8d7748 move NTN L1 functions to a new file from nr-ue 2025-12-28 11:14:55 +01:00
francescomani
d2fec82411 making TCI configuration optional 2025-12-26 12:20:50 +01:00
francescomani
7f1974b0f6 schedule DLSCH immediatly if there is a MAC-CE for TCI indication to send 2025-12-26 12:08:16 +01:00
francescomani
8d857ab794 handling beam switching via TCI state indication MAC CE 2025-12-26 12:08:16 +01:00
francescomani
4edc5c2d33 fix tci_StatesPDCCH 2025-12-26 12:08:16 +01:00
francescomani
90d4d2726c cleanup of functions in nr_ue_power_procedures (no code change, just moving things around) 2025-12-26 09:11:09 +01:00
francescomani
a623908518 declare static some static functions in dci procedure file 2025-12-26 09:11:09 +01:00
francescomani
98530b5b70 cleanup of functions in nr_ue_procedures (no code change, just moving things around) 2025-12-26 09:11:08 +01:00
francescomani
75367249c5 cleanup of functions in nr_ue_scheduler (no code change, just moving things around) 2025-12-26 09:07:46 +01:00
Robert Schmidt
9b0bb594f0 Merge branch 'integration_2025_w52' into 'develop'
Integration: `2025.w52`

* !3809 [FHI72] Fix the PRACH FFT size
* !3829 Hotfix for handling the case where the number of physical antennas is larger than the number of logical antennas
* !3663 NR UE: calculate DL and UL Doppler based on SIB19 information in NTN mode, fixing LEO reestablishment
* !3819 CORESET start multiple of 6 fix
* !3641 automatic selection of SIB1 TDA
* !3804 gNB: apply new NR_CellGroupConfig when RRCReconfiguration is acknowledged
* !3833 Add missing CMakeLists entries for test_nr_frame_params
* !3656 Rfsimulator beam reception/transmission

Closes #1037 and #1002

See merge request oai/openairinterface5g!3830
2025-12-25 08:11:02 +00:00
Robert Schmidt
aaaaa35d42 Merge remote-tracking branch 'origin/beams-to-rf-board' into integration_2025_w52 (!3656)
Rfsimulator beam reception/transmission

A simplified beam switching simulation for rfsimulator. This works
mainly in 1 gNB - N UEs scenarios. This is not a real beamformer with
antenna, channel and propagation model. The way it works is that the
peers inform each other about the beams they transmit in, and on
reception before channel modelling, the beam data is combined based on
preconfigured rx_beam/tx_beam gain matrix.

Usage:

- Add --rfsimulator.enable_beams to enable beam simulation

- Add --rfsimulator.beam_gains .

    Example list: 0,-5,-10

    Resulting matrix:

    [[0, -5, -10] [-5, 0, -5]] [-10, -5, 0]]

- Add --telnetsrv if you want to control the beams manually. The command
  in telnet is "rfsimu setbeam <beam_map>", where beam_map is a uint64_t
  controling the reception beam and transmission beam. If the
  application is switching the beams automatically the beams will be
  overwritten as soon as the application chooses to switch beams.

Supports up to 64 concurrent TX and RX beams.
2025-12-24 10:53:04 +01:00
Robert Schmidt
6396c804b2 Merge remote-tracking branch 'origin/ctest-cmake-fix' into integration_2025_w52 (!3833)
Add missing CMakeLists entries for test_nr_frame_params
2025-12-23 18:23:22 +01:00
Robert Schmidt
26d0246059 Merge remote-tracking branch 'origin/apply_new_CellGroup_later' into integration_2025_w52 (!3804)
gNB: apply new NR_CellGroupConfig when RRCReconfiguration is acknowledged

Currently part of the NR_CellGroupConfig is already applied when the
RRCReconfiguration message is created. This is not correct and this MR
fixes this by applying it when the RRCReconfiguration message is
acknowledged.

With this fixed, we also move disabling the feedback (in case
disable_harq is used) from the RRCSetup message to the
RRCReconfiguration message.

Closes: #1002
2025-12-23 18:21:27 +01:00
Robert Schmidt
6a7ec3498a Merge remote-tracking branch 'origin/autumatic_sib1_tda' into integration_2025_w52 (!3641)
automatic selection of SIB1 TDA
2025-12-23 18:20:06 +01:00
Bartosz Podrygajlo
2a3755441b Add missing CMakeLists entries for test_nr_frame_params 2025-12-23 11:57:55 +01:00
Bartosz Podrygajlo
ade7901fb2 RFSim: Add beamids list based user interface for beam domain simulation
Add CLI parameter rfsimulator.beam_ids which uses a list of beam ids instead of a
beam map. The beam map API is still present and can be used interchangably.

Add telnet command setbeamids which has similar semantics
2025-12-23 10:05:14 +01:00
Bartosz Podrygajlo
ac97ba4e64 RFsim: Disable beam API if beam simulation is disabled 2025-12-23 10:05:14 +01:00
Bartosz Podrygajlo
8a36b9b85b rfsimulator: fix beam_ctrl_t leak. 2025-12-23 10:05:14 +01:00
Bartosz Podrygajlo
56970390f2 RFsim: handle additional channel offset from CLI
Handle extra channel offset coming from CLI parameter prop_delay.
2025-12-23 10:05:14 +01:00
Bartosz Podrygajlo
d6bd2d295f Add beam section to RFSimulator README.md 2025-12-23 10:05:14 +01:00
Bartosz Podrygajlo
d6da7a5605 vrtsim: add stubs to beam functions
Add stubbed versions of _beam_ apis to vrtsim.
2025-12-23 10:05:14 +01:00
Bartosz Podrygajlo
b10617607a RFsim: Allow arbitrary order of beams.
Allow arbitrary order of beam ids in set_beams2 function. This
allows the application to select any arbitrary order of beam ids.
The underlying transport mechanism still uses beam_map so the beam_ids
are ordered before sending.

Also replaced tx_beam_map/rx_beam_map into beam_map.

Also fixed an issue where --rfsimulator.enable_beams required an argument.
2025-12-23 10:05:14 +01:00
Bartosz Podrygajlo
033aed736e Rfsim: Optimization for simple configurations
- Added first beam optimization to combine_tx_buffers.
 - Added first beam & first peer optimization to rfsimulator_read_internal

This results in significant speed up for the first rx beam, first tx
beam and first peer which is the base case with beam simulation disabled.
2025-12-23 10:05:14 +01:00
Bartosz Podrygajlo
c587aab6b6 RFsim: Fix freeing packets in case of non-negative channel offset
In rfsim, received packets are dynamically allocated and freed when no longer
needed, which is dependent on the channel model, packet timestamp and packet
size (number of samples carried).

This commit fixes the packet age check for channels with nonzero channel offset
(most notalby NTN channels).

Also present:
 - extract the NTN satellite position update code to a separate function and
   call it once per trx_read call instead of once per rx beam.
2025-12-23 10:05:14 +01:00
Bartosz Podrygajlo
05de66d811 Make RFSIMULATOR_PARAMS_DESC C++ compatible.
Add a set of macros with designated initializers to simplify using
paramdef_t arrays in C++ source code. Fix clang error with
RFSIMULATOR_PARAMS_DESC using mixed designated and non-designated
initializers.
2025-12-23 10:05:14 +01:00
Bartosz Podrygajlo
435dfd57d8 RFsim: Optimization for operation without chanmod 2025-12-23 10:05:14 +01:00
Bartosz Podrygajlo
643be87832 RFsim: read_beams function
Added a new function for reading multiple beams concurrently.
The TX to RX beam combination is simplistic and based on beam gain.
2025-12-23 10:05:14 +01:00
Bartosz Podrygajlo
669be5b42e Rfsim: Process received packets on demand
- Received packets are dynamically allocated and kept in a
queue for as long as they are needed.

- The layout of the packets was changed from interleaved antennas
to non-interleaved antennas.

- Generate a contiguous buffer from saved packets as needed.

There is extra work caused by this change due to recv() call no
longer saving data directly into the circular buffer, however further
processing is easier due to contiguous nature of the tx antenna buffers
prepared. The impact on performance was not measured.
2025-12-23 10:05:12 +01:00
Bartosz Podrygajlo
4ec69cad1f Fix formatting for apply_channelmod.c 2025-12-23 10:04:39 +01:00
Bartosz Podrygajlo
f0d4325cd7 rfsim: process received packet when its received completely
The simplifies some code in packet reception and is a prerequisite
for processing received without relying on circular buffer
2025-12-23 10:04:39 +01:00
Bartosz Podrygajlo
143c545928 Beam simulation for rfsimulator
A simplified beam switching simulation for rfsimulator. This works
mainly in 1 gNB - N UEs scenarios. This is not a real beamformer with
antenna, channel and propagation model. The way it works is that the
peers inform each other about the beams they transmit in, and on
reception before channel modelling, the beam data is combined based on
preconfigured rx_beam/tx_beam gain matrix.

Usage:
 - Add --rfsimulator.enable_beams to enable beam simulation
 - Add --rfsimulator.beam_gains <comma separated Toepliz form matrix of gains in dB>.

   Example list: 0,-5,-10

   Resulting matrix:

   [[0, -5, -10]
    [-5, 0, -5]]
    [-10, -5, 0]]

 - Add --telnetsrv if you want to control the beams manually. The command in telnet
   is "rfsimu setbeam <beam_map>", where beam_map is a uint64_t controling the
   reception beam and transmission beam. If the application is switching the beams
   automatically the beams will be overwritten as soon as the application chooses to
   switch beams.

Co-authored-by: Laurent Thomas <laurent.thomas@open-cells.com>
2025-12-23 10:04:20 +01:00
Robert Schmidt
668ff6a4c3 Merge remote-tracking branch 'origin/fix_coreset_start' into integration_2025_w52 (!3819)
CORESET start multiple of 6 fix

According to the standard any CORESET (except CSET0) would always start
from the first common resource block index which is multiple of 6 in the
BWP. This was not taken into account in the code. The BWP switch CI test
is modified to test a BWP start not multiple of 6.

An exception is the case where rb-Offset-r16 parameter is set, but can't
be used at gNB for FAPI compatibility.

Closes: #1037
2025-12-23 09:22:10 +01:00
Robert Schmidt
8463ebf24b Merge remote-tracking branch 'origin/nr_ue_sib19_doppler' into integration_2025_w52 (!3663)
NR UE: calculate DL and UL Doppler based on SIB19 information in NTN mode, fixing LEO reestablishment
2025-12-23 09:21:42 +01:00
francescomani
d7cc1c2c1d computing SIB1 TDA (for each SSB) only in the first iteration and stored for the rest of the run 2025-12-23 09:20:47 +01:00
francescomani
e9d410dc28 change in CI config file for BWP testing to have 1 BWP which doesn't start from a multiple of 6 2025-12-22 17:31:29 +01:00
francescomani
61d0559445 take into account effective CSET start RB to define frequencyDomainResources 2025-12-22 17:31:29 +01:00
francescomani
2a3a27a48f fix CORESET start PRB according to standard at OAI gNB 2025-12-22 17:31:26 +01:00
francescomani
74690ceb1d fix CORESET start PRB according to standard at OAI UE 2025-12-22 17:29:09 +01:00
Robert Schmidt
3fac50a288 Merge remote-tracking branch 'origin/ru_procedures_hotfix' into integration_2025_w52 (!3829)
Hotfix for handling the case where the number of physical antennas is larger than the number of logical antennas
2025-12-22 15:29:50 +01:00
Robert Schmidt
16a43f0edb Merge remote-tracking branch 'origin/prach-fft' into integration_2025_w52 (!3809)
[FHI72] Fix the PRACH FFT size

ru_config->fftSize is used for the C-plane Section Type 3 which is
dedicated for PRACH and mixed numerology. Previously, we assumed that
PRACH FFT size is equivalent to PxSCH FFT size, but should be based on
the PRACH format.

Tests with the following RUs:

- [x] Benetel v1.2.2 & v1.4.1
- [x] VVDN Gen 3
- [x] Liteon 02.00.10
- [x] Metanoia v2.2.8 (Jura)
2025-12-22 15:28:34 +01:00
Raymond Knopp
b0f402dfdc hotfix for when there are more physical TX antenna ports (ru->nb_tx) than logical antenna ports (config->carrier_config.num_tx_ant.value). 2025-12-20 21:48:09 +01:00
francescomani
2454a2ea1e automatic selection of SIB1 TDA 2025-12-20 08:54:11 +01:00
Jaroslava Fiedlerova
b916c6d8d4 Merge branch 'integration_2025_w51' into 'develop'
Integration `2025.w51`

* !3816 Add two missing include guards
* !3715 Pass beam ID as per FAPI v222.10
* !3777 UE NTN : Fix in case SIB19 periodicity is greater than 2 secs
* !3813 Reset outdated PUCCHs to avoid Assertion caused by non-processed and active PUCCHs
* !3815 Remove phy_extern_nr_ue file
* !3824 CI: adjust UE attach timeout handling
* !3735 vrtsim: Optimize channel modelling

See merge request oai/openairinterface5g!3817
2025-12-19 20:22:06 +00:00
Guido Casati
5c601b7d62 Fix RRCReestablishment key derivation to use horizontal derivation
Per TS 33.501 6.9.2.3.4 and Fig 6.9.2.1.1-1, when sending
RRCReestablishment with nextHopChainingCount, the gNB is staying at
the same NCC level (not advancing). Therefore, horizontal derivation
from the currently active KgNB must be used, not vertical derivation
from NH.

Vertical derivation (from NH) is only used when advancing to a new
NCC level, which happens during handover or masterKeyUpdate procedures.

The previous implementation incorrectly used vertical derivation from
NH whenever nh_ncc > 0, which caused key mismatch between gNB and UE
during reestablishment after handover, leading to integrity check
failures.

This fix ensures both gNB and UE use horizontal derivation when
nextHopChainingCount matches the current NCC level, aligning with the
specification's "virtual NH at NCC=0" model where:
- Horizontal derivation = derive KNG-RAN* from currently active KgNB
- Vertical derivation = derive KNG-RAN* from NH (only when advancing NCC)
2025-12-19 17:16:17 +01:00
Guido Casati
4db49a8767 RRC: Implement proper NH chain synchronization for RRC Reestablishment
Refactor key derivation logic to properly handle Next Hop (NH) chain
synchronization according to 3GPP TS 33.501 specifications for both
RRC Reestablishment and Master Key Update procedures.

Changes in rrc_gNB.c:
- Clarify key derivation in rrc_gNB_generate_RRCReestablishment by
  explicitly selecting base key (NH or KgNB) based on nh_ncc value
- Add comment explaining vertical vs horizontal derivation logic

Changes in rrc_UE.c:
- Add nr_sync_nh_chain(): Common helper to synchronize NH parameter
  chain per TS 33.501 Annex A.10, supporting both Master Key Update
  and RRC Reestablishment procedures
- Add nr_derive_kgnb_horizontal(): Derive KNG-RAN* from current KgNB
  when NCC values match (horizontal derivation per TS 33.501 A.11/A.12)
- Add nr_derive_kgnb_vertical(): Derive KNG-RAN* from synchronized NH
  after NH chain sync (vertical derivation per TS 33.501 A.11/A.12)
- Add nr_update_kgnb_from_ncc(): Unified function implementing TS 33.501
  6.9.2.3.4 logic for updating KgNB based on received nextHopChainingCount
- Refactor as_security_key_update(): Use new nr_update_kgnb_from_ncc()
  helper function for cleaner, more maintainable code
- Fix nr_rrc_ue_process_rrcReestablishment(): Properly handle received
  nextHopChainingCount and update KgNB using unified helper function
- Add debug logging for key derivation process

Key NAS deriver utils:
- update derive_kgnb documentation and protect input keys with const attribute
2025-12-19 17:14:23 +01:00
Thomas Schlichter
aa3a209842 NR UE: add option "--cont-fo-comp 3" to not consider measured residual DL FO for UL FO pre-compensation 2025-12-19 16:42:58 +01:00
Thomas Schlichter
f6fd7b61ec NR UE: improve NTN reestablishment by continuing with previous HFN 2025-12-19 16:42:55 +01:00
Thomas Schlichter
30afbc41a6 update FEATURE_SET.md 2025-12-19 16:42:55 +01:00
Thomas Schlichter
1f8fe224a0 NR UE: correctly apply Doppler and TA for NTN target cell
Make sure to apply Doppler and TA not directly when receiving the target cell ntn_config,
but apply Doppler just before the initial sync, and the TA after the initial sync when
we have tha actuel cell frame and slot numbers.
2025-12-19 16:42:52 +01:00
Thomas Schlichter
3dcaacb63b NR UE FAPI: provide ntn_config as part of phy_config.config_req instead of a dedicated scheduled_response dl_config PDU
We need the ntn_config when reconfiguring the PHY layer for a new initial sync,
e.g. for calculating the DL Doppler frequency.

As a dedicated scheduled_response dl_config PDU it reaches the PHY layer too late,
as part of the phy_config.config_req it reaches the PHY layer in time with the
other configuration values.
2025-12-19 16:42:47 +01:00
Thomas Schlichter
b5a025931c verify reestablishment in 5g_rfsimulator_ntn_leo CI test 2025-12-19 16:42:47 +01:00
Thomas Schlichter
834a6fc1d9 NR UE: improve physical layer for NTN (esp. LEO) reestablishment and HO 2025-12-19 16:42:37 +01:00
Thomas Schlichter
ae12190a9e NR UE: improve log output in MAC 2025-12-19 16:41:02 +01:00
Thomas Schlichter
bc81662c2a NR UE: consider computed DL/UL Doppler shift in continuous FO compensation 2025-12-19 16:41:01 +01:00
Thomas Schlichter
b59bcaf494 NR UE: provide velocity vector down to nr-ue.c, preparing for Doppler calculation 2025-12-19 16:38:59 +01:00
Jaroslava Fiedlerova
19f61af2eb Merge remote-tracking branch 'origin/vrtsim-speedup' into integration_2025_w51 (!3735)
vrtsim: Optimize channel modelling

Optimization pass for channel modelling on transmission in vrtsim. This
comes from a requirement of O-RU to perform channel modelling with minimum
latency. The latency measured in O-RU 4TX 2RX on the UE is lowered from
~400 uS to ~100uS.

- Reduced MAX_CHANNEL_LENGTH to 200 and introduced SAVED_SAMPLES_LEN
- Refactored channel modelling actor allocation to parallelize work better
- Improved batching and task creation for channel modelling
- Replaced static global saved_samples with local static buffer in vrtsim_write_with_chanmod

Create a new CI pipeline for testing with vrtsim on Gracehopper:
https://jenkins-oai.eurecom.fr/job/RAN-VRT-Sim-Test-5G/
2025-12-19 15:54:06 +01:00
Jaroslava Fiedlerova
ffcf49676e Merge remote-tracking branch 'origin/ci-fix-ue-attach' into integration_2025_w51 (!3824)
CI: adjust UE attach timeout handling

This modification addresses an issue in the RFSim-5G 2x2 test where the UE
often fails to attach within the initial 20s window. The timeout may cause
the UE to restart, which leads to two UEs appearing in the gNB log. By
increasing the initial timeout to 40s, we avoid unnecessary restarts.
2025-12-19 12:27:04 +01:00
francescomani
a2625163e6 drop rach_ConfigDedicated once reconfiguration with sync related RA is completed at UE 2025-12-19 11:25:27 +01:00
luis_pereira87
0a0dfae333 Restore previous 'local_bwp_id' on RRCReestablishment 2025-12-19 11:02:39 +01:00
Thomas Schlichter
e74792586f fix BWP switching
Co-authored-by: Luis Pereira <lpereira@allbesmart.pt>
2025-12-19 11:02:37 +01:00
Thomas Schlichter
21722a9fa1 gNB: fix use after free of old UE->sc_info.csi_MeasConfig 2025-12-19 11:01:27 +01:00
Thomas Schlichter
25cd85fa68 gNB: apply new NR_CellGroupConfig when reconfiguration is complete 2025-12-19 10:59:51 +01:00
Thomas Schlichter
9e434d60a5 gNB: move downlinkHARQ_FeedbackDisabled_r17 from initial spCellConfig to spCellConfigDedicated
This is a preparation for configuring disabled HARQ feedback only for UEs supporting it.
2025-12-19 10:50:58 +01:00
Jaroslava Fiedlerova
bf347a62d4 CI: adjust UE attach timeout handling
- Set default attach_timeout to 40s
- Increase timeout only after failed attach attempts

This modification addresses an issue in the RFSim-5G 2x2 test where the UE
often fails to attach within the initial 20s window. The timeout may cause
the UE to restart, which leads to two UEs appearing in the gNB log. By
increasing the initial timeout to 40s, we avoid unnecessary restarts.
2025-12-18 16:07:12 +01:00
francescomani
6b5cb9a69c prevent int overflow in qsort for RSRP measurements in case measured SSB RSRP is 0 2025-12-18 15:58:38 +01:00
Bartosz Podrygajlo
d355e0412d Add prototype for trx_set_beams function
This function is to be called by the application to switch beams
on reception and transmission. When receiving new samples using
trx_read/trx_write the application is expected to be able to
determine which beam the samples belong to.
2025-12-17 22:24:12 +01:00
Bartosz Podrygajlo
c4b94cff4b Change trx_write_func to add beams definition over multiple tx antennas per beam
Co-authored-by: Laurent Thomas <laurent.thomas@open-cells.com>
2025-12-17 22:24:12 +01:00
Bartosz Podrygajlo
6bd3545a78 RFsimulator C++ conversion
Convert rfsimulator C source code to C++ to access to STL.
2025-12-17 22:24:12 +01:00
Jaroslava Fiedlerova
74eb482fc4 Merge remote-tracking branch 'origin/remove_ext_file' into integration_2025_w51 (!3815)
Remove phy_extern_nr_ue file
2025-12-17 15:27:11 +01:00
Jaroslava Fiedlerova
e2a305825c Merge remote-tracking branch 'origin/Reset_outdated_PUCCHs' into integration_2025_w51 (!3813)
Reset outdated PUCCHs to avoid Assertion caused by non-processed and
active PUCCHs

When there is real-time issues in L1 it may happen that the scheduler
misses/skips some slots, thus, L2 not processing and not freeing some
structures like PUCCH. This commit avoids the Assertion by resetting
any Active outdated PUCCH
2025-12-17 15:25:30 +01:00
Jaroslava Fiedlerova
ee4dc21f25 CI: Add VRT-Sim test pipeline to parent pipeline 2025-12-17 15:15:23 +01:00
Jaroslava Fiedlerova
60f6137d6c Add XML file for running vrtsim on ARM 2025-12-17 15:15:05 +01:00
Jaroslava Fiedlerova
a44fb9bcf8 Change trf-gen-cn5g version for tests on GH
trf-gen-cn5g:latest is available on OAI DockerHub for linux/arm64,
trf-gen-cn5g:focal is only for linux/amd64
2025-12-17 15:07:01 +01:00
Bartosz Podrygajlo
4ac445ac30 vrtsim: add randominit() call
This is required with the updated gaussZiggurat call.
2025-12-17 14:20:58 +01:00
Bartosz Podrygajlo
b9665aac5f vrtsim CI testcase with channel modelling
Add vrtsim CI testcase with channel modelling.
2025-12-17 14:20:49 +01:00
Jaroslava Fiedlerova
511fd29235 Merge remote-tracking branch 'origin/NR_SIB19_timer_fix' into integration_2025_w51 (!3777)
UE NTN : Fix in case SIB19 periodicity is greater than 2 secs

This was observed when testing OAI NTN UE against a third party gNB (UXM).
LEO SIB19 periodicity of > 2000 ms was used, in which case T430 timer expires
before SIB19 is re-read. This fix handles the case where SIB19 periodicity >
2secs, such that SIB19 is re-read in time and T430 timer does not expire.
2025-12-17 10:15:43 +01:00
Jaroslava Fiedlerova
ff524c0380 Merge remote-tracking branch 'origin/fapi-beamid' into integration_2025_w51 (!3715)
Pass beam ID as per FAPI v222.10

This MR
1. Sets MSB of beam ID when passing beam ID to 7.2 radio
2. Modifies phytest scheduler to allocate SSBs on different beams
3. Introduce new MAC config parameter for beam mode to specify HiPHY or LoPHY
   beamforming
2025-12-17 10:11:22 +01:00
Bartosz Podrygajlo
9d3670eefd vrtsim: Enable batch processing in perform_channel_modelling
In perfrom_channel_modelling, do convolution in batches which allows
vrtsim to write the channel samples as they are being produced instead
of waiting for the last sample in the slot to be ready.
2025-12-17 08:43:11 +01:00
Bartosz Podrygajlo
8f116f68d2 vrtsim: fix assert for number of TX antennas 2025-12-17 08:43:04 +01:00
Bartosz Podrygajlo
b5aad5956c vrtsim: rewrite sample history
Limit sample history to 256 samples and copy it into each channel modelling
task instead of relying on globally available buffer. This simplifies the code
and addressing into the saved samples buffer as well as enabling further
optimizations without sacrificing thread safety.
2025-12-17 08:42:57 +01:00
Raghavendra Dinavahi
1cca7f090e UE NTN: changed handling of SIB19 periodic reception 2025-12-16 15:50:56 +01:00
francescomani
912eca1af2 set correct beamforming type in CI FR2 test 2025-12-16 14:48:35 +01:00
Raghavendra Dinavahi
6900edbf92 UE NTN: Fix in case SIB19 periodicity is greater than 2 secs 2025-12-16 14:00:09 +01:00
Jaroslava Fiedlerova
9b95c9c6de Merge remote-tracking branch 'origin/incl-guards' into integration_2025_w51 (!3816)
Add two missing include guards
2025-12-16 13:42:49 +01:00
Teodora
7fe34d779b Fix the PRACH FFT size for 7.2 interface
We assumed that PRACH FFT size is equivalent to PxSCH FFT size.

However, the parameter ru_config->fftSize is used for the C-plane Section Type 3
which is dedicated for PRACH and mixed numerology.
Based on the PRACH format, short or long, the PRACH values 256 or 1024
shall be filled.

Co-authored-by: knopp <raymond.knopp@eurecom.fr>
2025-12-16 10:05:43 +01:00
Sakthivel Velumani
ad366c3b17 fapi: ignore MSB of beam-ID for aerial
Aerial L1 don't support handling of MSB bit in beam-ID. So it is not set
in the fapi functions before sending down.
2025-12-15 14:40:44 +00:00
francescomani
c1747a8109 phy: remove unnecessary vendor extension fields
When doing analogue beamforming, the beam ID for a pre-defined beam
table is passed directly to RU and there is no need to store the beam
table in PHY.
2025-12-15 14:40:44 +00:00
Sakthivel Velumani
644579a4cf clean-up: rename functions
Rename few functions and array related to beam index storing and
allocation. Reduce code duplication in function to get ssb index
bitmap.
2025-12-15 14:40:42 +00:00
Sakthivel Velumani
830d619d3e mac: allocate PDSCH on beams in phytest 2025-12-15 14:35:50 +00:00
Sakthivel Velumani
c288f84651 mac: fix fapi beam id
Set MSB of fapi beam ID based on flag for beamforming done in hiPHY or
loPHY.
2025-12-15 14:35:50 +00:00
Sakthivel Velumani
15e59665e6 mac: change array beam_allocation to int16_t
int16_t is sufficient to hold beam_id and -1 if not allocated. Following
commits will bring changes to only pass LSB 15 bits as beam_id to PHY.
2025-12-15 14:35:50 +00:00
Sakthivel Velumani
35e5cb69d1 clean-up: fix code repetition 2025-12-15 14:35:50 +00:00
Bartosz Podrygajlo
26879d5616 Add two missing include guards 2025-12-15 15:27:23 +01:00
francescomani
9470c51b00 remove phy_extern_nr_ue file 2025-12-15 12:18:28 +01:00
luis_pereira87
71e23b12c2 Reset outdated PUCCHs to avoid Assertion caused by non-processed and active PUCCHs
When there is real-time issues in L1 it may happen that the scheduler misses/skips some slots, thus, L2 not processing and not freeing some structures like PUCCH.
This commit avoids the Assertion by resetting any Active outdated PUCCH
2025-12-12 16:48:24 +00:00
Jaroslava Fiedlerova
479be40b30 Merge branch 'integration_2025_w50' into 'develop'
Integration `2025.w50`

* !3638 NR UE: calculate TA based on SIB19 information in NTN mode, if autonomous TA is not enabled
* !3624 NR UE: improve handling of Handover procedures
* !3807 doc: Update doc for IF setup
* !3741 Update documenation for handover
* !3798 Fix for computation of PRACH occasions and association period
* !3808 Add symbol timing functions for NR_DL_FRAME_PARMS + optimization for slot timing counterparts

Closes #981

See merge request oai/openairinterface5g!3806
2025-12-12 14:47:26 +00:00
Jaroslava Fiedlerova
44c64a2ed0 Merge remote-tracking branch 'origin/symbol-duration-functions' into integration_2025_w50 (!3808)
Add symbol timing functions for NR_DL_FRAME_PARMS + optimization for slot timing
counterparts

Add two new functions for calculation symbol timestamp and symbol duration for
NR_DL_FRAME_PARMS. Also includes an optimization focused on removing
inefficiencies related slot-related counterparts.
2025-12-12 11:41:27 +01:00
Sakthivel Velumani
b987b033d5 test: include slot functions to frame parms ctest 2025-12-10 23:40:39 +00:00
Sakthivel Velumani
c9902a8615 bugfix: length of first slot for numerology 0
For 15kHz SCS, symbols with index 0 and 7 have longer cyclic prefix.
This is now fixed in frame parms struct.
2025-12-10 23:26:03 +00:00
Sakthivel Velumani
5b92859cce phy: remove function pointers in frame param
1. Removed function pointers for functions get_samples_per_slot(),
   get_samples_slot_timestamp() and get_slot_from_timestamp() as it does
   not offer any advantage. The functions are now called directly from
   everywhere.
2. Optimized these functions by removing loops where ever possible.
2025-12-10 23:25:24 +00:00
Jaroslava Fiedlerova
be08d655b1 Merge remote-tracking branch 'origin/fix_rach_occasions' into integration_2025_w50 (!3798)
Fix for computation of PRACH occasions and association period
2025-12-10 14:23:00 +01:00
Jaroslava Fiedlerova
f744c4d4bc Merge remote-tracking branch 'origin/handover-doc' into integration_2025_w50 (!3741)
Update documenation for handover

Update documentation for handover to include the changes that were made after
upgrading the CI handover setup (attenuator, USRPs synchronization)
2025-12-10 14:19:41 +01:00
Jaroslava Fiedlerova
d569e7ddc9 Merge remote-tracking branch 'origin/if-freq-doc' into integration_2025_w50 (!3807)
doc: Update doc for IF setup

Update IF setup doc, clarify how to set if_freq with large value in the gNB
configuration file. Per the libconfig manual, 64-bit integers are represented
like regular integers but require an appended "L"
(https://www.hyperrealm.com/libconfig/libconfig_manual.html#g_t64_002dbit-Integer-Values).
2025-12-10 14:18:31 +01:00
Bartosz Podrygajlo
10852cc89b Use get_samples_symbol_duration in nr-ue.c 2025-12-09 14:10:28 +01:00
Reem Bahsoun
7688af6293 Update documenation for F1 handover to include the changes that were made after upgarding the CI handover setup (attenuator, USRPs synchronization) 2025-12-09 13:51:28 +01:00
francescomani
55c8a7bef0 rename max_association_period to association_period to better reflect the role of the field 2025-12-09 13:45:25 +01:00
francescomani
f2a7fb5336 fix computation of RA occasions and association period in gNB 2025-12-09 13:45:21 +01:00
Jaroslava Fiedlerova
45827ee213 Clarify doc for IF setup 2025-12-09 12:27:56 +01:00
francescomani
63f3fb55ae Merge remote-tracking branch 'origin/ue_ho_improve' into integration_2025_w50 2025-12-09 11:06:52 +01:00
Jaroslava Fiedlerova
e44b17668c Merge remote-tracking branch 'origin/nr_ue_sib19_ta' into integration_2025_w50 (!3638)
NR UE: calculate TA based on SIB19 information in NTN mode, if autonomous TA is not enabled

To achieve the goal, the hyper frame number (HFN) is introduced at the NR UE
PHY, MAC and RRC layers.

Besides this, we also implemented an orbit propagation to improve the accuracy
of N_UE_TA_adj, and a fix to keep the N_TA from RAR and MAC CE.

Fixes #981
2025-12-08 12:04:31 +01:00
Jaroslava Fiedlerova
91e7030cf8 Merge branch 'integration_2025_w49' into 'develop'
Integration `2025.w49`/`v2.4`

* !3786 Consistently use OAI_RNGSEED env variable for RNG
* !3758 Add yq to edit yaml files and add yaml-dev library in containers missing it
* Fix RFemulator noise device RNG initialization
* !3780 NGAP: fix PDU Session Release Response
* !3795 Increase Aerial-based L2 test core number
* !3794 Fix missing E2SM-RC message forward
* !3660 Fixes for BWP switching
* !3797 Fix FAPI WLS timing, UL counter, doc
* release notes v2.4

See merge request oai/openairinterface5g!3792
2025-12-04 07:55:07 +00:00
Robert Schmidt
e54153ef5c Add release notes v2.4.0 2025-12-03 22:25:56 +01:00
Bartosz Podrygajlo
8f88efd97c Add symbol timing functions for NR_DL_FRAME_PARMS
Add two new functions for calculation symbol timestamp and symbol
duration for NR_DL_FRAME_PARMS. These functions are not using
the existing indirection mechanism via function pointers as this
prevents the compiler from properly optimizing the code.
2025-12-03 19:42:13 +01:00
Bartosz Podrygajlo
244621d8e6 Fix for threadpool abort function
Fixed an issue where if threadpool was aborted when some threads were in a running
state the threadpool would never exit. This was due to the fact that the thread
terminate task (func == NULL && args == NULL) could have been pushed to queues which
were inactive. This change adds a uint64_t mask of threads that have already exited
so whenever the terminate task is sent to another queue, it is ensured that the queue
used will wake up at least one tpool worker.

Also added pushTpool_mask which allows to specify a subset of threads to push the task
to but its only used internally.

Also added in this commit: A way to allocate thread-safe storage for thread pool
workers via get_tpool_worker_index. This index is unique to the thread pool worker
within one threadpool and can be used to access arrays in a thread-safe manner.

An example of such use was added in a testcase that was added which compares delay
between actors and threadpool workers.
2025-12-03 18:32:10 +01:00
Robert Schmidt
a3a6c6d5e9 Merge remote-tracking branch 'origin/fapi-wls-fixes-timing-counter-doc' into integration_2025_w49 (!3797)
Fix FAPI WLS timing, UL counter, doc

- Fix FAPI WLS timing
- Fix periodical PNF UL throughput logs
- Update documentation to better explain how to run WLS with radio (USRP
  B210)
2025-12-03 17:32:32 +01:00
Robert Schmidt
e5050416e4 Merge remote-tracking branch 'origin/bwp_switch_fix' into integration_2025_w49 (!3660)
Fixes for BWP switching

This MR fixes some issues when performing BWP switching via
reconfiguration. It also adds a CI test for BWP switching.  # Please
enter a commit message to explain why this merge is necessary,
2025-12-03 17:31:22 +01:00
Robert Schmidt
f46ddb6aa8 Fix: CFRA: UE can always use dedicated search space
In all cases (CFRA in SA for HO, or CFRA in NSA/do-ra for access), the
UE has the full configuration already. We can therefore directly switch
to a dedicated search space, as it is already known to the UE.
2025-12-03 17:22:06 +01:00
francescomani
f5b885e803 Move BWP doc into mac-usage.md 2025-12-03 17:22:06 +01:00
Robert Schmidt
8d2478662d Add BWP switch test in CI
Trigger various BWP switches through telnet, and test traffic after each
switch.
2025-12-03 17:22:06 +01:00
Robert Schmidt
5c3c374c1b Add implementation to trigger BWP switch from external source 2025-12-03 17:22:06 +01:00
francescomani
805c968b59 Add a check for BWP start and size validity in configuration 2025-12-03 17:22:06 +01:00
francescomani
ca0cc079a6 avoid having negative BWP size if BWP start > BWP size 2025-12-03 17:22:06 +01:00
francescomani
98618a7dc8 The network must configure BWPs with consecutive IDs from 1
... so if we want to have 1 BWP configured at any given time we need to
reconfigure BWP 1 every time. This means that since the gNB has more
than 1 BWPs (for use for different UEs), that there is a "gNB BWP ID"
(as used by the gNB), which can be any BWP ID X, and one "UE BWP ID",
which is always 1. This commit implements this distinction.
2025-12-03 17:20:11 +01:00
Robert Schmidt
5d4e17f8ca doc: nFAPI: add Troubleshoot section and explain ra_responseWindow 2025-12-03 16:16:42 +01:00
Robert Schmidt
2230606f42 doc: (n)FAPI: Correct header levels to also match transport 2025-12-03 16:02:47 +01:00
Jaroslava Fiedlerova
b137478dc8 doc: FAPI WLS: provide information on performance optimization 2025-12-03 16:00:10 +01:00
francescomani
3e5d868018 set coresetID !=0 for dedicated BWP (needed if CSET0 doesn't fit that BWP) 2025-12-03 13:31:37 +01:00
francescomani
b2878f4ab1 fix BWP start for ULSCH at UE 2025-12-03 13:31:37 +01:00
francescomani
88d1964f9c Validate BWP switch
Return from triggering reconfiguration with BWP switch if BWP is the
same as before the switch, and add check to verify if BWP triggered by
switch command exists
2025-12-03 13:31:05 +01:00
Robert Schmidt
b547dfe056 apply new configuration after receiving ACK for RRCreconfiguration message 2025-12-03 13:31:05 +01:00
francescomani
eb9ac76f4d Set MCS table also in initial BWP function 2025-12-03 13:31:01 +01:00
francescomani
ca04193680 Remove hardcoded max_rank = 1 in PUSCH configuration and set it with appropriate function 2025-12-03 13:30:53 +01:00
francescomani
aa7d3668e3 Fix for segfault caused by freed csi_MeasConfig 2025-12-03 13:30:42 +01:00
francescomani
0e7e030907 Fix clean_bwp_structures
Also zero out the pointer in spCellConfigDedicated to avoid
use-after-free.
2025-12-03 13:30:11 +01:00
Robert Schmidt
18edbc0f15 Fix UL throughput counter in periodic PNF logs
Function pointer send_p7_msg() returns a bool, so correctly set the
type, and interpret it correspondingly.
2025-12-03 12:33:53 +01:00
Rúben Soares Silva
d28ae49eee Fix FAPI WLS slot.indication slot ahead
Current FAPI slot_ahead value for WLS is too low for UL, as we see these
errors:

    [NR_MAC] Unexpected ULSCH HARQ PID 14 (have 3) for RNTI 0xa68e
    [NR_MAC] UE a68e expected HARQ pid 3 feedback at  586. 7, but is at  587.17 instead (HARQ feedback is in the past)

Similarly to nFAPI, scale it by mu (for mu=1 => slot_ahead=2) to give
additional time, which removes these warnings at the VNF.
2025-12-03 12:33:47 +01:00
Robert Schmidt
04ac7eb4b9 Merge remote-tracking branch 'origin/aerial-more-cores' into integration_2025_w49 (!3795)
Increase Aerial-based L2 test core number
2025-12-02 19:13:59 +01:00
Robert Schmidt
04318f64ea Merge remote-tracking branch 'origin/fix-e2ap-compilation-rrc-rc-forward' into integration_2025_w49 (!3794)
Fix missing E2SM-RC message forward
2025-12-02 19:13:34 +01:00
Robert Schmidt
388ad30f6b Fix missing E2SM-RC message forward
E2SM-RC RRC message forwarding (e.g., to signal a new UE, measurement
reports, ...) was broken since commit d6c29b2d2c, as we accidentally
removed the E2_AGENT compilation definition from RRC layer.

Although this commit fixes the mentioned issue, it also causes undefined
references to functions defined in ran_func_rc.c file.  Therefore, we
add a hack that provides the definition, and abort if we ever hit these
functions, which in theory should not happen.

Future cleanup should avoid linking in RRC and other layers into
simulators.

Fixes: d6c29b2d2c ("Fix E2_AGENT linking w.r.t. simulators ")
2025-12-02 19:10:08 +01:00
Robert Schmidt
f35a1cd775 Increase Aerial-based L2 test core number
Testing has revealed that if PDCP drops some packets, the scheduler
falls behind with handling Slot.indication. It could be that we don't
have enough cores, which was reduced previously (from total 8 -> 2).
Reincrease to four cores to have a bit more headroom.

See-also: a18a4888ec ("Change number of cores used for OAI gNB from 8 to 2")
2025-12-02 19:05:17 +01:00
Robert Schmidt
8f89637f8c Merge remote-tracking branch 'origin/fix-pdu-session-release-transfer' into integration_2025_w49 (!3780)
NGAP: fix PDU Session Release Response

1. Refactor NG UE Context Release Request

  - Removed incorrect UE Context Release Response code (not in 3GPP TS
    38.413)
  - Fixed UE Context Release Request to use correct PDU Session Resource
    List structure
  - Removed incorrect use of pdusession_release_t type

2. Fix PDU Session Release Response

  - Added missing mandatory PDUSessionResourceReleaseResponseTransfer IE
  - Implemented encode_ngap_pdusession_release_response_transfer()
    function
  - Fixed Release Command handler to correctly decode Cause from command
    transfer
  - Split Command/Response struct type definitions to prevent mixing
2025-12-02 13:45:17 +01:00
Robert Schmidt
5af58cc686 RFemulator: initialize RNG when using noise device
After !3786, we always have to initialize the RNG when using random
numbers. This was not done for RFemulator and has been added here.
2025-12-02 13:35:49 +01:00
Guido Casati
9e45f38fbd fix PDU Sesion Release response: add missing PDUSessionResourceReleaseResponseTransfer IE
The PDUSessionResourceReleaseResponse message was missing the mandatory
pDUSessionResourceReleaseResponseTransfer IE in each released PDU session item. This caused Open5GS to send an error indication.

Changes:
- Add encode_ngap_pdusession_release_response_transfer() function to
  properly encode the transfer structure (empty since Secondary RAT Usage
  Information is optional and not used, per 9.3.4.21)
- Always include the mandatory PDUSessionResourceReleasedListRelRes IE
- Always encode the pDUSessionResourceReleaseResponseTransfer for each
  PDU session item
- Fix Release Command handler to decode and log Cause from command transfer:
  instead of incorrectly copying command data to response: the 2 transfer
  IEs in the Command and the Response messages are different and should
  not be mixed
- Split Command/Response struct type definitions
- Add missing includes
2025-12-01 23:48:06 +01:00
Guido Casati
ad1c92af4f Refactor NG UE Context Release Request
1) Remove UE Context Release Response code: there is no
such thing in the specs, it is either UE Context Release Request
(NG-RAN node initiated) or UE Context Release (AMF initiated)
(3GPP TS 38.413). The former message has only the request, no
response is defined by the specs. The code in the stack had no
purpose at all and was removed.
2) The UE Context Release Request message only contains a PDU
Session Resource List (optional) of PDU Session IDs, therefore
the use of pdusession_release_t was wrong and was refactored
2025-12-01 23:48:06 +01:00
Robert Schmidt
a9e7018b98 Merge remote-tracking branch 'origin/yaml_update' into integration_2025_w49 (!3758)
Add yq to edit yaml files and add yaml-dev library in containers missing it

- nr-cu-up and some containers were missing the yaml-config support
  libraries
- yq tool is required to manipulate YAML files from within the container
  for Helm charts
2025-12-01 17:09:25 +01:00
Robert Schmidt
1140c59bbd Merge remote-tracking branch 'origin/fix-OAI_RNGSEED-usage' into integration_2025_w49 (!3786)
Consistently use OAI_RNGSEED env variable for RNG

use OAI_RNGSEED env variable everywhere. Hide normal table
initialization of Ziggurat generator from outside. Fix atoi() to use
stroul()
2025-12-01 15:20:23 +01:00
Robert Schmidt
ce7cb165dd Fix OAI_RNGSEED to capture unsigned long
atoi() used previously does not capture all of unsigned long (so we
could not reproduce a high seed), and its use is discouraged as it does
not detect errors. Use strtoul() instead, which allows to also use other
bases (so we can e.g., write OAI_RNGSEED=0x1234)
2025-12-01 12:10:31 +01:00
Laurent THOMAS
a1b4220a91 Exclusively use OAI_RNGSEED env variable everywhere
Hide normal table initialization of Ziggurat generator from outside to
force the usage of randominit() for RNG initialization. In this step,
remove the randominit() seed parameter and only rely on OAI_RNGSEED for
a consistent RNG initialization, as this parameter was used differently
("0" as fixed number or to force a random seed).

Now, only use OAI_RNGSEED env variable to force the usage of a fixed
seed.
2025-12-01 12:10:31 +01:00
francescomani
7da7dda71b new UE state to trigger RA after reconfiguration with sync 2025-11-29 23:13:42 +08:00
francescomani
e3b0def6dc conditional scheduling of SIB1 reception when receiving reconfigurationwSync 2025-11-29 23:12:36 +08:00
francescomani
9c8274f6bd separate RRC to MAC message to trigger SIB scheduling 2025-11-29 22:39:43 +08:00
francescomani
56f20d49bc improve handling of ssb_perRACH_OccasionAndCB_PreamblesPerSSB according to need code
(also removing unused FAPI element ssb_per_rach)
2025-11-29 22:39:43 +08:00
alexjiao
d56945e45e Monitor dedicated search spaces for DCIs after C-RNTI MAC-CE in Msg3 is sent 2025-11-29 22:39:43 +08:00
francescomani
e454fc41d1 Trigger MSG3 with C-RNTI in MAC CE if CBRA with newUE-Identity (handover) 2025-11-29 22:39:43 +08:00
alexjiao
2e80700d78 Fix for servedRadioBearer to be NULL in RLC Bearer Config 2025-11-29 22:39:43 +08:00
Jaroslava Fiedlerova
1603077171 Merge branch 'integration_2025_w48' into 'develop'
Integration `2025.w48`

* !3778 CI: Update IP addresses in Aerial gNB config files
* !3659 UE NTN - Epoch time handling for Target cell
* !3772 CI: Ensure EPC is always terminated in NSA-B200 pipeline
* !3773 Fix doc for UTC timestamp
* !3759 NR UE: fix bug for SRS generation when freqDomainShift (n_shift) is not 0
* !3774 Use UL functions for Qm/R determination
* !3767 Fix DRB integrity failures during handover and re-establishment
* !3764 Avoid measGap configuration on handover in intra-freq scenarios
* !3768 Fix MIB encoding in F1SetupRequest: use encode_MIB_NR_setup instead of encode_MIB_NR
* !3771 CI build analysis: print log file errors
* !3703 Taking into account UE capabilities for TBS_lbrm layers
* !3561 Implementation of STOP exchange
* !3776 Fix reestablishment after handover
* !3763 CI: Reduce the tries to attach the UE in CI runs
* !3761 fix(FHI 7.2): PRACH frame test
* !3616 [FHI72 M-plane] Update the M-plane support to v16.01
* !3790 Correctly copy nFAPI messages
* !3779 CFRA: mark RA complete when sending Msg2 - check CI

Closes #563 and #1034

See merge request oai/openairinterface5g!3775
2025-11-29 11:16:06 +00:00
Robert Schmidt
6fe7581eed Merge remote-tracking branch 'origin/cfra-no-msg3' into integration_2025_w48
CFRA: mark RA complete when sending Msg2

The current contention-free random access forces a "Msg3" (which does
not exist in CFRA) to be received by a UE. Sometimes, this "Msg3" is not
received (for whatever reason), and the MAC declare that RA failed.

This is problematic, as the spec says that RA is complete once Msg2 is
received by the UE. Since the gNB cannot know when this is, simply mark
it as complete once we sent Msg2.

We still send Msg3 in CFRA, which is explained further in the commits.

Also, improve logging and stabilize an RFsim test by reducing sl_ahead.
2025-11-28 18:25:18 +01:00
Jaroslava Fiedlerova
2ff7a56b95 Merge remote-tracking branch 'origin/fix-nfapi-100mhz' into integration_2025_w48 (!3790)
Correctly copy nFAPI messages

All nFAPI message have copy helpers, so use that for "loading" nFAPI
messages into the L1. This also fixes a bug/error message

2. 0 no corresponding tx_data.request for dl_tti.request index 11, dropping

because the loop over DL_tti.request assumed that all messages are PDSCH
PDUs, when we can have others such as PDCCH, etc. In other words, when
looking up indices ("11" in the example above), we were checking also
inside other messages for SSB, PDCCH, etc, which is of course wrong.
That loop was an attempt to validate matching PDSCH PDUs with
TX_data.requests. This check is already done inside
phy_procedures_gNB_TX() through an assert, but this commit replaces with
the equivalent check previously inside nr_pnf_p7_get_msgs(). This is ok,
as the L1 cannot trust the scheduler (in monolithic) to provide the
correct information, either.
Fixes: eefb9da6 ("Reimplement nFAPI message exchange after msgDataTx removal")
2025-11-28 18:16:13 +01:00
Jaroslava Fiedlerova
68a4bb9a61 Merge remote-tracking branch 'origin/mplane-v16.01' into integration_2025_w48 (!3616)
[FHI72 M-plane] Update the M-plane support to v16.01

- retrieve the additional hardware states (oper-state, admin-state,
  availability-state) and update according to the received notifications
- properly configure MIMO mode if a RU supports
- update the yang models to v16.01
- tested with Benetel v1.4.1, and added an example run in the M-plane doc

Note: backwards compatible with M-plane v05.00

Also, memory leakages fixed cause by ru_session_list_t, and xml functions
xmlReadMemory() and xmlNodeGetContent().
2025-11-28 18:11:06 +01:00
Sagar Arora
662c6e1aec Install yaml-cpp-dev for CU-UP and rocky
Co-authored-by: Robert Schmidt <robert.schmidt@openairinterface.org>
Signed-off-by: Sagar Arora <sagar.arora@openairinterface.org>
2025-11-28 16:48:08 +01:00
Jaroslava Fiedlerova
c8b4aa2abd Merge remote-tracking branch 'origin/fix_prach_frame_test_fhi72' into integration_2025_w48 (!3761)
fix(FHI 7.2): PRACH frame test

A test was missing in the PRACH RX function of the FHI 7.2 in order to know if
the frame had a PRACH occasion. This was leading to continuous warning messages
as PRACH RX was triggered on frames in which PRACH was not expected by the
scheduler.
2025-11-28 16:34:43 +01:00
Jaroslava Fiedlerova
8300ab5a61 Merge remote-tracking branch 'origin/CI-ue-attach' into integration_2025_w48 (!3763)
CI: Reduce the tries to attach the UE in CI runs

The goal of this MR is to save time in CI runs by reducing the UE attach tries
to 3 instead of 4 and UE timeout to 20 seconds, which will be incremented after
each fail, instead of 60 seconds.
2025-11-28 16:33:39 +01:00
Robert Schmidt
1368bb5a5c CFRA: handle potential Msg3
Since the parent commit, CFRA is inconditionally marked complete on Msg3
reception (successful or not). This works because the current
implementation still sends a UL grant (see parent commit for details).

In this commit, handle Msg3 if received in CFRA (notably for TA and
power). Note that since we declare RA complete, UE->ra does not exist
anymore, and so an intermediate variable is introduced to capture the
CFRA flag. The code should be such that if we are in CFRA, we never
access any UE->ra variable.
2025-11-28 15:47:23 +01:00
Robert Schmidt
923b2ec188 Correctly copy nFAPI messages
All nFAPI message have copy helpers, so use that for "loading" nFAPI
messages into the L1. This also fixes a bug/error message

    2. 0 no corresponding tx_data.request for dl_tti.request index 11, dropping

because the loop over DL_tti.request assumed that all messages are PDSCH
PDUs, when we can have others such as PDCCH, etc. In other words, when
looking up indices ("11" in the example above), we were checking also
inside other messages for SSB, PDCCH, etc, which is of course wrong.

That loop was an attempt to validate matching PDSCH PDUs with
TX_data.requests. This check is already done inside
phy_procedures_gNB_TX() through an assert, but this commit replaces with
the equivalent check previously inside nr_pnf_p7_get_msgs(). This is ok,
as the L1 cannot trust the scheduler (in monolithic) to provide the
correct information, either.

Fixes: eefb9da69a ("Reimplement nFAPI message exchange after msgDataTx removal")
2025-11-28 13:54:01 +01:00
Reem Bahsoun
d6e4e49fcb Reduce the time given to the UE to re-attach after failure
Number of tries is reduced from 4 to 3
After each failure the timeout is incremented by 20
2025-11-28 10:03:58 +01:00
Romain Beurdouche
f6135ff1ff fix(FHI 7.2): PRACH frame test
A test was missing in the PRACH RX function of the FHI 7.2 in order to
know if the frame had a PRACH occasion.
This was leading to continuous warning messages as PRACH RX was
triggered on frames in which PRACH was not expected by the scheduler.
2025-11-28 09:01:20 +01:00
Robert Schmidt
8ea95a0e52 CFRA: mark RA complete when sending Msg2
The current contention-free random access forces a "Msg3" (which does
not exist in CFRA) to be received by a UE. Sometimes, this "Msg3" is not
received (for whatever reason), and the MAC declare that RA failed.

This is problematic, as the spec says that RA is complete once Msg2 is
received by the UE. To avoid this, inconditionally mark RA as complete
as soon as we receive an indication of Msg3 (DTX or not).

Note that after this change, we still send a UL grant in Msg2. This is
because 38.321 §5.1.4 is not clear to me whether we should send UL grant
(it does not explicitly exclude it), and it says

> 3> if the Random Access Response includes a MAC subPDU with RAPID only:
> [...]
>   4> indicate the reception of an acknowledgement for SI request to
>      upper layers.

which is NOT the case (but then I don't know/think we can have CFRA for
SI request?).  Since it also works with COTS UE, I leave Msg3 for the
moment.

The reason to not directly mark RA as complete when sending Msg2 is
because of possible retransmissions in do-ra mode. In fact, in do-ra,
there might already be data awaiting. In that case, the DLSCH scheduler
schedules data _in the same slot as Msg2_, which the UE does not decode,
leading to retransmissions.
2025-11-28 08:29:44 +01:00
Robert Schmidt
f0151c21bd Remove duplicate of RAR log above 2025-11-28 08:29:44 +01:00
Robert Schmidt
d5eb935ecf Log preambles for pre-configured RA 2025-11-28 08:29:44 +01:00
Robert Schmidt
b1b120551d Lower sl_ahead in do-ra config to reduce RA timeout risk 2025-11-28 08:29:44 +01:00
Jaroslava Fiedlerova
0226510c4a Merge remote-tracking branch 'origin/fapi-stop-exchange' into integration_2025_w48 (!3561)
Implementation of STOP exchange

This implements the STOP.request/indication for all 3 transport mechanisms, the
VNF will send the STOP.request to the PNF, indicating it will disconnect, and
await a STOP.indication from the PNF

The WLS VNF is reworked to be able to start before the PNF, by calling call
rte_eal_init and rte_dev_probe to determine if dpdk has been initialized
properly, before calling rte_eal_init in the intended process when it is
appropriate to do so
2025-11-27 15:01:39 +01:00
Jaroslava Fiedlerova
0f6b567ae9 Merge remote-tracking branch 'origin/fix-reestab-ho-cleanup' into integration_2025_w48 (!3776)
Fix reestablishment after handover

- fix reestablishment by not re-creating LCIDs with priority set to 0 (see first
  commit for more details)
- cleanup code
2025-11-27 14:52:23 +01:00
Jaroslava Fiedlerova
df041a0f8c Merge remote-tracking branch 'origin/issue563' into integration_2025_w48 (!3703)
Taking into account UE capabilities for TBS_lbrm layers

Closes #563
2025-11-26 20:37:31 +01:00
Jaroslava Fiedlerova
4b7970d601 Merge remote-tracking branch 'origin/ci-build-print-errors' into integration_2025_w48 (!3771)
CI build analysis: print log file errors

The generated HTML from CI builds so far only shows the number of errors, but
not the errors themselves. This is inconvenient, as this means that developers
have to go to the logs.

This commit modifies AnalyzeBuildLogs(), which already iterates the entire file,
to store the lines containing "error:" (as it would be emitted by a compiler).
The callers of AnalyzeBuildLogs() now also print the analysis outcome in a more
concise manner.

Also, change the return parameter of AnalyzeBuildLogs() to a tuple to make the
variable handling easier, and remove the unused warnings list.
2025-11-26 20:35:59 +01:00
Robert Schmidt
110bbd10bc Simplify RLC reestablishment
The idea is to reestablish all RLC entities (it's a new UE, and we set
reestablishRLC on all bearerrs), so we should reestablish all RLC
entities on gNB side as well, without any additional loop.

Co-authored-by: Roberto Magueta <rmagueta@allbesmart.pt>
2025-11-26 18:18:25 +01:00
Robert Schmidt
87adaafcfc Refactor process_addmod_bearers_cellGroupConfig() and set priority
Move the file process_addmod_bearers_cellGroupConfig() to the file where
it is used. Correctly set priorities as requested in RLC bearer
configuration.
2025-11-26 18:18:25 +01:00
Robert Schmidt
b3c99d8ead Avoid recreation of LCIDs with wrong priority
In all cases (NSA, HO), we create LCIDs before the UE triggers random
access. Hence, process_addmod_bearers_cellGroupConfig() is not
necessary, as it just tries to recreate an LCID.

Furthermore, it includes a bug, as this function does set a wrong
priority (0), so the sorting of LCIDs is not correct. This in turn
creates problems with reestablishment, as LCID 1/SRB1 is not in the
first position, making reestablishment fail (where we assume LCID 1 be
in first position).

The actual bug of setting priorities is fixed in the next commit.
2025-11-26 18:18:25 +01:00
francescomani
10247cfbed taking into account maximum number of layers for PUSCH supported by the UE for TBSlbrm 2025-11-26 16:46:00 +01:00
francescomani
1e610af168 taking into account maximum number of layers for PDSCH supported by the UE for TBSlbrm 2025-11-26 16:45:56 +01:00
Jaroslava Fiedlerova
ebc4bb8409 CI: Remove redundant Jenkinsfiles
All the removed files can be replaced by Jenkinsfile introduced in !3738
2025-11-26 11:12:03 +01:00
Jaroslava Fiedlerova
8966dc2c4f Merge remote-tracking branch 'Rakesh_B_B/develop' into integration_2025_w48 (!3768)
Fix MIB encoding in F1SetupRequest: use encode_MIB_NR_setup instead of encode_MIB_NR

- The DU was using encode_MIB_NR() while constructing the GNB-DU System
  Information for the F1SetupRequest.
- encode_MIB_NR() encodes a full NR_BCCH_BCH_Message_t, causing the MIB to be
  wrapped in a BCH container.
- This results in incorrect MIB values in the F1SetupRequest PCAP (e.g., wrong
  systemFrameNumber, SCS, DMRS position, cellBarred).
- According to 3GPP TS 38.473, the MIB carried in F1AP must be encoded as a raw
  NR_MIB_t.
- The correct function encode_MIB_NR_setup() encodes MIB in the required format
  but was not used.
- This patch replaces encode_MIB_NR() with encode_MIB_NR_setup() to ensure correct
  and standards-compliant MIB encoding in the F1SetupRequest.

Closes issue #1034.
2025-11-25 17:47:16 +01:00
Jaroslava Fiedlerova
c87a6ecfba Merge remote-tracking branch 'origin/fix-drb-integrity' into integration_2025_w48 (!3767)
Fix DRB integrity failures during handover and re-establishment

This MR fixes DRB integrity protection failures that occur during N2 handover
and connection re-establishment scenarios. The issues were caused by incorrect
security key handling and ciphering configuration during these procedures with
DRB integity enabled.

See merge request !3767 for more details.
2025-11-25 14:01:40 +01:00
Jaroslava Fiedlerova
0c4882940c Merge remote-tracking branch 'origin/fix-measGaps' into integration_2025_w48 (!3764)
Avoid measGap configuration on handover in intra-freq scenarios

During the handover, we are incorrectly configuring the measGap, even though
neighboring cells are on the same frequency. Since gNB is not expecting this
measGap, the SRS scheduling is performed. Therefore, we are periodically
receiving these logs after the handover:

[NR_MAC] Invalid timing advance offset for RNTI 58e2
[NR_MAC] Invalid timing advance offset for RNTI 58e2
[NR_MAC] Invalid timing advance offset for RNTI 58e2
[NR_MAC] Invalid timing advance offset for RNTI 58e2
[NR_MAC] Invalid timing advance offset for RNTI 58e2
[NR_MAC] Invalid timing advance offset for RNTI 58e2

These logs occur at a time when UE is performing a MeasGap operation and not
sending the SRS, while gNB thinks it will receive the SRS, but will not receive
any SRS.

This MR resolves this issue, and after the handover, these logs no longer
appear.
2025-11-25 13:57:24 +01:00
Jaroslava Fiedlerova
0e4ade9472 Merge branch 'aerial-gh1-ip-addr' into 'develop' (!3778)
CI: Update IP addresses in Aerial gNB config files

This MR updates the NG-AMF and NG-U IP addresses in both Aerial configuration 
files (standard and UL-heavy) following the IP address change on GH1.
2025-11-25 09:52:18 +00:00
Guido Casati
b7454cf5d4 Enable DRB integrity and ciphering in F1 and N2 HO pipelines with Quectel 2025-11-25 09:47:24 +01:00
Jaroslava Fiedlerova
e8732ed8c8 Merge remote-tracking branch 'origin/fix-mcs-tbl' into integration_2025_w48 (!3774)
Use UL functions for Qm/R determination

During refactoring, the wrong functions and correspondingly tables have
been used to calculate UL TB size. Fix through correct functions.
This should fix these error messages:

3624774.778195 [MAC]    E (nr_get_Qm_dl:2034)             Invalid MCS table index 3 (expected in range [0,2])
3624774.778207 [MAC]    E (nr_get_code_rate_dl:2066)      Invalid MCS table index 3 (expected in range [0,2])
3624774.778211 [NR_MAC] E (nr_compute_tbs:63)             Error in compute TBS with a NULL input, returning NULL TBS

Fixes: 9449f777 ("Remove TBS table and recompute on demand")
2025-11-24 22:26:42 +01:00
Jaroslava Fiedlerova
95affc2a41 Merge remote-tracking branch 'origin/srs-freq-shift-fix' into integration_2025_w48 (!3759)
NR UE: fix bug for SRS generation when freqDomainShift (n_shift) is not 0

According to TS 38.211 section 6.4.1.4.3, the frequency domain shift value
n_shift is from higher-layer parameter freqDomainShift. The quantity n_RRC
is given by higher-layer parameter freqDomainPosition. Also corrected
k_0_overbar_p calculation formula to align with standard.
2025-11-24 22:24:56 +01:00
Reem Bahsoun
be1150a82a Update IP addresses for NG-AMF and NG-U interfaces in Aerial config files to match GH1’s new assigned IP 2025-11-24 17:13:36 +01:00
Jaroslava Fiedlerova
8943975eb3 Merge remote-tracking branch 'origin/fix-logging-doc' into integration_2025_w48 (!3773)
Fix doc for UTC timestamp

After merging !3751 (merged), the UTC timestamp now prints only the time.
Update the documentation to reflect this simplified format.
2025-11-24 14:45:22 +01:00
Jaroslava Fiedlerova
c9c935af01 Merge remote-tracking branch 'origin/ci-ltebox-terminate' into integration_2025_w48 (!3772)
CI: Ensure EPC is always terminated in NSA-B200 pipeline

This change avoids leaving EPC processes running after failed test.
2025-11-24 14:44:32 +01:00
Jaroslava Fiedlerova
894491f2e5 Merge remote-tracking branch 'origin/nr_ue_epoch_target' into integration_2025_w48 (!3659)
UE NTN - Epoch time handling for Target cell

In case of Handover, NTNconfig sent in RRCreconfiguration triggering handover
contains epoch time wrt timing of Target cell. NTNconfig in RRC needs to be
processed only after timing is acquired on the target cell.

In case of Target cell, epoch time is the sfn nearest to the frame timing of the
target cell.
2025-11-24 14:42:39 +01:00
Robert Schmidt
0360175042 Use UL functions for Qm/R determination
During refactoring, the wrong functions and correspondingly tables have
been used to calculate UL TB size. Fix through correct functions.

This should fix these error messages:

    3624774.778195 [MAC]    E (nr_get_Qm_dl:2034)             Invalid MCS table index 3 (expected in range [0,2])
    3624774.778207 [MAC]    E (nr_get_code_rate_dl:2066)      Invalid MCS table index 3 (expected in range [0,2])
    3624774.778211 [NR_MAC] E (nr_compute_tbs:63)             Error in compute TBS with a NULL input, returning NULL TBS

Fixes: 9449f777cc ("Remove TBS table and recompute on demand")
2025-11-24 13:04:02 +01:00
Jaroslava Fiedlerova
0386751da8 Fix UTC timestamp documentation
After merging !3751, the UTC timestamp now prints only the time.
Update the documentation to reflect this simplified format.
2025-11-24 11:45:47 +01:00
Jaroslava Fiedlerova
96ec2be887 CI: Ensure EPC is always terminated in NSA-B200 pipeline
This change updates the NSA-B200 CI pipeline to guarantee that the EPC is
properly terminated regardless of pipeline success or failure. This avoids
leaving EPC processes running after failed test.
2025-11-24 11:14:31 +01:00
Robert Schmidt
bff0e53645 CI build analysis: print log file errors
The generated HTML from CI builds so far only shows the number of
errors, but not the errors themselves. This is inconvenient, as this
means that developers have to go to the logs.

This commit modifies AnalyzeBuildLogs(), which already iterates the
entire file, to store the lines containing "error:" (as it would be
emitted by a compiler). The callers of AnalyzeBuildLogs() now also print
the analysis outcome in a more concise manner.

Also, change the return parameter of AnalyzeBuildLogs() to a tuple to make
the variable handling easier, and remove the unused warnings list.
2025-11-21 17:53:25 +01:00
rmagueta
fea86247da Do not configure NR_MeasurementTimingConfiguration during handover when neighboring cells are at the same frequency 2025-11-21 16:42:24 +00:00
Rakesh BB
176b71ae70 Fix MIB encoding in F1SetupRequest: use encode_MIB_NR_setup instead of encode_MIB_NR
- The DU was using encode_MIB_NR() while constructing the GNB-DU System Information for the F1SetupRequest.
- encode_MIB_NR() encodes a full NR_BCCH_BCH_Message_t, causing the MIB to be wrapped in a BCH container.
- This results in incorrect MIB values in the F1SetupRequest PCAP (e.g., wrong systemFrameNumber, SCS, DMRS position, cellBarred).
- According to 3GPP TS 38.473, the MIB carried in F1AP must be encoded as a raw NR_MIB_t.
- The correct function encode_MIB_NR_setup() encodes MIB in the required format but was not used.
- This patch replaces encode_MIB_NR() with encode_MIB_NR_setup() to ensure correct and standards-compliant MIB encoding in the F1SetupRequest.

Closes issue #1034.
2025-11-19 17:30:22 +00:00
Guido Casati
e1dd62df53 Fix N2 handover integrity failures by enabling ciphering during handover setup
Problem:
During N2 handover with integrity protection (NIA1/NIA2), the target gNB
was disabling ciphering when configuring SRB1 security, while the UE
continued using the old security context from the source gNB until it
received and processed the RRC Reconfiguration with masterKeyUpdate. The
first PDUs sent after CFRA were still ciphered with the old keys, but the
target gNB had ciphering disabled, causing it to skip deciphering and
attempt integrity verification on ciphered data, leading to MAC-I
mismatches and integrity failures.

Specification Reference:
According to TS 33.501 section 6.11, "the UE shall keep the K gNB used in
the source cell until the handover or a connection re-establishment has been
completed successfully". This means the UE continues using the old security
context (old KRRCint, KRRCenc) until it receives and processes the RRC
Reconfiguration with masterKeyUpdate. The target gNB must therefore enable
ciphering during handover setup to correctly decipher and verify integrity
of PDUs sent with the old security context before the UE switches to the new
keys.

Root Cause:
The code was calling nr_rrc_pdcp_config_security(UE, false) during
handover setup, which disabled ciphering. This was incorrect because:
1. The UE already has security active from the source gNB
2. The UE continues using old ciphered keys until masterKeyUpdate
3. The UE sends ciphered PDUs immediately after CFRA succeeds
4. The target gNB must be able to decipher these PDUs to verify integrity

Why it only manifested when drb_integrity = "yes":
The bug was always present, but only caused visible failures when
integrity verification was enabled. When drb_integrity = "no", the config
typically also sets integrity_algorithms to only NIA0, resulting in
UE->integrity_algorithm = 0, which causes has_integrity = 0 for SRB1,
skipping integrity verification and hiding the underlying ciphering bug.
When drb_integrity = "yes", integrity_algorithms typically includes
NIA1/NIA2, resulting in has_integrity = 1 for SRB1, causing integrity
checks to run on ciphered data and fail.

Fix:
Change nr_rrc_pdcp_config_security(UE, false) to
nr_rrc_pdcp_config_security(UE, true) during handover setup to enable
ciphering immediately, allowing the target gNB to correctly decipher and
verify integrity of PDUs sent with the old security context.

Note: This fix is specific to handover. During initial context setup,
ciphering should remain disabled until SecurityModeComplete is received,
as the UE hasn't activated ciphering yet at that point.
2025-11-19 11:37:36 +01:00
Guido Casati
6512a7a9ca Notify security keys change to CUUP during re-establishment
During re-establishment, new KgNB* is derived, requiring new UP keys (KUPint,
KUPenc) to be sent to CU-UP. When do_drb_integrity = true, CU-UP needs the
updated integrity keys to verify DRB PDUs. Without this update, CU-UP uses
old keys while the UE uses new keys, causing integrity failures.

The fix ensures security info is always sent during re-establishment,
which is critical for DRB integrity.
2025-11-19 11:36:39 +01:00
Thomas Schlichter
92107b18fe update FEATURE_SET.md 2025-11-19 10:05:45 +01:00
Thomas Schlichter
a283ef263b rfsimulator: improve calculation of ta-CommonDrift-r17 and ta-CommonDriftVariant-r17
Instead of using the projected velocity and acceleration vectors,
calculate vel_sat_gnb and acc_sat_gnb so the delay is correct for
epoch_time, epoch_time + 5 seconds and epoch_time + 10 seconds.
2025-11-19 10:05:45 +01:00
Thomas Schlichter
842b16092d NR UE: use GET_NTN_UE_K_OFFSET() instead of get_total_TA_ms() in nr_ra_procedures.c 2025-11-19 10:05:45 +01:00
Thomas Schlichter
62fe88d6f4 NR UE: make sure not to lose N_TA when updating N_common_TA_adj + N_UE_TA_adj
Separate timing_advance (N_TA) from timing_advance_ntn (N_common_TA_adj + N_UE_TA_adj)
to keep N_TA when updating N_common_TA_adj + N_UE_TA_adj.

Fixes #981
2025-11-19 10:05:45 +01:00
Thomas Schlichter
59af5e4ad2 NR UE: introduce orbit propagation to improve N_UE_TA_adj accuracy
Instead of trying to estimate N_UE_TA_adj with a second degree polynomial,
we introduce orbit propagation to calculate N_UE_TA_adj with higher accuracy.

When we receive the satellite ephemeris data consisting of the satellite position vector
and the satellite velocity vector, we calculate parameters for orbit propagation, assuming
a circular orbit in the plane created by the satellite position vector and the satellite
velocity vector. This is done in the function prepare_ue_sat_ta().

Every millisecond, we use these parameters together with the time since epoch to calculate
the satellite position on that orbit and from this the reound-trip-time between UE and the
satellite, what corresponds to N_UE_TA_adj. This is done in the function apply_ntn_timing_advance().
2025-11-19 10:05:45 +01:00
Thomas Schlichter
43722e6bac fix compiler warning: ‘phase_tdd_ncp’ may be used uninitialized 2025-11-19 10:05:45 +01:00
Thomas Schlichter
1947f4d60c remove the parameter --autonomous-ta from the UE command line and update RUNMODEM.md accordingly 2025-11-19 10:05:45 +01:00
Thomas Schlichter
b60a40ccbf NR UE: calculate TA based on SIB19 information in NTN mode, if autonomous TA is not enabled 2025-11-19 10:05:45 +01:00
Thomas Schlichter
654fadb116 NR UE: calculate the epoch_hfn whenever an ntn_Config_r17 is received 2025-11-19 10:05:45 +01:00
Thomas Schlichter
0bf99d9d16 NR UE: introduce the hyper frame number (HFN) in PHY, MAC and RRC layer
Provide it to the function configure_ntn_ta() so it can be used when a new ntn_Config_r17 is received.
2025-11-19 10:05:44 +01:00
Raghavendra Dinavahi
f9a8898e20 UE: Epoch time handling of Target cell
In case of Handover, NTNconfig sent in RRCreconfiguration triggering handover contains epoch time wrt
timing of Target cell. NTNconfig in RRC needs to be processed only after timing is acquired on the target cell
In case of Target cell, epoch time is the sfn nearest to the frame timing of the target cell.
2025-11-17 15:53:23 +01:00
Robert Schmidt
92980ceb72 Merge branch 'integration_2025_w46' into 'develop'
Integration `2025.w46`

* !3754 NR UE: correctly provide measured SSB SINR value from PHY to MAC
* !3666 NTN: Fixing variable ULDLduplex issue for NTN bands
* !3747 SDAP: guard RX header parsing with enable_sdap and init per-entity
* !3729 DCI 00 alt size fix
* !3753 gNB: fix MAC TA command scheduling if measurement gaps are configured
* !3722 [NGAP] Fix incorrect AMF Set ID type (uint8 → uint16) causing AMF lookup failure
* !3745 Collection of small fixes
* !3755 CI: Increase tested UL throughput on Aerial pipeline using 2L UL
* !3752 [MAC] Add UL total/used aggregated MAC stats; [E2 agent] Properly calculate used UE PRBs in KPM
* !3707 Cleanup phy_procedures_gNB_uespec_RX
* !3750 Handling newly opened UE issues
* !3751 Update log header format to align log output
* !3757 Remove schedule response and update L1 threading documentation
* !3748 Refactor imscope
* !3760 gNB: modify RLC configuration applied for SRB1 during RRCReestablishment
* !3684 PDU Session Release

Closes #867, #960, #1025, #1024, #1026, #1031, #1030, and #1012

See merge request oai/openairinterface5g!3756
2025-11-16 07:21:47 +00:00
Sagar Arora
389ca60d5e add yq in 5G NF Dockerfiles
Signed-off-by: Sagar Arora <sagar.arora@openairinterface.org>
2025-11-16 06:14:14 +01:00
Robert Schmidt
1948858c35 Merge remote-tracking branch 'origin/rrc-pdu-session-release' into integration_2025_w46 (!3684)
PDU Session Release

This MR implements end-to-end PDU Session Release functionality
according to 3GPP TS 38.413 and TS 38.331 specifications.

Reason for Change Previous implementation had incomplete and wrongly
places tunnel cleanup during PDU session release. UP cleanup shall be
done at CUUP, RRCReconfiguration shall be sent after retrieval of
updated CellGroupConfig from the DU. This implies F1 and E1 exchanges
during PDU session release procedure.

Major Changes:

1. RRC PDU Session Release: DRBs and PDU session teardown in NGAP PDU
   Session Release Response callback
  - Helper Functions: Introduced rm_pduSession,
    find_drb_by_pdusession_id and rm_drbs() helpers to locate and clean
    up DRBs linked to a specific PDU session
  - Targeted Cleanup: RRC PDU Session and per-session DRB removal in
    rrc_gNB_send_NGAP_PDUSESSION_RELEASE_RESPONSE()
  - Status Cleanup: Removed unused PDU_SESSION_STATUS_RELEASED status
2. RRC PDU Session Release: Refactor
   rrc_gNB_process_NGAP_PDUSESSION_RELEASE_COMMAND
  - Any PDU session in the pdusession_release_params list that is
    present in the RRC list can be set to release, regardless of its
    status
  - Function Signature Update: Updated function signature and other
    minor changes
  - Response Handling: rrc_gNB_send_NGAP_PDUSESSION_RELEASE_RESPONSE is
    sent upon completion of RRCReconfiguration
3. RRC PDU Session Release: add missing procedures E1AP Integration:
  - Populates E1AP Bearer Modification for each to be released session
  - PDCP Enhancement: Added nr_pdcp_release_drbs() to remove all DRBs
    linked to a given PDU session in CUUP
  - GTP-U Cleanup: GTP tunnel teardown handled in CUUP
    e1_bearer_context_modif() using correct F1 or N3 GTP instance
4. NR PDCP/GTP:
  - Enhanced Tunnel Deletion Logic: Separate handling for N3 tunnels (1
    per PDU session) and F1-U tunnels (1 per DRB)
  - New PDCP API Function: Added nr_pdcp_get_drb_ids_for_pdusession()
    function to retrieve all DRB IDs associated with a specific PDU
    session
5. RRC PDU Session Release: F1AP-based UE Context Modification:
  - Replaced direct RRC message transfer with F1AP UE Context
    Modification Request for proper retrieval from DU
  - Cell Group Configuration: handling of updated CellGroupConfig from
    DU ensures DRB release at CU
6. Docs and testing:
  - Added PDU session add/remove test cases to 25 PRB RFSIM pipeline
  - Documentation: Added PDU Session Release sequence diagram
  - Telnet Commands: Added ci command to trigger NGAP PDU Session
    Release and ciUE command to trigger establishment of a new PDU
    Session
7. Additional fixes:
  - UE RLC Management: ensure release of RLC entities
  - Unify NG delay control before calling the RRC NGAP handler, for both
    Setup and Release
8. Code Cleanup: Cleaned up unused GTP teardown functions.

Closes #867
2025-11-15 21:05:46 +01:00
Guido Casati
1fea6108a8 RRC: unify NG delay control before calling the RRC NGAP handler
- Add delayed_action_state_t in the UE context for ongoing delayed action
- Move delay check and timer re-enqueue to rrc thread in rrc_gNB.c (rrc_delay_transaction)
- Call delay before NGAP setup/release handlers; remove local delay logic from rrc_gNB_NGAP.c
- Clear on RRCReconfigurationComplete (reset_delayed_action)

Closes #960
2025-11-15 21:04:55 +01:00
Guido Casati
c3ef64d292 Add PDU Session Release documentation 2025-11-15 21:04:55 +01:00
Guido Casati
ed6a25be75 Add PDU session add/remove test cases to 25 PRB RFSIM pipeline
- Enable telnet server on VNF (gNB) and UE in docker-compose.yaml
- Add new test cases for PDU session management:
  * Add PDU session via UE telnet
  * Release PDU session via telnet
  * Verify connectivity after PDU session release
- Integrate telnet commands into existing container_5g_rfsim_u0_25prb.xml pipeline
- Test cases added before undeploy step in proper execution order
2025-11-15 21:04:54 +01:00
Guido Casati
55c3cd2b31 Telnet: add ciUE command to trigger establishment of a new PDU Session 2025-11-15 21:04:53 +01:00
Guido Casati
653c0fd6d5 Telnet: add ci command to trigger NGAP PDU Session Release
This commit introduces a new telnet server command `pdu_session_release` to
manually trigger the NGAP PDU Session Release Command message from the telnet ci shell.
This is useful for integration testing of PDU session teardown behavior.

Details:
- Added `trigger_ngap_pdu_session_release()` to send NGAP_PDUSESSION_RELEASE_COMMAND
  to the RRC task, targeting the specified `gNB_ue_ngap_id`.
- The command currently releases PDU session ID 10 (hardcoded).
- Hooked into telnet shell with command: `pdu_session_release [gNB_ue_ngap_id]`

Usage example:
telnet > pdu_session_release 1
2025-11-15 21:04:53 +01:00
Guido Casati
3cfe2e265a RRC PDU Session Release: DRBs and PDU session teardown in NGAP PDU Session Release Response callback
We need to keep PDU sessions and DRBs in list until the NGAP PDU Session Release Response is sent.

* Introduced find_drb() and remove_drbs_by_pdu_session() helpers to locate
  and clean up DRBs linked to a specific PDU session
* Targeted per-session DRB removal in rrc_gNB_send_NGAP_PDUSESSION_RELEASE_RESPONSE()
* Ensures DRBs for unaffected PDU sessions remain intact
* Remove unused PDU_SESSION_STATUS_RELEASED status: keeping this status is no longer relevant
  since the PDU sessions are effectively removed from the RRC lists

Closes #867

Also, refactor rrc_gNB_process_NGAP_PDUSESSION_RELEASE_COMMAND

3GPP TS 38.413 8.2.2 PDU Session Resource Release says:

> upon reception the NG-RAN node shall execute the release of the requested PDU sessions.
> For each PDU session to be released the NG-RAN node shall release the corresponding
> resources over Uu and over NG, if any.

Therefore, any PDU session in the pdusession_release_params list that is
also present in the RRC list can be set to release, regardless of its status.

The function signature was also updated along with other minor changes.
2025-11-15 21:04:50 +01:00
Guido Casati
7d5e20fd03 gtpu: cleanup unused newGtpuDeleteTunnels()
The partial-tunnel deletion API was buggy and redundant:
* e.g. It erased entries from globGtp.te2ue_mapping but never erases
  the corresponding entries from inst->ue2te_mapping[ue].bearers

All current use cases are already covered by:
* newGtpuDeleteOneTunnel() for targeted deletion
* newGtpuDeleteAllTunnels() for full cleanup

Call sites should explicitly loop over newGtpuDeleteOneTunnel()
if multiple tunnels need removal.
2025-11-15 21:04:39 +01:00
Guido Casati
a58cf178ed RRC PDU Session Release: end-to-end DRB and PDU session release
This commit implements proper PDU Session Release handling across
RRC, PDCP, F1AP, E1AP to ensure clean resource cleanup when
a PDU session is terminated.

Key changes:

NGAP:

In `rrc_gNB_process_NGAP_PDUSESSION_RELEASE_COMMAND()`:
  * Populates E1AP Bearer Modification for each released session
  * If a CU-UP is connected, triggers `bearer_context_mod()` for PDU teardown

PDCP:
 * Added `nr_pdcp_release_drbs()` to remove all DRBs linked to a given PDU session
 * Called from `e1_bearer_context_modif()` for correct clean-up during session release

F1AP UE Context Modification:

  Replace direct RRC message transfer with F1AP UE Context Modification Request
  to properly handle PDU session release according to 3GPP TS 38.331.

  3GPP TS 38.331 `5.3.5.6.4 DRB release` says: whether or not the RLC and MAC entities associated
  with a PDCP entity are reset or released is determined by the CellGroupConfig. Thus,
  updated CellGroupConfig needs to be received by the UE. This has to be retrieved by CUCP
  from the DU. Therefore:

  After receiving an NGAP_PDUSESSION_RELEASE_COMMAND, the CUCP shall:
  1) forward (store for later) the NAS PDU to the UE, if present as per 3GPP TS 38.413, and
  2) send a UE Context Modification to the DU with the list of DRBs to release
     and the RRC container (RRCReconfiguration with NAS PDU)

  After reception of UE Context Modification Response, the list of drbs to release
  is prepared based on PDU session status PDU_SESSION_STATUS_TORELEASE
  in rrc_gNB_generate_dedicatedRRCReconfiguration and then encoded
  in drb_ToReleaseList for a new RRCReconfiguration with the new cellGroupConfig.

  Key changes:
  * rrc_gNB_generate_dedicatedRRCReconfiguration_release() now uses F1AP UE Context
    Modification Request instead of direct RRC transfer
  * Only DRBs to be released are now added to the list.
  * The ASN.1 memory allocation is entirely done in build_RRCReconfiguration_IEs
  * No longer needed to store ASN1 struct in UE context

GTP-U:
  * Previous implementation had incomplete tunnel cleanup during PDU session release
    - Missing distinction between N3 (PDU session level) and F1-U (DRB level) tunnels
    - Lack of proper DRB identification for F1-U tunnel deletion
  Major Changes:
  * GTP tunnel teardown now handled in `e1_bearer_context_modif()` using the correct
  F1 or N3 GTP instance (`newGtpuDeleteOneTunnel()`)
  * Enhanced Tunnel Deletion Logic (cucp_cuup_handler.c):
   - Separate handling for N3 tunnels (1 per PDU session) and F1-U tunnels (1 per DRB)
   - Added proper DRB identification for F1-U tunnel cleanup
   - Improved error handling with detailed logging for each tunnel deletion
   - Enhanced logging to distinguish between N3 and F1-U tunnel operations
  * New PDCP API Function (nr_pdcp_oai_api.c/h):
   - Added nr_pdcp_get_drb_ids_for_pdusession() function
   - Enables retrieval of all DRB IDs associated with a specific PDU session
   - Supports proper F1-U tunnel cleanup by providing DRB identifiers in CUUP
  * Enhanced GTP Interface (gtp_itf.cpp/h):
   - Modified newGtpuDeleteOneTunnel() to accept tunnel_type parameter
   - Improved logging to distinguish between PDU session and DRB tunnel types
   - Better error messages for tunnel deletion failures
   - Enhanced debugging information for remaining tunnels

Clean-up:
* Ensured xid tracking works consistently between PDU Session Establishment (with NAS PDU)
  and dedicated RRCReconfiguration
* Add function to release GTP-U tunnel in Bearer Context Modification Request handler
* Do not send rrc_gNB_send_NGAP_PDUSESSION_RELEASE_RESPONSE when no PDU session are to
  be released: it is sent upon completion of the RRCReconfiguration and needs to contain
  released PDU Sessions (mandatory IE), therefore it is no necessary to send it in case
  there is no PDU session to release.

Related to #867

Co-authored-by: rmagueta <rmagueta@allbesmart.pt>
2025-11-15 21:04:17 +01:00
Guido Casati
a9ad90a26a Add FOR_EACH_SEQ_ARR to .clang-format 2025-11-15 21:04:16 +01:00
Guido Casati
f5239f49b0 PDCP: Increase upper DRB ID limit 2025-11-15 21:04:14 +01:00
Robert Schmidt
b57495b38d Merge remote-tracking branch 'origin/fix_NR_RLC_Config_during_RRCReestablishment' into integration_2025_w46 (!3760)
gNB: modify RLC configuration applied for SRB1 during RRCReestablishment

TS 38.331 clause 5.3.7.4 specifies to apply the configuration defined in
9.2.1 for SRB1 at UE side. This implies that the gNB also has to apply
sn_field_length = 12, but there are no implications on the other RLC
parameters.

As wrong timer values break SRB1 e.g. for long RTT NTN scenarios, this
commit switches to using the RLC timer values provided in the
configuration file. Currently we still set poll_pdu, poll_byte and
max_retx_threshold to the values defined in 9.2.1, but this can be
changed.
2025-11-15 10:54:56 +01:00
Robert Schmidt
946810e39e Merge remote-tracking branch 'origin/refactor-imscope' into integration_2025_w46 (!3748)
Refactor imscope

This MR refactors imscope by introducing changes to the default layout
in the config file imgui.ini. The global settings are moved to a new
menu item. This modified layout is intended as a suggestion subject to
change based on feedback. This MR also adds PDCCH LLR and IQ plots to
the UE scope and set axes to AutoFit by default.

The MR has a screenshot of the new layout.
2025-11-15 10:54:16 +01:00
Robert Schmidt
d3026267b3 Merge remote-tracking branch 'origin/remove-sched-response-doc' into integration_2025_w46 (!3757)
Remove schedule response and update L1 threading documentation

This merge requests removes the somewhat superfluous "schedule response"
mechanism. "schedule response" was run after running the scheduler
itself and copied various FAPI messages into a global msgDataTx
structure from which the various TX/RX jobs were triggered. It is not
necessary, though, given that the scheduler is run inside the tx_func()
(running the TX jobs of the L1), and so the scheduler output FAPI
messages can directly be read into a variable of the existing
NR_Sched_Rsp_t type. This allows to delete a couple of hundred lines of
code (while retaining functionality), and simplifies the msgDataTx type
(which is still there to trigger TX job (including the scheduler) from
the ru thread).

In short, prior, there was this call chain:

- tx_func() calls run_scheduler_monolithic() (through fptr
  NR_slot_indication())
  - get some memory through allocate_sched_response() which has enough
    space for NR_Sched_Rsp_t type variable
  - call the scheduler and fill the variable
  - call nr_schedule_response() (through fptr NR_schedule_response())
    which copies into L1: to msgDataTx for TX, to separate structures
    for RX

this is changed to

- tx_func() runs one message at a time, hence we can use memory in the
  data segment for NR_Sched_Rsp_t. It calls run_scheduler_monolithic()
  through the fptr
  - pointers into NR_Sched_Rsp_t are passed to the scheduler, which
    fills as before
  - we return, memory is in its right place and does not need an extra
    copy.

Additionally, this merge request updates documentation on threading and
cleans up some unused code along the way.
2025-11-14 22:03:01 +01:00
Jaroslava Fiedlerova
d8f5c9f103 Merge remote-tracking branch 'origin/logging-improvements' into integration_2025_w46 (!3751)
Update log header format to align log output

The new format:
- left-aligns the log header name and enforces a minimum width of 6 characters,
  padding shorter names with spaces while allowing longer names to be printed in
  full
- shortens UTC timestamp
- align function names to 32 characters

Example output:

[19:51:34.647930] [NGAP]   I (ngap_gNB_decode_initiat:100)   Handover Resource Allocation initiating message
[19:51:34.648539] [NGAP]   D (decode_ng_handover_requ:267)   AllowedNSSAI.list.count 2
[19:51:34.648586] [NGAP]   I (ngap_gNB_handle_handove:728)   Received NG Handover Request from AMF OAI-AMF (ID=1)
[19:51:34.648627] [NR_RRC] I (rrc_gNB_process_Handove:1199)  Received Handover Request (on NR Cell ID=11111111, PCI=1)
[19:51:34.648647] [NR_RRC] A (rrc_gNB_create_ue_conte:230)   [--] (cellID 0, UE ID 1 RNTI ffff) Create UE context: CU UE ID 1 DU UE ID 4294967295 (rnti: ffff, random ue id ffffffffffffffff)
[19:51:34.648659] [NR_RRC] A (set_UE_security_algos:692)     [--] (cellID 0, UE ID 1 RNTI ffff) Selected security algorithms: ciphering 0, integrity 2
2025-11-14 21:28:31 +01:00
Jaroslava Fiedlerova
517a1403b3 Merge remote-tracking branch 'origin/UE_issues' into integration_2025_w46 (!3750)
Handling newly opened UE issues

Closes #1025 #1024 #1026 #1031 #1030
2025-11-14 21:27:36 +01:00
Robert Schmidt
bd8f088ffa Update documentation FAPI 2025-11-14 18:18:44 +01:00
Robert Schmidt
0713b2f655 Rewrite doc/SW-archi-graph.md 2025-11-14 18:17:30 +01:00
Robert Schmidt
15441c741c Cleanup: move slot_parameters to where they are used 2025-11-14 18:17:30 +01:00
Robert Schmidt
aa3f01b677 Delete dead code 2025-11-14 18:17:30 +01:00
Robert Schmidt
c8fba9964f Remove dead code 2025-11-14 18:17:30 +01:00
Robert Schmidt
5ac381dd59 Remove dead code 2025-11-14 18:17:29 +01:00
Robert Schmidt
eefb9da69a Reimplement nFAPI message exchange after msgDataTx removal
Reimplement nFAPI message exchange between L1 and L2 following the
changes in parent commit removing msgDataTx.

Avoid direct calls and use NR_IF_module fptrs to avoid linking problems.
allowing to remove some function definitions that are not needed.
2025-11-14 18:16:02 +01:00
Robert Schmidt
2bea71a80a Avoid use of FAPI message buffers in msgDataTx
Note: after this commit, monolithic works but nFAPI operation is broken
and fixed in the next commit, to keep the changes small(er). All
simulators work.

This commit removes the use of msgDataTx's intermediate buffers for FAPI
messages and the call of the "Schedule response". The latter incurs an
additional copy of FAPI messages for the TX chain (for the RX chain, it
is and will remain there) which we can avoid.

Instead, it uses an NR_Sched_Rsp_t-typed variable sched_response to
store the results of the scheduler when called from tx_func(). Thus, the
scheduler remains unchanged (it gets a pointer to where to put FAPI
messages), but we don't call nr_schedule_response() to then copy FAPI
messages into the L1, but have them in a local variable sched_response.
sched_response on on the data segment, as it is big and would overflow
the stack; at the same time, this is ok because only one tx_func() runs
at a time.

Since we don't use allocate_sched_response() anymore, we don't need
deref_sched_response().

clear_slot_beamid() is moved to tx_func(), as it was called in
nr_schedule_response().

Since the "intermediate" NR_gNB_DLSCH_t structure groups both the
DL_tti_pdsch and TX_data.req structures, a pointer has been created to
point to pdsch_pdu. This affects a number of simulators, as they have to
put some messages on the stack:

- nr_dlschsim: put the corresponding variable on the stack
- nr_pbchsim: a new array for the SSB PDUs has been introduced

Further, these changes are now necessary:

- nr_dlsim:  there were variables "rel15" and "pdsch_pdu_rel15" that
  point to the same PDSCH PDU. At least "rel15" would not exist, as the
  corresponding pointer is now populated in phy_procedures_gNB_TX(), and
  we therefore refer to the single PDSCH PDU variable with
  "pdsch_pdu_rel15", but at the place where "rel15" used to be
  initialized.
- nr_ulsim: use nr_save_ul_tti_req() to load PDUs into the RX chain
  instead of nr_schedule_response(), which does not exist anymore.
2025-11-14 18:16:00 +01:00
Robert Schmidt
e17c165c9d Move DLSCH/PDSCH variables to gNB
The next commit will remove msgDataTx. We can therefore not use
msgDataTx to retain the PDSCH/DLSCH variables, and move them to the gNB.

Note that the only reason for NR_gNB_DLSCH_t after this commit is to
hold various large buffers (c, b, f). Future work could be done to
remove this, in which case the array inside PHY_VARS_gNB could be
deleted.

On this occasion, clean up the use of init_DLSCH_struct() and
reset_DLSCH_struct() (renamed destroy_DLSCH_struct()) and centralize
their call in phy_init_nr_gNB()/phy_free_nr_gNB(), and correct
simulators accordingly.
2025-11-14 18:14:02 +01:00
Thomas Schlichter
eb7ca9663c gNB: modify RLC configuration applied for SRB1 during RRCReestablishment
TS 38.331 clause 5.3.7.4 specifies to apply the configuration defined in 9.2.1 for SRB1 at UE side.
This implies that the gNB also has to apply sn_field_length = 12, but there are no implications on the other RLC parameters.

As wrong timer values break SRB1 e.g. for long RTT NTN scenarios, this commit switches to using the RLC timer values provided in the configuration file.
Currently we still set poll_pdu, poll_byte and max_retx_threshold to the values defined in 9.2.1, but this can be changed.
2025-11-14 17:49:02 +01:00
Thomas Schlichter
8620f33a58 Provide public helper functions to create NR_RLC_Config from nr_rlc_configuration_t 2025-11-14 17:46:17 +01:00
francescomani
789564fa8e add UE capability container for each element of request list (issue #1025) 2025-11-14 17:40:19 +01:00
francescomani
9c3c65f5c9 check presence of optional nonCriticalExtension before handling (issue #1026) 2025-11-14 17:40:19 +01:00
francescomani
88baba8948 do not handle not decoded cellGroupConfig (issue #1031) 2025-11-14 17:40:19 +01:00
francescomani
566da5317f add a check for cell ID presence in handling reconfigurationWithSync 2025-11-14 17:40:19 +01:00
francescomani
f4ff6c756c add a check for rlc-Config presence (even if it should be mandatory at setup) 2025-11-14 17:40:16 +01:00
Jaroslava Fiedlerova
a451675937 Merge remote-tracking branch 'origin/improve-readability-phy_procedures_gNB_uespec_RX' into integration_2025_w46 (!3707)
Cleanup phy_procedures_gNB_uespec_RX

phy_procedures_gNB_uespec_RX is too long function with too long lines of code,
this commit only shorten lines and improve a bit the readability
2025-11-14 17:28:17 +01:00
Jaroslava Fiedlerova
304c3ef9c4 Merge remote-tracking branch 'origin/mac-e2-ci' into integration_2025_w46 (!3752)
[MAC] Add UL total/used aggregated MAC stats; [E2 agent] Properly calculate
used UE PRBs in KPM; [CI] Simplify and improve the Undeploy_Object() and
implement Stop_Object()

- Create common dlul_mac_stats_t struct for both DL and UL total/used aggregated
  PRBs
- Use correct unit [%] for RRU.PrbTotDl and RRU.PrbTotUl , instead of [PRBs]
- Use correct unit [Mb] for DRB.PdcpSduVolumeDL and DRB.PdcpSduVolumeUL [kb]
- Implement Stop_Object() (docker compose stop = SIGTERM)
- Simplify the Undeploy_Object() function
- Improve the logging for Deploy/Undeploy_Object() functions
- OAI-FlexRIC CI: properly stop all the containers (one by one or a subgroup of
  running containers), and rename oai-flexric to nearRT-RIC container
2025-11-14 17:25:25 +01:00
Jaroslava Fiedlerova
b7d867ead6 Merge remote-tracking branch 'origin/2l-ul-aerial' into integration_2025_w46 (!3755)
CI: Increase tested UL throughput on Aerial pipeline using 2L UL

The goal of this MR is to activate the use of 2-layer uplink by enabling SRS
and to increase the tested UL throughput in CI.
2025-11-14 17:24:39 +01:00
Robert Schmidt
875ec96fce When logging function names, align to 32 characters 2025-11-14 17:09:07 +01:00
Robert Schmidt
ea1aa382c3 Update log header format to improve visual alignment
The new format left-aligns the component name and enforces a minimum width
of 7 (log component) characters, padding shorter names with spaces after
the closing "]".

Example output:

    [14:05:43.395376] [E1AP]   I releasing UE 1
    [14:05:43.395400] [GTPU]   I [91] UE ID 1: Delete all tunnels (1 tunnels)
    [14:05:43.395414] [NR_RRC] A [DL] (cellID bc614e, UE ID 1 RNTI 8e27) Send RRC Release
    [14:05:43.395431] [RRC]    I UE 1: received bearer release complete
    [14:05:43.424551] [RLC]    W Remove UE 36391
    [14:05:43.424597] [NR_RRC] I removed UE CU UE ID 1/RNTI 8e27
    [14:05:43.424773] [NR_RRC] A [--] (cellID bc614e, UE ID 1 RNTI 8e27) Remove UE context
    [14:05:43.425205] [NR_MAC] I Remove NR rnti 0x8e27
    [14:05:43.582158] [HW]     W Lost socket
    ^C
    ** Caught SIGTERM, shutting down
    Returned from ITTI signal handler
    [14:05:43.948721] [GNB_APP] I stopping nr-softmodem
    [14:05:43.948746] [PHY]    I Killing gNB 0 processing threads
    [14:05:44.574818] [PHY]    I Stopping RU 0 processing threads
    [14:05:44.575000] [PHY]    I RU 0 RF device stopped
    [14:05:44.575006] [GNB_APP] I turned off RU rfdevice
2025-11-14 17:05:49 +01:00
Robert Schmidt
7f57019128 log: Only print one space if no level selected
Prior to this change, when no "level" option is given to the logging
module, we see

    [PHY]   RU 0 RF started cpu_meas_enabled 0
    [HW]   No connected device, generating void samples...

with three spaces, which is too much. This change reduces the amount of
spaces to 1 without log level.

Co-authored-by: Robert Schmidt <robert.schmidt@openairinterface.org>
2025-11-14 16:01:07 +01:00
Robert Schmidt
090cf00c76 Simplify logging UTC option to only show time
We probably almost never care about the date, but it takes a lot of
space. Remove it; if somebody needs the full time stamp including the
date, we could still add it with a new option.
2025-11-14 15:26:05 +01:00
Teodora
6a6588e9cb OAI-FLEXRIC-RAN-Integration-Test CI pipeline
1. Rename oai-flexric to nearRT-RIC. FlexRIC is a project combining nearRT-RIC, xApps, and E2 agent emulators.
2. Instead of undeploying all the containers at the same time, and not checking the logs for xApps and nearRT-RIC, do the following:
- Stop containers (docker compose stop) - one or subgroup of running containers in the following order:
   a) xapp-kpm-moni
   b) xapp-kpm-rc
   c) xapp-gtp-mac-rlc-pdcp-moni
   d) oai-nr-ue oai-nr-ue2
   e) oai-gnb
   f) nearRT-RIC
- Undeploy containers (docker compose down), collect and analyze all the logs.
2025-11-14 14:57:12 +01:00
Robert Schmidt
81680e29a9 Implement StopObject()
For some test cases, we might want to stop a service earlier. This
functionality is done by StopObject().

Test log collection is still done by UndeployObject(), which will
collect the logs of all services (at that point, stopped or not).
2025-11-14 14:57:12 +01:00
Robert Schmidt
de8d0991ec Remove services to be undeployed from XML files
In all these cases, the intention is to undeploy all services.
Correspondingly, remove the services from the XML to avoid any
ambiguity.
2025-11-14 14:57:12 +01:00
Robert Schmidt
ddcb216a35 Improve logging in CI Undeploy/DeployObject()
Consistently print requested services (if applicable)
and outcome of the step.
2025-11-14 14:57:12 +01:00
Robert Schmidt
247e908b6e Simplify UndeployObject() and GetDeployedObjects()
GetRunningServices() was returning all services, running or stopped.
Hence, rename to reflect what this function does, and rewrite slightly
to better capture what is actually happening. Also, don't return the
container ID, as we don't use it.

Call stop on all services, as we will down the deployment right after.
The list of services is still used to retrieve logs.

Remove a stray "return False", which would sometimes prevent us from
seeing all error messages.
2025-11-14 14:57:11 +01:00
Jaroslava Fiedlerova
603fc23113 Merge remote-tracking branch 'origin/ue-fixes' into integration_2025_w46 (!3745)
Collection of small fixes

A few fixes needed while testing FHI libraries
- set subcarrier spacing in PUSCH PDU in NRUE
- a set of two LOG_Ds that prints out the PUSCH allocation on gNB & UE
2025-11-14 12:34:59 +01:00
Jaroslava Fiedlerova
3a1d8afd3b Merge remote-tracking branch 'Rakesh_B_B/develop' into integration_2025_w46 (!3722)
[NGAP] Fix incorrect AMF Set ID type (uint8 → uint16) causing AMF lookup failure

This PR fixes issue #1012 , a data type issue related to the AMF Set ID used
during UE RRC reestablishment. The AMF Set ID was mistakenly declared as uint8_t
instead of uint16_t, even though it is a 10-bit field as specified in 3GPP TS
23.003 section 2.10.1. As a result, AMF Set IDs greater than 255 were truncated,
leading to failed AMF lookups and the following warning: No matching AMF found
for PLMN (MCC=%03d MNC=%0*d) and AMF SetID=%u.
Verified reestablishment succeeds with AMF Set IDs >255.
2025-11-14 12:29:19 +01:00
Robert Schmidt
8d2a5c6fd6 First slot indication makes no sense: tx thread should trigger 2025-11-14 12:25:05 +01:00
Robert Schmidt
2be5ff361f Don't use msgTx inside nr_dlsch_encoding() and nr_generate_pdsch()
A later commit will remove "msgTx" altogether. Push it out from L1
functions.
2025-11-14 12:25:05 +01:00
Robert Schmidt
751cab3d89 Simplify DLSCH: only one codeword supported 2025-11-14 12:25:05 +01:00
Robert Schmidt
2b2b3cd347 Simplify gNB DLSCH type
DLSCH encoding is not concerned with HARQ processes directly. Instead,
it gets the redundancy version and encodes a specific redundancy version
for a given TB. The rest is up to the MAC, the L1 is stateless in that
regard. Hence, remove the HARQ type and put it into DLSCH, which also
simplifies the code elsewhere.
2025-11-14 12:25:05 +01:00
Robert Schmidt
09e0344b5b Remove unused computation
unav_res is already computed in nr_generate_pdsch(), and then used
inside of nr_dlsch_encoding() right after.
2025-11-14 12:25:05 +01:00
Robert Schmidt
c06033697c Remove unused or write-only variables 2025-11-14 12:25:05 +01:00
Robert Schmidt
62333cd3cf Refactor csi-rs handling
Similarly to the parent commit, simplify the array type to the FAPI PDU
towards further refactoring, and encapsulate the code in a function for
easier reuse in a later refactoring step.

Note on ZP-CSI: after this commit, we continue treating CSI PDUs. The
prior code was returning, which I think is wrong (as this information is
only for the currently treated CSI-RS PDU).
2025-11-14 12:25:05 +01:00
Robert Schmidt
d0f4997aa0 Remove msgTx->ssb and replace with normal array
There is no point in tracking the "active" state: the SSB PDU will be
sent from MAC to L1, encoded, and then "discarded" (by marking the
number of SSB PDUs as 0). Hence, remove this intermediate type.
2025-11-14 12:25:05 +01:00
Robert Schmidt
bae9e0f1e8 Rewrite nr_generate_dci_top() without msgTx and shorter 2025-11-14 12:25:05 +01:00
alexjiao
19301afcb1 Fix bug for SRS generation when freqDomainShift (n_shift) is not 0
According to TS 38.211 section 6.4.1.4.3, the frequency domain shift value n_shift
is from higher-layer parameter freqDomainShift.
The quantity n_RRC is given by higher-layer parameter freqDomainPosition.
Also corrected k_0_overbar_p calculation formula to align with standard.
2025-11-14 19:21:19 +08:00
Guido Casati
228ca89f3e Fix GTP-U TEID logging: prevent negative values and use hexadecimal format
Problem:
- GTP-U logs showed negative TEID values (e.g., -1943516315) due to signed/unsigned
conversion. Due to wrong conversion from uint32_t to int and overflow caused negative values.
- TEID values were inconsistently formatted across different log statements, due to
mixed use of %d, %u, %x formats for TEID logging. Made debugging and troubleshooting difficult

Changes:
1. Fixed signed/unsigned conversion bug: use teid_t. Prevents overflow when TEID values exceed int range.
2. Standardized TEID logging format: all TEID values now use '0x%x' hexadecimal format.
   Consistent 'TEID' capitalization throughout
2025-11-14 11:18:20 +01:00
Guido Casati
c5b21d42a4 OAI UE: set RLC entity status to false when releasing entity in nr_rrc_manage_rlc_bearers
The previously introduced function rrc_release_rlc_entity has been
adopted to deactvate the RLC entities after release.
2025-11-14 11:18:20 +01:00
Guido Casati
3445d3bb12 OAI UE: add reusable function to release RLC entity 2025-11-14 11:18:20 +01:00
Jaroslava Fiedlerova
de744ddf35 Enable 2 layers and increase tested UL throughput in Aerial UL heavy test 2025-11-13 20:46:06 +00:00
Guido Casati
1f313db051 RRC: add only DRBs to add/mod in createDRBlist
Do not add PDU Session with status higher than PDU_SESSION_STATUS_TOMODIFY
which means, do not add "failed" or "to release" PDU Sessions.
2025-11-13 21:40:14 +01:00
Guido Casati
be9e798749 E1AP: Add PDU Session Resource To Remove List to Bearer Context Modification enc/dec
According to TS 38.463 - clause 9.2.2.4 and 9.3.3.12.
Also, fix response message by encoding choice IE only
with presence of modified PDU sessions.

Co-authored-by: rmagueta <rmagueta@allbesmart.pt>
2025-11-13 21:40:09 +01:00
Robert Schmidt
34aa69828a Harmonize UL PDCCH PDU type for further refactoring
Both (DL) PDCCH and UL PDCCH PDU types are fundamentally of the same
type, so correct the array's type to facilitate refactoring later (a
later commit will reuse a single "generate DCI" function for both
cases).
2025-11-13 19:41:11 +01:00
Robert Schmidt
4b91022387 Pass read-only parameters as const 2025-11-13 19:41:11 +01:00
Robert Schmidt
8cf7dd8607 CI: use intermediate variable for YAML file
This harmonizes with DeployObject() (which uses the same variable) and
shortens some lines for readability.
2025-11-13 14:33:35 +01:00
Jaroslava Fiedlerova
122bda995e Merge remote-tracking branch 'origin/fix_mac_ta_with_meas_gaps' into integration_2025_w46 (!3753)
gNB: fix MAC TA command scheduling if measurement gaps are configured

In the current implementation, if UE transmission is interrupted via
nr_mac_interrupt_ue_transmission(), UE_sched_ctrl.ta_frame is modified to be
the previous frame avoiding TA scheduling in the measurement gap. So the next
scheduled TA is shifted to be in 99 frames. As there are other measurement gaps
before that, the scheduled TA is always shifted, but actually never reached,
effectively disabling the MAC TA commands.

To fix this, UE_sched_ctrl.ta_frame is changed to not indicate the last TA
command transmission, but the next one. This allows to check in
nr_mac_interrupt_ue_transmission() if the next TA command transmission is within
the measurement gap and if so shift it to just after that gap.
2025-11-13 14:17:55 +01:00
Jaroslava Fiedlerova
80ff56c6c7 Merge remote-tracking branch 'origin/dci_alt_size_fix' into integration_2025_w46 (!3729)
DCI 00 alt size fix

DCI size for format 00 and 10 should be equal so we need to compute the size of
the alternative format when computing the size of DCIX0. There was a bug where
the alt_size input (0 in that case) was taken into account also when computing
that alternative size, resulting in an alt_size of 0. Possibly easier to
understand by looking at the code then reading this description.
2025-11-13 14:16:40 +01:00
Teodora
b6bda6d974 RIC IP address within fr_args_t struct is not const anymore
Related FlexRIC commit ID: fd26e7474d
2025-11-13 11:58:11 +01:00
Teodora
e96cfbd88a Update the FlexRIC submodule
Needed notably due to https://gitlab.eurecom.fr/mosaic5g/flexric/-/merge_requests/68.
2025-11-13 11:58:11 +01:00
Teodora
f88b93d147 Use the correct unit for PDCP SDU volume: [Mb] instead of [kb] 2025-11-13 11:58:11 +01:00
Teodora
d0a582e73d Implement E2 node level stats
For now, only DL/UL MAC stats.

This commit fixes the "RRU.PrbTotDl" and "RRU.PrbTotUl" measurement calculation
to align with the TS 28.552 specifications.
2025-11-13 11:58:11 +01:00
Robert Schmidt
021b546cf3 Add UL mac stats and create a common struct for both DL and UL
DL stats (aggregated total and used PRBs) previosuly used only for O1 interface,
now finds the purpose for E2 interface as well.

New UL stats (aggregated total and used PRBs) serve for E2 interface only.

Co-authored-by: Teodora Vladić <teodora.vladic@openairinterface.org>
2025-11-13 11:58:09 +01:00
Robert Schmidt
17ee9db072 MAC: total_prb_aggregate: collect over carrierBandwidth 2025-11-13 11:57:12 +01:00
Jaroslava Fiedlerova
0954c3f6cf Merge remote-tracking branch 'origin/sdap-header-bugfix' into integration_2025_w46 (!3747)
SDAP: guard RX header parsing with enable_sdap and init per-entity

!3519 (merged) refactored the SDAP to use the QFI from the header rather than
pass it to the rx function and got rid of the initialization of QFI to -1.

However, entity roles are stored into the drb2qfi table, and the indexing
implies that the QFI is known.

While in TX it is not an issue since packets are forwarded based on the QFI,
in RX the QFI can only be parsed from the header, therefore if headers are
disabled (--enable_sdap) the QFI is not there and it is wrong to access the
header (buf[0]) and looking for it.

This commit adds enable_sdap to nr_sdap_entity_t and initialize it in
nr_sdap_add_entity() from sdap->role (disabled when NO_SDAP_HEADER).

In nr_sdap_rx_entity(), only parse buf[0] for QFI and derive sdap_ul_rx/
sdap_dl_rx when enable_sdap is true; otherwise, keep offset=0 and forward
payload unchanged.
2025-11-12 21:56:22 +01:00
Jaroslava Fiedlerova
0d106428eb Merge remote-tracking branch 'origin/nr_fix_duplex' into integration_2025_w46 (!3666)
NTN: Fixing variable ULDLduplex issue for NTN bands

- Duplex is assumed to be static but for NTN bands (and also for some non NTN
  bands), it is not static.
- Tx-RX Duplex is defined in section 5.4.4 of 38.101-5 (for NTN) specs v1809
- For example: In NTN-OTA testing, the GEO satellite operator configured in
  band 256 the DL, UL frequencies with duplex of 185Mhz.
2025-11-12 21:54:54 +01:00
Robert Schmidt
383c94311e Pass big struct through pointer 2025-11-12 15:38:22 +01:00
Robert Schmidt
27203c9504 Remove useless function definitions
Unused code
2025-11-12 15:38:20 +01:00
Robert Schmidt
6471d91e2a Correct PNF config: sl_ahead to 2
Using nFAPI introduces additional delays. At the same time, RFsim does
not run in real-time, and we can allow a low sl_ahead, as RFsim will
"wait" for the gNB.

Therefore, reduce sl_ahead to ensure that the response window does not
run out during handling of RA in nFAPI.
2025-11-12 15:16:48 +01:00
Reem Bahsoun
4cc6275a7d Update XML file to increase tested DL and UL throughput for CI. 2025-11-12 14:46:22 +01:00
Jaroslava Fiedlerova
afa55ff951 Merge remote-tracking branch 'origin/fix_nr_ue_ssb_sinr_reporting' into integration_2025_w46 (!3754)
NR UE: correctly provide measured SSB SINR value from PHY to MAC

Fixes: e5ea77f6
2025-11-12 12:40:41 +01:00
Reem Bahsoun
561fbf5636 Modify aerial config file to improve UL throughput when using 2L layer. 2025-11-12 10:29:49 +01:00
Thomas Schlichter
4057cdaa80 NR UE: correctly provide measured SSB SINR value from PHY to MAC
Fixes: e5ea77f629
2025-11-11 15:23:27 +01:00
Thomas Schlichter
8124203481 gNB: fix MAC TA command scheduling if measurement gaps are configured
In the current implementation, if UE transmission is interrupted via nr_mac_interrupt_ue_transmission(),
UE_sched_ctrl.ta_frame is modified to be the previous frame avoiding TA scheduling in the measurement gap.
So the next scheduled TA is shifted to be in 99 frames. As there are other measurement gaps before that,
the scheduled TA is always shifted, but actually never reached, effectively disabling the MAC TA commands.

To fix this, UE_sched_ctrl.ta_frame is changed to not indicate the last TA command transmission, but the
next one. This allows to check in nr_mac_interrupt_ue_transmission() if the next TA command transmission
is within the measurement gap and if so shift it to just after that gap.
2025-11-11 15:20:18 +01:00
Nada Bouknana
1d235ce6fa modify the default imscope docking layout from imgui.ini 2025-11-11 14:38:30 +01:00
Nada Bouknana
05570bb8d8 move global scope settings to a menu item 2025-11-11 14:06:31 +01:00
Nada Bouknana
530812ff38 add ImPlotAxisFlags_AutoFit flag to enable autofitting by default in imscope plots 2025-11-11 14:04:33 +01:00
Nada Bouknana
f9ca8431c0 add PDCCH IQ and LLR plots to the UE scope 2025-11-11 13:58:43 +01:00
francescomani
c47ddc570f add check for CellGroup decoding at RRC UE (issue #1024) 2025-11-08 14:34:41 +01:00
Guido Casati
7274e7c434 SDAP: guard RX header parsing with enable_sdap and init per-entity
!3519 refactored the SDAP to use the QFI from the header rather
than pass it to the rx function and got rid of the initialization
of QFI to -1.
However, entity roles are stored into the drb2qfi table, and the
indexing implies that the QFI is known. While in TX it is not an
issue since packets are forwarded based on the QFI, in RX the QFI
can only be parsed from the heaedr, therefore if headers are
disabled (--enable_sdap) the QFI is not there and it is wrong to
access the header (`buf[0]`) and looking for it.

This commit adds `enable_sdap` to `nr_sdap_entity_t` and initialize
it in `nr_sdap_add_entity()` from `sdap->role`
(disabled when `NO_SDAP_HEADER`). In `nr_sdap_rx_entity()`, only
parse `buf[0]` for QFI and derive `sdap_ul_rx`/`sdap_dl_rx` when
`enable_sdap` is true; otherwise, keep `offset=0` and forward
payload unchanged.
2025-11-06 19:33:46 +01:00
Jaroslava Fiedlerova
8186e840a3 Merge branch 'integration_2025_w45' into 'develop'
Integration `2025.w45`

* !3736 fix bugs in scope for pdcch, and optimize cpu cost of pdcch decoding
* !3743 NR UE: fix PDCCH LLR indexing for different search space RB sizes
* !3739 Bugfix: save old tunnel info to remain the user plane connection while rolling back to source DU due to handover failure
* !3742 Simplify node management in CI, handle SIGINT
* !3670 PRS bug fix and CI Integration
* !3746 Fix unsigned to signed decoding parameters to allow for 'no affinity'/'no pin' threads to CPUs
* !3738 CI: Add new Jenkinsfiles

Closes #984 and #1021

See merge request oai/openairinterface5g!3744
2025-11-06 16:12:28 +00:00
Jaroslava Fiedlerova
4b8889b95c Merge remote-tracking branch 'origin/ci-add-jenkinsfiles' into integration_2025_w45 (!3738)
CI: Add unified Jenkinsfile for all test pipelines

This MR introduces a single Jenkinsfile to cover all current CI test pipelines
Improvements:
- correct reporting of the start timestamp in the HTML report
- harmonize log collection - always collect as test_logs_${env.BUILD_ID}.zip
2025-11-06 15:32:58 +01:00
Jaroslava Fiedlerova
95e9f4a47c Use a single Jenkinsfile
Combine Jenkinsfile and Jenkinsfile-oc from parrent commit into a single
file.
2025-11-06 13:21:08 +01:00
Jaroslava Fiedlerova
7a233de745 Merge remote-tracking branch 'origin/Fix_thread_affinity' into integration_2025_w45 (!3746)
Fix unsigned to signed decoding parameters to allow for 'no affinity'/'no pin'
threads to CPUs

By default, 'L1_rx_thread_core', 'L1_tx_thread_core', 'ru_thread_core' are set
to '-1' but the values were decoded from config file as unsigned instead of
signed types, thus, it was not allowing to set them with '-1' from config file.
2025-11-06 13:14:03 +01:00
Laurent THOMAS
3f27ae26ae C code cleaning, no change 2025-11-06 12:51:50 +01:00
Jaroslava Fiedlerova
50e32cfea5 Merge remote-tracking branch 'origin/prs_bug_fix_and_integrate_to_ci' into integration_2025_w45 (!3670)
PRS bug fix and CI Integration

- Fix the bug in PRS channel estimation while copying memory to compute the
  impulse response
- Integrate PRS testing to CI
2025-11-06 09:36:03 +01:00
Jaroslava Fiedlerova
654e819d90 Merge remote-tracking branch 'origin/cleanup-ci-node' into integration_2025_w45 (!3742)
Simplify node management in CI, handle SIGINT

- Make a single <node> XML step entry common to all XML steps to harmonize code
- Handle SIGINT to make it possible to more easily stop the CI script.
2025-11-06 09:33:04 +01:00
Jaroslava Fiedlerova
5b2b570dfe Merge remote-tracking branch 'origin/fix-up-ho-fail' into integration_2025_w45 (!3739)
Bugfix: save old tunnel info to remain the user plane connection while rolling
back to source DU due to handover failure

This MR closes issue #984 that UE lost the data plane connection while rolling
back to the source DU due to handover failure.
2025-11-06 09:32:21 +01:00
Jaroslava Fiedlerova
89fbe3c783 Merge remote-tracking branch 'origin/issue-1021' into integration_2025_w45 (!3743)
NR UE: fix PDCCH LLR indexing for different search space RB sizes

After !3603 (merged), when multiple search spaces have different CORESET
configurations (different number of RBs), the LLR buffer stride must be
calculated based on the maximum RB size across all search spaces, not the
current search space's RB size.

The LLR buffer is allocated with size based on get_pdcch_max_rbs(), but the
demapping function was using coreset_nbr_rb (current search space) for symbol
stride calculation, causing incorrect LLR extraction when search spaces have
different RB configurations.

This MR tries to fix it.

Closes #1021
2025-11-06 09:29:54 +01:00
Bartosz Podrygajlo
ac93fe590c Fix NR UE MAC not setting subcarrier_spacing field in PUSCH PDU
Set the subcarrier_spacing field in nfapi_nr_ue_pusch_pdu_t from MAC
to PHY. This has no consequence for the NR UE Softmodem operation as this
field is never read, but prevents a potential future bug in case L1 was
modified to read it.
2025-11-06 07:42:47 +01:00
luis_pereira87
cf507115e4 Fix unsigned to signed decoding parameters to allow for 'no affinity'/'no pin' threads to CPUs
By default, 'L1_rx_thread_core', 'L1_tx_thread_core', 'ru_thread_core' are set to '-1' but the values were decoded from config file as unsigned instead of signed types, thus, it was not allowing to set them with '-1' from config file
2025-11-05 20:51:02 +00:00
Bartosz Podrygajlo
d2c191b0ea Add two LOG_Ds to debug PUSCH allocations 2025-11-05 16:34:21 +01:00
Laurent THOMAS
db09f50ae4 phy_procedures_gNB_uespec_RX is too long function with too long lines of code, this commit only shorten lines and improve a bit the readability 2025-11-05 12:03:17 +01:00
Robert Schmidt
d4aac07ae9 Remove write-only code 2025-11-05 11:13:31 +01:00
Jaroslava Fiedlerova
c625a95042 CI: add rfsim test with PRS
Use the bash script from a parent commit to verify PRS functionality.
2025-11-05 10:42:37 +01:00
Rakesh Mundlamuri
871b813c12 Modify the script with a retry logic for a failed test and print summary
This commit inputs several distances at once and obtain the summary of
successful and failed tests. We look for the number of successful tests
that are geater than 0. We do that here since we sometimes dont receive
a response for a telnet command from the rfsim although the command
is applied. This is related to the queing telnet commands in the rfsim.

The script for the distances 50, 100 and 150 are called as follows,

./set-and-verify-distance-prs.sh 50 100 150

The summary can be viewed as follows,
==================== SUMMARY ====================
Total tests run : 3
Successful tests: 3
Failed tests    : 0
=================================================
2025-11-05 10:42:37 +01:00
Jaroslava Fiedlerova
0d2212ca38 CI: Extend Custom_Script to accept arguments 2025-11-05 10:42:37 +01:00
rakesh mundlamuri
1dca20ba85 Introduce a bash script to test PRS using estimated ToA
Set RFsim (DL) distance and use PRS to estimate the new distance. This
is verified by comparing the distance set in RFsim with the distance
reported through ToA estimation at the UE.

Note that since RFsim telnet output is asynchronous (it uses a queue
internally), we use grep --max-count 1 to wait for the matching line,
together with ncat --idle 0.3 to keep ncat open for some time. The
--max-count option will terminate grep after the first occurrence. For
this to work reliably, we need to use grep <(echo | ncat) as opposod to
simply echo | ncat | grep, as the latter does not seem to reliably
make grep exit after the occurrence.

Co-authored-by: Robert Schmidt <robert.schmidt@openairinterface.org>
2025-11-05 10:42:37 +01:00
Robert Schmidt
34e002a800 Add get_max_dl_toa() for ciUE telnet module 2025-11-05 10:42:37 +01:00
Robert Schmidt
d682b6c512 Add function to read max DL ToA
Protect with mutex to allow reading from another thread.
2025-11-05 10:42:37 +01:00
Robert Schmidt
b95b4c09d6 Write DL ToA into circular buffer
In a future commit, we will look up the maximum ToA over the last
transmissions. Introduce a buffer in which we write the last
16 measurements.
2025-11-05 10:42:34 +01:00
Jaroslava Fiedlerova
c54b20a56d Merge remote-tracking branch 'origin/bug-scope-pdcch' into integration_2025_w45 (!3736)
fix bugs in scope for pdcch, and optimize cpu cost of pdcch decoding

fix bugs in scope for pdcch, and optimize cpu cost of pdcch decoding by not
processing useless samples in one symbol
2025-11-05 09:13:52 +01:00
alexjiao
7655604d3c NR UE: fix PDCCH LLR indexing for different search space RB sizes
When multiple search spaces have different CORESET configurations
(different number of RBs), the LLR buffer stride must be calculated
based on the maximum RB size across all search spaces, not the
current search space's RB size.

The LLR buffer is allocated with size based on get_pdcch_max_rbs(),
but the demapping function was using coreset_nbr_rb (current search
space) for symbol stride calculation, causing incorrect LLR extraction
when search spaces have different RB configurations.
2025-11-05 00:46:31 +08:00
Chieh-Chun Chen
579d263a9c Bugfix: save old tunnel info to remain the user plane connection while rolling back to source DU due to F1 handover failure 2025-11-04 16:03:41 +01:00
Robert Schmidt
f7eaafa835 CI test runner: handle SIGINT
Handle SIGINT and mark any subsequent steps as failed. Receiving SIGINT
a second time will abort the script immediately (as is the case before
this commit).

Note that Python seems to relay the signal to the "controlled" process
(e.g., Ping), which would return immediately with an error. So some
steps like Ping will abort immediately, others (e.g., IdleSleep) will
finish their step, and then the present logic will mark subsequent steps
as failed.
2025-11-04 00:14:27 +01:00
Laurent THOMAS
ab14e3ad22 move all antennas comon code of begining of nr_pdcch_channel_estimation to prepare the future move of the antenna loop above the serial call of functions to decode pdcch 2025-11-03 20:33:20 +01:00
Laurent THOMAS
f982d9b5df rename a function to what it does (it generate a reference signal) and minor readability changes 2025-11-03 20:24:37 +01:00
Laurent THOMAS
032fc5e9c2 fix bugs in scope for pdcch, and optimize cpu cost of pdcch decoding by not processing useless samples in one symbol 2025-11-03 20:16:41 +01:00
Robert Schmidt
19c6d20b45 Bugfix: "or None" is useless
"or None" would assign if the first term is false-y. But not specifying
it would already lead to the variable being set to None.
2025-11-03 18:53:00 +01:00
Robert Schmidt
b0106f27b5 Centralize node for all XML steps
All XML steps take a single node. We can thus "centralize" reading this
parameter in the main loop and pass it to ExecuteActionWithParam().
2025-11-03 18:48:55 +01:00
Robert Schmidt
9e0540fbed Simplify node management in CI
Some CI tasks/commands like Iperf(), Ping() get multiple nodes (via XML
parameter "nodes") to potentially run UEs on different nodes (hosts) at
the same time. However, I argue that this is not good:

- we don't actually use this -- where we specify multiple UEs, it's
  always "localhost localhost..."
- it is inconsistent, as we typically have a single "node", not nodes,
  and there is a possibility to harmonize (see also next commit)
- if we needed it, there would be better ways to achieve the same.
  First, for hardware-based UEs, the ci_infra.yaml can specify different
  UEs. For simulated UEs, it would be feasible to have multiple XML
  steps run in parallel, e.g., in the XML <parallel> tag, which would
  clarify that multiple UEs on different hosts run in parallel
- it reduces code.

Hence, make a single <node> for these XML steps.
2025-11-03 18:46:32 +01:00
Robert Schmidt
a5689f5b8c CI: Remove unused code 2025-11-03 18:46:00 +01:00
Jaroslava Fiedlerova
b8e249fc4a CI: Add new Jenkinsfiles
Created Jenkinsfiles:
- Jenkinsfile: for stadard test pipelines
- Jenkinsfile-oc: for deployments with OC

These 2 Jenkinsfiles covers all current test pipelines.
2025-11-03 14:01:44 +01:00
Robert Schmidt
a72abe3cc8 Refactor dl_toa setting to separate function 2025-11-03 16:50:27 +05:30
rakesh mundlamuri
825c6803ad harmonize IQ samples in prs channel estimation to use c16_t 2025-11-03 16:50:27 +05:30
rakesh mundlamuri
5690aa0fe3 first_half index correction in PRS channel estimation while copying memory
Previously, we were using int16_t for the variable ch_tmp which was later harmonized to use c16_t while leaving <<1. This introduced the bug while accessing the address of the element at first_half of the ch_tmp variable.
2025-11-03 16:50:27 +05:30
Jaroslava Fiedlerova
f9b4fe6a94 Merge branch 'integration_2025_w44' into 'develop'
Integration `2025.w44`

* !3721 improvements in formatting and LOGs in DMRS common functions at MAC
* !3725 Handle GTP receiver errors, fix memory leaks, add CU-UP test
* !3726 fix for CSI payload sizes in PUCCH structure at UE
* CI: Adjust attenutation for HO setup
* !3728 Fix for scenario with no CSI report configured for CSI-RS
* !3731 CI: ensure clean iperf3 server startup
* !3592 Refactor PRACH handling at the gNB
* !3682 Refactor DLSCH scheduler
* !3733 Clarify whitespace
* !3706 Change registry name env var content

Closes #1015 and #1014

See merge request oai/openairinterface5g!3727
2025-10-31 15:55:42 +00:00
Jaroslava Fiedlerova
5a6d253863 Merge remote-tracking branch 'origin/changeRegName' into integration_2025_w44 (!3706)
Change registry name env var content

Currently setting REGISTRY="" in a .env file results in docker failing to find
/image-name:tag. This corrects that, so it looks for local images named
image-name:tag.
2025-10-31 16:07:34 +01:00
Jaroslava Fiedlerova
aff3c9872f CI: align REGISTRY env var with updated image path format
Following the change to use:
  image: ${REGISTRY-oaisoftwarealliance/}${GNB_IMG:-oai-gnb}:${TAG:-develop}
the REGISTRY variable must now include the trailing slash.
2025-10-31 15:20:34 +01:00
Nick Hedberg
e4812c3d8e Allow for null-string REGISTRY names 2025-10-31 15:20:20 +01:00
Robert Schmidt
d4045fd87d Merge remote-tracking branch 'origin/clarifiyWhitespace' into integration_2025_w44 (!3727)
Clarify whitespace
2025-10-31 11:33:07 +01:00
Nick Hedberg
330c4fce5d Fix capitalization 2025-10-31 11:31:54 +01:00
Nick Hedberg
e6b307bf6e Indent correctly 2025-10-31 11:31:42 +01:00
Robert Schmidt
a8de9733e6 Merge remote-tracking branch 'origin/refactor-dlsch' into integration_2025_w44 (!3682)
Refactor DLSCH scheduler

Refactor the DLSCH post processor similarly to what has been done in
!3521  with the goal of saving an additional iteration through all UEs,
hopefully making the DLSCH scheduler faster.

It further includes changes to make working with and debugging multi-UE
operation easier:

- add some measurements in L1 (for total TX/RX time)
- a new option MACRLCs.[0].stats_max_ue to limit the number of UEs in
  the periodic output (default: 8, 0=disable)
- avoid stack overflow in the MAC
- fix the writing of stats to nrMAC_stats.log and nrL1_stats.log when
  the written output reduces by truncating the files
- avoid to schedule retransmission with 0 RBs.
2025-10-30 23:14:08 +01:00
Robert Schmidt
9449f777cc Remove TBS table and recompute on demand 2025-10-30 23:13:53 +01:00
Robert Schmidt
916455f027 Move update_dlsch_buffer() into pf_dl()
This slightly speeds up the scheduler (it e.g., does not need to check
for UEs that have retransmissions), and harmonizes with pf_ul(), which
evaluates (UL) BSR at a similar place within the scheduler.
2025-10-30 23:13:53 +01:00
Robert Schmidt
24399eac2d update_dlsch_buffer() for individual UEs 2025-10-30 23:13:53 +01:00
Robert Schmidt
27a022d6f8 Fix: avoid retransmission with 0 RBs
Check and return, if necessary, that we have enough resources to make
retransmissions. Without, we can asserts in L1, such as

    Assertion (NPRB>0 && (NPRB + RBstart <= BWPsize)) failed!
    In PRBalloc_to_locationandbandwidth0() openairinterface5g/common/utils/nr/nr_common.c:506
    Illegal NPRB/RBstart Configuration (0,51) for BWPsize 51

which indicates that the scheduler requested a transmission with 0 PRBs,
which does not make sense.
2025-10-30 23:13:46 +01:00
Robert Schmidt
1fd3c284f1 Merge remote-tracking branch 'origin/rework-gnb-prach-mem-management' into integration_2025_w44 (!3592)
Refactor PRACH handling at the gNB

- Remove race conditions by correctly setting mutexes
- Fix a bug when having multiple RACH occasions
- Reduce memory footprint by removing global memory, which should also
  fix potential memory data races in FHI 7.2
- Additional fixes, see commit messages
2025-10-30 23:12:09 +01:00
Laurent THOMAS
9ce9c16e36 Add documentation on PRACH processing 2025-10-30 23:01:06 +01:00
Laurent THOMAS
d8d1520580 reduce sl_ahead to catch the RACH Msg1 in time in 24PRB test
a bit difficult to understand: sl_ahead=6 => we systematically miss the
rach detection in the scheduler because the scheduler runs more than 6
slots ahead the rx slot processing (here > 11 slots because 6 (DL and UL
slots) + 4 (RU_RX_SLOT_DEPTH, so UL only))

so, reducing sl_ahead works better than large sl_ahead because the idea
behind is: the scheduler of slot+sl_ahead will never create work to do
in a UL slot before slot+sl_ahead+X (as minimum k2 is X, in the 24PRB CI
test: 6)
2025-10-30 23:01:06 +01:00
Laurent THOMAS
0d083d83fc Simplify code through lookup of PDU name, delete commented code 2025-10-30 23:01:06 +01:00
Laurent THOMAS
80223d36d5 Rename nr_fill_prach to nr_schedule_rx_prach() 2025-10-30 23:01:06 +01:00
Laurent THOMAS
1292cd68b7 Remove the usage of global mem for rach rx process
saves about 600MB of memory allocation

Move the definition of PRACH items and the PRACH list to the
defs_nr_commons.h file.

Do not re-write the entire structure in nr_schedule_rx_prach(), as it is
quite large now.
2025-10-30 23:01:06 +01:00
Robert Schmidt
67ba4f6741 evaluate_cqi_report(): Add LOG_D for reported CQI 2025-10-30 19:14:07 +01:00
Robert Schmidt
924f28ed70 Refactor to call post-processor in place
Call the post-processor when the allocation is "fixed" (i.e., nothing
changes anymore), instead of having a final loop across all UEs that
might potentially be costly.

In order to calculate the PF metric, note that the statistics "reset" is
moved into pf_dl() instead of the post-processing loop, as it has to be
done on each slot.

See also: dd98030202 ("Refactor to call post-processor in place")
2025-10-30 19:14:06 +01:00
Robert Schmidt
4eb43f2c45 nr_dlsim_preprocessor(): Refactor NR_sched_pdsch usage
Similarly to parent commit(s), assign sched_pdsch in a single place
instead of relying on sched_ctrl. In a follow-up commit, the
post-processor will be called in a single place.
2025-10-30 19:14:06 +01:00
Robert Schmidt
1900edb56d schedule_control_sib1(): Refactor NR_sched_pdsch usage
Similarly to parent commit(s), refactor the use of NR_sched_pdsch.
Instead of using nr_mac->sched_ctrlCommon, put the NR_sched_pdsch_t on
the stack.

This also refactors update_rb_mcs_tbs() to update the existing
NR_sched_pdsch instead of updating individual fields.

This also reduces the extend to which sched_ctrlCommon is used.
2025-10-30 19:14:06 +01:00
Robert Schmidt
8205503496 nr_preprocessor_phytest(): Refactor NR_sched_pdsch usage
As in parent commit(s).
2025-10-30 19:14:06 +01:00
Robert Schmidt
d4dc044d2d pf_dl(): refactor NR_pdsch_sched usage
As in parent commit.
2025-10-30 19:14:06 +01:00
Robert Schmidt
2daa1dac18 allocate_dl_retransmission(): refactor NR_sched_pdsch usage
Assign NR_sched_pdsch to sched_ctrl->sched_pdsch in one place, where the
post-processing functionality will be called in a follow-up commit. This
should result in no functional change.
2025-10-30 19:14:06 +01:00
Robert Schmidt
761a70d199 Remove use of curInfo in allocate_dl_retransmission()
It seems to be assumed that curInfo actually has the currently active
number of layers/PMI. However, I am not sure this would always be true
(e.g., UE might not have been scheduled for some slots, but number of
layers decreased as reported by CSI).  Instead, recalculate the info
from scratch when necessary.
2025-10-30 19:14:06 +01:00
Robert Schmidt
a6d16a66d2 Reduce scope of NR_sched_pdsch in first DL sched loop
We don't need NR_sched_pdsch here. Remove the use of it.
2025-10-30 19:14:06 +01:00
Robert Schmidt
1622724384 Store selected MCS in UE iterator
PF uses MCS and average throughput to decide which UE to schedule. Thus,
the first loop decides on MCS, whereas the second does the "main UE
allocation" after sorting by the PF metric.

A follow-up commit will remove sched_pusch from NR_UE_sched_ctrl_t.
Thus, we cannot rely on sched_ctrl to store the MCS in the first loop,
and look it up from there in the second. Instead, store it as part of
the UE iterator data, and take it from there.

See also: f3068caa37 ("Store selected MCS in UE iterator", for UL)
2025-10-30 19:14:06 +01:00
Robert Schmidt
1a752a8433 Remove unused/write-only code 2025-10-30 19:14:06 +01:00
Robert Schmidt
ce744fd24f Refactor DLSCH post processor into post_process_dlsch()
Introduce a struct with information on FAPI structures to save resource
and data allocation into. It's in nr_mac_gNB.h because the next commits
will reuse this for all preprocessors.
2025-10-30 19:14:06 +01:00
Robert Schmidt
2f636037ee Fixup: compute_PDU_length() 2025-10-30 19:14:06 +01:00
Robert Schmidt
09e1e6c6fd Rewrite NR_MAC UE_iterator() to limit variable scope
Especially in pf_dl()/pf_ul(), we use a first loop using
UE_iterator(), then iterate over a subset of UEs. It has happened a
couple of times that I was using variable "UE" (from the iterator), when
it should only be used in the first UE_iterator() loop.

Rewrite UE_iterator() to effectively limit the scope of the iterator
variables to the body of the UE_iterator. This should also make it
possible to reuse multiple UE_iterator()s with the same variables in
sequence.
2025-10-30 19:14:06 +01:00
Jaroslava Fiedlerova
773359851c Merge remote-tracking branch 'origin/ci-iperf3-fix' into integration_2025_w44 (!3731)
CI: ensure clean iperf3 server startup

- Resolves issue with iperf3 test failure in RFSim5G multiue test
- Minor fix of iperf3 test descriptions in RFSim5G pipeline
2025-10-30 17:51:46 +01:00
Jaroslava Fiedlerova
314ddcebdd Merge remote-tracking branch 'origin/nrUE_no_CSI_report' into integration_2025_w44 (!3728)
Fix for scenario with no CSI report configured for CSI-RS

After changes in !3714 (merged), if we select to measure RSRP on SSB and not
CSI-RS (default option) and there is a single antenna port (so no MIMO report
either) we won't schedule any CSI-RS measurements for the UE. In that case
ideally we shouldn't set do_CSIRS = 1  in configuration file but still the
option is possible. So the fix is to not perform any measurements at UE on
that CSI-RS but not asserting.

Closes #1015
2025-10-30 17:50:36 +01:00
Teodora
19bb463049 Properly free the memory
1. Create a free_ru_session_list() function to free the memory allocated for the connected RUs
before closing the nr-softmodem.
2. xmlReadMemory() and xmlNodeGetContent() were causing serious memory leakages,
and now all is properly freed using xmlFreeDoc() and xmlFree().
2025-10-30 17:22:40 +01:00
Teodora
163c8de371 Do not use ru_session_list on the stack
This struct is used in multiple source files.

Previously, when stopping the nr-softmodem, the ru_session_list "disappears"
and the M-plane wasn't terminated properly (num_rus = 0 even though DU connected to at least one RU).
2025-10-30 17:22:40 +01:00
Teodora
96b944e5c9 Update the FHI M-plane doc for v16.01 support 2025-10-30 17:22:40 +01:00
Teodora
0ad393f28e Update yang models to the O-RAN.WG4.MP-YANGs-R004-v16.01
It is backwards compatible with the O-RAN.WG4.MP-YANGs-v04.00, previous supported version.
2025-10-30 17:22:40 +01:00
Teodora
4233b89530 Handle MIMO mode
MIMO mode is defined by setting separate carriers to different antenna ports.

Benetel v1.2.2 does not support MIMO mode to be set via M-plane, and therefore
we only created one Tx and one Rx carrier.

Benetel v1.4.1 supports MIMO mode setting via M-plane.

Therefore, this commit introduces the adaptation based on the number of supported carriers by a DUT RU.
2025-10-30 17:22:40 +01:00
Teodora
d542021f86 Retrieve the hardware states if available
These 3 states: "oper-state", "admin-state", "availability-state" are optional,
but shall be checked in order to activate the carriers. If an O-RU doesn't support it,
we assume the expected values:
- "oper-state" = "enabled"
- "admin-state" = "unlocked"
- "availability-state" = "NORMAL"

Implement retrieval of the hardware states if O-RU supports, i.e. Benetel release v1.4.1.
2025-10-30 17:22:40 +01:00
Teodora
d4b5291c62 Facilitate RU notification initialization
Use X macros for carriers and synchronization states,
by mapping enum with the state values.
2025-10-30 17:22:40 +01:00
Teodora
ad6d7a2220 RHEL compilation
error: implicit declaration of function ‘realloc’
2025-10-30 17:22:40 +01:00
Teodora
a96d2d0118 Properly pass the arguments in ly_ctx_destroy() v1 function 2025-10-30 17:22:40 +01:00
Raghavendra Dinavahi
40fae6136c Added the check for non-NTN bands 2025-10-30 16:53:07 +01:00
Raghavendra Dinavahi
69f391f2b8 Fix for the ULDLduplex issue for NTN bands
Duplex is assumed to be static but for NTN bands, it is not static.
TxRX Duplex is defined in section 5.4.4 of 38.101-5 (for NTN) specs v1809
n256 190 MHz, 165 to 215 MHz
n255 -101.5 MHz, -72.5 to -130.5 MHz
n254 862 - 885 MHz
2025-10-30 15:34:00 +01:00
Jaroslava Fiedlerova
32889870b3 CI: Adjust attenutation for HO setup 2025-10-30 13:37:15 +01:00
Laurent THOMAS
fff95cc075 Refactor rx_nr_prach 2025-10-30 11:54:44 +01:00
Laurent THOMAS
d745e6fcd3 Make the decidated structure the PRACH decoding values contextual
The function rx_nr_prach become autonomous, it doesn't read anymore global variables
So, it can become (later) a threadpool work, that will send a message when it finishes
rx_nr_prach_ru() still use some global variables, but it is executed in sequence, inside the ru main loop, that limits the probability of race conditions
2025-10-30 11:54:43 +01:00
Laurent THOMAS
4f39ba8f51 create a trace group for nr rach 2025-10-30 11:54:41 +01:00
Laurent THOMAS
180f83d196 Refactor L1_nr_prach_procedures 2025-10-30 11:54:40 +01:00
Laurent THOMAS
d24e010367 simplify computation of ru->prach_rxsigF[prachOccasion][aa] 2025-10-30 11:54:36 +01:00
Laurent THOMAS
c48e0b1a32 merge variants of prach_item_t as this is the same in gNB and RU 2025-10-30 11:54:33 +01:00
Laurent THOMAS
d005336cb8 Simplify PRACH beam handling, remove race
Simplify by removing a small malloc and memcpy() the beams. This should
also remove the data race between ru and gNB/CU-DU
2025-10-30 11:54:30 +01:00
Laurent THOMAS
cffb07d798 remove permanent prach rxsigF in gNB and simplify the data structure 2025-10-30 11:54:22 +01:00
Laurent THOMAS
4dd340b6bb merge almost duplicated code for ru prach list and gNB prach list
(gNB is not the proper name, it is CU+DU, gNB is RU+CU+DU)
2025-10-30 11:54:21 +01:00
Laurent THOMAS
88cecd707b regroup similar lists for "ru" and "gNB" in a common definition
Merge the identical sizes. Use correct naming: it is a element of a
list, not a list
2025-10-30 11:54:20 +01:00
Laurent THOMAS
a4d3eb9fad replace fix array index by pointers for prach lists in gNB 2025-10-30 11:54:18 +01:00
Laurent THOMAS
f5c1d18638 Fix bug in "freeing" prach occasions scheduler after decoding first occasion
Release PRACH only after treating the entire PRACH slot/work. Also,
release only once, not on every decoding occasion.
2025-10-30 11:54:14 +01:00
Laurent THOMAS
a07c03e65f MAC: use pointers, rewrite FAPI PDU alloc 2025-10-30 11:54:13 +01:00
Laurent THOMAS
7d90d9b23e log: make input parameters const 2025-10-30 11:54:11 +01:00
Laurent THOMAS
f11361343c add management of nb tx antennas=0 in rfsimulator code
trace the error of 0 antennas, and avoid infinite loop of calls to read
0 bytes
2025-10-30 11:54:09 +01:00
Laurent THOMAS
9ddb8c0b9f Remove prach_ifft from premanent allocation
Allocate on the stack when necessary.
2025-10-30 11:54:01 +01:00
Laurent THOMAS
e54738c7e4 flush command line printf, it is called before log module initialisation 2025-10-30 11:53:57 +01:00
Laurent THOMAS
7157d4bcd1 add trace when the main NR UE thread ends and when NR UE sets oai_exit variable 2025-10-30 11:53:46 +01:00
Jaroslava Fiedlerova
9be94881a3 CI: correct testcase description in RFSim5G tests 2025-10-30 10:32:59 +00:00
Jaroslava Fiedlerova
3e23c796c9 CI: ensure clean iperf3 server startup by killing existing processes on same port
Before starting a new iperf3 server instance in CI tests, explicitly kill any existing
iperf3 processes bound to the same port. This prevents conflicts or failures caused by
leftover iperf3 servers from previous runs that did not terminate properly or on time.
The cleanup is performed using `pkill` before launching the new server.
2025-10-30 10:32:54 +00:00
Jaroslava Fiedlerova
2196fb918a Merge remote-tracking branch 'origin/issue1014' into integration_2025_w44 (!3726)
fix for CSI payload sizes in PUCCH structure at UE

Closes #1014
2025-10-30 10:43:27 +01:00
Jaroslava Fiedlerova
e9723149f4 Merge remote-tracking branch 'origin/gtp-e1-fix-errors-test' into integration_2025_w44 (!3725)
Handle GTP receiver errors, fix memory leaks, add CU-UP test

- Fix use-after-free bugs in GTP by properly stopping the receive thread(s)
- Fix a bug from !3519 (merged): QFI 0 is a valid QFI
- Fix multiple memory leaks in CU-UP, E1, CU-UP load tester, SCTP
- Add a (conservative) functional CU-UP test that verifies that the load tester
  and CU-UP work. Test only a low throughput, as it will run in parallel with
  other tests.
2025-10-30 10:41:47 +01:00
Robert Schmidt
eced5afdf7 Add CU-UP functional test to ctest
Use the CU-UP load tester to test the functionality of the CU-UP and
its loader tester. The requirements on this load test are intentionally
low, as it will be run with other unit tests in parallel, and should
still pass.

It uses an existing configuration file for the CU-UP. The test script
runs the CU-UP, runs the load tester, stops the CU-UP, and returns the
load tester return value as test result (which will be 0=success if all
packets have been received).
2025-10-30 08:04:39 +01:00
Robert Schmidt
e9bf6344b0 SCTP: fix a memory leak
call freeaddrinfo() before return'ing from the function.
2025-10-30 08:04:39 +01:00
Robert Schmidt
a2b127f643 CU-UP: fix direct memory leak
Note that this strdup has been intentioally created for debugging
purposes in core files.

See also: 1ab3b8dd8e ("add version signature in core files...")
2025-10-30 08:04:39 +01:00
Robert Schmidt
155ee5ad42 Fix direct memory leak on E1 message reception
Direct leak of 8 byte(s) in 1 object(s) allocated from:
        #0 0x7f7bc7ee68a3 in calloc (/lib64/libasan.so.8+0xe68a3) (BuildId: 10b8ccd49f75c21babf1d7abe51bb63589d8471f)
        #1 0x0000004abfa6 in calloc_or_fail /home/richie/oai/common/utils/utils.h:74
        #2 0x0000004abfa6 in decode_e1ap_cuup_setup_request /home/richie/oai/openair2/E1AP/lib/e1ap_interface_management.c:219
        #3 0x00000046a9f5 in e1apCUCP_handle_SETUP_REQUEST /home/richie/oai/openair2/E1AP/e1ap.c:187
        #4 0x000000470b35 in e1ap_handle_message /home/richie/oai/openair2/E1AP/e1ap.c:109
        #5 0x000000470b35 in e1_task_handle_sctp_data_ind /home/richie/oai/openair2/E1AP/e1ap.c:120
        #6 0x00000047717b in E1AP_CUCP_task /home/richie/oai/openair2/E1AP/e1ap.c:832
        #7 0x7f7bc7e28ee5 in asan_thread_start(void*) (/lib64/libasan.so.8+0x28ee5) (BuildId: 10b8ccd49f75c21babf1d7abe51bb63589d8471f)

    Direct leak of 8 byte(s) in 1 object(s) allocated from:
        #0 0x7f7bc7ee68a3 in calloc (/lib64/libasan.so.8+0xe68a3) (BuildId: 10b8ccd49f75c21babf1d7abe51bb63589d8471f)
        #1 0x0000004ac30c in calloc_or_fail /home/richie/oai/common/utils/utils.h:74
        #2 0x0000004ac30c in decode_e1ap_cuup_setup_request /home/richie/oai/openair2/E1AP/lib/e1ap_interface_management.c:194
        #3 0x00000046a9f5 in e1apCUCP_handle_SETUP_REQUEST /home/richie/oai/openair2/E1AP/e1ap.c:187
        #4 0x000000470b35 in e1ap_handle_message /home/richie/oai/openair2/E1AP/e1ap.c:109
        #5 0x000000470b35 in e1_task_handle_sctp_data_ind /home/richie/oai/openair2/E1AP/e1ap.c:120
        #6 0x00000047717b in E1AP_CUCP_task /home/richie/oai/openair2/E1AP/e1ap.c:832
        #7 0x7f7bc7e28ee5 in asan_thread_start(void*) (/lib64/libasan.so.8+0x28ee5) (BuildId: 10b8ccd49f75c21babf1d7abe51bb63589d8471f)
2025-10-30 08:04:39 +01:00
Robert Schmidt
eee9c4cf33 Fix two direct memory leaks of CU-UP tester
Direct leak of 100 byte(s) in 1 object(s) allocated from:
        #0 0x7f6585ee6f2b in malloc (/lib64/libasan.so.8+0xe6f2b) (BuildId: 10b8ccd49f75c21babf1d7abe51bb63589d8471f)
        #1 0x000000414a0d in malloc_or_fail /home/richie/oai/common/utils/utils.h:86
        #2 0x0000004061c9 in main /home/richie/oai/tests/nr-cuup/nr-cuup-load-test.c:544
        #3 0x7f6585211574 in __libc_start_call_main (/lib64/libc.so.6+0x3574) (BuildId: 48c4b9b1efb1df15da8e787f489128bf31893317)
        #4 0x7f6585211627 in __libc_start_main@GLIBC_2.2.5 (/lib64/libc.so.6+0x3627) (BuildId: 48c4b9b1efb1df15da8e787f489128bf31893317)
        #5 0x000000413034 in _start (/home/richie/oai/build/tests/nr-cuup/nr-cuup-load-test+0x413034) (BuildId: 8af0132792b03fa12ba95b5623865c9a8a5625a3)

    Direct leak of 100 byte(s) in 1 object(s) allocated from:
        #0 0x7f6585ee6f2b in malloc (/lib64/libasan.so.8+0xe6f2b) (BuildId: 10b8ccd49f75c21babf1d7abe51bb63589d8471f)
        #1 0x000000414a0d in malloc_or_fail /home/richie/oai/common/utils/utils.h:86
        #2 0x0000004061ff in main /home/richie/oai/tests/nr-cuup/nr-cuup-load-test.c:546
        #3 0x7f6585211574 in __libc_start_call_main (/lib64/libc.so.6+0x3574) (BuildId: 48c4b9b1efb1df15da8e787f489128bf31893317)
        #4 0x7f6585211627 in __libc_start_main@GLIBC_2.2.5 (/lib64/libc.so.6+0x3627) (BuildId: 48c4b9b1efb1df15da8e787f489128bf31893317)
        #5 0x000000413034 in _start (/home/richie/oai/build/tests/nr-cuup/nr-cuup-load-test+0x413034) (BuildId: 8af0132792b03fa12ba95b5623865c9a8a5625a3)
2025-10-30 08:04:39 +01:00
Robert Schmidt
459e20fe99 E1AP: correctly free entire PDU
Free memory including the "base pointer". Fix two places in which it was
on the stack to harmonize. The only stack variable is in reception of
new E1 messages (e1ap_handle_message()), which uses
ASN_STRUCT_FREE_CONTENTS_ONLY().

This fixes bugs similar to these logs:

    Direct leak of 40 byte(s) in 1 object(s) allocated from:
        #0 0x7f418f4e68a3 in calloc (/lib64/libasan.so.8+0xe68a3) (BuildId: 10b8ccd49f75c21babf1d7abe51bb63589d8471f)
        #1 0x00000049e367 in calloc_or_fail /home/richie/oai/common/utils/utils.h:74
        #2 0x00000049e367 in encode_e1_bearer_context_release_command /home/richie/oai/openair2/E1AP/lib/e1ap_bearer_context_management.c:1235
        #3 0x000000482951 in e1apCUCP_send_BEARER_CONTEXT_RELEASE_COMMAND /home/richie/oai/openair2/E1AP/e1ap.c:546
        #4 0x000000482951 in E1AP_CUCP_task /home/richie/oai/openair2/E1AP/e1ap.c:856
        #5 0x7f418f428ee5 in asan_thread_start(void*) (/lib64/libasan.so.8+0x28ee5) (BuildId: 10b8ccd49f75c21babf1d7abe51bb63589d8471f)

    Direct leak of 40 byte(s) in 1 object(s) allocated from:
        #0 0x7f418f4e68a3 in calloc (/lib64/libasan.so.8+0xe68a3) (BuildId: 10b8ccd49f75c21babf1d7abe51bb63589d8471f)
        #1 0x00000049380a in calloc_or_fail /home/richie/oai/common/utils/utils.h:74
        #2 0x00000049380a in encode_E1_bearer_context_setup_request /home/richie/oai/openair2/E1AP/lib/e1ap_bearer_context_management.c:578
        #3 0x00000047f6a2 in e1apCUCP_send_BEARER_CONTEXT_SETUP_REQUEST /home/richie/oai/openair2/E1AP/e1ap.c:378
        #4 0x0000004829f8 in E1AP_CUCP_task /home/richie/oai/openair2/E1AP/e1ap.c:846
        #5 0x7f418f428ee5 in asan_thread_start(void*) (/lib64/libasan.so.8+0x28ee5) (BuildId: 10b8ccd49f75c21babf1d7abe51bb63589d8471f)

    Direct leak of 40 byte(s) in 1 object(s) allocated from:
        #0 0x7f418f4e68a3 in calloc (/lib64/libasan.so.8+0xe68a3) (BuildId: 10b8ccd49f75c21babf1d7abe51bb63589d8471f)
        #1 0x00000046ede7 in calloc_or_fail /home/richie/oai/common/utils/utils.h:74
        #2 0x00000046ede7 in encode_e1ap_cuup_setup_response /home/richie/oai/openair2/E1AP/lib/e1ap_interface_management.c:305
        #3 0x00000047e412 in e1ap_send_SETUP_RESPONSE /home/richie/oai/openair2/E1AP/e1ap.c:167
        #4 0x000000482a68 in E1AP_CUCP_task /home/richie/oai/openair2/E1AP/e1ap.c:836
        #5 0x7f418f428ee5 in asan_thread_start(void*) (/lib64/libasan.so.8+0x28ee5) (BuildId: 10b8ccd49f75c21babf1d7abe51bb63589d8471f)
2025-10-30 08:04:39 +01:00
Guido Casati
a416db39ba Pass SDAP config by pointer
sdap_config_t is more than 1kB large. Avoid excessive copying by passing
it by reference.
2025-10-30 08:04:39 +01:00
Robert Schmidt
91b3ca77f6 QFI 0 is a valid QFI
QFI 0 is a valid QFI: don't check for qfi <= 0, as uint8 cannot be
negative. Also, correctly use SDAP_MAP_RULE_EMPTY for a DRB ID (which
need to be larger than 0).
2025-10-30 08:03:17 +01:00
Robert Schmidt
10bda84176 Limit statistics of UE to configurable threshold
The gNB will stop the periodical logging of UEs in MAC Info level after
a configurable number of UEs have been printed, by default 8.

Set it to 17 in some CI tests to ensure we still get all UEs for the
time being, as the CI might depend on this.
2025-10-29 19:15:49 +01:00
francescomani
56b987c1dd bugfix for computation of alt size of DCI00 2025-10-29 14:27:36 +01:00
francescomani
5e32eb67f6 remove unnecessary do_CSIRS from CI config files 2025-10-29 11:02:19 +01:00
francescomani
e57789adb2 prevent assertion in case of no measurements configured for CSI-RS at UE 2025-10-29 10:52:39 +01:00
Robert Schmidt
93cadc9d63 Truncate nrL1_stats.log before writing
Without this, the remainder of the file remains in place, and this can
be confusing if the total file size reduces.
2025-10-29 08:11:50 +01:00
Jaroslava Fiedlerova
4215a12aa9 Merge remote-tracking branch 'origin/dmrs_log_improv' into integration_2025_w44 (!3721)
improvements in formatting and LOGs in DMRS common functions at MAC

DMRS LOGs at MAC were misleading. This MR tried to improve them (and also
adds some formatting fix).
2025-10-28 23:04:02 +01:00
francescomani
6549acdba9 fix for CSI payload sizes in PUCCH structure at UE 2025-10-28 18:06:39 +01:00
Robert Schmidt
48faffc131 dump_mac_stats(): avoid overflow
The call to snprintf() as was used is wrong: we use the return value to
advance output, but the man page says

> The functions snprintf() and vsnprintf() do not write more than size
> bytes (including the terminating null byte ('\0')).  If the output was
> truncated due  to this  limit,  then  the return value is the number of
> characters (excluding the terminating null byte) which would have been
> written to  the  final  string  if enough  space  had  been available.
> Thus, a return value of size or more means that the output was
> truncated.

Thus, output could go beyond end, and we get a stack overflow. Instead,
encapsulate the call to snprintf() checking this condition, and only
advancing output as intended, limiting to 0 if we are at the end of the
buffer.  This avoids this error:

    ==964825==ERROR: AddressSanitizer: stack-buffer-overflow on address 0x7be799f51988 at pc 0x7fe7d66b0d39 bp 0x7be79b825ef0 sp 0x7be79b8256c0
    WRITE of size 3 at 0x7be799f51988 thread T24
        #0 0x7fe7d66b0d38 in vsnprintf (/lib64/libasan.so.8+0xb0d38) (BuildId: 10b8ccd49f75c21babf1d7abe51bb63589d8471f)
        #1 0x7fe7d66b2d44 in snprintf (/lib64/libasan.so.8+0xb2d44) (BuildId: 10b8ccd49f75c21babf1d7abe51bb63589d8471f)
        #2 0x0000008fe7c6 in dump_mac_stats /home/richie/w/refactor-dlsch/openair2/LAYER2/NR_MAC_gNB/main.c:183
        #3 0x00000092071a in gNB_dlsch_ulsch_scheduler /home/richie/w/refactor-dlsch/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler.c:200
        #4 0x0000008f8f78 in run_scheduler_monolithic /home/richie/w/refactor-dlsch/openair2/NR_PHY_INTERFACE/NR_IF_Module.c:399
2025-10-28 14:25:50 +01:00
Robert Schmidt
7df8243a2e Remove NR MAC's UE-specific lock
There is the (global) sched_lock that prevents concurrent access. A
dedicated UE lock does not make sense in that case. Worse, this lock
does not prevent all concurrent UE accesses (e.g., there are many loops
over UEs that are not protected), so it's also wrong.
2025-10-28 14:22:24 +01:00
Robert Schmidt
07f06f8c06 nrMAC_stats.log: handle file errors, add truncate to reset file
truncate resets the file size to 0. Without this, e.g., when
disconnecting a UE, the old UE remains at the end and is not
overwritten, which is confusing.
2025-10-28 14:22:24 +01:00
Robert Schmidt
7e8245c412 nrMAC_stats.log thread: correctly lock scheduler for stats 2025-10-28 14:22:24 +01:00
Robert Schmidt
9b97fd9b62 Measure tx_func()/rx_func() job duration 2025-10-28 14:22:24 +01:00
Rakesh BB
25f3d632f4 [NGAP] Fix incorrect AMF Set ID type (uint8 → uint16) causing AMF lookup failure
- Corrected AMF Set ID data type in ngap_gNB_nnsf_select_amf_by_amf_setid() from uint8_t to uint16_t.

- AMF Set ID is a 10-bit field as per 3GPP TS 38.413 §9.3.3.12.

- The incorrect data type caused truncation for AMF Set IDs >255, leading to lookup failures during RRC reestablishment.

- Verified successful reestablishment with large AMF Set IDs after the fix.

Reason for fix: AMF lookup using AMF Set ID was failing because the 10-bit AMF Set ID was truncated to 8 bits.

Closes #1012
2025-10-28 12:23:14 +05:30
Robert Schmidt
e40ccbb535 Stop GTP receiver thread on exit
Stop the receive thread before closing the socket, which avoids an error
message when stopping the GTP softmodem:

    [GTPU]   [91] Recvfrom failed (Bad file descriptor)
    [GTPU]   exiting thread
2025-10-27 16:50:00 +01:00
Robert Schmidt
b67c639688 Handle GTP receiver errors
On error, exit the GTP thread after printing a diagnostic message. This
avoids also an error flagged by address sanitizer for use-after-free.

    [GTPU]   [91] Recvfrom failed (Bad file descriptor)
    =================================================================
    ==285377==ERROR: AddressSanitizer: heap-use-after-free on address 0x7cd7b7fe5590 at pc 0x0000006a9e18 bp 0x7b97ad4e1d50 sp 0x7b97ad4e1d48
    READ of size 4 at 0x7cd7b7fe5590 thread T8

    =================================================================
    ==285377==ERROR: LeakSanitizer: detected memory leaks

    Direct leak of 160 byte(s) in 1 object(s) allocated from:
        #0 0x0000006a9e17 in gtpv1uReceiver /home/richie/oai/openair3/ocp-gtpu/gtp_itf.cpp:1346
        #1 0x7f97b9a28ee5 in asan_thread_start(void*) (/lib64/libasan.so.8+0x28ee5) (BuildId: 10b8ccd49f75c21babf1d7abe51bb63589d8471f)
        #2 0x7f97b8e7ff53 in start_thread (/lib64/libc.so.6+0x71f53) (BuildId: 48c4b9b1efb1df15da8e787f489128bf31893317)
        #3 0x7f97b8f0332b in __clone3 (/lib64/libc.so.6+0xf532b) (BuildId: 48c4b9b1efb1df15da8e787f489128bf31893317)

        #0 0x7f97b9ae60cb in memalign (/lib64/libasan.so.8+0xe60cb) (BuildId: 10b8ccd49f75c21babf1d7abe51bb63589d8471f)
        #1 0x000000471039 in newNotifiedFIFO_elt /home/richie/oai/common/utils/threadPool/notified_fifo.h:75
        #2 0x000000471039 in tx_func /home/richie/oai/executables/nr-gnb.c:107
        #3 0x000000471039 in L1_tx_thread /home/richie/oai/executables/nr-gnb.c:167
        #4 0x7f97b9a28ee5 in asan_thread_start(void*) (/lib64/libasan.so.8+0x28ee5) (BuildId: 10b8ccd49f75c21babf1d7abe51bb63589d8471f)

    0x7cd7b7fe5590 is located 336 bytes inside of 400-byte region [0x7cd7b7fe5440,0x7cd7b7fe55d0)
    freed by thread T0 here:
    SUMMARY: AddressSanitizer: 160 byte(s) leaked in 1 allocation(s).
2025-10-27 16:49:16 +01:00
francescomani
f2389987d4 improvements in formatting and LOGs in DMRS common functions at MAC 2025-10-27 14:26:58 +01:00
Robert Schmidt
75a68167ea Merge branch 'integration_2025_w43' into 'develop'
Integration: `2025.w43`

* !3605 Support beam index in OAI 7.2 Fronthaul Interface
* !3709 Fixes for T-Tracer to work with NR-UE
* !3712 Restore UE Capability IE after RRCReestablishment
* !3716 Remove unused ULSCH measurements at gNB
* !3603 UE symbol based PDCCH receiver
* !3708 Add monolithic N2 handover test pipeline with B210 and Quectel
* !3719 Remove Benetel-specific radio drivers
* !3710 [CI] Update the Push to DockerHub Stage
* !3711 CI: Multiple adjustments
* !3717 Initialize NCC=0 on NGAP Initial Context Setup (3GPP TS 33.501 §6.9.2.1.1)
* !3720 fix direct bugs of not used RU_RX_SLOT_DEPTH defined constant
* !3714 Improve handling of selection of RSRP/SINR report via configuration file
* !3519 Refactor SDAP adaptation work for QoS
* !3698 Other CSI measurement fixes
* !3699 Updates for Feature Set

Closes #1008

See merge request oai/openairinterface5g!3713
2025-10-24 15:39:07 +00:00
Robert Schmidt
1251c44ae8 Merge remote-tracking branch 'origin/updates-feature-set' into integration_2025_w43 (!3699)
Updates for Feature Set
2025-10-24 16:48:17 +02:00
Robert Schmidt
41ce595461 Update supported bandwiths 2025-10-24 15:11:36 +02:00
Thomas Schlichter
a898c18ddc Update NTN in Feature Set 2025-10-24 15:11:36 +02:00
Guido Casati
23c115dc74 Update NAS and mobility in Feature Set 2025-10-24 15:11:36 +02:00
Robert Schmidt
57e382ccd1 Retroactively add release notes for v2.3.0
I forgot to add this when making the release. Put it retroactively to
have things "in order".

See also:
https://gitlab.eurecom.fr/oai/openairinterface5g/-/tags/v2.3.0
https://gitlab.eurecom.fr/oai/openairinterface5g/-/releases/v2.3.0
2025-10-24 15:11:36 +02:00
francescomani
66d8ada982 Update UE feature set 2025-10-24 15:11:36 +02:00
Robert Schmidt
110f5c7304 Updates for Feature Set 2025-10-24 15:11:36 +02:00
Robert Schmidt
ef4e37d35c Merge remote-tracking branch 'origin/fix_ue_csi_meas' into integration_2025_w43 (!3698)
Other CSI measurement fixes

Errors fixed in this MR:

- UE currently sends empty CSI measurement report resulting in invalid
  cqi_idx 0, default to MCS 9 at gNB because mismanagement of new L1
  measurement structure at MAC UE
- nrofReportedRS not updated after UE capability reception at gNB
- multiple RSRP reports multiplexed / de-multiplexed in wrong order
2025-10-24 14:42:06 +02:00
Robert Schmidt
35a450bd43 Merge remote-tracking branch 'origin/sdap-qos-improvements' into integration_2025_w43 (!3519)
Refactor SDAP adaptation work for QoS

This MR is an adaptation of the code introduced in !2703.

The goal is a cleanup and functional refactor of the SDAP/PDCP
integration, that is:

- centralize SDAP configuration logic
- simplify entity creation
- improve robustness of role-based SDAP handling
- prepare the codebase for clean support of DRB reconfiguration and
  teardown flows

More concretely:

1. New sdap_config_t and get_sdap_Config()

  - Introduced an internal struct sdap_config_t to abstract SDAP config
    input
  - Centralized SDAP config parsing into new get_sdap_Config() function
    that translates ASN.1 NR_SDAP_Config into this internal
    representation. This is called during RRC triggered
    (re)configuration procedures.
  - Enable mapping of number of QoS flows > 1

2. Unified role handling with bitmasks

  - Added a bitmask-based entity_role field to track SDAP directions:
    SDAP_UL_RX, SDAP_UL_TX, SDAP_DL_RX, SDAP_DL_TX: header presence was
    determined by simple direction (UE vs gNB) and individual
    is_sdap_rx/tx() checks, however nr_sdap_rx_entity behaves
    differently depending on the direction of the RX entity (DL/UL),
    therefore this change can help enable a more accurate SDAP header
    handling across directions and node types.
  - Replaces old helpers is_sdap_rx() / is_sdap_tx() with internal
    checks against the role bitfield
  - QFI-to-DRB mapping is now annotated with direction for both data and
    control PDUs

3. Simplified DRB and SDAP setup

  - add_drb() in PDCP API now delegates SDAP config processing cleanly
  - new_nr_sdap_entity() is used consistently to register a fresh SDAP
    context for the UE and PDU session.
    - Also, re-use and reconfigure existing SDAP entity if already
      exists.
  - logging has been added to trace mapped QFIs from RRC and resulting
    table entries

4. Improved QFI-to-DRB management

  - Refactored nr_sdap_qfi2drb_map_update() to register QFIs based on
    parsed config
  - Ensures control PDUs are correctly routed even after reconfiguration
  - Extended nr_sdap_ue_qfi2drb_config: perform UL QoS flow to DRB
    mapping configuration for a SDAP entity has already been established
    according to TS 37.324, 5.3 QoS flow to DRB Mapping, 5.3.1
    Configuration Procedures. Handle both UL QoS Flows mapping rules to
    add and to remove. QFIs will now be properly unmapped if specified
    via mappedQoS_FlowsToRelease, this might prevent stale QFI mappings
    from being used incorrectly.
  - nr_sdap_qfi2drb() and sdap_map_ctrl_pdu() now strictly fallback to
    default_drb only if a QFI mapping is missing. Missing default DRB
    now triggers LOG_E() (previously silent or misrouted to DRB 0).

5. Other cleanup

  - Remove dependencies from legacy rb_id_t
2025-10-24 14:31:00 +02:00
Robert Schmidt
b7ed2583ac Merge remote-tracking branch 'origin/improv_config_report' into integration_2025_w43 (!3714)
Improve handling of selection of RSRP/SINR report via configuration file

In current develop, the selection of SSB or CRI RSRP depends on the
do_CSIRS flag being activated. That's not wanted. CRI report for now it
is never handled, while we need SSB RSRP report for beam switching
regardless of CSI-RS configuration.
2025-10-24 14:30:39 +02:00
Guido Casati
27be4e26a9 refactor: improve SDAP entity add/update flow management
This commit refactors the SDAP entity QoS flow to DRB mapping functionality
to improve code organization and enhance maintainability.

Key changes:
- Split nr_sdap_qfi2drb_map_update into focused functions:
  * nr_sdap_add_qos_flows_to_drb: handles QFI addition to DRB
  * nr_sdap_rm_qos_flows_from_drb: handles QFI removal from DRB
  * nr_sdap_ue_control_pdu_config: handles UE control PDU generation
- Consolidate add/modify logic into reusable nr_sdap_addmod_entity function
- Remove entity existence checking and updating from new_nr_sdap_entity:
  this function should only add SDAP entities
- Improve function separation of concerns: do SDAP entity add or update
  separately and improve modularity by splitting operations in self
  contained functions
- At SDAP creation, do only add of QFI to DRB mapping
- rename new_nr_sdap_entity to nr_sdap_add_entity for function naming consinstency
2025-10-24 11:55:25 +02:00
Guido Casati
04a1acf376 PDCP: rename add_drb to nr_pdcp_add_drb 2025-10-24 11:55:25 +02:00
Guido Casati
0348aa08b9 Remove rb_id parameter from SDAP TX entity - QFI determines DRB mapping
- Remove rb_id parameter from nr_sdap_tx_entity() function signature
- Update tx_entity function pointer
- Remove rb_id parameter from sdap_data_req() function signature
- Remove unused rb_id variable from sdap_tun_read_thread

The rb_id parameter was redundant since SDAP determines DRB ID
from QFI mapping via entity->qfi2drb_map(entity, qfi). This
simplifies the interface.
2025-10-24 11:55:25 +02:00
Guido Casati
d760a16827 SDAP TX: explicit check on qfi2drb_map output
Each QFI should always be mapped to a DRB. If that is not the case, we
have an undefined behavior. This should not occur. This commit prints
an error in tx_entity and returns.
2025-10-24 11:55:25 +02:00
Guido Casati
8207a4c352 SDAP refactoring: replace legacy (LTE) type rb_id_t with int 2025-10-24 11:55:25 +02:00
Guido Casati
823340a2e2 Refactor handling of DL/UL SDAP header in the SDAP entity
The TX/RX entity should have different behavior according to
5.2.1, 5.2.2, 3GPP TS 37.324, depending on whether it is UL and DL.

The gNB can play a role both as UL RX entity and DL TX entity, while
the UE can play a role both as UL TX entity and DL RX entity.

The goal of this commit is to extend the information stored in the
SDAP entity as the current code is just marking the entity as TX/RX.
The commit introduces a bitmap to store the role of the
entity, which can be DL RX, DL TX, UL RX and UL TX. Based on this
the TX SDAP entity knows whether a DL/UL PDU should be build, and
the RX SDAP entity knows whether a DL/UL PDU should be processed.

See also Figure 4.2.2-1.

SDAP headers are present only if enable_sdap option is used.
2025-10-24 11:55:25 +02:00
Guido Casati
3efaafa633 Refactor QFI to DRB mapping logic
nr_sdap_qfi2drb_map_update function pointer should
process QFIs to add and release from the entity mapping, therefore
a new function pointer for QFIs to add was introduced and
the function pointer to release the QFIs was called in the same function.

Now the nr_sdap_qfi2drb_map_update is:
(1) looping through the QFIs to add/update and store in the qfi2drb_table
(2) looping through the QFIs to release and delete from qfi2drb_table

Also:

* Update the function signature to use sdap_config_t and nr_sdap_entity_t
* log error when the update fails
* limit the scope of the function
* clang-formatted
* removed limit on table entries set by AVLBL_DRB, replaced with MAX_DRBS_PER_UE
2025-10-24 11:55:25 +02:00
Guido Casati
bae1de16d6 Refactor SDAP UL: QoS flow to DRB Mapping configuration and end-marker control PDU mapping
The function nr_sdap_ue_qfi2drb_config should do UL QoS flow to DRB mapping configuration
for a SDAP entity has already been established according to TS 37.324, 5.3 QoS flow to
DRB Mapping, 5.3.1 Configuration Procedures. It should handle both mapping rules to add and to remove.

To this purpose:

* Simplify function signature by passing the sdap config.
* Improve readability of the function.
* Move handling of sdap.mappedQFIs2ReleaseCount (in nr_reconfigure_sdap_entity)
  inside the function.
* Simplify end-marker control PDU mapping function by removing unused
  DRB ID input parameter (the function is fetching the DRB ID based on the input
  map type)
* use int instead of legacy rb_id_t
* limit scope of functions whenever necessary
2025-10-24 11:55:25 +02:00
Guido Casati
7376c9545c Refactor nr_sdap_qfi2drb_map
The goal of this function is to return the DRB ID mapped to the input QFI, for both DL and UL.
The function looks up the DRB that is mapped to the QFI, if no mapping rule exists
returns the default DRB. Returns 0 If no mapping and no default DRB exists for that QFI

The function should not update the stored mapping rules, that is done when receiving
a new SDAP configuration. In this function it was removed.

See TS 37.324, 5.2.1 Uplink
> If there is no stored QoS flow to DRB mapping rule for the QoS flow as specified in the subclause 5.3,
> map the SDAP SDU to the default DRB else, map the SDAP SDU to the DRB according to the stored QoS flow to DRB mapping rule.
2025-10-24 11:55:25 +02:00
Guido Casati
7b42a65ac7 Refactor new_nr_sdap_entity to use sdap_config_t and always update mapping rules
* change function signature: pass the sdap_config_t
* update qfi2drb mapping when receiving a configuration for an already existing SDAP entity
* always update mapping rules, not only for default DRB
2025-10-24 11:55:25 +02:00
Guido Casati
68a3a849bc refactor: Use centralized get_sdap_Config in nr_reconfigure_sdap_entity
Replace inline parameter extraction with get_sdap_Config() function call to:
- Eliminate code duplication in SDAP configuration handling
- Streamline QFI release processing with structured config object
- Ensure consistent SDAP configuration extraction across all SDAP operations
2025-10-24 11:55:25 +02:00
Guido Casati
350263460b Refactor processing of sdap_Config in add_drb (PDCP)
* use get_sdap_Config to process sdap_Config
* move SDAP config logic to the scope where it is relevant
* add SDAP entity direcly in RRC, not from PDCP
* replaced nr_pdcp_add_drbs with single add_drb call: it was no longer
  efficient to keep it in the new logic. The addMod list can be looped directly in RRC.
* add specific function to add bearers from addMod list in E1, NSA, and UE
2025-10-24 11:55:25 +02:00
francescomani
747689596a fix SINR report order at UE 2025-10-24 10:58:23 +02:00
francescomani
2d7999cb28 fix order of information when encoding/decoding RSRP meaas report with more than 1 resource 2025-10-24 10:55:54 +02:00
Robert Schmidt
064d2a1ef0 Merge remote-tracking branch 'origin/RU_RX_SLOT_DEPTH-bugs' into integration_2025_w43 (!3720)
fix direct bugs of not used RU_RX_SLOT_DEPTH defined constant

with this commit, the gNB can work if we change RU_RX_SLOT_DEPTH to
another value than 4 but it remain not well designed
2025-10-24 08:20:24 +02:00
Robert Schmidt
e8d36e8af7 Merge remote-tracking branch 'origin/issue-1008' into integration_2025_w43 (!3717)
Initialize NCC=0 on NGAP Initial Context Setup (3GPP TS 33.501 §6.9.2.1.1)

The nhcc should be initialized to 0 upon Initial Context Setup.

Also, remove unused kgnb_ncc: nh_ncc is already there.

Closes #1008
2025-10-24 08:19:55 +02:00
Laurent THOMAS
83fed82bcf fix direct bugs of not used RU_RX_SLOT_DEPTH defined constant
with this commit, the gNB can work if we change RU_RX_SLOT_DEPTH to
another value than 4 but it remain not well designed
2025-10-24 08:11:13 +02:00
Robert Schmidt
574a75472c Merge remote-tracking branch 'origin/ci-test-adjustments' into integration_2025_w43 (!3711)
CI: Multiple adjustments

- Test with DDDSU (mixed: DDDDDDDDDDGGUU) TDD configuration in
  RAN-SA-B200-Module-SABOX-Container - 40 MHz TDD test
  * https://jenkins-oai.eurecom.fr/job/RAN-SA-B200-Module-SABOX-Container/8910/
- Update the node to localhost for RFSim and L2Sim pipelines:
  * https://jenkins-oai.eurecom.fr/job/RAN-RF-Sim-Test-4G/3990/
  * https://jenkins-oai.eurecom.fr/job/RAN-L2-Sim-Test-4G/3056/
  * https://jenkins-oai.eurecom.fr/job/RAN-RF-Sim-Test-5G/10273/
- Remove unused eNB_instance and eNB_serverId entries from XML, replace
  by node
- Remove nssai_sd from UE configuration (default value is used instead)
- Update CI configuration files
2025-10-23 19:20:26 +02:00
Robert Schmidt
bca5939640 Merge remote-tracking branch 'origin/ci-fix-dockerhub-push' into integration_2025_w43 (!3710)
[CI] Update the Push to DockerHub Stage

This MR addresses two cases:

1. Error Handling: Ensures subsequent Image Test Processes stages
   continue to run even if the preceding Push to DockerHub stage fails
   (applies when the condition is PUSH event and doBuild is true).

2. Introduces conditional logic to correctly handle multi-architecture
   images: Images built for both AMD64 and Jetson ARMv8 (oai-gnb,
   oai-nr-ue, oai-nr-cuup) use docker buildx imagetools for push to
   DockerHub.

All other AMD64 images are pushed using standard Docker commands.

Related MR !3691
2025-10-23 19:19:48 +02:00
Robert Schmidt
7c18dfd93a Merge remote-tracking branch 'origin/remove-benetel-radio-drivers' into integration_2025_w43 (!3719)
Remove Benetel-specific radio drivers

These drivers are superseded by the O-RAN 7.2 FHI
2025-10-23 19:19:24 +02:00
Robert Schmidt
f7639e059d Merge remote-tracking branch 'origin/CI-ho-attenuator-N2' into integration_2025_w43 (!3708)
Add monolithic N2 handover test pipeline with B210 and Quectel

The goal of this MR is to provide an automated end-to-end N2 HO
validation with real RF (B210) and Quectel UE.

During the testing phase a post-HO assertion failure due to
uninitialized selected_plmn_identity was found: this was also fixed.

CI: Add monolithic N2 handover test pipeline (B210 + Quectel)

- New XML pipeline for N2 HO testing
- Docker Compose for two monolithic gNBs (gNB1/gNB2)
- Handover sequence: gNB1 → gNB2 → gNB1 with 5s controlled attenuation
  (RC4DAT).
- Channel mapping: ch1-2 gNB1, ch3-4 gNB2
- Telnet server enabled for CI commands
- Clean-up/reset of attenuator state included

NGAP

- fix PLMN/cell location for Initial UE and Uplink NAS
- Prevents assertion in ngap_gNB_nas_uplink() due to uninitialized
  selected_plmn_identity
- Initial UE Message: pass UE-selected PLMN and NR cell ID from RRC to
  NGAP
- Uplink NAS Transport: use PLMN, TAC, and cell ID from the message
- Build NR CGI as gNB ID + cell ID
- Store UE-selected PLMN only in RRC UE context (for later NAS); stop
  storing PLMN in NGAP UE context.
- PLMN validation when processing handover requests from the source gNB:
  when PLMN validation fails, the target gNB now properly sends
  NGAP_HANDOVER_FAILURE
- Store serving PLMN for later use in UE context
2025-10-23 19:18:23 +02:00
Robert Schmidt
fba488056c Merge remote-tracking branch 'origin/ue-symbol-based-receiver' into integration_2025_w43 (!3603)
UE symbol based PDCCH receiver

This is a partial rebase/rewrite of !2895

The goal of this MR is to check how we can merge this.

The eventual result is stated in !2895. The way forward is to modify UE
RX procedures to work symbol by symbol by extracting the symbol loop out
of RX procedures. After all channels are modified this way, the main
thread can be modified to work symbol by symbol.

At this point only PDCCH was modified.
2025-10-23 15:47:28 +02:00
Rúben Soares Silva
09d9bb5b6a Fix build for simulators
This change is needed due to the previous addition of the function nfapi_stop_l1() in gnb_config.c which in turn calls 2 functions that do not exist in the simulators, since they're not linked against the nfapi libraries
2025-10-23 14:08:37 +01:00
Rúben Soares Silva
c83bd87459 Fixup WLS documentation and Makefile patch 2025-10-23 14:08:37 +01:00
Rúben Soares Silva
e08d904af0 Implementation of STOP exchange
This implements the STOP.request/indication for all 3 transport mechanisms, the VNF will send the STOP.request to the PNF, indicating it will disconnect, and await a STOP.indication from the PNF

The WLS VNF is reworked to be able to start before the PNF, by calling call rte_eal_init and rte_dev_probe to determine if dpdk has been initialized properly, before calling rte_eal_init in the intended process when it is appropriate to do so
2025-10-23 14:08:37 +01:00
Rúben Soares Silva
3247c2933f Rework WLS VNF to be able to start before the PNF
The WLS VNF is reworked to be able to start before the PNF, by calling call rte_eal_init and rte_dev_probe to determine if dpdk has been initialized properly, before calling rte_eal_init in the intended process when it is appropriate to do so
2025-10-23 14:08:37 +01:00
Shubhika Garg
61b5417817 ci: Update and implement conditional DockerHub push
- Push both AMD64 & ARMv8 Jetson images together for images built on both using `docker buildx imagetools`
  - Use standard 'docker pull and push' for images built only on AMD64.
2025-10-23 10:53:41 +02:00
Robert Schmidt
78f36b64c2 use of config module handling for CSI report type input 2025-10-23 10:52:56 +02:00
francescomani
e06d0c7199 improve handling of selection of RSRP/SINR report via configuration file 2025-10-23 10:52:51 +02:00
Robert Schmidt
ece138134b build_oai: remove non-existing oran_fhlib_4g option 2025-10-23 10:03:28 +02:00
Robert Schmidt
8ecda65d55 Remove Benetel radio drivers
These drivers are superseded by the O-RAN 7.2 FHI.
2025-10-23 10:00:08 +02:00
Rúben Soares Silva
244819c627 Allocate VNF_info directly in config instead of global variable
This allows access to the VNF configuration in the various transport mechanisms straight from config, without this, the transport specific thread would cause a segmentation fault when trying to access the pack/unpack function pointers.
Add 2 functions to access the P5 and P7 VNF structures, to avoid having to always cast user_data and p7_vnfs
2025-10-23 08:45:24 +01:00
Guido Casati
5f261d4f4c Add PLMN validation for handover requests and store serving PLMN
Prevent assertion in ngap_gNB_nas_uplink() due to uninitialized selected_plmn_identity:
the selected_plmn_identity field was not being set during N2 handover,
causing the assertion ((plmn->mnc_digit_length == 3) || (plmn->mnc_digit_length == 2))
to fail when processing subsequent NAS messages. The issue is that the Serving PLMN
is not stored by RRC. During N2 mobility, RRC can get this info from GUAMI.

When receiving the Handover Request the target gNB knows from GUAMI
which serving PLMN is the AMF belonging to. In current design, allowed PLMNs
are stored in rrc.configuration. The incoming PLMN needs to be validate
against the PLMNs in the list, then stored in the UE context as Serving PLMN.

This change adds PLMN validation when processing handover requests from the source gNB.
The validation is needed because:

- Target gNB must verify that the PLMN from the GUAMI in the handover request
  is allowed by its configuration before accepting the handover to prevent handover
  to unsupported PLMNs.
- When PLMN validation fails, the target gNB now properly sends NGAP_HANDOVER_FAILURE
- UE Context must store serving PLMN for later use
2025-10-22 14:48:34 +02:00
Guido Casati
32eae0a0a8 Adopt plmn_id_t in nr_guami_t 2025-10-22 14:48:34 +02:00
Guido Casati
7ec646a8d2 NGAP: fix PLMN/cell location for InitialUE and UplinkNAS
This commit is removing the storage of selected PLMN in NGAP UE context.
We store the Serving PLMN in the RRC UE context instead.

The Selected PLMN is the PLMN that the UE chose (or was directed to) for registration
and it is sent in the RRCSetupComplete. This is different from the selected
PLMN mentioned in the NG INITIAL UE MESSAGE for network sharing.

Selected PLMN: determines which core network and AMF the UE is registered with
GUAMI = Identifies the serving AMF and includes the PLMN of that AMF
Serving PLMN: the PLMN that is currently serving the UE (e.g. contained in GUAMI)

The AMF’s PLMN may match the selected PLMN, or not (especially in network sharing or roaming).
Regardless, the UE always have a Serving PLMN.

Initial UE message does not have a TAI IE per se, but TAI is a mandatory
member of the mandatory UserLocationInformation CHOICE.
NR CGI is also mandatory and carried inside UserLocationInformation:
in network sharing, the PLMN ID in TAI takes on additional
significance: RAN is shared but CN are different, so in this case PLMN in TAI is
needed for the AMF route the message to the correct operator’s core.

If network sharing applies (e.g., shared RAN between PLMN-A and PLMN-B):
the UE or network may select PLMN-B instead, and that PLMN identity
is included in the Initial UE Message’s TAI IE.

Conclusion:
1) UE always sends the selected PLMN during the registration,
   regardless of whether it is shared or not.
2) Selected PLMN Identity is an actual IE sent in the RRCSetupComplete
   while in NGAP there's no Selected PLMN Identity IE, only PLMN Identity
   IEs in both TAI and NR CGI. It is a subtle difference.
3) The serving PLMN of the UE needs to be stored in RRC UE Context for
   later use in NAS procedures. e.g. at initial registration it matches
   the Selected PLMN
4) No need to store PLMN in NGAP UE Context, params are passed by RRC
5) TAI and NR CGI, which contain the PLMN identity, are mandatory in
   UserLocationInformation IE CHOICE, and should reflect current status

Changes
- Initial UE Message: pass UE-selected PLMN and NR cell id from RRC to NGAP
- Uplink NAS Transport: use PLMN, TAC, and cell id provided by the message;
- Build NR CGI from gNB ID + cell id
- Store UE-selected PLMN only in RRC UE context at NAS_FIRST_REQ for later
  Uplink NAS, stop storing PLMN in NGAP UE context
2025-10-22 14:48:34 +02:00
Guido Casati
c3eaef704f Add monolithic N2 handover test pipeline with B210 and Quectel
- Add XML pipeline for N2 handover testing
- Add Docker compose for two monolithic gNBs
- Features:
  * Two monolithic gNBs (gNB1, gNB2) with proper CU+DU parameters
  * Gradual attenuation control using RC4DAT attenuator (5s duration)
  * N2 handover sequence: gNB1 → gNB2 → gNB1
  * Proper channel mapping: ch1-2 for gNB1, ch3-4 for gNB2
  * Telnet server configuration for CI commands
  * Handover-specific neighbor configuration
  * Clean test state management with attenuator reset
2025-10-22 14:48:34 +02:00
Jaroslava Fiedlerova
918802d189 Merge remote-tracking branch 'origin/remove_ulsch_measurements' into integration_2025_w43 (!3716)
Remove unused ULSCH measurements at gNB
2025-10-22 13:30:45 +02:00
francescomani
e3aa91dec8 remove unused ulsch measurements at gNB 2025-10-22 09:24:54 +02:00
Guido Casati
70d23e43df Fetch sdap configuration from sdap-config and store in new struct sdap_config_t
This function is processing the NR_SDAP_Config_t received (from RRC) and
is storing the SDAP configuration in a structure of type sdap_config_t.
2025-10-21 16:50:44 +02:00
Jaroslava Fiedlerova
a0f58d7104 CI: Update CI conf files
Update based on !3645

Note: For some test configurations we still need to provide
ra_ResponseWindow, for more details, check commit message of
41d14b571c
2025-10-21 15:22:10 +02:00
Jaroslava Fiedlerova
5b5b9b3a30 CI: remove nssai_sd UE config when default value is used
The SD value defaults to 0xffffff (16777215 in decimal) when not explicitly
set on the UE.
2025-10-21 15:02:01 +02:00
francescomani
df3a768811 fix updating nrofReportedRS after reconfiguration 2025-10-21 15:01:42 +02:00
francescomani
48773b8517 fix handling of CSI measurement reports at L2 UE 2025-10-21 15:01:38 +02:00
Sakthivel Velumani
7807016ae6 pdcch: return pdcch processing is no ss configured 2025-10-21 12:03:02 +02:00
Bartosz Podrygajlo
ece9d51db3 Symbol based PDCCH processing
1. Refactor PDCCH PHY functions to take rxdataF of one OFDM symbol and
   produce LLR for each search space. The modified functions take
   rxdataF in a different format than that produced by nr_slot_fep(). So
   for now a memcpy is used to change the array structure. Once
   nr_slot_fep() is modified, this memcpy will no longer be needed and
   will be removed.
2. Modify DCI functions to decode DCI in the last PDCCH symbol and
   inidcate to MAC once.
3. Fix PDCCH monitoring for start symbol > 0.
4. Fix multiple PDCCH monitoring within slot.

Co-authored-by: Sakthivel Velumani <mail@sakthi.me>
2025-10-21 12:03:01 +02:00
Bartosz Podrygajlo
07ce1ed145 Fix reading reading out of bounds in nr_pdcch_extract_rbs_single
Fix reading out of bounds of rxdataF in the middle PRB in case of odd
cell bandwidth.
2025-10-21 12:01:34 +02:00
Bartosz Podrygajlo
dcb69986eb Fix segfault in nr_pdcch_extract_rbs_single
Fixed an issue where skipping unused PDCCH RBGs would cause the
function to write/read from outside the symbol boundary
2025-10-21 12:01:34 +02:00
Bartosz Podrygajlo
22a335b1a8 Fix too large array in UE PDCCH RX 2025-10-21 12:01:34 +02:00
Bartosz Podrygajlo
34052bf0ce Split PBCH and PDCCH processing in NR UE 2025-10-21 12:01:34 +02:00
Bartosz Podrygajlo
e1b06d177e Remove unused parameters from nr_pdcch_dmrs_rx 2025-10-21 12:01:34 +02:00
Sakthivel Velumani
ae690217dd Clean-up nr_slot_fep
1.Create new funtion nr_symbol_fep() to do OFDM demod of one symbol on
  all antennas. This is called by nr_slot_fep() for now. In the
  upcoming MR, this function will be called directly after reading
  each OFDM symbol from the radio.

2.Removed redundant memory alignment. DFT function performs memory
  alignment if the input memory is not aligned.
2025-10-21 12:01:34 +02:00
Robert Schmidt
45499290cf Merge remote-tracking branch 'origin/Restore_ue_capability_after_reest' into integration_2025_w43 (!3712)
Restore UE Capability IE after RRCReestablishment
2025-10-21 09:17:41 +02:00
Robert Schmidt
7a3da4b7a4 Merge remote-tracking branch 'origin/fix-ttracer-nrue' into integration_2025_w43 (!3709)
Fixes for T-Tracer to work with NR-UE

Fixes to align NR UE events with their definitions in T_messages.txt and
match the expected format in the tracer GUI parser.

Also fixes DL SNR to work in tracer GUI.
2025-10-21 09:12:02 +02:00
Robert Schmidt
af37aaee00 Merge remote-tracking branch 'origin/oran_beamforming' into integration_2025_w43 (!3605)
Support beam index in OAI 7.2 Fronthaul Interface

This branch supports beam index in OAI 7.2 Fronthaul Interface.

- For CP DL (PDSCH), nBeamIndex of the corresponding prbMapElm is set
  when sending IQ data in oran_fh_if4p5_south_out. nBeamIndex of the
  corresponding prbMapElm is set when sending IQ data in
  oran_fh_if4p5_south_out.
- For CP UL (PUSCH and PRACH), nBeamIndex of the corresponding prbMapElm
  is set in oran_fh_if4p5_south_out.

In addition, it fixes a couple of issues

- XRAN hardcodes nBeamIndex of PRACH to zero. Modify XRAN to support
  setting of nBeamIndex of PRACH and update xran F release patch.
- Fix the bug in calculating fh_config->neAxc where num_beams_period is
  multiplified twice

Testing methodology: Use Benetel O_RU for testing even though it does
not support beamforming. With successful registration and data transfer,
one could check the pcap on the fronthaul interface to see if CP packets
are with the right beam index.

Results:

1. Verified that CP-packets for SSB, DCI, PDSCH, PRACH, PDSCH, PUSCH,
   CSI-RS and SRS are with the right beam index
2. Verified that there is no side-effect on Benetel O_RU. UE could
   register properly.
3. Verified 4 SSB with ssb_PositionsInBurst_Bitmap = 85. Could see SSB
   and PRACH with 4 different indices.
2025-10-21 09:09:03 +02:00
Mario Joa-Ng
ad1b05cd01 need to set beam_id for UPLINK_SLOT when using analog BF 2025-10-20 17:21:12 +02:00
Mario Joa-Ng
65ef3cfa74 Set RX nBeamIndex according to beam allocation
Handle CP UL packet at xran_fx_tx_send_slot() instead of
xran_fh_rx_read_slot(), as the latter would set this information too
late (on reception on samples, but it needs to be filled in the CP
packet prior to reception).
2025-10-20 17:21:12 +02:00
Mario Joa-Ng
2d27e0fc0a Set TX nBeamIndex according to beam allocation
Initialize ru_info structure with beam information, and set beams on TX
direction. Initialize the number of antennas for both RX/TX in both
cases for completeness.
2025-10-20 17:21:12 +02:00
Mario Joa-Ng
c645e8b096 Fix xran: Correctly read PRACH beam index
Upgrade xran patch, bump version number.
2025-10-20 17:21:12 +02:00
luis_pereira87
f231655b31 Restore UE Capability IE after RRCReestablishment 2025-10-20 15:04:26 +01:00
alexjiao
4d372c5f58 Improve T-Tracer GUI for UE
Make PHY measurements diagrams larger for a better view, reduce PHY/MAC/RLC/PDCP/RRC textlog height
2025-10-17 23:59:58 +08:00
Jaroslava Fiedlerova
c8b09f570f CI: RF-Sim-Test-5G replace node name by localhost
By configuring the Jenkins pythonExecutor to match the test machine, we can use
localhost as the node for running individual test cases. This change makes it
easy to move tests across machines, as the only adjustment needed is updating
the pythonExecutor in Jenkins.
2025-10-17 16:21:12 +02:00
Jaroslava Fiedlerova
2bacf7ba54 CI: RF-Sim-Test-4G replace node name by localhost
By configuring the Jenkins pythonExecutor to match the test machine, we can use
localhost as the node for running individual test cases. This change makes it
easy to move tests across machines, as the only adjustment needed is updating
the pythonExecutor in Jenkins.
2025-10-17 16:20:01 +02:00
Jaroslava Fiedlerova
149c4dbf6e CI: RFSim-5G update XML files
Use node for Create/Deploy/Undeploy() (as done in !3579)
2025-10-17 12:17:15 +02:00
Jaroslava Fiedlerova
867d476397 CI: L2-Sim-Test-4G replace node name by localhost
By configuring the Jenkins pythonExecutor to match the test machine, we can use
localhost as the node for running individual test cases. This change makes it
easy to move tests across machines, as the only adjustment needed is updating
the pythonExecutor in Jenkins.
2025-10-17 11:36:39 +02:00
alexjiao
5df7d000f9 Fix for DL SNR to work in T-Tracer with NR-UE
Add missing T_UE_PHY_DL_TICK and T_UE_PHY_UL_TICK events
Calculate missing n0_power_avg_dB for noise measurements
2025-10-17 17:07:21 +08:00
alexjiao
8424c8ecb6 Fix crashes for T-Tracer to work with NR-UE
1. Fix UE_PHY_PDSCH_IQ event
2. Fix UE_PHY_PDCCH_ENERGY event
3. Fix UE_PHY_PDSCH_ENERGY event
4. Fix UE_PHY_MEAS event
All fixes align NR UE events with their definitions in T_messages.txt and match the expected format in the tracer GUI parser.
2025-10-17 17:06:36 +08:00
Jaroslava Fiedlerova
d0089369d3 CI: adjust TDD pattern in SA-B200 40 MHz TDD test 2025-10-17 10:59:49 +02:00
Shubhika Garg
b0ab5e8795 ci: Ensure DockerHub push failure doesn't halt pipeline
- catchError will prevent from abruptly aborting the entire pipeline upon failure.
  - Removed redundant `currentBuild.result` in post-failure block
2025-10-17 10:28:36 +02:00
Jaroslava Fiedlerova
7045140845 Merge branch 'integration_2025_w42' into 'develop'
Integration `2025.w42`

* !3623 Optimization of PDSCH precoding operation
* !3691 \[CI\] Ensure multi-arch DockerHub Push after successful image build
* !3696 asn1c doesn't follow c99 variables alias rules, it needs to be compiled this...
* !3685 Assign antenna ports correctly for 1 and 2 layers for aerial.
* !3495 Type0 PDSCH frequency allocation at L1 UE
* !3686 Remove NR L2 simulator code from UE
* !3693 Remove B200-specific clock-rate setting
* !3701 OAI UE: add shared RSRP Table 10.1.6.1-1 mapping function to helpers and adopt it RRC UE
* !3662 RRC UE file cleanup
* update doc/README.md
* !3608 use common scale channel functions for DLSCH and ULSCH
* !3694 fix non initialized DMRS port value in case of DCI00 at UE
* !3702 Extend F1 rfsim CI test
* !3704 remove unused global queues, dead code
* !3673 CI: Aerial: Add an UL-heavy pipeline test
* !3651 CI: Upgrade HO setup to use an attenuator
* !3695 CI: Upgrade Aerial setup to 25-2.1

Closes #940

See merge request oai/openairinterface5g!3700
2025-10-16 15:58:02 +00:00
Guido Casati
e4f7443552 Initialize NCC=0 on NGAP Initial Context Setup per 3GPP TS 33.501 §6.9.2.1.1
Remove unused kgnb_ncc: nh_ncc is already there

Closes #1008
2025-10-16 17:21:01 +02:00
Jaroslava Fiedlerova
1f0e9abe2f Merge remote-tracking branch 'origin/aerial_25-2.1' into integration_2025_w42 (!3695)
CI: Upgrade Aerial setup to 25-2.1

The purpose of this MR is to upgrade the cuBB image in the Aerial setup to
release 25-2.1 and update the doc/Aerial_FAPI_Split_Tutorial.md accordingly.
2025-10-16 15:38:49 +02:00
Reem Bahsoun
9620fd1a6a Update the nvIPC library to the one packaged with the new cuBB image. 2025-10-16 12:06:15 +02:00
Jaroslava Fiedlerova
296ae968b1 Merge remote-tracking branch 'origin/aerial-ul-heavy' into integration_2025_w42 (!3673)
CI: Aerial: Add an UL-heavy pipeline test

Add a new test with DSUUU TDD pattern, and try to reach 220Mbps.
2025-10-16 11:55:16 +02:00
Jaroslava Fiedlerova
10555929b0 Merge remote-tracking branch 'origin/CI-ho-attenuator' into integration_2025_w42 (!3651)
CI: Upgrade HO setup to use an attenuator

The goal of this MR is to upgrade HO CI setup to include a digital attenuator
that will allow us to trigger handover by attenuating the signals on the DUs.
2025-10-16 11:52:02 +02:00
Robert Schmidt
5f162c436e Add documentation for CI Handover Setup 2025-10-16 11:40:25 +02:00
Reem Bahsoun
9803fb29f6 Reorganize XML steps for F1 HO
Number linearly for easier navigation in HTML reports, and start DU1
before connecting the UE. Reset attenuation on all channels to 0.
2025-10-16 11:40:25 +02:00
Reem Bahsoun
e2075b57ca Clean up F1 HO config files
Harmonize gNB names with other files, remove control ports (not used),
put sl_ahead in right place.
2025-10-16 09:30:38 +02:00
Reem Bahsoun
d8e9a30fad Add attenuator commands to the XML file 2025-10-16 09:30:31 +02:00
Reem Bahsoun
c9b704ed64 Rename services in docker-compose for clarity
Harmonize with other files and use dashes.
2025-10-16 09:30:18 +02:00
Reem Bahsoun
464762e52b Fix: PCI on different SSB position 2025-10-15 20:14:48 +02:00
Reem Bahsoun
e375a13aa5 CI infra: rename UE name to reflect PLMN 2025-10-15 20:14:48 +02:00
Robert Schmidt
42a54a01a0 USRP: move time/clock source setting to later
Doing this before using set_master_clock_rate() on the B200 seems to
invalidate synchronization setting.

    [HW]   USRP clock set to 1759836386.000000 sec
    [...]
    [HW]   current pps at 3.286750, starting streaming at 4.286750

In other words, the current time setting was reset. With this change
now, we see

    [HW]   USRP clock set to 1759929873.000000 sec
    [...]
    [HW]   current pps at 1759929873.000000, starting streaming at 1759929874.000000

This is because changing clock sources (I assume setting the master
clock rate impacts the clock) can result in changing the time.  From the
documentation of [1]:

> Note: When changing clock sources, a previously set time will most
> likely be lost. It is recommended to set the time after changing the
> clock source. Otherwise, an unexpected time may line up with future PPS
> edges.

[1] https://files.ettus.com/manual/classuhd_1_1usrp_1_1multi__usrp.html#a99254abfa5259b70a020e667eee619b9
2025-10-15 20:06:15 +02:00
Robert Schmidt
0ba9a9758b CI: expand %%workspace%% token
- main.py: replace %%workspace%% with CONTAINERS.eNBSourceCodePath in Custom_Command and Custom_Script

Co-authored-by: Guido Casati <hello@guidocasati.com>
2025-10-15 20:06:15 +02:00
Guido Casati
f93a71977f Add band validation in neighbor cell configuration
- Add band mismatch check in valid_du_in_neighbour_configs function
- Ensures neighbor cell band matches serving cell band
- Prevents invalid neighbor configurations for handover
2025-10-15 20:06:15 +02:00
Robert Schmidt
8c85acbba6 Add script to control attenuation of Mini-Circuits RC*DAT 2025-10-15 20:06:15 +02:00
Robert Schmidt
1a472e4c0b Msg3 retx: check that current slot is DL
The code only checked that Msg3 would be scheduled during UL, but in
some combinations, e.g., with DSUUU, the current slot can very well be
UL as well => we would schedule DCI in UL slot.
2025-10-15 19:52:09 +02:00
Robert Schmidt
7ff05a98c2 Print frame/slot on UL failure 2025-10-15 19:52:09 +02:00
Robert
ae63a51ceb Increase PBCH Block power: better UL 2025-10-15 19:52:09 +02:00
Robert Schmidt
3b517dd5d2 Add CI XML fail for Aerial UL heavy pipeline 2025-10-15 19:52:09 +02:00
Robert
2db630e187 Add UL-heavy Aerial config
Update cuBB image to cubb-build:25-2.1_srs-ul-heavy (release 25-2.1 with
changes in the L1 config to test heavy ul)

Co-authored-by: Reem Bahsoun <reem.bahsoun@openairinterface.org>
2025-10-15 19:51:50 +02:00
Jaroslava Fiedlerova
7ef1e79c0d Merge remote-tracking branch 'origin/remove-unused-fifo-queues' into integration_2025_w42 (!3704)
remove unused global queues, dead code
2025-10-15 13:49:08 +02:00
Robert Schmidt
ad878dc7df Merge remote-tracking branch 'origin/issue-940' into integration_2025_w42 (!3702)
Extend F1 rfsim CI test

Add one handover hop.

Closes #940
2025-10-15 08:35:34 +02:00
Robert Schmidt
6ddd2bd2af Merge remote-tracking branch 'origin/dci_00_dmrs_port' into integration_2025_w42 (!3694)
fix non initialized DMRS port value in case of DCI00 at UE

When transmitted PUSCH is neither scheduled by DCI format 0_1 with CRC
scrambled by C-RNTI, CS-RNTI, SP-CSI-RNTI or MCS-C-RNTI, nor
corresponding to a configured grant, the UE shall use [...] DM-RS port
0.

In UE code it was not set in case of DCI00 and that was leading to ULSCH
failures in some scenarios.
2025-10-15 08:35:11 +02:00
Robert Schmidt
2a67719e92 Merge remote-tracking branch 'origin/common_scale_function' into integration_2025_w42 (!3608)
use common scale channel functions for DLSCH and ULSCH

Follow up of !3035
2025-10-15 08:34:37 +02:00
Robert Schmidt
b9043d990a Doc: correctly link to non-indexed files in doc/README.md 2025-10-15 08:29:41 +02:00
francescomani
38c27680eb Merge remote-tracking branch 'origin/rrcUE_cleanup' into integration_2025_w42 (!3662)
RRC UE file cleanup

No functional change, just moving functions around so that these are
defined before their usage
2025-10-15 08:26:18 +02:00
Laurent THOMAS
1dd0194e32 remove unused global queues, dead code 2025-10-14 20:36:48 +02:00
francescomani
2b25b32b16 default dmrs port value in ulsch ue scheduler 2025-10-14 16:01:46 +02:00
francescomani
1cd3950178 fix non initialized DMRS port value in case of DCI00 at UE 2025-10-14 15:43:06 +02:00
Guido Casati
0622fb362f ci: container_5g_f1_rfsim - extend F1 handover with 1 more hop
- Trigger handover
- IdleSleep 2s
- Ping ext-dn from NR-UE
- Verify UE(1) connected to DU-PCI1

Validate absence of heap-use-after-free ASAN error found in !3600.

Closes #940
2025-10-14 14:46:19 +02:00
Guido Casati
520d52963e ci: container_5g_f1_rfsim - remove oai-nr-cuup-asan
Rationale: CU-UP image not required for this F1 rfsim workflow’s local pull stage.
2025-10-14 14:46:19 +02:00
Jaroslava Fiedlerova
aead89e9e7 Merge remote-tracking branch 'origin/oai-ue-fix-rsrp-mapping' into integration_2025_w42 (!3701)
OAI UE: add shared RSRP Table 10.1.6.1-1 mapping function to helpers and adopt
it RRC UE

- Add to common/utils/nr/nr_common remove from NR_MAC_UE/nr_ue_procedures.c
- Adopt in asn1_msg.c for MeasurementReport: this solves the following possible
  assert:

  Assertion (enc_rval.encoded > 0) failed!
  In do_nrMeasurementReport_SA() /oai-ran/openair2/RRC/NR/MESSAGES/asn1_msg.c:898
  ASN1 message encoding failed (MeasResultServMOList, 18446744073709551615)!

Motivation: unify RSRP-to-index mapping across layers and fix NR RRC
MeasurementReport encoding failures due to out-of-range values by reusing the
validated mapping.

Note: NR_RSRP-Range.c constraint: /* (0..127) */

Also refactored MeasurementReport to improve the code.
2025-10-14 13:17:24 +02:00
Mario Joa-Ng
4eb9dd3d38 set beam_id to -1 instead of 0. 2025-10-14 12:05:29 +02:00
Mario Joa-Ng
c36a6bcb47 Fix the bug in calculating fh_config->neAxc where num_beams_period is multiplified twice. 2025-10-14 11:56:03 +02:00
Jaroslava Fiedlerova
455553d129 Merge remote-tracking branch 'origin/remove-b200-specific-clock-rate' into integration_2025_w42 (!3693)
Remove B200-specific clock-rate setting

Avoid this clock-rate setting, as we already do it around usrp_lib.cpp:1121, so
it is superfluous. For instance, we also do not set a master clock rate for N3xx
either. This also enables us to synchronize B200 for handover settings,
e.g., for !3651.

See the commit message for more information about synchronization.
2025-10-13 21:50:29 +02:00
Guido Casati
d7c3968df2 RRC UE: MeasurementReport refactor
- Simplify do_nrMeasurementReport_SA API (encoder allocates local report)
- Adopt asn1cCalloc consistently
- Minor init cleanup for UL_DCCH message struct
2025-10-13 16:52:59 +02:00
Guido Casati
edc53ac9dd OAI UE: add shared RSRP Table 10.1.6.1-1 mapping helper and adopt it RRC UE
- Add to common/utils/nr/nr_common remove from NR_MAC_UE/nr_ue_procedures.c
- Adopt in asn1_msg.c for MeasurementReport: this solves the following assert:

Assertion (enc_rval.encoded > 0) failed!
In do_nrMeasurementReport_SA() /oai-ran/openair2/RRC/NR/MESSAGES/asn1_msg.c:898
ASN1 message encoding failed (MeasResultServMOList, 18446744073709551615)!

Motivation: unify RSRP-to-index mapping across layers and fix NR RRC MeasurementReport
encoding failures due to out-of-range values by reusing the validated mapping.

Note NR_RSRP-Range.c constraint:
	{ APC_CONSTRAINED,	 7,  7,  0,  127 }	/* (0..127) */
2025-10-13 16:52:59 +02:00
Jaroslava Fiedlerova
4efb142f9a Merge remote-tracking branch 'origin/remove_l2_sim' into integration_2025_w42 (!3686)
Remove NR L2 simulator code from UE

This MR removes NR (SA and NSA) L2 simulator from the codebase. The code, at
least at the UE side, was done at a time where there was no clear L2/L1 split
leading to a complex implementation that never worked as expected. The L2
simulator has been broken and removed from testing for long time and, once it
needs to be revived, it would require a complete new implementation.
2025-10-13 14:19:24 +02:00
Jaroslava Fiedlerova
3155bf907c Merge remote-tracking branch 'origin/type0_PDSCH' into integration_2025_w42 (!3495)
Type0 PDSCH frequency allocation at L1 UE
2025-10-13 14:18:51 +02:00
Jaroslava Fiedlerova
f4b93dce53 Merge remote-tracking branch 'origin/nhedberg/antennaPorts' into integration_2025_w42 (!3685)
Assign antenna ports correctly for 1 and 2 layers for aerial.

With this change aerial successfully decodes PUSCH with 2 UL layers.

The code should use sched_pusch->dmrs.num_dmrs_cdm_grps_no_data == 1 rather
than NFAPI_MODE != NFAPI_MODE_AERIAL, but that will make the changes a bit
more extensive.

Prior to this change, sending antenna_ports.val = 2 with rank 2 would tell
the UE to transmit on DMRS ports 2,3 rather than 0,1 causing it to not decode.
2025-10-13 14:16:34 +02:00
Jaroslava Fiedlerova
114b03f310 Merge remote-tracking branch 'origin/bug-alias-c99-asn1c' into integration_2025_w42 (!3696)
asn1c doesn't follow c99 variables alias rules, it needs to be compiled this...

asn1c doesn't follow c99 variables alias rules, it needs to be compiled this way.
Issue 509 (https://github.com/vlm/asn1c/issues/509 ) reported in
https://github.com/vlm/asn1c
2025-10-13 11:47:47 +02:00
Jaroslava Fiedlerova
14b6d0f20f Merge remote-tracking branch 'origin/CI-pushDH' into integration_2025_w42 (!3691)
[CI] Ensure multi-arch DockerHub Push after successful image build

This merge request improves the CI script to ensure that the DockerHub-Push
stage executes whenever:
- All Image Build stages succeed &
- doBuild is true &
- The event is a PUSH

This behavior ensures that Docker images are published whenever the image build
stages succeed, regardless of any failures in the Image Test stages.
Jetson ARM64/V8 and AMD64 images will now be published on DockerHub under the
same tag (develop or WEEK_TAG) to provide multi-architecture images.
2025-10-13 11:40:51 +02:00
Jaroslava Fiedlerova
769885c05a Merge remote-tracking branch 'origin/precoder_optimization' into integration_2025_w42 (!3623)
Optimization of PDSCH precoding operation

x86/aarch64 optimizations for precoding, more complete timing reporting in
nr_dlsim. Timing report in nr_dlsim now shows the total PDSCH generation time
and is broken down into Layer mapping, resource mapping and precoding.
The optimizations for x86 are basically reorganizing loops (for AVX512,AVX2,
NEON but not SSE2) to minimize repetitive instructions when formatting of the
precoder weights, and creation of inline functions for complex multiply-add.
AVX512 optimization was added. requiring AVX512BW. Detection of up to 4 PRBs
with common PMI for efficiency with AVX512 (was 2 in develop for AVX2).
For aarch64, native coding of the precoder to avoid inefficient SIMDe
translations for this operation.
nr_dlsim now uses default precoding indices depending on the scenario instead
of 0 which doesn't do precoding at all.

See merge request description for nr_dlsim test results.
2025-10-13 11:39:57 +02:00
francescomani
a20640accc feature set update 2025-10-13 11:08:51 +02:00
francescomani
d20b1120d4 remove temporary code to process type0 as type1 2025-10-13 10:57:49 +02:00
francescomani
9e43f998d9 further code cleanup 2025-10-13 10:57:49 +02:00
francescomani
d07771c538 formatting improvements 2025-10-13 10:57:49 +02:00
francescomani
7eb65f2adc adapt nr_dlsch_extract_rbs for type0 PDSCH freq allocation 2025-10-13 10:57:49 +02:00
francescomani
7d0bf3be51 include information about number of PRBs in frequency allocation structure 2025-10-13 10:57:49 +02:00
francescomani
99e4f54d61 type0 DLSCH frequency allocation for channel estimation 2025-10-13 10:57:49 +02:00
francescomani
e70a2b3cc1 use ad hoc UE FAPI information for PDSCH DMRS reference point 2025-10-13 10:57:49 +02:00
francescomani
121937ad4c input simplification in nr_pdsch_channel_estimation 2025-10-13 10:57:49 +02:00
Shubhika Garg
677a16a4a9 ci(docker): push ARM64 and AMD64 images to DockerHub
- On PUSH events, if image build stages succeed, trigger DockerHub push stage
 - Build the images, then trigger the Push to DockerHub stage
 - Publish Jetson (ARM64/v8) and AMD64 images under the same tag on DockerHub
2025-10-10 14:07:24 +02:00
Robert Schmidt
ce4e647fd8 USRP: move time/clock source setting to later
Doing this before using set_master_clock_rate() on the B200 seems to
invalidate clock settings:

    [HW]   USRP clock set to 1759836386.000000 sec
    [...]
    [HW]   current pps at 3.286750, starting streaming at 4.286750

In other words, the current time setting was reset. With this change
now, we see

    [HW]   USRP clock set to 1759929873.000000 sec
    [...]
    [HW]   current pps at 1759929873.000000, starting streaming at 1759929874.000000

This is because changing clock sources (I assume setting the master
clock rate impacts the clock) can result in changing the time.  From the
documentation of set_time_next_pps() [1]:

> Note: When changing clock sources, a previously set time will most
> likely be lost. It is recommended to set the time after changing the
> clock source. Otherwise, an unexpected time may line up with future PPS
> edges.

[1] https://files.ettus.com/manual/classuhd_1_1usrp_1_1multi__usrp.html#a75b1c5375549e6a446d686ee7d9b4e14
2025-10-10 12:49:29 +02:00
Robert Schmidt
dab8db76d7 CI: Aerial: Split out CN start/stop from main XML
The next commit introduces an "UL-heavy" configuration to be tested with
Aerial. To avoid waiting for the CN, start&stop it once at the beginning
of the CI run.
2025-10-09 19:25:11 +02:00
Robert Schmidt
92bc0aee0e Merge branch 'integration_2025_w41' into 'develop'
Integration `2025.w41`

* !3472 Replace int16 min when obvious
* !3689 Fix OAI UE memory leaks
* !3675 fix RSRP computation at UE
* !3688 Fixes to prevent assertion due to 0 PRB allocation
* !3680 OC PhySim deployment: always undeploy safely
* !3471 SRS noise power
* !3679 CI: Enable Physim threshold check for tests on Caracal and GH
* reduce RFsim F1 throughput after handover

Closes #828

See merge request oai/openairinterface5g!3692
2025-10-09 17:15:02 +00:00
Raymond Knopp
0dcea09e87 bugfix for arm-v8x/v9 2025-10-09 16:04:45 +02:00
Laurent THOMAS
e056acc896 use c16_t type for pm weights, as it is already same type
simplify SIMD version of precoder
2025-10-09 16:04:43 +02:00
Raymond Knopp
fb47748fae fixed precoder_simd after CI run (test for n_layers=1) failed 2025-10-09 16:01:09 +02:00
Raymond Knopp
264f7cb817 aarch64 optimizations for precoding, more complete timing reporting in
nr_dlsim
2025-10-09 16:01:09 +02:00
Raymond Knopp
e44d498cba optimization of DLSCH precoding for AVX2 2025-10-09 16:01:09 +02:00
Raymond Knopp
34ba85f3b1 precoder optimizations for AVX512 2025-10-09 16:01:09 +02:00
Raymond Knopp
8711556d9e Handle larger RB step size in precoding 2025-10-09 16:01:09 +02:00
Raymond Knopp
be236d450e Add measurements for performance analysis 2025-10-09 16:01:09 +02:00
Laurent THOMAS
c537e2cabe move complex numbers types above phy layer, as they are used in fapi for example 2025-10-09 16:01:09 +02:00
Laurent THOMAS
8b9098b7ca remove unused declarations in common/platform_types.h 2025-10-09 16:01:09 +02:00
Reem Bahsoun
1a65abb56c Upgrade cuBB image to 25-2.1 and update doc to match 2025-10-09 15:00:47 +02:00
Laurent THOMAS
00a7890449 asn1c doesn't follow c99 variables alias rules, it needs to be compiled this way. issue #509 reported in https://github.com/vlm/asn1c 2025-10-09 14:04:14 +02:00
Robert Schmidt
ba8b23772e CI RFsim 5G F1: reduce DL iperf throughput
Reduce throughput requirement, as this fails once two DUs are connected
to a UE, which creates more load on the machine and frequently fails
with low throughput.
2025-10-09 08:48:26 +02:00
Robert Schmidt
dd868fd25e Merge remote-tracking branch 'origin/ci-update-physim-threshold' into integration_2025_w41 (!3679)
CI: Enable Physim threshold check for tests on Caracal and GH

This MR adds support for configurable timing threshold files in PhySim
tests.

- Introduces a new CMake cache variable PHYSIM_CHECK_FILES to specify
  one or more timing threshold files (semicolon-separated).
- Enables optional enforcement of timing thresholds check in PhySim
  tests without changing existing test definitions.
- Defines timing thresholds for LDPC encoding/decoding in nr_ulsim,
  nr_dlsim and ldpctest on Caracal and GH machines.
2025-10-09 08:46:46 +02:00
Robert Schmidt
1ffa012014 Merge remote-tracking branch 'origin/SRS-noise-power' into integration_2025_w41 (!3471)
SRS noise power

This MR implements the calculation of the noise power based on SRS in a
different way, and check whether SNR is more accurate or not. This MR is
built on top of the MR: !3460

A graph was added in T_Tracer to observe UL-SNR calculated using SRS.

See merge request description for measurement results.
2025-10-09 08:45:14 +02:00
Jaroslava Fiedlerova
6843625615 Add separate XML file for PhySim with timing check on GH 2025-10-08 19:45:14 +02:00
Jaroslava Fiedlerova
5ec7bcdcd2 Add timing check for physim tests on GraceHopper
Update Dockerfile to pass -DPHYSIM_CHECK_FILES="ThresholdsGracehopper.cmake".
2025-10-08 19:45:14 +02:00
Jaroslava Fiedlerova
bcc616e654 Increase timeout for physim deployments
Extend the timeout for physim deployments on OC to allow tests to complete
reliably.
2025-10-08 19:45:14 +02:00
Jaroslava Fiedlerova
31af716ccb Update timing thershold for offload tests on Caracal 2025-10-08 19:45:14 +02:00
Jaroslava Fiedlerova
ec8efe1b7e Unify physim test definition
Replace the previous add_timed_physim_test() macro with add_physim_test()
to use a single, unified function for defining physim tests. This simplifies
the test configuration and removes redundant macro definitions while keeping
all existing functionality.

This change follows up on the earlier addition of support for including
custom timing threshold files (PHYSIM_CHECK_FILES).

Update existing tests accordingly.
2025-10-08 19:45:14 +02:00
Jaroslava Fiedlerova
8910406a9e Add support for including custom timing threshold files in physim tests
Introduce a new CMake variable PHYSIM_CHECK_FILES to specify CMake files
(semicolon-separated) containing timing thresholds for timed physim tests.
2025-10-08 19:44:35 +02:00
francescomani
6289409f15 remove nsa UE option code 2025-10-08 18:21:10 +02:00
francescomani
f4e4ef74ff remove emulate_l1 code 2025-10-08 17:39:29 +02:00
Jaroslava Fiedlerova
78d91db964 Include timing analysis file in physim.rhel9 image
Add missing timinig analysis scripts to RHEL9 physim docker image. These files
are now copied from the build stage to /oai-ran/openair1/SIMULATION/tests/,
where they are expected by ctest.

Resolves following issue when running ctest in docker container:
CMake Error: Error processing file: /oai-ran/openair1/SIMULATION/tests/RunTimedTest.cmake
2025-10-08 10:57:50 +02:00
Robert Schmidt
a3ac1dbdfe analyze-timing.sh: check only last measurement occurrence
For some physical simulators, we have multiple SNR iterations.

The previous version of the script correctly retained only the last
measurement, but if a previous measurement condition set RC=1, the
script would fail although the final "good" run might fulfil the
measurement condition (IOW, it would show SUCCESS, but still fail on the
check).

Instead, check if all measurement lines finish on SUCCESS, which handles
the above case.
2025-10-08 10:57:50 +02:00
Robert Schmidt
b012700fe4 Fix analyze-timing.sh for mawk compatibility
The awk script in analyze-timing.sh used syntax that works with gawk but fails
on systems where mawk is the default implementation, producing errors such as:

awk: /dev/fd/3: line 6: syntax error at or near ,
-- test command finished with SIGPIPE

Concretely, the match(text, pattern, variable) function does not exist
in mawk, as it cannot capture matches in variables. Work around by
substituing strings, and force a numeric comparison.
2025-10-08 10:57:50 +02:00
Jaroslava Fiedlerova
ddf81a175c Merge remote-tracking branch 'origin/physim-deploy-failsafe' into integration_2025_w41 (!3680)
OC PhySim deployment: always undeploy safely

Always undeploy physim safely. See commits for more details
2025-10-08 08:46:03 +02:00
Jaroslava Fiedlerova
98fea81b39 Merge remote-tracking branch 'origin/fix_0_tbs' into integration_2025_w41 (!3688)
Fixes to prevent assertion due to 0 PRB allocation

Assertion (NPRB>0 && (NPRB + RBstart <= BWPsize)) failed!
In PRBalloc_to_locationandbandwidth0() /home/user/openairinterface5g/common/utils/nr/nr_common.c:506
Illegal NPRB/RBstart Configuration (0,51) for BWPsize 51

Probably caused by missing safeguards to prevent computing TBS with 0 PRB
as input.
2025-10-08 08:43:49 +02:00
Nick Hedberg
9949c7e71b Assign antenna ports correctly for 1 and 2 layers for aerial.
Removes Aerial-specific changes and harmonizes with OAI full-stack.
2025-10-07 17:21:35 +02:00
Jaroslava Fiedlerova
7459e73277 Merge remote-tracking branch 'origin/fix-ue-mem-leaks' into integration_2025_w41 (!3689)
Fix OAI UE memory leaks

Fix 1: Replaced asn1cFreeStruc with ASN_STRUCT_FREE in MAC layer to properly
       free nested ASN.1 structures in cell group configuration.
Fix 2: Removed premature nullification of dedicatedNAS_Message->buf in
       dlInformationTransfer processing to allow proper ASN.1 cleanup.
Fix 3: Fixed memory ownership in nr_rrc_process_dedicatedNAS_MessageList by
       copying OCTET_STRING data instead of transferring ownership, preventing
       ASN.1 cleanup from losing track of allocated memory

Closes #828
2025-10-07 14:33:15 +02:00
Jaroslava Fiedlerova
2424c182d6 Merge remote-tracking branch 'origin/fix_rsrp_ue' into integration_2025_w41 (!3675)
fix RSRP computation at UE

Conflicts between !3595 (merged) and !3596 (merged) leading to double conversion
of RSRP into index in L1 and L2. With this fix it is only converted in L2.
2025-10-07 14:32:35 +02:00
Jaroslava Fiedlerova
b3007ce55b Merge remote-tracking branch 'origin/replace-INT16_MIN-when-obvious' into integration_2025_w41 (!3472)
Replace int16 min when obvious

INT16_MIN doesn't have a opposite value on 16 bits, so SIMD abs (absolute()), or
simple C operations doesn't make the expected result.

example:
(gdb) p (short)-(short)-32768
$4 = -32768
(gdb)

This MR replaces constants INT16_MIN by -INT16_MAX (so -32767) in places where
it used for mathematical operations. This is not perfect, nevertheless reduces
overflow probability.
We saw in some places a dirty case: code do first calls to _mm_adds_epi16
(or subs), so because of the saturated operations, the probability to reach
32767 and -32768 is higher than the other numbers but, _mm_abs_epi16(), or
negate operations (conjugate) can follow, that is making strong error as
abs(-32768)=-32768
2025-10-07 14:27:30 +02:00
Jaroslava Fiedlerova
bd1dadaa79 OC PhySim deployment: log bash script commands
Also, don't use "set -x" debugging for oc login command:
ci-scripts/cls_cmd.py:242 sets BASH_XTRACEFD=1, which makes that all
"set -x" output is in stdout, leading to a redirect to the file into
which we redirect. This would lead to the following error with
unsuccessfull oc login:

  error: You are not a member of project "****-core-for-ci-ran".
  Error from server (Forbidden): imagestreams.image.openshift.io "oai-physim"
  is forbidden: User "system:anonymous" cannot get resource "imagestreams" in
  API group "image.openshift.io" in the namespace "****-ran"
2025-10-07 08:09:20 +02:00
Robert Schmidt
958fe1ed75 OC PhySim deployment: always undeploy safely
This fixes basically two problems. First, remove "set -e", which leads
to the script exiting on error. For instance, there was the sleep which
should account for the time of the pod being in "ContainerCreating", but
might not be enough. In that case, the script would exit, leaving the
pod deployed.

Second, a fixed time is not good, as it can be too short and unduly
prolong waiting time. Replace with a loop.
2025-10-06 16:16:39 +02:00
francescomani
8411a428db prevent faulty behavior of nr_compute_tbs when null input is not producing TBS = 0 2025-10-06 11:10:38 +02:00
Guido Casati
d6047cd83d Fix memory leak in dlInformationTransfer case
- Remove unnecessary NULL assignment for dedicatedNAS_Message->buf
- The original buffer is copied and transfered to NAS, so it can be properly freed by ASN.1 structure cleanup

Root cause: Code was nullifying dedicatedNAS_Message->buf pointer before ASN.1 cleanup could free the original allocation, causing the leak from OCTET_STRING_decode_uper.

AddressSanitizer leak trace (FIXED):
Direct leak of 119 byte(s) in 3 object(s) allocated from:
    /#0 0x7ec2a42b4c38 in __interceptor_realloc
    /#1 0x555fade852e0 in OCTET_STRING_decode_uper
    /#9 0x555fadb48b11 in nr_rrc_ue_decode_dcch.
2025-10-03 12:39:14 +02:00
Guido Casati
9639cbb436 Fix memory leak in nr_rrc_process_dedicatedNAS_MessageList
The leak was caused by improper memory ownership handling in the
dedicatedNAS_MessageList processing. The function was transferring
buffer ownership to NAS messages and then preventing ASN.1 cleanup
from freeing the original allocations by setting
list.count = 0, causing a memory leak.

Leak trace:
Direct leak of 40 byte(s) in 1 object(s) allocated from:
    /#0 0x7f2ce3ab4a57 in __interceptor_calloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:154
    /#1 0x567907083f0f in OCTET_STRING_decode_uper /cmake_targets/ran_build/build/openair2/RRC/LTE/MESSAGES/OCTET_STRING_uper.c:89
    /#2 0x5679070ed5e6 in SET_OF_decode_uper /cmake_targets/ran_build/build/openair2/RRC/NR/MESSAGES/constr_SET_OF_uper.c:70
    /#3 0x56790707b6dc in SEQUENCE_decode_uper /cmake_targets/ran_build/build/openair2/RRC/LTE/MESSAGES/constr_SEQUENCE_uper.c:118
    /#4 0x56790707b6dc in SEQUENCE_decode_uper /cmake_targets/ran_build/build/openair2/RRC/LTE/MESSAGES/constr_SEQUENCE_uper.c:118
    /#5 0x56790709a403 in CHOICE_decode_uper /cmake_targets/ran_build/build/openair2/RRC/LTE/MESSAGES/constr_CHOICE_uper.c:84
    /#6 0x56790707b6dc in SEQUENCE_decode_uper /cmake_targets/ran_build/build/openair2/RRC/LTE/MESSAGES/constr_SEQUENCE_uper.c:118
    /#7 0x56790709a403 in CHOICE_decode_uper /cmake_targets/ran_build/build/openair2/RRC/LTE/MESSAGES/constr_CHOICE_uper.c:84
    /#8 0x56790709a403 in CHOICE_decode_uper /cmake_targets/ran_build/build/openair2/RRC/LTE/MESSAGES/constr_CHOICE_uper.c:84
    /#9 0x56790707b6dc in SEQUENCE_decode_uper /cmake_targets/ran_build/build/openair2/RRC/LTE/MESSAGES/constr_SEQUENCE_uper.c:118
    /#10 0x56790708b5f1 in uper_decode /cmake_targets/ran_build/build/openair2/RRC/LTE/MESSAGES/uper_decoder.c:83
    /#11 0x567906d44b4b in nr_rrc_ue_decode_dcch /openair2/RRC/NR_UE/rrc_UE.c:2212
    /#12 0x567906d520a3 in rrc_nrue /openair2/RRC/NR_UE/rrc_UE.c:2615
    /#13 0x567906d5f77e in rrc_nrue_task /openair2/RRC/NR_UE/rrc_UE.c:2501
    /#14 0x7f2ce2494ac2 in start_thread nptl/pthread_create.c:442

Fix:
- Copy OCTET_STRING data instead of transferring ownership
- Allow ASN.1 cleanup to properly free original allocations

This fixes the leak that occurred during rrcReconfiguration
message processing when dedicatedNAS_MessageList was present.

Closes #828
2025-10-03 12:35:12 +02:00
Guido Casati
9086fb63de Fix memory leak in nr_rrc_ue_process_masterCellGroup
- Replace asn1cFreeStruc with ASN_STRUCT_FREE in MAC layer cleanup
- Fixes improper memory management of NR_CellGroupConfig structures

Root cause: asn1cFreeStruc only calls ASN_STRUCT_RESET + free(), which doesn't properly free nested ASN.1 allocations. ASN_STRUCT_FREE frees all nested structures completely.

AddressSanitizer leak trace:
Direct leak of 288 byte(s) in 1 object(s) allocated from:
    /#0 0x7fb72bab4a57 in __interceptor_calloc
    /#1 0x593752b28d0d in SEQUENCE_decode_uper
    /#2 0x593752b9a546 in SET_OF_decode_uper
    /#3 0x593752b2863c in SEQUENCE_decode_uper
    /#4 0x593752b47363 in CHOICE_decode_uper
    /#5 0x593752b2863c in SEQUENCE_decode_uper
    /#6 0x593752b2863c in SEQUENCE_decode_uper
    /#7 0x593752b2863c in SEQUENCE_decode_uper
    /#8 0x593752b2863c in SEQUENCE_decode_uper
    /#9 0x593752b2863c in SEQUENCE_decode_uper
    /#10 0x593752b38551 in uper_decode
    /#11 0x5937527d859f in nr_rrc_ue_process_masterCellGroup
    /#12 0x5937527d9408 in nr_rrc_process_reconfiguration_v1530
    /#13 0x5937527dd5bb in nr_rrc_ue_process_rrcReconfiguration
    /#14 0x5937527f5e6b in nr_rrc_ue_decode_dcch
    /#15 0x5937527ff003 in rrc_nrue
    /#16 0x59375280c6de in rrc_nrue_task
2025-10-03 10:38:38 +02:00
Laurent THOMAS
7355b55ad1 this MR replaces constants INT16_MIN by -INT16_MAX (so -32767) in places where it used for mathematical operations 2025-10-03 10:02:48 +02:00
francescomani
42b6576d81 fix RSRP computation at UE (let the higher layers compute the index) 2025-10-03 08:42:41 +02:00
rmagueta
8ca05e51ac Added graph in T_Tracer to observe UL-SNR calculated using SRS 2025-10-02 11:43:07 +01:00
rmagueta
799934024e SRS-based noise calculation using holes 2025-10-02 11:43:07 +01:00
Jaroslava Fiedlerova
55a56002de Merge branch 'integration_2025_w40' into 'develop'
Integration: `2025.w40`

* !3672 \[ci\] Fix MissingPropertyException - COTS-UE by binding OAI_Registry globally
* !3609 BWP with no PRACH occasions
* !3657 do not assert for mismatched TBS in phy-test mode
* !3667 CI: Updates for HO and AW2S pipeline
* !3674 NR UE: remove function get_nr_RSRP() and get_nr_rx_total_gain_dB() for cleanup
* !3478 NR UE: add UCI (HARQ-ACK/NACK) on PUSCH support at PHY
* !3664 modulation LUTs size was wrong, and remove inconsistent test of SSE2 enable
* !3665 Make all targets compile
* !3554 Handle failures in RRCReconfiguration encoding gracefully
* !3655 Improvements to N2 handover
* !3678 Add OAIUE longrun pipeline
* !3628 Update documentation

Closes #979, #726, #959, #967, and #930

See merge request oai/openairinterface5g!3676
2025-10-02 08:43:12 +00:00
Robert Schmidt
97185a6921 Merge remote-tracking branch 'origin/update_documentation' into integration_2025_w40 (!3628)
Update documentation
2025-10-01 22:28:38 +02:00
Robert Schmidt
5047bacd6d Merge remote-tracking branch 'origin/oaiue_longrun' into integration_2025_w40 (!3678)
Add OAIUE longrun pipeline

Add a new XML file for OAIUE longrun.

- Test description:
  * 40 MHz BW, n78
  * gNB with USRP N310, UE with USRP N310
  * CN deployed on OC
- Test duration: 1 hour
- Test scenario: 3x DL 10 min test (20 Mbps) + 3x UL 10 min test (5
  Mbps)
2025-10-01 22:21:13 +02:00
Robert Schmidt
7eb33a4003 Workaround: give pod deployment more time
pods deployed through helm occasionally take more time, leading to
errors such as

    Error from server (BadRequest): container "physim" in pod "oai-physims-4g-sczvl" is waiting to start: ContainerCreating

Give a bit more time before checking the logs. We cannot wait too much,
as the container will just end on FINISHED in running state, so the logs
will always be there.
2025-10-01 22:13:50 +02:00
Jaroslava Fiedlerova
3e5681abbd Merge remote-tracking branch 'origin/n2-handover-minor-fixes' into integration_2025_w40 (!3655)
The goal of this MR is to resolve memory leaks, prevent crashes, and improve code quality.

Bug Fixes:
- Fix crash in get_du_for_ue when F1 UE data doesn't exist during N2 handover
- Fix memory leaks in handover preparation and UE context cleanup
- Fix duplicate handover request handling with proper UE context validation

Code Quality Improvements:
- Prevent ASN.1 double-free bug in NGAP memory management (caller ownership
  principle)
- Fix hardcoded instance 0 bug in UE context release command
- Refactor e1_send_bearer_updates into three specialized functions with
  extracted common code
- Replace impossible ID mismatch checks with DevAssert statements
- Fix inconsistent equality checking patterns in E1AP bearer context management
- Improve error message consistency across NGAP handover functions
- Optimize PLMN identity assignment using struct copies

Documentation Enhancements:
- Improve RRC neighbor configuration documentation with actual parameter names
- Add same-machine setup guidance for N2 handover with network configuration
  notes
- Fix grammar errors and standardize naming conventions

Follow up to !3334 (merged)
2025-10-01 18:08:28 +02:00
calvin_peyron
8fcea7c314 Update UL_MIMO documentation 2025-10-01 16:22:46 +02:00
calvin_peyron
23e0f50af0 Change D2D emulator documentation format 2025-10-01 16:22:46 +02:00
calvin_peyron
2dd72d40cb Put documentation images in right folder 2025-10-01 16:22:46 +02:00
calvin_peyron
e7a45a304b Remove unused and outdated documentation 2025-10-01 16:22:46 +02:00
calvin_peyron
2d2f61f253 Fix link in rrc-usage.md 2025-10-01 16:22:46 +02:00
calvin_peyron
aa323b02f2 Fix link in mac-usage.md 2025-10-01 16:22:46 +02:00
calvin_peyron
0721c0fad0 Fix image link inside F1AP-lib.md 2025-10-01 16:22:46 +02:00
calvin_peyron
25918898a7 Update F1-design.md 2025-10-01 16:22:46 +02:00
calvin_peyron
acd3634d27 Update E1-design.md 2025-10-01 16:22:46 +02:00
Laurent THOMAS
a0d8baf323 update and rename TESTING_GNB_W_COTS_UE.md to describe actual content 2025-10-01 16:22:46 +02:00
calvin_peyron
2ea4cbbd93 update env variable usage documentation 2025-10-01 16:22:40 +02:00
Jaroslava Fiedlerova
8348f83a1f Merge remote-tracking branch 'origin/issue-979' into integration_2025_w40 (!3554)
Handle failures in RRCReconfiguration encoding gracefully

Closes #979
2025-10-01 14:51:43 +02:00
Jaroslava Fiedlerova
5adfeb80c3 Merge remote-tracking branch 'origin/make-all-targets-compile' into integration_2025_w40 (!3665)
Make all targets compile

This MR enables us to compile all targets, and does that in one CI test. This
closes #726. Now, this should work:

cd ~/openairinterface5g
mkdir build && cd build
cmake .. -GNinja && ninja

To achieve this, I did the following:
- some targets have been fixed (warnings, errors)
- some targets have been removed when they did not seem to serve a good purpose
  (e.g., an almost empty test)
- some targets have been commented (e.g., LTE simulators, some unitary tests)
  which we maybe want to revive in the future
- some targets built when just building with ninja, but not all. For instance,
  telnetsrv_enb would typically build, but it was missing a dependency. Doing
  cmake .. -GNinja && ninja telnetsrv_enb would show this (in develop)

To help with the last bullet point, there is a script compile_targets.sh that
can compile targets independently (and in parallel, to not wait for ages) to
show that targets compile properly compile-targets.patch.

In almost all cases, the problem is that a specific module uses the logging
module, which depends on T, which needs to dynamically create headers. The way
to do this is to have a dependency, and many targets use generate_T or {T_LIB}
({} intentional: T might be absent, so then it evaluates to nothing). However,
not all do this, and those that depend on T actually don't depend on T, but on
the logging module, which in turn depends on T. So in many places, a simple
dependency onto log_headers fixes this problem, and generate_T or {T_LIB}
simplifies the dependency (but not always). The commits should have more info.

Note that at least the targets in FlexRIC do not all compile, at least in the
configuration that we use in docker/Dockerfile.build.ubuntu. So for the latter,
we cannot build with a simple ninja, but FlexRIC seems to be the only one that
does not compile. Since FlexRIC is a separate repository, that needs to be
addressed in the corresponding repository.
2025-10-01 14:48:45 +02:00
Jaroslava Fiedlerova
2dde472cfd Adjust gNB conf file in OAIUE test
Increase prach_dtx_threshold to avoid fake PRACH detection.
2025-10-01 13:36:53 +02:00
Jaroslava Fiedlerova
7935c19d21 Fix in CreateWorkspace
Previously, the script attempted to directly merge ${merge}, which could f
ail if the branch was not already available locally. This update explicitly
fetches the branch from origin and then merges FETCH_HEAD with --ff, ensuring
the merge works even when the branch is missing locally.
2025-10-01 13:36:53 +02:00
Jaroslava Fiedlerova
6193d7c7f4 Create XML for OAIUE longrun pipeline
Test duration: 1 hour
Test scenario: 3x DL 10 min test (20 Mbps) + 3x UL 10 min test (5 Mbps)
2025-10-01 13:36:49 +02:00
Guido Casati
dcb10ffc94 Handover tutorial: fix minor issues and add same-machine setup guidance
- Update opening statement to reflect both F1 (intra-gNB) and N2 (inter-gNB) handover support
- Fix grammar error: 'either by by decision' -> 'either a decision'
- Standardize naming: 'gNB PCI1' -> 'gNB-PCI1'
- Fix typo: 'neighbor call' -> 'neighbor cell'
- Remove --sa flag from N2 handover target gNB command for consistency
- Add network configuration notes for same-machine setups:
  * IP address assignment instructions to avoid network conflicts
  * Target gNB command options for proper network interface configuration
2025-10-01 11:36:22 +02:00
Guido Casati
dcd7ee711b Improve RRC neighbor configuration documentation
- Move 'What is a gNB neighbor?' explanation from rrc-usage.md to handover-tutorial.md where it belongs
- Replace generic parameter names with actual configuration parameter names and specific descriptions (e.g. gNB_ID, nr_cellid)
- Add example configuration structure showing proper syntax
- Add missing 'band' parameter that was not listed before
- Provide concrete examples and exact constraints for each parameter
- Cross-reference between documents for better organization

This addresses documentation issues where generic parameter descriptions were
not useful for developers configuring neighbor cells.
2025-10-01 11:36:22 +02:00
Guido Casati
4aafd1e369 Simplify N2 handover test to focus on N2 handover only
- Remove extensive traffic testing before HO (iperf tests 030001, 030002)
- Do 1 ping test after attachment
- Reduce ping packet count from 100 to 50 packets for remaining connectivity test

Time savings: ~2-3 minutes by removing traffic validation overhead
2025-10-01 11:36:22 +02:00
Guido Casati
9d9f272e74 Refactor: split e1_send_bearer_updates into specialized functions
Split monolithic e1_send_bearer_updates into three focused functions:
- e1_send_bearer_updates(): DRB setup from F1 UE Context Modification Response
- e1_request_pdcp_status(): Request PDCP status during inter-CU handover
- e1_notify_pdcp_status(): Notify CU-UP with PDCP status during handover

Extract common helpers:
- append_e1_drb_mod_req(): Common DRB-to-mod for bearer request logic
- e1_send_bearer_modification_request(): Common sending step

Bug fixes:
- Fix loop bounds (i < n instead of i == n)
- Fix array access bounds checking
- Fix DRB ID consistency

Memory management:
- Add missing free_e1ap_context_mod_request calls
- Improve error handling with early returns

In the process:
- Simplify cuup_notify_reestablishment with FOR_EACH_SEQ_ARR loop
- Adopted all callers to use new consolidated functions

Improves maintainability and eliminates complex conditional logic.
2025-10-01 11:36:22 +02:00
Guido Casati
205bf7c993 Add NULL check for DU lookup in handover notify
Add early return if get_du_by_cell_id returns NULL to prevent
segmentation fault when accessing DU structure members.
2025-10-01 11:36:22 +02:00
Guido Casati
1fc057cb08 Optimize PLMN identity assignment in handover procedures
Replace field-by-field assignment with struct copy for plmn_identity.
Both source and destination use identical plmn_id_t type, making
this change safe and more maintainable.

- Reduces lines of code
- More readable and less error-prone
- Single memory copy operation instead of multiple field assignments
2025-10-01 11:36:22 +02:00
Guido Casati
c6a06dc81f Improve error message consistency in NGAP handover functions
- ngap_gNB_handover_notify: Fix misleading error message from 'Failed to encode'
  to 'Failed to find UE context' for better clarity
- ngap_gNB_handle_ul_ran_status_transfer: Standardize error message format
  from 'Could not find' to 'Failed to find' for consistency across functions

This ensures consistent and accurate error reporting across all NGAP handover functions.
2025-10-01 11:36:22 +02:00
Guido Casati
0cbed89b03 Replace malloc_or_fail with calloc_or_fail for safer memory allocation
- Update encoder functions in ngap_gNB_mobility_management.c to use calloc_or_fail
- Provides zero-initialized memory and consistent error handling
- Prevents uninitialized fields and improves memory safety

Also:

- Update NG Setup Request to use calloc_or_fail
2025-10-01 11:36:22 +02:00
Guido Casati
3e8354727e Remove redundant NULL checks for handover encoder functions
Handoer encoder functions never return NULL - they either return
a valid pointer or terminate the program. Remove dead code paths.
2025-10-01 11:36:22 +02:00
Guido Casati
c2e8743a7b Optimize create_measgap_config to eliminate unnecessary allocation
- Replace inefficient 'allocate, extract, free' pattern with direct value extraction
- Remove unused functions get_gap_config_from_smtc() and get_gap_config()
- Add extract_gap_config_from_smtc() that extracts values directly without allocation
- Eliminates use-after-free risk and improves performance
- No allocation overhead, no memory leaks
2025-10-01 11:36:22 +02:00
Guido Casati
feea066c3f Fix measurement gap config memory leak in create_measgap_config
- Add missing ASN_STRUCT_FREE for NR_MeasGapConfig in create_measgap_config
- Fix 48-byte measurement gap config leak in get_gap_config_from_smtc

AddressSanitizer backtrace:
Direct leak of 48 byte(s) in 1 object(s) allocated from:
    /#0 0x7d32adab4a57 in __interceptor_calloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:154
    /#1 0x5751f99cbb79 in calloc_or_fail /home/guido/repo/openairinterface5g/develop/common/utils/utils.h:74
    /#2 0x5751f99cbb79 in get_gap_config_from_smtc /home/guido/repo/openairinterface5g/develop/openair2/LAYER2/NR_MAC_gNB/nr_radio_config.c:4164
    /#3 0x5751f99cbb79 in create_measgap_config /home/guido/repo/openairinterface5g/develop/openair2/LAYER2/NR_MAC_gNB/nr_radio_config.c:4310
    /#4 0x5751f9964abe in ue_context_setup_request /home/guido/repo/openairinterface5g/develop/openair2/LAYER2/NR_MAC_gNB/mac_rrc_dl_handler.c:709
    /#5 0x5751f979e568 in nr_initiate_handover /home/guido/repo/openairinterface5g/develop/openair2/RRC/NR/rrc_gNB_mobility.c:218
    /#6 0x5751f97a637f in nr_rrc_trigger_n2_ho_target /home/guido/repo/openairinterface5g/develop/openair2/RRC/NR/rrc_gNB_mobility.c:526
    /#7 0x5751f9703608 in rrc_gNB_process_e1_bearer_context_setup_resp /home/guido/repo/openairinterface5g/develop/openair2/RRC/NR/rrc_gNB.c:2641
    /#8 0x5751f9706b7b in rrc_gnb_task /home/guido/repo/openairinterface5g/develop/openair2/RRC/NR/rrc_gNB.c:3020
    /#9 0x7d32ac494ac2 in start_thread nptl/pthread_create.c:442

Root cause: create_measgap_config allocated NR_MeasGapConfig via get_gap_config_from_smtc()
but never freed it after extracting the needed values to populate the measgap_config_t
return structure.
2025-10-01 11:36:22 +02:00
Guido Casati
5e3b4c497c Refactor handover context cleanup and fix memory leak in N2 handover source gNB path
- Add missing handover context cleanup in rrc_CU_process_ue_context_release_complete
- Fix 16-byte handover context leak in N2 handover source gNB trigger path

AddressSanitizer backtrace:
Direct leak of 16 byte(s) in 1 object(s) allocated from:
    /#0 0x7fee67cb4a57 in __interceptor_calloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:154
    /#1 0x58059e33454b in calloc_or_fail /home/guido/repo/openairinterface5g/develop/common/utils/utils.h:74
    /#2 0x58059e33454b in alloc_ho_ctx /home/guido/repo/openairinterface5g/develop/openair2/RRC/NR/rrc_gNB_mobility.c:47
    /#3 0x58059e339e4d in nr_rrc_trigger_n2_ho /home/guido/repo/openairinterface5g/develop/openair2/RRC/NR/rrc_gNB_mobility.c:556
    /#4 0x58059e33ae93 in nr_HO_N2_trigger_telnet /home/guido/repo/openairinterface5g/develop/openair2/RRC/NR/rrc_gNB_mobility.c:611

Root cause: Handover context allocated in N2 handover source gNB trigger path (nr_rrc_trigger_n2_ho)
for any successful N2 handover but not properly freed in all handover completion scenarios.
The UE context release complete handler was missing cleanup for handover context.

Solution: refactor handover context cleanup

- Move nr_rrc_finalize_ho() call to rrc_delete_ue_data() for centralized cleanup
- Remove redundant nr_rrc_finalize_ho() calls from handover failure paths:
  * rrc_CU_process_ue_context_release_request() - UE not deleted yet
  * invalidate_du_connections() - UE will be deleted later
- Keep nr_rrc_finalize_ho() calls in handover success paths where UE continues operating
- Ensures handover context is cleaned up exactly once when UE is actually deleted
- Prevents potential double-free and use-after-free issues in handover cleanup

This centralizes all UE data cleanup in rrc_delete_ue_data() and ensures
handover context is properly managed throughout the UE lifecycle and cleaned up
when UE delete happens.
2025-10-01 11:36:22 +02:00
Jaroslava Fiedlerova
7c82312b6d Merge remote-tracking branch 'origin/fix-modulation-luts-size' into integration_2025_w40 (!3664)
modulation LUTs size was wrong, and remove inconsistent test of SSE2 enable
2025-09-30 17:38:09 +02:00
Jaroslava Fiedlerova
3277018fce Merge remote-tracking branch 'origin/uci_on_pusch_phy' into integration_2025_w40 (!3478)
NR UE: add UCI (HARQ-ACK/NACK) on PUSCH support at PHY

Add UCI (HARQ-ACK/NACK) on PUSCH support at nrUE PHY, the multiplexing procedure
can be found in TS 38.212 section 6.2.7.

Verified with 3rd-pary gNB for cases when HARQ payload bits length is 1, 2 or 3.

Closes #959 and #967 .
2025-09-30 17:37:01 +02:00
Jaroslava Fiedlerova
3e79774386 Enable DLSCH performance logging in nr_dlsim 2025-09-30 14:03:20 +02:00
Jaroslava Fiedlerova
ff3245ea90 Enable ULSCH performance logging in nr_ulsim 2025-09-30 14:03:20 +02:00
Guido Casati
915c41c127 Fix MTC sequence memory leak in UE context setup
- Add missing ASN_STRUCT_FREE for NR_MeasurementTimingConfiguration in ue_context_setup_request
- Fix 64-byte MTC sequence leak in get_nr_mtc → SEQUENCE_decode_uper

AddressSanitizer backtrace:
Direct leak of 64 byte(s) in 1 object(s) allocated from:
    /#0 0x7dcfcb8b4a57 in __interceptor_calloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:154
    /#1 0x591fcc59b67d in SEQUENCE_decode_uper /home/guido/repo/openairinterface5g/develop/cmake_targets/ran_build/build/openair2/RRC/LTE/MESSAGES/constr_SEQUENCE_uper.c:37
    /#2 0x591fcc57eaa1 in uper_decode /home/guido/repo/openairinterface5g/develop/openair2/RRC/LTE/MESSAGES/uper_decoder.c:83
    /#3 0x591fcbdbedeb in get_nr_mtc /home/guido/repo/openairinterface5g/develop/openair2/LAYER2/NR_MAC_gNB/nr_radio_config.c:4216
    /#4 0x591fcbd58188 in ue_context_setup_request /home/guido/repo/openairinterface5g/develop/openair2/LAYER2/NR_MAC_gNB/mac_rrc_dl_handler.c:635
    /#5 0x591fcbb92568 in nr_initiate_handover /home/guido/repo/openairinterface5g/develop/openair2/RRC/NR/rrc_gNB_mobility.c:218
    /#6 0x591fcbb9a37f in nr_rrc_trigger_n2_ho_target /home/guido/repo/openairinterface5g/develop/openair2/RRC/NR/rrc_gNB_mobility.c:526
    /#7 0x591fcbaf7608 in rrc_gNB_process_e1_bearer_context_setup_resp /home/guido/repo/openairinterface5g/develop/openair2/RRC/NR/rrc_gNB.c:2640
    /#8 0x591fcbafab7b in rrc_gnb_task /home/guido/repo/openairinterface5g/develop/openair2/RRC/NR/rrc_gNB.c:3019
    /#9 0x7dcfca294ac2 in start_thread nptl/pthread_create.c:442

Root cause: ue_context_setup_request allocated NR_MeasurementTimingConfiguration via
get_nr_mtc() but never freed it after creating the measurement gap configuration.
The create_measgap_config function only reads from the structure and doesn't take
ownership, so the caller must free it.
2025-09-30 11:48:53 +02:00
Guido Casati
487de67ff8 Fix measurement configuration memory leak with stack allocation
- Replace heap allocation with stack allocation for seq_arr_t structures
- Use proper seq_arr_free() with free functions for ASN.1 structures
- Remove unnecessary malloc/free calls for sequence containers
- Improve memory safety and performance with automatic cleanup

Fixes 128-byte memory leak:

Direct leak of 128 byte(s) in 2 object(s) allocated from:
   /#0 0x7e7f39ab4a57 in __interceptor_calloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:154
   /#1 0x56df8b07312d in SEQUENCE_decode_uper /home/guido/repo/openairinterface5g/develop/cmake_targets/ran_build/build/openair2/RRC/LTE/MESSAGES/constr_SEQUENCE_uper.c:37
   /#2 0x56df8b056551 in uper_decode /home/guido/repo/openairinterface5g/develop/cmake_targets/ran_build/build/openair2/RRC/LTE/MESSAGES/uper_decoder.c:83
   /#3 0x56df8a896b1b in get_nr_mtc /home/guido/repo/openairinterface5g/develop/openair2/LAYER2/NR_MAC_gNB/nr_radio_config.c:4216
   /#4 0x56df8a82feb8 in ue_context_setup_request /home/guido/repo/openairinterface5g/develop/openair2/LAYER2/NR_MAC_gNB/mac_rrc_dl_handler.c:635
   /#5 0x56df8a66a298 in nr_initiate_handover /home/guido/repo/openairinterface5g/develop/openair2/RRC/NR/rrc_gNB_mobility.c:218
   /#6 0x56df8a6720af in nr_rrc_trigger_n2_ho_target /home/guido/repo/openairinterface5g/develop/openair2/RRC/NR/rrc_gNB_mobility.c:526
   /#7 0x56df8a5cf338 in rrc_gNB_process_e1_bearer_context_setup_resp /home/guido/repo/openairinterface5g/develop/openair2/RRC/NR/rrc_gNB.c:2633
   /#8 0x56df8a5d28ab in rrc_gnb_task /home/guido/repo/openairinterface5g/develop/openair2/RRC/NR/rrc_gNB.c:3012
   /#9 0x7e7f38494ac2 in start_thread nptl/pthread_create.c:442
2025-09-30 11:48:53 +02:00
Guido Casati
59803e221f Fix duplicate handover request handling
- Add early check for existing UE context by AMF UE NGAP ID at beginning of rrc_gNB_process_Handover_Request
- Add dedicated function to get UE context by AMF UE NGAP ID: rrc_gNB_get_ue_context_by_amf_ue_ngap_id()
- Send handover failure with appropriate cause if UE context already exists
- Remove redundant ho_context NULL check that could never be true for newly created UE contexts
- Prevents duplicate handover processing and resource leaks
2025-09-30 11:48:53 +02:00
Guido Casati
1357158722 Fix hardcoded instance 0 bug in UE context release command
Use the instance parameter instead of hardcoded 0 to access the correct
RRC instance. Also clean up redundant variable initialization.
2025-09-30 11:48:53 +02:00
Guido Casati
de07668b0b Fix potential memory leak in ngap_gNB_handover_request_acknowledge
Move UE context creation and storage to after successful PDU encoding
to prevent memory leaks if encoding fails. Also add proper PDU cleanup
when AMF fetch fails and use consistent NULL check style.

This ensures UE context is only stored when the operation is guaranteed
to succeed, improving error handling and memory management.
2025-09-30 11:48:53 +02:00
Guido Casati
235493aa07 Fix ASN.1 memory management ownership in NGAP functions
In the current memory management the caller wasn't responsible for freeing
memory they allocate. The ngap_gNB_encode_pdu function was taking ownership
of PDU contents by calling ASN_STRUCT_FREE_CONTENTS_ONLY, while callers
also expected to manage the same memory. This created unclear ownership semantics and
potential double-free bugs.

- Remove ASN_STRUCT_FREE_CONTENTS_ONLY from ngap_gNB_encode_pdu to prevent double-free
- Remove unnecessary ASN_STRUCT_FREE when encode function returns NULL
- Add proper ASN_STRUCT_FREE cleanup for heap-allocated PDUs in ngap_gNB.c functions
- Add ASN_STRUCT_FREE_CONTENTS_ONLY cleanup for stack-allocated PDUs in NAS and context management functions
- Ensure consistent memory cleanup patterns across all NGAP encoder callers
- Fix potential memory leaks in all ngap_gNB_encode_pdu call sites

This prevents double-free bugs and ensures proper cleanup of ASN.1 structures
in both heap and stack allocation scenarios.
2025-09-30 11:48:53 +02:00
Guido Casati
524a3ddf85 Fix xer_fprint parameter in ngap_handover_required
Fix incorrect xer_fprint parameter - should pass pdu instead of &pdu
to properly print ASN.1 structure for debugging.
2025-09-30 11:48:53 +02:00
Robert Schmidt
12d92bc836 Fix crash in get_du_for_ue when F1 UE data does not exist
Add check for cu_exists_f1_ue_data() before calling cu_get_f1_ue_data()
to prevent assertion failure when telnet command 'ci fetch_du_by_ue_id'
is used for UEs that have been handed over via N2 (and no longer have
F1 UE data).

This fixes the crash:
Assertion (ret == HASH_TABLE_OK && data != ((void *)0)) failed!
In get_hashtable_data() /oai-ran/openair2/F1AP/f1ap_ids.c:36
element for ue_id 1 not found

The function now returns NULL gracefully when F1 UE data is not available.

Co-authored-by: Guido Casati <hello@guidocasati.com>
2025-09-30 11:48:53 +02:00
Guido Casati
a38aa1bab8 Fix memory leaks in fill_removal_lists_from_source_measConfig
- Add proper cleanup of allocated ASN.1 structures in all return paths
- Fix early returns that were leaking NR_HandoverPreparationInformation
- Fix early returns that were leaking NR_RRCReconfiguration
- Add cleanup at end of successful function execution

This prevents memory leaks when processing handover preparation information
during N2 handover procedures.
2025-09-30 11:48:53 +02:00
Guido Casati
b4485ecea2 Fix UE context leak in handover failure
- Add UE context cleanup before sending handover failure message
- Prevents memory/resource leak when PDU session establishment fails during handover
- UE context was created but never cleaned up on failure path

This fixes a bug where UE contexts would accumulate over time
when handovers failed after context creation.
2025-09-30 11:48:41 +02:00
Guido Casati
fd50ff43cc Handle gracefully encoding failure in build_RRCReconfiguration_IEs
closes #979
2025-09-30 11:23:45 +02:00
Sakthivel Velumani
59ff9ae04e ulsim: test UCI on PUSCH with matlab
Since there is no UCI on PUSCH implementation in gNB, it is good to test
UE's implementation with matlab.

This commit allows to test with matlab in two ways:
1. generate OFDM waveform from ulsim and decode it in matlab using
uci_on_pusch_decode.m
2. generate codeword in matlab using uci_on_pusch_encode.m read it in
ulsim and compare the bits. ulsim option -o is used
2025-09-30 00:24:39 +08:00
Sakthivel Velumani
83bf140bc3 Add flag for Tx phase pre compensation
Used in ulsim to verify waveform in MATLAB
2025-09-30 00:24:39 +08:00
Sakthivel Velumani
b2174cb8e1 Add processing stats for UCI mapping on PUSCH 2025-09-30 00:24:36 +08:00
Sakthivel Velumani
8de13fab97 Simplify code 2025-09-30 00:23:00 +08:00
alexjiao
ac76c6e27a Add functions to calculate M_bit for PUCCH format 2/3/4
Add functions to calculate PUCCH format 2/3/4 rate matching output sequence length (M_bit),
according to 3GPP TS 38.212 Table 6.3.1.4-1.
2025-09-30 00:23:00 +08:00
alexjiao
b69b65ba66 Handle UCI on PUSCH scrambling
When the codeword has UCI multiplexed with data, we need to handle UCI scrambling according to 38.211 section 6.3.1.1.
Especially when O_ACK <= 2 there are x and y placeholder bits for UCI.
2025-09-30 00:23:00 +08:00
alexjiao
1c5af6065c Handle UCI on PUSCH procedures at PHY
Get beta offset, alpha scaling and other parameters to calculate rate matching information for UCI on PUSCH,
then use the rate matching info to encode UCI and re-encode PUSCH, call nr_uci_on_pusch to get final multiplexed codeword for scrambling.
2025-09-30 00:22:58 +08:00
calvin_peyron
63397ac592 Remove RFSIMULATOR environment variable 2025-09-29 15:14:39 +02:00
Laurent THOMAS
3f9dcee5fa remove a dead function 2025-09-29 15:14:39 +02:00
calvin_peyron
7d70617a01 Fix documentation broken links 2025-09-29 15:14:39 +02:00
Robert Schmidt
e7c4b9c4cb Merge branch 'registry-cots-ue' into 'develop'
[ci] Fix MissingPropertyException - COTS-UE by binding OAI_Registry globally

See merge request oai/openairinterface5g!3672
2025-09-29 11:28:47 +00:00
Jaroslava Fiedlerova
d6f0b5a9d7 Merge remote-tracking branch 'origin/cleanup-ue-get-nr-rsrp' into integration_2025_w40 (!3674)
NR UE: remove function get_nr_RSRP() and get_nr_rx_total_gain_dB() for cleanup

The function get_nr_RSRP() and get_nr_rx_total_gain_dB() are not used anywhere
in the code, removing for cleanup.
2025-09-29 13:12:36 +02:00
Jaroslava Fiedlerova
afebd033f6 Merge remote-tracking branch 'origin/ci-ho-freq-update' into integration_2025_w40 (!3667)
CI: Updates for HO and AW2S pipeline

This MR introduces several CI updates:

- Change center frequency from 3439 MHz (n78) to 4185 MHz (n77) in HO setup to
  prevent interference with other lab setups.
- Enable attaching multiple AmariUEs simultaneously in the AW2S pipeline - save
  ~25s.
- Update RX gain configuration on AmariUE - improve DL throughput.
2025-09-29 13:11:14 +02:00
Jaroslava Fiedlerova
6e424af56b Merge remote-tracking branch 'origin/issue930' into integration_2025_w40 (!3657)
do not assert for mismatched TBS in phy-test mode

Closes #930
2025-09-29 12:56:24 +02:00
Jaroslava Fiedlerova
1e61c2ccb4 Merge remote-tracking branch 'origin/BWP_with_no_RA' into integration_2025_w40 (!3609)
BWP with no PRACH occasions

This MR includes fixes at gNB and UE in case the current BWP has no PRACH
occasions, i.e. we need to switch to initial BWP.
2025-09-29 12:55:30 +02:00
alexjiao
0fb8a09b86 Remove function get_nr_RSRP() and get_nr_rx_total_gain_dB() for cleanup
The function get_nr_RSRP() and get_nr_rx_total_gain_dB() is not used anywhere in the code.
2025-09-29 17:51:52 +08:00
Shubhika Garg
4b6c18b1dd [ci] Fix MissingPropertyException - COTS-UE by binding OAI_Registry globally
`def` creates a variable local to the script object, not automatically visible inside helper functions.

This fixes the following exception in Jenkins:

    Found unhandled groovy.lang.MissingPropertyException exception:
    No such property: OAI_Registry for class: groovy.lang.Binding
2025-09-29 11:37:23 +02:00
Robert Schmidt
60ab0a89a2 Build all targets in Cluster PhySim build 2025-09-29 09:04:02 +02:00
Robert Schmidt
2ff949a16f Correct dependencies onto logging module
These libraries depend on the logging module, so add the right
dependency log_headers. Indirectly, this will fulfill the condition of
T. I consider the prior usage of generate_T or {T_LIB} incorrect,
because basically none of these libraries actually, actively use T, but
rather only the logging module, which pulls in T.  The dependency of
log_headers will also take care of generating and including T headers,
which is a dependency of the logging module.

For conf2uedata and related, fulfill the dependency
through conf2uedata_lib (on which the rest depends).
2025-09-29 09:04:02 +02:00
Robert Schmidt
4876533e9c F1AP IDs: Remove unnecessary dependency 2025-09-29 09:04:02 +02: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
1e476735ea xforms uses logging 2025-09-29 09:04:02 +02:00
Robert Schmidt
1b81c4b09c RLC only needs headers for logging 2025-09-29 09:04:02 +02:00
Robert Schmidt
5716d95e97 nr_prachsim: remove unused include 2025-09-29 09:04:02 +02:00
Robert Schmidt
eea7be3977 ldpc_segment: avoid T error, use log_headers for logging
As parent.
2025-09-29 09:04:02 +02:00
Robert Schmidt
19813283fb Avoid T error on radio libraries
These libraries have an (indirect) dependency on T, either by using the
logging module (which in turn depends on T), or through other includes.

The easiest is to depend on the logging module, which will fulfil also
the T dependency.

It would equally be feasible to use the utils target (which in turn
depends on log_headers), but this would necessitate to compile, and does
not seem to be necessary.
2025-09-29 09:04:02 +02:00
Robert Schmidt
2a5ed87589 E2 Agent uses CONFIG_LIB for configuration
Since E2 agent uses the config library, include it directly. This also
makes the dependency on T obsolete, because

- it is the logging headers that are needed, and
- the T dependency is fulfilled through the log_headers.
2025-09-29 09:04:02 +02:00
Robert Schmidt
1ecb03f5f8 Make BladeRF compile
Fix variable name.

See also: 7466297568 ("move command line sample offset [...] at top
  level [...]")
2025-09-29 09:04:02 +02:00
Robert Schmidt
2889e55cd8 Remove redundant target_include_directories() from LOG
The same is achieved by including log_headers.
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
Jaroslava Fiedlerova
fd37fba9b7 Cleanup of libraries/executables from T loop
These libraries/executables are not defined in OAI.
2025-09-29 09:04:02 +02:00
Robert Schmidt
66c3b7d192 Break coding_defs.h dependency on logging module
coding_defs.h included defs_common.h, which pulls in many dependencies,
e.g., the logging module, which pulls in T. However, it does not use
anything of this. So remove, and include stdbool.h instead (because bool
is used in coding_defs.h.

nr_polar_defs.h relied on some includes done in coding_defs. Use
includes for pthreads and SIMD to define types that are used in
nr_polar_defs.h.
2025-09-29 09:04:02 +02:00
Robert Schmidt
eef092c318 Omit JER compilation for NRPPA ASN.1
We don't use JER. This avoids compilation problems, such as:

    /usr/bin/ld: openair3/NRPPA/MESSAGES/libasn1_nrppa.a(INTEGER_jer.c.o): in function `INTEGER_decode_jer':
    tmp.MtrwVDhQqY/openair3/NRPPA/MESSAGES/INTEGER_jer.c:186:(.text+0x5b8): undefined reference to `jer_decode_primitive
2025-09-29 09:04:02 +02:00
Robert Schmidt
72371ba10b Remove unnecessary comment 2025-09-29 09:04:02 +02:00
Robert Schmidt
46ed4ac36d Update comment to reference right target 2025-09-29 09:04:02 +02:00
Robert Schmidt
4177c6d182 Include CMakeLists.txt using add_subdirectory(), simplify 2025-09-29 09:04:02 +02:00
Robert Schmidt
cc094ac737 XNAP asn.1 cmake: ber_decoder.h is not created
XNAP is asn1c compiled with -no-gen-BER. Correspondingly, no
ber_decoder.h file is created. However, when running cmake followed by
ninja, it notices the absence of this file:

    ninja explain: output openair2/XNAP/MESSAGES/ber_decoder.h doesn't exist

which triggers a complete rebuild of XNAP ASN.1. Without this file, the
targets are not marked as dirty.
2025-09-29 09:04:02 +02:00
Robert Schmidt
cede449907 Remove NUMBER_OF_UE_MAX_NB_IoT and make NB_IoT compile
This constant seems to be an analogon to NUMBER_OF_UE_MAX; replace with
the latter, as it does the same. (NBIoT does not work, anyway)

Fix dependencies of the NB_IoT target so it compiles.
2025-09-29 09:04:02 +02:00
Robert Schmidt
a68168805b Remove NB-IoT configuration
Remove, because
1) it does not compile (the asn1c generated code should be prepend with
   LTE_ etc, nobody did that)
2) a shared module makes no sense
3) the configuration is trivial to recreate
2025-09-29 09:04:02 +02:00
Robert Schmidt
1a5e2598a3 Move LTTng check to subdirectory where used 2025-09-29 09:04:02 +02:00
Robert Schmidt
d6c29b2d2c Fix E2_AGENT linking w.r.t. simulators
Link E2_AGENT libraries directly into nr-softmodem/lte-softmodem instead
of L2/L2_NR/F1AP. Doing that ensures that simulators, e.g.,
nr_dlsim/nr_ulsim do still compile. It also simplifies the code.

Prior to this, compiling nr_ulsim with E2_AGENT, for instance, resulted
in the following errors, fixed in this commit:

    FAILED: nr_ulsim
    /usr/bin/ld: openair2/E2AP/RAN_FUNCTION/libe2_ran_func_du_cucp_cuup.a(ran_func_rc.c.o): in function `send_aper_ric_ind':
    /home/oai/robert/cleanup-t-dependency-cmake/openair2/E2AP/RAN_FUNCTION/O-RAN/ran_func_rc.c:643: (.text+0xee6): undefined reference to `async_event_agent_api'
    /usr/bin/ld: /home/oai/robert/cleanup-t-dependency-cmake/openair2/E2AP/RAN_FUNCTION/O-RAN/ran_func_rc.c:643:(.text+0x11ca): undefined reference to `async_event_agent_api'
    /usr/bin/ld: /home/oai/robert/cleanup-t-dependency-cmake/openair2/E2AP/RAN_FUNCTION/O-RAN/ran_func_rc.c:643:(.text+0x1485): undefined reference to `async_event_agent_api'
    /usr/bin/ld: /home/oai/robert/cleanup-t-dependency-cmake/openair2/E2AP/RAN_FUNCTION/O-RAN/ran_func_rc.c:643:(.text+0x159c): undefined reference to `async_event_agent_api'
    /usr/bin/ld: /home/oai/robert/cleanup-t-dependency-cmake/openair2/E2AP/RAN_FUNCTION/O-RAN/ran_func_rc.c:643:(.text+0x16b1): undefined reference to `async_event_agent_api'
    [...]
2025-09-29 09:04:02 +02:00
Robert Schmidt
a31838acd7 CMakeLists.txt: comment out tests that don't compile 2025-09-29 09:04:02 +02:00
Robert Schmidt
ba3a0d2100 CMakeLists.txt: comment out sims that don't compile 2025-09-29 09:04:02 +02:00
Robert Schmidt
124debc2c7 Fix warnings in rftest executable
warning: ‘genericPowerPerAntena’ defined but not used [-Wunused-function]

    warning: ‘graph.text’ is used uninitialized [-Wuninitialized]

    warning: ignoring return value of ‘read’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
2025-09-29 09:04:02 +02:00
Jaroslava Fiedlerova
03d4ce2e1e CI: Attach multiple UEs at once in AW2S test 2025-09-26 15:07:16 +02:00
Jaroslava Fiedlerova
b43dee1499 CI: adjust Amarisoft UE RX gain
Lower the RX gain used by the Amarisoft UE in CI tests to prevent DL signal
saturation. This resolves an issue with low DL throughput observed in CI.
RX/TX signal levels on the Amarisoft UE can be checked with "t spl" command
in lteue; MAX values should not approach 0.
2025-09-26 14:58:47 +02:00
Sakthivel Velumani
5f3a19cb7d Separate segmentation from ULSCH encoding function
Segmentation have to be called before UCI mapping to get number of
segments and sumKr values.
2025-09-26 11:16:54 +08:00
alexjiao
ceda9c1141 Add functions to implement UCI and data multiplexing on PUSCH
Data and control multiplexing procedure is defined in 38.212 section 6.2.7.
Step 3 (CSI1 and CSI2 mapping) is not implemented, only HARQ-ACK.
PUSCH frequency hopping is not supported.
2025-09-26 11:14:12 +08:00
alexjiao
8222fa27e5 Add functions to calculate rate matching information for UCI on PUSCH
Use betaOffset and alpha scaling etc. to get rate matching information of UCI on PUSCH (e.g. max bit capacity of encoded UCI and encoded ULSCH)
according to TS 38.212 section 6.3.2.4 and 6.2.7.
2025-09-26 11:14:12 +08:00
alexjiao
a64038658f Modify nr_uci_encoding for UCI on PUSCH
38.212 section 5.3.3.1 and 5.3.3.2 describe how to encode 1-bit and 2-bit information.
This is needed when typically HARQ-ACK will be transmitted on PUSCH.
38.212 section 5.4.3 also describes how to do rate matching for channel coding of small block lengths.
2025-09-26 11:14:08 +08:00
Jaroslava Fiedlerova
41b33e9124 CI: Update frequency in HO setup
Move center frequency from 3439 MHz to 4185 MHz to avoid interference
with other lab setups.
2025-09-25 15:43:14 +02:00
Guido Casati
e535fbe6a7 Replace impossible ID mismatch checks with DevAssert in NGAP functions
- Replace error handling for impossible ID mismatches with DevAssert statements
- If ngap_get_ue_context() succeeds, returned context must have matching NGAP gNB UE IDs by definition
- This catches potential bugs in the lookup function immediately
- Affects: handover_required, handover_notify, handover_cancel, ul_ran_status_transfer

These checks were logically impossible since we looked up the context using
the same IDs we were then checking for mismatch.
2025-09-25 14:55:03 +02:00
Guido Casati
50760c04a7 Fix log messages in N2 handover: print both PCI and Cell ID when available
- Fixed incorrect log messages that said 'PCI=%lu' when printing nr_cell_id
- Now prints both NR Cell ID and PCI when DU is found
- Provides better debugging information for handover requests
2025-09-25 14:55:03 +02:00
Guido Casati
8dcd253e60 E1 lib: Adopt _E1_EQ_CHECK_OPTIONAL_PTR macro in E1AP bearer context management
- Add _E1_EQ_CHECK_OPTIONAL_PTR checks for pdcp_config, sdap_config, UP_TL_information, and securityIndication
- Fix bug in eq_pdu_session_to_mod_item where a->UP_TL_information was compared with itself instead of b->UP_TL_information
- Fix eq_security_ind call to properly handle return value with early return pattern
- Improve consistency with existing macro usage patterns in the codebase
- Provide better error reporting for optional pointer field mismatches
2025-09-25 14:55:03 +02:00
Guido Casati
a7257eaff1 E1 lib: fix inconsistent equality checking patterns in E1AP bearer context management
Replace result &= pattern with consistent early return pattern:
- Fix mixing of logical (&&) and binary (&) operators
- Use consistent 'if (!eq_()) return false;' pattern throughout
- Fix bug in eq_bearer_context_mod_response where drbModA was compared with itself
- Remove unused 'bool result = true;' variables
- Always return true at the end of equality functions

This makes the code more consistent with the rest of the codebase
and provides better error reporting through the existing _E1_EQ_CHECK macros.
2025-09-25 14:55:03 +02:00
rmagueta
2bf7c2500e Simplifying bit shift in the nr_scale_channel() function 2025-09-25 14:50:37 +02:00
francescomani
c88b7bac72 process the remaining elements in scale channel 2025-09-25 14:50:37 +02:00
francescomani
89004ef241 use common scale channel functions for DLSCH and ULSCH 2025-09-25 14:50:35 +02:00
Jaroslava Fiedlerova
5e5f79e993 Merge branch 'integration_2025_w39' into 'develop'
Integration `2025.w39`

* !3582 replace bad DCI by specific message for each case and add checks for bad...
* !3595 Implementing the option to have more than 1 RSRP in CSI report
* !3640 Code cleanup (SRS, config files and more)
* !3654 Extend t300 in multi_ue rfsim testcase
* !3650 NR UE improvements for scheduling ACK/NACK for MSG4
* !3652 In ReconfigurationWithSync, make sure epochTime_r17 present if there is a ntn_Config_r17
* !3653 NR UE: in nr_ue_scheduler.c set LCID_buffer_remain to 0 if RLC indicates not more bytes in buffer
* !3549 Switch to new (internal) registry
* !3513 Improvements to RRC PDU session and DRB handling logic

Closes #995 and #997

See merge request oai/openairinterface5g!3658
2025-09-25 11:08:09 +00:00
Jaroslava Fiedlerova
d10fa9f664 Merge remote-tracking branch 'origin/rrc-pdusession-handling-improvements' into integration_2025_w39 (!3513)
Improvements to RRC PDU session and DRB handling logic

This merge request introduces a major simplification and cleanup of the gNB RRC
PDU Sessions and DRBs handling logic. The core goals of this work are to:

- Replace fixed-size PDU Session, DRBs and QoS arrays with dynamic containers
- Simplify and modularize helper functions for session/DRB management
- Prepare for further refactoring of the PDU Session state machine
- Improve code safety and maintainability through better bounds checking
2025-09-25 10:07:38 +02:00
Laurent THOMAS
912463f752 modulation LUTs size was wrong, and remove inconsistent test of SSE2 enable 2025-09-25 09:29:44 +02:00
Robert Schmidt
252b19cddb Make rftest compile
uniqCfg is in minimal_lib, so not necessary. Remove non-existant struct
members.
2025-09-25 08:51:11 +02:00
Robert Schmidt
b2fce659e8 Fix warning for wrong printf format specifier
common/utils/threadPool/measurement_display.c:55:14 warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 3 has type ‘long long unsigned int’ [-Wformat=]
2025-09-25 08:51:11 +02:00
Robert Schmidt
ada7eb8b2a Remove unused/non-compiling test stub 2025-09-25 08:51:11 +02:00
Robert Schmidt
acb6f05a6d Remove include_directories() for non-existing directories 2025-09-25 08:51:11 +02:00
Robert Schmidt
d5bf702f10 Remove CMakeLists.txt author information
Author information can be inferred from git blame.
2025-09-25 08:42:35 +02:00
Robert Schmidt
2d70cec6dd Remove autotools definitions
They do not seem to be used anywhere (I grepped).
2025-09-25 08:42:35 +02:00
Jaroslava Fiedlerova
08812063da Merge remote-tracking branch 'origin/switch-new-registry' into integration_2025_w39 (!3549)
Switch to new (internal) registry

Switch to a bigger registry
2025-09-24 23:31:43 +02:00
Guido Casati
e6d8d6a072 Add tests for RRC radio bearers lib 2025-09-24 16:58:17 +02:00
Guido Casati
c99f836ad4 Refactor DRB release handling to use actual DRB IDs
- Replace simple counter-based DRB ID assignment with actual DRB ID lookup
- Add nested loop to iterate through DRBs for each PDU session to be release
- Improve logic flow with early continue for non-matching PDU sessions

This ensures DRB release list contains correct DRB IDs that correspond to actual DRB entities
2025-09-24 16:58:17 +02:00
Guido Casati
9bf79cd2c9 PDU session release: refactor NGAP PDU Session Release command/response
* There is no IE corresponding to PDU sessions failed to release
  in the PDU SESSION RESOURCE RELEASE RESPONSE message. This was removed
  and the corresponding code was refactored and cleaned up.
* In the Release Command handler, only established PDU Session are set to be
  released. The Response message is filled accordingly.
2025-09-24 16:58:17 +02:00
Guido Casati
6ed08f1527 Refactor DRB and QoS handling: centralize configuration logic
Motivation:
The previous architecture had several issues:
- Duplicate DRB generation logic in generateDRB() and generateDRB_ASN1()
- Embedded SDAP/PDCP configs in drb_t created tight coupling
- No clear separation between RRC internal state and ASN.1 encoding
- Maintenance burden due to duplicated configuration logic

New Architecture:
- drb_t now only stores DRB-specific data (ID, PDU session ID, PDCP config)
- SDAP configuration moved to PDU session level (following PDCP design pattern)
- ASN.1 encoding helpers (nr_rrc_build_*_config_ie()) handle conversion
- Single source of truth for DRB creation in RRC via nr_rrc_add_drb()

Key changes:
- Store nr_sdap_configuration_t per PDU session
- Simplified drb_t structure: removed embedded SDAP/PDCP configs, added pdusession_id
- New helper: nr_rrc_build_sdap_config_ie()
- Updated createDRBlist() to use new helper functions and proper DRB ID lookup
- Refactored trigger_bearer_setup() to use nr_rrc_add_drb() and fill_e1_drb_to_setup()
- Removed generateDRB() and generateDRB_ASN1() functions
- Updated set_bearer_context_pdcp_config() to return config by value
- Added SDAP configuration header file for type definitions

This eliminates code duplication, improves maintainability, and creates
a cleaner separation between RRC state management and ASN.1 encoding.
2025-09-24 16:58:17 +02:00
Guido Casati
50923823c0 Refactor QoS parameter types and consolidate definitions
- Move QoS-related enums and structures from ngap_messages_types.h to 5g_platform_types.h
- Replace ngap_* QoS types with generic qos_* types for better reusability
- Update field names from allocation_retention_priority to arp for consistency
- Update all references across RRC and NGAP modules to use new type names
- Remove duplicate QoS type definitions from NGAP-specific header

This improves code organization by centralizing QoS parameter definitions
in a common platform types header and eliminates NGAP-specific naming
in favor of more generic, reusable type definitions.
2025-09-24 16:58:17 +02:00
Guido Casati
7254e59df9 Introduced MAX_QOS_FLOWS (64) and replaced QOSFLOW_MAX_VALUE
The maximum number of QoS flows is 64.

- Replace QOSFLOW_MAX_VALUE with MAX_QOS_FLOWS constant
- Move MAX_QOS_FLOWS definition to common/platform_constants.h
- Remove duplicate QOSFLOW_MAX_VALUE definition from ngap_messages_types.h

This improves maintainability by centralizing the QoS flow limit constant
and eliminates duplicate definitions across different header files.
2025-09-24 16:57:10 +02:00
Guido Casati
1711b1b4b8 Refactor ASN.1 PDCP configuration building
- Limit scope of get_default_rbconfig function: from asn1_msg.c/.h to rrc_gNB_nsa.c where it's used
- Create new rrc_gNB_asn1.c/h files for ASN.1 utility functions: they can be used in other RRC files
- Add nr_rrc_build_pdcp_config_ie function for building PDCP configuration IEs
- Update get_default_rbconfig to use the new PDCP config builder
- Add rrc_gNB_asn1.c to CMakeLists.txt build configuration
2025-09-24 14:55:52 +02:00
Guido Casati
45d989ec7b Adopt dynamic seq_arr in QoS Flow list (RRC PDU Session) 2025-09-24 14:38:37 +02:00
Guido Casati
7fa0ebb6b9 Adopt dynamic seq_arr in DRB handling (RRC PDU Session)
The previous DRB management relied on a fixed-size array (established_drbs[MAX_DRBS_PER_UE])
and manual status tracking using DRB_ACTIVE/INACTIVE flags. This approach was inefficient,
and made assumptions about DRB ID allocation that do not generalize well
to dynamic procedures like bearer modification or removal.

* Replace fixed-size array established_drbs[] with dynamic
  seq_arr_t *drbs in gNB_RRC_UE_t
* Refactor get_drb() and added nr_rrc_add_drb() with clean abstractions
  using find and seq_arr lib
* Updated all DRB-related logic (e.g., generateDRB,
  F1AP/E1AP tunnel config, reestablishment, mobility) to use seq_arr.
* Removed status field and DRB_ACTIVE/INACTIVE logic: list presence implies active
* DRB ID allocation now tracked via seq_arr size : simplifies DRB management and
  avoids DRB ID–indexed assumptions: code assumed DRB IDs mapped directly to
  array indices: established_drbs[drb_id - 1]. This could break when:
  DRB IDs are not sequential, DRBs are removed and re-added, or there are gaps in IDs
2025-09-24 14:38:37 +02:00
Guido Casati
f15af77297 Cleanup: remove unused cp_pdusession
The function is no longer relevant in the new design.
2025-09-24 14:38:37 +02:00
Guido Casati
5bcc9b9e5e Adopt dynamic seq_arr in PDU Session handling (RRC PDU Session)
The RRC PDU Session struct is converted from a fixed-size array
to a dynamically sized seq_arr. This improves flexibility and
simplifies session management by eliminating arbitrary size limits
and enabling dynamic addition/removal of PDU sessions.

Helper functions and loops have been adapted to use the seq_arr API.
This change is a step toward more robust and maintainable handling
of PDU sessions in the gNB RRC layer.

The "status" state machine remains untouched in this commit and
is refactored in a later commit.

Also:

* add macro to push to seq_arr and return the new element
* move initialization of xid (RRC PDU Session struct) to
  find_pduSession (temporary, will be finalized in a later
  commit) since with the new seq_arr design the initialization
  is no longer possible in the UE context generation (also
  does not belong to it, initialize when adding a new PDU Session)
2025-09-24 14:38:36 +02:00
Guido Casati
e4a910f0bb Refactoring: add utility function to fill NG PDU Session Setup item
* fills from stored setup PDU Session in RRC list
* reduces duplicated code
2025-09-24 14:37:32 +02:00
Guido Casati
bd41e8f883 Refactoring: limit scope of config_pdcp to config module 2025-09-24 14:37:32 +02:00
Guido Casati
ae1de1aeaa Refactoring: fix inconsistency in nr_sdap_delete_entity
The function was printing a "not found" error message even in the case
the return value was set to "true". Return directly true/false.

This is relevant in PDU Session Release procedures.
2025-09-24 14:37:32 +02:00
Guido Casati
42a9f2f08f Enable multiple PDU Sessions in handover request logic
- Process all PDU sessions in handover request instead of only the first one
- Add DevAssert for bounds checking on nb_of_pdusessions
- Fix logic error where multiple PDU sessions were ignored in handover scenarios
2025-09-24 14:37:32 +02:00
Guido Casati
9a4fd1bf76 Cleanup handover required transfer IE
Previously, the RRC layer was incorrectly allocating stack memory for the ho_required_transfer field and passing it to NGAP, however it was not used. The IE is mandatory but contains only 1 optional IE, therefore is encoded in the NG message with empty content.

Changes:
- Remove unnecessary ho_required_transfer field from pdusession_resource_t definition, the IE is encoded anyway with empty content. If Direct Forwarding Path Availability is needed at any stage in the future it can be added to pdusession_resource_t and filled in RRC.
- Add clarifying comment about empty HandoverRequiredTransfer structure
2025-09-24 14:37:29 +02:00
Guido Casati
609700207f Fix handover required: set pdusession_id in pdu_info structure for consistency 2025-09-24 14:07:31 +02:00
francescomani
24ac0b5602 move nr_rrc_ue_process_masterCellGroup before usage 2025-09-24 10:31:40 +02:00
francescomani
faf230612b move nr_rrc_ue_process_ueCapabilityEnquiry before usage 2025-09-24 10:30:08 +02:00
francescomani
a49d496b63 move process_lte_nsa_msg before usage 2025-09-24 10:27:44 +02:00
francescomani
6009b06101 move nr_rrc_ue_process_measConfig (and its functions) before usage 2025-09-24 10:23:37 +02:00
francescomani
fc8854a040 move nr_rrc_ue_generate_rrcReestablishmentComplete before its usage 2025-09-24 10:19:51 +02:00
francescomani
719ae673a3 move nr_rrc_ue_process_RadioBearerConfig before its usage 2025-09-24 10:18:34 +02:00
francescomani
1ee2298a88 remove unnecessary declaration of nr_rrc_manage_rlc_bearers 2025-09-24 10:15:17 +02:00
Jaroslava Fiedlerova
7907b80a35 Merge remote-tracking branch 'origin/fix_wrong_nrue_bsr' into integration_2025_w39 (!3653)
NR UE: in nr_ue_scheduler.c set LCID_buffer_remain to 0 if RLC indicates not
more bytes in buffer

If the RLC indicates that there is no more data in the buffer, also the
scheduler's LCID_buffer_remain should be set to 0. Else the UE sends BSR
indicating it has data to be transmitted. The gNB would then unnecessarily
schedule UL for this UE, which would not be used, as there is no actual data
to be transmitted.
2025-09-24 09:38:18 +02:00
Jaroslava Fiedlerova
8885d3912a Merge remote-tracking branch 'origin/fix_issue_995' into integration_2025_w39 (!3652)
In ReconfigurationWithSync, make sure epochTime_r17 present if there is a ntn_Config_r17

Fixes #995
2025-09-24 09:35:53 +02:00
Guido Casati
69f0bb2b96 Fix PDU session counter overflow issues: max number of PDU Sessions is 256
- Upgrade PDU session counters from uint8_t to uint16_t in ngap_messages_types.h

Co-authored-by: Assistant <assistant@example.com>
2025-09-23 23:13:24 +02:00
Robert Schmidt
7e1eabe700 Switch to new (internal) registry 2025-09-23 17:43:38 +02:00
francescomani
7e01d5a0e0 Merge remote-tracking branch 'origin/NR_UE_PUCCH_scheduling_improvements' into integration_2025_w39 2025-09-23 14:47:38 +02:00
Thomas Schlichter
ccad50daca NR UE: do not consider suspended logical channels in nr_update_bsr()
While a logical channel is suspended, we should not consider it in the BSR,
as we cannot transmit any data from it.
2025-09-23 11:17:44 +02:00
Jaroslava Fiedlerova
25f2f1fe46 Merge remote-tracking branch 'origin/t300-mutliue' into integration_2025_w39 (!3654)
Extend t300 in multi_ue rfsim testcase

Extend t300 to 1000 to increase the time the gNB has to handle MSG3. Hopefully
this prevents the UEs from timing out after MSG3. Add UE id to timer timeout
LOGs so the UE behavior can be traced through the stack.
2025-09-23 10:48:46 +02:00
francescomani
966bab9cca do not assert for mismatched TBS in phy-test mode 2025-09-23 10:39:37 +02:00
Jaroslava Fiedlerova
e6da57e2b6 Merge remote-tracking branch 'origin/some_cleanup' into integration_2025_w39 (!3640)
Code cleanup (SRS, config files and more)

- Remove deprecated elements from some configuration files (also closes #997)
- Improve SRS code with a better separation between common code and gNB/UE code
- Other minor compilation improvements
2025-09-23 10:00:57 +02:00
Jaroslava Fiedlerova
98948586c2 Merge remote-tracking branch 'origin/more_than_1_rsrp_report' into integration_2025_w39 (!3595)
Implementing the option to have more than 1 RSRP in CSI report

In collaboration with NI/Emerson.

The standard allows up to 4 RSRP measurements in CSI report (1 full and the other
differential). In current OAI, we just configure 1 RSRP report for the strongest
SSB. This MR allows to configure at gNB more than 1 RSRP report (depending on
config file, number of SSBs and UE capabilities) and makes changes at the UE to
send this report.
2025-09-23 09:58:35 +02:00
Jaroslava Fiedlerova
75c8e96142 Merge remote-tracking branch 'origin/fix-lte-ue-bad-dci' into integration_2025_w39 (!3582)
replace bad DCI by specific message for each case and add checks for bad...

Replace bad DCI by specific message for each case and add checks for bad
pointers, or sanitize detected warnings. Then fix several issues in DCI
decoding. With this MR, LTE UE has less bad DCI, and each bad DCI has a
reason better diagnosis.
2025-09-23 09:55:31 +02:00
Guido Casati
7083e08175 Fix variable shadowing in E1 bearer context setup
- Changed inner loop variable from 'i' to 'j' in rrc_gNB_process_e1_bearer_context_setup_resp
- Eliminates variable shadowing between outer PDU session loop and inner DRB loop
- Improves code readability and prevents potential bugs
2025-09-22 22:46:14 +02:00
Laurent THOMAS
06914f3dde improve dci rejection test: system DCIs are tackled only if we expect system DCIs 2025-09-22 19:12:24 +02:00
Laurent THOMAS
311a857cb3 move a bad global var in a better place 2025-09-22 19:12:24 +02:00
Laurent THOMAS
a71a813a7c replace bad DCI by specific message for each case and add checks for bad pointers, or sanitize detected warnings 2025-09-22 19:12:24 +02:00
Bartosz Podrygajlo
d38ce7c1c9 Extend t300 in multi_ue rfsim testcase
Extend t300 to 1000 to increase the time the gNB has to handle MSG3.
Hopefully this prevents the UEs from timing out after MSG3.
2025-09-22 12:04:54 +02:00
Bartosz Podrygajlo
a43fbe1bac NR UE: Add UE id to RRC timer timeout LOGs 2025-09-22 12:04:50 +02:00
Thomas Schlichter
5c16758386 gNB: when creating a ReconfigurationWithSync, make sure epochTime_r17 is present if there is a ntn_Config_r17
Fixes #995
2025-09-22 11:06:16 +02:00
Thomas Schlichter
272be719dd NR UE: in nr_ue_scheduler.c set LCID_buffer_remain to 0 if RLC indicates not more bytes in buffer
If the RLC indicates that there is no more data in the buffer, also the scheduler's
LCID_buffer_remain should be set to 0. Else the UE sends BSR indicating it has data
to be transmitted. The gNB would then unnecessarily schedule UL for this UE, which
would not be used, as there is no actual data to be transmitted.
2025-09-19 12:11:58 +02:00
francescomani
ca7fadfe07 improved logs to evaluate RSRP report 2025-09-19 11:07:28 +02:00
Jan Fromme
df9c41f364 Accumulate SSB indices in the SINR payload instead of overwriting the payload 2025-09-19 09:29:58 +02:00
Jan Fromme
5903806d2e enabled transmission of up to 4 RSRP measurement reports from UE to gNB 2025-09-19 09:29:56 +02:00
Jan Fromme
b462fa45e8 Fix RSRP report unpacking logic in gNB scheduler UCI
Correctly handle unpacking of the first RSRP report and its resource ID before processing additional reports.
Use the initial RSRP value as the reference for differential RSRP calculations in subsequent reports.
2025-09-19 09:18:30 +02:00
francescomani
e5ea77f629 separate UE fapi message for SSB measurements 2025-09-19 09:18:28 +02:00
francescomani
fc4bd2e20c RRC configuration for more than 1 reported RS
option via configuration file to limit the number of reports to be configured
2025-09-19 08:38:47 +02:00
Robert Schmidt
32c81b7b06 Merge branch 'integration_2025_w38' into 'develop'
Integration: `2025.w38`

Closes #954

See merge request oai/openairinterface5g!3646

* !3639 Fix error ind unpack
* !3643 Fix memory allocation issue in KPM RAN function sd parameter handling
* !3568 Fix UE DCI monitoring after RRC setup
* !3642 Check command line for unknown options also at gNB
* !3647 Add nr-cuup to run_locally.sh
* !3596 L3 measurements and measReport A2
* !3648 fix MSG3 with C-RNTI failure
* !3649 CI: build images on Jetson (armv8)
* !3334 N2 Handover
2025-09-18 16:39:39 +00:00
Robert Schmidt
84c51802da CI RFsim test N2: remove RFsim config in CU-CP 2025-09-18 18:12:58 +02:00
francescomani
52af5e5642 preventing UE to schedule SR on PUCCH in the same slot when MSG4 ACK is sent 2025-09-18 17:30:13 +02:00
francescomani
e82bb5cb6d remove unnecessary printf in dlsim 2025-09-18 14:58:03 +02:00
francescomani
614b6a0eef remove unnecessary srs_modulation files and move what's left into UE phy_procedures 2025-09-18 14:57:58 +02:00
francescomani
740e9c5c9c move common SRS functions to common folder 2025-09-18 14:55:19 +02:00
francescomani
607d8a0bc2 simplify compute_n_b and compute_F_b functions by using common structure 2025-09-18 14:55:19 +02:00
francescomani
b03d8abd03 use common structure to store SRS information for common function (also avoid bad cast) 2025-09-18 14:55:16 +02:00
Robert Schmidt
870b25e95d Fix: define_property() needs FULL_DOCS
define_property() has optional FULL_DOCS in cmake 3.23+, but before it's
required. I did not notice when adding this.
2025-09-18 14:54:39 +02:00
francescomani
c9756c26ec move PUCCH common tables to PHY common file 2025-09-18 12:33:49 +02:00
francescomani
8051b5d14a remove a couple of unnecessary include 2025-09-18 12:33:49 +02:00
francescomani
38995aff5d config files further cleanup 2025-09-18 12:33:40 +02:00
francescomani
47554f89ce fix switch to initial UL BWP if no PRACH common configuration in current BWP 2025-09-18 11:57:57 +02:00
francescomani
72bfd1b5c3 switch to initial BWP if current BWP has no PRACH in gNB 2025-09-18 11:57:54 +02:00
Robert Schmidt
7227cfb320 Merge remote-tracking branch 'origin/n2-handover' into integration_2025_w38 (!3334)
N2 handover

This MR introduces full support for N2 handover, covering handover
decision, preparation, execution, and notification between source and
target NG-RAN nodes.

Key features:

1. Handover Decision & Preparation:
  - Implement N2 handover decision based on UE measurement reports.
  - Generate the Handover Preparation Information message, including
    RRCReconfiguration.
  - Send Handover Required message from the source NG-RAN to the AMF.
2. Handover Execution:
  - Decode and handle the Handover Request on the target NG-RAN.
  - Process the Handover Command on the source gNB, triggering
    RRCReconfiguration.
  - Initiate Handover Notify after successful completion.
3 NGAP & RRC Enhancements:
  - Implement NGAP encoding/decoding functions for Handover Required,
    Handover Request, Handover Command, Handover Failure, and Handover
    Notify (3GPP TS 38.413).
  - Adds NG-RAN Status Transfer support (UL/DL) for PDCP COUNT
    preservation during mobility:
    - support for NGAP Uplink and Downlink RAN Status Transfer messages
      (TS 38.413 §9.2.3.13-14) to enable proper PDCP COUNT value
      transfer during handover or recovery: NGAP encoding/decoding for
      RAN Status Transfer, PDCP helpers to extract and apply COUNT (HFN
      + SN) per DRB. This aligns with TS 38.300 §9.2.3.2.1 and TS 23.502
      §4.9.1.3.3, ensuring PDCP status preservation in AM.
4. Testing:
  - Introduce a Telnet command to manually trigger N2 handover using UE
    ID and neighbor PCI.
  - Add configuration file for testing N2 handover with a target gNB.
2025-09-18 11:57:44 +02:00
Guido Casati
f9f6e96d6b Add N2 handover documentation 2025-09-18 11:54:19 +02:00
Robert Schmidt
ef5191b610 Merge remote-tracking branch 'origin/ci-build-jetson' into integration_2025_w38 (!3649)
CI: build images on Jetson (armv8)

Add a new build pipeline for NVIDIA Jetson (armv8). Images have tag
prefix armv8_ to distinguish from gracehopper-built images prefixed arm_
(should have maybe been better with armv9_?)
2025-09-18 11:51:41 +02:00
Robert Schmidt
8927032fd2 Merge remote-tracking branch 'origin/fix_UE_msg3_crnti_fail' into integration_2025_w38 (!3648)
fix MSG3 with C-RNTI failure

When RA procedure with MSG3 carrying C-RNTI fails we shouldn't send an
indication to RRC because it is a L2 procedure
2025-09-18 11:51:12 +02:00
Guido Casati
85f586c76d Add N2 Handover Cancel (8.4.5 of 3GPP TS 38.413)
This commit completes the NGAP Mobility Management procedure for N2 handover.
Upon failure on source gNB the Handover Cancel message is sent to the AMF which
in return responds with an ack.
2025-09-18 11:34:31 +02:00
Guido Casati
4facb4d635 target-CU-CP: Transfer PDCP Count to target-CU-UP
Upon reception of NG RAN Status at the target CU-CP, send PDCP Status
via E1 Bearer Context Modification to the target CU-UP and update PDCP Count
upon reception of the message.

For the sake of simplicity, re-used and extended legacy e1_send_bearer_updates.
Further refactoring is not addressed in this commit.
2025-09-18 11:34:31 +02:00
Guido Casati
a82353f42a target-CU-CP: Add RRC handler NG DL RAN Status Transfer 2025-09-18 11:34:31 +02:00
Guido Casati
badb0c561a source-CU-CP: trigger UL NG RAN Status Transfer upon reception of PDCP Status in E1 Bearer Context Modification Response
Once fetched the PDCP Status from the PDCP entity over E1, the CU-CP triggers
the NG RAN Status Transfer procedure to transfer the PDCP Status to the target
CU.

This commit is also introducing the RRC callback.
2025-09-18 11:34:31 +02:00
Guido Casati
44e4ebc4e2 source-CU-UP: fill PDCP Status in response upon reception of E1 Bearer Context Modification Request
* Check presence of PDCP Status Requested in Bearer Context Modification Request
* Fetch PDCP Status from PDCP entity and fill in the Bearer Context Modification Response
2025-09-18 11:34:31 +02:00
Guido Casati
fc5e3ce61d source-CU-CP: trigger E1 PDCP Status Request in UE Context Modification Response handler
The E1 Bearer Context Modification Request shall send a PDCP Status Request IE
during handover, e.g. the HO context is set to source, and it is not target, i.e.
only in N2 not in F1.

The current function "e1_send_bearer_updates" used to fill the E1 Request has been
refactored only for the sake of this commit and to avoid duplicated and redundant code.
The function itself deeper analysis and eventually a refactoring that will not be addressed
in this commit.
2025-09-18 11:34:31 +02:00
Guido Casati
e96d7f9576 Add PDCP API getter and setter for PDCP count values in PDCP entity
* Introduced nr_pdcp_count_update() to apply COUNT values to the PDCP entity:
  - Computes tx_next, rx_next, and rx_deliv from HFN+SN
  - Handles both 12-bit and 18-bit SN modes with dynamic bitmask
* Introduced nr_pdcp_get_drb_count_values() to extract PDCP COUNT values from entity:
  - Used for building UL RAN Status Transfer on source CU side
2025-09-18 11:34:31 +02:00
Guido Casati
e527b99de1 PDCP Status Information: add enc/dec/cp/eq and test to E1AP lib
Also:
* remove unused oldQosFlows IEs
* adopt new enc/dec functions
* fix missing return in eq_bearer_context_mod_response
2025-09-18 11:34:31 +02:00
Guido Casati
bc9c59f186 Add NGAP RAN Status Transfer enc/dec and handlers (UL and DL)
According to 4.9.1.3.3 of 3GPP TS 23.502:

> 2a. - 2c. The S-RAN sends the Uplink RAN Status Transfer message to the S-AMF,
> as specified in TS 36.300 [46] and TS 38.300 [9]. The S-RAN may omit sending
> this message if none of the radio bearers of the UE shall be treated with PDCP status preservation.

TS 38.300 says:
> For DRBs not configured with DAPS, the source gNB sends the SN STATUS TRANSFER message to the target
> gNB to convey the uplink PDCP SN receiver status and the downlink PDCP SN transmitter status of DRBs for
> which PDCP status preservation applies (i.e. for RLC AM). The uplink PDCP SN receiver status includes at
> least the PDCP SN of the first missing UL PDCP SDU and may include a bit map of the receive status of the out
> of sequence UL PDCP SDUs that the UE needs to retransmit in the target cell, if any. The downlink PDCP SN
> transmitter status indicates the next PDCP SN that the target gNB shall assign to new PDCP SDUs, not having a
> PDCP SN yet.

i.e., for DRBs for which PDCP status preservation applies (i.e. for RLC AM), which is is our case.

This commit introduces full support for NG-RAN Status Transfer message handling
(TS 38.413 §9.2.3.13-14) in CU. It enables correct state transfer of PDCP COUNT
values (SN + HFN) during mobility or recovery scenarios.

Summary of changes - NGAP:
* Added encoding/decoding support for UL/DL RAN Status Transfer message
* Defined structures for: ngap_drb_count_value_t, ngap_drb_status_t,
  ngap_ran_status_container_t, ngap_ran_status_transfer_t
2025-09-18 11:34:31 +02:00
Guido Casati
1015c1f5f0 Add new CI pipeline for N2 Handover
The pipeline is using the already existing conf files
for the source/target gNB CUs/DUs.

For the sake of simplicity, neighbour-config.conf has
been rewritten and simplified in this commit, then
adopted in this pipeline. The file was not used before.
2025-09-18 11:34:31 +02:00
Guido Casati
5227becf89 Add telnet trigger for N2 handover
* the command gets in input the neighbour PCI and the UE ID
* the telnet ci function to retrieve the UE context was extended in the process
* add function to trigger handover on the same gNB for testing purposes

Co-authored-by: batuhan duyuler <batuhan.duyuler@firecell.io>
2025-09-18 11:34:31 +02:00
Guido Casati
cb68d817f0 OAI UE: introduce AS security key update procedure (5.3.5.7 3GPP TS 38.331)
* trigger upon reception of MasterKeyUpdate
* derive NH, store NH NCC and valid NH key in RRC
* masterKeyUpdate: derive enc/int keys after master key update
  and set PDCP security for SRB1
* call nr_rrc_process_reconfiguration_v1530 before nr_rrc_ue_process_RadioBearerConfig
  and move dedicatedNAS_MessageList processing at the end of the flow. The sequence
  shall be (1) keys/security update (2) radioBearerConfig processing, with PDCP entity
  creation, PDCP reestablishment, SDAP entity creation (3) NAS PDUs processing, which
  triggers PDU Session Establishment Accept, which sets up the TUN interface.
  SDAP entity is a pre-requisite, therefore the radioBearerConfig has to be processed
  (in nr_rrc_ue_process_RadioBearerConfig, add_drb) early enough, or it may cause a
  race condition in SDAP.
2025-09-18 11:34:31 +02:00
Guido Casati
984c0bff0f Send NG HO failure message upon nr_rrc_n2_ho_acknowledge failure 2025-09-18 11:34:30 +02:00
Guido Casati
28f926607e Add N2 HO trigger on Bearer Context Setup Response (target NG-RAN)
* add trigger function to (1) add the callbacks and (2) initiate
  handover on the target NG-RAN
* add handover failure callback on target NG-RAN: the Handover
  Failure is a procedure that belongs to the target NG-RAN and
  it is different from the Handover Cancel procedure

Co-authored-by: batuhan duyuler <batuhan.duyuler@firecell.io>
2025-09-18 11:34:30 +02:00
Guido Casati
e611d092e9 Add NGAP Handover Notify encoder and trigger on the target NG-RAN
This commit introduces the NG Mobility Management Procedure known as
Handover Notification. The outbound message is sent by the target NG-RAN
and is known as Handover Notify. The procedure is used to indicate to
the AMF that the UE has arrived to the target cell and the NG-based
handover has been successfully completed

* after RRCReconfiguration complete, in the N2 callback for HO success
* add NGAP encoder for the message
* RRC callback to trigger Handover Notify message

Co-authored-by: batuhan duyuler <batuhan.duyuler@firecell.io>
2025-09-18 11:34:30 +02:00
Guido Casati
f66524879d Add NGAP Handover Command decoder and RRC handler on source gNB
* add NG Handover Command message decoder
* process in RRC: encode RRCReconfiguration message
  from the received HandoverCommandMessage
* trigger RRCReconfiguration for handover

Co-authored-by: batuhan duyuler <batuhan.duyuler@firecell.io>
2025-09-18 11:34:30 +02:00
Guido Casati
6fd02ee7e8 Handle N2 handover in UE Context Setup Response on the target NG-RAN
* generate Handover Command for the source NG-RAN
  to be added to the target to source transparent
  container of the Handover Acknowledge message
* add Handover Acknowledge callback for N2
* send NG Handover Acknowledge to AMF

Co-authored-by: batuhan duyuler <batuhan.duyuler@firecell.io>
2025-09-18 11:34:30 +02:00
Guido Casati
fa75484e13 Add NGAP Handover Request Acknowledge encoder and RRC callback
This commit completes the NG Mobility Management Procedure known as
Handover Resource Allocation. The outbound message is sent by the
target NG-RAN and is known as Handover Request Acknowledge.

Major changes:

* add RRC callback to trigger the generation of NG Handover
  Request Acknowledge on the target NG-RAN
* add NG Handover Request Acknowledge encoder

Co-authored-by: batuhan duyuler <batuhan.duyuler@firecell.io>
2025-09-18 11:34:30 +02:00
Guido Casati
461cfb7911 Add NGAP Handover Request decoding and RRC handler
This commit introduces the NG Mobility Management Procedure known as
Handover Resource Allocation. The inbound message is sent by the AMF
and is known as Handover Request.

Major changes:

(0) Add Handover Resource Allocation initiating message decoding
    * add case for NGAP initiating message and unsuccessful message decoding
(1) handle Handover Request on the target NG-RAN
(2) decode NG Handover Request message
(3) process payload, e.g. create UE context,
    store IDs, set UP security and trigger bearer setup

Co-authored-by: batuhan duyuler <batuhan.duyuler@firecell.io>
2025-09-18 11:34:30 +02:00
Guido Casati
92abefb815 Add NGAP Handover Failure message
This message is sent from the Target NG-RAN to the AMF.

The commit introduces:
* NGAP encoding function
* N2 callback for the target gNB
* handle the failure in RRC, inform NGAP
* send NGAP message to AMF via SCTP

Note: UE context in NGAP is fetched from the amf_ue_ngap_id

Co-authored-by: batuhan duyuler <batuhan.duyuler@firecell.io>
2025-09-18 11:34:30 +02:00
Guido Casati
6e4f1b7b31 Add N2 Handover decision and trigger preparation on source CU
(1) add N2 ho decision based on measurements
(2) add trigger for N2 HO on source CU
(3) generate NG Handover Preparation Information message,
    including RRCReconfiguration, to be passed to the
    NG Handover Required message
(4) call RRC callback for Handover Required message

Co-authored-by: batuhan duyuler <batuhan.duyuler@firecell.io>
2025-09-18 11:34:30 +02:00
Guido Casati
20e534d483 Add NGAP Handover Required message NGAP encoder and RRC callback on source NG-RAN
This commit introduces the NG Mobility Management Procedure known as
Handover Preparation. The outbound message is sent by the source NG-RAN
and is known as Handover Required.

* introduce NGAP library for Mobility Management
* introduce NGAP IEs encoder functions for Handover Required and relevant common IEs
* handle RRC trigger in NGAP and Send NGAP Handover Required to the AMF

Co-authored-by: batuhan duyuler <batuhan.duyuler@firecell.io>
2025-09-18 11:34:30 +02:00
Guido Casati
cfb654e77f HO Preparation: add alloc_ho_ctx to rrc_gNB_mobility lib 2025-09-18 11:34:30 +02:00
Guido Casati
ff5b2bc8b2 HO Preparation: print neighbour cell configuration 2025-09-18 11:34:30 +02:00
Guido Casati
2f4f177050 HO Preparation: allocate HO Context in the F1 trigger rather than nr_initiate_handover
During the N2 HO review has been found that the HO context
was not allocated at trigger time but later in the flow. This
might lead to issues in some scenarios (e.g. in N2 HO)
and it was fixed in this commit.
2025-09-18 11:34:30 +02:00
Guido Casati
26698d4f07 HO Preparation: do verify_section_notset of neighbour and measurement config for DU
During the review of N2 HO MR it has been found that there was no
check on the absence of the neighbour and measurement section in the DU config file.
2025-09-18 11:34:30 +02:00
Robert Schmidt
25380e8075 Add transm_timout timer to set UE to UL failure after timeout
Introduce a new timer for the use case where a UE should not be
scheduled anymore after a certain time. This is the case, for instance,
during handover, where the "source DU" forwards the RRCReconfiguration
and should stop scheduling this UE after some time.

Originally, transm_interrupt was introduced in 5c6d90aaff ("Use
NR_timer_t for UE transmission interrupt, e.g., RRC processing") to stop
scheduling a UE.

Commit 004403c84d ("Implement F1 UE Ctxt Modif Transmission Action
Indicator") reused this timer in an attempt to save code with an
"interrupt follow action".

In commit 89ebbb4192 ("Do not trigger ul failure in measgap scheduling
and standardize the verification if MAC is active in other scheduling
functions"), the transm_interrupt timer is used to not schedule a UE
through function nr_mac_ue_is_active(). This led to the UE not being
forwarded the RRCReconfiguration, effectively breaking handover, as the
message never reaches the UE. By using a new timer, the intended
functionality is restored.

Fixes: 89ebbb4192 ("Do not trigger ul failure in measgap scheduling
    and standardize the verification if MAC is active in other
    scheduling functions")
2025-09-18 11:34:30 +02:00
Robert Schmidt
98462c20ba Remove interrupt_action
Remove this flag, as it is not used as of this commit, and introduces
confusion (see next commit: we reused the trans_interrupt timer for
the transmission action indicator stop action, where the UE should stay
active, while it is *not* when transm_interrupt is active).
2025-09-18 11:34:30 +02:00
Robert Schmidt
7a02456883 Merge remote-tracking branch 'origin/meas-report-A2' into integration_2025_w38 (!3596)
L3 measurements and measReport A2

- Implementation of L3 measurements for active cell
- UE sends the measurement report for event A2
2025-09-18 09:38:39 +02:00
Robert Schmidt
8c78ef5b94 Correct Ubuntu version (to generic "Ubuntu") 2025-09-18 09:13:44 +02:00
Robert Schmidt
a1175f7f61 Add documentation for Jetson build pipeline 2025-09-18 09:13:44 +02:00
francescomani
95dfb67e51 fix MSG3 with C-RNTI failure 2025-09-18 08:50:55 +02:00
Robert Schmidt
44729d5765 Add Jetson build pipeline to RAN-Container-Parent 2025-09-17 17:24:41 +02:00
Robert Schmidt
8045dc71e0 XML description for build on Jetson (ARMv8) 2025-09-17 15:26:34 +02:00
Robert Schmidt
1ea90fc987 Rename to native_armv9 image build type
For clarity, rename to native_armv9 for clarity. The check inside Python
checked for native_arm, and if we introduce native_armv8 (for jetson),
it would also match that.
2025-09-17 15:24:12 +02:00
Jaroslava Fiedlerova
f691b7f9e4 Merge remote-tracking branch 'origin/fix-run-local-ci' into integration_2025_w38 (!3647)
Add nr-cuup to run_locally.sh

E1 deploy wasn't enable in the run_locally.sh script to run the CI on a local
machine. This MR is adding it. It was validated locally.
2025-09-17 14:56:45 +02:00
Jaroslava Fiedlerova
e5413dcb2d Merge remote-tracking branch 'origin/issue993' into integration_2025_w38 (!3642)
Check command line for unknown options also at gNB
2025-09-17 10:16:43 +02:00
Jaroslava Fiedlerova
44fa1c2244 Merge remote-tracking branch 'origin/issue-954-fix' into integration_2025_w38 (!3568)
Fix UE DCI monitoring after RRC setup

After the UE is configured with pdcch-Config, it continues to monitor
fallback search spaces in pdcch-ConfigCommon for DCI with C-RNTI.

The rational is that after sending RRC Setup the network won't know if
the UE has received and successfully applied it. Hence the network would
still continue to use the fallback DCI till it receives RRC setup
complete.

Closes #954
2025-09-17 10:14:57 +02:00
Guido Casati
2aa496bae7 Add nr-cuup to run_locally.sh 2025-09-16 15:34:53 +02:00
Jaroslava Fiedlerova
a9a554508d Merge remote-tracking branch 'origin/kpm-ran-func-segfault' into integration_2025_w38 (!3643)
Fix memory allocation issue in KPM RAN function sd parameter handling

This fixes a segmentation fault in the gNB when a KPM xApp sends the sd
parameter in the subscription message.

The segmentation fault seems to occur because *sd is uninitialized when
malloc(**sd) is called. This causes a double dereference of an uninitialized
pointer - **sd reads a random memory value which becomes the size parameter
for malloc(), leading to unpredictable memory allocation and segfaults.

This fix allocates the size using malloc(sizeof(uint32_t)) instead of
dereferencing the uninitialized pointer.
2025-09-16 12:58:55 +02:00
Jaroslava Fiedlerova
2a8b89a451 Merge remote-tracking branch 'origin/fix_error_ind_unpack' into integration_2025_w38 (!3639)
Fix error ind unpack

This MR fixes an issue in which the unpacking is erroneously deemed unsuccessful
even though it succeed in pulling all the bytes, this was due to not properly
handling the return value of pull16 which is either 0 or 2, not 0 or 1.

Additionally, this MR adds the Aerial specific expected error codes, as
described here:
https://docs.nvidia.com/aerial/archive/aerial-sdk/23-3/text/cubb_release_notes/scf_fapi_support.html#additional-aerial-specific-error-codes-reported-in-error-indication-from-l1-to-l2
2025-09-16 12:55:21 +02:00
alexjiao
2c369a8299 Handle reportAmount and reportInterval in reportConfigNR 2025-09-16 10:37:13 +01:00
rmagueta
3e65d75f83 UE sends the measurement report for event A2 2025-09-16 10:35:26 +01:00
rmagueta
8d6bb6bf20 Definition of L1 and implementation of L3 measurements for serving cell 2025-09-16 10:32:33 +01:00
francescomani
a76f7a8c62 remove rfsim option from CU in F1 docker 2025-09-16 11:21:04 +02:00
francescomani
e99cf956e7 remove --sa option from newly created handover test 2025-09-16 10:25:04 +02:00
francescomani
fd791568ff change RUNMODEM documentation to reflect --sa not being optional anymore 2025-09-16 10:22:05 +02:00
francescomani
b8683dd351 check command line for unknown options at gNB 2025-09-16 10:22:05 +02:00
francescomani
93f5f65806 remove --sa command line option from sa_fhi_7.2_metanoia_2x2_gnb docker compose 2025-09-16 10:22:05 +02:00
francescomani
e0b5880db7 cleanup NR_UL_UE_HARQ_t 2025-09-16 09:25:00 +02:00
Sakthivel Velumani
524aa84e96 fix: issue 954 - DCI monitoring after RRC setup
After the UE is configured with pdcch-Config, it continues to monitor
fallback search spaces in pdcch-ConfigCommon for DCI with C-RNTI.

The rational is that after sending RRC Setup the network won't know if
the UE has received and successfully applied it. Hence the network would
still continue to use the fallback DCI till it receives RRC setup
complete.
2025-09-15 15:47:13 -04:00
Rúben Soares Silva
6ff098e0bd Add Aerial-specific ERROR.indication codes
This adds the expectable error codes from Aerial L1, as described in https://docs.nvidia.com/aerial/archive/aerial-sdk/23-3/text/cubb_release_notes/scf_fapi_support.html#additional-aerial-specific-error-codes-reported-in-error-indication-from-l1-to-l2
The errors are added in such a way that they're only visible when compiled with Aerial
2025-09-15 14:54:45 +01:00
Rúben Soares Silva
0a796ebb6c Fix ERROR.indication unpack function
Fix an issue in which the unpacking is erroneously deemed unsuccessful even though it succeed in pulling all the bytes, this was due to not properly handling the return value of pull16 which is either 0 or 2, not 0 or 1.
Check the results of push and pull operation with correct boolean operator.
2025-09-15 14:54:44 +01:00
Guido Casati
956d30f4e1 HO preparation: fix PLMN type in nr_neighbour_cell_t
During the review of the N2 HO MR it has been found that the wrong type
plmn_identity_t (S1AP) was used in RRC. Now updated to the platform type plmn_id_t.
2025-09-15 10:08:49 +02:00
Guido Casati
9f97320cbe HO Preparation: calloc pdcp_config in DRB to Modify Item decoding
The malloced struct is initialized to garbage and when
the IE is absent, the output "PDCP reestablishment"
member (allocated in the stack) is set to a random value.
2025-09-15 10:03:11 +02:00
Robert Schmidt
206c7667e6 Merge branch 'integration_2025_w37' into 'develop'
Integration: `2025.w37`

* !3514 NR UE: add support for PDSCH rate matching with NZP CSI-RS
* !3630 feat(ldpc_aal): Do not try EAL init if FHI 7.2 is enabled
* !3634 reset MSG3 C-RNTI flag in case of failure
* !3566 fix 600 cppcheck notifications
* !3633 Fix PLMN print in select_amf
* !3631 Revert "Removed TRP-scheme byte from UL BF PDU to Interop with Aerial 25-1 (FAPI 10.02)"
* !3622 Populate sampled_ue_antennas
* !3601 gNB: adaptive DL/UL MCS based on reported SSB-SINR and measured PUSCH SNR
* !3637 fix bug in computing number of LCG IDs with data at UE
* !3635 Fixes and updates for UL scheduling, notably DSUUU
* !3607 Reworking BWP configuration
* !3531 Refactor measConfig
* !3612 CI: Creation of F1 Handover pipeline
* !3611 CI: Generalize PhySim tests, run PhySims on Gracehopper

Closes #985 and #975

See merge request oai/openairinterface5g!3636
2025-09-12 16:51:15 +00:00
Robert Schmidt
166589c2ef Add bands for neighbour configuration in HO CI pipeline
Since !3531, the band is mandatory in a neighbour configuration.

See also: fd4de3c720 ("Add support for band in neighbourConfiguration")
2025-09-12 18:47:12 +02:00
Leonardo Bonati
40fd22e26a Fix memory allocation issue in KPM RAN function sd parameter handling 2025-09-12 10:43:34 -04:00
Robert Schmidt
e486557f63 Merge remote-tracking branch 'origin/physim-gracehopper' into integration_2025_w37 (!3611)
CI: Generalize PhySim tests, run PhySims on Gracehopper

This changeset generalizes/harmonizes the CI infrastructure for physim
testing, and adds a new pipeline for physim tests on Gracehopper
machines.

Specifically:

- Refactor the existing CI code for running and analyzing physical
  simulators. The existing code assumed those tests are deployed using
  OpenShift. Instead, OpenShift/Helm-specificities (e.g., running a
  "release") have been removed, and instead of hardcoding the deployment
  of the physical simulators using a script for Helm, the function takes
  any script that can deploy using Helm/docker/from source. The overall
  appearance is the same.
- Add a new pipeline RAN-PhySim-GraceHopper-5G that executes physical
  simulators on gracehopper. Reporting is done in the same way as for
  existing physical simulators (e.g., like in the RAN-PhySim-Cluster-5G
  pipeline), but deployed in docker instead of helm.
  -> some tests don't work reliably on ARM yet and are skipped
- the RAN-gNB-N300-Timing-Phytest-LDPC pipeline has been reworked to use
  the same code for testing T2 offload, with ctest, and the same
  reporting.
- the CUDA LDPC test XML has been removed, as these tests don't work
  reliably.
- add a new macro add_timed_physim_test() that allows to define
  thresholds to be checked, so that ctest will check for them. see the
  documentation for more information
2025-09-12 15:57:51 +02:00
Robert Schmidt
230a969be4 Merge remote-tracking branch 'origin/CI-HO-setup' into integration_2025_w37 (!3612)
CI: Creation of F1 Handover pipeline

In this MR we are modifying/adding all the required files (.xml, .conf,
.yml) in order to create a pipeline on Jenkins that allows us to test
OTA F1 handover.
2025-09-12 15:56:34 +02:00
Robert Schmidt
8ca1d0d38d Doc: Add PhySim-Gracehopper and update existing PhySim-Cluster 2025-09-12 15:01:09 +02:00
Robert Schmidt
31aaa4ed3f Add PhySim-GraceHopper-5G to test pipelines 2025-09-12 14:54:49 +02:00
Robert Schmidt
998018db50 Slight restructuring of the physim doc
Move info about pipelines to the introduction instead of somewhere in
the middle. Add some filler text, and fix indentation headings.
2025-09-12 14:54:49 +02:00
Robert Schmidt
5beb8bf314 Print results of physims
Remove the runtime, which is not interesting, and add instead
- test name and if the test failed
- the threshold checks, if any, and
- possible additional information about test failures.
2025-09-12 14:54:49 +02:00
Robert Schmidt
eb9e4ef9ba Pass CTest test description in custom property or environment
Prior to this change, each test would have, as label, it's description.
This leads to many labels, which are normally reserved for grouping
tests. Move the description into a custom property instead.

Since we rely on the JSON output for the generation of HTML reports, we
need to also extract the description from the generated JSON. However,
custom properties are only logged starting from cmake 3.30. For
back-wards compatibility, write an additional, separate environment
variable TEST_DESCRIPTION from which the description can be read as a
fallback.

For the add_timed_physim_test(), this has been already done in a parent
commit.
2025-09-12 14:54:49 +02:00
Robert Schmidt
e5139b6f0f Put physim status info in separate box
A follow-up commit will introduce a change to print timing logs in the
HTML (if present in the test). Prepare for this with separate box.
2025-09-12 14:54:49 +02:00
Robert Schmidt
15befb41e6 Physim deploy(): add deployment timeout 2025-09-12 14:54:49 +02:00
Robert Schmidt
e824a6373d Rename to analyze_physim() 2025-09-12 14:54:49 +02:00
Robert Schmidt
b00dd803d1 Remove existing physim offload tests
After the parent commit, there is no need for these XML files anymore.
The tests are driven by ctest instead.
2025-09-12 14:54:49 +02:00
Robert Schmidt
42dbaaf75c Add new T2 Offload test 2025-09-12 14:54:49 +02:00
Robert Schmidt
adabb6a967 Add script to run PhySims from source
physim

script more
2025-09-12 14:54:49 +02:00
Robert Schmidt
da644bc91d Import existing timing thresholds for offload tests
Imported using commands:

    xmlstarlet sel -t \
      -m '//testCaseList/testCase[class="Run_Physim"]' \
      -v "concat('check_physim_threshold(physim.5g-offload.',physim_test,'.testX.Y \"DLSCH encoding time\" \"< ', physim_time_threshold, '\")')" \
      -n t2_offload_enc_nr_dlsim.xml >> ../../openair1/SIMULATION/tests/ThresholdsOffload.cmake

    xmlstarlet sel -t \
      -m '//testCaseList/testCase[class="Run_Physim"]' \
      -v "concat('check_physim_threshold(physim.5g-offload.',physim_test,'.testX.Y \"ULSCH total decoding time\" \"< ', physim_time_threshold, '\")')" \
      -n t2_offload_dec_nr_ulsim.xml >> ../../openair1/SIMULATION/tests/ThresholdsOffload.cmake
2025-09-12 14:54:49 +02:00
Robert Schmidt
9528ccceb9 Clean up output of xmlstarlet command 2025-09-12 14:54:49 +02:00
Robert Schmidt
a7f0a1a20c Import Offload unit tests into CTest
The unit tests have been imported with this command:

    xmlstarlet sel -t
      -m '//testCaseList/testCase[class="Run_Physim"]' \
      -v "concat('add_timed_physim_test(physim.5g-offload.',physim_test,'.testX.Y \"',desc,'\" ',physim_test,' ',physim_run_args,')')" \
      -n t2_offload_enc_nr_dlsim.xml t2_offload_dec_nr_ulsim.xml >> ../../openair1/SIMULATION/tests/CMakeLists.txt

The next commit will further cleanup this output. I commit it like this
for verification purposes.
2025-09-12 14:54:49 +02:00
Robert Schmidt
55cebe6edf Provide add_timed_physim_test() in cmake
Add two new macros that allow to register physim tests for ctest,
including timing thresholds that should be fulfilled.

First, add_timed_physim_test() registers a new test using a helper
script RunTimedTest.cmake. This is because after test execution, we need
to analyze logs, and the recommended way to do multiple steps in one
test is via a helper cmake script:
https://cmake.org/pipermail/cmake-developers/2016-February/027816.html

Second, check_physim_threshold() adds new thresholds. It takes a text to
be parsed, and a condition (e.g., "< 20") to check for the number
following the threshold (which is assumed to be present right after the
threshold). It uses a test property to count the total number of checks
(limiting them to 10), and sets environment variables for the script.  I
initially planned to use a test property for checks, but those are only
valid in the same directory, and RunTimedTest.cmake seems to be assumed
by cmake to be "elsewhere", hence I needed to resort to environment
variables.

RunTimedTest.cmake is called through cmake with the test parameters and
checks. It re-constructs a list of checks [1], runs the test, and pipes
the log into a separate script that is passed all checks (see below).
Afterwards, it verifies that both the test and script passed.

A script analyze-timing.sh builds an awk script from the checks passed.
The script analyzes each line of the test output for the threshold, and
compares against the threshold. analyze-timing.sh returns success if all
checks passed.

[1] I did not manage to pass a "list" of checks in a single environment
variable through the check_physim_threshold(), which would be simpler.
2025-09-12 14:53:09 +02:00
Robert Schmidt
48be94a8c1 Remove LDPC GPU physim tests
Many of these tests do not pass (ldpctest returns non-zero output).
Moving to ctest would make all these tests and hence the pipeline fail.
2025-09-12 14:53:09 +02:00
Robert Schmidt
b7cb74699d add_physim_test(): change signature for full test name
Change signature of the macro to take the full test name, a separate
description (previously called a label?), and the executable and test
invocation. The overall signature becomes easier.

The rational for the full test name is that a later commit will
introduce the possibility to define physim tests that are checked for
specific times, in which case we need to reuse the test name. Thus,
using the full name from the beginning leads to more clarity, even
though they are a bit longer.

Add an additional safety check that the given simulator is actually a
target defined within the project (in other words, it actually exists).

Update the documentation correspondingly.
2025-09-12 14:53:09 +02:00
Robert Schmidt
4809ffc92a Add new Physim test for gracehopper 2025-09-12 14:53:09 +02:00
Robert Schmidt
e6a0a1cac4 Deployment script of physims via docker 2025-09-12 14:53:09 +02:00
Robert Schmidt
89321fe824 Add Dockerfile for physim build in CI 2025-09-12 14:53:09 +02:00
Robert Schmidt
1cfca6ce47 Move PhySim definition to openair1/SIMULATION/tests
Most (but not all) physical simulators are defined under
openair1/SIMULATION/. Defining physical simulators below there seems to
be the more "obvious" directory anyway, as the physical simulators are

    openair1/SIMULATION/tests
    Phy(L1)  Sim        tests => PhySim (tests)
2025-09-12 14:53:09 +02:00
Robert Schmidt
91069fffd1 Query system info 2025-09-12 14:53:09 +02:00
Robert Schmidt
b60572d1fc Merge remote-tracking branch 'origin/refactor-measConfig' into integration_2025_w37 (!3531)
Refactor measConfig

- Refactor and minor improvements in get_MeasConfig function;
- Add support for band in neighbourConfiguration (It is currently
  possible to handover cells with different frequencies, as long as they
  are in the same band, but this MR allows the handover to also be done
  between cells in different bands).
2025-09-12 12:39:44 +02:00
Robert Schmidt
99962b551c Merge remote-tracking branch 'origin/reworking_BWP_configuration' into integration_2025_w37 (!3607)
Reworking BWP configuration

This MR reworks the configuration via fail of additional BWPs. Moreover, it
allows for a single BWP to be configured for a given UE at a given time (BWP
switch possible only via reconfiguration). It also reworks PTRS configuration
for consistency with the BWP one.
2025-09-12 12:38:13 +02:00
Robert Schmidt
743d342ad6 Merge remote-tracking branch 'origin/fixes-ul-sched' into integration_2025_w37 (!3635)
Fixes and updates for UL scheduling, notably DSUUU

Fix a number of problems that stem from !3521, notably regarding Msg3
scheduling, retransmissions in "UL-heavy" TDD scenarios, and BSR
handling. Modify a CI test to run a UL-heavy TDD scenario, and add
documentation for UL-heavy TDD scenarios.
2025-09-11 19:48:48 +02:00
Robert Schmidt
e2b3c1546e Add TDD pattern config asserts
Check that the number of slots in period/symbols in mixed slot conforms
to what is prescribed by the spec.
2025-09-11 19:47:52 +02:00
Robert Schmidt
13e9910e4e Modify CI SA 60MHz 2x2 test to be DSUUU
Update configuration and tweak iperf thresholds accordingly. Tune some
parameters for good UL reception.
2025-09-11 19:47:52 +02:00
Robert Schmidt
bb378620e9 Remove ulsch_max_frame_inactivity from CI configs
The parameter is either set to 10 (the default, so not necessary), or to
0 forcing the gNB to schedule the UE all the time, which is only
necessary in specific scenario, and here simply wrong.
2025-09-11 19:47:52 +02:00
Robert Schmidt
b283960637 Increase periodic BSR to 5ms: increase UL throughput
In high throughput UL scenarios, at least with our configuration, the UE
only sends Short BSR. The maximum is 300000 bytes, which is completely
"scheduled away" after a couple of UL grants. Increase the periodic BSR
to 5ms to get more BSR, which results in higher UL throughput.
2025-09-11 19:47:52 +02:00
Robert Schmidt
7c9a7ab374 Reset sched_ul_bytes on BSR to tend to overestimation
On BSR reception, reset sched_ul_bytes. This change means that we assume
that no data is "in flight" for this UE at time of BSR reception, or,
put differently, that we overestimate the buffer size at UE (in the
worst case).

To illustrate this, consider the following traces before/after this
change.

Before this change: Upon BSR reception, the estimated BSR of the UE is
reset, but the gNB still accounts for data "in flight". It is visible
that the calculated buffer size (estimated - scheduled) quickly goes to
zero, and we don't use all resources, despite the buffer still being
full. The maximum application throughput in this run was ~220Mbps.

    [NR_MAC]   SHORT BSR at  773.19, est buf 300000
    [NR_MAC]   ULSCH/PUSCH:  774. 6 RNTI af8e UL sched  774. 9 PRB start  0:162 TDA  2 TBS 32797 est 300000 sched 152704 est BSR 147296 TPC 1
    [NR_MAC]   ULSCH/PUSCH:  774. 6 RNTI af8e UL sched  774.11 PRB start  0:162 TDA  4 TBS 7172 est 300000 sched 159876 est BSR 140124 TPC 1
    [NR_MAC]   ULSCH/PUSCH:  774.10 RNTI af8e UL sched  774.12 PRB start  0:162 TDA  0 TBS 32797 est 292845 sched 185501 est BSR 107344 TPC 1
    [NR_MAC]   ULSCH/PUSCH:  774.10 RNTI af8e UL sched  774.13 PRB start  0:162 TDA  2 TBS 32797 est 292845 sched 218298 est BSR  74547 TPC 1
    [NR_MAC]   ULSCH/PUSCH:  774.11 RNTI af8e UL sched  774.14 PRB start  0:162 TDA  2 TBS 32797 est 260117 sched 218298 est BSR  41819 TPC 1
    [NR_MAC]   ULSCH/PUSCH:  774.11 RNTI af8e UL sched  774.16 PRB start  0:162 TDA  4 TBS 7172 est 260117 sched 225470 est BSR  34647 TPC 1
    [NR_MAC]   ULSCH/PUSCH:  774.15 RNTI af8e UL sched  774.17 PRB start  0: 35 TDA  0 TBS 7172 est 220236 sched 185501 est BSR  34735 TPC 1
    [NR_MAC]   ULSCH/PUSCH:  774.15 RNTI af8e UL sched  774.18 PRB start  0:162 TDA  2 TBS 32797 est 220236 sched 218298 est BSR   1938 TPC 1
    [NR_MAC]   ULSCH/PUSCH:  774.16 RNTI af8e UL sched  774.19 PRB start  0: 10 TDA  2 TBS 2017 est 187508 sched 187518 est BSR    -10 TPC 1
    [NR_MAC]   SHORT BSR at  774. 9, est buf 300000
    [NR_MAC]   ULSCH/PUSCH:  775. 0 RNTI af8e UL sched  775. 2 PRB start  0:162 TDA  0 TBS 32797 est 260117 sched 147549 est BSR 112568 TPC 1
    [NR_MAC]   ULSCH/PUSCH:  775. 0 RNTI af8e UL sched  775. 3 PRB start  0:162 TDA  2 TBS 32797 est 260117 sched 180346 est BSR  79771 TPC 1
    [NR_MAC]   ULSCH/PUSCH:  775. 1 RNTI af8e UL sched  775. 4 PRB start  0:162 TDA  2 TBS 32797 est 227389 sched 180346 est BSR  47043 TPC 1
    [NR_MAC]   ULSCH/PUSCH:  775. 1 RNTI af8e UL sched  775. 6 PRB start  0:162 TDA  4 TBS 7172 est 227389 sched 187518 est BSR  39871 TPC 1
    [NR_MAC]   ULSCH/PUSCH:  775. 5 RNTI af8e UL sched  775. 7 PRB start  0:162 TDA  0 TBS 32797 est 180353 sched 173174 est BSR   7179 TPC 1
    [NR_MAC]   ULSCH/PUSCH:  775. 5 RNTI af8e UL sched  775. 8 PRB start  0: 36 TDA  2 TBS 7298 est 180353 sched 180472 est BSR   -119 TPC 1

After this change: The gNB resets the number of bytes "in flight"
(sched). Thus, the calculated buffer is larger, and does not "run out"
before a new BSR arrives (which still indicates the maximum). The UE is
thus allocated all resources, but we might overestimate some resources.
The maximum application throughput in this run was ~300Mbps, limited by
MCS and not by estimated buffer size as in the previous case.

    [NR_MAC]   SHORT BSR at   43. 3, est buf 300000
    [NR_MAC]   ULSCH/PUSCH:   43.15 RNTI d3ea UL sched   43.17 PRB start  0:162 TDA  0 TBS 36897 est 263180 sched  36897 est BSR 226283 TPC 1
    [NR_MAC]   ULSCH/PUSCH:   43.15 RNTI d3ea UL sched   43.18 PRB start  0:162 TDA  2 TBS 36897 est 263180 sched  73794 est BSR 189386 TPC 1
    [NR_MAC]   ULSCH/PUSCH:   43.16 RNTI d3ea UL sched   43.19 PRB start 12:150 TDA  2 TBS 33822 est 263180 sched 107616 est BSR 155564 TPC 1
    [NR_MAC]   ULSCH/PUSCH:   43.16 RNTI d3ea UL sched   44. 1 PRB start  0:162 TDA  4 TBS 7941 est 263180 sched 115557 est BSR 147623 TPC 1
    [NR_MAC]   ULSCH/PUSCH:   44. 1 RNTI d3ea UL sched   44. 3 PRB start  0:162 TDA  0 TBS 36897 est 173698 sched  25881 est BSR 147817 TPC 1
    [NR_MAC]   ULSCH/PUSCH:   44. 1 RNTI d3ea UL sched   44. 4 PRB start  0:162 TDA  2 TBS 36897 est 173698 sched  62778 est BSR 110920 TPC 1
    [NR_MAC]   ULSCH/PUSCH:   44. 1 RNTI d3ea UL sched   44. 6 PRB start  0:162 TDA  4 TBS 7941 est 173698 sched  70719 est BSR 102979 TPC 1
    [NR_MAC]   SHORT BSR at   43.13, est buf 300000
    [NR_MAC]   ULSCH/PUSCH:   44. 5 RNTI d3ea UL sched   44. 7 PRB start  0:162 TDA  0 TBS 36897 est 292079 sched  36897 est BSR 255182 TPC 1
    [NR_MAC]   ULSCH/PUSCH:   44. 5 RNTI d3ea UL sched   44. 8 PRB start  0:162 TDA  2 TBS 36897 est 292079 sched  73794 est BSR 218285 TPC 1
    [NR_MAC]   ULSCH/PUSCH:   44. 6 RNTI d3ea UL sched   44. 9 PRB start  0:162 TDA  2 TBS 36897 est 292079 sched 110691 est BSR 181388 TPC 1
    [NR_MAC]   ULSCH/PUSCH:   44. 6 RNTI d3ea UL sched   44.11 PRB start  0:162 TDA  4 TBS 7941 est 292079 sched 118632 est BSR 173447 TPC 1
    [NR_MAC]   ULSCH/PUSCH:   44.10 RNTI d3ea UL sched   44.12 PRB start  0:162 TDA  0 TBS 36897 est 213587 sched  39972 est BSR 173615 TPC 1
    [NR_MAC]   ULSCH/PUSCH:   44.10 RNTI d3ea UL sched   44.13 PRB start  0:162 TDA  2 TBS 36897 est 213587 sched  76869 est BSR 136718 TPC 1
2025-09-11 19:47:52 +02:00
Robert Schmidt
443e59a318 Merge remote-tracking branch 'origin/num_lcg_id_with_data_fix' into integration_2025_w37 (!3637)
fix bug in computing number of LCG IDs with data at UE
2025-09-11 15:45:13 +02:00
Robert Schmidt
1e991bb8fe Merge remote-tracking branch 'origin/sinr_based_amc' into integration_2025_w37 (!3601)
gNB: adaptive DL/UL MCS based on reported SSB-SINR and measured PUSCH SNR

Currently this is used esp. if the number of rounds is limited to 1
(e.g. disable_harq).
2025-09-11 15:42:38 +02:00
Robert Schmidt
89ebbb4192 Do not trigger ul failure in measgap scheduling and standardize the verification if MAC is active in other scheduling functions 2025-09-11 11:49:31 +01:00
Robert Schmidt
c54b69e635 Merge remote-tracking branch 'origin/srsSampledAntennas' into integration_2025_w37 (!3622)
Populate sampled_ue_antennas

sampledUeAntennas: Bitmap of UE antenna indices sampled by the SRS waveform corresponding to this PDU’s SRS Resource.

• Codebook: corresponds to antenna ports in SRS Resources;
non-overlapping indices are expected for ports sampled via different
SRIs, for a given UE. [3GPP TS 38.214 [5], section 6.1.1.2]

With this aerial gets 2 UL layers:

    [NR_MAC]   Frame.Slot 0.0
    UE RNTI 63d3 CU-UE-ID 2 in-sync PH 48 dB PCMAX 20 dBm, average RSRP -68 (16 meas)
    UE 63d3: CQI 11, RI 4, PMI (5,0)
    UE 63d3: UL-RI 2, TPMI 0
    UE 63d3: dlsch_rounds 60/1/0/0, dlsch_errors 0, pucch0_DTX 1, BLER 0.01117 MCS (1) 0
    UE 63d3: ulsch_rounds 3813/261/8/5, ulsch_errors 5, ulsch_DTX 21, BLER 0.02966 MCS (1) 22 (Qm 8 deltaMCS 0 dB) NPRB 5  SNR 31.0 dB
    UE 63d3: MAC:    TX           2209 RX        1471874 bytes
    UE 63d3: LCID 1: TX            851 RX           1375 bytes
    UE 63d3: LCID 2: TX              0 RX              0 bytes
    UE 63d3: LCID 4: TX              0 RX              0 bytes
2025-09-11 10:51:43 +02:00
Robert Schmidt
fbaf38959c Merge remote-tracking branch 'origin/revert_fapi_trp_scheme_byte' into integration_2025_w37 (!3631)
Revert "Removed TRP-scheme byte from UL BF PDU to Interop with Aerial 25-1 (FAPI 10.02)"

This commit broke compatibility with Aerial when compiled with
-DSCF_FAPI_10_04_SRS=ON. It was decided that this should become the
default.

Modify documentation, and use a dedicated image name to make it clear in
the CI that it has SRS.
2025-09-11 10:51:01 +02:00
Robert Schmidt
197492ae89 Add documentation on UL-heavy TDD patterns 2025-09-11 10:18:19 +02:00
Reem Bahsoun
20a2ff1e49 Add the Handover pipeline to the RAN-Container-Parent 2025-09-10 21:36:03 +02:00
Reem Bahsoun
bb383359e2 Add the required files for Handover CI setup (.conf, .yml, .xml) 2025-09-10 21:35:58 +02:00
Reem Bahsoun
1dac64fa42 Add UE host (raspix) and OC CN for HO CI setup 2025-09-10 21:30:43 +02:00
rmagueta
7e6826ec03 Refactor and minor improvements in get_MeasConfig function 2025-09-10 18:57:04 +01:00
Nick Hedberg
1120d41dd6 Populate sampled_ue_antennas 2025-09-10 17:51:27 +01:00
Robert Schmidt
709d583950 Merge remote-tracking branch 'origin/issue-985' into integration_2025_w37 (!3633)
Fix PLMN print in select_amf and elsewhere

Closes #985
2025-09-10 16:59:05 +02:00
Robert Schmidt
67ec7b7029 Merge remote-tracking branch 'origin/cppcheck-errors' into integration_2025_w37 (!3566)
fix 600 cppcheck notifications

With my fedora 42, using the CI command for cpp check i get 1900 errors.
This change set fixes some of them.
2025-09-10 16:58:25 +02:00
Robert Schmidt
c4a0c3b05e Rename to deploy_physim()
deploy_oc_physim() is not specific to OpenShift anymore, so rename to a
neutral name.
2025-09-10 16:43:16 +02:00
Robert Schmidt
0ff85ff2c0 Rename PhySim deployment task to Deploy_Run_OC_PhySim
A future commit will introduce the possibility to deploy physims using
docker, so rename the current step to reflect that it works via
OpenShift.
2025-09-10 16:43:16 +02:00
Robert Schmidt
deadd5414d CI: Generalizce deploy_oc_physim()
A future commit will enable to deploy physical simulators via docker.
Hence:

- Move the script to run out of deploy_oc_physim(), to make it more
  generic (later commits will introduce other scripts)
- pass the working directory (the function will be moved into
  cls_oaicitest, as it fits neither cls_containerize nor cls_cluster
  when deploying the tests from source)
- not using ci-scripts: don't hardcode a specific path, just use the
  working directory
- avoid helm-specific pods summary, and put it into the general "physim
  logs"
- remove helm-specific "release", and use a generic name for results
- always log pod logs and status to debug, even if deployment was not
  successful or tests did not finish.
2025-09-10 16:43:16 +02:00
Robert Schmidt
876d2b1b69 CI PhySims: archive LastTest.log
LastTest.log has logs of all tests. It is a raw file from which we
generate per-test logs, but it is useful to also archive this in case we
need it.
2025-09-10 16:43:16 +02:00
Robert Schmidt
dd3ecbcf38 CI: Harmonize exec_script() API
Instead of making the function a class member, make it an instance
member because (1) it is more aligned with other functions, notably,
run(), and (2) especially for RemoteCmd() it can be faster, as
successive exec_script() calls do not require a new SSH connection.
2025-09-10 16:43:16 +02:00
Robert Schmidt
582aeac496 Remove superfluous HTML.CreateHtmlTabFooter()
CreateHtmlTabFooter() is already called in main.py, at the end of an
XML. This is enough, the others are "duplicates" that are not necessary.
2025-09-10 16:43:16 +02:00
Robert Schmidt
cfe9bfecce HTML report: Update to 2025 2025-09-10 16:43:16 +02:00
Calvin Peyron
66f0d960d3 Physim doc: mention unmaintained simulators 2025-09-10 16:43:16 +02:00
Reem Bahsoun
a9da4dba35 New cuBB image compiled with -DSCF_FAPI_10_04_SRS=ON flag
This flag will be used to compile the cuBB regardless of the use of SRS
This is due to the RX_Beamforming PDU that's used following 222.10.04
2025-09-10 13:35:33 +02:00
Rúben Soares Silva
f977b6affd Alter Aerial documentation to mention mandatory L1 compilation flag 2025-09-10 13:34:27 +02:00
Florian Kaltenberger
9ba2e7ca5b Revert "Removed TRP-scheme byte from UL BF PDU to Interop with Aerial 25-1 (FAPI 10.02)"
This commit broke compatibility with Aerial when compiled with -DSCF_FAPI_10_04_SRS=ON. It was decided that this should become the default.

This reverts commit 8beb382277.
2025-09-10 13:34:27 +02:00
Francesco Mani
67cb3f026d Save PUSCH information for each (re-)transmission
Instead of only saving this information in the first transmission, also
store it on each retransmission. This should ensure that if some
information changes, we always relate to the last transmission. For
instance, power control information might have changed, and should be
considered in subsequent rounds, if necessary. It also simplifies code.

Fixes: 6294ce715e ("Reorder pf_ul to process retransmission")
2025-09-09 20:01:04 +02:00
Robert Schmidt
bd6180e362 UL TDA: ensure we reach Msg3 in all cases
In at least the case of mu=1, min_rxtxtime=2 and DDDSU with no UL
symbols (for ULSCH) in the mixed slot, the current state of code does
not allow a UE to attach.  This is because at mu=1, Msg3 is k2+delta,
where k2=min_rxtxtime and delta(mu)=3.

Prior, this special case was handled because we had a dedicated Msg3
TDA, which in most cases is not necessary (because the mixed slot
allocates the DCI, and the following mixed slot has the UL grant). Add
code that tries to ensure that we only add the Msg3 TDA in cases when we
need it.

Fixes: 961a646dc7 ("Remove dedicated Msg3 TDA")
2025-09-09 20:01:04 +02:00
Laurent THOMAS
c833aee524 refine the LTE prach fix from cppcheck error detection 2025-09-09 18:07:31 +02:00
Laurent THOMAS
af125c39df array test overflow and possible divide by 0 fixes 2025-09-09 18:07:31 +02:00
Laurent THOMAS
10f304d9da return a error case before a SEGV if the pointer is null 2025-09-09 18:07:31 +02:00
Laurent THOMAS
bc238f9b2f fix as i can a error detected by cppcheck, w[lprime] is only 0, 1 or -1 2025-09-09 18:07:31 +02:00
Laurent THOMAS
3190ad47b1 avoid a cppcheck warning 2025-09-09 18:04:26 +02:00
Laurent THOMAS
5d118cf170 fix lack of test for fopen() return value 2025-09-09 18:04:26 +02:00
Laurent THOMAS
82931c8f01 fix printf() format errors 2025-09-09 18:04:26 +02:00
Laurent THOMAS
278d2cbca1 fix several not tested malloc or calloc return value 2025-09-09 18:04:26 +02:00
francescomani
5a7d275546 fix bug in computing number of LCG IDs with data at UE 2025-09-09 13:01:43 +02:00
Robert Schmidt
39bbadf3d1 Merge remote-tracking branch 'origin/fix_msg3_crnti_fail' into integration_2025_w37 (!3634)
reset MSG3 C-RNTI flag in case of failure

If MSG3 with C-RNTI fails, the UE should come back with a
re-establishment (after a given number of RA failures in general). In
that case, the OAI UE wouldn't reset the MSG3 with C-RNTI flag leading
to re-establishment failure.
2025-09-09 12:26:55 +02:00
Robert Schmidt
eb62fa3a1d Merge remote-tracking branch 'origin/aal_cleanup_eal_init' into integration_2025_w37 (!3630)
feat(ldpc_aal): Do not try EAL init if FHI 7.2 is enabled

When FHI 7.2 is enabled, the EAL initialization is done by the FHI and
the attempt to init EAL by ldpc_aal will fail. In that case, it is not
necessary neither to provide a DPDK core list for BBDEV.

This MR offers to skip EAL init in ldpc_aal when FHI 7.2 is enabled in
order to avoid error messages in the log and to allow dropping the
useless DPDK cores argument in that case.

Also add some fixes to the LDPC offload documentation.
2025-09-09 12:26:18 +02:00
Robert Schmidt
6c7e692bd5 Merge remote-tracking branch 'origin/nzp_csi_pdsch_ratematching' into integration_2025_w37 (!3514)
NR UE: add support for PDSCH rate matching with NZP CSI-RS

Currently only ZP CSI-RS is considered in function
configure_ratematching_csi, add support for NZP CSI-RS.

Closes #975
2025-09-09 12:25:56 +02:00
Thomas Schlichter
6b80fbf072 update doc/MAC/mac-usage.md 2025-09-09 11:17:43 +02:00
Thomas Schlichter
b3242490f1 enable SSB-SINR reporting for NTN GEO scenario 2025-09-09 11:17:43 +02:00
Thomas Schlichter
2944775952 nr_ulsim: fix computation of the scrambling errors
The array ul_harq_processes[harq_pid].f contains the data as bits, not bytes.
2025-09-09 11:17:43 +02:00
Thomas Schlichter
4e87ac46a1 nr_dlsim: several fixes for low SNR scenarios
If the DCI in PDCCH is not correctly received, no PDSCH would be decoded but counted as no error.
Also if the DCI was not correctly received, a TBS of 0 would be used in some computations and memory allocations.

Fix these not counting if there is no PDSCH decoding, and by using the known TBS instead of the one received from the DCI.
2025-09-09 11:17:43 +02:00
Thomas Schlichter
1c63d44afd NR UE: make the power averaging IIR filter faster
Especially high initial noise levels would stay too long and negatively impact the accuracy of later S(I)NR computations.
2025-09-09 11:17:43 +02:00
Thomas Schlichter
e70bb45ebd gNB: consider the measured PUSCH SNR when computing the UL MCS if only one round is used 2025-09-09 11:17:43 +02:00
Thomas Schlichter
9346b50eb3 gNB: consider also the min_mcs when computing the DL MCS if only one round is used 2025-09-09 11:17:43 +02:00
Thomas Schlichter
a9a9dfe297 gNB: adjust the dl_max_mcs based on the reported SSB-SINR 2025-09-09 11:17:33 +02:00
Guido Casati
7bb9f60068 Fix AMF related prints in NGAP 2025-09-09 09:12:57 +02:00
Thomas Schlichter
2b2e9563ff gNB: add SSB-SINR measurement values to the MAC statistics output 2025-09-08 13:32:23 +02:00
Thomas Schlichter
afc13c264c gNB: compute and store SSB-SINR in dB instead of just the SINR-index 2025-09-08 13:32:23 +02:00
Guido Casati
4d96f40023 Fix PLMN prints in NGAP/RRC
Also, replace NGAP_X with LOG_X to avoid false-positive format warnings in clang.

Closes #985
2025-09-06 12:38:34 +02:00
Guido Casati
3a734bc5d4 Replace ngap_plmn_identity_t with plmn_id_t and use proper size for TAI List for Paging
Use platform type plmn_id_t to simplify the code.

TAI List for Paging in NGAP PAGING message (9.2.4.1 3GPP TS 38.413)
is limited to 16.
2025-09-06 12:25:17 +02:00
rmagueta
fd4de3c720 Add support for band in neighbourConfiguration 2025-09-05 10:11:04 +01:00
Robert Schmidt
11a561cb7b Ensure that retransmission uses TDA as indicated
Previously, the TDA reuse condition was wrong: for multiple TDAs with
different k2, the symbol allocation might be the same, in which the
previous logic was using the wrong TDA. Fix the condition, and insert an
assert to ensure the allocated TDA is correct.
2025-09-05 09:14:02 +02:00
Robert Schmidt
454f690272 UL TDA for SRS: set correct right k2
We need to set the different k2 values according to the number of UL
slots, not all to the same k2.
2025-09-05 09:13:05 +02:00
Robert Schmidt
4e4f27c79d Fix: only create mixed slot UL TDU for more than 1 symbol
For PUSCH, we need at least 2 symbols, so ensure when creating the TDA.
2025-09-05 09:13:05 +02:00
francescomani
18041e3c41 common function to generate csi_MeasConfig
(also used to get the correct CSI meas structure in case of BWP switch)
2025-09-04 18:43:12 +02:00
francescomani
8d872f2f7d clone cellGroup for BWP switch to avoid removing BWP currently in use from gNB list 2025-09-04 18:43:12 +02:00
francescomani
ce1ddb260b bugfix in BWP release at UE 2025-09-04 18:43:12 +02:00
francescomani
45792da029 include missing harq information in phy-sim nr_mac_config_t initialization 2025-09-04 18:43:12 +02:00
francescomani
7300a7daf3 option to trigger reconfiguration with BWP switching 2025-09-04 18:43:12 +02:00
francescomani
22cd4e9312 configure only 1 BWP at a given time (1st active BWP) 2025-09-04 18:43:12 +02:00
francescomani
db93bc022f separate functions to configure initial BWPs 2025-09-04 18:43:12 +02:00
francescomani
3ea02249d6 rework BWP configuration via file 2025-09-04 18:43:12 +02:00
francescomani
9ab0715a5a formatting and refactoring with intermediate variable names to avoid too long lines 2025-09-04 18:43:12 +02:00
francescomani
e8f53fd5ac function to determine max UL MIMO layers 2025-09-04 18:43:12 +02:00
francescomani
a73dd19381 rework PTRS configuration via file 2025-09-04 18:43:12 +02:00
Jaroslava Fiedlerova
d372aa1b50 Merge branch 'integration_2025_w36' into 'develop'
Integration: `2025.w36`

* !3613 Speedup complex rotate for aarch64
* !3614 Ldpc encoder zc384 optimization
* !3625 gNB scheduler small fixes
* !3629 Fix for gNB max feedback time parameter
* !3619 Fix RA 2-Step MgsB Ack at UE
* !3626 Upgrade CI to Aerial 25-2

See merge request oai/openairinterface5g!3627
2025-09-04 16:36:42 +00:00
francescomani
8bae60c938 reset MSG3 C-RNTI flag in case of MAC reset 2025-09-04 17:30:21 +02:00
Romain Beurdouche
79c1133736 fix(ldpc_aal): Documentation
The tuning of the BLER is necessary for Intel ACC, not for the T2.
2025-09-04 08:31:10 +00:00
Romain Beurdouche
6647af4116 fix(ldpc_aal): Update documentation
Update the documentation to reflect that the DPDK core list is not
anymore necessary when using FHI 7.2.
2025-09-04 08:28:30 +00:00
Romain Beurdouche
705f04f58e feat(ldpc_aal): Do not initialize EAL if it is already initialized
When FHI 7.2 is enabled, the EAL initialization is done by the FHI and
the attempt to init EAL by ldpc_aal will fail.
In that case, it is not necessary neither to provide a DPDK core list
for BBDEV.

This commit offers to skip EAL initialization if it is already initialized
in order to allow dropping the useless DPDK cores argument in that case.
The change relies on `rte_dev_probe` to detect if EAL was already
initialized.
2025-09-04 06:56:59 +00:00
Jaroslava Fiedlerova
8e32225711 Merge remote-tracking branch 'origin/aerial_25-2' into integration_2025_w36 (!3626)
Upgrade CI to Aerial 25-2

The goal of this MR is to upgrade the Aerial setup to use release 25-2.
2025-09-03 17:00:43 +02:00
Reem Bahsoun
206e44ae54 Replace old nvIPC library with the new one 2025-09-03 13:30:49 +02:00
Jaroslava Fiedlerova
38ed261638 Merge remote-tracking branch 'origin/Fix_MsgB_Ack' into integration_2025_w36 (!3619)
Fix RA 2-Step MgsB Ack at UE

Update condition to prepare MsgB Ack the same way as Msg4 Ack
2025-09-03 12:57:00 +02:00
Jaroslava Fiedlerova
515eb988ab Merge remote-tracking branch 'origin/fix_set_max_fb_time' into integration_2025_w36 (!3629)
Fix for gNB max feedback time parameter

This bug is causing assertions like the following

Assertion (curr_pucch->active == 0) failed!
In nr_csi_meas_reporting() /oai-ran/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c:282
CSI structure is scheduled in advance. It should be free!

because the PUCCH structure would be smaller than it should be causing
overlapping.
2025-09-03 08:43:06 +02:00
Jaroslava Fiedlerova
1271d91676 Merge remote-tracking branch 'origin/minor_sched_fixes' into integration_2025_w36 (!3625)
gNB scheduler small fixes

A couple of fixes in gNB scheduling function. Removing a superfluous input from
CCE function and adding a missing call to reset beam allocation.
2025-09-02 20:51:09 +02:00
francescomani
225e640ca4 fix max feedback time parameter (needs to be computed every time we have that information) 2025-09-02 16:02:17 +02:00
Jaroslava Fiedlerova
774c390bbe Merge remote-tracking branch 'origin/ldpc_encoder_ZC384_optimization' into integration_2025_w36 (!3614)
Ldpc encoder zc384 optimization

This is a modification for the ldpc encoder which improves performance for
high-throughput cases. It contains a newly-generated file for innermost part of
the parity bit generation which, for AVX512, uses the mm512_permutex2var_epi8
instruction and for 128-bit (aarch64) the mm_alignr_epi8 (vextq_s8) in the
computation corresponding to each non-zero bit of the H matrix. This allows for
removing a very large memcpy and reduces the memory demand for the parity matrix
computation. For the moment this is limited to largest case in BG1, namely
Zc=384. This is the only format used when the number of segments after codeblock
segmentation is large (>8). This improves the timing required for ldpc parity
bits generation by more than a factor 2 with AVX512. This significantly reduces
the total time to generate the DLSCH/PDSCH.

See the merge request description for numbers.
2025-09-02 11:06:20 +02:00
Jaroslava Fiedlerova
9d2960eab8 Merge remote-tracking branch 'origin/cpx_rotate_aarch64' into integration_2025_w36 (!3613)
Speedup complex rotate for aarch64

This is a simple optimization for aarch64 for the "rotate_cpx_vector" used for
the phase_rotation in 5G NR. It provides a speedup of around 1.5 on high-end
aarch64 targets compared to the SIMDe translated version. It is implemented with
native NEON intrinsics and was largely inspired by suggestions from ChatGPT 5 :-)
2025-09-02 11:04:44 +02:00
Robert Schmidt
e69ef1d8cc UL scheduler log: print TDA, it has more info 2025-09-02 09:57:32 +02:00
Reem Bahsoun
69de8cbc24 Change cuBB tag to release 25-2 in YAML and documentation 2025-09-02 09:52:23 +02:00
Raymond Knopp
0e09c7c347 Add changes for avx512/aarch64 ldpc encoder optimizations
newly-generated files for innermost part of the parity bit
generation which, for AVX512, uses the mm512_permutex2var_epi8
instruction and for 128-bit (aarch64) the mm_alignr_epi8 (vextq_s8) in
the computation corresponding to each non-zero bit of the H matrix.

It is generated with ldpctest -n0 -g1. the changes for this are in a
future MR.  I did these changes to compare with the GPU version
(ldpc_encoder_cuda), so that the CPU version is as fast as possible. The
generator will come when we merge the GPU encoder/decoder which also has
a generator for the CUDA version. it was difficult to extract the
changes in ldpctest/ldpc_encoder.c so I just took the generated file.

This allows for removing a very large memcpy and reduces the memory
demand for the parity matrix computation. For the moment this is limited
to largest case in BG1, namely Zc=384. This is the only format used when
the number of segments after codeblock segmentation is large (>8).  This
improves the timing required for ldpc parity bits generation by more
than a factor 2 with AVX512. This significantly reduces the total time
to generate the DLSCH/PDSCH
2025-09-02 08:55:08 +02:00
Raymond Knopp
48d19e8a91 Add reset of dlsch_precoding timing counter in nr_dlsim 2025-09-02 08:48:32 +02:00
Raymond Knopp
5e3e8a70ff addition of aarch64 native implementation for rotate_cpx_vector for the case output_shift=15 2025-09-02 08:28:13 +02:00
Raymond Knopp
53813f522c Change target architecture in arm container build to armv8.2-a
This enables some additional instructions needed in the follow-up
commit.
2025-09-02 08:22:34 +02:00
Robert Schmidt
741e9ffae9 Simplify cross-compilation Dockerfile
Redirect to files and manual analysis as done in this Dockerfile is not
necessary since we just output all relevant build files to stdout.
Simplify to do the same here.

See: 35361db76b ("build_oai: don't redirect compilations to a file")
2025-09-02 08:19:40 +02:00
francescomani
2e15430731 adding other missing beam reaset in RA functions 2025-09-01 18:46:22 +02:00
francescomani
15bb046f9c adding a missing beam reaset in pf_dl 2025-09-01 17:25:01 +02:00
francescomani
169de8cdca remove unnecessary input in get_cce_index 2025-09-01 17:17:06 +02:00
Robert Schmidt
f155ad7202 Merge branch 'fix-oaiue-ota' into 'develop'
Fix OAIUE-OTA pipeline and increase tested traffic

I tried to "fix" the OAIUE pipeline in !3610 (merged) for making it more reliable, but inadvertently introduced many ULSCH DTX for UL traffic. Fix this, and increase DL traffic.

See merge request oai/openairinterface5g!3621
2025-08-29 16:22:17 +00:00
Robert Schmidt
2b75e09151 Increase DL UDP traffic for OAIUE OTA pipeline 2025-08-29 14:53:36 +02:00
Robert Schmidt
47d2ba1793 Fix RX gain for OAIUE-OTA pipeline
Adjust to avoid increased ULSCH DTX, probably because of saturation.

Fixes: 69cb71eddc ("Adjust configuration for OAI OTA test")
2025-08-29 14:53:31 +02:00
Robert Schmidt
fbb78ad825 Merge branch 'integration_2025_w35' into 'develop'
Integration: `2025.w35`

* !3604 Consider PDSCH EPRE to DMRS EPRE in NR UE
* !3606 Fix SRS TLV unpack
* !3602 Update RFsim CN
* !3516 [FHI72 M-plane] CM improvements and PM implementation
* !3538 add a new graphical T tracer to see gNB MAC scheduling decisions
* !3425 RFSim test for 10 UEs/process

Closes #950

See merge request oai/openairinterface5g!3610
2025-08-28 21:10:14 +00:00
ndomingues
0942927308 Fix RA 2-Step MgsB Ack at UE
Update condition to prepare MsgB Ack the same way as Msg4 Ack
2025-08-28 16:49:52 +01:00
Robert Schmidt
69cb71eddc Adjust configuration for OAI OTA test 2025-08-28 09:13:02 +02:00
Robert Schmidt
c2eadcbddb Merge remote-tracking branch 'origin/multi-ue-test' into integration_2025_w35 (!3425)
RFSim test for 10 UEs/process

This MR adds a testcase and changes required to run 10 UEs in a single
process with RFSim

- Added deregistration for all connected UEs
- Refactored MAC/RRC instance handling
- made map_current_symbol thread safe
- made opeanir0_cfg thread safe and local
- Added 10UE/process testcase
2025-08-28 08:59:05 +02:00
Robert Schmidt
b11354126f Merge remote-tracking branch 'origin/t-gnb-mac' into integration_2025_w35 (!3538)
add a new graphical T tracer to see gNB MAC scheduling decisions

May be useful for debugging
2025-08-27 15:14:55 +02:00
Cedric Roux
c8aea1b970 T: replace 'subframe' by 'tick'
Some code in T tracers is used by both LTE and NR.

In LTE, we expect 10 subframes per frame, and the logging is done with
this assumption. We have one tick per subframe.

In NR, we deal with slots, not subframes. And we have n ticks per frame
(depending on mu). As of today, only n=20 is tested (corresponding to
mu=1).

A previous commit introduced 'subframes_per_frame' which had the correct
meaning for LTE but was truly 'slots per frame' for NR. This creates
confusion.

Let's replace 'subframe' by 'tick' to reduce confusion.
2025-08-27 15:13:59 +02:00
Cedric Roux
fcd0013981 T: add a tracer 'gnb_mac'
To see MAC scheduling decisions. May be useful for debugging.
2025-08-27 15:13:59 +02:00
Robert Schmidt
08a3f98ef0 Merge remote-tracking branch 'origin/oai-ci-update-cn-mbim' into integration_2025_w35 (!3602)
Update RFsim CN

- Update RFsim CNs to latest version
- update the MBIM stop script to remove IP addresses (we don't use this
  script directly, so it does not have an impact)
2025-08-27 13:52:00 +02:00
Robert Schmidt
78b14302be Merge remote-tracking branch 'origin/mplane-improv' into integration_2025_w35 (!3516)
[FHI72 M-plane] CM improvements and PM implementation

Configuration Management:

- addition of the RU username in the fhi_72 section of the config file;
  previously hardcoded to oranbenetel
- modification of the frequency offset, frame structure, fft size,
  cyclic prefix, and Tx gain;
- addition of the managed delay node;

for Tx/Rx endpoints.

Performance Management implementation where OAI gNB
activates/deactivates available RU performance measurements.
2025-08-27 13:50:43 +02:00
Jaroslava Fiedlerova
433d5c1099 CI: update XML and yaml files for 10 UEs/process RFSim test 2025-08-27 13:15:40 +02:00
Bartosz Podrygajlo
cd67c33ba2 Fix NR UE mislabeling MSG2 as DLSCH PDU 2025-08-27 13:15:40 +02:00
Bartosz Podrygajlo
acb2ae93bd Add RFSim 10 UEs/process RFSim test
Add an RFSim test for 10 UEs in a single process.
2025-08-27 13:15:40 +02:00
Bartosz Podrygajlo
d72ee11b32 Make openair0_cfg thread safe
Move openair0_cfg to PHY_VARS_NR_UE making it UE instance specific
and thread safe.
2025-08-27 13:15:37 +02:00
alexjiao
86937cd8b1 Fix for function compute_csi_rm_unav_res 2025-08-27 16:11:57 +08:00
Bartosz Podrygajlo
62bcd822c5 Make map_current_symbol thread safe
Use local function pointers instead of static global variables.
2025-08-26 15:56:32 +02:00
Bartosz Podrygajlo
318d901ef6 Refactor RRC->MAC Communication: Replace ITTI with notifiedFIFO for Multi-UE Support
- Replaced ITTI message queues with notifiedFIFO for RRC to MAC communication in UE.
- Enables correct message delivery to multiple MAC instances running in parallel threads.
- Introduced `nr_mac_rrc_message_t` union for MAC-RRC messages.
- Updated all relevant message handling and initialization code to use notifiedFIFO.
2025-08-26 15:56:20 +02:00
Teodora
995cccc760 Update the FHI M-plane doc
Performance Management support explanation.

Example run modified according to:
- modification of the frequency offset, frame structure, fft size, cyclic prefix, and Tx gain;
- addition of the managed delay node;
for Tx/Rx endpoints.
2025-08-26 15:17:38 +02:00
Teodora
0367881ba9 Performance Management implementation
Introduced a parameter start_up_timing which indicates if PM activation is supported during the start-up
procedure. We initialize this parameter, based on the vendor.

Notification interval is set to 10s.
2025-08-26 15:17:38 +02:00
Teodora
625b4b0cde Add support for RU username parameter for connection to a RU via M-plane
The "sudo" access group is required by OAI gNB.
2025-08-26 15:17:38 +02:00
Teodora
e7db367c9d Rearrange <edit-config>, <validate>, and <commit> RPCs
Refactor these RPCs to facilitate their use in other Management functionalities,
not only Configuration Management.
2025-08-26 15:17:38 +02:00
Teodora
5291afe165 Add a comment for Rx gain correction
Definition in o-ran-uplane-conf.yang model:
"Gain correction of RF path linked with array element or array layers.
 Common part of overall gain_correction.
 gain_correction = common array-carrier gain-correction + eAxC gain correction."
2025-08-26 15:17:38 +02:00
Teodora
eee7d976ec Correct the Tx gain 2025-08-26 15:17:38 +02:00
Teodora
2e9101f833 Add managed delay node in Rx endpoint creation 2025-08-26 15:17:38 +02:00
Teodora
9bb15f15b8 Correctly fill the cyclic prefix for Tx/Rx endpoints 2025-08-26 15:17:38 +02:00
Teodora
8bd6e16ad1 Correctly fill the frame structure for Tx/Rx endpoints and fft size for Rx endpoints 2025-08-26 15:17:38 +02:00
Teodora
0b0e804f73 Properly pass the frequency offset to Tx/Rx endpoints 2025-08-26 15:17:38 +02:00
Teodora
10d60f71ce Separate Tx/Rx endpoint creation
As per o-ran-uplane-conf model, some nodes exist in Rx but not in Tx
(e.g. "ul-fft-sampling-offsets"), and vice versa.
2025-08-26 15:17:38 +02:00
Teodora
4e9e2b39e9 Set the correct yang node name for MTU retrieval 2025-08-26 15:17:38 +02:00
Robert Schmidt
89603f0649 Merge remote-tracking branch 'origin/fix_srs_tlv_unpack' into integration_2025_w35 (!3606)
Fix SRS TLV unpack

This MR changes the type of a variable to get the last index in which we
unpack the full 32 bits in a SRS TLV to int16 instead of uint16, in
order to be -1 when the TLV length is 0, thus skipping unpacking. This
only affects the SRS.indications sent by Aerial L1, which don't have
padding in the TLV, in case of OAI L1, we unpack in "full" 32 bit blocks
until the end of the TLV, if the length is 0, the unpacking loop exits
immediately. Furthermore, it also adds a check for the Report Type
parameter value in handle_nr_srs_measurements. If this value is zero,
according to SCF 222.10.04 Table 3-129 means a null report, so we can
skip processing it.
2025-08-26 14:54:42 +02:00
Robert Schmidt
417913dfaa Merge remote-tracking branch 'origin/fix-ue-pdsch-epre-ratio' into integration_2025_w35 (!3604)
Consider PDSCH EPRE to DMRS EPRE in NR UE

Fix UE PDSCH to DMRS EPRE ratio.

closes #950
2025-08-26 14:54:17 +02:00
Robert Schmidt
0ebb97c4ae nfapi.md: fix link to current document 2025-08-26 08:45:57 +02:00
Thomas Schlichter
e5b68fb6ee NR UE: modify shift value in nr_dlsch_mmse() for improved performance 2025-08-25 09:29:38 +02:00
Rúben Soares Silva
f1fbf4aa29 Skip unpacking SRS.indication TLV when report type is 0
Move the check for timing advance offset being 0xffff to before locking the scheduler
2025-08-22 15:33:35 +01:00
Bartosz Podrygajlo
0d651bf3a9 Add MAX_NUM_NR_UE_INST to NR UE MAC
- Use MAX_NUM_NR_UE_INST in NR UE MAC to control number of MAC instances.
 - Modify the MAC interface slightly so that nr_l2_init_ue only initializes one instance
2025-08-22 16:25:35 +02:00
Bartosz Podrygajlo
014be5326e Use MAX_NUM_NR_UE_INST in RRC
Use MAX_NUM_NR_UE_INST for number of NR UE RRC instances. Change the RRC
interface slightly so nr_rrc_init_ue initializes only one RRC instance pointed
to by the id given to the function
2025-08-22 16:21:46 +02:00
Rúben Soares Silva
c957e11682 Change last_idx type to int16 to properly avoid unpacking if the tlv length is 0 2025-08-22 15:17:47 +01:00
Bartosz Podrygajlo
32f8f258fa NR UE NAS: Use global define MAX_NUM_NR_UE_INST
Use NR UE global MAX_NUM_NR_UE_INST define instead of local define MAX_NAS_UE
2025-08-22 16:13:32 +02:00
Bartosz Podrygajlo
e58c52829d Introduce MAX_NUM_NR_UE_INST
Add a new define for maximum number of NR UE per process
2025-08-22 16:13:32 +02:00
Bartosz Podrygajlo
ba585cd96d Add deregistration for all UE instances. 2025-08-22 16:13:32 +02:00
Bartosz Podrygajlo
598fbb5a24 Consider PDSCH EPRE to DMRS EPRE in NR UE 2025-08-22 15:59:52 +02:00
Robert Schmidt
207aac94d1 Merge branch 'integration_2025_w34' into 'develop'
Integration: `2025.w34`

* !3555 Remove dead code and variables, simplify code
* !3591 separate computation of size and value for DCI precoding information
* !3550 some work for better interoperability with srsRAN DU
* !3562 cleaning syntax of nr-ru.c
* !3598 Align add_boolean_option as per CMake documentation use only ON/OFF for uniformity
* !3407 Taps client for vrtsim
* !3035 NR L1 common channel level functions
* !3589 RF emulator and improvements of the timers
* !3577 Fix for UECAP file handling in dora/phytest mode
* !3600 Fix for UE TCI state ID configuration
* !3599 DLSCH scheduler: fix bugs in UE sorting

See merge request oai/openairinterface5g!3597
2025-08-22 08:07:59 +00:00
Robert Schmidt
792a7faf09 MBIM stop script: remove IP address
The CI detects whether a UE connected (and has a PDU session) by trying
to read the IP address. It therefore assumes that as long as the UE is
not connected, no IP would be present.

With the existing stop_quectel_mbim.sh script, this was not the case; it
would simply leave the IP address.  Modify this script to flush all IP
addresses on disconnect to remedy this.
2025-08-21 18:19:06 +02:00
Robert Schmidt
2de3d1f525 CI: Upgrade RFsim CNs to v2.1.10 2025-08-21 18:18:13 +02:00
Robert Schmidt
6758d14a93 Merge remote-tracking branch 'origin/fixes-dlsch-sched' into integration_2025_w34 (!3599)
DLSCH scheduler: fix bugs in UE sorting

Fix two issues/bugs when sorting UEs in the DLSCH scheduler following
the PF metric, which should improve fairness.
2025-08-21 18:10:23 +02:00
Robert Schmidt
406e36919f Merge remote-tracking branch 'origin/config_UE_TCI_fix' into integration_2025_w34 (!3600)
Fix for UE TCI state ID configuration
2025-08-21 17:30:49 +02:00
Robert Schmidt
8695a8dbba Merge remote-tracking branch 'origin/dora_phytest_uecap_fix' into integration_2025_w34 (!3577)
Fix for UECAP file handling in dora/phytest mode
2025-08-21 17:30:15 +02:00
Robert Schmidt
8ccd944db2 Merge remote-tracking branch 'origin/rf_emulator_and_timers_fix' into integration_2025_w34 (!3589)
RF emulator and improvements of the timers

RF emulator:
Add an RF library emulating a real device without the need of a real
device.  This is thought to enable using phy-test without requiring a
radio device or channel simulation.  The library synchronizes on the
real time clock, drops TX and generate noise on RX.  Noise generation
can be disabled and the noise level configured.

Timers improvements:
- Fix standard deviation for merged timers
- Add display of ULSCH decoding timers
- Add decoding timer in AAL
2025-08-21 15:22:44 +02:00
Romain Beurdouche
42ad189bf3 feat(rf_emulator): documentation 2025-08-21 10:53:03 +02:00
Robert Schmidt
946939e8cc CI: integrate RFemulator phytest in timing-phytest pipeline 2025-08-21 10:53:03 +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
Romain Beurdouche
1cebf02b1e feat(rf_emulator): Add parameters
Add two parameters:
* `enable_noise` to enable noise injection at TX
* `noise_level_dBFS` to set noise level
2025-08-21 10:53:03 +02:00
Robert Schmidt
a30bee2fab DLSCH sched: Fix coefficients for UE list ordering
Update the comparator() to properly sort UEs based on their coefficient
by appliey a consistent logic of -1/0/1 (see man qsort) for
smaller/equal/larger.  The previous logic was only sorting based on 0/1
(equal/larger), which would result in some UEs with a high coefficient
not necessarily advancing to the start of the list, which could reduce
the likelihood of them being scheduled when they actually should (in
other words, this should improve fairness).

See also: 62e4025bc8 ("Integrate inactivity scheduling into main
    allocation loop")
2025-08-21 10:33:59 +02:00
Robert Schmidt
8a091a0b84 DLSCH sched: only sort relevant part of list
This reduces the amount of elements to compare.

See also: 7ee8e8eaba ("Fix bug: only sort relevant part of list")
2025-08-21 10:32:23 +02:00
francescomani
dd0188dfdc fix for config UE TCI state ID 2025-08-21 09:41:14 +02:00
Robert Schmidt
5ad35f6bfe Merge remote-tracking branch 'origin/vrtsim-taps-client' into integration_2025_w34 (!3407)
Taps client for vrtsim

The MR allows vrtsim to connect to the Raytracing Channel Emulator (CE later).
https://gitlab.eurecom.fr/oai/raytracing-channel-emulator

Additional Ubuntu packages required:

- libnanomsg-dev
- flatbuffers-compiler
- libflatbuffers-dev

Everything was tested on the same host. Follow the steps below to
successfully replicate:

1. Build nr-softmodem dependencies
2. Build nr-softmodem for (gNB, nrUE) with OAI_VRTSIM_TAPS_CLIENTset to ON.
3. Start the core network (Optional) follow this tutorial
4. Start the gNB

       sudo ./nr-softmodem -O ../../../targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.usrpb210.conf --gNBs.[0].min_rxtxtime 6 --device.name vrtsim --vrtsim.role server --vrtsim.timescale 0.5 --vrtsim.taps-socket ipc:///tmp/ru_socket_0

5. Start the nrUE

       sudo ./nr-uesoftmodem -C 3619200000 -r 106 --numerology 1 --ssb 516  --band 78 --device.name vrtsim --vrtsim.taps-socket ipc:///tmp/ue_socket_0

6. Start the CE Server, once the UE and gNB are running properly, so the
   server can connect to IPC sockets
7. Start CE client; the binaries can be downloaded from a pipeline run
   or from this link
8. Move the UE in the CE client to generate a new taps array and
   populate the taps in softmodems
2025-08-21 09:35:41 +02:00
Robert Schmidt
0a65bd27c1 Merge remote-tracking branch 'origin/NR_common_L1' into integration_2025_w34 (!3035)
NR L1 common channel level functions

Common L1 functions shared between gNB and UE for DLSCH/ULSCH/PDCCH/PBCH
channel level
2025-08-21 09:34:31 +02:00
Robert Schmidt
c61ef34a38 Merge remote-tracking branch 'origin/cmake-boolean-correction' into integration_2025_w34 (!3598)
Align add_boolean_option as per CMake documentation use only ON/OFF for uniformity

The add_boolean_option of CMake is not uniform everywhere. We were using
either True/False or ON/OFF. It is better to be uniform to avoid
confusion.

As an example, see here CMake documentation for an example:
https://cmake.org/cmake/help/latest/module/CMakeDependentOption.html#example-basic-usage

There are also some minor spelling corrections.
2025-08-21 09:33:03 +02:00
Robert Schmidt
2eb9a36e21 Merge remote-tracking branch 'origin/cleaning-syntax-nr-ru.c' into integration_2025_w34 (!3562)
cleaning syntax of nr-ru.c
2025-08-21 09:32:31 +02:00
Robert Schmidt
d0f6c63314 Merge remote-tracking branch 'origin/interop-srsran-du' into integration_2025_w34 (!3550)
some work for better interoperability with srsRAN DU

Just add the minimum to get some user plane traffic going on.

When doing user plane traffic, in the CU logs we have a lot of:

    [GTPU]   NR-RAN container type: 1 not supported

That will be fixed in another MR, not here.
2025-08-21 09:31:32 +02:00
Cedric Roux
653ad775ea hack: ignore empty Cell Group Config returned by DU
Interoperability testing with srsRAN DU shows than when receiving
RRCReconfigurationCompleteIndicator in a UEContextModificationRequest
the DU replies in the UEContextModificationResponse with an empty
CellGroupConfig.

This CellGroupConfig is encoded as 2 zero bytes. Let's ignore this
message when we receive it, don't forward it to the UE in a
RRC Reconfiguration, as it should per standard (38.473 8.3.4.2):

    If the CellGroupConfig IE is included in the DU to CU RRC Information
    IE contained in the UE CONTEXT MODIFICATION RESPONSE message, the
    gNB-CU shall perform RRC Reconfiguration as described in TS 38.331 [8].
    The CellGroupConfig IE shall transparently be signaled to the UE as
    specified in TS 38.331 [8].

To be removed/reworked in the future if the interoperability
situation improves.
2025-08-21 09:30:41 +02:00
Cedric Roux
807b38ddae GTPU: CU has to send NR-U Sequence Number
This is in 3GPP TS 38.425.

Because it was not done, there was a problem of interoperability
between openair CU and srsran DU. No DL traffic was reaching the UE.

A new GTPU API function is introduced: gtpv1uSendDirectWithNRUSeqNum().
It is only used in the gNB CU, in PDCP. So it was decided to not add a
new parameter to gtpv1uSendDirect() but instead add a new API function.
2025-08-21 09:30:41 +02:00
Cedric Roux
84ce708f96 GTPU: basic support of DL USER DATA
See 3GPP TS 38.425 5.5.2.1.

Only sending part, only dealing with NR-U Sequence Number.
2025-08-21 09:30:41 +02:00
Cedric Roux
c35f07b0b9 GTPU: add an API to better deal with extension headers
And adapt existing code to use it.

Only for transmission for the moment.
2025-08-21 09:30:41 +02:00
Bartosz Podrygajlo
513173ae0d Rename VRTSIM cmake option to OAI_VRTSIM 2025-08-20 15:57:34 +02:00
Bartosz Podrygajlo
171b3f206f VRTsim: Add a timeout in taps client
Add a timeout in nanomsg receive code to allow the client
thread to exit cleanly.
2025-08-20 15:57:34 +02:00
Bartosz Podrygajlo
74fc56813f Update vrtsim documentation 2025-08-20 15:57:34 +02:00
Bartosz Podrygajlo
ea3a4b991c VRTSIM: allow client reconnection via a connection descriptor file
Replace the unwieldy unix socket implementation of peer information
exchange with an authorative connection descriptor file that
informs the client of the connection method an number of antennas
on the server.

This allows the server to run without the client and allows the
client to reconnect as long as the server is running, as many times
as needed.
2025-08-20 15:57:34 +02:00
Bartosz Podrygajlo
54fdd3547b Clean exit of vrtsim client if server is stopped first
Force exit in case current sample is not modified by the server with 2s.
2025-08-20 15:57:34 +02:00
Bartosz Podrygajlo
fc28e2d3fc Make vrtsim output to stdout more readable. 2025-08-20 15:57:34 +02:00
Bartosz Podrygajlo
acba82b874 Simplify shm td iq channel implementation
Move the channel state management outside the channel implementation.
This simplifies the channel implementation but forces users of the
channel to manage it's state manually.
2025-08-20 15:57:34 +02:00
Bartosz Podrygajlo
fcea07ca71 Detect disconnecton & handle error states in vrtsim
Add handling for error states in vrtsim which allows to close the
softmodems with CTRL+C without hanging, improving user experience
 - Client detection of stale timer.
 - Abort state for client and server
2025-08-20 15:57:34 +02:00
Bartosz Podrygajlo
16f5299203 Taps client client for vrtsim
Added a libary that can connect to a channel emulator and provide taps
as they are generated.

 - Enable connection from vrtsim to channel emulation server
 - Depends on flatbuffers definition file from raytracing-channel-emulator
 - Depends on libanomsg-dev and flatbuffers-compiler (Ubuntu) or equivalent
 - Added a compile time option ENABLE_TAPS_CLIENT to prevent other users
   from being affected by additional dependencies
2025-08-20 15:57:30 +02:00
Sagar Arora
fc1c8a9be0 Align add_boolean_option as per cmake documentation use only ON/OFF for uniformity
Signed-off-by: Sagar Arora <sagar.arora@openairinterface.org>
2025-08-20 13:17:45 +02:00
Robert Schmidt
8a05dcdfee Merge remote-tracking branch 'origin/NR_fix_tpmi_ctnd' into integration_2025_w34 (!3591)
separate computation of size and value for DCI precoding information

This removes stuff that is only relevant for the gNB from the common
functions and moves it to the gNB scheduler functions (related to UL
precoding). In principle no functional change.
2025-08-20 13:11:47 +02:00
Robert Schmidt
60bb39570b Merge remote-tracking branch 'origin/compile-improvements' into integration_2025_w34 (!3555)
Remove dead code and variables, simplify code
2025-08-20 13:11:28 +02:00
Laurent THOMAS
13f5c258ca remove unused global 2025-08-20 09:36:48 +02:00
Laurent THOMAS
2bda52b054 rename a global "ru" in root_unit and include correctly the .h file, that leads to mistakes fixes 2025-08-20 09:36:48 +02:00
Laurent THOMAS
4b47d26ea2 remove dirty and unused functions with global vars (not working anyway) 2025-08-20 09:36:48 +02:00
Laurent THOMAS
c2d9f17242 remove a dependancy of gNB to LTE that is not used and adds global vars to gNB 2025-08-20 09:36:48 +02:00
Laurent THOMAS
4a3ebb3033 remove dead code and replace unmanaged asn1_xer_print global variable by the appropriate existing debug flag 2025-08-20 09:36:48 +02:00
Laurent THOMAS
2dae7b0db4 Limit visibilty of roundKeys 2025-08-20 09:36:48 +02:00
Laurent THOMAS
7cc35cf7e0 remove dead function 2025-08-20 09:36:48 +02:00
Laurent THOMAS
c4f4f8d919 Remove threequarter_fs, log_level; make functions static
2 functions with same name as static to make it clearer they are separate.

remove unused copy of log_level global var.

remove threequarter sampling variable from the radio board general
configuration. The decision of sampling rate is made above. A better
behavior can be done later, like ask to the radio board what sampling
rate it can do,then use it to decide the appropiate sampling rate from
the gNB configuration. In UE case, it is another issue, as the sampling
rate would change after we decode SIB1, but also it is not developped
yet.
2025-08-20 09:36:23 +02:00
Laurent THOMAS
78f12dbc03 Change tracy version to latest release 2025-08-20 09:32:23 +02:00
francescomani
b4796b4dda remove unused deinterleaving function from dlsch ue 2025-08-19 16:25:47 +02:00
francescomani
6af8f5619a use common channel level for PDSCH 2025-08-19 16:25:44 +02:00
francescomani
8d904dbf23 use common channel level for PUSCH 2025-08-19 16:24:17 +02:00
francescomani
65d0fb152e use common channel level for DCI reception 2025-08-19 16:19:48 +02:00
francescomani
a95a32c2f6 use common channel level for PBCH 2025-08-19 16:18:41 +02:00
francescomani
92dc641e98 common channel level function 2025-08-19 16:11:50 +02:00
Cedric Roux
c4562df2e7 T: add some traces
To be used by next commit.
2025-08-18 15:26:10 +02:00
Cedric Roux
cc87c72ac3 T: fix a typo 2025-08-18 11:53:54 +02:00
Cedric Roux
c4acec706d T: make number of subframes per frame a configurable item
Think: NR with different number of slots per frame depending on mu.

The name 'subframes_per_frame' is a bit ambiguous. It is valid for LTE,
but for NR it should be 'slots_per_frame'.

For example, for sub-carrier spacing of 30KHz, we have 20 slots per
frame, so in this case subframes_per_frame = 20. In reality whatever
the numerology, there is always 10 subframes per frame in NR.

But how to name this variable which is used both for LTE and NR cases?
'subframes_or_slots_per_frame'? It's a bit long and also ambiguous.

Conclusion: no big deal I think. 'subframes_per_frame' and so be it.
2025-08-18 11:53:54 +02:00
Cedric Roux
138886ad5e T: tti view: add automax ability
Also, update a cmake file because compilation of the tracer 'ue' fails
otherwise.
2025-08-18 11:53:54 +02:00
Cedric Roux
595e650f9f T: scrolltti: handle tick discontinuities
For TDD.
2025-08-18 11:53:54 +02:00
Cedric Roux
645393f464 T: throughputlog: handle tick discontinuities
Think: TDD.
2025-08-18 11:53:54 +02:00
Cedric Roux
ee2668b7c3 T GUI: add a get_range() API function for xy_plot 2025-08-18 11:53:54 +02:00
Cedric Roux
c8d64f0dd1 nr rlc: add an API function to retrieve the occupancy of TX list 2025-08-18 11:53:54 +02:00
Bartosz Podrygajlo
096ea7bd87 Fixes for vrtsim
- Allow client to exit cleanly if server is down
 - Ensure timing_thread is joined only once avoiding exit_function loop
 - Free noise_device
 - Save previously sent samples for channel modelling
2025-08-18 08:07:51 +02:00
Laurent THOMAS
29108a0974 cleaning syntax of nr-ru.c 2025-08-16 21:38:18 +02:00
Romain Beurdouche
dfa77647b1 feat(rf_emulator): Add late writes counter 2025-08-16 08:35:13 +00:00
Romain Beurdouche
5e03748835 feat(rf_emulator): Add noise generation 2025-08-16 08:35:08 +00:00
Cedric Roux
33cbbafddb ds: add a new type "byte array producer"
Introduced to write bytes to a byte array with size checking.
2025-08-14 23:37:11 +02:00
Robert Schmidt
9e37a2cf94 Merge branch 'integration_2025_w33' into 'develop'
Integration: `2025.w33`

* !3563 UE fixes: pucch format 2 and CSI IM
* !3567 Workaround for handling 2 SS0 occasions per slot
* !3578 fix a T trace
* !3395 RFsim variable size H_awgn_mimo
* !3581 NR UE NTN: consider acceleration on orbital path to calculate N_UE_TA_drift_variant
* !3580 NR UE: fix pdcch llr_size calculation in nr_rx_pdcch()
* !3576 Cleanup documentation and interface of the LDPC segment coding libraries
* !3573 Make Amarisoft UE sim a RedCap UE
* !3586 Print UE command line parameters at gNB MAC for split architecture without L1
* !3584 add gtpu error packet parsing and display
* !3556 Introduce support for Cat-B RU using Predefined-Beam BF with Aerial L1
* !3492 Upgrade CI images to Ubuntu 24
* !3521 Refactor ULSCH scheduler towards more TDD pattern flexibility
* !3590 Improve MAC docs for MCS and docker for BuildKit usage
* !3579 CI: speed up and simplify build, remove unnecessary Python code, remove --eNB\* parameter list

Closes #927 and #973

See merge request oai/openairinterface5g!3583
2025-08-14 16:18:58 +00:00
Romain Beurdouche
bf83b78758 feat(rf_emulator): Count late reads
Count late reads and print every second instead of printing each.
2025-08-14 15:33:36 +00:00
Romain Beurdouche
5212bd7a85 feat(rf_emulator): Add a dummy RF library
Add a simple RF emulator library with no real RF.
It only synchronizes the gNB with the real time clock.
It is to be used for stress test or benchmarking in phy-test mode.
2025-08-14 15:33:32 +00:00
Robert Schmidt
2c351c94d0 Merge remote-tracking branch 'origin/doc-updates' into integration_2025_w33 (!3590)
Improve MAC docs for MCS and docker for BuildKit usage

See commits for details. The first one is for fixing an omission in
!3281, the second to clarify docker build usage.

Closes: #973
2025-08-14 16:46:44 +02:00
Robert Schmidt
9f5ea8beba Merge remote-tracking branch 'origin/cleanup-build-oai-speedup-cluster' into integration_2025_w33 (!3579)
CI: speed up and simplify build, remove unnecessary Python code, remove --eNB* parameter list

This cleans up the CI framework for running end-to-end tests, and
improves the integration with OAI code. Specifically

- cleanup build_oai and helpers to output all text, which is captured
  better by the CI
- build some images in the Cluster-Build in parallel to increase speed
- remove all --eNB{,1,2}{IPAddress,UserName,Password} variables. Those
  were indexed through "instance" and "server ID" and are replaced with
  the actual node name. I consider further cleanup to introduce a
  "global" XML file node name so we don't need this in each step and
  instead define this once.
- individual cleanup
2025-08-14 16:45:52 +02:00
Robert Schmidt
5b8d66bbac Write simple CI documentation and add sample script 2025-08-14 14:55:23 +02:00
Robert Schmidt
b075c733f3 CI: correct log analysis filename interpolation
A previous commit changed to use archiveArtifact() to recover CI logs,
and then attempted to "guess" the L1/MAC stats file name through a
regex. However, the format "enb-[0-9]+" is not correct, as
archiveArtifact() puts the task ID ("[0-9]+") BEFORE the file name
(here, "enb"). So, make it more generic and match the final "-enb.log"
("$" means "end of string").

Fixes: 244ea8fc22 ("Use archiveArtifact() for TerminateeNB()")
2025-08-14 14:55:23 +02:00
Robert Schmidt
f82063c252 CI: Sleep: print time to wait 2025-08-14 14:55:23 +02:00
Robert Schmidt
c5624661eb Remove HTML 'no analysis function'
For some network functions, we don't match an analysis function. In the
console logs we print an info message. In the HTML, it's just noise.
2025-08-14 14:55:23 +02:00
Robert Schmidt
852e98d385 Run_Physim(): avoid large console logs, rewrite file
Many of these tests exit with an exit code != 0. Thus, the CI
automatically logs the result. Rather, write everything including stderr
to the file for analysis.

Also, rewrite the file with ">" instead of appending through ">>". While
appending works because the CI removes files after archiving, it seems
"cleaner" to remove files.
2025-08-14 14:55:23 +02:00
Robert Schmidt
3c54daf4e2 Remove "forcedWorkspaceCleanup" option
It is superseded by the CreateWorkspace() function and task step (which
removes and recreates a workspace), and this option was not actually
used in any function except for the build of unit tests, but no XML
step actually specified this option.
2025-08-14 14:55:23 +02:00
Robert Schmidt
35f080e426 Fix: new Iperf test need to get ctx 2025-08-14 14:55:23 +02:00
Robert Schmidt
9e1cbb1035 Ignore eNB{,1,2}{UserName,IPAddress,Password} parameters
After having transitioned to direct node names in the XML, these
parameters are not relevant anymore.

The best way to view this patch is with

    git show <SHA> --ignore-all-space
2025-08-14 14:55:04 +02:00
Robert Schmidt
0e60be785c Remove SSH connection
Remove this class. It is not safe to use (no return codes, can get out
of sync), hardcodes the use of passwords, and it's API is cumbersone.

More explanations can also be found in !1867. It is superseded by
cls_cmd.py
2025-08-14 14:55:04 +02:00
Robert Schmidt
dc27690c86 LogCollecteNB() not used anymore
Since 28ce0dc444 ("Main: pass in ctx"), the CI always collects logs
into cmake_targets/log/. Hence, LogCollecteNB() is never called. We can
remove it.

Further, change the cmake_targets/log/ to ci-log/, which is shorter, and
append a / on the zip path to make sure that only contents is zipped.
2025-08-14 14:55:04 +02:00
Robert Schmidt
45da9face4 Reimplement Initialize_eNB()/Terminate_eNB()
Reimplement these functions by

- using cls_cmd
- retain only the necessary steps from the timing-phytest function
- pass in ctx and node information, instead of server ID
- remove all superfluous variables that don't seem to be used
- make some lists (corresponding indices are "server ID") into normal
  variables.
2025-08-14 14:55:04 +02:00
Robert Schmidt
c4efe9feed cls_containerize: yamlPath/services as normal string
These variables were set as lists, to be indexed by the "server ID".
Since this has been removed from all XMLs, it is not necessary anymore.
2025-08-14 14:55:04 +02:00
Robert Schmidt
3f4df04875 Run_Physim(): pass node 2025-08-14 14:55:04 +02:00
Robert Schmidt
190dc55d9f Pass node to various Build*() functions
Pass node directly from XML to these functions

- BuildClusterImage()
- BuildImage()
- BuildProxy()
- BuildRunTests()

instead of reading the "server ID" and looking up from
eNB_IPAddress/eNB1_IPAddress/eNB2_IPAddress.

Improve the proxy build unit test by properly passing ctx information.
2025-08-14 14:55:04 +02:00
Robert Schmidt
293c7afd0b File not used by CI 2025-08-14 14:55:04 +02:00
Robert Schmidt
074092af17 Remove unused variables 2025-08-14 14:55:04 +02:00
Robert Schmidt
d3837cd3b0 Deploy_Run_PhySim(): pass node name
harmonize with other code that takes a "node" parameter.
2025-08-14 14:55:04 +02:00
Robert Schmidt
af58cf2441 CppCheckAnalysis()/LicenceFormattingCheck(): use node
- ubuntu18 eNB_IPAddress obelix => obelix
- cppcheck eNB_IPAddress 172.21.18.47 => carabe
2025-08-14 14:55:04 +02:00
Robert Schmidt
6233667de9 Push_Local_Registry(): pass node 2025-08-14 14:55:04 +02:00
Robert Schmidt
7839d06601 Create/Deploy/Undeploy(): use node
Pass the node name for a host on which to create a workspace or
deploy/undeploy.

Add a new test for the creation of workspaces.

To help myself and the reviewer, here is a list of
"eNB_IPAddress"/"eNB1_IPAddress" parameters I copied from the various
pipelines:
- rfsim 4G eNB_IPAddress none => localhost
- rfsim 5g eNB_IPAddress none => localhost
- flexric eNB_IPAddress none => localhost
- l2sim 4g eNB_IPAddress none => localhost
- l2sim 4G eNB1_IPAddress 172.21.16.128 => obelix => localhost
- cluster image eNB_IPAddress poseidon
- ubuntu18 eNB_IPAddress obelix => obelix
- ubuntu-arm eNB_IPAddress gracehopper3-oai => gracehopper3-oai
- arm-cross eNB_IPAddress alambix => alambix
- lte-tdd eNB_IPAddress 172.21.18.45 => starsky
- lte-fdd eNB_IPAddress 172.21.18.46 => hutch
- lte-oaiue eNB_IPAddress 172.21.18.46 => hutch
- lte-oaiue eNB1_IPAddress 172.21.18.47 => carabe
- lte-tdd-2x2 eNB_IPAddress 172.21.16.128 => obelix
- nsa eNB_IPAddress 172.21.16.137 => nepes
- nsa eNB1_IPAddress 172.21.16.109 => ofqot
- sa-aerial eNB_IPAddress gracehopper1-oai => gracehopper1-oai
- aw2s eNB_IPAddress 172.21.16.124 => avra
- sabox eNB_IPAddress 172.21.16.109 => ofqot
- sa-oaiue eNB_IPAddress avra => avra
- sa-oaiue eNB1_IPAddress caracal => caracal
- cppcheck eNB_IPAddress 172.21.18.47 => carabe
- timing-phytest eNB_IPAddress caracal => caracal
- physim 4g eNB_IPAddress avra => avra
- physim 5g eNB_IPAddress avra => avra
2025-08-14 14:55:04 +02:00
Robert Schmidt
d95e6bca6b Pull_Image_from_Registry()/Clean_Test_Server_Images(): pass node
Pass the node name for a host onto/from which to pull/clean the images.
For doing this, I used:

- rfsim 4G eNB_IPAddress none => localhost
- rfsim 5g eNB_IPAddress none => localhost
- flexric eNB_IPAddress none => localhost
- l2sim 4g eNB_IPAddress none => localhost
- l2sim 4G eNB1_IPAddress 172.21.16.128 => obelix => localhost
2025-08-14 14:55:04 +02:00
Robert Schmidt
e25075134c Integrate all SA-OAIUE pipeline related files into one 2025-08-14 14:55:04 +02:00
Robert Schmidt
881f753f3f Integrate all NSA-related XML files into one
Is simpler to test manually and view the results.
2025-08-14 14:55:04 +02:00
Robert Schmidt
7defffe97a Remove unused file 2025-08-14 14:55:04 +02:00
Robert Schmidt
ae3799d4ed Remove unused parameters 2025-08-14 14:55:04 +02:00
Robert Schmidt
c8c6aa50f3 Cluster: build FHI7.2 in parallel 2025-08-14 14:55:04 +02:00
Robert Schmidt
2f43b09651 Remove unnecessary HTML printing, simplify code 2025-08-14 14:55:04 +02:00
Robert Schmidt
81a79980dd AnalyzeBuildLogs(): only analyze one file at a time
Will be used in a follow-up commit to simplify analysis of log files and
HTML file printing.
2025-08-14 14:55:04 +02:00
Robert Schmidt
089059e10a Remove unused variables 2025-08-14 14:55:04 +02:00
Bartosz Podrygajlo
3febc50f47 Make run_locally.sh script take the full path to the xml file
Use full path to xml file in run_locally.sh to allow usage of system
command line completion feature.
2025-08-14 14:55:04 +02:00
Robert Schmidt
cf967d3314 Complete run_locally.sh to produce valid HTML 2025-08-14 14:55:04 +02:00
Robert Schmidt
e7ea9ba747 CI: Clarify HTML message if a (ctest-executed) test fails 2025-08-14 14:55:04 +02:00
Robert Schmidt
47b658baf5 Disable various UHD features
build_oai primarily builds UHD for OAI. Thus, a number of targets (B100,
USRP1/2, ...) can be omitted, as OAI does not run on them. Further,
disable documentation and man pages, which is typically not necessary
for the averages user, and does not need to be installed for containers.
2025-08-14 14:55:04 +02:00
Robert Schmidt
599a1a8c74 UHD installation: remove multiple packages at once
Removing packages individually is slow, because apt starts to (re-)read
it's database over and over again. Do it at once to speed up.
2025-08-14 14:55:04 +02:00
Robert Schmidt
2086de2a98 Do not collect log files that don't exist
Since one of the parent commits, build_oai does not redirect files to a
log folder. Hence, there is no need to collect those.
2025-08-14 14:55:04 +02:00
Robert Schmidt
334251c4ff Remove unused build_helper function 2025-08-14 14:55:04 +02:00
Robert Schmidt
6c4e5dccea Don't redirect installation log files to a file
Similarly to the parent, don't redirect log files to a file. It makes
the CI more complicated, and also raises user awareness of what is being
installed.
2025-08-14 14:55:04 +02:00
Robert Schmidt
47a961d876 Merge remote-tracking branch 'origin/refactor-ulsch' into integration_2025_w33 (!3521)
Refactor ULSCH scheduler towards more TDD pattern flexibility

Refactors ULSCH scheduler, notably to support "UL-heavy" TDD patterns,
e.g., DSUUU. Also allows to run TDD pattern2 with UL slots, which was a
limitation in the previous code.
2025-08-14 14:30:58 +02:00
Robert Schmidt
f08710a524 Merge remote-tracking branch 'origin/ubuntu24-docker-images' into integration_2025_w33 (!3492)
Upgrade CI images to Ubuntu 24

The MR upgrade the docker files from Jammy(22.04) to Noble(24.04).
2025-08-14 14:30:21 +02:00
Robert Schmidt
e0c1f8d920 Increase AL candidates count on AW2S pipeline
Increase the number of aggregration level candidates. Since we have many
UEs with concurrent traffic in that pipeline, we should ensure that we
can allocate many DCIs to not waste resources (e.g., not all RBs used
because could not find DCIs for specific UEs).
2025-08-14 13:00:13 +02:00
Robert Schmidt
ba6bad5eb3 Fix AL candidate documentation to right default
The default aggregation level candidate numbers in gnb_config.c (search
"uess_num_agg_level_candidates") is 0,2,0,0,0, so write that instead.
2025-08-14 12:55:53 +02:00
Robert Schmidt
c24673798a Handle TDD pattern 2 in UL TDA allocation
Add the possibility to use UL slots in TDD pattern 2. For simplicity, we
require the mixed slot to be of the same symbols in pattern 1 & 2. For
UL slots, simply use the right amount of UL TDAs, depending on which
number of UL slots among pattern 1 & 2 is bigger.

One complication is the TDA for the mixed slot. The current code assumes
that k2 has to be equal or larger than (number of DL slots +1) (because
the spec says min k2=2, but we might want to schedule DSUUU). Then,
there could be for instance the following cases:

- only pattern 1: DSUUU DSUUU ...: the mixed slot has to be reached an
  entire period in advance
- pattern 1 & 2: DSUUU DDDDD: normal mixed slot k2, e.g., like for 7DS2U
- pattern 1 & 2: DSUUU DDDSU: the mixed slot has to be reached
  N_ul2+N_dl1+1 slots in advance

I can't think of more cases right now. To avoid unscheduled slots, I put
an assertion (which could also trivially be taken out).
2025-08-14 12:50:03 +02:00
Rúben Soares Silva
135525c17a P5 Config: Pack/Unpack TDD table with 10.02 and 10.04 formats
Adds the capability to pack/unpack the TDD table in CONFIG.request
following both SCF222.10.02 (Tag 0x1027) and SCF222.10.04 (Tag 0x1035)
formats In the case of Aerial, the TDD table is packed following the
10.04 format, but with the 10.02 tag Prevent the packing of Digital
Beamforming table and Precoding Matrix table for Aerial
2025-08-14 12:50:03 +02:00
Robert Schmidt
6981783ee1 Select best out of multiple TDAs
A new function get_best_ul_tda() allows to select the "best" TDA out of
a number of TDA. Specifically, get_best_ul_tda() considers in how many
RBs a given TDA might be allocated, and multiplies this number of RBs
with the number of symbols in the TDA to form a "score". The TDA with
the best "score" is selected, considering it maximizes resource usage.

In phytest scheduler, we use this function to verify that the given TDA
can be really allocated in all selected slots.
2025-08-14 12:50:03 +02:00
Robert Schmidt
71e01bbaa9 Correctly interpret SRS numberOfSymbols
A length of 0 is to be interpreted as 1 symbol, a length of 1 is 2, etc.
2025-08-14 12:50:03 +02:00
Robert Schmidt
98cc36430b Schedule SRS longer in advance, cleanup
Schedule SRS longer in advance, so that it would also be enough even
with big k2 for UL TDA.

Remove useless types: we do not use the information on sched_srs
anymore, so remove it.

Check that the VRB map is free before making allocations.
2025-08-14 12:50:03 +02:00
Robert Schmidt
6ef8dadd88 Only add SRS TDA if SRS is activated
Since the parent commit, the TDA for UL scheduling is dynamically
selected, instead of being hardcoded to specific indices. We can thus
also omit the SRS TDA if no SRS is configured.

Also add SRS-specific TDAs if we schedule further into the future.
2025-08-14 12:50:03 +02:00
Robert Schmidt
cf8099fab1 Refactor TDA allocation: scheduler can take advantage of multiple k2
Add multiple TDAs with k2 larger than the min_rxtxtime, to potentially
allow to allocate all available slots. For this, nr_rrc_config_ul_tda()
inspects the TDD pattern, and allocates as many TDAs as necessary. It
also sorts the TDA list, with smaller k2 and larger symbol lengths
first.

This in turn is now used by get_num_ul_tda() to use a k2 and the slot
configuration to find a suitable TDA, assuming a list as sorted in
nr_rrc_config_ul_tda().

Note that since get_num_ul_tda() does only inspect the available UL
slots, there might be overlap (e.g., when scheduling SRS), which will be
fixed in a follow-up commit.

Also, TDD pattern 2 is not handled here yet, and a follow-up commit will
fix it.
2025-08-14 12:50:03 +02:00
Robert Schmidt
3102068e71 Add ULSCH preprocessor slot logic for scheduling multiple slots
Add a loop to advance slots as determined by current ("DL") slot, and
advance further into the future (for "UL" slots) if TDAs allow. Ensure
to schedule all TDAs if it's the last DL slot, to guarantee a previously
scheduled TDA will also reoccur (i.e., for guaranteeing that
retransmissions can be made).

Note that the check for number of UE being zero is removed, as this
allows to keep "ul_next" close to the "min_next" slot. This way, we can
use fs_get_max(); otherwise, if we did not always execute this loop,
they might diverge far from each other, making the logic inside the loop
more complicated.

This commit introduces a new type "fsn_t" (frame-slot number) that
encapsulates a single frame-slot combination in a single struct. The
helper functions (in gNB_scheduler_ulsch.c) should be moved to a new
file under common/, but we don't do this here to limit the amount of
code changes.
2025-08-14 12:50:03 +02:00
Robert Schmidt
4aea866b6a Use k2 to decide which TDA to use
For scheduling multiple ULSCH ahead, we will have to use different k2.
Hence, we will need to check for k2 in the TDA selection as well. The
function get_ul_tda() is renamed to get_num_ul_tda() to reflect that it
might return multiple TDAs (not done in this commit, but in a follow-up
MR). get_num_ul_tda() also returns a pointer to the first suitable TDA.

In the phy-test scheduler, simplify the selection of the TDA to use: do
not hardcode a specific K2, but rather, use the first one (with any k2).
2025-08-14 12:50:03 +02:00
Robert Schmidt
9059c0290e Provide selected TDA to pf_ul() 2025-08-14 12:50:03 +02:00
Robert Schmidt
90406c101e Introduce dedicated ul_tda array 2025-08-14 12:50:03 +02:00
Robert Schmidt
948c0d5d2c Count and print failed CCE allocations for UL/DL 2025-08-14 12:50:03 +02:00
Robert Schmidt
5e734238c1 pf_ul(): report if UEs scheduled
For the multi-UL slot scheduling functionality in a follow-up commit, it
would be important to know if the scheduler allocated any UEs. If
pf_ul() allocated for some UEs, we might run it again on a different
slot. If on the other hand, no UEs were allocated, there is no point in
running it again.
2025-08-14 12:50:03 +02:00
francescomani
c94db4adec separate computation of size and value for DCI precoding information 2025-08-14 10:56:33 +02:00
Robert Schmidt
d90c432f10 Merge remote-tracking branch 'origin/aerial_pbbf' into integration_2025_w33 (!3556)
Introduce support for Cat-B RU using Predefined-Beam BF with Aerial L1

This merge introduces the support for BeamID based Beamforming in OAI L2 using FAPI and leveraging Aerial L1. Support for OAI L1 is not in the scope of this MR.

Main changes:

- Introduced a third state for the analog_beamforming parameter.
  0=disabled,1=analog_bf,2=oran_bf
- Correctly populated the FAPI BF PDUs (prg_size, num_prgs,
  dig_bf_interfaces)
2025-08-14 10:37:57 +02:00
Robert Schmidt
3ee41c3fec Explain steps to build Dockerfiles without BuildKit
The Dockerfiles are reused for building on different architectures
(amd64/arm64). They differ, though, on some steps for downloading or
installing platform-specific utilities.

This is handled automatically when using BuildKit, which is the default
in docker versions v23.0+. Older docker versions require some special
settings. Explain this in the README.

Closes: #973
2025-08-14 09:49:43 +02:00
Robert Schmidt
ff9a6d97ea gNB MAC doc: add dl/ul_min_mcs
Previous commits removed min_grant_mcs and instead introduced
dl/ul_min_mcs as a more generic replacement.

Fixes: 96b0cae63e ("Drop 'min_grant_mcs' configuration parameter ")
Fixes: 699afafc6f ("Add support for 'dl_min_mcs' and 'ul_min_mcs'
    configuration parameters")
2025-08-14 08:43:38 +02:00
francescomani
1719375cea minor refactoring in nfapi_nr_interface_scf 2025-08-13 19:31:49 +02:00
Gabriele Gemmi
61a7b6b80e compute prgsize from number of RA RB 2025-08-13 19:31:49 +02:00
Gabriele Gemmi
8beb382277 Removed TRP-scheme byte from UL BF PDU to Interop with Aerial 25-1 (FAPI 10.02) 2025-08-13 19:31:49 +02:00
Gabriele Gemmi
9e34a8ebed Compute DCI prgsize from Coreset 2025-08-13 19:31:46 +02:00
Gabriele Gemmi
ce06099a99 Configuration of FAPI Beamforming PDU for Aerial PBBF 2025-08-13 19:07:53 +02:00
Robert Schmidt
ebb544601c Merge remote-tracking branch 'origin/improve-gtpu-error-handling' into integration_2025_w33 (!3584)
add gtpu error packet parsing and display
2025-08-13 18:36:19 +02:00
Robert Schmidt
569cbe24fa Merge remote-tracking branch 'origin/print_UE_cmd_MAC' into integration_2025_w33 (!3586)
Print UE command line parameters at gNB MAC for split architecture without L1
2025-08-13 18:31:32 +02:00
Laurent THOMAS
efccad956a add gtpu error packet parsing and display 2025-08-13 18:00:31 +02:00
Robert Schmidt
843b12db7f Merge branch 'ci-update-uhd' into 'develop'
CI: Update UHD version to 4.8

See merge request oai/openairinterface5g!3587
2025-08-13 10:20:38 +00:00
Romain Beurdouche
e2c89f36ea feat(ldpc_aal): add decoding timer 2025-08-13 09:55:42 +00:00
Romain Beurdouche
ad8b76a8ef feat(nr-gnb): Log decoding timers in the gNB
Log the LDPC reversed interleaving, reversed rate matching and decoding
time stats in nrL1_stats.log for the gNB.
2025-08-13 09:55:42 +00:00
Romain Beurdouche
e79221b05b feat(nr_ulsim): detailed ULSCH decoding timers
Add timers to provide ULSCH decoding time split between decoding,
rate recovery and deinterleaving.
2025-08-13 09:55:42 +00:00
Romain Beurdouche
748684df05 feat(time_meas): Standard deviation & merge
`diff_square` was not merged in `merge_meas` so that calculation of the
standard deviation was not working with merged timers.
2025-08-13 09:55:42 +00:00
francescomani
071d28b3c9 print UE command line parameters also at MAC 2025-08-13 11:05:44 +02:00
Robert Schmidt
3a241fe587 Merge remote-tracking branch 'origin/amarisoft-ue-redcap' into integration_2025_w33 (!3573)
Make Amarisoft UE sim a RedCap UE

Change Amarisoft UE configuration and gNB of the AW2S pipeline to
be/handle RedCap UEs.

The UE should only connect if the gNB handles RedCap UEs. In the logs,
we should see

    [MAC]   UE with RNTI 3725 is RedCap

which we check for the first two UEs (one normal UE/absence of this
message, one RedCap UE/presence of this message).
2025-08-13 08:10:32 +02:00
Robert Schmidt
96c2c143f3 Merge remote-tracking branch 'origin/ldpc_clean_outdated_logs_and_interfaces' into integration_2025_w33 (!3576)
Cleanup documentation and interface of the LDPC segment coding libraries

Fix interface: The LDPC segment decoder interface had variables
'harq_pid', 'ulsch_id' and 'C' that are not useful to the segment
decoder. This MR removes these variables from the interface.

Fix documentation: libconfig log do not display anymore by default so we
may better not show them in the documentation to avoid any
misunderstanding.

Remove ldpc_cl library since the library does not work.
2025-08-13 07:41:31 +02:00
Jaroslava Fiedlerova
8f79abed2e CI: Update UHD version to 4.8 2025-08-12 22:27:29 +02:00
francescomani
4b85f35369 add option to directly send the beam index to L1 via FAPI without look-up table (for 7.2 split) 2025-08-12 18:51:16 +02:00
Robert Schmidt
3b57379887 CI AW2S-Amarisoft: verify RedCap'edness of a UE
Since the parent commit, UE 1 is normal (no RedCap), UE 2 is RedCap.
Verify that the gNB agrees with that and detects the second UE as RedCap
by analyzing some logs.

The first check is a bit elaborate, but basically is

    [ $(docker logs | grep XYZ | wc -l) -eq 0 ]
    ^   ^             ^          ^      ^
    1   2             3          4      5

(1) is the if statement, that compares
  (4) the number of occurrences
  (3) of "RedCap" in the
  (2) docker logs
(5) to being equal to

Note for all UEs which number, and whether it is RedCap (so this need to
be kept in sync with the Amarisoft UE sim configuration file in use!).
2025-08-12 17:33:14 +02:00
Robert Schmidt
4a41df2788 Make some Amarisoft UEs RedCap UEs
Change the parameters to be redcap (release: 17, redcap: "redcap") on
some UEs, and modify the path to the updated configuration.
Specifically, make UE 1 normal (no RedCap), UE 2 RedCap, UEs 3&4 normal,
UEs 5&6 RedCap, etc.

RedCap UEs should now only be able to connect if the gNB is handling Redcap
UEs, which is done in the parent commit.
2025-08-12 17:25:44 +02:00
Robert Schmidt
08428381d6 CI AW2S: modify configuration to have RedCap UEs connect 2025-08-12 17:25:44 +02:00
Robert Schmidt
c3e7fe47e6 Remove unused Amarisoft CI XML file 2025-08-12 17:25:44 +02:00
Robert Schmidt
21dd03ee73 Merge remote-tracking branch 'origin/fix_nr_ue_pdcch_llr_size' into integration_2025_w33 (!3580)
NR UE: fix pdcch llr_size calculation in nr_rx_pdcch()
2025-08-12 12:46:46 +02:00
Robert Schmidt
3681ef33a9 Merge remote-tracking branch 'origin/nr_ue_improve_ntn_ta' into integration_2025_w33 (!3581)
NR UE NTN: consider acceleration on orbital path to calculate N_UE_TA_drift_variant

The ntn-Config ephemerisInfo contains the SAT position and velocity
vector but not the acceleration vector.

But the acceleration magnitude on the orbital path can be calculated as:

    t = 2 * pi * r / v
    omega = 2 * pi / t = v / r
    acceleration = omega² * r = v² / r

Where t is the orbital period, r is the orbital radius, v is the orbital
velocity, omega is the angular velocity. The acceleration direction is
from the SAT position towards the earth center. To calculate the
acceleration towards the UE, this is projected on the direction from the
SAT to the UE.

This is used to calculate the variable N_UE_TA_drift_variant and improve
the TA accuracy.
2025-08-12 12:46:14 +02:00
Robert Schmidt
5f674f5b68 Merge remote-tracking branch 'origin/issue_927' into integration_2025_w33 (!3395)
RFsim variable size H_awgn_mimo

Closes #927
2025-08-12 12:45:53 +02:00
Robert Schmidt
98cfbf0203 Merge remote-tracking branch 'origin/hotfix-bad-t-trace' into integration_2025_w33 (!3578)
fix a 4G T trace
2025-08-12 09:42:26 +02:00
Robert Schmidt
345fd992d9 Merge remote-tracking branch 'origin/searchspace0_with_2_occasion_per_slot' into integration_2025_w33 (!3567)
Workaround for handling 2 SS0 occasions per slot

Search Space 0 monitoring might depend on SSB. In !3332 this dependence
was removed by moving the configuration of SS0 earlier in a workaround
to avoid a segfault in handover. Now, a new workaround is needed to
handle 2 search space occasions per slot.
2025-08-12 09:41:50 +02:00
Robert Schmidt
b0ba247a9e Merge remote-tracking branch 'origin/ue_pucch2_bugfix' into integration_2025_w33 (!3563)
UE fixes: pucch format 2 and CSI IM

- DMRS bugfix for PUCCH format 2 with odd start PRB
- CSI IM noise power estimation omits DC subcarrier
2025-08-12 09:41:19 +02:00
Laurent THOMAS
e2c4033b57 When a client connects, we need to start the send/receive loop but the first reception is void data 2025-08-12 09:22:03 +02:00
francescomani
c137020ca2 remove fixed size H_awgn_mimo that may cause segfault in simulator in case of more than 4 antennas 2025-08-12 09:22:03 +02:00
calvin_peyron
12cf015525 "as" should be in capital letters 2025-08-11 17:11:21 +02:00
Calvin Peyron
3a1be4895f Rename ubuntuXX to ubuntu 2025-08-11 17:11:21 +02:00
Calvin Peyron
5210750883 Fix warning tmp may be uninitialized leads to error 2025-08-11 17:11:21 +02:00
calvin_peyron
bc9ae55723 Remove redundancy
As DEBIAN_FRONTEND has been set as environment variable, there is no need to use DEBIAN_FRONTEND=noninteractive inside RUN lines, it is redundant, hence it has been removed.
2025-08-11 17:11:21 +02:00
calvin_peyron
b3675be33a Upgrade CI images to Ubuntu 24
Libboost went from 1.74.0 to 1.83.0 alongside Ubuntu update.
GCC version is set as default to be more practical.
In Ubuntu22, apt sources were in .list files, in Ubuntu24 they are in .sources files.
Add --break-system-packages for pip installation to use same logic as before, see the pip update 23.0.1 (2023-02-17).
With Ubuntu24 liboai_device requires libpython3.12
2025-08-11 17:11:21 +02:00
Robert Schmidt
35361db76b build_oai: don't redirect compilations to a file
Redirecting to a file has the problem that it is difficult in the CI to
recover these files. Furthermore, at least with ninja, when running
build_oai interactively, the build output will only take some lines
(because ninja rewrites lines), so the change should not be that big to
users.

One CI function would print the entire output from build_oai to the
console. Since that output might be long now, do not do this. The file
is archived, anyway.
2025-08-11 16:11:35 +02:00
Romain Beurdouche
b9bed5838e feat(ldpc_cl): Remove ldpc_cl 2025-08-11 08:38:06 +00:00
alexjiao
0f61fac4a6 NR UE: add support for PDSCH rate matching with NZP CSI-RS
Currently only ZP CSI-RS is considered in function configure_ratematching_csi,
add support for NZP CSI-RS.
2025-08-09 23:40:53 +08:00
Thomas Schlichter
eb6c195c9b NR UE NTN: consider acceleration on orbital path to calculate N_UE_TA_drift_variant
The acceleration magnitude on the orbital path can be calculated as:

t = 2 * pi * r / v
omega = 2 * pi / t = v / r
acceleration = omega² * r = v² / r

Where t is the orbital period, r is the orbital radius, v is the orbital velocity, omega is the angular velocity.
The acceleration direction is from the SAT position towards the earth center.
To calculate the acceleration towards the UE, this is projected on the direction from the SAT to the UE.
2025-08-09 07:37:35 +02:00
Thomas Schlichter
4de0e54a3a NR UE: further simplify and optimize the usage of the PDCCH LLR array
The initial version of this patch was provided by "Laurent THOMAS <laurent.thomas@open-cells.com>"
2025-08-08 17:41:15 +02:00
Romain Beurdouche
a2c03f26e9 fix(nrLDPC_decoder_CL): Apply clang-format 2025-08-08 14:48:41 +00:00
Romain Beurdouche
37bf1deb7d fix(nrLDPC_decoder_LYC): apply clang-format 2025-08-08 14:48:41 +00:00
Romain Beurdouche
8d2df31d7b feat(LDPCImplementation.md): Add short introduction and TOC 2025-08-08 14:48:41 +00:00
Romain Beurdouche
d702bcd657 fix(LDPCdecoder): Cleanup segment decoder interface
Variables 'harq_pid', 'ulsch_id' and 'C' of the segment decoder
interface were not used any more by the implementations and set to zero
by all the callers.
Then it is more relevant and compliant to remove them.
2025-08-08 14:48:41 +00:00
Romain Beurdouche
eb3bd33fd4 feat(LDPCImplementation.md): Remove ldpc_cl logs
Recommended: Remove logs of a library that is not working as far as we
know.

Pop this commit if this seems not necessary.
2025-08-08 14:48:41 +00:00
Romain Beurdouche
cb5de9afbb fix(LDPCImplementation.md): Remove libconfig logs
libconfig log do not display anymore by default so we may better not
show them in the documentation to avoid any misunderstanding.
2025-08-08 14:48:40 +00:00
Thomas Schlichter
a6ccdd1340 NR UE: fix pdcch llr_size calculation in nr_rx_pdcch() 2025-08-08 14:58:14 +02:00
Cedric Roux
a42d8183ca fix a T trace 2025-08-08 12:32:36 +02:00
Robert Schmidt
f3dab10de6 Remove UE_AUTOTEST_TRACE CMake option
This only triggers the build of some dedicated logs that contain
information that is logged already, anyways.
2025-08-08 12:07:48 +02:00
Robert Schmidt
20f938d5ae Remove useless Doxygen variable 2025-08-08 12:07:48 +02:00
Robert Schmidt
f23b654132 Remove auto-test options in build_oai 2025-08-08 12:07:48 +02:00
Jaroslava Fiedlerova
05f9c975ee Merge branch 'integration_2025_w32' into 'develop'
Integration: `2025.w32`

* !3548 NR UE: fix reliable SIB19 reception when ntn-UlSyncValidityDuration-r17 expires
* !3559 numelt in place of config_isparamset
* !3487 T hacks: add new tracer ant0 and a tool to plot ofdm data from usrp or rfsim (output or input)
* !3541 simplify and make more local variables in nr_rx_pdcch() and fix small bugs
* !3547 Add a CU-UP load tester and improve GTP performance
* !3552 CI: refactor iperf3 UDP analysis function
* !3557 Fix PDSCH rate-matching for periodic CSI in UE
* !3571 fix time manager tests in the CI
* !3344 LDPC BBDEV/AAL rework
* !3560 CI: Refactor log collection, collect also (COTS) UE logs

See merge request oai/openairinterface5g!3565
2025-08-08 10:04:17 +00:00
francescomani
4b8359f11c fix for UECAP F1 handling in dora/phytest mode 2025-08-08 09:07:10 +02:00
Jaroslava Fiedlerova
3491a044ff Merge remote-tracking branch 'origin/ci-collect-ue-logs' into integration_2025_w32 (!3560)
CI: Refactor log collection, collect also (COTS) UE logs

Refactor log handling in CI: collect according to currently used XML files. This
makes it homogeneous in the pipelines, and avoids accidental overwriting (as
happens in phytest-timing), as well as harmonizing the log placement
(e.g., no YAML lookup in Ping/Iperf).

Allow to trace and archive UE logs (e.g., Quectel via QLog, Amarisoft UE logs).
By default, no logs will be collected as of this MR, as many files are big.

Various cleanup in Jenkinsfiles, some bugfixes, add unit tests.
2025-08-07 21:40:35 +02:00
Robert Schmidt
667bcf920c Trace analysis results 2025-08-07 15:39:59 +02:00
Robert Schmidt
43e2fd57d4 Use Ninja for FHI72 builds 2025-08-07 15:39:59 +02:00
Robert Schmidt
40efa2a545 Remove LogCollectBuild step: not used by any pipeline 2025-08-07 15:39:59 +02:00
Robert Schmidt
cc0d0ae0ab gNB caracal USRP build: don't stop if we can't reboot
Sometimes the connection fails because of the reboot. Without may_fail,
it would stop the build, which will then run the wrong code, possibly.
Instead, continue; if there is a problem with USRP, it will be visible
when starting nr-softmodem.
2025-08-07 15:39:59 +02:00
Robert Schmidt
244ea8fc22 Use archiveArtifact() for TerminateeNB() 2025-08-07 15:39:59 +02:00
Robert Schmidt
5090ce6f0a Ignore main.py TerminateeNB mode
No pipeline uses it. With the changes in the next commit, pipelines
would start to fail. Remove it for simplicity.
2025-08-07 15:39:59 +02:00
Robert Schmidt
8c2b356c1d Remove unused function 2025-08-07 15:39:59 +02:00
Robert Schmidt
14389235df Use archiveArtifact() for SCA.CppCheckAnalysis() 2025-08-07 15:39:59 +02:00
Robert Schmidt
03a4772189 Remove cppcheck reference file: nobody knows about it, nobody checks 2025-08-07 15:39:59 +02:00
Robert Schmidt
27e37a4181 Use archiveArtifact() for LicenceAndFormattingCheck() 2025-08-07 15:39:59 +02:00
Robert Schmidt
025a6dbd1d Remove unused testCase_Id 2025-08-07 15:39:59 +02:00
Robert Schmidt
65ec00c5fd No need for all the useless docker image rm 2025-08-07 15:39:59 +02:00
Robert Schmidt
810dad97ae Collect the ninja logs for various ran-build images 2025-08-07 15:39:59 +02:00
Robert Schmidt
5ffa431514 Use archiveArtifact() for Build()/BuildCluster()
I have to make both together, since they both depend on
AnalyzeBuildLogs().

- remove mkdir for legacy sub-logfiles in build_oai, that does not exist
  anymore; also, remove corresponding log analysis, I think we don't use
  it and it is overkill (either build works or not)
- manually try to copy "all.txt"
- explicitly list log files to copy, then analyze
- AnalyzeBuildLogs(): pass log files to inspect explicitly
2025-08-07 15:39:59 +02:00
Jaroslava Fiedlerova
5ca59d0f48 Merge remote-tracking branch 'origin/ldpc-aal' into integration_2025_w32 (!3344)
LDPC BBDEV/AAL rework

This branch aims to generalize the existing LDPC T2 implementation to support
other DPDK BBDEV accelerators, e.g., Intel ACC100/200.

Differences from the current T2 implementation include:
  1. relax CMakeLists.txt checking for custom dpdk-t2 implementation,
     technically, any DPDK BBDEV should work
  2. BBDEV capability checks during init
  3. llr_scaling to scale the input llr accordingly for better decoding
     performance on the Intel ACC100/200
  4. self-managed harq buffers for the ACC200, as internal harq memory is not
     available

Tested BBDEV devices:
  1. Intel ACC100
  2. Intel ACC200/VRB1
2025-08-07 12:17:11 +02:00
Jaroslava Fiedlerova
5555a465fc Merge remote-tracking branch 'origin/fix-time-manager-ci' into integration_2025_w32 (!3571)
fix time manager tests in the CI

Attempt to have less errors in the CI for the time manager module.
2025-08-06 22:54:07 +02:00
Robert Schmidt
63f6368ca7 use archiveArtifact() for BuildProxy() 2025-08-06 12:24:30 +02:00
Robert Schmidt
1ffbba525d Use archiveArtifact() for BuildRunTests()
Collect also unit test logs, so that developers could see the reason for
failed logs.
2025-08-06 12:24:30 +02:00
Robert Schmidt
83d037057b Use archiveArtifact() for cls_native.run_physim() 2025-08-06 12:24:30 +02:00
Robert Schmidt
7ef8829167 Use archiveArtifact() for cls_native.Build() 2025-08-06 12:24:30 +02:00
Robert Schmidt
1d3e795c0c Use archiveArtifact() for deploy_oc_physim() 2025-08-06 12:24:30 +02:00
Robert Schmidt
da9cec0bff Use archiveArtifact() for Ping+IPerf 2025-08-06 12:24:30 +02:00
Robert Schmidt
62ae72925b Use archiveArtifact() for module_UE 2025-08-06 12:24:30 +02:00
Robert Schmidt
fa5c91e03f Use archiveArtifact() for (Un-)DeployObject() 2025-08-06 12:24:30 +02:00
Robert Schmidt
2b4e0e5244 Use archiveArtifact() for CN undeploy 2025-08-06 12:24:30 +02:00
Robert Schmidt
dcbb3369e1 Simplify ShowTestID()
make it a non-class function, stateless, more information on the current
CI step (the number).
2025-08-06 12:23:59 +02:00
Robert Schmidt
28ce0dc444 Main: pass in ctx
Set the context for each task step. Set the artifact result path based
on the XML, so it is harmonized; currently, most pipelines use the "YAML
path" of docker-compose, but that does not always make sense. For
instance, Ping/Iperf() needs to look up this path, but does not
inherently belong to one specific YAML path (there might even be more).
2025-08-06 12:22:28 +02:00
Robert Schmidt
f766b21b57 Add CI helper class
This class provides a generic "context" for individual tasks about the
current task step, and where to log results. It's used by
archiveArtifact() that would automatically log files in the right
directory, based on a directory in the context, and in a way that order
of files is preserved for long-running pipelines.
2025-08-06 12:21:11 +02:00
Robert Schmidt
5c16fc6189 Fix Python "invalid escape sequence" warnings
cls_containerize.py:139: SyntaxWarning: invalid escape sequence '\.'
      lineHasCommit = re.search(f'COMMIT [a-zA-Z0-9\.:/\-]*{image}', str(line)) is not None
    cls_containerize.py:441: SyntaxWarning: invalid escape sequence '\-'
      result = re.search('Size *= *(?P<size>[0-9\-]+) *bytes', cmd.getBefore())
    cls_containerize.py:493: SyntaxWarning: invalid escape sequence '\-'
      result = re.search('Size *= *(?P<size>[0-9\-]+) *bytes', cmd.getBefore())
    cls_containerize.py:616: SyntaxWarning: invalid escape sequence '\-'
      result = re.search('Size *= *(?P<size>[0-9\-]+) *bytes', ret.stdout)
2025-08-06 12:20:13 +02:00
Robert Schmidt
5492de0e0b Example tracing for QLog
Note: this does not actually work. In the pipelines, we see that for
some reason, quectel-CM cannot establish a connection. Manually, it
works though(?)
2025-08-06 12:20:13 +02:00
Robert Schmidt
af580f3a2f Add example tracing for Amarisoft UE sim
Commented, as the resulting files are very big.
2025-08-06 12:20:13 +02:00
Robert Schmidt
fe2cda1309 CI: log UE files in artifacts 2025-08-06 12:20:13 +02:00
Robert Schmidt
ce9f2c9a45 Add possibility to trace UEs 2025-08-06 12:20:13 +02:00
Robert Schmidt
a3d46ed0e6 5g rfsim NTN LEO/GEO: remove leading undeploy step
It is not necessary (the final undeploys at the end are "always_exec"),
and makes the CI potentially fail since there is nothing to copy at this
point.
2025-08-06 12:20:13 +02:00
Robert Schmidt
de2d32be09 CI UE Attach: add more frequent checks, improve output
check for IP once before sleeping in case UE IP address exists, which
should speed up the CI. With this, Only print the actual attach command
once. Print errors only at the beginning. This should simplify attach
command output logs.
2025-08-06 12:19:35 +02:00
Robert Schmidt
cc1b2315af CI: add simple unit test for UE handling 2025-08-06 12:19:35 +02:00
Robert Schmidt
a1c354bd6e CI: Remove old tracing information
It will be replaced with a new mechanism in a later commit.
2025-08-06 12:19:24 +02:00
Cedric Roux
eaffaf4058 time manager tests: increase some sleep
The CI fails sometimes, because some processes/threads are created in
unpredictable order and if the client connects before the server is
ready some tests fail, as seen in the following log:

[UTIL]   client/server iq-samples: launch sub-processes
[UTIL]   threadCreate() for time client: creating thread (no affinity, default priority)
[UTIL]   time manager configuration: [time source: server] [mode: client] [server IP: 127.0.0.1} [server port: 7374]
[UTIL]   time client: connection to 127.0.0.1:7374 failed, try again in 1s
[UTIL]   threadCreate() for time source iq samples: creating thread (no affinity, default priority)
[UTIL]   threadCreate() for time server: creating thread (no affinity, default priority)
[UTIL]   time manager configuration: [time source: iq_samples] [mode: server] [server IP: 127.0.0.1} [server port: 7374]
[UTIL]   client/server: rlc ticks: 1000 pdcp ticks: 1000 x2ap ticks: 1000
CMDLINE: "/oai-ran/build/common/utils/time_manager/tests/test_time_manager_auto" "--time_management.mode" "server" "--time_management.time_source" "iq_samples"
[UTIL]   client/server: rlc ticks: 0 pdcp ticks: 0 x2ap ticks: 0
CMDLINE: "/oai-ran/build/common/utils/time_manager/tests/test_time_manager_auto" "--time_management.mode" "client"
[UTIL]   client-server iq-samples: ERROR

The client/server iq-samples test is started.
Then we see this log:
[UTIL]   time manager configuration: [time source: server] [mode: client] [server IP: 127.0.0.1} [server port: 7374]
Which means that the client is running.

It tries to connect to the server (not running yet), but fails, so sleeps
for 1 second before attempting another connection to the server:
[UTIL]   time client: connection to 127.0.0.1:7374 failed, try again in 1s

The sleep is done by the time_client thread, the main thread of the test
program continues and does a sleep(1).

Then the server arrives:
[UTIL]   time manager configuration: [time source: iq_samples] [mode: server] [server IP: 127.0.0.1} [server port: 7374]

It sends all the ticks (to no client, since the client is still sleeping).

Then the test is over, the sleep(1) of the client finishes and the program
exits. The client never connected to the server.
We have this log:
[UTIL]   client/server: rlc ticks: 0 pdcp ticks: 0 x2ap ticks: 0

And the test fails.

It's complicated to write an automatic test involving several uncoordinated
programs. The operating system may create processes in any order. We use
some sleeping to wait, but it may be too short or too long, leading to test
failure.

Let's see with more sleep if the CI fails less.
2025-08-06 11:47:10 +02:00
Jaroslava Fiedlerova
555e609a86 Merge remote-tracking branch 'origin/ue-fix-csi-sched' into integration_2025_w32 (!3557)
Fix PDSCH rate-matching for periodic CSI in UE

Changed the search structure to have periodic resoruce id in the outer
loop and configured resource set as inner loop to prevent configuring
resource that is not needed.

Use const for input pointers.
2025-08-06 11:37:00 +02:00
Jaroslava Fiedlerova
b421bdd276 Merge remote-tracking branch 'origin/ci-iperf3-log-fix' into integration_2025_w32 (!3552)
CI: refactor iperf3 UDP analysis function

- add helper function to covert reported bitrate values to Mbps for calculations
- clean up the UDP analysis function, improve test report formatting
- fix an issue where Gbps values were incorrectly reported
  (example: https://jenkins-oai.eurecom.fr/job/RAN-SA-AERIAL-CN5G/4802/)
- update CI unit test report checks to match the new formatting
2025-08-06 11:36:02 +02:00
Xin Zhe Khooi
f6aeb21d97 ldpc_aal: handle T2 case in runtime 2025-08-05 18:38:17 +02:00
Robert Schmidt
0d4246e354 Rename nrLDPC_coding_t2 options to nrLDPC_coding_aal 2025-08-05 18:38:17 +02:00
Robert Schmidt
c0d797ec0e Rename libldpc_t2 to libldpc_aal
Rename the library to reflect that it's more a generic AAL driver than
specifically for AAL. To this end, rename some documentation.

As of this commit, the options are still called nrLDPC_coding_t2. The
next commit will correct this.

Co-authored-by: Xin Zhe Khooi <khooixz@comp.nus.edu.sg>
2025-08-05 18:38:16 +02:00
Xin Zhe Khooi
61ea0a9e81 ldpc_t2: generalize for broader BBDEV support (ACC100/200)
- Generalized LDPC T2 implementation to support other DPDK BBDEV
  accelerators (e.g., Intel ACC100/200)
- Added BBDEV capability checks during initialization
- Introduced LLR scaling to improve decoding performance on Intel ACC
  cards
- Implemented self-managed HARQ buffers for ACC200 (no internal HARQ
  memory)
- Library usage documentation update, and added developer documentation

Co-authored-by: Romain Beurdouche <romain.beurdouche@eurecom.fr>
2025-08-05 18:37:58 +02:00
Sakthivel Velumani
1becaf0671 Fix periodic CSI scheduling in UE
Changed the search structure to have periodic resoruce id in the outer
loop and configured resource set as inner loop to prevent configuring
resource that is not needed.

Use const for input pointers.
2025-08-05 10:01:05 -04:00
Jaroslava Fiedlerova
d630fb2965 Merge remote-tracking branch 'origin/cuup-load-tester' into integration_2025_w32 (!3547)
Add a CU-UP load tester and improve GTP performance

This adds a simple tester program for the CU-UP. It sets up a number of
UEs/bearers in the CU-UP via the E1 interface, then streams data in
downlink/uplink (as seen by the CU-UP). More information is available in
tests/nr-cuup/README.md.

Includes some fixes to properly verify that SCTP is installed, and use
"the right cmake way" to use it in cmake code (see commit for details).
2025-08-04 23:59:05 +02:00
Jaroslava Fiedlerova
de91ab6eb9 Merge remote-tracking branch 'origin/enhance-ssb-dci-processing' into integration_2025_w32 (!3541)
simplify and make more local variables in nr_rx_pdcch() and fix small bugs...

simplify and make more local variables in nr_rx_pdcch() and fix small bugs
(size 9 RE instaed of 12 RE)
2025-08-04 23:57:40 +02:00
Jaroslava Fiedlerova
da2cbea5e4 Merge remote-tracking branch 'origin/record-iq' into integration_2025_w32 (!3487)
T hacks: add new tracer ant0 and a tool to plot ofdm data from usrp or rfsim
(output or input)

The tool ant0 dumps IQ data to a file (or stdout) as float complex or short.
It is needed for a student's project. (Well, we could use record/extract, but
it's simpler.) The tool ofdm-plot is used to plot output or input signal from
gnb in the frequency domain. May be useful to debug, why not.
2025-08-04 23:55:32 +02:00
Jaroslava Fiedlerova
611971c3c7 Merge remote-tracking branch 'origin/use_numet_not_config_isparamset' into integration_2025_w32 (!3559)
numelt in place of config_isparamset

config_isparamset doesn't seem to work for array types, a temporary solution is
using numelt to verify if the parameter is set in config file
2025-08-04 16:19:35 +02:00
Jaroslava Fiedlerova
c29a56fd17 Merge remote-tracking branch 'origin/fix_sib19_reception' into integration_2025_w32 (!3548)
NR UE: fix reliable SIB19 reception when ntn-UlSyncValidityDuration-r17 expires

Fixes:
- gNB: fix scheduling of Rel-17 SIBs
- gNB: fix case in update_SIB1_NR_SI() when multiple Rel-17 SIBs would be defined
- NR UE: fix calculation of SI window expiry

Updating LEO scenario to test this
- set ntn-UlSyncValidityDuration-r17 to 5 seconds for LEO scenario
- NTN config: setting sib1_tda is not required anymore
2025-08-04 16:18:08 +02:00
Robert Schmidt
6bf88bd3d9 Remove F1 interface names from configuration files
These options are not taken into account, they are not even defined in
the configuration module.
2025-08-04 12:34:23 +02:00
Robert Schmidt
faef56e432 Remove old 4G F1 configuration files
4G F1 has been removed from the code base, so these configs are now
useless.

See also commit 9dc2282249 ("Remove 4G F1")
2025-08-04 12:34:23 +02:00
Robert Schmidt
0a5130cf10 Remove unused control port number from F1
Remove these F1-C port numbers. The configuration is not actually
applied, and the default F1-C port number 38472 (see F1AP_PORT_NUMBER)
is hardcoded in the F1 module.

For the moment, I leave the configuration option, in case we want to
allow to configure the port numbers later).
2025-08-04 12:34:23 +02:00
Robert Schmidt
8d5501edc2 Harmonize GTP log messages
Make a common pattern, which makes it simpler to find them in gNB logs,
and, maybe more importantly, link tunnel creation and update (the update
message was missing the "incoming" TEID, so it is not easy to link to
creation apart from the UE ID, but even then the UE might have multiple
tunnels).
2025-08-04 12:34:23 +02:00
Robert Schmidt
9140b36a2d Refactor gtpv1u_bearer_t and use internally
Reuse the gtpv1u_bearer_t for internal functions. Hopefully this will
also simplify implementation of IPv6, as it encapsulates IP address
handling within gtpv1u_bearer_t.
2025-08-04 12:34:23 +02:00
Robert Schmidt
38ac898672 Refactor GTP: pass addr structure directly
This should simplify future transition to IPv6, as we can pass the right
address directly.
2025-08-04 12:34:23 +02:00
Robert Schmidt
5d9db1688a Refactor port number out of newGtpuCreateTunnel()
The (remote) port number of the GTP module is configured during
initialization. It is therefore not required when calling
newGtpuCreateTunnel(), and could even lead to bugs (if another port
number is used than specified during GTP init).
2025-08-04 12:34:23 +02:00
Robert Schmidt
7c34825dae Receiver thread: independent of ITTI
This also seems to reduce the packet loss on my machine.
Especially in uplink there are no losses anymore.
2025-08-04 12:34:23 +02:00
Robert Schmidt
483d610a9b Reduce receiver mutex scope
This seems to reduce packet loss on my machine.
2025-08-04 12:34:23 +02:00
Robert Schmidt
510814a79a Remove unused struct member 2025-08-04 12:34:23 +02:00
Robert Schmidt
d1a03c993c Reformat gtp_itf.cpp 2025-08-04 12:34:23 +02:00
Robert Schmidt
905fe3fb71 DU Buffer Report/DL Delivery Status: remove unused code 2025-08-04 12:34:23 +02:00
Robert Schmidt
07629e29d6 Add CU-UP load tester and documentation
This is a simple CU-UP load tester. It sets up a configurable number of UEs in the
CU-UP, then sends GTP traffic in downlink/uplink in the N3-F1/F1-N3
direction at the CU-UP. It then compares the sent and received data.

Additional parameters, such as amount of traffic, test length, packet
size, and IP addresses/ports are configurable.

To run:

    mkdir build && cd build && cmake .. -GNinja && ninja nr-cuup nr-cuup-load-test params_libconfig
    ./tests/nr-cuup/nr-cuup-load-test
    ./nr-cuup -O ../tests/nr-cuup/load-test.conf

The tester should be able to detect lost and reordered packets.

Example lost: Receive order 2,3,5,6 (lost packet 4)
=> on packet 2, expected 2, next=expected+1=3
=> on packet 3, expected 3, next=expected+1=4
=> on packet 5, expected 4, diff=5-4=1 (lost 1), next=payload+1=6
=> on packet 6, expected 6
=> 1 lost

Example reordered: Receiver order 2,5,3,6 (lost packet 4)
=> on packet 2, expected 2, next=expected+1=3
=> on packet 5, expected 3, diff=5-3=2 (lost 2), next=payload+1=6
=> on packet 3, expected 6, (reduce lost by 1 to 1), next=expected=6
=> on packet 6, expected 6
=> 1 lost

Example reordered: Receiver order 2,5,3,4,6 (no losses)
2025-08-04 12:31:05 +02:00
Thomas Schlichter
506dc7da52 NR UE: invalidate SI window on successful SI reception to avoid wrongly reusing this old SI window for new SI reception
This fix was suggested by Francesco Mani
2025-08-04 10:52:08 +02:00
Thomas Schlichter
16fd1bb67c gNB: fix case when multiple Rel-17 SIBs would be defined
The boolean value v17_sib was not set to true when allocating si_schedulingInfo_v17 and schedulingInfo2_r17.
So multiple Rel-17 SIBs would lead to multiple allocations and only the last SIB being actually configured.

Fix this by removing the redundant v17_sib variable and directly check if the memory was already allocated.
Also move the definition and allocation of si_schedulingInfo_v17 closer to its actual usage.
2025-08-04 10:52:08 +02:00
Thomas Schlichter
7827a40f19 NTN config: setting sib1_tda is not required anymore 2025-08-04 10:52:08 +02:00
Thomas Schlichter
d4f4cefd6b set ntn-UlSyncValidityDuration-r17 to 5 seconds for LEO scenario
Now that we reliably receive SIB19, we can set the ntn-UlSyncValidityDuration-r17 to a sane value
and thus make sure that the UE always has up-to-date SIB19 information.
2025-08-04 10:52:08 +02:00
Thomas Schlichter
53208bd163 NR UE: fix calculation of SI window expiry 2025-08-04 10:52:08 +02:00
Robert Schmidt
626fce4f44 config_frame_structure(): make const 2025-08-04 09:53:14 +02:00
Robert Schmidt
66023f6a8d Refactor get_feasible_msg3_tda()
Simplify the code. Consider any slot for Msg3, and check that the TDA
fits in a given slot (as before).
2025-08-04 09:53:14 +02:00
Robert Schmidt
961a646dc7 Remove dedicated Msg3 TDA
A dedicated Msg3 TDA is simply not necessary: get_feasible_msg3_tda()
already iterates through all TDAs to find a suitable one for Msg3, and
takes things such as parameter Δ already into account.

The only prerequisite is that the ra_ResponseWindow is long enough. In
some configurations, Msg3 TDA ensured that Msg2 still happened during
ra_ResponseWindow, while Msg3 was outside of it. This is not necessarily
the case anymore, unless ra_ResponseWindow is long enough.

For the normal user, removing ra_ResponseWindow from the config will be
enough.
2025-08-04 09:53:14 +02:00
Robert Schmidt
41d14b571c Remove most ra_ResponseWindow config options
Since the parent commit, the ra_ResponseWindow will be chosen
automatically. Correspondingly, remove most ra_ResponseWindow options
from configuration files in the repository.

One problem in some mu=1 configs is that the ra_ResponseWindow=4 (10
slots), which might be overly restrictive if the L1 slot ahead is
somewhat close to 10 (e.g., 6), in which case we might not be always
able to allocate Msg2 in time.

A notable exception here is gnb-vnf.sa.band66.u0.25prb.nfapi.conf, in
which we still provide it (1) since it uses a non-standard configuration
of a ra_ResponseWindow longer than 10ms (see also issue #916 for more
information) and (2) as an example.
2025-08-04 09:53:14 +02:00
Robert Schmidt
ac3451c6f7 Select ra_ResponseWindow automatically if not configured
If the config file does not specify ra_ResponseWindow, select it to be
10 slots in mu=0, or 20 slots for all others.

This should give us enough flexibility to allocate Msg2 without running
out of the response window. The next commit will remove most
ra_ResponseWindow options in configs.
2025-08-04 09:53:14 +02:00
Robert Schmidt
7cae3c2871 Comments on func 2025-08-04 09:53:14 +02:00
Robert Schmidt
8cded62df0 Refactor TDA allocation
Make it simpler to see, in function nr_rrc_config_ul_tda(), which UL
TDAs we allocate for a UE.
2025-08-04 09:53:14 +02:00
Robert Schmidt
62e4025bc8 Integrate inactivity scheduling into main allocation loop
Scheduling for inactivity only deviates in details from the main
scheduling logic: we simply allocate a fixed number of RBs instead of
making it dependent of data.

In this commit, add an additional flag to sort UEs that are scheduled
for inactivity in front of "normal" UEs (with traffic). Then, schedule
those UEs by limiting/fixing the amount of RBs to schedule to
min_grant_prb.

Update the comparator() to properly sort UEs based on this flag and the
coefficient by applying a consistent logic of -1/0/1 (see man qsort) for
smaller/equal/larger. The inactivity flag, if set, will always have
higher priority over the coefficient to schedule these UEs first, as was
the case prior to this commit.
2025-08-04 09:53:14 +02:00
Robert Schmidt
7ee8e8eaba Fix bug: only sort relevant part of list
This reduces the amount of elements to compare.
2025-08-04 09:53:14 +02:00
Robert Schmidt
dd98030202 Refactor to call post-processor in place
Remove sched_ctrl->sched_ulsch, and call the post-processing function
post_process_ulsch() in the places where sched_ctrl->sched_ulsch has
been assigned. This will have two effects:

- it is not necessary to have the final loop over all UEs, which might
  be costly especially towards many UEs.
- till now, there is only a single sched_ulsch; however, a later commit
  will allow to schedule multiple PUSCH transmissions from a single (DL)
  slot. This would require to make sched_ctrl->sched_ulsch, and
  also iterate through all sched_ulsch. In this new scheme, we can
  simply call post_process_ulsch() multiple times, which is simpler (and
  therefore, implicitly handleded as of this commit).
2025-08-04 09:53:14 +02:00
Robert Schmidt
d71cec7958 Refactor ULSCH phy-test scheduler
Write a single NR_sched_pusch_t structure in a single statement (where
possible). Assign to sched_ctrl->sched_pusch later, where the
post-processing functionality will be called in a follow-up commit.
2025-08-04 09:53:14 +02:00
Robert Schmidt
4772dd889e Refactor ULSCH main allocation procedure
Write a single NR_sched_pusch_t structure in a single statement (where
possible). Assign to sched_ctrl->sched_pusch in one place, where the
post-processing functionality will be called in a follow-up commit.
2025-08-04 09:53:14 +02:00
Robert Schmidt
a469f42085 Refactor retransmission's NR_sched_pusch_t usage
Avoid to overwrite the existing retInfo. Instead, create a new
NR_sched_pusch_t and assign to sched_ctrl->sched_pusch in one place. A
follow-up commit will directly trigger the post processor here.
2025-08-04 09:53:14 +02:00
Robert Schmidt
5b39baacc3 Refactor inactivity-based PUSCH allocation
Write a single NR_sched_pusch_t structure in a single statement (where
possible). Assign to sched_ctrl->sched_pusch in one place, where the
post-processing functionality will be called in a follow-up commit.
2025-08-04 09:53:14 +02:00
Robert Schmidt
81b66fae5e UL harq PID: similar to parent, reduce scope of sched_pusch 2025-08-04 09:53:14 +02:00
Robert Schmidt
f3068caa37 Store selected MCS in UE iterator
PF uses MCS and average throughput to decide which UE to schedule. Thus,
the first loop selects the MCS, and the second does the main UE
allocation after sorting by priority, depending on the MCS.

A follow-up commit will remove sched_pusch from NR_UE_sched_ctrl_t.
Thus, we cannot rely on sched_ctrl to store the MCS in the first loop,
and look it up from there in the second. Instead, store it as part of
the UE iterator data, and take it from there.
2025-08-04 09:53:13 +02:00
Robert Schmidt
243e956ee9 Remove unused parameter from sched_pusch 2025-08-04 09:53:13 +02:00
Robert Schmidt
fcebec09ad Read TX power from HARQ.sched_pusch
A later commit will remove sched_ctrl->sched_pusch. Instead, the TX
power is also stored for each HARQ process (as they contain
sched_pusch). Read it from there, which should have the same effect.
2025-08-04 09:53:13 +02:00
Robert Schmidt
acf6b957b3 Refactor post processor into post_process_ulsch()
Introduce an array with information on FAPI structures to save resource
allocation into. It's in nr_mac_gNB.h because the next commit reuses
this for all preprocessors.
2025-08-04 09:53:13 +02:00
Sakthivel Velumani
39c6cb203c Not include DC for CSI IM measurement
DC subcarrier has a significantly higher energy compared to other CSI IM
resource elements. This causes the average interference + noise
estimation to be higher than CSI-RS signal power making the CQI 0. With
a third-party gnb that schedules PDSCH based on CQI, the UE never
receives DL DCI once it starts sending CSI reports.
2025-08-03 16:53:52 -04:00
Sakthivel Velumani
350cf8d6ef Fix PUCCH 2 DMRS in UE
for start RB not multiple of 4
2025-08-03 16:52:43 -04:00
francescomani
88ec5fb239 highlighting UE LOG with sync SSC printed 2025-08-03 10:41:16 +02:00
francescomani
7f4397a091 workaround to take into account SS0 1st symbol depending on SSB 2025-08-03 10:35:46 +02:00
francescomani
aff31d45b4 formatting 2025-08-03 10:25:00 +02:00
Thomas Schlichter
bbf4cd4a90 gNB: fix scheduling of rel-17 SIBs 2025-08-01 16:00:12 +02:00
Robert Schmidt
442c29cfcd CI: use getConnection() to simplify code 2025-08-01 13:00:50 +02:00
Robert Schmidt
be60dbd38c CI: shorten UE names (IP might not be available) 2025-08-01 13:00:50 +02:00
Robert Schmidt
af3302d2d6 Remove unused statement 2025-08-01 13:00:50 +02:00
Jaroslava Fiedlerova
a9f10bd794 Add CI unit test for highrate iperf test 2025-08-01 12:45:33 +02:00
Jaroslava Fiedlerova
73cfaba2dc CI: refactor iperf3 UDP analysis function
- Add helper function to normalize bitrate values to Mbps for calculations.
- Add helper function to extract data from iperf test report.
- Clean up the UDP analysis function, improve test report formatting.
- Fix an issue where Gbps values were incorrectly reported due to inconsistent
  unit parsing.
- Update CI unit test report checks to match the new formatting.
2025-08-01 12:45:29 +02:00
Robert Schmidt
b763692792 Merge branch 'integration_2025_w31' into 'develop'
Integration: `2025.w31`

* !3324 Use complex data type for channel magnitude
* !3462 Synchronized Real-Time Data Recording Application Addition
* !3536 Remove --usim-test command line option
* !3537 Another fix for CSI PDSCH overlap
* !3546 Fix for tun_if.c warning "specified bound 16 equals destination size"
* !3523 Fix UE PDSCH LLR
* !3544 Fix sib1 reception flag
* !3534 CI: Adjust frequency configuration
* !3530 remove specific directory for LTE SIM management tools
* !3545 Fix overflow when negating minimum int16_t value in precoding
* !3461 Fix Dedicated BWPs
* !3558 feat(LDPCImplementation.md): Fix documentation

Closes #948 and #955

See merge request oai/openairinterface5g!3551
2025-08-01 04:40:24 +00:00
Robert Schmidt
755246545e Merge remote-tracking branch 'origin/fix_LDPCImplementation' into integration_2025_w31 (!3558)
feat(LDPCImplementation.md): Fix documentation

Few ambiguities and outdated names were found in the LDPC documentation
by Vlademir Brusse (see in the devel mailing list).

- Outdated names of the functions of the segment coding interface.
- Ambiguity about loading of the segment coding libraries.
2025-07-31 18:43:52 +02:00
Robert Schmidt
c15accf106 Merge remote-tracking branch 'origin/Fix_DedicatedBWPs' into integration_2025_w31 (!3461)
Fix Dedicated BWPs

- Improve SearchSpace selection
- Improve CORESET selection
- Fix fill 'initialDownlinkBWP->pdsch_Config' when there are
  DedicatedBWPs
  * This fixes the reported 'RSRP = 0' issue when the UE is in the
    InitialBWP and we have DedicatedBWPs configured
- Add a 'common' type SearchSpace in the NR_BWP_DownlinkDedicated IE for
  DedicatedBWPs
- Fix hardcoded 'controlResourceSetId' by making it dynamic
- Remove 'searchspaceid' from 'verify_agg_levels' function because it
  was used only for LOG
- CI: Add DedicatedBWP to '40 MHz TDD F1+E1 SA' in
  'RAN-SA-B200-Module-SABOX-Container'
2025-07-31 15:53:31 +02:00
francescomani
228f642755 config_isparamset doesn't work for array types, using numelt instead 2025-07-31 15:30:09 +02:00
Robert Schmidt
cbdcd2d015 Merge remote-tracking branch 'origin/issue-955' into integration_2025_w31 (!3545)
Fix overflow when negating minimum int16_t value in precoding

This closes #955

It prevents undefined behavior caused by the minimum int16_t value
(-32768) in two's complement representation. Because possible negation
by multiplying with -1 during precoding cause an overflows since +32768
cannot be represented in 16-bit signed integers and end up again in
-32768 because of overflow, here reveald by using the SIMD functions.

Workaround we use a slightly smaller number than 1 in Q15 Format to
prevent this error. Q15 representation of (integer value -32767) -1 +
2^-15 = -0.999969482421875
2025-07-31 15:26:21 +02:00
Robert Schmidt
b77be2ae28 Telnet CI: Handle error of no RNTI 2025-07-31 15:20:09 +02:00
Robert Schmidt
93196e630b Bugfix: when no UE found, return -1 2025-07-31 15:20:09 +02:00
Robert Schmidt
128a6f3945 Add XML step to check UE is on dedicated BWP 2025-07-31 15:20:09 +02:00
Robert Schmidt
aa4c2df593 Remove non-existing XML steps 2025-07-31 15:20:09 +02:00
Robert Schmidt
ea8e5d85be Add telnet command to get UE's BWP 2025-07-31 15:20:09 +02:00
Romain Beurdouche
eabb811513 feat(LDPCImplementation.md): Fix documentation
* Outdated names of the functions of the segment coding interface.
* Ambiguity about loading of the segment coding libraries.
2025-07-31 15:04:41 +02:00
Robert Schmidt
da70ea75ae Merge remote-tracking branch 'origin/ci-change-phytest-frequency' into integration_2025_w31 (!3534)
CI: Adjust frequency configuration

Change frequency used by OTA CI pipelines to avoid overlap with
commercial deployments.
2025-07-31 09:51:31 +02:00
Robert Schmidt
71e20bf290 Merge remote-tracking branch 'origin/lte-sim-tools' into integration_2025_w31 (!3530)
remove specific directory for LTE SIM management tools

This is very old code has never been integrated with the "main" OAI
cmake infrastructure and more recent libraries.

This MR integrates the three binaries for LTE virtual sim management in
the regular build process and log system
2025-07-31 09:50:11 +02:00
Robert Schmidt
44933f18c6 Code does nothing: gtpv1u_data_g never populated, always HASH_TABLE_KEY_NOT_EXISTS 2025-07-31 08:35:10 +02:00
Robert Schmidt
dbe9e8684b OAI hashtable not used in GTP 2025-07-31 08:35:10 +02:00
Robert Schmidt
1e39f20d87 Make GTP compile on its own, without LTE
Avoid the include gtpv1_u_messages_types.h, as this pulls in e.g., LTE
RRC definitions. The CU-UP load tester integrated in one of the
following commits should be able to build without LTE RRC, if it was for
GTP. Unfortunately, ITTI also pulls in LTE RRC, so it's also somewhat
useless...

Put some forward declarations instead. That also shows that the API is
unnecessarily complex, and would need some cleanup.
2025-07-31 08:35:10 +02:00
Robert Schmidt
aa82d83228 Correctly link sctp into SCTP_CLIENT
Remove sctp from all other targets, since we use sctp::sctp on
SCTP_CLIENT (would fail if it does not exist), and SCTP_CLIENT already
fulfils the SCTP dependency.
2025-07-31 08:35:10 +02:00
Robert Schmidt
83bb8017cf Correct Findsctp.cmake
- Provide some documentation
- Make cmake keywards and sctp lib name lowercase
- Use standard form of find_package_handle_standard_args()
- Make an imported target sctp::sctp that will fail if being used in
  cmake unless defined, which will avoid that "sctp" appears in the
  cmake code but is silently discarded

See also:
https://cmake.org/cmake/help/latest/manual/cmake-developer.7.html#a-sample-find-module
2025-07-31 08:35:10 +02:00
Jaroslava Fiedlerova
ac6561335c CI: adjust gNB conf file in OAIUE pipeline
Following frequency change in the pipeline, we observed degraded UL channel
conditions resulting in low UL throughput. Increasing attenuation on the gNB
side was found to mitigate this issue by improving UL channel quality
and reducing UL noise power.

Increase tested UL and DL bitrates in OAIUE pipeline.
2025-07-30 18:11:09 +02:00
Laurent THOMAS
02ce4aaf82 Fix a 4G UE bug 2025-07-30 17:41:28 +02:00
Laurent THOMAS
426e3453cd trace to try to debug old 4G bug 2025-07-30 17:41:28 +02:00
Robert Schmidt
ff52194857 Remove unused parameter from build_oai 2025-07-30 17:41:28 +02:00
Laurent THOMAS
990fc9c55a Fix potential out-of-bound write
Tell strncpy() the size including the NULL byte to make sure we copy all
data.

This just fixes these warnings:

    openair3/NAS/TOOLS/conf_usim.c: In function ‘gen_usim_data’:
    openair3/NAS/TOOLS/conf_usim.c:191:17: warning: ‘strncpy’ output truncated before terminating nul copying as many bytes from a string as its length [-Wstringop-truncation]
    openair3/NAS/TOOLS/conf_usim.c:190:53: note: length computed here
    openair3/NAS/TOOLS/conf_usim.c:195:17: warning: ‘strncpy’ output truncated before terminating nul copying as many bytes from a string as its length [-Wstringop-truncation]
    openair3/NAS/TOOLS/conf_usim.c:194:54: note: length computed here

add copy with limited size and truncate properly with null C string termination.

As clang-format doesn't handle tab indented files and as it is not the
OAI coding rule, the entire file is re-indented with present OAI coding
rule.
2025-07-30 17:40:50 +02:00
Laurent THOMAS
b65b5dd40e Remove specific directory for LTE SIM management tools
Move into openair3/NAS/TOOLS/CMakeLists.txt, and simplify the
CMakeLists.txt.

Co-authored-by: Robert Schmidt <robert.schmidt@openairinterface.org>
2025-07-30 17:39:12 +02:00
Jaroslava Fiedlerova
6c8fc09525 CI: change frequency for AW2S pipeline 2025-07-30 10:59:47 +02:00
Robert Schmidt
9a7d80ef7d CMake module path to beginning
Move the path to the beginning, so that we can use it early.
Specifically, it was after the SCTP module, and the next commit will use
the Findsctp.cmake module to find SCTP. Use the cmake-proper variable.
2025-07-30 09:39:05 +02:00
Matthias Mehlhose
5b0b40c102 mod: use random numbers in unit test function 2025-07-29 15:40:01 +00:00
Mario Joa-Ng
905a8a495e mod: unit test code to compare CM and SIMD results on both antennas 2025-07-29 15:38:23 +00:00
Matthias Mehlhose
7d27592b4f Initial unit test to refactor and fix nr_layer_precoder_simd function (See #955) 2025-07-29 15:35:24 +00:00
Robert Schmidt
05f6a0660b Merge remote-tracking branch 'origin/fix-ue-cset0-search' into integration_2025_w31 (!3544)
Fix sib1 reception flag

TS 38.213 4.1 says coreset 0 is present only if kssb < 24 for FR1 and <
12 for FR2. So we set get_sib1 flag accordingly.
2025-07-29 09:39:33 +02:00
Robert Schmidt
10ab7c2278 Merge remote-tracking branch 'origin/issue-948-fix' into integration_2025_w31 (!3523)
Fix UE PDSCH LLR

Closes #948
2025-07-29 09:38:59 +02:00
Jaroslava Fiedlerova
62dd459959 CI: change frequency for OAIUE pipeline 2025-07-29 09:30:23 +02:00
Robert Schmidt
8a9d551f42 Merge remote-tracking branch 'origin/fix_warnings' into integration_2025_w31 (!3546)
Fix for tun_if.c warning "specified bound 16 equals destination size"
2025-07-28 10:31:55 +02:00
Robert Schmidt
6d6814044a Merge remote-tracking branch 'origin/fix_csi_pdsch_overlap_fix' into integration_2025_w31 (!3537)
Another fix for CSI PDSCH overlap

This follows up !3510 and takes into account starting PRB to determine
even/odd RB
2025-07-28 10:31:32 +02:00
Robert Schmidt
432dbda010 Merge remote-tracking branch 'origin/remove-usim-test' into integration_2025_w31 (!3536)
Remove --usim-test command line option

Remove the --usim-test option: to my knowledge, it's not used by users,
and is misleadingly placed in various places where there should not be a
difference w.r.t. USIM configuration.

When making the changes, I assumed that --usim-test would be 0 (the
default), which is the case in all executables when not specified in
options except for the nr_dlsim, nr_pbchsmi, nr_ulsim simulators.

The only exception is the initialization of PDCP from the MAC, which
does not seem to be correct (the PDCP is in the CU, so it does not make
sense to call it from the MAC which is in the DU).
2025-07-28 10:31:07 +02:00
Robert Schmidt
4b0b0c4f21 Merge remote-tracking branch 'origin/data_recording_app' into integration_2025_w31 (!3462)
Synchronized Real-Time Data Recording Application Addition

The main Features of Synchronized Real-Time Data Recording Application:

- The Data Recording Application runs in parallel to the gNB or UE
  server or in another server as Data Recording or Data Lake Server
- It makes use of (an extended version) of OAI’s T-tracer framework
- It communicates with base station, and user terminal
- It synchronizes and combines data traces and control information
  (meta-data) from Base station and User terminal into consistent SigMF
  data sets

Details on implementation addition:

- T_tracer Extension to Support up to 35 Parameters in the T() macro
- Add traces on gNB PHY UL and related requirement: FD PUSH IQ, FD DMRS, and UL Channel estimates wi/wo interpolation, and Rx Payload bits:

  1. The required memories have been created and initialized in:
     openair1/PHY/NR_TRANSPORT/nr_ulsch_demodulation.c
  2. Those memories: memory for DMRS signals, memory for channel
     estimates based on DMRS positions, memory to store slot grid with
     channel coefficients based on DMRS positions after interpolation,
     and memory to store extracted data including PUSCH + DMRS.
  3. The input parameters to nr_pusch_channel_estimation() has been
     updated to get the pointer to the added memories of
     pusch_dmrs_slot_mem and pusch_ch_est_dmrs_pos_slot_mem
     (openair1/PHY/NR_ESTIMATION/nr_ul_estimation.h)
  4. The DMRS grid of NR slot and the estimated channel coefficients at
     DMRS locations are logged to created memories in:
     openair1/PHY/NR_ESTIMATION/nr_ul_channel_estimation.c
  5. The function inner_rx in
     openair1/PHY/NR_TRANSPORT/nr_ulsch_demodulation.c is updated to log
     the extracted ULSCH PRBs and the interpolated channel coefficients.
  6. The T-macro() has been called in
     (openair1/PHY/NR_TRANSPORT/nr_ulsch_demodulation.c) to trace added
     traces: T_GNB_PHY_UL_FD_DMRS, T_GNB_PHY_UL_FD_CHAN_EST_DMRS_POS,
     T_GNB_PHY_UL_FD_PUSCH_IQ, T_GNB_PHY_UL_FD_CHAN_EST_DMRS_INTERPL

- Add traces on UE PHY UL and related requirement: Tx Scrambled bits and Tx payload bits

  1. Update input parameters to nr_ulsch_encoding () in
     nr_transport_proto_ue.h to get number_dmrs_symbols to be added to
     meta-data.
  2. In nr_ulsch_coding.c: Trace UE PHY UL Payload TX bits (T_message:
     T_UE_PHY_UL_PAYLOAD_TX_BITS) including related meta-data and UTC
     time.
  3. In nr_ulsch_ue.c: Trace UE PHY UL Scrambled TX bits (T_message:
     T_UE_PHY_UL_SCRAMBLED_TX_BITS) including related meta-data and UTC
     time.
  4. Fix the input prameters in nr_ulsch_encoding () called in
     (openair1/SIMULATION/NR_PHY/ulschsim.c) since a new input parameter
     has been added.

- Add Data Collection Services (T-Tracers for gNB and UE)

  1. Add _tracer_app_gnb and t_tracer_app_ue apps to common/utils/T/tracer/Makefile
  2. Add Data collection Service for gNB: common/utils/T/tracer/t_tracer_app_gnb.c
  3. Add Data Collection Service for UE: common/utils/T/tracer/t_tracer_app_ue.c

- Add Shared memory configuration
  (common/utils/T/tracer/shared_memory_config.h), since we will have too
  much memory consumption on the stack if the T-tracer is not fast
  enough to process the traces or if we have too much traces. As a
  result, tracers start to capture data, write data in shared memory,
  then close the T-Tracer after getting the recording of N slots. The
  Data recording App will read data from the shared memory.

- Add Main app of Data Recording Application v1.0 including: Config
  files, SigMF Interface, Config Interface, Sync Service, and def
  messages: The data recording App includes mainly the following files:

  1. The main app: data_recording_app_v1.0.py that has the data control
     service, interact with tracers, data sync and conversion service.
  2. The configuration file:
     common/utils/data_recording/config/config_data_recording.json
  3. The wireless dictionary file:
     common/utils/data_recording/config/wireless_link_parameter_map.yaml
  4. Config Interface
     (common/utils/data_recording/lib/config_interface.py) that reads
     the configuration for both gNB and UE.
  5. Sync interface (common/utils/data_recording/lib/sync_service.py)
     that sync captured data for gNB and UE before saving them in SigMF
     format
  6. The SigMF Interface
     (common/utils/data_recording/lib/sigmf_interface.py) to store
     recorded data and meta-data in SigMF format
  7. A simple script
     (common/utils/data_recording/sync_validation_demo.py) to validate
     that the recorded bits from gNB and UE are in Sync

- For more info look to doc/data_recording.md
2025-07-28 10:28:07 +02:00
Robert Schmidt
5acf5af574 Merge remote-tracking branch 'origin/fix-ch_mag-vars-type' into integration_2025_w31 (!3324)
Use complex data type for channel magnitude

bad type multi casts with wrong meaning like cast to ** a array of 2D
(wrong in C)
2025-07-28 10:27:35 +02:00
Laurent THOMAS
f835705dd1 fix array sizes and aligment issues in 5G UE dci decoder 2025-07-25 15:49:35 +02:00
francescomani
8f16b02b24 fix tun_if.c warning: specified bound 16 equals destination size 2025-07-25 13:45:34 +02:00
Laurent THOMAS
343b983aa9 fix SIMD tail length in nr_pdcch_detection_mrc() and replace >> operator by / 2025-07-25 10:04:13 +02:00
Laurent THOMAS
b41c9e2e85 move static some functions that are used only in one file 2025-07-25 10:04:13 +02:00
Laurent THOMAS
19d783f6d9 generalize constant nb re per rn in dci_nr.c 2025-07-25 10:04:04 +02:00
Laurent THOMAS
e8f6d14c47 simplify and make more local variables in nr_rx_pdcch() and fix small bugs (size 9 RE instaed of 12 RE) 2025-07-25 10:02:26 +02:00
Laurent THOMAS
b30da5c0b2 reduce size and make local rxdataF_comp in nr_rx_pdcch() 2025-07-25 10:02:26 +02:00
Laurent THOMAS
2c22f49a45 simplify nr_pdcch_channel_compensation() 2025-07-25 10:02:26 +02:00
Laurent THOMAS
3ca12f78e5 simplify function nr_pdcch_extract_rbs_single() 2025-07-25 10:02:26 +02:00
Laurent THOMAS
fffe9531c3 add assert in a case of wrong gNB configuration file 2025-07-25 10:02:26 +02:00
francescomani
c65db568f5 take into account starting PRB when deciding even/odd PRB for CSI PDSCH rate-matching 2025-07-24 19:51:44 +02:00
Sakthivel Velumani
e9d95e8962 Add new physim test cases for nr_dlsim
Following tests are added:
  1. 256QAM with TDL-A channel model
  2. 256QAM with 2 layers
2025-07-24 13:20:07 -04:00
Sakthivel Velumani
dad6cf8dc3 Fix bug in LLR threshold buffer
The LLR threshold buffers hold only for one symbol but the LLRs are
computed for all symbols together. So only the threshold of last symbol
was used for computing LLR for all other symbols.

This commit calls nr_dlsch_llr for each symbol togther with rest of
nr_rx_pdsch() and calls nr_dlsch_layer_demapping at the last symbol.

Fixes issue 948.
2025-07-24 13:20:07 -04:00
Sakthivel Velumani
eb44d715ca Dlsim dump processing buffers
Write extracted rxF buffer to output bin file.
Fix offset in writing rxF buffer.
2025-07-24 13:20:04 -04:00
Sakthivel Velumani
b37cd04134 Set sib1 reception flag as per spec
TS 38.213 4.1 says coreset 0 is present only if kssb < 24 for FR1 and <
12 for FR2. This commit sets get_sib1 flag based on kssb.

Also, setting of mac state is taken out of function nr_ue_decode_mib().
2025-07-24 13:18:04 -04:00
Laurent THOMAS
8dd2119d4e bad type multi casts with wrong meaning like cast to ** a array of 2D (wrong in C) 2025-07-24 13:48:36 +02:00
Laurent THOMAS
3264eca6db enhance llr unitary tests 2025-07-24 13:48:36 +02:00
Laurent THOMAS
f57f6a8d4e factorize code that initialize all 0xff simd vectors 2025-07-24 13:48:36 +02:00
francescomani
d914541838 use CSET0 for common search space in dedicated BWP 2025-07-24 10:47:39 +01:00
luis_pereira87
0aa19da568 CI: Add DedicatedBWP to '40 MHz TDD F1+E1 SA' in 'RAN-SA-B200-Module-SABOX-Container' 2025-07-24 10:47:39 +01:00
luis_pereira87
72d9761698 Remove 'searchspaceid' from 'verify_agg_levels' function because it was used only for LOG 2025-07-24 10:47:39 +01:00
luis_pereira87
7a5d1e55f0 Add a 'common' type SearchSpace in the NR_BWP_DownlinkDedicated IE for DedicatedBWPs to get DCIs decoded in common searchspace of a DedicatedBWP
After RRCSetup, until RRCReconfigurationComplete, gNB continues to schedule ULSCH using DCIs in a common searchspace.
In theory, the UE should decode DCIs in:

            <downlinkBWP-ToAddModList>
                <BWP-Downlink>
                    <bwp-Common>
                        <pdcch-ConfigCommon>
                            <setup>
                                <commonSearchSpaceList>
                                    ...
                                </commonSearchSpaceList>

However, due to the limited amount of time to investigate this issue, the easy way I found to get DCIs decoded in common searchspace of a DedicatedBWP was by adding a common searchspace in the bwp-Dedicated:

                    <bwp-Dedicated>
                        <pdcch-Config>
                            <setup>
                                <searchSpacesToAddModList>
                                    <SearchSpace>
                                        ...
                                    </SearchSpace>
                                </searchSpacesToAddModList>

This way, let's call it a workaround.
2025-07-24 10:47:39 +01:00
luis_pereira87
8c58abf85a Fix fill 'initialDownlinkBWP->pdsch_Config' when there are DedicatedBWPs
This fixes the reported 'RSRP = 0' issue when the UE is in the InitialBWP and we have DedicatedBWPs configured
2025-07-24 10:39:01 +01:00
luis_pereira87
641cf84c0c Improve CORESET selection 2025-07-24 10:39:01 +01:00
luis_pereira87
0ccf1879ae Improve SearchSpace selection
There is a removal of the NR_SearchSpace__searchSpaceType_PR because, at this point, the gNB already selected the searchspace and it calls this function only to find the coreset with controlResourceSetId based on the previously searchspace id selected;
There is no need to send a pointer to the entire searchspace structure because we only need the controlResourceSetId: NR_ControlResourceSetId_t coreset_id = *ss->controlResourceSetId;

It also prevents a segmentation fault, in develop when NR_SearchSpace__searchSpaceType_PR_common because gNB calls sched_ctrl->coreset = get_coreset(nr_mac, scc, bwpd, sched_ctrl->search_space, target_ss); the bwpd is NR_BWP_DownlinkDedicated_t *bwpd = NULL; and is it incompatible with the cast to NR_BWP_Downlink_t in coreset = ((NR_BWP_Downlink_t*)bwp)->bwp_Common->pdcch_ConfigCommon->choice.setup->commonControlResourceSet; this was never noticed until now because gNB barely used NR_SearchSpace__searchSpaceType_PR_common
2025-07-24 10:39:00 +01:00
Jaroslava Fiedlerova
61c769f8b5 Merge branch 'integration_2025_w30' into 'develop'
Integration: `2025.w30`

* !3529 Add CI RFsim5G test for second PDU session
* !3532 Count bits in variable with mask
* !3533 CI: test T2 with DPDK 22.11
* !3535 RAN-Container-Parent: Auto-generate artifact in failure case
* !3542 bugfix: avoid segmentation fault when Redcap tries to connect to gNB
* !3543 rfsimulator: fix model name for channel
* !3540 CI: migrate RFSim4G to acamas machine

See merge request oai/openairinterface5g!3539
2025-07-23 15:13:27 +00:00
Jaroslava Fiedlerova
300060c26e Merge remote-tracking branch 'origin/ci-move-rfsim4g-to-acamas' into integration_2025_w30 (!3540)
CI: migrate RFSim4G to acamas machine
2025-07-23 16:46:21 +02:00
Robert Schmidt
db22e23446 Avoid uninitialized variable btilde
Pre-initialize this variable. It should be set in pucch2x_scrambling(),
but the compiler warns with

    In function ‘pucch2x_modulation’,
        inlined from ‘generate_pucch2x’ at oai/openair1/PHY/LTE_UE_TRANSPORT/pucch_ue.c:425:3:
    oai/openair1/PHY/LTE_UE_TRANSPORT/pucch_ue.c:361:18: warning: ‘btilde’ may be used uninitialized [-Wmaybe-uninitialized]
      361 |     d[i] = btilde[i] == 1 ? -amp : amp;
    oai/openair1/PHY/LTE_UE_TRANSPORT/pucch_ue.c: In function ‘generate_pucch2x’:
    oai/openair1/PHY/LTE_UE_TRANSPORT/pucch_ue.c:387:11: note: ‘btilde’ declared here
      387 |   uint8_t btilde[20];
2025-07-23 12:12:59 +02:00
Robert Schmidt
465d7de5a9 Remove --usim-test command line option
Remove the --usim-test option: to my knowledge, it's not used by users,
and is misleadingly placed in various places where there should not be a
difference w.r.t. USIM configuration.

When making the changes, I assumed that --usim-test would be 0 (the
default), which is the case in all executables when not specified in
options except for the nr_dlsim, nr_pbchsmi, nr_ulsim simulators.

The only exception is the initialization of PDCP from the MAC, which is
not correct (the PDCP is in the CU, so it does not make sense to call it
from the MAC which is in the DU). Instead, always initialize from main,
even in the NSA case (NSA was covered by the incorrect initialization
from MAC).

This in turn let to some more cleanup around function du_rlc_data_req().
After receiving GTP packets at the DU, they were given to the PDCP to
enqueue the packet at RLC. This does not work anymore, since the PDCP is
not initialized; it also does not seem necessary, as this enqueue
functionality is necessary to decouple PDCP and RLC to avoid deadlocks
in monolithic, but in split-mode, this cannot happen. Instead, call
directly into the RLC when receiving GTP packets.
2025-07-23 12:12:59 +02:00
Abdo-Gaber
d619a4e003 Add Readme for the Data Recording Application
It provides and overview about the Architecture, Requirement Packages,
Configuration Files, How to run Data Recording Application, and an
Overview on Collected Data Set.
2025-07-23 11:18:37 +02:00
Abdo-Gaber
8c3e14ead9 Add Data Recording Application v1.0 (main app, SigMF Interface, Config files, Sync validation)
The data recording App includes the following files:
- The main app: data_recording_app_v1.0.py that has the data control service, interact with tracers, and data sync and conversion service
- The configuration file: common/utils/data_recording/config/config_data_recording.json
- The wireless dictionary file: common/utils/data_recording/config/wireless_link_parameter_map.yaml
- The SigMF Interface (common/utils/data_recording/lib/sigmf_interface.py) to store recorded data and meta-data in SigMF format
- A simple script (common/utils/data_recording/sync_validation_demo.py) to validate that the recorded bits from gNB and UE are in Sync
- For more info look to doc/data_recording.md

A squashed commit further updates:
- Enhance Data Recording App structure
- Support the new state machine of T-Tracers
- Add new files for Config Interface, sync Service, def of data recording messages, and common utilties
- Make part of logging on Terminal configurable
2025-07-23 11:18:37 +02:00
Abdo-Gaber
9a9c5c97ef Add Data Collection Services (T-Tracer for gNB and UE)
- Add _tracer_app_gnb and t_tracer_app_ue apps to common/utils/T/tracer/Makefile
- Add Data collection Service for gNB: common/utils/T/tracer/t_tracer_app_gnb.c
- Add Data Collection Service for UE: common/utils/T/tracer/t_tracer_app_ue.c
- Add Shared memory configuration (common/utils/T/tracer/shared_memory_config.h),
  since We will have too much memory consumption on the stack if the
  T-tracer is not fast enough to process the traces or if we have too
  much traces. As a result, tracers start to capture data, write data in
  shared memory, then close the T-Tracer after getting the recording of
  N slots
- Support the operation of : COnfig, Record, and Stop
- Poll from Socket and not use get_events to mitigate long-time waiting
  if there is no data in buffer or the UE is already released or crashed
- Add extra offset to improve data sync
2025-07-23 11:18:37 +02:00
Abdo-Gaber
1a8a100444 Add Trace RX Payload on gNB (msg: GNB_PHY_UL_PAYLOAD_RX_BITS) including UTC time
Log gNB RX Payload for both CRC valid and invalid cases
2025-07-23 11:18:37 +02:00
Abdo-Gaber
e0c5621d60 Add traces on UE PHY UL and related requirement: Tx Scrambled bits and Tx payload bits
- Update input parameters to nr_ulsch_encoding () in
  nr_transport_proto_ue.h to get number_dmrs_symbols to be added to
  meta-data.
- In nr_ulsch_coding.c: Trace UE PHY UL Payload TX bits (T_message:
  T_UE_PHY_UL_PAYLOAD_TX_BITS) including related meta-data and UTC time.
- In nr_ulsch_ue.c: Trace UE PHY UL Scrambled TX bits (T_message:
  T_UE_PHY_UL_SCRAMBLED_TX_BITS) including related meta-data and UTC
  time.
- Fix the input prameters in nr_ulsch_encoding () called in
  (openair1/SIMULATION/NR_PHY/ulschsim.c) since a new input parameter
  has been added.
2025-07-23 11:18:37 +02:00
Abdo-Gaber
8caf326134 Add traces on gNB PHY UL and related requirement: FD PUSH IQ, FD DMRS, and UL Channel estimates wi/wo interpolation
- The required memories have been created and initialized in:
  openair1/PHY/NR_TRANSPORT/nr_ulsch_demodulation.c
- Those memories: memory for DMRS signals, memory for channel estimates
  based on DMRS positions, memory to store slot grid with channel
  coefficients based on DMRS positions after interpolation, and memory
  to store extracted data including PUSCH + DMRS.
- The input parameters to nr_pusch_channel_estimation() has been updated
  to get the pointer to the added memories of pusch_dmrs_slot_mem and
  pusch_ch_est_dmrs_pos_slot_mem
  (openair1/PHY/NR_ESTIMATION/nr_ul_estimation.h)
- The DMRS grid of NR slot and the estimated channel coefficients at
  DMRS locations are logged to created memories in:
  openair1/PHY/NR_ESTIMATION/nr_ul_channel_estimation.c
- The function inner_rx in
  openair1/PHY/NR_TRANSPORT/nr_ulsch_demodulation.c is updated to log
  the extracted ULSCH PRBs and the interpolated channel coefficients.
- The T-macro() has been called in
  (openair1/PHY/NR_TRANSPORT/nr_ulsch_demodulation.c) to trace added
  traces: T_GNB_PHY_UL_FD_DMRS, T_GNB_PHY_UL_FD_CHAN_EST_DMRS_POS,
  T_GNB_PHY_UL_FD_PUSCH_IQ, T_GNB_PHY_UL_FD_CHAN_EST_DMRS_INTERPL
2025-07-23 11:18:33 +02:00
Jaroslava Fiedlerova
fa9feda58f Merge remote-tracking branch 'origin/rfsim-test-fix' into integration_2025_w30 (!3543)
rfsimulator: fix model name for channel
2025-07-23 11:10:58 +02:00
Jaroslava Fiedlerova
dcdf0d3bb5 Merge remote-tracking branch 'origin/bugfix-RA-Redcap' into integration_2025_w30 (!3542)
bugfix: avoid segmentation fault when Redcap tries to connect to gNB

bugfix: avoid segmentation fault when Redcap tries to connect to gNB
as NR_ServingCellConfig_t scd is NULL when Redcap does RA
2025-07-23 11:10:17 +02:00
Jaroslava Fiedlerova
9f5c58f358 Merge remote-tracking branch 'origin/ci-handle-no-artifact' into integration_2025_w30 (!3535)
RAN-Container-Parent: Auto-generate artifact in failure case

RAN-Container-Parent uses Jenkinsfile-GitLab-Container, which only
triggers sub pipelines, then collects their results. However, if a sub
pipeline did not generate an artifact, the result was skipped. It would
also not show it in the automatically generated result page, when it
should.

Remedy this by automatically generating a file with a link to the
pipeline if the artifact could not be retrieved, which
1. Will give a link, which is easier for developers to follow to the
   pipeline than manually clicking through Jenkins,
2. Makes the failed pipeline appear in the list of failed pipelines.
2025-07-23 11:09:32 +02:00
Jaroslava Fiedlerova
c3cb3c8e91 Merge remote-tracking branch 'origin/ci-t2-dpdk-22.11' into integration_2025_w30 (!3533)
CI: test T2 with DPDK 22.11

Following the upgrade of T2 to the latest firmware, DPDK 22.11 is now required.
This MR updates the testing pipeline to ensure compatibility and deployment of
T2 physims with DPDK 22.11.
2025-07-23 11:08:53 +02:00
Jaroslava Fiedlerova
2ca61b02f1 Merge remote-tracking branch 'origin/count_bits_with_mask' into integration_2025_w30 (!3532)
Count bits in variable with mask

Adding a function to count bit using a mask to set starting and ending point
in the variable
2025-07-23 11:07:49 +02:00
Jaroslava Fiedlerova
b710b7fd8c Merge remote-tracking branch 'origin/test-ci-extra-pdu-session' into integration_2025_w30 (!3529)
Add CI RFsim5G test for second PDU session

after !3486 (merged), check that a second PDU session works with OAi UE by
pinging through it.
2025-07-23 11:06:53 +02:00
Jaroslava Fiedlerova
c5bc949a96 rfsimulator: fix model name for channel
bridge->nb_cnx++ is done before calling snprintf(modelname,... in the function,
so we take the model name of the next channel. This commit corrects the issue by
using bridge->nb_cnx - 1, ensuring that the model name corresponds to the currently
connected client.
This bug was introduced by MR !3455.

Co-authored-by: Bartosz Podrygajlo <bartosz.podrygajlo@openairinterface.org>
Co-authored-by: Laurent THOMAS <laurent.thomas@open-cells.com>
2025-07-22 18:21:03 +02:00
Jaroslava Fiedlerova
3c03e18c23 CI: move RFSim 4G to acamas 2025-07-22 18:17:58 +02:00
Marius Tillner
693dfb9374 bugfix: avoid segmentation fault when Redcap tries to connect to gNB as NR_ServingCellConfig_t scd is NULL when Redcap does RA 2025-07-22 15:51:01 +02:00
Abdo-Gaber
a942e7e5ab Add log tools to get and process UTC Time during data tracing 2025-07-21 14:25:06 +02:00
Abdo-Gaber
e85b38c5c5 Add new trace messages on UE and gNB
GNB_PHY_UL_FD_PUSCH_IQ,
GNB_PHY_UL_FD_DMRS,
GNB_PHY_UL_FD_CHAN_EST_DMRS_POS,
GNB_PHY_UL_PAYLOAD_RX_BITS,
UE_PHY_UL_SCRAMBLED_TX_BITS,
UE_PHY_UL_PAYLOAD_TX_BITS
2025-07-21 14:22:36 +02:00
Abdo-Gaber
b732c6082f T_tracer Extension to Support up to 35 Parameters in the T() macro 2025-07-21 14:22:29 +02:00
Robert Schmidt
b0a099cc15 RAN-Container-Parent: Auto-generate artifact in failure case
RAN-Container-Parent uses Jenkinsfile-GitLab-Container, which only
triggers sub pipelines, then collects their results. However, if a sub
pipeline did not generate an artifact, the result was skipped. It would
also not show it in the automatically generated result page, when it
should.

Remedy this by automatically generating a file with a link to the
pipeline if the artifact could not be retrieved, which

1. Will give a link, which is easier for developers to follow to the
   pipeline than manually clicking through Jenkins,
2. Makes the failed pipeline appear in the list of failed pipelines.
2025-07-21 12:18:07 +02:00
francescomani
f33e5cbf13 use function to count number of dmrs symbols 2025-07-21 09:50:44 +02:00
francescomani
1a2a8bb04f replace get_dmrs_symbols_in_slot with new function (does exactly the same) 2025-07-21 09:50:44 +02:00
francescomani
10112332cc function to count bits with a mask for start and stop 2025-07-21 09:50:40 +02:00
Jaroslava Fiedlerova
0079c4613e CI: change frequency for phytests with USRP N310 2025-07-18 17:04:51 +02:00
Robert Schmidt
c9aa985e23 Verify 2nd PDU session is up 2025-07-18 15:52:45 +02:00
Jaroslava Fiedlerova
47d857c919 CI: test T2 with DPDK 22.11
Build and run OAI physims with DPDK version 22.11 for testing with the latest
T2 firmware release. Environment variables PKG_CONFIG_PATH and LD_LIBRARY_PATH
are set to point to the custom installation path of DPDK v22.11.
2025-07-18 13:49:30 +02:00
Robert Schmidt
4490571e03 CI 5G RFsim nFAPI u0/25PRB: Add Ping test on second PDU session 2025-07-17 12:24:12 +02:00
Robert Schmidt
fc1c762cf2 Merge branch 'integration_2025_w29' into 'develop'
Integration: `2025.w29`

* !3346 Add WLS as a transport option for VNF/PNF, refactor existing options
* !3455 RF simulator: Fix concurrency issues during new client connections
* !3515 Extended changes to "Initial support for RedCap" feature in gNB
* !3510 NR UE: fix PDSCH overlap with ZP CSI-RS case
* !3512 speedup NR RLC RX for AM
* !3528 fix(RLC): Count dropped DL SDUs by the RLC
* !3486 NR UE: Enable additional PDU session
* !3225 Measurement gaps
* !3526 CI: migrate RFSim5G to acamas machine
* !3527 CI: Change RU in Aerial setup from Foxconn to WNC

See merge request oai/openairinterface5g!3525
2025-07-17 10:19:17 +00:00
Robert Schmidt
4bfdcc03be Merge remote-tracking branch 'origin/aerial-wnc' into integration_2025_w29 (!3527)
CI: Change RU in Aerial setup from Foxconn to WNC

- Change frequency in the gNB config file, from 3.75GHz to 3.5GHz
- Add high throughput tests with may_fail tag (1Gbps in DL and 90Mbps in UL)
- Update Aerial tutorial to match the changes
2025-07-17 12:17:36 +02:00
Robert Schmidt
c651a648d4 Merge remote-tracking branch 'origin/ci-move-rfsim-to-phaedra' into integration_2025_w29 (!3526)
CI: migrate RFSim5G to acamas machine

Testing on acamas machine done in test pipeline (duplicate of main
RFSim5G pipeline):
https://jenkins-oai.eurecom.fr/job/RAN-RFSim-Test-5G-Acamas/

Sample run: https://jenkins-oai.eurecom.fr/job/RAN-RFSim-Test-5G-Acamas/18/
2025-07-17 12:17:05 +02:00
Reem Bahsoun
fc72ce8753 Add WNC RU in Aerial doc + update cuBB iamge name and number of cores used (related to MR 3477) 2025-07-17 10:41:31 +02:00
Reem Bahsoun
27b86205a2 Add high throuput testing on CI 2025-07-17 10:41:31 +02:00
Reem Bahsoun
fdd29779c6 Change frequency to match the WNC RU range of frequencies 2025-07-17 10:41:25 +02:00
Robert Schmidt
ec2e4c1f01 Merge remote-tracking branch 'origin/extra-pdu-session' into integration_2025_w29 (!3486)
NR UE: Enable additional PDU session

- fix a bug with wraparound of buffer_remain_ep
- Add --extra-pdu-id command line option

Testing procedure:

1. Start cn in openairinterface5g/doc/tutorial_resources/oai-cn5g with
   docker compose up
2. Start gnb:

    sudo ./nr-softmodem -O ../../targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.usrpb210.conf --gNBs.[0].min_rxtxtime 6 --rfsim --rfsimulator.server_address server

3. Monitor extra interfaces being created:

    watch -n 0.5 "ifconfig | grep tun"

4. Start UE:

    sudo ./nr-uesoftmodem -C 3619200000 -r 106 --numerology 1 --ssb 516  --band 78 --rfsim  --uicc0.imsi 001010000000001 --extra-pdu-id 11

5. An extra tun interface oaitun_ue1p11 should be created. Observe in
   the terminal from step 3
6. Ping the core network from both interfaces, e.g., ping -I
   oaitun_ue1p11 10.0.0.1, ping -I oaitun_ue1 10.0.0.1. This should
   generate traffic on the gNB on different LCIDs.
2025-07-17 09:45:08 +02:00
Robert Schmidt
9614bb2cca Merge remote-tracking branch 'origin/develop-measGapConfig' into integration_2025_w29 (!3225)
Measurement gaps

Scheduling measurement gaps to provide sufficient time for the UE to
re-tune its transceiver to the target carrier, complete the set of
measurements and then re-tune its transceiver back to the original
carrier.
2025-07-17 09:44:35 +02:00
Jaroslava Fiedlerova
fb6640f0e1 CI: adjust UL throughput target for 2x2 RFSim5G test on acamas
This commit reduces the UL throughput target in the 2x2 test to align
with the host’s performance capabilities. The adjustment ensures more
reliable and consistent CI results.
2025-07-16 15:13:12 +00:00
Jaroslava Fiedlerova
7ba7017fb7 CI: add sleep after UE deployment in TDD dora test
Give more time to the gNB-UE to establish the connection before ping
test is triggered.
2025-07-16 15:13:12 +00:00
Jaroslava Fiedlerova
456d7f1aab CI: Increase sleep time in RFSim5G
Based on observations from testing on acamas, the interval between DL
disruption and the UE synch check needs to be increased - the UE takes
longer to go out of sync . A sleep of 15 seconds has proven to be a
reliable value to ensure constant results.
2025-07-16 15:10:29 +00:00
Robert Schmidt
8c224fde9e Merge remote-tracking branch 'origin/txpdu_dd' into integration_2025_w29 (!3528)
fix(RLC): Count dropped DL SDUs by the RLC

When a downlink SDU was discarded by the RLC Acknowledged Mode entity
due to a full transmit buffer (tx_maxsize), the drop statistics were not
being updated. The txpdu_dd_pkts and txpdu_dd_bytes counters remained at
0. It should be noted that while the statistics are named txpdu_dd_*,
the drop at this stage occurs at the SDU level.
2025-07-16 11:12:24 +02:00
Robert Schmidt
a6b0dcc129 Merge remote-tracking branch 'origin/speedup-nr-rlc-am-rx' into integration_2025_w29 (!3512)
speedup NR RLC RX for AM

rx_list is replaced by an array of size 2^(SN size - 1) which is 131072
for an SN size of 18 bits, leading to 1048576 bytes of memory used.
(Less for smaller SN sizes.)

A lot of RX processing was to run through rx_list. When the list was big
(with some non-ideal channel), it can take some time. Removing this list
should improve things. Checking with benchmark_nr_rlc_am_entity a
speedup of more thant x10 is achieved (except for the case 1024 which is
surprisingly faster than the others in the develop branch).

The only thing that may be slower is when looking for cur->next where
the SN is different, in which case we need to look for all SN one by one
until we find something or reach the limit (rx_highest_status). These
are the functions get_first_rx_pdu() and get_next_rx_pdu().
2025-07-16 11:11:55 +02:00
Jaroslava Fiedlerova
cde021e1d9 CI: add SYS_NICE capability in some RFSim5G tests
Add SYS_NICE capability to enable setting thread priority and affinity
in rfsim5g tests. This improves execution speed in test cases with
heavier processing workloads.
2025-07-16 08:34:04 +00:00
Jaroslava Fiedlerova
3d270cf627 CI: replace nc by ncat
When migrating from RHEL (on cacofonix) to Ubuntu 22.04 (on acamas), the `nc`
command needs to be replaced by `ncat`. The version of `nc` available on Ubuntu
is the OpenBSD variant, which lacks support for some options used in our scripts.
`ncat` from the Nmap is used instead.
2025-07-16 08:20:04 +00:00
Robert Schmidt
75ea8cd33a Merge remote-tracking branch 'origin/csi_pdsch_overlap_fix' into integration_2025_w29 (!3510)
NR UE: fix PDSCH overlap with ZP CSI-RS case

When PDSCH overlap with ZP CSI-RS, nb_re_pdsch needs to be reduced by
number of CSI-RS RE.
2025-07-16 08:25:24 +02:00
Robert Schmidt
a1e92cc896 Merge remote-tracking branch 'origin/redcap_support_in_gnb' into integration_2025_w29 (!3515)
Extended changes to "Initial support for RedCap" feature in gNB

Read UE RedCap capabilities.
2025-07-16 08:24:44 +02:00
Bartosz Podrygajlo
5d7c4fe14d NR UE: Enable additional PDU session
Add new command line / config parameter --extra-pdu-id which when
configured creates an extra PDU session.

Rename --default_pdu_id to --default-pdu-id
2025-07-16 06:59:31 +02:00
Bartosz Podrygajlo
7682c407e1 Fix a wraparound bug with equal priority remaining buffer size in MAC 2025-07-16 06:38:37 +02:00
rmagueta
c3f243ca82 Inter-frequency handover documentation update 2025-07-15 16:55:41 +02:00
rmagueta
b443ec4c52 Get measurement of neighboring cells and measurement gaps working after RRCReestablishment 2025-07-15 16:55:41 +02:00
rmagueta
779d2bee52 Get new measConfig and measurementTimingConfiguration for target gNB-DU during handover 2025-07-15 16:55:41 +02:00
rmagueta
d5b9f81285 Send MeasConfig to DU, Receive MeasGapConfig from DU 2025-07-15 16:55:36 +02:00
Robert Schmidt
6c4f6a231e Merge remote-tracking branch 'origin/fix-rfsim-multi-client-out-of-order' into integration_2025_w29 (!3455)
RF simulator: Fix concurrency issues during new client connections

- Fix concurrency issues happening when a new client connects, sometimes
  leading to a total softmodem deadlock.
- trace in 4G RAR processing to debug ci result
2025-07-15 15:44:50 +02:00
Robert Schmidt
c6876ea9f0 Merge remote-tracking branch 'origin/fapi-wls-integration' into integration_2025_w29 (!3346)
Add WLS as a transport option for VNF/PNF, refactor existing options

This MR adds a new transport mechanism for the VNF and PNF split, using
the Intel WLS library, which makes use of DPDK and shared memory to
transport messages. This transport mechanism is what is used to
interface with Radisys ODU, while also working with OAI VNF/PNF.

The VNF and PNF have been refactored so that the transport-specific
functions are isolated from the rest of the logic, and as such,
interchangeable by means of function pointers.

The same change is done for the packing/unpacking procedures, allowing
to switch between FAPI and nFAPI encoding.

This MR also reduces the amount of duplicated code, by refactoring the
VNF with Aerial, which now only has the transport-relevant functions, as
well as the ones that are unique to it ( for example, the unpacking
procedures where a secondary data buffer is used for the message
payloads )

Additionally a new callback is added to the VNF to process
ERROR.indication messages, which currently only indicates which message
originated the error, and which error occurred.
2025-07-15 15:44:02 +02:00
fatich
5c52f6dc23 fix(RLC): Count dropped DL SDUs by the RLC
When a downlink SDU was discarded by the RLC Acknowledged Mode entity due to a full transmit buffer (tx_maxsize), the drop statistics were not being updated.
The `txpdu_dd_pkts` and `txpdu_dd_bytes` counters remained at 0.
It should be noted that while the statistics are named `txpdu_dd_*`, the drop at this stage occurs at the SDU level.
2025-07-15 15:32:00 +02:00
Rúben Soares Silva
d74c620956 Set PNF slot_ahead to 1 when using WLS as the transport mechanism 2025-07-15 13:00:03 +01:00
Rúben Soares Silva
d4c46c5073 Fix compilation for simulators and LTE softmodem
Add nr_fapi_p5 library to the simulators common library for access to the utility function `copy_config_request`

Add dummy VNF/PNF functions to be referenced by lte-softmodem, before LTE and NR implementations of the VNF/PNF are separated
2025-07-15 13:00:03 +01:00
Rúben Soares Silva
8d7f2a8fbd Add documentation for different VNF/PNF transport
Add a section in nfapi.md related to the different transport mechanisms available for VNF/PNF communication
Edit NR_NFAPI_archi.md to describe the VNF and PNF processing logic, as well as adding a flowchart for each of the components execution
Add the necessary patch to install the WLS library in the system
2025-07-15 13:00:03 +01:00
Rajesh Guttula
74a34daf5b Extnded changes to "Initial support for RedCap" feature in gNB
The changes done in this commit are to contribute the supporting changes
for the existing "Initial support for RedCap" feature in gNB.

In this patch, handle and store the RedCap related IE's present in "NR
UE Capability Information" msg which are

- 'supportOfRedCap-r17'
- 'supportOf16DRB-RedCap-r17'
- 'longSN-RedCap-r17'
- 'am-WithLongSN-RedCap-r17'

use 'longSN-RedCap-r17' and 'am-WithLongSN-RedCap-r17' IEs to set the SN
length to either 12 Bit or 18 Bit accordingly.
2025-07-15 13:47:30 +02:00
alexjiao
dddf34ac9b Fix PDSCH overlap with ZP CSI-RS case
When PDSCH overlap with ZP CSI-RS, nb_re_pdsch needs to be reduced by number of CSI-RS RE.
2025-07-12 10:29:57 +08:00
rmagueta
5e0307d845 Refactor code, add inter-freq neighbors, avoid mem leak
Previously, we only supported intra-frequency handovers, so the
measurements where only for intra-frequency, reusing the same
measurement object. Now that we would support inter-frequency handover,
also add multiple MeasObjects for each neighbor.
2025-07-11 18:09:23 +01:00
rmagueta
6ce4d78c19 Refactor get_MeasConfig(): create subfunctions 2025-07-11 18:09:23 +01:00
rmagueta
932b177667 Add logic for measgap scheduling 2025-07-11 18:09:23 +01:00
rmagueta
dfbb6b1509 Handle Measurement Timing Configuration in DU/MAC handler 2025-07-11 14:08:52 +01:00
rmagueta
c2d9fb3589 Add MeasGap Configuration in Radio config
Add some helper functions that will be used by the MAC handler to fill
the right MeasGap configuration based on Measurement Configuration sent
by the CU, in the next commit.
2025-07-11 14:08:01 +01:00
rmagueta
7b8427e101 UE RRC: Print warning that measurement gaps are not supported 2025-07-11 13:46:21 +01:00
rmagueta
a13a8f01af Add F1AP procedures related to measurementTimingConfiguration 2025-07-11 13:46:21 +01:00
Robert Schmidt
621aa3c12e Cleanup possible transmission interrupt states 2025-07-11 13:46:21 +01:00
Jaroslava Fiedlerova
625c8cfd51 CI: move RFSim 5G to acamas 2025-07-11 09:59:37 +00:00
Rúben Soares Silva
43c733dc89 Prevent pulling TLV tag and length over end of the buffer.
Checks whether there are at least 4 bytes available to pull tag and length values.
On tlv_list unpack, if the size is sent as 0, immediately exit the function
2025-07-11 10:01:26 +01:00
Rúben Soares Silva
1026b8121f Add VNF callback for ERROR.indication
Created a function nr_error_ind_cb for the VNF that takes a received ERROR.indication and shows some details regarding the reported error from the PNF, since up until now it was not handled and treated as an unknown message.
Proper error handling procedure not created, only shows that the error occurred.
2025-07-11 10:01:26 +01:00
Rúben Soares Silva
b8a176e38f Use existing VNF functions for P7 messages
Remove duplicated functions in fapi_vnf_p7.c, leaving only functions for messages that require usage of the secondaty data_buf for unpacking

Move vnf_info struct declaration to nfapi_vnf.h to be available in fapi_nvIPC.c
2025-07-11 10:01:26 +01:00
Rúben Soares Silva
0c21807df9 Change Aerial VNF to use existing functions to process P5 messages
Remove fapi_vnf_p5.c and .h files as they're now unused

Move scheduler functions to fapi_nvIPC.c
2025-07-11 10:01:26 +01:00
Rúben Soares Silva
a340d08bd2 Initial refactoring for P5 messages in Aerial VNF 2025-07-11 10:01:26 +01:00
Rúben Soares Silva
6d05d279b0 Implementation of VNF using WLS as message transport
Add check to vnf_nr_handle_param_response for when phy_info is not found

The WLS VNF is in charge of Enqueueing the used blocks after usage for transport, this is done by keeping track of all blocks used, and calling WLS_Enqueue for all of them upon receiving a SLOT.indication
2025-07-11 10:01:26 +01:00
Rúben Soares Silva
3d34917626 Implementation of PNF using WLS as message transport
The common library exposes functions for the PNF to return the received blocks to the VNF for it to call WLS_Enqueue on them.
This is done in order to ensure the Blocks are returned after processing, also preventing the Dequeueing of blocks that are still being used, i.e. the internal value is not -1
All saved blocks are to be enqueued at the reception of a SLOT.indication by the VNF

Additionally, the definition of NFAPI_MAX_PACKED_MESSAGE_SIZE was moved to nfapi_interface.h and removed from the other headers, this is done to allow to set the maximum message size when using WLS by only changing the value in one place

Fixup fapi_nr_message_header_unpack call in nfapi_hex_parser
2025-07-11 10:01:26 +01:00
Cedric Roux
c607413eac rfsim: add a T trace to dump RX IQ data
Only for one antenna.
2025-07-11 10:51:59 +02:00
Cedric Roux
a10420e015 T hacks: add ofdm-plot
Used to... surprise... plot OFDM data as output (or input) by gnb!

Limitation: only one antenna.
2025-07-11 10:51:59 +02:00
Cedric Roux
17b5941367 T: dump logs to stderr, not stdout
This is a problem with the new tool ant0 when we dump IQ to stdout.
The logs will mess up the recording.
2025-07-11 10:51:59 +02:00
Cedric Roux
4a0d8ce637 rfsim: add a T trace to dump IQ data
Only for one antenna.
2025-07-11 10:51:59 +02:00
Cedric Roux
6a2997ec9b T hacks: add ant0 utility to dump IQ data as float complex
Or as int16.
2025-07-11 10:51:59 +02:00
Jaroslava Fiedlerova
e82fde247a Merge branch 'integration_2025_w28' into 'develop'
Integration: `2025.w28`

* !3517 CI: set interface name in UPF container for RFSim5G
* !3501 Fix automatic SSS detection logic
* !3503 DLSCH RB extraction: check DMRS bitmap only in DMRS symbols
* !3498 bugfix: UE AMBR is optional
* !3504 Improvements to the FHI for enabling further use cases

Closes #975

See merge request oai/openairinterface5g!3518
2025-07-11 08:03:04 +00:00
Sakthivel Velumani
7feaea00c2 Fix counting error bits in nr_dlsim
Recently f buffer was changed to hold packed bits and the correspoinding
change in dlsim was not done so the number of error bits before decoding
was incorrectly reported. This commit fixes it.
2025-07-10 20:44:23 -04:00
Sakthivel Velumani
abe25a52b3 Fix alignment of LLR buffer in UE 2025-07-10 17:36:02 -04:00
Jaroslava Fiedlerova
bc626c3234 Merge remote-tracking branch 'origin/oran_fhi_f_dpdk_21_plus' into integration_2025_w28 (!3504)
Improvements to the FHI for enabling further use cases

These changes to the FHI were primarily thought to enable the integration of
the intel ACC ( !3344 ) in parallel of the FHI.
I preferred to make a separate MR because I believe this topic is orthogonal
enough to be handled separately and because I wanted to bring even further
improvements.
The improvements that it actually brings are:

- Enable compiling and running xran F release with DPDK 21+
- Enable including a BBDEV device in addition of the ethernet device for the
  FHI when performing EAL init, which is necessary for using the intel ACC
  with the FHI.
- Fix an issue in usage of pkgconfig in xran E and F release. This enables to
  reliably build xran with the version of DPDK requested to pkgconfig while
  before this fix xran was always selecting the headers installed in /usr/local.
2025-07-09 17:36:18 +02:00
Romain Beurdouche
8e33727c37 feat(oran_fhlib_5g): pkgconfig fix for E release
E release had the same issue of not using pkgconfig properly as F release.
This issue was fixed in F release when enabling its compatibility with DPDK 21+.
This commit brings this fix to E release.
2025-07-09 14:55:44 +02:00
Romain Beurdouche
486726233d feat(oran_fhlib_5g): Enable to include a BBDEV device while initializing EAL
In order to be usable in parallel of FHI 7.2, BBDEV devices should be included in the EAL initialization that is prformed by xran.
This commit adds a way of adding the BBDEV device from OAI.
Also fixes an issue with pkgconfig in xran.
2025-07-09 14:55:44 +02:00
Romain Beurdouche
d3283c4819 feat(oran_fhlib_5g): F release works with DPDK21+
Modify xran F release patch to make it compile and run with DPDK 21+
(tested with DPDK 22.11)
2025-07-09 14:55:44 +02:00
Robert Schmidt
02bc14d8c1 get xran stats
Get xran stats in the trx_oran_get_stats function
and use trx_oran_get_stats upon stopping and ending RF.

Co-authored-by: Romain Beurdouche <romain.beurdouche@eurecom.fr>
2025-07-09 14:55:44 +02:00
Robert Schmidt
b7a6b1b7d6 Do not include xran internal data: not needed 2025-07-09 14:55:44 +02:00
Robert Schmidt
cc076eb547 Use locally available data instead of peaking into xran internals
Look up xran_fh_init/xran_fh_config through driver instead of peaking
into xran internals. Note that xran writes values back into these
structs during initialization, and hence it is important to store them
_after initialization_.

Some remarks regarding less obvious changes:
- slotnum is replaced by slots_in_sf: SLOTNUM_PER_SUBFRAME uses the time
  duration of a slot (=interval_us_local) to calculate the numbers of
  slots in a subframe, which can be done with a simple shift instead
- The prach duration should be queried from the PRACH configuration
  table. The function to query the occasion info is part of the MAC
  layer code while this information can be used outside of this layer.
  Use header `nr_prach_config.h` to not duplicate functionality.

Co-authored-by: Romain Beurdouche <romain.beurdouche@eurecom.fr>
2025-07-09 14:54:52 +02:00
Romain Beurdouche
42b5df351d Split out PRACH-specific functions into separate header
Split out type and function definitions for a cleaner separation for
some consumers of these functions. Concretely, nr_mac_common.h includes
various ASN.1 NR RRC headers, but not all consumers of these APIs might
need these headers. For instance, the next commit will use these
functions in the driver for 7.2 (it needs to compute PRACH length), but
the driver itself does not depend on nor does it need the ASN.1 NR RRC
headers. Defining a new header avoids the problem.
2025-07-09 14:49:03 +02:00
Jaroslava Fiedlerova
dc2e127c1c Merge remote-tracking branch 'origin/bugfix-ambr-is-optional' into integration_2025_w28 (!3498)
bugfix: UE AMBR is optional

This was a problem with open5gs and more than one PDU session. The core network
sets UE AMBR only once, leading to failure in the gNB for the second PDU session.
(A proper handling of AMBR has to be develop at some point in the gNB.)
2025-07-09 11:08:25 +02:00
Robert Schmidt
8dcdee85f7 Use buffers as set up by driver
The buffers are set up by the OAI xran driver, so instead of peaking
into xran internal data, access the buffers through the driver directly.

The buffers get set up through the following xran calls

In xran_5g_fronthault_config():
- src   => sFrontHaulTxBbuIoBufCtrl
- srccp => sFrontHaulTxPrbMapBbuIoBufCtrl
- dst   => sFrontHaulRxBbuIoBufCtrl
- dstcp => sFrontHaulRxPrbMapBbuIoBufCtrl

In xran_5g_prach_req()
- prach(dst)       => sFHPrachRxBbuIoBufCtrl
- prach(dst)decomp => sFHPrachRxBbuIoBufCtrlDecomp

Note that in all cases:
- the xran buffer array is [XRAN_N_FE_BUF_LEN][XRAN_MAX_SECTOR_NR][XRAN_MAX_ANTENNA_NR]
  (of [internal] type BbuIoBufCtrlStruct, but we give an sBufferList)
- the driver buffer array is [XRAN_MAX_ANTENNA_NR][XRAN_N_FE_BUF_LEN]

Hence, we switch the order of indexing, leave out the sector, and omit
the sBufferList member.
2025-07-09 08:12:48 +00:00
Robert Schmidt
3e3d872268 Avoid use of xran_get_slot_idx_from_tti() and use public API
xran_get_slot_idx_from_tti() has been introduced to access data
information from xran. However, it makes no sense, as the used macros to
calculate frame, slot, subframe, are already in the public API. Hence,
use these macros directly.

It would be possible to remove xran_get_slot_idx_from_tti(), but doing
so we would need to update the patch ID, causing trouble to users.
2025-07-09 08:12:48 +00:00
Rúben Soares Silva
9b71f1d324 Separate VNF socket send functions into separate socket library 2025-07-08 16:42:34 +01:00
Jaroslava Fiedlerova
d71e333329 Merge branch 'ci-rfsim5g-fix' into 'develop' (!3517)
CI: set interface name in UPF container for RFSim5G

This MR addresses an issue related to CN deployment, observed in the RFSim5G CI pipeline. Specifically, the IP addresses within the UPF container were not consistently bound to the correct network interfaces. This inconsistency led to incorrect IP address assignments for the N3, N4, and N6 interfaces, resulting in connectivity issues.

See merge request oai/openairinterface5g!3517
2025-07-08 15:05:31 +00:00
Jaroslava Fiedlerova
4a169f6c8a Update documentation for RFSim5G test deployments 2025-07-08 14:05:38 +02:00
Jaroslava Fiedlerova
67474f2246 Merge remote-tracking branch 'origin/issue_975' into integration_2025_w28 (!3503)
DLSCH RB extraction: check DMRS bitmap only in DMRS symbols

Closes #975
2025-07-08 11:37:52 +02:00
Jaroslava Fiedlerova
6ff8d085fb Merge remote-tracking branch 'origin/fix-sss-detection' into integration_2025_w28 (!3501)
Fix automatic SSS detection logic

When we try to detect a specific PCI and it fails, the SSS detection returns
successful detection with wrong frequency offset.
2025-07-08 11:36:46 +02:00
Jaroslava Fiedlerova
8ef0bf8462 CI: specify interface names in UPF container 2025-07-08 11:11:58 +02:00
Cedric Roux
080a90c930 bugfix: UE AMBR is optional
This was a problem with open5gs and more than one PDU session.
The core network sets UE AMBR only once, leading to failure in the gNB
for the second PDU session.

(A proper handling of AMBR has to be develop at some point in the gNB.)
2025-07-08 10:55:34 +02:00
Robert Schmidt
8bf6d5d7da Merge branch 'integration_2025_w27' into 'develop'
Integration: `2025.w27`

Closes #958

See merge request oai/openairinterface5g!3506

* !3349 Speed up docker deployment in CI
* !3360 NR UE: fix reestablishment for NTN
* !3488 Refactor F1 UE context messages, add unit tests
* !3502 bugfix for UL TBSLBRM
* !3475 Use of common functions to prepare FAPI PDUs at gNB MAC
* !3499 NR UE: enable CSI report for SISO case
* !3497 Update/refine gNB MAC stats, update L1
* remove unit test `--output-on-failure` option to avoid hitting timeout
* !3508 gNB: fix NTN UL retransmissions
* !3494 bugfix: read msg_type only after deciphering
* set `tx_amp_backoff_dB = 30;` for RFsim 2x2 to make it pass
* !3432 NR RRC Reject UE
* !3500 Various fixes for UE handling, HO doc updates
* !3398 continuously update SIB19 information for rfsim NTN LEO scenarios
2025-07-04 14:53:18 +00:00
Robert Schmidt
d76f062d14 Revert "CI: reduce number of attach tries"
Due to 5GC limitations, we sometimes need to try to attach multiple
times.

This reverts commit 874d2b73a4.
2025-07-04 12:17:49 +02:00
Robert Schmidt
06a5166f17 Merge remote-tracking branch 'origin/ntn_continuous_sib19_updates' into integration_2025_w27 (!3398)
continuously update SIB19 information for rfsim NTN LEO scenarios

Contains mainly these changes:

- gNB: add function nr_update_sib19() allowing to update SIB19
  information
- rfsimulator: update SIB19 contents every frame for LEO channel
  simulations
- NR UE: improve initial timing advance calculation from SIB19

Before, we only considered ta_Common_r17 and the SAT position from SIB19
to compute the initial timing advance value. This is good enough if the
satellite does not move too fast (e.g. GEO satellite).

Now we also consider ta_CommonDrift_r17, ta_CommonDriftVariant_r17 and
the SAT velocity together with the epoch time from SIB19. This improves
the accuracy of the initial TA computation, esp. for LEO satellite
scenarios.
2025-07-04 09:42:19 +02:00
Robert Schmidt
105d4f6dfb Merge remote-tracking branch 'origin/fixes-ue-handling' into integration_2025_w27 (!3500)
Various fixes for UE handling, HO doc updates

- On release request, search both attach and connected list to free a UE.
- on DU disconnect, only release the correspnonding UE contexts.
- When no AMF for the UE, auto-release the UE (NGAP would also send an
  answer, but better check first)
- implement a "grace period" before the DU/MAC automatically releases a
  UE: this is to avoid cases in which (for whatever reason) the UE
  release request is not honored by the CU. In order to not fill up UE
  contexts unnecessarily, the DU will eventually (after 10s) drop the UE
  context
- some clarification in HO tutorial
2025-07-04 09:41:38 +02:00
Robert Schmidt
b6a33777b9 Fix: on release command, search attach list
When the RA procedure fails at Msg4, we trigger UL failure and send a
message to the CU to request release. There was a bug in that upon the
ensueing release command, we did not search in the attach list (only
connected list). However, the UE failing at Msg4 does not have
transitioned to the connected list yet, thus not freeing the context.

Fixes: 8f62baefa6 ("Use list of UEs during RA instead of array of RA
  processes)"
2025-07-04 09:40:26 +02:00
Robert Schmidt
2ea3ab5050 Introduce UE release request grace period
It might happen that the CU does not answer a release request. In that
case, the MAC would never free the UE context, potentially blocking the
DU. Avoid this by introducing a "grace period" after which a UE context
is automatically freed at the MAC (and RLC), currently at 10s after the
30s UL failure timer.
2025-07-04 09:40:26 +02:00
Robert Schmidt
67e9c9c263 RRC: auto-generate release request when no AMF
Mark non-existing AMF UE NGAP ID through invalid INT64_MAX number
(permitted range is up to 2^40-1). Check for this range in the RAN
function, as we might otherwise pass the invalid AMF UE NGAP ID to the
agent, which would assert with

   nr-softmodem: /oai-ran/openair2/E2AP/flexric/src/lib/3gpp/enc/enc_gnb.c:83: enc_gNB_UE_asn: Assertion `gnb->amf_ue_ngap_id < 1UL << 40' failed.

In other words, don't send KPM messages for a UE which has no valid AMF
UE NGAP ID yet (which follows from the fact that the spec requires an
AMF UE NGAP ID; the previous behavior of simply sending 0 could be
considered a bug, because it's not the UE's true AMF UE NGAP ID).
2025-07-04 09:40:26 +02:00
Laurent THOMAS
90cf249018 add telnet commands trace 2025-07-04 09:34:17 +02:00
Cedric Roux
c70e336011 nr rlc: speedup RX path of RLC AM
rx_list is replaced by an array of size 2^(SN size - 1)
which is 131072 for an SN size of 18 bits, leading to
1048576 bytes of memory used. (Less for smaller SN sizes.)

A lot of RX processing was to run through rx_list. When the list was
big (with some non-ideal channel), it can take some time. Removing this
list should improve things. Checking with benchmark_nr_rlc_am_entity
a speedup of more thant x10 is achieved (except for the case 1024 which
is surprisingly faster than the others in the develop branch).

The only thing that may be slower is when looking for cur->next where
the SN is different, in which case we need to look for all SN one by
one until we find something or reach the limit (rx_highest_status).
These are the functions get_first_rx_pdu() and get_next_rx_pdu().
2025-07-03 18:57:32 +02:00
Cedric Roux
2b4eb2fb55 nr rlc: discarding a packet when RX buffer is full is a warning
We want to see it. It's not normal, may disturb the system.
2025-07-03 18:46:09 +02:00
Cedric Roux
708dca1ab9 fix compilation of nr rlc tests
./run_tests.sh in openair2/LAYER2/nr_rlc/tests was not functional anymore.
2025-07-03 18:42:30 +02:00
Robert Schmidt
125bfa1ab4 Merge remote-tracking branch 'origin/reject_UE' into integration_2025_w27 (!3432)
NR RRC Reject UE

Improvements in procedures to handle RRCReject message both at gNB and
UE. At gNB we send RRC Reject if the UE cannot be given resources to go
into connected mode.
2025-07-03 12:09:19 +02:00
Robert Schmidt
a830cc2e0a When freeing UE contexts, check in both possible lists 2025-07-03 08:27:38 +02:00
francescomani
41da4a3b3a send reject if we reach the max number of UEs allowed 2025-07-03 08:27:38 +02:00
francescomani
f9cf458b1c function to verify if we can allocare RRC resources to UE with given ID 2025-07-03 08:27:38 +02:00
francescomani
8932566d2b improvements in T302 handling at RRC UE 2025-07-03 08:27:38 +02:00
francescomani
88af2860a2 handle RRC reject at UE 2025-07-03 08:27:38 +02:00
francescomani
69ac704adc do not send DU to CU container to CU if we can't serve the UE 2025-07-03 08:27:38 +02:00
francescomani
511f2f2487 generate RRCReject if no DU to CU container in initial UL RRC message
slightly refactor rrc_gNB_generate_RRCReject() to take rrc pointer.
Remove unused/illegal fields from the DL RRC message.
2025-07-02 18:58:40 +02:00
Robert Schmidt
6a1203bb15 Set RRC reject waitTime to 10 2025-07-02 18:56:47 +02:00
Robert Schmidt
1e6fb953a8 Workaround: limit signal range for 2x2 RFsim test
Limit the signal range to avoid clipping, leading to retransmissions in
the 2x2.
2025-07-02 18:45:16 +02:00
Robert Schmidt
930324cfd2 Merge remote-tracking branch 'origin/bugfix-nas-security-msg-type' into integration_2025_w27 (!3494)
bugfix: read msg_type only after deciphering

There was a problem with accessing msg_type from the input buffer before
deciphering, giving obviously wrong value.

CI team: we should add a test in the CI with NAS ciphering + integrity
(connection to the core) set to not null (I suggest nea2/nia2). With
openair's core, this is done by setting this in the amf config file
(nia1 and nea2 at the top of the list):

    supported_integrity_algorithms:
      - "NIA2"
      - "NIA1"
      - "NIA0"
    supported_encryption_algorithms:
      - "NEA2"
      - "NEA1"
      - "NEA0"

And also put full security in the AS. This is done with this in the gnb
config file:

    security = {
      ciphering_algorithms = ( "nea2", "nea0" );
      integrity_algorithms = ( "nia2", "nia1", "nia0" );
      drb_ciphering = "yes";
      drb_integrity = "yes"
    };

Ideally we should test this with both openair UE and cots UE. But as a
strict minimum do for openair UE (this is where the bug was).

No need to do much traffic, a few ping is enough. But if you want to
check throughput with full security, why not.
2025-07-02 18:42:36 +02:00
Robert Schmidt
17cba00d17 Merge remote-tracking branch 'origin/fix_ntn_ul_retransmission' into integration_2025_w27 (!3508)
gNB: fix NTN UL retransmissions

Re-add to consider the cellSpecificKoffset_r17 for UL retransmissions.
This got lost in commit c8387d70
2025-07-02 18:42:05 +02:00
Robert Schmidt
75be2a1a59 When freeing UE contexts, check in both possible lists 2025-07-02 17:42:00 +02:00
Thomas Schlichter
5fb72906f3 gNB: fix NTN UL retransmissions
Re-add to consider the cellSpecificKoffset_r17 for UL retransmissions.
This got lost in commit c8387d706c
2025-07-01 07:48:21 +00:00
Robert Schmidt
786c9f26d5 Remove ctest option --output-on-failure in CI
Remove this option: some tests produce an excessive amount of output on
failure (e.g., googletest/benchmark). This seems to overwhelm the Python
CI code. Suppress this output, because we can always manually run this
test. A high-level "this test is ok/nok" should be fine for the CI.
2025-07-01 09:00:00 +02:00
Robert Schmidt
75f24c1e4a Merge remote-tracking branch 'origin/csi_report_siso' into integration_2025_w27 (!3499)
NR UE: enable CSI report for SISO case

Correct precoded_sinr_dB wrongly set to 0 for SISO case, also correct
ri_restriction is 0 when calculating CQI bit length for SISO.
2025-07-01 08:59:05 +02:00
Robert Schmidt
8dc12a0b35 Merge remote-tracking branch 'origin/gnb-mac-stats-cleanup' into integration_2025_w27 (!3497)
Update/refine gNB MAC stats, update L1

Only applicable with -q option.

Print a number of statistics, e.g., rx_ulsch_sdu to track UL MAC stats
timing. Remove unused time_meas_t definitions, and fix the name for the
total gNB scheduler time.

Print the RU stats in nrL1_stats.log, as some are already there, and do
not "pollute" the periodic logs when -q is enabled.

I used this to see why there are sometimes late slots with Aerial. I
used the above stats to get a general overview. This additional patch
shows that at least in RFsim, the RLC indication in rx ulsch sdu can
take up to 20us on my machine. Given that we can have multiple PDUs in
UL (10?), this can amount to a sizeable amount of time. While this is
for another MR, I thought the cleanup would be nice to have.
2025-07-01 08:58:39 +02:00
Robert Schmidt
ad1e9237d1 Merge remote-tracking branch 'origin/common_functions_to_genrate_fapi' into integration_2025_w27 (!3475)
Use of common functions to prepare FAPI PDUs at gNB MAC
2025-07-01 08:58:16 +02:00
Robert Schmidt
5d04408f5c Incorporate ru_stats_thread() stats into nrL1_stats.log
Do not pollute periodic output, and rather print those into
nrL1_stats.log. A number of them are already there anyway, so transfer
the rest. Note: ru->ifdevice.tx_fhaul is omitted, as we don't have any
IF5 split in 5G.
2025-07-01 08:54:25 +02:00
Robert Schmidt
e9a7fd475d Merge remote-tracking branch 'origin/fix_ul_tbslbrm' into integration_2025_wk26 (!3502)
bugfix for UL TBSLBRM
2025-06-30 18:40:38 +02:00
Robert Schmidt
36da6be4ab Merge remote-tracking branch 'origin/f1-refactor-ue-context' into integration_2025_wk26 (!3488)
Refactor F1 UE context messages, add unit tests

Add encoder+decoder+util functions for F1 UE context messages, and use
them in the stack. The overall goal is to unit test encoder+decoder (to
be sure that what we send is what we receive), and remove any memory
leaks related to F1 handling. Messages that have a unit test:

- F1 UE context setup request/response
- F1 UE context modification request/response
- F1 UE context release request/command/complete

This MR removes almost all remaining memory leaks that are observable in
a "standard" configuration, running SISO in RFsim. In RFsim (without
channel modelling), there are only two memory leaks shown in asan, one
in L1, and one in NGAP.
2025-06-30 18:40:02 +02:00
Robert Schmidt
66bc4deecb Merge remote-tracking branch 'origin/fix_ntn_reestablishment' into integration_2025_wk26 (!3360)
NR UE: fix reestablishment for NTN

With these changes in place we should extend the NTN/GEO rfsim CI test
to include reestablishment, too.
2025-06-30 18:39:40 +02:00
Robert Schmidt
0e9f9b92d2 Merge remote-tracking branch 'origin/docker-speedup' into integration_2025_wk26 (!3349)
Speed up docker deployment in CI

- Using docker compose up --wait instead of a custom healthcheck script:
  from: https://docs.docker.com/reference/cli/docker/compose/up/

  --wait          Wait for services to be running|healthy. Implies detached mode.
  --wait-timeout  Maximum duration in seconds to wait for the project to be running|healthy

- Speeding up the healthchecks by reducing the interval from 1-10s to
  0.5s during start period

  start_period creates a special period after the start of the container
  where the healthcheck is executed every start_interval . During this
  time the failures do not count towards the retries counter, but
  successes change the status to healthy. This allows container to reach
  healthy status much sooner.

- Using init: true to speed up docker compose down/stop

  `init: true` initializes the docker container with tini or
  alternative: tini is used to collect all the processes and correctly
  pass the termination signal to them. This allows the docker container
  to be stopped without waiting 10 seconds to kill the container

- Smallest example of this is:

    services:
      test-init:
        image: ubuntu:jammy
        command: sleep 10d
2025-06-30 18:38:02 +02:00
francescomani
a9dc588921 common function to generate FAPI DCI PDU 2025-06-30 15:13:32 +02:00
francescomani
11711c4b7b common function to generate FAPI DL DCI payload 2025-06-30 15:10:17 +02:00
francescomani
dd281eba0f common function to generate FAPI PUSCH payload 2025-06-30 14:53:19 +02:00
francescomani
bd4cc0d60b extending the scope of NR_pusch_dmrs_t 2025-06-30 14:53:19 +02:00
francescomani
266f6fcebe using sched_pusch also in RA functions and other improvements 2025-06-30 14:53:19 +02:00
francescomani
548d6ec3a1 include BWP info in sched_pdsch and use also for RA and BCH 2025-06-30 14:53:19 +02:00
francescomani
e64516d222 common function to generate FAPI PDSCH payload 2025-06-30 14:53:19 +02:00
francescomani
1eebd70cf3 use sched_pdsch in RA DL functions 2025-06-30 14:53:19 +02:00
francescomani
3b6b6e018d improve PDSCH DMRS structure with additional information 2025-06-30 14:53:19 +02:00
francescomani
ed303aa4d3 extend the use of sched_pdsch in SIB functions 2025-06-30 14:53:19 +02:00
francescomani
b238c196ea take into account no UE case for get_pdsch_bwp_start_size 2025-06-30 14:53:19 +02:00
francescomani
d868e2d7cc DLSCH RB extraction bugfix: check DMRS bitmap only in DMRS symbols 2025-06-30 14:50:43 +02:00
Laurent THOMAS
0523bcfbde fix gNB that should always perform tx in case of rfsim (like continuous-tx 2025-06-30 10:21:02 +02:00
Laurent THOMAS
1540ca3ae5 fix bug in rfsim->nb_cnx for client side. it has no usage except a cpu optimisation in case one single rfsim socket and SISO case 2025-06-30 09:06:28 +02:00
Laurent THOMAS
f7598bf528 clarify first transmission to client, split process_recv in 2 functions 2025-06-30 09:06:28 +02:00
Laurent THOMAS
68857114a6 split rfsimulator too long function in smaller ones. Clean code for bad "UE" instead of rfsim client/server. Simplify logic 2025-06-30 09:06:28 +02:00
Laurent THOMAS
b9c066329e trace in 4G RAR processing to debug ci result 2025-06-30 09:06:28 +02:00
Laurent THOMAS
98e6d60337 RF simulator: Fix concurrency issues during new client connections
Fix concurrency issues happening when a new client connects, sometimes
leading to a total softmodem deadlock.

Key changes:
- Fix sample sending on new client connection: send the first
  sample only to the newly connected client.
- Remove the --rfsimulator.hanging-workaround option
- Replace global nb_ue and Sockmutex with nb_cnx and Sockmutex
  in rfsimulator_state_t for better concurrency and clarity.
2025-06-30 09:06:28 +02:00
Robert Schmidt
43e87b669d cg_config_info_from_ue_cap_file(): avoid potential memory leaks
Avoid potential memory leaks by first reading UE capabilities file (if
present), and allocating only after the file read was successful.
2025-06-28 12:19:58 +02:00
Robert Schmidt
e33711cffa Allocate twice to avoid double free
We use the same resource for CSI meas report and RSRP (judging by the
name of the functions), but the memory allocations need to be separate
to avoid a double free:

    ==2063066==ERROR: AddressSanitizer: heap-use-after-free on address 0x7c27d43e3ce8 at pc 0x000000fcd279 bp 0x7be7cc9e7120 sp 0x7be7cc9e7118
    READ of size 8 at 0x7c27d43e3ce8 thread T6
        #0 0x000000fcd278 in SEQUENCE_free /home/richie/w/f1-refactor-ue-context/build/openair2/RRC/LTE/MESSAGES/constr_SEQUENCE.c:97
        #1 0x000000fcd278 in SEQUENCE_free /home/richie/w/f1-refactor-ue-context/build/openair2/RRC/LTE/MESSAGES/constr_SEQUENCE.c:69
        #2 0x000000fd6249 in SET_OF_free /home/richie/w/f1-refactor-ue-context/build/openair2/RRC/LTE/MESSAGES/constr_SET_OF.c:236
        #3 0x000000fd6249 in SET_OF_free /home/richie/w/f1-refactor-ue-context/build/openair2/RRC/LTE/MESSAGES/constr_SET_OF.c:220
        #4 0x000000fcd103 in SEQUENCE_free /home/richie/w/f1-refactor-ue-context/build/openair2/RRC/LTE/MESSAGES/constr_SEQUENCE.c:91
        #5 0x000000fcd103 in SEQUENCE_free /home/richie/w/f1-refactor-ue-context/build/openair2/RRC/LTE/MESSAGES/constr_SEQUENCE.c:69
        #6 0x000000fc90c9 in CHOICE_free /home/richie/w/f1-refactor-ue-context/build/openair2/RRC/LTE/MESSAGES/constr_CHOICE.c:185
        #7 0x000000fc90c9 in CHOICE_free /home/richie/w/f1-refactor-ue-context/build/openair2/RRC/LTE/MESSAGES/constr_CHOICE.c:158
        #8 0x000000fcd103 in SEQUENCE_free /home/richie/w/f1-refactor-ue-context/build/openair2/RRC/LTE/MESSAGES/constr_SEQUENCE.c:91
        #9 0x000000fcd103 in SEQUENCE_free /home/richie/w/f1-refactor-ue-context/build/openair2/RRC/LTE/MESSAGES/constr_SEQUENCE.c:69
        #10 0x000000fd6249 in SET_OF_free /home/richie/w/f1-refactor-ue-context/build/openair2/RRC/LTE/MESSAGES/constr_SET_OF.c:236
        #11 0x000000fd6249 in SET_OF_free /home/richie/w/f1-refactor-ue-context/build/openair2/RRC/LTE/MESSAGES/constr_SET_OF.c:220
        #12 0x000000fcd01a in SEQUENCE_free /home/richie/w/f1-refactor-ue-context/build/openair2/RRC/LTE/MESSAGES/constr_SEQUENCE.c:88
        #13 0x000000fcd01a in SEQUENCE_free /home/richie/w/f1-refactor-ue-context/build/openair2/RRC/LTE/MESSAGES/constr_SEQUENCE.c:69
        #14 0x000000fc90c9 in CHOICE_free /home/richie/w/f1-refactor-ue-context/build/openair2/RRC/LTE/MESSAGES/constr_CHOICE.c:185
        #15 0x000000fc90c9 in CHOICE_free /home/richie/w/f1-refactor-ue-context/build/openair2/RRC/LTE/MESSAGES/constr_CHOICE.c:158
        #16 0x000000fcd01a in SEQUENCE_free /home/richie/w/f1-refactor-ue-context/build/openair2/RRC/LTE/MESSAGES/constr_SEQUENCE.c:88
        #17 0x000000fcd01a in SEQUENCE_free /home/richie/w/f1-refactor-ue-context/build/openair2/RRC/LTE/MESSAGES/constr_SEQUENCE.c:69
        #18 0x000000fcd01a in SEQUENCE_free /home/richie/w/f1-refactor-ue-context/build/openair2/RRC/LTE/MESSAGES/constr_SEQUENCE.c:88
        #19 0x000000fcd01a in SEQUENCE_free /home/richie/w/f1-refactor-ue-context/build/openair2/RRC/LTE/MESSAGES/constr_SEQUENCE.c:69
        #20 0x000000fcd01a in SEQUENCE_free /home/richie/w/f1-refactor-ue-context/build/openair2/RRC/LTE/MESSAGES/constr_SEQUENCE.c:88
        #21 0x000000fcd01a in SEQUENCE_free /home/richie/w/f1-refactor-ue-context/build/openair2/RRC/LTE/MESSAGES/constr_SEQUENCE.c:69
        #22 0x0000009d78ae in ue_context_setup_request /home/richie/w/f1-refactor-ue-context/openair2/LAYER2/NR_MAC_gNB/mac_rrc_dl_handler.c:692
        #23 0x00000083fee2 in rrc_add_nsa_user /home/richie/w/f1-refactor-ue-context/openair2/RRC/NR/rrc_gNB_nsa.c:330
        #24 0x000000886e8b in rrc_gNB_process_f1_setup_req /home/richie/w/f1-refactor-ue-context/openair2/RRC/NR/rrc_gNB_du.c:444
        #25 0x000000833942 in rrc_gnb_task /home/richie/w/f1-refactor-ue-context/openair2/RRC/NR/rrc_gNB.c:2766
        #26 0x7fe7d5e28ee5 in asan_thread_start(void*) (/lib64/libasan.so.8+0x28ee5) (BuildId: 7f1aa7e2e600e8c9d54ce6e3d36f3d31bfe7949a)
        #27 0x7fe7d527f1d3 in start_thread (/lib64/libc.so.6+0x711d3) (BuildId: 2b3c02fe7e4d3811767175b6f323692a10a4e116)
        #28 0x7fe7d5301ceb in __GI___clone3 (/lib64/libc.so.6+0xf3ceb) (BuildId: 2b3c02fe7e4d3811767175b6f323692a10a4e116)

    0x7c27d43e3ce8 is located 24 bytes inside of 40-byte region [0x7c27d43e3cd0,0x7c27d43e3cf8)
    freed by thread T6 here:
        #0 0x7fe7d5ee5bcb in free.part.0 (/lib64/libasan.so.8+0xe5bcb) (BuildId: 7f1aa7e2e600e8c9d54ce6e3d36f3d31bfe7949a)
        #1 0x000000fd6249 in SET_OF_free /home/richie/w/f1-refactor-ue-context/build/openair2/RRC/LTE/MESSAGES/constr_SET_OF.c:236
        #2 0x000000fd6249 in SET_OF_free /home/richie/w/f1-refactor-ue-context/build/openair2/RRC/LTE/MESSAGES/constr_SET_OF.c:220
        #3 0x000000fcd103 in SEQUENCE_free /home/richie/w/f1-refactor-ue-context/build/openair2/RRC/LTE/MESSAGES/constr_SEQUENCE.c:91
        #4 0x000000fcd103 in SEQUENCE_free /home/richie/w/f1-refactor-ue-context/build/openair2/RRC/LTE/MESSAGES/constr_SEQUENCE.c:69
        #5 0x000000fc90c9 in CHOICE_free /home/richie/w/f1-refactor-ue-context/build/openair2/RRC/LTE/MESSAGES/constr_CHOICE.c:185
        #6 0x000000fc90c9 in CHOICE_free /home/richie/w/f1-refactor-ue-context/build/openair2/RRC/LTE/MESSAGES/constr_CHOICE.c:158
        #7 0x000000fcd103 in SEQUENCE_free /home/richie/w/f1-refactor-ue-context/build/openair2/RRC/LTE/MESSAGES/constr_SEQUENCE.c:91
        #8 0x000000fcd103 in SEQUENCE_free /home/richie/w/f1-refactor-ue-context/build/openair2/RRC/LTE/MESSAGES/constr_SEQUENCE.c:69
        #9 0x000000fd6249 in SET_OF_free /home/richie/w/f1-refactor-ue-context/build/openair2/RRC/LTE/MESSAGES/constr_SET_OF.c:236
        #10 0x000000fd6249 in SET_OF_free /home/richie/w/f1-refactor-ue-context/build/openair2/RRC/LTE/MESSAGES/constr_SET_OF.c:220
        #11 0x000000fcd01a in SEQUENCE_free /home/richie/w/f1-refactor-ue-context/build/openair2/RRC/LTE/MESSAGES/constr_SEQUENCE.c:88
        #12 0x000000fcd01a in SEQUENCE_free /home/richie/w/f1-refactor-ue-context/build/openair2/RRC/LTE/MESSAGES/constr_SEQUENCE.c:69
        #13 0x000000fc90c9 in CHOICE_free /home/richie/w/f1-refactor-ue-context/build/openair2/RRC/LTE/MESSAGES/constr_CHOICE.c:185
        #14 0x000000fc90c9 in CHOICE_free /home/richie/w/f1-refactor-ue-context/build/openair2/RRC/LTE/MESSAGES/constr_CHOICE.c:158
        #15 0x000000fcd01a in SEQUENCE_free /home/richie/w/f1-refactor-ue-context/build/openair2/RRC/LTE/MESSAGES/constr_SEQUENCE.c:88
        #16 0x000000fcd01a in SEQUENCE_free /home/richie/w/f1-refactor-ue-context/build/openair2/RRC/LTE/MESSAGES/constr_SEQUENCE.c:69
        #17 0x000000fcd01a in SEQUENCE_free /home/richie/w/f1-refactor-ue-context/build/openair2/RRC/LTE/MESSAGES/constr_SEQUENCE.c:88
        #18 0x000000fcd01a in SEQUENCE_free /home/richie/w/f1-refactor-ue-context/build/openair2/RRC/LTE/MESSAGES/constr_SEQUENCE.c:69
        #19 0x000000fcd01a in SEQUENCE_free /home/richie/w/f1-refactor-ue-context/build/openair2/RRC/LTE/MESSAGES/constr_SEQUENCE.c:88
        #20 0x000000fcd01a in SEQUENCE_free /home/richie/w/f1-refactor-ue-context/build/openair2/RRC/LTE/MESSAGES/constr_SEQUENCE.c:69
        #21 0x0000009d78ae in ue_context_setup_request /home/richie/w/f1-refactor-ue-context/openair2/LAYER2/NR_MAC_gNB/mac_rrc_dl_handler.c:692
        #22 0x00000083fee2 in rrc_add_nsa_user /home/richie/w/f1-refactor-ue-context/openair2/RRC/NR/rrc_gNB_nsa.c:330
        #23 0x000000886e8b in rrc_gNB_process_f1_setup_req /home/richie/w/f1-refactor-ue-context/openair2/RRC/NR/rrc_gNB_du.c:444
        #24 0x000000833942 in rrc_gnb_task /home/richie/w/f1-refactor-ue-context/openair2/RRC/NR/rrc_gNB.c:2766
        #25 0x7fe7d5e28ee5 in asan_thread_start(void*) (/lib64/libasan.so.8+0x28ee5) (BuildId: 7f1aa7e2e600e8c9d54ce6e3d36f3d31bfe7949a)

    previously allocated by thread T6 here:
        #0 0x7fe7d5ee6883 in calloc (/lib64/libasan.so.8+0xe6883) (BuildId: 7f1aa7e2e600e8c9d54ce6e3d36f3d31bfe7949a)
        #1 0x000000a1ac53 in get_default_secondaryCellGroup /home/richie/w/f1-refactor-ue-context/openair2/LAYER2/NR_MAC_gNB/nr_radio_config.c:3969
        #2 0x0000009d8913 in create_new_UE /home/richie/w/f1-refactor-ue-context/openair2/LAYER2/NR_MAC_gNB/mac_rrc_dl_handler.c:571
        #3 0x0000009d8913 in ue_context_setup_request /home/richie/w/f1-refactor-ue-context/openair2/LAYER2/NR_MAC_gNB/mac_rrc_dl_handler.c:638
        #4 0x00000083fee2 in rrc_add_nsa_user /home/richie/w/f1-refactor-ue-context/openair2/RRC/NR/rrc_gNB_nsa.c:330
        #5 0x000000886e8b in rrc_gNB_process_f1_setup_req /home/richie/w/f1-refactor-ue-context/openair2/RRC/NR/rrc_gNB_du.c:444
        #6 0x000000833942 in rrc_gnb_task /home/richie/w/f1-refactor-ue-context/openair2/RRC/NR/rrc_gNB.c:2766
        #7 0x7fe7d5e28ee5 in asan_thread_start(void*) (/lib64/libasan.so.8+0x28ee5) (BuildId: 7f1aa7e2e600e8c9d54ce6e3d36f3d31bfe7949a)

    Thread T6 created by T0 here:
        #0 0x7fe7d5ede492 in pthread_create (/lib64/libasan.so.8+0xde492) (BuildId: 7f1aa7e2e600e8c9d54ce6e3d36f3d31bfe7949a)
        #1 0x0000012a4ba3 in threadCreate /home/richie/w/f1-refactor-ue-context/common/utils/system.c:283
        #2 0x0000006b5fef in itti_create_task /home/richie/w/f1-refactor-ue-context/common/utils/ocp_itti/intertask_interface.cpp:317
        #3 0x000000435c5f in create_gNB_tasks /home/richie/w/f1-refactor-ue-context/executables/nr-softmodem.c:310
        #4 0x000000435c5f in main /home/richie/w/f1-refactor-ue-context/executables/nr-softmodem.c:620
        #5 0x7fe7d52115f4 in __libc_start_call_main (/lib64/libc.so.6+0x35f4) (BuildId: 2b3c02fe7e4d3811767175b6f323692a10a4e116)
        #6 0x7fe7d52116a7 in __libc_start_main@@GLIBC_2.34 (/lib64/libc.so.6+0x36a7) (BuildId: 2b3c02fe7e4d3811767175b6f323692a10a4e116)
        #7 0x0000004672d4 in _start (/home/richie/w/f1-refactor-ue-context/build/nr-softmodem+0x4672d4) (BuildId: 81450e9a0b832ca9e36b1984ecc232efde59d424)

Closes: #958
2025-06-28 12:19:58 +02:00
Robert Schmidt
5766d7ff51 Debug core images: mount sources to right directory 2025-06-28 12:19:58 +02:00
Robert Schmidt
bd5380ed09 Make UE capabilities const: is read-only 2025-06-28 12:19:58 +02:00
Robert Schmidt
6cf7fc2bb2 Fix memory leak in nr_rrc_f1_ho_acknowledge()
Direct leak of 512 byte(s) in 1 object(s) allocated from:
        #0 0x7f37634e5e2b in realloc.part.0 (/lib64/libasan.so.8+0xe5e2b) (BuildId: 7f1aa7e2e600e8c9d54ce6e3d36f3d31bfe7949a)
        #1 0x000000fbb9ad in encode_dyn_cb /home/richie/w/f1-refactor-ue-context/build/openair2/RRC/LTE/MESSAGES/per_encoder.c:23
        #2 0x000000fc279e in asn_put_few_bits /home/richie/w/f1-refactor-ue-context/build/openair2/RRC/LTE/MESSAGES/asn_bit_data.c:220
        #3 0x000000fc279e in asn_put_few_bits /home/richie/w/f1-refactor-ue-context/build/openair2/RRC/LTE/MESSAGES/asn_bit_data.c:192
        #4 0x000000fc2ce5 in asn_put_many_bits /home/richie/w/f1-refactor-ue-context/build/openair2/RRC/LTE/MESSAGES/asn_bit_data.c:293
        #5 0x000000fb8c33 in OCTET_STRING_encode_uper /home/richie/w/f1-refactor-ue-context/build/openair2/RRC/LTE/MESSAGES/OCTET_STRING_uper.c:306
        #6 0x000000fd191a in SEQUENCE_encode_uper /home/richie/w/f1-refactor-ue-context/build/openair2/RRC/LTE/MESSAGES/constr_SEQUENCE_uper.c:403
        #7 0x000000fd191a in SEQUENCE_encode_uper /home/richie/w/f1-refactor-ue-context/build/openair2/RRC/LTE/MESSAGES/constr_SEQUENCE_uper.c:403
        #8 0x000000fcb140 in CHOICE_encode_uper /home/richie/w/f1-refactor-ue-context/build/openair2/RRC/LTE/MESSAGES/constr_CHOICE_uper.c:177
        #9 0x000000fd191a in SEQUENCE_encode_uper /home/richie/w/f1-refactor-ue-context/build/openair2/RRC/LTE/MESSAGES/constr_SEQUENCE_uper.c:403
        #10 0x000000fcb140 in CHOICE_encode_uper /home/richie/w/f1-refactor-ue-context/build/openair2/RRC/LTE/MESSAGES/constr_CHOICE_uper.c:177
        #11 0x000000fcb140 in CHOICE_encode_uper /home/richie/w/f1-refactor-ue-context/build/openair2/RRC/LTE/MESSAGES/constr_CHOICE_uper.c:177
        #12 0x000000fd191a in SEQUENCE_encode_uper /home/richie/w/f1-refactor-ue-context/build/openair2/RRC/LTE/MESSAGES/constr_SEQUENCE_uper.c:403
        #13 0x000000fbc1ed in uper_encode /home/richie/w/f1-refactor-ue-context/build/openair2/RRC/LTE/MESSAGES/uper_encoder.c:27
        #14 0x000000fbc73a in uper_encode_to_new_buffer /home/richie/w/f1-refactor-ue-context/build/openair2/RRC/LTE/MESSAGES/uper_encoder.c:85
        #15 0x000000e10fbd in do_RRCReconfiguration /home/richie/w/f1-refactor-ue-context/openair2/RRC/NR/MESSAGES/asn1_msg.c:586
        #16 0x000000805712 in rrc_gNB_encode_RRCReconfiguration /home/richie/w/f1-refactor-ue-context/openair2/RRC/NR/rrc_gNB.c:652
        #17 0x000000893860 in nr_rrc_f1_ho_acknowledge /home/richie/w/f1-refactor-ue-context/openair2/RRC/NR/rrc_gNB_mobility.c:280
        #18 0x0000008079ac in rrc_CU_process_ue_context_setup_response /home/richie/w/f1-refactor-ue-context/openair2/RRC/NR/rrc_gNB.c:2139
        #19 0x0000008330d8 in rrc_gnb_task /home/richie/w/f1-refactor-ue-context/openair2/RRC/NR/rrc_gNB.c:2771
        #20 0x7f3763428ee5 in asan_thread_start(void*) (/lib64/libasan.so.8+0x28ee5) (BuildId: 7f1aa7e2e600e8c9d54ce6e3d36f3d31bfe7949a)
2025-06-28 12:19:58 +02:00
Robert Schmidt
f26cef9cbe Add invariant check to help debug
During refactoring, I had asan errors in the next line. It took me some
time to figure out that a DRB ID 0 is not valid (cf.
get_next_available_drb_id() and get_drb(), they enforce this).
2025-06-28 12:19:58 +02:00
Robert Schmidt
c3bb7dfd04 Fix memory leak in ue_context_setup_request()
Direct leak of 64 byte(s) in 1 object(s) allocated from:
        #0 0x7fc885ae6883 in calloc (/lib64/libasan.so.8+0xe6883) (BuildId: 7f1aa7e2e600e8c9d54ce6e3d36f3d31bfe7949a)
        #1 0x000000fd0ac9 in SEQUENCE_decode_uper /home/richie/w/f1-refactor-ue-context/build/openair2/RRC/LTE/MESSAGES/constr_SEQUENCE_uper.c:37
        #2 0x000000fbba1c in uper_decode /home/richie/w/f1-refactor-ue-context/build/openair2/RRC/LTE/MESSAGES/uper_decoder.c:83
        #3 0x000000fbbbf9 in uper_decode_complete /home/richie/w/f1-refactor-ue-context/build/openair2/RRC/LTE/MESSAGES/uper_decoder.c:16
        #4 0x0000009d65ce in get_cg_config_info /home/richie/w/f1-refactor-ue-context/openair2/LAYER2/NR_MAC_gNB/mac_rrc_dl_handler.c:485
        #5 0x0000009d65ce in ue_context_setup_request /home/richie/w/f1-refactor-ue-context/openair2/LAYER2/NR_MAC_gNB/mac_rrc_dl_handler.c:619
        #6 0x00000083fea2 in rrc_add_nsa_user /home/richie/w/f1-refactor-ue-context/openair2/RRC/NR/rrc_gNB_nsa.c:330
        #7 0x000000886c8b in rrc_gNB_process_f1_setup_req /home/richie/w/f1-refactor-ue-context/openair2/RRC/NR/rrc_gNB_du.c:444
        #8 0x000000833902 in rrc_gnb_task /home/richie/w/f1-refactor-ue-context/openair2/RRC/NR/rrc_gNB.c:2766
        #9 0x7fc885a28ee5 in asan_thread_start(void*) (/lib64/libasan.so.8+0x28ee5) (BuildId: 7f1aa7e2e600e8c9d54ce6e3d36f3d31bfe7949a)
    Indirect leak of 128 byte(s) in 1 object(s) allocated from:
        #0 0x7fc885ae6883 in calloc (/lib64/libasan.so.8+0xe6883) (BuildId: 7f1aa7e2e600e8c9d54ce6e3d36f3d31bfe7949a)
        #1 0x000000fd0ac9 in SEQUENCE_decode_uper /home/richie/w/f1-refactor-ue-context/build/openair2/RRC/LTE/MESSAGES/constr_SEQUENCE_uper.c:37
        #2 0x000000fca638 in CHOICE_decode_uper /home/richie/w/f1-refactor-ue-context/build/openair2/RRC/LTE/MESSAGES/constr_CHOICE_uper.c:84
        #3 0x000000fca638 in CHOICE_decode_uper /home/richie/w/f1-refactor-ue-context/build/openair2/RRC/LTE/MESSAGES/constr_CHOICE_uper.c:84
        #4 0x000000fd058e in SEQUENCE_decode_uper /home/richie/w/f1-refactor-ue-context/build/openair2/RRC/LTE/MESSAGES/constr_SEQUENCE_uper.c:118
        #5 0x000000fbba1c in uper_decode /home/richie/w/f1-refactor-ue-context/build/openair2/RRC/LTE/MESSAGES/uper_decoder.c:83
        #6 0x000000fbbbf9 in uper_decode_complete /home/richie/w/f1-refactor-ue-context/build/openair2/RRC/LTE/MESSAGES/uper_decoder.c:16
        #7 0x0000009d65ce in get_cg_config_info /home/richie/w/f1-refactor-ue-context/openair2/LAYER2/NR_MAC_gNB/mac_rrc_dl_handler.c:485
        #8 0x0000009d65ce in ue_context_setup_request /home/richie/w/f1-refactor-ue-context/openair2/LAYER2/NR_MAC_gNB/mac_rrc_dl_handler.c:619
        #9 0x00000083fea2 in rrc_add_nsa_user /home/richie/w/f1-refactor-ue-context/openair2/RRC/NR/rrc_gNB_nsa.c:330
        #10 0x000000886c8b in rrc_gNB_process_f1_setup_req /home/richie/w/f1-refactor-ue-context/openair2/RRC/NR/rrc_gNB_du.c:444
        #11 0x000000833902 in rrc_gnb_task /home/richie/w/f1-refactor-ue-context/openair2/RRC/NR/rrc_gNB.c:2766
        #12 0x7fc885a28ee5 in asan_thread_start(void*) (/lib64/libasan.so.8+0x28ee5) (BuildId: 7f1aa7e2e600e8c9d54ce6e3d36f3d31bfe7949a)
    Indirect leak of 40 byte(s) in 1 object(s) allocated from:
        #0 0x7fc885ae6883 in calloc (/lib64/libasan.so.8+0xe6883) (BuildId: 7f1aa7e2e600e8c9d54ce6e3d36f3d31bfe7949a)
        #1 0x000000fca7d7 in CHOICE_decode_uper /home/richie/w/f1-refactor-ue-context/build/openair2/RRC/LTE/MESSAGES/constr_CHOICE_uper.c:32
        #2 0x000000fca638 in CHOICE_decode_uper /home/richie/w/f1-refactor-ue-context/build/openair2/RRC/LTE/MESSAGES/constr_CHOICE_uper.c:84
        #3 0x000000fd058e in SEQUENCE_decode_uper /home/richie/w/f1-refactor-ue-context/build/openair2/RRC/LTE/MESSAGES/constr_SEQUENCE_uper.c:118
        #4 0x000000fbba1c in uper_decode /home/richie/w/f1-refactor-ue-context/build/openair2/RRC/LTE/MESSAGES/uper_decoder.c:83
        #5 0x000000fbbbf9 in uper_decode_complete /home/richie/w/f1-refactor-ue-context/build/openair2/RRC/LTE/MESSAGES/uper_decoder.c:16
        #6 0x0000009d65ce in get_cg_config_info /home/richie/w/f1-refactor-ue-context/openair2/LAYER2/NR_MAC_gNB/mac_rrc_dl_handler.c:485
        #7 0x0000009d65ce in ue_context_setup_request /home/richie/w/f1-refactor-ue-context/openair2/LAYER2/NR_MAC_gNB/mac_rrc_dl_handler.c:619
        #8 0x00000083fea2 in rrc_add_nsa_user /home/richie/w/f1-refactor-ue-context/openair2/RRC/NR/rrc_gNB_nsa.c:330
        #9 0x000000886c8b in rrc_gNB_process_f1_setup_req /home/richie/w/f1-refactor-ue-context/openair2/RRC/NR/rrc_gNB_du.c:444
        #10 0x000000833902 in rrc_gnb_task /home/richie/w/f1-refactor-ue-context/openair2/RRC/NR/rrc_gNB.c:2766
        #11 0x7fc885a28ee5 in asan_thread_start(void*) (/lib64/libasan.so.8+0x28ee5) (BuildId: 7f1aa7e2e600e8c9d54ce6e3d36f3d31bfe7949a)
2025-06-28 12:19:58 +02:00
Robert Schmidt
c54cbdae54 Fix memory leak in rrc_add_nsa_user_resp()
Direct leak of 72 byte(s) in 1 object(s) allocated from:
        #0 0x7f83c10e6883 in calloc (/lib64/libasan.so.8+0xe6883) (BuildId: 7f1aa7e2e600e8c9d54ce6e3d36f3d31bfe7949a)
        #1 0x000000844ec5 in rrc_add_nsa_user_resp /home/richie/w/f1-refactor-ue-context/openair2/RRC/NR/rrc_gNB_nsa.c:413
        #2 0x0000008079d1 in rrc_CU_process_ue_context_setup_response /home/richie/w/f1-refactor-ue-context/openair2/RRC/NR/rrc_gNB.c:2111
        #3 0x0000008330a8 in rrc_gnb_task /home/richie/w/f1-refactor-ue-context/openair2/RRC/NR/rrc_gNB.c:2769
        #4 0x7f83c1028ee5 in asan_thread_start(void*) (/lib64/libasan.so.8+0x28ee5) (BuildId: 7f1aa7e2e600e8c9d54ce6e3d36f3d31bfe7949a)
    Indirect leak of 40 byte(s) in 1 object(s) allocated from:
        #0 0x7f83c10e6883 in calloc (/lib64/libasan.so.8+0xe6883) (BuildId: 7f1aa7e2e600e8c9d54ce6e3d36f3d31bfe7949a)
        #1 0x000000844f9d in get_default_reconfig /home/richie/w/f1-refactor-ue-context/openair2/RRC/NR/rrc_gNB_nsa.c:343
        #2 0x000000844f9d in rrc_add_nsa_user_resp /home/richie/w/f1-refactor-ue-context/openair2/RRC/NR/rrc_gNB_nsa.c:416
        #3 0x0000008079d1 in rrc_CU_process_ue_context_setup_response /home/richie/w/f1-refactor-ue-context/openair2/RRC/NR/rrc_gNB.c:2111
        #4 0x0000008330a8 in rrc_gnb_task /home/richie/w/f1-refactor-ue-context/openair2/RRC/NR/rrc_gNB.c:2769
        #5 0x7f83c1028ee5 in asan_thread_start(void*) (/lib64/libasan.so.8+0x28ee5) (BuildId: 7f1aa7e2e600e8c9d54ce6e3d36f3d31bfe7949a)
    Indirect leak of 64 byte(s) in 1 object(s) allocated from:
        #0 0x7f83c10e6883 in calloc (/lib64/libasan.so.8+0xe6883) (BuildId: 7f1aa7e2e600e8c9d54ce6e3d36f3d31bfe7949a)
        #1 0x000000844f28 in get_default_reconfig /home/richie/w/f1-refactor-ue-context/openair2/RRC/NR/rrc_gNB_nsa.c:335
        #2 0x000000844f28 in rrc_add_nsa_user_resp /home/richie/w/f1-refactor-ue-context/openair2/RRC/NR/rrc_gNB_nsa.c:416
        #3 0x0000008079d1 in rrc_CU_process_ue_context_setup_response /home/richie/w/f1-refactor-ue-context/openair2/RRC/NR/rrc_gNB.c:2111
        #4 0x0000008330a8 in rrc_gnb_task /home/richie/w/f1-refactor-ue-context/openair2/RRC/NR/rrc_gNB.c:2769
        #5 0x7f83c1028ee5 in asan_thread_start(void*) (/lib64/libasan.so.8+0x28ee5) (BuildId: 7f1aa7e2e600e8c9d54ce6e3d36f3d31bfe7949a)
    Indirect leak of 327 byte(s) in 1 object(s) allocated from:
        #0 0x7f83c10e6f0b in malloc (/lib64/libasan.so.8+0xe6f0b) (BuildId: 7f1aa7e2e600e8c9d54ce6e3d36f3d31bfe7949a)
        #1 0x000000fb51ec in OCTET_STRING_fromBuf /home/richie/w/f1-refactor-ue-context/build/openair2/RRC/LTE/MESSAGES/OCTET_STRING.c:184
        #2 0x000000844fd3 in get_default_reconfig /home/richie/w/f1-refactor-ue-context/openair2/RRC/NR/rrc_gNB_nsa.c:344
        #3 0x000000844fd3 in rrc_add_nsa_user_resp /home/richie/w/f1-refactor-ue-context/openair2/RRC/NR/rrc_gNB_nsa.c:416
        #4 0x0000008079d1 in rrc_CU_process_ue_context_setup_response /home/richie/w/f1-refactor-ue-context/openair2/RRC/NR/rrc_gNB.c:2111
        #5 0x0000008330a8 in rrc_gnb_task /home/richie/w/f1-refactor-ue-context/openair2/RRC/NR/rrc_gNB.c:2769
        #6 0x7f83c1028ee5 in asan_thread_start(void*) (/lib64/libasan.so.8+0x28ee5) (BuildId: 7f1aa7e2e600e8c9d54ce6e3d36f3d31bfe7949a)
2025-06-28 12:19:58 +02:00
Robert Schmidt
d4ad31bd1d Correctly free E1AP context mod request
Direct leak of 48 byte(s) in 1 object(s) allocated from:
        #0 0x7fea71ee6f0b in malloc (/lib64/libasan.so.8+0xe6f0b) (BuildId: 7f1aa7e2e600e8c9d54ce6e3d36f3d31bfe7949a)
        #1 0x0000007f29c0 in malloc_or_fail /home/richie/w/f1-refactor-ue-context/common/utils/utils.h:86
        #2 0x0000007f29c0 in cuup_notify_reestablishment /home/richie/w/f1-refactor-ue-context/openair2/RRC/NR/rrc_gNB.c:872
        #3 0x000000808002 in rrc_CU_process_ue_context_setup_response /home/richie/w/f1-refactor-ue-context/openair2/RRC/NR/rrc_gNB.c:2126
        #4 0x0000008330d8 in rrc_gnb_task /home/richie/w/f1-refactor-ue-context/openair2/RRC/NR/rrc_gNB.c:2770
        #5 0x7fea71e28ee5 in asan_thread_start(void*) (/lib64/libasan.so.8+0x28ee5) (BuildId: 7f1aa7e2e600e8c9d54ce6e3d36f3d31bfe7949a)
2025-06-28 12:19:58 +02:00
Robert Schmidt
ec3ce8a387 Free at F1 Setup Response at MAC
The F1 Setup Response is stored for possible look up of information.
Free it at the end to avoid memory leaks.
2025-06-28 12:19:58 +02:00
Robert Schmidt
7c65929ece Free cell F1 Setup Request after DU disconnection
Direct leak of 72 byte(s) in 1 object(s) allocated from:
        #0 0x7fea71ee6883 in calloc (/lib64/libasan.so.8+0xe6883) (BuildId: 7f1aa7e2e600e8c9d54ce6e3d36f3d31bfe7949a)
        #1 0x000000886124 in rrc_gNB_process_f1_setup_req /home/richie/w/f1-refactor-ue-context/openair2/RRC/NR/rrc_gNB_du.c:384
        #2 0x000000833902 in rrc_gnb_task /home/richie/w/f1-refactor-ue-context/openair2/RRC/NR/rrc_gNB.c:2765
        #3 0x7fea71e28ee5 in asan_thread_start(void*) (/lib64/libasan.so.8+0x28ee5) (BuildId: 7f1aa7e2e600e8c9d54ce6e3d36f3d31bfe7949a)
    Indirect leak of 16592 byte(s) in 1 object(s) allocated from:
        #0 0x7fea71ee6883 in calloc (/lib64/libasan.so.8+0xe6883) (BuildId: 7f1aa7e2e600e8c9d54ce6e3d36f3d31bfe7949a)
        #1 0x000000886171 in rrc_gNB_process_f1_setup_req /home/richie/w/f1-refactor-ue-context/openair2/RRC/NR/rrc_gNB_du.c:391
        #2 0x000000833902 in rrc_gnb_task /home/richie/w/f1-refactor-ue-context/openair2/RRC/NR/rrc_gNB.c:2765
        #3 0x7fea71e28ee5 in asan_thread_start(void*) (/lib64/libasan.so.8+0x28ee5) (BuildId: 7f1aa7e2e600e8c9d54ce6e3d36f3d31bfe7949a)
    Indirect leak of 102 byte(s) in 1 object(s) allocated from:
        #0 0x7fea71ee6883 in calloc (/lib64/libasan.so.8+0xe6883) (BuildId: 7f1aa7e2e600e8c9d54ce6e3d36f3d31bfe7949a)
        #1 0x000000adb79a in calloc_or_fail /home/richie/w/f1-refactor-ue-context/common/utils/utils.h:74
        #2 0x000000adb79a in copy_f1ap_gnb_du_system_info /home/richie/w/f1-refactor-ue-context/openair2/F1AP/lib/f1ap_interface_management.c:933
        #3 0x000000ae60c9 in cp_f1ap_setup_request /home/richie/w/f1-refactor-ue-context/openair2/F1AP/lib/f1ap_interface_management.c:959
        #4 0x0000008861c0 in rrc_gNB_process_f1_setup_req /home/richie/w/f1-refactor-ue-context/openair2/RRC/NR/rrc_gNB_du.c:394
        #5 0x000000833902 in rrc_gnb_task /home/richie/w/f1-refactor-ue-context/openair2/RRC/NR/rrc_gNB.c:2765
        #6 0x7fea71e28ee5 in asan_thread_start(void*) (/lib64/libasan.so.8+0x28ee5) (BuildId: 7f1aa7e2e600e8c9d54ce6e3d36f3d31bfe7949a)

    Indirect leak of 32 byte(s) in 1 object(s) allocated from:
        #0 0x7fea71ee6883 in calloc (/lib64/libasan.so.8+0xe6883) (BuildId: 7f1aa7e2e600e8c9d54ce6e3d36f3d31bfe7949a)
        #1 0x000000adb667 in calloc_or_fail /home/richie/w/f1-refactor-ue-context/common/utils/utils.h:74
        #2 0x000000adb667 in copy_f1ap_gnb_du_system_info /home/richie/w/f1-refactor-ue-context/openair2/F1AP/lib/f1ap_interface_management.c:924
        #3 0x000000ae60c9 in cp_f1ap_setup_request /home/richie/w/f1-refactor-ue-context/openair2/F1AP/lib/f1ap_interface_management.c:959
        #4 0x0000008861c0 in rrc_gNB_process_f1_setup_req /home/richie/w/f1-refactor-ue-context/openair2/RRC/NR/rrc_gNB_du.c:394
        #5 0x000000833902 in rrc_gnb_task /home/richie/w/f1-refactor-ue-context/openair2/RRC/NR/rrc_gNB.c:2765
        #6 0x7fea71e28ee5 in asan_thread_start(void*) (/lib64/libasan.so.8+0x28ee5) (BuildId: 7f1aa7e2e600e8c9d54ce6e3d36f3d31bfe7949a)

    Indirect leak of 15 byte(s) in 1 object(s) allocated from:
        #0 0x7fea71ee0c80 in strdup (/lib64/libasan.so.8+0xe0c80) (BuildId: 7f1aa7e2e600e8c9d54ce6e3d36f3d31bfe7949a)
        #1 0x000000ae5f57 in cp_f1ap_setup_request /home/richie/w/f1-refactor-ue-context/openair2/F1AP/lib/f1ap_interface_management.c:950
        #2 0x0000008861c0 in rrc_gNB_process_f1_setup_req /home/richie/w/f1-refactor-ue-context/openair2/RRC/NR/rrc_gNB_du.c:394
        #3 0x000000833902 in rrc_gnb_task /home/richie/w/f1-refactor-ue-context/openair2/RRC/NR/rrc_gNB.c:2765
        #4 0x7fea71e28ee5 in asan_thread_start(void*) (/lib64/libasan.so.8+0x28ee5) (BuildId: 7f1aa7e2e600e8c9d54ce6e3d36f3d31bfe7949a)

    Indirect leak of 7 byte(s) in 1 object(s) allocated from:
        #0 0x7fea71ee6883 in calloc (/lib64/libasan.so.8+0xe6883) (BuildId: 7f1aa7e2e600e8c9d54ce6e3d36f3d31bfe7949a)
        #1 0x000000ae5c28 in calloc_or_fail /home/richie/w/f1-refactor-ue-context/common/utils/utils.h:74
        #2 0x000000ae5c28 in copy_f1ap_served_cell_info /home/richie/w/f1-refactor-ue-context/openair2/F1AP/lib/f1ap_interface_management.c:913
        #3 0x000000ae609a in cp_f1ap_setup_request /home/richie/w/f1-refactor-ue-context/openair2/F1AP/lib/f1ap_interface_management.c:957
        #4 0x0000008861c0 in rrc_gNB_process_f1_setup_req /home/richie/w/f1-refactor-ue-context/openair2/RRC/NR/rrc_gNB_du.c:394
        #5 0x000000833902 in rrc_gnb_task /home/richie/w/f1-refactor-ue-context/openair2/RRC/NR/rrc_gNB.c:2765
        #6 0x7fea71e28ee5 in asan_thread_start(void*) (/lib64/libasan.so.8+0x28ee5) (BuildId: 7f1aa7e2e600e8c9d54ce6e3d36f3d31bfe7949a)

    Indirect leak of 4 byte(s) in 1 object(s) allocated from:
        #0 0x7fea71ee6f0b in malloc (/lib64/libasan.so.8+0xe6f0b) (BuildId: 7f1aa7e2e600e8c9d54ce6e3d36f3d31bfe7949a)
        #1 0x000000ae5ae7 in malloc_or_fail /home/richie/w/f1-refactor-ue-context/common/utils/utils.h:86
        #2 0x000000ae5ae7 in copy_f1ap_served_cell_info /home/richie/w/f1-refactor-ue-context/openair2/F1AP/lib/f1ap_interface_management.c:907
        #3 0x000000ae609a in cp_f1ap_setup_request /home/richie/w/f1-refactor-ue-context/openair2/F1AP/lib/f1ap_interface_management.c:957
        #4 0x0000008861c0 in rrc_gNB_process_f1_setup_req /home/richie/w/f1-refactor-ue-context/openair2/RRC/NR/rrc_gNB_du.c:394
        #5 0x000000833902 in rrc_gnb_task /home/richie/w/f1-refactor-ue-context/openair2/RRC/NR/rrc_gNB.c:2765
        #6 0x7fea71e28ee5 in asan_thread_start(void*) (/lib64/libasan.so.8+0x28ee5) (BuildId: 7f1aa7e2e600e8c9d54ce6e3d36f3d31bfe7949a)

    Indirect leak of 3 byte(s) in 1 object(s) allocated from:
        #0 0x7fea71ee6883 in calloc (/lib64/libasan.so.8+0xe6883) (BuildId: 7f1aa7e2e600e8c9d54ce6e3d36f3d31bfe7949a)
        #1 0x000000adb713 in calloc_or_fail /home/richie/w/f1-refactor-ue-context/common/utils/utils.h:74
        #2 0x000000adb713 in copy_f1ap_gnb_du_system_info /home/richie/w/f1-refactor-ue-context/openair2/F1AP/lib/f1ap_interface_management.c:927
        #3 0x000000ae60c9 in cp_f1ap_setup_request /home/richie/w/f1-refactor-ue-context/openair2/F1AP/lib/f1ap_interface_management.c:959
        #4 0x0000008861c0 in rrc_gNB_process_f1_setup_req /home/richie/w/f1-refactor-ue-context/openair2/RRC/NR/rrc_gNB_du.c:394
        #5 0x000000833902 in rrc_gnb_task /home/richie/w/f1-refactor-ue-context/openair2/RRC/NR/rrc_gNB.c:2765
        #6 0x7fea71e28ee5 in asan_thread_start(void*) (/lib64/libasan.so.8+0x28ee5) (BuildId: 7f1aa7e2e600e8c9d54ce6e3d36f3d31bfe7949a)
2025-06-28 12:19:58 +02:00
Robert Schmidt
5b9d682fde Free F1 Setup Response after sending 2025-06-28 12:19:58 +02:00
Robert Schmidt
c6954d3f9d Free UE capabilities memory when removing UE context
Direct leak of 32 byte(s) in 1 object(s) allocated from:
        #0 0x7f672d6e5e2b in realloc.part.0 (/lib64/libasan.so.8+0xe5e2b) (BuildId: 7f1aa7e2e600e8c9d54ce6e3d36f3d31bfe7949a)
        #1 0x000000fbb4ed in encode_dyn_cb /home/richie/w/f1-refactor-ue-context/build/openair2/RRC/LTE/MESSAGES/per_encoder.c:23
        #2 0x000000fbbeeb in _uper_encode_flush_outp /home/richie/w/f1-refactor-ue-context/build/openair2/RRC/LTE/MESSAGES/uper_encoder.c:126
        #3 0x000000fbbeeb in uper_encode /home/richie/w/f1-refactor-ue-context/build/openair2/RRC/LTE/MESSAGES/uper_encoder.c:36
        #4 0x000000fbc27a in uper_encode_to_new_buffer /home/richie/w/f1-refactor-ue-context/build/openair2/RRC/LTE/MESSAGES/uper_encoder.c:85
        #5 0x00000081037c in handle_ueCapabilityInformation /home/richie/w/f1-refactor-ue-context/openair2/RRC/NR/rrc_gNB.c:1549
        #6 0x000000813ced in rrc_gNB_decode_dcch /home/richie/w/f1-refactor-ue-context/openair2/RRC/NR/rrc_gNB.c:1902
        #7 0x0000008334f2 in rrc_gnb_task /home/richie/w/f1-refactor-ue-context/openair2/RRC/NR/rrc_gNB.c:2741
        #8 0x7f672d628ee5 in asan_thread_start(void*) (/lib64/libasan.so.8+0x28ee5) (BuildId: 7f1aa7e2e600e8c9d54ce6e3d36f3d31bfe7949a)
2025-06-28 12:19:58 +02:00
Robert Schmidt
332b2644e4 Fix memory leak in cg_config_info_from_ue_cap_file()
Indirect leak of 40 byte(s) in 1 object(s) allocated from:
        #0 0x7f7b2b4e6883 in calloc (/lib64/libasan.so.8+0xe6883) (BuildId: 7f1aa7e2e600e8c9d54ce6e3d36f3d31bfe7949a)
        #1 0x00000083e6e6 in calloc_or_fail /home/richie/w/f1-refactor-ue-context/common/utils/utils.h:74
        #2 0x00000083e6e6 in cg_config_info_from_ue_cap_file /home/richie/w/f1-refactor-ue-context/openair2/RRC/NR/rrc_gNB_nsa.c:82
        #3 0x00000083e6e6 in rrc_add_nsa_user /home/richie/w/f1-refactor-ue-context/openair2/RRC/NR/rrc_gNB_nsa.c:145
        #4 0x000000886bcb in rrc_gNB_process_f1_setup_req /home/richie/w/f1-refactor-ue-context/openair2/RRC/NR/rrc_gNB_du.c:444
        #5 0x000000833902 in rrc_gnb_task /home/richie/w/f1-refactor-ue-context/openair2/RRC/NR/rrc_gNB.c:2766
        #6 0x7f7b2b428ee5 in asan_thread_start(void*) (/lib64/libasan.so.8+0x28ee5) (BuildId: 7f1aa7e2e600e8c9d54ce6e3d36f3d31bfe7949a)

    Indirect leak of 128 byte(s) in 1 object(s) allocated from:
        #0 0x7f7b2b4e6883 in calloc (/lib64/libasan.so.8+0xe6883) (BuildId: 7f1aa7e2e600e8c9d54ce6e3d36f3d31bfe7949a)
        #1 0x00000083e745 in calloc_or_fail /home/richie/w/f1-refactor-ue-context/common/utils/utils.h:74
        #2 0x00000083e745 in cg_config_info_from_ue_cap_file /home/richie/w/f1-refactor-ue-context/openair2/RRC/NR/rrc_gNB_nsa.c:84
        #3 0x00000083e745 in rrc_add_nsa_user /home/richie/w/f1-refactor-ue-context/openair2/RRC/NR/rrc_gNB_nsa.c:145
        #4 0x000000886bcb in rrc_gNB_process_f1_setup_req /home/richie/w/f1-refactor-ue-context/openair2/RRC/NR/rrc_gNB_du.c:444
        #5 0x000000833902 in rrc_gnb_task /home/richie/w/f1-refactor-ue-context/openair2/RRC/NR/rrc_gNB.c:2766
        #6 0x7f7b2b428ee5 in asan_thread_start(void*) (/lib64/libasan.so.8+0x28ee5) (BuildId: 7f1aa7e2e600e8c9d54ce6e3d36f3d31bfe7949a)

    Direct leak of 64 byte(s) in 1 object(s) allocated from:
        #0 0x7f7b2b4e6883 in calloc (/lib64/libasan.so.8+0xe6883) (BuildId: 7f1aa7e2e600e8c9d54ce6e3d36f3d31bfe7949a)
        #1 0x00000083e6a5 in calloc_or_fail /home/richie/w/f1-refactor-ue-context/common/utils/utils.h:74
        #2 0x00000083e6a5 in cg_config_info_from_ue_cap_file /home/richie/w/f1-refactor-ue-context/openair2/RRC/NR/rrc_gNB_nsa.c:80
        #3 0x00000083e6a5 in rrc_add_nsa_user /home/richie/w/f1-refactor-ue-context/openair2/RRC/NR/rrc_gNB_nsa.c:145
        #4 0x000000886bcb in rrc_gNB_process_f1_setup_req /home/richie/w/f1-refactor-ue-context/openair2/RRC/NR/rrc_gNB_du.c:444
        #5 0x000000833902 in rrc_gnb_task /home/richie/w/f1-refactor-ue-context/openair2/RRC/NR/rrc_gNB.c:2766
        #6 0x7f7b2b428ee5 in asan_thread_start(void*) (/lib64/libasan.so.8+0x28ee5) (BuildId: 7f1aa7e2e600e8c9d54ce6e3d36f3d31bfe7949a)
2025-06-28 12:19:58 +02:00
Robert Schmidt
1a2aa1266c Remove more unused types 2025-06-28 12:19:58 +02:00
Robert Schmidt
abb3eff285 Use F1 UE context Release Complete in stack
Use the new type and remove the old one.
2025-06-28 12:19:58 +02:00
Robert Schmidt
bbb6b3f7ad Add F1AP UE context release complete message enc/dec + test
See commit "Add F1AP UE context setup request message enc/dec + test"
for more details on the approach taken.
2025-06-28 12:19:58 +02:00
Robert Schmidt
e3b8121035 Use F1 UE Context Release Command in stack
Use the new type and remove the old one.
2025-06-28 12:19:58 +02:00
Robert Schmidt
ec7a7973fb Add F1AP UE context release command message enc/dec + test
See commit "Add F1AP UE context setup request message enc/dec + test"
for more details on the approach taken.
2025-06-28 12:19:58 +02:00
Robert Schmidt
f7d747164d Use F1 UE context Release Request in stack
Switch to the new type, remove the old one.
2025-06-28 12:19:58 +02:00
Robert Schmidt
d13c94457a Add F1AP UE context release request message enc/dec + test
See commit "Add F1AP UE context setup request message enc/dec + test"
for more details on the approach taken.
2025-06-28 12:19:57 +02:00
Robert Schmidt
4d08801e9a Refactor: use malloc to avoid mem leaks
Move the filling of DRBs to set up for UE context setup/modification
request into the corresponding functions, and use malloc() deliberately
to avoid memory leaks. In fact fill_drb_to_be_setup_from_e1_resp()
allocates memory dynamically (and has to do that), so the easiest is to
do the same for DRBs. The most straight-forward way seems to be to then
dynamically allocate all memory for F1 UE context setup/modification
request messages, and free with the corresponding free functions,
which removes a couple of memory leaks.
2025-06-28 12:19:57 +02:00
Robert Schmidt
04b5e1d7da Use F1 UE context setup/mod Response in stack
Similarly to the commit "Use F1 UE context setup/modif Request in
stack", we do both UE context setup/modification response at once
because of some functions that are shared by the MAC message handler.
2025-06-28 12:19:57 +02:00
Robert Schmidt
5c6aa46b03 Add F1AP UE context modification response message enc/dec + tes
See commit "Add F1AP UE context setup request message enc/dec + test"
for more details on the approach taken.
2025-06-28 12:19:57 +02:00
Robert Schmidt
6956e6ed11 Add F1AP UE context setup response message enc/dec + test
See commit "Add F1AP UE context setup request message enc/dec + test"
for more details on the approach taken.
2025-06-28 12:19:57 +02:00
Robert Schmidt
014e67fccd Use F1 UE context setup/modif Request in stack
Use the new, tested F1 UE context setup request and modification
requests in the stack.

We have to do both at once, because there are some functions that are
used by handlers for both messages, notably

- handle_ue_context_drbs_setup()
- handle_ue_context_srbs_setup()

(+ and some functions called by those two). For instance, the first uses
the (new/old) type f1ap_drb_to_be_setup_t/f1ap_drb_to_setup_t which is
shared. The alternative would be to duplicate the functionality
temporarily, and I want to avoid unnecessary code churn.
2025-06-28 12:19:57 +02:00
Robert Schmidt
807e44d604 Add F1AP UE context modification request message enc/dec + test
See commit "Add F1AP UE context setup request message enc/dec + test"
for more details on the approach taken.
2025-06-28 12:19:57 +02:00
Robert Schmidt
da915d21e0 Add F1AP UE context setup request message enc/dec + test
Reintroduce separate message types to simplify the encoding/decoding,
including shorter names.  The old types will be removed once everything
has been migrated to the new encoder/decoder, which should ensure that
everything is properly migrated to the unit-tested encoder/decoders.

Also, for each type of F1 message (F1 UE context setup request,
response, modification request, ...) introduce a separate type to avoid
to mistakenly use wrong fields, which can lead to bugs. In this regard,
the DL PDCP SN bit size in the DRB-ToBeSetup list of the UE context
setup request is optional, as it will also be used in the UE context
modification request DRB SetupMod list (which avoids quite some code
duplication). The encoder checks that this IE is present, though.
2025-06-28 12:19:57 +02:00
Reem Bahsoun
249812e10d Clarify HO doc: describe where to put neighbour configuration 2025-06-28 11:49:32 +02:00
Robert Schmidt
a6c319e84b Update handover documentation
Point out that an error message is expected, after user feedback
pointing out this somewhat confusing behavior.
2025-06-28 11:49:32 +02:00
Robert Schmidt
cd1aaab014 Remove only UEs belonging to DU that disconnected
The previous condition was wrong: if a UE did not have the assoc_id of
the DU that connected (i.e., it was connected to another DU then the one
disconnecting), it was marked for deletion. Instead, skip those UEs.
2025-06-28 11:49:32 +02:00
Jaroslava Fiedlerova
874d2b73a4 CI: reduce number of attach tries 2025-06-27 20:16:48 +02:00
Jaroslava Fiedlerova
1407784130 CI: RFSim 5G – Wait for IP address assignment before starting traffic test 2025-06-27 20:16:48 +02:00
Jaroslava Fiedlerova
136a59b42c CI: increase deployment interval for Cassandra database 2025-06-27 20:16:48 +02:00
Jaroslava Fiedlerova
63bdaaa1cb CI: remove unused attributes in cls_containerize.py 2025-06-27 20:16:48 +02:00
Jaroslava Fiedlerova
f7b3e04cf9 CI: new healthcheck condition for OTA docker deployments
This modification aims to improve health status detection by using PRACH IO as
an indicator of the gNB's status (container is marked as "healthy" when the
PRACH IO value in gNB nrL1_stats.log exceeds 0.0 dB.). The new condition accounts
for scenarios where the container may not exit or produce error codes (e.g.,
“sleep” logs or "error code overflow" messages).
2025-06-27 20:16:48 +02:00
Jaroslava Fiedlerova
2d39851983 CI: adjustment of DeployObject to speedup deployment
- using docker compose up --wait instead of a custom healthcheck script

Co-authored-by: Bartosz Podrygajlo <bartosz.podrygajlo@openairinterface.org>
2025-06-27 20:16:48 +02:00
Jaroslava Fiedlerova
33d011b2cb CI: adjust YAML files to speedup deployment/undeployment in rfsim5g
- `init: true` initializes the docker container with tini or alternative - it is
  used to collect all the processes and correctly pass the termination signal to
  them, this allows the docker container to be stopped without waiting 10 seconds
  to kill the container
- speeding up the healthchecks by reducing the interval from 1-10s to 0.5s during
  start period

Co-authored-by: Bartosz Podrygajlo <bartosz.podrygajlo@openairinterface.org>
2025-06-27 20:16:43 +02:00
francescomani
8e4b760c86 bugfix for UL TBSLBRM 2025-06-27 17:14:06 +02:00
Laurent THOMAS
fb85a8cda3 clarify and indent correctly the function initial sync 2025-06-27 15:21:47 +02:00
Laurent THOMAS
10ff80815f when we try to detect a specific PCI, and it fails, the SSS detection return successful detection, with wrong frequency offset 2025-06-27 15:21:13 +02:00
Robert Schmidt
8cee8ad661 Remove f1ap_lib_extern.h: use headers directly 2025-06-27 11:40:54 +02:00
Robert Schmidt
3a4440a99c Generalize F1AP_LIB_FIND_IE() to work with list container
F1AP_LIB_FIND_IE() is used to look up elements in a list, but was
hitherto hardcoded to use "protocolIEs" as an intermediate struct. A
follow-up commit will use this macro where we don't have protocolIEs,
but "iE_Extensions". Hence, modify to make it work for that case (and
others) as well.
2025-06-27 11:40:54 +02:00
Robert Schmidt
e991f26ff1 Factor out NSSAI, to be used in other messages lates 2025-06-27 11:40:54 +02:00
Robert Schmidt
9f0373e051 F1AP lib: introduce macros to simplify implementation
Introduce generic _F1_CHECK_EXP(), which is like the macros for checking
values (_F1_EQ_CHECK_INT() etc). Reuse the same for introducing
_F1_EQ_CHECK_OPTIONAL_IE that will be used to write the check for
optional fields more concisely.

CP_OPT_BYTE_ARRAY() FREE_OPT_BYTE_ARRAY() are macros to wrap handling of
optional byte arrays.

_F1_MALLOC() simplifies allocations and is similar to asn1cCallocOne(),
but provided to avoid confusion (since more than ASN.1 structures will
use it).

All will be used in the following commits.
2025-06-27 11:40:54 +02:00
Robert Schmidt
e4857991fc F1 PRINT_ERROR(): show file/line no for debuggability
Somewhat align with the E1 PRINT_ERROR(), but extend with information.
2025-06-27 11:40:54 +02:00
Robert Schmidt
8a772d362f Remove useless parameter for UE context modification response callback 2025-06-27 11:40:54 +02:00
Robert Schmidt
d1541a8329 Remove useless parameter for UE context setup response callback 2025-06-27 11:40:54 +02:00
Robert Schmidt
b19dff31e1 Print gNB MAC stats in phy-test mode as well
There is no PRACH, so the condition to print stats would never be
reached.

Fixes: 0301b239a2 ("print stats only after scheduler started")
2025-06-27 11:40:54 +02:00
Jaroslava Fiedlerova
20f4951bfe CI: use CN with NAS ciphering + integrity in OAIUE and SA-2x2 pipelines 2025-06-27 11:04:37 +02:00
Rúben Soares Silva
bfaec58ca5 Separate PNF socket send functions into separate socket library 2025-06-27 09:56:46 +01:00
alexjiao
35d0314be5 NR UE: enable CSI report for SISO case
Correct precoded_sinr_dB wrongly set to 0 for SISO case.
Also correct ri_restriction is 0 when calculating CQI bit length for SISO.
2025-06-27 10:45:51 +08:00
Rúben Soares Silva
f986f6843a Fix non-SCTP socket communication for P5 messages between PNF and VNF.
Switches the used socket type in pnf_interface.c and vnf_interface.c.
These values must always be the same in both components so the same socket type is used in both
2025-06-26 16:57:08 +01:00
Rúben Soares Silva
ca940e62f9 Add default PNF timing_info value for when the TLV is not sent
Intended to allow FAPI PNF to work without this nFAPI TLV being sent
2025-06-26 16:57:08 +01:00
Rúben Soares Silva
471b563ac7 Add send function pointers to PNF 2025-06-26 16:57:08 +01:00
Rúben Soares Silva
52a0ceac04 Add send function pointers to VNF 2025-06-26 16:57:08 +01:00
Rúben Soares Silva
2089655a97 Change VNF to use functions pointers to pack/unpack messages.
Adds 3 new function pointers to the P5 and P7 VNF structures, allowing to configure which function to use to pack/unpack the messages, as well as unpack the message header, being then used seamlessly regardless of using the FAPI or nFAPI functions.
2025-06-26 16:57:08 +01:00
Rúben Soares Silva
00b5eba192 Change PNF to use functions pointers to pack/unpack messages.
Adds 3 new function pointers to the P5 and P7 PNF structures, allowing to configure which function to use to pack/unpack the messages, as well as unpack the message header, being then used seamlessly regardless of using the FAPI or nFAPI functions.

Changes the header unpack and message unpack functions to return true on success and false on failure, instead of an int
2025-06-26 16:57:08 +01:00
Rúben Soares Silva
1ea164468f Refactor fapi_nr_p5_message_unpack to have the same signature as nfapi_nr_p5_message_header_unpack.
This change is done in preparation to add the header unpack functions to the VNF and PNF structures as function pointers, used to peek the message headers prior to processing.
Add a faux fapi_nr_p7_message_header_unpack with the same signature as nfapi_nr_p7_message_header_unpack, to be used for the P7 header unpack function pointer.
2025-06-26 16:57:08 +01:00
Rúben Soares Silva
d66986a23f Use P5 copy function for config.request instead of memcpy 2025-06-26 16:57:08 +01:00
Jaroslava Fiedlerova
a3b9db2022 Merge branch 'integration_2025_w26' into 'develop'
Integration: `2025.w26`

See merge request oai/openairinterface5g!3493

* !3435 Cleanup PDU Session Handling in RRC/NGAP
* !3371 Add NAS Authentication Reject enc/dec library and unit test
* !3490 nr pdcp security: add a 'decipher' API function
* !3477 CI: Upgrade Aerial version to 25-1
* !3491 Fix Msg3 with MAC CE for C-RNTI and RRCReestablishmentComplete
2025-06-26 15:19:26 +00:00
Robert Schmidt
528e42c357 Update/refine MAC stats
Print a number of statistics, e.g., rx_ulsch_sdu to track UL MAC stats
timing. Remove unused time_meas_t definitions, and fix the name for the
total gNB scheduler time.
2025-06-26 12:09:28 +02:00
Jaroslava Fiedlerova
99eb6c726c Merge remote-tracking branch 'origin/Msg3_C-RNTI_RRCReestablishmentComplete' into integration_2025_w26 (!3491)
Fix Msg3 with MAC CE for C-RNTI and RRCReestablishmentComplete

- Only trigger RRCReconfiguration if UE is not performing RRCReestablishment
- The RRCReconfiguration will be triggered by the RRCReestablishmentComplete

Since this MR fixes a regression, additional info can be found in the following
closed issues and merged MR:
- #687 (closed)
- #747 (closed)
- !2600 (merged)
2025-06-25 22:33:21 +02:00
Jaroslava Fiedlerova
c22e7d22c4 Merge remote-tracking branch 'origin/aerial-25_1' into integration_2025_w26 (!3477)
CI: Upgrade Aerial version to 25-1

- Update the Nvidia L1 (cuBB) from version 24-3 to 25-1
- Decrease the number of cores dedicated to the OAI gNB; testing showed
  it does not need that many
2025-06-25 12:59:54 +02:00
Thomas Schlichter
ed54e0bbd1 NR_UE: make lcids_bj_pos an array of nr_lcordered_info_t pointers instead of structure elements
This makes the array itself smaller and allows to store just a pointer in select_logical_channels() instead of copying the complete structure element.
2025-06-24 14:56:35 +00:00
Jaroslava Fiedlerova
c7cb7896a0 CI: add a test with AS ciphering + integrity 2025-06-24 16:43:26 +02:00
Thomas Schlichter
5856c89741 NR UE: do not select a suspended LCID for scheduling
This fixes a lifelock in nr_ue_get_sdu(), because select_logical_channels() would select
a suspended LCID for scheduling, but fill_mac_sdu() would not provide data for it.
2025-06-24 14:42:20 +00:00
Thomas Schlichter
c3a11c4717 NR UE: fix condition when to print the error message in write_reorder_clear_context()
We should print the error message when the mutex cannot be locked because it is already locked.
Unfortunately, the if() condition was inverted...
2025-06-24 14:41:53 +00:00
Cedric Roux
319f5961a1 bugfix: read msg_type only after deciphering 2025-06-24 13:42:06 +02:00
Jaroslava Fiedlerova
8db35e468d Merge remote-tracking branch 'origin/cleanup-pdu-session' into integration_2025_w26 (!3435)
Cleanup PDU Session Handling in RRC/NGAP

Currently, NGAP and RRC share the same structures and responsibilities when
handling PDU Session information: this creates tight coupling, redundancy, and
makes the code harder to maintain.

- NGAP should be responsible only for: Protocol-specific encoding/decoding
(3GPP TS 38.413)
- RRC should own: PDU Session handling and storage in the UE context

This MR is the first step in a broader refactoring of the PDU Session handling
code across NGAP and RRC layers, with the goal of splitting responsibilities
cleanly between both modules.

- Unified gtpu_tunnel_t for tunnel endpoint config (formerly f1u_tunnel_t)
- Refactored and relocated PDU Session struct definitions for better separation
  between NGAP and RRC
  - Moved pdusession_t for PDU Session handling out of NGAP, now defined and
    managed by RRC only
  - Defined 3GPP TS 38.413 message-specific structs in NGAP module
  - NGAP now decodes NGAP PDU Session Resource Setup/Modify IEs and transfers
    decoded data to RRC via ITTI
  - Add helper functions to copy from NGAP message to pdusession_t
- Introduced new encoders/decoders/helpers in NGAP for handling PDU Session
  Resource Setup/Modify procedures (e.g. decode_pdusession_transfer)
  - Migrated to NGAP and removed duplicated logic for QoS information decoding
    (fill_qos)
- Improved logging of GTP tunnel info
- Merged redundant functions (f1u_dl_gtp_update and f1u_ul_gtp_update)
- Removed unused code and obsolete types
- do free_func in seq_arr_erase_it on the provided range and updated unit test
- Other fixes and simplifications (e.g. simplified and clarified naming of
  tunnel/session parameters and structs)

This cleanup improves code readability, has a high code churn (the deletions are
~159.7% of the insertions) and prepares for better modularity before the
refactoring of PDU Session handling in RRC/NGAP.
2025-06-23 15:55:57 +02:00
Jaroslava Fiedlerova
472480f6fe Merge remote-tracking branch 'origin/pdcp-decipher-api' into integration_2025_w26 (!3490)
nr pdcp security: add a 'decipher' API function

May be needed for new algorithms where ciphering and deciphering are different
operations.
2025-06-23 15:37:54 +02:00
Jaroslava Fiedlerova
673024f587 Merge remote-tracking branch 'origin/nr-ue-nas-auth-reject' into integration_2025_w26 (!3371)
Add NAS Authentication Reject enc/dec library and unit test

This MR introduces the library for encoding/decoding of NAS Authentication
Reject (8.2.5.1 of 3GPP TS 24.501) and relevant unit test.

The message is sent by the AMF to the UE to indicate that the authentication
procedure has failed. A NAS handler was also introduced.
2025-06-23 15:36:23 +02:00
luis_pereira87
260135a35b Fix Msg3 with MAC CE for C-RNTI and RRCReestablishmentComplete
Only trigger RRCReconfiguration if UE is not performing RRCReestablishment
The RRCReconfiguration will be triggered by the RRCReestablishmentComplete
2025-06-23 11:00:51 +01:00
Cedric Roux
a0974f7c73 nr pdcp security: add a 'decipher' API function 2025-06-23 10:02:54 +02:00
Thomas Schlichter
7b991c4dbf NR UE: exit from configure_ntn_ta() if ntn_Config_r17 is not provided 2025-06-20 13:58:55 +00:00
Thomas Schlichter
a3bb97b6b7 gNB: set invalid NTN parameters in prepare_scc(), so fix_scc() will free them when not used 2025-06-20 13:55:45 +00:00
Thomas Schlichter
ef416234d9 NR UE: enable logging of NTN RRC timer information
To verify the NTN epoch time and NTN timer calculations, enable the logging by default.
This only affects NTN configurations.
2025-06-20 11:43:59 +00:00
Thomas Schlichter
1bb781b08c NR UE: trigger RRC timers based on RX frame and slot
For NTN Epoch time calculations, we need to know the RX frame number.
2025-06-20 11:24:06 +00:00
Thomas Schlichter
960f2e7101 NR UE: allow the epochTime-r17 in NTN-Config-r17 to be in the future
The implementation is limited to epoch times that are not more than 5.12 seconds in the future (allowed are up to 10.24 seconds)
and ntn-UlSyncValidityDuration < 5.12 seconds (allowed are up to 90 seconds).

To fix this limitation, the hyper frame number HFN has to be introduced at the OAI UE!
2025-06-20 11:24:06 +00:00
Thomas Schlichter
a9a6ab367b NR UE: fix autonomous_ta to be applied only when we also adjust the DL sync 2025-06-20 11:24:06 +00:00
Thomas Schlichter
786f4877bc rfsimulator: for LEO NTN, update SIB19 information once for each frame 2025-06-20 11:24:06 +00:00
Thomas Schlichter
e91fb33da3 NR UE: also use ta_CommonDriftVariant_r17 to calculate the initial timing advance 2025-06-20 11:24:06 +00:00
Thomas Schlichter
22866c3c1e NR UE: for consistency, rename ntn_ta_commondrift to N_common_ta_drift 2025-06-20 11:21:01 +00:00
Thomas Schlichter
f7ab814a3c NR UE: remove unused elements from struc fapi_nr_dl_ntn_config_command_pdu 2025-06-20 11:18:59 +00:00
Thomas Schlichter
7ba63a2052 rfsimulator: for LEO NTN, calculate SAT acceleration towards gNB to determine ta-CommonDriftVariant-r17 2025-06-20 11:18:59 +00:00
Thomas Schlichter
ece430b6c3 NR UE: use shorter member names for position_t structure 2025-06-20 11:18:59 +00:00
Thomas Schlichter
f1d612c01b NR UE: improve initial timing advance calculation from SIB19
Before, we only considered ta_Common_r17 and the SAT position from SIB19 to compute the initial timing advance value.
This is good enough if the satellite does not move too fast (e.g. GEO satellite).

Now we also consider ta_CommonDrift_r17 and the SAT velocity together with the epoch time from SIB19.
This improves the accuracy of the initial TA computation, esp. for LEO satellite scenarios.
2025-06-20 11:18:48 +00:00
Thomas Schlichter
42bc0d4eb3 rfsimulator: update SIB19 contents every second for LEO channel simulations 2025-06-20 11:15:49 +00:00
Thomas Schlichter
99f3628569 gNB: add function nr_update_sib19() allowing to update SIB19 information 2025-06-20 11:15:49 +00:00
Thomas Schlichter
0ddba90874 ci: test reestablishment for NTN GEO 2025-06-20 08:33:52 +00:00
Thomas Schlichter
ffc0cd43a2 for NTN GEO scenario increase ul_AM_RLC.t_PollRetransmit timer to 2 seconds 2025-06-20 08:33:52 +00:00
Thomas Schlichter
400926115e NR UE: fix reestablishment for NTN
During reestablishment the UE goes back to not synchronized state.
While the synchronizatin is running, we trash frames using the function readFrame().
And when we successfully synchronize, we skip samples to align with the start of the frame using syncInFrame().

In rfsimulator mode, both of these functions send dummy data using the function dummyWrite().
Unfortunately, the writeTimestamp provided to that function was always assuming a duration from RX to TX of NR_UE_CAPABILITY_SLOT_RX_TO_TX.
But in NTN mode, this value is changed when receiving SIB19.
Therefore we have to consider this changed value instead of the static one.
2025-06-20 08:33:52 +00:00
Robert Schmidt
44618f45d2 Remove unused ul_handle 2025-06-19 13:36:00 +02:00
Robert Schmidt
69d1d5fb5f Merge branch 'integration_2025_w25' into 'develop'
Integration: `2025.w25`

Closes #970 and #969

See merge request oai/openairinterface5g!3485

* !3083 Speed up ubuntu22 image build
* !3428 NR UE fallback to RRCSetup from RRCReestablishment
* !3479 Suspend RBs at UE
* !3446 DL NAS Transport: Fix Message Type retrieval on too short message
* !3445 Finalize FAPI dump functions, add Digital Beamforming Table and Precoding Matrix Table to CONFIG.request
* !3447 NAS Registration Reject: Add bounds and lengths checks
* !3481 RNTI information printed in UE stats
* !3484 gNB RRC: handle optional measResultQuantity fields independently
* !3480 USRP lib: fix incorrect config check for time_source fallback
* !3483 UE segfault in DLInformationTransfer
* !3367 Enabling usage of ulsyncvalidityDuration timer in SIB19
* !3482 CI: Add "may_fail" step to execute flaky steps
2025-06-19 11:31:22 +00:00
Robert Schmidt
1750d4052f Merge remote-tracking branch 'origin/ci-may-fail' into integration_2025_w25 (!3482)
CI: Add "may_fail" step to execute flaky steps

Add a generic may_fail CI XML step option that indicates the CI step may
fail, but the CI would still be marked as succeeded (instead of skipping
all steps and mark as failed). The cause of this failure depends on the
specific step, e.g., Iperf failing because of low throughput. This
allows to clean up some code and e.g. remove the command_fail option of
Custom_Command, which is then superfluous (and less generic). An
inconvenience is that those may_fail steps will be marked as "failed" in
the HTML. Later cleanup can correct this.

The may_fail is used for executing FHI7.2 testing to push 700 Mbps in DL
(close to the maximum).

Fix some bugs and add some clean up, see commit messages.
2025-06-19 08:26:33 +02:00
Robert Schmidt
f5a07f17f1 Merge remote-tracking branch 'origin/NR_NTN_ulsyncduration' into integration_2025_w25 (!3367)
Enabling usage of ulsyncvalidityDuration timer in SIB19

ntn-UlSyncValidityDuration in SIB19 from Spec 38.331 v17.12 A validity
duration configured by the network for assistance information which
indicates the maximum time duration (from epochTime) during which the UE
can apply assistance information without having acquired new assistance
information. The unit of ntn-UlSyncValidityDuration is second. Value s5
corresponds to 5 s, value s10 indicate 10 s and so on.

    ntn-UlSyncValidityDuration-r17 ENUMERATED{ s5, s10, s15, s20, s25, s30, s35,s40, s45, s50, s55, s60, s120, s180, s240, s900}

Implementation of epochtime is under discussion.

It can be configured in configuration file according to the above
enumeration. For GEO - 240s, MEO - 20s, LEO-5s can be used.
2025-06-19 08:25:28 +02:00
Robert Schmidt
54af637997 Merge remote-tracking branch 'origin/issue_969' into integration_2025_w25 (!3483)
UE segfault in DLInformationTransfer

Closes #969
2025-06-19 08:22:54 +02:00
Guido Casati
88f294bed1 Handle NAS Authentication Reject in stack
Handle authentication not accepted by the network. The handler assumes the message
is not integrity protected, processes the received NAS message and logs whether a
EAP-failure is enclosed. The UE enters state: 5GMM-DEREGISTERED.

Not done in this commit: the UE shall performs actions as per 5.4.1.3.5 of
3GPP TS 24.501, including (1) Abort any ongoing 5GMM procedure
(2) Stop all active timers: T3510, T3516, T3517, T3519, T3520, T3521
(3) Delete stored SUCI. (4) handle EAP-failure message.
2025-06-18 16:29:00 +02:00
Guido Casati
299ce4a9bd Add enc/dec lib for NAS Authentication Reject and unit test 2025-06-18 15:27:35 +02:00
Guido Casati
5445b12c32 Add enc/dec function for EAP Message
Also, add EAP message (optional) enc-dec to Service Reject lib
2025-06-18 15:26:44 +02:00
Reem Bahsoun
833edb3b25 Hard code the name of nvIPC file when called in the cls_containerize.py script
- This is to avoid the Docker image builder from being confused in case we have multiple nvIPC files in `/opt/nvidia-ipc`
- This occurs when we have an MR to upgrade the cuBB image
2025-06-18 14:56:28 +02:00
Jaroslava Fiedlerova
a679a4fb7a Merge remote-tracking branch 'origin/fix-usrp-lib-time-source' into integration_2025_w25 (!3480)
USRP lib: fix incorrect config check for time_source fallback

Corrected a logic bug in usrp_lib.cpp where the code mistakenly checked
openair0_cfg[0].clock_source instead of time_source when a time_source
was already specified in usrp_args.

Also improved the warning log to clarify that the config value is being
ignored in favor of the explicit user-provided usrp_args.

Co-authored-by: Alexandre Serio alexandre.j.serio@altice.pt
2025-06-18 12:43:02 +02:00
Jaroslava Fiedlerova
8d340fca6e Merge remote-tracking branch 'origin/issue-970-meas-quantity' into integration_2025_w25 (!3484)
gNB RRC: handle optional measResultQuantity fields independently

Closes: #970
2025-06-18 12:41:14 +02:00
Jaroslava Fiedlerova
6cb9db1a9b Merge remote-tracking branch 'origin/RNTI_UE_stats' into integration_2025_w25 (!3481)
RNTI information printed in UE stats
2025-06-18 12:40:42 +02:00
Jaroslava Fiedlerova
b03619ea51 Merge remote-tracking branch 'origin/reg-reject-len-check' into integration_2025_w25 (!3447)
NAS Registration Reject: Add bounds and lengths checks

This change adds lengths checks to the received registration reject
message and also performs a bounds check for the received cause.
Since the cause is not checked, any string in the memory can be
dereferenced, possibly leading to DoS.

Signed-off-by: Eduard Vlad eduard.vlad@rwth-aachen.de
2025-06-18 11:33:20 +02:00
Jaroslava Fiedlerova
5580dd21cf Merge remote-tracking branch 'origin/nfapi_dump_functions' into integration_2025_w25 (!3445)
Finalize FAPI dump functions, add Digital Beamforming Table and Precoding Matrix
Table to CONFIG.request

This MR finalizes the addition of dump utility functions for the PARAM.response,
CONFIG.request, CONFIG.response, TX_DATA.request and UCI.indication messages.

These functions are intended to be used to aid in debugging FAPI messages between
the VNF and the PNF by printing out every parameter in a more readable form,
instead of a simple hexdump. These are also used by the nFAPI Hex Parser utility,
to be able to debug an Hex dump provided from elsewhere.

Furthermore, this MR also adds the necessary logic to send/receive the Digital
Beamforming Table and Precoding Matrix Table, this in the CONFIG.request message.
This is achieved by the addition of 2 Vendor Extension TLVs (0xA002 and 0xA003),
in order to be able to reuse existing logic to pack/unpack the data. Note: The
present implementation predicts the existence of multiple instances of the
Precoding Matrix Table via the parameter num_pm_idx, whic is not present in the
SCF specification. Note: The created TLVs are only used to ease the pack/unpack
procedure, by allowing to reuse already existing logic for other TlVs, the tag
and length are not sent.

The necessary additions to the utility functions are done to account for these
table. The CONFIG.request unitary test is changed to fill these tables with
randomized data to test transport and copy.
2025-06-18 11:30:32 +02:00
Guido Casati
122ff99b49 Use f1u_gtp_update in rrc_gNB_process_e1_bearer_context_setup_resp 2025-06-18 10:52:15 +02:00
Guido Casati
7d0640ebcb Improve PDU Session GTP tunnels logging 2025-06-18 10:52:15 +02:00
Guido Casati
b5a717cc99 Add encoder for PDU Session Resource Setup Response Transfer IE in NGAP (Initial Context/PDU Session) Setup Response 2025-06-18 10:52:15 +02:00
Guido Casati
248cf7f155 Use gtpu_tunnel_t in pdusession_setup_t 2025-06-18 10:52:15 +02:00
Guido Casati
e1fc1c38db Use cp_pdusession in trigger_bearer_setup 2025-06-18 10:52:15 +02:00
Guido Casati
389b40b121 Use calloc_or_fail to initiate UE->initial_pdus 2025-06-18 10:52:15 +02:00
Guido Casati
0c408875a3 Refactor NGAP decodePDUSessionResourceSetup/Modify to improve RRC/NGAP separation
Motivation of the commit:

Previously, the RRC module on the NGAP interface directly handled ASN.1 decoding
of NGAP PDU Session Resource items, that was directly stored in pdusession_t, i.e.
in the UE context. Decode logic between Setup and Modify was also duplicated.,
e.g. fill_qos/fill_qos2. The idea behind this change is to achieve this flow:
(1) NGAP handler: decoding (2) ITTI to RRC: transfer decoded message (3) RRC
handler: process decoded message, e.g. store in UE context, etc..

The goal of this commit is to:

* improve the NGAP decoding library by adding decoding functions
* let RRC handle the already decoded data
* enhance error handling, with decode failures now consistently detected and rejected early
* have a cleaner, more maintainable code with fewer duplications and a clearer separation of modules

Changes:
* Moved all ASN.1 decode logic for PDU Session Resource items into the NGAP library
* Introduced decode functions for NGAP IEs whenever necessary, e.g. decode_TNLInformation
decode_pdusession_transfer
* Removed duplicate fill_qos functions and centralized QoS handling in NGAP
* Added function to copy from NGAP PDU Session Resource item to RRC pdusession_t: this actually
  replaces decodePDUSessionResourceSetup in RRC, copying from the decoded NGAP struct to
  the UE context pdusession_t
2025-06-18 10:52:15 +02:00
Guido Casati
48a4c2b0ab Move pdu_session_type_t to platform constants
* It is used by both NGAP and RRC
2025-06-18 10:52:15 +02:00
Guido Casati
5ff24cce71 Refactor pdusession_t Definitions
Motivation:
The previous code had overlapping and partially inconsiste definitions of
`pdusession_t` and related structures across NGAP and RRC. This struct type
was used for either the data stored in the UE context and the NGAP message
IEs holding the PDU session to setup/modify information.

This patch aims to separte the `pdusession_t` in RRC, where it logically belongs,
since RRC owns the state of the PDU sessions. NGAP should only
deal with protocol messages, i.e. enc/dec and transfer structures to RRC.

This clarifies module ownership. This also makes the code easier to maintain.

Changes:
* Moved `pdusession_t` definition from NGAP (`ngap_messages_types.h`) to RRC
  (`nr_rrc_defs.h`)
* Added a simpler `pdusession_resource_item_t` structure to NGAP for use in
  protocol messages
* Adjusted NGAP structures accordingly (Initial Context Setup, PDU Session
  Setup Request, and PDU Session Modify Request).
* do decodePDUSessionResourceSetup to decode the NGAP IEs holding PDU session
  information and store what necessary in the UE context PDU Session IE: NOTE
  this changes were necessary since previously this function was acting on
  the common NGAP/RRC pdu_session_t struct
2025-06-18 10:52:15 +02:00
Guido Casati
a36de80e6f Simplify pdu session structs members naming to pdusession
Rename the struct members:
`pdusession_param` to `pdusession` in NGAP Initial Context Setup Request
`pdusession_setup_params` in `ngap_pdusession_setup_req_t`
`pdusession_modify_params` and `ngap_pdusession_modify_req_t`
2025-06-18 10:52:15 +02:00
Guido Casati
4ec498c996 Refactor tunnel endpoint struct members in pdu_session_t
Motivation:
Clarify the role of GTP tunnel endpoint IDs in PDU session handling. Previously,
the struct members (gNB_teid_N3, UPF_teid_N3, etc.) were confusingly named and
duplicated with separate transport-layer address fields.
This refactoring replaces these with explicit n3_incoming and n3_outgoing members using
gtpu_tunnel_t. This aligns with GTP conventions: "incoming TEID" refers to the
TEID received from the remote peer (UPF on N3), while "outgoing TEID" is the
TEID sent by the local entity (NG-RAN on N3) to the remote peer.

Benefits:
* Improves readability and clarity of the code
* Reduces redundant struct members, i.e. remove UPF_teid_N3, UPF_addr_N3
* Aligns naming with 3GPP conventions for transport layer tunnels

Changes:
* Replace gtp_addr_N3, gNB_teid_N3, gtp_teid, upf_addr with n3_incoming and n3_outgoing
* Update all related code to use the new struct members
* Aligns naming with 3GPP conventions for transport layer tunnels
2025-06-18 10:52:15 +02:00
Guido Casati
b86ae96c66 Merge f1u_dl_gtp_update and f1u_ul_gtp_update in f1u_gtp_update
* The 2 functions do the same thing, the only difference is the
  direction (DL/UL)
2025-06-18 10:52:15 +02:00
Guido Casati
32e5f972e9 Refactor f1u_tunnel_t into gtpu_tunnel_t
This struct is used in different layers, e.g. RRC, NGAP: therefore it
has been moved to platform_types.h.

Also, the struct holds the tunnel endpoint configuration for any GTP-U
tunnel, therefore the f1u prefix is not accurate and was updated
to a more generic gtpu.
2025-06-18 10:52:15 +02:00
Guido Casati
93936ffd9b Fix comment in transport_layer_addr_t 2025-06-18 10:52:15 +02:00
Guido Casati
78feea10bb Add function to deep copy pdusession_t struct 2025-06-18 10:51:59 +02:00
Guido Casati
00b18f2990 Cleanup unused and/or long time commented out code in RRC/NGAP
* Remove drb_is_active: function is unused and the logic will be later
  added to another function to add DRBs if necessary
* Remove unused NGAP structs and empty TODO functions
* Remove unused pdusession_setup_req_t struct definition
2025-06-17 23:53:07 +02:00
Guido Casati
786fada6e6 Change pdusession_id_t type to int and remove redundant definition for an ID type 2025-06-17 23:53:07 +02:00
Guido Casati
a8f8244b09 Fix mutation of input iterators in seq_arr_erase_it
The seq_arr_erase_it function was modifying start_it during the free_func loop,
which led to incorrectly apply the free_func on the whole array.

This commit makes sure the elements "freed" are only those in the range and not the whole seq_arr.

* Fixes the logic by introducing a temporary iterator for the free loop,
  preserving start_it and end_it for correct offset calculations.

* Adds a regression test in test_seq_arr to verify that only the selected
  subrange is erased and that free_func is called exactly on that range.
2025-06-17 23:50:43 +02:00
Jaroslava Fiedlerova
d35270bfd0 Merge remote-tracking branch 'origin/dl-nas-transport-len-check' into integration_2025_w25 (!3446)
DL NAS Transport: Fix Message Type retrieval on too short message

The change addresses the SM message type retrieval for DL NAS Transport
messages. The assumption of an offset 17 = 7 (MM Sec) + 3 (MM Plain) + 1
(IEI) + 2 (Len) + 4 (SM) is correct.

However, if the DL NAS Transport is received in a plain header, the
lengths would not add up anymore. (This is not complying with the
standard, so not allowed, but possible). The check for the length is
necessary to not process arbitrary memory contents beyond the
pdu_buffer.
2025-06-17 23:39:02 +02:00
Jaroslava Fiedlerova
547b2eaf52 Merge remote-tracking branch 'origin/UE_RB_suspend' into integration_2025_w25 (!3479)
Suspend RBs at UE

In case of suspended radio bearer (by RRC), the MAC needs to discarded received
PDUs and avoid to transmit using LCID related to that RB
2025-06-17 23:37:25 +02:00
Robert Schmidt
7fb44bdb86 CI FHI7.2/VVDN: add test step to test high throughput
This test may fail, so mark it as such.
2025-06-17 19:21:21 +02:00
Robert Schmidt
02608313fb CI: remove useless Iperf test description
"multi-ue profile" was a specific iperf option to do iperf across
multiple UEs. However, this is not necessary anymore, the Iperf
handling multiple UEs "implicitly" (based on the number of UEs).
2025-06-17 19:21:21 +02:00
Robert Schmidt
79448178cb Remove "command_fail" option from Custom_Command/Custom_Script
As of the parent commit, there is a generic "may_fail" option through
which we could still ignore an error. Thus, command_fail is superfluous,
and avoids some extra code.

Further, in all these cases, we should better be informed about any
error, so let's not use may_fail for these tests.
2025-06-17 19:21:21 +02:00
Robert Schmidt
97d0b6534a Implement generic CI step "may_fail" option
There might be various occasions where a CI step should be attempted to
be executed, despite a chance of failing.  For instance, we might want
to try executing an instable Iperf test, and still mark the CI as
passing if it fails.

This commit introduces a generic "may_fail" option that will mark any CI
test as succeeded, despite having failed.

Ideally, we would print a warning in the HTML code, but this is not
possible because each step emits its own HTML code, instead of the main
loop handling this. We can improve this in the future.
2025-06-17 19:21:21 +02:00
Reem Bahsoun
a18a4888ec Change number of cores used for OAI gNB from 8 to 2
- After testing we found that we do not need 8 cores
2025-06-17 14:57:27 +02:00
Reem Bahsoun
6677277b6d Update cuBB version to 25-1 2025-06-17 14:56:40 +02:00
Raghavendra Dinavahi
7877e38890 UE changes: Handle T430 expiry in RRC, MAC
SPEC 38.331 section 5.2.2.6
Inform MAC that UL SYNC got lost because of T430 expiry
- Send message NR_MAC_RRC_CONFIG_RESET with cause UL_SYNC_LOST_T430_EXPIRY to MAC
Reacquire SIB19 after T430 expiry

This is not checked in this commit
- RACH needs to be performed through probably PDCCH order to reobtain UL-SYNC
- system usecase involving Recovery from T430 expiry not tested yet as that requires changes on gNB side.
2025-06-17 13:50:00 +02:00
Raghavendra Dinavahi
6fc02164c5 UE changes: Handling of ulsyncvalidityduration IE in sib19
Spec 38.331 section 5.2.2.4.21 indicates this
1> start or restart T430 for serving cell with the timer value set to ntn-UlSyncValidityDuration for the serving cell
from the subframe indicated by epochTime for the serving cell;
NOTE: UE should attempt to re-acquire SIB19 before the end of the duration indicated by ntn-UlSyncValidityDuration and epochTime

Epochtime IE
When explicitly provided through SIB, or through dedicated signaling, the EpochTime is the starting time of a DL
sub-frame, indicated by a SFN and a sub-frame number signaled together with the assistance information.
For serving cell, the field sfn indicates the current SFN or the next upcoming SFN after the frame where the message indicating the epochTime is received.
This field is mandatory present when ntn-Config is provided in dedicated configuration.

gNB implementation related to epochtime will be done in a separate merge request.
2025-06-17 13:49:55 +02:00
Robert Schmidt
aca48aa9f8 gNB RRC: handle optional measResultQuantity fields independently
Closes: #970
2025-06-17 11:30:11 +02:00
Rúben Soares Silva
ba4608d46b Remove unnecessary checks on P7 free utility functions 2025-06-17 10:09:31 +01:00
Rúben Soares Silva
625fd54ae2 Remove unnecessary checks on P5 free utility functions 2025-06-17 10:09:31 +01:00
Rúben Soares Silva
923cfc9cd2 Finish dump procedure for UCI.indication message
Remove unnecessary checks on free_uci_indication
2025-06-17 10:09:31 +01:00
Rúben Soares Silva
c9835a13e7 Finish dump procedure for TX_DATA.request message 2025-06-17 10:09:31 +01:00
Rúben Soares Silva
d3205ea09a Finish dump procedure for CONFIG.response message
Remove unnecessary checks on free_config_response
2025-06-17 10:09:31 +01:00
Rúben Soares Silva
018d456a2a Add pack/unpack for CONFIG.request Precoding Matrix table
Adds the packing and unpacking functions needed for the PM Table in CONFIG.request
This table tag is specified in SCF222.10.06(0x104B), previous versions didn't have a tag for this table, and this version of the spec introduces the parameter `num_pm_idx`, previously not present.
A struct nfapi_nr_pm_tlv_ve_t is added to represent this TLV in order to be able to use the pack_nr_tlv function.
The necessary additions to the utility functions are done to account for this table.
The unitary test is changed to fill this table with randomized data to test transport and copy.
2025-06-17 10:09:31 +01:00
Rúben Soares Silva
8519c748d1 Add pack/unpack for CONFIG.request Beamforming Table
Adds the packing and unpacking functions needed for the DBT Table in CONFIG.request
This table tag is specified in SCF222.5.0 (0x1043) and this tag is used to transport the table, previous versions did not include a tag for the table.
A struct nfapi_nr_dbt_tlv_ve_t is added to represent this TLV in order to be able to use the pack_nr_tlv function.
The necessary additions to the utility functions are done to account for this table.
The unitary test is changed to fill this table with randomized data to test transport and copy.
2025-06-17 10:09:29 +01:00
Rúben Soares Silva
5016fc75c6 Finish dump procedure for CONFIG.request message
Remove unnecessary checks on free_config_request

Added logic to fill random data for PNF addresses and port TLVs to test dumping function
2025-06-17 10:08:16 +01:00
Rúben Soares Silva
5a30abc29e Finish dump procedure for PARAM.response message
Remove unnecessary checks on free_param_response
2025-06-17 10:08:16 +01:00
Jaroslava Fiedlerova
6878550557 Merge remote-tracking branch 'origin/NR_RRC_UE_fallback_to_Setup_from_Reestablishment' into integration_2025_w25 (!3428)
NR UE fallback to RRCSetup from RRCReestablishment

Implementation of the procedure to handle reception of RRCSetup as response
to RRCReestablishment request
2025-06-17 10:33:15 +02:00
Jaroslava Fiedlerova
9146879207 Merge remote-tracking branch 'origin/fast-u22-build' into integration_2025_w25 (!3083)
Speed up ubuntu22 image build

Speed up softmodems build by means of:
- Avoiding the copying the repo (using bind instead)
- Creating cache directories for:
  - ccache cache
  - CPM cache
  - Same technique applied to FlexRIC build
- Make ubuntu ran-base image docker build cache friendly
2025-06-17 10:31:43 +02:00
francescomani
d8c7123a8a preventing segfault in DLInformationTransfer at RRC UE 2025-06-17 10:07:37 +02:00
francescomani
499cdc62d9 do not transmit data for a logical channel corresponding to a radio bearer that is suspended 2025-06-17 09:50:41 +02:00
Robert Schmidt
bb9fa2c6a0 CI: Remove double Custom_Command Step
Step 004000 appears double in the XML description. Remove one to avoid
that it is executed twice (because the Python code goes through the list
of test descriptions and executes all that match the current ID =>
double if appears twice).
2025-06-17 08:12:20 +02:00
Robert Schmidt
65f85d55db Correct b2xx_fx3_utils path on nepes 2025-06-17 08:09:40 +02:00
Robert Schmidt
2902967740 Remove useless sleep in CI footer creation 2025-06-16 19:01:20 +02:00
francescomani
2b4b3fcd00 discard rx PDU if RB is suspended 2025-06-16 16:39:41 +02:00
francescomani
3331a43b95 add option to suspend/resume RBs at MAC upon signaling from RRC 2025-06-16 16:36:19 +02:00
Guido Casati
a41be56b2a USRP lib: fix incorrect config check for time_source fallback
Corrected a logic bug in usrp_lib.cpp where the code mistakenly checked
openair0_cfg[0].clock_source instead of time_source when a time_source
was already specified in usrp_args.

Also improved the warning log to clarify that the config value is being
ignored in favor of the explicit user-provided usrp_args.

Co-authored-by: Alexandre Serio <alexandre.j.serio@altice.pt>
2025-06-16 11:25:30 +02:00
francescomani
38bac5376b fix in multi-UE RFsim action description 2025-06-16 10:13:20 +02:00
francescomani
cce685323a adding RNTI information to stats printed at UE 2025-06-15 17:38:45 +02:00
francescomani
f2e06a8b12 store RB information in LCID structure at UE 2025-06-13 16:46:21 +02:00
francescomani
cad681e626 renaming structure for LCID to RB mapping 2025-06-13 16:46:21 +02:00
Robert Schmidt
8c0641c676 Merge branch 'integration_2025_w24' into 'develop'
Integration: `2025.w24`

Closes #965

See merge request oai/openairinterface5g!3476

* !3354 Preparation Work for N2 Handover
* !3383 Add configurable values of NR RLC and NR PDCP to the configuration file
* !3468 Resolve "SSB frequency at gnb.sa.band78.fr1.24PRB.usrpb210.conf is invalid"
* !3466 YAML related updates
* !3460 SRS configuration
* !3474 Fix AMF selection fallback by PLMN ID when no UE identity is present or matching
* !3473 Fix various bugs and inconsistencies in config read, SCTP, ITTI, GTP
* !3169 NR RU improvements for analog beamforming
* !3456 CI: update config for AW2S pipeline
* !3369 Add Security Mode Reject lib/unit test and adopt in stack
* !3457 Fix NR reestablishment
* !3412 [E2 agent] E2AP README update and OAI-FlexRIC CI pipeline improvements
2025-06-13 14:31:54 +00:00
luis_pereira87
736ea530f7 Only reestablish RLC while processing reconfiguration complete after a RRCReestablishment and not for every RRCReconfiguration 2025-06-13 12:05:34 +01:00
Robert Schmidt
5b9d770960 Merge remote-tracking branch 'origin/e2-fixes-updates' into integration_2025_w24 (!3412)
[E2 agent] E2AP README update and OAI-FlexRIC CI pipeline improvements

- E2AP README - add OSC nearRT-RIC section; update with proper FlexRIC
  links, and explanations on prerequisites, as well as for xApps
- OAI-FlexRIC CI - use separate containers for xApps
- add reference files for CU-UP/CU-CP
- add logging for KPM NSSAI condition
2025-06-13 10:40:29 +02:00
Robert Schmidt
9513d481d5 Merge remote-tracking branch 'origin/fix_nr_reestablishment' into integration_2025_w24 (!3457)
Fix NR reestablishment by implementing the "DRB-suspend" at the MAC.
This means that the during reestablishment, gNB MAC discards received
DRB packets, and does not schedule DRB. Fix a couple of additional
issues in reestablishment.  # Please enter a commit message to explain
why this merge is necessary,

For additional information, see
https://gitlab.eurecom.fr/oai/openairinterface5g/-/merge_requests/2668#note_119369
2025-06-13 10:25:57 +02:00
Robert Schmidt
dfadcab458 Store spCellConfig during reestablishment for reconfiguration
The spCellConfig is to be dropped during reestablishment and to be
applied after reconfiguration. Implement this using the
RRCReconfigurationComplete acknowledgment from the CU to the DU,
applying the spCellConfig if present (which signals a prior
reestablishment). Remove a prior flag that is not needed anymore, and
do not "guess" when is the reconfiguration, because it is now handled in
the case of the ack.

The spCellConfig is not relevant as long as we use a common search space
for DCIs (and the activation of dedicated search space happens after
applying spCellConfig). For PUCCH, there is the PDSCH transmission of
RRCReconfiguration which gets ack'ed in the default PUCCH.
RRCReconfigurationComplete is sent in PUSCH (again through common
search space). In theory, there cannot be another PUCCH before the
application of spCellConfig, as all bearers are still suspended, and
there should not be another SRB1 transmission in the meantime, as only
one RRC transaction can be active at a time.

Co-authored-by: francescomani <email@francescomani.it>
2025-06-12 15:47:03 +02:00
Robert Schmidt
81dbaf0aad Add comment on reestablishment in MAC-RRC DL handler 2025-06-12 15:39:36 +02:00
Robert Schmidt
15370e7192 Implement RB suspend at gNB MAC
Add a flag for each RB that tracks suspension state. Mark all RBs
(except SRB1) as suspended on reestablishment, and de-suspend on
reconfiguration. Only check RLC status for non-suspended RBs. For UL
data traffic, check that DRB/SRB2 exist (SRB1 should be there as soon as
the UE context exists).
2025-06-12 15:39:00 +02:00
Robert Schmidt
f3802d77cc Merge remote-tracking branch 'origin/nr-ue-nas-sec-mode-reject' into integration_2025_w24 (!3369)
Add Security Mode Reject lib/unit test and adopt in stack

This MR is adding the library for the NAS Security Mode Reject, and
relevant unit test.

The UE shall send a SECURITY MODE REJECT containing a 5GMM cause that
typically indicates one of the following cause values: (23) UE security
capabilities mismatch. (24) security mode rejected, unspecified

- The message shall be protected if a security context is available.
- The message is adopted in the handling of Security Mode Command failure.

See 3GPP TS 24.501 5.4.2.5 "NAS security mode command not accepted by
the UE".

This MR includes changes from !3262:

> This patch series addresses a security issue where the UE improperly
> accepts a Security Mode Command (SMC) without an authentication header
> (Security Header 0). This behavior violates TS 24.501 and enables an
> attacker to bypass authentication, set integrity protection to NULL
> (NIA0), and reconfigure the UE without proper verification.
>
> We identified the following issues:
>
> 1. The UE currently accepts unauthenticated SMC messages, even
>    allowing NIA0 and EIA0 to be set outside emergency mode.
> 2. When applying NIA0, the MAC field remains uninitialized,
>    consistently containing the sequence 0xFF3F0000, making it feasible
>    to bypass authentication and enforce insecure configurations.
> 3. The UE does not properly signal security mode failures to the Core
>    Network.
>
> This patch series tries to address the above-mentioned issues:
>
> 1. Reject unauthenticated SMC messages, enforcing the requirement that
>    they must be integrity-protected.
> 2. Validate MAC before applying security settings, ensuring that only
>    authenticated messages are accepted.
> 3. Tear down the security context if an integrity check fails.
> 4. Introduce the Security Mode Reject message to inform the Core
>    Network of failed SMC procedures, as required by TS 24.501.
2025-06-12 14:44:17 +02:00
Robert Schmidt
690be9c1ff Merge remote-tracking branch 'origin/ci-asue-test' into integration_2025_w24 (!3456)
CI: update config for AW2S pipeline

Update location of lteue and ws.js after AmariUE SW update.
2025-06-12 14:43:55 +02:00
Jaroslava Fiedlerova
27ece7e7f5 CI: update AmariUE configuration file, add RF configuration 2025-06-12 11:46:47 +02:00
Eduard Vlad
5e45ecb123 Security Mode Command: Perform Algorithm Rejection in NAS Handler
This change performs the algorithm rejection in the corresponding NAS
handler for 5G, since the protocol definitions differ between LTE and
5G, regarding NIA0/EIA0 user plane traffic.

Therefore, for 5G NIA0 is rejected, since it is not allowed under normal
circumstances, while LTE user plane traffic can indeed have EIA0
selected.

Signed-off-by: Eduard Vlad <eduard.vlad@rwth-aachen.de>
2025-06-12 09:49:34 +02:00
Eduard Vlad
a2a8e3ba6d Security Mode Command: Handle incorrect authentication
It is not allowed to accept an unauthenticated SMC message,
as this effectively bypasses all security measures and
enables a malicioius attacker to compromise the confidentiality
and integrity of exchanged messages.

Signed-off-by: Eduard Vlad <eduard.vlad@rwth-aachen.de>
Co-authored-by: Guido Casati <hello@guidocasati.com>
2025-06-12 09:49:33 +02:00
Eduard Vlad
6c8a3796ae nas security: Implement reusable procedures for Security Mode Command handling
Retrieving the mac is necessary during the handling of the SMC, since the
context is generated from the specified keys therein. Therefore, it is
necessary to check the MAC right after generation and ensure the authenticity
of the message. If it is not given, the message must be rejected.

Signed-off-by: Eduard Vlad <eduard.vlad@rwth-aachen.de>
Co-authored-by: Guido Casati <hello@guidocasati.com>
2025-06-12 09:49:33 +02:00
Eduard Vlad
896698dab5 SMC: reject NULL integrity for non emergency cases
Signed-off-by: Eduard Vlad <eduard.vlad@rwth-aachen.de>
2025-06-12 09:49:33 +02:00
Eduard Vlad
6399d93be8 Add callback for generation of NAS Security Mode Reject message
This is necessary to indicate to the Core network, that
the security mode command procedure has failed.

Check for the security context presence when generating the Security Mode
reject message: according to 3GPP TS 24.501 5.4.2.5 "NAS security mode command
not accepted by the UE" The UE shall send a SECURITY MODE REJECT containing
a 5GMM cause that typically indicates one of the following cause values:
(23) UE security capabilities mismatch
(24) security mode rejected, unspecified
The message shall be protected if a security context is available

Signed-off-by: Eduard Vlad <eduard.vlad@rwth-aachen.de>
Co-authored-by: Guido Casati <hello@guidocasati.com>
2025-06-12 09:49:33 +02:00
Eduard Vlad
98c458fa2c FGS NAS lib: enable encoding of Security Mode Reject
Signed-off-by: Eduard Vlad <eduard.vlad@rwth-aachen.de>

Co-authored-by: Guido Casati <hello@guidocasati.com>
2025-06-12 09:49:33 +02:00
Guido Casati
4262203e2d Add NAS Security Mode Reject enc/dec lib and unit test
This 5GMM message is required for an invalid security mode command,
e.g. when the MAC integrity fails, or the wrong Security Header is set.

* Add encode/decode functions for common IEs in fgmm_lib: this library
  provides encoding/decoding helpers for IEs shared across multiple
  NAS messages. The goal is to avoid the legacy approach of creating
  separate files per IE
* add NAS Cause enc/dec lib
* Adopted byte_array_t to handle the buffer

Co-authored-by: Eduard Vlad <eduard.vlad@rwth-aachen.de>
2025-06-12 09:49:32 +02:00
Robert Schmidt
dec4e3f217 Merge remote-tracking branch 'origin/RU_beam_management' into integration_2025_w24 (!3169)
NR RU improvements for analog beamforming
2025-06-11 18:37:15 +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
francescomani
73a2ba3894 assertion to avoid using analog beamforming in split scenario 2025-06-11 10:22:23 +02:00
francescomani
ded3187734 omitting beam weigths in case of DAS 2025-06-11 10:19:23 +02:00
Robert Schmidt
068983915e Merge remote-tracking branch 'origin/bugfix-ngap-amf-selection' into integration_2025_w24 (!3474)
Fix AMF selection fallback by PLMN ID when no UE identity is present or matching

If a mask is present (i.e., not zero), AMF selection by PLMN ID may
still fail, causing the AMF selection process to skip the fallback
option, i.e. selection by PLMN ID, when no UE identity is available or
when no match is found.

This MR adds also warnings in case there's a match for the AMF is not
found.
2025-06-11 07:55:11 +02:00
Robert Schmidt
e36f3ee995 Merge remote-tracking branch 'origin/SRS-meas' into integration_2025_w24 (!3460)
SRS configuration

- Fix segmentation fault, a memory leak, and LOGs for SRS usage
  NFAPI_NR_SRS_BEAMMANAGEMENT
- Refactor SRS configuration;
- Add SRS ResourceSet to get the SNR measurements at MAC layer

In this MR we have 2 SRS ResourceSet, for the same SRS Resource. This
way, in addition to obtaining the UL-RI, we also obtain the SNR in the
MAC and fill the PRB Black list.

This branch has been tested with COTS UE and with RFSim. The measured
values seem correct.
2025-06-11 07:54:17 +02:00
Robert Schmidt
f0ca66adcd Remove unused MAC types and includes
Using the USIM interface in the MAC is non-sensical (violates layer
separation). Add header include in nr-softmodem.c, which previously came
through nr_mac_gNB.h -> usim_interface.h.
2025-06-10 18:00:49 +02:00
Robert Schmidt
986b212fe9 GTP: fix memory leak when socket binding fails
Avoid leaking memory upon failed socket binding by calling
freeaddrinfo() before exiting in error cases.

Fixes leak:

    Direct leak of 64 byte(s) in 1 object(s) allocated from:
        #0 0x0000004ac038 in malloc (/home/richie/oai/cmake_targets/ran_build/build/nr-softmodem+0x4ac038) (BuildId: 875d6e5bc54d7c89bdcf151452f12703cb6fd110)
        #1 0x7f0fdd92e2a6 in getaddrinfo (/lib64/libc.so.6+0x1202a6) (BuildId: 2b3c02fe7e4d3811767175b6f323692a10a4e116)
        #2 0x00000043d7ad in getaddrinfo (/home/richie/oai/cmake_targets/ran_build/build/nr-softmodem+0x43d7ad) (BuildId: 875d6e5bc54d7c89bdcf151452f12703cb6fd110)
        #3 0x000000700c73 in udpServerSocket(openAddr_s) /home/richie/oai/openair3/ocp-gtpu/gtp_itf.cpp:486:17
        #4 0x000000700c73 in gtpv1Init /home/richie/oai/openair3/ocp-gtpu/gtp_itf.cpp:546:10
        #5 0x000000c692b8 in cuup_init_n3 /home/richie/oai/openair2/E1AP/e1ap.c:744:61
        #6 0x000000549ea1 in create_gNB_tasks /home/richie/oai/executables/nr-softmodem.c:320:7
        #7 0x000000549ea1 in main /home/richie/oai/executables/nr-softmodem.c:619:15
        #8 0x7f0fdd8115f4 in __libc_start_call_main (/lib64/libc.so.6+0x35f4) (BuildId: 2b3c02fe7e4d3811767175b6f323692a10a4e116)
        #9 0x7f0fdd8116a7 in __libc_start_main@GLIBC_2.2.5 (/lib64/libc.so.6+0x36a7) (BuildId: 2b3c02fe7e4d3811767175b6f323692a10a4e116)
        #10 0x000000408524 in _start (/home/richie/oai/cmake_targets/ran_build/build/nr-softmodem+0x408524) (BuildId: 875d6e5bc54d7c89bdcf151452f12703cb6fd110)
2025-06-10 18:00:49 +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
405d122937 GTP: check that packets are not larger than max UDP size 2025-06-10 18:00:49 +02:00
Robert Schmidt
1a690a5cff Merge remote-tracking branch 'origin/965-ssb-frequency-at-gnb-sa-band78-fr1-24prb-usrpb210-conf-is-invalid' into integration_2025_w24 (!3468)
Resolve "SSB frequency at gnb.sa.band78.fr1.24PRB.usrpb210.conf is invalid"

Closes #965
2025-06-10 15:03:14 +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
Robert Schmidt
9a34b31470 Merge remote-tracking branch 'origin/nr-rlc-pdcp-config-file' into integration_2025_w24 (!3383)
Add configurable values of NR RLC and NR PDCP to the configuration file

This is for the gNB (the UE gets the values from the gNB).

The physical simulators were also adapted (we put the previously
hardcoded values that were everywhere in the code into the simulators
themselves). I don't think we need to have those values configurable for
the simulators, but I can study the possibility to add this if someone
tells me it's important (if not important I prefer not to do it, I am
not sure if it is trivial to do or not).
2025-06-10 15:02:05 +02:00
Robert Schmidt
852fd7fd6c Merge remote-tracking branch 'origin/n2-ho-preparation-work' into integration_2025_w24 (!3354)
Preparation Work for N2 Handover

This MR introduces preliminary improvements to support !3334.

Refactored utility NGAP functions

- Moved allocAddrCopy to NGAP utilities

Decoding Functions for NGAP IEs:

- Added common decoding functions (decode_ngap_guami,
  decode_ngap_UEAggregateMaximumBitRate, decode_ngap_nssai, etc.)
- Adopted these functions across the NGAP stack

Improvements to RRC and Handover Handling:

- Enhanced get_neighbour_cell_information and get_neighbour_config to
  differentiate input parameters (cell by NR Cell ID vs. gNB by PCI)
- Used byte_array_t in nr_initiate_handover
- Introduced RRCReconfigurationParams_t to structure RRCReconfiguration
  IEs
- Added a function to build NR_RRCReconfiguration_IEs_t
- Adopted this approach in do_RRCReconfiguration and refactored the
  function
- Refactored the handling of Dedicated NAS message list
- Add masterKeyUpdate handling in RRCReconfiguration generation

PDCP Re-Establishment Improvements:

- Enabled PDCP re-establishment for SRB1/SRB2 based on a bitmap in
  createSRBlist (3GPP TS 38.331 RadioBearerConfig)

NH & KgNB Key Management:

- Added NH derivation function as per 3GPP TS 33.501 A.10
- Moved KgNB derivation function to key_nas_deriver utilities
2025-06-10 14:59:58 +02:00
Raymond Knopp
1153721b19 changes for multi-RU DAS scenario, handling of antenna ports in 7.2 (memory allocations for PRACH and neAxc in fh_config) 2025-06-10 12:11:51 +02:00
Raymond Knopp
a1a4f24d0f hotfix for F. Mani's update to nr_feptx_prec handling of multiple beams 2025-06-10 12:11:51 +02:00
francescomani
e15631b23c adapting nr_feptx_prec function to analog beam management 2025-06-10 12:11:51 +02:00
francescomani
3743719b88 fix wrong assertion in nr_fill_prach_ru 2025-06-10 12:11:51 +02:00
francescomani
f555bf2957 analog beamforming based distributed antenna system 2025-06-10 12:11:49 +02:00
francescomani
964c737b7d simplify get_nr_prach_duration function 2025-06-10 12:10:59 +02:00
francescomani
9f97191243 fix beam allocation for multiple TD prach occasions in a slot 2025-06-10 12:10:59 +02:00
francescomani
be8771189e moving beam weigths to MACRLC config file section and requiring only a single beam index per beam in analog beamforming 2025-06-10 12:10:59 +02:00
francescomani
bf6ddb70c4 extension of analog beamforming doc to lower layers 2025-06-10 12:10:59 +02:00
francescomani
93b08c5f20 bugfix in L1 analog beam allocation
the allocation in L1 is done symbol-wise but the L2 is scheduling beams slot-based
this means we need to check for beam availability in the whole slot
2025-06-10 12:10:59 +02:00
francescomani
038247f074 RU analog beam management (not for 7.2) 2025-06-10 12:10:59 +02:00
Rúben Soares Silva
f5072833b6 Add pack/unpack functionality for 2 new vendor extension TLVs.
Add the ability to pack/unpack 2 new TLVs for analog beamforming
total_num_beams_vendor_ext and analog_beam_list
Add the unpack related changes for the first 2 vendor extension TLVs introduced related to beamforming.

For the moment the packing is guarded by an Assert to ensure it is not used.

Add the necessary utility function changes to support these VE TLVs

Add the necessary changes to the corresponding unitary test for pack/unpack,
commented for the moment, since the packing is disabled with an Assert.
2025-06-10 12:10:59 +02:00
francescomani
675e1129b4 using the analog beamforming oai extension fapi fields instead of digital beamforming structure for analog beamforming 2025-06-10 12:10:55 +02:00
Teodora
83df3c5e79 Add OSC nearRT-RIC J release contribution and xDevSM framework 2025-06-10 10:51:32 +02:00
Guido Casati
03b6e32fdb Rename nr_neighbour_gnb_configuration_t to nr_neighbour_cell_t for clarity 2025-06-10 10:47:11 +02:00
Guido Casati
f5f61162ff Add mismatch warning in AMF selection utility functions 2025-06-10 10:05:44 +02:00
Guido Casati
90230078b4 Select AMF by PLMN ID when no other ue_identity.presenceMask is present and/or matching
The mask could be present, .e.g not zero, but the selection of the AMF could
fail. This would lead to a skipping the selection of the AMF by PLMN ID,
which is the last option when no UE identity is present and/or matching.
2025-06-10 10:05:44 +02:00
Guido Casati
a06457bab6 Fix direct leak in rrc_gNB_send_NGAP_NAS_FIRST_REQ
Free memory allocated in NGAP after use in RRC.

 Direct leak of 29 byte(s) in 1 object(s) allocated from:
    > #0 0x7f11200b4887 in __interceptor_malloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:145
    > #1 0x558b7fcd0137 in malloc_or_fail /n2-handover-preparation/common/utils/utils.h:86
    > #2 0x558b7fcd0137 in create_byte_array /n2-handover-preparation/common/utils/ds/byte_array.c:32
    > #3 0x558b7fdb7a5c in rrc_gNB_send_NGAP_NAS_FIRST_REQ /n2-handover-preparation/openair2/RRC/NR/rrc_gNB_NGAP.c:183
    > #4 0x558b7fd2ab30 in rrc_gNB_process_RRCSetupComplete /n2-handover-preparation/openair2/RRC/NR/rrc_gNB.c:439
    > #5 0x558b7fd2ab30 in handle_rrcSetupComplete /n2-handover-preparation/openair2/RRC/NR/rrc_gNB.c:1715
    > #6 0x558b7fd63e23 in rrc_gNB_decode_dcch /n2-handover-preparation/openair2/RRC/NR/rrc_gNB.c:1851
    > #7 0x558b7fd8b4c3 in rrc_gnb_task /n2-handover-preparation/openair2/RRC/NR/rrc_gNB.c:2718
    > #8 0x7f111ea94ac2 in start_thread nptl/pthread_create.c:442
2025-06-09 20:43:44 +02:00
Guido Casati
114f833a77 Fix memory leak in createSRBlist
ASN_SEQUENCE_ADD is calling realloc which is allocating memory for the
'array' which was not freed.

> Direct leak of 32 byte(s) in 1 object(s) allocated from:
>     #0 0x7ce97deb4c38 in __interceptor_realloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:164
>     #1 0x5813fba02574 in asn_set_add /openairinterface5g/n2-handover-preparation/cmake_targets/ran_build/build/openair2/RRC/LTE/MESSAGES/asn_SET_OF.c:27
>     #2 0x5813faf6c672 in createSRBlist /openairinterface5g/n2-handover-preparation/openair2/RRC/NR/rrc_gNB.c:331
>     #3 0x5813faf9aa78 in rrc_gNB_generate_RRCSetup /openairinterface5g/n2-handover-preparation/openair2/RRC/NR/rrc_gNB.c:421
>     #4 0x5813fafba2ee in rrc_handle_RRCSetupRequest /openairinterface5g/n2-handover-preparation/openair2/RRC/NR/rrc_gNB.c:1243
>     #5 0x5813fafba2ee in rrc_gNB_process_initial_ul_rrc_message /openairinterface5g/n2-handover-preparation/openair2/RRC/NR/rrc_gNB.c:2019
>     #6 0x5813fafcdc3a in rrc_gnb_task /openairinterface5g/n2-handover-preparation/openair2/RRC/NR/rrc_gNB.c:2761
>     #7 0x7ce97c894ac2 in start_thread nptl/pthread_create.c:442

> Direct leak of 32 byte(s) in 1 object(s) allocated from:
>     #0 0x7ce97deb4c38 in __interceptor_realloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:164
>     #1 0x5813fba02574 in asn_set_add /openairinterface5g/n2-handover-preparation/cmake_targets/ran_build/build/openair2/RRC/LTE/MESSAGES/asn_SET_OF.c:27
>     #2 0x5813faf6c672 in createSRBlist /openairinterface5g/n2-handover-preparation/openair2/RRC/NR/rrc_gNB.c:331
>     #3 0x5813faf7d89d in get_RRCReconfiguration_params /openairinterface5g/n2-handover-preparation/openair2/RRC/NR/rrc_gNB.c:660
>     #4 0x5813faf914b3 in rrc_gNB_generate_dedicatedRRCReconfiguration /openairinterface5g/n2-handover-preparation/openair2/RRC/NR/rrc_gNB.c:716
>     #5 0x5813faf96856 in rrc_CU_process_ue_context_setup_response /openairinterface5g/n2-handover-preparation/openair2/RRC/NR/rrc_gNB.c:2190
>     #6 0x5813fafcd3ed in rrc_gnb_task /openairinterface5g/n2-handover-preparation/openair2/RRC/NR/rrc_gNB.c:2796
>     #7 0x7ce97c894ac2 in start_thread nptl/pthread_create.c:442
2025-06-09 20:43:44 +02:00
Guido Casati
12d9e1f116 Fix memory leak in fill_neighbour_cell_configuration
dynamically allocated memory is pushed to the seq_arr that
is doing a memcpy, so it can be either or better allocated
in the stack instead

> Direct leak of 16 byte(s) in 1 object(s) allocated from:
>    #0 0x7efd8f6b4a57 in __interceptor_calloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:154
>    #1 0x577888f3457e in fill_neighbour_cell_configuration /openairinterface5g/n2-handover-preparation/openair2/GNB_APP/gnb_config.c:1914
>    #2 0x577888f3457e in RCconfig_NRRRC /openairinterface5g/n2-handover-preparation/openair2/GNB_APP/gnb_config.c:2108
>    #3 0x57788869a0d2 in create_gNB_tasks /openairinterface5g/n2-handover-preparation/executables/nr-softmodem.c:253
>    #4 0x57788869a0d2 in main /openairinterface5g/n2-handover-preparation/executables/nr-softmodem.c:619
>    #5 0x7efd8e029d8f in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58
2025-06-09 20:43:44 +02:00
Guido Casati
abcc00945e Fix memory leak in fill_neighbour_cell_configuration
the dynamically allocated memory is pushed to the seq_arr that
is doing a memcpy, so it can be either or better allocated in the
stack instead

> Direct leak of 48 byte(s) in 1 object(s) allocated from:
>    #0 0x7d4c934b4a57 in __interceptor_calloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:154
>    #1 0x577622a40137 in fill_neighbour_cell_configuration /openairinterface5g/n2-handover-preparation/openair2/GNB_APP/gnb_config.c:1933
>    #2 0x577622a40137 in RCconfig_NRRRC /openairinterface5g/n2-handover-preparation/openair2/GNB_APP/gnb_config.c:2109
>    #3 0x5776221a30f2 in create_gNB_tasks /openairinterface5g/n2-handover-preparation/executables/nr-softmodem.c:253
>    #4 0x5776221a30f2 in main /openairinterface5g/n2-handover-preparation/executables/nr-softmodem.c:619
>    #5 0x7d4c91e29d8f in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58
2025-06-09 20:43:44 +02:00
Guido Casati
70239c086c Fix memory leak in fill_measurement_configuration
seq_arr_push_back is doing a memcpy so locally allocated memory can be freed after.
Allocate in stack.

> Direct leak of 64 byte(s) in 2 object(s) allocated from:
>    #0 0x7ec4bb8b4a57 in __interceptor_calloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:154
>    #1 0x55895aae1b1f in fill_measurement_configuration /openairinterface5g/n2-handover-preparation/openair2/GNB_APP/gnb_config.c:2015
>    #2 0x55895aae1b1f in RCconfig_NRRRC /openairinterface5g/n2-handover-preparation/openair2/GNB_APP/gnb_config.c:2112
>    #3 0x55895a246112 in create_gNB_tasks /openairinterface5g/n2-handover-preparation/executables/nr-softmodem.c:253
>    #4 0x55895a246112 in main /openairinterface5g/n2-handover-preparation/executables/nr-softmodem.c:619
>    #5 0x7ec4ba229d8f in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58
2025-06-09 20:43:44 +02:00
Guido Casati
dca7e6c95d Rework handover ack callback
Inside of passing the RRCReconfiguration buffer, call RRCReconfiguration
message generation inside the F1 callback. This will simplify the code in the
rrc_CU_process_ue_context_setup_response() function once the N2 handover case
is introduced. In rrc_CU_process_ue_context_setup_response(), with presence
of the HO context, the HO ACK callback is called only once and depending
on the type of HO it will do either RRCReconfiguration for F1 and
HandoverCommand for N2.
2025-06-09 20:43:42 +02:00
Guido Casati
7fba453329 Pass byte_array_t to handover acknowledge function
The byte_array reference contains the pointer to the
encoded RRC buffer to be used in the handover acknowledge
callback (e.g. in F1 to trigger RRCReconfiguration)
2025-06-09 20:43:42 +02:00
Guido Casati
60535aae99 Use get_RRCReconfiguration_params in rrc_gNB_generate_dedicatedRRCReconfiguration 2025-06-09 20:43:42 +02:00
Guido Casati
d18830f359 Enable PDCP re-establishment for SRB1/SRB2 based on bitmap in createSRBlist
This is necessary because the function was re-establishing PDCP only for SRB2
however according to specs 3GPP TS 38.331 RadioBearerConfig, PDCP shall be
re-established for SRB1 and/or SRB2 whenever the security key used for the
radio bearer changes, with some exceptions for SRB1 (i.e. when resuming
an RRC connection, or at the first reconfiguration after RRC connection
reestablishment in NR, do not re-establish PDCP for SRB1).

* the input param "reestablish" is converted into a bitmap to indicate
  whether PDCP should be re-established for the SRB1 and/or SRB2.
* For convenience the bitmap is 0-based, with index 1 corresponding to SRB1,
  index 2 to SRB2.

This commit is keeping the legacy re-establishment, that is re-establishment
of PCDP for SRB2 only.
2025-06-09 20:43:41 +02:00
Guido Casati
a937eaec23 Rework RRCReconfiguration handling in RRC/ASN1
according to TS 38.331, RRCReconfiguration messages can be carried
in a container by different RRC messages, e.g. HandoverPreparationInformation,
HandoverCommand, RRCResume etc.. therefore before the introduction of new
RRCReconfiguration messages, e.g. for handover, a new design seems to be necessary
in order to improve modularity and maintainability of the code.

The goal of this commit is to make the generation of RRCReconfiguration
messages more modular by (1) preparing the RRCReconfiguration parameters
data in RRC (2) pass it to ASN1 for IEs allocation (3) encode to buffer

The following changes are introduced:
(1) introduce struct nr_rrc_reconfig_param_t to store the RRC parameters relevant
    to encode the RRCReconfiguration IEs
(2) add RRC function get_RRCReconfiguration_params to fetch nr_rrc_reconfig_param_t
    data from the UE context and
(3) pass it to the ASN1 encoder, e.g. do_RRCReconfiguration
(4) add a function build_RRCReconfiguration_IEs to allocate memory and build the
    ASN1 NR_RRCReconfiguration_IEs_t and
(5) adopt it in do_RRCReconfiguration
(4) add free_RRCReconfiguration_params for memory management of nr_rrc_reconfig_param_t data
(6) add test for rrc_reconfiguration

get_RRCReconfiguration_params:

This function prepares RRCReconfigurationParams for RRC encoding.

Motivation of this change: depending on the RRCReconfiguration
message to be encoded, the ownership of ASN1 memory allocation
should belong to the ASN1 layer, therefore this function is
preparing the nr_rrc_reconfig_param_t data to pass to the
ASN1 encoder to build the ASN1 message and encode to buffer

The function is preparing the params for the IEs that are
either mandatory or shared among different RRC messages.
Specific fields that depend on the message to be encoded are then
added afterwards in the caller. The input param to indicate
re-establishment has been split between SRBs and DRBs, since
depending on the scenario the PDCP re-establishment can vary.
This will be addressed in a later commit.

This function is also handling xid.

build_RRCReconfiguration_IE:

The long term goal is to transfer ownership of memory allocation in ASN1 encoding to
build_RRCReconfiguration_IE, then by calling ASN_STRUCT_FREE_CONTENTS_ONLY
on dl_dcch_msg, all IEs allocated in the context are freed after encoding to buffer.
In the long term, createDRBlist, createSRBlist can also be brought into the context
of build_RRCReconfiguration_IEs and free the ASN1 structure after encoding.
This improves maintability and helps preventing memory leaks.

Currently, what is not allocated in the context, is nulled and freed outside.

free_RRCReconfiguration_params:

this function frees memory allocated to build the nr_rrc_reconfig_param_t data,
including the NR_DRB_ToAddModList_t and NR_SRB_ToAddModList_t. The function
freeDRBlist has been removed since no longer necessary.

dedicated_NAS_msg_list:

dedicated_NAS_msg_list handling has also been refactored, by:

(1) fetch the NAS PDUs from the UE context in get_RRCReconfiguration_params,
which translates to (2) passing an array of dedicatedNAS-MessageList + size
to the ASN1 encoding function where (3) the ASN1 encoding logic for the
dedicated_NAS_msg_list IE has been moved

Note, 3GPP TS 38.331:
dedicatedNAS-MessageList: SEQUENCE (SIZE(1..maxDRB)) OF DedicatedNAS-Message
2025-06-09 20:43:04 +02:00
Guido Casati
d413cf9696 Refactor handover functions: get_neighbour_cell_information and get_neighbour_config
* differentiate the 2 functions based on the input: either NR Cell ID or PCI
* enhanced variables naming to distinguish the parameters
* add logging for debugging purposes
2025-06-09 20:12:12 +02:00
batuhan duyuler
75c7220345 Refactored code to populate DRBs to be setup list in nr_initiate_handover
Co-authored-by: Guido Casati <guido.casati@firecell.io>
2025-06-09 20:12:12 +02:00
Guido Casati
63b4a784a8 Use byte_array_t in nr_initiate_handover 2025-06-09 20:12:12 +02:00
Guido Casati
eb4cd38577 Refactor handling of NGAP UE Context in ngap_gNB_handle_nas_first_req
this commit is refactoring the function ngap_gNB_handle_nas_first_req
to (1) fill first a local instance of ngap_gNB_ue_context_t and then
(2) pass it to ngap_store_ue_context which will allocate memory
for the instance to store in ngap
2025-06-09 20:12:12 +02:00
Guido Casati
9d951b109f Return in nr_ue_get_sdu when mac->lc_ordered_list.count is 0
This count is used to size the dynamic array lcids_bj_pos. In case
count is zero, this would lead to runtime error. With this change,
the function will indicate to the caller that no SDUs are present and
will print an error.
2025-06-09 20:12:12 +02:00
Guido Casati
de0730a4e8 Use module_id in rrc_gNB_get_next_transaction_identifier call 2025-06-09 20:11:55 +02:00
Guido Casati
6de5b1d3de Store PCI received in reconfigurationWithSync
According to 3GPP TS 38.331 5.3.5.5.2 (Reconfiguration with sync), the UE
shall consider the target SpCell to be one with a physical cell identity
indicated by the physCellId
2025-06-09 20:10:01 +02:00
Guido Casati
70eb09dc09 Add NH derivation function (A.10 3GPP TS 33.501) 2025-06-09 20:10:01 +02:00
Guido Casati
bd1f266ab5 Add utility to log hex buffer with size len (LOG_D) and remove unused legacy hex_dump
* logging buffer is pretty useful for debugging purposes, e.g. derived key values
2025-06-09 20:10:01 +02:00
Guido Casati
d06790fcf2 Move derive_kgnb to key_nas_deriver lib 2025-06-09 20:10:01 +02:00
Guido Casati
1d2fb5af9d Fix FC value definition for NH (A.10 3GPP TS 33.501) 2025-06-09 20:10:01 +02:00
francescomani
e3e516e652 Reception of RRC Setup as response to re-establishment request
It also introduces state for resume request (even if not yet implemented)
2025-06-09 15:17:15 +02:00
francescomani
8a544b9fbb simpler RU beam management by storing RU beam index at L1 instead of FAPI beam index 2025-06-09 12:00:17 +02:00
Teodora
26b3b16aa5 Move the OSC nearRT-RIC tutorial in OAI E2 agent from FlexRIC 2025-06-07 14:41:17 +02:00
Robert Schmidt
842ab32c91 ITTI: remove useless log_scheduler() function
The primary motivation here is to remove a VLA, as in the parent
commits.  Closer inspection revealed that (1) it is only used by the LTE
UE, and (2) it only logs some data which we likely don't need. So I
simply removed this function.
2025-06-06 18:23:28 +02:00
francescomani
e6aeb47ea8 correct order for releasing spCellConfig 2025-06-06 11:40:47 +02:00
francescomani
3020200288 in case of DCIX0 38.214 tells us to assume it is always type1 allocation 2025-06-06 11:40:47 +02:00
Robert Schmidt
b7f00aa240 SCTP: Provide more info on getaddrinfo() fail
Upon failure, the error message was saying that something failed (i.e.,
the reason), but not parameters of the getaddrinfo(). Simplify root
cause analysis by providing the parameters for the attempted
getaddrinfo() call.
2025-06-06 07:53:58 +02:00
Jaroslava Fiedlerova
c5f5ab2820 CI: set NR RLC and NR PDCP parameters in the conf file
Default values used.
2025-06-05 14:58:37 +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
Guido Casati
eb2facfa76 Add macro to iterate over seq_arr_t 2025-06-05 11:37:56 +02:00
Guido Casati
5e2d7638d1 Move allocAddrCopy to NGAP utilities
This function is needed also in upcoming NGAP
libraries (i.e. N2 Handover) and therefore is moved
to the NGAP utilities file. The function converts
transport_layer_addr_t data struct to BIT_STRING_t
by copying the content of its members. The naming
is also updated to tnl_to_bitstring.
2025-06-05 11:35:51 +02:00
Guido Casati
615f5ef663 Add decoding functions for common NGAP IEs and use in stack
* Functions added:
  decode_ngap_guami
  decode_ngap_UEAggregateMaximumBitRate
  decode_ngap_nssai
  decode_ngap_security_capabilities
  decode_ngap_mobility_restriction
* Adopt these functions in the common NGAP library
2025-06-05 11:35:45 +02:00
Guido Casati
4b2cd156bb Adopt existing ngap_ambr_t in NGAP PDU Session Setup Request 2025-06-05 11:30:59 +02:00
Teodora
5b837f9250 Remove unnecessary shared volume for SMs
Follow-up for 497b4d3451.
2025-06-05 11:23:58 +02:00
rmagueta
7080810e49 Refactor SRS configuration 2025-06-05 10:19:55 +01:00
rmagueta
d851e7799c Fix segmentation fault and LOGs for SRS usage NFAPI_NR_SRS_BEAMMANAGEMENT 2025-06-05 10:19:55 +01:00
Cedric Roux
127ba6f0d9 add checks for allowed sections 2025-06-05 10:14:58 +02:00
Cedric Roux
c1372a52c8 bugfix: don't print '.' if no prefix
It's confusing to read "Section ".rlc" not allowed" when it should be
"Section "rlc" not allowed".
2025-06-05 10:13:09 +02:00
francescomani
bd05075ac6 code cosmetic improvement 2025-06-05 09:42:49 +02:00
Cedric Roux
915f9d55d8 fix asn1 test compilation
encode_xx() are needed
2025-06-05 09:18:49 +02:00
Cedric Roux
b9dffde03e adapt existing code to use NR RLC and NR PDCP values from configuration
- remove hardcoded values
- adapt gNB RRC code
- adapt gNB MAC code
- adapt physical simulators, where we put the hardcoded values
  that were everywhere else before; if there is a need for those
  simulators to get configurable values, more work is needed
  (but it's doubtful that it is needed)
2025-06-05 09:18:48 +02:00
Cedric Roux
178a5a66d4 add functions to retrieve configuration values for NR RLC and NR PDCP
They will be used in a later commit.
2025-06-05 08:58:07 +02:00
Cedric Roux
e214ffc0f3 add configuration for NR RLC to the MAC gNB structure
A later commit will use it.
2025-06-05 08:58:07 +02:00
Cedric Roux
82a3911971 add configuration for NR RLC and NR PDCP to the RRC gNB structure
A later commit will use them.
2025-06-05 08:58:07 +02:00
Cedric Roux
3f2eddd6ba simplify NR PDCP ASN.1 decoding and add encoding for configuration values 2025-06-05 08:58:07 +02:00
Cedric Roux
9845891ec4 simplify NR RLC ASN.1 decoding and add encoding for configuration values 2025-06-05 08:58:07 +02:00
Cedric Roux
7852518bd3 add NR PDCP parameter definitions
To be used in a later commit to retrieve NR PDCP configuration
parameters.

To use, add the following to the configuration file (outside of other
configurations). Adapt the values to your setup. The names ("len18bits",
"ms100", etc.) come from 3GPP TS 38.331.

pdcp = {
  drb = {
    sn_size = "len18bits"
    t_reordering  = "ms100"
    discard_timer = "infinity"
  }
}

Default values are applied if the configuration is absent.
The default values are the ones given above.
2025-06-05 08:58:07 +02:00
Cedric Roux
f70d2f1312 add NR RLC parameter definitions
To be used in a later commit to retrieve NR RLC configuration
parameters.

To use, add the following to the configuration file (outside of other
configurations). Adapt the values to your setup. The names ("ms45",
"size12", etc.) come from 3GPP TS 38.331.

rlc = {
  srb = {
    t_poll_retransmit = "ms45"
    t_reassembly = "ms25"
    t_status_prohibit = "ms0"
    poll_pdu = "infinity"
    poll_byte = "infinity"
    max_retx_threshold = "t8"
    sn_field_length = "size12"
  }
  drb_am = {
    t_poll_retransmit = "ms45"
    t_reassembly = "ms15"
    t_status_prohibit = "ms15"
    poll_pdu = "p64"
    poll_byte = "kB500"
    max_retx_threshold = "t32"
    sn_field_length = "size18"
  }
  drb_um = {
    t_reassembly = "ms15"
    sn_field_length = "size12"
  }
}

Default values are applied if the configuration is absent.
The default values are the ones given above.
2025-06-05 08:58:07 +02:00
Cedric Roux
c7ce407a4b add configuration values and structure for NR PDCP 2025-06-05 08:58:07 +02:00
Cedric Roux
1d0b8c1dc6 add configuration values and structure for NR RLC 2025-06-05 08:58:07 +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
Robert Schmidt
627e60f5bd Merge branch 'integration_2025_w23' into 'develop'
Integration: `2025.w23`

Closes #962, #956, and #801

See merge request oai/openairinterface5g!3464

* !3302 Enhance UE identity management in Initial UE Message and other NGAP improvements
* !3400 T bugfix: check input data a bit better
* !3459 Improvements in NR band tables according to Rel.17
* !3465 Fix checking that amf_ip_address section is not set.
* !3463 Move RRC radio parameters file to DU
* CI: Use host network mode in NSA-B200 pipeline
* !3389 Relax NR_UE_CAPABILITY_SLOT_RX_TO_TX asserts
* !3417 Imscope updates
* !3443 Fix data race in NR UE MSG3 scheduling
* !3467 remove dead globals
2025-06-04 20:14:00 +00:00
Utku Ucak
401ebe17b2 fix config file 2025-06-04 13:31:46 +00:00
Jaroslava Fiedlerova
a0578a5205 Merge remote-tracking branch 'origin/remove-dead-variables' into integration_2025_w23 (!3467)
remove dead globals
2025-06-03 19:00:18 +02:00
Jaroslava Fiedlerova
3bf3b78cb6 Merge remote-tracking branch 'origin/fix-msg3-datarace' into integration_2025_w23 (!3443)
Fix data race in NR UE MSG3 scheduling

Fixed a data race between DL processing of RAR and UL scheduler, which might
result in dropping MSG3.

It was possible that the UL scheduler for the UL slot which RAR indicates as
MSG3 slot was already run by the time the RAR was decoded.

Therefore when DCI for RAR is decoded, assume worst case and halt UL scheduler
for next slot until RAR is decoded solving the data race. This also in turn
halts all later scheduling due to sequential nature of the UL scheduler calls.

Closes #962
2025-06-03 18:59:16 +02:00
Jaroslava Fiedlerova
8fbee94045 Merge remote-tracking branch 'origin/imscope-csv-export' into integration_2025_w23 (!3417)
imscope updates

- Add CSV export button to imscope
- Add extra cache for IQ data in imscope record thread so that UE time domain
  data can be kept until PDSCH is decoded.
- Add metadata to UE time domain samples scope
- Add UE pdsch pre-compensation IQ and PDSCH channel estimates
2025-06-03 18:04:29 +02:00
Jaroslava Fiedlerova
4104a1fbcf Merge remote-tracking branch 'origin/relax-ue-k1k2-assert' into integration_2025_w23 (!3389)
Relax NR_UE_CAPABILITY_SLOT_RX_TO_TX asserts

Relax the UEs requirements on k1/k2 value.
2025-06-03 18:03:35 +02:00
Jaroslava Fiedlerova
404e0b3ba8 Merge remote-tracking branch 'origin/nr-rrc-config-at-mac' into integration_2025_w23 (!3463)
Move RRC radio parameters file to DU

A number of radio-related RRC parameters, e.g., CellGroupConfig, "originate" at
the DU and are sent to the CU for forwarding to the UE only. Similarly, there
are additional parameters, e.g., RLC-BearerConfig (part of CellGroupConfig),
that originate at the DU.

Hence, the DU decides about these parameters, depending on the MAC state and
capabilities. To clarify this, move the existing

openair2/RRC/NR/nr_rrc_config.{c,h} => openair2/LAYER2/NR_MAC_gNB/nr_radio_config.{c,h}

So that developers know that while those are RRC parameters, they originate at
the DU.

In other words, the CU/RRC is not supposed to use any of these functions in
the RRC. Correspondingly, includes of this file have been cleaned up (and when
they are not necessary at the MAC as well)
2025-06-03 18:00:49 +02:00
Teodora
a84a5328f2 Make xApp duration flexible
Improvement introduced in 0410c02372.
2025-06-03 17:07:31 +02:00
Teodora
498d2f8b37 Improve OAI-FlexRIC CI pipeline
Instead of running xApps from oai-flexric container,
create dedicated xApp containers.

In addition, modify the flexric.conf: DB_PATH doesn't exist;
DB_DIR is the correct name.
2025-06-03 17:07:03 +02:00
Teodora
735bc2fa05 Delete unnecessary test cases for OAI-FlexRIC CI pipeline
Needless sleep time test case, and duplicated test case for
the xApp with custom SMs.
2025-06-03 17:07:03 +02:00
Teodora
bd97d11654 Update FlexRIC submodule commit ID 2025-06-03 17:07:03 +02:00
Teodora
227f9e92f6 Properly fill RC RAN Function Name
Follow-up for 143c0238e9.
2025-06-03 17:07:03 +02:00
Teodora
dfa1bd4efe Add the NSSAI logging condition in KPM
It is a periodic output, based on the reporting period.
2025-06-03 17:07:03 +02:00
Teodora
2644594c32 Update the E2AP README
- prerequisites - use the links to FlexRIC tutorial
  - build FlexRIC - use the build tutorial from FlexRIC tutorial
  - explain in more details the supported service model functionalities
  - explanation if no RIC INDICATION is being sent
  - use multi-UE rfsim tutorial from doc/, not oai-workshops repository
2025-06-03 17:06:44 +02:00
Laurent THOMAS
72c29248a3 remove dead globals 2025-06-03 17:03:17 +02:00
Bartosz Podrygajlo
85f3e62caf Fix data race in NR UE MSG3 scheduling
Fixed a data race between DL processing of RAR and UL scheduler, which
might result in dropping MSG3.

It was possible that the UL scheduler for the UL slot which RAR
indicates as MSG3 slot was already run by the time the RAR was decoded.

Therefore when DCI for RAR is decoded, assume worst case and halt the
earliest corresponding UL scheduler call until RAR is decoded solving
the data race. This also in turn halts all later scheduling due to
sequential nature of the UL scheduler calls.
2025-06-03 14:41:06 +02:00
Jaroslava Fiedlerova
c52e2681c2 CI: Use host network mode in NSA-B200 pipeline
Following a power cycle of the CI machines in the NSA-B200 setup, the gNB
machine encountered a networking issue. Although packets were observed leaving
and returning to the host of gNB, they failed to reach the container.

Debugging steps taken:
- upgraded the gNB machine
- reinstalled Docker
- reviewed and verified IP rules and routing settings

Setting the container to use host network mode resolved the issue.
2025-06-03 13:25:01 +02:00
Bartosz Podrygajlo
456fe094bc Add UE PDSCH ChanEst and pre-compensation IQ to imscope 2025-06-03 13:15:33 +02:00
Bartosz Podrygajlo
114ac4d1bb Add metadata to UE time domain samples scope
Also fix the unintentional one symbol time delay.
2025-06-03 11:47:50 +02:00
Bartosz Podrygajlo
b58870d47c Add CSV iq export to Imscope
Add CSV export button to imscope.
2025-06-03 11:47:42 +02:00
Bartosz Podrygajlo
4ebe910363 Add extra cache for imscope record thread
This should allow to capture UE time domain data after PDSCH decoding failure.
2025-06-03 11:46:23 +02:00
Jaroslava Fiedlerova
12d3ef48eb Merge remote-tracking branch 'origin/fix-config-not-set' into integration_2025_w23 (!3465)
Fix checking that amf_ip_address section is not set.

The constructed setting path with prefix was invalid.

Closes #956
2025-06-03 10:51:46 +02:00
Jaroslava Fiedlerova
7efbdef2dc Merge remote-tracking branch 'origin/NR_bands_fix' into integration_2025_w23 (!3459)
Improvements in NR band tables according to Rel.17

Following a request in the mailing list
2025-06-03 10:50:07 +02:00
Bartosz Podrygajlo
fc3e9f0efe UE TX time budget
Measure the UEs TX time budget and warn if its violated.
2025-06-03 08:57:40 +02:00
Bartosz Podrygajlo
e676d0d2cc Relax NR_UE_CAPABILITY_SLOT_RX_TO_TX asserts
Relax the UEs requirements on k1/k2 value.
2025-06-03 08:56:31 +02:00
Bartosz Podrygajlo
debad23a7e Fix checking that amf_ip_address section is not set.
The constructed setting path with prefix was invalid.
2025-06-02 17:36:48 +02:00
Jaroslava Fiedlerova
2b4bbf7930 Merge remote-tracking branch 'origin/bugfix-t-event-checks' into integration_2025_w23 (!3400)
T bugfix: check input data a bit better

Some small fixes in T tracers.
2025-06-02 16:44:36 +02:00
Jaroslava Fiedlerova
dda3b7e88d Merge remote-tracking branch 'origin/issue-801' into integration_2025_w23 (!3302)
Enhance UE identity management in Initial UE Message and other NGAP improvements

This MR improves the Initial UE Message procedures by supporting simultaneous
presence of both 5G-S-TMSI and GUAMI. Previously, only one identity could be
used, leading to potential AMF selection failures. Now the presenceMask allows
both identities. The AMF selection is prioritizing GUAMI first, then falling
back to 5G-S-TMSI, and finally using PLMN or highest capacity.

Also, fix handling of selected PLMN identity in NGAP.

Refactoring:
- Select the AMF based on (1) absence of UE Identity (2) Presence of GUAMI
  (3) Presence of 5G-S-TMSI
- Also refactored the AMF selection logic for better readability and reliability.
- Refactor and cleanup rrc_gNB_send_NGAP_NAS_FIRST_REQ
- Replace ngap_pdu_t with byte_array_t
- Add guami_t to ngran_types.h: refactor NGAP and RRC code to use one common
  GUAMI type instead of two identical ones

Also:
- Bugfix in ngap_gNB_handle_ng_setup_response: use correct count for PLMNSupportList

Closes issue #801
2025-06-02 16:20:24 +02:00
Teodora
2b3e1772d6 Add e2_agent section in CU/DU split configuration 2025-06-02 15:22:35 +02:00
Teodora
3f930551ff Fix CU to not contain the pointer for MAC/RLC stats
Segmentation fault occured since the commit ID 9e5c5497ab,
where we try to copy the pointer which was not even been allocated. Before, we were
copying the address of a NULL pointer and therefore no segmentation fault.

This commit fixes the segmentation fault by checking if the memory was allocated, i.e. should not be
in the case of CU (as it doesn't contain MAC/RLC layers).
2025-06-02 15:22:35 +02:00
Teodora
f5a75caa4c Do not check E2AP/KPM versions if E2 agent disabled 2025-06-02 15:22:35 +02:00
Teodora
4f7b44e862 Remove the cmake option XAPP_MULTILANGUAGE from all Dockerfiles
The FlexRIC main CMakeLists.txt sets XAPP_MULTILANGUAGE to OFF by default.
Related commit ID: 637f718c32
2025-06-02 15:22:02 +02:00
Robert Schmidt
4d755c9a1a Move nr_rrc_config.c to DU and rename nr_radio_config.c
A number of radio-related RRC parameters, e.g., CellGroupConfig,
"originate" at the DU and are sent to the CU for forwarding to the UE
only. Similarly, there are additional parameters, e.g., RLC-BearerConfig
(part of CellGroupConfig), that originate at the DU.

Hence, the DU decides about these parameters, depending on the MAC state
and capabilities. To clarify this, move the existing

  openair2/RRC/NR/nr_rrc_config.{c,h} => openair2/LAYER2/NR_MAC_gNB/nr_radio_config.{c,h}

So that developers know that while those are RRC parameters, they
originate at the DU.

In other words, the CU/RRC is not supposed to use any of these functions
in the RRC. Correspondingly, includes of this file have been cleaned up
(and when they are not necessary at the MAC as well).
2025-06-02 14:13:51 +02:00
Robert Schmidt
c334ad7f7c Remove unused, add necessary headers 2025-06-02 11:43:40 +02:00
Robert Schmidt
8bf48f326a Move NR_MAX_SUPPORTED_DL_LAYERS to where it is used 2025-06-02 11:43:40 +02:00
Robert Schmidt
ac01fcc1b4 Move RLC-BearerConfig file to nr_rrc_config.c
One of the next commits moves nr_rrc_config.c "down to" the MAC/DU. The
BearerConfig functions are only used at the DU, so move them here in the
corresponding file.
2025-06-02 11:43:40 +02:00
Cedric Roux
7a77ee2f43 T: validate input data a bit more
When data is generated by "normal" T tracers, it should be fine.
But it might come from unknown sources and then content might be
"strange". So let's validate input data a bit more.
2025-06-02 11:19:23 +02:00
Cedric Roux
2fa337d853 T bugfix: include size of 'length' to allocated memory
The way allocation is done (granularity of 64KiB) makes a crash more
difficult to achieve, but if a trace is exactly 64KiB, we miss 4 bytes
in the realloc and then anything may happen.
2025-06-02 11:19:23 +02:00
francescomani
805d22aa3b fixing band 50 (according to newer release), band 94 and adding new bands present in Rel.17 2025-05-29 16:23:31 +02:00
Bartosz Podrygajlo
8be33ed66f Make ubuntu22 base image docker cache friendly
Use wget instead of ADD to allow efficient caching of tini install.
2025-05-29 15:10:23 +02:00
Bartosz Podrygajlo
171f1fc015 Add ccache and CPM cache in ubuntu22 image builds 2025-05-29 13:48:01 +02:00
Robert Schmidt
bab05384a4 Merge branch 'integration_2025_w22' into 'develop'
Integration: `2025.w22`

Closes #832

See merge request oai/openairinterface5g!3452

* !3415 several fixes and cleanup for nrLDPC_coding_t2
* !3448 T: macpdu2wireshark: dump to file instead of sending UDP packets
* !3449 bugfix: pass correct buffer
* !3453 CI: revert modification of SSB per RACH occasion in SC-FDMA test
* !3440 Update NAS documentation
* !3451 fix the number of preambles per SSB at UE in case PRACH is configured with groupB
* !3441 Replace hashtable with epoll_event_t in rfsimulator
* !3277 Add CI test to force RRC IDLE and new connection setup with 5G-S-TMSI
* !3454 Keep old MAC stats after re-establishment
* !3450 Make number of UL/DL actors in NR UE fully configurable
* !3458 (doc): update README with build icons for dedicated arch and os
2025-05-28 22:03:09 +00:00
Robert Schmidt
714b223a95 Merge remote-tracking branch 'origin/readme-update' into integration_2025_w22 (!3458)
(doc): update README with build icons for dedicated arch and os
2025-05-28 14:57:04 +02:00
Robert Schmidt
68b4535328 Merge remote-tracking branch 'origin/configure-actor-framework' into integration_2025_w22 (!3450)
Make number of UL/DL actors in NR UE fully configurable

Due to different processing requirements on different CPUs it might be
beneficial to enable the users to set the number of UL/DL actors.

Allow disabling UL/DL actor frameworks and processing inline or setting
the number of DL/UL threads with --num-ul-actors/num-dl-actors

This was tested to work with 0 UL/DL actors with rfsim.
2025-05-28 14:56:38 +02:00
Guido Casati
4ad2a78706 Fix GUAMI decoding in NG Setup Response handler
GUAMI fields (Set ID, Pointer and Region ID) were decoded as Octet String,
however they are encoded as BIT STRING. Therefore, the GUAMI value was wrongly decoded.

In the AMF logs the AMF IDs are 1,1,1, however in gNB logs we had 1,64,4

Quick local test confirmed that:

---- TESTING AMF IDs = 1 ----
Region ID (OCTET STRING): 1
Region ID (BIT STRING):   1
Set ID (OCTET STRING): 64
Set ID (BIT STRING):   1
Pointer (OCTET STRING): 4
Pointer (BIT STRING):   1

The difference arises because:
- OCTET STRING treats the buffer as raw bytes, with all bits used.
- BIT STRING includes a `bits_unused` field, which tells how many padding bits
  are present in the least significant end. This is especially important in
  3GPP ASN.1 definitions like AMF Set ID (10 bits), AMF Region ID (8 bits),
  AMF Pointer (6 bits),  where the full byte(s) may contain unused bits that
  must be masked out.
2025-05-28 13:01:28 +02:00
Guido Casati
cc57bcc3a0 Log served GUAMIs, PLMNs and slices in NG Setup handler 2025-05-28 13:01:28 +02:00
Guido Casati
539d17203f Fix handling of selected PLMN in NGAP
selectedPLMN-Identity IE in RRCSetupComplete is an Index (long) of the PLMN selected
by the UE from the plmn-IdentityInfoList (SIB1) (see 3GPP TS 38.331)

while

Selected PLMN Identity in NGAP INITIAL UE MESSAGE Indicates the selected PLMN
id for the non-3GPP access (PLMN Identity ID carrying MNC, MCC and MNC size,
9.2.5.1 3GPP TS 38.413)

The legacy code was setting Selected PLMN Identity in the latter to an ID
value as the former, however in NGAP the IE to be encoded is PLMN Identity 9.3.3.5

therefore:

* set plmn type plmn_id_t in ngap_nas_first_req_t
* check whether received selectedPLMN-Identity is within bounds
* select PLMN from gNB_RrcConfigurationReq by selectedPLMN-Identity ID
  note: this commit is assuming that the plmn-IdentityInfoList in SIB1
  is matching the PLMN list in gNB_RrcConfigurationReq
* in NGAP: store the PLMN in the NGAP UE context, no need to fetch the PLMN
  in the NGAP instance since the UE context already tells what PLMN
  was selected

Closes #801
2025-05-28 13:01:28 +02:00
Guido Casati
8a0baed430 Handle both 5G-S-TMSI and GUAMI in the NGAP Initial UE Message procedures
* use bitmask to select presence of either 5G-S-TMSI or GUAMI
* select the AMF based on
  (1) absence of UE Identity (2) Presence of GUAMI (3) Presence of 5G-S-TMSI

Related to #801
2025-05-28 13:01:28 +02:00
Guido Casati
afe73820d6 Refactor and cleanup rrc_gNB_send_NGAP_NAS_FIRST_REQ
* add function to process AMF Identifier
* add function to select AMF
* set const parameters in utility nnsf functions
* adopt utilities for memory allocation
* improve readability and maintainability
* improve logging
2025-05-28 13:01:28 +02:00
Guido Casati
8fb8713023 Replace ngap_pdu_t with byte_array_t
ngap_pdu_t has the same definition as byte_array_t, so it is
replaced by the latter. This simplify the stack and reduces
duplicated code.

Also, add function create_byte_array to copy from an
existing buffer to a new byte_array_t and replaced
allocCopy with create_byte_array, and adopted
OCTET_STRING_fromBuf whenever possible.
2025-05-28 12:59:50 +02:00
arora
6574bc2c61 (doc): update README with build icons for dedicated arch and os
Signed-off-by: arora <sagar.arora@openairinterface.org>
2025-05-28 10:09:23 +02:00
Bartosz Podrygajlo
56330fde7c Make number of UL/DL actors in NR UE fully configurable
Due to different processing requirements on different CPUs it might
be beneficial to enable the users to set the number of UL/DL actors.

Allow disabling UL/DL actor frameworks and processing inline or
setting the number of DL/UL threads with --num-ul-actors/num-dl-actors

This was tested to work with 0 UL/DL actors with rfsim.
2025-05-28 07:49:10 +02:00
Jaroslava Fiedlerova
b68d63e8ba Merge remote-tracking branch 'origin/reestablishment_keep_stats' into integration_2025_w22 (!3454)
Keep old MAC stats after re-establishment
2025-05-27 19:32:09 +02:00
Jaroslava Fiedlerova
e84b567a88 Merge remote-tracking branch 'origin/add-ci-ue-rrc-idle-test' into integration_2025_w22 (!3277)
Add CI test to force RRC IDLE and new connection setup with 5G-S-TMSI

This MR is a follow up to !2725 (merged)..

The primary goal is to introduce a CI test that enforces the following behavior:
- Forces the UE to enter RRC_IDLE state.
- Validates the UE's re-connection procedure using the 5G-S-TMSI as the UE
  identity.
2025-05-27 19:30:08 +02:00
Jaroslava Fiedlerova
139c0d548c CI: change path to lteue and configs after SW update 2025-05-27 19:00:22 +02:00
Jaroslava Fiedlerova
5dd1bea5da Merge remote-tracking branch 'origin/fix_ue_groupB_preambles' into integration_2025_w22 (!3451)
fix the number of preambles per SSB at UE in case PRACH is configured with groupB

To fix an issue reported in the mailing list related to UE configured by a 3rd
party gNB with groupB PRACH
2025-05-27 12:50:54 +02:00
Jaroslava Fiedlerova
b69bc8cb5a Merge remote-tracking branch 'origin/rfsim-cleanup' into integration_2025_w22 (!3441)
Replace hashtable with epoll_event_t in rfsimulator

Replace the FD <-> buffer_t hashtable with epoll_event_t mapping. This
simplifies the code, reduces the probability of memory leaks, and removes
a possible data race on the hashtable during rfsimulator shutdown.
2025-05-27 12:49:46 +02:00
Jaroslava Fiedlerova
63f3a6fa51 Merge remote-tracking branch 'origin/nas-documentation' into integration_2025_w22 (!3440)
Update NAS documentation

This MR is updating the NAS documentation w.r.t the latest code refactoring and
current design.
2025-05-27 12:47:31 +02:00
Bartosz Podrygajlo
8f9b89925e Replace hashtable with epoll_event_t in rfsimulator
Replace the FD <-> buffer_t hashtable with epoll_event_t mapping.
This simplifies the code, reduces the probability of memory leaks and removes a
possible data race on the hashtable during rfsimulator shutdown.
2025-05-27 10:01:52 +02:00
francescomani
09543b3255 copy stats to new UE during re-establishment 2025-05-27 09:54:00 +02:00
Guido Casati
1b84bd8b65 Update README.md 2025-05-27 08:46:41 +02:00
Guido Casati
16740e5eb0 Use UL NAS Count to derive KgNB (6.8 of 3GPP TS 33.501)
The UE shall use the currently stored UL NAS count to derive the
KgNB. Hardcoding the UL count to 0 is wrong, if there is a reset
to be done it should be explicitly done elsewhere.

Closes #832
2025-05-26 17:05:00 +02:00
Guido Casati
d405cbb77f Handle security header type "integrity protected with new 5G NAS security context"
The Security Mode Command is the only NAS message sending a security header
type "integrity protected with new 5G NAS security context". Such header
type is indicating that there is no valid security context and it is
indicating the current one configured by the AMF.

When receiving a Security Mode Command the "AMF shall reset the downlink NAS COUNT"
and use it to integrity protect the initial Security Mode Command. "The AMF shall
send the SECURITY MODE COMMAND message unciphered, but shall integrity protect [...]
The AMF shall set the security header type of the message to
"integrity protected with new 5G NAS security context".

See 5.4.2.2 3GPP TS 24.501.

This commit is ensuring the NAS DL count is reset when the relevant security header
is received. Also, the security container is deleted since no more valid and
NAS_SECURITY_NO_SECURITY_CONTEXT is returned. The setup of the new security context
is done by "handle_security_mode_command",
2025-05-26 17:05:00 +02:00
Guido Casati
f672d9088c Simplify handling of security check of received NAS messages
NAS 3GPP TS 24.501 clause 4.4.4.2 specify which NAS messages
are an exception to the integrity protection. All the other
scenarios are expected to be integrity protected. The
nas_security_rx_process function is returning:

1) NAS_SECURITY_NO_SECURITY_CONTEXT if no security context is established
2) NAS_SECURITY_UNPROTECTED for the messages listed in 4.4.4.2
3) NAS_SECURITY_INTEGRITY_PASSED if the integrity check is successful

These 3 results can be all considered successful. The other not.

Also, add a function to check whether a message is allowed to be
integrity unprotected, as per clause 4.2.2.2.
2025-05-26 17:05:00 +02:00
Guido Casati
e651a29a2a Use byte_array_t in nas_security_rx_process 2025-05-26 17:05:00 +02:00
Guido Casati
7f96a04c1b Add handler for NAS Identity Request
* trigger Identity Response callback from the handler
* process decoded message

According to 4.4.4.2 3GPP TS 24.501, Identity Request
with Identity Type SUCI is not expected to be
integrity protected.
2025-05-26 17:05:00 +02:00
Guido Casati
330b8dc8fa Add library for NAS Identity Request
* Add Identity Request decoding function
* Define type for Identity Type NAS IE
* Target include directory in NAS IEs CMakeLists.txt (for NAS utils)
2025-05-26 17:05:00 +02:00
Guido Casati
737b2f44c4 Print NAS_DOWNLINK_DATA_IND message type content
The information about the payload carried by NAS DOWNLINK is helpful
in the logging and also for debugging purposes, therefore it was
added in this commit by enabling the already existing relevant function.
2025-05-26 17:05:00 +02:00
Guido Casati
4129619714 Bugfix in nas_security_rx_process: process first the security type and then the header length
This commit restores the behaviour before the changes introduced in 611c0554. The NAS
Deregistration Accept message is unprotected, therefore the function will return
NAS_SECURITY_UNPROTECTED that would then be considered as NAS_SECURITY_INTEGRITY_PASSED

Unprotected message have a plain header of 3 octets, however security protected messages
have a 7 octets header.
2025-05-26 17:05:00 +02:00
Guido Casati
f7a04de762 Add ciUE telnet command to trigger UE initiated deregistration 2025-05-26 17:05:00 +02:00
Guido Casati
bcab56afb4 sdap_tun_read_thread(): handle and log different errno 2025-05-26 17:05:00 +02:00
Guido Casati
844986ff92 SDAP: close TUN socket to unblock thread and clean interface shutdown
* Close entity->pdusession_sock manually before pthread_join() to unblock sdap_tun_read_thread()
* Update tun_destroy() to open a fresh socket for interface management, independent from the data socket
* Fix check on success of change_interface_state() in tun_destroy(): is a boolean
* Handle ENODEV error when bringing interface down: treat as success if the interface is already gone.
* tun_destroy() is now handling INTERFACE_DOWN, so `INTERFACE_DOWN` in `tun_config()` is no longer needed
2025-05-26 17:05:00 +02:00
Guido Casati
ad2a8a8991 Add 5 tests to force RRC_IDLE in a row in 5g_rfsimulator_24prb pipeline 2025-05-26 17:04:55 +02:00
Jaroslava Fiedlerova
c4617371f8 Merge remote-tracking branch 'origin/sabox-test-revert' into integration_2025_w22 (!3453)
CI: revert modification of SSB per RACH occasion in SC-FDMA test

This MR reverts the parameter ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR back
to 4, undoing the change introduced in commit a4f9a7a6. The initial modification
was made as a potential fix for a reestablishment failure observed in the SC-FDMA
test case of the SABOX-B200 pipeline. However, further validation has shown that
this parameter was not the root cause of the issue.
2025-05-26 16:06:04 +02:00
francescomani
f84ec1340c limit the number of preambles per SSB at UE in case PRACH is configured with groupB 2025-05-26 15:32:01 +02:00
Jaroslava Fiedlerova
8e2fcc900e Merge remote-tracking branch 'origin/bugfix-lte-bad-uecapabilities' into integration_2025_w22 (!3449)
bugfix: pass correct buffer
2025-05-26 12:44:32 +02:00
Jaroslava Fiedlerova
3d78eb8426 Merge remote-tracking branch 'origin/macdpu2wireshark-big-traces' into integration_2025_w22 (!3448)
T: macpdu2wireshark: dump to file instead of sending UDP packets

In NR with several layers, we may have MAC PDU of size bigger than 64KB,
which does not fit into a UDP buffer, destroying macpdu2wireshark.

Let's add an option to dump to a pcap file instead of using UDP packets.
The DLT 252 magic is used (check wireshark documentation to understand).
Run macpdu2wireshark with -h to see how to configure wireshark to read
the produced files.
2025-05-26 12:43:43 +02:00
Jaroslava Fiedlerova
afb138420b Merge remote-tracking branch 'origin/fix_nrLDPC_coding_t2' into integration_2025_w22 (!3415)
several fixes and cleanup for nrLDPC_coding_t2

Newer DPDK driver versions may directly provide the internal HW mbuf in the
dequeued structure. So don't try to free the mbufs from that dequeued structure,
but the ones we allocated. Also, this mbuf has an offset to its output data, we
must consider this when accessing the output data.

Main contents of this MR:
- support newer DPDK versions
- make sure to free allocated mbufs
- fix q_bufs memory leak
- use rte_pktmbuf_mtod_offset() to consider offset when accessing output data
- convert the correct number of LLRs from 16 Bit to 8 Bit
- remove unused variables and functions
- some more code cleanup
2025-05-26 12:41:22 +02:00
Jaroslava Fiedlerova
549c71c32c CI: revert modification of SSB per RACH occasion in SC-FDMA test
Set ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR parameter back to 4,
revert modification done in a4f9a7a6d4.
2025-05-26 12:25:27 +02:00
Raghavendra Dinavahi
bc1844b482 Added in the Conf file for testing in CI, description updated 2025-05-23 17:26:47 +02:00
Raghavendra Dinavahi
61d5dd0094 GNB-Changes: Enabling ulsyncvalidityDuration timer in SIB19
ntn-UlSyncValidityDuration in SIB19 from Spec 38.331 v17.12
A validity duration configured by the network for assistance information which indicates the maximum time duration
(from epochTime) during which the UE can apply assistance information without having acquired new assistance information.
The unit of ntn-UlSyncValidityDuration is second. Value s5 corresponds to 5 s, value s10 indicate 10 s and so on.
ntn-UlSyncValidityDuration-r17 ENUMERATED{ s5, s10, s15, s20, s25, s30, s35,s40, s45, s50, s55, s60, s120, s180, s240, s900}
Implementation of epochtime is under discussion.

It can be configured in configuration file according to the above enumeration. For GEO - 240s, MEO - 20s, LEO-5s can be used.
2025-05-23 17:26:47 +02:00
Cedric Roux
b815c8648c bugfix: pass correct buffer 2025-05-23 16:57:38 +02:00
Cedric Roux
ae650bc9ea T: macpdu2wireshark: dump to file instead of sending UDP packets
In NR with several layers, we may have MAC PDU of size bigger than 64KB,
which does not fit into a UDP buffer, destroying macpdu2wireshark.

Let's add an option to dump to a pcap file instead of using UDP packets.
The DLT 252 magic is used (check wireshark documentation to understand).
Run macpdu2wireshark with -h to see how to configure wireshark to read
the produced files.
2025-05-23 11:07:26 +02:00
Eduard Vlad
a7e2374e1d NAS Registration Reject: Add bounds and lengths checks
This change adds lengths checks to the received registration reject
message and also performs a bounds check for the received cause.
Since the cause is not checked, any string in the memory can be
dereferenced, possibly leading to DoS.

Signed-off-by: Eduard Vlad <eduard.vlad@rwth-aachen.de>
2025-05-22 15:31:28 +02:00
Eduard Vlad
5dd9ead820 DL NAS Transport: Fix Message Type retrieval on too short message
The change addresses the SM message type retrieval for DL NAS Transport
messages. The assumption of an offset 17 = 7 (MM Sec) + 3 (MM Plain) + 1
(IEI) + 2 (Len) + 4 (SM) is correct.

However, if the DL NAS Transport is received in a plain header, the
lengths would not add up anymore. (This is not complying with the
standard, so not allowed, but possible). The check for the length is
necessary to not process arbitrary memory contents beyond the
`pdu_buffer`.

Signed-off-by: Eduard Vlad <eduard.vlad@rwth-aachen.de>
2025-05-22 15:10:40 +02:00
Guido Casati
278a0bcc67 Update USIM section in 5GS NAS documentation 2025-05-20 15:46:08 +02:00
Guido Casati
4eb55f83ab Remove gNB NAS documentation section: noCore function is no longer supported 2025-05-20 15:18:07 +02:00
Guido Casati
6638839177 Update NAS documentation with information about NAS 5GS and OAI implementation status 2025-05-20 15:16:25 +02:00
Thomas Schlichter
b264ddc1ec nrLDPC_coding_t2 fix: convert the correct number of LLRs from 16 Bit to 8 Bit 2025-05-20 08:55:31 +00:00
Thomas Schlichter
073a705720 nrLDPC_coding_t2: minor cleanup 2025-05-20 08:55:30 +00:00
Thomas Schlichter
ffb8e8ff37 nrLDPC_coding_t2: nb_TBs is of type int 2025-05-20 08:53:57 +00:00
Thomas Schlichter
c3d0b2db5c nrLDPC_coding_t2 fix: use rte_pktmbuf_mtod_offset() to consider offset when accessing output data 2025-05-20 08:51:37 +00:00
Thomas Schlichter
944ac15ab5 nrLDPC_coding_t2: allocate array of rte_bbdev_dec_op pointers on stack instead of heap 2025-05-20 08:00:36 +00:00
Thomas Schlichter
2df487fc8b nrLDPC_coding_t2: use rte_bbdev_op_type_str() instead of hardcoded array of strings 2025-05-20 08:00:36 +00:00
Thomas Schlichter
af7054554b nrLDPC_coding_t2: make parameters for set_ldpc_dec_op() more smilar to set_ldpc_enc_op() 2025-05-20 08:00:36 +00:00
Thomas Schlichter
d442461bd1 nrLDPC_coding_t2: remove unused start_idx from set_ldpc_enc_op() and set_ldpc_dec_op() 2025-05-20 08:00:35 +00:00
Thomas Schlichter
b5c9e13df3 nrLDPC_coding_t2: remove unused #define HARQ_INCR 2025-05-20 07:57:23 +00:00
Thomas Schlichter
07ff8a27c4 nrLDPC_coding_t2: remove unused functions mbuf_reset() and check_bit() 2025-05-20 07:57:23 +00:00
Thomas Schlichter
c1e057bc8b nrLDPC_coding_t2: remove unused atomic variables nb_dequeued and processing_status 2025-05-20 07:57:23 +00:00
Thomas Schlichter
adbf056abb nrLDPC_coding_t2: remove unused global variable m_head 2025-05-20 07:57:23 +00:00
Thomas Schlichter
4dde956e84 nrLDPC_coding_t2: remove unused vector_mask 2025-05-20 07:57:23 +00:00
Thomas Schlichter
b02e6e8ddd nrLDPC_coding_t2: inline and remove now nearly empty init_test_op_params() 2025-05-20 07:57:23 +00:00
Thomas Schlichter
ea7e6ffb0b nrLDPC_coding_t2: remove unused num_to_process 2025-05-20 07:57:23 +00:00
Thomas Schlichter
73c6d1fb62 nrLDPC_coding_t2: remove unused burst_sz 2025-05-20 07:57:23 +00:00
Thomas Schlichter
f47b549f41 nrLDPC_coding_t2: remove unused rte_bbdev_dec_op from test_op_params and thread_params 2025-05-20 07:57:23 +00:00
Thomas Schlichter
e45aff7763 nrLDPC_coding_t2: replace global mp_dec and mp_enc by bbdev_op_pool in thread_params 2025-05-20 07:57:23 +00:00
Thomas Schlichter
300346c43a nrLDPC_coding_t2: replace global q_bufs by struct data_buffers on stack 2025-05-20 07:57:23 +00:00
Thomas Schlichter
48e78ff4b0 nrLDPC_coding_t2: fix q_bufs memory leak 2025-05-20 07:57:23 +00:00
Thomas Schlichter
ac9a8f017b nrLDPC_coding_t2 fix: make sure to free allocated mbufs
The DPDK driver may directly provide the internal HW mbuf in the dequeued structure.
So don't try to free the mbufs from that dequeued structure, but the ones we allocated.
2025-05-20 07:57:21 +00:00
Thomas Schlichter
1612ba33a8 nrLDPC_coding_t2: remove unused soft_outputs, harq_inputs and harq_outputs elements 2025-05-20 07:56:26 +00:00
Thomas Schlichter
d8b3bfd17b nrLDPC_coding_t2: use nb_segments_decoding() and nb_segments_encoding() to calculate num_segments 2025-05-20 07:56:24 +00:00
Thomas Schlichter
084bbb0363 nrLDPC_coding_t2: also support newer DPDK versions 2025-05-20 07:54:12 +00:00
Robert Schmidt
b2c9a1d2b5 Merge branch 'integration_2025_w20' into 'develop'
Integration: `2025.w20`

Closes #826 and #884

See merge request oai/openairinterface5g!3438

* !3168 Improvements for LDPC encoding
* !3386 E1 Bearer Context Release enc/dec lib and unit test
* !3394 Fix Liteon with MTU 1500 and update the FHI docs
* !3437 CI: RFsim F1/HO: Use hanging-workaround to avoid blocking of second client
* !3384 Add enc/dec library and unit test for E1 Bearer Context Modification Failure
* !3418 Use common function to generate CSI-RS signal
* !3379 Add physim tests into ctest framework
* !3420 Added intercommunication between namespaces
* !3422 Tutorials: updates for NR SA Tutorials
* !3436 Beam switching small fixes
* !3439 Fix RRC resources periodicity determination according to number of slots per period
* !3434 Remove EPC/UE main.py parameters
* !3423 Fix PDSCH and PUSCH BWP Start and Size when PXSCH is scheduled with a DCI format x_0 in any type of PDCCH common search space
* !3442 Fix UL chanel estimates mapping in 2-layer MMSE receiver
2025-05-20 05:46:54 +00:00
Robert Schmidt
4a722c01d1 Revert "CI: Conf file adjustment to improve UL throughput in SA-2x2 pipeline"
This reverts commit 69be78254f.
2025-05-19 16:10:07 +02:00
Robert Schmidt
3ff01b085a Merge remote-tracking branch 'origin/sa-2x2-test' into integration_2025_w20 (!3442)
Fix UL chanel estimates mapping in 2-layer MMSE receiver

This MR addresses a degradation in UL throughput observed in 4x4 MIMO
tests, starting from 2025.w17.

The issue was traced to incoherent indexing in the ul_ch_estimates_ext
when handling 4-antenna UL configurations.
2025-05-19 16:09:12 +02:00
Jaroslava Fiedlerova
b4d35845dc Fix UL chanel estimates mapping in 2-layer MMSE receiver
Resolve issue introduced in 7982a9da41.
2025-05-19 15:08:33 +02:00
Robert Schmidt
04af07fee0 Merge remote-tracking branch 'origin/Fix_xlsch_bwp_start_size' into integration_2025_w20 (!3423)
Fix PDSCH and PUSCH BWP Start and Size when PXSCH is scheduled with a DCI format x_0 in any type of PDCCH common search space

- Fix PDSCH and PUSCH BWP Start and Size when PDSCH/PUSCH is scheduled
  with a DCI format x_0 in any type of PDCCH common search space
- Fix resource block assignment information (RIV field) for DCI format
  x_0 when scheduling in any type of PDCCH common search space
2025-05-19 12:19:10 +02:00
Robert Schmidt
fc756f758d Merge remote-tracking branch 'origin/ci-remove-ue-main-parameters' into integration_2025_w20 (!3434)
Remove EPC/UE main.py parameters
2025-05-19 12:18:41 +02:00
Robert Schmidt
0f094a5a57 Remove any usage of UE* main.py parameters
The parameter is not used. Remove them.
2025-05-19 11:42:11 +02:00
Robert Schmidt
c4bc119732 Merge remote-tracking branch 'origin/fix_periodicityoffset' into integration_2025_w20 (!3439)
Fix RRC resources periodicity determination according to number of slots per period

Otherwise we may end up in scenarios where some channels would end in
the wrong TDD slot type
2025-05-19 11:36:37 +02:00
Robert Schmidt
90383b85fe Merge remote-tracking branch 'origin/prevent_beam_switch' into integration_2025_w20 (!3436)
Beam switching small fixes

To prevent activation of beam switching when not required
2025-05-19 11:36:16 +02:00
francescomani
58d0747a29 fix RRC resources periodicity determination according to number of slots per period 2025-05-17 13:34:07 +02:00
Robert Schmidt
4f1eabd088 Merge remote-tracking branch 'origin/NR_SA_Tutorials' into integration_2025_w20 (!3422)
Tutorials: updates for NR SA Tutorials

- Update links for the latest Ubuntu 24.04.2 LTS iso file
- Update docker install to the latest instructions on the official
  website
- Update UHD to v4.8.0.0
- Add support for 'default'/"empty" DNN to CN5G configuration file
  * Add support for 'default' DNN to CN5G configuration file (that
    will also be used when DNN is not available, "empty" DNN). This
    configuration will allow most of the COTS UE to get PDUSession
    without any APN configuration made by the user
  * The 'default'/"empty" DNN configuration support was added in
    oai/cn5g/oai-cn5g-amf!343
2025-05-17 12:08:13 +02:00
Robert Schmidt
458db98df9 Merge remote-tracking branch 'origin/multi-ue-script' into integration_2025_w20 (!3420)
Added intercommunication between namespaces

Added intercommunication between namespaces to support sidelink
communication between nearby UEs.
2025-05-17 12:07:43 +02:00
Robert Schmidt
918ea49686 Merge remote-tracking branch 'origin/phy_simulators_ctest' into integration_2025_w20 (!3379)
Add physim tests into ctest framework

Convert physim testcases listed in
cmake_targets/autotests/test_case_list.xml into ctest. Note: Tests for
dlsim_tm4 are excluded, due to compilation issues.

CTest evaluates success based on return code: '0' = pass, non-zero =
fail. For some simulators, the return code is non-zero even when the
test is successful (as indicated by success messages in the test logs).
For some simulators, the return code is always '0'. This inconsistency
has been address in the first two commits of this MR.

To build and execute these tests:

- using cmake

    cd openairinterface5g
    mkdir build && cd build # you can also do that in cmake_targets/ran_build/build
    cmake .. -GNinja -DENABLE_PHYSIM_TESTS=ON && ninja tests
    ctest

- using build_oai: physim-related ctests are activated when PHY
  simulators are built (use build_oai with '-P' or '--phy_simulators'
  option)

    cd openairinterface5g/cmake_targets
    ./build_oai --ninja --phy_simulators
    cd ran_build/build
    ctest

Link to newly created 4g and 5g RAN-Physim-Cluster pipelines:

- RAN-Physim-Cluster-4G: https://jenkins-oai.eurecom.fr/job/RAN-Physim-Cluster-4G/
- RAN-Physim-Cluster-5G: https://jenkins-oai.eurecom.fr/job/RAN-Physim-Cluster-5G/
2025-05-17 12:05:27 +02:00
Jaroslava Fiedlerova
c861dcb7d0 Add doc on how to rerun failed CI physim test 2025-05-16 16:38:54 +02:00
rmagueta
4c41387bd4 Improve physim documentation: structure, ctest usage, and clarity 2025-05-16 16:38:54 +02:00
Jaroslava Fiedlerova
4f64dd98ee CI: split RAN-Physim-Cluster pipeline into 4G and 5G 2025-05-16 16:38:54 +02:00
Jaroslava Fiedlerova
1de7e0541c CI: adjust tested SNR for nr_pucchsim
Initially we were testing SNR from -3 to 7 dB, in recent runs PUCCH test
succeeds at SNR = 0 or 1 dB. Starting at higher SNR helps to reduce test
runtime. Set maximum SNR to 7dB, as it was done in the initial test scenario,
to ensure that possible performance degradation is detected.
2025-05-16 16:38:54 +02:00
Jaroslava Fiedlerova
77f2a2b678 CI: remove global PHYSIM and PhySim class
The cls_physim1.py is no longer needed. Function for physim deployment has
been migrated to the Cluster class. Log analysis functionality has been
moved to the Analysis class.
2025-05-16 16:38:54 +02:00
Jaroslava Fiedlerova
b3a3ed70e6 CI: Create separate XML files for 4G and 5G physims 2025-05-16 16:38:54 +02:00
Jaroslava Fiedlerova
dad8814bdf CI: Add functions for OC Physim deployment and analysis 2025-05-16 16:38:49 +02:00
Jaroslava Fiedlerova
986db77b88 CI: add helm charts for 4G and 5G OC deployments with ctest 2025-05-16 16:29:55 +02:00
Jaroslava Fiedlerova
2827eecfd9 Remove autotest physim test framework
No longer used in CI, replaced by ctest testing.
xmlstarlet not used anymore, can be removed from build_helper

Closes #826
2025-05-16 16:29:55 +02:00
Jaroslava Fiedlerova
e878b9fbbc CI: remove helm charts for physim OC deployment
To be replaced by ctest physim implementation in the following commit.
2025-05-16 16:29:55 +02:00
Jaroslava Fiedlerova
f171778b68 Update physim Dockerfile for ctest support
Set the CMAKE_RUNTIME_OUTPUT_DIRECTORY CMake option during the OAI build
to control the location of runtime target files. This ensures that ctest
can locate necessary executables after they are copied to the target
Docker image.
2025-05-16 16:29:55 +02:00
Jaroslava Fiedlerova
5312e9e43b Convert physims in cmake_targets/autotests/test_case_list.xml to ctest
Convert physim testcases defined in cmake_targets/autotests/test_case_list.xml
into CTest based tests. These test are activated when '-DENABLE_PHYSIM_TESTS=ON'
CMake flag is set.

Note: Tests for dlsim_tm4 are excluded, due to compilation issues.

CTest evaluates success based on return code: '0' = pass, non-zero = fail.

The following table outlines the physim executables, their success expressions
(`expr_true`), and the return codes for success (`ret_success`) and failure
(`ret_fail`). The `expr_true` is used in test_case_list.xml to check for test
results.

| test_exec     | expr_true      | ret_succ        | ret_fail          |
| ------------- | -------------- | --------------- | ----------------- |
| dlsim         | passed         | 0               | -1                |
| ulsim         | passed         | 0 (ret)         | 1 (ret)           |
| ldpctest      | BLER 0.000000  | 0               | 1                 |
| polartest     | BLER= 0.000000 | 0               | 1                 |
| nr_pbchsim    | PBCH test OK   | 0               | 1                 |
| nr_dlsim      | PDSCH test OK  | 0               | 1                 |
| smallblocktest| BLER= 0.000000 | 0               | 1                 |
| nr_ulschsim   | PUSCH test OK  | 0 (n_errors)    | n_errors          |
| nr_pucchsim   | PUCCH test OK  | 0               | 1                 |
| nr_ulsim      | PUSCH test OK  | 0 (ret)         | -1 (ret)          |
| nr_prachsim   | PRACH test OK  | 0 (prach_errors)| > 0 (prach_errors)|
| nr_psbchsim   | PSBCH test OK  | 0 (errors)      | > 0 (errors)      |

Add CMake flag "ENABLE_PHYSIM_TESTS=ON" when building OAI with "-P"
or "--phy_simulators" option. This allows physim-related ctest to
be executed from build directory.

Add dependency on coding lib for all 4G physims
2025-05-16 16:29:43 +02:00
Jaroslava Fiedlerova
dec74058e5 Disable DEBUG_UE_TIMING logs in 4g dlsim test
Setting the DEBUG_UE_TIMING flag caused a flood of UE timing logs, resulting
in dlsim output logs as large as 1.5MB per test in CI. This commit comments
out the line where we set the flag to reduce log verbosity.
2025-05-16 13:42:23 +02:00
Jaroslava Fiedlerova
2402f37271 Modify nr_dlsim, nr_pbchsim and nr_pucchsim to return '0' on success
- Change return value of nr_dlsim, nr_pbchsim and nr_pucchsim to:
  - Return '0' if test succeeds (indicated also by "PDSCH/PBCH/PUCCH test
    OK" in the test log).
  - Return '1' if test fails.
2025-05-16 13:42:23 +02:00
Jaroslava Fiedlerova
8ca6a4a06e Modify polartest, smallblocktest and ldpctest to return '0' on success
- Updated polartest, smallblocktest, and ldpctest to check BLER and return
  appropriate status:
  - Returns '0' if BLER equals 0.000000 (indicating success).
  - Returns '1' for all other BLER values (indicating failure).
- This change improves consistency in return values across the test physims.
2025-05-16 13:42:14 +02:00
Robert Schmidt
36ee23255c Merge remote-tracking branch 'origin/csi-generate-common-func' into integration_2025_w20 (!3418)
Use common function to generate CSI-RS signal

Remove code duplication.
2025-05-16 13:12:57 +02:00
Robert Schmidt
3735734eea Merge remote-tracking branch 'origin/e1-bearer-mod-failure' into integration_2025_w20 (!3384)
Add enc/dec library and unit test for E1 Bearer Context Modification Failure

This MR is adding:

- the enc/dec library
- unit test
- handler and callback in stack

For the E1 Bearer Context Modification Failure.
2025-05-16 13:12:21 +02:00
Jaroslava Fiedlerova
69be78254f CI: Conf file adjustment to improve UL throughput in SA-2x2 pipeline
Reduction of target SNR in 4x4 configuration with 60 MHz seems to improve
UL throughput and reduce number of UL errors.
2025-05-15 19:25:48 +02:00
Robert Schmidt
c3f833ca30 Merge remote-tracking branch 'origin/rfsim-ci-ho' into integration_2025_w20 (!3437)
CI: RFsim F1/HO: Use hanging-workaround to avoid blocking of second client
2025-05-15 19:17:27 +02:00
Robert Schmidt
97856a812f Merge remote-tracking branch 'origin/oran-fh-doc-fix' into integration_2025_w20 (!3394)
Fix Liteon with MTU 1500 and update the FHI docs

- Closes #884 - needed to update the max fragments needed for
  transmission of one symbol; technically, 5 are enough but due to wrong
  equation in the xran F release we had to increase to 6
- Clarify packet length for VFs
- Update Foxconn doc and config file with MTU set for jumbo frames
- Update Benetel docs with new version v1.2.2
2025-05-15 19:16:40 +02:00
Robert Schmidt
1847843614 Merge remote-tracking branch 'origin/e1-bearer-context-release' into integration_2025_w20 (!3386)
E1 Bearer Context Release enc/dec lib and unit test

This MR is adding:

- the enc/dec library
- unit test

And adopting the lib in stack, for the E1 Bearer Context Release.
2025-05-15 19:16:08 +02:00
Robert Schmidt
7298f41e5d Merge remote-tracking branch 'origin/ldpc_enc_avx512' into integration_2025_w20 (3168)
Improvements for LDPC encoding

AVX512 modifications for LDPC encoding: interleaving, ZC384 BG1, output
formatting for encoder, segmentation (memcpy instead of loop). some
improvement in TX for aarch64 in same places where AVX512 support was
added. Also, rate matching and interleaving are done on bytes containing
8 segments and reformatting of the output is done at the end of segment
processing instead of after ldpc encoding.

This improves the overall performance of the NR DL transmitter in gNB

See the merge request description for numbers.
2025-05-15 19:15:27 +02:00
luis_pereira87
a9ae56395e Fix resource block assignment information (RIV field) for DCI format 0_0 when scheduling in any type of PDCCH common search space 2025-05-15 16:14:31 +01:00
luis_pereira87
8c7d4c6d02 Fix PUSCH BWP Start and Size when PUSCH is scheduled with a DCI format 0_0 in any type of PDCCH common search space 2025-05-15 16:14:31 +01:00
luis_pereira87
7b1c1ddc17 Fix resource block assignment information (RIV field) for DCI format 1_0 when scheduling in any type of PDCCH common search space 2025-05-15 16:14:31 +01:00
luis_pereira87
35d5309ef1 Fix PDSCH BWP Start and Size when PDSCH is scheduled with a DCI format 1_0 in any type of PDCCH common search space 2025-05-15 16:14:31 +01:00
luis_pereira87
3dea00b006 Get and store CORESET start RB 2025-05-15 16:13:30 +01:00
Guido Casati
ce17663017 Release all user plane resources when going to IDLE
Release all SDAP entities for a UE in nr_rrc_going_to_IDLE().
With this change the SDAP entities of the UE are cleaned up
when going into RRC_IDLE, including tun sockets, threads etc.
A new SDAP entity is created when re-attaching to the network.
2025-05-15 11:20:10 +02:00
Guido Casati
729b0eb348 Print errno in nr_sdap_rx_entity 2025-05-15 11:20:10 +02:00
Bartosz Podrygajlo
5354ad8a26 Add support for TYPE_IPV4ADDR in yaml config module 2025-05-15 11:20:10 +02:00
Guido Casati
79df739598 Add callback/handler for E1AP Bearer Context Modification Failure 2025-05-15 10:17:07 +02:00
Guido Casati
306a44ebff Add enc/dec lib and unit test for E1AP Bearer Context Modification Failure 2025-05-15 10:17:03 +02:00
Robert Schmidt
b6fcb69e4c CI: RFsim F1/HO: Use hanging-workaround to avoid blocking of second client 2025-05-15 10:04:16 +02:00
francescomani
f4da265423 fix config file with multiple ssbs but single antenna 2025-05-15 09:28:56 +02:00
francescomani
4246b538c9 do not perform beam switching procedures if there is no beam information 2025-05-14 17:12:01 +02:00
Robert Schmidt
5f0289ba32 Remove EPC* main.py parameters
Any pipeline still using this parameter will fail, showing if it has
been removed properly everywhere.
2025-05-13 18:46:50 +02:00
Romain Beurdouche
b1e0bfdda6 fix(CI RAN-gNB-N300-Timing-Phytest-LDPC): update reference timings
Update reference `L1 Tx processing` and `DLSCH encoding` timing in `RAN-gNB-N300-Timing-Phytest-LDPC` CI test
to reflect performance improvements.
2025-05-13 14:08:33 +00:00
Romain Beurdouche
1734e1916c fix(nrLDPC_coding_interface): mistaken line forgotten in documentation 2025-05-13 14:08:33 +00:00
Romain Beurdouche
360f341394 feat(nrLDPC_coding_t2): Shift encoder output with 64 bits shift
Use 64 bits shift to shift the output segment of the encoding operations to their offset in the coding library output buffer.
2025-05-13 14:08:33 +00:00
Romain Beurdouche
2feb36407c feat(reverse_bits_u8): increase vector size in bits reversal
Reverse bits by 512 bits vector instead of 128 bits vector

Also removed SIMDE as the preprocessor directives were allowing only AVX512
2025-05-13 14:08:33 +00:00
Jaroslava Fiedlerova
b31dd728cb T2: Use 8b packed output of the T2 encoder
- modify retrieve_ldpc_enc_op() to store encoded results in a packed format
- add timing measurements for T2 encoder
- add simde implementation for bit reversal
  - Introduce new bit reversal implementation using simde_mm_gf2p8affine_epi64_epi8
    instruction, based on https://wunkolo.github.io/post/2020/11/gf2p8affineqb-bit-reversal/.
    This implementation requires GFNI and AVX512VL support on the target machine.
2025-05-13 14:08:33 +00:00
Romain Beurdouche
4d092495bf feat(nr_codeword_scrambling): Use SIMD XOR for scrambling 2025-05-13 14:08:33 +00:00
Romain Beurdouche
0aa3dba5b7 feat(nrLDPC_coding_segment): Encoding with sequential output write
1. The encoder writes the output in sequence after the encoding tasks completed instead of writing within the tasks.

2. Simplify the output writing to make it more readable.

Co-authored-by: Laurent Thomas <laurent.thomas@open-cells.com>
2025-05-13 14:08:33 +00:00
Romain Beurdouche
b1e1c161ec feat(nrLDPC_coding_segment_encoder): Mitigate race condition
There was a risk of a race condition between encoding tasks on the output array.
It could be that two task compete in writing a word at the border of their respective segment groups.

This commit offers to solve this issue by retaining the tail word in a struct that is returned after task completion so that segment group border can be fixed after completion of all the tasks.

Comes with additional cleanups of nrLDPC_coding_segment_encoder:
1. Move the section of code dedicated to writing to the encoding library output to a separate function.
2. Remove bit interleave debug in AVX512VBMI case of output writing for improving code readability.
2025-05-13 14:08:33 +00:00
Romain Beurdouche
06c81030dc fix(nrLDPC_coding_segment_encoder): address review
1. nrLDPC_coding_segment_encoding: Clarifying encoder parameters
   The way the encoder implementation params was used could be made clearer:
   * `macro_num` was always used in order to calculate segment indexes.
     It is clearer to pass directly the first segment index.
   * The initialisation of a common implementation parameters structure can be made clearer.

2. nrLDPC_coding_segment_encoder: Remove multi segment dimension in encoder output
   The output of `LDPCencoder` was a 2D unsigned char array.
   But all the segments were actually packed in the first segment, 8 bits of different segments per byte of the first segment.
   So the first dimension was useless. This commit removes this dimension.

3. nrLDPC_coding_segment_encoder: Rename `nrLDPC_prepare_TB_encoding` into `nrLDPC_launch_TB_encoding`

4. nrLDPC_coding_segment_encoder: Remove the useless second rate matching for E2, one rate matching with max(E, E2) does the job.

5. nr_interleaving_ldpc: cleanup
   Rewrite code to use different SIMD sizes in a linear fashion.
   This means cascading preprocessor directives are used to start from a high SIMD size an decrease it progressively.

6. ldpc_encoder_optim8segmulti: linear usage of SIMD
   Use cascading preprocessor directives to include different SIMD sizes and types depending on which are available on the system.
   The different loops use a common index that is progressively incremented.
   Also add AVX512 version of bits distribution from 8 segments into one byte.

Co-authored-by: Laurent Thomas <laurent.thomas@open-cells.com>
2025-05-13 14:08:33 +00:00
Romain Beurdouche
1b31ac417b fix(nrLDPC_coding_interface): Move the encoding output to the TB
Since this branch aims to bring all the encoded segments packed and contiguous,
it doesn't make anymore sense to have one output array per segment.
Therefore this commit moves the output array to the TB instead of the segment and adapts its size.

TODO: Adapt the size of f where it is relevant.
2025-05-13 14:08:33 +00:00
Romain Beurdouche
f3daf0ed83 fix(nrLDPC_coding): Miscellaneous fixes
1. nrLDPC_coding_segment_encoder: pointer not aligned on 64 bits
   An undefined behavior was happening because of a shift on a __m64 which
   was actually a uint32_t which was not aligned on 64 bits.
   This commit suggests a fix by properly loading into a __m64 with _mm_set_pi32
   before performing the shift.

2. nr_rate_matching: Filler bits detection
   Previously, if the bit selection was reaching Ncb and restarting selection from the beginning of encoded data, the filler bits were detected by testing the bytes again NR_NULL which was equal to 2.
   But on this branch the bits of up to 8 segments are stored in one byte while doing rate matching so that one byte could be tested to be a filler while it is not.
   So this commit changes the way to test filler bits.
   Instead of relying on NR_NULL, bit selection now relies on the offset and size of filler bits.

3. nr_ulsch_coding: missing filling f with zeros
   The array `f` of the UE UL HARQ process was not filled with zeros between transmissions.
   This is a problem if the encoder does not properly overwrite its output.
   In order to avoid such situation, this commit adds a memset to fill `f` with zeros before passing it to the encoder.

4. nrLDPC_coding_segment_encoder: missing init of f to zeros
   In the encoder, `f` is not filled with zeros before being used.
   `f` is instead somehow filled with arbitrary values.
   When writing to `output` by 64 bit vectors, some arbitrary bits may be added after the segment.
   Then the arbitrary added ones are not overwritten when writing the next segment because of writing with a logical or.
   This commit properly fills `f` and `f2` with zeros.

5. nr_ulschsim & nr_dlschsim: Adapt modulation to new encoder output
   The QPSK symbols that are feed to the channel model of nr_dlschsim were determined based on the bytes of the encoder output.
   With the new output of the encoder, it had to be reworked to determine the QPSK symbols based on the bits of the encoder output.
2025-05-13 14:08:33 +00:00
Raymond Knopp
bbbbda70f5 feat(nrLDPC_coding_segment_encoder): Dense Rate Matching and Dense and Concatenated Output
1. 3GPP Rate-matching/interleaving on 8-segment blocks, deinterleaving at output of multi-segment processing.

2. Bit-packing done in nrLDPC_coding_segment_encoder.c now instead of nr_scrambling.
   Interestingly, it improves performance significantly too.
   Tested for AVX512 only for now.
2025-05-13 14:08:33 +00:00
Raymond Knopp
33078f9e3d feat(cnProc_gen_BG1_128): Put back small change in 128-bit SIMD code generator for LDPC decoder (cnProc).
Avoid the use of simde_mm_sign_epi8 which is inefficient on aarch64.
Decoding times are significantly improved on aarch64.

Co-authored-by: Romain Beurdouche <romain.beurdouche@eurecom.fr>
2025-05-13 14:08:33 +00:00
Raymond Knopp
a4c950774b feat(ldpc_encoder_optim8segmulti): Improvements for Arm Neoverse
Use 128 bit SIMD in packing and unpacking segment bits in bytes
Adapt compiler options for Neoverse.
2025-05-13 14:08:33 +00:00
Raymond Knopp
8964fdb6a2 AVX512 modifications for LDPC encoding: interleaving, ZC384 BG1, output formatting for encoder, segmentation (memcpy) 2025-05-13 14:08:33 +00:00
Raymond Knopp
c07bfe6db5 Put CPU affinity control in nr_ulsim. 2025-05-13 14:08:33 +00:00
Robert Schmidt
c7deef8203 Merge branch 'add-rhel-9.6' into 'develop'
Add RHEL9.6 to list of supported distributions

See merge request oai/openairinterface5g!3431
2025-05-13 12:40:40 +00:00
Robert Schmidt
cf22ed79f2 Fix llvm version conflict after upgrade to RHEL9.6
Add --allowerasing, which will downgrades some packets in order to
satisfy LLVM dependencies.

When building the docker image for clang, CI fails with

    Error:
     Problem: llvm-18.1.8-3.el9.i686 from ubi-9-appstream-rpms  does not belong to a distupgrade repository
      - package llvm-toolset-18.1.8-3.el9.x86_64 from ubi-9-appstream-rpms requires llvm = 18.1.8, but none of the providers can be installed
      - package llvm-18.1.8-3.el9.x86_64 from ubi-9-appstream-rpms requires llvm-libs(x86-64) = 18.1.8-3.el9, but none of the providers can be installed
      - package llvm-18.1.8-3.el9.x86_64 from ubi-9-appstream-rpms requires libLLVM.so.18.1()(64bit), but none of the providers can be installed
      - package llvm-18.1.8-3.el9.x86_64 from ubi-9-appstream-rpms requires libLLVM.so.18.1(LLVM_18.1)(64bit), but none of the providers can be installed
      - cannot install both llvm-libs-18.1.8-3.el9.x86_64 from ubi-9-appstream-rpms and llvm-libs-19.1.7-2.el9.x86_64 from @System
      - package mesa-dri-drivers-24.2.8-2.el9_6.x86_64 from @System requires libLLVM.so.19.1()(64bit), but none of the providers can be installed
      - package mesa-dri-drivers-24.2.8-2.el9_6.x86_64 from @System requires libLLVM.so.19.1(LLVM_19.1)(64bit), but none of the providers can be installed
      - package mesa-libGL-24.2.8-2.el9_6.x86_64 from @System requires libgallium-24.2.8.so()(64bit), but none of the providers can be installed
      - package mesa-libGL-24.2.8-2.el9_6.x86_64 from @System requires libgallium-24.2.8.so(libgallium-24.2.8.so)(64bit), but none of the providers can be installed
      - package mesa-libGL-devel-24.2.8-2.el9_6.x86_64 from @System requires mesa-libGL(x86-64) = 24.2.8-2.el9_6, but none of the providers can be installed
      - conflicting requests
      - problem with installed package mesa-libGL-devel-24.2.8-2.el9_6.x86_64
    (try to add '--allowerasing' to command line to replace conflicting packages or '--skip-broken' to skip uninstallable packages or '--nobest' to use not only best candidate packages)

So when trying to install llvm-toolset from docker/Dockerfile.clang.rhel9,
we have a conflict because this installs 18.1 from ubi-9-appstream-rpms,
but various mesa packets have llvm 19.1.

1. I don't understand why we have mesa installed (no graphics system?)
2. --allowerasing downgrades the relevent mesa package(s)

Alternatively, we would need to select 19.1 when installing
llvm-toolset, but I don't know how to do that.
2025-05-13 14:39:24 +02:00
Robert Schmidt
176fd405d9 Add RHEL/rocky 9.6/9.7 to list of supported distributions 2025-05-13 14:39:24 +02:00
Teodora
e6e9aaed7f Clarification on the packet length needed to configure VFs
As per CUS spec, the MTU can be 1500 or 9000 B, where MTU = IQ data format.

Packet length = ethernet header + RTE_PKTMBUF_HEADROOM + MTU

However, xran assumes different definitions of the MTU:
(1) in xran_init_mbuf_pool(): MTU = ethernet header + IQ data format;
(2) in xran_get_num_prb_elm(), xran_init_PrbMap_from_cfg(), xran_init_PrbMap_from_cfg_for_rx(), xran_init_PrbMap_by_symbol_from_cfg(): MTU = complitely wrong (as the IQ data format is not well included).

Additionally, xran assumes that the max MTU 9600 B, instead of 9000 B as per spec.
Nevertheless, I left 9600 B in all config files and docs due to wrong calculation of (2) for the total number of PRBs per fragment.
2025-05-13 12:55:18 +02:00
Teodora
29acc08f9e Add new Benetel supported versions 2025-05-13 12:55:18 +02:00
Teodora
3a1fc2ef65 Fix Liteon for xran F release and improve docs
1. Closes #884 - increase the XRAN_MAX_FRAGMENT from 4 to 6 (sufficient for MTU 1500 with compression 8b)
2. Add new firmware version that supports jumbo frames
3. Update the config file to align with the new Liteon unit in our lab - center frequency, jumbo frames, compression and RU MAC address,
as well as the max DL MIMO layers.
2025-05-13 12:53:16 +02:00
luis_pereira87
089d1ec49e Tutorials: add support for 'default'/"empty" DNN to CN5G configuration file
Add support for 'default' DNN to CN5G configuration file (that will also be used when DNN is not available, "empty" DNN). This configuration will allow most of the COTS UE to get PDUSession without any APN configuration made by the user

The 'default'/"empty" DNN configuration support was added in https://gitlab.eurecom.fr/oai/cn5g/oai-cn5g-amf/-/merge_requests/343
2025-05-13 11:24:26 +01:00
luis_pereira87
9350db4979 Tutorials: update UHD to v4.8.0.0 2025-05-13 11:24:26 +01:00
luis_pereira87
e5d7fd3904 Tutorials: Update docker install to the latest instructions on the official website 2025-05-13 11:24:26 +01:00
luis_pereira87
b8617819b1 Tutorials: Update links for the latest Ubuntu 24.04 LTS iso file 2025-05-13 11:24:26 +01:00
Jaroslava Fiedlerova
f9e1657840 Merge branch 'integration_2025_w19' into 'develop'
Integration: `2025.w19`

Closes #852, #952, and #957

See merge request oai/openairinterface5g!3427

* !3409 Correctly handle minimum RB condition in MAC
* !3421 Fix DMRS for PUCCH format 2
* !3424 limit the number of HARQ processes in case of DCI00 and 10
* !3116 ue txData more contextual, but still global as it is entangled with usrp driver
* !3408 Handling 2 search spaces per slot in SIB1
* !3419 PRACH configuration index warning
* !3429 CI: Add `-l` option for the UL iperf test
* !3381 Add 5GMM Authentication Failure enc/dec lib and unit test
2025-05-13 08:55:55 +00:00
beraoudabdelkhalek
6f5644e489 Added intercommunication between namespaces.
- Added abort function.
- Added intercommunication between UE namespaces.
- Reduced code size.
- Removed default getops error messages.
2025-05-13 10:39:32 +02:00
Romain Beurdouche
d6ee29a193 feat(nrLDPC_encoder): remove _optim and _optim8seg
It is pointless to keep updating ldpc_optim and ldpc_optim8seg.
So we remove them.
2025-05-13 07:32:36 +00:00
Guido Casati
66d32fb39b Add cause to Bearer Context Release message trigger 2025-05-12 21:46:07 +02:00
Guido Casati
67ec7d3174 Use Bearer Context Release Complete enc/dec lib in stack 2025-05-12 21:46:02 +02:00
Guido Casati
8f9761ac84 Add Bearer Context Release Complete enc/dec lib and unit test 2025-05-12 21:45:58 +02:00
Guido Casati
f8eba806da Use Bearer Context Release Command enc/dec lib in stack 2025-05-12 21:45:47 +02:00
Guido Casati
3c8caeb9b2 Add Bearer Context Release Command enc/dec lib and unit test 2025-05-12 21:45:08 +02:00
Jaroslava Fiedlerova
b00c2fec99 Merge remote-tracking branch 'origin/fix-aerial-ul' into integration_2025_w19 (!3429)
CI: Add `-l` option for the UL iperf test

In this MR, we set the packet length to 1428 bytes for UL iperf3 testing using
the -l option to prevent packet fragmentation. Fragmentation is causing packet
drops between the gNB and the UPF, leading to failed UL throughput tests in CI.
2025-05-12 15:08:23 +02:00
Jaroslava Fiedlerova
3a9936d485 Merge remote-tracking branch 'origin/nr-ue-nas-auth-failure' into integration_2025_w19 (!3381)
Add 5GMM Authentication Failure enc/dec lib and unit test

This MR is introducing the 5GMM Authentication Failure message library as per
8.2.4 of 3GPP TS 24.501. This message is sent from UE to network under certain
conditions. The message is also introduced in stack and is send if the received
ngKSI already in use.

- add new library for 5GMM Authentication Failure enc/dec and unit test
- introduce handler and generate function for NAS Authentication Failure
  store ngKSI
- send Authentication Failure if ngKSI is already associated with one of
  the 5G security contexts stored in the UE

Closes #852
2025-05-12 15:06:12 +02:00
Guido Casati
4587210384 Add handler for Authentication Request
* store ngKSI
* send Authentication Failure if ngKSI is already associated
  with one of the 5G security contexts stored in the UE
2025-05-12 10:26:29 +02:00
Teodora
83afb8b852 Set common E&F releases for CUS and CUSM 2025-05-10 00:31:03 +02:00
Sakthivel Velumani
bff9c169c6 Update MTU for Foxconn to 9600
After capturing the FH packets, we observed that the RU supports the MTU value for jumbo frames.

Therefore, no fragmentation needed on DL.

Co-authored-by: Teodora Vladic <teodora.vladic@openairinterface.org>
2025-05-10 00:31:03 +02:00
Jaroslava Fiedlerova
12562609eb Merge remote-tracking branch 'origin/PRACH_config_index_warning' into integration_2025_w19 (!3419)
PRACH configuration index warning
2025-05-09 16:37:40 +02:00
Jaroslava Fiedlerova
2ffc518201 Merge remote-tracking branch 'origin/fix_2_ss_sib1' into integration_2025_w19 (!3408)
Handling 2 search spaces per slot in SIB1

Closes #952
2025-05-09 16:37:01 +02:00
Jaroslava Fiedlerova
cecd4a0cff Merge remote-tracking branch 'origin/ue-fix-txdata' into integration_2025_w19 (!3116)
ue txData more contextual, but still global as it is entangled with usrp driver

- txData buffer is global and entangled even in usrp oai driver because of tx
  thread feature
- it also makes weird combination with continuous tx usrp bug workaround
- this MR makes most of the calls contextual but keep the globakl txData
- later a MR should remove the global and tackle it with proper context, but we
  need to modify gNb, UE, 4G and probably all oai drivers
2025-05-09 16:35:20 +02:00
Reem Bahsoun
e7d91b8a04 Set packet length with -l option to 1428 for the UL iperf command line to avoid packet fragmentation.
*Packet fragmentation results in packet drops, leading to zero packets being received from the gNB to the UPF*
2025-05-09 16:15:18 +02:00
Jaroslava Fiedlerova
0603ed8976 Merge remote-tracking branch 'origin/issue_957' into integration_2025_w19 (!3424)
limit the number of HARQ processes in case of DCI00 and 10

Closes #957
2025-05-09 12:28:14 +02:00
Jaroslava Fiedlerova
4ebf3cabb0 Merge remote-tracking branch 'origin/fix-DMRS-PUCCH2' into integration_2025_w19 (!3421)
Fix DMRS for PUCCH format 2

This MR fixes the DMRS for PUCCH format 2.
While at the OAI-UE we have:

uint16_t startingPRB = pucch_pdu->prb_start + pucch_pdu->bwp_start;
uint idxGold = startingPRB >> 2;
uint32_t *seq = gold_cache(temp_x2, idxGold + pucch_pdu->prb_size);

At gNB side, it was missing pucch_pdu->bwp_start, i.e., it was:

uint32_t *sGold = gold_cache(x2, pucch_pdu->prb_start / 4 + ngroup / 2);
uint8_t *sGold8 = (uint8_t *)(sGold + pucch_pdu->prb_start / 4);

This MR was tested with COTS UE with a bwp_start other than 0, and now PUCCH format 2 is being decoded correctly.
2025-05-09 12:25:34 +02:00
Jaroslava Fiedlerova
51f9627f6c Merge remote-tracking branch 'origin/min-grant-fixes' into integration_2025_w19 (!3409)
Correctly handle minimum RB condition in MAC
- Correctly handle Msg3 min PRB size == BWP size
- Make min_grant_prb u16 to also allow to have 273 PRBs
2025-05-09 12:24:29 +02:00
Laurent THOMAS
33d72f6080 fix C style, unefficient and complex 2025-05-09 12:10:41 +02:00
Laurent THOMAS
44716febce ue txData more contextual, but still global as it is entangled with usrp driver 2025-05-09 12:10:39 +02:00
Nick Hedberg
d55bcecdc3 Use u16 for minimum grant option, could be 273PRBs 2025-05-08 16:50:12 +02:00
Robert Schmidt
34ee9ffd29 Move log for Msg3 allocation done
Move this message down, at the end of the function, if no code path
exists under which msg3 allocation might fail despite this log having
been printed.
2025-05-08 16:50:12 +02:00
Robert Schmidt
d8b67af156 Respect minimum grant condition for Msg3 2025-05-08 16:42:27 +02:00
Nick Hedberg
7d8658f5ef Correct ULSCH minimum RB condition
Assume the minimum grant (min_rb) size to be the bandwidth part size. As
an example: rbStart 0, min_rb=bwpSize=106. This should pass, hence
modify these two conditions.

Co-authored-by: Robert Schmidt <robert.schmidt@openairinterface.org>
2025-05-08 16:42:27 +02:00
francescomani
2f1dbed8ec limit the number of HARQ processes in lists for DCI 10 and 00
(also removed unnecessary call to create lists at UE init)
2025-05-08 15:49:03 +02:00
francescomani
321df962d2 make functions to create harq lists static 2025-05-08 15:05:13 +02:00
Guido Casati
4c179270c2 Add guami_t to ngran_types.h
* refactor NGAP and RRC code to use one common GUAMI type
  instead of two identical ones
2025-05-08 10:04:36 +02:00
rmagueta
51dfab0c56 Fix DMRS for PUCCH format 2 2025-05-07 15:55:36 +01:00
francescomani
f9b76dd2bf fix sim prach configuration index 2025-05-07 09:19:19 +02:00
Guido Casati
5c38a619ab Use e1ap_cause_t in e1ap_bearer_release_cmd_t 2025-05-06 17:36:19 +02:00
francescomani
b6b4332809 PRACH configuration index assertion to avoid PRACH in last symbol 2025-05-06 16:37:40 +02:00
francescomani
aa516bf1b5 scheduling pdcch structure in SIB1 depends on the associated SSB, can't be precomputed
start symbol may depend on the associated SSB index
2025-05-06 16:00:58 +02:00
francescomani
f41c572aff fix for UE reception of PDCCH not starting from symbol 0 2025-05-06 16:00:42 +02:00
Sakthivel Velumani
8c5340f135 Code cleanup
Use c16_t instead of int32_t for CSI RS freq domain samples.
Use const for rxdataF when used as input to functions.
2025-05-06 09:21:14 -04:00
Sakthivel Velumani
6128d1bb62 Use common function to generate CSI-RS signal
The functions nr_generate_csi_rs() and nr_ue_generate_csi_rs() are
identical. This commit removes nr_ue_generate_csi_rs() and moves
nr_generate_csi_rs() to nr_phy_common_csirs.c so both gNB and UE can use
the same function.
2025-05-06 09:11:40 -04:00
Robert Schmidt
9b878d920d Merge branch 'integration_2025_w18' into 'develop'
Integration: `2025.w18`

Closes #953

See merge request oai/openairinterface5g!3413

* !3385 Add enc/dec lib for E1 Bearer Context Setup Failure
* !3410 Avoid segmentation fault when testing trigger reestablishment and there is no DRB[0] established
* !3411 Remove assert for SRI-PUSCH-PowerControl
* !3291 Improvements in handling UE context in gNB DU
* !3416 Signal gNB-DU config update CellStatus from DU to CU
* patch to fix memory leak on DRB_ToAddModList
* update phytest-timing thresholds
2025-05-06 13:01:19 +00:00
Robert Schmidt
34a7a12cf6 CI phytest-timing: Update timing thresholds 2025-05-06 10:24:02 +02:00
Robert Schmidt
976f4cbc5d Free DRB_ToAddModList 2025-05-05 22:47:03 +02:00
Robert Schmidt
b0a0844b21 Merge remote-tracking branch 'origin/gnb-du-config-cell-status' into integration_2025_w18 (!3416)
Signal gNB-DU config update CellStatus from DU to CU

Add the cell status to gNB-DU configuration update message, including
test. Use the gNB-DU configuration update to signal the cell status in
the stack.

This IE was not included in a previous refactoring round, but is at
least necessary to be decoded when interoperating with the OSC O-DU.
2025-05-05 22:37:21 +02:00
francescomani
fbfe76bdc5 fix size of access_ue_list
the current UE list is zero-terminated (see e.g., the UE_iterator
macro).
2025-05-05 22:34:03 +02:00
Robert Schmidt
a083bd830e Merge remote-tracking branch 'origin/new_UE_context_improvements' into integration_2025_w18 (!3291)
Improvements in handling UE context in gNB DU

The goal of this MR is to improve the handling of UE context in gNB DU.
To achieve this goal, the UE structure is created as soon as the gNB
receive a PRACH indication. At that stage the UE is placed in a new
structure containing UEs performing RA, untill RA is complete where it
is moved to the list of connected UEs. To simplify the code and to
improve the handling of initial procedures (see #751), DCI 10 and DCI 00
is used at every stage until the DU receives from CU the indication of
UE RRC reconfiguration being completed.
2025-05-05 09:10:36 +02:00
Robert Schmidt
de2778b26c Merge remote-tracking branch 'origin/issue-953' into integration_2025_w18 (!3411)
Remove assert for SRI-PUSCH-PowerControl

SRI-PUSCH-PowerControl is not implemented at this point but its enough
to warn about incorrect power control behavior rather than assert on the
configuration.

Closes #953
2025-05-05 08:23:37 +02:00
Robert Schmidt
8c559345db Merge remote-tracking branch 'origin/avoid-segfault-test-reestablishment' into integration_2025_w18 (!3410)
Avoid segmentation fault when testing trigger reestablishment and there is no DRB[0] established
2025-05-05 08:22:59 +02:00
francescomani
2626dbd24b further adjustment in timing test 2025-05-04 09:34:42 +02:00
Robert Schmidt
5205d1d4b7 Read security only for CU or Monolithic: avoid warning at DU 2025-05-04 09:34:42 +02:00
Robert Schmidt
b4a7a1a194 Allow F1 to be used in do-ra
This is preparatory work to allow NSA-like modes to be used over F1 in
the future. Notably, it fills the F1 message for UE context setup with
GTP TEID, and fills additional information to "make the F1 encoder
happy" (fill in QFI etc). Also, provide some F1 fixes to make this work.
Remove stale UE connections, if relevant.
2025-05-04 09:34:42 +02:00
Robert Schmidt
b9edba2186 Reimplement NSA release using F1
The RLC function is not used, this is handled at the DU.
2025-05-04 09:34:42 +02:00
Robert Schmidt
8a7987812a Stop SDAP/noS1 interface in all cases reliably 2025-05-04 09:34:42 +02:00
Robert Schmidt
94443aefde Save in SDAP context if is UE or gNB
sdap_tun_read_thread needs to know if we are gNB/UE. Previously, we
passed this into the thread, but the next commit also needs to for
interface termination, where this info is not available. So, for noS1
mode, pass this in.
2025-05-04 09:34:42 +02:00
Robert Schmidt
958b2f3fac Move generate_CG_Config() to rrc_gNB_nsa.c
Remove the (now) unused rrc_gNB_internode.c. generate_CG_Config() is
only used in NSA, so can be static.
2025-05-04 09:34:42 +02:00
Robert Schmidt
efbdd92694 Move get_default_reconfig() to rrc_gNB_nsa.c 2025-05-04 09:34:41 +02:00
Robert Schmidt
fddcb2a5e8 Reply X2 Addition Request after F1 UE context setup in NSA 2025-05-04 09:34:41 +02:00
Robert Schmidt
67f04d828a Implement UE context addition in CU through F1 in do-ra/phy-test
Add functionality to trigger the addition of a new RRC UE context (in
the CU) for NSA modes, using F1. This commit makes do-ra and phy-test
modes work. "True" NSA will work in the next commit, which also sends
the X2 addition request answer message.
2025-05-04 09:34:41 +02:00
francescomani
031be06665 use already generated RNTI when creating a new NSA US and take get_reconfiguration_with_sync out of get_default_secondaryCellGroup 2025-05-04 09:34:41 +02:00
Robert Schmidt
7b9442f58d DU-level changes to handle F1 UE Context Setup in NSA/phy-test/do-ra
Co-authored-by: Francesco Mani <email@francescomani.it>
2025-05-04 09:34:41 +02:00
Robert Schmidt
6c5514d5c9 Refactor out useless function 2025-05-04 09:34:41 +02:00
Robert Schmidt
953a5ed33e Trigger release request on RA timeout only once
Checking for < 0 makes the contention resolution timer trigger on each
iteration once it is < 0. Instead, use == 0, which will trigger only
once.
2025-05-04 09:34:41 +02:00
francescomani
3ec14152a1 fix for ULSCH number of layers in case of DCI00 2025-05-04 09:34:41 +02:00
francescomani
a4357b74c5 use DCIX0 in commmon search space in any scenario before reconfiguration complete
this allows to remove a lot of complicated procedures relying on flags and timers
2025-05-04 09:34:36 +02:00
Robert Schmidt
286e3279d5 rrc_gNB_du.c: all logs into NR_RRC log category 2025-05-02 16:51:32 +02:00
Robert Schmidt
ae6ea60a7a Use gNB-DU config update/CellStatus in stack
Use the gNB-DU configuration update to signal the cell status in the
stack. At the DU, modify the code to always send this message --
previously, we only sent this message if a SIB1 update was necessary,
but now it's always, only including SIB1 updates if necessary.

At the CU, as we don't really have a use as of now, print the
information, but don't do anything with it.
2025-05-02 16:49:29 +02:00
Robert Schmidt
f33c6cd0da f1ap: Add CellStatus list in gNB-DU config update 2025-05-02 16:24:35 +02:00
Robert Schmidt
ff99599b25 Merge remote-tracking branch 'origin/e1-bearer-setup-failure' into integration_2025_w18 (!3385)
Add enc/dec lib for E1 Bearer Context Setup Failure

This MR is adding:

- the enc/dec library
- unit test
- handler and callback in stack

For the E1 Bearer Context Setup Failure.
2025-05-02 08:16:11 +02:00
Guido Casati
002fa0050f Bugfix in ngap_gNB_handle_ng_setup_response: use correct count for PLMNSupportList 2025-05-01 11:19:59 +02:00
francescomani
c494c631d1 target search space as input of function to configure UE BWP 2025-05-01 11:04:22 +02:00
francescomani
5729b638a5 add dci 10 to config 2025-05-01 11:04:08 +02:00
francescomani
356a27aad1 handle ul harq inside rx sdu function 2025-05-01 10:48:29 +02:00
francescomani
bf37994f78 separate function for RA ULSCH SDU 2025-05-01 10:48:24 +02:00
francescomani
8f62baefa6 Use list of UEs during RA instead of array of RA processes
- rewrite add_UE_to_list() and rewrite remove_UE_from_list() to simplify
  list handling
- return pointer from get_new_nr_ue_inst(); it's completely freed by
  delete_nr_ue_data()
- have add_new_UE_RA() add UE context to access list; remove with
  nr_release_ra_UE()
- have add_connected_nr_ue() only add UE to connected list; to move from
  access to connected use transition_ra_connected_nr_ue(); remove with
  mac_remove_nr_ue() as previously
- free memory on problems during RA
- add some documentation
- in NSA/HO: check for pre-configured RA process
- there are asserts in all functions to clarify when a UE has RA
2025-05-01 10:48:11 +02:00
francescomani
a7c199cabf new name for UE list 2025-05-01 10:04:41 +02:00
francescomani
a337354588 Add function to compute slot for RA-RNTI 2025-05-01 10:03:24 +02:00
Robert Schmidt
a1e1405ee6 Start E1 before gNB_app
In phy-test and do-ra modes, we will trigger a UE context creation after
F1 Setup (because the DU is ready), in a later commit. However, before
this commit, E1 is started after the gnb_app (which triggers F1 Setup).
E1 starts an (integrated) CU-UP; if the E1 Setup arrives after the F1
setup (which creates a UE context), then the E1 setup handler will drop
the newly created RRC context for a do-ra/phy-test mode.

Avoid/minimize this by starting E1 first, so that E1 setup is done
before F1 Setup is completed (this does not make sure the problem does
not happen, but lowers the risk of the above problem).
2025-05-01 10:03:23 +02:00
francescomani
b88efd74b8 fix in determining the num of cdm groups with no data for ULSCH 2025-05-01 10:03:19 +02:00
Bartosz Podrygajlo
c2b342d129 Remove assert for SRI-PUSCH-PowerControl
SRI-PUSCH-PowerControl is not implemented at this point but its enough
to warn about incorrect power control behavior rather than assert on the
configuration.
2025-04-30 13:06:04 +02:00
Guido Casati
9311931e90 Introduce handler/callback for Bearer Context Setup Failure in stack
This commit does not introduce the callback on the CU-UP to trigger
a Bearer Context Setup Failure when the setup of the bearer context was unsuccessful.
This should be handled properly in the stack e.g. in e1_bearer_context_setup (a comment
in the code says "We assume all DRBs to setup have been setup successfully, so we always
send successful outcome in response and no failed DRBs")
2025-04-30 11:57:12 +02:00
Guido Casati
606b9832af Add unit test for Bearer Context Setup Failure 2025-04-30 11:06:50 +02:00
Guido Casati
be7e52b679 Add enc/dec lib for Bearer Context Setup Failure 2025-04-30 11:06:35 +02:00
luis_pereira87
78378f3301 Avoid segmentation fault when testing trigger reestablishment and there is no DRB[0] established 2025-04-30 10:04:17 +01:00
Robert Schmidt
acb982d0bd Merge branch 'integration_2025_w17' into 'develop'
Integration: `2025.w17`

Closes #947

See merge request oai/openairinterface5g!3403

* !3377 Fix all direct MAC memory leaks
* !3397 Fix for MIB/SIB gNB delay mechanism
* !3399 SIBs in DL slot check
* !3401 F1AP: Allocate gNB_DU_ID before storing ID
* !3380 Issue 947 and compilation improvements
* !3391 small bugfix for T tracer
* !3261 Add Bearer Context Modification Request/Response enc/dec lib and adopt in stack
* !3178 mod: refactor PHY multiplications
* !3382 Improve radio for Metanoia RU (and likely others)
* !3388 Update CN5G images tags to the latest release in all CI pipelines
* !3351 Fix ASN1 struct double free
* !3405 Fix for NR UE DLSCH decoding barrier in case of no feedback
* !3404 Polar: remove dead code and a wrong comment
2025-04-29 06:52:39 +00:00
Robert Schmidt
688156164c Merge remote-tracking branch 'origin/remove-dead-code-polar' into integration_2025_w17 (!3404)
Polar: remove dead code and a wrong comment

a file code duplicated and no more used a comment is wrong:
uint16_t x = INFINITY; is wrong, the gcc comment is true
uint16_t x= INFINITY; sets x=-32768 because it is truncature of 0x7FFFFF

add SIMD for the top lines when i run polartest
2025-04-28 17:46:34 +02:00
Robert Schmidt
af7ce8e9b1 Merge remote-tracking branch 'origin/fix_for_tx_wait_for_dlsch' into integration_2025_w17 (!3405)
Fix for NR UE DLSCH decoding barrier in case of no feedback

In !3291 NTN CI RFsim test fails with the UE being stuck. After some
investigation, this seems to be caused by the scenario where there is no
feedback for DLSCH. In that case there is no need to wait for DLSCH
being completed before generating feedback (there is no feedback).
2025-04-28 17:46:11 +02:00
Robert Schmidt
d46fb4fc68 Merge remote-tracking branch 'origin/fix-asn1-free' into integration_2025_w17 (!3351)
Fix ASN1 struct double free

When paging, RA and other SI have same PDCCH search space, we should
free the struct once and reset the other pointers to NULL.
2025-04-28 17:45:46 +02:00
Robert Schmidt
d12a9d9063 Merge remote-tracking branch 'origin/ci-update-cn5g-images-tags' into integration_2025_w17 (!3388)
Update CN5G images tags to the latest release in all CI pipelines

This MR is updating the tags of the CN5G docker images to the latest
release v2.1.9, for all CI pipelines.
2025-04-28 12:23:21 +02:00
Robert Schmidt
7eba632b79 Merge remote-tracking branch 'origin/metanoia-improve-conn' into integration_2025_w17 (!3382)
Improve radio for Metanoia RU (and likely others)

We introduced a regression that lowered the achievable DL throughput
with at least the Metanoia RU (i.e., in the configuration and the UE
that we use). git bisect showed up one commit, which does not seem
necessary. We just revert this commit, as it improves the throughput and
does not seem to have a negative impact on performance.

Further, increase RLC buffers a bit. Limit 7.2 pipeline number of layers
to 2.
2025-04-28 12:22:40 +02:00
Robert Schmidt
f8449846fc Merge remote-tracking branch 'origin/refactor_simd_multiplications' into integration_2025_w17 (!3178)
mod: refactor PHY multiplications

Refactoring multiple copies of the same "complex multiplication code"
into inline functions
2025-04-28 12:21:59 +02:00
Laurent THOMAS
1208521959 remove dead code and a wrong comment 2025-04-28 11:59:17 +02:00
Robert Schmidt
d2f332e18e Limit FHI-72 to two layers
With PMI reporting working (see HEAD^^), it seems that four layers put
two much processing strain on the machine (cacofonix), which asserts
immediately. In tests, it was found that the same test throughput
(600Mbps) can be achieved with two layers, while not crashing the
machine.
2025-04-28 10:12:49 +02:00
francescomani
799c19b229 no need to wait for dlsch decoding being completed before ack/nack if feedback is disabled 2025-04-28 07:54:03 +02:00
Laurent THOMAS
d980301f29 fix old bug always increasing frame_tx compared with 3GPP frame number 2025-04-27 20:27:36 +02:00
Sakthivel Velumani
18c9a3720d Fix asn1c double free
The UE stores PDCCH search spaces from the network in NR_BWP_PDCCH_t
struct within NR_UE_MAC_INST_t. After storing, the pointers otherSI_SS,
ra_SS and paging_SS are updated to point to the stored SS. Multiple
pointers could point to the same stored SS struct depending on
configuration. Then when the UE wants to release the SS, the pointers
are used to free the stored SS using ASN_STRUCT_RESET(). If multiple
pointers point to the same SS, calling ASN_STRUCT_RESET() on all
pointers would lead to double free. So one needs to check for dangling
pointer before freeing.

Instead of using pointers and assigning them during configuration, we
use SS id for otherSI_SS, ra_SS and paging_SS to retrieve the pointers
whenever needed. When the UE wants to release the SS, we make them -1
indicating an invalid SS id.
2025-04-25 15:40:07 -04:00
Robert Schmidt
6728d3b923 Merge remote-tracking branch 'origin/e1-bearer-mod-encdec-tests' into integration_2025_w17 (!3261)
Add Bearer Context Modification Request/Response enc/dec lib and adopt in stack

This MR is introducing the Bearer Context Modification Response enc/dec
library with relative unit test, and it is also adopting it in the
stack.  Also:

- Refactor Security Information IE decoding function
- Adopt Bearer Context Modification Request lib in stack (introduced in
  !3219 (merged))
2025-04-25 15:03:55 +02:00
Robert Schmidt
73cd5d4a02 Merge remote-tracking branch 'origin/bugfix_T_txdataF' into integration_2025_w17 (!3391)
small bugfix for T tracer

small bugfix: missing beam index when addressing txdataF in T tracer
command. Also changed order of if(gNB->phase_comp) so that data is
exported in any case.
2025-04-25 14:54:16 +02:00
Robert Schmidt
7639cea5e5 Merge remote-tracking branch 'origin/issue_947' into integration_2025_w17 (!3380)
Issue 947 and compilation improvements

This MR started with a small commit (03c7f151) to close #947. Little did
I know that I would be taken in a long journey through OAI compilation
hell.
2025-04-25 14:53:46 +02:00
Matthias Mehlhose
04e35af5a5 mod: remove simde_ prefix and use oai_ prefix instead 2025-04-25 14:48:00 +02:00
Matthias Mehlhose
59d7e74157 add: unit tests 2025-04-25 14:47:59 +02:00
Matthias Mehlhose
8bfc0dfedd del: double defines (see tools_defs.h) 2025-04-25 14:47:59 +02:00
Laurent THOMAS
8c55c4b8ab move traces of phy simulators to stdout (some were in stderr) 2025-04-25 14:47:59 +02:00
Laurent THOMAS
7982a9da41 set correct parameter type, and fuse funcions that do same real/complex vector operations, doing this, fix a lot of unitary multiplications (else there would be numerous cast operations 2025-04-25 14:47:59 +02:00
Laurent THOMAS
95ae7772bf simplifly, reegroup functions in tools_defs.h 2025-04-25 14:47:59 +02:00
Laurent THOMAS
04fc2fbb2e make correct description of sub_cpx_vector16 and remove mixed dead code 2025-04-25 14:47:59 +02:00
Laurent THOMAS
4e3fab67a8 remove unused function with duplicated name to another one 2025-04-25 14:47:59 +02:00
Laurent THOMAS
2528a0614a - replace SIMDE package internal types usage by oai defined types
- remove some unused functions
2025-04-25 14:47:59 +02:00
Laurent THOMAS
fefb96a115 merge functions conj(a)*b and a*conj(b) 2025-04-25 14:47:59 +02:00
Laurent THOMAS
bb93b06663 use one call to multiply the full size vector 2025-04-25 14:47:59 +02:00
HHI
f470ea5946 mod: refactor PHY multiplications 2025-04-25 14:47:59 +02:00
Guido Casati
f418078a0e Update ci-scripts/yaml_files/5g_rfsimulator/README.md 2025-04-25 12:23:45 +02:00
Robert Schmidt
14269b7933 Merge remote-tracking branch 'origin/f1-du-config-update-fixes' into integration_2025_w17 (!3401)
F1AP: Allocate gNB_DU_ID before storing ID

Update the test so it would catch that bug. Check in eq_() that both
gNB_DU_IDs would be present, or not, using xor.

Found while interop testing with OSC DU.
2025-04-25 08:40:17 +02:00
Robert Schmidt
566790c8ec Merge remote-tracking branch 'origin/sib_misconfiguration_assertion' into integration_2025_w17 (!3399)
SIBs in DL slot check

This MR add assertions to prevent scheduling SIBs in slots that are not DL
2025-04-25 08:39:53 +02:00
Robert Schmidt
67887e1040 Merge remote-tracking branch 'origin/fix_3372' into integration_2025_w17 (!3397)
Fix for MIB/SIB gNB delay mechanism

Fix for !3372 to start scheduling/print gNB stats when the PRACH noise
estimation is ready
2025-04-25 08:38:19 +02:00
Robert Schmidt
aee1e663d9 Merge remote-tracking branch 'origin/fix-all-mem-leak-mac-no-ue' into integration_2025_w17 (!3377)
Fix all direct MAC memory leaks

This MR fixes many memory leaks in the MAC that are otherwise shown by
asan if the gNB is started. UEs can be connected and it seems the MAC
does not leak memory. It also fixes a number of memory problems where
e.g., the generation of SIB1 "steals" memory from the
ServingCellConfigCommon. See the commits for more details.

Note that this still leaves behind a lot of memory after calling the new
function mac_top_destroy_gNB(). To see them, add free(mac); in that
function. However, there are no "direct leaks", so it would be feasible
to still clean up (it's just that we don't do it, yet).

I checked. In a "standard" configuration (FR1, 30kHz), the memory leaks
come basically from RRC. Also, the F1 UE context setup message leaks
some memory, which we will handle in the future by adding
encoding/decoding functions that with corresponding utility (free, copy)
functions. On the other hand, the frequent F1 messages (UL/DL RRC
Message Transfer) do not leak memory (they have the utility functions).

A final commit just makes the inability to write nrRRC_stats.log,
nrL1_stats.log, and nrMAC_stats.log, non-fatal to the gNB.
2025-04-25 08:37:34 +02:00
Robert Schmidt
413b84b179 Allocate gNB_DU_ID before storing ID
Update the test so it would catch that bug. Check in eq_() that both
gNB_DU_IDs would be present, or not, using xor.
2025-04-24 18:42:06 +02:00
francescomani
657a464e6f increase size of max measurement definitions in OAI UE as per 38.331 2025-04-24 18:40:49 +02:00
francescomani
76040b97aa move rrc_config_dl_ptrs_params to common header since it is also used by dlsim 2025-04-24 18:40:49 +02:00
francescomani
4f7bbda19a remove LTE/rrc_vars.h include in ulsim 2025-04-24 18:40:49 +02:00
francescomani
50e91dc386 remove pdcp.h dependency in nr-uesoftmodem 2025-04-24 18:40:49 +02:00
francescomani
b7185b3b6a remove NR/nr_rrc_proto.h dependency from nr_rlc_oai_api.h 2025-04-24 18:40:49 +02:00
francescomani
85ee4647b5 remove NR/nr_rrc_defs.h dependency from asn1_msg.h 2025-04-24 18:40:49 +02:00
francescomani
b05d1ff599 remove gNB structure dependency from get_MeasConfig in asn1_msg.c 2025-04-24 18:40:49 +02:00
francescomani
bda64a05d9 remove gNB structure dependency from do_RRCReestablishment in asn1_msg.c 2025-04-24 18:40:49 +02:00
francescomani
368e74930c remove gNB structure dependency from do_RRCReconfiguration in asn1_msg.c 2025-04-24 18:40:49 +02:00
francescomani
735a631499 remove gNB structure dependency from do_RRCSetup in asn1_msg.c 2025-04-24 18:40:49 +02:00
francescomani
7a4c5ab6aa remove LTE/rrc_defs.h dependency in rrc_UE.c 2025-04-24 18:40:49 +02:00
francescomani
9e0d3c50bc move NR_RRC_BUF_SIZE to common 2025-04-24 18:40:49 +02:00
francescomani
492fae4292 remove rrc_defs.h dependency in L2_interface 2025-04-24 18:40:49 +02:00
francescomani
9df009cf66 remove rrc_gNB_radio_bearers.h dependency in nr_pdcp_entity.h 2025-04-24 18:40:49 +02:00
francescomani
60a57c69b3 Remove dependency from RRC gNB structure in NR RLC API
Pass a "type" of RLC operational mode, from which split-type/gNB/UE
decision is derived.

Co-authored-by: Robert Schmidt <robert.schmidt@openairinterface.org>
2025-04-24 18:40:07 +02:00
Florian Kaltenberger
183b4a1d0f small bugfix: missing beam index when addressing txdataF in T tracer command. Also changed order of if(gNB->phase_comp) so that data is exported in any case. 2025-04-24 18:09:47 +02:00
Robert Schmidt
f9224e1fc8 File-based stats: abort writing if we can't write
There might be a number of reasons, such as read-only write system,
erros, etc. Still gracefully continue instead of aborting the operation.
2025-04-24 17:22:43 +02:00
Robert Schmidt
83dc33d3bf Avoid memory leaks: ext1 directly overwritten by p2 2025-04-24 17:22:43 +02:00
Robert Schmidt
d785187f28 Make deep copy for TDD_UL_DL_ConfigCommon instead of stealing pointer 2025-04-24 17:22:42 +02:00
Robert Schmidt
d41e7a95df Fix direct memory leak 2025-04-24 17:22:42 +02:00
Robert Schmidt
a57e4cd655 Fix direct memory leak 2025-04-24 17:22:42 +02:00
Robert Schmidt
de35a0a59c Fix memory leak: fix_tdd_pattern() allocates pattern1.ext 2025-04-24 17:22:42 +02:00
Robert Schmidt
8ee0b8efdf Introduce mac_top_destroy_gNB(): free MAC memory 2025-04-24 17:22:42 +02:00
Robert Schmidt
6afc0dee50 Correctly free 2-step RA/MsgA structures in fix_scc() 2025-04-24 17:22:42 +02:00
Robert Schmidt
b18fff6ae2 Correctly deep-copy memory structures on SIB1 creation 2025-04-24 17:22:42 +02:00
Robert Schmidt
c26a12e6b7 Correctly free ASN.1 memory for unused dedicated BWPs
prepare_scd() sets up memory for possible dedicated BWPs to be set up.
If they are not used, they are freed in fix_scd(). [1]

There are two problems:

1. in prepare_scd(), multiple structures are allocated once (for
   multiple elements), but inserted once. When trying to free those, the
   logic of ASN.1 is to free list elements individually, but then we try
   to call free() on each element of the list that has been allocated in
   one go. Fix this by doing multiple allocations to be in line with
   ASN.1 logic.

2. in fix_scd(), free recursively all data structures, not only the
   sequence element itself.

[1] this is horrible. We should only allocate memory if we actually need
it, but let's fix the more urgent problem of memory leaks first. Fixing
the logic problem would be more involved.
2025-04-24 17:22:42 +02:00
Guido Casati
e9dcbc66f0 Adopt DRB failed item enc/dec in PDU Session Resource Setup List item enc/dec 2025-04-24 11:30:29 +02:00
Guido Casati
e2e3ed09a9 Use in stack enc/dec library for E1 Bearer Context Modification Response 2025-04-24 11:29:10 +02:00
francescomani
2e9f5a7789 asserting if the otherSIB slot is not downlink 2025-04-24 09:30:28 +02:00
francescomani
f63ac3f1e4 asserting if the SIB1 slot is not downlink 2025-04-24 09:30:24 +02:00
francescomani
0301b239a2 print stats only after scheduler started 2025-04-23 16:42:03 +02:00
francescomani
3afa5760b8 fix num_scheduled_prach_rx with num occasion per slot 2025-04-23 14:49:57 +02:00
francescomani
3974136a05 remove LTE/rrc_vars dependency in uesoftmodem 2025-04-23 08:16:30 +02:00
francescomani
9f3a374758 remove NR UE rrc_defs dependency in rrc_messages_types 2025-04-23 08:16:30 +02:00
francescomani
3ba7c6bb11 remove unused nr_mac_rrc_sl_mib_ind 2025-04-23 08:16:30 +02:00
Robert Schmidt
4da30019be Merge branch 'integration_2025_w16' into 'develop'
Integration: `2025.w16`

Closes #949, #929, and #941

See merge request oai/openairinterface5g!3392

* !3207 Create nrUE network interface from SDAP (rebased)
* !3293 Cleanup and refactor initial gNB configuration
* !3326 Enable SSB-SINR based CSI reporting
* !3330 NR UE: consider the ratio of PUSCH EPRE to DMRS EPRE when calculating PUSCH DMRS power scaling
* !3376 Correct block_length to Kprime for LDPC decoder
* !3390 fix IP address in 4G UE
* !3071 time management module
* !3254 Follow up on NAS Registration Accept lib
* !3121 Bugfix for number of PRBs in PUCCH format 2
* !3387 fix NTN LEO scenario
* !3393 rejecting DRB if not configured in PDCP-Config
* !3372 Add Delay Mechanism for Initial MIB/SIB Transmission in gNB Scheduler
2025-04-22 16:16:33 +00:00
Thomas Schlichter
8f93424e53 Adapt NTN-LEO config after integration branch runs 2025-04-22 15:47:41 +02:00
Robert Schmidt
d623cbed7d Merge remote-tracking branch 'origin/issue_949' into integration_2025_w16 (!3393)
rejecting DRB if not configured in PDCP-Config

Closes issue #949
2025-04-22 09:38:42 +02:00
Robert Schmidt
f5b0d9603b Merge remote-tracking branch 'origin/fix_ntn_leo' into integration_2025_w16 (!3387)
fix NTN LEO scenario

NR UE: in nr_slot_fep() perform FO compensation in local tmp_dft_in
array instead of global rxdata array.

This avoids problems if nr_slot_fep() is called more than once for an
OFDM symbol.
2025-04-22 09:38:07 +02:00
Robert Schmidt
884e60da69 Merge remote-tracking branch 'origin/remove-prach-delay' into integration_2025_w16 (!3372)
Add Delay Mechanism for Initial MIB/SIB Transmission in gNB Scheduler

- Delay MIB/SIB in gNB until PRACH noise converges
- Remove the first PRACH random access attempt delay in NR UE
2025-04-22 09:37:31 +02:00
Jaroslava Fiedlerova
3d5177e5f7 Merge remote-tracking branch 'origin/bugfix_pucch2_prb_size' into integration_2025_w16 (!3121)
Bugfix for number of PRBs in PUCCH format 2

[TS 38.213 - Section 9.2.1 PUCCH Resource Sets] If the format indicates
PUCCH-format2 or PUCCH-format3, the PUCCH format configured for a PUCCH resource
is PUCCH format 2 or PUCCH format 3, respectively, where the PUCCH resource also
includes a number of PRBs provided by nrofPRBs, a number of symbols for a PUCCH
transmission provided by nrofSymbols, and a first symbol for the PUCCH
transmission provided by startingSymbolIndex.

[TS 38.213 - Section 9.2.3 UE procedure for reporting HARQ-ACK] If a UE transmits
a PUCCH with O_ACK HARQ-ACK information bits and O_CRC bits using PUCCH format 2
or PUCCH format 3 in a PUCCH resource that includes M_PUCCH_RB PRBs, the UE
determines a number of PRBs M_PUCCH_RB_min for the PUCCH transmission to be the
minimum number of PRBs (...)

[TS 38.213 - Section 9.2.5.1 UE procedure for multiplexing HARQ-ACK or CSI and
SR in a PUCCH] If a UE transmits a PUCCH with O_ACK HARQ-ACK information bits,
O_SR = ⌈log2(K+1)⌉ SR bits, and O_CRC CRC bits using PUCCH format 2 or PUCCH
format 3 in a PUCCH resource that includes M_PUCCH_RB PRBs, the UE determines
a number of PRBs M_PUCCH_RB_min for the PUCCH transmission to be the minimum
number of PRBs (...)

[TS 38.213 - Section 9.2.5.2 UE procedure for multiplexing HARQ-ACK/SR/CSI in
a PUCCH] If a UE has HARQ-ACK, SR and wideband or sub-band CSI reports to
transmit and the UE determines a PUCCH resource with PUCCH format 2, or the UE
has HARQ-ACK, SR and wideband CSI reports to transmit and the UE determines a
PUCCH resource with PUCCH format 3 or PUCCH format 4, where (...) the UE
transmits the HARQ-ACK, SR, and CSI reports bits by selecting the minimum number
PUCCH M_PUCCH_RB_min of the M_PUCCH_RB PRBs satisfying (...)

[TS 38.213 - Section 9.2.5.2 UE procedure for multiplexing HARQ-ACK/SR/CSI in a
PUCCH] If a UE has one or more CSI reports and zero or more HARQ-ACK/SR
information bits to transmit in a PUCCH where the HARQ-ACK, if any, is in
response to a PDSCH reception without a corresponding PDCCH; if any of the CSI
reports are overlapping (...); else, the UE transmits the
O_ACK + O_SR + O_CSI + O_CRC bits in a PUCCH resource provided by
pucch-CSI-ResourceList and determined as described in clause 9.2.5

Therefore, the number of PRBs to be used by PUCCH-format2 is M_PUCCH_RB_min,
except if we have zero HARQ-ACK bits, or if we have any HARQ-ACK, is in response
to a PDSCH reception without a corresponding PDCCH. In this case, we must use
the resources indicated in the pucch-CSI-ResourceList and determined as described
in clause 9.2.5.

In OAI, we have:
asn1cSeqAdd(&csirep->reportConfigType.choice.periodic->pucch_CSI_ResourceList.list, pucchcsires);

Where the resource added to the list corresponds to:

pucchres2->pucch_ResourceId = *pucchressetid;
pucchres2->startingPRB = 0;
pucchres2->intraSlotFrequencyHopping = NULL;
pucchres2->secondHopPRB = NULL;
pucchres2->format.present = NR_PUCCH_Resource__format_PR_format2;
pucchres2->format.choice.format2 = calloc(1,sizeof(*pucchres2->format.choice.format2));
pucchres2->format.choice.format2->nrofPRBs = 8;
pucchres2->format.choice.format2->nrofSymbols = 1;
pucchres2->format.choice.format2->startingSymbolIndex = 13;

Currently, in develop branch, we get these prb_size for PUCCH-format2:

[NR_RRC]   NGAP_PDUSESSION_SETUP_RESP: sending the message
[NGAP]   pdusession_setup_resp_p: pdusession ID 1, gnb_addr 172.31.0.1, SIZE 4, TEID 1579669408
[NR_MAC]   (596.3) pucch_pdu->prb_size = 4
[NR_MAC]   (596.4) pucch_pdu->prb_size = 3
[NR_MAC]   (600.3) pucch_pdu->prb_size = 4
[NR_MAC]   (600.4) pucch_pdu->prb_size = 3
[NR_MAC]   (604.3) pucch_pdu->prb_size = 4
[NR_MAC]   (604.4) pucch_pdu->prb_size = 3
[NR_MAC]   (608.3) pucch_pdu->prb_size = 4

While in QXDM we have Num RB = 8, whenever we have zero HARQ-ACK bits:

UCI Request BMask =             ACK_NACK_RPT | CSI_RPT
               Start symbol = 13
               Num Symbols = 1
               Starting RB = 0
               REL16 DMRS EN = 0
               Dual Pol Status = 0
               Num RB = 2
               Freq Hopping Flag =          HOP_MOD_NEITHER
               Second Hop RB = NA
               Num HARQ ACK Bits = 1
               Num SR Bits = 0
               Num UCI P1 Bits = 8

UCI Request BMask =             ACK_NACK_RPT | CSI_RPT
               Start symbol = 13
               Num Symbols = 1
               Starting RB = 0
               REL16 DMRS EN = 0
               Dual Pol Status = 0
               Num RB = 3
               Freq Hopping Flag =          HOP_MOD_NEITHER
               Second Hop RB = NA
               Num HARQ ACK Bits = 3
               Num SR Bits = 0
               Num UCI P1 Bits = 13

UCI Request BMask =                            CSI_RPT
               Start symbol = 13
               Num Symbols = 1
               Starting RB = 0
               REL16 DMRS EN = 0
               Dual Pol Status = 0
               Num RB = 8
               Freq Hopping Flag =          HOP_MOD_NEITHER
               Second Hop RB = NA
               Num HARQ ACK Bits = 0
               Num SR Bits = 0
               Num UCI P1 Bits = 10

UCI Request BMask =                   CSI_RPT | SR_RPT
               Start symbol = 13
               Num Symbols = 1
               Starting RB = 0
               REL16 DMRS EN = 0
               Dual Pol Status = 0
               Num RB = 8
               Freq Hopping Flag =          HOP_MOD_NEITHER
               Second Hop RB = NA
               Num HARQ ACK Bits = 0
               Num SR Bits = 1
               Num UCI P1 Bits = 11

Therefore, this MR fixes the prb_size, so that the number of PUCCH-format2 PRBs matches correctly.
2025-04-18 14:24:07 +02:00
Jaroslava Fiedlerova
94e82200e3 Merge remote-tracking branch 'origin/nas-reg-accept-lib' into integration_2025_w16 (!3254)
Follow up on NAS Registration Accept lib

This MR is a follow up on !2984 (merged).

The goal is to enhance the NAS Registration Accept lib:
- Add regression test for NAS Registration Accept: the goal of this test is to
  prevent on the decoding of the NAS Registration Accept sent by the OAI CN5G
- Add equality check and free utility functions to NAS Registration Accept
  library
- Free NAS Registration Accept after use: heap memory is allocated for this
  message during decoding and shall be free after processing
- Remove harcoded Slice Differentiator (SD) in NAS decode_nssai_ie and update
  the processing logic: The SD stored in the allowed S-NSSAI list was hardcoded
  in the decoding function, however this IE is not mandatory but optional.
  Therefore, the check of the decoded message contents should take into account
  the presence of the field in the received message and in that scenario, check
  the stored value against the one from the UICC. If no SD was received, consider
  the UICC SD a valid one.
- Cleanup and other fixes to decode_registration_accept: (1) adopt byte array
  (2) move registration result enc/dec to registration accept library (3) check
  on buffer lengths (4) add defines whenever necessary (5) simplify the code
2025-04-18 14:21:22 +02:00
Bartosz Podrygajlo
84b9272979 Disable PRACH delay workaround in NR UE
Disable the PRACH workaround in NR UE. With the MIB/SIB delay
implemented on the gNB there is no longer a need to delay first
NR UE random access attempt.
2025-04-18 10:27:23 +02:00
Bartosz Podrygajlo
a3ef5293fb Add Delay Mechanism for Initial MIB/SIB Transmission in gNB Scheduler
This commit introduces a delay mechanism for the first MIB/SIB transmission
in the gNB scheduler to allow PRACH noise estimate to converge stabilize
before first PRACH preamble reception.

Key changes:
- Added the `num_scheduled_prach_rx` variable to gNB_MAC_INST to keep track
  of total number scheduled of PRACH receptions. Using uint64_t type to avoid
  overflow.
- Updated the `gNB_dlsch_ulsch_scheduler` function to conditionally schedule
  MIB/SIB transmissions if `num_scheduled_prach_rx` is at least 100.
  The value comes from OAIs implementation of PRACH noise estimate.
2025-04-18 10:26:36 +02:00
francescomani
ba2a0c4d1e rejecting DRB addition if DRB field not present at setup in PDCP-Config 2025-04-18 09:44:41 +02:00
Jaroslava Fiedlerova
c0d9212afc Merge remote-tracking branch 'origin/feature-time-manager' into integration_2025_w16 (!3071)
time management module

introduction of a time management module
2025-04-18 09:08:24 +02:00
Guido Casati
906b564ed0 Add unit tests for Bearer Context Modification Response
One for successful setup and the other for setup failure.
2025-04-18 09:07:35 +02:00
Cedric Roux
b89b3abd13 API change: new arguments to time_manager_start() 2025-04-18 09:05:39 +02:00
Cedric Roux
4834d93006 fix typo 2025-04-18 09:02:55 +02:00
Cedric Roux
2f7eb6ebf9 replace many DevAssert with AssertFatal for better user experience 2025-04-18 09:02:55 +02:00
Cedric Roux
b487c4deb2 restructure the code for retrieval of configuration parameters 2025-04-18 09:02:55 +02:00
Cedric Roux
c9ad10f9f9 remove ngap from linking
It used to be necessary.
2025-04-18 09:02:55 +02:00
Cedric Roux
59be08e3e6 add link to time management module to the main readme 2025-04-18 09:02:55 +02:00
Cedric Roux
7cbedb1575 time management module
This commit introduces a time management module.

See doc/time_management.md for details.
2025-04-18 09:02:54 +02:00
Jaroslava Fiedlerova
9bccad31b5 Merge remote-tracking branch 'origin/hotfix-ip-address-lte-ue' into integration_2025_w16 (!3390)
fix IP address in 4G UE

The following error was appearing when running LTE UE:

inet_pton(): cannot convert -64.-74.0.2 to IPv4 network address

The allocated address by the core actually is 192.182.0.2.
On my host "char" is signed, leading to the above error (192 and 182
are seen as signed).
Let's force "ip_addr" unsigned and everyone is happy.
2025-04-18 08:10:28 +02:00
Jaroslava Fiedlerova
32d1026b16 Merge remote-tracking branch 'origin/fix-ldpcdecoder-compile-by-clang' into integration_2025_w16 (!3376)
Correct block_length to Kprime for LDPC decoder

When compile the OAI by CMake, it shows the following error:

../openair1/PHY/CODING/nrLDPC_decoder/nrLDPC_decoder_CL.c:353:40: error: no member named 'block_length' in 'struct nrLDPC_dec_params'
    int block_length    = p_decParams->block_length;
2025-04-18 08:09:23 +02:00
Jaroslava Fiedlerova
18372ae27e Merge remote-tracking branch 'origin/issue-929' into integration_2025_w16 (!3330)
NR UE: consider the ratio of PUSCH EPRE to DMRS EPRE when calculating PUSCH
DMRS power scaling

When calculating DMRS scaling ratio, we should consider PUSCH EPRE to DMRS
EPRE according to TS 38.214 Table 6.2.2-1.

Close #929
2025-04-17 23:03:13 +02:00
Jaroslava Fiedlerova
6e67c1ac20 Merge remote-tracking branch 'origin/NR_SSB_SINR' into integration_2025_w16 (!3326)
Enable SSB-SINR based CSI reporting

3GPP 38.331 release 16 specifies that If the field reportQuantity-r16 is present,
UE shall ignore reportQuantity (without suffix). reportQuantity-r16 configures
SSB based SINR as the reporting quantity.

set do_SINR = 1; in gNB params part of the config file to enable SSB based SINR
reporting.
2025-04-17 23:01:08 +02:00
Jaroslava Fiedlerova
315ed8e564 Merge remote-tracking branch 'origin/nr-gnb-config-refactor' into integration_2025_w16 (!3293)
Cleanup and refactor initial gNB configuration

This is follow-up on !3048 (merged). Major changes in this MR:
- Add config functions to reduce redundant code repeated in multiple places in the file
- Add macros to reduce redundant code in gNB configuration
- Refactor RCconfig_NR_NG
- Cleanup obsolete and commented out code
- Refactor includes in executables/nr-gnb.c
- Introduce platform type plmn_id_t for consistency across the stack: F1AP, NGAP can now use the same struct type
- And other minor formatting
2025-04-17 19:56:58 +02:00
Jaroslava Fiedlerova
ba2d1a880d Merge remote-tracking branch 'origin/sdap-changes' into integration_2025_w16 (!3207)
Create nrUE network interface from SDAP (rebased)

A rebase of !2485. Dropped a few refactors and SDAP manager changes.
Changes
1. Move tunnel interface read thread to SDAP for gNB (noS1) and UE (noS1 and SA).
2. Hold tunnel interface socket fd in SDAP entity instead of global variable.
3. Handle UE tunnel interface creation and IP configuration from NAS thread in noS1 and SA modes.
4. Modified UE tunnel interface naming scheme. Additional PDU sessions get oaitun_ue<id>p<pdusession_id>.

Closes #941
2025-04-17 19:53:57 +02:00
alexjiao
570c1b5639 Consider the ratio of PUSCH EPRE to DMRS EPRE when calculating PUSCH DMRS power scaling 2025-04-17 14:23:03 +02:00
Cedric Roux
b99fcdf289 fix IP address
The following error was appearing when running LTE UE:

    inet_pton(): cannot convert -64.-74.0.2 to IPv4 network address

The allocated address by the core actually is 192.182.0.2.

On my host "char" is signed, leading to the above error (192 and 182
are seen as signed).

Let's force "ip_addr" unsigned and everyone is happy.
2025-04-17 10:55:18 +02:00
Thomas Schlichter
1aa6aab120 NR UE: in nr_slot_fep() perform FO compensation in local tmp_dft_in array instead of global rxdata array
This avoids problems if nr_slot_fep() is called more than once for an OFDM symbol.
2025-04-16 17:42:11 +00:00
Thomas Schlichter
5f8aeaacc9 fix CI files for NTN LEO scenario 2025-04-16 17:00:36 +00:00
Guido Casati
3a449747de Update CN5G images tags to the latest release in all CI pipelines 2025-04-16 17:45:42 +02:00
Bartosz Podrygajlo
1ab8a58a2f Refactor TUN Interface Management and Move to SDAP Layer
This commit refactors the TUN interface management by moving its creation
and configuration from the PDCP layer to the SDAP layer for UE.

Key changes include:

- Introduced `tun_generate_ue_ifname` and `tun_destroy` functions for better
  TUN interface lifecycle management.
- Added support for creating and destroying UE-specific TUN interfaces in SDAP.
- Refactored `nr_pdcp_module_init` to remove TUN-related logic and moved it
  to SDAP.
- Updated NAS and SDAP layers to handle PDU session-specific TUN interface
  creation and configuration.
- Enhanced SDAP entity management to include TUN socket handling and thread
  lifecycle.
- Updated NAS message handling to initialize default PDU session TUN
  interfaces in NOS1 mode.
- Use a single SDAP thread function for gNB and UE
- Allow noS1 mode also in SA on gNB

These changes improve modularity by isolating TUN interface management within
the SDAP layer, aligning with the 3GPP architecture, and simplifying the PDCP
layer.

Co-Authored-By: Robert Schmidt <robert.schmidt@openairinterface.org>
2025-04-16 15:03:18 +02:00
Thomas Schlichter
5ac3f59d61 NR UE: fix and improve PHY layer debugging 2025-04-16 12:59:13 +00:00
Guido Casati
a19c786600 Add regression test for NAS Registration Accept decoding
This test verifies that a NAS Registration Accept message, as received
from the OAI CN5G, is correctly decoded and matches the expected output
structure. It ensures that future changes to the NAS decoder do not
break compatibility or correctness with existing decoding behavior.
2025-04-16 09:44:59 +02:00
Guido Casati
3fe601fa6b Add equality check to NAS Registration Accept library 2025-04-15 19:54:23 +02:00
Guido Casati
73b89726ad Remove harcoded Slice Differentiator (SD) in NAS decode_nssai_ie and update the processing logic
The SD stored in the allowed S-NSSAI list was hardcoded in the decoding
function, however this IE is not mandatory but optional, therefore
the check of the decoded message contents should take into account
this and check the stored value against the one from the UICC only when the field is present.
If no SD was received, consider the UICC SD a valid one.

Also, add free function to Registration Accept library and adopt in stack to free NAS
Registration Accept after use: heap memory is allocated for this message during decoding
and shall be free after processing.
2025-04-15 19:54:23 +02:00
Guido Casati
c6271a23e4 Add number of slices to decoding of NSSAI 2025-04-15 19:54:23 +02:00
Guido Casati
51661bd83c Cleanup and other fixes to decode_registration_accept
* adopt byte array
* add check on minimum buffer length
* improve comments
* remove call to LOG utility functions
* replace magic numbers with defines
* refined includes
2025-04-15 19:54:23 +02:00
Guido Casati
5c4595e699 Refactor 5GS registration result enc/dec functions
* adopt byte_array
* move enc/dec functions to Registration Accept library
* simplify code
* log result received in Registration Accept
2025-04-15 19:54:19 +02:00
Robert Schmidt
e30fe59489 increase RLC buffers for reduced losses 2025-04-15 16:19:14 +02:00
Robert Schmidt
8bd2d709cf Revert "Fix PMI condition: avoid division by zero"
This reverts commit 17e36029fa.
2025-04-15 16:19:05 +02:00
Raghavendra Dinavahi
bbcb31f64b Added description for do_SINR 2025-04-15 16:02:34 +02:00
Raghavendra Dinavahi
1666dced3e gNB changes- Extract SSB-SINR from received CSI report 2025-04-15 16:02:34 +02:00
Raghavendra Dinavahi
516a618816 UE changes- Generate SSB based SINR CSI report 2025-04-15 16:02:34 +02:00
Raghavendra Dinavahi
6e371b9e48 UE changes in PHY- Enable SSB based SINR measurement 2025-04-15 16:02:34 +02:00
Raghavendra Dinavahi
61778f3d55 gNB changes- Compute bitlen in case of SSB-SINR
compute SINR bitlen according to 38.212 table 6.3.1.1.2-6A
2025-04-15 16:02:34 +02:00
Raghavendra Dinavahi
2c164336bc gNB changes in RRC- Enable SSB-SINR based CSI reporting
3GPP 38.331 release 16 specifies that If the field reportQuantity-r16 is present, UE shall ignore reportQuantity (without suffix).
reportQuantity-r16 configures SSB based SINR as the reporting quantity.

set do_SINR = 1; in gNB params part of the config file to enable SSB based SINR reporting instead of the default RSRP based.
2025-04-15 16:02:34 +02:00
rmagueta
9e787a0ba2 Bugfix for number of PRBs in PUCCH format 2 2025-04-15 14:49:19 +01:00
Guido Casati
9b4245d921 Add generation function and handler for NAS Authentication Failure 2025-04-15 15:47:52 +02:00
Guido Casati
f5df7e17b0 Add NAS Authentication Failure enc/dec lib and unit tests 2025-04-15 15:47:51 +02:00
Guido Casati
a48e64f6f8 Adopt snprintf across the code in openair2/GNB_APP/gnb_config.c
Replaced `sprintf` with `snprintf` in gnb_config.c to enhance memory safety
by preventing potential buffer overflows. `sprintf` can cause buffer overflows
by not checking the destination buffer size. In contrast, `snprintf` allows
specifying a maximum buffer size, ensuring no overflow occurs by limiting
the number of characters written, including the null terminator.
2025-04-15 15:28:36 +02:00
Guido Casati
7ee6feac42 Use config module macros in openair2/E1AP/e1ap_setup.c 2025-04-15 15:28:36 +02:00
Guido Casati
e6da64b1a3 Refactor RCconfig_NR_NG
* use macros from config module
* cleanup irrelevant code
2025-04-15 15:28:36 +02:00
Guido Casati
bf6dff025b Cleanup obsolete code in gNB_app_task 2025-04-15 15:28:36 +02:00
Guido Casati
65e9ad7fdf Move get_node_type after init_gNB 2025-04-15 15:28:36 +02:00
Guido Casati
33ad0f917e Cleanup obsolete commented out code in gnb_config.h 2025-04-15 15:28:36 +02:00
Guido Casati
54990c2bc1 Refactor includes in executables/nr-gnb.c
* used IWYU tools + manual review
* output from IWYU:

The full include-list for /code/executables/nr-gnb.c:
/#include <PHY/NR_ESTIMATION/nr_ul_estimation.h>           // for dump_nr_I0_...
/#include <common/utils/LOG/log.h>  // lines 39-39
/#include <common/utils/system.h>                          // for threadCreate
/#include <fcntl.h>                                        // for SEEK_SET
/#include <openair1/PHY/NR_TRANSPORT/nr_dlsch.h>           // for dump_pdsch_...
/#include <openair1/PHY/NR_TRANSPORT/nr_ulsch.h>           // for dump_pusch_...
/#include <pthread.h>                                      // for pthread_join
/#include <stdint.h>                                       // for int64_t
/#include <stdio.h>                                        // for NULL, fclose
/#include <string.h>                                       // for memset
/#include <time.h>                                         // for clock_gettime
/#include <unistd.h>                                       // for sleep, size_t
/#include "NR_PHY_INTERFACE/NR_IF_Module.h"                // for NR_UL_IND_t
/#include "PHY/INIT/nr_phy_init.h"                         // for init_DLSCH_...
/#include "PHY/MODULATION/nr_modulation.h"                 // for apply_nr_ro...
/#include "PHY/NR_TRANSPORT/nr_transport_proto.h"          // for reset_activ...
/#include "PHY/TOOLS/tools_defs.h"                         // for c16_t
/#include "PHY/defs_RU.h"                                  // for RU_t, proce...
/#include "PHY/defs_common.h"                              // for wait_sync
/#include "PHY/defs_gNB.h"                                 // for PHY_VARS_gNB
/#include "PHY/defs_nr_common.h"                           // for NR_DL_FRAME...
/#include "PHY/impl_defs_nr.h"                             // for NR_MIXED_SLOT
/#include "SCHED_NR/fapi_nr_l1.h"                          // for nr_schedule...
/#include "SCHED_NR/phy_frame_config_nr.h"                 // for nr_slot_select
/#include "SCHED_NR/sched_nr.h"                            // for L1_nr_prach...
/#include "T.h"                                            // for T3, T_PUT_p...
/#include "assertions.h"                                   // for AssertFatal
/#include "common/ran_context.h"                           // for RAN_CONTEXT_t
/#include "common/utils/LOG/log.h"                         // for NR_PHY, LOG_D
/#include "executables/softmodem-common.h"                 // for get_softmod...
/#include "nfapi/oai_integration/vendor_ext.h"             // for NFAPI_MODE
/#include "nfapi_nr_interface_scf.h"                       // for nfapi_nr_co...
/#include "notified_fifo.h"                                // for initNotifie...
/#include "thread-pool.h"                                  // for abortTpool
/#include "time_meas.h"                                    // for print_meas_log
/#include "utils.h"                                        // for calloc_or_fail
2025-04-15 15:28:36 +02:00
Guido Casati
1893974d1d Set defint64val in long conf params 2025-04-15 15:28:36 +02:00
Guido Casati
7c0dc93087 Add function to set antenna ports in gNB config
* reduce redundant code
2025-04-15 15:28:36 +02:00
Guido Casati
2e7fa8e8b1 New function to set PLMN in gNB config
* reduce redundant code repeated in multiple places in the file
2025-04-15 15:28:36 +02:00
Guido Casati
1cdd684e24 Use plmn_id_t in RRC struct 2025-04-15 15:28:36 +02:00
Guido Casati
ac3f9f3e32 Introduce platform type plmn_id_t for consistency across the stack
* F1AP, NGAP can now use the same struct type
* this improves maintainability
2025-04-15 15:28:34 +02:00
Guido Casati
c1f225abc1 Add set_snssai_config to replace redundant code in gnb_config.c 2025-04-15 15:27:39 +02:00
Guido Casati
2ee056bf45 Add definition for maximum number of slices according to 3GPP specs 2025-04-15 15:27:39 +02:00
Guido Casati
34fc1bb254 Set num_nssai to uint16_t in NGAP for consistency with other definitions 2025-04-15 15:27:39 +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
Guido Casati
49b3e2ee69 Cleanup commented out code in gnb_config.c and other minor formatting 2025-04-15 15:25:53 +02:00
Robert Schmidt
f3eb713084 Merge branch 'integration_2025_w15' into 'develop'
Integration: `2025.w15`

Closes #901, #943, #944, #942, and #939

See merge request oai/openairinterface5g!3374

* !3358 RedCap InitialBWP
* !3364 NR UE: fix PRACH generation with frequency resource id not 0 when msg1-FDM > 1 in SIB1
* !3365 nr pdcp: 'count' is 32 bits, use explicit type instead of generic 'int'
* !3366 Fix typo in gNB_scheduler_uci.c
* !3370 Doc: add information on how to avoid a common asan bug
* !3275 NAS service reject
* !3312 NR UE: enable concurrent UL slot processing
* !3368 Encapsulate cmake asn1c call, suppress useless output
* !3336 Fix logging in nr_dlsim
* !3281 Add support for 'dl_min_mcs' and 'ul_min_mcs' configuration parameters
* !3355 NR UE: add support for continuous frequency offset compensation (in particular NTN LEO Doppler)
* !3375 CI CoreNetwork fixes
* !3184 NR SIB2
* !3348 CI: Replacing Devkit server with a Grace Hopper in Aerial pipeline
2025-04-15 05:54:26 +00:00
Robert Schmidt
b790fb235d Add SIB2 and SIB19 to NTN-LEO config 2025-04-14 21:29:34 +02:00
Robert Schmidt
e085fb5fee Merge remote-tracking branch 'origin/aerial_to_gh' into integration_2025_w15 (!3348)
CI: Replacing Devkit server with a Grace Hopper in Aerial pipeline

Switch servers on the Aerial pipeline from Gigabyte (AMD) to Grace
Hopper (ARM), and make the necessary changes:

- Update XML, YAML, and gnb.conf
- Change the argument passed to the L1 in aerial_l1_entrypoint.sh to be
  compatible with the GH
- Update the Aerial setup in TESTBench.md and Aerial_FAPI_Split_Tutorial.md docs
- Decrease the tested throughput due to an issue with the RU. Will open
  another MR to increase it once the problem is fixed.
2025-04-14 18:18:18 +02:00
Robert Schmidt
98d4dff509 Merge remote-tracking branch 'origin/NR_gNB_SIB2' into integration_2025_w15 (!3184)
NR SIB2

- Transmission of SIB2
- Fixes for transmission and reception of SIB19

Closes #901
2025-04-14 17:01:28 +02:00
Robert Schmidt
5c5dbdf2d3 Merge remote-tracking branch 'origin/ci-refactor-cn-fixes' into integration_2025_w15 (!3375)
CI CoreNetwork fixes

Some minor fixes after !3322
2025-04-14 17:00:59 +02:00
Robert Schmidt
07f8158378 Merge remote-tracking branch 'origin/ntn_leo_freq_comp' into integration_2025_w15 (!3355)
NR UE: add support for continuous frequency offset compensation (in particular NTN LEO Doppler)

- move function add_noise() to file
  openair1/SIMULATION/TOOLS/phase_noise.c
- refactor (co)sinus calculation out of phase_noise() into get_sin_cos()
  in nr_common.c
- NR UE: continuously estimate the frequency offset using PBCH DMRS
- NR UE: add command line parameter --initial-fo to specify known
  initial frequency offset
- NR UE: add support for continuous DL frequency offset compensation
  --cont-fo-comp
- NR UE: add support for continuous UL frequency offset
  pre-compensation. Depending on the main source of frequency offset,
  pre-compensate the UL frequency offset (FO) accordingly. Therefore
  modify the flag --cont-fo-comp to accept an integer value, where
  * 1 specifies, that the main FO contribution comes from the accuracy of the local oscillator (LO)
  * 2 specifies, that the main FO contribution comes from Doppler shift
- NR UE: add PI controller to continuous frequency offset compensation
- rfsimulator: enable and correct NTN LEO doppler simulation
- use SIMD to speed up nr_fo_compensation()
- Extend NTN LEO example in RUNMODEM.md to include continuous Doppler
  compensation
- NR UE: in nr_adjust_synch_ue() extend the peak search to +/- cyclic
  prefix size, esp. for LEO NTN scenarios the timing drifts during
  initial sync, which is mostly compensated with
  --ntn-initial-time-drift. But there might be a residual time offset,
  and by extending the peak search window we make this more tolerant.
- NR UE: remove unused nr_slot_tx_offset, it is unused since commit
  f3e60a14
- NR UE: remove now unnecessary local variable
  update_ntn_system_information, directly use
  UE->ntn_config_message->update instead
2025-04-14 16:59:27 +02:00
Reem Bahsoun
42a4292149 Modify ci_infra.yaml and XML to start CN from Grace Hopper 2025-04-14 11:39:13 +02:00
Reem Bahsoun
b3a1e3d2e8 Doc update
- Update the Aerial tutorial to include Grace Hopper server and add reference to Gigabyte server setup instructions.
- Update the Aerial setup in the TESTBench.md
2025-04-14 11:39:08 +02:00
francescomani
7c4eabdb6e fix for DLSCH DMRS reference point (regression at the OAI UE introduced when testing with OAI gNB for a missing implementation in OAI gNB) 2025-04-14 11:28:00 +02:00
Robert Schmidt
75b237fb90 Add 5G RFsim NTN LEO CI Test 2025-04-14 10:45:40 +02:00
Robert Schmidt
890a6c702e Remove unnecessary fields in NTN-LEO gNB config 2025-04-14 10:42:10 +02:00
francescomani
9185c29e33 change ss0 configuration to schedule multiple sibs in ntn config files with small bw 2025-04-14 10:15:50 +02:00
Robert Schmidt
f3724ec451 Add SIBs in configuration doc and feature set 2025-04-14 10:15:50 +02:00
Robert Schmidt
e73f1f6220 F1AP: Correctly encode DU configuration update acknowledge SI container
Fixes: b91e1b0a12 ("Add enc/dec lib for F1AP gNB-DU Configuration
Update Acknowledge (Interface Management)")
2025-04-14 10:15:50 +02:00
Robert Schmidt
463942d90e F1AP: correctly encode SI containers
- encode all SI containers the encoding function gets (it's not the
  encoding function's job to enforce semantics)
-

Fixes: 30628b820c ("Add encoding/decoding lib for F1AP Setup Response
(Interface Management)")
2025-04-14 10:15:50 +02:00
Robert Schmidt
7edf52ca5b Use cp_f1ap_() functions to properly copy F1 messages 2025-04-14 10:15:50 +02:00
francescomani
a9e9dfbd06 assertions for wrong node type SIB input 2025-04-14 10:15:50 +02:00
francescomani
3b22c4a566 Revert tentative fix for double sib1 decoding because it doesn't behave as expected. Instead a new pending_sib variable is used for the same goal.
This reverts commit 35e9d1e0c2.
2025-04-14 10:15:50 +02:00
francescomani
2228c3966f enabling configuration of transmitted SIBs in NTN config file 2025-04-14 10:15:50 +02:00
francescomani
08da0bd2cc improvements at UE to receive multiple instances of otherSIB
for example SIB2 and SIB19 which are scheduled in separate messages
2025-04-14 10:15:50 +02:00
francescomani
e4cb8be023 do not schedule reception of DLSCH associated with DCI for SIB1 if no SIB1 is scheduled for reception
in this scenario we proably were scheduling reception of otherSIB in the same slot as SIB1 was present
2025-04-14 10:15:50 +02:00
francescomani
97ca739be2 remove hardcoded window size for otherSI in UE 2025-04-14 10:15:50 +02:00
francescomani
5e8f649963 check multiple DCI candidates with same length if SIB RNTI 2025-04-14 10:15:50 +02:00
francescomani
c633fa5855 increase number of candidates for otherSIB 2025-04-14 10:15:50 +02:00
francescomani
6af70bd4b9 fix buggy TBS function for SIB and set additional candidate for common search space 2025-04-14 10:15:50 +02:00
francescomani
04213f2981 schedule SIBs other than 1 (including fixes for SIB19) 2025-04-14 10:15:50 +02:00
francescomani
535d8e7765 other SIBs scheduling configuration in SIB1 2025-04-14 10:15:45 +02:00
Robert Schmidt
556396e56e Ping: use cn name when checking for CN IP address 2025-04-12 11:17:22 +02:00
Robert Schmidt
135b522cf4 CoreNetwork: do not look up IP for CN name printing
In various places, e.g., during initialization (before deployment), we
use the name of the CN object, previously including the IP address.
However, the IP might not be available (because the CN is not deployed),
so we would get warnings at this stage. Avoid this by not looking up the
IP.

There is now one place where we have to look up the IP address
separately.

Also, the exception in initialization might be misleading if we used
{self}, because we complain about no node being present, but the {self}
would include a non-existing node name => do not use it.
2025-04-12 11:17:22 +02:00
Robert Schmidt
cb175569eb Merge remote-tracking branch 'origin/xl_min_mcs' into integration_2025_w15 (!3281)
Add support for 'dl_min_mcs' and 'ul_min_mcs' configuration parameters

Add support for 'dl_min_mcs' and 'ul_min_mcs' configuration parameters,
they will enforce the gNB scheduler to select always a MCS equal or
above its values

In addition to use a min value for MCS, this MR also enables the testing
of a specific MCS value with COTS UE, by setting

    xl_min_mcs = xl_max_mcs

example:

    dl_min_mcs: 22
    dl_max_mcs: 22
    ul_min_mcs: 7
    ul_max_mcs: 7

In the example above, the scheduler will use always MCS 22 for downlink
and MCS 7 for uplink.
2025-04-12 11:03:56 +02:00
Robert Schmidt
ec65c7cbaa Merge remote-tracking branch 'origin/nr_dlsim_improve_logging' into integration_2025_w15 (!3336)
Fix logging in nr_dlsim

Added Python helper script to plot buffer data
2025-04-12 11:03:25 +02:00
Robert Schmidt
e7b46342d5 Merge remote-tracking branch 'origin/asn1c-default-no-output' into integration_2025_w15 (!3368)
Encapsulate the asn1c call from cmake in a cmake function run_asn1c().
As a notable change to the previous manual add_custom_command()
invocation, in suppresses the output of asn1c by default [1] and stores
it in a log file. In case of asn1c4 error, the output will output on
stdout.

Use the new run_asn1c() in all occasions for code generation.

[1] it is quite verbose, with many warnings that we cannot influence nor
suppress, and lists all generated files which is verified by the build
system automatically, anyway.
2025-04-11 16:29:27 +02:00
Robert Schmidt
26dcb876f5 Merge remote-tracking branch 'origin/nr-ue-slot-tx-cleanup' into integration_2025_w15 (!3312)
NR UE: enable concurrent UL slot processing

This commit introduces support for concurrent UL slot processing
Key changes:

- Increased number of UL actors from 1 to 2
- fix several issues related to writing to global variables inside processSlotTX
- Ensure in-order execution of if_module calls by utilizing the preexisting dynamic_barrier structure.

Note: for NTN, concurrent UL slot processing does not work. A flag
`--num-ul-actors X` has been introduced that allows to fix the number of
UL actors to `X` (default is 2).
2025-04-11 16:26:41 +02:00
Robert Schmidt
bc5f2ec99e Merge remote-tracking branch 'origin/nr-ue-nas-service-reject' into integration_2025_w15 (!3275)
Add 5GMM Service Reject enc/dec library and unit test

- introduce the library for the NAS Service Reject enc/dec
- add relevant unit test
- add handler
2025-04-11 16:25:52 +02:00
Sakthivel Velumani
d334a75c8a Fix memory leak and possible crash
nr_dlsim allocates memory on every SNR iteration without freeing it.
This can lead to memory exhaustion. Fix this by allocating only once
and reuse memory. Also, free it before exit.
2025-04-11 09:46:55 -04:00
Sakthivel Velumani
4adadedeb9 Fix logging to matlab/bin file
Add Python script to plot logged buffers. Modified write_file_matlab()
to add .bin extension if binary format is selected.
2025-04-11 09:46:50 -04:00
francescomani
4b23c7ea65 F1 transmission from CU to DU of SIB2 2025-04-11 15:37:08 +02:00
Chieh-Chun Chen
49d302960c Fix: modify block_length to Kprime 2025-04-11 14:40:52 +02:00
Robert Schmidt
2ab747eaa6 CI CoreNetwork: define function getName()
Some functionality (e.g., in cls_oaicitest.py) uses cn.getName(). Define
that function to avoid assertions.
2025-04-11 14:16:49 +02:00
Robert Schmidt
4296bfe34f Merge remote-tracking branch 'origin/info-asan-bug' into integration_2025_w15 (!3370)
Doc: add information on how to avoid a common asan bug

Closes #943
2025-04-11 07:38:55 +02:00
Robert Schmidt
b381d7ffae Merge remote-tracking branch 'origin/944-typo-in-gnb_scheduler_uci-c' into integration_2025_w15 (!3366)
Fix typo in gNB_scheduler_uci.c

Closes #944
2025-04-11 07:38:29 +02:00
Robert Schmidt
b9f5746df4 Merge remote-tracking branch 'origin/fix-count-nr-pdcp' into integration_2025_w15 (!3365)
nr pdcp: 'count' is 32 bits, use explicit type instead of generic 'int'

fix #942
2025-04-11 07:38:02 +02:00
Robert Schmidt
9e4aefda6b Merge remote-tracking branch 'origin/issue-939' into integration_2025_w15 (!3364)
NR UE: fix PRACH generation with frequency resource id not 0 when msg1-FDM > 1 in SIB1

When msg1-FDM > 1 (2, 4 or 8) in SIB1, the frequency resource id of
PRACH could be not 0, current PRACH generation only considers frequency
resource id = 0. This MR fixes it, verified with 3rd-party gNB.

Closes #939
2025-04-11 07:37:33 +02:00
Robert Schmidt
8d294d71b8 Merge remote-tracking branch 'origin/RedCap_InitialBWP' into integration_2025_w15 (!3358)
RedCap InitialBWP

Prevent RedCap UEs to move to DedicatedBWP

  This allows the coexistence of RedCap UEs and non-RedCap UEs in the
  same cell by having an InitialBWP with 20MHz and a larger
  DedicatedBWP.

Update example RedCap configuration file to have 20 MHz InitialBWP and
40 MHz DedicatedBWP
2025-04-11 07:36:51 +02:00
Thomas Schlichter
67482f5d85 CI: add NR UE conf file including NTN LEO channel model 2025-04-10 14:36:01 +00:00
Thomas Schlichter
6e06c817f4 NR UE: remove now unnecessary local variable update_ntn_system_information
directly use `UE->ntn_config_message->update` instead
2025-04-10 13:56:20 +00:00
Thomas Schlichter
997790f656 NR UE: remove unused nr_slot_tx_offset
`nr_slot_tx_offset` is unused since commit f3e60a1417
2025-04-10 13:56:20 +00:00
Thomas Schlichter
a9132a2f79 NR UE: in nr_adjust_synch_ue() extend the peak search to +/- cyclic prefix size
esp. for LEO NTN scenarios the timing drifts during initial sync, which is mostly compensated with --ntn-initial-time-drift.
But there might be a residual time offset, and by extending the peak search window we make this more tolerant.
2025-04-10 13:56:20 +00:00
Thomas Schlichter
4e3a7ad56e Extend NTN LEO example in RUNMODEM.md to include continuous Doppler compensation 2025-04-10 13:56:20 +00:00
Thomas Schlichter
29ed144764 use SIMD to speed up nr_fo_compensation() 2025-04-10 13:56:20 +00:00
Thomas Schlichter
d6585f3750 rfsimulator: enable and correct NTN LEO doppler simulation 2025-04-10 13:56:20 +00:00
Thomas Schlichter
18469302d8 NR UE: add PI controller to continuous frequency offset compensation 2025-04-10 13:56:20 +00:00
Thomas Schlichter
84712f5f92 NR UE: add support for continuous UL frequency offset pre-compensation
Depending on the main source of frequency offset, pre-compensate the UL frequency offset (FO) accordingly.
Therefore modify the flag `--cont-fo-comp` to accept an integer value, where
 - `1` specifies, that the main FO contribution comes from the accuracy of the local oscillator (LO)
 - `2` specifies, that the main FO contribution comes from Doppler shift
2025-04-10 13:56:13 +00:00
Thomas Schlichter
aac4642910 NR UE: add support for continuous DL frequency offset compensation (--cont-fo-comp) 2025-04-10 13:54:59 +00:00
Thomas Schlichter
616568a79d NR UE: add command line parameter --initial-fo to specify known initial frequency offset 2025-04-10 13:54:50 +00:00
Guido Casati
312f296b60 Add NAS handler for Service Reject message 2025-04-10 15:35:59 +02:00
Guido Casati
2b9782caa1 Add unit test for Service Reject 2025-04-10 15:35:59 +02:00
Guido Casati
5af4b89203 Add enc/dec function for NAS Service Reject library 2025-04-10 15:35:55 +02:00
Thomas Schlichter
d16507055f NR UE: continuously estimate the frequency offset using PBCH DMRS 2025-04-10 12:37:19 +00:00
Thomas Schlichter
dd827c7bd8 refactor (co)sinus calculation out of phase_noise() into openair1/PHY/TOOLS/get_sin_cos.c 2025-04-10 12:37:19 +00:00
Thomas Schlichter
9e4df97d84 move function add_noise() to file openair1/SIMULATION/TOOLS/phase_noise.c 2025-04-10 12:36:30 +00:00
luis_pereira87
f1811b5934 Move the initialization of bler_stats to 'add_new_nr_ue()' function 2025-04-10 13:18:29 +01:00
Bartosz Podrygajlo
afd49e703c Workaround for issues with NTN and NR UE concurrent UL processing
- Allow setting number of used UL actors in NR UE
 - Disable the second UL actor in NTN GEO testcase
2025-04-10 13:11:00 +02:00
Bartosz Podrygajlo
2d35fc90ac NR UE: enable concurrent UL slot processing
This commit introduces support for concurrent UL slot processing

Key changes:
 - Increased number of UL actors from 1 to 2
 - fix several issues related to writing to global variables inside
   processSlotTX
 - Ensure in-order execution of if_module calls by utilizing the
   preexisting dynamic_barrier structure.
2025-04-10 12:47:54 +02:00
luis_pereira87
b421d6eaa9 Set 'min_mcs' in 'bler_stats' when initializing and when no activity is detected, instead of hardcode it to '9' 2025-04-10 11:20:59 +01:00
Guido Casati
25bc1bd89a Adopt eq_gprs_timer in eq_service_accept 2025-04-10 11:13:42 +02:00
Guido Casati
ab3bb36357 Add eq_gprs_timer to common 5gmm_lib 2025-04-10 11:13:42 +02:00
luis_pereira87
699afafc6f Add support for 'dl_min_mcs' and 'ul_min_mcs' configuration parameters, they will enforce the gNB scheduler to select always a MCS equal or above its values 2025-04-10 09:11:17 +01:00
luis_pereira87
96b0cae63e Drop 'min_grant_mcs' configuration parameter 2025-04-10 09:11:17 +01:00
Robert Schmidt
b9a6d93bfa Doc: add information on how to avoid a common asan bug 2025-04-10 09:06:57 +02:00
Robert Schmidt
05d393a399 Encapsulate cmake asn1c call, suppress useless output
Encapsulate the asn1c call from cmake in a cmake function run_asn1c().
As a notable change to the previous manual add_custom_command()
invocation, in suppresses the output of asn1c by default [1] and stores
it in a log file. In case of asn1c4 error, the output will output on
stdout.

Use the new run_asn1c() in all occasions for code generation.

[1] it is quite verbose, with many warnings that we cannot influence nor
suppress, and lists all generated files which is verified by the build
system automatically, anyway.
2025-04-09 14:35:29 +00:00
alexjiao
683670ed91 Fix PRACH generation with frequency resource id not 0 when msg1-FDM > 1 in SIB1 2025-04-09 20:06:41 +08:00
Reem Bahsoun
52f0bbc165 Modify files in ci-scripts/yaml_files/sa_gnb_aerial
- Update the L1 (cuBB) version in the docker-compose.yaml
- Change the argument for the L1 config file (cuphycontroller.yaml) in the aerial_l1_entrypoint.sh
2025-04-09 10:21:46 +02:00
Reem Bahsoun
8e253e3435 Modify XML and gnb.conf
- Update the N2 and N3 IP addresses to match the Grace Hopper's in the gnb.conf.
- Remove the test XML file for pulling images in the ARM image builder.
- Update the Aerial XML file to pull ARM images.
- Decrease tested throughput (temporarily) due to problems with Foxconn RU
2025-04-09 10:21:37 +02:00
francescomani
bc27d1e691 improvements in SIB2 message (info taken from commercial gNB) 2025-04-08 18:09:18 +02:00
Justin Garey
0f9220b5ef Fixed typo in gNB_schedyler_uci.c 2025-04-08 15:30:52 +00:00
Robert Schmidt
b5f7d22c02 Merge branch 'integration_2025_w14_p2' into 'develop'
Integration: `2025.w14` (part 2)

See merge request oai/openairinterface5g!3362

* !3255 Fixes for E1 and PDU session usage
* !3332 sched_ctrlCommon earlier
* !3356 Avoid accessing current_DL_BWP structure when scheduling DCI for other SIBs
* !3359 Fix inconsistent maxnoofPDUSessions definitions between NGAP and platform constants
* !3357 CI: update VVDN configuration file
* !3333 NR RLC improvements
* !3342 Fix bugs detected gcc
* !3347 feat(oran_fhlib_5g): O-RAN 7.2 FrontHaul Interface on Arm
* !3153 [E2 agent] RAN Control SM - support for REPORT Style 1 ("RRC Message" and "UE ID" RAN Parameter IDs)
* !3234 CI: minor tunings and improvements
* !3276 Optimization for unused symbols in NR UE
* !3317 Extend F1 Handover test
2025-04-08 12:20:05 +00:00
Robert Schmidt
469bf23666 Merge remote-tracking branch 'origin/extend-f1-ci-test' into integration_2025_w14_p2 (!3317)
Extend F1 Handover test

do 1 more handover in the same test to verify robustness

- This MR keeps a simple ping after the second handover since there are
  still issues due to scheduling starting too early, that is as soon as
  the UE context is added. This leads to retransmissions that could
  eventually lead to a test failure. The issue will be fixed in a future
  MR.

add check on connected DU to verify successful handover

- a new telnet function gets in input the UE ID and returns the ID of
  the connected DU

wait some time after deploying DU to mimic time for measurements
2025-04-08 10:06:06 +02:00
Robert Schmidt
b4f8c9c981 Merge remote-tracking branch 'origin/ifft-avoidance' into integration_2025_w14_p2 (!3276)
Optimization for unused symbols in NR UE

After processing TX frequency domain data skip IFFT call for symbols
that aren't used, the time domain buffer is memset instead.

Biggest benefit is when UE does not transmit PUSCH, or PUSCH is using <
14 symbols
2025-04-08 10:06:06 +02:00
Robert Schmidt
3bd2404eec Iperf_analyzeV2UDP(): variable is local 2025-04-08 10:06:06 +02:00
Robert Schmidt
d12e098736 Merge remote-tracking branch 'origin/ci-improvements' into integration_2025_w14_p2 (!3234)
CI: minor tunings and improvements
2025-04-08 10:06:06 +02:00
Robert Schmidt
748581293e Merge remote-tracking branch 'origin/RC_SM_RRC_Message_Copy' into integration_2025_w14_p2 (!3153)
[E2 agent] RAN Control SM - support for REPORT Style 1 ("RRC Message" and "UE ID" RAN Parameter IDs)

[Spring of Code 2024] contributions

Extended the RAN Control Service Model at E2 Agent to support all RC
REPORT Styles (1 - 5)
Implemented the following RAN Parameter IDs for REPORT Style 1:

1. "RRC Message": any DL-DCCH, and any UL-DCCH
2. "UE ID": as per spec, when the RRC Setup Complete or F1 UE Context
   Setup Request detected
2025-04-08 10:06:06 +02:00
Robert Schmidt
c3d80f8ac4 Merge remote-tracking branch 'origin/arm_fhi72' into integration_2025_w14_p2 (!3347)
feat(oran_fhlib_5g): O-RAN 7.2 FrontHaul Interface on Arm

This MR is enabling the 7.2 FHI on Arm systems.

Even though the performance are yet very bad (UE connection is very
difficult, 100Mbps DL, almost no UL), still I would like to merge this
now since the matter of making the FHI work is rather orthogonal to the
performance issues.

So merging this feature would provide a reliable settlement on top of
which we could then progressively enhance the porting of OAI to Arm.
Especially that would make our work easier by having less features to
rebase regularly on develop.

The main features this MR is made of are:

1. Make the xran patches dual

We provide patches for both E and F releases of xran that handles x86
targets as well as Arm targets. Both patches have been tested on both
types of machines (armix, broadbill).  Thanks to @brobert and @changy
for their work on xran.

2. Perform 9-bits BFP compression with ArmRAL

Since the BFP compression implementation provided with xran does rely
heavily on AVX512, we provide an alternative implementation that is
relying on Arm's RAN Acceleration Library (ArmRAL).

As of writing this commit description, only 9-bits compression is
supported. Other IQ width will be added.

This upcoming change does not prevent review to be performed since the
BFP compression functions of ArmRAL are identical except for the IQ
width. Adding further IQ width is therefore very straightforward.

3. Fixes in oran_fhlib_5g to support Arm

The library oran_fhlib_5g needed few changes to successfully compile and
run on Arm systems. Thanks to @brobert for his work on oran_fhlib_5g.
2025-04-08 10:06:06 +02:00
Robert Schmidt
83590bf1af Merge remote-tracking branch 'origin/fix-bugs-detected-gcc' into integration_2025_w14_p2 (!3342)
Fix bugs detected gcc
2025-04-08 10:06:06 +02:00
Robert Schmidt
8799adaca6 Merge remote-tracking branch 'origin/NR_RLC_rework' into integration_2025_w14_p2 (!3333)
NR RLC improvements

The goal of this MR is to reduce/eliminate the dependencies of NR RLC
from LTE RLC
2025-04-08 10:06:06 +02:00
Robert Schmidt
42a9dde691 Merge remote-tracking branch 'origin/ci-vvdn-update' into integration_2025_w14_p2 (!3357)
CI: update VVDN configuration file

- change frequency
- use MAC address of the new VVDN RU
2025-04-08 10:06:06 +02:00
Robert Schmidt
e4c9cb4125 Merge remote-tracking branch 'origin/fix-ngap-max-pdusession' into integration_2025_w14_p2 (!3359)
Fix inconsistent maxnoofPDUSessions definitions between NGAP and platform constants

There are 2 different definition of maxnoofPDUSessions (as per 3GPP TS
38.413), one in NGAP lib (set to 16) and one in platform_constants.h
(256 as per specs). The NGAP lib definition is removed in this commit
and replaced by the one compliant with the specs.

This is fixing the warning:

    In function 'fill_pdu_session_resource_failed_to_setup_item',
        inlined from 'rrc_gNB_send_NGAP_INITIAL_CONTEXT_SETUP_RESP' at /openair2/RRC/NR/rrc_gNB_NGAP.c:588:7:
    /openair2/RRC/NR/rrc_gNB_NGAP.c:451:12: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
      451 |   f->cause = cause;
          |   ~~~~~~~~~^~~~~~~
    In file included from /common/utils/ocp_itti/intertask_interface.h:235,
                     from /openair2/RRC/NR/rrc_gNB_NGAP.h:39,
                     from /openair2/RRC/NR/rrc_gNB_NGAP.c:31:
    /openair2/COMMON/ngap_messages_types.h: In function 'rrc_gNB_send_NGAP_INITIAL_CONTEXT_SETUP_RESP':
    /openair2/COMMON/ngap_messages_types.h:546:13: note: at offset [8724, 25769812488] into destination object 'gNB_ue_ngap_id' of size 4
      546 |   uint32_t  gNB_ue_ngap_id;
          |             ^~~~~~~~~~~~~~
2025-04-08 10:06:06 +02:00
Robert Schmidt
ec9b2bf7c9 Tune nFAPI 4x4 test case 2025-04-08 10:06:05 +02:00
Robert Schmidt
0cb22bd38f Merge remote-tracking branch 'origin/fix-null-ptr-access' into integration_2025_w14_p2 (!3356)
Avoid accessing current_DL_BWP structure when scheduling DCI for other SIBs

Avoid access to mac->current_DL_BWP structure when scheduling DCI for
SIBs other than 1. This is not needed and can cause NULL pointer access
which can happen if the UE has released MAC configuration or has not
started RA yet.
2025-04-08 10:06:05 +02:00
Robert Schmidt
ff50897905 Merge remote-tracking branch 'origin/sched_ctrlCommon-earlier' into integration_2025_w14_p2 (!3332)
sched_ctrlCommon earlier

This MR configures sched_ctrlCommon earlier, in RCconfig_nr_macrlc().

The objective of this MR is to solve the following Assert in the F1 test:

    19897952.126019 [NR_MAC] I Adding new UE context with RNTI 0x3269
    /oai-ran/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c:366:15: runtime error: member access within null pointer of type 'struct NR_UE_sched_ctrl_t'
    [INFO  tini (1)] Spawned child process '/opt/oai-gnb/bin/entrypoint.sh' with pid '7'
    [INFO  tini (1)] Main child exited normally (with status '1')
2025-04-08 10:06:05 +02:00
Cedric Roux
6504c038b2 nr pdcp: 'count' is 32 bits, use explicit type instead of generic 'int' 2025-04-08 09:41:36 +02:00
Guido Casati
67fd15b054 Add sleep after deploy of target DU in F1 handover CI test
Wait before triggering a handover. First, we send it very quickly after
deployment, which can make the DU crash (should be fixed in !3332). Second, a
UE would typically first measure neighbors. While we don't do this with OAI UE,
mimic this somewhat by giving more time.

See also !3332.
2025-04-07 18:51:14 +02:00
Guido Casati
9b3255f3cd Add check on UE connected to DU to verify successful handover in F1 CI test
* add CI function to fetch DU connected to input UE ID
* add to CI test
2025-04-07 18:51:13 +02:00
Guido Casati
a12e3a6e56 Extend F1 Handover test with 1 more handover
* the handover is followed by a sleep and an ping test

This MR keeps a simple ping after the second handover since there are still issues due to scheduling starting too early,
that is as soon as the UE context is added. This leads to retransmissions that could eventually lead to a test failure.
The issue will be fixed in a future MR.
2025-04-07 18:50:36 +02:00
Guido Casati
c12c5bb5b1 Add enc/dec library for E1 Bearer Context Modification Response 2025-04-07 12:34:52 +02:00
Guido Casati
489e2ba4a4 Use E1 Bearer Context Modification Request lib in stack 2025-04-07 12:29:47 +02:00
Guido Casati
248380b6a4 Refactor E1 Security Information decoding function
* adopt changes from 182b05bd
* add checks on optional IEs
* add checks on encoded buffer sizes
2025-04-07 12:29:23 +02:00
Guido Casati
673770d346 Bugfix in e1_decode_pdu_session_to_mod_item: missing check on allocation of optional pointer
The Bearer Context Modification Request test is adding 1 QoS Flow, therefore the encoding/decoding
is done and this bug does not show. The issue is there when no QoS Flow is mapped in the DRBnGRanModList,
therefore when no memory is allocated for the optional IE, and the member is accessed in the decoding
of the Flow Mapping Information.
2025-04-07 12:28:21 +02:00
Guido Casati
25a0934941 Fix missing deref on pointer types in Bearer Context Management lib
Note: the equality check macros are using a PRINT_ERROR function
that is enabled only when E1AP_LOG_ERRORS is defined.
2025-04-07 12:28:13 +02:00
Guido Casati
254e04357d Add function name to E1AP PRINT_ERROR macro 2025-04-07 12:28:13 +02:00
Guido Casati
e472bbdd1b Add missing stdint.h include in e1ap_bearer_context_management.c
The header was included via other headers, however since int types are
direcltly used in this file, the include is necessary.
2025-04-07 12:28:13 +02:00
ndomingues
f24a576d81 Update RedCap configuration file to have 20 MHz InitialBWP and 40 MHz DedicatedBWP 2025-04-04 21:43:19 +01:00
ndomingues
a59cfae18c Prevent RedCap UEs to move to dedicated BWP 2025-04-04 21:43:19 +01:00
Laurent THOMAS
54828f10d0 defined and not used variable 2025-04-04 16:05:46 +02:00
Laurent THOMAS
f9835e996a websrv useless if(), then string copy 2025-04-04 16:05:38 +02:00
Laurent THOMAS
990414572a error uint/int mixed in loops 2025-04-04 16:04:05 +02:00
Laurent THOMAS
5cabc74527 get_nr_prach_occasion_info_from_index() uses a uninitialzed value to make += operator 2025-04-04 16:02:56 +02:00
Miguel Fuentes
681da82228 Change FlexRIC submodule commit ID
Co-authored-by: Tano Bischoff <tano.bischoff@hhi.fraunhofer.de>
Co-authored-by: Khanh Toan Pham <khanh.toan.pham@hhi.fraunhofer.de>
Co-authored-by: Shrinish Donde <shrinish.donde@hhi.fraunhofer.de>
Co-authored-by: Theodoros Tsourdinis <theodoros.tsourdinis@sorbonne-universite.fr>
Co-authored-by: Teodora Vladic <teodora.vladic@openairinterface.org>
2025-04-04 15:32:05 +02:00
Khanh Toan Pham
12dfdb866c Add "RRC Message" and "UE ID" support in E2AP README
Co-authored-by: Tano Bischoff <tano.bischoff@hhi.fraunhofer.de>
Co-authored-by: Shrinish Donde <shrinish.donde@hhi.fraunhofer.de>
Co-authored-by: Theodoros Tsourdinis <theodoros.tsourdinis@sorbonne-universite.fr>
Co-authored-by: Miguel Fuentes <miguel.fuentes@i2cat.net>
Co-authored-by: Teodora Vladic <teodora.vladic@openairinterface.org>
2025-04-04 15:32:05 +02:00
Tano Bischoff
c612005d28 RAN Control REPORT Style 1: "UE ID" support
As per spec, UE ID shall be reported when the message event configured by
the Event Trigger Style 1 is set to “RRC Setup Complete" message (UE attach), or
“Xn/NG Handover Request” or “F1 UE Context Setup Request” (Intra gNB Handover).

In OAI RAN, Xn/NG Handover is not yet supported, and therefore not added as the trigger event
in this commit.

Additionally, as the Event Trigger Definition Format 1 is common for both "RRC Message" and "UE ID",
E2 node will report the “RRC Setup Complete" message which the xApp will decode and print.

Co-authored-by: Khanh Toan Pham <khanh.toan.pham@hhi.fraunhofer.de>
Co-authored-by: Shrinish Donde <shrinish.donde@hhi.fraunhofer.de>
Co-authored-by: Theodoros Tsourdinis <theodoros.tsourdinis@sorbonne-universite.fr>
Co-authored-by: Miguel Fuentes <miguel.fuentes@i2cat.net>
Co-authored-by: Teodora Vladic <teodora.vladic@openairinterface.org>
2025-04-04 15:32:05 +02:00
Robert Schmidt
8477de3571 Make function static: only used in rrc_gNB.c 2025-04-04 15:26:56 +02:00
Romain Beurdouche
fb3678bea4 feat(oran_fhlib_5g): Arm support information in documentation
Inform in O-RAN 7.2 documentation that DU execution on Arm is yet not fully supported and that 7.2 on Arm is only intended to enable experiments.
2025-04-04 13:26:01 +00:00
Romain Beurdouche
96a47821de feat(CI): Add FHI 7.2 build on native Arm build pipeline 2025-04-04 13:26:01 +00:00
Romain Beurdouche
09aec7f1d8 feat(oran_fhlib_5g): Documentation for Arm targets 2025-04-04 13:26:01 +00:00
Romain Beurdouche
e12bcc964d feat(oran_fhlib_5g): Make F release patch dual
Update the xran F release patch to work for Arm targets in addition to x86 targets.
2025-04-04 13:26:01 +00:00
Romain Beurdouche
54fd8ed9df feat(oran_fhlib_5g): BFP compression and decompression for Arm targets
The fronthaul library ships with BFP compression for AVX512 enabled targets.
This commit adds BFP compression for Arm targets by using the ArmRAL library.
2025-04-04 13:25:53 +00:00
Shrinish Donde
dfaf9dd630 RAN Control REPORT Style 1: "RRC Message" support
Send the copy of the following RRC messages to a xApp, if subscribed beforehand:
  - DL-DCCH -> any
  - UL-DCCH -> any

Co-authored-by: Tano Bischoff <tano.bischoff@hhi.fraunhofer.de>
Co-authored-by: Khanh Toan Pham <khanh.toan.pham@hhi.fraunhofer.de>
Co-authored-by: Theodoros Tsourdinis <theodoros.tsourdinis@sorbonne-universite.fr>
Co-authored-by: Miguel Fuentes <miguel.fuentes@i2cat.net>
Co-authored-by: Teodora Vladic <teodora.vladic@openairinterface.org>
Co-authored-by: Robert Schmidt <robert.schmidt@openairinterface.org>
2025-04-04 15:23:17 +02:00
Jaroslava Fiedlerova
a88f540081 CI: ping after reestablishment in sabox-b200 2025-04-04 11:55:39 +02:00
Jaroslava Fiedlerova
1e9e0b6dc7 CI: temporarily disable DRB integrity protection in B200 pipeline
Temporarily deactivate DRB integrity protection in SABOX-B200 E1 testcase
to avoid CI failure due to low measured throughput. Our investigation
suggests that the low throughput is likely due to limitation of the UE
(Quectel RM500Q), which appears to restrict the maximum data rate when
integrity protection is enabled. This limitation is not observed with
Quectel RM520N.
2025-04-04 11:55:39 +02:00
Jaroslava Fiedlerova
7417687f50 CI: update TESTBenches doc
- Cleanup and update of "Machines" table:
  - remove asterix - not used in CI
  - remove nokiabox - not used in CI
  - remove orion - not used in CI
  - update of "Lockable Resource" for individual machines - synch with
    https://jenkins-oai.eurecom.fr/lockable-resources/
  - remove column of "IP Address"
- Update information about build pipelines
2025-04-04 11:55:39 +02:00
Jaroslava Fiedlerova
955cad5741 CI: add warning log to HTML when service is restarted 2025-04-04 11:55:39 +02:00
Jaroslava Fiedlerova
b3328e96a4 CI: increase healthcheck interval for VNF-PNF deployment
The healthcheck interval sets when the first health check occurs after the
container starts. Increasing the healthcheck interval helps avoid marking
the container as "healthy" during the initialization phase of PNF. In
particular, USRP initialization of PNF service may take longer, and deployment
failures can occur even after the 10 seconds interval. Extending the healtcheck
interval provides more time for the service before assessing container health.
2025-04-04 11:55:39 +02:00
Jaroslava Fiedlerova
a4f9a7a6d4 CI: tuning gNB parameters of SABOX-B200 2025-04-04 11:55:34 +02:00
Bartosz Podrygajlo
3b174f685e Remove unnecessary memset of UE TX time domain samples array
Remove memset of the UE TX time domain samples array after trx_write in
RU_write()

This memset is unnecessary and can break openair0 libraries. Some
functionalities, e.g. usrp_lib write_thread expect the samples to be
present in the array after trx_write returns.

The array is always set before being sent either in idft or using memset
so there is no risk of sending the same data twice.
2025-04-04 11:14:09 +02:00
Bartosz Podrygajlo
0161a1c4fd Optimization for unused symbols in NR UE
After processing TX frequency domain data skip IFFT call for symbols that aren't
used, the time domain buffer is memset instead.
2025-04-04 11:12:48 +02:00
Jaroslava Fiedlerova
9207c74cba CI: enable 4 DL layers in VVDN FHI72 test
- increase tested throughput
- modify gNB config file to enable 4 DL layers
2025-04-04 09:45:39 +02:00
Jaroslava Fiedlerova
85b50925a4 doc: Update VVDN sample configuration files 2025-04-04 09:45:39 +02:00
Jaroslava Fiedlerova
683e982137 CI: more modifications for FHI72 VVDN test
- use Ubuntu image, instead of RHEL image - gNB fails with "Illegal
  instruction" during RA, when running with RHEL image
- init DPDK in VA mode
- increase number of cores Tpool
2025-04-04 09:45:39 +02:00
Jaroslava Fiedlerova
8412b94b8c CI: update VVDN configuration file
- change frequency
- use MAC address of new VVDN RU
2025-04-04 09:45:34 +02:00
Robert Schmidt
d13a0c9626 Merge remote-tracking branch 'origin/fix-e1-pdu-handling' into integration_2025_w14_p2 (!3255)
Fixes for E1 and PDU session usage

Fix a number of problems in E1 and PDU session handling:

- For multiple PDU session setup reqs, we send a bearer context setup
  each time; fix an assert that was triggered on the second bearer
  context setup message
- Add a log for E1 bearer context setup, as already done for
  modification and release
- If we get a PDU session setup for an existing PDU session, reject it
  as required by the spec [actually, it says to reject individual PDU
  sessions; keep it simple for now and reject the entire message, which
  might not be correct if there is one new PDU session that does not
  exist]
- Add a workaround to handle multiple PDU session setup requests that
  come in quick succession for different PDU sessions
2025-04-04 07:16:41 +02:00
Guido Casati
0065c6023a Remove unconsistent check in rrc_gNB_process_NGAP_PDUSESSION_RELEASE_COMMAND
Leading to clang error:
/oai-ran/openair2/RRC/NR/rrc_gNB_NGAP.c:1329:37: error: result of comparison of constant 256 with expression of type
'uint8_t' (aka 'unsigned char') is always false [-Werror,-Wtautological-constant-out-of-range-compare]

The value comes from the decoding of: ie->value.choice.PDUSessionResourceToReleaseListRelCmd.list.count
2025-04-03 22:30:29 +02:00
Robert Schmidt
23c909e28e Merge branch 'integration_2025_w14_p1' into 'develop'
Integration: `2025.w14` (part 1)

Closes #931

See merge request oai/openairinterface5g!3353

* !3247 Add enc/dec lib and unit test for 5GS NAS Service Accept
* !3316 Fix: Correctly Read PDU Address IE
* !3322 Refactor core network handling in CI, harmonize code
* !3327 NR UE fix for disable HARQ
* !3350 Cleanup NR PHY common definitions
* !3352 Turn off any Nagle-like algorithm for SCTP
2025-04-03 16:35:12 +00:00
Robert Schmidt
e45f429c35 Dummy nr_rlc_data_req() into nr-cuup.c 2025-04-03 17:34:54 +02:00
Guido Casati
5969ecc212 Use platform_constants.h definition NGAP_MAX_PDU_SESSION and remove NGAP lib definition
There are 2 different definition of maxnoofPDUSessions (as per 3GPP TS 38.413),
one in NGAP lib (set to 16) and one in platform_constants.h (256 as per specs).
The NGAP lib definition is removed in this commit and replaced by the one
compliant with the specs.

This is fixing the warning:

In function 'fill_pdu_session_resource_failed_to_setup_item',
    inlined from 'rrc_gNB_send_NGAP_INITIAL_CONTEXT_SETUP_RESP' at /openair2/RRC/NR/rrc_gNB_NGAP.c:588:7:
/openair2/RRC/NR/rrc_gNB_NGAP.c:451:12: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
  451 |   f->cause = cause;
      |   ~~~~~~~~~^~~~~~~
In file included from /common/utils/ocp_itti/intertask_interface.h:235,
                 from /openair2/RRC/NR/rrc_gNB_NGAP.h:39,
                 from /openair2/RRC/NR/rrc_gNB_NGAP.c:31:
/openair2/COMMON/ngap_messages_types.h: In function 'rrc_gNB_send_NGAP_INITIAL_CONTEXT_SETUP_RESP':
/openair2/COMMON/ngap_messages_types.h:546:13: note: at offset [8724, 25769812488] into destination object 'gNB_ue_ngap_id' of size 4
  546 |   uint32_t  gNB_ue_ngap_id;
      |             ^~~~~~~~~~~~~~
2025-04-03 15:40:14 +02:00
Bartosz Podrygajlo
d446543ffb Avoid accessing current_DL_BWP structure when scheduling DCI for other SIBs
Avoid access to mac->current_DL_BWP structure when scheduling DCI for
SIBs other than 1. This is not needed and can cause NULL pointer access
which can happen if the UE has released MAC configuration or has not
started RA yet.
2025-04-03 11:22:40 +02:00
Robert Schmidt
42111e0203 Merge remote-tracking branch 'origin/sctp_nodelay' into integration_2025_w14_p1 (!3352)
Turn off any Nagle-like algorithm for SCTP

This means that packets will be sent as soon as possible and no
unnecessary delays are introduced, at the cost of more packets in the
network.

https://www.man7.org/linux/man-pages/man7/sctp.7.html
2025-04-03 10:14:07 +02:00
Robert Schmidt
83c8a5ac0e Merge remote-tracking branch 'origin/PHY_defs_common' into integration_2025_w14_p1 (!3350)
Cleanup NR PHY common definitions
2025-04-03 10:13:42 +02:00
Robert Schmidt
e8247afd17 Merge remote-tracking branch 'origin/fix_UE_disableharq' into integration_2025_w14_p1 (!3327)
NR UE fix for disable HARQ

Asserting on feedback time only if feedback is enabled
2025-04-03 10:13:14 +02:00
Robert Schmidt
1449bdd410 Merge remote-tracking branch 'origin/ci-refactor-core-handling' into integration_2025_w14_p1 (!3322)
Refactor core network handling in CI, harmonize code

Prior to change set, there is a highly heterogeneous situation for core
network management in CI code: some log collection is done from groovy
files (when it could be done in python, which is easier for local
development), there are multiple commands to start a CN from XML files,
the code for starting a CN is always different (no one unified way to
start "any" CN), Ping/Iperf require some support in ci_infra.yaml, ...

To help with the above, refactor the handling of core networks in the CI
code as follows:

- define all CNs in ci_infra.yaml (basically how to deploy, undeploy,
  collect logs, and on which node)
- make one Python class that reads from ci_infra.yaml and that allows to
  start/stop previously defined CNs (and add unit tests...)
- make one XML command for start/stop of CNs, leveraging above class
- leverage the CNs defined in ci_infra.yaml consistently in
  Ping()/Iperf()
- delete old code

Furthermore, the following supporting changes/bugfixes are done:

- repair Iperf2_Unidir() and add unit test
- fix a number of invalid escape sequence errors (there are some
  remaining, which I will do soon)
- various bug fixes
- remove unused XML steps
2025-04-03 10:10:58 +02:00
Robert Schmidt
30c6c23dc8 Merge remote-tracking branch 'origin/931-pdu-session-type-is-incorrectly-used' into integration_2025_w14_p1 (!3316)
Fix: Correctly Read PDU Address IE

The QoS Rules loop correctly moves msg pointer allowing the PDU Address
IE to be read correctly. The PDU Address IE is only processed if it is
provided, otherwise there is a warning.

Closes #931
2025-04-03 10:10:35 +02:00
Robert Schmidt
9fdfbae91d Merge remote-tracking branch 'origin/nr-ue-nas-service-accept' into integration_2025_w14_p1 (!3247)
Add enc/dec lib and unit test for 5GS NAS Service Accept

- add new files for Service Accept fgmm_service_accept.c/.h containing
  the enc/dec functions (8.2.17 3GPP TS 24.501)
- enabled compiling
- add unit test
- add handler in stack
2025-04-03 10:09:53 +02:00
Robert Schmidt
277f8da010 Workaround to delay multiple concurrent PDU session
This is a hack. With some UEs/CN combinations, PDU session requests
might come in quick succession. Since 38.331 asks us to only have one
reconfiguration at once, we need to delay a second, third, ... PDU
session request until the first has passed, to make one reconfiguration
at a time.
2025-04-03 09:06:31 +02:00
luis_pereira87
b6e06e8f47 Turn off any Nagle-like algorithm for SCTP
This means that packets will be sent as soon as possible and no unnecessary delays are introduced, at the cost of more packets in the network.
https://www.man7.org/linux/man-pages/man7/sctp.7.html
2025-04-02 21:50:39 +01:00
Robert Schmidt
ee3601df5d Fix invalid escape sequence errors in cls_cluster.py
The following cases are covered
- we have a regex whose escape sequences are not to be evaluated in the
  string, but given verbatim to the regex engine. Hence, mark them as
  raw strings.
- some are parameters for the cmd.run() call, but the parameters are
  wrong, so remove that
- there is a `\|` that is also to be passed verbatim

    /home/richie/w/ci-refactor-core-handling/ci-scripts/cls_cluster.py:97: SyntaxWarning: invalid escape sequence '\-'
      if re.search('buildconfig.build.openshift.io/[a-zA-Z\-0-9]+ created', ret.stdout) is not None:
    /home/richie/w/ci-refactor-core-handling/ci-scripts/cls_cluster.py:167: SyntaxWarning: invalid escape sequence '\-'
      result = re.search(f'pod/(?P<pod>[a-zA-Z0-9_\-]+) created', ret.stdout)
    /home/richie/w/ci-refactor-core-handling/ci-scripts/cls_cluster.py:325: SyntaxWarning: invalid escape sequence '\$'
      self.cmd.run(f'oc get pods.metrics.k8s.io &>> cmake_targets/log/build-metrics.log', '\$', 10)
    /home/richie/w/ci-refactor-core-handling/ci-scripts/cls_cluster.py:385: SyntaxWarning: invalid escape sequence '\$'
      self.cmd.run(f'oc get pods.metrics.k8s.io &>> cmake_targets/log/build-metrics.log', '\$', 10)
    /home/richie/w/ci-refactor-core-handling/ci-scripts/cls_cluster.py:398: SyntaxWarning: invalid escape sequence '\$'
      self.cmd.run(f'oc get pods.metrics.k8s.io &>> cmake_targets/log/build-metrics.log', '\$', 10)
    /home/richie/w/ci-refactor-core-handling/ci-scripts/cls_cluster.py:413: SyntaxWarning: invalid escape sequence '\$'
      self.cmd.run(f'oc get pods.metrics.k8s.io &>> cmake_targets/log/build-metrics.log', '\$', 10)
    /home/richie/w/ci-refactor-core-handling/ci-scripts/cls_cluster.py:429: SyntaxWarning: invalid escape sequence '\|'
      grep_exp = "\|".join(attemptedImages)
    /home/richie/w/ci-refactor-core-handling/ci-scripts/cls_cluster.py:431: SyntaxWarning: invalid escape sequence '\$'
      self.cmd.run(f'for pod in $(oc get pods | tail -n +2 | awk \'{{print $1}}\'); do oc get pod $pod -o json &>> cmake_targets/log/build_pod_summary.log; done', '\$', 60)
2025-04-02 14:24:21 +02:00
Robert Schmidt
1fa0b501c6 Fix invalid escape sequence errors in args_parse.py
As parent. Fix these warnings:

    /home/richie/w/ci-refactor-core-handling/ci-scripts/args_parse.py:55: SyntaxWarning: invalid escape sequence '\-'
      if re.match('^\-\-help$', myArgv, re.IGNORECASE):
    /home/richie/w/ci-refactor-core-handling/ci-scripts/args_parse.py:58: SyntaxWarning: invalid escape sequence '\-'
      if re.match('^\-\-local$', myArgv, re.IGNORECASE):
    /home/richie/w/ci-refactor-core-handling/ci-scripts/args_parse.py:63: SyntaxWarning: invalid escape sequence '\-'
      elif re.match('^\-\-Apply=(.+)$', myArgv, re.IGNORECASE):
    /home/richie/w/ci-refactor-core-handling/ci-scripts/args_parse.py:64: SyntaxWarning: invalid escape sequence '\-'
      matchReg = re.match('^\-\-Apply=(.+)$', myArgv, re.IGNORECASE)
    /home/richie/w/ci-refactor-core-handling/ci-scripts/args_parse.py:74: SyntaxWarning: invalid escape sequence '\-'
      elif re.match('^\-\-mode=(.+)$', myArgv, re.IGNORECASE):
    /home/richie/w/ci-refactor-core-handling/ci-scripts/args_parse.py:75: SyntaxWarning: invalid escape sequence '\-'
      matchReg = re.match('^\-\-mode=(.+)$', myArgv, re.IGNORECASE)
    /home/richie/w/ci-refactor-core-handling/ci-scripts/args_parse.py:77: SyntaxWarning: invalid escape sequence '\-'
      elif re.match('^\-\-eNBRepository=(.+)$|^\-\-ranRepository(.+)$', myArgv, re.IGNORECASE):
    /home/richie/w/ci-refactor-core-handling/ci-scripts/args_parse.py:78: SyntaxWarning: invalid escape sequence '\-'
      if re.match('^\-\-eNBRepository=(.+)$', myArgv, re.IGNORECASE):
    /home/richie/w/ci-refactor-core-handling/ci-scripts/args_parse.py:79: SyntaxWarning: invalid escape sequence '\-'
      matchReg = re.match('^\-\-eNBRepository=(.+)$', myArgv, re.IGNORECASE)
    /home/richie/w/ci-refactor-core-handling/ci-scripts/args_parse.py:81: SyntaxWarning: invalid escape sequence '\-'
      matchReg = re.match('^\-\-ranRepository=(.+)$', myArgv, re.IGNORECASE)
    /home/richie/w/ci-refactor-core-handling/ci-scripts/args_parse.py:89: SyntaxWarning: invalid escape sequence '\-'
      elif re.match('^\-\-eNB_AllowMerge=(.+)$|^\-\-ranAllowMerge=(.+)$', myArgv, re.IGNORECASE):
    /home/richie/w/ci-refactor-core-handling/ci-scripts/args_parse.py:90: SyntaxWarning: invalid escape sequence '\-'
      if re.match('^\-\-eNB_AllowMerge=(.+)$', myArgv, re.IGNORECASE):
    /home/richie/w/ci-refactor-core-handling/ci-scripts/args_parse.py:91: SyntaxWarning: invalid escape sequence '\-'
      matchReg = re.match('^\-\-eNB_AllowMerge=(.+)$', myArgv, re.IGNORECASE)
    /home/richie/w/ci-refactor-core-handling/ci-scripts/args_parse.py:93: SyntaxWarning: invalid escape sequence '\-'
      matchReg = re.match('^\-\-ranAllowMerge=(.+)$', myArgv, re.IGNORECASE)
    /home/richie/w/ci-refactor-core-handling/ci-scripts/args_parse.py:103: SyntaxWarning: invalid escape sequence '\-'
      elif re.match('^\-\-eNBBranch=(.+)$|^\-\-ranBranch=(.+)$', myArgv, re.IGNORECASE):
    /home/richie/w/ci-refactor-core-handling/ci-scripts/args_parse.py:104: SyntaxWarning: invalid escape sequence '\-'
      if re.match('^\-\-eNBBranch=(.+)$', myArgv, re.IGNORECASE):
    /home/richie/w/ci-refactor-core-handling/ci-scripts/args_parse.py:105: SyntaxWarning: invalid escape sequence '\-'
      matchReg = re.match('^\-\-eNBBranch=(.+)$', myArgv, re.IGNORECASE)
    /home/richie/w/ci-refactor-core-handling/ci-scripts/args_parse.py:107: SyntaxWarning: invalid escape sequence '\-'
      matchReg = re.match('^\-\-ranBranch=(.+)$', myArgv, re.IGNORECASE)
    /home/richie/w/ci-refactor-core-handling/ci-scripts/args_parse.py:115: SyntaxWarning: invalid escape sequence '\-'
      elif re.match('^\-\-eNBCommitID=(.*)$|^\-\-ranCommitID=(.*)$', myArgv, re.IGNORECASE):
    /home/richie/w/ci-refactor-core-handling/ci-scripts/args_parse.py:116: SyntaxWarning: invalid escape sequence '\-'
      if re.match('^\-\-eNBCommitID=(.*)$', myArgv, re.IGNORECASE):
    /home/richie/w/ci-refactor-core-handling/ci-scripts/args_parse.py:117: SyntaxWarning: invalid escape sequence '\-'
      matchReg = re.match('^\-\-eNBCommitID=(.*)$', myArgv, re.IGNORECASE)
    /home/richie/w/ci-refactor-core-handling/ci-scripts/args_parse.py:119: SyntaxWarning: invalid escape sequence '\-'
      matchReg = re.match('^\-\-ranCommitID=(.*)$', myArgv, re.IGNORECASE)
    /home/richie/w/ci-refactor-core-handling/ci-scripts/args_parse.py:127: SyntaxWarning: invalid escape sequence '\-'
      elif re.match('^\-\-eNBTargetBranch=(.*)$|^\-\-ranTargetBranch=(.*)$', myArgv, re.IGNORECASE):
    /home/richie/w/ci-refactor-core-handling/ci-scripts/args_parse.py:128: SyntaxWarning: invalid escape sequence '\-'
      if re.match('^\-\-eNBTargetBranch=(.*)$', myArgv, re.IGNORECASE):
    /home/richie/w/ci-refactor-core-handling/ci-scripts/args_parse.py:129: SyntaxWarning: invalid escape sequence '\-'
      matchReg = re.match('^\-\-eNBTargetBranch=(.*)$', myArgv, re.IGNORECASE)
    /home/richie/w/ci-refactor-core-handling/ci-scripts/args_parse.py:131: SyntaxWarning: invalid escape sequence '\-'
      matchReg = re.match('^\-\-ranTargetBranch=(.*)$', myArgv, re.IGNORECASE)
    /home/richie/w/ci-refactor-core-handling/ci-scripts/args_parse.py:139: SyntaxWarning: invalid escape sequence '\-'
      elif re.match('^\-\-eNBIPAddress=(.+)$|^\-\-eNB[1-2]IPAddress=(.+)$', myArgv, re.IGNORECASE):
    /home/richie/w/ci-refactor-core-handling/ci-scripts/args_parse.py:140: SyntaxWarning: invalid escape sequence '\-'
      if re.match('^\-\-eNBIPAddress=(.+)$', myArgv, re.IGNORECASE):
    /home/richie/w/ci-refactor-core-handling/ci-scripts/args_parse.py:141: SyntaxWarning: invalid escape sequence '\-'
      matchReg = re.match('^\-\-eNBIPAddress=(.+)$', myArgv, re.IGNORECASE)
    /home/richie/w/ci-refactor-core-handling/ci-scripts/args_parse.py:147: SyntaxWarning: invalid escape sequence '\-'
      elif re.match('^\-\-eNB1IPAddress=(.+)$', myArgv, re.IGNORECASE):
    /home/richie/w/ci-refactor-core-handling/ci-scripts/args_parse.py:148: SyntaxWarning: invalid escape sequence '\-'
      matchReg = re.match('^\-\-eNB1IPAddress=(.+)$', myArgv, re.IGNORECASE)
    /home/richie/w/ci-refactor-core-handling/ci-scripts/args_parse.py:151: SyntaxWarning: invalid escape sequence '\-'
      elif re.match('^\-\-eNB2IPAddress=(.+)$', myArgv, re.IGNORECASE):
    /home/richie/w/ci-refactor-core-handling/ci-scripts/args_parse.py:152: SyntaxWarning: invalid escape sequence '\-'
      matchReg = re.match('^\-\-eNB2IPAddress=(.+)$', myArgv, re.IGNORECASE)
    /home/richie/w/ci-refactor-core-handling/ci-scripts/args_parse.py:155: SyntaxWarning: invalid escape sequence '\-'
      elif re.match('^\-\-eNBUserName=(.+)$|^\-\-eNB[1-2]UserName=(.+)$', myArgv, re.IGNORECASE):
    /home/richie/w/ci-refactor-core-handling/ci-scripts/args_parse.py:156: SyntaxWarning: invalid escape sequence '\-'
      if re.match('^\-\-eNBUserName=(.+)$', myArgv, re.IGNORECASE):
    /home/richie/w/ci-refactor-core-handling/ci-scripts/args_parse.py:157: SyntaxWarning: invalid escape sequence '\-'
      matchReg = re.match('^\-\-eNBUserName=(.+)$', myArgv, re.IGNORECASE)
    /home/richie/w/ci-refactor-core-handling/ci-scripts/args_parse.py:163: SyntaxWarning: invalid escape sequence '\-'
      elif re.match('^\-\-eNB1UserName=(.+)$', myArgv, re.IGNORECASE):
    /home/richie/w/ci-refactor-core-handling/ci-scripts/args_parse.py:164: SyntaxWarning: invalid escape sequence '\-'
      matchReg = re.match('^\-\-eNB1UserName=(.+)$', myArgv, re.IGNORECASE)
    /home/richie/w/ci-refactor-core-handling/ci-scripts/args_parse.py:167: SyntaxWarning: invalid escape sequence '\-'
      elif re.match('^\-\-eNB2UserName=(.+)$', myArgv, re.IGNORECASE):
    /home/richie/w/ci-refactor-core-handling/ci-scripts/args_parse.py:168: SyntaxWarning: invalid escape sequence '\-'
      matchReg = re.match('^\-\-eNB2UserName=(.+)$', myArgv, re.IGNORECASE)
    /home/richie/w/ci-refactor-core-handling/ci-scripts/args_parse.py:171: SyntaxWarning: invalid escape sequence '\-'
      elif re.match('^\-\-eNBPassword=(.+)$|^\-\-eNB[1-2]Password=(.+)$', myArgv, re.IGNORECASE):
    /home/richie/w/ci-refactor-core-handling/ci-scripts/args_parse.py:172: SyntaxWarning: invalid escape sequence '\-'
      if re.match('^\-\-eNBPassword=(.+)$', myArgv, re.IGNORECASE):
    /home/richie/w/ci-refactor-core-handling/ci-scripts/args_parse.py:173: SyntaxWarning: invalid escape sequence '\-'
      matchReg = re.match('^\-\-eNBPassword=(.+)$', myArgv, re.IGNORECASE)
    /home/richie/w/ci-refactor-core-handling/ci-scripts/args_parse.py:179: SyntaxWarning: invalid escape sequence '\-'
      elif re.match('^\-\-eNB1Password=(.+)$', myArgv, re.IGNORECASE):
    /home/richie/w/ci-refactor-core-handling/ci-scripts/args_parse.py:180: SyntaxWarning: invalid escape sequence '\-'
      matchReg = re.match('^\-\-eNB1Password=(.+)$', myArgv, re.IGNORECASE)
    /home/richie/w/ci-refactor-core-handling/ci-scripts/args_parse.py:183: SyntaxWarning: invalid escape sequence '\-'
      elif re.match('^\-\-eNB2Password=(.+)$', myArgv, re.IGNORECASE):
    /home/richie/w/ci-refactor-core-handling/ci-scripts/args_parse.py:184: SyntaxWarning: invalid escape sequence '\-'
      matchReg = re.match('^\-\-eNB2Password=(.+)$', myArgv, re.IGNORECASE)
    /home/richie/w/ci-refactor-core-handling/ci-scripts/args_parse.py:187: SyntaxWarning: invalid escape sequence '\-'
      elif re.match('^\-\-eNBSourceCodePath=(.+)$|^\-\-eNB[1-2]SourceCodePath=(.+)$', myArgv, re.IGNORECASE):
    /home/richie/w/ci-refactor-core-handling/ci-scripts/args_parse.py:188: SyntaxWarning: invalid escape sequence '\-'
      if re.match('^\-\-eNBSourceCodePath=(.+)$', myArgv, re.IGNORECASE):
    /home/richie/w/ci-refactor-core-handling/ci-scripts/args_parse.py:189: SyntaxWarning: invalid escape sequence '\-'
      matchReg = re.match('^\-\-eNBSourceCodePath=(.+)$', myArgv, re.IGNORECASE)
    /home/richie/w/ci-refactor-core-handling/ci-scripts/args_parse.py:195: SyntaxWarning: invalid escape sequence '\-'
      elif re.match('^\-\-eNB1SourceCodePath=(.+)$', myArgv, re.IGNORECASE):
    /home/richie/w/ci-refactor-core-handling/ci-scripts/args_parse.py:196: SyntaxWarning: invalid escape sequence '\-'
      matchReg = re.match('^\-\-eNB1SourceCodePath=(.+)$', myArgv, re.IGNORECASE)
    /home/richie/w/ci-refactor-core-handling/ci-scripts/args_parse.py:199: SyntaxWarning: invalid escape sequence '\-'
      elif re.match('^\-\-eNB2SourceCodePath=(.+)$', myArgv, re.IGNORECASE):
    /home/richie/w/ci-refactor-core-handling/ci-scripts/args_parse.py:200: SyntaxWarning: invalid escape sequence '\-'
      matchReg = re.match('^\-\-eNB2SourceCodePath=(.+)$', myArgv, re.IGNORECASE)
    /home/richie/w/ci-refactor-core-handling/ci-scripts/args_parse.py:203: SyntaxWarning: invalid escape sequence '\-'
      elif re.match('^\-\-EPCIPAddress=(.+)$', myArgv, re.IGNORECASE):
    /home/richie/w/ci-refactor-core-handling/ci-scripts/args_parse.py:205: SyntaxWarning: invalid escape sequence '\-'
      elif re.match('^\-\-EPCUserName=(.+)$', myArgv, re.IGNORECASE):
    /home/richie/w/ci-refactor-core-handling/ci-scripts/args_parse.py:207: SyntaxWarning: invalid escape sequence '\-'
      elif re.match('^\-\-EPCPassword=(.+)$', myArgv, re.IGNORECASE):
    /home/richie/w/ci-refactor-core-handling/ci-scripts/args_parse.py:209: SyntaxWarning: invalid escape sequence '\-'
      elif re.match('^\-\-EPCSourceCodePath=(.+)$', myArgv, re.IGNORECASE):
    /home/richie/w/ci-refactor-core-handling/ci-scripts/args_parse.py:211: SyntaxWarning: invalid escape sequence '\-'
      elif re.match('^\-\-EPCType=(.+)$', myArgv, re.IGNORECASE):
    /home/richie/w/ci-refactor-core-handling/ci-scripts/args_parse.py:213: SyntaxWarning: invalid escape sequence '\-'
      elif re.match('^\-\-EPCContainerPrefix=(.+)$', myArgv, re.IGNORECASE):
    /home/richie/w/ci-refactor-core-handling/ci-scripts/args_parse.py:215: SyntaxWarning: invalid escape sequence '\-'
      elif re.match('^\-\-XMLTestFile=(.+)$', myArgv, re.IGNORECASE):
    /home/richie/w/ci-refactor-core-handling/ci-scripts/args_parse.py:216: SyntaxWarning: invalid escape sequence '\-'
      matchReg = re.match('^\-\-XMLTestFile=(.+)$', myArgv, re.IGNORECASE)
    /home/richie/w/ci-refactor-core-handling/ci-scripts/args_parse.py:220: SyntaxWarning: invalid escape sequence '\-'
      elif re.match('^\-\-UEIPAddress=(.+)$', myArgv, re.IGNORECASE):
    /home/richie/w/ci-refactor-core-handling/ci-scripts/args_parse.py:221: SyntaxWarning: invalid escape sequence '\-'
      matchReg = re.match('^\-\-UEIPAddress=(.+)$', myArgv, re.IGNORECASE)
    /home/richie/w/ci-refactor-core-handling/ci-scripts/args_parse.py:223: SyntaxWarning: invalid escape sequence '\-'
      elif re.match('^\-\-UEUserName=(.+)$', myArgv, re.IGNORECASE):
    /home/richie/w/ci-refactor-core-handling/ci-scripts/args_parse.py:224: SyntaxWarning: invalid escape sequence '\-'
      matchReg = re.match('^\-\-UEUserName=(.+)$', myArgv, re.IGNORECASE)
    /home/richie/w/ci-refactor-core-handling/ci-scripts/args_parse.py:226: SyntaxWarning: invalid escape sequence '\-'
      elif re.match('^\-\-UEPassword=(.+)$', myArgv, re.IGNORECASE):
    /home/richie/w/ci-refactor-core-handling/ci-scripts/args_parse.py:227: SyntaxWarning: invalid escape sequence '\-'
      matchReg = re.match('^\-\-UEPassword=(.+)$', myArgv, re.IGNORECASE)
    /home/richie/w/ci-refactor-core-handling/ci-scripts/args_parse.py:229: SyntaxWarning: invalid escape sequence '\-'
      elif re.match('^\-\-UESourceCodePath=(.+)$', myArgv, re.IGNORECASE):
    /home/richie/w/ci-refactor-core-handling/ci-scripts/args_parse.py:230: SyntaxWarning: invalid escape sequence '\-'
      matchReg = re.match('^\-\-UESourceCodePath=(.+)$', myArgv, re.IGNORECASE)
    /home/richie/w/ci-refactor-core-handling/ci-scripts/args_parse.py:232: SyntaxWarning: invalid escape sequence '\-'
      elif re.match('^\-\-finalStatus=(.+)$', myArgv, re.IGNORECASE):
    /home/richie/w/ci-refactor-core-handling/ci-scripts/args_parse.py:233: SyntaxWarning: invalid escape sequence '\-'
      matchReg = re.match('^\-\-finalStatus=(.+)$', myArgv, re.IGNORECASE)
    /home/richie/w/ci-refactor-core-handling/ci-scripts/args_parse.py:237: SyntaxWarning: invalid escape sequence '\-'
      elif re.match('^\-\-OCUserName=(.+)$', myArgv, re.IGNORECASE):
    /home/richie/w/ci-refactor-core-handling/ci-scripts/args_parse.py:238: SyntaxWarning: invalid escape sequence '\-'
      matchReg = re.match('^\-\-OCUserName=(.+)$', myArgv, re.IGNORECASE)
    /home/richie/w/ci-refactor-core-handling/ci-scripts/args_parse.py:241: SyntaxWarning: invalid escape sequence '\-'
      elif re.match('^\-\-OCPassword=(.+)$', myArgv, re.IGNORECASE):
    /home/richie/w/ci-refactor-core-handling/ci-scripts/args_parse.py:242: SyntaxWarning: invalid escape sequence '\-'
      matchReg = re.match('^\-\-OCPassword=(.+)$', myArgv, re.IGNORECASE)
    /home/richie/w/ci-refactor-core-handling/ci-scripts/args_parse.py:245: SyntaxWarning: invalid escape sequence '\-'
      elif re.match('^\-\-OCProjectName=(.+)$', myArgv, re.IGNORECASE):
    /home/richie/w/ci-refactor-core-handling/ci-scripts/args_parse.py:246: SyntaxWarning: invalid escape sequence '\-'
      matchReg = re.match('^\-\-OCProjectName=(.+)$', myArgv, re.IGNORECASE)
    /home/richie/w/ci-refactor-core-handling/ci-scripts/args_parse.py:249: SyntaxWarning: invalid escape sequence '\-'
      elif re.match('^\-\-OCUrl=(.+)$', myArgv, re.IGNORECASE):
    /home/richie/w/ci-refactor-core-handling/ci-scripts/args_parse.py:250: SyntaxWarning: invalid escape sequence '\-'
      matchReg = re.match('^\-\-OCUrl=(.+)$', myArgv, re.IGNORECASE)
    /home/richie/w/ci-refactor-core-handling/ci-scripts/args_parse.py:252: SyntaxWarning: invalid escape sequence '\-'
      elif re.match('^\-\-OCRegistry=(.+)$', myArgv, re.IGNORECASE):
    /home/richie/w/ci-refactor-core-handling/ci-scripts/args_parse.py:253: SyntaxWarning: invalid escape sequence '\-'
      matchReg = re.match('^\-\-OCRegistry=(.+)$', myArgv, re.IGNORECASE)
    /home/richie/w/ci-refactor-core-handling/ci-scripts/args_parse.py:255: SyntaxWarning: invalid escape sequence '\-'
      elif re.match('^\-\-BuildId=(.+)$', myArgv, re.IGNORECASE):
    /home/richie/w/ci-refactor-core-handling/ci-scripts/args_parse.py:256: SyntaxWarning: invalid escape sequence '\-'
      matchReg = re.match('^\-\-BuildId=(.+)$', myArgv, re.IGNORECASE)
    /home/richie/w/ci-refactor-core-handling/ci-scripts/args_parse.py:258: SyntaxWarning: invalid escape sequence '\-'
      elif re.match('^\-\-FlexRicTag=(.+)$', myArgv, re.IGNORECASE):
    /home/richie/w/ci-refactor-core-handling/ci-scripts/args_parse.py:259: SyntaxWarning: invalid escape sequence '\-'
      matchReg = re.match('^\-\-FlexRicTag=(.+)$', myArgv, re.IGNORECASE)
2025-04-02 14:24:09 +02:00
Robert Schmidt
87f0f64fe7 Fix invalid escape sequence errors in cls_module.py
As parent. The second change has no escape sequence, but since it's also
a regex, mark it as raw for uniformity (it doesn't hurt either).

    ci-scripts/cls_module.py:165: SyntaxWarning: invalid escape sequence '\.'
      result = re.search('inet (?P<ip>[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+)', output.stdout)
2025-04-02 14:24:09 +02:00
Robert Schmidt
000ae3dfad Fix invalid escape sequence errors in cls_oaicitest.py
In all these cases, we have a regex whose escape sequences are not to be
evaluated in the string, but given verbatim to the regex engine. Hence,
mark them as raw strings.

    ci-scripts/cls_oaicitest.py:55: SyntaxWarning: invalid escape sequence '\s'
      result = re.search('-b\s*(?P<iperf_bandwidth>[0-9\.]+)(?P<unit>[KMG])', str(args))
    ci-scripts/cls_oaicitest.py:81: SyntaxWarning: invalid escape sequence '\s'
      result = re.search('-t\s*(?P<iperf_time>\d+)', str(args))
    ci-scripts/cls_oaicitest.py:373: SyntaxWarning: invalid escape sequence '\d'
      ping_time = re.findall("-c *(\d+)",str(self.ping_args))
    ci-scripts/cls_oaicitest.py:404: SyntaxWarning: invalid escape sequence '\.'
      result = re.search(', (?P<packetloss>[0-9\.]+)% packet loss, time [0-9\.]+ms', ping_output)
    ci-scripts/cls_oaicitest.py:409: SyntaxWarning: invalid escape sequence '\/'
      result = re.search('rtt min\/avg\/max\/mdev = (?P<rtt_min>[0-9\.]+)\/(?P<rtt_avg>[0-9\.]+)\/(?P<rtt_max>[0-9\.]+)\/[0-9\.]+ ms', ping_output)
    ci-scripts/cls_oaicitest.py:691: SyntaxWarning: invalid escape sequence '\d'
      result = re.search("MIB Information => ([a-zA-Z]{1,10}), ([a-zA-Z]{1,10}), NidCell (?P<nidcell>\d{1,3}), N_RB_DL (?P<n_rb_dl>\d{1,3}), PHICH DURATION (?P<phich_duration>\d), PHICH RESOURCE (?P<phich_resource>.{1,4}), TX_ANT (?P<tx_ant>\d)", str(line))
    ci-scripts/cls_oaicitest.py:724: SyntaxWarning: invalid escape sequence '\d'
      result = re.search("PLMN MCC (?P<mcc>\d{1,3}), MNC (?P<mnc>\d{1,3}), TAC", str(line))
    ci-scripts/cls_oaicitest.py:733: SyntaxWarning: invalid escape sequence '\w'
      result = re.search("Found (?P<operator>[\w,\s]{1,15}) \(name from internal table\)", str(line))
    ci-scripts/cls_oaicitest.py:749: SyntaxWarning: invalid escape sequence '\-'
      result = re.search("DL Carrier Frequency/ARFCN : \-*(?P<carrier_frequency>\d{1,15}/\d{1,4})", str(line))
    ci-scripts/cls_oaicitest.py:759: SyntaxWarning: invalid escape sequence '\d'
      result = re.search("AllowedMeasBandwidth : (?P<allowed_bandwidth>\d{1,7})", str(line))
2025-04-02 14:24:09 +02:00
Robert Schmidt
1037f4ddd9 Remove epc.py and use from python files
All core networks have been migrated to a file-based configuration.
References to epc.py are not needed anymore. Remove all unused XML
steps.
2025-04-02 14:24:09 +02:00
Robert Schmidt
e37ffc63f1 Jenkinsfiles: clean up EPC options, not used anymore 2025-04-02 14:24:09 +02:00
Robert Schmidt
b8020204a9 Remove LogCollectIperf option: not used 2025-04-02 14:24:09 +02:00
Robert Schmidt
ed3f02bb64 Remove LogCollectPing option: not used 2025-04-02 14:24:09 +02:00
Robert Schmidt
96e20b1399 Remove LogCollectUE options: not used 2025-04-02 14:24:09 +02:00
Robert Schmidt
6172550492 CI: Remove %cn_ip%/hardcoded IPs from ping test options
With the server object to be passed into ping test, it's not necessary
to either hardcode an IP address or provide a template. Instead, always
fill the IP address, which simplies the Ping() code.

Verify that we don't have an IP address/hardcoded by throwing an
assertion.
2025-04-02 14:23:32 +02:00
Robert Schmidt
59575b9cde Handle PDU session resource setup for existing PDU session
38.413 section 8.2.1.4 says that if PDU session resource setup req
contains an existing PDU session, that one should be reported as failed.
That is rather complicated for us to do; simply reject all PDU sessions
and let the core deal with that.
2025-04-02 08:03:17 +02:00
Robert Schmidt
5625bc63d1 Add PDU session add log in E1 handler
bearer context modification and release print a message, so do the same
here as well.
2025-04-02 08:03:17 +02:00
Robert Schmidt
7e1c3e4213 Fix double-E1 bearer context setup req in E1 handler
If two PDU sessions are to be setup, the CU-CP sends two bearer context
setup requests. When running only the CU-UP, we inconditionally tried to
set up the CU-UP UE ID identifiers upon reception of the bearer context
setup request, leading to an assert. Check if the IDs are not already
set up, to avoid assertions in that case.
2025-04-02 08:03:03 +02:00
Theodoros Tsourdinis
e6797a0b0e Prepare RAN Control to support multiple REPORT Styles
The REPORT service was hardcoded to only style 4, and therefore not easily extendable.
This commit moves the support for style 4 in a separate function.

Delete duplicated enum structs for RAN Parameter IDs for all the REPORT styles.
They are already defined in "openair2/E2AP/flexric/src/sm/rc_sm/ie/rc_data_ie.h".

Co-authored-by: Tano Bischoff <tano.bischoff@hhi.fraunhofer.de>
Co-authored-by: Khanh Toan Pham <khanh.toan.pham@hhi.fraunhofer.de>
Co-authored-by: Shrinish Donde <shrinish.donde@hhi.fraunhofer.de>
Co-authored-by: Miguel Fuentes <miguel.fuentes@i2cat.net>
Co-authored-by: Teodora Vladic <teodora.vladic@openairinterface.org>
2025-04-01 20:35:51 +02:00
Teodora
bf6012084c Fill Event Trigger Condition ID in the Indication Header
- it is optional, but xApp must somehow know for which trigger event
    an E2 node sent the Indication Message
2025-04-01 20:35:51 +02:00
Teodora
e9be8bc233 Use the enum struct for RRC State defined in FlexRIC 2025-04-01 20:35:51 +02:00
francescomani
3c571d0e7a license missing in common_sim.h 2025-04-01 19:15:08 +02:00
francescomani
331325b0f3 move init_delay_table to nr_phy_common 2025-04-01 19:15:08 +02:00
francescomani
c6ccda2998 remove unused definitions in defs_nr_common 2025-04-01 19:15:08 +02:00
francescomani
606048cb00 move simde functions from nr_common to nr_phy_common 2025-04-01 19:15:08 +02:00
francescomani
cea4412b3b do not include LTE defs_common into 5G code 2025-04-01 18:53:09 +02:00
francescomani
0a95bbcfd3 move NR_NUMBER_OF_SYMBOLS_PER_SLOT into an NR file 2025-04-01 18:47:04 +02:00
Romain Beurdouche
047e80f070 feat(oran_fhlib_5g): Make E release patch dual
Update the xran E release patch to work for Arm targets in addition to x86 targets.

Co-authored-by: Yi-Hung Chang <Yi-Hung.Chang@eurecom.fr>
Co-authored-by: brobert <brobert@valiha.com>
2025-04-01 12:23:03 +00:00
brobert
db27b09b7c enabling ARM and INTEL memory alignment 2025-04-01 12:23:03 +00:00
brobert
a0f16e7e83 fix(oran_fhlib_5g): Do not include immintrin.h for Arm targets
Remove include of immintrin.h in radio/fhi_72/oaioran.c when compiling for a Arm target.
2025-04-01 12:23:03 +00:00
robert
ebde2f3698 fix(oran_fhlib_5g): Build error due to SIMDE header for Neon
Remove include of SIMDE Neon header sse_intrinsic.h to compile on ARM. Otherwise the error below is issued.

```
/usr/include/simde/arm/neon/get_lane.h:279:5: error: incompatible type for argument 1 of ‘vget_lane_f16’
 279 |     SIMDE_CONSTIFY_8_(vget_lane_f16, r, (HEDLEY_UNREACHABLE(), SIMDE_FLOAT16_VALUE(0.0)), lane, v);
 removed the inclusion of neon.h
```
2025-04-01 12:23:03 +00:00
Thomas Schlichter
0d01efa00b NR UE: don't activate HARQ process for PUCCH transmission if feedback is disabled
Currently we still activated the DL HARQ process for PUCCH transmission,
and only at the time of the scheduled PUCCH transmission, we actually skip sending the ACK.
This is not only unnecessary, it is at least misleading and strange that
DL HARQ processes can be reused in the meantime, even though they are active...

Therefore simply don't activate the DL HARQ process by skipping the call to set_harq_status() if feedback for it is disabled.
2025-04-01 10:00:46 +00:00
francescomani
3ec3c88b9e compute assertion on feedback time only if feedback is enabled 2025-04-01 09:58:28 +00:00
rmagueta
4fef7e9cca Configure sched_ctrlCommon earlier, in nr_mac_config_scc 2025-04-01 10:52:03 +01:00
francescomani
c8e5fcc585 minor formatting 2025-04-01 11:46:58 +02:00
francescomani
83ab5831c5 NR specific rlc_module_init function 2025-04-01 11:46:58 +02:00
francescomani
87b8d112f7 remove NR PDCP dummy functions (LTE dependencies not there anymore) 2025-04-01 11:46:58 +02:00
francescomani
70fba0e73c NR specific enqueue_rlc_data_req function and some cleanup in NR PDCP 2025-04-01 11:46:58 +02:00
francescomani
d4631845ec remove other RLC functions not used in NR 2025-04-01 11:46:58 +02:00
francescomani
bdb3555825 NR specific mac_rlc_status_ind function 2025-04-01 11:46:58 +02:00
francescomani
5a1d7a75dc NR specific mac_rlc_data_req function 2025-04-01 11:46:58 +02:00
francescomani
4321a2710a NR specific mac_rlc_data_ind function 2025-04-01 11:46:58 +02:00
francescomani
f2d02398fb removing unnecessary dummy rrc_rlc_config_asn1_req 2025-04-01 11:46:58 +02:00
francescomani
66f044d2d8 rlc.h cleanup 2025-04-01 11:46:58 +02:00
Jaroslava Fiedlerova
fca1971a2d Merge branch 'integration_2025_w13' into 'develop'
Integration: `2025.w13`

Closes #923, #924, #928, and #925

See merge request oai/openairinterface5g!3345

* !3300 Allow RSRP report handling in phy-test mode
* !3318 Improve handling of some pointers causing potential segfault
* !3321 DLSCH scheduler LOGs assertion prevention in case of HARQ disabled
* !3335 Other compilation improvements
* !3338 prevent access to NULL pointer in RELEASE_IE_FROMLIST
* !3337 Fix for wrong NSA init at UE
* !3339 fix NTN regression by correctly setting cellBarredNTN_r17 for NTN band again
* !3340 NR UE: fix nr_pbch_channel_estimation()
* !3260 Shared memory realtime radio simulation
* !3341 rfsimulator: apply deadlock detection only if more than one client is connected
* !3343 K-offset updated with configured sub carrier spacing
* !3331 Add documentation for Foxconn RU
* !3216 FHI72: Management plane support
* !3295 Fix SRS report TLV unpack
2025-04-01 09:36:38 +00:00
Jaroslava Fiedlerova
90bdcaafb5 Merge remote-tracking branch 'origin/Aerial_srs_unpack_fix' into integration_2025_w13 (!3295)
Fix SRS report TLV unpack

Changes the SRS unpacking to not expect padding to be present in the buffer when
working with Aerial, with which the report TLVs are not padded to the nearest
32-bit boundary. This issue was found when using a UE with 1 SRS port, which
causes the TLV to not have a length divisible by 4. Also adds a function to pull
X amount of bytes into a uint32_t, which is used to process the last 4 byte
block of the TLV, only pulling the bytes which are not padding. Completed the
SRS.indication dumping procedure to print out the report TLV. Changed the
SRS.indication unitary test to fill the last 4 byte block of the report TLV
appropriately according to the length ( which ensures the padding bytes are set
to 0 )
2025-03-31 20:06:08 +02:00
Robert Schmidt
98ac540d57 CI: use svr_id for Ping in RFsim-based tests
This is not really used as of now, because most IPs are hardcoded. See
one of the next commits for the use of this.

To make sure that we have the correct IP, there is some code that
verifies that a hardcoded IP and the CN IP would be the same.

Note: need two separate ci_infra.yaml entries, because
- for FlexRIC, the container name is different (is the tutorial CN)
- for RFsim5G E1, we don't have ext-dn => ping UPF
2025-03-31 16:38:13 +02:00
Robert Schmidt
a51190a7c5 CI: deploy Magme-MME OAI EPC through CoreNetwork, use in Ping/Iperf
- call scripts for magma MME-based deployment of OAI 5GC in
  ci_infra.yaml
- implement the existing python code through scripts (which does the same)
- save the cql file in the repo, which was previously downloaded every
  time
- use for porcepix-cn4g and nano-cn4g (un)deployment, ping, perf, in XML
  files
2025-03-31 16:38:13 +02:00
Robert Schmidt
586e51227e CI: deploy docker-based OAI 5GC through CoreNetwork, use in Ping/Iperf
- issue OAI 5GC docker commands/scripts from ci_infra.yaml
- use for matix-cn5g (un)deployment, ping, iperf in all XML files
2025-03-31 16:38:13 +02:00
Robert Schmidt
5db684fc52 CI: deploy ltebox EPC through CoreNetwork, use in Ping/Iperf
- issue ltebox commands from ci_infra.yaml
- use for ltebox-nano, ltebox-nepes (un)deployment, ping, iperf in all
  relevant XML files
2025-03-31 16:38:13 +02:00
Robert Schmidt
8c4a55ab1c Remove unused/unsupported EPC types "OAI-Rel14-CUPS" and "OAI" 2025-03-31 16:38:13 +02:00
Robert Schmidt
bd2b833c58 CI: deploy OpenShift-based 5GC through CoreNetwork, use in Ping/Iperf
- Use scripts to deploy OpenShift-based 5GC in ci_infra.yaml
- Use for oc-cn5g, oc-cn5g-20897, and oc-cn5g-20897-aerial2
  for (un)deployment, ping, iperf in relevant XML files
- Convert hardcoded IP addresses to %cn_ip%
2025-03-31 16:38:13 +02:00
Robert Schmidt
5f3f837021 CI: deploy sabox 5GC through cls_core.py, use in Ping/Iperf
- issue sabox commands from ci_infra.yaml
- use for sabox-nepes (un)deployment, ping, iperf in all XML files
2025-03-31 16:38:13 +02:00
Robert Schmidt
246ad2dda3 Add (Un)deployCoreNetwork in test framework 2025-03-31 16:38:13 +02:00
Robert Schmidt
6bd96f1b5f CI Ping, Iperf: remove UE/CN logging, is done automatically 2025-03-31 16:38:13 +02:00
Robert Schmidt
d1f58d1430 Use new core network class in Iperf()/Iperf2_Unidir()/Ping()
Use the core network class to configure one "end" of these tests. This
will make the tests more generic and predictable, as they are explicitly
configured through two ci_infra.yaml "entities", instead of some
implicit "EPC" IP address given in configuration.

As of this commit, no XML passes this info into the framework, so no XML
step will work. As it is many changes, the following commits will add
the necessary info one by one.
2025-03-31 16:38:12 +02:00
Robert Schmidt
dc694475d0 Add helper class for core network handling in CI
This adds a helper class to manage various core networks in the CI
testing framework. Specifically, it reads from a YAML file information
such as a node, (un-)deployment script (file), log collection
instructions, etc., in order to allow a common interface to be used to
deploy and undeploy various core network implementations.

This commit adds the class (in cls_corenetwork.py) as well as tests for
this class.
2025-03-31 16:38:12 +02:00
Jaroslava Fiedlerova
c2179d87bf Merge remote-tracking branch 'origin/fhi72-mplane' into integration_2025_w13 (!3216)
FHI72: Management plane support

At the moment, tested with Benetel 550 and 650 RUs FW v1.2.2
- support for multiple RUs
- RPCs implemented: <connect>, <subscribe>, <get>, <supervision-watchdog-reset>,
  <edit-config>, <validate>, <commit>, <disconnect>
- read PTP sync status from operational datastore xml
- get vendor name, and for xran store RU MAC, MTU and IQ bitwidth and PRACH
  offset, and transfer this info
- store interface name, low-level-tx/rx-endpoint names, tx/rx-carrier names,...,
  from operational datastore xml
- add reference gNB/DU config files with M-plane support
- update FHI readme
2025-03-31 15:29:58 +02:00
Jaroslava Fiedlerova
7a278e746f Merge remote-tracking branch 'origin/foxconn-doc' into integration_2025_w13 (!3331)
Add documentation for Foxconn RU

This MR adds documentation for using the Foxconn RU with OAI, as it piques the
interest of some in the community. Note that this RU is not continuously tested
with OAI L1. Additionally, we have observed throughput degradation in OAI
versions beyond tag 2024.w30, and the issue is under investigation. For now, we
are providing documentation based on what we have tested in our lab.
2025-03-31 15:28:12 +02:00
Jaroslava Fiedlerova
0c5e7b439c Merge remote-tracking branch 'origin/NTN_Koffset_updated' into integration_2025_w13 (!3343)
K-offset updated with configured sub carrier spacing

According to 38.331 , cell specific K-OFFSET provided in SIB19 is provided in
number of slots as per 15Khz SCS Koffset before being applied, needs to be
updated to the slots according to the configured subcarrier spacing.
2025-03-31 15:25:41 +02:00
Robert Schmidt
321b1c4ce1 Increase maximum logging line length for in-memory log
- Increase the maximum logging line for print done through
  log_output_memory().
  The reason is that we hit this line length when printing some machine
  generated configuration (XML) through the M-plane.  Increase to make
  more of it visible.
- To limit the impact, only increase this locally in function
  log_output_memory(), and statically assert that it will never be
  larger than 64 kB.
  In other places, we use the old limit.
- Move the definition MAX_LOG_TOTAL to log.c, because it's only used
  there.
2025-03-31 12:16:18 +02:00
Teodora
7beb88425f Use [HW] logging instead of [PHY] or [NR_PHY] 2025-03-31 12:16:18 +02:00
Teodora
a4479a2e65 Add M-plane tutorial 2025-03-31 12:16:18 +02:00
Teodora
bf0a0aa06b Clarification on delay profile 2025-03-31 12:16:18 +02:00
Teodora
75d5b31f4a Add Benetel650 8x8 reference DU config file for M-plane 2025-03-31 12:16:18 +02:00
Teodora
c7dffd416a Add Benetel550 4x4 reference gNB config file for M-plane 2025-03-31 12:16:18 +02:00
Teodora
d5fceb8e1f Parsing RU M-plane info to xran 2025-03-31 12:16:18 +02:00
Teodora
430026f1ec Wait until RUs are ready and add <disconnect> RPC for M-plane
- if RU(s) are not well configured, disconnect immediately and stop the DU
  - if all RUs are well configured, proceed with waiting until ready. The RU is
    ready when the carriers are activated. Either the RU already has preconfigured
    carriers (previous M-plane client configured), or the DU has to wait until receives
    the notifications.
2025-03-31 12:16:16 +02:00
Teodora
f22bc5acc7 Add <commit> RPC for M-plane 2025-03-31 12:15:20 +02:00
Teodora
b478930a04 Add <validate> RPC for M-plane 2025-03-31 12:15:20 +02:00
Teodora
e79c79b82e Add <edit-config> RPC for M-plane
- generate CU-planes RU configuration based on the loaded yang models
    and DU config file
  - not yet implemented for libyang and libnetconf2 v1
2025-03-31 12:15:18 +02:00
Teodora
dd8a6eaaf5 Load yang models
Ideally, we should load the yang models from the RU operational datastore, but the issues are following:
  1) the yang models order is not good - dependancy models have to be loaded first
  2) earlier O-RAN yang versions (e.g. v4) is not properly defined (i.e. optional parameters should not be included by default)

Added support in both cases, loading from RU with <get-schema> RPC, and loading statically from "radio/fhi_72/mplane/yang/models" folder.
2025-03-31 12:14:33 +02:00
Teodora
e0ffba49ae Store U-plane related info from xml
- interface name,
  - TX/RX carrier names, and
  - TX/RX endpoint names
2025-03-31 12:14:30 +02:00
Teodora
45d0eaf3c4 Get and store M-plane related params for xran 2025-03-31 12:13:44 +02:00
Teodora
2cd5c1faf7 Add <supervision-watchdog-reset> RPC for M-plane 2025-03-31 12:12:38 +02:00
Teodora
6266239c34 Add <subscribe> RPC for M-plane 2025-03-31 12:11:58 +02:00
Teodora
07bab2a707 Get the current sync status from operational datastore 2025-03-31 12:11:11 +02:00
Teodora
fb670db91e Get info from xml operational datastore
- obtain one or multiple node values
2025-03-31 12:10:10 +02:00
Teodora
064866459c Add <get> RPC for M-plane 2025-03-31 12:10:03 +02:00
Rúben Soares Silva
d9e3725a21 Unpack SRS report TLV not expecting padding to be present
Add a function pullx32 to pull x amount of bytes into uint32_t
Change the unpacking to pull only the needed bytes, and skip over the padding, when not Aerial
Change SRS.indication dumping function to also print the report TLV contents
Change SRS.indication unitary test to fill the last 4 byte block of the report TLV according to the length, with padding
2025-03-31 10:15:08 +01:00
Jaroslava Fiedlerova
b822dcda22 Merge remote-tracking branch 'origin/rfsim_small_improve_deadlock_detection' into integration_2025_w13 (!3341)
rfsimulator: apply deadlock detection only if more than one client is connected
2025-03-31 10:32:23 +02:00
Jaroslava Fiedlerova
11960896b7 Merge remote-tracking branch 'origin/shm-radio' into integration_2025_w13 (!3260)
Shared memory realtime radio simulation

Realtime and near-realtime RFSimulator alternative without channel modelling.
The purpose of this library is to allow realtime simulation of gNB and nrUE.

The library is loaded using --device.name vrtsim. The server side (gNB) should
also configure --vrtsim.role server and --vrtsim.timescale according to
requirements.

Limitations:
- Only 1UE-to-1gNB connection supported

Future work:
- Telnet API
2025-03-31 10:22:12 +02:00
Guido Casati
a092e7ff3f Handle NAS Service Accept in stack
* also, add function to process GPRS timer
2025-03-31 10:05:35 +02:00
Guido Casati
35fd18a090 Add test for NAS Service Accept enc/dec library 2025-03-31 10:05:35 +02:00
Guido Casati
052491adde Add enc/dec/eq/free functions for 5GS NAS Service Accept lib
* add new files for Service Accept enc/dec fgmm_service_accept.c/.h
* add to CMakeLists.txt
2025-03-31 10:05:31 +02:00
Teodora
93aaaef50e Add RPC send and receive functionalities 2025-03-29 12:51:07 +01:00
Teodora
3f98ec50ef Add ssh connect function for M-plane 2025-03-29 12:51:07 +01:00
Teodora
da63bf9f9f M-plane integration - initial commit 2025-03-29 12:51:07 +01:00
Teodora
0be72c1917 Install dependencies for M-plane support 2025-03-29 12:51:07 +01:00
Teodora
efcc9fc9d4 Properly include xran_common.h in ${xran_INCLUDE_DIRS}
- ${xran_LOCATION}/src/xran_common.h
  - delete unnecessary target_include_directories() from FHI72
2025-03-29 12:51:07 +01:00
Teodora
978fa2ed05 These commands are unnecessary
- the FHI72 CMakeLists.txt exists and POST_BUILD properly links oran_fhlib_5g library
2025-03-29 12:51:07 +01:00
Teodora
3219d0a5a1 Delete duplicated FindLibXml2.cmake file
- cmake version 3.12 defines libxml2 module; the default path is
    /usr/share/cmake-3.<sub-version>/Modules/FindLibXml2.cmake
  - OAI requires minimum cmake version 3.16
2025-03-29 12:51:07 +01:00
Teodora
3a095ac57e M-plane support - explanation on needed parameters
- RU IP address - to connect to RUs via netconf
  - DU MAC address - for setting up the CU-planes on RU; not used in xran
  - VLAN tag (*) - for setting up the CU-planes on RU; not used in xran
  - DU keypair - for authentication when connecting to RU(s)

The parameters that RU-controller shall retreive from RU list of
capabilities:
  - MTU
  - compression
  - RU MAC address
  - PRACH offset (**)

(*) VLAN tag is not used in xran but an option is given in fh_config struct.
In my opinion, it is not a very suitable place, as it is needed for VFs.
Therefore, I moved it in the initialization part for M-plane purposes.

(**) PRACH offset shall be >= max(Ntx,Nrx), as per O-RAN CUS specification:
"The O-DU may decide to use same eAxC ID value to address endpoints on different O-RUs,
but eAxC ID values assigned to one O-RU must be unique within the O-RU’s endpoints of same direction."
=> however, LITEON supports flexible assignment of PRACH eAxC IDs, so
we made a workaround in the xran library to support PRACH eAxC IDs same
as PUSCH eAxC IDs.
2025-03-29 12:51:07 +01:00
Raghavendra Dinavahi
b141faaf30 K-offset updated with configured sub carrier spacing
According to 38.331 , cell specific K-OFFSET provided in SIB19 is provided in number of slots as per 15Khz SCS
Koffset before being applied, needs to be updated to the slots according to the configured subcarrier spacing.
2025-03-28 16:44:51 +01:00
Bartosz Podrygajlo
cea02a16b1 Modify 5g_fdd_rfsimulator testcase to use shm_radio
Use timescale 0.5 to make sure the iperf UL test passes. Also, disable
asan as this adds computational complexity that makes the test fail.
2025-03-28 14:58:46 +01:00
Robert Schmidt
703bf07c81 Remove EPC from InitializeNB()/TerminateeNB()
These two functions use the EPC class to potentially fill in
EPC/5GC-related information, or start a packet tracer (tshark). The only
pipeline that uses these functions is RAN-gNB-N300-Timing-Phytest-LDPC,
which does not use a core network. This functionality is not used, and
can therefore be removed.
2025-03-28 14:34:03 +01:00
Robert Schmidt
f55c1a7a4f Correct UE interface for fembms test 2025-03-28 14:34:03 +01:00
Robert Schmidt
c8534a0b51 CI: Correct Iperf2_Unidir(): only status code required 2025-03-28 14:34:01 +01:00
Robert Schmidt
e5d8c25084 Add configurable infra for Iperf2_Unidir, test, fixes
Add a possibility to use an "infrastructure YAML file" to configure both
ends of the iperf2 call through a file.

Fix bugs in Iperf2: at least on my machine, iperf2 start time is logged
at 0.00 not 0.0, so update the regex to match both. Do not overwrite
results if the matched regex (otherwise, the result might be None at the
end) and suppress server output.

Add a unit test to test that this function actually works (on my
machine, with iperf v2.2.1), as well as a unit test for analysis.
2025-03-28 14:31:28 +01:00
Robert Schmidt
ac6b296616 Iperf: Redirect server output to NULL
It's not needed/used anywhere, and some CI pipelines have a lot of
useless output.

On this occasion, also remove the unused nohup.
2025-03-28 14:31:19 +01:00
Jaroslava Fiedlerova
0bf40318ff Merge remote-tracking branch 'origin/fix_nr_ue_pbch_chan_est' into integration_2025_w13 (!3340)
NR UE: fix nr_pbch_channel_estimation()
2025-03-28 14:08:14 +01:00
Jaroslava Fiedlerova
98fe1390ac Merge remote-tracking branch 'origin/fix_ntn_regression' into integration_2025_w13 (!3339)
fix NTN regression by correctly setting cellBarredNTN_r17 for NTN band again

fixes e73e0454
2025-03-28 14:07:36 +01:00
Jaroslava Fiedlerova
ea541e90ba Merge remote-tracking branch 'origin/fix_wrong_nsa_init' into integration_2025_w13 (!3337)
Fix for wrong NSA init at UE

This error is shown in the UE logs as following

[RLC]   Activated srb0 for UE 0
[RLC]   SRB0 already exists for UE 0, do nothing
2025-03-28 14:06:19 +01:00
Jaroslava Fiedlerova
f82af5421b Merge remote-tracking branch 'origin/issue_923' into integration_2025_w13 (!3338)
prevent access to NULL pointer in RELEASE_IE_FROMLIST

Closes #923
2025-03-28 10:01:22 +01:00
Jaroslava Fiedlerova
2670185eb1 Merge remote-tracking branch 'origin/more_compilation_improvements' into integration_2025_w13 (!3335)
Other compilation improvements

The goal of this MR was to avoid compiling gNB MAC when compiling uesoftmodem
2025-03-28 10:00:20 +01:00
Jaroslava Fiedlerova
e8901dd358 Merge remote-tracking branch 'origin/disable_harq_improv' into integration_2025_w13 (!3321)
DLSCH scheduler LOGs assertion prevention in case of HARQ disabled

NR_sched_pucch_t structure is NULL if HARQ is disabled
2025-03-28 09:58:15 +01:00
Jaroslava Fiedlerova
9687bde8fd Merge remote-tracking branch 'origin/issue924' into integration_2025_w13 (!3318)
Improve handling of some pointers causing potential segfault

This intends to close #924 #928 and #925
2025-03-28 09:56:05 +01:00
Jaroslava Fiedlerova
2929554859 Merge remote-tracking branch 'origin/allow_RSRP_in_phytest' into integration_2025_w13 (!3300)
Allow RSRP report handling in phy-test mode

All CSI measurement report handling is currently disabled in phytest mode gNB
2025-03-28 09:53:56 +01:00
Reem Bahsoun
1b8a6d001b Add documentation for Foxconn RU in ORAN_FHI7.2_Tutorial.md
- This addition is based on past tests, iperf3 UDP throughput was 520Mbps DL and 40Mbps UL.
- Throughput degrades when using OAI L1 with tags beyond `2024.w30`.
- This RU is being CI tested only in the Aerial pipeline, not with OAI L1.
- The document will be updated once the issue is identified and fixed.
2025-03-27 13:20:42 +01:00
Reem Bahsoun
01877f0c9d Add gNB configuration for Foxconn RU in targets.
- Tested with OAI tag `2024.w30`.
2025-03-27 13:20:33 +01:00
francescomani
a164623fa3 prevent access to NULL pointer in RELEASE_IE_FROMLIST 2025-03-27 10:55:03 +01:00
Thomas Schlichter
cfde90dc85 rfsimulator: apply deadlock detection only if more than one client is connected 2025-03-27 09:54:20 +00:00
Thomas Schlichter
981ecb5dde NR UE: fix nr_pbch_channel_estimation() 2025-03-27 09:50:17 +00:00
Thomas Schlichter
66485aeb1d correctly set cellBarredNTN_r17 for NTN band again
fixes e73e04543a
2025-03-27 09:46:29 +00:00
francescomani
c826a20583 prevent NSA init in SA for a wrong condition 2025-03-27 09:24:50 +01:00
francescomani
3919986677 replace L2_NR dependency in f1ap with GTPV1U
The above is necessary to not compile as many gNB dependencies into the
UE. RLC only uses GTP, which was satisfied by L2_NR, but that's not
necessary. However, only that change results in

    /usr/bin/ld: openair2/E2AP/RAN_FUNCTION/libe2_ran_func_cuup.a(ran_func_rc.c.o): in function `get_list_for_report_style':
    openair2/E2AP/RAN_FUNCTION/O-RAN/ran_func_rc.c:596:(.text+0xbe7): undefined reference to `cp_e2sm_rc_event_trigger'
    /usr/bin/ld: openair2/E2AP/RAN_FUNCTION/O-RAN/ran_func_rc.c:596:(.text+0xc5b): undefined reference to `cp_e2sm_rc_event_trigger'
    /usr/bin/ld: openair2/E2AP/RAN_FUNCTION/O-RAN/ran_func_rc.c:596:(.text+0xd3b): undefined reference to `cp_e2sm_rc_event_trigger'
    /usr/bin/ld: openair2/E2AP/RAN_FUNCTION/O-RAN/ran_func_rc.c:596:(.text+0xd9d): undefined reference to `cp_e2sm_rc_event_trigger'
    /usr/bin/ld: openair2/E2AP/RAN_FUNCTION/O-RAN/ran_func_rc.c:596:(.text+0xded): undefined reference to `cp_e2sm_rc_event_trigger'
    /usr/bin/ld: openair2/E2AP/RAN_FUNCTION/libe2_ran_func_cuup.a(ran_func_rc.c.o):openair2/E2AP/RAN_FUNCTION/O-RAN/ran_func_rc.c:596: more undefined references to `cp_e2sm_rc_event_trigger' follow
    /usr/bin/ld: openair2/E2AP/RAN_FUNCTION/libe2_ran_func_cuup.a(ran_func_rc_subs.c.o): in function `remove_rc_subs_data':
    openair2/E2AP/RAN_FUNCTION/O-RAN/ran_func_rc_subs.c:60:(.text+0xbe): undefined reference to `find_if'
    /usr/bin/ld: openair2/E2AP/RAN_FUNCTION/O-RAN/ran_func_rc_subs.c:62:(.text+0xca): undefined reference to `free_e2sm_rc_event_trigger'

nr-cuup previously satisfied these dependencies by depending on L2_NR
which links in e2_ran_func_du_cucp_cuup. However, the nr-cuup E2 RAN
functions are in e2_ran_func_cuup. In the latter, the file rc_data_ie.c
was missing (for cp_e2sm_rc_event_trigger), which in turn needs
e2sm_rc_ir_obj. Finally, find_if comes through alg.

Co-authored-by: Robert Schmidt <robert.schmidt@openairinterface.org>
2025-03-26 17:51:35 +01:00
Bartosz Podrygajlo
347eb5a50d Add vrtsim to build_oai and some oai images 2025-03-26 16:54:25 +01:00
Bartosz Podrygajlo
c5c2e87810 Rename shm_radio to vrtsim 2025-03-26 16:54:22 +01:00
Bartosz Podrygajlo
5d3708ac3e Realtime channel emulation for shm_radio 2025-03-26 16:53:35 +01:00
francescomani
c1d02c13b7 remove f1ap from NR_L2_UE 2025-03-26 16:10:41 +01:00
Bartosz Podrygajlo
4b61f14064 shm_radio: Exchange information between peers
This allows to exchange the number of antennas between client
and server. This is necessary for channel modelling later.
2025-03-26 14:36:58 +01:00
Bartosz Podrygajlo
5512791190 Add histogram for time budget printed at the exit of shm_radio 2025-03-26 14:31:09 +01:00
Bartosz Podrygajlo
1a69a4efe1 Shared memory realtime radio simulation
Realtime and near-realtime RFSimulator alternative without channel modelling.
The purpose of this library is to allow realtime simulation of gNB and nrUE.

The library is loaded using --device.name shm_radio. The server side (gNB) should also
configure --shm_radio.role server and --shm_radio.timescale <timescale> according to requirements.

Limitations:
 - Only 1UE-to-1gNB connection supported

Future work:
 - Channel modelling
 - Telnet API
 - Histogram of the TX time budget
2025-03-26 14:29:08 +01:00
Bartosz Podrygajlo
1d1814f8b3 Shared memory time domain bidirectional IQ channel
This implements a server-client bidirectional time domain IQ channel via
shared memory.

The server creates the channel and should be aware of the client
receiver configuration (num rx/tx antennas).

Server shall be the time source and should call shm_iq_channel_produce_samples
at regular intervals
2025-03-26 14:24:47 +01:00
francescomani
7af5e9f59e prevent possible segfault in is_ss_monitor_occasion function 2025-03-26 13:27:11 +01:00
francescomani
ec4232814a prevent possible segfault in functions to compute csi report type bitlen
also improving formatting of the same functions
2025-03-26 13:27:07 +01:00
francescomani
c4ef8931d8 prevent possible segfault in compute_csi_bitlen 2025-03-26 13:00:43 +01:00
francescomani
45fffcff71 remove include mac_proto in f1ap file 2025-03-26 11:49:03 +01:00
francescomani
38fe30baab improvements for NFAPI compilation for the UE 2025-03-26 11:30:53 +01:00
francescomani
2269f1e493 remove unnecessary gNB include in nr_mac_common 2025-03-26 10:45:15 +01:00
francescomani
159f06cbf5 remove unnecessary gNB include in config_ue 2025-03-26 10:39:32 +01:00
Robert Schmidt
1d479b2aa9 Merge branch 'integration_2025_w12' into 'develop'
Integration: `2025.w12`

Closes #920 and #915

See merge request oai/openairinterface5g!3325

* !3301 Remove unused NR UE PHY unit tests
* !3319 Disable EPS NAS security algorithms in 5GMM UE capabilities
* !3315 SCTP: avoid assert on partial SCTP message
* !3323 Fix long RACH regression
* !3311 Harmonize and update Frequency Range computation to the current values specified by the standard
* !3320 Miscelaneous improvements in PHY simulators
* !3286 Add support for ARM build pipeline
* !3308 remove ul_ch_estimates_time to save memory
* !3310 remove globale llr_layers to save memory, improve CPU, simplify code
* !3274 Add initial support for RedCap
* !3328 Fix ULSCH ID type to handle large max_nb_pusch values (ULSCH procedures)
* !3329 NR build improvements
* !3285 Update FHI 7.2 documentation, minor code cleanup
2025-03-26 08:42:03 +00:00
Justin Garey
f18c6c9804 If the PDU Address IE is provided (checked through length), then the PDU Session Address is processed 2025-03-25 13:03:56 -04:00
Guido Casati
31f1402790 Add common definitions to new fgmm_lib.c/.h files
The 5GMM library in openair3/NAS/NR_UE/5GS/5GMM/ contains the
all the definitions necessary to do the enc/dec of 5GMM IEs.
5GMM messages can share the same IEs, therefore they can use
common definitions and enc/dec functions.

The goal of this commit is to add common definitions to new shared
5GMM library files. The consumers of fgmm_lib are the functions
defined in the openair3/NAS/NR_UE/5GS/5GMM/ library.
2025-03-25 16:29:25 +01:00
Guido Casati
e11a09b674 Add include for stdio.h in fgs_nas_utils.h (fprintf) 2025-03-25 16:29:25 +01:00
Robert Schmidt
9bbd252298 Merge remote-tracking branch 'origin/fhi-72-cleanup-doc' into integration_2025_w12 (!3285)
Update FHI 7.2 documentation, minor code cleanup

- remove some unused functions
- make one function static
- add callback function documentation
- provide some developer function
2025-03-25 12:49:20 +01:00
Robert Schmidt
a73989b722 Provide clarification on multi-RU operation in O-RAN 7.2 tutorial 2025-03-25 12:05:56 +01:00
Robert Schmidt
078c0845f8 Add developer documentation for fhi_72 driver 2025-03-25 12:05:56 +01:00
Robert Schmidt
6b4954f2b6 Provide some documentation for xran callbacks 2025-03-25 12:05:56 +01:00
Robert Schmidt
77cdb05754 Merge remote-tracking branch 'origin/CMakeLists_improv' into integration_2025_w12 (!3329)
NR build improvements

This MR is an attempt to improve compilation of NR softmodems by
removing some of NR-LTE cross-compilation (at the cost of a small dummy
file for nr-softmodem) and one small gNB-NRUE cross-compilation.
2025-03-25 10:32:16 +01:00
Robert Schmidt
88872f18c7 Merge remote-tracking branch 'origin/fix-int-type-ulsch-id' into integration_2025_w12 (!3328)
Fix ULSCH ID type to handle large max_nb_pusch values (ULSCH procedures)

The ULSCH_id variable is currently defined as uint8_t, which limits its
range to 0-255. However, gNB->max_nb_pusch can exceed this range
depending on the configuration (buffer_ul_slots and
MAX_MOBILES_PER_GNB).  This can lead to incorrect behavior or undefined
results when max_nb_pusch is larger than 255. This commit changes the
type of ULSCH_id from uint8_t to int to accommodate larger values of
max_nb_pusch.

The issue was observed when running the OAI gNB with MAX_MOBILES_PER_GNB
set to 64 UEs. The root cause was traced back to the changes to UL
processing introduced in !2952.
2025-03-25 10:31:24 +01:00
francescomani
0c34562db7 remove unnecessary L2_UE_LTE_NR 2025-03-25 08:27:16 +01:00
francescomani
6c6fa11fd8 do not compile full LTE L2 eNB in nr-softmodem (at the cost of a small dummy file) 2025-03-25 08:27:12 +01:00
Robert Schmidt
e23a4271c8 Make first_call_set bool, write log with logging system
Change to bool for clarity. The log message would sometimes only show up
at the end, which is misleading; use the logging module, which
harmonizes log statements and should make this appear immediately.
2025-03-24 16:02:13 +01:00
Robert Schmidt
64a346b4b8 Update warning that E release support will be removed
We still do not handle RUs with MTUs of 1500 properly in F release;
therefore, for the close future, we cannot remove support for E release.
Also, it "promises" this for January, which is in the past already.
Update to keep the warning logical.
2025-03-24 16:02:13 +01:00
Robert Schmidt
af2c6b76c7 Remove unused callbacks, function declaration, make function static 2025-03-24 16:01:41 +01:00
francescomani
d62e202a5b remove unnecessary MCE_APP_SRC from L2_LTE_NR 2025-03-24 15:43:43 +01:00
francescomani
7843003a1e remove unnecessary nr_rrc_config.c from NR_L2_SRC_UE 2025-03-24 15:41:14 +01:00
Robert Schmidt
492247054f Merge remote-tracking branch 'origin/SIB1_RedCap' into integration_2025_w12 (!3274)
Add initial support for RedCap

- RedCap SIB1-v17-IEs parameters implemented in SIB1
- Create an configuration file for RedCap devices
2025-03-24 15:03:41 +01:00
Robert Schmidt
1be24d48cd Merge remote-tracking branch 'origin/remove-globale-ul_ch_estimates' into integration_2025_w12 (!3310)
remove globale llr_layers to save memory, improve CPU, simplify code
2025-03-24 15:03:20 +01:00
Robert Schmidt
e4cb39d4af Merge remote-tracking branch 'origin/remove-global-ul_ch_estimates_time' into integration_2025_w12 (!3308)
remove ul_ch_estimates_time to save memory

remove ul_ch_estimates_time that saves 50MB memory to access in RAM, and
make better quality scope data passing (no race)
2025-03-24 15:02:29 +01:00
Robert Schmidt
bbae3b24ad Merge remote-tracking branch 'origin/arm-build-pipeline' into integration_2025_w12 (!3286)
Add support for ARM build pipeline

Modify the existing python code to be able to build images where the
image tag can be prepended with a prefix, here arm_. This is preparatory
work to create the ARM build image pipeline, and reuse the existing
internal registry on porcepix to have x86 and ARM images coexist.

Fix various bugs in the build system to allow to build on a system with
as many cores as gracehopper.

Also, fix two programs (usim, nvram) to work correctly under ARM.
2025-03-24 14:45:12 +01:00
Robert Schmidt
99ecbad530 Merge remote-tracking branch 'origin/add_sigint_handler_nr_physimulators' into integration_2025_w12 (!3320)
Miscelaneous improvements in PHY simulators

1: Add a SIGINT handler to NR PHY simulators

When using T2 virtual functions, it is important to properly stop DPDK
and free the device.  Otherwise the virtual functions may be blocked and
a restart of the admin application is necessary.

If not carefully done, such kind of operation can lead to losing cores
to DPDK processes that cannot be stopped.  This can lead to situations
where the machine is locked and can only be unlocked by a power cycle.
Always properly stopping DPDK and freeing the device reduces the risk of
such situation to happen.

Up to now, SIGINT was shutting down the PHY simulators without freeing
the device.  This commit adds a signal handler to handle SIGINT in a way
that allow to properly free the device.

This feature is added to all the NR PHY simulators whether they use T2
or not in case it is now or later of any use.

2: Make nr_ulschsim functional

There were two issues that were making nr_ulschsim non functional:

1. The channel output was not copied to decoder input (llr array)
2. The test on decoding successful outcome was wrong

The result was that nr_ulschsim was succesfull whatever were its
arguments.  This changeset fixes the two issues so that nr_ulschsim is
now functional.
2025-03-24 14:43:57 +01:00
Robert Schmidt
cd6e83e1fc Merge remote-tracking branch 'origin/Harmonize_frequency_range' into integration_2025_w12 (!3311)
Harmonize and update Frequency Range computation to the current values
specified by the standard

3GPP TS 38.101-1 Version 19.0.0 Table 5.1-1: Definition of frequency
ranges

- FR1 from 410 MHz to 7125 MHz
- FR2 from 24.25 GHz to 71 GHz
2025-03-24 14:43:15 +01:00
Robert Schmidt
3a30954e56 Merge remote-tracking branch 'origin/fix-longrach-reg' into integration_2025_w12 (!3323)
Fix long RACH regression

Add some missing functionality that was not merged in !3088.
2025-03-24 14:42:18 +01:00
Robert Schmidt
5b07283003 Add ARM build pipeline to RAN-Container-Parent and documentation 2025-03-24 11:43:44 +01:00
Romain Beurdouche
60b04f0c82 feat(nr_unitary_defs): Apply clang-format to openair1/SIMULATION/NR_PHY/nr_unitary_defs.h 2025-03-24 09:39:36 +00:00
Romain Beurdouche
a2d13f755c feat(nr_unitary_common): Add banner and apply clang-format to openair1/SIMULATION/NR_PHY/nr_unitary_common.c 2025-03-24 09:39:36 +00:00
Romain Beurdouche
e68123e06d fix(NR PHY simulators): Naming coherence & NR PHY simulators common functions object
1. Change the name of `openair1/SIMULATION/NR_PHY/nr_dummy_functions.c` into `openair1/SIMULATION/NR_PHY/nr_unitary_common.c` for naming coherence after adding the SIGINT handler which is not a dummy function.
2. Instead of being built once for every NR PHY simulators, the common functions source file is built once as an object and linked to each simulator.
2025-03-24 09:36:56 +00:00
Guido Casati
5a59793b2f Fix ULSCH ID type to handle large max_nb_pusch values (ULSCH procedures)
The ULSCH_id variable is currently defined as uint8_t, which limits its
range to 0-255. However, gNB->max_nb_pusch can exceed this range
depending on the configuration (buffer_ul_slots and MAX_MOBILES_PER_GNB).
This can lead to incorrect behavior or undefined results when max_nb_pusch
is larger than 255. This commit changes the type of ULSCH_id from uint8_t
to int to accommodate larger values of max_nb_pusch.

The issue was observed when running the OAI gNB with MAX_MOBILES_PER_GNB set
to 64 UEs. The root cause was traced back to the changes to UL processing
introduced in !3166 (!2952).
2025-03-24 09:30:30 +01:00
Robert Schmidt
4ff8cf6c80 Push ARM build images to registry for arm_ prefix 2025-03-24 09:19:43 +01:00
Robert Schmidt
01d48c1d82 Add pull image with tag prefix and XML
After the parent commit, the registry might contain prefixed images.
This commit adds the functionality to pull such prefixed image. Since we
rename the pulled image (to have a consistent name, from whichever
registry we might pull), remove the prefix as well so that it can be
used with other CI functionality (remove image, use in test, ...)

Examples for renaming:
- pull from internal_registry for x86
  internal_registry/oai-gnb:branchA => oai-ci/oai-gnb:branchA
- pull from internal registry for ARM with "arm_" prefix
  internal_registry/oai-gnb:arm_branchA => oai-ci/oai-gnb:branchA
- pull from x86 other registry (e.g., openshift)
  openshift/namespace/oai-gnb:branchA => oai-ci/oai-gnb:branchA
2025-03-24 09:19:30 +01:00
Robert Schmidt
d67d5793ce Add push image with tag prefix
The only currently viable way to push ARM images to our registry is to
use a custom tag prefix. Modify the python test code to specify such a
tag, and default to "" (no prefix).
2025-03-24 09:19:30 +01:00
Robert Schmidt
3e823b25c1 Add ARM-specific image-build and XML
After the preceding commits, it's now possible to build images on ARM.
Add a specific "native_arm" build kind to only build what we need as of
now (do not only call it "arm", as that would match the kind
"build_cross_arm64").

Add the corresponding XML. Pushing of images is disabled, as this does
not work as of now.
2025-03-24 09:19:30 +01:00
Robert Schmidt
3f5181d50d Match nvipc.zip through glob
The (existing) Aerial pipeline on devkit uses an older version of nvipc,
which is upgraded on gracehopper. Use a glob to match them equally,
which also aligns this code with the corresponding Dockerfile, which
already uses that glob.
2025-03-24 09:19:30 +01:00
Robert Schmidt
9d796fb31f getopt_long() returns int
Use the right type for variable, as getopt_long() returns an int. Using
char is not a problem on x86, but prevents the return of -1 in case of
parameter reading end. This led to infinite loops on ARM, which is fixed
through the variable type change. An additional counter measure (showing
the problem) would be to print and error out when reading an undefined
parameter, which is added here as well.

This has been forgotten when making the same change for getopt() in
cf9854601c ("getopt() returns int").
2025-03-24 09:19:30 +01:00
Robert Schmidt
677a904b6c Avoid x86-specific Dockerfiles/enable ARM
Dockerfiles hardcoded one copy operation to x86; generalize to capture
ARM as well. Since the target directory cannot have any globs, we need
to manually check the right directory, then move the file.

Note that this is only necessary since we are forced to switch the
compiler, as Ubuntu's default gcc-11 does not work with FlexRIC. When
upgrading to Ubuntu 24, these lines should disappear and asan be
installed as normal. See commit 94497435e7 ("Upgrade CI images to
Ubuntu 22").
2025-03-24 09:18:44 +01:00
Robert Schmidt
19932b10f6 Configurable infrastructure file for Ping and Iperf()
- Make configurable to override (to be used later in extended tests with
  new core class)
- Move ping-iperf test infra to tests/ directory
2025-03-21 16:51:56 +01:00
Robert Schmidt
4a9bb6dbe4 Ping from correct UE 2025-03-21 16:51:56 +01:00
Robert Schmidt
60094de81f Remove two unused/duplicate steps 2025-03-21 16:51:56 +01:00
Robert Schmidt
083765f7a7 Remove outdated/unused XML files 2025-03-21 16:51:56 +01:00
Raghavendra Dinavahi
2a2ebfe80f Initialising dl,ul freq in psbchsim 2025-03-21 16:05:30 +01:00
Robert Schmidt
f6e3ea48d0 Merge remote-tracking branch 'origin/issue-920-fix-crash-sctp' into integration_2025_w12 (!3315)
SCTP: avoid assert on partial SCTP message

The receive buffer for SCTP, before this branch, is 8192. If a message
is larger, we receive only a partial message, which makes the gNB abort.
Remove the abort to not be susceptible to a message intended to crash
the gNB.

also, increase the receive buffer to be more forgiving for large messages

Closes: #920
2025-03-21 12:27:25 +01:00
Robert Schmidt
9c0eaefb93 Merge remote-tracking branch 'origin/issue-915' into integration_2025_w12 (!3319)
Disable EPS NAS security algorithms in 5GMM UE capabilities

OAI nrUE is not supporting multiple RATs, therefore the EPS NAS security
algorithms bit in 5GMM UE capabilities is not relevant.

This bit is only relevant if N26 interface is supported by the AMF and
the UE is supporting S1 mode, meaning that the UE is connected to a 4G
LTE network,  via the S1 interface (eNB - MME/SGW). When the UE performs
an inter-system change from N1 mode to S1 mode, it transitions from 5GC
to the EPC: at network level this happens over the N26 interface (which
connects the 5G AMF to the 4G MME).

In this transition is where the EPS security context becomes relevant:
the UE does not know about the N26 interface, however is the AMF that
can tell the UE, e.g. during the registration procedure, if the UE sets
the S1 mode bit to "S1 mode supported" in the 5GMM capability IE, and
the AMF supports the N26 interface, the AMF will include the Selected
EPS NAS security algorithms IE in the SECURITY MODE COMMAND message,
which is what happened in #915.

Closes: #915
2025-03-21 12:26:14 +01:00
Romain Beurdouche
4971b1e62c feat(NR PHY simulators): Add a SIGINT handler to other NR PHY simulators
Even though the remaining NR PHY simulators do not use the T2, we may still feature them with a SIGINT handler for proper termination on SIGINT and for a matter of completeness.
The remaining NR PHY simulators are:
* nr_pbchsim
* nr_prachsim
* nr_psbchsim
* nr_pucchsim
2025-03-21 10:04:45 +00:00
Romain Beurdouche
0033da5611 fix(nr_ulschsim): make nr_ulschsim functional
There was two issues that were making nr_ulschsim non functional:
1. The channel output was not copied to decoder input (llr array)
2. The test on decoding successful outcome was wrong

The result was that nr_ulschsim was succesfull whatever were its arguments.
This commit fixes the two issues so that nr_ulschsim is now functional.
2025-03-21 10:04:45 +00:00
Romain Beurdouche
1fdbf2906f feat(NR PHY simulators): add a SIGINT handler to some PHY simulators
When using T2 virtual functions, it is important to properly stop DPDK and free the device.
Otherwise the virtual functions may be blocked and a restart of the admin application is necessary.

Up to now, SIGINT was shutting down the PHY simulators without freeing the device.
This commit adds a signal handler to handle SIGINT in a way that allow to properly free the device.
This feature is first added to the PHY simulators that use the T2 which are `nr_ulsim`, `nr_dlsim`, `nr_ulschsim` and `nr_dlschsim`.
2025-03-21 10:04:45 +00:00
luis_pereira87
c152177327 Harmonize and update Frequency Range computation to the current values specified by the standard
3GPP TS 38.101-1 Version 19.0.0 Table 5.1-1: Definition of frequency ranges
- FR1 from 410 MHz to 7125 MHz
- FR2 from 24.25 GHz to 71 GHz
2025-03-20 20:41:21 +00:00
Robert Schmidt
39d1e3ff4b Merge remote-tracking branch 'origin/clear_ue_unit_tests' into integration_2025_w12 (!3301)
Remove unused NR UE PHY unit tests

Old dead code that won't even compile and that is not testing anything
relevant to current state of code
2025-03-20 18:19:23 +01:00
ndomingues
432e741365 Update FEATURE_SET.md file with initial RedCap support 2025-03-20 18:13:12 +01:00
ndomingues
7235e484a0 Add support for RedCap Msg3 LCID 2025-03-20 18:13:12 +01:00
ndomingues
e73e04543a Add initial support for RedCap
RedCap SIB1-v17-IEs parameters implemented in SIB1
Create an configuration file for RedCap devices
2025-03-20 18:13:12 +01:00
ndomingues
b92af6b6be Implementation of TYPE_INT8 in config_yaml.cpp file 2025-03-20 18:13:12 +01:00
Robert Schmidt
b138b143e4 Increase SCTP receive buffer to capture large messages 2025-03-20 17:20:54 +01:00
Sakthivel Velumani
e775b9ce9a Fix RA-RNTI for long prach formats 2025-03-20 11:12:00 -04:00
Sakthivel Velumani
bab16b7e15 Fix long PRACH slot selection 2025-03-20 10:52:21 -04:00
Laurent THOMAS
78b44a8e17 remove globale llr_layers, that seems to save 700MB, improve CPU and make the code simpler 2025-03-20 14:28:46 +01:00
Robert Schmidt
b29b60cdf8 Remove unused functions in epc.py 2025-03-20 10:30:31 +01:00
Robert Schmidt
32cd3a03e6 Remove porcepix-cn5g, there is no 5GC on that machine 2025-03-20 10:30:13 +01:00
Robert Schmidt
67ffa02416 Improve logging in cls_module.Module_UE: prints the same 2025-03-20 08:55:41 +01:00
Robert Schmidt
c3e9e62f71 cls_cmd: printed commands are debug 2025-03-19 14:57:14 +01:00
Robert Schmidt
7f55a11045 Fix: when calling unknown test case class, fail pipeline 2025-03-19 14:49:22 +01:00
Guido Casati
ba22130116 Disable EPS NAS security algorithms in 5GMM UE capabilities
* this is only relevant if N26 interface is supported by the AMF
  and the UE is supporting S1

closes #915
2025-03-19 13:23:16 +01:00
francescomani
9502e7537c avoiding segfault in LOGs in case of harq disabled 2025-03-19 10:00:38 +01:00
Robert Schmidt
ec60cc9548 SCTP: avoid assert on partial SCTP message
The receive buffer for SCTP, as of this commit, is 8192. If a message is
larger, we receive only a partial message, which makes the gNB abort.
Remove the abort to not be susceptible to a message intended to crash
the gNB.

Closes: #920
2025-03-18 17:29:53 +01:00
Jaroslava Fiedlerova
82fb9fcc7c Merge branch 'integration_2025_w11' into 'develop'
Integration: `2025.w11`

Closes #848

See merge request oai/openairinterface5g!3309

* !3306 Add a new CI label: nrUE
* !3303 remove wrong assertion for B4 PRACH format
* !3296 fix(nrLDPC_decoder): fix numIter increment
* !3150 Rework of NR UE RA procedures
* !3305 CI: Fix timeout for OC Deployments
* !3307 Add CI UE test for RA with C-RNTI
* !3271 Handle changing N_TA_offset correctly
* !3313 Small fix for jenkins message formatting
2025-03-18 15:21:56 +00:00
Justin Garey
9edf06f5ce PDU session establishment uses required IE for session type and QoS Rules loop correctly moves msg pointer 2025-03-18 15:19:10 +00:00
Jaroslava Fiedlerova
c4551fecba Merge remote-tracking branch 'origin/fix-jenkins-message-formatting' into integration_2025_w11 (!3313)
Small fix for jenkins message formatting
2025-03-18 11:03:28 +01:00
Bartosz Podrygajlo
f0c926306b Small fix for jenkins message formatting 2025-03-18 10:32:55 +01:00
Robert Schmidt
11d83dd461 Merge branch 'nr-ue-ci' into 'develop'
Add a new CI label: nrUE

Added handling of the nrUE label which limits the amount of CI tests to run. Only tests that use nr-uesoftmodem or phy simulators are triggered.

See merge request oai/openairinterface5g!3306
2025-03-18 09:05:32 +00:00
Robert Schmidt
8cbfa7b797 Use absolute path for copy
Local_Cmd forces use to use absolute paths for copy operations (because
that makes more clear where files are being copied). Use the absolute
path to avoid the corresponding exception.
2025-03-18 09:21:25 +01:00
Robert Schmidt
252c9db246 Correctly express dependency on LOG headers
Various libraries in this commit use the log headers (that is the
direct dependency). The log headers in turn include the T headers
(transitive dependency). Building on gracehopper with its many cores
triggers the build of these libraries before T headers have been
generated.

To resolve this and force the generation of T headers before building
the libraries, correctly express their dependency on the log headers,
which in turn ensures that T headers have been generated.

Depending on log_headers is preferrable because it is really the headers
that we depend on. Using instead e.g., utils, would trigger build of
source files, that we don't need for these libraries.  This commit is
part of a larger cleanup that I have that is not merged yet. Follow-up
work will generalize this in the repo, and ensure that every(!) library
builds.

We have to add CONFIG_LIB, as the log module has a direct dependency
onto the configuration module (it uses it). I am not sure why this was
not relevant before.
2025-03-18 09:21:24 +01:00
Robert Schmidt
4ed801dce3 Add correct T_headers dependencies
T_headers needs to ensure that T headers have actually been created.
This can be forced by depending on generate_T.
2025-03-18 09:21:24 +01:00
Robert Schmidt
f70149933c Use getConnection() to allow build on localhost
Depending on the passed IP addr/host name, getConnection() will select
the right LocalCmd/RemoteCmd, which is better than hardcoded.
2025-03-18 09:21:24 +01:00
Bartosz Podrygajlo
2f09727811 Add a new CI label: nrUE
Added handling of the nrUE label which limits the amount of CI tests to run.
Only tests that use nr-uesoftmodem or phy simulators are triggered.
2025-03-17 17:09:05 +01:00
francescomani
10da6aa418 Merge remote-tracking branch 'origin/add-ci-test-msg3-c-rnti-ra' into integration_2025_w11 2025-03-17 16:55:07 +01:00
Guido Casati
7ba0613ae8 Add test for C-RNTI RA trigger to 24 PRB RFSIM CI pipeline 2025-03-17 16:54:18 +01:00
Guido Casati
c456d6951e Add telnet trigger to force C-RNTI RA on the UE 2025-03-17 16:54:14 +01:00
francescomani
dcf7e4ddcd Merge remote-tracking branch 'origin/issue_907' into integration_2025_w11 2025-03-17 16:50:56 +01:00
Jaroslava Fiedlerova
da8d00d6fa Merge remote-tracking branch 'origin/increase-build-timeouts' into integration_2025_w11 (!3305)
This merge request is for two issues:

1. Core Network Deployment/Undeployment

If the Helm release oai5gcn does not exist (e.g., it was already deleted,
failed during installation), helm uninstall will fail with a "release not
found" error. The --timeout 60s makes Helm wait up to 60 seconds for all
resources to be deleted. If cleanup takes longer (e.g., due to resources
or dependencies), the command fails with a timeout error, potentially
leaving resources in an incomplete state.

2. Increase the timeout value for OpenShift RHEL Builds

The timeout parameter is set as the maximum wait time for the jobs to complete.
If the jobs do not complete within that time, the function logs an error. The
jobs may take longer to complete, the function exits early with an error, even
if the jobs are still progressing.

So, to address both the issues:

We first list all installed Helm releases in the given namespace, returning only
their names. We then pass the release names to helm uninstall, uninstalling all
releases in the namespace. The default value for timeout is 5 minutes.

Increased the timeout value for the RHEL Builds.
2025-03-17 14:08:52 +01:00
Jaroslava Fiedlerova
fe52ef2858 Merge remote-tracking branch 'origin/NR_UE_rework_RA' into integration_2025_w11 (!3150)
Rework of NR UE RA procedures

Closes #848
2025-03-14 18:22:18 +01:00
Jaroslava Fiedlerova
830ceac0ab Merge remote-tracking branch 'origin/fix_numIter' into integration_2025_w11 (!3296)
fix(nrLDPC_decoder): fix numIter increment

The logs of ./nr_ulsim -n100 -m19 -s12 -S12 -z2 -L4 were showing that sometimes
the decoding of one segment was failing while the CRC check succeeded. This was
happening because the iteration counter numIter was not properly managed so that
when the last iteration was successful to decode the segment still numIter at
the exit was equal to numMaxIter plus 1 so that decoding was considered to have
failed. In other words the last iteration if it occured was always wasted.

This commit offers to solve this problem by simply moving the iteration counter
increment at the end of the iteration loop while remaining careful at fixing the
tests relying on this counter.

Post-Scriptum:
After a first review, we decided to make the counter more standard from a C code
perspective. The counter now counts from 0 to numMaxIter minus 1. If it reaches
numMaxIter, it means that decoding was unsuccessful.
2025-03-14 15:50:12 +01:00
Jaroslava Fiedlerova
950ee0a47f Merge remote-tracking branch 'origin/remove_b4_assertion' into integration_2025_w11 !3303
remove wrong assertion for B4 PRACH format

Introduced in !3088 (merged)
2025-03-14 15:47:46 +01:00
Laurent THOMAS
a0721cac16 remove ul_ch_estimates_time that saves 50MB memory to access in RAM, and make better quality scope data passing (no race) 2025-03-14 11:27:01 +01:00
francescomani
44692187b8 use sleep to delay UE to allow the convergence of the IIR filter on PRACH noise measurements at gNB side instead of counting frames 2025-03-13 11:53:58 +01:00
francescomani
7ecedfced0 UE fix when completing RA with C-RNTI in MSG3 2025-03-13 11:53:58 +01:00
francescomani
39920eb337 L2 indication to prepare MSG3 payload in advance
This is required to comply with the standard to flush MSG3 buffer in some occasions and to keep preparing MSG3 payload in advance
2025-03-13 11:53:55 +01:00
Jaroslava Fiedlerova
b9a4ebd11f CI: increase timeout for OC RHEL builds 2025-03-13 10:01:32 +01:00
Jaroslava Fiedlerova
4f9a152f6b CI: remove timeout for OC CN deployments/undeployments
Default value of timeout is 5 minutes.
2025-03-13 10:01:25 +01:00
francescomani
4b191b7d07 error for ra-responsewindow exceeding 10ms instead of assertion (CI test with FAPI would fail otherwise) 2025-03-12 10:30:18 +01:00
francescomani
fc0d762407 move MSG3-C-RNTI flag from RA to MAC structure otherwise it would be reset by RA initialization 2025-03-12 10:30:18 +01:00
francescomani
96f1a2d474 implementation of RAR response window timer suspension
(this is needed because it might expire while MSG2 is being decoded despite being received inside the window)
2025-03-12 10:30:17 +01:00
francescomani
3f35d462e9 separate DL and UL timers at UE 2025-03-12 10:30:17 +01:00
francescomani
65bc749ee6 start the rar reception window in PRACH slots but take into account the additional slots difference wrt when we actually would need to start it (in first DCI occasion) 2025-03-12 10:30:17 +01:00
francescomani
5df6153024 remove unnecessary nr_ue_manage_ra_procedure function 2025-03-12 10:30:17 +01:00
francescomani
dcc17a9d70 signaling RRC RA problems (leading to possible radio link failure) 2025-03-12 10:30:17 +01:00
francescomani
e958822a73 Procedures for Contention Resolution 2025-03-12 10:21:27 +01:00
francescomani
cc154da549 Procedures for Random Access Response reception 2025-03-12 10:21:27 +01:00
francescomani
108fdae159 removing unnecessary nr_Msg1_transmitted function 2025-03-12 10:15:49 +01:00
francescomani
878bbc65ad assertion for handling of RO mask 2025-03-12 10:15:49 +01:00
francescomani
9f3f7b041c clearing old structures and functions for rach occasions 2025-03-12 10:15:49 +01:00
francescomani
24fed617b5 reworking prach scheduler to use new rach occasion information 2025-03-12 10:15:49 +01:00
francescomani
8f1661c66c PRACH occasion configuration 2025-03-12 10:11:38 +01:00
francescomani
220af3f669 move function to build ssb list after common configuration (reception of SSB information)
also removed unnecessary BWP dependence
2025-03-12 10:11:38 +01:00
francescomani
a7e3e8a312 harmonization of functions to get info from PRACH config tables 2025-03-12 10:11:38 +01:00
francescomani
95971514a0 Random Access Resource selection for 4- and 2-step RA 2025-03-12 09:49:54 +01:00
francescomani
60920ed161 avoid unnecessary call to nr_write_ce_msg3_pdu
this is for do-ra mostly and it was just called to compute MSG3 size which is fixed and known
2025-03-12 09:49:54 +01:00
francescomani
c17881e8d5 implmenent RA trigger for PDCCH order (DCI initiated RA) 2025-03-12 09:49:54 +01:00
francescomani
796c2a61a3 improvements in RA init procedures according to 5.1.1 in 38.321 2025-03-12 09:49:54 +01:00
francescomani
939ce850a5 improved management of RA functions at UE 2025-03-12 09:49:54 +01:00
Jaroslava Fiedlerova
60b0c1827d Merge branch 'integration_2025_w10' into 'develop'
Integration: `2025.w10`

See merge request oai/openairinterface5g!3299

* !3265 Remove some unnecessary extern files
* !3288 FeedbackDisabled removed from RA
* !3294 Fix OAI UE uplink_frequency in FDD mode
* !3282 Use common function to prepare DL PDUs in gNB RA
* !3290 Fix get_nr_prach_info_from_index() for FDD and long format
* !3244 Add F1 handover CI test
* !3292 Ensure clean exit of NR UE
* !3298 Preventing segmentation fault in print_rrc_meas (if reviewed and CI is OK)
* !3297 Reset timing_advance on sync/re-sync
* !3289 use slot type for slots in NR
2025-03-12 07:41:54 +00:00
francescomani
c7b561ef82 remove wrong assertion for B4 PRACH format 2025-03-11 12:09:45 +01:00
francescomani
20accaaceb Merge remote-tracking branch 'origin/use_slot_type' into integration_2025_w10 2025-03-10 18:02:28 +01:00
francescomani
f27ab2d85a Merge remote-tracking branch 'origin/Reset_timing_advance' into integration_2025_w10 2025-03-10 18:01:54 +01:00
francescomani
e9338e566b Merge remote-tracking branch 'origin/issue921' into integration_2025_w10 2025-03-10 17:46:20 +01:00
francescomani
73e96220fb remove unused frame config ue phy unit test and all nr ue phy test folder 2025-03-10 17:31:04 +01:00
francescomani
272344df48 remove unused SSB ue phy unit tests 2025-03-10 17:01:41 +01:00
francescomani
a936c88fb5 remove unused srs ue phy unit test 2025-03-10 16:26:33 +01:00
Romain Beurdouche
6b660e4091 fix(nrLDPC_decoder): Cleaning LDPC iteration accounting in NR
The idea is to make LDPC iteration accounting more standard from a C coding perspective by making two changes:
1. Now the iteration counter starts at 0 for the first iteration and goes up to max_ldpc_iterations - 1 for the last iteration.
   If it is equal to max_ldpc_iterations, it means that decoding failed.
2. A chain of useless returns in the UE DLSCH decoding call chain was removed.
2025-03-10 15:11:19 +00:00
Bartosz Podrygajlo
75f04874d1 Handle changing N_TA_offset on the UE correctly in higher layers
Send new N_TA_offset in config_request to PHY. Remove N_TA_offset update
from ta_command.
2025-03-10 16:00:54 +01:00
francescomani
ee22097354 remove unused harq ue phy unit test 2025-03-10 15:51:00 +01:00
francescomani
003a2ad669 remove unused pucch ue phy unit test 2025-03-10 15:50:18 +01:00
Bartosz Podrygajlo
5acb37c3e2 Handle changing N_TA_offset correctly
Handle N_TA_offset update the same way timing advance changes are handled:
modify writeBlockSize to ensure continuous transmission. Also address possible
data races by making sure the new timing_advance/N_TA_offset is only read
once from global memory.
2025-03-10 15:18:31 +01:00
francescomani
f184293ec0 all CSI measurement report handling is disabled in phytest mode gNB, this commit allows RSRP measurements handling 2025-03-10 09:53:48 +01:00
francescomani
e387747af0 Merge remote-tracking branch 'origin/clean-ue-exit' into integration_2025_w10 2025-03-10 09:30:39 +01:00
francescomani
7506d6343e Merge remote-tracking branch 'origin/f1-handover-minor-fixes' into integration_2025_w10 2025-03-10 09:17:05 +01:00
Guido Casati
501ac2c7d2 Add handover to rfsim F1 CI test
Added 3 way F1 handover test with data exchange in the F1 pipeline.
The major change is that the UE is acting as a server in the handover
scenarion, so it needs to comply with the changes in !3280.
2025-03-07 15:46:54 +01:00
francescomani
46031d5f1e Merge remote-tracking branch 'origin/RA_common_dl_pdus' into integration_2025_w10 2025-03-07 15:12:24 +01:00
francescomani
14ab06c641 Merge remote-tracking branch 'origin/long_prach_fdd_fix' into integration_2025_w10 2025-03-07 15:06:48 +01:00
francescomani
0a8ffacda3 prevent segfault in print_rrc_meas 2025-03-07 14:19:14 +01:00
francescomani
aaa9bcd11e Merge remote-tracking branch 'origin/Fix_FDD_uplink_frequency' into integration_2025_w10 2025-03-07 08:38:04 +01:00
francescomani
fecea84ced Merge remote-tracking branch 'origin/feedback_disabled_ra' into integration_2025_w10 2025-03-07 08:36:41 +01:00
francescomani
e92f3484b6 Merge remote-tracking branch 'origin/remove_some_mac_extern' into integration_2025_w10 2025-03-07 08:35:47 +01:00
Bartosz Podrygajlo
99e67dc599 Ensure clean exit of NR UE
- Shutdown DL/UL actors
 - Join the main/stat UE threads
2025-03-07 06:19:15 +01:00
luis_pereira87
f765352be7 Reset timing_advance on sync/re-sync
This prevents the UE to use an outdated timing_advance after a re-sync. It prevents the UE to send a PRACH with a wrong TA, thus preventing a RAPID mismatch in Msg2 (example: '[UE 0][RAPROC][0.0] Received RAR preamble (29) doesn't match the intended RAPID (30)')
2025-03-06 16:25:42 +00:00
luis_pereira87
1d84b6d07d Fix OAI UE uplink_frequency in FDD mode 2025-03-06 13:30:58 +00:00
Romain Beurdouche
b6bedf1216 fix(nrLDPC_decoder): fix numIter increment
The logs of `./nr_ulsim -n100 -m19 -s12 -S12 -z2 -L4` were showing that sometimes the decoding of one segment was failing while the CRC check succeeded.
This was happening because the iteration counter `numIter` was not properly managed so that when the last iteration was successful to decode the segment
still `numIter` at the exit was equal to `numMaxIter` plus 1 so that decoding was considered to have failed.
In other words the last iteration if it occured was always wasted.

This commit offers to solve this problem by simply moving the iteration counter increment at the end of the iteration loop
while remaining careful at fixing the tests relying on this counter.
2025-03-06 13:03:14 +00:00
Sakthivel Velumani
520c8aed38 Fix get_nr_prach_info_from_index() for FDD and long format 2025-03-05 12:02:43 -05:00
francescomani
d8911ff19d use slot type for slots in NR 2025-03-04 18:04:12 +01:00
francescomani
026b42aa1a FeedbackDisabled is sent in RRCSetup, the UE doesn't have it during MSG4 reception, it can't be used
the standard in 213 8.4 says: "In response to the PDSCH reception with the UE contention resolution identity, the UE transmits HARQ-ACK information in a PUCCH."
2025-03-04 15:33:18 +01:00
Jaroslava Fiedlerova
0515cf98b3 Merge branch 'integration_2025_w09' into 'develop'
Integration: `2025.w09`

See merge request !3284

* !3088 Support for long PRACH formats
* !3266 Add optional UTC time stamp to the logging module
* !3280 Changes required for UE to work as a rfsim server with channel modelling
* !3279 Fix UL-MCS when UL inactivity and no data
* !3283 Limit amp_dmrs to 16 bit signed max
2025-03-04 13:05:20 +00:00
francescomani
263ed618cb adding static to tables and renaming the file 2025-03-03 17:20:36 +01:00
francescomani
3852320af5 improvements in ul_port_config function 2025-03-03 17:00:26 +01:00
francescomani
a04e7af63e formatting 2025-03-03 17:00:26 +01:00
francescomani
06e66330ab remove unnecessary extern bandtable declaration 2025-03-03 17:00:26 +01:00
francescomani
c898a9f269 function to get RV replacing extern vector 2025-03-03 17:00:26 +01:00
francescomani
59d2809450 remove nr_rrc_extern.h 2025-03-03 17:00:26 +01:00
francescomani
67cf66c65c remove mac_extern at UE 2025-03-03 17:00:26 +01:00
francescomani
f265729e68 functions for 7-3-1-1-2 tables 2025-03-03 17:00:26 +01:00
francescomani
9aafec3e57 include header for mac_rlc_data_ind 2025-03-03 17:00:26 +01:00
francescomani
ab11e1a58c function for precoding information parameters 2025-03-03 17:00:26 +01:00
francescomani
0565b99900 function for backoff indicator table 2025-03-03 17:00:26 +01:00
francescomani
9c16a323fe function to handle antenna port tables 2025-03-03 17:00:26 +01:00
francescomani
cf9b19a855 remove unused tables from UE mac_extern.h 2025-03-03 17:00:26 +01:00
francescomani
38734ee31c remove nr_mac_extern file 2025-03-03 17:00:26 +01:00
francescomani
00ac4f0b46 functions to read BSR tables 2025-03-03 17:00:26 +01:00
francescomani
26c94a34c4 make precoding tables local and remove them from common files 2025-03-03 17:00:26 +01:00
francescomani
2f6b80b444 remove unnecessary Type0-PDCCH externs 2025-03-03 17:00:26 +01:00
francescomani
302c39fa71 Merge remote-tracking branch 'origin/limit-amp-param' into integration_2025_w09 2025-03-02 15:31:18 +01:00
francescomani
ce4dfe0f1b Merge remote-tracking branch 'origin/fix-ul-mcs' into integration_2025_w09 2025-03-01 17:01:19 +01:00
francescomani
837237a3e6 Merge remote-tracking branch 'origin/rfsim-multichannel' into integration_2025_w09 2025-03-01 16:54:18 +01:00
francescomani
33bfeb500d Merge remote-tracking branch 'origin/add-utc-timestamp' into integration_2025_w09 2025-03-01 16:47:01 +01:00
francescomani
10060982c0 Merge remote-tracking branch 'origin/ue-long-prach' into integration_2025_w09 2025-03-01 16:34:48 +01:00
Guido Casati
d16de2aae4 Remove magic numbers and use MAX_DRBS_PER_UE in nr_initiate_handover 2025-02-28 14:29:00 +01:00
Guido Casati
e2369656a7 Remove unused param in gnb-cu.sa.f1.conf 2025-02-28 14:29:00 +01:00
Guido Casati
89547f8a0c Handle null pointers and improve logs in process_Event_Based_Measurement_Report 2025-02-28 14:28:59 +01:00
Guido Casati
f5d8debdcb Cleanup outdated comments 2025-02-28 14:28:59 +01:00
Guido Casati
6370ad25fa Use calloc_or_fail whenever possible 2025-02-28 14:28:59 +01:00
Bartosz Podrygajlo
8672513517 Allow >1 channel models on rfsim server
Use `rfsimu_channel_ue1`, `rfsimu_channel_ue2`, etc. if you want to
use different channel models for each client. The client connection
order determines its channel model name.
2025-02-28 13:53:10 +01:00
Bartosz Podrygajlo
953e4a448b Command line option for rfsim server hanging workaround
Enable/disable workaround based on a new option "hanging-workaround".
This addresses an issue where the workaround will trigger even if there
is no risk of a permanent lockup of the system.
2025-02-28 13:53:06 +01:00
Bartosz Podrygajlo
e4b012555f Fix possible deadlock in NR UE
Remove pthread_mutex_init call from nr_ue_init_mac. The function is
reentrant causing mutex overwrite and possible hanging of the NR UE.
2025-02-28 12:35:39 +01:00
Jaroslava Fiedlerova
95e661de6f Add log option for UTC time stamp
If "utc_time" is selected, log lines are prepended with the UTC time,
formatted as YYYY-MM-DD hh:mm:ss.ssssss UTC.

The documentation has been updated. For other time methods, additional
description of what they show has been added.
2025-02-28 12:15:57 +01:00
Robert Schmidt
8c224f681c Limit TX_AMP to 16bit max
As parent.
2025-02-28 11:41:42 +01:00
Robert Schmidt
4901467e6f Limit amp_dmrs to 16 bit signed max
amp_dmrs is used to scale individual 16bit samples. hence, limit it to
the signed maximum of 16 bits.
2025-02-28 11:39:30 +01:00
francescomani
f50f3a34cd use common prepare_dl_pdus function also for MSG2 2025-02-27 16:56:27 +01:00
francescomani
d31f6ef09b just moving prepare_dl_pdus before MSG2 function 2025-02-27 16:34:25 +01:00
francescomani
bd3e2e7b62 making prepare_dl_pdus function more general 2025-02-27 16:33:17 +01:00
francescomani
40788580ea remove unnecessary tbs function 2025-02-27 16:02:37 +01:00
rmagueta
cbf0ca9ad7 Fix UL-MCS when UL inactivity and no data 2025-02-26 16:06:50 +00:00
Robert Schmidt
f0fce7c167 Merge branch 'integration_2025_w08' into 'develop'
Integration: `2025.w08`

Closes #772

See merge request oai/openairinterface5g!3273

* !3263 Free ITTI message after receiving it at MAC from RRC
* !3268 Upgrade SIMDe commit
* !3269 chore(ci): change image rentention from 4weeks to 3weeks
* !3227 fix(nrLDPC_coding): timers in DL encoding, fix(ldpctest): Confusion in sizes
* !3270 Update of gNB-N300-Timing-Phytest threshold
* !3272 Fix: write NSSAI info of F1AP Cell Info struct
* !3259 UE DCI no candidates
* !3264 Fix "Received Nack" log for Msg4/MsgB and minor improvement in RA logs
* !3228 Add option to use global noise power for all RX channels in RFSimulator
* !2725 Use 5G-S-TMSI as UE identity in RRCSetupRequest
2025-02-25 22:58:21 +00:00
Sakthivel Velumani
591e009326 Fix prach K,kbar for mu 0 2025-02-25 11:58:41 -05:00
Sakthivel Velumani
94abbf247f Modified CI config file of NTN test
NTN test uses long PRACH format (format 0).
2025-02-25 11:58:41 -05:00
Sakthivel Velumani
a3ba41b234 Don't do OFDM mod on PRACH slots
set number of prach slots in prach_vars in first slot and set as
inactive in last slot so we can skip OFDM modulation in slots that
already has prach.
2025-02-25 11:58:41 -05:00
Sakthivel Velumani
a635b4b441 UE PRACH signal generation optimization
Use memcpy in nr_prach.c to fill txdata buffer.

Remove global tables related to PRACH generation.

Add new function to compute modulo multiplicative inverse and use it
directly to get inverse instead of LUT.

Removed nr_ru table and compute the values in-place.

In UE, added new flag root_seq_computed in nrUE_config to only compute
the sequence once after new nrUE_config is received.
2025-02-25 11:58:41 -05:00
Sakthivel Velumani
424b4f4daa Add processing time stats for PRACH 2025-02-25 11:58:41 -05:00
Sakthivel Velumani
4814443ba4 Fix RA-RNTI computation according to 3GPP
t_id for long prach formats is computed with mu = 0.
2025-02-25 11:58:41 -05:00
Sakthivel Velumani
ecbb0bab5e update PRACH tracer 2025-02-25 11:58:41 -05:00
Sakthivel Velumani
611bbb5265 Use tx power from prach PDU instead of constant 2025-02-25 11:58:41 -05:00
Sakthivel Velumani
cf0206e7c6 Fix scheduler for long prach
Long PRACH extends beyond a slot. Changes necessary to mark future slots
that may contain prach in ru, phy and mac functions.

In RU, the PRACH IDFT is done only after receiving last slot and marks
for L1 to start processing. The L1 processes at the last prach slot and
reports to MAC with the first slot index.

In MAC scheduler, the VRB for future slots are also marked as used.
PRACH scheduler is called in advance one frame minus num prach slots.
2025-02-25 11:58:41 -05:00
Sakthivel Velumani
94c74f4a1d fix long prach slot selection 2025-02-25 11:58:38 -05:00
Jaroslava Fiedlerova
e03c15e85b Merge remote-tracking branch 'origin/nr-ue-nas-5g-s-tmsi' into integration_2025_w08 (!2725)
Use 5G-S-TMSI as UE identity in RRCSetupRequest

This MR includes the following implementation:

- Handle 5G-S-TMSI in RRCSetup:
  - Set the ue-Identity to ng-5G-S-TMSI-Part1 in RRCSetupRequest and
  - If RRCSetup is received in response to an RRCSetupRequest: set the
    ng-5G-S-TMSI-Value to ng-5G-S-TMSI-Part2 in do_RRCSetupComplete

TS 38.331 5.3.3.3 Actions related to transmission of RRCSetupRequest message:

The UE shall set the contents of RRCSetupRequest message as follows:
1> set the ue-Identity as follows:
2> if upper layers provide a 5G-S-TMSI:
3> set the ue-Identity to ng-5G-S-TMSI-Part1;

- Pass 5G-S-TMSI to RRC when NAS receives GUTI in Registration Accept
  - NAS extracts GUTI from Registration Accept
  - send ITTI indication from NAS to RRC when GUTI is available and store
    5G-S-TMSI in RRC instance
- Rework of Initial UE message handling in RRCSetupComplete: simplify code and memory management
- Fix for integrity failure after UE comes back from RRC IDLE
- Other NAS fixes

Note:
- Initial implementation of Initial NAS Message: Service Request -> moved to !3065 (merged)
- Rework of Registration Request added to !3176 (merged)

Closes #772
2025-02-25 11:35:13 +01:00
Jaroslava Fiedlerova
b35c58daae Merge remote-tracking branch 'origin/rfsim-global-noise' into integration_2025_w08 (!3228)
Add option to use global noise power for all RX channels in RFSimulator

Added new command line option to rfsimulator: noise_power_dBFS. This options
allows the user to configure noise power in dBFS added instead of the
per-channel value.

This makes it so noise is not accumulated per channel reaching higher than
expected values.

The dBFS unit allows easy configuration. The gNB by default uses -36 dBFS
setting. e.g. to reach 3dB SNR one should set the noise_power_dBFS value to -39.
2025-02-25 10:23:46 +01:00
Sakthivel Velumani
b144ca7049 fix delta_preamble for long format 2025-02-23 16:18:01 -05:00
Sakthivel Velumani
4bfc0147ce ue mac changes for long prach
Fix bug in talbe 38.211 6.3.3.2-1 for FR2.
2025-02-23 16:18:01 -05:00
Sakthivel Velumani
8f5aa740bd Fix function nr_get_prach_mu for L839
function returns mu of UL BWP if msg1-SubcarrierSpacing absent instead
of asserting. The mu retured by this function is used to compute the
slot number of PRACH. In case of long format, the slot number is as per
UL mu.
2025-02-23 16:17:58 -05:00
Jaroslava Fiedlerova
09a793eea5 Merge remote-tracking branch 'origin/Improve-RA-logs' into integration_2025_w08 (!3264)
Fix "Received Nack" log for Msg4/MsgB and minor improvement in RA logs

Fix "Received Nack" log for Msg4/MsgB, in 4-Step RA. When there is a Msg4 NACK,
we have this log:

[NR_MAC]   (UE 91db) Received Nack in MsgB, preparing retransmission!

This MR fixes the message and now works correctly both in 4-Step RA and 2-Step RA.
Other additional but minor improvement in RA logs.
2025-02-21 14:53:25 +01:00
Jaroslava Fiedlerova
fcd7e76143 Merge remote-tracking branch 'origin/issue903' into integration_2025_w08 (!3259)
UE DCI no candidates

Do not schedule DCI in MAC UE if there are no candidates
2025-02-21 14:52:43 +01:00
Jaroslava Fiedlerova
855f8c715b Merge remote-tracking branch 'origin/fix-f1ap-cell-info-slice' into integration_2025_w08 (!3272)
Fix: write NSSAI info of F1AP Cell Info struct

During refactoring, the previously implemented NSSAI field of the cell
info structure was not written to F1AP ASN.1 structures anymore;
eq_f1ap_cell_info() also conveniently omitted the corresponding equality
check. Add this back so the CU can correctly receive the NSSAI in case
of F1 split operation.

Fixes: f278b008 ("Add encoding/decoding library for F1AP Setup
Request (Interface Management) ")
2025-02-21 14:27:56 +01:00
Jaroslava Fiedlerova
b7c5e13e20 Merge remote-tracking branch 'origin/update_timing_phytest' into integration_2025_w08 (!3270)
Update of gNB-N300-Timing-Phytest threshold

Current results are in some cases well below the current thresholds. We should
periodically adapt them to actual values so that the test is meaningful.
2025-02-21 14:26:19 +01:00
Jaroslava Fiedlerova
01431a0e3f Merge remote-tracking branch 'origin/nrLDPC_coding_improvements_3' into integration_2025_w08 (!3227)
fix(nrLDPC_coding): timers in DL encoding, fix(ldpctest): Confusion in sizes

Main improvements:

1. fix(ldpctest): Confusion in sizes
   IMPORTANT: This fix makes that ldpctest now works with BG2 and K' != K!
   (Worth double checking with more cases than I did check with though)
   The variable block_length had an ambiguous role and was used as both K and
   Kprime. This was leading to arrays with wrong sizes and functions with wrong
   arguments. Now there is not anymore block_length but K and Kprime.
   Kprime can be set with the command line argument -l.
   There was also some problems with array allocation for segments with length
   not divisible by 8. A proper sizing with ((size_in_bits + 7) & ~7) / 8 was
   used.
   A proper masking of the last byte containing payload bits was also added to
   keep filler bits to 0 after random initialization.

2. fix(nrLDPC_coding): timers in DL encoding
   While timers were available for rate matching and interleaving in the new
   interface, these timers were not merged to rate matching and interleaving
   timers in nr_dlsch_coding.
2025-02-21 14:23:24 +01:00
Jaroslava Fiedlerova
76eb5c1732 Merge remote-tracking branch 'origin/image-retention' into integration_2025_w08 (!3269)
chore(ci): change image rentention from 4weeks to 3weeks

The cluster image registry is getting full. At the moment we have limited
storage so we should reduce the retention period.
2025-02-21 14:05:31 +01:00
Jaroslava Fiedlerova
5817a35dd3 Merge remote-tracking branch 'origin/Upgrade_SIMDe' into integration_2025_w08 (!3268)
Upgrade SIMDe commit

Upgrade SIMDe commit to the latest: c7f26b73ba8e874b95c2cec2b497826ad2188f68
2025-02-21 14:04:42 +01:00
Jaroslava Fiedlerova
35d28312d1 Merge remote-tracking branch 'origin/ITTI_msg_leak' into integration_2025_w08 (!3263)
Free ITTI message after receiving it at MAC from RRC

Sanitize reporting the following leaks. This small commit seems to fix them.

```
Direct leak of 9888 byte(s) in 103 object(s) allocated from:
    #0 0x7fea59b60a06 in __interceptor_calloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cc:153
    #1 0x556dd89473e7 in itti_malloc /home/francesco/openairinterface5g/common/utils/ocp_itti/intertask_interface.cpp:64
    #2 0x556dd8947b76 in itti_alloc_new_message /home/francesco/openairinterface5g/common/utils/ocp_itti/intertask_interface.cpp:93
    #3 0x556dd87100a1 in nr_rrc_ue_decode_NR_BCCH_BCH_Message /home/francesco/openairinterface5g/openair2/RRC/NR_UE/rrc_UE.c:858
    #4 0x556dd87100a1 in rrc_nrue /home/francesco/openairinterface5g/openair2/RRC/NR_UE/rrc_UE.c:2013
    #5 0x556dd871392e in rrc_nrue_task /home/francesco/openairinterface5g/openair2/RRC/NR_UE/rrc_UE.c:1943
    #6 0x7fea59a16608 in start_thread /build/glibc-FcRMwW/glibc-2.31/nptl/pthread_create.c:477

Direct leak of 96 byte(s) in 1 object(s) allocated from:
    #0 0x7fea59b60a06 in __interceptor_calloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cc:153
    #1 0x556dd89473e7 in itti_malloc /home/francesco/openairinterface5g/common/utils/ocp_itti/intertask_interface.cpp:64
    #2 0x556dd8947b76 in itti_alloc_new_message /home/francesco/openairinterface5g/common/utils/ocp_itti/intertask_interface.cpp:93
    #3 0x556dd86d707c in nr_rrc_ue_process_masterCellGroup /home/francesco/openairinterface5g/openair2/RRC/NR_UE/rrc_UE.c:1094
    #4 0x556dd86faed9 in nr_rrc_process_rrcsetup /home/francesco/openairinterface5g/openair2/RRC/NR_UE/rrc_UE.c:1138
    #5 0x556dd86faed9 in nr_rrc_ue_decode_ccch /home/francesco/openairinterface5g/openair2/RRC/NR_UE/rrc_UE.c:1200
    #6 0x556dd870a518 in rrc_nrue /home/francesco/openairinterface5g/openair2/RRC/NR_UE/rrc_UE.c:2028
    #7 0x556dd871392e in rrc_nrue_task /home/francesco/openairinterface5g/openair2/RRC/NR_UE/rrc_UE.c:1943
    #8 0x7fea59a16608 in start_thread /build/glibc-FcRMwW/glibc-2.31/nptl/pthread_create.c:477

Direct leak of 88 byte(s) in 1 object(s) allocated from:
    #0 0x7fea59b60a06 in __interceptor_calloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cc:153
    #1 0x556dd89473e7 in itti_malloc /home/francesco/openairinterface5g/common/utils/ocp_itti/intertask_interface.cpp:64
    #2 0x556dd8947b76 in itti_alloc_new_message /home/francesco/openairinterface5g/common/utils/ocp_itti/intertask_interface.cpp:93
    #3 0x556dd86be183 in nr_rrc_process_sib1 /home/francesco/openairinterface5g/openair2/RRC/NR_UE/rrc_UE.c:337
    #4 0x556dd870c3b3 in nr_rrc_ue_decode_NR_BCCH_DL_SCH_Message /home/francesco/openairinterface5g/openair2/RRC/NR_UE/rrc_UE.c:954
    #5 0x556dd870c3b3 in rrc_nrue /home/francesco/openairinterface5g/openair2/RRC/NR_UE/rrc_UE.c:2015
    #6 0x556dd871392e in rrc_nrue_task /home/francesco/openairinterface5g/openair2/RRC/NR_UE/rrc_UE.c:1943
    #7 0x7fea59a16608 in start_thread /build/glibc-FcRMwW/glibc-2.31/nptl/pthread_create.c:477
```
2025-02-21 14:02:37 +01:00
Robert Schmidt
2cc3f3bcac Fix: write NSSAI info of F1AP Cell Info struct
During refactoring, the previously implemented NSSAI field of the cell
info structure was not written to F1AP ASN.1 structures anymore;
eq_f1ap_cell_info() also conveniently omitted the corresponding equality
check. Add this back so the CU can correctly receive the NSSAI in case
of F1 split operation.

Fixes: f278b00837 ("Add encoding/decoding library for F1AP Setup
  Request (Interface Management) ")
2025-02-21 07:42:48 +01:00
Sagar Arora
5f2f907d53 chore(ci): change image rentention from 4weeks to 3weeks
Signed-off-by: Sagar Arora <sagar.arora@openairinterface.org>
2025-02-20 08:31:50 +01:00
francescomani
66d8cf0f13 update of timing test thresholds to reflect current values 2025-02-19 18:28:04 +01:00
Bartosz Podrygajlo
c6ed26fca3 Add a metric for rfsimulator channel emulator performance
Add a print and method to calculate rfsimulators channel emulation performance.
The counter unit is Megasample/second (Msps).
2025-02-19 16:18:16 +01:00
Bartosz Podrygajlo
2fb541a68e Add option to use global noise power for all RX channels in RFSimulator
Added new command line option to channelmod: noise_power_dBFS. This options
allows the user to configure noise power in dBFS added instead of the per-channel
value.

This makes it so noise is not accumulated per channel reaching higher than expected
values.

The dBFS unit allows easy configuration. The gNB by default uses -36 dBFS setting.
To reach 3dB SNR one should set the noise_power_dBFS value to -39.

To configure using command line use --channelmod.noise_power_dBFS -50. Using this
setting the gNB and nrUE connect without issue.
2025-02-19 16:05:38 +01:00
Bartosz Podrygajlo
82fbb6bb04 Remove unused noise_power_dB field in rfsimulator_state_t 2025-02-19 16:05:29 +01:00
Guido Casati
89ca89ea4b Address integrity failure after UE reconnects from RRC IDLE
After a new connection from RRC IDLE, an integrity failure occurs. This
commit is addressing this issue to pass the integrity check.

* Reset ciphering and integrity algorithms when going into RRC IDLE

* Use uplink NAS COUNT in Registration Request for initial KgNB derivation
  * Temporarily deriving UP protection keys in Registration Request
  * Note: AS SMC handling should be done according to 33.501 §6.8.1.1.2.2
2025-02-19 15:07:08 +01:00
Guido Casati
48a307e172 Use 5G-S-TMSI in RRC connection setup procedures
* Use the 5G-S-TMSI stored in RRC to be used as UE identity
* Use 5G-S-TMSI part 1 in RRCSetupRequest encoding (TS 38.331 clause 5.3.3.3)
* Set the ng-5G-S-TMSI-Value in RRCSetupComplete to ng-5G-S-TMSI-Part2 (5.3.3.4 of 3GPP TS 38.331)
* current and only scenario: RRCSetup is received in response to an RRCSetupRequest
2025-02-19 15:02:11 +01:00
luis_pereira87
e1d4ff1126 Upgrade SIMDe commit 2025-02-19 10:32:00 +00:00
francescomani
cb72bd26f4 do not send to L1 DCI PDU if there are no candidates 2025-02-19 10:31:42 +01:00
francescomani
1ce6167c45 free message after receiving it at MAC from RRC 2025-02-18 18:07:44 +01:00
ndomingues
27dccb8bce Fix "Received Nack" log for Msg4/MsgB and minor improvement in RA logs 2025-02-18 14:23:36 +00:00
Guido Casati
c6cc00633f Rework handling of initial NAS message in RRCSetupComplete generation
* use initialNasMsg to store nas messages buffer and length
* buffer is dynamically allocated in generateRegistrationRequest, so do the
  same in NSA and free dynamic allocated data afterwards
2025-02-18 12:47:13 +01:00
Guido Casati
36a39b25a1 Set 5GMM Mode to IDLE when receiving NR_NAS_CONN_RELEASE_IND
> In N1 mode, upon indication from lower layers that the access stratum
  connection has been released, the UE shall enter 5GMM-IDLE mode and
  consider the N1 NAS signalling connection released (3GPP TS 24.501)
2025-02-18 12:47:13 +01:00
Guido Casati
fb318e8e3f Cleanup commented out code in nas_nrue 2025-02-18 12:47:13 +01:00
Guido Casati
ca869d8fd3 Pass to RRC the 5G-S-TMSI extracted from NAS Registration Accept
* NAS -> RRC: RRC receives an ITTI message with NAS 5GMM indication message
  containing the 5G-S-TMSI derived from NAS GUTI
* 5G-S-TMSI is stored in the RRC instance and to be later encoded in the RRCSetup
2025-02-18 12:47:13 +01:00
Guido Casati
4736f97055 Indicate to NAS that the RRC connection has been established with a Connection Establishment Indication
* ITTI from RRC to NAS
* according to 5.3.1.3 of 3GPP TS 24.501
* set 5GMM mode to CONNECTED
2025-02-18 12:47:13 +01:00
Robert Schmidt
6d9c2c35b8 Merge branch 'integration_2025_w07' into 'develop'
Integration: `2025.w07`

Closes #812, #901, #904, #881, and #819

See merge request oai/openairinterface5g!3258

* !3055 Dynamic PDCCH aggregation level
* !3176 Refactor and extend NAS Registration Request
* !3256 Add check on force_local in custom_command CI handling
* !3257 Bugfix in gNB modulated DCI buffer size
* !3249 Improvements in TDD configuration
* !3194 fix NTN LEO scenarios
* !3200 FHI72: remove polling, fix memory leak
* !3127 Optimizations of PDSCH Resource Mapping in nr_dlsch.c/nr_modulation.c
* !3252 \[E2 agent\] Multi RC REPORT service styles support
2025-02-18 11:37:07 +00:00
Francesco Mani
87c83f72cb Fix to receive SIB1 in re-establishment
During re-establishment we still have a valid SIB1 so we don't decode it
again. Then the UE never moves out of UE_RECEIVING_SIB, making
re-establishment impossible. This fixes addresses this.

Fixes: 11b87d8744 ("NR UE: RRC layer now explicitly tells MAC layer
when the RA procedure can be started)"
2025-02-18 10:27:34 +01:00
Robert Schmidt
1114ee3a2d Merge remote-tracking branch 'origin/rc-report-service-fix' into integration_2025_w07 (!3252)
[E2 agent] Multi RC REPORT service styles support

Issue: unforeseen capability of having the same RAN Parameter ID across
different REPORT service styles.

Solution: keep only RAN Parameter IDs from REPORT styles that are
supported by OAI. Implement sequence array where each element is
combination of RIC request ID (unique per RIC SUBSCRIPTION) and Event
Trigger Definition. This way we can properly check further conditions
for a certain RAN Parameter ID. (e.g. if xApp is subscribed to RRC
Connected and/or other modes, for "RRC State Changed To" RAN Parameter
ID)

Next steps: for new RAN Parameter ID, add new sequence array.
2025-02-17 22:10:35 +01:00
Robert Schmidt
651ef3daee Merge remote-tracking branch 'origin/resource_mapping_optim' into integration_2025_w07 (!3127)
Optimizations of PDSCH Resource Mapping in nr_dlsch.c/nr_modulation.c

These changes add SIMD optimizations for Neon/AVX2/AVX512 in the PDSCH
transmit path. The timing improvements are listed here based on the

    nr_dlsim -e25 -R273 -b273 -s30 -x "layers" -y 4 -z 4 -P

benchmark with "layers" 2,3,4 and comparing "PHY proc tx":

273 PRBS, mcs25, 64QAM

peafowl (gcc11,AMD EPYC 9374F)

    2-layer, 4 TX : 431 us (develop 565 us)
    3-layer, 4 TX : 692 us (develop 849 us)
    4-layer, 4 TX : 963 us (develop 1172 us)

stupix (gcc10, Xeon Gold 6354)

    2-layer, 4 TX : 568 us (develop 652 us)
    3-layer, 4 TX : 901 us (develop 1030 us)
    4-layer, 4 TX : 1250 us (develop 1396 us)

matix (gcc14, Ryzen 9 PRO 7945)

    2-layer, 4 TX : 317 us (develop 505 us)
    3-layer, 4 TX : 538 us (develop 779 us)
    4-layer, 4 TX : 767 us (develop 1233 us)
2025-02-17 22:09:26 +01:00
Laurent THOMAS
8a63b01387 merge 2 functions that do the same in one and set better naming 2025-02-17 18:51:21 +01:00
Teodora
9e2c889dba Multi RC REPORT service styles support
Issue: unforeseen capability of having the same RAN Parameter ID across different
REPORT service styles.

Solution: keep only RAN Parameter IDs from REPORT styles that are supported by OAI.
Implement sequence array where each element is combination of RIC request ID (unique per RIC SUBSCRIPTION)
and Event Trigger Definition. This way we can properly check further conditions for a certain RAN Parameter ID.
(e.g. if xApp is subscribed to RRC Connected and/or other modes, for "RRC State Changed To" RAN Parameter ID)

Next steps: for new RAN Parameter ID, add new sequence array.

Co-authored-by: Bischoff <tano.bischoff@hhi.fraunhofer.de>
Co-authored-by: Shrinish Donde <shrinish.donde@hhi.fraunhofer.de>
Co-authored-by: Khanh Toan Pham <khanh.toan.pham@hhi.fraunhofer.de>
2025-02-17 16:33:03 +01:00
Robert Schmidt
f0d6d42aec Merge remote-tracking branch 'origin/fhi72-no-polling' into integration_2025_w07 (!3200)
FHI72: remove polling, fix memory leak

- FHI72 used polling to track the next slot. This is not necessary, a
  simple queue does the job and allows to save one core that was
  previously at 100%
- Remove a workaround to avoid a memory leak (fixes #812); allows to
  also run RFsim/USRP/otehr radios when compiling for FHI72
2025-02-17 15:10:01 +01:00
Robert Schmidt
7d574ffcfb Merge remote-tracking branch 'origin/fix_ntn_leo' into integration_2025_w07 (!3194)
fix NTN LEO scenarios

- gNB: add support for NTN parameter ta-CommonDrift-r17
- NR UE: fix application of NTN TA information
- NR UE: add command line parameter ntn-initial-time-drift to compensate
  time drift during initial sync
- NR UE: fix writeTimestamp inconsistencies
- NR UE: add MAC state UE_RECEIVING_SIB ensuring to start RA only after
  successfully receiving SIBs
- rfsimulator: update earth radius for LEO simulation to match UE
  position in ue.conf file
- update conf files for NTN LEO scenario
- update description how to run NTN scenarios in RUNMODEM.md
- fix: ta-Common is a round-trip-time, not a one-way delay
- NR UE: simplify calculation of next_tx_slot_and_frame by moving up
  assignment of duration_rx_to_tx
- cellbarredNTN indicates notbarred in SIB1 if NTN access is available
- Removed b66 NTN and enabled B254 NTN conf file in CI
- NR UE: RRC layer now explicitly tells MAC layer when the RA procedure
  can be started
- move NTN LEO config to band 254 and update doc/RUNMODEM.md

Closes #901
2025-02-17 15:09:24 +01:00
Laurent THOMAS
ce7bdf71e9 fix simde lacking refix 2025-02-17 11:06:08 +01:00
Jaroslava Fiedlerova
34970d38ef fix in nr_dlsch.c, dmrs_case2b 2025-02-17 10:22:17 +01:00
Raymond Knopp
fa38798521 bugfix in nr_dlsch.c 2025-02-16 23:26:51 +01:00
Thomas Schlichter
0bc46a22c6 move NTN LEO config to band 254 and update doc/RUNMODEM.md 2025-02-14 17:04:47 +00:00
Thomas Schlichter
11b87d8744 NR UE: RRC layer now explicitly tells MAC layer when the RA procedure can be started 2025-02-14 17:04:47 +00:00
Raghavendra Dinavahi
48c8d67393 Removed b66 NTN and enabled B254 NTN conf file in CI 2025-02-14 17:04:47 +00:00
Raghavendra Dinavahi
2b4ca7e47d cellbarredNTN indicates notbarred in SIB1 if NTN access is available
38.331 release 18  section 5.2.2.4.2 indicates that to access NTN, cellbarredNTN in SIB1 should be set to notbarred.
2025-02-14 17:04:47 +00:00
Thomas Schlichter
b3581ce1b8 NR UE: simplify calculation of next_tx_slot_and_frame by moving up assignment of duration_rx_to_tx 2025-02-14 17:04:46 +00:00
Thomas Schlichter
f1ae1025ad fix: ta-Common is a round-trip-time, not a one-way delay 2025-02-14 17:03:56 +00:00
Thomas Schlichter
acac0b21bf update description how to run NTN scenarios in RUNMODEM.md 2025-02-14 17:03:56 +00:00
Thomas Schlichter
cf0a1d6db4 update conf files for NTN LEO scenario
Also added a dedicated conf file for NTN LEO, that can be used for CI.
2025-02-14 17:03:56 +00:00
Thomas Schlichter
3fce7688aa rfsimulator: update earth radius for LEO simulation to match UE position in ue.conf file 2025-02-14 17:03:56 +00:00
Thomas Schlichter
be2ed07911 NR UE: add MAC state UE_RECEIVING_SIB ensuring to start RA only after successfully receiving SIBs 2025-02-14 17:03:56 +00:00
Thomas Schlichter
9b7e39b16f NR UE: fix writeTimestamp inconsistencies
The "writeTimestamp inconsistencies" are coming from the fact that during the actual processing we write `N_TA_offset` samples _and_ `NR_UE_CAPABILITY_SLOT_RX_TO_TX` slots ahead,
but both was not corrently considered in readFrame() and syncInFrame().
Therefore, there was always a warning about a gap in write timestamps as soon the actual processing starts.
2025-02-14 17:03:56 +00:00
Thomas Schlichter
f1ca3066a0 NR UE: add command line parameter ntn-initial-time-drift to compensate time drift during initial sync
The value of ntn_init_time_drift is used at initial sync to compensate for the time drift during initial sync detection.

To perform the initial time and frequency sync, the OAI UE currently takes a snapshot of two frames and then performes PSS correlation, SSS detection and MIB decoding.
Doing this takes much time, several tens of ms. During that time, the DL timing drifts so much, that we immediatedly lose sync again.
Therefore the current OAI UE implementation needs to know the drift rate to compensate for this drift, as we are "blind" while performing the initial sync.

To my undestanding, commercial UEs simply have a faster initial sync, so the DL timing will not drift away too much while performing that initial sync.
2025-02-14 17:03:56 +00:00
Thomas Schlichter
e7122ad789 NR UE: fix application of NTN TA information 2025-02-14 17:03:48 +00:00
Robert Schmidt
590850b03d Merge remote-tracking branch 'origin/issue_904' into integration_2025_w07 (!3257)
Bugfix in gNB modulated DCI buffer size

Closes #904
2025-02-14 15:15:40 +01:00
Robert Schmidt
3f66f8b3ec Merge remote-tracking branch 'origin/ci-script-force-local-fix' into integration_2025_w07 (!3256)
Add check on force_local in custom_command CI handling

The force_local flag was introduced earlier in the main CI script in
order to run a CI test locally.

The flag was still missing in the Custom_Command handling, which was
still targeting the node specified in the test configuration file. This
was causing a failure in the tests with custom commands and therefore
limiting the scenarios that could be run locally.

With this commit, if force_local is enabled the node for the
Custom_Command is set to localhost.
2025-02-14 15:14:37 +01:00
Robert Schmidt
919bfb8cfb Merge remote-tracking branch 'origin/improv_TDD' into integration_2025_w07 (!3249)
Improvements in TDD configuration

Including using the frame structure introduced in !2799 also at the UE
2025-02-14 15:10:22 +01:00
Robert Schmidt
2334f6f522 Merge remote-tracking branch 'origin/nas-issue-881' into integration_2025_w07 (!3176)
Refactor and extend NAS Registration Request

Extended NAS Registration Request generation and encoding according to
8.2.6 of 3GPP TS 24.501. Main topics:

- NAS Registration Type
- NAS KSI
- integrity protection
- NAS container encoding

Improvements:

- Add 5GMM Modes in NAS
- Introduced 5GMM state machine

Fixes:

- add 5GMM Capability IE to Registration Request
- closes #881, #819
2025-02-14 15:08:23 +01:00
Robert Schmidt
bab13b80a2 Merge remote-tracking branch 'origin/dynamic-pdcch' into integration_2025_w07 (!3055)
Dynamic PDCCH aggregation level

The aggregation level search order for PDCCH candidates is modified:

- the search starts from desired_agg_level_index, which is a value from
  0 to 4 proportial to pdcch_cl_adjust.
- pdcch_cl_adjust is a value between 0 and 1 that indicates PDCCH
  channel quality by averaging HARQ DTX rate. A value of 0 means perfect
  channel, a value o 1 means impaired channel.

Also added configuration option for number of PDCCH candidates per
aggregation level.
2025-02-14 10:10:56 +01:00
Bartosz Podrygajlo
095b791929 Add PDCCH UESS aggregation level configuration option
Added uess_agg_levels configuration option which changes the number of PDCCH
candidates per aggregation level.
2025-02-13 10:57:25 +01:00
Bartosz Podrygajlo
16f028dba5 Dynamic PDCCH aggregation level
The aggregation level search order for PDCCH candidates is modified:
 - the search starts from desired_agg_level_index, which is a value from 0 to 4
   proportial to pdcch_cl_adjust.
 - pdcch_cl_adjust is a value between 0 and 1 that indicates PDCCH channel quality
   by averaging HARQ DTX rate. A value of 0 means perfect channel, a value o 1 means
   impaired channel.
2025-02-13 10:57:14 +01:00
francescomani
2bdb1826c9 fix in gnb mod_dci buffer size 2025-02-13 09:34:12 +01:00
Robert Schmidt
e1d7306a43 Reduce indentation, add comment
Reduce one level of indentation, and explain why we wait for
physide_dl_tti callback.
2025-02-13 09:17:01 +01:00
Robert Schmidt
6706c9390d FHI72: Cleanup: Remove first_rx_set
first_rx_set is polling-specific: it makes the polling loop wait to only
check the frame/slot counter once we set it for the first time. However,
that is equivalent to checking the frame/slot directly, which will also
be 0 in the beginning.
2025-02-13 09:17:01 +01:00
Robert Schmidt
0420184518 FHI72: cleanup: remove first_read_set
first_read_set seems to have the function of making frame/slot time
advance only if we started to read the samples in
xran_fh_rx_read_slot(). I interpret that as "only advance the time if
the gNB is reading from xran", which does not make sense to me, because
xran advances the time anyway. Also, polling would not notice, and
no-polling would simply warn about double messages. So the outcome is
likely the same, whether first_read_set is set or not.

I checked in multiple CI runs; it happens that first_read_set is always
set already when oai_xran_fh_rx_callback() is called anyway.
2025-02-13 09:17:01 +01:00
Robert Schmidt
fd77306806 FHI72: make polling configurable in xran_fh_rx_read_slot(), default off
xran_fh_rx_read_slot() uses polling (a loop over cnt++) to wait for the
next frame/slot. The reasons I have been told is "it does not work
differently", or "there are real-time problems". None of those seem to
be true; by default disable polling, and use the queue instead.

It is possible to enable polling with the cmake option
OAI_FHI72_USE_POLLING=ON. Documentation has been updated to inform about
this change.
2025-02-13 09:17:01 +01:00
Robert Schmidt
595a80a3f7 Remove FHI72 memory workaround
The queue L1_rx_out was in place to keep RX/TX processing relatively
"close" to each other (in terms of time, since in RFsim, they might
advance faster than realtime; see also parent commit). This lead to a
memory leak in radios that do not use ru->feprx (no front-end processing
for RX, e.g., PRACH), as the code to read the L1_rx_out messages was
inside a block of if (ru->feprx). Move it out so that the queue is
always read and messages are freed to eliminate the memory leak, and
remove the workaround for FHI72 to avoid this memory leak.

This also allows to run RFsim when compiling FHI72, which was not
possible before this commit.

Closes: #812
2025-02-13 09:17:01 +01:00
Robert Schmidt
99c849c249 Refactor code to wait for free RX job
Some radios (e.g., RFsim) can run faster. A mechanism has been put in
place to keep RX/TX frame/slot numbers not too far from each other.
Refactor in a separate function with documentation to make this clearer.
2025-02-13 09:17:01 +01:00
Robert Schmidt
540d918a09 Detect double sync message and skip frames 2025-02-13 09:17:01 +01:00
Robert Schmidt
0e5bc42e3e FHI72: no poll: use pullNotifiedFIFO(), cleanup code, make compile
Move the extern definition to the header, to avoid type errors.
2025-02-13 09:17:01 +01:00
Robert Schmidt
2cd0bba9c4 notified_fifo: include malloc.h for memalign() 2025-02-13 09:17:00 +01:00
Robert Schmidt
984b917e59 FHI72: Remove unused defines and comments 2025-02-13 09:17:00 +01:00
francescomani
bd7d007ea8 remove global slots_per_frame, use function instead 2025-02-12 18:08:56 +01:00
francescomani
bec43f01a8 use frame_structure in set_tdd_config_nr_ue function 2025-02-12 18:01:56 +01:00
francescomani
ad66c75a33 frame_structure used also at UE 2025-02-12 18:01:51 +01:00
Guido Casati
2333cdabda Add check on force_local in custom_command handling
* The force_local flag was introduced earlier in the main CI script
  in order to run a CI test locally. The flag was missing in the
  Custom_Command handling, which was still targeting the node specified
  in the test configuration file. With this commit, if force_local
  is enabled the node for the Custom_Command is set to localhost.
2025-02-12 15:40:20 +01:00
Raymond Knopp
1d538592fe fixed compilation warnings and minor errors for aarch64 2025-02-12 11:59:52 +01:00
Raymond Knopp
6194b9a525 trace in nr_dlsim : since resource mapping and layer precoding are merged, the indication of timing was reworked in the statistics output 2025-02-12 11:59:52 +01:00
Laurent THOMAS
3edd989aff simplify nr_layer_mapping(), and use all simd sizes for the tail 2025-02-12 11:59:52 +01:00
Laurent THOMAS
9004787171 group two symbol loops to make one with smaller tsack size and smaller variables 2025-02-12 11:59:52 +01:00
Laurent THOMAS
f73afa393e group similar functions in one version, split one too large function in two functions 2025-02-12 11:59:52 +01:00
Laurent THOMAS
eb0dda59ac remove intermediate buffer and memory copy, continue to simplify nr pdsch computation 2025-02-12 11:51:28 +01:00
Laurent THOMAS
2fad8796b1 clean no_ptrs_dmrs_case() 2025-02-12 11:51:28 +01:00
Laurent THOMAS
5ff5d01fb9 simplify and order sizes of SIMD vectors 2025-02-12 11:51:28 +01:00
Laurent THOMAS
9d844135b1 local dmrs_mux and unaligned mod_dmrs 2025-02-12 11:51:28 +01:00
Laurent THOMAS
3ddb2d0502 very coarse grain dlsch computation function break into smaller functions 2025-02-12 11:51:28 +01:00
Laurent THOMAS
d928e68e12 create a separate function to process dlsch ptrs 2025-02-12 11:51:28 +01:00
Laurent THOMAS
5526244ad6 create a function per dlsch_id 2025-02-12 11:51:28 +01:00
Laurent THOMAS
889b4b00e3 SIMD optimizations for Neon/AVX2/AVX512 in the PDSCH transmit path 2025-02-12 11:51:28 +01:00
francescomani
74bcd9963d make relevant frame_structure functions common 2025-02-12 11:49:43 +01:00
francescomani
d0ba1a30e3 use frame_type in frame_structure instead of bool 2025-02-12 11:24:56 +01:00
francescomani
b439816409 use frame structure parameter for slots per frame 2025-02-12 11:24:25 +01:00
Robert Schmidt
ff58b5e169 Merge branch 'integration_2025_w06' into 'develop'
Integration: `2025.w06`

See merge request oai/openairinterface5g!3248

* !3202 Simplify usage of the old segment decoding libraries with the slot coding interface
* !3240 Fix typos in NR_SA_Tutorial_OAI_multi_UE.md
* !3242 Period based phytest bitmap
* !3238 Refactor tun_if.h
* !3000 Improvements for NR dlsim and ulsim
* !3239 Remove inexistant SIMD instruction
* !3246 Deadlock avoidance in rfsimulator
* !3251 nFAPI: make 4-layer on 100MHz work
* !3243 Reset E1 UE contexts after E1 Setup Response
* !3245 Added Support of 35Mhz,45Mhz,70Mhz Bandwidth
* !3219 E1AP enc/dec lib improvements
2025-02-12 06:55:05 +00:00
Robert Schmidt
859494112a Merge remote-tracking branch 'origin/e1ap-lib-improvements' into integration_2025_w06 (!3219)
E1AP enc/dec lib improvements

This MR is including some fixes and improvements for the E1AP library,
focusing mostly on Bearer Context Management:

- struct reorganization: split setup and modification request messages
  into distinct structures, ensuring compliance with 3GPP TS 38.463
  specifications
- add encoding/decoding sub-functions for different IEs
- improvements to Bearer Context Management: Implemented various
  improvements to the E1 Bearer Context Setup Response and Request,
  including the adoption of encoding/decoding sub-functions for
  different IEs
- use lib functions whenever need (e.g. cp_bearer_context_setup_request
  in cucp_cuup_e1ap.c)
- handle optional struct members as pointers
- updated copy/equality check utility functions

EDIT: The MR is also including the changes from !3222 (closed):

> While testing E1 with security enabled for DRBs, it was found that
> data traffic was not functional.
>
> The problem was that security settings were modified in the PDCP
> reestablishment happening when receiving Bearer Context Modification
> Request.
>
> So some restructuring was done.
>
> The actual fix is in 18176297, the others are for support. Basically
> we introduce a boolean to check if the security settings are present in
> Bearer Context Modification Request and we change PDCP security settings
> only if they are.
>
> (Note that in OAI CU security settings are not sent in Bearer Context
> Modification Request, so we could also remove all this, but we need to
> be compatible with other cu-up and/or cu-cp.)
2025-02-11 17:53:40 +01:00
Robert Schmidt
805ed55788 Merge remote-tracking branch 'origin/NR_add_new_BW' into integration_2025_w06 (!3245)
Added Support of 35Mhz,45Mhz,70Mhz Bandwidth

Added Support of 35Mhz,45Mhz,70Mhz Bandwidth for 30Khz Subcarrier
Spacing, Also added 35Mhz, 45Mhz bw for 15Khz Subcarrierspacing.

Referred Spec TS 38.101 v18.6.0 section 5.3.2, table 5.3.2-1
2025-02-11 17:47:59 +01:00
Robert Schmidt
1be038c88b Merge remote-tracking branch 'origin/fix-cuup-assert-reconnect' into integration_2025_w06 (!3243)
Reset E1 UE contexts after E1 Setup Response

38.463 sec. 8.2.3 says

> This procedure also re-initialises the E1AP UE-related contexts (if
> any) and erases all related signalling connections in the two nodes
> like a Reset procedure would do.

Hence, delete all contexts after reception of E1 Setup Response. This
minimizes a risk of receiving an E1 bearer setup req for an existing UE,
which currently leads to an assert [we trust the CU-CP does not send the
same UE ID twice, as we only "mirror" the existing UE ID].  After this
MR, this is what happens if these entities fail:

- CU-CP fails: all context lost implicitly, upon reconnection, both DU
  and CU-UP reset all contexts (like "start from zero")
- DU fails: CU-CP triggers NGAP UE context release request immediately
  (radio connection with UE lost), all UE contexts attached to this DU
  cleared (like "start from zero" for affected DU)
- CU-UP fails: initially, nothing (UE has no user plane); upon
  reconnection of CU-UP, CU-CP triggers NGAP UE context release request
  (cause radio connection with UE lost) and sends F1 Reset to DU, all UE
  contexts associated to this DU cleared (like "start from zero")

for the last case, a possible improvement could be to use the F1 Reset
message to only clear affected UE conetxts. I chose not to do this,
because this MR is very big now already, and possible "victim" UEs
that were not at that CU-UP will reconnect as well
2025-02-11 17:45:14 +01:00
Guido Casati
ac6b1b1894 Enable integrity in E1 SABOX CI test 2025-02-11 14:04:32 +01:00
Cedric Roux
410446cbe9 e1: no need to pass security information since it does not change
In Bearer Context Modification Request, the security information
field is needed only if we change the PDCP algorithms/keys. Since we
don't, no need to pass it.

Let's keep the old code, maybe the current understanding of the
specifications is wrong.
2025-02-11 14:04:32 +01:00
Cedric Roux
1273446804 e1: change security settings only if parameters present
If the Bearer Context Modification Request does not contain security
information, the PDCP entity shall keep the currently configured security
settings.

Passing -1 for ciphering_algorithm and integrity_algorithm is the way
to implement this logic.
2025-02-11 14:04:32 +01:00
Cedric Roux
182b05bd5c e1: security information is optional in bearer modification
Check if the IE is memory allocated to deal with presence/absence of this information
element in Bearer Context Modification Request and add encoding/decoding
in the code.

Note that for decoding the integrity settings may be absent, in which
case we consider NIA0 to be used (no integrity protection). To be refined
if needed.

And for encoding, we always encode integrity settings, even if it's NIA0.
May also be refined if needed.
2025-02-11 14:04:32 +01:00
Cedric Roux
a1eb8f35fb bugfix: use correct algorithm and derive keys accordingly
This was not a big problem, but we were advertising wrong
algorithm and deriving keys using this wrong algorithm in case
DRB ciphering and/or integrity was not active. (Say SRBs
are configured with NIA2 but DRBs are configured without
integrity, we would advertise NIA2 and send the integrity
key derived for NIA2, instead of NIA0 for both.)

It was not a problem because in the PDU Session Resource To Setup
item, there is "securityIndication" which we use to effectively
activate/deactivate the ciphering and/or integrity.

But it did not look clean to see a SecurityInformation with
incorrect data when inspecting the message in wireshark.

So let's use the correct values.

We could also not include the SecurityInformation if both ciphering
and integrity are not used, and only include ciphering if integrity
is not used (because integrity settings are optional).

But then if only integrity is used, we still need to include
ciphering, setting algorithm to NEA0 (no ciphering), because
the ciphering settings are always included.

This logic is too complex, let's use the simple one to always
include SecurityInformation with NEA0 and/or NIA0 if ciphering
and/or integrity is not activated.
2025-02-11 14:04:32 +01:00
Guido Casati
627f8171ec Add test for Bearer Context Modification Request 2025-02-11 14:04:19 +01:00
Robert Schmidt
e8661f5ae5 Reset CU-CP E1 UE context after E1 Setup Response
As in deba3ae066 ("Reset CU-UP E1 UE contexts after E1 Setup
Response"), the CU-CP should reset the E1 UE contexts after E1 Setup
Response. 38.463 sec. 8.2.3 says

> This procedure also re-initialises the E1AP UE-related contexts (if
> any) and erases all related signalling connections in the two nodes like
> a Reset procedure would do.

In the case of CU-CP, this is a bit more complicated. More precisely, we
need to wait for the CU-UP to be available again before informing the DU
about the loss (implemented via an F1 Reset message), because otherwise,
the UE might reconnect immediately, before the CU-UP is online again.

Hence, on connection loss, we mark affected UEs (by setting their E1
association ID to 0); as long as the CU-UP does not connect, nothing
will happen (but UEs don't have user plane). Upon CU-UP connecting
again, we request release of the UEs via NGAP (similarly to what is done
if the DU goes offline, see invalidate_du_connections()), free the UE
contexts locally, and send an F1 Reset message to the DU, because
38.473 sec 8.2.1.2.1 says

> a failure at the gNB-CU [...] has resulted in the loss of some or
> all transaction reference information [...] a RESET message shall be
> sent to the gNB-DU.

The core should accept and send an NGAP release command message; since
no UE contexts are to be found (already deleted), the CU-CP will just
send a release complete (together with some warnings).

It might be possible to more gracefully handle the situation (e.g., as
described in 38.401 section 8.9.5 "Change of gNB-CU-UP"), but

- we lack the PDCP SN exchange
- the current procedure has the advantage of being equivalent to
  "restart of the entire gNB", with less downtown.
2025-02-11 13:20:28 +01:00
Robert Schmidt
d2bb779e78 Refactor rrc_remove_ue() to not send NGAP ctxt release cplt
The next commit will use rrc_remove_ue() to delete a CU(-CP+-UP)
context. However, we don't send NGAP UE context release at that moment
(we will instead *request* the release); more generally, it's not clear
that every user of rrc_remove_ue() wants to actually send this message.
Hence, refactor the code by separately calling
rrc_gNB_send_NGAP_UE_CONTEXT_RELEASE_COMPLETE() where appropriate.
2025-02-11 13:20:28 +01:00
Robert Schmidt
ff106c41a3 Use (CU-initiated) F1 Reset Acknowledgement in stack 2025-02-11 13:20:28 +01:00
Robert Schmidt
df365d9a2d Add F1 Reset Ack enc/dec/cp/eq/free library and test 2025-02-11 13:20:28 +01:00
Robert Schmidt
4c9ed9d7ec Use (CU-initiated) F1 Reset in stack 2025-02-11 13:20:28 +01:00
Robert Schmidt
9157e22c7c Add F1 Reset enc/dec/cp/eq/free library and test 2025-02-11 13:20:28 +01:00
Guido Casati
b854f97130 Enable pDCP_Reestablishment in test_bearer_context_setup_request 2025-02-11 13:15:01 +01:00
Guido Casati
b061b57698 Add Bearer Context Modification Request enc/dec lib 2025-02-11 13:10:21 +01:00
Guido Casati
f2b80ae31c Use cp_bearer_context_setup_request in cucp_cuup_e1ap.c 2025-02-11 13:10:21 +01:00
Guido Casati
cd7218c976 Improvements to E1 Bearer Context Setup Request/Response
* Add enc/dec/cp/eq sub-functions to E1 library and adopt in stack
  * eq_drb_to_mod
  * encode_dl_up_parameters
  * decode_dl_up_parameters
  * e1_decode_snssai
  * e1_encode_snssai
  * eq_security_ind
* Check result of enc/dec functions in Bearer Context Setup enc/dec libs
2025-02-11 13:10:21 +01:00
Guido Casati
1ef24796f9 Add compile definitions E1AP_LOG_ERRORS
* this is necessary to enable the error logs in the E1 libs
* also, updated the define name in the E1AP lib
2025-02-11 13:10:21 +01:00
Guido Casati
2146f29c44 Refactor E1 Bearer Context Management structs
Bearer context setup request and modification request messages
differ in various IEs according to 9.2.2 of 3GPP TS 38.463, e.g.
the Bearer context setup request does not contain a list of
DRBs to modify and does not contain an UP TL configuration.

Thus, the goal of this commit is to split the setup request message
and the modification request into two different structs:
* adopt e1ap_bearer_mod_req_t where necessary (e.g. fill_e1_bearer_modif)

Also, reorganized existing struct members according to specs:
* remove irrelevant struct members from the setup request
* group members from the same IEs into structs
* set optional struct members IEs as pointers
* add and adopt enc/dec/cp/eq lib functions for single IEs
* add UP_TL_information_t struct with TEID and TL address info and adopt in stack
* use int instead of long for count types
* update the relevant copy/equality check utility functions

Extra:
* add a function to handle Security Information in RRC in the process
* add create_up_tl_info and adopt in unit tests
2025-02-11 13:10:21 +01:00
Guido Casati
4f613ab2af Remove incomplete activityNotificationLevel handling 2025-02-11 13:10:21 +01:00
Guido Casati
b862963a95 Add macro to check result of dec lib functions and return with a failure 2025-02-11 13:09:50 +01:00
Raghavendra Dinavahi
f267641bf9 Changes in function prepare_sim_uecap 2025-02-11 09:53:41 +01:00
Robert Schmidt
9b4e067709 Merge remote-tracking branch 'origin/nfapi-fixes-4x4-100MHz' into integration_2025_w06 (!3251)
nFAPI: make 4-layer on 100MHz work

5G nFAPI headers specify 32 bits for the length field, so use it also
when segmenting messages. This should stabilize 4-layer MIMO operation
on 100MHz with nFAPI.
2025-02-11 09:37:14 +01:00
Robert Schmidt
7d4f7ebbfe Merge remote-tracking branch 'origin/rfsim-deadlock-avoidance' into integration_2025_w06 (!3246)
Deadlock avoidance in rfsimulator

This change introduces a countermeasure for deadlock in rfsimulator. The
deadlock happens when all entities are waiting for new data to come in,
and happens with 2+ clients, when a new client connects. I think this
issue is due to ordering of fullwrite calls, resulting in out-of-order
delivery of packets and eventually trashing the packets on the receiving
side. The out-of-order delivery warnings are printed just before the
system deadlocks but I have not found a better solution so far. The
workaround makes the server never lock up permanently by ignoring the
client failure to write on time after 10 tries.

This was tested locally for both UE as server and gNB as server and
works correctly, causing the deadlock to clear and the added log to be
printed several times when the deadlock is detected, after which the
system goes back to normal.

I have some gdb output of the executables during deadlock:

    UE:

    $7 = {conn_sock = 98, lastReceivedTS = 3226163740, headerMode = true, trashingPacket = false, th = {size = 13184, nbAnt = 1, timestamp = 3226150556, option_value = 0, option_flag = 0}, transferPtr = 0x7f6a500018a8 "\200\063", remainToTransfer = 24,
      circularBufEnd = 0x7f6a503b3ac0 "", circularBuf = 0x7f6a501f1ac0, channel_model = 0x0}
    (gdb) p t->buf[5]
    $8 = {conn_sock = 97, lastReceivedTS = 0, headerMode = true, trashingPacket = false, th = {size = 0, nbAnt = 0, timestamp = 0, option_value = 0, option_flag = 0}, transferPtr = 0x7f6a50001900 "", remainToTransfer = 24, circularBufEnd = 0x7f6a50575ad0 "",
      circularBuf = 0x7f6a503b3ad0, channel_model = 0x0}

    nextRxTimestamp 3225937740
    nsamps = 30720

    gNB 1:
    (gdb) p t->buf[0]
    $4 = {conn_sock = 95, lastReceivedTS = 3226026876, headerMode = true, trashingPacket = false, th = {size = 1, nbAnt = 1, timestamp = 3226026875, option_value = 0, option_flag = 0},
      transferPtr = 0x7f8dfc003ab8 "\001", remainToTransfer = 24, circularBufEnd = 0x7f8e1c3ff010 "", circularBuf = 0x7f8e1c23d010, channel_model = 0x0}
    nextRxTimestamp 3225996956

    gNB 2:
    lastReceivedTS = 3226026875
    $2 = {conn_sock = 95, lastReceivedTS = 3226026875, headerMode = true, trashingPacket = false, th = {size = 1, nbAnt = 1, timestamp = 3226026875, option_value = 0, option_flag = 0},
      transferPtr = 0x744898003ab8 "\001", remainToTransfer = 24, circularBufEnd = 0x7448bc2e7010 "", circularBuf = 0x7448bc125010, channel_model = 0x0}

    nextRxTimestamp 3226026875

As you can see all executables are in have_to_wait state.
2025-02-11 09:35:23 +01:00
Robert Schmidt
27a418572d Remove unnecessary includes
f1ap_lib_common should help with common message enc/dec inside lib/, and
not be used directly.
2025-02-10 18:19:27 +01:00
Robert Schmidt
deba3ae066 Reset CU-UP E1 UE contexts after E1 Setup Response
38.463 sec. 8.2.3 says

> This procedure also re-initialises the E1AP UE-related contexts (if
> any) and erases all related signalling connections in the two nodes like
> a Reset procedure would do.

Hence, delete all contexts after reception of E1 Setup Response. This
minimizes a risk of receiving an E1 bearer setup req for an existing UE,
which currently leads to an assert [we trust the CU-CP does not send the
same UE ID twice, as we only "mirror" the existing UE ID].
2025-02-10 18:19:15 +01:00
Robert Schmidt
b9acf4a8e3 Refactor E1 UE removal in separate function
Refactor into remove_ue_e1(), to be used in the next commit, independent
of e1_bearer_release_cmd().
2025-02-10 18:18:38 +01:00
Robert Schmidt
32310cced3 Bugfix: free E1 CU-UP Setup Req on CU-UP disconnection 2025-02-10 15:43:37 +01:00
Guido Casati
bd42948814 Move debug log for SUCI and GUTI to the relvant processing functions 2025-02-10 10:05:02 +01:00
Guido Casati
81ec8d2e13 Rework protection of initial NAS signaling messages (REGISTRATION REQUEST) as per 3GPP TS 33.501
* Without a valid 5G NAS security context:
  * Send REGISTRATION REQUEST with cleartext IEs only.
  * After activating a security context via Security Mode Control:
    wrap the entire REGISTRATION REQUEST (with both non-cleartext and cleartext)
    in a NAS message container IE, include it in SECURITY MODE COMPLETE

* With a valid 5G NAS security context:
  * If non-cleartext IEs are needed, wrap the entire message in a NAS message container IE and cipher it.
  * If only cleartext IEs are needed, send the message directly without the NAS message container IE.
2025-02-10 10:05:02 +01:00
Guido Casati
16b1b0e9ce Enable 5GMM Capability encoding in NAS Registration Request
* this commit is enabling the handling of non-cleartext IEs in the NAS Registration Request message
  according to 24.501, 23.502
* send the full Registration Request message in the NAS Container of the SECURITY MODE COMPLETE
* send the non-cleartext IEs in the NAS container of the Registration Request

closes #881
2025-02-10 10:05:02 +01:00
Guido Casati
9447e4fb57 Refactor 5GMM Capability encoding (9.11.3 of 3GPP TS 24.501)
* add all relevant content fields according to the specs and do the encoding

Related to #881
2025-02-10 10:05:02 +01:00
Guido Casati
0c8761aadd Refactor NAS 5GS Registration Request generation (3GPP TS 24.501)
* send integrity protected Initial NAS Message when UE in 5GMM-IDLE mode has valid current 5G NAS security context:
  > According to 4.4.2.5 TS 24.501:
  > when a UE in 5GMM-IDLE mode establishes a new NAS signalling connection and has a valid current 5G NAS
  > security context, the UE shall transmit the initial NAS message integrity protected with the current 5G NAS security
  > context and further protect this message as specified in subclause 4.4.6.

* set NAS key set identifier IE to "no key is available (UE to network)"
  * previously set to 1 which has no impact
  * set now to 111 in order to trigger new authentication
  * See 9.11.3.32 of 3GPP TS 24.501

* Do 5GS Registration Type "mobility registration updating" when 5GMM state is De-registered
2025-02-10 10:05:02 +01:00
Guido Casati
088939f5b0 Add set_fgs_registration_type to set 5GS Registration Type according to 3GPP TS 24.501 2025-02-10 10:05:02 +01:00
Guido Casati
b9dc68b5ce Add RRC Inactive Indication and Timer T3512 to NAS struct definition 2025-02-10 10:05:00 +01:00
Guido Casati
4633eb8888 Refactor 5GS registration type encoding (9.11.3.7 of 3GPP TS 24.501) 2025-02-10 09:51:52 +01:00
Romain Beurdouche
9dada89ced feat(ldpctest): add CUDA ldpctest test cases to CI 2025-02-10 07:28:24 +00:00
Romain Beurdouche
de4ef83956 feat(ldpctest): add BG2 test cases to CI 2025-02-10 07:22:35 +00:00
Guido Casati
212fe8d2f3 Add common enc/dec E1AP libs to e1ap_lib_common.c
* these functions are used in both interface management
  and bearer context management libraries
2025-02-09 22:48:54 +01:00
Robert Schmidt
609969f46d nFAPI/PNF: Correctly set message length when segmenting
Make the same change as in parent commit, i.e., write the full 32-bit
segment size.

I could not test this, as we do not reach these rx_data.indication
length. It's based on the fix in the parent commit, and to avoid future
bad surprises.
2025-02-08 12:29:25 +01:00
Robert Schmidt
2067831e7a nFAPI/VNF: Correctly set message length when segmenting
The 5G nFAPI message length is 32bits. In particular tx_data.requests
can be longer than 64kB. When segmenting, we should correctly write the
message of the current segment (across all 32bits), because the
length would interpreted wrongly otherwise.

This fixes a bug in which tx_data.requests were discarded for 4-layer DL
MIMO on 100 MHz with this message:

    P7 unpack message length is greater than the message buffer

Further, increase the type of various (segment-related) variables to 32
bits. Currently, the maximum segment size is sxt to 65000 bytes (and in
will likely remain, because the maximum UDP size is 65536);
nevertheless, increase it in case we will ever go beyond this.

See also commit dee68e6319 ("nFAPI: increase maximum segment size to
65000")
2025-02-08 12:25:44 +01:00
Robert Schmidt
976f210132 Merge remote-tracking branch 'origin/error-simd-intrinsic-name' into integration_2025_w06 (!3239)
Remove inexistant SIMD instruction

develop branch doesn't compile with AVX2 only. For instance,
mm_loadi_epi32() doesn't exist in SSE, only in the AVX512 family,
despite it being a 128 bit vector size instruction.

See also:
https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#_mm_loadi_epi32()

This was masked by using SIMDE.
2025-02-07 17:33:08 +01:00
Robert Schmidt
8c39825688 Merge remote-tracking branch 'origin/tun_if_refactor' into integration_2025_w06 (!3238)
Refactor tun_if.h

Use a common function for generating interface name. Use full interface
name in tun_if.h functions.
2025-02-07 17:32:28 +01:00
Robert Schmidt
999877eaae Merge remote-tracking branch 'origin/issue_709' into integration_2025_w06 (!3000)
Improvements for NR dlsim and ulsim
2025-02-07 17:31:59 +01:00
Robert Schmidt
6ed05c5334 Merge remote-tracking branch 'origin/period_based_phytest_bitmap' into integration_2025_w06 (!3242)
Period based phytest bitmap

phy-test slot bitmap tdd period based to minimize the chance to need it
larger than 64 slots
2025-02-07 15:24:48 +01:00
Robert Schmidt
e3c56a2b4e Merge remote-tracking branch 'beraoud/beraoud-develop-patch-76226' into integration_2025_w06 (!3240)
Fix typos in NR_SA_Tutorial_OAI_multi_UE.md
2025-02-07 15:24:02 +01:00
Robert Schmidt
296bf289cb Merge remote-tracking branch 'origin/remove_segment_coding' into integration_2025_w06 (!3202)
Simplify usage of the old segment decoding libraries with the slot coding interface

This MR transforms the segment coding libraries into slot coding
libraries by statically linking the adaptation layer and the segment
coding libraries.

Therefore they can be used directly in ldpctest which uses the segment
coding interface as well as in all the other PHY simulators and the NR
softmodem which use the slot coding interface.

It is not anymore needed to use the

   --nrLDPC_coding_segment.segment_shlibversion

flag.  Instead a segment coding library can be directly chosen with

    --loader.ldpc.shlibversion

since it implements the slot coding interface.
2025-02-07 15:22:30 +01:00
Robert Schmidt
bad4a6eb64 nFAPI: msg length/offset is 32bit
5G nFAPI headers specify 32 bits for the length field, so use it here as
well.
2025-02-07 14:35:31 +01:00
Bartosz Podrygajlo
e61bf5132d Refactor tun_if.h
Use a common function for generating interface name. Use full interface
name in tun_if.h functions.
2025-02-07 12:25:35 +01:00
Raghavendra Dinavahi
3e27175ac2 Added Support of 35Mhz,45Mhz,70Mhz Bandwidth for SCS 30Khz
Also added support for 35Mhz, 45Mhz bw for 15Khz Subcarrierspacing
Referred Spec TS 38.101 v18.6.0 section 5.3.2, table 5.3.2-1
2025-02-06 16:44:45 +01:00
francescomani
bd179fd5e4 making phy-test slot bitmap tdd period based to minimize the chance to need it larger than 64 slots 2025-02-05 18:55:09 +01:00
francescomani
fabaae3327 removing initial sync option from dlsim 2025-02-05 14:07:59 +01:00
Romain Beurdouche
6138e33f42 fix(nrLDPC_coding): Documentation 2025-02-05 11:22:54 +00:00
Romain Beurdouche
2d4d313b62 feat(nrLDPC_coding): Transform segment coding libraries into slot coding libraries by statically linking the adaptation layer and the segment coding libraries 2025-02-05 11:22:46 +00:00
Guido Casati
9dd1929ec0 Add fgsnasmessagecontainer member to NAS Registration Request struct 2025-02-04 15:32:04 +01:00
Guido Casati
54755b57aa Add NAS Registration Request with type Mobility Registration Updating
* ref TS 24.501
2025-02-04 15:31:24 +01:00
Guido Casati
e3eb663085 Add 5GMM Modes in NAS
* added fgs_mm_mode_t enum
* added struct member to NAS
* modes: FGS_IDLE, FGS_CONNECTED
* according to 5GS mobility management (5GMM) modes 5.1.3.2.1.1 of TS 24.501
2025-02-04 15:30:04 +01:00
Guido Casati
98d922e568 Introduced 5GMM state machine
* according to 5.1.3.2.1 of 3GPP TS 24.501
2025-02-04 15:30:03 +01:00
Abdelkhalek Beraoud
d5467aceb0 Fix typos in NR_SA_Tutorial_OAI_multi_UE.md 2025-02-04 13:44:50 +00:00
Romain Beurdouche
ad88beef10 fix(ldpctest): few improvements on top of clang-format changes 2025-02-04 13:30:43 +00:00
Romain Beurdouche
430f0081ea fix(ldpctest): apply clang-format to openair1/PHY/CODING/TESTBENCH/ldpctest.c 2025-02-04 13:30:43 +00:00
Romain Beurdouche
aa2bebdeee fix(ldpctest): Confusion in sizes
The variable block_length had an ambiguous role and was used as both K and Kprime.
This was leading to arrays with wrong sizes and functions with wrong arguments.
Now there is not anymore block_length but K and Kprime.
Kprime can be set with the command line argument `-l`.

There was also some problems with array allocation for segments with length not divisible by 8.
A proper sizing with `((size_in_bits + 7) & ~7) / 8` was used.
A proper masking of the last byte containing payload bits was also added to keep filler bits to 0 after random initialization.
2025-02-04 13:30:38 +00:00
Romain Beurdouche
e6c802176d fix(nrLDPC_coding): Rename ldpc8blocks_coding_segment into ldpc8blocks
The name ldpc8blocks_coding_segment was previously used to avoid any confusion with ldpc8blocks while both were coexisting.
They are not anymore coexisting so it can now be shortened.
2025-02-04 12:34:11 +00:00
Romain Beurdouche
a5215ba047 fix(nrLDPC_coding): Apply clang-format to openair1/PHY/NR_TRANSPORT/nr_ulsch_decoding.c 2025-02-04 12:34:11 +00:00
Romain Beurdouche
4384021938 fix(nrLDPC_coding): Apply clang-format to openair1/PHY/NR_TRANSPORT/nr_dlsch_coding.c 2025-02-04 12:34:11 +00:00
Romain Beurdouche
c89cec2f0c fix(nrLDPC_coding): timers in DL encoding
While timers were available for rate matching and interleaving in the new interface,
these timers were not merged to rate matching and interleaving timers in nr_dlsch_coding.
2025-02-04 12:34:11 +00:00
Laurent THOMAS
43b981247e error-simd-intrinsic-name 2025-02-04 13:21:43 +01:00
francescomani
1a3512960a check if the slot selected is valid for DL/UL in dlsim/ulsim 2025-02-04 09:39:11 +01:00
francescomani
92fc1639e8 add FR2 ulsim test case 2025-02-04 08:38:51 +01:00
francescomani
a772f91053 add option to select slot in dlsim 2025-02-04 08:38:51 +01:00
francescomani
65cbcec57a fixes to allow FR2 dlsim test 2025-02-04 08:38:51 +01:00
francescomani
3bfb952989 rate matching formatting 2025-02-04 08:21:11 +01:00
francescomani
fc52fb8d24 compute_tbs_common formatting 2025-02-04 08:21:11 +01:00
francescomani
d791d03e05 fix to have correct maxMIMO_layers in dlsim computing tbslbrm 2025-02-04 08:21:11 +01:00
Thomas Schlichter
6b8a59cb68 gNB: add support for NTN parameter ta-CommonDrift-r17 2025-02-03 16:04:09 +00:00
Robert Schmidt
0053a3d0f4 Merge branch 'integration_2025_w05' into 'develop'
Integration: `2025.w05`

Closes #885

See merge request oai/openairinterface5g!3233

* !3102 Dockerized development environment
* !3185 Add IQ file recording and IQ file viewer to ImScope
* !3218 more layer1 cleaning
* !3224 Ensure execution of processSlotTX in order in NR UE
* !3231 Bugfix in frame and slot setting for ULSCH beam allocation
* !3229 Verify the integrity protection of the RRCReestablishment message
* !3230 FHI72: fix for single distributed antenna array for xran F release
* !2984 NAS 5GS refactor
* !3235 Parametrized JenkinsNode and JenkinsResource
* !2799 Changes to support multiple TDD patterns
* !3208 Downgrade gNB power limit LOG from "warning" to "debug"
2025-02-03 15:46:43 +00:00
Robert Schmidt
616c677536 Merge remote-tracking branch 'origin/avoid-powerlimit-flood' into integration_2025_w05 (!3208)
Downgrade gNB power limit LOG from "warning" to "debug"

Downgrade the UE power limited LOG from LOG_W to LOG_D. This is to avoid
flooding stdout when UE in low coverage enters power limited state for a
longer period of time. The same information can be inferred from the
periodic UE print which also contains PH value (negative PH values
indicate that the UE is power limited)

Also, correct some typos in PH calculation.

Closes #885
2025-02-03 08:33:23 +01:00
Robert Schmidt
1cb82bae20 Merge remote-tracking branch 'origin/Mult_TDD_Pattern' into integration_2025_w05 (!2799)
Changes to support multiple TDD patterns

- Updated the configuration changes for 2 Patterns
- Update the TDD table configuration for NFAPI
- Added the tdd bitmap for the period
- Adapted the bitmap for UL/DL for the multi TDD pattern
- Updated the RACH procedure for multi TDD pattern
- Updated DL and UL scheduler for multi TDD pattern
2025-02-03 08:32:02 +01:00
Robert Schmidt
1e3e695f52 Merge remote-tracking branch 'origin/nu-ci-colosseum-jenkins-update' into integration_2025_w05 (!3235)
Parametrized JenkinsNode and JenkinsResource

Parametrized variables in Jenkinsfile for automated tests on Colosseum
after update of OAI Jenkins server.
2025-01-31 22:32:04 +01:00
Robert Schmidt
e0865421b9 Merge remote-tracking branch 'origin/nr-ue-nas-improvements' into integration_2025_w05 (!2984)
NAS 5GS refactor

The goal of this MR is to reorganize the NR NAS code into:

- enc/dec library functions (5GS, 5GMM, 5GSM, NR_NAS_defs.h,
  nr_fgs_nas_lib.c)
- handlers and callbacks (nr_nas_msg.c)

The following changes are introduced:

1. migrate 5GS enc/dec lib (5GMM and 5GSM) to a dedicated folder
2. add a nested CMakeLists structure
3. refactor NR NAS enc/dec functions
4. refactor NR NAS messages struct definitions
5. remove most of dependency from NAS LTE
6. further refactor of PDU Session Establishment Accept processing to
   separate enc/dec from handling
7. made naming of 5GS definitions consistent whenever necessary
8. cleanup unused code
9. remove redundant struct definitions

Also:

1. fix decoding of AMF Set ID in 5G-S-TMSI UE identity
2. replace Byte_t directly with uint8_t
2025-01-31 22:29:31 +01:00
Robert Schmidt
70e70f6feb Merge remote-tracking branch 'origin/fhi72-f-release-fix-distributed-arr' into integration_2025_w05 (!3230)
FHI72: fix for a distributed antenna array for xran F release

in the Rx callback I reset the number of section descriptions/number of
fragments to 0, but for each antenna up to max number of antennas per
RU, instead of up to max number of distributed antenna array
2025-01-31 17:07:08 +01:00
Guido Casati
fcea7d9fbf Add pattern2 to TEST-SA-FR1-SC-FDMA-B200 CI test 2025-01-31 16:56:13 +01:00
vijay chadachan
fc6e205c89 Add documentation on TDD configuration
Co-authored-by: Robert Schmidt <robert.schmidt@openairinterface.org>
2025-01-31 16:56:13 +01:00
vijay chadachan
ca72b56c2c Add gNB configuration file pattern2 TDD configuration
Co-authored-by: Guido Casati <guido.casati@firecell.io>
2025-01-31 16:56:13 +01:00
vijay chadachan
4fc74c17ab Refactoring of is_xlsch_in_slot usage in MAC
* Remove the ulsch_slot_bitmap and dlsch_slot_bitmap from nrmac
* Adopt the new is_dl_slot/is_ul_slot functions in the stack
  to replace is_xlsch_in_slot: these functions are getting
  the DL and UL slots as they are set in the TDD configuration
  stored in tdd_slot_bitmap (frame_structure_t)
* Keep is_xlsch_in_slot in openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_phytest.c:
  this is necessary because the phy-test pre-processors are using the bitmaps
  dlsch_slot_bitmap and ulsch_slot_bitmap to check which DL/UL slots to use
  for transmission among those set in the TDD configuration

Co-authored-by: Guido Casati <guido.casati@firecell.io>
2025-01-31 16:51:19 +01:00
Guido Casati
529b142d75 Refactor servingNetworkName 2025-01-31 16:05:54 +01:00
Bartosz Podrygajlo
d44279a9a3 Fix PHR PH value to power headroom conversion. 2025-01-31 16:05:13 +01:00
Leonardo Bonati
474c004ff4 Parametrized JenkinsNode and JenkinsResource 2025-01-31 10:03:55 -05:00
Guido Casati
d6e2bf1651 Refactor registration accept decoding
previously we had decodeRegistrationAccept acting as a handler and calling
decode_registration_accept to do the decoding. However the logic was mixed
between the two functions, the naming was confusing and the code was hard
understand. The goal of this commit is to simplify the code, improve
readability and maintainability, while adapting the relevant function
to the new OAI NAS libs structure.

To this purpose:

* move enc/dec logic to NAS lib openair3/NAS/NR_UE/5GS/5GMM/MSG/RegistrationAccept.c -
  the logic of parse_allowed_nssai, get_allowed_nssai has been moved to
  decode_registration_accept and decode_nssai_ie
* add decode_nssai_ie and use it for both Allowed/Configured NSSAIs list (IE handling was added)
* do processing in the handler handle_registration_accept
* simplify the code by removing nested calls
* improve handling of PDU length

Currently only Registration Result, 5GS Mobile Identity, Allowed/Configured NSSAI
are decoded. The other optional IEIs are skipped (only the length is processed).
2025-01-31 16:02:04 +01:00
Bartosz Podrygajlo
1e667b379a Downgrade gNB power limit LOG from "warning" to "debug"
Downgrade the UE power limited LOG from LOG_W to LOG_D. This is to avoid flooding
stdout when UE in low coverage enters power limited state for a longer period of
time. The same information can be inferred from the periodic UE print which also
contains PH value (negative PH values indicate that the UE is power limited)
2025-01-31 15:59:45 +01:00
Bartosz Podrygajlo
fd20068f26 Deadlock avoidance in rfsimulator 2025-01-31 15:47:41 +01:00
Teodora
04bfabcbb1 F release: fix for a distributed antenna array
- in the Rx callback I reset the number of section descriptions/number of fragments to 0,
    but for each antenna up to max number of antennas per RU, instead of up to max number of a distributed antenna array
2025-01-31 12:12:06 +01:00
Robert Schmidt
85edbc8ec7 Merge remote-tracking branch 'origin/RRCReestablishment_integrity' into integration_2025_w05 (!3229)
Verify the integrity protection of the RRCReestablishment message
2025-01-31 08:07:26 +01:00
Robert Schmidt
44fe1175c2 Merge remote-tracking branch 'origin/NR_ULSCH_beam_allocation_bugfix' into integration_2025_w05 (!3231)
Bugfix in frame and slot setting for ULSCH beam allocation
2025-01-31 08:01:39 +01:00
Robert Schmidt
31c8ca9c53 Merge remote-tracking branch 'origin/process-slot-tx-in-order' into integration_2025_w05 (!3224)
Ensure execution of processSlotTX in order in NR UE

Make sure that processSlotTX is executed in slot order.

There is a bug that causes decoding error when processSlotTX is executed
out of order. The root cause is not known at this point, but this change
avoids the bug altogether.
2025-01-31 08:01:07 +01:00
Robert Schmidt
723acf7e60 Merge remote-tracking branch 'origin/more-layer1-cleaning' into integration_2025_w05 (!3218)
More Layer1 cleaning

Cleanup, see commits for info
2025-01-31 08:00:37 +01:00
Robert Schmidt
be6321c888 Merge remote-tracking branch 'origin/imscope-recorder' into integration_2025_w05 (!3185)
Add IQ file recording and IQ file viewer to ImScope

This changeset introduces the following changes to ImScope:

- Added the ability to record IQ data using the same mechanism as
  ImScope.
- Added a new executable target imscope_iq_file_viewer for viewing IQ
  files.
- Introduced a command line argument --imscope-record that enables data
  recording mode.
- Refactored a lot of the scope code

Usage:

- To record IQ data, run a modem with --imscope-record flag.  The
  recording happens whenever a modem calls dumpScopeData, which
  currently is done only in gNB on PUSCH DTX and PUSCH CRC NOK.  There
  is a limit of ~1GB of files written by the thread in a signle run to
  avoid accidentally exhausting disk space.  If a directory imscope-dump
  is available the data will be recorded there in .imscope files.
  Otherwise files are written to the directory the modem was run. This
  is done so that the directory can be mapped in a docker container.
- To view recorded IQ files, use the new executable
  imscope_iq_file_viewer. This can be done by running:

  ./imscope_iq_file_viewer <path_to_iq_file>

  Replace <path_to_iq_file> with the path to the IQ file you want to view.
2025-01-31 07:59:22 +01:00
Robert Schmidt
b34708fa77 Merge remote-tracking branch 'origin/docker-dev-env' into integration_2025_w05 (!3102)
Dockerized development environment

This commit introduces a fully dockerized dev env you can start on any
machine that has docker without installing any direct OAI dependencies
on host.

This allows to migrate development environments between machines easily.
Several complementary scripts were added to enable smooth transition
between your docker environment and host environment. Your user and sudo
should work inside the environment.

In its current state, the environment can be used to compile
nr-softmodem with 7.2 FHI but it cannot run it due to missing
dependencies.
2025-01-31 07:58:43 +01:00
Bartosz Podrygajlo
8ca0a80d17 Dockerized development environment
This commit introduces a fully dockerized dev env you can start on any
machine that has docker without installing any direct OAI dependencies
on host.

This allows to migrate development environments between machines easily. Several
complementary scripts were added to enable smooth transition between your docker
environment and host environment. Your user and sudo should work inside the
environment.
2025-01-31 07:50:01 +01:00
francescomani
7c93de87a4 lower layers to verify the integrity protection of the RRCReestablishment message 2025-01-30 18:20:17 +01:00
Laurent THOMAS
6d14ac735b remove dead commented code 2025-01-30 17:15:11 +01:00
Laurent THOMAS
62e8431c98 remove code obfuscation 2025-01-30 17:14:18 +01:00
Laurent THOMAS
25652c5a24 fix bad type in dci encoding 2025-01-30 17:14:18 +01:00
Laurent THOMAS
5416be3736 move byte2m128i in a more logical place 2025-01-30 17:14:10 +01:00
Laurent THOMAS
268172a435 pure bad code fix 2025-01-30 17:12:27 +01:00
Guido Casati
e842ca2631 Move assert up in decode_5gs_mobile_identity 2025-01-30 15:21:39 +01:00
Guido Casati
8260b2283c Do get_msg_type only once in nas_nrue 2025-01-30 15:21:39 +01:00
Guido Casati
918fcd2b6d Bugfix: 6 bits AMF set ID in decode_guti_5gs_mobile_identity
* the last 6 bits of the GUTI represent the AMF Pointer
* the AMF Set ID is 10 bits long
* the Registration Accept message received from the network contains the GUTI
  which, when properly decoded, will be used in any possible following Registration Request
2025-01-30 15:21:39 +01:00
Guido Casati
97521d21e5 Refactor mm_msg_encode 2025-01-30 15:21:39 +01:00
Guido Casati
3e27e53f52 Handle size in nas_protected_security_header_encode 2025-01-30 15:21:39 +01:00
Guido Casati
c37c5ad7ae Use macro NAS_INTEGRITY_SIZE in NAS 2025-01-30 15:21:39 +01:00
Guido Casati
611c055464 Refactor nas_security_rx_process
* use defines whenever possible
* introduce a switch to handle security type. Currently only integrity protected and ciphered
  is handled, however the idea of the switch is to make the code ready for the future when
  different security types will be handled and different actions should be taken based on that.
* define NAS_INTEGRITY_SIZE
2025-01-30 15:21:39 +01:00
Guido Casati
8b32e95d6a Define security header and security state enums and strings with available macros
* also, add security type NAS_SECURITY_NEW_SECURITY_CONTEXT
2025-01-30 15:21:39 +01:00
Guido Casati
384659ed54 Refactor capture_pdu_session_establishment_accept_msg
* the goal of this commit is to refactor capture_pdu_session_establishment_accept_msg
  into a decoding function
* PduSessionEstablishmentAccept.c is in the 5GSM library and shall only do encoding operations
* handling of PDU Session Establishment accept message is done in nr_nas_msg.c
* adopted new NAS decoding functions in the process
* improved QoS rules decoding
* convert getShort into a macro and add to NAS utils
2025-01-30 15:21:39 +01:00
Guido Casati
2e651ed21c Add NAS 5GS header decoding functions 2025-01-30 15:21:39 +01:00
Guido Casati
b07ddb1e57 Refactor generateServiceRequest
* simplified code, reduced conditional statements, reduced number of pointers
2025-01-30 15:21:39 +01:00
Guido Casati
2c5309f0f8 Add function to fill fgmm_msg_header_t type headers 2025-01-30 15:21:39 +01:00
Guido Casati
63d7f26cfd Refactor NAS 5GMM messages structs definitions
as per legacy code, the NAS functions in nr_nas_msg.c were encoding
the header in the plain header contained in MM_msg
(e.g. plain -> mm_msg -> header in fgs_nas_message_t). The same
header was encoded in the mobility management message contained
in the same struct (e.g. plain -> mm_msg -> registration_request
-> protocoldiscriminator). As this was more complicated than
necessary, the goal of this commit is to simplify the code and
improve readability. Namely:

* Refactor MM_msg into fgmm_nas_message_plain_t to contain
  (1) 5GMM Header
  (2) 5GMM Payload union
* Use fgmm_nas_message_plain_t and fgmm_nas_msg_security_protected_t
  in the 5GMM NAS procedures
* Remove NAS header IEs from 5GMM messages structs and use
  the header in fgs_nas_message_plain_t.
  This reduce also the repetitions of header members in each
  of the 5GMM messages structs.
* Rename struct to distinguish between 5GMM and 5GSM
* Remove fgs_nas_message_t and nas_msg_header_t,
  use directly basic 5GS struct definitions, simplify the code
* The callbacks in nr_nas_msg.c are now doing
  (1) encode header with the common NAS lib
  (2) encode contents with the 5GMM libs
* improve code readibility in the process
2025-01-30 15:21:39 +01:00
Guido Casati
9719f5e574 Add const attribute to NAS enc/dec functions 2025-01-30 15:21:39 +01:00
Guido Casati
08e3f2f0df Refactor generateRegistrationComplete
* replace encoding code with proper functions from the lib
* remove unnecessary header members in struct definition

this commit removes last enc/dec code in nr_nas_msg.c
2025-01-30 15:21:39 +01:00
Guido Casati
7810516596 Add equality check and error macro to NAS 2025-01-30 15:21:39 +01:00
Guido Casati
8a844efa49 Fix typo and rename NAS identity response 2025-01-30 15:21:39 +01:00
Guido Casati
2d75598851 Initial separation of enc/dec functions from handlers/callbacks
* move enc/dec definitions to NR_NAS_defs.h and add new lib file nr_fgs_nas_lib.c
  both used by nr_nas_msg.c
* move utility macros to fgs_nas_utils.h: this can be used in all the 5GMM, 5GSM lib files
* use nr_nas_msg.c for handlers/callbacks only, it should call the enc/dec
  functions in nr_fgs_nas_lib and in the 5GMM, 5GSM libs
* 5GMM, 5GSM libs should only do the enc/dec of the NAS message contents
2025-01-30 15:21:39 +01:00
Guido Casati
f73579ea41 Limit scope of NAS functions (static) 2025-01-30 15:21:39 +01:00
Guido Casati
ddad26effe Refactor includes in nr_nas_msg (.c/.h) 2025-01-30 15:21:39 +01:00
Guido Casati
27ed237300 Refactor NAS 5GS message type definitions
* move defines to openair3/NAS/NR_UE/nr_nas_msg.h as they are
  only used in nr_nas_msg.c
* made naming of all message types consistent, using the same
  prefix for all
2025-01-30 15:21:39 +01:00
Guido Casati
fb85ba7da3 Remove NAS/COMMON/nr_common.c and move servingNetworkName to nr_nas_msg.c
* the only function used from nr_common.c is servingNetworkName which is
  used in nr_nas_msg.c, so it was moved to the latter file and its scope
  was reduced
2025-01-30 15:21:39 +01:00
Guido Casati
03a4d8efb8 Refactor NAS 5GS (5GMM & 5GSM) structs definitions and their use
Every NAS 5GS message can have 3 different headers: (1) security protected
(2) 5GMM plain (3) 5GS plain;

According to 3GPP TS 24.501:
> 4.2 Coordination between the protocols for 5GS mobility management and 5GS session management
> A 5GS session management (5GSM) message is piggybacked in specific 5GS mobility management (5GMM) transport
> messages. To this purpose, the 5GSM messages can be transmitted in an information element in the 5GMM transport
> messages.

A PDU Session Establishment accept is a 5GSM message and as such it is contained in a 5GMM
transport message. The code in capture_pdu_session_establishment_accept_msg is reflecting this.
The message is thus expected to have: (1) Security protected 5GMM header (2) Plain 5GMM message
(3) 5GSM Payload Container (4) Plain 5GSM message.

5.4.5 of 3GPP TS 24.501: also says:

> The type of the payload is identified by the Payload container type IE and includes one of the following: a) a single 5GSM message;

Thus, a 5GSM is not the only possible payload of a NAS transport message.

This commit is focusing on the refactoring of the structs definitions and adaptation of the CMakeLists.

Based on the above:

* Move NR_NAS_defs.h to 5GS subfolder in NR_UE
* Move NAS FGS structs and definitions to NR_NAS_defs.h
* Rename mm_msg_header_t to fgmm_msg_header_t
* Remove duplicated NAS struct definitions
  (1) kept fgs_nas_message_security_header_t over security_protected_nas_5gs_msg_t
  (2) Kept fgsm_msg_header_t over fgs_sm_nas_msg_header_t
* Remove unused definitions, structs, functions in the process
2025-01-30 15:21:39 +01:00
Guido Casati
c0583be24e Migrated NAS 5GS (5GMM & 5GSM) to NR folders and refactor CMakeLists.txt files
This commit is introducing the following macro changes:

(1) Migrate NAS 5GS lib files to a new 5GS subfolder in NR_UE
    and organize NAS 5GS lib messages into 5GMM and 5GSM subfolders.
    A nested CMake structure was implemented and CMakeLists.txt were
    added whenever necessary. This is effectively separating 5GS
    libraries from LTE libraries.

(2) In order to simplify the separation of 5GS libs from LTE libs,
    remaining dependencies from NAS LTE (e.g. nas_ue_task.c, ue-idx-standalone)
    were removed in the process

(3) ExtendedProtocolDiscriminator.c/.h and SpareHalfOctet.c/.h were deleted
    and affected types were replaced with simple integer types

(4) Cleanup: unused definitions and libs (e.g. LIB_5GNAS_GNB)
    were removed

(5) Update doc/Doxyfile

(6) clang-formatted the migrated files in the process

(7) Update includes of headers in affected files
2025-01-30 15:17:30 +01:00
francescomani
bf238491ec fix in frame and slot for ULSCH beam allocation 2025-01-30 14:52:58 +01:00
Bartosz Podrygajlo
2ea6ac26bd Use a global "void_instruction" in imscope record thread
This avoids the issue of compare_exchange_weak always failing. The issue
was that `store()` is not equal to `exchange()`. `exchange` uses memory
copy while `store()` copies the value representation of the argument, which
is not always the same thing.
2025-01-28 16:55:53 +01:00
Bartosz Podrygajlo
30de011fa3 Add build_oai option for imscope_record 2025-01-28 16:55:42 +01:00
Bartosz Podrygajlo
c520a4e295 Refactor some scope macros
Use do {} while (0) for UEdumpScopeData/gNBdumpScopeData macro
2025-01-28 16:55:32 +01:00
Bartosz Podrygajlo
2198e31187 More updates to imscope IQ recorder
- Added event parameter for recording which is reflected in the filename
 - Added event in the UE for DLSCH NACK
 - Added program name to the filename for ease of identification
 - Reworked spinlock to use atomics
2025-01-28 16:55:25 +01:00
Bartosz Podrygajlo
c01adc5e00 Fix pdschRxdataF_comp scope for UE.
Correctly calculate the amount of data to be copied. Copy at correct offset.
Imporve error message in case data is insufficient.
2025-01-28 16:55:17 +01:00
Bartosz Podrygajlo
ab75a7ccfb Add IQ file recording and IQ file viewer to ImScope
This commit introduces the following changes to ImScope:
 - Added the ability to record IQ data using the same mechanism as ImScope.
 - Added a new executable target `imscope_iq_file_viewer` for viewing IQ files.
 - Introduced a command line argument `--imscope-record` that enables data recording mode.
 - Refactored a lot of the scope code

Usage:
 - To record IQ data, run a modem with `--imscope-record` flag.
   The recording happens whenever a modem calls dumpScopeData, which currently is
   done only in gNB on PUSCH DTX and PUSCH CRC NOK.
   There is a limit of ~1GB of files written by the thread in a signle run to avoid
   accidentally exhausting disk space.
   If a directory `imscope-dump` is available the data will be recorded there in .imscope
   files. Otherwise files are written to the directory the modem was run. This is done so that
   the directory can be mapped in a docker container.

 - To view recorded IQ files, use the new executable `imscope_iq_file_viewer`. This can be done by running:
      ```
      ./imscope_iq_file_viewer <path_to_iq_file>
      ```
   Replace `<path_to_iq_file>` with the path to the IQ file you want to view.
2025-01-28 16:54:54 +01:00
Bartosz Podrygajlo
4b9e70b2ba Fix 2 issues causing warning when compiling headers from g++ 2025-01-28 16:53:45 +01:00
Bartosz Podrygajlo
e1814f5340 Ensure execution of processSlotTX in order in NR UE
Make sure that processSlotTX is executed in slot order.
2025-01-28 11:42:38 +01:00
Guido Casati
e9ff628844 Add macros to deep copy and compare optional E1 IEs 2025-01-28 10:18:45 +01:00
Guido Casati
a0da096351 Fix equality check types in Bearer Context Setup Request/Response 2025-01-28 10:18:45 +01:00
Guido Casati
bf3b8b19ef Fix missing line break in e1ap.c 2025-01-28 10:18:45 +01:00
Guido Casati
92460a80cd Use is_mixed_slot in stack 2025-01-28 10:07:31 +01:00
vijay chadachan
0b7bee96cb Add scheduling utility functions to check UL, DL, and mixed slot types in TDD config
* is_ul_slot: returns `true` for UL or mixed slots
* is_dl_slot: returns `true` for DL or mixed slots
* is_mixed_slot: returns `true` for mixed slots

These functions use the TDD slot bitmap for slot type checks

Co-authored-by: Guido Casati <guido.casati@firecell.io>
2025-01-28 10:07:31 +01:00
vijay chadachan
eccd3e840e Take into account multi TDD patterns in RRC configuration
* take into account pattern2 in nr_rrc_config_dl_tda
* use get_tdd_period_idx in nr_rrc_config_ul_tda
* use get_first_ul_slot_multi_tdd in set_SR_periodandoffset

Co-authored-by: Guido Casati <guido.casati@firecell.io>
2025-01-28 10:07:31 +01:00
vijay chadachan
04f082a9a4 Adopt utility functions to get TDD configuration from frame_structure in MAC/RRC
* refactor set_ideal_period to use frame_structure from MAC
* use get_ul_slot_offset to assign slot offset to nth UE and adopt in
  updated config_csirs, configure_periodic_srs, set_csi_meas_periodicity

Co-authored-by: Guido Casati <guido.casati@firecell.io>
2025-01-28 10:07:31 +01:00
vijay chadachan
1d8a590328 Refactor nr_UE_is_to_be_scheduled to use new get_first_ul_slot function
Co-authored-by: Guido Casati <guido.casati@firecell.io>
2025-01-28 10:07:31 +01:00
Guido Casati
00f1d52f92 Rewrite get_first_ul_slot to use pattern configuration stored in frame_structure
* the function is returning the index of the first full UL slot in tdd_slot_bitmap
  or the first UL slot (including mixed) if the "mixed" flag is provided
2025-01-28 10:07:31 +01:00
Guido Casati
bebbc857a0 Add get_ul_slot_offset function to calculate nth UL slot offset for UE in TDD period
* the get_ul_slot_offset function calculates the offset of the nth uplink (UL) slot for a given UE index within a TDD period
* this function uses the frame structure bitmap to determine the UL slot positions
2025-01-28 10:07:31 +01:00
vijay chadachan
ae1a5a968b Refactor gNB_scheduler_uci.c (get_pucch_index, etc..) to use frame_structure stored in MAC
Co-authored-by: Guido Casati <guido.casati@firecell.io>
2025-01-28 10:07:31 +01:00
vijay chadachan
dbfcc1a7ef Refactor set_sched_pucch_list to use frame_structure in MAC
Co-authored-by: Guido Casati <guido.casati@firecell.io>
2025-01-28 10:07:31 +01:00
Guido Casati
3dca350f3e Limit scope of set_sched_pucch_list (static) 2025-01-28 10:07:31 +01:00
vijay chadachan
f4e4f2f7ba Refactor get_feasible_msg3_tda to use frame_structure in MAC
Co-authored-by: Guido Casati <guido.casati@firecell.io>
2025-01-28 10:07:31 +01:00
vijay chadachan
177732ca3a Refactor get_dl_tda and get_ul_tda to get TDD configuration stored in MAC
Co-authored-by: Guido Casati <guido.casati@firecell.io>
2025-01-28 10:07:31 +01:00
vijay chadachan
066559227d get_SIB1_NR: init pattern2 in sib1 servingCellConfigCommon if allocated in scc 2025-01-28 10:07:31 +01:00
vijay chadachan
f4d59dfd17 Get pattern2 configuration from configuration file and store in SCC
* allocate memory for pattern2 only if the IE is present (it is optional)
* fix scc (deallocate memory) when necessary

Co-authored-by: Guido Casati <guido.casati@firecell.io>
2025-01-28 10:07:31 +01:00
vijay chadachan
ad8930e2c4 Configure Frame Structure (including TDD) in MAC
* use config_frame_structure in config_common:
  - fill frame_structure in MAC and NFAPI Config Request
  - use get_tdd_period_idx to set periodicity index in Config Request
  - use config_tdd_patterns to fill tdd_period_config
  - use set_tdd_config_nr to complete NFAPI Config Request configuration

Co-authored-by: Guido Casati <guido.casati@firecell.io>
2025-01-28 10:07:31 +01:00
vijay chadachan
30f6da16f0 Refactor set_tdd_config_nr to use frame_structure_t and tdd_period_config_t
* assuming num_dl_slots and num_ul_slots are including also
  slots with dl/ul symbols respectively
* refactor set_tdd_config_nr
* moved function to MAC
* fill max_num_of_symbol_per_slot_list depending on slot type
* use new set_tdd_config_nr in stack
* minor refactor in config.c to improve readability (scs)

Co-authored-by: Guido Casati <guido.casati@firecell.io>
2025-01-28 10:07:30 +01:00
Laurent THOMAS
284b7af49c more comprehensive modulation lut table generation 2025-01-28 09:50:29 +01:00
Laurent THOMAS
f272d7d1cc set correct type on qpsk modulation table 2025-01-28 09:50:29 +01:00
Laurent THOMAS
c73353bed3 comprehensive dmrs reception and better cpu efficiency 2025-01-28 09:50:29 +01:00
vijay chadachan
421a690b42 Add frame_structure_t to gNB_MAC_INST 2025-01-28 09:42:45 +01:00
Guido Casati
c3a6700037 Implement MAC/RRC setter/getter functions to support multiple TDD patterns
* set_tdd_bmap_period, config_tdd_patterns: to configure TDD period, including bitmap, in the frame structure
* get_tdd_periodicity: to retrieve the periodicity in milliseconds for the given TDD pattern
* get_tdd_period_idx: to get the TDD period index based on pattern periodicities
* get_ul_slots_per_period: get the number of UL slots (including mixed with UL symbols) in period
* get_full_ul_slots_per_period: get the number of full UL slots in period
* get_dl_slots_per_period: get the number of DL slots (including mixed with DL symbols) in period
* get_full_dl_slots_per_period: get the number of full DL slots in period

Co-authored-by: vijay chadachan <vijay.chadachan@firecell.io>
2025-01-28 09:42:45 +01:00
vijay chadachan
9cf1ce7427 Add new TDD period and bitmap configuration structs definitions (nr_common.h)
Co-authored-by: Guido Casati <guido.casati@firecell.io>
2025-01-28 09:42:45 +01:00
Guido Casati
aa68e19ebd Add set_TimeDomainResourceAllocation and refactor nr_rrc_config_ul_tda
* allocate and configure NR_PUSCH_TimeDomainResourceAllocation in a separate function
* remove duplicated lines of code
* use in nr_rrc_config_ul_tda
* use calloc_or_fail
* clang-formatted
2025-01-28 09:42:45 +01:00
Guido Casati
97a575ffeb Reviewed NFAPI tdd_period definition in nfapi_nr_tdd_table_t
* added define for NFAPI_MAX_NUM_PERIODS
* enhanced comments
2025-01-28 09:42:45 +01:00
Robert Schmidt
64a472aef1 Merge branch 'integration_2025_w04' into 'develop'
Integration: `2025.w04`

Closes #876, #896, #875, #893, and #878

See merge request oai/openairinterface5g!3226

* !3198 remove a set of compile options that don't work anyway
* !3171 Refactor SCTP Association Response Handling and E1 connection loss at CU-UP
* !3023 usrp constant and slow derive timestamp
* !3215 Remove unused code
* !3192 fix nr phy-test mode in ntn
* !3214 fix(nrLDPC_coding_t2): Miscellaneous fixes related to T2
* !3020 use ML receiver for 64 QAM UL-MIMO
* Demote error logs to debug for "PUCCH not processed"
* !3217 minor improvements in T hacks
* !3199 Add a small FAPI Hex parser utility
* !3209 Remove most of m64 type usage
* !3211 Avoid huge calloc by alloc'ing TBs independently
* !3212 F1AP IDs: Allow AddMod, fix concurrency bug
* !3152 E1 Setup enc/dec library and unit test
* !2999 Repair nFAPI in 5G
* !3210 FHI72: FDD support
* !3220 Improve RA logs
2025-01-28 07:51:30 +00:00
Jaroslava Fiedlerova
7bd248e15d Merge remote-tracking branch 'origin/preamble-index-logs' into integration_2025_w04 (!3220)
Improve RA logs

Modify existing LOG entries to include preamble index, timing advance and
estimated distance from the gNB. This makes mapping RA attempts to
physical/simulated UEs easier via sent/received preamble index or physical
distance from the gNB in scenarios with >1 UE.
2025-01-27 16:15:10 +01:00
Jaroslava Fiedlerova
c7a90ed237 Merge remote-tracking branch 'origin/fhi72-fdd-mode' into integration_2025_w04 (!3210)
FHI72: FDD support

- harmonize DL/UL PRB mapping in one get_xran_prb_map() function with support
  of mixed slot and duplex mode
- do not assume TDD by default
2025-01-27 15:47:18 +01:00
Jaroslava Fiedlerova
699f2e5d81 Merge remote-tracking branch 'origin/nfapi-fixes' into integration_2025_w04 (!2999)
Repair nFAPI in 5G

Add 5G nFAPI in OAI/Make it it work.

Many commits in this branch are basically bug fixes of things that don't work
properly, such as

- check for correct conditions (e.g. instance numbers in the RAN context)
- remove artificial limitation (e.g. only one PUCCH per TDD period in the PNF)
- improve performance (reduce big mallocs, make some static buffers such as a
  global ring buffer for nFAPI messages in the PNF)
- fix bugs in nFAPI (e.g., increase maximum message size to ~64kB instead of
  1500 bytes, because the latter is way too small for many TX_data.requests in
  5G, and it will delay message arrival unduly)
- fix bugs in message enc/dec (e.g., handle FDD in config.request)
- adjust the L1 such that the condition "we run monolithic" is not necessery
  (e.g., some message numbers in nFAPI struct where reset in MAC, instead of
  L1, and this breaks when running the PNF)

There are instructions that explain how to set it up. Two CI tests have been
added, one with COTS UE and MIMO in DL+UL in TDD numerology 1 (30kHz), and a
second test with FDD mu=0 (15kHZ) in RFsimulator.

These were some old to-dos that have been addressed.

- test with COTS UE - 4x4 pipeline works good in DL, UL now also work
- test in RFsim
- make PNF status message
- make FDD in u0 work
2025-01-27 15:46:19 +01:00
Robert Schmidt
382820dce2 Rename 5G RFsim u0 25PRB title name: it's nFAPI now 2025-01-27 15:36:30 +01:00
Robert Schmidt
3ad9a43880 pnf_nr_p7_pack_and_send_p7_message(): don't use global buffer
This function packs P7 messages. At least RX_data.indication messages
might be much bigger than the global buffer that is used here. Allocate
the buffer on the stack, and make it bigger. Do not use the global
buffer, it's simply not necessary; increasing the global tx buffer size
might have negative effects elsewhere in the code.

That change might make the function reentrant. The mutex seems to only
guards the codec config. However, leave it to not introduce any
regressions as of now.
2025-01-27 15:36:30 +01:00
Robert Schmidt
377ff8970e Merge remote-tracking branch 'origin/e1-setup-encdec-tests' into integration_2025_w04 (!3152)
E1 Setup enc/dec library and unit test

This MR is adding a library for E1 Setup enc/dec functions:

- E1 CU-UP Setup Request
- E1 CU-UP Setup Response
- E1 Setup Failure

and relevant unit tests
2025-01-27 11:43:46 +01:00
Robert Schmidt
f6243e9078 Merge remote-tracking branch 'origin/f1-ue-data-no-assert' into integration_2025_w04 (!3212)
F1AP IDs: Add update, fix concurrency bug

I suspect a concurrency bug: For instance, during reestablishment, the
CU needs to update the DU UE ID under which the UE is identified in the
DU. Previously, the CU would remove, then add the DU UE ID info. At the
same time, the PDCP thread might look up the information. This can lead
to asserts. Modify the code to do the update under (one) lock.

Also, refactor some code.
2025-01-27 11:42:29 +01:00
Robert Schmidt
2cecffb02f Merge remote-tracking branch 'origin/fix-huge-malloc' into integration_2025_w04 (!3211)
Avoid huge calloc by alloc'ing TBs independently

Fix real-time problems on smaller machines due to big calloc(). See the
commit(s) for more details.
2025-01-27 11:40:53 +01:00
Robert Schmidt
6be898806e transform RFsim band 66 u0 test to nFAPI 2025-01-27 10:59:40 +01:00
Robert Schmidt
c553173677 Modify 4x4 60MHz COTS UE test to use nFAPI
Modify the existing 4x4 60MHz USRP+COTS UE test to use nFAPI. The
throughput tests remain the same.
2025-01-27 10:59:40 +01:00
Robert Schmidt
03b63257f2 Add documentation for nFAPI 2025-01-27 10:59:40 +01:00
Robert Schmidt
48d52fdf42 Consolidate 2 gnb-vnf configs in 1 2025-01-27 10:59:40 +01:00
Robert Schmidt
970eb04a84 Remove hardcoding of numerology in VNF
Similar to the parent commit, make the numerology in the VNF
configurable. Unlike for the PNF change, the VNF frame/slot info is in a
per-PNF connection structure to which the "oai_integration" code has no
access. So we need to hack the nfapi_vnf_p7_add_pnf() function signature
to take the numerology, to be able to save this on a per-PNF basis.

The fact that we store this on a per-PNF basis is not strictly required,
as the VNF cannot handle multiple numerologies as of now, either.
However, we might want to extend this in the future, so it seems prudent
to store this on a per-PNF basis, so that we could start handling
multiple numerologies at the L2 without the need to change the L1 or
nFAPI code itself.

Also, the numerology is not needed except for some code that deals with
timing over nFAPI. As of now, we don't use this code (nFAPI gets a
trigger every slot, as per the VNF request, see an earlier commit in
this series), but also here, let's not make the future more complicated
by storing the numerology for each PNF now (this could always be reverted).

For 4G, put numerology 0 (15kHZ SCS), which is the SCS that LTE uses.
2025-01-27 10:59:40 +01:00
Robert Schmidt
58f2f9b3d7 Remove hardcoding of numerology in PNF
Fill in the dynamically received numerology, and make the numerology at
the PNF configurable, following the changes in the parent commit.

The change for the reading is somewhat of a hack, because nFAPI, as of
now, does not really foresee to store the numerology, so we fill the
numerology during the start request, when the numerlogy has been
received in the config request, but at that time, the structure for the
time information (frame/slot) does not exist yet.
2025-01-27 10:59:40 +01:00
Robert Schmidt
3a1cd7480e Adjust slot length based on numerology for proper timing 2025-01-27 10:59:19 +01:00
Robert Schmidt
f7617f8c9b nFAPI time conversion: handle numerologies flexibly
At both the PNF and the VNF, introduce a separate numerology field, and
pass the numerology when converting time information using macros from
nfapi_interface.h. The actually numerology is still hardcoded to 1 (as it
was before), but the follow-up commits will put a suitable numerology.

In both cases, but the numerology next to the frame/slot information.
2025-01-27 10:59:19 +01:00
Robert Schmidt
abe77333b1 L1-emul UE: Make independent of numerology
Similarly as the parent commit(s):
- remove hardcoding to specific numerology
- avoid conversion when we don't need it
2025-01-27 10:59:19 +01:00
Robert Schmidt
08ddce4750 Make independent of numerology: no time conversion macros
Similar as the parent comment, remove time macros. In this particular
case, we can just pass the exact frame/slot information, instead of
squeezing it in a single integer.
2025-01-27 10:59:19 +01:00
Robert Schmidt
e051c9bb0c Simplify code: no time conversion macros necessary
The next commits will modify the time macros used in the 5G nFAPI code
to handle different numerologies. As a preparation, remove all the
usages of these macros where they really don't matter (e.g., don't
convert if we don't need to).
2025-01-27 10:59:19 +01:00
Robert Schmidt
5435585b13 Remove original nfapi patch file
This file is 8y old. It does not seem to serve any purpose. Remove it.
2025-01-27 10:59:19 +01:00
Robert Schmidt
d028cab7ae add header guards 2025-01-27 10:59:19 +01:00
Robert Schmidt
871311d986 config.request: handle FDD 2025-01-27 10:59:19 +01:00
Robert Schmidt
29ce2e5e7f phy_nr_slot_indication(): Remove useless code: it does nothing 2025-01-27 10:59:19 +01:00
Robert Schmidt
0659148d85 Print sfn/slot directly 2025-01-27 10:59:19 +01:00
Robert Schmidt
956ffe4751 aerial_phy_nr_slot_indication(): Remove useless code: it does nothing 2025-01-27 10:59:19 +01:00
Robert Schmidt
1337245d94 PNF: provide some logging of stats 2025-01-27 10:59:19 +01:00
Robert Schmidt
6145f02b81 Function decls to make LTE compile 2025-01-27 10:59:19 +01:00
Robert Schmidt
06a76c3bbc PNF: Deliver DL_TTI.req/TX_data.req only pairwise to L1
the L1 needs both a PDU (in TX_data.req) as well instructions for
the actual transmission (in DL_TTI.req) to encode a PDSCH message. In
nFAPI, it can happen that a DL_TTI.request message has been received
(configuring the PDSCH transmission), without the TX_data.request having
reached the PNF. The L1 assumes to have the PDU.

To avoid problems, ensure that only the pair of DL_TTI.req/TX_data.req
is delivered. Otherwise, drop either message.
2025-01-27 10:59:19 +01:00
Robert Schmidt
77837c7428 Remove unnecessary and long hexdump 2025-01-27 10:59:19 +01:00
Robert Schmidt
63159d3f87 sockaddr_in no memset 2025-01-27 10:59:19 +01:00
Rúben Soares Silva
10c5178bfb Add configuration files for nFAPI split with RFSim and 100MHz 2025-01-27 10:59:19 +01:00
Robert Schmidt
dee68e6319 nFAPI: increase maximum segment size to 65000
nFAPI has a mechanism to segment messages that are too big for transport
over a given medium (see e.g. SCF 225, section 2.3.2).

The maximum segment size of 10000 makes that for larger payloads, e.g.
TX_data.request, many small segments are to be sent. This can create or
increase delays on the transport. On the other hand, the currently only
available transport mechanism, UDP, allows to transport packets of up to
almost 65535 bytes. Correspondingly, increase the maximum segment size
so that less segments are to be created, and potentially, less delay is
to be incurred.  # Please enter the commit message for your changes.
Lines starting
2025-01-27 10:59:19 +01:00
Robert Schmidt
b5276bdb6d nFAPI log: cleanly separate tv_sec/tv_nsec for readability 2025-01-27 10:59:19 +01:00
Robert Schmidt
099804078e pnf_p7_slot_ind(): Fix warning and simplify (no need for slot_ahead) 2025-01-27 10:59:19 +01:00
hsum
6e210e15f1 Handle DL_TTI.request more efficiently
Same as parent.

Co-authored-by: hsum <ming-hong.hsu@eurecom.fr>
Co-authored-by: chenyi <Yi-Quan.Chen@eurecom.fr>
Co-authored-by: Rúben Soares Silva <rsilva@allbesmart.pt>
2025-01-27 10:59:19 +01:00
hsum
cba2f92c8a Handle UL_TTI.request more efficiently
Same as parent.

Co-authored-by: hsum <ming-hong.hsu@eurecom.fr>
Co-authored-by: chenyi <Yi-Quan.Chen@eurecom.fr>
Co-authored-by: Rúben Soares Silva <rsilva@allbesmart.pt>
2025-01-27 10:59:19 +01:00
chenyi
282ee77104 Handle ul_dci.request more efficiently
Same as parent commit.

Co-authored-by: hsum <ming-hong.hsu@eurecom.fr>
Co-authored-by: chenyi <Yi-Quan.Chen@eurecom.fr>
Co-authored-by: Rúben Soares Silva <rsilva@allbesmart.pt>
2025-01-27 10:59:19 +01:00
Robert Schmidt
10beee4fd6 Handle tx_data.request efficiently
Avoid delays in tx_data.request handling by avoiding big malloc()s and
copy operations. Reimplement function to (1) peek the frame/slot
numbers, (2) decide on buffer, and (3) unpack directly into
pre-allocated memory.

Co-authored-by: hsum <ming-hong.hsu@eurecom.fr>
Co-authored-by: chenyi <Yi-Quan.Chen@eurecom.fr>
Co-authored-by: Rúben Soares Silva <rsilva@allbesmart.pt>
2025-01-27 10:59:19 +01:00
Rúben Soares Silva
8da4e92189 Provide check_nr_nfapi_p7_slot_type()
Some messages might arrive for the wrong slot; in those cases, the
message has to be dropped. The next commits will make use of this
functionality.
2025-01-27 10:59:19 +01:00
Rúben Soares Silva
d6b8fe93ab Provide peek_nr_nfapi_p7_sfn_slot() for fast msg dec
The next commits refactor the rx handling of messages in the PNF. To
efficiently handle them, provide a "peek()" function that gives us the
frame/slot for which a message is destined. This allows to decide if a
message is on time and select a destination buffer, before unpacking it
completely, avoiding copies.
2025-01-27 10:59:19 +01:00
chenyi
17e36029fa Fix PMI condition: avoid division by zero 2025-01-27 10:59:19 +01:00
Robert Schmidt
a1190f9fd0 nFAPI: give more time for messages to arrive, make it work
The time that a message between PNF/VNF to arrive depends mostly on the
transport. To allow for some delays, there is a slot_ahead time, during
which the VNF is allowed to schedule and send instructions to the PNF.

This can be multiple slots; the 1ms hitherto given might typically too
short. Increase to 10ms, to encompass a wider range of slot_ahead times.

Make the corresponding log message of when old (stale) message are
removed a bit clearer with respect to times.

This is the first commit in which nFAPI works. Follow-up commits improve
performance.
2025-01-27 10:59:19 +01:00
Robert Schmidt
32363ccaad Remove usage of emulate_l1 flag at gNB
The usage of this flag in the L1 is simply wrong: either, the NFAPI mode
runs L1, or not. Correspondingly, add an assert to check this invariant.

In the NR_IF_module, the correct check to do is for VNF (implying no L1,
or "emulation of L1" [which is not true]), in which case we use
queues.
2025-01-27 10:59:19 +01:00
Robert Schmidt
3fcfef9006 L1 DLSCH: don't preallocate memory, improve log
The L1 receives a pointer to the L1 payload to use for PDSCH generation.
This would overwrite an existing pre-allocated pointer. Remove this
preallocation. Instead, allocate it in the simulator (the only place
that actively uses this buffer allocation; in nr-softmodem, it's lost by
assigning a pointer). Allocate with an extra byte, because the payload
(in bits) might not be a multiple of 8 bits/1 byte, so the CRC is in the
last 3 bytes.

Also, improve the log with frame/slot information if the PDSCH payload
pointer is NULL.
2025-01-27 10:59:19 +01:00
hsum
195b23bdc4 Refactor is_nr_p7_request_in_window function for clarity and efficiency
The function now utilizes simpler variable names and logic to determine
if a given NR P7 request falls within the timing window.

The logic for determining if a request is within the timing window is as follows:
- The function calculates the absolute difference between the current
  and received SFN slots, taking into account the possibility of
  wraparound.
- If the absolute difference is greater than half of the maximum SFN
  slot value, it subtracts this difference from the maximum SFN slot
  value to get the actual difference.
- The function then checks if this difference is less than or equal to
  the specified timing window. If it is, the request is considered to be
  within the window.

Additionally, the commit updates the function signature to return a
boolean value for better readability and consistency.

Changes made:
- Simplified variable names for readability
- Improved logic for handling wraparound scenarios
- Updated function signature to return a boolean value

Co-authored-by: Rúben Soares Silva <rsilva@allbesmart.pt>
2025-01-27 10:59:19 +01:00
Robert Schmidt
267be0afc1 Remove huge memset that is pointless 2025-01-27 10:59:19 +01:00
Robert Schmidt
7949b622be RACH.indication: don't check time window
Since commit defc97ec16 ("Msg2 and Msg3 at gNB: check allocation before
committing to Msg2"), the scheduler calculate Msg2/Msg3 frame/slot
before allocation of Msg2, and not when receiving Msg1. It also respects
the RA response window correctly.

Correspondingly, we don't need to calculate here if the RACH.indication
is within the time window. The scheduler will do this.
2025-01-27 10:59:19 +01:00
Robert Schmidt
6cdea81e4a Reduce PNF nFAPI logs 2025-01-27 10:59:19 +01:00
hsum
65bc677fc3 Ensure equal PNF timing pace
If VNF and PNF are deployed through different processes, it's crucial to
maintain synchronization and ensure smooth operation. This commit
addresses the need to keep the VNF slot ahead of 2 (as required for
network deployment), while ensuring that PNFs wait appropriately to
avoid overtaking the slot. Specifically, this involves measuring slot
duration and implementing a wait mechanism to ensure that PNFs do not
exceed a slot duration of 300 microseconds. This ensures proper smooth
operation, especially in the case of RFsim.
2025-01-27 10:59:19 +01:00
Robert Schmidt
10afbef473 reset nFAPI message count in PNF
Reset the counters. In monolithic, this happens in the scheduler; in the
PNF, without this change, it would trigger PDCCH again.

Co-authored-by: hsum <ming-hong.hsu@eurecom.fr>
2025-01-27 10:59:19 +01:00
Robert Schmidt
50aec62b40 pnf_p7_slot_ind(): don't trigger UL_tti_req twice
This is already triggered in the same function.
2025-01-27 10:59:19 +01:00
Robert Schmidt
63c1b3df03 pnf_p7_slot_ind(): avoid memleak 2025-01-27 10:59:19 +01:00
Robert Schmidt
15b08a362f Refactor pnf_phy_ul_dci_req() et al. to use common code
Refactor pnf_phy_ul_dci_req(), pnf_phy_dl_tti_req(),
pnf_phy_tx_data_req(), pnf_phy_ul_tti_req(), to use L1 functions to
"load" L1 jobs to be executed, via L1 functions.
2025-01-27 10:59:19 +01:00
Robert Schmidt
a32ada76c7 Workaround for sched_response in PNF
In monolithic, the sched_response mechanism ensures that FAPI messages
for one slot are not overwritten by scheduler instructions for the
following slots (i.e., it is like a memory allocation pool).

The allocation happens in nr_schedule_response(), not used by the PNF.
Hence, only deallocate when in monolithic.

The PNF uses a big ring buffer over all slots in a frame to ensure the
same.
2025-01-27 10:59:19 +01:00
Robert Schmidt
82f8c38d74 nr_schedule_response(): split out UL_dci_req into separate function 2025-01-27 10:59:19 +01:00
Robert Schmidt
28fb982cb9 nr_schedule_response(): Split out ul_tti_req into separate function 2025-01-27 10:59:19 +01:00
Robert Schmidt
f2229adba3 nr_schedule_response(): make right order (222.10.0x "API message order") 2025-01-27 10:59:19 +01:00
Robert Schmidt
4fe8d3cd8e nr_schedule_response(): break up in separate dl_tti_req + tx_req phases 2025-01-27 10:59:19 +01:00
Robert Schmidt
6a630f4646 nr_schedule_response(): Separate dlsch_fill into DL_tti_req and TX_req part
FAPI sends those independently, so we cannot treat both on the arrival
of the first one.
2025-01-27 10:59:19 +01:00
Robert Schmidt
c37bf20501 nr_schedule_response() is not used in VNF, only monolithic 2025-01-27 10:59:19 +01:00
Robert Schmidt
73478ca27e pnf_p7_slot_ind(): Handle messages in FAPI 222.10.0x order 2025-01-27 10:59:19 +01:00
Robert Schmidt
70474ad130 PNF: don't send dummy data
If nothing is to be sent, nothing is to be done.
2025-01-27 10:59:19 +01:00
Robert Schmidt
c7e145a471 pnf_p7_slot_ind(): needs to use TX thread time
This function applied an sf_ahead, bigger than the actual slot
indication message sending (so a message could NEVER arrive on time!).
Reduce to zero, because this is when it should arrive for us.
2025-01-27 10:59:19 +01:00
Robert Schmidt
16ead1d001 nr_slot_select() and set_tdd_config_nr(): remove useless second frame
FAPI says these lists should be for MAX_TDD_PERIODICITY (which is maybe
a frame, or a TDD period? but likely not two frames). Reduce to one
frame.

Also, the nFAPI code assumes one entire frame, so use that (this commit
necessary to actually make the PNF work, otherwise, the
packing/unpacking of the FAPI message would need to do 2 frames).

Closes: #876
2025-01-27 10:59:19 +01:00
Robert Schmidt
28b60edaa2 Use posix_memalign() for pnf_p7_t creation
Some L1 functions might get a pointer to P7 structures, and use SIMD in
which case the memory access needs to be aligned.
2025-01-27 10:59:15 +01:00
Rúben Soares Silva
3fb20d960b Call trigger_scheduler defined in nfapi_vnf.c instead of redefining it 2025-01-27 10:59:15 +01:00
Robert Schmidt
e3bad16ab8 Call indication regularly
Upon reception of FAPI UL messages (e.g., RACH.indication), those
messages are put into queues, to be delivered in a single call,
NR_UL_indication(). Call the scheduler to trigger processing in UL.

Note that ideally, these queues should not exist at all, and messages
should just be delivered asynchronously, as this would lead to less
copying of messages. Currently, we fulfill the scheduler interface
instead.

Important! Trigger UL after having run DL scheduler and sent the
messages, to ensure short delay between Slot.indication, and the
response to those messages.
2025-01-27 10:59:15 +01:00
Robert Schmidt
531726633a Call directly into scheduler from VNF, start immediately
The previous designs seems to do:

    loop {
      poll_ind_queue()
      if (msg)
        scheduler;

      pselect() on messages;
      handle_message {
        if slot_ind
          put_ind_queue()
      }
    }

So basically, we artificially put a queue for slot indications in the
middle, but still handle it in the same thread(!). This for some reason
results in a big slow down if the PNF runs faster.

Now, we just do pselect(), waiting for messages. We handle the slot
indication immediately (the schedule should take some microseconds),
then return to pselect().
2025-01-27 10:59:15 +01:00
Robert Schmidt
412446077f IF module slot_indication: send message in PNF
Use this function to implement distinct behavior for monolithic or PNF:

- monolithic: run the scheduler, as normal
- PNF: send a slot indication; the VNF will send an answer which the PNF
  will handle elsewhere.

Add function declarations to make nr_ulsim compile, as NR_IF_Module.c is
part of the MAC sources. As of now, this is necessary; I think the right
way would be to take NR_IF_Module.c out of the MAC, and make this a
"glue" library that sticks L1 and L2 together, in monolithic (in VNF, in
that case, we should not link in L1, and for the PNF not the L2,
creating separate executables... Rome was not built in one day).
2025-01-27 10:59:15 +01:00
Robert Schmidt
c5a76d6654 Remove unnecessary handle_nr_slot_ind()
the slot indication is sent from the tx_thread (tx_func()). Thus, we
don't need to send it a second time.
2025-01-27 10:59:15 +01:00
Robert Schmidt
84d92ac820 Prevent memory leak, use stack for slot indications 2025-01-27 10:59:15 +01:00
Robert Schmidt
9f80c82f54 Only use refcount if monolithic
There is a reference counting mechanism used in monolithic. It does not
apply for the PNF.
2025-01-27 10:59:15 +01:00
Robert Schmidt
9634593da7 Don't call L1 code in VNF
The VNF should never call into the L1, it's L2/L3, by definition. Also,
it's not necessary.
2025-01-27 10:59:15 +01:00
Robert Schmidt
1b44f6448b Allow to use multiple PUCCH at once
We are required to store multiple PUCCH (e.g., for multiple UEs).
However, nr_fill_pucch() automatically freed the previously active PUCCH
structure. Of course(!) this does not make sense.

However, the problem is that init_nr_transport() allocated only one
PUCCH structure. Also this does not make sense to me. The problem was
that slot_ahead was 0, which logically cannot happen in this function
(because slot_ahead is illogical, we must give the radio some time). The
reason is that it uses if_inst->sl_ahead, which, prior to this commit,
was not set.

The init_nr_transport() function is called normally from main() through
init_eNB_afterRU(). In this case, we initialize if_inst->sl_ahead to
what is set in main(). In the PNF case, however, we call
init_nr_transport() from the PNF thread, when receiving the start
request. In the main(), we wait for this to happen, before setting
if_inst->sl_ahead. Hence, initializing this variable (which we should
safely be able to do) before solves the problem.
2025-01-27 10:59:15 +01:00
Robert Schmidt
84d9df501d No special handling for PNF for RX procedures
See also a later commit "Allow to use multiple PUCCH at once", in which
PUCCH handling in the case of PNF is reworked.

We might squash both commits.
2025-01-27 10:59:15 +01:00
Rúben Soares da Silva
a6b40ace23 Assign NFAPI_NR_CONFIG_SLOT_CONFIG_TAG tag in TLVs used for transmitting the TDD Slot configuration through CONFIG.request. 2025-01-27 10:59:15 +01:00
Robert Schmidt
4ceac17cd5 Shorten the sleep
sync_var is set in main() (which likely is wrong in that the L1 code
sync itself, and not require the help of main()).
2025-01-27 10:58:42 +01:00
Robert Schmidt
dd3b3caf32 Sync PNF through the radio
The radio gives the clock. Therefore, we do not need to keep the time
separately in the PNF.

Also, the VNF should not run the ru_thread, as this is an L1 thread.
2025-01-27 10:43:57 +01:00
Robert Schmidt
604cfe8709 Request timing every slot
This is to align with monolithic/FAPI, where we get slot indications in
each slot. In the nFAPI, this is replaced by timing information, such
that the VNF ticks automatically, and gets indications from the PNF on
early/late messages. The timing information handling is not implemented
in the present nFAPI implementation. Instead, we adopt the FAPI behavior
and send timing information in every slot, abusing it to be a slot
indication.
2025-01-27 10:43:57 +01:00
Robert Schmidt
ce0737fc9d Remove double-add of PNF connection
There is no need to add the PNF in nr_start_resp_cb(), because it has
already been done in nr_param_resp_cb(). This might be wrong, because 4G
does it only in nr_start_resp_cb(), but for the moment, since it is also
used in nr_param_resp_cb(), avoid the double add.
2025-01-27 10:43:47 +01:00
Robert Schmidt
d4715fdeca Add PNF to VNF's list of PNFs when IP available
The same function is called in nr_start_resp_cb(), why there and not here?

At reception of nr_param_response, we receive the remote PNF information
on PNF/VNF. We have to store it.

In nr_start_response, it might not be correct and/or can be taken out.
The next commit will remove it.
2025-01-27 10:42:42 +01:00
Jaroslava Fiedlerova
f3e5ab1060 Merge remote-tracking branch 'origin/remove-most-of-m64-type-usage' into integration_2025_w04 (!3209)
Remove most of m64 type usage

MMX instructions were first SIMD version, the registers management is complex
(_mm_empty()) so, it is better to remove it now and use more recent instructions

anyway, gcc/clang should replace it automatically as long as we enable sse2,
that should always be the case but for code understanding and for ARM porting
for example, it is better to explicitly remove it
2025-01-27 10:35:20 +01:00
Jaroslava Fiedlerova
10392b5da2 Merge remote-tracking branch 'origin/nfapi-parser' into integration_2025_w04 (!3199)
Add a small FAPI Hex parser utility

Adds a small FAPI hex parser utility nfapi_hex_parser, that takes in a FAPI
message hexdump, either from the command line or a file, unpacks it and prints
the contents out to the console.

The functions to print the data to the console were added alongside the existing
utility functions, for both P5 and P7 messages.

This allows the user to quickly check if a message has the valid format to be
unpacked in OAI.

The file examples.md contains some examples of execution and output.

This utility is compiled alongside the NFAPI_LIB, as such, it is compiled
whenever we compile nr-softmodem, or any other target that uses the NFAPI_LIB.
2025-01-27 10:32:59 +01:00
Jaroslava Fiedlerova
5512a48fbd Demote error logs to debug for "PUCCH not processed"
As per https://gitlab.eurecom.fr/oai/openairinterface5g/-/issues/896#note_148540,
these logs can be ignored.

Closes: #896
2025-01-27 09:32:49 +01:00
Robert Schmidt
84c69e5064 Avoid huge calloc by alloc'ing TBs independently
Prior to this this commit, the structure NR_UE_info_t is 4881632 bytes.
On some machines, e.g., one of the CI systems, this can lead to realtime
problems when doing the initial calloc() of the data structure.

Commit e586efb29d ("Enable 32 HARQ
Processes in DL, UL") introduced the real-time problems by increasing
the number of HARQ processes.

The reason NR_UE_info_t is that big is that it contains buffers for DL
HARQ data that might need to be retransmitted (the L1 is stateless, it
cannot store this for the L2). To reduce the size, dynamically allocate
the DL HARQ buffers when they are needed. This also reduces the size of
NR_UE_info_t to 15840 bytes.

Encapsulate transportBlock in byte_array and accessory functions, and
allocate in big chunks of multiple of ~32kB.

Reported-By: Cedric Roux <cedric.roux@eurecom.fr>
Fixes: e586efb29d
Closes: #875
2025-01-27 07:47:38 +01:00
Robert Schmidt
8eca2e0591 Correctly link function
ran_func_kpm.c uses cp_ba_to_str(), but it is not defined in OAI. Define
it so we can link properly, instead of relying on FlexRIC (where it was
defined).
2025-01-27 07:45:39 +01:00
Robert Schmidt
febeaa7181 F1AP IDs: Add update method to fix concurrency bug
Introduce function cu_update_f1_ue_data() which does remove+add under
one lock. This fixes a concurrency bug. For instance, during
reestablishment, the CU needs to update the DU UE ID under which the UE
is identified in the DU. Previously, the CU would remove, then add the
DU UE ID info.  At the same time, the PDCP thread might look up the
information. This can lead to asserts. Use the above addmod
functionality to do the remove-add under a mutex.

Modify test to verify this works as expected.
2025-01-24 16:09:10 +01:00
Jaroslava Fiedlerova
7520218195 Merge remote-tracking branch 'origin/t-hacks-small-improvement' into integration_2025_w04 (!3217)
minor improvements in T hacks
2025-01-24 16:06:19 +01:00
Robert Schmidt
ffb3354d49 Verify cu/du_add_f1_ue_data() success in stack 2025-01-24 15:39:43 +01:00
Laurent THOMAS
b999177810 remove MMX instruction usage in polar decode 2025-01-24 15:29:28 +01:00
Robert Schmidt
f0ab268393 Revert "F1AP IDs: Allow AddMod, fix concurrency bug"
This reverts commit 6d5e29f5ae.
2025-01-24 15:23:06 +01:00
Jaroslava Fiedlerova
266076897c Merge remote-tracking branch 'origin/qam64_mimo_ML' into integration_2025_w04 (!3020)
use ML receiver for 64 QAM UL-MIMO

Change condition on MMSE/ML selection to include 64QAM for ML UL-MIMO receiver.
Only 256QAM will now use MMSE UL-MIMO receiver.
2025-01-24 11:32:37 +01:00
Jaroslava Fiedlerova
706aecf22b Merge remote-tracking branch 'origin/fix_t2_harq_combined_offset' into integration_2025_w04 (!3214)
fix(nrLDPC_coding_t2): Miscellaneous fixes related to T2

1. HARQ combined offset:
The offset provided for each code block in the HARQ combined input and output
buffer shall not be above 512. A modulus was performed on the offset of the TB
in the buffer to avoid this situation. But the offset of the code block was
added afterward so that the total offset was sometimes going above 512.This
commit performs the modulus after adding the code block offset. Usually this
issue was triggering a segfault after less than 2 minutes of an iperf test on
some setup using T2. The same iperf test was successfully performed during 10
minutes on the same setup with this change.

2. Properly stop LDPC coding in gNB and UE:
LDPC coding was yet not properly stopped by using free_nrLDPC_coding_interface
in gNB and UE. This was not causing major issue until now. It was especially not
causing any issue with T2 LDPC coding using the PF. But using T2 VFs, if the
coding library is not properly stopped then the VF cannot be used anymore unless
the admin app is restarted. So this MR adds the missing free_nrLDPC_coding_interface.
2025-01-24 11:30:13 +01:00
Jaroslava Fiedlerova
3231b0bcfc Merge remote-tracking branch 'origin/ntn-phytest-mode' into integration_2025_w04 (!3192)
fix nr phy-test mode in ntn

Following SIB19 MR !3019 (merged), the phy-test mode is no longer working
In this MR we update the handling NTN-Config from ServingCellConfigCommon
to be the same as when NTN-Config is received in SIB19

More details: !3019 (comment 145103)
2025-01-24 11:28:32 +01:00
Guido Casati
124f4ab9c5 Improvements to rrc_gNB_process_e1_setup_req
* add const atttribute to input message
* use malloc_or_fail
2025-01-24 11:13:17 +01:00
Guido Casati
5ea432c081 Use CU-UP E1 Setup Failure enc/dec lib in stack 2025-01-24 11:13:17 +01:00
Guido Casati
75b238633c Add test for E1 CUUP Setup Failure 2025-01-24 11:13:17 +01:00
Guido Casati
beb74b3e62 Add GNB-CU-UP E1 Setup failure enc/dec library 2025-01-24 11:13:14 +01:00
Rúben Soares Silva
b1d7bbf1a2 Add dump procedures fir UL_TTI.request PDUs
Add examples of UL_TTI.request to examples.md
Small fix on printing RNTI on DL_TTI.request PDSCH PDU on RNTI field
2025-01-24 10:05:49 +00:00
Jaroslava Fiedlerova
c0a0de3e63 Merge remote-tracking branch 'origin/remove-unused-code' into integration_2025_w04 (!3215)
Remove unused code
2025-01-24 09:31:14 +01:00
Jaroslava Fiedlerova
03420b112e Merge remote-tracking branch 'origin/fix-bug-usrp-constant-derive' into integration_2025_w04 (!3023)
usrp constant and slow derive timestamp

Sample write reorder function doesn't handle properly the clock shift.

It keeps the same time origin forever, so, if the clock sifts in one direction,
we finish to reach the maximum time shift that was designed for slot to slot
maximum shift.

We may also consider if this function is useful: gNB and UE currently ensure Tx
in order because there are other issues above if we let Tx preparation run out
of order in separate threads

Closes #893
2025-01-24 09:27:30 +01:00
Laurent THOMAS
ef3b99a263 remove MMX instruction usage in threegpplte_turbo_encoder_sse() 2025-01-23 21:18:26 +01:00
Laurent THOMAS
e106ec6d91 remove m64 type and a very basic cleaning of LTE ulsch_decoding 2025-01-23 21:18:26 +01:00
Robert Schmidt
4d6b95a155 FHI72: Remove numerology limitation, allow to run mu=0 2025-01-23 18:26:47 +01:00
Robert Schmidt
61b8217a15 FHI72: handle FDD in xran_fh_rx_read_slot() 2025-01-23 18:16:28 +01:00
Jaroslava Fiedlerova
2da68f6056 Merge remote-tracking branch 'origin/e1ap-issue-878' into integration_2025_w04 (!3171)
- Refactor SCTP Association Response Handling
  - Unified function for both CU-CP and CU-UP handling
  - CU-CP: Notifies RRC of E1 connection loss with CU-UP
  - CU-UP: Initiates a new SCTP association request to regain E1 connection
  - this fix will prevent issue #878 from happening

- Send list of PDU Session Resources to Failed Setup in the (PDU Session
  Resource/Initial Context) Setup Response
  - depending on different failure scenarios
  - e.g. (#878) when No CU-UP is associated and still the CU-CP receives a PDU
    Session Setup Request
  - add relevant functions to handle NGAP Setup Response messages with failed
    list of items
  - this is an extra failure handling to make #878 is handled if it ever happens
    again

- NGAP Cause Refactoring
  - Refactor struct for NGAP cause group and value
  - Add extended radio network cause enumeration values
  - Refactor redundant code into a new NGAP cause encoding function

- Minor logging, function descriptions improvements

Closes #878
2025-01-23 17:50:55 +01:00
Jaroslava Fiedlerova
4f5cb2408c Merge remote-tracking branch 'origin/remove-legacy-compile-option' into integration_2025_w04 (!3198)
A user on the mailing list was confused by a wrong flag in CMakeList.txt
so, I remove this and a set of others that are known not working.
2025-01-23 17:48:42 +01:00
Guido Casati
f3890dcd2a Completed GNB-CU-UP E1 Setup failure according to 9.2.1.6 of 3GPP TS 38.463 2025-01-23 17:37:52 +01:00
Guido Casati
b2f5f216cd Add E1AP cause enum definition 2025-01-23 17:37:52 +01:00
Guido Casati
5176199aa2 Use GNB-CU-UP E1 Setup Response enc/dec lib in stack 2025-01-23 17:37:52 +01:00
Guido Casati
5b4a45b694 Add test for E1 CUUP Setup Response 2025-01-23 17:37:52 +01:00
Guido Casati
422e82df70 Add GNB-CU-UP E1 Setup Response enc/dec lib 2025-01-23 17:37:50 +01:00
Guido Casati
763c265c42 Extend CU-UP E1 Setup Response according to 9.2.1.5 of 3GPP TS 38.463 2025-01-23 17:37:02 +01:00
Guido Casati
02e1c3589b Use E1 CU-UP Setup Request enc/dec lib in stack 2025-01-23 17:34:03 +01:00
Guido Casati
8fbfcf48f6 Add test for E1 CUUP Setup Request 2025-01-23 17:34:03 +01:00
Guido Casati
414fc2e9a2 Add E1 CU-UP Setup Request enc/dec lib 2025-01-23 17:34:00 +01:00
Cedric Roux
fc4cc9ef55 T: update list of mandatory libraries 2025-01-23 16:57:43 +01:00
Cedric Roux
28a08786bb T hacks: time_meas: add a periodic tracing mode
Useful to debug realtime issues, for example when calling a periodical
routine, if it's not programmed carefully enough, it may be that the first
call takes way longer than the next ones (for example it uses some memory
that is not mapped in the process, leading to many page faults the first
time it's executed).

Having a periodic log for the timing of this routine with min/avg/max/count
will reveal that a call is way longer than average and will help in
finding where exactly in the code the time is spent, thanks to the ease
of use of the T tracer; you put T(T_XX, T_INT(1)) just before the code
you want to measure, you put T(T_XX, T_INT(0)) just after and time_meas
will show the delta time between those events. Then you cut the routine
in smaller pieces, measure with T(1)/T(0), and you finally reach the small
guilty part that takes too long.
2025-01-23 16:57:43 +01:00
Cedric Roux
44637de3b2 T hacks: minor bugfix: don't log more than once
In time_meas.c, when getting 0 for the event, we log delta time with
previous 1 for the event. "start_valid" was not cleared, so receiving
a second 0 without 1 in between may lead to wrong logging.

Should not happen in practice, but still, little bug.

(Note: we don't protect against streams of 1, but this case should also
not happen.)
2025-01-23 16:57:43 +01:00
Cedric Roux
e6ce301e83 T hacks: minor: remove executable when doing 'make clean' 2025-01-23 16:57:43 +01:00
Bartosz Podrygajlo
803c9c349a Add distance in meters to RA print in gNB 2025-01-23 16:32:31 +01:00
Bartosz Podrygajlo
ad04800b20 Add preamble_index to gNB and UE logs 2025-01-23 16:29:29 +01:00
Rúben Soares Silva
1451f30b93 Add a small FAPI Hex parser utility
Add utility functions to print the FAPI messages contents
Add dump functions for DL_TTI.request PDUs, remaining message structures to be finished
Add file examples.md with some examples on how to use nfapi_hex_parser
2025-01-23 13:34:24 +00:00
Robert Schmidt
c4b57963ee Add some documentation on debug flags/dump 2025-01-23 14:15:51 +01:00
Laurent THOMAS
536b5d8760 Clean up logging module debug flags
cleanup debug/dump flags by avoiding repetitions in the source code and
enable compiler checks. Add a help text if we set a wrong debug trace
option.
2025-01-23 14:12:29 +01:00
Laurent THOMAS
ca37e0c123 Clean up NAS code, remove unused compile options 2025-01-23 14:12:06 +01:00
Laurent THOMAS
d68a8b51e6 Remove unused PHY_MEX compile option 2025-01-23 14:11:13 +01:00
Laurent THOMAS
0f970326c2 Remove unused UESIM_EXPANSION compile option 2025-01-23 14:10:50 +01:00
Laurent THOMAS
17bb19c7be Remove unused LOCALIZATION compile option 2025-01-23 14:10:33 +01:00
Laurent THOMAS
b0734604e9 Remove useless RRC states 2025-01-23 14:10:16 +01:00
Laurent THOMAS
a54eba8fe0 Remove commented code and unused type definitions 2025-01-23 14:08:17 +01:00
Laurent THOMAS
fb2f893954 Remove unused static inline function 2025-01-23 13:57:36 +01:00
Laurent THOMAS
a8f6563060 remove a complex and not very usefull trace in replay_node 2025-01-23 10:35:49 +01:00
Laurent THOMAS
e7e01f753a remove unsed LUT 2025-01-23 10:35:49 +01:00
Laurent THOMAS
eac35f07a5 Usrp constant and slow derive timestamp
Co-authored-by: Thomas Schlichter <thomas.schlichter@iis.fraunhofer.de>
2025-01-23 10:22:31 +01:00
Robert Schmidt
1dd71b51e1 Properly implement PNF/VNF list find
maybe take this out
2025-01-22 18:29:55 +01:00
Robert Schmidt
f4862fe23b Avoid buffer overflow: initialize for multiple PRACH FD occasions
Maybe cosmetic
2025-01-22 18:29:55 +01:00
Robert Schmidt
4132fcc597 Place NFAPI waiting after RU init; don't wait for F1 if in PNF
harmonize with monolithic
2025-01-22 18:29:55 +01:00
Rúben Soares Silva
90435ccba8 Change init_eNB_afterRU to configure L1 according to proper amount.
Now uses RC.nb_nr_L1_inst instead of RC.nb_nr_inst in order to configure the L1, since in PNF RC.nb_nr_inst is always 0, and so, it wouldn't configure the L1
2025-01-22 18:29:55 +01:00
Rúben Soares Silva
c910d9f71f Change Assert condition to allow configuration when in PNF mode. 2025-01-22 18:29:55 +01:00
Robert Schmidt
e0aaa8fa5e Update nFAPI configs
Rename configs according to name guidelines. Put into right directory.
2025-01-22 18:29:50 +01:00
Robert Schmidt
337faca6f5 log changes
Remove useless message bytes printing

Print message if callback missing

less newlines in log

logs
2025-01-22 15:04:46 +01:00
Robert Schmidt
e0549de9ea Remove Slack integration for Jenkins jobs 2025-01-22 14:37:22 +01:00
Sagar Arora
3090d0414e fix(ci): waiting for a pod using k8s wait command
Signed-off-by: Sagar Arora <sagar.arora@openairinterface.org>
2025-01-22 11:06:26 +01:00
Robert Schmidt
d999ed2beb Merge remote-tracking branch 'origin/new-jenkins' into develop (!3213)
chore(ci): Move to new Jenkins and Openshift Cluster

- Update helm-charts with new node roles
- Add resource definition in physim helm-charts to easily schedule them
  on different cluster servers
- Update entitlement creation methodology
- Add namespace for aerial pipeline
2025-01-21 16:07:00 +01:00
Jaroslava Fiedlerova
829541dc36 CI: temporary commit to use Ubuntu image in FHI7.2
Due to HW version differences between the CI RHEL build machine and
the FHI 7.2 test machine (cacofonix), FHI 7.2 test using  RHEL image
failed, reporting an 'Illegal Instruction' error.
2025-01-20 18:07:30 +01:00
Guido Casati
6cfa3e3722 Add E1AP Interface Management lib files 2025-01-20 13:48:47 +01:00
Guido Casati
c0db34077a Explicitly include the mandatory IE cn_support in the E1 Setup Request
* this commit is making explicit the mandatory IE cn_support
  in the E1 Setup Request message
* also, init cn_support in E1 Setup Request initial message preparation
2025-01-20 13:45:29 +01:00
Guido Casati
0cd4aeee5b Add E1 CU-CP Setup Request type
* E1 CU-CP Setup Request is an E1 Interface Management message
  whose type defition was missing, and it is introduced in this commit
  (see 9.2.1.7 of 3GPP TS 38.463)
2025-01-20 13:38:53 +01:00
Guido Casati
334537aa98 Add comments to clarify that E1AP Setup Request refers to GNB-CU-UP E1 Setup Request 2025-01-20 13:28:56 +01:00
Jaroslava Fiedlerova
592b9a3509 CI: Update CN path for CI CN deployments on OC 2025-01-20 12:42:02 +01:00
Guido Casati
9fe045f40e Add abnormal conditions section to E1-design.md 2025-01-20 09:59:57 +01:00
Romain Beurdouche
38a38e0eaf fix(nrLDPC_coding_t2): Properly stop LDPC coding in gNB and UE
LDPC coding was yet not properly stopped by using free_nrLDPC_coding_interface in gNB and UE.
This was not causing major issue until now. It was especially not causing any issue with T2 LDPC coding using the PF.
But using T2 VFs, if the coding library is not properly stopped then the VF cannot be used anymore unless the admin app is restarted.
So this MR adds the missing free_nrLDPC_coding_interface.
2025-01-20 08:10:42 +00:00
Guido Casati
beee87cdf6 Add check on CU-UP association before sending any E1 Bearer Context Modification Request 2025-01-17 18:07:02 +01:00
Sagar Arora
5cc026a4d0 define image name via helm set parameter
Signed-off-by: Sagar Arora <sagar.arora@openairinterface.org>
2025-01-17 14:34:22 +01:00
Sagar Arora
a33796217d chore(ci): entitlement creation and namespace for aerial pipelines
Signed-off-by: Sagar Arora <sagar.arora@openairinterface.org>
2025-01-17 14:34:09 +01:00
Thomas Schlichter
0fd5130573 NR UE: remove unused elements tx_wait_for_dlsch and rx_offset from nr_rxtx_thread_data_t 2025-01-17 11:40:09 +00:00
Thomas Schlichter
a2eaacf2bd remove unused element harq from LDPC encoder_implemparams_t 2025-01-17 11:40:09 +00:00
Thomas Schlichter
45dfcbe6cd remove unused global variable sl_ahead 2025-01-17 10:59:39 +00:00
Thomas Schlichter
0b4b6b952d remove unused rt_profiling 2025-01-17 10:59:28 +00:00
Romain Beurdouche
0d3008c244 fix(nrLDPC_coding_t2): HARQ combined offset
The offset provided for each code block in the HARQ combined input and output buffer shall not be above 512.
A modulus was performed on the offset of the TB in the buffer to avoid this situation.
But the offset of the code block was added afterward so that the total offset was sometimes going above 512.
This commit performs the modulus after adding the code block offset.
2025-01-17 10:55:03 +00:00
Sagar Arora
75f6f3ca6f chore(ci): update build configs for new openshift cluster
Signed-off-by: Sagar Arora <sagar.arora@openairinterface.org>
2025-01-17 10:29:20 +01:00
Sagar Arora
50f2c2a3dd chore(ci): update helm charts for new openshift cluster
- remove sub-chart name from global.nodeName to allow removing
global nodeName parameter

Signed-off-by: Sagar Arora <sagar.arora@openairinterface.org>
2025-01-17 10:28:13 +01:00
Teodora
f1076605f2 FDD mode support in 7.2
- extend get_xran_prb_map() function to handle mixed slot
  - properly fill PRB configuration based on DL/UL direction and duplex mode
  - do not implicitly assume TDD
2025-01-16 21:34:53 +01:00
Robert Schmidt
6d5e29f5ae F1AP IDs: Allow AddMod, fix concurrency bug
Modify xu_add_f1_ue_data() to be xu_addmod_f1_ue_data(), i.e., "addmod"
behavior in which it is possible to also update f1_ue_data. I do it this
way since an xu_updade_f1_ue_data() function would be almost the same as
the add function (only deleting existing data, whereas the original
add() was asserting in that case).

Modify tests to test for this behavior.

This fixes a concurrency bug. For instance, during reestablishment, the
CU needs to update the DU UE ID under which the UE is identified in the
DU. Previously, the CU would remove, then add the DU UE ID info.
At the same time, the PDCP thread might look up the information. This
can lead to asserts. Use the above addmod functionality to do the
remove-add under a mutex.
2025-01-16 16:50:58 +01:00
Robert Schmidt
c7dc71e66d Add test for CU F1AP ID data 2025-01-16 15:38:20 +01:00
Robert Schmidt
e2bf9fb0a4 F1AP IDs: refactor common insert 2025-01-16 15:22:59 +01:00
Robert Schmidt
253fffe7fb F1AP IDs: refactor common code 2025-01-16 15:15:47 +01:00
Teodora
72d5c77e3b Harmonize DL/UL PRB mapping in one get_xran_prb_map() function
- the parameters used in DL/UL are exactly the same, except the direction and the number of PRBs;
    therefore, passing the direction seems convenient for visibility purposes and reduces the code.

Note: Number of PRBs we store in fh_config for both DL/UL is num_rb_dl of openair0_config struct.
At the end, it is actually the same info.
2025-01-16 13:40:10 +01:00
Badescu, Ciprian
2924d18ebe Fix ntn phy-test mode
Following SIB19 MR !3019, the phy-test mode is no longer working
In this MR we update the handling NTN-Config from ServingCellConfigCommon
to be the same as when NTN-Config is received in SIB19
2025-01-16 13:27:18 +02:00
Robert Schmidt
10e07bc67f Merge branch 'integration_2025_w03' into 'develop'
Integration: `2025.w03`

See merge request oai/openairinterface5g!3206

* !3167 remove calls to clear SIMD registers, that was a historical issue
* !3179 UE statistics improvements
* !3193 Remove spinlock from threadpool task return
* !3195 UE MAC: in phy-test/do-ra, fill TB randomly
* !3201 T tracer: minor fixes for compilation
* !3204 CI: Increase number of test trials for timing tests
* !3034 Delay compensation for PUCCH2
* !3205 Fix calculation of RSSI in pucch_rx.c
2025-01-16 07:47:02 +00:00
Robert Schmidt
998d8c9480 Merge remote-tracking branch 'origin/pucch-rssi-fix' into integration_2025_w03 (!3205)
Fix calculation of RSSI in pucch_rx.c

Fix two issues with RSSI calculation in PUCCH:

- RSSI was calculated using partial sum instead of average of squared samples.
- There was a missing parentheses pair which causes the RSSI value to underflow.

The proper way to calculate power in dBFS is

    let signal_energy = average of squared samples of received signal over resource elements, antennas and symbols under measurement

then:

    rssi[dBFS] = -10log10(max_sample^2 / signal_energy),

or (to avoid division):

    rssi[dBFS] = -(10log10(max_sample^2) - 10log10(signal_energy))
2025-01-15 22:07:31 +01:00
Robert Schmidt
55220c3919 Merge remote-tracking branch 'origin/ci-physim-adjust' into integration_2025_w03 (!3204)
CI: Increase number of test trials for timing tests

- Increasing a number of test trials aims to reduce variations and
  improve reliability of the nr_ulsim and nr_dlsim test results.
- Disable CPU sleep states on the machine when running physims.
- Minor adjustment of timing threshold in 60 MHz phytest.
2025-01-15 18:35:47 +01:00
Robert Schmidt
a20d229b6b Merge remote-tracking branch 'origin/pucch2-delay-compensation' into integration_2025_w03 (!3034)
Delay compensation for PUCCH2

- Implementation of delay compensation for PUCCH2, which minimizes for
  exampe logs "reported RSRP index XXX invalid"
- Adding a test to the CI to perform the delay compensation in PUCCH2
- Refactor code to use c16_t data type in PUCCH decoder
2025-01-15 18:34:53 +01:00
Robert Schmidt
284a0edea7 Merge remote-tracking branch 'origin/minor-t-compilation-fixes' into integration_2025_w03 (!3201)
T tracer: minor fixes for compilation

only fixing some hacks tools, no functional change in main programs, no
need to test anything.
2025-01-15 15:05:31 +01:00
Robert Schmidt
356aec9aa4 Merge remote-tracking branch 'origin/phytest-ue-random-data' into integration_2025_w03 (!3195)
UE MAC: in phy-test/do-ra, fill TB randomly

See commit description for more details.
2025-01-15 15:05:03 +01:00
Robert Schmidt
77ddc36236 Merge remote-tracking branch 'origin/tpool-nospinlock' into integration_2025_w03 (!3193)
Remove spinlock from threadpool task return

The idea to use atomic aligned to cache line for counting finished jobs
is reused, but instead of polling a semaphore was added.
2025-01-15 15:04:37 +01:00
Robert Schmidt
a4bbf9e513 Merge remote-tracking branch 'origin/UE_log_improv' into integration_2025_w03 (!3179)
UE statistics improvements
2025-01-15 15:04:19 +01:00
Robert Schmidt
876343e7f8 Merge remote-tracking branch 'origin/remove-_mm_empty' into integration_2025_w03 (!3167)
remove calls to clear SIMD registers, that was a historical issue

This works because gcc/clang replaces the MMX calls by SSE2 automatically.

There are some mm_empty() calls in bad places (places where we don't use
_m64) and it is lacking in places where we still use _m64. Given that
MMX calls are converted to SSE2, there is no problem, and we will remove
remaining _m64 variables.
2025-01-15 15:02:09 +01:00
Jaroslava Fiedlerova
85b163b6b9 CI: Adjust timing thresholds in timing-phytest pipeline
CI test sometimes fails because measured value is lower than allowed
threshold.
2025-01-15 14:44:39 +01:00
Jaroslava Fiedlerova
9b6f1be163 CI: disable sleep states of CPU for running timing tests
Enable sleep states once the test is done.
2025-01-15 14:44:35 +01:00
Jaroslava Fiedlerova
69195457d7 CI: Increase number of test trials in nr_ulsim/nr_dlsim timing test
Increasing a number of test trials aims to reduce variations and
improve reliability of the nr_ulsim and nr_dlsim test results.
2025-01-15 14:43:42 +01:00
Bartosz Podrygajlo
7bd048e6af Fix calculation of RSSI in pucch_rx.c
Fix two issues with RSSI calculation in PUCCH:
 - RSSI was calculated using partial sum instead of average of squared samples.
 - There was a missing parentheses pair which causes the RSSI value to underflow.
   The proper way to calculate power in dBFS is

    let signal_energy = average of squared samples of received signal over resource
     elements, antennas and symbols under measurement

    then:
     rssi[dBFS] = -10log10(max_sample^2 / signal_energy),
    or (to avoid division):
     rssi[dBFS] = -(10log10(max_sample^2) - 10log10(signal_energy))
2025-01-15 13:49:05 +01:00
Bartosz Podrygajlo
0657ab2275 Remove spinlock from threadpool task return
The idea to use atomic aligned to cache line for counting finished jobs
is reused, but instead of polling a semaphore was added
2025-01-14 15:17:19 +01:00
Guido Casati
9e9bd278a9 Minor: RCconfig_NR_CU_E1 function description and logging 2025-01-14 14:13:49 +01:00
Guido Casati
bcd1270237 Refactor SCTP association response handler
* this function is used by both CU-CP and CU-UP
* it behaves differently depending on the type of E1 instance:
  CU-CP: inform RRC of E1 connection loss with CU-UP
  CU-UP: trigger a new SCTP association request by sending an ITTI to the CU-UP task
* after receiving the E1AP register request, the CU-UP will send a new association request to
  SCTP until new E1 connection is achieved by sending a TIMER_HAS_EXPIRED message to the CU-UP
  task. The function e1apHandleTimer() is basically triggering a new E1 association request
  until new E1 connection is achieved
* print SCTP association state in e1ap.c whenever needed

Related to #878
2025-01-14 14:13:49 +01:00
Guido Casati
b922fd2649 Clean up NGAP Setup Failure messages: there's no such message in 3GPP TS 38.413
* the list of PDU Session Resources Failed to Setup shall be sent in the Response message
2025-01-14 14:13:49 +01:00
Guido Casati
a1abf90d5b Handle PDU Session Resource to Setup Failure in (PDU Session Resource/Initial Context) Setup Response
* add function to check whether cu-up is connected
* add functions to send the relevant response messages with the failed list
  e.g. to fill PDU Session Resource Failed to Setup items
* set return value of trigger_bearer_setup to bool and handle the
  failure by sending setup response messages with list of PDU sessions failed to setup
  i.e. send failed list of items when no CU-UP is associated to the CU-CP
  note: it considers all PDU Sessions as failed to setup in the considered failure scenarios
* e.g. send a list of failed PDU session resources in the response message to reject
  PDU Session Resource Setup in rrc_gNB_process_NGAP_PDUSESSION_SETUP_REQ
* the Initial Context Setup has a Failure message, but for the considered failure scenario
  when no CU-UP is available the current design is just sending a list of failed to setup
  items in the Response message
* transfer PDU Session Resource/Initial Context Setup Request NAS PDU to UE

closes #878
2025-01-14 14:13:49 +01:00
Guido Casati
f00a7a0197 Refactor NGAP cause
* new struct definition including both NGAP cause group and value
* add encoding function, temporarily in ngap_common.c
  (in the long term to be place in a enc/dec NGAP library)
* extend Radio Network cause enum values
* add cause member to Setup Failure
2025-01-14 14:13:49 +01:00
Cedric Roux
c77874d64e T tracer: minor fixes for compilation 2025-01-14 11:51:41 +01:00
Laurent THOMAS
48226d10bf add cpu measurement option in nr_pucchsim 2025-01-14 11:34:22 +01:00
rmagueta
dc5f4bf868 Apply delay compensation only when delay is different from 0 2025-01-14 11:34:22 +01:00
Laurent THOMAS
6384517c01 Better code for PUCCH2 decoding 2025-01-14 11:34:22 +01:00
rmagueta
bf69131c21 Add CI test for delay compensation in PUCCH2 2025-01-14 11:34:22 +01:00
rmagueta
39a50faa6e Delay compensation for PUCCH2 2025-01-14 11:34:22 +01:00
Laurent THOMAS
f919246121 remove part of code using _m64 type (so old mmx instructions) 2025-01-14 10:07:59 +01:00
Laurent THOMAS
ba27aefe4e add some const and remove dead code 2025-01-14 10:07:31 +01:00
Laurent THOMAS
7d0c89185c gcc warning on #define duplicated 2025-01-14 10:07:31 +01:00
Laurent THOMAS
d5c72cf843 remove a race condition in viberti_lte and a useless global table 2025-01-14 10:07:30 +01:00
Laurent THOMAS
a0d6057294 remove calls to clear SIMD registers, that was a historical issue 2025-01-14 10:06:06 +01:00
Robert Schmidt
b96dfadae9 Fix compilation problem when defining ENABLE_MAC_PAYLOAD_DEBUG
Reported-by:  Abdo Gaber <abdo.nasser.ali.gaber@emerson.com>
2025-01-14 08:03:54 +01:00
Robert Schmidt
f7d3b72851 Merge branch 'integration_2025_w02' into 'develop'
Integration: `2025.w02`

Closes #866 and #887

See merge request oai/openairinterface5g!3197

* !3135 replace a set of #define by a C bit array, remove duplicated extern global variable declaration
* !3173 nrLDPC_coding: improvements
* !3181 Use UL actor for processSlotTx
* !3186 chore(ci): improved errors messages visibility
* !3101 NR gNB improvements for analog beam management
* !3130 NR gNB MSG3 TPC
* !3175 Improvements for PUSCH per symbol processing
* !3177 CI: change frequency for timing and B200-SABOX pipelines
* !3188 NR UE fix DCI mask size
* !3119 Config files improvements for PRACH
* !3196 Fix yaml example config file
* !3187 nrLDPC_coding: Fix naming, comments, superfluous variables and documentation typos in coding library interfaces
* !3076 move UL_INFO structure allocation local to a rx slot processing
* !3189 fhi_72: allow to provide dpdk_iova_mode to xran
* !3182 RSSI threshold for PUSCH & PUCCH power control
* !3103 Introduce ITTI queue in RRC-to-MAC direction
2025-01-13 14:13:42 +00:00
Robert Schmidt
959bb59f35 Merge remote-tracking branch 'origin/rssi-thres' into integration_2025_w02 (!3182)
RSSI threshold for PUSCH & PUCCH power control

To prevent ADC railing or "clipping" when the received power is too
large, introduce RSSI threshold parameters for PUSCH and PUCCH, which
are now configured in units of 0.1 dB. Here is how you can configure and
use these thresholds:

1. Configuration:
   - Set the pusch_RSSI_Threshold and pucch_RSSI_Threshold parameters in
     your configuration file (e.g., gnb.conf) (MACRLC section).
   - These parameters define the maximum acceptable RSSI values for
     PUSCH and PUCCH, respectively. The unit is either dBm or dBFS,
     depending on the RSSI reporting configuration.

2. Usage:
   - The nr_limit_tpc function will automatically adjust the Transmit
     Power Control (TPC) commands based on the configured RSSI
     thresholds.
   - If the RSSI exceeds the threshold, the TPC command will be limited
     to prevent further increase in power, thereby avoiding ADC
     clipping.
2025-01-13 10:10:29 +01:00
Robert Schmidt
72aaf45fa8 Merge remote-tracking branch 'origin/race-ue-rrc-mac' into integration_2025_w02 (!3103)
Introduce ITTI queue in RRC-to-MAC direction

resolve ue rcc to mac race conditions by a itti queue, but it doesn't
resolve the problem of exact slot we should apply the new cell
configurtion
2025-01-13 10:10:07 +01:00
Robert Schmidt
4dfbd0dd9e Merge remote-tracking branch 'origin/oran-iova-config' into integration_2025_w02 (!3189)
fhi_72: allow to provide dpdk_iova_mode to xran

- Introduce a gNB configuration option that enables users to select the
  desired IOVA mode for DPDK ("PA" or "VA") with dpdk_iova_mode
  parameters in fhi_72 configuration section. If not set, the default
  remains PA mode to ensure backward compatibility with existing
  configurations. Detailed information about IOVA modes, including their
  advantages and disadvantages, can be found in the DPDK documentation:
  Memory in DPDK Part 2: Deep Dive into IOVA
- Using IOVA VA mode allows DPDK to run without requiring SYS_ADMIN
  capability for the docker container.
- Switch to IOVA VA mode in the FHI7.2 pipeline and reduce the required
  capabilities for the docker container.
2025-01-13 07:46:47 +01:00
Robert Schmidt
39d9d32eda Merge remote-tracking branch 'origin/local-UL_INFO' into integration_2025_w02 (!3076)
Move UL_INFO structure allocation local to a rx slot processing

UL_INFO is allocated a gNB, so require mutex and obscur information
passing function to function.  Instead, make a local UL_INFO per slot,
removing the mutex and making the code easier to understand.
2025-01-13 07:46:05 +01:00
francescomani
9d9902d883 apply ITTI queue to SIB19 2025-01-10 18:28:27 +01:00
Laurent THOMAS
b4bc7c96ba Move UL_INFO structure allocation local to a rx slot processing
Use UL_INFO on the stack, to simplify the code.  move in the same struct
the associated rach, pdu, crc, srs arrays that where pointed from
directly in gNB structure Keep in nfapi the existing logic that make
malloc for theses rach, pdu, crc, srs array lists

Pass only relevant fields, where appropriate.

Co-authored-by: Robert Schmidt <robert.schmidt@openairinterface.org>
2025-01-10 18:05:58 +01:00
Robert Schmidt
189396aac2 Merge remote-tracking branch 'origin/nrLDPC_coding_improvements_2' into integration_2025_w02 (!3187)
nrLDPC_coding: Fix naming, comments, superfluous variables and documentation typos in coding library interfaces

This MR is clarifying the interfaces to the LDPC coding libraries.  It
aims to improve the readability of the interfaces and compliance of
naming with specification 38.212.
2025-01-10 18:00:35 +01:00
Robert Schmidt
818a3f9318 Merge remote-tracking branch 'origin/Fix_yaml_example_config_file' into integration_2025_w02 (!3196)
Fix yaml example config file

amf_ip_address is decoded as a paramlist_def_t and not as a paramdef_t,
so in the config file it should be a list of ip addresses

In current develop just by trying to run this config file with:

    sudo ./nr-softmodem -O ../../../targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.usrpb210.yaml

results in a segfault.
2025-01-10 17:59:24 +01:00
Robert Schmidt
299b63b4ee Merge remote-tracking branch 'origin/NR_PRACH_config_file_improv' into integration_2025_w02 (!3119)
Config files improvements for PRACH

Some PRACH parameters in configuration files are not properly set.

- number of SSB per RACH occasion should be 1 when we have only 1 SSB
  (it would still work with 1/2 but it makes little sense and might
  limit UE selection of ROs).
- some PRACH configuration indices would generate PRACH conflicting with
  PUCCH and therefore reducing scheduling capabilities

Further cleanup of some config files still using deprecated fields
2025-01-10 17:58:44 +01:00
Jaroslava Fiedlerova
acd8f0730b CI: use IOVA VA mode in FHI7.2 pipeline
Switching to IOVA VA mode in the FHI7.2 pipeline reduces the required
capabilities for the Docker container. This change allows the removal
of the SYS_ADMIN capability.
2025-01-10 14:59:36 +01:00
Jaroslava Fiedlerova
df03c02a84 fhi_72: allow to provide dpdk_iova_mode to xran
In DPDK, IO Virtual Addresses (IOVA) refers to the memory addressing
scheme used for IO operations. The two IOVA modes supported by DPDK are:

- IOVA as Physical Address (PA): IO memory addresses correspond directly
  to physical addresses, no address translation required.
- IOVA as Virtual Address (VA): IO memory addresses align with user-space
  virtual addresses, requiring IOMMU to remap physical memory.

Previously, this was hardcoded to 0, to use IOVA as PA mode, with xRAN's
DPDK EAL initialization using the "--iova-mode=pa" flag.

This commit introduces a gNB configuration option to allow users to select
the desired IOVA mode. The default remains PA mode to
ensure backward compatibility.

Using IOVA VA mode allows DPDK to run without requiring SYS_ADMIN
capability in the docker container.
2025-01-10 14:59:31 +01:00
Robert Schmidt
38f9436837 Merge remote-tracking branch 'origin/NR_UE_DCI_mask_size' into integration_2025_w02 (!3188)
NR UE fix DCI mask size

Previous maximum size was 15 but in practice it could be at least up to
18. Also moved assertion on non-contiguous type0 DLSCH allocation to L1
(to remove blocking point for L2 implementation).
2025-01-10 11:47:27 +01:00
Robert Schmidt
86c703dbf0 Merge remote-tracking branch 'origin/ci-fixes-frequency-planning' into integration_2025_w02 (!3177)
CI: change frequency for timing and B200-SABOX pipelines

Change center frequency of

- RAN-SA-B200-Module-SABOX-Container - 20 MHz TDD SA scenario from
  3309.48 MHz to 3609.12 MHz
- RAN-gNB-N300-Timing-Phytest-LDPC - Timing phytest 40 MHz scenario from
  3619.08 MHz to 3319.68 Mhz

to avoid interference between the SABOX and timing pipeline.
2025-01-10 11:46:52 +01:00
Robert Schmidt
d892732ff7 Merge remote-tracking branch 'origin/improve-pusch-per-symbol-processing' into integration_2025_w02 (!3175)
Improvements for PUSCH per symbol processing

- Improved the assert in task_ans.c
- Fixed and issue with PUSCH per-symbol processing that could cause an
  issue in case num_pusch_symbols_per_thread is not 1.
2025-01-10 11:45:50 +01:00
Robert Schmidt
751dad3126 Merge remote-tracking branch 'origin/NR_MSG3_TPC' into integration_2025_w02 (!3130)
NR gNB MSG3 TPC

This MR improves the handling of MSG3 TPC commands at MAC gNB.

TODO: Compute TPC when PRACH sends a valid power measurements (currently
not the case for OAI L1, to be verified with Aerial L1)

Closes #866
2025-01-10 11:45:14 +01:00
Robert Schmidt
03c7386649 Merge remote-tracking branch 'origin/NR_gNB_MAC_improvements_for_analog_beam_management' into integration_2025_w02 (!3101)
NR gNB improvements for analog beam management

- Improvements at gNB MAC layer to properly handle analog beam
  management for all channels
- Simple beam switching mechanism based on UE RSRP report
2025-01-10 11:44:45 +01:00
Romain Beurdouche
f9c7057ed1 fix(nrLDPC_coding): Apply clang-format to segment coding code 2025-01-10 09:00:35 +00:00
Romain Beurdouche
c54e7a7035 fix(nrLDPC_coding): in segment decoder, move useless memset on decoder output c to the oly case where it is useful 2025-01-10 09:00:35 +00:00
Romain Beurdouche
6eb0913de9 fix(documentation): typos and strengthen the explanation of the adaptation layer between slot coding and segment coding 2025-01-10 09:00:35 +00:00
Romain Beurdouche
c959f41987 fix(nrLDPC_coding): remove T2 legacy setCombIn from segment decoder parameters 2025-01-10 09:00:35 +00:00
Romain Beurdouche
15fc29843c fix(nrLDPC_coding): cleanup the naming of the K, Kprime and Zc variables to comply with the standard 38.212-5.2.2 2025-01-10 09:00:32 +00:00
Romain Beurdouche
9586db6bfd fix(nrLDPC_decoder): Rename E in Kprime in segment decoder parameters to comply with standard naming 2025-01-10 08:54:37 +00:00
Bartosz Podrygajlo
dcc33d3931 Add RSSI threshold-based power control for PUSCH and PUCCH
- Introduced new configuration parameters `pusch_RSSI_Threshold` and `pucch_RSSI_Threshold`
  (MACRLC section)
- Added `nr_limit_tpc` function in `gNB_scheduler_primitives.c` to limit TPC based on RSSI
  threshold.
- Integrated `nr_limit_tpc` in PUCCH and PUSCH power control

Example Configuration

puxch_RSSI_Threshold takes value between -1280 and 0 and is mapped to range -128.0 dBm/dBFS
to 0.0 dBm/dBFS in 0.1 dB increments. Unit depends on RSSI reporting config.

pucch_RSSI_Threshold = -500;  # Set the PUSCH RSSI threshold to -50.0dBm/-50dBFS
pucch_RSSI_Threshold = -600;  # Set the PUCCH RSSI threshold to -60.0dBm/-60dBFS
2025-01-10 08:24:12 +01:00
Robert Schmidt
8fd6f1c611 Merge remote-tracking branch 'origin/ci-fix-dockerfile-for-fhi-build' into integration_2025_w02 (!3186)
chore(ci): improved errors messages visibility

1. There was a trailing && before $BUILD_OPTIONS in the command line
2. Added leading lines and more pattern to the grep command that
   displays errors/warnings messages during docker build since we don't
   have access to all.txt if build fails
2025-01-10 07:57:13 +01:00
Robert Schmidt
7720d7c821 Merge remote-tracking branch 'origin/fix-tpool-deadlock' into integration_2025_w02 (!3181)
Use UL actor for processSlotTx

Use UL actor instead of Thread pool for processSlotTX.

Closes #887
2025-01-10 07:56:36 +01:00
Robert Schmidt
8805b78d3f Merge remote-tracking branch 'origin/nrLDPC_coding_improvements_1' into integration_2025_w02 (!3173)
nrLDPC_coding: improvements

One improvement in this changeset: Functions nr_interleaving_ldpc,
nr_deinterleaving_ldpc, nr_rate_matching_ldpc and
nr_rate_matching_ldpc_rx that were previously linked with the PHY layer
in the executables are now linked with the LDPC coding implementations
where they are called.
2025-01-10 07:55:46 +01:00
Robert Schmidt
2e2264f30d Merge remote-tracking branch 'origin/better-c-style-common-options' into integration_2025_w02 (!3135)
replace a set of #define by a C bit array, remove duplicated extern global variable declaration
2025-01-10 07:55:23 +01:00
luis_pereira87
63abc04a45 Fix yaml example config file
amf_ip_address is decoded as a paramlist_def_t and not as a paramdef_t, so in the config file it should be a list of ip addresses
2025-01-09 21:35:47 +00:00
Robert Schmidt
e2a3cde4b7 Further cleanup: define oai_exit for 4G
The parent commit cleans up and groups oai_exit in one place,
nr-softmodem-common.h. Therefore, this 5G file is included in the 4G
defs_common.h (at least it's mostly 4G), which is not nice. Instead,
define oai_exit also in 4G softmodem-common.h, and include this in
defs_common.h. Remove the cyclic inclusion of defs_common.h in
softmodem-common.h, and resolve all subsequent errors around unknown
types and extern definition mismatches.
2025-01-09 15:28:25 +01:00
Laurent THOMAS
e0ca70c36d replace a set of #define by a C bit array, remove duplicated extern global variable declaration 2025-01-09 15:28:25 +01:00
Robert Schmidt
54c88a4a4a UE MAC: in phy-test/do-ra, fill TB randomly
Commit d641a76196 ("fix BSR report malformed, add SHORT BSR when it
can") removed code to fill the remainder of a TB, if it is not filled
with data from RLC, with random data when using phy-test or do-ra modes.
This random data filling is intentional, as it might prove useful for
demos or when debugging (e.g., to see used spectrum instead of 0, etc.).
Reintroduce the functionality, but unlike the original code, make it
dependent on the mode, not RFsim.

See also discussion in #888.

Fixup: d641a76196
2025-01-09 15:24:23 +01:00
Guido Casati
0fd0a4fcae NAS: Minor comments and logs 2025-01-08 20:11:12 +01:00
Guido Casati
8215aa60ba Explicit protocol_discriminator size in fgs_nas_message_security_header_t
* size of fgs_nas_message_security_header_t is platform-depending
  while protocol_discriminator must be 1 byte
* fgs_protocol_discriminator_t stays as enum type
2025-01-08 20:11:12 +01:00
Guido Casati
dbd2d8574e Use PDU Session Establish Accept IEI text definition
* replace multiple log lines with one
2025-01-08 20:11:12 +01:00
Guido Casati
047b4eea8b Refactor PDU Session Establish Accept IEI
* use NAS macro to define enums and text description
2025-01-08 20:11:12 +01:00
Guido Casati
ccff518b2c Add include for memcpy to TLVEncoder.h 2025-01-08 20:11:12 +01:00
Guido Casati
45da0c8a81 Cleanup long time commented out code in openair3/NAS/TEST/AS_SIMULATOR/as_process.c 2025-01-08 20:11:12 +01:00
Guido Casati
f87388099d Replace type Byte_t used in NAS directly with uint8_t
* the goal is to simplify the code
2025-01-08 20:11:09 +01:00
francescomani
cb6eaa1deb documentation for analog beamforming implementation 2025-01-08 14:36:12 +01:00
Romain Beurdouche
fc2bd36788 fix(nrLDPC_coding_segment): missing dependency of nr_coding_segment_decoder, nr_coding_segment_encoder, nr_coding_segment_utils and nr_coding_xdma_decoder on generate_T 2025-01-08 08:31:11 +00:00
Romain Beurdouche
61cb2bcc5a fix(nrLDPC_coding_segment): Reorganize segment and xdma CMakeFiles.txt to avoid redundant compilation 2025-01-08 08:31:06 +00:00
Romain Beurdouche
244355a3d2 fix(nrLDPC_coding_segment): move rate matching, interleaving and their counterparts to segment coding implementation 2025-01-08 08:13:43 +00:00
Raphael Defosseux
7418a104be chore(ci): migrating flexric test to carabe
Signed-off-by: Raphael Defosseux <raphael.defosseux@eurecom.fr>
2025-01-07 15:33:07 +01:00
francescomani
35e9d1e0c2 tentative fix for double sib1 decoding 2025-01-06 12:09:29 +01:00
Laurent THOMAS
766619aa26 add process RRC input in do-ra mode (was a race cond) 2025-01-06 12:09:29 +01:00
Robert Schmidt
966a3a7264 Move UE RRC msg defs to rrc_messages_types.h 2025-01-06 12:09:29 +01:00
Laurent THOMAS
9c0d90a014 Introduce UE RCC to MAC ITTI queue
Reduce race conditions through a itti queue, such that RRC-initiated MAC
memory modifications happen at the same time as MAC thread writes.
However, it doesn't resolve the problem of exact slot we should apply
the new cell configurtion.
2025-01-06 12:09:29 +01:00
francescomani
a7b9a85640 move temporary code to process type0 as type1 when the RB allocation is contiguous to L1 2025-01-06 12:07:15 +01:00
francescomani
d6f678ffc1 set TPC for MSG3 retransmissions 2025-01-06 10:43:51 +01:00
francescomani
4dd69427d8 set MSG3 TPC based on preamble power indicated from L1 2025-01-06 10:43:47 +01:00
francescomani
d718e67797 automatic determination of DCI mask size at the UE 2025-01-06 09:56:28 +01:00
francescomani
7bb585cc0e further cleanup of PRACH config file parameters in GENERIC-LTE-EPC 2025-01-03 11:35:41 +01:00
Raphael Defosseux
1b9fcc9858 fix(ci): adding leading lines and increasing visibility for building errors
Signed-off-by: Raphael Defosseux <raphael.defosseux@eurecom.fr>
2025-01-03 09:42:49 +01:00
Raphael Defosseux
70933edd19 fix(docker): typo on BUILD_OPTIONS
Signed-off-by: Raphael Defosseux <raphael.defosseux@eurecom.fr>
2025-01-03 09:40:59 +01:00
Bartosz Podrygajlo
88cde50d4c Refactor PUSCH per-symbol threadpool utilization
A small refactor for PUSCH per-symbol processing. This fixes a possible
issue in case num_pusch_symbols_per_thread is not 1
2025-01-03 08:11:35 +01:00
Bartosz Podrygajlo
75162adf68 Improve assert in completed_task_ans()
This assert checks if the structure is correctly initialized. The structure
is one-time use so the assert is valid, but the value of the atomic was added
to the output to improve debugging.
2025-01-03 08:11:35 +01:00
francescomani
a9c72222dd minor: adding two logs for debugging 2025-01-02 11:01:38 +01:00
francescomani
0cd0ec7a67 MAC beam allocation for ULSCH 2025-01-02 11:01:38 +01:00
francescomani
5e930b0b72 MAC beam allocation for DLSCH 2025-01-02 11:01:38 +01:00
francescomani
f235b249ba remove FR1 in preprocessor name 2025-01-02 11:01:38 +01:00
francescomani
912fec55ef MAC beam allocation for scheduling request 2025-01-02 11:01:38 +01:00
francescomani
8de9d006f5 MAC beam allocation for SRS 2025-01-02 11:01:38 +01:00
francescomani
2940ee5eda MAC beam allocation for periodic CSI measurements 2025-01-02 11:01:38 +01:00
francescomani
dc9a2cf1ad simple beam switching procedure based on strongest reported SSB 2025-01-02 11:01:38 +01:00
francescomani
19c667fa80 remove unused tci handling function 2025-01-02 11:01:38 +01:00
francescomani
2d2a92dd12 improvements in handling CSI report for RSRP 2025-01-02 11:01:38 +01:00
francescomani
70a6434168 remove unused input from get_beam_index function 2025-01-02 11:01:38 +01:00
Robert Schmidt
f9bff3d6a0 Merge branch 'integration_2024_w51' into 'develop'
Integration: `2024.w51`

Closes #879

See merge request oai/openairinterface5g!3180

* !3155 UL BLER vs SNR plot
* !3170 Replace AssertFatal with static_assert for cmdline arguments check
* !3172 A script to run CI tests locally.
* !3151 Optimize PHY_ofdm_mod CYCLIC_PREFIX in case of incidentally aligned pointers
* !3164 Fix and refactor channel average
* !3154 Fix TPMI for UL retransmissions
2024-12-21 14:36:39 +00:00
Bartosz Podrygajlo
9a3fbacfac Fix data race between processSlotTX and clean_UE_harq function 2024-12-20 19:45:42 +01:00
Bartosz Podrygajlo
1df5327f0c Update NR UE threading documentation
Include the newly added UL Actor in the NR UE threading documentation.
2024-12-20 19:43:18 +01:00
Bartosz Podrygajlo
f3e60a1417 Use UL actor for processSlotTx
Use UL actor instead of Thread pool for processSlotTX.
2024-12-20 16:28:34 +01:00
Jaroslava Fiedlerova
a82b1450e4 Merge remote-tracking branch 'origin/develop-fix-tpmi' into integration_2024_w51 (!3154)
Fix TPMI for UL retransmissions

If the ul_ri of srs_feedback changes between a UL transmission and a
retransmission, we use the TPMI of transmission.

Closes #879

Assertion ((*nrOfLayers==1 && srs_feedback->tpmi <= 1) || (*nrOfLayers==2 && srs_feedback->tpmi == 0)) failed!
In compute_precoding_information() /home/user/openairinterface5g/openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.c:2896
TPMI 1 is invalid!
2024-12-20 15:59:39 +01:00
Jaroslava Fiedlerova
40584b5b32 Merge remote-tracking branch 'origin/fix_and_refactor_channel_average' into integration_2024_w51 (!3164)
Fix and refactor channel average

- Fixing missing init average variable with zero and refactor the code #86b11ab7
Fixes just the missing avg1=0
- Refactor the code to a common SSE/AVX2 inline function using also horizontal add.
- We use int64_t result from now on.
- We decided to fix length to x12 instead of old x9 openair1/PHY/NR_UE_TRANSPORT/dci_nr.c

//compute average channel_level on each (TX,RX) antenna pair
void nr_pdcch_channel_level(int32_t rx_size,
                            c16_t dl_ch_estimates_ext[][rx_size],
                            NR_DL_FRAME_PARMS *frame_parms,
                            int32_t *avg,
                            int symbol,
                            int nb_rb)
{
  for (int aarx = 0; aarx < frame_parms->nb_antennas_rx; aarx++) {
    //clear average level
    simde__m128i avg128P = simde_mm_setzero_si128();
    simde__m128i *dl_ch128 = (simde__m128i *)&dl_ch_estimates_ext[aarx][symbol * nb_rb * 12];

    for (int rb = 0; rb < (nb_rb * 12) >> 2; rb++) {     <-------------- here
      avg128P = simde_mm_add_epi32(avg128P, simde_mm_madd_epi16(dl_ch128[rb], dl_ch128[rb]));
    }

    DevAssert(nb_rb);
    avg[aarx] = 0;
    for (int i = 0; i < 4; i++)
      avg[aarx] += ((int32_t *)&avg128P)[i] / (nb_rb * 12); <-------------- and here
    LOG_DDD("Channel level : %d\n",avg[aarx]);
  }
}
2024-12-20 15:26:57 +01:00
Jaroslava Fiedlerova
90057df3cc Merge remote-tracking branch 'origin/opt-cp-insertion' into integration_2024_w51 (!3151)
Optimize PHY_ofdm_mod CYCLIC_PREFIX in case of incidentally aligned pointers

It seems that the cyclic prefix is in most cases a multiple of 512 samples.
This means that in most cases the idft output pointer is already aligned and
there is no need to perform an extra memcpy. This saves the memcpy time in
most cyclic prefix insertion cases.
2024-12-20 15:24:45 +01:00
Jaroslava Fiedlerova
cd570f632f Merge remote-tracking branch 'origin/local-ci-test' into integration_2024_w51 (!3172)
A script to run CI tests locally.

Added ./run_locally.sh script. The script takes one argument being the testcase
that one wants to run. The testcase is run locally. This means that some
testcases that utilize hardware resources will not run. However most if not all
rfsimulator testcases should run as in CI.

To this end, the CI python scripting framework was updated:
- override  and <srv_node> elements from XML so all commands are executed locally
in case --local flag is passed
- Allow RemoteCmd class to run on localhost
2024-12-20 09:11:24 +01:00
Jaroslava Fiedlerova
5947d77609 Merge remote-tracking branch 'origin/static-assert-for-args' into integration_2024_w51 (!3170)
Replace AssertFatal with static_assert for cmdline arguments check

Replace AssertFatal with static_assert for command line arguments definition
length check. The static assert will not allow the code to compile in case
the size is incorrect.

This could save some time in the future since its easy to forget to extend
CMDLINE_PARAMS_CHECK_DESC.
2024-12-20 09:10:17 +01:00
Jaroslava Fiedlerova
057b2ad552 Merge remote-tracking branch 'origin/bler-vs-snr-plot' into integration_2024_w51 (!3155)
UL BLER vs SNR plot

Added a tool for generating UL BLER vs SNR from nr_ulsim runs.
2024-12-20 09:09:14 +01:00
Bartosz Podrygajlo
650b2dc6eb A script to run CI tests locally.
Added ./run_locally.sh script. The script takes one argument being the testcase
that one wants to run. The testcase is run locally. This means that some testcases that
utilize hardware resources will not run. However most if not all rfsimulator testcases
should run as in CI.

To this end, the CI python scripting framework was updated, adding --local flag which changes
the script behavior as follows:
 - overrides <node> and <srv_node> XML elements to 'localhost' so all commands are executed locally
 - Avoid running image pull, image cleanup and workspace creation steps of the scripts:
   user is responsible for that
2024-12-19 16:55:38 +01:00
francescomani
7b499f5081 print UE statistics also in FDD 2024-12-19 14:46:53 +01:00
francescomani
f7bb1367f5 print UE statistics only in connected mode 2024-12-19 14:31:35 +01:00
Jaroslava Fiedlerova
3306a01c57 CI: change frequency for timing and B200-SABOX pipelines 2024-12-19 12:02:50 +01:00
Robert Schmidt
d820c187fc OPT: Replace AssertFatal with static_assert
See parent commit
2024-12-19 03:26:27 +01:00
Robert Schmidt
2f43b343b6 gnb_config: Replace AssertFatal with static_assert
See parent commit
2024-12-19 03:25:04 +01:00
Robert Schmidt
f02bd8b453 enb_config: Replace AssertFatal with static_assert, align length
See parent commit
2024-12-19 03:24:37 +01:00
Robert Schmidt
5473ee904f E1AP: Replace AssertFatal with static_assert
See parent commit
2024-12-19 03:22:30 +01:00
Robert Schmidt
b4395406f0 softmodem-common: Replace AssertFatal with static_assert
See also parent commit
2024-12-19 03:12:37 +01:00
Bartosz Podrygajlo
acae0dc011 Replace AssertFatal with static_assert for cmdline arguments check
Replace AssertFatal with static_assert for command line arguments definition
length check. The static assert will not allow the code to compile in case
the size is incorrect.

This could save some time in the future since its easy to forget to extend
CMDLINE_PARAMS_CHECK_DESC.
2024-12-18 09:18:48 +01:00
Matthias Mehlhose
5ae69ce484 refactor: average 64 bit calculations with shift and internal division (SSE and AVX2) 2024-12-18 07:36:22 +00:00
Matthias Mehlhose
276a17902e fix: UE average 2024-12-18 07:36:22 +00:00
Bartosz Podrygajlo
55b5e04e8d Change alignment of temporary IDFT buffer in PHY_ofdm_mod
Alignment of temporary IDFT buffer was changed to 64 bytes. This is in preparation
for possible use of different IDFT implementation which could use AVX-512, requiring
64-byte alignment.
2024-12-17 23:04:30 +01:00
Bartosz Podrygajlo
f50146962d Fix instrumentation target for older CMake versions 2024-12-17 17:26:41 +01:00
rmagueta
c66a625dc5 If the ul_ri of srs_feedback changes between a UL 1st transmission and a retransmission, we use the TPMI of 1st transmission 2024-12-17 14:18:16 +00:00
Robert Schmidt
5bd2eb866c Merge branch 'integration_2024_w50' into 'develop'
Integration: `2024.w50`

Closes #753

See merge request oai/openairinterface5g!3166

* !3159 CI: Add FHI7.2 test with Metanoia RU
* !3111 Enable USRP Tx thread in nrUE
* !3144 UE data race fix
* !3149 Fix several issues in ulsch_mmse_2layers
* !3158 GTP: use direct call instead of ITTI
* !3160 FHI-72: initialize mask, find correct libxran
* !3019 SIB19 utilization on UE
* !3162 Add Rocky 9.5 to list of distributions
* !3163 NGAP-Initial Context Setup Failure
* !2952 New LDPC coding library interface for decoding and encoding complete slots in one call to the library
* !3125 Add support for O1 in O-DU via telnet
* !3161 Cmd line option for sync in frames for iqrecorder
2024-12-17 13:58:12 +00:00
Robert Schmidt
d4ca420122 Merge remote-tracking branch 'origin/ue-iqrecord-fix' into integration_2024_w50 (!3161)
Cmd line option for sync in frames for iqrecorder

B200 with high clock drift will go out of sync within 280ms which was
the default duration to sync in with iqrecorder. Now this value can be
specified via cmd line so the user can change it according to needs.
2024-12-16 19:44:00 +01:00
Robert Schmidt
0d4c7364b4 Merge remote-tracking branch 'origin/telnet-o1' into integration_2024_w50 (!3125)
Add support for O1 in O-DU via telnet

This change set adds a simple telnet interface to nr-softmodem. Together
with oai/o1-adapter>, this implements a part of the O1 interface, for
the DU only. Currently supported uses cases:

- some stats are send to an SMO (such as bandwidth, PLMN, frequency, ...)
- re-configuration of bandwidth, frequency
- stop/start of the softmodem, while keeping the CU and L2 running
- the o1-adapter implements two alarms, load overload and base station
  offline, using this interface.

It is possible to use the telnet interface by itself (i.e., "o1" without
the o1-adapter). To do this, compile with telnet support (./build_oai
--build-lib telnetsrv) and start the nr-softmodem with O1 module
(./nr-softmodem --telnetsrv --telnetsrv.shrmod o1). You can then do the
following:

- see some statistics as exposed to o1-adapter, in JSON: echo o1 stats | nc 127.0.0.1 9090 && echo
- stop the L1: echo o1 stop_modem | nc 127.0.0.1 9090 && echo
- reconfigure bandwidth: e.g., echo o1 bwconfig 20 | nc 127.0.0.1 9090 && echo (also supported: 40, 60, 100)
- start the L1: echo o1 start_modem | nc 127.0.0.1 9090 && echo

Note that the reconfiguration works with split-8 radios. Notably, it
does not work yet out-of-the-box with 7.2 radios, because they have to
be manually reconfigured on bandwith/frequency switch. The planned
M-plane should allow such use case, though.

To help with the above, this branch also includes fixes (for more
information, refer to the corresponding commits):

- fixes for stopping the L1, notably stop threads in right order, stop
  thread pool of RU
- collect some general MAC metrics, fix some bugs in MAC
- fix problems in F1AP gNB-DU configuration update message, update test
- fix some problems in RRC
2024-12-16 19:42:28 +01:00
sagar arora
59e6a33d2b Add telnet (O1) support modules in gNB image 2024-12-16 16:18:11 +01:00
Robert Schmidt
bcba876fcb Do not free inside gnb_du_configuration_update_f1ap()
The consumer of this function just passes a pointer to something to be
sent. This function should not free this memory, it's simply not it's
task. This is the same bug as above in
"CU_handle_gNB_DU_CONFIGURATION_UPDATE(): don't free the message of RRC"
2024-12-16 16:18:11 +01:00
Robert Schmidt
70a746a445 Provide O1 telnet interface to remove all UEs 2024-12-16 16:18:11 +01:00
Ronak Kanthaliya
c71c9de953 Additional BW configurability on telnet server 2024-12-16 16:18:11 +01:00
Robert Schmidt
aba506e5e3 Add basic O1 telnet module
This adds a basic telnet module to support the O1 interface at the DU,
to be used together with the oai/o1-adapter>. Concretely, this first
version supports to

- read/modify cell parameters
- stop/start the L1
2024-12-16 16:18:11 +01:00
Robert Schmidt
68ae3ea11c Implement start_L1L2()
Implements the re-start of the L1 after it has been stopped through
stop_L1(). It takes into account some changes, such as bandwidth, or
frequency, when restarting the L1. To this end, it also triggers a
gNB-DU configuration update message on each restart to inform the CU
about any changes in the DU. FDD has not been tested.
2024-12-16 16:18:11 +01:00
Robert Schmidt
8e32f566fc Refactor code to stop L1
Refactor L1 stopping code into a function. The function is basically the
same as what we were doing at the end of main() of nr-softmodem.c.

This will be reused to support the "soft-restart" functionality in the
next commits.
2024-12-16 16:18:10 +01:00
Robert Schmidt
511b5f8ebd Expose F1 primitives for next commits
Need to proper forward declaration, as we otherwise need to make
telnet_o1 module dependent on F1.  Make functions publicly accessible,
as the F1 functions are used in an upcoming commit to start the L1.
2024-12-16 16:18:10 +01:00
Robert Schmidt
0c24f1ff13 Upon RRC exit: stop ongoing timer 2024-12-16 16:18:10 +01:00
Robert Schmidt
5f01cf6f93 Keep track of number of RUs in L1
Need to keep track of number of RUs, as the RU initialization increments
the number of RUs. Therefore, subsequent initializations would fail if
we don't decrement first. There is no better place (or I did not find
it) to decrement the number of RUs than in nr_phy_free_RU(). For this
reason, we also have to manually set the number of RUs in nr_prachsim to
1, otherwise the assert will trigger.
2024-12-16 16:18:10 +01:00
Robert Schmidt
6b852a6fff CU_handle_gNB_DU_CONFIGURATION_UPDATE(): don't free the message of RRC
The message is already freed at reception at RRC.
2024-12-16 16:18:10 +01:00
Robert Schmidt
8e44b2d22e RRC: fix double free, already freed in scope of caller of this function 2024-12-16 16:18:10 +01:00
Robert Schmidt
3e63f1dab2 Correctly handle received gNB-DU config update ack 2024-12-16 16:18:10 +01:00
Robert Schmidt
9858a733c1 gnb_du_configuration_update_f1ap(): send to correct task 2024-12-16 16:18:10 +01:00
Robert Schmidt
3e8636ce98 Test gNB-DU config update: cell to add/delete 2024-12-16 16:18:10 +01:00
Robert Schmidt
adbbbaeaba Properly implement eq/cp() functions of gNB-DU config update, fix test
Implement those functions following more closely 38.473, i.e., check all
mandatory fields. Add mandatory fields in the test.
2024-12-16 16:18:10 +01:00
Robert Schmidt
509cc8cc58 Use PLMNID_TO_MCC_MNC() to decode PLMN ID 2024-12-16 16:18:10 +01:00
Robert Schmidt
3de8a746fe Fix eq_f1ap_cell_info(): correct TAC comparison
Check that both a->tac/b->tac are present, or both not present. Then,
check they are equal if present.
2024-12-16 16:18:10 +01:00
Robert Schmidt
6b7055bb37 eq_f1ap_sys_info(): correct check
a and b can only be equal if both NULL or both set (and all fields the
same). Check for this.
2024-12-16 16:18:10 +01:00
Robert Schmidt
ed876a53b2 F1: refactor out served_cell_info/du system info
Split out these functions, to be reused in a follow-up commit to
correctly have gNB-DU configuration update message working.

Change the return type copy_f1ap_served_cell_info(), to return the copy,
which IMO is more intuitive then passing target and source in
parentheses.
2024-12-16 16:18:10 +01:00
Robert Schmidt
c852d9337c nr_rrc_config_ul_tda(): ensure not double initialization
For the "restart" feature, earlier versions where creating multiple UL
TDA. This is not a problem (anymore), but to avoid that we call this
multiple times, add this assert.
2024-12-16 16:18:10 +01:00
Robert Schmidt
3c94b9a18f rrc_gNB_du.c: avoid potential double-free
Set pointer to NULL when freeing to avoid potential double frees.
2024-12-16 16:18:10 +01:00
Robert Schmidt
bc8556eafb Implement RFsim stopServer: close listen socket, free memory 2024-12-16 16:18:10 +01:00
Robert Schmidt
462d1a6a8b RLF: avoid encoder problem 2024-12-16 16:18:10 +01:00
Robert Schmidt
5600316d34 UL ref sequences: prevent double-initialization
The existing code prevents double initialization if e.g., both gNB&UE
call these functions (like in a simulator). However, in the case of a
double-initialization such as stopping and re-starting the L1, the
memory will be freed, but not freed again. Basically, this works:

    generate()
    generate() # not initialized again

but this leads to problems:

    generate()
    free()
    generate() # not initialized again, but should be!

Reimplement the check based on the data to be initialized, such that an
intermediate free() will be handled properly.
2024-12-16 16:18:10 +01:00
Robert Schmidt
70b4611001 Stop L1_rx_thread/L1_tx_thread first
These are the "main" worker threads (apart the ru_thread). If the
thread-pool stops, they might get stuck. E.g., in PUSCH channel
estimation, it uses a local response queue, and if the thread pool is
terminated, it seems that the L1_rx_thread can get stuck in there.

To limit these problems, attempt to stop these threads first; stop the
queue from which they read and make them terminate; then, stop the
thread pool.

Also, fix the termination of respPuschSymb queue.
2024-12-16 16:18:10 +01:00
Robert Schmidt
3361db1a34 Stop RU thread pool on exit, if applicable 2024-12-16 16:16:44 +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
Robert Schmidt
6330bfe0e8 fixup: there is no init_gNB_afterRU() 2024-12-16 16:16:43 +01:00
Robert Schmidt
f804a355ad Trigger F1 UE context release if no UE context in RRC 2024-12-16 16:16:43 +01:00
Robert Schmidt
c80821e578 NR MAC: save total/used PRBs aggregate 2024-12-16 16:16:43 +01:00
Robert Schmidt
5785bc1894 Msg4 RNTI not found: abort RA 2024-12-16 16:16:43 +01:00
Bartosz Podrygajlo
28b7e0b7d5 UL BLER vs SNR plot
Added a tool for generating UL BLER vs SNR from nr_ulsim runs.
2024-12-16 16:10:36 +01:00
Bartosz Podrygajlo
9e6c0c8c78 Fix unused code paths in PHY_ofdm_mod
For completeness sake, unused CYCLIC_SUFFIX and NONE extension
types were fixed to match CYCLIC_PREFIX memcpy usage.
2024-12-16 15:37:56 +01:00
Bartosz Podrygajlo
5ab9bd95bd Add const to input argument in PHY_ofdm_mod 2024-12-16 15:35:07 +01:00
Robert Schmidt
a2613d5604 Merge remote-tracking branch 'origin/ldpc_decoding_module_interface_rework' into integration_2024_w50 (2952)
New LDPC coding library interface for decoding and encoding complete slots in one call to the library

Previous attempts to integrate LDPC decoding relying on offloading show
the limitation of the original code segment coding interface for the
library implementing LDPC coding. In order to perform the offload and
therefore the decoding in an optimal fashion, it is relevant to provide
the implementation with the broader amount of data possible per call,
which is a slot.  A previous MR related to T2 offload managed to offer
an interface for decoding transport blocks by modifying only
nr_ulsch_decoding.c. But this may not be sufficient for performing an
efficient decoding in any situation. Slots could be shared between
multiple transport blocks in case multiple UEs are connected to the RAN,
which makes the transport block size shrink and therefore degrades the
efficiency of the offloading.

This MR offers a broader interface with a gNB decoding entry point in
phy_procedures_nr_gNB.c. The file nr_ulsch_decoding.c now lets the
decoding library implement deinterleaving, rate-unmatching and decoding
for the slot. In gNB encoding and UE decoding and encoding as well,
tasks are partitioned in a similar fashion.

As it allows to feed the implementation with the broadest amount of data
possible, it allows to fit any coding solution in a library. This will
avoid further modification to OAI source code and addition of options to
select an implementation when integrating new decoding solutions. An
implementation of this interface will therefore be offered for every
existing decoding solution in OAI and solutions added in the future will
be provided as independent module code without any modification to the
core of OAI code.  The way to choose the decoding solution and to
configure it was also unified using configmodule. The library can be
chosen through the option --loader.ldpc.shlibversion. The slot coding
solutions shipped with this MR can be configured through configmodule
(e.g., T2 address and isolated cores).

This MR includes three coding implementations:

- A wrapper around segment decoding libraries for test purpose: libldpc.so
- A one shot slot coding and encoding with the T2 board: libldpc_t2.so
- A decoder on FPGA using the XDMA driver: libldpc_xdma.so

Improvements brought by this MR:

- Easy integration of a wider variety of LDPC coding solution at gNB and UE
- Easy selection of the LDPC coding solution (option --ldpc-offload-enable is kept for now but it can be ultimately removed)
- T2:
  * More efficient when many UEs are connected
  * Decoding and encoding in nr-uesoftmodem
2024-12-16 15:29:20 +01:00
Robert Schmidt
deba36a5d1 Merge remote-tracking branch 'origin/NGAP-FAILMESSAGE' into integration_2024_w50 (!3163)
NGAP-Initial Context Setup Failure

NGAP Failure message - Initial Context Setup Failure.  When an Initial
Context Setup Request is received with the UE context as null, it
triggers Initial Context Setup failure
2024-12-16 15:27:38 +01:00
Robert Schmidt
e5622f442c Merge remote-tracking branch 'origin/build-rocky9.5' into integration_2024_w50 (!3162)
Add Rocky 9.5 to list of distributions
2024-12-16 15:27:17 +01:00
Robert Schmidt
0b78a18d47 Merge remote-tracking branch 'origin/sib19-ue-utilization' into integration_2024_w50 (!3019)
SIB19 utilization on UE

Following SIB19 initialization and scheduling on gNB (!2899 - merged)
and Receive SIB19 on nrUE (!2920 - merged), this merge request aims to
introduce the actual use of the SIB19 provided parameters by gNB in UE.
Changes needed for utilization include: initialization of position
coordinates parameters for UE (which are needed to calculate propagation
delay between UE and SAT), propagation delay calculations and timing
advance adjusts. Moreover, this change removes the now unused arguments
for ntn_koffset, ntn_ta_common and ntn_ta_commondrift
2024-12-16 15:26:48 +01:00
Robert Schmidt
a8a7946975 Merge remote-tracking branch 'origin/fhi-72-hotfixes' into integration_2024_w50 (!3160)
FHI-72: initialize mask, find correct libxran

See commits for more information
2024-12-16 15:25:52 +01:00
Robert Schmidt
85440e2d4e Merge remote-tracking branch 'origin/gtpv1u-data-no-itti' into integration_2024_w50 (!3158)
GTP: use direct call instead of ITTI

Using ITTI calls for user plane implies (1) a memory allocation, (2)
mutexes, and (3) queueing messages for each user plane packet, which is
heavy. Use a direct API call instead to reduce overhead.
2024-12-16 15:25:18 +01:00
Bartosz Podrygajlo
b92ee59d41 Fix instrumentation target for old CMake versions
Older make versions do not support source files to be added to INTERFACE
type target. The source file is not needed there so it was removed.
2024-12-16 15:21:11 +01:00
Bartosz Podrygajlo
1481d89dfd Optimize PHY_ofdm_mod CYCLIC_PREFIX in case of incidentally aligned pointers
It seems that the cyclic prefix is in most cases a multiple of 512 samples.
This means that in most cases the idft output pointer is already aligned and
there is no need to perform an extra memcpy. This saves the memcpy time in
most cyclic prefix insertion cases.
2024-12-16 15:04:03 +01:00
Bartosz Podrygajlo
31b8d98bb5 Formating for PHY_ofdm_mod 2024-12-16 15:04:03 +01:00
Romain Beurdouche
7bf6f3f276 Simplify segment decoder and encoder interfaces
More complex implementations will be achieved using the new reworked interface

- t_nrLDPC_dec_params: remove F, Qm, rv and perCB
- encoder_implemparams_t: remove Qm, Tbslbrm, G, rv and perCB
2024-12-16 08:40:54 +01:00
Robert Schmidt
0aeba914a0 Cleanup in CMakeLists.txt
- Remove all variables (like OPENAIR1), they serve no purpose and make
  unnecessarily long lines
- Remove linking to T, it does not seem to be necessary
- Avoid intermediate variables to keep sources, and declare libraries
  directly, making for shorter code
2024-12-16 08:40:54 +01:00
Romain Beurdouche
23bfce8d91 feat(nrLDPC_coding_interface): Move LDPC and Turdo coding libraries cmake lists in sub directories 2024-12-16 08:40:54 +01:00
Romain Beurdouche
97614d182f feat(nrLDPC_coding_interface): Documentation 2024-12-16 08:40:54 +01:00
Romain Beurdouche
240aafeb14 fix(nrLDPC_coding_interface): use lidldpc_slot_t2 for CI 2024-12-16 08:40:54 +01:00
Romain Beurdouche
37bb58feb2 fix(nrLDPC_coding_interface): lidldpc_slot_segment becomes default libldpc 2024-12-16 08:40:54 +01:00
Raphael Defosseux
52d1d7b6e7 chore(ci): explicitly support BSD-3-Clause as legit license in OAI
Signed-off-by: Raphael Defosseux <raphael.defosseux@eurecom.fr>
2024-12-16 08:40:54 +01:00
Yi-Hung Chang
8756afdb5a feat(nrLDPC_coding_interface): Add ldpc_xdma coding library 2024-12-16 08:40:54 +01:00
Romain Beurdouche
73770da52c fix(nrLDPC_coding_t2): remove legacy T2 coding and rename libldpc_slot_t2.so in libldpc_t2.so 2024-12-16 08:40:54 +01:00
Romain Beurdouche
c6bdde1244 feat(nrLDPC_coding_interface): Add ldpc_slot_t2 coding library 2024-12-16 08:40:54 +01:00
Romain Beurdouche
49bdcfd95c feat(nrLDPC_coding_interface): Add ldpc_slot_segment coding library 2024-12-16 08:40:54 +01:00
Romain Beurdouche
7f1d3c6644 feat(nrLDPC_coding_interface): Use reworked interface in PHY simulators 2024-12-16 08:40:54 +01:00
Yi-Hung Chang
80c406693f feat(nrLDPC_coding_interface): Use reworked interface in UE 2024-12-16 08:40:54 +01:00
Romain Beurdouche
00e1ad124d feat(nrLDPC_coding_interface): Use reworked interface in gNB 2024-12-16 08:40:52 +01:00
Madhuri.G
7cfa482107 Initial Context Setup Failure
NGAP Failure message - Initial Context Setup Failure.
When an Initial Context Setup Request is received with the UE context as null, it triggers Initial Context Setup failure.
2024-12-13 15:35:43 +05:30
Robert Schmidt
61849adf8b Merge remote-tracking branch 'origin/fix-type-remove-assert-2layer-mmse' into integration_2024_w50 (!3149)
Fix several issues in ulsch_mmse_2layers

Fix incorrect array type of determ_fin which was set to int32_t while the
array holds the results of simde_mm_abs_epi32 which produces unsigned
values.

Remove assert on right-shifting negative integers as it is impossible for
determ_fin to hold negative values.

Change type of sum_det to uint32_t to prevent possible overflow.  Fix
the type cast (int -> uint32_t) to prevent casting before shift in
nr_ulsch_comp_muli_sum which might have resulted in right shifting
negative integers.

Closes: #753
2024-12-13 08:15:18 +01:00
Robert Schmidt
7fe218b91c Merge remote-tracking branch 'origin/nr-ue-avoid-dl-race' into integration_2024_w50 (!3144)
UE data race fix

When a new sync request is sent to PHY, we clear harq buffer and start
synchronization process. This could lead to unexpected behavior or segv
because DL actors might be using the buffer we just cleared. To avoid
this, the DL actors are shutdown and re initiated before clearing harq
info.
2024-12-13 08:14:24 +01:00
Robert Schmidt
2de4d8ee0d Merge remote-tracking branch 'origin/ue-usrp-tx-thread' into integration_2024_w50 (!3111)
Enable USRP Tx thread in nrUE

The option usrp-tx-thread-config 1 was not taking effect in UE. This MR fixes it.
2024-12-13 08:13:45 +01:00
Robert Schmidt
4f11e76b6b Merge remote-tracking branch 'origin/ci-test-metanoia' into integration_2024_w50 (!3159)
CI: Add FHI7.2 test with Metanoia RU

Replace VVDN RU by Metanoia RU in the RAN-SA-FHI72-CN5G pipeline.
2024-12-13 08:13:12 +01:00
francescomani
de0b9881ac remove NSA testing config files probably not used anymore 2024-12-12 10:40:37 +01:00
francescomani
44b3443533 remove deprecated ssb_PositionsInBurst_PR still present in some config files 2024-12-12 10:37:56 +01:00
francescomani
2ff81068ef removing a couple of config files from targets with non conventional names (probably never used) 2024-12-12 10:19:48 +01:00
francescomani
7b61ebcb74 fixing ssb_perRACH_Occasion in targets SA files 2024-12-12 10:19:48 +01:00
francescomani
4d6b3f8c30 removing unused bf_weights from a config file 2024-12-12 10:19:48 +01:00
francescomani
e5675d38bf further cleanup of config files
pdcch_ConfigSIB1 field not used since almost two years but still kept in some config file
2024-12-12 10:19:48 +01:00
francescomani
46fe1115ad improving also 7.2 files in targets 2024-12-12 10:19:48 +01:00
francescomani
aed2e6c7fb improvements in PRACH parameters in 5G configuration files 2024-12-12 10:19:48 +01:00
Romain Beurdouche
5f22b05695 feat(nrLDPC_coding_interface): Add reworked interface definition and loader 2024-12-12 08:37:20 +01:00
Robert Schmidt
13a1d863c7 Add Rocky 9.5 to list of distributions 2024-12-12 08:34:44 +01:00
Robert Schmidt
f8d7e1fd1b Findxran: exclude default paths, use hints
Some users copy libxran.so to a system directory (e.g., /usr/local/lib).
At the same time, we require xran_LOCATION to be set to find the build
directory. Use HINTS to prefer the location passed through
xran_LOCATION.

Also, use NO_DEFAULT_PATH to outright disallow global scope, to prevent
"accidentally" finding libxran.so in global scope (this is for
multi-user systems that are used in development, and where people have
different version of libxran for testing purposes). To still use
packages in e.g., /usr/local/, it would be possible to set xran_LOCATION
to this directory. (there is a problem that the version information will
likely not be read correctly, so this might not be enough)
2024-12-12 08:32:48 +01:00
Jaroslava Fiedlerova
02679ca07c CI: Create FHI7.2 test with Metanoia RU, 2 layers in DL 2024-12-12 08:26:42 +01:00
Sakthivel Velumani
4c42a20eaa Cmd line option for sync in frames for iqrecorder
B200 with high clock drift will go out of sync within 280ms which was
the default duration to sync in with iqrecorder. Now this value can be
specified via cmd line so the user can change it according to needs.
2024-12-11 12:34:43 -05:00
Sakthivel Velumani
3f01ec0e71 Fix iqrecord to work on AVX512 machine 2024-12-11 12:32:18 -05:00
Robert Schmidt
42a10e4700 Correctly initialize u64 mask
1 needs to be marked as long long, to allow shifting numbers >= 32.
Otherwise, 1 is an int, limited to 32 bits.
2024-12-11 16:15:07 +01:00
Badescu, Ciprian
a049c53e99 better handling of writeBlockSize greater than samples/slot
fix the case when writeBlockSize is greater than samples/slot
by sending samples from the same buffer instead of out-of-bounds memory read
2024-12-11 13:01:50 +02:00
Bartosz Podrygajlo
fc26b8c053 Fix process_slot_tx_barriers for high rx-to-tx values
Set the number of barriers to 512 and implement proper slot and frame
based selection. Now the dynamic barriers should not be overwritten in
case the rx-to-tx offset is high. The maximum offset supported is 512.
2024-12-11 13:01:50 +02:00
Roberto Rosca
0b1dd3ed50 Update 5g_rfsimulator_ntn_geo docker file and configs used for test to exclude unused parameters and add ntn related values. 2024-12-11 13:01:50 +02:00
Roberto Rosca
ef55aaa7c9 Store position coordinates in NR_UE_RRC_INST_t
position_coordinates will be allocated and populated upon receiving SIB19

Co-authored-by: Robert Schmidt <robert.schmidt@openairinterface.org>
2024-12-11 13:01:50 +02:00
Robert Schmidt
3f74749aa6 Simplify position reading 2024-12-11 13:01:50 +02:00
Robert Schmidt
2989bb592b handle position from RRC 2024-12-11 13:01:50 +02:00
Roberto Rosca
be618b069e Added message-based communication between L2 and L1 regarding NTN configuration parameters 2024-12-11 13:01:50 +02:00
Roberto Rosca
bd7fb492fd Removed SIB19 related UE arguments
- Removed ntn_koffset, ntn_ta_common, ntn_ta_commondrift arguments in order to be used directly from SIB19
   - Removed global NTN_UE_Koffset variable and it's use
   - Introduced getter functions for ntn related parameters
2024-12-11 13:01:42 +02:00
Robert Schmidt
27f1c0db65 Remove GTPV1U_TUNNEL_DATA_REQ ITTI message: it is not used 2024-12-11 10:34:08 +01:00
Robert Schmidt
ad9645ffb9 LTE PDCP: Use GTP direct API instead of ITTI
See parent commit for more information.

LTE PDCP uses GTP, so need to link GTP into the corresponding library.
2024-12-11 10:32:18 +01:00
Robert Schmidt
2ffb674d58 F1AP: Use GTP direct API instead of ITTI
See parent commit for more information.
2024-12-11 10:31:52 +01:00
Robert Schmidt
3c5e999f6d SDAP: Use GTP direct API instead of ITTI
Using ITTI calls for user plane implies (1) a memory allocation, (2)
mutexes, and (3) queueing messages for each user plane packet, which is
heavy. Use a direct API call instead to reduce overhead.
2024-12-11 10:31:52 +01:00
Robert Schmidt
70fa713712 Create direct API to send GTP-U msgs 2024-12-11 10:31:52 +01:00
Robert Schmidt
f6238eddec Reformat gtpv1uSend(), shorten buf/len variable names 2024-12-11 10:31:52 +01:00
Robert Schmidt
789ee2335e Correct documentation: PDCP passes to SDAP 2024-12-11 10:31:52 +01:00
Robert Schmidt
cb726af807 GTP: Fix function name in macro 2024-12-11 10:31:52 +01:00
Robert Schmidt
21bf5c464c GTPV1U_ENB_END_MARKER_REQ: use correct message struct 2024-12-11 10:31:27 +01:00
Roberto Rosca
486f4f5f96 Adding second layer timing advance
- Renamed position coordinates function (better readability)
   - Introduced large timing advance compensation mechanism
2024-12-11 10:23:11 +02:00
Roberto Rosca
f88c47ba3e Adding first layer timing advance
- Added new structure to hold timing advance parameters
   - Made SIB19 related calculation to save to this struct
   - Modified in ra to get ta struct values
2024-12-11 10:20:35 +02:00
Roberto Rosca
698ff73c7f Added SIB19 related calculations on UE 2024-12-11 10:20:34 +02:00
Roberto Rosca
06c0374ec8 Added UE support for position coordinates taken from conf files 2024-12-11 10:20:34 +02:00
Guido Casati
21df50b31e Cleanup unused imsi member in gNB_RRC_UE_s 2024-12-10 16:28:11 +01:00
Guido Casati
c0919d8533 Cleanup long time commented out lines in CMakeLists.txt 2024-12-10 16:28:11 +01:00
Sakthivel Velumani
73921dfa10 Prevent race condition when sync req received
Added a flush mechanism to actor thread. This is used to wait for all
waiting jobs in the queue to be completed.
2024-12-10 09:51:10 -05:00
Sakthivel Velumani
e5814cd62e Handle sync request out of UE_dl_preprocessing()
Move handling of sync request from MAC from UE_dl_preprocessing(). This
will process the sync request before receiving the samples of current
slot from radio so we don't 'lose' the slot.
2024-12-10 09:50:27 -05:00
Sakthivel Velumani
4f56bf903a Helper function to get center frequency
from point A.
2024-12-10 09:50:27 -05:00
Sakthivel Velumani
5ac703b580 Code cleanup
Add const to function input pointer.
2024-12-10 09:50:27 -05:00
Robert Schmidt
054506f5ae Merge branch 'integration_2024_w49' into 'develop'
Integration: `2024.w49`

See merge request oai/openairinterface5g!3148

* !3065 NAS Service Request enc/dec implementation
* !3129 Refactor UL MAC PDU decoding
* !3136 Use ninja -k option in CI
* !3137 T tracer: add macpdu traces for the NR UE
* !2392 Documentation: add multi-UE deployment with RFsimulator
* !3145 a lib has been added but missed dependancies
* !3050 doc: Add instructions for 5G NR gNB frequency configuration
* !3141 CI: Allow restart of the container if deployment fails
* !3138 Align YAML config getlist with libconfig implementation
* !3140 remove un-necessary global variables
* !3146 Updates to match more fapi-compliant tx_data.request
* !3025 New threadpool, fixed in NR UE
* CI: Remove USRP mgmt_addr from LTE-2x2 conf files
* !3147 Fronthaul xran library update to F release (2. and final step towards M-plane integration)
* !3142 Add CI test to trigger RLF with high pathloss in channelmod
2024-12-10 13:33:23 +00:00
Robert Schmidt
ac6a37fafa Merge remote-tracking branch 'origin/add-ci-nr-f1-pathloss-rlf' into integration_2024_w49 (!3142)
Add CI test to trigger RLF with high pathloss in channelmod
2024-12-10 09:15:00 +01:00
Bartosz Podrygajlo
01abee2baf Reduce rounding error in rshift of sum_det
- Use a uint64_t
 - move shift after the sum
 - add bias before shifting to reduce rounding error
2024-12-09 12:18:10 +01:00
Guido Casati
665a7d5020 Add CI test to trigger RLF with high pathloss in channelmod
Upon restoration to ploss, set to 20; when setting to 0, the UE is not
able to sync to the cell anymore.

Co-authored-by: Robert Schmidt <robert.schmidt@openairinterface.org>
2024-12-09 09:59:09 +01:00
Robert Schmidt
0b3d098654 Merge remote-tracking branch 'origin/fhi-f-release' into integration_2024_w49 (!3147)
Fronthaul xran library update to F release (2. and final step towards M-plane integration)

- xran library support -> both E and F releases
- RU delay profile removed -> not used in neither of the releases
- DU delay profile updated
- one-way delay measurements support is improved/fixed in the F release.
  However, not implemented here as it depends on the RU capabilities
2024-12-08 21:07:05 +01:00
Jaroslava Fiedlerova
ee1605b8d9 CI: Remove USRP mgmt_addr from LTE-2x2 conf files
The "mgmt_addr" parameter is not required for USRP N310 initialization. The
critical parameter for successful operation is the "addr", which specifies
the IP address of the SFP port used for data transfer.

Including both "mgmt_addr" and "addr" can lead to initialization failures if
one of the specified addresses is unavailable. Since the "mgmt_addr" is
unnecessary for this context, it has been removed to avoid potential conflicts
and simplify the configuration.
2024-12-06 16:38:13 +01:00
Jaroslava Fiedlerova
55a18514b6 Merge remote-tracking branch 'origin/thread-pool-fixed' into integration_2024_w49 (!3025)
New threadpool, fixed in NR UE

This merge request is an attempt to fix the new thread pool implementation
for use in NR UE and gNB (as well as eNB).
2024-12-06 16:36:38 +01:00
Bartosz Podrygajlo
9f03fde602 Fix several issues in ulsch_mmse_2layers
Fix incorrect array type of determ_fin which was set to int32_t while the
array holds the results of simde_mm_abs_epi32 which produces unsigned
values.

Remove assert on right-shifting negative integers as it is impossible for
determ_fin to hold negative values.

Change type of sum_det to uint32_t to prevent possible overflow.

Fix the type cast (int -> uint32_t) to prevent casting before shift in
nr_ulsch_comp_muli_sum which might have resulted in right shifting negative
integers.
2024-12-06 16:22:05 +01:00
Teodora
b7c3d593c2 Update FHI build image to support xran F release 2024-12-06 12:33:00 +01:00
Jaroslava Fiedlerova
fb1fe17293 Merge remote-tracking branch 'origin/aerial_24-2' into integration_2024_w49 (!3146)
Updates to match more fapi-compliant tx_data.request

The packing of PDUs as required in aerial for the Tx_data.Request wasn't
complaint with FAPI. That was fixed in Aerial 24-2. This change makes L2
pack the payloads in the way that Aerial now requires.
2024-12-06 11:52:45 +01:00
Jaroslava Fiedlerova
797bc1b285 Merge remote-tracking branch 'origin/remove-not-needed-global-vars' into integration_2024_w49 (!3140)
remove un-necessary global variables

Remove global variables that can be removed by a trivial way:
- simply dead globals
- or reference is a single source, so can be static

setting them static reduces the scope, that is a progress, but of course as
for all static variables, the code is still not re-entrant
2024-12-06 11:51:29 +01:00
Teodora
2b007b5d59 Add warning that E release support will be removed 2024-12-05 23:00:07 +01:00
Teodora
825543f456 Update FHI README regarding F release support 2024-12-05 23:00:07 +01:00
Teodora
574b3eb348 Fronthaul xran library F release support
Major improvements:
  1) bbu_offload - enable packet handling on BBU cores
  2) dlCpProcBurst - DL CP processing on one or more symbols
  3) SRS CP processing - depends on the RU capabilities that can be
    retreived via M-plane (if RU is CAT B)
  4) nSecDesc - the number of section descriptors per symbol; it was hardcoded to 0 in E release;
    depends on the RU capabilities that can be retreived via M-plane
  5) RunSlotPrbMapBySymbolEnable - enable PRB mapping by symbol with multisection;
    depends on the RU capabilities that can be retreived via M-plane
  6) DSS (Dynamic Spectrum Sharing) support - depends on the RU capabilities that can be retreived via M-plane

Minor fixes in F that exist in E:
  1) prach_config->nPrachFilterIdx - explained in commit ID f3045396
  2) T1a_min_cp_dl - explained in the commit under title "Clarification on DU delay profile"
  3) fh_config->nULRBs - explained in commit under title "Further clarification on xran E release parameters"

Removed const for prb_conf argument in oran_allocate_cplane_buffers()
function, as F release requires the not const struct for
xran_init_PrbMap_by_symbol_from_cfg() and xran_init_PrbMap_from_cfg()
even though the struct is not modified inside of these functions.
2024-12-05 22:59:58 +01:00
Teodora
197db6a65f Correction on PRACH offset in FHI README
- this should have been done in the commit ID b334feb9
2024-12-05 22:59:58 +01:00
Teodora
698245c7e9 Further clarification on xran E release parameters
- remove xran parameter io_cfg->port logging => this parameter
    is filled within xran library in both E and F releases
  - PRACH offset explanation; not limited to >= max(Ntx, Nrx);
    workaround done in xran to support PRACH eAxC IDs same as PUSCH eAxC IDs
  - DL PRB not used in xran; UL PRB used in xran F release, therefore
    removed from the patch
  - these fixes should have been done in the commit ID f3045396
2024-12-05 22:59:58 +01:00
Teodora
dd4ffe3439 Clarification on One-Way Delay Measurements 2024-12-05 22:59:47 +01:00
Jaroslava Fiedlerova
fee95ed36f Merge remote-tracking branch 'origin/align-yaml-to-config' into integration_2024_w49 (!3138)
Align YAML config getlist with libconfig implementation

This aligns the behavior of params_yaml with params_config library:

- when a mapping is read using getlist it returns the number of elements in
  the mapping instead of 0
- when a mapping is read using get it returns the number of parameters used
  for input
2024-12-05 19:22:51 +01:00
Jaroslava Fiedlerova
429e98e4f1 Merge remote-tracking branch 'origin/ci-container-restart' into integration_2024_w49 (!3141)
CI: Allow restart of the container if deployment fails

In CI we sometimes encounter fail of the gNB/UE deployment (and fail of the test
scenario) caused by unsuccessful initialization of the USRP N310.

This MR enables to optionally restart the gNB or UE container, if the deployment
fails on the health check during start up. By default, restarts of the container
are not allowed, but we can enable them by setting num_attemps > 1 for a given
deployment in the XML file.

Logs from failed deployment attempts are collected.

This MR aims to avoid known CI failure caused by "USRP N310 Initialization Failure"
mentioned in #871.
2024-12-05 19:15:03 +01:00
Jaroslava Fiedlerova
8c5b37deae Merge remote-tracking branch 'origin/doc-frequency-config' into integration_2024_w49 (!3050)
doc: Add instructions for 5G NR gNB frequency configuration
2024-12-05 19:12:40 +01:00
Jaroslava Fiedlerova
c1e7c3795f Merge remote-tracking branch 'origin/fix-lacking-barrier-actor-dependancy' into integration_2024_w49 (!3145)
a lib has been added but missed dependancies
2024-12-05 19:09:41 +01:00
Jaroslava Fiedlerova
2ef4dbe6b9 Merge remote-tracking branch 'origin/rfsimdoc' into integration_2024_w49 (!2392)
Documentation: add multi-UE deployment with RFsimulator

Extended doc/NR_SA_Tutorial_OAI_nrUE.md with section about how to run multiple UEs

- multiple UEs with namespaces (provided new script)
- multiple UEs with Docker UEs
- updated rfsimulator and channel simulation tutorials
- updated README.md
2024-12-05 19:07:13 +01:00
Rúben Soares Silva
f733120986 Move the packing logic for TAG = 2, to reuse existing functions.
This change makes it so the fapi_nr_p7_message_pack is used to pack TX_DATA.request for Aerial, reducing the amount of repeated code.
Add the capability to pack TLVs with TAG=2 (offset from first address)

Packs the TLV.length differently according to whether or not Aerial is in use ( for Aerial TLV.length is 16-bit, for OAI is 32-bit )
2024-12-05 16:38:32 +00:00
Jaroslava Fiedlerova
027631eb70 CI: Remove GetContainerName() - not used anymore
No need to get container name, we work directly with docker services.
2024-12-05 14:13:22 +01:00
Jaroslava Fiedlerova
f786d92bc9 CI: Allow restart of the container if it fails on the first attempt
In CI we sometimes encouter fail of the gNB/UE deployment (and fail of
the pipeline) caused by unsuccsessful initialization of the USRP N310.
Restart the container if the health check fails during initialization.

Introduce a configurable parameter (from XML) to set max number of
attempts for the container deployment.

Store logs from failed deployment attempts.
2024-12-05 14:13:22 +01:00
Jaroslava Fiedlerova
f078e6f9c7 CI: modify and rename CopyinContainerLog to use docker services 2024-12-05 14:13:22 +01:00
Jaroslava Fiedlerova
a9ca4a5481 CI: create GetServiceHealth()
Rework GetContainerHealth() to work with docker compose and services,
instead of using docker and containers. Return health and message about
deployment status (used for console and HTML logging) for a given service.
2024-12-05 14:13:18 +01:00
Guido Casati
3438d45d6c Add tutorial about how to run multiple UEs
* multiple UEs with namespaces (provided new script)
* multiple UEs with Docker UEs
* updated rfsimulator and channel simulation tutorials
* updated README.md

Co-authored-by: Arash Sahbafard <arash.sahbafard@silicon-austria.com>
2024-12-05 13:50:36 +01:00
Robert Schmidt
5e00850aee Delete commented code in mme_app.c 2024-12-05 12:11:29 +01:00
Bartosz Podrygajlo
793bdd86ae Adjust reference processing time for 40Mhz phytest 2024-12-05 11:32:23 +01:00
Laurent THOMAS
443307a34a a lib has been added but missed dependancies 2024-12-05 11:29:42 +01:00
Jaroslava Fiedlerova
80736bb2bd Merge remote-tracking branch 'origin/t-tracer-nrue-macpdu' into integration_2024_w49 (!3137)
T tracer: add macpdu traces for the NR UE

MIB, SIB1, random access and regular scheduling are traced.

At the beginning of a connection (rrc setup request and rrc setup), the
RNTI is reported as 0. Might be fixed, somehow, if absolutely needed (not
sure).
2024-12-05 10:19:12 +01:00
Jaroslava Fiedlerova
86a47d7061 Merge remote-tracking branch 'origin/build-options' into integration_2024_w49 (!3136)
Use ninja -k option in CI

Use ninja -k10 in the CI to keep going after build errors to see more errors
than just the first.
2024-12-05 10:18:20 +01:00
Jaroslava Fiedlerova
393185dfb5 Merge remote-tracking branch 'origin/Refactor_UL_MAC_PDU_decoding' into integration_2024_w49 (!3129)
Refactor UL MAC PDU decoding

Refactor the UL MAC PDU decoding: A single function is created to decode the
entire MAC subheader
uint8_t decode_ul_mac_sub_pdu_header(uint8_t *pduP, uint8_t *lcid, uint16_t *length).
It returns the length of the MAC subheader and outputs the LCID and Length.

This new function is called from 2 functions: lcid_crnti_lookahead() and
nr_process_mac_pdu().

After calling it in nr_process_mac_pdu(), the validation of the PDU can be
made for all the MAC subPDUs in a single place, allowing for less and more
clean code (as opposed with the previous version where the validation was
made multiple times inside the LCID switch-case).

Additionally, this MR updates the list of LCIDs as in 3GPP TS 38.321 v18.3.0
Table 6.2.1-2: Values of LCID for UL-SCH when the LX field is not present or
is set to 0.
2024-12-05 10:12:23 +01:00
Jaroslava Fiedlerova
2fad00010b Merge remote-tracking branch 'origin/nr-ue-nas-service-request' into integration_2024_w49 (!3065)
NAS Service Request enc/dec implementation

NAS Service Request:

- encoding
- decoding
- unit test

Related to #852
2024-12-05 10:11:20 +01:00
Teodora
83c88affec Clarification on DU delay profile
- explanation on DU delay parameters used in E and F xran releases
2024-12-04 18:59:16 +01:00
Teodora
68a3435689 Remove RU delay profile
- xran E release (and later F) doesn't use them
  - update fhi_72 section in fronthaul config files by removing
    unnecessary RU delay parameters
2024-12-04 18:59:16 +01:00
Nick Hedberg
665aac0a94 Updates to match more fapi-compliant tx_data.request 2024-12-04 17:00:50 +00:00
Bartosz Podrygajlo
21dafbcde7 New threadpool
- removed some whitespace noise.
 - cleaned up CMakeLists.txt
 - reintegrated task_manager.c into thread-pool.c
 - cleaned up some unnecessary code

Co-authored-by: Cedric Roux <cedric.roux@eurecom.fr>
Co-authored-by: Mikel Irazabal <mikel.irazabal@openairinterface.com>
2024-12-04 17:54:51 +01:00
Laurent THOMAS
279d49415f remove un-necessary global variables 2024-12-04 12:26:36 +01:00
luis_pereira87
99ea71462b Refactor UL MAC PDU decoding 2024-12-04 09:07:14 +00:00
Jaroslava Fiedlerova
e1d06cfef8 CI: add CI unit test for simple fail deployment with 2 services 2024-12-04 09:43:45 +01:00
Jaroslava Fiedlerova
bf210241bd doc: Add instructions for 5G NR gNB frequency configuration 2024-12-03 17:07:50 +01:00
Robert Schmidt
c942fe43a9 Merge branch 'integration_2024_w48' into 'develop'
Integration: `2024.w48`

See merge request oai/openairinterface5g!3134

* !2951 Integrate Tracy with NR UE
* !2985 E1AP Bearer Context Setup encoding/decoding library and unit tests
* !3115 T2: minor fix for 4x4 processing
* !3117 F1AP lib: minor fixes
* !3126 NR MSG3 scheduling improvements
* !3128 NR UE RRC T304 in phy-test mode
* !3132 Run the last job of gNB pusch channel estimation inline
* !3133 NR UL HARQ handling improvements
* !3091 Update NR UE threading model
* !3030 Imscope updates
* !3131 FAPI P7 Refactoring and unitary test creation
* !3033 Increase the number of UE supported at gNB by having more than 1 PUCCH2 frequency occasion per slot
2024-12-03 15:09:59 +00:00
Cedric Roux
5ff4b7a328 T tracer: add macpdu traces for the NR UE
MIB, SIB1, random access and regular scheduling are traced.

At the beginning of a connection (rrc setup request and rrc setup), the
RNTI is reported as 0. Might be fixed, somehow, if absolutely needed (not
sure).
2024-12-03 15:46:12 +01:00
Robert Schmidt
fb0a9b64e4 Merge remote-tracking branch 'origin/gNB_supporting_more_UEs' into integration_2024_w48 (!3033)
Increase the number of UE supported at gNB by having more than 1 PUCCH2
frequency occasion per slot
2024-12-02 16:27:07 +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
b5675d3eea Merge remote-tracking branch 'origin/nfapi-p7-refactoring' into integration_2024_w48 (!3131)
FAPI P7 Refactoring and unitary test creation

This MR is a follow-up to the work done in !2714 this time separating
the P7 FAPI messages into its own library (nr_fapi_p7).

In the same way, utility functions to copy, free and compare have been
added for each message, as well as an addition function to get the
allocated size for a message, which is used for the messages that can be
too big to fit in a buffer that's allocated in the stack.

Unitary tests have been added for each of the messages, testing
pack/unpack and the utility functions added.
2024-11-30 12:59:25 +01:00
Robert Schmidt
9409348d23 Use ninja -k option in CI
Some users of the OAI CI complain that since we build with -Werror, it
is difficult to see all warnings/errors and fix them, necessitating
multiple attempts at times to see all warnings. To allow them to see
more warnings, use ninja option -k10 to keep going after errors, and
show more errors at once.
2024-11-29 16:20:12 +01:00
Robert Schmidt
a89aab8d84 build_oai: add --build-tool-opt to pass options to build tool
There are command line options that one might pass to ninja/make, but
for which cmake does not provide an interface. For instance, make/ninja
support -k/-kN to "keep going" after errors. Cmake does not provide an
option, but it is still possible to pass this. Make a build_oai option
to allow this, used in the next commit.
2024-11-29 16:15:09 +01:00
francescomani
9c44d6ee86 number of supported ue updated in feature set file 2024-11-29 16:13:58 +01:00
francescomani
68c95f80a1 increase the number of UE supported at gNB by having more than 1 PUCCH2 frequency occasion per slot 2024-11-29 16:13:54 +01:00
Robert Schmidt
f5888225ad Merge remote-tracking branch 'origin/imscope-docking' into integration_2024_w48 (!3030)
Imscope updates

- Using imgui docking branch - allows window docking.
- Moved scopes to different windows to allow docking.
- Disabled scatterplot for time domain samples - issues with amount of
  vertices caused segfaults.
- Disabled IQ heatmaps for RX IQ samples on gNB and UE - this was
  incorrect and currently I don't know how to fix it. This will be
  reenabled once it is.
- added a simple menu and disabled demo windows by default.
2024-11-29 15:52:50 +01:00
Robert Schmidt
ca3739e806 Merge remote-tracking branch 'origin/nr-ue-threading-improvements' into integration_2024_w48 (!3091)
Update NR UE threading model

This updates the NR UE threading model by preventing calling threadpool
from threadpool and fixes deadlock issues related to processSlotTX. By
making processSlotTX run to completion instead of starting and waiting
for other threads to finish it prevents locking thread pool cores,
therefore prevening deadlocks.

There is a slight difference here compared to the previous version where
I do not use the UL actor as I believe it is not necessary,
processSlotTX satisfies the run-to-completion requirement now. If in the
future any UL procedure would be parallelized using the thread pool it
should either be done in a run-to-completion model or the processSlotTX
function should be taken off the thread pool.

The documentation has been updated.
2024-11-29 15:51:56 +01:00
Cedric Roux
891ac15aae T tracer: bugfix: use correct variable 2024-11-29 15:35:24 +01:00
Cedric Roux
4e5c21fc12 bugfix: call T tracer only after setting values 2024-11-29 15:30:28 +01:00
Bartosz Podrygajlo
f64451bd67 Add metadata to gNbTimeDomainSamples sink
Added slot and frame to gNbTimeDomainSamples in imscope
2024-11-29 11:24:00 +01:00
Bartosz Podrygajlo
ef803d02e4 Add default docking window layout for imscope 2024-11-29 11:23:27 +01:00
Bartosz Podrygajlo
fddc52de38 Imscope updates
- Using imgui docking branch - allows window docking.
 - Moved scopes to different windows to allow docking.
 - Disabled scatterplot for time domain samples - issues with amount of vertices caused segfaults.
 - Disabled IQ heatmaps for RX IQ samples on gNB and UE - this was incorrect and currently I don't know
   how to fix it. This will be reenabled once it is.
 - added a simple menu and disabled demo windows by default.
2024-11-29 11:23:27 +01:00
Rúben Soares Silva
f828e95155 Harmonize SFN and Slot typing with SCF standard 2024-11-29 09:15:08 +01:00
Rúben Soares Silva
ebf07dfc62 Add handler to pack vendor ext SLOT.response 2024-11-29 09:15:08 +01:00
Rúben Soares Silva
20a2f9671a Use FAPI utility functions to handle P7 messages in Aerial 2024-11-29 09:15:08 +01:00
Robert Schmidt
4d22ac6fd0 Provide handle_nr_srs_measurements() in 4G
4G/5G FAPI code is located in the same file. Since 5G code calls 5G
specific functions, these functions need to be defined in 4G.

The solution would be to separate the FAPI changes into 4G and 5G.
2024-11-29 09:15:08 +01:00
Rúben Soares Silva
28e3102858 Address memory leaks found in P7 messages handling
Add nr_fapi_p7 library to NFAPI_USER_LIB for access to utility functions

Change message handlers to use the utility functions to  copy and properly free the messages

Change the SRS handler to call the handler for the measurements instead of trying to copy to RC.gNB[0], which does not exist

Change nfapi_nr_p7_message_unpack to not allocate unneeded memory
2024-11-29 09:15:04 +01:00
Rúben Soares Silva
e8fe6cefaa Avoid packing/unpacking parameters not used by Aerial 2024-11-29 09:15:04 +01:00
Rúben Soares Silva
bcbf7ab975 Move functions for packing/unpacking RACH.indication
Changed parameter in unpack function to be inline with other unpack functions.
Changed nfapi_p7_allocate call to calloc to avoid dependency to NFAPI_LIB.

Added unitary test for RACH.indication( test pack/unpack, free, copy and compare )
Added constant NFAPI_NR_RACH_IND_MAX_PDU to follow constants related to other P7 messages limiting the maximum number of PDUs to use.

Removed now unneeded dependency to NFAPI_LIB and NFAPI_USER_LIB
2024-11-29 09:15:04 +01:00
Rúben Soares Silva
08ee4cfcc5 Add utility functions for RACH.indication.
Extra utility function to calculate allocated memory added.
2024-11-29 09:15:04 +01:00
Rúben Soares Silva
3fc784cda5 Move functions for packing/unpacking SRS.indication
Changed parameter in unpack_nr_srs_indication to void * to be inline with other unpack procedures.
Added memory allocation for pdu_list inside unpack function.

Add unitary test for SRS.indication( test pack/unpack, free, copy and compare )
Added rands16 to provide random int16_t values, needed for SRS.indication unitary test
Added constant NFAPI_NR_SRS_IND_MAX_PDU to follow constants related to other P7 messages limiting the maximum number of PDUs to use.
2024-11-29 09:15:04 +01:00
Rúben Soares Silva
7be347f04d Add utility functions related to SRS.indication.
This adds the equality, free and copy functions for SRS.indication message as described in the Table 3–129 of SCF222.10.04, it does not add the functions for the report type structures, as these are always sent/received inside the uint32_t array.
The utility functions for these will be added at a later commit, and subsequently tested in the upcoming unitary test for SRS.indication.
Extra utility function to calculate allocated memory added.
2024-11-29 09:15:04 +01:00
Rúben Soares Silva
6d54870fc9 Fix SRS.indication unpacking for Aerial.
When using Aerial, the Report TLV on SRS.indication is transported in a different buffer, as such, it needs to be unpacked separately.
2024-11-29 09:15:04 +01:00
Rúben Soares Silva
91a75fe453 Fix pack/unpack of SRS Report TLV value.
Since report_tlv->length is in bytes, and the value is an array of uint32_t, the number of uint32_t to be pushed/pulled is (length + 3) /4.
2024-11-29 09:15:04 +01:00
Rúben Soares Silva
36f65160fd Fix pack/unpack of SRS beamforming report.
Fixes the pack/unpack functions to allow multiple reported symbols, instead of just one.
Applied clang-format to both functions.
2024-11-29 09:15:04 +01:00
Rúben Soares Silva
c905655b4e Cleanup normalized_channel_iq_matrix.
Apply clang-format to pack/unpack procedures.
Add comments to improve readability of iqSize usage.
Fix unpacking return value to not return 0 on success.
2024-11-29 09:15:04 +01:00
Rúben Soares Silva
1160be3ffe Add pack/unpack for missing SRS Report.
Adds the packing/unpacking procedures for Channel SVD Representation ( Table 3-133 ).
2024-11-29 09:15:04 +01:00
Rúben Soares Silva
e10693939d Add missing SRS Report type struct.
Adds the structure for Channel SVD Representation ( Table 3-133 ), a missing report type for the SRS.indication message.
2024-11-29 09:15:03 +01:00
Rúben Soares Silva
6a34439c86 Fix SRS beamforming_report reported symbol list.
Renames nfapi_nr_srs_reported_symbol_t prgs into *reported_symbol_list for two reasons:
  So that the name is more representative of what the parameter represents.
  For it to actually be a list, and not assume only 1 reported symbol is used.

Allocate reported_symbol_list in unpack_nr_srs_beamforming_report.

Updated all references to prior prgs to point to the first position of reported_symbol_list, still only effectively using the first reported_symbol.

Rename fill_srs_reported_symbol_list into fill_srs_reported_symbol and update input parameter name, since it only fills the information related to one reported symbol
2024-11-29 09:15:03 +01:00
Rúben Soares Silva
3272225e1f Move functions for packing/unpacking UCI.indication
Reordered PDU pack/unpack function to follow PDU value order
Changed nfapi_p7_allocate calls to calloc to avoid dependency from FAPI lib to nFAPI lib.
Add unitary test for UCI.indication( test pack/unpack, free, copy and compare )
2024-11-29 09:15:03 +01:00
Rúben Soares Silva
3682164166 Fix pack/unpack for UCI.Indication
Fix PUCCH Format2/3/4 value to be indexed at 0, not 2.
This is according to Table 3-66 of SCF222.10.02

Add utility functions related to UCI.indication
Extra utility function to calculate allocated memory added.
2024-11-29 09:15:03 +01:00
Rúben Soares Silva
53ce0c8a24 Move functions for packing/unpacking CRC.indication
Changed parameter of `unpack_nr_crc_indication` to void* to stay inline with other unpack procedures.
Changed nfapi_p7_allocate call to calloc to avoid dependency from FAPI lib to nFAPI lib.

Add unitary test for CRC.indication( test pack/unpack, free, copy and compare )
2024-11-29 09:15:03 +01:00
Rúben Soares Silva
ff6e51879a Correctly allocate cb_crc_status for CRC.indication
Now allocates memory for `uint8_t* cb_crc_status` before pulling in unpack procedure.

Add utility functions related to CRC.indication.
Extra utility function to calculate allocated memory added.
2024-11-29 09:15:03 +01:00
Rúben Soares Silva
aeac2b0df3 Move functions for packing/unpacking RX_DATA.indication
Changed parameter of unpack_nr_rx_data_indication to void* to be inline with other unpack procedures.
Changed nfapi_p7_allocate calls to calloc to avoid dependency from FAPI lib to nFAPI lib.
Add unitary test for RX_DATA.indication( test pack/unpack, free, copy and compare )
2024-11-29 09:15:03 +01:00
Rúben Soares Silva
3ec9006f11 Allow 32 bit PDU_Length in RX_DATA.indication.
Changes pack/unpack procedure to expect pdu_length of 32 bits instead of 16.
This change was first added for compatibility with Aerial L1.

Add utility functions related to RX_DATA.indication
Extra utility function to calculate allocated memory added.
2024-11-29 09:15:03 +01:00
Rúben Soares Silva
1f6465c00a Move functions for packing/unpacking TX_DATA.request
Add unitary test for TX_DATA.request( test pack/unpack, free, copy and compare )
2024-11-29 09:15:03 +01:00
Rúben Soares Silva
04ed300df4 Remove unneeded variables from TX_DATA.request pack/unpack functions
Allocate memory for TX_DATA.request TLV value pointer on tag == 1
In the past, this wasn't noticed because tag == 1 is not used

Add utility functions related to TX_DATA.request
Add extra function to calculate allocated memory
2024-11-29 09:15:03 +01:00
Rúben Soares Silva
00145559aa Move functions for packing/unpacking UL_DCI.request
Add unitary test for UL_DCI.request ( test pack/unpack, free, copy and compare )
2024-11-29 09:15:03 +01:00
Rúben Soares Silva
c448de50d4 Improve readability in UL_DCI.request pack/unpack functions
Remove value hardcode in packing function

Add utility functions related to UL_DCI.request
2024-11-29 09:15:03 +01:00
Rúben Soares Silva
a6ab55150c Move functions for packing/unpacking SLOT.indication
Add unitary test for SLOT.indication ( test pack/unpack, free, copy and compare )
2024-11-29 09:15:03 +01:00
Rúben Soares Silva
18799ef44b Remove cast in pack_nr_slot_indication
Add utility functions related to SLOT.indication
2024-11-29 09:15:03 +01:00
Rúben Soares Silva
75f213ea92 Move functions for packing/unpacking UL_TTI.request
Add unitary test for UL_TTI.request ( test pack/unpack, free, copy and compare )

Add function rand32_range
2024-11-29 09:15:03 +01:00
Rúben Soares Silva
0653c38a9d Fix packing/unpacking procedures for UL_TTI.request
Create separate function to pack/unpack rx_beamforming PDU
Reorder PDU handling order to follow from 0 to 3
Changed PUSCH pdu_bitmap switch to separate if to handle multiple optional sub-pdus
Fix bit_len_harq size to 16 bit

Add utility functions related to UL_TTI.request
2024-11-29 09:15:03 +01:00
Rúben Soares Silva
9b8bc21d84 Move functions for packing/unpacking DL_TTI.request
Add unitary test for DL_TTI.request ( test pack/unpack, free, copy and compare )
2024-11-29 09:15:03 +01:00
Rúben Soares Silva
e3fc08ede9 Move DCI payload generation functions to new file
Create header file with DCI payload generation
functions in order for them to be available to
the remainder P7 unitary tests
2024-11-29 09:15:03 +01:00
Rúben Soares Silva
437149ae5a Fix packing/unpacking procedures for DL_TTI.request
Add pack/unpack functionality for parameters
added in previous commit
Add utility functions related to DL_TTI.request,
creating 2 news files to contain these functions
Reorder switch to follow PDU Type order
2024-11-29 09:15:03 +01:00
Rúben Soares Silva
fee7c74f0f Move ve copy function to common FAPI library 2024-11-29 09:15:03 +01:00
Rúben Soares Silva
3198b9fe30 Move utility macros to common FAPI library 2024-11-29 09:15:03 +01:00
Rúben Soares Silva
b1a2857144 Add missing parameters to DL_TTI.request PDUs 2024-11-29 09:15:03 +01:00
Rúben Soares Silva
0589923283 Add general FAPI P7 pack/unpack functions 2024-11-29 09:15:03 +01:00
Rúben Soares Silva
19f359c78d Expose P7 pack functions to P7 FAPI library
This makes it so the functions are available to both FAPI and nFAPI libraries, and to more easily move them later to the FAPI library, while being available for nFAPI
2024-11-29 09:15:03 +01:00
Rúben Soares Silva
f409b91768 Move check_nr_fapi_unpack_length to common FAPI lib
Add P7 message cases to check_nr_fapi_unpack_length
Add SLOT.response vendor extension msg id to enum
2024-11-29 09:15:03 +01:00
Rúben Soares Silva
4e5b841a16 Separate LTE and NR (n)FAPI headers
Update NR P5 and P7 nFAPI headers to have 32-bit message_length
In the NR functions, this causes the header parameters following message_length to have their position shifted by 2 bytes, due to the increase in message_length size.

Change needed to accommodate SCF222.10.02 Table 3-3

Separates nfapi_p4_p5_message_header_t and nfapi_nr_p4_p5_message_header_t

Change the callbacks signature to accept/return void* intead of expecting a particular header type, being the NR/LTE distinction done inside the callback functions.

Create NR related functions for nFAPI transmit timestamp and checksum calculation.

Move nfapi_p7_codec_config_t and nfapi_p4_p5_codec_config_t to separate header to be shared between LTE and NR VNF/PNF

Move nfapi_nr_timing_info_t into NR header.

Move NR specific function declarations to NR header.
2024-11-29 09:15:03 +01:00
Rúben Soares Silva
434a6b5e84 Apply Clang-Format to nFAPI P5 and P7 header structures. 2024-11-29 09:15:03 +01:00
Rúben Soares Silva
37ace26f83 Expose TX_DATA.request functions
Expose pack/unpack functions for TX_DATA.request
for usage in P7 FAPI library
2024-11-29 09:15:03 +01:00
Rúben Soares Silva
91279388b8 Creation of empty FAPI P7 library for separation of related functions.
Note: Dependency in NFAPI_LIB and NFAPI_USER_LIB to be removed later
2024-11-29 09:15:03 +01:00
Rúben Soares Silva
8a185cff69 Move P5 general packing/unpacking function declaration into nr_fapi_p5 header.
Fix Assert condition to properly check that body was packed successfully
Fix retval value when performing bitwise AND with push16
Remove commented code
2024-11-29 09:15:03 +01:00
Robert Schmidt
c679112f50 Remove useless global variable
Remove dummy_subframe variable, which is initialized once in
start_request() and then copied to memory on the heap. It is not needed.

In nr_start_request(), it should not be necessary, but we keep it for
the moment to not make more changes than necessary.

This avoids a segfault for me, but I am not exactly sure why.
2024-11-29 09:15:03 +01:00
Robert Schmidt
a9da755338 nfapi pack/unpack: OAI only supports 14 symbols
All packing was wrong and used 12 instead of 14 symbols. However, as of
now and my knowledge, OAI only supports 14 symbols.
2024-11-29 09:15:03 +01:00
Robert Schmidt
ae69028050 Test one specific TDD configuration
The previous code fills random number in the TDD config, which leads to
unrealistic TDD patterns. Filling wtih a specific, realistic TDD config
allowed to fix the bug in the next commit.
2024-11-29 09:15:03 +01:00
Robert Schmidt
dbfb806afa Scheduler: Avoid out-of-bounds read/write
The scheduler might receive PUSCH data when it does not expect it.
Handle this case.
2024-11-29 09:15:03 +01:00
Robert Schmidt
f1fb797ff6 Increase max nFAPI packed message size to 32768
Testing showed that some messages could be at least slightly bigger than
the previous maximum size of 8192. Given that the maximum transport
block could be larger, increase this value to 32768.
2024-11-29 09:15:03 +01:00
Robert Schmidt
a12fdb68b7 unpack_dl_tti_ssb_pdu_rel15_value(): match pack function
unpack_dl_tti_ssb_pdu_rel15_value() reads two additional bytes,
seemingly for RX power information. However, table 3-79 does not
contain such info, so I remove to match the corresponding pack function
pack_dl_tti_ssb_pdu_rel15_value().

TODO: tx power info relevant?
2024-11-29 09:15:03 +01:00
Robert Schmidt
0cc08b1070 Correct pucch_pdu->bit_len_harq: is pull8 according to SCF 222.10 2024-11-29 09:15:03 +01:00
Robert Schmidt
179302496b Fix PNF packing functions to match existing VNF unpacking 2024-11-29 09:15:03 +01:00
Robert Schmidt
cbecc3432a Correct UL_tti.request messages
- Unpack is missing pusch_identity
- Unpack: put rb_bitmap instead of resource_alloc, remove dmrs_ports

In both cases, bring it in line with packing
2024-11-29 09:12:56 +01:00
Robert Schmidt
5e72bd70bc nfapi: Fixup BG (un)packing and error message 2024-11-29 09:12:55 +01:00
Romain Beurdouche
f1d9638e37 Add note to 'doc/README.md' to insight readers to checkout the documentation at their version of the repository. 2024-11-29 09:12:55 +01:00
Romain Beurdouche
71d91b0542 Add notes around sample SA gNB and nrUE commands in most basic tutorials 'NR_SA_Tutorial_COTS_UE.md' and 'NR_SA_Tutorial_OAI_nrUE.md'.
The notes mention that for versions previous to 2024.w45, the --sa argument should be added to run in SA mode.
2024-11-29 09:12:55 +01:00
Robert Schmidt
535c8a496a Reformulate section on standalone mode
Since tag 2024.w45/commit f54ca5714e,
standalone mode/--sa is the default and does not exist. Correspondingly,
it has been removed from the documentation.

For users reading recent documentation, but running an older version of
OAI, there might be a mismatch in that --sa is necessary to run OAI, but
not given in the documentation. Provide explanatory text to make users
aware of this.
2024-11-29 09:12:55 +01:00
Robert Schmidt
a61b5f303d Merge remote-tracking branch 'origin/NR_remove_ul_harq_ra_warning' into integration_2024_w48 (!3133)
NR UL HARQ handling improvements

to avoid printing warning on unexpected HARQ PID for RA
2024-11-28 18:50:20 +01:00
Robert Schmidt
ce9aaa8f53 Merge remote-tracking branch 'origin/improve-chanest-single-antenna' into integration_2024_w48 (!3132)
Run the last job of gNB pusch channel estimation inline

In case of 1 antenna this prevents the usage of threadpool which
eliminates the thread pool overhead.  In case of >1 antenna the
threadpool contention should be reduced providing smaller benefits.
2024-11-28 18:49:52 +01:00
Robert Schmidt
0d63641019 Merge remote-tracking branch 'origin/NR_RR_UE_phy_test_t304' into integration_2024_w48 (!3128)
NR UE RRC T304 in phy-test mode

RRC timer T304 is stopped upon completion of the associated RA handover
procedure. There is no RA procedure in phy-test mode so T304 should not
be started to avoid unwanted expiration.
2024-11-28 18:49:30 +01:00
Robert Schmidt
57c20d891d Merge remote-tracking branch 'origin/NR_gNB_MSG3_fix' into integration_2024_w48 (!3126)
NR MSG3 scheduling improvements

- fix wrong condition on MSG3 allocation assertion message
- remove assertion altogether and handle properly the case where MSG3
  can't be allocated
2024-11-28 18:49:04 +01:00
Robert Schmidt
e898d278cc Merge remote-tracking branch 'origin/f1ap-lib-minor-fixes' into integration_2024_w48 (!3117)
F1AP lib: minor fixes

- add new enc/dec functions
- extend copy function scope
- add compile define
- fix equality check
2024-11-28 18:48:36 +01:00
Robert Schmidt
a8081914fb Merge remote-tracking branch 'origin/t2-fix-4x4' into integration_2024_w48 (!3115)
T2: minor fix for 4x4 processing

- correct max number of LDPC segments for T2 processing
- use pointer arithmetics in retrieve_ldpc_enc_op() in T2 lib to
  optimize loop processing
2024-11-28 18:47:40 +01:00
Robert Schmidt
7a7e574998 Merge remote-tracking branch 'origin/e1ap-msg-encdec-tests' into integration_2024_w48 (!2985)
E1AP Bearer Context Setup encoding/decoding library and unit tests

E1AP encoding/decoding library (TS 38.463) and unit test for:
- E1 Bearer Context Setup Request
- E1 Bearer Context Setup Response
2024-11-28 18:47:07 +01:00
Robert Schmidt
bbc35c7a0e Merge remote-tracking branch 'origin/tracy-profiler' into integration_2024_w48 (!2951)
Integrate Tracy with NR UE

This commit enables the optional use of Tracy for profiling NR UE. See
https://github.com/wolfpld/tracy/releases/tag/v0.11.1 for details.

More instructions are in the commit.
2024-11-28 18:46:35 +01:00
francescomani
31d19ec38d fixes for handle_nr_ul_harq in case of RA
to avoid printing warning on unexpected harq pid
2024-11-28 09:24:10 +01:00
Bartosz Podrygajlo
97269a9d2d Update nr-ue-design.md
Add information about newly added actors to NR UE.
2024-11-27 18:15:30 +01:00
Bartosz Podrygajlo
afdf5aa49b Increase number of DL Actors to 4
This increases the number of concurrent DL slots processed from 2 to 4.
2024-11-27 18:15:30 +01:00
Bartosz Podrygajlo
6bd50d6e5a Use DL actor for UE_dl_processing instead of thread pool 2024-11-27 18:15:30 +01:00
Bartosz Podrygajlo
3b7c29f2d3 Actor model imlementation
Add actor library which implements the Actor model (see  https://en.wikipedia.org/wiki/Actor_model).
2024-11-27 18:15:24 +01:00
Bartosz Podrygajlo
654cffe39f Do not start processSlotTx before it is ready to run.
Implement run-to-completion for processSlotTX. This is achieved by using a new
dynamic_barrier_t which allows to specify callback after the first join has been
made.
2024-11-27 18:14:59 +01:00
Bartosz Podrygajlo
ea0ea2ff8f Thread barrier implementation
This commit introduces dynamic_barrier_t. Its a thread barrier that counts joins
but allows callback to be specified later. See std::barrier for a basic barrier
description.
2024-11-27 18:14:59 +01:00
Bartosz Podrygajlo
e5b19ad121 Run the last job of gNB pusch channel estimation inline
In case of 1 antenna this prevents the usage of threadpool which eliminates
the thread pool overhead.
In case of >1 antenna the threadpool contention should be reduced providing
smaller benefits.
2024-11-27 18:01:21 +01:00
Guido Casati
3dd177bbce Use calloc_or_fail in f1ap_lib_test with the explicit size derived from pointer dereferencing 2024-11-27 10:40:10 +01:00
Guido Casati
0bcf504209 Fix equality check in eq_f1ap_setup_failure 2024-11-27 10:40:10 +01:00
Guido Casati
7ae020599a Add compile definitions ENABLE_TESTS
* this is necessary to enable the PRINT_ERROR logs in the E1/F1 libs
2024-11-27 10:40:10 +01:00
Guido Casati
a05084de95 Extend the scope of free_f1ap_cell and use it in stack 2024-11-27 10:40:10 +01:00
Guido Casati
22f3476d88 Use copy_f1ap_served_cell_info in update_cell_info
* tac is optional IE, and it was assumed as always present
* is now allocated in DU container by copy_f1ap_served_cell_info
  when present in the updated cell info and missing in the
  DU container
2024-11-27 10:40:10 +01:00
Guido Casati
40cc035b8c Extend the scope and refactor copy_f1ap_served_cell_info
* allocate memory for pointers only if necessary
* removed redundant copies of simple data types
2024-11-27 10:40:10 +01:00
Guido Casati
a394a40d5d Add and use F1 encode function for Transmission Bandwidth and NR Frequency Info in F1 interface management lib 2024-11-27 10:40:10 +01:00
francescomani
5c69623576 remove assertion in MSG3 allocation to handle the unwanted scenario by reschedulng RA 2024-11-27 10:19:21 +01:00
francescomani
b398b1bd1d fix MSG3 allocation assertion condition 2024-11-27 10:19:17 +01:00
Guido Casati
927b157714 Add test for E1 Bearer Context Setup Response 2024-11-27 10:18:20 +01:00
Guido Casati
10b07c774d Use enc/dec lib for E1 Bearer Context Setup Response in stack 2024-11-27 10:18:19 +01:00
Guido Casati
d56e8a2de1 Add enc/dec library for E1AP Bearer Context Setup Response 2024-11-27 10:17:46 +01:00
Guido Casati
ccab22f41f Add test for E1AP Bearer Context Setup Request enc/dec library 2024-11-27 10:17:46 +01:00
Guido Casati
254a0e9ad5 Use E1AP Bearer Context Setup Request enc/dec library in stack 2024-11-27 10:17:46 +01:00
Guido Casati
e439a4359c Add enc/dec library for E1AP Bearer Context Setup Request 2024-11-27 10:17:46 +01:00
Guido Casati
2a1f5ac5ed Introduce library for E1AP message encoding/decoding 2024-11-27 10:17:46 +01:00
Guido Casati
ac8da484db Replace cell_group_t with CELL_GROUP_ID_t
* simplified number of Cell Group types
2024-11-27 10:17:46 +01:00
Guido Casati
aae05e95b9 Use sizeof(in_addr_t) in memcpy of TL uint32_t address 2024-11-27 10:17:46 +01:00
Guido Casati
4829fa0543 Refactor E1AP Bearer Context Setup Request struct members
* cleanup struct members not compliant to specs 3GPP TS 38.463
* add defines whenever necessary
2024-11-27 10:17:46 +01:00
Guido Casati
13d1c34d35 Use one definition of maxnoofDRBs according to 3GPP TS 38.463 (up to 32)
* define E1AP_MAX_NUM_DRBS
2024-11-27 10:17:46 +01:00
Guido Casati
b00f095089 Fix bug (missing parenthesis) in hton_int16 2024-11-27 10:17:46 +01:00
Guido Casati
04491efb3c Cleanup unused conversions 2024-11-27 10:17:46 +01:00
francescomani
6c0c27a201 do not start T304 RRC timer at UE for phy-test mode 2024-11-27 10:12:55 +01:00
Robert Schmidt
03946cd47b Merge branch 'integration_2024_w47' into 'develop'
Integration: `2024.w47`

See merge request oai/openairinterface5g!3120

* !2972 Parallelize PUSCH channel estimation
* !3105 Fix a small bug with total_res in gNB PUSCH symbol processing
* !2996 Ue monitoring stats
* !3122 Avoid assert on non-implemented SM write callback
* !3110 Fronthaul 7.2 improvements (1. step towards M-plane integration)
* !2966 Refactor of includes in gNB/UE for improved header management
* !3123 Reduce double-usage of CI XML files
* !3029 NR UE RRC reconfiguration improvements
* !2670 chore(ci): adding Flexric-RAN integration test
* !3124 CI: use OC CN in aerial pipeline
2024-11-27 08:16:32 +00:00
Jaroslava Fiedlerova
b8b4057e9c Merge remote-tracking branch 'origin/ci-aerial-change-cn' into integration_2024_w47 (!3124)
CI: use OC CN in aerial pipeline

Replace CN host on Aerial CI pipeline (Porcepix) with OC.
2024-11-26 11:37:45 +01:00
Jaroslava Fiedlerova
d337304e13 Merge remote-tracking branch 'origin/ci-flexric-integration-test' into integration_2024_w47 (!2670)
chore(ci): adding Flexric-RAN integration test

- Triggering a standalone FLEXRIC + 5G-RAN pipeline: OAI-FLEXRIC-RAN-Integration-Test
  - will be triggered by the RAN-Container-Parent
  - but also by the OAI-FLEXRIC pipeline (to be done once integrated)
- Added an new python option: --FlexRicTag= than if not used, won't have any effect
- Nice addition:
  - if --FlexRicTag=develop or --ranCommitID=develop  --> will use the latest commit
    on either dev or develop branch.
- Scenario-wise
  - Using the cn5g deployment file from Luis in documentation, at least we will use
    it to make sure it is working at all time
- We can add more test and especially checkers on the flexric calls

Linked to !3085 (merged)
2024-11-26 10:53:17 +01:00
Jaroslava Fiedlerova
dbc8fd4956 CI: increase timeout for OC CN deployment
Occasionally, the CN deployment takes longer than 60 seconds to complete
successfully. As a result, the CI reports failure, even when all other test
stages pass (e.g., gNB attaches to the CN, UE connects, and iperf tests succeed).
2024-11-26 10:29:14 +01:00
Jaroslava Fiedlerova
bbfd3c6174 CI: use OC CN in aerial pipeline
Replace current docker deployment of OAI CN by deployment on OC. With change
of the CN, we also need to change the routing for UE module - change the
mbim script for controling the UE.
2024-11-26 10:26:25 +01:00
Raphael Defosseux
14c0d6b347 CI: Add FlexRIC test 2024-11-26 09:44:23 +01:00
Jaroslava Fiedlerova
683a39c982 Merge remote-tracking branch 'origin/NR_UE_RRC_Reconfiguration_improvements' into integration_2024_w47 (!2996)
Improvements in handling RRC Reconfiguration at UE
2024-11-26 09:39:44 +01:00
Jaroslava Fiedlerova
8b7b918c49 Merge remote-tracking branch 'origin/ci-reduce-duplicate-xml-usage' into integration_2024_w47 (!3123)
Reduce double-usage of CI XML files

Some pipelines use the same XML files. For instance,
RAN-NSA-B200-Module-LTEBOX-Container and RAN-LTE-{TDD,FDD}-LTEBOX-Container
use both fr1_epc_{closure,start}.xml, but use the core network on different
hosts, by means of different pipeline configuration (EPCtype, etc).

A future MR will remove these additional pipeline configuration, and store
all the CN config in the repository. To simplify the transition, duplicate
some XMLs (i.e., remove duplicate usage of them).

After this MR, the only "double usage" of XML files for core (un-)deployment
should be through pipelines RAN-LTE-{TDD,FDD}-LTEBOX-Container.
2024-11-26 09:32:20 +01:00
Jaroslava Fiedlerova
a9060cd382 Merge remote-tracking branch 'origin/nr-cleanup-includes' into integration_2024_w47 (!2966)
Refactor of includes in gNB/UE for improved header management

This merge request implements changes suggested by the Include What You Use
(IWYU) open source tool to streamline the project’s header file usage.

The adjustments ensure that each file includes only the necessary headers for
the symbols it uses, making the code more efficient and maintainable.
Unnecessary includes have been removed, and missing headers have been added
where required. This improves modularity and reduces inter-dependencies between
files, helping to avoid future build issues caused by unused or missing includes.

Each output has been manually reviewed.

Followed a similar approach as in !2953 (merged).

Affected folders/files:

- NR_MAC_gNB/main.c
- nr-softmodem.c
- unitary simulators: nr_dlsim, nr_ulsim, prachsim
- openair2/RRC/NR
- openair3/NGAP
- openair2/LAYER2/nr_pdcp
- openair2/SDAP/nr_sdap
2024-11-26 09:26:28 +01:00
Robert Schmidt
566dad62c2 Duplicate sa_cn5g_{start,closure}.xml
Duplicate these files with the same reasons as in PARENT.
2024-11-26 08:44:19 +01:00
francescomani
3c6a588ed7 reworking scheduling of SIB other than 1, including storing the information at MAC 2024-11-25 17:23:32 +01:00
francescomani
216c42358b remove unnecessary storage of SIBs structures at RRC 2024-11-25 17:23:27 +01:00
Jaroslava Fiedlerova
e04ff5efb0 Merge remote-tracking branch 'origin/fhi-72-improvements' into integration_2024_w47 (!3110)
Fronthaul 7.2 improvements (1. step towards M-plane integration)

- added explanations for each parameter used for XRAN library
- added new config files for VVDN, Benetel 550 and Metanoia RUs
- changed config file for Benetel 650
- deleted 8x8 650-550, and added 8x8 650-650 config file
- updated FHI README
  - setting one or more VFs; compatibility with Mellanox NIC as well
  - fhi_72 section
2024-11-25 16:42:31 +01:00
Jaroslava Fiedlerova
f36eda1608 Merge remote-tracking branch 'origin/ran-func-no-assert' into integration_2024_w47 (!3122)
Avoid assert on non-implemented SM write callback

The asserts might be used to intentionally stop the running process.
Further, it might be an annoyance if it happen unintentionally. Just
print an error message instead.
2024-11-25 16:41:10 +01:00
Robert Schmidt
7bf706bc9a CI: harmonize pull/clean with flexric hack
If we are pulling FlexRIC, overwrite the tag to use with what has been
provided on the command line. This is because we hardcode the tag schema
"branchname-commitId[0:8]" everywhere else, but this does not apply for
FlexRIC, and we have to overwrite this here.
2024-11-25 15:33:41 +01:00
Robert Schmidt
010a23863c CI: Add a testcase for testing pull/clean functionality
The testcase will only be executed when the registry at
porcepix.sboai.cs.eurecom.fr is actually reachable.
2024-11-25 15:33:41 +01:00
Robert Schmidt
644990a225 CI: Clean_Test_Server_Images(): harmonize code
- pass parameter directly instead of indirectly via class
- harmonize to svr_id to read through common code in the next commits
- pass images to express which images will be deleted
- refactor function to use "with" for cls_cmd, and return success (or
  not)
2024-11-25 15:33:41 +01:00
Robert Schmidt
74317e805d CI: PullClusterImage(): harmonize code
- reuse cls_containerize.Containerize.PullImage()
- pass parameter directly instead of indirectly via class
- always read node name and use this instead of "sometimes" looking it
  up from a class member. With "sometimes" I mean that if no node name
  is given, it will take it from self.eNBIPAddress, which is confusing
  at best if we can give the node name directly
- consistently put the node name in the xml file
2024-11-25 15:33:41 +01:00
Robert Schmidt
dee9ce26db CI: Pull_Image_from_Registry(): harmonize code
- pass parameter directly instead of indirectly via class
- call it simply "images", to harmonize with clean-function later
- harmonize to svr_id as in the previous commit
- rewrite function to use with-statement with cls_cmd
- optionally pass a tag to use (which will be used in a test, and can be
  used to pull flexric)
- Introduce Pull_Image() which does the actual pulling, can pull from
  any registry, and will be reused in the case of pulling from cluster.
2024-11-25 15:33:41 +01:00
Teodora
b334feb92b Update gNB fhi_72 configuration steps in README 2024-11-25 14:40:25 +01:00
Teodora
b55ee54183 Update steps for configuring VF(s) in README
- add option to configure one or two VFs
  - add support for Mellanox NIC
2024-11-25 14:40:19 +01:00
Guido Casati
44c9dec681 Add test for NAS Service Request enc/dec 2024-11-25 13:15:10 +01:00
Guido Casati
6faa5d3066 Refactor TLVEncoder
* deleted unused TLVEncoder.c
* removed dependency from LOG module in TLVEncoder Macros
2024-11-25 13:15:10 +01:00
Guido Casati
ad412028a2 Refactor TLVDecoder macros
* ideally the result of these macros shall be relevant
  only in unit tests, in order to validate enc/dec NAS functions
* use a local print macro
* remove dependency from LOG module
* simplified the code
* cleanup TLVDecoder.c (kept it for LTE dependencies)
2024-11-25 13:15:10 +01:00
Guido Casati
1c4e1029a8 Add NAS Service Request enc/dec functions
* FGMM enc/dec library files
* Plain message encoding + logic for security protected message
* added fill_fgstmsi function
* add checks on length in 5G-S-TMSI encoder function
* encoding of NAS Service Request and relevant mandatory IEs
2024-11-25 13:15:10 +01:00
Guido Casati
c817c44ae9 Add include for stdbool.h in FGSMobileIdentity.c 2024-11-25 13:15:10 +01:00
Guido Casati
29220a60dc Add check on minimum length in encode_5gs_mobile_identity 2024-11-25 13:15:10 +01:00
Guido Casati
bf7761131d Refactor NAS Key Set Identifier enc/dec functions
* simplified the code while keeping same functionality
* reduced the number of functions (from 4 to 2)
* clang-formatted
2024-11-25 13:15:10 +01:00
Guido Casati
5c3953b684 Cleanup test5Gnas.c and MAC references in NR_NAS_defs.h (undefined functions prototypes) 2024-11-25 13:15:10 +01:00
Guido Casati
8a7321db11 Rename FGS Service Request/Reject/Accept type for consistency with FGS naming style 2024-11-25 13:15:10 +01:00
Jaroslava Fiedlerova
5b6e16c8e7 Merge remote-tracking branch 'origin/ue-monitoring-stats' into integration_2024_w47 (!2996)
Ue monitoring stats

- one commit to add UE mac stats similar to gNB one and remove a partial
implementation at phy level of some counters
- second commit only rename the two UE persisted HARQ tyepdef names for DL
and for UL (one was saying "UE" but not the direction and the second the
direction but not "UE")
2024-11-25 11:27:22 +01:00
Robert Schmidt
500f37d10e Avoid assert on non-implemented SM write callback
The asserts might be used to intentionally stop the running process.
Further, it might be an annoyance if it happen unintentionally. Just
print an error message instead, and return to FlexRIC that nothing is to
be sent.
2024-11-25 11:02:13 +01:00
francescomani
086ac79830 improvements in handling reconfigurationWithSync 2024-11-25 10:35:05 +01:00
francescomani
9ca0b133ec resume RBs in 1st reconfiguration after reestablishment 2024-11-25 10:35:05 +01:00
francescomani
9a4f12b881 handling dedicated system information via RRC Reconfiguration 2024-11-25 10:35:05 +01:00
francescomani
59403e5b01 adding assertion for reportUplinkTxDirectCurrent 2024-11-25 10:35:05 +01:00
francescomani
2beb7fd8a8 adding error messages for field not handled yet by RRC UE in Reconfiguration 2024-11-25 10:35:05 +01:00
francescomani
1867aa928a remove unnecessary declaration of nr_rrc_ue_process_rrcReconfiguration 2024-11-25 10:35:05 +01:00
Robert Schmidt
559fdf106c Duplicate fr1_epc_{closure,start}.xml
The CI pipeline RAN-NSA-B200-Module-LTEBOX-Container uses the same core
network (ltebox) as the pipelines RAN-LTE-{TDD,FDD}-LTEBOX-Container,
triggered through the same XML files. However, the core networks are on
different hosts, configured through (Jenkins) pipeline configuration. A
future MR will move the entire core network configuration into the XML
files [1]. To facilitate this, create separate XML files for the NSA
pipeline.

[1] The advantage is that it will be easier to reason with only the XML
files what is going to be run where and how.
2024-11-25 10:31:04 +01:00
Jaroslava Fiedlerova
2f27839515 T2: Rework retrieve_ldpc_enc_op() 2024-11-22 17:37:36 +01:00
Jaroslava Fiedlerova
e531043128 Merge remote-tracking branch 'origin/fix-extraneous-threadpool-tasks' into integration_2024_w47 (!3105)
Fix a small bug with total_res in gNB PUSCH symbol processing

Replaced total_res with res_per_task when deciding whether to start a threadpool
task or not. This does not have big impact on the software as the
nr_pusch_symbol_processing will recheck ul_valid_re_per_slot anyway but it may
reduce the number of thread pool tasks created.
2024-11-22 15:50:40 +01:00
Jaroslava Fiedlerova
45fff9fc0f Merge remote-tracking branch 'origin/dmrs_channel_estimation_parallelization' into integration_2024_w47 (!2972)
Parallelize PUSCH channel estimation

This MR adds PUSCH channel estimation parallelization which reduces the
processing time. It also adds time measurements for each antenna and makes
num_antennas_per_thread configurable in nr_ulsim and the gNB config file.

Some results:

- **273 PRBs 4 antennas** `./nr_ulsim -n200 -m25 -s40 -S40 -q1 -R273 -r273 -z4 -P`

| Number of threads | ULSCH channel estimation time (us) develop| ULSCH channel estimation time (us)| Antenna Processing time (us) |
| ------            | ------                                    | ------                            | ------ |
| 0                 | 194.06                                    |193.17                             |  134.82|
| 2                 | 194.88                                    |154.02                             |  93.43 |
| 4                 | 195.23                                    |134.27                             |   72.71|
- **273 PRBs 8 antennas** `./nr_ulsim -n200 -m25 -s40 -S40 -q1 -R273 -r273 -z8 -P`

| Number of threads | ULSCH channel estimation time (us) develop| ULSCH channel estimation time (us)| Antenna Processing time (us) |
| ------            | ------                                    | ------                            | ------ |
| 0                 | 387.93                                    |384.99                             |  269.39|
| 2                 | 388.10                                    |279.47                             |  161.32|
| 4                 | 387.47                                    |225.37                             |  106.52|
| 8                 | 390.53                                    |204.48                             |   83.74|

- **106 PRBs MIMO 4 layers** `./nr_ulsim -n100 -m9 -r106 -s10 -W4 -y4 -z4 -P`

| Number of threads | ULSCH channel estimation time (us) develop| ULSCH channel estimation time (us)| Antenna Processing time (us) |
| ------            | ------                                    | ------                            | ------ |
| 0                 | 263.20                                    |268.97                             |  57.49 |
| 2                 | 263.90                                    |252.61                             |  51.22 |
| 4                 | 264.17                                    |192.49                             |  36.29 |
2024-11-22 15:48:12 +01:00
Robert Schmidt
68191088ab Add v2.2.0 release notes 2024-11-22 14:46:10 +01:00
Robert Schmidt
ce5e674bd2 Add link from F1 design to handover tutorial 2024-11-22 14:05:27 +01:00
Robert Schmidt
756199c98f Add missing links from doc/README.md to documentation 2024-11-22 14:05:27 +01:00
Teodora
4ed939e4a9 Correct CI VVDN 4x4 100MHz config file 2024-11-22 12:51:46 +01:00
Teodora
6a810f154d Correct CI Benetel 550 4x4 100MHz config file 2024-11-22 12:51:46 +01:00
Teodora
d27dd1554d Change 8x8 100MHz Benetel config file
- 650-550 config file deleted
  - 650-650 config file added
2024-11-22 12:51:46 +01:00
Teodora
1121d86e76 Change 4x4 100MHz Benetel 650 config file 2024-11-22 12:51:46 +01:00
Teodora
c2d169094f Add 4x4 100MHz Metanoia config file 2024-11-22 12:51:46 +01:00
Teodora
6dfa051ecd Add 4x4 40MHz VVDN config file 2024-11-22 12:51:46 +01:00
Teodora
83367ee7ff Add 2x2 100MHz VVDN config file 2024-11-22 12:51:46 +01:00
Teodora
cd259132f1 Add 4x2 100MHz Benetel550 config file 2024-11-22 12:51:46 +01:00
Teodora
c58ab971af Update fhi_72 section in config files 2024-11-22 12:51:46 +01:00
Teodora
d246520f77 Correct LITEON config file
- remove useless whitespaces
  - add comments for used frequencies
2024-11-22 12:51:46 +01:00
Teodora
31613ec8bc Correct VVDN config file
- add frequency values (center frequency, SSB and point A)
  - CN interface fixed
  - adjust puxch_TargetSNRx10, and ru_thread_core
2024-11-22 12:51:46 +01:00
Teodora
306e7538d9 Correct Benetel550 config file
- match PLMN to CN
  - correct frequency point A to match desired center frequency
  - adjust puxch_TargetSNRx10
2024-11-22 12:51:46 +01:00
Teodora
f30453968f xran integration improvements
- identification of each parameter in fh_init and fh_config structs
  - identification of unused parameters in xran library
  - identification of parameters used for CAT A O-RU
  => CAT B not supported in this release
2024-11-22 12:51:39 +01:00
Robert Schmidt
a48728ba35 CI: Push_Image_to_Local_Registry(): harmonize code
- pass parameter directly instead of indirectly via class
- harmonize to svr_id to harmonize parameter with parameters in the next
  commit (and towards a future harmonization of directly taking node
  names instead of "IDs")
2024-11-22 08:23:48 +01:00
Raphael Defosseux
3e51fcdf33 CI: Provide possibility to pass in flexricTag 2024-11-22 08:23:48 +01:00
Raphael Defosseux
df9aec167e CI: Allow ranCommitID to be "develop"
This will be used to pull images with the tag "develop" (i.e., without a
commit ID).
2024-11-22 08:23:48 +01:00
Raphael Defosseux
5730df9ffc CI: Avoid python warning about wrong escape sequence 2024-11-22 08:23:48 +01:00
Raphael Defosseux
d00a614d4e CI move log folder creation right away at deployment time
Some commands might use that folder before Ping/Iperf, in which it has
been created.
2024-11-22 08:23:48 +01:00
Raphael Defosseux
cf870d7ae9 CI: Make output for .env test less verbose 2024-11-22 08:23:48 +01:00
Robert Schmidt
a80c17cc31 CI: Remove useless parameter 2024-11-22 08:23:48 +01:00
Raphael Defosseux
5f1219bc32 CI GetContainerHealth(): speed up checks 2024-11-22 08:23:44 +01:00
Laurent THOMAS
65e3c89bb1 add ue mac stats and monitoring as per gnb ones 2024-11-21 16:39:19 +01:00
Robert Schmidt
530f96278d Rearrange FHI architecture to support M-plane
Co-authored-by: Teodora <teodora.vladic@openairinterface.org>
2024-11-21 13:37:46 +01:00
Robert Schmidt
d0b637a020 Merge branch 'doc-sa-use' into 'develop' (!3113)
Reformulate section on standalone mode

Clarifications on when (or if) to use --sa
2024-11-21 08:38:48 +00:00
Romain Beurdouche
f885bd336a Add note to 'doc/README.md' to insight readers to checkout the documentation at their version of the repository. 2024-11-21 08:18:08 +01:00
Robert Schmidt
ba0cad20e6 Move respPuschAarx response queue to stack of nr_pusch_channel_estimation()
The queue for finished jobs of PUSCH channel estimation is only used inside
nr_pusch_channel_estimation(). Since initialization is fast, it can be
declared on the stack in the function where it is used.
2024-11-20 16:30:39 +01:00
Bartosz Podrygajlo
35903f9a10 Integrate Tracy with NR UE & gNB
This commit enables the optional use of Tracy for profiling NR UE & gNB.
See https://github.com/wolfpld/tracy/releases/tag/v0.11.1 for details.

How to compile:
use -DTRACY_ENABLE=ON to enable instrumentation and sampling
For gNB currently only sampling is implemented.

How to collect data:
 - Windows hosts: tracy-profiler.exe in link above
 - Linux hosts: Compile tracy-profiler from source

Enabling collection from docker:
 - open port 8086
 - to collect cpu data
    --privileged
    --mount "type=bind,source=/sys/kernel/debug,target=/sys/kernel/debug,readonly"
    --user 0:0
    --pid=host

How to add instrumentation:
 - See examples in this commit or manual in the link above.
2024-11-20 10:42:51 +01:00
Jaroslava Fiedlerova
0021b69645 Optimize memory usage in decode_offload function
- Reduce the size of z_ol to LDPC_MAX_CB_SIZE to reduce memory footprint.
- Simplify memcpy and pointer casting for z_ol.
2024-11-20 10:39:09 +01:00
Jaroslava Fiedlerova
42b544cda9 Correct max number of LDPC segments for T2 processing
Fix error reported by the T2 card when running nr_dlsim with 4 DL layers.
Error can be reproduced by running:
./nr_dlsim -n100 -s30 -e25 -b273 -R273 -x4 -z4 -y4 -P --ldpc_offload.dpdk_dev 41:00.0 -c

So far we set NR_LDPC_MAX_NUM_CB to 72, which is sufficient for max 2 DL layers.
Set max possible number of LDPC segments based on the max number of layers
and max number of DLSCH segments (currently it is 144).
2024-11-19 16:15:25 +01:00
Romain Beurdouche
75cde75fa4 Add notes around sample SA gNB and nrUE commands in most basic tutorials 'NR_SA_Tutorial_COTS_UE.md' and 'NR_SA_Tutorial_OAI_nrUE.md'.
The notes mention that for versions previous to 2024.w45, the --sa argument should be added to run in SA mode.
2024-11-19 09:56:44 +01:00
Robert Schmidt
5d1c0aaab7 Merge branch 'integration_2024_w46' into 'develop'
Integration: `2024.w46`

See merge request oai/openairinterface5g!3106

* !3095 UE: Set default SSB config
* !2991 fix BSR report malformed, add SHORT BSR when it can (instead of LONG BSR)...
* !3104 Trigger deregistration only in SA mode → small fixup?
* !3107 Clip the input for -32768 because this will make different result in...
* !3109 T tracer: support float types in traces
* !2777 NR UE trigger for re-establishment
* !3108 Prevent segfaults in gNB stack
* !3059 Test for init_RA
* CI: increase UE thread pool size
* !3036 Further improvements in analog beam management for CSI-RS
* !3093 Added NTN FDD FR1 bands defined in 3GPP TS 38.101-5
2024-11-19 08:31:11 +00:00
Jaroslava Fiedlerova
0c3a2c157d Merge remote-tracking branch 'origin/NTN_FR1_bands' into integration_2024_w46 (!3093)
Added NTN FDD FR1 bands defined in 3GPP TS 38.101-5

Added support for NTN FDD FR1 bands 254, 255, 256 as specified in 3GPP
TS 38.101-5. Example Conf files added for band254 for 15Khz, 5Mhz and
30Khz, 10Mhz configurations. Tested NTN GEO configuration on band 254
using these conf files.
2024-11-18 17:30:49 +01:00
Jaroslava Fiedlerova
e5fda698ba Merge remote-tracking branch 'origin/enabling_CSIRS_analog_beamformiing_l1_handling' into integration_2024_w46 (!3036)
Further improvements in analog beam management for CSI-RS
2024-11-18 17:29:02 +01:00
Robert Schmidt
77b57bc2d6 CI: increase UE thread pool size
There seem to be randomly occurring deadlocks when running the UE in the
CI. MR !3091 should fix this. While waiting for this, apply a workaround
by increasing the number of worker pools in the UE to 12.
2024-11-18 17:20:39 +01:00
Robert Schmidt
ba78dc3581 Reformulate section on standalone mode
Since tag 2024.w45/commit f54ca5714e,
standalone mode/--sa is the default and does not exist. Correspondingly,
it has been removed from the documentation.

For users reading recent documentation, but running an older version of
OAI, there might be a mismatch in that --sa is necessary to run OAI, but
not given in the documentation. Provide explanatory text to make users
aware of this.
2024-11-18 16:42:26 +01:00
Jaroslava Fiedlerova
06e1c3bc17 Merge remote-tracking branch 'origin/nr-ue-ra-testcase' into integration_2024_w46 (!3059)
Test for init_RA

A testcase for init_RA function.
The testcase redefines the following functions as stubs:

- nr_mac_rrc_ra_ind
- nr_write_ce_ulsch_pdu
- mac_rlc_data_req
- lockGet_ul_config
- release_ul_config
- remove_ul_config_last_item
- nr_ue_configure_pucch

These stubs can be used to check init_RA behavior
2024-11-18 16:21:03 +01:00
Jaroslava Fiedlerova
400656715a Merge remote-tracking branch 'origin/fix-segfault-multi-ue' into integration_2024_w46 (!3108)
Prevent segfaults in gNB stack

Three fixes for segfaults, discovered while running with many UEs.
See commit messages for more details.
2024-11-18 13:06:29 +01:00
Guido Casati
1679be6a14 Refactor includes in gNB config
* used open source IWYU tool + manual review
2024-11-18 11:25:02 +01:00
Guido Casati
83a4b4df64 Refactor includes in NR_PHY_INTERFACE
* used open source IWYU tool + manual review
2024-11-18 11:25:02 +01:00
Guido Casati
37e856a7fd Add include for MAX_ANT
* to defs_gNB.h, nr_dlsch_demodulation.c
2024-11-18 11:25:02 +01:00
Guido Casati
ca96ea7002 Updated iwyu/README.md 2024-11-18 11:25:02 +01:00
Guido Casati
bfe7b803fe Refactor includes in SDAP and PDCP API
* used open source IWYU tool + manual review
2024-11-18 11:25:02 +01:00
Guido Casati
b7c1b4d761 Refactor includes in NR_MAC_gNB/main.c
* used open source IWYU tool + manual review
2024-11-18 11:25:02 +01:00
Guido Casati
893102a104 Refactor includes in nr-softmodem.c 2024-11-18 11:25:02 +01:00
Guido Casati
1c9bcf4004 Refactor includes in unitary simulators
* prachsim, ulsim, dlsim
* used open source IWYU tool + manual review
2024-11-18 11:25:02 +01:00
Guido Casati
eb39836b0a Refactor includes in RRC files
* used open source IWYU tool + manual review
* deleted unused nr_rrc_common.c
2024-11-18 11:25:02 +01:00
Guido Casati
4957f446e9 Refactor includes in NGAP files
* used open source IWYU tool
2024-11-18 11:25:02 +01:00
Guido Casati
e8f9d577cd Use DL_SCH_LCID_DCCH in NR and remove dependency from mac.h 2024-11-18 11:25:02 +01:00
Guido Casati
69df3598f3 Redefine NGAP_MAX_PDUSESSION and removed LTE dependency
* limit to 16 instead of specs value 256
2024-11-18 11:25:02 +01:00
Guido Casati
9c94203e49 Move transport_layer_addr_t to platform_types.h
* tunnel address is the same for NR and LTE and used in both
* Remove LTE dependency in gtpv1_u_messages_types.h
2024-11-18 11:25:02 +01:00
Jaroslava Fiedlerova
12f29b828e Merge remote-tracking branch 'origin/NR_UE_trigger_reestablishment' into integration_2024_w46 (!2777)
NR UE trigger for re-establishment

The implementation in this MR triggers RRC re-establishment at the UE in case
of radio link failure either for out of sync messages from lower layers or in
case maximum number of RLC retransmissions is reached.
2024-11-18 10:12:25 +01:00
Guido Casati
6b3f26f538 Add define to printf and fflush in telnetsrv for real-time logs 2024-11-17 21:46:23 +01:00
Guido Casati
4f2fa739a1 Disable ASAN ODR detection to workaround double registration of log_mem_write_side variable in CU
/opt/oai-gnb/bin/nr-softmodem -O /opt/oai-gnb/etc/gnb.conf --sa --log_config.global_log_options level,nocolor,time --rfsimulator.options chanmod --telnetsrv --telnetsrv.listenaddr 192.168.71.150 --telnetsrv.shrmod ci
=================================================================
==7==ERROR: AddressSanitizer: odr-violation (0x7fce78b85be0):
  [1] size=4 'log_mem_write_side' /oai-ran/common/utils/LOG/log.c:78:14
  [2] size=4 'log_mem_write_side' /oai-ran/common/utils/LOG/log.c:78:14
These globals were registered at these points:
  [1]:
    \#0 0x7fce7b691658 in __asan_register_globals ../../../../src/libsanitizer/asan/asan_globals.cpp:341
    \#1 0x7fce7bd0c47d in call_init elf/dl-init.c:70

  [2]:
    \#0 0x7fce7b691658 in __asan_register_globals ../../../../src/libsanitizer/asan/asan_globals.cpp:341
    \#1 0x7fce7a5e2eba in call_init ../csu/libc-start.c:145
    \#2 0x7fce7a5e2eba in __libc_start_main_impl ../csu/libc-start.c:379

==7==HINT: if you don't care about these errors you may set ASAN_OPTIONS=detect_odr_violation=0
SUMMARY: AddressSanitizer: odr-violation: global 'log_mem_write_side' at /oai-ran/common/utils/LOG/log.c:78:14
==7==ABORTING
[INFO  tini (1)] Spawned child process '/opt/oai-gnb/bin/entrypoint.sh' with pid '7'
[INFO  tini (1)] Main child exited normally (with status '1')
2024-11-17 21:46:23 +01:00
francescomani
6600e33cae workaround to avoid assertion for UCI on PUSCH in re-establishment procedure 2024-11-17 21:46:23 +01:00
francescomani
fe671a8876 take into account the option to have initial pucch when scheduling UCI on PUSCH 2024-11-17 21:46:23 +01:00
francescomani
5bb38187f1 triggering SR only if schedulingRequestResource is available 2024-11-17 21:46:23 +01:00
francescomani
4f969e4120 do not force initial sync BW scanning if going to IDLE, keep the previous configuration 2024-11-17 21:46:23 +01:00
Guido Casati
813690ece7 Add ciUE command to force RRC_IDLE 2024-11-17 21:46:23 +01:00
Guido Casati
882712ffd8 Add ciUE telnet command to force RLF 2024-11-17 21:46:23 +01:00
Guido Casati
1692e00d4a Add function to fetch RRC UE instance 2024-11-17 21:46:23 +01:00
Guido Casati
60ef7f04aa Add new ci telnet commands to force UE release and UL failure 2024-11-17 21:46:23 +01:00
Guido Casati
59bf54c9cd Make a separate function to fetch RNTI in telnet CI 2024-11-17 21:46:23 +01:00
Robert Schmidt
fb1f2539e8 Custom_Command nc on cacofonix: cannot use -N, is openBSD 2024-11-17 21:46:23 +01:00
Guido Casati
0bbd446478 Add test to trigger re-establishment to RFSIM F1 CI
* trigger re-establshemnt on DU: reset RLC counters on DRB 1
  for OAI UE, since SRB 1 does not work for lack of periodic
  measurements reports
* how is the re-establishment triggered?
  * a transmission on DRB 1 occurs
  * detection of a mismatch of RLC counters at the UE side
  * max number of RLC retransmissions reached
  * RLF detection
* verify re-establishment on CU: we ping the core from the UE; this
  sends packets on DRB, and because the sequence number mismatches, will
  trigger a reestablishment. We accept in the ping that a couple of
  packets might be lost; after ping is over, reestablishment must be
  done as well (else the ping will already fail).
2024-11-17 21:46:23 +01:00
Robert Schmidt
7e3df5f173 Adjust TCP threshold MIMO for AW2S 2x2 pipeline 2024-11-17 10:09:31 +01:00
Robert Schmidt
2cc63bf195 Fixup: avoid deadlock 2024-11-17 01:27:09 +01:00
francescomani
ca877514aa fix for going to idle: release MAC config only after resetting MAC 2024-11-17 01:27:09 +01:00
Sakthivel Velumani
3e3ef8cfd0 Enable usrp-tx-thread-config in UE
Setting this option will start a separate thread for writing samples to
USRP.
2024-11-15 14:16:32 -05:00
Sakthivel Velumani
daeb110ae1 Don't reset txdata buffer every slot
This is not necessary becuase the buffer would be overwritten by OFDM
modulator in the next frame.
2024-11-15 14:14:17 -05:00
Jaroslava Fiedlerova
9b1ccbf3de Merge remote-tracking branch 'origin/hide-overflow' into integration_2024_w46 (!3107)
Clip the input for -32768 because this will make different result in...

Clip the input for -32768 because this will make different result in
mult_complex_vectors() compared to C version
2024-11-15 18:51:26 +01:00
Jaroslava Fiedlerova
981173f43b Merge remote-tracking branch 'origin/T-tracer-float-support' into integration_2024_w46 (!3109)
T tracer: support float types in traces
2024-11-15 18:50:36 +01:00
Jaroslava Fiedlerova
b18f39312a Merge remote-tracking branch 'origin/ci-fixes-dora' into integration_2024_w46 (!3104)
Trigger deregistration only in SA mode

Upon press of ^C, the UE triggers a NAS deregistration. This does not work
in do-ra or phy-test modes, because there is no NAS. Therefore, in non-SA
modes, just stop the UE directly.

This can potentially improve the 5G RFsim CI test case, because together with
a high RFsim timeout, the chances of the last HARQ status line being without
retransmissions is much higher. If that does not help, we can further increase
the retx threshold.
2024-11-15 18:49:12 +01:00
Jaroslava Fiedlerova
45be0a5604 Merge remote-tracking branch 'origin/fix-ulsch-bsr' into integration_2024_w46 (!2991)
fix BSR report malformed, add SHORT BSR when it can (instead of LONG BSR)...

fix BSR report malformed, add SHORT BSR when it can (instead of LONG BSR)
simplify the code and make the code more explicit, but the may structure
remain (nr_write_ce_ulsch_pdu interface is complex, merging it into the
called would make simpler and more interstandable code), fix some asserts
related to this part of code
2024-11-15 18:43:26 +01:00
Robert Schmidt
7d2b7c2ba3 Prevent segfault in RRC
Similar to the previous commit, prevent the same segfault in RRC.
2024-11-15 17:58:50 +01:00
Raghavendra Dinavahi
db629e6b58 NTN FDD FR1 bands added
Added support for NTN FDD FR1 bands 254, 255, 256 as specified in 3GPP TS 38.101-5
Conf files added for 15Khz, 5Mhz and 30Khz, 10Mhz configurations added for these bands
2024-11-15 16:23:22 +01:00
Cedric Roux
0eb0325b96 T tracer: support float types in traces 2024-11-15 16:02:52 +01:00
Robert Schmidt
268d409b5b Prevent segfault in nr_mac_clean_cellgroup()
In some runs of a multi-UE deployment, we see segfaults because
cell_group->spCellConfig is NULL. We should not segfault in that case,
so check for spCellConfig.
2024-11-15 15:37:03 +01:00
Robert Schmidt
a319cbfb19 Prevent segfault when trying to schedule MAX_MOBILES_PER_GNB UEs
When the UE list is full, the iterator will run through all
MAX_MOBILES_PER_GNB UEs. It expects that eventually the pointer is NULL,
which is not the case if we have MAX_MOBILES_PER_GNB (or it simply
depends on the following memory). So give one array entry more, to
ensure that the last one is NULL.
2024-11-15 15:37:03 +01:00
Laurent THOMAS
362eba7e27 Clip the input for -32768 because this will make different result in mult_complex_vectors() compared to C version 2024-11-15 13:15:30 +01:00
Bartosz Podrygajlo
fe10c90250 Avoid passing gNB pointer to nr_pusch_antenna_processing 2024-11-15 12:35:07 +01:00
Bartosz Podrygajlo
5605b0c0c6 Parallelize the PUSCH channel estimation
- add new data structures for antenna processing.
- create arrays that keep track of certain values (max_ch, noise_amp2, nest_count and delay) per each antenna. These values are processed in order to determine one final output.
- add time processing measurements for each antenna, and prints them in nr_ulsim.
- make num_antennas_per_thread configurable in nr_ulsim and the gNB config file.

Co-authored-by: Nada Bouknana <bouknana@eurecom.fr>
Co-authored-by: Brice Robert <brobert@valiha.com>
2024-11-15 12:35:06 +01:00
Bartosz Podrygajlo
25dde24d1e Fix formatting in nr_ul_channel_estimation.c 2024-11-15 12:34:04 +01:00
Jaroslava Fiedlerova
ca119de036 Merge remote-tracking branch 'origin/ue-default-ssb-config' into integration_2024_w46 (!3095)
UE: Set default SSB config

After initial sync the UE sets the ssb index bitmap in nrUE_config with
index obtained in initial sync. This allows UE to continue decoding PBCH
and stay synched with the gNB till SIB1 is received.
2024-11-15 11:51:15 +01:00
Bartosz Podrygajlo
caac4157c7 Fix a small bug with total_res in gNB PUSCH symbol processing
Replaced total_res with res_per_task when deciding whether to start a threadpool task or not.
This does not have big impact on the software as the nr_pusch_symbol_processing will recheck
ul_valid_re_per_slot anyway but it may reduce the number of thread pool tasks created.
2024-11-15 06:37:58 +01:00
Robert Schmidt
029cf83918 Trigger registration only in SA mode
Upon press of ^C, the UE triggers a NAS deregistration. This does not
work in do-ra or phy-test modes, because there is no NAS. Therefore, in
non-SA modes, just stop the UE directly.
2024-11-14 12:13:45 +01:00
francescomani
f3bee8ed25 L1 beam allocation for CSI-RS 2024-11-14 08:41:14 +01:00
francescomani
0993eb4ed8 MAC beam allocation for CSI-RS 2024-11-14 08:41:14 +01:00
francescomani
c0f2d24471 L1 beam allocation from symbol bitmap
This is required because CSI-RS may not be allocated in consecutive symbols within a slot
2024-11-14 08:41:14 +01:00
Robert Schmidt
eee4a0c652 UE: signal RLF to RRC 2024-11-13 14:25:01 +01:00
Robert Schmidt
f380a48a3b RLC: add per-UE RLF callback
If the RLC cannot retransmit a package, 3GPP specs say that we should
declare radio link failure (RLF). Up to this commit, the code did
nothing though. In this commit, add a per-UE RLF callback; the RLC will
call into this function to signal that RLF has been detected through
maximum retransmissions on a particular RLC bearer.
2024-11-13 14:25:01 +01:00
francescomani
6beeb6eef1 handle rlf with re-establishment or going to idle 2024-11-13 14:25:01 +01:00
francescomani
4f884ab172 bugfix: unlocking RLC manager in nr_rlc_get_lcid_from_rb function 2024-11-13 14:25:01 +01:00
Laurent THOMAS
2348b3c065 select LCG that contains the highest priorit LC with data to transmit instead of the LC with maximum waiting data size 2024-11-13 14:23:23 +01:00
Laurent THOMAS
d641a76196 fix BSR report malformed, add SHORT BSR when it can (instead of LONG BSR) simplify the code and make the code more explicit, but the may structure remain (nr_write_ce_ulsch_pdu interface is complex, merging it into the called would make simpler and more interstandable code), fix some asserts related to this part of code 2024-11-13 14:15:30 +01:00
Robert Schmidt
f54ca5714e Merge branch 'integration_2024_w45' into 'develop'
Integration: `2024.w45`

See merge request oai/openairinterface5g!3097

* !3048 Cleanup and refactoring at gNB initialization
* !3077 Address most thread safety issues in NR UE
* !3089 Improve cross-compile documentation
* !3092 Remove Interop-F1/Accelleran-CU testing pipeline
* !3096 Remove x86-specific instructions from telnet server
* !2949 Better polar decode
* !3070 CI: Add test with 4 DL layers, 60 MHz BW to SA-2x2 pipeline
* !3098 nr rlc: hotfix: test allocation valid before use
* !3090 Add UL PRBs Blacklist section to NR_SA_Tutorial_COTS_UE.md
* !3082 fix blocking bugs in command nr_dlsim -n100 -e27 -s35 -b 273 -R273 -x4 -y4 -z4
* !3100 CI: Remove 5g_l2sim files
* !3024 Set SA mode as default
* !3087 Remove some usage of the old CI sshConnection class
* !3074 CI: cleanup of cls_physim.py
2024-11-13 11:59:27 +00:00
Bartosz Podrygajlo
70849816c4 Test for init_RA
Extract nr_ra_procedures.c into a separate library and add a testcase for init_RA function.

The testcase redefines the following functions as stubs:
 - nr_mac_rrc_ra_ind
 - nr_write_ce_ulsch_pdu
 - mac_rlc_data_req
 - *lockGet_ul_config
 - release_ul_config
 - remove_ul_config_last_item
 - nr_ue_configure_pucch

These stubs can be used to check init_RA behavior
2024-11-13 10:09:18 +01:00
Robert Schmidt
c847ac786f Merge remote-tracking branch 'origin/ci-cls-physim-cleanup' into integration_2024_w45 (!3074)
CI: Cleanup of cls_physim.py

- Remove unused code and file
- Rework functions for CUDA and T2 log analysis
- Check if test was successful for nr_ulsim and nr_dlsim in
  RAN-gNB-N300-Timing-Phytest-LDPC pipeline
2024-11-13 09:57:49 +01:00
Robert Schmidt
085d48304c Merge remote-tracking branch 'origin/remove-use-old-ssh-class' into integration_2024_w45 (!3087)
Remove some usage of the old CI sshConnection class
2024-11-13 09:57:16 +01:00
Jaroslava Fiedlerova
c0e386e42d Merge remote-tracking branch 'origin/config_sa_mode' into integration_2024_w45 (!3024)
Set SA mode as default

- Set standalone (SA) mode as the default.
- Adjust commands in Docker Compose files by removing --sa flags and
  adding --nsa flags where applicable.
- Add a function to verify that only one mode is being used at a time.
- Update all relevant documentation.
2024-11-13 09:57:07 +01:00
Jaroslava Fiedlerova
9e81040a8d CI: use multiple cores for nr_ulsim/nr_dlsim tests with T2
Increase number of cores used for T2 nr_ulsim/nr_dlsim processing to ensure
a fair comparison of total gNB PHY RX/TX processing time.
2024-11-12 21:51:16 +01:00
Jaroslava Fiedlerova
94f69b8c70 Merge remote-tracking branch 'origin/remove_5g_l2sim_files' into integration_2024_w45 (!3100)
CI: Remove 5g_l2sim files

Delete the XML, conf, and YAML files related to the RAN-L2-Sim-Test-5G pipeline
that has already been removed.
2024-11-12 19:05:53 +01:00
Sakthivel Velumani
210b92338f Decode PBCH with ssb index from init sync 2024-11-12 11:54:55 -05:00
Robert Schmidt
e8d8384e7e Add RHEL 9.5 to supported distributions 2024-11-12 17:50:12 +01:00
Robert Schmidt
0784d1907f ci-scripts/tests/README.md: how to run all tests 2024-11-12 17:20:14 +01:00
Robert Schmidt
9f5d82212a Remove Username/Password from cls_containerize and use GetCredentials()
In the last commits, SSHconnection class has been removed from
cls_containerize.py. We therefore don't need the username and password,
as cls_cmd uses certificates only. Remove the usage of the username and
the password, and harmonize the use of GetCredentials().
2024-11-12 17:20:14 +01:00
Robert Schmidt
6a36db4569 Repair and refactor proxy build function
Recent refactoring replaced the CreateWorkspace function call with a
dedicated XML step (for clarity, and because it avoids needless
recreation of workspaces). In the proxy function, the same
CreateWorkspace xml step has been added, cloning the OAI RAN repo, when
we actually need the repository for the proxy. Hence, fix this by
calling the CreateWorkspace() function manually, but only when
necessary, to build the proxy. (It would only be a problem if the
pipeline would rebuild the proxy, which did not happen because not much
work is happening on the proxy repo).

Further, refactoring and simplication of the proxy build function were
done:

- never tag proxy with develop, that makes no sense
- overwrite CreateWorkspace() info after having created and used the
  workspace (the "if" to build the proxy)
- simplify copying of logs
- add simple unit test
- remove check for ubuntu; the dependcy is "docker". Simplify the code
  to not obscure with a class variable.
2024-11-12 17:20:14 +01:00
Robert Schmidt
cf576fc255 Remove Create_Workspace() in xml: follow up step removes it
The first thing Build_Proxy does is to remove the repository. Further,
Build_Proxy does not use the OAI RAN repo, but the proxy repo. The
Create_Workspace() is therefore completely useless.
2024-11-12 17:20:14 +01:00
Robert Schmidt
a103be619a Remove use of old sshConnection class, use cls_cmd instead 2024-11-12 17:20:14 +01:00
Robert Schmidt
e7225e12cb Remove CheckAndAddRoute(), replace with scripts on machines
Remove CheckAndAddRoute(), as it is complicated to read, uses a
multitude of hostname/IP/password combinations. Replace with scripts on
the machines, which, as of this commit, are:

- porcepix: ~/after-reboot.sh
- ofqot: ~/after-reboot.sh
- nepes: ~/after-reboot.sh
- obelix: ~/how-to-resetup-obelix-out-of-reboot.sh
2024-11-12 17:20:14 +01:00
Robert Schmidt
171530c067 cls_oaicitest.py: use new cls_cmd.getConnection() instead of old SSHconnection class
It is clearer in CI logs to use absolute paths, and that is also a
"preference" of the new SSH class (cls_cmd.py) in the sense that some
functions don't handle "cd" gracefully (because of underlying Python
library paramiko).

For zip, though, we should change to have nice relative paths in the
archives, so use cd <path> && zip ... to achieve that, instead of
changing to a directory. This way, the path on which we operate is still
visible in the logs in each line.
2024-11-12 17:18:28 +01:00
Robert Schmidt
cd25064fb1 Enable VLA Cxx extension in clang build
The clang build fails with

    /oai-ran/openair1/PHY/MODULATION/gen_75KHz.cpp:16:23: error: variable length arrays in C++ are a Clang extension [-Werror,-Wvla-cxx-extension]
       16 |     complex<double> t[len];
          |                       ^~~
    /oai-ran/openair1/PHY/MODULATION/gen_75KHz.cpp:16:23: note: function parameter 'len' with unknown value cannot be used in a constant expression

So ignore this warning (and make the build pass), since OAI uses VLAs in
various places.
2024-11-12 17:15:22 +01:00
Robert Schmidt
3991f15c89 Reorder compile options to have user-defined last
The previous version would put the user-defined options first. However,
the default options include e.g., -Wall. If a user tries to override
(see for instance the next commit) -Wall or other options might override
this and not honor the user choice.

To always have the user have the last work, put user-defined compile
options last.
2024-11-12 16:46:55 +01:00
Robert Schmidt
0443759716 Remove Num_Threads_PUSCH options: it's not used 2024-11-12 13:55:49 +01:00
Reem Bahsoun
a2056a3055 Add nsa flag in docker-compose and xml files 2024-11-12 13:55:49 +01:00
Reem Bahsoun
1b02b6327b Remove non existing volumes in /5g_f1_rfsimulator/docker-compose.yaml 2024-11-12 13:55:49 +01:00
Reem Bahsoun
7dcf80398a Update docs and README files to align with modifications in config files 2024-11-12 13:55:49 +01:00
Reem Bahsoun
dc7e6e5638 remove sa param from some targets/PROJECTS/GENERIC-NR-5GC/ conf files 2024-11-12 13:55:49 +01:00
Reem Bahsoun
c4d9d27702 Remove sa param from some CI conf files + remove 'sa' flag from docker-compose files 2024-11-12 13:55:49 +01:00
Robert Schmidt
5d2a1ace17 nr-{ue,}softmodem: Check for correct modes
THere are four possibilities, for the three options (phy_test, do_ra,
nsa):

- None is set -> SA
- Only one is set of each -> corresponding mode

Introduce a function softmodem_verify_mode() to check for these.
2024-11-12 13:55:49 +01:00
Robert Schmidt
e0e1ca6583 Make SA the default mode, remove corresponding option 2024-11-12 13:55:49 +01:00
Jaroslava Fiedlerova
fff605eab9 Add measurement of total gNB TX processing time for nr_dlsim 2024-11-12 12:02:29 +01:00
Jaroslava Fiedlerova
14a41df0ec CI: Harmonize LDPC CUDA and T2 test/analysis in physim
- Introduce "Run_Physim" function for running ldpctest (with CUDA) and
nr_dlsim/nr_ulsim (with T2) in RAN-gNB-N300-Timing-Phytest-LDPC test
pipeline.
- Create "cls_analysis.py" and introduce "analyze_physim" for
log analysis of physim tests.
- Define patterns to be searched in the physim logs.
- Extract and print information about total gNB RX/TX PHY processing time
from nr_ulsim/nr_dlsim logs.
- Remove "cls_physim.py" as it is not used anymore, cleanup "main.py".
2024-11-12 12:02:03 +01:00
Robert Schmidt
4e08542231 Remove link to old 5g_l2sim_tdd docker deployment 2024-11-12 09:52:57 +01:00
Robert Schmidt
34cf585acd Merge remote-tracking branch 'origin/fix-4layers-nr_dlsim' into integration_2024_w45 (!3082)
fix blocking bugs in command nr_dlsim -n100 -e27 -s35 -b 273 -R273 -x4 -y4 -z4

errors in main OAI code:

- one stack overflow
- one variable array of size 0
- one direct usage of unaligned SIMD

and small fixes inside the tests tool nr_dlsim to handle this large configuration (4layers, 100MHz)

use a better complex vector multiplication function
2024-11-09 22:51:45 +01:00
Robert Schmidt
7d7011f3f8 Remove use of SSHConnection(): not used in this file 2024-11-09 12:44:09 +01:00
Robert Schmidt
5078fcccbc CI test deployment.py: auto-pull missing images if necessary 2024-11-09 12:44:09 +01:00
Robert Schmidt
a3a59e4a97 Update CI unit test README.md with all tests 2024-11-09 12:44:09 +01:00
Robert Schmidt
9d4337c55d Do not retrieve deployment logs during DeployObject
Since commit 041b2b2d7a, the CI main loop
iterates over all steps, even if there has been a problem during an
earlier XML step. In all cases, UndeployObject() is marked to always
run, as we always need to make sure that all deployed services are
terminated. UndeployObject() always recovers logs. Hence, it's not
necessary to do it here as well; it leads to duplicated logs.

This is visible in all pipeline with a failed deployment: the logs
appear twice.
2024-11-09 12:44:09 +01:00
Robert Schmidt
019778e927 Simplify create_workspace.sh: remove unnecessary checkout
create_workspace.sh used to check out develop by default. However, this
is unnecessary because the script later checks out a specific reference
(which can be a commit ID, which is not accepted by git clone, the
reason we don't check out during clone); the repository will simply be
empty in the beginning, which should not be a problem.

Further, it is problematic because we use this script for the build of
the L2sim proxy, and the repository does not have develop; thus, without
this modification, L2sim proxy build will always fail.
2024-11-09 12:41:23 +01:00
Reem Bahsoun
980cc02b1a Delete 5g_l2sim components in ci_infra 2024-11-08 18:23:29 +01:00
Reem Bahsoun
5b0b2ab359 Delete 5g_l2sim related files 2024-11-08 18:23:21 +01:00
Jaroslava Fiedlerova
f6184c9ff0 Merge remote-tracking branch 'origin/doc-add-prbbl-cots-ue' into integration_2024_w45 (!3090)
Following up on !3081 (comment 140856)
2024-11-08 15:10:01 +01:00
Jaroslava Fiedlerova
fd6fbc5eae Merge remote-tracking branch 'origin/hotfix-nr-rlc-cppcheck' into integration_2024_w45 (!3098)
and simplify a bit (DevAssert instead of goto/exit)
2024-11-08 15:08:53 +01:00
Laurent THOMAS
8f688c0064 replace assert by error logging when we call DFT with impossible size to deal with existing LTE UE 2024-11-08 12:19:23 +01:00
Cedric Roux
752fa5fd61 nr rlc: hotfix: test allocation valid before use
and simplify a bit (DevAssert instead of goto/exit)
2024-11-08 11:59:23 +01:00
Guido Casati
d585aa0041 Add UL PRBs Blacklist section to NR_SA_Tutorial_COTS_UE.md 2024-11-08 10:12:19 +01:00
Jaroslava Fiedlerova
1898e34750 Merge remote-tracking branch 'origin/ci-add-4x4-test' into integration_2024_w45 (!3070)
Create a new test scenario with USRP N310, 60 MHz bandwidth, 4 DL layers and
2 UL layers. Test 480 Mbps DL and 120 Mbps UL.
2024-11-08 08:22:19 +01:00
Jaroslava Fiedlerova
5f5053c6f7 Merge remote-tracking branch 'origin/better-polar-decode' into integration_2024_w45 (!2949)
- simplify the code
- prevent to use "beta" tables from one decoder run to the next one (to see it
is the case, don't initialize beta, you will see it doesn't decode)
- decrease memory footprint of the decoder by x10 or more
- save about 15% of cpu in polartest unitary test tool, and more if we run in
realistic use case
- still this decoder performs much worse than the (very) slow OAI version by 3dB
2024-11-08 08:20:08 +01:00
Jaroslava Fiedlerova
de90129d3f Merge remote-tracking branch 'origin/compile-telnet-arm' into integration_2024_w45 (!3096)
telnetsrv uses the Intel/AMD-specific "cpuid" instruction, which is not
available on ARM machines. Remove the call.

The previous code was checking for the number of cores, which is
retained by a call to get_nprocs(). I did not find an equivalent for the
number of threads in C. In C++, there would be
https://en.cppreference.com/w/cpp/thread/thread/hardware_concurrency, in
case it's relevant for anybody.

Also, add it to the cross-compilation pipeline
2024-11-07 21:28:23 +01:00
Jaroslava Fiedlerova
d0f9d4c028 CI: Remove unused Build_Physim 2024-11-07 20:33:04 +01:00
Jaroslava Fiedlerova
f75e107d08 CI: remove unused Run_NRulsimTest 2024-11-07 20:33:04 +01:00
Laurent THOMAS
486cebce06 replace a printf() by a cleaner call to AssertFatal() 2024-11-07 17:08:18 +01:00
Laurent THOMAS
fd83be4e77 change the alignment of OAI mutli-dim arrays from 16 to 32 bytes 2024-11-07 17:08:18 +01:00
Laurent THOMAS
07b9daa762 fix blocking bugs in command nr_dlsim -n100 -e27 -s35 -b 273 -R273 -x4 -y4 -z4
use a better complex vector multiplication function
2024-11-07 17:08:18 +01:00
Laurent THOMAS
89b7ce5eb9 small fix of rotate vector unit test 2024-11-07 17:07:52 +01:00
Laurent THOMAS
ac06f107dd add a optimzed complex vector multiplication function 2024-11-07 17:07:50 +01:00
Jaroslava Fiedlerova
282ec44521 Merge remote-tracking branch 'origin/remove-accelleran-pipeline' into integration_2024_w45 (!3092)
We don't have access to the images for the Accelleran CU anymore, so we
can't run the test. Remove the pipeline from the repository.
2024-11-07 16:21:36 +01:00
Jaroslava Fiedlerova
c76baa1c70 Merge remote-tracking branch 'origin/fix-doc-cross-compile' into integration_2024_w45 (!3089)
- Give introductory line
- Reformulate headers to clarify steps
- Reference dockerfiles for further information
2024-11-07 16:20:35 +01:00
Jaroslava Fiedlerova
9009302a82 Merge remote-tracking branch 'origin/fix-csi-data-race' into integration_2024_w45 (!3077)
csiim_vars/csirs_vars used to be global array for each UE. Now its present
in phy_data which is in dynamically allocated memory.

MAC config was done without mutex while DL and UL threads could be running
at the same time.

get_ue_nas_info was allocating memory possibly from more than one thread.
Moved it into new init function for UE NAS layer.

Addreses most issues in #869
2024-11-07 16:18:09 +01:00
Jaroslava Fiedlerova
1c214994df Merge remote-tracking branch 'origin/nr-minor-cleanup-gnb' into integration_2024_w45 (!3048)
The goal of this MR is to improve readability, maintainability and consistency
of gNB initialization functions.
This MR is:

- cleaning up redundant and unused code
- refactoring init_gNB, l1_north_init_gNB, RCconfig_NR_L1, NRRCConfig
- removing redundant memory allocation for gNB RAN context and L1 instances
- cleaning up redundant log lines
2024-11-07 16:16:05 +01:00
Robert Schmidt
9f9299706b Improve cross-compile documentation
- Give introductory line
- Reformulate headers to clarify steps
- Reference dockerfiles for further information
2024-11-07 15:10:24 +01:00
Robert Schmidt
49584e6cb3 fixup 2024-11-07 13:17:21 +01:00
Robert Schmidt
2204fc13db Compile telnetsrv in cross-compilation pipeline 2024-11-07 12:44:26 +01:00
Robert Schmidt
76c3e4b72e Remove x86-specific instructions from telnet server
telnetsrv uses the Intel/AMD-specific "cpuid" instruction, which is not
available on ARM machines. Remove the call.

The previous code was checking for the number of cores, which is
retained by a call to get_nprocs(). I did not find an equivalent for the
number of threads in C. In C++, there would be
https://en.cppreference.com/w/cpp/thread/thread/hardware_concurrency, in
case it's relevant for anybody.
2024-11-07 12:41:47 +01:00
Robert Schmidt
a650dcc8ab Remove Interop-F1/Accelleran-CU testing pipeline
We don't have access to the images for the Accelleran CU anymore, so we
can't run the test. Remove the pipeline from the repository.
2024-11-07 12:33:47 +01:00
Robert Schmidt
0e93a8b4cf Move nr_polar_init.c to nrPolar_tools/ 2024-11-07 11:58:44 +01:00
Robert Schmidt
16535f3de4 Reformat all polar code
Commands used:

    clang-format -i openair1/PHY/CODING/TESTBENCH/polartest.c
    clang-format -i openair1/PHY/CODING/nr_polar_init.c
    clang-format -i openair1/PHY/CODING/nrPolar_tools/*
2024-11-07 09:43:19 +01:00
Laurent THOMAS
28234893f7 add default value setting instead of assert if we process uninitialized beta 2024-11-07 09:35:50 +01:00
Laurent THOMAS
4a971caf9f use SIMD in the highest cpu part
the version in develop is difficult to understand, and surprizing design
it loops only when avx2mod == 0 because when this test is false, the
size is always small i also spent time to understand, but i think i have
not changed it by not looping over the array.
2024-11-07 09:35:50 +01:00
Bartosz Podrygajlo
00e50f082d Limit recursion in polar decoder
Use non-recursive polar decoder after traversing the tree once. Maximum number
of nodes is set to 600 (unsure of the maximum). This is more performant
than the recursive version.
2024-11-07 09:29:59 +01:00
Laurent THOMAS
a235206647 minor improvements for memory and SIMDE 2024-11-07 09:29:41 +01:00
Laurent THOMAS
3e019af4d9 remove the big LUT for decoder de-interleaver
no performance degradation

some reformatting
2024-11-07 09:29:21 +01:00
Laurent THOMAS
d57ea715c0 Improve polar decoder/encoder
- Ensure packed struct through bitfield
- decoder tree buffer increase: i don't find evidence in the 3GPP
  standard of the max size of polar coded PDU.  even with this max size,
  the way this tree is built is not trivial.  so, it is hard to predict,
  i just put 8 system pages (32KB) that looks enough [1]
- a lot of reformatting

[1] https://arxiv.org/pdf/1804.04389
according to this paper, the largest polar code in 5G is in UL, so
likely the biggest problem will be in gNB, not the UE.  in DL, the max
output coded block is 512, in UL 1024.  probably the tree we discuss is
related to this size.

"frozen bits" means only bits we don't encode/decode because polar code
size is only by power of 2.
We see this in OAI code:  NR_POLAR_PUCCH_N_MAX is 10, so 2^10 is 1024,
that is the maximum size for 5G polar code length.  in the code, we
assert if N > 512: "N = %d, not done yet\n",
polarParams->N".  so, the today OAI code can't do PUCCH large blocks.

using current oai limitation of 2⁹ max code size, we can create up to
2^9+2⁸... nodes, so 1023 nodes in the tree.  the problem then is that
each node have variable size, depending on the 'level' (the power of 2
we are currently).  the algo provision large alpha and beta to be able
to store all lower levels in the tree (int leaf_sz = 1 << level)
therefore upper tree nodes are large (the top level for n=9 uses about
1.5KB) and the bottom nodes uses 64 bytes.  if all nodes are populated,
the size will be very large: 1.5KB + 2 * 800 + ....  but, we create
nodes in the tree only for the "information bits", so the payload, that
is limited to 128 bits (else we assert, the code is not "finished").
1.5KB * 128 is >> 8KB i allocated.  but, we can't create more than one
mode at top level, so there is maximum 1.5KB + 2 * 800, + 4 * 400 + 8 *
200 + 16 * 100 + remaining of 128-32 nodes of 64 bytes.  about 14KB.

i allocated 1024*sizeof(__m256i) bytes = 32KB that looks good.
2024-11-07 09:25:18 +01:00
Sakthivel Velumani
75cca9be3e Fix logging 2024-11-06 21:33:38 -05:00
Guido Casati
b61de6453a Refactor NRRCConfig
* the goal of this function is to initialize and configure the RAN Context
* the goal of get_options is to get command line options
* this commit aims at making the implementation more consistent
* move initialization of RC.nb_nr_CC to this function
* cleanup redundant initializations of RC.nb_nr_macrlc_inst outside NRRCConfig
* cleanup redundant initization of RC.nb_nr_macrlc_inst from getter function (get_node_type)
* cleanup RC initialization in RCconfig_NR_L1
* removed redundant log lines (print number of instances in NRRCConfig only)
* do RC init after getting CL options and configuration
* get_node_type shall access configuration only, not RC context
* NRRCConfig shall be called only once: made it thread-safe
2024-11-06 10:16:39 +01:00
Guido Casati
14a379cb75 Removed global variable NB_RU
* this variable was set after RC.nb_RU, which is set in NRRCConfig
  therefore it was redundant since it can be easily replaced by
  the original
2024-11-06 10:16:11 +01:00
Guido Casati
b7063c8b75 Return a pointer to a new RRC instance (gNB_RRC_INST) from RCconfig_NRRRC 2024-11-06 10:15:43 +01:00
Guido Casati
f80b09ac99 Simplified use of nb_nr_inst
* nb_nr_inst represents the number of gNB instances and the number of RAN contexts
* it used also to count the number of RRC instances in the node
* it is set from config file in NRRCConfig, therefore redundant checks after
  this function have been removed
* redundant global variable NB_gNB_INST, set after nb_nr_inst, was removed
2024-11-06 10:15:42 +01:00
Guido Casati
eaeae880d0 Removed unused wait_for_sync 2024-11-06 10:15:26 +01:00
Guido Casati
dfb90a173d Cleanup commented out code in nr_init.c 2024-11-06 10:15:26 +01:00
Guido Casati
881c6b0c1a Refactor l1_north_init_gNB
* code cleanup
* clang-formatted
* simplified code
2024-11-06 10:15:25 +01:00
Guido Casati
3e5292ca0b Cleanup unused global vars in executables/nr-softmodem.c 2024-11-06 10:14:58 +01:00
Guido Casati
3698881849 Removed redundant initialization of pre-processor function pointers
* done already in mac_top_init_gNB
2024-11-06 10:14:58 +01:00
Guido Casati
ba43ebb5a8 Cleanup of dump_nr_prach_config 2024-11-06 10:14:58 +01:00
Guido Casati
ebeedbfe7f Cleanup of unused set_default_frame_parms 2024-11-06 10:14:57 +01:00
Guido Casati
e828d0e6a4 Removed unused num_ulprbbl in gNB_MAC_INST_s 2024-11-06 10:14:42 +01:00
Guido Casati
2ff25e688a Remove gNB and L1 init in RCconfig_nr_prs
* gNB and L1 init is done in init_gNB and RCconfig_NR_L1
* moved RCconfig_nr_prs out of create_gNB_tasks for consistency
* do RCconfig_nr_prs only for L1 instances
2024-11-06 10:14:42 +01:00
Guido Casati
e57acf6190 Refactor RCconfig_NR_L1
* removed initialization of gNB
* separate function to get blacklisted UL PRBs
* call the getter in both L1 and MAC/RLC configuration
* other minor improvements
2024-11-06 10:14:41 +01:00
Guido Casati
2a9cb35348 Do L1 configuration right after gNB initialization
* do always gNB init for L1 instance
  and also for CU and CU-CP
* do L1 config only for L1 instances
2024-11-06 10:13:06 +01:00
Guido Casati
d8c7ff4c2c Refactor init_gNB()
* code cleanup
* clang-formatted
* adopted calloc_or_fail
* allocate nb_nr_L1_inst of RC.gNB instead of (RC.nb_nr_L1_inst + 1)
2024-11-06 10:12:52 +01:00
Bartosz Podrygajlo
af63f3f91c Add missing asserts for mac->if_mutex lock/unlock calls 2024-11-06 09:58:17 +01:00
Robert Schmidt
2696f475aa Remove libatlas-base-dev from ARM64 deps: not needed (see #802) 2024-11-06 09:51:01 +01:00
Jaroslava Fiedlerova
9ce8a9ac7d CI: use default value for ulsch_max_frame_inactivity in 60 MHz 4x4 config file 2024-11-05 20:04:04 +01:00
Jaroslava Fiedlerova
b77c0d81e0 CI: update information about frequency in SA-2x2 config files 2024-11-05 20:04:04 +01:00
Jaroslava Fiedlerova
5e8d62ff85 CI: remove ssb_SubcarrierOffset from config file
ssb_SubcarrierOffset is no longer taken in account from the gNB config file,
as it is computed automatically.
2024-11-05 20:04:04 +01:00
Jaroslava Fiedlerova
b3d45cf698 CI: Add test with 4 DL layers, 60 MHz BW to SA-2x2 pipeline 2024-11-05 20:04:04 +01:00
Bartosz Podrygajlo
4d07003652 Thread safe get_ue_nas_info
Call get_ue_nas_info before any thread starts to prevent
concurrent initialization of uicc array.
2024-11-05 13:50:55 +01:00
Bartosz Podrygajlo
f6ea1648e9 Fix data race on csiim_vars
csiim_vars used to be global array for each UE. Now its present in phy_data which
is in dynamically allocated memory
2024-11-05 13:50:55 +01:00
Bartosz Podrygajlo
0109a6b976 Fix data race on csirs_vars
csirs_vars used to be global array for each UE. Now its present in phy_data which
is in dynamically allocated memory.
2024-11-05 13:50:55 +01:00
Bartosz Podrygajlo
900fcd9762 Thread safety for MAC config
Move mac_IF_mutex to MAC instance and use it for ensuring thread safety when modifying
MAC structures from RRC.
2024-11-05 13:50:55 +01:00
Robert Schmidt
220d851deb Merge branch 'integration_2024_w44' into 'develop'
Integration: `2024.w44`

See merge request oai/openairinterface5g!3081

* !2988 Add functional DFT test
* !3072 snow3g: fix array size
* !3073 small fix for 3 digit mnc usage in sib1
* !3040 Update pbchsim to work with other numerologies
* !3078 Simplify logs in gNB&UE
* !3080 Add Fedora 41, build_oai cleanup
* !3061 RLC optimization
* !3008 Fix regression 4g
* !3084 Fix a typo in nrue.uicc.yaml file
* !3085 chore(ci): creating a develop tag on top of develop-commit-id tag for the local private registry
2024-11-05 11:58:33 +00:00
Robert Schmidt
e3c3a8a6ff Merge remote-tracking branch 'origin/ci-add-develop-tag-in-private-repo' into integration_2024_w44 (!3085)
chore(ci): creating a develop tag on top of develop-commit-id tag for the local private registry

Create a 2nd tag of develop for all images on the local registry.  We
are doing this in order to simplify cross-repository testing between
FlexRIC and RAN.
2024-11-05 11:03:02 +01:00
Robert Schmidt
70885cc959 Merge remote-tracking branch 'origin/nrue-yaml-hotfix' into integration_2024_w44 (!3084)
Fix two issues with softmodem yaml files

- Fix a typo that prevents casting max_chan to integer in nrue.uicc.yaml
- Remove unused field ssb_PositionsInBurst_PR from gNB example config
  yaml file
2024-11-05 11:02:24 +01:00
Robert Schmidt
f216c47ace Merge remote-tracking branch 'origin/fix-regression-4G' into integration_2024_w44 (!3008)
Fix Regression 4G

- Fix various bugs and/or regressions in 4G code
- Also, the CI does not test RFsim 4G with --sanitize, enables this to
  detect problems.
2024-11-04 19:43:52 +01:00
Robert Schmidt
01aadcac1f Merge remote-tracking branch 'origin/rlc-optimization' into integration_2024_w44 (!3061)
RLC optimization

Two improvements:

- using functions instead of function pointers which enables inlining
- avoid 1 malloc/free per SDU

Benchmark results:

before:

    BM_nr_rlc_am_entity/20000           5036721 ns      5036541 ns          138
    BM_nr_rlc_am_entity/20000           5032061 ns      5031849 ns          138
    BM_nr_rlc_am_entity/20000           5037071 ns      5037056 ns          138
    BM_nr_rlc_am_entity/20000           5035472 ns      5035248 ns          138
    BM_nr_rlc_am_entity/20000           5032860 ns      5032681 ns          138
    BM_nr_rlc_am_entity/20000_mean      5034837 ns      5034675 ns            5
    BM_nr_rlc_am_entity/20000_median    5035472 ns      5035248 ns            5
    BM_nr_rlc_am_entity/20000_stddev       2267 ns         2315 ns            5
    BM_nr_rlc_am_entity/20000_cv           0.05 %          0.05 %             5

after:

    BM_nr_rlc_am_entity/20000           4974403 ns      4974202 ns          140
    BM_nr_rlc_am_entity/20000           4976705 ns      4976444 ns          140
    BM_nr_rlc_am_entity/20000           5004550 ns      5004508 ns          140
    BM_nr_rlc_am_entity/20000           4974652 ns      4974460 ns          140
    BM_nr_rlc_am_entity/20000           4976447 ns      4976225 ns          140
    BM_nr_rlc_am_entity/20000_mean      4981351 ns      4981168 ns            5
    BM_nr_rlc_am_entity/20000_median    4976447 ns      4976225 ns            5
    BM_nr_rlc_am_entity/20000_stddev      13009 ns        13087 ns            5
    BM_nr_rlc_am_entity/20000_cv           0.26 %          0.26 %             5
2024-11-04 19:42:43 +01:00
Raphael Defosseux
5e7fa3fc64 chore(ci): creating a develop tag on top of develop-commit-id tag for the local private registry
Signed-off-by: Raphael Defosseux <raphael.defosseux@eurecom.fr>
2024-11-04 15:12:20 +01:00
Bartosz Podrygajlo
63fb3af917 Remove unused ssb_PositionsInBurst_PR field from gNB yaml file example 2024-11-04 14:47:46 +01:00
Bartosz Podrygajlo
7a4aa41c90 Fix a typo in nrue.uicc.yaml file
Fix a typo that prevents casting max_chan to integer
2024-11-04 13:07:56 +01:00
Robert Schmidt
1b1be2ebea Merge remote-tracking branch 'origin/fedora-41-cleanup' into integration_2024_w44 (!3080)
Add Fedora 41, build_oai cleanup

- Add Fedora 41 to list of supported distributions
- Remove some dependencies in RHEL that are not necessary
- Cleanup some build_oai documentation of non-supported options
2024-11-01 11:59:44 +01:00
Robert Schmidt
da7a028a3f Merge remote-tracking branch 'origin/logs-refactor-orange' into integration_2024_w44 (!3078)
Simplify logs in gNB&UE

- reduce the amount of printf() that outputs useless info
- in MAC, PHY, NGAP, RRC, mark some "important" UE events with LOG_A for
  better visibility -> can put log_config.global_log_level analysis to
  only see important stuff
- in RRC, use some macro to consistently print logs
- track the cellID of a UE in RRC
2024-11-01 11:58:47 +01:00
Robert Schmidt
25405d1720 Merge remote-tracking branch 'origin/NR_PBCHSIM_changes' into integration_2024_w44 (!3040)
Update pbchsim to work with other numerologies

NR PBCHSIM updated to work with 15Khz and 120Khz.
2024-11-01 11:58:13 +01:00
Robert Schmidt
9d96326ce7 Remove RHEL8 from list of supported distributions 2024-10-31 12:53:08 +01:00
Robert Schmidt
d6938e7b2a Remove useless options: -x does nothing 2024-10-31 12:53:08 +01:00
Robert Schmidt
8d62bc38c0 Remove documented but unsupported build_oai options 2024-10-31 12:53:08 +01:00
Robert Schmidt
a93ad34c6b Remove non-required dependencies from install list
openssl and libffi are not required for building OAI. Remove them.
2024-10-31 12:53:08 +01:00
Robert Schmidt
9f56b8e21f Add Fedora 41 to list of supported distributions 2024-10-31 12:53:08 +01:00
Robert Schmidt
24e591df59 Merge remote-tracking branch 'origin/3-digit-mnc-in-sib1' into integration_2024_w44 (!3073)
small fix for 3 digit mnc usage in sib1

When 3 digit MNC is used in PLMN, during preparation of SIB1, first
digit of MNC was not taking into account. UE derives Serving Network
Name (SNN) using PLMN info from sib1. Because of 5GCore and UE has
different SNNs, this leads to XRES*, RES* mismatch during Authentication
Procedure between 5GCore and UE. (SNN is used for derivation of these
keys)
2024-10-31 08:41:20 +01:00
Robert Schmidt
571d1fceab Merge remote-tracking branch 'origin/hotfix-snow3g' into integration_2024_w44 (!3072)
snow3g: fix array size
2024-10-31 08:40:57 +01:00
Robert Schmidt
84db6fd9f3 Merge remote-tracking branch 'origin/add-functional-test-dft' into integration_2024_w44 (!2988)
Add functional DFT test

- clean up code on (i)dft calls
- add DFT test for some DFT sizes against trivial implementation: it
  tests a simple square signal in only real values
- correctly scale DFT-16
2024-10-31 08:40:21 +01:00
Robert Schmidt
55feed3645 Add chart for nr_pbchsim.otherSCS execution 2024-10-31 08:26:00 +01:00
Laurent THOMAS
ae8df083fc Add functional test for DFT 2024-10-30 18:04:59 +01:00
Laurent THOMAS
576d468809 Clean up intermediate DFT macros, remove non-existing DFTs
DFT for 9216 and 73728 don't exist and/or assert, so remove them from
the list.
2024-10-30 18:04:43 +01:00
Robert Schmidt
ffa3260ab5 Set explicit wd, set LD_LIBRARY_PATH to find dfts.so 2024-10-30 17:55:11 +01:00
Laurent THOMAS
5cd5f72533 case DFT12 processing with specific data organization: remove intermediate pointer 2024-10-30 17:54:58 +01:00
Robert Schmidt
f00ee9af2f review comment: to squash 2024-10-30 16:45:26 +01:00
Robert Schmidt
9395a0673e change macros for UE logging 2024-10-30 15:45:11 +00:00
Bartosz Podrygajlo
54a57bd2d6 RLC optimization - allocate SDU header and SDU data together
By allocating sdu data and sdu header together the total amount of
free/malloc calls per SDU is reduced by 1 increasing overall performance.
2024-10-30 16:03:01 +01:00
Bartosz Podrygajlo
7ae1aa21f4 RLC optimization - using function instead of function pointers
Moved some functions around so that instead of a function pointer a function
call is used. This enables inlining of functions which reduces number of function calls.
2024-10-30 16:02:50 +01:00
Laurent THOMAS
4cf2719bd9 scale in DFT16 as per normal scaling sqrt(16) = 4 2024-10-29 18:47:15 +01:00
Laurent THOMAS
f1f02ec0a1 use existing functions to retrieve (i)dft enum value 2024-10-29 18:47:15 +01:00
batuhan duyuler
edeb7b8f61 handling 1st digit of mnc in SIB1
During preparation of SIB1, first digit of MNC was not taking into account.
This leads to XRES*, RES* mismatch during Authentication Procedure between 5GCore and UE because of derived serving network names.
2024-10-29 16:43:26 +01:00
Robert Schmidt
d5cd07e37c Correct RRC log: remove trailing whitespace 2024-10-29 16:41:20 +01:00
Robert Schmidt
21d31e4359 RRC: more UE tracability through LOG_A
It is difficult to keep track of a "UE lifecycle". To make this more
easy, add LOG_A at major UE RRC messages.
2024-10-29 16:38:54 +01:00
Robert Schmidt
14d238baee RRC: keep track of UE's CellID
It will be used in the next commit
2024-10-29 16:38:07 +01:00
Robert Schmidt
a0a4096f95 Mark "gNB event" of NG connection thru LOG_A 2024-10-29 16:37:17 +01:00
Robert Schmidt
b8b921d49f Mark major "UE events" in in PHY+MAC thru LOG_A 2024-10-29 16:36:53 +01:00
Robert Schmidt
68f8ef7c7a Reduce amount of logs in L1/L2
This commit removes many logs that just show memory addresses, indices,
etc., which, I presume, do not mean anything to the "average user" and
developers alike.
2024-10-29 16:36:13 +01:00
Robert Schmidt
8cc6c0cbbb Various places: remove printf and/or transform to LOG_D 2024-10-29 16:35:47 +01:00
Robert Schmidt
83d9397002 MeasTimingConfig: only print ASN.1 when requested 2024-10-29 16:35:47 +01:00
Robert Schmidt
5180d4df74 nr-ru: remove "low-density" printf, transform rest to LOG_D
Most printf() do not show much information (like only a "X is ready",
which is not useful for subsystems). Remove those. The rest, make them
LOG_D.
2024-10-29 15:55:19 +01:00
Robert Schmidt
cbd5f1671f nr-softmodem.c: remove unnecessary printfs 2024-10-29 15:55:19 +01:00
Robert Schmidt
925566b075 module loader: remove printf(), put error into printf(stderr) 2024-10-29 15:55:19 +01:00
Robert Schmidt
85e198b178 Config module: use printf_params() to print log messages 2024-10-29 09:37:10 +01:00
Robert Schmidt
3e86e457b9 Logging: remove useless printf 2024-10-29 09:23:55 +01:00
Robert Schmidt
6c1d94a321 Merge branch 'integration_2024_w43' into 'develop'
Integration: `2024.w43`

Closes #769 and #841

See merge request oai/openairinterface5g!3069

* !2994 Refactor file descriptor handling in rfsimulator
* !3010 Fix heap overflow in websrv
* !3043 CI: Update RAN-gNB-N300-Timing-Phytest-LDPC test cases
* !3060 process registration reject in UE
* !3062 fix nr rlc tests
* !3067 Bugfix: Fill QFI for N3 GTP messages
* !3057 Bugfix in ue pusch mac pdu creation
* !3068 getopt() returns int
* !3056 F1AP Enc/Dec Library follow-up
* !3064 T: don't check argument in optimized version of T IDs
* !2786 Add F1 Handover procedures
* !2980 Refactor NAS 5GS PDU Session Establishment Accept handling and other NAS improvements
* !3063 Update yaml-cpp dependency handling
* !2989 NR gNB scheduler improvements for BWP operation
2024-10-29 06:55:10 +00:00
Cedric Roux
5ffa655902 snow3g: fix array size 2024-10-28 22:16:22 +01:00
Robert Schmidt
26fa3300e6 Merge remote-tracking branch 'origin/NR_gNB_sched_improvements' into integration_2024_w43 (!2989)
This MR removes limitations on BWP scheduler operation for which only
the information from the first UE of the list was taken into account. To
do so, I moved the VRB map check for DL and UL scheduler out of the
preprocessor and in the scheduler itself.

Closes: #769
2024-10-28 19:35:27 +01:00
Robert Schmidt
39f006926c Merge remote-tracking branch 'origin/yaml-cpp-fix-dependency' into integration_2024_w43 (!3063)
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 19:34:48 +01:00
Robert Schmidt
d8d11d36c0 Mark CPM_SOURCE_CACHE as a CACHE variable
By omitting the variable CPM_SOURCE_CACHE as CACHE'd, it is actually
given to CPM, but does not appear when viewing it's content, e.g.,
through ccmake. Mark is as CACHE so that it will also appear.
2024-10-28 18:03:11 +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
Raymond Knopp
026190e0d1 nr_ulsch log2_maxh case for single-layer 2024-10-28 16:55:06 +01:00
Jaroslava Fiedlerova
538c115fb7 CI: reduce RX gain in 4G pipelines to avoid false RACH attempts 2024-10-28 13:42:19 +01:00
Robert Schmidt
7b2e4a8ce7 Merge remote-tracking branch 'origin/nr-nas-issue-841' into integration_2024_w43 (!2980)
Refactor NAS 5GS PDU Session Establishment Accept handling

- Closes #841
- address minor code issues
2024-10-28 11:53:00 +01:00
Raymond Knopp
e0c0df38ea adjustment of log2_maxh for 2-layer UL MIMO 2024-10-28 10:50:53 +01:00
Raymond Knopp
3e6f2db124 use ML receiver for 64 QAM UL-MIMO 2024-10-28 10:50:28 +01:00
luis_pereira87
ad9b91627c Prevent DLSCH scheduler to allocate PRBs outside of current BWP 2024-10-26 11:19:40 +02:00
francescomani
62301e9eef remove bf_weights from 2step RA config file 2024-10-26 11:19:40 +02:00
francescomani
c8387d706c making ULSCH preprocessor agnostic to UEs BWP and TDA 2024-10-26 11:19:37 +02:00
Robert Schmidt
5b73319278 Merge remote-tracking branch 'origin/f1-handover-procedures' into integration_2024_w43 (!2786)
Add F1 Handover procedures

- Clean up at RRC and MAC
- Add DU handover procedures, completely handle CellGroupConfig at DU
- Add CU handover procedures
- Maintain reestablishment working between/after handover
- Changes at UE to resync on different frequency DUs

Instructions: see doc/handover-tutorial.md

Things not implemented/open/missing: see #855
2024-10-25 20:22:01 +02:00
Robert Schmidt
ca8ca63744 Merge remote-tracking branch 'origin/hotfix-t-tracer' into integration_2024_w43 2024-10-25 20:18:58 +02:00
Robert Schmidt
6c6b10d020 Merge remote-tracking branch 'origin/f1ap-msg-encdec-followup' into integration_2024_w43 (!3056)
F1AP Enc/Dec Library follow-up

Follow-up after !2890
2024-10-25 20:18:33 +02:00
Robert Schmidt
f2c6fce30f Add 5G RRC documentation 2024-10-25 20:13:47 +02:00
Robert Schmidt
05f10decee Add handover tutorial
Co-authored-by: rmagueta <rmagueta@allbesmart.pt>
2024-10-25 20:13:47 +02:00
Robert Schmidt
ad81d48285 MAC doc: minor clarifications 2024-10-25 20:13:47 +02:00
Robert Schmidt
5c8ee81683 Update FEATURE_SET.md with F1 handover procedures 2024-10-25 20:13:47 +02:00
Robert Schmidt
e02aae4624 Open TODOs at RRC 2024-10-25 20:10:26 +02:00
Roberto Magueta
c956de6f27 Trigger F1 Handover on A3 event
When receiving a measurement report including an A3 event, trigger
handover towards the indicated cell.

Note that currently, we are still limited to one Cell by DU, hence
looking up a cell comes down to looking up a DU, as is done here.

Co-authored-by: batuhanduyuler <batuhan.duyuler@firecell.io>
Co-authored-by: Luis Pereira <lpereira@allbesmart.pt>
Co-authored-by: Robert Schmidt <robert.schmidt@openairinterface.org>
2024-10-25 20:10:26 +02:00
Robert Schmidt
8b4259c047 Ignore UE Context Modification Required during handover
During handover, we might receive a UE context Modification required
message. Currently, we cannot handle this; ignore the message.
2024-10-25 20:10:26 +02:00
Robert Schmidt
546ffee56b DU dies during HO: free HO context of UE to avoid dangling data 2024-10-25 20:10:26 +02:00
Robert Schmidt
b6ccf8aa77 Handle reestablishment during handover
This commit implements reestablishment during handover when occurring at
the source DU, either as a handover Failure or "normal" reestablishment
(something else went wrong). In this case, the CU will trigger HO
cancel, which in F1, means to cancel on the target DU. Also, undo any
previous ID changes. Retain the old CellGroupConfig (before handover)
for the case of reestablishment at source. If not needed, it is freed
after the reconfiguration complete.

Reestablishment on target cell during handover cannot be handled by the
gNB (yet). It is the same as with a normal reestablishment (not during
handover) on a different cell: that cell has no notion of the old UE, so
we cannot simply indicate the old UE to reestablish; at least, we would
need to cleanup the CellGroupConfig, and I am not sure this works out of
the box, either.
2024-10-25 20:10:26 +02:00
Robert Schmidt
c6434c80fd Reestablishment hack: free reconfigurationWithSync
After handover, the last CellGroupConfig received is the one for
handover, containing a reconfigurationWithSync. Resending this
CellGroupConfig to the UE after reestablishment would trigger a
handover. Free the reconfigurationWithSync to have the UE complete
reestablishment at the current cell.

The CU implementation of reestablishment modifies the CellGroupConfig.
It should not do this, but does as of now. The specification (38.473 Sec
8.7) foresees an optional F1 UE context modification procedure (which
can be used to receive the CellGroupConfig). This should be done instead
to retrieve the correct CellGroupConfig.

Note that the F1 UE context setup procedure, similar to the UE context
modification procedure, would also allow to perform reestablishment on a
DU that is not the original one.
2024-10-25 20:10:26 +02:00
Robert Schmidt
145fd2b415 Handle Release request during handover
If we release a request from a DU during, handle as follows:

- from the source: Handover is still ongoing, so ignore it by
  acknowledging the release, and marking handover as done. In this case,
  we did not receive an acknowledgement from the target, but since the
  source DU does not keep the UE context, we could not cancel the
  handover anymore either. The UE might come back on any DU through
  reestablishment (or simply be connected on the target)
- from the target: consider this to be a genuine release, and forward to
  AMF.

Co-authored-by: batuhanduyuler <batuhan.duyuler@firecell.io>
Co-authored-by: rmagueta <rmagueta@allbesmart.pt>
2024-10-25 20:10:26 +02:00
Robert Schmidt
a2da391e70 Handle successful HO after reconfigurationComplete
The HO is completed (from a pure RAN perspective) when receiving
reconfiguration complete. In that case, remove the HO context, and
signal successful handover through the callback. For the F1 handover,
this means releasing the UE at the source DU.

Co-authored-by: batuhanduyuler <batuhan.duyuler@firecell.io>
Co-authored-by: rmagueta <rmagueta@allbesmart.pt>
2024-10-25 20:10:26 +02:00
Robert Schmidt
e42c303bd7 Handle UE Context Modification Response in HO case
We expect the UE's RRC Reconfiguration Complete to come through the
target DU, as the "new UE" at the target CU. Also, function
CU_handle_UL_RRC_MESSAGE_TRANSFER() checks that the UL RRC Message,
through which we will receive RRC Reconfiguration Complete, matches the
DU UE ID stored in RRC. Since the DU UE ID will be the one at the target
DU, while up to now, we stored the DU UE ID at the source DU.

Correspondingly, update the DU UE ID to the one at the target DU; also
update the corresponding assoc_id.

Co-authored-by: batuhanduyuler <batuhan.duyuler@firecell.io>
Co-authored-by: rmagueta <rmagueta@allbesmart.pt>
2024-10-25 20:10:26 +02:00
Robert Schmidt
0e20c4c257 Handle UE context setup resp for HO: trigger reconfiguration on source
In this commit, handle the reception of a UE context setup response, in
the case of handover. In that case, store the gNB-DU UE ID and C-RNTI of
the UE at the target DU, and trigger a reconfiguration towards the UE at
the source DU via the callback.

To ensure that the CU-UP's PDCP is SN-aligned with the UE, use
cuup_notify_reestablishment() to reset the bearers with PDCP
reestablishment, which has already been implemented in the last commit.

Co-authored-by: batuhanduyuler <batuhan.duyuler@firecell.io>
Co-authored-by: rmagueta <rmagueta@allbesmart.pt>
2024-10-25 20:10:26 +02:00
Robert Schmidt
7b163f1688 Harmonize UE context setup resp bearer handling
This is preparatory work to handle the UE context setup response from
the target DU. There are two cases:

- "Initial" UE context setup response (during connection setup): we need
  to inform the CU-UP via an E1 message of the new bearers (GTP tunnel
  update)
- F1 handover:  we need to inform the CU-UP via an E1 message that there
  are DRBs to reestablish

There are two different functions, e1_send_bearer_updates() and
cuup_notify_reestablishment(), to do this. Harmonize the code, before
implementing the actual handover logic in the next commit.
2024-10-25 20:10:26 +02:00
Robert Schmidt
66b548060e Implement F1 Handover Trigger
Add a function to trigger an F1 handover, including the corresponding
telnet function implementation. The function looks up source&target DU,
creates a HO context, and reads PDU information to send a UE context
setup request to the target DU towards which to handover.

Co-authored-by: batuhanduyuler <batuhan.duyuler@firecell.io>
Co-authored-by: rmagueta <rmagueta@allbesmart.pt>
2024-10-25 20:10:26 +02:00
Robert Schmidt
c0770cc19b Make QoS characteristics function available
Functions get_qos_char_from_qos_flow_param() and
get_qos_characteristics() will be used in rrc_gNB_mobility.c to read PDU
information for handover. Move the definitions to a header to reuse
later.
2024-10-25 20:10:26 +02:00
Robert Schmidt
746dc29a46 Add HandoverPreparationInformation() ASN.1 encoder function
HandoverPreparationInformation will be used in the follow-up commit to
trigger a handover.

Co-authored-by: batuhanduyuler <batuhan.duyuler@firecell.io>
Co-authored-by: rmagueta <rmagueta@allbesmart.pt>
2024-10-25 20:10:26 +02:00
Robert Schmidt
90d8eefa59 Add new handover context structures for handover operation 2024-10-25 20:10:26 +02:00
Robert Schmidt
b4bf59c55b Add telnet module function to trigger F1 HO 2024-10-25 20:10:26 +02:00
Robert Schmidt
b5e3507764 Fix: store CellGroupConfig from initial UL RRC message
This F1 message sends us the CellGroupConfig of the UE. Store it in case
we need it. For instance, at least in OAI, it is possible to make a
handover without a DRB (this might or might not be standard compliant).
However, in this case, we did never receive a UE context setup request,
which stores the CellGroupConfig. Hence, store the first CellGroupConfig
we receive, to be able to do e.g., handover.
2024-10-25 20:10:26 +02:00
Robert Schmidt
35995c8a10 Move RETURN_IF_INVALID_ASSOC_ID() to header for use elsewhere
RETURN_IF_INVALID_ASSOC_ID() checks if an assoc_id (of a DU) is valid.
It will be also used in the mobility RRC module later. Move it to the DU
header (where it logically belongs) to move it from there.
2024-10-25 20:10:26 +02:00
Robert Schmidt
6cd76ff862 Remove unused includes and comment with resolved issue 2024-10-25 20:10:25 +02:00
Roberto Magueta
67eb94db3f Print RRC neighbor cell measurements, if present
Co-authored-by: Luis Pereira <lpereira@allbesmart.pt>
2024-10-25 20:10:25 +02:00
Robert Schmidt
c3ef6df44b Bugfix: request release in case of failed RA
Prior to this commit, after RA failure, the DU would send a UE context
release complete, without actually requesting one. This could lead to
inconsistent state between DU and CU, because the CU might just discard
this (unrequested) message, and not actually trigger a release [1].

Thus, refactor the release request into a function, and use it to
request release of a UE for which RA has not been completed. If the CU
does not know the UE, release the UE immediately.

[1] One possibility would be that during reestablishment, the CU would
request to look up an old DU UE ID when it has been released, resulting
in

    Assertion (oldUE) failed!
    In dl_rrc_message_transfer() /home/oaicicd/robert/openairinterface5g/openair2/LAYER2/NR_MAC_gNB/mac_rrc_dl_handler.c:860
    CU claims we should know UE bc7f, but we don't
2024-10-25 20:10:25 +02:00
rmagueta
ecd941e946 Remove old RA process(es) when removing UE
In handover, we might need to remove a UE that we knew under it's
C-RNTI, for which we also have the RA process. Hence, when removing a UE
by RNTI, remove it also from RA.
2024-10-25 20:10:25 +02:00
Roberto Magueta
cddffe6f30 Add config files (TDD/FDD) for multiple DUs scenario
Co-authored-by: rmagueta <rmagueta@allbesmart.pt>
2024-10-25 20:10:25 +02:00
rmagueta
4a5bf53caa UE: Improve synchronization for reconfigurationWithSync
Improve synchronization to also handle handover between gNB-DUs with
differing carrier freqs.
2024-10-25 20:09:41 +02:00
Guido Casati
c3f1824f0b Use capture_pdu_session_establishment_accept_msg in handleDownlinkNASTransport
* DL NAS Transport messages can piggy-back 5GSM messages
* the relevant decoding functions can be called in the handler (e.g. capture_pdu_session_establishment_accept_msg)
2024-10-25 12:43:44 +02:00
Guido Casati
9a67c5e5b5 Fix scoping issues for variable declarations in switch-case blocks (capture_pdu_session_establishment_accept_msg) 2024-10-25 11:52:28 +02:00
Guido Casati
b5f4c55d88 Use capture_pdu_session_establishment_accept_msg with NAS_DOWNLINK_DATA_IND:FGS_PDU_SESSION_ESTABLISHMENT_ACC
* the capture_pdu_session_establishment_accept_msg function is already handling
  the code in the case FGS_PDU_SESSION_ESTABLISHMENT_ACC of NAS_DOWNLINK_DATA_IND

Closes: #841
2024-10-25 11:50:52 +02:00
Guido Casati
66231badaf Refactor PDU address IE in PDU Session Establishment Accept
* take 3 bits for PDU session type value
* add define for SMF's IPv6 link local address
2024-10-25 11:44:14 +02:00
Guido Casati
a85be06c72 Add defines for IPv4 and IPv6 PDU address header fields 2024-10-25 11:42:22 +02:00
Robert Schmidt
78587d6cf0 Merge remote-tracking branch 'origin/getopt-int' into integration_2024_w43 (!3068)
getopt() returns int
2024-10-24 19:23:05 +02:00
Robert Schmidt
1a834a704a Merge remote-tracking branch 'origin/NR_UE_fix_mac_pdu' into integration_2024_w43 (!3057)
Bugfix in ue pusch mac pdu creation

When more than one sdu with equal priority is present, there could be
buffer left after serving the lcids and also not enough to equally serve
all lcids. This commit checks for this condition. Before this fix the ue
would send malformed mac pdus when serving multiple lcids.
2024-10-24 19:22:40 +02:00
Robert Schmidt
cf9854601c getopt() returns int
See getopt(3): returns int, so store it in an int variable.
I went through all occurrences, project-wide. All return values of
getopt() should be stored in ints now.
2024-10-24 19:22:06 +02:00
Guido Casati
f85271a349 Free F1AP messages in RRC task after processing 2024-10-24 16:23:05 +02:00
Guido Casati
b17f1d1b57 Free F1 UL RRC Message Transfer after use in F1AP_DU_task 2024-10-24 16:22:04 +02:00
Guido Casati
74804f2ba3 Free F1 DL RRC Message Transfer after use in F1AP_CU_task 2024-10-24 16:22:04 +02:00
Guido Casati
5e5d17b05b Free F1 Setup Response in the context where it was allocated 2024-10-24 16:22:03 +02:00
Guido Casati
a29cbf0543 Cleanup of cast in gNB_DU_name memcpy 2024-10-24 16:22:03 +02:00
Guido Casati
46fadda22f Add license header to f1ap_lib_test.c 2024-10-24 16:22:03 +02:00
Guido Casati
52f96fd91b Complete adoption of Equality Check macros in f1ap_lib_common.c 2024-10-24 16:22:03 +02:00
Robert Schmidt
ee4301b013 Merge remote-tracking branch 'origin/fix-qfi-gtp' into integration_2024_w43 (!3067)
Bugfix: Fill QFI for N3 GTP messages
2024-10-24 16:13:56 +02:00
Robert Schmidt
981f18dd18 Merge remote-tracking branch 'origin/hotfix-rlc-tests' into integration_2024_w43 (!3062)
fix nr rlc tests

in openair2/LAYER2/nr_rlc/tests:

    ./run_tests.sh

was failing.
2024-10-24 16:13:26 +02:00
Robert Schmidt
4a8575eaf2 Merge remote-tracking branch 'origin/registration-reject' into integration_2024_w43 (!3060)
process registration reject in UE

when the 5GC rejects the ue, the message was not processed (information
element not declared)
this MR process it to print it and stop the UE
a more complete code should be done when the UE will be able to select
another cells than the most powerful PBCH, but it require larger
enhancement
2024-10-24 16:12:45 +02:00
Robert Schmidt
dc05c39e28 Merge remote-tracking branch 'origin/ci-timing-improvements' into integration_2024_w43 (!3043)
CI: Update RAN-gNB-N300-Timing-Phytest-LDPC test cases

- update enc/decoder tests in RAN-gNB-N300-Timing-Phytest-LDPC - test
  only for given SNR value (check of the test results to be added in the
  following MR)
- add cores to Tpool in the nr_dlsim test cases, currently we test with
  only one core
- always execute all the nr_ulsim/nr_dlsim tests, even if one of them
  fails
- add new nr_dlsim test cases - test with 4 antennas, 2 layers
2024-10-24 16:11:16 +02:00
Robert Schmidt
223e6eee3d Merge remote-tracking branch 'origin/fix-websrv' into integration_2024_w43 (!3010)
Fix heap overflow in websrv
2024-10-24 16:10:56 +02:00
Robert Schmidt
8eae2ff07b Merge remote-tracking branch 'origin/refactor-rfsim-fds' into integration_2024_w43 (!2994)
Refactor file descriptor handling in rfsimulator

- add hashtable iterator to hashtable.c
- use hashtable for file descriptor to buffer_t mapping in rfsimulator

This enables the use of file descriptors above 250. The linux file
descriptors can reach the value of FD_SETSIZE which could be e.g. 1024.
This is not an issue in most cases but if the UE or gNB process opens a
lot of file descriptors for other purposes we might see rfsimulator file
descriptors reach > 250 and cause a segfault.

Also added tests for new hashtable functions.
2024-10-24 16:10:00 +02:00
francescomani
38a05d8aad making DLSCH preprocessor agnostic to UEs BWP and TDA 2024-10-24 15:04:27 +02:00
francescomani
3add576195 remove use of VRB map bitwise not in dlsch and ulsch preprocessor 2024-10-24 13:03:22 +02:00
Robert Schmidt
7c13c790d7 Bugfix: Fill QFI for N3 GTP messages
Instead of hardcoding to 0, instruct the GTP module to send N3 GTP
packets with the right GTP.

We currently only support one QoS Flow, so check that it is really only
one.
2024-10-24 10:42:45 +02:00
Bartosz Podrygajlo
883333bfe6 Use hashtable for mapping FDs to buffer_ts in rfsimulator.
Use hashtable for determining which buffer_t does a sock map to. This
lifts the restriction for number of FDs used by applications using rfsimulator.
2024-10-24 10:11:00 +02:00
Bartosz Podrygajlo
e7f858f6b2 Add iterator to hashtable and hashtable unit tests 2024-10-24 09:43:35 +02:00
Sakthivel Velumani
9333662cd8 Update logging in mac 2024-10-23 11:40:37 -04:00
Sakthivel Velumani
5855f766f8 Bugfix in ue pusch mac pdu creation
When more than one sdu with equal priority is present, there could be
buffer left after serving the lcids and also not enough for equaly
serving all lcids. This commit checks for this condition. Before this
fix the ue would send malformed mac pdus when serving multiple lcids.
2024-10-23 11:40:33 -04:00
Cedric Roux
78a4d0754d T: don't check argument in optimized version of T IDs 2024-10-23 14:28:11 +02:00
Laurent THOMAS
345bd9cc82 remove duplicated code, add registration reject cause 2024-10-23 10:51:17 +02:00
Robert Schmidt
5378c4d8d9 Refactor RRC Reconfiguration function
Refactor the RRC reconfiguration function to reuse it also later for
sending the reconfiguration including the handover trigger.
2024-10-22 18:12:51 +02:00
Robert Schmidt
1783932e37 Msg2: Apply CellGroupConfig if necessary
After RA, in the case of HO, we need to make sure to use the right radio
configuration (MCS table, etc). This commit is important to make HO
actually work.
2024-10-22 18:12:51 +02:00
Robert Schmidt
dadd05e0eb Skip adding of second LCID1
Our initial CellGroupConfig always contains LCID1, because in normal
connection setup, the DU has to automatically set it up anyway. In
handover/UE Context Setup, the CU requests to set up SRB1 (which we
assume to be LCID1), but we reuse the initial CellGroupConfig. To not
have SRB1 added twice, skip in this case.
2024-10-22 18:12:51 +02:00
Robert Schmidt
0b2757b36a Implement handler for F1 UE context Setup in HO case
This commit implements adding a new UE on the target DU in case of
handover. We identify this case by the fact that the gNB-CU did not send
a gNB-DU UE ID (which is optional in F1AP, but not in our
implementation), such that we know there is no corresponding UE, which
therefore has to be created.

If it happens that there is a handover preparation information, we read
the UE capabilities from this information, and subsequently trigger the
creation of a new UE.

Another change is that for all bearers that we are asked to setup, we
add reestablishRLC so that the UE does a reestablishment during the
reconfiguration.

As we have to remove the reconfigurationWithSync and reestablishRLC IE
after application of the CellGroupConfig (because we might reuse the
CellGroupConfig later), free these IEs. As there are now multiple fields
to free, introduce a separate nr_mac_clean_cellgroup() function that
handles cleaning of the CellGroupConfig.

Co-authored-by: batuhanduyuler <batuhan.duyuler@firecell.io>
Co-authored-by: rmagueta <rmagueta@allbesmart.pt>
2024-10-22 18:12:51 +02:00
Robert Schmidt
e7b56b3d08 UE context setup req: gNB_DU_ue_id optional, use 0xffffffff to signal 2024-10-22 18:12:51 +02:00
Robert Schmidt
c4a9bd1718 Refactor reading of NR cap from capability list
The next commit will modify the UE context setup request procedure to
(possibly) receive UE capabilities through Handover Preparation
Information, which extracts the UE capabilities for the UE to be setup.
To avoid code duplication, extract the code that will be needed in UE
capability extraction from Handover Preparation Information.
2024-10-22 18:12:51 +02:00
rmagueta
a927db9ef6 Add c-rnti to UE context setup response
No logic changes in this commit; to be used for the handover case later.

Co-authored-by: rmagueta <rmagueta@allbesmart.pt>
2024-10-22 18:12:51 +02:00
Robert Schmidt
5c2b725654 Refactor new-RNTI functionality in separate function
This function will be used in the case of a handover for getting a new
RNTI (checking that we do not reuse an already used RNTI).
2024-10-22 18:12:50 +02:00
Robert Schmidt
fef589cf88 Refactor reconfigurationWithSync ASN.1 to separate function
Will be reused later for handover.

Co-authored-by: batuhanduyuler <batuhan.duyuler@firecell.io>
2024-10-22 18:12:50 +02:00
Robert Schmidt
c854b9cebb get_UE_waiting_CFRA_msg3(): check that RA process is for given RNTI
Co-authored-by: batuhanduyuler <batuhan.duyuler@firecell.io>
2024-10-22 18:12:50 +02:00
Robert Schmidt
004403c84d Implement F1 UE Ctxt Modif Transmission Action Indicator
Implement the Transmission Action Indicator F1AP forwarding logic, and
add it to the F1 internal representation structure. After the
transmission interrupt timer (during which SRB1 can send messages), the
UE will be out-of-sync (we assume it's not there anymore).

Co-authored-by: batuhanduyuler <batuhan.duyuler@firecell.io>
Co-authored-by: rmagueta <rmagueta@allbesmart.pt>
2024-10-22 18:12:50 +02:00
Robert Schmidt
d70561d509 Implement F1 UE Ctxt HandoverPrepInfo in F1
Implement the HandoverPreparationInformation F1AP forwarding logic, and
add it to the F1 internal representation structure.

No logic is implemented in this commit.

Co-authored-by: batuhanduyuler <batuhan.duyuler@firecell.io>
Co-authored-by: rmagueta <rmagueta@allbesmart.pt>
2024-10-22 18:12:50 +02:00
Robert Schmidt
5c6d90aaff Use NR_timer_t for UE transmission interrupt, e.g., RRC processing
Refactor the RRC processing timer to be a generic "transmission
interrupt" timer, and use NR_timer_t for it. Also,
depending on the kind of RRC processing (see 38.331 table 12.1-1),
timing requirements might be different. However, the DU does not always
know which RRC processing is ongoing, and does not get this information
via F1. Hence, introduce a "worst case" delay time, which aligns with
the spec (it says these times are "minima") and is accepted by COTS UE.

The gNB MAC might need to stop transmission either for some time (RRC
processing), or continuously (transmission stop requested by CU). Those
can be handled in one common timer implementation. The continuous case
will be used in a follow-up commit.

Co-authored-by: Luis Pereira <lpereira@allbesmart.pt>
2024-10-22 18:12:50 +02:00
Cedric Roux
b2b418fc2c fix nr rlc tests
in openair2/LAYER2/nr_rlc/tests:

    ./run_tests.sh

was failing.
2024-10-22 17:37:14 +02:00
Laurent THOMAS
21a7f994c3 process registration reject in UE 2024-10-22 17:03:19 +02:00
Robert Schmidt
2c07f0081e Merge branch 'ci-remove-unused-code' into 'develop' (!3058)
CI: remove unused code, clean up imports

* Remove pyshark, matplotlib imports, as they are not used
* Remove stats_monitor.py, as the CI does not use it
* Clean up many warnings shown by pyflakes regarding includes that we don't use
2024-10-22 13:12:14 +00:00
Laurent THOMAS
6cedca1c1d fix error of grouping UE to free list for phy layer and ue to free list for fapi 2024-10-22 12:25:30 +02:00
Laurent THOMAS
9898c673d8 print rnti as hexadecimal 2024-10-22 11:05:20 +02:00
Laurent THOMAS
1614ae19e8 trace as information UE RACH steps for 4G 2024-10-22 11:05:20 +02:00
Robert Schmidt
6b32dd6e8e Avoid array buffer overflow in ue_pmch_procedures()
Adapt as code above offending line to not overflow array. Avoids UBSan
error

    openair1/SCHED_UE/phy_procedures_lte_ue.c:2983:36: runtime error: index 8 out of bounds for type 'int [8][1]'
2024-10-22 11:05:20 +02:00
Robert Schmidt
76860fd44b put_UE_in_freelist(): avoid array overflow 2024-10-22 11:05:20 +02:00
Robert Schmidt
985f44c1dd 4G RFsim docker-compose: suppress ASan leak check, lte-{ue,}softmodem is leaky 2024-10-22 11:05:20 +02:00
Robert Schmidt
712988d437 NAS message encoding: avoid unaligned access through memcpy() 2024-10-22 11:05:20 +02:00
Robert Schmidt
e94f59edb1 IES_DECODE_U16 macro: load from 16-bit aligned address
The IES_DECODE_U16 macro loads a 16 bit integer from an arbitrary
address; this can lead to reads from misaligned addresses, and undefined
behavior sanitizer warns, like, e.g., so:

    openair3/NAS/COMMON/IES/ProtocolConfigurationOptions.c:62:5: runtime error: load of misaligned address 0x7f3c24032c01 for type 'uint16_t', which requires 2 byte alignment

To fix this, first use memcpy() to load to a 16-bit aligned address,
then do the actual decoding.
2024-10-22 11:05:20 +02:00
Robert Schmidt
71bd10b4a2 docker-compose: write correct container image to use for 4G and asan 2024-10-22 11:05:20 +02:00
Robert Schmidt
cb7942d460 Build CI images for eNB/lteUE with sanitizers, and use in 4G RF sim 2024-10-22 11:05:20 +02:00
Laurent THOMAS
e48e38650d Fix various problems in 4G NAS handling
- rename as_nas_info_t member data to nas_data to have a uniq name to
  trace between complex malloc/free of this pointer
- fix, maybe not perfect, these pais od malloc/free
- remove typedef name changes across transmission of these as_nas_info_t
  over itti, as name changing makes it even more confusing
- remove globals that are likely possible races
- in as_message_decode() fix memcpy size, it is hard to understand the
  initial idea, likely the author beleives a struct of struct makes a
  intermediate pointer
- in network_api.c remove globals (static but used globally)
- remove casts that are there to hide gcc warnings on probable unaligned
  access
- remain a weird mix of packed/unpacked versions of the same typedef,
  but gcc is happy
2024-10-22 11:05:20 +02:00
Laurent THOMAS
8df8de894b get out statistic array in case the rnti is not found 2024-10-22 11:05:20 +02:00
Laurent THOMAS
972a251798 bug in code duplication 2024-10-22 11:05:20 +02:00
Laurent THOMAS
a1fc1972e1 one old bug, one regression 2024-10-22 11:05:20 +02:00
Robert Schmidt
670e1fb8b4 CI: remove unknown imports and uses of names
pyflakes warns about various errors, addressed here. For cls_cluster.py,
remove (unknown) sys.exit and replace through Exception, as sys.exit()
has the unwanted effect that the CI script would stop.  Instead, raise
an Exception that would show the problem in the HTML, and ensures that
the script runs until the end.

These are the warnings flagged by pyflakes.

    cls_cluster.py:297:4: undefined name 'sys'

    cls_containerize.py:39:1: 'subprocess' imported but unused
    cls_containerize.py:41:1: 'threading' imported but unused
    cls_containerize.py:43:1: 'multiprocessing.Process' imported but unused
    cls_containerize.py:43:1: 'multiprocessing.Lock' imported but unused
    cls_containerize.py:43:1: 'multiprocessing.SimpleQueue' imported but unused
    cls_containerize.py:49:1: 'cls_cluster as OC' imported but unused
    cls_containerize.py:50:1: redefinition of unused 'cls_cmd' from line 42

    cls_module.py:28:1: 'os' imported but unused
    cls_module.py:29:1: 'sys' imported but unused
    cls_module.py:34:1: 'subprocess' imported but unused
    cls_module.py:35:1: 'datetime.datetime' imported but unused
    cls_module.py:211:11: undefined name 'sshconnection'

    cls_oaicitest.py:37:1: 'pexpect' imported but unused
    cls_oaicitest.py:47:1: 'cls_cluster as OC' imported but unused
    cls_oaicitest.py:54:1: 'matplotlib.pyplot as plt' imported but unused
    cls_oaicitest.py:55:1: 'numpy as np' imported but unused

    cls_oai_html.py:34:1: 'sys' imported but unused
    cls_oai_html.py:41:1: 'multiprocessing.Process' imported but unused
    cls_oai_html.py:41:1: 'multiprocessing.Lock' imported but unused
    cls_oai_html.py:41:1: 'multiprocessing.SimpleQueue' imported but unused

    cls_physim.py:37:1: 'multiprocessing.SimpleQueue' imported but unused

    cls_static_code_analysis.py:39:1: 'time' imported but unused
    cls_static_code_analysis.py:40:1: 'multiprocessing.Process' imported but unused
    cls_static_code_analysis.py:40:1: 'multiprocessing.Lock' imported but unused
    cls_static_code_analysis.py:40:1: 'multiprocessing.SimpleQueue' imported but unused

    epc.py:41:1: 'multiprocessing.Process' imported but unused
    epc.py:41:1: 'multiprocessing.Lock' imported but unused
    epc.py:41:1: 'multiprocessing.SimpleQueue' imported but unused

    main.py:60:1: 'pexpect' imported but unused
    main.py:66:1: 'datetime' imported but unused
    main.py:68:1: redefinition of unused 'subprocess' from line 63
    main.py:70:1: 'multiprocessing.Process' imported but unused
    main.py:70:1: 'multiprocessing.Lock' imported but unused
    main.py:70:1: 'multiprocessing.SimpleQueue' imported but unused

    provideUniqueImageTag.py:2:1: 'os' imported but unused
2024-10-22 09:51:23 +02:00
Robert Schmidt
a736bec570 Remove eNB_Trace: it is not used by the CI 2024-10-22 09:23:21 +02:00
Robert Schmidt
f8b480be3e Remove stats_monitor.py: it is not used by the CI 2024-10-22 09:23:01 +02:00
Robert Schmidt
8ef52d5432 Remove pyshark import: is not used 2024-10-22 09:08:51 +02:00
Robert Schmidt
ec06c78b30 Merge branch 'integration_2024_w42' into 'develop'
Integration: `2024.w42`

Closes #547, #853, #854, #858, #859, #862, #844, and #746

See merge request oai/openairinterface5g!3053

* !3047 Resolve compilation warnings on ARM
* !3052 Optimize T_ID() macro.
* !3045 CI: Reduce tested DL throughput on Aerial
* !3039 fix for Other SI reception when BWP start != 0
* !2997 websrv regression
* !3041 Update NR SA Tutorials
* !3042 Update TESTBenches.md to reflect current testbench
* !3004 Hotfix to remove an unwanted TX power reduction when using multiple TX antenna ports.
* reduce ssPBCH_BlockPower in gNB config of FHI7.2 pipeline
* !3046 A testsuite and a benchmark for RLC AM mode
* !3038 Various bugfixes for gNB stability, cleanup
* !3051 PUCCH2 DTX detection
* nr_psbchsim: fix segv by providing correct get_nrUE_params()
* !3049 Improve PUSCH and PUCCH SNR stability
* !3054 Allocate and add sD to DRB NSSAI in case sD != 0xffffff
2024-10-21 19:17:56 +00:00
Jaroslava Fiedlerova
3f51197548 Merge remote-tracking branch 'origin/fix-nssai-f1ap' into integration_2024_w42 (!3054)
Currently, sD has not been allocated, so the octet string is empty. Fix the
allocation to correctly write&read NSSAIs in UE context setup/modification
request messages.
2024-10-21 16:32:14 +02:00
Jaroslava Fiedlerova
784ae2a4df Merge remote-tracking branch 'origin/Improve_UL_SNR_stability' into integration_2024_w42 (!3049)
Reset TPC to 0 dB, after sending it to the UE, to not request new gain multiple
times before computing new value for SNR.
2024-10-21 16:23:07 +02:00
Robert Schmidt
2fe1c2f749 Correctly read NSSAI in UE Context Setup Request 2024-10-21 14:36:31 +02:00
Robert Schmidt
78fc47229b psbchsim.c: add license banner 2024-10-21 11:06:25 +02:00
Robert Schmidt
44616a6a19 nr_psbchsim: fix segv by providing correct get_nrUE_params()
When running, nr_psbchsim, we get this UBsan error:

    openair1/PHY/NR_UE_ESTIMATION/nr_adjust_synch_ue.c:79:16: runtime error: member access within misaligned address 0x0ff4278c791c for type 'struct nrUE_params_t', which requires 8 byte alignment

The problem is that the corresponding definition of
get_nrUE_params() in psbchsim.c does not actually return the UE params,
but void, so we might or might not get something that resembles valid
data in nr_adjust_synch_ue.c. Fix this by including nr-uesoftmodem.h
(that provides the correct declaration) and define it correctly. Due to
type mismatches, also adapt downlink_frequency, uplink_frequency_offset,
and openair_cfg (which might result in the same type of bugs).
2024-10-21 11:04:43 +02:00
V. Tuan Ngo
da84a70414 Allocate and add sD to DRB NSSAI in case sD != 0xffffff 2024-10-21 10:45:11 +02:00
Robert Schmidt
dd7c3f80e8 Merge remote-tracking branch 'origin/pucch2_dtx' into integration_2024_w42 (!3051)
This adds DTX detection in PUCCH 2 receiver. This is detected by MAC
already which will drop PUCCH 2 indications that are detected as DTX.
For the moment this uses the same pucch0_dtx_threshold value indicated
in L1 section of the configuration file. The feature firstly reduces
unnecessary logging on stdout and the use of invalid CSI measurements in
the MAC scheduler.

Closes: #547
2024-10-19 12:56:21 +02:00
Robert Schmidt
4c0fa90818 Merge remote-tracking branch 'origin/bugfixes-gnb-stability' into integration_2024_w42 (!3038)
- Fixes #853, #854, #858, #859, #862
- handle repeated NGAP Initial context setup requests, thereby fixing assert:

      Assertion (!ue_p->as_security_active) failed!
      In rrc_gNB_generate_SecurityModeCommand() /home/eurecom/raymond/openairinterface5g/openair2/RRC/NR/rrc_gNB.c:2590
      logic error: security already activ

- A lot of cleanup: remove almost all use of protocol_ctxt_t in 5G RRC and use
  existing pointers instead
2024-10-19 12:48:50 +02:00
Robert Schmidt
5f5d859694 Merge remote-tracking branch 'origin/rlc-benchmark' into integration_2024_w42 (!3046)
Introduce two tests for NR RLC AM entity:

- test_nr_rlc_am_entity
- benchmark_nr_rlc_am_entity

The benchmark can be used to verify processing time improvements for NR RLC AM
entity. The benchmark creates two entities and creates an unbalanced
communication channel between them with 10% loss packet loss and 100:1 PDU sent
ratio. This allows the lists in RLC to build up and triggers RLC AM code
related to looking through the segment/pdu lists.

Example benchmark output:

    ubuntu@zeus:~/bpodrygajlo/openairinterface5g/cmake_targets/build$ ./openair2/LAYER2/nr_rlc/tests/benchmark_nr_rlc_am_entity
    [LOG] init aborted, configuration couldn't be performed
    log init done
    CMDLINE: "./openair2/LAYER2/nr_rlc/tests/benchmark_nr_rlc_am_entity"
    [CONFIG] debug flags: 0x00400000
    2024-10-16T14:58:20+02:00
    Running ./openair2/LAYER2/nr_rlc/tests/benchmark_nr_rlc_am_entity
    Run on (8 X 4700 MHz CPU s)
    CPU Caches:
      L1 Data 48 KiB (x4)
      L1 Instruction 32 KiB (x4)
      L2 Unified 1280 KiB (x4)
      L3 Unified 12288 KiB (x1)
    Load Average: 0.48, 0.27, 0.20
    ***WARNING*** CPU scaling is enabled, the benchmark real time measurements may be noisy and will incur extra overhead.
    --------------------------------------------------------------------
    Benchmark                          Time             CPU   Iterations
    --------------------------------------------------------------------
    BM_nr_rlc_am_entity/100        50096 ns        50097 ns        13101
    BM_nr_rlc_am_entity/256       140386 ns       140387 ns         4868
    BM_nr_rlc_am_entity/1024      536323 ns       536311 ns         1309
    BM_nr_rlc_am_entity/4096     2084464 ns      2084385 ns          338
    BM_nr_rlc_am_entity/16384    8309318 ns      8309458 ns           81
    BM_nr_rlc_am_entity/20000    9843792 ns      9843774 ns           68
2024-10-19 12:47:46 +02:00
Jaroslava Fiedlerova
08972f35cb CI: lower ssPBCH_BlockPower in gNB conf for RAN-SA-FHI72-CN5G pipeline
Tests showed that a UE connected much faster, and did not fail as often
on Msg3.
2024-10-19 12:44:33 +02:00
Jaroslava Fiedlerova
d156661ce3 CI: decrease test SNR for nr_pucchsim with 8 antennas 2024-10-18 16:29:28 +02:00
Raymond Knopp
03b24c1ee6 fixed signal level computation for PUCCH2 and threshold in pucchsim.
Threshold allows detection with -9 dB SNR with 8 RX antennas
2024-10-18 15:43:08 +02:00
Jaroslava Fiedlerova
6a54905b2e Merge remote-tracking branch 'origin/remove_power_reduction_for_MIMO' into integration_2024_w42 (!3004)
This hotfix removes division by num_antenna_ports in PDSCH precoding matrix generation.
These matrices are defined for CSI reporting in this way but here we are using them for
transmission and this results in an unwanted 10*log10(num_antenna_ports) reduction in
transmit power (3dB for 2 antenna ports, 6dB for 4 antenna ports, etc.)
2024-10-18 14:54:28 +02:00
Raghavendra Dinavahi
22dd82556d New tests for nr_pbchsim 2024-10-18 14:47:26 +02:00
francescomani
af53f35824 avoid processing PUCCH2 without polar if declared missed detection 2024-10-18 11:17:58 +02:00
luis_pereira87
de887a1d2a Improve PUSCH and PUCCH SNR stability
Reset TPC to 0 dB, after sending it to the UE, to not request new gain multiple times before computing new value for SNR
2024-10-18 09:06:28 +01:00
Jaroslava Fiedlerova
0d4c6b8c4f CI: add new testcases for nr_dlsim testing in timing pipeline
Add new nr_dlsim test cases for testing with 4 antennas, 2 layers
in both scenarios - with and without T2 card.
2024-10-18 09:36:13 +02:00
Jaroslava Fiedlerova
61e7c0ae39 CI: Enable thread-pool in RAN-gNB-N300-Timing-Phytest-LDPC
Enable multi-threading in the nr_dlsim test with CPU, set 5 cores for
thread-pool using "-X 8,9,10,11,12" option.
2024-10-18 09:35:20 +02:00
Robert Schmidt
1917f5486d Merge remote-tracking branch 'origin/update-TESTBenches-doc' into integration_2024_w42 (!3042) 2024-10-18 06:32:07 +02:00
Robert Schmidt
d6e81682fc Merge remote-tracking branch 'origin/NR_SA_Tutorials' into integration_2024_w42 (!3041)
- Update links for the latest Ubuntu 24.04 LTS iso file
- Update docker install to the latest instructions on the official website
- Update UHD to v4.7.0.0 and update dependencies for Ubuntu 24.04
2024-10-18 06:31:47 +02:00
Robert Schmidt
d07044de7f Merge remote-tracking branch 'origin/websrv-small-regression' into integration_2024_w42 (!2997) 2024-10-18 06:31:34 +02:00
Robert Schmidt
eafca88d1a Merge remote-tracking branch 'origin/NR_UE_FIX_DECODE_OTHERSI' into integration_2024_w42 (!3039)
Test configuration: Tested SIB19 reception on SCS120 Khz + 50Mhz bw
config file used:
targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band257.u3.32prb.usrpx410.conf
+ NTN config commands used

    sudo ./nr-softmodem -O ../../../targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band257.u3.32prb.usrpx410.conf --sa --rfsim -d
    sudo ./nr-uesoftmodem --band 261 -C 27533280000 -r 32 --numerology 3 --ssb 72 --sa --rfsim -d --ue-scan-carrier

The Issue is that SIB19 is not being received because of CRC error, only
SIB1 was being received.
2024-10-18 06:27:55 +02:00
Robert Schmidt
839a16f477 Merge remote-tracking branch 'origin/Aerial_reduce_throughput' into integration_2024_w42 (!3045)
Reduce tested DL throughput on Aerial pipeline from 700 to 600Mbps
2024-10-18 06:27:20 +02:00
Robert Schmidt
39af48fafc Merge remote-tracking branch 'origin/log-optimization' into integration_2024_w42 (!3052)
This changes the way T_IDs are defined. The T_ID macro was using a
integer to pointer cast in order to provide type safety. This trick
disables some compiler optimizations, as explained here:
https://clang.llvm.org/extra/clang-tidy/checks/performance/no-int-to-ptr.html.
Removing the type cast reenables the compiler optimizations.
2024-10-18 06:26:38 +02:00
Robert Schmidt
3f9d9f81d4 Merge remote-tracking branch 'origin/Address-ARM-warnings' into integration_2024_w42 (!3047)
This MR aims to address warnings raised when compiling for ARM ( tested
with cross compilation, not directly on ARM hardware ).  The addressed
warnings are as follows:

- An unused variable in file oai_dfts_neon.c
- Wrong printf format specifier related to oai_cputime_t
- Wrong parameter type in qam64_qam64 call

This MR closes issue #844

Also, correctly set the pkg-config search path for libraries for the
target system. Also closes: #746
2024-10-18 06:24:51 +02:00
Robert Schmidt
c4344f26d1 Correctly pass ID to rrc_gNB_get_next_transaction_identifier() 2024-10-17 19:06:45 +02:00
Robert Schmidt
132cd64bb0 Handle empty RRC ULInformationTransfer
A UE might send a ULInformationTransfer without the actual content present
(intentionally or not). Check this and handle appropriately to avoid
a segfault when reading the empty NAS message.

Closes: #862
2024-10-17 19:06:45 +02:00
Robert Schmidt
304372d5e6 Remove unused protocol_ctxt_t 2024-10-17 19:06:45 +02:00
Robert Schmidt
63a0785430 Cleanup rrc_gNB_process_GTPV1U_CREATE_TUNNEL_RESP(): pass UE context directly 2024-10-17 19:06:45 +02:00
Robert Schmidt
759b0ec39e Cleanup rrc_CU_process_ue_modification_required(): remove protocol_ctxt_t 2024-10-17 19:06:45 +02:00
Robert Schmidt
ff3a14f7f9 Cleanup rrc_gNB_modify_dedicatedRRCReconfiguration: pass UE context directly 2024-10-17 19:06:45 +02:00
Robert Schmidt
01b240ebf1 Cleanup rrc_gNB_generate_dedicatedRRCReconfiguration(): pass UE context directly 2024-10-17 19:06:45 +02:00
Robert Schmidt
452ccc3235 Cleanup rrc_gNB_generate_dedicatedRRCReconfiguration_release()
Pass RRC and UE context pointers directly.
2024-10-17 19:06:45 +02:00
Robert Schmidt
dbeb1ea691 Cleanup nr_rrc_reconfiguration_req(): pass UE context directly 2024-10-17 19:06:45 +02:00
Robert Schmidt
145ab259e8 Cleanup rrc_gNB_generate_RRCRelease(): pass context directly 2024-10-17 19:06:45 +02:00
Robert Schmidt
fce17f873b Remove nr_rrc_common.c: declared functions are not used 2024-10-17 19:06:45 +02:00
Robert Schmidt
e497526543 Remove function declaration with non-existant definition 2024-10-17 19:06:45 +02:00
Robert Schmidt
788bc623e3 Cleanup rrc_gNB_decode_dcch(): use F1 message type, pass rrc pointer 2024-10-17 19:06:45 +02:00
Robert Schmidt
da9f4cec18 Cleanup: pass UE context directly into handle_rrcReestablishmentComplete() 2024-10-17 19:06:45 +02:00
Robert Schmidt
118674ae4e Cleanup handle_ueCapabilityInformation()
Pass UE context pointer directly. In the switch, do not return to not
create memory leaks (after the switch, memory is freed). Move the
function up to make it appear before the use of the function.
2024-10-17 19:06:45 +02:00
Robert Schmidt
88d6117d99 Cleanup in securityModeFailure handling
The xer_fprintf() call is already present in rrc_gNB_decode_dcch()
above.
2024-10-17 19:06:45 +02:00
Robert Schmidt
a5a746ee36 Cleanup: Pass UE context directly into rrc_gNB_generate_UECapabilityEnquiry() 2024-10-17 19:06:45 +02:00
Robert Schmidt
cec54f1c89 Cleanup: Pass UE context directly into rrc_gNB_send_NGAP_UPLINK_NAS() 2024-10-17 19:06:45 +02:00
Robert Schmidt
098f45c14d Cleanup: Pass RRC/UE context directly into handle_rrcReconfigurationComplete() 2024-10-17 19:06:45 +02:00
Robert Schmidt
7836fe5090 Cleanup: Pass UE context into handle_rrcSetupComplete()
Pass UE context, without protocol_ctxt_t, for cleanup. Remove the return
from within the switch, as this would lead to memory leaks; nothing is
executed after the switch statement (except for freeing memory).
2024-10-17 19:06:45 +02:00
Robert Schmidt
0056ac7bc9 Cleanup: Pass UE context into rrc_gNB_process_MeasurementReport() 2024-10-17 19:06:45 +02:00
Robert Schmidt
d5274af0ec Bugfix: correctly check for GTP initialization
The existing check for the initialization of GTP is wrong; GTP returns
-1 if it could not initialize. Correct this, such that the DU will stop
if GTP cannot be initialize.

If we continue, the DU is requested to set up a GTP tunnel; because GTP
is not initialized, it assumes it is in monolithic/no F1, and does not
set up a tunnel. The F1 UE Context setup response encoder then fails
with this assertion:

    Assertion (tnl->teid > 0) failed!
    In DU_send_UE_CONTEXT_SETUP_RESPONSE() ../../../openair2/F1AP/f1ap_du_ue_context_management.c:415

    Exiting execution
    ../../../openair2/F1AP/f1ap_du_ue_context_management.c:415 DU_send_UE_CONTEXT_SETUP_RESPONSE() Exiting OAI softmodem: _Assert_Exit_
    Aborted

Closes: #853
2024-10-17 19:06:45 +02:00
Robert Schmidt
30054b809e Handle faulty MeasurementReport gracefully
A UE might send a MeasurementReport without the actual IEs present
(intentionally or not). Check this and handle appropriately to avoid
assertion

    Assertion (measurementReport->criticalExtensions.present == NR_MeasurementReport__criticalExtensions_PR_measurementReport && measurementReport->criticalExtensions.choice.measurementReport != ((void*)0)) failed!
    In rrc_gNB_process_MeasurementReport() ../../../openair2/RRC/NR/rrc_gNB.c

Closes: #859
2024-10-17 19:06:45 +02:00
Robert Schmidt
e815972492 Handle unsolicited UE Capability Information gracefully
A UE might send a UE Capability Information without unsolicitatedly
(intentionally or not). Check this and handle appropriately to avoid
assertion

    Assertion (UE->xids[xid] == RRC_UECAPABILITY_ENQUIRY) failed!
    In handle_ueCapabilityInformation() ../../../openair2/RRC/NR/rrc_gNB.c

Closes: #858
2024-10-17 19:06:45 +02:00
Robert Schmidt
542ef1c1c6 Handle fault rrcReestablishmentComplete gracefully
A UE might send a rrcReestablishmentComplete without the actual IEs
present (intentionally or not). Check this and handle appropriately to
avoid assertion

    Assertion (reestablishment_complete->criticalExtensions.present == NR_RRCReestablishmentComplete__criticalExtensions_PR_rrcReestablishmentComplete) failed!
    In handle_rrcReestablishmentComplete() ../../../openair2/RRC/NR/rrc_gNB.c:1364

Closes: #854
2024-10-17 19:06:45 +02:00
Robert Schmidt
d71104da51 Handle repeated NGAP Initial Context Setup Request
Prior to this commit, if we receive an Initial Context Setup Request for
a UE that has AS security set up, the gNB asserts with

    Assertion (!ue_p->as_security_active) failed!
    In rrc_gNB_generate_SecurityModeCommand() openairinterface5g/openair2/RRC/NR/rrc_gNB.c:2590
    logic error: security already activ

However, TS 38.413 says:

> The AMF may initiate the Initial Context Setup procedure if a
> UE-associated logical NG-connection exists for the UE

(I interpret this as "it might happen anytime")

> store the received Security Key in the UE context and, if the NG-RAN
> node is required to activate security for the UE, take this security key
> into use.

(I interpret this as "do not set up AS security again")

In this commit, handle if we receive an Initial Context Setup Request
for an existing UE context. As said in the spec, we store the keys. If
security is not active, we trigger RRC Security Mode Command. If it is
active, we skip Security, and directly set up a PDU session. If there is
also no PDU session, we simply forward the NAS message, and acknowledge.

If there was no AS security, after security, the gNB would trigger the
setup of PDU sessions (if any), and then forward any NAS PDUs, which is
stated in the if block if AS security is already active.
2024-10-17 18:59:22 +02:00
Robert Schmidt
94a3a61e17 Reuse rrc_forward_ue_nas_message() for DL Information Transfer 2024-10-17 18:45:50 +02:00
Bartosz Podrygajlo
cd475ca07a Optimize T_ID() macro
This changes the way T_IDs are defined. The T_ID macro was using a integer to pointer cast in
order to provide type safety. This trick disables some compiler optimizations, as explained
here: https://clang.llvm.org/extra/clang-tidy/checks/performance/no-int-to-ptr.html.
Removing the type cast reenables the compiler optimizations.
2024-10-17 16:11:15 +02:00
Robert Schmidt
312f23189a Cross-build: add -Werror for CI build 2024-10-17 15:05:57 +02:00
Robert Schmidt
99d251b29d Correct pkg-config include path when cross-compiling
Prior to this commit, the include path for some libraries found through
pkg-config when cross compiling is not correct:

    $ grep include CMakeCache.txt
    blas_INCLUDEDIR:INTERNAL=/usr/include/x86_64-linux-gnu
    ...

This is because we did not tell pkg-config to search in the right path.
Since for cross-compilation, we install packages in parallel in the
system, override the primary directory where the .pc files located, in
the cross-compilation toolchain file for cmake.

Closes: #746
2024-10-17 10:48:24 +01:00
Rúben Soares Silva
57cccd633f Correctly cast qam64_qam64 parameters in dlsch_llr_computation.c
Change call to qam64_qam64 to use (short *) parameters as defined in the function declaration
2024-10-17 10:48:24 +01:00
Rúben Soares Silva
b46e20abb9 Address warnings in lte-enb.c by changing oai_cputime_t type.
Since long long is the bigger type ( 8 bytes ) of the two used ( long long and uint32_t ),
and long long is also available on ARM, change this parameter to always have this type.

This allows to always use format specifier '%lld' in the logs that use TICK_TO_US, which would otherwise return long long or uint32_t depending on architecture.
2024-10-17 10:42:20 +01:00
Jaroslava Fiedlerova
f97c6ceb6c CI: Update enc/decoder tests in RAN-gNB-N300-Timing-Phytest-LDPC
Set a maximum SNR value using the "-S" option to ensure that nr_dlsim
or nr_ulsim is executed only for a given SNR. This approach allows us
to verify the success of the encoding/decoding process at the specified
SNR. Check if the test succeeds is not yet implemented (currently we
only retrieve an information about encoding/decoding processing time).
To be implemented in the separate MR.

Always execute all the nr_dlsim/nr_ulsim tests even if one of them
fails. Each test takes around 5s, so we can execute them all to get
results for all the test scenarios.
2024-10-17 10:50:24 +02:00
Raymond Knopp
eb9cb2f988 added DTX detection in PUCCH 2 receiver. This is detected by MAC already
which will drop PUCCH 2 indications that are detected as DTX. For the
moment this uses the same pucch0_dtx_threshold value indicated in L1
section of the configuration file.
2024-10-17 10:08:08 +02:00
Robert Schmidt
65b9af543a Cleanup rrc_gNB_generate_SecurityModeCommand()
Cleanup this function: pass UE context directly, remove protocol_ctxt_t.
2024-10-16 19:13:48 +02:00
Robert Schmidt
8c14bf4921 Simplify rrc_gNB_process_security()
rrc_gNB_process_security() does not only set (process) the security
algorithms, but also checks for those. However, we don't use the check.
Simplify the function, to reintroduce the check later. Rename to
set_UE_security_algos() to better reflect what the functions do.
2024-10-16 19:13:48 +02:00
Robert Schmidt
0cea0395e8 Cleanup and rename process_gNB_security_key()
Rename to set_UE_security_key(), as it is for the UE. pass UE context
directly.
2024-10-16 19:13:48 +02:00
Robert Schmidt
4a40efede3 Clean up rrc_gNB_process_security() and called functions
Pass rrc pointer and UE context directly instead of protocol_ctxt_t.
2024-10-16 19:13:48 +02:00
Robert Schmidt
1d85ae0245 Cleanup nr_rrc_pdcp_config_security()
Pass directly pointer to UE context, remove protocol_ctxt_t (which
simply is not required, and supposed to be removed anyway).
2024-10-16 19:13:33 +02:00
Jaroslava Fiedlerova
4f5c73394d doc: Update TESTBenches.md
- remove Sphex UE - not used anymore
- remove RAN-L2-Sim-Test-5G from a list of pipelines - currently disabled
- 4G RFSim was moved to cacofonix
- minor cleanup
2024-10-16 17:08:49 +02:00
Bartosz Podrygajlo
698b5e3dcf A testsuite and a benchmark for RLC AM mode 2024-10-16 16:19:37 +02:00
Reem Bahsoun
1e73a95b58 Reduce tested DL throughput from 700 to 600Mbps 2024-10-16 14:40:37 +02:00
Guido Casati
d2fca6bba4 Update TESTBenches.md to reflect current testbench 2024-10-16 11:14:21 +02:00
luis_pereira87
9a3162f049 Tutorials: update UHD to v4.7.0.0 and update dependencies for Ubuntu 24.04 2024-10-16 08:54:01 +01:00
luis_pereira87
156aedb96b Tutorials: Update docker install to the latest instructions on the official website 2024-10-16 08:53:30 +01:00
luis_pereira87
1ff4ff1455 Tutorials: Update links for the latest Ubuntu 24.04 LTS iso file 2024-10-16 08:52:50 +01:00
Rúben Soares Silva
d9a5866bcd Address warning unused variable 'tw512_128p' 2024-10-15 16:48:23 +01:00
Raghavendra Dinavahi
586a4b76f8 Update pbchsim to work with other numerologies 2024-10-15 17:26:03 +02:00
Raghavendra Dinavahi
1bf4ca7d97 fix for Other SI reception when BWP start != 0 2024-10-15 13:11:13 +02:00
Robert Schmidt
65d8d410b5 Merge branch 'integration_2024_w41' into 'develop'
Integration: `2024.w41`

See merge request oai/openairinterface5g!3032

* !3006 Fix some sizeof and switch-case issues
* !3028 Add CMakePresets.json
* !3011 Aerial: cleanup unused code, avoid superfluous memcpy(), avoid L1 structures
* !3022 NR CSI-RS L1 refactoring → check CI
* !2935 Improvements in handling the beamforming procedure via FAPI
* !3026 NR ULSCH scheduler fix when using transform precoding
* !3031 CI: Increase test bitrates for 100 MHz scenario in SA-2x2 pipeline
* !3017 Fix SRS
* !2731 Implementation of 2-Step RA
* !3027 Add dockerized include what you use tool
2024-10-15 07:26:22 +00:00
Jaroslava Fiedlerova
6a72669a1b Merge remote-tracking branch 'origin/iwyu' into integration_2024_w41 2024-10-14 15:10:47 +02:00
Jaroslava Fiedlerova
75af74c731 Merge remote-tracking branch 'origin/RA_2-Step' into integration_2024_w41 2024-10-14 14:47:19 +02:00
francescomani
eccecde2c7 Merge remote-tracking branch 'origin/fix-SNR-based-on-SRS' into integration_2024_w41 2024-10-14 14:31:17 +02:00
Jaroslava Fiedlerova
e4cb68a750 Merge remote-tracking branch 'origin/ci-sa-2x2-increase-bitrate' into integration_2024_w41 2024-10-14 13:23:11 +02:00
Jaroslava Fiedlerova
a177dfa3bb Merge remote-tracking branch 'origin/transform_precoding_hotfix' into integration_2024_w41 2024-10-14 13:22:54 +02:00
Laurent THOMAS
a6576db51b websrv regression 2024-10-14 11:32:49 +02:00
Robert Schmidt
4398a57eb2 Increase SC-FDMA test UL iperf traffic to 18Mbps 2024-10-13 19:03:33 +02:00
francescomani
4528be42de Merge remote-tracking branch 'origin/NR_gNB_BF_matrix' into integration_2024_w41 2024-10-11 16:55:25 +02:00
rmagueta
be6dcccd93 Add CI test for SRS in nr_ulsim 2024-10-11 11:12:53 +01:00
rmagueta
765bb64b5c Fix SNR based on SRS 2024-10-11 11:12:21 +01:00
Robert Schmidt
e8597a16ed Merge remote-tracking branch 'origin/NR_CSI_improvements' into integration_2024_w41 2024-10-11 11:56:53 +02:00
Robert Schmidt
3d32ce3904 Merge remote-tracking branch 'origin/aerial-cleanup' into integration_2024_w41 2024-10-11 11:56:46 +02:00
ndomingues
c7e9d687c6 Set msg1_SubcarrierSpacing to the same value as the UL SCS
3GPP 38.331: If absent, the UE applies the SCS as derived from the prach-ConfigurationIndex in RACH-ConfigGeneric (see tables Table 6.3.3.1-1, Table 6.3.3.1-2, Table 6.3.3.2-2 and Table 6.3.3.2-3, TS 38.211 [16]).

This procedure for msg1_SubcarrierSpacing NULL is not implemented, so we aplly the same value of UL SCS.
2024-10-11 10:12:06 +01:00
Jaroslava Fiedlerova
444961470a Merge remote-tracking branch 'origin/cmake-presets' into integration_2024_w41 2024-10-11 11:09:12 +02:00
Jaroslava Fiedlerova
cab28f0f5a Merge remote-tracking branch 'origin/misc-fixes' into integration_2024_w41 2024-10-11 11:09:00 +02:00
Bartosz Podrygajlo
b69b4dc0f4 Add CMakePresets.json
Introduce CMakePresests.json which is a simple way to perform incremental build using cmake

New configure resets were added:
 - default: Configure compilation with default options
 - tests: Same as above but ENABLE_TESTS and SANITIZE_ADDRESS is ON

New build presets were added:
 - 5gdefault: Build the software for NR rfsimulator test
 - default: same as 5gdefault
 - 4gdefault: Build the software for LTE rfsimulator test
 - tests: build all unit tests

To configure using configuration preset:

`cmake --preset <preset_name>`

To build using a build preset:

`cmake --build --preset <preset_name>`
2024-10-11 09:12:49 +02:00
francescomani
a4c211f2b4 removing p7 prach beamforming assertion 2024-10-11 08:02:06 +02:00
francescomani
3f550a27be decouple call for config scc from init of MAC 2024-10-11 08:02:06 +02:00
francescomani
7af574dd54 adding new config file parameters in FR2 RFsim CI config file 2024-10-11 08:02:06 +02:00
francescomani
abc5069a55 handling beams in PHY RX channels 2024-10-11 08:02:06 +02:00
francescomani
014338105e remove unused bf_weights feild from config files 2024-10-11 08:02:06 +02:00
francescomani
64ed4e9262 handling beams in PHY TX channels 2024-10-11 08:02:06 +02:00
francescomani
7e82854b29 improvements to set beam index via FAPI message
use of number of SSBs transmitted before current one as fapi index, creation of a mapping vector from SSB to fapi index
2024-10-11 07:59:36 +02:00
francescomani
2a9a038dbd improvements in RU beamforming handling procedures 2024-10-11 07:59:31 +02:00
Jaroslava Fiedlerova
bdefd02f27 CI: increase tested bitrate for 100 MHz scenario in SA-2x2
Modify the UL/DL UDP iperf test cases to use a higher requested bitrate
for the scenario with 100 MHz bandwidth in the SA-2x2 pipeline. Adjust
gNB config file to allow for higher UL throughput.
2024-10-11 07:57:34 +02:00
francescomani
f3b6155f17 OAI specific config_request field for analog beamforming 2024-10-10 16:14:32 +02:00
Robert Schmidt
eb98aa690e Docker: Use -Werror in Aerial build 2024-10-10 16:04:08 +02:00
Robert Schmidt
3da3ec1907 Resolve error "unknown type name"
Resolve error:

   nfapi/oai_integration/aerial/fapi_nvIPC.h:56:16: error: unknown type name ‘nvipc_params_t’
   56 | int nvIPC_Init(nvipc_params_t nvipc_params_s);

By including the header. Also, move the definiton of the struct to the
MAC, where it is actually stored, and out of the radio common_lib.h,
since this is not a radio (split 7/8) parameter.
2024-10-10 16:02:29 +02:00
Robert Schmidt
35174d7917 Remove useless code
We don't use CUDA (see previous commit). Further, the variables
referenced in this piece of code are not used later.
2024-10-10 16:02:29 +02:00
Robert Schmidt
da5601b8bf Remove code enclosed in NVIPC_CUDA_ENABLE
When compiling aerial, we compile without CUDA support (see e.g.,
docker/Dockerfile.gNB.aerial.ubuntu22). Hence, do not check for it in
aerial for the moment, we won't use it for the foreseeable future.
2024-10-10 16:02:29 +02:00
Robert Schmidt
c648dfd078 Bugfix: preamble_list is an array
Since commit e6e25275ed, preamble_list is
an array, not a pointer. Hence, we don't need to call free().
2024-10-10 16:02:29 +02:00
Robert Schmidt
c945bef2f1 Remove check for NFAPI_MODE_AERIAL, it's pointless
In Aerial bindings (FAPI-Aerial), the NFAPI mode must be
NFAPI_MODE_AERIAL (otherwise, we would not be executing this code).
Hence, the switches don't make sense. Remove them.

The check can more easily be checked with

    git show <commit> --ignore-all-space
2024-10-10 16:02:29 +02:00
Robert Schmidt
f2f08ac52a Remove ENABLE_AERIAL switch in aerial bindings
As is visible at the top of the patch, for compiling aerial_lib (the
binding FAPI-Aerial), we always add ENABLE_AERIAL. Thus, all the code
within ENABLE_AERIAL will be compiled; we can also simply take it out.
2024-10-10 16:02:29 +02:00
Robert Schmidt
f7afc8e8ee Aerial: compile P5 with Aerial-specfic modifications 2024-10-10 16:02:29 +02:00
Robert Schmidt
e04ed98994 Remove unused code 2024-10-10 16:02:29 +02:00
Rúben Soares Silva
0609d31dc7 Only copy RX_DATA.indication pdu if there's data 2024-10-10 16:02:29 +02:00
Robert Schmidt
83838962fd Aerial: Avoid superfluous memcpy(), reduce scope
We can directly read from buffers, so the memcpy() only takes time.
Also, limit the scope of the variables for the unpacking of
RX_DATA.indication.

Co-authored-by: Rúben Soares Silva <rsilva@allbesmart.pt>
2024-10-10 16:01:29 +02:00
Robert Schmidt
1a97aa359e aerial_phy_nr_srs_indication(): implement without relying on L1 structures 2024-10-10 16:00:39 +02:00
Robert Schmidt
77d62cbf57 Remove aerial_phy_nrach_indication(): this is a 4G callback 2024-10-10 16:00:39 +02:00
Robert Schmidt
d91e80beba Remove aerial_phy_nb_harq_indication(): this is a 4G callback 2024-10-10 16:00:39 +02:00
Robert Schmidt
8150328353 Remove aerial_phy_lbt_dl_indication(): this is a 4G callback 2024-10-10 16:00:39 +02:00
Robert Schmidt
f1cbbc9f83 Remove aerial_phy_sr_indication(): this is a 4G callback 2024-10-10 16:00:38 +02:00
Robert Schmidt
88d548fbc2 Remove aerial_phy_cqi_indication(): this is a 4G callback 2024-10-10 16:00:38 +02:00
Robert Schmidt
17ed5d345e Remove aerial_phy_srs_indication(): this is a 4G callback 2024-10-10 16:00:38 +02:00
Robert Schmidt
8888a6bd70 Remove aerial_phy_harq_indication(): this is a 4G callback 2024-10-10 16:00:38 +02:00
Robert Schmidt
24c8e6c5c1 Remove aerial_phy_sync_indication(): this is a 4G callback 2024-10-10 16:00:38 +02:00
Robert Schmidt
3b4df11078 Remove aerial_phy_slot_indication(): this is a 4G callback 2024-10-10 16:00:38 +02:00
francescomani
6b58d357d9 moving beamforming matrix to MAC and feeding it to FAPI structures 2024-10-10 12:42:17 +02:00
francescomani
7fdae002b9 remove UL MCS limitation on CI transform precoding test 2024-10-10 12:06:47 +02:00
francescomani
a343ec03fd changes in get_transformPrecoding to follow what's written in 6.1.3 of 214 2024-10-10 11:58:07 +02:00
Bartosz Podrygajlo
de4a737131 Add dockerized include what you use tool
Introduces a tool that organizes C/C++ header includes. The tools output
should still be manually reviewed by a contributor.
2024-10-10 09:41:11 +02:00
ndomingues
64ee6a4776 Use common function to get mu at UE for PRACH 2024-10-09 19:04:43 +02:00
rmagueta
aaf9b57abb Call active=0 for CSI-RS early 2024-10-09 10:01:46 +01:00
ndomingues
88a9515321 Update FEATURE_SET with 2-Step RA feature 2024-10-09 09:11:16 +01:00
ndomingues
acd776fe28 Implementation of RA 2-Step MsgB procedures at UE 2024-10-09 09:11:16 +01:00
ndomingues
9d786bdee7 Implementation of RA 2-Step MsgB procedures at gNB 2024-10-09 09:11:16 +01:00
ndomingues
19e0df13a9 Add support for Random Access MsgB RNTI 2024-10-09 09:04:44 +01:00
ndomingues
160210ebae Baseline implementation of RA 2-Step MsgA procedures at UE 2024-10-09 09:04:44 +01:00
ndomingues
cbbbeb8051 Baseline implementation of RA 2-Step MsgA procedures at gNB 2024-10-09 09:04:41 +01:00
francescomani
a6f03b3f79 ULSCH scheduler fix when using transform precoding
Bug in ULSCH scheduler for transform precoding. It ignores transform precoding specific tables when building ul_pf_tbs.
2024-10-09 09:45:01 +02:00
Robert Schmidt
c609dd8fcf Implement common nr_get_mu() in nr_mac_common
These functions look up the numerology, and code can be harmonized:

- ssb_index_from_prach()
- find_SSB_and_RO_available()
- schedule_nr_prach()

The next commits also need to look up the numerology from the
UplinkConfigCommon. This provides the common implementation to be used
in follow-up commits.
2024-10-08 14:19:57 +01:00
ndomingues
3083f4f3d1 Common parameters to apply successRAR 2024-10-08 14:19:57 +01:00
ndomingues
c4b51b78d6 Decode msgA_ConfigCommon_r16 from received SIB1 at UE and save it in bwp->msgA_ConfigCommon_r16 2024-10-08 14:19:57 +01:00
ndomingues
9d84ba7fbf Refactor enum nr_ra_type_t and make it common for both gNB and UE 2024-10-08 14:19:57 +01:00
ndomingues
abb7439b8a Compute RA 2-Step MsgB_RNTI as specified in 3GPP TS 38.321 Section 5.1.3a 2024-10-08 14:19:57 +01:00
ndomingues
e4655154ee Add RA 2-Step configuration parameters to SIB1 2024-10-08 14:19:55 +01:00
ndomingues
22a4480c2a Add configuration file with support for RA 2-Step 2024-10-08 14:15:43 +01:00
francescomani
f25ad2b098 remove unnecessary return at the end of nr_ue_csi_rs_procedures 2024-10-08 09:46:43 +02:00
francescomani
46beda91ee moving CSI-RS common functions to a new file 2024-10-08 09:46:43 +02:00
francescomani
a54a919bd8 removing UE dependence on gNB CSI FAPI structure and decoupling UE from gNB procedures 2024-10-08 09:46:43 +02:00
francescomani
26fd99ff61 terminal independent common functions in nr_generate_csi_rs 2024-10-08 09:46:43 +02:00
francescomani
ddbbaef302 remove nr_csi_info_t from gNB (unused) 2024-10-08 09:46:43 +02:00
francescomani
7e009781cd moving out CSI mapping parameters from nr_generate_csi_rs 2024-10-08 09:46:43 +02:00
francescomani
ad96697d10 common function for CSI-RS mapping parameters 2024-10-08 09:46:43 +02:00
Robert Schmidt
e15fa14c57 Merge branch 'integration_2024_w40b' into 'develop'
Integration: `2024.w40b`

See merge request oai/openairinterface5g!3021

* !2890 F1AP encoding/decoding library
* !2969 Time domain samples scope for NR UE & gNB
* !2998 warmup RF board in UE
* !3009 Fix the ratio of PDSCH EPRE to DM-RS EPRE
* !2965 Refactoring of prepare_scc in gNB config
* !3002 CI: Change frequency used by AW2S pipeline
* !3007 Enable gNB configuration through YAML file
* !3001 Minor ue fixes
* !2971 Use getaddrinfo() when connecting to rfsimulator
2024-10-07 20:28:28 +00:00
Jaroslava Fiedlerova
36682aa76f Merge remote-tracking branch 'origin/ue-sim-use-getaddrinfo' into integration_2024_w40b 2024-10-07 16:41:46 +02:00
Jaroslava Fiedlerova
dbd37dac38 Merge remote-tracking branch 'origin/minor-ue-fixes' into integration_2024_w40b 2024-10-07 16:40:09 +02:00
Robert Schmidt
d6f0ff37c2 RFsim: doc serveraddr: mention IPv4v6 and DNS 2024-10-07 14:17:12 +02:00
Robert Schmidt
ac7c02d8e5 CI 5G E1 RFsim test: Use DNS name for RFsim 2024-10-07 14:17:12 +02:00
Robert Schmidt
a648afd4c6 RFsim Client: Improve logs
- Remove double "Connection ... established" (already printed in
  caller)
- Remove useless, there is already the logging module
- Print getaddrinfo() error as LOG_E (error)
2024-10-07 14:16:15 +02:00
Laurent THOMAS
8f46b07b22 Lacking RRC check: avoid SEGV if the received packet is not what we believe 2024-10-07 13:39:29 +02:00
Jaroslava Fiedlerova
169dddf8c0 Merge remote-tracking branch 'origin/gnb-yaml' into integration_2024_w40b 2024-10-07 13:37:57 +02:00
Jaroslava Fiedlerova
1136e4cafd Merge remote-tracking branch 'origin/ci-aw2s-change-frequency' into integration_2024_w40b 2024-10-07 13:37:42 +02:00
Laurent THOMAS
f77f428767 Small optimization L2 to wireshark
the code creates a sink to read all traced packets and drop it.  but
this works only if we send to a local address and if there is not
another sink (like if we trace both UE and gNB in the same machine).
this sink's purpose is only to prevent to get automatic packets back
from the kernel saying "no listener". So, instead of killing the trace
when we can't create the sink (as done previously), we now just let the
trace in operation.
2024-10-07 13:37:34 +02:00
Bartosz Podrygajlo
01066a3f0d Fix some sizeof and switch-case errors reported by CodeChecker
CodeChecker is a python application that collects reports from static analyzers like
clang-tidy, clangsa, cppcheck.
2024-10-07 09:35:24 +02:00
Bartosz Podrygajlo
0daabdeb87 Update the aw2s entrypoint to support new yaml config and updated images 2024-10-07 09:15:44 +02:00
Bartosz Podrygajlo
8e6234a2f5 Enable gNB configuration through YAML file 2024-10-07 09:10:42 +02:00
Jaroslava Fiedlerova
fa6840c05e Merge remote-tracking branch 'origin/gnb-config-code-refactoring' into integration_2024_w40b 2024-10-04 16:36:23 +02:00
Jaroslava Fiedlerova
8584da1636 CI: add 1x1 AW2S test with multi UEs 2024-10-04 11:46:22 +02:00
Jaroslava Fiedlerova
5e9c432b41 CI: change frequency used by AW2S 2024-10-04 11:46:22 +02:00
Jaroslava Fiedlerova
406227699b CI: rename AW2S configs/files used for 2x2 testing 2024-10-04 11:46:17 +02:00
Jaroslava Fiedlerova
9ef7e6dec0 Merge remote-tracking branch 'origin/fix-Beta_DMRS_PDSCH' into integration_2024_w40b 2024-10-04 11:00:31 +02:00
Jaroslava Fiedlerova
9ca37d1b94 Merge remote-tracking branch 'origin/ue-RF-warmup' into integration_2024_w40b 2024-10-04 07:53:17 +02:00
Jaroslava Fiedlerova
b824e55cdd Merge remote-tracking branch 'origin/imscope-td-plot' into integration_2024_w40b 2024-10-04 07:52:36 +02:00
Jaroslava Fiedlerova
7be2a165b3 Merge remote-tracking branch 'origin/f1ap-msg-encdec-tests' into integration_2024_w40b 2024-10-04 07:52:01 +02:00
Robert Schmidt
d8a6c5c9d5 Merge branch 'integration_2024_w40' into 'develop'
Integration: `2024.w40`

Closes #756 and #849

See merge request oai/openairinterface5g!3014

* !2886 (doc): Added a new doc on hardware requirements
* !2955 dockerized clang-format error detection tool
* !3005 Fix symbol size in nr_dlsch_mmse
* !2930 SRS tx power
* SA-B200-Module-SABOX pipeline: improve radio
* SA-AW2S-CN5G: accept 5% ping packet loss
* !3003 Resolve "SEGFAULT in L1_rx_thread" - CI
* !3016 fix tests for log2_approx and log2_approx64
* patch to move RFsim-4G to cacofonix
2024-10-03 08:45:25 +00:00
Robert Schmidt
4c85eb4a9e More CI RFsim4G to cacofonix 2024-10-03 09:10:33 +02:00
Robert Schmidt
fa5ca8d7ea Merge remote-tracking branch 'origin/756-segfault-in-l1_rx_thread' into integration_2024_w40 2024-10-02 17:06:57 +02:00
Robert Schmidt
c2535df334 Merge remote-tracking branch 'origin/fix_log2_approx_tests' into integration_2024_w40 2024-10-02 17:06:33 +02:00
Robert Schmidt
27d073d4f6 Free CellGroup 2024-10-02 17:04:53 +02:00
Robert Schmidt
ba10db149a Logs when UE cannot use CCCH 2024-10-02 17:04:53 +02:00
andrewse
2335f5b6cf Don't call mac_rlc_data_ind when SRB0 already exist for UE.
It can happen that L1 gives us a TB that we interpret as receiving UL
MAC TB with LCID "UL_SCH_LCID_CCCH1". This might or might not be
correct, but currently, we observe segfaults when trying to encode the
cellgroup in send_initial_ul_rrc_message() (encode_cellGroupConfig()).

This fix prevents a segfault by not delivering a MAC SDU to RLC if CCCH
is already present. Note that in some cases, this could still happen,
e.g. Resume Request. However, we don't support this message, so ignore
it for the moment.

This fix enables a gNB to operate continuously for extended periods
(days), which is essential for real deployment scenarios.

Closes: #756
2024-10-02 17:04:53 +02:00
Ghislain Bourgeois
6344fce6e4 Reinitialize sock to -1 after closing
Prevents bug where a closed socket is returned.
2024-10-02 10:34:27 -04:00
rmagueta
73b00e8c1c Fix the ratio of PDSCH EPRE to DM-RS EPRE
This fix gets DL 4-layer working with COTS UE
2024-10-02 15:30:11 +01:00
Thomas Schlichter
28656a1adf add test log2_approx.boundaries 2024-10-02 13:30:16 +02:00
Thomas Schlichter
d6f9bcd1cc fix test log2_approx64.boundaries
The test was actually never executed correctly (unsigned -10 is never <= 10), and log2_approx64_ref() was not accurate enough.
Therefore replace it by directly comparing one value above and one value below each rounding boundary.
2024-10-02 13:30:16 +02:00
Thomas Schlichter
6bf68c81c8 skip the test log2_approx.complete when using ctest
To skip the test, we use the gtest command line parameter "--gtest_filter" to filter out the unwanted test.
This parameter is described as follows:

--gtest_filter=POSITIVE_PATTERNS[-NEGATIVE_PATTERNS]
      Run only the tests whose name matches one of the positive patterns but
      none of the negative patterns. '?' matches any single character; '*'
      matches any substring; ':' separates two patterns.
2024-10-02 13:30:16 +02:00
Robert Schmidt
5ed1dcd2fc CI SA-AW2S-CN5G: adjust ping loss threshold
In this pipeline, we frequently see losses of a single packet; we did
not find the true reason yet.

Accept 5% losses, assuming that serious packet loss would be catched by
(1) higher ping losses (2) iperf would be affected.
2024-10-02 12:37:22 +02:00
Robert Schmidt
0699f1a993 CI SA-B200-Module-SABOX: improve behavior by adjusting radio parameters 2024-10-02 12:34:58 +02:00
Guido Casati
48bb594e30 Cleanup gnb_config.c 2024-10-02 11:39:24 +02:00
Guido Casati
1438dfbd35 Refactored fill_scc_sim
* clang formatted
* code cleanup
* improve readability
2024-10-02 11:39:24 +02:00
Guido Casati
8d222bc474 Refactoring of prepare_scc
* improved readability
* clang formatted
2024-10-02 11:39:23 +02:00
Guido Casati
a32a8504c9 Use a macro to initialize NR_SetupRelease structs
* introduced macro INIT_SETUP_RELEASE to optimize code in gnb_config.c
2024-10-02 11:36:43 +02:00
Guido Casati
56e510b2f2 Use calloc_or_fail in gnb_config.c 2024-10-02 11:36:43 +02:00
Guido Casati
ee26e51015 Use abort instead to exit in calloc_or_fail
* abort generates a core dump
2024-10-02 11:36:43 +02:00
Guido Casati
13757cfd28 Cleanup of long-time commented out code in prepare_scc 2024-10-02 11:36:43 +02:00
Thomas Laurent
5811ab1dc8 Apply 2 suggestion(s) to 2 file(s)
Co-authored-by: Robert Schmidt <robert.schmidt@eurecom.fr>
2024-10-02 09:11:49 +00:00
Ghislain Bourgeois
320747e0b0 Use getaddrinfo() and add IPv6 support in startServer
This commit refactors startServer to use getaddrinfo() to
prepare the socket creation. Doing so, it also adds support for
IPv6 by using AF_UNSPEC as the address family.
2024-10-02 09:34:24 +02:00
Ghislain Bourgeois
53d31eb26e Use getaddrinfo() when connecting to rfsimulator
This commits uses getaddrinfo(3) when connecting as client to the
rfsimulator. This enables name lookups, through DNS or a hosts file.

This change makes it easier to use the simulator in a dynamic
environment like Docker or Kubernetes by only targeting the name of
the container or service.
2024-10-02 09:34:24 +02:00
Jaroslava Fiedlerova
dcd09069b6 Merge remote-tracking branch 'origin/srs-tx-power' into integration_2024_w40 2024-10-01 22:17:55 +02:00
Jaroslava Fiedlerova
5636d77ce7 Merge remote-tracking branch 'origin/issue_849' into integration_2024_w40 2024-10-01 19:05:06 +02:00
Jaroslava Fiedlerova
b8401a189a Merge remote-tracking branch 'origin/clang-format-tool' into integration_2024_w40 2024-10-01 19:04:33 +02:00
Jaroslava Fiedlerova
a700da57b3 Merge remote-tracking branch 'origin/hardware-documentation' into integration_2024_w40 2024-10-01 18:53:40 +02:00
Bartosz Podrygajlo
fecff5f346 Reset SRS power control adjustment state if p0 or alpha is provided
Reset h_b_f_c (SRS power control adjustment state) when SRS-ResourceSet
p0 or alpha is provided by higher layers, accroding to 38.213 7.3.1.
2024-10-01 10:15:40 +02:00
Bartosz Podrygajlo
7359c6b66e Move h_b_f_c to UL BWP
Move h_b_f_c (or SRS power control adjustment state) to UL BWP structure. This is a per
bwp parameter so it makes sense to make its lifetime the same as BWP, even if we dont support
>1 UL BWPs.
2024-10-01 10:15:33 +02:00
Bartosz Podrygajlo
bfc47445ee SRS tx power with power control state 2024-10-01 10:15:23 +02:00
Robert Schmidt
fc0cbc3147 Create_Workspace: exit 0 at end
the create_workspace.sh script checks if a branch should be merged into
what we are trying to checkount (i.e., typically develop into
feature-branch). The problem is that it uses a short-hand for an if
branch.

    [ -n "${merge}"] && git merge...

If we don't request a merge, [ -n XX ] will evalute to 1, and not do the
git merge. Since it's the last command in the script, this makes the
script return 1 (failure), when it actually succeeded.

Add exit 0 to ensure we return 0 after successful end of the script. If
there is a failure, the script will terminate early. It can be tested by
e.g., giving a wrong commit ID.

Reviewed-by: Jaroslava Fiedlerova <Jaroslava.Fiedlerova@openairinterface.org>
2024-10-01 09:19:43 +02:00
Robert Schmidt
54f927b2cb Merge branch 'integration_2024_w39' into 'develop'
Integration: `2024.w39`

Closes #846

See merge request oai/openairinterface5g!2990

* !2718 Added Jenkins job for Colosseum testing integration
* !2901 Fix log2_approx
* !2983 fix(docker): making tini download platform specific to support ARM64 native builds
* !2919 Add E2 SM in the target dockerfiles
* !2981 NR gNB fix PMI report evaluation
* !2979 NR-UE: Merging different UE NR SLOT FEP procedures into one.
* !2899 SIB19 initialization and scheduling on gNB
* !2953 Remove unnecessary c includes
* !2926 Fix SRS FAPI at gNB
* !2987 fix for variable power in PDSCH REs in case of 25 PRBs Bandwidth
* !2993 remove DRX from UE capabilities: not supported yet
* !2711 NR UE UL time alignment handling improvements
* !2995 some small fixes for 5G NR
* !2992 cleaner faster nr_pdcch_demapping_deinterleaving() inner loop
* !2986 NR PDCP ticks for F1 split
* !2982 CI framework cleanup
2024-10-01 06:24:27 +00:00
Sakthivel Velumani
f8a51921a8 Update default path for websrv resources 2024-09-30 21:02:29 -04:00
Sakthivel Velumani
56d05276bd Fix bug in websrv opening page
allocating enough memory to hold url to index page.
2024-09-30 20:29:59 -04:00
Jaroslava Fiedlerova
66b34d1ef1 Merge remote-tracking branch 'origin/ci-framework-cleanup' into integration_2024_w39 2024-09-30 22:21:59 +02:00
Bartosz Podrygajlo
b2c49fbc27 Add time-domain scope to gNB imscope. 2024-09-30 20:41:08 +02:00
Bartosz Podrygajlo
80f90b5599 Add time domain sample scope before sync
Added new data sync for UE which displays time domain samples read from RF device
before synchronization to PSS/SSS
2024-09-30 20:36:38 +02:00
Bartosz Podrygajlo
43a9236963 Improve imscope's scatterplot
- Reduce point size to 1 pixel
 - call ImPlot::PlotScatter as many times as needed
2024-09-30 20:36:18 +02:00
Bartosz Podrygajlo
7986a4de8e Time domain samples scope for NR UE
Add a new scope data source (ueTimeDomainSamples) which provides time domain samples
for antenna 0 to the scope. Add graphical representation of the data in imscope.

Removed C-define from ENABLE_IMSCOPE cmake option, the #define was unused and this way
code does not have to be recompiled when imscope enable state changes.
2024-09-30 20:34:09 +02:00
arora
f648c09df6 system requirements, cpu frequency information
Signed-off-by: arora <sagar.arora@openairinterface.org>
2024-09-30 16:43:05 +02:00
Robert Schmidt
0e23b795b7 CI: use Custom_Script to execute SR-IOV/setup scripts for FHI72 pipeline 2024-09-30 16:08:58 +02:00
Robert Schmidt
5ee9e20f7d SAbox: consistently pull/clean test images in each step 2024-09-30 15:31:41 +02:00
Robert Schmidt
d3b4a6b788 Fix: clear HTML global's internal state 2024-09-30 15:25:10 +02:00
Jaroslava Fiedlerova
6984c05aad Merge remote-tracking branch 'origin/fix_nr_pdcp_tick' into integration_2024_w39 2024-09-30 13:14:06 +02:00
francescomani
601ad40490 fix for nr_dlsch_mmse rxdataF_comp symbol size (Closes: #849) 2024-09-30 09:14:44 +02:00
Robert Schmidt
17c148b7a5 Merge remote-tracking branch 'origin/nr_pdcch_demapping_deinterleaving-improve' into integration_2024_w39 2024-09-29 22:10:38 +02:00
Robert Schmidt
51bb3d25cf Merge remote-tracking branch 'origin/small_fixes_for_5G_NR' into integration_2024_w39 2024-09-29 22:09:26 +02:00
francescomani
2d3ac5803e formatting 2024-09-29 17:55:28 +02:00
Xin Zhe Khooi
163d058d4a introduce dedicated nr pdcp tick thread for F1 split
Currently, NR PDCP ticks are active only with monolithic gNB, triggered by the MAC scheduler in gNB_scheduler.c.
In F1 split mode, as there is no MAC, there’s no source to advance the NR PDCP timer via "nr_pdcp_wakeup_timer_thread()".
This commit introduces a dedicated thread for NR PDCP ticks in gNB-CU and CU-UP mode.
Without it, packet losses at the F1 uplink would cause indefinite buffering, as t-Reordering won't expire due to the lack of NR PDCP timer ticks.
2024-09-29 15:10:54 +00:00
Raymond Knopp
d2ebc356a0 removed division by num_antenna_ports in PDSCH precoding matrix generation. These matrices are defined for CSI reporting in this way but here we are using them for transmission and this results in an unwanted 10*log10(num_antenna_ports) reduction in transmit power 2024-09-29 10:17:56 +02:00
Robert Schmidt
2b67b0e1de CI PullImage(): HTML: indicate pulled images 2024-09-28 12:58:22 +02:00
Robert Schmidt
904534f0da Reboot USRP: use infinitive to harmonize with other steps 2024-09-28 12:58:22 +02:00
Robert Schmidt
60b9649e00 Implement CreateWorkspace() through script, print dir in HTML
Use a script, which can be tested independently of CI code (by running
it on the host on which it will be used), and print the directory that
has been prepared in the HTML.  Also, in the description, use the
infinitive/imperative(?) of the verb to harmonize with other steps.
2024-09-28 12:58:06 +02:00
Robert Schmidt
e541aee49e Implement runScript in cls_cmd for LocalCmd/RemoteCmd, add test
A lot of CI code is python mixed with bash, e.g.,

    ssh = getConnection(host)
    ssh.run('ls')
    ssh.run('echo')

At least some of this CI code would benefit if it was written in a
simple bash script, returning error codes and potentially other
information either through stdout/stderr or files, to the calling Python
code:

    ssh = runScript(host, script)
    # script does: ls; echo

This commit introduces the possibility to run entire scripts. The idea
is that the executor has a script (on localhost), which is either
executed locally or on a remote host. For the remote host, the script is
not copied but piped into a remotely executed bash. In both cases,
output is either returned like the Cmd.run() function with returncode
and mixed stdout/stderr, or optionally redirected into a file on the
(remote) host, which can be treated further by the Python code in later
steps.
2024-09-28 12:52:59 +02:00
Robert Schmidt
fc0bc2357c Modify all YAML files to work with .env files from DeployObject() 2024-09-28 12:46:04 +02:00
Robert Schmidt
51bf5c0fc9 Introduce CI deployment tests based on OAI images 2024-09-28 12:46:04 +02:00
Robert Schmidt
5201a5c37a Reimplement DeployObject()/UndeployObject()
This reimplements the CI deployment functions, and makes them a bit more
robust.  Concretely:

- Introduce a generic "deployment tag" option that can be used to
  override the tag to use for specific images. By default, it is the
  current "branch-commitID[0:8]" tag name (requires the change from
  function ImageTagToUse() to CreateTag(), impacting also pull/push
  image functions)
- Avoid sed for image names, and use an .env file that docker-compose
  picks up automatically; the deployment analyzes a potentially existing
  .env file and updates instead of simply overriding. For instance, some
  pipelines might use -asan images for the gNB and "normal" (non-asan)
  images for UE, and a simple overwriting might make the -asan image
  name tag disappear for the gNB, resulting in deployment failures).
  Finally, undeployment removes the .env file, so that there are no
  modifications in the repository after undeployment.
- Redo the previous behavior of autodetecting asan, and use that (the
  current function always uses asan, no matter what)
- Remove deployKind/displayedNewTags globals, as they are not necessary
- Make the usedImage output in HTML slimmer
- On undeployment, print service names next to undeploy analysis, and
  return success/failure.
- Make the functions generally less verbose and easier to read

Note that as of and only in this commit, deployment does not work, as
all the YAML files have not been updated to work with this updated
version.  The next commit adds tests for the new deployment, and updates
one YAML file (also being used in the tests). The follow-up commit then
modifies all YAML files.
2024-09-28 12:46:04 +02:00
Robert Schmidt
d81abdaf7b Reimplement Native Build (CI step Build_eNB)
The BuildeNB steps either does things that are already implemented
(created workspace), or things that we don't use (separate build_wait),
and is generally quite convoluted when all it does is calling build_oai.
Reimplement by reusing Create_Workspace, and make build_oai in a single
step. To clean up, make a new module in which this function does not
need a class instantiation. Instead, we give all necessary parameters
directly.
2024-09-28 12:45:34 +02:00
Robert Schmidt
3feaa93ba0 cls_cmd: print the host on which a command is executed 2024-09-28 12:45:34 +02:00
Robert Schmidt
0d63861bf1 cls_cmd.py: local copy: don't copy if src/tgt identical 2024-09-28 12:45:34 +02:00
Robert Schmidt
f21b5d2ef4 CI: Add basic unittest for cls_cmd 2024-09-28 12:45:33 +02:00
Robert Schmidt
606e2c749a cls_cmd: execute commands through bash
The next commit will use "echo -e". The problem with that is that bash
and sh differ:

- in bash: this results in "a\nb" (a+newline+b)
- in sh: this results in -e a\nb (-e a+newline+b)

The problem is that by default, commands are executed through sh, which
nobody expects. Change to bash, which is likely more aligned with what
people want to use.
2024-09-28 12:45:33 +02:00
Robert Schmidt
5d5ade1697 Remove superfluous cleanup/terminate/teardown XMLs
After the previous commit, the CI will always do an undeployment step
even if the CI failed. Hence, these XMLs are not necessary anymore. Some
XMLs are updated to do what their "cleanup XML" counterparts did, such
as removing additional images.
2024-09-28 12:45:07 +02:00
Robert Schmidt
8bdc399b27 Remove AutoTerminateUEeNB() functions, use auto_exec to make CI always undeploy 2024-09-28 12:45:07 +02:00
Robert Schmidt
041b2b2d7a Remove prematureExit/exitStatus, and implement in task main loop
Use the previous commit on returning success from each task execution
function, and implement handling of errors in the main loop. Add a
script with which this is visible using Custom_Commands.
2024-09-28 12:45:07 +02:00
Robert Schmidt
7b89548867 Consistently return success true/false from task steps 2024-09-28 12:45:07 +02:00
Robert Schmidt
e969ddb897 IdleSleep(): no need for class members 2024-09-28 12:45:07 +02:00
Robert Schmidt
71807db4ab Custom_Command(): no need for class members 2024-09-28 12:45:07 +02:00
Robert Schmidt
61ea76e7af Remove CI repeatCount XML property
The repeatCount property is useless: it would be enough to specify the
same XML multiple times to achieve the same thing.
2024-09-28 12:45:07 +02:00
Robert Schmidt
77a8f5fa99 Basic test runner script 2024-09-28 12:45:07 +02:00
Robert Schmidt
d108648312 Handle parameter reading and test case execution together
For reasons I don't understand, the XML option reading and actual test
case execution are at different places in the code. This is problematic,
because what this led to is that options are not passed as function
arguments, but indirectly through class members. This led to a lot of
"indirect code"; it's a total mess

To improve this, move them together, so that parameters can be passed
directly as function arguments later on.

Because we reference the globals, mark them inside
ExecuteActionWithParam(). That is a Python antipattern, but necessary at
this moment. I believe that we can remove the following globals over
time:

- SSH (with new cls_cmd, which we don't need to pass)
- EPC (replaced through a class similar to ue_module, i.e., refer to
  core networks on specific hosts through an ID, instead of a global)
- HTML (should use templating, where individual functions give back a
  dictionary of what they want to print, and a final pass assembles the
  entire HTML file)
- RAN/SCA/PHYSIM/CLUSTER/ldpc (can be replaced with stateless scripts
  build/run eNB/gNB on a specific node)
2024-09-28 12:45:07 +02:00
Jaroslava Fiedlerova
e9f9718f63 CI: add more unit tests for UDP iperf3 analysis function 2024-09-28 12:45:07 +02:00
Jaroslava Fiedlerova
5fd5ed43c7 CI: Adjust regex patterns for Iperf3 UDP log parsing
Update the regex for both sender and receiver data to allow optional
bitrate unit prefixes - accepts also no prefix. Modify the patterns for
lost and total packets to accept negative values (`-?\d+`).
2024-09-28 12:45:07 +02:00
Jaroslava Fiedlerova
9d92c0e477 CI: add unit test for UDP iperf3 analysis function 2024-09-28 12:45:07 +02:00
Jaroslava Fiedlerova
1ba5677056 CI: get UDP iperf3 results even if packet count is negative 2024-09-28 12:45:07 +02:00
Robert Schmidt
0da2f27fa7 CI Ping/Iperf: add tests, print without lock, reduce code lines
Add some basic unit tests to verify that Iperf/Ping work. Harmonize the
logging by only print in the "main" iperf/ping function, to avoid that
if we test with multiple UEs, the output intermixes. Also, do one common
mkdir before starting multiple pings/iperfs. Finally, harmonize the
paths so that Iperf and Ping log their files in the same place.
2024-09-28 12:45:07 +02:00
Robert Schmidt
02d5f953a8 Add simple unit test cases for Deployment, including instructions 2024-09-27 19:59:54 +02:00
Robert Schmidt
25f7f61d73 Simplify GetContainerHealth(): we never use unhealthy count 2024-09-27 19:59:54 +02:00
Robert Schmidt
4bf7c45be1 SSHConnection class: don't exit, raise Exception to have main loop handle 2024-09-27 19:59:54 +02:00
Robert Schmidt
1620994f0a DeployObject: EPC not needed 2024-09-27 19:59:54 +02:00
Robert Schmidt
7c1920aea9 Fixup: no HTML in create_workspace, so can't print to HTML 2024-09-27 19:59:54 +02:00
Robert Schmidt
6f868b038f Remove more unused CI files 2024-09-27 19:59:54 +02:00
Robert Schmidt
cded721189 Remove unused CI XML and Python code 2024-09-27 19:50:41 +02:00
Jaroslava Fiedlerova
6d09b2179e Merge remote-tracking branch 'origin/NR_UE_UL_time_alignment' into integration_2024_w39 2024-09-27 17:40:15 +02:00
Guido Casati
5daad21ca6 Reworked F1AP documentation and added info about the library
* moved F1AP related docs to a separate folder in docs
2024-09-27 17:39:00 +02:00
Guido Casati
3aa9f4c0be Use F1 gNB-DU Configuration Update Acknowledge lib in stack 2024-09-27 17:39:00 +02:00
Guido Casati
b8ee622f1c Add test for F1 DU Configuration Update Acknowledge lib 2024-09-27 17:38:55 +02:00
Guido Casati
b91e1b0a12 Add enc/dec lib for F1AP gNB-DU Configuration Update Acknowledge (Interface Management) 2024-09-27 17:38:52 +02:00
Guido Casati
3ce1f0e2c5 Use F1 gNB-CU Configuration Update Acknowledge lib in stack 2024-09-27 17:38:51 +02:00
Guido Casati
c936aabd9a Add test for CU Configuration Update Acknowledge lib 2024-09-27 17:38:43 +02:00
Guido Casati
3724e84fed Add enc library for F1 gNB-CU Configuration Update Acknowledge (Interface Management) 2024-09-27 17:38:38 +02:00
Guido Casati
d2863d9693 Refactored f1ap_gnb_cu_configuration_update_acknowledge_t
* add transaction_id
* refactored remaining members
2024-09-27 17:38:38 +02:00
Guido Casati
80a05271d6 Use F1AP gNB-CU Configuration Update lib in stack 2024-09-27 17:38:38 +02:00
Guido Casati
3626366228 Add test for F1 gNB-CU Configuration Update enc/dec lib 2024-09-27 17:38:38 +02:00
Guido Casati
8e3d6583a5 Add enc/dec library for F1AP gNB-CU Configuration Update (Interface Management) 2024-09-27 17:38:38 +02:00
Guido Casati
c416c57f92 Simplified F1AP gNB-CU Configuration Update message struct
* removed optional IEs, whose encoding/decoding is not done
2024-09-27 17:38:38 +02:00
Guido Casati
3b11764d1d Minor comments 2024-09-27 17:38:38 +02:00
Guido Casati
07da84ede2 Use F1 gNB-DU Configuration Update lib in stack 2024-09-27 17:38:38 +02:00
Guido Casati
2cc50832d1 Add test for F1AP gNB-DU Configuration Update enc/dec library 2024-09-27 17:38:38 +02:00
Guido Casati
9958e53cb1 Add encoding/decoding library for F1AP gNB-DU Configuration Update (Interface Management) 2024-09-27 17:38:38 +02:00
Guido Casati
df62abca0c Removed gNB_CU_name from f1ap_gnb_du_configuration_update_t
* not defined in 9.2.1.8 of 3GPP TS 38.473
2024-09-27 17:38:38 +02:00
Guido Casati
289fdfe381 Use F1AP Setup Failure enc/dec lib in stack 2024-09-27 17:38:38 +02:00
Guido Casati
6146c470e2 Add test for F1AP Setup Failure enc/dec lib 2024-09-27 17:38:38 +02:00
Guido Casati
7e495db5ec Add encoding/decoding lib for F1 Setup Failure (interface management) 2024-09-27 17:38:38 +02:00
Guido Casati
28e2d67ee5 Fixes to F1 Setup Failure
* added missing Transaction ID to te F1 Setup Failure message struct
* fill F1 Setup Failure transaction ID in RRC before calling the F1 Setup Failure function
2024-09-27 17:38:38 +02:00
Guido Casati
3a5ace00d2 Use F1AP lib for F1 Setup Response in stack 2024-09-27 17:38:38 +02:00
Guido Casati
df2c92e652 Add test for F1AP Setup Response enc/dec lib 2024-09-27 17:38:35 +02:00
Guido Casati
30628b820c Add encoding/decoding lib for F1AP Setup Response (Interface Management) 2024-09-27 17:38:30 +02:00
Jaroslava Fiedlerova
ed4af19590 Merge remote-tracking branch 'origin/remove-DRX-UE-capabilities' into integration_2024_w39 2024-09-27 17:33:20 +02:00
Jaroslava Fiedlerova
16d8281418 Merge remote-tracking branch 'origin/NR_GNB_PDSCH_FIX' into integration_2024_w39 2024-09-27 17:13:18 +02:00
Jaroslava Fiedlerova
36ade4a153 Merge remote-tracking branch 'origin/fix_fapi_SRS_gNB' into integration_2024_w39 2024-09-27 17:12:52 +02:00
Jaroslava Fiedlerova
2ba7d59dfe Merge remote-tracking branch 'origin/remove-includes' into integration_2024_w39 2024-09-27 17:12:39 +02:00
Thomas Schlichter
60c2b3fe00 nrscope: fix label on gNB scope - it is NR not LTE ;-) 2024-09-27 17:07:20 +02:00
Thomas Schlichter
9f8a2573ee gNB: update DL and UL bler_stats.mcs for logging also in case of harq_round_max == 1 2024-09-27 17:07:15 +02:00
Thomas Schlichter
60ca088e51 gNB: respect config value dl_max_mcs also in case of harq_round_max == 1 2024-09-27 17:07:11 +02:00
Thomas Schlichter
d9940b1bc4 NR UE: fix logical error in nr_ue_process_dci_dl_10()
Fixing this avoids the theoretical possibility of dereferencing a NULL pointer.
2024-09-27 17:07:03 +02:00
Thomas Schlichter
b0eedd3bbd gNB: fix a comment - current TA interval is 100 frames, not 10 2024-09-27 17:06:52 +02:00
Thomas Schlichter
791cc4f648 NR UE: set time sync PI controller integral weight to 0.0 by default
Experiments did show that the time sync is less stable in terrestrial mode if the integral part of the PI controller is used.
So set it to 0.0 by default. For NTN LEO use case we can still use it by providing the command line parameter --time-sync-I 0.2 .
fixes #846
2024-09-27 17:06:42 +02:00
Thomas Schlichter
64380eaca2 gNB: consider NTN_Koffset when scheduling PRACH 2024-09-27 17:03:36 +02:00
Thomas Schlichter
0ecf35de84 gNB: print error message if PRACH resources are already occupied in schedule_nr_prach() 2024-09-27 17:03:21 +02:00
Thomas Schlichter
656a87bb8a gNB: make sure not to write behind end of prach_pdu_indication_list in L1_nr_prach_procedures() 2024-09-27 16:59:48 +02:00
Laurent THOMAS
711afedfe1 warmup RF board in UE 2024-09-27 14:39:41 +02:00
Jaroslava Fiedlerova
fb1cc6c253 Merge remote-tracking branch 'origin/sib19-gnb' into integration_2024_w39 2024-09-27 14:10:17 +02:00
Jaroslava Fiedlerova
01524428d4 Merge remote-tracking branch 'origin/NR_UE_SLOTFEP_MERGE' into integration_2024_w39 2024-09-27 14:10:04 +02:00
Laurent THOMAS
8471922028 remove DRX from UE capabilities as we have not developped the feature 2024-09-27 11:48:33 +02:00
Laurent THOMAS
5a5063bddc cleaner faster nr_pdcch_demapping_deinterleaving() inner loop 2024-09-27 11:46:59 +02:00
Jaroslava Fiedlerova
3dbd8b9b3c Merge remote-tracking branch 'origin/PMI_extraction_fix' into integration_2024_w39 2024-09-27 11:40:55 +02:00
Jaroslava Fiedlerova
d2347a7c89 Merge remote-tracking branch 'origin/add_e2_sm_in_dockerfiles' into integration_2024_w39 2024-09-27 11:40:39 +02:00
Guido Casati
1d8e896567 Use F1AP lib for F1 Setup Request in stack 2024-09-27 11:22:03 +02:00
Guido Casati
c433f4de15 Add test for F1 Setup Request enc/dec lib 2024-09-27 11:22:03 +02:00
Guido Casati
f278b00837 Add encoding/decoding library for F1AP Setup Request (Interface Management) 2024-09-27 11:22:03 +02:00
Guido Casati
1a8ed8642f Use F1AP lib for UL RRC Message Trasfer in stack 2024-09-27 11:22:03 +02:00
Guido Casati
cc0ad07aa0 Add test for F1AP UL RRC Message Transfer enc/dec lib 2024-09-27 11:22:03 +02:00
Guido Casati
b85fd159b8 Add encoding/decoding lib for UL RRC Message Trasfer 2024-09-27 11:22:03 +02:00
Guido Casati
1d0d7e7baf Use F1AP lib for DL RRC Message Transfer in stack 2024-09-27 11:22:03 +02:00
Guido Casati
718269f1eb Add test for F1AP DL RRC Transfer enc/dec messages 2024-09-27 11:22:03 +02:00
Guido Casati
3374327752 Add encoding/decoding lib for F1AP DL RRC Transfer message 2024-09-27 11:22:03 +02:00
Robert Schmidt
57ecb11d53 Use F1AP lib Init UL RRC Msg in stack
Co-authored-by: Guido Casati <hello@guidocasati.com>
2024-09-27 11:22:03 +02:00
Robert Schmidt
ca6eb7bd10 Add message enc&dec for F1AP Initial UL RRC msg, and test
Co-authored-by: Guido Casati <hello@guidocasati.com>
2024-09-27 11:22:03 +02:00
Guido Casati
648ed19544 Use _F1_EQ_CHECK_INT in eq_f1ap_plmn 2024-09-27 11:22:03 +02:00
Guido Casati
11df3c743f Introduce new macros to improve debugging capabilities in F1AP library
* _F1_EQ_CHECK_GENERIC can be used to check the equality of two different members of F1AP structs
  and return `false` if the condition is not met.

When the condition fails, the macros will print a debug message to the standard error stream,
including the function name, line number, and the provided format string and arguments.
2024-09-27 11:22:01 +02:00
Jaroslava Fiedlerova
6b9ddbabd2 Merge remote-tracking branch 'origin/tini-for-arm' into integration_2024_w39 2024-09-27 11:17:07 +02:00
Jaroslava Fiedlerova
e0800d4225 Merge remote-tracking branch 'origin/fix_log2_approx' into integration_2024_w39 2024-09-27 11:16:22 +02:00
Jaroslava Fiedlerova
4093a485ce Merge remote-tracking branch 'origin/nu-ci-colosseum-integration' into integration_2024_w39 2024-09-27 11:16:06 +02:00
Robert Schmidt
28e30d24f7 Remove unused CI StatsFromGenObject() 2024-09-26 16:53:04 +02:00
Robert Schmidt
de2bf7ad8b Remove unused CI CaptureOnDockerNetworks() 2024-09-26 16:53:04 +02:00
Robert Schmidt
b9e56104d8 Remove unused CI code 2024-09-26 16:53:04 +02:00
Robert Schmidt
29383373de Remove unused code 2024-09-26 16:53:04 +02:00
Robert Schmidt
c5f090c23d Remove useless rm log 2024-09-26 16:53:04 +02:00
Robert Schmidt
87d28848dd Remove useless log: we see it in iperf call, and the XML 2024-09-26 16:53:04 +02:00
Bartosz Podrygajlo
65f14490c3 Remove additional unnecessary includes 2024-09-26 15:07:35 +02:00
Bartosz Podrygajlo
23cc049157 Remove unnecessary includes in rfsimulator 2024-09-26 14:59:14 +02:00
Thomas Schlichter
ed7750aba2 fix debug output for DEBUG_DLSCH_MAPPING 2024-09-26 13:21:32 +02:00
arora
8f5327527e Disable UHD unit tests to avoid gcc13 warnings 2024-09-26 11:41:59 +02:00
arora
c1641b66af Bump rhel to gcc13, to avoid gcc12 warnings in openair1 2024-09-26 11:41:45 +02:00
arora
ad74106548 Add E2 SM in the target dockerfiles to use e2 agent in container deployment
- Update builder dockerfiles to build Flexric for E2 SM
- Update target dockerfiles to copy E2 SM
2024-09-26 11:41:18 +02:00
Raghavendra Dinavahi
42ab4b4a0c fix for variable power in PDSCH REs
- correctly scale REs. Some REs have higher power during PDSCH RE-Mapping which is corrected.
	- Closes: Issue 811
2024-09-26 10:31:20 +02:00
Leonardo Bonati
18a5152994 Add Jenkins job for Colosseum testing integration
- Add Jenkinsfile, triggering Colosseum test run
- Add test scripts that interact with Colosseum running
2024-09-26 09:22:34 +02:00
Robert Schmidt
ab27d02e1c Add new F1AP msg enc&dec library
Add a new target f1ap_lib that groups F1AP ASN.1 encoding&decoding for
messages defined f1ap_messages_types.h. The objective is to, for each
F1AP message,
- add encoder&decoder (similar to what already exists, but without
  mandatory message sending afterwards)
- eq_X() function that checks two messages for equality (to be used
  mostly in tests)
- cp_X() function that deep-copies a message, e.g., to be used when
  sending ITTI messages, instead of manual copying done currently
- free_X() function that frees the memory associated to a memory, to
  avoid memory leaks.

Each message will be tested, notably that encoding&decoding as well as
copying yield identical messages.

The actual message encoding & decoding, tests, and their use will be
done in the forthcoming commits.
2024-09-25 17:15:48 +02:00
Robert Schmidt
ba208c0fc2 Group 5G platform types for common 5G-specific types
Co-authored-by: Guido Casati <hello@guidocasati.com>
2024-09-25 16:00:32 +02:00
Robert Schmidt
ea28b9bb5b F1AP: RLC mode: introduce separate type
The currently used type does not cover all possibilities. While we don't
encode&decode them, it might still be good to be able to express it, so
introduce the new type.

Co-authored-by: Guido Casati <hello@guidocasati.com>
2024-09-25 15:56:03 +02:00
Guido Casati
da6b1a4be4 Fixes to SI message struct item in CU messages
* num_SI is the size of the list of gNB-CU System Information messages
* the new struct member is an array, sized after the maximum nb
  of SIB types, which contains the SI container, the container length
  and the SIB type
2024-09-25 15:38:41 +02:00
Robert Schmidt
4b5ea6dcf8 Fix header inclusion: NGAP message types depends on S1AP 2024-09-25 15:38:41 +02:00
Robert Schmidt
c9da5aabff Use primitive type for TEID
teid_t is defined in platfrom_types.h, which defines a bunch of
4G-specific things. In an attempt to decouple from 4G types, do not use
it.
2024-09-25 15:38:41 +02:00
Robert Schmidt
bacf713299 Use char * for DU/CU IP address
The previously used net_ip_address_t type is limited to some bytes, but
the CU name might be longer. Use char * to allow longer DNS names.

Also, this type separates IPv4/v6, which is not necessary, as it is now
handled by the same C API (getaddrinfo()), since !2635.

Co-authored-by: Guido Casati <hello@guidocasati.com>
2024-09-25 15:38:41 +02:00
Guido Casati
deb63888d9 Cleanup of long-time unused F1AP interface management functions 2024-09-25 15:38:41 +02:00
Guido Casati
3554b33f37 Cleanup unused F1AP message transmission and system information files 2024-09-25 15:38:41 +02:00
Raghavendra Dinavahi
114ea60c42 removed nr_slot_fep_init_sync and used nr_slot_fep in UE 2024-09-25 09:50:34 +02:00
Raphael Defosseux
af1158140e fix(docker): making tini download platform specific to support ARM64 native builds
Signed-off-by: Raphael Defosseux <raphael.defosseux@eurecom.fr>
2024-09-24 15:46:05 +02:00
francescomani
e1218f9b3f use n_TimingAdvanceOffset according to what set in the RU for FDD CI test with COTS UE 2024-09-24 10:39:25 +02:00
francescomani
3166f20383 trigger RA DL or UL data arrival during RRC_CONNECTED when UL synchronisation status is non-synchronised 2024-09-24 10:39:25 +02:00
francescomani
e4a6d60dc2 implementation of time alignment timer at MAC UE 2024-09-24 10:39:25 +02:00
francescomani
25b94f12b3 configuration of timeAlignmentTimerCommon at MAC UE 2024-09-24 10:39:25 +02:00
francescomani
2a85d9905e configure TAG list 2024-09-24 10:39:25 +02:00
francescomani
ee4f95fd51 improvements in handling TAG-Id 2024-09-24 10:39:25 +02:00
francescomani
15279d8732 common function for default N_TA_offset (not sure what in develop is correct) 2024-09-24 10:39:25 +02:00
francescomani
a494580210 configuring n_TimingAdvanceOffset from upper layers, if present 2024-09-24 10:39:25 +02:00
francescomani
900a78fd9b preliminary cleanup 2024-09-24 10:20:40 +02:00
Robert Schmidt
ccdabb4c2c Merge branch 'integration_2024_w38b' into 'develop'
Integration: `2024.w38b`

Closes #839

See merge request oai/openairinterface5g!2977

* !2704 nr pdcp: add support for nea1
* !2800 UE improvements
* !2920 Receive SIB19 on nrUE
* !2975 Remove hardcoding of CPU measurements (respect option `-q`)
* !2976 Update latest SIMDE version
* !2957 T: increase max number of args
* !2916 NR UE PUSCH resource mapping optimization
* !2787 CI: increase max number of concurrent workers to 64
* !2974 fhi_72: allow to provide dpdk_mem_size to xran
* !2964 CI: Replacing the UE on Aerial setup
* !2973 CI: remove unused code and files
2024-09-24 08:16:36 +00:00
Thomas Schlichter
1b97cdafcd improve LLR scaling for better performance 2024-09-23 17:58:05 +02:00
Thomas Schlichter
4b679c0793 add test for log2_approx64() 2024-09-23 17:58:05 +02:00
Thomas Schlichter
58a2966499 add test for log2_approx() 2024-09-23 17:58:05 +02:00
Thomas Schlichter
4e09353b43 use SIMDE intrinsic to count leading zeroes and make rounding exact 2024-09-23 17:58:03 +02:00
francescomani
d304865489 fix for log2_approx to approximate to the nearest neighbor, instead of ceil 2024-09-23 17:56:50 +02:00
Jaroslava Fiedlerova
0dae0551eb Merge remote-tracking branch 'origin/ci-remove-unused-code' into integration_2024_w38b 2024-09-23 17:26:14 +02:00
Jaroslava Fiedlerova
11aeba0699 Merge remote-tracking branch 'origin/up2_on_Aerial' into integration_2024_w38b 2024-09-23 16:37:56 +02:00
Jaroslava Fiedlerova
1ada1c2635 Merge remote-tracking branch 'origin/fhi-72-dpdkMemorySize' into integration_2024_w38b 2024-09-23 12:45:13 +02:00
Jaroslava Fiedlerova
015257856d Merge remote-tracking branch 'origin/ci-fix-multi-ue' into integration_2024_w38b 2024-09-23 12:44:48 +02:00
Robert Schmidt
ec2afa22b1 Fix: egrep is obsolescent, use grep -E
See e.g., egrep(1) [https://linux.die.net/man/1/egrep]:

> two variant programs egrep and fgrep are available. egrep is the same
> as grep -E. fgrep is the same as grep -F. Direct invocation as either
> egrep or fgrep is deprecated

See also the rationale of the POSIX description of grep
(https://pubs.opengroup.org/onlinepubs/9699919799/utilities/grep.html):

> This grep has been enhanced in an upwards-compatible way to provide
> the exact functionality of the historical egrep and fgrep commands as
> well. It was the clear intention of the standard developers to
> consolidate the three greps into a single command.

Closes: #839
2024-09-23 12:19:49 +02:00
Robert Schmidt
40bde2ae75 Jenkinsfiles: Print if an XML file is not present 2024-09-23 12:19:49 +02:00
Robert Schmidt
de310c6e82 Remove unused CI Jenkinsfiles
As of now, these seem to be the Jenkinsfiles used on Jenkins

ci-scripts/Jenkinsfile-cluster
ci-scripts/Jenkinsfile-colosseum
ci-scripts/Jenkinsfile-GitLab-Container
ci-scripts/Jenkinsfile-GitLab-COTS-UE-Test
ci-scripts/Jenkinsfile-nrue
ci-scripts/Jenkinsfile-physim-deploy
ci-scripts/Jenkinsfile-push-registry
ci-scripts/Jenkinsfile-tmp-full-ran
ci-scripts/Jenkinsfile-tmp-multi-enb
ci-scripts/Jenkinsfile-tmp-multi-enb-nsa
ci-scripts/Jenkinsfile-tmp-ran

(gather all files in a file, then cat <file> | sort | uniq)

Remove all others.
2024-09-23 12:19:49 +02:00
Robert Schmidt
4a9944bf06 Remove unused OaiCiTest class members 2024-09-23 12:19:49 +02:00
Robert Schmidt
3e2ee3878e Remove unused python files 2024-09-23 12:19:49 +02:00
Robert Schmidt
6147a83f0b Remove unused Perform_X2_Handover XML step: no XML uses this 2024-09-23 12:19:49 +02:00
Robert Schmidt
ec64826fde Remove unused Terminate_OAI_UE XML step: no XML uses this
- Fix Jenkinsfile-tmp-full-ran: python test stage TerminateOAIUE() has been removed
2024-09-23 12:19:38 +02:00
francescomani
196effa114 fix PMI extraction, X1 and X2 order was wrong 2024-09-23 11:54:48 +02:00
Robert Schmidt
68c28a4828 Modify default xran DPDK socket memory/limit to 0
The default values set by xran for DPDK socket memory/limit is 8192. It
is changed when the variable for the memory size, given down to xran, is
non-zero (cf also previous patch). Since the last patch, if nothing is
given in OAI configuration, OAI will pass down a size of 8192. However,
a configuration value of 0 is a valid choice (it is a pre-allocation,
DPDK will allocate dynamically), so modify the default in xran to be 0
so that all sizes, including 0, can be given to DPDK.

Note that the currently used implementation of xran will always try to
allocate this memory on NUMA node 0. If you want to use another one,
this field has to be set to 0 (no pre-allocation), and DPDK will
allocate it dynamically.

Co-authored-by: Sagar Arora <sagar.arora@openairinterface.org>
2024-09-21 07:12:07 +02:00
Robert Schmidt
513f0beb37 Parse xran version strings for Bronze, E, F 2024-09-21 07:12:07 +02:00
Robert Schmidt
645e9dd3cd fhi_72: allow to provide dpdk_mem_size to xran
xran has a mechanism to request DPDK to allocate a configurable amount
of bytes for huge pages. We set it to 0 until now; expose this variable
through configuration, and provide a meaningful default 8192 MiB.
Provide documentation.
2024-09-21 07:12:06 +02:00
francescomani
385999dc5e logging improvements 2024-09-20 18:58:27 +02:00
Robert Schmidt
2932551f2c Update 5G-OTA testbench image: add aerial, fhi72 2024-09-20 18:08:20 +02:00
Reem Bahsoun
e96a7eed20 Replace UE on sphex with up2, improve throughput
- Change XML and YAML to use up2 in aerial pipeline
- Modify gNB config to improve throughput
- Reflect changes in documentation
2024-09-20 18:07:48 +02:00
Jaroslava Fiedlerova
d017afaded Merge remote-tracking branch 'origin/NR_UE_pusch_optimization' into integration_2024_w38b 2024-09-20 16:43:31 +02:00
Jaroslava Fiedlerova
05bb40d7ea Merge remote-tracking branch 'origin/t-tracer-increase-maxargs' into integration_2024_w38b 2024-09-20 16:42:57 +02:00
Jaroslava Fiedlerova
77fe56d38e Merge remote-tracking branch 'origin/simde-update' into integration_2024_w38b 2024-09-20 13:59:15 +02:00
Jaroslava Fiedlerova
63609313d2 Merge remote-tracking branch 'origin/remove-incoherent-set-cpumeas' into integration_2024_w38b 2024-09-20 13:59:00 +02:00
Jaroslava Fiedlerova
b64b2e310d Merge remote-tracking branch 'origin/sib19-ue-reception' into integration_2024_w38b 2024-09-20 13:58:45 +02:00
Jaroslava Fiedlerova
b565eb01e8 Merge remote-tracking branch 'origin/ue-fixes-gnb-testion' into integration_2024_w38b 2024-09-20 13:58:24 +02:00
Jaroslava Fiedlerova
b3d264f29a Merge remote-tracking branch 'origin/nr-pdcp-nea1' into integration_2024_w38b 2024-09-20 13:57:59 +02:00
Roberto Rosca
b6b3cc5197 Refactor SIB scheduling
- refactor nr_fill_nfapi_dl_SIB_pdu to use it on both SIB1 and OtherSI
  - extract tbs related calculations into function get_tbs to avoid duplicates
  - moved OtherSI search space initializations to nr_mac_config_scc
2024-09-20 10:17:39 +03:00
Sakthivel Velumani
321a20ea78 Fix vector mult function for out of bound access 2024-09-19 09:56:25 -04:00
Sakthivel Velumani
a50cb354f4 Simplify map_current_symbol() function 2024-09-19 09:56:25 -04:00
Sakthivel Velumani
e4c37fb3b2 Simplify data in DMRS symbol function
Mapping of data REs in DMRS symbol depends only on number of CDM group
no data. So the special case function that depended on delta is removed
and a single function is used.
2024-09-19 09:56:25 -04:00
Robert Schmidt
952052127a Avoid ubsan error
like this:

  /oai-ran/openair3/SECU/snow3g.c:429:23: runtime error: left shift of 232 by 24 places cannot be represented in type 'int'
2024-09-19 10:47:46 +02:00
Cedric Roux
523d84634a snow3g: add a test program
To use:

    cd <top directory of openair>
    mkdir build
    cd build
    cmake .. -GNinja -DENABLE_TESTS=ON
    ninja tests (alternatively: ninja snow3g_tests)
    ctest (alternatively: ctest -R snow3g_tests)
2024-09-19 10:40:55 +02:00
Laurent THOMAS
c8116b3fa3 remove dead code 2024-09-19 09:29:02 +02:00
Robert Schmidt
06ec6150a1 Update latest SIMDE version
Build on ARM fails in the previous version, while the current master
(1a09d3bc) works. So let's update to a newer version to avoid problems
on ARM, and assuming x86 works.
2024-09-18 19:23:05 +02:00
Raghavendra Dinavahi
dfbedadd5f Use nr_slot_fep for sidelink, removed sl_nr_slot_fep 2024-09-18 17:17:19 +02:00
Laurent THOMAS
31f770978c option q is to set cpu measurements but it is hardcoded in some places 2024-09-18 16:02:14 +02:00
Robert Schmidt
99226fc66c Remove unused Initialize_OAI_UE XML step: no XML uses this 2024-09-18 15:13:13 +02:00
Robert Schmidt
aeb6442f71 Remove unused Build_OAI_UE XML step: no XML uses this 2024-09-18 15:13:13 +02:00
Robert Schmidt
85efd54f3b Remove unused CI Test XML files
As of now, these XMLs seem to be used:

  xml_files/cluster_image_build.xml
  xml_files/container_4g_l2sim_tdd_down.xml
  xml_files/container_4g_l2sim_tdd.xml
  xml_files/container_4g_rfsim_down.xml
  xml_files/container_4g_rfsim_fdd_05MHz_down.xml
  xml_files/container_4g_rfsim_fdd_05MHz_noS1_down.xml
  xml_files/container_4g_rfsim_fdd_05MHz_noS1.xml
  xml_files/container_4g_rfsim_fdd_05MHz.xml
  xml_files/container_4g_rfsim_fdd_10MHz_down.xml
  xml_files/container_4g_rfsim_fdd_10MHz.xml
  xml_files/container_4g_rfsim_fdd_20MHz_down.xml
  xml_files/container_4g_rfsim_fdd_20MHz.xml
  xml_files/container_4g_rfsim_fembms_down.xml
  xml_files/container_4g_rfsim_fembms.xml
  xml_files/container_4g_rfsim_mbms_down.xml
  xml_files/container_4g_rfsim_mbms.xml
  xml_files/container_4g_rfsim.xml
  xml_files/container_5g_e1_rfsim_down.xml
  xml_files/container_5g_e1_rfsim.xml
  xml_files/container_5g_f1_rfsim_down.xml
  xml_files/container_5g_f1_rfsim.xml
  xml_files/container_5g_fdd_rfsim_down.xml
  xml_files/container_5g_fdd_rfsim.xml
  xml_files/container_5g_flexric_rfsim_down.xml
  xml_files/container_5g_flexric_rfsim.xml
  xml_files/container_5g_l2sim_proxy.xml
  xml_files/container_5g_l2sim_tdd_down.xml
  xml_files/container_5g_l2sim_tdd.xml
  xml_files/container_5g_rfsim_24prb_down.xml
  xml_files/container_5g_rfsim_24prb.xml
  xml_files/container_5g_rfsim_2x2_down.xml
  xml_files/container_5g_rfsim_2x2.xml
  xml_files/container_5g_rfsim_down.xml
  xml_files/container_5g_rfsim_f1_accelleran_down.xml
  xml_files/container_5g_rfsim_f1_accelleran.xml
  xml_files/container_5g_rfsim_fdd_phytest_down.xml
  xml_files/container_5g_rfsim_fdd_phytest.xml
  xml_files/container_5g_rfsim_fr2_32prb_down.xml
  xml_files/container_5g_rfsim_fr2_32prb.xml
  xml_files/container_5g_rfsim_ntn_geo_down.xml
  xml_files/container_5g_rfsim_ntn_geo.xml
  xml_files/container_5g_rfsim_sidelink_down.xml
  xml_files/container_5g_rfsim_sidelink.xml
  xml_files/container_5g_rfsim_tdd_dora_down.xml
  xml_files/container_5g_rfsim_tdd_dora.xml
  xml_files/container_5g_rfsim_u0_25prb_down.xml
  xml_files/container_5g_rfsim_u0_25prb.xml
  xml_files/container_5g_rfsim.xml
  xml_files/container_image_build_cross.xml
  xml_files/container_image_build.xml
  xml_files/container_l2sim_proxy.xml
  xml_files/container_lte_b200_fdd_05Mhz_tm1_if4_5.xml
  xml_files/container_lte_b200_fdd_05Mhz_tm1_no_rrc_activity.xml
  xml_files/container_lte_b200_fdd_05Mhz_tm1.xml
  xml_files/container_lte_b200_fdd_10Mhz_tm1_cdrx.xml
  xml_files/container_lte_b200_fdd_10Mhz_tm1_oaiue_cleanup.xml
  xml_files/container_lte_b200_fdd_10Mhz_tm1_oaiue.xml
  xml_files/container_lte_b200_fdd_10Mhz_tm1.xml
  xml_files/container_lte_b200_fdd_20Mhz_tm1.xml
  xml_files/container_lte_b200_fdd_cleanup.xml
  xml_files/container_lte_b200_tdd_05Mhz_tm1_if4_5.xml
  xml_files/container_lte_b200_tdd_05Mhz_tm1.xml
  xml_files/container_lte_b200_tdd_10Mhz_tm1.xml
  xml_files/container_lte_b200_tdd_20Mhz_tm1_default_scheduler.xml
  xml_files/container_lte_b200_tdd_20Mhz_tm1.xml
  xml_files/container_lte_b200_tdd_cleanup.xml
  xml_files/container_lte_n3xx_tdd_2x2_tm1.xml
  xml_files/container_lte_n3xx_tdd_2x2_tm2.xml
  xml_files/container_nsa_b200_quectel.xml
  xml_files/container_nsa_b200_terminate.xml
  xml_files/container_sa_aerial_quectel_cleanup.xml
  xml_files/container_sa_aerial_quectel.xml
  xml_files/container_sa_aw2s_2x2_asue.xml
  xml_files/container_sa_aw2s_asue_cleanup.xml
  xml_files/container_sa_aw2s_asue.xml
  xml_files/container_sa_b200_quectel.xml
  xml_files/container_sa_b200_terminate.xml
  xml_files/container_sa_e1_b200_quectel.xml
  xml_files/container_sa_e1_b200_terminate.xml
  xml_files/container_sa_f1_b200_quectel.xml
  xml_files/container_sa_f1_b200_terminate.xml
  xml_files/container_sa_fhi72_benetel_asue_cleanup.xml
  xml_files/container_sa_fhi72_benetel_asue.xml
  xml_files/container_sa_fhi72_vvdn_up2_cleanup.xml
  xml_files/container_sa_fhi72_vvdn_up2.xml
  xml_files/container_sa_n310_2X2_100MHz_cleanup.xml
  xml_files/container_sa_n310_2X2_100MHz_quectel.xml
  xml_files/container_sa_n310_2X2_60MHz_cleanup.xml
  xml_files/container_sa_n310_2X2_60MHz_quectel.xml
  xml_files/container_sa_n310_nrue_cleanup.xml
  xml_files/container_sa_n310_nrue.xml
  xml_files/container_sa_sc_b200_quectel.xml
  xml_files/container_sa_sc_b200_terminate.xml
  xml_files/cppcheck.xml
  xml_files/fr1_5gc_closure.xml
  xml_files/fr1_5gc_start.xml
  xml_files/fr1_cn5g_basic_deploy.xml
  xml_files/fr1_cn5g_basic_undeploy.xml
  xml_files/fr1_enb_build.xml
  xml_files/fr1_epc_closure.xml
  xml_files/fr1_epc_start.xml
  xml_files/fr1_oai_cn_deploy.xml
  xml_files/fr1_oai_cn_undeploy.xml
  xml_files/gnb_phytest_usrp_run_100_2x2.xml
  xml_files/gnb_phytest_usrp_run_60_2x2.xml
  xml_files/gnb_phytest_usrp_run_60.xml
  xml_files/gnb_phytest_usrp_run.xml
  xml_files/gnb_usrp_build.xml
  xml_files/ldpc_gpu_test.xml
  xml_files/lte_2x2_tm1_quectel.xml
  xml_files/lte_2x2_tm2_quectel.xml
  xml_files/lte_oai_cn_deploy.xml
  xml_files/lte_oai_cn_undeploy.xml
  xml_files/physim_deploy_run.xml
  xml_files/sa_cn5g_20897_closure.xml
  xml_files/sa_cn5g_20897_start.xml
  xml_files/sa_cn5g_closure.xml
  xml_files/sa_cn5g_start.xml
  xml_files/t1_offload_test.xml
  xml_files/t2_offload_dec_nr_ulsim.xml
  xml_files/t2_offload_enc_nr_dlsim.xml

Obtained by going through all RAN pipelines, copying out the XMLs of all
pipelines, then doing

  cat xml.dump | sort | uniq
2024-09-18 15:13:13 +02:00
Laurent THOMAS
7a5da40d0b Improve tracing for DLSCH decoding results
- Better trace DLSCH decoding result
- Rename the decode result variable to separate with later ack/nack
  encode of this decoding result from 3GPP (not trivial true=1 coding)
- Cleanup decodeResult usage
- Remove unused defines

Co-authored-by: Francesco Mani <email@francescomani.it>
2024-09-18 14:40:07 +02:00
Roberto Rosca
8bc2271001 conf parameters added (commented) + schedule sib19 only if parameters present in conf file 2024-09-18 12:17:17 +03:00
Roberto Rosca
a197c0a41a Schedule SIB19 based on scheduling info from SIB1 2024-09-18 12:17:17 +03:00
Roberto Rosca
b9d2f916bc Added scheduling info for sib19 to sib1 2024-09-18 12:17:17 +03:00
Roberto Rosca
d994d537e9 Added sib19 structure with initialization 2024-09-18 12:17:17 +03:00
Robert Schmidt
ba2d7aad18 Merge branch 'integration_2024_w38' into 'develop'
Integration: `2024.w38`

See merge request oai/openairinterface5g!2970

* !2932 Minor: Set correct USRP flags when not transmitting
* !2961 prevent UE to declare RLF in phy-test mode
* !2962 prevent UE to print HARQ processing error log for MSG2
* !2958 Automatic selection of SSB bitmap length
* !2967 bugfix: reject malformed rrcSetupComplete message
* !2947 Add 5G/NR MAC documentation
* !2959 nr rlc: fix standalone tests
2024-09-18 09:00:27 +00:00
Jaroslava Fiedlerova
93a3abaf80 Merge remote-tracking branch 'origin/nr-rlc-fix-standalone-tests' into integration_2024_w38 2024-09-17 21:10:16 +02:00
Bartosz Podrygajlo
771d11a148 dockerized clang-format error detection tool 2024-09-17 13:52:01 +02:00
Roberto Rosca
4c15a04b87 Receive SIB19 on UE 2024-09-17 14:13:11 +03:00
Jaroslava Fiedlerova
dd2ba2235b Merge remote-tracking branch 'origin/add-mac-doc' into integration_2024_w38 2024-09-17 11:32:19 +02:00
Jaroslava Fiedlerova
3ca4f66e05 Merge remote-tracking branch 'origin/bugfix-rrcSetupComplete' into integration_2024_w38 2024-09-17 11:24:40 +02:00
Jaroslava Fiedlerova
ad6e189f8d Merge remote-tracking branch 'origin/issue_836' into integration_2024_w38 2024-09-17 08:40:57 +02:00
Jaroslava Fiedlerova
4b453b9dd8 Merge remote-tracking branch 'origin/NR_UE_MSG2_error' into integration_2024_w38 2024-09-16 14:33:39 +02:00
Jaroslava Fiedlerova
3f6630acbd Merge remote-tracking branch 'origin/no_RLF_phytest' into integration_2024_w38 2024-09-16 14:33:11 +02:00
Jaroslava Fiedlerova
872981f207 Merge remote-tracking branch 'origin/NR_UE_fix_usrp_flag' into integration_2024_w38 2024-09-16 14:32:22 +02:00
Robert Schmidt
93a8bb4032 Clarification on how often we want to make releases 2024-09-16 13:45:13 +02:00
Robert Schmidt
1696d28e0d Add 5G/NR MAC documentation 2024-09-16 10:58:43 +02:00
Robert Schmidt
6a4ceb2921 Print deltaMCS dB information 2024-09-16 09:47:24 +02:00
Cedric Roux
24de83d3cd bugfix: reject malformed rrcSetupComplete message 2024-09-11 16:57:06 +02:00
Jaroslava Fiedlerova
2eff246d64 ci: modification of SA-2x2, 60 MHz TDD testcase conf to use nea1/nia1 2024-09-11 16:25:07 +02:00
Cedric Roux
18f7a702a4 snow3g: provide a faster implementation 2024-09-11 16:25:00 +02:00
Cedric Roux
73ae18dabb nr pdcp: add support for nea1 2024-09-11 16:00:08 +02:00
francescomani
f1c8134d4f prevent UE to declare RLF in phy-test mode 2024-09-11 15:05:49 +02:00
Raphael Defosseux
469d58f989 Merge branch 'integration_2024_w36' into 'develop'
Integration Branch : 2024 Week 36

See merge request oai/openairinterface5g!2956
2024-09-11 11:14:20 +00:00
Sakthivel Velumani
76cec45e80 Set correct USRP flags when not transmitting
Flags are set to INVALID when it is not a UL slot. This is important
when using GPIO to control TRX switch.
2024-09-10 14:41:05 -04:00
francescomani
ece206758a prevent UE to print HARQ processing error log for MSG2 2024-09-10 16:33:59 +02:00
francescomani
b377107273 add missing cast for short bitmap in configuration at gNB and UE 2024-09-09 18:37:56 +02:00
Raphael Defosseux
1691c607cc Merge remote-tracking branch 'origin/fix-nas-ue-memory-leaks' into integration_2024_w36 2024-09-09 12:08:56 +02:00
Raphael Defosseux
fd6cf5aaf7 Merge remote-tracking branch 'origin/pusch-tx-power-workaround' into integration_2024_w36 2024-09-09 12:08:38 +02:00
Cedric Roux
a373a8da6b nr rlc: fix standalone tests
./run_tests.sh was not functional anymore because of the introduction
of AssertFatal() in nr_rlc_entity.c

Including the .h and providing exit_function() solves the problem.
2024-09-09 11:30:59 +02:00
francescomani
e6e0602da0 removing ssb_PositionsInBurs_BitmapPR from config files 2024-09-08 11:40:47 +02:00
francescomani
a14782f1a8 automatic selection of ssb bitmap length 2024-09-08 10:33:37 +02:00
Cedric Roux
de3a214990 T: support up to 19 variables in the T() macro
Some people needed that.

Let's stop to 19 for the time being. It's tricky enough.
We can increase later if needed. (A previous commit
made the tracers to accept up to 32 variables.)
2024-09-06 16:51:34 +02:00
Cedric Roux
9e698bd534 T: cleanup: make shorter lines
80 columns are enough.
2024-09-06 16:51:14 +02:00
Cedric Roux
105eaa607f T: increase max number of args in an event and make the define more private
T_MAX_ARGS was 16 and some people start to use the T machinery with
more than 16 values. So be it. Let tracers be friendly and accept 32.
(More commits to follow for full support.)

Also why is T_MAX_ARGS in T_defs.h when it's only used by event.h?
Hum?
2024-09-06 16:49:12 +02:00
Cedric Roux
1e645c514f T: bugfix: check limits 2024-09-06 16:38:15 +02:00
Raphael Defosseux
4c9c26a307 Merge remote-tracking branch 'origin/yaml-config' into integration_2024_w36 2024-09-06 14:27:06 +02:00
Raphael Defosseux
b86f157c6d Merge remote-tracking branch 'origin/f1-ho-prep' into integration_2024_w36 2024-09-06 14:26:02 +02:00
Raphael Defosseux
5043f6e282 Merge remote-tracking branch 'origin/wip-imscope' into integration_2024_w36 2024-09-06 14:25:04 +02:00
Raphael Defosseux
99d2ad8e1a chore(ci): entitlement folder should be created before copying
Signed-off-by: Raphael Defosseux <raphael.defosseux@eurecom.fr>
2024-09-06 14:24:15 +02:00
Raphael Defosseux
b5ac09de34 Merge remote-tracking branch 'origin/rhsm-oc' into integration_2024_w36 2024-09-06 14:23:18 +02:00
Raphael Defosseux
7a7aaf5d83 Merge remote-tracking branch 'origin/switch-to-rocky9' into integration_2024_w36 2024-09-06 14:22:50 +02:00
Raphael Defosseux
2d675bc3e8 Merge remote-tracking branch 'origin/NR_PHY_common_LLR' into integration_2024_w36 2024-09-06 14:22:32 +02:00
Raphael Defosseux
e2e57a050d Merge remote-tracking branch 'origin/minor-doc-improvements' into integration_2024_w36 2024-09-06 14:22:09 +02:00
Robert Schmidt
ab89324b1e Pretty-print PLMN in F1 Setup Request 2024-09-06 10:20:08 +02:00
Robert Schmidt
5d05078f4e Validate neighbour config when DUs connect 2024-09-06 10:20:08 +02:00
Roberto Louro Magueta
3cfc10ddaa Bugfix: an A3 configuration is for a specific PCI
Co-authored-by: Luis Pereira <lpereira@allbesmart.pt>
2024-09-06 10:20:08 +02:00
Robert Schmidt
d6d7064c0b A3 Event is for a PCI: Rename variable to make this clear 2024-09-06 10:20:08 +02:00
Robert Schmidt
fde10b9203 Use u64 for neighbour nr_cellid: is up to 38 bits 2024-09-06 10:20:08 +02:00
Roberto Magueta
327baf2938 Bugfix: an A3 configuration is for a specific PCI
Co-authored-by: Luis Pereira <lpereira@allbesmart.pt>
2024-09-06 10:20:08 +02:00
Robert Schmidt
b01810a858 Introduce an_release flag: only free UE in RRC+ack if requested by core
The F1AP UE context release procedure can happen in at least two cases:

1. core requested a release of a UE
2. CU requests DU a release of a UE without a core release (e.g.,
   handover)

In case 1., the CU has to fully release the UE in the CU, then ack the
NGAP message from the core, whilst in 2., nothing of that should happen
after the DU acknowledges the F1AP UE context release cmd.
2024-09-06 10:20:08 +02:00
Robert Schmidt
b3d04c1bbf RETURN_IF_INVALID_ASSOC_ID(): use assoc_id directly
In some cases, we don't have the ue_data that is used until this commit.
Make this macro more general by only requiring the assoc_id to check.
2024-09-06 10:20:08 +02:00
Robert Schmidt
1a9df52cf3 Fixup get_drb(): can have up to 32 DRBs 2024-09-06 10:20:08 +02:00
Robert Schmidt
35f7225fb4 Correct cuup_notify_reestablishment() look up errors
cuup_notify_reestablishment() used
  &ue_p->established_drbs[drb_id]
to look up a bearer, which is wrong, because it should be drb_id - 1
as in the top of the loop. Also, it used the dedicated get_drb()
function; harmonize to use only this function.
2024-09-06 10:20:08 +02:00
Robert Schmidt
fe9c0fba2f Refactor DRB filling from E1 response in separate function
Refactor this to allow the reuse of this function for handover later.
2024-09-06 10:20:08 +02:00
Robert Schmidt
e7eb1b1c3b Store DRB UL TEID information at RRC
To be used later in the case of handover.
2024-09-06 10:20:08 +02:00
Robert Schmidt
605dfa0142 Refactor: Store DU's DRB TEID/address through separate function
A follow-up commit refactors the filling of information of DRBs to set
up in a separate function (to be reused for handover later). Hence, we
cannot store the DRB TEID/address in the same functions, because it is
a logically separate step, and might not always be available.
2024-09-06 10:20:08 +02:00
Robert Schmidt
d00ac2031c Correct F1-U TEID variable names, simplify code
In e1_send_bearer_updates(), we send the DL (DU) TEID and address to the
CU-UP. Therefore, correct the variable names to reflect that the F1-U
information pertains to the DU.

Also, move the tunnel info update function f1u_dl_gtp_update() to a more
prominent place, and take the pointer to the struct containing the
"interesting" information.
2024-09-06 10:20:08 +02:00
Robert Schmidt
29d8e3ce3a Remove unused defines and structures 2024-09-06 10:20:08 +02:00
Robert Schmidt
44d427bf7b Rename RRC_BUF_SIZE for 5G to increase size
A maximum RRC buffer size of 1024 might be very small. We should
increase it, but then the 5G RRC_BUF_SIZE does conflict with other
definitions. To make it unique, also rename to NR_RRC_BUF_SIZE.
2024-09-06 10:20:08 +02:00
Robert Schmidt
d2073d924e Remove unused information from PDU session 2024-09-06 10:20:08 +02:00
Robert Schmidt
94258b0fb9 Remove unused fields of DRB 2024-09-06 10:20:08 +02:00
Robert Schmidt
125210fa1e RRC: Correct some logs 2024-09-06 10:20:08 +02:00
Robert Schmidt
e01957e890 Remove RRC status: it is not needed 2024-09-06 10:20:08 +02:00
Robert Schmidt
e63232576e RRC stats: print DU's SSB ARFCN 2024-09-06 10:20:08 +02:00
luis_pereira87
303e724845 Always set firstActive/defaultBWP
Always set the firstActive and defaultBWP in the initial
cellGroupConfig. This is necessary to make the Quectel accept the
handover RRCReconfiguration; it seems that this also works reliably in
normal connection set up, so we can add it.
2024-09-06 10:20:08 +02:00
Robert Schmidt
ea171c75c0 nr_timer: consistently pass by ref, rename to nr_timer_is_active()
Pass consistently the NR_timer_t object through a pointer. Since we have
to modify all occurrences of is_nr_timer_active(), we use that occasion
and rename that function to nr_timer_is_active() to make it consistent
with all other functions, starting with nr_timer.
2024-09-06 10:20:08 +02:00
Robert Schmidt
8d6b6676c5 Reorganize sequence of reestablishment checks
Reorganize the sequence of checks done in reestablishment to make it
more logical:

- check conditions of request (correct C-RNTI)
- check conditions of DU (has MIB/SIB1, MTC)
- check the UE, and from which DU it comes

This will also help to extend it towards reestablishment coming from
different DUs in the case of handover.
2024-09-06 10:20:08 +02:00
Robert Schmidt
31bad32b57 Reestablishment with RRC setup fallback: release old UE if applicable 2024-09-06 10:20:08 +02:00
Robert Schmidt
4e7e8a6fa0 Fix bug: correctly fill LCID in ue context setup resp
Before this bug fix, when using F1, we get this warning:

  Constraint validation failed: LCID: constraint failed (/home/richie/openairinterface5g/cmake_targets/ran_build/build/openair2/F1AP/MESSAGES/F1AP_LCID.c:30)

This is because (1) we don't actually store the LCID, then (2) we did
not put it into the F1 ASN.1 structures. Fix both, to make this warning
disappear.

To actually print the full error message, increase the error buffer
size. Also, for the future, to avoid guessing, print ASN.1 XML when we
encounter a failed constraint validation.
2024-09-06 10:20:08 +02:00
Robert Schmidt
32b2ad259d Harmonize Msg3 PUSCH LOG_A to be only one, demote RA cont res timer 2024-09-06 10:20:08 +02:00
Robert Schmidt
ba0b63fe2f F1AP: Handle SCTP communication lost
It can happen that SCTP communication is simply lost, e.g.

  [SCTP]   SCTP_ASSOC_CHANGE to SCTP_COMM_LOST
  [SCTP]   sctp_recvmsg (fd 104, len -1 ): Connection reset by peer:104

The previous code only handled the SHUTDOWN event, but in abnormal
situations, we should also handle the connection state change and signal
to RRC that the endpoint is dead, which is now implemented.
2024-09-06 10:20:08 +02:00
Robert Schmidt
25430e9b25 Fixup: on SCTP conn event, transmit assoc_id
User of the SCTP module use the assoc_id for connection identification.
The previous code set the assoc_id to -1, so there is no way of telling
which connection broke. Use the assoc_id instead
2024-09-06 10:20:08 +02:00
Robert Schmidt
ec6469d088 F1AP: Remove unnecessary logs 2024-09-06 10:20:08 +02:00
Robert Schmidt
9b7d3351a1 DU: if requested to remove non-existing UE, just ack
The failure mode observed here was that the CU sent a release command
for a UE that the DU does not know. Given, that the outcome of the
release command (no UE) is equal to the current state (no UE), from
the DU point of view, we can safely ack the command.
2024-09-06 10:20:08 +02:00
Robert Schmidt
798a62271c DL RRC message: print log if oldUE unknown 2024-09-06 10:20:08 +02:00
Bartosz Podrygajlo
ca217f8f5b Workaround for PUSCH TX power not applied in PHY
This is a temporary workaround for issue with UE PHY not applying TX power
instructions from MAC. To be reverted once implementation of TX gain control
is finished.
2024-09-06 08:39:54 +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
Bartosz Podrygajlo
e1879c07bc Fix segfault when attempting to use unsupported scope types in nrscope
Do not attempt to copy scope types >= MAX_SCOPE_TYPES in nrscope as it does
not support them at this point.
2024-09-05 15:21:07 +02:00
Bartosz Podrygajlo
8eb9e3d902 Fix pdschRxdataF_comp phy scope data source
pdschRxdataF_comp data source was handled incorrectly. Each symbol entire slot data was copied. This
caused pdschRxdataF_comp to mostly contain zeros. The call to UEscopeCopy was moved from symbol loop
into last symbol processing. In case imscope is used padding and unused REs are not copied to the
sink.

Added checks inside scope functions to ensure correct functionality.
2024-09-05 15:19:37 +02:00
Guido Casati
70dd524e2b Define softmodem bits in a separate header for either C and C++ 2024-09-05 15:19:26 +02:00
Bartosz Podrygajlo
d8bba3124f Add imscope to optional libraries in ./build_oai 2024-09-05 15:19:17 +02:00
Bartosz Podrygajlo
6dcd3ae8c4 Use --imscope flag to enable/disable imscope 2024-09-05 15:19:09 +02:00
Bartosz Podrygajlo
bdc6df8c42 NR UE & gNB imscope.
A new phy scope based on ImGui and ImPlot. This scope uses a different concurrency model than previous
scopes.

The PHY thread writing the data first checks if the data is ready to be written. If its not, nothing is copied.
The GUI thread reads data if available and marks it ready to write. This makes sure that the PHY threads are not
busy copying data that would never be displayed.

Some of the scopes also have a freeze functionality that further limit the amount of data that needs to be copied
from PHY threads. If a scope is "frozen" it still allows the user to explore the data using plots zoom/pan functions
but doesn't cause PHY threads to perform extra writes on the displayed data.

A compile option was added to enable/disable the scope. Use cmake -DENABLE_IMSCOPE=ON to enable the scope.

Update CXX standard to 17; it is required by some libraries (e.g., dear imgui). The oldest gcc version in
use by a distribution supported is Ubuntu 20, which has gcc 9.4 with c++17 support.
2024-09-05 15:19:00 +02:00
Robert Schmidt
419a14a813 Demote log message of ITTI thread creation 2024-09-05 07:41:32 +02:00
Robert Schmidt
aef863591b CI: increase max number of concurrent workers to 64
According to the ThreadPoolExecutor documentation [1], the default
number of maximum workers min(32, os.cpu_count() + 4). The problem is
that we execute many pipelines from nano, on which os.cpu_count()
reports 4, so we can only have up to 8 concurrent workers by default.
This leads to the fact that on pipelines with many UEs (e.g.,
AW2S-AmariUE), we don't ping/iperf on all UEs at the same time.

Fix this by increasing the number of workers to 64. This should be fine,
as there is almost no real work being done in the Workers (only opening
a shell and execute programs such as ping/iperf).

[1] https://docs.python.org/3/library/concurrent.futures.html#threadpoolexecutor
2024-09-04 18:49:54 +02:00
Robert Schmidt
69a84825fb Merge branch 'ci-deploy-restructure' into 'develop'
chore(ci): CI Infrastructure Refactoring: Streamlining Deployment function, Logging, and docker images

See merge request oai/openairinterface5g!2770
2024-09-04 15:53:35 +00:00
Raphael Defosseux
3393ca948b chore(ci): concatenating deploy message into a single row
Signed-off-by: Raphael Defosseux <raphael.defosseux@eurecom.fr>
2024-09-04 15:58:20 +02:00
Bipin Adhikari
e42b2c0389 xml changes for NTN GEO and SIDELINK tests 2024-09-04 15:45:18 +02:00
Bipin
f3033533bb moving module id and node checks to parameter checks 2024-09-04 15:45:18 +02:00
Bipin
db1f2649ee Used Image Info in HTML 2024-09-04 15:45:18 +02:00
Bipin
6053e22684 xml tab formatting cleanup 2024-09-04 15:45:18 +02:00
Bipin Adhikari
3afbf8e39a Patch to resolve MR comments 2024-09-04 15:43:46 +02:00
Bipin Adhikari
9890896b9c patch for Iperf2_Unidir ci_infra %currenthost% 2024-09-04 15:43:46 +02:00
Bipin Adhikari
dad8edb448 Improved UndeployObject cohesion
- Introduced additional helper functions: CopyinContainerLog, GetRunningServices, CheckLogs.
2024-09-04 15:43:46 +02:00
Bipin Adhikari
bc950aaaec Improved DeployObject cohesion
- Introduced helper functions: GetCredentials, GetContainerName, GetImageInfo, GetContainerHealth, ReTagImages, DeployServices.
2024-09-04 15:43:46 +02:00
Bipin Adhikari
ab1564aa1c All log files are now stored in scenario-specific folders in python executor 2024-09-04 15:43:46 +02:00
Bipin Adhikari
f99552419e Use DeployObject/UndeployObject for pipelines using DeployGenObject/UndeployGenObject
XML file changed accordingly
2024-09-04 15:43:46 +02:00
Bipin Adhikari
44d0c88863 Seperated Create_Workspace as a seperate XML task
Create_Workspace is used used in XML files instead of directly being
executed in DeployObject(). This can be problematic if we deploy
multiple services on the same host, since a previous workspace will be
deleted. Also, it removes futile git clones.

There are other XML steps (CppCheckAnalysis, LicenceAndFormattingCheck,
BuildImage, BuildProxy, BuildClusterImage) that implicitly called
Create_Workspace. Those calls have been removed and care has been taken
to insert the corresponding Create_Workspace steps in the XML.
2024-09-04 15:43:46 +02:00
Bipin Adhikari
150a00bd23 support for %%currenthost%% host names for modules in ci_infra
It can be set using nodes and svr_node tags in xml files
2024-09-04 15:38:51 +02:00
Bipin Adhikari
5a49dd9afa aligning all test docker-compose files for image tagging 2024-09-04 15:38:51 +02:00
Bipin Adhikari
ea123a2ac0 Use new SSH class for Deploy_Object 2024-09-04 15:38:51 +02:00
Raphael Defosseux
ee4b193877 chore(ci): removing the workspace creation for the LicenceAndFormattingCheck method
Signed-off-by: Raphael Defosseux <raphael.defosseux@eurecom.fr>
2024-09-04 12:47:46 +02:00
Guido Casati
dbe5c5ee61 Minor additions to UnitTests.md 2024-09-03 09:51:29 +02:00
Guido Casati
5764422342 Section about connecting to an NG-Core in NR_SA_Tutorial_OAI_nrUE.md 2024-09-03 09:51:29 +02:00
Guido Casati
9102e10747 Updated F1-design.md
* restructured the documentation
* add details from specs
* add tables and Mermaid diagrams whenever possible
2024-09-03 09:51:23 +02:00
Sakthivel Velumani
28b2de5ac9 Add comments to the new RE mapping functions
Use the new struct as function argument instead of individual parameters
2024-09-03 09:21:29 +02:00
Sakthivel Velumani
f5d22ab85a Gracefully exit PUSCH proc if encoding fails 2024-09-03 09:21:29 +02:00
Sakthivel Velumani
26b3fcca3b Remove SIMD operation for DMRS amplitude scaling
There was concern that someone in the future might call the function
with the wrong inputs. So, based on the discussion on the MR below
https://gitlab.eurecom.fr/oai/openairinterface5g/-/merge_requests/2916#note_132506
the SIMD for multiplying DMRS vector with amplitude is removed and is
now done with plain C (no SIMD).

The execution time for the function dmrs_amp_mult() in this commit is
10x higher that the previous commit.
2024-09-03 09:21:29 +02:00
Sakthivel Velumani
393363e253 Refactor PUSCH RE mapping
RE mapping time is reduced by 10x. Functions are made generic to be
later reused for PDSCH RE mapping at gNB.
2024-09-03 09:21:29 +02:00
Sakthivel Velumani
add341e2f1 multi dmrs amp by vector 2024-09-03 09:18:26 +02:00
Sakthivel Velumani
2b7e0a0519 Change loop order to maximize cache hit
It is better to write to memory that are grouped together to reduce
probability of cache miss. This simple change improved the function's
execution speed by 70%.

Removed the unnecessary memset for the buffer.
2024-09-03 09:18:26 +02:00
Sakthivel Velumani
9c8bdd6db5 Add PUSCH timing stats 2024-09-03 09:18:26 +02:00
arora
01ec929ddb Removing rhsm certificates, not needed. 2024-09-02 18:17:04 +02:00
francescomani
db098651b0 improvements in nr_dlsch_llr function 2024-09-02 17:28:44 +02:00
francescomani
2991370169 32byte aligned DLSCH RX symbol size 2024-09-02 17:28:44 +02:00
francescomani
cda82edf78 adapt LLR unit test to a generic UL/DL scenario 2024-09-02 17:28:44 +02:00
francescomani
98a8e5dca3 use common LLR functions at UE for DLSCH 2024-09-02 17:12:43 +02:00
francescomani
aeb562756a moving LLR functions to phy_common 2024-09-02 17:12:43 +02:00
francescomani
ec40b34b1d initial cleanup 2024-09-02 17:12:43 +02:00
Robert Schmidt
9126e3dda8 Merge branch 'integration_2024_w35' into 'develop'
Integration: `2024.w35`

Closes #825

See merge request oai/openairinterface5g!2943

* !2181 ULSCH power computation
* !2915 benchmark for rotate_cpx_vector
* !2936 Avoid complete rebuild on cmake run with git info change
* !2855 NR UE replace phy_config_request_sent
* !2937 small fixes for rfsim
* !2925 CI: Increase tested throughput in SA 2x2 pipeline
* !2934 Run optimized parity check in ldpc encoder only on supported Zc values
* !2912 changes for multi-RU support in fhi72
* !2928 Distribution check: check for F40, remove old U/RHEL releases
* !2913 NR gNB cleanup
* !2927 Update Aerial docs to reference current version
* !2940 remove double define with nr_common.h
2024-09-02 13:26:45 +00:00
Robert Schmidt
d97249d2cf Merge remote-tracking branch 'origin/refactor_rm_double_define' into integration_2024_w35 2024-09-02 11:48:30 +02:00
Robert Schmidt
9924d9d77f Merge remote-tracking branch 'origin/update_aerial_docs' into integration_2024_w35 2024-09-02 11:48:22 +02:00
Robert Schmidt
450346c7dc Merge remote-tracking branch 'origin/NR_gNB_cleanup' into integration_2024_w35 2024-09-02 10:31:57 +02:00
Robert Schmidt
fa7040f3c5 Merge remote-tracking branch 'origin/build-update-distribution-check' into integration_2024_w35 2024-09-01 19:54:22 +02:00
Robert Schmidt
574c4df949 Merge remote-tracking branch 'origin/oaioran_multi_ru' into integration_2024_w35 2024-09-01 19:51:01 +02:00
Robert Schmidt
aab4698fcf Merge remote-tracking branch 'origin/fix-ldpc' into integration_2024_w35 2024-09-01 19:50:41 +02:00
Robert Schmidt
cbcc552643 Merge remote-tracking branch 'origin/ci-increase-test-bitrate' into integration_2024_w35 2024-08-30 17:46:00 +02:00
Robert Schmidt
6b3529b29b Merge remote-tracking branch 'origin/small-fixes-rfsim' into integration_2024_w35 2024-08-30 17:45:24 +02:00
Robert Schmidt
af9f422a84 Merge remote-tracking branch 'origin/NR_UE_MAC_PHY_separation_improvements' into integration_2024_w35 2024-08-30 17:45:18 +02:00
Robert Schmidt
67da31a8b6 Add CentOS stream support, remove CentOS 7+8 and RHEL7
At least in Eurecom, there are no RHEL 7/CentOS 7+8 servers. Existing
installations will work, but we don't want to encourage people to use
these old distributions, so remove it. Also, they reached EOL

Add CentOS stream as an alternative.
2024-08-30 16:25:06 +02:00
Robert Schmidt
140efe0ec0 Merge remote-tracking branch 'origin/fix-excessive-rebuilds' into integration_2024_w35 2024-08-30 16:18:23 +02:00
Robert Schmidt
fdd2994620 Merge remote-tracking branch 'origin/rotate-cpx-vector-benchmark' into integration_2024_w35 2024-08-30 16:18:10 +02:00
Robert Schmidt
468ba05441 Merge remote-tracking branch 'origin/develop-ul-power' into integration_2024_w35 2024-08-30 16:18:03 +02:00
Robert Schmidt
72f7d0409c OCRegistry: do not add /
In the past, it seemed that we had to add a trailing slash (/) after the
OpenShift Registry URI. Now, at least on the CI machine matix, this
makes it fail:

    INFO: oc whoami -t | docker login -u oaicicd --password-stdin default-route-openshift-image-registry.apps.oai.cs.eurecom.fr/
    INFO: docker pull default-route-openshift-image-registry.apps.oai.cs.eurecom.fr/oaicicd-ran/oai-gnb:develop-46a1d2a6
    WARNING: command "docker pull default-route-openshift-image-registry.apps.oai.cs.eurecom.fr/oaicicd-ran/oai-gnb:develop-46a1d2a6" returned non-zero returncode 1: output:
    Error response from daemon: Head "https://default-route-openshift-image-registry.apps.oai.cs.eurecom.fr/v2/oaicicd-ran/oai-gnb/manifests/develop-46a1d2a6": unauthorized: authentication required

Remove the trailing slash makes it work, like so:

    INFO: oc whoami -t | docker login -u oaicicd --password-stdin default-route-openshift-image-registry.apps.oai.cs.eurecom.fr
    INFO: docker pull default-route-openshift-image-registry.apps.oai.cs.eurecom.fr/oaicicd-ran/oai-gnb:develop-46a1d2a6

The docker pull succeeds.
2024-08-30 16:14:41 +02:00
Guido Casati
47833b1aeb Free NAS PDU buffer in NAS task, which has ownership 2024-08-30 15:04:08 +02:00
Guido Casati
0265607a95 Fix memory leaks in NAS generatePduSessionEstablishRequest
>Direct leak of 7 byte(s) in 1 object(s) allocated from:
    >0 0x7ffff74b4887 in __interceptor_malloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:145
    >1 0x55555819ab3c in generatePduSessionEstablishRequest /home/guido/repo/openairinterface5g/fix-ue-memory-leaks/openair3/NAS/NR_UE/nr_nas_msg_sim.c:938
    >2 0x5555581a8a9f in nas_nrue /home/guido/repo/openairinterface5g/fix-ue-memory-leaks/openair3/NAS/NR_UE/nr_nas_msg_sim.c:1295
    >3 0x5555581a3078 in nas_nrue_task /home/guido/repo/openairinterface5g/fix-ue-memory-leaks/openair3/NAS/NR_UE/nr_nas_msg_sim.c:1215
    >4 0x7ffff5e94ac2 in start_thread nptl/pthread_create.c:442

> Direct leak of 4 byte(s) in 1 object(s) allocated from:
    >0 0x7ffff74b4a57 in __interceptor_calloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:154
    >1 0x55555819c025 in generatePduSessionEstablishRequest /home/guido/repo/openairinterface5g/fix-ue-memory-leaks/openair3/NAS/NR_UE/nr_nas_msg_sim.c:993
    >2 0x5555581a8a9f in nas_nrue /home/guido/repo/openairinterface5g/fix-ue-memory-leaks/openair3/NAS/NR_UE/nr_nas_msg_sim.c:1295
    >3 0x5555581a3078 in nas_nrue_task /home/guido/repo/openairinterface5g/fix-ue-memory-leaks/openair3/NAS/NR_UE/nr_nas_msg_sim.c:1215
    >4 0x7ffff5e94ac2 in start_thread nptl/pthread_create.c:442

> Direct leak of 1 byte(s) in 1 object(s) allocated from:
    >0 0x7ffff74b4a57 in __interceptor_calloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:154
    >1 0x55555819c8f7 in generatePduSessionEstablishRequest /home/guido/repo/openairinterface5g/fix-ue-memory-leaks/openair3/NAS/NR_UE/nr_nas_msg_sim.c:987
    >2 0x5555581a9b75 in nas_nrue /home/guido/repo/openairinterface5g/fix-ue-memory-leaks/openair3/NAS/NR_UE/nr_nas_msg_sim.c:1299
    >3 0x5555581a414e in nas_nrue_task /home/guido/repo/openairinterface5g/fix-ue-memory-leaks/openair3/NAS/NR_UE/nr_nas_msg_sim.c:1219
    >4 0x7ffff5e94ac2 in start_thread nptl/pthread_create.c:442
2024-08-30 15:03:15 +02:00
Guido Casati
8e9f6385cc Fix memory leak in generateAuthenticationResp
> Direct leak of 16 byte(s) in 1 object(s) allocated from:
    >0 0x7ffff74b4a57 in __interceptor_calloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:154
    >1 0x55555818ef1c in generateAuthenticationResp /home/guido/repo/openairinterface5g/fix-ue-memory-leaks/openair3/NAS/NR_UE/nr_nas_msg_sim.c:588
    >2 0x5555581b0fca in nas_nrue /home/guido/repo/openairinterface5g/fix-ue-memory-leaks/openair3/NAS/NR_UE/nr_nas_msg_sim.c:1405
    >3 0x5555581a3069 in nas_nrue_task /home/guido/repo/openairinterface5g/fix-ue-memory-leaks/openair3/NAS/NR_UE/nr_nas_msg_sim.c:1213
    >4 0x7ffff5e94ac2 in start_thread nptl/pthread_create.c:442
2024-08-30 14:57:45 +02:00
Guido Casati
0ef6153bb9 Fix memory leak of NAS buffer transfered to RRC with NAS_UPLINK_DATA_REQ
* Data buffer for NAS Registration Complete and Authentication Response is malloced in
  the NAS thread and transfered with ITTI message to RRC, where needs to be freed

Direct leak of 24 byte(s) in 1 object(s) allocated from:
    >0 0x7ffff74b4887 in __interceptor_malloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:145
    >1 0x5555572b0607 in generateAuthenticationResp /repo/openairinterface5g/develop/openair3/NAS/NR_UE/nr_nas_msg_sim.c:608
    >2 0x5555572b0607 in nas_nrue /repo/openairinterface5g/develop/openair3/NAS/NR_UE/nr_nas_msg_sim.c:1402
    >3 0x5555572baef6 in nas_nrue_task /repo/openairinterface5g/develop/openair3/NAS/NR_UE/nr_nas_msg_sim.c:1198
    >4 0x7ffff5e94ac2 in start_thread nptl/pthread_create.c:442

Direct leak of 10 byte(s) in 1 object(s) allocated from:
    >0 0x7ffff74b4887 in __interceptor_malloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:145
    >1 0x55555729754e in generateRegistrationComplete /repo/openairinterface5g/develop/openair3/NAS/NR_UE/nr_nas_msg_sim.c:782
    >2 0x555557299ad3 in handle_registration_accept /repo/openairinterface5g/develop/openair3/NAS/NR_UE/nr_nas_msg_sim.c:1212
    >3 0x5555572b06a0 in nas_nrue /repo/openairinterface5g/develop/openair3/NAS/NR_UE/nr_nas_msg_sim.c:1411
    >4 0x5555572baef6 in nas_nrue_task /repo/openairinterface5g/develop/openair3/NAS/NR_UE/nr_nas_msg_sim.c:1198
    >5 0x7ffff5e94ac2 in start_thread nptl/pthread_create.c:442
2024-08-30 14:51:54 +02:00
Matthias Mehlhose
d055cc0004 remove double define with nr_common.h 2024-08-30 11:49:12 +00:00
francescomani
01ae8fbb38 prach code cleanup 2024-08-29 15:52:46 +02:00
francescomani
dc5df35fe1 remove a couple of global variables from pusch_vars and some further cleanup 2024-08-29 15:52:42 +02:00
francescomani
1a04ebaa02 cleanup of gNB PHY procedures and removal of global PBCH structure 2024-08-29 15:36:16 +02:00
Cedric Roux
532aa1a904 rfsim: print error if write fails
Some strange behavior may happen if write() to the rfsim socket fails.
Let's print some error, can be useful in case of problem.
2024-08-29 15:06:29 +02:00
Cedric Roux
42539b0bec rfsim: add a check on 'sock'
It is very possible that the operating system returns a file
descriptor bigger than the size of bridge->buf (MAX_FD_RFSIMU, which
is 250 as of now). As a minimum, let's fail if the socket file
descriptor is out of bounds.

A proper solution may be implemented later, if needed.
2024-08-29 14:59:51 +02:00
Rúben Soares Silva
94050d5ec1 Update Aerial docs to reference current version
Updated links to latest available L1 documentation
Removal of unneeded environment variable in aerial_l1_entrypoint.sh
Removal of unneeded checkout command from doc
Reword Aerial Entrypoint script paragraph to separate in multiple sentences
New UE has been tested with Aerial setup
Change bash blocks to reflect that cuBB container no longer uses root
Add alternative instructions to obtain nvipc sources from container
Add note in Prepare the L1 image section specifying default config file and location

Co-Authored by: Reem Bahsoun <reem.bahsoun@openairinterface.org>
2024-08-29 13:15:53 +01:00
Raphael Defosseux
1793e7e56d fix(docker): aligning all rockylinux-9 Dockerfiles with the RHEL9 ones
Signed-off-by: Raphael Defosseux <raphael.defosseux@eurecom.fr>
2024-08-29 11:14:50 +02:00
francescomani
d04a83ea93 defs_gNB cleanup 2024-08-29 08:54:42 +02:00
luis_pereira87
8172da04c8 CI: Set max_rxgain to 75 (max value for N310) in SA 2x2 pipeline 2024-08-28 21:09:37 +01:00
Bartosz Podrygajlo
97dfa90cf2 Add two ldpc testcases for checking small block sizes
Added 2 testcases for Zc = 64 for ldpc encoder. These testcases check optimized ldpc
implementation against reference.
2024-08-28 17:48:42 +02:00
francescomani
c93dcc0484 cleanup of encode_parity_check_part_optim including asserting for case not handled 2024-08-28 17:40:26 +02:00
Bartosz Podrygajlo
732555ddc3 Run optimized parity check in ldpc encoder only on supported Zc values
Optimized ldpc encoder was run for Zc values that are not supported (Zc == 64). This
commit fixes the fallback condition to Zc >= 72 for BG 2
2024-08-28 17:40:19 +02:00
Jaroslava Fiedlerova
24c01d8fda CI: Increase tested DL bitrate in SA 2x2 pipeline 2024-08-28 16:33:24 +02:00
Jaroslava Fiedlerova
4684666430 CI: Increase tested UL bitrate in SA 2x2 pipeline 2024-08-28 16:33:24 +02:00
Robert Schmidt
8bffd1666d Avoid complete rebuild on cmake run with git info change
Before this commit, the following will trigger a complete rebuild:

- create another git name (git checkout -b test)
- run cmake again manually (cmake ..)
- run ninja again

The top-level CMakeLists.txt uses add_definitions() to add git
information to all targets; if some git information changes, this will
mark all command lines as dirty, triggering the build.

There is an easy solution: instead of passing this information on the
command line, pass it in a header. This commit uses configure_file() to
generate a file oai_version.h in the build directory with the same
information. Various sources files, e.g., main executables, use this to
output the same information as before. It is then also not necessary to
use header guards, as cmake takes care to create this file.

If cmake is re-run, it will update the header, and trigger only files
including this header will be rebuilt (which can be shown with the above
stpes). The information passed is the same as before, and updates the
information when the old method would have updated it.
2024-08-28 15:57:24 +02:00
Robert Schmidt
49688f8478 Remove unused PACKAGE_BUGREPORT, initialize FIRMWARE_VERSION with sensible default 2024-08-28 15:25:00 +02:00
Bartosz Podrygajlo
0883904891 Introduce benchmark test for rotate_cpx_vector
This commit introduces google benchmark library and one benchmark for
rotate_cpx_vector.  Also extracted common tools used in testcases for
generation and allocation of byte aligned vectors in phy_test_tools.hpp
2024-08-28 15:08:44 +02:00
rmagueta
a3b753d8cb ULSCH power computation in a different way 2024-08-28 11:50:25 +01:00
Robert Schmidt
46a1d2a621 Merge branch 'integration_2024_w34' into 'develop'
Integration: `2024.w34`

See merge request oai/openairinterface5g!2923

* !2906 mod: Improve signal processing speed of rotate_cpx_vector function
* !2909 NR UE SIB1 free fix
* !2917 Cleanup NR UE NAS instance handling
* !2924 Fix misalignment issues in TLVEncoder macros ENCODE_U16, ENCODE_U24
* !2907 CI: add new testcases to RFSim-5G pipeline, reduce ping and iperf test time
* !2893 LEO satellite delay and Doppler simulation and adjusted NR_UE time sync
2024-08-28 07:16:57 +00:00
Robert Schmidt
85f194b5c7 Add documentation and sample config for FHI 7.2 multi-RU operation
Co-authored-by: Raymond Knopp <raymond.knopp@eurecom.fr>
2024-08-27 15:40:15 +02:00
Raymond Knopp
7e18293c70 Changes for multi-RU support in fhi72
Co-authored-by: Robert Schmidt <robert.schmidt@openairinterface.org>
2024-08-27 15:40:15 +02:00
Robert Schmidt
574363c515 Correct order of PCI addresses in O-RAN 7.2 tutorial
The correct order for xran seems to be first Uplane, then C plane. In
the past, we used to switch (for reasons I don't know), but let's
reverse it to the proper order.
2024-08-27 15:40:15 +02:00
Robert Schmidt
68b29301b0 Merge remote-tracking branch 'origin/ntn_leo_time_comp' into integration_2024_w34 2024-08-27 14:30:15 +02:00
Robert Schmidt
922e810a82 Merge remote-tracking branch 'origin/ci-rfsim-optimize' into integration_2024_w34 2024-08-27 14:30:05 +02:00
Robert Schmidt
957073325e Merge remote-tracking branch 'origin/TLV_Encoder_Fixes' into integration_2024_w34 2024-08-27 14:29:57 +02:00
Robert Schmidt
adc88d3d87 Merge remote-tracking branch 'origin/nr-ue-nas-cleanup' into integration_2024_w34 2024-08-27 14:29:32 +02:00
Robert Schmidt
020662f95a Merge remote-tracking branch 'origin/NR_UE_RRC_SIB1_fix' into integration_2024_w34 2024-08-27 14:29:24 +02:00
Robert Schmidt
baf02b8d1e Merge remote-tracking branch 'origin/speedup_rotate_cpx_vector' into integration_2024_w34 2024-08-27 14:29:12 +02:00
Guido Casati
031622b1a3 Review of CL options section in RUNMODEM
* place all NR UE CL optional options in the same section, in a table
* add a section for common CL options
* add subsection for UE capabilities
* removed redundant text
2024-08-27 10:04:15 +02:00
Jaroslava Fiedlerova
370062c04c CI: Add sidelink test to RF-Sim 5G 2024-08-26 17:08:27 +02:00
Jaroslava Fiedlerova
fad450cbe3 Skip UE Log Analysis During Sidelink Testing
Bypass UE log analysis when testing sidelink, as it fails due to the absence
of expected information and patterns (not present in sidelink communication).
Instead, a custom command is used to verify the success of sidelink tests by
checking for the presence of "PSBCH RX:OK" in the log of the second UE.
2024-08-26 17:08:27 +02:00
Jaroslava Fiedlerova
1960516554 CI: Add NTN GEO testcase to RF-Sim 5G 2024-08-26 17:08:27 +02:00
Jaroslava Fiedlerova
c49ed17c57 CI: Modify rfsim5g 2x2 testcase to use 100 MHz bandwidth 2024-08-26 17:08:27 +02:00
Jaroslava Fiedlerova
7293741a99 CI: Reduce iperf time in RF-Sim 5G 2024-08-26 17:08:27 +02:00
Jaroslava Fiedlerova
d9648ae6b2 CI: Reduce ping time in rfsim 5G 2024-08-26 17:08:27 +02:00
Thomas Schlichter
4b859a2eb8 fix sidelink UE issues found by sanitizer 2024-08-26 17:08:27 +02:00
Robert Schmidt
867a06b302 Distribution check: Remove EOL Ubuntu releases
See also https://ubuntu.com/about/release-cycle
2024-08-26 11:02:43 +02:00
Robert Schmidt
382de78c66 Distribution check: update to current Fedora 40
Closes: #825
2024-08-26 11:02:30 +02:00
Guido Casati
9e6435758a Wrap multi-statement macros ENCODE_U8() and ENCODE_U32() in do { ... } while (0) statements 2024-08-26 10:13:18 +02:00
francescomani
db4d8d2322 fix handling of time start position in SRS FAPI at gNB 2024-08-23 16:36:12 +02:00
Thomas Schlichter
b17b44dffb add description how to run a LEO satellite rfsimulation to RUNMODEM.md 2024-08-23 14:57:48 +02:00
Thomas Schlichter
ede6775ac3 fix for compilers that don't support the CMPLX() macro 2024-08-23 14:57:48 +02:00
Thomas Schlichter
0eb409f114 NR_UE: Perform autonomous timing advance to compensate for fast time drift with relatively large RTT
As we don't have SIB19 with continuously updated ta-Common and ta-CommonDrift values yet, the UE can only adapt it's UL timing according to it's DL drift.
This is required for the UE to keep UL sync with fast time drift and relatively long RTT (e.g. LEO satellite).
We should replace this with the standard compliant way as soon as we have SIB19 with continuously updated contents.
2024-08-23 14:57:48 +02:00
Guido Casati
bac4f798f9 Fix misalignment issues in TLVEncoder macros ENCODE_U16, ENCODE_U24
This commit resolves undefined behaviour runtime errors related
to misaligned memory access. E.g.

> openair3/NAS/COMMON/IES/FGSMobileIdentity.c:193:3:
> runtime error: store to misaligned address 0x608000021e2b for type 'uint16_t',
> which requires 2 byte alignment 0x608000021e2b: note: pointer points here 00 f1 ...

* ENCODE_U24: safely encode 24-bit values into a buffer
  by using memcpy to copy 3 bytes in network byte order (big-endian).
* ENCODE_U16: safely encodes a 16-bit value into a buffer, handling
  misalignment by memcpy 2 bytes to buffer in network byte order (big-endian).
2024-08-23 11:34:44 +02:00
Bartosz Podrygajlo
50f8f3de58 Fix formatting in nr_nas_msg_sim.c 2024-08-23 10:45:45 +02:00
Bartosz Podrygajlo
4f12a25ebd Cleanup NR UE NAS instance handling
- Save nas instance id in nr_ue_nas_t and use that for instance determination.
 - Use correct field in itti message (destinationInstance instead of originInstance) to determine instance
 - Make sure both destinationInstance and originInstance fields are correct in NAS interface functions.
2024-08-23 10:45:36 +02:00
Thomas Schlichter
e662721310 NR_UE: make NTN parameter ta_CommonDrift_r17 configurable via command line parameter --ntn-ta-commondrift
While we don't have SIB19 support yet, UE gets this parameter from command line, just like --ntn-koffset and --ntn-ta-common.
We use this value to initialize the UE's time-tracking PI controller accumulator.
This allows to correctly track the time even if the delay is changing significantly (e.g. due to LEO satellite movement).
We also use it to compensate for the time drift that happenes while performing the initial sync.
2024-08-23 10:26:18 +02:00
Thomas Schlichter
fc4310cda7 fix multi-statement marco asn1cCallocOne() 2024-08-23 10:26:18 +02:00
Thomas Schlichter
4039473a70 NR_UE: add PI controller to time sync
this allows to compensate larger continuous time drift in DL (e.g. large Doppler from LEO satellite)
2024-08-23 10:26:18 +02:00
Thomas Schlichter
8ab7f1dd68 change returned value of UE_dl_preprocessing() in case no sampleShift change from 0 to INT_MAX
This now allows to indicate "there was a new sampleShift calculation, and the actual value is 0"
additionally to "there was no new sampleShift calculation".
2024-08-23 10:25:00 +02:00
Thomas Schlichter
cfb6ed4d82 add example configuration using transparent LEO satellite model for rfsimulator 2024-08-20 16:46:25 +02:00
Thomas Schlichter
6a8edaf317 rfsimulator: add delay and Doppler simulation for circular orbit and add according channel models SAT_LEO_TRANS and SAT_LEO_REGEN
Delay and Doppler computation is done as in Matlab function dopplerShiftCircularOrbit:
https://de.mathworks.com/help/satcom/ref/dopplershiftcircularorbit.html
2024-08-20 16:46:25 +02:00
Thomas Schlichter
68b07d542c rfsimulator: correctly set center frequency 2024-08-20 16:46:25 +02:00
Cédric Roux
2ec8fefbe8 Merge branch 'integration_2024_w33' into 'develop'
Integration: `2024.w33`

See merge request oai/openairinterface5g!2911

- !2784 Reworking beam structures at NR MAC gNB
- !2889 Fix delta for PUSCH DMRS type 2 
- !2908 NR MAC UE CSI improvements
- !2896 Fix for llr functions reading/writing outside buffers
- !2902 nr rlc: reduce "SDU rejected" logging
- !2884 NR UE: Cleanup global variables used for command line parameter storage
- !2910 NR gNB DMRS symbol race
- CI: Update phytest-timing test threshold
2024-08-20 13:11:25 +00:00
Guido Casati
21de8666d3 Updated Wireshark documentation 2024-08-19 17:06:03 +02:00
Jaroslava Fiedlerova
736c0fd37f CI: Update phytest-timing test threshold 2024-08-19 12:27:58 +02:00
Jaroslava Fiedlerova
2fa341ba59 Merge remote-tracking branch 'origin/NR_gNB_dmrs_symbol_race' into integration_2024_w33 2024-08-16 18:55:26 +02:00
Jaroslava Fiedlerova
6529863af2 Merge remote-tracking branch 'origin/ue-cleanup-2' into integration_2024_w33 2024-08-16 18:54:59 +02:00
Guido Casati
94d59d5153 Fix link in documentation 2024-08-16 17:02:52 +02:00
Jaroslava Fiedlerova
33fa06d0a5 Merge remote-tracking branch 'origin/nr-rlc-less-logging' into integration_2024_w33 2024-08-16 16:16:53 +02:00
Jaroslava Fiedlerova
ba70d91ba4 Merge remote-tracking branch 'origin/fix-llr-segfault' into integration_2024_w33 2024-08-16 16:16:07 +02:00
Jaroslava Fiedlerova
e5297febe4 Merge remote-tracking branch 'origin/NR_UE_CSI_measurements_size' into integration_2024_w33 2024-08-16 14:04:42 +02:00
Jaroslava Fiedlerova
1c8e4c364e Merge remote-tracking branch 'origin/fix_delta_ulsch_channel_estimation' into integration_2024_w33 2024-08-16 14:04:13 +02:00
francescomani
c87b390501 code formatting 2024-08-16 10:20:47 +02:00
francescomani
2039a4f25b making global dmrs_symbol in pusch_vars local to avoid race conditions 2024-08-16 10:18:18 +02:00
Bartosz Podrygajlo
94e6cdb2bf Duplicate the testcase for llr with avx 256-bit vector instructions disabled.
This creates another test executable for llr with the same testcases but compiled without avx 256-bit
vector instructions.
2024-08-15 13:04:05 +02:00
Bartosz Podrygajlo
bbd6f35a6f Fix for nr_ulsch_16/64/256qam_llr reading/writing past buffer size on x86 and ARM.
This fixes out-of-bounds access: nr_ulsch_16qam_llr, nr_ulsch_64qam_llr and nr_ulsch_256qam_llr.
For 256qam this also fixes incorrect llr calculation on arm: the existing AVX code for 2 REs
case produced results not in line with the rest of the code. A testcase check_2_res_256_qam was
added to visualise the differences which can later be used to revive AVX acceleration for 2REs case.
2024-08-15 12:58:23 +02:00
francescomani
5effa74067 set FAPI CSI type as TRS when necessary in UE MAC 2024-08-15 08:24:22 +02:00
francescomani
909fd5a9ec from uint8 to uint16 in i1 CSI-RS measurement fields 2024-08-15 08:24:16 +02:00
francescomani
24ff0e294e fix to avoid freeing SIB1 information still in use at RRC UE 2024-08-14 18:57:30 +02:00
francescomani
25fdc1d23d beam association for prach 2024-08-14 10:04:42 +02:00
francescomani
0a8e1b49d0 adapt VRB maps to multiple beams in a period 2024-08-14 08:33:48 +02:00
francescomani
c31d250d28 new structure to handle beams
fix: reset beam only if it is a newly allocated one
2024-08-14 08:28:53 +02:00
Matthias Mehlhose
aa9183c218 mod: Improve signal processing speed of rotate_cpx_vector function 2024-08-13 10:02:56 +00:00
Robert Schmidt
871078a64d Merge branch 'integration_2024_w32' into 'develop'
Integration: `2024.w32`

See merge request oai/openairinterface5g!2900

* !2810 add harqid in wireshark traces, refactor the trace_pdu parameters
* !2897 nr rlc: add a lock to protect access to time variables
* !2903 remove some openair1 headers included in opeinair2 files
* !2876 Enable 32 HARQ Processes in DL, UL
* !2849 Fix UE SRS crash
* !2898 Fix memory leaks in OAI gNB and OAI UE
2024-08-13 03:57:41 +00:00
Jaroslava Fiedlerova
d1a272be1b Merge remote-tracking branch 'origin/fix-gnb-ue-memory-leaks' into integration_2024_w32 2024-08-12 18:12:38 +02:00
Jaroslava Fiedlerova
6ef44ee3ae Merge remote-tracking branch 'origin/avoid_UE_SRS_segfault' into integration_2024_w32 2024-08-12 17:30:04 +02:00
Jaroslava Fiedlerova
00523c2b2f Merge remote-tracking branch 'origin/NR_HARQ32_PROCESSES' into integration_2024_w32 2024-08-12 16:34:24 +02:00
Jaroslava Fiedlerova
30feb7e493 Merge remote-tracking branch 'origin/nr_include_cleanup' into integration_2024_w32 2024-08-12 16:34:09 +02:00
Jaroslava Fiedlerova
51ae5e2c05 Merge remote-tracking branch 'origin/nr-rlc-time-lock' into integration_2024_w32 2024-08-12 16:33:52 +02:00
Jaroslava Fiedlerova
6af674be59 Merge remote-tracking branch 'origin/harqid-in-wireshark-traces' into integration_2024_w32 2024-08-12 16:33:38 +02:00
Guido Casati
7c788be9e0 Cleanup of unused parallel/worker thread configuration in NR
* In LTE there is logic that checks the thread configurtion with the
  getters `get_thread_parallel_conf()` and `get_thread_worker_conf()`
  in NR these getters are not used, only setters, which have no impact
2024-08-12 14:59:03 +02:00
Guido Casati
14b7311bd8 Fix memory leak in do_NR_ULInformationTransfer
* buffer is allocated but not freed after use by PDCP

> Direct leak of 192 byte(s) in 3 object(s) allocated from:
    > 0 0x7ffff74b4c38 in __interceptor_realloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:164
    > 1 0x55555775ee74 in encode_dyn_cb /cmake_targets/ran_build/build/openair2/RRC/LTE/MESSAGES/per_encoder.c:23
    > 2 0x55555774776e in _uper_encode_flush_outp /cmake_targets/ran_build/build/openair2/RRC/LTE/MESSAGES/uper_encoder.c:126
    > 3 0x55555774776e in uper_encode /cmake_targets/ran_build/build/openair2/RRC/LTE/MESSAGES/uper_encoder.c:36
    > 4 0x555557747c91 in uper_encode_to_new_buffer /cmake_targets/ran_build/build/openair2/RRC/LTE/MESSAGES/uper_encoder.c:85
    > 5 0x5555576c5172 in do_NR_ULInformationTransfer /openair2/RRC/NR/MESSAGES/asn1_msg.c:965
    > 6 0x555556fba691 in rrc_nrue /openair2/RRC/NR_UE/rrc_UE.c:1819
    > 7 0x555556fc4d2e in rrc_nrue_task /openair2/RRC/NR_UE/rrc_UE.c:1717
    > 8 0x7ffff5e94ac2 in start_thread nptl/pthread_create.c:442
2024-08-12 10:06:54 +02:00
Guido Casati
aa8cf7c41a Fix memory leak in nr_rrc_ue_decode_NR_BCCH_DL_SCH_Message
* bcch_message is malloced by ASN.1 decoder and needs to be always freed after use along with its contents

> Direct leak of 64 byte(s) in 1 object(s) allocated from:
   >0 0x7ffff74b4a57 in __interceptor_calloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:154
   >1 0x555557737ecd in SEQUENCE_decode_uper /cmake_targets/ran_build/build/openair2/RRC/LTE/MESSAGES/constr_SEQUENCE_uper.c:37
   >2 0x555557746f81 in uper_decode /cmake_targets/ran_build/build/openair2/RRC/LTE/MESSAGES/uper_decoder.c:83
   >3 0x5555577471fe in uper_decode_complete /cmake_targets/ran_build/build/openair2/RRC/LTE/MESSAGES/uper_decoder.c:16
   >4 0x555556f8b1c9 in nr_rrc_ue_decode_NR_BCCH_DL_SCH_Message /openair2/RRC/NR_UE/rrc_UE.c:732
   >5 0x555556fbc365 in rrc_nrue /openair2/RRC/NR_UE/rrc_UE.c:1775
   >6 0x555556fc4c2e in rrc_nrue_task /openair2/RRC/NR_UE/rrc_UE.c:1718
   >7 0x7ffff5e94ac2 in start_thread nptl/pthread_create.c:442
2024-08-12 10:06:54 +02:00
Guido Casati
b1609e0534 Fix memory leak in nr-uesoftmodem
* strdup is returning a malloced string that needs to freed after use

> Direct leak of 90 byte(s) in 1 object(s) allocated from:
    >0 0x7ffff745b9a7 in __interceptor_strdup ../../../../src/libsanitizer/asan/asan_interceptors.cpp:454
    >1 0x555556c7b341 in main /executables/nr-uesoftmodem.c:461
    >2 0x7ffff5e29d8f in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58
2024-08-12 10:06:54 +02:00
Guido Casati
e806315963 Fix memory leak in nr_rrc_ue_decode_dcch
* local dl_dcch_msg shall be freed after use

> Direct leak of 384 byte(s) in 6 object(s) allocated from:
    >0 0x7ffff74b4a57 in __interceptor_calloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:154
    >1 0x555557737ced in SEQUENCE_decode_uper /cmake_targets/ran_build/build/openair2/RRC/LTE/MESSAGES/constr_SEQUENCE_uper.c:37
    >2 0x555557746da1 in uper_decode /cmake_targets/ran_build/build/openair2/RRC/LTE/MESSAGES/uper_decoder.c:83
    >3 0x555556fa4b31 in nr_rrc_ue_decode_dcch /openair2/RRC/NR_UE/rrc_UE.c:1612
    >4 0x555556fbb25c in rrc_nrue /openair2/RRC/NR_UE/rrc_UE.c:1792
    >5 0x555556fc4a4e in rrc_nrue_task /openair2/RRC/NR_UE/rrc_UE.c:1718
    >6 0x7ffff5e94ac2 in start_thread nptl/pthread_create.c:442
2024-08-12 10:06:54 +02:00
Guido Casati
3d2b32ac1e Fix direct leak of memory allocate by deliver_sdu_srb with itti_malloc
* The RRC task is freeing the ITTI message but the message members that are allocated separetely still need to be freed

> Direct leak of 470 byte(s) in 6 object(s) allocated from:
    >0 0x7ffff74b4a57 in __interceptor_calloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:154
    >1 0x55555721f117 in itti_malloc /common/utils/ocp_itti/intertask_interface.cpp:64
    >2 0x555556f2356c in deliver_sdu_srb /openair2/LAYER2/nr_pdcp/nr_pdcp_oai_api.c:775
    >3 0x555556f4e10e in nr_pdcp_entity_recv_pdu /openair2/LAYER2/nr_pdcp/nr_pdcp_entity.c:184
    >4 0x555556f278ad in do_pdcp_data_ind /openair2/LAYER2/nr_pdcp/nr_pdcp_oai_api.c:285
    >5 0x555556f278ad in pdcp_data_ind_thread /openair2/LAYER2/nr_pdcp/nr_pdcp_oai_api.c:307
    >6 0x7ffff5e94ac2 in start_thread nptl/pthread_create.c:442
2024-08-12 10:06:51 +02:00
Guido Casati
a59a69d5e5 Fix strdup-related memory leak in nr-softmodem
* strdup is returning a malloced string which needs to be freed after use

> Direct leak of 90 byte(s) in 1 object(s) allocated from:
	> 0 0x7ffff745b9a7 in __interceptor_strdup ../../../../src/libsanitizer/asan/asan_interceptors.cpp:454
	> 1 0x5555591598a3 in main /executables/nr-softmodem.c:667
	> 2 0x7ffff5e29d8f in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58
2024-08-12 10:03:20 +02:00
Guido Casati
6435ed309c Fix memory leak in NR UE nr_rrc_ue_process_ueCapabilityEnquiry
* allocate memory in heap for the struct ue_CapabilityRAT_Container used locally for buffer encoding
* free the struct members only for the ul_dcch_msg allocated on the stack

> Direct leak of 40 byte(s) in 1 object(s) allocated from:
    > 0 0x7ffff74b4a57 in __interceptor_calloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:154
    > 1 0x555556f7a89f in nr_rrc_ue_process_ueCapabilityEnquiry /openair2/RRC/NR_UE/rrc_UE.c:1861
    > 2 0x555556fa4d85 in nr_rrc_ue_decode_dcch /openair2/RRC/NR_UE/rrc_UE.c:1650
    > 3 0x555556fbb33c in rrc_nrue /openair2/RRC/NR_UE/rrc_UE.c:1790
    > 4 0x555556fc4b2e in rrc_nrue_task /openair2/RRC/NR_UE/rrc_UE.c:1716
    > 5 0x7ffff5e94ac2 in start_thread nptl/pthread_create.c:442
2024-08-12 10:03:16 +02:00
francescomani
2b76e88823 remove some openair1 headers included in opeinair2 files 2024-08-09 16:16:13 +02:00
Cedric Roux
5e547c617c nr rlc am: harmonize log message
let's make it same as um and tm (no more file/line/function)
2024-08-09 15:52:00 +02:00
Cedric Roux
35f5fdf960 nr rlc tm: bugfix: reset t_current when clearing entity
maybe not super important, but let's harmonize with um/am
2024-08-09 15:52:00 +02:00
Cedric Roux
dfe16d985a nr rlc tm: reduce "SDU rejected" logging
once per second is enough
2024-08-09 15:45:39 +02:00
Cedric Roux
ad7bd05f9a nr rlc um: reduce "SDU rejected" logging
once per second is enough
2024-08-09 15:41:15 +02:00
Guido Casati
fb554dc6c9 Simplified and clang-formatted RCconfig_nr_parallel 2024-08-08 11:17:21 +02:00
Guido Casati
6e7ea5ce8d Fix memory leak in RCconfig_nr_parallel
* strdup() function is returning a malloced string
  which must be freed after use
* replace the strdup with direct use of strings to avoid heap allocation

> Direct leak of 23 byte(s) in 1 object(s) allocated from:
    > 0 0x7ffff745b9a7 in __interceptor_strdup ../../../../src/libsanitizer/asan/asan_interceptors.cpp:454
    > 1 0x555559e36f87 in RCconfig_nr_parallel /openair2/GNB_APP/gnb_config.c:2054
    > 2 0x555559e38ea3 in NRRCConfig /openair2/GNB_APP/gnb_config.c:2097
    > 3 0x555559155542 in get_options /executables/nr-softmodem.c:423
    > 4 0x555559155542 in main /executables/nr-softmodem.c:623
    > 5 0x7ffff5e29d8f in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58

> Direct leak of 14 byte(s) in 1 object(s) allocated from:
    > 0 0x7ffff745b9a7 in __interceptor_strdup ../../../../src/libsanitizer/asan/asan_interceptors.cpp:454
    > 1 0x555559e370c5 in RCconfig_nr_parallel /openair2/GNB_APP/gnb_config.c:2063
    > 2 0x555559e38ea3 in NRRCConfig /openair2/GNB_APP/gnb_config.c:2097
    > 3 0x555559155542 in get_options /executables/nr-softmodem.c:423
    > 4 0x555559155542 in main /executables/nr-softmodem.c:623
    > 5 0x7ffff5e29d8f in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58
2024-08-08 11:07:00 +02:00
Raghavendra Dinavahi
dafaea7dda enable HARQ32, Changes in UE
- num DL/UL harq processes, bits for harq id in DCIs, set according to IEs configured in RRC messages
	- removed going through all the harq processes before triggering nr_ue_ulsch_procedures in phy_procedures_nr_ue.c
	- did not remove usage of MAX_HARQ_PROCESSES in init phase
2024-08-08 09:30:43 +02:00
Raghavendra Dinavahi
9726a47fbb enable HARQ32, Changes in gNB
- Enabled configuration for number of dl, ul harq processes in conf file
		- set "num_dlharq = 32; num_ulharq = 32;" under "gNBs" section in the conf file
		- default values when not configured is 16 for DL, UL harq processes
		- IEs in the RRC messages set according to the number of DL, UL harq processes configured.
		- If value 32 is configured , then IEs related to num harq processes and dci bits also configured in Bandwidth parts.
2024-08-07 13:17:35 +02:00
Raghavendra Dinavahi
e586efb29d enable HARQ32, Changes common to gNB and UE
- MAX HARQ PROCESSES set to 32
	- for PDSCH - default setting in OAI is 16, according to 3GPP rel17 38.331 these are the possible configs
		- if no IES are defined then 8
		- if nrofHARQ-ProcessesForPDSCH is defined then these values-  {n2, n4, n6, n10, n12, n16}
		- if nrofHARQ-ProcessesForPDSCH-v1700 is defined then 32
		- for harq bits in DCI
			- DCI 1_0 - 4 bits spec 38.212, section 7.3.1.2.1
			- DCI 1_1 - 4/5 bits according to IE harq-ProcessNumberSizeDCI-1-1, spec 38.212, section 7.3.1.2.2
	- for PUSCH - default setting in OAI is 16, according to 3GPP rel17 38.331 these are possible configs
                - if no IES are defined then 16
                - if nrofHARQ-ProcessesForPUSCH-v1700 is defined then 32
                - for harq bits in DCI
                        - DCI 0_0 - 4 bits spec 38.212, section 7.3.1.1.1
                        - DCI 0_1 - 4/5 bits according to IE harq-ProcessNumberSizeDCI-0-1, spec 38.212, section 7.3.1.1.2
	- FOR HARQ32 , DCI 1_1, DCI 0_1 should be configured in UE dedicated search space. In OAI it is set.
2024-08-06 17:12:48 +02:00
Cedric Roux
b22891d403 nr rlc: add a lock to protect access to time variables
ThreadSanitizer reported a data race, let's remove it.

Here is the warning.

WARNING: ThreadSanitizer: data race (pid=7361)
  Write of size 8 at 0x000003b42770 by thread T22 (mutexes: write M0):
    #0 nr_rlc_tick /home/richie/openairinterface5g/openair2/LAYER2/nr_rlc/nr_rlc_oai_api.c:1101 (nr-softmodem+0x107d275) (BuildId: 291c846fc591e10c3838e9c53f4738997de8f984)
    #1 gNB_dlsch_ulsch_scheduler /home/richie/openairinterface5g/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler.c:220 (nr-softmodem+0xaec72a) (BuildId: 291c846fc591e10c3838e9c53f4738997de8f984)
    #2 run_scheduler /home/richie/openairinterface5g/openair2/NR_PHY_INTERFACE/NR_IF_Module.c:406 (nr-softmodem+0xad8515) (BuildId: 291c846fc591e10c3838e9c53f4738997de8f984)
    #3 tx_func /home/richie/openairinterface5g/executables/nr-gnb.c:134 (nr-softmodem+0x7002cc) (BuildId: 291c846fc591e10c3838e9c53f4738997de8f984)
    #4 L1_tx_thread /home/richie/openairinterface5g/executables/nr-gnb.c:197 (nr-softmodem+0x7002cc)

  Previous read of size 8 at 0x000003b42770 by thread T2 (mutexes: write M1):
    #0 rlc_data_req /home/richie/openairinterface5g/openair2/LAYER2/nr_rlc/nr_rlc_oai_api.c:348 (nr-softmodem+0x1076f4e) (BuildId: 291c846fc591e10c3838e9c53f4738997de8f984)
    #1 rlc_data_req_thread /home/richie/openairinterface5g/openair2/LAYER2/nr_pdcp/nr_pdcp_oai_api.c:139 (nr-softmodem+0xa671ce) (BuildId: 291c846fc591e10c3838e9c53f4738997de8f984)
2024-08-06 16:53:03 +02:00
Robert Schmidt
d47eb536b0 Merge branch 'integration_2024_w31' into 'develop'
Integration: `2024.w31`

See merge request oai/openairinterface5g!2894

* !2812 NR UE MAC PRACH scheduling fixes
* !2885 Fix signal_energy_nodc for lengths that are not multiples of 4
* !2888 nr rlc: fix decode_poll_byte()
* !2892 Dockerfiles: correct ENV format
* !2891 UE cmd line info: print threequarter-sampling param if used
* !2837 replacing assertions with LOG_E in UE UL locking mechanism
* !2879 style(docker): newer versions of docker require keyword as to be of same case as from
* !2832 Enable PHR reporting for NR UE
* !2880 CI: Improve error handling in Iperf3 JSON analysis functions
* !2813 Rewrite time_stats_t counters for DLSCH in NR UE.
* !2882 Automatic scaling to PUCCH2 receiver
* !2691 NR UE data inactivity timer
* !2848 Refactor network interface handling
* !2865 CI: Create FHI 7.2 pipeline
2024-08-05 16:46:43 +00:00
Robert Schmidt
3e44aba1ea Merge remote-tracking branch 'origin/ci-fhi72-pipeline' into integration_2024_w31 2024-08-05 16:51:31 +02:00
Jaroslava Fiedlerova
d8696f703c CI: Add FHI72 pipeline to the parent pipeline 2024-08-05 15:57:49 +02:00
Jaroslava Fiedlerova
a57098ec02 CI: Add FHI72 pipeline to CI doc 2024-08-05 15:57:49 +02:00
Jaroslava Fiedlerova
9a4d1e920d CI: Add XML files for FHI72 pipeline 2024-08-05 15:57:49 +02:00
Jaroslava Fiedlerova
ca2d9ec2a1 CI: Update ci_infra for FHI7.2 pipeline 2024-08-05 15:57:49 +02:00
Jaroslava Fiedlerova
3cdb0d795e CI: Add path and namespace configuration for OC CNs
- Modify CN deployment and termination functions to include namespace and path parameters.
- Update `Module_UE` class with new attributes for namespace and CN path.
- Integrate `cnID` for OC CN deployment and termination in `epc.py`.
- Extract `cn_id` from XML configurations for CN operations.
- Update XML files to include `cn_id` tag for 5G Core initialization and
  termination. (Used in OAIUE and AW2S pipeline, for OC CN deployment. This change
will not affect other CN deployments.)
2024-08-05 15:57:49 +02:00
Jaroslava Fiedlerova
9c602a7790 CI: Remove unused directory for FHI 7.2 deployments 2024-08-05 15:57:49 +02:00
Jaroslava Fiedlerova
7dffdcd797 CI: Add YAML files and deployment scripts for FHI7.2 pipeline
Create directories for gNB deployment with VVDN and Benetel550 RUs.
Each directory includes scripts for setting up and cleaning up the
host machine running the gNB.
2024-08-05 15:57:46 +02:00
Robert Schmidt
3779483b1b Merge remote-tracking branch 'origin/refactor-nas-config' into integration_2024_w31 2024-08-05 10:20:23 +02:00
Robert Schmidt
335fa3fc50 Merge remote-tracking branch 'origin/NR_UE_data_inactivity_timer' into integration_2024_w31 2024-08-05 10:11:23 +02:00
Jaroslava Fiedlerova
386ff01f57 Merge remote-tracking branch 'origin/pucch2_polar_llr_dynamic_range' into integration_2024_w31 2024-08-05 10:06:07 +02:00
francescomani
88f0e28c76 init received_config_request flag only for SA 2024-08-04 13:27:00 +02:00
francescomani
798158cfe1 improvements in nr_pusch_channel_estimation code 2024-08-02 16:38:17 +02:00
Jaroslava Fiedlerova
fc9c5084eb Merge remote-tracking branch 'origin/nr-ue-pdsch-time-stats-fix' into integration_2024_w31 2024-08-02 16:27:58 +02:00
Robert Schmidt
168582b5a1 Remove netlink_init.c, and move remaining functionality to tun_if.c
Remove openair1/SIMULATION/ETH_TRANSPORT/netlink_init.c, and move TUN
interface creation functionality to tun_if.c.

Remove SIMU_ETH target.
2024-08-02 15:31:04 +02:00
Robert Schmidt
89d89a7564 Create tun_if module for TUN interface handling
Move openair3/RRC/NAS/nas_config.c to common/utils/tun_if.c, and remove
the former from all targets.
2024-08-02 15:31:04 +02:00
Robert Schmidt
39e7839f19 Cleanup netlink_init.c and pdcp_fifo.c
- Remove globals, declare where they are used
- Cleanup pdcp_fifo.c
- Remove unnecessary headers from netlink_init.c
- Reformat netlink_init.c
2024-08-02 15:31:04 +02:00
Robert Schmidt
3a99fb8293 Set up 4G UE addr via nas_config() 2024-08-02 15:31:04 +02:00
Robert Schmidt
2e804f53c0 Remove useless LINK_ENB_PDCP_TO_IP_DRIVER option 2024-08-02 15:31:04 +02:00
Robert Schmidt
659a81997b Handle IPv6/IPv4v6 PDU sessions
Handle IPv6 (and IPv4v6) PDU sessions by correctly instructing
nas_config() to set up the interface with provided IP addresses.
Note that as of now, IPv6 PDU sessions have not been fully tested.

Remove a useless assert at the gNB; to my understanding the gNB does not
care about the IP session type (at least for IP), as it just
transparently tunnels the IP packets from/to GTP.

I added a comment in the code where to change to request a PDU session
different from IPv4. Currently it is hardcoded to IPv4, and it seems
that a default OAI 5GC config would reject a PDU session type different
from IPv4.
2024-08-02 15:31:04 +02:00
Robert Schmidt
d0f32d8aad Refactor change_interface_state()
- Read interface flags before setting status to not inadvertently
  overwrite existing flags
- Set interface flag point-to-point, remove multicast (I think a UE is
  not supposed to send anywhere else than to the UPF, so it seems to not
  make sense to declare the interface as multicast)
2024-08-02 15:30:46 +02:00
Robert Schmidt
ae5702d014 nas_config(): change API to handle both IPv4 and IPv6
Implement handling of IPv4 and IPv6 (on the same interface) in
nas_config().
2024-08-02 15:30:15 +02:00
Robert Schmidt
ffcf53fc75 Reintroduce the IP rule&route for OAI UE through setup_ue_ipv4_route()
These rules & route are necessary to properly send packets on oaitun_ue1
interface:

1. This forces the packets coming from a subnet different than the UE's
   subnet to go back through oaitun_ue1 rather than via what the default
   route defined on the system (e.g., important if ping from the
   internet arrives).

2. On machines setting net.ipv4.conf.oaitun_ue1.rp_filter=1 (e.g.
   RHEL), this prevents that source filtering for packets coming back is
   applied and those packets be dropped. By default, many hosts have
   rp_filter=2, so no strict source filtering is applied, and it would
   work; on others, this rule prevents source filter dropping.
2024-08-02 15:29:36 +02:00
Robert Schmidt
2da09aba80 nas_config(): provide entire IP address to configure
Prior to this commit, there was a global variable baseNetAddress that
could be set independently through a setter and also through the
configuration module. This baseNetAddress (16 bits IPv4) would then be
complemented with two more bytes in nas_config().

However, this is counter-productive, as not only we have a global
variable that is avoidable (we can give the entire address to
nas_config() directly), but it also would not work with IPv6. Hence,
modify to give nas_config() the entire address. A follow-up commit will
add IPv6 support.
2024-08-02 15:29:36 +02:00
Robert Schmidt
2c878c10ec Refactor setInterfaceParameter() and bringInterfaceUp()
- refactor functions to make them shorter
- provide doxygen strings
- open socket for operation once instead of in each function
- use named constant (from enum) to differentiate interface UP/DOWN
- Linux kernel defines name length as IFNAM_SIZE, so use that for
  interface name length. Also, it seems no null-byte is needed.
2024-08-02 15:29:36 +02:00
Robert Schmidt
e2163ba312 Remove netmask configuration and hardcode instead
I initially planned to entirely remove the netmask configuration.
However, in specific configurations, e.g. in 4G Rfsim with feMBMS,
routing does not seem to work anymore using these commands:

  iperf -B 10.0.2.2 -s -u -i1
  iperf -c 10.0.2.2 -B 10.0.2.1 -u -t 30 -b 2.00M -i1

Therefore, we simplify by hardcoding the netmask to /24, which allows
the above to work.
2024-08-02 15:29:36 +02:00
Robert Schmidt
5bf498fca4 nas_config(): remove broadcast parameter
Remove the broadcast address from the UE, as logically, a UE has nothing
to broadcast: it can only directly talk to the core. Additionally, at
least as of now, the UE interface is shown as "POINTOPOINT", so
broadcasting is not possible.
2024-08-02 15:29:36 +02:00
Robert Schmidt
4810efdcfd Remove unused code from nas_config.c
Remove unused header includes, as well as the test program (which does
not do much, and certainly does not test in the way we use the
interfaces).
2024-08-02 15:29:36 +02:00
Robert Schmidt
9fedbf31dd Remove nas_config_mbms()
Remove nas_config_mbms() since nas_config_mbms() and nas_config() do the
same
2024-08-02 15:29:36 +02:00
Robert Schmidt
380cf5c603 Remove routing table init in nas_config()
The routing table is temporarily removed in this commit and introduced
in one of the next commits.
2024-08-02 15:29:36 +02:00
Robert Schmidt
a12460e882 nas_config_mbms/netlink_init_mbms_tun(): use entire interface prefix
Does the same change in the _mbms() functions as in the previous commit.

Also, simplify logic in netlink_init_mbms_tun(): directly use the id in
the interface. This requires a slight ID change in the users, which is
also done in this commit.
2024-08-02 15:29:36 +02:00
Robert Schmidt
5acfa47325 nas_config()/netlink_init_tun(): use entire interface name (prefix)
Instead of implicitly using a hardcoded prefix "oaitun_" interface
name, move that out to the callers of these functions to make it clear.
The ID still remains outside.

The "sister functions" nas_config_mbms()/netlink_init_tun_mbms() will do
the same change in the next commit.
2024-08-02 15:29:36 +02:00
Robert Schmidt
983ee2794d Replace nas_config_mbms_s1() call with nas_config_mbms()
Comparing both functions, it seems that nas_config_mbms_s1() sets the
same parameters, assuming that in nas_config_mbms(), we set
- (UE_NAS_USE_TUN || ENB_NAS_USE_TUN) yielding true -> should yield the
  same interface name
- netmask is hardcoded to 255.255.255.0
- baseNetAddress is hardcoded 10.0

So replace the call with nas_config_mbms() by setting parameters
accordingly.
2024-08-02 15:29:26 +02:00
Jaroslava Fiedlerova
89aad98093 Merge remote-tracking branch 'origin/ci-iperf3-json-fix' into integration_2024_w31 2024-08-02 12:56:07 +02:00
Jaroslava Fiedlerova
0a5e8b7666 Merge remote-tracking branch 'origin/nr-ue-phr' into integration_2024_w31 2024-08-02 12:53:04 +02:00
Bartosz Podrygajlo
f23c1dff00 Correct gNB received PHR to headroom calculation according to 38.133. 2024-08-02 12:37:47 +02:00
Bartosz Podrygajlo
c7c1cb2dbf Enable PHR reporting for NR UE 2024-08-02 12:37:47 +02:00
Jaroslava Fiedlerova
1c58bc2e1a Merge remote-tracking branch 'origin/style-dockerfile-as-uppercase' into integration_2024_w31 2024-08-02 12:04:45 +02:00
Jaroslava Fiedlerova
9a1381a92e Merge remote-tracking branch 'origin/NR_UE_assert_removal' into integration_2024_w31 2024-08-02 12:03:43 +02:00
francescomani
cec91a2a22 remove duplicate delta pusch function 2024-08-02 11:32:03 +02:00
francescomani
5eef9b3574 fix delta for PUSCH DMRS type 2 2024-08-02 10:09:59 +02:00
Jaroslava Fiedlerova
31b2428db8 CI: Add configuration file for gNB fhi7.2 with Benetel550 and VVDN 2024-08-02 10:08:11 +02:00
Jaroslava Fiedlerova
992e7fa117 Merge remote-tracking branch 'origin/ue-cmd-line-info-E' into integration_2024_w31 2024-08-02 09:17:22 +02:00
Jaroslava Fiedlerova
cb0a888565 Merge remote-tracking branch 'origin/docker-env-tini' into integration_2024_w31 2024-08-02 09:16:49 +02:00
Jaroslava Fiedlerova
8094952f6e Merge remote-tracking branch 'origin/bugfix-nr-rlc-poll-byte' into integration_2024_w31 2024-08-02 09:16:26 +02:00
Jaroslava Fiedlerova
8ae5bb5632 Merge remote-tracking branch 'origin/fix-signal-energy-nodc' into integration_2024_w31 2024-08-02 09:15:56 +02:00
Jaroslava Fiedlerova
167c06bb87 Merge remote-tracking branch 'origin/fix_bugs_prach_ue_for_multi_ssb' into integration_2024_w31 2024-08-02 09:15:20 +02:00
Robert Schmidt
7782f4aef0 Remove functions from nas_config that are not used, mark static
- Remove unused NAS_config(): It does most of what the highly similar
  nas_config() does.
- Remove unused set_gateway()
- Remove unused blocking_NAS_config()
- Remove unused functions getNetMask()
- Remove unused broadcast functionality: functions setBroadcastAddress()
  and getBroadcastAddress(), as well as global variable broadcastAddr
  are not used in consumers. Remove it.
- Make functions static
2024-08-01 18:22:46 +02:00
Robert Schmidt
44a0a45460 Remove unneeded header includes 2024-08-01 18:22:46 +02:00
Robert Schmidt
32d9e75dc5 Remove --nokrnmod option, as we never use the kernel anyway 2024-08-01 18:22:46 +02:00
Robert Schmidt
6b21dea1ee Remove legacy 4G kernel modules
I don't know about any user of the kernel modules. It is effectively
legacy code we carry around, for no good reason. Remove it for the
moment. If we ever need it, we can revert.
2024-08-01 18:22:46 +02:00
Robert Schmidt
8f549a5433 Remove rb_config: it's not used by any code currently in use 2024-08-01 18:22:46 +02:00
Robert Schmidt
f680babbdd Remove unused pdcp_netlink.c file 2024-08-01 18:22:45 +02:00
Robert Schmidt
cf950dfa86 Remove netlink/PDCP_USE_NETLINK: it's not used
Remove netlink code, and the PDCP_USE_NETLINK macro, as there is no
known use, it makes the code more complicated, and is simply "technical
debt".

In 4G PDCP, a subtle change has been introduced, in pdcp_module_init()
of pdcp.c. Looking at the diff of this commit, it can be seen that there
is now a new "else-if (ENB_NAS_USE_TUN_W_MBMS_BIT)" branch that is under
what was the "if (PDCP_USE_NETLINK)" branch, while the code fragment was
actually inside the "else" branch of PDCP_USE_NETLINK. This seems to be
necessary: previously, if we did not use noS1 mode and we don't use any
TUN (i.e., the eNB), the else block would set up this interface. It is
important that this interface is brought up, because if we omit it,
RFsim will not work. It seems to me that this interface will regularly
create some traffic; without it, RFsim will be blocked, and the UE
cannot connect.

In short, it seems to be important to have the MBMS interface, which
injects traffic in the RFsim side, which will unblock RFsim. The change
in pdcp_module_init() preserves the total changes of the if-else
(PDCP_USE_NETLINK).
2024-08-01 18:22:45 +02:00
Robert Schmidt
12229ef50e Smaller except blocks, add JSONDecodeError 2024-08-01 17:44:21 +02:00
francescomani
a9902d883c creation of a separate .h file for L2_interface_ue 2024-08-01 16:39:34 +02:00
francescomani
3fa73e4bdd implementation of MAC data inactivity timer 2024-08-01 16:39:24 +02:00
Jaroslava Fiedlerova
39070f6541 Minor fix in Iperf_analyzeV3TCPJson() 2024-08-01 15:59:35 +02:00
Raymond Knopp
70751e04d8 Added automatic scaling to PUCCH2 receiver
Scaling based on incoming signal level to help with polar case.
Can subsequently add PUCCH2 CQI measurement based on this.
2024-08-01 14:03:48 +02:00
Robert Schmidt
848b0f34ee UE cmd line info: print threequarter-sampling param if used, add doc 2024-08-01 13:56:21 +02:00
Jaroslava Fiedlerova
9acf60a339 Improve error handling in Iperf_analyzeV3BIDIRJson() 2024-08-01 13:53:49 +02:00
Jaroslava Fiedlerova
5f684d7f05 Improve error handling in Iperf_analyzeV3TCPJson() 2024-08-01 13:53:45 +02:00
Raphael Defosseux
f6dcc19fe5 style(docker): adding license header to dockerfiles
Signed-off-by: Raphael Defosseux <raphael.defosseux@eurecom.fr>
2024-08-01 10:47:46 +02:00
Raphael Defosseux
0efaec657a style(docker): newer versions of docker require keyword as to be of same case as from
Signed-off-by: Raphael Defosseux <raphael.defosseux@eurecom.fr>
2024-08-01 10:47:46 +02:00
Bartosz Podrygajlo
d465ed2fbc NR UE: Cleanup global variables used for command line parameter storage
Variables moved to nrUEParams:
vcdflag, rx_gain_off, usrp_args, tx_subdev, rx_subdev, reconfig_file, rbconfig_file, uecap_file,
tx_gain, rx_gain

Variables removed:
rx_gain_mode
2024-08-01 09:50:29 +02:00
Bartosz Podrygajlo
b0b8818549 Remove unused command like parameter rrc_config_path 2024-08-01 09:48:54 +02:00
Robert Schmidt
965b7f63b0 Dockerfiles: correct ENV format
Avoid docker warning:

   - LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format
2024-08-01 08:20:33 +02:00
Laurent THOMAS
0e7e66ecd8 add harqid in wireshark traces, refactir the trace_pdu parameters 2024-07-31 09:40:07 +02:00
Robert Schmidt
5223013153 do_ra test: increase response window
Tests showed that we sometimes exceed the response window. In that case,
the UE cannot connect anymore, as do-ra uses contention-free RA, and
prefills a RA process. Avoid this by giving more time in the CI test.
2024-07-31 09:36:22 +02:00
Robert Schmidt
bfaa906a1e Remove rb_config functions from nas_config, remove unused functions, make static 2024-07-30 20:00:40 +02:00
Robert Schmidt
e50978e7de 4G RLC/PDCP interface: remove function pointers
Remove function pointers that were used in the past to implement the
F1(-U) interface in 4G, i.e., to have different functions to handle
split/monolithic operations. As we don't have F1 in 4G anymore (see
commit 9dc2282249), we don't need the
function pointers anymore.

On that occasion, rename the 5G functions by prepending nr_ to them;
this allows to refactor the interface in 5G further (which is not the
focus of this changeset).
2024-07-30 20:00:40 +02:00
Robert Schmidt
3d7ab0ebc6 Remove unused SIMULATION/ETH_TRANSPORT/defs.h 2024-07-30 20:00:40 +02:00
Robert Schmidt
7ddba36279 Remove unused code in ETH_TRANSPORT/{socket,multicast_link}.{ch} 2024-07-30 20:00:40 +02:00
Robert Schmidt
b2eb0f74b6 Remove unused code in openair3/UTILS: not used anywhere 2024-07-30 20:00:40 +02:00
Robert Schmidt
8365630946 Remove unused emu_transport.c 2024-07-30 20:00:40 +02:00
Robert Schmidt
6da87cf062 Remove unused Makefile 2024-07-30 20:00:40 +02:00
Robert Schmidt
9d77057775 Remove LFDS credit: we don't use it anymore 2024-07-30 20:00:40 +02:00
francescomani
77db7be68e avoid duplicated call to phy_config_request 2024-07-30 19:36:49 +02:00
francescomani
ab537c6675 remove mac flag phy_config_request_sent 2024-07-30 19:36:49 +02:00
Bartosz Podrygajlo
b242a483f1 Rewrite NR UE PHY cpu measurements 2024-07-30 19:23:54 +02:00
Robert Schmidt
bd721c3bdb Merge branch 'integration_2024_w30' into 'develop'
Integration: `2024.w30`

See merge request oai/openairinterface5g!2877

* !2830 NR feature set update
* !2868 Fix support for USRP UHD Versions => 4.5.0.0
* !2870 fix(docker): base image for target oai-gnb-aw2s shall be jammy
* !2874 Fix memory leaks in gNB PDU Session Setup Request processing
* !2866 RRC: reject PDU sessions if security is not active
* !2829 Automatic update of USRP RX gain during initial search using --agc option
* !2878 USRP: add a T trace to record the TX IQ data on antenna 0
* !2633 Handle F1 Reset at DU, and ensure state re-init on F1Setup
* !2864 Fix an assert in power control
* !2754 Introduce gold sequence cache
2024-07-30 16:24:27 +00:00
Cedric Roux
77af1ab97b nr rlc: fix decode_poll_byte()
The returned value was 1024 times too big.
2024-07-30 17:38:13 +02:00
Robert Schmidt
82c0b441e5 Merge remote-tracking branch 'origin/simplify-faster-gold-sequences' into integration_2024_w30 2024-07-30 15:05:40 +02:00
Robert Schmidt
b8089ba9a6 Remove empty file nr_gold.c 2024-07-30 14:58:12 +02:00
Laurent THOMAS
bb766be0c3 Reformatting and cleanup 2024-07-30 14:57:17 +02:00
Laurent THOMAS
8e92df78de Use gold cache in PUCCH decoding 2024-07-30 14:57:10 +02:00
Laurent THOMAS
803b0289a6 Use gold cache in code word (un)scrambling 2024-07-30 14:57:06 +02:00
Laurent THOMAS
f207ac12be Use gold cache in UCI 2024-07-30 14:57:01 +02:00
Laurent THOMAS
00cb43bac3 Use gold cache for PRS decoding 2024-07-30 14:55:35 +02:00
Robert Schmidt
7563937af8 Use gold cache for CSI-RS decoding 2024-07-30 14:53:30 +02:00
Laurent THOMAS
e445ba2d1a Use gold cache PUSCH decoding
Harmonize nr_gold_pusch() and nr_gold_pdsch(), as the gold sequence
calculation for PUSCH and PDSCH is the same.
2024-07-30 14:52:06 +02:00
Laurent THOMAS
745ea1c1dd Use gold cache for PDSCH decoding 2024-07-30 14:50:57 +02:00
Laurent THOMAS
99c8dd420a Use gold cache for PDCCH decoding, scrambling, unscrambling 2024-07-30 14:49:46 +02:00
Laurent THOMAS
0316431e27 Use gold cache for PBCH encoding&decoding 2024-07-30 14:48:36 +02:00
Robert Schmidt
9d81708b49 takeout 2024-07-30 14:44:31 +02:00
Jaroslava Fiedlerova
bb9af4c7dc Merge remote-tracking branch 'origin/fix-assert-in-pc' into integration_2024_w30 2024-07-30 10:18:20 +02:00
arora
0800dad0e4 (doc): Added a new doc on hardware requirements
- Added information about the CPU clock-speed in 7.2 docs
2024-07-30 10:04:07 +02:00
Bartosz Podrygajlo
ed05c94c3e Fix signal_energy_nodc for lengths that are not multiples of 4 2024-07-30 09:44:00 +02:00
Robert Schmidt
686f1816d0 Merge remote-tracking branch 'origin/impl_f1reset_and_fix_f1setup' into integration_2024_w30 2024-07-29 12:02:50 +02:00
Xin Zhe Khooi
52bd1ad7c6 Update FEATURE_SET.md with F1 Reset (DU-only) 2024-07-29 07:44:31 +02:00
Robert Schmidt
2b44e5252d Add log statement that DU sends F1 Setup Request, as done in other functions 2024-07-29 07:44:31 +02:00
Xin Zhe Khooi
52f077c478 Initialized DU UE states on F1SetupResponse
38.473 requires to reset UE-related contexts in F1 Setup Request, so do
it.

However, avoid resetting UE states in phy_test: it has preconfigured UE
which we should not reset. Note that if NSA/phy-test used F1, we could
likely reset the UE state here, as the F1 UE context setup would come
afterwards.
2024-07-29 07:43:14 +02:00
Jaroslava Fiedlerova
f30e354b77 Merge remote-tracking branch 'origin/T-usrp-tx-sample-trace' into integration_2024_w30 2024-07-26 18:07:42 +02:00
Jaroslava Fiedlerova
d0daf03089 Merge remote-tracking branch 'origin/NR_UPDATE_RXGAIN' into integration_2024_w30 2024-07-26 18:07:22 +02:00
Laurent THOMAS
59086151e0 Add generic usage-based gold cache
Add gold sequence cache with dynamic size, private to each thread. It
periodically reorders by call rate. To free the gold sequences after end
of life time of a thread, use the pthread API.
2024-07-26 16:39:28 +02:00
Jaroslava Fiedlerova
fbf257f6ba Merge remote-tracking branch 'origin/pdu-session-no-security' into integration_2024_w30 2024-07-26 14:13:17 +02:00
Jaroslava Fiedlerova
5692217c29 Merge remote-tracking branch 'origin/fix-gnb-memory-leaks' into integration_2024_w30 2024-07-26 14:12:55 +02:00
Cedric Roux
181ec25a23 USRP: add a T trace to record the TX IQ data on antenna 0 2024-07-26 12:54:55 +02:00
Robert Schmidt
9c1a8733c1 nr_pusch_dmrs_rx(): const input 2024-07-26 12:15:36 +02:00
Robert Schmidt
fc5258962f nr_gen_ref_conj_symbols()/nr_ptrs_cpe_estimation(): const input 2024-07-26 12:14:59 +02:00
Robert Schmidt
46ca521042 nr_pdc/sch_dmrs_rx(): make non-changing input parameter const ptr 2024-07-26 12:14:29 +02:00
Robert Schmidt
9e0bcb7fe4 nr_modulation(): make non-changing input parameter const ptr 2024-07-26 12:04:35 +02:00
Bartosz Podrygajlo
48d68f7d90 Fix a bug where if BWP size is not exactly maximum BWP size for a bandwidth power control code asserts.
This assert and assumption is incorrect, according to 38.101-1 UE channel is defined only by the BWP size
and BWP size can be any value supported by the RRC parameters defining the BWP.
To determine the UE channel the smallest bandwidth supporting the BWP is selected. This is an assumption based
on references in the same document to UE channel bandwidth being equal to one of the values in set
 {5, 10, 15, 20, 25, 30, 35, 40, 50, 60, 70, 80, 90, 100}.
Also:
 - calculated P_CMIN during BWP setup since the parameter doesn't depend on DCI.
 - initiialize uniqCfg structure in test_nr_ue_power_procedures main function which enables LOG prints during tests
2024-07-26 11:15:49 +02:00
Jaroslava Fiedlerova
eab8dfa4c4 Merge remote-tracking branch 'origin/fix-aw2s-image-base' into integration_2024_w30 2024-07-26 10:31:41 +02:00
Jaroslava Fiedlerova
bad93150ff Merge remote-tracking branch 'platini/develop' into integration_2024_w30 2024-07-26 10:29:39 +02:00
Jaroslava Fiedlerova
4acb9be7c0 Merge remote-tracking branch 'origin/NR_UE_feature_set_update' into integration_2024_w30 2024-07-26 10:21:13 +02:00
Xin Zhe Khooi
23a865db77 Implement DU F1 Reset handlers 2024-07-26 08:53:32 +02:00
Xin Zhe Khooi
a92ab368f2 Decouple UEContextReleaseComplete message generation from MAC UE release
The next commit implements the release of all UEs following the F1 Reset
message. It uses nr_mac_release_ue(), which as of now, triggered a
release complete message automatically, which we don't want in the case
of F1 Reset.

This commit refactors the code to split UE release at MAC/RLC and
release complete message sending to allow to release UEs without sending
the complete. Corresponding users are updated.
2024-07-26 08:48:10 +02:00
Xin Zhe Khooi
03c2f6277d Implement encoder/decoder for F1 Reset at DU 2024-07-26 08:42:37 +02:00
Xin Zhe Khooi
2cb6fd0890 Stubs for F1 Reset 2024-07-26 08:42:34 +02:00
Guido Casati
2d6aef5183 Fix memory leak in PDU Session Setup Request decoding
* aper_decode allocates memory for for local pointer `pdusessionTransfer`, in `decodePDUSessionResourceSetup`
* this memory seems not to be freed but its members are by:
  `ASN_STRUCT_FREE_CONTENTS_ONLY(asn_DEF_NGAP_PDUSessionResourceSetupRequestTransfer,pdusessionTransfer);`
  which btw in its header says: "AVOID using it in the application code; Use a safer ASN_STRUCT_RESET() instead"
* the following mem leak was detected by ASAN:

```
Direct leak of 72 byte(s) in 1 object(s) allocated from:
   *0 0x7ffff74b4a57 in __interceptor_calloc /src/libsanitizer/asan/asan_malloc_linux.cpp:154
   *1 0x55555cb306df in SEQUENCE_decode_aper /cmake_targets/ran_build/build/openair2/RRC/LTE/MESSAGES/constr_SEQUENCE_aper.c:36
   *2 0x55555ca9fa28 in aper_decode /cmake_targets/ran_build/build/openair2/RRC/LTE/MESSAGES/aper_decoder.c:78
   *3 0x55555b99bae6 in decodePDUSessionResourceSetup /openair2/RRC/NR/rrc_gNB_NGAP.c:273
   *4 0x55555b99fec2 in trigger_bearer_setup /openair2/RRC/NR/rrc_gNB_NGAP.c:357
   *5 0x55555b9b54bf in rrc_gNB_process_NGAP_PDUSESSION_SETUP_REQ /openair2/RRC/NR/rrc_gNB_NGAP.c:830
   *6 0x55555b936871 in rrc_gnb_task /openair2/RRC/NR/rrc_gNB.c:2428
   *7 0x7ffff5e94ac2 in start_thread nptl/pthread_create.c:442
```

* This commit replaces ASN_STRUCT_FREE_CONTENTS_ONLY with ASN_STRUCT_FREE, which will free the memory allocated for the entire struct and its members
2024-07-25 16:46:22 +02:00
Guido Casati
c78b8dda56 Fix memory leak in PDU Session Setup Request
* fill_DRB_configList_e1 is filling `DRB_configList->list` then passing to PDCP
* the contents of the struct are allocated but seem not to be freed
* the following mem leak was detected by ASAN

```
Direct leak of 32 byte(s) in 1 object(s) allocated from:
   *0 0x7ffff74b4c38 in __interceptor_realloc /src/libsanitizer/asan/asan_malloc_linux.cpp:164
   *1 0x55555caa6a3e in asn_set_add /cmake_targets/ran_build/build/openair2/RRC/LTE/MESSAGES/asn_SET_OF.c:27
   *2 0x55555c8b8bb6 in fill_DRB_configList_e1 /openair2/LAYER2/nr_pdcp/cucp_cuup_handler.c:42
   *3 0x55555c8be6eb in e1_bearer_context_setup /openair2/LAYER2/nr_pdcp/cucp_cuup_handler.c:189
   *4 0x55555d329668 in cucp_cuup_bearer_context_setup_direct /openair2/RRC/NR/cucp_cuup_direct.c:31
   *5 0x55555b9a2c37 in trigger_bearer_setup /openair2/RRC/NR/rrc_gNB_NGAP.c:437
   *6 0x55555b9b54bf in rrc_gNB_process_NGAP_PDUSESSION_SETUP_REQ /openair2/RRC/NR/rrc_gNB_NGAP.c:830
   *7 0x55555b936871 in rrc_gnb_task /openair2/RRC/NR/rrc_gNB.c:2428
   *8 0x7ffff5e94ac2 in start_thread nptl/pthread_create.c:442
```

* using ASN_STRUCT_RESET to free the memory used by the members of the structure
  without freeing the structure pointer which is allocated on the stack
2024-07-25 16:46:17 +02:00
Raghavendra Dinavahi
95a8767383 Automatic update of USRP RX gain during initial search using --agc option
- if search fails, keeps increasing the rx gain (set by --ue-rxgain) by
  3 db until USRP max rx gain
- if initial sync is success, sets the rxgain to the value of
  (TARGET_RX_POWER (50) - pbch digital power in dB/RE)
2024-07-25 15:33:44 +02:00
Raghavendra Dinavahi
4c698bce2b rewrite ssb meas function to call from initial sync 2024-07-25 15:33:06 +02:00
Raghavendra Dinavahi
6fce492177 Correction of variable initialisation 2024-07-25 15:31:34 +02:00
Guido Casati
869b78efe2 Use NGAP protocol cause IE in the stack 2024-07-25 13:58:08 +02:00
Guido Casati
d581c671e9 Add enum for NGAP protocol cause IEs 2024-07-25 13:58:08 +02:00
Raphael Defosseux
0ed8fb7205 Merge remote-tracking branch 'origin/back_to_Aerial2' into develop 2024-07-25 13:56:48 +02:00
Reem Bahsoun
2e0186f884 updating Aerial setup in TESTBench to Aerial2 and Quectel RM520N on Sphex 2024-07-25 10:32:40 +02:00
Robert Schmidt
032d4fc9ff RRC: reject PDU sessions if security is not active
OAI 5GC seems to have a bug, and occasionally might send a PDU session
setup request without having sent a UE context setup request, resulting
in no security context activated for a UE. This lead to an assertion in
rrc_gNB_process_e1_bearer_context_setup_resp().

To prevent the gNB from stopping, check if security is active before
triggering PDU sessions. If not, the gNB will reject PDU sessions.
2024-07-24 18:09:57 +02:00
Reem Bahsoun
ad5eb8cd14 Increased the the DL throughput to 150Mbps 2024-07-24 13:09:06 +02:00
Reem Bahsoun
9eeaee450b change IP address to Aerial2 in gnb conf 2024-07-24 13:06:38 +02:00
Robert Schmidt
f0f0cf8048 Merge branch 'integration_2024_w29' into 'develop'
Integration: `2024.w29`

See merge request oai/openairinterface5g!2867

* !2854 Fix NSA test
* !2715 Aerial multi l2
* !2798 CI: Create Iperf2 unidirectional function
* !2859 Switch to BWP where RA is configured when Msg3 contains MAC CE for C-RNTI
* !2861 7.2 xran: notification generation code in ru_thread excluded from compilation
* !2853 Cleanup executables focusing on NR UE
* !2860 Fix segfault in SRS modulation when ue-nb-ant-tx (fp) does not match UE capabilities
* !2863 Add configuration for CBRS RU
* !2749 immediately reuse UL/DL HARQ ID and don't wait for feedback if disable_harq == 1
2024-07-23 16:26:32 +00:00
Jaroslava Fiedlerova
4a1c505782 Merge remote-tracking branch 'origin/disable_harq' into integration_2024_w29 2024-07-23 12:17:49 +02:00
Thomas Schlichter
fae529b384 add documentation for disable_harq flag in NTN section of doc/RUNMODEM.md 2024-07-23 10:42:10 +02:00
Jaroslava Fiedlerova
409fa5d0af Merge remote-tracking branch 'origin/aerial_cbrs' into integration_2024_w29 2024-07-23 08:46:56 +02:00
francescomani
490620a0d8 gNB supported number of antenna feature set update 2024-07-22 17:53:53 +02:00
francescomani
76aaf60dd1 UE feature set update 2024-07-22 17:53:53 +02:00
Jaroslava Fiedlerova
2cb95d5505 Merge remote-tracking branch 'origin/fix-segfault-srs-antenna-ports' into integration_2024_w29 2024-07-22 15:52:55 +02:00
Raphael Defosseux
3926e140e8 fix(docker): base image for target oai-gnb-aw2s shall be jammy
Signed-off-by: Raphael Defosseux <raphael.defosseux@eurecom.fr>
2024-07-22 12:09:54 +02:00
Guido Casati
101f178c3e Verify UE capabilities at RRC UE initialization
* number of configured SRS antenna ports M <= N (number of physical antenna ports)
2024-07-22 10:46:45 +02:00
Jaroslava Fiedlerova
561119a2d6 Merge remote-tracking branch 'origin/cleanup-nr-ue-executable' into integration_2024_w29 2024-07-22 08:25:18 +02:00
Patricio Latini
a382a08bd3 Fix support for USRP UHD Versions => 4.5.0.0 2024-07-20 19:11:50 +00:00
Nick Hedberg
383eb9f5a1 Add Aerial VNF configuration file for CBRS RU 2024-07-20 07:23:11 +02:00
Jaroslava Fiedlerova
84568102de Merge remote-tracking branch 'origin/fix-7.2-mem-leak' into integration_2024_w29 2024-07-19 16:39:26 +02:00
Jaroslava Fiedlerova
95fe106a40 Merge remote-tracking branch 'origin/Msg3_MAC_CE_C-RNTI_BWP_Fix' into integration_2024_w29 2024-07-19 16:38:54 +02:00
Thomas Schlichter
b76eb19471 gNB: refactor code to handle end of using a specific HARQ process - finish_nr_dl_harq() and finish_nr_ul_harq() 2024-07-19 16:09:04 +02:00
Jaroslava Fiedlerova
8ac2c87494 Merge remote-tracking branch 'origin/ci-iperf2-func' into integration_2024_w29 2024-07-19 12:37:53 +02:00
Jaroslava Fiedlerova
140ac7d4cd Merge remote-tracking branch 'origin/Aerial_multi_L2' into integration_2024_w29 2024-07-19 12:37:16 +02:00
Guido Casati
c4570bc829 Avoid segfault in SRS modulation when ue-nb-ant-tx (fp) does not match UE capabilities
* the mismatch between UE capabilities, passed to PHY by NFAPI PDU, and --ue-nb-ant-tx
  causes a segfault in SRS modulation
* issue with indexing txdataF[p_index], which fails due to an out-of-bounds access
  since first dimension of txdataF is sized based on ue->frame_parms.nb_antennas_tx
* N_ap used in SRS modulation is based on the number of antenna ports
  in the SRS configuration (srs_config_pdu->num_ant_ports)
2024-07-19 10:44:26 +02:00
Thomas Schlichter
cd052951d5 gNB: do not schedule DLSCH ACK/NACK reporting in PUCCH for harq pid where feedback is disabled 2024-07-19 10:43:52 +02:00
Thomas Schlichter
3a014e199f NR UE: skip DLSCH ACK/NACK reporting for harq pid where feedback is disabled 2024-07-19 10:43:52 +02:00
Thomas Schlichter
fe7be3f130 Make handle_nr_uci_pucch_2_3_4() more consistent regarding logs with handle_nr_uci_pucch_0_1() 2024-07-19 10:43:52 +02:00
Thomas Schlichter
44410df598 fix double reduction of sched_ul_bytes in case of failing 4th HARQ round
sched_ul_bytes is reduced already in case the last HARQ round fails through handle_nr_ul_harq() -> abort_nr_ul_harq().
Therefore, the reduction in nr_rx_sdu() is wrong, and btw. it wrongly assumes the max. UL HARQ rounds to 4.
So simply remove this peace of code in nr_rx_sdu().
2024-07-19 10:43:52 +02:00
Thomas Schlichter
a6fb797477 improve tracking of sched_ul_bytes in nr_rx_sdu() by using sdu_lenP instead of sched_pusch.tb_size
sched_ul_bytes tracks the volume of in-flight data.
When data is successfully received, sched_ul_bytes is decreased in nr_rx_sdu().
In case of reusing HARQ processes, the tb_size stored there is not correct.
Therefore use the actual SDU size instead.
2024-07-19 10:43:52 +02:00
Thomas Schlichter
b331ad21f4 in nr_rx_sdu() use HARQ ID from nfapi_nr_crc_t instead of feedback_ul_harq 2024-07-19 10:43:52 +02:00
Thomas Schlichter
f7665357fc dont't print warning in handle_nr_ul_harq() if disable_harq == 1 2024-07-19 10:43:52 +02:00
Thomas Schlichter
9a0408a5c7 immediately reuse Msg4 HARQ ID and don't wait for Msg4 feedback if DL HARQ feedback is disabled 2024-07-19 10:43:52 +02:00
Thomas Schlichter
4baac21ec6 immediately reuse UL HARQ ID and don't wait for feedback if disable_harq == 1 2024-07-19 10:43:52 +02:00
Thomas Schlichter
bf2baf2ffe immediately reuse DL HARQ ID and don't wait for feedback if DL HARQ feedback is disabled 2024-07-19 10:43:52 +02:00
Thomas Schlichter
ae4cbcfb0c gNB: add config file option "disable_harq" and set pdsch_servingcellconfig->ext3->downlinkHARQ_FeedbackDisabled_r17 accordingly 2024-07-19 10:43:52 +02:00
Jaroslava Fiedlerova
c9a40c464e Minor fix of Iperf_analyzeV2UDP()
Don't break after first occurence of status template (interval "0.0- 1.0 sec").
With this modification we get final result, which is at the last line of log
(for interval "0.0-30.2 sec").
2024-07-18 19:31:40 +02:00
Jaroslava Fiedlerova
b790150e54 CI: Simplify Iperf_Module()
Remove code related to "rfsim4g_enb_fembms" testcase from Iperf_Module() -
replaced by Iperf2_Unidir(). Use copyin() for both remote and local
commands - no need to check if running on localhost anymore.
Create directory for log collection on executor node -
used for log collection in pipelines running on localhost.
Copy the iperf3 report to the executor machine for log collection.
The report needs to be copied to two different directories to ensure
proper log collection across all pipelines. Using absolute paths
ensures compatibility with both remote and local commands.
2024-07-18 19:31:40 +02:00
Jaroslava Fiedlerova
a6ce2896f7 CI: Create Iperf2 unidirectional function
Add new function to run iperf v2 test. Supports testing with 1 UE, unidirectional traffic.
Currently used in RFSim-4G, FeMBMS testcase.
2024-07-18 19:31:36 +02:00
Jaroslava Fiedlerova
9aeacd3455 Merge remote-tracking branch 'origin/fix-nsa-reattach' into integration_2024_w29 2024-07-18 17:34:31 +02:00
Robert Schmidt
f28f9e52ac Use gNB_mac consistently 2024-07-18 15:27:23 +02:00
Robert Schmidt
6bc486f504 Fixup: Simplify code 2024-07-18 15:27:23 +02:00
andrewse
3dd0d45907 7.2 xran: notification generation code in ru_thread excluded from compilation 2024-07-18 15:24:14 +02:00
Bartosz Podrygajlo
93280a3e75 Remove unused nr_dlsch_demod_shift command line parameter from NR UE 2024-07-18 09:31:37 +02:00
Bartosz Podrygajlo
b2a46e3b76 Remove unused variables from softmodems, focusing on NR UE: chain_offset, card_offset, numerology,
oaisim_flag, dumpframe, rx_input_level_dBm, emulate_rf
2024-07-18 09:31:37 +02:00
Bartosz Podrygajlo
19033ca822 Remove num_missed_slots from softmodems and some extra unused functions from NRUE. 2024-07-18 09:31:37 +02:00
Bartosz Podrygajlo
ead066d630 Remove unused abstraction_flag from NR UE 2024-07-18 09:31:37 +02:00
Bartosz Podrygajlo
2ff1253321 Move init_nr_bler_table out of nr-uesoftmodem.c 2024-07-18 09:31:37 +02:00
Bartosz Podrygajlo
dc91550e2c Remove unused flag single_thread_flag from softmodems. 2024-07-18 09:31:29 +02:00
Bartosz Podrygajlo
1f7ec847bc Remove tddflag. Frame type depends on band. 2024-07-18 08:28:54 +02:00
Florian Kaltenberger
612bbaeca6 documentation update 2024-07-16 17:27:50 -04:00
Florian Kaltenberger
2bee8edcab making nvIPC thread more configurable + cleanup
making aerial shm prefix configurable (so we can use muliptle VNFs per PNF)
making the nvipc thread affinity configurable and using threadCreate.
removing aerial_vnf_nr_aerial_p7_start_thread
2024-07-16 17:27:50 -04:00
Florian Kaltenberger
2fa80efb52 removing assert on RACH num_preambles>1. Instead we print an error and continue RA with only the first preamble. 2024-07-16 17:27:50 -04:00
Fredrik Molander
7ccc768805 missing sudo in Aerial entrypoint 2024-07-16 17:27:50 -04:00
Robert Schmidt
32c238925e Improve modes in FEATURE_SET.md and add NSA 2024-07-16 18:56:45 +02:00
Robert Schmidt
b12d3a4fc8 Correct nr_clear_ra_proc() for SA+NSA case, fix memory leak
In NSA, the RA process contains the RNTI of the UE to add. The previous
implementation would not remove the RNTI in NSA/for CFRA, which is
unclear (why should it stay? RA is over). Also, we did not clear all
contents, which masked a bug, as we were reusing an RA process for a
subsequent attach, leading to a segfault on reattach. That is fixed in
this commit.

Also, we were using the RA structure after having cleared it in
_nr_rx_sdu(), which semantically makes no sense.

To harmonize handling of the preambles: completely reset the RA
processes inside nr_clear_ra_proc(). For SA, also add the initialization
of allowed preambles.

Finally, this commit fixes a memory leak: we always (also in SA) fill a
list of preambles in a dynamically allocated preamble list. Since the
total list is only up to 64 preambles of 1B each, put it directly into
the struct instead of dynamically allocating it.
2024-07-16 18:53:40 +02:00
Robert Schmidt
e77912a5b9 Refactor: store secondaryCellGroup only at MAC
Remove the secondaryCellGroup variable in RRC, as it is not used there.

Note that in the case of F1, the secondaryCellGroup entirely belongs to
the DU, i.e., MAC. Also, we don't do anything with it in RRC.
2024-07-16 11:24:57 +02:00
Robert Schmidt
0a997ee08e Do not print all XnAP logs
NSA is quite verbose, some messages are large and it is not very
"interesting" for the average user. The logs can be enabled on demand,
or directly seen in Wireshark instead.
2024-07-16 11:24:57 +02:00
Robert Schmidt
ef1c85e099 Use correct RRC UE ID for PDCP, print warning if not existing 2024-07-16 11:24:57 +02:00
Robert Schmidt
3d2bf72efa Use correct RRC UE ID for NSA UEs
The RRC UE context has the RRC UE ID. Use that instead of hardcoding
something that might be wrong (because the RRC UE ID can be reused,
whereas the counter just blindly increases).

The next commit will use that RRC UE ID to free the PDCP context for the
UE. It might be wrong on reattach otherwise, because the RRC UE ID could
again be 1.
2024-07-16 11:24:57 +02:00
Robert Schmidt
09675f6544 get_default_secondaryCellGroup(): make servingCellConfig const
We simply don't need to modify the servingCellConfig, so don't do it.
2024-07-16 11:24:57 +02:00
Robert Schmidt
05aa348f80 Remove "global" UE variable spCellConfig
Variable spCellConfig is only used in function rrc_add_nsa_user(). Make
it local to this function to prevent possible bugs (limit the possible
scope as much as possible).
2024-07-16 11:24:57 +02:00
Robert Schmidt
3a18c17d5a Remove "global" UE variable reconfig
Variable reconfig is only used in function rrc_add_nsa_user(). Make it
local to this function to prevent possible bugs (limit the possible
scope as much as possible).
2024-07-16 11:24:57 +02:00
Robert Schmidt
6b62c4378b Refactor generate_CG_Config(): return CG_Config
Simplify code by returning an allocated object to a CG_Config.  It leads
to less code and is easier to reason about, because each call will
return a new CG_Config, which can be freed, irrespective of other calls
to fill_default_reconfig().
2024-07-16 11:24:57 +02:00
Robert Schmidt
c1668cd7c0 Refactor fill_default_reconfig(): return reconfig
Simplify code by returning an allocated object to an RRCReconfiguration.
It leads to less code and is easier to reason about, because each call
will return a new RRCReconfiguration, which can be freed, irrespective
of other calls to fill_default_reconfig().
2024-07-16 11:24:57 +02:00
Robert Schmidt
4cb0bd3712 Clean up servingCellConfigDedicated once after reading config
get_default_secondaryCellGroup() would "sanitize" the servingCellConfig,
i.e., remove BWP that are invalid. However, it is difficult to
understand (we can do sanitization once at the beginning) and reason
(why the servingCellConfig is modified in
get_default_secondaryCellGroup(), because all we want is a new
CellGroupConfig, without modifying other data structures).

Instead, do sanitization once after reading the configuration in
gnb_config.c. Also, modify physical simulators nr_dlsim and nr_ulsim to
apply this sanitization before a call to
get_default_secondaryCellGroup(), as the latter would have done the
sanitization.
2024-07-16 11:24:57 +02:00
Robert Schmidt
98ebd0d71e Revert "Add assertion for known segfault during teardown of gNB."
This reverts commit 4c658cdd50.

This commit was introduce to signal a known segfault. The bug has been
fixed in the last commit, so this commit can be reverted as the
AssertFatal is not necessary anymore.
2024-07-16 11:24:57 +02:00
Robert Schmidt
5bde26246f Create deep copy of ServingCellConfigCommon for UE-specific parameter
Prior to this commit, upon a release of a UE at the gNB in NSA, the gNB
fails with a segv. This is because the servingCellConfigCommon is used
in the reconfigurationWithSync (through a simple pointer). At the
release, the entire secondaryCellGroup is freed, leading to a free of
the servingCellConfigCommon. The gNB then tries to use it (e.g., for
looking up the numerology), and leading to a segv.

To avoid this problem, make a "deep copy" of the ServingCellConfigCommon
so that we can safely free the UEs secondaryCellGroup, without freeing
the initial ServingCellConfigCommon.
2024-07-16 11:24:57 +02:00
luis_pereira87
cbf8489707 Switch to BWP where RA is configured when Msg3 contains MAC CE for C-RNTI
Switch to BWP where RA is configured, typically in the InitialBWP
At this point, MAC CE for C-RNTI received at gNB, UE already switched and triggered RA in that BWP, need to do BWP switching also at gNB for that C-RNTI
2024-07-15 13:34:13 +01:00
Thomas Schlichter
e6719d7718 remove superfluous semicolon from multi-line macros in oai_asn1.h 2024-07-15 10:46:05 +02:00
Robert Schmidt
e8a083767a Merge branch 'integration_2024_w28' into 'develop'
Integration: `2024.w28`

See merge request oai/openairinterface5g!2856

* !2847 UE setting wrong frequency in 5G rfsimulator SA test
* !2850 NR UE MAC DCI 00 BWP handling
* !2852 \[E2 agent\] Move UE RRC_CONNECTED state signaling
* !2851 Minor code cleanup and fixes
* !2842 UE assertion for msg1_SubcarrierSpacing in RA
* !2831 PUSCH power control state
* !2838 NR UE UL FAPI PDU length fix
* !2723 add initial NTN support for NR UE
* !2764 Adding 7.2 containerfiles and docker-compose
* !2827 Increase RX_DATA.indication PDU Length to 32 bits
2024-07-15 06:00:37 +00:00
Robert Schmidt
4cd82e7c47 Fix array size orror in parent commit
Correct the array by taking out a verification entry in the verification
array that led to runtime error

  Assertion (numparams == (sizeof(cmdline_CheckParams)/sizeof(*(cmdline_CheckParams)))) failed!
  In get_common_options() /home/richie/openairinterface5g/executables/softmodem-common.c:109
  Error in arrays size (41!=42)
2024-07-13 20:15:18 +02:00
Robert Schmidt
1a2ae185c5 Merge remote-tracking branch 'origin/Fix_RX_DATA_PDUSize' into integration_2024_w28 2024-07-13 14:15:08 +02:00
Robert Schmidt
38284919b3 Merge remote-tracking branch 'origin/initial_NR_UE_NTN_support' into integration_2024_w28 2024-07-13 14:15:00 +02:00
Robert Schmidt
62cb46fe24 Merge remote-tracking branch 'origin/fhi-container' into integration_2024_w28 2024-07-13 14:14:31 +02:00
Raphael Defosseux
9beb1323e4 chore(ci): adding fhi Ubuntu/UBI build and docker-hub push to CI pipeline
Signed-off-by: Raphael Defosseux <raphael.defosseux@eurecom.fr>
2024-07-13 14:12:01 +02:00
arora
fe866405e7 Update the build strategy documentation
- adding information related to 7.2 images
- correcting typos and syntax
2024-07-13 14:12:01 +02:00
arora
5524b2c706 Update Openshift README to describe Openshift build 2024-07-13 14:12:01 +02:00
arora
e9b5d84eb4 Add docker compose files for deploying 7.2
- Add docker-compose.yml
- Write additional documentation
2024-07-13 14:12:01 +02:00
arora
29542595eb Add manifests for fhi72 build on openshift
Co-authored-by: Raphael Defosseux <raphael.defosseux@eurecom.fr>
2024-07-13 14:12:01 +02:00
arora
ccddddc64e Add 7.2 container dockerfiles and update existing images
- Add dedicated target docker files for 7.2, both RHEL and Ubuntu
- in existing dockerfiles, update to also build E2 SMs
- for UBI images, only the entitlements are necessary, the rest can be
  omitted (it is superfluous)

Signed-off-by: arora <sagar.arora@eurecom.fr>
Co-authored-by: Raphael Defosseux <raphael.defosseux@eurecom.fr>
2024-07-13 14:12:01 +02:00
Thomas Schlichter
394431a594 remove nrqtscope 2024-07-13 11:22:36 +02:00
Rúben Soares Silva
f58765d023 Update sdu_lenP to uint32_t in get_mac_len
Add check in lcid_crnti_lookahead to ensure subtraction to pdu_len doesn't cause an underflow
2024-07-12 13:33:15 +01:00
Jaroslava Fiedlerova
ec5fdfca5f Merge remote-tracking branch 'origin/NR_UE_fapi_pdu_length_fix' into integration_2024_w28 2024-07-12 13:04:21 +02:00
Jaroslava Fiedlerova
2d163fc747 Merge remote-tracking branch 'origin/pusch-power-control-state' into integration_2024_w28 2024-07-12 13:04:00 +02:00
Jaroslava Fiedlerova
23ed53da41 Merge remote-tracking branch 'origin/NR_UE_L839_PRACH_assertion' into integration_2024_w28 2024-07-12 12:28:27 +02:00
Raphael Defosseux
ae2a79e566 chore(ci): preparing move of all logs to cmake_targets/log folder on the python executor workspace
Signed-off-by: Raphael Defosseux <raphael.defosseux@eurecom.fr>
2024-07-12 11:47:32 +02:00
Jaroslava Fiedlerova
9dabdde3e8 Merge remote-tracking branch 'origin/test' into integration_2024_w28 2024-07-12 10:56:14 +02:00
Jaroslava Fiedlerova
0753615c85 Merge remote-tracking branch 'origin/rrc-state-fix-e2' into integration_2024_w28 2024-07-12 10:39:52 +02:00
Jaroslava Fiedlerova
9c0614d72e Merge remote-tracking branch 'origin/NR_UE_DCI_00_BWP' into integration_2024_w28 2024-07-12 10:30:58 +02:00
Jaroslava Fiedlerova
580b1a84f1 Merge remote-tracking branch 'origin/CI_wrong_freq_RFsim_test' into integration_2024_w28 2024-07-12 10:30:01 +02:00
Rúben Soares Silva
22ba6b751d Update sdu_lenP to uint32_t in lcid_crnti_lookahead and nr_process_mac_pdu 2024-07-11 16:47:39 +01:00
Rúben Soares Silva
be9b976023 Update references of sdu_lenP to uint32_t in _nr_rx_sdu 2024-07-11 16:47:38 +01:00
Rúben Soares Silva
04e6828c62 Change functions using RX_DATA.indication PDU_Length to expect 32 bits 2024-07-11 16:46:53 +01:00
Bartosz Podrygajlo
373b7d9e37 Reset NR UE PUSCH power control state if alpha or p0 is modified by gNB 2024-07-11 16:06:47 +02:00
Bartosz Podrygajlo
04c8f73616 Fix a bug where PUSCH max TX power was not dependant on number of PUSCH RBs or qm. 2024-07-11 15:03:54 +02:00
Bartosz Podrygajlo
cd8f076979 PUSCH power control state 2024-07-11 15:03:45 +02:00
Thomas Schlichter
359880fa73 rfsimulator: use ceil() to calculate the integer number of chan_offset samples from the prop_delay_ms
The actual propagation delay should not be smaller than the one specified.
A too short propagation delay might result in too early reception of Msg1, and with that in a mis-detection of the RAPID.
2024-07-11 14:48:52 +02:00
Thomas Schlichter
9dc0dc5ffe NR UE: improve PSS detection by reducing the detection step size from 8 to 4
Until commit d74b2bd19f, the PSS detection step size was 4, anyways.
The PSS detection step size is a compromise between detection duration and accuracy.
The most accurate detection step size would be 1, but this would lead to even longer initial sync time.
2024-07-11 14:43:13 +02:00
Thomas Schlichter
4ddb2d3bac add section with NR UE NTN example to doc/RUNMODEM.md 2024-07-11 13:33:30 +02:00
Thomas Schlichter
1e47311259 NR UE: use sr_ProhibitTimer_v1700 if present 2024-07-11 13:33:30 +02:00
Thomas Schlichter
75efcf49b9 NR UE: add NTN specific parameter ta-Common and use it for initial timing advance, RA_contention_resolution_timer and RA_window_cnt
The value for this parameter can be set via UE command line parameter `--ntn-ta-common` in milliseconds.
2024-07-11 13:33:30 +02:00
Raphael Defosseux
e1885f65d8 chore(ci): aligning LogCollecteNB call with BuildId option
Signed-off-by: Raphael Defosseux <raphael.defosseux@eurecom.fr>
2024-07-11 12:08:02 +02:00
francescomani
83c59b05e9 code cleanup and small fixes 2024-07-11 11:25:22 +02:00
Teodora
676ba4355c RRC_CONNECTED state signaling for E2 moved
- E2SM UE ID requires guami -> therefore RRC_CONNECTED state signaling
    to RIC is now done after receiving Initial Context Setup Request
from AMF, which contains the guami info
2024-07-10 16:06:58 +02:00
Thomas Schlichter
021f97cf10 NR UE: increase DURATION_RX_TO_TX by cellSpecificKoffset_r17 2024-07-10 15:56:05 +02:00
francescomani
910d37dd7a handling BWP for DCI 00 reception depending on SS type according to the standard 2024-07-10 15:08:32 +02:00
Thomas Schlichter
26175c5413 NR UE: add NTN specific parameter cellSpecificKoffset_r17 and use it for UL scheduling
According to the RRC specification, cellSpecificKoffset is:
Scheduling offset used for the timing relationships that are modified for NTN (see TS 38.213 [13]).
The unit of the field K_offset is number of slots for a given subcarrier spacing of 15 kHz.
If the field is absent UE assumes value 0

This parameter `cellSpecificKoffset_r17` can be set via UE command line parameter `--ntn-koffset`.
2024-07-10 14:42:42 +02:00
francescomani
6475c79453 this avoids member access within null pointer error seen in RFsim CI tests sometimes 2024-07-10 10:40:19 +02:00
Robert Schmidt
fefdac733d Merge branch 'integration_2024_w27' into 'develop'
Integration: `2024.w27`

See merge request oai/openairinterface5g!2839

* !2781 Fix several ASN.1 message related memory leaks in NR
* !2790 docker compose override files for testing with locally modified executables.
* !2835 Demote logs for NR band and duplex spacing
* !2822 security in re-establishment
* !2834 Fix CN tutorial SD value
* !2843 Delete assertion for PLMN in RRCSetupComplete
* !2771 NR UE PDSCH-CSI overlap
* !2721 T2 card: LDPC encoder/decoder TB processing
* !2828 Bugfix to TX_DATA.request PDU_Length computation, change input parameter to uint32_t
* !2841 Reduce number of LOG prints in NR UE log
* !2844 phy-test mode ULSCH schdeuler hotfix
* !2765 Fix issues blocking multiple UE in one process
* !2826 NR gNB ULSCH fixes
* !2845 Another phy-test ULSCH fix (missing TDA assignment)
* !2840 chore(build): removing dependency to libatlas3
2024-07-10 05:41:07 +00:00
Robert Schmidt
fb1e6ee740 Merge remote-tracking branch 'origin/build-no-atlas-dependency' into integration_2024_w27 2024-07-09 17:43:08 +02:00
francescomani
b14a783e86 fix for wrong frequency in 5g_rfsimulator SA test 2024-07-09 15:37:06 +02:00
Robert Schmidt
9a320a16a5 Asan: disable ODR violation detection on UE in F1 RFsim CI test 2024-07-09 12:08:52 +02:00
Robert Schmidt
4fb936d767 Merge remote-tracking branch 'origin/another_phytest_ulsch_fix' into integration_2024_w27 2024-07-09 12:08:16 +02:00
Robert Schmidt
73e3178b88 Merge remote-tracking branch 'origin/NR_gNB_ULSCH_fixes' into integration_2024_w27 2024-07-09 12:07:58 +02:00
Robert Schmidt
78b48a1e59 Merge remote-tracking branch 'origin/multiple-nr-ues' into integration_2024_w27 2024-07-09 12:07:30 +02:00
francescomani
89757758f4 missing TDA assignment in sched_ctrl for ULScH in phy-test mode 2024-07-09 10:04:09 +02:00
Robert Schmidt
148db50990 Merge remote-tracking branch 'origin/phytest_ulsch_hotfix' into integration_2024_w27 2024-07-09 07:54:50 +02:00
Robert Schmidt
4fc164953b Merge remote-tracking branch 'origin/nr-ue-reduce-logs' into integration_2024_w27 2024-07-09 07:54:33 +02:00
Robert Schmidt
fc8ed209a2 Merge remote-tracking branch 'origin/bugfix_compute_PDU_Length' into integration_2024_w27 2024-07-09 07:54:21 +02:00
Robert Schmidt
9f86e33ec2 Merge remote-tracking branch 'origin/t2-offload-mr4.1' into integration_2024_w27 2024-07-09 07:54:08 +02:00
Robert Schmidt
9c72b29f3b Merge remote-tracking branch 'origin/NR_handling_CSI_overlapping_with_PDSCH' into integration_2024_w27 2024-07-09 07:53:49 +02:00
Robert Schmidt
fcc5be01c3 Asan: disable ODR violation detection on DU in F1 RFsim CI test
address sanitizer fails with this error upon starting the DU:

  ==7==ERROR: AddressSanitizer: odr-violation (0x7f8ed2594a00):
  [1] size=4 'log_mem_write_side' /oai-ran/common/utils/LOG/log.c:78:14
  [2] size=4 'log_mem_write_side' /oai-ran/common/utils/LOG/log.c:78:14
These globals were registered at these points:
  [1]:
    #0 0x7f8ed5092658 in __asan_register_globals ../../../../src/libsanitizer/asan/asan_globals.cpp:341
    #1 0x7f8ed570d47d in call_init elf/dl-init.c:70

  [2]:
    #0 0x7f8ed5092658 in __asan_register_globals ../../../../src/libsanitizer/asan/asan_globals.cpp:341
    #1 0x7f8ed3fe3eba in call_init ../csu/libc-start.c:145
    #2 0x7f8ed3fe3eba in __libc_start_main_impl ../csu/libc-start.c:379

  ==7==HINT: if you don't care about these errors you may set ASAN_OPTIONS=detect_odr_violation=0
  SUMMARY: AddressSanitizer: odr-violation: global 'log_mem_write_side' at /oai-ran/common/utils/LOG/log.c:78:14

So we do as suggested and disable ODR violations to make the test pass.
A proper solution would be to link this function only once.
2024-07-09 07:51:24 +02:00
francescomani
f226879d3c fix ULSCH sched_frame bug in phytest mode 2024-07-08 18:36:37 +02:00
Rúben Soares Silva
d795c72990 Change compute_PDU_Length input parameter to uint32_t.
The total_length parameter in compute_PDU_Length being uint16_t causes
the passed value to be possibly truncated, which can cause the
PDU_Length to be incorrectly calculated.
This change prevents that truncation, since it now matches the size
of the values passed into the function where it is being called.
2024-07-08 15:26:00 +01:00
Robert Schmidt
94581840a0 Merge remote-tracking branch 'origin/plmn-rrcsetupcomplete-fix' into integration_2024_w27 2024-07-08 16:20:36 +02:00
Teodora
df9e5ccdd2 Fix selectedPLMNId from RRCSetupComplete
- r_amf->plmn_Identity was interpreted incorrectly, therefore remove it
- selected_plmn_identity selects one of the list of PLMNs; at the
  moment, OAI supports only 1 PLMN ID; print a warning if it is
  different, and proceed with index 0

More information in issue #801
2024-07-08 15:54:41 +02:00
Raphael Defosseux
343673b0ea chore(build): last 2 references to atlas
Signed-off-by: Raphael Defosseux <raphael.defosseux@eurecom.fr>
2024-07-08 12:31:19 +02:00
Raphael Defosseux
680c1a6b20 chore(build): no need for atlas reference in RHEL9/RockyLinux9 images
Signed-off-by: Raphael Defosseux <raphael.defosseux@eurecom.fr>
2024-07-08 12:30:48 +02:00
francescomani
ff0007cd94 tentative fix for wrong handling of ulsch decode failure 2024-07-08 11:46:43 +02:00
francescomani
bfb6e407f2 schedule msg3 retransmission for no signal scenario 2024-07-08 11:46:32 +02:00
Jaroslava Fiedlerova
e6b7195122 Update T2 doc 2024-07-08 09:30:58 +02:00
Robert Schmidt
cf497215cd Merge remote-tracking branch 'origin/fix_cn_tutorial_sd_value' into integration_2024_w27 2024-07-06 08:33:16 +02:00
Robert Schmidt
8b9891f28e Merge remote-tracking branch 'origin/bugfix-security-reestablishment-gnb' into integration_2024_w27 2024-07-06 08:33:07 +02:00
francescomani
5f754729cf improve assertion for msg1_SubcarrierSpacing in UE init RA 2024-07-05 17:00:56 +02:00
Bartosz Podrygajlo
6ce94be807 Use mac->frame_type instead of calcualting frame_type on the fly in nr_get_Pcmax 2024-07-05 16:04:35 +02:00
Raphael Defosseux
b8012a9855 chore(build): no need for atlas reference in Ubuntu images
Signed-off-by: Raphael Defosseux <raphael.defosseux@eurecom.fr>
2024-07-05 16:03:52 +02:00
luis_pereira87
2e3ee6f57d Change UE static IP (use_local_subscription_info: no) network address blocks for a 'Private-Use' range.
Address block 12.1.0.0/16 is for public use, so we should not use it for the UEs (https://www.iana.org/assignments/iana-ipv4-special-registry/iana-ipv4-special-registry.xhtml)
2024-07-05 12:49:15 +01:00
Stefan Spettel
1b9bc4f6d6 Update file oai_db.sql 2024-07-05 12:49:15 +01:00
Cedric Roux
0480b69c75 minor: typo 2024-07-05 12:38:19 +02:00
Cedric Roux
5467351935 cleanup: reduce number of parameters to pdcp's set_security()
Also adapt callers. In particular nr_pdcp_reestablishment()
2024-07-05 12:38:19 +02:00
Cedric Roux
2db259984f handle security in re-establishment 2024-07-05 12:38:19 +02:00
Cedric Roux
93f595828d cleanup nr_pdcp_config_set_security()
- make it work for SRB or DRB
- adapt callers of this function
- cleanup key derivation: the User Plane keys are generated at some places
  but are not used, remove the generation
2024-07-05 12:38:19 +02:00
Robert Schmidt
7f63a7024d Merge remote-tracking branch 'origin/demote-logs-simpler-code-band' into integration_2024_w27 2024-07-05 09:01:31 +02:00
Robert Schmidt
4fb3cfaf6a Merge remote-tracking branch 'origin/docker-local-overrides' into integration_2024_w27 2024-07-05 09:01:25 +02:00
francescomani
11855a0bc1 increase UL pdu length to uint32 in similarity to what done on the gnb 2024-07-04 16:45:30 +02:00
francescomani
e5900e0757 replacing assertions with LOG_E in UL locking mechanism 2024-07-04 13:51:34 +02:00
Robert Schmidt
141577c88b Refactor code and make shorter through ternary operator 2024-07-03 12:11:28 +02:00
Robert Schmidt
279bd1794a Demote logs for NR band and duplex spacing
Demote logs to debug: they don't provide that much information, and show
periodically in the UE. They are not useful.
2024-07-03 12:10:19 +02:00
Bartosz Podrygajlo
f325d02d33 Fix several ASN.1 message related memory leaks in NR 2024-07-03 07:29:02 +02:00
Guido Casati
514537e63e Fix images and docs links in E1AP documentation 2024-07-03 01:00:53 +02:00
Robert Schmidt
7026763286 Merge branch 'integration_2024_w26b' into 'develop'
Integration: `2024.w26` (part 2)

See merge request oai/openairinterface5g!2823

* !2794 Power control changes
* !2816 Fix test asan errors
* !2820 fix(T): some missing dependencies on T
* !2714 FAPI P5 Refactoring and unitary test creation
* !2819 Prevent unnecessary assertions for invalid DCI at NR UE
* !2825 Do not extract CSI report if PUCCH format 2 CRC check fails in polar decoder
* !2805 GUAMI decoding and storing in RRC UE context fixed
2024-07-02 12:38:22 +00:00
Robert Schmidt
27ac298515 Merge remote-tracking branch 'origin/guami-fix' into integration_2024_w26b 2024-07-01 23:11:12 +02:00
Robert Schmidt
52fcd348a0 Merge remote-tracking branch 'origin/Hotfix_PUCCH2_CRC_fail' into integration_2024_w26b 2024-07-01 20:43:45 +02:00
Robert Schmidt
9a45ecf1f9 Merge remote-tracking branch 'origin/NR_UE_prevent_unnecessary_assertions' into integration_2024_w26b 2024-07-01 20:43:35 +02:00
Robert Schmidt
e72d50bfd6 Merge remote-tracking branch 'origin/nFAPI_P5_Common' into integration_2024_w26b 2024-07-01 20:42:49 +02:00
Bartosz Podrygajlo
3c5ddf9469 Lift RLC restriction to 1 UE / process 2024-07-01 17:13:31 +02:00
Bartosz Podrygajlo
bcfe3a6733 Initialize number of NR UEs equal to --num-ues parameter 2024-07-01 17:13:05 +02:00
Bartosz Podrygajlo
d5a4272177 Add parameter --num-ues to NR UE 2024-07-01 17:11:27 +02:00
Bartosz Podrygajlo
83f66f2ade Replace 0 with module id for NR UE
Add UE id to several LOG macros
2024-07-01 17:10:39 +02:00
luis_pereira87
2c1f32b6e6 Do not extract CSI report if PUCCH format 2 CRC check fails in polar decoder
This fix prevents the scheduler to process a wrong CSI feedback message, for example, it avoids the scheduler to compute a wrong MCS from CQI or a wrong RI from CQI
2024-07-01 10:34:32 +01:00
Teodora
0a603a1000 Correctly store GUAMI in gNB_RRC_UE_t 2024-06-29 17:46:23 +02:00
francescomani
2dcfabb6de avoid TDA index assertion by rejecting the DCI with invalid parameter 2024-06-28 18:37:18 +02:00
francescomani
b8a86fecfd fix for regressions in prach scheduling functions at MAC UE in presence of multiple SSBs 2024-06-28 18:17:40 +02:00
francescomani
bf69e25676 build common DMRS and CSI overlapping bitmap outside of the RBs and REs loops 2024-06-28 12:21:44 +02:00
Jaroslava Fiedlerova
fb0d2714c6 Replace dynamic mem allocation by static for p_outDec in decode_offload 2024-06-28 11:35:18 +02:00
francescomani
f5c7fc3b11 rate-match around overlapping CSI-RS resources in PDSCH reception 2024-06-28 10:02:29 +02:00
francescomani
21744d883a code improvement and formatting 2024-06-28 10:02:29 +02:00
francescomani
f30b42d877 improvements for slot fep at UE when receiving CSI and PDSCH 2024-06-28 10:02:29 +02:00
francescomani
15191452f3 UE MAC configuration of CSIRS for PDSCH rate matching 2024-06-28 10:02:29 +02:00
Robert Schmidt
541ef60c89 Merge remote-tracking branch 'origin/hot-fix-T-dependencies' into integration_2024_w26b 2024-06-28 09:35:06 +02:00
Robert Schmidt
073812ca0c Merge remote-tracking branch 'origin/fix-test-asan-errors' into integration_2024_w26b 2024-06-28 09:34:57 +02:00
Robert Schmidt
7264f9e052 Merge remote-tracking branch 'origin/nr-ue-pusch-power-control' into integration_2024_w26b 2024-06-28 09:34:46 +02:00
Bartosz Podrygajlo
2ae138d7c0 docker compose override files for testing with locally modified executables. 2024-06-27 18:45:59 +02:00
Robert Schmidt
7a86e36ca3 Build unit tests with address sanitizer 2024-06-27 18:38:49 +02:00
Bartosz Podrygajlo
0e6b0f3e7a Fix memory leak in rlc_test_5 and rlc_test_6 2024-06-27 18:38:36 +02:00
Bartosz Podrygajlo
9724ff0329 Fix memory leaks and heap buffer overflow in test_thread-pool. 2024-06-27 18:35:43 +02:00
Jaroslava Fiedlerova
432fee1a6e Configure T2 EAL Parameters via Command Line
- Introduced command line and configuration options to set up PCI address, CPU cores used by DPDK, and DPDK file prefix for T2 offload.
- Made the dpdk_dev parameter (for setting the PCI address of the T2) mandatory.
- Configure dpdk_dev in the CI test cases.
2024-06-27 14:53:17 +02:00
Jaroslava Fiedlerova
fe0d70e8f3 Replace bbdev TEST_ASSERTs by OAI macro AssertFatal()
- Replaced bbdev TEST_ASSERTs with the OAI macro AssertFatal() to harmonize error handling.
- Removed unused functions and macros from nrLDPC_offload.h.
2024-06-27 14:47:32 +02:00
Jaroslava Fiedlerova
6bec8779c6 Enhance T2 Offload for gNB and UE
- Reworked nrLDPC_decoder_offload.c to process all segments in a TB with a single call to LDPCdecoder() or LDPCencoder().
- Perform CRC checks on the T2.
- Modified nr_ulsch_decoding (gNB decoder) to:
  - Count processed segments.
  - Properly perform CRC checks.
- Created a constant NR_LDPC_MAX_NUM_CB to define the maximum number of codeblocks.
- Conditional library loading:
  - On gNB: Load ldpc_t2 library if offload is enabled using the --ldpc-offload-enable flag.
  - On UE: Load both ldpc_t2 and ldpc libraries since only encoder offload is supported.
- General cleanup of nrLDPC_decoder_offload.c for improved readability and maintainability.
- Modified the structure of LDPC encoder/decoder/offload parameters:
  - Introduced a structure for code block (CB) related parameters.
  - Removed parameter E from the encoder and offload parameter structures for clarity.
  - Replaced E with perCB->E_cb in the UE encoder code.
2024-06-27 14:40:41 +02:00
Raphael Defosseux
0f76ac5868 fix(T): some missing dependencies on T
Signed-off-by: Raphael Defosseux <raphael.defosseux@eurecom.fr>
2024-06-27 12:44:43 +02:00
francescomani
caa45af197 making aperiodic SRS feedback time dependent on what set in config at gNB (to avoid UE assertion) 2024-06-27 11:16:16 +02:00
francescomani
273018ea48 returning instead of asserting for invalid K2 in aperiodic CSI 2024-06-27 11:13:42 +02:00
Robert Schmidt
5af81bbc9d Merge branch 'integration_2024_w26' into 'develop'
Integration: `2024.w26`

See merge request oai/openairinterface5g!2815

* !2750 Add Ubuntu 24.04 to/retire Ubuntu 18.04 from supported distributions, use Ubuntu 22 for CI container images
* !2793 Option '-O' in phy simulators to provide a configuration file
* !2797 Increase TX_DATA.request TB buffer size, fix compute_PDU_Length
* !2814 Update documentation and FEATURE SET
* !2720 Remove thread-pool Makefile
* remove extra log
2024-06-26 14:02:52 +00:00
Robert Schmidt
d1e6b9507c Revert log level change on HARQ occasion
This reverts a change in commit
ccba7c875d. There is no real reason to
show this warning (the gNB will work just fine, simply not schedule
since no free HARQ) and it makes users unsure.
2024-06-26 14:43:05 +02:00
Robert Schmidt
ca8babd7b6 Merge remote-tracking branch 'origin/remove-threadpool-makefile' into integration_2024_w26 2024-06-26 13:01:33 +02:00
Robert Schmidt
aa47716a27 Merge remote-tracking branch 'origin/doc-updates' into integration_2024_w26 2024-06-26 12:51:59 +02:00
Robert Schmidt
8035cad75a Merge remote-tracking branch 'origin/Fix_Aerial_TBSize' into integration_2024_w26 2024-06-26 12:51:52 +02:00
Robert Schmidt
3b69bc278a Merge remote-tracking branch 'origin/fix_physim_configmodule_O' into integration_2024_w26 2024-06-26 12:51:44 +02:00
Robert Schmidt
6c3675905e Merge remote-tracking branch 'origin/support-ubuntu-24.04' into integration_2024_w26 2024-06-26 12:51:24 +02:00
Bartosz Podrygajlo
b1f7cc9025 Add unit testcase for thread-pool.
Extract thread-pool into a separate CMake library.
Extract utils into a separate CMake library.
2024-06-26 10:17:25 +02:00
Bartosz Podrygajlo
deacf439a4 CMakeLists for common/utils/LOG 2024-06-26 10:17:15 +02:00
Bartosz Podrygajlo
d6f425adc6 Remove unused directory ALG_DS 2024-06-26 10:13:00 +02:00
Bartosz Podrygajlo
28489a29ba Remove references to unused library OML 2024-06-26 10:12:28 +02:00
Bartosz Podrygajlo
8ea2e77ab2 PUSCH power control without PUSCH power control state 2024-06-26 10:08:33 +02:00
Robert Schmidt
760aee6d29 Correct link in build instructions 2024-06-26 09:18:18 +02:00
Robert Schmidt
ca54d75f3e README.md: update folder structure info 2024-06-26 09:18:18 +02:00
Robert Schmidt
9e694c228e Stream line information on how to get sources
- come straight to point: how to clone (don't talk about git config)
- refer to contributing documentation where necessary instead of
  repeating information
2024-06-26 09:18:18 +02:00
Robert Schmidt
6ba76d6ac1 Update FEATURE_SET
- CellGroupConfig is handled through DU (hence MAC)
- mention number of DUs/CU-UPs handled per CU-CP
- mention number of UEs handled
- take out BWPs, as we don't support it properly
- typos
2024-06-25 18:50:35 +02:00
Bartosz Podrygajlo
d41a6e0524 Remove hardcode for minimum TX power 2024-06-25 18:11:26 +02:00
Bartosz Podrygajlo
d8572d5569 Fixed MPR application conditions.
Fixed delta MPR.
Fixed an error in PUCCH PC_MAX calculation.
2024-06-25 18:11:17 +02:00
Robert Schmidt
ee57ae6598 doc/cross-compile.md: update some text, compile with ninja 2024-06-25 17:02:03 +02:00
Robert Schmidt
199f8c21cb Update cross-compilation builder to Ubuntu 22
Update instructions and CI for cross-compilation on Ubuntu 22.
Note that for the dockerfile, we use egrep -L which has changed and does
not exit with code 0 on no match. Instead, use -vqz to invert return
code (0 if nothing found, otherwise 1).
2024-06-25 17:02:03 +02:00
Raphael Defosseux
70719c3b8f fix(test): using older version of iperf2 for lte feMBMS RF-sim test
iperf2 2.0.13, used in Ubuntu 20, does not need a "back channel"; we can
therefore use it in feMBMS (which does a broadcast, without back
channel). Ubuntu 22 comes with 2.1.5, which seems to require a back
channel, or at least, we cannot use it reliably in feMBMS. Hence,
downgrade to older iperf2 version.

Signed-off-by: Raphael Defosseux <raphael.defosseux@eurecom.fr>
2024-06-25 17:02:03 +02:00
Robert Schmidt
94497435e7 Upgrade CI images to Ubuntu 22
This updates all images in the CI to Ubuntu 22. It also updates
corresponding documentation. Remove python(2) from the image, as it is
not needed. Update documentation.

It seems that the gcc coming in Ubuntu 22 does not like
stack-protector-strong, so remove it as well.

Since we compile Flexric, which does not support Ubuntu 22's default
gcc-11 (it hits a compile bug), switch to gcc-12 manually.

Since we update the compiler, we also need to be careful to use the right
address sanitizer version (which is bundled with the compiler version).
To avoid a reinstallation of the wrong asan version in target images, we
modify Ubuntu 22 targets to copy libasan from the base image. This is necessary
since we use update-alternative in the base image, but we don't want to
install compilers in the target images to use update-alternatives to
install the right asan version... This should be undone when switching
to Ubuntu 24 in the future, as it will have a newer default gcc version,
such that we don't need to update the compile in the first place.

Upgrade libpython in lteUE for U22 upgrade to make it compatible with
UHD.
2024-06-25 17:02:03 +02:00
Robert Schmidt
b6f156cf4a Switch to branch that resolves flexric warnings
A number of warnings appear when compiling flexric with gcc-12, which we
use in the next commit. Those have been fixed upstream. Switch to the
updated version to avoid warnings.
2024-06-25 17:02:03 +02:00
Robert Schmidt
0abe8b6493 Fixup: we are now at fedora 40, update link 2024-06-25 17:02:03 +02:00
Robert Schmidt
8ddc49e5e8 CBLAS_TRANSPOSE is a typedef'd enum
It seems libatlas-base-dev provided an `enum CBLAS_TRANSPOSE`, but we
don't install it anymore. Now, in Ubuntu, there is only a typedef'd
version in cblas.h; for RHEL(-derivatives), the same typedef'd version
is in cblas/cblas.h.
2024-06-25 17:02:02 +02:00
Robert Schmidt
4ac6e1c83d Update build_oai help 2024-06-25 17:02:02 +02:00
Robert Schmidt
53ff69ed04 Bump required cmake version to v3.16
Debian 11: cmake 3.18
Fedora 40: cmake 3.29
RHEL 9: installs cmake3, which is typically very recent, likely 3.29
Ubuntu 20: cmake 3.16
2024-06-25 17:02:02 +02:00
Robert Schmidt
473e7207db Remove Ubuntu 18.04 from supported distributions
Ubuntu 18.04 is now in "Extended Security Maintenance", but otherwise
gets no updates. Remove it from supported distributions (regarding
installing packages); users can of course still use it.

Users are encouraged to upgrade to Ubuntu 20+.
2024-06-25 17:02:02 +02:00
Robert Schmidt
3b0f4479c4 Add Ubuntu 24.04 to supported distributions
Apart from the obvious change of adding ubuntu24.04 to supported
distributions, we need to remove liblapacke-dev as it is incompatible
with libatlas3-base. Installing both aborts with:

   The following packages have unmet dependencies:
   liblapacke : Breaks: libatlas3-base (< 3.10.3-14) but 3.10.3-13ubuntu1 is to be installed

It seems that we don't need it though, as liblapacke-dev installs the
right atlas library as a dependency.
2024-06-25 17:02:02 +02:00
Rúben Soares Silva
8159abdcd3 Change TX_DATA.request PDU_Length and TLV length parameters to 32 bit in related pack/unpack procedures.
Fix small issue noted when packing tlv value with tag 1 in which it would pack length*4 bytes, now calculated how many "segments" of 32 bits it needs to pack, same logic for unpacking tag value 1
2024-06-25 13:50:53 +01:00
Rúben Soares Silva
4033606fff Increase TX_DATA.request TB buffer size to be allocated in the stack with 2MB, fix compute_PDU_Length to not truncate value and fix packing procedure to use buffer size as the upper limit instead of hardcoded value 2024-06-25 13:50:53 +01:00
Rúben Soares Silva
6fc8eb0fee Change parameter type of pack_dci_payload and unpack_dci_payload to avoid -Wstringop-overflow warning.
Change declaration of unpack_buf in dci_inversion_test to not require calloc
2024-06-25 11:53:41 +01:00
Rúben Soares da Silva
d35dbe6377 Fix packing/unpacking procedures for DCI payload with inversion
Add unitary test for DCI payload pack/unpack with random length/data
2024-06-25 11:53:41 +01:00
Rúben Soares da Silva
df1cb77000 Remove dependency to NFAPI_LIB from nr_fapi_p5 library after having moved the functions related to all P5 messages 2024-06-25 11:53:41 +01:00
Rúben Soares da Silva
32bbd64a97 Move functions for packing/unpacking ERROR.indication
Add unitary test for ERROR.indication ( test pack/unpack, free, copy and compare )
2024-06-25 11:53:41 +01:00
Rúben Soares da Silva
c95c12e874 Add utility functions related to ERROR.indication 2024-06-25 11:53:41 +01:00
Rúben Soares da Silva
1d6dc56797 Move functions for packing/unpacking STOP.indication
Add unitary test for STOP.indication ( test pack/unpack, free, copy and compare )
2024-06-25 11:53:41 +01:00
Rúben Soares da Silva
97afd62522 Add utility functions related to STOP.indication 2024-06-25 11:53:41 +01:00
Rúben Soares da Silva
9623f49a2e Move functions for packing/unpacking STOP.request
Add unitary test for STOP.request ( test pack/unpack, free, copy and compare )
2024-06-25 11:53:41 +01:00
Rúben Soares da Silva
c7d2a108be Add utility functions related to STOP.request 2024-06-25 11:53:41 +01:00
Rúben Soares da Silva
7307bd4ead Move functions for packing/unpacking START.response
Add unitary test for START.response ( test pack/unpack, free, copy and compare )
2024-06-25 11:53:41 +01:00
Rúben Soares da Silva
2bdc9de0af Fix packing/unpacking procedures for START.response
Add utility functions related to START.response
2024-06-25 11:53:41 +01:00
Rúben Soares da Silva
2c676865dc Move functions for packing/unpacking START.request
Add unitary test for START.request ( test pack/unpack, free, copy and compare )
2024-06-25 11:53:41 +01:00
Rúben Soares da Silva
442097e69a Add utility functions related to START.request 2024-06-25 11:53:41 +01:00
Rúben Soares da Silva
7e440ae3a9 Move functions for packing/unpacking CONFIG.response
Add unitary test for CONFIG.response ( test pack/unpack, free, copy and compare )
2024-06-25 11:53:41 +01:00
Rúben Soares da Silva
52aff43e2d Fix packing/unpacking procedures for CONFIG.response
Add utility functions related to CONFIG.response
2024-06-25 11:53:41 +01:00
Rúben Soares da Silva
23a2f63830 Move functions for packing/unpacking CONFIG.request
Add unitary test for CONFIG.request ( test pack/unpack, free, copy and compare )
2024-06-25 11:53:41 +01:00
Rúben Soares da Silva
4602feea3b Fix packing/unpacking procedures for CONFIG.request
Add utility functions related to CONFIG.request
2024-06-25 11:53:41 +01:00
Rúben Soares da Silva
79bde47b57 Move functions for packing/unpacking PARAM.response
Add unitary test for PARAM.response ( test pack/unpack, free, copy and compare )
2024-06-25 11:53:41 +01:00
Rúben Soares Silva
34ea6c7a90 Fix packing/unpacking procedures for PARAM.response
Added missing support for packing/unpacking tag 0x001C (supportedMaxModulationOrderDl)

Now properly handles tag 0x0005 (NumConfigTLVsToReport) and subsequent TLVs that come after this value ( Table 3-9 SCF 222.10.02 )
2024-06-25 11:53:41 +01:00
Rúben Soares Silva
61a3125d24 Add utility functions related to PARAM.response 2024-06-25 11:53:41 +01:00
Rúben Soares Silva
88bbb5f520 Fix typo in NFAPI_NR_PARAM_TLV_MAX_PDSCH_S_YBS_PER_SLOT_TAG define 2024-06-25 11:53:41 +01:00
Rúben Soares da Silva
2a482e7f49 Move functions for packing/unpacking PARAM.request
Add unitary test for PARAM.request ( test pack/unpack, free, copy and compare )
2024-06-25 11:53:41 +01:00
Rúben Soares Silva
e19b71409f Add utility functions related to PARAM.request 2024-06-25 11:53:41 +01:00
Rúben Soares da Silva
5ef1217acc Add nr_fapi_p5_utils.c/.h to nr_fapi_p5 library, with the objective of defining functions to compare, properly free and copy P5 FAPI message 2024-06-25 11:53:41 +01:00
Rúben Soares Silva
da9fe96efc Move general FAPI P5 message pack procedure from fapi_vnf_p5 into FAPI P5 library.
Implement FAPI P5 message unpack, as well as message length check function procedure in FAPI P5 library.
Update check_nr_unpack_length in nfapi_p5.c to reference FAPI P5 message length check function.
2024-06-25 11:53:38 +01:00
Robert Schmidt
707aab3af1 Merge branch 'integration_2024_w25' into 'develop'
Integration: `2024.w25`

See merge request oai/openairinterface5g!2811

* !2795 NR UE NL assertion
* !2802 Fix regression in ue-scan-carrier option
* !2806 Minor fixes to wireshark documentation
* !2807 Add assertion for known segfault during teardown of gNB
* !2809 Inversion in flags name
* !2697 SIDELINK PSBCH: MAC->PHY cfg, Scheduler + supporting functions, enable system testing & scope
* !2808 NR UE DLSCH MCS table selection improvements
2024-06-25 10:02:24 +00:00
Romain Beurdouche
327b9a8b70 fix(phy_simulators): enable the use of option -O to pass a configuration file to configmodule in phy simulators 2024-06-25 10:38:09 +02:00
Romain Beurdouche
a476e18120 fix(phy_simulators): replace option -Operf by option -Tperf in LTE ulsim and dlsim 2024-06-25 10:35:10 +02:00
Romain Beurdouche
edcd0019d2 fix(nr_pbchsim): replace option -O by option -c 2024-06-25 10:29:29 +02:00
Robert Schmidt
88ca38287f Merge remote-tracking branch 'origin/NR_UE_DLSCH_MCS_table_improvements' into integration_2024_w25 2024-06-25 08:20:12 +02:00
Robert Schmidt
1b989c4d15 Merge remote-tracking branch 'origin/NR_PSBCH_MERGE3' into integration_2024_w25 2024-06-25 08:20:01 +02:00
Rúben Soares da Silva
350746f4f6 Creation of empty FAPI P5 library in preparation for separation of related functions
Note: nr_fapi_p5 dependence in NFAPI_USER_LIB will be removed in a later commit
2024-06-24 15:06:59 +01:00
Rúben Soares Silva
23d792a0bd Expose packing/unpacking functions for (n)FAPI P5 messages for FAPI library creation
Will be reused from other files in later commits.
Added packing/unpacking procedures for STOP.indication and ERROR.indication.
Separate a packing function for STOP.request for use in the NR FAPI library.
2024-06-24 15:06:57 +01:00
Rúben Soares Silva
489300f82d Change STOP.request struct name to follow naming convention of struct for the other messages
Add struct representing ERROR.indication message
2024-06-24 14:55:14 +01:00
Rúben Soares Silva
40783ea351 Fix START.response Message ID, from Table 3-5 of SCF222.10.04.
Apply clang-format to enumeration.
2024-06-24 14:55:10 +01:00
Rúben Soares da Silva
e8bb01579d aerial_lib: include header instead of source file
Expose needed (n)FAPI procedures to aerial_lib ( both P5 and P7 ) via a
header file.
Move (n)FAPI P7 packing/unpacking function interface into separate header file
Include needed headers in aerial_lib
2024-06-24 14:52:40 +01:00
Rúben Soares da Silva
4384ea2b59 Properly add compile definitions related to aerial_lib into targets that depend on it ( ENABLE_AERIAL )
Add target_compile_definitions to L2_NR library in order to propagate #define in gnb_config.c
2024-06-24 14:51:48 +01:00
Rúben Soares Silva
612e6bbc3d Apply clang-format to nfapi.c 2024-06-24 14:51:45 +01:00
Robert Schmidt
e61b977878 Create nfapi_common library with packing/unpacking functions common to (n)FAPI for 4G+5G 2024-06-24 14:15:26 +01:00
Robert Schmidt
2908cd51ea Use add_subdirectory() for nfapi/ subdirectory 2024-06-24 14:15:26 +01:00
Rúben Soares da Silva
4d4eb6c8cf Move nFAPI functions that are used by both NR and LTE into nfapi.c
Co-authored-by: Robert Schmidt <robert.schmidt@openairinterface.org>
2024-06-24 14:15:23 +01:00
Raghavendra Dinavahi
798ceeeef2 SL PSBCH: MAC->PHY cfg, PSBCH scheduler + supporting functions + enable system testing & scope
- Phy config update and Sidelink frame parameters initialisation
	- PSBCH scheduler to trigger TX PSBCH/RX PSBCH actions
	- Sidelink indication with rx ind to trigger send SL-MIB to MAC
	- Enable Scope for PSBCH use -d or --dqt
	- Enable system testing of PSBCH for example using RFSIMULATOR:

		- UE1 is a SYNCRONISATION SOURCE UE which transmits PSBCH

		  started using command -
		  sudo ./nr-uesoftmodem --sl-mode 2 --sync-ref 4 --rfsim --rfsimulator.serveraddr server

		- UE2 syncs onto UE1 during sidelink search, gets the timing and continues to receive PSBCH

		  started using command -
		  sudo ./nr-uesoftmodem --sl-mode 2 --rfsim --rfsimulator.serveraddr 127.0.0.1

		- In the default use case 2 Sidelink SSBs sent over 16 frames.

		- In case SL-SSB configuration needs to be changed use -O option in the above command like

		-O ../../../targets/PROJECTS/NR-SIDELINK/CONF/sidelink_preconfig_1txpool.conf
2024-06-21 09:40:16 +02:00
Raphael Defosseux
d2f8276d14 Merge remote-tracking branch 'origin/dump-debug-inverted' into integration_2024_w25 2024-06-21 09:31:49 +02:00
Raphael Defosseux
a7273f0da0 Merge remote-tracking branch 'origin/assert-before-segfault-ssb-scs' into integration_2024_w25 2024-06-21 09:31:38 +02:00
Raphael Defosseux
2de46b9e79 Merge remote-tracking branch 'origin/update-doc-wireshark' into integration_2024_w25 2024-06-21 09:31:22 +02:00
Raphael Defosseux
4639458f22 Merge remote-tracking branch 'origin/fix-regression-ue-scan' into integration_2024_w25 2024-06-21 09:31:04 +02:00
Raphael Defosseux
100d3b3acd Merge remote-tracking branch 'origin/NR_UE_handle_layer_assertion' into integration_2024_w25 2024-06-21 09:30:37 +02:00
Raphael Defosseux
69962ef9ab Merge branch 'integration_2024_w24' into 'develop'
Integration: `2024.w24`

See merge request oai/openairinterface5g!2801

* !2789 CI: Increase iperf/iperf3 command timeout
* !2762 improve nrUE NAS security: accept NEA1,NEA2,NIA1,NIA2
* !2791 fix regressions for large physical cell id values
* !2792 Add support for MIMO 2x2 with USRP B210 at 20 MHz BW and 3/4 sampling rate
* !2748 Small UE fixes
* !2745 Add google test testcases for nr_get_Pcmax
* !2785 Update FHI 7.2 interface, test bandwidths, fix integer overflows
2024-06-20 05:16:28 +00:00
Raphael Defosseux
bbc82731f7 Merge remote-tracking branch 'origin/update-fhi7.2' into integration_2024_w24 2024-06-19 13:55:52 +02:00
Laurent THOMAS
9aaa7f100a Inversion in flags name 2024-06-19 13:49:00 +02:00
Bartosz Podrygajlo
4c658cdd50 Add assertion for known segfault during teardown of gNB. 2024-06-18 13:25:59 +02:00
Guido Casati
dbc84d91fc Minor fixes to wireshark documentation
* the goal is to make the documentation more procedural and
  descriptive and easier to understand
* added missing info in RLC-NR about reassembling of AM frames
2024-06-17 18:31:25 +02:00
Teodora
b09d241151 GUAMI decoding fixed
- GUAMI is received from INITIAL UE CONTEXT SETUP REQUEST
  - using BIT STRING instead of OCTET STRING, as per spec
2024-06-17 14:20:53 +02:00
Jaroslava Fiedlerova
2b28b735c2 Merge remote-tracking branch 'origin/nr-pcmax-googletest' into integration_2024_w24 2024-06-14 15:32:01 +02:00
Jaroslava Fiedlerova
5b52752a30 Merge remote-tracking branch 'origin/NR_UE_DAI_hotfix' into integration_2024_w24 2024-06-14 12:45:55 +02:00
Jaroslava Fiedlerova
4aa9ffc9e6 Merge remote-tracking branch 'origin/MIMO_2x2_B210' into integration_2024_w24 2024-06-14 12:45:29 +02:00
francescomani
ad3427107a full procedure to select MCS table for DLSCH at MAC UE 2024-06-13 19:43:30 +02:00
Sakthivel Velumani
dd4eb9f8bc Fix regression in ue-scan-carrier option 2024-06-13 13:31:33 -04:00
Jaroslava Fiedlerova
5b64f685e4 Merge remote-tracking branch 'origin/fix-regressions-large-physicalCellId' into integration_2024_w24 2024-06-13 17:27:55 +02:00
Jaroslava Fiedlerova
64f55693e3 Merge remote-tracking branch 'origin/nrue-nas-security' into integration_2024_w24 2024-06-13 13:50:17 +02:00
Jaroslava Fiedlerova
4d51b344a1 Merge remote-tracking branch 'origin/ci-increase-iperf-timeout' into integration_2024_w24 2024-06-13 13:49:47 +02:00
Bartosz Podrygajlo
b20561c451 Add libgtest-dev package to unittest image 2024-06-13 10:15:55 +02:00
Bartosz Podrygajlo
fadd3d0083 Add unit test build log to artifacts 2024-06-13 10:15:45 +02:00
Bartosz Podrygajlo
44dc8f8daa Add google test testcases for nr_get_Pcmax. 2024-06-13 10:15:32 +02:00
Bartosz Podrygajlo
4a36f7dd7b Extract nr_common and nr_phy_common libs. Also add unit tests for nr_common 2024-06-13 10:14:59 +02:00
Bartosz Podrygajlo
9c913fa040 Introduce googletest library
The library will be either found in the system or downloaded via FetchContent.
2024-06-13 10:13:28 +02:00
Jaroslava Fiedlerova
6312587621 Fix integer overflow
Avoid UBSan error:
  openair1/PHY/NR_TRANSPORT/nr_ulsch_demodulation.c:1524:41: runtime error: signed integer overflow: 737285888 + 1459370880 cannot be represented in type 'int'
2024-06-12 10:36:58 +02:00
Jaroslava Fiedlerova
4980be04f3 Fix integer overflow
Avoid UBSan error:
  openair1/SCHED_NR/phy_procedures_nr_gNB.c:867:37: runtime error: signed integer overflow: 1744750952 + 412859840 cannot be represented in type 'int'
2024-06-12 10:34:45 +02:00
Jaroslava Fiedlerova
b17354b74f Fix integer overflow
Avoid UBSan error:
  openair1/PHY/NR_ESTIMATION/nr_measurements_gNB.c:246:18: runtime error: signed integer overflow: 1457321472 + 922889664 cannot be represented in type 'int'
2024-06-12 10:29:50 +02:00
Jaroslava Fiedlerova
516b91fc90 Fix integer overflow
Avoid UBSan error:
  openair1/SCHED_NR/phy_procedures_nr_gNB.c:869:43: runtime error: signed integer overflow: 1546663455 + 1635930955 cannot be represented in type 'int'
2024-06-12 10:25:50 +02:00
francescomani
54cc2e0bb5 preventing UE assertion on number of layers = 0 by rejecting TB earlier if that happens 2024-06-12 08:45:37 +02:00
Jaroslava Fiedlerova
9fab212441 Update ORAN_FHI7.2 doc - add tx_amp_backoff_dB info 2024-06-11 14:23:10 +02:00
Raphael Defosseux
297ef9d139 Merge branch 'ci-bump-up-nvidia-cubb' into 'develop'
chore(ci): bumping up nvidia-aerial to 24-1

See merge request oai/openairinterface5g!2780
2024-06-11 07:40:28 +00:00
Reem Bahsoun
6cfb5b7ace prevents thread from being pinned to core 8, to avoid L2 L1 overlap 2024-06-10 14:31:35 +02:00
Laurent THOMAS
37e6e7e944 add test physical cell id in 5G range 2024-06-10 10:51:16 +02:00
Laurent THOMAS
45d4cec2a6 fix regressions for large physical cell id values 2024-06-10 10:51:08 +02:00
luis_pereira87
ce0f48d2b2 Add support for MIMO 2x2 with USRP B210 at 20 MHz BW and 3/4 sampling rate
Tested with B210 and Quectel RM500Q-GL
2024-06-07 15:16:20 +01:00
Raphael Defosseux
a5bf6c7812 chore(ci): addressing reviewer comments: cleanup network conf
Signed-off-by: Raphael Defosseux <raphael.defosseux@eurecom.fr>
2024-06-07 15:18:30 +02:00
Raphael Defosseux
3405bcf926 chore(doc): updating the TestBench list after aerial1 migration
Signed-off-by: Raphael Defosseux <raphael.defosseux@eurecom.fr>
2024-06-07 09:47:11 +02:00
Raphael Defosseux
99643acf2e Original Author: Nick Hedberg <nhedberg@nvidia.com>
Updates to default config for 24.1 and current best performance
2024-06-07 09:09:08 +02:00
Robert Schmidt
9055fabe9b Merge branch 'integration_2024_w23' into 'develop'
Integration: `2024.w23`

See merge request oai/openairinterface5g!2788

* !2510 NR UE MAC UCI on PUSCH and aperiodic CSI reporting
* !2597 LTTng logger (CTF)
* !2751 synch the USRP time accross devices using the host clock
* !2775 Remove some global variables
* !2779 remove rb_mask_ul from permanent storage for stack local usage
* !2782 USRP: add a T trace to record the RX IQ data on antenna 0
* !2783 build_oai: fix bad options' names
* !2753 Pucch power control
2024-06-06 12:55:36 +00:00
Raphael Defosseux
e120f54f30 fix(aerial): configuration modifications to migrate CI run to aerial1
* IP address of VNF shall be aerial1's one
 * scripts within cubb container shall be run with sudo now

Signed-off-by: Raphael Defosseux <raphael.defosseux@eurecom.fr>
2024-06-06 14:39:22 +02:00
Jaroslava Fiedlerova
e60f82ccc2 Increase iperf test timeout
In some testcases, especially when iperf test duration is short (10s),
client does not report on time and report collection is interrupted.
This commit increase timeout for iperf/iperf3 commands.
2024-06-06 14:22:06 +02:00
Robert Schmidt
3c5edab8f5 Fix memory leak: free NotifiedFIFO_elt 2024-06-06 12:37:07 +02:00
Robert Schmidt
f4659b2b0c Fix integer overflow
Avoid UBSan error:
  openair1/PHY/NR_ESTIMATION/nr_measurements_gNB.c:183:22: runtime error: signed integer overflow: 2122747784 + 27403601 cannot be represented in type 'int'
2024-06-06 12:36:59 +02:00
Robert Schmidt
0199d861b7 Fix integer overflow
avoid UBsan error:
  openair1/PHY/NR_TRANSPORT/pucch_rx.c:266:21: runtime error: signed integer overflow: 2113190528 + 117251752 cannot be represented in type 'int'
2024-06-06 12:36:50 +02:00
Robert Schmidt
321c475176 Fix integer overflow
avoid UBsan error:
  openair1/PHY/NR_TRANSPORT/nr_ulsch_demodulation.c:459:77: runtime error: signed integer overflo w: 2009540296 + 668087372 cannot be represented in type 'int'
2024-06-06 12:36:40 +02:00
Robert Schmidt
a9718835d4 7.2 FH: auto-compute FFT size 2024-06-06 12:36:40 +02:00
Robert Schmidt
00b62ab6c0 Merge remote-tracking branch 'origin/pucch-power-control' into integration_2024_w23 2024-06-06 08:53:06 +02:00
Robert Schmidt
517effa586 Merge remote-tracking branch 'origin/fix-build-oai' into integration_2024_w23 2024-06-06 08:40:48 +02:00
Robert Schmidt
18125459dc Merge remote-tracking branch 'origin/t-usrp-rx-ant0' into integration_2024_w23 2024-06-06 08:40:42 +02:00
Robert Schmidt
86bd6de7dd Merge remote-tracking branch 'origin/rb_mask_ul-on-stack' into integration_2024_w23 2024-06-06 08:40:36 +02:00
Robert Schmidt
4e4a59b5bc Merge remote-tracking branch 'origin/remove-globals-nas' into integration_2024_w23 2024-06-06 08:40:30 +02:00
Robert Schmidt
d58bedaed1 Merge remote-tracking branch 'origin/multi_usrp_frame_sync' into integration_2024_w23 2024-06-06 08:39:49 +02:00
Robert Schmidt
9a4e9a2adc Merge remote-tracking branch 'origin/lttng-basic' into integration_2024_w23 2024-06-06 08:39:42 +02:00
Anurag Asokan
582e8302c6 LTTng logger (CTF)
This commit introduces LTTng logging mechanism which is an open source
tracing tool.

URL: https://lttng.org/
2024-06-06 07:23:17 +02:00
francescomani
f94941b5e6 fix for UCI on PUSCH fapi PDU configuration in case of only HARQ bits 2024-06-05 19:37:15 +02:00
francescomani
165afbd5b5 improve handling of CSI-MeasConfig setup 2024-06-05 19:37:10 +02:00
francescomani
f5f9983173 fix in setup and release of aperiodicTriggerStateList 2024-06-05 19:21:29 +02:00
francescomani
12e1045d2a fix for MAC template with CSI report config 2024-06-05 19:21:28 +02:00
francescomani
c985a794c7 fix UE uci on PUSCH config 2024-06-05 19:15:09 +02:00
francescomani
33b19935ff uci on pusch at MAC UE 2024-06-05 19:15:04 +02:00
francescomani
830b8a208a handling reception of CSI command for aperiodic CSI reporting 2024-06-05 19:07:31 +02:00
Robert Schmidt
489824fdcf Enforce gcc/g++-11 when building 7.2 FHI through xran 2024-06-05 17:01:35 +02:00
Robert Schmidt
98e9129d69 Allocate sufficient buffers for 1x1 config
xran's xran_bm_init() uses rte_pktmbuf_pool_create() to allocate DPDK
buffers. For a 1x1 configuration, the number of buffers might be too
small, and rte_pktmbuf_pool_create() might fail. This commit ensures
that we increase the number of buffers to have enough even in a 1x1
configuration. This works by chosing the next power of two, which is
recommended as per DPDK documentation.

Closes-Bug: #750
2024-06-05 17:01:35 +02:00
Robert Schmidt
f7917abb28 Print xran headers version used during compilation 2024-06-05 17:01:35 +02:00
Robert Schmidt
cd5822e927 Update FHI 7.2 ORAN patch: unaligned access, detect/handle PRACH packets 2024-06-05 17:01:35 +02:00
Raphael Defosseux
39518b19d5 fix(build): 24-1 code does not require patching anymore
Signed-off-by: Raphael Defosseux <raphael.defosseux@eurecom.fr>
2024-06-05 15:23:08 +02:00
Cedric Roux
ae60dede8e build_oai: fix bad options' names 2024-06-05 15:15:35 +02:00
Cedric Roux
1dfb30b857 USRP: add a T trace to record the RX IQ data on antenna 0 2024-06-05 15:11:59 +02:00
Raphael Defosseux
a29d1eed7f chore(ci): bumping up nvidia-aerial to 24-1
Signed-off-by: Raphael Defosseux <raphael.defosseux@eurecom.fr>
2024-06-05 14:40:20 +02:00
Florian Kaltenberger
6d5a0ab454 synch the USRP time accross devices using the host clock 2024-06-05 09:52:26 +02:00
Bartosz Podrygajlo
7aec889cf6 Remove some global variables 2024-06-05 09:42:56 +02:00
Laurent THOMAS
f23c91cc5a remove rb_mask_ul from permanent storage for stack local usage 2024-06-04 19:08:47 +02:00
Bartosz Podrygajlo
760e0aaae4 PUCCH power control state. 2024-06-04 12:04:12 +02:00
Bartosz Podrygajlo
a1902a03f8 Accumulate delta PUCCH for each PUCCH occasion. 2024-06-04 12:04:11 +02:00
Bartosz Podrygajlo
6d09f0542b Fix a bug in DELTA_TF calculation for PUCCH format 1. 2024-06-04 12:04:11 +02:00
Robert Schmidt
8abf975faf Merge branch 'integration_2024_w22' into 'develop'
Integration: `2024.w22`

See merge request oai/openairinterface5g!2778

* !2707 NR UE Cell Search
* !2722 add initial NTN support for gNB
* !2694 Handle and use Linux capabilities, logging improvements, cleanup, documentation
* !2569 Neighbour Configuration - Measurement Configuration
2024-06-04 09:28:07 +00:00
Robert Schmidt
7db4732ce1 Merge remote-tracking branch 'origin/N2_HO_Measurement_config' into integration_2024_w22 2024-06-04 09:29:42 +02:00
batuhan duyuler
c51b2a64fb Prepare Measurement Configuration according to neighbour measurement configuration
Neighbor configuration can be given by gNB.conf

get_MeasConfig function is extended as it will prepare A2 / A3 Report
Configs. Single Meas Obj is used for all.

rrc_gNB_process_MeasurementReport function is extended to process A2 /
A3 measurement events.  helper functions are written to fetch neighbour
cell informations from sequence containers.
(get_neighbour_cell_information, get_neighbour_config)
2024-06-04 07:54:00 +02:00
batuhan duyuler
cec6b8925a Preparation of Neighbour Configuration & Measurement Configuration | Parsing the configuration
- neighbour_config.conf file includes neighbour and measurement related parameters
Neighbour List:
 - nr_cellid: the identity of existing cell who has neighbour
 - neighbour_cell_configuration(list): includes the identity parameters
   of the neighbour cell such:
    - gNBID (incase of N2 Handover / to be identified from AMF)
    - nr_cell_id (target gNB needs to consider)
    - physical_cellId (needed for measurement reporting)
    - absoluteFrequencySSB (needed for measurement reporting)
    - subcarrierSpacing (needed for measurement reporting)
    - plmn / tracking area code (incase of N2 Handover / needed for AMF
      to identify / allow HO)

NR Measurement Configuration
 - Periodical
    - enable (default is 0, 1 enables the reporting)
    - includeBeamMeasurements, maxNrOfRS_IndexesToReport (configurable
      reporting parameters)
 - A2
    - enable (default is 0, 1 enables the reporting)
    - threshold , timeToTrigger (configurable reporting parameters)
 - A3
    - cell_id (the nr_cellid of neighbour cell. So this A3 parameters
      will be used for the neighbour
        - [-1] means default. so it can be applied to any neighbour if
          there is no specific config
        - Neighbour specific A3 Threshold can be used or default can be
          selected depending to the neighbour planning
        - The neighbour-config.conf specifies, apply default A3 for
          neighbours 3 and 4 | apply specific one for neighbour 2

    - offset, hysteresis, timeToTrigger (configurable reporting parameters)

the neighbour_config.conf can be included in the gNB.conf file. Example
is given: gnb.sa.band78.106prb.rfsim.neighbour.conf

A sequence array container is used for neighbour cell configuration. RRC
structure has this container.  A Measurement configuration structure is
defined. This structure has Periodical / A2 Event structures and also a
sequence container for A3 Event List.

These structures are filled during the initialization. While F1 Setup
Response is coming from DU to CU, the intra frequency / inter frequency
neighbour decision is given for the existing cell. Also new neighbours
could be added here if needed.
2024-06-04 07:54:00 +02:00
batuhan duyuler
e5afdcdd43 Move cell-value lookup functions (SSB ARFCN, ...) to rrc_gNB_du.c
The functions are needed in a later commit in both rrc_gNB_du.c and
rrc_gNB.c, so move to the rrc_gNB_du.c file concerned with DUs (cells).
2024-06-04 07:43:54 +02:00
Robert Schmidt
9465ae778b Merge remote-tracking branch 'origin/softmodem-caps' into integration_2024_w22 2024-06-03 21:37:35 +02:00
Robert Schmidt
092047984a Merge remote-tracking branch 'origin/initial_gNB_NTN_support' into integration_2024_w22 2024-06-03 21:36:00 +02:00
Robert Schmidt
5b53f4ee0f Merge remote-tracking branch 'origin/NR_UE_cell_search' into integration_2024_w22 2024-06-03 21:35:51 +02:00
Robert Schmidt
0077d219fb CI DeployObject: don't grep, just give service name
With the capabilities now given as part of this MR, it happens that when
checking the "docker compose config", the container_name might not be
close to the service name. Something like

  service:
    cap_drop:
      ...
    cap_add:
      ...
    container_name:

This is inconvenient, as the previous grep for the service name + 3
lines might not cover the service name. To circumvent this, give the
service name directly in "docker compose config". (no clue why it has
not been done like this from the start)
2024-06-03 17:01:48 +02:00
Robert Schmidt
a87df90504 Add documentation for physical simulators 2024-06-03 14:21:19 +02:00
Robert Schmidt
971ab65fe5 Physims don't need sudo 2024-06-03 14:21:19 +02:00
Robert Schmidt
13517cd6bc Write documentation on performance tuning and security 2024-06-03 14:21:19 +02:00
Robert Schmidt
0cc278f19b Use capabilities in Aerial-based docker-compose 2024-06-03 14:21:19 +02:00
Robert Schmidt
b4750d8d81 Use capabilities in AW2S-based docker compose 2024-06-03 14:21:19 +02:00
Robert Schmidt
9dd52c9d44 Use capabilities in B200-based docker-compose
- sa_b200_gnb
- sa_aw2s_gnb
- sa_e1_b200
- sa_f1_b200
- sa_sc_b200_gnb
- nsa_b200_gnb

By default, the container has no access to /dev. Mount all USB devices
into the container to ease usability: by default, USB devices are
mounted under /dev/bus/usb using the bus ID, which is different on every
system and might change on reboots or with (un-)plugging USB devices.
Hence, mount all USB; the process has not many capabilities anyway, and
thus might not do much harm.

A proper solution would be to write a udev rule to mount a device using
its vendor and product ID, and only mount the corresponding device into
the container.
2024-06-03 14:21:19 +02:00
Robert Schmidt
ffa5ba400a Use capabilities in N310-based docker compose
- SA 2x2 tests on 60 and 100 MHz
- N310-based OAI gNB + UE

Give SYS_NICE and IPC_LOCK for performance. On the UE side, give
NET_ADMIN (for interface bringup) and NET_RAW (for ping an TUN).
2024-06-03 14:21:19 +02:00
Robert Schmidt
9f8fad86ee Use capabilities in 5G RFsim docker-compose
- 5g rfsim fdd_phytest
- 5g rfsimulator
- 5g fdd rfsim
- 5g f1 rfsim
- 5g l2sim
- 5g rfsim 24prb
- 5g rfsim 2x2
- 5g rfsim accelleran
- 5g rfsim e1
- 5g rfsim fr2 32prb
- 5g rfsim u0
- Update doc

We give NET_ADMIN (for interface bringup) and NET_RAW (for ping).
IPC_LOCK and SYS_NICE are intentionally left out to verify the
softmodems run without.
2024-06-03 14:21:19 +02:00
Robert Schmidt
9b3ab10c20 Make failed TUN socket operation non-fatal
It might be desirable to run the UE without superuser rights. More
concretely, it might run without NET_ADMIN. In this case, various
corresponding operations on the TUN socket fd might fail. In this
commit,

- improve error reports to make them more clear
- do not automatically exit(1), but return from the function to ensure
  continuity of the softmodem
2024-06-03 14:00:49 +02:00
Robert Schmidt
8dc29be02f Remove unused set_priority()/set_thread_priority() 2024-06-03 14:00:49 +02:00
Robert Schmidt
973d13937d VNF: use threadCreate() to create P7 thread
Use common threadCreate() function to create P7 thread with high(er)
priority. Remove old calls to set_priority(), as this is already done
with threadCreate().
2024-06-03 14:00:49 +02:00
Robert Schmidt
811721bb72 PNF: use threadCreate() to create P7 thread
Use common threadCreate() function to create P7 thread with high(er)
priority. Remove old calls to set_priority(), as this is already done
with threadCreate().
2024-06-03 14:00:49 +02:00
Robert Schmidt
5ae7d6685a Aerial: use threadCreate() to create P7 thread
Use common threadCreate() function to create P7 thread with high(er)
priority. Remove old calls to set_priority(), as this is already done
with threadCreate().
2024-06-03 14:00:49 +02:00
Robert Schmidt
37f3f0b6a4 nr-uesoftmodem: don't set priority, check for SYS_NICE
The main thread of nr-uesoftmodem (executing main()) is mostly working;
it is thus not necessary to set high priority. Instead, the threads
created with threadCreate() will receive higher priority, if possible
(as determined by the availability of SYS_NICE capability).

To inform if SYS_NICE is not present, print a warning in main().
2024-06-03 14:00:49 +02:00
Robert Schmidt
66bf27bce9 threadCreate(): check for and handle missing SYS_NICE
SYS_NICE is a capability that allows a process to set thread affinity
and priority, among other things (see capabilities(7) for more info).

In this commit, add a function that allows to determine if the process
has this capability, and try to change the thread affinity and priority,
if requested. If the capability does not exist, the function will simply
not attempt to change the corresponding thread attributes.

To determine if the process has SYS_NICE, libcap can be used. However,
it might not be installed by default. To avoid requiring another
dependency, if we detect that libcap is not present, use a workaround by
try to set a real-time scheduling policy; if it's present, or can be
changed, we assume that the process has SYS_NICE (and clean up, if
relevant).

Simplify reading of capabilities
2024-06-03 14:00:41 +02:00
Robert Schmidt
6a12784872 RFsim: don't shell out to improve kernel socket buffer sizes, teach the user instead
A later commit in this series adds performance tuning tips, which
includes the call made in RFsim until this commit.
2024-06-03 14:00:41 +02:00
Robert Schmidt
105368a437 thread pool: don't print core, threadCreate() does that already 2024-06-03 14:00:41 +02:00
Robert Schmidt
6b37d183ce Remove set_latency_target(), add lock_memory_to_ram()
set_latency_target() attempts to set keep "low latency" by
- writing a specific latency to /dev/cpu_dma_latency
- setting manually the minimum CPU processor frequency to be the maximum

There is no functionality to undo this after stopping the softmodem(s),
and most users are probably not even aware that OAI does this. It is
generally preferable to set this beforehand using a governor or by
disabling sleep states (as outlined in the tutorial, and in a follow-up
commit in the performance tuning docs).

The previous mlockall() call, to lock memory to RAM, is retained in a
new function. There were additional mlockall() calls, which have been
replaced with lock_memory_to_ram(), where necessary.
2024-06-03 13:59:41 +02:00
Robert Schmidt
a25b209e7f Remove Check if fedora and inside kernel
It's completely unclear what this is supposed to do.
2024-06-03 12:37:33 +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
Robert Schmidt
006b68fa3f NR L1: demote log to info 2024-06-03 12:37:33 +02:00
Robert Schmidt
55728a98c1 RFsim: demote log level, remove useless log message 2024-06-03 12:37:33 +02:00
Robert Schmidt
bfd519953b ITTI: lower 'Starting itti queue' message to debug 2024-06-03 12:37:33 +02:00
Robert Schmidt
37421c3f92 BuildUnitTests: need to use ran-base:ci-temp if changes in ran-base
Use correct baseTag for Unit Tests build in execution:
- if build_helper or othe files changed, which would trigger rebuild of
  ran-base, use the corresponding ci-temp tag
- use that tag consistently afterwards
2024-06-03 12:37:33 +02:00
Thomas Schlichter
f7c2732899 add section with NTN example to doc/RUNMODEM.md 2024-06-03 11:54:55 +02:00
Thomas Schlichter
75f5215b22 add exemplary cellSpecificKoffset_r17, sr_ProhibitTimer_v1700, t300, t301 and t319 to conf files for 24 and 25 PRBs 2024-06-03 11:54:55 +02:00
Thomas Schlichter
f1938acbab gNB: make ue_TimersAndConstants configurable via conf file 2024-06-03 11:54:55 +02:00
Thomas Schlichter
90fa3d5534 gNB: make SR timers configurable in CONF file 2024-06-03 11:54:55 +02:00
Thomas Schlichter
4cdf4d61f3 gNB: add sr_ProhibitTimer_v1700 2024-06-03 11:54:55 +02:00
Thomas Schlichter
be41a4ea60 gNB: use 2 * K2 for contention_resolution_timer, as the timer starts with Msg2 transmission and ends with Msg4 ACK reception 2024-06-03 11:54:55 +02:00
Thomas Schlichter
0ce0282238 gNB: make checks for missed feedbacks more robust w.r.t. frame number warp-around in find_harq() 2024-06-03 11:54:55 +02:00
Thomas Schlichter
6b01cfb8e2 gNB: fix phytest scheduler in case no HARQ processes are available
In case no HARQ processes are available (because all are waiting for feedback), we skip scheduling...
2024-06-03 11:54:55 +02:00
Thomas Schlichter
8e4526e221 gNB: change TA update interval to 100 frames instead of 10
The RTT for GEO satellites is more than 500 ms.
And as the TA update interval must be greater than the RTT, we increase it to 1 second instead of 100 ms.
Should also do no harm for terrestrial networks.
2024-06-03 11:54:55 +02:00
Thomas Schlichter
ccba7c875d gNB: add NTN specific parameter cellSpecificKoffset_r17 and use it for UL scheduling
According to the RRC specification, cellSpecificKoffset is:
Scheduling offset used for the timing relationships that are modified for NTN (see TS 38.213 [13]).
The unit of the field K_offset is number of slots for a given subcarrier spacing of 15 kHz.
If the field is absent UE assumes value 0

This parameter `cellSpecificKoffset_r17` can be set in the gNB conf file, in the section `servingCellConfigCommon`
2024-06-03 11:54:55 +02:00
francescomani
7fc8fe2513 fixing mapped_ssb_idx (it was not containing SSB index anymore) 2024-06-03 10:53:27 +02:00
francescomani
a4bb7da1ce hotfix for cumulative DAI computation at UE 2024-06-02 17:02:55 +02:00
Robert Schmidt
76f06a9386 Correctly compute array size to prevent buffer overflow
Reviewed-By: Laurent THOMAS <laurent.thomas@open-cells.com>
2024-05-31 15:25:53 +02:00
Sakthivel Velumani
dac55975b5 Updated documentation 2024-05-30 10:20:55 -04:00
Sakthivel Velumani
155d24f9e4 Code cleanup
Remove old and unused code. Fix indentation.
2024-05-30 10:20:55 -04:00
Sakthivel Velumani
7c146154f5 Prevent compiler warning
A particular GCC version (v13?) used by CI machines potentially has a
bug that issues a mismatch bound warning on function array arguments.
This commit should prevent it from happening.
2024-05-30 10:20:55 -04:00
Sakthivel Velumani
ca93e68410 Use command line option for sell search
There is already a command line option called 'ue-scan-carrier' which
seemed to blindly look for SSB by changing the center frequency by
+/-100Hz if the previous attempt failed. This is probably copied from
LTE and is not suitable for NR. This commit uses this option to either
1. Perform initial sync on one GSCN if the SSB position if known
2. Or scan the all GSCN (if the SSB postion is unknown)

Also, the following is done for re-synchronization
1. Scan all GSCN when UE comes back from IDLE state
2. Scan one GSCN when UE does re-estabishment

Removed dependency of lte-softmodem.h in nr-softmodem.c.
CONFIG_HLP_UESCAN is declared also in lte-softmodem.h.
2024-05-30 10:20:55 -04:00
Sakthivel Velumani
26aa7c2e33 Suppressing PSS & SSS detection logs
Changed Info to Debug because the logs are too much if large number of
GSCN scans run concurrently. Print PSS correlation peak and average
power of detected cells.
2024-05-30 10:20:55 -04:00
Sakthivel Velumani
043da0c440 NR UE scan for SSB within current bandwidth
Till this commit, the UE gets the position of SSB in frequency from
command line and does the syncronization by locating the SSB in time. It
does this by generating a PSS time signal during initialization with the
SSB offset given via command line. Then PSS detection is done by
correlation.

In this commit, the UE computes a list of GSCN in the current NR band
that falls within the current bandwidth for the set center frequency.
For each GSCN in the list, the UE starts a thread and performs the
following:
1. Generate PSS time signal with SSB offset for current GSCN.
2. Detect PSS, SSS and decode PBCH (this step remains the same).
After all threads finishes, the results are collected.

For now, only the first detected PBCH is used to proceed further. So
this PBCH is indicated to MAC and UE exits initial sync.

Future work: The cell search can be standalone feature where the UE
could scan for SSB in the entire NR band. This would require changing
radio's frequency on the fly as the UE's bandwidth would not cover an
entire NR band. The cell detection can futher be imporved by looking
for SIB1 for each decoded PBCH.
2024-05-30 10:20:45 -04:00
Robert Schmidt
e5fc1ebde6 Merge branch 'integration_2024_w22' into 'develop'
Integration: `2024.w22` (Part 1)

See merge request oai/openairinterface5g!2773

* !2698 Handle division by 0 gracefully in average channel level calculation
* !2743 Demystifying 10log10(2^30) in signal energy calculations.
* !2767 NR UE imeisv fix
* !2768 Over-estimate short and long BSR for better latency and TCP throughput
* !2769 maxMIMOLayers parameter in configuration file
2024-05-30 12:55:03 +00:00
Robert Schmidt
bedcd5a1be Merge remote-tracking branch 'origin/maxMIMO-layers-parameter' into integration_2024_w22 2024-05-30 13:01:33 +02:00
Robert Schmidt
30e403f4a2 Merge remote-tracking branch 'origin/bsr-estim' into integration_2024_w22 2024-05-30 13:01:27 +02:00
Robert Schmidt
ba9d4afbe3 Merge remote-tracking branch 'origin/fix_oddeven_imeisv' into integration_2024_w22 2024-05-30 13:01:20 +02:00
Robert Schmidt
02ee2a9726 Merge remote-tracking branch 'origin/remove-rms-magic-number' into integration_2024_w22 2024-05-30 13:01:14 +02:00
Robert Schmidt
bbe8e16ca5 Merge remote-tracking branch 'origin/nr-ue-channel-level-assert-fix' into integration_2024_w22 2024-05-30 13:01:06 +02:00
Robert Schmidt
c7f1dcfb51 Hotfix: asn1c use working commit
hotfix: current vlm_master (5fa129cf3161da9ff2d67341e6277e818c0f5d6a)
breaks F1, NG, so use the one before
(940dd5fa9f3917913fd487b13dfddfacd0ded06e)
2024-05-30 09:36:01 +02:00
Robert Schmidt
7fe29041c2 SA E1 B200 gNB CI test: use host-mode 2024-05-30 09:16:45 +02:00
Robert Schmidt
7bfa8e78fd SA F1 B200 gNB CI test: use host-mode 2024-05-30 09:14:53 +02:00
Robert Schmidt
0ccd4ad000 SA SC-FDMA B200 gNB CI test: use host-mode 2024-05-30 09:14:53 +02:00
Robert Schmidt
9cf0640432 SA B200 gNB CI test: use host-mode 2024-05-30 09:14:53 +02:00
Robert Schmidt
e6f0f80c9f Over-estimate short and long BSR
38.321 6.1.3.1 says: "The size of the RLC headers and MAC subheaders are
not considered in the buffer size computation" [for BSR]. However, prior
to this commit, we take the size signaled of the BSR and schedule the UE
with that amount of data, making it impossible for the UE to transmit
all its data at once (because it is the size signaled + headers).

In this commit, over-estimate the buffer status size. As we cannot know
the exact number and size of headers, we simply use "BSR size + n", as
done in function overestim_bsr_index().
2024-05-30 08:07:37 +02:00
francescomani
95442d6075 adding a control to the maxMIMO_layers input and updating RUNMODEM.md 2024-05-29 15:26:28 +02:00
Guido Casati
8cf8a44e8e Handle division by 0 assert gracefully in average channel level calculation
* nb_re_pdsch is directly linked to nb_rb_pdsch, if the latter is 0 the
  former is also 0
* compute average channel level only when number of RE for PDSCH is not 0
  the average channel level will be set to 0 otherwise
* Added a log message to handle this special case, which is consequence
  of other issues in the RX chain
* with this commit, the inconsistency in the RX chain will be handled
  in later in nr_ue_pdsch_procedures with a demodulation failure

other minor changes:

* Improved clarity by using NR_NB_SC_PER_RB instead of hard-coded value 12 in nb of RBs calculation
* cleaned up unused variable and outdated comments
2024-05-29 15:11:37 +02:00
Raymond Knopp
a1d660d6df changed 7.2 configuration files for 2-layer 4x4 setting using all 4 TX
antennas.
2024-05-29 14:46:50 +02:00
Raymond Knopp
15488a18e3 added parameter to limit the maxMIMO-layers on DL (i.e. to 2 for 4x4) 2024-05-29 14:46:50 +02:00
francescomani
333946ed27 imeisv is 16 bits, the oddeven bit indicator should signal even (0) and not odd (1) 2024-05-29 09:44:51 +02:00
Bartosz Podrygajlo
4622d33e3b Demystifying 10log10(2^30) in signal energy calculations. 2024-05-28 16:12:36 +02:00
Cedric Roux
fc42a2a5f1 security EIA1: bugfix: memory alignment + read out of array
Compiling the nrUE with -fsanitize=undefined leads to a crash
because the function nas_stream_encrypt_eia1() accesses the data
as uint32_t but the data is not aligned.

Actually this function wants 64 bits (big-endian) of data, so let's
introduce a simple function to read a big-endian 64 bits value.
It may seem bad (unoptimized), but looking at the output of gcc
without -fsanitize=undefined this will be translated as just one
movbeq instruction (on the machine where I did the test), which is
actually less instructions than the previous version which was doing
too movbel plus orq.

Moreover, after the main loop we need to process the last remaining
bytes (so less than 8). The code was wrong, reading past the input
data (and also not caring about alignment). It may work, it may fail,
it depends on many things. But it's plain wrong. So this was replaced
for something better, simpler. No need for mask32bit() anymore, only
one call to U64() is needed.

And now -fsanitize=undefined is happy, so all is good.

We also restrict the input length to be multiple of 8 bits. I don't
think it's a problem. To be refined if I'm wrong. (I think RRC and
NAS messages are 8-bits aligned, so it shouldn't be a problem.)
2024-05-27 17:39:35 +02:00
Cedric Roux
a1c4c356bd nrUE NAS: check NAS COUNT UL
It should not be > 0xffffff.

Normally the core network would prevent this case from happening.
Plus to reach this value means to send a lot of NAS messages, which
is very doubtful in practice.

Anyway, it's better to deal with the case.

We exit if that happens. To be refined if needed (very doubtful).
2024-05-27 17:39:35 +02:00
Cedric Roux
4c248a433e nrUE NAS: bugfix: add sequence number to generateSecurityModeComplete
It was working because on initial connection, it is 0.
But it's probably a bad assumption.
2024-05-27 17:39:35 +02:00
Cedric Roux
0147bb2e08 nrUE NAS: add NEA1 and NIA1 in nrUE security capabilities 2024-05-27 17:39:35 +02:00
Cedric Roux
04027b9265 nrUE NAS: minor changes in get_allowed_nssai()
This function was very wrong, now it's just wrong.
(It does not sanitize the input properly. Some bad input may have
unexpected effects on the nrUE.)

It needs a serious rewrite.

I just wanted to "fix" it so that it processes correctly some
correct input data.
2024-05-27 17:39:35 +02:00
Cedric Roux
a100929067 nrUE NAS: accept some messages without integrity+ciphering
OAI core network is sending Deregistation Accept in clear, even
after security context activation.

The standards is not clear to me, so let's accept it.

To be removed if incorrect with respect to the standards.
(The core network will need to be fixed then.)
2024-05-27 17:39:35 +02:00
Cedric Roux
56abe6c118 nrUE NAS: deal with security for NAS_CONN_ESTABLI_CNF
This message is ciphered + integrity protected, let's decipher it
and integrity check it.
2024-05-27 17:39:35 +02:00
Cedric Roux
245f430ad9 nrUE NAS: apply ciphering to uplink messages
Before this commit, only integrity protection was applied.
This was working only if the NAS connection is using NEA0.
2024-05-27 17:39:35 +02:00
Cedric Roux
075f8330f6 nrUE NAS: implement downlink security processing
Maybe not totally ok (code has some comments). To be refined if needed.
2024-05-27 17:39:35 +02:00
Cedric Roux
4cc1bb5433 nrUE NAS: hotfix for get_msg_type()
The version before this commit is wrong, taking wrong byte for msg_type
in some cases.

I don't have much time to implement a proper NAS PDU parser, so let's go
with hardcoded values.

Some later work will be done to have a cleaner solution. As of now, it's
too much work.
2024-05-27 17:39:35 +02:00
Cedric Roux
6c42ea6293 nrUE NAS: don't hardcode sequence number, get value from NAS COUNT UL
as per standard (see 33.501 6.4.3.1, see 24.501 4.4.3)
2024-05-27 17:39:35 +02:00
Cedric Roux
ce771a17dc nrUE NAS: adapt code to use configured integrity algorithm 2024-05-27 17:39:35 +02:00
Cedric Roux
41037d57b5 nrUE NAS: handle SecurityModeCommand
Get the security algorithms from SecurityModeCommand.

Restructure the code a bit: add the function handle_security_mode_command()
and adapt the code to use it.

Derive also knas_enc (not used yet).

Do the derivation for knas_enc and knas_int only after reception
of SecurityModeCommand. We need the algorithms configured by core
network to derive those keys.
2024-05-27 17:39:35 +02:00
Cedric Roux
b615162630 nrUE NAS: there are actually two NAS COUNT, one for DL and one for UL 2024-05-27 17:39:35 +02:00
Cedric Roux
2e7b926827 nrUE NAS: remove mm_counter and sm_counter, replace with nas_count
Specs (24.501, 33.501) don't seem to mention mm_counter and sm_counter,
simply nas_count, let's use this.
2024-05-27 17:39:35 +02:00
Robert Schmidt
168b172f9a Merge branch 'integration_2024_w21c' into 'develop'
Integration: `2024.w21`

See merge request oai/openairinterface5g!2757

* !2733 Remove duplicated function to reverse N bits
* !2712 rfsimulator: add support to simulate a long propagation delay
* !2695 improve polar init and polar readability
* !2709 Fix cmdline configmodule in phy simulators
* !2756 remove some enb dependencies in NR files
* !2687 bug fix ue UL payload filling randomly done in retransmissions (pointer not set)
* !2543 power/PHR normalizations for deltaMCS power adaptation
* !2719 Refactor LC handling at MAC
* !2736 Fix debug for ongoing transactions
* !2747 Fix aerial memory leak
* !2761 Use timeout command to kill hanging iperf3
* !2752 fix-dci11-type0-bitmap-setting
* !2759 Fix invalid MSG2 HARQ feedback attempt and remove accumulated_delta_PUCCH field from UE FAPI IF
* !2740 bugfix/cleanup: remove uint8_t to encode size plus some cleanup
* !2760 fix 5G NR SA FDD configs for 24 and 25 PRBs
* !2520 Documentation on coding style, workflow, and review instructions
2024-05-27 13:45:59 +00:00
Robert Schmidt
60c052a95a Merge remote-tracking branch 'origin/code-style-review-instructions' into integration_2024_w21c 2024-05-27 12:18:56 +02:00
Robert Schmidt
1b9ba55843 Merge remote-tracking branch 'origin/fix_fdd_configs' into integration_2024_w21c 2024-05-27 12:18:32 +02:00
Robert Schmidt
1f6d4a6cfe Merge remote-tracking branch 'origin/hotfix-uint8_t-size' into integration_2024_w21c 2024-05-27 12:18:26 +02:00
Robert Schmidt
c202e9173f Merge remote-tracking branch 'origin/hotfix-fdbk-for-msg2-sib' into integration_2024_w21c 2024-05-27 12:18:13 +02:00
Robert Schmidt
c0b7ac9a7e Merge remote-tracking branch 'origin/fix-dci11-rb_bitmap-filling-bug' into integration_2024_w21c 2024-05-27 12:18:07 +02:00
Robert Schmidt
7ffc403098 Demote log to debug for Msg3 infeasibility
It can happen that in the current DL slot, we cannot send an allocation
for Msg3 in a later UL slot. Up to this commit, MAC printed a warning.
However, this is not really a warning, as it will likely work in the
next or a later slot. So demote this to debug.
2024-05-27 11:48:21 +02:00
Robert Schmidt
f261ce9124 OAIUE pipeline: Adjust sample timing advance to make test more stable 2024-05-27 10:24:29 +02:00
Cedric Roux
31274f6c64 bugfix/cleanup: remove uint8_t to encode size plus some cleanup
The starting point was the function do_NR_DLInformationTransfer() which
may deal with more than 256 bytes.

Then why not cleanup all the functions in the same file.
(And do a bit of formattting fixing while we're here.)

Then cleanup the callers of those functions.

Then, because of do_SIB23_NR() let's also cleanup in some
structures.

Not all the codebase was cleaned up, there surely remain some uint8_t
(and char/short/uint16_t) which are wrong.
2024-05-27 09:45:22 +02:00
Bartosz Podrygajlo
4a5d924375 Remove accumulated_delta_PUCCH from UE nfapi interface. 2024-05-27 09:22:42 +02:00
Bartosz Podrygajlo
3fd119ff29 Do not send PUCCH ACK on DLSCH that doesnt require it.
UE was attempting to send ACK on MSG2 - was caused by missing brackets in if statement.
2024-05-27 09:17:39 +02:00
Robert Schmidt
92b8453960 Merge remote-tracking branch 'origin/ci-kill-hanging-iperf3' into integration_2024_w21c 2024-05-25 12:35:35 +02:00
Robert Schmidt
bfc41d1038 Merge remote-tracking branch 'origin/Fix_Aerial_Memory_Leak' into integration_2024_w21c 2024-05-25 12:35:26 +02:00
Robert Schmidt
1127a9850b Merge remote-tracking branch 'origin/Fix_array_for_debug_ongoing_transactions' into integration_2024_w21c 2024-05-25 12:34:46 +02:00
Rúben Soares da Silva
dd93181951 Replace unneeded memcpy for sr_payload
Set appropriate length for csi payload calloc and memcpy, according to bit_len
2024-05-24 17:26:28 +01:00
Rúben Soares da Silva
d27d193339 Fix P5 messages memory leaks ( CONFIG.request / CONFIG.response ) 2024-05-24 17:26:16 +01:00
Robert Schmidt
e30552c23a Merge remote-tracking branch 'origin/refactor-lcid-gnb-mac' into integration_2024_w21c 2024-05-24 17:54:32 +02:00
Robert Schmidt
5686b2a26d Merge remote-tracking branch 'origin/phr_handling_for_develop' into integration_2024_w21c 2024-05-24 17:53:50 +02:00
Rúben Soares da Silva
f6a039f38b Fix memory leak related to UCI.indication and RACH.indication 2024-05-24 14:49:45 +01:00
Rúben Soares da Silva
48ed7fba0d Fix memory leak related to CRC.indication and RACH.indication 2024-05-24 14:49:45 +01:00
Rúben Soares da Silva
a516a632d4 Fix memory leak related to RX_DATA.indication message 2024-05-24 14:49:45 +01:00
Rúben Soares da Silva
8a8b38ae70 Fix memory leak related to SLOT.response message 2024-05-24 14:49:45 +01:00
Rúben Soares da Silva
b215a60a3b Fix memory leak related to fapi_phy_api_msg fapi_msg 2024-05-24 14:49:45 +01:00
Robert Schmidt
8d16ff8459 Use timeout command to kill hangling iperf3
In some pipelines, it happens that iperf3 is hanging on 100% CPU load.
In these cases, a simple TERM signal does not seem to be enough to kill
it; KILL is necessary.

While e.g., RemoteCmd's driver paramiko has a timeout command, the
documentation [1] is not really clear how it is trying to stop commands.
Since it effectively does not stop, we have to assume it is only sending
TERM.

To remedy this, use the timeout command to start iperf3. We use option
-v for diagnose timeouts on stderr, and send KILL after an additional 3
seconds (-k3) if TERM does not succeed. The timeout is sent to the same
duration as the overall iperf timeout.

[1] https://docs.paramiko.org/en/3.4/api/channel.html#paramiko.channel.Channel.settimeout
2024-05-24 14:20:04 +02:00
Thomas Schlichter
2bb632a7fe fix 5G NR SA FDD configs for 25 and 25 PRBs
make sure the SSB is offset by 4 PRBs from the BW start.
Therefore, the ARFCN for the SSB center must be offset by 14 PRB from the ARFCN for the BW start.
2024-05-24 13:21:38 +02:00
Thomas Schlichter
f969eddbe2 fix gNB to print correct --CO parameter for OAI UE in FDD case 2024-05-24 13:16:47 +02:00
Robert Schmidt
8820a57547 Merge remote-tracking branch 'origin/fix-ue-ul-retransmissions-payload-copy' into integration_2024_w21c 2024-05-24 11:53:16 +02:00
Robert Schmidt
c76a9d43f2 Merge remote-tracking branch 'origin/remove_some_enb_references_in_nr' into integration_2024_w21c 2024-05-24 11:50:17 +02:00
Robert Schmidt
d268378f2b Merge remote-tracking branch 'origin/fix_phy_simulators_configmodule' into integration_2024_w21c 2024-05-24 11:50:11 +02:00
Robert Schmidt
1465fed81c Merge remote-tracking branch 'origin/better-polar' into integration_2024_w21c 2024-05-24 11:50:04 +02:00
Robert Schmidt
12a1c8a820 Merge remote-tracking branch 'origin/rfsim_add_prop_delay' into integration_2024_w21c 2024-05-24 11:49:54 +02:00
Robert Schmidt
87a1ff5b37 Merge remote-tracking branch 'origin/fix_reverse_n_bits' into integration_2024_w21c 2024-05-24 11:49:13 +02:00
Robert Schmidt
98df398dc3 Remove empty/useless process_CellGroupConfig() 2024-05-24 11:42:50 +02:00
Robert Schmidt
d7ba96f4ee Add new RA as part of nr_mac_add_test_ue() and refactor
A to-be-added UE's RA is added through nr_mac_add_test_ue() (the name is
misleading, it is not a "test UE") through its CellGroupConfig. Using
the process_CellGroupConfig() is unfortunate, because it is not really
clear what part of the CellGroupConfig gets evaluated (it is certainly
not all). Move the code for adding a new RA directly in the user-add
function, and refactor this one.
2024-05-24 11:42:50 +02:00
Robert Schmidt
6c71775ea1 Sort LCs by priority
Introduce new LC configuration "priority", as specified in 38.321, and
use to sort LCs by priority. We set the priority of an SRB according to
38.331 Section 9.2.1, and for a DRB to be the minimum priority of the
QoS flows associated to this DRB.
2024-05-24 11:42:50 +02:00
Robert Schmidt
ee9570993d Add functions for LC add/release at MAC
Introduce new functions to add/release LCs without needing to go through
the intermediate CellGroupConfig. This harmonizes LC handling at the "DU
handler" to keep it consistent with RLC bearer handling.

These functions allow to group LC configuration handling, and we can
remove functions for setting NSSAIs and QoS by handling in one central
place (while adding LCs).

nr_mac_add_test_ue() is used by simulators and also in NSA mode to add a
new UE. Ideally, these users should also call the ue context setup
request handler to add a UE context; for the moment, respect the passed
list of LCs to add. Similarly, for do-ra, we require a dedicated
function to still parse the CellGroupConfig, so we keep that part of
functionality.

On reestablishment, since we do not process the CellGroupConfig from the
old UE, we need to add LCs for the new UE based on the onces from old
UE.
2024-05-24 11:42:45 +02:00
Robert Schmidt
7accbd9778 MAC: use seq_arr to group LC configuration
Use a common structure nr_lc_config_t to group LC configuration for one
logical channel. Use seq_arr for simple lookup, adding, removing of
elements without manual indexing logic.

This commit retains the previous logic of adding/releasing LCs through
the process_CellGroupConfig(), although we know while building the
CellGroupConfig if we add/release LCs. The next commit fixes this.
2024-05-24 11:35:15 +02:00
Robert Schmidt
850f26fc5c Move get_lcid_from_srbid/drbid() to central gNB MAC primitives
In later commits, we will call these functions from multiple places in
the scheduler, so move them to a central place.
2024-05-24 11:35:15 +02:00
Robert Schmidt
9e5c5497ab Avoid gigantic array
If we do not make this change, with the next commit, we get the
following error from gcc:

  openair2/E2AP/RAN_FUNCTION/O-RAN/ran_func_kpm.c:299:46: error: assignment of read-only location '*(arr_ue_id.ue_info_list + (sizetype)(arr_ue_id.sz * 2444864))'
  |         arr_ue_id.ue_info_list[arr_ue_id.sz] = *ue;
2024-05-24 11:35:15 +02:00
Robert Schmidt
6dfd7cdc71 rename find_if_arr -> find_if to avoid name clashes
In a later commit, we will use find_if in L2. In the case of building
with E2 agent, we link e2_agent which comes with its own implementation
of find_if_arr(), which results in a name clash. Rename the OAI
implementation, as nothing uses this, anyway.
2024-05-24 11:35:15 +02:00
Robert Schmidt
7cfd5a1f21 Remove outdated/useless comment 2024-05-24 11:35:15 +02:00
Robert Schmidt
ec326e856e Remove compute_ph_factor() dump parameter, make LOG_D 2024-05-24 09:25:45 +02:00
Raymond Knopp
e69e787ab0 testing use_deltaMCS=0 2024-05-24 09:25:45 +02:00
Raymond Knopp
70444f133a power control changes for deltaMCS mode and force_ul256qam_off
- addition of control of deltaMCS if enabled in configuration file.
- introduce separate parameter to disable 256QAM in UL
- put min_grant_prb configuration back in pf_ul() as default prb size.
2024-05-24 09:25:44 +02:00
Raymond Knopp
e3aff6c37b fix in nr_modulation.c: avoid fail for 64QAM and G < 192 bits
Adds a check for these short payloads and handle correctly
2024-05-24 09:25:44 +02:00
Robert Schmidt
9249131046 Merge branch 'integration_2024_w21b' into 'develop'
Integration: `2024.w21b`

Closes #734

See merge request oai/openairinterface5g!2755

* !2700 Fix UE PUCCH multiplexing infinite loop
* !2724 Correct PRACH preamble tx power calculation.
* !2726 NR SA Tutorials
* !2728 Use existing function for bits reversal
* !2732 CU handle F1 setup Req- TAC conversion
* !2738 Correct data offset for unscrambling in PUSCH processing
* !2742 UE: fix mutex locking verification
* !2737 rename persisted ul harq status per pid with a uniq name, make better mutual exclision of processSlotTX()
2024-05-24 07:25:15 +00:00
Robert Schmidt
295f221a9b Merge remote-tracking branch 'origin/simpler-parallel-exclusion-ue-tx' into integration_2024_w21b 2024-05-24 08:13:41 +02:00
Robert Schmidt
58335443b1 Revert "remove asserts on min RX/TX, set the RX/TX shift as 2 in the UE"
This reverts commit 0d0e111135.  It was
set to UE RX to TX time to 2 as it was deemed that the UE could sustain
this time. However, we noticed a degradation of performance, so reset
the RX to TX time to something higher to ensure proper performance.
2024-05-24 06:54:30 +02:00
Robert Schmidt
b5159b5e47 Revert "ci: set min_rxtxtime = 2 in OAIUE pipeline"
This reverts commit 31b4f48e29.
2024-05-24 06:54:15 +02:00
francescomani
e8ae696c8f remove some enb dependencies in NR files 2024-05-23 18:30:33 +02:00
Robert Schmidt
7a631ce3a2 Use an enum for stream_status states 2024-05-23 16:41:20 +02:00
Jaroslava Fiedlerova
1001f2eb13 Merge remote-tracking branch 'origin/fix-mutex-management-bug' into integration_2024_w21b 2024-05-23 12:46:13 +02:00
Jaroslava Fiedlerova
018ca77aa0 Merge remote-tracking branch 'origin/issue-734' into integration_2024_w21b 2024-05-23 12:42:46 +02:00
Jaroslava Fiedlerova
e580450ae2 Merge remote-tracking branch 'origin/IISc_F1setup_tac' into integration_2024_w21b 2024-05-23 12:42:15 +02:00
Jaroslava Fiedlerova
64e6c6e5b2 Merge remote-tracking branch 'origin/ue-pbch-use-reversebits' into integration_2024_w21b 2024-05-23 12:41:38 +02:00
Jaroslava Fiedlerova
841869b0ec Merge remote-tracking branch 'origin/NR_SA_Tutorials' into integration_2024_w21b 2024-05-23 12:40:07 +02:00
Jaroslava Fiedlerova
d3acd5d6c0 Merge remote-tracking branch 'origin/nr-prach-tx-power-fix' into integration_2024_w21b 2024-05-23 12:39:40 +02:00
Jaroslava Fiedlerova
3a4dac00ee Merge remote-tracking branch 'origin/NR_UE_fix_PUCCH_multiplexing' into integration_2024_w21b 2024-05-23 12:37:32 +02:00
Laurent THOMAS
b461fe5e6b fix-dci11-type0-bitmap-setting 2024-05-23 10:26:28 +02:00
Laurent THOMAS
00e883c563 remove a unused struct member 2024-05-23 08:46:12 +02:00
Laurent THOMAS
2f05261f6b reject packets of 0's 2024-05-23 08:41:01 +02:00
Laurent THOMAS
4bca825053 remove wrong trace when packet is not decoded 2024-05-23 08:03:12 +02:00
Laurent THOMAS
819427a6a0 bug fix ue UL payload filling randomly done in retransmissions (pointer
not set)
2024-05-23 08:03:12 +02:00
Robert Schmidt
082007834c Merge branch 'integration_2024_w21' into 'develop'
Integration: `2024.w21`

See merge request oai/openairinterface5g!2746

* !2717 Additional check on pucch_Config and srs_Config
* !2730 Fix for SSB index in function get_nr_prach_info_from_ssb_index
* !2734 add a function to reset the transmission timestamps chain
* !2741 Fix several potential segfaults in UE PUCCH tx power determination.
2024-05-22 12:55:51 +00:00
Laurent THOMAS
6379350f51 Correct data offset for unscrambling in PUSCH processing
Correctly compute the offset of data to unscramble in PUSCH processing
at the gNB. Rename variables to make them easier to spot (instead of
"s"), and remove a global variable.

Closes: #734
2024-05-22 09:04:33 +02:00
Robert Schmidt
e4a704ed61 Add high-level developer documentation on code style and contributing 2024-05-22 08:45:39 +02:00
Robert Schmidt
787f4431c3 doc/README.md: Correctly say what OpenShift documentation will give 2024-05-22 08:45:39 +02:00
Robert Schmidt
9ce9d79b33 doc/README.md: Link to legacy unmaintained files 2024-05-22 08:45:39 +02:00
Robert Schmidt
f251a41410 doc/README.md: rename section to radios 2024-05-22 08:45:31 +02:00
Robert Schmidt
e7596f9bd5 Clarify CONTRIBUTING.md and wrap text to 80 columns 2024-05-22 08:45:17 +02:00
luis_pereira87
9278394f3c Tutorials: Update links for the latest Ubuntu 22.04 LTS iso file 2024-05-22 07:14:36 +01:00
luis_pereira87
246a8aff16 Tutorials: Rename OAI CN5G docker network interface name from 'demo-oai' to 'oai-cn5g' and remove commented lines 2024-05-22 07:14:36 +01:00
luis_pereira87
3c6ae9c2cb Tutorials: Fix multiple S-NSSAI redefinitions for the same S-NSSAI in the configuration file 2024-05-22 07:14:36 +01:00
Robert Schmidt
73243f668e Merge remote-tracking branch 'origin/fix-pucch-tx-power-segfaults' into integration_2024_w21 2024-05-22 07:45:51 +02:00
Robert Schmidt
959df471f3 Merge remote-tracking branch 'origin/reset-transmission-sequence' into integration_2024_w21 2024-05-22 07:45:41 +02:00
Robert Schmidt
d326477494 Merge remote-tracking branch 'origin/NR_UE_ssb_index_fix' into integration_2024_w21 2024-05-22 07:45:34 +02:00
Robert Schmidt
10940010f5 Merge remote-tracking branch 'origin/nr-ue-config-pointer-check' into integration_2024_w21 2024-05-22 07:45:27 +02:00
Raphael Defosseux
0ad85cb111 chore(ci): dummy commit to retrigger CI
Signed-off-by: Raphael Defosseux <raphael.defosseux@eurecom.fr>
2024-05-21 14:33:40 +02:00
Jaroslava Fiedlerova
5238ce912b Replace "theseus" OC node by "demophon" 2024-05-21 12:16:05 +02:00
Laurent THOMAS
f2213bf792 fix a error that was created by over complexity in setting a pointer to null for a wrong later assert verification 2024-05-20 20:57:46 +02:00
Bartosz Podrygajlo
b101e682f5 Fix several potential segfaults in UE PUCCH tx power determination. 2024-05-20 15:00:29 +02:00
francescomani
075f564606 fix ssb index in get_nr_prach_info_from_ssb_index 2024-05-16 18:37:38 +02:00
Laurent THOMAS
e217980249 simplify and make better performance the mutual exclusion of processSlotTX() function 2024-05-16 14:06:24 +02:00
Laurent THOMAS
3e4526a6ad rename persisted ul harq status per pid with a uniq name as this variable is persisted in memory and accessed by multiple threads, a uniq name helps to debug 2024-05-16 14:05:39 +02:00
luis_pereira87
db6710f853 Fix debug for ongoing transactions, it is limited to 3 but the maximum number of ongoing transactions can be 4 (NR_RRC_TRANSACTION_IDENTIFIER_NUMBER):
TS 36.331: RRC-TransactionIdentifier ::= INTEGER (0..3)
2024-05-16 12:36:21 +01:00
Robert Schmidt
9fd1b9ac69 Correct buffer size for do_NR_DLInformationTransfer()
uper_encode_to_buffer() of asn1c returns the number of BITS that have
been encoded; if we use this, we need to calculate the resulting number
of bytes (rounding up) to get the right buffer size.

Note that do_NR_ULInformationTransfer() uses
uper_encode_to_new_buffer() which returns the number of BYTES, hence, in
this similar function, we should not modify the return value.
2024-05-16 11:59:55 +02:00
Sreeshma Shiv
17f2eaa558 TAC-Octet String to integer conversion function corrections
-Corrected the conversion function used in CU_handle_F1_SETUP_REQUEST

-Corrected the conversion function in CU_handle_gNB_DU_CONFIGURATION_UPDATE
2024-05-16 12:21:59 +05:30
laurent
ca06b77a89 add a function to reset the transmission timestamps chain, and use it in context of UE resynchronization 2024-05-15 17:35:02 +02:00
francescomani
c626e55f67 harmonize use of function to reverse n bits 2024-05-15 17:08:47 +02:00
Romain Beurdouche
b51a144d7d fix(phy simulators): fix cmdline configmodule for CODING phy simulators 2024-05-15 14:12:40 +02:00
Romain Beurdouche
8b889d908c fix(phy simulators): fix cmdline configmodule for LTE_PHY ulsim and dlsim 2024-05-15 14:05:54 +02:00
Romain Beurdouche
08dbc5bf08 fix(phy simulators): fix cmdline configmodule for NR_PHY simulators 2024-05-15 14:05:03 +02:00
Romain Beurdouche
4e8f58b498 fix(nr_dlsim): fix cmdline configmodule for nr_dlsim 2024-05-15 14:04:18 +02:00
Romain Beurdouche
4455b37548 fix(nr_ulsim): fix cmdline configmodule for nr_ulsim 2024-05-15 14:02:48 +02:00
Sakthivel Velumani
40b52bc8f4 Use existing function for bits reversal 2024-05-10 12:51:50 -04:00
Bartosz Podrygajlo
70f536a0f0 Correct PRACH preamble tx power calculation.
Removed arbitrary offset of 30dB.
Changed sign for pathloss: pathloss calculated in compute_nr_SSB_PL is the difference between transmitted and received power.
Transmission power for preamble should compensate the pathloss, therefore power should increase with pathloss.
2024-05-08 12:19:08 +02:00
Thomas Schlichter
d5a0455560 fix error of taking the absolute value of 'uint64_t' 2024-05-07 20:46:37 +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
82bd07ebd5 Merge branch 'integration_2024_w18' into 'develop'
Integration `2024.w18`

See merge request oai/openairinterface5g!2713

* !2705 Fix CRC check in UE DCI detection
* !2708 Adding few more NR bands to the list of supported ones
* !2701 gNB archi fixes
* !2203 DL-MMSE
* !2684 remove asserts on min RX/TX, set the RX/TX shift as 2 in the UE
* !2594 F1AP refactoring to align with O-RAN.WG5.C.1-v11
2024-05-07 08:06:51 +00:00
Guido Casati
cf22a331e5 Additional check on pucch_Config and srs_Config 2024-05-06 18:10:03 +02:00
Jaroslava Fiedlerova
65d494fb09 Merge remote-tracking branch 'origin/f1ap_uecontext_refactoring' into integration_2024_w18 2024-05-06 15:29:48 +02:00
Jaroslava Fiedlerova
944925ff69 Merge remote-tracking branch 'origin/ue-make-rxtx-of-2-slots' into integration_2024_w18 2024-05-06 14:23:49 +02:00
Robert Schmidt
0fb0b055e5 NGAP: Correct encoding of AMF Set ID and Pointer
Taking the example of the AMF Set ID, the previous version of the macro
used another macro to encode the number, then marked the last 6 bits in
the bit string (of length 16/2 bytes) as unused. This is wrong, because,
assuming AMF Set ID=3, it basically truncates the number by encoding all
16 bits and cutting off the last 6, like this:

  ------------------- encode 16 bits
  0000 0000 0000 0011
  ------------        take these 10 bits

So what remains is these bit positions of the number:
(16,15,14,13,12,11,10,9,8,7) -- the last 6 bits are cut (and the first 6
are either 0 or garbage, because they don't exist).

Instead, manually encode bits (10,9,8,7,6,5,4,3) in the first byte, and
(2,1) in the second byte of the bit string, like so:

  ------------        encode 10 bits
  0000 0000 1100 0000
  ------------        take these 10 bits

Do the same with the pointer.

The AMF Region ID above is correct, as it is exactly 8 bits.
2024-05-06 12:03:20 +02:00
Robert Schmidt
8d225a7e10 NGAP Release Cplt: indicate release PDU sessions
We can optionally indicate the PDU session IDs. At least with OAI 5GC,
that should help it clean up.
2024-05-06 12:00:26 +02:00
Robert Schmidt
3e2d5f8820 Handle PDU sessions in NG UE context setup request
In the case of PDU sessions in the NG UE context setup request, we first
have to set up security. Hence, in this commit, implement the "delayed"
set up of theses PDU sessions, and acknowledge the setup request after
reconfiguration, as requested by O-RAN.WG5.C.1-v11.
2024-05-06 11:59:59 +02:00
Robert Schmidt
1fc16077ff Correctly trigger NGAP UE Context Setup Response
Trigger UE ctxt setup response for the case of "registration request"
(no PDU sessions in UE Context setup response), as mandated by
O-RAN.WG5.C.1-v11.
2024-05-06 11:59:55 +02:00
Robert Schmidt
cbf446e267 Trigger UE context setup req after E1 bearer setup resp
As of this commit, since we now send the UE security command as a DL NAS
message, there is no F1 UE Context setup request. Hence, instead of
sending a UE context modif request, send the UE context setup request
after the E1 bearer setup response (which logically also makes more
sense, as the E1 setup procedure comes before the F1 setup procedure).
2024-05-06 11:59:51 +02:00
Robert Schmidt
179ecb8e84 Revert "Delay PDU session resource setup request if necessary"
This reverts commit 0f100a6e94, which
introduced a hack to possibly wait with a PDU session setup at the RRC
in case a RRC UE capability transaction (requesting UE capabilities from
a UE) was ongoing. This happened, as we delayed the UE capabilities to
after the first RRC reconfiguration; in that case, certain UEs were
requesting the next PDU session, and if RRC did not delay the new PDU
session (as requested from the core), this procedure might occur while
UE capability enquiry was ongoing, leading to failures in these
transactions.
2024-05-06 11:58:31 +02:00
Robert Schmidt
c7a2471542 Remove unused function for "default" RRC reconfiguration
The default RRC reconfiguration was previously sent after the security
mode command as a "first" RRC reconfiguration. However, it is simply not
needed, as it will be triggered through a subsequent reconfiguration
that also sets up DRBs.

Move the Measurement Config to the "other/dedicated" RRC
reconfiguration.

This reconfiguration would have forwarded a NAS PDU (typically a
registration accept). This is now done by a dedicated forwarding of NAS.
2024-05-06 11:58:21 +02:00
Giulio Carota
388942b5d3 Revert "Send RRC UECapabilityEnquiry after reconfig, trigger UE update if necessary"
This reverts commit 4a7d7975ce.

Trigger the UE capability right after security mode complete, as
specified in O-RAN WG5.C.1-v11. Also, there is no "need" for the
"default" RRC Reconfiguration (it will come once PDU sessions are
requested), so remove this as well.
2024-05-06 11:58:15 +02:00
Giulio Carota
7340abc6f4 Refactor Security Mode Command procedure: send in RRC DL transfer
Previously, the CU sent the Security Mode Command as part of a UE
context setup request. This was done "because it was possible", not
because there was an inherent need to do this. However the LiteOn DU
does not like this, as it expects to also have a DRB in the UE context
setup request procedure, which is not always the case.

Hence, send the Security Mode Command in a normal DL RRC msg transfer
over F1. As of this commit, there is not UE context Setup Request (so it
might not work with all DUs), but the OAI DU is cool and does not care,
so RFsim still works.

This also aligns the CU's behavior with O-RAN.WG5.C.1-v11.

Finally, as of this commit, we do not trigger a UE context setup
request, so we cannot handle PDU sessions inside the initial UE context
setup request at the same time as the security mode command (which was
done previously before reaching this point). This will be fixed in a
later commit.
2024-05-06 11:56:57 +02:00
Giulio Carota
46e27ba445 Add UE Context Setup/Modification functions in RRC 2024-05-06 11:55:19 +02:00
Robert Schmidt
956df365de Refactor F1 Setup Req/DU config update: transport slices via F1 and read config
In the DU, read slice information from the DU config file. Handle
multiple slices within the F1 Setup Request structure representation,
and forward it via F1 to CU. The DU slice information is stored in the
setup request structure.
2024-05-06 11:54:41 +02:00
Robert Schmidt
740189c625 Revert "kssb < 16 or we cannot do reestablishment: add assert in DU"
This reverts commit eaf28414ca.

This assertion was introduced as we (wrongfully) thought we needed to
calculate the SSB ARFCN at the CU. Since PBCH might carry one bit, which
is not available at the CU, only certain SSB ARFCNs would have been
possible.

With the availability of the SSB ARFCN through the
MeasurementTimingConfiguration, this is not necessary anymore.
2024-05-06 11:46:15 +02:00
Robert Schmidt
177ddaa079 Fill RRC MeasConfig with correct SSB values from DU 2024-05-06 11:45:18 +02:00
Robert Schmidt
00cb7efa2a Use MeasurementTimingConfiguration to look up SSB ARFCN when needed
MeasTimingConfig may not come with F1 Setup Request: some DUs send it
with the DU configuration update. Handle this gracefully by checking for
MTC before using it.
2024-05-06 11:44:33 +02:00
Giulio Carota
2f81f190d1 Generate TimingMeasurementConfig at DU, store at CU 2024-05-06 11:44:32 +02:00
Robert Schmidt
a771d58472 Implement F1AP code for gNB-DU configuration update 2024-05-06 11:36:40 +02:00
Robert Schmidt
67e5547957 Refactor F1 setup req reading
Refactor parts into a separate function, which will be reused within the
gNB-DU configuration update function in the next commit.
2024-05-06 11:35:58 +02:00
Robert Schmidt
aaaa00378a Do not send UE Context modif only with successful reconfig
The OAI DU does not use this message, and could not roll-back. The
LiteOn DU does not seem to like it. It is useless (as of now), so remove
it
2024-05-06 11:35:16 +02:00
Giulio Carota
ae66ba7a7b fix(du/cu/rrc): use the correct MIB data structure
Use the correct MIB data structure, MIB_t. This is required by 38.473,
and the LiteOn DU sends only that. So our CU needs to handle it, so
align the OAI DU as well.
2024-05-06 11:34:29 +02:00
Robert Schmidt
1cefbdb87f F1AP for gNB-DU config update & ack in CU 2024-05-06 11:34:01 +02:00
Robert Schmidt
cdd629de89 gNB-DU config update in DU 2024-05-06 11:22:57 +02:00
Robert Schmidt
aa18edb8ac gNB-DU config update msg def and handle in CU 2024-05-06 11:18:43 +02:00
Robert Schmidt
f247373474 Refactor TDD/FDD config reading into functions 2024-05-06 11:18:10 +02:00
Robert Schmidt
1c747e8223 RRC stats: show DU info 2024-05-06 11:17:51 +02:00
Robert Schmidt
1bd6018f91 Add extract_sys_info(): refactor DU cell sys_info handling in own function 2024-05-06 11:17:20 +02:00
Giulio Carota
9518e00923 fix(f1ap): Do not send optional hardcoded fields in UE context setup request 2024-05-06 11:17:18 +02:00
Robert Schmidt
00f85d54c5 Remove dead code 2024-05-06 11:14:17 +02:00
Robert Schmidt
c8539aeef5 Remove misleading comment 2024-05-06 11:14:09 +02:00
Robert Schmidt
590afc811f Correct F1 criticality 2024-05-06 11:11:32 +02:00
Jaroslava Fiedlerova
c73642868a Merge remote-tracking branch 'origin/develop-DL-improvements' into integration_2024_w18 2024-05-06 09:39:20 +02:00
Jaroslava Fiedlerova
fece66201c Merge remote-tracking branch 'origin/clean-and-doc-gnb-main-archi' into integration_2024_w18 2024-05-05 23:32:34 +02:00
Jaroslava Fiedlerova
578af2f81f Merge remote-tracking branch 'origin/NR_new_bands' into integration_2024_w18 2024-05-05 20:59:14 +02:00
Laurent THOMAS
00d78f048a remove a unused global storage of slot number
This has no meaning at a global level, we run several slots: one tx,
several rx at same time. Some minor cleaning of C style
2024-05-03 18:32:26 +02:00
Laurent THOMAS
c02908453a fix order error in ru.common.rxdataF filling lock, use consistently #define for buffer size 2024-05-03 18:31:45 +02:00
Laurent THOMAS
bb66056b75 fix nr-ru.c external declarations in .c file
The external declarations were incorrect, leading to mismatching
prototypes of config_ru and config_rru (true bug in OAI lte!).
2024-05-03 18:31:17 +02:00
rmagueta
a5055cacf0 Remove commented code 2024-05-03 15:07:26 +01:00
rmagueta
bcbf9287ba Noise power estimation and MMSE computation for DL at UE side 2024-05-03 15:07:26 +01:00
rmagueta
f5dccc2a59 Improvements in nr_dlsch_channel_compensation() function 2024-05-03 15:07:26 +01:00
Jaroslava Fiedlerova
f49dbf470a Merge remote-tracking branch 'origin/NR_UE_DCI_RX_improvements' into integration_2024_w18 2024-05-03 15:04:18 +02:00
Jaroslava Fiedlerova
31b4f48e29 ci: set min_rxtxtime = 2 in OAIUE pipeline 2024-05-02 20:06:10 +02:00
Jaroslava Fiedlerova
af49883543 Remove version field from oai cn5g docker compose file 2024-05-02 16:49:40 +02:00
Jaroslava Fiedlerova
ac51870b43 Remove version field from docker-compose files
For docker version > 25.0.5, "version" field is not relevant and reported as obsolete.
2024-05-02 15:54:59 +02:00
francescomani
1056e53acb mostly formatting 2024-05-01 16:51:40 +02:00
francescomani
c719b3f057 adding new nr bands to the tables 2024-05-01 16:13:04 +02:00
Robert Schmidt
d977ac8fc1 Merge branch 'integration_2024_w17' into 'develop'
Integration `2024.w17`

See merge request oai/openairinterface5g!2702

* !2659 NR bandwidth index fix
* !2693 Harmonize frequency range structures
* !2699 Add support for USRP X410 to run with 200 MHz bandwidth in FR2 at 120 kHz SCS
* !2692 Fix for the overflow issue while processing GPS based timestamp from RU
* !2665 NR UE improvements in handling RRC Release
* !2682 dci11type0
* !2686 CI: Maintenance, fixes, improvements
* !2677 NR UE trigger RA for SR failure
* !2683 Ue small fixes
* !2668 Refactor PDCP Reestablishment and introduce PDCP Suspend at gNB
* Add rhel9.4 to the list of OAI supported distributions
* !2673 speedup integrity computation
* !2706 doc: Update of CI testbenches
2024-04-30 15:38:45 +00:00
francescomani
114fb5dbca bugfix in dci reception, CRC is 24 bits but uint16 was used 2024-04-30 12:36:15 +02:00
Robert Schmidt
e64e687fcd Use --continuous-tx for F1 SABox test for B200 2024-04-30 12:11:48 +02:00
Jaroslava Fiedlerova
28d9b5b004 Merge remote-tracking branch 'origin/ci-testebench-update' into integration_2024_w17 2024-04-30 11:23:00 +02:00
Jaroslava Fiedlerova
252a7cafdb Merge remote-tracking branch 'origin/bugfix-speedup-integrity' into integration_2024_w17 2024-04-30 11:22:30 +02:00
Jaroslava Fiedlerova
434b2b2245 Add rhel9.4 to the list of OAI supported distributions 2024-04-30 10:45:10 +02:00
Jaroslava Fiedlerova
b915482e9b Merge remote-tracking branch 'origin/nr-pdcp-suspend' into integration_2024_w17 2024-04-30 09:01:28 +02:00
Jaroslava Fiedlerova
ab75ad2427 Merge remote-tracking branch 'origin/ue-small-fixes' into integration_2024_w17 2024-04-30 08:56:08 +02:00
Guido Casati
2b859cd7e2 Remove PDCP Suspend from nrUE
- according to clause 5.3.7.2 of 3GPP TS 38.331
  PDCP Suspend is not required during RRCReestablishment
2024-04-30 08:40:56 +02:00
Guido Casati
f010058e45 Re-establish RLC for SRB1 only when receiving RRCReestablishmentRequest
- according to 5.3.7.4 of TS 38.331: 1> re-establish RLC for SRB1;
- gNB:
1) re-establish RLC for SRB1 in nr_rlc_update_id
2) re-establish RLC for remaining RBs concurrently with RRCReconfiguration

issue: gNB) in nr_rlc_update_id the gNB is re-establishing RLC for all
            RBs at the same time when receiving RRCReestablishmentRequest
            from UE
        UE) according to the specs, the UE is re-establishing RLC for
            SRB1 with RRCReestablishmentRequest the other RBs are
            re-established during RRCReconfiguration (in our case in
            nr_rrc_ue_process_RadioBearerConfig) when receiving
            reestablishRLC IE in rlc_BearerToAddModList
    RLC TX) this leads to RLC counters mismatch after re-establishment:
            control PDUs discarded until max nb of retx is reached
            and then UL failure occurs
2024-04-30 08:40:56 +02:00
Guido Casati
99c4e5477c Minor comments and logging 2024-04-30 08:40:56 +02:00
Jaroslava Fiedlerova
17cbd4352c Update of CI testbenches doc
- replace nrmodule2 by up2
- add matix in CI machines
- add info about RAN-SA-2x2-Module-CN5G in list of pipeline
- update of 5G OTA testbench image
2024-04-29 19:17:06 +02:00
Jaroslava Fiedlerova
960d0cc01f Merge remote-tracking branch 'origin/NR_UE_trigger_RA_UL_failure' into integration_2024_w17 2024-04-29 19:06:22 +02:00
Laurent THOMAS
445aac11b9 put dci search in trace level trace, so the trace level debug prints the decoded DCIs 2024-04-29 16:03:43 +02:00
francescomani
27975f99d3 fix for MSG3 buffer when retransmitting 2024-04-29 14:50:14 +02:00
francescomani
e31d87eee9 trigger RA also in case of no valid pucch resource configured for pending SR 2024-04-29 14:50:11 +02:00
francescomani
90f82d19da remove false DCI reception indication 2024-04-29 12:39:44 +02:00
Jaroslava Fiedlerova
1cd990c05a Merge remote-tracking branch 'origin/ci-multi-fixes' into integration_2024_w17 2024-04-29 11:07:09 +02:00
francescomani
408cebc1e7 implementing triggering RA after SR failure 2024-04-29 11:06:17 +02:00
Jaroslava Fiedlerova
132c0738c0 Merge remote-tracking branch 'origin/implement-dci11-type0-contiguous-rbs' into integration_2024_w17 2024-04-29 10:01:06 +02:00
Jaroslava Fiedlerova
94474ac660 Merge remote-tracking branch 'origin/NR_UE_RRCRelease_improvements' into integration_2024_w17 2024-04-29 10:00:12 +02:00
Cedric Roux
39a5e72818 define stream_security_context_t as a struct to get type checking
By using a struct we may have warnings at compilation time in some
cases if the type is not used properly.

The type definition becomes a bit weird, so we need to properly
comment.

If too strange, we can revert to the classical "void" definition.
2024-04-26 23:31:17 +02:00
Cedric Roux
de7bc13000 minor: rename stream_security_container_create() to stream_security_container_init() 2024-04-26 23:31:17 +02:00
Cedric Roux
fac5c1f624 minor cleanup - use variable defined above 2024-04-26 23:31:17 +02:00
Cedric Roux
61a2c085ca cleanup the structure cbc_cmac_ctx_t
- rename "lib_ctx" to "mac_implementation" which is what is stored because
  of previous commit
- rename "mac" to "mac_context" to be clearer with what is stored in this
  variable too
2024-04-26 23:31:17 +02:00
Cedric Roux
d7931ea412 bugfix: speedup integrity computation
The main work of this commit is to rewrite cipher_aes_128_cbc_cmac()
which was too slow and created issues when running the 4G eNB on some
machines (LLL when using a b210).

Instead of creating the security context, use it, and delete it, all in
cipher_aes_128_cbc_cmac(), we introduce the function init_aes_128_cbc_cmac()
to create it, and we change cipher_aes_128_cbc_cmac() to just use it,
and we also adapt free_aes_128_cbc_cmac(). The function aes_128_cbc_cmac()
is removed, it does not follow the new init/use/free API.

Doing so, on the primary test machine used to do this work (a powerful
and fast machine where it is possible to set the CPUs' frequencies)
it was possible to limit the CPUs' frequencies to 500 MHz (it was not
possible to go lower) without any LLL (using a b210, quectel UE in
idle, no data traffic, only periodic measurement reports). Before this
commit, it was necessary to set a frequency of at least 1.8 GHz
otherwise some LLL would appear.

Then we need to adapt the rest of the code to take into account those
changes.

A notion of security container (stream_security_container_t) containing
ciphering and integrity contexts is introduced.

And the code is harmonized for, hopefully, better readability.

The (opaque) type stream_security_context_t is introduced, used by
both integrity and ciphering contexts. The idea is to use a
init()/use()/free() API for all the security procedures, identical for
all the ciphering and integrity procedures.
2024-04-26 23:31:06 +02:00
Jaroslava Fiedlerova
aecc695d02 Merge remote-tracking branch 'origin/GPS_time_stamp_sync' into integration_2024_w17 2024-04-26 23:15:28 +02:00
Jaroslava Fiedlerova
55c91e726c Merge remote-tracking branch 'origin/NR_FR2_200MHz' into integration_2024_w17 2024-04-26 23:15:01 +02:00
Jaroslava Fiedlerova
da57e23637 Update config files for SA 2x2 pipeline 2024-04-26 23:03:48 +02:00
Jaroslava Fiedlerova
bb078e61e0 Create functions for OC CN deployment/undeployment
These functions enables (un)deployment of the OAI CN v2.0.1, increase
reliability and speedup overall CN (un)deployment compared to current
implementation.

Use "--wait" helm option to wait for deployment/undeployment of the CN.
Wait for pods to be in a ready state before marking the release as
successful. If not deployed/undeployed before timeout, marked as
unsuccessful.

Hardcode path for OC CN5G deployment/undeployment
2024-04-26 23:03:38 +02:00
Jaroslava Fiedlerova
6554816721 AW2S pipeline: Connect 16th UE after TCP tests with 15 UEs 2024-04-26 23:01:58 +02:00
Jaroslava Fiedlerova
de5f23c52b B200-SABOX pipeline - fix testcase descriptions 2024-04-26 23:01:58 +02:00
Jaroslava Fiedlerova
82423fba45 Change PLMN in OAIUE pipeline 2024-04-26 23:01:58 +02:00
Jaroslava Fiedlerova
09bd7b5b39 Change PLMN and frequency in AW2S pipeline
- Remove unused AmariUE config file, replace by new one - for PLMN 00102
- Change frequency of AW2S pipeline - Move center frequency by 40 MHz to avoid interferency with other setups
in the lab. Set center frequency to ~ 3450 MHz.
2024-04-26 23:01:02 +02:00
Jaroslava Fiedlerova
cc0ba68082 Merge remote-tracking branch 'origin/NR_harmonize_frequency_range' into integration_2024_w17 2024-04-26 15:56:06 +02:00
Jaroslava Fiedlerova
c4b1966fc5 Merge remote-tracking branch 'origin/NR_bw_index_fix' into integration_2024_w17 2024-04-26 15:46:50 +02:00
Robert Schmidt
18951f04e6 Update assertfatal message 2024-04-26 10:59:49 +02:00
Laurent THOMAS
309d5cacc9 remove sleep() in UE NAS that have no good purpose 2024-04-26 10:19:59 +02:00
Laurent THOMAS
d67383bd42 segv on missing if() clause 2024-04-26 10:19:59 +02:00
Laurent THOMAS
a07461813d NR UE: Implement DCI format 11 type0 for contiguous allocations 2024-04-26 10:07:23 +02:00
luis_pereira87
615284c5c8 Add support for USRP X410 to run with 200 MHz bandwidth in FR2 at 120 kHz SCS 2024-04-26 08:23:19 +01:00
francescomani
6fdb69a898 fix for possible infinite loop in UE PUCCH multiplexing 2024-04-25 15:24:36 +02:00
Laurent THOMAS
ab2b868b75 improve polar init and polar readability 2024-04-24 15:26:21 +02:00
francescomani
9992a19a6f release SRS/PUCCH as described in 331 section 5.3.12 2024-04-23 17:53:46 +02:00
francescomani
bff1f06350 removing MAC reset cause from reset_ra 2024-04-23 17:18:32 +02:00
francescomani
efeb538490 harmonize usage of frequency range structures 2024-04-23 12:20:42 +02:00
Cedric Roux
c0934b26da bugfix: use correct security algorithm 2024-04-23 12:06:54 +02:00
vijay chadachan
1924b3c793 Fix for the overflow issue while processing GPS based timestamp from RU
The absslot_tx overflow issue observed during integration testing of AW2S
RU with GPS as the source for the clock synchronization. Causes the gNB
not to start the TX thread and stops the processing.
2024-04-23 10:44:00 +02:00
Robert Schmidt
8a3c329e90 Merge branch 'integration_2024_w16' into 'develop'
Integration `2024.w16`

See merge request oai/openairinterface5g!2689

* !2680 CI: Modification of log collection in UndeployObject()
* !2681 remove a useless copy and specific buffer for all UE UL payload
* !2685 Clang: make executable run, fix clang warnings, fix memsan warnings
* !2690 Remove hardcoding of 5G-S-TMSI on nrUE
2024-04-22 11:50:06 +00:00
Jaroslava Fiedlerova
67fb98a16c Merge remote-tracking branch 'origin/fix-5g-s-tmsi-hardcode-nr-ue' into integration_2024_w16 2024-04-22 10:00:31 +02:00
Guido Casati
105e9b5f58 Handling Bearer Context Status Change IE in Bearer Context Modification Request
- E1 encoding /decoding
- new enum for E1 Bearer Status Change

see 9.2.2.4 BEARER CONTEXT MODIFICATION REQUEST of 3GPP TS 38.463
2024-04-21 10:23:59 +02:00
francescomani
da26eacfd4 improvements in handling RRC Release 2024-04-21 09:05:56 +02:00
Guido Casati
2c2b7416c1 Check numDlUpParam size when processing DlUpParamList 2024-04-19 14:43:26 +02:00
Jaroslava Fiedlerova
ea1921809f Merge remote-tracking branch 'origin/clang-run-warning-memsan' into integration_2024_w16 2024-04-19 11:03:37 +02:00
Jaroslava Fiedlerova
219b4b7680 Merge remote-tracking branch 'origin/remove-useless-buffer-and-copy' into integration_2024_w16 2024-04-19 11:02:38 +02:00
Guido Casati
7a9b3485b1 Remove hardcoding of 5G-S-TMSI on nrUE 2024-04-19 10:58:09 +02:00
Jaroslava Fiedlerova
e3547dfb38 CI: Modification of log collection in UndeployObject()
After the recent update of matix, collected logs contain color codes
and we did not find the way to switch them completely off.
Replacement of "docker compose logs" by "docker logs" resolves this
issue. This commit includes changes related to "docker logs" usage.
2024-04-18 17:21:27 +02:00
Robert Schmidt
593191b51a Memory sanitizer patch not required anymore
Also, the check for clang is done in CMakeLists.txt; sleep is useless
2024-04-18 14:16:09 +02:00
Robert Schmidt
507e08cd39 Memsan uninitialized read: Initialize array to zero 2024-04-18 14:16:09 +02:00
Robert Schmidt
42254e6267 Memory sanitizer: unitialized read
Reset all the circular buffer to zero; this ensures that we cannot read
uninitialized data. Since this is RFsimulator, performance is not a
problem here either (and zeroing out happens only once).
2024-04-18 14:16:09 +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
Robert Schmidt
ed89498c4f Use standard C initializer list syntax
Fix clang warning

  warning: use of GNU old-style field designator extension [-Wgnu-designator]
2024-04-18 14:16:09 +02:00
Robert Schmidt
24baf08c87 Load unaligned data for SIMD processing to avoid segv
We access G_N at indexes that are not necessarily 32-byte aligned,
leading to segfaults. Use simde_mm256_loadu_si256() to load from memory
at an unaligned memory address to avoid the segfault.

Discovered using clang; it is unclear why gcc did not encounter the same
segfault.
2024-04-18 14:06:05 +02:00
Jaroslava Fiedlerova
d9b87d1cb7 Fix of iperf3 BIDIR reporting 2024-04-18 13:09:34 +02:00
Jaroslava Fiedlerova
6bbcc1d275 Improve LTE-2x2 radio behavior and log collection
- change testcase IDs to get all logs
2024-04-18 13:09:34 +02:00
Robert Schmidt
8e7ecaa73a Compile using -rdynamic with clang
-rdynamic is necessary for clang as well to properly link shared
executables. Add furthermore an option to ignore unused command line
arguments, to suppress warning

  clang: warning: argument unused during compilation: '-rdynamic' [-Wunused-command-line-argument]

This is likely because -rdynamic is only relevant for the linker, but
the corresponding option add_link_options() is only available starting
cmake 3.13, while we are still at 3.12 (for Ubuntu 18, to my
understanding).
2024-04-18 00:40:39 +02:00
Guido Casati
1d10a73b95 Apply default configuration for SRB1 when receiving RRCReestablishmentRequest
- according to 5.3.7.4 of TS 38.331
2024-04-17 16:17:42 +02:00
Guido Casati
ab65bc3b08 Refactor PDCP Reestablishment of DRBs according to 5.3.5.6.5 of 3GPP TS 38.331
- remove PDCP reestablishment for DRBs from RRCReestablishment message generation
- do PDCP reestablishment and CUUP notification calls after reception or RRCReestablishmentComplete
- this is necessary to make it consistent with the RRCReconfiguration message that contains
  RadioBearerConfig with the list of bearers to add/release
  which is followed by PDCP re-establishment at UE
2024-04-17 16:17:37 +02:00
Laurent THOMAS
df9cd171f6 remove a useless copy and specific buffer for all UE UL payload 2024-04-17 10:59:13 +02:00
Laurent THOMAS
0d0e111135 remove asserts on min RX/TX, set the RX/TX shift as 2 in the UE 2024-04-17 09:50:23 +02:00
Guido Casati
5610ce0738 Fix PDCP re-establishment of SRB1 and SRB2
- SRB1 shall be re-established at the time of RRCReestablishmentRequest
  according to 5.3.7.4 of 3GPP TS 38.331
- SRB2 shall be re-established when creating srb-ToAddModList
  according to 5.3.5.6.3 of 3GPP TS 38.331
2024-04-16 22:04:42 +02:00
Robert Schmidt
749779247d Merge branch 'integration_2024_w15' into 'develop'
Integration `2024.w15`

Closes #727, #765, #776

See merge request oai/openairinterface5g!2676

* !2561 CI - add T2 tests to timing pipeline
* !2620 Fix cppcheck errors
* !2624 NR UE MAC SR improvements
* !2647 NR UE mixed fixes
* !2671 Reduce stack memory size for layer mapping
* !2669 CI: create SA 2x2 pipeline
* !2660 fix for 3072 fft size when using 80 MHz and -E
* !2539 CI: Add channel emulation in one test
* !2635 SCTP problems: allow to bind separate F1-C/F1-U interfaces; allow to use DNS
* !2438 PSBCH RX,TX and SLSS SEARCH procedures
* !2675 (doc): Update benetel firmware version and configuration files
* Update of O-RAN 7.2 gNB configuration file for Benetel 650
2024-04-16 06:09:52 +00:00
Jaroslava Fiedlerova
68a89e53e9 Update of O-RAN 7.2 gNB configuration file for Benetel 650 2024-04-15 16:10:47 +02:00
Robert Schmidt
6fecb6fbfe Merge remote-tracking branch 'origin/benetel-fw' into integration_2024_w15 2024-04-15 14:36:40 +02:00
Robert Schmidt
ebeb26528a Merge remote-tracking branch 'origin/NR_PSBCH_MERGE1' into integration_2024_w15 2024-04-15 14:34:36 +02:00
Robert Schmidt
3011b706ba Merge remote-tracking branch 'origin/fix-sctp-f1' into integration_2024_w15 2024-04-15 14:33:05 +02:00
Robert Schmidt
a953cd0d8b Demote periodic PHY log: floods the screen, is unhelpful 2024-04-15 13:16:10 +02:00
Robert Schmidt
0c15ee9706 commands for attach/detach 2024-04-15 13:16:10 +02:00
Robert Schmidt
a652a032b0 CI RFsim-4G noS1: use longer sleep
Unlike the previous commit, in noS1, we cannot use Attach(), as noS1
automatically brings up an interface, no matter whether the connection
succeeded or not. Therefore, consistently wait a bit longer to increase
the chance that the radio is really up.
2024-04-15 13:16:10 +02:00
Robert Schmidt
5fa52ecf76 CI RFsim-4G: wait for attach, instead of sleep
For various reasons, the UE might take longer to connect to the eNB. A
simple sleep might not be enough; instead, use Attach() to actively wait
that the UE gets an IP address. The added bonus of this function is that
it will also stop&restart a UE if it did not attach, i.e., it will try
multiple times to attach the UE.
2024-04-15 13:16:10 +02:00
Robert Schmidt
d81b617d1c Fix MCE Name parameter reading
The code (author) confused MCE_PARAMS_DESC and MCE_NETPARAMS_DESC and
tried to read the MCE name from MCE_NETPARAMS_DESC when in reality it
should come from MCE_PARAMS_DESC. This commit fixes to use the right
array.
2024-04-15 13:16:10 +02:00
Robert Schmidt
4666cddb1a Remove IPv6/active/preference fields from eNBs.[0].target_mme_m3_ip_address array
Same reasoning as in previous commit.
2024-04-15 13:16:09 +02:00
Robert Schmidt
3596955fb0 Remove IPv6/active/preference fields from eNBs.[0].target_mce_m2_ip_address array
Same reasoning as in the previous commit.
2024-04-15 13:16:09 +02:00
Robert Schmidt
27447f94bf Remove IPv6/active/preference fields from e/gNBs.[0].target_enb_x2_ip_address array
Some reasoning as in previous commit.
2024-04-15 13:16:09 +02:00
Robert Schmidt
235567bb6a Remove IPv6/active/preference fields from gNBs.[0].amf_ip_address array
Same reasoning as in the previous commit.

Remove filling of broadcast_plmn, which does not exist in the
configuration.
2024-04-15 13:16:09 +02:00
Robert Schmidt
915c106ee3 Remove IPv6/active/preference fields from eNBs.[0].mme_ip_address array
In a previous commit, the functionality of handling IPv6 (and DNS names)
as part of the IPv4 was introduced (in IPv4 field for backwards
compatibility). This commit now removes superfluous configuration
fields:
- IPv6:  handled by IPv4 field
- active: users can just remove an entry
- preference: not needed
2024-04-15 13:16:09 +02:00
Robert Schmidt
2241ed17cf CU F1+E1 test: use some service names 2024-04-15 13:16:09 +02:00
Robert Schmidt
71486a0d7e Fixup: correct gnb-cucp AMF bind address, corresponding to docker container 2024-04-15 13:16:09 +02:00
Robert Schmidt
f21c2cf822 Remove interface names from F1 and nFAPI (4G+5G) 2024-04-15 13:16:09 +02:00
Robert Schmidt
fced989d60 Remove F1 config for LTE: does not exist 2024-04-15 13:16:09 +02:00
Robert Schmidt
fd66d17214 Remove MMEs Network Inferface section's interface names: not used 2024-04-15 13:16:09 +02:00
Robert Schmidt
4b2a59b027 Remove AMF Network Interface sections's interface names: not used 2024-04-15 13:16:09 +02:00
arora
b74fc09c28 (doc): Update O-RAN 7.2 FH tutorial and configuration
- Update the configuration for benetel 650 and 550 for new firmware version
- Remove the old firmware configuration file and description in the document
- Add a new RU configuration section
- Add How to get support from the OAI Community to clarify the support procedure.
2024-04-15 11:35:22 +02:00
arora
c08fb6ccb0 Update README with mailing list contact information
Include "best practices" on how to ask questions.
2024-04-15 11:34:52 +02:00
Jaroslava Fiedlerova
eb487e0196 Merge remote-tracking branch 'origin/ci-rfsim-add-channel' into integration_2024_w15 2024-04-15 08:47:01 +02:00
Jaroslava Fiedlerova
de263d4a40 Merge remote-tracking branch 'origin/fft_size_fix_3072' into integration_2024_w15 2024-04-15 08:29:34 +02:00
francescomani
d7a2795432 moving psbch DMRS modulation function away from gold sequence file 2024-04-14 16:15:20 +02:00
Robert Schmidt
f042bd7a2d Add psbchsim charts to test in physim CI tests 2024-04-13 08:54:21 +02:00
Robert Schmidt
c547a4c1f8 Rename nr_psbchsim sidelink test case to harmonize with other tests 2024-04-13 08:54:21 +02:00
Robert Schmidt
21918ffd0a Include nr_psbchsim in image for physims 2024-04-13 08:54:21 +02:00
Robert Schmidt
9a2e080f77 Apply clang-format 2024-04-13 08:54:15 +02:00
Robert Schmidt
dfa012162b Rewrite sctp_create_new_listener() to handle DNS, IPv6
Rewrite sctp_create_new_listener() to use getaddrinfo() to look up
IPv4/IPv6 addresses via a common interface. This allows to use e.g. DNS,
and enables the SCTP library to listen on IPv6 ports.

To support the above, the corresponding message is changed to not take
an IPv4 address on 4 bytes (and separate IPv6), but a single name that
will be resolved via getaddrinfo()

The previous init message used to allow multiple IPv4/IPv6 addresses;
since this is not used anywhere, remove the corresponding functionality.

Modify all uses of this ITTI message to copy te SCTP init bind addr into
ITTI message.
2024-04-13 05:15:11 +02:00
Robert Schmidt
0d128f9cad Rewrite sctp_handle_new_association_req() to handle hostnames and IPv6
Use getaddrinfo() to look up IP (v4/v6) addresses. The old
interface of separately specifying IPv4 and IPv6 addresses is
preserved, but both fields allow to specify types of addresses, and we
will remove one field in the future.
2024-04-13 05:14:55 +02:00
Robert Schmidt
e65cb0cf42 Introduce additional option to bind on separate IFs for F1-C/U in DU
After the last commit, it is not possible to bind on separate interfaces
for F1-C and F1-U. In other words, it is for instance not possible to
have the F1-C on one subnet on one physical interface, and F1-U on
another subnet on another physical interface. This commit introduces a
second option MACRLCs.[0].local_n_address_f1u to allow to bind F1-U on
an alternative address; if it is not specified, the interface of F1-C is
reused.

The above only works for the DU; no corresponding option exists for the
CU. For the CU, use separate CU-CP and CU-UP.

Use it in the CI.
2024-04-13 05:14:55 +02:00
Robert Schmidt
a193518579 Revert "F1AP SCTP: don't bind local address"
This reverts commit 284116522b.

The problem is that (1) we don't really support multi-homing, but (2) on
some system, if the other IP addresses that the operating system
considers part of the multi-homed connection are HEARTBEAT'ed (e.g.,
docker), they answer with SCTP ABORT, which breaks the entire
connection.

In other words, force single-homing by binding. For F1-U uses, another
option will be introduced that allows to bind to a separate interface
for F1-U (separate from F1-C), if necessary.

Closes #727
2024-04-13 05:14:55 +02:00
Jaroslava Fiedlerova
a22eccc0b8 Merge remote-tracking branch 'origin/ci-sa-2x2-pipeline' into integration_2024_w15 2024-04-12 16:57:03 +02:00
Jaroslava Fiedlerova
9d2ad34b1b Merge remote-tracking branch 'origin/improve-layer-mapping' into integration_2024_w15 2024-04-12 16:54:50 +02:00
Raghavendra Dinavahi
94b23d1eb0 PSBCH RX TX and SLSS search procedures
- RX/TX Phy processing accg to 38.211, 38.212 Rel16
	- PSBCH simulator used to validate TX/RX phy processing
	- PSBCH SLSS Search procedures
	- PSBCH SIM also tests SLSS SEARCH
2024-04-12 16:07:00 +02:00
Robert Schmidt
5b0e797ef7 Updated retransmission thresholds for F1 CI RFSIM test 2024-04-12 15:53:43 +02:00
Guido Casati
243c985af8 Updated telnet documentation including latest info about CI modules 2024-04-12 15:53:43 +02:00
Guido Casati
b5f0a32ac2 Introduced channel simulator in F1 RFSIM CI test scenario
- adding a new test case
    - the test case simulate a DL radio channel with noise and runs Iperf test with such channel conditions
    - use CustomCommand class to send commands to a Telnet server
    - switched from netcat’s unsupported -N option (OpenBSD) to --send-only (Ncat 7.94) for compatibility with CI

re-sync CI test in F1 RFSIM

- to be used in the future, for CI of RRCReestablishment in RFSIM
- adding four new test cases (040021, 040022, 040023, 040023) to the RFSIM F1 configuration
- the test cases simulate a disruption of the radio channel, verify UE sync loss and resync
  and restore the original channel conditions
- use CustomCommand class to send commands to a Telnet server

temp xml
2024-04-12 15:53:43 +02:00
Guido Casati
72337b9c43 Minor fixes to CI python scripts
- enhanced CustomCommand logging
- print ParseError
2024-04-12 15:53:43 +02:00
Guido Casati
cfaa182f57 Telnet function in new ciUE library to retrieve OAI UE sync state
- created new telnet library ciUE
- using X-macro defined NR_UE_L2_STATE string array to get UE sync state
- add telnet CI to nrUE container
2024-04-12 15:53:43 +02:00
Guido Casati
6793cb300a Refactor NR_UE_L2_STATE_t enum definition using X-Macro
- this change simplifies the enum definition and makes it easier
  to add, remove, or modify states in the future
- the states are now defined in the NR_UE_L2_STATES macro,
  and the enum members are generated automatically from this macro
2024-04-12 15:53:43 +02:00
Robert Schmidt
4062d3dcb3 Add channel emulation to 5G CU-DU F1 RFsim test
Add AWGN channel with some noise and additional path loss.
2024-04-12 15:53:38 +02:00
Laurent Thomas
be3452a10e Reduce stack memory size for layer mapping
Delete small pieces of dead code
2024-04-12 11:14:08 +02:00
Jaroslava Fiedlerova
829d8c3c1b Merge remote-tracking branch 'origin/NR_more_UE_fixes' into integration_2024_w15 2024-04-12 09:20:12 +02:00
Jaroslava Fiedlerova
2ba79f3fdc Merge remote-tracking branch 'origin/NR_UE_MAC_SR_improvements' into integration_2024_w15 2024-04-12 09:19:46 +02:00
Jaroslava Fiedlerova
87242ca92a Merge remote-tracking branch 'origin/fix_cppcheck' into integration_2024_w15 2024-04-12 09:18:07 +02:00
rakesh mundlamuri
47d1f8bb82 harmonizing the IDFT index at different places 2024-04-11 16:47:32 -04:00
rakesh mundlamuri
45c00b7ad2 fix for 3072 fft size when using 80 MHz and -E 2024-04-11 16:47:32 -04:00
Jaroslava Fiedlerova
f92f7460b6 Add CN log transfer to executor machine
- allows for simplification of the log collection in SA-2x2 pipeline
- ci-scripts/Jenkinsfile-nrue can be reused
- to be tested!
2024-04-11 20:04:12 +02:00
Jaroslava Fiedlerova
4268bdad89 Add SA-2x2-Module-CN5G to parent pipeline 2024-04-11 20:04:12 +02:00
Jaroslava Fiedlerova
ca9504ec1d Modification of XML for 5GCN undeployment 2024-04-11 20:04:12 +02:00
Jaroslava Fiedlerova
cef6a0250b Add xml files for 60MHz and 100 MHz 2x2 test 2024-04-11 20:04:07 +02:00
Jaroslava Fiedlerova
8510ffa3f9 Add matix-cn5g server to ci_infra 2024-04-11 20:04:07 +02:00
Jaroslava Fiedlerova
550b713635 Add conf files and yaml files for SA 2x2 pipeline
- Note: "version" parameter reported as obsolete by docker version > 25.0.5
2024-04-11 20:03:51 +02:00
francescomani
29c3f22872 fix for a regression in !2638 (wrong MCS Table for PUSCH at UE) 2024-04-11 16:54:04 +02:00
francescomani
84e1d8205e add new state for UE detachement 2024-04-11 16:48:36 +02:00
francescomani
2baa126028 do not schedule RACH if not sync 2024-04-11 16:48:36 +02:00
francescomani
81641ea43d avoid another segfault at detach 2024-04-11 16:48:32 +02:00
francescomani
08ad45ad5e remove band number information from gNB log to configure UE via command line parameter 2024-04-11 16:46:36 +02:00
francescomani
19a51f67b2 flag for detach after RRCrelease at UE 2024-04-11 16:46:36 +02:00
francescomani
851cf96943 add detach log at MAC 2024-04-11 16:46:36 +02:00
francescomani
7c24dea132 avoid another possible segfault 2024-04-11 16:46:32 +02:00
francescomani
2a03d79389 adding a check on pusch_Config to avoid segfault 2024-04-11 16:27:44 +02:00
francescomani
e8f0700881 free RACH structures in the right place for the right triggering cause 2024-04-11 16:27:44 +02:00
Jaroslava Fiedlerova
028de7a697 Add xml files for testing T2 LDPC decoding and encoding offload
- Enable build of T2 lib in RAN-gNB-N300-Timing-Phytest-LDPC
 - Add testcases with 2 layers
2024-04-11 16:06:53 +02:00
Jaroslava Fiedlerova
efe065462d Add ulsch decoding statistics measurements
Add ulsch decoding measurements, which are reported by nr_ulsim. Start ulsch_decoding_stats measurement before
nr_ulsch_decoding is called and stop it after collection of all decoder tasks from Tpool. In the context of nr_ulsim,
ULSCH_id is allways == 0, testing is performed per one TB, therefore measurement is started and stopped only once per trial.
Reported ulsch decoding statistics show the mean ulsch decoding time over x trials (specified by -n command line option of nr_ulsim).
This measurement does not provide valid information in case of nr-softmodem, when the loop is done over multiple ULSCH IDs -
start of the measurement is done multiple times and stops only once in this case.
For unitary physical simulators, ULSCH processing loop is executed only once
- the max number of PUSCH is set to 1. This ensures exactly one start and stop
of the ULSCH decoding time measurement per processed TB.

Note: ulsch decoding statistics reports average time of segmentation, rate matching, interleaving and decoding of the TB
2024-04-11 16:06:53 +02:00
Jaroslava Fiedlerova
04357e8b45 Update CUDA analysis function and XML files 2024-04-11 16:06:53 +02:00
Jaroslava Fiedlerova
cde318ced8 Rework nr_dlsim/nr_ulsim test and analysis function
- Enable both nr_ulsim and nr_dlsim test with Run_T2Test
- Introduce time threshold variable for T2/CPU LDPC tests
  - Set threshold individually for each test - T2 encoding/decoding and CPU encoding/decoding
  - Check if encoder/decoder processing time is below the threshold
  - Remove NOK return option - keep only OK (processing time below threshold) or KO (proceesing time beyond threshold)
- Rename function to run and check results of CUDA ldpctest
- Use new SSH class in function for check T2 test results, use f-strings
2024-04-11 16:06:17 +02:00
Jaroslava Fiedlerova
3c3c1e6fe6 T2 related modifications of CMakeLists and documentation
- Modify T2 PCI adr for CI T2 test setup
- Set PKG_CONFIG_PATH env var manually if needed (DPDK lib installed into custom path)
2024-04-11 15:34:43 +02:00
francescomani
a0c5a3604a fix incorrect bw index evaluation for UE capabilities 2024-04-10 14:06:41 +02:00
francescomani
b30c9c8f3c uselessAssignmentPtrArg 2024-04-09 16:55:51 +02:00
francescomani
97b3c6bc68 adding --inline-suppr option 2024-04-09 16:55:51 +02:00
francescomani
13d33163e9 nullPointer 2024-04-09 16:55:51 +02:00
francescomani
86ca5fdd55 duplicateExpression 2024-04-09 16:55:51 +02:00
francescomani
eb60194fa3 nullPointerArithmeticRedundantCheck 2024-04-09 16:55:51 +02:00
francescomani
568973d5be incorrectLogicOperator 2024-04-09 16:55:51 +02:00
francescomani
8404da759f nullPointerRedundantCheck 2024-04-09 16:55:51 +02:00
francescomani
ddf3b1614c identicalConditionAfterEarlyExit 2024-04-09 16:53:12 +02:00
francescomani
729aa41952 funcArgOrderDifferent 2024-04-09 16:53:12 +02:00
francescomani
3f1dd8d7ba syntaxError 2024-04-09 16:53:12 +02:00
francescomani
96ff859cb7 shiftTooManyBitsSigned 2024-04-09 16:53:12 +02:00
francescomani
9cc53a43b1 invalidPrintfArgType_uint 2024-04-09 16:44:56 +02:00
francescomani
8b728a45eb redundantAssignInSwitch 2024-04-09 16:44:56 +02:00
francescomani
1e1679b668 memleak 2024-04-09 16:44:56 +02:00
francescomani
2b90061669 resourceLeak 2024-04-09 16:44:56 +02:00
francescomani
686da85d05 invalidPrintfArgType_sint 2024-04-09 16:44:56 +02:00
Robert Schmidt
4895cf14c1 Reduce iperf throughput in 5G F1 RFsim test
The next commit adds channel emulation in RFsim, so we have to reduce
the iperf, as the machine might not be fast enough.
2024-04-09 13:56:29 +02:00
Robert Schmidt
1244c9a278 Merge branch 'integration_2024_w14' into 'develop'
Integration `2024.w14`

Closes #775 and #773

See merge request oai/openairinterface5g!2663

* !2411 Simple and generic trx_write support of out of time order requests
* !2532 moving decision on DCI format type to UE MAC
* !2565 improvements in security of nrUE
* !2656 remove stored G in UE DL, not needed and creating issues with DCI format 11/type0
* !2658 Fix sleeping ue at synchro
* !2649 NR SRS RRC assrtion removal
* !2662 Avoid concurrent write while filling RX/CRC.indication
* Remove obsolete "version" parameter from yaml files used on avra
* !2664 Remove duplicated NAS message send, already done above
* !2605 Improve performance polar encoder i.e., 3GPP 38.212 5.3.1.2 function
* !2629 Msg2 and Msg3 at gNB: check allocation before committing to Msg2
* !2657 replace transient malloc by stack allocation, add defense code on block size
* !2631 chore(ci): some docker improvements
* !2654 Pucch2 polar rx dynamic range fix
* !2666 [E2 Agent] Fix E2 Setup Request for ASan
* !2661 CI: iperf/iperf3 UDP analysis function fix → review in progress, review to be completed
2024-04-09 10:12:51 +00:00
Robert Schmidt
e290b2ab1b Merge remote-tracking branch 'origin/ci-iperf3-analysis-fix' into integration_2024_w14 2024-04-09 08:09:05 +02:00
Robert Schmidt
e66588b556 Merge remote-tracking branch 'origin/e2-setup' into integration_2024_w14 2024-04-08 17:58:54 +02:00
Robert Schmidt
442af3c943 Merge remote-tracking branch 'origin/pucch2_polar_rx_dynamic_range_fix' into integration_2024_w14 2024-04-08 17:58:46 +02:00
Robert Schmidt
6719c376e2 Merge remote-tracking branch 'origin/dockerfiles-improvements-2024-03' into integration_2024_w14 2024-04-08 17:57:35 +02:00
Robert Schmidt
4b8bcf7efd Merge remote-tracking branch 'origin/replace-a-malloc-by-stack' into integration_2024_w14 2024-04-08 17:55:54 +02:00
Robert Schmidt
4f5b7fcb9e Merge remote-tracking branch 'origin/fix-msg2-gnb' into integration_2024_w14 2024-04-08 17:53:54 +02:00
Teodora
c70a9dc9eb FlexRIC commit ID update 2024-04-08 17:42:27 +02:00
Jaroslava Fiedlerova
ffe9096b0e Put Launch/StopPySharkCapture function out of the class 2024-04-08 17:37:26 +02:00
Jaroslava Fiedlerova
7732689b9b Remove unused awk scripts 2024-04-08 17:37:26 +02:00
Jaroslava Fiedlerova
8e6f7d9594 Use requested bitrate in iperf2 UDP analysis function
Simplification of the code by replacing iperf_opt by target_bitrate (returned from Iperf_ComputeModifiedBW) - no need to repeat the steps to retrieve information about requested bitrate from iperf_opt. Compute iperf bitrate performance as receiver bitrate over requested (target) bitrate.
Fix an issue with misdetection of missing report line - "result" was defined 2x in the function. With this MR, result can be only None or stores output of re.search() for matching the report line pattern, which ensure proper detection of the report line as well as presence off all required components in the report line.
2024-04-08 17:37:18 +02:00
Jaroslava Fiedlerova
ef5df38fd2 Use requested bitrate in iperf3 UDP analysis function
Sender bitrate is not always equal to the requested bitrate (set by "-b" iperf option) in iperf3 (v3.9) UDP tests, so we have to compture bitrate performance of UDP iperf3 test as receiver over requested bitrate. Bitrate performance then express percentage of requested bitrate, which is received on the receiver side.
2024-04-08 17:37:18 +02:00
Jaroslava Fiedlerova
4f60810d32 Compute and return requested bitrate from Iperf_ComputeModifiedBW
For iperf3 (version 3.9) UDP, sender bitrate is not always equal to requested bitrate (defined by '-b' option). We need to retrieve information about the requsted bitrate from iperf command line options specified for each UDP testcase. This parameter is then used in UDP analysis functions for proper evaluation of the test results.
2024-04-08 17:37:11 +02:00
Robert Schmidt
e3747ab592 Check if Msg3 start&length can be accommodated in mixed slot
Prior to this commit, it might happen that the gNB used TDA 0 (Start 0
len 13) for mixed slot, in which case the UE could not send msg3
(because a mixed slot has less than 13 symbols).
2024-04-08 17:30:37 +02:00
Teodora
f571043da8 Fix E2 Setup Request memory leakage 2024-04-08 15:26:00 +02:00
Robert Schmidt
8940400aa6 Define subband power avg through MAX_ANT, is bigger 2024-04-08 14:19:35 +02:00
Robert Schmidt
fdb993279e Add more nr_pucchsim tests for 273 PRBs 2024-04-08 12:54:42 +02:00
Robert Schmidt
e289c11b1b Order nr_pucchsim options alphabetically in help 2024-04-08 12:54:42 +02:00
Raymond Knopp
fec145cac6 Pucch2 polar rx: fix dynamic range
fixes the overflow issue in the PUCCH2 RX with 4+ RX antennas and 12+
bits (polar code format). The fix scales the polar decoding LLR
computation according to the number of RX antennas. The issue was clear
for 100 MHz 4 RX antennas. Even

  nr_pucchsim -s -5 -q 8 -P 2 -b 12 -R 273 -z4 -n1000

doesn't converge to 0 BLER with increasing SNR. The issue didn't appear
in CI because of the bandwidth and antenna count limitations.
2024-04-08 12:53:35 +02:00
Robert Schmidt
171d9950a1 Merge remote-tracking branch 'origin/perf_improv_polar_encoder' into integration_2024_w14 2024-04-08 08:29:29 +02:00
Robert Schmidt
5f652b1716 Merge remote-tracking branch 'origin/resolve-duplicate-nas' into integration_2024_w14 2024-04-08 08:29:23 +02:00
Laurent THOMAS
b380af69dc remove one useless memset 2024-04-05 15:30:00 +02:00
Jaroslava Fiedlerova
0e85db5419 Remove obsolete "version" parameter from yaml files used on avra
- docker on CI machine avra was updated to version 26.0.0, which reports
  parameter "version" as obsolete
- this additional log causes fail of the container undeployment to stage
2024-04-05 15:26:31 +02:00
Laurent
a0e7733035 Warning fix to RHEL generated message
: error: '<unknown>' may be used uninitialized [-Werror=maybe-uninitialized]
  180 |   reverse_bits_u8(tmp, N/8, D2);
2024-04-05 14:14:18 +02:00
Jaroslava Fiedlerova
16765f3545 Merge remote-tracking branch 'origin/gnb-stable-ul-many-ues' into integration_2024_w14 2024-04-05 11:19:29 +02:00
Jaroslava Fiedlerova
8a9b69984b Merge remote-tracking branch 'origin/NR_SRS_remove_assertion' into integration_2024_w14 2024-04-05 11:19:09 +02:00
Robert Schmidt
680c6b69e1 Remove duplicated NAS message send, already done above
Closes: #775
2024-04-05 09:56:06 +02:00
Robert Schmidt
5951caa91e Avoid concurrent write while filling RX/CRC.indication
We observe these asserts while running concurrent UL traffic on many
UEs:

  Assertion (crc->rnti == rx->rnti) failed!
  In handle_nr_ulsch() ../../../openair2/NR_PHY_INTERFACE/NR_IF_Module.c:193
  mis-match between CRC RNTI 7221 and RX RNTI 35cf

CRC and RX indication need to be pairwise for one UE, when here we have
each for different UE. However, investigation seemed to indicate that
both arrays for CRC and RX indication contained only one PDU; it seemed
the RNTI changed while writing the CRC/RX.indication messages in
nr_fill_indication().

In this patch, we change the logic to mark a ULSCH free AFTER calling
nr_fill_indication(). It is difficult to say if this makes the assertion
disappear, but preliminary tests did not exhibit the same failure
states.

Closes #773
2024-04-04 19:00:57 +02:00
Robert Schmidt
e6e25275ed Bugfix: make preamble_list an array
- It is only a couple of bytes
- It hid a bug: if two preambles, L1_nr_prach_procedures() overwrote the
  preamble of the first with the second one
2024-04-04 18:55:53 +02:00
Robert Schmidt
0f1f76878e NRUE: print RA RNTI when receiving RAPID 2024-04-04 18:55:53 +02:00
Robert Schmidt
087480084b increase response_window in multi-UE test 2024-04-04 18:55:53 +02:00
Robert Schmidt
0e2c9e8ebb Do not reduce RACH.ind count in loop
if we reduce, we will never do all rach indications. Go one-by-one
instead.
2024-04-04 18:55:53 +02:00
Robert Schmidt
c9f58179e4 Improve Preamble detection log and reformat code 2024-04-04 18:55:53 +02:00
Robert Schmidt
0716d1d6c0 gNB: Msg2: print used RAPID 2024-04-04 18:55:53 +02:00
Robert Schmidt
b63762f9fe Improve RA logs 2024-04-04 18:55:53 +02:00
Robert Schmidt
ca1ca5f5af Check beam before allocating Msg2/harmonize with Msg3 retx 2024-04-04 18:54:04 +02:00
Robert Schmidt
d534e444f0 Check Msg3 TDA before committing to Msg2 allocation 2024-04-04 18:54:04 +02:00
Robert Schmidt
876b2ce8f6 Refactor Msg3 TDA selection in own function 2024-04-04 18:54:04 +02:00
Robert Schmidt
defc97ec16 check Msg2 allocation frame/slot in DL scheduler
Move decision of Msg2 allocation time instant from instance we receive
RA indication (only containing preamble time information) to actual RA
scheduler (containing current DL slot time). This has the advantage:

- if Msg2 cannot be sent, we might try in a later slot
- no timing-based problems were a RACH.indication FAPI message might
  come late, we calculate a Msg2 frame/slot, but this instant has
  already passed in the DL scheduler
- no assumption about slot_ahead (an L1 constant)

The previous code calculated and verified an SSB index; I am not sure
this code is correct or used. I leave the function
ssb_index_from_prach() (hence the gcc attribute), but remove any checks.
Similarly, the beam association list might be wrong. I deleted the
corresponding code.
2024-04-04 18:54:04 +02:00
Robert Schmidt
8d37fde91f Refactor: store Msg.1 parameters in RA process
- the preamble is needed to detect when we are outside of the RA window,
  so store it
- store the rest of Msg1 variables together in struct
2024-04-04 18:54:04 +02:00
Robert Schmidt
7364d9bde7 Move find_monitoring_periodicity_offset_common() to RA file 2024-04-04 18:54:04 +02:00
Robert Schmidt
7873292f28 Reduce indentation in nr_generate_msg2(): no functional changes 2024-04-04 18:54:04 +02:00
Robert Schmidt
205cc66546 Refactor former find_nr_RA_id() to static function 2024-04-04 18:54:04 +02:00
Robert Schmidt
8f747d7aa2 Simplify nr_initiate_ra_proc()
- create function to find free RA process
- reorganize function to put Msg1 related processing first, Msg2 second
2024-04-04 18:54:04 +02:00
Robert Schmidt
6658eb28f0 Simplify nr_clear_ra_proc() 2024-04-04 18:54:04 +02:00
Robert Schmidt
3289189a2d Fix: Configure TDD beam association only in FR2; set to NULL otherwise
Before this commit, there was data that was not initialized, resulting
in Msg2 remaining unscheduled.
2024-04-04 18:53:33 +02:00
Jaroslava Fiedlerova
c5b6195a60 Merge remote-tracking branch 'origin/fix-sleeping-ue-at-synchro' into integration_2024_w14 2024-04-04 17:50:46 +02:00
Jaroslava Fiedlerova
ad77def89d Merge remote-tracking branch 'origin/remove-stored-G-in-UE-dl' into integration_2024_w14 2024-04-04 17:49:56 +02:00
Jaroslava Fiedlerova
13ac4105b9 Merge remote-tracking branch 'origin/improve-nrue-security' into integration_2024_w14 2024-04-04 16:46:43 +02:00
Jaroslava Fiedlerova
2ace33d289 Merge remote-tracking branch 'origin/NR_MAC_UE_rework_processing_DCI' into integration_2024_w14 2024-04-04 16:39:37 +02:00
francescomani
2f9fe36412 improvements in the procedures for SR at MAC UE 2024-04-04 14:34:56 +02:00
Raphael Defosseux
a227eb7720 chore(ci): some docker improvements
Signed-off-by: Raphael Defosseux <raphael.defosseux@eurecom.fr>
2024-04-04 14:22:26 +02:00
francescomani
21d3a4ea51 improving the handling of sr_TransMax 2024-04-04 13:58:01 +02:00
francescomani
338426ed72 use NR_timer_t for SR-ProhibitTimer 2024-04-04 08:37:56 +02:00
Laurent THOMAS
df86214067 Add a generic function for tx write out of order (timestamps not increasing)
Add an API to allow out-of-order writes to a radio interface, unlike the
current interface.

this function is called in UE in this commit, even if the tx might
still be in order.

Later, i plan to improve UE pulti-threading, that will lead to out of
order tx.  also, the gNB will benefit of this new function to replace
several specific pieces of code that reorder tx with over complex and
slow systems
2024-04-04 08:19:52 +02:00
Laurent THOMAS
effe4f1c81 replace transient malloc by stack allocation, add defense code on block size 2024-04-03 10:31:34 +02:00
Laurent THOMAS
7106f3c15c fix sleeping UE when PSS detection is wrapping over frame buffer 2024-04-03 09:44:50 +02:00
Laurent THOMAS
a3f472a58b remove stored G in UE DL, not needed and creating issues with DCI format 11/type0 2024-04-03 09:42:46 +02:00
francescomani
aaddf3623c bugfix: new implementation prevented to find DL DCI if there was already UL DCI in the same slot 2024-04-03 09:14:50 +02:00
francescomani
fa27f9ad48 moving decision on DCI format type from L1 to MAC 2024-04-03 09:14:50 +02:00
Cedric Roux
fbe2b65ee6 nr pdcp: small improvement: LOG after unlock
Reduces time with lock acquired.
2024-04-03 08:29:26 +02:00
Cedric Roux
a323195aed nr pdcp: improve readability of integrity checking
Introduce the structure nr_pdcp_integrity_data_t and adapt code to use it.

Note: in nr_pdcp_sdu_t we keep the 'count' variable (which is also present
in nr_pdcp_integrity_data_t). They represent the same value, but 'count'
in nr_pdcp_integrity_data_t is to be specifically used for integrity while
the other one has other uses, so it's better to keep it.
2024-04-03 08:28:15 +02:00
Cedric Roux
0f9b335951 minor: move declaration of variable 2024-04-03 08:28:15 +02:00
Cedric Roux
f81a463f99 nrUE: reply SecurityModeFailure if integrity of SecurityModeCommand fails 2024-04-03 08:28:15 +02:00
Cedric Roux
d1f490243e nrUE: check integrity of SecurityModeCommand
We AssertFatal() if integrity fails. To be refined if needed.
2024-04-03 08:28:15 +02:00
Cedric Roux
4e625b01d2 nr pdcp: add an API function to check integrity 2024-04-03 08:28:15 +02:00
Cedric Roux
b9f0299165 nrUE: simplify nr_rrc_ue_process_securityModeCommand()
The case securityModeFailure didn't seem to be implemented
properly, so I just removed it entirely.

The variable 'securityMode' did not make much sense, removed as well.
Plus for integrity, there was: securityMode |= 1 << 5 for nea1
and << 6 for nea2, which does not seem correct (I would expect << 4
and << 5 respectively), so it was properly incorrect.

'securityModeCommand->criticalExtensions.choice.securityModeCommand'
was accessed before checking that
'securityModeCommand->criticalExtensions.present'
is 'NR_SecurityModeCommand__criticalExtensions_PR_securityModeCommand',
which is wrong.

The tests 'securityMode >= NO_SECURITY_MODE' and 'securityMode != 0xff'
don't make sense/are unclear, so removed too.

So let's simplify this function, wrong in several places. And put
some AssertFatal() so that the code won't do weird things. The
AssertFatal() can be removed later and the function improved later
if needed. The case securityModeFailure can also be handled later,
but I think there is more work to do than just encoding the message
and send it to the gNB, so it's not bad to remove it for the moment.
2024-04-03 08:28:15 +02:00
Cedric Roux
cc61d4f7be nr pdcp: pass MAC-I and header to upper layers
Needed by some RRC procedures to validate the integrity of a message
before accepting it.
2024-04-03 08:28:15 +02:00
Cedric Roux
d4d534f1ef nrUE: bugfix: derive and use correct security keys for DRBs 2024-04-03 08:28:15 +02:00
Cedric Roux
f85e3adc5a nrUE: bugfix/improvement in security mode handling
The use of security_mode_completed in the PDCP entity was a hack.

Plus it was not working at all with the deregistration request
when nea2 is used, sent when doing ctrl+c in the nrUE.

So let's remove it.

And let's handle activation of integrity and ciphering more in
accordance with what 38.331 says. SecurityModeComplete has to
be sent integrity protected, but not ciphered. Only after should
the ciphering be activated. (See 38.331 5.3.4.3.)
2024-04-03 08:28:12 +02:00
Cedric Roux
7cceaa3fae nrUE: report nea2 support in the capabilities 2024-04-03 08:26:39 +02:00
Robert Schmidt
1cae1879be Merge branch 'integration_2024_w13' into 'develop'
Integration `2024.w13`

Closes #696 and #762

See merge request oai/openairinterface5g!2653

* !1911 Preparatory work for NR DL 4-layer MIMO at gNB
* !2610 fix ug on pilot 2 in nr_pbch_dmrs_correlation() that is lacking signal...
* !2639 NR gNB PUCCH2 CQI workaround
* !2642 NR UE demoting to LOG_D another log that cause flooding
* !2644 NR UE prevent segfault at detach
* !2645 add error code for pdu session reject in the ue
* !2600 Handle Msg3 with SRB1 RRCReestablishmentComplete and MAC CE C-RNTI
* trigger RF-sim E1+F1 test without asan
* !2636 Fix various F1 problems
* !2641 NR DL and UL channel estimation fix
* !2652 Provide additional troubleshooting documentation for QtScope
* !2646 NRUE fix asn_sequence_del to clear a list
* !2504 CI: use iperf3, refactor Iperf_Module
* !2617 use UE ID instead of RNTI internally in NR RLC
* !2619 Minor PDCP fixes
* !2648 Minor CI fixes, stack protection, fix E1+F1 Quectel test, L2sim5G test
2024-04-03 06:04:17 +00:00
Jaroslava Fiedlerova
acd94f9d43 Merge remote-tracking branch 'origin/ci-fixes' into integration_2024_w13 2024-04-02 19:13:02 +02:00
Jaroslava Fiedlerova
4885e1d4ef EXPERIMANTAL: add -fstack-protector-strong to rhel image build 2024-04-02 18:18:12 +02:00
Jaroslava Fiedlerova
141558b812 Merge remote-tracking branch 'origin/nr-pdcp-minor-fixes' into integration_2024_w13 2024-04-02 18:16:33 +02:00
Jaroslava Fiedlerova
08b8071091 Merge remote-tracking branch 'origin/NR_RLC_UE_ID' into integration_2024_w13 2024-04-02 18:15:51 +02:00
Jaroslava Fiedlerova
0edb81dc01 Merge remote-tracking branch 'origin/ci-iperf-improvements-test' into integration_2024_w13 2024-04-02 11:40:28 +02:00
Jaroslava Fiedlerova
ded3618f70 Merge remote-tracking branch 'origin/NR_UE_fix_wrong_use_asn_sequence_del' into integration_2024_w13 2024-04-02 11:36:43 +02:00
Jaroslava Fiedlerova
4d25ee9545 Merge remote-tracking branch 'origin/dqt-troubleshoot-doc' into integration_2024_w13 2024-04-02 11:35:51 +02:00
Jaroslava Fiedlerova
06f45c462b Merge remote-tracking branch 'origin/NR_fix_layer_port_confusion_channel_estimates' into integration_2024_w13 2024-04-02 11:33:48 +02:00
Jaroslava Fiedlerova
3e9f1beea0 Merge remote-tracking branch 'origin/fix-f1-id-ues' into integration_2024_w13 2024-04-02 11:33:12 +02:00
Robert Schmidt
897e499d55 Use normal/non asan images for 5G RFsim E1 2024-04-02 11:12:09 +02:00
Sagar Arora
84d28168f7 UPF can only use IPv4 and FQDN localhost resolves to IPv6 on an IPv6 enabled machine 2024-04-02 11:06:30 +02:00
Jaroslava Fiedlerova
87db25a3bb Merge remote-tracking branch 'origin/Fix_Msg3_RRCReestablishmentComplete_with_C-RNTI' into integration_2024_w13 2024-03-29 20:44:11 +01:00
Jaroslava Fiedlerova
3dd2e5e1c3 Merge remote-tracking branch 'origin/add-message-pdu-sessio-reject' into integration_2024_w13 2024-03-29 17:03:19 +01:00
Jaroslava Fiedlerova
87d14c3cd4 Merge remote-tracking branch 'origin/NR_prevent_segfault_at_detach' into integration_2024_w13 2024-03-29 17:02:45 +01:00
Jaroslava Fiedlerova
5fc9a4bc42 Merge remote-tracking branch 'origin/demote_another_log_printed_too_many_times' into integration_2024_w13 2024-03-29 17:02:16 +01:00
Jaroslava Fiedlerova
19eb0af185 Merge remote-tracking branch 'origin/NR_PUCCH2_RX_CQI' into integration_2024_w13 2024-03-29 16:59:27 +01:00
Jaroslava Fiedlerova
c5bc442410 Merge remote-tracking branch 'origin/better-log-ue-sync' into integration_2024_w13 2024-03-29 16:08:38 +01:00
Jaroslava Fiedlerova
c92650003f Merge remote-tracking branch 'origin/NR_4_layers_MIMO' into integration_2024_w13 2024-03-29 16:06:14 +01:00
Robert Schmidt
9b8479488f Provide additional troubleshooting documentation for QtScope
On Wayland (e.g., Gnome on Ubuntu 22), additional steps might be
necessary to make QtScope run. Describe them in the doc.

Closes: #696
2024-03-29 09:50:32 +01:00
Guido Casati
914e71fdab Flag RBs as suspended in PDCP
- this prevents pulling PDUs from PDCP when re-establishment is awaiting
2024-03-28 18:28:16 +01:00
Guido Casati
f7a285cfc1 Define for PDCP Formats
- short and long SN sizes
- PDCP PDU header sizes
- PDCP integrity size
- getter for maximim PDCP PDU size
2024-03-28 18:28:11 +01:00
francescomani
e77a1468d7 use UE ID instead of RNTI internally in RLC 2024-03-28 16:39:51 +01:00
francescomani
0bb67e9552 removing an assertion in SRS RRC config that was already been removed in the past and someone has been placed back 2024-03-28 15:11:10 +01:00
francescomani
4a3beb0b48 fix usage of asn_sequence_del to clear a list 2024-03-28 13:50:11 +01:00
luis_pereira87
bbb1832c07 Handle Msg3 with SRB1 RRCReestablishmentComplete and MAC CE C-RNTI
From 3GPP TS 38.321 Section 5.4.3 Multiplexing and assembly, we need to process the highest priority subPDUs first:
- MAC CE for C-RNTI is the one with higher priority
2024-03-28 11:39:07 +00:00
Robert Schmidt
f4ac4fee42 Apply 1 suggestion(s) to 1 file(s) 2024-03-28 10:47:10 +00:00
Robert Schmidt
e0b31be148 Request release for UEs if DU disconnects
38.473 section 8.2.3.1 says that upon F1 Setup Request, UE associated
signalling should be erased. In this commit, we trigger a release of all
UEs that were still connected to a DU when we received the SCTP
shutdown, i.e., when the DU disconnects.
2024-03-28 08:55:11 +01:00
Robert Schmidt
e5e48bb2d8 RRC: take last UE activity time stamps 2024-03-28 08:55:11 +01:00
Robert Schmidt
d9abf18dab Check If UE ID exists when handling CU RRC message transfer
Closes #762
2024-03-28 08:55:11 +01:00
Robert Schmidt
1e8f194d11 Only release UE in PDCP if in E1
Explanations: see #706. TLDR: the RRC code calls nr_pdcp_remove_ue(), so
we should not call it in the E1 handler if we do not use split mode.
2024-03-28 08:55:11 +01:00
Robert Schmidt
78f6e83f55 EXPERIMANTAL: -fstack-protector-strong 2024-03-28 08:27:47 +01:00
Robert Schmidt
03312c9102 Remove L2-Sim-Test-5G from CI ContainerParent pipeline
5G L2sim is broken since some time, and there is no time to fix it.
Remove it from the Container Parent Pipeline.
2024-03-28 08:26:53 +01:00
Robert Schmidt
f86a285cb9 Improve SABOX F1+E1 radio behavior 2024-03-28 08:26:53 +01:00
Robert Schmidt
8f9c3a55de Debugging of images with core dumps: improvements
- Four mounting of files, we need the absolute path. Even if the script
  gets relative paths, realpath will give the absolute path
- Correctly recognize and handle gNB images with AW2S support
2024-03-28 08:26:53 +01:00
Robert Schmidt
4340277b3e Dockerfiles for gNB AW2S: add gdb for debugging 2024-03-28 08:26:53 +01:00
Jaroslava Fiedlerova
76900d5ca8 Remove redundant parameters (iperf_packetloss_threshold, iperf_profile) from iperf TCP testcases 2024-03-27 23:19:17 +01:00
Jaroslava Fiedlerova
d456fa5620 Remove "single-ue" profile from config files
- no need to specify "single-ue" profile when running iperf test for 1 UE only
- default profile "balanced" can be used instead, computes BW for 1 UE correctly
2024-03-27 23:19:17 +01:00
Jaroslava Fiedlerova
0713afd610 SA-AERIAL-CN5G - add svr_id 2024-03-27 23:19:17 +01:00
Jaroslava Fiedlerova
be461a0db9 RF-Sim-Test-4G - modify xml files, use iperf3, add svr id 2024-03-27 23:19:17 +01:00
Jaroslava Fiedlerova
8830529ed0 L2-Sim-Test-4G - modify xml files, use iperf3, add svr id 2024-03-27 23:19:17 +01:00
Jaroslava Fiedlerova
ae544eff58 SA-OAIUE-CN5G - modify xml files, add svr id 2024-03-27 23:19:17 +01:00
Jaroslava Fiedlerova
5d5032880f LTE-FDD-OAIUE-OAICN4G-Container - modify xml files, add svr id 2024-03-27 23:19:17 +01:00
Jaroslava Fiedlerova
a20efee737 RAN-LTE-TDD-2x2-Container use iperf3 2024-03-27 23:19:17 +01:00
Jaroslava Fiedlerova
6563bd65cb RAN-LTE-TDD-LTEBOX use iperf3 2024-03-27 23:19:12 +01:00
Jaroslava Fiedlerova
303fb52aee RAN-LTE-FDD-LTEBOX use iperf3 2024-03-27 23:19:06 +01:00
Jaroslava Fiedlerova
723d57c29d RAN-RF-Sim-Test-5G test with iperf3 2024-03-27 23:12:02 +01:00
Jaroslava Fiedlerova
150c49b47e SA-AW2S-CN5G - modify xml files, add svr id 2024-03-27 23:12:02 +01:00
Jaroslava Fiedlerova
d499482653 RAN-NSA-B200-Module-LTEBOX-Container switch to iperf3 2024-03-27 23:12:02 +01:00
Jaroslava Fiedlerova
546e0350ce RAN-SA-B200-Module-SABOX-Container switch to iperf3 2024-03-27 23:12:02 +01:00
Jaroslava Fiedlerova
429dbae997 Switch to iperf3 in unused xml files 2024-03-27 23:12:02 +01:00
Jaroslava Fiedlerova
d7d85ff9cd Remove unused iperf test and analysis functions
- Remove IperfFromContainer
- Remove unused functions IperfExit and PingExit
- Remove unused function for iperf analysis
2024-03-27 23:12:02 +01:00
Jaroslava Fiedlerova
08f0040a9a Install iperf3 in gNB and UE containers 2024-03-27 23:12:02 +01:00
Jaroslava Fiedlerova
2262c46308 Remove 10s sleep after object deployment 2024-03-27 23:12:02 +01:00
Jaroslava Fiedlerova
cb1f72a8a6 Refactor Iperf_Module 2024-03-27 23:11:56 +01:00
Jaroslava Fiedlerova
7eefa4ec75 Add iperf3 analysis functions 2024-03-27 22:43:52 +01:00
Jaroslava Fiedlerova
4ad8a7bd64 Add iperf_tcp_rate_target for TCP iperf3 tests 2024-03-27 22:43:52 +01:00
Jaroslava Fiedlerova
cef76f3d20 Put Iperf_ComputeModifiedBW and Iperf_ComputeTime outside the class 2024-03-27 22:43:46 +01:00
Jaroslava Fiedlerova
08353293e5 Rename and modify ci_ueinfra and cls_module_ue
- add traffic servers
- add runServer parameter
2024-03-27 22:37:55 +01:00
Jaroslava Fiedlerova
921c24ce96 Add 10ms sleep after remote and local command running in background 2024-03-27 22:37:55 +01:00
Laurent THOMAS
6b4710d36d add error code for pdu session reject in the ue 2024-03-27 13:12:35 +01:00
Laurent THOMAS
86ebebf3f5 fix merge conflicts 2024-03-27 10:06:33 +01:00
francescomani
6e9dd015f6 DCI formats 11 and 01 assume the presence of an active BWP, if not present return with an error to prevent segfault 2024-03-27 09:36:19 +01:00
Laurent THOMAS
9a4294ebab for_review_then_squash 2024-03-26 20:58:44 +01:00
Laurent THOMAS
a95dffc80e delete dead files 2024-03-26 20:57:31 +01:00
Laurent THOMAS
80d4d600f3 print the mib when decoded 2024-03-26 20:57:31 +01:00
Laurent THOMAS
88fb3c3598 change type to c16_t around dmrs computation pieces of code 2024-03-26 20:57:31 +01:00
Laurent THOMAS
99e1bb1a00 fix ug on pilot 2 in nr_pbch_dmrs_correlation() that is lacking signal processing, make the code in pbch simpler and faster 2024-03-26 20:57:31 +01:00
Laurent THOMAS
39400a458e change partially pbch detection to c16_t instead of hidden complex in int16_t and int32_t 2024-03-26 20:57:31 +01:00
Laurent THOMAS
34f260769b make better log text for ue synchronization, make better sync code, no functional change 2024-03-26 20:57:29 +01:00
francescomani
4ba44927f4 demoting to LOG_D another log that otherwise would be printed too many times at the UE because of periodic calling of to_nrarfcn 2024-03-26 17:50:06 +01:00
francescomani
ca949b4c29 remove nushift in DL channel estimation 2024-03-26 10:47:19 +01:00
francescomani
dcc107bfd9 use layer number and not dmrs port number to index pusch channel estimates (plus some code improvement) 2024-03-26 10:06:49 +01:00
francescomani
be807c92bd use layer number and not dmrs port number to index pdsch channel estimates (plus some code improvement) 2024-03-26 09:44:18 +01:00
francescomani
f2c8305496 further improvements in precoding initialization at MAC 2024-03-25 16:01:09 +01:00
francescomani
afde7f6c51 improvements in precoding initialization at MAC 2024-03-25 13:09:31 +01:00
francescomani
b739e5357d hardcoding invalid report for PUCCH2 CQI at gNB because SNR computation is wrong 2024-03-22 12:51:28 +01:00
mir
b21552973c Remove old OAI implementation 2024-03-22 11:36:45 +01:00
mir
a6ad11a20e Remove duplicated bit reverse table 2024-03-22 11:36:41 +01:00
mir
44e31bd845 Improved polar encoder 2024-03-22 11:35:34 +01:00
francescomani
8f858af876 improvements for 4-layer MIMO at gNB 2024-03-21 18:22:25 +01:00
2569 changed files with 269028 additions and 198636 deletions

View File

@@ -62,6 +62,7 @@ ForEachMacros:
- BOOST_FOREACH
- RB_FOREACH
- UE_iterator
- FOR_EACH_SEQ_ARR
IncludeBlocks: Preserve
IncludeCategories:
- Regex: '^<ext/.*\.h>'

10
.gitignore vendored
View File

@@ -5,7 +5,6 @@
cmake_targets/log/
cmake_targets/*/build/
cmake_targets/ran_build/
cmake_targets/nas_sim_tools/build/
log/
lte_build_oai/
@@ -21,7 +20,16 @@ GRTAGS
GTAGS
tags
# Package conffiles
tools/packages/oai-lte/conffiles
tools/packages/oai-nr/conffiles
tools/packages/liboai-common/conffiles
tools/packages/liboai-usrp/conffiles
# others
nfapi_nr_interface_scf
*.log
*.out
CMakeUserPresets.json

View File

@@ -1,5 +1,173 @@
# RELEASE NOTES: #
## [v2.4.0](https://gitlab.eurecom.fr/oai/openairinterface5g/-/tags/v2.4.0) -> December 2025. ##
General new features and improvements (both RAN and UE):
- Rework LDPC BBdev/AAL interface and support both AMD T2/Intel vRAN Boost
(VRB) 1 accelerators
- Add a taps client for vrtsim real-time simulator (check: vrtsim release?)
- Add new RFemulator virtual radio driver to emulate radio (including noise
generation) for gNB/UE standalone operation
- RLC AM reception improvements for high-throughput scenarios (!3512)
- Small NTN fixes (!3659, !3666, !3581, !3652)
- Improvements to imScope
Stability and bug fixes:
- RFsimulator: fix concurrency problems during multi-client connection
- USRP driver: support synchronization of USRP B200
- MAC scheduler improvements
- General L1 improvements for efficiency and stability
- Correct PRS bug and test in CI
- Upgrade Ubuntu container images to Ubuntu 24.04
- All build system targets compile (`make/ninja all`)
- Minor cleanup, harmonization, and performance improvements all over the stack
- Simplify CI code
RAN changes (gNB/CU/CU-CP/CU-UP/DU/DU-high/DU-low):
- Support of N2 handover
- Support of "UL-heavy" TDD patterns, e.g., DSUUU
- Open Fronthaul M-plane: CM improvements, PM implementation, and additional
v16.01 support
- Improve interoperability with Nvidia Aerial L1 to support 2 layer UL
- Add O-RAN OSC WLS library as FAPI transport and enable L1/L2 shared memory
split
- Implement FAPI Stop exchange
- Improve interoperability with srsRAN_Project DU
- Add new synchronized real-time data recording application (!3462)
- Support for measurement gaps and general handover fixes
- Support of RRC PDU session release procedure
- Add CU-UP load tester
- Correct BWP scheduling and support multiple BWPs per UE
nrUE changes:
- Support one additional PDU session (see !3486)
- L3 measurements for A2 measurement reports
- Support for type0 PDSCH frequency allocation
- UE symbol based PDCCH receiver
Regression or removals:
- No known regressions
- Unused L2 simulator code has been removed
- Unused Benetel radio driver code (not FHI 7.2!) has been removed
Configuration file changes:
- `gNBs.[0].servingCellConfigCommon.[0].ra_ResponseWindow` is automatically
computed and can be removed
- `gNBs.[0].bwp_list` has been added (moved from entries in
`gNBs.[0].servingCellConfigDedicated`)
- `gNBs.[0].phaseTrackingRS` has been added (moved from entries in
`gNBs.[0].servingCellConfigDedicated`)
- `gNBs.[0].local_s_portc` and `gNBs.[0].remote_s_portc` have no effect and
should be removed
- `gNBs.[0].CSI_report_type` has been added
- `MACRLCs.[0].ulsch_max_frame_inactivity` is automatically computed and can be
removed
- `MACRLCs.[0].local_n_portc` and `MACRLCs.[0].remote_n_portc` have no effect and
should be removed
- `MACRLCs.[0].stats_max_ue` has been added
## [v2.3.0](https://gitlab.eurecom.fr/oai/openairinterface5g/-/tags/v2.3.0) -> July 2025. ##
General new features and improvements (both RAN and UE):
- Preliminary support for RedCap UEs
- Support for NTN LEO scenarios including SIB19 and channel emulation (see
doc/RUNMODEM.md)
- VRTSIM: new shared memory realtime radio (see develop/radio/vrtsim/README.md)
- Support for TDD pattern 2
- Support for long PRACH
- Support for SIB2
- Add unit tests using ctest (see doc/UnitTests.md)
Stability and bug fixes:
- Improve various procedures (e.g., RRC reestablishment, RRC Reject, ...)
- Add improvements for ImScope
- Bugfixes in the entire stack (e.g., #803, #805, #810, #812, #818, #852, #878,
#884, #890, #895, #901, #907, #932, #939 ...)
- Documentation updates
- And many other small fixes, like memory leaks, crashes, ...
RAN changes (gNB/CU/CU-CP/CU-UP/DU/DU-high/DU-low):
- Stability and performance improvements when running with 4-layer DL MIMO
- Stability and performance improvements when running with 2-layer UL MIMO
- Interoperability testing with Metanoia Jura and Foxconn RUs
- Support of O-RAN 7.2 M-plane (Start-up procedure including configuration
management, see also doc/ORAN_FHI7.2_Tutorial.md)
- Upgrade OSC FHI (xran) from E to F release
- Refactoring of LDPC interface and performance improvements
- Support for nFAPI in all scenarios for FR1 (see doc/nfapi.md)
- Support at least 32 UEs concurrently
- Improve robustness when running in split modes (F1, E1)
- Add basic support for beam management in FR2
- Add support for O1 on DU (see also https://gitlab.eurecom.fr/oai/o1-adapter)
- E2 agent: Support for multiple E2SM-RC report service styles
nrUE changes:
- Refactoring of threading towards better code and performance
- Add or rework various procedures (e.g., RA with C-RNTI, Going to Idle, RA, ...)
- Refactor and extend NAS implementation (e.g., Service Request, Registration
Request, Service Acept, Service Reject, ...)
- Support for continuous frequency offset compensation
- Reduce minimum RX-to-TX time to 3
Regression:
- Multiple BWPs do not work reliably on gNB; use tag 2025.w17
## [v2.2.0](https://gitlab.eurecom.fr/oai/openairinterface5g/-/tags/v2.2.0) -> November 2024. ##
General 5G improvements (both gNB and UE):
- Make standalone mode (SA) the default (see [`RUNMODEM.md`](doc/RUNMODEM.md))
- Experimental support for FR2 operation
- Support for GEO NTN and simulation of GEO satellite channel in RFsimulator
(see [`RUNMODEM.md`](doc/RUNMODEM.md))
- Support 2-step RA
- Add optional LTTng logger in logging module (see
[`lttng_logs.md`](common/utils/LOG/DOC/lttng_logs.md))
- Support for YAML-based config files (alongside libconfig) (see
[`gnb.sa.band78.106prb.rfsim.yaml`](ci-scripts/conf_files/gnb.sa.band78.106prb.rfsim.yaml) and
[`nrue.uicc.yaml`](ci-scripts/conf_files/nrue.uicc.yaml))
- Add new L1 scope based on Dear ImGui (see [`readme.md`](openair1/PHY/TOOLS/readme.md))
- Allow cross-compilation on ARM (via SIMDE SIMD emulation library)
- Allow to build and run with clang
- Support/check for Linux capabilities, allow to run without sudo (see
[`tuning_and_security.md`](doc/tuning_and_security.md))
- OAI does not modify CPU frequency and networking stack
([`tuning_and_security.md`](doc/tuning_and_security.md))
- Bugfixes in the entire stack (e.g. #547, #663, #674, #687, #712, #736, #739,
#741, #756, #762, #773, ...)
5G gNB:
- Support for FR2 interoperability with COTS UE (no beam switching supported yet)
- Add 4-layer DL MIMO (experimental)
- Add gNB Neighbour configuration and Mobility over F1 interface (see
[`handover-tutorial.md`](doc/handover-tutorial.md))
- Enhance O-RAN FHI 7.2: (see [`ORAN_FHI7.2_Tutorial.md`](doc/ORAN_FHI7.2_Tutorial.md))
* Support different bandwidths (40/60/80/100MHz) and antenna configs (1x1 up
to 4x4) for Benetel/VVDN/LITEON RUs
* Add support for multi-RU support (single-cell/distributed antenna)
- Support AMD T2 Telco card look-aside L1 accelerator (see
[`LDPC_T2_OFFLOAD_SETUP.md`](doc/LDPC_T2_OFFLOAD_SETUP.md))
- Support Nvidia Aerial/ARC in-line L1 accelerator (see
[`Aerial_FAPI_Split_Tutorial.md`](doc/Aerial_FAPI_Split_Tutorial.md))
- Various fixes for multi-UE operation: by default support of up to 16 UEs concurrently
- Documentation for
- 5G MAC (see [`mac-usage.md`](doc/MAC/mac-usage.md))
- 5G RRC (see [`rrc-usage.md`](doc/RRC/rrc-usage.md))
- E1 (see [`E1-design.md`](doc/E1AP/E1-design.md))
- F1 (see [`F1-design.md`](doc/F1AP/F1-design.md))
5G UE:
- Basic interoperability with COTS gNB (Nokia gNB)
- Implement PHR reporting
- Implement RRC re-establishment
- Implement PUCCH/PUSCH/SRS power control
- Implement UCI on PUSCH and aperiodic CSI reporting
- Support of cell search (within the selected UE bandwidth) (see [`RUNMODEM.md`](doc/RUNMODEM.md))
- Enhance connection control: implement timers, resync
- A lot of internal cleanup
This release also includes many fixes and documentation updates. See
`doc/README.md` in the repository for an overview of documentation.
## [v2.1.0](https://gitlab.eurecom.fr/oai/openairinterface5g/-/tags/v2.1.0) -> February 2024. ##
This release improves existing 5G support and adds various new features.

File diff suppressed because it is too large Load Diff

64
CMakePresets.json Normal file
View File

@@ -0,0 +1,64 @@
{
"version": 3,
"configurePresets": [
{
"name": "default",
"displayName": "Default Config",
"description": "Default build using Ninja generator",
"generator": "Ninja",
"binaryDir": "${sourceDir}/cmake_targets/ran_build/build",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "RelWithDebInfo"
}
},
{
"name": "tests",
"displayName": "Default unit test config",
"inherits": "default",
"binaryDir": "${sourceDir}/cmake_targets/ran_build/build_test",
"cacheVariables": {
"ENABLE_TESTS": "ON",
"SANITIZE_ADDRESS": "ON",
"CMAKE_BUILD_TYPE": "RelWithDebInfo"
}
}
],
"buildPresets": [
{
"name": "5gdefault",
"configurePreset": "default",
"targets": [
"nr-uesoftmodem",
"nr-softmodem",
"rfsimulator",
"dfts",
"ldpc",
"params_libconfig",
"params_yaml"
]
},
{
"name": "default",
"inherits": "5gdefault"
},
{
"name": "4gdefault",
"configurePreset": "default",
"targets": [
"lte-softmodem",
"lte-uesoftmodem",
"dfts",
"coding",
"rfsimulator",
"params_libconfig"
]
},
{
"name": "tests",
"configurePreset": "tests",
"targets": [
"tests"
]
}
]
}

View File

@@ -5,22 +5,26 @@ We want to make contributing to this project as easy and transparent as possible
Please refer to the steps described on our website: [How to contribute to OAI](https://www.openairinterface.org/?page_id=112).
1. Sign and return a Contributor License Agreement to OAI team.
2. Register on [Eurecom GitLab Server](https://gitlab.eurecom.fr/users/sign_up) if you do not have any.
2. Register on [Eurecom GitLab Server](https://gitlab.eurecom.fr/users/sign_up)
if you do not have any.
- We recommend that you register with a professional or student email address.
- If your email domain (`@domain.com`) is not whitelisted, please contact us (mailto:contact@openairinterface.org).
- If your email domain (`@domain.com`) is not whitelisted, please contact us
(mailto:contact@openairinterface.org).
- Eurecom GitLab does NOT accept public email domains.
3. Provide the OAI team with the **username** of this account to (mailto:contact@openairinterface.org) ; we will give you the developer rights on this repository.
4. The policies are described in these wiki pages: [OAI Policies](https://gitlab.eurecom.fr/oai/openairinterface5g/wikis/oai-policies-home).
- PLEASE DO NOT FORK the OAI repository on your own Eurecom GitLab account. It just eats up space on our servers.
- You can fork onto another hosting system. But we will NOT accept a merge request from a forked repository.
3. Provide the OAI team with the **username** of this account to
(mailto:contact@openairinterface.org) ; we will give you the developer
rights on this repository.
4. The contributing policies are described in the [corresponding documentation
page](doc/code-style-contrib.md).
- PLEASE DO NOT FORK the OAI repository on your own Eurecom GitLab account.
It just eats up space on our servers.
- You can fork onto another hosting system. But we will NOT accept a merge
request from a forked repository.
* This decision was made for the license reasons.
* The Continuous Integration will reject your merge request.
- All merge requests SHALL have `develop` branch as target branch.
## Coding Styles ##
# License #
There are described [here](https://gitlab.eurecom.fr/oai/openairinterface5g/wikis/guidelines/guidelines-home).
## License ##
By contributing to OpenAirInterface, you agree that your contributions will be licensed under the LICENSE file in the root directory of this source tree.
By contributing to OpenAirInterface, you agree that your contributions will be
licensed under the license described in the file [`LICENSE`](./LICENSE) in the
root directory of this source tree.

View File

@@ -4,15 +4,6 @@ For more details of the license, refer to [LICENSE](LICENSE) file in the same di
However, the source code also contains third party software that is acknowledged here for reference.
## Credits for LFDS user space source code located in folder openair2/UTILS/LFDS/ ##
See on [liblfds website](https://liblfds.org/) the license section.
<pre>
"There is no license. You are free to use this software in any way, for any purpose. Go forth and create wealth!
If however for legal reasons a licence is required, the license of your choice will be granted."
</pre>
## Credits for source code common/utils/collection/queue.h: ##
The Regents of the University of California: BSD 3-Clause Licence.

View File

@@ -4,12 +4,10 @@
<p align="center">
<a href="https://gitlab.eurecom.fr/oai/openairinterface5g/-/blob/master/LICENSE"><img src="https://img.shields.io/badge/license-OAI--Public--V1.1-blue" alt="License"></a>
<a href="https://releases.ubuntu.com/18.04/"><img src="https://img.shields.io/badge/OS-Ubuntu18-Green" alt="Supported OS Ubuntu 18"></a>
<a href="https://releases.ubuntu.com/20.04/"><img src="https://img.shields.io/badge/OS-Ubuntu20-Green" alt="Supported OS Ubuntu 20"></a>
<a href="https://releases.ubuntu.com/22.04/"><img src="https://img.shields.io/badge/OS-Ubuntu22-Green" alt="Supported OS Ubuntu 22"></a>
<a href="https://www.redhat.com/en/technologies/linux-platforms/enterprise-linux"><img src="https://img.shields.io/badge/OS-RHEL8-Green" alt="Supported OS RHEL8"></a>
<a href="https://www.redhat.com/en/technologies/linux-platforms/enterprise-linux"><img src="https://img.shields.io/badge/OS-RHEL9-Green" alt="Supported OS RELH9"></a>
<a href="https://getfedora.org/en/workstation/"><img src="https://img.shields.io/badge/OS-Fedore37-Green" alt="Supported OS Fedora 37"></a>
<a href="https://releases.ubuntu.com/24.04/"><img src="https://img.shields.io/badge/OS-Ubuntu24-Green" alt="Supported OS Ubuntu 24"></a>
<a href="https://www.redhat.com/en/technologies/linux-platforms/enterprise-linux"><img src="https://img.shields.io/badge/OS-RHEL9-Green" alt="Supported OS RHEL9"></a>
<a href="https://getfedora.org/en/workstation/"><img src="https://img.shields.io/badge/OS-Fedore41-Green" alt="Supported OS Fedora 41"></a>
</p>
<p align="center">
@@ -17,7 +15,9 @@
</p>
<p align="center">
<a href="https://jenkins-oai.eurecom.fr/job/RAN-Container-Parent/"><img src="https://img.shields.io/jenkins/build?jobUrl=https%3A%2F%2Fjenkins-oai.eurecom.fr%2Fjob%2FRAN-Container-Parent%2F&label=build%20Images"></a>
<a href="https://jenkins-oai.eurecom.fr/job/RAN-Ubuntu18-Image-Builder/"><img src="https://img.shields.io/jenkins/build?jobUrl=https%3A%2F%2Fjenkins-oai.eurecom.fr%2Fjob%2FRAN-Ubuntu18-Image-Builder%2F&label=build-Ubuntu-x86%20Images"></a>
<a href="https://jenkins-oai.eurecom.fr/job/RAN-RHEL8-Cluster-Image-Builder/"><img src="https://img.shields.io/jenkins/build?jobUrl=https%3A%2F%2Fjenkins-oai.eurecom.fr%2Fjob%2FRAN-RHEL8-Cluster-Image-Builder%2F&label=build-UBI-x86%20Images"></a>
<a href="https://jenkins-oai.eurecom.fr/job/RAN-Ubuntu-ARM-Image-Builder/"><img src="https://img.shields.io/jenkins/build?jobUrl=https%3A%2F%2Fjenkins-oai.eurecom.fr%2Fjob%2FRAN-Ubuntu-ARM-Image-Builder%2F&label=build-Ubuntu-ARM%20Images"></a>
</p>
<p align="center">
@@ -25,6 +25,7 @@
<a href="https://hub.docker.com/r/oaisoftwarealliance/oai-nr-ue"><img alt="Docker Pulls" src="https://img.shields.io/docker/pulls/oaisoftwarealliance/oai-nr-ue?label=NR-UE%20docker%20pulls"></a>
<a href="https://hub.docker.com/r/oaisoftwarealliance/oai-enb"><img alt="Docker Pulls" src="https://img.shields.io/docker/pulls/oaisoftwarealliance/oai-enb?label=eNB%20docker%20pulls"></a>
<a href="https://hub.docker.com/r/oaisoftwarealliance/oai-lte-ue"><img alt="Docker Pulls" src="https://img.shields.io/docker/pulls/oaisoftwarealliance/oai-lte-ue?label=LTE-UE%20docker%20pulls"></a>
<a href="https://hub.docker.com/r/oaisoftwarealliance/oai-nr-cuup"><img alt="Docker Pulls" src="https://img.shields.io/docker/pulls/oaisoftwarealliance/oai-nr-cuup?label=NR-CUUP%20docker%20pulls"></a>
</p>
# OpenAirInterface License #
@@ -42,6 +43,7 @@ Please see [NOTICE](NOTICE.md) file for third party software that is included in
* [General overview of documentation](./doc/README.md)
* [The implemented features](./doc/FEATURE_SET.md)
* [System Requirements for Using OAI Stack](./doc/system_requirements.md)
* [How to build](./doc/BUILD.md)
* [How to run the modems](./doc/RUNMODEM.md)
@@ -69,10 +71,28 @@ openairinterface5g
├── executables : Top-level executable source files (gNB, eNB, ...)
├── maketags : Script to generate emacs tags.
├── nfapi : (n)FAPI code for MAC-PHY interface
├── openair1 : 3GPP LTE Rel-10/12 PHY layer / 3GPP NR Rel-15 layer. A local Readme file provides more details.
├── openair2 : 3GPP LTE Rel-10 RLC/MAC/PDCP/RRC/X2AP + LTE Rel-14 M2AP implementation. Also 3GPP NR Rel-15 RLC/MAC/PDCP/RRC/X2AP.
├── openair3 : 3GPP LTE Rel10 for S1AP, NAS GTPV1-U for both ENB and UE.
├── openair1 : Layer 1 (3GPP LTE Rel-10/12 PHY, NR Rel-15 PHY)
├── openair2 : Layer 2 (3GPP LTE Rel-10 MAC/RLC/PDCP/RRC/X2AP, LTE Rel-14 M2AP, NR Rel-15+ MAC/RLC/PDCP/SDAP/RRC/X2AP/F1AP/E1AP), E2AP
├── openair3 : Layer 3 (3GPP LTE Rel-10 S1AP/GTP, NR Rel-15 NGAP/GTP)
├── openshift : OpenShift helm charts for some deployment options of OAI
├── radio : Drivers for various radios such as USRP, AW2S, RFsim, ...
── targets : Some configuration files; only historical relevance, and might be deleted in the future
├── radio : Drivers for various radios such as USRP, AW2S, RFsim, 7.2 FHI, ...
── targets : Some configuration files; only historical relevance, and might be deleted in the future
└── tools : Tools for use by the developers/ci machines: code analysis and formatting
```
# How to get support from the OAI Community #
You can ask your question on the [mailing lists](https://gitlab.eurecom.fr/oai/openairinterface5g/-/wikis/MailingList).
Your email should contain below information:
- A clear subject in your email.
- For all the queries there should be [Query\] in the subject of the email and for problems there should be [Problem\].
- In case of a problem, add a small description.
- Do not share any photos unless you want to share a diagram.
- OAI gNB/DU/CU/CU-CP/CU-UP configuration file in `.conf` format only.
- Logs of OAI gNB/DU/CU/CU-CP/CU-UP in `.log` or `.txt` format only.
- In case your question is related to performance, include a small description of the machine (Operating System, Kernel version, CPU, RAM and networking card) and diagram of your testing environment.
- Known/open issues are present on [GitLab](https://gitlab.eurecom.fr/oai/openairinterface5g/-/issues), so keep checking.
Always remember a structured email will help us understand your issues quickly.

View File

@@ -1,6 +1,6 @@
apiVersion: v1
name: oai-ulsim
description: A Helm subchart for ulsim network function
name: oai-physims-4g
description: A Helm subchart for 4G physims network function
# A chart can be either an 'application' or a 'library' chart.
#
@@ -24,7 +24,6 @@ appVersion: v1
keywords:
- Physical Simulator
- ulsim
- RAN
- 4G

View File

@@ -2,7 +2,7 @@
{{/*
Expand the name of the chart.
*/}}
{{- define "oai-polartest.name" -}}
{{- define "oai-physims-4g.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
{{- end -}}
@@ -11,7 +11,7 @@ Create a default fully qualified app name.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
If release name contains chart name it will be used as a full name.
*/}}
{{- define "oai-polartest.fullname" -}}
{{- define "oai-physims-4g.fullname" -}}
{{- if .Values.fullnameOverride -}}
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
{{- else -}}
@@ -27,16 +27,16 @@ If release name contains chart name it will be used as a full name.
{{/*
Create chart name and version as used by the chart label.
*/}}
{{- define "oai-polartest.chart" -}}
{{- define "oai-physims-4g.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{/*
Common labels
*/}}
{{- define "oai-polartest.labels" -}}
helm.sh/chart: {{ include "oai-polartest.chart" . }}
{{ include "oai-polartest.selectorLabels" . }}
{{- define "oai-physims-4g.labels" -}}
helm.sh/chart: {{ include "oai-physims-4g.chart" . }}
{{ include "oai-physims-4g.selectorLabels" . }}
{{- if .Chart.AppVersion }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
@@ -46,17 +46,17 @@ app.kubernetes.io/managed-by: {{ .Release.Service }}
{{/*
Selector labels
*/}}
{{- define "oai-polartest.selectorLabels" -}}
app.kubernetes.io/name: {{ include "oai-polartest.name" . }}
{{- define "oai-physims-4g.selectorLabels" -}}
app.kubernetes.io/name: {{ include "oai-physims-4g.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end -}}
{{/*
Create the name of the service account to use
*/}}
{{- define "oai-polartest.serviceAccountName" -}}
{{- define "oai-physims-4g.serviceAccountName" -}}
{{- if .Values.serviceAccount.create -}}
{{ default (include "oai-polartest.fullname" .) .Values.serviceAccount.name }}
{{ default (include "oai-physims-4g.fullname" .) .Values.serviceAccount.name }}
{{- else -}}
{{ default "default" .Values.serviceAccount.name }}
{{- end -}}

View File

@@ -18,6 +18,11 @@ spec:
- name: physim
image: "{{ .Values.global.image.repository }}:{{ .Values.global.image.version }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
{{- if .Values.global.resources.define}}
resources:
requests:
cpu: {{ .Values.global.resources.requests.cpu | quote }}
{{- end}}
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
env:
@@ -26,8 +31,9 @@ spec:
command: ["/bin/sh", "-c"]
args:
- >
cmake_targets/autotests/run_exec_autotests.bash -g "nr_dlsim.basic" -d bin/ &&
echo "FINISHED" && sleep infinity
ctest -R 4g --show-only=json-v1 >> physims-4g-tests.json &&
ctest -R 4g -j$(nproc) --output-junit physims-4g-run.xml --test-output-size-passed 100000 --test-output-size-failed 100000 ;
echo "FINISHED" && sleep 15
dnsPolicy: ClusterFirst
restartPolicy: Never
schedulerName: default-scheduler
@@ -37,6 +43,6 @@ spec:
nodeSelector:
{{- toYaml .Values.global.nodeSelector | nindent 12 }}
{{- end }}
{{- if .Values.global.nodeName.nrdlsimbasic}}
nodeName: {{ .Values.global.nodeName.nrdlsimbasic }}
{{- if .Values.global.nodeName}}
nodeName: {{ .Values.global.nodeName.physims5g }}
{{- end }}

View File

@@ -1,4 +1,4 @@
# Default values for oai-ulsim.
# Default values for oai-physims-4g
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.
@@ -20,7 +20,7 @@ serviceAccount:
annotations: {}
# The name of the service account to use.
# If not set and create is true, a name is generated using the fullname template
name: "oai-ulsim-sa"
name: "oai-physims-4g"
podSecurityContext:
runAsUser: 0

View File

@@ -0,0 +1,21 @@
# Default values for oai-physim.
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.
global:
serviceAccountName: oai-physim-sa
namespace: "OAICICD_PROJECT"
image:
registry: local
repository: image-registry.openshift-image-registry.svc:5000/oaicicd-core-for-ci-ran/oai-physim
version: TAG
# pullPolicy: IfNotPresent or Never or Always
pullPolicy: Always
# removing the node selector
# will place on two nodes intel 3rd gen and 5th gen with RT kernel
nodeSelector:
type: ran
nodeName: ''
resources:
define: false
requests:
cpu: 1.5

View File

@@ -1,6 +1,6 @@
apiVersion: v1
name: oai-polartest
description: A Helm subchart for polartest network function
name: oai-physim
description: A Helm chart for physical simulators network function
# A chart can be either an 'application' or a 'library' chart.
#
@@ -16,17 +16,17 @@ icon: http://www.openairinterface.org/wp-content/uploads/2015/06/cropped-oai_fin
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
version: 0.1.1
version: 1.0.0
# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application.
appVersion: v1
keywords:
- Physical Simulator
- polartest
- Physical Simulators
- RAN
- 4G
- 5G
sources:
- https://gitlab.eurecom.fr/oai/openairinterface5g

View File

@@ -1,6 +1,6 @@
apiVersion: v1
name: oai-ldpctest
description: A Helm subchart for ldpctest network function
name: oai-physims-5g
description: A Helm subchart for 5G physims network function
# A chart can be either an 'application' or a 'library' chart.
#
@@ -24,7 +24,6 @@ appVersion: v1
keywords:
- Physical Simulator
- ldpctest
- RAN
- 5G

View File

@@ -2,7 +2,7 @@
{{/*
Expand the name of the chart.
*/}}
{{- define "oai-ulsim.name" -}}
{{- define "oai-physims-5g.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
{{- end -}}
@@ -11,7 +11,7 @@ Create a default fully qualified app name.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
If release name contains chart name it will be used as a full name.
*/}}
{{- define "oai-ulsim.fullname" -}}
{{- define "oai-physims-5g.fullname" -}}
{{- if .Values.fullnameOverride -}}
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
{{- else -}}
@@ -27,16 +27,16 @@ If release name contains chart name it will be used as a full name.
{{/*
Create chart name and version as used by the chart label.
*/}}
{{- define "oai-ulsim.chart" -}}
{{- define "oai-physims-5g.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{/*
Common labels
*/}}
{{- define "oai-ulsim.labels" -}}
helm.sh/chart: {{ include "oai-ulsim.chart" . }}
{{ include "oai-ulsim.selectorLabels" . }}
{{- define "oai-physims-5g.labels" -}}
helm.sh/chart: {{ include "oai-physims-5g.chart" . }}
{{ include "oai-physims-5g.selectorLabels" . }}
{{- if .Chart.AppVersion }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
@@ -46,17 +46,17 @@ app.kubernetes.io/managed-by: {{ .Release.Service }}
{{/*
Selector labels
*/}}
{{- define "oai-ulsim.selectorLabels" -}}
app.kubernetes.io/name: {{ include "oai-ulsim.name" . }}
{{- define "oai-physims-5g.selectorLabels" -}}
app.kubernetes.io/name: {{ include "oai-physims-5g.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end -}}
{{/*
Create the name of the service account to use
*/}}
{{- define "oai-ulsim.serviceAccountName" -}}
{{- define "oai-physims-5g.serviceAccountName" -}}
{{- if .Values.serviceAccount.create -}}
{{ default (include "oai-ulsim.fullname" .) .Values.serviceAccount.name }}
{{ default (include "oai-physims-5g.fullname" .) .Values.serviceAccount.name }}
{{- else -}}
{{ default "default" .Values.serviceAccount.name }}
{{- end -}}

View File

@@ -18,6 +18,11 @@ spec:
- name: physim
image: "{{ .Values.global.image.repository }}:{{ .Values.global.image.version }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
{{- if .Values.global.resources.define}}
resources:
requests:
cpu: {{ .Values.global.resources.requests.cpu | quote }}
{{- end}}
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
env:
@@ -26,8 +31,9 @@ spec:
command: ["/bin/sh", "-c"]
args:
- >
cmake_targets/autotests/run_exec_autotests.bash -g "ldpctest" -d bin/ &&
echo "FINISHED" && sleep infinity
ctest -R 5g --show-only=json-v1 >> physims-5g-tests.json &&
ctest -R 5g -j$(nproc) --output-junit physims-5g-run.xml --test-output-size-passed 100000 --test-output-size-failed 100000 ;
echo "FINISHED" && sleep 20
dnsPolicy: ClusterFirst
restartPolicy: Never
schedulerName: default-scheduler
@@ -37,6 +43,6 @@ spec:
nodeSelector:
{{- toYaml .Values.global.nodeSelector | nindent 12 }}
{{- end }}
{{- if .Values.global.nodeName.ldpctest}}
nodeName: {{ .Values.global.nodeName.ldpctest }}
{{- if .Values.global.nodeName}}
nodeName: {{ .Values.global.nodeName.physims5g }}
{{- end }}

View File

@@ -1,4 +1,4 @@
# Default values for oai-ldpctest.
# Default values for oai-physims-5g
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.
@@ -20,7 +20,7 @@ serviceAccount:
annotations: {}
# The name of the service account to use.
# If not set and create is true, a name is generated using the fullname template
name: "oai-ldpctest-sa"
name: "oai-physims-5g"
podSecurityContext:
runAsUser: 0

View File

@@ -0,0 +1,26 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: {{ .Chart.Name }}-{{ .Release.Namespace }}-role
rules:
- apiGroups:
- security.openshift.io
resourceNames:
- anyuid
resources:
- securitycontextconstraints
verbs:
- use
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: {{ .Chart.Name }}-{{ .Release.Namespace }}-binding
subjects:
- kind: ServiceAccount
name: {{ .Values.global.serviceAccountName }}
namespace: {{ .Release.Namespace }}
roleRef:
kind: Role
name: {{ .Chart.Name }}-{{ .Release.Namespace }}-role
apiGroup: rbac.authorization.k8s.io

View File

@@ -0,0 +1,4 @@
apiVersion: v1
kind: ServiceAccount
metadata:
name: oai-physim-sa #{{ .Values.global.serviceAccountName }}

View File

@@ -0,0 +1,21 @@
# Default values for oai-physim.
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.
global:
serviceAccountName: oai-physim-sa
namespace: "OAICICD_PROJECT"
image:
registry: local
repository: image-registry.openshift-image-registry.svc:5000/oaicicd-core-for-ci-ran/oai-physim
version: TAG
# pullPolicy: IfNotPresent or Never or Always
pullPolicy: Always
# removing the node selector
# will place on two nodes intel 3rd gen and 5th gen with RT kernel
nodeSelector:
type: ran
nodeName: ''
resources:
define: false
requests:
cpu: 1.5

View File

@@ -1,36 +0,0 @@
apiVersion: v1
name: oai-dlsim-100rb-tm2
description: A Helm subchart for dlsim network function ("100rb+tm2" tests)
# A chart can be either an 'application' or a 'library' chart.
#
# Application charts are a collection of templates that can be packaged into versioned archives
# to be deployed.
#
# Library charts provide useful utilities or functions for the chart developer. They're included as
# a dependency of application charts to inject those utilities and functions into the rendering
# pipeline. Library charts do not define any templates and therefore cannot be deployed.
type: application
icon: http://www.openairinterface.org/wp-content/uploads/2015/06/cropped-oai_final_logo.png
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
version: 0.1.1
# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application.
appVersion: v1
keywords:
- Physical Simulator
- dlsim
- RAN
- 4G
sources:
- https://gitlab.eurecom.fr/oai/openairinterface5g
maintainers:
- name: OPENAIRINTERFACE
email: contact@openairinterface.org

View File

@@ -1,63 +0,0 @@
{{/* vim: set filetype=mustache: */}}
{{/*
Expand the name of the chart.
*/}}
{{- define "oai-dlsim-100rb-tm2.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{/*
Create a default fully qualified app name.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
If release name contains chart name it will be used as a full name.
*/}}
{{- define "oai-dlsim-100rb-tm2.fullname" -}}
{{- if .Values.fullnameOverride -}}
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
{{- else -}}
{{- $name := default .Chart.Name .Values.nameOverride -}}
{{- if contains $name .Release.Name -}}
{{- .Release.Name | trunc 63 | trimSuffix "-" -}}
{{- else -}}
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{- end -}}
{{- end -}}
{{/*
Create chart name and version as used by the chart label.
*/}}
{{- define "oai-dlsim-100rb-tm2.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{/*
Common labels
*/}}
{{- define "oai-dlsim-100rb-tm2.labels" -}}
helm.sh/chart: {{ include "oai-dlsim-100rb-tm2.chart" . }}
{{ include "oai-dlsim-100rb-tm2.selectorLabels" . }}
{{- if .Chart.AppVersion }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- end -}}
{{/*
Selector labels
*/}}
{{- define "oai-dlsim-100rb-tm2.selectorLabels" -}}
app.kubernetes.io/name: {{ include "oai-dlsim-100rb-tm2.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end -}}
{{/*
Create the name of the service account to use
*/}}
{{- define "oai-dlsim-100rb-tm2.serviceAccountName" -}}
{{- if .Values.serviceAccount.create -}}
{{ default (include "oai-dlsim-100rb-tm2.fullname" .) .Values.serviceAccount.name }}
{{- else -}}
{{ default "default" .Values.serviceAccount.name }}
{{- end -}}
{{- end -}}

View File

@@ -1,42 +0,0 @@
apiVersion: batch/v1
kind: Job
metadata:
name: {{ .Chart.Name }}
spec:
template:
metadata:
labels:
app: physim
spec:
securityContext:
{{- toYaml .Values.podSecurityContext | nindent 8 }}
{{- if .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
containers:
- name: physim
image: "{{ .Values.global.image.repository }}:{{ .Values.global.image.version }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
env:
- name: OPENAIR_DIR
value: /opt/oai-physim
command: ["/bin/sh", "-c"]
args:
- >
cmake_targets/autotests/run_exec_autotests.bash -g "dlsim.100rb+tm2" -d bin/ &&
echo "FINISHED" && sleep infinity
dnsPolicy: ClusterFirst
restartPolicy: Never
schedulerName: default-scheduler
serviceAccountName: {{ .Values.global.serviceAccountName }}
terminationGracePeriodSeconds: 30
{{- if .Values.global.nodeSelector}}
nodeSelector:
{{- toYaml .Values.global.nodeSelector | nindent 12 }}
{{- end }}
{{- if .Values.global.nodeName.dlsim100rbtm2}}
nodeName: {{ .Values.global.nodeName.dlsim100rbtm2 }}
{{- end }}

View File

@@ -1,48 +0,0 @@
# Default values for oai-dlsim-100rb+tm2
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.
replicaCount: 1
image:
# pullPolicy: IfNotPresent or Never or Always
pullPolicy: Always
imagePullSecrets: []
nameOverride: ""
fullnameOverride: ""
serviceAccount:
# Specifies whether a service account should be created
create: true
# Annotations to add to the service account
annotations: {}
# The name of the service account to use.
# If not set and create is true, a name is generated using the fullname template
name: "oai-dlsim-100rb-tm2"
podSecurityContext:
runAsUser: 0
runAsGroup: 0
securityContext:
privileged: false
resources: {}
# We usually recommend not to specify default resources and to leave this as a conscious
# choice for the user. This also increases chances charts run on environments with little
# resources, such as Minikube. If you do want to specify resources, uncomment the following
# lines, adjust them as necessary, and remove the curly braces after 'resources:'.
# limits:
# cpu: 100m
# memory: 128Mi
# requests:
# cpu: 100m
# memory: 128Mi
nodeSelector: {}
tolerations: []
affinity: {}

View File

@@ -1,36 +0,0 @@
apiVersion: v1
name: oai-dlsim-basic
description: A Helm subchart for dlsim network function ("basic" tests)
# A chart can be either an 'application' or a 'library' chart.
#
# Application charts are a collection of templates that can be packaged into versioned archives
# to be deployed.
#
# Library charts provide useful utilities or functions for the chart developer. They're included as
# a dependency of application charts to inject those utilities and functions into the rendering
# pipeline. Library charts do not define any templates and therefore cannot be deployed.
type: application
icon: http://www.openairinterface.org/wp-content/uploads/2015/06/cropped-oai_final_logo.png
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
version: 0.1.1
# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application.
appVersion: v1
keywords:
- Physical Simulator
- dlsim
- RAN
- 4G
sources:
- https://gitlab.eurecom.fr/oai/openairinterface5g
maintainers:
- name: OPENAIRINTERFACE
email: contact@openairinterface.org

View File

@@ -1,63 +0,0 @@
{{/* vim: set filetype=mustache: */}}
{{/*
Expand the name of the chart.
*/}}
{{- define "oai-dlsim-basic.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{/*
Create a default fully qualified app name.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
If release name contains chart name it will be used as a full name.
*/}}
{{- define "oai-dlsim-basic.fullname" -}}
{{- if .Values.fullnameOverride -}}
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
{{- else -}}
{{- $name := default .Chart.Name .Values.nameOverride -}}
{{- if contains $name .Release.Name -}}
{{- .Release.Name | trunc 63 | trimSuffix "-" -}}
{{- else -}}
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{- end -}}
{{- end -}}
{{/*
Create chart name and version as used by the chart label.
*/}}
{{- define "oai-dlsim-basic.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{/*
Common labels
*/}}
{{- define "oai-dlsim-basic.labels" -}}
helm.sh/chart: {{ include "oai-dlsim-basic.chart" . }}
{{ include "oai-dlsim-basic.selectorLabels" . }}
{{- if .Chart.AppVersion }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- end -}}
{{/*
Selector labels
*/}}
{{- define "oai-dlsim-basic.selectorLabels" -}}
app.kubernetes.io/name: {{ include "oai-dlsim-basic.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end -}}
{{/*
Create the name of the service account to use
*/}}
{{- define "oai-dlsim-basic.serviceAccountName" -}}
{{- if .Values.serviceAccount.create -}}
{{ default (include "oai-dlsim-basic.fullname" .) .Values.serviceAccount.name }}
{{- else -}}
{{ default "default" .Values.serviceAccount.name }}
{{- end -}}
{{- end -}}

View File

@@ -1,42 +0,0 @@
apiVersion: batch/v1
kind: Job
metadata:
name: {{ .Chart.Name }}
spec:
template:
metadata:
labels:
app: physim
spec:
securityContext:
{{- toYaml .Values.podSecurityContext | nindent 8 }}
{{- if .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
containers:
- name: physim
image: "{{ .Values.global.image.repository }}:{{ .Values.global.image.version }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
env:
- name: OPENAIR_DIR
value: /opt/oai-physim
command: ["/bin/sh", "-c"]
args:
- >
cmake_targets/autotests/run_exec_autotests.bash -g "dlsim.basic" -d bin/ &&
echo "FINISHED" && sleep infinity
dnsPolicy: ClusterFirst
restartPolicy: Never
schedulerName: default-scheduler
serviceAccountName: {{ .Values.global.serviceAccountName }}
terminationGracePeriodSeconds: 30
{{- if .Values.global.nodeSelector}}
nodeSelector:
{{- toYaml .Values.global.nodeSelector | nindent 12 }}
{{- end }}
{{- if .Values.global.nodeName.dlsimbasic}}
nodeName: {{ .Values.global.nodeName.dlsimbasic }}
{{- end }}

View File

@@ -1,44 +0,0 @@
# Default values for oai-dlsim-basic
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.
replicaCount: 1
image:
# pullPolicy: IfNotPresent or Never or Always
pullPolicy: Always
imagePullSecrets: []
nameOverride: ""
fullnameOverride: ""
serviceAccount:
# Specifies whether a service account should be created
create: true
# Annotations to add to the service account
annotations: {}
# The name of the service account to use.
# If not set and create is true, a name is generated using the fullname template
name: "oai-dlsim-basic"
podSecurityContext:
runAsUser: 0
runAsGroup: 0
securityContext:
privileged: false
resources:
limits:
cpu: 100m
memory: 128Mi
requests:
cpu: 100m
memory: 128Mi
nodeSelector: {}
tolerations: []
affinity: {}

View File

@@ -1,63 +0,0 @@
{{/* vim: set filetype=mustache: */}}
{{/*
Expand the name of the chart.
*/}}
{{- define "oai-ldpctest.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{/*
Create a default fully qualified app name.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
If release name contains chart name it will be used as a full name.
*/}}
{{- define "oai-ldpctest.fullname" -}}
{{- if .Values.fullnameOverride -}}
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
{{- else -}}
{{- $name := default .Chart.Name .Values.nameOverride -}}
{{- if contains $name .Release.Name -}}
{{- .Release.Name | trunc 63 | trimSuffix "-" -}}
{{- else -}}
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{- end -}}
{{- end -}}
{{/*
Create chart name and version as used by the chart label.
*/}}
{{- define "oai-ldpctest.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{/*
Common labels
*/}}
{{- define "oai-ldpctest.labels" -}}
helm.sh/chart: {{ include "oai-ldpctest.chart" . }}
{{ include "oai-ldpctest.selectorLabels" . }}
{{- if .Chart.AppVersion }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- end -}}
{{/*
Selector labels
*/}}
{{- define "oai-ldpctest.selectorLabels" -}}
app.kubernetes.io/name: {{ include "oai-ldpctest.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end -}}
{{/*
Create the name of the service account to use
*/}}
{{- define "oai-ldpctest.serviceAccountName" -}}
{{- if .Values.serviceAccount.create -}}
{{ default (include "oai-ldpctest.fullname" .) .Values.serviceAccount.name }}
{{- else -}}
{{ default "default" .Values.serviceAccount.name }}
{{- end -}}
{{- end -}}

View File

@@ -1,36 +0,0 @@
apiVersion: v1
name: oai-nr-dlschsim
description: A Helm subchart for nr-dlschsim network function
# A chart can be either an 'application' or a 'library' chart.
#
# Application charts are a collection of templates that can be packaged into versioned archives
# to be deployed.
#
# Library charts provide useful utilities or functions for the chart developer. They're included as
# a dependency of application charts to inject those utilities and functions into the rendering
# pipeline. Library charts do not define any templates and therefore cannot be deployed.
type: application
icon: http://www.openairinterface.org/wp-content/uploads/2015/06/cropped-oai_final_logo.png
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
version: 0.1.1
# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application.
appVersion: v1
keywords:
- Physical Simulator
- nr-dlschsim
- RAN
- 5G
sources:
- https://gitlab.eurecom.fr/oai/openairinterface5g
maintainers:
- name: OPENAIRINTERFACE
email: contact@openairinterface.org

View File

@@ -1,63 +0,0 @@
{{/* vim: set filetype=mustache: */}}
{{/*
Expand the name of the chart.
*/}}
{{- define "oai-nr-dlschsim.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{/*
Create a default fully qualified app name.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
If release name contains chart name it will be used as a full name.
*/}}
{{- define "oai-nr-dlschsim.fullname" -}}
{{- if .Values.fullnameOverride -}}
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
{{- else -}}
{{- $name := default .Chart.Name .Values.nameOverride -}}
{{- if contains $name .Release.Name -}}
{{- .Release.Name | trunc 63 | trimSuffix "-" -}}
{{- else -}}
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{- end -}}
{{- end -}}
{{/*
Create chart name and version as used by the chart label.
*/}}
{{- define "oai-nr-dlschsim.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{/*
Common labels
*/}}
{{- define "oai-nr-dlschsim.labels" -}}
helm.sh/chart: {{ include "oai-nr-dlschsim.chart" . }}
{{ include "oai-nr-dlschsim.selectorLabels" . }}
{{- if .Chart.AppVersion }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- end -}}
{{/*
Selector labels
*/}}
{{- define "oai-nr-dlschsim.selectorLabels" -}}
app.kubernetes.io/name: {{ include "oai-nr-dlschsim.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end -}}
{{/*
Create the name of the service account to use
*/}}
{{- define "oai-nr-dlschsim.serviceAccountName" -}}
{{- if .Values.serviceAccount.create -}}
{{ default (include "oai-nr-dlschsim.fullname" .) .Values.serviceAccount.name }}
{{- else -}}
{{ default "default" .Values.serviceAccount.name }}
{{- end -}}
{{- end -}}

View File

@@ -1,42 +0,0 @@
apiVersion: batch/v1
kind: Job
metadata:
name: {{ .Chart.Name }}
spec:
template:
metadata:
labels:
app: physim
spec:
securityContext:
{{- toYaml .Values.podSecurityContext | nindent 8 }}
{{- if .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
containers:
- name: physim
image: "{{ .Values.global.image.repository }}:{{ .Values.global.image.version }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
env:
- name: OPENAIR_DIR
value: /opt/oai-physim
command: ["/bin/sh", "-c"]
args:
- >
cmake_targets/autotests/run_exec_autotests.bash -g "nr_dlschsim" -d bin/ &&
echo "FINISHED" && sleep infinity
dnsPolicy: ClusterFirst
restartPolicy: Never
schedulerName: default-scheduler
serviceAccountName: {{ .Values.global.serviceAccountName }}
terminationGracePeriodSeconds: 30
{{- if .Values.global.nodeSelector}}
nodeSelector:
{{- toYaml .Values.global.nodeSelector | nindent 12 }}
{{- end }}
{{- if .Values.global.nodeName.nrdlschsim}}
nodeName: {{ .Values.global.nodeName.nrdlschsim }}
{{- end }}

View File

@@ -1,48 +0,0 @@
# Default values for oai-nr-dlschsim.
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.
replicaCount: 1
image:
# pullPolicy: IfNotPresent or Never or Always
pullPolicy: Always
imagePullSecrets: []
nameOverride: ""
fullnameOverride: ""
serviceAccount:
# Specifies whether a service account should be created
create: true
# Annotations to add to the service account
annotations: {}
# The name of the service account to use.
# If not set and create is true, a name is generated using the fullname template
name: "oai-nr-dlschsim-sa"
podSecurityContext:
runAsUser: 0
runAsGroup: 0
securityContext:
privileged: false
resources: {}
# We usually recommend not to specify default resources and to leave this as a conscious
# choice for the user. This also increases chances charts run on environments with little
# resources, such as Minikube. If you do want to specify resources, uncomment the following
# lines, adjust them as necessary, and remove the curly braces after 'resources:'.
# limits:
# cpu: 100m
# memory: 128Mi
# requests:
# cpu: 100m
# memory: 128Mi
nodeSelector: {}
tolerations: []
affinity: {}

View File

@@ -1,36 +0,0 @@
apiVersion: v1
name: oai-nr-dlsim-basic
description: A Helm subchart for nr-dlsim network function ("basic" tests)
# A chart can be either an 'application' or a 'library' chart.
#
# Application charts are a collection of templates that can be packaged into versioned archives
# to be deployed.
#
# Library charts provide useful utilities or functions for the chart developer. They're included as
# a dependency of application charts to inject those utilities and functions into the rendering
# pipeline. Library charts do not define any templates and therefore cannot be deployed.
type: application
icon: http://www.openairinterface.org/wp-content/uploads/2015/06/cropped-oai_final_logo.png
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
version: 0.1.1
# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application.
appVersion: v1
keywords:
- Physical Simulator
- nr-dlsim
- RAN
- 5G
sources:
- https://gitlab.eurecom.fr/oai/openairinterface5g
maintainers:
- name: OPENAIRINTERFACE
email: contact@openairinterface.org

View File

@@ -1,63 +0,0 @@
{{/* vim: set filetype=mustache: */}}
{{/*
Expand the name of the chart.
*/}}
{{- define "oai-nr-dlsim-basic.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{/*
Create a default fully qualified app name.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
If release name contains chart name it will be used as a full name.
*/}}
{{- define "oai-nr-dlsim-basic.fullname" -}}
{{- if .Values.fullnameOverride -}}
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
{{- else -}}
{{- $name := default .Chart.Name .Values.nameOverride -}}
{{- if contains $name .Release.Name -}}
{{- .Release.Name | trunc 63 | trimSuffix "-" -}}
{{- else -}}
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{- end -}}
{{- end -}}
{{/*
Create chart name and version as used by the chart label.
*/}}
{{- define "oai-nr-dlsim-basic.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{/*
Common labels
*/}}
{{- define "oai-nr-dlsim-basic.labels" -}}
helm.sh/chart: {{ include "oai-nr-dlsim-basic.chart" . }}
{{ include "oai-nr-dlsim-basic.selectorLabels" . }}
{{- if .Chart.AppVersion }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- end -}}
{{/*
Selector labels
*/}}
{{- define "oai-nr-dlsim-basic.selectorLabels" -}}
app.kubernetes.io/name: {{ include "oai-nr-dlsim-basic.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end -}}
{{/*
Create the name of the service account to use
*/}}
{{- define "oai-nr-dlsim-basic.serviceAccountName" -}}
{{- if .Values.serviceAccount.create -}}
{{ default (include "oai-nr-dlsim-basic.fullname" .) .Values.serviceAccount.name }}
{{- else -}}
{{ default "default" .Values.serviceAccount.name }}
{{- end -}}
{{- end -}}

View File

@@ -1,48 +0,0 @@
# Default values for oai-nr-dlsim-basic
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.
replicaCount: 1
image:
# pullPolicy: IfNotPresent or Never or Always
pullPolicy: Always
imagePullSecrets: []
nameOverride: ""
fullnameOverride: ""
serviceAccount:
# Specifies whether a service account should be created
create: true
# Annotations to add to the service account
annotations: {}
# The name of the service account to use.
# If not set and create is true, a name is generated using the fullname template
name: "oai-nr-dlsim-basic"
podSecurityContext:
runAsUser: 0
runAsGroup: 0
securityContext:
privileged: false
resources: {}
# We usually recommend not to specify default resources and to leave this as a conscious
# choice for the user. This also increases chances charts run on environments with little
# resources, such as Minikube. If you do want to specify resources, uncomment the following
# lines, adjust them as necessary, and remove the curly braces after 'resources:'.
# limits:
# cpu: 100m
# memory: 128Mi
# requests:
# cpu: 100m
# memory: 128Mi
nodeSelector: {}
tolerations: []
affinity: {}

View File

@@ -1,36 +0,0 @@
apiVersion: v1
name: oai-nr-dlsim-dmrs-ptrs
description: A Helm subchart for nr-dlsim network function ("dmrs+ptrs" tests)
# A chart can be either an 'application' or a 'library' chart.
#
# Application charts are a collection of templates that can be packaged into versioned archives
# to be deployed.
#
# Library charts provide useful utilities or functions for the chart developer. They're included as
# a dependency of application charts to inject those utilities and functions into the rendering
# pipeline. Library charts do not define any templates and therefore cannot be deployed.
type: application
icon: http://www.openairinterface.org/wp-content/uploads/2015/06/cropped-oai_final_logo.png
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
version: 0.1.1
# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application.
appVersion: v1
keywords:
- Physical Simulator
- nr-dlsim
- RAN
- 5G
sources:
- https://gitlab.eurecom.fr/oai/openairinterface5g
maintainers:
- name: OPENAIRINTERFACE
email: contact@openairinterface.org

View File

@@ -1,63 +0,0 @@
{{/* vim: set filetype=mustache: */}}
{{/*
Expand the name of the chart.
*/}}
{{- define "oai-nr-dlsim-dmrs-ptrs.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{/*
Create a default fully qualified app name.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
If release name contains chart name it will be used as a full name.
*/}}
{{- define "oai-nr-dlsim-dmrs-ptrs.fullname" -}}
{{- if .Values.fullnameOverride -}}
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
{{- else -}}
{{- $name := default .Chart.Name .Values.nameOverride -}}
{{- if contains $name .Release.Name -}}
{{- .Release.Name | trunc 63 | trimSuffix "-" -}}
{{- else -}}
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{- end -}}
{{- end -}}
{{/*
Create chart name and version as used by the chart label.
*/}}
{{- define "oai-nr-dlsim-dmrs-ptrs.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{/*
Common labels
*/}}
{{- define "oai-nr-dlsim-dmrs-ptrs.labels" -}}
helm.sh/chart: {{ include "oai-nr-dlsim-dmrs-ptrs.chart" . }}
{{ include "oai-nr-dlsim-dmrs-ptrs.selectorLabels" . }}
{{- if .Chart.AppVersion }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- end -}}
{{/*
Selector labels
*/}}
{{- define "oai-nr-dlsim-dmrs-ptrs.selectorLabels" -}}
app.kubernetes.io/name: {{ include "oai-nr-dlsim-dmrs-ptrs.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end -}}
{{/*
Create the name of the service account to use
*/}}
{{- define "oai-nr-dlsim-dmrs-ptrs.serviceAccountName" -}}
{{- if .Values.serviceAccount.create -}}
{{ default (include "oai-nr-dlsim-dmrs-ptrs.fullname" .) .Values.serviceAccount.name }}
{{- else -}}
{{ default "default" .Values.serviceAccount.name }}
{{- end -}}
{{- end -}}

View File

@@ -1,42 +0,0 @@
apiVersion: batch/v1
kind: Job
metadata:
name: {{ .Chart.Name }}
spec:
template:
metadata:
labels:
app: physim
spec:
securityContext:
{{- toYaml .Values.podSecurityContext | nindent 8 }}
{{- if .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
containers:
- name: physim
image: "{{ .Values.global.image.repository }}:{{ .Values.global.image.version }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
env:
- name: OPENAIR_DIR
value: /opt/oai-physim
command: ["/bin/sh", "-c"]
args:
- >
cmake_targets/autotests/run_exec_autotests.bash -g "nr_dlsim.dmrs+ptrs" -d bin/ &&
echo "FINISHED" && sleep infinity
dnsPolicy: ClusterFirst
restartPolicy: Never
schedulerName: default-scheduler
serviceAccountName: {{ .Values.global.serviceAccountName }}
terminationGracePeriodSeconds: 30
{{- if .Values.global.nodeSelector}}
nodeSelector:
{{- toYaml .Values.global.nodeSelector | nindent 12 }}
{{- end }}
{{- if .Values.global.nodeName.nrdlsimdmrsptrs}}
nodeName: {{ .Values.global.nodeName.nrdlsimdmrsptrs }}
{{- end }}

View File

@@ -1,48 +0,0 @@
# Default values for oai-nr-dlsim-dmrs+ptrs
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.
replicaCount: 1
image:
# pullPolicy: IfNotPresent or Never or Always
pullPolicy: Always
imagePullSecrets: []
nameOverride: ""
fullnameOverride: ""
serviceAccount:
# Specifies whether a service account should be created
create: true
# Annotations to add to the service account
annotations: {}
# The name of the service account to use.
# If not set and create is true, a name is generated using the fullname template
name: "oai-nr-dlsim-dmrs-ptrs"
podSecurityContext:
runAsUser: 0
runAsGroup: 0
securityContext:
privileged: false
resources: {}
# We usually recommend not to specify default resources and to leave this as a conscious
# choice for the user. This also increases chances charts run on environments with little
# resources, such as Minikube. If you do want to specify resources, uncomment the following
# lines, adjust them as necessary, and remove the curly braces after 'resources:'.
# limits:
# cpu: 100m
# memory: 128Mi
# requests:
# cpu: 100m
# memory: 128Mi
nodeSelector: {}
tolerations: []
affinity: {}

View File

@@ -1,36 +0,0 @@
apiVersion: v1
name: oai-nr-dlsim-mcs-mimo
description: A Helm subchart for nr-dlsim network function ("mcs+mimo" tests)
# A chart can be either an 'application' or a 'library' chart.
#
# Application charts are a collection of templates that can be packaged into versioned archives
# to be deployed.
#
# Library charts provide useful utilities or functions for the chart developer. They're included as
# a dependency of application charts to inject those utilities and functions into the rendering
# pipeline. Library charts do not define any templates and therefore cannot be deployed.
type: application
icon: http://www.openairinterface.org/wp-content/uploads/2015/06/cropped-oai_final_logo.png
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
version: 0.1.1
# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application.
appVersion: v1
keywords:
- Physical Simulator
- nr-dlsim
- RAN
- 5G
sources:
- https://gitlab.eurecom.fr/oai/openairinterface5g
maintainers:
- name: OPENAIRINTERFACE
email: contact@openairinterface.org

View File

@@ -1,63 +0,0 @@
{{/* vim: set filetype=mustache: */}}
{{/*
Expand the name of the chart.
*/}}
{{- define "oai-nr-dlsim-mcs-mimo.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{/*
Create a default fully qualified app name.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
If release name contains chart name it will be used as a full name.
*/}}
{{- define "oai-nr-dlsim-mcs-mimo.fullname" -}}
{{- if .Values.fullnameOverride -}}
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
{{- else -}}
{{- $name := default .Chart.Name .Values.nameOverride -}}
{{- if contains $name .Release.Name -}}
{{- .Release.Name | trunc 63 | trimSuffix "-" -}}
{{- else -}}
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{- end -}}
{{- end -}}
{{/*
Create chart name and version as used by the chart label.
*/}}
{{- define "oai-nr-dlsim-mcs-mimo.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{/*
Common labels
*/}}
{{- define "oai-nr-dlsim-mcs-mimo.labels" -}}
helm.sh/chart: {{ include "oai-nr-dlsim-mcs-mimo.chart" . }}
{{ include "oai-nr-dlsim-mcs-mimo.selectorLabels" . }}
{{- if .Chart.AppVersion }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- end -}}
{{/*
Selector labels
*/}}
{{- define "oai-nr-dlsim-mcs-mimo.selectorLabels" -}}
app.kubernetes.io/name: {{ include "oai-nr-dlsim-mcs-mimo.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end -}}
{{/*
Create the name of the service account to use
*/}}
{{- define "oai-nr-dlsim-mcs-mimo.serviceAccountName" -}}
{{- if .Values.serviceAccount.create -}}
{{ default (include "oai-nr-dlsim-mcs-mimo.fullname" .) .Values.serviceAccount.name }}
{{- else -}}
{{ default "default" .Values.serviceAccount.name }}
{{- end -}}
{{- end -}}

View File

@@ -1,42 +0,0 @@
apiVersion: batch/v1
kind: Job
metadata:
name: {{ .Chart.Name }}
spec:
template:
metadata:
labels:
app: physim
spec:
securityContext:
{{- toYaml .Values.podSecurityContext | nindent 8 }}
{{- if .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
containers:
- name: physim
image: "{{ .Values.global.image.repository }}:{{ .Values.global.image.version }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
env:
- name: OPENAIR_DIR
value: /opt/oai-physim
command: ["/bin/sh", "-c"]
args:
- >
cmake_targets/autotests/run_exec_autotests.bash -g "nr_dlsim.mcs+mimo" -d bin/ &&
echo "FINISHED" && sleep infinity
dnsPolicy: ClusterFirst
restartPolicy: Never
schedulerName: default-scheduler
serviceAccountName: {{ .Values.global.serviceAccountName }}
terminationGracePeriodSeconds: 30
{{- if .Values.global.nodeSelector}}
nodeSelector:
{{- toYaml .Values.global.nodeSelector | nindent 12 }}
{{- end }}
{{- if .Values.global.nodeName.nrdlsimmcsmimo}}
nodeName: {{ .Values.global.nodeName.nrdlsimmcsmimo }}
{{- end }}

View File

@@ -1,48 +0,0 @@
# Default values for oai-nr-dlsim-mcs-mimo
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.
replicaCount: 1
image:
# pullPolicy: IfNotPresent or Never or Always
pullPolicy: Always
imagePullSecrets: []
nameOverride: ""
fullnameOverride: ""
serviceAccount:
# Specifies whether a service account should be created
create: true
# Annotations to add to the service account
annotations: {}
# The name of the service account to use.
# If not set and create is true, a name is generated using the fullname template
name: "oai-nr-dlsim-mcs-mimo"
podSecurityContext:
runAsUser: 0
runAsGroup: 0
securityContext:
privileged: false
resources: {}
# We usually recommend not to specify default resources and to leave this as a conscious
# choice for the user. This also increases chances charts run on environments with little
# resources, such as Minikube. If you do want to specify resources, uncomment the following
# lines, adjust them as necessary, and remove the curly braces after 'resources:'.
# limits:
# cpu: 100m
# memory: 128Mi
# requests:
# cpu: 100m
# memory: 128Mi
nodeSelector: {}
tolerations: []
affinity: {}

View File

@@ -1,36 +0,0 @@
apiVersion: v1
name: oai-nr-dlsim-offset
description: A Helm subchart for nr-dlsim network function ("offset" tests)
# A chart can be either an 'application' or a 'library' chart.
#
# Application charts are a collection of templates that can be packaged into versioned archives
# to be deployed.
#
# Library charts provide useful utilities or functions for the chart developer. They're included as
# a dependency of application charts to inject those utilities and functions into the rendering
# pipeline. Library charts do not define any templates and therefore cannot be deployed.
type: application
icon: http://www.openairinterface.org/wp-content/uploads/2015/06/cropped-oai_final_logo.png
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
version: 0.1.1
# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application.
appVersion: v1
keywords:
- Physical Simulator
- nr-dlsim
- RAN
- 5G
sources:
- https://gitlab.eurecom.fr/oai/openairinterface5g
maintainers:
- name: OPENAIRINTERFACE
email: contact@openairinterface.org

View File

@@ -1,63 +0,0 @@
{{/* vim: set filetype=mustache: */}}
{{/*
Expand the name of the chart.
*/}}
{{- define "oai-nr-dlsim-offset.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{/*
Create a default fully qualified app name.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
If release name contains chart name it will be used as a full name.
*/}}
{{- define "oai-nr-dlsim-offset.fullname" -}}
{{- if .Values.fullnameOverride -}}
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
{{- else -}}
{{- $name := default .Chart.Name .Values.nameOverride -}}
{{- if contains $name .Release.Name -}}
{{- .Release.Name | trunc 63 | trimSuffix "-" -}}
{{- else -}}
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{- end -}}
{{- end -}}
{{/*
Create chart name and version as used by the chart label.
*/}}
{{- define "oai-nr-dlsim-offset.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{/*
Common labels
*/}}
{{- define "oai-nr-dlsim-offset.labels" -}}
helm.sh/chart: {{ include "oai-nr-dlsim-offset.chart" . }}
{{ include "oai-nr-dlsim-offset.selectorLabels" . }}
{{- if .Chart.AppVersion }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- end -}}
{{/*
Selector labels
*/}}
{{- define "oai-nr-dlsim-offset.selectorLabels" -}}
app.kubernetes.io/name: {{ include "oai-nr-dlsim-offset.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end -}}
{{/*
Create the name of the service account to use
*/}}
{{- define "oai-nr-dlsim-offset.serviceAccountName" -}}
{{- if .Values.serviceAccount.create -}}
{{ default (include "oai-nr-dlsim-offset.fullname" .) .Values.serviceAccount.name }}
{{- else -}}
{{ default "default" .Values.serviceAccount.name }}
{{- end -}}
{{- end -}}

View File

@@ -1,42 +0,0 @@
apiVersion: batch/v1
kind: Job
metadata:
name: {{ .Chart.Name }}
spec:
template:
metadata:
labels:
app: physim
spec:
securityContext:
{{- toYaml .Values.podSecurityContext | nindent 8 }}
{{- if .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
containers:
- name: physim
image: "{{ .Values.global.image.repository }}:{{ .Values.global.image.version }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
env:
- name: OPENAIR_DIR
value: /opt/oai-physim
command: ["/bin/sh", "-c"]
args:
- >
cmake_targets/autotests/run_exec_autotests.bash -g "nr_dlsim.offset" -d bin/ &&
echo "FINISHED" && sleep infinity
dnsPolicy: ClusterFirst
restartPolicy: Never
schedulerName: default-scheduler
serviceAccountName: {{ .Values.global.serviceAccountName }}
terminationGracePeriodSeconds: 30
{{- if .Values.global.nodeSelector}}
nodeSelector:
{{- toYaml .Values.global.nodeSelector | nindent 12 }}
{{- end }}
{{- if .Values.global.nodeName.nrdlsimoffset}}
nodeName: {{ .Values.global.nodeName.nrdlsimoffset }}
{{- end }}

View File

@@ -1,48 +0,0 @@
# Default values for oai-nr-dlsim-offset
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.
replicaCount: 1
image:
# pullPolicy: IfNotPresent or Never or Always
pullPolicy: Always
imagePullSecrets: []
nameOverride: ""
fullnameOverride: ""
serviceAccount:
# Specifies whether a service account should be created
create: true
# Annotations to add to the service account
annotations: {}
# The name of the service account to use.
# If not set and create is true, a name is generated using the fullname template
name: "oai-nr-dlsim-offset"
podSecurityContext:
runAsUser: 0
runAsGroup: 0
securityContext:
privileged: false
resources: {}
# We usually recommend not to specify default resources and to leave this as a conscious
# choice for the user. This also increases chances charts run on environments with little
# resources, such as Minikube. If you do want to specify resources, uncomment the following
# lines, adjust them as necessary, and remove the curly braces after 'resources:'.
# limits:
# cpu: 100m
# memory: 128Mi
# requests:
# cpu: 100m
# memory: 128Mi
nodeSelector: {}
tolerations: []
affinity: {}

View File

@@ -1,36 +0,0 @@
apiVersion: v1
name: oai-nr-pbchsim-106rb
description: A Helm subchart for nr-pbchsim network function ("106rb" tests)
# A chart can be either an 'application' or a 'library' chart.
#
# Application charts are a collection of templates that can be packaged into versioned archives
# to be deployed.
#
# Library charts provide useful utilities or functions for the chart developer. They're included as
# a dependency of application charts to inject those utilities and functions into the rendering
# pipeline. Library charts do not define any templates and therefore cannot be deployed.
type: application
icon: http://www.openairinterface.org/wp-content/uploads/2015/06/cropped-oai_final_logo.png
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
version: 0.1.1
# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application.
appVersion: v1
keywords:
- Physical Simulator
- nr-pbchsim
- RAN
- 5G
sources:
- https://gitlab.eurecom.fr/oai/openairinterface5g
maintainers:
- name: OPENAIRINTERFACE
email: contact@openairinterface.org

View File

@@ -1,63 +0,0 @@
{{/* vim: set filetype=mustache: */}}
{{/*
Expand the name of the chart.
*/}}
{{- define "oai-nr-pbchsim-106rb.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{/*
Create a default fully qualified app name.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
If release name contains chart name it will be used as a full name.
*/}}
{{- define "oai-nr-pbchsim-106rb.fullname" -}}
{{- if .Values.fullnameOverride -}}
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
{{- else -}}
{{- $name := default .Chart.Name .Values.nameOverride -}}
{{- if contains $name .Release.Name -}}
{{- .Release.Name | trunc 63 | trimSuffix "-" -}}
{{- else -}}
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{- end -}}
{{- end -}}
{{/*
Create chart name and version as used by the chart label.
*/}}
{{- define "oai-nr-pbchsim-106rb.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{/*
Common labels
*/}}
{{- define "oai-nr-pbchsim-106rb.labels" -}}
helm.sh/chart: {{ include "oai-nr-pbchsim-106rb.chart" . }}
{{ include "oai-nr-pbchsim-106rb.selectorLabels" . }}
{{- if .Chart.AppVersion }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- end -}}
{{/*
Selector labels
*/}}
{{- define "oai-nr-pbchsim-106rb.selectorLabels" -}}
app.kubernetes.io/name: {{ include "oai-nr-pbchsim-106rb.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end -}}
{{/*
Create the name of the service account to use
*/}}
{{- define "oai-nr-pbchsim-106rb.serviceAccountName" -}}
{{- if .Values.serviceAccount.create -}}
{{ default (include "oai-nr-pbchsim-106rb.fullname" .) .Values.serviceAccount.name }}
{{- else -}}
{{ default "default" .Values.serviceAccount.name }}
{{- end -}}
{{- end -}}

View File

@@ -1,42 +0,0 @@
apiVersion: batch/v1
kind: Job
metadata:
name: {{ .Chart.Name }}
spec:
template:
metadata:
labels:
app: physim
spec:
securityContext:
{{- toYaml .Values.podSecurityContext | nindent 8 }}
{{- if .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
containers:
- name: physim
image: "{{ .Values.global.image.repository }}:{{ .Values.global.image.version }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
env:
- name: OPENAIR_DIR
value: /opt/oai-physim
command: ["/bin/sh", "-c"]
args:
- >
cmake_targets/autotests/run_exec_autotests.bash -g "nr_pbchsim.106rb" -d bin/ &&
echo "FINISHED" && sleep infinity
dnsPolicy: ClusterFirst
restartPolicy: Never
schedulerName: default-scheduler
serviceAccountName: {{ .Values.global.serviceAccountName }}
terminationGracePeriodSeconds: 30
{{- if .Values.global.nodeSelector}}
nodeSelector:
{{- toYaml .Values.global.nodeSelector | nindent 12 }}
{{- end }}
{{- if .Values.global.nodeName.nrpbschsim106rb}}
nodeName: {{ .Values.global.nodeName.nrpbschsim106rb }}
{{- end }}

View File

@@ -1,48 +0,0 @@
# Default values for oai-nr-pbchsim-106rb
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.
replicaCount: 1
image:
# pullPolicy: IfNotPresent or Never or Always
pullPolicy: Always
imagePullSecrets: []
nameOverride: ""
fullnameOverride: ""
serviceAccount:
# Specifies whether a service account should be created
create: true
# Annotations to add to the service account
annotations: {}
# The name of the service account to use.
# If not set and create is true, a name is generated using the fullname template
name: "oai-nr-pbchsim-106rb"
podSecurityContext:
runAsUser: 0
runAsGroup: 0
securityContext:
privileged: false
resources: {}
# We usually recommend not to specify default resources and to leave this as a conscious
# choice for the user. This also increases chances charts run on environments with little
# resources, such as Minikube. If you do want to specify resources, uncomment the following
# lines, adjust them as necessary, and remove the curly braces after 'resources:'.
# limits:
# cpu: 100m
# memory: 128Mi
# requests:
# cpu: 100m
# memory: 128Mi
nodeSelector: {}
tolerations: []
affinity: {}

View File

@@ -1,36 +0,0 @@
apiVersion: v1
name: oai-nr-pbchsim-217rb
description: A Helm subchart for nr-pbchsim network function ("217rb" tests)
# A chart can be either an 'application' or a 'library' chart.
#
# Application charts are a collection of templates that can be packaged into versioned archives
# to be deployed.
#
# Library charts provide useful utilities or functions for the chart developer. They're included as
# a dependency of application charts to inject those utilities and functions into the rendering
# pipeline. Library charts do not define any templates and therefore cannot be deployed.
type: application
icon: http://www.openairinterface.org/wp-content/uploads/2015/06/cropped-oai_final_logo.png
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
version: 0.1.1
# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application.
appVersion: v1
keywords:
- Physical Simulator
- nr-pbchsim
- RAN
- 5G
sources:
- https://gitlab.eurecom.fr/oai/openairinterface5g
maintainers:
- name: OPENAIRINTERFACE
email: contact@openairinterface.org

View File

@@ -1,63 +0,0 @@
{{/* vim: set filetype=mustache: */}}
{{/*
Expand the name of the chart.
*/}}
{{- define "oai-nr-pbchsim-217rb.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{/*
Create a default fully qualified app name.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
If release name contains chart name it will be used as a full name.
*/}}
{{- define "oai-nr-pbchsim-217rb.fullname" -}}
{{- if .Values.fullnameOverride -}}
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
{{- else -}}
{{- $name := default .Chart.Name .Values.nameOverride -}}
{{- if contains $name .Release.Name -}}
{{- .Release.Name | trunc 63 | trimSuffix "-" -}}
{{- else -}}
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{- end -}}
{{- end -}}
{{/*
Create chart name and version as used by the chart label.
*/}}
{{- define "oai-nr-pbchsim-217rb.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{/*
Common labels
*/}}
{{- define "oai-nr-pbchsim-217rb.labels" -}}
helm.sh/chart: {{ include "oai-nr-pbchsim-217rb.chart" . }}
{{ include "oai-nr-pbchsim-217rb.selectorLabels" . }}
{{- if .Chart.AppVersion }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- end -}}
{{/*
Selector labels
*/}}
{{- define "oai-nr-pbchsim-217rb.selectorLabels" -}}
app.kubernetes.io/name: {{ include "oai-nr-pbchsim-217rb.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end -}}
{{/*
Create the name of the service account to use
*/}}
{{- define "oai-nr-pbchsim-217rb.serviceAccountName" -}}
{{- if .Values.serviceAccount.create -}}
{{ default (include "oai-nr-pbchsim-217rb.fullname" .) .Values.serviceAccount.name }}
{{- else -}}
{{ default "default" .Values.serviceAccount.name }}
{{- end -}}
{{- end -}}

View File

@@ -1,42 +0,0 @@
apiVersion: batch/v1
kind: Job
metadata:
name: {{ .Chart.Name }}
spec:
template:
metadata:
labels:
app: physim
spec:
securityContext:
{{- toYaml .Values.podSecurityContext | nindent 8 }}
{{- if .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
containers:
- name: physim
image: "{{ .Values.global.image.repository }}:{{ .Values.global.image.version }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
env:
- name: OPENAIR_DIR
value: /opt/oai-physim
command: ["/bin/sh", "-c"]
args:
- >
cmake_targets/autotests/run_exec_autotests.bash -g "nr_pbchsim.217rb" -d bin/ &&
echo "FINISHED" && sleep infinity
dnsPolicy: ClusterFirst
restartPolicy: Never
schedulerName: default-scheduler
serviceAccountName: {{ .Values.global.serviceAccountName }}
terminationGracePeriodSeconds: 30
{{- if .Values.global.nodeSelector}}
nodeSelector:
{{- toYaml .Values.global.nodeSelector | nindent 12 }}
{{- end }}
{{- if .Values.global.nodeName.nrpbchsim217rb}}
nodeName: {{ .Values.global.nodeName.nrpbchsim217rb }}
{{- end }}

View File

@@ -1,48 +0,0 @@
# Default values for oai-nr-pbchsim-217rb
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.
replicaCount: 1
image:
# pullPolicy: IfNotPresent or Never or Always
pullPolicy: Always
imagePullSecrets: []
nameOverride: ""
fullnameOverride: ""
serviceAccount:
# Specifies whether a service account should be created
create: true
# Annotations to add to the service account
annotations: {}
# The name of the service account to use.
# If not set and create is true, a name is generated using the fullname template
name: "oai-nr-pbchsim-217rb"
podSecurityContext:
runAsUser: 0
runAsGroup: 0
securityContext:
privileged: false
resources: {}
# We usually recommend not to specify default resources and to leave this as a conscious
# choice for the user. This also increases chances charts run on environments with little
# resources, such as Minikube. If you do want to specify resources, uncomment the following
# lines, adjust them as necessary, and remove the curly braces after 'resources:'.
# limits:
# cpu: 100m
# memory: 128Mi
# requests:
# cpu: 100m
# memory: 128Mi
nodeSelector: {}
tolerations: []
affinity: {}

View File

@@ -1,36 +0,0 @@
apiVersion: v1
name: oai-nr-pbchsim-273rb
description: A Helm subchart for nr-pbchsim network function ("273rb" tests)
# A chart can be either an 'application' or a 'library' chart.
#
# Application charts are a collection of templates that can be packaged into versioned archives
# to be deployed.
#
# Library charts provide useful utilities or functions for the chart developer. They're included as
# a dependency of application charts to inject those utilities and functions into the rendering
# pipeline. Library charts do not define any templates and therefore cannot be deployed.
type: application
icon: http://www.openairinterface.org/wp-content/uploads/2015/06/cropped-oai_final_logo.png
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
version: 0.1.1
# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application.
appVersion: v1
keywords:
- Physical Simulator
- nr-pbchsim
- RAN
- 5G
sources:
- https://gitlab.eurecom.fr/oai/openairinterface5g
maintainers:
- name: OPENAIRINTERFACE
email: contact@openairinterface.org

View File

@@ -1,63 +0,0 @@
{{/* vim: set filetype=mustache: */}}
{{/*
Expand the name of the chart.
*/}}
{{- define "oai-nr-pbchsim-273rb.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{/*
Create a default fully qualified app name.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
If release name contains chart name it will be used as a full name.
*/}}
{{- define "oai-nr-pbchsim-273rb.fullname" -}}
{{- if .Values.fullnameOverride -}}
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
{{- else -}}
{{- $name := default .Chart.Name .Values.nameOverride -}}
{{- if contains $name .Release.Name -}}
{{- .Release.Name | trunc 63 | trimSuffix "-" -}}
{{- else -}}
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{- end -}}
{{- end -}}
{{/*
Create chart name and version as used by the chart label.
*/}}
{{- define "oai-nr-pbchsim-273rb.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{/*
Common labels
*/}}
{{- define "oai-nr-pbchsim-273rb.labels" -}}
helm.sh/chart: {{ include "oai-nr-pbchsim-273rb.chart" . }}
{{ include "oai-nr-pbchsim-273rb.selectorLabels" . }}
{{- if .Chart.AppVersion }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- end -}}
{{/*
Selector labels
*/}}
{{- define "oai-nr-pbchsim-273rb.selectorLabels" -}}
app.kubernetes.io/name: {{ include "oai-nr-pbchsim-273rb.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end -}}
{{/*
Create the name of the service account to use
*/}}
{{- define "oai-nr-pbchsim-273rb.serviceAccountName" -}}
{{- if .Values.serviceAccount.create -}}
{{ default (include "oai-nr-pbchsim-273rb.fullname" .) .Values.serviceAccount.name }}
{{- else -}}
{{ default "default" .Values.serviceAccount.name }}
{{- end -}}
{{- end -}}

View File

@@ -1,42 +0,0 @@
apiVersion: batch/v1
kind: Job
metadata:
name: {{ .Chart.Name }}
spec:
template:
metadata:
labels:
app: physim
spec:
securityContext:
{{- toYaml .Values.podSecurityContext | nindent 8 }}
{{- if .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
containers:
- name: physim
image: "{{ .Values.global.image.repository }}:{{ .Values.global.image.version }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
env:
- name: OPENAIR_DIR
value: /opt/oai-physim
command: ["/bin/sh", "-c"]
args:
- >
cmake_targets/autotests/run_exec_autotests.bash -g "nr_pbchsim.273rb" -d bin/ &&
echo "FINISHED" && sleep infinity
dnsPolicy: ClusterFirst
restartPolicy: Never
schedulerName: default-scheduler
serviceAccountName: {{ .Values.global.serviceAccountName }}
terminationGracePeriodSeconds: 30
{{- if .Values.global.nodeSelector}}
nodeSelector:
{{- toYaml .Values.global.nodeSelector | nindent 12 }}
{{- end }}
{{- if .Values.global.nodeName.nrpbchsim273rb}}
nodeName: {{ .Values.global.nodeName.nrpbchsim273rb }}
{{- end }}

View File

@@ -1,48 +0,0 @@
# Default values for oai-nr-pbchsim-273rb
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.
replicaCount: 1
image:
# pullPolicy: IfNotPresent or Never or Always
pullPolicy: Always
imagePullSecrets: []
nameOverride: ""
fullnameOverride: ""
serviceAccount:
# Specifies whether a service account should be created
create: true
# Annotations to add to the service account
annotations: {}
# The name of the service account to use.
# If not set and create is true, a name is generated using the fullname template
name: "oai-nr-pbchsim-273rb"
podSecurityContext:
runAsUser: 0
runAsGroup: 0
securityContext:
privileged: false
resources: {}
# We usually recommend not to specify default resources and to leave this as a conscious
# choice for the user. This also increases chances charts run on environments with little
# resources, such as Minikube. If you do want to specify resources, uncomment the following
# lines, adjust them as necessary, and remove the curly braces after 'resources:'.
# limits:
# cpu: 100m
# memory: 128Mi
# requests:
# cpu: 100m
# memory: 128Mi
nodeSelector: {}
tolerations: []
affinity: {}

View File

@@ -1,36 +0,0 @@
apiVersion: v1
name: oai-nr-prachsim
description: A Helm subchart for nr-prachsim network function
# A chart can be either an 'application' or a 'library' chart.
#
# Application charts are a collection of templates that can be packaged into versioned archives
# to be deployed.
#
# Library charts provide useful utilities or functions for the chart developer. They're included as
# a dependency of application charts to inject those utilities and functions into the rendering
# pipeline. Library charts do not define any templates and therefore cannot be deployed.
type: application
icon: http://www.openairinterface.org/wp-content/uploads/2015/06/cropped-oai_final_logo.png
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
version: 0.1.1
# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application.
appVersion: v1
keywords:
- Physical Simulator
- nr-prachsim
- RAN
- 5G
sources:
- https://gitlab.eurecom.fr/oai/openairinterface5g
maintainers:
- name: OPENAIRINTERFACE
email: contact@openairinterface.org

View File

@@ -1,63 +0,0 @@
{{/* vim: set filetype=mustache: */}}
{{/*
Expand the name of the chart.
*/}}
{{- define "oai-nr-prachsim.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{/*
Create a default fully qualified app name.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
If release name contains chart name it will be used as a full name.
*/}}
{{- define "oai-nr-prachsim.fullname" -}}
{{- if .Values.fullnameOverride -}}
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
{{- else -}}
{{- $name := default .Chart.Name .Values.nameOverride -}}
{{- if contains $name .Release.Name -}}
{{- .Release.Name | trunc 63 | trimSuffix "-" -}}
{{- else -}}
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{- end -}}
{{- end -}}
{{/*
Create chart name and version as used by the chart label.
*/}}
{{- define "oai-nr-prachsim.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{/*
Common labels
*/}}
{{- define "oai-nr-prachsim.labels" -}}
helm.sh/chart: {{ include "oai-nr-prachsim.chart" . }}
{{ include "oai-nr-prachsim.selectorLabels" . }}
{{- if .Chart.AppVersion }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- end -}}
{{/*
Selector labels
*/}}
{{- define "oai-nr-prachsim.selectorLabels" -}}
app.kubernetes.io/name: {{ include "oai-nr-prachsim.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end -}}
{{/*
Create the name of the service account to use
*/}}
{{- define "oai-nr-prachsim.serviceAccountName" -}}
{{- if .Values.serviceAccount.create -}}
{{ default (include "oai-nr-prachsim.fullname" .) .Values.serviceAccount.name }}
{{- else -}}
{{ default "default" .Values.serviceAccount.name }}
{{- end -}}
{{- end -}}

View File

@@ -1,42 +0,0 @@
apiVersion: batch/v1
kind: Job
metadata:
name: {{ .Chart.Name }}
spec:
template:
metadata:
labels:
app: physim
spec:
securityContext:
{{- toYaml .Values.podSecurityContext | nindent 8 }}
{{- if .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
containers:
- name: physim
image: "{{ .Values.global.image.repository }}:{{ .Values.global.image.version }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
env:
- name: OPENAIR_DIR
value: /opt/oai-physim
command: ["/bin/sh", "-c"]
args:
- >
cmake_targets/autotests/run_exec_autotests.bash -g "nr_prachsim" -d bin/ &&
echo "FINISHED" && sleep infinity
dnsPolicy: ClusterFirst
restartPolicy: Never
schedulerName: default-scheduler
serviceAccountName: {{ .Values.global.serviceAccountName }}
terminationGracePeriodSeconds: 30
{{- if .Values.global.nodeSelector}}
nodeSelector:
{{- toYaml .Values.global.nodeSelector | nindent 12 }}
{{- end }}
{{- if .Values.global.nodeName.nrprachsim}}
nodeName: {{ .Values.global.nodeName.nrprachsim }}
{{- end }}

View File

@@ -1,48 +0,0 @@
# Default values for oai-nr-prachsim.
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.
replicaCount: 1
image:
# pullPolicy: IfNotPresent or Never or Always
pullPolicy: Always
imagePullSecrets: []
nameOverride: ""
fullnameOverride: ""
serviceAccount:
# Specifies whether a service account should be created
create: true
# Annotations to add to the service account
annotations: {}
# The name of the service account to use.
# If not set and create is true, a name is generated using the fullname template
name: "oai-nr-prachsim-sa"
podSecurityContext:
runAsUser: 0
runAsGroup: 0
securityContext:
privileged: false
resources: {}
# We usually recommend not to specify default resources and to leave this as a conscious
# choice for the user. This also increases chances charts run on environments with little
# resources, such as Minikube. If you do want to specify resources, uncomment the following
# lines, adjust them as necessary, and remove the curly braces after 'resources:'.
# limits:
# cpu: 100m
# memory: 128Mi
# requests:
# cpu: 100m
# memory: 128Mi
nodeSelector: {}
tolerations: []
affinity: {}

View File

@@ -1,36 +0,0 @@
apiVersion: v1
name: oai-nr-pucchsim
description: A Helm subchart for nr-pucchsim network function
# A chart can be either an 'application' or a 'library' chart.
#
# Application charts are a collection of templates that can be packaged into versioned archives
# to be deployed.
#
# Library charts provide useful utilities or functions for the chart developer. They're included as
# a dependency of application charts to inject those utilities and functions into the rendering
# pipeline. Library charts do not define any templates and therefore cannot be deployed.
type: application
icon: http://www.openairinterface.org/wp-content/uploads/2015/06/cropped-oai_final_logo.png
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
version: 0.1.1
# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application.
appVersion: v1
keywords:
- Physical Simulator
- nr-pucchsim
- RAN
- 5G
sources:
- https://gitlab.eurecom.fr/oai/openairinterface5g
maintainers:
- name: OPENAIRINTERFACE
email: contact@openairinterface.org

View File

@@ -1,63 +0,0 @@
{{/* vim: set filetype=mustache: */}}
{{/*
Expand the name of the chart.
*/}}
{{- define "oai-nr-pucchsim.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{/*
Create a default fully qualified app name.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
If release name contains chart name it will be used as a full name.
*/}}
{{- define "oai-nr-pucchsim.fullname" -}}
{{- if .Values.fullnameOverride -}}
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
{{- else -}}
{{- $name := default .Chart.Name .Values.nameOverride -}}
{{- if contains $name .Release.Name -}}
{{- .Release.Name | trunc 63 | trimSuffix "-" -}}
{{- else -}}
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{- end -}}
{{- end -}}
{{/*
Create chart name and version as used by the chart label.
*/}}
{{- define "oai-nr-pucchsim.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{/*
Common labels
*/}}
{{- define "oai-nr-pucchsim.labels" -}}
helm.sh/chart: {{ include "oai-nr-pucchsim.chart" . }}
{{ include "oai-nr-pucchsim.selectorLabels" . }}
{{- if .Chart.AppVersion }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- end -}}
{{/*
Selector labels
*/}}
{{- define "oai-nr-pucchsim.selectorLabels" -}}
app.kubernetes.io/name: {{ include "oai-nr-pucchsim.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end -}}
{{/*
Create the name of the service account to use
*/}}
{{- define "oai-nr-pucchsim.serviceAccountName" -}}
{{- if .Values.serviceAccount.create -}}
{{ default (include "oai-nr-pucchsim.fullname" .) .Values.serviceAccount.name }}
{{- else -}}
{{ default "default" .Values.serviceAccount.name }}
{{- end -}}
{{- end -}}

View File

@@ -1,42 +0,0 @@
apiVersion: batch/v1
kind: Job
metadata:
name: {{ .Chart.Name }}
spec:
template:
metadata:
labels:
app: physim
spec:
securityContext:
{{- toYaml .Values.podSecurityContext | nindent 8 }}
{{- if .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
containers:
- name: physim
image: "{{ .Values.global.image.repository }}:{{ .Values.global.image.version }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
env:
- name: OPENAIR_DIR
value: /opt/oai-physim
command: ["/bin/sh", "-c"]
args:
- >
cmake_targets/autotests/run_exec_autotests.bash -g "nr_pucchsim" -d bin/ &&
echo "FINISHED" && sleep infinity
dnsPolicy: ClusterFirst
restartPolicy: Never
schedulerName: default-scheduler
serviceAccountName: {{ .Values.global.serviceAccountName }}
terminationGracePeriodSeconds: 30
{{- if .Values.global.nodeSelector}}
nodeSelector:
{{- toYaml .Values.global.nodeSelector | nindent 12 }}
{{- end }}
{{- if .Values.global.nodeName.nrpucchsim}}
nodeName: {{ .Values.global.nodeName.nrpucchsim }}
{{- end }}

View File

@@ -1,52 +0,0 @@
# Default values for oai-nr-pucchsim.
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.
replicaCount: 1
image:
# pullPolicy: IfNotPresent or Never or Always
pullPolicy: Always
imagePullSecrets: []
nameOverride: ""
fullnameOverride: ""
serviceAccount:
# Specifies whether a service account should be created
create: true
# Annotations to add to the service account
annotations: {}
# The name of the service account to use.
# If not set and create is true, a name is generated using the fullname template
name: "oai-nr-pucchsim-sa"
podSecurityContext:
runAsUser: 0
runAsGroup: 0
securityContext:
privileged: false
service:
type: ClusterIP
port: 80
resources: {}
# We usually recommend not to specify default resources and to leave this as a conscious
# choice for the user. This also increases chances charts run on environments with little
# resources, such as Minikube. If you do want to specify resources, uncomment the following
# lines, adjust them as necessary, and remove the curly braces after 'resources:'.
# limits:
# cpu: 100m
# memory: 128Mi
# requests:
# cpu: 100m
# memory: 128Mi
nodeSelector: {}
tolerations: []
affinity: {}

View File

@@ -1,36 +0,0 @@
apiVersion: v1
name: oai-nr-ulschsim
description: A Helm subchart for nr-ulschsim network function
# A chart can be either an 'application' or a 'library' chart.
#
# Application charts are a collection of templates that can be packaged into versioned archives
# to be deployed.
#
# Library charts provide useful utilities or functions for the chart developer. They're included as
# a dependency of application charts to inject those utilities and functions into the rendering
# pipeline. Library charts do not define any templates and therefore cannot be deployed.
type: application
icon: http://www.openairinterface.org/wp-content/uploads/2015/06/cropped-oai_final_logo.png
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
version: 0.1.1
# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application.
appVersion: v1
keywords:
- Physical Simulator
- nr-ulschsim
- RAN
- 5G
sources:
- https://gitlab.eurecom.fr/oai/openairinterface5g
maintainers:
- name: OPENAIRINTERFACE
email: contact@openairinterface.org

View File

@@ -1,63 +0,0 @@
{{/* vim: set filetype=mustache: */}}
{{/*
Expand the name of the chart.
*/}}
{{- define "oai-nr-ulschsim.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{/*
Create a default fully qualified app name.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
If release name contains chart name it will be used as a full name.
*/}}
{{- define "oai-nr-ulschsim.fullname" -}}
{{- if .Values.fullnameOverride -}}
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
{{- else -}}
{{- $name := default .Chart.Name .Values.nameOverride -}}
{{- if contains $name .Release.Name -}}
{{- .Release.Name | trunc 63 | trimSuffix "-" -}}
{{- else -}}
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{- end -}}
{{- end -}}
{{/*
Create chart name and version as used by the chart label.
*/}}
{{- define "oai-nr-ulschsim.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{/*
Common labels
*/}}
{{- define "oai-nr-ulschsim.labels" -}}
helm.sh/chart: {{ include "oai-nr-ulschsim.chart" . }}
{{ include "oai-nr-ulschsim.selectorLabels" . }}
{{- if .Chart.AppVersion }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- end -}}
{{/*
Selector labels
*/}}
{{- define "oai-nr-ulschsim.selectorLabels" -}}
app.kubernetes.io/name: {{ include "oai-nr-ulschsim.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end -}}
{{/*
Create the name of the service account to use
*/}}
{{- define "oai-nr-ulschsim.serviceAccountName" -}}
{{- if .Values.serviceAccount.create -}}
{{ default (include "oai-nr-ulschsim.fullname" .) .Values.serviceAccount.name }}
{{- else -}}
{{ default "default" .Values.serviceAccount.name }}
{{- end -}}
{{- end -}}

View File

@@ -1,42 +0,0 @@
apiVersion: batch/v1
kind: Job
metadata:
name: {{ .Chart.Name }}
spec:
template:
metadata:
labels:
app: physim
spec:
securityContext:
{{- toYaml .Values.podSecurityContext | nindent 8 }}
{{- if .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
containers:
- name: physim
image: "{{ .Values.global.image.repository }}:{{ .Values.global.image.version }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
env:
- name: OPENAIR_DIR
value: /opt/oai-physim
command: ["/bin/sh", "-c"]
args:
- >
cmake_targets/autotests/run_exec_autotests.bash -g "nr_ulschsim" -d bin/ &&
echo "FINISHED" && sleep infinity
dnsPolicy: ClusterFirst
restartPolicy: Never
schedulerName: default-scheduler
serviceAccountName: {{ .Values.global.serviceAccountName }}
terminationGracePeriodSeconds: 30
{{- if .Values.global.nodeSelector}}
nodeSelector:
{{- toYaml .Values.global.nodeSelector | nindent 12 }}
{{- end }}
{{- if .Values.global.nodeName.nrulschsim}}
nodeName: {{ .Values.global.nodeName.nrulschsim }}
{{- end }}

View File

@@ -1,48 +0,0 @@
# Default values for oai-nr-ulschsim.
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.
replicaCount: 1
image:
# pullPolicy: IfNotPresent or Never or Always
pullPolicy: Always
imagePullSecrets: []
nameOverride: ""
fullnameOverride: ""
serviceAccount:
# Specifies whether a service account should be created
create: true
# Annotations to add to the service account
annotations: {}
# The name of the service account to use.
# If not set and create is true, a name is generated using the fullname template
name: "oai-nr-ulschsim-sa"
podSecurityContext:
runAsUser: 0
runAsGroup: 0
securityContext:
privileged: false
resources: {}
# We usually recommend not to specify default resources and to leave this as a conscious
# choice for the user. This also increases chances charts run on environments with little
# resources, such as Minikube. If you do want to specify resources, uncomment the following
# lines, adjust them as necessary, and remove the curly braces after 'resources:'.
# limits:
# cpu: 100m
# memory: 128Mi
# requests:
# cpu: 100m
# memory: 128Mi
nodeSelector: {}
tolerations: []
affinity: {}

View File

@@ -1,36 +0,0 @@
apiVersion: v1
name: oai-nr-ulsim-3gpp
description: A Helm subchart for nr-ulsim network function ("3gpp" tests)
# A chart can be either an 'application' or a 'library' chart.
#
# Application charts are a collection of templates that can be packaged into versioned archives
# to be deployed.
#
# Library charts provide useful utilities or functions for the chart developer. They're included as
# a dependency of application charts to inject those utilities and functions into the rendering
# pipeline. Library charts do not define any templates and therefore cannot be deployed.
type: application
icon: http://www.openairinterface.org/wp-content/uploads/2015/06/cropped-oai_final_logo.png
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
version: 0.1.1
# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application.
appVersion: v1
keywords:
- Physical Simulator
- nr-ulsim
- RAN
- 5G
sources:
- https://gitlab.eurecom.fr/oai/openairinterface5g
maintainers:
- name: OPENAIRINTERFACE
email: contact@openairinterface.org

View File

@@ -1,63 +0,0 @@
{{/* vim: set filetype=mustache: */}}
{{/*
Expand the name of the chart.
*/}}
{{- define "oai-nr-ulsim-3gpp.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{/*
Create a default fully qualified app name.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
If release name contains chart name it will be used as a full name.
*/}}
{{- define "oai-nr-ulsim-3gpp.fullname" -}}
{{- if .Values.fullnameOverride -}}
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
{{- else -}}
{{- $name := default .Chart.Name .Values.nameOverride -}}
{{- if contains $name .Release.Name -}}
{{- .Release.Name | trunc 63 | trimSuffix "-" -}}
{{- else -}}
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{- end -}}
{{- end -}}
{{/*
Create chart name and version as used by the chart label.
*/}}
{{- define "oai-nr-ulsim-3gpp.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{/*
Common labels
*/}}
{{- define "oai-nr-ulsim-3gpp.labels" -}}
helm.sh/chart: {{ include "oai-nr-ulsim-3gpp.chart" . }}
{{ include "oai-nr-ulsim-3gpp.selectorLabels" . }}
{{- if .Chart.AppVersion }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- end -}}
{{/*
Selector labels
*/}}
{{- define "oai-nr-ulsim-3gpp.selectorLabels" -}}
app.kubernetes.io/name: {{ include "oai-nr-ulsim-3gpp.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end -}}
{{/*
Create the name of the service account to use
*/}}
{{- define "oai-nr-ulsim-3gpp.serviceAccountName" -}}
{{- if .Values.serviceAccount.create -}}
{{ default (include "oai-nr-ulsim.fullname" .) .Values.serviceAccount.name }}
{{- else -}}
{{ default "default" .Values.serviceAccount.name }}
{{- end -}}
{{- end -}}

View File

@@ -1,42 +0,0 @@
apiVersion: batch/v1
kind: Job
metadata:
name: {{ .Chart.Name }}
spec:
template:
metadata:
labels:
app: physim
spec:
securityContext:
{{- toYaml .Values.podSecurityContext | nindent 8 }}
{{- if .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
containers:
- name: physim
image: "{{ .Values.global.image.repository }}:{{ .Values.global.image.version }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
env:
- name: OPENAIR_DIR
value: /opt/oai-physim
command: ["/bin/sh", "-c"]
args:
- >
cmake_targets/autotests/run_exec_autotests.bash -g "nr_ulsim.3gpp" -d bin/ &&
echo "FINISHED" && sleep infinity
dnsPolicy: ClusterFirst
restartPolicy: Never
schedulerName: default-scheduler
serviceAccountName: {{ .Values.global.serviceAccountName }}
terminationGracePeriodSeconds: 30
{{- if .Values.global.nodeSelector}}
nodeSelector:
{{- toYaml .Values.global.nodeSelector | nindent 12 }}
{{- end }}
{{- if .Values.global.nodeName.nrulsim3gpp}}
nodeName: {{ .Values.global.nodeName.nrulsim3gpp }}
{{- end }}

View File

@@ -1,48 +0,0 @@
# Default values for oai-nr-ulsim-3gpp
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.
replicaCount: 1
image:
# pullPolicy: IfNotPresent or Never or Always
pullPolicy: Always
imagePullSecrets: []
nameOverride: ""
fullnameOverride: ""
serviceAccount:
# Specifies whether a service account should be created
create: true
# Annotations to add to the service account
annotations: {}
# The name of the service account to use.
# If not set and create is true, a name is generated using the fullname template
name: "oai-nr-ulsim-3gpp"
podSecurityContext:
runAsUser: 0
runAsGroup: 0
securityContext:
privileged: false
resources: {}
# We usually recommend not to specify default resources and to leave this as a conscious
# choice for the user. This also increases chances charts run on environments with little
# resources, such as Minikube. If you do want to specify resources, uncomment the following
# lines, adjust them as necessary, and remove the curly braces after 'resources:'.
# limits:
# cpu: 100m
# memory: 128Mi
# requests:
# cpu: 100m
# memory: 128Mi
nodeSelector: {}
tolerations: []
affinity: {}

View File

@@ -1,36 +0,0 @@
apiVersion: v1
name: oai-nr-ulsim-mimo
description: A Helm subchart for nr-ulsim network function ("mimo" tests)
# A chart can be either an 'application' or a 'library' chart.
#
# Application charts are a collection of templates that can be packaged into versioned archives
# to be deployed.
#
# Library charts provide useful utilities or functions for the chart developer. They're included as
# a dependency of application charts to inject those utilities and functions into the rendering
# pipeline. Library charts do not define any templates and therefore cannot be deployed.
type: application
icon: http://www.openairinterface.org/wp-content/uploads/2015/06/cropped-oai_final_logo.png
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
version: 0.1.1
# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application.
appVersion: v1
keywords:
- Physical Simulator
- nr-ulsim
- RAN
- 5G
sources:
- https://gitlab.eurecom.fr/oai/openairinterface5g
maintainers:
- name: OPENAIRINTERFACE
email: contact@openairinterface.org

View File

@@ -1,63 +0,0 @@
{{/* vim: set filetype=mustache: */}}
{{/*
Expand the name of the chart.
*/}}
{{- define "oai-nr-ulsim-mimo.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{/*
Create a default fully qualified app name.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
If release name contains chart name it will be used as a full name.
*/}}
{{- define "oai-nr-ulsim-mimo.fullname" -}}
{{- if .Values.fullnameOverride -}}
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
{{- else -}}
{{- $name := default .Chart.Name .Values.nameOverride -}}
{{- if contains $name .Release.Name -}}
{{- .Release.Name | trunc 63 | trimSuffix "-" -}}
{{- else -}}
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{- end -}}
{{- end -}}
{{/*
Create chart name and version as used by the chart label.
*/}}
{{- define "oai-nr-ulsim-mimo.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{/*
Common labels
*/}}
{{- define "oai-nr-ulsim-mimo.labels" -}}
helm.sh/chart: {{ include "oai-nr-ulsim-mimo.chart" . }}
{{ include "oai-nr-ulsim-mimo.selectorLabels" . }}
{{- if .Chart.AppVersion }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- end -}}
{{/*
Selector labels
*/}}
{{- define "oai-nr-ulsim-mimo.selectorLabels" -}}
app.kubernetes.io/name: {{ include "oai-nr-ulsim-mimo.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end -}}
{{/*
Create the name of the service account to use
*/}}
{{- define "oai-nr-ulsim-mimo.serviceAccountName" -}}
{{- if .Values.serviceAccount.create -}}
{{ default (include "oai-nr-ulsim.fullname" .) .Values.serviceAccount.name }}
{{- else -}}
{{ default "default" .Values.serviceAccount.name }}
{{- end -}}
{{- end -}}

View File

@@ -1,42 +0,0 @@
apiVersion: batch/v1
kind: Job
metadata:
name: {{ .Chart.Name }}
spec:
template:
metadata:
labels:
app: physim
spec:
securityContext:
{{- toYaml .Values.podSecurityContext | nindent 8 }}
{{- if .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
containers:
- name: physim
image: "{{ .Values.global.image.repository }}:{{ .Values.global.image.version }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
env:
- name: OPENAIR_DIR
value: /opt/oai-physim
command: ["/bin/sh", "-c"]
args:
- >
cmake_targets/autotests/run_exec_autotests.bash -g "nr_ulsim.mimo" -d bin/ &&
echo "FINISHED" && sleep infinity
dnsPolicy: ClusterFirst
restartPolicy: Never
schedulerName: default-scheduler
serviceAccountName: {{ .Values.global.serviceAccountName }}
terminationGracePeriodSeconds: 30
{{- if .Values.global.nodeSelector}}
nodeSelector:
{{- toYaml .Values.global.nodeSelector | nindent 12 }}
{{- end }}
{{- if .Values.global.nodeName.nrulsimmimo}}
nodeName: {{ .Values.global.nodeName.nrulsimmimo }}
{{- end }}

View File

@@ -1,48 +0,0 @@
# Default values for oai-nr-ulsim-mimo
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.
replicaCount: 1
image:
# pullPolicy: IfNotPresent or Never or Always
pullPolicy: Always
imagePullSecrets: []
nameOverride: ""
fullnameOverride: ""
serviceAccount:
# Specifies whether a service account should be created
create: true
# Annotations to add to the service account
annotations: {}
# The name of the service account to use.
# If not set and create is true, a name is generated using the fullname template
name: "oai-nr-ulsim-mimo"
podSecurityContext:
runAsUser: 0
runAsGroup: 0
securityContext:
privileged: false
resources: {}
# We usually recommend not to specify default resources and to leave this as a conscious
# choice for the user. This also increases chances charts run on environments with little
# resources, such as Minikube. If you do want to specify resources, uncomment the following
# lines, adjust them as necessary, and remove the curly braces after 'resources:'.
# limits:
# cpu: 100m
# memory: 128Mi
# requests:
# cpu: 100m
# memory: 128Mi
nodeSelector: {}
tolerations: []
affinity: {}

View File

@@ -1,36 +0,0 @@
apiVersion: v1
name: oai-nr-ulsim-misc
description: A Helm subchart for nr-ulsim network function ("misc" tests)
# A chart can be either an 'application' or a 'library' chart.
#
# Application charts are a collection of templates that can be packaged into versioned archives
# to be deployed.
#
# Library charts provide useful utilities or functions for the chart developer. They're included as
# a dependency of application charts to inject those utilities and functions into the rendering
# pipeline. Library charts do not define any templates and therefore cannot be deployed.
type: application
icon: http://www.openairinterface.org/wp-content/uploads/2015/06/cropped-oai_final_logo.png
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
version: 0.1.1
# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application.
appVersion: v1
keywords:
- Physical Simulator
- nr-ulsim
- RAN
- 5G
sources:
- https://gitlab.eurecom.fr/oai/openairinterface5g
maintainers:
- name: OPENAIRINTERFACE
email: contact@openairinterface.org

View File

@@ -1,63 +0,0 @@
{{/* vim: set filetype=mustache: */}}
{{/*
Expand the name of the chart.
*/}}
{{- define "oai-nr-ulsim-misc.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{/*
Create a default fully qualified app name.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
If release name contains chart name it will be used as a full name.
*/}}
{{- define "oai-nr-ulsim-misc.fullname" -}}
{{- if .Values.fullnameOverride -}}
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
{{- else -}}
{{- $name := default .Chart.Name .Values.nameOverride -}}
{{- if contains $name .Release.Name -}}
{{- .Release.Name | trunc 63 | trimSuffix "-" -}}
{{- else -}}
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{- end -}}
{{- end -}}
{{/*
Create chart name and version as used by the chart label.
*/}}
{{- define "oai-nr-ulsim-misc.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{/*
Common labels
*/}}
{{- define "oai-nr-ulsim-misc.labels" -}}
helm.sh/chart: {{ include "oai-nr-ulsim-misc.chart" . }}
{{ include "oai-nr-ulsim-misc.selectorLabels" . }}
{{- if .Chart.AppVersion }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- end -}}
{{/*
Selector labels
*/}}
{{- define "oai-nr-ulsim-misc.selectorLabels" -}}
app.kubernetes.io/name: {{ include "oai-nr-ulsim-misc.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end -}}
{{/*
Create the name of the service account to use
*/}}
{{- define "oai-nr-ulsim-misc.serviceAccountName" -}}
{{- if .Values.serviceAccount.create -}}
{{ default (include "oai-nr-ulsim.fullname" .) .Values.serviceAccount.name }}
{{- else -}}
{{ default "default" .Values.serviceAccount.name }}
{{- end -}}
{{- end -}}

View File

@@ -1,42 +0,0 @@
apiVersion: batch/v1
kind: Job
metadata:
name: {{ .Chart.Name }}
spec:
template:
metadata:
labels:
app: physim
spec:
securityContext:
{{- toYaml .Values.podSecurityContext | nindent 8 }}
{{- if .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
containers:
- name: physim
image: "{{ .Values.global.image.repository }}:{{ .Values.global.image.version }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
env:
- name: OPENAIR_DIR
value: /opt/oai-physim
command: ["/bin/sh", "-c"]
args:
- >
cmake_targets/autotests/run_exec_autotests.bash -g "nr_ulsim.misc" -d bin/ &&
echo "FINISHED" && sleep infinity
dnsPolicy: ClusterFirst
restartPolicy: Never
schedulerName: default-scheduler
serviceAccountName: {{ .Values.global.serviceAccountName }}
terminationGracePeriodSeconds: 30
{{- if .Values.global.nodeSelector}}
nodeSelector:
{{- toYaml .Values.global.nodeSelector | nindent 12 }}
{{- end }}
{{- if .Values.global.nodeName.nrulsimmisc}}
nodeName: {{ .Values.global.nodeName.nrulsimmisc }}
{{- end }}

View File

@@ -1,48 +0,0 @@
# Default values for oai-nr-ulsim-misc
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.
replicaCount: 1
image:
# pullPolicy: IfNotPresent or Never or Always
pullPolicy: Always
imagePullSecrets: []
nameOverride: ""
fullnameOverride: ""
serviceAccount:
# Specifies whether a service account should be created
create: true
# Annotations to add to the service account
annotations: {}
# The name of the service account to use.
# If not set and create is true, a name is generated using the fullname template
name: "oai-nr-ulsim-misc"
podSecurityContext:
runAsUser: 0
runAsGroup: 0
securityContext:
privileged: false
resources: {}
# We usually recommend not to specify default resources and to leave this as a conscious
# choice for the user. This also increases chances charts run on environments with little
# resources, such as Minikube. If you do want to specify resources, uncomment the following
# lines, adjust them as necessary, and remove the curly braces after 'resources:'.
# limits:
# cpu: 100m
# memory: 128Mi
# requests:
# cpu: 100m
# memory: 128Mi
nodeSelector: {}
tolerations: []
affinity: {}

View File

@@ -1,36 +0,0 @@
apiVersion: v1
name: oai-nr-ulsim-sc-fdma
description: A Helm subchart for nr-ulsim network function ("sc-fdma" tests)
# A chart can be either an 'application' or a 'library' chart.
#
# Application charts are a collection of templates that can be packaged into versioned archives
# to be deployed.
#
# Library charts provide useful utilities or functions for the chart developer. They're included as
# a dependency of application charts to inject those utilities and functions into the rendering
# pipeline. Library charts do not define any templates and therefore cannot be deployed.
type: application
icon: http://www.openairinterface.org/wp-content/uploads/2015/06/cropped-oai_final_logo.png
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
version: 0.1.1
# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application.
appVersion: v1
keywords:
- Physical Simulator
- nr-ulsim
- RAN
- 5G
sources:
- https://gitlab.eurecom.fr/oai/openairinterface5g
maintainers:
- name: OPENAIRINTERFACE
email: contact@openairinterface.org

View File

@@ -1,63 +0,0 @@
{{/* vim: set filetype=mustache: */}}
{{/*
Expand the name of the chart.
*/}}
{{- define "oai-nr-ulsim-sc-fdma.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{/*
Create a default fully qualified app name.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
If release name contains chart name it will be used as a full name.
*/}}
{{- define "oai-nr-ulsim-sc-fdma.fullname" -}}
{{- if .Values.fullnameOverride -}}
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
{{- else -}}
{{- $name := default .Chart.Name .Values.nameOverride -}}
{{- if contains $name .Release.Name -}}
{{- .Release.Name | trunc 63 | trimSuffix "-" -}}
{{- else -}}
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{- end -}}
{{- end -}}
{{/*
Create chart name and version as used by the chart label.
*/}}
{{- define "oai-nr-ulsim-sc-fdma.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{/*
Common labels
*/}}
{{- define "oai-nr-ulsim-sc-fdma.labels" -}}
helm.sh/chart: {{ include "oai-nr-ulsim-sc-fdma.chart" . }}
{{ include "oai-nr-ulsim-sc-fdma.selectorLabels" . }}
{{- if .Chart.AppVersion }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- end -}}
{{/*
Selector labels
*/}}
{{- define "oai-nr-ulsim-sc-fdma.selectorLabels" -}}
app.kubernetes.io/name: {{ include "oai-nr-ulsim-sc-fdma.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end -}}
{{/*
Create the name of the service account to use
*/}}
{{- define "oai-nr-ulsim-sc-fdma.serviceAccountName" -}}
{{- if .Values.serviceAccount.create -}}
{{ default (include "oai-nr-ulsim.fullname" .) .Values.serviceAccount.name }}
{{- else -}}
{{ default "default" .Values.serviceAccount.name }}
{{- end -}}
{{- end -}}

View File

@@ -1,44 +0,0 @@
apiVersion: batch/v1
kind: Job
metadata:
name: {{ .Chart.Name }}
spec:
template:
metadata:
labels:
app: physim
spec:
securityContext:
{{- toYaml .Values.podSecurityContext | nindent 8 }}
{{- if .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
containers:
- name: physim
image: "{{ .Values.global.image.repository }}:{{ .Values.global.image.version }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
ports:
- containerPort: 80
env:
- name: OPENAIR_DIR
value: /opt/oai-physim
command: ["/bin/sh", "-c"]
args:
- >
cmake_targets/autotests/run_exec_autotests.bash -g "nr_ulsim.sc-fdma" -d bin/ &&
echo "FINISHED" && sleep infinity
dnsPolicy: ClusterFirst
restartPolicy: Never
schedulerName: default-scheduler
serviceAccountName: {{ .Values.global.serviceAccountName }}
terminationGracePeriodSeconds: 30
{{- if .Values.global.nodeSelector}}
nodeSelector:
{{- toYaml .Values.global.nodeSelector | nindent 12 }}
{{- end }}
{{- if .Values.global.nodeName.nrulsimscfdma}}
nodeName: {{ .Values.global.nodeName.nrulsimscfdma }}
{{- end }}

View File

@@ -1,48 +0,0 @@
# Default values for oai-nr-ulsim-sc-fdma
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.
replicaCount: 1
image:
# pullPolicy: IfNotPresent or Never or Always
pullPolicy: Always
imagePullSecrets: []
nameOverride: ""
fullnameOverride: ""
serviceAccount:
# Specifies whether a service account should be created
create: true
# Annotations to add to the service account
annotations: {}
# The name of the service account to use.
# If not set and create is true, a name is generated using the fullname template
name: "oai-nr-ulsim-sc-fdma"
podSecurityContext:
runAsUser: 0
runAsGroup: 0
securityContext:
privileged: false
resources: {}
# We usually recommend not to specify default resources and to leave this as a conscious
# choice for the user. This also increases chances charts run on environments with little
# resources, such as Minikube. If you do want to specify resources, uncomment the following
# lines, adjust them as necessary, and remove the curly braces after 'resources:'.
# limits:
# cpu: 100m
# memory: 128Mi
# requests:
# cpu: 100m
# memory: 128Mi
nodeSelector: {}
tolerations: []
affinity: {}

View File

@@ -1,42 +0,0 @@
apiVersion: batch/v1
kind: Job
metadata:
name: {{ .Chart.Name }}
spec:
template:
metadata:
labels:
app: physim
spec:
securityContext:
{{- toYaml .Values.podSecurityContext | nindent 8 }}
{{- if .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
containers:
- name: physim
image: "{{ .Values.global.image.repository }}:{{ .Values.global.image.version }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
env:
- name: OPENAIR_DIR
value: /opt/oai-physim
command: ["/bin/sh", "-c"]
args:
- >
cmake_targets/autotests/run_exec_autotests.bash -g "polartest" -d bin/ &&
echo "FINISHED" && sleep infinity
dnsPolicy: ClusterFirst
restartPolicy: Never
schedulerName: default-scheduler
serviceAccountName: {{ .Values.global.serviceAccountName }}
terminationGracePeriodSeconds: 30
{{- if .Values.global.nodeSelector}}
nodeSelector:
{{- toYaml .Values.global.nodeSelector | nindent 12 }}
{{- end }}
{{- if .Values.global.nodeName.polartest}}
nodeName: {{ .Values.global.nodeName.polartest }}
{{- end }}

View File

@@ -1,48 +0,0 @@
# Default values for oai-polartest.
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.
replicaCount: 1
image:
# pullPolicy: IfNotPresent or Never or Always
pullPolicy: Always
imagePullSecrets: []
nameOverride: ""
fullnameOverride: ""
serviceAccount:
# Specifies whether a service account should be created
create: true
# Annotations to add to the service account
annotations: {}
# The name of the service account to use.
# If not set and create is true, a name is generated using the fullname template
name: "oai-polartest-sa"
podSecurityContext:
runAsUser: 0
runAsGroup: 0
securityContext:
privileged: false
resources: {}
# We usually recommend not to specify default resources and to leave this as a conscious
# choice for the user. This also increases chances charts run on environments with little
# resources, such as Minikube. If you do want to specify resources, uncomment the following
# lines, adjust them as necessary, and remove the curly braces after 'resources:'.
# limits:
# cpu: 100m
# memory: 128Mi
# requests:
# cpu: 100m
# memory: 128Mi
nodeSelector: {}
tolerations: []
affinity: {}

View File

@@ -1,36 +0,0 @@
apiVersion: v1
name: oai-smallblocktest
description: A Helm subchart for smallblocktest network function
# A chart can be either an 'application' or a 'library' chart.
#
# Application charts are a collection of templates that can be packaged into versioned archives
# to be deployed.
#
# Library charts provide useful utilities or functions for the chart developer. They're included as
# a dependency of application charts to inject those utilities and functions into the rendering
# pipeline. Library charts do not define any templates and therefore cannot be deployed.
type: application
icon: http://www.openairinterface.org/wp-content/uploads/2015/06/cropped-oai_final_logo.png
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
version: 0.1.1
# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application.
appVersion: v1
keywords:
- Physical Simulator
- smallblocktest
- RAN
- 4G
sources:
- https://gitlab.eurecom.fr/oai/openairinterface5g
maintainers:
- name: OPENAIRINTERFACE
email: contact@openairinterface.org

View File

@@ -1,63 +0,0 @@
{{/* vim: set filetype=mustache: */}}
{{/*
Expand the name of the chart.
*/}}
{{- define "oai-smallblocktest.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{/*
Create a default fully qualified app name.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
If release name contains chart name it will be used as a full name.
*/}}
{{- define "oai-smallblocktest.fullname" -}}
{{- if .Values.fullnameOverride -}}
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
{{- else -}}
{{- $name := default .Chart.Name .Values.nameOverride -}}
{{- if contains $name .Release.Name -}}
{{- .Release.Name | trunc 63 | trimSuffix "-" -}}
{{- else -}}
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{- end -}}
{{- end -}}
{{/*
Create chart name and version as used by the chart label.
*/}}
{{- define "oai-smallblocktest.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{/*
Common labels
*/}}
{{- define "oai-smallblocktest.labels" -}}
helm.sh/chart: {{ include "oai-smallblocktest.chart" . }}
{{ include "oai-smallblocktest.selectorLabels" . }}
{{- if .Chart.AppVersion }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- end -}}
{{/*
Selector labels
*/}}
{{- define "oai-smallblocktest.selectorLabels" -}}
app.kubernetes.io/name: {{ include "oai-smallblocktest.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end -}}
{{/*
Create the name of the service account to use
*/}}
{{- define "oai-smallblocktest.serviceAccountName" -}}
{{- if .Values.serviceAccount.create -}}
{{ default (include "oai-smallblocktest.fullname" .) .Values.serviceAccount.name }}
{{- else -}}
{{ default "default" .Values.serviceAccount.name }}
{{- end -}}
{{- end -}}

View File

@@ -1,42 +0,0 @@
apiVersion: batch/v1
kind: Job
metadata:
name: {{ .Chart.Name }}
spec:
template:
metadata:
labels:
app: physim
spec:
securityContext:
{{- toYaml .Values.podSecurityContext | nindent 8 }}
{{- if .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
containers:
- name: physim
image: "{{ .Values.global.image.repository }}:{{ .Values.global.image.version }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
env:
- name: OPENAIR_DIR
value: /opt/oai-physim
command: ["/bin/sh", "-c"]
args:
- >
cmake_targets/autotests/run_exec_autotests.bash -g "smallblocktest" -d bin/ &&
echo "FINISHED" && sleep infinity
dnsPolicy: ClusterFirst
restartPolicy: Never
schedulerName: default-scheduler
serviceAccountName: {{ .Values.global.serviceAccountName }}
terminationGracePeriodSeconds: 30
{{- if .Values.global.nodeSelector}}
nodeSelector:
{{- toYaml .Values.global.nodeSelector | nindent 12 }}
{{- end }}
{{- if .Values.global.nodeName.smallblocktest}}
nodeName: {{ .Values.global.nodeName.smallblocktest }}
{{- end }}

View File

@@ -1,48 +0,0 @@
# Default values for oai-smallblocktest.
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.
replicaCount: 1
image:
# pullPolicy: IfNotPresent or Never or Always
pullPolicy: Always
imagePullSecrets: []
nameOverride: ""
fullnameOverride: ""
serviceAccount:
# Specifies whether a service account should be created
create: true
# Annotations to add to the service account
annotations: {}
# The name of the service account to use.
# If not set and create is true, a name is generated using the fullname template
name: "oai-smallblocktest-sa"
podSecurityContext:
runAsUser: 0
runAsGroup: 0
securityContext:
privileged: false
resources: {}
# We usually recommend not to specify default resources and to leave this as a conscious
# choice for the user. This also increases chances charts run on environments with little
# resources, such as Minikube. If you do want to specify resources, uncomment the following
# lines, adjust them as necessary, and remove the curly braces after 'resources:'.
# limits:
# cpu: 100m
# memory: 128Mi
# requests:
# cpu: 100m
# memory: 128Mi
nodeSelector: {}
tolerations: []
affinity: {}

View File

@@ -1,42 +0,0 @@
apiVersion: batch/v1
kind: Job
metadata:
name: {{ .Chart.Name }}
spec:
template:
metadata:
labels:
app: physim
spec:
securityContext:
{{- toYaml .Values.podSecurityContext | nindent 8 }}
{{- if .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
containers:
- name: physim
image: "{{ .Values.global.image.repository }}:{{ .Values.global.image.version }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
env:
- name: OPENAIR_DIR
value: /opt/oai-physim
command: ["/bin/sh", "-c"]
args:
- >
cmake_targets/autotests/run_exec_autotests.bash -g "ulsim" -d bin/ &&
echo "FINISHED" && sleep infinity
dnsPolicy: ClusterFirst
restartPolicy: Never
schedulerName: default-scheduler
serviceAccountName: {{ .Values.global.serviceAccountName }}
terminationGracePeriodSeconds: 30
{{- if .Values.global.nodeSelector}}
nodeSelector:
{{- toYaml .Values.global.nodeSelector | nindent 12 }}
{{- end }}
{{- if .Values.global.nodeName.ulsim}}
nodeName: {{ .Values.global.nodeName.ulsim }}
{{- end }}

View File

@@ -1,39 +0,0 @@
# Default values for oai-physim.
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.
global:
serviceAccountName: oai-physim-sa
namespace: "OAICICD_PROJECT"
image:
registry: local
repository: image-registry.openshift-image-registry.svc:5000/oaicicd-ran/oai-physim
version: TAG
# pullPolicy: IfNotPresent or Never or Always
pullPolicy: Always
# removing the node selector
nodeSelector: {}
# It is not a good way of assigning pods to the nodes: this way we bypass the scheduler. At the moment we don't provide the resource information of these pods.
# Therefore, Openshift assigns the pods to the same node because it thinks the pods don't consume much resources. This isn't the case, they consume a lot of resources.
nodeName:
dlsim100rbtm2: acamas
dlsimbasic: acamas
ldpctest: acamas
nrdlschsim: acamas
nrdlsimbasic: acamas
nrdlsimdmrsptrs: acamas
nrdlsimmcsmimo: acamas
nrdlsimoffset: dedale
nrpbschsim106rb: dedale
nrpbchsim217rb: dedale
nrpbchsim273rb: dedale
nrprachsim: dedale
nrpucchsim: dedale
nrulschsim: theseus
nrulsim3gpp: theseus
nrulsimmimo: theseus
nrulsimmisc: theseus
nrulsimscfdma: theseus
polartest: theseus
smallblocktest: theseus
ulsim: theseus

Some files were not shown because too many files have changed in this diff Show More