Compare commits

...

347 Commits

Author SHA1 Message Date
Bartosz Podrygajlo
b27975e1f6 Remove references to gNB from ru_thread
Remove the references to gNB from ru_thread. This way the ru_thread
can be run without gNB being present in an executable.
2025-07-10 12:16:00 +02: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
8ef0bf8462 CI: specify interface names in UPF container 2025-07-08 11:11:58 +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
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
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
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
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
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
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
Jaroslava Fiedlerova
139c0d548c CI: change path to lteue and configs after SW update 2025-05-27 19:00:22 +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
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
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
Guido Casati
002fa0050f Bugfix in ngap_gNB_handle_ng_setup_response: use correct count for PLMNSupportList 2025-05-01 11:19:59 +02:00
302 changed files with 11822 additions and 8060 deletions

View File

@@ -300,14 +300,15 @@ add_definitions(-DHAVE_NETINET_IN_H)
set(E2_AGENT "OFF" CACHE STRING "O-RAN-compliant E2 Agent")
set_property(CACHE E2_AGENT PROPERTY STRINGS "ON" "OFF")
set(E2AP_VERSION "E2AP_V2" CACHE STRING "E2AP version")
set_property(CACHE E2AP_VERSION PROPERTY STRINGS "E2AP_V1" "E2AP_V2" "E2AP_V3")
message(STATUS "Selected E2AP_VERSION: ${E2AP_VERSION}")
set(KPM_VERSION "KPM_V2_03" CACHE STRING "The KPM SM version to use")
set_property(CACHE KPM_VERSION PROPERTY STRINGS "KPM_V2_03" "KPM_V3_00")
message(STATUS "Selected KPM Version: ${KPM_VERSION}")
if (E2_AGENT)
set(E2AP_VERSION "E2AP_V2" CACHE STRING "E2AP version")
set_property(CACHE E2AP_VERSION PROPERTY STRINGS "E2AP_V1" "E2AP_V2" "E2AP_V3")
message(STATUS "Selected E2AP version: ${E2AP_VERSION}")
set(KPM_VERSION "KPM_V2_03" CACHE STRING "The KPM SM version to use")
set_property(CACHE KPM_VERSION PROPERTY STRINGS "KPM_V2_03" "KPM_V3_00")
message(STATUS "Selected KPM version: ${KPM_VERSION}")
endif()
add_boolean_option(ENABLE_IMSCOPE OFF "Enable phy scope based on imgui" OFF)
add_boolean_option(ENABLE_IMSCOPE_RECORD OFF "Enable recording IQ data for imscope" OFF)
@@ -1147,7 +1148,6 @@ set(L2_NR_SRC
${NR_RRC_DIR}/rrc_gNB.c
${NR_RRC_DIR}/mac_rrc_dl_direct.c
${NR_RRC_DIR}/mac_rrc_dl_f1ap.c
${NR_RRC_DIR}/nr_rrc_config.c
${NR_RRC_DIR}/rrc_gNB_nsa.c
${NR_RRC_DIR}/rrc_gNB_UE_context.c
${NR_RRC_DIR}/rrc_gNB_NGAP.c
@@ -1230,6 +1230,7 @@ set (MAC_NR_SRC
${NR_GNB_MAC_DIR}/mac_rrc_dl_handler.c
${NR_GNB_MAC_DIR}/mac_rrc_ul_direct.c
${NR_GNB_MAC_DIR}/mac_rrc_ul_f1ap.c
${NR_GNB_MAC_DIR}/nr_radio_config.c
)

View File

@@ -8,13 +8,13 @@
#define DL_ARFCN 631296
#define TDD 1
log_options: "all.level=warn,all.max_size=0,nas.level=debug,nas.max_size=1,rrc.level=debug,rrc.max_size=1",
log_options: "all.level=debug,all.max_size=0,nas.level=debug,nas.max_size=1,rrc.level=debug,rrc.max_size=1",
log_filename: "/tmp/ue.log",
/* Enable remote API and Web interface */
com_addr: "0.0.0.0:9002",
include "rf_driver_20/1chan.cfg",
include "rf_driver/config.cfg",
/* If true, allow the simulation of several UEs at the same time and
allow dynamic UE creation from remote API */
@@ -22,7 +22,6 @@ allow dynamic UE creation from remote API */
cell_groups: [{
group_type: "nr",
multi_ue: true,
ldpc_max_its:8,
cells: [{
rf_port: 0,
bandwidth: 20,

View File

@@ -0,0 +1,47 @@
/* Parameters for SDR device version 2023-06-10
* Copyright (C) 2015-2023 Amarisoft
*/
#if !defined(N_CELL)
#define N_CELL 1
#endif
#if N_ANTENNA_DL <= 2
#define N_CHAN N_CELL
#else
#define N_CHAN 2*N_CELL
#endif
rf_driver: {
name: "sdr",
/* list of devices. 'dev0' is always the master. */
#if N_CHAN == 1
args: "dev0=/dev/sdr0",
#elif N_CHAN == 2
args: "dev0=/dev/sdr0,dev1=/dev/sdr1",
#elif N_CHAN == 3
args: "dev0=/dev/sdr0,dev1=/dev/sdr1,dev2=/dev/sdr2",
#elif N_CHAN == 4
args: "dev0=/dev/sdr0,dev1=/dev/sdr1,dev2=/dev/sdr2,dev3=/dev/sdr3",
#elif N_CHAN == 6
args: "dev0=/dev/sdr0,dev1=/dev/sdr1,dev2=/dev/sdr2,dev3=/dev/sdr3,dev4=/dev/sdr4,dev5=/dev/sdr5",
#else
args: "",
#endif
/* synchronisation source: internal, gps, external (default = internal) */
// sync: "gps",
//rx_antenna:"rx", // force to use the RX connector in TDD as RX antenna
/* PCIe jitter. decrease it to reduce latency */
fifo_tx_time: 50,
//rx_latency: 30,
},
#if 0
tx_pad_duration:300,
#endif
tx_gain: 75.0, /* TX gain (in dB) */
rx_gain: 55.0, /* RX gain (in dB) */

View File

@@ -65,9 +65,9 @@ oc-cn5g:
Host: avra
NetworkScript: echo "inet 172.21.6.102"
RunIperf3Server: False
Deploy: "! scripts/oc-cn5g-deploy.sh /opt/oai-cn5g-fed-develop-2025-jan oaicicd-core-for-ci-ran"
Undeploy: "! scripts/oc-cn5g-undeploy.sh /opt/oai-cn5g-fed-develop-2025-jan oaicicd-core-for-ci-ran"
LogCollect: "! scripts/oc-cn5g-logcollect.sh /opt/oai-cn5g-fed-develop-2025-jan oaicicd-core-for-ci-ran %%log_dir%%"
Deploy: "! scripts/oc-cn5g-deploy.sh /opt/oai-cn5g-fed-develop-2025-jun oaicicd-core-for-ci-ran"
Undeploy: "! scripts/oc-cn5g-undeploy.sh /opt/oai-cn5g-fed-develop-2025-jun oaicicd-core-for-ci-ran"
LogCollect: "! scripts/oc-cn5g-logcollect.sh /opt/oai-cn5g-fed-develop-2025-jun oaicicd-core-for-ci-ran %%log_dir%%"
oc-cn5g-20897:
Host: cacofonix
@@ -89,8 +89,8 @@ matix-cn5g:
Host: matix
NetworkScript: docker exec prod-trf-gen ip a show dev eth0
RunIperf3Server: False
Deploy: "cd /opt/oai-cn5g-fed-v2/docker-compose && python3 ./core-network.py --type start-basic"
Undeploy: "cd /opt/oai-cn5g-fed-v2/docker-compose && python3 ./core-network.py --type stop-basic"
Deploy: "cd /opt/oai-cn5g-fed-v2-jun-2025/docker-compose && python3 ./core-network.py --type start-basic"
Undeploy: "cd /opt/oai-cn5g-fed-v2-jun-2025/docker-compose && python3 ./core-network.py --type stop-basic"
LogCollect:
- "docker logs oai-smf > %%log_dir%%/oai-smf.log"
- "docker logs oai-amf > %%log_dir%%/oai-amf.log"
@@ -147,125 +147,127 @@ ltebox-nepes:
amarisoft_ue:
Host: amariue
InitScript: /root/lteue-linux-2023-10-27/ue/lteue /root/oaicicd/ran_sa_aw2s_asue/aw2s-multi-00102-20.cfg &
TermScript: /root/2023-10-27/libs/ws.js -t 10 127.0.0.1:9002 '{"message":"quit"}' || killall -KILL lteue-avx2
InitScript: /root/lteue-linux-2025-03-15/lteue /root/oaicicd/ran_sa_aw2s_asue/aw2s-multi-00102-20.cfg &
TermScript: /root/lteue-linux-2025-03-15/ws.js -t 10 127.0.0.1:9002 '{"message":"quit"}' || killall -KILL lteue-avx2
NetworkScript: ip netns exec ue1 ip a show dev pdn0
amarisoft_ue_2x2:
Host: amariue
InitScript: /root/lteue-linux-2023-10-27/ue/lteue /root/oaicicd/ran_sa_aw2s_asue_2x2/aw2s-multi-00102-2x2-v2.cfg &
TermScript: /root/2023-10-27/libs/ws.js -t 10 127.0.0.1:9002 '{"message":"quit"}' || killall -KILL lteue-avx2
InitScript: /root/lteue-linux-2025-03-15/lteue /root/oaicicd/ran_sa_aw2s_asue_2x2/aw2s-multi-00102-2x2-v2.cfg &
TermScript: /root/lteue-linux-2025-03-15/ws.js -t 10 127.0.0.1:9002 '{"message":"quit"}' || killall -KILL lteue-avx2
NetworkScript: ip netns exec ue1 ip a show dev pdn0
amarisoft_ue_fhi72:
Host: amariue
InitScript: /root/lteue-linux-2023-10-27/ue/lteue /root/oaicicd/ran_sa_fhi72_asue_2x2_benetel550/fhi72-multi-20897-2x2.cfg &
TermScript: /root/2023-10-27/libs/ws.js -t 10 127.0.0.1:9002 '{"message":"quit"}' || killall -KILL lteue-avx2
InitScript: /root/lteue-linux-2025-03-15/lteue /root/oaicicd/ran_sa_fhi72_asue_2x2_benetel550/fhi72-multi-20897-2x2.cfg &
TermScript: /root/lteue-linux-2025-03-15/ws.js -t 10 127.0.0.1:9002 '{"message":"quit"}' || killall -KILL lteue-avx2
amarisoft_ue_1:
Host: amariue
AttachScript: /root/2023-10-27/libs/ws.js 127.0.0.1:9002 '{"message":"power_on","ue_id":1}'
DetachScript: /root/2023-10-27/libs/ws.js 127.0.0.1:9002 '{"message":"power_off","ue_id":1}'
AttachScript: /root/lteue-linux-2025-03-15/ws.js 127.0.0.1:9002 '{"message":"power_on","ue_id":1}'
DetachScript: /root/lteue-linux-2025-03-15/ws.js 127.0.0.1:9002 '{"message":"power_off","ue_id":1}'
NetworkScript: ip netns exec ue1 ip a show dev pdn0
CmdPrefix: ip netns exec ue1
MTU: 1500
amarisoft_ue_2:
Host: amariue
AttachScript: /root/2023-10-27/libs/ws.js 127.0.0.1:9002 '{"message":"power_on","ue_id":2}'
DetachScript: /root/2023-10-27/libs/ws.js 127.0.0.1:9002 '{"message":"power_off","ue_id":2}'
AttachScript: /root/lteue-linux-2025-03-15/ws.js 127.0.0.1:9002 '{"message":"power_on","ue_id":2}'
DetachScript: /root/lteue-linux-2025-03-15/ws.js 127.0.0.1:9002 '{"message":"power_off","ue_id":2}'
NetworkScript: ip netns exec ue2 ip a show dev pdn0
CmdPrefix: ip netns exec ue2
MTU: 1500
amarisoft_ue_3:
Host: amariue
AttachScript: /root/2023-10-27/libs/ws.js 127.0.0.1:9002 '{"message":"power_on","ue_id":3}'
DetachScript: /root/2023-10-27/libs/ws.js 127.0.0.1:9002 '{"message":"power_off","ue_id":3}'
AttachScript: /root/lteue-linux-2025-03-15/ws.js 127.0.0.1:9002 '{"message":"power_on","ue_id":3}'
DetachScript: /root/lteue-linux-2025-03-15/ws.js 127.0.0.1:9002 '{"message":"power_off","ue_id":3}'
NetworkScript: ip netns exec ue3 ip a show dev pdn0
CmdPrefix: ip netns exec ue3
MTU: 1500
amarisoft_ue_4:
Host: amariue
AttachScript: /root/2023-10-27/libs/ws.js 127.0.0.1:9002 '{"message":"power_on","ue_id":4}'
DetachScript: /root/2023-10-27/libs/ws.js 127.0.0.1:9002 '{"message":"power_off","ue_id":4}'
AttachScript: /root/lteue-linux-2025-03-15/ws.js 127.0.0.1:9002 '{"message":"power_on","ue_id":4}'
DetachScript: /root/lteue-linux-2025-03-15/ws.js 127.0.0.1:9002 '{"message":"power_off","ue_id":4}'
NetworkScript: ip netns exec ue4 ip a show dev pdn0
CmdPrefix: ip netns exec ue4
MTU: 1500
amarisoft_ue_5:
Host: amariue
AttachScript: /root/2023-10-27/libs/ws.js 127.0.0.1:9002 '{"message":"power_on","ue_id":5}'
DetachScript: /root/2023-10-27/libs/ws.js 127.0.0.1:9002 '{"message":"power_off","ue_id":5}'
AttachScript: /root/lteue-linux-2025-03-15/ws.js 127.0.0.1:9002 '{"message":"power_on","ue_id":5}'
DetachScript: /root/lteue-linux-2025-03-15/ws.js 127.0.0.1:9002 '{"message":"power_off","ue_id":5}'
NetworkScript: ip netns exec ue5 ip a show dev pdn0
CmdPrefix: ip netns exec ue5
MTU: 1500
amarisoft_ue_6:
Host: amariue
AttachScript: /root/2023-10-27/libs/ws.js 127.0.0.1:9002 '{"message":"power_on","ue_id":6}'
DetachScript: /root/2023-10-27/libs/ws.js 127.0.0.1:9002 '{"message":"power_off","ue_id":6}'
AttachScript: /root/lteue-linux-2025-03-15/ws.js 127.0.0.1:9002 '{"message":"power_on","ue_id":6}'
DetachScript: /root/lteue-linux-2025-03-15/ws.js 127.0.0.1:9002 '{"message":"power_off","ue_id":6}'
NetworkScript: ip netns exec ue6 ip a show dev pdn0
CmdPrefix: ip netns exec ue6
MTU: 1500
amarisoft_ue_7:
Host: amariue
AttachScript: /root/2023-10-27/libs/ws.js 127.0.0.1:9002 '{"message":"power_on","ue_id":7}'
DetachScript: /root/2023-10-27/libs/ws.js 127.0.0.1:9002 '{"message":"power_off","ue_id":7}'
AttachScript: /root/lteue-linux-2025-03-15/ws.js 127.0.0.1:9002 '{"message":"power_on","ue_id":7}'
DetachScript: /root/lteue-linux-2025-03-15/ws.js 127.0.0.1:9002 '{"message":"power_off","ue_id":7}'
NetworkScript: ip netns exec ue7 ip a show dev pdn0
CmdPrefix: ip netns exec ue7
MTU: 1500
amarisoft_ue_8:
Host: amariue
AttachScript: /root/2023-10-27/libs/ws.js 127.0.0.1:9002 '{"message":"power_on","ue_id":8}'
DetachScript: /root/2023-10-27/libs/ws.js 127.0.0.1:9002 '{"message":"power_off","ue_id":8}'
AttachScript: /root/lteue-linux-2025-03-15/ws.js 127.0.0.1:9002 '{"message":"power_on","ue_id":8}'
DetachScript: /root/lteue-linux-2025-03-15/ws.js 127.0.0.1:9002 '{"message":"power_off","ue_id":8}'
NetworkScript: ip netns exec ue8 ip a show dev pdn0
CmdPrefix: ip netns exec ue8
MTU: 1500
amarisoft_ue_9:
Host: amariue
AttachScript: /root/2023-10-27/libs/ws.js 127.0.0.1:9002 '{"message":"power_on","ue_id":9}'
DetachScript: /root/2023-10-27/libs/ws.js 127.0.0.1:9002 '{"message":"power_off","ue_id":9}'
AttachScript: /root/lteue-linux-2025-03-15/ws.js 127.0.0.1:9002 '{"message":"power_on","ue_id":9}'
DetachScript: /root/lteue-linux-2025-03-15/ws.js 127.0.0.1:9002 '{"message":"power_off","ue_id":9}'
NetworkScript: ip netns exec ue9 ip a show dev pdn0
CmdPrefix: ip netns exec ue9
MTU: 1500
amarisoft_ue_10:
Host: amariue
AttachScript: /root/2023-10-27/libs/ws.js 127.0.0.1:9002 '{"message":"power_on","ue_id":10}'
DetachScript: /root/2023-10-27/libs/ws.js 127.0.0.1:9002 '{"message":"power_off","ue_id":10}'
AttachScript: /root/lteue-linux-2025-03-15/ws.js 127.0.0.1:9002 '{"message":"power_on","ue_id":10}'
DetachScript: /root/lteue-linux-2025-03-15/ws.js 127.0.0.1:9002 '{"message":"power_off","ue_id":10}'
NetworkScript: ip netns exec ue10 ip a show dev pdn0
CmdPrefix: ip netns exec ue10
MTU: 1500
amarisoft_ue_11:
Host: amariue
AttachScript: /root/2023-10-27/libs/ws.js 127.0.0.1:9002 '{"message":"power_on","ue_id":11}'
DetachScript: /root/2023-10-27/libs/ws.js 127.0.0.1:9002 '{"message":"power_off","ue_id":11}'
AttachScript: /root/lteue-linux-2025-03-15/ws.js 127.0.0.1:9002 '{"message":"power_on","ue_id":11}'
DetachScript: /root/lteue-linux-2025-03-15/ws.js 127.0.0.1:9002 '{"message":"power_off","ue_id":11}'
NetworkScript: ip netns exec ue11 ip a show dev pdn0
CmdPrefix: ip netns exec ue11
MTU: 1500
amarisoft_ue_12:
Host: amariue
AttachScript: /root/2023-10-27/libs/ws.js 127.0.0.1:9002 '{"message":"power_on","ue_id":12}'
DetachScript: /root/2023-10-27/libs/ws.js 127.0.0.1:9002 '{"message":"power_off","ue_id":12}'
AttachScript: /root/lteue-linux-2025-03-15/ws.js 127.0.0.1:9002 '{"message":"power_on","ue_id":12}'
DetachScript: /root/lteue-linux-2025-03-15/ws.js 127.0.0.1:9002 '{"message":"power_off","ue_id":12}'
NetworkScript: ip netns exec ue12 ip a show dev pdn0
CmdPrefix: ip netns exec ue12
MTU: 1500
amarisoft_ue_13:
Host: amariue
AttachScript: /root/2023-10-27/libs/ws.js 127.0.0.1:9002 '{"message":"power_on","ue_id":13}'
DetachScript: /root/2023-10-27/libs/ws.js 127.0.0.1:9002 '{"message":"power_off","ue_id":13}'
AttachScript: /root/lteue-linux-2025-03-15/ws.js 127.0.0.1:9002 '{"message":"power_on","ue_id":13}'
DetachScript: /root/lteue-linux-2025-03-15/ws.js 127.0.0.1:9002 '{"message":"power_off","ue_id":13}'
NetworkScript: ip netns exec ue13 ip a show dev pdn0
CmdPrefix: ip netns exec ue13
MTU: 1500
amarisoft_ue_14:
Host: amariue
AttachScript: /root/2023-10-27/libs/ws.js 127.0.0.1:9002 '{"message":"power_on","ue_id":14}'
DetachScript: /root/2023-10-27/libs/ws.js 127.0.0.1:9002 '{"message":"power_off","ue_id":14}'
AttachScript: /root/lteue-linux-2025-03-15/ws.js 127.0.0.1:9002 '{"message":"power_on","ue_id":14}'
DetachScript: /root/lteue-linux-2025-03-15/ws.js 127.0.0.1:9002 '{"message":"power_off","ue_id":14}'
NetworkScript: ip netns exec ue14 ip a show dev pdn0
CmdPrefix: ip netns exec ue14
MTU: 1500
amarisoft_ue_15:
Host: amariue
AttachScript: /root/2023-10-27/libs/ws.js 127.0.0.1:9002 '{"message":"power_on","ue_id":15}'
DetachScript: /root/2023-10-27/libs/ws.js 127.0.0.1:9002 '{"message":"power_off","ue_id":15}'
AttachScript: /root/lteue-linux-2025-03-15/ws.js 127.0.0.1:9002 '{"message":"power_on","ue_id":15}'
DetachScript: /root/lteue-linux-2025-03-15/ws.js 127.0.0.1:9002 '{"message":"power_off","ue_id":15}'
NetworkScript: ip netns exec ue15 ip a show dev pdn0
CmdPrefix: ip netns exec ue15
MTU: 1500
amarisoft_ue_16:
Host: amariue
AttachScript: /root/2023-10-27/libs/ws.js 127.0.0.1:9002 '{"message":"power_on","ue_id":16}'
DetachScript: /root/2023-10-27/libs/ws.js 127.0.0.1:9002 '{"message":"power_off","ue_id":16}'
AttachScript: /root/lteue-linux-2025-03-15/ws.js 127.0.0.1:9002 '{"message":"power_on","ue_id":16}'
DetachScript: /root/lteue-linux-2025-03-15/ws.js 127.0.0.1:9002 '{"message":"power_off","ue_id":16}'
NetworkScript: ip netns exec ue16 ip a show dev pdn0
CmdPrefix: ip netns exec ue16
MTU: 1500

View File

@@ -152,19 +152,6 @@ def GetImageName(ssh, svcName, file):
else:
return ret.stdout.strip()
def GetServiceHealth(ssh, svcName, file):
if svcName is None:
return False, f"Service {svcName} not found in {file}"
image = GetImageName(ssh, svcName, file)
if 'db_init' in svcName or 'db-init' in svcName: # exits with 0, there cannot be healthy
return True, f"Service {svcName} healthy, image {image}"
for _ in range(8):
result = ssh.run(f"docker compose -f {file} ps --format json {svcName} | jq -r 'if type==\"array\" then .[0].Health else .Health end'", silent=True)
if result.stdout == 'healthy':
return True, f"Service {svcName} healthy, image {image}"
time.sleep(5)
return False, f"Failed to deploy: service {svcName}"
def ExistEnvFilePrint(ssh, wd, prompt='env vars in existing'):
ret = ssh.run(f'cat {wd}/.env', silent=True, reportNonZero=False)
if ret.returncode != 0:
@@ -311,7 +298,6 @@ class Containerize():
self.yamlPath = ['', '', '']
self.services = ['', '', '']
self.deploymentTag = ''
self.eNB_logFile = ['', '', '']
self.testCase_id = ''
@@ -320,17 +306,6 @@ class Containerize():
self.dockerfileprefix = ''
self.host = ''
self.deployedContainers = []
self.tsharkStarted = False
self.pingContName = ''
self.pingOptions = ''
self.pingLossThreshold = ''
self.svrContName = ''
self.svrOptions = ''
self.cliContName = ''
self.cliOptions = ''
self.imageToCopy = ''
#checkers from xml
self.ran_checkers={}
self.num_attempts = 1
@@ -498,10 +473,10 @@ class Containerize():
elif image != 'ran-build':
cmd.run(f'sed -i -e "s#ran-build:latest#ran-build:{imageTag}#" docker/Dockerfile.{pattern}{self.dockerfileprefix}')
if image == 'oai-gnb-aerial':
cmd.run('cp -f /opt/nvidia-ipc/nvipc_src.*.tar.gz .')
cmd.run('cp -f /opt/nvidia-ipc/nvipc.src.2025.05.20.tar.gz .')
ret = cmd.run(f'{self.cli} build {self.cliBuildOptions} --target {image} --tag {name}:{imageTag} --file docker/Dockerfile.{pattern}{self.dockerfileprefix} {option} . > cmake_targets/log/{name}.log 2>&1', timeout=1200)
if image == 'oai-gnb-aerial':
cmd.run('rm -f nvipc_src.*.tar.gz')
cmd.run('rm -f nvipc.src.2025.05.20.tar.gz')
if image == 'ran-build' and ret.returncode == 0:
cmd.run(f"docker run --name test-log -d {name}:{imageTag} /bin/true")
cmd.run(f"docker cp test-log:/oai-ran/cmake_targets/log/ cmake_targets/log/{name}/")
@@ -712,7 +687,7 @@ class Containerize():
HTML.CreateHtmlTestRowQueue("Build unit tests", 'OK', [dockerfile])
# it worked, build and execute tests, and close connection
ret = cmd.run(f'docker run -a STDOUT --workdir /oai-ran/build/ --env LD_LIBRARY_PATH=/oai-ran/build/ --rm ran-unittests:{baseTag} ctest --output-on-failure --no-label-summary -j$(nproc)')
ret = cmd.run(f'docker run -a STDOUT --workdir /oai-ran/build/ --env LD_LIBRARY_PATH=/oai-ran/build/ --rm ran-unittests:{baseTag} ctest --no-label-summary -j$(nproc)')
cmd.run(f'docker rmi ran-unittests:{baseTag}')
build_log_name = f'build_log_{self.testCase_id}'
CopyLogsToExecutor(cmd, lSourcePath, build_log_name)
@@ -872,31 +847,24 @@ class Containerize():
if num_attempts <= 0:
raise ValueError(f'Invalid value for num_attempts: {num_attempts}, must be greater than 0')
for attempt in range(num_attempts):
imagesInfo = []
healthInfo = []
logging.info(f'will start services {services}')
status = ssh.run(f'docker compose -f {wd_yaml} up -d -- {services}')
if status.returncode != 0:
status = ssh.run(f'docker compose -f {wd_yaml} up -d --wait --wait-timeout 60 -- {services}')
info = ssh.run(f"docker compose -f {wd_yaml} ps --all --format=\'table {{{{.Service}}}} [{{{{.Image}}}}] {{{{.Status}}}}\' -- {services} | column -t")
deployed = status.returncode == 0
if not deployed:
msg = f'cannot deploy services {services}: {status.stdout}'
logging.error(msg)
HTML.CreateHtmlTestRowQueue('N/A', 'NOK', [msg])
return False
for svc in services.split():
health, msg = GetServiceHealth(ssh, svc, f'{wd_yaml}')
logging.info(msg)
imagesInfo.append(msg)
healthInfo.append(health)
deployed = all(healthInfo)
if deployed:
else:
break
elif (attempt < num_attempts - 1):
warning_msg = f'Restart services {services}'
if (attempt < num_attempts - 1):
warning_msg = (f'Failed to deploy on attempt {attempt}, restart services {services}')
logging.warning(warning_msg)
imagesInfo.append(warning_msg)
HTML.CreateHtmlTestRowQueue('N/A', 'NOK', ['\n'.join(imagesInfo)])
HTML.CreateHtmlTestRowQueue('N/A', 'NOK', [warning_msg])
for svc in services.split():
CopyinServiceLog(ssh, lSourcePath, yaml_dir, svc, wd_yaml, f'{svc}-{HTML.testCase_id}-attempt{attempt}.log')
ssh.run(f'docker compose -f {wd_yaml} down -- {services}')
imagesInfo = info.stdout.splitlines()[1:]
logging.debug(f'{info.stdout.splitlines()[1:]}')
if deployed:
HTML.CreateHtmlTestRowQueue('N/A', 'OK', ['\n'.join(imagesInfo)])
else:

View File

@@ -224,7 +224,6 @@ class HTMLManagement():
self.htmlFile.write(' </table>\n')
self.htmlFile.write(' </div>\n')
self.htmlFile.close()
time.sleep(1)
if passStatus:
cmd = "sed -i -e 's/__STATE_" + self.htmlTabNames[0] + "__//' test_results.html"
subprocess.run(cmd, shell=True)

View File

@@ -213,7 +213,7 @@ def Iperf_analyzeV2UDP(server_filename, iperf_bitrate_threshold, iperf_packetlos
pal_msg += f' (too high! >{iperf_packetloss_threshold}%)'
return (result, f'{req_msg}\n{bir_msg}\n{brl_msg}\n{jit_msg}\n{pal_msg}')
def Custom_Command(HTML, node, command, command_fail):
def Custom_Command(HTML, node, command):
logging.info(f"Executing custom command on {node}")
cmd = cls_cmd.getConnection(node)
ret = cmd.run(command)
@@ -221,26 +221,20 @@ def Custom_Command(HTML, node, command, command_fail):
logging.debug(f"Custom_Command: {command} on node: {node} - {'OK, command succeeded' if ret.returncode == 0 else f'Error, return code: {ret.returncode}'}")
status = 'OK'
message = []
if ret.returncode != 0 and not command_fail:
message = [ret.stdout]
logging.warning(f'Custom_Command output: {message}')
status = 'Warning'
if ret.returncode != 0 and command_fail:
if ret.returncode != 0:
message = [ret.stdout]
logging.error(f'Custom_Command failed: output: {message}')
status = 'KO'
HTML.CreateHtmlTestRowQueue(command, status, message)
return status == 'OK' or status == 'Warning'
def Custom_Script(HTML, node, script, command_fail):
def Custom_Script(HTML, node, script):
logging.info(f"Executing custom script on {node}")
ret = cls_cmd.runScript(node, script, 90)
logging.debug(f"Custom_Script: {script} on node: {node} - return code {ret.returncode}, output:\n{ret.stdout}")
status = 'OK'
message = [ret.stdout]
if ret.returncode != 0 and not command_fail:
status = 'Warning'
if ret.returncode != 0 and command_fail:
if ret.returncode != 0:
status = 'KO'
HTML.CreateHtmlTestRowQueue(script, status, message)
return status == 'OK' or status == 'Warning'

View File

@@ -58,6 +58,14 @@ gNBs =
}
);
pdcp = {
drb = {
sn_size = "len18bits"
t_reordering = "ms100"
discard_timer = "infinity"
}
}
security = {
# preferred ciphering algorithms
# the first one of the list that an UE supports in chosen

View File

@@ -163,6 +163,31 @@ gNBs =
}
);
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"
}
}
MACRLCs = (
{
num_cc = 1;

View File

@@ -169,10 +169,10 @@ gNBs =
NETWORK_INTERFACES :
{
GNB_IPV4_ADDRESS_FOR_S1_MME = "192.168.68.194";
GNB_IPV4_ADDRESS_FOR_S1U = "192.168.68.194";
GNB_IPV4_ADDRESS_FOR_S1_MME = "172.21.16.109";
GNB_IPV4_ADDRESS_FOR_S1U = "172.21.16.109";
GNB_PORT_FOR_S1U = 2152; # Spec 2152
GNB_IPV4_ADDRESS_FOR_X2C = "192.168.68.194";
GNB_IPV4_ADDRESS_FOR_X2C = "172.21.16.109";
GNB_PORT_FOR_X2C = 36422; # Spec 36422
};

View File

@@ -149,6 +149,8 @@ gNBs =
#ext2
#ntn_Config_r17
# This can be of values {s5, s10, s15, s20, s25, s30, s35, s40, s45, s50, s55, s60, s120, s180, s240, s900}
ntn-UlSyncValidityDuration-r17 = 240;
cellSpecificKoffset_r17 = 478;
ta-Common-r17 = 58629666; # 238.74 ms
positionX-r17 = 0;
@@ -193,6 +195,15 @@ gNBs =
}
);
rlc = {
srb = {
t_poll_retransmit = "ms2000"
}
drb_am = {
t_poll_retransmit = "ms2000"
}
}
MACRLCs = (
{
num_cc = 1;

View File

@@ -21,7 +21,6 @@ gNBs =
sib1_tda = 15;
min_rxtxtime = 6;
beam_weights = [0]; // single SSB -> one analog beam
servingCellConfigCommon = (
{
@@ -179,6 +178,7 @@ MACRLCs = ({
set_analog_beamforming = 1;
beam_duration = 1;
beams_per_period = 1;
beam_weights = [0]; // single SSB -> one analog beam
});
L1s = (

View File

@@ -213,7 +213,7 @@ security = {
# preferred ciphering algorithms
# the first one of the list that an UE supports in chosen
# valid values: nea0, nea1, nea2, nea3
ciphering_algorithms = ( "nea0" );
ciphering_algorithms = ( "nea2", "nea0" );
# preferred integrity algorithms
# the first one of the list that an UE supports in chosen
@@ -223,7 +223,7 @@ security = {
# setting 'drb_ciphering' to "no" disables ciphering for DRBs, no matter
# what 'ciphering_algorithms' configures; same thing for 'drb_integrity'
drb_ciphering = "yes";
drb_integrity = "no";
drb_integrity = "yes";
};
log_config :

View File

@@ -212,7 +212,7 @@ security = {
# preferred ciphering algorithms
# the first one of the list that an UE supports in chosen
# valid values: nea0, nea1, nea2, nea3
ciphering_algorithms = ( "nea0" );
ciphering_algorithms = ( "nea2", "nea0" );
# preferred integrity algorithms
# the first one of the list that an UE supports in chosen
@@ -222,7 +222,7 @@ security = {
# setting 'drb_ciphering' to "no" disables ciphering for DRBs, no matter
# what 'ciphering_algorithms' configures; same thing for 'drb_integrity'
drb_ciphering = "yes";
drb_integrity = "no";
drb_integrity = "yes";
};
log_config :

View File

@@ -185,6 +185,7 @@ L1s = (
num_cc = 1;
tr_n_preference = "local_mac";
prach_dtx_threshold = 120;
tx_amp_backoff_dB = 30;
}
);

View File

@@ -19,6 +19,9 @@ Ref :
DL & UL scheduling timing : 17.0
UL Indication : 1.0
Slot Indication : 13.0
feprx : 151.0
feptx_ofdm (per port, half_slot) : 57
feptx_total : 148
DeviationThreshold :
feprx : 0.25
feptx_prec : 0.25
@@ -32,3 +35,6 @@ DeviationThreshold :
DL & UL scheduling timing : 0.25
UL Indication : 1.00
Slot Indication : 0.50
feprx : 0.25
feptx_ofdm (per port, half_slot) : 0.25
feptx_total : 0.25

View File

@@ -19,6 +19,9 @@ Ref :
DL & UL scheduling timing : 5.0
UL Indication : 1.0
Slot Indication : 6.0
feprx : 44.0
feptx_ofdm (per port, half_slot) : 31
feptx_total : 58
DeviationThreshold :
feprx : 0.25
feptx_prec : 0.25
@@ -32,3 +35,6 @@ DeviationThreshold :
DL & UL scheduling timing : 0.50
UL Indication : 1.00
Slot Indication : 0.50
feprx : 0.25
feptx_ofdm (per port, half_slot) : 0.25
feptx_total : 0.25

View File

@@ -19,6 +19,9 @@ Ref :
DL & UL scheduling timing : 8.0
UL Indication : 3.0
Slot Indication : 9.0
feprx : 85.0
feptx_ofdm (per port, half_slot) : 31
feptx_total : 92
DeviationThreshold :
feprx : 0.25
feptx_prec : 0.25
@@ -32,3 +35,6 @@ DeviationThreshold :
DL & UL scheduling timing : 0.35
UL Indication : 1.00
Slot Indication : 0.35
feprx : 0.25
feptx_ofdm (per port, half_slot) : 0.25
feptx_total : 0.25

View File

@@ -19,6 +19,9 @@ Ref :
DL & UL scheduling timing : 4.0
UL Indication : 2.0
Slot Indication : 5.0
feprx : 43.0
feptx_ofdm (per port, half_slot) : 30
feptx_total : 57
DeviationThreshold :
feprx : 0.25
feptx_prec : 0.25
@@ -32,3 +35,6 @@ DeviationThreshold :
DL & UL scheduling timing : 0.50
UL Indication : 1.00
Slot Indication : 0.50
feprx : 0.25
feptx_ofdm (per port, half_slot) : 0.25
feptx_total : 0.25

View File

@@ -376,14 +376,12 @@ def ExecuteActionWithParam(action):
# Change all execution targets to localhost
node = 'localhost'
command = test.findtext('command')
command_fail = test.findtext('command_fail') in ['True', 'true', 'Yes', 'yes']
success = cls_oaicitest.Custom_Command(HTML, node, command, command_fail)
success = cls_oaicitest.Custom_Command(HTML, node, command)
elif action == 'Custom_Script':
node = test.findtext('node')
script = test.findtext('script')
command_fail = test.findtext('command_fail') in ['True', 'true', 'Yes', 'yes']
success = cls_oaicitest.Custom_Script(HTML, node, script, command_fail)
success = cls_oaicitest.Custom_Script(HTML, node, script)
elif action == 'Pull_Cluster_Image':
tag_prefix = test.findtext('tag_prefix') or ""
@@ -626,6 +624,7 @@ elif re.match('^TesteNB$', mode, re.IGNORECASE) or re.match('^TestUE$', mode, re
HTML.testCase_id=CiTestObj.testCase_id
CiTestObj.desc = test.findtext('desc')
always_exec = test.findtext('always_exec') in ['True', 'true', 'Yes', 'yes']
may_fail = test.findtext('may_fail') in ['True', 'true', 'Yes', 'yes']
HTML.desc=CiTestObj.desc
action = test.findtext('class')
if (CheckClassValidity(xml_class_list, action, id) == False):
@@ -639,7 +638,9 @@ elif re.match('^TesteNB$', mode, re.IGNORECASE) or re.match('^TestUE$', mode, re
break
try:
test_succeeded = ExecuteActionWithParam(action)
if not test_succeeded:
if not test_succeeded and may_fail:
logging.warning(f"test ID {test_case_id} action {action} may or may not fail, proceeding despite error")
elif not test_succeeded:
logging.error(f"test ID {test_case_id} action {action} failed ({test_succeeded}), skipping next tests")
task_set_succeeded = False
except Exception as e:

View File

@@ -95,7 +95,6 @@ class RANManagement():
self.cmd_prefix = '' # prefix before {lte,nr}-softmodem
self.node = ''
self.command = ''
self.command_fail = False
#-----------------------------------------------------------

View File

@@ -27,6 +27,8 @@
<htmlTabIcon>wrench</htmlTabIcon>
<TestCaseRequestedList>
000001
000011
000012
000002
000003
000004
@@ -38,7 +40,21 @@
<desc>This should succeed</desc>
<node>localhost</node>
<command>true</command>
<command_fail>yes</command_fail>
</testCase>
<testCase id="000011">
<class>Custom_Command</class>
<desc>This may fail</desc>
<may_fail>true</may_fail>
<node>localhost</node>
<command>false</command>
</testCase>
<testCase id="000012">
<class>Custom_Command</class>
<desc>This is still executed</desc>
<node>localhost</node>
<command>true</command>
</testCase>
<testCase id="000002">
@@ -46,7 +62,6 @@
<desc>This should fail</desc>
<node>localhost</node>
<command>false</command>
<command_fail>yes</command_fail>
</testCase>
<testCase id="000003">
@@ -54,7 +69,6 @@
<desc>This should be skipped</desc>
<node>localhost</node>
<command>true</command>
<command_fail>yes</command_fail>
</testCase>
<testCase id="000004">
@@ -63,6 +77,5 @@
<always_exec>true</always_exec>
<node>localhost</node>
<command>true</command>
<command_fail>yes</command_fail>
</testCase>
</testCaseList>

View File

@@ -134,7 +134,6 @@
<desc>Simulate a DL radio channel with noise (3 dB)</desc>
<node>cacofonix</node>
<command>echo channelmod modify 0 noise_power_dB 3 | nc --send-only 192.168.71.181 8091</command>
<command_fail>yes</command_fail>
</testCase>
<testCase id="030021">
@@ -166,7 +165,6 @@
<desc>Trigger Reestablishment</desc>
<node>cacofonix</node>
<command>echo ci force_reestab | nc 192.168.71.171 9090 | grep -E 'Reset RLC counters of UE RNTI [0-9a-f]{4} to trigger reestablishment'</command>
<command_fail>yes</command_fail>
</testCase>
<testCase id="020022">
@@ -185,7 +183,6 @@
<desc>Verify Reestablishment</desc>
<node>cacofonix</node>
<command>echo ci get_reestab_count | nc 192.168.71.150 9090 | grep -E 'UE RNTI [0-9a-f]{4} reestab 1'</command>
<command_fail>yes</command_fail>
</testCase>
<testCase id="040021">
@@ -193,7 +190,6 @@
<desc>Simulate a disruption of DL radio channel (ploss 55)</desc>
<node>cacofonix</node>
<command>echo channelmod modify 0 ploss 55 | nc 192.168.71.181 8091</command>
<command_fail>yes</command_fail>
</testCase>
<testCase id="040022">
@@ -201,7 +197,6 @@
<desc>Get UE sync state (UE ID 0)</desc>
<node>cacofonix</node>
<command>echo ciUE sync_state 0 | nc 192.168.71.181 8091 | grep -E UE_NOT_SYNC</command>
<command_fail>yes</command_fail>
</testCase>
<testCase id="040023">
@@ -209,7 +204,6 @@
<desc>Restoration of the original DL channel conditions (ploss 20)</desc>
<node>cacofonix</node>
<command>echo channelmod modify 0 ploss 20 | nc 192.168.71.181 8091</command>
<command_fail>yes</command_fail>
</testCase>
<testCase id="040024">
@@ -217,7 +211,6 @@
<desc>Get UE sync state (UE ID 0)</desc>
<node>cacofonix</node>
<command>echo ciUE sync_state 0 | nc 192.168.71.181 8091 | grep -E UE_CONNECTED</command>
<command_fail>yes</command_fail>
</testCase>
<testCase id="040025">
@@ -225,7 +218,6 @@
<desc>Trigger Handover</desc>
<node>cacofonix</node>
<command>echo ci trigger_f1_ho | nc 192.168.71.150 9090</command>
<command_fail>yes</command_fail>
</testCase>
<testCase id="040026">
@@ -233,7 +225,6 @@
<desc>UE (1) connected to DU-PCI 0?</desc>
<node>cacofonix</node>
<command>echo ci fetch_du_by_ue_id 1 | nc 192.168.71.150 9090 | grep "3584"</command>
<command_fail>yes</command_fail>
</testCase>
<testCase id="040027">
@@ -241,7 +232,6 @@
<desc>UE (1) connected to DU-PCI 1?</desc>
<node>cacofonix</node>
<command>echo ci fetch_du_by_ue_id 1 | nc 192.168.71.150 9090 | grep "3585"</command>
<command_fail>yes</command_fail>
</testCase>
<testCase id="100021">

View File

@@ -32,7 +32,6 @@
000001
000002
000003
002001
010000
000004
333333
@@ -40,7 +39,6 @@
010002
010003
020005
010013
002006
444444
100002
@@ -50,12 +48,6 @@
</TestCaseRequestedList>
<TestCaseExclusionList></TestCaseExclusionList>
<testCase id="002001">
<class>IdleSleep</class>
<desc>Sleep</desc>
<idle_sleep_time_in_sec>10</idle_sleep_time_in_sec>
</testCase>
<testCase id="111110">
<class>Pull_Local_Registry</class>
<desc>Pull Images from Local Registry</desc>
@@ -173,43 +165,39 @@
</testCase>
<testCase id="010000">
<class>Custom_Command</class>
<class>Deploy_Object</class>
<desc>RC monitoring</desc>
<node>localhost</node>
<command_fail>yes</command_fail>
<command>docker exec oai-flexric bash -c "stdbuf -o0 /usr/local/flexric/xApp/c/monitor/xapp_rc_moni" > ../cmake_targets/log/5g_rfsimulator_flexric/rc-moni-010000.log</command>
<yaml_path>ci-scripts/yaml_files/5g_rfsimulator_flexric</yaml_path>
<services>xapp-rc-moni</services>
<eNB_instance>0</eNB_instance>
<eNB_serverId>0</eNB_serverId>
</testCase>
<testCase id="010001">
<class>Custom_Command</class>
<class>Deploy_Object</class>
<desc>KPM monitoring</desc>
<node>localhost</node>
<command_fail>yes</command_fail>
<command>docker exec oai-flexric bash -c "stdbuf -o0 /usr/local/flexric/xApp/c/monitor/xapp_kpm_moni" > ../cmake_targets/log/5g_rfsimulator_flexric/kpm-moni-010001.log</command>
<yaml_path>ci-scripts/yaml_files/5g_rfsimulator_flexric</yaml_path>
<services>xapp-kpm-moni</services>
<eNB_instance>0</eNB_instance>
<eNB_serverId>0</eNB_serverId>
</testCase>
<testCase id="010002">
<class>Custom_Command</class>
<class>Deploy_Object</class>
<desc>KPM monitoring and RC control</desc>
<node>localhost</node>
<command_fail>yes</command_fail>
<command>docker exec oai-flexric bash -c "stdbuf -o0 /usr/local/flexric/xApp/c/kpm_rc/xapp_kpm_rc" > ../cmake_targets/log/5g_rfsimulator_flexric/kpm_rc-010002.log</command>
<yaml_path>ci-scripts/yaml_files/5g_rfsimulator_flexric</yaml_path>
<services>xapp-kpm-rc</services>
<eNB_instance>0</eNB_instance>
<eNB_serverId>0</eNB_serverId>
</testCase>
<testCase id="010003">
<class>Custom_Command</class>
<class>Deploy_Object</class>
<desc>Custom SMs monitoring</desc>
<node>localhost</node>
<command_fail>yes</command_fail>
<command>docker exec oai-flexric bash -c "stdbuf -o0 /usr/local/flexric/xApp/c/monitor/xapp_gtp_mac_rlc_pdcp_moni" > ../cmake_targets/log/5g_rfsimulator_flexric/sms-moni-010003.log</command>
</testCase>
<testCase id="010013">
<class>Custom_Command</class>
<desc>Custom SMs monitoring</desc>
<node>localhost</node>
<command_fail>yes</command_fail>
<command>docker exec oai-flexric bash -c "stdbuf -o0 /usr/local/flexric/xApp/c/monitor/xapp_gtp_mac_rlc_pdcp_moni" > ../cmake_targets/log/5g_rfsimulator_flexric/sms-moni-010013.log</command>
<yaml_path>ci-scripts/yaml_files/5g_rfsimulator_flexric</yaml_path>
<services>xapp-gtp-mac-rlc-pdcp-moni</services>
<eNB_instance>0</eNB_instance>
<eNB_serverId>0</eNB_serverId>
</testCase>
</testCaseList>

View File

@@ -242,7 +242,7 @@
<testCase id="444445">
<class>Detach_UE</class>
<desc>Detach OAI UE 2 to 10</desc>
<desc>Detach OAI UE 3 to 10</desc>
<id>rfsim5g_ue3 rfsim5g_ue4 rfsim5g_ue5 rfsim5g_ue6 rfsim5g_ue7 rfsim5g_ue8 rfsim5g_ue9 rfsim5g_ue10</id>
<nodes>cacofonix cacofonix cacofonix cacofonix cacofonix cacofonix cacofonix cacofonix</nodes>
</testCase>

View File

@@ -151,7 +151,6 @@
<desc>Force Msg3 C-RNTI RA</desc>
<node>cacofonix</node>
<command>echo ciUE force_crnti_ra | nc 192.168.71.150 8091</command>
<command_fail>yes</command_fail>
</testCase>
<testCase id="040002">
@@ -159,7 +158,6 @@
<desc>Force RRC_IDLE (UE ID 0)</desc>
<node>cacofonix</node>
<command>echo ciUE force_RRC_IDLE | nc 192.168.71.150 8091</command>
<command_fail>yes</command_fail>
</testCase>
<testCase id="100001">

View File

@@ -29,6 +29,7 @@
800813
000000
000001
000013
020001
020002
100001
@@ -68,6 +69,13 @@
<eNB_serverId>0</eNB_serverId>
</testCase>
<testCase id="000013">
<class>Attach_UE</class>
<desc>Attach OAI UE (Wait for IP)</desc>
<id>rfsim5g_ue</id>
<nodes>cacofonix</nodes>
</testCase>
<testCase id="020001">
<class>Ping</class>
<desc>Ping ext-dn from NR-UE</desc>

View File

@@ -33,6 +33,11 @@
000003
020001
020002
040001
020022
040002
020001
020002
100001
222222
</TestCaseRequestedList>
@@ -98,6 +103,33 @@
<ping_packetloss_threshold>5</ping_packetloss_threshold>
</testCase>
<testCase id="040001">
<class>Custom_Command</class>
<desc>Trigger Reestablishment</desc>
<node>cacofonix</node>
<command>echo ci force_reestab | nc 192.168.71.140 9090 | grep -E 'Reset RLC counters of UE RNTI [0-9a-f]{4} to trigger reestablishment'</command>
<command_fail>yes</command_fail>
</testCase>
<testCase id="020022">
<class>Ping</class>
<desc>Ping ext-dn from NR-UE</desc>
<id>rfsim5g_ue</id>
<nodes>cacofonix</nodes>
<svr_id>rfsim5g_ext_dn</svr_id>
<svr_node>cacofonix</svr_node>
<ping_args>-c 20 -i0.5 -w25</ping_args>
<ping_packetloss_threshold>80</ping_packetloss_threshold>
</testCase>
<testCase id="040002">
<class>Custom_Command</class>
<desc>Verify Reestablishment</desc>
<node>cacofonix</node>
<command>echo ci get_reestab_count | nc 192.168.71.140 9090 | grep -E 'UE RNTI [0-9a-f]{4} reestab 1'</command>
<command_fail>yes</command_fail>
</testCase>
<testCase id="100001">
<class>Undeploy_Object</class>
<always_exec>true</always_exec>

View File

@@ -79,7 +79,6 @@
<desc>Check that UE synched</desc>
<node>cacofonix</node>
<command>docker logs rfsim5g-oai-nr-ue-2 | grep -m 1 "PSBCH RX:OK"</command>
<command_fail>yes</command_fail>
</testCase>
<testCase id="100001">

View File

@@ -108,14 +108,6 @@
<eNB_serverId>0</eNB_serverId>
</testCase>
<testCase id="004000">
<class>Custom_Command</class>
<always_exec>true</always_exec>
<desc>Clean-Up any residual volume</desc>
<node>cacofonix</node>
<command>docker volume rm 5g_rfsimulator_tdd_dora_rrc.config</command>
</testCase>
<testCase id="222222">
<class>Clean_Test_Server_Images</class>
<always_exec>true</always_exec>

View File

@@ -70,9 +70,9 @@
<testCase id = "100000">
<class>Custom_Command</class>
<desc>Reset USRP</desc>
<desc>Reset USRP on nepes</desc>
<node>nepes</node>
<command>sudo -S /usr/lib/uhd/utils/b2xx_fx3_utils --reset-device</command>
<command>sudo -S /usr/local/lib/uhd/utils/b2xx_fx3_utils --reset-device</command>
</testCase>
<testCase id="200000">

View File

@@ -182,7 +182,7 @@
<testCase id="100010">
<class>Iperf</class>
<desc>iperf (DL/3Mbps/UDP)(30 sec)(multi-ue profile)</desc>
<desc>iperf (DL/3Mbps/UDP)(30 sec)</desc>
<iperf_args>-u -b 45M -t 30 -R</iperf_args>
<id>amarisoft_ue_1 amarisoft_ue_2 amarisoft_ue_3 amarisoft_ue_4 amarisoft_ue_5 amarisoft_ue_6 amarisoft_ue_7 amarisoft_ue_8 amarisoft_ue_9 amarisoft_ue_10 amarisoft_ue_11 amarisoft_ue_12 amarisoft_ue_13 amarisoft_ue_14 amarisoft_ue_15</id>
<iperf_packetloss_threshold>25</iperf_packetloss_threshold>
@@ -193,7 +193,7 @@
<testCase id="100030">
<class>Iperf</class>
<desc>iperf (DL/TCP)(30 sec)(multi-ue profile)</desc>
<desc>iperf (DL/TCP)(30 sec)</desc>
<iperf_args>-t 30 -R</iperf_args>
<id>amarisoft_ue_1 amarisoft_ue_2 amarisoft_ue_3 amarisoft_ue_4 amarisoft_ue_5 amarisoft_ue_6 amarisoft_ue_7 amarisoft_ue_8 amarisoft_ue_9 amarisoft_ue_10 amarisoft_ue_11 amarisoft_ue_12 amarisoft_ue_13 amarisoft_ue_14 amarisoft_ue_15</id>
<iperf_tcp_rate_target>2</iperf_tcp_rate_target>
@@ -202,7 +202,7 @@
<testCase id="100020">
<class>Iperf</class>
<desc>iperf (UL/1Mbps/UDP)(30 sec)(multi-ue profile)</desc>
<desc>iperf (UL/1Mbps/UDP)(30 sec)</desc>
<iperf_args>-u -b 15M -t 30</iperf_args>
<id>amarisoft_ue_1 amarisoft_ue_2 amarisoft_ue_3 amarisoft_ue_4 amarisoft_ue_5 amarisoft_ue_6 amarisoft_ue_7 amarisoft_ue_8 amarisoft_ue_9 amarisoft_ue_10 amarisoft_ue_11 amarisoft_ue_12 amarisoft_ue_13 amarisoft_ue_14 amarisoft_ue_15</id>
<iperf_packetloss_threshold>25</iperf_packetloss_threshold>
@@ -213,7 +213,7 @@
<testCase id="100040">
<class>Iperf</class>
<desc>iperf (UL/TCP)(30 sec)(multi-ue profile)</desc>
<desc>iperf (UL/TCP)(30 sec)</desc>
<iperf_args>-t 30</iperf_args>
<svr_id>oc-cn5g</svr_id>
<id>amarisoft_ue_1 amarisoft_ue_2 amarisoft_ue_3 amarisoft_ue_4 amarisoft_ue_5 amarisoft_ue_6 amarisoft_ue_7 amarisoft_ue_8 amarisoft_ue_9 amarisoft_ue_10 amarisoft_ue_11 amarisoft_ue_12 amarisoft_ue_13 amarisoft_ue_14 amarisoft_ue_15</id>

View File

@@ -179,7 +179,7 @@
<testCase id="000010">
<class>Iperf</class>
<desc>iperf (DL/4Mbps/UDP)(30 sec)(multi-ue profile)</desc>
<desc>iperf (DL/4Mbps/UDP)(30 sec)</desc>
<iperf_args>-u -b 60M -t 30 -R</iperf_args>
<id>amarisoft_ue_1 amarisoft_ue_2 amarisoft_ue_3 amarisoft_ue_4 amarisoft_ue_5 amarisoft_ue_6 amarisoft_ue_7 amarisoft_ue_8 amarisoft_ue_9 amarisoft_ue_10 amarisoft_ue_11 amarisoft_ue_12 amarisoft_ue_13 amarisoft_ue_14 amarisoft_ue_15</id>
<iperf_packetloss_threshold>25</iperf_packetloss_threshold>
@@ -190,7 +190,7 @@
<testCase id="000030">
<class>Iperf</class>
<desc>iperf (DL/TCP)(30 sec)(multi-ue profile)</desc>
<desc>iperf (DL/TCP)(30 sec)</desc>
<iperf_args>-t 30 -R</iperf_args>
<id>amarisoft_ue_1 amarisoft_ue_2 amarisoft_ue_3 amarisoft_ue_4 amarisoft_ue_5 amarisoft_ue_6 amarisoft_ue_7 amarisoft_ue_8 amarisoft_ue_9 amarisoft_ue_10 amarisoft_ue_11 amarisoft_ue_12 amarisoft_ue_13 amarisoft_ue_14 amarisoft_ue_15</id>
<iperf_tcp_rate_target>3.9</iperf_tcp_rate_target>
@@ -199,7 +199,7 @@
<testCase id="000020">
<class>Iperf</class>
<desc>iperf (UL/1.5Mbps/UDP)(30 sec)(multi-ue profile)</desc>
<desc>iperf (UL/1.5Mbps/UDP)(30 sec)</desc>
<iperf_args>-u -b 22.5M -t 30</iperf_args>
<id>amarisoft_ue_1 amarisoft_ue_2 amarisoft_ue_3 amarisoft_ue_4 amarisoft_ue_5 amarisoft_ue_6 amarisoft_ue_7 amarisoft_ue_8 amarisoft_ue_9 amarisoft_ue_10 amarisoft_ue_11 amarisoft_ue_12 amarisoft_ue_13 amarisoft_ue_14 amarisoft_ue_15</id>
<iperf_packetloss_threshold>25</iperf_packetloss_threshold>
@@ -210,7 +210,7 @@
<testCase id="000040">
<class>Iperf</class>
<desc>iperf (UL/TCP)(30 sec)(multi-ue profile)</desc>
<desc>iperf (UL/TCP)(30 sec)</desc>
<iperf_args>-t 30</iperf_args>
<svr_id>oc-cn5g</svr_id>
<id>amarisoft_ue_1 amarisoft_ue_2 amarisoft_ue_3 amarisoft_ue_4 amarisoft_ue_5 amarisoft_ue_6 amarisoft_ue_7 amarisoft_ue_8 amarisoft_ue_9 amarisoft_ue_10 amarisoft_ue_11 amarisoft_ue_12 amarisoft_ue_13 amarisoft_ue_14 amarisoft_ue_15</id>

View File

@@ -200,14 +200,12 @@
<desc>Trigger Reestablishment</desc>
<node>ofqot</node>
<command>echo ci force_reestab | nc -N 127.0.0.1 9090 | grep -E 'Reset RLC counters of UE RNTI [0-9a-f]{4} to trigger reestablishment'</command>
<command_fail>yes</command_fail>
</testCase>
<testCase id="060002">
<class>Custom_Command</class>
<desc>Verify Reestablishment</desc>
<node>ofqot</node>
<command>echo ci get_reestab_count | nc -N 127.0.0.1 9090 | grep -E 'UE RNTI [0-9a-f]{4} reestab 1'</command>
<command_fail>yes</command_fail>
</testCase>
<testCase id="030201">

View File

@@ -188,14 +188,12 @@
<desc>Trigger Reestablishment (on DU)</desc>
<node>ofqot</node>
<command>echo ci force_reestab | nc -N 127.0.0.1 9091 | grep -E 'Reset RLC counters of UE RNTI [0-9a-f]{4} to trigger reestablishment'</command>
<command_fail>yes</command_fail>
</testCase>
<testCase id="360002">
<class>Custom_Command</class>
<desc>Verify Reestablishment (on CU)</desc>
<node>ofqot</node>
<command>echo ci get_reestab_count | nc -N 127.0.0.1 9090 | grep -E 'UE RNTI [0-9a-f]{4} reestab 1'</command>
<command_fail>yes</command_fail>
</testCase>
<testCase id="100002">

View File

@@ -233,14 +233,12 @@
<desc>Trigger Reestablishment (on DU)</desc>
<node>ofqot</node>
<command>echo ci force_reestab | nc -N 127.0.0.1 9091 | grep -E 'Reset RLC counters of UE RNTI [0-9a-f]{4} to trigger reestablishment'</command>
<command_fail>yes</command_fail>
</testCase>
<testCase id="160002">
<class>Custom_Command</class>
<desc>Verify Reestablishment (on CU)</desc>
<node>ofqot</node>
<command>echo ci get_reestab_count | nc -N 127.0.0.1 9090 | grep -E 'UE RNTI [0-9a-f]{4} reestab 1'</command>
<command_fail>yes</command_fail>
</testCase>
<testCase id="130201">

View File

@@ -49,7 +49,6 @@
<desc>Setup sriov and network interfaces Metanoia</desc>
<node>cacofonix</node>
<script>yaml_files/sa_fhi_7.2_metanoia_2x2_gnb/setup_sriov_metanoia.sh</script>
<command_fail>yes</command_fail>
</testCase>
<testCase id="110000">
@@ -92,7 +91,7 @@
<testCase id="100010">
<class>Iperf</class>
<desc>iperf (DL/570Mbps/UDP)(30 sec)(multi-ue profile)</desc>
<desc>iperf (DL/570Mbps/UDP)(30 sec)</desc>
<iperf_args>-u -b 570M -t 30 -R</iperf_args>
<id>up2-fhi72</id>
<iperf_packetloss_threshold>20</iperf_packetloss_threshold>
@@ -103,7 +102,7 @@
<testCase id="100030">
<class>Iperf</class>
<desc>iperf (DL/TCP)(30 sec)(multi-ue profile)</desc>
<desc>iperf (DL/TCP)(30 sec)</desc>
<iperf_args>-t 30 -R</iperf_args>
<id>up2-fhi72</id>
<iperf_tcp_rate_target>80</iperf_tcp_rate_target>
@@ -112,7 +111,7 @@
<testCase id="100020">
<class>Iperf</class>
<desc>iperf (UL/100Mbps/UDP)(30 sec)(multi-ue profile)</desc>
<desc>iperf (UL/100Mbps/UDP)(30 sec)</desc>
<iperf_args>-u -b 100M -t 30</iperf_args>
<id>up2-fhi72</id>
<iperf_packetloss_threshold>20</iperf_packetloss_threshold>
@@ -123,7 +122,7 @@
<testCase id="100040">
<class>Iperf</class>
<desc>iperf (UL/TCP)(30 sec)(multi-ue profile)</desc>
<desc>iperf (UL/TCP)(30 sec)</desc>
<iperf_args>-t 30</iperf_args>
<id>up2-fhi72</id>
<iperf_tcp_rate_target>80</iperf_tcp_rate_target>
@@ -166,7 +165,6 @@
<desc>Set CPU to idle state, set kernel parameters to default values</desc>
<node>cacofonix</node>
<script>yaml_files/sa_fhi_7.2_metanoia_2x2_gnb/setup_cleanup.sh</script>
<command_fail>yes</command_fail>
</testCase>
</testCaseList>

View File

@@ -36,6 +36,7 @@
100020
100030
100040
100011
103000
100002
130000
@@ -49,7 +50,6 @@
<desc>Setup sriov and network interfaces VVDN</desc>
<node>cacofonix</node>
<script>yaml_files/sa_fhi_7.2_vvdn_gnb/setup_sriov_vvdn.sh</script>
<command_fail>yes</command_fail>
</testCase>
<testCase id="110000">
@@ -90,7 +90,7 @@
<testCase id="100010">
<class>Iperf</class>
<desc>iperf (DL/600Mbps/UDP)(30 sec)(multi-ue profile)</desc>
<desc>iperf (DL/600Mbps/UDP)(30 sec)</desc>
<iperf_args>-u -b 600M -t 30 -R</iperf_args>
<id>up2-fhi72</id>
<iperf_packetloss_threshold>20</iperf_packetloss_threshold>
@@ -99,9 +99,20 @@
<svr_id>oc-cn5g-20897</svr_id>
</testCase>
<testCase id="100011">
<class>Iperf</class>
<desc>Optional iperf (DL/700Mbps/UDP)(30 sec)</desc>
<may_fail>true</may_fail>
<iperf_args>-u -b 700M -t 30 -R</iperf_args>
<id>up2-fhi72</id>
<iperf_packetloss_threshold>10</iperf_packetloss_threshold>
<iperf_bitrate_threshold>95</iperf_bitrate_threshold>
<svr_id>oc-cn5g-20897</svr_id>
</testCase>
<testCase id="100030">
<class>Iperf</class>
<desc>iperf (DL/TCP)(30 sec)(multi-ue profile)</desc>
<desc>iperf (DL/TCP)(30 sec)</desc>
<iperf_args>-t 30 -R</iperf_args>
<id>up2-fhi72</id>
<iperf_tcp_rate_target>40</iperf_tcp_rate_target>
@@ -110,7 +121,7 @@
<testCase id="100020">
<class>Iperf</class>
<desc>iperf (UL/80Mbps/UDP)(30 sec)(multi-ue profile)</desc>
<desc>iperf (UL/80Mbps/UDP)(30 sec)</desc>
<iperf_args>-u -b 80M -t 30</iperf_args>
<id>up2-fhi72</id>
<iperf_packetloss_threshold>20</iperf_packetloss_threshold>
@@ -121,7 +132,7 @@
<testCase id="100040">
<class>Iperf</class>
<desc>iperf (UL/TCP)(30 sec)(multi-ue profile)</desc>
<desc>iperf (UL/TCP)(30 sec)</desc>
<iperf_args>-t 30</iperf_args>
<id>up2-fhi72</id>
<iperf_tcp_rate_target>10</iperf_tcp_rate_target>
@@ -164,7 +175,6 @@
<desc>Set CPU to idle state, set kernel parameters to default values</desc>
<node>cacofonix</node>
<script>yaml_files/sa_fhi_7.2_vvdn_gnb/setup_cleanup.sh</script>
<command_fail>yes</command_fail>
</testCase>

View File

@@ -194,14 +194,12 @@
<desc>Trigger Reestablishment</desc>
<node>ofqot</node>
<command>echo ci force_reestab | nc -N 127.0.0.1 9090 | grep -E 'Reset RLC counters of UE RNTI [0-9a-f]{4} to trigger reestablishment'</command>
<command_fail>yes</command_fail>
</testCase>
<testCase id="260002">
<class>Custom_Command</class>
<desc>Verify Reestablishment</desc>
<node>ofqot</node>
<command>echo ci get_reestab_count | nc -N 127.0.0.1 9090 | grep -E 'UE RNTI [0-9a-f]{4} reestab 1'</command>
<command_fail>yes</command_fail>
</testCase>
<testCase id="230201">

View File

@@ -10,7 +10,7 @@ services:
CASSANDRA_ENDPOINT_SNITCH: GossipingPropertyFileSnitch
healthcheck:
test: /bin/bash -c "nodetool status"
interval: 10s
interval: 20s
timeout: 5s
retries: 5

View File

@@ -2,6 +2,7 @@ services:
mysql:
container_name: "rfsim5g-mysql"
image: mysql:8.0
init: true
volumes:
- ../5g_rfsimulator/oai_db.sql:/docker-entrypoint-initdb.d/oai_db.sql
- ../5g_rfsimulator/mysql-healthcheck.sh:/tmp/mysql-healthcheck.sh
@@ -13,6 +14,8 @@ services:
- MYSQL_ROOT_PASSWORD=linux
healthcheck:
test: /bin/bash -c "/tmp/mysql-healthcheck.sh"
start_period: 10s
start_interval: 500ms
interval: 10s
timeout: 5s
retries: 30
@@ -46,6 +49,7 @@ services:
oai-upf:
container_name: "rfsim5g-oai-upf"
image: oaisoftwarealliance/oai-upf:v2.1.9
init: true
environment:
- TZ=Europe/Paris
volumes:
@@ -61,13 +65,16 @@ services:
networks:
public_net:
ipv4_address: 192.168.71.134
interface_name: eth0
traffic_net:
ipv4_address: 192.168.72.134
interface_name: eth1
oai-ext-dn:
privileged: true
container_name: rfsim5g-oai-ext-dn
image: oaisoftwarealliance/trf-gen-cn5g:focal
init: true
entrypoint: /bin/bash -c \
"iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE;"\
"ip route add 12.1.1.0/24 via 192.168.72.134 dev eth0; sleep infinity"
@@ -78,6 +85,8 @@ services:
ipv4_address: 192.168.72.135
healthcheck:
test: /bin/bash -c "ping -c 2 192.168.72.134"
start_period: 10s
start_interval: 500ms
interval: 10s
timeout: 5s
retries: 5
@@ -103,6 +112,8 @@ services:
- ../../conf_files/gnb-cu.sa.band78.106prb.conf:/opt/oai-gnb/etc/gnb.conf
healthcheck:
test: /bin/bash -c "pgrep nr-softmodem"
start_period: 10s
start_interval: 500ms
interval: 10s
timeout: 5s
retries: 5
@@ -130,6 +141,8 @@ services:
- ../../conf_files/gnb-du.sa.band78.106prb.rfsim.conf:/opt/oai-gnb/etc/gnb.conf
healthcheck:
test: /bin/bash -c "pgrep nr-softmodem"
start_period: 10s
start_interval: 500ms
interval: 10s
timeout: 5s
retries: 5
@@ -161,6 +174,8 @@ services:
- ../../conf_files/gnb-du.sa.band78.106prb.rfsim.conf:/opt/oai-gnb/etc/gnb.conf
healthcheck:
test: /bin/bash -c "pgrep nr-softmodem"
start_period: 10s
start_interval: 500ms
interval: 10s
timeout: 5s
retries: 5
@@ -193,6 +208,8 @@ services:
- ../../conf_files/nrue.uicc.conf:/opt/oai-nr-ue/etc/nr-ue.conf
healthcheck:
test: /bin/bash -c "pgrep nr-uesoftmodem"
start_period: 10s
start_interval: 500ms
interval: 10s
timeout: 5s
retries: 5

View File

@@ -2,6 +2,7 @@ services:
mysql:
container_name: "rfsim5g-mysql"
image: mysql:8.0
init: true
volumes:
- ../5g_rfsimulator/oai_db.sql:/docker-entrypoint-initdb.d/oai_db.sql
- ../5g_rfsimulator/mysql-healthcheck.sh:/tmp/mysql-healthcheck.sh
@@ -15,6 +16,8 @@ services:
test: /bin/bash -c "/tmp/mysql-healthcheck.sh"
interval: 10s
timeout: 5s
start_period: 10s
start_interval: 500ms
retries: 30
networks:
public_net:
@@ -46,6 +49,7 @@ services:
oai-upf:
container_name: "rfsim5g-oai-upf"
image: oaisoftwarealliance/oai-upf:v2.1.9
init: true
environment:
- TZ=Europe/Paris
volumes:
@@ -61,12 +65,15 @@ services:
networks:
public_net:
ipv4_address: 192.168.71.134
interface_name: eth0
traffic_net:
ipv4_address: 192.168.72.134
interface_name: eth1
oai-ext-dn:
privileged: true
container_name: rfsim5g-oai-ext-dn
image: oaisoftwarealliance/trf-gen-cn5g:focal
init: true
entrypoint: /bin/bash -c \
"iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE;"\
"ip route add 12.1.1.0/24 via 192.168.72.134 dev eth0; sleep infinity"
@@ -80,6 +87,8 @@ services:
interval: 10s
timeout: 5s
retries: 5
start_period: 10s
start_interval: 500ms
oai-gnb:
image: ${REGISTRY:-oaisoftwarealliance}/${GNB_IMG:-oai-gnb}:${TAG:-develop}
container_name: rfsim5g-oai-gnb
@@ -99,6 +108,8 @@ services:
test: /bin/bash -c "pgrep nr-softmodem"
interval: 10s
timeout: 5s
start_period: 10s
start_interval: 500ms
retries: 5
ipc: host
oai-nr-ue:
@@ -126,6 +137,8 @@ services:
interval: 10s
timeout: 5s
retries: 5
start_period: 10s
start_interval: 500ms
ipc: host
networks:

View File

@@ -67,6 +67,18 @@ All the following commands **SHALL** be run from the `ci-scripts/yaml_files/5g_r
For a deployment with the gNB split in CU and DU components, please refer to the `../5g_f1_rfsimulator` folder.
For a deployment with the gNB split in CU-CP, CU-UP, and DU components, please refer to the `../5g_rfsimulator_e1` folder.
Note: **These instructions require `docker compose` v2.36.0 or later** due to the
use of the `interface_name` property, which is necessary for ensuring consistent
IP address assignment to the container interface.
If you're using an older version of `docker compose`, you may encounter the following
error:
```
validating docker-compose.yaml: services.oai-upf.networks.public_net Additional property interface_name is not allowed
```
To update to the required version, you can follow the official Docker documentation:
https://docs.docker.com/compose/install/linux/
## 2.1. Deploy OAI 5G Core Network ##
```bash
@@ -546,8 +558,7 @@ section in the file for details. This includes an image build service as well as
code compilation service. This is necessary as the executable has to be linked
against the same libraries that are present in the executing image. This might
take a while the first time but other that that is very fast. Here is a list of
commands (wait between each command). Tested with `docker compose` v2.27.0
commands (wait between each command). Tested with `docker compose` v2.36.2.
This command deploys OAI 5G Core Network
```bash

View File

@@ -2,6 +2,7 @@ services:
mysql:
container_name: "rfsim5g-mysql"
image: mysql:8.0
init: true
volumes:
- ./oai_db.sql:/docker-entrypoint-initdb.d/oai_db.sql
- ./mysql-healthcheck.sh:/tmp/mysql-healthcheck.sh
@@ -13,6 +14,8 @@ services:
- MYSQL_ROOT_PASSWORD=linux
healthcheck:
test: /bin/bash -c "/tmp/mysql-healthcheck.sh"
start_period: 10s
start_interval: 500ms
interval: 10s
timeout: 5s
retries: 30
@@ -46,6 +49,7 @@ services:
oai-upf:
container_name: "rfsim5g-oai-upf"
image: oaisoftwarealliance/oai-upf:v2.1.9
init: true
environment:
- TZ=Europe/Paris
volumes:
@@ -61,12 +65,15 @@ services:
networks:
public_net:
ipv4_address: 192.168.71.134
interface_name: eth0
traffic_net:
ipv4_address: 192.168.72.134
interface_name: eth1
oai-ext-dn:
privileged: true
container_name: rfsim5g-oai-ext-dn
image: oaisoftwarealliance/trf-gen-cn5g:focal
init: true
entrypoint: /bin/bash -c \
"iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE;"\
"ip route add 12.1.1.0/24 via 192.168.72.134 dev eth0; sleep infinity"
@@ -77,6 +84,8 @@ services:
ipv4_address: 192.168.72.135
healthcheck:
test: /bin/bash -c "ping -c 2 192.168.72.134"
start_period: 10s
start_interval: 500ms
interval: 10s
timeout: 5s
retries: 5
@@ -97,6 +106,8 @@ services:
- ../../conf_files/gnb.sa.band78.106prb.rfsim.yaml:/opt/oai-gnb/etc/gnb.yaml
healthcheck:
test: /bin/bash -c "pgrep nr-softmodem"
start_period: 10s
start_interval: 500ms
interval: 10s
timeout: 5s
retries: 5
@@ -121,6 +132,8 @@ services:
- ../../conf_files/nrue.uicc.yaml:/opt/oai-nr-ue/etc/nr-ue.yaml
healthcheck:
test: /bin/bash -c "pgrep nr-uesoftmodem"
start_period: 10s
start_interval: 500ms
interval: 10s
timeout: 5s
retries: 5
@@ -145,6 +158,8 @@ services:
- ../../conf_files/nrue.uicc.conf:/opt/oai-nr-ue/etc/nr-ue.conf
healthcheck:
test: /bin/bash -c "pgrep nr-uesoftmodem"
start_period: 10s
start_interval: 500ms
interval: 10s
timeout: 5s
retries: 5
@@ -169,6 +184,8 @@ services:
- ../../conf_files/nrue.uicc.conf:/opt/oai-nr-ue/etc/nr-ue.conf
healthcheck:
test: /bin/bash -c "pgrep nr-uesoftmodem"
start_period: 10s
start_interval: 500ms
interval: 10s
timeout: 5s
retries: 5
@@ -193,6 +210,8 @@ services:
- ../../conf_files/nrue.uicc.conf:/opt/oai-nr-ue/etc/nr-ue.conf
healthcheck:
test: /bin/bash -c "pgrep nr-uesoftmodem"
start_period: 10s
start_interval: 500ms
interval: 10s
timeout: 5s
retries: 5
@@ -217,6 +236,8 @@ services:
- ../../conf_files/nrue.uicc.conf:/opt/oai-nr-ue/etc/nr-ue.conf
healthcheck:
test: /bin/bash -c "pgrep nr-uesoftmodem"
start_period: 10s
start_interval: 500ms
interval: 10s
timeout: 5s
retries: 5
@@ -241,6 +262,8 @@ services:
- ../../conf_files/nrue.uicc.conf:/opt/oai-nr-ue/etc/nr-ue.conf
healthcheck:
test: /bin/bash -c "pgrep nr-uesoftmodem"
start_period: 10s
start_interval: 500ms
interval: 10s
timeout: 5s
retries: 5
@@ -265,6 +288,8 @@ services:
- ../../conf_files/nrue.uicc.conf:/opt/oai-nr-ue/etc/nr-ue.conf
healthcheck:
test: /bin/bash -c "pgrep nr-uesoftmodem"
start_period: 10s
start_interval: 500ms
interval: 10s
timeout: 5s
retries: 5
@@ -289,6 +314,8 @@ services:
- ../../conf_files/nrue.uicc.conf:/opt/oai-nr-ue/etc/nr-ue.conf
healthcheck:
test: /bin/bash -c "pgrep nr-uesoftmodem"
start_period: 10s
start_interval: 500ms
interval: 10s
timeout: 5s
retries: 5
@@ -313,6 +340,8 @@ services:
- ../../conf_files/nrue.uicc.conf:/opt/oai-nr-ue/etc/nr-ue.conf
healthcheck:
test: /bin/bash -c "pgrep nr-uesoftmodem"
start_period: 10s
start_interval: 500ms
interval: 10s
timeout: 5s
retries: 5
@@ -337,6 +366,8 @@ services:
- ../../conf_files/nrue.uicc.conf:/opt/oai-nr-ue/etc/nr-ue.conf
healthcheck:
test: /bin/bash -c "pgrep nr-uesoftmodem"
start_period: 10s
start_interval: 500ms
interval: 10s
timeout: 5s
retries: 5

View File

@@ -2,6 +2,7 @@ services:
mysql:
container_name: "rfsim5g-mysql"
image: mysql:8.0
init: true
volumes:
- ../5g_rfsimulator/oai_db.sql:/docker-entrypoint-initdb.d/oai_db.sql
- ../5g_rfsimulator/mysql-healthcheck.sh:/tmp/mysql-healthcheck.sh
@@ -13,6 +14,8 @@ services:
- MYSQL_ROOT_PASSWORD=linux
healthcheck:
test: /bin/bash -c "/tmp/mysql-healthcheck.sh"
start_period: 10s
start_interval: 500ms
interval: 10s
timeout: 5s
retries: 30
@@ -46,6 +49,7 @@ services:
oai-upf:
container_name: "rfsim5g-oai-upf"
image: oaisoftwarealliance/oai-upf:v2.1.9
init: true
environment:
- TZ=Europe/Paris
volumes:
@@ -61,12 +65,15 @@ services:
networks:
public_net:
ipv4_address: 192.168.71.134
interface_name: eth0
traffic_net:
ipv4_address: 192.168.72.134
interface_name: eth1
oai-ext-dn:
privileged: true
container_name: rfsim5g-oai-ext-dn
image: oaisoftwarealliance/trf-gen-cn5g:focal
init: true
entrypoint: /bin/bash -c \
"iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE;"\
"ip route add 12.1.1.0/24 via 192.168.72.134 dev eth0; sleep infinity"
@@ -77,6 +84,8 @@ services:
ipv4_address: 192.168.72.135
healthcheck:
test: /bin/bash -c "ping -c 2 192.168.72.134"
start_period: 10s
start_interval: 500ms
interval: 10s
timeout: 5s
retries: 5
@@ -97,6 +106,8 @@ services:
- ../../conf_files/gnb.sa.band78.24prb.rfsim.conf:/opt/oai-gnb/etc/gnb.conf
healthcheck:
test: /bin/bash -c "pgrep nr-softmodem"
start_period: 10s
start_interval: 500ms
interval: 10s
timeout: 5s
retries: 5
@@ -124,6 +135,8 @@ services:
- ../../conf_files/nrue.uicc.conf:/opt/oai-nr-ue/etc/nr-ue.conf
healthcheck:
test: /bin/bash -c "pgrep nr-uesoftmodem"
start_period: 10s
start_interval: 500ms
interval: 10s
timeout: 5s
retries: 5

View File

@@ -2,6 +2,7 @@ services:
mysql:
container_name: "rfsim5g-mysql"
image: mysql:8.0
init: true
volumes:
- ../5g_rfsimulator/oai_db.sql:/docker-entrypoint-initdb.d/oai_db.sql
- ../5g_rfsimulator/mysql-healthcheck.sh:/tmp/mysql-healthcheck.sh
@@ -13,6 +14,8 @@ services:
- MYSQL_ROOT_PASSWORD=linux
healthcheck:
test: /bin/bash -c "/tmp/mysql-healthcheck.sh"
start_period: 10s
start_interval: 500ms
interval: 10s
timeout: 5s
retries: 30
@@ -46,6 +49,7 @@ services:
oai-upf:
container_name: "rfsim5g-oai-upf"
image: oaisoftwarealliance/oai-upf:v2.1.9
init: true
environment:
- TZ=Europe/Paris
volumes:
@@ -61,12 +65,15 @@ services:
networks:
public_net:
ipv4_address: 192.168.71.134
interface_name: eth0
traffic_net:
ipv4_address: 192.168.72.134
interface_name: eth1
oai-ext-dn:
privileged: true
container_name: rfsim5g-oai-ext-dn
image: oaisoftwarealliance/trf-gen-cn5g:focal
init: true
entrypoint: /bin/bash -c \
"iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE;"\
"ip route add 12.1.1.0/24 via 192.168.72.134 dev eth0; sleep infinity"
@@ -77,6 +84,8 @@ services:
ipv4_address: 192.168.72.135
healthcheck:
test: /bin/bash -c "ping -c 2 192.168.72.134"
start_period: 10s
start_interval: 500ms
interval: 10s
timeout: 5s
retries: 5
@@ -97,6 +106,8 @@ services:
- ../../conf_files/gnb.sa.band78.273prb.rfsim.2x2.conf:/opt/oai-gnb/etc/gnb.conf
healthcheck:
test: /bin/bash -c "pgrep nr-softmodem"
start_period: 10s
start_interval: 500ms
interval: 10s
timeout: 5s
retries: 5
@@ -123,6 +134,8 @@ services:
- ../../conf_files/nrue.uicc.conf:/opt/oai-nr-ue/etc/nr-ue.conf
healthcheck:
test: /bin/bash -c "pgrep nr-uesoftmodem"
start_period: 10s
start_interval: 500ms
interval: 10s
timeout: 5s
retries: 5

View File

@@ -2,6 +2,7 @@ services:
mysql:
container_name: "rfsim5g-mysql"
image: mysql:8.0
init: true
volumes:
- ../5g_rfsimulator/oai_db.sql:/docker-entrypoint-initdb.d/oai_db.sql
- ../5g_rfsimulator/mysql-healthcheck.sh:/tmp/mysql-healthcheck.sh
@@ -13,6 +14,8 @@ services:
- MYSQL_ROOT_PASSWORD=linux
healthcheck:
test: /bin/bash -c "/tmp/mysql-healthcheck.sh"
start_period: 10s
start_interval: 500ms
interval: 10s
timeout: 5s
retries: 30
@@ -46,6 +49,7 @@ services:
oai-upf:
container_name: "rfsim5g-oai-upf"
image: oaisoftwarealliance/oai-upf:v2.1.9
init: true
environment:
- TZ=Europe/Paris
volumes:
@@ -61,8 +65,10 @@ services:
networks:
core_net:
ipv4_address: 192.168.71.134
interface_name: eth0
traffic_net:
ipv4_address: 192.168.72.134
interface_name: eth1
oai-cucp:
image: ${REGISTRY:-oaisoftwarealliance}/${GNB_IMG:-oai-gnb}:${TAG:-develop}
@@ -87,6 +93,8 @@ services:
- ../../conf_files/gnb-cucp.sa.f1.conf:/opt/oai-gnb/etc/gnb.conf
healthcheck:
test: /bin/bash -c "pgrep nr-softmodem"
start_period: 10s
start_interval: 500ms
interval: 10s
timeout: 5s
retries: 5
@@ -116,6 +124,8 @@ services:
- ../../conf_files/gnb-cuup.sa.f1.conf:/opt/oai-gnb/etc/gnb.conf
healthcheck:
test: /bin/bash -c "pgrep nr-cuup"
start_period: 10s
start_interval: 500ms
interval: 10s
timeout: 5s
retries: 5
@@ -148,6 +158,8 @@ services:
- ../../conf_files/gnb-cuup.sa.f1.conf:/opt/oai-gnb/etc/gnb.conf
healthcheck:
test: /bin/bash -c "pgrep nr-cuup"
start_period: 10s
start_interval: 500ms
interval: 10s
timeout: 5s
retries: 5
@@ -180,6 +192,8 @@ services:
- ../../conf_files/gnb-cuup.sa.f1.conf:/opt/oai-gnb/etc/gnb.conf
healthcheck:
test: /bin/bash -c "pgrep nr-cuup"
start_period: 10s
start_interval: 500ms
interval: 10s
timeout: 5s
retries: 5
@@ -209,6 +223,8 @@ services:
- ../../conf_files/gnb-du.sa.band78.106prb.rfsim.conf:/opt/oai-gnb/etc/gnb.conf
healthcheck:
test: /bin/bash -c "pgrep nr-softmodem"
start_period: 10s
start_interval: 500ms
interval: 10s
timeout: 5s
retries: 5
@@ -241,6 +257,8 @@ services:
- ../../conf_files/gnb-du.sa.band78.106prb.rfsim.conf:/opt/oai-gnb/etc/gnb.conf
healthcheck:
test: /bin/bash -c "pgrep nr-softmodem"
start_period: 10s
start_interval: 500ms
interval: 10s
timeout: 5s
retries: 5
@@ -273,6 +291,8 @@ services:
- ../../conf_files/gnb-du.sa.band78.106prb.rfsim.conf:/opt/oai-gnb/etc/gnb.conf
healthcheck:
test: /bin/bash -c "pgrep nr-softmodem"
start_period: 10s
start_interval: 500ms
interval: 10s
timeout: 5s
retries: 5
@@ -301,6 +321,8 @@ services:
- ../../conf_files/nrue.uicc.conf:/opt/oai-nr-ue/etc/nr-ue.conf
healthcheck:
test: /bin/bash -c "pgrep nr-uesoftmodem"
start_period: 10s
start_interval: 500ms
interval: 10s
timeout: 5s
retries: 5
@@ -329,6 +351,8 @@ services:
- ../../conf_files/nrue.uicc.conf:/opt/oai-nr-ue/etc/nr-ue.conf
healthcheck:
test: /bin/bash -c "pgrep nr-uesoftmodem"
start_period: 10s
start_interval: 500ms
interval: 10s
timeout: 5s
retries: 5
@@ -358,6 +382,8 @@ services:
- ../../conf_files/nrue.uicc.conf:/opt/oai-nr-ue/etc/nr-ue.conf
healthcheck:
test: /bin/bash -c "pgrep nr-uesoftmodem"
start_period: 10s
start_interval: 500ms
interval: 10s
timeout: 5s
retries: 5

View File

@@ -1,5 +1,5 @@
[NEAR-RIC]
NEAR_RIC_IP = 192.168.70.150
[XAPP]
DB_PATH = /flexric/db/
DB_NAME = xapp_rnis_db
DB_DIR = /tmp/

View File

@@ -7,12 +7,79 @@ services:
ipv4_address: 192.168.70.150
volumes:
- ./conf/flexric.conf:/usr/local/etc/flexric/flexric.conf
- sharedXappLibs:/usr/local/lib/flexric/
healthcheck:
test: /bin/bash -c "pgrep nearRT-RIC"
interval: 10s
timeout: 5s
xapp-rc-moni:
image: ${REGISTRY:-oaisoftwarealliance}/oai-flexric:${FLEXRIC_TAG:-develop}
command: "stdbuf -o0 /usr/local/flexric/xApp/c/monitor/xapp_rc_moni"
container_name: xapp-rc-moni
depends_on:
- oai-flexric
- oai-gnb
networks:
public_net:
ipv4_address: 192.168.70.154
volumes:
- ./conf/flexric.conf:/usr/local/etc/flexric/flexric.conf
healthcheck:
test: /bin/bash -c "pgrep xapp_rc_moni"
interval: 10s
timeout: 5s
xapp-kpm-moni:
image: ${REGISTRY:-oaisoftwarealliance}/oai-flexric:${FLEXRIC_TAG:-develop}
command: "stdbuf -o0 /usr/local/flexric/xApp/c/monitor/xapp_kpm_moni"
container_name: xapp-kpm-moni
depends_on:
- oai-flexric
- oai-gnb
networks:
public_net:
ipv4_address: 192.168.70.155
volumes:
- ./conf/flexric.conf:/usr/local/etc/flexric/flexric.conf
healthcheck:
test: /bin/bash -c "pgrep xapp_kpm_moni"
interval: 10s
timeout: 5s
xapp-kpm-rc:
image: ${REGISTRY:-oaisoftwarealliance}/oai-flexric:${FLEXRIC_TAG:-develop}
command: "stdbuf -o0 /usr/local/flexric/xApp/c/kpm_rc/xapp_kpm_rc"
container_name: xapp-kpm-rc
depends_on:
- oai-flexric
- oai-gnb
networks:
public_net:
ipv4_address: 192.168.70.156
volumes:
- ./conf/flexric.conf:/usr/local/etc/flexric/flexric.conf
healthcheck:
test: /bin/bash -c "pgrep xapp_kpm_rc"
interval: 10s
timeout: 5s
xapp-gtp-mac-rlc-pdcp-moni:
image: ${REGISTRY:-oaisoftwarealliance}/oai-flexric:${FLEXRIC_TAG:-develop}
command: "stdbuf -o0 /usr/local/flexric/xApp/c/monitor/xapp_gtp_mac_rlc_pdcp_moni"
container_name: xapp-gtp-mac-rlc-pdcp-moni
depends_on:
- oai-flexric
- oai-gnb
networks:
public_net:
ipv4_address: 192.168.70.157
volumes:
- ./conf/flexric.conf:/usr/local/etc/flexric/flexric.conf
healthcheck:
test: /bin/bash -c "pgrep -f xapp_gtp_mac_rlc_pdcp_moni"
interval: 10s
timeout: 5s
oai-gnb:
image: ${REGISTRY:-oaisoftwarealliance}/${GNB_IMG:-oai-gnb}:${TAG:-develop}
privileged: true
@@ -27,7 +94,6 @@ services:
ipv4_address: 192.168.70.151
volumes:
- ../../conf_files/gnb.sa.band78.106prb.rfsim.flexric.conf:/opt/oai-gnb/etc/gnb.conf
- sharedXappLibs:/usr/local/lib/flexric/
healthcheck:
test: /bin/bash -c "pgrep nr-softmodem"
interval: 10s
@@ -72,9 +138,6 @@ services:
timeout: 5s
retries: 5
volumes:
sharedXappLibs:
networks:
public_net:
name: oai-cn5g-public-net

View File

@@ -2,6 +2,7 @@ services:
mysql:
container_name: "rfsim5g-mysql"
image: mysql:8.0
init: true
volumes:
- ../5g_rfsimulator/oai_db.sql:/docker-entrypoint-initdb.d/oai_db.sql
- ../5g_rfsimulator/mysql-healthcheck.sh:/tmp/mysql-healthcheck.sh
@@ -13,6 +14,8 @@ services:
- MYSQL_ROOT_PASSWORD=linux
healthcheck:
test: /bin/bash -c "/tmp/mysql-healthcheck.sh"
start_period: 10s
start_interval: 500ms
interval: 10s
timeout: 5s
retries: 30
@@ -46,6 +49,7 @@ services:
oai-upf:
container_name: "rfsim5g-oai-upf"
image: oaisoftwarealliance/oai-upf:v2.1.9
init: true
environment:
- TZ=Europe/Paris
volumes:
@@ -61,12 +65,15 @@ services:
networks:
public_net:
ipv4_address: 192.168.71.134
interface_name: eth0
traffic_net:
ipv4_address: 192.168.72.134
interface_name: eth1
oai-ext-dn:
privileged: true
container_name: rfsim5g-oai-ext-dn
image: oaisoftwarealliance/trf-gen-cn5g:focal
init: true
entrypoint: /bin/bash -c \
"iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE;"\
"ip route add 12.1.1.0/24 via 192.168.72.134 dev eth0; sleep infinity"
@@ -77,6 +84,8 @@ services:
ipv4_address: 192.168.72.135
healthcheck:
test: /bin/bash -c "ping -c 2 192.168.72.134"
start_period: 10s
start_interval: 500ms
interval: 10s
timeout: 5s
retries: 5
@@ -96,6 +105,8 @@ services:
- ../../conf_files/gnb.sa.band261.u3.32prb.rfsim.conf:/opt/oai-gnb/etc/gnb.conf
healthcheck:
test: /bin/bash -c "pgrep nr-softmodem"
start_period: 10s
start_interval: 500ms
interval: 10s
timeout: 5s
retries: 5
@@ -124,6 +135,8 @@ services:
ipv4_address: 192.168.71.150
healthcheck:
test: /bin/bash -c "pgrep nr-uesoftmodem"
start_period: 10s
start_interval: 500ms
interval: 10s
timeout: 5s
retries: 5

View File

@@ -2,6 +2,7 @@ services:
mysql:
container_name: "rfsim5g-mysql"
image: mysql:8.0
init: true
volumes:
- ../5g_rfsimulator/oai_db.sql:/docker-entrypoint-initdb.d/oai_db.sql
- ../5g_rfsimulator/mysql-healthcheck.sh:/tmp/mysql-healthcheck.sh
@@ -13,6 +14,8 @@ services:
- MYSQL_ROOT_PASSWORD=linux
healthcheck:
test: /bin/bash -c "/tmp/mysql-healthcheck.sh"
start_period: 10s
start_interval: 500ms
interval: 10s
timeout: 5s
retries: 30
@@ -46,6 +49,7 @@ services:
oai-upf:
container_name: "rfsim5g-oai-upf"
image: oaisoftwarealliance/oai-upf:v2.1.9
init: true
environment:
- TZ=Europe/Paris
volumes:
@@ -61,12 +65,15 @@ services:
networks:
public_net:
ipv4_address: 192.168.71.134
interface_name: eth0
traffic_net:
ipv4_address: 192.168.72.134
interface_name: eth1
oai-ext-dn:
privileged: true
container_name: rfsim5g-oai-ext-dn
image: oaisoftwarealliance/trf-gen-cn5g:focal
init: true
entrypoint: /bin/bash -c \
"iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE;"\
"ip route add 12.1.1.0/24 via 192.168.72.134 dev eth0; sleep infinity"
@@ -77,6 +84,8 @@ services:
ipv4_address: 192.168.72.135
healthcheck:
test: /bin/bash -c "ping -c 2 192.168.72.134"
start_period: 10s
start_interval: 500ms
interval: 10s
timeout: 5s
retries: 5
@@ -87,7 +96,9 @@ services:
- ALL
environment:
USE_ADDITIONAL_OPTIONS: --rfsim --log_config.global_log_options level,nocolor,time
ASAN_OPTIONS: detect_leaks=0
--telnetsrv --telnetsrv.listenaddr 192.168.71.140
--telnetsrv.shrmod ci
ASAN_OPTIONS: detect_leaks=0:detect_odr_violation=0
depends_on:
- oai-ext-dn
networks:
@@ -97,6 +108,8 @@ services:
- ../../conf_files/gnb.sa.band254.u0.25prb.rfsim.ntn.conf:/opt/oai-gnb/etc/gnb.conf
healthcheck:
test: /bin/bash -c "pgrep nr-softmodem"
start_period: 10s
start_interval: 500ms
interval: 10s
timeout: 5s
retries: 5
@@ -122,6 +135,8 @@ services:
- ../../conf_files/nrue.uicc.conf:/opt/oai-nr-ue/etc/nr-ue.conf
healthcheck:
test: /bin/bash -c "pgrep nr-uesoftmodem"
start_period: 10s
start_interval: 500ms
interval: 10s
timeout: 5s
retries: 5

View File

@@ -13,6 +13,8 @@ services:
- MYSQL_ROOT_PASSWORD=linux
healthcheck:
test: /bin/bash -c "/tmp/mysql-healthcheck.sh"
start_period: 10s
start_interval: 500ms
interval: 10s
timeout: 5s
retries: 30
@@ -61,8 +63,10 @@ services:
networks:
public_net:
ipv4_address: 192.168.71.134
interface_name: eth0
traffic_net:
ipv4_address: 192.168.72.134
interface_name: eth1
oai-ext-dn:
privileged: true
container_name: rfsim5g-oai-ext-dn
@@ -77,6 +81,8 @@ services:
ipv4_address: 192.168.72.135
healthcheck:
test: /bin/bash -c "ping -c 2 192.168.72.134"
start_period: 10s
start_interval: 500ms
interval: 10s
timeout: 5s
retries: 5
@@ -97,6 +103,8 @@ services:
- ../../conf_files/gnb.sa.band254.u0.25prb.rfsim.ntn-leo.conf:/opt/oai-gnb/etc/gnb.conf
healthcheck:
test: /bin/bash -c "pgrep nr-softmodem"
start_period: 10s
start_interval: 500ms
interval: 10s
timeout: 5s
retries: 5
@@ -129,6 +137,8 @@ services:
- ../../conf_files/nrue.uicc.ntn-leo.conf:/opt/oai-nr-ue/etc/nr-ue.conf
healthcheck:
test: /bin/bash -c "pgrep nr-uesoftmodem"
start_period: 10s
start_interval: 500ms
interval: 10s
timeout: 5s
retries: 5

View File

@@ -18,6 +18,8 @@ services:
- ../../conf_files/nrue.uicc.conf:/opt/oai-nr-ue/etc/nr-ue.conf
healthcheck:
test: /bin/bash -c "pgrep nr-uesoftmodem"
start_period: 10s
start_interval: 500ms
interval: 10s
timeout: 5s
retries: 5
@@ -43,6 +45,8 @@ services:
- ../../conf_files/nrue.uicc.conf:/opt/oai-nr-ue/etc/nr-ue.conf
healthcheck:
test: /bin/bash -c "pgrep nr-uesoftmodem"
start_period: 10s
start_interval: 500ms
interval: 10s
timeout: 5s
retries: 5
@@ -56,11 +60,3 @@ networks:
- subnet: 192.168.71.128/26
driver_opts:
com.docker.network.bridge.name: "rfsim5g-public"
traffic_net:
driver: bridge
name: rfsim5g-oai-traffic-net
ipam:
config:
- subnet: 192.168.72.128/26
driver_opts:
com.docker.network.bridge.name: "rfsim5g-traffic"

View File

@@ -2,6 +2,7 @@ services:
mysql:
container_name: "rfsim5g-mysql"
image: mysql:8.0
init: true
volumes:
- ../5g_rfsimulator/oai_db.sql:/docker-entrypoint-initdb.d/oai_db.sql
- ../5g_rfsimulator/mysql-healthcheck.sh:/tmp/mysql-healthcheck.sh
@@ -13,6 +14,8 @@ services:
- MYSQL_ROOT_PASSWORD=linux
healthcheck:
test: /bin/bash -c "/tmp/mysql-healthcheck.sh"
start_period: 10s
start_interval: 500ms
interval: 10s
timeout: 5s
retries: 30
@@ -46,6 +49,7 @@ services:
oai-upf:
container_name: "rfsim5g-oai-upf"
image: oaisoftwarealliance/oai-upf:v2.1.9
init: true
environment:
- TZ=Europe/Paris
volumes:
@@ -61,12 +65,15 @@ services:
networks:
public_net:
ipv4_address: 192.168.71.134
interface_name: eth0
traffic_net:
ipv4_address: 192.168.72.134
interface_name: eth1
oai-ext-dn:
privileged: true
container_name: rfsim5g-oai-ext-dn
image: oaisoftwarealliance/trf-gen-cn5g:focal
init: true
entrypoint: /bin/bash -c \
"iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE;"\
"ip route add 12.1.1.0/24 via 192.168.72.134 dev eth0; sleep infinity"
@@ -77,6 +84,8 @@ services:
ipv4_address: 192.168.72.135
healthcheck:
test: /bin/bash -c "ping -c 2 192.168.72.134"
start_period: 10s
start_interval: 500ms
interval: 10s
timeout: 5s
retries: 5
@@ -99,6 +108,8 @@ services:
- ../../conf_files/gnb-vnf.sa.band66.u0.25prb.nfapi.conf:/opt/oai-gnb/etc/gnb.conf
healthcheck:
test: /bin/bash -c "pgrep nr-softmodem"
start_period: 10s
start_interval: 500ms
interval: 10s
timeout: 5s
retries: 5
@@ -121,6 +132,8 @@ services:
- ../../conf_files/gnb-pnf.band66.rfsim.conf:/opt/oai-gnb/etc/gnb.conf
healthcheck:
test: /bin/bash -c "pgrep nr-softmodem"
start_period: 10s
start_interval: 500ms
interval: 10s
timeout: 5s
retries: 5
@@ -146,6 +159,8 @@ services:
- ../../conf_files/nrue.uicc.conf:/opt/oai-nr-ue/etc/nr-ue.conf
healthcheck:
test: /bin/bash -c "pgrep nr-uesoftmodem"
start_period: 10s
start_interval: 500ms
interval: 10s
timeout: 5s
retries: 5

View File

@@ -14,7 +14,9 @@ services:
volumes:
- ../../conf_files/gnb.sa.band77.273prb.usrpn310.2x2.conf:/opt/oai-gnb/etc/gnb.conf
healthcheck:
test: /bin/bash -c "pgrep nr-softmodem"
interval: 10s
test: /bin/bash -c "/opt/oai-gnb/bin/check-prach-io.sh"
start_period: 15s
start_interval: 500ms
interval: 5s
timeout: 5s
retries: 5

View File

@@ -14,7 +14,9 @@ services:
volumes:
- ../../conf_files/gnb.sa.band77.162prb.usrpn310.2x2.conf:/opt/oai-gnb/etc/gnb.conf
healthcheck:
test: /bin/bash -c "pgrep nr-softmodem"
interval: 10s
test: /bin/bash -c "/opt/oai-gnb/bin/check-prach-io.sh"
start_period: 15s
start_interval: 500ms
interval: 5s
timeout: 5s
retries: 5

View File

@@ -16,7 +16,7 @@ services:
- ../../conf_files/gnb-vnf.sa.band77.162prb.nfapi.4x4.conf:/opt/oai-gnb/etc/gnb.conf
healthcheck:
test: /bin/bash -c "pgrep nr-softmodem"
interval: 15s
interval: 5s
timeout: 5s
retries: 5
oai-pnf:
@@ -35,7 +35,9 @@ services:
volumes:
- ../../conf_files/gnb-pnf.band77.usrpn310.4x4.conf:/opt/oai-gnb/etc/gnb.conf
healthcheck:
test: /bin/bash -c "pgrep nr-softmodem"
interval: 15s
test: /bin/bash -c "/opt/oai-gnb/bin/check-prach-io.sh"
start_period: 15s
start_interval: 500ms
interval: 5s
timeout: 5s
retries: 5

View File

@@ -16,7 +16,9 @@ services:
volumes:
- ../../conf_files/gnb.sa.band78.106prb.n310.7ds2u.conf:/opt/oai-gnb/etc/gnb.conf
healthcheck:
test: /bin/bash -c "pgrep nr-softmodem"
interval: 10s
test: /bin/bash -c "/opt/oai-gnb/bin/check-prach-io.sh"
start_period: 15s
start_interval: 500ms
interval: 5s
timeout: 5s
retries: 5
retries: 10

View File

@@ -9,6 +9,7 @@ services:
- IPC_LOCK
ulimits:
core: -1 # for core dumps
network_mode: "host"
environment:
USE_B2XX: 'yes'
USE_ADDITIONAL_OPTIONS: --nsa -E -q --RUs.[0].sdr_addrs serial=30C51D4 --continuous-tx --log_config.global_log_options level,nocolor,time,line_num,function
@@ -16,9 +17,6 @@ services:
- /dev/bus/usb/:/dev/bus/usb/
volumes:
- ../../conf_files/gnb.nsa.band78.106prb.usrpb200.conf:/opt/oai-gnb/etc/gnb.conf
networks:
public_net:
ipv4_address: 192.168.68.194
#entrypoint: /bin/bash -c "sleep infinity"
healthcheck:
# pgrep does NOT work
@@ -26,12 +24,3 @@ services:
interval: 10s
timeout: 5s
retries: 5
networks:
public_net:
name: nsa-b200-gnb-net
ipam:
config:
- subnet: 192.168.68.192/26
driver_opts:
com.docker.network.bridge.name: "nsa-gnb-net"

View File

@@ -22,10 +22,12 @@ services:
oai-net:
ipv4_address: 172.21.18.20
healthcheck:
test: /bin/bash -c "pgrep nr-softmodem"
interval: 10s
test: /bin/bash -c "/opt/oai-gnb/bin/check-prach-io.sh"
start_period: 15s
start_interval: 500ms
interval: 5s
timeout: 5s
retries: 5
retries: 10
networks:
oai-net:
driver: macvlan

View File

@@ -21,10 +21,12 @@ services:
oai-net:
ipv4_address: 172.21.18.20
healthcheck:
test: /bin/bash -c "pgrep nr-softmodem"
interval: 10s
test: /bin/bash -c "/opt/oai-gnb/bin/check-prach-io.sh"
start_period: 15s
start_interval: 500ms
interval: 5s
timeout: 5s
retries: 5
retries: 10
networks:
oai-net:
driver: macvlan

View File

@@ -21,10 +21,13 @@ services:
oai-net:
ipv4_address: 172.21.18.20
healthcheck:
test: /bin/bash -c "pgrep nr-softmodem"
interval: 10s
test: /bin/bash -c "/opt/oai-gnb/bin/check-prach-io.sh"
start_period: 15s
start_interval: 500ms
interval: 5s
timeout: 5s
retries: 5
retries: 10
networks:
oai-net:
driver: macvlan

View File

@@ -23,7 +23,7 @@ services:
- ../../../cmake_targets/share:/opt/cuBB/share
userns_mode: host
ipc: "shareable"
image: cubb-build:24-3
image: cubb-build:25-1
environment:
- cuBB_SDK=/opt/nvidia/cuBB
command: bash -c "sudo rm -rf /tmp/phy.log && sudo chmod +x /opt/nvidia/cuBB/aerial_l1_entrypoint.sh && /opt/nvidia/cuBB/aerial_l1_entrypoint.sh"
@@ -33,7 +33,7 @@ services:
timeout: 5s
retries: 5
oai-gnb-aerial:
cpuset: "13-20"
cpuset: "13-14"
image: ${REGISTRY:-oaisoftwarealliance}/oai-gnb-aerial:${TAG:-develop}
depends_on:
nv-cubb:

View File

@@ -35,6 +35,24 @@ typedef struct nssai_s {
uint32_t sd;
} nssai_t;
// Globally Unique AMF Identifier
typedef struct nr_guami_s {
uint16_t mcc;
uint16_t mnc;
uint8_t mnc_len;
uint8_t amf_region_id;
uint16_t amf_set_id;
uint8_t amf_pointer;
} nr_guami_t;
typedef enum {
PDUSessionType_ipv4 = 0,
PDUSessionType_ipv6 = 1,
PDUSessionType_ipv4v6 = 2,
PDUSessionType_ethernet = 3,
PDUSessionType_unstructured = 4
} pdu_session_type_t;
typedef enum { NON_DYNAMIC, DYNAMIC } fiveQI_t;
#endif

View File

@@ -308,3 +308,63 @@ void config_assign_int(configmodule_interface_t *cfg, paramdef_t *cfgoptions, ch
break;
}
}
/**
* @brief Assigns the default value to a configuration parameter if available.
*
* This function checks the type of the parameter and assigns its default value
* if it is defined. It handles various parameter types, including strings, integers,
* arrays, doubles, IPv4 addresses, and lists. If the parameter is marked with
* PARAMFLAG_DONOTREAD, it is ignored.
*
* @param[in] cfg Pointer to the configuration module interface.
* @param[in] cfgoption Pointer to the parameter definition structure.
* @param[in] prefix Optional prefix for the parameter name (can be NULL).
* @return 1 if the default value was set, 0 if ignored, or -1 on error/unsupported type.
*/
int config_common_getdefault(configmodule_interface_t *cfg, paramdef_t *cfgoption, char *prefix)
{
if( (cfgoption->paramflags & PARAMFLAG_DONOTREAD) != 0) {
return 0;
}
switch(cfgoption->type) {
case TYPE_STRING:
return config_setdefault_string(cfg, cfgoption, prefix);
case TYPE_STRINGLIST:
return config_setdefault_stringlist(cfg, cfgoption, prefix);
case TYPE_UINT8:
case TYPE_INT8:
case TYPE_UINT16:
case TYPE_INT16:
case TYPE_UINT32:
case TYPE_INT32:
case TYPE_MASK:
return config_setdefault_int(cfg, cfgoption, prefix);
case TYPE_UINT64:
case TYPE_INT64:
return config_setdefault_int64(cfg, cfgoption, prefix);
case TYPE_UINTARRAY:
case TYPE_INTARRAY:
return config_setdefault_intlist(cfg, cfgoption, prefix);
case TYPE_DOUBLE:
return config_setdefault_double(cfg, cfgoption, prefix);
case TYPE_IPV4ADDR:
return config_setdefault_ipv4addr(cfg, cfgoption, prefix);
case TYPE_LIST:
// No default value for list type
fprintf(stderr,"[CONFIG] %s.%s TYPE_LIST has no default value\n", prefix, cfgoption->optname);
return -1;
default:
fprintf(stderr,"[CONFIG] %s.%s type %i not supported\n", prefix, cfgoption->optname, cfgoption->type);
return -1;
} /* switch on param type */
}

View File

@@ -50,6 +50,7 @@ int config_setdefault_double(configmodule_interface_t *cfg, paramdef_t *cfgoptio
int config_setdefault_ipv4addr(configmodule_interface_t *cfg, paramdef_t *cfgoptions, char *prefix);
void *config_allocate_new(configmodule_interface_t *cfg, int sz, bool autoFree);
void config_assign_int(configmodule_interface_t *cfg, paramdef_t *cfgoptions, char *fullname, int val);
int config_common_getdefault(configmodule_interface_t *cfg, paramdef_t *cfgoption, char *prefix);
#ifdef __cplusplus
}

View File

@@ -53,7 +53,7 @@
#define PARAMFLAG_PARAMSETDEF (1 << 17) // parameter has been set to default value in get functions
/* checkedparam_t is possibly used in paramdef_t for specific parameter value validation */
#define CONFIG_MAX_NUMCHECKVAL 20
#define CONFIG_MAX_NUMCHECKVAL 64
typedef struct paramdef paramdef_t;
typedef struct configmodule_interface configmodule_interface_t;
typedef union checkedparam {
@@ -169,7 +169,6 @@ typedef struct paramlist_def {
/* Macros to get parameters with the config module API */
#define GET_PARAMS(param_def, param_desc, prefix) \
printf("Reading '%s' section from the config file\n", #param_def); \
paramdef_t param_def[] = param_desc; \
config_get(config_get_if(), param_def, sizeofArray(param_def), prefix);

View File

@@ -356,7 +356,7 @@ int config_libconfig_get(configmodule_interface_t *cfg, paramdef_t *cfgoptions,
snprintf( *cfgoptions[i].strptr , cfgoptions[i].numelt, "%s", str);
printf_params(cfg, "[LIBCONFIG] %s: \"%s\"\n", cfgpath, *cfgoptions[i].strptr);
} else {
defval = config_setdefault_string(cfg, &cfgoptions[i], prefix);
defval = config_common_getdefault(cfg, &cfgoptions[i], prefix);
}
break;
@@ -367,7 +367,7 @@ int config_libconfig_get(configmodule_interface_t *cfg, paramdef_t *cfgoptions,
if ( setting != NULL) {
read_strlist(cfg, &cfgoptions[i], setting, cfgpath);
} else {
defval = config_setdefault_stringlist(cfg, &(cfgoptions[i]), prefix);
defval = config_common_getdefault(cfg, &(cfgoptions[i]), prefix);
}
break;
@@ -383,7 +383,7 @@ int config_libconfig_get(configmodule_interface_t *cfg, paramdef_t *cfgoptions,
config_check_valptr(cfg, &(cfgoptions[i]), sizeof(*cfgoptions[i].iptr), 1);
config_assign_int(cfg, &(cfgoptions[i]), cfgpath, u);
} else {
defval = config_setdefault_int(cfg, &(cfgoptions[i]), prefix);
defval = config_common_getdefault(cfg, &(cfgoptions[i]), prefix);
}
break;
@@ -401,7 +401,7 @@ int config_libconfig_get(configmodule_interface_t *cfg, paramdef_t *cfgoptions,
printf_params(cfg, "[LIBCONFIG] %s: %ld\n", cfgpath, *cfgoptions[i].i64ptr);
}
} else {
defval = config_setdefault_int64(cfg, &(cfgoptions[i]), prefix);
defval = config_common_getdefault(cfg, &(cfgoptions[i]), prefix);
}
break;
@@ -413,7 +413,7 @@ int config_libconfig_get(configmodule_interface_t *cfg, paramdef_t *cfgoptions,
if ( setting != NULL) {
read_intarray(cfg, &cfgoptions[i], setting, cfgpath);
} else {
defval = config_setdefault_intlist(cfg, &(cfgoptions[i]), prefix);
defval = config_common_getdefault(cfg, &(cfgoptions[i]), prefix);
}
break;
@@ -424,14 +424,14 @@ int config_libconfig_get(configmodule_interface_t *cfg, paramdef_t *cfgoptions,
*cfgoptions[i].dblptr = dbl;
printf_params(cfg, "[LIBCONFIG] %s: %lf\n", cfgpath, *(cfgoptions[i].dblptr));
} else {
defval = config_setdefault_double(cfg, &(cfgoptions[i]), prefix);
defval = config_common_getdefault(cfg, &(cfgoptions[i]), prefix);
}
break;
case TYPE_IPV4ADDR:
if ( !config_lookup_string(&(libconfig_privdata.cfg),cfgpath, (const char **)&str)) {
defval = config_setdefault_ipv4addr(cfg, &(cfgoptions[i]), prefix);
defval = config_common_getdefault(cfg, &(cfgoptions[i]), prefix);
} else {
int rst = config_assign_ipv4addr(cfg, cfgoptions, str);

View File

@@ -25,8 +25,7 @@ extern "C" {
#include "common/config/config_userapi.h"
void *config_allocate_new(configmodule_interface_t *cfg, int sz, bool autoFree);
void config_check_valptr(configmodule_interface_t *cfg, paramdef_t *cfgoptions, int elt_sz, int nb_elt);
#include "../config_userapi.h"
#include "../config_common.h"
int config_common_getdefault(configmodule_interface_t *cfg, paramdef_t *cfgoption, char *prefix);
}
#include <cstring>
#include <string>
@@ -44,71 +43,6 @@ class YamlConfig {
}
};
void SetDefault(configmodule_interface_t *cfg, paramdef_t *param)
{
switch (param->type) {
case TYPE_INT:
*param->iptr = param->defintval;
break;
case TYPE_UINT:
*param->uptr = param->defuintval;
break;
case TYPE_STRING:
if (param->defstrval != nullptr) {
if (param->numelt == 0) {
config_check_valptr(cfg, param, 1, strlen(param->defstrval) + 1);
}
sprintf(*param->strptr, "%s", param->defstrval);
}
break;
case TYPE_INT8:
*param->i8ptr = param->defintval;
break;
case TYPE_UINT8:
*param->u8ptr = param->defuintval;
break;
case TYPE_INT16:
*param->i16ptr = param->defintval;
break;
case TYPE_UINT16:
*param->u16ptr = param->defuintval;
break;
case TYPE_INT64:
*param->i64ptr = param->defint64val;
break;
case TYPE_UINT64:
*param->u64ptr = param->defint64val;
break;
case TYPE_DOUBLE:
*param->dblptr = param->defdblval;
break;
case TYPE_MASK:
*param->uptr = param->defuintval;
break;
case TYPE_STRINGLIST:
if (param->defstrlistval != nullptr) {
param->strlistptr = param->defstrlistval;
}
break;
case TYPE_INTARRAY:
if (param->defintarrayval) {
param->iptr = param->defintarrayval;
}
break;
case TYPE_UINTARRAY:
if (param->defintarrayval) {
param->uptr = (uint32_t *)param->defintarrayval;
}
break;
case TYPE_IPV4ADDR:
config_setdefault_ipv4addr(cfg, param, param->defstrval);
break;
default:
AssertFatal(false, "Unhandled type %d", param->type);
}
param->paramflags |= PARAMFLAG_PARAMSETDEF;
}
void SetNonDefault(configmodule_interface_t *cfg, const YAML::Node &node, paramdef_t *param)
{
auto optname = std::string(param->optname);
@@ -207,14 +141,12 @@ void SetNonDefault(configmodule_interface_t *cfg, const YAML::Node &node, paramd
param->paramflags |= PARAMFLAG_PARAMSET;
}
void GetParams(configmodule_interface_t *cfg, const YAML::Node &node, paramdef_t *params, int num_params)
void GetParam(configmodule_interface_t *cfg, const YAML::Node &node, paramdef_t *param)
{
for (auto i = 0; i < num_params; i++) {
if (node && node[std::string(params[i].optname)]) {
SetNonDefault(cfg, node, &params[i]);
} else {
SetDefault(cfg, &params[i]);
}
if (node && node[std::string(param->optname)]) {
SetNonDefault(cfg, node, param);
} else {
config_common_getdefault(cfg, param, nullptr);
}
}
@@ -229,7 +161,15 @@ extern "C" int config_yaml_init(configmodule_interface_t *cfg)
pthread_mutex_init(&cfg->memBlocks_mutex, NULL);
memset(cfg->oneBlock, 0, sizeof(cfg->oneBlock));
config_yaml::config = new config_yaml::YamlConfig(std::string(cfgP[0]));
try {
config_yaml::config = new config_yaml::YamlConfig(std::string(cfgP[0]));
} catch (const YAML::BadFile &e) {
fprintf(stderr, "[CONFIG] Error loading YAML file '%s': %s\n", cfgP[0], e.what());
return -1;
} catch (const YAML::Exception &e) {
fprintf(stderr, "[CONFIG] Error parsing YAML file '%s': %s\n", cfgP[0], e.what());
return -1;
}
return 0;
}
@@ -249,14 +189,14 @@ YAML::Node find_node(const std::string &prefix, YAML::Node node)
if (key.at(0) == '[' && key.back() == ']') {
// The key is an index to a sequence
if (!current.IsSequence()) {
throw std::invalid_argument("Incorrect yaml file structure");
throw std::invalid_argument("Expected a sequence at " + key);
}
int index = std::stoi(key.substr(1, key.size() - 2));
current = current[index];
continue;
}
if (!current.IsMap()) {
throw std::invalid_argument("Incorrect yaml file structure");
throw std::invalid_argument("Expected a map at " + key);
}
if (!current[key]) {
return config_yaml::invalid_node;
@@ -272,8 +212,14 @@ extern "C" int config_yaml_get(configmodule_interface_t *cfg, paramdef_t *cfgopt
if (prefix != nullptr) {
p = std::string(prefix);
}
auto node = find_node(p, YAML::Clone(config_yaml::config->config));
if (node == config_yaml::invalid_node) {
YAML::Node node;
try {
node = find_node(p, YAML::Clone(config_yaml::config->config));
if (node == config_yaml::invalid_node) {
return -1;
}
} catch (const std::invalid_argument &e) {
fprintf(stderr, "[CONFIG] Error finding node '%s': %s\n", p.c_str(), e.what());
return -1;
}
for (auto i = 0; i < numoptions; i++) {
@@ -282,7 +228,14 @@ extern "C" int config_yaml_get(configmodule_interface_t *cfg, paramdef_t *cfgopt
config_check_valptr(cfg, &cfgoptions[i], sizeof(void *), 1);
}
}
config_yaml::GetParams(cfg, node, cfgoptions, numoptions);
for (int i = 0; i < numoptions; i++) {
try {
config_yaml::GetParam(cfg, node, &cfgoptions[i]);
} catch (const YAML::Exception &e) {
fprintf(stderr, "[CONFIG] Config error: prefix: %s, setting: %s, error: %s\n", p.c_str(), cfgoptions[i].optname, e.what());
return -1;
}
}
return numoptions;
}
@@ -323,7 +276,14 @@ extern "C" int config_yaml_getlist(configmodule_interface_t *cfg,
}
}
config_yaml::GetParams(cfg, node[i], ParamList->paramarray[i], numparams);
for (int j = 0; j < numparams; j++) {
try {
config_yaml::GetParam(cfg, node[i], &ParamList->paramarray[i][j]);
} catch (const YAML::Exception &e) {
fprintf(stderr, "[CONFIG] Config error: prefix: %s, setting: %s, error: %s\n", path, ParamList->paramarray[i][j].optname, e.what());
return -1;
}
}
}
}

View File

@@ -11,3 +11,5 @@ configure_file(test_list_of_mappings.yml test_list_of_mappings.yml COPYONLY)
configure_file(test_int_array.yaml test_int_array.yaml COPYONLY)
configure_file(test_read_mapping_as_list.yaml test_read_mapping_as_list.yaml COPYONLY)
configure_file(test_ipv4.yaml test_ipv4.yaml COPYONLY)
configure_file(test_read_str_as_int.yaml test_read_str_as_int.yaml COPYONLY)
configure_file(malformed.yaml malformed.yaml COPYONLY)

View File

@@ -0,0 +1,13 @@
test:
-
bad_file:
- "testvalue1"
- "testvalue2"
- "testvalue3"
- "testvalue4"
- "testvalue5"
- "testvalue6"
- "testvalue7"
- "testvalue8"
- "testvalue9"
- "testvalue10" - yaml error

View File

@@ -0,0 +1,2 @@
test:
var: "test_var"

View File

@@ -78,8 +78,9 @@ TEST(yaml_config, yaml_get_existing_values) {
uint16_t value;
p.type = TYPE_UINT16;
p.u16ptr = &value;
p.paramflags = PARAMFLAG_MANDATORY;
char prefix[] = "test";
config_yaml_get(cfg, &p, 1, prefix);
EXPECT_EQ(config_yaml_get(cfg, &p, 1, prefix), 1);
EXPECT_EQ(value, i);
}
@@ -94,7 +95,7 @@ TEST(yaml_config, yaml_get_non_existing_values) {
cfg->cfgP[0] = strdup("test1.yaml");
EXPECT_EQ(config_yaml_init(cfg), 0);
// Testing paremters present in the test node
// Testing parameters not present in the test node
paramdef_t p = {0};
for (auto i = 4; i <= 5; i++) {
sprintf(p.optname, "%s%d", "value", i);
@@ -421,6 +422,43 @@ TEST(yaml_config, test_read_ipv4) {
free(p.defstrval);
}
TEST(yaml_config, yaml_read_str_as_int) {
configmodule_interface_t *cfg = static_cast<configmodule_interface_t*>(calloc(1, sizeof(*cfg)));
cfg->cfgP[0] = strdup("test_read_str_as_int.yaml");
EXPECT_EQ(config_yaml_init(cfg), 0);
// Testing paremters present in the test node
paramdef_t p = {0};
uint16_t value;
p.type = TYPE_UINT16;
p.u16ptr = &value;
p.paramflags = PARAMFLAG_MANDATORY;
char prefix[] = "test";
sprintf(p.optname, "%s", "var");
EXPECT_EQ(config_yaml_get(cfg, &p, 1, prefix), -1);
config_yaml_end(cfg);
free(cfg->cfgP[0]);
end_configmodule(cfg);
}
TEST(yaml_config, yaml_open_non_existing_file) {
configmodule_interface_t *cfg = static_cast<configmodule_interface_t*>(calloc(1, sizeof(*cfg)));
cfg->cfgP[0] = strdup("non_existing_file.yaml");
EXPECT_EQ(config_yaml_init(cfg), -1);
free(cfg->cfgP[0]);
end_configmodule(cfg);
}
TEST(yaml_config, malformed_file) {
configmodule_interface_t *cfg = static_cast<configmodule_interface_t*>(calloc(1, sizeof(*cfg)));
cfg->cfgP[0] = strdup("malformed.yaml");
EXPECT_EQ(config_yaml_init(cfg), -1);
free(cfg->cfgP[0]);
end_configmodule(cfg);
}
int main(int argc, char** argv)
{
logInit();

View File

@@ -207,26 +207,38 @@ typedef struct nsa_msg_t {
uint8_t msg_buffer[MAX_MESSAGE_SIZE];
} nsa_msg_t;
typedef enum nr_lcid_rb_type { NR_LCID_NONE = 0, NR_LCID_SRB = 1, NR_LCID_DRB = 2 } nr_lcid_rb_type;
typedef struct nr_lcid_rb_t {
nr_lcid_rb_type type;
union {
int srb_id;
int drb_id;
} choice;
} nr_lcid_rb_t;
typedef struct transport_layer_addr_s {
/**
* Transport Layer Address as a bitstring:
* - 32 bits for IPv4 (RFC 791),
* - 128 bits for IPv6 (RFC 2460),
* - 160 bits for both IPv4 and IPv6, with IPv4 in the first 32 bits.
* The S1AP/NGAP layer forwards this address (bitstring<1..160>)
* to S1-U/NG-U without interpreting it.
*/
/** Transport Layer Address in bytes:
* - 4 bytes for IPv4 (RFC 791), 16 bytes for IPv6 (RFC 2460),
* - 20 bytes for both IPv4 and IPv6, with IPv4 in the first 4 bytes. */
uint8_t length;
/// Buffer: address in network byte order
uint8_t buffer[20];
} transport_layer_addr_t;
/** @brief GTP tunnel configuration */
typedef struct {
// Tunnel endpoint identifier
uint32_t teid;
// Transport layer address
transport_layer_addr_t addr;
} gtpu_tunnel_t;
//-----------------------------------------------------------------------------
// GTPV1U TYPES
//-----------------------------------------------------------------------------
typedef uint32_t teid_t; // tunnel endpoint identifier
typedef uint8_t ebi_t; // eps bearer id
typedef uint8_t pdusessionid_t;
//-----------------------------------------------------------------------------
//

View File

@@ -24,9 +24,11 @@ event get_event(int socket, OBUF *event_buffer, void *database)
again:
if (fullread(socket, &length, 4) == -1) goto read_error;
#ifdef T_SEND_TIME
if (length < sizeof(struct timespec)) goto error;
if (fullread(socket, &t, sizeof(struct timespec)) == -1) goto read_error;
length -= sizeof(struct timespec);
#endif
if (length < sizeof(int)) goto error;
if (fullread(socket, &type, sizeof(int)) == -1) goto read_error;
length -= sizeof(int);
if (event_buffer->omaxsize < length) {
@@ -48,6 +50,9 @@ again:
return new_event(type, length, event_buffer->obuf, database);
#endif
error:
printf("error: bad data in get_event()\n");
read_error:
return (event){.type = -1};
}
@@ -64,6 +69,9 @@ event new_event(int type, int length, char *buffer, void *database)
int i;
int offset;
/* arbitrary limit to 1GiB (to simplify size checks) */
if (length < 0 || length > 1024 * 1024 * 1024) goto fatal;
#ifdef T_SEND_TIME
e.sending_time = sending_time;
#endif
@@ -87,26 +95,33 @@ event new_event(int type, int length, char *buffer, void *database)
for (i = 0; i < f.count; i++) {
//e.e[i].offset = offset;
if (!strcmp(f.type[i], "int")) {
if (offset + 4 > length) goto fatal;
e.e[i].type = EVENT_INT;
e.e[i].i = *(int *)(&buffer[offset]);
offset += 4;
} else if (!strcmp(f.type[i], "ulong")) {
if (offset + sizeof(unsigned long) > length) goto fatal;
e.e[i].type = EVENT_ULONG;
e.e[i].ul = *(unsigned long *)(&buffer[offset]);
offset += sizeof(unsigned long);
} else if (!strcmp(f.type[i], "float")) {
if (offset + sizeof(float) > length) goto fatal;
e.e[i].type = EVENT_FLOAT;
e.e[i].f = *(float *)(&buffer[offset]);
offset += sizeof(float);
} else if (!strcmp(f.type[i], "string")) {
if (offset + 1 > length) goto fatal;
e.e[i].type = EVENT_STRING;
e.e[i].s = &buffer[offset];
while (buffer[offset]) offset++;
while (offset < length && buffer[offset]) offset++;
if (offset == length) goto fatal;
offset++;
} else if (!strcmp(f.type[i], "buffer")) {
if (offset + sizeof(int) > length) goto fatal;
int len;
e.e[i].type = EVENT_BUFFER;
len = *(int *)(&buffer[offset]);
if (len <= 0 || offset + len + sizeof(int) > length) goto fatal;
e.e[i].bsize = len;
e.e[i].b = &buffer[offset+sizeof(int)];
offset += len+sizeof(int);
@@ -119,4 +134,8 @@ event new_event(int type, int length, char *buffer, void *database)
if (e.ecount==0) { printf("FORMAT not set in event %d\n", type); abort(); }
return e;
fatal:
printf("fatal: bad buffer in new_event\n");
abort();
}

View File

@@ -46,8 +46,8 @@ int main(int n, char **v)
/* read event from file */
if (fread(&length, 4, 1, in) != 1) break;
if (ebuf.omaxsize < length) {
ebuf.omaxsize = (length + 65535) & ~65535;
if (ebuf.omaxsize < length + 4) {
ebuf.omaxsize = (length + 4 + 65535) & ~65535;
ebuf.obuf = realloc(ebuf.obuf, ebuf.omaxsize);
if (ebuf.obuf == NULL) { printf("out of memory\n"); exit(1); }
}

View File

@@ -157,8 +157,8 @@ int main(int n, char **v)
/* read event from file */
if (fread(&length, 4, 1, in) != 1) break;
if (ebuf.omaxsize < length) {
ebuf.omaxsize = (length + 65535) & ~65535;
if (ebuf.omaxsize < length + 4) {
ebuf.omaxsize = (length + 4 + 65535) & ~65535;
ebuf.obuf = realloc(ebuf.obuf, ebuf.omaxsize);
if (ebuf.obuf == NULL) { printf("out of memory\n"); exit(1); }
}

View File

@@ -114,8 +114,8 @@ int read_tracee(int s, OBUF *ebuf, int *_type, int32_t *_length)
int vpos = 0;
if (fullread(s, &length, 4) == -1) return -1;
if (ebuf->omaxsize < length) {
ebuf->omaxsize = (length + 65535) & ~65535;
if (ebuf->omaxsize < length + 4) {
ebuf->omaxsize = (length + 4 + 65535) & ~65535;
ebuf->obuf = realloc(ebuf->obuf, ebuf->omaxsize);
if (ebuf->obuf == NULL) { printf("out of memory\n"); exit(1); }
}
@@ -123,10 +123,12 @@ int read_tracee(int s, OBUF *ebuf, int *_type, int32_t *_length)
memcpy(v+vpos, &length, 4);
vpos += 4;
#ifdef T_SEND_TIME
if (length < sizeof(struct timespec)) return -1;
if (fullread(s,v+vpos,sizeof(struct timespec))==-1) return -1;
vpos += sizeof(struct timespec);
length -= sizeof(struct timespec);
#endif
if (length < sizeof(int)) return -1;
if (fullread(s, &type, sizeof(int)) == -1) return -1;
memcpy(v+vpos, &type, sizeof(int));
vpos += sizeof(int);

View File

@@ -133,8 +133,8 @@ int main(int n, char **v)
int vpos = 0;
if (fullread(socket, &length, 4) == -1) goto read_error;
if (ebuf.omaxsize < length) {
ebuf.omaxsize = (length + 65535) & ~65535;
if (ebuf.omaxsize < length + 4) {
ebuf.omaxsize = (length + 4 + 65535) & ~65535;
ebuf.obuf = realloc(ebuf.obuf, ebuf.omaxsize);
if (ebuf.obuf == NULL) { printf("out of memory\n"); exit(1); }
}
@@ -142,10 +142,12 @@ int main(int n, char **v)
memcpy(v+vpos, &length, 4);
vpos += 4;
#ifdef T_SEND_TIME
if (length < sizeof(struct timespec)) goto read_error;
if (fullread(socket,v+vpos,sizeof(struct timespec))==-1) goto read_error;
vpos += sizeof(struct timespec);
length -= sizeof(struct timespec);
#endif
if (length < sizeof(int)) goto read_error;
if (fullread(socket, &type, sizeof(int)) == -1) goto read_error;
memcpy(v+vpos, &type, sizeof(int));
vpos += sizeof(int);

View File

@@ -146,8 +146,8 @@ int main(int n, char **v)
/* read event from file */
if (fread(&length, 4, 1, in) != 1) break;
if (ebuf.omaxsize < length) {
ebuf.omaxsize = (length + 65535) & ~65535;
if (ebuf.omaxsize < length + 4) {
ebuf.omaxsize = (length + 4 + 65535) & ~65535;
ebuf.obuf = realloc(ebuf.obuf, ebuf.omaxsize);
if (ebuf.obuf == NULL) { printf("out of memory\n"); exit(1); }
}

View File

@@ -23,15 +23,21 @@
#include <assert.h>
#include <string.h>
#include "common/utils/utils.h" // for malloc_or_fail
byte_array_t create_byte_array(const size_t len, const uint8_t* buffer)
{
byte_array_t result = {.len = len};
if (len) {
result.buf = malloc_or_fail(len);
memcpy(result.buf, buffer, len);
}
return result;
}
byte_array_t copy_byte_array(byte_array_t src)
{
byte_array_t dst = {0};
dst.buf = malloc(src.len);
assert(dst.buf != NULL && "Memory exhausted");
memcpy(dst.buf, src.buf, src.len);
dst.len = src.len;
return dst;
return create_byte_array(src.len, src.buf);
}
void free_byte_array(byte_array_t ba)

View File

@@ -28,6 +28,13 @@
#include <stdint.h>
#include <stdlib.h>
#define FREE_AND_ZERO_BYTE_ARRAY(BA) \
do { \
free_byte_array(BA); \
BA.buf = NULL; \
BA.len = 0; \
} while (0)
typedef struct {
size_t len;
uint8_t* buf;
@@ -43,5 +50,6 @@ bool eq_byte_array(const byte_array_t* m0, const byte_array_t* m1);
byte_array_t cp_str_to_ba(const char* str);
char* cp_ba_to_str(const byte_array_t ba);
byte_array_t create_byte_array(const size_t len, const uint8_t* buffer);
#endif

View File

@@ -123,11 +123,10 @@ void seq_arr_erase_it(seq_arr_t* arr, void* start_it, void* end_it, void (*free_
return;
if (free_func != NULL) {
void* start_it = seq_arr_front(arr);
void* end_it = seq_arr_end(arr);
while (start_it != end_it) {
free_func(start_it);
start_it = seq_arr_next(arr, start_it);
void* it = start_it;
while (it != end_it) {
free_func(it);
it = seq_arr_next(arr, it);
}
}

View File

@@ -34,6 +34,9 @@ SOFTWARE.
#include <stdlib.h>
#include <stdint.h>
#define FOR_EACH_SEQ_ARR(type, var, arr) \
for (type var = seq_arr_front(arr); var != seq_arr_end(arr); var = seq_arr_next(arr, var))
typedef struct seq_arr_s {
uint8_t* data;
size_t size;

View File

@@ -36,6 +36,13 @@ static int compar(const void* m0, const void* m1)
return 1;
}
static int free_func_call_count = 0;
static void dummy_free_func(void* it)
{
++free_func_call_count;
}
int main()
{
seq_arr_t arr = {0};
@@ -83,6 +90,19 @@ int main()
void* it = bsearch(&key, base, nmemb, size, compar);
assert(seq_arr_dist(&arr, seq_arr_front(&arr), it) == 4);
// Regression test: erase a partial range only
// Erase 92, 93, 94 (i.e., indices 1 to 3)
int* start = seq_arr_at(&arr, 1);
int* end = seq_arr_at(&arr, 4);
seq_arr_erase_it(&arr, start, end, dummy_free_func);
// Now values should be: [91, 95, 96, 97, 98, 99]
assert(free_func_call_count == 3);
assert(seq_arr_size(&arr) == 6);
assert(*(int*)seq_arr_at(&arr, 0) == 91);
assert(*(int*)seq_arr_at(&arr, 1) == 95);
assert(*(int*)seq_arr_at(&arr, 5) == 99);
// Free data structure
seq_arr_free(&arr, NULL);

View File

@@ -207,7 +207,7 @@ int get_smallest_supported_bandwidth_index(int scs, frequency_range_t frequency_
return -1; // not found
}
// Table 5.2-1 NR operating bands in FR1 & FR2 (3GPP TS 38.101)
// Table 5.2-1 NR operating bands in FR1 & FR2 (3GPP TS 38.101) (Rel.17)
// Table 5.4.2.3-1 Applicable NR-ARFCN per operating band in FR1 & FR2 (3GPP TS 38.101)
// Notes:
// - N_OFFs for bands from 80 to 89 and band 95 is referred to UL
@@ -236,6 +236,7 @@ const nr_bandentry_t nr_bandtable[] = {{1, 1920000, 1980000, 2110000, 2170000, 2
{40, 2300000, 2400000, 2300000, 2400000, 20, 460000, 100},
{41, 2496000, 2690000, 2496000, 2690000, 3, 499200, 15},
{41, 2496000, 2690000, 2496000, 2690000, 6, 499200, 30},
{46, 5150000, 5925000, 5150000, 5925000, 1, 743334, 15},
{47, 5855000, 5925000, 5855000, 5925000, 1, 790334, 15},
{48, 3550000, 3700000, 3550000, 3700000, 1, 636667, 15},
{48, 3550000, 3700000, 3550000, 3700000, 2, 636668, 30},
@@ -273,6 +274,11 @@ const nr_bandentry_t nr_bandtable[] = {{1, 1920000, 1980000, 2110000, 2170000, 2
{94, 880000, 915000, 1432000, 1517000, 20, 286400, 100},
{95, 2010000, 2025000, 000, 000, 20, 402000, 100},
{96, 5925000, 7125000, 5925000, 7125000, 1, 795000, 15},
{100, 874400, 880000, 919400, 925000, 20, 174880, 100},
{101, 1900000, 1910000, 1900000, 1910000, 20, 380000, 100},
{102, 5925000, 6425000, 5925000, 6425000, 1, 795000, 15},
{104, 6425000, 7125000, 6425000, 7125000, 1, 828334, 15},
{104, 6425000, 7125000, 6425000, 7125000, 2, 828334, 30},
{254, 1610000, 1626500, 2483500, 2500000, 20, 496700, 100},
{254, 1610000, 1626500, 2483500, 2500000, 2, 496700, 10},
{255, 1626500, 1660500, 1525000, 1559000, 20, 305000, 100},
@@ -288,7 +294,7 @@ const nr_bandentry_t nr_bandtable[] = {{1, 1920000, 1980000, 2110000, 2170000, 2
{261, 27500040, 28350000, 27500040, 28350000, 1, 2070833, 60},
{261, 27500040, 28350000, 27500040, 28350000, 2, 2070833, 120}};
// synchronization raster per band tables (Rel.15)
// synchronization raster per band tables (Rel.17)
// (38.101-1 Table 5.4.3.3-1 and 38.101-2 Table 5.4.3.3-1)
// band nb, sub-carrier spacing index, Range of gscn (First, Step size, Last)
// clang-format off
@@ -321,8 +327,9 @@ const sync_raster_t sync_raster[] = {
{40, 1, 5762, 1, 5989},
{41, 0, 6246, 3, 6717},
{41, 1, 6252, 3, 6714},
{46, 1, 8993, 1, 9530},
{48, 1, 7884, 1, 7982},
{50, 0, 3584, 1, 3787},
{50, 1, 3590, 1, 3781},
{51, 0, 3572, 1, 3574},
{53, 0, 6215, 1, 6232},
{53, 1, 6221, 1, 6226},
@@ -343,7 +350,13 @@ const sync_raster_t sync_raster[] = {
{91, 0, 3572, 1, 3574},
{92, 0, 3584, 1, 3787},
{93, 0, 3572, 1, 3574},
{94, 0, 3584, 1, 3587},
{94, 0, 3584, 1, 3787},
{96, 1, 9531, 1, 10363},
{100, 0, 2303, 1, 2307},
{101, 0, 4754, 1, 4768},
{101, 1, 4760, 1, 4764},
{102, 1, 9531, 1, 9877},
{104, 1, 9882, 7, 10358},
{254, 0, 6215, 1, 6244},
{254, 1, 6218, 1, 6241},
{255, 0, 3818, 1, 3892},

View File

@@ -475,41 +475,5 @@ typedef struct timer_elm_s {
return 0;
}
void log_scheduler(const char* label)
{
int policy = sched_getscheduler(0);
struct sched_param param;
if (sched_getparam(0, &param) == -1)
{
LOG_E(HW, "sched_getparam: %s\n", strerror(errno));
abort();
}
cpu_set_t cpu_set;
if (sched_getaffinity(0, sizeof(cpu_set), &cpu_set) == -1)
{
LOG_E(HW, "sched_getaffinity: %s\n", strerror(errno));
abort();
}
int num_cpus = sysconf(_SC_NPROCESSORS_ONLN);
if (num_cpus < 1)
{
LOG_E(HW, "sysconf(_SC_NPROCESSORS_ONLN): %s\n", strerror(errno));
abort();
}
char buffer[num_cpus];
for (int i = 0; i < num_cpus; i++)
{
buffer[i] = CPU_ISSET(i, &cpu_set) ? 'Y' : '-';
}
LOG_A(HW, "Scheduler policy=%d priority=%d affinity=[%d]%.*s label=%s\n",
policy,
param.sched_priority,
num_cpus,
num_cpus,
buffer,
label);
}
} // extern "C"

View File

@@ -566,7 +566,6 @@ int timer_remove(long timer_id);
int signal_handle(int *end);
int signal_mask(void);
void log_scheduler(const char *label);
#ifdef __cplusplus
}
#endif

View File

@@ -34,7 +34,7 @@
#include "openair2/RRC/NR/nr_rrc_defs.h"
#include "openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h"
#include "openair2/RRC/NR/nr_rrc_config.h"
#include "openair2/LAYER2/NR_MAC_gNB/nr_radio_config.h"
#include "openair2/LAYER2/NR_MAC_gNB/mac_proto.h"
#include "openair2/LAYER2/nr_rlc/nr_rlc_oai_api.c"
#include "common/utils/nr/nr_common.h"

View File

@@ -7,34 +7,6 @@
#include <errno.h>
#include "utils.h"
const char *hexdump(const void *data, size_t data_len, char *out, size_t out_len)
{
char *p = out;
char *endp = out + out_len;
const uint8_t *q = data;
snprintf(p, endp - p, "[%zu]", data_len);
p += strlen(p);
for (size_t i = 0; i < data_len; ++i)
{
if (p >= endp)
{
static const char ellipses[] = "...";
char *s = endp - sizeof(ellipses);
if (s >= p)
{
strcpy(s, ellipses);
}
break;
}
snprintf(p, endp - p, " %02X", *q++);
p += strlen(p);
}
return out;
}
/****************************************************************************
** **
** Name: hex_char_to_hex_value() **

View File

@@ -109,8 +109,6 @@ static inline void *malloc_or_fail(size_t size)
#define PAGE_MASK 0xfffff000
#define virt_to_phys(x) (x)
const char *hexdump(const void *data, size_t data_len, char *out, size_t out_len);
// Converts an hexadecimal ASCII coded digit into its value. **
int hex_char_to_hex_value (char c);
// Converts an hexadecimal ASCII coded string into its value.**

View File

@@ -1677,6 +1677,7 @@ INPUT = \
@CMAKE_CURRENT_SOURCE_DIR@/../openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c \
@CMAKE_CURRENT_SOURCE_DIR@/../openair2/LAYER2/NR_MAC_gNB/mac_rrc_ul_direct.c \
@CMAKE_CURRENT_SOURCE_DIR@/../openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair2/LAYER2/NR_MAC_gNB/nr_radio_config.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair2/LAYER2/NR_MAC_gNB/mac_rrc_dl_handler.c \
@CMAKE_CURRENT_SOURCE_DIR@/../openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c \
@CMAKE_CURRENT_SOURCE_DIR@/../openair2/LAYER2/NR_MAC_gNB/mac_rrc_dl_handler.h \
@@ -1687,6 +1688,7 @@ INPUT = \
@CMAKE_CURRENT_SOURCE_DIR@/../openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c \
@CMAKE_CURRENT_SOURCE_DIR@/../openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_phytest.c \
@CMAKE_CURRENT_SOURCE_DIR@/../openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_bch.c \
@CMAKE_CURRENT_SOURCE_DIR@/../openair2/LAYER2/NR_MAC_gNB/nr_radio_config.c \
@CMAKE_CURRENT_SOURCE_DIR@/../openair2/LAYER2/openair2_proc.c \
@CMAKE_CURRENT_SOURCE_DIR@/../openair2/LAYER2/RLC/rlc.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair2/LAYER2/NR_MAC_UE/mac_tables.c \
@@ -1847,7 +1849,6 @@ INPUT = \
@CMAKE_CURRENT_SOURCE_DIR@/../openair2/RRC/NR/nr_rrc_defs.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair2/RRC/NR/cucp_cuup_if.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair2/RRC/NR/cucp_cuup_direct.c \
@CMAKE_CURRENT_SOURCE_DIR@/../openair2/RRC/NR/nr_rrc_config.c \
@CMAKE_CURRENT_SOURCE_DIR@/../openair2/RRC/NR/mac_rrc_dl_direct.c \
@CMAKE_CURRENT_SOURCE_DIR@/../openair2/RRC/NR/rrc_gNB_radio_bearers.c \
@CMAKE_CURRENT_SOURCE_DIR@/../openair2/RRC/NR/rrc_gNB_NGAP.h \
@@ -1858,7 +1859,6 @@ INPUT = \
@CMAKE_CURRENT_SOURCE_DIR@/../openair2/RRC/NR/rrc_gNB_UE_context.c \
@CMAKE_CURRENT_SOURCE_DIR@/../openair2/RRC/NR/cucp_cuup_e1ap.c \
@CMAKE_CURRENT_SOURCE_DIR@/../openair2/RRC/NR/rrc_gNB.c \
@CMAKE_CURRENT_SOURCE_DIR@/../openair2/RRC/NR/nr_rrc_config.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair2/RRC/NR/rrc_gNB_radio_bearers.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair2/RRC/NR/rrc_gNB_NGAP.c \
@CMAKE_CURRENT_SOURCE_DIR@/../openair2/RRC/NR/mac_rrc_dl_f1ap.c \

View File

@@ -231,6 +231,9 @@ Or by providing this the the command line parameters:
The main parameters to cope with the large NTN propagation delay are cellSpecificKoffset, ta-Common, ta-CommonDrift and the ephemeris data (satellite position and velocity vectors).
The parameter `ntn-UlSyncValidityDuration-r17` indicates the maximum time duration from epochtime during which the UE can apply assistance information without having acquired new assistance information. i.e this enables UE to re-read SIB19 before timer with value ulSyncValidityDuration expires. The unit of the field is in seconds. Example values for GEO: 240s, MEO: 20s, LEO: 5s.
As epochtime is not implemented yet, UE starts the timer from the TTI where SIB19 is received with ntn-UlSyncValidityDuration-r17 IE.
The parameter `cellSpecificKoffset_r17` is the scheduling offset used for the timing relationships that are modified for NTN (see TS 38.213).
The unit of the field Koffset is number of slots for a given subcarrier spacing of 15 kHz.

View File

@@ -10,6 +10,8 @@ There are three main beamforming techinques: analog, digital and hybrid. The nam
The presence of a limited number of predefined beams at RU poses constraints to the scheduler at gNB. As a matter of fact, the scheduler can serve only a limited number of beams, depending on the RU characteristics (possibly only 1), in a given time scale, that also depends on the RU characteristics (e.g. 1 slot or 1 symbol). This limitation doesn't exist for digital beamforming.
Analog beamforming implementation also allows to enable distributed antenna systems (DAS), where each beam corrisponds to one antenna (or a set of antennas) of the system. In this scenario, the scheduler constaint is alleviated because normally the number of concurrent beams allowed equals the total number of beams.
# Configuration file fields for analog beamforming
A set of parameters in configuration files controls the implementation of analog beamforming and instructs the scheduler on how to behave in such scenarios. Since most notably this technique in 5G is employed in FR2, the configuration file example currently available is a RFsim one for band 261. [Config file example](../ci-scripts/conf_files/gnb.sa.band261.u3.32prb.rfsim.conf)
@@ -18,8 +20,9 @@ In the `MACRLC` section of configuration files, there are three new parameters:
- `set_analog_beamforming` can be set to 1 or 0 to activate or desactivate analog beamforming (default value is 0)
- `beam_duration` is the number of slots (currently minimum duration of a beam) the scheduler is tied to a beam (default value is 1)
- `beams_per_period` is the number of concurrent beams the RU can handle in the beam duration (default value is 1)
- `beam_weights` is a vector field containing the set of beam indices to be provided by the OAI L1 to the RU is also required. In current implementation, the number of beam indices should be equal to the number of SSBs transmitted
In the `gNBs` section of the configuration file, under the phyisical parameters, a vector field containing the set of beam indices to be provided by the OAI L1 to the RU is also required. This field is called `beam_weights`. In current implementation, the number of beam indices should be equal to the number of SSBs transmitted.
DAS is enabled by setting to 1 the parameter `enable_das` in the L1 section of the configuration file. In case of DAS enabled, the field `beam_weights` in `MACRLC` section can be omitted.
# Implementation in OAI scheduler
@@ -28,3 +31,28 @@ This matrix contains the beams already allocated in a given slot, to flag the sc
To this goal, we extended the virtual resource block (VRB) map by one dimension to also contain information per allocated beam. As said, the scheduler can independently schedule users in a number of beams up to `beams_per_period` concurrently.
It is important to note that in current implementation, there are several periodical channels, e.g. PRACH or PUCCH for CSI et cetera, that have the precendence in being assigned a beam, that is because the scheduling is automatic, set in RRC configuration, and not up to the scheduler. For these instances, we assume the beam is available (if not there are assertions to stop the process). For data channels, the currently implemented PF scheduler is used. The only modification is that a UE can be served only if there is a free beam available or the one of the beams already in use correspond to that UE beam.
# FAPI implementation
To be noted that in our implementation analog beamforming is only supported in non-split/monolithic mode because we don't support yet SCF P19 interface that would be needed to manage these procedure in a split scenario with SCF FAPI.
In `config_request` structure, a vendor extension (`nfapi_nr_analog_beamforming_ve_t`) configures the lower layers at initialization with the following information:
- `analog_bf_vendor_ext` which can assume values 1 or 0 for enabling or disabling analog beamforming
- `num_beams_period_vendor_ext` which corresponds to the configuration parameter `beams_per_period`
- `total_num_beams_vendor_ext` which corresponds to the number of beams configured in `beam_weights`
- `analog_beam_list` which contains the RU beamforming indices configured in `beam_weights`
Additionally, L2 provides in each channel FAPI message information about the beam index. Small Cell Forum (SCF) FAPI provides in its PHY API specifications for the channels only a field for digital beamforming as part of the `precoding_and_beamforming` stucture. Therefore without a better option, we are currently using that one to store the internal analog beamforming index. This is the index used internally by the code to progressively identify the beam with a value from 0 to `total_num_beams_vendor_ext`.
# L1 implementation
To handle multiple concurrent beams, the buffers containing Tx and Rx data in frequency domain (`txdataF` and `rxdataF`) have been extended by one dimension to contain multiple concurrent beams to be transmitted/received.
The function `beam_index_allocation`, called by every L1 channel, is responsible to match the FAPI analog beam index to the RU beam index and to store the latter `beam_id` structure, which allocates the beams per symbol, despite L2 only supporting beam change at slot level. At the same time, the function returns the concurrent beam index, to be used to store data in frequency domain buffers. While doing so, the function also checks if there is room for current beam in the list of concurrent beams, which should always be the case, if L2 properly allocated the channels.
In case of DAS, since each beam corresponds to a specific antenna port, the `beam_index_allocation` function is simplified in the sense that the beam index corresponds to the antenna port index of the frequency domain buffers.
# RU implementation
The implementation is still work in progress.
The first dimension of the Tx and Rx buffers that used to contain the number of Tx/Rx antennas, it is now extended to contain the number of parallel streams which is the number of antennas multiplied by the number of concurrent beams.

View File

@@ -54,7 +54,11 @@ Start DU0:
sudo ./nr-softmodem --rfsim -O ../../../targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb-du.sa.band78.106prb.rfsim.pci0.conf --rfsimulator.serveraddr 127.0.0.1
Start the UE, and let it connect completely:
This will show an error `[HW] connect() to 127.0.0.1:4043 failed,
errno(111)`. _This is expected_, because the RFsim server is at the UE (to be
able to serve two RFsim clients, one DU each; see below for more info). Proceed
by starting the UE, and let it connect completely (this should make the error
go away):
sudo ./nr-uesoftmodem -C 3450720000 -r 106 --numerology 1 --ssb 516 -O <config> --rfsim --rfsimulator.serveraddr server
@@ -142,7 +146,7 @@ neighbour relation of the DUs at the CU. To do so, proceed as follows:
```
cat nrRRC_stats.log
```
1. Fill in the `neighbour-config.conf` configuration file as shown below, and
1. Fill in the [`neighbour-config.conf`](../ci-scripts/conf_files/neighbour-config.conf) configuration file as shown below, and
`@include` it in the CU file.
1. Start the CU and both DUs.
1. Bring the phone close to one cell, and leave flight mode. It should connect
@@ -157,7 +161,7 @@ triggered:
- Make sure that both DUs use the same hardware.
- Make sure that the UE sees both cells. For instance, you can switch to flight
mode, go closer to the other DU, and switch off flight mode -- the UE should
connect to that second UE.
connect to that second DU.
- We did not manage handover with every phone yet -- make sure you use one of
the list provided above.
@@ -246,6 +250,15 @@ nr_measurement_configuration = {
})
};
```
`@include` this configuration file inside the gNB section of CU file as shown below.
```
plmn_list = ({ mcc = 222; mnc = 01; mnc_length = 2; snssaiList = ({ sst = 1, sd = 0xffffff })});
@include "neighbour-config.conf"
```
# Handovers triggers and NTN

View File

@@ -40,6 +40,7 @@ RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get install --yes \
#gcc needed for build_oai
build-essential \
ccache \
psmisc \
git \
#use gcc-12 to avoid problems of default gcc-11 in FlexRIC
@@ -52,15 +53,15 @@ RUN apt-get update && \
flex \
m4 \
# python3-pip for conf template generation
python3-pip && \
python3-pip \
wget && \
update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-12 100 --slave /usr/bin/g++ g++ /usr/bin/g++-12 && \
pip3 install --ignore-installed pyyaml
# Add "Tini - A tiny but valid init for containers", https://github.com/krallin/tini
# it will be copied into target containers, to print exit numbers and handle signals properly
ENV TINI_VERSION=v0.19.0
ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini-${TARGETARCH} /tini
RUN chmod +x /tini
RUN wget https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini-${TARGETARCH} -O /tini && chmod +x /tini
# In some network environments, GIT proxy is required
RUN /bin/bash -c "if [[ -v NEEDED_GIT_PROXY ]]; then git config --global http.proxy $NEEDED_GIT_PROXY; fi"

View File

@@ -61,7 +61,7 @@ RUN /bin/sh oaienv && \
--gNB \
--build-lib 'telnetsrv enbscope uescope nrscope' \
-t oran_fhlib_5g --cmake-opt -Dxran_LOCATION=/opt/phy/fhi_lib/lib \
--build-e2 --cmake-opt -DXAPP_MULTILANGUAGE=OFF --cmake-opt -DKPM_VERSION=$KPM_VERSION --cmake-opt -DE2AP_VERSION=$E2AP_VERSION" &&\
--build-e2 --cmake-opt -DKPM_VERSION=$KPM_VERSION --cmake-opt -DE2AP_VERSION=$E2AP_VERSION" &&\
# Mainly to see if the sanitize option was perfectly executed
ldd ran_build/build/nr-softmodem && \
ldd ran_build/build/liboran_fhlib_5g.so && \
@@ -72,7 +72,6 @@ RUN mkdir -p openair2/E2AP/flexric/build && \
cd openair2/E2AP/flexric/build && \
scl enable gcc-toolset-13 "\
cmake -GNinja -DCMAKE_BUILD_TYPE=Release \
-DXAPP_MULTILANGUAGE=OFF \
-DKPM_VERSION=$KPM_VERSION \
-DE2AP_VERSION=$E2AP_VERSION .. &&\
ninja && \

View File

@@ -71,7 +71,7 @@ RUN /bin/sh oaienv && \
--gNB \
--build-lib "telnetsrv enbscope uescope nrscope" \
-t oran_fhlib_5g --cmake-opt -Dxran_LOCATION=/opt/phy/fhi_lib/lib \
--build-e2 --cmake-opt -DXAPP_MULTILANGUAGE=OFF --cmake-opt -DKPM_VERSION=$KPM_VERSION --cmake-opt -DE2AP_VERSION=$E2AP_VERSION \
--build-e2 --cmake-opt -DKPM_VERSION=$KPM_VERSION --cmake-opt -DE2AP_VERSION=$E2AP_VERSION \
$BUILD_OPTION && \
# Mainly to see if the sanitize option was perfectly executed
ldd ran_build/build/nr-softmodem && \
@@ -82,7 +82,6 @@ RUN /bin/sh oaienv && \
RUN mkdir -p openair2/E2AP/flexric/build && \
cd openair2/E2AP/flexric/build && \
cmake -GNinja -DCMAKE_BUILD_TYPE=Release \
-DXAPP_MULTILANGUAGE=OFF \
-DKPM_VERSION=$KPM_VERSION \
-DE2AP_VERSION=$E2AP_VERSION \
-DCMAKE_C_COMPILER=gcc-12 \

View File

@@ -41,8 +41,7 @@ RUN /bin/sh oaienv && \
scl enable gcc-toolset-13 "\
CXXFLAGS='-Werror -fstack-protector-strong' CFLAGS='-Werror -fstack-protector-strong' ./build_oai -c --ninja \
--eNB --gNB --RU --UE --nrUE \
--build-e2 --cmake-opt -DXAPP_MULTILANGUAGE=OFF --cmake-opt \
-DKPM_VERSION=$KPM_VERSION --cmake-opt -DE2AP_VERSION=$E2AP_VERSION \
--build-e2 --cmake-opt -DKPM_VERSION=$KPM_VERSION --cmake-opt -DE2AP_VERSION=$E2AP_VERSION \
--build-lib 'telnetsrv enbscope uescope nrscope' \
--build-tool-opt -k10 \
-w USRP -t Ethernet \
@@ -57,7 +56,6 @@ RUN mkdir -p openair2/E2AP/flexric/build && \
cd openair2/E2AP/flexric/build && \
scl enable gcc-toolset-13 "\
cmake -GNinja -DCMAKE_BUILD_TYPE=Release \
-DXAPP_MULTILANGUAGE=OFF \
-DKPM_VERSION=$KPM_VERSION \
-DE2AP_VERSION=$E2AP_VERSION .. &&\
ninja && \

View File

@@ -36,14 +36,19 @@ WORKDIR /oai-ran
COPY . .
# build all targets so final targets can be created afterwards
RUN /bin/sh oaienv && \
RUN \
# Mount CCache cache direrctory
--mount=type=cache,target=/root/.cache/ccache/ \
# Mount CPM package cache
--mount=type=cache,target=/root/.cache/cpm/ \
/bin/sh oaienv && \
cd cmake_targets && \
mkdir -p log && \
./build_oai -c --ninja \
--eNB --gNB --RU --UE --nrUE \
--build-lib "telnetsrv enbscope uescope nrscope" \
-w USRP -t Ethernet \
--build-e2 --cmake-opt -DXAPP_MULTILANGUAGE=OFF --cmake-opt -DKPM_VERSION=$KPM_VERSION --cmake-opt -DE2AP_VERSION=$E2AP_VERSION \
--build-e2 --cmake-opt -DKPM_VERSION=$KPM_VERSION --cmake-opt -DE2AP_VERSION=$E2AP_VERSION \
--noavx512 \
--build-tool-opt -k10 \
--cmake-opt -DCMAKE_C_FLAGS="-Werror" --cmake-opt -DCMAKE_CXX_FLAGS="-Werror" $BUILD_OPTION && \
@@ -54,10 +59,12 @@ RUN /bin/sh oaienv && \
ldd ran_build/build/*.so
## Build FlexRIC for SM Models
RUN mkdir -p openair2/E2AP/flexric/build && \
RUN \
# Mount CCache cache direrctory
--mount=type=cache,target=/root/.cache/ccache/ \
mkdir -p openair2/E2AP/flexric/build && \
cd openair2/E2AP/flexric/build && \
cmake -GNinja -DCMAKE_BUILD_TYPE=Release \
-DXAPP_MULTILANGUAGE=OFF \
-DKPM_VERSION=$KPM_VERSION \
-DE2AP_VERSION=$E2AP_VERSION \
-DCMAKE_C_COMPILER=gcc-12 \

Some files were not shown because too many files have changed in this diff Show More