Compare commits

..

2403 Commits

Author SHA1 Message Date
Jaroslava Fiedlerova
0690e79428 MWC2025: adjustment of Dockerfiles for build on test machines 2025-02-18 11:46:51 +01:00
Jaroslava Fiedlerova
4fa734c2c9 Merge remote-tracking branch 'origin/resource_mapping_optim' into mwc2025 2025-02-17 12:48:41 +01:00
Jaroslava Fiedlerova
585fbb947e Merge remote-tracking branch 'origin/fix-e1-pdu-handling' into mwc2025 2025-02-17 12:48:27 +01:00
Jaroslava Fiedlerova
b401909c22 Merge remote-tracking branch 'origin/fhi72-no-polling' into mwc2025 2025-02-17 12:48:13 +01:00
Jaroslava Fiedlerova
4ecf3cf877 Merge remote-tracking branch 'origin/ldpc_enc_avx512' into mwc2025 2025-02-17 12:47:47 +01:00
Jaroslava Fiedlerova
34970d38ef fix in nr_dlsch.c, dmrs_case2b 2025-02-17 10:22:17 +01:00
Raymond Knopp
fa38798521 bugfix in nr_dlsch.c 2025-02-16 23:26:51 +01:00
Robert Schmidt
e1d7306a43 Reduce indentation, add comment
Reduce one level of indentation, and explain why we wait for
physide_dl_tti callback.
2025-02-13 09:17:01 +01:00
Robert Schmidt
6706c9390d FHI72: Cleanup: Remove first_rx_set
first_rx_set is polling-specific: it makes the polling loop wait to only
check the frame/slot counter once we set it for the first time. However,
that is equivalent to checking the frame/slot directly, which will also
be 0 in the beginning.
2025-02-13 09:17:01 +01:00
Robert Schmidt
0420184518 FHI72: cleanup: remove first_read_set
first_read_set seems to have the function of making frame/slot time
advance only if we started to read the samples in
xran_fh_rx_read_slot(). I interpret that as "only advance the time if
the gNB is reading from xran", which does not make sense to me, because
xran advances the time anyway. Also, polling would not notice, and
no-polling would simply warn about double messages. So the outcome is
likely the same, whether first_read_set is set or not.

I checked in multiple CI runs; it happens that first_read_set is always
set already when oai_xran_fh_rx_callback() is called anyway.
2025-02-13 09:17:01 +01:00
Robert Schmidt
fd77306806 FHI72: make polling configurable in xran_fh_rx_read_slot(), default off
xran_fh_rx_read_slot() uses polling (a loop over cnt++) to wait for the
next frame/slot. The reasons I have been told is "it does not work
differently", or "there are real-time problems". None of those seem to
be true; by default disable polling, and use the queue instead.

It is possible to enable polling with the cmake option
OAI_FHI72_USE_POLLING=ON. Documentation has been updated to inform about
this change.
2025-02-13 09:17:01 +01:00
Robert Schmidt
595a80a3f7 Remove FHI72 memory workaround
The queue L1_rx_out was in place to keep RX/TX processing relatively
"close" to each other (in terms of time, since in RFsim, they might
advance faster than realtime; see also parent commit). This lead to a
memory leak in radios that do not use ru->feprx (no front-end processing
for RX, e.g., PRACH), as the code to read the L1_rx_out messages was
inside a block of if (ru->feprx). Move it out so that the queue is
always read and messages are freed to eliminate the memory leak, and
remove the workaround for FHI72 to avoid this memory leak.

This also allows to run RFsim when compiling FHI72, which was not
possible before this commit.

Closes: #812
2025-02-13 09:17:01 +01:00
Robert Schmidt
99c849c249 Refactor code to wait for free RX job
Some radios (e.g., RFsim) can run faster. A mechanism has been put in
place to keep RX/TX frame/slot numbers not too far from each other.
Refactor in a separate function with documentation to make this clearer.
2025-02-13 09:17:01 +01:00
Robert Schmidt
540d918a09 Detect double sync message and skip frames 2025-02-13 09:17:01 +01:00
Robert Schmidt
0e5bc42e3e FHI72: no poll: use pullNotifiedFIFO(), cleanup code, make compile
Move the extern definition to the header, to avoid type errors.
2025-02-13 09:17:01 +01:00
Robert Schmidt
2cd0bba9c4 notified_fifo: include malloc.h for memalign() 2025-02-13 09:17:00 +01:00
Robert Schmidt
984b917e59 FHI72: Remove unused defines and comments 2025-02-13 09:17:00 +01:00
Raymond Knopp
1d538592fe fixed compilation warnings and minor errors for aarch64 2025-02-12 11:59:52 +01:00
Raymond Knopp
6194b9a525 trace in nr_dlsim : since resource mapping and layer precoding are merged, the indication of timing was reworked in the statistics output 2025-02-12 11:59:52 +01:00
Laurent THOMAS
3edd989aff simplify nr_layer_mapping(), and use all simd sizes for the tail 2025-02-12 11:59:52 +01:00
Laurent THOMAS
9004787171 group two symbol loops to make one with smaller tsack size and smaller variables 2025-02-12 11:59:52 +01:00
Laurent THOMAS
f73afa393e group similar functions in one version, split one too large function in two functions 2025-02-12 11:59:52 +01:00
Laurent THOMAS
eb0dda59ac remove intermediate buffer and memory copy, continue to simplify nr pdsch computation 2025-02-12 11:51:28 +01:00
Laurent THOMAS
2fad8796b1 clean no_ptrs_dmrs_case() 2025-02-12 11:51:28 +01:00
Laurent THOMAS
5ff5d01fb9 simplify and order sizes of SIMD vectors 2025-02-12 11:51:28 +01:00
Laurent THOMAS
9d844135b1 local dmrs_mux and unaligned mod_dmrs 2025-02-12 11:51:28 +01:00
Laurent THOMAS
3ddb2d0502 very coarse grain dlsch computation function break into smaller functions 2025-02-12 11:51:28 +01:00
Laurent THOMAS
d928e68e12 create a separate function to process dlsch ptrs 2025-02-12 11:51:28 +01:00
Laurent THOMAS
5526244ad6 create a function per dlsch_id 2025-02-12 11:51:28 +01:00
Laurent THOMAS
889b4b00e3 SIMD optimizations for Neon/AVX2/AVX512 in the PDSCH transmit path 2025-02-12 11:51:28 +01:00
Robert Schmidt
ada25ef6ca fix: is int 2025-02-12 11:39:16 +01:00
Robert Schmidt
d82efb5d10 Handle PDU session resource setup for existing PDU session
38.413 section 8.2.1.4 says that if PDU session resource setup req
contains an existing PDU session, that one should be reported as failed.
That is rather complicated for us to do; simply reject all PDU sessions
and let the core deal with that.
2025-02-12 09:54:53 +01:00
Robert Schmidt
d3fb14a8b2 Delay multi-PDU session: to be improved, commit message to be written 2025-02-12 09:54:53 +01:00
Robert Schmidt
190dfcf957 Add PDU session add log in E1 handler
bearer context modification and release print a message, so do the same
here as well.
2025-02-12 09:54:53 +01:00
Robert Schmidt
5c5d45cd8d Fix double-E1 bearer context setup req in E1 handler
If two PDU sessions are to be setup, the CU-CP sends two bearer context
setup requests. When running only the CU-UP, we inconditionally tried to
set up the CU-UP UE ID identifiers upon reception of the bearer context
setup request, leading to an assert. Check if the IDs are not already
set up, to avoid assertions in that case.
2025-02-12 09:54:53 +01:00
Robert Schmidt
ff58b5e169 Merge branch 'integration_2025_w06' into 'develop'
Integration: `2025.w06`

See merge request oai/openairinterface5g!3248

* !3202 Simplify usage of the old segment decoding libraries with the slot coding interface
* !3240 Fix typos in NR_SA_Tutorial_OAI_multi_UE.md
* !3242 Period based phytest bitmap
* !3238 Refactor tun_if.h
* !3000 Improvements for NR dlsim and ulsim
* !3239 Remove inexistant SIMD instruction
* !3246 Deadlock avoidance in rfsimulator
* !3251 nFAPI: make 4-layer on 100MHz work
* !3243 Reset E1 UE contexts after E1 Setup Response
* !3245 Added Support of 35Mhz,45Mhz,70Mhz Bandwidth
* !3219 E1AP enc/dec lib improvements
2025-02-12 06:55:05 +00:00
Robert Schmidt
859494112a Merge remote-tracking branch 'origin/e1ap-lib-improvements' into integration_2025_w06 (!3219)
E1AP enc/dec lib improvements

This MR is including some fixes and improvements for the E1AP library,
focusing mostly on Bearer Context Management:

- struct reorganization: split setup and modification request messages
  into distinct structures, ensuring compliance with 3GPP TS 38.463
  specifications
- add encoding/decoding sub-functions for different IEs
- improvements to Bearer Context Management: Implemented various
  improvements to the E1 Bearer Context Setup Response and Request,
  including the adoption of encoding/decoding sub-functions for
  different IEs
- use lib functions whenever need (e.g. cp_bearer_context_setup_request
  in cucp_cuup_e1ap.c)
- handle optional struct members as pointers
- updated copy/equality check utility functions

EDIT: The MR is also including the changes from !3222 (closed):

> While testing E1 with security enabled for DRBs, it was found that
> data traffic was not functional.
>
> The problem was that security settings were modified in the PDCP
> reestablishment happening when receiving Bearer Context Modification
> Request.
>
> So some restructuring was done.
>
> The actual fix is in 18176297, the others are for support. Basically
> we introduce a boolean to check if the security settings are present in
> Bearer Context Modification Request and we change PDCP security settings
> only if they are.
>
> (Note that in OAI CU security settings are not sent in Bearer Context
> Modification Request, so we could also remove all this, but we need to
> be compatible with other cu-up and/or cu-cp.)
2025-02-11 17:53:40 +01:00
Robert Schmidt
805ed55788 Merge remote-tracking branch 'origin/NR_add_new_BW' into integration_2025_w06 (!3245)
Added Support of 35Mhz,45Mhz,70Mhz Bandwidth

Added Support of 35Mhz,45Mhz,70Mhz Bandwidth for 30Khz Subcarrier
Spacing, Also added 35Mhz, 45Mhz bw for 15Khz Subcarrierspacing.

Referred Spec TS 38.101 v18.6.0 section 5.3.2, table 5.3.2-1
2025-02-11 17:47:59 +01:00
Robert Schmidt
1be038c88b Merge remote-tracking branch 'origin/fix-cuup-assert-reconnect' into integration_2025_w06 (!3243)
Reset E1 UE contexts after E1 Setup Response

38.463 sec. 8.2.3 says

> This procedure also re-initialises the E1AP UE-related contexts (if
> any) and erases all related signalling connections in the two nodes
> like a Reset procedure would do.

Hence, delete all contexts after reception of E1 Setup Response. This
minimizes a risk of receiving an E1 bearer setup req for an existing UE,
which currently leads to an assert [we trust the CU-CP does not send the
same UE ID twice, as we only "mirror" the existing UE ID].  After this
MR, this is what happens if these entities fail:

- CU-CP fails: all context lost implicitly, upon reconnection, both DU
  and CU-UP reset all contexts (like "start from zero")
- DU fails: CU-CP triggers NGAP UE context release request immediately
  (radio connection with UE lost), all UE contexts attached to this DU
  cleared (like "start from zero" for affected DU)
- CU-UP fails: initially, nothing (UE has no user plane); upon
  reconnection of CU-UP, CU-CP triggers NGAP UE context release request
  (cause radio connection with UE lost) and sends F1 Reset to DU, all UE
  contexts associated to this DU cleared (like "start from zero")

for the last case, a possible improvement could be to use the F1 Reset
message to only clear affected UE conetxts. I chose not to do this,
because this MR is very big now already, and possible "victim" UEs
that were not at that CU-UP will reconnect as well
2025-02-11 17:45:14 +01:00
Guido Casati
ac6b1b1894 Enable integrity in E1 SABOX CI test 2025-02-11 14:04:32 +01:00
Cedric Roux
410446cbe9 e1: no need to pass security information since it does not change
In Bearer Context Modification Request, the security information
field is needed only if we change the PDCP algorithms/keys. Since we
don't, no need to pass it.

Let's keep the old code, maybe the current understanding of the
specifications is wrong.
2025-02-11 14:04:32 +01:00
Cedric Roux
1273446804 e1: change security settings only if parameters present
If the Bearer Context Modification Request does not contain security
information, the PDCP entity shall keep the currently configured security
settings.

Passing -1 for ciphering_algorithm and integrity_algorithm is the way
to implement this logic.
2025-02-11 14:04:32 +01:00
Cedric Roux
182b05bd5c e1: security information is optional in bearer modification
Check if the IE is memory allocated to deal with presence/absence of this information
element in Bearer Context Modification Request and add encoding/decoding
in the code.

Note that for decoding the integrity settings may be absent, in which
case we consider NIA0 to be used (no integrity protection). To be refined
if needed.

And for encoding, we always encode integrity settings, even if it's NIA0.
May also be refined if needed.
2025-02-11 14:04:32 +01:00
Cedric Roux
a1eb8f35fb bugfix: use correct algorithm and derive keys accordingly
This was not a big problem, but we were advertising wrong
algorithm and deriving keys using this wrong algorithm in case
DRB ciphering and/or integrity was not active. (Say SRBs
are configured with NIA2 but DRBs are configured without
integrity, we would advertise NIA2 and send the integrity
key derived for NIA2, instead of NIA0 for both.)

It was not a problem because in the PDU Session Resource To Setup
item, there is "securityIndication" which we use to effectively
activate/deactivate the ciphering and/or integrity.

But it did not look clean to see a SecurityInformation with
incorrect data when inspecting the message in wireshark.

So let's use the correct values.

We could also not include the SecurityInformation if both ciphering
and integrity are not used, and only include ciphering if integrity
is not used (because integrity settings are optional).

But then if only integrity is used, we still need to include
ciphering, setting algorithm to NEA0 (no ciphering), because
the ciphering settings are always included.

This logic is too complex, let's use the simple one to always
include SecurityInformation with NEA0 and/or NIA0 if ciphering
and/or integrity is not activated.
2025-02-11 14:04:32 +01:00
Guido Casati
627f8171ec Add test for Bearer Context Modification Request 2025-02-11 14:04:19 +01:00
Robert Schmidt
e8661f5ae5 Reset CU-CP E1 UE context after E1 Setup Response
As in deba3ae066 ("Reset CU-UP E1 UE contexts after E1 Setup
Response"), the CU-CP should reset the E1 UE contexts after E1 Setup
Response. 38.463 sec. 8.2.3 says

> This procedure also re-initialises the E1AP UE-related contexts (if
> any) and erases all related signalling connections in the two nodes like
> a Reset procedure would do.

In the case of CU-CP, this is a bit more complicated. More precisely, we
need to wait for the CU-UP to be available again before informing the DU
about the loss (implemented via an F1 Reset message), because otherwise,
the UE might reconnect immediately, before the CU-UP is online again.

Hence, on connection loss, we mark affected UEs (by setting their E1
association ID to 0); as long as the CU-UP does not connect, nothing
will happen (but UEs don't have user plane). Upon CU-UP connecting
again, we request release of the UEs via NGAP (similarly to what is done
if the DU goes offline, see invalidate_du_connections()), free the UE
contexts locally, and send an F1 Reset message to the DU, because
38.473 sec 8.2.1.2.1 says

> a failure at the gNB-CU [...] has resulted in the loss of some or
> all transaction reference information [...] a RESET message shall be
> sent to the gNB-DU.

The core should accept and send an NGAP release command message; since
no UE contexts are to be found (already deleted), the CU-CP will just
send a release complete (together with some warnings).

It might be possible to more gracefully handle the situation (e.g., as
described in 38.401 section 8.9.5 "Change of gNB-CU-UP"), but

- we lack the PDCP SN exchange
- the current procedure has the advantage of being equivalent to
  "restart of the entire gNB", with less downtown.
2025-02-11 13:20:28 +01:00
Robert Schmidt
d2bb779e78 Refactor rrc_remove_ue() to not send NGAP ctxt release cplt
The next commit will use rrc_remove_ue() to delete a CU(-CP+-UP)
context. However, we don't send NGAP UE context release at that moment
(we will instead *request* the release); more generally, it's not clear
that every user of rrc_remove_ue() wants to actually send this message.
Hence, refactor the code by separately calling
rrc_gNB_send_NGAP_UE_CONTEXT_RELEASE_COMPLETE() where appropriate.
2025-02-11 13:20:28 +01:00
Robert Schmidt
ff106c41a3 Use (CU-initiated) F1 Reset Acknowledgement in stack 2025-02-11 13:20:28 +01:00
Robert Schmidt
df365d9a2d Add F1 Reset Ack enc/dec/cp/eq/free library and test 2025-02-11 13:20:28 +01:00
Robert Schmidt
4c9ed9d7ec Use (CU-initiated) F1 Reset in stack 2025-02-11 13:20:28 +01:00
Robert Schmidt
9157e22c7c Add F1 Reset enc/dec/cp/eq/free library and test 2025-02-11 13:20:28 +01:00
Guido Casati
b854f97130 Enable pDCP_Reestablishment in test_bearer_context_setup_request 2025-02-11 13:15:01 +01:00
Guido Casati
b061b57698 Add Bearer Context Modification Request enc/dec lib 2025-02-11 13:10:21 +01:00
Guido Casati
f2b80ae31c Use cp_bearer_context_setup_request in cucp_cuup_e1ap.c 2025-02-11 13:10:21 +01:00
Guido Casati
cd7218c976 Improvements to E1 Bearer Context Setup Request/Response
* Add enc/dec/cp/eq sub-functions to E1 library and adopt in stack
  * eq_drb_to_mod
  * encode_dl_up_parameters
  * decode_dl_up_parameters
  * e1_decode_snssai
  * e1_encode_snssai
  * eq_security_ind
* Check result of enc/dec functions in Bearer Context Setup enc/dec libs
2025-02-11 13:10:21 +01:00
Guido Casati
1ef24796f9 Add compile definitions E1AP_LOG_ERRORS
* this is necessary to enable the error logs in the E1 libs
* also, updated the define name in the E1AP lib
2025-02-11 13:10:21 +01:00
Guido Casati
2146f29c44 Refactor E1 Bearer Context Management structs
Bearer context setup request and modification request messages
differ in various IEs according to 9.2.2 of 3GPP TS 38.463, e.g.
the Bearer context setup request does not contain a list of
DRBs to modify and does not contain an UP TL configuration.

Thus, the goal of this commit is to split the setup request message
and the modification request into two different structs:
* adopt e1ap_bearer_mod_req_t where necessary (e.g. fill_e1_bearer_modif)

Also, reorganized existing struct members according to specs:
* remove irrelevant struct members from the setup request
* group members from the same IEs into structs
* set optional struct members IEs as pointers
* add and adopt enc/dec/cp/eq lib functions for single IEs
* add UP_TL_information_t struct with TEID and TL address info and adopt in stack
* use int instead of long for count types
* update the relevant copy/equality check utility functions

Extra:
* add a function to handle Security Information in RRC in the process
* add create_up_tl_info and adopt in unit tests
2025-02-11 13:10:21 +01:00
Guido Casati
4f613ab2af Remove incomplete activityNotificationLevel handling 2025-02-11 13:10:21 +01:00
Guido Casati
b862963a95 Add macro to check result of dec lib functions and return with a failure 2025-02-11 13:09:50 +01:00
Raghavendra Dinavahi
f267641bf9 Changes in function prepare_sim_uecap 2025-02-11 09:53:41 +01:00
Robert Schmidt
9b4e067709 Merge remote-tracking branch 'origin/nfapi-fixes-4x4-100MHz' into integration_2025_w06 (!3251)
nFAPI: make 4-layer on 100MHz work

5G nFAPI headers specify 32 bits for the length field, so use it also
when segmenting messages. This should stabilize 4-layer MIMO operation
on 100MHz with nFAPI.
2025-02-11 09:37:14 +01:00
Robert Schmidt
7d4f7ebbfe Merge remote-tracking branch 'origin/rfsim-deadlock-avoidance' into integration_2025_w06 (!3246)
Deadlock avoidance in rfsimulator

This change introduces a countermeasure for deadlock in rfsimulator. The
deadlock happens when all entities are waiting for new data to come in,
and happens with 2+ clients, when a new client connects. I think this
issue is due to ordering of fullwrite calls, resulting in out-of-order
delivery of packets and eventually trashing the packets on the receiving
side. The out-of-order delivery warnings are printed just before the
system deadlocks but I have not found a better solution so far. The
workaround makes the server never lock up permanently by ignoring the
client failure to write on time after 10 tries.

This was tested locally for both UE as server and gNB as server and
works correctly, causing the deadlock to clear and the added log to be
printed several times when the deadlock is detected, after which the
system goes back to normal.

I have some gdb output of the executables during deadlock:

    UE:

    $7 = {conn_sock = 98, lastReceivedTS = 3226163740, headerMode = true, trashingPacket = false, th = {size = 13184, nbAnt = 1, timestamp = 3226150556, option_value = 0, option_flag = 0}, transferPtr = 0x7f6a500018a8 "\200\063", remainToTransfer = 24,
      circularBufEnd = 0x7f6a503b3ac0 "", circularBuf = 0x7f6a501f1ac0, channel_model = 0x0}
    (gdb) p t->buf[5]
    $8 = {conn_sock = 97, lastReceivedTS = 0, headerMode = true, trashingPacket = false, th = {size = 0, nbAnt = 0, timestamp = 0, option_value = 0, option_flag = 0}, transferPtr = 0x7f6a50001900 "", remainToTransfer = 24, circularBufEnd = 0x7f6a50575ad0 "",
      circularBuf = 0x7f6a503b3ad0, channel_model = 0x0}

    nextRxTimestamp 3225937740
    nsamps = 30720

    gNB 1:
    (gdb) p t->buf[0]
    $4 = {conn_sock = 95, lastReceivedTS = 3226026876, headerMode = true, trashingPacket = false, th = {size = 1, nbAnt = 1, timestamp = 3226026875, option_value = 0, option_flag = 0},
      transferPtr = 0x7f8dfc003ab8 "\001", remainToTransfer = 24, circularBufEnd = 0x7f8e1c3ff010 "", circularBuf = 0x7f8e1c23d010, channel_model = 0x0}
    nextRxTimestamp 3225996956

    gNB 2:
    lastReceivedTS = 3226026875
    $2 = {conn_sock = 95, lastReceivedTS = 3226026875, headerMode = true, trashingPacket = false, th = {size = 1, nbAnt = 1, timestamp = 3226026875, option_value = 0, option_flag = 0},
      transferPtr = 0x744898003ab8 "\001", remainToTransfer = 24, circularBufEnd = 0x7448bc2e7010 "", circularBuf = 0x7448bc125010, channel_model = 0x0}

    nextRxTimestamp 3226026875

As you can see all executables are in have_to_wait state.
2025-02-11 09:35:23 +01:00
Robert Schmidt
27a418572d Remove unnecessary includes
f1ap_lib_common should help with common message enc/dec inside lib/, and
not be used directly.
2025-02-10 18:19:27 +01:00
Robert Schmidt
deba3ae066 Reset CU-UP E1 UE contexts after E1 Setup Response
38.463 sec. 8.2.3 says

> This procedure also re-initialises the E1AP UE-related contexts (if
> any) and erases all related signalling connections in the two nodes like
> a Reset procedure would do.

Hence, delete all contexts after reception of E1 Setup Response. This
minimizes a risk of receiving an E1 bearer setup req for an existing UE,
which currently leads to an assert [we trust the CU-CP does not send the
same UE ID twice, as we only "mirror" the existing UE ID].
2025-02-10 18:19:15 +01:00
Robert Schmidt
b9acf4a8e3 Refactor E1 UE removal in separate function
Refactor into remove_ue_e1(), to be used in the next commit, independent
of e1_bearer_release_cmd().
2025-02-10 18:18:38 +01:00
Robert Schmidt
32310cced3 Bugfix: free E1 CU-UP Setup Req on CU-UP disconnection 2025-02-10 15:43:37 +01:00
Guido Casati
212fe8d2f3 Add common enc/dec E1AP libs to e1ap_lib_common.c
* these functions are used in both interface management
  and bearer context management libraries
2025-02-09 22:48:54 +01:00
Robert Schmidt
609969f46d nFAPI/PNF: Correctly set message length when segmenting
Make the same change as in parent commit, i.e., write the full 32-bit
segment size.

I could not test this, as we do not reach these rx_data.indication
length. It's based on the fix in the parent commit, and to avoid future
bad surprises.
2025-02-08 12:29:25 +01:00
Robert Schmidt
2067831e7a nFAPI/VNF: Correctly set message length when segmenting
The 5G nFAPI message length is 32bits. In particular tx_data.requests
can be longer than 64kB. When segmenting, we should correctly write the
message of the current segment (across all 32bits), because the
length would interpreted wrongly otherwise.

This fixes a bug in which tx_data.requests were discarded for 4-layer DL
MIMO on 100 MHz with this message:

    P7 unpack message length is greater than the message buffer

Further, increase the type of various (segment-related) variables to 32
bits. Currently, the maximum segment size is sxt to 65000 bytes (and in
will likely remain, because the maximum UDP size is 65536);
nevertheless, increase it in case we will ever go beyond this.

See also commit dee68e6319 ("nFAPI: increase maximum segment size to
65000")
2025-02-08 12:25:44 +01:00
Robert Schmidt
976f210132 Merge remote-tracking branch 'origin/error-simd-intrinsic-name' into integration_2025_w06 (!3239)
Remove inexistant SIMD instruction

develop branch doesn't compile with AVX2 only. For instance,
mm_loadi_epi32() doesn't exist in SSE, only in the AVX512 family,
despite it being a 128 bit vector size instruction.

See also:
https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#_mm_loadi_epi32()

This was masked by using SIMDE.
2025-02-07 17:33:08 +01:00
Robert Schmidt
8c39825688 Merge remote-tracking branch 'origin/tun_if_refactor' into integration_2025_w06 (!3238)
Refactor tun_if.h

Use a common function for generating interface name. Use full interface
name in tun_if.h functions.
2025-02-07 17:32:28 +01:00
Robert Schmidt
999877eaae Merge remote-tracking branch 'origin/issue_709' into integration_2025_w06 (!3000)
Improvements for NR dlsim and ulsim
2025-02-07 17:31:59 +01:00
Robert Schmidt
6ed05c5334 Merge remote-tracking branch 'origin/period_based_phytest_bitmap' into integration_2025_w06 (!3242)
Period based phytest bitmap

phy-test slot bitmap tdd period based to minimize the chance to need it
larger than 64 slots
2025-02-07 15:24:48 +01:00
Robert Schmidt
e3c56a2b4e Merge remote-tracking branch 'beraoud/beraoud-develop-patch-76226' into integration_2025_w06 (!3240)
Fix typos in NR_SA_Tutorial_OAI_multi_UE.md
2025-02-07 15:24:02 +01:00
Robert Schmidt
296bf289cb Merge remote-tracking branch 'origin/remove_segment_coding' into integration_2025_w06 (!3202)
Simplify usage of the old segment decoding libraries with the slot coding interface

This MR transforms the segment coding libraries into slot coding
libraries by statically linking the adaptation layer and the segment
coding libraries.

Therefore they can be used directly in ldpctest which uses the segment
coding interface as well as in all the other PHY simulators and the NR
softmodem which use the slot coding interface.

It is not anymore needed to use the

   --nrLDPC_coding_segment.segment_shlibversion

flag.  Instead a segment coding library can be directly chosen with

    --loader.ldpc.shlibversion

since it implements the slot coding interface.
2025-02-07 15:22:30 +01:00
Robert Schmidt
bad4a6eb64 nFAPI: msg length/offset is 32bit
5G nFAPI headers specify 32 bits for the length field, so use it here as
well.
2025-02-07 14:35:31 +01:00
Bartosz Podrygajlo
e61bf5132d Refactor tun_if.h
Use a common function for generating interface name. Use full interface
name in tun_if.h functions.
2025-02-07 12:25:35 +01:00
Raghavendra Dinavahi
3e27175ac2 Added Support of 35Mhz,45Mhz,70Mhz Bandwidth for SCS 30Khz
Also added support for 35Mhz, 45Mhz bw for 15Khz Subcarrierspacing
Referred Spec TS 38.101 v18.6.0 section 5.3.2, table 5.3.2-1
2025-02-06 16:44:45 +01:00
francescomani
bd179fd5e4 making phy-test slot bitmap tdd period based to minimize the chance to need it larger than 64 slots 2025-02-05 18:55:09 +01:00
francescomani
fabaae3327 removing initial sync option from dlsim 2025-02-05 14:07:59 +01:00
Romain Beurdouche
6138e33f42 fix(nrLDPC_coding): Documentation 2025-02-05 11:22:54 +00:00
Romain Beurdouche
2d4d313b62 feat(nrLDPC_coding): Transform segment coding libraries into slot coding libraries by statically linking the adaptation layer and the segment coding libraries 2025-02-05 11:22:46 +00:00
Abdelkhalek Beraoud
d5467aceb0 Fix typos in NR_SA_Tutorial_OAI_multi_UE.md 2025-02-04 13:44:50 +00:00
Laurent THOMAS
43b981247e error-simd-intrinsic-name 2025-02-04 13:21:43 +01:00
francescomani
1a3512960a check if the slot selected is valid for DL/UL in dlsim/ulsim 2025-02-04 09:39:11 +01:00
francescomani
92fc1639e8 add FR2 ulsim test case 2025-02-04 08:38:51 +01:00
francescomani
a772f91053 add option to select slot in dlsim 2025-02-04 08:38:51 +01:00
francescomani
65cbcec57a fixes to allow FR2 dlsim test 2025-02-04 08:38:51 +01:00
francescomani
3bfb952989 rate matching formatting 2025-02-04 08:21:11 +01:00
francescomani
fc52fb8d24 compute_tbs_common formatting 2025-02-04 08:21:11 +01:00
francescomani
d791d03e05 fix to have correct maxMIMO_layers in dlsim computing tbslbrm 2025-02-04 08:21:11 +01:00
Robert Schmidt
0053a3d0f4 Merge branch 'integration_2025_w05' into 'develop'
Integration: `2025.w05`

Closes #885

See merge request oai/openairinterface5g!3233

* !3102 Dockerized development environment
* !3185 Add IQ file recording and IQ file viewer to ImScope
* !3218 more layer1 cleaning
* !3224 Ensure execution of processSlotTX in order in NR UE
* !3231 Bugfix in frame and slot setting for ULSCH beam allocation
* !3229 Verify the integrity protection of the RRCReestablishment message
* !3230 FHI72: fix for single distributed antenna array for xran F release
* !2984 NAS 5GS refactor
* !3235 Parametrized JenkinsNode and JenkinsResource
* !2799 Changes to support multiple TDD patterns
* !3208 Downgrade gNB power limit LOG from "warning" to "debug"
2025-02-03 15:46:43 +00:00
Robert Schmidt
616c677536 Merge remote-tracking branch 'origin/avoid-powerlimit-flood' into integration_2025_w05 (!3208)
Downgrade gNB power limit LOG from "warning" to "debug"

Downgrade the UE power limited LOG from LOG_W to LOG_D. This is to avoid
flooding stdout when UE in low coverage enters power limited state for a
longer period of time. The same information can be inferred from the
periodic UE print which also contains PH value (negative PH values
indicate that the UE is power limited)

Also, correct some typos in PH calculation.

Closes #885
2025-02-03 08:33:23 +01:00
Robert Schmidt
1cb82bae20 Merge remote-tracking branch 'origin/Mult_TDD_Pattern' into integration_2025_w05 (!2799)
Changes to support multiple TDD patterns

- Updated the configuration changes for 2 Patterns
- Update the TDD table configuration for NFAPI
- Added the tdd bitmap for the period
- Adapted the bitmap for UL/DL for the multi TDD pattern
- Updated the RACH procedure for multi TDD pattern
- Updated DL and UL scheduler for multi TDD pattern
2025-02-03 08:32:02 +01:00
Raymond Knopp
18cb281de5 AVX512 flag 2025-01-31 22:49:50 +01:00
Robert Schmidt
1e3e695f52 Merge remote-tracking branch 'origin/nu-ci-colosseum-jenkins-update' into integration_2025_w05 (!3235)
Parametrized JenkinsNode and JenkinsResource

Parametrized variables in Jenkinsfile for automated tests on Colosseum
after update of OAI Jenkins server.
2025-01-31 22:32:04 +01:00
Robert Schmidt
e0865421b9 Merge remote-tracking branch 'origin/nr-ue-nas-improvements' into integration_2025_w05 (!2984)
NAS 5GS refactor

The goal of this MR is to reorganize the NR NAS code into:

- enc/dec library functions (5GS, 5GMM, 5GSM, NR_NAS_defs.h,
  nr_fgs_nas_lib.c)
- handlers and callbacks (nr_nas_msg.c)

The following changes are introduced:

1. migrate 5GS enc/dec lib (5GMM and 5GSM) to a dedicated folder
2. add a nested CMakeLists structure
3. refactor NR NAS enc/dec functions
4. refactor NR NAS messages struct definitions
5. remove most of dependency from NAS LTE
6. further refactor of PDU Session Establishment Accept processing to
   separate enc/dec from handling
7. made naming of 5GS definitions consistent whenever necessary
8. cleanup unused code
9. remove redundant struct definitions

Also:

1. fix decoding of AMF Set ID in 5G-S-TMSI UE identity
2. replace Byte_t directly with uint8_t
2025-01-31 22:29:31 +01:00
Raymond Knopp
d52a563715 fixed stack read overflow (harmless but flagged by ASAN) 2025-01-31 21:39:19 +01:00
Jaroslava Fiedlerova
7d20c1af9f T2: Use 8b packed output of the T2 encoder
- modify retrieve_ldpc_enc_op() to store encoded results in a packed format
- add timing measurements for T2 encoder
- add simde implementation for bit reversal
  - Introduce new bit reversal implementation using simde_mm_gf2p8affine_epi64_epi8
    instruction, based on https://wunkolo.github.io/post/2020/11/gf2p8affineqb-bit-reversal/.
    This implementation requires GFNI and AVX512VL support on the target machine.
2025-01-31 18:11:51 +01:00
Robert Schmidt
70e70f6feb Merge remote-tracking branch 'origin/fhi72-f-release-fix-distributed-arr' into integration_2025_w05 (!3230)
FHI72: fix for a distributed antenna array for xran F release

in the Rx callback I reset the number of section descriptions/number of
fragments to 0, but for each antenna up to max number of antennas per
RU, instead of up to max number of distributed antenna array
2025-01-31 17:07:08 +01:00
Guido Casati
fcea7d9fbf Add pattern2 to TEST-SA-FR1-SC-FDMA-B200 CI test 2025-01-31 16:56:13 +01:00
vijay chadachan
fc6e205c89 Add documentation on TDD configuration
Co-authored-by: Robert Schmidt <robert.schmidt@openairinterface.org>
2025-01-31 16:56:13 +01:00
vijay chadachan
ca72b56c2c Add gNB configuration file pattern2 TDD configuration
Co-authored-by: Guido Casati <guido.casati@firecell.io>
2025-01-31 16:56:13 +01:00
vijay chadachan
4fc74c17ab Refactoring of is_xlsch_in_slot usage in MAC
* Remove the ulsch_slot_bitmap and dlsch_slot_bitmap from nrmac
* Adopt the new is_dl_slot/is_ul_slot functions in the stack
  to replace is_xlsch_in_slot: these functions are getting
  the DL and UL slots as they are set in the TDD configuration
  stored in tdd_slot_bitmap (frame_structure_t)
* Keep is_xlsch_in_slot in openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_phytest.c:
  this is necessary because the phy-test pre-processors are using the bitmaps
  dlsch_slot_bitmap and ulsch_slot_bitmap to check which DL/UL slots to use
  for transmission among those set in the TDD configuration

Co-authored-by: Guido Casati <guido.casati@firecell.io>
2025-01-31 16:51:19 +01:00
Guido Casati
529b142d75 Refactor servingNetworkName 2025-01-31 16:05:54 +01:00
Bartosz Podrygajlo
d44279a9a3 Fix PHR PH value to power headroom conversion. 2025-01-31 16:05:13 +01:00
Leonardo Bonati
474c004ff4 Parametrized JenkinsNode and JenkinsResource 2025-01-31 10:03:55 -05:00
Guido Casati
d6e2bf1651 Refactor registration accept decoding
previously we had decodeRegistrationAccept acting as a handler and calling
decode_registration_accept to do the decoding. However the logic was mixed
between the two functions, the naming was confusing and the code was hard
understand. The goal of this commit is to simplify the code, improve
readability and maintainability, while adapting the relevant function
to the new OAI NAS libs structure.

To this purpose:

* move enc/dec logic to NAS lib openair3/NAS/NR_UE/5GS/5GMM/MSG/RegistrationAccept.c -
  the logic of parse_allowed_nssai, get_allowed_nssai has been moved to
  decode_registration_accept and decode_nssai_ie
* add decode_nssai_ie and use it for both Allowed/Configured NSSAIs list (IE handling was added)
* do processing in the handler handle_registration_accept
* simplify the code by removing nested calls
* improve handling of PDU length

Currently only Registration Result, 5GS Mobile Identity, Allowed/Configured NSSAI
are decoded. The other optional IEIs are skipped (only the length is processed).
2025-01-31 16:02:04 +01:00
Bartosz Podrygajlo
1e667b379a Downgrade gNB power limit LOG from "warning" to "debug"
Downgrade the UE power limited LOG from LOG_W to LOG_D. This is to avoid flooding
stdout when UE in low coverage enters power limited state for a longer period of
time. The same information can be inferred from the periodic UE print which also
contains PH value (negative PH values indicate that the UE is power limited)
2025-01-31 15:59:45 +01:00
Bartosz Podrygajlo
fd20068f26 Deadlock avoidance in rfsimulator 2025-01-31 15:47:41 +01:00
Teodora
04bfabcbb1 F release: fix for a distributed antenna array
- in the Rx callback I reset the number of section descriptions/number of fragments to 0,
    but for each antenna up to max number of antennas per RU, instead of up to max number of a distributed antenna array
2025-01-31 12:12:06 +01:00
Robert Schmidt
85edbc8ec7 Merge remote-tracking branch 'origin/RRCReestablishment_integrity' into integration_2025_w05 (!3229)
Verify the integrity protection of the RRCReestablishment message
2025-01-31 08:07:26 +01:00
Robert Schmidt
44fe1175c2 Merge remote-tracking branch 'origin/NR_ULSCH_beam_allocation_bugfix' into integration_2025_w05 (!3231)
Bugfix in frame and slot setting for ULSCH beam allocation
2025-01-31 08:01:39 +01:00
Robert Schmidt
31c8ca9c53 Merge remote-tracking branch 'origin/process-slot-tx-in-order' into integration_2025_w05 (!3224)
Ensure execution of processSlotTX in order in NR UE

Make sure that processSlotTX is executed in slot order.

There is a bug that causes decoding error when processSlotTX is executed
out of order. The root cause is not known at this point, but this change
avoids the bug altogether.
2025-01-31 08:01:07 +01:00
Robert Schmidt
723acf7e60 Merge remote-tracking branch 'origin/more-layer1-cleaning' into integration_2025_w05 (!3218)
More Layer1 cleaning

Cleanup, see commits for info
2025-01-31 08:00:37 +01:00
Robert Schmidt
be6321c888 Merge remote-tracking branch 'origin/imscope-recorder' into integration_2025_w05 (!3185)
Add IQ file recording and IQ file viewer to ImScope

This changeset introduces the following changes to ImScope:

- Added the ability to record IQ data using the same mechanism as
  ImScope.
- Added a new executable target imscope_iq_file_viewer for viewing IQ
  files.
- Introduced a command line argument --imscope-record that enables data
  recording mode.
- Refactored a lot of the scope code

Usage:

- To record IQ data, run a modem with --imscope-record flag.  The
  recording happens whenever a modem calls dumpScopeData, which
  currently is done only in gNB on PUSCH DTX and PUSCH CRC NOK.  There
  is a limit of ~1GB of files written by the thread in a signle run to
  avoid accidentally exhausting disk space.  If a directory imscope-dump
  is available the data will be recorded there in .imscope files.
  Otherwise files are written to the directory the modem was run. This
  is done so that the directory can be mapped in a docker container.
- To view recorded IQ files, use the new executable
  imscope_iq_file_viewer. This can be done by running:

  ./imscope_iq_file_viewer <path_to_iq_file>

  Replace <path_to_iq_file> with the path to the IQ file you want to view.
2025-01-31 07:59:22 +01:00
Robert Schmidt
b34708fa77 Merge remote-tracking branch 'origin/docker-dev-env' into integration_2025_w05 (!3102)
Dockerized development environment

This commit introduces a fully dockerized dev env you can start on any
machine that has docker without installing any direct OAI dependencies
on host.

This allows to migrate development environments between machines easily.
Several complementary scripts were added to enable smooth transition
between your docker environment and host environment. Your user and sudo
should work inside the environment.

In its current state, the environment can be used to compile
nr-softmodem with 7.2 FHI but it cannot run it due to missing
dependencies.
2025-01-31 07:58:43 +01:00
Bartosz Podrygajlo
8ca0a80d17 Dockerized development environment
This commit introduces a fully dockerized dev env you can start on any
machine that has docker without installing any direct OAI dependencies
on host.

This allows to migrate development environments between machines easily. Several
complementary scripts were added to enable smooth transition between your docker
environment and host environment. Your user and sudo should work inside the
environment.
2025-01-31 07:50:01 +01:00
francescomani
7c93de87a4 lower layers to verify the integrity protection of the RRCReestablishment message 2025-01-30 18:20:17 +01:00
Laurent THOMAS
6d14ac735b remove dead commented code 2025-01-30 17:15:11 +01:00
Laurent THOMAS
62e8431c98 remove code obfuscation 2025-01-30 17:14:18 +01:00
Laurent THOMAS
25652c5a24 fix bad type in dci encoding 2025-01-30 17:14:18 +01:00
Laurent THOMAS
5416be3736 move byte2m128i in a more logical place 2025-01-30 17:14:10 +01:00
Laurent THOMAS
268172a435 pure bad code fix 2025-01-30 17:12:27 +01:00
Guido Casati
e842ca2631 Move assert up in decode_5gs_mobile_identity 2025-01-30 15:21:39 +01:00
Guido Casati
8260b2283c Do get_msg_type only once in nas_nrue 2025-01-30 15:21:39 +01:00
Guido Casati
918fcd2b6d Bugfix: 6 bits AMF set ID in decode_guti_5gs_mobile_identity
* the last 6 bits of the GUTI represent the AMF Pointer
* the AMF Set ID is 10 bits long
* the Registration Accept message received from the network contains the GUTI
  which, when properly decoded, will be used in any possible following Registration Request
2025-01-30 15:21:39 +01:00
Guido Casati
97521d21e5 Refactor mm_msg_encode 2025-01-30 15:21:39 +01:00
Guido Casati
3e27e53f52 Handle size in nas_protected_security_header_encode 2025-01-30 15:21:39 +01:00
Guido Casati
c37c5ad7ae Use macro NAS_INTEGRITY_SIZE in NAS 2025-01-30 15:21:39 +01:00
Guido Casati
611c055464 Refactor nas_security_rx_process
* use defines whenever possible
* introduce a switch to handle security type. Currently only integrity protected and ciphered
  is handled, however the idea of the switch is to make the code ready for the future when
  different security types will be handled and different actions should be taken based on that.
* define NAS_INTEGRITY_SIZE
2025-01-30 15:21:39 +01:00
Guido Casati
8b32e95d6a Define security header and security state enums and strings with available macros
* also, add security type NAS_SECURITY_NEW_SECURITY_CONTEXT
2025-01-30 15:21:39 +01:00
Guido Casati
384659ed54 Refactor capture_pdu_session_establishment_accept_msg
* the goal of this commit is to refactor capture_pdu_session_establishment_accept_msg
  into a decoding function
* PduSessionEstablishmentAccept.c is in the 5GSM library and shall only do encoding operations
* handling of PDU Session Establishment accept message is done in nr_nas_msg.c
* adopted new NAS decoding functions in the process
* improved QoS rules decoding
* convert getShort into a macro and add to NAS utils
2025-01-30 15:21:39 +01:00
Guido Casati
2e651ed21c Add NAS 5GS header decoding functions 2025-01-30 15:21:39 +01:00
Guido Casati
b07ddb1e57 Refactor generateServiceRequest
* simplified code, reduced conditional statements, reduced number of pointers
2025-01-30 15:21:39 +01:00
Guido Casati
2c5309f0f8 Add function to fill fgmm_msg_header_t type headers 2025-01-30 15:21:39 +01:00
Guido Casati
63d7f26cfd Refactor NAS 5GMM messages structs definitions
as per legacy code, the NAS functions in nr_nas_msg.c were encoding
the header in the plain header contained in MM_msg
(e.g. plain -> mm_msg -> header in fgs_nas_message_t). The same
header was encoded in the mobility management message contained
in the same struct (e.g. plain -> mm_msg -> registration_request
-> protocoldiscriminator). As this was more complicated than
necessary, the goal of this commit is to simplify the code and
improve readability. Namely:

* Refactor MM_msg into fgmm_nas_message_plain_t to contain
  (1) 5GMM Header
  (2) 5GMM Payload union
* Use fgmm_nas_message_plain_t and fgmm_nas_msg_security_protected_t
  in the 5GMM NAS procedures
* Remove NAS header IEs from 5GMM messages structs and use
  the header in fgs_nas_message_plain_t.
  This reduce also the repetitions of header members in each
  of the 5GMM messages structs.
* Rename struct to distinguish between 5GMM and 5GSM
* Remove fgs_nas_message_t and nas_msg_header_t,
  use directly basic 5GS struct definitions, simplify the code
* The callbacks in nr_nas_msg.c are now doing
  (1) encode header with the common NAS lib
  (2) encode contents with the 5GMM libs
* improve code readibility in the process
2025-01-30 15:21:39 +01:00
Guido Casati
9719f5e574 Add const attribute to NAS enc/dec functions 2025-01-30 15:21:39 +01:00
Guido Casati
08e3f2f0df Refactor generateRegistrationComplete
* replace encoding code with proper functions from the lib
* remove unnecessary header members in struct definition

this commit removes last enc/dec code in nr_nas_msg.c
2025-01-30 15:21:39 +01:00
Guido Casati
7810516596 Add equality check and error macro to NAS 2025-01-30 15:21:39 +01:00
Guido Casati
8a844efa49 Fix typo and rename NAS identity response 2025-01-30 15:21:39 +01:00
Guido Casati
2d75598851 Initial separation of enc/dec functions from handlers/callbacks
* move enc/dec definitions to NR_NAS_defs.h and add new lib file nr_fgs_nas_lib.c
  both used by nr_nas_msg.c
* move utility macros to fgs_nas_utils.h: this can be used in all the 5GMM, 5GSM lib files
* use nr_nas_msg.c for handlers/callbacks only, it should call the enc/dec
  functions in nr_fgs_nas_lib and in the 5GMM, 5GSM libs
* 5GMM, 5GSM libs should only do the enc/dec of the NAS message contents
2025-01-30 15:21:39 +01:00
Guido Casati
f73579ea41 Limit scope of NAS functions (static) 2025-01-30 15:21:39 +01:00
Guido Casati
ddad26effe Refactor includes in nr_nas_msg (.c/.h) 2025-01-30 15:21:39 +01:00
Guido Casati
27ed237300 Refactor NAS 5GS message type definitions
* move defines to openair3/NAS/NR_UE/nr_nas_msg.h as they are
  only used in nr_nas_msg.c
* made naming of all message types consistent, using the same
  prefix for all
2025-01-30 15:21:39 +01:00
Guido Casati
fb85ba7da3 Remove NAS/COMMON/nr_common.c and move servingNetworkName to nr_nas_msg.c
* the only function used from nr_common.c is servingNetworkName which is
  used in nr_nas_msg.c, so it was moved to the latter file and its scope
  was reduced
2025-01-30 15:21:39 +01:00
Guido Casati
03a4d8efb8 Refactor NAS 5GS (5GMM & 5GSM) structs definitions and their use
Every NAS 5GS message can have 3 different headers: (1) security protected
(2) 5GMM plain (3) 5GS plain;

According to 3GPP TS 24.501:
> 4.2 Coordination between the protocols for 5GS mobility management and 5GS session management
> A 5GS session management (5GSM) message is piggybacked in specific 5GS mobility management (5GMM) transport
> messages. To this purpose, the 5GSM messages can be transmitted in an information element in the 5GMM transport
> messages.

A PDU Session Establishment accept is a 5GSM message and as such it is contained in a 5GMM
transport message. The code in capture_pdu_session_establishment_accept_msg is reflecting this.
The message is thus expected to have: (1) Security protected 5GMM header (2) Plain 5GMM message
(3) 5GSM Payload Container (4) Plain 5GSM message.

5.4.5 of 3GPP TS 24.501: also says:

> The type of the payload is identified by the Payload container type IE and includes one of the following: a) a single 5GSM message;

Thus, a 5GSM is not the only possible payload of a NAS transport message.

This commit is focusing on the refactoring of the structs definitions and adaptation of the CMakeLists.

Based on the above:

* Move NR_NAS_defs.h to 5GS subfolder in NR_UE
* Move NAS FGS structs and definitions to NR_NAS_defs.h
* Rename mm_msg_header_t to fgmm_msg_header_t
* Remove duplicated NAS struct definitions
  (1) kept fgs_nas_message_security_header_t over security_protected_nas_5gs_msg_t
  (2) Kept fgsm_msg_header_t over fgs_sm_nas_msg_header_t
* Remove unused definitions, structs, functions in the process
2025-01-30 15:21:39 +01:00
Guido Casati
c0583be24e Migrated NAS 5GS (5GMM & 5GSM) to NR folders and refactor CMakeLists.txt files
This commit is introducing the following macro changes:

(1) Migrate NAS 5GS lib files to a new 5GS subfolder in NR_UE
    and organize NAS 5GS lib messages into 5GMM and 5GSM subfolders.
    A nested CMake structure was implemented and CMakeLists.txt were
    added whenever necessary. This is effectively separating 5GS
    libraries from LTE libraries.

(2) In order to simplify the separation of 5GS libs from LTE libs,
    remaining dependencies from NAS LTE (e.g. nas_ue_task.c, ue-idx-standalone)
    were removed in the process

(3) ExtendedProtocolDiscriminator.c/.h and SpareHalfOctet.c/.h were deleted
    and affected types were replaced with simple integer types

(4) Cleanup: unused definitions and libs (e.g. LIB_5GNAS_GNB)
    were removed

(5) Update doc/Doxyfile

(6) clang-formatted the migrated files in the process

(7) Update includes of headers in affected files
2025-01-30 15:17:30 +01:00
francescomani
bf238491ec fix in frame and slot for ULSCH beam allocation 2025-01-30 14:52:58 +01:00
Raymond Knopp
59123ce85d aarch64 testing and corrections 2025-01-30 09:27:26 +00:00
Raymond Knopp
4b3c3c2dac fixes after testing with AVX2 2025-01-30 06:21:40 +01:00
Raymond Knopp
c380dc4fce bit-packing done in nrLDPC_coding_segment_encoder.c now instead of nr_scrambling. Interestingly, it improves performance significantly too. Tested for AVX512 only for now 2025-01-29 22:32:03 +01:00
Bartosz Podrygajlo
2ea6ac26bd Use a global "void_instruction" in imscope record thread
This avoids the issue of compare_exchange_weak always failing. The issue
was that `store()` is not equal to `exchange()`. `exchange` uses memory
copy while `store()` copies the value representation of the argument, which
is not always the same thing.
2025-01-28 16:55:53 +01:00
Bartosz Podrygajlo
30de011fa3 Add build_oai option for imscope_record 2025-01-28 16:55:42 +01:00
Bartosz Podrygajlo
c520a4e295 Refactor some scope macros
Use do {} while (0) for UEdumpScopeData/gNBdumpScopeData macro
2025-01-28 16:55:32 +01:00
Bartosz Podrygajlo
2198e31187 More updates to imscope IQ recorder
- Added event parameter for recording which is reflected in the filename
 - Added event in the UE for DLSCH NACK
 - Added program name to the filename for ease of identification
 - Reworked spinlock to use atomics
2025-01-28 16:55:25 +01:00
Bartosz Podrygajlo
c01adc5e00 Fix pdschRxdataF_comp scope for UE.
Correctly calculate the amount of data to be copied. Copy at correct offset.
Imporve error message in case data is insufficient.
2025-01-28 16:55:17 +01:00
Bartosz Podrygajlo
ab75a7ccfb Add IQ file recording and IQ file viewer to ImScope
This commit introduces the following changes to ImScope:
 - Added the ability to record IQ data using the same mechanism as ImScope.
 - Added a new executable target `imscope_iq_file_viewer` for viewing IQ files.
 - Introduced a command line argument `--imscope-record` that enables data recording mode.
 - Refactored a lot of the scope code

Usage:
 - To record IQ data, run a modem with `--imscope-record` flag.
   The recording happens whenever a modem calls dumpScopeData, which currently is
   done only in gNB on PUSCH DTX and PUSCH CRC NOK.
   There is a limit of ~1GB of files written by the thread in a signle run to avoid
   accidentally exhausting disk space.
   If a directory `imscope-dump` is available the data will be recorded there in .imscope
   files. Otherwise files are written to the directory the modem was run. This is done so that
   the directory can be mapped in a docker container.

 - To view recorded IQ files, use the new executable `imscope_iq_file_viewer`. This can be done by running:
      ```
      ./imscope_iq_file_viewer <path_to_iq_file>
      ```
   Replace `<path_to_iq_file>` with the path to the IQ file you want to view.
2025-01-28 16:54:54 +01:00
Bartosz Podrygajlo
4b9e70b2ba Fix 2 issues causing warning when compiling headers from g++ 2025-01-28 16:53:45 +01:00
Bartosz Podrygajlo
e1814f5340 Ensure execution of processSlotTX in order in NR UE
Make sure that processSlotTX is executed in slot order.
2025-01-28 11:42:38 +01:00
Guido Casati
e9ff628844 Add macros to deep copy and compare optional E1 IEs 2025-01-28 10:18:45 +01:00
Guido Casati
a0da096351 Fix equality check types in Bearer Context Setup Request/Response 2025-01-28 10:18:45 +01:00
Guido Casati
bf3b8b19ef Fix missing line break in e1ap.c 2025-01-28 10:18:45 +01:00
Guido Casati
92460a80cd Use is_mixed_slot in stack 2025-01-28 10:07:31 +01:00
vijay chadachan
0b7bee96cb Add scheduling utility functions to check UL, DL, and mixed slot types in TDD config
* is_ul_slot: returns `true` for UL or mixed slots
* is_dl_slot: returns `true` for DL or mixed slots
* is_mixed_slot: returns `true` for mixed slots

These functions use the TDD slot bitmap for slot type checks

Co-authored-by: Guido Casati <guido.casati@firecell.io>
2025-01-28 10:07:31 +01:00
vijay chadachan
eccd3e840e Take into account multi TDD patterns in RRC configuration
* take into account pattern2 in nr_rrc_config_dl_tda
* use get_tdd_period_idx in nr_rrc_config_ul_tda
* use get_first_ul_slot_multi_tdd in set_SR_periodandoffset

Co-authored-by: Guido Casati <guido.casati@firecell.io>
2025-01-28 10:07:31 +01:00
vijay chadachan
04f082a9a4 Adopt utility functions to get TDD configuration from frame_structure in MAC/RRC
* refactor set_ideal_period to use frame_structure from MAC
* use get_ul_slot_offset to assign slot offset to nth UE and adopt in
  updated config_csirs, configure_periodic_srs, set_csi_meas_periodicity

Co-authored-by: Guido Casati <guido.casati@firecell.io>
2025-01-28 10:07:31 +01:00
vijay chadachan
1d8a590328 Refactor nr_UE_is_to_be_scheduled to use new get_first_ul_slot function
Co-authored-by: Guido Casati <guido.casati@firecell.io>
2025-01-28 10:07:31 +01:00
Guido Casati
00f1d52f92 Rewrite get_first_ul_slot to use pattern configuration stored in frame_structure
* the function is returning the index of the first full UL slot in tdd_slot_bitmap
  or the first UL slot (including mixed) if the "mixed" flag is provided
2025-01-28 10:07:31 +01:00
Guido Casati
bebbc857a0 Add get_ul_slot_offset function to calculate nth UL slot offset for UE in TDD period
* the get_ul_slot_offset function calculates the offset of the nth uplink (UL) slot for a given UE index within a TDD period
* this function uses the frame structure bitmap to determine the UL slot positions
2025-01-28 10:07:31 +01:00
vijay chadachan
ae1a5a968b Refactor gNB_scheduler_uci.c (get_pucch_index, etc..) to use frame_structure stored in MAC
Co-authored-by: Guido Casati <guido.casati@firecell.io>
2025-01-28 10:07:31 +01:00
vijay chadachan
dbfcc1a7ef Refactor set_sched_pucch_list to use frame_structure in MAC
Co-authored-by: Guido Casati <guido.casati@firecell.io>
2025-01-28 10:07:31 +01:00
Guido Casati
3dca350f3e Limit scope of set_sched_pucch_list (static) 2025-01-28 10:07:31 +01:00
vijay chadachan
f4e4f2f7ba Refactor get_feasible_msg3_tda to use frame_structure in MAC
Co-authored-by: Guido Casati <guido.casati@firecell.io>
2025-01-28 10:07:31 +01:00
vijay chadachan
177732ca3a Refactor get_dl_tda and get_ul_tda to get TDD configuration stored in MAC
Co-authored-by: Guido Casati <guido.casati@firecell.io>
2025-01-28 10:07:31 +01:00
vijay chadachan
066559227d get_SIB1_NR: init pattern2 in sib1 servingCellConfigCommon if allocated in scc 2025-01-28 10:07:31 +01:00
vijay chadachan
f4d59dfd17 Get pattern2 configuration from configuration file and store in SCC
* allocate memory for pattern2 only if the IE is present (it is optional)
* fix scc (deallocate memory) when necessary

Co-authored-by: Guido Casati <guido.casati@firecell.io>
2025-01-28 10:07:31 +01:00
vijay chadachan
ad8930e2c4 Configure Frame Structure (including TDD) in MAC
* use config_frame_structure in config_common:
  - fill frame_structure in MAC and NFAPI Config Request
  - use get_tdd_period_idx to set periodicity index in Config Request
  - use config_tdd_patterns to fill tdd_period_config
  - use set_tdd_config_nr to complete NFAPI Config Request configuration

Co-authored-by: Guido Casati <guido.casati@firecell.io>
2025-01-28 10:07:31 +01:00
vijay chadachan
30f6da16f0 Refactor set_tdd_config_nr to use frame_structure_t and tdd_period_config_t
* assuming num_dl_slots and num_ul_slots are including also
  slots with dl/ul symbols respectively
* refactor set_tdd_config_nr
* moved function to MAC
* fill max_num_of_symbol_per_slot_list depending on slot type
* use new set_tdd_config_nr in stack
* minor refactor in config.c to improve readability (scs)

Co-authored-by: Guido Casati <guido.casati@firecell.io>
2025-01-28 10:07:30 +01:00
Laurent THOMAS
284b7af49c more comprehensive modulation lut table generation 2025-01-28 09:50:29 +01:00
Laurent THOMAS
f272d7d1cc set correct type on qpsk modulation table 2025-01-28 09:50:29 +01:00
Laurent THOMAS
c73353bed3 comprehensive dmrs reception and better cpu efficiency 2025-01-28 09:50:29 +01:00
vijay chadachan
421a690b42 Add frame_structure_t to gNB_MAC_INST 2025-01-28 09:42:45 +01:00
Guido Casati
c3a6700037 Implement MAC/RRC setter/getter functions to support multiple TDD patterns
* set_tdd_bmap_period, config_tdd_patterns: to configure TDD period, including bitmap, in the frame structure
* get_tdd_periodicity: to retrieve the periodicity in milliseconds for the given TDD pattern
* get_tdd_period_idx: to get the TDD period index based on pattern periodicities
* get_ul_slots_per_period: get the number of UL slots (including mixed with UL symbols) in period
* get_full_ul_slots_per_period: get the number of full UL slots in period
* get_dl_slots_per_period: get the number of DL slots (including mixed with DL symbols) in period
* get_full_dl_slots_per_period: get the number of full DL slots in period

Co-authored-by: vijay chadachan <vijay.chadachan@firecell.io>
2025-01-28 09:42:45 +01:00
vijay chadachan
9cf1ce7427 Add new TDD period and bitmap configuration structs definitions (nr_common.h)
Co-authored-by: Guido Casati <guido.casati@firecell.io>
2025-01-28 09:42:45 +01:00
Guido Casati
aa68e19ebd Add set_TimeDomainResourceAllocation and refactor nr_rrc_config_ul_tda
* allocate and configure NR_PUSCH_TimeDomainResourceAllocation in a separate function
* remove duplicated lines of code
* use in nr_rrc_config_ul_tda
* use calloc_or_fail
* clang-formatted
2025-01-28 09:42:45 +01:00
Guido Casati
97a575ffeb Reviewed NFAPI tdd_period definition in nfapi_nr_tdd_table_t
* added define for NFAPI_MAX_NUM_PERIODS
* enhanced comments
2025-01-28 09:42:45 +01:00
Robert Schmidt
64a472aef1 Merge branch 'integration_2025_w04' into 'develop'
Integration: `2025.w04`

Closes #876, #896, #875, #893, and #878

See merge request oai/openairinterface5g!3226

* !3198 remove a set of compile options that don't work anyway
* !3171 Refactor SCTP Association Response Handling and E1 connection loss at CU-UP
* !3023 usrp constant and slow derive timestamp
* !3215 Remove unused code
* !3192 fix nr phy-test mode in ntn
* !3214 fix(nrLDPC_coding_t2): Miscellaneous fixes related to T2
* !3020 use ML receiver for 64 QAM UL-MIMO
* Demote error logs to debug for "PUCCH not processed"
* !3217 minor improvements in T hacks
* !3199 Add a small FAPI Hex parser utility
* !3209 Remove most of m64 type usage
* !3211 Avoid huge calloc by alloc'ing TBs independently
* !3212 F1AP IDs: Allow AddMod, fix concurrency bug
* !3152 E1 Setup enc/dec library and unit test
* !2999 Repair nFAPI in 5G
* !3210 FHI72: FDD support
* !3220 Improve RA logs
2025-01-28 07:51:30 +00:00
Jaroslava Fiedlerova
7bd248e15d Merge remote-tracking branch 'origin/preamble-index-logs' into integration_2025_w04 (!3220)
Improve RA logs

Modify existing LOG entries to include preamble index, timing advance and
estimated distance from the gNB. This makes mapping RA attempts to
physical/simulated UEs easier via sent/received preamble index or physical
distance from the gNB in scenarios with >1 UE.
2025-01-27 16:15:10 +01:00
Jaroslava Fiedlerova
c7a90ed237 Merge remote-tracking branch 'origin/fhi72-fdd-mode' into integration_2025_w04 (!3210)
FHI72: FDD support

- harmonize DL/UL PRB mapping in one get_xran_prb_map() function with support
  of mixed slot and duplex mode
- do not assume TDD by default
2025-01-27 15:47:18 +01:00
Jaroslava Fiedlerova
699f2e5d81 Merge remote-tracking branch 'origin/nfapi-fixes' into integration_2025_w04 (!2999)
Repair nFAPI in 5G

Add 5G nFAPI in OAI/Make it it work.

Many commits in this branch are basically bug fixes of things that don't work
properly, such as

- check for correct conditions (e.g. instance numbers in the RAN context)
- remove artificial limitation (e.g. only one PUCCH per TDD period in the PNF)
- improve performance (reduce big mallocs, make some static buffers such as a
  global ring buffer for nFAPI messages in the PNF)
- fix bugs in nFAPI (e.g., increase maximum message size to ~64kB instead of
  1500 bytes, because the latter is way too small for many TX_data.requests in
  5G, and it will delay message arrival unduly)
- fix bugs in message enc/dec (e.g., handle FDD in config.request)
- adjust the L1 such that the condition "we run monolithic" is not necessery
  (e.g., some message numbers in nFAPI struct where reset in MAC, instead of
  L1, and this breaks when running the PNF)

There are instructions that explain how to set it up. Two CI tests have been
added, one with COTS UE and MIMO in DL+UL in TDD numerology 1 (30kHz), and a
second test with FDD mu=0 (15kHZ) in RFsimulator.

These were some old to-dos that have been addressed.

- test with COTS UE - 4x4 pipeline works good in DL, UL now also work
- test in RFsim
- make PNF status message
- make FDD in u0 work
2025-01-27 15:46:19 +01:00
Robert Schmidt
382820dce2 Rename 5G RFsim u0 25PRB title name: it's nFAPI now 2025-01-27 15:36:30 +01:00
Robert Schmidt
3ad9a43880 pnf_nr_p7_pack_and_send_p7_message(): don't use global buffer
This function packs P7 messages. At least RX_data.indication messages
might be much bigger than the global buffer that is used here. Allocate
the buffer on the stack, and make it bigger. Do not use the global
buffer, it's simply not necessary; increasing the global tx buffer size
might have negative effects elsewhere in the code.

That change might make the function reentrant. The mutex seems to only
guards the codec config. However, leave it to not introduce any
regressions as of now.
2025-01-27 15:36:30 +01:00
Robert Schmidt
377ff8970e Merge remote-tracking branch 'origin/e1-setup-encdec-tests' into integration_2025_w04 (!3152)
E1 Setup enc/dec library and unit test

This MR is adding a library for E1 Setup enc/dec functions:

- E1 CU-UP Setup Request
- E1 CU-UP Setup Response
- E1 Setup Failure

and relevant unit tests
2025-01-27 11:43:46 +01:00
Robert Schmidt
f6243e9078 Merge remote-tracking branch 'origin/f1-ue-data-no-assert' into integration_2025_w04 (!3212)
F1AP IDs: Add update, fix concurrency bug

I suspect a concurrency bug: For instance, during reestablishment, the
CU needs to update the DU UE ID under which the UE is identified in the
DU. Previously, the CU would remove, then add the DU UE ID info. At the
same time, the PDCP thread might look up the information. This can lead
to asserts. Modify the code to do the update under (one) lock.

Also, refactor some code.
2025-01-27 11:42:29 +01:00
Robert Schmidt
2cecffb02f Merge remote-tracking branch 'origin/fix-huge-malloc' into integration_2025_w04 (!3211)
Avoid huge calloc by alloc'ing TBs independently

Fix real-time problems on smaller machines due to big calloc(). See the
commit(s) for more details.
2025-01-27 11:40:53 +01:00
Robert Schmidt
6be898806e transform RFsim band 66 u0 test to nFAPI 2025-01-27 10:59:40 +01:00
Robert Schmidt
c553173677 Modify 4x4 60MHz COTS UE test to use nFAPI
Modify the existing 4x4 60MHz USRP+COTS UE test to use nFAPI. The
throughput tests remain the same.
2025-01-27 10:59:40 +01:00
Robert Schmidt
03b63257f2 Add documentation for nFAPI 2025-01-27 10:59:40 +01:00
Robert Schmidt
48d52fdf42 Consolidate 2 gnb-vnf configs in 1 2025-01-27 10:59:40 +01:00
Robert Schmidt
970eb04a84 Remove hardcoding of numerology in VNF
Similar to the parent commit, make the numerology in the VNF
configurable. Unlike for the PNF change, the VNF frame/slot info is in a
per-PNF connection structure to which the "oai_integration" code has no
access. So we need to hack the nfapi_vnf_p7_add_pnf() function signature
to take the numerology, to be able to save this on a per-PNF basis.

The fact that we store this on a per-PNF basis is not strictly required,
as the VNF cannot handle multiple numerologies as of now, either.
However, we might want to extend this in the future, so it seems prudent
to store this on a per-PNF basis, so that we could start handling
multiple numerologies at the L2 without the need to change the L1 or
nFAPI code itself.

Also, the numerology is not needed except for some code that deals with
timing over nFAPI. As of now, we don't use this code (nFAPI gets a
trigger every slot, as per the VNF request, see an earlier commit in
this series), but also here, let's not make the future more complicated
by storing the numerology for each PNF now (this could always be reverted).

For 4G, put numerology 0 (15kHZ SCS), which is the SCS that LTE uses.
2025-01-27 10:59:40 +01:00
Robert Schmidt
58f2f9b3d7 Remove hardcoding of numerology in PNF
Fill in the dynamically received numerology, and make the numerology at
the PNF configurable, following the changes in the parent commit.

The change for the reading is somewhat of a hack, because nFAPI, as of
now, does not really foresee to store the numerology, so we fill the
numerology during the start request, when the numerlogy has been
received in the config request, but at that time, the structure for the
time information (frame/slot) does not exist yet.
2025-01-27 10:59:40 +01:00
Robert Schmidt
3a1cd7480e Adjust slot length based on numerology for proper timing 2025-01-27 10:59:19 +01:00
Robert Schmidt
f7617f8c9b nFAPI time conversion: handle numerologies flexibly
At both the PNF and the VNF, introduce a separate numerology field, and
pass the numerology when converting time information using macros from
nfapi_interface.h. The actually numerology is still hardcoded to 1 (as it
was before), but the follow-up commits will put a suitable numerology.

In both cases, but the numerology next to the frame/slot information.
2025-01-27 10:59:19 +01:00
Robert Schmidt
abe77333b1 L1-emul UE: Make independent of numerology
Similarly as the parent commit(s):
- remove hardcoding to specific numerology
- avoid conversion when we don't need it
2025-01-27 10:59:19 +01:00
Robert Schmidt
08ddce4750 Make independent of numerology: no time conversion macros
Similar as the parent comment, remove time macros. In this particular
case, we can just pass the exact frame/slot information, instead of
squeezing it in a single integer.
2025-01-27 10:59:19 +01:00
Robert Schmidt
e051c9bb0c Simplify code: no time conversion macros necessary
The next commits will modify the time macros used in the 5G nFAPI code
to handle different numerologies. As a preparation, remove all the
usages of these macros where they really don't matter (e.g., don't
convert if we don't need to).
2025-01-27 10:59:19 +01:00
Robert Schmidt
5435585b13 Remove original nfapi patch file
This file is 8y old. It does not seem to serve any purpose. Remove it.
2025-01-27 10:59:19 +01:00
Robert Schmidt
d028cab7ae add header guards 2025-01-27 10:59:19 +01:00
Robert Schmidt
871311d986 config.request: handle FDD 2025-01-27 10:59:19 +01:00
Robert Schmidt
29ce2e5e7f phy_nr_slot_indication(): Remove useless code: it does nothing 2025-01-27 10:59:19 +01:00
Robert Schmidt
0659148d85 Print sfn/slot directly 2025-01-27 10:59:19 +01:00
Robert Schmidt
956ffe4751 aerial_phy_nr_slot_indication(): Remove useless code: it does nothing 2025-01-27 10:59:19 +01:00
Robert Schmidt
1337245d94 PNF: provide some logging of stats 2025-01-27 10:59:19 +01:00
Robert Schmidt
6145f02b81 Function decls to make LTE compile 2025-01-27 10:59:19 +01:00
Robert Schmidt
06a76c3bbc PNF: Deliver DL_TTI.req/TX_data.req only pairwise to L1
the L1 needs both a PDU (in TX_data.req) as well instructions for
the actual transmission (in DL_TTI.req) to encode a PDSCH message. In
nFAPI, it can happen that a DL_TTI.request message has been received
(configuring the PDSCH transmission), without the TX_data.request having
reached the PNF. The L1 assumes to have the PDU.

To avoid problems, ensure that only the pair of DL_TTI.req/TX_data.req
is delivered. Otherwise, drop either message.
2025-01-27 10:59:19 +01:00
Robert Schmidt
77837c7428 Remove unnecessary and long hexdump 2025-01-27 10:59:19 +01:00
Robert Schmidt
63159d3f87 sockaddr_in no memset 2025-01-27 10:59:19 +01:00
Rúben Soares Silva
10c5178bfb Add configuration files for nFAPI split with RFSim and 100MHz 2025-01-27 10:59:19 +01:00
Robert Schmidt
dee68e6319 nFAPI: increase maximum segment size to 65000
nFAPI has a mechanism to segment messages that are too big for transport
over a given medium (see e.g. SCF 225, section 2.3.2).

The maximum segment size of 10000 makes that for larger payloads, e.g.
TX_data.request, many small segments are to be sent. This can create or
increase delays on the transport. On the other hand, the currently only
available transport mechanism, UDP, allows to transport packets of up to
almost 65535 bytes. Correspondingly, increase the maximum segment size
so that less segments are to be created, and potentially, less delay is
to be incurred.  # Please enter the commit message for your changes.
Lines starting
2025-01-27 10:59:19 +01:00
Robert Schmidt
b5276bdb6d nFAPI log: cleanly separate tv_sec/tv_nsec for readability 2025-01-27 10:59:19 +01:00
Robert Schmidt
099804078e pnf_p7_slot_ind(): Fix warning and simplify (no need for slot_ahead) 2025-01-27 10:59:19 +01:00
hsum
6e210e15f1 Handle DL_TTI.request more efficiently
Same as parent.

Co-authored-by: hsum <ming-hong.hsu@eurecom.fr>
Co-authored-by: chenyi <Yi-Quan.Chen@eurecom.fr>
Co-authored-by: Rúben Soares Silva <rsilva@allbesmart.pt>
2025-01-27 10:59:19 +01:00
hsum
cba2f92c8a Handle UL_TTI.request more efficiently
Same as parent.

Co-authored-by: hsum <ming-hong.hsu@eurecom.fr>
Co-authored-by: chenyi <Yi-Quan.Chen@eurecom.fr>
Co-authored-by: Rúben Soares Silva <rsilva@allbesmart.pt>
2025-01-27 10:59:19 +01:00
chenyi
282ee77104 Handle ul_dci.request more efficiently
Same as parent commit.

Co-authored-by: hsum <ming-hong.hsu@eurecom.fr>
Co-authored-by: chenyi <Yi-Quan.Chen@eurecom.fr>
Co-authored-by: Rúben Soares Silva <rsilva@allbesmart.pt>
2025-01-27 10:59:19 +01:00
Robert Schmidt
10beee4fd6 Handle tx_data.request efficiently
Avoid delays in tx_data.request handling by avoiding big malloc()s and
copy operations. Reimplement function to (1) peek the frame/slot
numbers, (2) decide on buffer, and (3) unpack directly into
pre-allocated memory.

Co-authored-by: hsum <ming-hong.hsu@eurecom.fr>
Co-authored-by: chenyi <Yi-Quan.Chen@eurecom.fr>
Co-authored-by: Rúben Soares Silva <rsilva@allbesmart.pt>
2025-01-27 10:59:19 +01:00
Rúben Soares Silva
8da4e92189 Provide check_nr_nfapi_p7_slot_type()
Some messages might arrive for the wrong slot; in those cases, the
message has to be dropped. The next commits will make use of this
functionality.
2025-01-27 10:59:19 +01:00
Rúben Soares Silva
d6b8fe93ab Provide peek_nr_nfapi_p7_sfn_slot() for fast msg dec
The next commits refactor the rx handling of messages in the PNF. To
efficiently handle them, provide a "peek()" function that gives us the
frame/slot for which a message is destined. This allows to decide if a
message is on time and select a destination buffer, before unpacking it
completely, avoiding copies.
2025-01-27 10:59:19 +01:00
chenyi
17e36029fa Fix PMI condition: avoid division by zero 2025-01-27 10:59:19 +01:00
Robert Schmidt
a1190f9fd0 nFAPI: give more time for messages to arrive, make it work
The time that a message between PNF/VNF to arrive depends mostly on the
transport. To allow for some delays, there is a slot_ahead time, during
which the VNF is allowed to schedule and send instructions to the PNF.

This can be multiple slots; the 1ms hitherto given might typically too
short. Increase to 10ms, to encompass a wider range of slot_ahead times.

Make the corresponding log message of when old (stale) message are
removed a bit clearer with respect to times.

This is the first commit in which nFAPI works. Follow-up commits improve
performance.
2025-01-27 10:59:19 +01:00
Robert Schmidt
32363ccaad Remove usage of emulate_l1 flag at gNB
The usage of this flag in the L1 is simply wrong: either, the NFAPI mode
runs L1, or not. Correspondingly, add an assert to check this invariant.

In the NR_IF_module, the correct check to do is for VNF (implying no L1,
or "emulation of L1" [which is not true]), in which case we use
queues.
2025-01-27 10:59:19 +01:00
Robert Schmidt
3fcfef9006 L1 DLSCH: don't preallocate memory, improve log
The L1 receives a pointer to the L1 payload to use for PDSCH generation.
This would overwrite an existing pre-allocated pointer. Remove this
preallocation. Instead, allocate it in the simulator (the only place
that actively uses this buffer allocation; in nr-softmodem, it's lost by
assigning a pointer). Allocate with an extra byte, because the payload
(in bits) might not be a multiple of 8 bits/1 byte, so the CRC is in the
last 3 bytes.

Also, improve the log with frame/slot information if the PDSCH payload
pointer is NULL.
2025-01-27 10:59:19 +01:00
hsum
195b23bdc4 Refactor is_nr_p7_request_in_window function for clarity and efficiency
The function now utilizes simpler variable names and logic to determine
if a given NR P7 request falls within the timing window.

The logic for determining if a request is within the timing window is as follows:
- The function calculates the absolute difference between the current
  and received SFN slots, taking into account the possibility of
  wraparound.
- If the absolute difference is greater than half of the maximum SFN
  slot value, it subtracts this difference from the maximum SFN slot
  value to get the actual difference.
- The function then checks if this difference is less than or equal to
  the specified timing window. If it is, the request is considered to be
  within the window.

Additionally, the commit updates the function signature to return a
boolean value for better readability and consistency.

Changes made:
- Simplified variable names for readability
- Improved logic for handling wraparound scenarios
- Updated function signature to return a boolean value

Co-authored-by: Rúben Soares Silva <rsilva@allbesmart.pt>
2025-01-27 10:59:19 +01:00
Robert Schmidt
267be0afc1 Remove huge memset that is pointless 2025-01-27 10:59:19 +01:00
Robert Schmidt
7949b622be RACH.indication: don't check time window
Since commit defc97ec16 ("Msg2 and Msg3 at gNB: check allocation before
committing to Msg2"), the scheduler calculate Msg2/Msg3 frame/slot
before allocation of Msg2, and not when receiving Msg1. It also respects
the RA response window correctly.

Correspondingly, we don't need to calculate here if the RACH.indication
is within the time window. The scheduler will do this.
2025-01-27 10:59:19 +01:00
Robert Schmidt
6cdea81e4a Reduce PNF nFAPI logs 2025-01-27 10:59:19 +01:00
hsum
65bc677fc3 Ensure equal PNF timing pace
If VNF and PNF are deployed through different processes, it's crucial to
maintain synchronization and ensure smooth operation. This commit
addresses the need to keep the VNF slot ahead of 2 (as required for
network deployment), while ensuring that PNFs wait appropriately to
avoid overtaking the slot. Specifically, this involves measuring slot
duration and implementing a wait mechanism to ensure that PNFs do not
exceed a slot duration of 300 microseconds. This ensures proper smooth
operation, especially in the case of RFsim.
2025-01-27 10:59:19 +01:00
Robert Schmidt
10afbef473 reset nFAPI message count in PNF
Reset the counters. In monolithic, this happens in the scheduler; in the
PNF, without this change, it would trigger PDCCH again.

Co-authored-by: hsum <ming-hong.hsu@eurecom.fr>
2025-01-27 10:59:19 +01:00
Robert Schmidt
50aec62b40 pnf_p7_slot_ind(): don't trigger UL_tti_req twice
This is already triggered in the same function.
2025-01-27 10:59:19 +01:00
Robert Schmidt
63c1b3df03 pnf_p7_slot_ind(): avoid memleak 2025-01-27 10:59:19 +01:00
Robert Schmidt
15b08a362f Refactor pnf_phy_ul_dci_req() et al. to use common code
Refactor pnf_phy_ul_dci_req(), pnf_phy_dl_tti_req(),
pnf_phy_tx_data_req(), pnf_phy_ul_tti_req(), to use L1 functions to
"load" L1 jobs to be executed, via L1 functions.
2025-01-27 10:59:19 +01:00
Robert Schmidt
a32ada76c7 Workaround for sched_response in PNF
In monolithic, the sched_response mechanism ensures that FAPI messages
for one slot are not overwritten by scheduler instructions for the
following slots (i.e., it is like a memory allocation pool).

The allocation happens in nr_schedule_response(), not used by the PNF.
Hence, only deallocate when in monolithic.

The PNF uses a big ring buffer over all slots in a frame to ensure the
same.
2025-01-27 10:59:19 +01:00
Robert Schmidt
82f8c38d74 nr_schedule_response(): split out UL_dci_req into separate function 2025-01-27 10:59:19 +01:00
Robert Schmidt
28fb982cb9 nr_schedule_response(): Split out ul_tti_req into separate function 2025-01-27 10:59:19 +01:00
Robert Schmidt
f2229adba3 nr_schedule_response(): make right order (222.10.0x "API message order") 2025-01-27 10:59:19 +01:00
Robert Schmidt
4fe8d3cd8e nr_schedule_response(): break up in separate dl_tti_req + tx_req phases 2025-01-27 10:59:19 +01:00
Robert Schmidt
6a630f4646 nr_schedule_response(): Separate dlsch_fill into DL_tti_req and TX_req part
FAPI sends those independently, so we cannot treat both on the arrival
of the first one.
2025-01-27 10:59:19 +01:00
Robert Schmidt
c37bf20501 nr_schedule_response() is not used in VNF, only monolithic 2025-01-27 10:59:19 +01:00
Robert Schmidt
73478ca27e pnf_p7_slot_ind(): Handle messages in FAPI 222.10.0x order 2025-01-27 10:59:19 +01:00
Robert Schmidt
70474ad130 PNF: don't send dummy data
If nothing is to be sent, nothing is to be done.
2025-01-27 10:59:19 +01:00
Robert Schmidt
c7e145a471 pnf_p7_slot_ind(): needs to use TX thread time
This function applied an sf_ahead, bigger than the actual slot
indication message sending (so a message could NEVER arrive on time!).
Reduce to zero, because this is when it should arrive for us.
2025-01-27 10:59:19 +01:00
Robert Schmidt
16ead1d001 nr_slot_select() and set_tdd_config_nr(): remove useless second frame
FAPI says these lists should be for MAX_TDD_PERIODICITY (which is maybe
a frame, or a TDD period? but likely not two frames). Reduce to one
frame.

Also, the nFAPI code assumes one entire frame, so use that (this commit
necessary to actually make the PNF work, otherwise, the
packing/unpacking of the FAPI message would need to do 2 frames).

Closes: #876
2025-01-27 10:59:19 +01:00
Robert Schmidt
28b60edaa2 Use posix_memalign() for pnf_p7_t creation
Some L1 functions might get a pointer to P7 structures, and use SIMD in
which case the memory access needs to be aligned.
2025-01-27 10:59:15 +01:00
Rúben Soares Silva
3fb20d960b Call trigger_scheduler defined in nfapi_vnf.c instead of redefining it 2025-01-27 10:59:15 +01:00
Robert Schmidt
e3bad16ab8 Call indication regularly
Upon reception of FAPI UL messages (e.g., RACH.indication), those
messages are put into queues, to be delivered in a single call,
NR_UL_indication(). Call the scheduler to trigger processing in UL.

Note that ideally, these queues should not exist at all, and messages
should just be delivered asynchronously, as this would lead to less
copying of messages. Currently, we fulfill the scheduler interface
instead.

Important! Trigger UL after having run DL scheduler and sent the
messages, to ensure short delay between Slot.indication, and the
response to those messages.
2025-01-27 10:59:15 +01:00
Robert Schmidt
531726633a Call directly into scheduler from VNF, start immediately
The previous designs seems to do:

    loop {
      poll_ind_queue()
      if (msg)
        scheduler;

      pselect() on messages;
      handle_message {
        if slot_ind
          put_ind_queue()
      }
    }

So basically, we artificially put a queue for slot indications in the
middle, but still handle it in the same thread(!). This for some reason
results in a big slow down if the PNF runs faster.

Now, we just do pselect(), waiting for messages. We handle the slot
indication immediately (the schedule should take some microseconds),
then return to pselect().
2025-01-27 10:59:15 +01:00
Robert Schmidt
412446077f IF module slot_indication: send message in PNF
Use this function to implement distinct behavior for monolithic or PNF:

- monolithic: run the scheduler, as normal
- PNF: send a slot indication; the VNF will send an answer which the PNF
  will handle elsewhere.

Add function declarations to make nr_ulsim compile, as NR_IF_Module.c is
part of the MAC sources. As of now, this is necessary; I think the right
way would be to take NR_IF_Module.c out of the MAC, and make this a
"glue" library that sticks L1 and L2 together, in monolithic (in VNF, in
that case, we should not link in L1, and for the PNF not the L2,
creating separate executables... Rome was not built in one day).
2025-01-27 10:59:15 +01:00
Robert Schmidt
c5a76d6654 Remove unnecessary handle_nr_slot_ind()
the slot indication is sent from the tx_thread (tx_func()). Thus, we
don't need to send it a second time.
2025-01-27 10:59:15 +01:00
Robert Schmidt
84d92ac820 Prevent memory leak, use stack for slot indications 2025-01-27 10:59:15 +01:00
Robert Schmidt
9f80c82f54 Only use refcount if monolithic
There is a reference counting mechanism used in monolithic. It does not
apply for the PNF.
2025-01-27 10:59:15 +01:00
Robert Schmidt
9634593da7 Don't call L1 code in VNF
The VNF should never call into the L1, it's L2/L3, by definition. Also,
it's not necessary.
2025-01-27 10:59:15 +01:00
Robert Schmidt
1b44f6448b Allow to use multiple PUCCH at once
We are required to store multiple PUCCH (e.g., for multiple UEs).
However, nr_fill_pucch() automatically freed the previously active PUCCH
structure. Of course(!) this does not make sense.

However, the problem is that init_nr_transport() allocated only one
PUCCH structure. Also this does not make sense to me. The problem was
that slot_ahead was 0, which logically cannot happen in this function
(because slot_ahead is illogical, we must give the radio some time). The
reason is that it uses if_inst->sl_ahead, which, prior to this commit,
was not set.

The init_nr_transport() function is called normally from main() through
init_eNB_afterRU(). In this case, we initialize if_inst->sl_ahead to
what is set in main(). In the PNF case, however, we call
init_nr_transport() from the PNF thread, when receiving the start
request. In the main(), we wait for this to happen, before setting
if_inst->sl_ahead. Hence, initializing this variable (which we should
safely be able to do) before solves the problem.
2025-01-27 10:59:15 +01:00
Robert Schmidt
84d9df501d No special handling for PNF for RX procedures
See also a later commit "Allow to use multiple PUCCH at once", in which
PUCCH handling in the case of PNF is reworked.

We might squash both commits.
2025-01-27 10:59:15 +01:00
Rúben Soares da Silva
a6b40ace23 Assign NFAPI_NR_CONFIG_SLOT_CONFIG_TAG tag in TLVs used for transmitting the TDD Slot configuration through CONFIG.request. 2025-01-27 10:59:15 +01:00
Robert Schmidt
4ceac17cd5 Shorten the sleep
sync_var is set in main() (which likely is wrong in that the L1 code
sync itself, and not require the help of main()).
2025-01-27 10:58:42 +01:00
Robert Schmidt
dd3b3caf32 Sync PNF through the radio
The radio gives the clock. Therefore, we do not need to keep the time
separately in the PNF.

Also, the VNF should not run the ru_thread, as this is an L1 thread.
2025-01-27 10:43:57 +01:00
Robert Schmidt
604cfe8709 Request timing every slot
This is to align with monolithic/FAPI, where we get slot indications in
each slot. In the nFAPI, this is replaced by timing information, such
that the VNF ticks automatically, and gets indications from the PNF on
early/late messages. The timing information handling is not implemented
in the present nFAPI implementation. Instead, we adopt the FAPI behavior
and send timing information in every slot, abusing it to be a slot
indication.
2025-01-27 10:43:57 +01:00
Robert Schmidt
ce0737fc9d Remove double-add of PNF connection
There is no need to add the PNF in nr_start_resp_cb(), because it has
already been done in nr_param_resp_cb(). This might be wrong, because 4G
does it only in nr_start_resp_cb(), but for the moment, since it is also
used in nr_param_resp_cb(), avoid the double add.
2025-01-27 10:43:47 +01:00
Robert Schmidt
d4715fdeca Add PNF to VNF's list of PNFs when IP available
The same function is called in nr_start_resp_cb(), why there and not here?

At reception of nr_param_response, we receive the remote PNF information
on PNF/VNF. We have to store it.

In nr_start_response, it might not be correct and/or can be taken out.
The next commit will remove it.
2025-01-27 10:42:42 +01:00
Jaroslava Fiedlerova
f3e5ab1060 Merge remote-tracking branch 'origin/remove-most-of-m64-type-usage' into integration_2025_w04 (!3209)
Remove most of m64 type usage

MMX instructions were first SIMD version, the registers management is complex
(_mm_empty()) so, it is better to remove it now and use more recent instructions

anyway, gcc/clang should replace it automatically as long as we enable sse2,
that should always be the case but for code understanding and for ARM porting
for example, it is better to explicitly remove it
2025-01-27 10:35:20 +01:00
Jaroslava Fiedlerova
10392b5da2 Merge remote-tracking branch 'origin/nfapi-parser' into integration_2025_w04 (!3199)
Add a small FAPI Hex parser utility

Adds a small FAPI hex parser utility nfapi_hex_parser, that takes in a FAPI
message hexdump, either from the command line or a file, unpacks it and prints
the contents out to the console.

The functions to print the data to the console were added alongside the existing
utility functions, for both P5 and P7 messages.

This allows the user to quickly check if a message has the valid format to be
unpacked in OAI.

The file examples.md contains some examples of execution and output.

This utility is compiled alongside the NFAPI_LIB, as such, it is compiled
whenever we compile nr-softmodem, or any other target that uses the NFAPI_LIB.
2025-01-27 10:32:59 +01:00
Jaroslava Fiedlerova
5512a48fbd Demote error logs to debug for "PUCCH not processed"
As per https://gitlab.eurecom.fr/oai/openairinterface5g/-/issues/896#note_148540,
these logs can be ignored.

Closes: #896
2025-01-27 09:32:49 +01:00
Robert Schmidt
84c69e5064 Avoid huge calloc by alloc'ing TBs independently
Prior to this this commit, the structure NR_UE_info_t is 4881632 bytes.
On some machines, e.g., one of the CI systems, this can lead to realtime
problems when doing the initial calloc() of the data structure.

Commit e586efb29d ("Enable 32 HARQ
Processes in DL, UL") introduced the real-time problems by increasing
the number of HARQ processes.

The reason NR_UE_info_t is that big is that it contains buffers for DL
HARQ data that might need to be retransmitted (the L1 is stateless, it
cannot store this for the L2). To reduce the size, dynamically allocate
the DL HARQ buffers when they are needed. This also reduces the size of
NR_UE_info_t to 15840 bytes.

Encapsulate transportBlock in byte_array and accessory functions, and
allocate in big chunks of multiple of ~32kB.

Reported-By: Cedric Roux <cedric.roux@eurecom.fr>
Fixes: e586efb29d
Closes: #875
2025-01-27 07:47:38 +01:00
Robert Schmidt
8eca2e0591 Correctly link function
ran_func_kpm.c uses cp_ba_to_str(), but it is not defined in OAI. Define
it so we can link properly, instead of relying on FlexRIC (where it was
defined).
2025-01-27 07:45:39 +01:00
Robert Schmidt
febeaa7181 F1AP IDs: Add update method to fix concurrency bug
Introduce function cu_update_f1_ue_data() which does remove+add under
one lock. This fixes a concurrency bug. For instance, during
reestablishment, the CU needs to update the DU UE ID under which the UE
is identified in the DU. Previously, the CU would remove, then add the
DU UE ID info.  At the same time, the PDCP thread might look up the
information. This can lead to asserts. Use the above addmod
functionality to do the remove-add under a mutex.

Modify test to verify this works as expected.
2025-01-24 16:09:10 +01:00
Jaroslava Fiedlerova
7520218195 Merge remote-tracking branch 'origin/t-hacks-small-improvement' into integration_2025_w04 (!3217)
minor improvements in T hacks
2025-01-24 16:06:19 +01:00
Robert Schmidt
ffb3354d49 Verify cu/du_add_f1_ue_data() success in stack 2025-01-24 15:39:43 +01:00
Laurent THOMAS
b999177810 remove MMX instruction usage in polar decode 2025-01-24 15:29:28 +01:00
Robert Schmidt
f0ab268393 Revert "F1AP IDs: Allow AddMod, fix concurrency bug"
This reverts commit 6d5e29f5ae.
2025-01-24 15:23:06 +01:00
Jaroslava Fiedlerova
266076897c Merge remote-tracking branch 'origin/qam64_mimo_ML' into integration_2025_w04 (!3020)
use ML receiver for 64 QAM UL-MIMO

Change condition on MMSE/ML selection to include 64QAM for ML UL-MIMO receiver.
Only 256QAM will now use MMSE UL-MIMO receiver.
2025-01-24 11:32:37 +01:00
Jaroslava Fiedlerova
706aecf22b Merge remote-tracking branch 'origin/fix_t2_harq_combined_offset' into integration_2025_w04 (!3214)
fix(nrLDPC_coding_t2): Miscellaneous fixes related to T2

1. HARQ combined offset:
The offset provided for each code block in the HARQ combined input and output
buffer shall not be above 512. A modulus was performed on the offset of the TB
in the buffer to avoid this situation. But the offset of the code block was
added afterward so that the total offset was sometimes going above 512.This
commit performs the modulus after adding the code block offset. Usually this
issue was triggering a segfault after less than 2 minutes of an iperf test on
some setup using T2. The same iperf test was successfully performed during 10
minutes on the same setup with this change.

2. Properly stop LDPC coding in gNB and UE:
LDPC coding was yet not properly stopped by using free_nrLDPC_coding_interface
in gNB and UE. This was not causing major issue until now. It was especially not
causing any issue with T2 LDPC coding using the PF. But using T2 VFs, if the
coding library is not properly stopped then the VF cannot be used anymore unless
the admin app is restarted. So this MR adds the missing free_nrLDPC_coding_interface.
2025-01-24 11:30:13 +01:00
Jaroslava Fiedlerova
3231b0bcfc Merge remote-tracking branch 'origin/ntn-phytest-mode' into integration_2025_w04 (!3192)
fix nr phy-test mode in ntn

Following SIB19 MR !3019 (merged), the phy-test mode is no longer working
In this MR we update the handling NTN-Config from ServingCellConfigCommon
to be the same as when NTN-Config is received in SIB19

More details: !3019 (comment 145103)
2025-01-24 11:28:32 +01:00
Guido Casati
124f4ab9c5 Improvements to rrc_gNB_process_e1_setup_req
* add const atttribute to input message
* use malloc_or_fail
2025-01-24 11:13:17 +01:00
Guido Casati
5ea432c081 Use CU-UP E1 Setup Failure enc/dec lib in stack 2025-01-24 11:13:17 +01:00
Guido Casati
75b238633c Add test for E1 CUUP Setup Failure 2025-01-24 11:13:17 +01:00
Guido Casati
beb74b3e62 Add GNB-CU-UP E1 Setup failure enc/dec library 2025-01-24 11:13:14 +01:00
Rúben Soares Silva
b1d7bbf1a2 Add dump procedures fir UL_TTI.request PDUs
Add examples of UL_TTI.request to examples.md
Small fix on printing RNTI on DL_TTI.request PDSCH PDU on RNTI field
2025-01-24 10:05:49 +00:00
Jaroslava Fiedlerova
c0a0de3e63 Merge remote-tracking branch 'origin/remove-unused-code' into integration_2025_w04 (!3215)
Remove unused code
2025-01-24 09:31:14 +01:00
Jaroslava Fiedlerova
03420b112e Merge remote-tracking branch 'origin/fix-bug-usrp-constant-derive' into integration_2025_w04 (!3023)
usrp constant and slow derive timestamp

Sample write reorder function doesn't handle properly the clock shift.

It keeps the same time origin forever, so, if the clock sifts in one direction,
we finish to reach the maximum time shift that was designed for slot to slot
maximum shift.

We may also consider if this function is useful: gNB and UE currently ensure Tx
in order because there are other issues above if we let Tx preparation run out
of order in separate threads

Closes #893
2025-01-24 09:27:30 +01:00
Laurent THOMAS
ef3b99a263 remove MMX instruction usage in threegpplte_turbo_encoder_sse() 2025-01-23 21:18:26 +01:00
Laurent THOMAS
e106ec6d91 remove m64 type and a very basic cleaning of LTE ulsch_decoding 2025-01-23 21:18:26 +01:00
Robert Schmidt
4d6b95a155 FHI72: Remove numerology limitation, allow to run mu=0 2025-01-23 18:26:47 +01:00
Robert Schmidt
61b8217a15 FHI72: handle FDD in xran_fh_rx_read_slot() 2025-01-23 18:16:28 +01:00
Jaroslava Fiedlerova
2da68f6056 Merge remote-tracking branch 'origin/e1ap-issue-878' into integration_2025_w04 (!3171)
- Refactor SCTP Association Response Handling
  - Unified function for both CU-CP and CU-UP handling
  - CU-CP: Notifies RRC of E1 connection loss with CU-UP
  - CU-UP: Initiates a new SCTP association request to regain E1 connection
  - this fix will prevent issue #878 from happening

- Send list of PDU Session Resources to Failed Setup in the (PDU Session
  Resource/Initial Context) Setup Response
  - depending on different failure scenarios
  - e.g. (#878) when No CU-UP is associated and still the CU-CP receives a PDU
    Session Setup Request
  - add relevant functions to handle NGAP Setup Response messages with failed
    list of items
  - this is an extra failure handling to make #878 is handled if it ever happens
    again

- NGAP Cause Refactoring
  - Refactor struct for NGAP cause group and value
  - Add extended radio network cause enumeration values
  - Refactor redundant code into a new NGAP cause encoding function

- Minor logging, function descriptions improvements

Closes #878
2025-01-23 17:50:55 +01:00
Jaroslava Fiedlerova
4f5cb2408c Merge remote-tracking branch 'origin/remove-legacy-compile-option' into integration_2025_w04 (!3198)
A user on the mailing list was confused by a wrong flag in CMakeList.txt
so, I remove this and a set of others that are known not working.
2025-01-23 17:48:42 +01:00
Guido Casati
f3890dcd2a Completed GNB-CU-UP E1 Setup failure according to 9.2.1.6 of 3GPP TS 38.463 2025-01-23 17:37:52 +01:00
Guido Casati
b2f5f216cd Add E1AP cause enum definition 2025-01-23 17:37:52 +01:00
Guido Casati
5176199aa2 Use GNB-CU-UP E1 Setup Response enc/dec lib in stack 2025-01-23 17:37:52 +01:00
Guido Casati
5b4a45b694 Add test for E1 CUUP Setup Response 2025-01-23 17:37:52 +01:00
Guido Casati
422e82df70 Add GNB-CU-UP E1 Setup Response enc/dec lib 2025-01-23 17:37:50 +01:00
Guido Casati
763c265c42 Extend CU-UP E1 Setup Response according to 9.2.1.5 of 3GPP TS 38.463 2025-01-23 17:37:02 +01:00
Guido Casati
02e1c3589b Use E1 CU-UP Setup Request enc/dec lib in stack 2025-01-23 17:34:03 +01:00
Guido Casati
8fbfcf48f6 Add test for E1 CUUP Setup Request 2025-01-23 17:34:03 +01:00
Guido Casati
414fc2e9a2 Add E1 CU-UP Setup Request enc/dec lib 2025-01-23 17:34:00 +01:00
Cedric Roux
fc4cc9ef55 T: update list of mandatory libraries 2025-01-23 16:57:43 +01:00
Cedric Roux
28a08786bb T hacks: time_meas: add a periodic tracing mode
Useful to debug realtime issues, for example when calling a periodical
routine, if it's not programmed carefully enough, it may be that the first
call takes way longer than the next ones (for example it uses some memory
that is not mapped in the process, leading to many page faults the first
time it's executed).

Having a periodic log for the timing of this routine with min/avg/max/count
will reveal that a call is way longer than average and will help in
finding where exactly in the code the time is spent, thanks to the ease
of use of the T tracer; you put T(T_XX, T_INT(1)) just before the code
you want to measure, you put T(T_XX, T_INT(0)) just after and time_meas
will show the delta time between those events. Then you cut the routine
in smaller pieces, measure with T(1)/T(0), and you finally reach the small
guilty part that takes too long.
2025-01-23 16:57:43 +01:00
Cedric Roux
44637de3b2 T hacks: minor bugfix: don't log more than once
In time_meas.c, when getting 0 for the event, we log delta time with
previous 1 for the event. "start_valid" was not cleared, so receiving
a second 0 without 1 in between may lead to wrong logging.

Should not happen in practice, but still, little bug.

(Note: we don't protect against streams of 1, but this case should also
not happen.)
2025-01-23 16:57:43 +01:00
Cedric Roux
e6ce301e83 T hacks: minor: remove executable when doing 'make clean' 2025-01-23 16:57:43 +01:00
Bartosz Podrygajlo
803c9c349a Add distance in meters to RA print in gNB 2025-01-23 16:32:31 +01:00
Bartosz Podrygajlo
ad04800b20 Add preamble_index to gNB and UE logs 2025-01-23 16:29:29 +01:00
Rúben Soares Silva
1451f30b93 Add a small FAPI Hex parser utility
Add utility functions to print the FAPI messages contents
Add dump functions for DL_TTI.request PDUs, remaining message structures to be finished
Add file examples.md with some examples on how to use nfapi_hex_parser
2025-01-23 13:34:24 +00:00
Robert Schmidt
c4b57963ee Add some documentation on debug flags/dump 2025-01-23 14:15:51 +01:00
Laurent THOMAS
536b5d8760 Clean up logging module debug flags
cleanup debug/dump flags by avoiding repetitions in the source code and
enable compiler checks. Add a help text if we set a wrong debug trace
option.
2025-01-23 14:12:29 +01:00
Laurent THOMAS
ca37e0c123 Clean up NAS code, remove unused compile options 2025-01-23 14:12:06 +01:00
Laurent THOMAS
d68a8b51e6 Remove unused PHY_MEX compile option 2025-01-23 14:11:13 +01:00
Laurent THOMAS
0f970326c2 Remove unused UESIM_EXPANSION compile option 2025-01-23 14:10:50 +01:00
Laurent THOMAS
17bb19c7be Remove unused LOCALIZATION compile option 2025-01-23 14:10:33 +01:00
Laurent THOMAS
b0734604e9 Remove useless RRC states 2025-01-23 14:10:16 +01:00
Laurent THOMAS
a54eba8fe0 Remove commented code and unused type definitions 2025-01-23 14:08:17 +01:00
Laurent THOMAS
fb2f893954 Remove unused static inline function 2025-01-23 13:57:36 +01:00
Laurent THOMAS
a8f6563060 remove a complex and not very usefull trace in replay_node 2025-01-23 10:35:49 +01:00
Laurent THOMAS
e7e01f753a remove unsed LUT 2025-01-23 10:35:49 +01:00
Laurent THOMAS
eac35f07a5 Usrp constant and slow derive timestamp
Co-authored-by: Thomas Schlichter <thomas.schlichter@iis.fraunhofer.de>
2025-01-23 10:22:31 +01:00
Robert Schmidt
1dd71b51e1 Properly implement PNF/VNF list find
maybe take this out
2025-01-22 18:29:55 +01:00
Robert Schmidt
f4862fe23b Avoid buffer overflow: initialize for multiple PRACH FD occasions
Maybe cosmetic
2025-01-22 18:29:55 +01:00
Robert Schmidt
4132fcc597 Place NFAPI waiting after RU init; don't wait for F1 if in PNF
harmonize with monolithic
2025-01-22 18:29:55 +01:00
Rúben Soares Silva
90435ccba8 Change init_eNB_afterRU to configure L1 according to proper amount.
Now uses RC.nb_nr_L1_inst instead of RC.nb_nr_inst in order to configure the L1, since in PNF RC.nb_nr_inst is always 0, and so, it wouldn't configure the L1
2025-01-22 18:29:55 +01:00
Rúben Soares Silva
c910d9f71f Change Assert condition to allow configuration when in PNF mode. 2025-01-22 18:29:55 +01:00
Robert Schmidt
e0aaa8fa5e Update nFAPI configs
Rename configs according to name guidelines. Put into right directory.
2025-01-22 18:29:50 +01:00
Robert Schmidt
337faca6f5 log changes
Remove useless message bytes printing

Print message if callback missing

less newlines in log

logs
2025-01-22 15:04:46 +01:00
Robert Schmidt
e0549de9ea Remove Slack integration for Jenkins jobs 2025-01-22 14:37:22 +01:00
Sagar Arora
3090d0414e fix(ci): waiting for a pod using k8s wait command
Signed-off-by: Sagar Arora <sagar.arora@openairinterface.org>
2025-01-22 11:06:26 +01:00
Raymond Knopp
40873d264d small fix after resolving conflicts during merge with develop 2025-01-21 21:15:39 +01:00
Robert Schmidt
d999ed2beb Merge remote-tracking branch 'origin/new-jenkins' into develop (!3213)
chore(ci): Move to new Jenkins and Openshift Cluster

- Update helm-charts with new node roles
- Add resource definition in physim helm-charts to easily schedule them
  on different cluster servers
- Update entitlement creation methodology
- Add namespace for aerial pipeline
2025-01-21 16:07:00 +01:00
Raymond Knopp
d8291147b2 Merge remote-tracking branch 'origin/develop' into ldpc_enc_avx512 2025-01-21 15:54:09 +01:00
Jaroslava Fiedlerova
829541dc36 CI: temporary commit to use Ubuntu image in FHI7.2
Due to HW version differences between the CI RHEL build machine and
the FHI 7.2 test machine (cacofonix), FHI 7.2 test using  RHEL image
failed, reporting an 'Illegal Instruction' error.
2025-01-20 18:07:30 +01:00
Guido Casati
6cfa3e3722 Add E1AP Interface Management lib files 2025-01-20 13:48:47 +01:00
Guido Casati
c0db34077a Explicitly include the mandatory IE cn_support in the E1 Setup Request
* this commit is making explicit the mandatory IE cn_support
  in the E1 Setup Request message
* also, init cn_support in E1 Setup Request initial message preparation
2025-01-20 13:45:29 +01:00
Guido Casati
0cd4aeee5b Add E1 CU-CP Setup Request type
* E1 CU-CP Setup Request is an E1 Interface Management message
  whose type defition was missing, and it is introduced in this commit
  (see 9.2.1.7 of 3GPP TS 38.463)
2025-01-20 13:38:53 +01:00
Guido Casati
334537aa98 Add comments to clarify that E1AP Setup Request refers to GNB-CU-UP E1 Setup Request 2025-01-20 13:28:56 +01:00
Jaroslava Fiedlerova
592b9a3509 CI: Update CN path for CI CN deployments on OC 2025-01-20 12:42:02 +01:00
Guido Casati
9fe045f40e Add abnormal conditions section to E1-design.md 2025-01-20 09:59:57 +01:00
Romain Beurdouche
38a38e0eaf fix(nrLDPC_coding_t2): Properly stop LDPC coding in gNB and UE
LDPC coding was yet not properly stopped by using free_nrLDPC_coding_interface in gNB and UE.
This was not causing major issue until now. It was especially not causing any issue with T2 LDPC coding using the PF.
But using T2 VFs, if the coding library is not properly stopped then the VF cannot be used anymore unless the admin app is restarted.
So this MR adds the missing free_nrLDPC_coding_interface.
2025-01-20 08:10:42 +00:00
Guido Casati
beee87cdf6 Add check on CU-UP association before sending any E1 Bearer Context Modification Request 2025-01-17 18:07:02 +01:00
Sagar Arora
5cc026a4d0 define image name via helm set parameter
Signed-off-by: Sagar Arora <sagar.arora@openairinterface.org>
2025-01-17 14:34:22 +01:00
Sagar Arora
a33796217d chore(ci): entitlement creation and namespace for aerial pipelines
Signed-off-by: Sagar Arora <sagar.arora@openairinterface.org>
2025-01-17 14:34:09 +01:00
Thomas Schlichter
0fd5130573 NR UE: remove unused elements tx_wait_for_dlsch and rx_offset from nr_rxtx_thread_data_t 2025-01-17 11:40:09 +00:00
Thomas Schlichter
a2eaacf2bd remove unused element harq from LDPC encoder_implemparams_t 2025-01-17 11:40:09 +00:00
Thomas Schlichter
45dfcbe6cd remove unused global variable sl_ahead 2025-01-17 10:59:39 +00:00
Thomas Schlichter
0b4b6b952d remove unused rt_profiling 2025-01-17 10:59:28 +00:00
Romain Beurdouche
0d3008c244 fix(nrLDPC_coding_t2): HARQ combined offset
The offset provided for each code block in the HARQ combined input and output buffer shall not be above 512.
A modulus was performed on the offset of the TB in the buffer to avoid this situation.
But the offset of the code block was added afterward so that the total offset was sometimes going above 512.
This commit performs the modulus after adding the code block offset.
2025-01-17 10:55:03 +00:00
Sagar Arora
75f6f3ca6f chore(ci): update build configs for new openshift cluster
Signed-off-by: Sagar Arora <sagar.arora@openairinterface.org>
2025-01-17 10:29:20 +01:00
Sagar Arora
50f2c2a3dd chore(ci): update helm charts for new openshift cluster
- remove sub-chart name from global.nodeName to allow removing
global nodeName parameter

Signed-off-by: Sagar Arora <sagar.arora@openairinterface.org>
2025-01-17 10:28:13 +01:00
Teodora
f1076605f2 FDD mode support in 7.2
- extend get_xran_prb_map() function to handle mixed slot
  - properly fill PRB configuration based on DL/UL direction and duplex mode
  - do not implicitly assume TDD
2025-01-16 21:34:53 +01:00
Robert Schmidt
6d5e29f5ae F1AP IDs: Allow AddMod, fix concurrency bug
Modify xu_add_f1_ue_data() to be xu_addmod_f1_ue_data(), i.e., "addmod"
behavior in which it is possible to also update f1_ue_data. I do it this
way since an xu_updade_f1_ue_data() function would be almost the same as
the add function (only deleting existing data, whereas the original
add() was asserting in that case).

Modify tests to test for this behavior.

This fixes a concurrency bug. For instance, during reestablishment, the
CU needs to update the DU UE ID under which the UE is identified in the
DU. Previously, the CU would remove, then add the DU UE ID info.
At the same time, the PDCP thread might look up the information. This
can lead to asserts. Use the above addmod functionality to do the
remove-add under a mutex.
2025-01-16 16:50:58 +01:00
Robert Schmidt
c7dc71e66d Add test for CU F1AP ID data 2025-01-16 15:38:20 +01:00
Robert Schmidt
e2bf9fb0a4 F1AP IDs: refactor common insert 2025-01-16 15:22:59 +01:00
Robert Schmidt
253fffe7fb F1AP IDs: refactor common code 2025-01-16 15:15:47 +01:00
Teodora
72d5c77e3b Harmonize DL/UL PRB mapping in one get_xran_prb_map() function
- the parameters used in DL/UL are exactly the same, except the direction and the number of PRBs;
    therefore, passing the direction seems convenient for visibility purposes and reduces the code.

Note: Number of PRBs we store in fh_config for both DL/UL is num_rb_dl of openair0_config struct.
At the end, it is actually the same info.
2025-01-16 13:40:10 +01:00
Badescu, Ciprian
2924d18ebe Fix ntn phy-test mode
Following SIB19 MR !3019, the phy-test mode is no longer working
In this MR we update the handling NTN-Config from ServingCellConfigCommon
to be the same as when NTN-Config is received in SIB19
2025-01-16 13:27:18 +02:00
Robert Schmidt
10e07bc67f Merge branch 'integration_2025_w03' into 'develop'
Integration: `2025.w03`

See merge request oai/openairinterface5g!3206

* !3167 remove calls to clear SIMD registers, that was a historical issue
* !3179 UE statistics improvements
* !3193 Remove spinlock from threadpool task return
* !3195 UE MAC: in phy-test/do-ra, fill TB randomly
* !3201 T tracer: minor fixes for compilation
* !3204 CI: Increase number of test trials for timing tests
* !3034 Delay compensation for PUCCH2
* !3205 Fix calculation of RSSI in pucch_rx.c
2025-01-16 07:47:02 +00:00
Robert Schmidt
998d8c9480 Merge remote-tracking branch 'origin/pucch-rssi-fix' into integration_2025_w03 (!3205)
Fix calculation of RSSI in pucch_rx.c

Fix two issues with RSSI calculation in PUCCH:

- RSSI was calculated using partial sum instead of average of squared samples.
- There was a missing parentheses pair which causes the RSSI value to underflow.

The proper way to calculate power in dBFS is

    let signal_energy = average of squared samples of received signal over resource elements, antennas and symbols under measurement

then:

    rssi[dBFS] = -10log10(max_sample^2 / signal_energy),

or (to avoid division):

    rssi[dBFS] = -(10log10(max_sample^2) - 10log10(signal_energy))
2025-01-15 22:07:31 +01:00
Robert Schmidt
55220c3919 Merge remote-tracking branch 'origin/ci-physim-adjust' into integration_2025_w03 (!3204)
CI: Increase number of test trials for timing tests

- Increasing a number of test trials aims to reduce variations and
  improve reliability of the nr_ulsim and nr_dlsim test results.
- Disable CPU sleep states on the machine when running physims.
- Minor adjustment of timing threshold in 60 MHz phytest.
2025-01-15 18:35:47 +01:00
Robert Schmidt
a20d229b6b Merge remote-tracking branch 'origin/pucch2-delay-compensation' into integration_2025_w03 (!3034)
Delay compensation for PUCCH2

- Implementation of delay compensation for PUCCH2, which minimizes for
  exampe logs "reported RSRP index XXX invalid"
- Adding a test to the CI to perform the delay compensation in PUCCH2
- Refactor code to use c16_t data type in PUCCH decoder
2025-01-15 18:34:53 +01:00
Robert Schmidt
284a0edea7 Merge remote-tracking branch 'origin/minor-t-compilation-fixes' into integration_2025_w03 (!3201)
T tracer: minor fixes for compilation

only fixing some hacks tools, no functional change in main programs, no
need to test anything.
2025-01-15 15:05:31 +01:00
Robert Schmidt
356aec9aa4 Merge remote-tracking branch 'origin/phytest-ue-random-data' into integration_2025_w03 (!3195)
UE MAC: in phy-test/do-ra, fill TB randomly

See commit description for more details.
2025-01-15 15:05:03 +01:00
Robert Schmidt
77ddc36236 Merge remote-tracking branch 'origin/tpool-nospinlock' into integration_2025_w03 (!3193)
Remove spinlock from threadpool task return

The idea to use atomic aligned to cache line for counting finished jobs
is reused, but instead of polling a semaphore was added.
2025-01-15 15:04:37 +01:00
Robert Schmidt
a4bbf9e513 Merge remote-tracking branch 'origin/UE_log_improv' into integration_2025_w03 (!3179)
UE statistics improvements
2025-01-15 15:04:19 +01:00
Robert Schmidt
876343e7f8 Merge remote-tracking branch 'origin/remove-_mm_empty' into integration_2025_w03 (!3167)
remove calls to clear SIMD registers, that was a historical issue

This works because gcc/clang replaces the MMX calls by SSE2 automatically.

There are some mm_empty() calls in bad places (places where we don't use
_m64) and it is lacking in places where we still use _m64. Given that
MMX calls are converted to SSE2, there is no problem, and we will remove
remaining _m64 variables.
2025-01-15 15:02:09 +01:00
Jaroslava Fiedlerova
85b163b6b9 CI: Adjust timing thresholds in timing-phytest pipeline
CI test sometimes fails because measured value is lower than allowed
threshold.
2025-01-15 14:44:39 +01:00
Jaroslava Fiedlerova
9b6f1be163 CI: disable sleep states of CPU for running timing tests
Enable sleep states once the test is done.
2025-01-15 14:44:35 +01:00
Jaroslava Fiedlerova
69195457d7 CI: Increase number of test trials in nr_ulsim/nr_dlsim timing test
Increasing a number of test trials aims to reduce variations and
improve reliability of the nr_ulsim and nr_dlsim test results.
2025-01-15 14:43:42 +01:00
Bartosz Podrygajlo
7bd048e6af Fix calculation of RSSI in pucch_rx.c
Fix two issues with RSSI calculation in PUCCH:
 - RSSI was calculated using partial sum instead of average of squared samples.
 - There was a missing parentheses pair which causes the RSSI value to underflow.
   The proper way to calculate power in dBFS is

    let signal_energy = average of squared samples of received signal over resource
     elements, antennas and symbols under measurement

    then:
     rssi[dBFS] = -10log10(max_sample^2 / signal_energy),
    or (to avoid division):
     rssi[dBFS] = -(10log10(max_sample^2) - 10log10(signal_energy))
2025-01-15 13:49:05 +01:00
Bartosz Podrygajlo
0657ab2275 Remove spinlock from threadpool task return
The idea to use atomic aligned to cache line for counting finished jobs
is reused, but instead of polling a semaphore was added
2025-01-14 15:17:19 +01:00
Guido Casati
9e9bd278a9 Minor: RCconfig_NR_CU_E1 function description and logging 2025-01-14 14:13:49 +01:00
Guido Casati
bcd1270237 Refactor SCTP association response handler
* this function is used by both CU-CP and CU-UP
* it behaves differently depending on the type of E1 instance:
  CU-CP: inform RRC of E1 connection loss with CU-UP
  CU-UP: trigger a new SCTP association request by sending an ITTI to the CU-UP task
* after receiving the E1AP register request, the CU-UP will send a new association request to
  SCTP until new E1 connection is achieved by sending a TIMER_HAS_EXPIRED message to the CU-UP
  task. The function e1apHandleTimer() is basically triggering a new E1 association request
  until new E1 connection is achieved
* print SCTP association state in e1ap.c whenever needed

Related to #878
2025-01-14 14:13:49 +01:00
Guido Casati
b922fd2649 Clean up NGAP Setup Failure messages: there's no such message in 3GPP TS 38.413
* the list of PDU Session Resources Failed to Setup shall be sent in the Response message
2025-01-14 14:13:49 +01:00
Guido Casati
a1abf90d5b Handle PDU Session Resource to Setup Failure in (PDU Session Resource/Initial Context) Setup Response
* add function to check whether cu-up is connected
* add functions to send the relevant response messages with the failed list
  e.g. to fill PDU Session Resource Failed to Setup items
* set return value of trigger_bearer_setup to bool and handle the
  failure by sending setup response messages with list of PDU sessions failed to setup
  i.e. send failed list of items when no CU-UP is associated to the CU-CP
  note: it considers all PDU Sessions as failed to setup in the considered failure scenarios
* e.g. send a list of failed PDU session resources in the response message to reject
  PDU Session Resource Setup in rrc_gNB_process_NGAP_PDUSESSION_SETUP_REQ
* the Initial Context Setup has a Failure message, but for the considered failure scenario
  when no CU-UP is available the current design is just sending a list of failed to setup
  items in the Response message
* transfer PDU Session Resource/Initial Context Setup Request NAS PDU to UE

closes #878
2025-01-14 14:13:49 +01:00
Guido Casati
f00a7a0197 Refactor NGAP cause
* new struct definition including both NGAP cause group and value
* add encoding function, temporarily in ngap_common.c
  (in the long term to be place in a enc/dec NGAP library)
* extend Radio Network cause enum values
* add cause member to Setup Failure
2025-01-14 14:13:49 +01:00
Cedric Roux
c77874d64e T tracer: minor fixes for compilation 2025-01-14 11:51:41 +01:00
Laurent THOMAS
48226d10bf add cpu measurement option in nr_pucchsim 2025-01-14 11:34:22 +01:00
rmagueta
dc5f4bf868 Apply delay compensation only when delay is different from 0 2025-01-14 11:34:22 +01:00
Laurent THOMAS
6384517c01 Better code for PUCCH2 decoding 2025-01-14 11:34:22 +01:00
rmagueta
bf69131c21 Add CI test for delay compensation in PUCCH2 2025-01-14 11:34:22 +01:00
rmagueta
39a50faa6e Delay compensation for PUCCH2 2025-01-14 11:34:22 +01:00
Laurent THOMAS
f919246121 remove part of code using _m64 type (so old mmx instructions) 2025-01-14 10:07:59 +01:00
Laurent THOMAS
ba27aefe4e add some const and remove dead code 2025-01-14 10:07:31 +01:00
Laurent THOMAS
7d0c89185c gcc warning on #define duplicated 2025-01-14 10:07:31 +01:00
Laurent THOMAS
d5c72cf843 remove a race condition in viberti_lte and a useless global table 2025-01-14 10:07:30 +01:00
Laurent THOMAS
a0d6057294 remove calls to clear SIMD registers, that was a historical issue 2025-01-14 10:06:06 +01:00
Robert Schmidt
b96dfadae9 Fix compilation problem when defining ENABLE_MAC_PAYLOAD_DEBUG
Reported-by:  Abdo Gaber <abdo.nasser.ali.gaber@emerson.com>
2025-01-14 08:03:54 +01:00
Robert Schmidt
f7d3b72851 Merge branch 'integration_2025_w02' into 'develop'
Integration: `2025.w02`

Closes #866 and #887

See merge request oai/openairinterface5g!3197

* !3135 replace a set of #define by a C bit array, remove duplicated extern global variable declaration
* !3173 nrLDPC_coding: improvements
* !3181 Use UL actor for processSlotTx
* !3186 chore(ci): improved errors messages visibility
* !3101 NR gNB improvements for analog beam management
* !3130 NR gNB MSG3 TPC
* !3175 Improvements for PUSCH per symbol processing
* !3177 CI: change frequency for timing and B200-SABOX pipelines
* !3188 NR UE fix DCI mask size
* !3119 Config files improvements for PRACH
* !3196 Fix yaml example config file
* !3187 nrLDPC_coding: Fix naming, comments, superfluous variables and documentation typos in coding library interfaces
* !3076 move UL_INFO structure allocation local to a rx slot processing
* !3189 fhi_72: allow to provide dpdk_iova_mode to xran
* !3182 RSSI threshold for PUSCH & PUCCH power control
* !3103 Introduce ITTI queue in RRC-to-MAC direction
2025-01-13 14:13:42 +00:00
Robert Schmidt
959bb59f35 Merge remote-tracking branch 'origin/rssi-thres' into integration_2025_w02 (!3182)
RSSI threshold for PUSCH & PUCCH power control

To prevent ADC railing or "clipping" when the received power is too
large, introduce RSSI threshold parameters for PUSCH and PUCCH, which
are now configured in units of 0.1 dB. Here is how you can configure and
use these thresholds:

1. Configuration:
   - Set the pusch_RSSI_Threshold and pucch_RSSI_Threshold parameters in
     your configuration file (e.g., gnb.conf) (MACRLC section).
   - These parameters define the maximum acceptable RSSI values for
     PUSCH and PUCCH, respectively. The unit is either dBm or dBFS,
     depending on the RSSI reporting configuration.

2. Usage:
   - The nr_limit_tpc function will automatically adjust the Transmit
     Power Control (TPC) commands based on the configured RSSI
     thresholds.
   - If the RSSI exceeds the threshold, the TPC command will be limited
     to prevent further increase in power, thereby avoiding ADC
     clipping.
2025-01-13 10:10:29 +01:00
Robert Schmidt
72aaf45fa8 Merge remote-tracking branch 'origin/race-ue-rrc-mac' into integration_2025_w02 (!3103)
Introduce ITTI queue in RRC-to-MAC direction

resolve ue rcc to mac race conditions by a itti queue, but it doesn't
resolve the problem of exact slot we should apply the new cell
configurtion
2025-01-13 10:10:07 +01:00
Robert Schmidt
4dfbd0dd9e Merge remote-tracking branch 'origin/oran-iova-config' into integration_2025_w02 (!3189)
fhi_72: allow to provide dpdk_iova_mode to xran

- Introduce a gNB configuration option that enables users to select the
  desired IOVA mode for DPDK ("PA" or "VA") with dpdk_iova_mode
  parameters in fhi_72 configuration section. If not set, the default
  remains PA mode to ensure backward compatibility with existing
  configurations. Detailed information about IOVA modes, including their
  advantages and disadvantages, can be found in the DPDK documentation:
  Memory in DPDK Part 2: Deep Dive into IOVA
- Using IOVA VA mode allows DPDK to run without requiring SYS_ADMIN
  capability for the docker container.
- Switch to IOVA VA mode in the FHI7.2 pipeline and reduce the required
  capabilities for the docker container.
2025-01-13 07:46:47 +01:00
Robert Schmidt
39d9d32eda Merge remote-tracking branch 'origin/local-UL_INFO' into integration_2025_w02 (!3076)
Move UL_INFO structure allocation local to a rx slot processing

UL_INFO is allocated a gNB, so require mutex and obscur information
passing function to function.  Instead, make a local UL_INFO per slot,
removing the mutex and making the code easier to understand.
2025-01-13 07:46:05 +01:00
francescomani
9d9902d883 apply ITTI queue to SIB19 2025-01-10 18:28:27 +01:00
Laurent THOMAS
b4bc7c96ba Move UL_INFO structure allocation local to a rx slot processing
Use UL_INFO on the stack, to simplify the code.  move in the same struct
the associated rach, pdu, crc, srs arrays that where pointed from
directly in gNB structure Keep in nfapi the existing logic that make
malloc for theses rach, pdu, crc, srs array lists

Pass only relevant fields, where appropriate.

Co-authored-by: Robert Schmidt <robert.schmidt@openairinterface.org>
2025-01-10 18:05:58 +01:00
Robert Schmidt
189396aac2 Merge remote-tracking branch 'origin/nrLDPC_coding_improvements_2' into integration_2025_w02 (!3187)
nrLDPC_coding: Fix naming, comments, superfluous variables and documentation typos in coding library interfaces

This MR is clarifying the interfaces to the LDPC coding libraries.  It
aims to improve the readability of the interfaces and compliance of
naming with specification 38.212.
2025-01-10 18:00:35 +01:00
Robert Schmidt
818a3f9318 Merge remote-tracking branch 'origin/Fix_yaml_example_config_file' into integration_2025_w02 (!3196)
Fix yaml example config file

amf_ip_address is decoded as a paramlist_def_t and not as a paramdef_t,
so in the config file it should be a list of ip addresses

In current develop just by trying to run this config file with:

    sudo ./nr-softmodem -O ../../../targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.usrpb210.yaml

results in a segfault.
2025-01-10 17:59:24 +01:00
Robert Schmidt
299b63b4ee Merge remote-tracking branch 'origin/NR_PRACH_config_file_improv' into integration_2025_w02 (!3119)
Config files improvements for PRACH

Some PRACH parameters in configuration files are not properly set.

- number of SSB per RACH occasion should be 1 when we have only 1 SSB
  (it would still work with 1/2 but it makes little sense and might
  limit UE selection of ROs).
- some PRACH configuration indices would generate PRACH conflicting with
  PUCCH and therefore reducing scheduling capabilities

Further cleanup of some config files still using deprecated fields
2025-01-10 17:58:44 +01:00
Jaroslava Fiedlerova
acd8f0730b CI: use IOVA VA mode in FHI7.2 pipeline
Switching to IOVA VA mode in the FHI7.2 pipeline reduces the required
capabilities for the Docker container. This change allows the removal
of the SYS_ADMIN capability.
2025-01-10 14:59:36 +01:00
Jaroslava Fiedlerova
df03c02a84 fhi_72: allow to provide dpdk_iova_mode to xran
In DPDK, IO Virtual Addresses (IOVA) refers to the memory addressing
scheme used for IO operations. The two IOVA modes supported by DPDK are:

- IOVA as Physical Address (PA): IO memory addresses correspond directly
  to physical addresses, no address translation required.
- IOVA as Virtual Address (VA): IO memory addresses align with user-space
  virtual addresses, requiring IOMMU to remap physical memory.

Previously, this was hardcoded to 0, to use IOVA as PA mode, with xRAN's
DPDK EAL initialization using the "--iova-mode=pa" flag.

This commit introduces a gNB configuration option to allow users to select
the desired IOVA mode. The default remains PA mode to
ensure backward compatibility.

Using IOVA VA mode allows DPDK to run without requiring SYS_ADMIN
capability in the docker container.
2025-01-10 14:59:31 +01:00
Robert Schmidt
38f9436837 Merge remote-tracking branch 'origin/NR_UE_DCI_mask_size' into integration_2025_w02 (!3188)
NR UE fix DCI mask size

Previous maximum size was 15 but in practice it could be at least up to
18. Also moved assertion on non-contiguous type0 DLSCH allocation to L1
(to remove blocking point for L2 implementation).
2025-01-10 11:47:27 +01:00
Robert Schmidt
86c703dbf0 Merge remote-tracking branch 'origin/ci-fixes-frequency-planning' into integration_2025_w02 (!3177)
CI: change frequency for timing and B200-SABOX pipelines

Change center frequency of

- RAN-SA-B200-Module-SABOX-Container - 20 MHz TDD SA scenario from
  3309.48 MHz to 3609.12 MHz
- RAN-gNB-N300-Timing-Phytest-LDPC - Timing phytest 40 MHz scenario from
  3619.08 MHz to 3319.68 Mhz

to avoid interference between the SABOX and timing pipeline.
2025-01-10 11:46:52 +01:00
Robert Schmidt
d892732ff7 Merge remote-tracking branch 'origin/improve-pusch-per-symbol-processing' into integration_2025_w02 (!3175)
Improvements for PUSCH per symbol processing

- Improved the assert in task_ans.c
- Fixed and issue with PUSCH per-symbol processing that could cause an
  issue in case num_pusch_symbols_per_thread is not 1.
2025-01-10 11:45:50 +01:00
Robert Schmidt
751dad3126 Merge remote-tracking branch 'origin/NR_MSG3_TPC' into integration_2025_w02 (!3130)
NR gNB MSG3 TPC

This MR improves the handling of MSG3 TPC commands at MAC gNB.

TODO: Compute TPC when PRACH sends a valid power measurements (currently
not the case for OAI L1, to be verified with Aerial L1)

Closes #866
2025-01-10 11:45:14 +01:00
Robert Schmidt
03c7386649 Merge remote-tracking branch 'origin/NR_gNB_MAC_improvements_for_analog_beam_management' into integration_2025_w02 (!3101)
NR gNB improvements for analog beam management

- Improvements at gNB MAC layer to properly handle analog beam
  management for all channels
- Simple beam switching mechanism based on UE RSRP report
2025-01-10 11:44:45 +01:00
Romain Beurdouche
f9c7057ed1 fix(nrLDPC_coding): Apply clang-format to segment coding code 2025-01-10 09:00:35 +00:00
Romain Beurdouche
c54e7a7035 fix(nrLDPC_coding): in segment decoder, move useless memset on decoder output c to the oly case where it is useful 2025-01-10 09:00:35 +00:00
Romain Beurdouche
6eb0913de9 fix(documentation): typos and strengthen the explanation of the adaptation layer between slot coding and segment coding 2025-01-10 09:00:35 +00:00
Romain Beurdouche
c959f41987 fix(nrLDPC_coding): remove T2 legacy setCombIn from segment decoder parameters 2025-01-10 09:00:35 +00:00
Romain Beurdouche
15fc29843c fix(nrLDPC_coding): cleanup the naming of the K, Kprime and Zc variables to comply with the standard 38.212-5.2.2 2025-01-10 09:00:32 +00:00
Romain Beurdouche
9586db6bfd fix(nrLDPC_decoder): Rename E in Kprime in segment decoder parameters to comply with standard naming 2025-01-10 08:54:37 +00:00
Bartosz Podrygajlo
dcc33d3931 Add RSSI threshold-based power control for PUSCH and PUCCH
- Introduced new configuration parameters `pusch_RSSI_Threshold` and `pucch_RSSI_Threshold`
  (MACRLC section)
- Added `nr_limit_tpc` function in `gNB_scheduler_primitives.c` to limit TPC based on RSSI
  threshold.
- Integrated `nr_limit_tpc` in PUCCH and PUSCH power control

Example Configuration

puxch_RSSI_Threshold takes value between -1280 and 0 and is mapped to range -128.0 dBm/dBFS
to 0.0 dBm/dBFS in 0.1 dB increments. Unit depends on RSSI reporting config.

pucch_RSSI_Threshold = -500;  # Set the PUSCH RSSI threshold to -50.0dBm/-50dBFS
pucch_RSSI_Threshold = -600;  # Set the PUCCH RSSI threshold to -60.0dBm/-60dBFS
2025-01-10 08:24:12 +01:00
Robert Schmidt
8fd6f1c611 Merge remote-tracking branch 'origin/ci-fix-dockerfile-for-fhi-build' into integration_2025_w02 (!3186)
chore(ci): improved errors messages visibility

1. There was a trailing && before $BUILD_OPTIONS in the command line
2. Added leading lines and more pattern to the grep command that
   displays errors/warnings messages during docker build since we don't
   have access to all.txt if build fails
2025-01-10 07:57:13 +01:00
Robert Schmidt
7720d7c821 Merge remote-tracking branch 'origin/fix-tpool-deadlock' into integration_2025_w02 (!3181)
Use UL actor for processSlotTx

Use UL actor instead of Thread pool for processSlotTX.

Closes #887
2025-01-10 07:56:36 +01:00
Robert Schmidt
8805b78d3f Merge remote-tracking branch 'origin/nrLDPC_coding_improvements_1' into integration_2025_w02 (!3173)
nrLDPC_coding: improvements

One improvement in this changeset: Functions nr_interleaving_ldpc,
nr_deinterleaving_ldpc, nr_rate_matching_ldpc and
nr_rate_matching_ldpc_rx that were previously linked with the PHY layer
in the executables are now linked with the LDPC coding implementations
where they are called.
2025-01-10 07:55:46 +01:00
Robert Schmidt
2e2264f30d Merge remote-tracking branch 'origin/better-c-style-common-options' into integration_2025_w02 (!3135)
replace a set of #define by a C bit array, remove duplicated extern global variable declaration
2025-01-10 07:55:23 +01:00
luis_pereira87
63abc04a45 Fix yaml example config file
amf_ip_address is decoded as a paramlist_def_t and not as a paramdef_t, so in the config file it should be a list of ip addresses
2025-01-09 21:35:47 +00:00
Robert Schmidt
e2a3cde4b7 Further cleanup: define oai_exit for 4G
The parent commit cleans up and groups oai_exit in one place,
nr-softmodem-common.h. Therefore, this 5G file is included in the 4G
defs_common.h (at least it's mostly 4G), which is not nice. Instead,
define oai_exit also in 4G softmodem-common.h, and include this in
defs_common.h. Remove the cyclic inclusion of defs_common.h in
softmodem-common.h, and resolve all subsequent errors around unknown
types and extern definition mismatches.
2025-01-09 15:28:25 +01:00
Laurent THOMAS
e0ca70c36d replace a set of #define by a C bit array, remove duplicated extern global variable declaration 2025-01-09 15:28:25 +01:00
Robert Schmidt
54c88a4a4a UE MAC: in phy-test/do-ra, fill TB randomly
Commit d641a76196 ("fix BSR report malformed, add SHORT BSR when it
can") removed code to fill the remainder of a TB, if it is not filled
with data from RLC, with random data when using phy-test or do-ra modes.
This random data filling is intentional, as it might prove useful for
demos or when debugging (e.g., to see used spectrum instead of 0, etc.).
Reintroduce the functionality, but unlike the original code, make it
dependent on the mode, not RFsim.

See also discussion in #888.

Fixup: d641a76196
2025-01-09 15:24:23 +01:00
Guido Casati
0fd0a4fcae NAS: Minor comments and logs 2025-01-08 20:11:12 +01:00
Guido Casati
8215aa60ba Explicit protocol_discriminator size in fgs_nas_message_security_header_t
* size of fgs_nas_message_security_header_t is platform-depending
  while protocol_discriminator must be 1 byte
* fgs_protocol_discriminator_t stays as enum type
2025-01-08 20:11:12 +01:00
Guido Casati
dbd2d8574e Use PDU Session Establish Accept IEI text definition
* replace multiple log lines with one
2025-01-08 20:11:12 +01:00
Guido Casati
047b4eea8b Refactor PDU Session Establish Accept IEI
* use NAS macro to define enums and text description
2025-01-08 20:11:12 +01:00
Guido Casati
ccff518b2c Add include for memcpy to TLVEncoder.h 2025-01-08 20:11:12 +01:00
Guido Casati
45da0c8a81 Cleanup long time commented out code in openair3/NAS/TEST/AS_SIMULATOR/as_process.c 2025-01-08 20:11:12 +01:00
Guido Casati
f87388099d Replace type Byte_t used in NAS directly with uint8_t
* the goal is to simplify the code
2025-01-08 20:11:09 +01:00
francescomani
cb6eaa1deb documentation for analog beamforming implementation 2025-01-08 14:36:12 +01:00
Romain Beurdouche
fc2bd36788 fix(nrLDPC_coding_segment): missing dependency of nr_coding_segment_decoder, nr_coding_segment_encoder, nr_coding_segment_utils and nr_coding_xdma_decoder on generate_T 2025-01-08 08:31:11 +00:00
Romain Beurdouche
61cb2bcc5a fix(nrLDPC_coding_segment): Reorganize segment and xdma CMakeFiles.txt to avoid redundant compilation 2025-01-08 08:31:06 +00:00
Romain Beurdouche
244355a3d2 fix(nrLDPC_coding_segment): move rate matching, interleaving and their counterparts to segment coding implementation 2025-01-08 08:13:43 +00:00
Raphael Defosseux
7418a104be chore(ci): migrating flexric test to carabe
Signed-off-by: Raphael Defosseux <raphael.defosseux@eurecom.fr>
2025-01-07 15:33:07 +01:00
francescomani
35e9d1e0c2 tentative fix for double sib1 decoding 2025-01-06 12:09:29 +01:00
Laurent THOMAS
766619aa26 add process RRC input in do-ra mode (was a race cond) 2025-01-06 12:09:29 +01:00
Robert Schmidt
966a3a7264 Move UE RRC msg defs to rrc_messages_types.h 2025-01-06 12:09:29 +01:00
Laurent THOMAS
9c0d90a014 Introduce UE RCC to MAC ITTI queue
Reduce race conditions through a itti queue, such that RRC-initiated MAC
memory modifications happen at the same time as MAC thread writes.
However, it doesn't resolve the problem of exact slot we should apply
the new cell configurtion.
2025-01-06 12:09:29 +01:00
francescomani
a7b9a85640 move temporary code to process type0 as type1 when the RB allocation is contiguous to L1 2025-01-06 12:07:15 +01:00
francescomani
d6f678ffc1 set TPC for MSG3 retransmissions 2025-01-06 10:43:51 +01:00
francescomani
4dd69427d8 set MSG3 TPC based on preamble power indicated from L1 2025-01-06 10:43:47 +01:00
francescomani
d718e67797 automatic determination of DCI mask size at the UE 2025-01-06 09:56:28 +01:00
Raymond Knopp
5dc22f219a fix after ASAN test in CI (stack array size) 2025-01-03 17:12:11 +01:00
francescomani
7bb585cc0e further cleanup of PRACH config file parameters in GENERIC-LTE-EPC 2025-01-03 11:35:41 +01:00
Raphael Defosseux
1b9fcc9858 fix(ci): adding leading lines and increasing visibility for building errors
Signed-off-by: Raphael Defosseux <raphael.defosseux@eurecom.fr>
2025-01-03 09:42:49 +01:00
Raphael Defosseux
70933edd19 fix(docker): typo on BUILD_OPTIONS
Signed-off-by: Raphael Defosseux <raphael.defosseux@eurecom.fr>
2025-01-03 09:40:59 +01:00
Bartosz Podrygajlo
88cde50d4c Refactor PUSCH per-symbol threadpool utilization
A small refactor for PUSCH per-symbol processing. This fixes a possible
issue in case num_pusch_symbols_per_thread is not 1
2025-01-03 08:11:35 +01:00
Bartosz Podrygajlo
75162adf68 Improve assert in completed_task_ans()
This assert checks if the structure is correctly initialized. The structure
is one-time use so the assert is valid, but the value of the atomic was added
to the output to improve debugging.
2025-01-03 08:11:35 +01:00
Raymond Knopp
540da76f1c Merge branch 'ldpc_enc_avx512' of https://gitlab.eurecom.fr/oai/openairinterface5g into ldpc_enc_avx512 2025-01-03 08:07:44 +01:00
Raymond Knopp
4340c229b1 logging 2025-01-03 07:50:48 +01:00
Raymond Knopp
5d2c881b91 3GPP Rate-matching/interleaving on 8-segment blocks, deinterleaving at output of multi-segment processing 2025-01-03 06:37:36 +00:00
francescomani
a9c72222dd minor: adding two logs for debugging 2025-01-02 11:01:38 +01:00
francescomani
0cd0ec7a67 MAC beam allocation for ULSCH 2025-01-02 11:01:38 +01:00
francescomani
5e930b0b72 MAC beam allocation for DLSCH 2025-01-02 11:01:38 +01:00
francescomani
f235b249ba remove FR1 in preprocessor name 2025-01-02 11:01:38 +01:00
francescomani
912fec55ef MAC beam allocation for scheduling request 2025-01-02 11:01:38 +01:00
francescomani
8de9d006f5 MAC beam allocation for SRS 2025-01-02 11:01:38 +01:00
francescomani
2940ee5eda MAC beam allocation for periodic CSI measurements 2025-01-02 11:01:38 +01:00
francescomani
dc9a2cf1ad simple beam switching procedure based on strongest reported SSB 2025-01-02 11:01:38 +01:00
francescomani
19c667fa80 remove unused tci handling function 2025-01-02 11:01:38 +01:00
francescomani
2d2a92dd12 improvements in handling CSI report for RSRP 2025-01-02 11:01:38 +01:00
francescomani
70a6434168 remove unused input from get_beam_index function 2025-01-02 11:01:38 +01:00
Raymond Knopp
a06f80e0bd fix for AVX2 in nr_ldpc_encoder_optim8segmulti.c 2024-12-29 19:06:25 +01:00
Raymond Knopp
6bb8bf62a3 neoverse-V2 fix 2024-12-29 14:54:59 +00:00
Jason
059501fa4b fixes for Neoverse selection in CMakeLists.txt 2024-12-29 14:44:21 +00:00
Raymond Knopp
c85bf0c1b6 changes to select neoverse-n1/n2 in CMakeLists.txt 2024-12-29 12:26:47 +00:00
Raymond Knopp
57677629ac modifications for aarch64 (mm_movemask_epi8 in scrambling) 2024-12-29 12:17:00 +00:00
Raymond Knopp
ead75c20fb changes for neoverse-v2 2024-12-29 09:50:02 +00:00
Raymond Knopp
58ea54f842 fix tali condition for 256-QAM with 128-bit SIMD 2024-12-21 21:38:09 +01:00
Raymond Knopp
c9536b6fa0 Merge branch 'ldpc_enc_avx512' of https://gitlab.eurecom.fr/oai/openairinterface5g into ldpc_enc_avx512 2024-12-21 18:28:04 +01:00
Raymond Knopp
c84a30650d fix build on aarch64 2024-12-21 17:26:50 +00:00
Robert Schmidt
f9bff3d6a0 Merge branch 'integration_2024_w51' into 'develop'
Integration: `2024.w51`

Closes #879

See merge request oai/openairinterface5g!3180

* !3155 UL BLER vs SNR plot
* !3170 Replace AssertFatal with static_assert for cmdline arguments check
* !3172 A script to run CI tests locally.
* !3151 Optimize PHY_ofdm_mod CYCLIC_PREFIX in case of incidentally aligned pointers
* !3164 Fix and refactor channel average
* !3154 Fix TPMI for UL retransmissions
2024-12-21 14:36:39 +00:00
Bartosz Podrygajlo
9a3fbacfac Fix data race between processSlotTX and clean_UE_harq function 2024-12-20 19:45:42 +01:00
Bartosz Podrygajlo
1df5327f0c Update NR UE threading documentation
Include the newly added UL Actor in the NR UE threading documentation.
2024-12-20 19:43:18 +01:00
Bartosz Podrygajlo
f3e60a1417 Use UL actor for processSlotTx
Use UL actor instead of Thread pool for processSlotTX.
2024-12-20 16:28:34 +01:00
Jaroslava Fiedlerova
a82b1450e4 Merge remote-tracking branch 'origin/develop-fix-tpmi' into integration_2024_w51 (!3154)
Fix TPMI for UL retransmissions

If the ul_ri of srs_feedback changes between a UL transmission and a
retransmission, we use the TPMI of transmission.

Closes #879

Assertion ((*nrOfLayers==1 && srs_feedback->tpmi <= 1) || (*nrOfLayers==2 && srs_feedback->tpmi == 0)) failed!
In compute_precoding_information() /home/user/openairinterface5g/openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.c:2896
TPMI 1 is invalid!
2024-12-20 15:59:39 +01:00
Jaroslava Fiedlerova
40584b5b32 Merge remote-tracking branch 'origin/fix_and_refactor_channel_average' into integration_2024_w51 (!3164)
Fix and refactor channel average

- Fixing missing init average variable with zero and refactor the code #86b11ab7
Fixes just the missing avg1=0
- Refactor the code to a common SSE/AVX2 inline function using also horizontal add.
- We use int64_t result from now on.
- We decided to fix length to x12 instead of old x9 openair1/PHY/NR_UE_TRANSPORT/dci_nr.c

//compute average channel_level on each (TX,RX) antenna pair
void nr_pdcch_channel_level(int32_t rx_size,
                            c16_t dl_ch_estimates_ext[][rx_size],
                            NR_DL_FRAME_PARMS *frame_parms,
                            int32_t *avg,
                            int symbol,
                            int nb_rb)
{
  for (int aarx = 0; aarx < frame_parms->nb_antennas_rx; aarx++) {
    //clear average level
    simde__m128i avg128P = simde_mm_setzero_si128();
    simde__m128i *dl_ch128 = (simde__m128i *)&dl_ch_estimates_ext[aarx][symbol * nb_rb * 12];

    for (int rb = 0; rb < (nb_rb * 12) >> 2; rb++) {     <-------------- here
      avg128P = simde_mm_add_epi32(avg128P, simde_mm_madd_epi16(dl_ch128[rb], dl_ch128[rb]));
    }

    DevAssert(nb_rb);
    avg[aarx] = 0;
    for (int i = 0; i < 4; i++)
      avg[aarx] += ((int32_t *)&avg128P)[i] / (nb_rb * 12); <-------------- and here
    LOG_DDD("Channel level : %d\n",avg[aarx]);
  }
}
2024-12-20 15:26:57 +01:00
Jaroslava Fiedlerova
90057df3cc Merge remote-tracking branch 'origin/opt-cp-insertion' into integration_2024_w51 (!3151)
Optimize PHY_ofdm_mod CYCLIC_PREFIX in case of incidentally aligned pointers

It seems that the cyclic prefix is in most cases a multiple of 512 samples.
This means that in most cases the idft output pointer is already aligned and
there is no need to perform an extra memcpy. This saves the memcpy time in
most cyclic prefix insertion cases.
2024-12-20 15:24:45 +01:00
Jaroslava Fiedlerova
cd570f632f Merge remote-tracking branch 'origin/local-ci-test' into integration_2024_w51 (!3172)
A script to run CI tests locally.

Added ./run_locally.sh script. The script takes one argument being the testcase
that one wants to run. The testcase is run locally. This means that some
testcases that utilize hardware resources will not run. However most if not all
rfsimulator testcases should run as in CI.

To this end, the CI python scripting framework was updated:
- override  and <srv_node> elements from XML so all commands are executed locally
in case --local flag is passed
- Allow RemoteCmd class to run on localhost
2024-12-20 09:11:24 +01:00
Jaroslava Fiedlerova
5947d77609 Merge remote-tracking branch 'origin/static-assert-for-args' into integration_2024_w51 (!3170)
Replace AssertFatal with static_assert for cmdline arguments check

Replace AssertFatal with static_assert for command line arguments definition
length check. The static assert will not allow the code to compile in case
the size is incorrect.

This could save some time in the future since its easy to forget to extend
CMDLINE_PARAMS_CHECK_DESC.
2024-12-20 09:10:17 +01:00
Jaroslava Fiedlerova
057b2ad552 Merge remote-tracking branch 'origin/bler-vs-snr-plot' into integration_2024_w51 (!3155)
UL BLER vs SNR plot

Added a tool for generating UL BLER vs SNR from nr_ulsim runs.
2024-12-20 09:09:14 +01:00
Bartosz Podrygajlo
650b2dc6eb A script to run CI tests locally.
Added ./run_locally.sh script. The script takes one argument being the testcase
that one wants to run. The testcase is run locally. This means that some testcases that
utilize hardware resources will not run. However most if not all rfsimulator testcases
should run as in CI.

To this end, the CI python scripting framework was updated, adding --local flag which changes
the script behavior as follows:
 - overrides <node> and <srv_node> XML elements to 'localhost' so all commands are executed locally
 - Avoid running image pull, image cleanup and workspace creation steps of the scripts:
   user is responsible for that
2024-12-19 16:55:38 +01:00
francescomani
7b499f5081 print UE statistics also in FDD 2024-12-19 14:46:53 +01:00
francescomani
f7bb1367f5 print UE statistics only in connected mode 2024-12-19 14:31:35 +01:00
Jaroslava Fiedlerova
3306a01c57 CI: change frequency for timing and B200-SABOX pipelines 2024-12-19 12:02:50 +01:00
Robert Schmidt
d820c187fc OPT: Replace AssertFatal with static_assert
See parent commit
2024-12-19 03:26:27 +01:00
Robert Schmidt
2f43b343b6 gnb_config: Replace AssertFatal with static_assert
See parent commit
2024-12-19 03:25:04 +01:00
Robert Schmidt
f02bd8b453 enb_config: Replace AssertFatal with static_assert, align length
See parent commit
2024-12-19 03:24:37 +01:00
Robert Schmidt
5473ee904f E1AP: Replace AssertFatal with static_assert
See parent commit
2024-12-19 03:22:30 +01:00
Robert Schmidt
b4395406f0 softmodem-common: Replace AssertFatal with static_assert
See also parent commit
2024-12-19 03:12:37 +01:00
Raymond Knopp
b7f664dcfa fix after rebase 2024-12-18 09:34:37 +01:00
Bartosz Podrygajlo
acae0dc011 Replace AssertFatal with static_assert for cmdline arguments check
Replace AssertFatal with static_assert for command line arguments definition
length check. The static assert will not allow the code to compile in case
the size is incorrect.

This could save some time in the future since its easy to forget to extend
CMDLINE_PARAMS_CHECK_DESC.
2024-12-18 09:18:48 +01:00
Matthias Mehlhose
5ae69ce484 refactor: average 64 bit calculations with shift and internal division (SSE and AVX2) 2024-12-18 07:36:22 +00:00
Matthias Mehlhose
276a17902e fix: UE average 2024-12-18 07:36:22 +00:00
Bartosz Podrygajlo
55b5e04e8d Change alignment of temporary IDFT buffer in PHY_ofdm_mod
Alignment of temporary IDFT buffer was changed to 64 bytes. This is in preparation
for possible use of different IDFT implementation which could use AVX-512, requiring
64-byte alignment.
2024-12-17 23:04:30 +01:00
Raymond Knopp
e2cde7e679 Merge remote-tracking branch 'origin/develop' into ldpc_enc_avx512 2024-12-17 22:46:02 +01:00
Raymond Knopp
dd33d2af0f alignment issues in new rate-matching implementation in CI (with ASAN UBsan) 2024-12-17 18:04:02 +01:00
Bartosz Podrygajlo
f50146962d Fix instrumentation target for older CMake versions 2024-12-17 17:26:41 +01:00
rmagueta
c66a625dc5 If the ul_ri of srs_feedback changes between a UL 1st transmission and a retransmission, we use the TPMI of 1st transmission 2024-12-17 14:18:16 +00:00
Robert Schmidt
5bd2eb866c Merge branch 'integration_2024_w50' into 'develop'
Integration: `2024.w50`

Closes #753

See merge request oai/openairinterface5g!3166

* !3159 CI: Add FHI7.2 test with Metanoia RU
* !3111 Enable USRP Tx thread in nrUE
* !3144 UE data race fix
* !3149 Fix several issues in ulsch_mmse_2layers
* !3158 GTP: use direct call instead of ITTI
* !3160 FHI-72: initialize mask, find correct libxran
* !3019 SIB19 utilization on UE
* !3162 Add Rocky 9.5 to list of distributions
* !3163 NGAP-Initial Context Setup Failure
* !2952 New LDPC coding library interface for decoding and encoding complete slots in one call to the library
* !3125 Add support for O1 in O-DU via telnet
* !3161 Cmd line option for sync in frames for iqrecorder
2024-12-17 13:58:12 +00:00
Robert Schmidt
d4ca420122 Merge remote-tracking branch 'origin/ue-iqrecord-fix' into integration_2024_w50 (!3161)
Cmd line option for sync in frames for iqrecorder

B200 with high clock drift will go out of sync within 280ms which was
the default duration to sync in with iqrecorder. Now this value can be
specified via cmd line so the user can change it according to needs.
2024-12-16 19:44:00 +01:00
Robert Schmidt
0d4c7364b4 Merge remote-tracking branch 'origin/telnet-o1' into integration_2024_w50 (!3125)
Add support for O1 in O-DU via telnet

This change set adds a simple telnet interface to nr-softmodem. Together
with oai/o1-adapter>, this implements a part of the O1 interface, for
the DU only. Currently supported uses cases:

- some stats are send to an SMO (such as bandwidth, PLMN, frequency, ...)
- re-configuration of bandwidth, frequency
- stop/start of the softmodem, while keeping the CU and L2 running
- the o1-adapter implements two alarms, load overload and base station
  offline, using this interface.

It is possible to use the telnet interface by itself (i.e., "o1" without
the o1-adapter). To do this, compile with telnet support (./build_oai
--build-lib telnetsrv) and start the nr-softmodem with O1 module
(./nr-softmodem --telnetsrv --telnetsrv.shrmod o1). You can then do the
following:

- see some statistics as exposed to o1-adapter, in JSON: echo o1 stats | nc 127.0.0.1 9090 && echo
- stop the L1: echo o1 stop_modem | nc 127.0.0.1 9090 && echo
- reconfigure bandwidth: e.g., echo o1 bwconfig 20 | nc 127.0.0.1 9090 && echo (also supported: 40, 60, 100)
- start the L1: echo o1 start_modem | nc 127.0.0.1 9090 && echo

Note that the reconfiguration works with split-8 radios. Notably, it
does not work yet out-of-the-box with 7.2 radios, because they have to
be manually reconfigured on bandwith/frequency switch. The planned
M-plane should allow such use case, though.

To help with the above, this branch also includes fixes (for more
information, refer to the corresponding commits):

- fixes for stopping the L1, notably stop threads in right order, stop
  thread pool of RU
- collect some general MAC metrics, fix some bugs in MAC
- fix problems in F1AP gNB-DU configuration update message, update test
- fix some problems in RRC
2024-12-16 19:42:28 +01:00
Raymond Knopp
4b76076d23 __AVX512BW__ -> __AVX512VBMI__ in nr_rate_matching.c 2024-12-16 17:04:28 +01:00
sagar arora
59e6a33d2b Add telnet (O1) support modules in gNB image 2024-12-16 16:18:11 +01:00
Robert Schmidt
bcba876fcb Do not free inside gnb_du_configuration_update_f1ap()
The consumer of this function just passes a pointer to something to be
sent. This function should not free this memory, it's simply not it's
task. This is the same bug as above in
"CU_handle_gNB_DU_CONFIGURATION_UPDATE(): don't free the message of RRC"
2024-12-16 16:18:11 +01:00
Robert Schmidt
70a746a445 Provide O1 telnet interface to remove all UEs 2024-12-16 16:18:11 +01:00
Ronak Kanthaliya
c71c9de953 Additional BW configurability on telnet server 2024-12-16 16:18:11 +01:00
Robert Schmidt
aba506e5e3 Add basic O1 telnet module
This adds a basic telnet module to support the O1 interface at the DU,
to be used together with the oai/o1-adapter>. Concretely, this first
version supports to

- read/modify cell parameters
- stop/start the L1
2024-12-16 16:18:11 +01:00
Robert Schmidt
68ae3ea11c Implement start_L1L2()
Implements the re-start of the L1 after it has been stopped through
stop_L1(). It takes into account some changes, such as bandwidth, or
frequency, when restarting the L1. To this end, it also triggers a
gNB-DU configuration update message on each restart to inform the CU
about any changes in the DU. FDD has not been tested.
2024-12-16 16:18:11 +01:00
Robert Schmidt
8e32f566fc Refactor code to stop L1
Refactor L1 stopping code into a function. The function is basically the
same as what we were doing at the end of main() of nr-softmodem.c.

This will be reused to support the "soft-restart" functionality in the
next commits.
2024-12-16 16:18:10 +01:00
Robert Schmidt
511b5f8ebd Expose F1 primitives for next commits
Need to proper forward declaration, as we otherwise need to make
telnet_o1 module dependent on F1.  Make functions publicly accessible,
as the F1 functions are used in an upcoming commit to start the L1.
2024-12-16 16:18:10 +01:00
Robert Schmidt
0c24f1ff13 Upon RRC exit: stop ongoing timer 2024-12-16 16:18:10 +01:00
Robert Schmidt
5f01cf6f93 Keep track of number of RUs in L1
Need to keep track of number of RUs, as the RU initialization increments
the number of RUs. Therefore, subsequent initializations would fail if
we don't decrement first. There is no better place (or I did not find
it) to decrement the number of RUs than in nr_phy_free_RU(). For this
reason, we also have to manually set the number of RUs in nr_prachsim to
1, otherwise the assert will trigger.
2024-12-16 16:18:10 +01:00
Robert Schmidt
6b852a6fff CU_handle_gNB_DU_CONFIGURATION_UPDATE(): don't free the message of RRC
The message is already freed at reception at RRC.
2024-12-16 16:18:10 +01:00
Robert Schmidt
8e44b2d22e RRC: fix double free, already freed in scope of caller of this function 2024-12-16 16:18:10 +01:00
Robert Schmidt
3e63f1dab2 Correctly handle received gNB-DU config update ack 2024-12-16 16:18:10 +01:00
Robert Schmidt
9858a733c1 gnb_du_configuration_update_f1ap(): send to correct task 2024-12-16 16:18:10 +01:00
Robert Schmidt
3e8636ce98 Test gNB-DU config update: cell to add/delete 2024-12-16 16:18:10 +01:00
Robert Schmidt
adbbbaeaba Properly implement eq/cp() functions of gNB-DU config update, fix test
Implement those functions following more closely 38.473, i.e., check all
mandatory fields. Add mandatory fields in the test.
2024-12-16 16:18:10 +01:00
Robert Schmidt
509cc8cc58 Use PLMNID_TO_MCC_MNC() to decode PLMN ID 2024-12-16 16:18:10 +01:00
Robert Schmidt
3de8a746fe Fix eq_f1ap_cell_info(): correct TAC comparison
Check that both a->tac/b->tac are present, or both not present. Then,
check they are equal if present.
2024-12-16 16:18:10 +01:00
Robert Schmidt
6b7055bb37 eq_f1ap_sys_info(): correct check
a and b can only be equal if both NULL or both set (and all fields the
same). Check for this.
2024-12-16 16:18:10 +01:00
Robert Schmidt
ed876a53b2 F1: refactor out served_cell_info/du system info
Split out these functions, to be reused in a follow-up commit to
correctly have gNB-DU configuration update message working.

Change the return type copy_f1ap_served_cell_info(), to return the copy,
which IMO is more intuitive then passing target and source in
parentheses.
2024-12-16 16:18:10 +01:00
Robert Schmidt
c852d9337c nr_rrc_config_ul_tda(): ensure not double initialization
For the "restart" feature, earlier versions where creating multiple UL
TDA. This is not a problem (anymore), but to avoid that we call this
multiple times, add this assert.
2024-12-16 16:18:10 +01:00
Robert Schmidt
3c94b9a18f rrc_gNB_du.c: avoid potential double-free
Set pointer to NULL when freeing to avoid potential double frees.
2024-12-16 16:18:10 +01:00
Robert Schmidt
bc8556eafb Implement RFsim stopServer: close listen socket, free memory 2024-12-16 16:18:10 +01:00
Robert Schmidt
462d1a6a8b RLF: avoid encoder problem 2024-12-16 16:18:10 +01:00
Robert Schmidt
5600316d34 UL ref sequences: prevent double-initialization
The existing code prevents double initialization if e.g., both gNB&UE
call these functions (like in a simulator). However, in the case of a
double-initialization such as stopping and re-starting the L1, the
memory will be freed, but not freed again. Basically, this works:

    generate()
    generate() # not initialized again

but this leads to problems:

    generate()
    free()
    generate() # not initialized again, but should be!

Reimplement the check based on the data to be initialized, such that an
intermediate free() will be handled properly.
2024-12-16 16:18:10 +01:00
Robert Schmidt
70b4611001 Stop L1_rx_thread/L1_tx_thread first
These are the "main" worker threads (apart the ru_thread). If the
thread-pool stops, they might get stuck. E.g., in PUSCH channel
estimation, it uses a local response queue, and if the thread pool is
terminated, it seems that the L1_rx_thread can get stuck in there.

To limit these problems, attempt to stop these threads first; stop the
queue from which they read and make them terminate; then, stop the
thread pool.

Also, fix the termination of respPuschSymb queue.
2024-12-16 16:18:10 +01:00
Robert Schmidt
3361db1a34 Stop RU thread pool on exit, if applicable 2024-12-16 16:16:44 +01:00
Robert Schmidt
a7d0e609ed config module: check that memory is enough, allow more restarts
A later commit implements the "restart" of the L1. The L1 reads
configuration options. First, allow to re-read configurations by
increasing the amount of memory the config module might allocate. Then,
avoid an out-of-bound write by checking that we still have memory
available (and assert if not possible).
2024-12-16 16:16:44 +01:00
Robert Schmidt
6330bfe0e8 fixup: there is no init_gNB_afterRU() 2024-12-16 16:16:43 +01:00
Robert Schmidt
f804a355ad Trigger F1 UE context release if no UE context in RRC 2024-12-16 16:16:43 +01:00
Robert Schmidt
c80821e578 NR MAC: save total/used PRBs aggregate 2024-12-16 16:16:43 +01:00
Robert Schmidt
5785bc1894 Msg4 RNTI not found: abort RA 2024-12-16 16:16:43 +01:00
Bartosz Podrygajlo
28b7e0b7d5 UL BLER vs SNR plot
Added a tool for generating UL BLER vs SNR from nr_ulsim runs.
2024-12-16 16:10:36 +01:00
Bartosz Podrygajlo
9e6c0c8c78 Fix unused code paths in PHY_ofdm_mod
For completeness sake, unused CYCLIC_SUFFIX and NONE extension
types were fixed to match CYCLIC_PREFIX memcpy usage.
2024-12-16 15:37:56 +01:00
Raymond Knopp
018c79017f some AVX512F -> AVX512BW for permutex2var 2024-12-16 15:36:25 +01:00
Bartosz Podrygajlo
5ab9bd95bd Add const to input argument in PHY_ofdm_mod 2024-12-16 15:35:07 +01:00
Robert Schmidt
a2613d5604 Merge remote-tracking branch 'origin/ldpc_decoding_module_interface_rework' into integration_2024_w50 (2952)
New LDPC coding library interface for decoding and encoding complete slots in one call to the library

Previous attempts to integrate LDPC decoding relying on offloading show
the limitation of the original code segment coding interface for the
library implementing LDPC coding. In order to perform the offload and
therefore the decoding in an optimal fashion, it is relevant to provide
the implementation with the broader amount of data possible per call,
which is a slot.  A previous MR related to T2 offload managed to offer
an interface for decoding transport blocks by modifying only
nr_ulsch_decoding.c. But this may not be sufficient for performing an
efficient decoding in any situation. Slots could be shared between
multiple transport blocks in case multiple UEs are connected to the RAN,
which makes the transport block size shrink and therefore degrades the
efficiency of the offloading.

This MR offers a broader interface with a gNB decoding entry point in
phy_procedures_nr_gNB.c. The file nr_ulsch_decoding.c now lets the
decoding library implement deinterleaving, rate-unmatching and decoding
for the slot. In gNB encoding and UE decoding and encoding as well,
tasks are partitioned in a similar fashion.

As it allows to feed the implementation with the broadest amount of data
possible, it allows to fit any coding solution in a library. This will
avoid further modification to OAI source code and addition of options to
select an implementation when integrating new decoding solutions. An
implementation of this interface will therefore be offered for every
existing decoding solution in OAI and solutions added in the future will
be provided as independent module code without any modification to the
core of OAI code.  The way to choose the decoding solution and to
configure it was also unified using configmodule. The library can be
chosen through the option --loader.ldpc.shlibversion. The slot coding
solutions shipped with this MR can be configured through configmodule
(e.g., T2 address and isolated cores).

This MR includes three coding implementations:

- A wrapper around segment decoding libraries for test purpose: libldpc.so
- A one shot slot coding and encoding with the T2 board: libldpc_t2.so
- A decoder on FPGA using the XDMA driver: libldpc_xdma.so

Improvements brought by this MR:

- Easy integration of a wider variety of LDPC coding solution at gNB and UE
- Easy selection of the LDPC coding solution (option --ldpc-offload-enable is kept for now but it can be ultimately removed)
- T2:
  * More efficient when many UEs are connected
  * Decoding and encoding in nr-uesoftmodem
2024-12-16 15:29:20 +01:00
Robert Schmidt
deba36a5d1 Merge remote-tracking branch 'origin/NGAP-FAILMESSAGE' into integration_2024_w50 (!3163)
NGAP-Initial Context Setup Failure

NGAP Failure message - Initial Context Setup Failure.  When an Initial
Context Setup Request is received with the UE context as null, it
triggers Initial Context Setup failure
2024-12-16 15:27:38 +01:00
Robert Schmidt
e5622f442c Merge remote-tracking branch 'origin/build-rocky9.5' into integration_2024_w50 (!3162)
Add Rocky 9.5 to list of distributions
2024-12-16 15:27:17 +01:00
Robert Schmidt
0b78a18d47 Merge remote-tracking branch 'origin/sib19-ue-utilization' into integration_2024_w50 (!3019)
SIB19 utilization on UE

Following SIB19 initialization and scheduling on gNB (!2899 - merged)
and Receive SIB19 on nrUE (!2920 - merged), this merge request aims to
introduce the actual use of the SIB19 provided parameters by gNB in UE.
Changes needed for utilization include: initialization of position
coordinates parameters for UE (which are needed to calculate propagation
delay between UE and SAT), propagation delay calculations and timing
advance adjusts. Moreover, this change removes the now unused arguments
for ntn_koffset, ntn_ta_common and ntn_ta_commondrift
2024-12-16 15:26:48 +01:00
Robert Schmidt
a8a7946975 Merge remote-tracking branch 'origin/fhi-72-hotfixes' into integration_2024_w50 (!3160)
FHI-72: initialize mask, find correct libxran

See commits for more information
2024-12-16 15:25:52 +01:00
Robert Schmidt
85440e2d4e Merge remote-tracking branch 'origin/gtpv1u-data-no-itti' into integration_2024_w50 (!3158)
GTP: use direct call instead of ITTI

Using ITTI calls for user plane implies (1) a memory allocation, (2)
mutexes, and (3) queueing messages for each user plane packet, which is
heavy. Use a direct API call instead to reduce overhead.
2024-12-16 15:25:18 +01:00
Bartosz Podrygajlo
b92ee59d41 Fix instrumentation target for old CMake versions
Older make versions do not support source files to be added to INTERFACE
type target. The source file is not needed there so it was removed.
2024-12-16 15:21:11 +01:00
Bartosz Podrygajlo
1481d89dfd Optimize PHY_ofdm_mod CYCLIC_PREFIX in case of incidentally aligned pointers
It seems that the cyclic prefix is in most cases a multiple of 512 samples.
This means that in most cases the idft output pointer is already aligned and
there is no need to perform an extra memcpy. This saves the memcpy time in
most cyclic prefix insertion cases.
2024-12-16 15:04:03 +01:00
Bartosz Podrygajlo
31b8d98bb5 Formating for PHY_ofdm_mod 2024-12-16 15:04:03 +01:00
Raymond Knopp
654c56b4c8 put back AVX512 in ldpc_encode_parity 2024-12-16 10:20:13 +01:00
Raymond Knopp
37421b91e9 removed used of AVX512 in ldpc_encode_parity 2024-12-16 09:52:00 +01:00
Romain Beurdouche
7bf6f3f276 Simplify segment decoder and encoder interfaces
More complex implementations will be achieved using the new reworked interface

- t_nrLDPC_dec_params: remove F, Qm, rv and perCB
- encoder_implemparams_t: remove Qm, Tbslbrm, G, rv and perCB
2024-12-16 08:40:54 +01:00
Robert Schmidt
0aeba914a0 Cleanup in CMakeLists.txt
- Remove all variables (like OPENAIR1), they serve no purpose and make
  unnecessarily long lines
- Remove linking to T, it does not seem to be necessary
- Avoid intermediate variables to keep sources, and declare libraries
  directly, making for shorter code
2024-12-16 08:40:54 +01:00
Romain Beurdouche
23bfce8d91 feat(nrLDPC_coding_interface): Move LDPC and Turdo coding libraries cmake lists in sub directories 2024-12-16 08:40:54 +01:00
Romain Beurdouche
97614d182f feat(nrLDPC_coding_interface): Documentation 2024-12-16 08:40:54 +01:00
Romain Beurdouche
240aafeb14 fix(nrLDPC_coding_interface): use lidldpc_slot_t2 for CI 2024-12-16 08:40:54 +01:00
Romain Beurdouche
37bb58feb2 fix(nrLDPC_coding_interface): lidldpc_slot_segment becomes default libldpc 2024-12-16 08:40:54 +01:00
Raphael Defosseux
52d1d7b6e7 chore(ci): explicitly support BSD-3-Clause as legit license in OAI
Signed-off-by: Raphael Defosseux <raphael.defosseux@eurecom.fr>
2024-12-16 08:40:54 +01:00
Yi-Hung Chang
8756afdb5a feat(nrLDPC_coding_interface): Add ldpc_xdma coding library 2024-12-16 08:40:54 +01:00
Romain Beurdouche
73770da52c fix(nrLDPC_coding_t2): remove legacy T2 coding and rename libldpc_slot_t2.so in libldpc_t2.so 2024-12-16 08:40:54 +01:00
Romain Beurdouche
c6bdde1244 feat(nrLDPC_coding_interface): Add ldpc_slot_t2 coding library 2024-12-16 08:40:54 +01:00
Romain Beurdouche
49bdcfd95c feat(nrLDPC_coding_interface): Add ldpc_slot_segment coding library 2024-12-16 08:40:54 +01:00
Romain Beurdouche
7f1d3c6644 feat(nrLDPC_coding_interface): Use reworked interface in PHY simulators 2024-12-16 08:40:54 +01:00
Yi-Hung Chang
80c406693f feat(nrLDPC_coding_interface): Use reworked interface in UE 2024-12-16 08:40:54 +01:00
Romain Beurdouche
00e1ad124d feat(nrLDPC_coding_interface): Use reworked interface in gNB 2024-12-16 08:40:52 +01:00
Raymond Knopp
c4bf2d5c1a timing measuremens for interleaving/rate matching 2024-12-16 01:29:04 +01:00
Raymond Knopp
cb465b4d56 AVX512 modifications for LDPC encoding: interleaving, ZC384 BG1, output formatting for encoder, segmentation (memcpy) 2024-12-16 01:09:38 +01:00
Madhuri.G
7cfa482107 Initial Context Setup Failure
NGAP Failure message - Initial Context Setup Failure.
When an Initial Context Setup Request is received with the UE context as null, it triggers Initial Context Setup failure.
2024-12-13 15:35:43 +05:30
Robert Schmidt
61849adf8b Merge remote-tracking branch 'origin/fix-type-remove-assert-2layer-mmse' into integration_2024_w50 (!3149)
Fix several issues in ulsch_mmse_2layers

Fix incorrect array type of determ_fin which was set to int32_t while the
array holds the results of simde_mm_abs_epi32 which produces unsigned
values.

Remove assert on right-shifting negative integers as it is impossible for
determ_fin to hold negative values.

Change type of sum_det to uint32_t to prevent possible overflow.  Fix
the type cast (int -> uint32_t) to prevent casting before shift in
nr_ulsch_comp_muli_sum which might have resulted in right shifting
negative integers.

Closes: #753
2024-12-13 08:15:18 +01:00
Robert Schmidt
7fe218b91c Merge remote-tracking branch 'origin/nr-ue-avoid-dl-race' into integration_2024_w50 (!3144)
UE data race fix

When a new sync request is sent to PHY, we clear harq buffer and start
synchronization process. This could lead to unexpected behavior or segv
because DL actors might be using the buffer we just cleared. To avoid
this, the DL actors are shutdown and re initiated before clearing harq
info.
2024-12-13 08:14:24 +01:00
Robert Schmidt
2de4d8ee0d Merge remote-tracking branch 'origin/ue-usrp-tx-thread' into integration_2024_w50 (!3111)
Enable USRP Tx thread in nrUE

The option usrp-tx-thread-config 1 was not taking effect in UE. This MR fixes it.
2024-12-13 08:13:45 +01:00
Robert Schmidt
4f11e76b6b Merge remote-tracking branch 'origin/ci-test-metanoia' into integration_2024_w50 (!3159)
CI: Add FHI7.2 test with Metanoia RU

Replace VVDN RU by Metanoia RU in the RAN-SA-FHI72-CN5G pipeline.
2024-12-13 08:13:12 +01:00
francescomani
de0b9881ac remove NSA testing config files probably not used anymore 2024-12-12 10:40:37 +01:00
francescomani
44b3443533 remove deprecated ssb_PositionsInBurst_PR still present in some config files 2024-12-12 10:37:56 +01:00
francescomani
2ff81068ef removing a couple of config files from targets with non conventional names (probably never used) 2024-12-12 10:19:48 +01:00
francescomani
7b61ebcb74 fixing ssb_perRACH_Occasion in targets SA files 2024-12-12 10:19:48 +01:00
francescomani
4d6b3f8c30 removing unused bf_weights from a config file 2024-12-12 10:19:48 +01:00
francescomani
e5675d38bf further cleanup of config files
pdcch_ConfigSIB1 field not used since almost two years but still kept in some config file
2024-12-12 10:19:48 +01:00
francescomani
46fe1115ad improving also 7.2 files in targets 2024-12-12 10:19:48 +01:00
francescomani
aed2e6c7fb improvements in PRACH parameters in 5G configuration files 2024-12-12 10:19:48 +01:00
Romain Beurdouche
5f22b05695 feat(nrLDPC_coding_interface): Add reworked interface definition and loader 2024-12-12 08:37:20 +01:00
Robert Schmidt
13a1d863c7 Add Rocky 9.5 to list of distributions 2024-12-12 08:34:44 +01:00
Robert Schmidt
f8d7e1fd1b Findxran: exclude default paths, use hints
Some users copy libxran.so to a system directory (e.g., /usr/local/lib).
At the same time, we require xran_LOCATION to be set to find the build
directory. Use HINTS to prefer the location passed through
xran_LOCATION.

Also, use NO_DEFAULT_PATH to outright disallow global scope, to prevent
"accidentally" finding libxran.so in global scope (this is for
multi-user systems that are used in development, and where people have
different version of libxran for testing purposes). To still use
packages in e.g., /usr/local/, it would be possible to set xran_LOCATION
to this directory. (there is a problem that the version information will
likely not be read correctly, so this might not be enough)
2024-12-12 08:32:48 +01:00
Jaroslava Fiedlerova
02679ca07c CI: Create FHI7.2 test with Metanoia RU, 2 layers in DL 2024-12-12 08:26:42 +01:00
Sakthivel Velumani
4c42a20eaa Cmd line option for sync in frames for iqrecorder
B200 with high clock drift will go out of sync within 280ms which was
the default duration to sync in with iqrecorder. Now this value can be
specified via cmd line so the user can change it according to needs.
2024-12-11 12:34:43 -05:00
Sakthivel Velumani
3f01ec0e71 Fix iqrecord to work on AVX512 machine 2024-12-11 12:32:18 -05:00
Robert Schmidt
42a10e4700 Correctly initialize u64 mask
1 needs to be marked as long long, to allow shifting numbers >= 32.
Otherwise, 1 is an int, limited to 32 bits.
2024-12-11 16:15:07 +01:00
Badescu, Ciprian
a049c53e99 better handling of writeBlockSize greater than samples/slot
fix the case when writeBlockSize is greater than samples/slot
by sending samples from the same buffer instead of out-of-bounds memory read
2024-12-11 13:01:50 +02:00
Bartosz Podrygajlo
fc26b8c053 Fix process_slot_tx_barriers for high rx-to-tx values
Set the number of barriers to 512 and implement proper slot and frame
based selection. Now the dynamic barriers should not be overwritten in
case the rx-to-tx offset is high. The maximum offset supported is 512.
2024-12-11 13:01:50 +02:00
Roberto Rosca
0b1dd3ed50 Update 5g_rfsimulator_ntn_geo docker file and configs used for test to exclude unused parameters and add ntn related values. 2024-12-11 13:01:50 +02:00
Roberto Rosca
ef55aaa7c9 Store position coordinates in NR_UE_RRC_INST_t
position_coordinates will be allocated and populated upon receiving SIB19

Co-authored-by: Robert Schmidt <robert.schmidt@openairinterface.org>
2024-12-11 13:01:50 +02:00
Robert Schmidt
3f74749aa6 Simplify position reading 2024-12-11 13:01:50 +02:00
Robert Schmidt
2989bb592b handle position from RRC 2024-12-11 13:01:50 +02:00
Roberto Rosca
be618b069e Added message-based communication between L2 and L1 regarding NTN configuration parameters 2024-12-11 13:01:50 +02:00
Roberto Rosca
bd7fb492fd Removed SIB19 related UE arguments
- Removed ntn_koffset, ntn_ta_common, ntn_ta_commondrift arguments in order to be used directly from SIB19
   - Removed global NTN_UE_Koffset variable and it's use
   - Introduced getter functions for ntn related parameters
2024-12-11 13:01:42 +02:00
Robert Schmidt
27f1c0db65 Remove GTPV1U_TUNNEL_DATA_REQ ITTI message: it is not used 2024-12-11 10:34:08 +01:00
Robert Schmidt
ad9645ffb9 LTE PDCP: Use GTP direct API instead of ITTI
See parent commit for more information.

LTE PDCP uses GTP, so need to link GTP into the corresponding library.
2024-12-11 10:32:18 +01:00
Robert Schmidt
2ffb674d58 F1AP: Use GTP direct API instead of ITTI
See parent commit for more information.
2024-12-11 10:31:52 +01:00
Robert Schmidt
3c5e999f6d SDAP: Use GTP direct API instead of ITTI
Using ITTI calls for user plane implies (1) a memory allocation, (2)
mutexes, and (3) queueing messages for each user plane packet, which is
heavy. Use a direct API call instead to reduce overhead.
2024-12-11 10:31:52 +01:00
Robert Schmidt
70fa713712 Create direct API to send GTP-U msgs 2024-12-11 10:31:52 +01:00
Robert Schmidt
f6238eddec Reformat gtpv1uSend(), shorten buf/len variable names 2024-12-11 10:31:52 +01:00
Robert Schmidt
789ee2335e Correct documentation: PDCP passes to SDAP 2024-12-11 10:31:52 +01:00
Robert Schmidt
cb726af807 GTP: Fix function name in macro 2024-12-11 10:31:52 +01:00
Robert Schmidt
21bf5c464c GTPV1U_ENB_END_MARKER_REQ: use correct message struct 2024-12-11 10:31:27 +01:00
Roberto Rosca
486f4f5f96 Adding second layer timing advance
- Renamed position coordinates function (better readability)
   - Introduced large timing advance compensation mechanism
2024-12-11 10:23:11 +02:00
Roberto Rosca
f88c47ba3e Adding first layer timing advance
- Added new structure to hold timing advance parameters
   - Made SIB19 related calculation to save to this struct
   - Modified in ra to get ta struct values
2024-12-11 10:20:35 +02:00
Roberto Rosca
698ff73c7f Added SIB19 related calculations on UE 2024-12-11 10:20:34 +02:00
Roberto Rosca
06c0374ec8 Added UE support for position coordinates taken from conf files 2024-12-11 10:20:34 +02:00
Guido Casati
21df50b31e Cleanup unused imsi member in gNB_RRC_UE_s 2024-12-10 16:28:11 +01:00
Guido Casati
c0919d8533 Cleanup long time commented out lines in CMakeLists.txt 2024-12-10 16:28:11 +01:00
Sakthivel Velumani
73921dfa10 Prevent race condition when sync req received
Added a flush mechanism to actor thread. This is used to wait for all
waiting jobs in the queue to be completed.
2024-12-10 09:51:10 -05:00
Sakthivel Velumani
e5814cd62e Handle sync request out of UE_dl_preprocessing()
Move handling of sync request from MAC from UE_dl_preprocessing(). This
will process the sync request before receiving the samples of current
slot from radio so we don't 'lose' the slot.
2024-12-10 09:50:27 -05:00
Sakthivel Velumani
4f56bf903a Helper function to get center frequency
from point A.
2024-12-10 09:50:27 -05:00
Sakthivel Velumani
5ac703b580 Code cleanup
Add const to function input pointer.
2024-12-10 09:50:27 -05:00
Robert Schmidt
054506f5ae Merge branch 'integration_2024_w49' into 'develop'
Integration: `2024.w49`

See merge request oai/openairinterface5g!3148

* !3065 NAS Service Request enc/dec implementation
* !3129 Refactor UL MAC PDU decoding
* !3136 Use ninja -k option in CI
* !3137 T tracer: add macpdu traces for the NR UE
* !2392 Documentation: add multi-UE deployment with RFsimulator
* !3145 a lib has been added but missed dependancies
* !3050 doc: Add instructions for 5G NR gNB frequency configuration
* !3141 CI: Allow restart of the container if deployment fails
* !3138 Align YAML config getlist with libconfig implementation
* !3140 remove un-necessary global variables
* !3146 Updates to match more fapi-compliant tx_data.request
* !3025 New threadpool, fixed in NR UE
* CI: Remove USRP mgmt_addr from LTE-2x2 conf files
* !3147 Fronthaul xran library update to F release (2. and final step towards M-plane integration)
* !3142 Add CI test to trigger RLF with high pathloss in channelmod
2024-12-10 13:33:23 +00:00
Robert Schmidt
ac6a37fafa Merge remote-tracking branch 'origin/add-ci-nr-f1-pathloss-rlf' into integration_2024_w49 (!3142)
Add CI test to trigger RLF with high pathloss in channelmod
2024-12-10 09:15:00 +01:00
Bartosz Podrygajlo
01abee2baf Reduce rounding error in rshift of sum_det
- Use a uint64_t
 - move shift after the sum
 - add bias before shifting to reduce rounding error
2024-12-09 12:18:10 +01:00
Guido Casati
665a7d5020 Add CI test to trigger RLF with high pathloss in channelmod
Upon restoration to ploss, set to 20; when setting to 0, the UE is not
able to sync to the cell anymore.

Co-authored-by: Robert Schmidt <robert.schmidt@openairinterface.org>
2024-12-09 09:59:09 +01:00
Robert Schmidt
0b3d098654 Merge remote-tracking branch 'origin/fhi-f-release' into integration_2024_w49 (!3147)
Fronthaul xran library update to F release (2. and final step towards M-plane integration)

- xran library support -> both E and F releases
- RU delay profile removed -> not used in neither of the releases
- DU delay profile updated
- one-way delay measurements support is improved/fixed in the F release.
  However, not implemented here as it depends on the RU capabilities
2024-12-08 21:07:05 +01:00
Jaroslava Fiedlerova
ee1605b8d9 CI: Remove USRP mgmt_addr from LTE-2x2 conf files
The "mgmt_addr" parameter is not required for USRP N310 initialization. The
critical parameter for successful operation is the "addr", which specifies
the IP address of the SFP port used for data transfer.

Including both "mgmt_addr" and "addr" can lead to initialization failures if
one of the specified addresses is unavailable. Since the "mgmt_addr" is
unnecessary for this context, it has been removed to avoid potential conflicts
and simplify the configuration.
2024-12-06 16:38:13 +01:00
Jaroslava Fiedlerova
55a18514b6 Merge remote-tracking branch 'origin/thread-pool-fixed' into integration_2024_w49 (!3025)
New threadpool, fixed in NR UE

This merge request is an attempt to fix the new thread pool implementation
for use in NR UE and gNB (as well as eNB).
2024-12-06 16:36:38 +01:00
Bartosz Podrygajlo
9f03fde602 Fix several issues in ulsch_mmse_2layers
Fix incorrect array type of determ_fin which was set to int32_t while the
array holds the results of simde_mm_abs_epi32 which produces unsigned
values.

Remove assert on right-shifting negative integers as it is impossible for
determ_fin to hold negative values.

Change type of sum_det to uint32_t to prevent possible overflow.

Fix the type cast (int -> uint32_t) to prevent casting before shift in
nr_ulsch_comp_muli_sum which might have resulted in right shifting negative
integers.
2024-12-06 16:22:05 +01:00
Teodora
b7c3d593c2 Update FHI build image to support xran F release 2024-12-06 12:33:00 +01:00
Jaroslava Fiedlerova
fb1fe17293 Merge remote-tracking branch 'origin/aerial_24-2' into integration_2024_w49 (!3146)
Updates to match more fapi-compliant tx_data.request

The packing of PDUs as required in aerial for the Tx_data.Request wasn't
complaint with FAPI. That was fixed in Aerial 24-2. This change makes L2
pack the payloads in the way that Aerial now requires.
2024-12-06 11:52:45 +01:00
Jaroslava Fiedlerova
797bc1b285 Merge remote-tracking branch 'origin/remove-not-needed-global-vars' into integration_2024_w49 (!3140)
remove un-necessary global variables

Remove global variables that can be removed by a trivial way:
- simply dead globals
- or reference is a single source, so can be static

setting them static reduces the scope, that is a progress, but of course as
for all static variables, the code is still not re-entrant
2024-12-06 11:51:29 +01:00
Teodora
2b007b5d59 Add warning that E release support will be removed 2024-12-05 23:00:07 +01:00
Teodora
825543f456 Update FHI README regarding F release support 2024-12-05 23:00:07 +01:00
Teodora
574b3eb348 Fronthaul xran library F release support
Major improvements:
  1) bbu_offload - enable packet handling on BBU cores
  2) dlCpProcBurst - DL CP processing on one or more symbols
  3) SRS CP processing - depends on the RU capabilities that can be
    retreived via M-plane (if RU is CAT B)
  4) nSecDesc - the number of section descriptors per symbol; it was hardcoded to 0 in E release;
    depends on the RU capabilities that can be retreived via M-plane
  5) RunSlotPrbMapBySymbolEnable - enable PRB mapping by symbol with multisection;
    depends on the RU capabilities that can be retreived via M-plane
  6) DSS (Dynamic Spectrum Sharing) support - depends on the RU capabilities that can be retreived via M-plane

Minor fixes in F that exist in E:
  1) prach_config->nPrachFilterIdx - explained in commit ID f3045396
  2) T1a_min_cp_dl - explained in the commit under title "Clarification on DU delay profile"
  3) fh_config->nULRBs - explained in commit under title "Further clarification on xran E release parameters"

Removed const for prb_conf argument in oran_allocate_cplane_buffers()
function, as F release requires the not const struct for
xran_init_PrbMap_by_symbol_from_cfg() and xran_init_PrbMap_from_cfg()
even though the struct is not modified inside of these functions.
2024-12-05 22:59:58 +01:00
Teodora
197db6a65f Correction on PRACH offset in FHI README
- this should have been done in the commit ID b334feb9
2024-12-05 22:59:58 +01:00
Teodora
698245c7e9 Further clarification on xran E release parameters
- remove xran parameter io_cfg->port logging => this parameter
    is filled within xran library in both E and F releases
  - PRACH offset explanation; not limited to >= max(Ntx, Nrx);
    workaround done in xran to support PRACH eAxC IDs same as PUSCH eAxC IDs
  - DL PRB not used in xran; UL PRB used in xran F release, therefore
    removed from the patch
  - these fixes should have been done in the commit ID f3045396
2024-12-05 22:59:58 +01:00
Teodora
dd4ffe3439 Clarification on One-Way Delay Measurements 2024-12-05 22:59:47 +01:00
Jaroslava Fiedlerova
fee95ed36f Merge remote-tracking branch 'origin/align-yaml-to-config' into integration_2024_w49 (!3138)
Align YAML config getlist with libconfig implementation

This aligns the behavior of params_yaml with params_config library:

- when a mapping is read using getlist it returns the number of elements in
  the mapping instead of 0
- when a mapping is read using get it returns the number of parameters used
  for input
2024-12-05 19:22:51 +01:00
Jaroslava Fiedlerova
429e98e4f1 Merge remote-tracking branch 'origin/ci-container-restart' into integration_2024_w49 (!3141)
CI: Allow restart of the container if deployment fails

In CI we sometimes encounter fail of the gNB/UE deployment (and fail of the test
scenario) caused by unsuccessful initialization of the USRP N310.

This MR enables to optionally restart the gNB or UE container, if the deployment
fails on the health check during start up. By default, restarts of the container
are not allowed, but we can enable them by setting num_attemps > 1 for a given
deployment in the XML file.

Logs from failed deployment attempts are collected.

This MR aims to avoid known CI failure caused by "USRP N310 Initialization Failure"
mentioned in #871.
2024-12-05 19:15:03 +01:00
Jaroslava Fiedlerova
8c5b37deae Merge remote-tracking branch 'origin/doc-frequency-config' into integration_2024_w49 (!3050)
doc: Add instructions for 5G NR gNB frequency configuration
2024-12-05 19:12:40 +01:00
Jaroslava Fiedlerova
c1e7c3795f Merge remote-tracking branch 'origin/fix-lacking-barrier-actor-dependancy' into integration_2024_w49 (!3145)
a lib has been added but missed dependancies
2024-12-05 19:09:41 +01:00
Jaroslava Fiedlerova
2ef4dbe6b9 Merge remote-tracking branch 'origin/rfsimdoc' into integration_2024_w49 (!2392)
Documentation: add multi-UE deployment with RFsimulator

Extended doc/NR_SA_Tutorial_OAI_nrUE.md with section about how to run multiple UEs

- multiple UEs with namespaces (provided new script)
- multiple UEs with Docker UEs
- updated rfsimulator and channel simulation tutorials
- updated README.md
2024-12-05 19:07:13 +01:00
Rúben Soares Silva
f733120986 Move the packing logic for TAG = 2, to reuse existing functions.
This change makes it so the fapi_nr_p7_message_pack is used to pack TX_DATA.request for Aerial, reducing the amount of repeated code.
Add the capability to pack TLVs with TAG=2 (offset from first address)

Packs the TLV.length differently according to whether or not Aerial is in use ( for Aerial TLV.length is 16-bit, for OAI is 32-bit )
2024-12-05 16:38:32 +00:00
Jaroslava Fiedlerova
027631eb70 CI: Remove GetContainerName() - not used anymore
No need to get container name, we work directly with docker services.
2024-12-05 14:13:22 +01:00
Jaroslava Fiedlerova
f786d92bc9 CI: Allow restart of the container if it fails on the first attempt
In CI we sometimes encouter fail of the gNB/UE deployment (and fail of
the pipeline) caused by unsuccsessful initialization of the USRP N310.
Restart the container if the health check fails during initialization.

Introduce a configurable parameter (from XML) to set max number of
attempts for the container deployment.

Store logs from failed deployment attempts.
2024-12-05 14:13:22 +01:00
Jaroslava Fiedlerova
f078e6f9c7 CI: modify and rename CopyinContainerLog to use docker services 2024-12-05 14:13:22 +01:00
Jaroslava Fiedlerova
a9ca4a5481 CI: create GetServiceHealth()
Rework GetContainerHealth() to work with docker compose and services,
instead of using docker and containers. Return health and message about
deployment status (used for console and HTML logging) for a given service.
2024-12-05 14:13:18 +01:00
Guido Casati
3438d45d6c Add tutorial about how to run multiple UEs
* multiple UEs with namespaces (provided new script)
* multiple UEs with Docker UEs
* updated rfsimulator and channel simulation tutorials
* updated README.md

Co-authored-by: Arash Sahbafard <arash.sahbafard@silicon-austria.com>
2024-12-05 13:50:36 +01:00
Robert Schmidt
5e00850aee Delete commented code in mme_app.c 2024-12-05 12:11:29 +01:00
Bartosz Podrygajlo
793bdd86ae Adjust reference processing time for 40Mhz phytest 2024-12-05 11:32:23 +01:00
Laurent THOMAS
443307a34a a lib has been added but missed dependancies 2024-12-05 11:29:42 +01:00
Jaroslava Fiedlerova
80736bb2bd Merge remote-tracking branch 'origin/t-tracer-nrue-macpdu' into integration_2024_w49 (!3137)
T tracer: add macpdu traces for the NR UE

MIB, SIB1, random access and regular scheduling are traced.

At the beginning of a connection (rrc setup request and rrc setup), the
RNTI is reported as 0. Might be fixed, somehow, if absolutely needed (not
sure).
2024-12-05 10:19:12 +01:00
Jaroslava Fiedlerova
86a47d7061 Merge remote-tracking branch 'origin/build-options' into integration_2024_w49 (!3136)
Use ninja -k option in CI

Use ninja -k10 in the CI to keep going after build errors to see more errors
than just the first.
2024-12-05 10:18:20 +01:00
Jaroslava Fiedlerova
393185dfb5 Merge remote-tracking branch 'origin/Refactor_UL_MAC_PDU_decoding' into integration_2024_w49 (!3129)
Refactor UL MAC PDU decoding

Refactor the UL MAC PDU decoding: A single function is created to decode the
entire MAC subheader
uint8_t decode_ul_mac_sub_pdu_header(uint8_t *pduP, uint8_t *lcid, uint16_t *length).
It returns the length of the MAC subheader and outputs the LCID and Length.

This new function is called from 2 functions: lcid_crnti_lookahead() and
nr_process_mac_pdu().

After calling it in nr_process_mac_pdu(), the validation of the PDU can be
made for all the MAC subPDUs in a single place, allowing for less and more
clean code (as opposed with the previous version where the validation was
made multiple times inside the LCID switch-case).

Additionally, this MR updates the list of LCIDs as in 3GPP TS 38.321 v18.3.0
Table 6.2.1-2: Values of LCID for UL-SCH when the LX field is not present or
is set to 0.
2024-12-05 10:12:23 +01:00
Jaroslava Fiedlerova
2fad00010b Merge remote-tracking branch 'origin/nr-ue-nas-service-request' into integration_2024_w49 (!3065)
NAS Service Request enc/dec implementation

NAS Service Request:

- encoding
- decoding
- unit test

Related to #852
2024-12-05 10:11:20 +01:00
Teodora
83c88affec Clarification on DU delay profile
- explanation on DU delay parameters used in E and F xran releases
2024-12-04 18:59:16 +01:00
Teodora
68a3435689 Remove RU delay profile
- xran E release (and later F) doesn't use them
  - update fhi_72 section in fronthaul config files by removing
    unnecessary RU delay parameters
2024-12-04 18:59:16 +01:00
Nick Hedberg
665aac0a94 Updates to match more fapi-compliant tx_data.request 2024-12-04 17:00:50 +00:00
Bartosz Podrygajlo
21dafbcde7 New threadpool
- removed some whitespace noise.
 - cleaned up CMakeLists.txt
 - reintegrated task_manager.c into thread-pool.c
 - cleaned up some unnecessary code

Co-authored-by: Cedric Roux <cedric.roux@eurecom.fr>
Co-authored-by: Mikel Irazabal <mikel.irazabal@openairinterface.com>
2024-12-04 17:54:51 +01:00
Laurent THOMAS
279d49415f remove un-necessary global variables 2024-12-04 12:26:36 +01:00
luis_pereira87
99ea71462b Refactor UL MAC PDU decoding 2024-12-04 09:07:14 +00:00
Jaroslava Fiedlerova
e1d06cfef8 CI: add CI unit test for simple fail deployment with 2 services 2024-12-04 09:43:45 +01:00
Jaroslava Fiedlerova
bf210241bd doc: Add instructions for 5G NR gNB frequency configuration 2024-12-03 17:07:50 +01:00
Robert Schmidt
c942fe43a9 Merge branch 'integration_2024_w48' into 'develop'
Integration: `2024.w48`

See merge request oai/openairinterface5g!3134

* !2951 Integrate Tracy with NR UE
* !2985 E1AP Bearer Context Setup encoding/decoding library and unit tests
* !3115 T2: minor fix for 4x4 processing
* !3117 F1AP lib: minor fixes
* !3126 NR MSG3 scheduling improvements
* !3128 NR UE RRC T304 in phy-test mode
* !3132 Run the last job of gNB pusch channel estimation inline
* !3133 NR UL HARQ handling improvements
* !3091 Update NR UE threading model
* !3030 Imscope updates
* !3131 FAPI P7 Refactoring and unitary test creation
* !3033 Increase the number of UE supported at gNB by having more than 1 PUCCH2 frequency occasion per slot
2024-12-03 15:09:59 +00:00
Cedric Roux
5ff4b7a328 T tracer: add macpdu traces for the NR UE
MIB, SIB1, random access and regular scheduling are traced.

At the beginning of a connection (rrc setup request and rrc setup), the
RNTI is reported as 0. Might be fixed, somehow, if absolutely needed (not
sure).
2024-12-03 15:46:12 +01:00
Robert Schmidt
fb0a9b64e4 Merge remote-tracking branch 'origin/gNB_supporting_more_UEs' into integration_2024_w48 (!3033)
Increase the number of UE supported at gNB by having more than 1 PUCCH2
frequency occasion per slot
2024-12-02 16:27:07 +01:00
Bartosz Podrygajlo
08279ab9f6 Align return value of config_yaml_get to libconfig implementation
Now return value should be equal to number of processed input parameters like
in params_libconfig.
2024-12-02 15:26:39 +01:00
Bartosz Podrygajlo
b6b377ffc0 Align YAML config getlist with libconfig implementation
This aligns the behavior of params_yaml with params_config library so that
when a mapping is read using getlist it returns the number of elements in
the mapping instead of 0.
2024-12-02 13:32:19 +01:00
Robert Schmidt
b5675d3eea Merge remote-tracking branch 'origin/nfapi-p7-refactoring' into integration_2024_w48 (!3131)
FAPI P7 Refactoring and unitary test creation

This MR is a follow-up to the work done in !2714 this time separating
the P7 FAPI messages into its own library (nr_fapi_p7).

In the same way, utility functions to copy, free and compare have been
added for each message, as well as an addition function to get the
allocated size for a message, which is used for the messages that can be
too big to fit in a buffer that's allocated in the stack.

Unitary tests have been added for each of the messages, testing
pack/unpack and the utility functions added.
2024-11-30 12:59:25 +01:00
Robert Schmidt
9409348d23 Use ninja -k option in CI
Some users of the OAI CI complain that since we build with -Werror, it
is difficult to see all warnings/errors and fix them, necessitating
multiple attempts at times to see all warnings. To allow them to see
more warnings, use ninja option -k10 to keep going after errors, and
show more errors at once.
2024-11-29 16:20:12 +01:00
Robert Schmidt
a89aab8d84 build_oai: add --build-tool-opt to pass options to build tool
There are command line options that one might pass to ninja/make, but
for which cmake does not provide an interface. For instance, make/ninja
support -k/-kN to "keep going" after errors. Cmake does not provide an
option, but it is still possible to pass this. Make a build_oai option
to allow this, used in the next commit.
2024-11-29 16:15:09 +01:00
francescomani
9c44d6ee86 number of supported ue updated in feature set file 2024-11-29 16:13:58 +01:00
francescomani
68c95f80a1 increase the number of UE supported at gNB by having more than 1 PUCCH2 frequency occasion per slot 2024-11-29 16:13:54 +01:00
Robert Schmidt
f5888225ad Merge remote-tracking branch 'origin/imscope-docking' into integration_2024_w48 (!3030)
Imscope updates

- Using imgui docking branch - allows window docking.
- Moved scopes to different windows to allow docking.
- Disabled scatterplot for time domain samples - issues with amount of
  vertices caused segfaults.
- Disabled IQ heatmaps for RX IQ samples on gNB and UE - this was
  incorrect and currently I don't know how to fix it. This will be
  reenabled once it is.
- added a simple menu and disabled demo windows by default.
2024-11-29 15:52:50 +01:00
Robert Schmidt
ca3739e806 Merge remote-tracking branch 'origin/nr-ue-threading-improvements' into integration_2024_w48 (!3091)
Update NR UE threading model

This updates the NR UE threading model by preventing calling threadpool
from threadpool and fixes deadlock issues related to processSlotTX. By
making processSlotTX run to completion instead of starting and waiting
for other threads to finish it prevents locking thread pool cores,
therefore prevening deadlocks.

There is a slight difference here compared to the previous version where
I do not use the UL actor as I believe it is not necessary,
processSlotTX satisfies the run-to-completion requirement now. If in the
future any UL procedure would be parallelized using the thread pool it
should either be done in a run-to-completion model or the processSlotTX
function should be taken off the thread pool.

The documentation has been updated.
2024-11-29 15:51:56 +01:00
Cedric Roux
891ac15aae T tracer: bugfix: use correct variable 2024-11-29 15:35:24 +01:00
Cedric Roux
4e5c21fc12 bugfix: call T tracer only after setting values 2024-11-29 15:30:28 +01:00
Bartosz Podrygajlo
f64451bd67 Add metadata to gNbTimeDomainSamples sink
Added slot and frame to gNbTimeDomainSamples in imscope
2024-11-29 11:24:00 +01:00
Bartosz Podrygajlo
ef803d02e4 Add default docking window layout for imscope 2024-11-29 11:23:27 +01:00
Bartosz Podrygajlo
fddc52de38 Imscope updates
- Using imgui docking branch - allows window docking.
 - Moved scopes to different windows to allow docking.
 - Disabled scatterplot for time domain samples - issues with amount of vertices caused segfaults.
 - Disabled IQ heatmaps for RX IQ samples on gNB and UE - this was incorrect and currently I don't know
   how to fix it. This will be reenabled once it is.
 - added a simple menu and disabled demo windows by default.
2024-11-29 11:23:27 +01:00
Rúben Soares Silva
f828e95155 Harmonize SFN and Slot typing with SCF standard 2024-11-29 09:15:08 +01:00
Rúben Soares Silva
ebf07dfc62 Add handler to pack vendor ext SLOT.response 2024-11-29 09:15:08 +01:00
Rúben Soares Silva
20a2f9671a Use FAPI utility functions to handle P7 messages in Aerial 2024-11-29 09:15:08 +01:00
Robert Schmidt
4d22ac6fd0 Provide handle_nr_srs_measurements() in 4G
4G/5G FAPI code is located in the same file. Since 5G code calls 5G
specific functions, these functions need to be defined in 4G.

The solution would be to separate the FAPI changes into 4G and 5G.
2024-11-29 09:15:08 +01:00
Rúben Soares Silva
28e3102858 Address memory leaks found in P7 messages handling
Add nr_fapi_p7 library to NFAPI_USER_LIB for access to utility functions

Change message handlers to use the utility functions to  copy and properly free the messages

Change the SRS handler to call the handler for the measurements instead of trying to copy to RC.gNB[0], which does not exist

Change nfapi_nr_p7_message_unpack to not allocate unneeded memory
2024-11-29 09:15:04 +01:00
Rúben Soares Silva
e8fe6cefaa Avoid packing/unpacking parameters not used by Aerial 2024-11-29 09:15:04 +01:00
Rúben Soares Silva
bcbf7ab975 Move functions for packing/unpacking RACH.indication
Changed parameter in unpack function to be inline with other unpack functions.
Changed nfapi_p7_allocate call to calloc to avoid dependency to NFAPI_LIB.

Added unitary test for RACH.indication( test pack/unpack, free, copy and compare )
Added constant NFAPI_NR_RACH_IND_MAX_PDU to follow constants related to other P7 messages limiting the maximum number of PDUs to use.

Removed now unneeded dependency to NFAPI_LIB and NFAPI_USER_LIB
2024-11-29 09:15:04 +01:00
Rúben Soares Silva
08ee4cfcc5 Add utility functions for RACH.indication.
Extra utility function to calculate allocated memory added.
2024-11-29 09:15:04 +01:00
Rúben Soares Silva
3fc784cda5 Move functions for packing/unpacking SRS.indication
Changed parameter in unpack_nr_srs_indication to void * to be inline with other unpack procedures.
Added memory allocation for pdu_list inside unpack function.

Add unitary test for SRS.indication( test pack/unpack, free, copy and compare )
Added rands16 to provide random int16_t values, needed for SRS.indication unitary test
Added constant NFAPI_NR_SRS_IND_MAX_PDU to follow constants related to other P7 messages limiting the maximum number of PDUs to use.
2024-11-29 09:15:04 +01:00
Rúben Soares Silva
7be347f04d Add utility functions related to SRS.indication.
This adds the equality, free and copy functions for SRS.indication message as described in the Table 3–129 of SCF222.10.04, it does not add the functions for the report type structures, as these are always sent/received inside the uint32_t array.
The utility functions for these will be added at a later commit, and subsequently tested in the upcoming unitary test for SRS.indication.
Extra utility function to calculate allocated memory added.
2024-11-29 09:15:04 +01:00
Rúben Soares Silva
6d54870fc9 Fix SRS.indication unpacking for Aerial.
When using Aerial, the Report TLV on SRS.indication is transported in a different buffer, as such, it needs to be unpacked separately.
2024-11-29 09:15:04 +01:00
Rúben Soares Silva
91a75fe453 Fix pack/unpack of SRS Report TLV value.
Since report_tlv->length is in bytes, and the value is an array of uint32_t, the number of uint32_t to be pushed/pulled is (length + 3) /4.
2024-11-29 09:15:04 +01:00
Rúben Soares Silva
36f65160fd Fix pack/unpack of SRS beamforming report.
Fixes the pack/unpack functions to allow multiple reported symbols, instead of just one.
Applied clang-format to both functions.
2024-11-29 09:15:04 +01:00
Rúben Soares Silva
c905655b4e Cleanup normalized_channel_iq_matrix.
Apply clang-format to pack/unpack procedures.
Add comments to improve readability of iqSize usage.
Fix unpacking return value to not return 0 on success.
2024-11-29 09:15:04 +01:00
Rúben Soares Silva
1160be3ffe Add pack/unpack for missing SRS Report.
Adds the packing/unpacking procedures for Channel SVD Representation ( Table 3-133 ).
2024-11-29 09:15:04 +01:00
Rúben Soares Silva
e10693939d Add missing SRS Report type struct.
Adds the structure for Channel SVD Representation ( Table 3-133 ), a missing report type for the SRS.indication message.
2024-11-29 09:15:03 +01:00
Rúben Soares Silva
6a34439c86 Fix SRS beamforming_report reported symbol list.
Renames nfapi_nr_srs_reported_symbol_t prgs into *reported_symbol_list for two reasons:
  So that the name is more representative of what the parameter represents.
  For it to actually be a list, and not assume only 1 reported symbol is used.

Allocate reported_symbol_list in unpack_nr_srs_beamforming_report.

Updated all references to prior prgs to point to the first position of reported_symbol_list, still only effectively using the first reported_symbol.

Rename fill_srs_reported_symbol_list into fill_srs_reported_symbol and update input parameter name, since it only fills the information related to one reported symbol
2024-11-29 09:15:03 +01:00
Rúben Soares Silva
3272225e1f Move functions for packing/unpacking UCI.indication
Reordered PDU pack/unpack function to follow PDU value order
Changed nfapi_p7_allocate calls to calloc to avoid dependency from FAPI lib to nFAPI lib.
Add unitary test for UCI.indication( test pack/unpack, free, copy and compare )
2024-11-29 09:15:03 +01:00
Rúben Soares Silva
3682164166 Fix pack/unpack for UCI.Indication
Fix PUCCH Format2/3/4 value to be indexed at 0, not 2.
This is according to Table 3-66 of SCF222.10.02

Add utility functions related to UCI.indication
Extra utility function to calculate allocated memory added.
2024-11-29 09:15:03 +01:00
Rúben Soares Silva
53ce0c8a24 Move functions for packing/unpacking CRC.indication
Changed parameter of `unpack_nr_crc_indication` to void* to stay inline with other unpack procedures.
Changed nfapi_p7_allocate call to calloc to avoid dependency from FAPI lib to nFAPI lib.

Add unitary test for CRC.indication( test pack/unpack, free, copy and compare )
2024-11-29 09:15:03 +01:00
Rúben Soares Silva
ff6e51879a Correctly allocate cb_crc_status for CRC.indication
Now allocates memory for `uint8_t* cb_crc_status` before pulling in unpack procedure.

Add utility functions related to CRC.indication.
Extra utility function to calculate allocated memory added.
2024-11-29 09:15:03 +01:00
Rúben Soares Silva
aeac2b0df3 Move functions for packing/unpacking RX_DATA.indication
Changed parameter of unpack_nr_rx_data_indication to void* to be inline with other unpack procedures.
Changed nfapi_p7_allocate calls to calloc to avoid dependency from FAPI lib to nFAPI lib.
Add unitary test for RX_DATA.indication( test pack/unpack, free, copy and compare )
2024-11-29 09:15:03 +01:00
Rúben Soares Silva
3ec9006f11 Allow 32 bit PDU_Length in RX_DATA.indication.
Changes pack/unpack procedure to expect pdu_length of 32 bits instead of 16.
This change was first added for compatibility with Aerial L1.

Add utility functions related to RX_DATA.indication
Extra utility function to calculate allocated memory added.
2024-11-29 09:15:03 +01:00
Rúben Soares Silva
1f6465c00a Move functions for packing/unpacking TX_DATA.request
Add unitary test for TX_DATA.request( test pack/unpack, free, copy and compare )
2024-11-29 09:15:03 +01:00
Rúben Soares Silva
04ed300df4 Remove unneeded variables from TX_DATA.request pack/unpack functions
Allocate memory for TX_DATA.request TLV value pointer on tag == 1
In the past, this wasn't noticed because tag == 1 is not used

Add utility functions related to TX_DATA.request
Add extra function to calculate allocated memory
2024-11-29 09:15:03 +01:00
Rúben Soares Silva
00145559aa Move functions for packing/unpacking UL_DCI.request
Add unitary test for UL_DCI.request ( test pack/unpack, free, copy and compare )
2024-11-29 09:15:03 +01:00
Rúben Soares Silva
c448de50d4 Improve readability in UL_DCI.request pack/unpack functions
Remove value hardcode in packing function

Add utility functions related to UL_DCI.request
2024-11-29 09:15:03 +01:00
Rúben Soares Silva
a6ab55150c Move functions for packing/unpacking SLOT.indication
Add unitary test for SLOT.indication ( test pack/unpack, free, copy and compare )
2024-11-29 09:15:03 +01:00
Rúben Soares Silva
18799ef44b Remove cast in pack_nr_slot_indication
Add utility functions related to SLOT.indication
2024-11-29 09:15:03 +01:00
Rúben Soares Silva
75f213ea92 Move functions for packing/unpacking UL_TTI.request
Add unitary test for UL_TTI.request ( test pack/unpack, free, copy and compare )

Add function rand32_range
2024-11-29 09:15:03 +01:00
Rúben Soares Silva
0653c38a9d Fix packing/unpacking procedures for UL_TTI.request
Create separate function to pack/unpack rx_beamforming PDU
Reorder PDU handling order to follow from 0 to 3
Changed PUSCH pdu_bitmap switch to separate if to handle multiple optional sub-pdus
Fix bit_len_harq size to 16 bit

Add utility functions related to UL_TTI.request
2024-11-29 09:15:03 +01:00
Rúben Soares Silva
9b8bc21d84 Move functions for packing/unpacking DL_TTI.request
Add unitary test for DL_TTI.request ( test pack/unpack, free, copy and compare )
2024-11-29 09:15:03 +01:00
Rúben Soares Silva
e3fc08ede9 Move DCI payload generation functions to new file
Create header file with DCI payload generation
functions in order for them to be available to
the remainder P7 unitary tests
2024-11-29 09:15:03 +01:00
Rúben Soares Silva
437149ae5a Fix packing/unpacking procedures for DL_TTI.request
Add pack/unpack functionality for parameters
added in previous commit
Add utility functions related to DL_TTI.request,
creating 2 news files to contain these functions
Reorder switch to follow PDU Type order
2024-11-29 09:15:03 +01:00
Rúben Soares Silva
fee7c74f0f Move ve copy function to common FAPI library 2024-11-29 09:15:03 +01:00
Rúben Soares Silva
3198b9fe30 Move utility macros to common FAPI library 2024-11-29 09:15:03 +01:00
Rúben Soares Silva
b1a2857144 Add missing parameters to DL_TTI.request PDUs 2024-11-29 09:15:03 +01:00
Rúben Soares Silva
0589923283 Add general FAPI P7 pack/unpack functions 2024-11-29 09:15:03 +01:00
Rúben Soares Silva
19f359c78d Expose P7 pack functions to P7 FAPI library
This makes it so the functions are available to both FAPI and nFAPI libraries, and to more easily move them later to the FAPI library, while being available for nFAPI
2024-11-29 09:15:03 +01:00
Rúben Soares Silva
f409b91768 Move check_nr_fapi_unpack_length to common FAPI lib
Add P7 message cases to check_nr_fapi_unpack_length
Add SLOT.response vendor extension msg id to enum
2024-11-29 09:15:03 +01:00
Rúben Soares Silva
4e5b841a16 Separate LTE and NR (n)FAPI headers
Update NR P5 and P7 nFAPI headers to have 32-bit message_length
In the NR functions, this causes the header parameters following message_length to have their position shifted by 2 bytes, due to the increase in message_length size.

Change needed to accommodate SCF222.10.02 Table 3-3

Separates nfapi_p4_p5_message_header_t and nfapi_nr_p4_p5_message_header_t

Change the callbacks signature to accept/return void* intead of expecting a particular header type, being the NR/LTE distinction done inside the callback functions.

Create NR related functions for nFAPI transmit timestamp and checksum calculation.

Move nfapi_p7_codec_config_t and nfapi_p4_p5_codec_config_t to separate header to be shared between LTE and NR VNF/PNF

Move nfapi_nr_timing_info_t into NR header.

Move NR specific function declarations to NR header.
2024-11-29 09:15:03 +01:00
Rúben Soares Silva
434a6b5e84 Apply Clang-Format to nFAPI P5 and P7 header structures. 2024-11-29 09:15:03 +01:00
Rúben Soares Silva
37ace26f83 Expose TX_DATA.request functions
Expose pack/unpack functions for TX_DATA.request
for usage in P7 FAPI library
2024-11-29 09:15:03 +01:00
Rúben Soares Silva
91279388b8 Creation of empty FAPI P7 library for separation of related functions.
Note: Dependency in NFAPI_LIB and NFAPI_USER_LIB to be removed later
2024-11-29 09:15:03 +01:00
Rúben Soares Silva
8a185cff69 Move P5 general packing/unpacking function declaration into nr_fapi_p5 header.
Fix Assert condition to properly check that body was packed successfully
Fix retval value when performing bitwise AND with push16
Remove commented code
2024-11-29 09:15:03 +01:00
Robert Schmidt
c679112f50 Remove useless global variable
Remove dummy_subframe variable, which is initialized once in
start_request() and then copied to memory on the heap. It is not needed.

In nr_start_request(), it should not be necessary, but we keep it for
the moment to not make more changes than necessary.

This avoids a segfault for me, but I am not exactly sure why.
2024-11-29 09:15:03 +01:00
Robert Schmidt
a9da755338 nfapi pack/unpack: OAI only supports 14 symbols
All packing was wrong and used 12 instead of 14 symbols. However, as of
now and my knowledge, OAI only supports 14 symbols.
2024-11-29 09:15:03 +01:00
Robert Schmidt
ae69028050 Test one specific TDD configuration
The previous code fills random number in the TDD config, which leads to
unrealistic TDD patterns. Filling wtih a specific, realistic TDD config
allowed to fix the bug in the next commit.
2024-11-29 09:15:03 +01:00
Robert Schmidt
dbfb806afa Scheduler: Avoid out-of-bounds read/write
The scheduler might receive PUSCH data when it does not expect it.
Handle this case.
2024-11-29 09:15:03 +01:00
Robert Schmidt
f1fb797ff6 Increase max nFAPI packed message size to 32768
Testing showed that some messages could be at least slightly bigger than
the previous maximum size of 8192. Given that the maximum transport
block could be larger, increase this value to 32768.
2024-11-29 09:15:03 +01:00
Robert Schmidt
a12fdb68b7 unpack_dl_tti_ssb_pdu_rel15_value(): match pack function
unpack_dl_tti_ssb_pdu_rel15_value() reads two additional bytes,
seemingly for RX power information. However, table 3-79 does not
contain such info, so I remove to match the corresponding pack function
pack_dl_tti_ssb_pdu_rel15_value().

TODO: tx power info relevant?
2024-11-29 09:15:03 +01:00
Robert Schmidt
0cc08b1070 Correct pucch_pdu->bit_len_harq: is pull8 according to SCF 222.10 2024-11-29 09:15:03 +01:00
Robert Schmidt
179302496b Fix PNF packing functions to match existing VNF unpacking 2024-11-29 09:15:03 +01:00
Robert Schmidt
cbecc3432a Correct UL_tti.request messages
- Unpack is missing pusch_identity
- Unpack: put rb_bitmap instead of resource_alloc, remove dmrs_ports

In both cases, bring it in line with packing
2024-11-29 09:12:56 +01:00
Robert Schmidt
5e72bd70bc nfapi: Fixup BG (un)packing and error message 2024-11-29 09:12:55 +01:00
Romain Beurdouche
f1d9638e37 Add note to 'doc/README.md' to insight readers to checkout the documentation at their version of the repository. 2024-11-29 09:12:55 +01:00
Romain Beurdouche
71d91b0542 Add notes around sample SA gNB and nrUE commands in most basic tutorials 'NR_SA_Tutorial_COTS_UE.md' and 'NR_SA_Tutorial_OAI_nrUE.md'.
The notes mention that for versions previous to 2024.w45, the --sa argument should be added to run in SA mode.
2024-11-29 09:12:55 +01:00
Robert Schmidt
535c8a496a Reformulate section on standalone mode
Since tag 2024.w45/commit f54ca5714e,
standalone mode/--sa is the default and does not exist. Correspondingly,
it has been removed from the documentation.

For users reading recent documentation, but running an older version of
OAI, there might be a mismatch in that --sa is necessary to run OAI, but
not given in the documentation. Provide explanatory text to make users
aware of this.
2024-11-29 09:12:55 +01:00
Robert Schmidt
a61b5f303d Merge remote-tracking branch 'origin/NR_remove_ul_harq_ra_warning' into integration_2024_w48 (!3133)
NR UL HARQ handling improvements

to avoid printing warning on unexpected HARQ PID for RA
2024-11-28 18:50:20 +01:00
Robert Schmidt
ce9aaa8f53 Merge remote-tracking branch 'origin/improve-chanest-single-antenna' into integration_2024_w48 (!3132)
Run the last job of gNB pusch channel estimation inline

In case of 1 antenna this prevents the usage of threadpool which
eliminates the thread pool overhead.  In case of >1 antenna the
threadpool contention should be reduced providing smaller benefits.
2024-11-28 18:49:52 +01:00
Robert Schmidt
0d63641019 Merge remote-tracking branch 'origin/NR_RR_UE_phy_test_t304' into integration_2024_w48 (!3128)
NR UE RRC T304 in phy-test mode

RRC timer T304 is stopped upon completion of the associated RA handover
procedure. There is no RA procedure in phy-test mode so T304 should not
be started to avoid unwanted expiration.
2024-11-28 18:49:30 +01:00
Robert Schmidt
57c20d891d Merge remote-tracking branch 'origin/NR_gNB_MSG3_fix' into integration_2024_w48 (!3126)
NR MSG3 scheduling improvements

- fix wrong condition on MSG3 allocation assertion message
- remove assertion altogether and handle properly the case where MSG3
  can't be allocated
2024-11-28 18:49:04 +01:00
Robert Schmidt
e898d278cc Merge remote-tracking branch 'origin/f1ap-lib-minor-fixes' into integration_2024_w48 (!3117)
F1AP lib: minor fixes

- add new enc/dec functions
- extend copy function scope
- add compile define
- fix equality check
2024-11-28 18:48:36 +01:00
Robert Schmidt
a8081914fb Merge remote-tracking branch 'origin/t2-fix-4x4' into integration_2024_w48 (!3115)
T2: minor fix for 4x4 processing

- correct max number of LDPC segments for T2 processing
- use pointer arithmetics in retrieve_ldpc_enc_op() in T2 lib to
  optimize loop processing
2024-11-28 18:47:40 +01:00
Robert Schmidt
7a7e574998 Merge remote-tracking branch 'origin/e1ap-msg-encdec-tests' into integration_2024_w48 (!2985)
E1AP Bearer Context Setup encoding/decoding library and unit tests

E1AP encoding/decoding library (TS 38.463) and unit test for:
- E1 Bearer Context Setup Request
- E1 Bearer Context Setup Response
2024-11-28 18:47:07 +01:00
Robert Schmidt
bbc35c7a0e Merge remote-tracking branch 'origin/tracy-profiler' into integration_2024_w48 (!2951)
Integrate Tracy with NR UE

This commit enables the optional use of Tracy for profiling NR UE. See
https://github.com/wolfpld/tracy/releases/tag/v0.11.1 for details.

More instructions are in the commit.
2024-11-28 18:46:35 +01:00
francescomani
31d19ec38d fixes for handle_nr_ul_harq in case of RA
to avoid printing warning on unexpected harq pid
2024-11-28 09:24:10 +01:00
Bartosz Podrygajlo
97269a9d2d Update nr-ue-design.md
Add information about newly added actors to NR UE.
2024-11-27 18:15:30 +01:00
Bartosz Podrygajlo
afdf5aa49b Increase number of DL Actors to 4
This increases the number of concurrent DL slots processed from 2 to 4.
2024-11-27 18:15:30 +01:00
Bartosz Podrygajlo
6bd50d6e5a Use DL actor for UE_dl_processing instead of thread pool 2024-11-27 18:15:30 +01:00
Bartosz Podrygajlo
3b7c29f2d3 Actor model imlementation
Add actor library which implements the Actor model (see  https://en.wikipedia.org/wiki/Actor_model).
2024-11-27 18:15:24 +01:00
Bartosz Podrygajlo
654cffe39f Do not start processSlotTx before it is ready to run.
Implement run-to-completion for processSlotTX. This is achieved by using a new
dynamic_barrier_t which allows to specify callback after the first join has been
made.
2024-11-27 18:14:59 +01:00
Bartosz Podrygajlo
ea0ea2ff8f Thread barrier implementation
This commit introduces dynamic_barrier_t. Its a thread barrier that counts joins
but allows callback to be specified later. See std::barrier for a basic barrier
description.
2024-11-27 18:14:59 +01:00
Bartosz Podrygajlo
e5b19ad121 Run the last job of gNB pusch channel estimation inline
In case of 1 antenna this prevents the usage of threadpool which eliminates
the thread pool overhead.
In case of >1 antenna the threadpool contention should be reduced providing
smaller benefits.
2024-11-27 18:01:21 +01:00
Guido Casati
3dd177bbce Use calloc_or_fail in f1ap_lib_test with the explicit size derived from pointer dereferencing 2024-11-27 10:40:10 +01:00
Guido Casati
0bcf504209 Fix equality check in eq_f1ap_setup_failure 2024-11-27 10:40:10 +01:00
Guido Casati
7ae020599a Add compile definitions ENABLE_TESTS
* this is necessary to enable the PRINT_ERROR logs in the E1/F1 libs
2024-11-27 10:40:10 +01:00
Guido Casati
a05084de95 Extend the scope of free_f1ap_cell and use it in stack 2024-11-27 10:40:10 +01:00
Guido Casati
22f3476d88 Use copy_f1ap_served_cell_info in update_cell_info
* tac is optional IE, and it was assumed as always present
* is now allocated in DU container by copy_f1ap_served_cell_info
  when present in the updated cell info and missing in the
  DU container
2024-11-27 10:40:10 +01:00
Guido Casati
40cc035b8c Extend the scope and refactor copy_f1ap_served_cell_info
* allocate memory for pointers only if necessary
* removed redundant copies of simple data types
2024-11-27 10:40:10 +01:00
Guido Casati
a394a40d5d Add and use F1 encode function for Transmission Bandwidth and NR Frequency Info in F1 interface management lib 2024-11-27 10:40:10 +01:00
francescomani
5c69623576 remove assertion in MSG3 allocation to handle the unwanted scenario by reschedulng RA 2024-11-27 10:19:21 +01:00
francescomani
b398b1bd1d fix MSG3 allocation assertion condition 2024-11-27 10:19:17 +01:00
Guido Casati
927b157714 Add test for E1 Bearer Context Setup Response 2024-11-27 10:18:20 +01:00
Guido Casati
10b07c774d Use enc/dec lib for E1 Bearer Context Setup Response in stack 2024-11-27 10:18:19 +01:00
Guido Casati
d56e8a2de1 Add enc/dec library for E1AP Bearer Context Setup Response 2024-11-27 10:17:46 +01:00
Guido Casati
ccab22f41f Add test for E1AP Bearer Context Setup Request enc/dec library 2024-11-27 10:17:46 +01:00
Guido Casati
254a0e9ad5 Use E1AP Bearer Context Setup Request enc/dec library in stack 2024-11-27 10:17:46 +01:00
Guido Casati
e439a4359c Add enc/dec library for E1AP Bearer Context Setup Request 2024-11-27 10:17:46 +01:00
Guido Casati
2a1f5ac5ed Introduce library for E1AP message encoding/decoding 2024-11-27 10:17:46 +01:00
Guido Casati
ac8da484db Replace cell_group_t with CELL_GROUP_ID_t
* simplified number of Cell Group types
2024-11-27 10:17:46 +01:00
Guido Casati
aae05e95b9 Use sizeof(in_addr_t) in memcpy of TL uint32_t address 2024-11-27 10:17:46 +01:00
Guido Casati
4829fa0543 Refactor E1AP Bearer Context Setup Request struct members
* cleanup struct members not compliant to specs 3GPP TS 38.463
* add defines whenever necessary
2024-11-27 10:17:46 +01:00
Guido Casati
13d1c34d35 Use one definition of maxnoofDRBs according to 3GPP TS 38.463 (up to 32)
* define E1AP_MAX_NUM_DRBS
2024-11-27 10:17:46 +01:00
Guido Casati
b00f095089 Fix bug (missing parenthesis) in hton_int16 2024-11-27 10:17:46 +01:00
Guido Casati
04491efb3c Cleanup unused conversions 2024-11-27 10:17:46 +01:00
francescomani
6c0c27a201 do not start T304 RRC timer at UE for phy-test mode 2024-11-27 10:12:55 +01:00
Robert Schmidt
03946cd47b Merge branch 'integration_2024_w47' into 'develop'
Integration: `2024.w47`

See merge request oai/openairinterface5g!3120

* !2972 Parallelize PUSCH channel estimation
* !3105 Fix a small bug with total_res in gNB PUSCH symbol processing
* !2996 Ue monitoring stats
* !3122 Avoid assert on non-implemented SM write callback
* !3110 Fronthaul 7.2 improvements (1. step towards M-plane integration)
* !2966 Refactor of includes in gNB/UE for improved header management
* !3123 Reduce double-usage of CI XML files
* !3029 NR UE RRC reconfiguration improvements
* !2670 chore(ci): adding Flexric-RAN integration test
* !3124 CI: use OC CN in aerial pipeline
2024-11-27 08:16:32 +00:00
Jaroslava Fiedlerova
b8b4057e9c Merge remote-tracking branch 'origin/ci-aerial-change-cn' into integration_2024_w47 (!3124)
CI: use OC CN in aerial pipeline

Replace CN host on Aerial CI pipeline (Porcepix) with OC.
2024-11-26 11:37:45 +01:00
Jaroslava Fiedlerova
d337304e13 Merge remote-tracking branch 'origin/ci-flexric-integration-test' into integration_2024_w47 (!2670)
chore(ci): adding Flexric-RAN integration test

- Triggering a standalone FLEXRIC + 5G-RAN pipeline: OAI-FLEXRIC-RAN-Integration-Test
  - will be triggered by the RAN-Container-Parent
  - but also by the OAI-FLEXRIC pipeline (to be done once integrated)
- Added an new python option: --FlexRicTag= than if not used, won't have any effect
- Nice addition:
  - if --FlexRicTag=develop or --ranCommitID=develop  --> will use the latest commit
    on either dev or develop branch.
- Scenario-wise
  - Using the cn5g deployment file from Luis in documentation, at least we will use
    it to make sure it is working at all time
- We can add more test and especially checkers on the flexric calls

Linked to !3085 (merged)
2024-11-26 10:53:17 +01:00
Jaroslava Fiedlerova
dbc8fd4956 CI: increase timeout for OC CN deployment
Occasionally, the CN deployment takes longer than 60 seconds to complete
successfully. As a result, the CI reports failure, even when all other test
stages pass (e.g., gNB attaches to the CN, UE connects, and iperf tests succeed).
2024-11-26 10:29:14 +01:00
Jaroslava Fiedlerova
bbfd3c6174 CI: use OC CN in aerial pipeline
Replace current docker deployment of OAI CN by deployment on OC. With change
of the CN, we also need to change the routing for UE module - change the
mbim script for controling the UE.
2024-11-26 10:26:25 +01:00
Raphael Defosseux
14c0d6b347 CI: Add FlexRIC test 2024-11-26 09:44:23 +01:00
Jaroslava Fiedlerova
683a39c982 Merge remote-tracking branch 'origin/NR_UE_RRC_Reconfiguration_improvements' into integration_2024_w47 (!2996)
Improvements in handling RRC Reconfiguration at UE
2024-11-26 09:39:44 +01:00
Jaroslava Fiedlerova
8b7b918c49 Merge remote-tracking branch 'origin/ci-reduce-duplicate-xml-usage' into integration_2024_w47 (!3123)
Reduce double-usage of CI XML files

Some pipelines use the same XML files. For instance,
RAN-NSA-B200-Module-LTEBOX-Container and RAN-LTE-{TDD,FDD}-LTEBOX-Container
use both fr1_epc_{closure,start}.xml, but use the core network on different
hosts, by means of different pipeline configuration (EPCtype, etc).

A future MR will remove these additional pipeline configuration, and store
all the CN config in the repository. To simplify the transition, duplicate
some XMLs (i.e., remove duplicate usage of them).

After this MR, the only "double usage" of XML files for core (un-)deployment
should be through pipelines RAN-LTE-{TDD,FDD}-LTEBOX-Container.
2024-11-26 09:32:20 +01:00
Jaroslava Fiedlerova
a9060cd382 Merge remote-tracking branch 'origin/nr-cleanup-includes' into integration_2024_w47 (!2966)
Refactor of includes in gNB/UE for improved header management

This merge request implements changes suggested by the Include What You Use
(IWYU) open source tool to streamline the project’s header file usage.

The adjustments ensure that each file includes only the necessary headers for
the symbols it uses, making the code more efficient and maintainable.
Unnecessary includes have been removed, and missing headers have been added
where required. This improves modularity and reduces inter-dependencies between
files, helping to avoid future build issues caused by unused or missing includes.

Each output has been manually reviewed.

Followed a similar approach as in !2953 (merged).

Affected folders/files:

- NR_MAC_gNB/main.c
- nr-softmodem.c
- unitary simulators: nr_dlsim, nr_ulsim, prachsim
- openair2/RRC/NR
- openair3/NGAP
- openair2/LAYER2/nr_pdcp
- openair2/SDAP/nr_sdap
2024-11-26 09:26:28 +01:00
Robert Schmidt
566dad62c2 Duplicate sa_cn5g_{start,closure}.xml
Duplicate these files with the same reasons as in PARENT.
2024-11-26 08:44:19 +01:00
francescomani
3c6a588ed7 reworking scheduling of SIB other than 1, including storing the information at MAC 2024-11-25 17:23:32 +01:00
francescomani
216c42358b remove unnecessary storage of SIBs structures at RRC 2024-11-25 17:23:27 +01:00
Jaroslava Fiedlerova
e04ff5efb0 Merge remote-tracking branch 'origin/fhi-72-improvements' into integration_2024_w47 (!3110)
Fronthaul 7.2 improvements (1. step towards M-plane integration)

- added explanations for each parameter used for XRAN library
- added new config files for VVDN, Benetel 550 and Metanoia RUs
- changed config file for Benetel 650
- deleted 8x8 650-550, and added 8x8 650-650 config file
- updated FHI README
  - setting one or more VFs; compatibility with Mellanox NIC as well
  - fhi_72 section
2024-11-25 16:42:31 +01:00
Jaroslava Fiedlerova
f36eda1608 Merge remote-tracking branch 'origin/ran-func-no-assert' into integration_2024_w47 (!3122)
Avoid assert on non-implemented SM write callback

The asserts might be used to intentionally stop the running process.
Further, it might be an annoyance if it happen unintentionally. Just
print an error message instead.
2024-11-25 16:41:10 +01:00
Robert Schmidt
7bf706bc9a CI: harmonize pull/clean with flexric hack
If we are pulling FlexRIC, overwrite the tag to use with what has been
provided on the command line. This is because we hardcode the tag schema
"branchname-commitId[0:8]" everywhere else, but this does not apply for
FlexRIC, and we have to overwrite this here.
2024-11-25 15:33:41 +01:00
Robert Schmidt
010a23863c CI: Add a testcase for testing pull/clean functionality
The testcase will only be executed when the registry at
porcepix.sboai.cs.eurecom.fr is actually reachable.
2024-11-25 15:33:41 +01:00
Robert Schmidt
644990a225 CI: Clean_Test_Server_Images(): harmonize code
- pass parameter directly instead of indirectly via class
- harmonize to svr_id to read through common code in the next commits
- pass images to express which images will be deleted
- refactor function to use "with" for cls_cmd, and return success (or
  not)
2024-11-25 15:33:41 +01:00
Robert Schmidt
74317e805d CI: PullClusterImage(): harmonize code
- reuse cls_containerize.Containerize.PullImage()
- pass parameter directly instead of indirectly via class
- always read node name and use this instead of "sometimes" looking it
  up from a class member. With "sometimes" I mean that if no node name
  is given, it will take it from self.eNBIPAddress, which is confusing
  at best if we can give the node name directly
- consistently put the node name in the xml file
2024-11-25 15:33:41 +01:00
Robert Schmidt
dee9ce26db CI: Pull_Image_from_Registry(): harmonize code
- pass parameter directly instead of indirectly via class
- call it simply "images", to harmonize with clean-function later
- harmonize to svr_id as in the previous commit
- rewrite function to use with-statement with cls_cmd
- optionally pass a tag to use (which will be used in a test, and can be
  used to pull flexric)
- Introduce Pull_Image() which does the actual pulling, can pull from
  any registry, and will be reused in the case of pulling from cluster.
2024-11-25 15:33:41 +01:00
Teodora
b334feb92b Update gNB fhi_72 configuration steps in README 2024-11-25 14:40:25 +01:00
Teodora
b55ee54183 Update steps for configuring VF(s) in README
- add option to configure one or two VFs
  - add support for Mellanox NIC
2024-11-25 14:40:19 +01:00
Guido Casati
44c9dec681 Add test for NAS Service Request enc/dec 2024-11-25 13:15:10 +01:00
Guido Casati
6faa5d3066 Refactor TLVEncoder
* deleted unused TLVEncoder.c
* removed dependency from LOG module in TLVEncoder Macros
2024-11-25 13:15:10 +01:00
Guido Casati
ad412028a2 Refactor TLVDecoder macros
* ideally the result of these macros shall be relevant
  only in unit tests, in order to validate enc/dec NAS functions
* use a local print macro
* remove dependency from LOG module
* simplified the code
* cleanup TLVDecoder.c (kept it for LTE dependencies)
2024-11-25 13:15:10 +01:00
Guido Casati
1c4e1029a8 Add NAS Service Request enc/dec functions
* FGMM enc/dec library files
* Plain message encoding + logic for security protected message
* added fill_fgstmsi function
* add checks on length in 5G-S-TMSI encoder function
* encoding of NAS Service Request and relevant mandatory IEs
2024-11-25 13:15:10 +01:00
Guido Casati
c817c44ae9 Add include for stdbool.h in FGSMobileIdentity.c 2024-11-25 13:15:10 +01:00
Guido Casati
29220a60dc Add check on minimum length in encode_5gs_mobile_identity 2024-11-25 13:15:10 +01:00
Guido Casati
bf7761131d Refactor NAS Key Set Identifier enc/dec functions
* simplified the code while keeping same functionality
* reduced the number of functions (from 4 to 2)
* clang-formatted
2024-11-25 13:15:10 +01:00
Guido Casati
5c3953b684 Cleanup test5Gnas.c and MAC references in NR_NAS_defs.h (undefined functions prototypes) 2024-11-25 13:15:10 +01:00
Guido Casati
8a7321db11 Rename FGS Service Request/Reject/Accept type for consistency with FGS naming style 2024-11-25 13:15:10 +01:00
Jaroslava Fiedlerova
5b6e16c8e7 Merge remote-tracking branch 'origin/ue-monitoring-stats' into integration_2024_w47 (!2996)
Ue monitoring stats

- one commit to add UE mac stats similar to gNB one and remove a partial
implementation at phy level of some counters
- second commit only rename the two UE persisted HARQ tyepdef names for DL
and for UL (one was saying "UE" but not the direction and the second the
direction but not "UE")
2024-11-25 11:27:22 +01:00
Robert Schmidt
500f37d10e Avoid assert on non-implemented SM write callback
The asserts might be used to intentionally stop the running process.
Further, it might be an annoyance if it happen unintentionally. Just
print an error message instead, and return to FlexRIC that nothing is to
be sent.
2024-11-25 11:02:13 +01:00
francescomani
086ac79830 improvements in handling reconfigurationWithSync 2024-11-25 10:35:05 +01:00
francescomani
9ca0b133ec resume RBs in 1st reconfiguration after reestablishment 2024-11-25 10:35:05 +01:00
francescomani
9a4f12b881 handling dedicated system information via RRC Reconfiguration 2024-11-25 10:35:05 +01:00
francescomani
59403e5b01 adding assertion for reportUplinkTxDirectCurrent 2024-11-25 10:35:05 +01:00
francescomani
2beb7fd8a8 adding error messages for field not handled yet by RRC UE in Reconfiguration 2024-11-25 10:35:05 +01:00
francescomani
1867aa928a remove unnecessary declaration of nr_rrc_ue_process_rrcReconfiguration 2024-11-25 10:35:05 +01:00
Robert Schmidt
559fdf106c Duplicate fr1_epc_{closure,start}.xml
The CI pipeline RAN-NSA-B200-Module-LTEBOX-Container uses the same core
network (ltebox) as the pipelines RAN-LTE-{TDD,FDD}-LTEBOX-Container,
triggered through the same XML files. However, the core networks are on
different hosts, configured through (Jenkins) pipeline configuration. A
future MR will move the entire core network configuration into the XML
files [1]. To facilitate this, create separate XML files for the NSA
pipeline.

[1] The advantage is that it will be easier to reason with only the XML
files what is going to be run where and how.
2024-11-25 10:31:04 +01:00
Jaroslava Fiedlerova
2f27839515 T2: Rework retrieve_ldpc_enc_op() 2024-11-22 17:37:36 +01:00
Jaroslava Fiedlerova
e531043128 Merge remote-tracking branch 'origin/fix-extraneous-threadpool-tasks' into integration_2024_w47 (!3105)
Fix a small bug with total_res in gNB PUSCH symbol processing

Replaced total_res with res_per_task when deciding whether to start a threadpool
task or not. This does not have big impact on the software as the
nr_pusch_symbol_processing will recheck ul_valid_re_per_slot anyway but it may
reduce the number of thread pool tasks created.
2024-11-22 15:50:40 +01:00
Jaroslava Fiedlerova
45fff9fc0f Merge remote-tracking branch 'origin/dmrs_channel_estimation_parallelization' into integration_2024_w47 (!2972)
Parallelize PUSCH channel estimation

This MR adds PUSCH channel estimation parallelization which reduces the
processing time. It also adds time measurements for each antenna and makes
num_antennas_per_thread configurable in nr_ulsim and the gNB config file.

Some results:

- **273 PRBs 4 antennas** `./nr_ulsim -n200 -m25 -s40 -S40 -q1 -R273 -r273 -z4 -P`

| Number of threads | ULSCH channel estimation time (us) develop| ULSCH channel estimation time (us)| Antenna Processing time (us) |
| ------            | ------                                    | ------                            | ------ |
| 0                 | 194.06                                    |193.17                             |  134.82|
| 2                 | 194.88                                    |154.02                             |  93.43 |
| 4                 | 195.23                                    |134.27                             |   72.71|
- **273 PRBs 8 antennas** `./nr_ulsim -n200 -m25 -s40 -S40 -q1 -R273 -r273 -z8 -P`

| Number of threads | ULSCH channel estimation time (us) develop| ULSCH channel estimation time (us)| Antenna Processing time (us) |
| ------            | ------                                    | ------                            | ------ |
| 0                 | 387.93                                    |384.99                             |  269.39|
| 2                 | 388.10                                    |279.47                             |  161.32|
| 4                 | 387.47                                    |225.37                             |  106.52|
| 8                 | 390.53                                    |204.48                             |   83.74|

- **106 PRBs MIMO 4 layers** `./nr_ulsim -n100 -m9 -r106 -s10 -W4 -y4 -z4 -P`

| Number of threads | ULSCH channel estimation time (us) develop| ULSCH channel estimation time (us)| Antenna Processing time (us) |
| ------            | ------                                    | ------                            | ------ |
| 0                 | 263.20                                    |268.97                             |  57.49 |
| 2                 | 263.90                                    |252.61                             |  51.22 |
| 4                 | 264.17                                    |192.49                             |  36.29 |
2024-11-22 15:48:12 +01:00
Robert Schmidt
68191088ab Add v2.2.0 release notes 2024-11-22 14:46:10 +01:00
Robert Schmidt
ce5e674bd2 Add link from F1 design to handover tutorial 2024-11-22 14:05:27 +01:00
Robert Schmidt
756199c98f Add missing links from doc/README.md to documentation 2024-11-22 14:05:27 +01:00
Teodora
4ed939e4a9 Correct CI VVDN 4x4 100MHz config file 2024-11-22 12:51:46 +01:00
Teodora
6a810f154d Correct CI Benetel 550 4x4 100MHz config file 2024-11-22 12:51:46 +01:00
Teodora
d27dd1554d Change 8x8 100MHz Benetel config file
- 650-550 config file deleted
  - 650-650 config file added
2024-11-22 12:51:46 +01:00
Teodora
1121d86e76 Change 4x4 100MHz Benetel 650 config file 2024-11-22 12:51:46 +01:00
Teodora
c2d169094f Add 4x4 100MHz Metanoia config file 2024-11-22 12:51:46 +01:00
Teodora
6dfa051ecd Add 4x4 40MHz VVDN config file 2024-11-22 12:51:46 +01:00
Teodora
83367ee7ff Add 2x2 100MHz VVDN config file 2024-11-22 12:51:46 +01:00
Teodora
cd259132f1 Add 4x2 100MHz Benetel550 config file 2024-11-22 12:51:46 +01:00
Teodora
c58ab971af Update fhi_72 section in config files 2024-11-22 12:51:46 +01:00
Teodora
d246520f77 Correct LITEON config file
- remove useless whitespaces
  - add comments for used frequencies
2024-11-22 12:51:46 +01:00
Teodora
31613ec8bc Correct VVDN config file
- add frequency values (center frequency, SSB and point A)
  - CN interface fixed
  - adjust puxch_TargetSNRx10, and ru_thread_core
2024-11-22 12:51:46 +01:00
Teodora
306e7538d9 Correct Benetel550 config file
- match PLMN to CN
  - correct frequency point A to match desired center frequency
  - adjust puxch_TargetSNRx10
2024-11-22 12:51:46 +01:00
Teodora
f30453968f xran integration improvements
- identification of each parameter in fh_init and fh_config structs
  - identification of unused parameters in xran library
  - identification of parameters used for CAT A O-RU
  => CAT B not supported in this release
2024-11-22 12:51:39 +01:00
Robert Schmidt
a48728ba35 CI: Push_Image_to_Local_Registry(): harmonize code
- pass parameter directly instead of indirectly via class
- harmonize to svr_id to harmonize parameter with parameters in the next
  commit (and towards a future harmonization of directly taking node
  names instead of "IDs")
2024-11-22 08:23:48 +01:00
Raphael Defosseux
3e51fcdf33 CI: Provide possibility to pass in flexricTag 2024-11-22 08:23:48 +01:00
Raphael Defosseux
df9aec167e CI: Allow ranCommitID to be "develop"
This will be used to pull images with the tag "develop" (i.e., without a
commit ID).
2024-11-22 08:23:48 +01:00
Raphael Defosseux
5730df9ffc CI: Avoid python warning about wrong escape sequence 2024-11-22 08:23:48 +01:00
Raphael Defosseux
d00a614d4e CI move log folder creation right away at deployment time
Some commands might use that folder before Ping/Iperf, in which it has
been created.
2024-11-22 08:23:48 +01:00
Raphael Defosseux
cf870d7ae9 CI: Make output for .env test less verbose 2024-11-22 08:23:48 +01:00
Robert Schmidt
a80c17cc31 CI: Remove useless parameter 2024-11-22 08:23:48 +01:00
Raphael Defosseux
5f1219bc32 CI GetContainerHealth(): speed up checks 2024-11-22 08:23:44 +01:00
Laurent THOMAS
65e3c89bb1 add ue mac stats and monitoring as per gnb ones 2024-11-21 16:39:19 +01:00
Robert Schmidt
530f96278d Rearrange FHI architecture to support M-plane
Co-authored-by: Teodora <teodora.vladic@openairinterface.org>
2024-11-21 13:37:46 +01:00
Robert Schmidt
d0b637a020 Merge branch 'doc-sa-use' into 'develop' (!3113)
Reformulate section on standalone mode

Clarifications on when (or if) to use --sa
2024-11-21 08:38:48 +00:00
Romain Beurdouche
f885bd336a Add note to 'doc/README.md' to insight readers to checkout the documentation at their version of the repository. 2024-11-21 08:18:08 +01:00
Robert Schmidt
ba0cad20e6 Move respPuschAarx response queue to stack of nr_pusch_channel_estimation()
The queue for finished jobs of PUSCH channel estimation is only used inside
nr_pusch_channel_estimation(). Since initialization is fast, it can be
declared on the stack in the function where it is used.
2024-11-20 16:30:39 +01:00
Bartosz Podrygajlo
35903f9a10 Integrate Tracy with NR UE & gNB
This commit enables the optional use of Tracy for profiling NR UE & gNB.
See https://github.com/wolfpld/tracy/releases/tag/v0.11.1 for details.

How to compile:
use -DTRACY_ENABLE=ON to enable instrumentation and sampling
For gNB currently only sampling is implemented.

How to collect data:
 - Windows hosts: tracy-profiler.exe in link above
 - Linux hosts: Compile tracy-profiler from source

Enabling collection from docker:
 - open port 8086
 - to collect cpu data
    --privileged
    --mount "type=bind,source=/sys/kernel/debug,target=/sys/kernel/debug,readonly"
    --user 0:0
    --pid=host

How to add instrumentation:
 - See examples in this commit or manual in the link above.
2024-11-20 10:42:51 +01:00
Jaroslava Fiedlerova
0021b69645 Optimize memory usage in decode_offload function
- Reduce the size of z_ol to LDPC_MAX_CB_SIZE to reduce memory footprint.
- Simplify memcpy and pointer casting for z_ol.
2024-11-20 10:39:09 +01:00
Jaroslava Fiedlerova
42b544cda9 Correct max number of LDPC segments for T2 processing
Fix error reported by the T2 card when running nr_dlsim with 4 DL layers.
Error can be reproduced by running:
./nr_dlsim -n100 -s30 -e25 -b273 -R273 -x4 -z4 -y4 -P --ldpc_offload.dpdk_dev 41:00.0 -c

So far we set NR_LDPC_MAX_NUM_CB to 72, which is sufficient for max 2 DL layers.
Set max possible number of LDPC segments based on the max number of layers
and max number of DLSCH segments (currently it is 144).
2024-11-19 16:15:25 +01:00
Romain Beurdouche
75cde75fa4 Add notes around sample SA gNB and nrUE commands in most basic tutorials 'NR_SA_Tutorial_COTS_UE.md' and 'NR_SA_Tutorial_OAI_nrUE.md'.
The notes mention that for versions previous to 2024.w45, the --sa argument should be added to run in SA mode.
2024-11-19 09:56:44 +01:00
Robert Schmidt
5d1c0aaab7 Merge branch 'integration_2024_w46' into 'develop'
Integration: `2024.w46`

See merge request oai/openairinterface5g!3106

* !3095 UE: Set default SSB config
* !2991 fix BSR report malformed, add SHORT BSR when it can (instead of LONG BSR)...
* !3104 Trigger deregistration only in SA mode → small fixup?
* !3107 Clip the input for -32768 because this will make different result in...
* !3109 T tracer: support float types in traces
* !2777 NR UE trigger for re-establishment
* !3108 Prevent segfaults in gNB stack
* !3059 Test for init_RA
* CI: increase UE thread pool size
* !3036 Further improvements in analog beam management for CSI-RS
* !3093 Added NTN FDD FR1 bands defined in 3GPP TS 38.101-5
2024-11-19 08:31:11 +00:00
Jaroslava Fiedlerova
0c3a2c157d Merge remote-tracking branch 'origin/NTN_FR1_bands' into integration_2024_w46 (!3093)
Added NTN FDD FR1 bands defined in 3GPP TS 38.101-5

Added support for NTN FDD FR1 bands 254, 255, 256 as specified in 3GPP
TS 38.101-5. Example Conf files added for band254 for 15Khz, 5Mhz and
30Khz, 10Mhz configurations. Tested NTN GEO configuration on band 254
using these conf files.
2024-11-18 17:30:49 +01:00
Jaroslava Fiedlerova
e5fda698ba Merge remote-tracking branch 'origin/enabling_CSIRS_analog_beamformiing_l1_handling' into integration_2024_w46 (!3036)
Further improvements in analog beam management for CSI-RS
2024-11-18 17:29:02 +01:00
Robert Schmidt
77b57bc2d6 CI: increase UE thread pool size
There seem to be randomly occurring deadlocks when running the UE in the
CI. MR !3091 should fix this. While waiting for this, apply a workaround
by increasing the number of worker pools in the UE to 12.
2024-11-18 17:20:39 +01:00
Robert Schmidt
ba78dc3581 Reformulate section on standalone mode
Since tag 2024.w45/commit f54ca5714e,
standalone mode/--sa is the default and does not exist. Correspondingly,
it has been removed from the documentation.

For users reading recent documentation, but running an older version of
OAI, there might be a mismatch in that --sa is necessary to run OAI, but
not given in the documentation. Provide explanatory text to make users
aware of this.
2024-11-18 16:42:26 +01:00
Jaroslava Fiedlerova
06e1c3bc17 Merge remote-tracking branch 'origin/nr-ue-ra-testcase' into integration_2024_w46 (!3059)
Test for init_RA

A testcase for init_RA function.
The testcase redefines the following functions as stubs:

- nr_mac_rrc_ra_ind
- nr_write_ce_ulsch_pdu
- mac_rlc_data_req
- lockGet_ul_config
- release_ul_config
- remove_ul_config_last_item
- nr_ue_configure_pucch

These stubs can be used to check init_RA behavior
2024-11-18 16:21:03 +01:00
Jaroslava Fiedlerova
400656715a Merge remote-tracking branch 'origin/fix-segfault-multi-ue' into integration_2024_w46 (!3108)
Prevent segfaults in gNB stack

Three fixes for segfaults, discovered while running with many UEs.
See commit messages for more details.
2024-11-18 13:06:29 +01:00
Guido Casati
1679be6a14 Refactor includes in gNB config
* used open source IWYU tool + manual review
2024-11-18 11:25:02 +01:00
Guido Casati
83a4b4df64 Refactor includes in NR_PHY_INTERFACE
* used open source IWYU tool + manual review
2024-11-18 11:25:02 +01:00
Guido Casati
37e856a7fd Add include for MAX_ANT
* to defs_gNB.h, nr_dlsch_demodulation.c
2024-11-18 11:25:02 +01:00
Guido Casati
ca96ea7002 Updated iwyu/README.md 2024-11-18 11:25:02 +01:00
Guido Casati
bfe7b803fe Refactor includes in SDAP and PDCP API
* used open source IWYU tool + manual review
2024-11-18 11:25:02 +01:00
Guido Casati
b7c1b4d761 Refactor includes in NR_MAC_gNB/main.c
* used open source IWYU tool + manual review
2024-11-18 11:25:02 +01:00
Guido Casati
893102a104 Refactor includes in nr-softmodem.c 2024-11-18 11:25:02 +01:00
Guido Casati
1c9bcf4004 Refactor includes in unitary simulators
* prachsim, ulsim, dlsim
* used open source IWYU tool + manual review
2024-11-18 11:25:02 +01:00
Guido Casati
eb39836b0a Refactor includes in RRC files
* used open source IWYU tool + manual review
* deleted unused nr_rrc_common.c
2024-11-18 11:25:02 +01:00
Guido Casati
4957f446e9 Refactor includes in NGAP files
* used open source IWYU tool
2024-11-18 11:25:02 +01:00
Guido Casati
e8f9d577cd Use DL_SCH_LCID_DCCH in NR and remove dependency from mac.h 2024-11-18 11:25:02 +01:00
Guido Casati
69df3598f3 Redefine NGAP_MAX_PDUSESSION and removed LTE dependency
* limit to 16 instead of specs value 256
2024-11-18 11:25:02 +01:00
Guido Casati
9c94203e49 Move transport_layer_addr_t to platform_types.h
* tunnel address is the same for NR and LTE and used in both
* Remove LTE dependency in gtpv1_u_messages_types.h
2024-11-18 11:25:02 +01:00
Jaroslava Fiedlerova
12f29b828e Merge remote-tracking branch 'origin/NR_UE_trigger_reestablishment' into integration_2024_w46 (!2777)
NR UE trigger for re-establishment

The implementation in this MR triggers RRC re-establishment at the UE in case
of radio link failure either for out of sync messages from lower layers or in
case maximum number of RLC retransmissions is reached.
2024-11-18 10:12:25 +01:00
Guido Casati
6b3f26f538 Add define to printf and fflush in telnetsrv for real-time logs 2024-11-17 21:46:23 +01:00
Guido Casati
4f2fa739a1 Disable ASAN ODR detection to workaround double registration of log_mem_write_side variable in CU
/opt/oai-gnb/bin/nr-softmodem -O /opt/oai-gnb/etc/gnb.conf --sa --log_config.global_log_options level,nocolor,time --rfsimulator.options chanmod --telnetsrv --telnetsrv.listenaddr 192.168.71.150 --telnetsrv.shrmod ci
=================================================================
==7==ERROR: AddressSanitizer: odr-violation (0x7fce78b85be0):
  [1] size=4 'log_mem_write_side' /oai-ran/common/utils/LOG/log.c:78:14
  [2] size=4 'log_mem_write_side' /oai-ran/common/utils/LOG/log.c:78:14
These globals were registered at these points:
  [1]:
    \#0 0x7fce7b691658 in __asan_register_globals ../../../../src/libsanitizer/asan/asan_globals.cpp:341
    \#1 0x7fce7bd0c47d in call_init elf/dl-init.c:70

  [2]:
    \#0 0x7fce7b691658 in __asan_register_globals ../../../../src/libsanitizer/asan/asan_globals.cpp:341
    \#1 0x7fce7a5e2eba in call_init ../csu/libc-start.c:145
    \#2 0x7fce7a5e2eba in __libc_start_main_impl ../csu/libc-start.c:379

==7==HINT: if you don't care about these errors you may set ASAN_OPTIONS=detect_odr_violation=0
SUMMARY: AddressSanitizer: odr-violation: global 'log_mem_write_side' at /oai-ran/common/utils/LOG/log.c:78:14
==7==ABORTING
[INFO  tini (1)] Spawned child process '/opt/oai-gnb/bin/entrypoint.sh' with pid '7'
[INFO  tini (1)] Main child exited normally (with status '1')
2024-11-17 21:46:23 +01:00
francescomani
6600e33cae workaround to avoid assertion for UCI on PUSCH in re-establishment procedure 2024-11-17 21:46:23 +01:00
francescomani
fe671a8876 take into account the option to have initial pucch when scheduling UCI on PUSCH 2024-11-17 21:46:23 +01:00
francescomani
5bb38187f1 triggering SR only if schedulingRequestResource is available 2024-11-17 21:46:23 +01:00
francescomani
4f969e4120 do not force initial sync BW scanning if going to IDLE, keep the previous configuration 2024-11-17 21:46:23 +01:00
Guido Casati
813690ece7 Add ciUE command to force RRC_IDLE 2024-11-17 21:46:23 +01:00
Guido Casati
882712ffd8 Add ciUE telnet command to force RLF 2024-11-17 21:46:23 +01:00
Guido Casati
1692e00d4a Add function to fetch RRC UE instance 2024-11-17 21:46:23 +01:00
Guido Casati
60ef7f04aa Add new ci telnet commands to force UE release and UL failure 2024-11-17 21:46:23 +01:00
Guido Casati
59bf54c9cd Make a separate function to fetch RNTI in telnet CI 2024-11-17 21:46:23 +01:00
Robert Schmidt
fb1f2539e8 Custom_Command nc on cacofonix: cannot use -N, is openBSD 2024-11-17 21:46:23 +01:00
Guido Casati
0bbd446478 Add test to trigger re-establishment to RFSIM F1 CI
* trigger re-establshemnt on DU: reset RLC counters on DRB 1
  for OAI UE, since SRB 1 does not work for lack of periodic
  measurements reports
* how is the re-establishment triggered?
  * a transmission on DRB 1 occurs
  * detection of a mismatch of RLC counters at the UE side
  * max number of RLC retransmissions reached
  * RLF detection
* verify re-establishment on CU: we ping the core from the UE; this
  sends packets on DRB, and because the sequence number mismatches, will
  trigger a reestablishment. We accept in the ping that a couple of
  packets might be lost; after ping is over, reestablishment must be
  done as well (else the ping will already fail).
2024-11-17 21:46:23 +01:00
Robert Schmidt
7e3df5f173 Adjust TCP threshold MIMO for AW2S 2x2 pipeline 2024-11-17 10:09:31 +01:00
Robert Schmidt
2cc63bf195 Fixup: avoid deadlock 2024-11-17 01:27:09 +01:00
francescomani
ca877514aa fix for going to idle: release MAC config only after resetting MAC 2024-11-17 01:27:09 +01:00
Sakthivel Velumani
3e3ef8cfd0 Enable usrp-tx-thread-config in UE
Setting this option will start a separate thread for writing samples to
USRP.
2024-11-15 14:16:32 -05:00
Sakthivel Velumani
daeb110ae1 Don't reset txdata buffer every slot
This is not necessary becuase the buffer would be overwritten by OFDM
modulator in the next frame.
2024-11-15 14:14:17 -05:00
Jaroslava Fiedlerova
9b1ccbf3de Merge remote-tracking branch 'origin/hide-overflow' into integration_2024_w46 (!3107)
Clip the input for -32768 because this will make different result in...

Clip the input for -32768 because this will make different result in
mult_complex_vectors() compared to C version
2024-11-15 18:51:26 +01:00
Jaroslava Fiedlerova
981173f43b Merge remote-tracking branch 'origin/T-tracer-float-support' into integration_2024_w46 (!3109)
T tracer: support float types in traces
2024-11-15 18:50:36 +01:00
Jaroslava Fiedlerova
b18f39312a Merge remote-tracking branch 'origin/ci-fixes-dora' into integration_2024_w46 (!3104)
Trigger deregistration only in SA mode

Upon press of ^C, the UE triggers a NAS deregistration. This does not work
in do-ra or phy-test modes, because there is no NAS. Therefore, in non-SA
modes, just stop the UE directly.

This can potentially improve the 5G RFsim CI test case, because together with
a high RFsim timeout, the chances of the last HARQ status line being without
retransmissions is much higher. If that does not help, we can further increase
the retx threshold.
2024-11-15 18:49:12 +01:00
Jaroslava Fiedlerova
45be0a5604 Merge remote-tracking branch 'origin/fix-ulsch-bsr' into integration_2024_w46 (!2991)
fix BSR report malformed, add SHORT BSR when it can (instead of LONG BSR)...

fix BSR report malformed, add SHORT BSR when it can (instead of LONG BSR)
simplify the code and make the code more explicit, but the may structure
remain (nr_write_ce_ulsch_pdu interface is complex, merging it into the
called would make simpler and more interstandable code), fix some asserts
related to this part of code
2024-11-15 18:43:26 +01:00
Robert Schmidt
7d2b7c2ba3 Prevent segfault in RRC
Similar to the previous commit, prevent the same segfault in RRC.
2024-11-15 17:58:50 +01:00
Raghavendra Dinavahi
db629e6b58 NTN FDD FR1 bands added
Added support for NTN FDD FR1 bands 254, 255, 256 as specified in 3GPP TS 38.101-5
Conf files added for 15Khz, 5Mhz and 30Khz, 10Mhz configurations added for these bands
2024-11-15 16:23:22 +01:00
Cedric Roux
0eb0325b96 T tracer: support float types in traces 2024-11-15 16:02:52 +01:00
Robert Schmidt
268d409b5b Prevent segfault in nr_mac_clean_cellgroup()
In some runs of a multi-UE deployment, we see segfaults because
cell_group->spCellConfig is NULL. We should not segfault in that case,
so check for spCellConfig.
2024-11-15 15:37:03 +01:00
Robert Schmidt
a319cbfb19 Prevent segfault when trying to schedule MAX_MOBILES_PER_GNB UEs
When the UE list is full, the iterator will run through all
MAX_MOBILES_PER_GNB UEs. It expects that eventually the pointer is NULL,
which is not the case if we have MAX_MOBILES_PER_GNB (or it simply
depends on the following memory). So give one array entry more, to
ensure that the last one is NULL.
2024-11-15 15:37:03 +01:00
Laurent THOMAS
362eba7e27 Clip the input for -32768 because this will make different result in mult_complex_vectors() compared to C version 2024-11-15 13:15:30 +01:00
Bartosz Podrygajlo
fe10c90250 Avoid passing gNB pointer to nr_pusch_antenna_processing 2024-11-15 12:35:07 +01:00
Bartosz Podrygajlo
5605b0c0c6 Parallelize the PUSCH channel estimation
- add new data structures for antenna processing.
- create arrays that keep track of certain values (max_ch, noise_amp2, nest_count and delay) per each antenna. These values are processed in order to determine one final output.
- add time processing measurements for each antenna, and prints them in nr_ulsim.
- make num_antennas_per_thread configurable in nr_ulsim and the gNB config file.

Co-authored-by: Nada Bouknana <bouknana@eurecom.fr>
Co-authored-by: Brice Robert <brobert@valiha.com>
2024-11-15 12:35:06 +01:00
Bartosz Podrygajlo
25dde24d1e Fix formatting in nr_ul_channel_estimation.c 2024-11-15 12:34:04 +01:00
Jaroslava Fiedlerova
ca119de036 Merge remote-tracking branch 'origin/ue-default-ssb-config' into integration_2024_w46 (!3095)
UE: Set default SSB config

After initial sync the UE sets the ssb index bitmap in nrUE_config with
index obtained in initial sync. This allows UE to continue decoding PBCH
and stay synched with the gNB till SIB1 is received.
2024-11-15 11:51:15 +01:00
Bartosz Podrygajlo
caac4157c7 Fix a small bug with total_res in gNB PUSCH symbol processing
Replaced total_res with res_per_task when deciding whether to start a threadpool task or not.
This does not have big impact on the software as the nr_pusch_symbol_processing will recheck
ul_valid_re_per_slot anyway but it may reduce the number of thread pool tasks created.
2024-11-15 06:37:58 +01:00
Robert Schmidt
029cf83918 Trigger registration only in SA mode
Upon press of ^C, the UE triggers a NAS deregistration. This does not
work in do-ra or phy-test modes, because there is no NAS. Therefore, in
non-SA modes, just stop the UE directly.
2024-11-14 12:13:45 +01:00
francescomani
f3bee8ed25 L1 beam allocation for CSI-RS 2024-11-14 08:41:14 +01:00
francescomani
0993eb4ed8 MAC beam allocation for CSI-RS 2024-11-14 08:41:14 +01:00
francescomani
c0f2d24471 L1 beam allocation from symbol bitmap
This is required because CSI-RS may not be allocated in consecutive symbols within a slot
2024-11-14 08:41:14 +01:00
Robert Schmidt
eee4a0c652 UE: signal RLF to RRC 2024-11-13 14:25:01 +01:00
Robert Schmidt
f380a48a3b RLC: add per-UE RLF callback
If the RLC cannot retransmit a package, 3GPP specs say that we should
declare radio link failure (RLF). Up to this commit, the code did
nothing though. In this commit, add a per-UE RLF callback; the RLC will
call into this function to signal that RLF has been detected through
maximum retransmissions on a particular RLC bearer.
2024-11-13 14:25:01 +01:00
francescomani
6beeb6eef1 handle rlf with re-establishment or going to idle 2024-11-13 14:25:01 +01:00
francescomani
4f884ab172 bugfix: unlocking RLC manager in nr_rlc_get_lcid_from_rb function 2024-11-13 14:25:01 +01:00
Laurent THOMAS
2348b3c065 select LCG that contains the highest priorit LC with data to transmit instead of the LC with maximum waiting data size 2024-11-13 14:23:23 +01:00
Laurent THOMAS
d641a76196 fix BSR report malformed, add SHORT BSR when it can (instead of LONG BSR) simplify the code and make the code more explicit, but the may structure remain (nr_write_ce_ulsch_pdu interface is complex, merging it into the called would make simpler and more interstandable code), fix some asserts related to this part of code 2024-11-13 14:15:30 +01:00
Robert Schmidt
f54ca5714e Merge branch 'integration_2024_w45' into 'develop'
Integration: `2024.w45`

See merge request oai/openairinterface5g!3097

* !3048 Cleanup and refactoring at gNB initialization
* !3077 Address most thread safety issues in NR UE
* !3089 Improve cross-compile documentation
* !3092 Remove Interop-F1/Accelleran-CU testing pipeline
* !3096 Remove x86-specific instructions from telnet server
* !2949 Better polar decode
* !3070 CI: Add test with 4 DL layers, 60 MHz BW to SA-2x2 pipeline
* !3098 nr rlc: hotfix: test allocation valid before use
* !3090 Add UL PRBs Blacklist section to NR_SA_Tutorial_COTS_UE.md
* !3082 fix blocking bugs in command nr_dlsim -n100 -e27 -s35 -b 273 -R273 -x4 -y4 -z4
* !3100 CI: Remove 5g_l2sim files
* !3024 Set SA mode as default
* !3087 Remove some usage of the old CI sshConnection class
* !3074 CI: cleanup of cls_physim.py
2024-11-13 11:59:27 +00:00
Bartosz Podrygajlo
70849816c4 Test for init_RA
Extract nr_ra_procedures.c into a separate library and add a testcase for init_RA function.

The testcase redefines the following functions as stubs:
 - nr_mac_rrc_ra_ind
 - nr_write_ce_ulsch_pdu
 - mac_rlc_data_req
 - *lockGet_ul_config
 - release_ul_config
 - remove_ul_config_last_item
 - nr_ue_configure_pucch

These stubs can be used to check init_RA behavior
2024-11-13 10:09:18 +01:00
Robert Schmidt
c847ac786f Merge remote-tracking branch 'origin/ci-cls-physim-cleanup' into integration_2024_w45 (!3074)
CI: Cleanup of cls_physim.py

- Remove unused code and file
- Rework functions for CUDA and T2 log analysis
- Check if test was successful for nr_ulsim and nr_dlsim in
  RAN-gNB-N300-Timing-Phytest-LDPC pipeline
2024-11-13 09:57:49 +01:00
Robert Schmidt
085d48304c Merge remote-tracking branch 'origin/remove-use-old-ssh-class' into integration_2024_w45 (!3087)
Remove some usage of the old CI sshConnection class
2024-11-13 09:57:16 +01:00
Jaroslava Fiedlerova
c0e386e42d Merge remote-tracking branch 'origin/config_sa_mode' into integration_2024_w45 (!3024)
Set SA mode as default

- Set standalone (SA) mode as the default.
- Adjust commands in Docker Compose files by removing --sa flags and
  adding --nsa flags where applicable.
- Add a function to verify that only one mode is being used at a time.
- Update all relevant documentation.
2024-11-13 09:57:07 +01:00
Jaroslava Fiedlerova
9e81040a8d CI: use multiple cores for nr_ulsim/nr_dlsim tests with T2
Increase number of cores used for T2 nr_ulsim/nr_dlsim processing to ensure
a fair comparison of total gNB PHY RX/TX processing time.
2024-11-12 21:51:16 +01:00
Jaroslava Fiedlerova
94f69b8c70 Merge remote-tracking branch 'origin/remove_5g_l2sim_files' into integration_2024_w45 (!3100)
CI: Remove 5g_l2sim files

Delete the XML, conf, and YAML files related to the RAN-L2-Sim-Test-5G pipeline
that has already been removed.
2024-11-12 19:05:53 +01:00
Sakthivel Velumani
210b92338f Decode PBCH with ssb index from init sync 2024-11-12 11:54:55 -05:00
Robert Schmidt
e8d8384e7e Add RHEL 9.5 to supported distributions 2024-11-12 17:50:12 +01:00
Robert Schmidt
0784d1907f ci-scripts/tests/README.md: how to run all tests 2024-11-12 17:20:14 +01:00
Robert Schmidt
9f5d82212a Remove Username/Password from cls_containerize and use GetCredentials()
In the last commits, SSHconnection class has been removed from
cls_containerize.py. We therefore don't need the username and password,
as cls_cmd uses certificates only. Remove the usage of the username and
the password, and harmonize the use of GetCredentials().
2024-11-12 17:20:14 +01:00
Robert Schmidt
6a36db4569 Repair and refactor proxy build function
Recent refactoring replaced the CreateWorkspace function call with a
dedicated XML step (for clarity, and because it avoids needless
recreation of workspaces). In the proxy function, the same
CreateWorkspace xml step has been added, cloning the OAI RAN repo, when
we actually need the repository for the proxy. Hence, fix this by
calling the CreateWorkspace() function manually, but only when
necessary, to build the proxy. (It would only be a problem if the
pipeline would rebuild the proxy, which did not happen because not much
work is happening on the proxy repo).

Further, refactoring and simplication of the proxy build function were
done:

- never tag proxy with develop, that makes no sense
- overwrite CreateWorkspace() info after having created and used the
  workspace (the "if" to build the proxy)
- simplify copying of logs
- add simple unit test
- remove check for ubuntu; the dependcy is "docker". Simplify the code
  to not obscure with a class variable.
2024-11-12 17:20:14 +01:00
Robert Schmidt
cf576fc255 Remove Create_Workspace() in xml: follow up step removes it
The first thing Build_Proxy does is to remove the repository. Further,
Build_Proxy does not use the OAI RAN repo, but the proxy repo. The
Create_Workspace() is therefore completely useless.
2024-11-12 17:20:14 +01:00
Robert Schmidt
a103be619a Remove use of old sshConnection class, use cls_cmd instead 2024-11-12 17:20:14 +01:00
Robert Schmidt
e7225e12cb Remove CheckAndAddRoute(), replace with scripts on machines
Remove CheckAndAddRoute(), as it is complicated to read, uses a
multitude of hostname/IP/password combinations. Replace with scripts on
the machines, which, as of this commit, are:

- porcepix: ~/after-reboot.sh
- ofqot: ~/after-reboot.sh
- nepes: ~/after-reboot.sh
- obelix: ~/how-to-resetup-obelix-out-of-reboot.sh
2024-11-12 17:20:14 +01:00
Robert Schmidt
171530c067 cls_oaicitest.py: use new cls_cmd.getConnection() instead of old SSHconnection class
It is clearer in CI logs to use absolute paths, and that is also a
"preference" of the new SSH class (cls_cmd.py) in the sense that some
functions don't handle "cd" gracefully (because of underlying Python
library paramiko).

For zip, though, we should change to have nice relative paths in the
archives, so use cd <path> && zip ... to achieve that, instead of
changing to a directory. This way, the path on which we operate is still
visible in the logs in each line.
2024-11-12 17:18:28 +01:00
Robert Schmidt
cd25064fb1 Enable VLA Cxx extension in clang build
The clang build fails with

    /oai-ran/openair1/PHY/MODULATION/gen_75KHz.cpp:16:23: error: variable length arrays in C++ are a Clang extension [-Werror,-Wvla-cxx-extension]
       16 |     complex<double> t[len];
          |                       ^~~
    /oai-ran/openair1/PHY/MODULATION/gen_75KHz.cpp:16:23: note: function parameter 'len' with unknown value cannot be used in a constant expression

So ignore this warning (and make the build pass), since OAI uses VLAs in
various places.
2024-11-12 17:15:22 +01:00
Robert Schmidt
3991f15c89 Reorder compile options to have user-defined last
The previous version would put the user-defined options first. However,
the default options include e.g., -Wall. If a user tries to override
(see for instance the next commit) -Wall or other options might override
this and not honor the user choice.

To always have the user have the last work, put user-defined compile
options last.
2024-11-12 16:46:55 +01:00
Robert Schmidt
0443759716 Remove Num_Threads_PUSCH options: it's not used 2024-11-12 13:55:49 +01:00
Reem Bahsoun
a2056a3055 Add nsa flag in docker-compose and xml files 2024-11-12 13:55:49 +01:00
Reem Bahsoun
1b02b6327b Remove non existing volumes in /5g_f1_rfsimulator/docker-compose.yaml 2024-11-12 13:55:49 +01:00
Reem Bahsoun
7dcf80398a Update docs and README files to align with modifications in config files 2024-11-12 13:55:49 +01:00
Reem Bahsoun
dc7e6e5638 remove sa param from some targets/PROJECTS/GENERIC-NR-5GC/ conf files 2024-11-12 13:55:49 +01:00
Reem Bahsoun
c4d9d27702 Remove sa param from some CI conf files + remove 'sa' flag from docker-compose files 2024-11-12 13:55:49 +01:00
Robert Schmidt
5d2a1ace17 nr-{ue,}softmodem: Check for correct modes
THere are four possibilities, for the three options (phy_test, do_ra,
nsa):

- None is set -> SA
- Only one is set of each -> corresponding mode

Introduce a function softmodem_verify_mode() to check for these.
2024-11-12 13:55:49 +01:00
Robert Schmidt
e0e1ca6583 Make SA the default mode, remove corresponding option 2024-11-12 13:55:49 +01:00
Jaroslava Fiedlerova
fff605eab9 Add measurement of total gNB TX processing time for nr_dlsim 2024-11-12 12:02:29 +01:00
Jaroslava Fiedlerova
14a41df0ec CI: Harmonize LDPC CUDA and T2 test/analysis in physim
- Introduce "Run_Physim" function for running ldpctest (with CUDA) and
nr_dlsim/nr_ulsim (with T2) in RAN-gNB-N300-Timing-Phytest-LDPC test
pipeline.
- Create "cls_analysis.py" and introduce "analyze_physim" for
log analysis of physim tests.
- Define patterns to be searched in the physim logs.
- Extract and print information about total gNB RX/TX PHY processing time
from nr_ulsim/nr_dlsim logs.
- Remove "cls_physim.py" as it is not used anymore, cleanup "main.py".
2024-11-12 12:02:03 +01:00
Robert Schmidt
4e08542231 Remove link to old 5g_l2sim_tdd docker deployment 2024-11-12 09:52:57 +01:00
Robert Schmidt
34cf585acd Merge remote-tracking branch 'origin/fix-4layers-nr_dlsim' into integration_2024_w45 (!3082)
fix blocking bugs in command nr_dlsim -n100 -e27 -s35 -b 273 -R273 -x4 -y4 -z4

errors in main OAI code:

- one stack overflow
- one variable array of size 0
- one direct usage of unaligned SIMD

and small fixes inside the tests tool nr_dlsim to handle this large configuration (4layers, 100MHz)

use a better complex vector multiplication function
2024-11-09 22:51:45 +01:00
Robert Schmidt
7d7011f3f8 Remove use of SSHConnection(): not used in this file 2024-11-09 12:44:09 +01:00
Robert Schmidt
5078fcccbc CI test deployment.py: auto-pull missing images if necessary 2024-11-09 12:44:09 +01:00
Robert Schmidt
a3a59e4a97 Update CI unit test README.md with all tests 2024-11-09 12:44:09 +01:00
Robert Schmidt
9d4337c55d Do not retrieve deployment logs during DeployObject
Since commit 041b2b2d7a, the CI main loop
iterates over all steps, even if there has been a problem during an
earlier XML step. In all cases, UndeployObject() is marked to always
run, as we always need to make sure that all deployed services are
terminated. UndeployObject() always recovers logs. Hence, it's not
necessary to do it here as well; it leads to duplicated logs.

This is visible in all pipeline with a failed deployment: the logs
appear twice.
2024-11-09 12:44:09 +01:00
Robert Schmidt
019778e927 Simplify create_workspace.sh: remove unnecessary checkout
create_workspace.sh used to check out develop by default. However, this
is unnecessary because the script later checks out a specific reference
(which can be a commit ID, which is not accepted by git clone, the
reason we don't check out during clone); the repository will simply be
empty in the beginning, which should not be a problem.

Further, it is problematic because we use this script for the build of
the L2sim proxy, and the repository does not have develop; thus, without
this modification, L2sim proxy build will always fail.
2024-11-09 12:41:23 +01:00
Reem Bahsoun
980cc02b1a Delete 5g_l2sim components in ci_infra 2024-11-08 18:23:29 +01:00
Reem Bahsoun
5b0b2ab359 Delete 5g_l2sim related files 2024-11-08 18:23:21 +01:00
Jaroslava Fiedlerova
f6184c9ff0 Merge remote-tracking branch 'origin/doc-add-prbbl-cots-ue' into integration_2024_w45 (!3090)
Following up on !3081 (comment 140856)
2024-11-08 15:10:01 +01:00
Jaroslava Fiedlerova
fd6fbc5eae Merge remote-tracking branch 'origin/hotfix-nr-rlc-cppcheck' into integration_2024_w45 (!3098)
and simplify a bit (DevAssert instead of goto/exit)
2024-11-08 15:08:53 +01:00
Laurent THOMAS
8f688c0064 replace assert by error logging when we call DFT with impossible size to deal with existing LTE UE 2024-11-08 12:19:23 +01:00
Cedric Roux
752fa5fd61 nr rlc: hotfix: test allocation valid before use
and simplify a bit (DevAssert instead of goto/exit)
2024-11-08 11:59:23 +01:00
Guido Casati
d585aa0041 Add UL PRBs Blacklist section to NR_SA_Tutorial_COTS_UE.md 2024-11-08 10:12:19 +01:00
Jaroslava Fiedlerova
1898e34750 Merge remote-tracking branch 'origin/ci-add-4x4-test' into integration_2024_w45 (!3070)
Create a new test scenario with USRP N310, 60 MHz bandwidth, 4 DL layers and
2 UL layers. Test 480 Mbps DL and 120 Mbps UL.
2024-11-08 08:22:19 +01:00
Jaroslava Fiedlerova
5f5053c6f7 Merge remote-tracking branch 'origin/better-polar-decode' into integration_2024_w45 (!2949)
- simplify the code
- prevent to use "beta" tables from one decoder run to the next one (to see it
is the case, don't initialize beta, you will see it doesn't decode)
- decrease memory footprint of the decoder by x10 or more
- save about 15% of cpu in polartest unitary test tool, and more if we run in
realistic use case
- still this decoder performs much worse than the (very) slow OAI version by 3dB
2024-11-08 08:20:08 +01:00
Jaroslava Fiedlerova
de90129d3f Merge remote-tracking branch 'origin/compile-telnet-arm' into integration_2024_w45 (!3096)
telnetsrv uses the Intel/AMD-specific "cpuid" instruction, which is not
available on ARM machines. Remove the call.

The previous code was checking for the number of cores, which is
retained by a call to get_nprocs(). I did not find an equivalent for the
number of threads in C. In C++, there would be
https://en.cppreference.com/w/cpp/thread/thread/hardware_concurrency, in
case it's relevant for anybody.

Also, add it to the cross-compilation pipeline
2024-11-07 21:28:23 +01:00
Jaroslava Fiedlerova
d0f9d4c028 CI: Remove unused Build_Physim 2024-11-07 20:33:04 +01:00
Jaroslava Fiedlerova
f75e107d08 CI: remove unused Run_NRulsimTest 2024-11-07 20:33:04 +01:00
Laurent THOMAS
486cebce06 replace a printf() by a cleaner call to AssertFatal() 2024-11-07 17:08:18 +01:00
Laurent THOMAS
fd83be4e77 change the alignment of OAI mutli-dim arrays from 16 to 32 bytes 2024-11-07 17:08:18 +01:00
Laurent THOMAS
07b9daa762 fix blocking bugs in command nr_dlsim -n100 -e27 -s35 -b 273 -R273 -x4 -y4 -z4
use a better complex vector multiplication function
2024-11-07 17:08:18 +01:00
Laurent THOMAS
89b7ce5eb9 small fix of rotate vector unit test 2024-11-07 17:07:52 +01:00
Laurent THOMAS
ac06f107dd add a optimzed complex vector multiplication function 2024-11-07 17:07:50 +01:00
Jaroslava Fiedlerova
282ec44521 Merge remote-tracking branch 'origin/remove-accelleran-pipeline' into integration_2024_w45 (!3092)
We don't have access to the images for the Accelleran CU anymore, so we
can't run the test. Remove the pipeline from the repository.
2024-11-07 16:21:36 +01:00
Jaroslava Fiedlerova
c76baa1c70 Merge remote-tracking branch 'origin/fix-doc-cross-compile' into integration_2024_w45 (!3089)
- Give introductory line
- Reformulate headers to clarify steps
- Reference dockerfiles for further information
2024-11-07 16:20:35 +01:00
Jaroslava Fiedlerova
9009302a82 Merge remote-tracking branch 'origin/fix-csi-data-race' into integration_2024_w45 (!3077)
csiim_vars/csirs_vars used to be global array for each UE. Now its present
in phy_data which is in dynamically allocated memory.

MAC config was done without mutex while DL and UL threads could be running
at the same time.

get_ue_nas_info was allocating memory possibly from more than one thread.
Moved it into new init function for UE NAS layer.

Addreses most issues in #869
2024-11-07 16:18:09 +01:00
Jaroslava Fiedlerova
1c214994df Merge remote-tracking branch 'origin/nr-minor-cleanup-gnb' into integration_2024_w45 (!3048)
The goal of this MR is to improve readability, maintainability and consistency
of gNB initialization functions.
This MR is:

- cleaning up redundant and unused code
- refactoring init_gNB, l1_north_init_gNB, RCconfig_NR_L1, NRRCConfig
- removing redundant memory allocation for gNB RAN context and L1 instances
- cleaning up redundant log lines
2024-11-07 16:16:05 +01:00
Robert Schmidt
9f9299706b Improve cross-compile documentation
- Give introductory line
- Reformulate headers to clarify steps
- Reference dockerfiles for further information
2024-11-07 15:10:24 +01:00
Robert Schmidt
49584e6cb3 fixup 2024-11-07 13:17:21 +01:00
Robert Schmidt
2204fc13db Compile telnetsrv in cross-compilation pipeline 2024-11-07 12:44:26 +01:00
Robert Schmidt
76c3e4b72e Remove x86-specific instructions from telnet server
telnetsrv uses the Intel/AMD-specific "cpuid" instruction, which is not
available on ARM machines. Remove the call.

The previous code was checking for the number of cores, which is
retained by a call to get_nprocs(). I did not find an equivalent for the
number of threads in C. In C++, there would be
https://en.cppreference.com/w/cpp/thread/thread/hardware_concurrency, in
case it's relevant for anybody.
2024-11-07 12:41:47 +01:00
Robert Schmidt
a650dcc8ab Remove Interop-F1/Accelleran-CU testing pipeline
We don't have access to the images for the Accelleran CU anymore, so we
can't run the test. Remove the pipeline from the repository.
2024-11-07 12:33:47 +01:00
Robert Schmidt
0e93a8b4cf Move nr_polar_init.c to nrPolar_tools/ 2024-11-07 11:58:44 +01:00
Robert Schmidt
16535f3de4 Reformat all polar code
Commands used:

    clang-format -i openair1/PHY/CODING/TESTBENCH/polartest.c
    clang-format -i openair1/PHY/CODING/nr_polar_init.c
    clang-format -i openair1/PHY/CODING/nrPolar_tools/*
2024-11-07 09:43:19 +01:00
Laurent THOMAS
28234893f7 add default value setting instead of assert if we process uninitialized beta 2024-11-07 09:35:50 +01:00
Laurent THOMAS
4a971caf9f use SIMD in the highest cpu part
the version in develop is difficult to understand, and surprizing design
it loops only when avx2mod == 0 because when this test is false, the
size is always small i also spent time to understand, but i think i have
not changed it by not looping over the array.
2024-11-07 09:35:50 +01:00
Bartosz Podrygajlo
00e50f082d Limit recursion in polar decoder
Use non-recursive polar decoder after traversing the tree once. Maximum number
of nodes is set to 600 (unsure of the maximum). This is more performant
than the recursive version.
2024-11-07 09:29:59 +01:00
Laurent THOMAS
a235206647 minor improvements for memory and SIMDE 2024-11-07 09:29:41 +01:00
Laurent THOMAS
3e019af4d9 remove the big LUT for decoder de-interleaver
no performance degradation

some reformatting
2024-11-07 09:29:21 +01:00
Laurent THOMAS
d57ea715c0 Improve polar decoder/encoder
- Ensure packed struct through bitfield
- decoder tree buffer increase: i don't find evidence in the 3GPP
  standard of the max size of polar coded PDU.  even with this max size,
  the way this tree is built is not trivial.  so, it is hard to predict,
  i just put 8 system pages (32KB) that looks enough [1]
- a lot of reformatting

[1] https://arxiv.org/pdf/1804.04389
according to this paper, the largest polar code in 5G is in UL, so
likely the biggest problem will be in gNB, not the UE.  in DL, the max
output coded block is 512, in UL 1024.  probably the tree we discuss is
related to this size.

"frozen bits" means only bits we don't encode/decode because polar code
size is only by power of 2.
We see this in OAI code:  NR_POLAR_PUCCH_N_MAX is 10, so 2^10 is 1024,
that is the maximum size for 5G polar code length.  in the code, we
assert if N > 512: "N = %d, not done yet\n",
polarParams->N".  so, the today OAI code can't do PUCCH large blocks.

using current oai limitation of 2⁹ max code size, we can create up to
2^9+2⁸... nodes, so 1023 nodes in the tree.  the problem then is that
each node have variable size, depending on the 'level' (the power of 2
we are currently).  the algo provision large alpha and beta to be able
to store all lower levels in the tree (int leaf_sz = 1 << level)
therefore upper tree nodes are large (the top level for n=9 uses about
1.5KB) and the bottom nodes uses 64 bytes.  if all nodes are populated,
the size will be very large: 1.5KB + 2 * 800 + ....  but, we create
nodes in the tree only for the "information bits", so the payload, that
is limited to 128 bits (else we assert, the code is not "finished").
1.5KB * 128 is >> 8KB i allocated.  but, we can't create more than one
mode at top level, so there is maximum 1.5KB + 2 * 800, + 4 * 400 + 8 *
200 + 16 * 100 + remaining of 128-32 nodes of 64 bytes.  about 14KB.

i allocated 1024*sizeof(__m256i) bytes = 32KB that looks good.
2024-11-07 09:25:18 +01:00
Sakthivel Velumani
75cca9be3e Fix logging 2024-11-06 21:33:38 -05:00
Guido Casati
b61de6453a Refactor NRRCConfig
* the goal of this function is to initialize and configure the RAN Context
* the goal of get_options is to get command line options
* this commit aims at making the implementation more consistent
* move initialization of RC.nb_nr_CC to this function
* cleanup redundant initializations of RC.nb_nr_macrlc_inst outside NRRCConfig
* cleanup redundant initization of RC.nb_nr_macrlc_inst from getter function (get_node_type)
* cleanup RC initialization in RCconfig_NR_L1
* removed redundant log lines (print number of instances in NRRCConfig only)
* do RC init after getting CL options and configuration
* get_node_type shall access configuration only, not RC context
* NRRCConfig shall be called only once: made it thread-safe
2024-11-06 10:16:39 +01:00
Guido Casati
14a379cb75 Removed global variable NB_RU
* this variable was set after RC.nb_RU, which is set in NRRCConfig
  therefore it was redundant since it can be easily replaced by
  the original
2024-11-06 10:16:11 +01:00
Guido Casati
b7063c8b75 Return a pointer to a new RRC instance (gNB_RRC_INST) from RCconfig_NRRRC 2024-11-06 10:15:43 +01:00
Guido Casati
f80b09ac99 Simplified use of nb_nr_inst
* nb_nr_inst represents the number of gNB instances and the number of RAN contexts
* it used also to count the number of RRC instances in the node
* it is set from config file in NRRCConfig, therefore redundant checks after
  this function have been removed
* redundant global variable NB_gNB_INST, set after nb_nr_inst, was removed
2024-11-06 10:15:42 +01:00
Guido Casati
eaeae880d0 Removed unused wait_for_sync 2024-11-06 10:15:26 +01:00
Guido Casati
dfb90a173d Cleanup commented out code in nr_init.c 2024-11-06 10:15:26 +01:00
Guido Casati
881c6b0c1a Refactor l1_north_init_gNB
* code cleanup
* clang-formatted
* simplified code
2024-11-06 10:15:25 +01:00
Guido Casati
3e5292ca0b Cleanup unused global vars in executables/nr-softmodem.c 2024-11-06 10:14:58 +01:00
Guido Casati
3698881849 Removed redundant initialization of pre-processor function pointers
* done already in mac_top_init_gNB
2024-11-06 10:14:58 +01:00
Guido Casati
ba43ebb5a8 Cleanup of dump_nr_prach_config 2024-11-06 10:14:58 +01:00
Guido Casati
ebeedbfe7f Cleanup of unused set_default_frame_parms 2024-11-06 10:14:57 +01:00
Guido Casati
e828d0e6a4 Removed unused num_ulprbbl in gNB_MAC_INST_s 2024-11-06 10:14:42 +01:00
Guido Casati
2ff25e688a Remove gNB and L1 init in RCconfig_nr_prs
* gNB and L1 init is done in init_gNB and RCconfig_NR_L1
* moved RCconfig_nr_prs out of create_gNB_tasks for consistency
* do RCconfig_nr_prs only for L1 instances
2024-11-06 10:14:42 +01:00
Guido Casati
e57acf6190 Refactor RCconfig_NR_L1
* removed initialization of gNB
* separate function to get blacklisted UL PRBs
* call the getter in both L1 and MAC/RLC configuration
* other minor improvements
2024-11-06 10:14:41 +01:00
Guido Casati
2a9cb35348 Do L1 configuration right after gNB initialization
* do always gNB init for L1 instance
  and also for CU and CU-CP
* do L1 config only for L1 instances
2024-11-06 10:13:06 +01:00
Guido Casati
d8c7ff4c2c Refactor init_gNB()
* code cleanup
* clang-formatted
* adopted calloc_or_fail
* allocate nb_nr_L1_inst of RC.gNB instead of (RC.nb_nr_L1_inst + 1)
2024-11-06 10:12:52 +01:00
Bartosz Podrygajlo
af63f3f91c Add missing asserts for mac->if_mutex lock/unlock calls 2024-11-06 09:58:17 +01:00
Robert Schmidt
2696f475aa Remove libatlas-base-dev from ARM64 deps: not needed (see #802) 2024-11-06 09:51:01 +01:00
Jaroslava Fiedlerova
9ce8a9ac7d CI: use default value for ulsch_max_frame_inactivity in 60 MHz 4x4 config file 2024-11-05 20:04:04 +01:00
Jaroslava Fiedlerova
b77c0d81e0 CI: update information about frequency in SA-2x2 config files 2024-11-05 20:04:04 +01:00
Jaroslava Fiedlerova
5e8d62ff85 CI: remove ssb_SubcarrierOffset from config file
ssb_SubcarrierOffset is no longer taken in account from the gNB config file,
as it is computed automatically.
2024-11-05 20:04:04 +01:00
Jaroslava Fiedlerova
b3d45cf698 CI: Add test with 4 DL layers, 60 MHz BW to SA-2x2 pipeline 2024-11-05 20:04:04 +01:00
Bartosz Podrygajlo
4d07003652 Thread safe get_ue_nas_info
Call get_ue_nas_info before any thread starts to prevent
concurrent initialization of uicc array.
2024-11-05 13:50:55 +01:00
Bartosz Podrygajlo
f6ea1648e9 Fix data race on csiim_vars
csiim_vars used to be global array for each UE. Now its present in phy_data which
is in dynamically allocated memory
2024-11-05 13:50:55 +01:00
Bartosz Podrygajlo
0109a6b976 Fix data race on csirs_vars
csirs_vars used to be global array for each UE. Now its present in phy_data which
is in dynamically allocated memory.
2024-11-05 13:50:55 +01:00
Bartosz Podrygajlo
900fcd9762 Thread safety for MAC config
Move mac_IF_mutex to MAC instance and use it for ensuring thread safety when modifying
MAC structures from RRC.
2024-11-05 13:50:55 +01:00
Robert Schmidt
220d851deb Merge branch 'integration_2024_w44' into 'develop'
Integration: `2024.w44`

See merge request oai/openairinterface5g!3081

* !2988 Add functional DFT test
* !3072 snow3g: fix array size
* !3073 small fix for 3 digit mnc usage in sib1
* !3040 Update pbchsim to work with other numerologies
* !3078 Simplify logs in gNB&UE
* !3080 Add Fedora 41, build_oai cleanup
* !3061 RLC optimization
* !3008 Fix regression 4g
* !3084 Fix a typo in nrue.uicc.yaml file
* !3085 chore(ci): creating a develop tag on top of develop-commit-id tag for the local private registry
2024-11-05 11:58:33 +00:00
Robert Schmidt
e3c3a8a6ff Merge remote-tracking branch 'origin/ci-add-develop-tag-in-private-repo' into integration_2024_w44 (!3085)
chore(ci): creating a develop tag on top of develop-commit-id tag for the local private registry

Create a 2nd tag of develop for all images on the local registry.  We
are doing this in order to simplify cross-repository testing between
FlexRIC and RAN.
2024-11-05 11:03:02 +01:00
Robert Schmidt
70885cc959 Merge remote-tracking branch 'origin/nrue-yaml-hotfix' into integration_2024_w44 (!3084)
Fix two issues with softmodem yaml files

- Fix a typo that prevents casting max_chan to integer in nrue.uicc.yaml
- Remove unused field ssb_PositionsInBurst_PR from gNB example config
  yaml file
2024-11-05 11:02:24 +01:00
Robert Schmidt
f216c47ace Merge remote-tracking branch 'origin/fix-regression-4G' into integration_2024_w44 (!3008)
Fix Regression 4G

- Fix various bugs and/or regressions in 4G code
- Also, the CI does not test RFsim 4G with --sanitize, enables this to
  detect problems.
2024-11-04 19:43:52 +01:00
Robert Schmidt
01aadcac1f Merge remote-tracking branch 'origin/rlc-optimization' into integration_2024_w44 (!3061)
RLC optimization

Two improvements:

- using functions instead of function pointers which enables inlining
- avoid 1 malloc/free per SDU

Benchmark results:

before:

    BM_nr_rlc_am_entity/20000           5036721 ns      5036541 ns          138
    BM_nr_rlc_am_entity/20000           5032061 ns      5031849 ns          138
    BM_nr_rlc_am_entity/20000           5037071 ns      5037056 ns          138
    BM_nr_rlc_am_entity/20000           5035472 ns      5035248 ns          138
    BM_nr_rlc_am_entity/20000           5032860 ns      5032681 ns          138
    BM_nr_rlc_am_entity/20000_mean      5034837 ns      5034675 ns            5
    BM_nr_rlc_am_entity/20000_median    5035472 ns      5035248 ns            5
    BM_nr_rlc_am_entity/20000_stddev       2267 ns         2315 ns            5
    BM_nr_rlc_am_entity/20000_cv           0.05 %          0.05 %             5

after:

    BM_nr_rlc_am_entity/20000           4974403 ns      4974202 ns          140
    BM_nr_rlc_am_entity/20000           4976705 ns      4976444 ns          140
    BM_nr_rlc_am_entity/20000           5004550 ns      5004508 ns          140
    BM_nr_rlc_am_entity/20000           4974652 ns      4974460 ns          140
    BM_nr_rlc_am_entity/20000           4976447 ns      4976225 ns          140
    BM_nr_rlc_am_entity/20000_mean      4981351 ns      4981168 ns            5
    BM_nr_rlc_am_entity/20000_median    4976447 ns      4976225 ns            5
    BM_nr_rlc_am_entity/20000_stddev      13009 ns        13087 ns            5
    BM_nr_rlc_am_entity/20000_cv           0.26 %          0.26 %             5
2024-11-04 19:42:43 +01:00
Raphael Defosseux
5e7fa3fc64 chore(ci): creating a develop tag on top of develop-commit-id tag for the local private registry
Signed-off-by: Raphael Defosseux <raphael.defosseux@eurecom.fr>
2024-11-04 15:12:20 +01:00
Bartosz Podrygajlo
63fb3af917 Remove unused ssb_PositionsInBurst_PR field from gNB yaml file example 2024-11-04 14:47:46 +01:00
Bartosz Podrygajlo
7a4aa41c90 Fix a typo in nrue.uicc.yaml file
Fix a typo that prevents casting max_chan to integer
2024-11-04 13:07:56 +01:00
Robert Schmidt
1b1be2ebea Merge remote-tracking branch 'origin/fedora-41-cleanup' into integration_2024_w44 (!3080)
Add Fedora 41, build_oai cleanup

- Add Fedora 41 to list of supported distributions
- Remove some dependencies in RHEL that are not necessary
- Cleanup some build_oai documentation of non-supported options
2024-11-01 11:59:44 +01:00
Robert Schmidt
da7a028a3f Merge remote-tracking branch 'origin/logs-refactor-orange' into integration_2024_w44 (!3078)
Simplify logs in gNB&UE

- reduce the amount of printf() that outputs useless info
- in MAC, PHY, NGAP, RRC, mark some "important" UE events with LOG_A for
  better visibility -> can put log_config.global_log_level analysis to
  only see important stuff
- in RRC, use some macro to consistently print logs
- track the cellID of a UE in RRC
2024-11-01 11:58:47 +01:00
Robert Schmidt
25405d1720 Merge remote-tracking branch 'origin/NR_PBCHSIM_changes' into integration_2024_w44 (!3040)
Update pbchsim to work with other numerologies

NR PBCHSIM updated to work with 15Khz and 120Khz.
2024-11-01 11:58:13 +01:00
Robert Schmidt
9d96326ce7 Remove RHEL8 from list of supported distributions 2024-10-31 12:53:08 +01:00
Robert Schmidt
d6938e7b2a Remove useless options: -x does nothing 2024-10-31 12:53:08 +01:00
Robert Schmidt
8d62bc38c0 Remove documented but unsupported build_oai options 2024-10-31 12:53:08 +01:00
Robert Schmidt
a93ad34c6b Remove non-required dependencies from install list
openssl and libffi are not required for building OAI. Remove them.
2024-10-31 12:53:08 +01:00
Robert Schmidt
9f56b8e21f Add Fedora 41 to list of supported distributions 2024-10-31 12:53:08 +01:00
Robert Schmidt
24e591df59 Merge remote-tracking branch 'origin/3-digit-mnc-in-sib1' into integration_2024_w44 (!3073)
small fix for 3 digit mnc usage in sib1

When 3 digit MNC is used in PLMN, during preparation of SIB1, first
digit of MNC was not taking into account. UE derives Serving Network
Name (SNN) using PLMN info from sib1. Because of 5GCore and UE has
different SNNs, this leads to XRES*, RES* mismatch during Authentication
Procedure between 5GCore and UE. (SNN is used for derivation of these
keys)
2024-10-31 08:41:20 +01:00
Robert Schmidt
571d1fceab Merge remote-tracking branch 'origin/hotfix-snow3g' into integration_2024_w44 (!3072)
snow3g: fix array size
2024-10-31 08:40:57 +01:00
Robert Schmidt
84db6fd9f3 Merge remote-tracking branch 'origin/add-functional-test-dft' into integration_2024_w44 (!2988)
Add functional DFT test

- clean up code on (i)dft calls
- add DFT test for some DFT sizes against trivial implementation: it
  tests a simple square signal in only real values
- correctly scale DFT-16
2024-10-31 08:40:21 +01:00
Robert Schmidt
55feed3645 Add chart for nr_pbchsim.otherSCS execution 2024-10-31 08:26:00 +01:00
Laurent THOMAS
ae8df083fc Add functional test for DFT 2024-10-30 18:04:59 +01:00
Laurent THOMAS
576d468809 Clean up intermediate DFT macros, remove non-existing DFTs
DFT for 9216 and 73728 don't exist and/or assert, so remove them from
the list.
2024-10-30 18:04:43 +01:00
Robert Schmidt
ffa3260ab5 Set explicit wd, set LD_LIBRARY_PATH to find dfts.so 2024-10-30 17:55:11 +01:00
Laurent THOMAS
5cd5f72533 case DFT12 processing with specific data organization: remove intermediate pointer 2024-10-30 17:54:58 +01:00
Robert Schmidt
f00ee9af2f review comment: to squash 2024-10-30 16:45:26 +01:00
Robert Schmidt
9395a0673e change macros for UE logging 2024-10-30 15:45:11 +00:00
Bartosz Podrygajlo
54a57bd2d6 RLC optimization - allocate SDU header and SDU data together
By allocating sdu data and sdu header together the total amount of
free/malloc calls per SDU is reduced by 1 increasing overall performance.
2024-10-30 16:03:01 +01:00
Bartosz Podrygajlo
7ae1aa21f4 RLC optimization - using function instead of function pointers
Moved some functions around so that instead of a function pointer a function
call is used. This enables inlining of functions which reduces number of function calls.
2024-10-30 16:02:50 +01:00
Laurent THOMAS
4cf2719bd9 scale in DFT16 as per normal scaling sqrt(16) = 4 2024-10-29 18:47:15 +01:00
Laurent THOMAS
f1f02ec0a1 use existing functions to retrieve (i)dft enum value 2024-10-29 18:47:15 +01:00
batuhan duyuler
edeb7b8f61 handling 1st digit of mnc in SIB1
During preparation of SIB1, first digit of MNC was not taking into account.
This leads to XRES*, RES* mismatch during Authentication Procedure between 5GCore and UE because of derived serving network names.
2024-10-29 16:43:26 +01:00
Robert Schmidt
d5cd07e37c Correct RRC log: remove trailing whitespace 2024-10-29 16:41:20 +01:00
Robert Schmidt
21d31e4359 RRC: more UE tracability through LOG_A
It is difficult to keep track of a "UE lifecycle". To make this more
easy, add LOG_A at major UE RRC messages.
2024-10-29 16:38:54 +01:00
Robert Schmidt
14d238baee RRC: keep track of UE's CellID
It will be used in the next commit
2024-10-29 16:38:07 +01:00
Robert Schmidt
a0a4096f95 Mark "gNB event" of NG connection thru LOG_A 2024-10-29 16:37:17 +01:00
Robert Schmidt
b8b921d49f Mark major "UE events" in in PHY+MAC thru LOG_A 2024-10-29 16:36:53 +01:00
Robert Schmidt
68f8ef7c7a Reduce amount of logs in L1/L2
This commit removes many logs that just show memory addresses, indices,
etc., which, I presume, do not mean anything to the "average user" and
developers alike.
2024-10-29 16:36:13 +01:00
Robert Schmidt
8cc6c0cbbb Various places: remove printf and/or transform to LOG_D 2024-10-29 16:35:47 +01:00
Robert Schmidt
83d9397002 MeasTimingConfig: only print ASN.1 when requested 2024-10-29 16:35:47 +01:00
Robert Schmidt
5180d4df74 nr-ru: remove "low-density" printf, transform rest to LOG_D
Most printf() do not show much information (like only a "X is ready",
which is not useful for subsystems). Remove those. The rest, make them
LOG_D.
2024-10-29 15:55:19 +01:00
Robert Schmidt
cbd5f1671f nr-softmodem.c: remove unnecessary printfs 2024-10-29 15:55:19 +01:00
Robert Schmidt
925566b075 module loader: remove printf(), put error into printf(stderr) 2024-10-29 15:55:19 +01:00
Robert Schmidt
85e198b178 Config module: use printf_params() to print log messages 2024-10-29 09:37:10 +01:00
Robert Schmidt
3e86e457b9 Logging: remove useless printf 2024-10-29 09:23:55 +01:00
Robert Schmidt
6c1d94a321 Merge branch 'integration_2024_w43' into 'develop'
Integration: `2024.w43`

Closes #769 and #841

See merge request oai/openairinterface5g!3069

* !2994 Refactor file descriptor handling in rfsimulator
* !3010 Fix heap overflow in websrv
* !3043 CI: Update RAN-gNB-N300-Timing-Phytest-LDPC test cases
* !3060 process registration reject in UE
* !3062 fix nr rlc tests
* !3067 Bugfix: Fill QFI for N3 GTP messages
* !3057 Bugfix in ue pusch mac pdu creation
* !3068 getopt() returns int
* !3056 F1AP Enc/Dec Library follow-up
* !3064 T: don't check argument in optimized version of T IDs
* !2786 Add F1 Handover procedures
* !2980 Refactor NAS 5GS PDU Session Establishment Accept handling and other NAS improvements
* !3063 Update yaml-cpp dependency handling
* !2989 NR gNB scheduler improvements for BWP operation
2024-10-29 06:55:10 +00:00
Cedric Roux
5ffa655902 snow3g: fix array size 2024-10-28 22:16:22 +01:00
Robert Schmidt
26fa3300e6 Merge remote-tracking branch 'origin/NR_gNB_sched_improvements' into integration_2024_w43 (!2989)
This MR removes limitations on BWP scheduler operation for which only
the information from the first UE of the list was taken into account. To
do so, I moved the VRB map check for DL and UL scheduler out of the
preprocessor and in the scheduler itself.

Closes: #769
2024-10-28 19:35:27 +01:00
Robert Schmidt
39f006926c Merge remote-tracking branch 'origin/yaml-cpp-fix-dependency' into integration_2024_w43 (!3063)
Update yaml-cpp dependency handling

- Added CPM fallback in case package is not found automatically.
- Using yaml-cpp::yaml-cpp target instead of yaml-cpp to silence
  deprecation warnings on newer cmake versions.
2024-10-28 19:34:48 +01:00
Robert Schmidt
d8d11d36c0 Mark CPM_SOURCE_CACHE as a CACHE variable
By omitting the variable CPM_SOURCE_CACHE as CACHE'd, it is actually
given to CPM, but does not appear when viewing it's content, e.g.,
through ccmake. Mark is as CACHE so that it will also appear.
2024-10-28 18:03:11 +01:00
Bartosz Podrygajlo
e086334a08 Update yaml-cpp dependency handling
- Added CPM fallback in case package is not found automatically.
 - Using yaml-cpp::yaml-cpp target instead of yaml-cpp to silence deprecation
   warnings on newer cmake versions.
2024-10-28 18:02:34 +01:00
Raymond Knopp
026190e0d1 nr_ulsch log2_maxh case for single-layer 2024-10-28 16:55:06 +01:00
Jaroslava Fiedlerova
538c115fb7 CI: reduce RX gain in 4G pipelines to avoid false RACH attempts 2024-10-28 13:42:19 +01:00
Robert Schmidt
7b2e4a8ce7 Merge remote-tracking branch 'origin/nr-nas-issue-841' into integration_2024_w43 (!2980)
Refactor NAS 5GS PDU Session Establishment Accept handling

- Closes #841
- address minor code issues
2024-10-28 11:53:00 +01:00
Raymond Knopp
e0c0df38ea adjustment of log2_maxh for 2-layer UL MIMO 2024-10-28 10:50:53 +01:00
Raymond Knopp
3e6f2db124 use ML receiver for 64 QAM UL-MIMO 2024-10-28 10:50:28 +01:00
luis_pereira87
ad9b91627c Prevent DLSCH scheduler to allocate PRBs outside of current BWP 2024-10-26 11:19:40 +02:00
francescomani
62301e9eef remove bf_weights from 2step RA config file 2024-10-26 11:19:40 +02:00
francescomani
c8387d706c making ULSCH preprocessor agnostic to UEs BWP and TDA 2024-10-26 11:19:37 +02:00
Robert Schmidt
5b73319278 Merge remote-tracking branch 'origin/f1-handover-procedures' into integration_2024_w43 (!2786)
Add F1 Handover procedures

- Clean up at RRC and MAC
- Add DU handover procedures, completely handle CellGroupConfig at DU
- Add CU handover procedures
- Maintain reestablishment working between/after handover
- Changes at UE to resync on different frequency DUs

Instructions: see doc/handover-tutorial.md

Things not implemented/open/missing: see #855
2024-10-25 20:22:01 +02:00
Robert Schmidt
ca8ca63744 Merge remote-tracking branch 'origin/hotfix-t-tracer' into integration_2024_w43 2024-10-25 20:18:58 +02:00
Robert Schmidt
6c6b10d020 Merge remote-tracking branch 'origin/f1ap-msg-encdec-followup' into integration_2024_w43 (!3056)
F1AP Enc/Dec Library follow-up

Follow-up after !2890
2024-10-25 20:18:33 +02:00
Robert Schmidt
f2c6fce30f Add 5G RRC documentation 2024-10-25 20:13:47 +02:00
Robert Schmidt
05f10decee Add handover tutorial
Co-authored-by: rmagueta <rmagueta@allbesmart.pt>
2024-10-25 20:13:47 +02:00
Robert Schmidt
ad81d48285 MAC doc: minor clarifications 2024-10-25 20:13:47 +02:00
Robert Schmidt
5c8ee81683 Update FEATURE_SET.md with F1 handover procedures 2024-10-25 20:13:47 +02:00
Robert Schmidt
e02aae4624 Open TODOs at RRC 2024-10-25 20:10:26 +02:00
Roberto Magueta
c956de6f27 Trigger F1 Handover on A3 event
When receiving a measurement report including an A3 event, trigger
handover towards the indicated cell.

Note that currently, we are still limited to one Cell by DU, hence
looking up a cell comes down to looking up a DU, as is done here.

Co-authored-by: batuhanduyuler <batuhan.duyuler@firecell.io>
Co-authored-by: Luis Pereira <lpereira@allbesmart.pt>
Co-authored-by: Robert Schmidt <robert.schmidt@openairinterface.org>
2024-10-25 20:10:26 +02:00
Robert Schmidt
8b4259c047 Ignore UE Context Modification Required during handover
During handover, we might receive a UE context Modification required
message. Currently, we cannot handle this; ignore the message.
2024-10-25 20:10:26 +02:00
Robert Schmidt
546ffee56b DU dies during HO: free HO context of UE to avoid dangling data 2024-10-25 20:10:26 +02:00
Robert Schmidt
b6ccf8aa77 Handle reestablishment during handover
This commit implements reestablishment during handover when occurring at
the source DU, either as a handover Failure or "normal" reestablishment
(something else went wrong). In this case, the CU will trigger HO
cancel, which in F1, means to cancel on the target DU. Also, undo any
previous ID changes. Retain the old CellGroupConfig (before handover)
for the case of reestablishment at source. If not needed, it is freed
after the reconfiguration complete.

Reestablishment on target cell during handover cannot be handled by the
gNB (yet). It is the same as with a normal reestablishment (not during
handover) on a different cell: that cell has no notion of the old UE, so
we cannot simply indicate the old UE to reestablish; at least, we would
need to cleanup the CellGroupConfig, and I am not sure this works out of
the box, either.
2024-10-25 20:10:26 +02:00
Robert Schmidt
c6434c80fd Reestablishment hack: free reconfigurationWithSync
After handover, the last CellGroupConfig received is the one for
handover, containing a reconfigurationWithSync. Resending this
CellGroupConfig to the UE after reestablishment would trigger a
handover. Free the reconfigurationWithSync to have the UE complete
reestablishment at the current cell.

The CU implementation of reestablishment modifies the CellGroupConfig.
It should not do this, but does as of now. The specification (38.473 Sec
8.7) foresees an optional F1 UE context modification procedure (which
can be used to receive the CellGroupConfig). This should be done instead
to retrieve the correct CellGroupConfig.

Note that the F1 UE context setup procedure, similar to the UE context
modification procedure, would also allow to perform reestablishment on a
DU that is not the original one.
2024-10-25 20:10:26 +02:00
Robert Schmidt
145fd2b415 Handle Release request during handover
If we release a request from a DU during, handle as follows:

- from the source: Handover is still ongoing, so ignore it by
  acknowledging the release, and marking handover as done. In this case,
  we did not receive an acknowledgement from the target, but since the
  source DU does not keep the UE context, we could not cancel the
  handover anymore either. The UE might come back on any DU through
  reestablishment (or simply be connected on the target)
- from the target: consider this to be a genuine release, and forward to
  AMF.

Co-authored-by: batuhanduyuler <batuhan.duyuler@firecell.io>
Co-authored-by: rmagueta <rmagueta@allbesmart.pt>
2024-10-25 20:10:26 +02:00
Robert Schmidt
a2da391e70 Handle successful HO after reconfigurationComplete
The HO is completed (from a pure RAN perspective) when receiving
reconfiguration complete. In that case, remove the HO context, and
signal successful handover through the callback. For the F1 handover,
this means releasing the UE at the source DU.

Co-authored-by: batuhanduyuler <batuhan.duyuler@firecell.io>
Co-authored-by: rmagueta <rmagueta@allbesmart.pt>
2024-10-25 20:10:26 +02:00
Robert Schmidt
e42c303bd7 Handle UE Context Modification Response in HO case
We expect the UE's RRC Reconfiguration Complete to come through the
target DU, as the "new UE" at the target CU. Also, function
CU_handle_UL_RRC_MESSAGE_TRANSFER() checks that the UL RRC Message,
through which we will receive RRC Reconfiguration Complete, matches the
DU UE ID stored in RRC. Since the DU UE ID will be the one at the target
DU, while up to now, we stored the DU UE ID at the source DU.

Correspondingly, update the DU UE ID to the one at the target DU; also
update the corresponding assoc_id.

Co-authored-by: batuhanduyuler <batuhan.duyuler@firecell.io>
Co-authored-by: rmagueta <rmagueta@allbesmart.pt>
2024-10-25 20:10:26 +02:00
Robert Schmidt
0e20c4c257 Handle UE context setup resp for HO: trigger reconfiguration on source
In this commit, handle the reception of a UE context setup response, in
the case of handover. In that case, store the gNB-DU UE ID and C-RNTI of
the UE at the target DU, and trigger a reconfiguration towards the UE at
the source DU via the callback.

To ensure that the CU-UP's PDCP is SN-aligned with the UE, use
cuup_notify_reestablishment() to reset the bearers with PDCP
reestablishment, which has already been implemented in the last commit.

Co-authored-by: batuhanduyuler <batuhan.duyuler@firecell.io>
Co-authored-by: rmagueta <rmagueta@allbesmart.pt>
2024-10-25 20:10:26 +02:00
Robert Schmidt
7b163f1688 Harmonize UE context setup resp bearer handling
This is preparatory work to handle the UE context setup response from
the target DU. There are two cases:

- "Initial" UE context setup response (during connection setup): we need
  to inform the CU-UP via an E1 message of the new bearers (GTP tunnel
  update)
- F1 handover:  we need to inform the CU-UP via an E1 message that there
  are DRBs to reestablish

There are two different functions, e1_send_bearer_updates() and
cuup_notify_reestablishment(), to do this. Harmonize the code, before
implementing the actual handover logic in the next commit.
2024-10-25 20:10:26 +02:00
Robert Schmidt
66b548060e Implement F1 Handover Trigger
Add a function to trigger an F1 handover, including the corresponding
telnet function implementation. The function looks up source&target DU,
creates a HO context, and reads PDU information to send a UE context
setup request to the target DU towards which to handover.

Co-authored-by: batuhanduyuler <batuhan.duyuler@firecell.io>
Co-authored-by: rmagueta <rmagueta@allbesmart.pt>
2024-10-25 20:10:26 +02:00
Robert Schmidt
c0770cc19b Make QoS characteristics function available
Functions get_qos_char_from_qos_flow_param() and
get_qos_characteristics() will be used in rrc_gNB_mobility.c to read PDU
information for handover. Move the definitions to a header to reuse
later.
2024-10-25 20:10:26 +02:00
Robert Schmidt
746dc29a46 Add HandoverPreparationInformation() ASN.1 encoder function
HandoverPreparationInformation will be used in the follow-up commit to
trigger a handover.

Co-authored-by: batuhanduyuler <batuhan.duyuler@firecell.io>
Co-authored-by: rmagueta <rmagueta@allbesmart.pt>
2024-10-25 20:10:26 +02:00
Robert Schmidt
90d8eefa59 Add new handover context structures for handover operation 2024-10-25 20:10:26 +02:00
Robert Schmidt
b4bf59c55b Add telnet module function to trigger F1 HO 2024-10-25 20:10:26 +02:00
Robert Schmidt
b5e3507764 Fix: store CellGroupConfig from initial UL RRC message
This F1 message sends us the CellGroupConfig of the UE. Store it in case
we need it. For instance, at least in OAI, it is possible to make a
handover without a DRB (this might or might not be standard compliant).
However, in this case, we did never receive a UE context setup request,
which stores the CellGroupConfig. Hence, store the first CellGroupConfig
we receive, to be able to do e.g., handover.
2024-10-25 20:10:26 +02:00
Robert Schmidt
35995c8a10 Move RETURN_IF_INVALID_ASSOC_ID() to header for use elsewhere
RETURN_IF_INVALID_ASSOC_ID() checks if an assoc_id (of a DU) is valid.
It will be also used in the mobility RRC module later. Move it to the DU
header (where it logically belongs) to move it from there.
2024-10-25 20:10:26 +02:00
Robert Schmidt
6cd76ff862 Remove unused includes and comment with resolved issue 2024-10-25 20:10:25 +02:00
Roberto Magueta
67eb94db3f Print RRC neighbor cell measurements, if present
Co-authored-by: Luis Pereira <lpereira@allbesmart.pt>
2024-10-25 20:10:25 +02:00
Robert Schmidt
c3ef6df44b Bugfix: request release in case of failed RA
Prior to this commit, after RA failure, the DU would send a UE context
release complete, without actually requesting one. This could lead to
inconsistent state between DU and CU, because the CU might just discard
this (unrequested) message, and not actually trigger a release [1].

Thus, refactor the release request into a function, and use it to
request release of a UE for which RA has not been completed. If the CU
does not know the UE, release the UE immediately.

[1] One possibility would be that during reestablishment, the CU would
request to look up an old DU UE ID when it has been released, resulting
in

    Assertion (oldUE) failed!
    In dl_rrc_message_transfer() /home/oaicicd/robert/openairinterface5g/openair2/LAYER2/NR_MAC_gNB/mac_rrc_dl_handler.c:860
    CU claims we should know UE bc7f, but we don't
2024-10-25 20:10:25 +02:00
rmagueta
ecd941e946 Remove old RA process(es) when removing UE
In handover, we might need to remove a UE that we knew under it's
C-RNTI, for which we also have the RA process. Hence, when removing a UE
by RNTI, remove it also from RA.
2024-10-25 20:10:25 +02:00
Roberto Magueta
cddffe6f30 Add config files (TDD/FDD) for multiple DUs scenario
Co-authored-by: rmagueta <rmagueta@allbesmart.pt>
2024-10-25 20:10:25 +02:00
rmagueta
4a5bf53caa UE: Improve synchronization for reconfigurationWithSync
Improve synchronization to also handle handover between gNB-DUs with
differing carrier freqs.
2024-10-25 20:09:41 +02:00
Guido Casati
c3f1824f0b Use capture_pdu_session_establishment_accept_msg in handleDownlinkNASTransport
* DL NAS Transport messages can piggy-back 5GSM messages
* the relevant decoding functions can be called in the handler (e.g. capture_pdu_session_establishment_accept_msg)
2024-10-25 12:43:44 +02:00
Guido Casati
9a67c5e5b5 Fix scoping issues for variable declarations in switch-case blocks (capture_pdu_session_establishment_accept_msg) 2024-10-25 11:52:28 +02:00
Guido Casati
b5f4c55d88 Use capture_pdu_session_establishment_accept_msg with NAS_DOWNLINK_DATA_IND:FGS_PDU_SESSION_ESTABLISHMENT_ACC
* the capture_pdu_session_establishment_accept_msg function is already handling
  the code in the case FGS_PDU_SESSION_ESTABLISHMENT_ACC of NAS_DOWNLINK_DATA_IND

Closes: #841
2024-10-25 11:50:52 +02:00
Guido Casati
66231badaf Refactor PDU address IE in PDU Session Establishment Accept
* take 3 bits for PDU session type value
* add define for SMF's IPv6 link local address
2024-10-25 11:44:14 +02:00
Guido Casati
a85be06c72 Add defines for IPv4 and IPv6 PDU address header fields 2024-10-25 11:42:22 +02:00
Robert Schmidt
78587d6cf0 Merge remote-tracking branch 'origin/getopt-int' into integration_2024_w43 (!3068)
getopt() returns int
2024-10-24 19:23:05 +02:00
Robert Schmidt
1a834a704a Merge remote-tracking branch 'origin/NR_UE_fix_mac_pdu' into integration_2024_w43 (!3057)
Bugfix in ue pusch mac pdu creation

When more than one sdu with equal priority is present, there could be
buffer left after serving the lcids and also not enough to equally serve
all lcids. This commit checks for this condition. Before this fix the ue
would send malformed mac pdus when serving multiple lcids.
2024-10-24 19:22:40 +02:00
Robert Schmidt
cf9854601c getopt() returns int
See getopt(3): returns int, so store it in an int variable.
I went through all occurrences, project-wide. All return values of
getopt() should be stored in ints now.
2024-10-24 19:22:06 +02:00
Guido Casati
f85271a349 Free F1AP messages in RRC task after processing 2024-10-24 16:23:05 +02:00
Guido Casati
b17f1d1b57 Free F1 UL RRC Message Transfer after use in F1AP_DU_task 2024-10-24 16:22:04 +02:00
Guido Casati
74804f2ba3 Free F1 DL RRC Message Transfer after use in F1AP_CU_task 2024-10-24 16:22:04 +02:00
Guido Casati
5e5d17b05b Free F1 Setup Response in the context where it was allocated 2024-10-24 16:22:03 +02:00
Guido Casati
a29cbf0543 Cleanup of cast in gNB_DU_name memcpy 2024-10-24 16:22:03 +02:00
Guido Casati
46fadda22f Add license header to f1ap_lib_test.c 2024-10-24 16:22:03 +02:00
Guido Casati
52f96fd91b Complete adoption of Equality Check macros in f1ap_lib_common.c 2024-10-24 16:22:03 +02:00
Robert Schmidt
ee4301b013 Merge remote-tracking branch 'origin/fix-qfi-gtp' into integration_2024_w43 (!3067)
Bugfix: Fill QFI for N3 GTP messages
2024-10-24 16:13:56 +02:00
Robert Schmidt
981f18dd18 Merge remote-tracking branch 'origin/hotfix-rlc-tests' into integration_2024_w43 (!3062)
fix nr rlc tests

in openair2/LAYER2/nr_rlc/tests:

    ./run_tests.sh

was failing.
2024-10-24 16:13:26 +02:00
Robert Schmidt
4a8575eaf2 Merge remote-tracking branch 'origin/registration-reject' into integration_2024_w43 (!3060)
process registration reject in UE

when the 5GC rejects the ue, the message was not processed (information
element not declared)
this MR process it to print it and stop the UE
a more complete code should be done when the UE will be able to select
another cells than the most powerful PBCH, but it require larger
enhancement
2024-10-24 16:12:45 +02:00
Robert Schmidt
dc05c39e28 Merge remote-tracking branch 'origin/ci-timing-improvements' into integration_2024_w43 (!3043)
CI: Update RAN-gNB-N300-Timing-Phytest-LDPC test cases

- update enc/decoder tests in RAN-gNB-N300-Timing-Phytest-LDPC - test
  only for given SNR value (check of the test results to be added in the
  following MR)
- add cores to Tpool in the nr_dlsim test cases, currently we test with
  only one core
- always execute all the nr_ulsim/nr_dlsim tests, even if one of them
  fails
- add new nr_dlsim test cases - test with 4 antennas, 2 layers
2024-10-24 16:11:16 +02:00
Robert Schmidt
223e6eee3d Merge remote-tracking branch 'origin/fix-websrv' into integration_2024_w43 (!3010)
Fix heap overflow in websrv
2024-10-24 16:10:56 +02:00
Robert Schmidt
8eae2ff07b Merge remote-tracking branch 'origin/refactor-rfsim-fds' into integration_2024_w43 (!2994)
Refactor file descriptor handling in rfsimulator

- add hashtable iterator to hashtable.c
- use hashtable for file descriptor to buffer_t mapping in rfsimulator

This enables the use of file descriptors above 250. The linux file
descriptors can reach the value of FD_SETSIZE which could be e.g. 1024.
This is not an issue in most cases but if the UE or gNB process opens a
lot of file descriptors for other purposes we might see rfsimulator file
descriptors reach > 250 and cause a segfault.

Also added tests for new hashtable functions.
2024-10-24 16:10:00 +02:00
francescomani
38a05d8aad making DLSCH preprocessor agnostic to UEs BWP and TDA 2024-10-24 15:04:27 +02:00
francescomani
3add576195 remove use of VRB map bitwise not in dlsch and ulsch preprocessor 2024-10-24 13:03:22 +02:00
Robert Schmidt
7c13c790d7 Bugfix: Fill QFI for N3 GTP messages
Instead of hardcoding to 0, instruct the GTP module to send N3 GTP
packets with the right GTP.

We currently only support one QoS Flow, so check that it is really only
one.
2024-10-24 10:42:45 +02:00
Bartosz Podrygajlo
883333bfe6 Use hashtable for mapping FDs to buffer_ts in rfsimulator.
Use hashtable for determining which buffer_t does a sock map to. This
lifts the restriction for number of FDs used by applications using rfsimulator.
2024-10-24 10:11:00 +02:00
Bartosz Podrygajlo
e7f858f6b2 Add iterator to hashtable and hashtable unit tests 2024-10-24 09:43:35 +02:00
Sakthivel Velumani
9333662cd8 Update logging in mac 2024-10-23 11:40:37 -04:00
Sakthivel Velumani
5855f766f8 Bugfix in ue pusch mac pdu creation
When more than one sdu with equal priority is present, there could be
buffer left after serving the lcids and also not enough for equaly
serving all lcids. This commit checks for this condition. Before this
fix the ue would send malformed mac pdus when serving multiple lcids.
2024-10-23 11:40:33 -04:00
Cedric Roux
78a4d0754d T: don't check argument in optimized version of T IDs 2024-10-23 14:28:11 +02:00
Laurent THOMAS
345bd9cc82 remove duplicated code, add registration reject cause 2024-10-23 10:51:17 +02:00
Robert Schmidt
5378c4d8d9 Refactor RRC Reconfiguration function
Refactor the RRC reconfiguration function to reuse it also later for
sending the reconfiguration including the handover trigger.
2024-10-22 18:12:51 +02:00
Robert Schmidt
1783932e37 Msg2: Apply CellGroupConfig if necessary
After RA, in the case of HO, we need to make sure to use the right radio
configuration (MCS table, etc). This commit is important to make HO
actually work.
2024-10-22 18:12:51 +02:00
Robert Schmidt
dadd05e0eb Skip adding of second LCID1
Our initial CellGroupConfig always contains LCID1, because in normal
connection setup, the DU has to automatically set it up anyway. In
handover/UE Context Setup, the CU requests to set up SRB1 (which we
assume to be LCID1), but we reuse the initial CellGroupConfig. To not
have SRB1 added twice, skip in this case.
2024-10-22 18:12:51 +02:00
Robert Schmidt
0b2757b36a Implement handler for F1 UE context Setup in HO case
This commit implements adding a new UE on the target DU in case of
handover. We identify this case by the fact that the gNB-CU did not send
a gNB-DU UE ID (which is optional in F1AP, but not in our
implementation), such that we know there is no corresponding UE, which
therefore has to be created.

If it happens that there is a handover preparation information, we read
the UE capabilities from this information, and subsequently trigger the
creation of a new UE.

Another change is that for all bearers that we are asked to setup, we
add reestablishRLC so that the UE does a reestablishment during the
reconfiguration.

As we have to remove the reconfigurationWithSync and reestablishRLC IE
after application of the CellGroupConfig (because we might reuse the
CellGroupConfig later), free these IEs. As there are now multiple fields
to free, introduce a separate nr_mac_clean_cellgroup() function that
handles cleaning of the CellGroupConfig.

Co-authored-by: batuhanduyuler <batuhan.duyuler@firecell.io>
Co-authored-by: rmagueta <rmagueta@allbesmart.pt>
2024-10-22 18:12:51 +02:00
Robert Schmidt
e7b56b3d08 UE context setup req: gNB_DU_ue_id optional, use 0xffffffff to signal 2024-10-22 18:12:51 +02:00
Robert Schmidt
c4a9bd1718 Refactor reading of NR cap from capability list
The next commit will modify the UE context setup request procedure to
(possibly) receive UE capabilities through Handover Preparation
Information, which extracts the UE capabilities for the UE to be setup.
To avoid code duplication, extract the code that will be needed in UE
capability extraction from Handover Preparation Information.
2024-10-22 18:12:51 +02:00
rmagueta
a927db9ef6 Add c-rnti to UE context setup response
No logic changes in this commit; to be used for the handover case later.

Co-authored-by: rmagueta <rmagueta@allbesmart.pt>
2024-10-22 18:12:51 +02:00
Robert Schmidt
5c2b725654 Refactor new-RNTI functionality in separate function
This function will be used in the case of a handover for getting a new
RNTI (checking that we do not reuse an already used RNTI).
2024-10-22 18:12:50 +02:00
Robert Schmidt
fef589cf88 Refactor reconfigurationWithSync ASN.1 to separate function
Will be reused later for handover.

Co-authored-by: batuhanduyuler <batuhan.duyuler@firecell.io>
2024-10-22 18:12:50 +02:00
Robert Schmidt
c854b9cebb get_UE_waiting_CFRA_msg3(): check that RA process is for given RNTI
Co-authored-by: batuhanduyuler <batuhan.duyuler@firecell.io>
2024-10-22 18:12:50 +02:00
Robert Schmidt
004403c84d Implement F1 UE Ctxt Modif Transmission Action Indicator
Implement the Transmission Action Indicator F1AP forwarding logic, and
add it to the F1 internal representation structure. After the
transmission interrupt timer (during which SRB1 can send messages), the
UE will be out-of-sync (we assume it's not there anymore).

Co-authored-by: batuhanduyuler <batuhan.duyuler@firecell.io>
Co-authored-by: rmagueta <rmagueta@allbesmart.pt>
2024-10-22 18:12:50 +02:00
Robert Schmidt
d70561d509 Implement F1 UE Ctxt HandoverPrepInfo in F1
Implement the HandoverPreparationInformation F1AP forwarding logic, and
add it to the F1 internal representation structure.

No logic is implemented in this commit.

Co-authored-by: batuhanduyuler <batuhan.duyuler@firecell.io>
Co-authored-by: rmagueta <rmagueta@allbesmart.pt>
2024-10-22 18:12:50 +02:00
Robert Schmidt
5c6d90aaff Use NR_timer_t for UE transmission interrupt, e.g., RRC processing
Refactor the RRC processing timer to be a generic "transmission
interrupt" timer, and use NR_timer_t for it. Also,
depending on the kind of RRC processing (see 38.331 table 12.1-1),
timing requirements might be different. However, the DU does not always
know which RRC processing is ongoing, and does not get this information
via F1. Hence, introduce a "worst case" delay time, which aligns with
the spec (it says these times are "minima") and is accepted by COTS UE.

The gNB MAC might need to stop transmission either for some time (RRC
processing), or continuously (transmission stop requested by CU). Those
can be handled in one common timer implementation. The continuous case
will be used in a follow-up commit.

Co-authored-by: Luis Pereira <lpereira@allbesmart.pt>
2024-10-22 18:12:50 +02:00
Cedric Roux
b2b418fc2c fix nr rlc tests
in openair2/LAYER2/nr_rlc/tests:

    ./run_tests.sh

was failing.
2024-10-22 17:37:14 +02:00
Laurent THOMAS
21a7f994c3 process registration reject in UE 2024-10-22 17:03:19 +02:00
Robert Schmidt
2c07f0081e Merge branch 'ci-remove-unused-code' into 'develop' (!3058)
CI: remove unused code, clean up imports

* Remove pyshark, matplotlib imports, as they are not used
* Remove stats_monitor.py, as the CI does not use it
* Clean up many warnings shown by pyflakes regarding includes that we don't use
2024-10-22 13:12:14 +00:00
Laurent THOMAS
6cedca1c1d fix error of grouping UE to free list for phy layer and ue to free list for fapi 2024-10-22 12:25:30 +02:00
Laurent THOMAS
9898c673d8 print rnti as hexadecimal 2024-10-22 11:05:20 +02:00
Laurent THOMAS
1614ae19e8 trace as information UE RACH steps for 4G 2024-10-22 11:05:20 +02:00
Robert Schmidt
6b32dd6e8e Avoid array buffer overflow in ue_pmch_procedures()
Adapt as code above offending line to not overflow array. Avoids UBSan
error

    openair1/SCHED_UE/phy_procedures_lte_ue.c:2983:36: runtime error: index 8 out of bounds for type 'int [8][1]'
2024-10-22 11:05:20 +02:00
Robert Schmidt
76860fd44b put_UE_in_freelist(): avoid array overflow 2024-10-22 11:05:20 +02:00
Robert Schmidt
985f44c1dd 4G RFsim docker-compose: suppress ASan leak check, lte-{ue,}softmodem is leaky 2024-10-22 11:05:20 +02:00
Robert Schmidt
712988d437 NAS message encoding: avoid unaligned access through memcpy() 2024-10-22 11:05:20 +02:00
Robert Schmidt
e94f59edb1 IES_DECODE_U16 macro: load from 16-bit aligned address
The IES_DECODE_U16 macro loads a 16 bit integer from an arbitrary
address; this can lead to reads from misaligned addresses, and undefined
behavior sanitizer warns, like, e.g., so:

    openair3/NAS/COMMON/IES/ProtocolConfigurationOptions.c:62:5: runtime error: load of misaligned address 0x7f3c24032c01 for type 'uint16_t', which requires 2 byte alignment

To fix this, first use memcpy() to load to a 16-bit aligned address,
then do the actual decoding.
2024-10-22 11:05:20 +02:00
Robert Schmidt
71bd10b4a2 docker-compose: write correct container image to use for 4G and asan 2024-10-22 11:05:20 +02:00
Robert Schmidt
cb7942d460 Build CI images for eNB/lteUE with sanitizers, and use in 4G RF sim 2024-10-22 11:05:20 +02:00
Laurent THOMAS
e48e38650d Fix various problems in 4G NAS handling
- rename as_nas_info_t member data to nas_data to have a uniq name to
  trace between complex malloc/free of this pointer
- fix, maybe not perfect, these pais od malloc/free
- remove typedef name changes across transmission of these as_nas_info_t
  over itti, as name changing makes it even more confusing
- remove globals that are likely possible races
- in as_message_decode() fix memcpy size, it is hard to understand the
  initial idea, likely the author beleives a struct of struct makes a
  intermediate pointer
- in network_api.c remove globals (static but used globally)
- remove casts that are there to hide gcc warnings on probable unaligned
  access
- remain a weird mix of packed/unpacked versions of the same typedef,
  but gcc is happy
2024-10-22 11:05:20 +02:00
Laurent THOMAS
8df8de894b get out statistic array in case the rnti is not found 2024-10-22 11:05:20 +02:00
Laurent THOMAS
972a251798 bug in code duplication 2024-10-22 11:05:20 +02:00
Laurent THOMAS
a1fc1972e1 one old bug, one regression 2024-10-22 11:05:20 +02:00
Robert Schmidt
670e1fb8b4 CI: remove unknown imports and uses of names
pyflakes warns about various errors, addressed here. For cls_cluster.py,
remove (unknown) sys.exit and replace through Exception, as sys.exit()
has the unwanted effect that the CI script would stop.  Instead, raise
an Exception that would show the problem in the HTML, and ensures that
the script runs until the end.

These are the warnings flagged by pyflakes.

    cls_cluster.py:297:4: undefined name 'sys'

    cls_containerize.py:39:1: 'subprocess' imported but unused
    cls_containerize.py:41:1: 'threading' imported but unused
    cls_containerize.py:43:1: 'multiprocessing.Process' imported but unused
    cls_containerize.py:43:1: 'multiprocessing.Lock' imported but unused
    cls_containerize.py:43:1: 'multiprocessing.SimpleQueue' imported but unused
    cls_containerize.py:49:1: 'cls_cluster as OC' imported but unused
    cls_containerize.py:50:1: redefinition of unused 'cls_cmd' from line 42

    cls_module.py:28:1: 'os' imported but unused
    cls_module.py:29:1: 'sys' imported but unused
    cls_module.py:34:1: 'subprocess' imported but unused
    cls_module.py:35:1: 'datetime.datetime' imported but unused
    cls_module.py:211:11: undefined name 'sshconnection'

    cls_oaicitest.py:37:1: 'pexpect' imported but unused
    cls_oaicitest.py:47:1: 'cls_cluster as OC' imported but unused
    cls_oaicitest.py:54:1: 'matplotlib.pyplot as plt' imported but unused
    cls_oaicitest.py:55:1: 'numpy as np' imported but unused

    cls_oai_html.py:34:1: 'sys' imported but unused
    cls_oai_html.py:41:1: 'multiprocessing.Process' imported but unused
    cls_oai_html.py:41:1: 'multiprocessing.Lock' imported but unused
    cls_oai_html.py:41:1: 'multiprocessing.SimpleQueue' imported but unused

    cls_physim.py:37:1: 'multiprocessing.SimpleQueue' imported but unused

    cls_static_code_analysis.py:39:1: 'time' imported but unused
    cls_static_code_analysis.py:40:1: 'multiprocessing.Process' imported but unused
    cls_static_code_analysis.py:40:1: 'multiprocessing.Lock' imported but unused
    cls_static_code_analysis.py:40:1: 'multiprocessing.SimpleQueue' imported but unused

    epc.py:41:1: 'multiprocessing.Process' imported but unused
    epc.py:41:1: 'multiprocessing.Lock' imported but unused
    epc.py:41:1: 'multiprocessing.SimpleQueue' imported but unused

    main.py:60:1: 'pexpect' imported but unused
    main.py:66:1: 'datetime' imported but unused
    main.py:68:1: redefinition of unused 'subprocess' from line 63
    main.py:70:1: 'multiprocessing.Process' imported but unused
    main.py:70:1: 'multiprocessing.Lock' imported but unused
    main.py:70:1: 'multiprocessing.SimpleQueue' imported but unused

    provideUniqueImageTag.py:2:1: 'os' imported but unused
2024-10-22 09:51:23 +02:00
Robert Schmidt
a736bec570 Remove eNB_Trace: it is not used by the CI 2024-10-22 09:23:21 +02:00
Robert Schmidt
f8b480be3e Remove stats_monitor.py: it is not used by the CI 2024-10-22 09:23:01 +02:00
Robert Schmidt
8ef52d5432 Remove pyshark import: is not used 2024-10-22 09:08:51 +02:00
Robert Schmidt
ec06c78b30 Merge branch 'integration_2024_w42' into 'develop'
Integration: `2024.w42`

Closes #547, #853, #854, #858, #859, #862, #844, and #746

See merge request oai/openairinterface5g!3053

* !3047 Resolve compilation warnings on ARM
* !3052 Optimize T_ID() macro.
* !3045 CI: Reduce tested DL throughput on Aerial
* !3039 fix for Other SI reception when BWP start != 0
* !2997 websrv regression
* !3041 Update NR SA Tutorials
* !3042 Update TESTBenches.md to reflect current testbench
* !3004 Hotfix to remove an unwanted TX power reduction when using multiple TX antenna ports.
* reduce ssPBCH_BlockPower in gNB config of FHI7.2 pipeline
* !3046 A testsuite and a benchmark for RLC AM mode
* !3038 Various bugfixes for gNB stability, cleanup
* !3051 PUCCH2 DTX detection
* nr_psbchsim: fix segv by providing correct get_nrUE_params()
* !3049 Improve PUSCH and PUCCH SNR stability
* !3054 Allocate and add sD to DRB NSSAI in case sD != 0xffffff
2024-10-21 19:17:56 +00:00
Jaroslava Fiedlerova
3f51197548 Merge remote-tracking branch 'origin/fix-nssai-f1ap' into integration_2024_w42 (!3054)
Currently, sD has not been allocated, so the octet string is empty. Fix the
allocation to correctly write&read NSSAIs in UE context setup/modification
request messages.
2024-10-21 16:32:14 +02:00
Jaroslava Fiedlerova
784ae2a4df Merge remote-tracking branch 'origin/Improve_UL_SNR_stability' into integration_2024_w42 (!3049)
Reset TPC to 0 dB, after sending it to the UE, to not request new gain multiple
times before computing new value for SNR.
2024-10-21 16:23:07 +02:00
Robert Schmidt
2fe1c2f749 Correctly read NSSAI in UE Context Setup Request 2024-10-21 14:36:31 +02:00
Robert Schmidt
78fc47229b psbchsim.c: add license banner 2024-10-21 11:06:25 +02:00
Robert Schmidt
44616a6a19 nr_psbchsim: fix segv by providing correct get_nrUE_params()
When running, nr_psbchsim, we get this UBsan error:

    openair1/PHY/NR_UE_ESTIMATION/nr_adjust_synch_ue.c:79:16: runtime error: member access within misaligned address 0x0ff4278c791c for type 'struct nrUE_params_t', which requires 8 byte alignment

The problem is that the corresponding definition of
get_nrUE_params() in psbchsim.c does not actually return the UE params,
but void, so we might or might not get something that resembles valid
data in nr_adjust_synch_ue.c. Fix this by including nr-uesoftmodem.h
(that provides the correct declaration) and define it correctly. Due to
type mismatches, also adapt downlink_frequency, uplink_frequency_offset,
and openair_cfg (which might result in the same type of bugs).
2024-10-21 11:04:43 +02:00
V. Tuan Ngo
da84a70414 Allocate and add sD to DRB NSSAI in case sD != 0xffffff 2024-10-21 10:45:11 +02:00
Robert Schmidt
dd7c3f80e8 Merge remote-tracking branch 'origin/pucch2_dtx' into integration_2024_w42 (!3051)
This adds DTX detection in PUCCH 2 receiver. This is detected by MAC
already which will drop PUCCH 2 indications that are detected as DTX.
For the moment this uses the same pucch0_dtx_threshold value indicated
in L1 section of the configuration file. The feature firstly reduces
unnecessary logging on stdout and the use of invalid CSI measurements in
the MAC scheduler.

Closes: #547
2024-10-19 12:56:21 +02:00
Robert Schmidt
4c0fa90818 Merge remote-tracking branch 'origin/bugfixes-gnb-stability' into integration_2024_w42 (!3038)
- Fixes #853, #854, #858, #859, #862
- handle repeated NGAP Initial context setup requests, thereby fixing assert:

      Assertion (!ue_p->as_security_active) failed!
      In rrc_gNB_generate_SecurityModeCommand() /home/eurecom/raymond/openairinterface5g/openair2/RRC/NR/rrc_gNB.c:2590
      logic error: security already activ

- A lot of cleanup: remove almost all use of protocol_ctxt_t in 5G RRC and use
  existing pointers instead
2024-10-19 12:48:50 +02:00
Robert Schmidt
5f5d859694 Merge remote-tracking branch 'origin/rlc-benchmark' into integration_2024_w42 (!3046)
Introduce two tests for NR RLC AM entity:

- test_nr_rlc_am_entity
- benchmark_nr_rlc_am_entity

The benchmark can be used to verify processing time improvements for NR RLC AM
entity. The benchmark creates two entities and creates an unbalanced
communication channel between them with 10% loss packet loss and 100:1 PDU sent
ratio. This allows the lists in RLC to build up and triggers RLC AM code
related to looking through the segment/pdu lists.

Example benchmark output:

    ubuntu@zeus:~/bpodrygajlo/openairinterface5g/cmake_targets/build$ ./openair2/LAYER2/nr_rlc/tests/benchmark_nr_rlc_am_entity
    [LOG] init aborted, configuration couldn't be performed
    log init done
    CMDLINE: "./openair2/LAYER2/nr_rlc/tests/benchmark_nr_rlc_am_entity"
    [CONFIG] debug flags: 0x00400000
    2024-10-16T14:58:20+02:00
    Running ./openair2/LAYER2/nr_rlc/tests/benchmark_nr_rlc_am_entity
    Run on (8 X 4700 MHz CPU s)
    CPU Caches:
      L1 Data 48 KiB (x4)
      L1 Instruction 32 KiB (x4)
      L2 Unified 1280 KiB (x4)
      L3 Unified 12288 KiB (x1)
    Load Average: 0.48, 0.27, 0.20
    ***WARNING*** CPU scaling is enabled, the benchmark real time measurements may be noisy and will incur extra overhead.
    --------------------------------------------------------------------
    Benchmark                          Time             CPU   Iterations
    --------------------------------------------------------------------
    BM_nr_rlc_am_entity/100        50096 ns        50097 ns        13101
    BM_nr_rlc_am_entity/256       140386 ns       140387 ns         4868
    BM_nr_rlc_am_entity/1024      536323 ns       536311 ns         1309
    BM_nr_rlc_am_entity/4096     2084464 ns      2084385 ns          338
    BM_nr_rlc_am_entity/16384    8309318 ns      8309458 ns           81
    BM_nr_rlc_am_entity/20000    9843792 ns      9843774 ns           68
2024-10-19 12:47:46 +02:00
Jaroslava Fiedlerova
08972f35cb CI: lower ssPBCH_BlockPower in gNB conf for RAN-SA-FHI72-CN5G pipeline
Tests showed that a UE connected much faster, and did not fail as often
on Msg3.
2024-10-19 12:44:33 +02:00
Jaroslava Fiedlerova
d156661ce3 CI: decrease test SNR for nr_pucchsim with 8 antennas 2024-10-18 16:29:28 +02:00
Raymond Knopp
03b24c1ee6 fixed signal level computation for PUCCH2 and threshold in pucchsim.
Threshold allows detection with -9 dB SNR with 8 RX antennas
2024-10-18 15:43:08 +02:00
Jaroslava Fiedlerova
6a54905b2e Merge remote-tracking branch 'origin/remove_power_reduction_for_MIMO' into integration_2024_w42 (!3004)
This hotfix removes division by num_antenna_ports in PDSCH precoding matrix generation.
These matrices are defined for CSI reporting in this way but here we are using them for
transmission and this results in an unwanted 10*log10(num_antenna_ports) reduction in
transmit power (3dB for 2 antenna ports, 6dB for 4 antenna ports, etc.)
2024-10-18 14:54:28 +02:00
Raghavendra Dinavahi
22dd82556d New tests for nr_pbchsim 2024-10-18 14:47:26 +02:00
francescomani
af53f35824 avoid processing PUCCH2 without polar if declared missed detection 2024-10-18 11:17:58 +02:00
luis_pereira87
de887a1d2a Improve PUSCH and PUCCH SNR stability
Reset TPC to 0 dB, after sending it to the UE, to not request new gain multiple times before computing new value for SNR
2024-10-18 09:06:28 +01:00
Jaroslava Fiedlerova
0d4c6b8c4f CI: add new testcases for nr_dlsim testing in timing pipeline
Add new nr_dlsim test cases for testing with 4 antennas, 2 layers
in both scenarios - with and without T2 card.
2024-10-18 09:36:13 +02:00
Jaroslava Fiedlerova
61e7c0ae39 CI: Enable thread-pool in RAN-gNB-N300-Timing-Phytest-LDPC
Enable multi-threading in the nr_dlsim test with CPU, set 5 cores for
thread-pool using "-X 8,9,10,11,12" option.
2024-10-18 09:35:20 +02:00
Robert Schmidt
1917f5486d Merge remote-tracking branch 'origin/update-TESTBenches-doc' into integration_2024_w42 (!3042) 2024-10-18 06:32:07 +02:00
Robert Schmidt
d6e81682fc Merge remote-tracking branch 'origin/NR_SA_Tutorials' into integration_2024_w42 (!3041)
- Update links for the latest Ubuntu 24.04 LTS iso file
- Update docker install to the latest instructions on the official website
- Update UHD to v4.7.0.0 and update dependencies for Ubuntu 24.04
2024-10-18 06:31:47 +02:00
Robert Schmidt
d07044de7f Merge remote-tracking branch 'origin/websrv-small-regression' into integration_2024_w42 (!2997) 2024-10-18 06:31:34 +02:00
Robert Schmidt
eafca88d1a Merge remote-tracking branch 'origin/NR_UE_FIX_DECODE_OTHERSI' into integration_2024_w42 (!3039)
Test configuration: Tested SIB19 reception on SCS120 Khz + 50Mhz bw
config file used:
targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band257.u3.32prb.usrpx410.conf
+ NTN config commands used

    sudo ./nr-softmodem -O ../../../targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band257.u3.32prb.usrpx410.conf --sa --rfsim -d
    sudo ./nr-uesoftmodem --band 261 -C 27533280000 -r 32 --numerology 3 --ssb 72 --sa --rfsim -d --ue-scan-carrier

The Issue is that SIB19 is not being received because of CRC error, only
SIB1 was being received.
2024-10-18 06:27:55 +02:00
Robert Schmidt
839a16f477 Merge remote-tracking branch 'origin/Aerial_reduce_throughput' into integration_2024_w42 (!3045)
Reduce tested DL throughput on Aerial pipeline from 700 to 600Mbps
2024-10-18 06:27:20 +02:00
Robert Schmidt
39af48fafc Merge remote-tracking branch 'origin/log-optimization' into integration_2024_w42 (!3052)
This changes the way T_IDs are defined. The T_ID macro was using a
integer to pointer cast in order to provide type safety. This trick
disables some compiler optimizations, as explained here:
https://clang.llvm.org/extra/clang-tidy/checks/performance/no-int-to-ptr.html.
Removing the type cast reenables the compiler optimizations.
2024-10-18 06:26:38 +02:00
Robert Schmidt
3f9d9f81d4 Merge remote-tracking branch 'origin/Address-ARM-warnings' into integration_2024_w42 (!3047)
This MR aims to address warnings raised when compiling for ARM ( tested
with cross compilation, not directly on ARM hardware ).  The addressed
warnings are as follows:

- An unused variable in file oai_dfts_neon.c
- Wrong printf format specifier related to oai_cputime_t
- Wrong parameter type in qam64_qam64 call

This MR closes issue #844

Also, correctly set the pkg-config search path for libraries for the
target system. Also closes: #746
2024-10-18 06:24:51 +02:00
Robert Schmidt
c4344f26d1 Correctly pass ID to rrc_gNB_get_next_transaction_identifier() 2024-10-17 19:06:45 +02:00
Robert Schmidt
132cd64bb0 Handle empty RRC ULInformationTransfer
A UE might send a ULInformationTransfer without the actual content present
(intentionally or not). Check this and handle appropriately to avoid
a segfault when reading the empty NAS message.

Closes: #862
2024-10-17 19:06:45 +02:00
Robert Schmidt
304372d5e6 Remove unused protocol_ctxt_t 2024-10-17 19:06:45 +02:00
Robert Schmidt
63a0785430 Cleanup rrc_gNB_process_GTPV1U_CREATE_TUNNEL_RESP(): pass UE context directly 2024-10-17 19:06:45 +02:00
Robert Schmidt
759b0ec39e Cleanup rrc_CU_process_ue_modification_required(): remove protocol_ctxt_t 2024-10-17 19:06:45 +02:00
Robert Schmidt
ff3a14f7f9 Cleanup rrc_gNB_modify_dedicatedRRCReconfiguration: pass UE context directly 2024-10-17 19:06:45 +02:00
Robert Schmidt
01b240ebf1 Cleanup rrc_gNB_generate_dedicatedRRCReconfiguration(): pass UE context directly 2024-10-17 19:06:45 +02:00
Robert Schmidt
452ccc3235 Cleanup rrc_gNB_generate_dedicatedRRCReconfiguration_release()
Pass RRC and UE context pointers directly.
2024-10-17 19:06:45 +02:00
Robert Schmidt
dbeb1ea691 Cleanup nr_rrc_reconfiguration_req(): pass UE context directly 2024-10-17 19:06:45 +02:00
Robert Schmidt
145ab259e8 Cleanup rrc_gNB_generate_RRCRelease(): pass context directly 2024-10-17 19:06:45 +02:00
Robert Schmidt
fce17f873b Remove nr_rrc_common.c: declared functions are not used 2024-10-17 19:06:45 +02:00
Robert Schmidt
e497526543 Remove function declaration with non-existant definition 2024-10-17 19:06:45 +02:00
Robert Schmidt
788bc623e3 Cleanup rrc_gNB_decode_dcch(): use F1 message type, pass rrc pointer 2024-10-17 19:06:45 +02:00
Robert Schmidt
da9f4cec18 Cleanup: pass UE context directly into handle_rrcReestablishmentComplete() 2024-10-17 19:06:45 +02:00
Robert Schmidt
118674ae4e Cleanup handle_ueCapabilityInformation()
Pass UE context pointer directly. In the switch, do not return to not
create memory leaks (after the switch, memory is freed). Move the
function up to make it appear before the use of the function.
2024-10-17 19:06:45 +02:00
Robert Schmidt
88d6117d99 Cleanup in securityModeFailure handling
The xer_fprintf() call is already present in rrc_gNB_decode_dcch()
above.
2024-10-17 19:06:45 +02:00
Robert Schmidt
a5a746ee36 Cleanup: Pass UE context directly into rrc_gNB_generate_UECapabilityEnquiry() 2024-10-17 19:06:45 +02:00
Robert Schmidt
cec54f1c89 Cleanup: Pass UE context directly into rrc_gNB_send_NGAP_UPLINK_NAS() 2024-10-17 19:06:45 +02:00
Robert Schmidt
098f45c14d Cleanup: Pass RRC/UE context directly into handle_rrcReconfigurationComplete() 2024-10-17 19:06:45 +02:00
Robert Schmidt
7836fe5090 Cleanup: Pass UE context into handle_rrcSetupComplete()
Pass UE context, without protocol_ctxt_t, for cleanup. Remove the return
from within the switch, as this would lead to memory leaks; nothing is
executed after the switch statement (except for freeing memory).
2024-10-17 19:06:45 +02:00
Robert Schmidt
0056ac7bc9 Cleanup: Pass UE context into rrc_gNB_process_MeasurementReport() 2024-10-17 19:06:45 +02:00
Robert Schmidt
d5274af0ec Bugfix: correctly check for GTP initialization
The existing check for the initialization of GTP is wrong; GTP returns
-1 if it could not initialize. Correct this, such that the DU will stop
if GTP cannot be initialize.

If we continue, the DU is requested to set up a GTP tunnel; because GTP
is not initialized, it assumes it is in monolithic/no F1, and does not
set up a tunnel. The F1 UE Context setup response encoder then fails
with this assertion:

    Assertion (tnl->teid > 0) failed!
    In DU_send_UE_CONTEXT_SETUP_RESPONSE() ../../../openair2/F1AP/f1ap_du_ue_context_management.c:415

    Exiting execution
    ../../../openair2/F1AP/f1ap_du_ue_context_management.c:415 DU_send_UE_CONTEXT_SETUP_RESPONSE() Exiting OAI softmodem: _Assert_Exit_
    Aborted

Closes: #853
2024-10-17 19:06:45 +02:00
Robert Schmidt
30054b809e Handle faulty MeasurementReport gracefully
A UE might send a MeasurementReport without the actual IEs present
(intentionally or not). Check this and handle appropriately to avoid
assertion

    Assertion (measurementReport->criticalExtensions.present == NR_MeasurementReport__criticalExtensions_PR_measurementReport && measurementReport->criticalExtensions.choice.measurementReport != ((void*)0)) failed!
    In rrc_gNB_process_MeasurementReport() ../../../openair2/RRC/NR/rrc_gNB.c

Closes: #859
2024-10-17 19:06:45 +02:00
Robert Schmidt
e815972492 Handle unsolicited UE Capability Information gracefully
A UE might send a UE Capability Information without unsolicitatedly
(intentionally or not). Check this and handle appropriately to avoid
assertion

    Assertion (UE->xids[xid] == RRC_UECAPABILITY_ENQUIRY) failed!
    In handle_ueCapabilityInformation() ../../../openair2/RRC/NR/rrc_gNB.c

Closes: #858
2024-10-17 19:06:45 +02:00
Robert Schmidt
542ef1c1c6 Handle fault rrcReestablishmentComplete gracefully
A UE might send a rrcReestablishmentComplete without the actual IEs
present (intentionally or not). Check this and handle appropriately to
avoid assertion

    Assertion (reestablishment_complete->criticalExtensions.present == NR_RRCReestablishmentComplete__criticalExtensions_PR_rrcReestablishmentComplete) failed!
    In handle_rrcReestablishmentComplete() ../../../openair2/RRC/NR/rrc_gNB.c:1364

Closes: #854
2024-10-17 19:06:45 +02:00
Robert Schmidt
d71104da51 Handle repeated NGAP Initial Context Setup Request
Prior to this commit, if we receive an Initial Context Setup Request for
a UE that has AS security set up, the gNB asserts with

    Assertion (!ue_p->as_security_active) failed!
    In rrc_gNB_generate_SecurityModeCommand() openairinterface5g/openair2/RRC/NR/rrc_gNB.c:2590
    logic error: security already activ

However, TS 38.413 says:

> The AMF may initiate the Initial Context Setup procedure if a
> UE-associated logical NG-connection exists for the UE

(I interpret this as "it might happen anytime")

> store the received Security Key in the UE context and, if the NG-RAN
> node is required to activate security for the UE, take this security key
> into use.

(I interpret this as "do not set up AS security again")

In this commit, handle if we receive an Initial Context Setup Request
for an existing UE context. As said in the spec, we store the keys. If
security is not active, we trigger RRC Security Mode Command. If it is
active, we skip Security, and directly set up a PDU session. If there is
also no PDU session, we simply forward the NAS message, and acknowledge.

If there was no AS security, after security, the gNB would trigger the
setup of PDU sessions (if any), and then forward any NAS PDUs, which is
stated in the if block if AS security is already active.
2024-10-17 18:59:22 +02:00
Robert Schmidt
94a3a61e17 Reuse rrc_forward_ue_nas_message() for DL Information Transfer 2024-10-17 18:45:50 +02:00
Bartosz Podrygajlo
cd475ca07a Optimize T_ID() macro
This changes the way T_IDs are defined. The T_ID macro was using a integer to pointer cast in
order to provide type safety. This trick disables some compiler optimizations, as explained
here: https://clang.llvm.org/extra/clang-tidy/checks/performance/no-int-to-ptr.html.
Removing the type cast reenables the compiler optimizations.
2024-10-17 16:11:15 +02:00
Robert Schmidt
312f23189a Cross-build: add -Werror for CI build 2024-10-17 15:05:57 +02:00
Robert Schmidt
99d251b29d Correct pkg-config include path when cross-compiling
Prior to this commit, the include path for some libraries found through
pkg-config when cross compiling is not correct:

    $ grep include CMakeCache.txt
    blas_INCLUDEDIR:INTERNAL=/usr/include/x86_64-linux-gnu
    ...

This is because we did not tell pkg-config to search in the right path.
Since for cross-compilation, we install packages in parallel in the
system, override the primary directory where the .pc files located, in
the cross-compilation toolchain file for cmake.

Closes: #746
2024-10-17 10:48:24 +01:00
Rúben Soares Silva
57cccd633f Correctly cast qam64_qam64 parameters in dlsch_llr_computation.c
Change call to qam64_qam64 to use (short *) parameters as defined in the function declaration
2024-10-17 10:48:24 +01:00
Rúben Soares Silva
b46e20abb9 Address warnings in lte-enb.c by changing oai_cputime_t type.
Since long long is the bigger type ( 8 bytes ) of the two used ( long long and uint32_t ),
and long long is also available on ARM, change this parameter to always have this type.

This allows to always use format specifier '%lld' in the logs that use TICK_TO_US, which would otherwise return long long or uint32_t depending on architecture.
2024-10-17 10:42:20 +01:00
Jaroslava Fiedlerova
f97c6ceb6c CI: Update enc/decoder tests in RAN-gNB-N300-Timing-Phytest-LDPC
Set a maximum SNR value using the "-S" option to ensure that nr_dlsim
or nr_ulsim is executed only for a given SNR. This approach allows us
to verify the success of the encoding/decoding process at the specified
SNR. Check if the test succeeds is not yet implemented (currently we
only retrieve an information about encoding/decoding processing time).
To be implemented in the separate MR.

Always execute all the nr_dlsim/nr_ulsim tests even if one of them
fails. Each test takes around 5s, so we can execute them all to get
results for all the test scenarios.
2024-10-17 10:50:24 +02:00
Raymond Knopp
eb9cb2f988 added DTX detection in PUCCH 2 receiver. This is detected by MAC already
which will drop PUCCH 2 indications that are detected as DTX. For the
moment this uses the same pucch0_dtx_threshold value indicated in L1
section of the configuration file.
2024-10-17 10:08:08 +02:00
Robert Schmidt
65b9af543a Cleanup rrc_gNB_generate_SecurityModeCommand()
Cleanup this function: pass UE context directly, remove protocol_ctxt_t.
2024-10-16 19:13:48 +02:00
Robert Schmidt
8c14bf4921 Simplify rrc_gNB_process_security()
rrc_gNB_process_security() does not only set (process) the security
algorithms, but also checks for those. However, we don't use the check.
Simplify the function, to reintroduce the check later. Rename to
set_UE_security_algos() to better reflect what the functions do.
2024-10-16 19:13:48 +02:00
Robert Schmidt
0cea0395e8 Cleanup and rename process_gNB_security_key()
Rename to set_UE_security_key(), as it is for the UE. pass UE context
directly.
2024-10-16 19:13:48 +02:00
Robert Schmidt
4a40efede3 Clean up rrc_gNB_process_security() and called functions
Pass rrc pointer and UE context directly instead of protocol_ctxt_t.
2024-10-16 19:13:48 +02:00
Robert Schmidt
1d85ae0245 Cleanup nr_rrc_pdcp_config_security()
Pass directly pointer to UE context, remove protocol_ctxt_t (which
simply is not required, and supposed to be removed anyway).
2024-10-16 19:13:33 +02:00
Jaroslava Fiedlerova
4f5c73394d doc: Update TESTBenches.md
- remove Sphex UE - not used anymore
- remove RAN-L2-Sim-Test-5G from a list of pipelines - currently disabled
- 4G RFSim was moved to cacofonix
- minor cleanup
2024-10-16 17:08:49 +02:00
Bartosz Podrygajlo
698b5e3dcf A testsuite and a benchmark for RLC AM mode 2024-10-16 16:19:37 +02:00
Reem Bahsoun
1e73a95b58 Reduce tested DL throughput from 700 to 600Mbps 2024-10-16 14:40:37 +02:00
Guido Casati
d2fca6bba4 Update TESTBenches.md to reflect current testbench 2024-10-16 11:14:21 +02:00
luis_pereira87
9a3162f049 Tutorials: update UHD to v4.7.0.0 and update dependencies for Ubuntu 24.04 2024-10-16 08:54:01 +01:00
luis_pereira87
156aedb96b Tutorials: Update docker install to the latest instructions on the official website 2024-10-16 08:53:30 +01:00
luis_pereira87
1ff4ff1455 Tutorials: Update links for the latest Ubuntu 24.04 LTS iso file 2024-10-16 08:52:50 +01:00
Rúben Soares Silva
d9a5866bcd Address warning unused variable 'tw512_128p' 2024-10-15 16:48:23 +01:00
Raghavendra Dinavahi
586a4b76f8 Update pbchsim to work with other numerologies 2024-10-15 17:26:03 +02:00
Raghavendra Dinavahi
1bf4ca7d97 fix for Other SI reception when BWP start != 0 2024-10-15 13:11:13 +02:00
Robert Schmidt
65d8d410b5 Merge branch 'integration_2024_w41' into 'develop'
Integration: `2024.w41`

See merge request oai/openairinterface5g!3032

* !3006 Fix some sizeof and switch-case issues
* !3028 Add CMakePresets.json
* !3011 Aerial: cleanup unused code, avoid superfluous memcpy(), avoid L1 structures
* !3022 NR CSI-RS L1 refactoring → check CI
* !2935 Improvements in handling the beamforming procedure via FAPI
* !3026 NR ULSCH scheduler fix when using transform precoding
* !3031 CI: Increase test bitrates for 100 MHz scenario in SA-2x2 pipeline
* !3017 Fix SRS
* !2731 Implementation of 2-Step RA
* !3027 Add dockerized include what you use tool
2024-10-15 07:26:22 +00:00
Jaroslava Fiedlerova
6a72669a1b Merge remote-tracking branch 'origin/iwyu' into integration_2024_w41 2024-10-14 15:10:47 +02:00
Jaroslava Fiedlerova
75af74c731 Merge remote-tracking branch 'origin/RA_2-Step' into integration_2024_w41 2024-10-14 14:47:19 +02:00
francescomani
eccecde2c7 Merge remote-tracking branch 'origin/fix-SNR-based-on-SRS' into integration_2024_w41 2024-10-14 14:31:17 +02:00
Jaroslava Fiedlerova
e4cb68a750 Merge remote-tracking branch 'origin/ci-sa-2x2-increase-bitrate' into integration_2024_w41 2024-10-14 13:23:11 +02:00
Jaroslava Fiedlerova
a177dfa3bb Merge remote-tracking branch 'origin/transform_precoding_hotfix' into integration_2024_w41 2024-10-14 13:22:54 +02:00
Laurent THOMAS
a6576db51b websrv regression 2024-10-14 11:32:49 +02:00
Robert Schmidt
4398a57eb2 Increase SC-FDMA test UL iperf traffic to 18Mbps 2024-10-13 19:03:33 +02:00
francescomani
4528be42de Merge remote-tracking branch 'origin/NR_gNB_BF_matrix' into integration_2024_w41 2024-10-11 16:55:25 +02:00
rmagueta
be6dcccd93 Add CI test for SRS in nr_ulsim 2024-10-11 11:12:53 +01:00
rmagueta
765bb64b5c Fix SNR based on SRS 2024-10-11 11:12:21 +01:00
Robert Schmidt
e8597a16ed Merge remote-tracking branch 'origin/NR_CSI_improvements' into integration_2024_w41 2024-10-11 11:56:53 +02:00
Robert Schmidt
3d32ce3904 Merge remote-tracking branch 'origin/aerial-cleanup' into integration_2024_w41 2024-10-11 11:56:46 +02:00
ndomingues
c7e9d687c6 Set msg1_SubcarrierSpacing to the same value as the UL SCS
3GPP 38.331: If absent, the UE applies the SCS as derived from the prach-ConfigurationIndex in RACH-ConfigGeneric (see tables Table 6.3.3.1-1, Table 6.3.3.1-2, Table 6.3.3.2-2 and Table 6.3.3.2-3, TS 38.211 [16]).

This procedure for msg1_SubcarrierSpacing NULL is not implemented, so we aplly the same value of UL SCS.
2024-10-11 10:12:06 +01:00
Jaroslava Fiedlerova
444961470a Merge remote-tracking branch 'origin/cmake-presets' into integration_2024_w41 2024-10-11 11:09:12 +02:00
Jaroslava Fiedlerova
cab28f0f5a Merge remote-tracking branch 'origin/misc-fixes' into integration_2024_w41 2024-10-11 11:09:00 +02:00
Bartosz Podrygajlo
b69b4dc0f4 Add CMakePresets.json
Introduce CMakePresests.json which is a simple way to perform incremental build using cmake

New configure resets were added:
 - default: Configure compilation with default options
 - tests: Same as above but ENABLE_TESTS and SANITIZE_ADDRESS is ON

New build presets were added:
 - 5gdefault: Build the software for NR rfsimulator test
 - default: same as 5gdefault
 - 4gdefault: Build the software for LTE rfsimulator test
 - tests: build all unit tests

To configure using configuration preset:

`cmake --preset <preset_name>`

To build using a build preset:

`cmake --build --preset <preset_name>`
2024-10-11 09:12:49 +02:00
francescomani
a4c211f2b4 removing p7 prach beamforming assertion 2024-10-11 08:02:06 +02:00
francescomani
3f550a27be decouple call for config scc from init of MAC 2024-10-11 08:02:06 +02:00
francescomani
7af574dd54 adding new config file parameters in FR2 RFsim CI config file 2024-10-11 08:02:06 +02:00
francescomani
abc5069a55 handling beams in PHY RX channels 2024-10-11 08:02:06 +02:00
francescomani
014338105e remove unused bf_weights feild from config files 2024-10-11 08:02:06 +02:00
francescomani
64ed4e9262 handling beams in PHY TX channels 2024-10-11 08:02:06 +02:00
francescomani
7e82854b29 improvements to set beam index via FAPI message
use of number of SSBs transmitted before current one as fapi index, creation of a mapping vector from SSB to fapi index
2024-10-11 07:59:36 +02:00
francescomani
2a9a038dbd improvements in RU beamforming handling procedures 2024-10-11 07:59:31 +02:00
Jaroslava Fiedlerova
bdefd02f27 CI: increase tested bitrate for 100 MHz scenario in SA-2x2
Modify the UL/DL UDP iperf test cases to use a higher requested bitrate
for the scenario with 100 MHz bandwidth in the SA-2x2 pipeline. Adjust
gNB config file to allow for higher UL throughput.
2024-10-11 07:57:34 +02:00
francescomani
f3b6155f17 OAI specific config_request field for analog beamforming 2024-10-10 16:14:32 +02:00
Robert Schmidt
eb98aa690e Docker: Use -Werror in Aerial build 2024-10-10 16:04:08 +02:00
Robert Schmidt
3da3ec1907 Resolve error "unknown type name"
Resolve error:

   nfapi/oai_integration/aerial/fapi_nvIPC.h:56:16: error: unknown type name ‘nvipc_params_t’
   56 | int nvIPC_Init(nvipc_params_t nvipc_params_s);

By including the header. Also, move the definiton of the struct to the
MAC, where it is actually stored, and out of the radio common_lib.h,
since this is not a radio (split 7/8) parameter.
2024-10-10 16:02:29 +02:00
Robert Schmidt
35174d7917 Remove useless code
We don't use CUDA (see previous commit). Further, the variables
referenced in this piece of code are not used later.
2024-10-10 16:02:29 +02:00
Robert Schmidt
da5601b8bf Remove code enclosed in NVIPC_CUDA_ENABLE
When compiling aerial, we compile without CUDA support (see e.g.,
docker/Dockerfile.gNB.aerial.ubuntu22). Hence, do not check for it in
aerial for the moment, we won't use it for the foreseeable future.
2024-10-10 16:02:29 +02:00
Robert Schmidt
c648dfd078 Bugfix: preamble_list is an array
Since commit e6e25275ed, preamble_list is
an array, not a pointer. Hence, we don't need to call free().
2024-10-10 16:02:29 +02:00
Robert Schmidt
c945bef2f1 Remove check for NFAPI_MODE_AERIAL, it's pointless
In Aerial bindings (FAPI-Aerial), the NFAPI mode must be
NFAPI_MODE_AERIAL (otherwise, we would not be executing this code).
Hence, the switches don't make sense. Remove them.

The check can more easily be checked with

    git show <commit> --ignore-all-space
2024-10-10 16:02:29 +02:00
Robert Schmidt
f2f08ac52a Remove ENABLE_AERIAL switch in aerial bindings
As is visible at the top of the patch, for compiling aerial_lib (the
binding FAPI-Aerial), we always add ENABLE_AERIAL. Thus, all the code
within ENABLE_AERIAL will be compiled; we can also simply take it out.
2024-10-10 16:02:29 +02:00
Robert Schmidt
f7afc8e8ee Aerial: compile P5 with Aerial-specfic modifications 2024-10-10 16:02:29 +02:00
Robert Schmidt
e04ed98994 Remove unused code 2024-10-10 16:02:29 +02:00
Rúben Soares Silva
0609d31dc7 Only copy RX_DATA.indication pdu if there's data 2024-10-10 16:02:29 +02:00
Robert Schmidt
83838962fd Aerial: Avoid superfluous memcpy(), reduce scope
We can directly read from buffers, so the memcpy() only takes time.
Also, limit the scope of the variables for the unpacking of
RX_DATA.indication.

Co-authored-by: Rúben Soares Silva <rsilva@allbesmart.pt>
2024-10-10 16:01:29 +02:00
Robert Schmidt
1a97aa359e aerial_phy_nr_srs_indication(): implement without relying on L1 structures 2024-10-10 16:00:39 +02:00
Robert Schmidt
77d62cbf57 Remove aerial_phy_nrach_indication(): this is a 4G callback 2024-10-10 16:00:39 +02:00
Robert Schmidt
d91e80beba Remove aerial_phy_nb_harq_indication(): this is a 4G callback 2024-10-10 16:00:39 +02:00
Robert Schmidt
8150328353 Remove aerial_phy_lbt_dl_indication(): this is a 4G callback 2024-10-10 16:00:39 +02:00
Robert Schmidt
f1cbbc9f83 Remove aerial_phy_sr_indication(): this is a 4G callback 2024-10-10 16:00:38 +02:00
Robert Schmidt
88d548fbc2 Remove aerial_phy_cqi_indication(): this is a 4G callback 2024-10-10 16:00:38 +02:00
Robert Schmidt
17ed5d345e Remove aerial_phy_srs_indication(): this is a 4G callback 2024-10-10 16:00:38 +02:00
Robert Schmidt
8888a6bd70 Remove aerial_phy_harq_indication(): this is a 4G callback 2024-10-10 16:00:38 +02:00
Robert Schmidt
24c8e6c5c1 Remove aerial_phy_sync_indication(): this is a 4G callback 2024-10-10 16:00:38 +02:00
Robert Schmidt
3b4df11078 Remove aerial_phy_slot_indication(): this is a 4G callback 2024-10-10 16:00:38 +02:00
francescomani
6b58d357d9 moving beamforming matrix to MAC and feeding it to FAPI structures 2024-10-10 12:42:17 +02:00
francescomani
7fdae002b9 remove UL MCS limitation on CI transform precoding test 2024-10-10 12:06:47 +02:00
francescomani
a343ec03fd changes in get_transformPrecoding to follow what's written in 6.1.3 of 214 2024-10-10 11:58:07 +02:00
Bartosz Podrygajlo
de4a737131 Add dockerized include what you use tool
Introduces a tool that organizes C/C++ header includes. The tools output
should still be manually reviewed by a contributor.
2024-10-10 09:41:11 +02:00
ndomingues
64ee6a4776 Use common function to get mu at UE for PRACH 2024-10-09 19:04:43 +02:00
rmagueta
aaf9b57abb Call active=0 for CSI-RS early 2024-10-09 10:01:46 +01:00
ndomingues
88a9515321 Update FEATURE_SET with 2-Step RA feature 2024-10-09 09:11:16 +01:00
ndomingues
acd776fe28 Implementation of RA 2-Step MsgB procedures at UE 2024-10-09 09:11:16 +01:00
ndomingues
9d786bdee7 Implementation of RA 2-Step MsgB procedures at gNB 2024-10-09 09:11:16 +01:00
ndomingues
19e0df13a9 Add support for Random Access MsgB RNTI 2024-10-09 09:04:44 +01:00
ndomingues
160210ebae Baseline implementation of RA 2-Step MsgA procedures at UE 2024-10-09 09:04:44 +01:00
ndomingues
cbbbeb8051 Baseline implementation of RA 2-Step MsgA procedures at gNB 2024-10-09 09:04:41 +01:00
francescomani
a6f03b3f79 ULSCH scheduler fix when using transform precoding
Bug in ULSCH scheduler for transform precoding. It ignores transform precoding specific tables when building ul_pf_tbs.
2024-10-09 09:45:01 +02:00
Robert Schmidt
c609dd8fcf Implement common nr_get_mu() in nr_mac_common
These functions look up the numerology, and code can be harmonized:

- ssb_index_from_prach()
- find_SSB_and_RO_available()
- schedule_nr_prach()

The next commits also need to look up the numerology from the
UplinkConfigCommon. This provides the common implementation to be used
in follow-up commits.
2024-10-08 14:19:57 +01:00
ndomingues
3083f4f3d1 Common parameters to apply successRAR 2024-10-08 14:19:57 +01:00
ndomingues
c4b51b78d6 Decode msgA_ConfigCommon_r16 from received SIB1 at UE and save it in bwp->msgA_ConfigCommon_r16 2024-10-08 14:19:57 +01:00
ndomingues
9d84ba7fbf Refactor enum nr_ra_type_t and make it common for both gNB and UE 2024-10-08 14:19:57 +01:00
ndomingues
abb7439b8a Compute RA 2-Step MsgB_RNTI as specified in 3GPP TS 38.321 Section 5.1.3a 2024-10-08 14:19:57 +01:00
ndomingues
e4655154ee Add RA 2-Step configuration parameters to SIB1 2024-10-08 14:19:55 +01:00
ndomingues
22a4480c2a Add configuration file with support for RA 2-Step 2024-10-08 14:15:43 +01:00
francescomani
f25ad2b098 remove unnecessary return at the end of nr_ue_csi_rs_procedures 2024-10-08 09:46:43 +02:00
francescomani
46beda91ee moving CSI-RS common functions to a new file 2024-10-08 09:46:43 +02:00
francescomani
a54a919bd8 removing UE dependence on gNB CSI FAPI structure and decoupling UE from gNB procedures 2024-10-08 09:46:43 +02:00
francescomani
26fd99ff61 terminal independent common functions in nr_generate_csi_rs 2024-10-08 09:46:43 +02:00
francescomani
ddbbaef302 remove nr_csi_info_t from gNB (unused) 2024-10-08 09:46:43 +02:00
francescomani
7e009781cd moving out CSI mapping parameters from nr_generate_csi_rs 2024-10-08 09:46:43 +02:00
francescomani
ad96697d10 common function for CSI-RS mapping parameters 2024-10-08 09:46:43 +02:00
Robert Schmidt
e15fa14c57 Merge branch 'integration_2024_w40b' into 'develop'
Integration: `2024.w40b`

See merge request oai/openairinterface5g!3021

* !2890 F1AP encoding/decoding library
* !2969 Time domain samples scope for NR UE & gNB
* !2998 warmup RF board in UE
* !3009 Fix the ratio of PDSCH EPRE to DM-RS EPRE
* !2965 Refactoring of prepare_scc in gNB config
* !3002 CI: Change frequency used by AW2S pipeline
* !3007 Enable gNB configuration through YAML file
* !3001 Minor ue fixes
* !2971 Use getaddrinfo() when connecting to rfsimulator
2024-10-07 20:28:28 +00:00
Jaroslava Fiedlerova
36682aa76f Merge remote-tracking branch 'origin/ue-sim-use-getaddrinfo' into integration_2024_w40b 2024-10-07 16:41:46 +02:00
Jaroslava Fiedlerova
dbd37dac38 Merge remote-tracking branch 'origin/minor-ue-fixes' into integration_2024_w40b 2024-10-07 16:40:09 +02:00
Robert Schmidt
d6f0ff37c2 RFsim: doc serveraddr: mention IPv4v6 and DNS 2024-10-07 14:17:12 +02:00
Robert Schmidt
ac7c02d8e5 CI 5G E1 RFsim test: Use DNS name for RFsim 2024-10-07 14:17:12 +02:00
Robert Schmidt
a648afd4c6 RFsim Client: Improve logs
- Remove double "Connection ... established" (already printed in
  caller)
- Remove useless, there is already the logging module
- Print getaddrinfo() error as LOG_E (error)
2024-10-07 14:16:15 +02:00
Laurent THOMAS
8f46b07b22 Lacking RRC check: avoid SEGV if the received packet is not what we believe 2024-10-07 13:39:29 +02:00
Jaroslava Fiedlerova
169dddf8c0 Merge remote-tracking branch 'origin/gnb-yaml' into integration_2024_w40b 2024-10-07 13:37:57 +02:00
Jaroslava Fiedlerova
1136e4cafd Merge remote-tracking branch 'origin/ci-aw2s-change-frequency' into integration_2024_w40b 2024-10-07 13:37:42 +02:00
Laurent THOMAS
f77f428767 Small optimization L2 to wireshark
the code creates a sink to read all traced packets and drop it.  but
this works only if we send to a local address and if there is not
another sink (like if we trace both UE and gNB in the same machine).
this sink's purpose is only to prevent to get automatic packets back
from the kernel saying "no listener". So, instead of killing the trace
when we can't create the sink (as done previously), we now just let the
trace in operation.
2024-10-07 13:37:34 +02:00
Bartosz Podrygajlo
01066a3f0d Fix some sizeof and switch-case errors reported by CodeChecker
CodeChecker is a python application that collects reports from static analyzers like
clang-tidy, clangsa, cppcheck.
2024-10-07 09:35:24 +02:00
Bartosz Podrygajlo
0daabdeb87 Update the aw2s entrypoint to support new yaml config and updated images 2024-10-07 09:15:44 +02:00
Bartosz Podrygajlo
8e6234a2f5 Enable gNB configuration through YAML file 2024-10-07 09:10:42 +02:00
Jaroslava Fiedlerova
fa6840c05e Merge remote-tracking branch 'origin/gnb-config-code-refactoring' into integration_2024_w40b 2024-10-04 16:36:23 +02:00
Jaroslava Fiedlerova
8584da1636 CI: add 1x1 AW2S test with multi UEs 2024-10-04 11:46:22 +02:00
Jaroslava Fiedlerova
5e9c432b41 CI: change frequency used by AW2S 2024-10-04 11:46:22 +02:00
Jaroslava Fiedlerova
406227699b CI: rename AW2S configs/files used for 2x2 testing 2024-10-04 11:46:17 +02:00
Jaroslava Fiedlerova
9ef7e6dec0 Merge remote-tracking branch 'origin/fix-Beta_DMRS_PDSCH' into integration_2024_w40b 2024-10-04 11:00:31 +02:00
Jaroslava Fiedlerova
9ca37d1b94 Merge remote-tracking branch 'origin/ue-RF-warmup' into integration_2024_w40b 2024-10-04 07:53:17 +02:00
Jaroslava Fiedlerova
b824e55cdd Merge remote-tracking branch 'origin/imscope-td-plot' into integration_2024_w40b 2024-10-04 07:52:36 +02:00
Jaroslava Fiedlerova
7be2a165b3 Merge remote-tracking branch 'origin/f1ap-msg-encdec-tests' into integration_2024_w40b 2024-10-04 07:52:01 +02:00
Robert Schmidt
d8a6c5c9d5 Merge branch 'integration_2024_w40' into 'develop'
Integration: `2024.w40`

Closes #756 and #849

See merge request oai/openairinterface5g!3014

* !2886 (doc): Added a new doc on hardware requirements
* !2955 dockerized clang-format error detection tool
* !3005 Fix symbol size in nr_dlsch_mmse
* !2930 SRS tx power
* SA-B200-Module-SABOX pipeline: improve radio
* SA-AW2S-CN5G: accept 5% ping packet loss
* !3003 Resolve "SEGFAULT in L1_rx_thread" - CI
* !3016 fix tests for log2_approx and log2_approx64
* patch to move RFsim-4G to cacofonix
2024-10-03 08:45:25 +00:00
Robert Schmidt
4c85eb4a9e More CI RFsim4G to cacofonix 2024-10-03 09:10:33 +02:00
Robert Schmidt
fa5ca8d7ea Merge remote-tracking branch 'origin/756-segfault-in-l1_rx_thread' into integration_2024_w40 2024-10-02 17:06:57 +02:00
Robert Schmidt
c2535df334 Merge remote-tracking branch 'origin/fix_log2_approx_tests' into integration_2024_w40 2024-10-02 17:06:33 +02:00
Robert Schmidt
27d073d4f6 Free CellGroup 2024-10-02 17:04:53 +02:00
Robert Schmidt
ba10db149a Logs when UE cannot use CCCH 2024-10-02 17:04:53 +02:00
andrewse
2335f5b6cf Don't call mac_rlc_data_ind when SRB0 already exist for UE.
It can happen that L1 gives us a TB that we interpret as receiving UL
MAC TB with LCID "UL_SCH_LCID_CCCH1". This might or might not be
correct, but currently, we observe segfaults when trying to encode the
cellgroup in send_initial_ul_rrc_message() (encode_cellGroupConfig()).

This fix prevents a segfault by not delivering a MAC SDU to RLC if CCCH
is already present. Note that in some cases, this could still happen,
e.g. Resume Request. However, we don't support this message, so ignore
it for the moment.

This fix enables a gNB to operate continuously for extended periods
(days), which is essential for real deployment scenarios.

Closes: #756
2024-10-02 17:04:53 +02:00
Ghislain Bourgeois
6344fce6e4 Reinitialize sock to -1 after closing
Prevents bug where a closed socket is returned.
2024-10-02 10:34:27 -04:00
rmagueta
73b00e8c1c Fix the ratio of PDSCH EPRE to DM-RS EPRE
This fix gets DL 4-layer working with COTS UE
2024-10-02 15:30:11 +01:00
Thomas Schlichter
28656a1adf add test log2_approx.boundaries 2024-10-02 13:30:16 +02:00
Thomas Schlichter
d6f9bcd1cc fix test log2_approx64.boundaries
The test was actually never executed correctly (unsigned -10 is never <= 10), and log2_approx64_ref() was not accurate enough.
Therefore replace it by directly comparing one value above and one value below each rounding boundary.
2024-10-02 13:30:16 +02:00
Thomas Schlichter
6bf68c81c8 skip the test log2_approx.complete when using ctest
To skip the test, we use the gtest command line parameter "--gtest_filter" to filter out the unwanted test.
This parameter is described as follows:

--gtest_filter=POSITIVE_PATTERNS[-NEGATIVE_PATTERNS]
      Run only the tests whose name matches one of the positive patterns but
      none of the negative patterns. '?' matches any single character; '*'
      matches any substring; ':' separates two patterns.
2024-10-02 13:30:16 +02:00
Robert Schmidt
5ed1dcd2fc CI SA-AW2S-CN5G: adjust ping loss threshold
In this pipeline, we frequently see losses of a single packet; we did
not find the true reason yet.

Accept 5% losses, assuming that serious packet loss would be catched by
(1) higher ping losses (2) iperf would be affected.
2024-10-02 12:37:22 +02:00
Robert Schmidt
0699f1a993 CI SA-B200-Module-SABOX: improve behavior by adjusting radio parameters 2024-10-02 12:34:58 +02:00
Guido Casati
48bb594e30 Cleanup gnb_config.c 2024-10-02 11:39:24 +02:00
Guido Casati
1438dfbd35 Refactored fill_scc_sim
* clang formatted
* code cleanup
* improve readability
2024-10-02 11:39:24 +02:00
Guido Casati
8d222bc474 Refactoring of prepare_scc
* improved readability
* clang formatted
2024-10-02 11:39:23 +02:00
Guido Casati
a32a8504c9 Use a macro to initialize NR_SetupRelease structs
* introduced macro INIT_SETUP_RELEASE to optimize code in gnb_config.c
2024-10-02 11:36:43 +02:00
Guido Casati
56e510b2f2 Use calloc_or_fail in gnb_config.c 2024-10-02 11:36:43 +02:00
Guido Casati
ee26e51015 Use abort instead to exit in calloc_or_fail
* abort generates a core dump
2024-10-02 11:36:43 +02:00
Guido Casati
13757cfd28 Cleanup of long-time commented out code in prepare_scc 2024-10-02 11:36:43 +02:00
Thomas Laurent
5811ab1dc8 Apply 2 suggestion(s) to 2 file(s)
Co-authored-by: Robert Schmidt <robert.schmidt@eurecom.fr>
2024-10-02 09:11:49 +00:00
Ghislain Bourgeois
320747e0b0 Use getaddrinfo() and add IPv6 support in startServer
This commit refactors startServer to use getaddrinfo() to
prepare the socket creation. Doing so, it also adds support for
IPv6 by using AF_UNSPEC as the address family.
2024-10-02 09:34:24 +02:00
Ghislain Bourgeois
53d31eb26e Use getaddrinfo() when connecting to rfsimulator
This commits uses getaddrinfo(3) when connecting as client to the
rfsimulator. This enables name lookups, through DNS or a hosts file.

This change makes it easier to use the simulator in a dynamic
environment like Docker or Kubernetes by only targeting the name of
the container or service.
2024-10-02 09:34:24 +02:00
Jaroslava Fiedlerova
dcd09069b6 Merge remote-tracking branch 'origin/srs-tx-power' into integration_2024_w40 2024-10-01 22:17:55 +02:00
Jaroslava Fiedlerova
5636d77ce7 Merge remote-tracking branch 'origin/issue_849' into integration_2024_w40 2024-10-01 19:05:06 +02:00
Jaroslava Fiedlerova
b8401a189a Merge remote-tracking branch 'origin/clang-format-tool' into integration_2024_w40 2024-10-01 19:04:33 +02:00
Jaroslava Fiedlerova
a700da57b3 Merge remote-tracking branch 'origin/hardware-documentation' into integration_2024_w40 2024-10-01 18:53:40 +02:00
Bartosz Podrygajlo
fecff5f346 Reset SRS power control adjustment state if p0 or alpha is provided
Reset h_b_f_c (SRS power control adjustment state) when SRS-ResourceSet
p0 or alpha is provided by higher layers, accroding to 38.213 7.3.1.
2024-10-01 10:15:40 +02:00
Bartosz Podrygajlo
7359c6b66e Move h_b_f_c to UL BWP
Move h_b_f_c (or SRS power control adjustment state) to UL BWP structure. This is a per
bwp parameter so it makes sense to make its lifetime the same as BWP, even if we dont support
>1 UL BWPs.
2024-10-01 10:15:33 +02:00
Bartosz Podrygajlo
bfc47445ee SRS tx power with power control state 2024-10-01 10:15:23 +02:00
Robert Schmidt
fc0cbc3147 Create_Workspace: exit 0 at end
the create_workspace.sh script checks if a branch should be merged into
what we are trying to checkount (i.e., typically develop into
feature-branch). The problem is that it uses a short-hand for an if
branch.

    [ -n "${merge}"] && git merge...

If we don't request a merge, [ -n XX ] will evalute to 1, and not do the
git merge. Since it's the last command in the script, this makes the
script return 1 (failure), when it actually succeeded.

Add exit 0 to ensure we return 0 after successful end of the script. If
there is a failure, the script will terminate early. It can be tested by
e.g., giving a wrong commit ID.

Reviewed-by: Jaroslava Fiedlerova <Jaroslava.Fiedlerova@openairinterface.org>
2024-10-01 09:19:43 +02:00
Robert Schmidt
54f927b2cb Merge branch 'integration_2024_w39' into 'develop'
Integration: `2024.w39`

Closes #846

See merge request oai/openairinterface5g!2990

* !2718 Added Jenkins job for Colosseum testing integration
* !2901 Fix log2_approx
* !2983 fix(docker): making tini download platform specific to support ARM64 native builds
* !2919 Add E2 SM in the target dockerfiles
* !2981 NR gNB fix PMI report evaluation
* !2979 NR-UE: Merging different UE NR SLOT FEP procedures into one.
* !2899 SIB19 initialization and scheduling on gNB
* !2953 Remove unnecessary c includes
* !2926 Fix SRS FAPI at gNB
* !2987 fix for variable power in PDSCH REs in case of 25 PRBs Bandwidth
* !2993 remove DRX from UE capabilities: not supported yet
* !2711 NR UE UL time alignment handling improvements
* !2995 some small fixes for 5G NR
* !2992 cleaner faster nr_pdcch_demapping_deinterleaving() inner loop
* !2986 NR PDCP ticks for F1 split
* !2982 CI framework cleanup
2024-10-01 06:24:27 +00:00
Sakthivel Velumani
f8a51921a8 Update default path for websrv resources 2024-09-30 21:02:29 -04:00
Sakthivel Velumani
56d05276bd Fix bug in websrv opening page
allocating enough memory to hold url to index page.
2024-09-30 20:29:59 -04:00
Jaroslava Fiedlerova
66b34d1ef1 Merge remote-tracking branch 'origin/ci-framework-cleanup' into integration_2024_w39 2024-09-30 22:21:59 +02:00
Bartosz Podrygajlo
b2c49fbc27 Add time-domain scope to gNB imscope. 2024-09-30 20:41:08 +02:00
Bartosz Podrygajlo
80f90b5599 Add time domain sample scope before sync
Added new data sync for UE which displays time domain samples read from RF device
before synchronization to PSS/SSS
2024-09-30 20:36:38 +02:00
Bartosz Podrygajlo
43a9236963 Improve imscope's scatterplot
- Reduce point size to 1 pixel
 - call ImPlot::PlotScatter as many times as needed
2024-09-30 20:36:18 +02:00
Bartosz Podrygajlo
7986a4de8e Time domain samples scope for NR UE
Add a new scope data source (ueTimeDomainSamples) which provides time domain samples
for antenna 0 to the scope. Add graphical representation of the data in imscope.

Removed C-define from ENABLE_IMSCOPE cmake option, the #define was unused and this way
code does not have to be recompiled when imscope enable state changes.
2024-09-30 20:34:09 +02:00
arora
f648c09df6 system requirements, cpu frequency information
Signed-off-by: arora <sagar.arora@openairinterface.org>
2024-09-30 16:43:05 +02:00
Robert Schmidt
0e23b795b7 CI: use Custom_Script to execute SR-IOV/setup scripts for FHI72 pipeline 2024-09-30 16:08:58 +02:00
Robert Schmidt
5ee9e20f7d SAbox: consistently pull/clean test images in each step 2024-09-30 15:31:41 +02:00
Robert Schmidt
d3b4a6b788 Fix: clear HTML global's internal state 2024-09-30 15:25:10 +02:00
Jaroslava Fiedlerova
6984c05aad Merge remote-tracking branch 'origin/fix_nr_pdcp_tick' into integration_2024_w39 2024-09-30 13:14:06 +02:00
francescomani
601ad40490 fix for nr_dlsch_mmse rxdataF_comp symbol size (Closes: #849) 2024-09-30 09:14:44 +02:00
Robert Schmidt
17c148b7a5 Merge remote-tracking branch 'origin/nr_pdcch_demapping_deinterleaving-improve' into integration_2024_w39 2024-09-29 22:10:38 +02:00
Robert Schmidt
51bb3d25cf Merge remote-tracking branch 'origin/small_fixes_for_5G_NR' into integration_2024_w39 2024-09-29 22:09:26 +02:00
francescomani
2d3ac5803e formatting 2024-09-29 17:55:28 +02:00
Xin Zhe Khooi
163d058d4a introduce dedicated nr pdcp tick thread for F1 split
Currently, NR PDCP ticks are active only with monolithic gNB, triggered by the MAC scheduler in gNB_scheduler.c.
In F1 split mode, as there is no MAC, there’s no source to advance the NR PDCP timer via "nr_pdcp_wakeup_timer_thread()".
This commit introduces a dedicated thread for NR PDCP ticks in gNB-CU and CU-UP mode.
Without it, packet losses at the F1 uplink would cause indefinite buffering, as t-Reordering won't expire due to the lack of NR PDCP timer ticks.
2024-09-29 15:10:54 +00:00
Raymond Knopp
d2ebc356a0 removed division by num_antenna_ports in PDSCH precoding matrix generation. These matrices are defined for CSI reporting in this way but here we are using them for transmission and this results in an unwanted 10*log10(num_antenna_ports) reduction in transmit power 2024-09-29 10:17:56 +02:00
Robert Schmidt
2b67b0e1de CI PullImage(): HTML: indicate pulled images 2024-09-28 12:58:22 +02:00
Robert Schmidt
904534f0da Reboot USRP: use infinitive to harmonize with other steps 2024-09-28 12:58:22 +02:00
Robert Schmidt
60b9649e00 Implement CreateWorkspace() through script, print dir in HTML
Use a script, which can be tested independently of CI code (by running
it on the host on which it will be used), and print the directory that
has been prepared in the HTML.  Also, in the description, use the
infinitive/imperative(?) of the verb to harmonize with other steps.
2024-09-28 12:58:06 +02:00
Robert Schmidt
e541aee49e Implement runScript in cls_cmd for LocalCmd/RemoteCmd, add test
A lot of CI code is python mixed with bash, e.g.,

    ssh = getConnection(host)
    ssh.run('ls')
    ssh.run('echo')

At least some of this CI code would benefit if it was written in a
simple bash script, returning error codes and potentially other
information either through stdout/stderr or files, to the calling Python
code:

    ssh = runScript(host, script)
    # script does: ls; echo

This commit introduces the possibility to run entire scripts. The idea
is that the executor has a script (on localhost), which is either
executed locally or on a remote host. For the remote host, the script is
not copied but piped into a remotely executed bash. In both cases,
output is either returned like the Cmd.run() function with returncode
and mixed stdout/stderr, or optionally redirected into a file on the
(remote) host, which can be treated further by the Python code in later
steps.
2024-09-28 12:52:59 +02:00
Robert Schmidt
fc0bc2357c Modify all YAML files to work with .env files from DeployObject() 2024-09-28 12:46:04 +02:00
Robert Schmidt
51bf5c0fc9 Introduce CI deployment tests based on OAI images 2024-09-28 12:46:04 +02:00
Robert Schmidt
5201a5c37a Reimplement DeployObject()/UndeployObject()
This reimplements the CI deployment functions, and makes them a bit more
robust.  Concretely:

- Introduce a generic "deployment tag" option that can be used to
  override the tag to use for specific images. By default, it is the
  current "branch-commitID[0:8]" tag name (requires the change from
  function ImageTagToUse() to CreateTag(), impacting also pull/push
  image functions)
- Avoid sed for image names, and use an .env file that docker-compose
  picks up automatically; the deployment analyzes a potentially existing
  .env file and updates instead of simply overriding. For instance, some
  pipelines might use -asan images for the gNB and "normal" (non-asan)
  images for UE, and a simple overwriting might make the -asan image
  name tag disappear for the gNB, resulting in deployment failures).
  Finally, undeployment removes the .env file, so that there are no
  modifications in the repository after undeployment.
- Redo the previous behavior of autodetecting asan, and use that (the
  current function always uses asan, no matter what)
- Remove deployKind/displayedNewTags globals, as they are not necessary
- Make the usedImage output in HTML slimmer
- On undeployment, print service names next to undeploy analysis, and
  return success/failure.
- Make the functions generally less verbose and easier to read

Note that as of and only in this commit, deployment does not work, as
all the YAML files have not been updated to work with this updated
version.  The next commit adds tests for the new deployment, and updates
one YAML file (also being used in the tests). The follow-up commit then
modifies all YAML files.
2024-09-28 12:46:04 +02:00
Robert Schmidt
d81abdaf7b Reimplement Native Build (CI step Build_eNB)
The BuildeNB steps either does things that are already implemented
(created workspace), or things that we don't use (separate build_wait),
and is generally quite convoluted when all it does is calling build_oai.
Reimplement by reusing Create_Workspace, and make build_oai in a single
step. To clean up, make a new module in which this function does not
need a class instantiation. Instead, we give all necessary parameters
directly.
2024-09-28 12:45:34 +02:00
Robert Schmidt
3feaa93ba0 cls_cmd: print the host on which a command is executed 2024-09-28 12:45:34 +02:00
Robert Schmidt
0d63861bf1 cls_cmd.py: local copy: don't copy if src/tgt identical 2024-09-28 12:45:34 +02:00
Robert Schmidt
f21b5d2ef4 CI: Add basic unittest for cls_cmd 2024-09-28 12:45:33 +02:00
Robert Schmidt
606e2c749a cls_cmd: execute commands through bash
The next commit will use "echo -e". The problem with that is that bash
and sh differ:

- in bash: this results in "a\nb" (a+newline+b)
- in sh: this results in -e a\nb (-e a+newline+b)

The problem is that by default, commands are executed through sh, which
nobody expects. Change to bash, which is likely more aligned with what
people want to use.
2024-09-28 12:45:33 +02:00
Robert Schmidt
5d5ade1697 Remove superfluous cleanup/terminate/teardown XMLs
After the previous commit, the CI will always do an undeployment step
even if the CI failed. Hence, these XMLs are not necessary anymore. Some
XMLs are updated to do what their "cleanup XML" counterparts did, such
as removing additional images.
2024-09-28 12:45:07 +02:00
Robert Schmidt
8bdc399b27 Remove AutoTerminateUEeNB() functions, use auto_exec to make CI always undeploy 2024-09-28 12:45:07 +02:00
Robert Schmidt
041b2b2d7a Remove prematureExit/exitStatus, and implement in task main loop
Use the previous commit on returning success from each task execution
function, and implement handling of errors in the main loop. Add a
script with which this is visible using Custom_Commands.
2024-09-28 12:45:07 +02:00
Robert Schmidt
7b89548867 Consistently return success true/false from task steps 2024-09-28 12:45:07 +02:00
Robert Schmidt
e969ddb897 IdleSleep(): no need for class members 2024-09-28 12:45:07 +02:00
Robert Schmidt
71807db4ab Custom_Command(): no need for class members 2024-09-28 12:45:07 +02:00
Robert Schmidt
61ea76e7af Remove CI repeatCount XML property
The repeatCount property is useless: it would be enough to specify the
same XML multiple times to achieve the same thing.
2024-09-28 12:45:07 +02:00
Robert Schmidt
77a8f5fa99 Basic test runner script 2024-09-28 12:45:07 +02:00
Robert Schmidt
d108648312 Handle parameter reading and test case execution together
For reasons I don't understand, the XML option reading and actual test
case execution are at different places in the code. This is problematic,
because what this led to is that options are not passed as function
arguments, but indirectly through class members. This led to a lot of
"indirect code"; it's a total mess

To improve this, move them together, so that parameters can be passed
directly as function arguments later on.

Because we reference the globals, mark them inside
ExecuteActionWithParam(). That is a Python antipattern, but necessary at
this moment. I believe that we can remove the following globals over
time:

- SSH (with new cls_cmd, which we don't need to pass)
- EPC (replaced through a class similar to ue_module, i.e., refer to
  core networks on specific hosts through an ID, instead of a global)
- HTML (should use templating, where individual functions give back a
  dictionary of what they want to print, and a final pass assembles the
  entire HTML file)
- RAN/SCA/PHYSIM/CLUSTER/ldpc (can be replaced with stateless scripts
  build/run eNB/gNB on a specific node)
2024-09-28 12:45:07 +02:00
Jaroslava Fiedlerova
e9f9718f63 CI: add more unit tests for UDP iperf3 analysis function 2024-09-28 12:45:07 +02:00
Jaroslava Fiedlerova
5fd5ed43c7 CI: Adjust regex patterns for Iperf3 UDP log parsing
Update the regex for both sender and receiver data to allow optional
bitrate unit prefixes - accepts also no prefix. Modify the patterns for
lost and total packets to accept negative values (`-?\d+`).
2024-09-28 12:45:07 +02:00
Jaroslava Fiedlerova
9d92c0e477 CI: add unit test for UDP iperf3 analysis function 2024-09-28 12:45:07 +02:00
Jaroslava Fiedlerova
1ba5677056 CI: get UDP iperf3 results even if packet count is negative 2024-09-28 12:45:07 +02:00
Robert Schmidt
0da2f27fa7 CI Ping/Iperf: add tests, print without lock, reduce code lines
Add some basic unit tests to verify that Iperf/Ping work. Harmonize the
logging by only print in the "main" iperf/ping function, to avoid that
if we test with multiple UEs, the output intermixes. Also, do one common
mkdir before starting multiple pings/iperfs. Finally, harmonize the
paths so that Iperf and Ping log their files in the same place.
2024-09-28 12:45:07 +02:00
Robert Schmidt
02d5f953a8 Add simple unit test cases for Deployment, including instructions 2024-09-27 19:59:54 +02:00
Robert Schmidt
25f7f61d73 Simplify GetContainerHealth(): we never use unhealthy count 2024-09-27 19:59:54 +02:00
Robert Schmidt
4bf7c45be1 SSHConnection class: don't exit, raise Exception to have main loop handle 2024-09-27 19:59:54 +02:00
Robert Schmidt
1620994f0a DeployObject: EPC not needed 2024-09-27 19:59:54 +02:00
Robert Schmidt
7c1920aea9 Fixup: no HTML in create_workspace, so can't print to HTML 2024-09-27 19:59:54 +02:00
Robert Schmidt
6f868b038f Remove more unused CI files 2024-09-27 19:59:54 +02:00
Robert Schmidt
cded721189 Remove unused CI XML and Python code 2024-09-27 19:50:41 +02:00
Jaroslava Fiedlerova
6d09b2179e Merge remote-tracking branch 'origin/NR_UE_UL_time_alignment' into integration_2024_w39 2024-09-27 17:40:15 +02:00
Guido Casati
5daad21ca6 Reworked F1AP documentation and added info about the library
* moved F1AP related docs to a separate folder in docs
2024-09-27 17:39:00 +02:00
Guido Casati
3aa9f4c0be Use F1 gNB-DU Configuration Update Acknowledge lib in stack 2024-09-27 17:39:00 +02:00
Guido Casati
b8ee622f1c Add test for F1 DU Configuration Update Acknowledge lib 2024-09-27 17:38:55 +02:00
Guido Casati
b91e1b0a12 Add enc/dec lib for F1AP gNB-DU Configuration Update Acknowledge (Interface Management) 2024-09-27 17:38:52 +02:00
Guido Casati
3ce1f0e2c5 Use F1 gNB-CU Configuration Update Acknowledge lib in stack 2024-09-27 17:38:51 +02:00
Guido Casati
c936aabd9a Add test for CU Configuration Update Acknowledge lib 2024-09-27 17:38:43 +02:00
Guido Casati
3724e84fed Add enc library for F1 gNB-CU Configuration Update Acknowledge (Interface Management) 2024-09-27 17:38:38 +02:00
Guido Casati
d2863d9693 Refactored f1ap_gnb_cu_configuration_update_acknowledge_t
* add transaction_id
* refactored remaining members
2024-09-27 17:38:38 +02:00
Guido Casati
80a05271d6 Use F1AP gNB-CU Configuration Update lib in stack 2024-09-27 17:38:38 +02:00
Guido Casati
3626366228 Add test for F1 gNB-CU Configuration Update enc/dec lib 2024-09-27 17:38:38 +02:00
Guido Casati
8e3d6583a5 Add enc/dec library for F1AP gNB-CU Configuration Update (Interface Management) 2024-09-27 17:38:38 +02:00
Guido Casati
c416c57f92 Simplified F1AP gNB-CU Configuration Update message struct
* removed optional IEs, whose encoding/decoding is not done
2024-09-27 17:38:38 +02:00
Guido Casati
3b11764d1d Minor comments 2024-09-27 17:38:38 +02:00
Guido Casati
07da84ede2 Use F1 gNB-DU Configuration Update lib in stack 2024-09-27 17:38:38 +02:00
Guido Casati
2cc50832d1 Add test for F1AP gNB-DU Configuration Update enc/dec library 2024-09-27 17:38:38 +02:00
Guido Casati
9958e53cb1 Add encoding/decoding library for F1AP gNB-DU Configuration Update (Interface Management) 2024-09-27 17:38:38 +02:00
Guido Casati
df62abca0c Removed gNB_CU_name from f1ap_gnb_du_configuration_update_t
* not defined in 9.2.1.8 of 3GPP TS 38.473
2024-09-27 17:38:38 +02:00
Guido Casati
289fdfe381 Use F1AP Setup Failure enc/dec lib in stack 2024-09-27 17:38:38 +02:00
Guido Casati
6146c470e2 Add test for F1AP Setup Failure enc/dec lib 2024-09-27 17:38:38 +02:00
Guido Casati
7e495db5ec Add encoding/decoding lib for F1 Setup Failure (interface management) 2024-09-27 17:38:38 +02:00
Guido Casati
28e2d67ee5 Fixes to F1 Setup Failure
* added missing Transaction ID to te F1 Setup Failure message struct
* fill F1 Setup Failure transaction ID in RRC before calling the F1 Setup Failure function
2024-09-27 17:38:38 +02:00
Guido Casati
3a5ace00d2 Use F1AP lib for F1 Setup Response in stack 2024-09-27 17:38:38 +02:00
Guido Casati
df2c92e652 Add test for F1AP Setup Response enc/dec lib 2024-09-27 17:38:35 +02:00
Guido Casati
30628b820c Add encoding/decoding lib for F1AP Setup Response (Interface Management) 2024-09-27 17:38:30 +02:00
Jaroslava Fiedlerova
ed4af19590 Merge remote-tracking branch 'origin/remove-DRX-UE-capabilities' into integration_2024_w39 2024-09-27 17:33:20 +02:00
Jaroslava Fiedlerova
16d8281418 Merge remote-tracking branch 'origin/NR_GNB_PDSCH_FIX' into integration_2024_w39 2024-09-27 17:13:18 +02:00
Jaroslava Fiedlerova
36ade4a153 Merge remote-tracking branch 'origin/fix_fapi_SRS_gNB' into integration_2024_w39 2024-09-27 17:12:52 +02:00
Jaroslava Fiedlerova
2ba7d59dfe Merge remote-tracking branch 'origin/remove-includes' into integration_2024_w39 2024-09-27 17:12:39 +02:00
Thomas Schlichter
60c2b3fe00 nrscope: fix label on gNB scope - it is NR not LTE ;-) 2024-09-27 17:07:20 +02:00
Thomas Schlichter
9f8a2573ee gNB: update DL and UL bler_stats.mcs for logging also in case of harq_round_max == 1 2024-09-27 17:07:15 +02:00
Thomas Schlichter
60ca088e51 gNB: respect config value dl_max_mcs also in case of harq_round_max == 1 2024-09-27 17:07:11 +02:00
Thomas Schlichter
d9940b1bc4 NR UE: fix logical error in nr_ue_process_dci_dl_10()
Fixing this avoids the theoretical possibility of dereferencing a NULL pointer.
2024-09-27 17:07:03 +02:00
Thomas Schlichter
b0eedd3bbd gNB: fix a comment - current TA interval is 100 frames, not 10 2024-09-27 17:06:52 +02:00
Thomas Schlichter
791cc4f648 NR UE: set time sync PI controller integral weight to 0.0 by default
Experiments did show that the time sync is less stable in terrestrial mode if the integral part of the PI controller is used.
So set it to 0.0 by default. For NTN LEO use case we can still use it by providing the command line parameter --time-sync-I 0.2 .
fixes #846
2024-09-27 17:06:42 +02:00
Thomas Schlichter
64380eaca2 gNB: consider NTN_Koffset when scheduling PRACH 2024-09-27 17:03:36 +02:00
Thomas Schlichter
0ecf35de84 gNB: print error message if PRACH resources are already occupied in schedule_nr_prach() 2024-09-27 17:03:21 +02:00
Thomas Schlichter
656a87bb8a gNB: make sure not to write behind end of prach_pdu_indication_list in L1_nr_prach_procedures() 2024-09-27 16:59:48 +02:00
Laurent THOMAS
711afedfe1 warmup RF board in UE 2024-09-27 14:39:41 +02:00
Jaroslava Fiedlerova
fb1cc6c253 Merge remote-tracking branch 'origin/sib19-gnb' into integration_2024_w39 2024-09-27 14:10:17 +02:00
Jaroslava Fiedlerova
01524428d4 Merge remote-tracking branch 'origin/NR_UE_SLOTFEP_MERGE' into integration_2024_w39 2024-09-27 14:10:04 +02:00
Laurent THOMAS
8471922028 remove DRX from UE capabilities as we have not developped the feature 2024-09-27 11:48:33 +02:00
Laurent THOMAS
5a5063bddc cleaner faster nr_pdcch_demapping_deinterleaving() inner loop 2024-09-27 11:46:59 +02:00
Jaroslava Fiedlerova
3dbd8b9b3c Merge remote-tracking branch 'origin/PMI_extraction_fix' into integration_2024_w39 2024-09-27 11:40:55 +02:00
Jaroslava Fiedlerova
d2347a7c89 Merge remote-tracking branch 'origin/add_e2_sm_in_dockerfiles' into integration_2024_w39 2024-09-27 11:40:39 +02:00
Guido Casati
1d8e896567 Use F1AP lib for F1 Setup Request in stack 2024-09-27 11:22:03 +02:00
Guido Casati
c433f4de15 Add test for F1 Setup Request enc/dec lib 2024-09-27 11:22:03 +02:00
Guido Casati
f278b00837 Add encoding/decoding library for F1AP Setup Request (Interface Management) 2024-09-27 11:22:03 +02:00
Guido Casati
1a8ed8642f Use F1AP lib for UL RRC Message Trasfer in stack 2024-09-27 11:22:03 +02:00
Guido Casati
cc0ad07aa0 Add test for F1AP UL RRC Message Transfer enc/dec lib 2024-09-27 11:22:03 +02:00
Guido Casati
b85fd159b8 Add encoding/decoding lib for UL RRC Message Trasfer 2024-09-27 11:22:03 +02:00
Guido Casati
1d0d7e7baf Use F1AP lib for DL RRC Message Transfer in stack 2024-09-27 11:22:03 +02:00
Guido Casati
718269f1eb Add test for F1AP DL RRC Transfer enc/dec messages 2024-09-27 11:22:03 +02:00
Guido Casati
3374327752 Add encoding/decoding lib for F1AP DL RRC Transfer message 2024-09-27 11:22:03 +02:00
Robert Schmidt
57ecb11d53 Use F1AP lib Init UL RRC Msg in stack
Co-authored-by: Guido Casati <hello@guidocasati.com>
2024-09-27 11:22:03 +02:00
Robert Schmidt
ca6eb7bd10 Add message enc&dec for F1AP Initial UL RRC msg, and test
Co-authored-by: Guido Casati <hello@guidocasati.com>
2024-09-27 11:22:03 +02:00
Guido Casati
648ed19544 Use _F1_EQ_CHECK_INT in eq_f1ap_plmn 2024-09-27 11:22:03 +02:00
Guido Casati
11df3c743f Introduce new macros to improve debugging capabilities in F1AP library
* _F1_EQ_CHECK_GENERIC can be used to check the equality of two different members of F1AP structs
  and return `false` if the condition is not met.

When the condition fails, the macros will print a debug message to the standard error stream,
including the function name, line number, and the provided format string and arguments.
2024-09-27 11:22:01 +02:00
Jaroslava Fiedlerova
6b9ddbabd2 Merge remote-tracking branch 'origin/tini-for-arm' into integration_2024_w39 2024-09-27 11:17:07 +02:00
Jaroslava Fiedlerova
e0800d4225 Merge remote-tracking branch 'origin/fix_log2_approx' into integration_2024_w39 2024-09-27 11:16:22 +02:00
Jaroslava Fiedlerova
4093a485ce Merge remote-tracking branch 'origin/nu-ci-colosseum-integration' into integration_2024_w39 2024-09-27 11:16:06 +02:00
Robert Schmidt
28e30d24f7 Remove unused CI StatsFromGenObject() 2024-09-26 16:53:04 +02:00
Robert Schmidt
de2bf7ad8b Remove unused CI CaptureOnDockerNetworks() 2024-09-26 16:53:04 +02:00
Robert Schmidt
b9e56104d8 Remove unused CI code 2024-09-26 16:53:04 +02:00
Robert Schmidt
29383373de Remove unused code 2024-09-26 16:53:04 +02:00
Robert Schmidt
c5f090c23d Remove useless rm log 2024-09-26 16:53:04 +02:00
Robert Schmidt
87d28848dd Remove useless log: we see it in iperf call, and the XML 2024-09-26 16:53:04 +02:00
Bartosz Podrygajlo
65f14490c3 Remove additional unnecessary includes 2024-09-26 15:07:35 +02:00
Bartosz Podrygajlo
23cc049157 Remove unnecessary includes in rfsimulator 2024-09-26 14:59:14 +02:00
Thomas Schlichter
ed7750aba2 fix debug output for DEBUG_DLSCH_MAPPING 2024-09-26 13:21:32 +02:00
arora
8f5327527e Disable UHD unit tests to avoid gcc13 warnings 2024-09-26 11:41:59 +02:00
arora
c1641b66af Bump rhel to gcc13, to avoid gcc12 warnings in openair1 2024-09-26 11:41:45 +02:00
arora
ad74106548 Add E2 SM in the target dockerfiles to use e2 agent in container deployment
- Update builder dockerfiles to build Flexric for E2 SM
- Update target dockerfiles to copy E2 SM
2024-09-26 11:41:18 +02:00
Raghavendra Dinavahi
42ab4b4a0c fix for variable power in PDSCH REs
- correctly scale REs. Some REs have higher power during PDSCH RE-Mapping which is corrected.
	- Closes: Issue 811
2024-09-26 10:31:20 +02:00
Leonardo Bonati
18a5152994 Add Jenkins job for Colosseum testing integration
- Add Jenkinsfile, triggering Colosseum test run
- Add test scripts that interact with Colosseum running
2024-09-26 09:22:34 +02:00
Robert Schmidt
ab27d02e1c Add new F1AP msg enc&dec library
Add a new target f1ap_lib that groups F1AP ASN.1 encoding&decoding for
messages defined f1ap_messages_types.h. The objective is to, for each
F1AP message,
- add encoder&decoder (similar to what already exists, but without
  mandatory message sending afterwards)
- eq_X() function that checks two messages for equality (to be used
  mostly in tests)
- cp_X() function that deep-copies a message, e.g., to be used when
  sending ITTI messages, instead of manual copying done currently
- free_X() function that frees the memory associated to a memory, to
  avoid memory leaks.

Each message will be tested, notably that encoding&decoding as well as
copying yield identical messages.

The actual message encoding & decoding, tests, and their use will be
done in the forthcoming commits.
2024-09-25 17:15:48 +02:00
Robert Schmidt
ba208c0fc2 Group 5G platform types for common 5G-specific types
Co-authored-by: Guido Casati <hello@guidocasati.com>
2024-09-25 16:00:32 +02:00
Robert Schmidt
ea28b9bb5b F1AP: RLC mode: introduce separate type
The currently used type does not cover all possibilities. While we don't
encode&decode them, it might still be good to be able to express it, so
introduce the new type.

Co-authored-by: Guido Casati <hello@guidocasati.com>
2024-09-25 15:56:03 +02:00
Guido Casati
da6b1a4be4 Fixes to SI message struct item in CU messages
* num_SI is the size of the list of gNB-CU System Information messages
* the new struct member is an array, sized after the maximum nb
  of SIB types, which contains the SI container, the container length
  and the SIB type
2024-09-25 15:38:41 +02:00
Robert Schmidt
4b5ea6dcf8 Fix header inclusion: NGAP message types depends on S1AP 2024-09-25 15:38:41 +02:00
Robert Schmidt
c9da5aabff Use primitive type for TEID
teid_t is defined in platfrom_types.h, which defines a bunch of
4G-specific things. In an attempt to decouple from 4G types, do not use
it.
2024-09-25 15:38:41 +02:00
Robert Schmidt
bacf713299 Use char * for DU/CU IP address
The previously used net_ip_address_t type is limited to some bytes, but
the CU name might be longer. Use char * to allow longer DNS names.

Also, this type separates IPv4/v6, which is not necessary, as it is now
handled by the same C API (getaddrinfo()), since !2635.

Co-authored-by: Guido Casati <hello@guidocasati.com>
2024-09-25 15:38:41 +02:00
Guido Casati
deb63888d9 Cleanup of long-time unused F1AP interface management functions 2024-09-25 15:38:41 +02:00
Guido Casati
3554b33f37 Cleanup unused F1AP message transmission and system information files 2024-09-25 15:38:41 +02:00
Raghavendra Dinavahi
114ea60c42 removed nr_slot_fep_init_sync and used nr_slot_fep in UE 2024-09-25 09:50:34 +02:00
Raphael Defosseux
af1158140e fix(docker): making tini download platform specific to support ARM64 native builds
Signed-off-by: Raphael Defosseux <raphael.defosseux@eurecom.fr>
2024-09-24 15:46:05 +02:00
francescomani
e1218f9b3f use n_TimingAdvanceOffset according to what set in the RU for FDD CI test with COTS UE 2024-09-24 10:39:25 +02:00
francescomani
3166f20383 trigger RA DL or UL data arrival during RRC_CONNECTED when UL synchronisation status is non-synchronised 2024-09-24 10:39:25 +02:00
francescomani
e4a6d60dc2 implementation of time alignment timer at MAC UE 2024-09-24 10:39:25 +02:00
francescomani
25b94f12b3 configuration of timeAlignmentTimerCommon at MAC UE 2024-09-24 10:39:25 +02:00
francescomani
2a85d9905e configure TAG list 2024-09-24 10:39:25 +02:00
francescomani
ee4f95fd51 improvements in handling TAG-Id 2024-09-24 10:39:25 +02:00
francescomani
15279d8732 common function for default N_TA_offset (not sure what in develop is correct) 2024-09-24 10:39:25 +02:00
francescomani
a494580210 configuring n_TimingAdvanceOffset from upper layers, if present 2024-09-24 10:39:25 +02:00
francescomani
900a78fd9b preliminary cleanup 2024-09-24 10:20:40 +02:00
Robert Schmidt
ccdabb4c2c Merge branch 'integration_2024_w38b' into 'develop'
Integration: `2024.w38b`

Closes #839

See merge request oai/openairinterface5g!2977

* !2704 nr pdcp: add support for nea1
* !2800 UE improvements
* !2920 Receive SIB19 on nrUE
* !2975 Remove hardcoding of CPU measurements (respect option `-q`)
* !2976 Update latest SIMDE version
* !2957 T: increase max number of args
* !2916 NR UE PUSCH resource mapping optimization
* !2787 CI: increase max number of concurrent workers to 64
* !2974 fhi_72: allow to provide dpdk_mem_size to xran
* !2964 CI: Replacing the UE on Aerial setup
* !2973 CI: remove unused code and files
2024-09-24 08:16:36 +00:00
Thomas Schlichter
1b97cdafcd improve LLR scaling for better performance 2024-09-23 17:58:05 +02:00
Thomas Schlichter
4b679c0793 add test for log2_approx64() 2024-09-23 17:58:05 +02:00
Thomas Schlichter
58a2966499 add test for log2_approx() 2024-09-23 17:58:05 +02:00
Thomas Schlichter
4e09353b43 use SIMDE intrinsic to count leading zeroes and make rounding exact 2024-09-23 17:58:03 +02:00
francescomani
d304865489 fix for log2_approx to approximate to the nearest neighbor, instead of ceil 2024-09-23 17:56:50 +02:00
Jaroslava Fiedlerova
0dae0551eb Merge remote-tracking branch 'origin/ci-remove-unused-code' into integration_2024_w38b 2024-09-23 17:26:14 +02:00
Jaroslava Fiedlerova
11aeba0699 Merge remote-tracking branch 'origin/up2_on_Aerial' into integration_2024_w38b 2024-09-23 16:37:56 +02:00
Jaroslava Fiedlerova
1ada1c2635 Merge remote-tracking branch 'origin/fhi-72-dpdkMemorySize' into integration_2024_w38b 2024-09-23 12:45:13 +02:00
Jaroslava Fiedlerova
015257856d Merge remote-tracking branch 'origin/ci-fix-multi-ue' into integration_2024_w38b 2024-09-23 12:44:48 +02:00
Robert Schmidt
ec2afa22b1 Fix: egrep is obsolescent, use grep -E
See e.g., egrep(1) [https://linux.die.net/man/1/egrep]:

> two variant programs egrep and fgrep are available. egrep is the same
> as grep -E. fgrep is the same as grep -F. Direct invocation as either
> egrep or fgrep is deprecated

See also the rationale of the POSIX description of grep
(https://pubs.opengroup.org/onlinepubs/9699919799/utilities/grep.html):

> This grep has been enhanced in an upwards-compatible way to provide
> the exact functionality of the historical egrep and fgrep commands as
> well. It was the clear intention of the standard developers to
> consolidate the three greps into a single command.

Closes: #839
2024-09-23 12:19:49 +02:00
Robert Schmidt
40bde2ae75 Jenkinsfiles: Print if an XML file is not present 2024-09-23 12:19:49 +02:00
Robert Schmidt
de310c6e82 Remove unused CI Jenkinsfiles
As of now, these seem to be the Jenkinsfiles used on Jenkins

ci-scripts/Jenkinsfile-cluster
ci-scripts/Jenkinsfile-colosseum
ci-scripts/Jenkinsfile-GitLab-Container
ci-scripts/Jenkinsfile-GitLab-COTS-UE-Test
ci-scripts/Jenkinsfile-nrue
ci-scripts/Jenkinsfile-physim-deploy
ci-scripts/Jenkinsfile-push-registry
ci-scripts/Jenkinsfile-tmp-full-ran
ci-scripts/Jenkinsfile-tmp-multi-enb
ci-scripts/Jenkinsfile-tmp-multi-enb-nsa
ci-scripts/Jenkinsfile-tmp-ran

(gather all files in a file, then cat <file> | sort | uniq)

Remove all others.
2024-09-23 12:19:49 +02:00
Robert Schmidt
4a9944bf06 Remove unused OaiCiTest class members 2024-09-23 12:19:49 +02:00
Robert Schmidt
3e2ee3878e Remove unused python files 2024-09-23 12:19:49 +02:00
Robert Schmidt
6147a83f0b Remove unused Perform_X2_Handover XML step: no XML uses this 2024-09-23 12:19:49 +02:00
Robert Schmidt
ec64826fde Remove unused Terminate_OAI_UE XML step: no XML uses this
- Fix Jenkinsfile-tmp-full-ran: python test stage TerminateOAIUE() has been removed
2024-09-23 12:19:38 +02:00
francescomani
196effa114 fix PMI extraction, X1 and X2 order was wrong 2024-09-23 11:54:48 +02:00
Robert Schmidt
68c28a4828 Modify default xran DPDK socket memory/limit to 0
The default values set by xran for DPDK socket memory/limit is 8192. It
is changed when the variable for the memory size, given down to xran, is
non-zero (cf also previous patch). Since the last patch, if nothing is
given in OAI configuration, OAI will pass down a size of 8192. However,
a configuration value of 0 is a valid choice (it is a pre-allocation,
DPDK will allocate dynamically), so modify the default in xran to be 0
so that all sizes, including 0, can be given to DPDK.

Note that the currently used implementation of xran will always try to
allocate this memory on NUMA node 0. If you want to use another one,
this field has to be set to 0 (no pre-allocation), and DPDK will
allocate it dynamically.

Co-authored-by: Sagar Arora <sagar.arora@openairinterface.org>
2024-09-21 07:12:07 +02:00
Robert Schmidt
513f0beb37 Parse xran version strings for Bronze, E, F 2024-09-21 07:12:07 +02:00
Robert Schmidt
645e9dd3cd fhi_72: allow to provide dpdk_mem_size to xran
xran has a mechanism to request DPDK to allocate a configurable amount
of bytes for huge pages. We set it to 0 until now; expose this variable
through configuration, and provide a meaningful default 8192 MiB.
Provide documentation.
2024-09-21 07:12:06 +02:00
francescomani
385999dc5e logging improvements 2024-09-20 18:58:27 +02:00
Robert Schmidt
2932551f2c Update 5G-OTA testbench image: add aerial, fhi72 2024-09-20 18:08:20 +02:00
Reem Bahsoun
e96a7eed20 Replace UE on sphex with up2, improve throughput
- Change XML and YAML to use up2 in aerial pipeline
- Modify gNB config to improve throughput
- Reflect changes in documentation
2024-09-20 18:07:48 +02:00
Jaroslava Fiedlerova
d017afaded Merge remote-tracking branch 'origin/NR_UE_pusch_optimization' into integration_2024_w38b 2024-09-20 16:43:31 +02:00
Jaroslava Fiedlerova
05bb40d7ea Merge remote-tracking branch 'origin/t-tracer-increase-maxargs' into integration_2024_w38b 2024-09-20 16:42:57 +02:00
Jaroslava Fiedlerova
77fe56d38e Merge remote-tracking branch 'origin/simde-update' into integration_2024_w38b 2024-09-20 13:59:15 +02:00
Jaroslava Fiedlerova
63609313d2 Merge remote-tracking branch 'origin/remove-incoherent-set-cpumeas' into integration_2024_w38b 2024-09-20 13:59:00 +02:00
Jaroslava Fiedlerova
b64b2e310d Merge remote-tracking branch 'origin/sib19-ue-reception' into integration_2024_w38b 2024-09-20 13:58:45 +02:00
Jaroslava Fiedlerova
b565eb01e8 Merge remote-tracking branch 'origin/ue-fixes-gnb-testion' into integration_2024_w38b 2024-09-20 13:58:24 +02:00
Jaroslava Fiedlerova
b3d264f29a Merge remote-tracking branch 'origin/nr-pdcp-nea1' into integration_2024_w38b 2024-09-20 13:57:59 +02:00
Roberto Rosca
b6b3cc5197 Refactor SIB scheduling
- refactor nr_fill_nfapi_dl_SIB_pdu to use it on both SIB1 and OtherSI
  - extract tbs related calculations into function get_tbs to avoid duplicates
  - moved OtherSI search space initializations to nr_mac_config_scc
2024-09-20 10:17:39 +03:00
Sakthivel Velumani
321a20ea78 Fix vector mult function for out of bound access 2024-09-19 09:56:25 -04:00
Sakthivel Velumani
a50cb354f4 Simplify map_current_symbol() function 2024-09-19 09:56:25 -04:00
Sakthivel Velumani
e4c37fb3b2 Simplify data in DMRS symbol function
Mapping of data REs in DMRS symbol depends only on number of CDM group
no data. So the special case function that depended on delta is removed
and a single function is used.
2024-09-19 09:56:25 -04:00
Robert Schmidt
952052127a Avoid ubsan error
like this:

  /oai-ran/openair3/SECU/snow3g.c:429:23: runtime error: left shift of 232 by 24 places cannot be represented in type 'int'
2024-09-19 10:47:46 +02:00
Cedric Roux
523d84634a snow3g: add a test program
To use:

    cd <top directory of openair>
    mkdir build
    cd build
    cmake .. -GNinja -DENABLE_TESTS=ON
    ninja tests (alternatively: ninja snow3g_tests)
    ctest (alternatively: ctest -R snow3g_tests)
2024-09-19 10:40:55 +02:00
Laurent THOMAS
c8116b3fa3 remove dead code 2024-09-19 09:29:02 +02:00
Robert Schmidt
06ec6150a1 Update latest SIMDE version
Build on ARM fails in the previous version, while the current master
(1a09d3bc) works. So let's update to a newer version to avoid problems
on ARM, and assuming x86 works.
2024-09-18 19:23:05 +02:00
Raghavendra Dinavahi
dfbedadd5f Use nr_slot_fep for sidelink, removed sl_nr_slot_fep 2024-09-18 17:17:19 +02:00
Laurent THOMAS
31f770978c option q is to set cpu measurements but it is hardcoded in some places 2024-09-18 16:02:14 +02:00
Robert Schmidt
99226fc66c Remove unused Initialize_OAI_UE XML step: no XML uses this 2024-09-18 15:13:13 +02:00
Robert Schmidt
aeb6442f71 Remove unused Build_OAI_UE XML step: no XML uses this 2024-09-18 15:13:13 +02:00
Robert Schmidt
85efd54f3b Remove unused CI Test XML files
As of now, these XMLs seem to be used:

  xml_files/cluster_image_build.xml
  xml_files/container_4g_l2sim_tdd_down.xml
  xml_files/container_4g_l2sim_tdd.xml
  xml_files/container_4g_rfsim_down.xml
  xml_files/container_4g_rfsim_fdd_05MHz_down.xml
  xml_files/container_4g_rfsim_fdd_05MHz_noS1_down.xml
  xml_files/container_4g_rfsim_fdd_05MHz_noS1.xml
  xml_files/container_4g_rfsim_fdd_05MHz.xml
  xml_files/container_4g_rfsim_fdd_10MHz_down.xml
  xml_files/container_4g_rfsim_fdd_10MHz.xml
  xml_files/container_4g_rfsim_fdd_20MHz_down.xml
  xml_files/container_4g_rfsim_fdd_20MHz.xml
  xml_files/container_4g_rfsim_fembms_down.xml
  xml_files/container_4g_rfsim_fembms.xml
  xml_files/container_4g_rfsim_mbms_down.xml
  xml_files/container_4g_rfsim_mbms.xml
  xml_files/container_4g_rfsim.xml
  xml_files/container_5g_e1_rfsim_down.xml
  xml_files/container_5g_e1_rfsim.xml
  xml_files/container_5g_f1_rfsim_down.xml
  xml_files/container_5g_f1_rfsim.xml
  xml_files/container_5g_fdd_rfsim_down.xml
  xml_files/container_5g_fdd_rfsim.xml
  xml_files/container_5g_flexric_rfsim_down.xml
  xml_files/container_5g_flexric_rfsim.xml
  xml_files/container_5g_l2sim_proxy.xml
  xml_files/container_5g_l2sim_tdd_down.xml
  xml_files/container_5g_l2sim_tdd.xml
  xml_files/container_5g_rfsim_24prb_down.xml
  xml_files/container_5g_rfsim_24prb.xml
  xml_files/container_5g_rfsim_2x2_down.xml
  xml_files/container_5g_rfsim_2x2.xml
  xml_files/container_5g_rfsim_down.xml
  xml_files/container_5g_rfsim_f1_accelleran_down.xml
  xml_files/container_5g_rfsim_f1_accelleran.xml
  xml_files/container_5g_rfsim_fdd_phytest_down.xml
  xml_files/container_5g_rfsim_fdd_phytest.xml
  xml_files/container_5g_rfsim_fr2_32prb_down.xml
  xml_files/container_5g_rfsim_fr2_32prb.xml
  xml_files/container_5g_rfsim_ntn_geo_down.xml
  xml_files/container_5g_rfsim_ntn_geo.xml
  xml_files/container_5g_rfsim_sidelink_down.xml
  xml_files/container_5g_rfsim_sidelink.xml
  xml_files/container_5g_rfsim_tdd_dora_down.xml
  xml_files/container_5g_rfsim_tdd_dora.xml
  xml_files/container_5g_rfsim_u0_25prb_down.xml
  xml_files/container_5g_rfsim_u0_25prb.xml
  xml_files/container_5g_rfsim.xml
  xml_files/container_image_build_cross.xml
  xml_files/container_image_build.xml
  xml_files/container_l2sim_proxy.xml
  xml_files/container_lte_b200_fdd_05Mhz_tm1_if4_5.xml
  xml_files/container_lte_b200_fdd_05Mhz_tm1_no_rrc_activity.xml
  xml_files/container_lte_b200_fdd_05Mhz_tm1.xml
  xml_files/container_lte_b200_fdd_10Mhz_tm1_cdrx.xml
  xml_files/container_lte_b200_fdd_10Mhz_tm1_oaiue_cleanup.xml
  xml_files/container_lte_b200_fdd_10Mhz_tm1_oaiue.xml
  xml_files/container_lte_b200_fdd_10Mhz_tm1.xml
  xml_files/container_lte_b200_fdd_20Mhz_tm1.xml
  xml_files/container_lte_b200_fdd_cleanup.xml
  xml_files/container_lte_b200_tdd_05Mhz_tm1_if4_5.xml
  xml_files/container_lte_b200_tdd_05Mhz_tm1.xml
  xml_files/container_lte_b200_tdd_10Mhz_tm1.xml
  xml_files/container_lte_b200_tdd_20Mhz_tm1_default_scheduler.xml
  xml_files/container_lte_b200_tdd_20Mhz_tm1.xml
  xml_files/container_lte_b200_tdd_cleanup.xml
  xml_files/container_lte_n3xx_tdd_2x2_tm1.xml
  xml_files/container_lte_n3xx_tdd_2x2_tm2.xml
  xml_files/container_nsa_b200_quectel.xml
  xml_files/container_nsa_b200_terminate.xml
  xml_files/container_sa_aerial_quectel_cleanup.xml
  xml_files/container_sa_aerial_quectel.xml
  xml_files/container_sa_aw2s_2x2_asue.xml
  xml_files/container_sa_aw2s_asue_cleanup.xml
  xml_files/container_sa_aw2s_asue.xml
  xml_files/container_sa_b200_quectel.xml
  xml_files/container_sa_b200_terminate.xml
  xml_files/container_sa_e1_b200_quectel.xml
  xml_files/container_sa_e1_b200_terminate.xml
  xml_files/container_sa_f1_b200_quectel.xml
  xml_files/container_sa_f1_b200_terminate.xml
  xml_files/container_sa_fhi72_benetel_asue_cleanup.xml
  xml_files/container_sa_fhi72_benetel_asue.xml
  xml_files/container_sa_fhi72_vvdn_up2_cleanup.xml
  xml_files/container_sa_fhi72_vvdn_up2.xml
  xml_files/container_sa_n310_2X2_100MHz_cleanup.xml
  xml_files/container_sa_n310_2X2_100MHz_quectel.xml
  xml_files/container_sa_n310_2X2_60MHz_cleanup.xml
  xml_files/container_sa_n310_2X2_60MHz_quectel.xml
  xml_files/container_sa_n310_nrue_cleanup.xml
  xml_files/container_sa_n310_nrue.xml
  xml_files/container_sa_sc_b200_quectel.xml
  xml_files/container_sa_sc_b200_terminate.xml
  xml_files/cppcheck.xml
  xml_files/fr1_5gc_closure.xml
  xml_files/fr1_5gc_start.xml
  xml_files/fr1_cn5g_basic_deploy.xml
  xml_files/fr1_cn5g_basic_undeploy.xml
  xml_files/fr1_enb_build.xml
  xml_files/fr1_epc_closure.xml
  xml_files/fr1_epc_start.xml
  xml_files/fr1_oai_cn_deploy.xml
  xml_files/fr1_oai_cn_undeploy.xml
  xml_files/gnb_phytest_usrp_run_100_2x2.xml
  xml_files/gnb_phytest_usrp_run_60_2x2.xml
  xml_files/gnb_phytest_usrp_run_60.xml
  xml_files/gnb_phytest_usrp_run.xml
  xml_files/gnb_usrp_build.xml
  xml_files/ldpc_gpu_test.xml
  xml_files/lte_2x2_tm1_quectel.xml
  xml_files/lte_2x2_tm2_quectel.xml
  xml_files/lte_oai_cn_deploy.xml
  xml_files/lte_oai_cn_undeploy.xml
  xml_files/physim_deploy_run.xml
  xml_files/sa_cn5g_20897_closure.xml
  xml_files/sa_cn5g_20897_start.xml
  xml_files/sa_cn5g_closure.xml
  xml_files/sa_cn5g_start.xml
  xml_files/t1_offload_test.xml
  xml_files/t2_offload_dec_nr_ulsim.xml
  xml_files/t2_offload_enc_nr_dlsim.xml

Obtained by going through all RAN pipelines, copying out the XMLs of all
pipelines, then doing

  cat xml.dump | sort | uniq
2024-09-18 15:13:13 +02:00
Laurent THOMAS
7a5da40d0b Improve tracing for DLSCH decoding results
- Better trace DLSCH decoding result
- Rename the decode result variable to separate with later ack/nack
  encode of this decoding result from 3GPP (not trivial true=1 coding)
- Cleanup decodeResult usage
- Remove unused defines

Co-authored-by: Francesco Mani <email@francescomani.it>
2024-09-18 14:40:07 +02:00
Roberto Rosca
8bc2271001 conf parameters added (commented) + schedule sib19 only if parameters present in conf file 2024-09-18 12:17:17 +03:00
Roberto Rosca
a197c0a41a Schedule SIB19 based on scheduling info from SIB1 2024-09-18 12:17:17 +03:00
Roberto Rosca
b9d2f916bc Added scheduling info for sib19 to sib1 2024-09-18 12:17:17 +03:00
Roberto Rosca
d994d537e9 Added sib19 structure with initialization 2024-09-18 12:17:17 +03:00
Robert Schmidt
ba2d7aad18 Merge branch 'integration_2024_w38' into 'develop'
Integration: `2024.w38`

See merge request oai/openairinterface5g!2970

* !2932 Minor: Set correct USRP flags when not transmitting
* !2961 prevent UE to declare RLF in phy-test mode
* !2962 prevent UE to print HARQ processing error log for MSG2
* !2958 Automatic selection of SSB bitmap length
* !2967 bugfix: reject malformed rrcSetupComplete message
* !2947 Add 5G/NR MAC documentation
* !2959 nr rlc: fix standalone tests
2024-09-18 09:00:27 +00:00
Jaroslava Fiedlerova
93a3abaf80 Merge remote-tracking branch 'origin/nr-rlc-fix-standalone-tests' into integration_2024_w38 2024-09-17 21:10:16 +02:00
Bartosz Podrygajlo
771d11a148 dockerized clang-format error detection tool 2024-09-17 13:52:01 +02:00
Roberto Rosca
4c15a04b87 Receive SIB19 on UE 2024-09-17 14:13:11 +03:00
Jaroslava Fiedlerova
dd2ba2235b Merge remote-tracking branch 'origin/add-mac-doc' into integration_2024_w38 2024-09-17 11:32:19 +02:00
Jaroslava Fiedlerova
3ca4f66e05 Merge remote-tracking branch 'origin/bugfix-rrcSetupComplete' into integration_2024_w38 2024-09-17 11:24:40 +02:00
Jaroslava Fiedlerova
ad6e189f8d Merge remote-tracking branch 'origin/issue_836' into integration_2024_w38 2024-09-17 08:40:57 +02:00
Jaroslava Fiedlerova
4b453b9dd8 Merge remote-tracking branch 'origin/NR_UE_MSG2_error' into integration_2024_w38 2024-09-16 14:33:39 +02:00
Jaroslava Fiedlerova
3f6630acbd Merge remote-tracking branch 'origin/no_RLF_phytest' into integration_2024_w38 2024-09-16 14:33:11 +02:00
Jaroslava Fiedlerova
872981f207 Merge remote-tracking branch 'origin/NR_UE_fix_usrp_flag' into integration_2024_w38 2024-09-16 14:32:22 +02:00
Robert Schmidt
93a8bb4032 Clarification on how often we want to make releases 2024-09-16 13:45:13 +02:00
Robert Schmidt
1696d28e0d Add 5G/NR MAC documentation 2024-09-16 10:58:43 +02:00
Robert Schmidt
6a4ceb2921 Print deltaMCS dB information 2024-09-16 09:47:24 +02:00
Cedric Roux
24de83d3cd bugfix: reject malformed rrcSetupComplete message 2024-09-11 16:57:06 +02:00
Jaroslava Fiedlerova
2eff246d64 ci: modification of SA-2x2, 60 MHz TDD testcase conf to use nea1/nia1 2024-09-11 16:25:07 +02:00
Cedric Roux
18f7a702a4 snow3g: provide a faster implementation 2024-09-11 16:25:00 +02:00
Cedric Roux
73ae18dabb nr pdcp: add support for nea1 2024-09-11 16:00:08 +02:00
francescomani
f1c8134d4f prevent UE to declare RLF in phy-test mode 2024-09-11 15:05:49 +02:00
Raphael Defosseux
469d58f989 Merge branch 'integration_2024_w36' into 'develop'
Integration Branch : 2024 Week 36

See merge request oai/openairinterface5g!2956
2024-09-11 11:14:20 +00:00
Sakthivel Velumani
76cec45e80 Set correct USRP flags when not transmitting
Flags are set to INVALID when it is not a UL slot. This is important
when using GPIO to control TRX switch.
2024-09-10 14:41:05 -04:00
francescomani
ece206758a prevent UE to print HARQ processing error log for MSG2 2024-09-10 16:33:59 +02:00
francescomani
b377107273 add missing cast for short bitmap in configuration at gNB and UE 2024-09-09 18:37:56 +02:00
Raphael Defosseux
1691c607cc Merge remote-tracking branch 'origin/fix-nas-ue-memory-leaks' into integration_2024_w36 2024-09-09 12:08:56 +02:00
Raphael Defosseux
fd6cf5aaf7 Merge remote-tracking branch 'origin/pusch-tx-power-workaround' into integration_2024_w36 2024-09-09 12:08:38 +02:00
Cedric Roux
a373a8da6b nr rlc: fix standalone tests
./run_tests.sh was not functional anymore because of the introduction
of AssertFatal() in nr_rlc_entity.c

Including the .h and providing exit_function() solves the problem.
2024-09-09 11:30:59 +02:00
francescomani
e6e0602da0 removing ssb_PositionsInBurs_BitmapPR from config files 2024-09-08 11:40:47 +02:00
francescomani
a14782f1a8 automatic selection of ssb bitmap length 2024-09-08 10:33:37 +02:00
Cedric Roux
de3a214990 T: support up to 19 variables in the T() macro
Some people needed that.

Let's stop to 19 for the time being. It's tricky enough.
We can increase later if needed. (A previous commit
made the tracers to accept up to 32 variables.)
2024-09-06 16:51:34 +02:00
Cedric Roux
9e698bd534 T: cleanup: make shorter lines
80 columns are enough.
2024-09-06 16:51:14 +02:00
Cedric Roux
105eaa607f T: increase max number of args in an event and make the define more private
T_MAX_ARGS was 16 and some people start to use the T machinery with
more than 16 values. So be it. Let tracers be friendly and accept 32.
(More commits to follow for full support.)

Also why is T_MAX_ARGS in T_defs.h when it's only used by event.h?
Hum?
2024-09-06 16:49:12 +02:00
Cedric Roux
1e645c514f T: bugfix: check limits 2024-09-06 16:38:15 +02:00
Raphael Defosseux
4c9c26a307 Merge remote-tracking branch 'origin/yaml-config' into integration_2024_w36 2024-09-06 14:27:06 +02:00
Raphael Defosseux
b86f157c6d Merge remote-tracking branch 'origin/f1-ho-prep' into integration_2024_w36 2024-09-06 14:26:02 +02:00
Raphael Defosseux
5043f6e282 Merge remote-tracking branch 'origin/wip-imscope' into integration_2024_w36 2024-09-06 14:25:04 +02:00
Raphael Defosseux
99d2ad8e1a chore(ci): entitlement folder should be created before copying
Signed-off-by: Raphael Defosseux <raphael.defosseux@eurecom.fr>
2024-09-06 14:24:15 +02:00
Raphael Defosseux
b5ac09de34 Merge remote-tracking branch 'origin/rhsm-oc' into integration_2024_w36 2024-09-06 14:23:18 +02:00
Raphael Defosseux
7a7aaf5d83 Merge remote-tracking branch 'origin/switch-to-rocky9' into integration_2024_w36 2024-09-06 14:22:50 +02:00
Raphael Defosseux
2d675bc3e8 Merge remote-tracking branch 'origin/NR_PHY_common_LLR' into integration_2024_w36 2024-09-06 14:22:32 +02:00
Raphael Defosseux
e2e57a050d Merge remote-tracking branch 'origin/minor-doc-improvements' into integration_2024_w36 2024-09-06 14:22:09 +02:00
Robert Schmidt
ab89324b1e Pretty-print PLMN in F1 Setup Request 2024-09-06 10:20:08 +02:00
Robert Schmidt
5d05078f4e Validate neighbour config when DUs connect 2024-09-06 10:20:08 +02:00
Roberto Louro Magueta
3cfc10ddaa Bugfix: an A3 configuration is for a specific PCI
Co-authored-by: Luis Pereira <lpereira@allbesmart.pt>
2024-09-06 10:20:08 +02:00
Robert Schmidt
d6d7064c0b A3 Event is for a PCI: Rename variable to make this clear 2024-09-06 10:20:08 +02:00
Robert Schmidt
fde10b9203 Use u64 for neighbour nr_cellid: is up to 38 bits 2024-09-06 10:20:08 +02:00
Roberto Magueta
327baf2938 Bugfix: an A3 configuration is for a specific PCI
Co-authored-by: Luis Pereira <lpereira@allbesmart.pt>
2024-09-06 10:20:08 +02:00
Robert Schmidt
b01810a858 Introduce an_release flag: only free UE in RRC+ack if requested by core
The F1AP UE context release procedure can happen in at least two cases:

1. core requested a release of a UE
2. CU requests DU a release of a UE without a core release (e.g.,
   handover)

In case 1., the CU has to fully release the UE in the CU, then ack the
NGAP message from the core, whilst in 2., nothing of that should happen
after the DU acknowledges the F1AP UE context release cmd.
2024-09-06 10:20:08 +02:00
Robert Schmidt
b3d04c1bbf RETURN_IF_INVALID_ASSOC_ID(): use assoc_id directly
In some cases, we don't have the ue_data that is used until this commit.
Make this macro more general by only requiring the assoc_id to check.
2024-09-06 10:20:08 +02:00
Robert Schmidt
1a9df52cf3 Fixup get_drb(): can have up to 32 DRBs 2024-09-06 10:20:08 +02:00
Robert Schmidt
35f7225fb4 Correct cuup_notify_reestablishment() look up errors
cuup_notify_reestablishment() used
  &ue_p->established_drbs[drb_id]
to look up a bearer, which is wrong, because it should be drb_id - 1
as in the top of the loop. Also, it used the dedicated get_drb()
function; harmonize to use only this function.
2024-09-06 10:20:08 +02:00
Robert Schmidt
fe9c0fba2f Refactor DRB filling from E1 response in separate function
Refactor this to allow the reuse of this function for handover later.
2024-09-06 10:20:08 +02:00
Robert Schmidt
e7eb1b1c3b Store DRB UL TEID information at RRC
To be used later in the case of handover.
2024-09-06 10:20:08 +02:00
Robert Schmidt
605dfa0142 Refactor: Store DU's DRB TEID/address through separate function
A follow-up commit refactors the filling of information of DRBs to set
up in a separate function (to be reused for handover later). Hence, we
cannot store the DRB TEID/address in the same functions, because it is
a logically separate step, and might not always be available.
2024-09-06 10:20:08 +02:00
Robert Schmidt
d00ac2031c Correct F1-U TEID variable names, simplify code
In e1_send_bearer_updates(), we send the DL (DU) TEID and address to the
CU-UP. Therefore, correct the variable names to reflect that the F1-U
information pertains to the DU.

Also, move the tunnel info update function f1u_dl_gtp_update() to a more
prominent place, and take the pointer to the struct containing the
"interesting" information.
2024-09-06 10:20:08 +02:00
Robert Schmidt
29d8e3ce3a Remove unused defines and structures 2024-09-06 10:20:08 +02:00
Robert Schmidt
44d427bf7b Rename RRC_BUF_SIZE for 5G to increase size
A maximum RRC buffer size of 1024 might be very small. We should
increase it, but then the 5G RRC_BUF_SIZE does conflict with other
definitions. To make it unique, also rename to NR_RRC_BUF_SIZE.
2024-09-06 10:20:08 +02:00
Robert Schmidt
d2073d924e Remove unused information from PDU session 2024-09-06 10:20:08 +02:00
Robert Schmidt
94258b0fb9 Remove unused fields of DRB 2024-09-06 10:20:08 +02:00
Robert Schmidt
125210fa1e RRC: Correct some logs 2024-09-06 10:20:08 +02:00
Robert Schmidt
e01957e890 Remove RRC status: it is not needed 2024-09-06 10:20:08 +02:00
Robert Schmidt
e63232576e RRC stats: print DU's SSB ARFCN 2024-09-06 10:20:08 +02:00
luis_pereira87
303e724845 Always set firstActive/defaultBWP
Always set the firstActive and defaultBWP in the initial
cellGroupConfig. This is necessary to make the Quectel accept the
handover RRCReconfiguration; it seems that this also works reliably in
normal connection set up, so we can add it.
2024-09-06 10:20:08 +02:00
Robert Schmidt
ea171c75c0 nr_timer: consistently pass by ref, rename to nr_timer_is_active()
Pass consistently the NR_timer_t object through a pointer. Since we have
to modify all occurrences of is_nr_timer_active(), we use that occasion
and rename that function to nr_timer_is_active() to make it consistent
with all other functions, starting with nr_timer.
2024-09-06 10:20:08 +02:00
Robert Schmidt
8d6b6676c5 Reorganize sequence of reestablishment checks
Reorganize the sequence of checks done in reestablishment to make it
more logical:

- check conditions of request (correct C-RNTI)
- check conditions of DU (has MIB/SIB1, MTC)
- check the UE, and from which DU it comes

This will also help to extend it towards reestablishment coming from
different DUs in the case of handover.
2024-09-06 10:20:08 +02:00
Robert Schmidt
31bad32b57 Reestablishment with RRC setup fallback: release old UE if applicable 2024-09-06 10:20:08 +02:00
Robert Schmidt
4e7e8a6fa0 Fix bug: correctly fill LCID in ue context setup resp
Before this bug fix, when using F1, we get this warning:

  Constraint validation failed: LCID: constraint failed (/home/richie/openairinterface5g/cmake_targets/ran_build/build/openair2/F1AP/MESSAGES/F1AP_LCID.c:30)

This is because (1) we don't actually store the LCID, then (2) we did
not put it into the F1 ASN.1 structures. Fix both, to make this warning
disappear.

To actually print the full error message, increase the error buffer
size. Also, for the future, to avoid guessing, print ASN.1 XML when we
encounter a failed constraint validation.
2024-09-06 10:20:08 +02:00
Robert Schmidt
32b2ad259d Harmonize Msg3 PUSCH LOG_A to be only one, demote RA cont res timer 2024-09-06 10:20:08 +02:00
Robert Schmidt
ba0b63fe2f F1AP: Handle SCTP communication lost
It can happen that SCTP communication is simply lost, e.g.

  [SCTP]   SCTP_ASSOC_CHANGE to SCTP_COMM_LOST
  [SCTP]   sctp_recvmsg (fd 104, len -1 ): Connection reset by peer:104

The previous code only handled the SHUTDOWN event, but in abnormal
situations, we should also handle the connection state change and signal
to RRC that the endpoint is dead, which is now implemented.
2024-09-06 10:20:08 +02:00
Robert Schmidt
25430e9b25 Fixup: on SCTP conn event, transmit assoc_id
User of the SCTP module use the assoc_id for connection identification.
The previous code set the assoc_id to -1, so there is no way of telling
which connection broke. Use the assoc_id instead
2024-09-06 10:20:08 +02:00
Robert Schmidt
ec6469d088 F1AP: Remove unnecessary logs 2024-09-06 10:20:08 +02:00
Robert Schmidt
9b7d3351a1 DU: if requested to remove non-existing UE, just ack
The failure mode observed here was that the CU sent a release command
for a UE that the DU does not know. Given, that the outcome of the
release command (no UE) is equal to the current state (no UE), from
the DU point of view, we can safely ack the command.
2024-09-06 10:20:08 +02:00
Robert Schmidt
798a62271c DL RRC message: print log if oldUE unknown 2024-09-06 10:20:08 +02:00
Bartosz Podrygajlo
ca217f8f5b Workaround for PUSCH TX power not applied in PHY
This is a temporary workaround for issue with UE PHY not applying TX power
instructions from MAC. To be reverted once implementation of TX gain control
is finished.
2024-09-06 08:39:54 +02:00
Bartosz Podrygajlo
9b59ba6326 Enable configuration of NR UE through a YAML file
This commit adds yaml-cpp library to required docker images and build commands. There is one workaround
in cross-compilation for apt behavior for installing libyaml-cpp-dev. Apt will uninistall previous
versions of the package whenever another one is installed. This means that installing the arm version
breaks amd version and vice versa. This makes it impossible to have both libs installed at the same
time which is required by the cross-compilation build command (it calls cmake twice, once with native
and once with target architecture)
2024-09-06 08:34:18 +02:00
Bartosz Podrygajlo
0b684732ee YAML as a drop-in replacement for libconfig
This commit introduces a substitute module library for setting up softmodems using YAML instead of libconfig.
The softmodems should work the same with both types of files. Extra care was put to make sure the behavior
of both modules is the same.

Example yaml config files were added for the UE and gNB
2024-09-06 08:33:10 +02:00
Bartosz Podrygajlo
e1879c07bc Fix segfault when attempting to use unsupported scope types in nrscope
Do not attempt to copy scope types >= MAX_SCOPE_TYPES in nrscope as it does
not support them at this point.
2024-09-05 15:21:07 +02:00
Bartosz Podrygajlo
8eb9e3d902 Fix pdschRxdataF_comp phy scope data source
pdschRxdataF_comp data source was handled incorrectly. Each symbol entire slot data was copied. This
caused pdschRxdataF_comp to mostly contain zeros. The call to UEscopeCopy was moved from symbol loop
into last symbol processing. In case imscope is used padding and unused REs are not copied to the
sink.

Added checks inside scope functions to ensure correct functionality.
2024-09-05 15:19:37 +02:00
Guido Casati
70dd524e2b Define softmodem bits in a separate header for either C and C++ 2024-09-05 15:19:26 +02:00
Bartosz Podrygajlo
d8bba3124f Add imscope to optional libraries in ./build_oai 2024-09-05 15:19:17 +02:00
Bartosz Podrygajlo
6dcd3ae8c4 Use --imscope flag to enable/disable imscope 2024-09-05 15:19:09 +02:00
Bartosz Podrygajlo
bdc6df8c42 NR UE & gNB imscope.
A new phy scope based on ImGui and ImPlot. This scope uses a different concurrency model than previous
scopes.

The PHY thread writing the data first checks if the data is ready to be written. If its not, nothing is copied.
The GUI thread reads data if available and marks it ready to write. This makes sure that the PHY threads are not
busy copying data that would never be displayed.

Some of the scopes also have a freeze functionality that further limit the amount of data that needs to be copied
from PHY threads. If a scope is "frozen" it still allows the user to explore the data using plots zoom/pan functions
but doesn't cause PHY threads to perform extra writes on the displayed data.

A compile option was added to enable/disable the scope. Use cmake -DENABLE_IMSCOPE=ON to enable the scope.

Update CXX standard to 17; it is required by some libraries (e.g., dear imgui). The oldest gcc version in
use by a distribution supported is Ubuntu 20, which has gcc 9.4 with c++17 support.
2024-09-05 15:19:00 +02:00
Robert Schmidt
419a14a813 Demote log message of ITTI thread creation 2024-09-05 07:41:32 +02:00
Robert Schmidt
aef863591b CI: increase max number of concurrent workers to 64
According to the ThreadPoolExecutor documentation [1], the default
number of maximum workers min(32, os.cpu_count() + 4). The problem is
that we execute many pipelines from nano, on which os.cpu_count()
reports 4, so we can only have up to 8 concurrent workers by default.
This leads to the fact that on pipelines with many UEs (e.g.,
AW2S-AmariUE), we don't ping/iperf on all UEs at the same time.

Fix this by increasing the number of workers to 64. This should be fine,
as there is almost no real work being done in the Workers (only opening
a shell and execute programs such as ping/iperf).

[1] https://docs.python.org/3/library/concurrent.futures.html#threadpoolexecutor
2024-09-04 18:49:54 +02:00
Robert Schmidt
69a84825fb Merge branch 'ci-deploy-restructure' into 'develop'
chore(ci): CI Infrastructure Refactoring: Streamlining Deployment function, Logging, and docker images

See merge request oai/openairinterface5g!2770
2024-09-04 15:53:35 +00:00
Raphael Defosseux
3393ca948b chore(ci): concatenating deploy message into a single row
Signed-off-by: Raphael Defosseux <raphael.defosseux@eurecom.fr>
2024-09-04 15:58:20 +02:00
Bipin Adhikari
e42b2c0389 xml changes for NTN GEO and SIDELINK tests 2024-09-04 15:45:18 +02:00
Bipin
f3033533bb moving module id and node checks to parameter checks 2024-09-04 15:45:18 +02:00
Bipin
db1f2649ee Used Image Info in HTML 2024-09-04 15:45:18 +02:00
Bipin
6053e22684 xml tab formatting cleanup 2024-09-04 15:45:18 +02:00
Bipin Adhikari
3afbf8e39a Patch to resolve MR comments 2024-09-04 15:43:46 +02:00
Bipin Adhikari
9890896b9c patch for Iperf2_Unidir ci_infra %currenthost% 2024-09-04 15:43:46 +02:00
Bipin Adhikari
dad8edb448 Improved UndeployObject cohesion
- Introduced additional helper functions: CopyinContainerLog, GetRunningServices, CheckLogs.
2024-09-04 15:43:46 +02:00
Bipin Adhikari
bc950aaaec Improved DeployObject cohesion
- Introduced helper functions: GetCredentials, GetContainerName, GetImageInfo, GetContainerHealth, ReTagImages, DeployServices.
2024-09-04 15:43:46 +02:00
Bipin Adhikari
ab1564aa1c All log files are now stored in scenario-specific folders in python executor 2024-09-04 15:43:46 +02:00
Bipin Adhikari
f99552419e Use DeployObject/UndeployObject for pipelines using DeployGenObject/UndeployGenObject
XML file changed accordingly
2024-09-04 15:43:46 +02:00
Bipin Adhikari
44d0c88863 Seperated Create_Workspace as a seperate XML task
Create_Workspace is used used in XML files instead of directly being
executed in DeployObject(). This can be problematic if we deploy
multiple services on the same host, since a previous workspace will be
deleted. Also, it removes futile git clones.

There are other XML steps (CppCheckAnalysis, LicenceAndFormattingCheck,
BuildImage, BuildProxy, BuildClusterImage) that implicitly called
Create_Workspace. Those calls have been removed and care has been taken
to insert the corresponding Create_Workspace steps in the XML.
2024-09-04 15:43:46 +02:00
Bipin Adhikari
150a00bd23 support for %%currenthost%% host names for modules in ci_infra
It can be set using nodes and svr_node tags in xml files
2024-09-04 15:38:51 +02:00
Bipin Adhikari
5a49dd9afa aligning all test docker-compose files for image tagging 2024-09-04 15:38:51 +02:00
Bipin Adhikari
ea123a2ac0 Use new SSH class for Deploy_Object 2024-09-04 15:38:51 +02:00
Raphael Defosseux
ee4b193877 chore(ci): removing the workspace creation for the LicenceAndFormattingCheck method
Signed-off-by: Raphael Defosseux <raphael.defosseux@eurecom.fr>
2024-09-04 12:47:46 +02:00
Guido Casati
dbe5c5ee61 Minor additions to UnitTests.md 2024-09-03 09:51:29 +02:00
Guido Casati
5764422342 Section about connecting to an NG-Core in NR_SA_Tutorial_OAI_nrUE.md 2024-09-03 09:51:29 +02:00
Guido Casati
9102e10747 Updated F1-design.md
* restructured the documentation
* add details from specs
* add tables and Mermaid diagrams whenever possible
2024-09-03 09:51:23 +02:00
Sakthivel Velumani
28b2de5ac9 Add comments to the new RE mapping functions
Use the new struct as function argument instead of individual parameters
2024-09-03 09:21:29 +02:00
Sakthivel Velumani
f5d22ab85a Gracefully exit PUSCH proc if encoding fails 2024-09-03 09:21:29 +02:00
Sakthivel Velumani
26b3fcca3b Remove SIMD operation for DMRS amplitude scaling
There was concern that someone in the future might call the function
with the wrong inputs. So, based on the discussion on the MR below
https://gitlab.eurecom.fr/oai/openairinterface5g/-/merge_requests/2916#note_132506
the SIMD for multiplying DMRS vector with amplitude is removed and is
now done with plain C (no SIMD).

The execution time for the function dmrs_amp_mult() in this commit is
10x higher that the previous commit.
2024-09-03 09:21:29 +02:00
Sakthivel Velumani
393363e253 Refactor PUSCH RE mapping
RE mapping time is reduced by 10x. Functions are made generic to be
later reused for PDSCH RE mapping at gNB.
2024-09-03 09:21:29 +02:00
Sakthivel Velumani
add341e2f1 multi dmrs amp by vector 2024-09-03 09:18:26 +02:00
Sakthivel Velumani
2b7e0a0519 Change loop order to maximize cache hit
It is better to write to memory that are grouped together to reduce
probability of cache miss. This simple change improved the function's
execution speed by 70%.

Removed the unnecessary memset for the buffer.
2024-09-03 09:18:26 +02:00
Sakthivel Velumani
9c8bdd6db5 Add PUSCH timing stats 2024-09-03 09:18:26 +02:00
arora
01ec929ddb Removing rhsm certificates, not needed. 2024-09-02 18:17:04 +02:00
francescomani
db098651b0 improvements in nr_dlsch_llr function 2024-09-02 17:28:44 +02:00
francescomani
2991370169 32byte aligned DLSCH RX symbol size 2024-09-02 17:28:44 +02:00
francescomani
cda82edf78 adapt LLR unit test to a generic UL/DL scenario 2024-09-02 17:28:44 +02:00
francescomani
98a8e5dca3 use common LLR functions at UE for DLSCH 2024-09-02 17:12:43 +02:00
francescomani
aeb562756a moving LLR functions to phy_common 2024-09-02 17:12:43 +02:00
francescomani
ec40b34b1d initial cleanup 2024-09-02 17:12:43 +02:00
Robert Schmidt
9126e3dda8 Merge branch 'integration_2024_w35' into 'develop'
Integration: `2024.w35`

Closes #825

See merge request oai/openairinterface5g!2943

* !2181 ULSCH power computation
* !2915 benchmark for rotate_cpx_vector
* !2936 Avoid complete rebuild on cmake run with git info change
* !2855 NR UE replace phy_config_request_sent
* !2937 small fixes for rfsim
* !2925 CI: Increase tested throughput in SA 2x2 pipeline
* !2934 Run optimized parity check in ldpc encoder only on supported Zc values
* !2912 changes for multi-RU support in fhi72
* !2928 Distribution check: check for F40, remove old U/RHEL releases
* !2913 NR gNB cleanup
* !2927 Update Aerial docs to reference current version
* !2940 remove double define with nr_common.h
2024-09-02 13:26:45 +00:00
Robert Schmidt
d97249d2cf Merge remote-tracking branch 'origin/refactor_rm_double_define' into integration_2024_w35 2024-09-02 11:48:30 +02:00
Robert Schmidt
9924d9d77f Merge remote-tracking branch 'origin/update_aerial_docs' into integration_2024_w35 2024-09-02 11:48:22 +02:00
Robert Schmidt
450346c7dc Merge remote-tracking branch 'origin/NR_gNB_cleanup' into integration_2024_w35 2024-09-02 10:31:57 +02:00
Robert Schmidt
fa7040f3c5 Merge remote-tracking branch 'origin/build-update-distribution-check' into integration_2024_w35 2024-09-01 19:54:22 +02:00
Robert Schmidt
574c4df949 Merge remote-tracking branch 'origin/oaioran_multi_ru' into integration_2024_w35 2024-09-01 19:51:01 +02:00
Robert Schmidt
aab4698fcf Merge remote-tracking branch 'origin/fix-ldpc' into integration_2024_w35 2024-09-01 19:50:41 +02:00
Robert Schmidt
cbcc552643 Merge remote-tracking branch 'origin/ci-increase-test-bitrate' into integration_2024_w35 2024-08-30 17:46:00 +02:00
Robert Schmidt
6b3529b29b Merge remote-tracking branch 'origin/small-fixes-rfsim' into integration_2024_w35 2024-08-30 17:45:24 +02:00
Robert Schmidt
af9f422a84 Merge remote-tracking branch 'origin/NR_UE_MAC_PHY_separation_improvements' into integration_2024_w35 2024-08-30 17:45:18 +02:00
Robert Schmidt
67da31a8b6 Add CentOS stream support, remove CentOS 7+8 and RHEL7
At least in Eurecom, there are no RHEL 7/CentOS 7+8 servers. Existing
installations will work, but we don't want to encourage people to use
these old distributions, so remove it. Also, they reached EOL

Add CentOS stream as an alternative.
2024-08-30 16:25:06 +02:00
Robert Schmidt
140efe0ec0 Merge remote-tracking branch 'origin/fix-excessive-rebuilds' into integration_2024_w35 2024-08-30 16:18:23 +02:00
Robert Schmidt
fdd2994620 Merge remote-tracking branch 'origin/rotate-cpx-vector-benchmark' into integration_2024_w35 2024-08-30 16:18:10 +02:00
Robert Schmidt
468ba05441 Merge remote-tracking branch 'origin/develop-ul-power' into integration_2024_w35 2024-08-30 16:18:03 +02:00
Robert Schmidt
72f7d0409c OCRegistry: do not add /
In the past, it seemed that we had to add a trailing slash (/) after the
OpenShift Registry URI. Now, at least on the CI machine matix, this
makes it fail:

    INFO: oc whoami -t | docker login -u oaicicd --password-stdin default-route-openshift-image-registry.apps.oai.cs.eurecom.fr/
    INFO: docker pull default-route-openshift-image-registry.apps.oai.cs.eurecom.fr/oaicicd-ran/oai-gnb:develop-46a1d2a6
    WARNING: command "docker pull default-route-openshift-image-registry.apps.oai.cs.eurecom.fr/oaicicd-ran/oai-gnb:develop-46a1d2a6" returned non-zero returncode 1: output:
    Error response from daemon: Head "https://default-route-openshift-image-registry.apps.oai.cs.eurecom.fr/v2/oaicicd-ran/oai-gnb/manifests/develop-46a1d2a6": unauthorized: authentication required

Remove the trailing slash makes it work, like so:

    INFO: oc whoami -t | docker login -u oaicicd --password-stdin default-route-openshift-image-registry.apps.oai.cs.eurecom.fr
    INFO: docker pull default-route-openshift-image-registry.apps.oai.cs.eurecom.fr/oaicicd-ran/oai-gnb:develop-46a1d2a6

The docker pull succeeds.
2024-08-30 16:14:41 +02:00
Guido Casati
47833b1aeb Free NAS PDU buffer in NAS task, which has ownership 2024-08-30 15:04:08 +02:00
Guido Casati
0265607a95 Fix memory leaks in NAS generatePduSessionEstablishRequest
>Direct leak of 7 byte(s) in 1 object(s) allocated from:
    >0 0x7ffff74b4887 in __interceptor_malloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:145
    >1 0x55555819ab3c in generatePduSessionEstablishRequest /home/guido/repo/openairinterface5g/fix-ue-memory-leaks/openair3/NAS/NR_UE/nr_nas_msg_sim.c:938
    >2 0x5555581a8a9f in nas_nrue /home/guido/repo/openairinterface5g/fix-ue-memory-leaks/openair3/NAS/NR_UE/nr_nas_msg_sim.c:1295
    >3 0x5555581a3078 in nas_nrue_task /home/guido/repo/openairinterface5g/fix-ue-memory-leaks/openair3/NAS/NR_UE/nr_nas_msg_sim.c:1215
    >4 0x7ffff5e94ac2 in start_thread nptl/pthread_create.c:442

> Direct leak of 4 byte(s) in 1 object(s) allocated from:
    >0 0x7ffff74b4a57 in __interceptor_calloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:154
    >1 0x55555819c025 in generatePduSessionEstablishRequest /home/guido/repo/openairinterface5g/fix-ue-memory-leaks/openair3/NAS/NR_UE/nr_nas_msg_sim.c:993
    >2 0x5555581a8a9f in nas_nrue /home/guido/repo/openairinterface5g/fix-ue-memory-leaks/openair3/NAS/NR_UE/nr_nas_msg_sim.c:1295
    >3 0x5555581a3078 in nas_nrue_task /home/guido/repo/openairinterface5g/fix-ue-memory-leaks/openair3/NAS/NR_UE/nr_nas_msg_sim.c:1215
    >4 0x7ffff5e94ac2 in start_thread nptl/pthread_create.c:442

> Direct leak of 1 byte(s) in 1 object(s) allocated from:
    >0 0x7ffff74b4a57 in __interceptor_calloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:154
    >1 0x55555819c8f7 in generatePduSessionEstablishRequest /home/guido/repo/openairinterface5g/fix-ue-memory-leaks/openair3/NAS/NR_UE/nr_nas_msg_sim.c:987
    >2 0x5555581a9b75 in nas_nrue /home/guido/repo/openairinterface5g/fix-ue-memory-leaks/openair3/NAS/NR_UE/nr_nas_msg_sim.c:1299
    >3 0x5555581a414e in nas_nrue_task /home/guido/repo/openairinterface5g/fix-ue-memory-leaks/openair3/NAS/NR_UE/nr_nas_msg_sim.c:1219
    >4 0x7ffff5e94ac2 in start_thread nptl/pthread_create.c:442
2024-08-30 15:03:15 +02:00
Guido Casati
8e9f6385cc Fix memory leak in generateAuthenticationResp
> Direct leak of 16 byte(s) in 1 object(s) allocated from:
    >0 0x7ffff74b4a57 in __interceptor_calloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:154
    >1 0x55555818ef1c in generateAuthenticationResp /home/guido/repo/openairinterface5g/fix-ue-memory-leaks/openair3/NAS/NR_UE/nr_nas_msg_sim.c:588
    >2 0x5555581b0fca in nas_nrue /home/guido/repo/openairinterface5g/fix-ue-memory-leaks/openair3/NAS/NR_UE/nr_nas_msg_sim.c:1405
    >3 0x5555581a3069 in nas_nrue_task /home/guido/repo/openairinterface5g/fix-ue-memory-leaks/openair3/NAS/NR_UE/nr_nas_msg_sim.c:1213
    >4 0x7ffff5e94ac2 in start_thread nptl/pthread_create.c:442
2024-08-30 14:57:45 +02:00
Guido Casati
0ef6153bb9 Fix memory leak of NAS buffer transfered to RRC with NAS_UPLINK_DATA_REQ
* Data buffer for NAS Registration Complete and Authentication Response is malloced in
  the NAS thread and transfered with ITTI message to RRC, where needs to be freed

Direct leak of 24 byte(s) in 1 object(s) allocated from:
    >0 0x7ffff74b4887 in __interceptor_malloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:145
    >1 0x5555572b0607 in generateAuthenticationResp /repo/openairinterface5g/develop/openair3/NAS/NR_UE/nr_nas_msg_sim.c:608
    >2 0x5555572b0607 in nas_nrue /repo/openairinterface5g/develop/openair3/NAS/NR_UE/nr_nas_msg_sim.c:1402
    >3 0x5555572baef6 in nas_nrue_task /repo/openairinterface5g/develop/openair3/NAS/NR_UE/nr_nas_msg_sim.c:1198
    >4 0x7ffff5e94ac2 in start_thread nptl/pthread_create.c:442

Direct leak of 10 byte(s) in 1 object(s) allocated from:
    >0 0x7ffff74b4887 in __interceptor_malloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:145
    >1 0x55555729754e in generateRegistrationComplete /repo/openairinterface5g/develop/openair3/NAS/NR_UE/nr_nas_msg_sim.c:782
    >2 0x555557299ad3 in handle_registration_accept /repo/openairinterface5g/develop/openair3/NAS/NR_UE/nr_nas_msg_sim.c:1212
    >3 0x5555572b06a0 in nas_nrue /repo/openairinterface5g/develop/openair3/NAS/NR_UE/nr_nas_msg_sim.c:1411
    >4 0x5555572baef6 in nas_nrue_task /repo/openairinterface5g/develop/openair3/NAS/NR_UE/nr_nas_msg_sim.c:1198
    >5 0x7ffff5e94ac2 in start_thread nptl/pthread_create.c:442
2024-08-30 14:51:54 +02:00
Matthias Mehlhose
d055cc0004 remove double define with nr_common.h 2024-08-30 11:49:12 +00:00
francescomani
01ae8fbb38 prach code cleanup 2024-08-29 15:52:46 +02:00
francescomani
dc5df35fe1 remove a couple of global variables from pusch_vars and some further cleanup 2024-08-29 15:52:42 +02:00
francescomani
1a04ebaa02 cleanup of gNB PHY procedures and removal of global PBCH structure 2024-08-29 15:36:16 +02:00
Cedric Roux
532aa1a904 rfsim: print error if write fails
Some strange behavior may happen if write() to the rfsim socket fails.
Let's print some error, can be useful in case of problem.
2024-08-29 15:06:29 +02:00
Cedric Roux
42539b0bec rfsim: add a check on 'sock'
It is very possible that the operating system returns a file
descriptor bigger than the size of bridge->buf (MAX_FD_RFSIMU, which
is 250 as of now). As a minimum, let's fail if the socket file
descriptor is out of bounds.

A proper solution may be implemented later, if needed.
2024-08-29 14:59:51 +02:00
Rúben Soares Silva
94050d5ec1 Update Aerial docs to reference current version
Updated links to latest available L1 documentation
Removal of unneeded environment variable in aerial_l1_entrypoint.sh
Removal of unneeded checkout command from doc
Reword Aerial Entrypoint script paragraph to separate in multiple sentences
New UE has been tested with Aerial setup
Change bash blocks to reflect that cuBB container no longer uses root
Add alternative instructions to obtain nvipc sources from container
Add note in Prepare the L1 image section specifying default config file and location

Co-Authored by: Reem Bahsoun <reem.bahsoun@openairinterface.org>
2024-08-29 13:15:53 +01:00
Raphael Defosseux
1793e7e56d fix(docker): aligning all rockylinux-9 Dockerfiles with the RHEL9 ones
Signed-off-by: Raphael Defosseux <raphael.defosseux@eurecom.fr>
2024-08-29 11:14:50 +02:00
francescomani
d04a83ea93 defs_gNB cleanup 2024-08-29 08:54:42 +02:00
luis_pereira87
8172da04c8 CI: Set max_rxgain to 75 (max value for N310) in SA 2x2 pipeline 2024-08-28 21:09:37 +01:00
Bartosz Podrygajlo
97dfa90cf2 Add two ldpc testcases for checking small block sizes
Added 2 testcases for Zc = 64 for ldpc encoder. These testcases check optimized ldpc
implementation against reference.
2024-08-28 17:48:42 +02:00
francescomani
c93dcc0484 cleanup of encode_parity_check_part_optim including asserting for case not handled 2024-08-28 17:40:26 +02:00
Bartosz Podrygajlo
732555ddc3 Run optimized parity check in ldpc encoder only on supported Zc values
Optimized ldpc encoder was run for Zc values that are not supported (Zc == 64). This
commit fixes the fallback condition to Zc >= 72 for BG 2
2024-08-28 17:40:19 +02:00
Jaroslava Fiedlerova
24c01d8fda CI: Increase tested DL bitrate in SA 2x2 pipeline 2024-08-28 16:33:24 +02:00
Jaroslava Fiedlerova
4684666430 CI: Increase tested UL bitrate in SA 2x2 pipeline 2024-08-28 16:33:24 +02:00
Robert Schmidt
8bffd1666d Avoid complete rebuild on cmake run with git info change
Before this commit, the following will trigger a complete rebuild:

- create another git name (git checkout -b test)
- run cmake again manually (cmake ..)
- run ninja again

The top-level CMakeLists.txt uses add_definitions() to add git
information to all targets; if some git information changes, this will
mark all command lines as dirty, triggering the build.

There is an easy solution: instead of passing this information on the
command line, pass it in a header. This commit uses configure_file() to
generate a file oai_version.h in the build directory with the same
information. Various sources files, e.g., main executables, use this to
output the same information as before. It is then also not necessary to
use header guards, as cmake takes care to create this file.

If cmake is re-run, it will update the header, and trigger only files
including this header will be rebuilt (which can be shown with the above
stpes). The information passed is the same as before, and updates the
information when the old method would have updated it.
2024-08-28 15:57:24 +02:00
Robert Schmidt
49688f8478 Remove unused PACKAGE_BUGREPORT, initialize FIRMWARE_VERSION with sensible default 2024-08-28 15:25:00 +02:00
Bartosz Podrygajlo
0883904891 Introduce benchmark test for rotate_cpx_vector
This commit introduces google benchmark library and one benchmark for
rotate_cpx_vector.  Also extracted common tools used in testcases for
generation and allocation of byte aligned vectors in phy_test_tools.hpp
2024-08-28 15:08:44 +02:00
rmagueta
a3b753d8cb ULSCH power computation in a different way 2024-08-28 11:50:25 +01:00
Robert Schmidt
46a1d2a621 Merge branch 'integration_2024_w34' into 'develop'
Integration: `2024.w34`

See merge request oai/openairinterface5g!2923

* !2906 mod: Improve signal processing speed of rotate_cpx_vector function
* !2909 NR UE SIB1 free fix
* !2917 Cleanup NR UE NAS instance handling
* !2924 Fix misalignment issues in TLVEncoder macros ENCODE_U16, ENCODE_U24
* !2907 CI: add new testcases to RFSim-5G pipeline, reduce ping and iperf test time
* !2893 LEO satellite delay and Doppler simulation and adjusted NR_UE time sync
2024-08-28 07:16:57 +00:00
Robert Schmidt
85f194b5c7 Add documentation and sample config for FHI 7.2 multi-RU operation
Co-authored-by: Raymond Knopp <raymond.knopp@eurecom.fr>
2024-08-27 15:40:15 +02:00
Raymond Knopp
7e18293c70 Changes for multi-RU support in fhi72
Co-authored-by: Robert Schmidt <robert.schmidt@openairinterface.org>
2024-08-27 15:40:15 +02:00
Robert Schmidt
574363c515 Correct order of PCI addresses in O-RAN 7.2 tutorial
The correct order for xran seems to be first Uplane, then C plane. In
the past, we used to switch (for reasons I don't know), but let's
reverse it to the proper order.
2024-08-27 15:40:15 +02:00
Robert Schmidt
68b29301b0 Merge remote-tracking branch 'origin/ntn_leo_time_comp' into integration_2024_w34 2024-08-27 14:30:15 +02:00
Robert Schmidt
922e810a82 Merge remote-tracking branch 'origin/ci-rfsim-optimize' into integration_2024_w34 2024-08-27 14:30:05 +02:00
Robert Schmidt
957073325e Merge remote-tracking branch 'origin/TLV_Encoder_Fixes' into integration_2024_w34 2024-08-27 14:29:57 +02:00
Robert Schmidt
adc88d3d87 Merge remote-tracking branch 'origin/nr-ue-nas-cleanup' into integration_2024_w34 2024-08-27 14:29:32 +02:00
Robert Schmidt
020662f95a Merge remote-tracking branch 'origin/NR_UE_RRC_SIB1_fix' into integration_2024_w34 2024-08-27 14:29:24 +02:00
Robert Schmidt
baf02b8d1e Merge remote-tracking branch 'origin/speedup_rotate_cpx_vector' into integration_2024_w34 2024-08-27 14:29:12 +02:00
Guido Casati
031622b1a3 Review of CL options section in RUNMODEM
* place all NR UE CL optional options in the same section, in a table
* add a section for common CL options
* add subsection for UE capabilities
* removed redundant text
2024-08-27 10:04:15 +02:00
Jaroslava Fiedlerova
370062c04c CI: Add sidelink test to RF-Sim 5G 2024-08-26 17:08:27 +02:00
Jaroslava Fiedlerova
fad450cbe3 Skip UE Log Analysis During Sidelink Testing
Bypass UE log analysis when testing sidelink, as it fails due to the absence
of expected information and patterns (not present in sidelink communication).
Instead, a custom command is used to verify the success of sidelink tests by
checking for the presence of "PSBCH RX:OK" in the log of the second UE.
2024-08-26 17:08:27 +02:00
Jaroslava Fiedlerova
1960516554 CI: Add NTN GEO testcase to RF-Sim 5G 2024-08-26 17:08:27 +02:00
Jaroslava Fiedlerova
c49ed17c57 CI: Modify rfsim5g 2x2 testcase to use 100 MHz bandwidth 2024-08-26 17:08:27 +02:00
Jaroslava Fiedlerova
7293741a99 CI: Reduce iperf time in RF-Sim 5G 2024-08-26 17:08:27 +02:00
Jaroslava Fiedlerova
d9648ae6b2 CI: Reduce ping time in rfsim 5G 2024-08-26 17:08:27 +02:00
Thomas Schlichter
4b859a2eb8 fix sidelink UE issues found by sanitizer 2024-08-26 17:08:27 +02:00
Robert Schmidt
867a06b302 Distribution check: Remove EOL Ubuntu releases
See also https://ubuntu.com/about/release-cycle
2024-08-26 11:02:43 +02:00
Robert Schmidt
382de78c66 Distribution check: update to current Fedora 40
Closes: #825
2024-08-26 11:02:30 +02:00
Guido Casati
9e6435758a Wrap multi-statement macros ENCODE_U8() and ENCODE_U32() in do { ... } while (0) statements 2024-08-26 10:13:18 +02:00
francescomani
db4d8d2322 fix handling of time start position in SRS FAPI at gNB 2024-08-23 16:36:12 +02:00
Thomas Schlichter
b17b44dffb add description how to run a LEO satellite rfsimulation to RUNMODEM.md 2024-08-23 14:57:48 +02:00
Thomas Schlichter
ede6775ac3 fix for compilers that don't support the CMPLX() macro 2024-08-23 14:57:48 +02:00
Thomas Schlichter
0eb409f114 NR_UE: Perform autonomous timing advance to compensate for fast time drift with relatively large RTT
As we don't have SIB19 with continuously updated ta-Common and ta-CommonDrift values yet, the UE can only adapt it's UL timing according to it's DL drift.
This is required for the UE to keep UL sync with fast time drift and relatively long RTT (e.g. LEO satellite).
We should replace this with the standard compliant way as soon as we have SIB19 with continuously updated contents.
2024-08-23 14:57:48 +02:00
Guido Casati
bac4f798f9 Fix misalignment issues in TLVEncoder macros ENCODE_U16, ENCODE_U24
This commit resolves undefined behaviour runtime errors related
to misaligned memory access. E.g.

> openair3/NAS/COMMON/IES/FGSMobileIdentity.c:193:3:
> runtime error: store to misaligned address 0x608000021e2b for type 'uint16_t',
> which requires 2 byte alignment 0x608000021e2b: note: pointer points here 00 f1 ...

* ENCODE_U24: safely encode 24-bit values into a buffer
  by using memcpy to copy 3 bytes in network byte order (big-endian).
* ENCODE_U16: safely encodes a 16-bit value into a buffer, handling
  misalignment by memcpy 2 bytes to buffer in network byte order (big-endian).
2024-08-23 11:34:44 +02:00
Bartosz Podrygajlo
50f8f3de58 Fix formatting in nr_nas_msg_sim.c 2024-08-23 10:45:45 +02:00
Bartosz Podrygajlo
4f12a25ebd Cleanup NR UE NAS instance handling
- Save nas instance id in nr_ue_nas_t and use that for instance determination.
 - Use correct field in itti message (destinationInstance instead of originInstance) to determine instance
 - Make sure both destinationInstance and originInstance fields are correct in NAS interface functions.
2024-08-23 10:45:36 +02:00
Thomas Schlichter
e662721310 NR_UE: make NTN parameter ta_CommonDrift_r17 configurable via command line parameter --ntn-ta-commondrift
While we don't have SIB19 support yet, UE gets this parameter from command line, just like --ntn-koffset and --ntn-ta-common.
We use this value to initialize the UE's time-tracking PI controller accumulator.
This allows to correctly track the time even if the delay is changing significantly (e.g. due to LEO satellite movement).
We also use it to compensate for the time drift that happenes while performing the initial sync.
2024-08-23 10:26:18 +02:00
Thomas Schlichter
fc4310cda7 fix multi-statement marco asn1cCallocOne() 2024-08-23 10:26:18 +02:00
Thomas Schlichter
4039473a70 NR_UE: add PI controller to time sync
this allows to compensate larger continuous time drift in DL (e.g. large Doppler from LEO satellite)
2024-08-23 10:26:18 +02:00
Thomas Schlichter
8ab7f1dd68 change returned value of UE_dl_preprocessing() in case no sampleShift change from 0 to INT_MAX
This now allows to indicate "there was a new sampleShift calculation, and the actual value is 0"
additionally to "there was no new sampleShift calculation".
2024-08-23 10:25:00 +02:00
Thomas Schlichter
cfb6ed4d82 add example configuration using transparent LEO satellite model for rfsimulator 2024-08-20 16:46:25 +02:00
Thomas Schlichter
6a8edaf317 rfsimulator: add delay and Doppler simulation for circular orbit and add according channel models SAT_LEO_TRANS and SAT_LEO_REGEN
Delay and Doppler computation is done as in Matlab function dopplerShiftCircularOrbit:
https://de.mathworks.com/help/satcom/ref/dopplershiftcircularorbit.html
2024-08-20 16:46:25 +02:00
Thomas Schlichter
68b07d542c rfsimulator: correctly set center frequency 2024-08-20 16:46:25 +02:00
Cédric Roux
2ec8fefbe8 Merge branch 'integration_2024_w33' into 'develop'
Integration: `2024.w33`

See merge request oai/openairinterface5g!2911

- !2784 Reworking beam structures at NR MAC gNB
- !2889 Fix delta for PUSCH DMRS type 2 
- !2908 NR MAC UE CSI improvements
- !2896 Fix for llr functions reading/writing outside buffers
- !2902 nr rlc: reduce "SDU rejected" logging
- !2884 NR UE: Cleanup global variables used for command line parameter storage
- !2910 NR gNB DMRS symbol race
- CI: Update phytest-timing test threshold
2024-08-20 13:11:25 +00:00
Guido Casati
21de8666d3 Updated Wireshark documentation 2024-08-19 17:06:03 +02:00
Jaroslava Fiedlerova
736c0fd37f CI: Update phytest-timing test threshold 2024-08-19 12:27:58 +02:00
Jaroslava Fiedlerova
2fa341ba59 Merge remote-tracking branch 'origin/NR_gNB_dmrs_symbol_race' into integration_2024_w33 2024-08-16 18:55:26 +02:00
Jaroslava Fiedlerova
6529863af2 Merge remote-tracking branch 'origin/ue-cleanup-2' into integration_2024_w33 2024-08-16 18:54:59 +02:00
Guido Casati
94d59d5153 Fix link in documentation 2024-08-16 17:02:52 +02:00
Jaroslava Fiedlerova
33fa06d0a5 Merge remote-tracking branch 'origin/nr-rlc-less-logging' into integration_2024_w33 2024-08-16 16:16:53 +02:00
Jaroslava Fiedlerova
ba70d91ba4 Merge remote-tracking branch 'origin/fix-llr-segfault' into integration_2024_w33 2024-08-16 16:16:07 +02:00
Jaroslava Fiedlerova
e5297febe4 Merge remote-tracking branch 'origin/NR_UE_CSI_measurements_size' into integration_2024_w33 2024-08-16 14:04:42 +02:00
Jaroslava Fiedlerova
1c8e4c364e Merge remote-tracking branch 'origin/fix_delta_ulsch_channel_estimation' into integration_2024_w33 2024-08-16 14:04:13 +02:00
francescomani
c87b390501 code formatting 2024-08-16 10:20:47 +02:00
francescomani
2039a4f25b making global dmrs_symbol in pusch_vars local to avoid race conditions 2024-08-16 10:18:18 +02:00
Bartosz Podrygajlo
94e6cdb2bf Duplicate the testcase for llr with avx 256-bit vector instructions disabled.
This creates another test executable for llr with the same testcases but compiled without avx 256-bit
vector instructions.
2024-08-15 13:04:05 +02:00
Bartosz Podrygajlo
bbd6f35a6f Fix for nr_ulsch_16/64/256qam_llr reading/writing past buffer size on x86 and ARM.
This fixes out-of-bounds access: nr_ulsch_16qam_llr, nr_ulsch_64qam_llr and nr_ulsch_256qam_llr.
For 256qam this also fixes incorrect llr calculation on arm: the existing AVX code for 2 REs
case produced results not in line with the rest of the code. A testcase check_2_res_256_qam was
added to visualise the differences which can later be used to revive AVX acceleration for 2REs case.
2024-08-15 12:58:23 +02:00
francescomani
5effa74067 set FAPI CSI type as TRS when necessary in UE MAC 2024-08-15 08:24:22 +02:00
francescomani
909fd5a9ec from uint8 to uint16 in i1 CSI-RS measurement fields 2024-08-15 08:24:16 +02:00
francescomani
24ff0e294e fix to avoid freeing SIB1 information still in use at RRC UE 2024-08-14 18:57:30 +02:00
francescomani
25fdc1d23d beam association for prach 2024-08-14 10:04:42 +02:00
francescomani
0a8e1b49d0 adapt VRB maps to multiple beams in a period 2024-08-14 08:33:48 +02:00
francescomani
c31d250d28 new structure to handle beams
fix: reset beam only if it is a newly allocated one
2024-08-14 08:28:53 +02:00
Matthias Mehlhose
aa9183c218 mod: Improve signal processing speed of rotate_cpx_vector function 2024-08-13 10:02:56 +00:00
Robert Schmidt
871078a64d Merge branch 'integration_2024_w32' into 'develop'
Integration: `2024.w32`

See merge request oai/openairinterface5g!2900

* !2810 add harqid in wireshark traces, refactor the trace_pdu parameters
* !2897 nr rlc: add a lock to protect access to time variables
* !2903 remove some openair1 headers included in opeinair2 files
* !2876 Enable 32 HARQ Processes in DL, UL
* !2849 Fix UE SRS crash
* !2898 Fix memory leaks in OAI gNB and OAI UE
2024-08-13 03:57:41 +00:00
Jaroslava Fiedlerova
d1a272be1b Merge remote-tracking branch 'origin/fix-gnb-ue-memory-leaks' into integration_2024_w32 2024-08-12 18:12:38 +02:00
Jaroslava Fiedlerova
6ef44ee3ae Merge remote-tracking branch 'origin/avoid_UE_SRS_segfault' into integration_2024_w32 2024-08-12 17:30:04 +02:00
Jaroslava Fiedlerova
00523c2b2f Merge remote-tracking branch 'origin/NR_HARQ32_PROCESSES' into integration_2024_w32 2024-08-12 16:34:24 +02:00
Jaroslava Fiedlerova
30feb7e493 Merge remote-tracking branch 'origin/nr_include_cleanup' into integration_2024_w32 2024-08-12 16:34:09 +02:00
Jaroslava Fiedlerova
51ae5e2c05 Merge remote-tracking branch 'origin/nr-rlc-time-lock' into integration_2024_w32 2024-08-12 16:33:52 +02:00
Jaroslava Fiedlerova
6af674be59 Merge remote-tracking branch 'origin/harqid-in-wireshark-traces' into integration_2024_w32 2024-08-12 16:33:38 +02:00
Guido Casati
7c788be9e0 Cleanup of unused parallel/worker thread configuration in NR
* In LTE there is logic that checks the thread configurtion with the
  getters `get_thread_parallel_conf()` and `get_thread_worker_conf()`
  in NR these getters are not used, only setters, which have no impact
2024-08-12 14:59:03 +02:00
Guido Casati
14b7311bd8 Fix memory leak in do_NR_ULInformationTransfer
* buffer is allocated but not freed after use by PDCP

> Direct leak of 192 byte(s) in 3 object(s) allocated from:
    > 0 0x7ffff74b4c38 in __interceptor_realloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:164
    > 1 0x55555775ee74 in encode_dyn_cb /cmake_targets/ran_build/build/openair2/RRC/LTE/MESSAGES/per_encoder.c:23
    > 2 0x55555774776e in _uper_encode_flush_outp /cmake_targets/ran_build/build/openair2/RRC/LTE/MESSAGES/uper_encoder.c:126
    > 3 0x55555774776e in uper_encode /cmake_targets/ran_build/build/openair2/RRC/LTE/MESSAGES/uper_encoder.c:36
    > 4 0x555557747c91 in uper_encode_to_new_buffer /cmake_targets/ran_build/build/openair2/RRC/LTE/MESSAGES/uper_encoder.c:85
    > 5 0x5555576c5172 in do_NR_ULInformationTransfer /openair2/RRC/NR/MESSAGES/asn1_msg.c:965
    > 6 0x555556fba691 in rrc_nrue /openair2/RRC/NR_UE/rrc_UE.c:1819
    > 7 0x555556fc4d2e in rrc_nrue_task /openair2/RRC/NR_UE/rrc_UE.c:1717
    > 8 0x7ffff5e94ac2 in start_thread nptl/pthread_create.c:442
2024-08-12 10:06:54 +02:00
Guido Casati
aa8cf7c41a Fix memory leak in nr_rrc_ue_decode_NR_BCCH_DL_SCH_Message
* bcch_message is malloced by ASN.1 decoder and needs to be always freed after use along with its contents

> Direct leak of 64 byte(s) in 1 object(s) allocated from:
   >0 0x7ffff74b4a57 in __interceptor_calloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:154
   >1 0x555557737ecd in SEQUENCE_decode_uper /cmake_targets/ran_build/build/openair2/RRC/LTE/MESSAGES/constr_SEQUENCE_uper.c:37
   >2 0x555557746f81 in uper_decode /cmake_targets/ran_build/build/openair2/RRC/LTE/MESSAGES/uper_decoder.c:83
   >3 0x5555577471fe in uper_decode_complete /cmake_targets/ran_build/build/openair2/RRC/LTE/MESSAGES/uper_decoder.c:16
   >4 0x555556f8b1c9 in nr_rrc_ue_decode_NR_BCCH_DL_SCH_Message /openair2/RRC/NR_UE/rrc_UE.c:732
   >5 0x555556fbc365 in rrc_nrue /openair2/RRC/NR_UE/rrc_UE.c:1775
   >6 0x555556fc4c2e in rrc_nrue_task /openair2/RRC/NR_UE/rrc_UE.c:1718
   >7 0x7ffff5e94ac2 in start_thread nptl/pthread_create.c:442
2024-08-12 10:06:54 +02:00
Guido Casati
b1609e0534 Fix memory leak in nr-uesoftmodem
* strdup is returning a malloced string that needs to freed after use

> Direct leak of 90 byte(s) in 1 object(s) allocated from:
    >0 0x7ffff745b9a7 in __interceptor_strdup ../../../../src/libsanitizer/asan/asan_interceptors.cpp:454
    >1 0x555556c7b341 in main /executables/nr-uesoftmodem.c:461
    >2 0x7ffff5e29d8f in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58
2024-08-12 10:06:54 +02:00
Guido Casati
e806315963 Fix memory leak in nr_rrc_ue_decode_dcch
* local dl_dcch_msg shall be freed after use

> Direct leak of 384 byte(s) in 6 object(s) allocated from:
    >0 0x7ffff74b4a57 in __interceptor_calloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:154
    >1 0x555557737ced in SEQUENCE_decode_uper /cmake_targets/ran_build/build/openair2/RRC/LTE/MESSAGES/constr_SEQUENCE_uper.c:37
    >2 0x555557746da1 in uper_decode /cmake_targets/ran_build/build/openair2/RRC/LTE/MESSAGES/uper_decoder.c:83
    >3 0x555556fa4b31 in nr_rrc_ue_decode_dcch /openair2/RRC/NR_UE/rrc_UE.c:1612
    >4 0x555556fbb25c in rrc_nrue /openair2/RRC/NR_UE/rrc_UE.c:1792
    >5 0x555556fc4a4e in rrc_nrue_task /openair2/RRC/NR_UE/rrc_UE.c:1718
    >6 0x7ffff5e94ac2 in start_thread nptl/pthread_create.c:442
2024-08-12 10:06:54 +02:00
Guido Casati
3d2b32ac1e Fix direct leak of memory allocate by deliver_sdu_srb with itti_malloc
* The RRC task is freeing the ITTI message but the message members that are allocated separetely still need to be freed

> Direct leak of 470 byte(s) in 6 object(s) allocated from:
    >0 0x7ffff74b4a57 in __interceptor_calloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:154
    >1 0x55555721f117 in itti_malloc /common/utils/ocp_itti/intertask_interface.cpp:64
    >2 0x555556f2356c in deliver_sdu_srb /openair2/LAYER2/nr_pdcp/nr_pdcp_oai_api.c:775
    >3 0x555556f4e10e in nr_pdcp_entity_recv_pdu /openair2/LAYER2/nr_pdcp/nr_pdcp_entity.c:184
    >4 0x555556f278ad in do_pdcp_data_ind /openair2/LAYER2/nr_pdcp/nr_pdcp_oai_api.c:285
    >5 0x555556f278ad in pdcp_data_ind_thread /openair2/LAYER2/nr_pdcp/nr_pdcp_oai_api.c:307
    >6 0x7ffff5e94ac2 in start_thread nptl/pthread_create.c:442
2024-08-12 10:06:51 +02:00
Guido Casati
a59a69d5e5 Fix strdup-related memory leak in nr-softmodem
* strdup is returning a malloced string which needs to be freed after use

> Direct leak of 90 byte(s) in 1 object(s) allocated from:
	> 0 0x7ffff745b9a7 in __interceptor_strdup ../../../../src/libsanitizer/asan/asan_interceptors.cpp:454
	> 1 0x5555591598a3 in main /executables/nr-softmodem.c:667
	> 2 0x7ffff5e29d8f in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58
2024-08-12 10:03:20 +02:00
Guido Casati
6435ed309c Fix memory leak in NR UE nr_rrc_ue_process_ueCapabilityEnquiry
* allocate memory in heap for the struct ue_CapabilityRAT_Container used locally for buffer encoding
* free the struct members only for the ul_dcch_msg allocated on the stack

> Direct leak of 40 byte(s) in 1 object(s) allocated from:
    > 0 0x7ffff74b4a57 in __interceptor_calloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:154
    > 1 0x555556f7a89f in nr_rrc_ue_process_ueCapabilityEnquiry /openair2/RRC/NR_UE/rrc_UE.c:1861
    > 2 0x555556fa4d85 in nr_rrc_ue_decode_dcch /openair2/RRC/NR_UE/rrc_UE.c:1650
    > 3 0x555556fbb33c in rrc_nrue /openair2/RRC/NR_UE/rrc_UE.c:1790
    > 4 0x555556fc4b2e in rrc_nrue_task /openair2/RRC/NR_UE/rrc_UE.c:1716
    > 5 0x7ffff5e94ac2 in start_thread nptl/pthread_create.c:442
2024-08-12 10:03:16 +02:00
francescomani
2b76e88823 remove some openair1 headers included in opeinair2 files 2024-08-09 16:16:13 +02:00
Cedric Roux
5e547c617c nr rlc am: harmonize log message
let's make it same as um and tm (no more file/line/function)
2024-08-09 15:52:00 +02:00
Cedric Roux
35f5fdf960 nr rlc tm: bugfix: reset t_current when clearing entity
maybe not super important, but let's harmonize with um/am
2024-08-09 15:52:00 +02:00
Cedric Roux
dfe16d985a nr rlc tm: reduce "SDU rejected" logging
once per second is enough
2024-08-09 15:45:39 +02:00
Cedric Roux
ad7bd05f9a nr rlc um: reduce "SDU rejected" logging
once per second is enough
2024-08-09 15:41:15 +02:00
Guido Casati
fb554dc6c9 Simplified and clang-formatted RCconfig_nr_parallel 2024-08-08 11:17:21 +02:00
Guido Casati
6e7ea5ce8d Fix memory leak in RCconfig_nr_parallel
* strdup() function is returning a malloced string
  which must be freed after use
* replace the strdup with direct use of strings to avoid heap allocation

> Direct leak of 23 byte(s) in 1 object(s) allocated from:
    > 0 0x7ffff745b9a7 in __interceptor_strdup ../../../../src/libsanitizer/asan/asan_interceptors.cpp:454
    > 1 0x555559e36f87 in RCconfig_nr_parallel /openair2/GNB_APP/gnb_config.c:2054
    > 2 0x555559e38ea3 in NRRCConfig /openair2/GNB_APP/gnb_config.c:2097
    > 3 0x555559155542 in get_options /executables/nr-softmodem.c:423
    > 4 0x555559155542 in main /executables/nr-softmodem.c:623
    > 5 0x7ffff5e29d8f in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58

> Direct leak of 14 byte(s) in 1 object(s) allocated from:
    > 0 0x7ffff745b9a7 in __interceptor_strdup ../../../../src/libsanitizer/asan/asan_interceptors.cpp:454
    > 1 0x555559e370c5 in RCconfig_nr_parallel /openair2/GNB_APP/gnb_config.c:2063
    > 2 0x555559e38ea3 in NRRCConfig /openair2/GNB_APP/gnb_config.c:2097
    > 3 0x555559155542 in get_options /executables/nr-softmodem.c:423
    > 4 0x555559155542 in main /executables/nr-softmodem.c:623
    > 5 0x7ffff5e29d8f in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58
2024-08-08 11:07:00 +02:00
Raghavendra Dinavahi
dafaea7dda enable HARQ32, Changes in UE
- num DL/UL harq processes, bits for harq id in DCIs, set according to IEs configured in RRC messages
	- removed going through all the harq processes before triggering nr_ue_ulsch_procedures in phy_procedures_nr_ue.c
	- did not remove usage of MAX_HARQ_PROCESSES in init phase
2024-08-08 09:30:43 +02:00
Raghavendra Dinavahi
9726a47fbb enable HARQ32, Changes in gNB
- Enabled configuration for number of dl, ul harq processes in conf file
		- set "num_dlharq = 32; num_ulharq = 32;" under "gNBs" section in the conf file
		- default values when not configured is 16 for DL, UL harq processes
		- IEs in the RRC messages set according to the number of DL, UL harq processes configured.
		- If value 32 is configured , then IEs related to num harq processes and dci bits also configured in Bandwidth parts.
2024-08-07 13:17:35 +02:00
Raghavendra Dinavahi
e586efb29d enable HARQ32, Changes common to gNB and UE
- MAX HARQ PROCESSES set to 32
	- for PDSCH - default setting in OAI is 16, according to 3GPP rel17 38.331 these are the possible configs
		- if no IES are defined then 8
		- if nrofHARQ-ProcessesForPDSCH is defined then these values-  {n2, n4, n6, n10, n12, n16}
		- if nrofHARQ-ProcessesForPDSCH-v1700 is defined then 32
		- for harq bits in DCI
			- DCI 1_0 - 4 bits spec 38.212, section 7.3.1.2.1
			- DCI 1_1 - 4/5 bits according to IE harq-ProcessNumberSizeDCI-1-1, spec 38.212, section 7.3.1.2.2
	- for PUSCH - default setting in OAI is 16, according to 3GPP rel17 38.331 these are possible configs
                - if no IES are defined then 16
                - if nrofHARQ-ProcessesForPUSCH-v1700 is defined then 32
                - for harq bits in DCI
                        - DCI 0_0 - 4 bits spec 38.212, section 7.3.1.1.1
                        - DCI 0_1 - 4/5 bits according to IE harq-ProcessNumberSizeDCI-0-1, spec 38.212, section 7.3.1.1.2
	- FOR HARQ32 , DCI 1_1, DCI 0_1 should be configured in UE dedicated search space. In OAI it is set.
2024-08-06 17:12:48 +02:00
Cedric Roux
b22891d403 nr rlc: add a lock to protect access to time variables
ThreadSanitizer reported a data race, let's remove it.

Here is the warning.

WARNING: ThreadSanitizer: data race (pid=7361)
  Write of size 8 at 0x000003b42770 by thread T22 (mutexes: write M0):
    #0 nr_rlc_tick /home/richie/openairinterface5g/openair2/LAYER2/nr_rlc/nr_rlc_oai_api.c:1101 (nr-softmodem+0x107d275) (BuildId: 291c846fc591e10c3838e9c53f4738997de8f984)
    #1 gNB_dlsch_ulsch_scheduler /home/richie/openairinterface5g/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler.c:220 (nr-softmodem+0xaec72a) (BuildId: 291c846fc591e10c3838e9c53f4738997de8f984)
    #2 run_scheduler /home/richie/openairinterface5g/openair2/NR_PHY_INTERFACE/NR_IF_Module.c:406 (nr-softmodem+0xad8515) (BuildId: 291c846fc591e10c3838e9c53f4738997de8f984)
    #3 tx_func /home/richie/openairinterface5g/executables/nr-gnb.c:134 (nr-softmodem+0x7002cc) (BuildId: 291c846fc591e10c3838e9c53f4738997de8f984)
    #4 L1_tx_thread /home/richie/openairinterface5g/executables/nr-gnb.c:197 (nr-softmodem+0x7002cc)

  Previous read of size 8 at 0x000003b42770 by thread T2 (mutexes: write M1):
    #0 rlc_data_req /home/richie/openairinterface5g/openair2/LAYER2/nr_rlc/nr_rlc_oai_api.c:348 (nr-softmodem+0x1076f4e) (BuildId: 291c846fc591e10c3838e9c53f4738997de8f984)
    #1 rlc_data_req_thread /home/richie/openairinterface5g/openair2/LAYER2/nr_pdcp/nr_pdcp_oai_api.c:139 (nr-softmodem+0xa671ce) (BuildId: 291c846fc591e10c3838e9c53f4738997de8f984)
2024-08-06 16:53:03 +02:00
Robert Schmidt
d47eb536b0 Merge branch 'integration_2024_w31' into 'develop'
Integration: `2024.w31`

See merge request oai/openairinterface5g!2894

* !2812 NR UE MAC PRACH scheduling fixes
* !2885 Fix signal_energy_nodc for lengths that are not multiples of 4
* !2888 nr rlc: fix decode_poll_byte()
* !2892 Dockerfiles: correct ENV format
* !2891 UE cmd line info: print threequarter-sampling param if used
* !2837 replacing assertions with LOG_E in UE UL locking mechanism
* !2879 style(docker): newer versions of docker require keyword as to be of same case as from
* !2832 Enable PHR reporting for NR UE
* !2880 CI: Improve error handling in Iperf3 JSON analysis functions
* !2813 Rewrite time_stats_t counters for DLSCH in NR UE.
* !2882 Automatic scaling to PUCCH2 receiver
* !2691 NR UE data inactivity timer
* !2848 Refactor network interface handling
* !2865 CI: Create FHI 7.2 pipeline
2024-08-05 16:46:43 +00:00
Robert Schmidt
3e44aba1ea Merge remote-tracking branch 'origin/ci-fhi72-pipeline' into integration_2024_w31 2024-08-05 16:51:31 +02:00
Jaroslava Fiedlerova
d8696f703c CI: Add FHI72 pipeline to the parent pipeline 2024-08-05 15:57:49 +02:00
Jaroslava Fiedlerova
a57098ec02 CI: Add FHI72 pipeline to CI doc 2024-08-05 15:57:49 +02:00
Jaroslava Fiedlerova
9a4d1e920d CI: Add XML files for FHI72 pipeline 2024-08-05 15:57:49 +02:00
Jaroslava Fiedlerova
ca2d9ec2a1 CI: Update ci_infra for FHI7.2 pipeline 2024-08-05 15:57:49 +02:00
Jaroslava Fiedlerova
3cdb0d795e CI: Add path and namespace configuration for OC CNs
- Modify CN deployment and termination functions to include namespace and path parameters.
- Update `Module_UE` class with new attributes for namespace and CN path.
- Integrate `cnID` for OC CN deployment and termination in `epc.py`.
- Extract `cn_id` from XML configurations for CN operations.
- Update XML files to include `cn_id` tag for 5G Core initialization and
  termination. (Used in OAIUE and AW2S pipeline, for OC CN deployment. This change
will not affect other CN deployments.)
2024-08-05 15:57:49 +02:00
Jaroslava Fiedlerova
9c602a7790 CI: Remove unused directory for FHI 7.2 deployments 2024-08-05 15:57:49 +02:00
Jaroslava Fiedlerova
7dffdcd797 CI: Add YAML files and deployment scripts for FHI7.2 pipeline
Create directories for gNB deployment with VVDN and Benetel550 RUs.
Each directory includes scripts for setting up and cleaning up the
host machine running the gNB.
2024-08-05 15:57:46 +02:00
Robert Schmidt
3779483b1b Merge remote-tracking branch 'origin/refactor-nas-config' into integration_2024_w31 2024-08-05 10:20:23 +02:00
Robert Schmidt
335fa3fc50 Merge remote-tracking branch 'origin/NR_UE_data_inactivity_timer' into integration_2024_w31 2024-08-05 10:11:23 +02:00
Jaroslava Fiedlerova
386ff01f57 Merge remote-tracking branch 'origin/pucch2_polar_llr_dynamic_range' into integration_2024_w31 2024-08-05 10:06:07 +02:00
francescomani
88f0e28c76 init received_config_request flag only for SA 2024-08-04 13:27:00 +02:00
francescomani
798158cfe1 improvements in nr_pusch_channel_estimation code 2024-08-02 16:38:17 +02:00
Jaroslava Fiedlerova
fc9c5084eb Merge remote-tracking branch 'origin/nr-ue-pdsch-time-stats-fix' into integration_2024_w31 2024-08-02 16:27:58 +02:00
Robert Schmidt
168582b5a1 Remove netlink_init.c, and move remaining functionality to tun_if.c
Remove openair1/SIMULATION/ETH_TRANSPORT/netlink_init.c, and move TUN
interface creation functionality to tun_if.c.

Remove SIMU_ETH target.
2024-08-02 15:31:04 +02:00
Robert Schmidt
89d89a7564 Create tun_if module for TUN interface handling
Move openair3/RRC/NAS/nas_config.c to common/utils/tun_if.c, and remove
the former from all targets.
2024-08-02 15:31:04 +02:00
Robert Schmidt
39e7839f19 Cleanup netlink_init.c and pdcp_fifo.c
- Remove globals, declare where they are used
- Cleanup pdcp_fifo.c
- Remove unnecessary headers from netlink_init.c
- Reformat netlink_init.c
2024-08-02 15:31:04 +02:00
Robert Schmidt
3a99fb8293 Set up 4G UE addr via nas_config() 2024-08-02 15:31:04 +02:00
Robert Schmidt
2e804f53c0 Remove useless LINK_ENB_PDCP_TO_IP_DRIVER option 2024-08-02 15:31:04 +02:00
Robert Schmidt
659a81997b Handle IPv6/IPv4v6 PDU sessions
Handle IPv6 (and IPv4v6) PDU sessions by correctly instructing
nas_config() to set up the interface with provided IP addresses.
Note that as of now, IPv6 PDU sessions have not been fully tested.

Remove a useless assert at the gNB; to my understanding the gNB does not
care about the IP session type (at least for IP), as it just
transparently tunnels the IP packets from/to GTP.

I added a comment in the code where to change to request a PDU session
different from IPv4. Currently it is hardcoded to IPv4, and it seems
that a default OAI 5GC config would reject a PDU session type different
from IPv4.
2024-08-02 15:31:04 +02:00
Robert Schmidt
d0f32d8aad Refactor change_interface_state()
- Read interface flags before setting status to not inadvertently
  overwrite existing flags
- Set interface flag point-to-point, remove multicast (I think a UE is
  not supposed to send anywhere else than to the UPF, so it seems to not
  make sense to declare the interface as multicast)
2024-08-02 15:30:46 +02:00
Robert Schmidt
ae5702d014 nas_config(): change API to handle both IPv4 and IPv6
Implement handling of IPv4 and IPv6 (on the same interface) in
nas_config().
2024-08-02 15:30:15 +02:00
Robert Schmidt
ffcf53fc75 Reintroduce the IP rule&route for OAI UE through setup_ue_ipv4_route()
These rules & route are necessary to properly send packets on oaitun_ue1
interface:

1. This forces the packets coming from a subnet different than the UE's
   subnet to go back through oaitun_ue1 rather than via what the default
   route defined on the system (e.g., important if ping from the
   internet arrives).

2. On machines setting net.ipv4.conf.oaitun_ue1.rp_filter=1 (e.g.
   RHEL), this prevents that source filtering for packets coming back is
   applied and those packets be dropped. By default, many hosts have
   rp_filter=2, so no strict source filtering is applied, and it would
   work; on others, this rule prevents source filter dropping.
2024-08-02 15:29:36 +02:00
Robert Schmidt
2da09aba80 nas_config(): provide entire IP address to configure
Prior to this commit, there was a global variable baseNetAddress that
could be set independently through a setter and also through the
configuration module. This baseNetAddress (16 bits IPv4) would then be
complemented with two more bytes in nas_config().

However, this is counter-productive, as not only we have a global
variable that is avoidable (we can give the entire address to
nas_config() directly), but it also would not work with IPv6. Hence,
modify to give nas_config() the entire address. A follow-up commit will
add IPv6 support.
2024-08-02 15:29:36 +02:00
Robert Schmidt
2c878c10ec Refactor setInterfaceParameter() and bringInterfaceUp()
- refactor functions to make them shorter
- provide doxygen strings
- open socket for operation once instead of in each function
- use named constant (from enum) to differentiate interface UP/DOWN
- Linux kernel defines name length as IFNAM_SIZE, so use that for
  interface name length. Also, it seems no null-byte is needed.
2024-08-02 15:29:36 +02:00
Robert Schmidt
e2163ba312 Remove netmask configuration and hardcode instead
I initially planned to entirely remove the netmask configuration.
However, in specific configurations, e.g. in 4G Rfsim with feMBMS,
routing does not seem to work anymore using these commands:

  iperf -B 10.0.2.2 -s -u -i1
  iperf -c 10.0.2.2 -B 10.0.2.1 -u -t 30 -b 2.00M -i1

Therefore, we simplify by hardcoding the netmask to /24, which allows
the above to work.
2024-08-02 15:29:36 +02:00
Robert Schmidt
5bf498fca4 nas_config(): remove broadcast parameter
Remove the broadcast address from the UE, as logically, a UE has nothing
to broadcast: it can only directly talk to the core. Additionally, at
least as of now, the UE interface is shown as "POINTOPOINT", so
broadcasting is not possible.
2024-08-02 15:29:36 +02:00
Robert Schmidt
4810efdcfd Remove unused code from nas_config.c
Remove unused header includes, as well as the test program (which does
not do much, and certainly does not test in the way we use the
interfaces).
2024-08-02 15:29:36 +02:00
Robert Schmidt
9fedbf31dd Remove nas_config_mbms()
Remove nas_config_mbms() since nas_config_mbms() and nas_config() do the
same
2024-08-02 15:29:36 +02:00
Robert Schmidt
380cf5c603 Remove routing table init in nas_config()
The routing table is temporarily removed in this commit and introduced
in one of the next commits.
2024-08-02 15:29:36 +02:00
Robert Schmidt
a12460e882 nas_config_mbms/netlink_init_mbms_tun(): use entire interface prefix
Does the same change in the _mbms() functions as in the previous commit.

Also, simplify logic in netlink_init_mbms_tun(): directly use the id in
the interface. This requires a slight ID change in the users, which is
also done in this commit.
2024-08-02 15:29:36 +02:00
Robert Schmidt
5acfa47325 nas_config()/netlink_init_tun(): use entire interface name (prefix)
Instead of implicitly using a hardcoded prefix "oaitun_" interface
name, move that out to the callers of these functions to make it clear.
The ID still remains outside.

The "sister functions" nas_config_mbms()/netlink_init_tun_mbms() will do
the same change in the next commit.
2024-08-02 15:29:36 +02:00
Robert Schmidt
983ee2794d Replace nas_config_mbms_s1() call with nas_config_mbms()
Comparing both functions, it seems that nas_config_mbms_s1() sets the
same parameters, assuming that in nas_config_mbms(), we set
- (UE_NAS_USE_TUN || ENB_NAS_USE_TUN) yielding true -> should yield the
  same interface name
- netmask is hardcoded to 255.255.255.0
- baseNetAddress is hardcoded 10.0

So replace the call with nas_config_mbms() by setting parameters
accordingly.
2024-08-02 15:29:26 +02:00
Jaroslava Fiedlerova
89aad98093 Merge remote-tracking branch 'origin/ci-iperf3-json-fix' into integration_2024_w31 2024-08-02 12:56:07 +02:00
Jaroslava Fiedlerova
0a5e8b7666 Merge remote-tracking branch 'origin/nr-ue-phr' into integration_2024_w31 2024-08-02 12:53:04 +02:00
Bartosz Podrygajlo
f23c1dff00 Correct gNB received PHR to headroom calculation according to 38.133. 2024-08-02 12:37:47 +02:00
Bartosz Podrygajlo
c7c1cb2dbf Enable PHR reporting for NR UE 2024-08-02 12:37:47 +02:00
Jaroslava Fiedlerova
1c58bc2e1a Merge remote-tracking branch 'origin/style-dockerfile-as-uppercase' into integration_2024_w31 2024-08-02 12:04:45 +02:00
Jaroslava Fiedlerova
9a1381a92e Merge remote-tracking branch 'origin/NR_UE_assert_removal' into integration_2024_w31 2024-08-02 12:03:43 +02:00
francescomani
cec91a2a22 remove duplicate delta pusch function 2024-08-02 11:32:03 +02:00
francescomani
5eef9b3574 fix delta for PUSCH DMRS type 2 2024-08-02 10:09:59 +02:00
Jaroslava Fiedlerova
31b2428db8 CI: Add configuration file for gNB fhi7.2 with Benetel550 and VVDN 2024-08-02 10:08:11 +02:00
Jaroslava Fiedlerova
992e7fa117 Merge remote-tracking branch 'origin/ue-cmd-line-info-E' into integration_2024_w31 2024-08-02 09:17:22 +02:00
Jaroslava Fiedlerova
cb0a888565 Merge remote-tracking branch 'origin/docker-env-tini' into integration_2024_w31 2024-08-02 09:16:49 +02:00
Jaroslava Fiedlerova
8094952f6e Merge remote-tracking branch 'origin/bugfix-nr-rlc-poll-byte' into integration_2024_w31 2024-08-02 09:16:26 +02:00
Jaroslava Fiedlerova
8ae5bb5632 Merge remote-tracking branch 'origin/fix-signal-energy-nodc' into integration_2024_w31 2024-08-02 09:15:56 +02:00
Jaroslava Fiedlerova
167c06bb87 Merge remote-tracking branch 'origin/fix_bugs_prach_ue_for_multi_ssb' into integration_2024_w31 2024-08-02 09:15:20 +02:00
Robert Schmidt
7782f4aef0 Remove functions from nas_config that are not used, mark static
- Remove unused NAS_config(): It does most of what the highly similar
  nas_config() does.
- Remove unused set_gateway()
- Remove unused blocking_NAS_config()
- Remove unused functions getNetMask()
- Remove unused broadcast functionality: functions setBroadcastAddress()
  and getBroadcastAddress(), as well as global variable broadcastAddr
  are not used in consumers. Remove it.
- Make functions static
2024-08-01 18:22:46 +02:00
Robert Schmidt
44a0a45460 Remove unneeded header includes 2024-08-01 18:22:46 +02:00
Robert Schmidt
32d9e75dc5 Remove --nokrnmod option, as we never use the kernel anyway 2024-08-01 18:22:46 +02:00
Robert Schmidt
6b21dea1ee Remove legacy 4G kernel modules
I don't know about any user of the kernel modules. It is effectively
legacy code we carry around, for no good reason. Remove it for the
moment. If we ever need it, we can revert.
2024-08-01 18:22:46 +02:00
Robert Schmidt
8f549a5433 Remove rb_config: it's not used by any code currently in use 2024-08-01 18:22:46 +02:00
Robert Schmidt
f680babbdd Remove unused pdcp_netlink.c file 2024-08-01 18:22:45 +02:00
Robert Schmidt
cf950dfa86 Remove netlink/PDCP_USE_NETLINK: it's not used
Remove netlink code, and the PDCP_USE_NETLINK macro, as there is no
known use, it makes the code more complicated, and is simply "technical
debt".

In 4G PDCP, a subtle change has been introduced, in pdcp_module_init()
of pdcp.c. Looking at the diff of this commit, it can be seen that there
is now a new "else-if (ENB_NAS_USE_TUN_W_MBMS_BIT)" branch that is under
what was the "if (PDCP_USE_NETLINK)" branch, while the code fragment was
actually inside the "else" branch of PDCP_USE_NETLINK. This seems to be
necessary: previously, if we did not use noS1 mode and we don't use any
TUN (i.e., the eNB), the else block would set up this interface. It is
important that this interface is brought up, because if we omit it,
RFsim will not work. It seems to me that this interface will regularly
create some traffic; without it, RFsim will be blocked, and the UE
cannot connect.

In short, it seems to be important to have the MBMS interface, which
injects traffic in the RFsim side, which will unblock RFsim. The change
in pdcp_module_init() preserves the total changes of the if-else
(PDCP_USE_NETLINK).
2024-08-01 18:22:45 +02:00
Robert Schmidt
12229ef50e Smaller except blocks, add JSONDecodeError 2024-08-01 17:44:21 +02:00
francescomani
a9902d883c creation of a separate .h file for L2_interface_ue 2024-08-01 16:39:34 +02:00
francescomani
3fa73e4bdd implementation of MAC data inactivity timer 2024-08-01 16:39:24 +02:00
Jaroslava Fiedlerova
39070f6541 Minor fix in Iperf_analyzeV3TCPJson() 2024-08-01 15:59:35 +02:00
Raymond Knopp
70751e04d8 Added automatic scaling to PUCCH2 receiver
Scaling based on incoming signal level to help with polar case.
Can subsequently add PUCCH2 CQI measurement based on this.
2024-08-01 14:03:48 +02:00
Robert Schmidt
848b0f34ee UE cmd line info: print threequarter-sampling param if used, add doc 2024-08-01 13:56:21 +02:00
Jaroslava Fiedlerova
9acf60a339 Improve error handling in Iperf_analyzeV3BIDIRJson() 2024-08-01 13:53:49 +02:00
Jaroslava Fiedlerova
5f684d7f05 Improve error handling in Iperf_analyzeV3TCPJson() 2024-08-01 13:53:45 +02:00
Raphael Defosseux
f6dcc19fe5 style(docker): adding license header to dockerfiles
Signed-off-by: Raphael Defosseux <raphael.defosseux@eurecom.fr>
2024-08-01 10:47:46 +02:00
Raphael Defosseux
0efaec657a style(docker): newer versions of docker require keyword as to be of same case as from
Signed-off-by: Raphael Defosseux <raphael.defosseux@eurecom.fr>
2024-08-01 10:47:46 +02:00
Bartosz Podrygajlo
d465ed2fbc NR UE: Cleanup global variables used for command line parameter storage
Variables moved to nrUEParams:
vcdflag, rx_gain_off, usrp_args, tx_subdev, rx_subdev, reconfig_file, rbconfig_file, uecap_file,
tx_gain, rx_gain

Variables removed:
rx_gain_mode
2024-08-01 09:50:29 +02:00
Bartosz Podrygajlo
b0b8818549 Remove unused command like parameter rrc_config_path 2024-08-01 09:48:54 +02:00
Robert Schmidt
965b7f63b0 Dockerfiles: correct ENV format
Avoid docker warning:

   - LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format
2024-08-01 08:20:33 +02:00
Laurent THOMAS
0e7e66ecd8 add harqid in wireshark traces, refactir the trace_pdu parameters 2024-07-31 09:40:07 +02:00
Robert Schmidt
5223013153 do_ra test: increase response window
Tests showed that we sometimes exceed the response window. In that case,
the UE cannot connect anymore, as do-ra uses contention-free RA, and
prefills a RA process. Avoid this by giving more time in the CI test.
2024-07-31 09:36:22 +02:00
Robert Schmidt
bfaa906a1e Remove rb_config functions from nas_config, remove unused functions, make static 2024-07-30 20:00:40 +02:00
Robert Schmidt
e50978e7de 4G RLC/PDCP interface: remove function pointers
Remove function pointers that were used in the past to implement the
F1(-U) interface in 4G, i.e., to have different functions to handle
split/monolithic operations. As we don't have F1 in 4G anymore (see
commit 9dc2282249), we don't need the
function pointers anymore.

On that occasion, rename the 5G functions by prepending nr_ to them;
this allows to refactor the interface in 5G further (which is not the
focus of this changeset).
2024-07-30 20:00:40 +02:00
Robert Schmidt
3d7ab0ebc6 Remove unused SIMULATION/ETH_TRANSPORT/defs.h 2024-07-30 20:00:40 +02:00
Robert Schmidt
7ddba36279 Remove unused code in ETH_TRANSPORT/{socket,multicast_link}.{ch} 2024-07-30 20:00:40 +02:00
Robert Schmidt
b2eb0f74b6 Remove unused code in openair3/UTILS: not used anywhere 2024-07-30 20:00:40 +02:00
Robert Schmidt
8365630946 Remove unused emu_transport.c 2024-07-30 20:00:40 +02:00
Robert Schmidt
6da87cf062 Remove unused Makefile 2024-07-30 20:00:40 +02:00
Robert Schmidt
9d77057775 Remove LFDS credit: we don't use it anymore 2024-07-30 20:00:40 +02:00
francescomani
77db7be68e avoid duplicated call to phy_config_request 2024-07-30 19:36:49 +02:00
francescomani
ab537c6675 remove mac flag phy_config_request_sent 2024-07-30 19:36:49 +02:00
Bartosz Podrygajlo
b242a483f1 Rewrite NR UE PHY cpu measurements 2024-07-30 19:23:54 +02:00
Robert Schmidt
bd721c3bdb Merge branch 'integration_2024_w30' into 'develop'
Integration: `2024.w30`

See merge request oai/openairinterface5g!2877

* !2830 NR feature set update
* !2868 Fix support for USRP UHD Versions => 4.5.0.0
* !2870 fix(docker): base image for target oai-gnb-aw2s shall be jammy
* !2874 Fix memory leaks in gNB PDU Session Setup Request processing
* !2866 RRC: reject PDU sessions if security is not active
* !2829 Automatic update of USRP RX gain during initial search using --agc option
* !2878 USRP: add a T trace to record the TX IQ data on antenna 0
* !2633 Handle F1 Reset at DU, and ensure state re-init on F1Setup
* !2864 Fix an assert in power control
* !2754 Introduce gold sequence cache
2024-07-30 16:24:27 +00:00
Cedric Roux
77af1ab97b nr rlc: fix decode_poll_byte()
The returned value was 1024 times too big.
2024-07-30 17:38:13 +02:00
Robert Schmidt
82c0b441e5 Merge remote-tracking branch 'origin/simplify-faster-gold-sequences' into integration_2024_w30 2024-07-30 15:05:40 +02:00
Robert Schmidt
b8089ba9a6 Remove empty file nr_gold.c 2024-07-30 14:58:12 +02:00
Laurent THOMAS
bb766be0c3 Reformatting and cleanup 2024-07-30 14:57:17 +02:00
Laurent THOMAS
8e92df78de Use gold cache in PUCCH decoding 2024-07-30 14:57:10 +02:00
Laurent THOMAS
803b0289a6 Use gold cache in code word (un)scrambling 2024-07-30 14:57:06 +02:00
Laurent THOMAS
f207ac12be Use gold cache in UCI 2024-07-30 14:57:01 +02:00
Laurent THOMAS
00cb43bac3 Use gold cache for PRS decoding 2024-07-30 14:55:35 +02:00
Robert Schmidt
7563937af8 Use gold cache for CSI-RS decoding 2024-07-30 14:53:30 +02:00
Laurent THOMAS
e445ba2d1a Use gold cache PUSCH decoding
Harmonize nr_gold_pusch() and nr_gold_pdsch(), as the gold sequence
calculation for PUSCH and PDSCH is the same.
2024-07-30 14:52:06 +02:00
Laurent THOMAS
745ea1c1dd Use gold cache for PDSCH decoding 2024-07-30 14:50:57 +02:00
Laurent THOMAS
99c8dd420a Use gold cache for PDCCH decoding, scrambling, unscrambling 2024-07-30 14:49:46 +02:00
Laurent THOMAS
0316431e27 Use gold cache for PBCH encoding&decoding 2024-07-30 14:48:36 +02:00
Robert Schmidt
9d81708b49 takeout 2024-07-30 14:44:31 +02:00
Jaroslava Fiedlerova
bb9af4c7dc Merge remote-tracking branch 'origin/fix-assert-in-pc' into integration_2024_w30 2024-07-30 10:18:20 +02:00
arora
0800dad0e4 (doc): Added a new doc on hardware requirements
- Added information about the CPU clock-speed in 7.2 docs
2024-07-30 10:04:07 +02:00
Bartosz Podrygajlo
ed05c94c3e Fix signal_energy_nodc for lengths that are not multiples of 4 2024-07-30 09:44:00 +02:00
Robert Schmidt
686f1816d0 Merge remote-tracking branch 'origin/impl_f1reset_and_fix_f1setup' into integration_2024_w30 2024-07-29 12:02:50 +02:00
Xin Zhe Khooi
52bd1ad7c6 Update FEATURE_SET.md with F1 Reset (DU-only) 2024-07-29 07:44:31 +02:00
Robert Schmidt
2b44e5252d Add log statement that DU sends F1 Setup Request, as done in other functions 2024-07-29 07:44:31 +02:00
Xin Zhe Khooi
52f077c478 Initialized DU UE states on F1SetupResponse
38.473 requires to reset UE-related contexts in F1 Setup Request, so do
it.

However, avoid resetting UE states in phy_test: it has preconfigured UE
which we should not reset. Note that if NSA/phy-test used F1, we could
likely reset the UE state here, as the F1 UE context setup would come
afterwards.
2024-07-29 07:43:14 +02:00
Jaroslava Fiedlerova
f30e354b77 Merge remote-tracking branch 'origin/T-usrp-tx-sample-trace' into integration_2024_w30 2024-07-26 18:07:42 +02:00
Jaroslava Fiedlerova
d0daf03089 Merge remote-tracking branch 'origin/NR_UPDATE_RXGAIN' into integration_2024_w30 2024-07-26 18:07:22 +02:00
Laurent THOMAS
59086151e0 Add generic usage-based gold cache
Add gold sequence cache with dynamic size, private to each thread. It
periodically reorders by call rate. To free the gold sequences after end
of life time of a thread, use the pthread API.
2024-07-26 16:39:28 +02:00
Jaroslava Fiedlerova
fbf257f6ba Merge remote-tracking branch 'origin/pdu-session-no-security' into integration_2024_w30 2024-07-26 14:13:17 +02:00
Jaroslava Fiedlerova
5692217c29 Merge remote-tracking branch 'origin/fix-gnb-memory-leaks' into integration_2024_w30 2024-07-26 14:12:55 +02:00
Cedric Roux
181ec25a23 USRP: add a T trace to record the TX IQ data on antenna 0 2024-07-26 12:54:55 +02:00
Robert Schmidt
9c1a8733c1 nr_pusch_dmrs_rx(): const input 2024-07-26 12:15:36 +02:00
Robert Schmidt
fc5258962f nr_gen_ref_conj_symbols()/nr_ptrs_cpe_estimation(): const input 2024-07-26 12:14:59 +02:00
Robert Schmidt
46ca521042 nr_pdc/sch_dmrs_rx(): make non-changing input parameter const ptr 2024-07-26 12:14:29 +02:00
Robert Schmidt
9e0bcb7fe4 nr_modulation(): make non-changing input parameter const ptr 2024-07-26 12:04:35 +02:00
Bartosz Podrygajlo
48d68f7d90 Fix a bug where if BWP size is not exactly maximum BWP size for a bandwidth power control code asserts.
This assert and assumption is incorrect, according to 38.101-1 UE channel is defined only by the BWP size
and BWP size can be any value supported by the RRC parameters defining the BWP.
To determine the UE channel the smallest bandwidth supporting the BWP is selected. This is an assumption based
on references in the same document to UE channel bandwidth being equal to one of the values in set
 {5, 10, 15, 20, 25, 30, 35, 40, 50, 60, 70, 80, 90, 100}.
Also:
 - calculated P_CMIN during BWP setup since the parameter doesn't depend on DCI.
 - initiialize uniqCfg structure in test_nr_ue_power_procedures main function which enables LOG prints during tests
2024-07-26 11:15:49 +02:00
Jaroslava Fiedlerova
eab8dfa4c4 Merge remote-tracking branch 'origin/fix-aw2s-image-base' into integration_2024_w30 2024-07-26 10:31:41 +02:00
Jaroslava Fiedlerova
bad93150ff Merge remote-tracking branch 'platini/develop' into integration_2024_w30 2024-07-26 10:29:39 +02:00
Jaroslava Fiedlerova
4acb9be7c0 Merge remote-tracking branch 'origin/NR_UE_feature_set_update' into integration_2024_w30 2024-07-26 10:21:13 +02:00
Xin Zhe Khooi
23a865db77 Implement DU F1 Reset handlers 2024-07-26 08:53:32 +02:00
Xin Zhe Khooi
a92ab368f2 Decouple UEContextReleaseComplete message generation from MAC UE release
The next commit implements the release of all UEs following the F1 Reset
message. It uses nr_mac_release_ue(), which as of now, triggered a
release complete message automatically, which we don't want in the case
of F1 Reset.

This commit refactors the code to split UE release at MAC/RLC and
release complete message sending to allow to release UEs without sending
the complete. Corresponding users are updated.
2024-07-26 08:48:10 +02:00
Xin Zhe Khooi
03c2f6277d Implement encoder/decoder for F1 Reset at DU 2024-07-26 08:42:37 +02:00
Xin Zhe Khooi
2cb6fd0890 Stubs for F1 Reset 2024-07-26 08:42:34 +02:00
Guido Casati
2d6aef5183 Fix memory leak in PDU Session Setup Request decoding
* aper_decode allocates memory for for local pointer `pdusessionTransfer`, in `decodePDUSessionResourceSetup`
* this memory seems not to be freed but its members are by:
  `ASN_STRUCT_FREE_CONTENTS_ONLY(asn_DEF_NGAP_PDUSessionResourceSetupRequestTransfer,pdusessionTransfer);`
  which btw in its header says: "AVOID using it in the application code; Use a safer ASN_STRUCT_RESET() instead"
* the following mem leak was detected by ASAN:

```
Direct leak of 72 byte(s) in 1 object(s) allocated from:
   *0 0x7ffff74b4a57 in __interceptor_calloc /src/libsanitizer/asan/asan_malloc_linux.cpp:154
   *1 0x55555cb306df in SEQUENCE_decode_aper /cmake_targets/ran_build/build/openair2/RRC/LTE/MESSAGES/constr_SEQUENCE_aper.c:36
   *2 0x55555ca9fa28 in aper_decode /cmake_targets/ran_build/build/openair2/RRC/LTE/MESSAGES/aper_decoder.c:78
   *3 0x55555b99bae6 in decodePDUSessionResourceSetup /openair2/RRC/NR/rrc_gNB_NGAP.c:273
   *4 0x55555b99fec2 in trigger_bearer_setup /openair2/RRC/NR/rrc_gNB_NGAP.c:357
   *5 0x55555b9b54bf in rrc_gNB_process_NGAP_PDUSESSION_SETUP_REQ /openair2/RRC/NR/rrc_gNB_NGAP.c:830
   *6 0x55555b936871 in rrc_gnb_task /openair2/RRC/NR/rrc_gNB.c:2428
   *7 0x7ffff5e94ac2 in start_thread nptl/pthread_create.c:442
```

* This commit replaces ASN_STRUCT_FREE_CONTENTS_ONLY with ASN_STRUCT_FREE, which will free the memory allocated for the entire struct and its members
2024-07-25 16:46:22 +02:00
Guido Casati
c78b8dda56 Fix memory leak in PDU Session Setup Request
* fill_DRB_configList_e1 is filling `DRB_configList->list` then passing to PDCP
* the contents of the struct are allocated but seem not to be freed
* the following mem leak was detected by ASAN

```
Direct leak of 32 byte(s) in 1 object(s) allocated from:
   *0 0x7ffff74b4c38 in __interceptor_realloc /src/libsanitizer/asan/asan_malloc_linux.cpp:164
   *1 0x55555caa6a3e in asn_set_add /cmake_targets/ran_build/build/openair2/RRC/LTE/MESSAGES/asn_SET_OF.c:27
   *2 0x55555c8b8bb6 in fill_DRB_configList_e1 /openair2/LAYER2/nr_pdcp/cucp_cuup_handler.c:42
   *3 0x55555c8be6eb in e1_bearer_context_setup /openair2/LAYER2/nr_pdcp/cucp_cuup_handler.c:189
   *4 0x55555d329668 in cucp_cuup_bearer_context_setup_direct /openair2/RRC/NR/cucp_cuup_direct.c:31
   *5 0x55555b9a2c37 in trigger_bearer_setup /openair2/RRC/NR/rrc_gNB_NGAP.c:437
   *6 0x55555b9b54bf in rrc_gNB_process_NGAP_PDUSESSION_SETUP_REQ /openair2/RRC/NR/rrc_gNB_NGAP.c:830
   *7 0x55555b936871 in rrc_gnb_task /openair2/RRC/NR/rrc_gNB.c:2428
   *8 0x7ffff5e94ac2 in start_thread nptl/pthread_create.c:442
```

* using ASN_STRUCT_RESET to free the memory used by the members of the structure
  without freeing the structure pointer which is allocated on the stack
2024-07-25 16:46:17 +02:00
Raghavendra Dinavahi
95a8767383 Automatic update of USRP RX gain during initial search using --agc option
- if search fails, keeps increasing the rx gain (set by --ue-rxgain) by
  3 db until USRP max rx gain
- if initial sync is success, sets the rxgain to the value of
  (TARGET_RX_POWER (50) - pbch digital power in dB/RE)
2024-07-25 15:33:44 +02:00
Raghavendra Dinavahi
4c698bce2b rewrite ssb meas function to call from initial sync 2024-07-25 15:33:06 +02:00
Raghavendra Dinavahi
6fce492177 Correction of variable initialisation 2024-07-25 15:31:34 +02:00
Guido Casati
869b78efe2 Use NGAP protocol cause IE in the stack 2024-07-25 13:58:08 +02:00
Guido Casati
d581c671e9 Add enum for NGAP protocol cause IEs 2024-07-25 13:58:08 +02:00
Raphael Defosseux
0ed8fb7205 Merge remote-tracking branch 'origin/back_to_Aerial2' into develop 2024-07-25 13:56:48 +02:00
Reem Bahsoun
2e0186f884 updating Aerial setup in TESTBench to Aerial2 and Quectel RM520N on Sphex 2024-07-25 10:32:40 +02:00
Robert Schmidt
032d4fc9ff RRC: reject PDU sessions if security is not active
OAI 5GC seems to have a bug, and occasionally might send a PDU session
setup request without having sent a UE context setup request, resulting
in no security context activated for a UE. This lead to an assertion in
rrc_gNB_process_e1_bearer_context_setup_resp().

To prevent the gNB from stopping, check if security is active before
triggering PDU sessions. If not, the gNB will reject PDU sessions.
2024-07-24 18:09:57 +02:00
Reem Bahsoun
ad5eb8cd14 Increased the the DL throughput to 150Mbps 2024-07-24 13:09:06 +02:00
Reem Bahsoun
9eeaee450b change IP address to Aerial2 in gnb conf 2024-07-24 13:06:38 +02:00
Robert Schmidt
f0f0cf8048 Merge branch 'integration_2024_w29' into 'develop'
Integration: `2024.w29`

See merge request oai/openairinterface5g!2867

* !2854 Fix NSA test
* !2715 Aerial multi l2
* !2798 CI: Create Iperf2 unidirectional function
* !2859 Switch to BWP where RA is configured when Msg3 contains MAC CE for C-RNTI
* !2861 7.2 xran: notification generation code in ru_thread excluded from compilation
* !2853 Cleanup executables focusing on NR UE
* !2860 Fix segfault in SRS modulation when ue-nb-ant-tx (fp) does not match UE capabilities
* !2863 Add configuration for CBRS RU
* !2749 immediately reuse UL/DL HARQ ID and don't wait for feedback if disable_harq == 1
2024-07-23 16:26:32 +00:00
Jaroslava Fiedlerova
4a1c505782 Merge remote-tracking branch 'origin/disable_harq' into integration_2024_w29 2024-07-23 12:17:49 +02:00
Thomas Schlichter
fae529b384 add documentation for disable_harq flag in NTN section of doc/RUNMODEM.md 2024-07-23 10:42:10 +02:00
Jaroslava Fiedlerova
409fa5d0af Merge remote-tracking branch 'origin/aerial_cbrs' into integration_2024_w29 2024-07-23 08:46:56 +02:00
francescomani
490620a0d8 gNB supported number of antenna feature set update 2024-07-22 17:53:53 +02:00
francescomani
76aaf60dd1 UE feature set update 2024-07-22 17:53:53 +02:00
Jaroslava Fiedlerova
2cb95d5505 Merge remote-tracking branch 'origin/fix-segfault-srs-antenna-ports' into integration_2024_w29 2024-07-22 15:52:55 +02:00
Raphael Defosseux
3926e140e8 fix(docker): base image for target oai-gnb-aw2s shall be jammy
Signed-off-by: Raphael Defosseux <raphael.defosseux@eurecom.fr>
2024-07-22 12:09:54 +02:00
Guido Casati
101f178c3e Verify UE capabilities at RRC UE initialization
* number of configured SRS antenna ports M <= N (number of physical antenna ports)
2024-07-22 10:46:45 +02:00
Jaroslava Fiedlerova
561119a2d6 Merge remote-tracking branch 'origin/cleanup-nr-ue-executable' into integration_2024_w29 2024-07-22 08:25:18 +02:00
Patricio Latini
a382a08bd3 Fix support for USRP UHD Versions => 4.5.0.0 2024-07-20 19:11:50 +00:00
Nick Hedberg
383eb9f5a1 Add Aerial VNF configuration file for CBRS RU 2024-07-20 07:23:11 +02:00
Jaroslava Fiedlerova
84568102de Merge remote-tracking branch 'origin/fix-7.2-mem-leak' into integration_2024_w29 2024-07-19 16:39:26 +02:00
Jaroslava Fiedlerova
95fe106a40 Merge remote-tracking branch 'origin/Msg3_MAC_CE_C-RNTI_BWP_Fix' into integration_2024_w29 2024-07-19 16:38:54 +02:00
Thomas Schlichter
b76eb19471 gNB: refactor code to handle end of using a specific HARQ process - finish_nr_dl_harq() and finish_nr_ul_harq() 2024-07-19 16:09:04 +02:00
Jaroslava Fiedlerova
8ac2c87494 Merge remote-tracking branch 'origin/ci-iperf2-func' into integration_2024_w29 2024-07-19 12:37:53 +02:00
Jaroslava Fiedlerova
140ac7d4cd Merge remote-tracking branch 'origin/Aerial_multi_L2' into integration_2024_w29 2024-07-19 12:37:16 +02:00
Guido Casati
c4570bc829 Avoid segfault in SRS modulation when ue-nb-ant-tx (fp) does not match UE capabilities
* the mismatch between UE capabilities, passed to PHY by NFAPI PDU, and --ue-nb-ant-tx
  causes a segfault in SRS modulation
* issue with indexing txdataF[p_index], which fails due to an out-of-bounds access
  since first dimension of txdataF is sized based on ue->frame_parms.nb_antennas_tx
* N_ap used in SRS modulation is based on the number of antenna ports
  in the SRS configuration (srs_config_pdu->num_ant_ports)
2024-07-19 10:44:26 +02:00
Thomas Schlichter
cd052951d5 gNB: do not schedule DLSCH ACK/NACK reporting in PUCCH for harq pid where feedback is disabled 2024-07-19 10:43:52 +02:00
Thomas Schlichter
3a014e199f NR UE: skip DLSCH ACK/NACK reporting for harq pid where feedback is disabled 2024-07-19 10:43:52 +02:00
Thomas Schlichter
fe7be3f130 Make handle_nr_uci_pucch_2_3_4() more consistent regarding logs with handle_nr_uci_pucch_0_1() 2024-07-19 10:43:52 +02:00
Thomas Schlichter
44410df598 fix double reduction of sched_ul_bytes in case of failing 4th HARQ round
sched_ul_bytes is reduced already in case the last HARQ round fails through handle_nr_ul_harq() -> abort_nr_ul_harq().
Therefore, the reduction in nr_rx_sdu() is wrong, and btw. it wrongly assumes the max. UL HARQ rounds to 4.
So simply remove this peace of code in nr_rx_sdu().
2024-07-19 10:43:52 +02:00
Thomas Schlichter
a6fb797477 improve tracking of sched_ul_bytes in nr_rx_sdu() by using sdu_lenP instead of sched_pusch.tb_size
sched_ul_bytes tracks the volume of in-flight data.
When data is successfully received, sched_ul_bytes is decreased in nr_rx_sdu().
In case of reusing HARQ processes, the tb_size stored there is not correct.
Therefore use the actual SDU size instead.
2024-07-19 10:43:52 +02:00
Thomas Schlichter
b331ad21f4 in nr_rx_sdu() use HARQ ID from nfapi_nr_crc_t instead of feedback_ul_harq 2024-07-19 10:43:52 +02:00
Thomas Schlichter
f7665357fc dont't print warning in handle_nr_ul_harq() if disable_harq == 1 2024-07-19 10:43:52 +02:00
Thomas Schlichter
9a0408a5c7 immediately reuse Msg4 HARQ ID and don't wait for Msg4 feedback if DL HARQ feedback is disabled 2024-07-19 10:43:52 +02:00
Thomas Schlichter
4baac21ec6 immediately reuse UL HARQ ID and don't wait for feedback if disable_harq == 1 2024-07-19 10:43:52 +02:00
Thomas Schlichter
bf2baf2ffe immediately reuse DL HARQ ID and don't wait for feedback if DL HARQ feedback is disabled 2024-07-19 10:43:52 +02:00
Thomas Schlichter
ae4cbcfb0c gNB: add config file option "disable_harq" and set pdsch_servingcellconfig->ext3->downlinkHARQ_FeedbackDisabled_r17 accordingly 2024-07-19 10:43:52 +02:00
Jaroslava Fiedlerova
c9a40c464e Minor fix of Iperf_analyzeV2UDP()
Don't break after first occurence of status template (interval "0.0- 1.0 sec").
With this modification we get final result, which is at the last line of log
(for interval "0.0-30.2 sec").
2024-07-18 19:31:40 +02:00
Jaroslava Fiedlerova
b790150e54 CI: Simplify Iperf_Module()
Remove code related to "rfsim4g_enb_fembms" testcase from Iperf_Module() -
replaced by Iperf2_Unidir(). Use copyin() for both remote and local
commands - no need to check if running on localhost anymore.
Create directory for log collection on executor node -
used for log collection in pipelines running on localhost.
Copy the iperf3 report to the executor machine for log collection.
The report needs to be copied to two different directories to ensure
proper log collection across all pipelines. Using absolute paths
ensures compatibility with both remote and local commands.
2024-07-18 19:31:40 +02:00
Jaroslava Fiedlerova
a6ce2896f7 CI: Create Iperf2 unidirectional function
Add new function to run iperf v2 test. Supports testing with 1 UE, unidirectional traffic.
Currently used in RFSim-4G, FeMBMS testcase.
2024-07-18 19:31:36 +02:00
Jaroslava Fiedlerova
9aeacd3455 Merge remote-tracking branch 'origin/fix-nsa-reattach' into integration_2024_w29 2024-07-18 17:34:31 +02:00
Robert Schmidt
f28f9e52ac Use gNB_mac consistently 2024-07-18 15:27:23 +02:00
Robert Schmidt
6bc486f504 Fixup: Simplify code 2024-07-18 15:27:23 +02:00
andrewse
3dd0d45907 7.2 xran: notification generation code in ru_thread excluded from compilation 2024-07-18 15:24:14 +02:00
Bartosz Podrygajlo
93280a3e75 Remove unused nr_dlsch_demod_shift command line parameter from NR UE 2024-07-18 09:31:37 +02:00
Bartosz Podrygajlo
b2a46e3b76 Remove unused variables from softmodems, focusing on NR UE: chain_offset, card_offset, numerology,
oaisim_flag, dumpframe, rx_input_level_dBm, emulate_rf
2024-07-18 09:31:37 +02:00
Bartosz Podrygajlo
19033ca822 Remove num_missed_slots from softmodems and some extra unused functions from NRUE. 2024-07-18 09:31:37 +02:00
Bartosz Podrygajlo
ead066d630 Remove unused abstraction_flag from NR UE 2024-07-18 09:31:37 +02:00
Bartosz Podrygajlo
2ff1253321 Move init_nr_bler_table out of nr-uesoftmodem.c 2024-07-18 09:31:37 +02:00
Bartosz Podrygajlo
dc91550e2c Remove unused flag single_thread_flag from softmodems. 2024-07-18 09:31:29 +02:00
Bartosz Podrygajlo
1f7ec847bc Remove tddflag. Frame type depends on band. 2024-07-18 08:28:54 +02:00
Florian Kaltenberger
612bbaeca6 documentation update 2024-07-16 17:27:50 -04:00
Florian Kaltenberger
2bee8edcab making nvIPC thread more configurable + cleanup
making aerial shm prefix configurable (so we can use muliptle VNFs per PNF)
making the nvipc thread affinity configurable and using threadCreate.
removing aerial_vnf_nr_aerial_p7_start_thread
2024-07-16 17:27:50 -04:00
Florian Kaltenberger
2fa80efb52 removing assert on RACH num_preambles>1. Instead we print an error and continue RA with only the first preamble. 2024-07-16 17:27:50 -04:00
Fredrik Molander
7ccc768805 missing sudo in Aerial entrypoint 2024-07-16 17:27:50 -04:00
Robert Schmidt
32c238925e Improve modes in FEATURE_SET.md and add NSA 2024-07-16 18:56:45 +02:00
Robert Schmidt
b12d3a4fc8 Correct nr_clear_ra_proc() for SA+NSA case, fix memory leak
In NSA, the RA process contains the RNTI of the UE to add. The previous
implementation would not remove the RNTI in NSA/for CFRA, which is
unclear (why should it stay? RA is over). Also, we did not clear all
contents, which masked a bug, as we were reusing an RA process for a
subsequent attach, leading to a segfault on reattach. That is fixed in
this commit.

Also, we were using the RA structure after having cleared it in
_nr_rx_sdu(), which semantically makes no sense.

To harmonize handling of the preambles: completely reset the RA
processes inside nr_clear_ra_proc(). For SA, also add the initialization
of allowed preambles.

Finally, this commit fixes a memory leak: we always (also in SA) fill a
list of preambles in a dynamically allocated preamble list. Since the
total list is only up to 64 preambles of 1B each, put it directly into
the struct instead of dynamically allocating it.
2024-07-16 18:53:40 +02:00
Robert Schmidt
e77912a5b9 Refactor: store secondaryCellGroup only at MAC
Remove the secondaryCellGroup variable in RRC, as it is not used there.

Note that in the case of F1, the secondaryCellGroup entirely belongs to
the DU, i.e., MAC. Also, we don't do anything with it in RRC.
2024-07-16 11:24:57 +02:00
Robert Schmidt
0a997ee08e Do not print all XnAP logs
NSA is quite verbose, some messages are large and it is not very
"interesting" for the average user. The logs can be enabled on demand,
or directly seen in Wireshark instead.
2024-07-16 11:24:57 +02:00
Robert Schmidt
ef1c85e099 Use correct RRC UE ID for PDCP, print warning if not existing 2024-07-16 11:24:57 +02:00
Robert Schmidt
3d2bf72efa Use correct RRC UE ID for NSA UEs
The RRC UE context has the RRC UE ID. Use that instead of hardcoding
something that might be wrong (because the RRC UE ID can be reused,
whereas the counter just blindly increases).

The next commit will use that RRC UE ID to free the PDCP context for the
UE. It might be wrong on reattach otherwise, because the RRC UE ID could
again be 1.
2024-07-16 11:24:57 +02:00
Robert Schmidt
09675f6544 get_default_secondaryCellGroup(): make servingCellConfig const
We simply don't need to modify the servingCellConfig, so don't do it.
2024-07-16 11:24:57 +02:00
Robert Schmidt
05aa348f80 Remove "global" UE variable spCellConfig
Variable spCellConfig is only used in function rrc_add_nsa_user(). Make
it local to this function to prevent possible bugs (limit the possible
scope as much as possible).
2024-07-16 11:24:57 +02:00
Robert Schmidt
3a18c17d5a Remove "global" UE variable reconfig
Variable reconfig is only used in function rrc_add_nsa_user(). Make it
local to this function to prevent possible bugs (limit the possible
scope as much as possible).
2024-07-16 11:24:57 +02:00
Robert Schmidt
6b62c4378b Refactor generate_CG_Config(): return CG_Config
Simplify code by returning an allocated object to a CG_Config.  It leads
to less code and is easier to reason about, because each call will
return a new CG_Config, which can be freed, irrespective of other calls
to fill_default_reconfig().
2024-07-16 11:24:57 +02:00
Robert Schmidt
c1668cd7c0 Refactor fill_default_reconfig(): return reconfig
Simplify code by returning an allocated object to an RRCReconfiguration.
It leads to less code and is easier to reason about, because each call
will return a new RRCReconfiguration, which can be freed, irrespective
of other calls to fill_default_reconfig().
2024-07-16 11:24:57 +02:00
Robert Schmidt
4cb0bd3712 Clean up servingCellConfigDedicated once after reading config
get_default_secondaryCellGroup() would "sanitize" the servingCellConfig,
i.e., remove BWP that are invalid. However, it is difficult to
understand (we can do sanitization once at the beginning) and reason
(why the servingCellConfig is modified in
get_default_secondaryCellGroup(), because all we want is a new
CellGroupConfig, without modifying other data structures).

Instead, do sanitization once after reading the configuration in
gnb_config.c. Also, modify physical simulators nr_dlsim and nr_ulsim to
apply this sanitization before a call to
get_default_secondaryCellGroup(), as the latter would have done the
sanitization.
2024-07-16 11:24:57 +02:00
Robert Schmidt
98ebd0d71e Revert "Add assertion for known segfault during teardown of gNB."
This reverts commit 4c658cdd50.

This commit was introduce to signal a known segfault. The bug has been
fixed in the last commit, so this commit can be reverted as the
AssertFatal is not necessary anymore.
2024-07-16 11:24:57 +02:00
Robert Schmidt
5bde26246f Create deep copy of ServingCellConfigCommon for UE-specific parameter
Prior to this commit, upon a release of a UE at the gNB in NSA, the gNB
fails with a segv. This is because the servingCellConfigCommon is used
in the reconfigurationWithSync (through a simple pointer). At the
release, the entire secondaryCellGroup is freed, leading to a free of
the servingCellConfigCommon. The gNB then tries to use it (e.g., for
looking up the numerology), and leading to a segv.

To avoid this problem, make a "deep copy" of the ServingCellConfigCommon
so that we can safely free the UEs secondaryCellGroup, without freeing
the initial ServingCellConfigCommon.
2024-07-16 11:24:57 +02:00
luis_pereira87
cbf8489707 Switch to BWP where RA is configured when Msg3 contains MAC CE for C-RNTI
Switch to BWP where RA is configured, typically in the InitialBWP
At this point, MAC CE for C-RNTI received at gNB, UE already switched and triggered RA in that BWP, need to do BWP switching also at gNB for that C-RNTI
2024-07-15 13:34:13 +01:00
Thomas Schlichter
e6719d7718 remove superfluous semicolon from multi-line macros in oai_asn1.h 2024-07-15 10:46:05 +02:00
Robert Schmidt
e8a083767a Merge branch 'integration_2024_w28' into 'develop'
Integration: `2024.w28`

See merge request oai/openairinterface5g!2856

* !2847 UE setting wrong frequency in 5G rfsimulator SA test
* !2850 NR UE MAC DCI 00 BWP handling
* !2852 \[E2 agent\] Move UE RRC_CONNECTED state signaling
* !2851 Minor code cleanup and fixes
* !2842 UE assertion for msg1_SubcarrierSpacing in RA
* !2831 PUSCH power control state
* !2838 NR UE UL FAPI PDU length fix
* !2723 add initial NTN support for NR UE
* !2764 Adding 7.2 containerfiles and docker-compose
* !2827 Increase RX_DATA.indication PDU Length to 32 bits
2024-07-15 06:00:37 +00:00
Robert Schmidt
4cd82e7c47 Fix array size orror in parent commit
Correct the array by taking out a verification entry in the verification
array that led to runtime error

  Assertion (numparams == (sizeof(cmdline_CheckParams)/sizeof(*(cmdline_CheckParams)))) failed!
  In get_common_options() /home/richie/openairinterface5g/executables/softmodem-common.c:109
  Error in arrays size (41!=42)
2024-07-13 20:15:18 +02:00
Robert Schmidt
1a2ae185c5 Merge remote-tracking branch 'origin/Fix_RX_DATA_PDUSize' into integration_2024_w28 2024-07-13 14:15:08 +02:00
Robert Schmidt
38284919b3 Merge remote-tracking branch 'origin/initial_NR_UE_NTN_support' into integration_2024_w28 2024-07-13 14:15:00 +02:00
Robert Schmidt
62cb46fe24 Merge remote-tracking branch 'origin/fhi-container' into integration_2024_w28 2024-07-13 14:14:31 +02:00
Raphael Defosseux
9beb1323e4 chore(ci): adding fhi Ubuntu/UBI build and docker-hub push to CI pipeline
Signed-off-by: Raphael Defosseux <raphael.defosseux@eurecom.fr>
2024-07-13 14:12:01 +02:00
arora
fe866405e7 Update the build strategy documentation
- adding information related to 7.2 images
- correcting typos and syntax
2024-07-13 14:12:01 +02:00
arora
5524b2c706 Update Openshift README to describe Openshift build 2024-07-13 14:12:01 +02:00
arora
e9b5d84eb4 Add docker compose files for deploying 7.2
- Add docker-compose.yml
- Write additional documentation
2024-07-13 14:12:01 +02:00
arora
29542595eb Add manifests for fhi72 build on openshift
Co-authored-by: Raphael Defosseux <raphael.defosseux@eurecom.fr>
2024-07-13 14:12:01 +02:00
arora
ccddddc64e Add 7.2 container dockerfiles and update existing images
- Add dedicated target docker files for 7.2, both RHEL and Ubuntu
- in existing dockerfiles, update to also build E2 SMs
- for UBI images, only the entitlements are necessary, the rest can be
  omitted (it is superfluous)

Signed-off-by: arora <sagar.arora@eurecom.fr>
Co-authored-by: Raphael Defosseux <raphael.defosseux@eurecom.fr>
2024-07-13 14:12:01 +02:00
Thomas Schlichter
394431a594 remove nrqtscope 2024-07-13 11:22:36 +02:00
Rúben Soares Silva
f58765d023 Update sdu_lenP to uint32_t in get_mac_len
Add check in lcid_crnti_lookahead to ensure subtraction to pdu_len doesn't cause an underflow
2024-07-12 13:33:15 +01:00
Jaroslava Fiedlerova
ec5fdfca5f Merge remote-tracking branch 'origin/NR_UE_fapi_pdu_length_fix' into integration_2024_w28 2024-07-12 13:04:21 +02:00
Jaroslava Fiedlerova
2d163fc747 Merge remote-tracking branch 'origin/pusch-power-control-state' into integration_2024_w28 2024-07-12 13:04:00 +02:00
Jaroslava Fiedlerova
23ed53da41 Merge remote-tracking branch 'origin/NR_UE_L839_PRACH_assertion' into integration_2024_w28 2024-07-12 12:28:27 +02:00
Raphael Defosseux
ae2a79e566 chore(ci): preparing move of all logs to cmake_targets/log folder on the python executor workspace
Signed-off-by: Raphael Defosseux <raphael.defosseux@eurecom.fr>
2024-07-12 11:47:32 +02:00
Jaroslava Fiedlerova
9dabdde3e8 Merge remote-tracking branch 'origin/test' into integration_2024_w28 2024-07-12 10:56:14 +02:00
Jaroslava Fiedlerova
0753615c85 Merge remote-tracking branch 'origin/rrc-state-fix-e2' into integration_2024_w28 2024-07-12 10:39:52 +02:00
Jaroslava Fiedlerova
9c0614d72e Merge remote-tracking branch 'origin/NR_UE_DCI_00_BWP' into integration_2024_w28 2024-07-12 10:30:58 +02:00
Jaroslava Fiedlerova
580b1a84f1 Merge remote-tracking branch 'origin/CI_wrong_freq_RFsim_test' into integration_2024_w28 2024-07-12 10:30:01 +02:00
Rúben Soares Silva
22ba6b751d Update sdu_lenP to uint32_t in lcid_crnti_lookahead and nr_process_mac_pdu 2024-07-11 16:47:39 +01:00
Rúben Soares Silva
be9b976023 Update references of sdu_lenP to uint32_t in _nr_rx_sdu 2024-07-11 16:47:38 +01:00
Rúben Soares Silva
04e6828c62 Change functions using RX_DATA.indication PDU_Length to expect 32 bits 2024-07-11 16:46:53 +01:00
Bartosz Podrygajlo
373b7d9e37 Reset NR UE PUSCH power control state if alpha or p0 is modified by gNB 2024-07-11 16:06:47 +02:00
Bartosz Podrygajlo
04c8f73616 Fix a bug where PUSCH max TX power was not dependant on number of PUSCH RBs or qm. 2024-07-11 15:03:54 +02:00
Bartosz Podrygajlo
cd8f076979 PUSCH power control state 2024-07-11 15:03:45 +02:00
Thomas Schlichter
359880fa73 rfsimulator: use ceil() to calculate the integer number of chan_offset samples from the prop_delay_ms
The actual propagation delay should not be smaller than the one specified.
A too short propagation delay might result in too early reception of Msg1, and with that in a mis-detection of the RAPID.
2024-07-11 14:48:52 +02:00
Thomas Schlichter
9dc0dc5ffe NR UE: improve PSS detection by reducing the detection step size from 8 to 4
Until commit d74b2bd19f, the PSS detection step size was 4, anyways.
The PSS detection step size is a compromise between detection duration and accuracy.
The most accurate detection step size would be 1, but this would lead to even longer initial sync time.
2024-07-11 14:43:13 +02:00
Thomas Schlichter
4ddb2d3bac add section with NR UE NTN example to doc/RUNMODEM.md 2024-07-11 13:33:30 +02:00
Thomas Schlichter
1e47311259 NR UE: use sr_ProhibitTimer_v1700 if present 2024-07-11 13:33:30 +02:00
Thomas Schlichter
75efcf49b9 NR UE: add NTN specific parameter ta-Common and use it for initial timing advance, RA_contention_resolution_timer and RA_window_cnt
The value for this parameter can be set via UE command line parameter `--ntn-ta-common` in milliseconds.
2024-07-11 13:33:30 +02:00
Raphael Defosseux
e1885f65d8 chore(ci): aligning LogCollecteNB call with BuildId option
Signed-off-by: Raphael Defosseux <raphael.defosseux@eurecom.fr>
2024-07-11 12:08:02 +02:00
francescomani
83c59b05e9 code cleanup and small fixes 2024-07-11 11:25:22 +02:00
Teodora
676ba4355c RRC_CONNECTED state signaling for E2 moved
- E2SM UE ID requires guami -> therefore RRC_CONNECTED state signaling
    to RIC is now done after receiving Initial Context Setup Request
from AMF, which contains the guami info
2024-07-10 16:06:58 +02:00
Thomas Schlichter
021f97cf10 NR UE: increase DURATION_RX_TO_TX by cellSpecificKoffset_r17 2024-07-10 15:56:05 +02:00
francescomani
910d37dd7a handling BWP for DCI 00 reception depending on SS type according to the standard 2024-07-10 15:08:32 +02:00
Thomas Schlichter
26175c5413 NR UE: add NTN specific parameter cellSpecificKoffset_r17 and use it for UL scheduling
According to the RRC specification, cellSpecificKoffset is:
Scheduling offset used for the timing relationships that are modified for NTN (see TS 38.213 [13]).
The unit of the field K_offset is number of slots for a given subcarrier spacing of 15 kHz.
If the field is absent UE assumes value 0

This parameter `cellSpecificKoffset_r17` can be set via UE command line parameter `--ntn-koffset`.
2024-07-10 14:42:42 +02:00
francescomani
6475c79453 this avoids member access within null pointer error seen in RFsim CI tests sometimes 2024-07-10 10:40:19 +02:00
Robert Schmidt
fefdac733d Merge branch 'integration_2024_w27' into 'develop'
Integration: `2024.w27`

See merge request oai/openairinterface5g!2839

* !2781 Fix several ASN.1 message related memory leaks in NR
* !2790 docker compose override files for testing with locally modified executables.
* !2835 Demote logs for NR band and duplex spacing
* !2822 security in re-establishment
* !2834 Fix CN tutorial SD value
* !2843 Delete assertion for PLMN in RRCSetupComplete
* !2771 NR UE PDSCH-CSI overlap
* !2721 T2 card: LDPC encoder/decoder TB processing
* !2828 Bugfix to TX_DATA.request PDU_Length computation, change input parameter to uint32_t
* !2841 Reduce number of LOG prints in NR UE log
* !2844 phy-test mode ULSCH schdeuler hotfix
* !2765 Fix issues blocking multiple UE in one process
* !2826 NR gNB ULSCH fixes
* !2845 Another phy-test ULSCH fix (missing TDA assignment)
* !2840 chore(build): removing dependency to libatlas3
2024-07-10 05:41:07 +00:00
Robert Schmidt
fb1e6ee740 Merge remote-tracking branch 'origin/build-no-atlas-dependency' into integration_2024_w27 2024-07-09 17:43:08 +02:00
francescomani
b14a783e86 fix for wrong frequency in 5g_rfsimulator SA test 2024-07-09 15:37:06 +02:00
Robert Schmidt
9a320a16a5 Asan: disable ODR violation detection on UE in F1 RFsim CI test 2024-07-09 12:08:52 +02:00
Robert Schmidt
4fb936d767 Merge remote-tracking branch 'origin/another_phytest_ulsch_fix' into integration_2024_w27 2024-07-09 12:08:16 +02:00
Robert Schmidt
73e3178b88 Merge remote-tracking branch 'origin/NR_gNB_ULSCH_fixes' into integration_2024_w27 2024-07-09 12:07:58 +02:00
Robert Schmidt
78b48a1e59 Merge remote-tracking branch 'origin/multiple-nr-ues' into integration_2024_w27 2024-07-09 12:07:30 +02:00
francescomani
89757758f4 missing TDA assignment in sched_ctrl for ULScH in phy-test mode 2024-07-09 10:04:09 +02:00
Robert Schmidt
148db50990 Merge remote-tracking branch 'origin/phytest_ulsch_hotfix' into integration_2024_w27 2024-07-09 07:54:50 +02:00
Robert Schmidt
4fc164953b Merge remote-tracking branch 'origin/nr-ue-reduce-logs' into integration_2024_w27 2024-07-09 07:54:33 +02:00
Robert Schmidt
fc8ed209a2 Merge remote-tracking branch 'origin/bugfix_compute_PDU_Length' into integration_2024_w27 2024-07-09 07:54:21 +02:00
Robert Schmidt
9f86e33ec2 Merge remote-tracking branch 'origin/t2-offload-mr4.1' into integration_2024_w27 2024-07-09 07:54:08 +02:00
Robert Schmidt
9c72b29f3b Merge remote-tracking branch 'origin/NR_handling_CSI_overlapping_with_PDSCH' into integration_2024_w27 2024-07-09 07:53:49 +02:00
Robert Schmidt
fcc5be01c3 Asan: disable ODR violation detection on DU in F1 RFsim CI test
address sanitizer fails with this error upon starting the DU:

  ==7==ERROR: AddressSanitizer: odr-violation (0x7f8ed2594a00):
  [1] size=4 'log_mem_write_side' /oai-ran/common/utils/LOG/log.c:78:14
  [2] size=4 'log_mem_write_side' /oai-ran/common/utils/LOG/log.c:78:14
These globals were registered at these points:
  [1]:
    #0 0x7f8ed5092658 in __asan_register_globals ../../../../src/libsanitizer/asan/asan_globals.cpp:341
    #1 0x7f8ed570d47d in call_init elf/dl-init.c:70

  [2]:
    #0 0x7f8ed5092658 in __asan_register_globals ../../../../src/libsanitizer/asan/asan_globals.cpp:341
    #1 0x7f8ed3fe3eba in call_init ../csu/libc-start.c:145
    #2 0x7f8ed3fe3eba in __libc_start_main_impl ../csu/libc-start.c:379

  ==7==HINT: if you don't care about these errors you may set ASAN_OPTIONS=detect_odr_violation=0
  SUMMARY: AddressSanitizer: odr-violation: global 'log_mem_write_side' at /oai-ran/common/utils/LOG/log.c:78:14

So we do as suggested and disable ODR violations to make the test pass.
A proper solution would be to link this function only once.
2024-07-09 07:51:24 +02:00
francescomani
f226879d3c fix ULSCH sched_frame bug in phytest mode 2024-07-08 18:36:37 +02:00
Rúben Soares Silva
d795c72990 Change compute_PDU_Length input parameter to uint32_t.
The total_length parameter in compute_PDU_Length being uint16_t causes
the passed value to be possibly truncated, which can cause the
PDU_Length to be incorrectly calculated.
This change prevents that truncation, since it now matches the size
of the values passed into the function where it is being called.
2024-07-08 15:26:00 +01:00
Robert Schmidt
94581840a0 Merge remote-tracking branch 'origin/plmn-rrcsetupcomplete-fix' into integration_2024_w27 2024-07-08 16:20:36 +02:00
Teodora
df9e5ccdd2 Fix selectedPLMNId from RRCSetupComplete
- r_amf->plmn_Identity was interpreted incorrectly, therefore remove it
- selected_plmn_identity selects one of the list of PLMNs; at the
  moment, OAI supports only 1 PLMN ID; print a warning if it is
  different, and proceed with index 0

More information in issue #801
2024-07-08 15:54:41 +02:00
Raphael Defosseux
343673b0ea chore(build): last 2 references to atlas
Signed-off-by: Raphael Defosseux <raphael.defosseux@eurecom.fr>
2024-07-08 12:31:19 +02:00
Raphael Defosseux
680c1a6b20 chore(build): no need for atlas reference in RHEL9/RockyLinux9 images
Signed-off-by: Raphael Defosseux <raphael.defosseux@eurecom.fr>
2024-07-08 12:30:48 +02:00
francescomani
ff0007cd94 tentative fix for wrong handling of ulsch decode failure 2024-07-08 11:46:43 +02:00
francescomani
bfb6e407f2 schedule msg3 retransmission for no signal scenario 2024-07-08 11:46:32 +02:00
Jaroslava Fiedlerova
e6b7195122 Update T2 doc 2024-07-08 09:30:58 +02:00
Robert Schmidt
cf497215cd Merge remote-tracking branch 'origin/fix_cn_tutorial_sd_value' into integration_2024_w27 2024-07-06 08:33:16 +02:00
Robert Schmidt
8b9891f28e Merge remote-tracking branch 'origin/bugfix-security-reestablishment-gnb' into integration_2024_w27 2024-07-06 08:33:07 +02:00
francescomani
5f754729cf improve assertion for msg1_SubcarrierSpacing in UE init RA 2024-07-05 17:00:56 +02:00
Bartosz Podrygajlo
6ce94be807 Use mac->frame_type instead of calcualting frame_type on the fly in nr_get_Pcmax 2024-07-05 16:04:35 +02:00
Raphael Defosseux
b8012a9855 chore(build): no need for atlas reference in Ubuntu images
Signed-off-by: Raphael Defosseux <raphael.defosseux@eurecom.fr>
2024-07-05 16:03:52 +02:00
luis_pereira87
2e3ee6f57d Change UE static IP (use_local_subscription_info: no) network address blocks for a 'Private-Use' range.
Address block 12.1.0.0/16 is for public use, so we should not use it for the UEs (https://www.iana.org/assignments/iana-ipv4-special-registry/iana-ipv4-special-registry.xhtml)
2024-07-05 12:49:15 +01:00
Stefan Spettel
1b9bc4f6d6 Update file oai_db.sql 2024-07-05 12:49:15 +01:00
Cedric Roux
0480b69c75 minor: typo 2024-07-05 12:38:19 +02:00
Cedric Roux
5467351935 cleanup: reduce number of parameters to pdcp's set_security()
Also adapt callers. In particular nr_pdcp_reestablishment()
2024-07-05 12:38:19 +02:00
Cedric Roux
2db259984f handle security in re-establishment 2024-07-05 12:38:19 +02:00
Cedric Roux
93f595828d cleanup nr_pdcp_config_set_security()
- make it work for SRB or DRB
- adapt callers of this function
- cleanup key derivation: the User Plane keys are generated at some places
  but are not used, remove the generation
2024-07-05 12:38:19 +02:00
Robert Schmidt
7f63a7024d Merge remote-tracking branch 'origin/demote-logs-simpler-code-band' into integration_2024_w27 2024-07-05 09:01:31 +02:00
Robert Schmidt
4fb3cfaf6a Merge remote-tracking branch 'origin/docker-local-overrides' into integration_2024_w27 2024-07-05 09:01:25 +02:00
francescomani
11855a0bc1 increase UL pdu length to uint32 in similarity to what done on the gnb 2024-07-04 16:45:30 +02:00
francescomani
e5900e0757 replacing assertions with LOG_E in UL locking mechanism 2024-07-04 13:51:34 +02:00
Robert Schmidt
141577c88b Refactor code and make shorter through ternary operator 2024-07-03 12:11:28 +02:00
Robert Schmidt
279bd1794a Demote logs for NR band and duplex spacing
Demote logs to debug: they don't provide that much information, and show
periodically in the UE. They are not useful.
2024-07-03 12:10:19 +02:00
Bartosz Podrygajlo
f325d02d33 Fix several ASN.1 message related memory leaks in NR 2024-07-03 07:29:02 +02:00
Guido Casati
514537e63e Fix images and docs links in E1AP documentation 2024-07-03 01:00:53 +02:00
Robert Schmidt
7026763286 Merge branch 'integration_2024_w26b' into 'develop'
Integration: `2024.w26` (part 2)

See merge request oai/openairinterface5g!2823

* !2794 Power control changes
* !2816 Fix test asan errors
* !2820 fix(T): some missing dependencies on T
* !2714 FAPI P5 Refactoring and unitary test creation
* !2819 Prevent unnecessary assertions for invalid DCI at NR UE
* !2825 Do not extract CSI report if PUCCH format 2 CRC check fails in polar decoder
* !2805 GUAMI decoding and storing in RRC UE context fixed
2024-07-02 12:38:22 +00:00
Robert Schmidt
27ac298515 Merge remote-tracking branch 'origin/guami-fix' into integration_2024_w26b 2024-07-01 23:11:12 +02:00
Robert Schmidt
52fcd348a0 Merge remote-tracking branch 'origin/Hotfix_PUCCH2_CRC_fail' into integration_2024_w26b 2024-07-01 20:43:45 +02:00
Robert Schmidt
9a45ecf1f9 Merge remote-tracking branch 'origin/NR_UE_prevent_unnecessary_assertions' into integration_2024_w26b 2024-07-01 20:43:35 +02:00
Robert Schmidt
e72d50bfd6 Merge remote-tracking branch 'origin/nFAPI_P5_Common' into integration_2024_w26b 2024-07-01 20:42:49 +02:00
Bartosz Podrygajlo
3c5ddf9469 Lift RLC restriction to 1 UE / process 2024-07-01 17:13:31 +02:00
Bartosz Podrygajlo
bcfe3a6733 Initialize number of NR UEs equal to --num-ues parameter 2024-07-01 17:13:05 +02:00
Bartosz Podrygajlo
d5a4272177 Add parameter --num-ues to NR UE 2024-07-01 17:11:27 +02:00
Bartosz Podrygajlo
83f66f2ade Replace 0 with module id for NR UE
Add UE id to several LOG macros
2024-07-01 17:10:39 +02:00
luis_pereira87
2c1f32b6e6 Do not extract CSI report if PUCCH format 2 CRC check fails in polar decoder
This fix prevents the scheduler to process a wrong CSI feedback message, for example, it avoids the scheduler to compute a wrong MCS from CQI or a wrong RI from CQI
2024-07-01 10:34:32 +01:00
Teodora
0a603a1000 Correctly store GUAMI in gNB_RRC_UE_t 2024-06-29 17:46:23 +02:00
francescomani
2dcfabb6de avoid TDA index assertion by rejecting the DCI with invalid parameter 2024-06-28 18:37:18 +02:00
francescomani
b8a86fecfd fix for regressions in prach scheduling functions at MAC UE in presence of multiple SSBs 2024-06-28 18:17:40 +02:00
francescomani
bf69e25676 build common DMRS and CSI overlapping bitmap outside of the RBs and REs loops 2024-06-28 12:21:44 +02:00
Jaroslava Fiedlerova
fb0d2714c6 Replace dynamic mem allocation by static for p_outDec in decode_offload 2024-06-28 11:35:18 +02:00
francescomani
f5c7fc3b11 rate-match around overlapping CSI-RS resources in PDSCH reception 2024-06-28 10:02:29 +02:00
francescomani
21744d883a code improvement and formatting 2024-06-28 10:02:29 +02:00
francescomani
f30b42d877 improvements for slot fep at UE when receiving CSI and PDSCH 2024-06-28 10:02:29 +02:00
francescomani
15191452f3 UE MAC configuration of CSIRS for PDSCH rate matching 2024-06-28 10:02:29 +02:00
Robert Schmidt
541ef60c89 Merge remote-tracking branch 'origin/hot-fix-T-dependencies' into integration_2024_w26b 2024-06-28 09:35:06 +02:00
Robert Schmidt
073812ca0c Merge remote-tracking branch 'origin/fix-test-asan-errors' into integration_2024_w26b 2024-06-28 09:34:57 +02:00
Robert Schmidt
7264f9e052 Merge remote-tracking branch 'origin/nr-ue-pusch-power-control' into integration_2024_w26b 2024-06-28 09:34:46 +02:00
Bartosz Podrygajlo
2ae138d7c0 docker compose override files for testing with locally modified executables. 2024-06-27 18:45:59 +02:00
Robert Schmidt
7a86e36ca3 Build unit tests with address sanitizer 2024-06-27 18:38:49 +02:00
Bartosz Podrygajlo
0e6b0f3e7a Fix memory leak in rlc_test_5 and rlc_test_6 2024-06-27 18:38:36 +02:00
Bartosz Podrygajlo
9724ff0329 Fix memory leaks and heap buffer overflow in test_thread-pool. 2024-06-27 18:35:43 +02:00
Jaroslava Fiedlerova
432fee1a6e Configure T2 EAL Parameters via Command Line
- Introduced command line and configuration options to set up PCI address, CPU cores used by DPDK, and DPDK file prefix for T2 offload.
- Made the dpdk_dev parameter (for setting the PCI address of the T2) mandatory.
- Configure dpdk_dev in the CI test cases.
2024-06-27 14:53:17 +02:00
Jaroslava Fiedlerova
fe0d70e8f3 Replace bbdev TEST_ASSERTs by OAI macro AssertFatal()
- Replaced bbdev TEST_ASSERTs with the OAI macro AssertFatal() to harmonize error handling.
- Removed unused functions and macros from nrLDPC_offload.h.
2024-06-27 14:47:32 +02:00
Jaroslava Fiedlerova
6bec8779c6 Enhance T2 Offload for gNB and UE
- Reworked nrLDPC_decoder_offload.c to process all segments in a TB with a single call to LDPCdecoder() or LDPCencoder().
- Perform CRC checks on the T2.
- Modified nr_ulsch_decoding (gNB decoder) to:
  - Count processed segments.
  - Properly perform CRC checks.
- Created a constant NR_LDPC_MAX_NUM_CB to define the maximum number of codeblocks.
- Conditional library loading:
  - On gNB: Load ldpc_t2 library if offload is enabled using the --ldpc-offload-enable flag.
  - On UE: Load both ldpc_t2 and ldpc libraries since only encoder offload is supported.
- General cleanup of nrLDPC_decoder_offload.c for improved readability and maintainability.
- Modified the structure of LDPC encoder/decoder/offload parameters:
  - Introduced a structure for code block (CB) related parameters.
  - Removed parameter E from the encoder and offload parameter structures for clarity.
  - Replaced E with perCB->E_cb in the UE encoder code.
2024-06-27 14:40:41 +02:00
Raphael Defosseux
0f76ac5868 fix(T): some missing dependencies on T
Signed-off-by: Raphael Defosseux <raphael.defosseux@eurecom.fr>
2024-06-27 12:44:43 +02:00
francescomani
caa45af197 making aperiodic SRS feedback time dependent on what set in config at gNB (to avoid UE assertion) 2024-06-27 11:16:16 +02:00
francescomani
273018ea48 returning instead of asserting for invalid K2 in aperiodic CSI 2024-06-27 11:13:42 +02:00
Robert Schmidt
5af81bbc9d Merge branch 'integration_2024_w26' into 'develop'
Integration: `2024.w26`

See merge request oai/openairinterface5g!2815

* !2750 Add Ubuntu 24.04 to/retire Ubuntu 18.04 from supported distributions, use Ubuntu 22 for CI container images
* !2793 Option '-O' in phy simulators to provide a configuration file
* !2797 Increase TX_DATA.request TB buffer size, fix compute_PDU_Length
* !2814 Update documentation and FEATURE SET
* !2720 Remove thread-pool Makefile
* remove extra log
2024-06-26 14:02:52 +00:00
Robert Schmidt
d1e6b9507c Revert log level change on HARQ occasion
This reverts a change in commit
ccba7c875d. There is no real reason to
show this warning (the gNB will work just fine, simply not schedule
since no free HARQ) and it makes users unsure.
2024-06-26 14:43:05 +02:00
Robert Schmidt
ca8babd7b6 Merge remote-tracking branch 'origin/remove-threadpool-makefile' into integration_2024_w26 2024-06-26 13:01:33 +02:00
Robert Schmidt
aa47716a27 Merge remote-tracking branch 'origin/doc-updates' into integration_2024_w26 2024-06-26 12:51:59 +02:00
Robert Schmidt
8035cad75a Merge remote-tracking branch 'origin/Fix_Aerial_TBSize' into integration_2024_w26 2024-06-26 12:51:52 +02:00
Robert Schmidt
3b69bc278a Merge remote-tracking branch 'origin/fix_physim_configmodule_O' into integration_2024_w26 2024-06-26 12:51:44 +02:00
Robert Schmidt
6c3675905e Merge remote-tracking branch 'origin/support-ubuntu-24.04' into integration_2024_w26 2024-06-26 12:51:24 +02:00
Bartosz Podrygajlo
b1f7cc9025 Add unit testcase for thread-pool.
Extract thread-pool into a separate CMake library.
Extract utils into a separate CMake library.
2024-06-26 10:17:25 +02:00
Bartosz Podrygajlo
deacf439a4 CMakeLists for common/utils/LOG 2024-06-26 10:17:15 +02:00
Bartosz Podrygajlo
d6f425adc6 Remove unused directory ALG_DS 2024-06-26 10:13:00 +02:00
Bartosz Podrygajlo
28489a29ba Remove references to unused library OML 2024-06-26 10:12:28 +02:00
Bartosz Podrygajlo
8ea2e77ab2 PUSCH power control without PUSCH power control state 2024-06-26 10:08:33 +02:00
Robert Schmidt
760aee6d29 Correct link in build instructions 2024-06-26 09:18:18 +02:00
Robert Schmidt
ca54d75f3e README.md: update folder structure info 2024-06-26 09:18:18 +02:00
Robert Schmidt
9e694c228e Stream line information on how to get sources
- come straight to point: how to clone (don't talk about git config)
- refer to contributing documentation where necessary instead of
  repeating information
2024-06-26 09:18:18 +02:00
Robert Schmidt
6ba76d6ac1 Update FEATURE_SET
- CellGroupConfig is handled through DU (hence MAC)
- mention number of DUs/CU-UPs handled per CU-CP
- mention number of UEs handled
- take out BWPs, as we don't support it properly
- typos
2024-06-25 18:50:35 +02:00
Bartosz Podrygajlo
d41a6e0524 Remove hardcode for minimum TX power 2024-06-25 18:11:26 +02:00
Bartosz Podrygajlo
d8572d5569 Fixed MPR application conditions.
Fixed delta MPR.
Fixed an error in PUCCH PC_MAX calculation.
2024-06-25 18:11:17 +02:00
Robert Schmidt
ee57ae6598 doc/cross-compile.md: update some text, compile with ninja 2024-06-25 17:02:03 +02:00
Robert Schmidt
199f8c21cb Update cross-compilation builder to Ubuntu 22
Update instructions and CI for cross-compilation on Ubuntu 22.
Note that for the dockerfile, we use egrep -L which has changed and does
not exit with code 0 on no match. Instead, use -vqz to invert return
code (0 if nothing found, otherwise 1).
2024-06-25 17:02:03 +02:00
Raphael Defosseux
70719c3b8f fix(test): using older version of iperf2 for lte feMBMS RF-sim test
iperf2 2.0.13, used in Ubuntu 20, does not need a "back channel"; we can
therefore use it in feMBMS (which does a broadcast, without back
channel). Ubuntu 22 comes with 2.1.5, which seems to require a back
channel, or at least, we cannot use it reliably in feMBMS. Hence,
downgrade to older iperf2 version.

Signed-off-by: Raphael Defosseux <raphael.defosseux@eurecom.fr>
2024-06-25 17:02:03 +02:00
Robert Schmidt
94497435e7 Upgrade CI images to Ubuntu 22
This updates all images in the CI to Ubuntu 22. It also updates
corresponding documentation. Remove python(2) from the image, as it is
not needed. Update documentation.

It seems that the gcc coming in Ubuntu 22 does not like
stack-protector-strong, so remove it as well.

Since we compile Flexric, which does not support Ubuntu 22's default
gcc-11 (it hits a compile bug), switch to gcc-12 manually.

Since we update the compiler, we also need to be careful to use the right
address sanitizer version (which is bundled with the compiler version).
To avoid a reinstallation of the wrong asan version in target images, we
modify Ubuntu 22 targets to copy libasan from the base image. This is necessary
since we use update-alternative in the base image, but we don't want to
install compilers in the target images to use update-alternatives to
install the right asan version... This should be undone when switching
to Ubuntu 24 in the future, as it will have a newer default gcc version,
such that we don't need to update the compile in the first place.

Upgrade libpython in lteUE for U22 upgrade to make it compatible with
UHD.
2024-06-25 17:02:03 +02:00
Robert Schmidt
b6f156cf4a Switch to branch that resolves flexric warnings
A number of warnings appear when compiling flexric with gcc-12, which we
use in the next commit. Those have been fixed upstream. Switch to the
updated version to avoid warnings.
2024-06-25 17:02:03 +02:00
Robert Schmidt
0abe8b6493 Fixup: we are now at fedora 40, update link 2024-06-25 17:02:03 +02:00
Robert Schmidt
8ddc49e5e8 CBLAS_TRANSPOSE is a typedef'd enum
It seems libatlas-base-dev provided an `enum CBLAS_TRANSPOSE`, but we
don't install it anymore. Now, in Ubuntu, there is only a typedef'd
version in cblas.h; for RHEL(-derivatives), the same typedef'd version
is in cblas/cblas.h.
2024-06-25 17:02:02 +02:00
Robert Schmidt
4ac6e1c83d Update build_oai help 2024-06-25 17:02:02 +02:00
Robert Schmidt
53ff69ed04 Bump required cmake version to v3.16
Debian 11: cmake 3.18
Fedora 40: cmake 3.29
RHEL 9: installs cmake3, which is typically very recent, likely 3.29
Ubuntu 20: cmake 3.16
2024-06-25 17:02:02 +02:00
Robert Schmidt
473e7207db Remove Ubuntu 18.04 from supported distributions
Ubuntu 18.04 is now in "Extended Security Maintenance", but otherwise
gets no updates. Remove it from supported distributions (regarding
installing packages); users can of course still use it.

Users are encouraged to upgrade to Ubuntu 20+.
2024-06-25 17:02:02 +02:00
Robert Schmidt
3b0f4479c4 Add Ubuntu 24.04 to supported distributions
Apart from the obvious change of adding ubuntu24.04 to supported
distributions, we need to remove liblapacke-dev as it is incompatible
with libatlas3-base. Installing both aborts with:

   The following packages have unmet dependencies:
   liblapacke : Breaks: libatlas3-base (< 3.10.3-14) but 3.10.3-13ubuntu1 is to be installed

It seems that we don't need it though, as liblapacke-dev installs the
right atlas library as a dependency.
2024-06-25 17:02:02 +02:00
Rúben Soares Silva
8159abdcd3 Change TX_DATA.request PDU_Length and TLV length parameters to 32 bit in related pack/unpack procedures.
Fix small issue noted when packing tlv value with tag 1 in which it would pack length*4 bytes, now calculated how many "segments" of 32 bits it needs to pack, same logic for unpacking tag value 1
2024-06-25 13:50:53 +01:00
Rúben Soares Silva
4033606fff Increase TX_DATA.request TB buffer size to be allocated in the stack with 2MB, fix compute_PDU_Length to not truncate value and fix packing procedure to use buffer size as the upper limit instead of hardcoded value 2024-06-25 13:50:53 +01:00
Rúben Soares Silva
6fc8eb0fee Change parameter type of pack_dci_payload and unpack_dci_payload to avoid -Wstringop-overflow warning.
Change declaration of unpack_buf in dci_inversion_test to not require calloc
2024-06-25 11:53:41 +01:00
Rúben Soares da Silva
d35dbe6377 Fix packing/unpacking procedures for DCI payload with inversion
Add unitary test for DCI payload pack/unpack with random length/data
2024-06-25 11:53:41 +01:00
Rúben Soares da Silva
df1cb77000 Remove dependency to NFAPI_LIB from nr_fapi_p5 library after having moved the functions related to all P5 messages 2024-06-25 11:53:41 +01:00
Rúben Soares da Silva
32bbd64a97 Move functions for packing/unpacking ERROR.indication
Add unitary test for ERROR.indication ( test pack/unpack, free, copy and compare )
2024-06-25 11:53:41 +01:00
Rúben Soares da Silva
c95c12e874 Add utility functions related to ERROR.indication 2024-06-25 11:53:41 +01:00
Rúben Soares da Silva
1d6dc56797 Move functions for packing/unpacking STOP.indication
Add unitary test for STOP.indication ( test pack/unpack, free, copy and compare )
2024-06-25 11:53:41 +01:00
Rúben Soares da Silva
97afd62522 Add utility functions related to STOP.indication 2024-06-25 11:53:41 +01:00
Rúben Soares da Silva
9623f49a2e Move functions for packing/unpacking STOP.request
Add unitary test for STOP.request ( test pack/unpack, free, copy and compare )
2024-06-25 11:53:41 +01:00
Rúben Soares da Silva
c7d2a108be Add utility functions related to STOP.request 2024-06-25 11:53:41 +01:00
Rúben Soares da Silva
7307bd4ead Move functions for packing/unpacking START.response
Add unitary test for START.response ( test pack/unpack, free, copy and compare )
2024-06-25 11:53:41 +01:00
Rúben Soares da Silva
2bdc9de0af Fix packing/unpacking procedures for START.response
Add utility functions related to START.response
2024-06-25 11:53:41 +01:00
Rúben Soares da Silva
2c676865dc Move functions for packing/unpacking START.request
Add unitary test for START.request ( test pack/unpack, free, copy and compare )
2024-06-25 11:53:41 +01:00
Rúben Soares da Silva
442097e69a Add utility functions related to START.request 2024-06-25 11:53:41 +01:00
Rúben Soares da Silva
7e440ae3a9 Move functions for packing/unpacking CONFIG.response
Add unitary test for CONFIG.response ( test pack/unpack, free, copy and compare )
2024-06-25 11:53:41 +01:00
Rúben Soares da Silva
52aff43e2d Fix packing/unpacking procedures for CONFIG.response
Add utility functions related to CONFIG.response
2024-06-25 11:53:41 +01:00
Rúben Soares da Silva
23a2f63830 Move functions for packing/unpacking CONFIG.request
Add unitary test for CONFIG.request ( test pack/unpack, free, copy and compare )
2024-06-25 11:53:41 +01:00
Rúben Soares da Silva
4602feea3b Fix packing/unpacking procedures for CONFIG.request
Add utility functions related to CONFIG.request
2024-06-25 11:53:41 +01:00
Rúben Soares da Silva
79bde47b57 Move functions for packing/unpacking PARAM.response
Add unitary test for PARAM.response ( test pack/unpack, free, copy and compare )
2024-06-25 11:53:41 +01:00
Rúben Soares Silva
34ea6c7a90 Fix packing/unpacking procedures for PARAM.response
Added missing support for packing/unpacking tag 0x001C (supportedMaxModulationOrderDl)

Now properly handles tag 0x0005 (NumConfigTLVsToReport) and subsequent TLVs that come after this value ( Table 3-9 SCF 222.10.02 )
2024-06-25 11:53:41 +01:00
Rúben Soares Silva
61a3125d24 Add utility functions related to PARAM.response 2024-06-25 11:53:41 +01:00
Rúben Soares Silva
88bbb5f520 Fix typo in NFAPI_NR_PARAM_TLV_MAX_PDSCH_S_YBS_PER_SLOT_TAG define 2024-06-25 11:53:41 +01:00
Rúben Soares da Silva
2a482e7f49 Move functions for packing/unpacking PARAM.request
Add unitary test for PARAM.request ( test pack/unpack, free, copy and compare )
2024-06-25 11:53:41 +01:00
Rúben Soares Silva
e19b71409f Add utility functions related to PARAM.request 2024-06-25 11:53:41 +01:00
Rúben Soares da Silva
5ef1217acc Add nr_fapi_p5_utils.c/.h to nr_fapi_p5 library, with the objective of defining functions to compare, properly free and copy P5 FAPI message 2024-06-25 11:53:41 +01:00
Rúben Soares Silva
da9fe96efc Move general FAPI P5 message pack procedure from fapi_vnf_p5 into FAPI P5 library.
Implement FAPI P5 message unpack, as well as message length check function procedure in FAPI P5 library.
Update check_nr_unpack_length in nfapi_p5.c to reference FAPI P5 message length check function.
2024-06-25 11:53:38 +01:00
Robert Schmidt
707aab3af1 Merge branch 'integration_2024_w25' into 'develop'
Integration: `2024.w25`

See merge request oai/openairinterface5g!2811

* !2795 NR UE NL assertion
* !2802 Fix regression in ue-scan-carrier option
* !2806 Minor fixes to wireshark documentation
* !2807 Add assertion for known segfault during teardown of gNB
* !2809 Inversion in flags name
* !2697 SIDELINK PSBCH: MAC->PHY cfg, Scheduler + supporting functions, enable system testing & scope
* !2808 NR UE DLSCH MCS table selection improvements
2024-06-25 10:02:24 +00:00
Romain Beurdouche
327b9a8b70 fix(phy_simulators): enable the use of option -O to pass a configuration file to configmodule in phy simulators 2024-06-25 10:38:09 +02:00
Romain Beurdouche
a476e18120 fix(phy_simulators): replace option -Operf by option -Tperf in LTE ulsim and dlsim 2024-06-25 10:35:10 +02:00
Romain Beurdouche
edcd0019d2 fix(nr_pbchsim): replace option -O by option -c 2024-06-25 10:29:29 +02:00
Robert Schmidt
88ca38287f Merge remote-tracking branch 'origin/NR_UE_DLSCH_MCS_table_improvements' into integration_2024_w25 2024-06-25 08:20:12 +02:00
Robert Schmidt
1b989c4d15 Merge remote-tracking branch 'origin/NR_PSBCH_MERGE3' into integration_2024_w25 2024-06-25 08:20:01 +02:00
Rúben Soares da Silva
350746f4f6 Creation of empty FAPI P5 library in preparation for separation of related functions
Note: nr_fapi_p5 dependence in NFAPI_USER_LIB will be removed in a later commit
2024-06-24 15:06:59 +01:00
Rúben Soares Silva
23d792a0bd Expose packing/unpacking functions for (n)FAPI P5 messages for FAPI library creation
Will be reused from other files in later commits.
Added packing/unpacking procedures for STOP.indication and ERROR.indication.
Separate a packing function for STOP.request for use in the NR FAPI library.
2024-06-24 15:06:57 +01:00
Rúben Soares Silva
489300f82d Change STOP.request struct name to follow naming convention of struct for the other messages
Add struct representing ERROR.indication message
2024-06-24 14:55:14 +01:00
Rúben Soares Silva
40783ea351 Fix START.response Message ID, from Table 3-5 of SCF222.10.04.
Apply clang-format to enumeration.
2024-06-24 14:55:10 +01:00
Rúben Soares da Silva
e8bb01579d aerial_lib: include header instead of source file
Expose needed (n)FAPI procedures to aerial_lib ( both P5 and P7 ) via a
header file.
Move (n)FAPI P7 packing/unpacking function interface into separate header file
Include needed headers in aerial_lib
2024-06-24 14:52:40 +01:00
Rúben Soares da Silva
4384ea2b59 Properly add compile definitions related to aerial_lib into targets that depend on it ( ENABLE_AERIAL )
Add target_compile_definitions to L2_NR library in order to propagate #define in gnb_config.c
2024-06-24 14:51:48 +01:00
Rúben Soares Silva
612e6bbc3d Apply clang-format to nfapi.c 2024-06-24 14:51:45 +01:00
Robert Schmidt
e61b977878 Create nfapi_common library with packing/unpacking functions common to (n)FAPI for 4G+5G 2024-06-24 14:15:26 +01:00
Robert Schmidt
2908cd51ea Use add_subdirectory() for nfapi/ subdirectory 2024-06-24 14:15:26 +01:00
Rúben Soares da Silva
4d4eb6c8cf Move nFAPI functions that are used by both NR and LTE into nfapi.c
Co-authored-by: Robert Schmidt <robert.schmidt@openairinterface.org>
2024-06-24 14:15:23 +01:00
Raghavendra Dinavahi
798ceeeef2 SL PSBCH: MAC->PHY cfg, PSBCH scheduler + supporting functions + enable system testing & scope
- Phy config update and Sidelink frame parameters initialisation
	- PSBCH scheduler to trigger TX PSBCH/RX PSBCH actions
	- Sidelink indication with rx ind to trigger send SL-MIB to MAC
	- Enable Scope for PSBCH use -d or --dqt
	- Enable system testing of PSBCH for example using RFSIMULATOR:

		- UE1 is a SYNCRONISATION SOURCE UE which transmits PSBCH

		  started using command -
		  sudo ./nr-uesoftmodem --sl-mode 2 --sync-ref 4 --rfsim --rfsimulator.serveraddr server

		- UE2 syncs onto UE1 during sidelink search, gets the timing and continues to receive PSBCH

		  started using command -
		  sudo ./nr-uesoftmodem --sl-mode 2 --rfsim --rfsimulator.serveraddr 127.0.0.1

		- In the default use case 2 Sidelink SSBs sent over 16 frames.

		- In case SL-SSB configuration needs to be changed use -O option in the above command like

		-O ../../../targets/PROJECTS/NR-SIDELINK/CONF/sidelink_preconfig_1txpool.conf
2024-06-21 09:40:16 +02:00
Raphael Defosseux
d2f8276d14 Merge remote-tracking branch 'origin/dump-debug-inverted' into integration_2024_w25 2024-06-21 09:31:49 +02:00
Raphael Defosseux
a7273f0da0 Merge remote-tracking branch 'origin/assert-before-segfault-ssb-scs' into integration_2024_w25 2024-06-21 09:31:38 +02:00
Raphael Defosseux
2de46b9e79 Merge remote-tracking branch 'origin/update-doc-wireshark' into integration_2024_w25 2024-06-21 09:31:22 +02:00
Raphael Defosseux
4639458f22 Merge remote-tracking branch 'origin/fix-regression-ue-scan' into integration_2024_w25 2024-06-21 09:31:04 +02:00
Raphael Defosseux
100d3b3acd Merge remote-tracking branch 'origin/NR_UE_handle_layer_assertion' into integration_2024_w25 2024-06-21 09:30:37 +02:00
Raphael Defosseux
69962ef9ab Merge branch 'integration_2024_w24' into 'develop'
Integration: `2024.w24`

See merge request oai/openairinterface5g!2801

* !2789 CI: Increase iperf/iperf3 command timeout
* !2762 improve nrUE NAS security: accept NEA1,NEA2,NIA1,NIA2
* !2791 fix regressions for large physical cell id values
* !2792 Add support for MIMO 2x2 with USRP B210 at 20 MHz BW and 3/4 sampling rate
* !2748 Small UE fixes
* !2745 Add google test testcases for nr_get_Pcmax
* !2785 Update FHI 7.2 interface, test bandwidths, fix integer overflows
2024-06-20 05:16:28 +00:00
Raphael Defosseux
bbc82731f7 Merge remote-tracking branch 'origin/update-fhi7.2' into integration_2024_w24 2024-06-19 13:55:52 +02:00
Laurent THOMAS
9aaa7f100a Inversion in flags name 2024-06-19 13:49:00 +02:00
Bartosz Podrygajlo
4c658cdd50 Add assertion for known segfault during teardown of gNB. 2024-06-18 13:25:59 +02:00
Guido Casati
dbc84d91fc Minor fixes to wireshark documentation
* the goal is to make the documentation more procedural and
  descriptive and easier to understand
* added missing info in RLC-NR about reassembling of AM frames
2024-06-17 18:31:25 +02:00
Teodora
b09d241151 GUAMI decoding fixed
- GUAMI is received from INITIAL UE CONTEXT SETUP REQUEST
  - using BIT STRING instead of OCTET STRING, as per spec
2024-06-17 14:20:53 +02:00
Jaroslava Fiedlerova
2b28b735c2 Merge remote-tracking branch 'origin/nr-pcmax-googletest' into integration_2024_w24 2024-06-14 15:32:01 +02:00
Jaroslava Fiedlerova
5b52752a30 Merge remote-tracking branch 'origin/NR_UE_DAI_hotfix' into integration_2024_w24 2024-06-14 12:45:55 +02:00
Jaroslava Fiedlerova
4aa9ffc9e6 Merge remote-tracking branch 'origin/MIMO_2x2_B210' into integration_2024_w24 2024-06-14 12:45:29 +02:00
francescomani
ad3427107a full procedure to select MCS table for DLSCH at MAC UE 2024-06-13 19:43:30 +02:00
Sakthivel Velumani
dd4eb9f8bc Fix regression in ue-scan-carrier option 2024-06-13 13:31:33 -04:00
Jaroslava Fiedlerova
5b64f685e4 Merge remote-tracking branch 'origin/fix-regressions-large-physicalCellId' into integration_2024_w24 2024-06-13 17:27:55 +02:00
Jaroslava Fiedlerova
64f55693e3 Merge remote-tracking branch 'origin/nrue-nas-security' into integration_2024_w24 2024-06-13 13:50:17 +02:00
Jaroslava Fiedlerova
4d51b344a1 Merge remote-tracking branch 'origin/ci-increase-iperf-timeout' into integration_2024_w24 2024-06-13 13:49:47 +02:00
Bartosz Podrygajlo
b20561c451 Add libgtest-dev package to unittest image 2024-06-13 10:15:55 +02:00
Bartosz Podrygajlo
fadd3d0083 Add unit test build log to artifacts 2024-06-13 10:15:45 +02:00
Bartosz Podrygajlo
44dc8f8daa Add google test testcases for nr_get_Pcmax. 2024-06-13 10:15:32 +02:00
Bartosz Podrygajlo
4a36f7dd7b Extract nr_common and nr_phy_common libs. Also add unit tests for nr_common 2024-06-13 10:14:59 +02:00
Bartosz Podrygajlo
9c913fa040 Introduce googletest library
The library will be either found in the system or downloaded via FetchContent.
2024-06-13 10:13:28 +02:00
Jaroslava Fiedlerova
6312587621 Fix integer overflow
Avoid UBSan error:
  openair1/PHY/NR_TRANSPORT/nr_ulsch_demodulation.c:1524:41: runtime error: signed integer overflow: 737285888 + 1459370880 cannot be represented in type 'int'
2024-06-12 10:36:58 +02:00
Jaroslava Fiedlerova
4980be04f3 Fix integer overflow
Avoid UBSan error:
  openair1/SCHED_NR/phy_procedures_nr_gNB.c:867:37: runtime error: signed integer overflow: 1744750952 + 412859840 cannot be represented in type 'int'
2024-06-12 10:34:45 +02:00
Jaroslava Fiedlerova
b17354b74f Fix integer overflow
Avoid UBSan error:
  openair1/PHY/NR_ESTIMATION/nr_measurements_gNB.c:246:18: runtime error: signed integer overflow: 1457321472 + 922889664 cannot be represented in type 'int'
2024-06-12 10:29:50 +02:00
Jaroslava Fiedlerova
516b91fc90 Fix integer overflow
Avoid UBSan error:
  openair1/SCHED_NR/phy_procedures_nr_gNB.c:869:43: runtime error: signed integer overflow: 1546663455 + 1635930955 cannot be represented in type 'int'
2024-06-12 10:25:50 +02:00
francescomani
54cc2e0bb5 preventing UE assertion on number of layers = 0 by rejecting TB earlier if that happens 2024-06-12 08:45:37 +02:00
Jaroslava Fiedlerova
9fab212441 Update ORAN_FHI7.2 doc - add tx_amp_backoff_dB info 2024-06-11 14:23:10 +02:00
Raphael Defosseux
297ef9d139 Merge branch 'ci-bump-up-nvidia-cubb' into 'develop'
chore(ci): bumping up nvidia-aerial to 24-1

See merge request oai/openairinterface5g!2780
2024-06-11 07:40:28 +00:00
Reem Bahsoun
6cfb5b7ace prevents thread from being pinned to core 8, to avoid L2 L1 overlap 2024-06-10 14:31:35 +02:00
Laurent THOMAS
37e6e7e944 add test physical cell id in 5G range 2024-06-10 10:51:16 +02:00
Laurent THOMAS
45d4cec2a6 fix regressions for large physical cell id values 2024-06-10 10:51:08 +02:00
luis_pereira87
ce0f48d2b2 Add support for MIMO 2x2 with USRP B210 at 20 MHz BW and 3/4 sampling rate
Tested with B210 and Quectel RM500Q-GL
2024-06-07 15:16:20 +01:00
Raphael Defosseux
a5bf6c7812 chore(ci): addressing reviewer comments: cleanup network conf
Signed-off-by: Raphael Defosseux <raphael.defosseux@eurecom.fr>
2024-06-07 15:18:30 +02:00
Raphael Defosseux
3405bcf926 chore(doc): updating the TestBench list after aerial1 migration
Signed-off-by: Raphael Defosseux <raphael.defosseux@eurecom.fr>
2024-06-07 09:47:11 +02:00
Raphael Defosseux
99643acf2e Original Author: Nick Hedberg <nhedberg@nvidia.com>
Updates to default config for 24.1 and current best performance
2024-06-07 09:09:08 +02:00
Robert Schmidt
9055fabe9b Merge branch 'integration_2024_w23' into 'develop'
Integration: `2024.w23`

See merge request oai/openairinterface5g!2788

* !2510 NR UE MAC UCI on PUSCH and aperiodic CSI reporting
* !2597 LTTng logger (CTF)
* !2751 synch the USRP time accross devices using the host clock
* !2775 Remove some global variables
* !2779 remove rb_mask_ul from permanent storage for stack local usage
* !2782 USRP: add a T trace to record the RX IQ data on antenna 0
* !2783 build_oai: fix bad options' names
* !2753 Pucch power control
2024-06-06 12:55:36 +00:00
Raphael Defosseux
e120f54f30 fix(aerial): configuration modifications to migrate CI run to aerial1
* IP address of VNF shall be aerial1's one
 * scripts within cubb container shall be run with sudo now

Signed-off-by: Raphael Defosseux <raphael.defosseux@eurecom.fr>
2024-06-06 14:39:22 +02:00
Jaroslava Fiedlerova
e60f82ccc2 Increase iperf test timeout
In some testcases, especially when iperf test duration is short (10s),
client does not report on time and report collection is interrupted.
This commit increase timeout for iperf/iperf3 commands.
2024-06-06 14:22:06 +02:00
Robert Schmidt
3c5edab8f5 Fix memory leak: free NotifiedFIFO_elt 2024-06-06 12:37:07 +02:00
Robert Schmidt
f4659b2b0c Fix integer overflow
Avoid UBSan error:
  openair1/PHY/NR_ESTIMATION/nr_measurements_gNB.c:183:22: runtime error: signed integer overflow: 2122747784 + 27403601 cannot be represented in type 'int'
2024-06-06 12:36:59 +02:00
Robert Schmidt
0199d861b7 Fix integer overflow
avoid UBsan error:
  openair1/PHY/NR_TRANSPORT/pucch_rx.c:266:21: runtime error: signed integer overflow: 2113190528 + 117251752 cannot be represented in type 'int'
2024-06-06 12:36:50 +02:00
Robert Schmidt
321c475176 Fix integer overflow
avoid UBsan error:
  openair1/PHY/NR_TRANSPORT/nr_ulsch_demodulation.c:459:77: runtime error: signed integer overflo w: 2009540296 + 668087372 cannot be represented in type 'int'
2024-06-06 12:36:40 +02:00
Robert Schmidt
a9718835d4 7.2 FH: auto-compute FFT size 2024-06-06 12:36:40 +02:00
Robert Schmidt
00b62ab6c0 Merge remote-tracking branch 'origin/pucch-power-control' into integration_2024_w23 2024-06-06 08:53:06 +02:00
Robert Schmidt
517effa586 Merge remote-tracking branch 'origin/fix-build-oai' into integration_2024_w23 2024-06-06 08:40:48 +02:00
Robert Schmidt
18125459dc Merge remote-tracking branch 'origin/t-usrp-rx-ant0' into integration_2024_w23 2024-06-06 08:40:42 +02:00
Robert Schmidt
86bd6de7dd Merge remote-tracking branch 'origin/rb_mask_ul-on-stack' into integration_2024_w23 2024-06-06 08:40:36 +02:00
Robert Schmidt
4e4a59b5bc Merge remote-tracking branch 'origin/remove-globals-nas' into integration_2024_w23 2024-06-06 08:40:30 +02:00
Robert Schmidt
d58bedaed1 Merge remote-tracking branch 'origin/multi_usrp_frame_sync' into integration_2024_w23 2024-06-06 08:39:49 +02:00
Robert Schmidt
9a4e9a2adc Merge remote-tracking branch 'origin/lttng-basic' into integration_2024_w23 2024-06-06 08:39:42 +02:00
Anurag Asokan
582e8302c6 LTTng logger (CTF)
This commit introduces LTTng logging mechanism which is an open source
tracing tool.

URL: https://lttng.org/
2024-06-06 07:23:17 +02:00
francescomani
f94941b5e6 fix for UCI on PUSCH fapi PDU configuration in case of only HARQ bits 2024-06-05 19:37:15 +02:00
francescomani
165afbd5b5 improve handling of CSI-MeasConfig setup 2024-06-05 19:37:10 +02:00
francescomani
f5f9983173 fix in setup and release of aperiodicTriggerStateList 2024-06-05 19:21:29 +02:00
francescomani
12e1045d2a fix for MAC template with CSI report config 2024-06-05 19:21:28 +02:00
francescomani
c985a794c7 fix UE uci on PUSCH config 2024-06-05 19:15:09 +02:00
francescomani
33b19935ff uci on pusch at MAC UE 2024-06-05 19:15:04 +02:00
francescomani
830b8a208a handling reception of CSI command for aperiodic CSI reporting 2024-06-05 19:07:31 +02:00
Robert Schmidt
489824fdcf Enforce gcc/g++-11 when building 7.2 FHI through xran 2024-06-05 17:01:35 +02:00
Robert Schmidt
98e9129d69 Allocate sufficient buffers for 1x1 config
xran's xran_bm_init() uses rte_pktmbuf_pool_create() to allocate DPDK
buffers. For a 1x1 configuration, the number of buffers might be too
small, and rte_pktmbuf_pool_create() might fail. This commit ensures
that we increase the number of buffers to have enough even in a 1x1
configuration. This works by chosing the next power of two, which is
recommended as per DPDK documentation.

Closes-Bug: #750
2024-06-05 17:01:35 +02:00
Robert Schmidt
f7917abb28 Print xran headers version used during compilation 2024-06-05 17:01:35 +02:00
Robert Schmidt
cd5822e927 Update FHI 7.2 ORAN patch: unaligned access, detect/handle PRACH packets 2024-06-05 17:01:35 +02:00
Raphael Defosseux
39518b19d5 fix(build): 24-1 code does not require patching anymore
Signed-off-by: Raphael Defosseux <raphael.defosseux@eurecom.fr>
2024-06-05 15:23:08 +02:00
Cedric Roux
ae60dede8e build_oai: fix bad options' names 2024-06-05 15:15:35 +02:00
Cedric Roux
1dfb30b857 USRP: add a T trace to record the RX IQ data on antenna 0 2024-06-05 15:11:59 +02:00
Raphael Defosseux
a29d1eed7f chore(ci): bumping up nvidia-aerial to 24-1
Signed-off-by: Raphael Defosseux <raphael.defosseux@eurecom.fr>
2024-06-05 14:40:20 +02:00
Florian Kaltenberger
6d5a0ab454 synch the USRP time accross devices using the host clock 2024-06-05 09:52:26 +02:00
Bartosz Podrygajlo
7aec889cf6 Remove some global variables 2024-06-05 09:42:56 +02:00
Laurent THOMAS
f23c91cc5a remove rb_mask_ul from permanent storage for stack local usage 2024-06-04 19:08:47 +02:00
Bartosz Podrygajlo
760e0aaae4 PUCCH power control state. 2024-06-04 12:04:12 +02:00
Bartosz Podrygajlo
a1902a03f8 Accumulate delta PUCCH for each PUCCH occasion. 2024-06-04 12:04:11 +02:00
Bartosz Podrygajlo
6d09f0542b Fix a bug in DELTA_TF calculation for PUCCH format 1. 2024-06-04 12:04:11 +02:00
Robert Schmidt
8abf975faf Merge branch 'integration_2024_w22' into 'develop'
Integration: `2024.w22`

See merge request oai/openairinterface5g!2778

* !2707 NR UE Cell Search
* !2722 add initial NTN support for gNB
* !2694 Handle and use Linux capabilities, logging improvements, cleanup, documentation
* !2569 Neighbour Configuration - Measurement Configuration
2024-06-04 09:28:07 +00:00
Robert Schmidt
7db4732ce1 Merge remote-tracking branch 'origin/N2_HO_Measurement_config' into integration_2024_w22 2024-06-04 09:29:42 +02:00
batuhan duyuler
c51b2a64fb Prepare Measurement Configuration according to neighbour measurement configuration
Neighbor configuration can be given by gNB.conf

get_MeasConfig function is extended as it will prepare A2 / A3 Report
Configs. Single Meas Obj is used for all.

rrc_gNB_process_MeasurementReport function is extended to process A2 /
A3 measurement events.  helper functions are written to fetch neighbour
cell informations from sequence containers.
(get_neighbour_cell_information, get_neighbour_config)
2024-06-04 07:54:00 +02:00
batuhan duyuler
cec6b8925a Preparation of Neighbour Configuration & Measurement Configuration | Parsing the configuration
- neighbour_config.conf file includes neighbour and measurement related parameters
Neighbour List:
 - nr_cellid: the identity of existing cell who has neighbour
 - neighbour_cell_configuration(list): includes the identity parameters
   of the neighbour cell such:
    - gNBID (incase of N2 Handover / to be identified from AMF)
    - nr_cell_id (target gNB needs to consider)
    - physical_cellId (needed for measurement reporting)
    - absoluteFrequencySSB (needed for measurement reporting)
    - subcarrierSpacing (needed for measurement reporting)
    - plmn / tracking area code (incase of N2 Handover / needed for AMF
      to identify / allow HO)

NR Measurement Configuration
 - Periodical
    - enable (default is 0, 1 enables the reporting)
    - includeBeamMeasurements, maxNrOfRS_IndexesToReport (configurable
      reporting parameters)
 - A2
    - enable (default is 0, 1 enables the reporting)
    - threshold , timeToTrigger (configurable reporting parameters)
 - A3
    - cell_id (the nr_cellid of neighbour cell. So this A3 parameters
      will be used for the neighbour
        - [-1] means default. so it can be applied to any neighbour if
          there is no specific config
        - Neighbour specific A3 Threshold can be used or default can be
          selected depending to the neighbour planning
        - The neighbour-config.conf specifies, apply default A3 for
          neighbours 3 and 4 | apply specific one for neighbour 2

    - offset, hysteresis, timeToTrigger (configurable reporting parameters)

the neighbour_config.conf can be included in the gNB.conf file. Example
is given: gnb.sa.band78.106prb.rfsim.neighbour.conf

A sequence array container is used for neighbour cell configuration. RRC
structure has this container.  A Measurement configuration structure is
defined. This structure has Periodical / A2 Event structures and also a
sequence container for A3 Event List.

These structures are filled during the initialization. While F1 Setup
Response is coming from DU to CU, the intra frequency / inter frequency
neighbour decision is given for the existing cell. Also new neighbours
could be added here if needed.
2024-06-04 07:54:00 +02:00
batuhan duyuler
e5afdcdd43 Move cell-value lookup functions (SSB ARFCN, ...) to rrc_gNB_du.c
The functions are needed in a later commit in both rrc_gNB_du.c and
rrc_gNB.c, so move to the rrc_gNB_du.c file concerned with DUs (cells).
2024-06-04 07:43:54 +02:00
Robert Schmidt
9465ae778b Merge remote-tracking branch 'origin/softmodem-caps' into integration_2024_w22 2024-06-03 21:37:35 +02:00
Robert Schmidt
092047984a Merge remote-tracking branch 'origin/initial_gNB_NTN_support' into integration_2024_w22 2024-06-03 21:36:00 +02:00
Robert Schmidt
5b53f4ee0f Merge remote-tracking branch 'origin/NR_UE_cell_search' into integration_2024_w22 2024-06-03 21:35:51 +02:00
Robert Schmidt
0077d219fb CI DeployObject: don't grep, just give service name
With the capabilities now given as part of this MR, it happens that when
checking the "docker compose config", the container_name might not be
close to the service name. Something like

  service:
    cap_drop:
      ...
    cap_add:
      ...
    container_name:

This is inconvenient, as the previous grep for the service name + 3
lines might not cover the service name. To circumvent this, give the
service name directly in "docker compose config". (no clue why it has
not been done like this from the start)
2024-06-03 17:01:48 +02:00
Robert Schmidt
a87df90504 Add documentation for physical simulators 2024-06-03 14:21:19 +02:00
Robert Schmidt
971ab65fe5 Physims don't need sudo 2024-06-03 14:21:19 +02:00
Robert Schmidt
13517cd6bc Write documentation on performance tuning and security 2024-06-03 14:21:19 +02:00
Robert Schmidt
0cc278f19b Use capabilities in Aerial-based docker-compose 2024-06-03 14:21:19 +02:00
Robert Schmidt
b4750d8d81 Use capabilities in AW2S-based docker compose 2024-06-03 14:21:19 +02:00
Robert Schmidt
9dd52c9d44 Use capabilities in B200-based docker-compose
- sa_b200_gnb
- sa_aw2s_gnb
- sa_e1_b200
- sa_f1_b200
- sa_sc_b200_gnb
- nsa_b200_gnb

By default, the container has no access to /dev. Mount all USB devices
into the container to ease usability: by default, USB devices are
mounted under /dev/bus/usb using the bus ID, which is different on every
system and might change on reboots or with (un-)plugging USB devices.
Hence, mount all USB; the process has not many capabilities anyway, and
thus might not do much harm.

A proper solution would be to write a udev rule to mount a device using
its vendor and product ID, and only mount the corresponding device into
the container.
2024-06-03 14:21:19 +02:00
Robert Schmidt
ffa5ba400a Use capabilities in N310-based docker compose
- SA 2x2 tests on 60 and 100 MHz
- N310-based OAI gNB + UE

Give SYS_NICE and IPC_LOCK for performance. On the UE side, give
NET_ADMIN (for interface bringup) and NET_RAW (for ping an TUN).
2024-06-03 14:21:19 +02:00
Robert Schmidt
9f8fad86ee Use capabilities in 5G RFsim docker-compose
- 5g rfsim fdd_phytest
- 5g rfsimulator
- 5g fdd rfsim
- 5g f1 rfsim
- 5g l2sim
- 5g rfsim 24prb
- 5g rfsim 2x2
- 5g rfsim accelleran
- 5g rfsim e1
- 5g rfsim fr2 32prb
- 5g rfsim u0
- Update doc

We give NET_ADMIN (for interface bringup) and NET_RAW (for ping).
IPC_LOCK and SYS_NICE are intentionally left out to verify the
softmodems run without.
2024-06-03 14:21:19 +02:00
Robert Schmidt
9b3ab10c20 Make failed TUN socket operation non-fatal
It might be desirable to run the UE without superuser rights. More
concretely, it might run without NET_ADMIN. In this case, various
corresponding operations on the TUN socket fd might fail. In this
commit,

- improve error reports to make them more clear
- do not automatically exit(1), but return from the function to ensure
  continuity of the softmodem
2024-06-03 14:00:49 +02:00
Robert Schmidt
8dc29be02f Remove unused set_priority()/set_thread_priority() 2024-06-03 14:00:49 +02:00
Robert Schmidt
973d13937d VNF: use threadCreate() to create P7 thread
Use common threadCreate() function to create P7 thread with high(er)
priority. Remove old calls to set_priority(), as this is already done
with threadCreate().
2024-06-03 14:00:49 +02:00
Robert Schmidt
811721bb72 PNF: use threadCreate() to create P7 thread
Use common threadCreate() function to create P7 thread with high(er)
priority. Remove old calls to set_priority(), as this is already done
with threadCreate().
2024-06-03 14:00:49 +02:00
Robert Schmidt
5ae7d6685a Aerial: use threadCreate() to create P7 thread
Use common threadCreate() function to create P7 thread with high(er)
priority. Remove old calls to set_priority(), as this is already done
with threadCreate().
2024-06-03 14:00:49 +02:00
Robert Schmidt
37f3f0b6a4 nr-uesoftmodem: don't set priority, check for SYS_NICE
The main thread of nr-uesoftmodem (executing main()) is mostly working;
it is thus not necessary to set high priority. Instead, the threads
created with threadCreate() will receive higher priority, if possible
(as determined by the availability of SYS_NICE capability).

To inform if SYS_NICE is not present, print a warning in main().
2024-06-03 14:00:49 +02:00
Robert Schmidt
66bf27bce9 threadCreate(): check for and handle missing SYS_NICE
SYS_NICE is a capability that allows a process to set thread affinity
and priority, among other things (see capabilities(7) for more info).

In this commit, add a function that allows to determine if the process
has this capability, and try to change the thread affinity and priority,
if requested. If the capability does not exist, the function will simply
not attempt to change the corresponding thread attributes.

To determine if the process has SYS_NICE, libcap can be used. However,
it might not be installed by default. To avoid requiring another
dependency, if we detect that libcap is not present, use a workaround by
try to set a real-time scheduling policy; if it's present, or can be
changed, we assume that the process has SYS_NICE (and clean up, if
relevant).

Simplify reading of capabilities
2024-06-03 14:00:41 +02:00
Robert Schmidt
6a12784872 RFsim: don't shell out to improve kernel socket buffer sizes, teach the user instead
A later commit in this series adds performance tuning tips, which
includes the call made in RFsim until this commit.
2024-06-03 14:00:41 +02:00
Robert Schmidt
105368a437 thread pool: don't print core, threadCreate() does that already 2024-06-03 14:00:41 +02:00
Robert Schmidt
6b37d183ce Remove set_latency_target(), add lock_memory_to_ram()
set_latency_target() attempts to set keep "low latency" by
- writing a specific latency to /dev/cpu_dma_latency
- setting manually the minimum CPU processor frequency to be the maximum

There is no functionality to undo this after stopping the softmodem(s),
and most users are probably not even aware that OAI does this. It is
generally preferable to set this beforehand using a governor or by
disabling sleep states (as outlined in the tutorial, and in a follow-up
commit in the performance tuning docs).

The previous mlockall() call, to lock memory to RAM, is retained in a
new function. There were additional mlockall() calls, which have been
replaced with lock_memory_to_ram(), where necessary.
2024-06-03 13:59:41 +02:00
Robert Schmidt
a25b209e7f Remove Check if fedora and inside kernel
It's completely unclear what this is supposed to do.
2024-06-03 12:37:33 +02:00
Robert Schmidt
7a8b2fe4a9 config module: print clear error when config file does not exist
Print a clear error if a config file does not exist (unclear previously,
when the user would get a confusing, unspecific, "file I/O error" on
line 0)

I tried to free the memory that had been allocated at that point, and
verified that using the address sanitizer. Nevertheless, the function
does too much, and is too complicated for refactoring.
2024-06-03 12:37:33 +02:00
Robert Schmidt
b9fd5a6f75 config module: make it less verbose 2024-06-03 12:37:33 +02:00
Robert Schmidt
006b68fa3f NR L1: demote log to info 2024-06-03 12:37:33 +02:00
Robert Schmidt
55728a98c1 RFsim: demote log level, remove useless log message 2024-06-03 12:37:33 +02:00
Robert Schmidt
bfd519953b ITTI: lower 'Starting itti queue' message to debug 2024-06-03 12:37:33 +02:00
Robert Schmidt
37421c3f92 BuildUnitTests: need to use ran-base:ci-temp if changes in ran-base
Use correct baseTag for Unit Tests build in execution:
- if build_helper or othe files changed, which would trigger rebuild of
  ran-base, use the corresponding ci-temp tag
- use that tag consistently afterwards
2024-06-03 12:37:33 +02:00
Thomas Schlichter
f7c2732899 add section with NTN example to doc/RUNMODEM.md 2024-06-03 11:54:55 +02:00
Thomas Schlichter
75f5215b22 add exemplary cellSpecificKoffset_r17, sr_ProhibitTimer_v1700, t300, t301 and t319 to conf files for 24 and 25 PRBs 2024-06-03 11:54:55 +02:00
Thomas Schlichter
f1938acbab gNB: make ue_TimersAndConstants configurable via conf file 2024-06-03 11:54:55 +02:00
Thomas Schlichter
90fa3d5534 gNB: make SR timers configurable in CONF file 2024-06-03 11:54:55 +02:00
Thomas Schlichter
4cdf4d61f3 gNB: add sr_ProhibitTimer_v1700 2024-06-03 11:54:55 +02:00
Thomas Schlichter
be41a4ea60 gNB: use 2 * K2 for contention_resolution_timer, as the timer starts with Msg2 transmission and ends with Msg4 ACK reception 2024-06-03 11:54:55 +02:00
Thomas Schlichter
0ce0282238 gNB: make checks for missed feedbacks more robust w.r.t. frame number warp-around in find_harq() 2024-06-03 11:54:55 +02:00
Thomas Schlichter
6b01cfb8e2 gNB: fix phytest scheduler in case no HARQ processes are available
In case no HARQ processes are available (because all are waiting for feedback), we skip scheduling...
2024-06-03 11:54:55 +02:00
Thomas Schlichter
8e4526e221 gNB: change TA update interval to 100 frames instead of 10
The RTT for GEO satellites is more than 500 ms.
And as the TA update interval must be greater than the RTT, we increase it to 1 second instead of 100 ms.
Should also do no harm for terrestrial networks.
2024-06-03 11:54:55 +02:00
Thomas Schlichter
ccba7c875d gNB: add NTN specific parameter cellSpecificKoffset_r17 and use it for UL scheduling
According to the RRC specification, cellSpecificKoffset is:
Scheduling offset used for the timing relationships that are modified for NTN (see TS 38.213 [13]).
The unit of the field K_offset is number of slots for a given subcarrier spacing of 15 kHz.
If the field is absent UE assumes value 0

This parameter `cellSpecificKoffset_r17` can be set in the gNB conf file, in the section `servingCellConfigCommon`
2024-06-03 11:54:55 +02:00
francescomani
7fc8fe2513 fixing mapped_ssb_idx (it was not containing SSB index anymore) 2024-06-03 10:53:27 +02:00
francescomani
a4bb7da1ce hotfix for cumulative DAI computation at UE 2024-06-02 17:02:55 +02:00
Robert Schmidt
76f06a9386 Correctly compute array size to prevent buffer overflow
Reviewed-By: Laurent THOMAS <laurent.thomas@open-cells.com>
2024-05-31 15:25:53 +02:00
Sakthivel Velumani
dac55975b5 Updated documentation 2024-05-30 10:20:55 -04:00
Sakthivel Velumani
155d24f9e4 Code cleanup
Remove old and unused code. Fix indentation.
2024-05-30 10:20:55 -04:00
Sakthivel Velumani
7c146154f5 Prevent compiler warning
A particular GCC version (v13?) used by CI machines potentially has a
bug that issues a mismatch bound warning on function array arguments.
This commit should prevent it from happening.
2024-05-30 10:20:55 -04:00
Sakthivel Velumani
ca93e68410 Use command line option for sell search
There is already a command line option called 'ue-scan-carrier' which
seemed to blindly look for SSB by changing the center frequency by
+/-100Hz if the previous attempt failed. This is probably copied from
LTE and is not suitable for NR. This commit uses this option to either
1. Perform initial sync on one GSCN if the SSB position if known
2. Or scan the all GSCN (if the SSB postion is unknown)

Also, the following is done for re-synchronization
1. Scan all GSCN when UE comes back from IDLE state
2. Scan one GSCN when UE does re-estabishment

Removed dependency of lte-softmodem.h in nr-softmodem.c.
CONFIG_HLP_UESCAN is declared also in lte-softmodem.h.
2024-05-30 10:20:55 -04:00
Sakthivel Velumani
26aa7c2e33 Suppressing PSS & SSS detection logs
Changed Info to Debug because the logs are too much if large number of
GSCN scans run concurrently. Print PSS correlation peak and average
power of detected cells.
2024-05-30 10:20:55 -04:00
Sakthivel Velumani
043da0c440 NR UE scan for SSB within current bandwidth
Till this commit, the UE gets the position of SSB in frequency from
command line and does the syncronization by locating the SSB in time. It
does this by generating a PSS time signal during initialization with the
SSB offset given via command line. Then PSS detection is done by
correlation.

In this commit, the UE computes a list of GSCN in the current NR band
that falls within the current bandwidth for the set center frequency.
For each GSCN in the list, the UE starts a thread and performs the
following:
1. Generate PSS time signal with SSB offset for current GSCN.
2. Detect PSS, SSS and decode PBCH (this step remains the same).
After all threads finishes, the results are collected.

For now, only the first detected PBCH is used to proceed further. So
this PBCH is indicated to MAC and UE exits initial sync.

Future work: The cell search can be standalone feature where the UE
could scan for SSB in the entire NR band. This would require changing
radio's frequency on the fly as the UE's bandwidth would not cover an
entire NR band. The cell detection can futher be imporved by looking
for SIB1 for each decoded PBCH.
2024-05-30 10:20:45 -04:00
Robert Schmidt
e5fc1ebde6 Merge branch 'integration_2024_w22' into 'develop'
Integration: `2024.w22` (Part 1)

See merge request oai/openairinterface5g!2773

* !2698 Handle division by 0 gracefully in average channel level calculation
* !2743 Demystifying 10log10(2^30) in signal energy calculations.
* !2767 NR UE imeisv fix
* !2768 Over-estimate short and long BSR for better latency and TCP throughput
* !2769 maxMIMOLayers parameter in configuration file
2024-05-30 12:55:03 +00:00
Robert Schmidt
bedcd5a1be Merge remote-tracking branch 'origin/maxMIMO-layers-parameter' into integration_2024_w22 2024-05-30 13:01:33 +02:00
Robert Schmidt
30e403f4a2 Merge remote-tracking branch 'origin/bsr-estim' into integration_2024_w22 2024-05-30 13:01:27 +02:00
Robert Schmidt
ba9d4afbe3 Merge remote-tracking branch 'origin/fix_oddeven_imeisv' into integration_2024_w22 2024-05-30 13:01:20 +02:00
Robert Schmidt
02ee2a9726 Merge remote-tracking branch 'origin/remove-rms-magic-number' into integration_2024_w22 2024-05-30 13:01:14 +02:00
Robert Schmidt
bbe8e16ca5 Merge remote-tracking branch 'origin/nr-ue-channel-level-assert-fix' into integration_2024_w22 2024-05-30 13:01:06 +02:00
Robert Schmidt
c7f1dcfb51 Hotfix: asn1c use working commit
hotfix: current vlm_master (5fa129cf3161da9ff2d67341e6277e818c0f5d6a)
breaks F1, NG, so use the one before
(940dd5fa9f3917913fd487b13dfddfacd0ded06e)
2024-05-30 09:36:01 +02:00
Robert Schmidt
7fe29041c2 SA E1 B200 gNB CI test: use host-mode 2024-05-30 09:16:45 +02:00
Robert Schmidt
7bfa8e78fd SA F1 B200 gNB CI test: use host-mode 2024-05-30 09:14:53 +02:00
Robert Schmidt
0ccd4ad000 SA SC-FDMA B200 gNB CI test: use host-mode 2024-05-30 09:14:53 +02:00
Robert Schmidt
9cf0640432 SA B200 gNB CI test: use host-mode 2024-05-30 09:14:53 +02:00
Robert Schmidt
e6f0f80c9f Over-estimate short and long BSR
38.321 6.1.3.1 says: "The size of the RLC headers and MAC subheaders are
not considered in the buffer size computation" [for BSR]. However, prior
to this commit, we take the size signaled of the BSR and schedule the UE
with that amount of data, making it impossible for the UE to transmit
all its data at once (because it is the size signaled + headers).

In this commit, over-estimate the buffer status size. As we cannot know
the exact number and size of headers, we simply use "BSR size + n", as
done in function overestim_bsr_index().
2024-05-30 08:07:37 +02:00
francescomani
95442d6075 adding a control to the maxMIMO_layers input and updating RUNMODEM.md 2024-05-29 15:26:28 +02:00
Guido Casati
8cf8a44e8e Handle division by 0 assert gracefully in average channel level calculation
* nb_re_pdsch is directly linked to nb_rb_pdsch, if the latter is 0 the
  former is also 0
* compute average channel level only when number of RE for PDSCH is not 0
  the average channel level will be set to 0 otherwise
* Added a log message to handle this special case, which is consequence
  of other issues in the RX chain
* with this commit, the inconsistency in the RX chain will be handled
  in later in nr_ue_pdsch_procedures with a demodulation failure

other minor changes:

* Improved clarity by using NR_NB_SC_PER_RB instead of hard-coded value 12 in nb of RBs calculation
* cleaned up unused variable and outdated comments
2024-05-29 15:11:37 +02:00
Raymond Knopp
a1d660d6df changed 7.2 configuration files for 2-layer 4x4 setting using all 4 TX
antennas.
2024-05-29 14:46:50 +02:00
Raymond Knopp
15488a18e3 added parameter to limit the maxMIMO-layers on DL (i.e. to 2 for 4x4) 2024-05-29 14:46:50 +02:00
francescomani
333946ed27 imeisv is 16 bits, the oddeven bit indicator should signal even (0) and not odd (1) 2024-05-29 09:44:51 +02:00
Bartosz Podrygajlo
4622d33e3b Demystifying 10log10(2^30) in signal energy calculations. 2024-05-28 16:12:36 +02:00
Cedric Roux
fc42a2a5f1 security EIA1: bugfix: memory alignment + read out of array
Compiling the nrUE with -fsanitize=undefined leads to a crash
because the function nas_stream_encrypt_eia1() accesses the data
as uint32_t but the data is not aligned.

Actually this function wants 64 bits (big-endian) of data, so let's
introduce a simple function to read a big-endian 64 bits value.
It may seem bad (unoptimized), but looking at the output of gcc
without -fsanitize=undefined this will be translated as just one
movbeq instruction (on the machine where I did the test), which is
actually less instructions than the previous version which was doing
too movbel plus orq.

Moreover, after the main loop we need to process the last remaining
bytes (so less than 8). The code was wrong, reading past the input
data (and also not caring about alignment). It may work, it may fail,
it depends on many things. But it's plain wrong. So this was replaced
for something better, simpler. No need for mask32bit() anymore, only
one call to U64() is needed.

And now -fsanitize=undefined is happy, so all is good.

We also restrict the input length to be multiple of 8 bits. I don't
think it's a problem. To be refined if I'm wrong. (I think RRC and
NAS messages are 8-bits aligned, so it shouldn't be a problem.)
2024-05-27 17:39:35 +02:00
Cedric Roux
a1c4c356bd nrUE NAS: check NAS COUNT UL
It should not be > 0xffffff.

Normally the core network would prevent this case from happening.
Plus to reach this value means to send a lot of NAS messages, which
is very doubtful in practice.

Anyway, it's better to deal with the case.

We exit if that happens. To be refined if needed (very doubtful).
2024-05-27 17:39:35 +02:00
Cedric Roux
4c248a433e nrUE NAS: bugfix: add sequence number to generateSecurityModeComplete
It was working because on initial connection, it is 0.
But it's probably a bad assumption.
2024-05-27 17:39:35 +02:00
Cedric Roux
0147bb2e08 nrUE NAS: add NEA1 and NIA1 in nrUE security capabilities 2024-05-27 17:39:35 +02:00
Cedric Roux
04027b9265 nrUE NAS: minor changes in get_allowed_nssai()
This function was very wrong, now it's just wrong.
(It does not sanitize the input properly. Some bad input may have
unexpected effects on the nrUE.)

It needs a serious rewrite.

I just wanted to "fix" it so that it processes correctly some
correct input data.
2024-05-27 17:39:35 +02:00
Cedric Roux
a100929067 nrUE NAS: accept some messages without integrity+ciphering
OAI core network is sending Deregistation Accept in clear, even
after security context activation.

The standards is not clear to me, so let's accept it.

To be removed if incorrect with respect to the standards.
(The core network will need to be fixed then.)
2024-05-27 17:39:35 +02:00
Cedric Roux
56abe6c118 nrUE NAS: deal with security for NAS_CONN_ESTABLI_CNF
This message is ciphered + integrity protected, let's decipher it
and integrity check it.
2024-05-27 17:39:35 +02:00
Cedric Roux
245f430ad9 nrUE NAS: apply ciphering to uplink messages
Before this commit, only integrity protection was applied.
This was working only if the NAS connection is using NEA0.
2024-05-27 17:39:35 +02:00
Cedric Roux
075f8330f6 nrUE NAS: implement downlink security processing
Maybe not totally ok (code has some comments). To be refined if needed.
2024-05-27 17:39:35 +02:00
Cedric Roux
4cc1bb5433 nrUE NAS: hotfix for get_msg_type()
The version before this commit is wrong, taking wrong byte for msg_type
in some cases.

I don't have much time to implement a proper NAS PDU parser, so let's go
with hardcoded values.

Some later work will be done to have a cleaner solution. As of now, it's
too much work.
2024-05-27 17:39:35 +02:00
Cedric Roux
6c42ea6293 nrUE NAS: don't hardcode sequence number, get value from NAS COUNT UL
as per standard (see 33.501 6.4.3.1, see 24.501 4.4.3)
2024-05-27 17:39:35 +02:00
Cedric Roux
ce771a17dc nrUE NAS: adapt code to use configured integrity algorithm 2024-05-27 17:39:35 +02:00
Cedric Roux
41037d57b5 nrUE NAS: handle SecurityModeCommand
Get the security algorithms from SecurityModeCommand.

Restructure the code a bit: add the function handle_security_mode_command()
and adapt the code to use it.

Derive also knas_enc (not used yet).

Do the derivation for knas_enc and knas_int only after reception
of SecurityModeCommand. We need the algorithms configured by core
network to derive those keys.
2024-05-27 17:39:35 +02:00
Cedric Roux
b615162630 nrUE NAS: there are actually two NAS COUNT, one for DL and one for UL 2024-05-27 17:39:35 +02:00
Cedric Roux
2e7b926827 nrUE NAS: remove mm_counter and sm_counter, replace with nas_count
Specs (24.501, 33.501) don't seem to mention mm_counter and sm_counter,
simply nas_count, let's use this.
2024-05-27 17:39:35 +02:00
Robert Schmidt
168b172f9a Merge branch 'integration_2024_w21c' into 'develop'
Integration: `2024.w21`

See merge request oai/openairinterface5g!2757

* !2733 Remove duplicated function to reverse N bits
* !2712 rfsimulator: add support to simulate a long propagation delay
* !2695 improve polar init and polar readability
* !2709 Fix cmdline configmodule in phy simulators
* !2756 remove some enb dependencies in NR files
* !2687 bug fix ue UL payload filling randomly done in retransmissions (pointer not set)
* !2543 power/PHR normalizations for deltaMCS power adaptation
* !2719 Refactor LC handling at MAC
* !2736 Fix debug for ongoing transactions
* !2747 Fix aerial memory leak
* !2761 Use timeout command to kill hanging iperf3
* !2752 fix-dci11-type0-bitmap-setting
* !2759 Fix invalid MSG2 HARQ feedback attempt and remove accumulated_delta_PUCCH field from UE FAPI IF
* !2740 bugfix/cleanup: remove uint8_t to encode size plus some cleanup
* !2760 fix 5G NR SA FDD configs for 24 and 25 PRBs
* !2520 Documentation on coding style, workflow, and review instructions
2024-05-27 13:45:59 +00:00
Robert Schmidt
60c052a95a Merge remote-tracking branch 'origin/code-style-review-instructions' into integration_2024_w21c 2024-05-27 12:18:56 +02:00
Robert Schmidt
1b9ba55843 Merge remote-tracking branch 'origin/fix_fdd_configs' into integration_2024_w21c 2024-05-27 12:18:32 +02:00
Robert Schmidt
1f6d4a6cfe Merge remote-tracking branch 'origin/hotfix-uint8_t-size' into integration_2024_w21c 2024-05-27 12:18:26 +02:00
Robert Schmidt
c202e9173f Merge remote-tracking branch 'origin/hotfix-fdbk-for-msg2-sib' into integration_2024_w21c 2024-05-27 12:18:13 +02:00
Robert Schmidt
c0b7ac9a7e Merge remote-tracking branch 'origin/fix-dci11-rb_bitmap-filling-bug' into integration_2024_w21c 2024-05-27 12:18:07 +02:00
Robert Schmidt
7ffc403098 Demote log to debug for Msg3 infeasibility
It can happen that in the current DL slot, we cannot send an allocation
for Msg3 in a later UL slot. Up to this commit, MAC printed a warning.
However, this is not really a warning, as it will likely work in the
next or a later slot. So demote this to debug.
2024-05-27 11:48:21 +02:00
Robert Schmidt
f261ce9124 OAIUE pipeline: Adjust sample timing advance to make test more stable 2024-05-27 10:24:29 +02:00
Cedric Roux
31274f6c64 bugfix/cleanup: remove uint8_t to encode size plus some cleanup
The starting point was the function do_NR_DLInformationTransfer() which
may deal with more than 256 bytes.

Then why not cleanup all the functions in the same file.
(And do a bit of formattting fixing while we're here.)

Then cleanup the callers of those functions.

Then, because of do_SIB23_NR() let's also cleanup in some
structures.

Not all the codebase was cleaned up, there surely remain some uint8_t
(and char/short/uint16_t) which are wrong.
2024-05-27 09:45:22 +02:00
Bartosz Podrygajlo
4a5d924375 Remove accumulated_delta_PUCCH from UE nfapi interface. 2024-05-27 09:22:42 +02:00
Bartosz Podrygajlo
3fd119ff29 Do not send PUCCH ACK on DLSCH that doesnt require it.
UE was attempting to send ACK on MSG2 - was caused by missing brackets in if statement.
2024-05-27 09:17:39 +02:00
Robert Schmidt
92b8453960 Merge remote-tracking branch 'origin/ci-kill-hanging-iperf3' into integration_2024_w21c 2024-05-25 12:35:35 +02:00
Robert Schmidt
bfc41d1038 Merge remote-tracking branch 'origin/Fix_Aerial_Memory_Leak' into integration_2024_w21c 2024-05-25 12:35:26 +02:00
Robert Schmidt
1127a9850b Merge remote-tracking branch 'origin/Fix_array_for_debug_ongoing_transactions' into integration_2024_w21c 2024-05-25 12:34:46 +02:00
Rúben Soares da Silva
dd93181951 Replace unneeded memcpy for sr_payload
Set appropriate length for csi payload calloc and memcpy, according to bit_len
2024-05-24 17:26:28 +01:00
Rúben Soares da Silva
d27d193339 Fix P5 messages memory leaks ( CONFIG.request / CONFIG.response ) 2024-05-24 17:26:16 +01:00
Robert Schmidt
e30552c23a Merge remote-tracking branch 'origin/refactor-lcid-gnb-mac' into integration_2024_w21c 2024-05-24 17:54:32 +02:00
Robert Schmidt
5686b2a26d Merge remote-tracking branch 'origin/phr_handling_for_develop' into integration_2024_w21c 2024-05-24 17:53:50 +02:00
Rúben Soares da Silva
f6a039f38b Fix memory leak related to UCI.indication and RACH.indication 2024-05-24 14:49:45 +01:00
Rúben Soares da Silva
48ed7fba0d Fix memory leak related to CRC.indication and RACH.indication 2024-05-24 14:49:45 +01:00
Rúben Soares da Silva
a516a632d4 Fix memory leak related to RX_DATA.indication message 2024-05-24 14:49:45 +01:00
Rúben Soares da Silva
8a8b38ae70 Fix memory leak related to SLOT.response message 2024-05-24 14:49:45 +01:00
Rúben Soares da Silva
b215a60a3b Fix memory leak related to fapi_phy_api_msg fapi_msg 2024-05-24 14:49:45 +01:00
Robert Schmidt
8d16ff8459 Use timeout command to kill hangling iperf3
In some pipelines, it happens that iperf3 is hanging on 100% CPU load.
In these cases, a simple TERM signal does not seem to be enough to kill
it; KILL is necessary.

While e.g., RemoteCmd's driver paramiko has a timeout command, the
documentation [1] is not really clear how it is trying to stop commands.
Since it effectively does not stop, we have to assume it is only sending
TERM.

To remedy this, use the timeout command to start iperf3. We use option
-v for diagnose timeouts on stderr, and send KILL after an additional 3
seconds (-k3) if TERM does not succeed. The timeout is sent to the same
duration as the overall iperf timeout.

[1] https://docs.paramiko.org/en/3.4/api/channel.html#paramiko.channel.Channel.settimeout
2024-05-24 14:20:04 +02:00
Thomas Schlichter
2bb632a7fe fix 5G NR SA FDD configs for 25 and 25 PRBs
make sure the SSB is offset by 4 PRBs from the BW start.
Therefore, the ARFCN for the SSB center must be offset by 14 PRB from the ARFCN for the BW start.
2024-05-24 13:21:38 +02:00
Thomas Schlichter
f969eddbe2 fix gNB to print correct --CO parameter for OAI UE in FDD case 2024-05-24 13:16:47 +02:00
Robert Schmidt
8820a57547 Merge remote-tracking branch 'origin/fix-ue-ul-retransmissions-payload-copy' into integration_2024_w21c 2024-05-24 11:53:16 +02:00
Robert Schmidt
c76a9d43f2 Merge remote-tracking branch 'origin/remove_some_enb_references_in_nr' into integration_2024_w21c 2024-05-24 11:50:17 +02:00
Robert Schmidt
d268378f2b Merge remote-tracking branch 'origin/fix_phy_simulators_configmodule' into integration_2024_w21c 2024-05-24 11:50:11 +02:00
Robert Schmidt
1465fed81c Merge remote-tracking branch 'origin/better-polar' into integration_2024_w21c 2024-05-24 11:50:04 +02:00
Robert Schmidt
12a1c8a820 Merge remote-tracking branch 'origin/rfsim_add_prop_delay' into integration_2024_w21c 2024-05-24 11:49:54 +02:00
Robert Schmidt
87a1ff5b37 Merge remote-tracking branch 'origin/fix_reverse_n_bits' into integration_2024_w21c 2024-05-24 11:49:13 +02:00
Robert Schmidt
98df398dc3 Remove empty/useless process_CellGroupConfig() 2024-05-24 11:42:50 +02:00
Robert Schmidt
d7ba96f4ee Add new RA as part of nr_mac_add_test_ue() and refactor
A to-be-added UE's RA is added through nr_mac_add_test_ue() (the name is
misleading, it is not a "test UE") through its CellGroupConfig. Using
the process_CellGroupConfig() is unfortunate, because it is not really
clear what part of the CellGroupConfig gets evaluated (it is certainly
not all). Move the code for adding a new RA directly in the user-add
function, and refactor this one.
2024-05-24 11:42:50 +02:00
Robert Schmidt
6c71775ea1 Sort LCs by priority
Introduce new LC configuration "priority", as specified in 38.321, and
use to sort LCs by priority. We set the priority of an SRB according to
38.331 Section 9.2.1, and for a DRB to be the minimum priority of the
QoS flows associated to this DRB.
2024-05-24 11:42:50 +02:00
Robert Schmidt
ee9570993d Add functions for LC add/release at MAC
Introduce new functions to add/release LCs without needing to go through
the intermediate CellGroupConfig. This harmonizes LC handling at the "DU
handler" to keep it consistent with RLC bearer handling.

These functions allow to group LC configuration handling, and we can
remove functions for setting NSSAIs and QoS by handling in one central
place (while adding LCs).

nr_mac_add_test_ue() is used by simulators and also in NSA mode to add a
new UE. Ideally, these users should also call the ue context setup
request handler to add a UE context; for the moment, respect the passed
list of LCs to add. Similarly, for do-ra, we require a dedicated
function to still parse the CellGroupConfig, so we keep that part of
functionality.

On reestablishment, since we do not process the CellGroupConfig from the
old UE, we need to add LCs for the new UE based on the onces from old
UE.
2024-05-24 11:42:45 +02:00
Robert Schmidt
7accbd9778 MAC: use seq_arr to group LC configuration
Use a common structure nr_lc_config_t to group LC configuration for one
logical channel. Use seq_arr for simple lookup, adding, removing of
elements without manual indexing logic.

This commit retains the previous logic of adding/releasing LCs through
the process_CellGroupConfig(), although we know while building the
CellGroupConfig if we add/release LCs. The next commit fixes this.
2024-05-24 11:35:15 +02:00
Robert Schmidt
850f26fc5c Move get_lcid_from_srbid/drbid() to central gNB MAC primitives
In later commits, we will call these functions from multiple places in
the scheduler, so move them to a central place.
2024-05-24 11:35:15 +02:00
Robert Schmidt
9e5c5497ab Avoid gigantic array
If we do not make this change, with the next commit, we get the
following error from gcc:

  openair2/E2AP/RAN_FUNCTION/O-RAN/ran_func_kpm.c:299:46: error: assignment of read-only location '*(arr_ue_id.ue_info_list + (sizetype)(arr_ue_id.sz * 2444864))'
  |         arr_ue_id.ue_info_list[arr_ue_id.sz] = *ue;
2024-05-24 11:35:15 +02:00
Robert Schmidt
6dfd7cdc71 rename find_if_arr -> find_if to avoid name clashes
In a later commit, we will use find_if in L2. In the case of building
with E2 agent, we link e2_agent which comes with its own implementation
of find_if_arr(), which results in a name clash. Rename the OAI
implementation, as nothing uses this, anyway.
2024-05-24 11:35:15 +02:00
Robert Schmidt
7cfd5a1f21 Remove outdated/useless comment 2024-05-24 11:35:15 +02:00
Robert Schmidt
ec326e856e Remove compute_ph_factor() dump parameter, make LOG_D 2024-05-24 09:25:45 +02:00
Raymond Knopp
e69e787ab0 testing use_deltaMCS=0 2024-05-24 09:25:45 +02:00
Raymond Knopp
70444f133a power control changes for deltaMCS mode and force_ul256qam_off
- addition of control of deltaMCS if enabled in configuration file.
- introduce separate parameter to disable 256QAM in UL
- put min_grant_prb configuration back in pf_ul() as default prb size.
2024-05-24 09:25:44 +02:00
Raymond Knopp
e3aff6c37b fix in nr_modulation.c: avoid fail for 64QAM and G < 192 bits
Adds a check for these short payloads and handle correctly
2024-05-24 09:25:44 +02:00
francescomani
e8ae696c8f remove some enb dependencies in NR files 2024-05-23 18:30:33 +02:00
Laurent THOMAS
b461fe5e6b fix-dci11-type0-bitmap-setting 2024-05-23 10:26:28 +02:00
Laurent THOMAS
00e883c563 remove a unused struct member 2024-05-23 08:46:12 +02:00
Laurent THOMAS
2f05261f6b reject packets of 0's 2024-05-23 08:41:01 +02:00
Laurent THOMAS
4bca825053 remove wrong trace when packet is not decoded 2024-05-23 08:03:12 +02:00
Laurent THOMAS
819427a6a0 bug fix ue UL payload filling randomly done in retransmissions (pointer
not set)
2024-05-23 08:03:12 +02:00
Robert Schmidt
e4a704ed61 Add high-level developer documentation on code style and contributing 2024-05-22 08:45:39 +02:00
Robert Schmidt
787f4431c3 doc/README.md: Correctly say what OpenShift documentation will give 2024-05-22 08:45:39 +02:00
Robert Schmidt
9ce9d79b33 doc/README.md: Link to legacy unmaintained files 2024-05-22 08:45:39 +02:00
Robert Schmidt
f251a41410 doc/README.md: rename section to radios 2024-05-22 08:45:31 +02:00
Robert Schmidt
e7596f9bd5 Clarify CONTRIBUTING.md and wrap text to 80 columns 2024-05-22 08:45:17 +02:00
luis_pereira87
db6710f853 Fix debug for ongoing transactions, it is limited to 3 but the maximum number of ongoing transactions can be 4 (NR_RRC_TRANSACTION_IDENTIFIER_NUMBER):
TS 36.331: RRC-TransactionIdentifier ::= INTEGER (0..3)
2024-05-16 12:36:21 +01:00
francescomani
c626e55f67 harmonize use of function to reverse n bits 2024-05-15 17:08:47 +02:00
Romain Beurdouche
b51a144d7d fix(phy simulators): fix cmdline configmodule for CODING phy simulators 2024-05-15 14:12:40 +02:00
Romain Beurdouche
8b889d908c fix(phy simulators): fix cmdline configmodule for LTE_PHY ulsim and dlsim 2024-05-15 14:05:54 +02:00
Romain Beurdouche
08dbc5bf08 fix(phy simulators): fix cmdline configmodule for NR_PHY simulators 2024-05-15 14:05:03 +02:00
Romain Beurdouche
4e8f58b498 fix(nr_dlsim): fix cmdline configmodule for nr_dlsim 2024-05-15 14:04:18 +02:00
Romain Beurdouche
4455b37548 fix(nr_ulsim): fix cmdline configmodule for nr_ulsim 2024-05-15 14:02:48 +02:00
Thomas Schlichter
d5a0455560 fix error of taking the absolute value of 'uint64_t' 2024-05-07 20:46:37 +02:00
Thomas Schlichter
5ac881b7c1 rfsimulator: add support to simulate a long propagation delay
Add the option `--rfsimulator.prop_delay` to specify the simulated receive-path (gNB: UL, UE: DL) propagation delay in ms.
This option can be used e.g. to simulate a simple GEO satellite channel by specifying `--rfsimulator.prop_delay 238.74` to both, the gNB and the UE.

This is part of the work developed by Fraunhofer IIS within the ESA-funded project 5G-GOA (https://connectivity.esa.int/projects/5ggoa).
2024-05-07 20:46:37 +02:00
Laurent THOMAS
ab2b868b75 improve polar init and polar readability 2024-04-24 15:26:21 +02:00
1663 changed files with 103205 additions and 105152 deletions

1
.gitignore vendored
View File

@@ -25,3 +25,4 @@ tags
nfapi_nr_interface_scf
*.log
*.out
CMakeUserPresets.json

View File

@@ -1,5 +1,61 @@
# RELEASE NOTES: #
## [v2.2.0](https://gitlab.eurecom.fr/oai/openairinterface5g/-/tags/v2.2.0) -> November 2024. ##
General 5G improvements (both gNB and UE):
- Make standalone mode (SA) the default (see [`RUNMODEM.md`](doc/RUNMODEM.md))
- Experimental support for FR2 operation
- Support for GEO NTN and simulation of GEO satellite channel in RFsimulator
(see [`RUNMODEM.md`](doc/RUNMODEM.md))
- Support 2-step RA
- Add optional LTTng logger in logging module (see
[`lttng_logs.md`](common/utils/LOG/DOC/lttng_logs.md))
- Support for YAML-based config files (alongside libconfig) (see
[`gnb.sa.band78.106prb.rfsim.yaml`](ci-scripts/conf_files/gnb.sa.band78.106prb.rfsim.yaml) and
[`nrue.uicc.yaml`](ci-scripts/conf_files/nrue.uicc.yaml))
- Add new L1 scope based on Dear ImGui (see [`readme.md`](openair1/PHY/TOOLS/readme.md))
- Allow cross-compilation on ARM (via SIMDE SIMD emulation library)
- Allow to build and run with clang
- Support/check for Linux capabilities, allow to run without sudo (see
[`tuning_and_security.md`](doc/tuning_and_security.md))
- OAI does not modify CPU frequency and networking stack
([`tuning_and_security.md`](doc/tuning_and_security.md))
- Bugfixes in the entire stack (e.g. #547, #663, #674, #687, #712, #736, #739,
#741, #756, #762, #773, ...)
5G gNB:
- Support for FR2 interoperability with COTS UE (no beam switching supported yet)
- Add 4-layer DL MIMO (experimental)
- Add gNB Neighbour configuration and Mobility over F1 interface (see
[`handover-tutorial.md`](doc/handover-tutorial.md))
- Enhance O-RAN FHI 7.2: (see [`ORAN_FHI7.2_Tutorial.md`](doc/ORAN_FHI7.2_Tutorial.md))
* Support different bandwidths (40/60/80/100MHz) and antenna configs (1x1 up
to 4x4) for Benetel/VVDN/LITEON RUs
* Add support for multi-RU support (single-cell/distributed antenna)
- Support AMD T2 Telco card look-aside L1 accelerator (see
[`LDPC_T2_OFFLOAD_SETUP.md`](doc/LDPC_T2_OFFLOAD_SETUP.md))
- Support Nvidia Aerial/ARC in-line L1 accelerator (see
[`Aerial_FAPI_Split_Tutorial.md`](doc/Aerial_FAPI_Split_Tutorial.md))
- Various fixes for multi-UE operation: by default support of up to 16 UEs concurrently
- Documentation for
- 5G MAC (see [`mac-usage.md`](doc/MAC/mac-usage.md))
- 5G RRC (see [`rrc-usage.md`](doc/RRC/rrc-usage.md))
- E1 (see [`E1-design.md`](doc/E1AP/E1-design.md))
- F1 (see [`F1-design.md`](doc/F1AP/F1-design.md))
5G UE:
- Basic interoperability with COTS gNB (Nokia gNB)
- Implement PHR reporting
- Implement RRC re-establishment
- Implement PUCCH/PUSCH/SRS power control
- Implement UCI on PUSCH and aperiodic CSI reporting
- Support of cell search (within the selected UE bandwidth) (see [`RUNMODEM.md`](doc/RUNMODEM.md))
- Enhance connection control: implement timers, resync
- A lot of internal cleanup
This release also includes many fixes and documentation updates. See
`doc/README.md` in the repository for an overview of documentation.
## [v2.1.0](https://gitlab.eurecom.fr/oai/openairinterface5g/-/tags/v2.1.0) -> February 2024. ##
This release improves existing 5G support and adds various new features.

File diff suppressed because it is too large Load Diff

64
CMakePresets.json Normal file
View File

@@ -0,0 +1,64 @@
{
"version": 3,
"configurePresets": [
{
"name": "default",
"displayName": "Default Config",
"description": "Default build using Ninja generator",
"generator": "Ninja",
"binaryDir": "${sourceDir}/cmake_targets/ran_build/build",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "RelWithDebInfo"
}
},
{
"name": "tests",
"displayName": "Default unit test config",
"inherits": "default",
"binaryDir": "${sourceDir}/cmake_targets/ran_build/build_test",
"cacheVariables": {
"ENABLE_TESTS": "ON",
"SANITIZE_ADDRESS": "ON",
"CMAKE_BUILD_TYPE": "RelWithDebInfo"
}
}
],
"buildPresets": [
{
"name": "5gdefault",
"configurePreset": "default",
"targets": [
"nr-uesoftmodem",
"nr-softmodem",
"rfsimulator",
"dfts",
"ldpc",
"params_libconfig",
"params_yaml"
]
},
{
"name": "default",
"inherits": "5gdefault"
},
{
"name": "4gdefault",
"configurePreset": "default",
"targets": [
"lte-softmodem",
"lte-uesoftmodem",
"dfts",
"coding",
"rfsimulator",
"params_libconfig"
]
},
{
"name": "tests",
"configurePreset": "tests",
"targets": [
"tests"
]
}
]
}

View File

@@ -5,22 +5,26 @@ We want to make contributing to this project as easy and transparent as possible
Please refer to the steps described on our website: [How to contribute to OAI](https://www.openairinterface.org/?page_id=112).
1. Sign and return a Contributor License Agreement to OAI team.
2. Register on [Eurecom GitLab Server](https://gitlab.eurecom.fr/users/sign_up) if you do not have any.
2. Register on [Eurecom GitLab Server](https://gitlab.eurecom.fr/users/sign_up)
if you do not have any.
- We recommend that you register with a professional or student email address.
- If your email domain (`@domain.com`) is not whitelisted, please contact us (mailto:contact@openairinterface.org).
- If your email domain (`@domain.com`) is not whitelisted, please contact us
(mailto:contact@openairinterface.org).
- Eurecom GitLab does NOT accept public email domains.
3. Provide the OAI team with the **username** of this account to (mailto:contact@openairinterface.org) ; we will give you the developer rights on this repository.
4. The policies are described in these wiki pages: [OAI Policies](https://gitlab.eurecom.fr/oai/openairinterface5g/wikis/oai-policies-home).
- PLEASE DO NOT FORK the OAI repository on your own Eurecom GitLab account. It just eats up space on our servers.
- You can fork onto another hosting system. But we will NOT accept a merge request from a forked repository.
3. Provide the OAI team with the **username** of this account to
(mailto:contact@openairinterface.org) ; we will give you the developer
rights on this repository.
4. The contributing policies are described in the [corresponding documentation
page](doc/code-style-contrib.md).
- PLEASE DO NOT FORK the OAI repository on your own Eurecom GitLab account.
It just eats up space on our servers.
- You can fork onto another hosting system. But we will NOT accept a merge
request from a forked repository.
* This decision was made for the license reasons.
* The Continuous Integration will reject your merge request.
- All merge requests SHALL have `develop` branch as target branch.
## Coding Styles ##
# License #
There are described [here](https://gitlab.eurecom.fr/oai/openairinterface5g/wikis/guidelines/guidelines-home).
## License ##
By contributing to OpenAirInterface, you agree that your contributions will be licensed under the LICENSE file in the root directory of this source tree.
By contributing to OpenAirInterface, you agree that your contributions will be
licensed under the license described in the file [`LICENSE`](./LICENSE) in the
root directory of this source tree.

View File

@@ -4,15 +4,6 @@ For more details of the license, refer to [LICENSE](LICENSE) file in the same di
However, the source code also contains third party software that is acknowledged here for reference.
## Credits for LFDS user space source code located in folder openair2/UTILS/LFDS/ ##
See on [liblfds website](https://liblfds.org/) the license section.
<pre>
"There is no license. You are free to use this software in any way, for any purpose. Go forth and create wealth!
If however for legal reasons a licence is required, the license of your choice will be granted."
</pre>
## Credits for source code common/utils/collection/queue.h: ##
The Regents of the University of California: BSD 3-Clause Licence.

View File

@@ -4,12 +4,11 @@
<p align="center">
<a href="https://gitlab.eurecom.fr/oai/openairinterface5g/-/blob/master/LICENSE"><img src="https://img.shields.io/badge/license-OAI--Public--V1.1-blue" alt="License"></a>
<a href="https://releases.ubuntu.com/18.04/"><img src="https://img.shields.io/badge/OS-Ubuntu18-Green" alt="Supported OS Ubuntu 18"></a>
<a href="https://releases.ubuntu.com/20.04/"><img src="https://img.shields.io/badge/OS-Ubuntu20-Green" alt="Supported OS Ubuntu 20"></a>
<a href="https://releases.ubuntu.com/22.04/"><img src="https://img.shields.io/badge/OS-Ubuntu22-Green" alt="Supported OS Ubuntu 22"></a>
<a href="https://www.redhat.com/en/technologies/linux-platforms/enterprise-linux"><img src="https://img.shields.io/badge/OS-RHEL8-Green" alt="Supported OS RHEL8"></a>
<a href="https://releases.ubuntu.com/24.04/"><img src="https://img.shields.io/badge/OS-Ubuntu24-Green" alt="Supported OS Ubuntu 24"></a>
<a href="https://www.redhat.com/en/technologies/linux-platforms/enterprise-linux"><img src="https://img.shields.io/badge/OS-RHEL9-Green" alt="Supported OS RELH9"></a>
<a href="https://getfedora.org/en/workstation/"><img src="https://img.shields.io/badge/OS-Fedore37-Green" alt="Supported OS Fedora 37"></a>
<a href="https://getfedora.org/en/workstation/"><img src="https://img.shields.io/badge/OS-Fedore41-Green" alt="Supported OS Fedora 41"></a>
</p>
<p align="center">
@@ -43,6 +42,7 @@ Please see [NOTICE](NOTICE.md) file for third party software that is included in
* [General overview of documentation](./doc/README.md)
* [The implemented features](./doc/FEATURE_SET.md)
* [System Requirements for Using OAI Stack](./doc/system_requirements.md)
* [How to build](./doc/BUILD.md)
* [How to run the modems](./doc/RUNMODEM.md)
@@ -70,12 +70,13 @@ openairinterface5g
├── executables : Top-level executable source files (gNB, eNB, ...)
├── maketags : Script to generate emacs tags.
├── nfapi : (n)FAPI code for MAC-PHY interface
├── openair1 : 3GPP LTE Rel-10/12 PHY layer / 3GPP NR Rel-15 layer. A local Readme file provides more details.
├── openair2 : 3GPP LTE Rel-10 RLC/MAC/PDCP/RRC/X2AP + LTE Rel-14 M2AP implementation. Also 3GPP NR Rel-15 RLC/MAC/PDCP/RRC/X2AP.
├── openair3 : 3GPP LTE Rel10 for S1AP, NAS GTPV1-U for both ENB and UE.
├── openair1 : Layer 1 (3GPP LTE Rel-10/12 PHY, NR Rel-15 PHY)
├── openair2 : Layer 2 (3GPP LTE Rel-10 MAC/RLC/PDCP/RRC/X2AP, LTE Rel-14 M2AP, NR Rel-15+ MAC/RLC/PDCP/SDAP/RRC/X2AP/F1AP/E1AP), E2AP
├── openair3 : Layer 3 (3GPP LTE Rel-10 S1AP/GTP, NR Rel-15 NGAP/GTP)
├── openshift : OpenShift helm charts for some deployment options of OAI
├── radio : Drivers for various radios such as USRP, AW2S, RFsim, ...
── targets : Some configuration files; only historical relevance, and might be deleted in the future
├── radio : Drivers for various radios such as USRP, AW2S, RFsim, 7.2 FHI, ...
── targets : Some configuration files; only historical relevance, and might be deleted in the future
└── tools : Tools for use by the developers/ci machines: code analysis and formatting
```
# How to get support from the OAI Community #

View File

@@ -18,6 +18,11 @@ spec:
- name: physim
image: "{{ .Values.global.image.repository }}:{{ .Values.global.image.version }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
{{- if .Values.global.resources.define}}
resources:
requests:
cpu: {{ .Values.global.resources.requests.cpu | quote }}
{{- end}}
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
env:
@@ -37,6 +42,6 @@ spec:
nodeSelector:
{{- toYaml .Values.global.nodeSelector | nindent 12 }}
{{- end }}
{{- if .Values.global.nodeName.dlsim100rbtm2}}
{{- if .Values.global.nodeName}}
nodeName: {{ .Values.global.nodeName.dlsim100rbtm2 }}
{{- end }}

View File

@@ -18,6 +18,11 @@ spec:
- name: physim
image: "{{ .Values.global.image.repository }}:{{ .Values.global.image.version }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
{{- if .Values.global.resources.define}}
resources:
requests:
cpu: {{ .Values.global.resources.requests.cpu | quote }}
{{- end}}
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
env:
@@ -37,6 +42,6 @@ spec:
nodeSelector:
{{- toYaml .Values.global.nodeSelector | nindent 12 }}
{{- end }}
{{- if .Values.global.nodeName.dlsimbasic}}
{{- if .Values.global.nodeName}}
nodeName: {{ .Values.global.nodeName.dlsimbasic }}
{{- end }}

View File

@@ -18,6 +18,11 @@ spec:
- name: physim
image: "{{ .Values.global.image.repository }}:{{ .Values.global.image.version }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
{{- if .Values.global.resources.define}}
resources:
requests:
cpu: {{ .Values.global.resources.requests.cpu | quote }}
{{- end}}
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
env:
@@ -37,6 +42,6 @@ spec:
nodeSelector:
{{- toYaml .Values.global.nodeSelector | nindent 12 }}
{{- end }}
{{- if .Values.global.nodeName.ldpctest}}
{{- if .Values.global.nodeName}}
nodeName: {{ .Values.global.nodeName.ldpctest }}
{{- end }}

View File

@@ -18,6 +18,11 @@ spec:
- name: physim
image: "{{ .Values.global.image.repository }}:{{ .Values.global.image.version }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
{{- if .Values.global.resources.define}}
resources:
requests:
cpu: {{ .Values.global.resources.requests.cpu | quote }}
{{- end}}
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
env:
@@ -37,6 +42,6 @@ spec:
nodeSelector:
{{- toYaml .Values.global.nodeSelector | nindent 12 }}
{{- end }}
{{- if .Values.global.nodeName.nrdlschsim}}
{{- if .Values.global.nodeName}}
nodeName: {{ .Values.global.nodeName.nrdlschsim }}
{{- end }}

View File

@@ -18,6 +18,11 @@ spec:
- name: physim
image: "{{ .Values.global.image.repository }}:{{ .Values.global.image.version }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
{{- if .Values.global.resources.define}}
resources:
requests:
cpu: {{ .Values.global.resources.requests.cpu | quote }}
{{- end}}
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
env:
@@ -37,6 +42,6 @@ spec:
nodeSelector:
{{- toYaml .Values.global.nodeSelector | nindent 12 }}
{{- end }}
{{- if .Values.global.nodeName.nrdlsimbasic}}
{{- if .Values.global.nodeName}}
nodeName: {{ .Values.global.nodeName.nrdlsimbasic }}
{{- end }}

View File

@@ -18,6 +18,11 @@ spec:
- name: physim
image: "{{ .Values.global.image.repository }}:{{ .Values.global.image.version }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
{{- if .Values.global.resources.define}}
resources:
requests:
cpu: {{ .Values.global.resources.requests.cpu | quote }}
{{- end}}
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
env:
@@ -37,6 +42,6 @@ spec:
nodeSelector:
{{- toYaml .Values.global.nodeSelector | nindent 12 }}
{{- end }}
{{- if .Values.global.nodeName.nrdlsimdmrsptrs}}
{{- if .Values.global.nodeName}}
nodeName: {{ .Values.global.nodeName.nrdlsimdmrsptrs }}
{{- end }}

View File

@@ -18,6 +18,11 @@ spec:
- name: physim
image: "{{ .Values.global.image.repository }}:{{ .Values.global.image.version }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
{{- if .Values.global.resources.define}}
resources:
requests:
cpu: {{ .Values.global.resources.requests.cpu | quote }}
{{- end}}
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
env:
@@ -37,6 +42,6 @@ spec:
nodeSelector:
{{- toYaml .Values.global.nodeSelector | nindent 12 }}
{{- end }}
{{- if .Values.global.nodeName.nrdlsimmcsmimo}}
{{- if .Values.global.nodeName}}
nodeName: {{ .Values.global.nodeName.nrdlsimmcsmimo }}
{{- end }}

View File

@@ -18,6 +18,11 @@ spec:
- name: physim
image: "{{ .Values.global.image.repository }}:{{ .Values.global.image.version }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
{{- if .Values.global.resources.define}}
resources:
requests:
cpu: {{ .Values.global.resources.requests.cpu | quote }}
{{- end}}
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
env:
@@ -37,6 +42,6 @@ spec:
nodeSelector:
{{- toYaml .Values.global.nodeSelector | nindent 12 }}
{{- end }}
{{- if .Values.global.nodeName.nrdlsimoffset}}
{{- if .Values.global.nodeName}}
nodeName: {{ .Values.global.nodeName.nrdlsimoffset }}
{{- end }}

View File

@@ -18,6 +18,11 @@ spec:
- name: physim
image: "{{ .Values.global.image.repository }}:{{ .Values.global.image.version }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
{{- if .Values.global.resources.define}}
resources:
requests:
cpu: {{ .Values.global.resources.requests.cpu | quote }}
{{- end}}
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
env:
@@ -37,6 +42,6 @@ spec:
nodeSelector:
{{- toYaml .Values.global.nodeSelector | nindent 12 }}
{{- end }}
{{- if .Values.global.nodeName.nrpbschsim106rb}}
{{- if .Values.global.nodeName}}
nodeName: {{ .Values.global.nodeName.nrpbschsim106rb }}
{{- end }}

View File

@@ -18,6 +18,11 @@ spec:
- name: physim
image: "{{ .Values.global.image.repository }}:{{ .Values.global.image.version }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
{{- if .Values.global.resources.define}}
resources:
requests:
cpu: {{ .Values.global.resources.requests.cpu | quote }}
{{- end}}
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
env:
@@ -37,6 +42,6 @@ spec:
nodeSelector:
{{- toYaml .Values.global.nodeSelector | nindent 12 }}
{{- end }}
{{- if .Values.global.nodeName.nrpbchsim217rb}}
{{- if .Values.global.nodeName}}
nodeName: {{ .Values.global.nodeName.nrpbchsim217rb }}
{{- end }}

View File

@@ -18,6 +18,11 @@ spec:
- name: physim
image: "{{ .Values.global.image.repository }}:{{ .Values.global.image.version }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
{{- if .Values.global.resources.define}}
resources:
requests:
cpu: {{ .Values.global.resources.requests.cpu | quote }}
{{- end}}
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
env:
@@ -37,6 +42,6 @@ spec:
nodeSelector:
{{- toYaml .Values.global.nodeSelector | nindent 12 }}
{{- end }}
{{- if .Values.global.nodeName.nrpbchsim273rb}}
{{- if .Values.global.nodeName}}
nodeName: {{ .Values.global.nodeName.nrpbchsim273rb }}
{{- end }}

View File

@@ -0,0 +1,36 @@
apiVersion: v1
name: oai-nr-pbchsim-scs
description: A Helm subchart for nr-pbchsim network function ("Other SCS" tests)
# A chart can be either an 'application' or a 'library' chart.
#
# Application charts are a collection of templates that can be packaged into versioned archives
# to be deployed.
#
# Library charts provide useful utilities or functions for the chart developer. They're included as
# a dependency of application charts to inject those utilities and functions into the rendering
# pipeline. Library charts do not define any templates and therefore cannot be deployed.
type: application
icon: http://www.openairinterface.org/wp-content/uploads/2015/06/cropped-oai_final_logo.png
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
version: 0.1.1
# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application.
appVersion: v1
keywords:
- Physical Simulator
- nr-pbchsim
- RAN
- 5G
sources:
- https://gitlab.eurecom.fr/oai/openairinterface5g
maintainers:
- name: OPENAIRINTERFACE
email: contact@openairinterface.org

View File

@@ -0,0 +1,63 @@
{{/* vim: set filetype=mustache: */}}
{{/*
Expand the name of the chart.
*/}}
{{- define "oai-nr-pbchsim-scs.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{/*
Create a default fully qualified app name.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
If release name contains chart name it will be used as a full name.
*/}}
{{- define "oai-nr-pbchsim-scs.fullname" -}}
{{- if .Values.fullnameOverride -}}
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
{{- else -}}
{{- $name := default .Chart.Name .Values.nameOverride -}}
{{- if contains $name .Release.Name -}}
{{- .Release.Name | trunc 63 | trimSuffix "-" -}}
{{- else -}}
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{- end -}}
{{- end -}}
{{/*
Create chart name and version as used by the chart label.
*/}}
{{- define "oai-nr-pbchsim-scs.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{/*
Common labels
*/}}
{{- define "oai-nr-pbchsim-scs.labels" -}}
helm.sh/chart: {{ include "oai-nr-pbchsim-scs.chart" . }}
{{ include "oai-nr-pbchsim-scs.selectorLabels" . }}
{{- if .Chart.AppVersion }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- end -}}
{{/*
Selector labels
*/}}
{{- define "oai-nr-pbchsim-scs.selectorLabels" -}}
app.kubernetes.io/name: {{ include "oai-nr-pbchsim-scs.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end -}}
{{/*
Create the name of the service account to use
*/}}
{{- define "oai-nr-pbchsim-scs.serviceAccountName" -}}
{{- if .Values.serviceAccount.create -}}
{{ default (include "oai-nr-pbchsim-scs.fullname" .) .Values.serviceAccount.name }}
{{- else -}}
{{ default "default" .Values.serviceAccount.name }}
{{- end -}}
{{- end -}}

View File

@@ -0,0 +1,47 @@
apiVersion: batch/v1
kind: Job
metadata:
name: {{ .Chart.Name }}
spec:
template:
metadata:
labels:
app: physim
spec:
securityContext:
{{- toYaml .Values.podSecurityContext | nindent 8 }}
{{- if .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
containers:
- name: physim
image: "{{ .Values.global.image.repository }}:{{ .Values.global.image.version }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
{{- if .Values.global.resources.define}}
resources:
requests:
cpu: {{ .Values.global.resources.requests.cpu | quote }}
{{- end}}
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
env:
- name: OPENAIR_DIR
value: /opt/oai-physim
command: ["/bin/sh", "-c"]
args:
- >
cmake_targets/autotests/run_exec_autotests.bash -g "nr_pbchsim.otherSCS" -d bin/ &&
echo "FINISHED" && sleep infinity
dnsPolicy: ClusterFirst
restartPolicy: Never
schedulerName: default-scheduler
serviceAccountName: {{ .Values.global.serviceAccountName }}
terminationGracePeriodSeconds: 30
{{- if .Values.global.nodeSelector}}
nodeSelector:
{{- toYaml .Values.global.nodeSelector | nindent 12 }}
{{- end }}
{{- if .Values.global.nodeName}}
nodeName: {{ .Values.global.nodeName.nrpbchsim273rb }}
{{- end }}

View File

@@ -0,0 +1,48 @@
# Default values for oai-nr-pbchsim-scs
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.
replicaCount: 1
image:
# pullPolicy: IfNotPresent or Never or Always
pullPolicy: Always
imagePullSecrets: []
nameOverride: ""
fullnameOverride: ""
serviceAccount:
# Specifies whether a service account should be created
create: true
# Annotations to add to the service account
annotations: {}
# The name of the service account to use.
# If not set and create is true, a name is generated using the fullname template
name: "oai-nr-pbchsim-scs"
podSecurityContext:
runAsUser: 0
runAsGroup: 0
securityContext:
privileged: false
resources: {}
# We usually recommend not to specify default resources and to leave this as a conscious
# choice for the user. This also increases chances charts run on environments with little
# resources, such as Minikube. If you do want to specify resources, uncomment the following
# lines, adjust them as necessary, and remove the curly braces after 'resources:'.
# limits:
# cpu: 100m
# memory: 128Mi
# requests:
# cpu: 100m
# memory: 128Mi
nodeSelector: {}
tolerations: []
affinity: {}

View File

@@ -18,6 +18,11 @@ spec:
- name: physim
image: "{{ .Values.global.image.repository }}:{{ .Values.global.image.version }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
{{- if .Values.global.resources.define}}
resources:
requests:
cpu: {{ .Values.global.resources.requests.cpu | quote }}
{{- end}}
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
env:
@@ -37,6 +42,6 @@ spec:
nodeSelector:
{{- toYaml .Values.global.nodeSelector | nindent 12 }}
{{- end }}
{{- if .Values.global.nodeName.nrprachsim}}
{{- if .Values.global.nodeName}}
nodeName: {{ .Values.global.nodeName.nrprachsim }}
{{- end }}

View File

@@ -18,6 +18,11 @@ spec:
- name: physim
image: "{{ .Values.global.image.repository }}:{{ .Values.global.image.version }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
{{- if .Values.global.resources.define}}
resources:
requests:
cpu: {{ .Values.global.resources.requests.cpu | quote }}
{{- end}}
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
env:
@@ -37,6 +42,6 @@ spec:
nodeSelector:
{{- toYaml .Values.global.nodeSelector | nindent 12 }}
{{- end }}
{{- if .Values.global.nodeName.nrpsbchsim}}
{{- if .Values.global.nodeName}}
nodeName: {{ .Values.global.nodeName.nrpsbchsim }}
{{- end }}

View File

@@ -18,6 +18,11 @@ spec:
- name: physim
image: "{{ .Values.global.image.repository }}:{{ .Values.global.image.version }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
{{- if .Values.global.resources.define}}
resources:
requests:
cpu: {{ .Values.global.resources.requests.cpu | quote }}
{{- end}}
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
env:
@@ -37,6 +42,6 @@ spec:
nodeSelector:
{{- toYaml .Values.global.nodeSelector | nindent 12 }}
{{- end }}
{{- if .Values.global.nodeName.nrpucchsim}}
{{- if .Values.global.nodeName}}
nodeName: {{ .Values.global.nodeName.nrpucchsim }}
{{- end }}

View File

@@ -18,6 +18,11 @@ spec:
- name: physim
image: "{{ .Values.global.image.repository }}:{{ .Values.global.image.version }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
{{- if .Values.global.resources.define}}
resources:
requests:
cpu: {{ .Values.global.resources.requests.cpu | quote }}
{{- end}}
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
env:
@@ -37,6 +42,6 @@ spec:
nodeSelector:
{{- toYaml .Values.global.nodeSelector | nindent 12 }}
{{- end }}
{{- if .Values.global.nodeName.nrulschsim}}
{{- if .Values.global.nodeName}}
nodeName: {{ .Values.global.nodeName.nrulschsim }}
{{- end }}

View File

@@ -18,6 +18,11 @@ spec:
- name: physim
image: "{{ .Values.global.image.repository }}:{{ .Values.global.image.version }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
{{- if .Values.global.resources.define}}
resources:
requests:
cpu: {{ .Values.global.resources.requests.cpu | quote }}
{{- end}}
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
env:
@@ -37,6 +42,6 @@ spec:
nodeSelector:
{{- toYaml .Values.global.nodeSelector | nindent 12 }}
{{- end }}
{{- if .Values.global.nodeName.nrulsim3gpp}}
{{- if .Values.global.nodeName}}
nodeName: {{ .Values.global.nodeName.nrulsim3gpp }}
{{- end }}

View File

@@ -18,6 +18,11 @@ spec:
- name: physim
image: "{{ .Values.global.image.repository }}:{{ .Values.global.image.version }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
{{- if .Values.global.resources.define}}
resources:
requests:
cpu: {{ .Values.global.resources.requests.cpu | quote }}
{{- end}}
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
env:
@@ -37,6 +42,6 @@ spec:
nodeSelector:
{{- toYaml .Values.global.nodeSelector | nindent 12 }}
{{- end }}
{{- if .Values.global.nodeName.nrulsimmimo}}
{{- if .Values.global.nodeName}}
nodeName: {{ .Values.global.nodeName.nrulsimmimo }}
{{- end }}

View File

@@ -18,6 +18,11 @@ spec:
- name: physim
image: "{{ .Values.global.image.repository }}:{{ .Values.global.image.version }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
{{- if .Values.global.resources.define}}
resources:
requests:
cpu: {{ .Values.global.resources.requests.cpu | quote }}
{{- end}}
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
env:
@@ -37,6 +42,6 @@ spec:
nodeSelector:
{{- toYaml .Values.global.nodeSelector | nindent 12 }}
{{- end }}
{{- if .Values.global.nodeName.nrulsimmisc}}
{{- if .Values.global.nodeName}}
nodeName: {{ .Values.global.nodeName.nrulsimmisc }}
{{- end }}

View File

@@ -18,6 +18,11 @@ spec:
- name: physim
image: "{{ .Values.global.image.repository }}:{{ .Values.global.image.version }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
{{- if .Values.global.resources.define}}
resources:
requests:
cpu: {{ .Values.global.resources.requests.cpu | quote }}
{{- end}}
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
ports:
@@ -39,6 +44,6 @@ spec:
nodeSelector:
{{- toYaml .Values.global.nodeSelector | nindent 12 }}
{{- end }}
{{- if .Values.global.nodeName.nrulsimscfdma}}
{{- if .Values.global.nodeName}}
nodeName: {{ .Values.global.nodeName.nrulsimscfdma }}
{{- end }}

View File

@@ -18,6 +18,11 @@ spec:
- name: physim
image: "{{ .Values.global.image.repository }}:{{ .Values.global.image.version }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
{{- if .Values.global.resources.define}}
resources:
requests:
cpu: {{ .Values.global.resources.requests.cpu | quote }}
{{- end}}
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
env:
@@ -37,6 +42,6 @@ spec:
nodeSelector:
{{- toYaml .Values.global.nodeSelector | nindent 12 }}
{{- end }}
{{- if .Values.global.nodeName.polartest}}
{{- if .Values.global.nodeName}}
nodeName: {{ .Values.global.nodeName.polartest }}
{{- end }}

View File

@@ -18,6 +18,11 @@ spec:
- name: physim
image: "{{ .Values.global.image.repository }}:{{ .Values.global.image.version }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
{{- if .Values.global.resources.define}}
resources:
requests:
cpu: {{ .Values.global.resources.requests.cpu | quote }}
{{- end}}
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
env:
@@ -37,6 +42,6 @@ spec:
nodeSelector:
{{- toYaml .Values.global.nodeSelector | nindent 12 }}
{{- end }}
{{- if .Values.global.nodeName.smallblocktest}}
{{- if .Values.global.nodeName}}
nodeName: {{ .Values.global.nodeName.smallblocktest }}
{{- end }}

View File

@@ -18,6 +18,11 @@ spec:
- name: physim
image: "{{ .Values.global.image.repository }}:{{ .Values.global.image.version }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
{{- if .Values.global.resources.define}}
resources:
requests:
cpu: {{ .Values.global.resources.requests.cpu | quote }}
{{- end}}
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
env:
@@ -37,6 +42,6 @@ spec:
nodeSelector:
{{- toYaml .Values.global.nodeSelector | nindent 12 }}
{{- end }}
{{- if .Values.global.nodeName.ulsim}}
{{- if .Values.global.nodeName}}
nodeName: {{ .Values.global.nodeName.ulsim }}
{{- end }}

View File

@@ -1,40 +1,21 @@
# Default values for oai-physim.
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.
global:
serviceAccountName: oai-physim-sa
namespace: "OAICICD_PROJECT"
image:
image:
registry: local
repository: image-registry.openshift-image-registry.svc:5000/oaicicd-ran/oai-physim
version: TAG
# pullPolicy: IfNotPresent or Never or Always
pullPolicy: Always
# removing the node selector
nodeSelector: {}
# It is not a good way of assigning pods to the nodes: this way we bypass the scheduler. At the moment we don't provide the resource information of these pods.
# Therefore, Openshift assigns the pods to the same node because it thinks the pods don't consume much resources. This isn't the case, they consume a lot of resources.
nodeName:
dlsim100rbtm2: acamas
dlsimbasic: acamas
ldpctest: acamas
nrdlschsim: acamas
nrdlsimbasic: acamas
nrdlsimdmrsptrs: acamas
nrdlsimmcsmimo: acamas
nrdlsimoffset: dedale
nrpbschsim106rb: dedale
nrpbchsim217rb: dedale
nrpbchsim273rb: dedale
nrpsbchsim: dedale
nrprachsim: dedale
nrpucchsim: dedale
nrulschsim: demophon
nrulsim3gpp: demophon
nrulsimmimo: demophon
nrulsimmisc: demophon
nrulsimscfdma: demophon
polartest: demophon
smallblocktest: demophon
ulsim: demophon
# will place on two nodes intel 3rd gen and 5th gen with RT kernel
nodeSelector:
type: ran
nodeName: ''
resources:
define: false
requests:
cpu: 1.5

View File

@@ -285,6 +285,29 @@ pipeline {
}
}
}
stage ("OAI-FLEXRIC-RAN-Integration-Test") {
when { expression {do5Gtest} }
steps {
script {
triggerSlaveJob ('OAI-FLEXRIC-RAN-Integration-Test', 'OAI-FLEXRIC-RAN-Integration-Test')
}
}
post {
always {
script {
// Using a unique variable name for each test stage to avoid overwriting on a global variable
// due to parallel-time concurrency
flexricRAN5GStatus = finalizeSlaveJob('OAI-FLEXRIC-RAN-Integration-Test')
}
}
failure {
script {
currentBuild.result = 'FAILURE'
failingStages += flexricRAN5GStatus
}
}
}
}
stage ("L2-Sim-Test-4G") {
when { expression {do4Gtest} }
steps {
@@ -493,29 +516,6 @@ pipeline {
}
}
}
stage ("Interop-F1") {
when { expression {do5Gtest} }
steps {
script {
triggerSlaveJob ('RAN-Interop-F1', 'Interop-F1')
}
}
post {
always {
script {
// Using a unique variable name for each test stage to avoid overwriting on a global variable
// due to parallel-time concurrency
f1InteropStatus = finalizeSlaveJob('RAN-Interop-F1')
}
}
failure {
script {
currentBuild.result = 'FAILURE'
failingStages += f1InteropStatus
}
}
}
}
stage ("Sanity-Check OAI-CN5G") {
when { expression {do5Gtest} }
steps {
@@ -585,6 +585,29 @@ pipeline {
}
}
}
stage ("SA-FHI72-CN5G") {
when { expression {do5Gtest} }
steps {
script {
triggerSlaveJob ('RAN-SA-FHI72-CN5G', 'SA-FHI72-CN5G')
}
}
post {
always {
script {
// Using a unique variable name for each test stage to avoid overwriting on a global variable
// due to parallel-time concurrency
saFHI72Status = finalizeSlaveJob('RAN-SA-FHI72-CN5G')
}
}
failure {
script {
currentBuild.result = 'FAILURE'
failingStages += saFHI72Status
}
}
}
}
stage ("SA-OAIUE-CN5G") {
when { expression {do5Gtest} }
steps {
@@ -635,9 +658,6 @@ pipeline {
if ("MERGE".equals(env.gitlabActionType)) {
addGitLabMRComment comment: message
def message2 = message + " -- MergeRequest #" + env.gitlabMergeRequestIid + " (" + env.gitlabMergeRequestTitle + ")"
sendSocialMediaMessage('ci-enb', 'good', message2)
} else {
sendSocialMediaMessage('ci-enb', 'good', message)
}
echo "Pipeline is SUCCESSFUL"
}
@@ -649,9 +669,6 @@ pipeline {
def fullMessage = message + '\n\nList of failing test stages:' + failingStages
addGitLabMRComment comment: fullMessage
def message2 = message + " -- MergeRequest #" + env.gitlabMergeRequestIid + " (" + env.gitlabMergeRequestTitle + ")"
sendSocialMediaMessage('ci-enb', 'danger', message2)
} else {
sendSocialMediaMessage('ci-enb', 'danger', message)
}
echo "Pipeline FAILED"
}
@@ -775,9 +792,3 @@ def finalizeSlaveJob(jobName) {
return artifactUrl
}
}
// Abstraction function to send social media messages:
// like on Slack or Mattermost
def sendSocialMediaMessage(pipeChannel, pipeColor, pipeMessage) {
slackSend channel: pipeChannel, color: pipeColor, message: pipeMessage
}

View File

@@ -200,6 +200,8 @@ pipeline {
if (fileExists(xmlFile)) {
mainPythonAllXmlFiles += "--XMLTestFile=" + xmlFile + " "
echo "Test XML file : ${xmlFile}"
} else {
echo "Test XML file ${xmlFile}: no such file"
}
}
withCredentials([

View File

@@ -0,0 +1,124 @@
#!/bin/groovy
/*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
* except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/
def node = "${params.JenkinsNode}"
def resource = "${params.JenkinsResource}"
pipeline {
agent {
label node
}
options {
timestamps()
ansiColor('xterm')
timeout(time: 3, unit: 'HOURS')
}
stages {
stage ("Trigger NEU CI") {
steps {
lock (resource) {
script {
withCredentials([
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.ColosseumCredentials}", usernameVariable: 'col_username', passwordVariable: 'col_password'],
]) {
// use eNB target branch variable if eNB repository is empty
def git_Branch = ""
if (params.eNB_Branch.isEmpty()) {
echo 'eNB_Branch parameter is empty, using eNB_TargetBranch instead'
git_Branch = params.eNB_TargetBranch
} else {
git_Branch = params.eNB_Branch
}
// use default 10011 rf scenario if not specified
if (params.Colosseum_Rf_Scenario.isEmpty()) {
echo 'Colosseum_Rf_Scenario parameter is empty, defaulting to 10011'
rf_scenario = "10011"
} else {
rf_scenario = params.Colosseum_Rf_Scenario
}
sh "echo Testing reachability of Colosseum endpoint"
sh "ping -c 3 10.100.1.253"
sh "./ci-scripts/colosseum_scripts/launch-job.sh ${col_username} ${col_password} ${currentBuild.number} ${params.eNB_Repository} ${git_Branch} ${rf_scenario} ${env.JOB_URL}"
}
}
}
}
}
stage ("Wait for job to finish") {
steps {
lock (resource) {
script {
withCredentials([
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.ColosseumCredentials}", usernameVariable: 'col_username', passwordVariable: 'col_password'],
]) {
timeout (time: 2, unit: 'HOURS') {
sh "./ci-scripts/colosseum_scripts/wait-job-end.sh ${col_username} ${col_password}"
}
}
}
}
}
}
stage ("Get test results") {
steps {
lock (resource) {
script {
withCredentials([
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.ColosseumCredentials}", usernameVariable: 'col_username', passwordVariable: 'col_password'],
]) {
sh "./ci-scripts/colosseum_scripts/get-test-results.sh ${col_username} ${col_password}"
}
if(fileExists("results.tar.xz")) {
archiveArtifacts "results.tar.xz"
sh "mkdir -p results"
sh "tar -xf results.tar.xz -C results --strip-components=1"
if(fileExists("results/test_summary.html")) {
archiveArtifacts "results/test_summary.html"
}
// check if test passed
sh "./ci-scripts/colosseum_scripts/check-results.sh results/test_summary.html"
sh "rm -Rf ./results"
}
}
}
}
}
stage ("Set job status") {
steps {
lock (resource) {
script {
echo 'Set job status'
sh "./ci-scripts/colosseum_scripts/set-job-status.sh"
}
}
}
}
}
}

View File

@@ -193,6 +193,8 @@ pipeline {
if (fileExists(xmlFile)) {
mainPythonAllXmlFiles += "--XMLTestFile=" + xmlFile + " "
echo "Test XML file : ${xmlFile}"
} else {
echo "Test XML file ${xmlFile}: no such file"
}
}
}
@@ -229,6 +231,10 @@ pipeline {
// Zipping all archived log files
sh "mkdir test_logs"
sh "mv *.log* test_logs || true"
// Zip all log files matching cmake_targets/{*.log*,log/*} into test_logs_XXXX.zip
if (fileExists('../cmake_targets/log')) {
sh "mv ../cmake_targets/log/* test_logs || true"
}
sh "zip -r -qq test_logs_${env.BUILD_ID}.zip *test_log*/"
sh "rm -rf *test_log*/"
if (fileExists("test_logs_${env.BUILD_ID}.zip")) {

View File

@@ -186,6 +186,8 @@ pipeline {
if (fileExists(xmlFile)) {
mainPythonAllXmlFiles += "--XMLTestFile=" + xmlFile + " "
echo "Test XML file : ${xmlFile}"
} else {
echo "Test XML file ${xmlFile}: no such file"
}
}
}
@@ -221,6 +223,10 @@ pipeline {
// Zipping all archived log files
sh "mkdir test_logs"
sh "mv *.log* test_logs || true"
// Zip all log files matching cmake_targets/{*.log*,log/*} into test_logs_XXXX.zip
if (fileExists('../cmake_targets/log')) {
sh "mv ../cmake_targets/log/* test_logs || true"
}
sh "zip -r -qq test_logs_${env.BUILD_ID}.zip *test_log*/"
sh "rm -rf *test_log*/"
if (fileExists("test_logs_${env.BUILD_ID}.zip")) {

View File

@@ -76,7 +76,7 @@ pipeline {
withCredentials([
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.DH_Credentials}", usernameVariable: 'DH_Username', passwordVariable: 'DH_Password']
]) {
def listOfImages = ["oai-enb", "oai-gnb", "oai-lte-ue", "oai-nr-ue", "oai-nr-cuup"]
def listOfImages = ["oai-enb", "oai-gnb", "oai-lte-ue", "oai-nr-ue", "oai-nr-cuup", "oai-gnb-fhi72"]
// Logging in on both registries
sh "docker login -u ${DH_Username} -p ${DH_Password} > /dev/null 2>&1"
sh "docker login -u oaicicd -p oaicicd porcepix.sboai.cs.eurecom.fr > /dev/null 2>&1"

View File

@@ -39,10 +39,8 @@ if (params.LockResources != null && params.LockResources.trim().length() > 0)
// Terminate Status
def termENB = 0
def termOAIUE = 1
def termStatusArray = new Boolean[termOAIUE + 1]
def termStatusArray = new Boolean[termENB + 1]
termStatusArray[termENB] = false
termStatusArray[termOAIUE] = false
// Global Parameters. Normally they should be populated when the master job
// triggers the slave job with parameters
@@ -194,6 +192,8 @@ pipeline {
if (fileExists(xmlFile)) {
mainPythonAllXmlFiles += "--XMLTestFile=" + xmlFile + " "
echo "Test XML file : ${xmlFile}"
} else {
echo "Test XML file ${xmlFile}: no such file"
}
}
}
@@ -241,23 +241,6 @@ pipeline {
}
}
}
stage('Terminate OAI-UE') {
steps {
echo '\u2705 \u001B[32mTerminate OAI-UE\u001B[0m'
withCredentials([
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.UE_Credentials}", usernameVariable: 'UE_Username', passwordVariable: 'UE_Password']
]) {
sh "python3 ci-scripts/main.py --mode=TerminateOAIUE --UEIPAddress=${params.UE_IPAddress} --UEUserName=${UE_Username} --UEPassword=${UE_Password}"
}
}
post {
success {
script {
termStatusArray[termOAIUE] = true
}
}
}
}
}
}
stage('Log Collection') {
@@ -304,7 +287,7 @@ pipeline {
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.eNB_Credentials}", usernameVariable: 'eNB_Username', passwordVariable: 'eNB_Password']
]) {
echo '\u2705 \u001B[32mLog Collection (eNB - Run)\u001B[0m'
sh "python3 ci-scripts/main.py --mode=LogCollecteNB --eNBIPAddress=${params.eNB_IPAddress} --eNBUserName=${eNB_Username} --eNBPassword=${eNB_Password} --eNBSourceCodePath=${params.eNB_SourceCodePath}"
sh "python3 ci-scripts/main.py --mode=LogCollecteNB --eNBIPAddress=${params.eNB_IPAddress} --eNBUserName=${eNB_Username} --eNBPassword=${eNB_Password} --eNBSourceCodePath=${params.eNB_SourceCodePath} --BuildId=${env.BUILD_ID}"
echo '\u2705 \u001B[32mLog Transfer (eNB - Run)\u001B[0m'
sh "sshpass -p \'${eNB_Password}\' scp -o 'StrictHostKeyChecking no' -o 'ConnectTimeout 10' ${eNB_Username}@${params.eNB_IPAddress}:${eNB_SourceCodePath}/cmake_targets/enb.log.zip ./enb.log.${env.BUILD_ID}.zip || true"
@@ -473,13 +456,6 @@ pipeline {
sh "python3 ci-scripts/main.py --mode=TerminateeNB --eNBIPAddress=${params.eNB_IPAddress} --eNBUserName=${eNB_Username} --eNBPassword=${eNB_Password}"
}
}
if (!termStatusArray[termOAIUE]) {
withCredentials([
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.UE_Credentials}", usernameVariable: 'UE_Username', passwordVariable: 'UE_Password']
]) {
sh "python3 ci-scripts/main.py --mode=TerminateOAIUE --UEIPAddress=${params.UE_IPAddress} --UEUserName=${UE_Username} --UEPassword=${UE_Password}"
}
}
}
}
}

View File

@@ -189,6 +189,8 @@ pipeline {
if (fileExists(xmlFile)) {
mainPythonAllXmlFiles += "--XMLTestFile=" + xmlFile + " "
echo "Test XML file : ${xmlFile}"
} else {
echo "Test XML file ${xmlFile}: no such file"
}
}
}

View File

@@ -200,6 +200,8 @@ pipeline {
if (fileExists(xmlFile)) {
mainPythonAllXmlFiles += "--XMLTestFile=" + xmlFile + " "
echo "Test XML file : ${xmlFile}"
} else {
echo "Test XML file ${xmlFile}: no such file"
}
}
}
@@ -274,7 +276,7 @@ pipeline {
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.eNB_Credentials}", usernameVariable: 'eNB_Username', passwordVariable: 'eNB_Password']
]) {
echo '\u2705 \u001B[32mLog Collection (eNB - Run)\u001B[0m'
sh "python3 ci-scripts/main.py --mode=LogCollecteNB --eNBIPAddress=${params.eNB_IPAddress} --eNBUserName=${eNB_Username} --eNBPassword=${eNB_Password} --eNBSourceCodePath=${params.eNB_SourceCodePath}"
sh "python3 ci-scripts/main.py --mode=LogCollecteNB --eNBIPAddress=${params.eNB_IPAddress} --eNBUserName=${eNB_Username} --eNBPassword=${eNB_Password} --eNBSourceCodePath=${params.eNB_SourceCodePath} --BuildId=${env.BUILD_ID}"
echo '\u2705 \u001B[32mLog Transfer (eNB - Run)\u001B[0m'
sh "sshpass -p \'${eNB_Password}\' scp -o 'StrictHostKeyChecking no' -o 'ConnectTimeout 10' ${eNB_Username}@${params.eNB_IPAddress}:${eNB_SourceCodePath}/cmake_targets/enb.log.zip ./enb.log.${env.BUILD_ID}.zip || true"

View File

@@ -58,6 +58,8 @@ def eNB_CommitID
def eNB_AllowMergeRequestProcess = false
def eNB_TargetBranch
def flexricOption = ""
pipeline {
agent {
label pythonExecutor
@@ -148,18 +150,24 @@ pipeline {
allParametersPresent = false
}
if (params.Flexric_Tag != null) {
echo "This pipeline is configured to run with a FlexRIC deployment."
echo "Appending FlexRicTag option to the list of options"
flexricOption = "--FlexRicTag=${params.Flexric_Tag}"
echo "Using new Flexric option: ${flexricOption}"
}
if (allParametersPresent) {
echo "All parameters are present"
if (eNB_AllowMergeRequestProcess) {
sh "git fetch"
sh "./ci-scripts/doGitLabMerge.sh --src-branch ${eNB_Branch} --src-commit ${eNB_CommitID} --target-branch ${eNB_TargetBranch} --target-commit latest"
} else {
} else if (eNB_CommitID != 'develop') {
sh "git fetch"
sh "git checkout -f ${eNB_CommitID}"
}
} else {
echo "Some parameters are missing"
sh "./ci-scripts/fail.sh"
error "Some parameters are missing"
}
}
}
@@ -181,6 +189,8 @@ pipeline {
if (fileExists(xmlFile)) {
mainPythonAllXmlFiles += "--XMLTestFile=" + xmlFile + " "
echo "Test XML file : ${xmlFile}"
} else {
echo "Test XML file ${xmlFile}: no such file"
}
}
}
@@ -188,13 +198,13 @@ pipeline {
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.eNB_Credentials}", usernameVariable: 'eNB_Username', passwordVariable: 'eNB_Password'],
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.EPC_Credentials}", usernameVariable: 'EPC_Username', passwordVariable: 'EPC_Password'],
]) {
sh "python3 main.py --mode=InitiateHtml --ranRepository=${eNB_Repository} --ranBranch=${eNB_Branch} --ranCommitID=${eNB_CommitID} --ranAllowMerge=${eNB_AllowMergeRequestProcess} --ranTargetBranch=${eNB_TargetBranch} ${mainPythonAllXmlFiles}"
sh "python3 main.py --mode=InitiateHtml --ranRepository=${eNB_Repository} --ranBranch=${eNB_Branch} --ranCommitID=${eNB_CommitID} --ranAllowMerge=${eNB_AllowMergeRequestProcess} --ranTargetBranch=${eNB_TargetBranch} ${flexricOption} ${mainPythonAllXmlFiles}"
String[] myXmlTestSuite = testXMLFile.split("\\r?\\n")
for (xmlFile in myXmlTestSuite) {
if (fileExists(xmlFile)) {
try {
timeout (time: 60, unit: 'MINUTES') {
sh "python3 main.py --mode=TesteNB --eNBIPAddress=${params.eNB_IPAddress} --ranRepository=${eNB_Repository} --ranBranch=${eNB_Branch} --ranCommitID=${eNB_CommitID} --ranAllowMerge=${eNB_AllowMergeRequestProcess} --ranTargetBranch=${eNB_TargetBranch} --eNBUserName=${eNB_Username} --eNBPassword=${eNB_Password} --eNBSourceCodePath=${params.eNB_SourceCodePath} --EPCIPAddress=${params.EPC_IPAddress} --EPCType=${params.EPC_Type} --EPCUserName=${EPC_Username} --EPCPassword=${EPC_Password} --EPCSourceCodePath=${params.EPC_SourceCodePath} --XMLTestFile=${xmlFile}"
sh "python3 main.py --mode=TesteNB --ranRepository=${eNB_Repository} --ranBranch=${eNB_Branch} --ranCommitID=${eNB_CommitID} --ranAllowMerge=${eNB_AllowMergeRequestProcess} --ranTargetBranch=${eNB_TargetBranch} ${flexricOption} --eNBIPAddress=${params.eNB_IPAddress} --eNBUserName=${eNB_Username} --eNBPassword=${eNB_Password} --eNBSourceCodePath=${params.eNB_SourceCodePath} --EPCIPAddress=${params.EPC_IPAddress} --EPCType=${params.EPC_Type} --EPCUserName=${EPC_Username} --EPCPassword=${EPC_Password} --EPCSourceCodePath=${params.EPC_SourceCodePath} --XMLTestFile=${xmlFile}"
}
} catch (Exception e) {
currentBuild.result = 'FAILURE'

View File

@@ -1,266 +0,0 @@
#!/bin/groovy
/*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
* except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/
// Template Jenkins Declarative Pipeline script to run Test w/ RF HW
// Location of the python executor node shall be in the same subnet as the others servers
def pythonExecutor = params.pythonExecutor
// Location of the test XML file to be run
def testXMLFile = params.pythonTestXmlFile
def mainPythonAllXmlFiles = ""
def buildStageStatus = true
// Name of the test stage
def testStageName = params.pipelineTestStageName
def lockResources = []
if (params.LockResources != null && params.LockResources.trim().length() > 0)
params.LockResources.trim().split(",").each{lockResources += [resource: it.trim()]}
// Terminate Status
def termUE = 0
def termENB = 1
def termSPGW = 2
def termMME = 3
def termHSS = 4
def termStatusArray = new Boolean[termHSS + 1]
termStatusArray[termUE] = false
termStatusArray[termENB] = false
termStatusArray[termSPGW] = false
termStatusArray[termMME] = false
termStatusArray[termHSS] = false
// Global Parameters. Normally they should be populated when the master job
// triggers the slave job with parameters
def eNB_Repository
def eNB_Branch
def eNB_CommitID
def eNB_AllowMergeRequestProcess = false
def eNB_TargetBranch
pipeline {
agent {
label pythonExecutor
}
options {
ansiColor('xterm')
lock(extra: lockResources)
}
stages {
stage ("Verify Parameters") {
steps {
script {
echo '\u2705 \u001B[32mVerify Parameters\u001B[0m'
def allParametersPresent = true
// It is already to late to check it
if (params.pythonExecutor != null) {
echo "eNB CI executor node : ${pythonExecutor}"
}
// If not present picking a default Stage Name
if (params.pipelineTestStageName == null) {
// picking default
testStageName = 'Template Test Stage'
}
if (params.LockResources == null) {
echo "no LockResources given"
allParametersPresent = false
}
if (params.UE_IPAddress == null) {
allParametersPresent = false
}
if (params.UE_SourceCodePath == null) {
allParametersPresent = false
}
if (params.UE_Credentials == null) {
allParametersPresent = false
}
// the following 4 parameters should be pushed by the master trigger
// if not present, take the job GIT variables (used for developing)
if (params.eNB_Repository == null) {
eNB_Repository = env.GIT_URL
} else {
eNB_Repository = params.eNB_Repository
}
echo "eNB_Repository : ${eNB_Repository}"
if (params.eNB_Branch == null) {
eNB_Branch = env.GIT_BRANCH
} else {
eNB_Branch = params.eNB_Branch
}
echo "eNB_Branch : ${eNB_Branch}"
if (params.eNB_CommitID == null) {
eNB_CommitID = env.GIT_COMMIT
} else {
eNB_CommitID = params.eNB_CommitID
}
echo "eNB_CommitID : ${eNB_CommitID}"
if (params.eNB_mergeRequest != null) {
eNB_AllowMergeRequestProcess = params.eNB_mergeRequest
if (eNB_AllowMergeRequestProcess) {
if (params.eNB_TargetBranch != null) {
eNB_TargetBranch = params.eNB_TargetBranch
} else {
eNB_TargetBranch = 'develop'
}
echo "eNB_TargetBranch : ${eNB_TargetBranch}"
}
}
/*
if (params.EPC_IPAddress == null) {
allParametersPresent = false
}
if (params.EPC_Type == null) {
allParametersPresent = false
}
if (params.EPC_SourceCodePath == null) {
allParametersPresent = false
}
if (params.EPC_Credentials == null) {
allParametersPresent = false
}
*/
if (allParametersPresent) {
echo "All parameters are present"
if (eNB_AllowMergeRequestProcess) {
sh "git fetch"
sh "./ci-scripts/doGitLabMerge.sh --src-branch ${eNB_Branch} --src-commit ${eNB_CommitID} --target-branch ${eNB_TargetBranch} --target-commit latest"
} else {
sh "git fetch"
sh "git checkout -f ${eNB_CommitID}"
}
} else {
echo "Some parameters are missing"
sh "./ci-scripts/fail.sh"
}
}
}
}
stage ("Build and Test") {
steps {
script {
dir ('ci-scripts') {
echo "\u2705 \u001B[32m${testStageName}\u001B[0m"
// If not present picking a default XML file
if (params.pythonTestXmlFile == null) {
// picking default
testXMLFile = 'xml_files/ue_band20_build.xml'
echo "Test XML file(default): ${testXMLFile}"
mainPythonAllXmlFiles += "--XMLTestFile=" + testXMLFile + " "
} else {
String[] myXmlTestSuite = testXMLFile.split("\\r?\\n")
for (xmlFile in myXmlTestSuite) {
if (fileExists(xmlFile)) {
mainPythonAllXmlFiles += "--XMLTestFile=" + xmlFile + " "
echo "Test XML file : ${xmlFile}"
}
}
}
withCredentials([
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.UE_Credentials}", usernameVariable: 'UE_Username', passwordVariable: 'UE_Password'],
]) {
sh "python3 main.py --mode=InitiateHtml --ranRepository=${eNB_Repository} --ranBranch=${eNB_Branch} --ranCommitID=${eNB_CommitID} --ranAllowMerge=${eNB_AllowMergeRequestProcess} --ranTargetBranch=${eNB_TargetBranch} ${mainPythonAllXmlFiles}"
String[] myXmlTestSuite = testXMLFile.split("\\r?\\n")
for (xmlFile in myXmlTestSuite) {
if (fileExists(xmlFile)) {
try {
timeout (time: 60, unit: 'MINUTES') {
sh "python3 main.py --mode=TestUE --UEIPAddress=${params.UE_IPAddress} --ranRepository=${eNB_Repository} --ranBranch=${eNB_Branch} --ranCommitID=${eNB_CommitID} --ranAllowMerge=${eNB_AllowMergeRequestProcess} --ranTargetBranch=${eNB_TargetBranch} --UEUserName=${UE_Username} --UEPassword=${UE_Password} --UESourceCodePath=${params.UE_SourceCodePath} --XMLTestFile=${xmlFile}"
}
} catch (Exception e) {
currentBuild.result = 'FAILURE'
buildStageStatus = false
}
}
}
sh "python3 main.py --mode=FinalizeHtml --finalStatus=${buildStageStatus} --UEIPAddress=${params.UE_IPAddress} --UEUserName=${UE_Username} --UEPassword=${UE_Password}"
}
}
}
}
}
stage('Log Collection') {
parallel {
stage('Log Collection (OAI UE - Build)') {
steps {
echo '\u2705 \u001B[32mLog Collection (OAI UE - Build)\u001B[0m'
withCredentials([
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.UE_Credentials}", usernameVariable: 'UE_Username', passwordVariable: 'UE_Password']
]) {
sh "python3 ci-scripts/main.py --mode=LogCollectBuild --UEIPAddress=${params.UE_IPAddress} --UEUserName=${UE_Username} --UEPassword=${UE_Password} --UESourceCodePath=${params.UE_SourceCodePath}"
echo '\u2705 \u001B[32mLog Transfer (UE - Build)\u001B[0m'
sh "sshpass -p \'${UE_Password}\' scp -o 'StrictHostKeyChecking no' -o 'ConnectTimeout 10' ${UE_Username}@${params.UE_IPAddress}:${UE_SourceCodePath}/cmake_targets/build.log.zip ./build.log.${env.BUILD_ID}.zip || true"
}
script {
if(fileExists("build.log.${env.BUILD_ID}.zip")) {
archiveArtifacts "build.log.${env.BUILD_ID}.zip"
}
}
}
}
stage('Log Collection (OAI UE - Run)') {
steps {
echo '\u2705 \u001B[32mLog Collection (OAI UE - Run)\u001B[0m'
withCredentials([
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.UE_Credentials}", usernameVariable: 'UE_Username', passwordVariable: 'UE_Password']
]) {
sh "python3 ci-scripts/main.py --mode=LogCollectOAIUE --UEIPAddress=${params.UE_IPAddress} --UEUserName=${UE_Username} --UEPassword=${UE_Password} --UESourceCodePath=${params.UE_SourceCodePath}"
echo '\u2705 \u001B[32mLog Transfer (UE - Run)\u001B[0m'
sh "sshpass -p \'${UE_Password}\' scp -o 'StrictHostKeyChecking no' -o 'ConnectTimeout 10' ${UE_Username}@${params.UE_IPAddress}:${UE_SourceCodePath}/cmake_targets/ue.log.zip ./ue.log.${env.BUILD_ID}.zip || true"
}
script {
if(fileExists("ue.log.${env.BUILD_ID}.zip")) {
archiveArtifacts "ue.log.${env.BUILD_ID}.zip"
}
if(fileExists("ci-scripts/test_results.html")) {
sh "mv ci-scripts/test_results.html test_results-${JOB_NAME}.html"
sh "sed -i -e 's#TEMPLATE_JOB_NAME#${JOB_NAME}#' -e 's@build #TEMPLATE_BUILD_ID@build #${BUILD_ID}@' -e 's#Build-ID: TEMPLATE_BUILD_ID#Build-ID: <a href=\"${BUILD_URL}\">${BUILD_ID}</a>#' -e 's#TEMPLATE_STAGE_NAME#${testStageName}#' test_results-${JOB_NAME}.html"
archiveArtifacts "test_results-${JOB_NAME}.html"
}
}
}
}
}
}
}
post {
always {
script {
if (params.pipelineZipsConsoleLog != null) {
if (params.pipelineZipsConsoleLog) {
echo "Archiving Jenkins console log"
sh "wget --no-check-certificate --no-proxy ${env.JENKINS_URL}/job/${env.JOB_NAME}/${env.BUILD_ID}/consoleText -O consoleText.log || true"
sh "zip -m consoleText.log.${env.BUILD_ID}.zip consoleText.log || true"
if(fileExists("consoleText.log.${env.BUILD_ID}.zip")) {
archiveArtifacts "consoleText.log.${env.BUILD_ID}.zip"
}
}
}
}
}
}
}

View File

@@ -1,160 +0,0 @@
#!/bin/groovy
/*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
* except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/
// necessary for reading JSON
import groovy.json.JsonSlurper
// Template Jenkins Declarative Pipeline script to run Test w/ RF HW
// Location of the python executor node shall be in the same subnet as the others servers
def pythonExecutor = params.pythonExecutor
def TARGET_BRANCH = "develop"
def ALLOW_MERGE = true
def GitPostArgs = ''
def jobStatus
pipeline {
agent {
label pythonExecutor
}
stages {
stage ("Launcher") {
steps {
script {
// retrieve MR that are opened nd with tag NSA
MR_LIST = sh returnStdout: true, script: 'curl --silent "https://gitlab.eurecom.fr/api/v4/projects/oai%2Fopenairinterface5g/merge_requests?state=opened&per_page=100&labels=NSA" | jq -cj "[.[].iid]"'
echo "List of selected MRs: ${MR_LIST.trim()}"
def MR_ARRAY = new JsonSlurper().parseText(MR_LIST.trim())
// for every selected MR, retrieve the branch name and the latest commit
for (MR in MR_ARRAY) {
SRC_BRANCH=sh returnStdout: true, script: """curl --silent "https://gitlab.eurecom.fr/api/v4/projects/oai%2Fopenairinterface5g/merge_requests/${MR}" | jq ".source_branch" || true """
SRC_BRANCH=SRC_BRANCH.trim()
COMMIT_ID=sh returnStdout: true, script: """curl --silent "https://gitlab.eurecom.fr/api/v4/projects/oai%2Fopenairinterface5g/merge_requests/${MR}" | jq ".sha" || true """
COMMIT_ID=COMMIT_ID.trim()
echo "Testing NSA on : ${MR} ${SRC_BRANCH} ${COMMIT_ID}"
commit = COMMIT_ID.replace("\"","")
GitPostArgs = MR + ' ' + commit + ' '
echo GitPostArgs
//calling LTE 2x2
jobName = "RAN-LTE-2x2-Module-OAIEPC"
jobStatus = build job: jobName, wait : true, propagate : false, parameters: [
string(name: 'eNB_MR', value: String.valueOf(MR)),
string(name: 'eNB_Branch', value: String.valueOf(SRC_BRANCH)),
string(name: 'eNB_CommitID', value: String.valueOf(COMMIT_ID)),
string(name: 'eNB_TargetBranch', value: String.valueOf(TARGET_BRANCH)),
booleanParam(name: 'eNB_mergeRequest', value: Boolean.valueOf(ALLOW_MERGE))
]
jobResult = jobStatus.getResult()
build_url = jobStatus.getAbsoluteUrl()
build_id = jobStatus.getNumber().toString()
GitPostArgs += jobName + ' ' + build_url + ' ' + build_id + ' ' + jobResult + ' '
echo GitPostArgs
//calling NSA B200
jobName = "RAN-NSA-B200-Module-LTEBOX"
jobStatus = build job: jobName, wait : true, propagate : false, parameters: [
string(name: 'eNB_MR', value: String.valueOf(MR)),
string(name: 'eNB_Branch', value: String.valueOf(SRC_BRANCH)),
string(name: 'eNB_CommitID', value: String.valueOf(COMMIT_ID)),
string(name: 'eNB_TargetBranch', value: String.valueOf(TARGET_BRANCH)),
booleanParam(name: 'eNB_mergeRequest', value: Boolean.valueOf(ALLOW_MERGE))
]
jobResult = jobStatus.getResult()
build_url = jobStatus.getAbsoluteUrl()
build_id = jobStatus.getNumber().toString()
GitPostArgs += jobName + ' ' + build_url + ' ' + build_id + ' ' + jobResult + ' '
echo GitPostArgs
//calling NSA 2x2
jobName = "RAN-NSA-2x2-Module-OAIEPC"
jobStatus = build job: jobName, wait : true, propagate : false, parameters: [
string(name: 'eNB_MR', value: String.valueOf(MR)),
string(name: 'eNB_Branch', value: String.valueOf(SRC_BRANCH)),
string(name: 'eNB_CommitID', value: String.valueOf(COMMIT_ID)),
string(name: 'eNB_TargetBranch', value: String.valueOf(TARGET_BRANCH)),
booleanParam(name: 'eNB_mergeRequest', value: Boolean.valueOf(ALLOW_MERGE))
]
jobResult = jobStatus.getResult()
build_url = jobStatus.getAbsoluteUrl()
build_id = jobStatus.getNumber().toString()
GitPostArgs += jobName + ' ' + build_url + ' ' + build_id + ' ' + jobResult + ' '
echo GitPostArgs
//calling SA
jobName = "RAN-SA-Module-CN5G"
jobStatus = build job: jobName, wait : true, propagate : false, parameters: [
string(name: 'eNB_MR', value: String.valueOf(MR)),
string(name: 'eNB_Branch', value: String.valueOf(SRC_BRANCH)),
string(name: 'eNB_CommitID', value: String.valueOf(COMMIT_ID)),
string(name: 'eNB_TargetBranch', value: String.valueOf(TARGET_BRANCH)),
booleanParam(name: 'eNB_mergeRequest', value: Boolean.valueOf(ALLOW_MERGE))
]
jobResult = jobStatus.getResult()
build_url = jobStatus.getAbsoluteUrl()
build_id = jobStatus.getNumber().toString()
GitPostArgs += jobName + ' ' + build_url + ' ' + build_id + ' ' + jobResult + ' '
echo GitPostArgs
//calling SA-AmariS
jobName = "RAN-SA-AmariS-CN5G"
jobStatus = build job: jobName, wait : true, propagate : false, parameters: [
string(name: 'eNB_MR', value: String.valueOf(MR)),
string(name: 'eNB_Branch', value: String.valueOf(SRC_BRANCH)),
string(name: 'eNB_CommitID', value: String.valueOf(COMMIT_ID)),
string(name: 'eNB_TargetBranch', value: String.valueOf(TARGET_BRANCH)),
booleanParam(name: 'eNB_mergeRequest', value: Boolean.valueOf(ALLOW_MERGE))
]
jobResult = jobStatus.getResult()
build_url = jobStatus.getAbsoluteUrl()
build_id = jobStatus.getNumber().toString()
GitPostArgs += jobName + ' ' + build_url + ' ' + build_id + ' ' + jobResult + ' '
echo GitPostArgs
//calling OAIUE N310-X300
jobName = "RAN-SA-OAIUE-N310-X300-CN5G"
jobStatus = build job: jobName, wait : true, propagate : false, parameters: [
string(name: 'eNB_MR', value: String.valueOf(MR)),
string(name: 'eNB_Branch', value: String.valueOf(SRC_BRANCH)),
string(name: 'eNB_CommitID', value: String.valueOf(COMMIT_ID)),
string(name: 'eNB_TargetBranch', value: String.valueOf(TARGET_BRANCH)),
booleanParam(name: 'eNB_mergeRequest', value: Boolean.valueOf(ALLOW_MERGE))
]
jobResult = jobStatus.getResult()
build_url = jobStatus.getAbsoluteUrl()
build_id = jobStatus.getNumber().toString()
GitPostArgs += jobName + ' ' + build_url + ' ' + build_id + ' ' + jobResult + ' '
echo GitPostArgs
//git report the test results in 1 block, at the end of the test sequence of one MR
dir ('ci-scripts/ran_dashboard') {
sh "python3 Hdashboard.py gitpost ${GitPostArgs}"
}
}
}
}
}
}
}

View File

@@ -41,12 +41,13 @@ import constants as CONST
#-----------------------------------------------------------
def ArgsParse(argvs,CiTestObj,RAN,HTML,EPC,ldpc,CONTAINERS,HELP,SCA,PHYSIM,CLUSTER):
def ArgsParse(argvs,CiTestObj,RAN,HTML,EPC,CONTAINERS,HELP,SCA,PHYSIM,CLUSTER):
py_param_file_present = False
py_params={}
force_local = False
while len(argvs) > 1:
myArgv = argvs.pop(1) # 0th is this file's name
@@ -54,6 +55,9 @@ def ArgsParse(argvs,CiTestObj,RAN,HTML,EPC,ldpc,CONTAINERS,HELP,SCA,PHYSIM,CLUST
if re.match('^\-\-help$', myArgv, re.IGNORECASE):
HELP.GenericHelp(CONST.Version)
sys.exit(0)
if re.match('^\-\-local$', myArgv, re.IGNORECASE):
force_local = True
#--apply=<filename> as parameters file, to replace inline parameters
elif re.match('^\-\-Apply=(.+)$', myArgv, re.IGNORECASE):
@@ -78,7 +82,6 @@ def ArgsParse(argvs,CiTestObj,RAN,HTML,EPC,ldpc,CONTAINERS,HELP,SCA,PHYSIM,CLUST
CiTestObj.ranRepository = matchReg.group(1)
RAN.ranRepository=matchReg.group(1)
HTML.ranRepository=matchReg.group(1)
ldpc.ranRepository=matchReg.group(1)
CONTAINERS.ranRepository=matchReg.group(1)
SCA.ranRepository=matchReg.group(1)
PHYSIM.ranRepository=matchReg.group(1)
@@ -89,7 +92,6 @@ def ArgsParse(argvs,CiTestObj,RAN,HTML,EPC,ldpc,CONTAINERS,HELP,SCA,PHYSIM,CLUST
else:
matchReg = re.match('^\-\-ranAllowMerge=(.+)$', myArgv, re.IGNORECASE)
doMerge = matchReg.group(1)
ldpc.ranAllowMerge=matchReg.group(1)
if ((doMerge == 'true') or (doMerge == 'True')):
CiTestObj.ranAllowMerge = True
RAN.ranAllowMerge=True
@@ -106,7 +108,6 @@ def ArgsParse(argvs,CiTestObj,RAN,HTML,EPC,ldpc,CONTAINERS,HELP,SCA,PHYSIM,CLUST
CiTestObj.ranBranch = matchReg.group(1)
RAN.ranBranch=matchReg.group(1)
HTML.ranBranch=matchReg.group(1)
ldpc.ranBranch=matchReg.group(1)
CONTAINERS.ranBranch=matchReg.group(1)
SCA.ranBranch=matchReg.group(1)
PHYSIM.ranBranch=matchReg.group(1)
@@ -119,7 +120,6 @@ def ArgsParse(argvs,CiTestObj,RAN,HTML,EPC,ldpc,CONTAINERS,HELP,SCA,PHYSIM,CLUST
CiTestObj.ranCommitID = matchReg.group(1)
RAN.ranCommitID=matchReg.group(1)
HTML.ranCommitID=matchReg.group(1)
ldpc.ranCommitID=matchReg.group(1)
CONTAINERS.ranCommitID=matchReg.group(1)
SCA.ranCommitID=matchReg.group(1)
PHYSIM.ranCommitID=matchReg.group(1)
@@ -132,7 +132,6 @@ def ArgsParse(argvs,CiTestObj,RAN,HTML,EPC,ldpc,CONTAINERS,HELP,SCA,PHYSIM,CLUST
CiTestObj.ranTargetBranch = matchReg.group(1)
RAN.ranTargetBranch=matchReg.group(1)
HTML.ranTargetBranch=matchReg.group(1)
ldpc.ranTargetBranch=matchReg.group(1)
CONTAINERS.ranTargetBranch=matchReg.group(1)
SCA.ranTargetBranch=matchReg.group(1)
PHYSIM.ranTargetBranch=matchReg.group(1)
@@ -141,7 +140,6 @@ def ArgsParse(argvs,CiTestObj,RAN,HTML,EPC,ldpc,CONTAINERS,HELP,SCA,PHYSIM,CLUST
if re.match('^\-\-eNBIPAddress=(.+)$', myArgv, re.IGNORECASE):
matchReg = re.match('^\-\-eNBIPAddress=(.+)$', myArgv, re.IGNORECASE)
RAN.eNBIPAddress=matchReg.group(1)
ldpc.eNBIpAddr=matchReg.group(1)
CONTAINERS.eNBIPAddress=matchReg.group(1)
SCA.eNBIPAddress=matchReg.group(1)
PHYSIM.eNBIPAddress=matchReg.group(1)
@@ -158,7 +156,6 @@ def ArgsParse(argvs,CiTestObj,RAN,HTML,EPC,ldpc,CONTAINERS,HELP,SCA,PHYSIM,CLUST
if re.match('^\-\-eNBUserName=(.+)$', myArgv, re.IGNORECASE):
matchReg = re.match('^\-\-eNBUserName=(.+)$', myArgv, re.IGNORECASE)
RAN.eNBUserName=matchReg.group(1)
ldpc.eNBUserName=matchReg.group(1)
CONTAINERS.eNBUserName=matchReg.group(1)
SCA.eNBUserName=matchReg.group(1)
PHYSIM.eNBUserName=matchReg.group(1)
@@ -175,7 +172,6 @@ def ArgsParse(argvs,CiTestObj,RAN,HTML,EPC,ldpc,CONTAINERS,HELP,SCA,PHYSIM,CLUST
if re.match('^\-\-eNBPassword=(.+)$', myArgv, re.IGNORECASE):
matchReg = re.match('^\-\-eNBPassword=(.+)$', myArgv, re.IGNORECASE)
RAN.eNBPassword=matchReg.group(1)
ldpc.eNBPassWord=matchReg.group(1)
CONTAINERS.eNBPassword=matchReg.group(1)
SCA.eNBPassword=matchReg.group(1)
PHYSIM.eNBPassword=matchReg.group(1)
@@ -192,7 +188,6 @@ def ArgsParse(argvs,CiTestObj,RAN,HTML,EPC,ldpc,CONTAINERS,HELP,SCA,PHYSIM,CLUST
if re.match('^\-\-eNBSourceCodePath=(.+)$', myArgv, re.IGNORECASE):
matchReg = re.match('^\-\-eNBSourceCodePath=(.+)$', myArgv, re.IGNORECASE)
RAN.eNBSourceCodePath=matchReg.group(1)
ldpc.eNBSourceCodePath=matchReg.group(1)
CONTAINERS.eNBSourceCodePath=matchReg.group(1)
SCA.eNBSourceCodePath=matchReg.group(1)
PHYSIM.eNBSourceCodePath=matchReg.group(1)
@@ -273,8 +268,11 @@ def ArgsParse(argvs,CiTestObj,RAN,HTML,EPC,ldpc,CONTAINERS,HELP,SCA,PHYSIM,CLUST
elif re.match('^\-\-BuildId=(.+)$', myArgv, re.IGNORECASE):
matchReg = re.match('^\-\-BuildId=(.+)$', myArgv, re.IGNORECASE)
RAN.BuildId = matchReg.group(1)
elif re.match('^\-\-FlexRicTag=(.+)$', myArgv, re.IGNORECASE):
matchReg = re.match('^\-\-FlexRicTag=(.+)$', myArgv, re.IGNORECASE)
CONTAINERS.flexricTag = matchReg.group(1)
else:
HELP.GenericHelp(CONST.Version)
sys.exit('Invalid Parameter: ' + myArgv)
return py_param_file_present, py_params, mode
return py_param_file_present, py_params, mode, force_local

View File

@@ -0,0 +1,284 @@
/* UE simulator configuration file version 2021-06-17
* LTE / 5G Non StandAlone
* Copyright (C) 2019-2021 Amarisoft
*/
{
#define N_ANTENNA_DL 1
#define N_ANTENNA_UL 1
#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_filename: "/tmp/ue.log",
/* Enable remote API and Web interface */
com_addr: "0.0.0.0:9002",
include "rf_driver_20/1chan.cfg",
/* If true, allow the simulation of several UEs at the same time and
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,
band: 78,
dl_nr_arfcn: DL_ARFCN,
ssb_nr_arfcn: DL_ARFCN,
subcarrier_spacing: 30,
n_antenna_dl: N_ANTENNA_DL,
n_antenna_ul: N_ANTENNA_UL,
rx_to_tx_latency:2,
global_timing_advance:-1,
}],
}],
/* UE capabilities */
/* USIM data */
ue_list: [
{
"ue_id" : 1,
"imsi": "001020000000001",
"K": "fec86ba6eb707ed08905757b1bb44b8f",
"sim_algo":"milenage",
"op": "1006020f0a478bf6b699f15c062e42b3",
as_release: 15,
ue_category: "nr",
apn:"oai",
attach_pdn_type:"ipv4",
default_nssai: [ { sst: 1, }, ],
default_pdu_session_snssai: { sst: 1, },
tun_setup_script: "ue-ifup",
},
{
"ue_id" : 2,
"imsi": "001020000000002",
"K": "fec86ba6eb707ed08905757b1bb44b8f",
"sim_algo":"milenage",
"op": "1006020f0a478bf6b699f15c062e42b3",
as_release: 15,
ue_category: "nr",
apn:"oai",
attach_pdn_type:"ipv4",
default_nssai: [ { sst: 1, }, ],
default_pdu_session_snssai: { sst: 1, },
tun_setup_script: "ue-ifup",
},
{
"ue_id" : 3,
"imsi": "001020000000003",
"K": "fec86ba6eb707ed08905757b1bb44b8f",
"sim_algo":"milenage",
"op": "1006020f0a478bf6b699f15c062e42b3",
as_release: 15,
ue_category: "nr",
apn:"oai",
attach_pdn_type:"ipv4",
default_nssai: [ { sst: 1, }, ],
default_pdu_session_snssai: { sst: 1, },
tun_setup_script: "ue-ifup",
},
{
"ue_id" : 4,
"imsi": "001020000000004",
"K": "fec86ba6eb707ed08905757b1bb44b8f",
"sim_algo":"milenage",
"op": "1006020f0a478bf6b699f15c062e42b3",
as_release: 15,
ue_category: "nr",
apn:"oai",
attach_pdn_type:"ipv4",
default_nssai: [ { sst: 1, }, ],
default_pdu_session_snssai: { sst: 1, },
tun_setup_script: "ue-ifup",
},
{
"ue_id" : 5,
"imsi": "001020000000005",
"K": "fec86ba6eb707ed08905757b1bb44b8f",
"sim_algo":"milenage",
"op": "1006020f0a478bf6b699f15c062e42b3",
as_release: 15,
ue_category: "nr",
apn:"oai",
attach_pdn_type:"ipv4",
default_nssai: [ { sst: 1, }, ],
default_pdu_session_snssai: { sst: 1, },
tun_setup_script: "ue-ifup",
},
{
"ue_id" : 6,
"imsi": "001020000000006",
"K": "fec86ba6eb707ed08905757b1bb44b8f",
"sim_algo":"milenage",
"op": "1006020f0a478bf6b699f15c062e42b3",
as_release: 15,
ue_category: "nr",
apn:"oai",
attach_pdn_type:"ipv4",
default_nssai: [ { sst: 1, }, ],
default_pdu_session_snssai: { sst: 1, },
tun_setup_script: "ue-ifup",
},
{
"ue_id" : 7,
"imsi": "001020000000007",
"K": "fec86ba6eb707ed08905757b1bb44b8f",
"sim_algo":"milenage",
"op": "1006020f0a478bf6b699f15c062e42b3",
as_release: 15,
ue_category: "nr",
apn:"oai",
attach_pdn_type:"ipv4",
default_nssai: [ { sst: 1, }, ],
default_pdu_session_snssai: { sst: 1, },
tun_setup_script: "ue-ifup",
},
{
"ue_id" : 8,
"imsi": "001020000000008",
"K": "fec86ba6eb707ed08905757b1bb44b8f",
"sim_algo":"milenage",
"op": "1006020f0a478bf6b699f15c062e42b3",
as_release: 15,
ue_category: "nr",
apn:"oai",
attach_pdn_type:"ipv4",
default_nssai: [ { sst: 1, }, ],
default_pdu_session_snssai: { sst: 1, },
tun_setup_script: "ue-ifup",
},
{
"ue_id" : 9,
"imsi": "001020000000009",
"K": "fec86ba6eb707ed08905757b1bb44b8f",
"sim_algo":"milenage",
"op": "1006020f0a478bf6b699f15c062e42b3",
as_release: 15,
ue_category: "nr",
apn:"oai",
attach_pdn_type:"ipv4",
default_nssai: [ { sst: 1, }, ],
default_pdu_session_snssai: { sst: 1, },
tun_setup_script: "ue-ifup",
},
{
"ue_id" : 10,
"imsi": "001020000000010",
"K": "fec86ba6eb707ed08905757b1bb44b8f",
"sim_algo":"milenage",
"op": "1006020f0a478bf6b699f15c062e42b3",
as_release: 15,
ue_category: "nr",
apn:"oai",
attach_pdn_type:"ipv4",
default_nssai: [ { sst: 1, }, ],
default_pdu_session_snssai: { sst: 1, },
tun_setup_script: "ue-ifup",
},
{
"ue_id" : 11,
"imsi": "001020000000011",
"K": "fec86ba6eb707ed08905757b1bb44b8f",
"sim_algo":"milenage",
"op": "1006020f0a478bf6b699f15c062e42b3",
as_release: 15,
ue_category: "nr",
apn:"oai",
attach_pdn_type:"ipv4",
default_nssai: [ { sst: 1, }, ],
default_pdu_session_snssai: { sst: 1, },
tun_setup_script: "ue-ifup",
},
{
"ue_id" : 12,
"imsi": "001020000000012",
"K": "fec86ba6eb707ed08905757b1bb44b8f",
"sim_algo":"milenage",
"op": "1006020f0a478bf6b699f15c062e42b3",
as_release: 15,
ue_category: "nr",
apn:"oai",
attach_pdn_type:"ipv4",
default_nssai: [ { sst: 1, }, ],
default_pdu_session_snssai: { sst: 1, },
tun_setup_script: "ue-ifup",
},
{
"ue_id" : 13,
"imsi": "001020000000013",
"K": "fec86ba6eb707ed08905757b1bb44b8f",
"sim_algo":"milenage",
"op": "1006020f0a478bf6b699f15c062e42b3",
as_release: 15,
ue_category: "nr",
apn:"oai",
attach_pdn_type:"ipv4",
default_nssai: [ { sst: 1, }, ],
default_pdu_session_snssai: { sst: 1, },
tun_setup_script: "ue-ifup",
},
{
"ue_id" : 14,
"imsi": "001020000000014",
"K": "fec86ba6eb707ed08905757b1bb44b8f",
"sim_algo":"milenage",
"op": "1006020f0a478bf6b699f15c062e42b3",
as_release: 15,
ue_category: "nr",
apn:"oai",
attach_pdn_type:"ipv4",
default_nssai: [ { sst: 1, }, ],
default_pdu_session_snssai: { sst: 1, },
tun_setup_script: "ue-ifup",
},
{
"ue_id" : 15,
"imsi": "001020000000015",
"K": "fec86ba6eb707ed08905757b1bb44b8f",
"sim_algo":"milenage",
"op": "1006020f0a478bf6b699f15c062e42b3",
as_release: 15,
ue_category: "nr",
apn:"oai",
attach_pdn_type:"ipv4",
default_nssai: [ { sst: 1, }, ],
default_pdu_session_snssai: { sst: 1, },
tun_setup_script: "ue-ifup",
},
{
"ue_id" : 16,
"imsi": "001020000000016",
"K": "fec86ba6eb707ed08905757b1bb44b8f",
"sim_algo":"milenage",
"op": "1006020f0a478bf6b699f15c062e42b3",
as_release: 15,
ue_category: "nr",
apn:"oai",
attach_pdn_type:"ipv4",
default_nssai: [ { sst: 1, }, ],
default_pdu_session_snssai: { sst: 1, },
tun_setup_script: "ue-ifup",
},
],
}

View File

@@ -5,6 +5,7 @@
{
#define N_ANTENNA_DL 2
#define N_ANTENNA_UL 2
#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",
@@ -25,8 +26,8 @@ allow dynamic UE creation from remote API */
rf_port: 0,
bandwidth: 20,
band: 78,
dl_nr_arfcn:630048,
ssb_nr_arfcn:630048,
dl_nr_arfcn: DL_ARFCN,
ssb_nr_arfcn: DL_ARFCN,
subcarrier_spacing: 30,
n_antenna_dl: N_ANTENNA_DL,
n_antenna_ul: N_ANTENNA_UL,

View File

@@ -1,79 +0,0 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Tue Jul 7 23:04:51 2020
@author: hardy
"""
import yaml
import sys
import subprocess
def main():
f_yaml=sys.argv[1]
f_sh=sys.argv[2]
#filename='py_params_template.yaml'
with open(f_yaml,'r') as file:
# The FullLoader parameter handles the conversion from YAML
# scalar values to Python the dictionary format
print('Loading '+f_yaml)
params = yaml.load(file,Loader=yaml.FullLoader)
with open(f_sh,'w') as f:
f.write('#!/bin/sh\n')
for i in range (0, len(params['steps'])):
step=params['steps'][i].split(',')
mode=step[0]
f_xml=step[1]
line='python3 main.py ' + \
'--mode='+ mode + ' ' + \
'--ranRepository=' + params['ranRepository'] + ' ' + \
'--ranBranch=' + params['ranBranch'] + ' ' + \
'--ranCommitID=' + params['ranCommitID'] + ' ' + \
'--ranAllowMerge=' + params['ranAllowMerge'] + ' ' + \
'--ranTargetBranch=' + params['ranTargetBranch'] + ' ' + \
\
'--UEIPAddress=' + params['UE']['UEIPAddress'] + ' ' + \
'--UEUserName=' + params['UE']['UEUserName'] + ' ' + \
'--UEPassword=' + params['UE']['UEPassword'] + ' ' + \
'--UESourceCodePath=' + params['UE']['UESourceCodePath'] + ' ' + \
\
'--EPCIPAddress=' + params['EPC']['EPCIPAddress'] + ' ' + \
'--EPCUserName=' + params['EPC']['EPCUserName'] + ' ' + \
'--EPCPassword=' + params['EPC']['EPCPassword'] + ' ' + \
'--EPCSourceCodePath=' + params['EPC']['EPCSourceCodePath'] + ' ' + \
'--EPCType=' + params['EPC']['EPCType'] + ' ' + \
\
'--eNBIPAddress=' + params['RAN'][0]['eNBIPAddress'] + ' ' + \
'--eNBUserName=' + params['RAN'][0]['eNBUserName'] + ' ' + \
'--eNBPassword=' + params['RAN'][0]['eNBPassword'] + ' ' + \
'--eNBSourceCodePath=' + params['RAN'][0]['eNBSourceCodePath'] + ' ' + \
\
'--eNB1IPAddress=' + params['RAN'][1]['eNB1IPAddress'] + ' ' + \
'--eNB1UserName=' + params['RAN'][1]['eNB1UserName'] + ' ' + \
'--eNB1Password=' + params['RAN'][1]['eNB1Password'] + ' ' + \
'--eNB1SourceCodePath=' + params['RAN'][1]['eNB1SourceCodePath'] + ' '
if mode!="InitiateHtml":
line+='--XMLTestFile=' + f_xml
#if mode is InitiateHTML we have a special processing to mention all xml files from the list
#loop starting at 1 to avoid the xml file mentioned with InitiateHtml in yaml file (file is none)
else:
for i in range (1, len(params['steps'])):
step=params['steps'][i].split(',')
f_xml=step[1]
line+='--XMLTestFile=' + f_xml+' '
line+='\n'
print(line)
f.write(line)
subprocess.call(['chmod','777',f_sh])
if __name__ == "__main__":
main()

View File

@@ -1,40 +0,0 @@
ranRepository : https://gitlab.eurecom.fr/oai/openairinterface5g.git
ranBranch : integration_2021_wk13_a
ranCommitID : 104aa7eed5d6702c1b9da663414079ef698da206
ranAllowMerge : 'yes'
ranTargetBranch : develop
steps:
- InitiateHtml,none
- TesteNB,xml_files/fr1_multi_node_build.xml
- TesteNB,xml_files/fr1_epc_start.xml
- TesteNB,xml_files/fr1_nsa_base_next.xml #ue toggle, nodes initialize, ue toggle, ping, nodes terminate
- TesteNB,xml_files/fr1_epc_closure.xml
RAN:
- eNBIPAddress : 192.168.18.199 #eNB on Minimassive
eNBUserName : oaicicd
eNBPassword : HzB*nkryaITdVd08TKlT#2Z5a!7M#~qn
eNBSourceCodePath : /tmp/CI-FR1-eNB
- eNB1IPAddress : 192.168.18.198 #gNB on Mozart
eNB1UserName : oaicicd
eNB1Password : 7zkDOFgh@w3HvRBMPTMh@BAx
eNB1SourceCodePath : /tmp/CI-FR1-gNB
EPC: #on Nikaia
EPCIPAddress : 192.168.18.99
EPCUserName : nikaia
EPCPassword : linux
EPCSourceCodePath : /tmp/CI-FR1-EPC
EPCType : ltebox
UE:
UEIPAddress : none
UEUserName : none
UEPassword : none
UESourceCodePath : none

View File

@@ -106,11 +106,11 @@ echo "Merged Commit is : $MERGE_COMMMIT"
echo "Target Init is : $TARGET_INIT_COMMIT"
# Retrieve the list of modified files since the latest develop commit
MODIFIED_FILES=`git log $TARGET_INIT_COMMIT..$MERGE_COMMMIT --oneline --name-status | egrep "^M|^A" | sed -e "s@^M\t*@@" -e "s@^A\t*@@" | sort | uniq`
MODIFIED_FILES=`git log $TARGET_INIT_COMMIT..$MERGE_COMMMIT --oneline --name-status | grep -E "^M|^A" | sed -e "s@^M\t*@@" -e "s@^A\t*@@" | sort | uniq`
NB_WARNINGS_FILES=0
# Retrieve list of warnings
LIST_WARNING_FILES=`egrep "error:|warning:" archives/*/*.txt | egrep -v "jobserver unavailable|Clock skew detected." | sed -e "s#^.*/home/ubuntu/tmp/##" -e "s#^.*/tmp/CI-eNB/##" -e "s#common/utils/.*/itti#common/utils/itti#" | awk -F ":" '{print $1}' | sort | uniq`
LIST_WARNING_FILES=`grep -E "error:|warning:" archives/*/*.txt | grep -E -v "jobserver unavailable|Clock skew detected." | sed -e "s#^.*/home/ubuntu/tmp/##" -e "s#^.*/tmp/CI-eNB/##" -e "s#common/utils/.*/itti#common/utils/itti#" | awk -F ":" '{print $1}' | sort | uniq`
echo ""
echo "List of files that have been modified by the Merge Request AND"

View File

@@ -64,18 +64,18 @@ then
awk '/#[ \t]*ifndef/ { gsub("^.*ifndef *",""); if (names[$1]!="") print "files with same {define ", FILENAME, names[$1]; names[$1]=FILENAME } /#[ \t]*define/ { gsub("^.*define *",""); if(names[$1]!=FILENAME) print "error in declaration", FILENAME, $1, names[$1]; nextfile }' `find openair* common targets executables -name *.h |grep -v LFDS` > header-files-w-incorrect-define.txt
# Testing if explicit GNU GPL license banner
egrep -irl --exclude-dir=.git --include=*.cpp --include=*.c --include=*.h "General Public License" . | egrep -v "openair3/NAS/COMMON/milenage.h" > files-w-gnu-gpl-license-banner.txt
grep -E -irl --exclude-dir=.git --include=*.cpp --include=*.c --include=*.h "General Public License" . | grep -E -v "openair3/NAS/COMMON/milenage.h" > files-w-gnu-gpl-license-banner.txt
# Looking at exotic/suspect banner
LIST_OF_FILES_W_BANNER=`egrep -irl --exclude-dir=.git --include=*.cpp --include=*.c --include=*.h "Copyright|copyleft" .`
LIST_OF_FILES_W_BANNER=`grep -E -irl --exclude-dir=.git --include=*.cpp --include=*.c --include=*.h "Copyright|copyleft" .`
if [ -f ./files-w-suspect-banner.txt ]; then rm -f ./files-w-suspect-banner.txt; fi
for FILE in $LIST_OF_FILES_W_BANNER
do
IS_NFAPI=`echo $FILE | egrep -c "nfapi/open-nFAPI|nfapi/oai_integration/vendor_ext" || true`
IS_OAI_LICENCE_PRESENT=`egrep -c "OAI Public License" $FILE || true`
IS_BSD_LICENCE_PRESENT=`egrep -c "the terms of the BSD Licence|License-Identifier: BSD-2-Clause" $FILE || true`
IS_MIT_LICENCE_PRESENT=`egrep -c "MIT License" $FILE || true`
IS_EXCEPTION=`echo $FILE | egrep -c "common/utils/collection/tree.h|common/utils/collection/queue.h|openair2/UTIL/OPT/packet-rohc.h|openair3/NAS/COMMON/milenage.h|openair1/PHY/CODING/crc.h|openair1/PHY/CODING/crcext.h|openair1/PHY/CODING/types.h|openair1/PHY/CODING/nrLDPC_decoder/nrLDPC_decoder_offload.c|openair1/PHY/CODING/nrLDPC_decoder/nrLDPC_offload.h" || true`
IS_NFAPI=`echo $FILE | grep -E -c "nfapi/open-nFAPI|nfapi/oai_integration/vendor_ext" || true`
IS_OAI_LICENCE_PRESENT=`grep -E -c "OAI Public License" $FILE || true`
IS_BSD_LICENCE_PRESENT=`grep -E -c "the terms of the BSD Licence|License-Identifier: BSD-2-Clause|License-Identifier: BSD-3-Clause" $FILE || true`
IS_MIT_LICENCE_PRESENT=`grep -E -c "MIT License" $FILE || true`
IS_EXCEPTION=`echo $FILE | grep -E -c "common/utils/collection/tree.h|common/utils/collection/queue.h|openair2/UTIL/OPT/packet-rohc.h|openair3/NAS/COMMON/milenage.h|openair1/PHY/CODING/crc.h|openair1/PHY/CODING/crcext.h|openair1/PHY/CODING/types.h" || true`
if [ $IS_OAI_LICENCE_PRESENT -eq 0 ] && [ $IS_BSD_LICENCE_PRESENT -eq 0 ] && [ $IS_MIT_LICENCE_PRESENT -eq 0 ]
then
if [ $IS_NFAPI -eq 0 ] && [ $IS_EXCEPTION -eq 0 ]
@@ -147,7 +147,7 @@ echo " ----------------------------------------------------------"
echo ""
# Retrieve the list of modified files since the latest develop commit
MODIFIED_FILES=`git log $TARGET_INIT_COMMIT..$MERGE_COMMMIT --oneline --name-status | egrep "^M|^A" | sed -e "s@^M\t*@@" -e "s@^A\t*@@" | sort | uniq`
MODIFIED_FILES=`git log $TARGET_INIT_COMMIT..$MERGE_COMMMIT --oneline --name-status | grep -E "^M|^A" | sed -e "s@^M\t*@@" -e "s@^A\t*@@" | sort | uniq`
NB_TO_FORMAT=0
if [ -f header-files-w-incorrect-define.txt ]
then
@@ -173,20 +173,20 @@ do
if [ $EXT = "c" ] || [ $EXT = "h" ] || [ $EXT = "cpp" ] || [ $EXT = "hpp" ]
then
# Testing if explicit GNU GPL license banner
GNU_EXCEPTION=`echo $FULLFILE | egrep -c "openair3/NAS/COMMON/milenage.h" || true`
GNU_EXCEPTION=`echo $FULLFILE | grep -E -c "openair3/NAS/COMMON/milenage.h" || true`
if [ $GNU_EXCEPTION -eq 0 ]
then
egrep -il "General Public License" $FULLFILE >> files-w-gnu-gpl-license-banner.txt
grep -E -il "General Public License" $FULLFILE >> files-w-gnu-gpl-license-banner.txt
fi
# Looking at exotic/suspect banner
IS_BANNER=`egrep -i -c "Copyright|copyleft" $FULLFILE || true`
IS_BANNER=`grep -E -i -c "Copyright|copyleft" $FULLFILE || true`
if [ $IS_BANNER -ne 0 ]
then
IS_NFAPI=`echo $FULLFILE | egrep -c "nfapi/open-nFAPI|nfapi/oai_integration/vendor_ext" || true`
IS_OAI_LICENCE_PRESENT=`egrep -c "OAI Public License" $FULLFILE || true`
IS_BSD_LICENCE_PRESENT=`egrep -c "the terms of the BSD Licence|License-Identifier: BSD-2-Clause" $FULLFILE || true`
IS_MIT_LICENCE_PRESENT=`egrep -c "MIT License" $FULLFILE || true`
IS_EXCEPTION=`echo $FULLFILE | egrep -c "common/utils/collection/tree.h|common/utils/collection/queue.h|openair2/UTIL/OPT/packet-rohc.h|openair3/NAS/COMMON/milenage.h|openair1/PHY/CODING/crc.h|openair1/PHY/CODING/crcext.h|openair1/PHY/CODING/types.h|openair1/PHY/CODING/nrLDPC_decoder/nrLDPC_decoder_offload.c|openair1/PHY/CODING/nrLDPC_decoder/nrLDPC_offload.h" || true`
IS_NFAPI=`echo $FULLFILE | grep -E -c "nfapi/open-nFAPI|nfapi/oai_integration/vendor_ext" || true`
IS_OAI_LICENCE_PRESENT=`grep -E -c "OAI Public License" $FULLFILE || true`
IS_BSD_LICENCE_PRESENT=`grep -E -c "the terms of the BSD Licence|License-Identifier: BSD-2-Clause|License-Identifier: BSD-3-Clause" $FULLFILE || true`
IS_MIT_LICENCE_PRESENT=`grep -E -c "MIT License" $FULLFILE || true`
IS_EXCEPTION=`echo $FULLFILE | grep -E -c "common/utils/collection/tree.h|common/utils/collection/queue.h|openair2/UTIL/OPT/packet-rohc.h|openair3/NAS/COMMON/milenage.h|openair1/PHY/CODING/crc.h|openair1/PHY/CODING/crcext.h|openair1/PHY/CODING/types.h" || true`
if [ $IS_OAI_LICENCE_PRESENT -eq 0 ] && [ $IS_BSD_LICENCE_PRESENT -eq 0 ] && [ $IS_MIT_LICENCE_PRESENT -eq 0 ]
then
if [ $IS_NFAPI -eq 0 ] && [ $IS_EXCEPTION -eq 0 ]

View File

@@ -18,16 +18,21 @@ up2:
IF: wwan0
MTU: 1500
sphex_quectel:
Host: sphex
InitScript: sudo stdbuf -oL /home/oaicicd/quectel-CM/quectel-CM -4 -s oai.ipv4 &> /tmp/quecel-cm.log &
TermScript: sudo -S killall --signal SIGKILL quectel-CM
AttachScript: sudo python3 ci_ctl_qtel.py /dev/ttyUSB3 wup
DetachScript: sudo python3 ci_ctl_qtel.py /dev/ttyUSB3 detach
up2-fhi72:
Host: up2
AttachScript: sudo /opt/mbim-fhi72/start_quectel_mbim.sh
DetachScript: sudo /opt/mbim-fhi72/stop_quectel_mbim.sh
NetworkScript: ip a show dev wwan0
IF: wwan0
MTU: 1500
up2-aerial:
Host: up2
AttachScript: sudo /opt/mbim-fhi72/start_quectel_mbim.sh
DetachScript: sudo /opt/mbim-fhi72/stop_quectel_mbim.sh
NetworkScript: ip a show dev wwan0
IF: wwan0
MTU: 1500
LogStore: /media/ci_qlogs
adb_ue_1:
Host: nano
@@ -58,9 +63,25 @@ adb_ue_2:
oc-cn5g:
Host: avra
Namespace: "oaicicd-core-for-ci-ran"
CNPath: "/opt/oai-cn5g-fed-develop-2025-jan"
NetworkScript: echo "inet 172.21.6.102"
RunIperf3Server: False
oc-cn5g-20897:
Host: cacofonix
Namespace: "oaicicd-core-for-fhi72"
CNPath: "/opt/oai-cn5g-fed-develop-2025-jan"
NetworkScript: echo "inet 172.21.6.105"
RunIperf3Server: False
oc-cn5g-20897-aerial2:
Host: aerial2
Namespace: "oaicicd-core-for-nvidia-aerial"
CNPath: "/opt/oai-cn5g-fed-develop-2025-jan"
NetworkScript: echo "inet 172.21.6.105"
RunIperf3Server: False
matix-cn5g:
Host: matix
NetworkScript: docker exec prod-trf-gen ip a show dev eth0
@@ -97,7 +118,15 @@ ltebox-nepes:
amarisoft_ue:
Host: amariue
InitScript: /root/lteue-linux-2023-10-27/ue/lteue /root/oaicicd/ran_sa_aw2s_asue_2x2/aw2s-multi-00102-2x2.cfg &
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
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
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
amarisoft_ue_1:
Host: amariue
@@ -228,13 +257,13 @@ lte_oai_ue_carabe:
MTU: 1500
rfsim5g_gnb_nos1:
Host: localhost
Host: "%%current_host%%"
NetworkScript: docker exec rfsim5g-oai-gnb ip a show dev oaitun_enb1
CmdPrefix: docker exec rfsim5g-oai-gnb
IF: oaitun_enb1
rfsim5g_ue:
Host: localhost
Host: "%%current_host%%"
NetworkScript: docker exec rfsim5g-oai-nr-ue ip a show dev oaitun_ue1
CmdPrefix: docker exec rfsim5g-oai-nr-ue
IF: oaitun_ue1
@@ -243,7 +272,7 @@ rfsim5g_ue:
MTU: 1500
rfsim5g_ue2:
Host: localhost
Host: "%%current_host%%"
NetworkScript: docker exec rfsim5g-oai-nr-ue2 ip a show dev oaitun_ue1
CmdPrefix: docker exec rfsim5g-oai-nr-ue2
IF: oaitun_ue1
@@ -252,7 +281,7 @@ rfsim5g_ue2:
MTU: 1500
rfsim5g_ue3:
Host: localhost
Host: "%%current_host%%"
NetworkScript: docker exec rfsim5g-oai-nr-ue3 ip a show dev oaitun_ue1
CmdPrefix: docker exec rfsim5g-oai-nr-ue3
IF: oaitun_ue1
@@ -261,7 +290,7 @@ rfsim5g_ue3:
MTU: 1500
rfsim5g_ue4:
Host: localhost
Host: "%%current_host%%"
NetworkScript: docker exec rfsim5g-oai-nr-ue4 ip a show dev oaitun_ue1
CmdPrefix: docker exec rfsim5g-oai-nr-ue4
IF: oaitun_ue1
@@ -270,7 +299,7 @@ rfsim5g_ue4:
MTU: 1500
rfsim5g_ue5:
Host: localhost
Host: "%%current_host%%"
NetworkScript: docker exec rfsim5g-oai-nr-ue5 ip a show dev oaitun_ue1
CmdPrefix: docker exec rfsim5g-oai-nr-ue5
IF: oaitun_ue1
@@ -279,7 +308,7 @@ rfsim5g_ue5:
MTU: 1500
rfsim5g_ue6:
Host: localhost
Host: "%%current_host%%"
NetworkScript: docker exec rfsim5g-oai-nr-ue6 ip a show dev oaitun_ue1
CmdPrefix: docker exec rfsim5g-oai-nr-ue6
IF: oaitun_ue1
@@ -288,7 +317,7 @@ rfsim5g_ue6:
MTU: 1500
rfsim5g_ue7:
Host: localhost
Host: "%%current_host%%"
NetworkScript: docker exec rfsim5g-oai-nr-ue7 ip a show dev oaitun_ue1
CmdPrefix: docker exec rfsim5g-oai-nr-ue7
IF: oaitun_ue1
@@ -297,7 +326,7 @@ rfsim5g_ue7:
MTU: 1500
rfsim5g_ue8:
Host: localhost
Host: "%%current_host%%"
NetworkScript: docker exec rfsim5g-oai-nr-ue8 ip a show dev oaitun_ue1
CmdPrefix: docker exec rfsim5g-oai-nr-ue8
IF: oaitun_ue1
@@ -306,7 +335,7 @@ rfsim5g_ue8:
MTU: 1500
rfsim5g_ue9:
Host: localhost
Host: "%%current_host%%"
NetworkScript: docker exec rfsim5g-oai-nr-ue9 ip a show dev oaitun_ue1
CmdPrefix: docker exec rfsim5g-oai-nr-ue9
IF: oaitun_ue1
@@ -315,7 +344,7 @@ rfsim5g_ue9:
MTU: 1500
rfsim5g_ue10:
Host: localhost
Host: "%%current_host%%"
NetworkScript: docker exec rfsim5g-oai-nr-ue10 ip a show dev oaitun_ue1
CmdPrefix: docker exec rfsim5g-oai-nr-ue10
IF: oaitun_ue1
@@ -324,12 +353,12 @@ rfsim5g_ue10:
MTU: 1500
rfsim5g_ext_dn:
Host: localhost
Host: "%%current_host%%"
NetworkScript: docker exec rfsim5g-oai-ext-dn ip a show dev eth0
CmdPrefix: docker exec rfsim5g-oai-ext-dn
rfsim4g_ue:
Host: localhost
Host: "%%current_host%%"
NetworkScript: docker exec rfsim4g-oai-lte-ue0 ip a show dev oaitun_ue1
CmdPrefix: docker exec rfsim4g-oai-lte-ue0
IF: oaitun_ue1
@@ -338,44 +367,30 @@ rfsim4g_ue:
MTU: 1500
rfsim4g_ext_dn:
Host: localhost
Host: "%%current_host%%"
NetworkScript: docker exec rfsim4g-trf-gen ip a show dev eth0
CmdPrefix: docker exec rfsim4g-trf-gen
rfsim4g_enb_nos1:
Host: localhost
Host: "%%current_host%%"
NetworkScript: docker exec rfsim4g-oai-enb ip a show dev oaitun_enb1
CmdPrefix: docker exec rfsim4g-oai-enb
IF: oaitun_enb1
rfsim4g_enb_fembms:
Host: localhost
Host: "%%current_host%%"
NetworkScript: docker exec rfsim4g-oai-enb ip a show dev oaitun_enm1
CmdPrefix: docker exec rfsim4g-oai-enb
IF: oaitun_enm1
rfsim4g_ue_fembms:
Host: localhost
Host: "%%current_host%%"
NetworkScript: docker exec rfsim4g-oai-lte-ue0 ip a show dev oaitun_uem1
CmdPrefix: docker exec rfsim4g-oai-lte-ue0
IF: oaitun_uem1
l2sim5g_ue:
Host: localhost
AttachScript: docker start l2sim-oai-nr-ue0
DetachScript: docker stop l2sim-oai-nr-ue0
NetworkScript: docker exec l2sim-oai-nr-ue0 ip a show dev oaitun_ue1
CmdPrefix: docker exec l2sim-oai-nr-ue0
IF: oaitun_ue1
MTU: 1500
l2sim5g_ext_dn:
Host: localhost
NetworkScript: docker exec l2sim-oai-ext-dn ip a show dev eth0
CmdPrefix: docker exec l2sim-oai-ext-dn
l2sim4g_ue:
Host: localhost
Host: "%%current_host%%"
AttachScript: docker start l2sim4g-oai-lte-ue1
DetachScript: docker stop l2sim4g-oai-lte-ue1
NetworkScript: docker exec l2sim4g-oai-lte-ue1 ip a show dev oaitun_ue1
@@ -384,6 +399,10 @@ l2sim4g_ue:
MTU: 1500
l2sim4g_ext_dn:
Host: localhost
Host: "%%current_host%%"
NetworkScript: docker exec l2sim4g-trf-gen ip a show dev eth0
CmdPrefix: docker exec l2sim4g-trf-gen
test:
Host: localhost
NetworkScript: echo "inet 127.0.0.1 mtu 1500"

View File

@@ -0,0 +1,82 @@
#/*
# * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
# * contributor license agreements. See the NOTICE file distributed with
# * this work for additional information regarding copyright ownership.
# * The OpenAirInterface Software Alliance licenses this file to You under
# * the OAI Public License, Version 1.1 (the "License"); you may not use this file
# * except in compliance with the License.
# * You may obtain a copy of the License at
# *
# * http://www.openairinterface.org/?page_id=698
# *
# * Unless required by applicable law or agreed to in writing, software
# * distributed under the License is distributed on an "AS IS" BASIS,
# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# * See the License for the specific language governing permissions and
# * limitations under the License.
# *-------------------------------------------------------------------------------
# * For more information about the OpenAirInterface (OAI) Software Alliance:
# * contact@openairinterface.org
# */
#---------------------------------------------------------------------
import logging
import re
# Define the mapping of physim_test values to search patterns
PHYSIM_PATTERN_MAPPING = {
'nr_ulsim': [
r'(Total PHY proc rx)\s+(\d+\.\d+)\s+us', # Pattern for RX PHY processing time
r'(ULSCH total decoding time)\s+(\d+\.\d+)\s+us', # Pattern for ULSCH decoding time
],
'nr_dlsim': [
r'(PHY proc tx)\s+(\d+\.\d+)\s+us', # Pattern for TX PHY processing time
r'(DLSCH encoding time)\s+(\d+\.\d+)\s+us', # Pattern for DLSCH encoding time
],
'ldpctest': [
r'(Encoding time mean):\s+(\d+\.\d+)\s+us', # Pattern for encoding time mean
r'(Decoding time mean):\s+(\d+\.\d+)\s+us', # Pattern for decoding time mean
],
}
# Define test conditions based on the simulation type
PHYSIM_TEST_CONDITION = {
'nr_ulsim': 'test OK', # For nr_ulsim, check if 'test OK' is present
'nr_dlsim': 'test OK', # For nr_dlsim, check if 'test OK' is present
'ldpctest': None, # No condition for ldpctest, just process the patterns
}
class Analysis():
def analyze_physim(log, physim_test, options, threshold):
search_patterns = PHYSIM_PATTERN_MAPPING.get(physim_test)
test_condition = PHYSIM_TEST_CONDITION.get(physim_test)
success = False
msg = ''
try:
with open(log, 'r') as f:
log_content = f.read()
except FileNotFoundError as e:
msg = f'{log} file not found, exception: {e}'
return False, msg
except Exception as e:
msg = f'Error while parsing log file {log}: exception: {e}'
return False, msg
if test_condition and test_condition not in log_content:
msg = f"Test did not succeed, '{test_condition}' not found in log file {log}."
return False, msg
time1_match = re.search(search_patterns[0], log_content)
time2_match = re.search(search_patterns[1], log_content)
if not(time1_match and time2_match):
msg = f"Processing time not found in log file {log}."
return False, msg
success = float(time2_match.group(2)) < float(threshold)
if success:
msg = f'{time1_match.group(1)}: {time1_match.group(2)} us\n{time2_match.group(1)}: {time2_match.group(2)} us'
else:
msg = f'{time1_match.group(1)}: {time1_match.group(2)} us\n{time2_match.group(1)}: {time2_match.group(2)} us exceeds a limit of {threshold} us'
return success,msg

View File

@@ -41,9 +41,8 @@ import cls_cmd
IMAGE_REGISTRY_SERVICE_NAME = "image-registry.openshift-image-registry.svc"
NAMESPACE = "oaicicd-ran"
OCUrl = "https://api.oai.cs.eurecom.fr:6443"
OCRegistry = "default-route-openshift-image-registry.apps.oai.cs.eurecom.fr/"
OCRegistry = "default-route-openshift-image-registry.apps.oai.cs.eurecom.fr"
CI_OC_RAN_NAMESPACE = "oaicicd-ran"
CI_OC_CORE_NAMESPACE = "oaicicd-core-for-ci-ran"
CN_IMAGES = ["mysql", "oai-nrf", "oai-amf", "oai-smf", "oai-upf", "oai-ausf", "oai-udm", "oai-udr", "oai-traffic-server"]
CN_CONTAINERS = ["", "-c nrf", "-c amf", "-c smf", "-c upf", "-c ausf", "-c udm", "-c udr", ""]
@@ -51,9 +50,9 @@ CN_CONTAINERS = ["", "-c nrf", "-c amf", "-c smf", "-c upf", "-c ausf", "-c udm"
def OC_login(cmd, ocUserName, ocPassword, ocProjectName):
if ocUserName == '' or ocPassword == '' or ocProjectName == '':
HELP.GenericHelp(CONST.Version)
sys.exit('Insufficient Parameter: no OC Credentials')
if OCRegistry.startswith("http") and not self.OCRegistry.endswith("/"):
sys.exit(f'ocRegistry {OCRegistry} should not start with http:// or https:// and end on a slash /')
raise ValueError('Insufficient Parameter: no OC Credentials')
if OCRegistry.startswith("http") or OCRegistry.endswith("/"):
raise ValueError(f'ocRegistry {OCRegistry} should not start with http:// or https:// and not end on a slash /')
ret = cmd.run(f'oc login -u {ocUserName} -p {ocPassword} --server {OCUrl}')
if ret.returncode != 0:
logging.error('\u001B[1m OC Cluster Login Failed\u001B[0m')
@@ -68,14 +67,13 @@ def OC_login(cmd, ocUserName, ocPassword, ocProjectName):
def OC_logout(cmd):
cmd.run(f'oc logout')
def OC_deploy_CN(cmd, ocUserName, ocPassword):
logging.debug('OC OAI CN5G: Deploying OAI CN5G on Openshift Cluster')
path = "/opt/oai-cn5g-fed-develop-2024-april-00102"
succeeded = OC_login(cmd, ocUserName, ocPassword, CI_OC_CORE_NAMESPACE)
def OC_deploy_CN(cmd, ocUserName, ocPassword, ocNamespace, path):
logging.debug(f'OC OAI CN5G: Deploying OAI CN5G on Openshift Cluster: {ocNamespace}')
succeeded = OC_login(cmd, ocUserName, ocPassword, ocNamespace)
if not succeeded:
return False, CONST.OC_LOGIN_FAIL
cmd.run('helm uninstall oai5gcn --wait --timeout 60s')
ret = cmd.run(f'helm install --wait --timeout 60s oai5gcn {path}/ci-scripts/charts/oai-5g-basic/.')
ret = cmd.run(f'helm install --wait --timeout 120s oai5gcn {path}/ci-scripts/charts/oai-5g-basic/.')
if ret.returncode != 0:
logging.error('OC OAI CN5G: Deployment failed')
OC_logout(cmd)
@@ -84,10 +82,9 @@ def OC_deploy_CN(cmd, ocUserName, ocPassword):
OC_logout(cmd)
return True, report
def OC_undeploy_CN(cmd, ocUserName, ocPassword):
logging.debug('OC OAI CN5G: Terminating CN on Openshift Cluster')
path = "/opt/oai-cn5g-fed-develop-2024-april-00102"
succeeded = OC_login(cmd, ocUserName, ocPassword, CI_OC_CORE_NAMESPACE)
def OC_undeploy_CN(cmd, ocUserName, ocPassword, ocNamespace, path):
logging.debug(f'OC OAI CN5G: Terminating CN on Openshift Cluster: {ocNamespace}')
succeeded = OC_login(cmd, ocUserName, ocPassword, ocNamespace)
if not succeeded:
return False, CONST.OC_LOGIN_FAIL
cmd.run(f'rm -Rf {path}/logs')
@@ -121,32 +118,20 @@ class Cluster:
self.OCUserName = ""
self.OCPassword = ""
self.OCProjectName = ""
self.OCUrl = "https://api.oai.cs.eurecom.fr:6443"
self.OCRegistry = "default-route-openshift-image-registry.apps.oai.cs.eurecom.fr/"
self.OCUrl = OCUrl
self.OCRegistry = OCRegistry
self.ranRepository = ""
self.ranBranch = ""
self.ranCommitID = ""
self.ranAllowMerge = False
self.ranTargetBranch = ""
self.cmd = None
self.imageToPull = ''
self.testSvrId = None
def _recreate_entitlements(self):
# recreating entitlements, don't care if deletion fails
self.cmd.run('oc delete secret etc-pki-entitlement')
ret = self.cmd.run('ls /etc/pki/entitlement/???????????????????.pem | tail -1', silent=True)
regres1 = re.search(r"/etc/pki/entitlement/[0-9]+.pem", ret.stdout)
ret = self.cmd.run('ls /etc/pki/entitlement/???????????????????-key.pem | tail -1', silent=True)
regres2 = re.search(r"/etc/pki/entitlement/[0-9]+-key.pem", ret.stdout)
if regres1 is None or regres2 is None:
logging.error("could not find entitlements")
return False
file1 = regres1.group(0)
file2 = regres2.group(0)
ret = self.cmd.run(f'oc create secret generic etc-pki-entitlement --from-file {file1} --from-file {file2}')
regres = re.search(r"secret/etc-pki-entitlement created", ret.stdout)
if ret.returncode != 0 or regres is None:
self.cmd.run(f'oc delete secret etc-pki-entitlement')
ret = self.cmd.run(f"oc get secret etc-pki-entitlement -n openshift-config-managed -o json | jq 'del(.metadata.resourceVersion)' | jq 'del(.metadata.creationTimestamp)' | jq 'del(.metadata.uid)' | jq 'del(.metadata.namespace)' | oc create -f -", silent=True)
if ret.returncode != 0:
logging.error("could not create secret/etc-pki-entitlement")
return False
return True
@@ -223,7 +208,7 @@ class Cluster:
return -1
return int(result.group("size"))
def _deploy_pod(self, filename, timeout = 30):
def _deploy_pod(self, filename, timeout = 120):
ret = self.cmd.run(f'oc create -f {filename}')
result = re.search(f'pod/(?P<pod>[a-zA-Z0-9_\-]+) created', ret.stdout)
if result is None:
@@ -231,11 +216,9 @@ class Cluster:
return None
pod = result.group("pod")
logging.debug(f'checking if pod {pod} is in Running state')
while timeout > 0:
ret = self.cmd.run(f'oc get pod {pod} -o json | jq -Mc .status.phase', silent=True)
if re.search('"Running"', ret.stdout) is not None: return pod
timeout -= 1
time.sleep(1)
ret = self.cmd.run(f'oc wait --for=condition=ready pod {pod} --timeout={timeout}s', silent=True)
if ret.returncode == 0:
return pod
logging.error(f'pod {pod} did not reach Running state')
self._undeploy_pod(filename)
return None
@@ -243,59 +226,47 @@ class Cluster:
def _undeploy_pod(self, filename):
self.cmd.run(f'oc delete -f {filename}')
def PullClusterImage(self, HTML, RAN):
if self.testSvrId == None: self.testSvrId = self.eNBIPAddress
if self.imageToPull == '':
HELP.GenericHelp(CONST.Version)
sys.exit('Insufficient Parameter')
logging.debug(f'Pull OC image {self.imageToPull} to server {self.testSvrId}')
def PullClusterImage(self, HTML, node, images):
logging.debug(f'Pull OC image {images} to server {node}')
self.testCase_id = HTML.testCase_id
cmd = cls_cmd.getConnection(self.testSvrId)
succeeded = OC_login(cmd, self.OCUserName, self.OCPassword, CI_OC_RAN_NAMESPACE)
if not succeeded:
logging.error('\u001B[1m OC Cluster Login Failed\u001B[0m')
HTML.CreateHtmlTestRow('N/A', 'KO', CONST.OC_LOGIN_FAIL)
return False
ret = cmd.run(f'oc whoami -t | docker login -u oaicicd --password-stdin {self.OCRegistry}')
if ret.returncode != 0:
logging.error(f'\u001B[1m Unable to access OC project {CI_OC_RAN_NAMESPACE}\u001B[0m')
OC_logout(cmd)
cmd.close()
HTML.CreateHtmlTestRow('N/A', 'KO', CONST.OC_LOGIN_FAIL)
return False
for image in self.imageToPull:
imagePrefix = f'{self.OCRegistry}{CI_OC_RAN_NAMESPACE}'
imageTag = cls_containerize.ImageTagToUse(image, self.ranCommitID, self.ranBranch, self.ranAllowMerge)
ret = cmd.run(f'docker pull {imagePrefix}/{imageTag}')
if ret.returncode != 0:
logging.error(f'Could not pull {image} from local registry : {self.OCRegistry}')
OC_logout(cmd)
cmd.close()
HTML.CreateHtmlTestRow('msg', 'KO', CONST.ALL_PROCESSES_OK)
with cls_cmd.getConnection(node) as cmd:
succeeded = OC_login(cmd, self.OCUserName, self.OCPassword, CI_OC_RAN_NAMESPACE)
if not succeeded:
HTML.CreateHtmlTestRow('N/A', 'KO', CONST.OC_LOGIN_FAIL)
return False
cmd.run(f'docker tag {imagePrefix}/{imageTag} oai-ci/{imageTag}')
cmd.run(f'docker rmi {imagePrefix}/{imageTag}')
OC_logout(cmd)
cmd.close()
HTML.CreateHtmlTestRow('N/A', 'OK', CONST.ALL_PROCESSES_OK)
return True
ret = cmd.run(f'oc whoami -t | docker login -u oaicicd --password-stdin {self.OCRegistry}')
if ret.returncode != 0:
logging.error(f'cannot authenticate at registry')
OC_logout(cmd)
HTML.CreateHtmlTestRow('N/A', 'KO', CONST.OC_LOGIN_FAIL)
return False
tag = cls_containerize.CreateTag(self.ranCommitID, self.ranBranch, self.ranAllowMerge)
registry = f'{self.OCRegistry}/{CI_OC_RAN_NAMESPACE}'
success, msg = cls_containerize.Containerize.Pull_Image(cmd, images, tag, registry, None, None)
OC_logout(cmd)
param = f"on node {node}"
if success:
HTML.CreateHtmlTestRowQueue(param, 'OK', [msg])
else:
HTML.CreateHtmlTestRowQueue(param, 'KO', [msg])
return success
def BuildClusterImage(self, HTML):
if self.ranRepository == '' or self.ranBranch == '' or self.ranCommitID == '':
HELP.GenericHelp(CONST.Version)
sys.exit(f'Insufficient Parameter: ranRepository {self.ranRepository} ranBranch {ranBranch} ranCommitID {self.ranCommitID}')
raise ValueError(f'Insufficient Parameter: ranRepository {self.ranRepository} ranBranch {ranBranch} ranCommitID {self.ranCommitID}')
lIpAddr = self.eNBIPAddress
lSourcePath = self.eNBSourceCodePath
if lIpAddr == '' or lSourcePath == '':
sys.exit('Insufficient Parameter: eNBSourceCodePath missing')
raise ValueError('Insufficient Parameter: eNBSourceCodePath missing')
ocUserName = self.OCUserName
ocPassword = self.OCPassword
ocProjectName = self.OCProjectName
if ocUserName == '' or ocPassword == '' or ocProjectName == '':
HELP.GenericHelp(CONST.Version)
sys.exit('Insufficient Parameter: no OC Credentials')
if self.OCRegistry.startswith("http") and not self.OCRegistry.endswith("/"):
sys.exit(f'ocRegistry {self.OCRegistry} should not start with http:// or https:// and end on a slash /')
raise ValueError('Insufficient Parameter: no OC Credentials')
if self.OCRegistry.startswith("http") or self.OCRegistry.endswith("/"):
raise ValueError(f'ocRegistry {self.OCRegistry} should not start with http:// or https:// and not end on a slash /')
logging.debug(f'Building on cluster triggered from server: {lIpAddr}')
self.cmd = cls_cmd.RemoteCmd(lIpAddr)
@@ -303,10 +274,7 @@ class Cluster:
self.testCase_id = HTML.testCase_id
# Workaround for some servers, we need to erase completely the workspace
if self.forcedWorkspaceCleanup:
self.cmd.run(f'rm -Rf {lSourcePath}')
cls_containerize.CreateWorkspace(self.cmd, lSourcePath, self.ranRepository, self.ranCommitID, self.ranTargetBranch, self.ranAllowMerge)
self.cmd.cd(lSourcePath)
# to reduce the amount of data send to OpenShift, we
# manually delete all generated files in the workspace
self.cmd.run(f'rm -rf {lSourcePath}/cmake_targets/ran_build');
@@ -462,6 +430,34 @@ class Cluster:
self.cmd.run(f'oc logs {nrue_job} &> cmake_targets/log/oai-nr-ue.log')
self.cmd.run(f'oc get pods.metrics.k8s.io &>> cmake_targets/log/build-metrics.log', '\$', 10)
if status:
self._recreate_is_tag('ran-build-fhi72', imageTag, 'openshift/ran-build-fhi72-is.yaml')
self._recreate_bc('ran-build-fhi72', imageTag, 'openshift/ran-build-fhi72-bc.yaml')
self._retag_image_statement('ran-base', 'image-registry.openshift-image-registry.svc:5000/oaicicd-ran/ran-base', baseTag, 'docker/Dockerfile.build.fhi72.rhel9')
ranbuildfhi72_job = self._start_build('ran-build-fhi72')
attemptedImages += ['ran-build-fhi72']
wait = ranbuildfhi72_job is not None and self._wait_build_end([ranbuildfhi72_job], 1200)
if not wait: logging.error('error during build of ranbuildfhi72_job')
status = status and wait
self.cmd.run(f'oc logs {ranbuildfhi72_job} &> cmake_targets/log/ran-build-fhi72.log')
self.cmd.run(f'oc get pods.metrics.k8s.io &>> cmake_targets/log/build-metrics.log', '\$', 10)
if status:
self._recreate_is_tag('oai-gnb-fhi72', imageTag, 'openshift/oai-gnb-fhi72-is.yaml')
self._recreate_bc('oai-gnb-fhi72', imageTag, 'openshift/oai-gnb-fhi72-bc.yaml')
self._retag_image_statement('ran-base', 'image-registry.openshift-image-registry.svc:5000/oaicicd-ran/ran-base', baseTag, 'docker/Dockerfile.gNB.fhi72.rhel9')
self._retag_image_statement('ran-build-fhi72', 'image-registry.openshift-image-registry.svc:5000/oaicicd-ran/ran-build-fhi72', imageTag, 'docker/Dockerfile.gNB.fhi72.rhel9')
gnb_fhi72_job = self._start_build('oai-gnb-fhi72')
attemptedImages += ['oai-gnb-fhi72']
wait = gnb_fhi72_job is not None and self._wait_build_end([gnb_fhi72_job], 600)
if not wait: logging.error('error during build of gNB-fhi72')
status = status and wait
# recover logs
self.cmd.run(f'oc logs {gnb_fhi72_job} &> cmake_targets/log/oai-gnb-fhi72.log')
self.cmd.run(f'oc get pods.metrics.k8s.io &>> cmake_targets/log/build-metrics.log', '\$', 10)
# split and analyze logs
imageSize = {}
for image in attemptedImages:

View File

@@ -31,18 +31,26 @@ import subprocess as sp
import os
import paramiko
import uuid
import sys
import time
SSHTIMEOUT=7
def is_local(host):
return host is None or host.lower() in ["", "none", "localhost"]
# helper that returns either LocalCmd or RemoteCmd based on passed host name
def getConnection(host, d=None):
if host is None or host.lower() in ["", "none", "localhost"]:
if is_local(host):
return LocalCmd(d=d)
else:
return RemoteCmd(host, d=d)
def runScript(host, path, timeout, parameters=None, redirect=None, silent=False):
if is_local(host):
return LocalCmd.exec_script(path, timeout, parameters, redirect, silent)
else:
return RemoteCmd.exec_script(host, path, timeout, parameters, redirect, silent)
# provides a partial interface for the legacy SSHconnection class (getBefore(), command())
class Cmd(metaclass=abc.ABCMeta):
def cd(self, d, silent=False):
@@ -58,6 +66,10 @@ class Cmd(metaclass=abc.ABCMeta):
if not silent:
logging.debug(f'cd {self.cwd}')
@abc.abstractmethod
def exec_script(path, timeout, parameters=None, redirect=None, silent=False):
return
@abc.abstractmethod
def run(self, line, timeout=300, silent=False):
return
@@ -99,17 +111,33 @@ class LocalCmd(Cmd):
logging.debug(f'Working dir is {self.cwd}')
self.cp = sp.CompletedProcess(args='', returncode=0, stdout='')
def exec_script(path, timeout, parameters=None, redirect=None, silent=False):
if redirect and not redirect.startswith("/"):
raise ValueError(f"redirect must be absolute, but is {redirect}")
c = f"{path} {parameters}" if parameters else path
if not redirect:
ret = sp.run(c, shell=True, timeout=timeout, stdout=sp.PIPE, stderr=sp.STDOUT)
ret.stdout = ret.stdout.decode('utf-8').strip()
else:
with open(redirect, "w") as f:
ret = sp.run(c, shell=True, timeout=timeout, stdout=f, stderr=f)
ret.args += f" &> {redirect}"
ret.stdout = ""
if not silent:
logging.info(f"local> {ret.args}")
return ret
def run(self, line, timeout=300, silent=False, reportNonZero=True):
if not silent:
logging.info(line)
logging.info(f"local> {line}")
try:
if line.strip().endswith('&'):
# if we wait for stdout, subprocess does not return before the end of the command
# however, we don't want to wait for commands with &, so just return fake command
ret = sp.run(line, shell=True, cwd=self.cwd, timeout=5)
ret = sp.run(line, shell=True, cwd=self.cwd, timeout=5, executable='/bin/bash')
time.sleep(0.1)
else:
ret = sp.run(line, shell=True, cwd=self.cwd, stdout=sp.PIPE, stderr=sp.STDOUT, timeout=timeout)
ret = sp.run(line, shell=True, cwd=self.cwd, stdout=sp.PIPE, stderr=sp.STDOUT, timeout=timeout, executable='/bin/bash')
except Exception as e:
ret = sp.CompletedProcess(args=line, returncode=255, stdout=f'Exception: {str(e)}'.encode('utf-8'))
if ret.stdout is None:
@@ -128,7 +156,9 @@ class LocalCmd(Cmd):
def copyin(self, src, tgt, recursive=False):
if src[0] != '/' or tgt[0] != '/':
raise Exception('support only absolute file paths!')
raise Exception(f'support only absolute file paths (src {src} tgt {tgt})!')
if src == tgt:
return # nothing to copy, file is already where it should go
opt = '-r' if recursive else ''
return self.run(f'cp {opt} {src} {tgt}').returncode == 0
@@ -166,9 +196,8 @@ class RemoteCmd(Cmd):
def __init__(self, hostname, d=None):
cIdx = 0
logging.getLogger('paramiko').setLevel(logging.ERROR) # prevent spamming through Paramiko
self.client = paramiko.SSHClient()
self.client.set_missing_host_key_policy(paramiko.AutoAddPolicy())
self.hostname = hostname
self.client = RemoteCmd._ssh_init()
cfg = RemoteCmd._lookup_ssh_config(hostname)
self.cwd = d
self.cp = sp.CompletedProcess(args='', returncode=0, stdout='')
@@ -181,7 +210,15 @@ class RemoteCmd(Cmd):
cIdx +=1
raise Exception ("Error: max retries, did not connect to host")
def _ssh_init():
logging.getLogger('paramiko').setLevel(logging.ERROR) # prevent spamming through Paramiko
client = paramiko.SSHClient()
client.set_missing_host_key_policy(paramiko.AutoAddPolicy())
return client
def _lookup_ssh_config(hostname):
if is_local(hostname):
raise ValueError("Using localhost as SSH target is not allowed: use LocalCmd instead.")
ssh_config = paramiko.SSHConfig()
user_config_file = os.path.expanduser("~/.ssh/config")
if os.path.exists(user_config_file):
@@ -201,9 +238,33 @@ class RemoteCmd(Cmd):
cfg['sock'] = paramiko.ProxyCommand(ucfg['proxycommand'])
return cfg
def exec_script(host, path, timeout, parameters=None, redirect=None, silent=False):
if redirect and not redirect.startswith("/"):
raise ValueError(f"redirect must be absolute, but is {redirect}")
p = parameters if parameters else ""
r = f"> {redirect}" if redirect else ""
if not silent:
logging.info(f"local> ssh {host} bash -s {p} < {path} {r} # {path} from localhost")
client = RemoteCmd._ssh_init()
cfg = RemoteCmd._lookup_ssh_config(host)
client.connect(**cfg)
bash_opt = 'BASH_XTRACEFD=1' # write bash set -x output to stdout, see bash(1)
stdin, stdout, stderr = client.exec_command(f"{bash_opt} bash -s {p} {r}", timeout=timeout)
# open() the file f at path, read() it and write() it into the stdin of the bash -s cmd
with open(path) as f:
stdin.write(f.read())
stdin.close()
cmd = path
if parameters: cmd += f" {parameters}"
if redirect: cmd += f" &> {redirect}"
ret = sp.CompletedProcess(args=cmd, returncode=stdout.channel.recv_exit_status(), stdout=stdout.read(size=None) + stderr.read(size=None))
ret.stdout = ret.stdout.decode('utf-8').strip()
client.close()
return ret
def run(self, line, timeout=300, silent=False, reportNonZero=True):
if not silent:
logging.info(line)
logging.info(f"ssh[{self.hostname}]> {line}")
if self.cwd:
line = f"cd {self.cwd} && {line}"
try:
@@ -233,7 +294,7 @@ class RemoteCmd(Cmd):
# if recursive is True, tgt must be a directory (and src is file or directory)
# if recursive is False, tgt and src must be a file name
def copyout(self, src, tgt, recursive=False):
logging.debug(f"copyout: local:{src} -> remote:{tgt}")
logging.debug(f"copyout: local:{src} -> {self.hostname}:{tgt}")
if recursive:
tmpfile = f"{uuid.uuid4()}.tar"
abstmpfile = f"/tmp/{tmpfile}"
@@ -251,7 +312,7 @@ class RemoteCmd(Cmd):
# if recursive is True, tgt must be a directory (and src is file or directory)
# if recursive is False, tgt and src must be a file name
def copyin(self, src, tgt, recursive=False):
logging.debug(f"copyin: remote:{src} -> local:{tgt}")
logging.debug(f"copyin: {self.hostname}:{src} -> local:{tgt}")
if recursive:
tmpfile = f"{uuid.uuid4()}.tar"
abstmpfile = f"/tmp/{tmpfile}"

File diff suppressed because it is too large Load Diff

View File

@@ -1,94 +0,0 @@
# * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
# * contributor license agreements. See the NOTICE file distributed with
# * this work for additional information regarding copyright ownership.
# * The OpenAirInterface Software Alliance licenses this file to You under
# * the OAI Public License, Version 1.1 (the "License"); you may not use this file
# * except in compliance with the License.
# * You may obtain a copy of the License at
# *
# * http://www.openairinterface.org/?page_id=698
# *
# * Unless required by applicable law or agreed to in writing, software
# * distributed under the License is distributed on an "AS IS" BASIS,
# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# * See the License for the specific language governing permissions and
# * limitations under the License.
# *-------------------------------------------------------------------------------
# * For more information about the OpenAirInterface (OAI) Software Alliance:
# * contact@openairinterface.org
# */
#---------------------------------------------------------------------
#
# Required Python Version
# Python 3.x
#
#---------------------------------------------------------------------
#USAGE:
# log=Log_Mgt(Username,IPAddress,Password,Path)
# log.LogRotation()
import logging
import re
import subprocess
import sshconnection
class Log_Mgt:
def __init__(self,Username, IPAddress,Password,Path):
self.Username=Username
self.IPAddress=IPAddress
self.Password=Password
self.path=Path
#-----------------$
#PRIVATE# Methods$
#-----------------$
def __CheckUsedSpace(self):
HOST=self.Username+'@'+self.IPAddress
COMMAND="df "+ self.path
ssh = subprocess.Popen(["ssh", "%s" % HOST, COMMAND],shell=False,stdout=subprocess.PIPE,stderr=subprocess.PIPE)
result = ssh.stdout.readlines()
s=result[1].decode('utf-8').rstrip()#result[1] is the second line with the results we are looking for
used=s.split()[4] #get 4th field ex: 70%
m = re.match('^(\d+)\%',used)
if m is not None:
return int(m.group(1))
def __RemoveOldest(self, days):
mySSH = sshconnection.SSHConnection()
mySSH.open(self.IPAddress, self.Username, self.Password)
COMMAND='echo ' + self.Password + ' | sudo -S find ' + self.path + ' -type f -mtime +' + str(days) + ' -delete'
mySSH.command(COMMAND,'\$',20)
mySSH.close()
#-----------------$
#PUBLIC Methods$
#-----------------$
def LogRotation(self):
doLoop = True
nbDays = 14
while doLoop and nbDays > 1:
used_space = self.__CheckUsedSpace() #avail space in target folder
if used_space > 80 :
logging.debug('\u001B[1;37;41m Used Disk (' + str(used_space) + '%) > 80%, on ' + self.Username+'@'+self.IPAddress + '\u001B[0m')
logging.debug('\u001B[1;37;41m Removing Artifacts older than ' + str(nbDays) + ' days \u001B[0m')
self.__RemoveOldest(nbDays)
nbDays -= 1
else:
logging.debug('Used Disk (' + str(used_space) + '%) < 80%, on ' + self.Username+'@'+self.IPAddress +', no cleaning required')
doLoop = False

View File

@@ -25,30 +25,28 @@
#---------------------------------------------------------------------
#to use isfile
import os
import sys
import logging
#time.sleep
import time
import re
import subprocess
from datetime import datetime
import yaml
#for log rotation mgt
import cls_log_mgt
import cls_cmd
class Module_UE:
def __init__(self, module_name, filename="ci_infra.yaml"):
def __init__(self, module_name, node=None, filename="ci_infra.yaml"):
with open(filename, 'r') as f:
all_ues = yaml.load(f, Loader=yaml.FullLoader)
m = all_ues.get(module_name)
if m is None:
raise Exception(f'no such module name "{module_name}" in "{filename}"')
self.module_name = module_name
self.host = m['Host']
self.host = m['Host'] if m['Host'] != "%%current_host%%" else None
if node is None and self.host is None:
raise Exception(f'node not provided when needed')
elif node is not None and self.host is None:
self.host = node
self.cmd_dict = {
"attach": m.get('AttachScript'),
"detach": m.get('DetachScript'),
@@ -65,6 +63,8 @@ class Module_UE:
self.logStore = m.get('LogStore')
self.cmd_prefix = m.get('CmdPrefix')
self.runIperf3Server = m.get('RunIperf3Server', True)
self.namespace = m.get('Namespace')
self.cnPath = m.get('CNPath')
logging.info(f'initialized {self.module_name}@{self.host} from {filename}')
def __str__(self):
@@ -190,6 +190,12 @@ class Module_UE:
def getHost(self):
return self.host
def getNamespace(self):
return self.namespace
def getCNPath(self):
return self.cnPath
def getRunIperf3Server(self):
return self.runIperf3Server
@@ -198,35 +204,9 @@ class Module_UE:
def _enableTrace(self):
raise Exception("not implemented")
mySSH = sshconnection.SSHConnection()
mySSH.open(self.HostIPAddress, self.HostUsername, self.HostPassword)
#delete old artifacts
mySSH.command('echo ' + ' ' + ' | sudo -S rm -rf ci_qlog','\$',5)
#start Trace, artifact is created in home dir
mySSH.command('echo $USER; nohup sudo -E QLog/QLog -s ci_qlog -f NR5G.cfg > /dev/null 2>&1 &','\$', 5)
mySSH.close()
def _disableTrace(self):
raise Exception("not implemented")
mySSH = sshconnection.SSHConnection()
mySSH.open(self.HostIPAddress, self.HostUsername, self.HostPassword)
mySSH.command('echo ' + ' ' + ' | sudo -S killall --signal=SIGINT *QLog*', '\$',5)
mySSH.close()
def _logCollect(self):
raise Exception("not implemented")
mySSH = sshconnection.SSHConnection()
mySSH.open(self.HostIPAddress, self.HostUsername, self.HostPassword)
#archive qlog to USB stick in /media/usb-drive/ci_qlogs with datetime suffix
now=datetime.now()
now_string = now.strftime("%Y%m%d-%H%M")
source='ci_qlog'
destination= self.LogStore + '/ci_qlog_'+now_string+'.zip'
#qlog artifact is zipped into the target folder
mySSH.command('echo $USER; echo ' + ' ' + ' | nohup sudo -S zip -r '+destination+' '+source+' > /dev/null 2>&1 &','\$', 10)
mySSH.close()
#post action : log cleaning to make sure enough space is reserved for the next run
Log_Mgt=cls_log_mgt.Log_Mgt(self.HostUsername,self.HostIPAddress, self.HostPassword, self.LogStore)
return destination

84
ci-scripts/cls_native.py Normal file
View File

@@ -0,0 +1,84 @@
#/*
# * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
# * contributor license agreements. See the NOTICE file distributed with
# * this work for additional information regarding copyright ownership.
# * The OpenAirInterface Software Alliance licenses this file to You under
# * the OAI Public License, Version 1.1 (the "License"); you may not use this file
# * except in compliance with the License.
# * You may obtain a copy of the License at
# *
# * http://www.openairinterface.org/?page_id=698
# *
# * Unless required by applicable law or agreed to in writing, software
# * distributed under the License is distributed on an "AS IS" BASIS,
# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# * See the License for the specific language governing permissions and
# * limitations under the License.
# *-------------------------------------------------------------------------------
# * For more information about the OpenAirInterface (OAI) Software Alliance:
# * contact@openairinterface.org
# */
#---------------------------------------------------------------------
import logging
import re
import os
import cls_cmd
import cls_oai_html
import cls_analysis
import constants as CONST
LOG_PATH_PHYSIM = 'phy_sim_logs'
class Native():
def Build(test_case, HTML, host, directory, options):
logging.debug(f'Building on server: {host}')
HTML.testCase_id = test_case
with cls_cmd.getConnection(host) as ssh:
base = f"{directory}/cmake_targets"
ret = ssh.run(f"{base}/build_oai {options} > {base}/log/build_oai.log", timeout=900)
success = ret.returncode == 0
logs = ssh.run(f"cat {base}/log/build_oai.log", silent=True)
logging.debug(f"build finished with code {ret.returncode}, output:\n{logs.stdout}")
# create log directory, and copy build logs
target = f"{base}/build_log_{test_case}/"
ssh.run(f"mkdir -p {target}")
ssh.run(f"mv {base}/log/* {target}")
# check if build artifacts are there
# NOTE: build_oai should fail with exit code if it could not build, but it does not
build_dir = f"{base}/ran_build/build"
build_gnb = re.search('--gNB', options) is not None
if build_gnb:
success = success and ssh.run(f"ls {build_dir}/nr-softmodem").returncode == 0
build_enb = re.search('--eNB', options) is not None
if build_enb:
success = success and ssh.run(f"ls {build_dir}/lte-softmodem").returncode == 0
if success:
logging.info('\u001B[1m Building OAI Pass\u001B[0m')
HTML.CreateHtmlTestRow(options, 'OK', CONST.ALL_PROCESSES_OK)
else:
logging.error('\u001B[1m Building OAI Failed\u001B[0m')
HTML.CreateHtmlTestRow(options, 'KO', CONST.ALL_PROCESSES_OK)
return success
def Run_Physim(HTML, host, directory, options, physim_test, threshold):
logging.debug(f'Runnin {physim_test} on server: {host}')
workSpacePath = f'{directory}/cmake_targets'
os.system(f'mkdir -p ./{LOG_PATH_PHYSIM}')
runLogFile=f'physim_{HTML.testCase_id}.log'
with cls_cmd.getConnection(host) as cmd:
cmd.run(f'sudo {workSpacePath}/ran_build/build/{physim_test} {options} >> {workSpacePath}/{runLogFile}')
cmd.copyin(src=f'{workSpacePath}/{runLogFile}', tgt=f'{LOG_PATH_PHYSIM}/{runLogFile}')
success, msg = cls_analysis.Analysis.analyze_physim(f'{LOG_PATH_PHYSIM}/{runLogFile}', physim_test, options, threshold)
if success:
HTML.CreateHtmlTestRowQueue(options, 'OK', [msg])
else:
logging.error(msg)
HTML.CreateHtmlTestRowQueue(options, 'KO', [msg])
return success

View File

@@ -31,14 +31,12 @@
#-----------------------------------------------------------
# Import
#-----------------------------------------------------------
import sys # arg
import re # reg
import fileinput
import logging
import os
import time
import subprocess
from multiprocessing import Process, Lock, SimpleQueue
import constants as CONST
@@ -65,10 +63,6 @@ class HTMLManagement():
self.htmlTabIcons = []
self.testXMLfiles = []
self.testUnstable = False
self.testMinStableId = '999999'
self.testStabilityPointReached = False
self.htmleNBFailureMsg = ''
self.htmlUEFailureMsg = ''
@@ -153,7 +147,7 @@ class HTMLManagement():
self.htmlFile.write(' <td bgcolor = "lightcyan" > <span class="glyphicon glyphicon-tag"></span> Commit ID </td>\n')
self.htmlFile.write(' <td>' + self.ranCommitID + '</td>\n')
self.htmlFile.write(' </tr>\n')
if self.ranAllowMerge != '':
if self.ranAllowMerge != '' and self.ranCommitID != 'develop':
commit_message = subprocess.check_output("git log -n1 --pretty=format:\"%s\" " + self.ranCommitID, shell=True, universal_newlines=True)
commit_message = commit_message.strip()
self.htmlFile.write(' <tr>\n')
@@ -219,20 +213,13 @@ class HTMLManagement():
def CreateHtmlTabFooter(self, passStatus):
if ((not self.htmlFooterCreated) and (self.htmlHeaderCreated)):
testOkEvenIfUnstable = False
if self.testUnstable and not passStatus:
if self.testStabilityPointReached or self.testMinStableId == '999999':
testOkEvenIfUnstable = True
self.htmlFile = open('test_results.html', 'a')
self.htmlFile.write(' <tr>\n')
self.htmlFile.write(' <th bgcolor = "#33CCFF" colspan="3">Final Tab Status</th>\n')
if passStatus:
self.htmlFile.write(' <th bgcolor = "green" colspan="3"><font color="white">PASS <span class="glyphicon glyphicon-ok"></span> </font></th>\n')
else:
if testOkEvenIfUnstable:
self.htmlFile.write(' <th bgcolor = "orange" colspan="3"><font color="white">KNOWN UNSTABLE SCENARIO <span class="glyphicon glyphicon-exclamation-sign"></span> </font></th>\n')
else:
self.htmlFile.write(' <th bgcolor = "red" colspan="3"><font color="white">FAIL <span class="glyphicon glyphicon-remove"></span> </font></th>\n')
self.htmlFile.write(' <th bgcolor = "red" colspan="3"><font color="white">FAIL <span class="glyphicon glyphicon-remove"></span> </font></th>\n')
self.htmlFile.write(' </tr>\n')
self.htmlFile.write(' </table>\n')
self.htmlFile.write(' </div>\n')
@@ -242,10 +229,7 @@ class HTMLManagement():
cmd = "sed -i -e 's/__STATE_" + self.htmlTabNames[0] + "__//' test_results.html"
subprocess.run(cmd, shell=True)
else:
if testOkEvenIfUnstable:
cmd = "sed -i -e 's/__STATE_" + self.htmlTabNames[0] + "__/<span class=\"glyphicon glyphicon-exclamation-sign\"><\/span>/' test_results.html"
else:
cmd = "sed -i -e 's/__STATE_" + self.htmlTabNames[0] + "__/<span class=\"glyphicon glyphicon-remove\"><\/span>/' test_results.html"
cmd = "sed -i -e 's/__STATE_" + self.htmlTabNames[0] + "__/<span class=\"glyphicon glyphicon-remove\"><\/span>/' test_results.html"
subprocess.run(cmd, shell=True)
self.htmlFooterCreated = False
@@ -279,14 +263,6 @@ class HTMLManagement():
self.htmlFile.write('</html>\n')
self.htmlFile.close()
def CreateHtmlRetrySeparator(self, cntnumfails):
if ((not self.htmlFooterCreated) and (self.htmlHeaderCreated)):
self.htmlFile = open('test_results.html', 'a')
self.htmlFile.write(' <tr bgcolor = "#F0F0F0" >\n')
self.htmlFile.write(' <td colspan="6"><b> ---- Try Run #' + str(cntnumfails) + ' ---- </b></td>\n')
self.htmlFile.write(' </tr>\n')
self.htmlFile.close()
def CreateHtmlTestRow(self, options, status, processesStatus, machine='eNB'):
if (self.htmlFooterCreated or (not self.htmlHeaderCreated)):
return
@@ -468,6 +444,8 @@ class HTMLManagement():
self.htmlFile.write(f' <td bgcolor = "lightgreen" >{status}</td>\n')
elif (str(status) == 'KO'):
self.htmlFile.write(f' <td bgcolor = "lightcoral" >{status}</td>\n')
elif str(status) == 'SKIP':
self.htmlFile.write(f' <td bgcolor = "lightgray" >{status}</td>\n')
else:
addOrangeBK = True
self.htmlFile.write(f' <td bgcolor = "orange" >{status}</td>\n')

File diff suppressed because it is too large Load Diff

View File

@@ -1,281 +0,0 @@
# * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
# * contributor license agreements. See the NOTICE file distributed with
# * this work for additional information regarding copyright ownership.
# * The OpenAirInterface Software Alliance licenses this file to You under
# * the OAI Public License, Version 1.1 (the "License"); you may not use this file
# * except in compliance with the License.
# * You may obtain a copy of the License at
# *
# * http://www.openairinterface.org/?page_id=698
# *
# * Unless required by applicable law or agreed to in writing, software
# * distributed under the License is distributed on an "AS IS" BASIS,
# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# * See the License for the specific language governing permissions and
# * limitations under the License.
# *-------------------------------------------------------------------------------
# * For more information about the OpenAirInterface (OAI) Software Alliance:
# * contact@openairinterface.org
# */
#---------------------------------------------------------------------
# Python for CI of OAI-eNB + COTS-UE
#
# Required Python Version
# Python 3.x
#
# Required Python Package
# pexpect
#---------------------------------------------------------------------
#to use logging.info()
import logging
#to create a SSH object locally in the methods
import sshconnection
#to update the HTML object
import cls_oai_html
import cls_cmd
from multiprocessing import SimpleQueue
#for log folder maintenance
import os
import re
class PhySim:
def __init__(self):
self.buildargs = ""
self.runargs = ""
self.eNBIpAddr = ""
self.eNBUserName = ""
self.eNBPassWord = ""
self.eNBSourceCodePath = ""
self.ranRepository = ""
self.ranBranch = ""
self.ranCommitID= ""
self.ranAllowMerge= ""
self.ranTargetBranch= ""
self.exitStatus=0
self.forced_workspace_cleanup=False
#private attributes
self.__workSpacePath=''
self.__buildLogFile='compile_phy_sim.log'
self.__runLogFile=''
self.__runLogPath='phy_sim_logs'
#-----------------
#PRIVATE Methods
#-----------------
def __CheckResults_LDPCcudaTest(self,HTML,CONST,testcase_id):
mySSH = sshconnection.SSHConnection()
mySSH.open(self.eNBIpAddr, self.eNBUserName, self.eNBPassWord)
#retrieve run log file and store it locally$
mySSH.copyin(self.eNBIpAddr, self.eNBUserName, self.eNBPassWord, self.__workSpacePath+self.__runLogFile, '.')
mySSH.close()
#parse results looking for Encoding and Decoding mean values
runResults=[]
with open(self.__runLogFile) as f:
for line in f:
if 'mean' in line:
runResults.append(line)
#the values are appended for each mean value (2), so we take these 2 values from the list
info = runResults[0] + runResults[1]
#once parsed move the local logfile to its folder for tidiness
os.system('mv '+self.__runLogFile+' '+ self.__runLogPath+'/.')
HTML.CreateHtmlTestRowQueue(self.runargs, 'OK', [info])
return HTML
def __CheckResults_LDPCt2Test(self,HTML,CONST,testcase_id):
thrs_KO = int(self.timethrs)
mySSH = cls_cmd.getConnection(self.eNBIpAddr)
#retrieve run log file and store it locally$
mySSH.copyin(f'{self.__workSpacePath}{self.__runLogFile}', f'{self.__runLogFile}')
mySSH.close()
#parse results looking for encoder/decoder processing time values
with open(self.__runLogFile) as g:
for line in g:
res_enc = re.search(r"DLSCH encoding time\s+(\d+\.\d+)\s+us",line)
res_dec = re.search(r'ULSCH total decoding time\s+(\d+\.\d+)\s+us',line)
if res_dec is not None:
time = res_dec.group(1)
info = res_dec.group(0)
break
if res_enc is not None:
time = res_enc.group(1)
info = res_enc.group(0)
break
# In case the T2 board does work properly, there is no statistics
if res_enc is None and res_dec is None:
logging.error(f'no statistics: res_enc {res_enc} res_dec {res_dec}')
HTML.CreateHtmlTestRowQueue(self.runargs, 'KO', ['no statistics'])
self.exitStatus = 1
os.system(f'mv {self.__runLogFile} {self.__runLogPath}/.')
return HTML
#once parsed move the local logfile to its folder
os.system(f'mv {self.__runLogFile} {self.__runLogPath}/.')
if float(time) < thrs_KO:
HTML.CreateHtmlTestRowQueue(self.runargs, 'OK', [info])
else:
error_msg = f'Processing time exceeds a limit of {thrs_KO} us'
logging.error(error_msg)
HTML.CreateHtmlTestRowQueue(self.runargs, 'KO', [info + '\n' + error_msg])
self.exitStatus = 1
return HTML
def __CheckResults_NRulsimTest(self, HTML, CONST, testcase_id):
#retrieve run log file and store it locally
mySSH = sshconnection.SSHConnection()
filename = self.__workSpacePath + self.__runLogFile
ret = mySSH.copyin(self.eNBIpAddr, self.eNBUserName, self.eNBPassWord, filename, '.')
if ret != 0:
error_msg = f'could not recover test result file {filename}'
logging.error(error_msg)
HTML.CreateHtmlTestRowQueue("could not recover results", 'KO', [error_msg])
self.exitStatus = 1
return HTML
PUSCH_OK = False
with open(self.__runLogFile) as f:
PUSCH_OK = 'PUSCH test OK' in f.read()
# once parsed move the local logfile to its folder for tidiness
os.system(f'mv {self.__runLogFile} {self.__runLogPath}/.')
#updating the HTML with results
if PUSCH_OK:
HTML.CreateHtmlTestRowQueue(self.runargs, 'OK', 1, ["succeeded"])
else:
error_msg = 'error: no "PUSCH test OK"'
logging.error(error_msg)
HTML.CreateHtmlTestRowQueue(self.runargs, 'KO', 1, [error_msg])
self.exitStatus = 1
return HTML
def __CheckBuild_PhySim(self, HTML, CONST):
self.__workSpacePath=self.eNBSourceCodePath+'/cmake_targets/'
mySSH = sshconnection.SSHConnection()
mySSH.open(self.eNBIpAddr, self.eNBUserName, self.eNBPassWord)
#retrieve compile log file and store it locally
mySSH.copyin(self.eNBIpAddr, self.eNBUserName, self.eNBPassWord, self.__workSpacePath+self.__buildLogFile, '.')
#delete older run log file
mySSH.command('rm ' + self.__workSpacePath+self.__runLogFile, '\$', 5)
mySSH.close()
#check build result from local compile log file
with open(self.__buildLogFile) as f:
if 'BUILD SHOULD BE SUCCESSFUL' in f.read():
HTML.CreateHtmlTestRow(self.buildargs, 'OK', CONST.ALL_PROCESSES_OK, 'PhySim')
self.exitStatus=0
return HTML
logging.error('\u001B[1m Building Physical Simulators Failed\u001B[0m')
HTML.CreateHtmlTestRow(self.buildargs, 'KO', CONST.ALL_PROCESSES_OK, 'LDPC')
HTML.CreateHtmlTabFooter(False)
#exitStatus=1 will do a sys.exit in main
self.exitStatus = 1
return HTML
#-----------------$
#PUBLIC Methods$
#-----------------$
def Build_PhySim(self,htmlObj,constObj):
mySSH = sshconnection.SSHConnection()
mySSH.open(self.eNBIpAddr, self.eNBUserName, self.eNBPassWord)
#create working dir
mySSH.command('mkdir -p ' + self.eNBSourceCodePath, '\$', 5)
mySSH.command('cd ' + self.eNBSourceCodePath, '\$', 5)
if not self.ranRepository.lower().endswith('.git'):
self.ranRepository+='.git'
#git clone
mySSH.command('if [ ! -e .git ]; then stdbuf -o0 git clone ' + self.ranRepository + ' .; else stdbuf -o0 git fetch --prune; fi', '\$', 600)
#git config
mySSH.command('git config user.email "jenkins@openairinterface.org"', '\$', 5)
mySSH.command('git config user.name "OAI Jenkins"', '\$', 5)
#git clean depending on self.forced_workspace_cleanup captured in xml
if self.forced_workspace_cleanup==True:
logging.info('Cleaning workspace ...')
mySSH.command('echo ' + self.eNBPassWord + ' | sudo -S git clean -x -d -ff', '\$', 30)
else:
logging.info('Workspace cleaning was disabled')
# if the commit ID is provided, use it to point to it
if self.ranCommitID != '':
mySSH.command('git checkout -f ' + self.ranCommitID, '\$', 30)
# if the branch is not develop, then it is a merge request and we need to do
# the potential merge. Note that merge conflicts should have already been checked earlier
if (self.ranAllowMerge):
if self.ranTargetBranch == '':
if (self.ranBranch != 'develop') and (self.ranBranch != 'origin/develop'):
mySSH.command('git merge --ff origin/develop -m "Temporary merge for CI"', '\$', 30)
else:
logging.info('Merging with the target branch: ' + self.ranTargetBranch)
mySSH.command('git merge --ff origin/' + self.ranTargetBranch + ' -m "Temporary merge for CI"', '\$', 30)
#build
mySSH.command('source oaienv', '\$', 5)
mySSH.command('cd cmake_targets', '\$', 5)
mySSH.command('mkdir -p log', '\$', 5)
mySSH.command(f'./build_oai {self.buildargs} 2>&1 | tee {self.__buildLogFile}', '\$', 1500)
mySSH.close()
#check build status and update HTML object
lHTML = cls_oai_html.HTMLManagement()
lHTML=self.__CheckBuild_PhySim(htmlObj,constObj)
return lHTML
def Run_CUDATest(self,htmlObj,constObj,testcase_id):
self.__workSpacePath = self.eNBSourceCodePath+'/cmake_targets/'
#create run logs folder locally
os.system('mkdir -p ./'+self.__runLogPath)
#log file is tc_<testcase_id>.log remotely
self.__runLogFile='physim_'+str(testcase_id)+'.log'
#open a session for test run
mySSH = sshconnection.SSHConnection()
mySSH.open(self.eNBIpAddr, self.eNBUserName, self.eNBPassWord)
mySSH.command('cd '+self.__workSpacePath,'\$',5)
#run and redirect the results to a log file
mySSH.command(self.__workSpacePath+'ran_build/build/ldpctest ' + self.runargs + ' >> '+self.__runLogFile, '\$', 30)
mySSH.close()
#return updated HTML to main
lHTML = cls_oai_html.HTMLManagement()
lHTML=self.__CheckResults_LDPCcudaTest(htmlObj,constObj,testcase_id)
return lHTML
def Run_T2Test(self,htmlObj,constObj,testcase_id):
self.__workSpacePath = f'{self.eNBSourceCodePath}/cmake_targets/'
#create run logs folder locally
os.system(f'mkdir -p ./{self.__runLogPath}')
#log file is tc_<testcase_id>.log remotely
self.__runLogFile=f'physim_{str(testcase_id)}.log'
#open a session for test run
mySSH = cls_cmd.getConnection(self.eNBIpAddr)
mySSH.run(f'cd {self.__workSpacePath}')
#run and redirect the results to a log file
mySSH.run(f'sudo {self.__workSpacePath}ran_build/build/{self.runsim} {self.runargs} > {self.__workSpacePath}{self.__runLogFile} 2>&1')
mySSH.close()
#return updated HTML to main
lHTML = cls_oai_html.HTMLManagement()
lHTML=self.__CheckResults_LDPCt2Test(htmlObj,constObj,testcase_id)
return lHTML
def Run_NRulsimTest(self, htmlObj, constObj, testcase_id):
self.__workSpacePath=self.eNBSourceCodePath+'/cmake_targets/'
os.system(f'mkdir -p ./{self.__runLogPath}')
self.__runLogFile = f'physim_{testcase_id}.log'
mySSH = sshconnection.SSHConnection()
mySSH.open(self.eNBIpAddr, self.eNBUserName, self.eNBPassWord)
mySSH.command(f'cd {self.__workSpacePath}', '\$', 5)
mySSH.command(f'sudo {self.__workSpacePath}ran_build/build/nr_ulsim {self.runargs} > {self.__runLogFile} 2>&1', '\$', 30)
mySSH.close()
#return updated HTML to main
lHTML = self.__CheckResults_NRulsimTest(htmlObj, constObj, testcase_id)
return lHTML

View File

@@ -65,7 +65,7 @@ class PhySim:
#PUBLIC Methods$
#-----------------$
def Deploy_PhySim(self, HTML, RAN):
def Deploy_PhySim(self, HTML):
if self.ranRepository == '' or self.ranBranch == '' or self.ranCommitID == '':
HELP.GenericHelp(CONST.Version)
sys.exit('Insufficient Parameter')
@@ -123,8 +123,7 @@ class PhySim:
logging.error('\u001B[1m OC Cluster Login Failed\u001B[0m')
mySSH.close()
HTML.CreateHtmlTestRow('N/A', 'KO', CONST.OC_LOGIN_FAIL)
RAN.prematureExit = True
return
return False
else:
logging.debug('\u001B[1m Login to OC Cluster Successfully\u001B[0m')
mySSH.command(f'oc project {ocProjectName}', '\$', 30)
@@ -133,15 +132,12 @@ class PhySim:
mySSH.command('oc logout', '\$', 30)
mySSH.close()
HTML.CreateHtmlTestRow('N/A', 'KO', CONST.OC_PROJECT_FAIL)
RAN.prematureExit = True
return
return False
else:
logging.debug(f'\u001B[1m Now using project {ocProjectName}\u001B[0m')
# Using helm charts deployment
mySSH.command(f'grep -rl OAICICD_PROJECT ./charts/ | xargs sed -i -e "s#OAICICD_PROJECT#{ocProjectName}#"', '\$', 30)
mySSH.command(f'sed -i -e "s#TAG#{imageTag}#g" ./charts/physims/values.yaml', '\$', 6)
mySSH.command('helm install physim ./charts/physims/ --wait 2>&1 | tee -a cmake_targets/log/physim_helm_summary.txt', '\$', 30)
mySSH.command(f'helm install physim ./charts/physims/ --set global.image.version={imageTag} --wait 2>&1 | tee -a cmake_targets/log/physim_helm_summary.txt', '\$', 30)
if mySSH.getBefore().count('STATUS: deployed') == 0:
logging.error('\u001B[1m Deploying PhySim Failed using helm chart on OC Cluster\u001B[0m')
mySSH.command('helm uninstall physim | tee -a cmake_targets/log/physim_helm_summary.txt 2>&1', '\$', 30)
@@ -154,8 +150,7 @@ class PhySim:
mySSH.command('oc logout', '\$', 30)
mySSH.close()
self.AnalyzeLogFile_phySim()
RAN.prematureExit = True
return
return False
else:
logging.debug('\u001B[1m Deployed PhySim Successfully using helm chart\u001B[0m')
isRunning = False
@@ -166,7 +161,7 @@ class PhySim:
mySSH.command('oc get pods -o wide -l app=physim | tee -a cmake_targets/log/physim_pods_summary.txt', '\$', 30, resync=True)
running_count = mySSH.getBefore().count('Running')
completed_count = mySSH.getBefore().count('Completed')
if (running_count + completed_count) == 22:
if (running_count + completed_count) == 23:
logging.debug('\u001B[1m Running the physim test Scenarios\u001B[0m')
isRunning = True
podNames = re.findall('oai-[\S\d\w]+', mySSH.getBefore())
@@ -186,8 +181,7 @@ class PhySim:
mySSH.command('oc logout', '\$', 30)
HTML.CreateHtmlTestRow('N/A', 'KO', CONST.OC_PHYSIM_DEPLOY_FAIL)
HTML.CreateHtmlTestRowPhySimTestResult(self.testSummary,self.testResult)
RAN.prematureExit = True
return
return False
# Waiting to complete the running test
count = 0
isFinished = False
@@ -214,7 +208,7 @@ class PhySim:
mySSH.command('for pod in $(oc get pods | tail -n +2 | awk \'{print $1}\'); do oc describe pod $pod >> cmake_targets/log/physim_pods_summary.txt; done', '\$', 10)
mySSH.copyin(lIpAddr, lUserName, lPassWord, lSourcePath + '/cmake_targets/log/physim_test.txt', '.')
try:
listLogFiles = subprocess.check_output('egrep --colour=never "Execution Log file|Linux oai-" physim_test.txt', shell=True, universal_newlines=True)
listLogFiles = subprocess.check_output('grep -E --colour=never "Execution Log file|Linux oai-" physim_test.txt', shell=True, universal_newlines=True)
for line in listLogFiles.split('\n'):
res1 = re.search('Linux (?P<pod>oai-[a-zA-Z0-9\-]+) ', str(line))
res2 = re.search('Execution Log file = (?P<name>[a-zA-Z0-9\-\/\.\_\+]+)', str(line))
@@ -248,13 +242,13 @@ class PhySim:
HTML.CreateHtmlTestRowPhySimTestResult(self.testSummary,self.testResult)
logging.info('\u001B[1m Physical Simulator Pass\u001B[0m')
else:
RAN.prematureExit = True
if isFinished:
HTML.CreateHtmlTestRow('N/A', 'KO', CONST.ALL_PROCESSES_OK)
else:
HTML.CreateHtmlTestRow('Some test(s) timed-out!', 'KO', CONST.ALL_PROCESSES_OK)
HTML.CreateHtmlTestRowPhySimTestResult(self.testSummary,self.testResult)
logging.error('\u001B[1m Physical Simulator Fail\u001B[0m')
return self.testStatus
def AnalyzeLogFile_phySim(self):
mySSH = SSH.SSHConnection()

View File

@@ -36,8 +36,6 @@ import re # reg
import logging
import os
from pathlib import Path
import time
from multiprocessing import Process, Lock, SimpleQueue
#-----------------------------------------------------------
# OAI Testing modules
@@ -45,7 +43,6 @@ from multiprocessing import Process, Lock, SimpleQueue
import helpreadme as HELP
import constants as CONST
import cls_cmd
from cls_containerize import CreateWorkspace
#-----------------------------------------------------------
# Class Declaration
@@ -105,8 +102,7 @@ class StaticCodeAnalysis():
else:
full_ran_repo_name = self.ranRepository + '.git'
CreateWorkspace(cmd, lSourcePath, full_ran_repo_name, self.ranCommitID, self.ranTargetBranch, self.ranAllowMerge)
cmd.cd(lSourcePath)
logDir = f'{lSourcePath}/cmake_targets/build_log_{self.testCase_id}'
cmd.run(f'mkdir -p {logDir}')
cmd.run('docker image rm oai-cppcheck:bionic oai-cppcheck:focal')
@@ -215,12 +211,12 @@ class StaticCodeAnalysis():
HTML.CreateHtmlTestRowCppCheckResults(CCR)
logging.info('\u001B[1m Static Code Analysis Pass\u001B[0m')
return 0
return True
def LicenceAndFormattingCheck(self, HTML):
if self.ranRepository == '' or self.ranBranch == '' or self.ranCommitID == '':
HELP.GenericHelp(CONST.Version)
sys.exit('Insufficient Parameter')
# Workspace is no longer recreated from scratch.
# It implies that this method shall be called last within a build pipeline
# where workspace is already created
lIpAddr = self.eNBIPAddress
lUserName = self.eNBUserName
lPassWord = self.eNBPassword
@@ -232,14 +228,7 @@ class StaticCodeAnalysis():
logging.debug('Building on server: ' + lIpAddr)
cmd = cls_cmd.getConnection(lIpAddr)
self.testCase_id = HTML.testCase_id
# on RedHat/CentOS .git extension is mandatory
result = re.search('([a-zA-Z0-9\:\-\.\/])+\.git', self.ranRepository)
if result is not None:
full_ran_repo_name = self.ranRepository.replace('git/', 'git')
else:
full_ran_repo_name = self.ranRepository + '.git'
CreateWorkspace(cmd, lSourcePath, full_ran_repo_name, self.ranCommitID, self.ranTargetBranch, self.ranAllowMerge)
check_options = ''
if self.ranAllowMerge:
check_options = f'--build-arg MERGE_REQUEST=true --build-arg SRC_BRANCH={self.ranBranch}'
@@ -252,7 +241,7 @@ class StaticCodeAnalysis():
logDir = f'{lSourcePath}/cmake_targets/build_log_{self.testCase_id}'
cmd.run(f'mkdir -p {logDir}')
cmd.run('docker image rm oai-formatting-check:latest')
cmd.run(f'docker build --target oai-formatting-check --tag oai-formatting-check:latest {check_options} --file {lSourcePath}/ci-scripts/docker/Dockerfile.formatting.bionic . > {logDir}/oai-formatting-check.txt 2>&1')
cmd.run(f'docker build --target oai-formatting-check --tag oai-formatting-check:latest {check_options} --file {lSourcePath}/ci-scripts/docker/Dockerfile.formatting.bionic {lSourcePath} > {logDir}/oai-formatting-check.txt 2>&1')
cmd.run('docker image rm oai-formatting-check:latest')
cmd.run('docker image prune --force')
@@ -364,4 +353,4 @@ class StaticCodeAnalysis():
HTML.htmleNBFailureMsg = 'Could not access oai-formatting-check.txt file'
HTML.CreateHtmlTestRow('N/A', 'KO', CONST.ENB_PROCESS_NOLOGFILE_TO_ANALYZE)
return finalStatus
return finalStatus == 0

View File

@@ -0,0 +1,11 @@
# Colosseum Automated Testing
These scripts are used by a Jenkins [job](../Jenkinsfile-colosseum) to trigger automated testing of OpenAirInterface (OAI) gNB and softUE on the [Colosseum](https://www.northeastern.edu/colosseum/) Open RAN digital twin.
Once a test is triggered, a new OAI LXC container at the specified OAI version will be built on Colosseum (if not already present), and gNB and softUE will perform TCP uplink and downlink connectivity test via the iPerf [tool](https://iperf.fr/).
The OAI branch to build and test can be specified through the `eNB_Branch` parameter passed through Jenkins (`eNB_TargetBranch`, which defaults to the `develop` branch, is used if `eNB_Branch` is not specified).
The Colosseum network scenario to test is specified through the `Colosseum_Rf_Scenario` Jenkins parameter, which defaults to a base Colosseum scenario without artificially added channel effects (e.g., only hardware impariments of software-defined radios, cables, and channel emulator).
Once the test ends, results are analyzed through the OAI automated test report generation tool available [here](https://github.com/ztouchnetworks/openairinterface-automated-test-reports), which builds a test report from the iPerf and OAI logs, and marks the test as successful or unsuccessful.
Results from successful tests are saved in history files and used to compare more recent tests.
A test is considered successful if the downlink throughput achieved during the test is greather than or equal to the average of the test history, which spans successful test executed since May 2024.
This is used to identify possible regressions of OAI runs executed on the Colosseum testbed.

View File

@@ -1,5 +1,4 @@
#!/bin/bash
#/*
# * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
# * contributor license agreements. See the NOTICE file distributed with
@@ -21,34 +20,14 @@
# * contact@openairinterface.org
# */
# file init_nas_nos1
# brief loads the nasmesh module and sets up the radio bearers (used to provide ip interface without S1 interface)
# author Florian Kaltenberger
#
#######################################
set -x
load_module() {
mod_name=${1##*/}
mod_name=${mod_name%.*}
if awk "/$mod_name/ {found=1 ;exit} END {if (found!=1) exit 1}" /proc/modules
then
echo "module $mod_name already loaded: I remove it first"
sudo rmmod $mod_name
fi
echo loading $mod_name
sudo insmod $1
}
RESULT_FILE=$1
load_module $OPENAIR_DIR/cmake_targets/ran_build/build/nasmesh.ko
grep -A 1 "Final Status" ${RESULT_FILE} | grep "PASS"
if [ "$1" = "eNB" ]; then
echo "bring up oai0 interface for enb"
sudo ifconfig oai0 10.0.1.1 netmask 255.255.255.0 broadcast 10.0.1.255
$OPENAIR_DIR/cmake_targets/ran_build/build/rb_tool -a -c0 -i0 -z0 -s 10.0.1.1 -t 10.0.1.2 -r 1
if [ "$?" = 0 ]; then
echo '{"status": "successful"}' > results.json
else
if [ "$1" = "UE" ]; then
echo "bring up oai0 interface for UE"
sudo ifconfig oai0 10.0.1.2 netmask 255.255.255.0 broadcast 10.0.1.255
$OPENAIR_DIR/cmake_targets/ran_build/build/rb_tool -a -c0 -i0 -z0 -s 10.0.1.2 -t 10.0.1.1 -r 1
fi
fi
echo '{"status": "failed"}' > results.json
fi

View File

@@ -0,0 +1,38 @@
#!/bin/bash
#/*
# * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
# * contributor license agreements. See the NOTICE file distributed with
# * this work for additional information regarding copyright ownership.
# * The OpenAirInterface Software Alliance licenses this file to You under
# * the OAI Public License, Version 1.1 (the "License"); you may not use this file
# * except in compliance with the License.
# * You may obtain a copy of the License at
# *
# * http://www.openairinterface.org/?page_id=698
# *
# * Unless required by applicable law or agreed to in writing, software
# * distributed under the License is distributed on an "AS IS" BASIS,
# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# * See the License for the specific language governing permissions and
# * limitations under the License.
# *-------------------------------------------------------------------------------
# * For more information about the OpenAirInterface (OAI) Software Alliance:
# * contact@openairinterface.org
# */
set -eu
AWX_API_URL=https://10.100.1.253
AWX_JOB_EVENT_QUERY=job_events/?search=results_url
COL_USER=$1
COL_PASS=$2
AWX_API_JOB_PATH=$(jq -r '.url' launch.json)
# get result url and download test results
curl -s -f -k -u ${COL_USER}:${COL_PASS} -X GET ${AWX_API_URL}${AWX_API_JOB_PATH}${AWX_JOB_EVENT_QUERY} > result.json
set -x
RESULT=$(jq -r '.results[0].event_data.res.ansible_facts.results_url' result.json)
wget -q -O - ${RESULT} > results.tar.xz

View File

@@ -0,0 +1,53 @@
#!/bin/bash
#/*
# * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
# * contributor license agreements. See the NOTICE file distributed with
# * this work for additional information regarding copyright ownership.
# * The OpenAirInterface Software Alliance licenses this file to You under
# * the OAI Public License, Version 1.1 (the "License"); you may not use this file
# * except in compliance with the License.
# * You may obtain a copy of the License at
# *
# * http://www.openairinterface.org/?page_id=698
# *
# * Unless required by applicable law or agreed to in writing, software
# * distributed under the License is distributed on an "AS IS" BASIS,
# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# * See the License for the specific language governing permissions and
# * limitations under the License.
# *-------------------------------------------------------------------------------
# * For more information about the OpenAirInterface (OAI) Software Alliance:
# * contact@openairinterface.org
# */
set -eu
AWX_API_URL=https://10.100.1.253
AWX_JOB_ID=16
AWX_API_LAUNCH_PATH=/api/v2/job_templates/${AWX_JOB_ID}/launch/
COL_USER=$1
COL_PASS=$2
JENKINS_JOB_ID=$3
GIT_REPOSITORY=$4
GIT_BRANCH=$5
COLOSSEUM_RF_SCENARIO=$6
JENKINS_JOB_URL=$7
# assemble data to send
CURL_DATA=$(cat <<-END | jq -c .
{
"extra_vars":
{
"oai_repo": "${GIT_REPOSITORY}",
"oai_branch": "${GIT_BRANCH}",
"colosseum_rf_scenario": "${COLOSSEUM_RF_SCENARIO}",
"jenkins_job_id": "${JENKINS_JOB_ID}",
"jenkins_job_url": "${JENKINS_JOB_URL}"
}
}
END
)
# launch job
curl -s -f -k -u ${COL_USER}:${COL_PASS} -X POST -H "Content-Type: application/json" -d ${CURL_DATA} ${AWX_API_URL}${AWX_API_LAUNCH_PATH} > launch.json

View File

@@ -0,0 +1,28 @@
#!/bin/bash
#/*
# * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
# * contributor license agreements. See the NOTICE file distributed with
# * this work for additional information regarding copyright ownership.
# * The OpenAirInterface Software Alliance licenses this file to You under
# * the OAI Public License, Version 1.1 (the "License"); you may not use this file
# * except in compliance with the License.
# * You may obtain a copy of the License at
# *
# * http://www.openairinterface.org/?page_id=698
# *
# * Unless required by applicable law or agreed to in writing, software
# * distributed under the License is distributed on an "AS IS" BASIS,
# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# * See the License for the specific language governing permissions and
# * limitations under the License.
# *-------------------------------------------------------------------------------
# * For more information about the OpenAirInterface (OAI) Software Alliance:
# * contact@openairinterface.org
# */
set -eu
# sets final exit code and thus jenkins pass or fail
STATUS=$(jq -r '.status' results.json)
echo "job status: ${STATUS}"
[ "${STATUS}" = "successful" ]

View File

@@ -0,0 +1,47 @@
#!/bin/bash
#/*
# * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
# * contributor license agreements. See the NOTICE file distributed with
# * this work for additional information regarding copyright ownership.
# * The OpenAirInterface Software Alliance licenses this file to You under
# * the OAI Public License, Version 1.1 (the "License"); you may not use this file
# * except in compliance with the License.
# * You may obtain a copy of the License at
# *
# * http://www.openairinterface.org/?page_id=698
# *
# * Unless required by applicable law or agreed to in writing, software
# * distributed under the License is distributed on an "AS IS" BASIS,
# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# * See the License for the specific language governing permissions and
# * limitations under the License.
# *-------------------------------------------------------------------------------
# * For more information about the OpenAirInterface (OAI) Software Alliance:
# * contact@openairinterface.org
# */
set -xeu
AWX_API_URL=https://10.100.1.253
AWX_MAX_API_CHECKS=120
COL_USER=$1
COL_PASS=$2
AWX_API_JOB_PATH=$(jq -r '.url' launch.json)
# wait for job to complete
for ((try = 1; try <= ${AWX_MAX_API_CHECKS}; try++)); do
set +x
curl -s -f -k -u ${COL_USER}:${COL_PASS} -X GET ${AWX_API_URL}${AWX_API_JOB_PATH} > status.json
set -x
FINISHED=$(jq -r '.finished' status.json)
[ "${FINISHED}" = "null" ] || break
sleep 60
done
[ $try != $AWX_MAX_API_CHECKS ] || echo "WARNING: stopped retrying after $AWX_MAX_API_CHECKS times; timed out?"
echo "AWX job completed $FINISHED"

View File

@@ -228,7 +228,7 @@ RUs = (
nb_tx = 1
nb_rx = 1
att_tx = 0
att_rx = 0;
att_rx = 6;
eNB_instances = [0];
}
);

View File

@@ -230,7 +230,7 @@ RUs = (
max_pdschReferenceSignalPower = -27;
max_rxgain = 75;
eNB_instances = [0];
sdr_addrs = "mgmt_addr=172.21.19.13,addr=192.168.80.250";
sdr_addrs = "addr=192.168.80.250";
}
);

View File

@@ -230,7 +230,7 @@ RUs = (
max_pdschReferenceSignalPower = -27;
max_rxgain = 75;
eNB_instances = [0];
sdr_addrs = "mgmt_addr=172.21.19.13,addr=192.168.80.250";
sdr_addrs = "addr=192.168.80.250";
}
);

View File

@@ -230,7 +230,7 @@ RUs = (
max_pdschReferenceSignalPower = -27;
max_rxgain = 75;
eNB_instances = [0];
sdr_addrs = "mgmt_addr=172.21.19.13,addr=192.168.80.250";
sdr_addrs = "addr=192.168.80.250";
}
);

View File

@@ -191,7 +191,7 @@ RUs = (
nb_tx = 1
nb_rx = 1
att_tx = 6
att_rx = 6;
att_rx = 12;
bands = [38];
max_pdschReferenceSignalPower = -27;
max_rxgain = 125;

View File

@@ -191,7 +191,7 @@ RUs = (
nb_tx = 1
nb_rx = 1
att_tx = 6
att_rx = 6;
att_rx = 12;
bands = [38];
max_pdschReferenceSignalPower = -27;
max_rxgain = 125;

View File

@@ -224,7 +224,7 @@ RUs =
nb_tx = 1
nb_rx = 1
att_tx = 3
att_rx = 0;
att_rx = 6;
bands = [7];
max_pdschReferenceSignalPower = -27;
max_rxgain = 115;

View File

@@ -224,7 +224,7 @@ RUs =
nb_tx = 1
nb_rx = 1
att_tx = 3
att_rx = 0;
att_rx = 6;
bands = [7];
max_pdschReferenceSignalPower = -27;
max_rxgain = 115;

View File

@@ -224,7 +224,7 @@ RUs =
nb_tx = 1
nb_rx = 1
att_tx = 3
att_rx = 0;
att_rx = 6;
bands = [7];
max_pdschReferenceSignalPower = -27;
max_rxgain = 115;

View File

@@ -224,7 +224,7 @@ RUs =
nb_tx = 1
nb_rx = 1
att_tx = 3
att_rx = 0;
att_rx = 6;
bands = [7];
max_pdschReferenceSignalPower = -27;
max_rxgain = 115;

View File

@@ -224,7 +224,7 @@ RUs =
nb_tx = 1
nb_rx = 1
att_tx = 3
att_rx = 0;
att_rx = 6;
bands = [7];
max_pdschReferenceSignalPower = -27;
max_rxgain = 115;

View File

@@ -224,7 +224,7 @@ RUs =
nb_tx = 1
nb_rx = 1
att_tx = 3
att_rx = 0;
att_rx = 6;
bands = [7];
max_pdschReferenceSignalPower = -27;
max_rxgain = 115;

View File

@@ -1,7 +1,6 @@
Active_gNBs = ( "cu-rfsim");
# Asn1_verbosity, choice in: none, info, annoying
Asn1_verbosity = "none";
Num_Threads_PUSCH = 8;
gNBs =
(

View File

@@ -1,7 +1,6 @@
Active_gNBs = ( "gNB-Eurecom-CU");
# Asn1_verbosity, choice in: none, info, annoying
Asn1_verbosity = "none";
Num_Threads_PUSCH = 8;
gNBs =
(
@@ -22,8 +21,8 @@ gNBs =
tr_s_preference = "f1";
local_s_address = "192.168.68.194";
remote_s_address = "192.168.68.195";
local_s_address = "127.0.0.4";
remote_s_address = "127.0.0.5";
local_s_portc = 501;
local_s_portd = 2153;
remote_s_portc = 500;
@@ -44,8 +43,8 @@ gNBs =
NETWORK_INTERFACES :
{
GNB_IPV4_ADDRESS_FOR_NG_AMF = "192.168.68.194";
GNB_IPV4_ADDRESS_FOR_NGU = "192.168.68.194";
GNB_IPV4_ADDRESS_FOR_NG_AMF = "172.21.16.109";
GNB_IPV4_ADDRESS_FOR_NGU = "172.21.16.109";
GNB_PORT_FOR_S1U = 2152; # Spec 2152
};
}

View File

@@ -1,8 +1,6 @@
Active_gNBs = ( "gNB-OAI");
# Asn1_verbosity, choice in: none, info, annoying
Asn1_verbosity = "none";
Num_Threads_PUSCH = 8;
sa = 1;
gNBs =
(

View File

@@ -1,8 +1,6 @@
Active_gNBs = ( "gNB-OAI");
# Asn1_verbosity, choice in: none, info, annoying
Asn1_verbosity = "none";
Num_Threads_PUSCH = 8;
sa = 1;
gNBs =
(
@@ -23,8 +21,8 @@ gNBs =
tr_s_preference = "f1";
local_s_address = "192.168.68.194";
remote_s_address = "192.168.68.195";
local_s_address = "127.0.0.4";
remote_s_address = "127.0.0.5";
local_s_portc = 501;
local_s_portd = 2153;
remote_s_portc = 500;
@@ -46,16 +44,16 @@ gNBs =
(
{
type = "cp";
ipv4_cucp = "192.168.68.194";
ipv4_cucp = "127.0.0.4";
port_cucp = 38462;
ipv4_cuup = "192.168.68.196";
ipv4_cuup = "127.0.0.6";
port_cuup = 38462;
}
)
NETWORK_INTERFACES :
{
GNB_IPV4_ADDRESS_FOR_NG_AMF = "192.168.68.194";
GNB_IPV4_ADDRESS_FOR_NG_AMF = "172.21.16.109";
};
}
);

View File

@@ -1,7 +1,6 @@
Active_gNBs = ( "gNB-OAI");
# Asn1_verbosity, choice in: none, info, annoying
Asn1_verbosity = "none";
sa = 1;
gNBs =
(

View File

@@ -1,7 +1,6 @@
Active_gNBs = ( "gNB-OAI");
# Asn1_verbosity, choice in: none, info, annoying
Asn1_verbosity = "none";
sa = 1;
gNBs =
(
@@ -21,8 +20,8 @@ gNBs =
tr_s_preference = "f1";
local_s_address = "192.168.68.196";
remote_s_address = "192.168.68.195";
local_s_address = "127.0.0.6";
remote_s_address = "127.0.0.5";
local_s_portc = 501;
local_s_portd = 2153;
remote_s_portc = 500;
@@ -40,15 +39,15 @@ gNBs =
(
{
type = "up";
ipv4_cucp = "192.168.68.194";
ipv4_cuup = "192.168.68.196";
ipv4_cucp = "127.0.0.4";
ipv4_cuup = "127.0.0.6";
}
)
NETWORK_INTERFACES :
{
GNB_IPV4_ADDRESS_FOR_NG_AMF = "192.168.68.196";
GNB_IPV4_ADDRESS_FOR_NGU = "192.168.68.196";
GNB_IPV4_ADDRESS_FOR_NG_AMF = "172.21.16.109";
GNB_IPV4_ADDRESS_FOR_NGU = "172.21.16.109";
GNB_PORT_FOR_S1U = 2152; # Spec 2152
};
}

View File

@@ -91,8 +91,8 @@ gNBs =
ra_ResponseWindow = 4;
#ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR
#1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen
ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 3;
#oneHalf (0..15) 4,8,12,16,...60,64
ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4;
#one (0..15) 4,8,12,16,...60,64
ssb_perRACH_OccasionAndCB_PreamblesPerSSB = 15;
#ra_ContentionResolutionTimer
#(0..7) 8,16,24,32,40,48,56,64
@@ -118,10 +118,9 @@ gNBs =
pucchGroupHopping = 0;
hoppingId = 40;
p0_nominal = -70;
n_TimingAdvanceOffset = 0;
# ssb_PositionsInBurs_BitmapPR
# 1=short, 2=medium, 3=long
ssb_PositionsInBurst_PR = 2;
# TimingAdvanceOffset_n25600
n_TimingAdvanceOffset = 1;
ssb_PositionsInBurst_Bitmap = 1;
# ssb_periodicityServingCell
@@ -162,8 +161,8 @@ MACRLCs = (
num_cc = 1;
tr_s_preference = "local_L1";
tr_n_preference = "f1";
local_n_address = "192.168.68.195";
remote_n_address = "192.168.68.194";
local_n_address = "127.0.0.5";
remote_n_address = "127.0.0.4";
local_n_portc = 500;
local_n_portd = 2153;
remote_n_portc = 501;
@@ -196,20 +195,10 @@ RUs = (
max_pdschReferenceSignalPower = -27;
max_rxgain = 108;
eNB_instances = [0];
#beamforming 1x4 matrix:
bf_weights = [0x00007fff, 0x0000, 0x0000, 0x0000];
clock_src = "internal";
}
);
THREAD_STRUCT = (
{
#three config for level of parallelism "PARALLEL_SINGLE_THREAD", "PARALLEL_RU_L1_SPLIT", or "PARALLEL_RU_L1_TRX_SPLIT"
parallel_config = "PARALLEL_SINGLE_THREAD";
#two option for worker "WORKER_DISABLE" or "WORKER_ENABLE"
worker_config = "WORKER_ENABLE";
}
);
log_config : {
global_log_level = "info";

View File

@@ -90,7 +90,7 @@ gNBs =
#ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR
#1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen
ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4;
#oneHalf (0..15) 4,8,12,16,...60,64
#one (0..15) 4,8,12,16,...60,64
ssb_perRACH_OccasionAndCB_PreamblesPerSSB = 14;
#ra_ContentionResolutionTimer
#(0..7) 8,16,24,32,40,48,56,64
@@ -116,9 +116,7 @@ gNBs =
pucchGroupHopping = 0;
hoppingId = 40;
p0_nominal = -90;
# ssb_PositionsInBurs_BitmapPR
# 1=short, 2=medium, 3=long
ssb_PositionsInBurst_PR = 2;
ssb_PositionsInBurst_Bitmap = 1;
# ssb_periodicityServingCell
@@ -200,20 +198,10 @@ RUs = (
max_pdschReferenceSignalPower = -27;
max_rxgain = 114;
eNB_instances = [0];
#beamforming 1x4 matrix:
bf_weights = [0x00007fff, 0x0000, 0x0000, 0x0000];
clock_src = "internal";
}
);
THREAD_STRUCT = (
{
#three config for level of parallelism "PARALLEL_SINGLE_THREAD", "PARALLEL_RU_L1_SPLIT", or "PARALLEL_RU_L1_TRX_SPLIT"
parallel_config = "PARALLEL_SINGLE_THREAD";
#two option for worker "WORKER_DISABLE" or "WORKER_ENABLE"
worker_config = "WORKER_ENABLE";
}
);
rfsimulator: {
serveraddr = "server";
serverport = 4043;

View File

@@ -22,8 +22,9 @@ gNBs =
////////// Physical parameters:
min_rxtxtime = 6;
min_rxtxtime = 2;
do_CSIRS = 1;
do_SRS = 1;
servingCellConfigCommon = (
{
@@ -91,7 +92,7 @@ gNBs =
#ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR
#1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen
ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4;
#oneHalf (0..15) 4,8,12,16,...60,64
#one (0..15) 4,8,12,16,...60,64
ssb_perRACH_OccasionAndCB_PreamblesPerSSB = 14;
#ra_ContentionResolutionTimer
#(0..7) 8,16,24,32,40,48,56,64
@@ -117,9 +118,7 @@ gNBs =
pucchGroupHopping = 0;
hoppingId = 40;
p0_nominal = -90;
# ssb_PositionsInBurs_BitmapPR
# 1=short, 2=medium, 3=long
ssb_PositionsInBurst_PR = 2;
ssb_PositionsInBurst_Bitmap = 1;
# ssb_periodicityServingCell
@@ -169,8 +168,8 @@ MACRLCs = (
num_cc = 1;
tr_s_preference = "local_L1";
tr_n_preference = "f1";
local_n_address = "192.168.68.195";
remote_n_address = "192.168.68.194";
local_n_address = "127.0.0.5";
remote_n_address = "127.0.0.4";
local_n_portc = 500;
local_n_portd = 2153;
remote_n_portc = 501;
@@ -185,7 +184,7 @@ L1s = (
num_cc = 1;
tr_n_preference = "local_mac";
prach_dtx_threshold = 200;
pucch0_dtx_threshold = 100;
pucch0_dtx_threshold = 30;
ofdm_offset_divisor = 8; #set this to UINT_MAX for offset 0
}
);
@@ -195,26 +194,16 @@ RUs = (
local_rf = "yes"
nb_tx = 1
nb_rx = 1
att_tx = 0
att_rx = 0;
att_tx = 10;
att_rx = 10;
bands = [78];
max_pdschReferenceSignalPower = -27;
max_rxgain = 114;
eNB_instances = [0];
#beamforming 1x4 matrix:
bf_weights = [0x00007fff, 0x0000, 0x0000, 0x0000];
clock_src = "internal";
}
);
THREAD_STRUCT = (
{
#three config for level of parallelism "PARALLEL_SINGLE_THREAD", "PARALLEL_RU_L1_SPLIT", or "PARALLEL_RU_L1_TRX_SPLIT"
parallel_config = "PARALLEL_SINGLE_THREAD";
#two option for worker "WORKER_DISABLE" or "WORKER_ENABLE"
worker_config = "WORKER_ENABLE";
}
);
log_config : {
global_log_level = "info";

View File

@@ -0,0 +1,43 @@
L1s = (
{
num_cc = 1;
tr_n_preference = "nfapi";
remote_n_address = "192.168.71.140"; // vnf addr
local_n_address = "192.168.71.141"; // pnf addr
local_n_portc = 50000; // pnf p5 port [!]
remote_n_portc = 50001; // vnf p5 port
local_n_portd = 50010; // pnf p7 port
remote_n_portd = 50011; // vnf p7 port
prach_dtx_threshold = 120;
pucch0_dtx_threshold = 150;
ofdm_offset_divisor = 8; #set this to UINT_MAX for offset 0
}
);
RUs = ({
local_rf = "yes";
nb_tx = 1;
nb_rx = 1;
att_tx = 0;
att_rx = 0;
bands = [7];
max_pdschReferenceSignalPower = -27;
max_rxgain = 114;
sf_extension = 0;
eNB_instances = [0];
});
rfsimulator :
{
serveraddr = "server";
serverport = 4043;
options = (); #("saviq"); or/and "chanmod"
modelname = "AWGN";
IQfile = "/tmp/rfsimulator.iqs";
};
log_config: {
global_log_level = "info";
hw_log_level = "info";
phy_log_level = "info";
};

View File

@@ -0,0 +1,31 @@
usrp-tx-thread-config = 1;
tune-offset = 30720000;
L1s = ({
num_cc = 1;
tr_n_preference = "nfapi";
remote_n_address = "127.0.0.1"; // vnf addr
local_n_address = "127.0.0.1"; // pnf addr
local_n_portc = 50000; // pnf p5 port [!]
remote_n_portc = 50001; // vnf p5 port
local_n_portd = 50010; // pnf p7 port
remote_n_portd = 50011; // vnf p7 port
prach_dtx_threshold = 120;
pusch_dtx_threshold = 20;
max_ldpc_iterations = 10;
});
RUs = ({
local_rf = "yes"
nb_tx = 4;
nb_rx = 4;
att_tx = 0;
att_rx = 0;
bands = [77];
max_pdschReferenceSignalPower = -27;
max_rxgain = 75;
eNB_instances = [0];
#clock_src = "internal";
sdr_addrs = "addr=192.168.80.53, clock_source=internal,time_source=internal"
});

View File

@@ -0,0 +1,218 @@
Active_gNBs = ( "5G-GOA-gNB");
# Asn1_verbosity, choice in: none, info, annoying
Asn1_verbosity = "none";
gNBs =
(
{
////////// Identification parameters:
gNB_ID = 0xe00;
gNB_name = "5G-GOA-gNB";
// Tracking area code, 0x0000 and 0xfffe are reserved values
tracking_area_code = 1;
plmn_list = ({ mcc = 208; mnc = 99; mnc_length = 2; snssaiList = ({ sst = 1 }) });
nr_cellid = 12345678L;
////////// Physical parameters:
sib1_tda = 5;
min_rxtxtime = 6;
servingCellConfigCommon = (
{
#spCellConfigCommon
physCellId = 0;
# downlinkConfigCommon
#frequencyInfoDL
# this is 2150.43 MHz + 14 PRBs@15kHz SCS (same as initial BWP), points to Subcarrier 0 of RB#10 of SSB block
absoluteFrequencySSB = 430590;
dl_frequencyBand = 66;
# this is 2150.43 MHz
dl_absoluteFrequencyPointA = 430086;
#scs-SpecificCarrierList
dl_offstToCarrier = 0;
# subcarrierSpacing
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
dl_subcarrierSpacing = 0;
dl_carrierBandwidth = 25;
#initialDownlinkBWP
#genericParameters
# this is RBstart=0,L=25 (275*(L-1))+RBstart
initialDLBWPlocationAndBandwidth = 6600;
# subcarrierSpacing
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
initialDLBWPsubcarrierSpacing = 0;
#pdcch-ConfigCommon
initialDLBWPcontrolResourceSetZero = 2;
initialDLBWPsearchSpaceZero = 0;
#uplinkConfigCommon
#frequencyInfoUL
ul_frequencyBand = 66;
# this is 1750.43 MHz
ul_absoluteFrequencyPointA = 350086;
#scs-SpecificCarrierList
ul_offstToCarrier = 0;
# subcarrierSpacing
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
ul_subcarrierSpacing = 0;
ul_carrierBandwidth = 25;
pMax = 20;
#initialUplinkBWP
#genericParameters
initialULBWPlocationAndBandwidth = 6600;
# subcarrierSpacing
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
initialULBWPsubcarrierSpacing = 0;
#rach-ConfigCommon
#rach-ConfigGeneric
prach_ConfigurationIndex = 98;
#prach_msg1_FDM
#0 = one, 1=two, 2=four, 3=eight
prach_msg1_FDM = 0;
prach_msg1_FrequencyStart = 0;
zeroCorrelationZoneConfig = 13;
preambleReceivedTargetPower = -118;
#preamblTransMax (0...10) = (3,4,5,6,7,8,10,20,50,100,200)
preambleTransMax = 6;
#powerRampingStep
# 0=dB0,1=dB2,2=dB4,3=dB6
powerRampingStep = 1;
#ra_ReponseWindow
#1,2,4,8,10,20,40,80
ra_ResponseWindow = 5;
#ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR
#1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen
ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4;
#one (0..15) 4,8,12,16,...60,64
ssb_perRACH_OccasionAndCB_PreamblesPerSSB = 15;
#ra_ContentionResolutionTimer
#(0..7) 8,16,24,32,40,48,56,64
ra_ContentionResolutionTimer = 7;
rsrp_ThresholdSSB = 19;
#prach-RootSequenceIndex_PR
#1 = 839, 2 = 139
prach_RootSequenceIndex_PR = 2;
prach_RootSequenceIndex = 1;
# SCS for msg1, can only be 15 for 30 kHz < 6 GHz, takes precendence over the one derived from prach-ConfigIndex
#
msg1_SubcarrierSpacing = 0;
# restrictedSetConfig
# 0=unrestricted, 1=restricted type A, 2=restricted type B
restrictedSetConfig = 0;
msg3_DeltaPreamble = 1;
p0_NominalWithGrant =-90;
# pucch-ConfigCommon setup :
# pucchGroupHopping
# 0 = neither, 1= group hopping, 2=sequence hopping
pucchGroupHopping = 0;
hoppingId = 40;
p0_nominal = -90;
ssb_PositionsInBurst_Bitmap = 1;
# ssb_periodicityServingCell
# 0 = ms5, 1=ms10, 2=ms20, 3=ms40, 4=ms80, 5=ms160, 6=spare2, 7=spare1
ssb_periodicityServingCell = 2;
# dmrs_TypeA_position
# 0 = pos2, 1 = pos3
dmrs_TypeA_Position = 0;
# subcarrierSpacing
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
subcarrierSpacing = 0;
#tdd-UL-DL-ConfigurationCommon
# subcarrierSpacing
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
referenceSubcarrierSpacing = 0;
# pattern1
# dl_UL_TransmissionPeriodicity
# 0=ms0p5, 1=ms0p625, 2=ms1, 3=ms1p25, 4=ms2, 5=ms2p5, 6=ms5, 7=ms10
dl_UL_TransmissionPeriodicity = 6;
nrofDownlinkSlots = 7;
nrofDownlinkSymbols = 6;
nrofUplinkSlots = 2;
nrofUplinkSymbols = 4;
ssPBCH_BlockPower = -25;
}
);
# ------- SCTP definitions
SCTP :
{
# Number of streams to use in input/output
SCTP_INSTREAMS = 2;
SCTP_OUTSTREAMS = 2;
};
////////// AMF parameters:
amf_ip_address = ({ ipv4 = "192.168.71.132"; });
NETWORK_INTERFACES :
{
GNB_IPV4_ADDRESS_FOR_NG_AMF = "192.168.71.140/26";
GNB_IPV4_ADDRESS_FOR_NGU = "192.168.71.140/26";
GNB_PORT_FOR_S1U = 2152; # Spec 2152
};
}
);
MACRLCs = (
{
num_cc = 1;
tr_s_preference = "nfapi";
remote_s_address = "192.168.71.141"; // pnf addr [!]
local_s_address = "192.168.71.140"; // vnf addr
local_s_portc = 50001; // vnf p5 port
remote_s_portc = 50000; // pnf p5 port [!]
local_s_portd = 50011; // vnf p7 port [!]
remote_s_portd = 50010; // pnf p7 port [!]
tr_n_preference = "local_RRC";
pusch_TargetSNRx10 = 150;
pucch_TargetSNRx10 = 200;
}
);
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" );
# preferred integrity algorithms
# the first one of the list that an UE supports in chosen
# valid values: nia0, nia1, nia2, nia3
integrity_algorithms = ( "nia2", "nia0" );
# 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";
};
log_config :
{
global_log_level ="info";
hw_log_level ="info";
phy_log_level ="info";
mac_log_level ="info";
rlc_log_level ="info";
pdcp_log_level ="info";
rrc_log_level ="info";
ngap_log_level ="debug";
f1ap_log_level ="info";
};

View File

@@ -0,0 +1,224 @@
Active_gNBs = ( "gNB-OAI");
# Asn1_verbosity, choice in: none, info, annoying
Asn1_verbosity = "none";
gNBs =
(
{
////////// Identification parameters:
gNB_ID = 0xe00;
gNB_name = "gNB-OAI";
// Tracking area code, 0x0000 and 0xfffe are reserved values
tracking_area_code = 1;
plmn_list = ({ mcc = 208; mnc = 97; mnc_length = 2; snssaiList = ({ sst = 1; }) });
nr_cellid = 12345678L;
////////// Physical parameters:
pdsch_AntennaPorts_XP = 2;
pusch_AntennaPorts = 4;
pdsch_AntennaPorts_N1 = 2;
maxMIMO_layers = 4;
do_CSIRS = 1;
do_SRS = 1;
servingCellConfigCommon = (
{
#spCellConfigCommon
physCellId = 0;
# downlinkConfigCommon
#frequencyInfoDL
# this is 4100.16 MHz
absoluteFrequencySSB = 673344;
# this is 4071 MHz
dl_absoluteFrequencyPointA = 671400;
dl_frequencyBand = 77;
#scs-SpecificCarrierList
dl_offstToCarrier = 0;
# subcarrierSpacing
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
dl_subcarrierSpacing = 1;
dl_carrierBandwidth = 162;
#initialDownlinkBWP
#genericParameters
# this is RBstart=0,L=162 (275*(275-L+1))+(274-RBstart))
initialDLBWPlocationAndBandwidth = 31624;
#
# subcarrierSpacing
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
initialDLBWPsubcarrierSpacing = 1;
#pdcch-ConfigCommon
initialDLBWPcontrolResourceSetZero = 12;
initialDLBWPsearchSpaceZero = 0;
#uplinkConfigCommon
#frequencyInfoUL
ul_frequencyBand = 77;
#scs-SpecificCarrierList
ul_offstToCarrier = 0;
# subcarrierSpacing
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
ul_subcarrierSpacing = 1;
ul_carrierBandwidth = 162;
pMax = 20;
#initialUplinkBWP
#genericParameters
initialULBWPlocationAndBandwidth = 31624;
# subcarrierSpacing
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
initialULBWPsubcarrierSpacing = 1;
#rach-ConfigCommon
#rach-ConfigGeneric
prach_ConfigurationIndex = 98;
#prach_msg1_FDM
#0 = one, 1=two, 2=four, 3=eight
prach_msg1_FDM = 0;
prach_msg1_FrequencyStart = 0;
zeroCorrelationZoneConfig = 12;
preambleReceivedTargetPower = -96;
#preamblTransMax (0...10) = (3,4,5,6,7,8,10,20,50,100,200)
preambleTransMax = 6;
#powerRampingStep
# 0=dB0,1=dB2,2=dB4,3=dB6
powerRampingStep = 1;
#ra_ReponseWindow
#1,2,4,8,10,20,40,80
ra_ResponseWindow = 5;
#ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR
#1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen
ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4;
#one (0..15) 4,8,12,16,...60,64
ssb_perRACH_OccasionAndCB_PreamblesPerSSB = 15;
#ra_ContentionResolutionTimer
#(0..7) 8,16,24,32,40,48,56,64
ra_ContentionResolutionTimer = 7;
rsrp_ThresholdSSB = 19;
#prach-RootSequenceIndex_PR
#1 = 839, 2 = 139
prach_RootSequenceIndex_PR = 2;
prach_RootSequenceIndex = 1;
# SCS for msg1, can only be 15 for 30 kHz < 6 GHz, takes precendence over the one derived from prach-ConfigIndex
#
msg1_SubcarrierSpacing = 1,
# restrictedSetConfig
# 0=unrestricted, 1=restricted type A, 2=restricted type B
restrictedSetConfig = 0,
msg3_DeltaPreamble = 1;
p0_NominalWithGrant =-90;
# pucch-ConfigCommon setup :
# pucchGroupHopping
# 0 = neither, 1= group hopping, 2=sequence hopping
pucchGroupHopping = 0;
hoppingId = 40;
p0_nominal = -70;
ssb_PositionsInBurst_Bitmap = 1;
# ssb_periodicityServingCell
# 0 = ms5, 1=ms10, 2=ms20, 3=ms40, 4=ms80, 5=ms160, 6=spare2, 7=spare1
ssb_periodicityServingCell = 2;
# dmrs_TypeA_position
# 0 = pos2, 1 = pos3
dmrs_TypeA_Position = 0;
# subcarrierSpacing
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
subcarrierSpacing = 1;
#tdd-UL-DL-ConfigurationCommon
# subcarrierSpacing
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
referenceSubcarrierSpacing = 1;
# pattern1
# dl_UL_TransmissionPeriodicity
# 0=ms0p5, 1=ms0p625, 2=ms1, 3=ms1p25, 4=ms2, 5=ms2p5, 6=ms5, 7=ms10
dl_UL_TransmissionPeriodicity = 5;
nrofDownlinkSlots = 3;
nrofDownlinkSymbols = 6;
nrofUplinkSlots = 1;
nrofUplinkSymbols = 4;
ssPBCH_BlockPower = -25;
}
);
# ------- SCTP definitions
SCTP :
{
# Number of streams to use in input/output
SCTP_INSTREAMS = 2;
SCTP_OUTSTREAMS = 2;
};
////////// AMF parameters:
amf_ip_address = ({ ipv4 = "192.168.61.132"; });
NETWORK_INTERFACES :
{
GNB_IPV4_ADDRESS_FOR_NG_AMF = "192.168.61.129/26";
GNB_IPV4_ADDRESS_FOR_NGU = "192.168.61.129/26";
GNB_PORT_FOR_S1U = 2152; # Spec 2152
};
}
);
MACRLCs = (
{
num_cc = 1;
tr_s_preference = "nfapi";
remote_s_address = "127.0.0.1"; // pnf addr [!]
local_s_address = "127.0.0.1"; // vnf addr
local_s_portc = 50001; // vnf p5 port
remote_s_portc = 50000; // pnf p5 port [!]
local_s_portd = 50011; // vnf p7 port [!]
remote_s_portd = 50010; // pnf p7 port [!]
tr_n_preference = "local_RRC";
pusch_TargetSNRx10 = 250;
pucch_TargetSNRx10 = 250;
pusch_FailureThres = 100;
ul_max_mcs = 28;
}
);
security = {
# preferred ciphering algorithms
# the first one of the list that an UE supports in chosen
# valid values: nea0, nea1, nea2, nea3
ciphering_algorithms = ( "nea1", "nea0" );
# preferred integrity algorithms
# the first one of the list that an UE supports in chosen
# valid values: nia0, nia1, nia2, nia3
integrity_algorithms = ( "nia1", "nia0" );
# 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 = "yes";
};
log_config :
{
global_log_level ="info";
hw_log_level ="info";
phy_log_level ="info";
mac_log_level ="info";
rlc_log_level ="info";
pdcp_log_level ="info";
rrc_log_level ="info";
ngap_log_level ="debug";
f1ap_log_level ="debug";
};

View File

@@ -2,7 +2,6 @@ Active_gNBs = ( "gNB-OAI");
# Asn1_verbosity, choice in: none, info, annoying
Asn1_verbosity = "none";
sa = 1;
nfapi = "AERIAL";
gNBs =
@@ -30,18 +29,12 @@ gNBs =
////////// Physical parameters:
pdsch_AntennaPorts_XP = 2;
pdsch_AntennaPorts_N1 = 2;
pusch_AntennaPorts = 2;
do_CSIRS = 1;
do_SRS = 0;
min_rxtxtime = 2;
pdcch_ConfigSIB1 = (
{
controlResourceSetZero = 12;
searchSpaceZero = 0;
}
);
servingCellConfigCommon = (
{
#spCellConfigCommon
@@ -116,8 +109,8 @@ gNBs =
ra_ResponseWindow = 5;
#ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR
#1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen
ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 3;
#oneHalf (0..15) 4,8,12,16,...60,64
ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4;
#one (0..15) 4,8,12,16,...60,64
ssb_perRACH_OccasionAndCB_PreamblesPerSSB = 15;
#ra_ContentionResolutionTimer
#(0..7) 8,16,24,32,40,48,56,64
@@ -143,9 +136,7 @@ gNBs =
pucchGroupHopping = 0;
hoppingId = 40;
p0_nominal = -90;
# ssb_PositionsInBurs_BitmapPR
# 1=short, 2=medium, 3=long
ssb_PositionsInBurst_PR = 2;
ssb_PositionsInBurst_Bitmap = 1;
# ssb_periodicityServingCell
@@ -168,10 +159,10 @@ gNBs =
# pattern1
# dl_UL_TransmissionPeriodicity
# 0=ms0p5, 1=ms0p625, 2=ms1, 3=ms1p25, 4=ms2, 5=ms2p5, 6=ms5, 7=ms10
dl_UL_TransmissionPeriodicity = 5; #6;
nrofDownlinkSlots = 3; #7;
nrofDownlinkSymbols = 6;
nrofUplinkSlots = 1; #2;
dl_UL_TransmissionPeriodicity = 6; #5;
nrofDownlinkSlots = 6; #3;
nrofDownlinkSymbols = 10; #6;
nrofUplinkSlots = 3; #1;
nrofUplinkSymbols = 0;
ssPBCH_BlockPower = -25;
@@ -190,7 +181,7 @@ gNBs =
////////// AMF parameters:
amf_ip_address = ({ ipv4 = "192.168.71.132"; });
amf_ip_address = ({ ipv4 = "172.21.6.103"; });
NETWORK_INTERFACES :

View File

@@ -90,7 +90,7 @@ gNBs =
#ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR
#1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen
ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4;
#oneHalf (0..15) 4,8,12,16,...60,64
#one (0..15) 4,8,12,16,...60,64
ssb_perRACH_OccasionAndCB_PreamblesPerSSB = 15;
#ra_ContentionResolutionTimer
#(0..7) 8,16,24,32,40,48,56,64
@@ -117,9 +117,7 @@ gNBs =
pucchGroupHopping = 0;
hoppingId = 40;
p0_nominal = -90;
# ssb_PositionsInBurs_BitmapPR
# 1=short, 2=medium, 3=long
ssb_PositionsInBurst_PR = 2;
ssb_PositionsInBurst_Bitmap = 1;
# ssb_periodicityServingCell
@@ -189,15 +187,6 @@ RUs = (
max_pdschReferenceSignalPower = -27;
max_rxgain = 75;
eNB_instances = [0];
##beamforming 1x2 matrix: 1 layer x 2 antennas
bf_weights = [0x00007fff, 0x0000];
##beamforming 1x4 matrix: 1 layer x 4 antennas
#bf_weights = [0x00007fff, 0x0000,0x0000, 0x0000];
## beamforming 2x2 matrix:
# bf_weights = [0x00007fff, 0x00000000, 0x00000000, 0x00007fff];
## beamforming 4x4 matrix:
#bf_weights = [0x00007fff, 0x0000, 0x0000, 0x0000, 0x00000000, 0x00007fff, 0x0000, 0x0000, 0x0000, 0x0000, 0x00007fff, 0x0000, 0x0000, 0x0000, 0x0000, 0x00007fff];
sdr_addrs = "addr=192.168.10.2,mgmt_addr=192.168.10.2,second_addr=192.168.20.2";
clock_src = "external";
# if_freq = 3700000000L;
@@ -209,14 +198,6 @@ rfsimulator: {
serveraddr = "server";
};
THREAD_STRUCT = (
{
#three config for level of parallelism "PARALLEL_SINGLE_THREAD", "PARALLEL_RU_L1_SPLIT", or "PARALLEL_RU_L1_TRX_SPLIT"
parallel_config = "PARALLEL_RU_L1_TRX_SPLIT";
#two option for worker "WORKER_DISABLE" or "WORKER_ENABLE"
worker_config = "WORKER_ENABLE";
}
);
security = {
# preferred ciphering algorithms

View File

@@ -85,11 +85,11 @@ gNBs =
powerRampingStep = 1;
#ra_ReponseWindow
#1,2,4,8,10,20,40,80
ra_ResponseWindow = 4;
ra_ResponseWindow = 5;
#ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR
#1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen
ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4;
#oneHalf (0..15) 4,8,12,16,...60,64
#one (0..15) 4,8,12,16,...60,64
ssb_perRACH_OccasionAndCB_PreamblesPerSSB = 15;
#ra_ContentionResolutionTimer
#(0..7) 8,16,24,32,40,48,56,64
@@ -115,9 +115,7 @@ gNBs =
pucchGroupHopping = 0;
hoppingId = 40;
p0_nominal = -90;
# ssb_PositionsInBurs_BitmapPR
# 1=short, 2=medium, 3=long
ssb_PositionsInBurst_PR = 2;
ssb_PositionsInBurst_Bitmap = 1;
# ssb_periodicityServingCell
@@ -200,15 +198,6 @@ RUs = (
max_pdschReferenceSignalPower = -27;
max_rxgain = 50;
eNB_instances = [0];
## beamforming 1x2 matrix: 1 layer x 2 antennas
bf_weights = [0x00007fff, 0x0000];
## beamforming 1x4 matrix: 1 layer x 4 antennas
#bf_weights = [0x00007fff, 0x0000,0x0000, 0x0000];
## beamforming 2x2 matrix:
#bf_weights = [0x00007fff, 0x00000000, 0x00000000, 0x00007fff];
## beamforming 4x4 matrix:
#bf_weights = [0x00007fff, 0x0000, 0x0000, 0x0000, 0x00000000, 0x00007fff, 0x0000, 0x0000, 0x0000, 0x0000, 0x00007fff, 0x0000, 0x0000, 0x0000, 0x0000, 0x00007fff];
sdr_addrs = "addr=192.168.10.2,second_addr=192.168.20.2";
}
);
@@ -217,14 +206,6 @@ rfsimulator: {
serveraddr = "server";
};
THREAD_STRUCT = (
{
#three config for level of parallelism "PARALLEL_SINGLE_THREAD", "PARALLEL_RU_L1_SPLIT", or "PARALLEL_RU_L1_TRX_SPLIT"
parallel_config = "PARALLEL_RU_L1_TRX_SPLIT";
#two option for worker "WORKER_DISABLE" or "WORKER_ENABLE"
worker_config = "WORKER_ENABLE";
}
);
security = {
# preferred ciphering algorithms

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