Compare commits

..

445 Commits

Author SHA1 Message Date
Robert Schmidt
f4d8ecbf85 IPv4v6 comment 2024-07-17 08:18:56 +02:00
Robert Schmidt
701bd2d468 Revert ip rule removal 2024-07-17 08:16:59 +02:00
Robert Schmidt
2047f45707 fixup 2024-07-17 08:16:18 +02:00
Robert Schmidt
05b2ea1344 Remove LFDS credit: we don't use it anymore 2024-07-17 08:16:13 +02:00
Robert Schmidt
8cb97ada78 Remove unused pdcp_netlink.c file 2024-07-17 08:16:06 +02:00
Robert Schmidt
4240807600 Remove --nokrnmod option, as we never use the kernel anyway 2024-07-17 08:16:01 +02:00
Robert Schmidt
1ef5b00f68 nas_config(): indicate IP version 2024-07-17 08:03:22 +02:00
Robert Schmidt
41c7b7f990 fixup drivers 2024-07-17 08:03:22 +02:00
Robert Schmidt
e919e7dc4c Remove unnecessary includes 2024-07-13 10:28:47 +02:00
Robert Schmidt
b825eceb9d Remove rb_config: not needed? 2024-07-12 18:02:06 +02:00
Robert Schmidt
a7a61eff74 Remove legacy 4G kernel modules: can we remove rb_tool? 2024-07-12 17:44:46 +02:00
Robert Schmidt
72ac07ac92 VERIFY: remove netlink/PDCP_USE_NETLINK 2024-07-12 17:33:43 +02:00
Robert Schmidt
359b92af3b Unused makefile 2024-07-12 17:12:14 +02:00
Robert Schmidt
0ec3b79da9 Linux kernel defines name length as IFNAM_SIZE, it seems no null-byte needed? 2024-07-12 17:03:55 +02:00
Robert Schmidt
043585362b 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-07-12 17:03:55 +02:00
Robert Schmidt
e64210fe72 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
2024-07-12 17:03:54 +02:00
Robert Schmidt
6e59ea88b6 Remove netmask(): not used, UE does not need 2024-07-12 17:03:54 +02:00
Robert Schmidt
456ad6d205 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-07-12 17:03:54 +02:00
Robert Schmidt
bc777ef5db 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-07-12 17:03:54 +02:00
Robert Schmidt
5ee4fba22d nas_config_mbms() and nas_config() do the same 2024-07-12 17:03:54 +02:00
Robert Schmidt
93ea132d50 Remove (wrong) routing table init in nas_config()
introduced in commit c70aa4c43a

describe why wrong, and why it is unclear
2024-07-12 17:03:54 +02:00
Robert Schmidt
e965c2ba3c 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.
2024-07-12 17:03:54 +02:00
Robert Schmidt
8c50c7d464 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-07-12 17:03:54 +02:00
Robert Schmidt
814d546989 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-12 17:03:53 +02:00
Robert Schmidt
c851489ab5 Add const to parameters to setInterfaceParameter()
The passed parameters are not modified, so use const to signal this to
users.
2024-07-12 16:21:09 +02:00
Robert Schmidt
0ea9517034 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 remove the call with nas_config_mbms() by setting parameters
accordingly.
2024-07-12 16:21:09 +02:00
Robert Schmidt
f08dea3b16 Make functions used only in module static 2024-07-12 16:21:09 +02:00
Robert Schmidt
cb8597fd9f Remove unused broadcast functionality
functions setBroadcastAddress() and getBroadcastAddress(), as well as
global variable broadcastAddr are not used in consumers. Remove it.
2024-07-12 16:21:09 +02:00
Robert Schmidt
7091e19370 Remove unused functions getNetMask() 2024-07-12 16:21:09 +02:00
Robert Schmidt
61ca3ec1cb Remove unused blocking_NAS_config() 2024-07-12 16:21:09 +02:00
Robert Schmidt
9b1be04bed Remove unused set_gateway() 2024-07-12 16:21:09 +02:00
Robert Schmidt
c5ac44a8ef Remove unused NAS_config()
It does most of what the highly similar nas_config() does. It is not
used anywhere.
2024-07-12 16:21:09 +02:00
Robert Schmidt
16bd5c936d Remove unused SIMULATION/ETH_TRANSPORT/defs.h 2024-07-12 16:21:09 +02:00
Robert Schmidt
de33ecac01 remove multicast_link.* 2024-07-12 16:21:09 +02:00
Robert Schmidt
28238d84c8 Remove multicast: code is not used in current scenarios 2024-07-12 16:21:08 +02:00
Robert Schmidt
91f1f8b054 Remove rb_config functions from nas_config, remove unused functions, make static 2024-07-12 16:21:08 +02:00
Robert Schmidt
d3bec3c5b1 Remove unused code in openair3/UTILS: not used anywhere 2024-07-12 16:21:08 +02:00
Robert Schmidt
fe01add11f Remove unused code in ETH_TRANSPORT/socket.{ch} 2024-07-12 16:21:08 +02:00
Robert Schmidt
592a396b3a Remove unused emu_transport.c 2024-07-12 16:21:08 +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
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
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
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
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
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
bf69e25676 build common DMRS and CSI overlapping bitmap outside of the RBs and REs loops 2024-06-28 12:21:44 +02:00
Jaroslava Fiedlerova
fb0d2714c6 Replace dynamic mem allocation by static for p_outDec in decode_offload 2024-06-28 11:35:18 +02:00
francescomani
f5c7fc3b11 rate-match around overlapping CSI-RS resources in PDSCH reception 2024-06-28 10:02:29 +02:00
francescomani
21744d883a code improvement and formatting 2024-06-28 10:02:29 +02:00
francescomani
f30b42d877 improvements for slot fep at UE when receiving CSI and PDSCH 2024-06-28 10:02:29 +02:00
francescomani
15191452f3 UE MAC configuration of CSIRS for PDSCH rate matching 2024-06-28 10:02:29 +02:00
Robert Schmidt
541ef60c89 Merge remote-tracking branch 'origin/hot-fix-T-dependencies' into integration_2024_w26b 2024-06-28 09:35:06 +02:00
Robert Schmidt
073812ca0c Merge remote-tracking branch 'origin/fix-test-asan-errors' into integration_2024_w26b 2024-06-28 09:34:57 +02:00
Robert Schmidt
7264f9e052 Merge remote-tracking branch 'origin/nr-ue-pusch-power-control' into integration_2024_w26b 2024-06-28 09:34:46 +02:00
Bartosz Podrygajlo
2ae138d7c0 docker compose override files for testing with locally modified executables. 2024-06-27 18:45:59 +02:00
Robert Schmidt
7a86e36ca3 Build unit tests with address sanitizer 2024-06-27 18:38:49 +02:00
Bartosz Podrygajlo
0e6b0f3e7a Fix memory leak in rlc_test_5 and rlc_test_6 2024-06-27 18:38:36 +02:00
Bartosz Podrygajlo
9724ff0329 Fix memory leaks and heap buffer overflow in test_thread-pool. 2024-06-27 18:35:43 +02:00
Jaroslava Fiedlerova
432fee1a6e Configure T2 EAL Parameters via Command Line
- Introduced command line and configuration options to set up PCI address, CPU cores used by DPDK, and DPDK file prefix for T2 offload.
- Made the dpdk_dev parameter (for setting the PCI address of the T2) mandatory.
- Configure dpdk_dev in the CI test cases.
2024-06-27 14:53:17 +02:00
Jaroslava Fiedlerova
fe0d70e8f3 Replace bbdev TEST_ASSERTs by OAI macro AssertFatal()
- Replaced bbdev TEST_ASSERTs with the OAI macro AssertFatal() to harmonize error handling.
- Removed unused functions and macros from nrLDPC_offload.h.
2024-06-27 14:47:32 +02:00
Jaroslava Fiedlerova
6bec8779c6 Enhance T2 Offload for gNB and UE
- Reworked nrLDPC_decoder_offload.c to process all segments in a TB with a single call to LDPCdecoder() or LDPCencoder().
- Perform CRC checks on the T2.
- Modified nr_ulsch_decoding (gNB decoder) to:
  - Count processed segments.
  - Properly perform CRC checks.
- Created a constant NR_LDPC_MAX_NUM_CB to define the maximum number of codeblocks.
- Conditional library loading:
  - On gNB: Load ldpc_t2 library if offload is enabled using the --ldpc-offload-enable flag.
  - On UE: Load both ldpc_t2 and ldpc libraries since only encoder offload is supported.
- General cleanup of nrLDPC_decoder_offload.c for improved readability and maintainability.
- Modified the structure of LDPC encoder/decoder/offload parameters:
  - Introduced a structure for code block (CB) related parameters.
  - Removed parameter E from the encoder and offload parameter structures for clarity.
  - Replaced E with perCB->E_cb in the UE encoder code.
2024-06-27 14:40:41 +02:00
Raphael Defosseux
0f76ac5868 fix(T): some missing dependencies on T
Signed-off-by: Raphael Defosseux <raphael.defosseux@eurecom.fr>
2024-06-27 12:44:43 +02:00
francescomani
caa45af197 making aperiodic SRS feedback time dependent on what set in config at gNB (to avoid UE assertion) 2024-06-27 11:16:16 +02:00
francescomani
273018ea48 returning instead of asserting for invalid K2 in aperiodic CSI 2024-06-27 11:13:42 +02:00
Robert Schmidt
5af81bbc9d Merge branch 'integration_2024_w26' into 'develop'
Integration: `2024.w26`

See merge request oai/openairinterface5g!2815

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

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

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

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

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

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

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

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

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

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

See merge request oai/openairinterface5g!2811

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

		- UE1 is a SYNCRONISATION SOURCE UE which transmits PSBCH

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

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

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

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

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

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

See merge request oai/openairinterface5g!2801

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

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

See merge request oai/openairinterface5g!2788

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

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

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

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

See merge request oai/openairinterface5g!2778

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

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

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

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

    - offset, hysteresis, timeToTrigger (configurable reporting parameters)

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

See merge request oai/openairinterface5g!2773

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

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

other minor changes:

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

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

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

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

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

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

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

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

It needs a serious rewrite.

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

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

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

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

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

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

Derive also knas_enc (not used yet).

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

See merge request oai/openairinterface5g!2757

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

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

Then cleanup the callers of those functions.

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

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

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

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

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

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

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

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

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

  openair2/E2AP/RAN_FUNCTION/O-RAN/ran_func_kpm.c:299:46: error: assignment of read-only location '*(arr_ue_id.ue_info_list + (sizetype)(arr_ue_id.sz * 2444864))'
  |         arr_ue_id.ue_info_list[arr_ue_id.sz] = *ue;
2024-05-24 11:35:15 +02:00
Robert Schmidt
6dfd7cdc71 rename find_if_arr -> find_if to avoid name clashes
In a later commit, we will use find_if in L2. In the case of building
with E2 agent, we link e2_agent which comes with its own implementation
of find_if_arr(), which results in a name clash. Rename the OAI
implementation, as nothing uses this, anyway.
2024-05-24 11:35:15 +02:00
Robert Schmidt
7cfd5a1f21 Remove outdated/useless comment 2024-05-24 11:35:15 +02:00
Robert Schmidt
ec326e856e Remove compute_ph_factor() dump parameter, make LOG_D 2024-05-24 09:25:45 +02:00
Raymond Knopp
e69e787ab0 testing use_deltaMCS=0 2024-05-24 09:25:45 +02:00
Raymond Knopp
70444f133a power control changes for deltaMCS mode and force_ul256qam_off
- addition of control of deltaMCS if enabled in configuration file.
- introduce separate parameter to disable 256QAM in UL
- put min_grant_prb configuration back in pf_ul() as default prb size.
2024-05-24 09:25:44 +02:00
Raymond Knopp
e3aff6c37b fix in nr_modulation.c: avoid fail for 64QAM and G < 192 bits
Adds a check for these short payloads and handle correctly
2024-05-24 09:25:44 +02:00
Robert Schmidt
9249131046 Merge branch 'integration_2024_w21b' into 'develop'
Integration: `2024.w21b`

Closes #734

See merge request oai/openairinterface5g!2755

* !2700 Fix UE PUCCH multiplexing infinite loop
* !2724 Correct PRACH preamble tx power calculation.
* !2726 NR SA Tutorials
* !2728 Use existing function for bits reversal
* !2732 CU handle F1 setup Req- TAC conversion
* !2738 Correct data offset for unscrambling in PUSCH processing
* !2742 UE: fix mutex locking verification
* !2737 rename persisted ul harq status per pid with a uniq name, make better mutual exclision of processSlotTX()
2024-05-24 07:25:15 +00:00
Robert Schmidt
295f221a9b Merge remote-tracking branch 'origin/simpler-parallel-exclusion-ue-tx' into integration_2024_w21b 2024-05-24 08:13:41 +02:00
Robert Schmidt
58335443b1 Revert "remove asserts on min RX/TX, set the RX/TX shift as 2 in the UE"
This reverts commit 0d0e111135.  It was
set to UE RX to TX time to 2 as it was deemed that the UE could sustain
this time. However, we noticed a degradation of performance, so reset
the RX to TX time to something higher to ensure proper performance.
2024-05-24 06:54:30 +02:00
Robert Schmidt
b5159b5e47 Revert "ci: set min_rxtxtime = 2 in OAIUE pipeline"
This reverts commit 31b4f48e29.
2024-05-24 06:54:15 +02:00
francescomani
e8ae696c8f remove some enb dependencies in NR files 2024-05-23 18:30:33 +02:00
Robert Schmidt
7a631ce3a2 Use an enum for stream_status states 2024-05-23 16:41:20 +02:00
Jaroslava Fiedlerova
1001f2eb13 Merge remote-tracking branch 'origin/fix-mutex-management-bug' into integration_2024_w21b 2024-05-23 12:46:13 +02:00
Jaroslava Fiedlerova
018ca77aa0 Merge remote-tracking branch 'origin/issue-734' into integration_2024_w21b 2024-05-23 12:42:46 +02:00
Jaroslava Fiedlerova
e580450ae2 Merge remote-tracking branch 'origin/IISc_F1setup_tac' into integration_2024_w21b 2024-05-23 12:42:15 +02:00
Jaroslava Fiedlerova
64e6c6e5b2 Merge remote-tracking branch 'origin/ue-pbch-use-reversebits' into integration_2024_w21b 2024-05-23 12:41:38 +02:00
Jaroslava Fiedlerova
841869b0ec Merge remote-tracking branch 'origin/NR_SA_Tutorials' into integration_2024_w21b 2024-05-23 12:40:07 +02:00
Jaroslava Fiedlerova
d3acd5d6c0 Merge remote-tracking branch 'origin/nr-prach-tx-power-fix' into integration_2024_w21b 2024-05-23 12:39:40 +02:00
Jaroslava Fiedlerova
3a4dac00ee Merge remote-tracking branch 'origin/NR_UE_fix_PUCCH_multiplexing' into integration_2024_w21b 2024-05-23 12:37:32 +02:00
Laurent THOMAS
b461fe5e6b fix-dci11-type0-bitmap-setting 2024-05-23 10:26:28 +02:00
Laurent THOMAS
00e883c563 remove a unused struct member 2024-05-23 08:46:12 +02:00
Laurent THOMAS
2f05261f6b reject packets of 0's 2024-05-23 08:41:01 +02:00
Laurent THOMAS
4bca825053 remove wrong trace when packet is not decoded 2024-05-23 08:03:12 +02:00
Laurent THOMAS
819427a6a0 bug fix ue UL payload filling randomly done in retransmissions (pointer
not set)
2024-05-23 08:03:12 +02:00
Robert Schmidt
082007834c Merge branch 'integration_2024_w21' into 'develop'
Integration: `2024.w21`

See merge request oai/openairinterface5g!2746

* !2717 Additional check on pucch_Config and srs_Config
* !2730 Fix for SSB index in function get_nr_prach_info_from_ssb_index
* !2734 add a function to reset the transmission timestamps chain
* !2741 Fix several potential segfaults in UE PUCCH tx power determination.
2024-05-22 12:55:51 +00:00
Laurent THOMAS
6379350f51 Correct data offset for unscrambling in PUSCH processing
Correctly compute the offset of data to unscramble in PUSCH processing
at the gNB. Rename variables to make them easier to spot (instead of
"s"), and remove a global variable.

Closes: #734
2024-05-22 09:04:33 +02:00
Robert Schmidt
e4a704ed61 Add high-level developer documentation on code style and contributing 2024-05-22 08:45:39 +02:00
Robert Schmidt
787f4431c3 doc/README.md: Correctly say what OpenShift documentation will give 2024-05-22 08:45:39 +02:00
Robert Schmidt
9ce9d79b33 doc/README.md: Link to legacy unmaintained files 2024-05-22 08:45:39 +02:00
Robert Schmidt
f251a41410 doc/README.md: rename section to radios 2024-05-22 08:45:31 +02:00
Robert Schmidt
e7596f9bd5 Clarify CONTRIBUTING.md and wrap text to 80 columns 2024-05-22 08:45:17 +02:00
luis_pereira87
9278394f3c Tutorials: Update links for the latest Ubuntu 22.04 LTS iso file 2024-05-22 07:14:36 +01:00
luis_pereira87
246a8aff16 Tutorials: Rename OAI CN5G docker network interface name from 'demo-oai' to 'oai-cn5g' and remove commented lines 2024-05-22 07:14:36 +01:00
luis_pereira87
3c6ae9c2cb Tutorials: Fix multiple S-NSSAI redefinitions for the same S-NSSAI in the configuration file 2024-05-22 07:14:36 +01:00
Robert Schmidt
73243f668e Merge remote-tracking branch 'origin/fix-pucch-tx-power-segfaults' into integration_2024_w21 2024-05-22 07:45:51 +02:00
Robert Schmidt
959df471f3 Merge remote-tracking branch 'origin/reset-transmission-sequence' into integration_2024_w21 2024-05-22 07:45:41 +02:00
Robert Schmidt
d326477494 Merge remote-tracking branch 'origin/NR_UE_ssb_index_fix' into integration_2024_w21 2024-05-22 07:45:34 +02:00
Robert Schmidt
10940010f5 Merge remote-tracking branch 'origin/nr-ue-config-pointer-check' into integration_2024_w21 2024-05-22 07:45:27 +02:00
Raphael Defosseux
0ad85cb111 chore(ci): dummy commit to retrigger CI
Signed-off-by: Raphael Defosseux <raphael.defosseux@eurecom.fr>
2024-05-21 14:33:40 +02:00
Jaroslava Fiedlerova
5238ce912b Replace "theseus" OC node by "demophon" 2024-05-21 12:16:05 +02:00
Laurent THOMAS
f2213bf792 fix a error that was created by over complexity in setting a pointer to null for a wrong later assert verification 2024-05-20 20:57:46 +02:00
Bartosz Podrygajlo
b101e682f5 Fix several potential segfaults in UE PUCCH tx power determination. 2024-05-20 15:00:29 +02:00
francescomani
075f564606 fix ssb index in get_nr_prach_info_from_ssb_index 2024-05-16 18:37:38 +02:00
Laurent THOMAS
e217980249 simplify and make better performance the mutual exclusion of processSlotTX() function 2024-05-16 14:06:24 +02:00
Laurent THOMAS
3e4526a6ad rename persisted ul harq status per pid with a uniq name as this variable is persisted in memory and accessed by multiple threads, a uniq name helps to debug 2024-05-16 14:05:39 +02:00
luis_pereira87
db6710f853 Fix debug for ongoing transactions, it is limited to 3 but the maximum number of ongoing transactions can be 4 (NR_RRC_TRANSACTION_IDENTIFIER_NUMBER):
TS 36.331: RRC-TransactionIdentifier ::= INTEGER (0..3)
2024-05-16 12:36:21 +01:00
Robert Schmidt
9fd1b9ac69 Correct buffer size for do_NR_DLInformationTransfer()
uper_encode_to_buffer() of asn1c returns the number of BITS that have
been encoded; if we use this, we need to calculate the resulting number
of bytes (rounding up) to get the right buffer size.

Note that do_NR_ULInformationTransfer() uses
uper_encode_to_new_buffer() which returns the number of BYTES, hence, in
this similar function, we should not modify the return value.
2024-05-16 11:59:55 +02:00
Sreeshma Shiv
17f2eaa558 TAC-Octet String to integer conversion function corrections
-Corrected the conversion function used in CU_handle_F1_SETUP_REQUEST

-Corrected the conversion function in CU_handle_gNB_DU_CONFIGURATION_UPDATE
2024-05-16 12:21:59 +05:30
laurent
ca06b77a89 add a function to reset the transmission timestamps chain, and use it in context of UE resynchronization 2024-05-15 17:35:02 +02:00
francescomani
c626e55f67 harmonize use of function to reverse n bits 2024-05-15 17:08:47 +02:00
Romain Beurdouche
b51a144d7d fix(phy simulators): fix cmdline configmodule for CODING phy simulators 2024-05-15 14:12:40 +02:00
Romain Beurdouche
8b889d908c fix(phy simulators): fix cmdline configmodule for LTE_PHY ulsim and dlsim 2024-05-15 14:05:54 +02:00
Romain Beurdouche
08dbc5bf08 fix(phy simulators): fix cmdline configmodule for NR_PHY simulators 2024-05-15 14:05:03 +02:00
Romain Beurdouche
4e8f58b498 fix(nr_dlsim): fix cmdline configmodule for nr_dlsim 2024-05-15 14:04:18 +02:00
Romain Beurdouche
4455b37548 fix(nr_ulsim): fix cmdline configmodule for nr_ulsim 2024-05-15 14:02:48 +02:00
Sakthivel Velumani
40b52bc8f4 Use existing function for bits reversal 2024-05-10 12:51:50 -04:00
Bartosz Podrygajlo
70f536a0f0 Correct PRACH preamble tx power calculation.
Removed arbitrary offset of 30dB.
Changed sign for pathloss: pathloss calculated in compute_nr_SSB_PL is the difference between transmitted and received power.
Transmission power for preamble should compensate the pathloss, therefore power should increase with pathloss.
2024-05-08 12:19:08 +02:00
Thomas Schlichter
d5a0455560 fix error of taking the absolute value of 'uint64_t' 2024-05-07 20:46:37 +02:00
Thomas Schlichter
5ac881b7c1 rfsimulator: add support to simulate a long propagation delay
Add the option `--rfsimulator.prop_delay` to specify the simulated receive-path (gNB: UL, UE: DL) propagation delay in ms.
This option can be used e.g. to simulate a simple GEO satellite channel by specifying `--rfsimulator.prop_delay 238.74` to both, the gNB and the UE.

This is part of the work developed by Fraunhofer IIS within the ESA-funded project 5G-GOA (https://connectivity.esa.int/projects/5ggoa).
2024-05-07 20:46:37 +02:00
Guido Casati
cf22a331e5 Additional check on pucch_Config and srs_Config 2024-05-06 18:10:03 +02:00
francescomani
6fdb69a898 fix for possible infinite loop in UE PUCCH multiplexing 2024-04-25 15:24:36 +02:00
Laurent THOMAS
ab2b868b75 improve polar init and polar readability 2024-04-24 15:26:21 +02:00
503 changed files with 19550 additions and 25788 deletions

View File

@@ -21,7 +21,7 @@
# Author: laurent THOMAS, Lionel GAUTHIER
cmake_minimum_required (VERSION 3.12)
cmake_minimum_required (VERSION 3.16)
project (OpenAirInterface LANGUAGES C CXX)
#########################################################
@@ -180,22 +180,6 @@ add_boolean_option(SANITIZE_ADDRESS False "enable the address sanitizer (ASan)"
if (SANITIZE_ADDRESS)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fsanitize=address -fno-omit-frame-pointer -fno-common")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=address -fno-omit-frame-pointer -fno-common")
# There seems to be some incompatibility with pthread_create and the RT scheduler, which
# results in pthread_create hanging.
#
# When we switch from Ubuntu 16.04 to 18.04, we found that running with the address sanitizer,
# the pthread_create function calls were not working. The inital thought was that we were
# trying to create a thread that was not-blocking and would eventually crash the machine during
# the run. After more debugging, we found that we would never even start the thread. We narrowed
# down the first two instances of pthread_create in the gNB and NR UE to be sctp_eNB_task and
# one_thread, respectively. We found that adding sleeps, and various other pauses to the threads
# had not effect. From there, we found that if we add an abort(); prior to the thread loop, we
# do not execute that. This indicated to us that the problem is not likely to be a non-blocking
# thread, but perhaps and issue with pthread_create itself. From there we begain to research the
# issue on the web. See: https://github.com/google/sanitizers/issues/1125
#
# Google searching indicates this appears to be a problem since at least 2018. This could be something
# wrong in the pthread library, or something subtly wrong in this CMakeLists.txt. Use Ubuntu 20.04 instead.
endif ()
add_boolean_option(SANITIZE_THREAD False "enable the address sanitizer (TSan)" ON)
@@ -284,6 +268,7 @@ add_boolean_option(DEBUG_ASN1 False "Enable ASN1 debug logs" OFF)
# see common/utils/config.h
add_boolean_option(TRACE_ASN1C_ENC_DEC OFF "Enable ASN1 encoder/decoder debug traces via OAI logging system" ON)
add_boolean_option(T_TRACER True "Activate the T tracer, a debugging/monitoring framework" ON)
add_boolean_option(ENABLE_LTTNG False "Activate the LTTNG tracer, a debugging/monitoring framework" ON)
add_boolean_option(UE_AUTOTEST_TRACE False "Activate UE autotest specific logs" ON)
add_boolean_option(UE_DEBUG_TRACE False "Activate UE debug trace" ON)
add_boolean_option(UE_TIMING_TRACE False "Activate UE timing trace" ON)
@@ -462,7 +447,7 @@ add_library(f1ap
${F1AP_DIR}/f1ap_handlers.c
${F1AP_DIR}/f1ap_itti_messaging.c)
target_include_directories(f1ap PUBLIC F1AP_DIR)
target_link_libraries(f1ap PUBLIC asn1_f1ap)
target_link_libraries(f1ap PUBLIC asn1_f1ap L2_NR)
target_link_libraries(f1ap PRIVATE ngap nr_rrc HASHTABLE)
# LPP
@@ -523,9 +508,6 @@ include_directories ("${OPENAIR_DIR}/radio/COMMON")
# ???!!! TO BE DOCUMENTED OPTIONS !!!???
##############################################################
add_boolean_option(OAI_NW_DRIVER_TYPE_ETHERNET False "????" ON)
add_boolean_option(OAI_NW_DRIVER_USE_NETLINK True "????" ON)
add_boolean_option(UE_EXPANSION False "enable UE_EXPANSION with max 256 UE" ON)
add_boolean_option(PHY_TX_THREAD False "enable UE_EXPANSION with max 256 UE" ON)
add_boolean_option(PRE_SCD_THREAD False "enable UE_EXPANSION with max 256 UE" ON)
@@ -649,17 +631,22 @@ add_library(HASHTABLE
include_directories(${OPENAIR_DIR}/common/utils/hashtable)
add_library(UTIL
${OPENAIR_DIR}/common/utils/LOG/log.c
${OPENAIR_DIR}/common/utils/LOG/vcd_signal_dumper.c
${OPENAIR2_DIR}/UTIL/MATH/oml.c
${OPENAIR2_DIR}/UTIL/OPT/probe.c
${OPENAIR_DIR}/common/utils/threadPool/thread-pool.c
${OPENAIR_DIR}/common/utils/utils.c
${OPENAIR_DIR}/common/utils/system.c
${OPENAIR_DIR}/common/utils/time_meas.c
${OPENAIR_DIR}/common/utils/time_stat.c
)
target_link_libraries(UTIL PUBLIC ${T_LIB} pthread)
if (ENABLE_LTTNG)
find_package(LTTngUST 2.3.8 EXACT REQUIRED)
else()
message(STATUS "LTTNG support disabled")
endif()
pkg_check_modules(cap libcap)
if (cap_FOUND)
# see system.c for more info
target_link_libraries(UTIL PRIVATE cap)
target_compile_definitions(UTIL PRIVATE HAVE_LIB_CAP)
endif()
target_link_libraries(UTIL PUBLIC ${T_LIB} pthread LOG thread-pool utils)
set(SECURITY_SRC
${OPENAIR3_DIR}/SECU/secu_defs.c
@@ -733,20 +720,14 @@ target_link_libraries(SCHED_NR_UE_LIB PRIVATE asn1_lte_rrc_hdrs asn1_nr_rrc_hdrs
# nFAPI
#################################
set(NFAPI_COMMON_SRC
${NFAPI_DIR}/common/src/debug.c
)
add_library(NFAPI_COMMON_LIB ${NFAPI_COMMON_SRC})
include_directories(${NFAPI_DIR}/common/public_inc)
set(NFAPI_SRC
${NFAPI_DIR}/nfapi/src/nfapi.c
${NFAPI_DIR}/nfapi/src/nfapi_p4.c
${NFAPI_DIR}/nfapi/src/nfapi_p5.c
${NFAPI_DIR}/nfapi/src/nfapi_p7.c
)
add_library(NFAPI_LIB ${NFAPI_SRC})
target_link_libraries(NFAPI_LIB PUBLIC nfapi_common)
target_link_libraries(NFAPI_LIB PUBLIC nr_fapi_p5)
include_directories(${NFAPI_DIR}/nfapi/public_inc)
include_directories(${NFAPI_DIR}/nfapi/inc)
@@ -771,7 +752,10 @@ set(NFAPI_VNF_SRC
)
add_library(NFAPI_VNF_LIB ${NFAPI_VNF_SRC})
target_link_libraries(NFAPI_VNF_LIB PRIVATE asn1_lte_rrc_hdrs asn1_nr_rrc_hdrs)
target_link_libraries(NFAPI_VNF_LIB PRIVATE nr_fapi_p5)
if(OAI_AERIAL)
target_compile_definitions(NFAPI_VNF_LIB PRIVATE ENABLE_AERIAL)
endif()
include_directories(${NFAPI_DIR}/vnf/public_inc)
include_directories(${NFAPI_DIR}/vnf/inc)
@@ -801,7 +785,6 @@ set(PHY_POLARSRC
${OPENAIR1_DIR}/PHY/CODING/nr_polar_init.c
${OPENAIR1_DIR}/PHY/CODING/nrPolar_tools/nr_bitwise_operations.c
${OPENAIR1_DIR}/PHY/CODING/nrPolar_tools/nr_crc_byte.c
${OPENAIR1_DIR}/PHY/CODING/nrPolar_tools/nr_polar_crc.c
${OPENAIR1_DIR}/PHY/CODING/nrPolar_tools/nr_polar_decoder.c
${OPENAIR1_DIR}/PHY/CODING/nrPolar_tools/nr_polar_decoding_tools.c
${OPENAIR1_DIR}/PHY/CODING/nrPolar_tools/nr_polar_encoder.c
@@ -1167,9 +1150,10 @@ target_include_directories(PHY_UE PRIVATE ${blas_INCLUDE_DIRS} ${lapacke_INCLUDE
add_library(PHY_NR_COMMON ${PHY_NR_SRC_COMMON})
add_library(PHY_NR ${PHY_NR_SRC})
target_link_libraries(PHY_NR nr_phy_common nr_common)
add_library(PHY_NR_UE ${PHY_NR_UE_SRC})
target_link_libraries(PHY_NR_UE PRIVATE asn1_nr_rrc_hdrs)
target_link_libraries(PHY_NR_UE PRIVATE asn1_nr_rrc_hdrs nr_phy_common nr_common)
add_library(PHY_RU ${PHY_SRC_RU})
target_link_libraries(PHY_RU PRIVATE asn1_lte_rrc_hdrs)
@@ -1192,10 +1176,9 @@ set(PHY_MEX_UE
${OPENAIR1_DIR}/PHY/TOOLS/simde_operations.c
${OPENAIR1_DIR}/PHY/LTE_UE_TRANSPORT/dlsch_llr_computation_avx2.c
${OPENAIR1_DIR}/PHY/LTE_ESTIMATION/lte_ue_measurements.c
${OPENAIR_DIR}/common/utils/LOG/log.c
)
add_library(PHY_MEX ${PHY_MEX_UE})
target_link_libraries(PHY_MEX PRIVATE asn1_lte_rrc_hdrs)
target_link_libraries(PHY_MEX PRIVATE asn1_lte_rrc_hdrs UTIL)
#Layer 2 library
#####################
@@ -1397,9 +1380,9 @@ set (MAC_NR_SRC_UE
${NR_UE_MAC_DIR}/nr_ue_procedures.c
${NR_UE_MAC_DIR}/nr_ue_procedures_sl.c
${NR_UE_MAC_DIR}/nr_ue_scheduler.c
${NR_UE_MAC_DIR}/nr_ue_scheduler_sl.c
${NR_UE_MAC_DIR}/nr_ue_dci_configuration.c
${NR_UE_MAC_DIR}/nr_ra_procedures.c
${NR_UE_MAC_DIR}/nr_ue_power_procedures.c
)
set (ENB_APP_SRC
@@ -1448,7 +1431,7 @@ endif()
add_library(MAC_UE_NR ${MAC_NR_SRC_UE})
target_link_libraries(MAC_UE_NR PRIVATE asn1_lte_rrc_hdrs asn1_nr_rrc_hdrs)
target_link_libraries(MAC_UE_NR PRIVATE asn1_lte_rrc_hdrs asn1_nr_rrc_hdrs PUBLIC nr_ue_power_procedures)
add_library(L2_LTE ${L2_LTE_SRC})
target_link_libraries(L2_LTE PRIVATE asn1_lte_rrc_hdrs asn1_nr_rrc_hdrs)
@@ -1458,6 +1441,7 @@ add_library(L2_NR
${MAC_NR_SRC}
${GNB_APP_SRC}
)
target_link_libraries(L2_NR PRIVATE ds alg)
add_library(e1_if
${NR_RRC_DIR}/cucp_cuup_direct.c
@@ -1466,7 +1450,10 @@ add_library(e1_if
target_link_libraries(e1_if PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs asn1_f1ap SECURITY ${OPENSSL_LIBRARIES} e1ap GTPV1U)
target_link_libraries(L2_NR PRIVATE f1ap x2ap s1ap ngap nr_rrc e1ap nr_rlc)
target_link_libraries(L2_NR PRIVATE f1ap x2ap s1ap ngap nr_rrc e1ap nr_rlc nr_common)
if(OAI_AERIAL)
target_compile_definitions(L2_NR PRIVATE ENABLE_AERIAL)
endif()
if(E2_AGENT)
target_link_libraries(L2_NR PUBLIC e2_agent e2_agent_arg e2_ran_func_du_cucp_cuup)
target_compile_definitions(L2_NR PRIVATE ${E2AP_VERSION} ${KPM_VERSION} E2_AGENT)
@@ -1493,15 +1480,11 @@ add_library(L2_UE_LTE_NR
)
target_link_libraries(L2_UE_LTE_NR PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs)
if (NOT ${NOS1})
target_compile_definitions(L2_UE PUBLIC -DPDCP_USE_NETLINK)
endif()
target_link_libraries(L2_UE PRIVATE asn1_lte_rrc_hdrs)
add_library( NR_L2_UE ${NR_L2_SRC_UE} ${MAC_NR_SRC_UE} )
target_link_libraries(NR_L2_UE PRIVATE f1ap nr_rlc)
target_link_libraries(NR_L2_UE PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs)
target_link_libraries(NR_L2_UE PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs nr_common nr_ue_power_procedures)
add_library(MAC_NR_COMMON
${OPENAIR2_DIR}/LAYER2/NR_MAC_COMMON/nr_mac_common.c
@@ -1912,8 +1895,6 @@ endif()
add_library(SIMU_ETH STATIC
${OPENAIR1_DIR}/SIMULATION/ETH_TRANSPORT/netlink_init.c
${OPENAIR1_DIR}/SIMULATION/ETH_TRANSPORT/multicast_link.c
${OPENAIR1_DIR}/SIMULATION/ETH_TRANSPORT/socket.c
)
target_link_libraries(SIMU_ETH PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs)
@@ -1933,10 +1914,9 @@ set(CMAKE_MODULE_PATH "${OPENAIR_DIR}/cmake_targets/tools/MODULES" "${CMAKE_MODU
# add executables for operation
#################################
add_library(minimal_lib
${OPENAIR_DIR}/common/utils/LOG/log.c
${OPENAIR_DIR}/common/utils/minimal_stub.c
)
target_link_libraries(minimal_lib pthread dl ${T_LIB})
target_link_libraries(minimal_lib PUBLIC pthread dl ${T_LIB} LOG)
add_executable(nfapi_test
${OPENAIR_DIR}/openair2/NR_PHY_INTERFACE/nfapi_5g_test.c
@@ -1967,7 +1947,6 @@ add_executable(lte-softmodem
${OPENAIR_DIR}/radio/COMMON/common_lib.c
${OPENAIR_DIR}/radio/COMMON/record_player.c
${OPENAIR2_DIR}/RRC/NAS/nas_config.c
${OPENAIR2_DIR}/RRC/NAS/rb_config.c
${OPENAIR3_DIR}/NAS/UE/nas_ue_task.c
${PHY_INTERFACE_DIR}/queue_t.c
${OPENAIR_DIR}/common/utils/lte/ue_power.c
@@ -1979,7 +1958,7 @@ add_dependencies(lte-softmodem oai_iqplayer)
target_link_libraries(lte-softmodem PRIVATE
-Wl,--start-group
lte_rrc nr_rrc s1ap m2ap x2ap m3ap GTPV1U SECURITY UTIL HASHTABLE SCTP_CLIENT MME_APP SCHED_LIB SCHED_RU_LIB
PHY_COMMON PHY PHY_RU L2 L2_LTE NFAPI_COMMON_LIB NFAPI_LIB NFAPI_VNF_LIB NFAPI_PNF_LIB NFAPI_USER_LIB MISC_NFAPI_LTE_LIB
PHY_COMMON PHY PHY_RU L2 L2_LTE NFAPI_LIB NFAPI_VNF_LIB NFAPI_PNF_LIB NFAPI_USER_LIB MISC_NFAPI_LTE_LIB
${NAS_UE_LIB} ITTI SIMU SIMU_ETH shlib_loader
-Wl,--end-group z dl)
@@ -2025,21 +2004,17 @@ add_executable(lte-uesoftmodem
${OPENAIR_DIR}/radio/COMMON/common_lib.c
${OPENAIR_DIR}/radio/COMMON/record_player.c
${OPENAIR2_DIR}/RRC/NAS/nas_config.c
${OPENAIR2_DIR}/RRC/NAS/rb_config.c
${OPENAIR3_DIR}/NAS/UE/nas_ue_task.c
${OPENAIR_DIR}/common/utils/lte/ue_power.c
${OPENAIR_DIR}/common/utils/lte/prach_utils.c
${OPENAIR1_DIR}/PHY/TOOLS/phy_scope_interface.c
)
if (NOT ${NOS1})
target_compile_definitions(lte-uesoftmodem PRIVATE -DPDCP_USE_NETLINK)
endif()
target_link_libraries(lte-uesoftmodem PRIVATE
-Wl,--start-group
lte_rrc nr_rrc s1ap x2ap m2ap m3ap
SECURITY UTIL HASHTABLE SCTP_CLIENT MME_APP SCHED_RU_LIB SCHED_UE_LIB PHY_COMMON
PHY_UE PHY_RU L2_UE L2_LTE SIMU SIMU_ETH NFAPI_COMMON_LIB NFAPI_LIB NFAPI_PNF_LIB NFAPI_USER_LIB MISC_NFAPI_LTE_LIB
PHY_UE PHY_RU L2_UE L2_LTE SIMU SIMU_ETH NFAPI_LIB NFAPI_PNF_LIB NFAPI_USER_LIB MISC_NFAPI_LTE_LIB
${NAS_UE_LIB} ITTI shlib_loader
-Wl,--end-group z dl)
@@ -2065,21 +2040,17 @@ add_executable(nr-softmodem
${OPENAIR_DIR}/radio/COMMON/common_lib.c
${OPENAIR_DIR}/radio/COMMON/record_player.c
${OPENAIR2_DIR}/RRC/NAS/nas_config.c
${OPENAIR2_DIR}/RRC/NAS/rb_config.c
${OPENAIR_DIR}/common/utils/lte/ue_power.c
${OPENAIR_DIR}/common/utils/lte/prach_utils.c
${OPENAIR_DIR}/common/utils/nr/nr_common.c
${PHY_INTERFACE_DIR}/queue_t.c
${OPENAIR1_DIR}/PHY/TOOLS/phy_scope_interface.c
)
include(${OPENAIR_DIR}/nfapi/CMakeLists.txt)
target_link_libraries(nr-softmodem PRIVATE
-Wl,--start-group
UTIL HASHTABLE SCTP_CLIENT SCHED_LIB SCHED_RU_LIB SCHED_NR_LIB PHY_NR PHY PHY_COMMON PHY_NR_COMMON PHY_RU GTPV1U SECURITY
ITTI ${NAS_UE_LIB} lte_rrc nr_rrc
ngap s1ap L2_LTE_NR L2_NR MAC_NR_COMMON NFAPI_COMMON_LIB NFAPI_LIB NFAPI_VNF_LIB NFAPI_PNF_LIB NFAPI_USER_LIB SIMU SIMU_ETH
ngap s1ap L2_LTE_NR L2_NR MAC_NR_COMMON NFAPI_LIB NFAPI_VNF_LIB NFAPI_PNF_LIB NFAPI_USER_LIB SIMU SIMU_ETH
x2ap f1ap m2ap m3ap e1ap shlib_loader
-Wl,--end-group z dl)
@@ -2087,6 +2058,11 @@ target_link_libraries(nr-softmodem PRIVATE pthread m CONFIG_LIB rt sctp)
target_link_libraries(nr-softmodem PRIVATE ${T_LIB})
target_link_libraries(nr-softmodem PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs)
target_link_libraries(nr-softmodem PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs)
add_boolean_option(OAI_AERIAL OFF "Activate OAI's AERIAL driver" OFF)
if (OAI_AERIAL)
target_compile_definitions(nr-softmodem PUBLIC ENABLE_AERIAL)
target_link_libraries(nr-softmodem PUBLIC aerial_lib)
endif()
if(E2_AGENT)
target_compile_definitions(nr-softmodem PRIVATE ${E2AP_VERSION} ${KPM_VERSION} E2_AGENT)
endif()
@@ -2135,16 +2111,14 @@ add_executable(nr-uesoftmodem
${OPENAIR_DIR}/radio/COMMON/record_player.c
${OPENAIR2_DIR}/RRC/NAS/nas_config.c
${OPENAIR2_DIR}/LAYER2/NR_MAC_COMMON/nr_mac_common.c
${OPENAIR2_DIR}/RRC/NAS/rb_config.c
${OPENAIR3_DIR}/NAS/UE/nas_ue_task.c
${OPENAIR_DIR}/common/utils/nr/nr_common.c
${OPENAIR1_DIR}/PHY/TOOLS/phy_scope_interface.c
)
target_link_libraries(nr-uesoftmodem PRIVATE
-Wl,--start-group
nr_rrc SECURITY UTIL HASHTABLE SCHED_RU_LIB SCHED_NR_UE_LIB
PHY_COMMON PHY_NR_COMMON PHY_NR_UE NR_L2_UE L2_UE_LTE_NR MAC_NR_COMMON NFAPI_COMMON_LIB NFAPI_LIB NFAPI_PNF_LIB
PHY_COMMON PHY_NR_COMMON PHY_NR_UE NR_L2_UE L2_UE_LTE_NR MAC_NR_COMMON NFAPI_LIB NFAPI_PNF_LIB
NFAPI_USER_LIB MISC_NFAPI_NR_LIB
ITTI LIB_5GNAS_GNB LIB_NAS_SIMUE ${NAS_SIM_LIB} SIMU SIMU_ETH shlib_loader
-Wl,--end-group z dl)
@@ -2192,7 +2166,6 @@ target_link_libraries(rftest PRIVATE asn1_lte_rrc_hdrs asn1_nr_rrc_hdrs)
add_executable(polartest
${OPENAIR1_DIR}/PHY/CODING/TESTBENCH/polartest.c
${OPENAIR_DIR}/common/utils/nr/nr_common.c
)
target_link_libraries(polartest PRIVATE
-Wl,--start-group UTIL SIMU PHY_COMMON PHY_NR PHY_NR_COMMON PHY_NR_UE CONFIG_LIB -Wl,--end-group
@@ -2201,7 +2174,6 @@ target_link_libraries(polartest PRIVATE
add_executable(smallblocktest
${OPENAIR1_DIR}/PHY/CODING/TESTBENCH/smallblocktest.c
${OPENAIR_DIR}/common/utils/nr/nr_common.c
)
target_link_libraries(smallblocktest PRIVATE
@@ -2227,7 +2199,6 @@ target_link_libraries(ldpctest PRIVATE
add_executable(nr_dlschsim
${OPENAIR1_DIR}/SIMULATION/NR_PHY/dlschsim.c
${OPENAIR1_DIR}/SIMULATION/NR_PHY/nr_dummy_functions.c
${OPENAIR_DIR}/common/utils/nr/nr_common.c
)
target_link_libraries(nr_dlschsim PRIVATE
-Wl,--start-group UTIL SIMU PHY_COMMON PHY_NR_COMMON PHY_NR PHY_NR_UE SCHED_NR_LIB CONFIG_LIB MAC_NR_COMMON -Wl,--end-group
@@ -2238,7 +2209,6 @@ target_link_libraries(nr_dlschsim PRIVATE asn1_nr_rrc_hdrs)
add_executable(nr_pbchsim
${OPENAIR1_DIR}/SIMULATION/NR_PHY/pbchsim.c
${OPENAIR1_DIR}/SIMULATION/NR_PHY/nr_dummy_functions.c
${OPENAIR_DIR}/common/utils/nr/nr_common.c
)
target_link_libraries(nr_pbchsim PRIVATE
-Wl,--start-group UTIL SIMU PHY_COMMON PHY_NR_COMMON PHY_NR PHY_NR_UE SCHED_NR_LIB CONFIG_LIB MAC_NR_COMMON -Wl,--end-group
@@ -2249,7 +2219,6 @@ target_link_libraries(nr_pbchsim PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs)
add_executable(nr_psbchsim
${OPENAIR1_DIR}/SIMULATION/NR_PHY/psbchsim.c
${OPENAIR1_DIR}/SIMULATION/NR_PHY/nr_dummy_functions.c
${OPENAIR_DIR}/common/utils/nr/nr_common.c
${OPENAIR_DIR}/executables/softmodem-common.c
${OPENAIR2_DIR}/RRC/NAS/nas_config.c
${NR_UE_RRC_DIR}/rrc_nsa.c
@@ -2267,7 +2236,6 @@ target_link_libraries(nr_psbchsim PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs)
add_executable(nr_pucchsim
${OPENAIR1_DIR}/SIMULATION/NR_PHY/pucchsim.c
${OPENAIR1_DIR}/SIMULATION/NR_PHY/nr_dummy_functions.c
${OPENAIR_DIR}/common/utils/nr/nr_common.c
)
target_link_libraries(nr_pucchsim PRIVATE
-Wl,--start-group UTIL SIMU PHY_COMMON PHY_NR_COMMON PHY_NR PHY_NR_UE SCHED_NR_LIB CONFIG_LIB MAC_NR_COMMON -Wl,--end-group
@@ -2278,7 +2246,6 @@ target_link_libraries(nr_pucchsim PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs)
add_executable(nr_dlsim
${OPENAIR1_DIR}/SIMULATION/NR_PHY/dlsim.c
${OPENAIR1_DIR}/SIMULATION/NR_PHY/nr_dummy_functions.c
${OPENAIR_DIR}/common/utils/nr/nr_common.c
${OPENAIR_DIR}/executables/softmodem-common.c
${OPENAIR2_DIR}/RRC/NAS/nas_config.c
${NR_UE_RRC_DIR}/rrc_nsa.c
@@ -2295,7 +2262,6 @@ target_link_libraries(nr_dlsim PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs)
add_executable(nr_prachsim
${OPENAIR1_DIR}/SIMULATION/NR_PHY/prachsim.c
${OPENAIR1_DIR}/SIMULATION/NR_PHY/nr_dummy_functions.c
${OPENAIR_DIR}/common/utils/nr/nr_common.c
)
target_link_libraries(nr_prachsim PRIVATE
-Wl,--start-group UTIL SIMU PHY_COMMON PHY_NR_COMMON PHY_NR PHY_RU PHY_NR_UE MAC_NR_COMMON SCHED_NR_LIB CONFIG_LIB -lz -Wl,--end-group
@@ -2305,7 +2271,6 @@ target_link_libraries(nr_prachsim PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs)
add_executable(nr_ulschsim
${OPENAIR1_DIR}/SIMULATION/NR_PHY/ulschsim.c
${OPENAIR1_DIR}/SIMULATION/NR_PHY/nr_dummy_functions.c
${OPENAIR_DIR}/common/utils/nr/nr_common.c
${PHY_INTERFACE_DIR}/queue_t.c
)
target_link_libraries(nr_ulschsim PRIVATE
@@ -2317,7 +2282,6 @@ target_link_libraries(nr_ulschsim PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs)
add_executable(nr_ulsim
${OPENAIR1_DIR}/SIMULATION/NR_PHY/ulsim.c
${OPENAIR1_DIR}/SIMULATION/NR_PHY/nr_dummy_functions.c
${OPENAIR_DIR}/common/utils/nr/nr_common.c
${OPENAIR_DIR}/executables/softmodem-common.c
${OPENAIR2_DIR}/RRC/NAS/nas_config.c
${NR_UE_RRC_DIR}/rrc_nsa.c
@@ -2379,7 +2343,7 @@ endforeach(myExe)
#ensure that the T header files are generated before targets depending on them
if (${T_TRACER})
foreach(i
#all "add_executable" definitions (except tests, rb_tool, updatefw)
#all "add_executable" definitions (except tests, updatefw)
lte-softmodem lte-uesoftmodem nr-softmodem
nr-uesoftmodem dlsim dlsim_tm4 dlsim_tm7
ulsim pbchsim scansim mbmssim pdcchsim pucchsim prachsim
@@ -2390,98 +2354,18 @@ if (${T_TRACER})
params_libconfig oai_usrpdevif oai_bladerfdevif oai_lmssdrdevif oai_iqplayer
oai_eth_transpro oai_mobipass coding HASHTABLE UTIL OMG_SUMO
SECURITY SCHED_LIB SCHED_NR_LIB SCHED_RU_LIB SCHED_UE_LIB SCHED_NR_UE_LIB default_sched remote_sched RAL
NFAPI_COMMON_LIB NFAPI_LIB NFAPI_PNF_LIB NFAPI_VNF_LIB NFAPI_USER_LIB
NFAPI_LIB NFAPI_PNF_LIB NFAPI_VNF_LIB NFAPI_USER_LIB
MISC_NFAPI_LTE_LIB MISC_NFAPI_NR_LIB
PHY_COMMON PHY PHY_UE PHY_NR PHY_NR_COMMON PHY_NR_UE PHY_RU PHY_MEX
L2 L2_LTE L2_NR L2_LTE_NR L2_UE NR_L2_UE L2_UE_LTE_NR MAC_NR_COMMON MAC_UE_NR ngap
CN_UTILS GTPV1U SCTP_CLIENT MME_APP LIB_NAS_UE NB_IoT SIMU SIMU_ETH OPENAIR0_LIB
ldpc_orig ldpc_optim ldpc_optim8seg ldpc_t2 ldpc_cl ldpc_cuda ldpc dfts config_internals)
ldpc_orig ldpc_optim ldpc_optim8seg ldpc_t2 ldpc_cl ldpc_cuda ldpc dfts config_internals nr_common)
if (TARGET ${i})
add_dependencies(${i} generate_T)
endif()
endforeach(i)
endif (${T_TRACER})
##################################################
# Generated specific cases is not regular code
###############################################
################
# Kernel modules
###############
# Set compiler options for kernel modules
# we need to get out cmake to use the regular Linux Kernel process
# this is documented as https://www.kernel.org/doc/Documentation/kbuild/modules.txt
######################################
# retrieve the compiler options to send it to gccxml
get_directory_property(DirDefs COMPILE_DEFINITIONS )
foreach( d ${DirDefs} )
set(module_cc_opt "${module_cc_opt} -D${d}")
endforeach()
get_directory_property( DirDefs INCLUDE_DIRECTORIES )
foreach( d ${DirDefs} )
set(module_cc_opt "${module_cc_opt} -I${d}")
endforeach()
EXECUTE_PROCESS(COMMAND uname -r
OUTPUT_VARIABLE os_release
OUTPUT_STRIP_TRAILING_WHITESPACE)
SET(module_build_path /lib/modules/${os_release}/build)
function(make_driver name dir)
file(MAKE_DIRECTORY ${OPENAIR_BIN_DIR}/${name})
foreach(f IN ITEMS ${ARGN})
list(APPEND src_path_list ${dir}/${f})
string(REGEX REPLACE "c *$" "o" obj ${f})
set(objs "${objs} ${obj}")
endforeach()
CONFIGURE_FILE(${OPENAIR_CMAKE}/tools/Kbuild.cmake ${OPENAIR_BIN_DIR}/${name}/Kbuild)
add_custom_command(OUTPUT ${name}.ko
COMMAND make -C ${module_build_path} M=${OPENAIR_BIN_DIR}/${name}
WORKING_DIRECTORY ${OPENAIR_BIN_DIR}/${name}
COMMENT "building ${module}.ko"
VERBATIM
SOURCES ${src_path_list}
)
add_custom_target(${name} DEPENDS ${name}.ko)
endfunction(make_driver name dir src)
# nashmesh module
################
list(APPEND nasmesh_src device.c common.c ioctl.c classifier.c tool.c mesh.c)
set(module_cc_opt "${module_cc_opt} -DNAS_NETLINK -DPDCP_USE_NETLINK")
# legacy Makefile was using NAS_NETLINK flag, but other drivers the hereafter flag
# so, this cmake use OAI_NW_DRIVER_USE_NETLINK everywhere
if (OAI_NW_DRIVER_USE_NETLINK)
list(APPEND nasmesh_src netlink.c)
endif()
make_driver(nasmesh ${OPENAIR2_DIR}/NETWORK_DRIVER/MESH ${nasmesh_src})
# user space tool for configuring MESH IP driver
################
add_executable(rb_tool
${OPENAIR2_DIR}/NETWORK_DRIVER/MESH/RB_TOOL/rb_tool.c
)
target_include_directories(rb_tool PRIVATE ${OPENAIR2_DIR}/NETWORK_DRIVER/MESH/)
# ???
####################
list(APPEND oai_nw_drv_src device.c common.c ioctl.c classifier.c tool.c)
if(OAI_NW_DRIVER_USE_NETLINK)
list(APPEND oai_nw_drv_src netlink.c)
endif()
make_driver(oai_nw_drv ${OPENAIR2_DIR}/NETWORK_DRIVER/LTE ${oai_nw_drv_src})
# ue_ip: purpose ???
###############
list(APPEND ue_ip_src device.c common.c)
if(OAI_NW_DRIVER_USE_NETLINK)
list(APPEND ue_ip_src netlink.c)
endif()
make_driver(ue_ip ${OPENAIR2_DIR}/NETWORK_DRIVER/UE_IP ${ue_ip_src})
include(${OPENAIR1_DIR}/PHY/CODING/nrLDPC_decoder/nrLDPC_tools/CMakeLists.txt)
set(ENABLE_TESTS OFF CACHE STRING "Activate build of tests")
@@ -2492,10 +2376,26 @@ if(ENABLE_TESTS)
# meta-target: each test is supposed to add_dependencies(tests ${NEWTEST})
# then, it is possible to build and execute all tests using "ninja tests && ctest"
add_custom_target(tests)
find_package(GTest)
if (NOT GTest_FOUND)
message(STATUS "GTest package not found, will download googletest automatically. To prevent that install google test on your system (libgtest-dev)")
include(FetchContent)
FetchContent_Declare(
googletest
GIT_REPOSITORY https://github.com/google/googletest.git
GIT_TAG 58d77fa8070e8cec2dc1ed015d66b454c8d78850 # 1.12.1
)
set(BUILD_GMOCK OFF)
set(INSTALL_GTEST OFF)
FetchContent_MakeAvailable(googletest)
add_library(GTest::gtest ALIAS gtest)
add_library(GTest::gtest_main ALIAS gtest_main)
endif()
endif()
add_subdirectory(common)
add_subdirectory(doc)
add_subdirectory(nfapi)
add_subdirectory(openair1)
add_subdirectory(openair2)
add_subdirectory(openair3)

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,12 @@
<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://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-RHEL8-Green" alt="Supported OS RHEL8"></a>
<a href="https://www.redhat.com/en/technologies/linux-platforms/enterprise-linux"><img src="https://img.shields.io/badge/OS-RHEL9-Green" alt="Supported OS RELH9"></a>
<a href="https://getfedora.org/en/workstation/"><img src="https://img.shields.io/badge/OS-Fedore37-Green" alt="Supported OS Fedora 37"></a>
<a href="https://getfedora.org/en/workstation/"><img src="https://img.shields.io/badge/OS-Fedore40-Green" alt="Supported OS Fedora 40"></a>
</p>
<p align="center">
@@ -25,6 +25,7 @@
<a href="https://hub.docker.com/r/oaisoftwarealliance/oai-nr-ue"><img alt="Docker Pulls" src="https://img.shields.io/docker/pulls/oaisoftwarealliance/oai-nr-ue?label=NR-UE%20docker%20pulls"></a>
<a href="https://hub.docker.com/r/oaisoftwarealliance/oai-enb"><img alt="Docker Pulls" src="https://img.shields.io/docker/pulls/oaisoftwarealliance/oai-enb?label=eNB%20docker%20pulls"></a>
<a href="https://hub.docker.com/r/oaisoftwarealliance/oai-lte-ue"><img alt="Docker Pulls" src="https://img.shields.io/docker/pulls/oaisoftwarealliance/oai-lte-ue?label=LTE-UE%20docker%20pulls"></a>
<a href="https://hub.docker.com/r/oaisoftwarealliance/oai-nr-cuup"><img alt="Docker Pulls" src="https://img.shields.io/docker/pulls/oaisoftwarealliance/oai-nr-cuup?label=NR-CUUP%20docker%20pulls"></a>
</p>
# OpenAirInterface License #
@@ -69,11 +70,11 @@ 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, ...
├── 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
```

View File

@@ -30,11 +30,11 @@ global:
nrpsbchsim: dedale
nrprachsim: dedale
nrpucchsim: dedale
nrulschsim: theseus
nrulsim3gpp: theseus
nrulsimmimo: theseus
nrulsimmisc: theseus
nrulsimscfdma: theseus
polartest: theseus
smallblocktest: theseus
ulsim: theseus
nrulschsim: demophon
nrulsim3gpp: demophon
nrulsimmimo: demophon
nrulsimmisc: demophon
nrulsimscfdma: demophon
polartest: demophon
smallblocktest: demophon
ulsim: demophon

View File

@@ -229,6 +229,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

@@ -221,6 +221,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

@@ -304,7 +304,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

@@ -274,7 +274,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

@@ -286,7 +286,7 @@ class Containerize():
self.host = result.group(0)
if self.host == 'Ubuntu':
self.cli = 'docker'
self.dockerfileprefix = '.ubuntu20'
self.dockerfileprefix = '.ubuntu22'
self.cliBuildOptions = ''
elif self.host == 'Red Hat':
self.cli = 'sudo podman'
@@ -321,7 +321,7 @@ class Containerize():
imageNames.append(('oai-nr-cuup', 'nr-cuup', 'oai-nr-cuup-asan', '--build-arg "BUILD_OPTION=--sanitize"'))
result = re.search('build_cross_arm64', self.imageKind)
if result is not None:
self.dockerfileprefix = '.ubuntu20.cross-arm64'
self.dockerfileprefix = '.ubuntu22.cross-arm64'
# Workaround for some servers, we need to erase completely the workspace
if self.forcedWorkspaceCleanup:
@@ -412,10 +412,10 @@ class Containerize():
elif image != 'ran-build':
cmd.run(f'sed -i -e "s#ran-build:latest#ran-build:{imageTag}#" docker/Dockerfile.{pattern}{self.dockerfileprefix}')
if image == 'oai-gnb-aerial':
cmd.run('cp -f /opt/nvidia-ipc/nvipc_src.2023.11.28.tar.gz .')
cmd.run('cp -f /opt/nvidia-ipc/nvipc_src.2024.05.23.tar.gz .')
ret = cmd.run(f'{self.cli} build {self.cliBuildOptions} --target {image} --tag {name}:{imageTag} --file docker/Dockerfile.{pattern}{self.dockerfileprefix} {option} . > cmake_targets/log/{name}.log 2>&1', timeout=1200)
if image == 'oai-gnb-aerial':
cmd.run('rm -f nvipc_src.2023.11.28.tar.gz')
cmd.run('rm -f nvipc_src.2024.05.23.tar.gz')
if image == 'ran-build' and ret.returncode == 0:
cmd.run(f"docker run --name test-log -d {name}:{imageTag} /bin/true")
cmd.run(f"docker cp test-log:/oai-ran/cmake_targets/log/ cmake_targets/log/{name}/")
@@ -668,7 +668,7 @@ class Containerize():
cmd.run(f'git diff HEAD..origin/develop -- cmake_targets/build_oai cmake_targets/tools/build_helper docker/Dockerfile.base{self.dockerfileprefix} | grep --colour=never -i INDEX')
result = re.search('index', cmd.getBefore())
if result is not None:
baseTag = 'develop'
baseTag = 'ci-temp'
ret = cmd.run(f"docker image inspect --format=\'Size = {{{{.Size}}}} bytes\' {baseImage}:{baseTag}")
if ret.returncode != 0:
logging.error(f'No {baseImage} image present, cannot build tests')
@@ -677,9 +677,11 @@ class Containerize():
return False
# build ran-unittests image
dockerfile = "ci-scripts/docker/Dockerfile.unittest.ubuntu20"
dockerfile = "ci-scripts/docker/Dockerfile.unittest.ubuntu22"
ret = cmd.run(f'docker build --progress=plain --tag ran-unittests:{baseTag} --file {dockerfile} . &> {lSourcePath}/cmake_targets/log/unittest-build.log')
if ret.returncode != 0:
build_log_name = f'build_log_{self.testCase_id}'
CopyLogsToExecutor(cmd, lSourcePath, build_log_name)
logging.error(f'Cannot build unit tests')
HTML.CreateHtmlTestRow("Unit test build failed", 'KO', [dockerfile])
HTML.CreateHtmlTabFooter(False)
@@ -688,8 +690,8 @@ class Containerize():
HTML.CreateHtmlTestRowQueue("Build unit tests", 'OK', [dockerfile])
# it worked, build and execute tests, and close connection
ret = cmd.run(f'docker run -a STDOUT --rm ran-unittests:develop ctest --output-on-failure --no-label-summary -j$(nproc)')
cmd.run(f'docker rmi ran-unittests:develop')
ret = cmd.run(f'docker run -a STDOUT --rm ran-unittests:{baseTag} ctest --output-on-failure --no-label-summary -j$(nproc)')
cmd.run(f'docker rmi ran-unittests:{baseTag}')
build_log_name = f'build_log_{self.testCase_id}'
CopyLogsToExecutor(cmd, lSourcePath, build_log_name)
cmd.close()
@@ -897,9 +899,7 @@ class Containerize():
mySSH.command(f'docker compose --file ci-docker-compose.yml up -d -- {svcName}', '\$', 30)
# Checking Status
grep = ''
if svcName != '': grep = f' | grep -A3 --color=never {svcName}'
mySSH.command(f'docker compose --file ci-docker-compose.yml config {grep}', '\$', 5)
mySSH.command(f'docker compose --file ci-docker-compose.yml config {svcName}', '\$', 5)
result = re.search('container_name: (?P<container_name>[a-zA-Z0-9\-\_]+)', mySSH.getBefore())
unhealthyNb = 0
healthyNb = 0

View File

@@ -810,7 +810,7 @@ class OaiCiTest():
with cls_cmd.getConnection(ue.getHost()) as cmd_ue, cls_cmd.getConnection(EPC.IPAddress) as cmd_svr:
port = 5002 + idx
cmd_ue.run(f'{ue.getCmdPrefix()} iperf -B {ueIP} -s -u -i1 >> {server_filename} &', timeout=iperf_time*1.5)
cmd_svr.run(f'{svr.getCmdPrefix()} iperf -c {ueIP} -B {svrIP} {iperf_opt} -i1 2>&1 | tee {client_filename}', timeout=iperf_time*1.5)
cmd_svr.run(f'{svr.getCmdPrefix()} iperf -c {ueIP} -B {svrIP} {iperf_opt} -i1 2>&1 | tee {client_filename}', timeout=iperf_time*2.5)
cmd_ue.run(f'cp {client_filename} {logPath}/{client_filename}')
cmd_ue.run(f'cp {server_filename} {logPath}/{server_filename}')
status, msg = Iperf_analyzeV2UDP(server_filename, self.iperf_bitrate_threshold, self.iperf_packetloss_threshold, target_bitrate)
@@ -818,10 +818,11 @@ class OaiCiTest():
with cls_cmd.getConnection(ue.getHost()) as cmd_ue, cls_cmd.getConnection(EPC.IPAddress) as cmd_svr:
port = 5002 + idx
# note: some core setups start an iperf3 server automatically, indicated in ci_infra by runIperf3Server: False`
t = iperf_time * 2.5
if runIperf3Server:
cmd_svr.run(f'{svr.getCmdPrefix()} nohup iperf3 -s -B {svrIP} -p {port} -1 {jsonReport} &', timeout=iperf_time*1.5)
cmd_svr.run(f'{svr.getCmdPrefix()} nohup timeout -vk3 {t} iperf3 -s -B {svrIP} -p {port} -1 {jsonReport} &', timeout=t)
cmd_ue.run(f'rm /tmp/{client_filename}', reportNonZero=False)
cmd_ue.run(f'{ue.getCmdPrefix()} {iperf_ue} -B {ueIP} -c {svrIP} -p {port} {iperf_opt} {jsonReport} {serverReport} -O 5 >> /tmp/{client_filename}', timeout=iperf_time*1.5)
cmd_ue.run(f'{ue.getCmdPrefix()} timeout -vk3 {t} {iperf_ue} -B {ueIP} -c {svrIP} -p {port} {iperf_opt} {jsonReport} {serverReport} -O 5 >> /tmp/{client_filename}', timeout=t)
if svr.getHost() == 'localhost':
cmd_ue.run(f'mkdir -p {logPath}')
cmd_ue.run(f'cp /tmp/{client_filename} {logPath}/{client_filename}')

View File

@@ -22,8 +22,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 +44,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

@@ -23,8 +23,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 +46,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

@@ -21,8 +21,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 +40,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

@@ -162,8 +162,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;

View File

@@ -169,8 +169,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;

View File

@@ -195,8 +195,8 @@ gNBs =
NETWORK_INTERFACES :
{
GNB_IPV4_ADDRESS_FOR_NG_AMF = "172.21.16.131";
GNB_IPV4_ADDRESS_FOR_NGU = "172.21.16.131";
GNB_IPV4_ADDRESS_FOR_NG_AMF = "172.21.16.130";
GNB_IPV4_ADDRESS_FOR_NGU = "172.21.16.130";
GNB_PORT_FOR_S1U = 2152; # Spec 2152
};

View File

@@ -28,11 +28,11 @@ gNBs =
# downlinkConfigCommon
#frequencyInfoDL
# this is 2150 MHz + 14 PRBs@15kHz SCS (same as initial BWP), points to Subcarrier 0 of RB#10 of SSB block
# 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 MHz
dl_absoluteFrequencyPointA = 430002;
# this is 2150.43 MHz
dl_absoluteFrequencyPointA = 430086;
#scs-SpecificCarrierList
dl_offstToCarrier = 0;
# subcarrierSpacing
@@ -53,8 +53,8 @@ gNBs =
#uplinkConfigCommon
#frequencyInfoUL
ul_frequencyBand = 66;
# this is 1750 MHz
ul_absoluteFrequencyPointA = 350002;
# this is 1750.43 MHz
ul_absoluteFrequencyPointA = 350086;
#scs-SpecificCarrierList
ul_offstToCarrier = 0;
# subcarrierSpacing

View File

@@ -19,7 +19,7 @@ gNBs =
////////// Physical parameters:
min_rxtxtime = 2;
min_rxtxtime = 5;
do_SRS = 0;
force_256qam_off = 1;
pdsch_AntennaPorts_N1 = 1;

View File

@@ -0,0 +1,321 @@
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 = 001; mnc = 01; mnc_length = 2; snssaiList = ({ sst = 1; sd = 0x1; }) });
@include "neighbour-config.conf"
nr_cellid = 1;
////////// Physical parameters:
do_CSIRS = 0;
do_SRS = 0;
min_rxtxtime = 6;
pdcch_ConfigSIB1 = (
{
controlResourceSetZero = 12;
searchSpaceZero = 0;
}
);
servingCellConfigCommon = (
{
#spCellConfigCommon
physCellId = 0;
# downlinkConfigCommon
#frequencyInfoDL
# this is 3600 MHz + 43 PRBs@30kHz SCS (same as initial BWP)
absoluteFrequencySSB = 641280;
dl_frequencyBand = 78;
# this is 3600 MHz
dl_absoluteFrequencyPointA = 640008;
#scs-SpecificCarrierList
dl_offstToCarrier = 0;
# subcarrierSpacing
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
dl_subcarrierSpacing = 1;
dl_carrierBandwidth = 106;
#initialDownlinkBWP
#genericParameters
# this is RBstart=27,L=48 (275*(L-1))+RBstart
initialDLBWPlocationAndBandwidth = 28875; # 6366 12925 12956 28875 12952
# subcarrierSpacing
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
initialDLBWPsubcarrierSpacing = 1;
#pdcch-ConfigCommon
initialDLBWPcontrolResourceSetZero = 12;
initialDLBWPsearchSpaceZero = 0;
#uplinkConfigCommon
#frequencyInfoUL
ul_frequencyBand = 78;
#scs-SpecificCarrierList
ul_offstToCarrier = 0;
# subcarrierSpacing
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
ul_subcarrierSpacing = 1;
ul_carrierBandwidth = 106;
pMax = 20;
#initialUplinkBWP
#genericParameters
initialULBWPlocationAndBandwidth = 28875;
# 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 = 13;
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 = 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 = 4;
#oneHalf (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
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 = -90;
# ssb_PositionsInBurs_BitmapPR
# 1=short, 2=medium, 3=long
ssb_PositionsInBurst_PR = 2;
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 = 6;
nrofDownlinkSlots = 7;
nrofDownlinkSymbols = 6;
nrofUplinkSlots = 2;
nrofUplinkSymbols = 4;
ssPBCH_BlockPower = -25;
}
);
# Dedicated Serving Cell Configuration
servingCellConfigDedicated = ({
# BWP-Downlink
# BWP 1 Configuration
dl_bwp-Id_1 = 1;
dl_bwp1_locationAndBandwidth = 28875; // RBstart=0, L=106 (40 MHz BW)
# subcarrierSpacing
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
dl_bwp1_subcarrierSpacing = 1;
# BWP 2 Configuration
dl_bwp-Id_2 = 2;
dl_bwp2_locationAndBandwidth = 13750; // RBstart=0, L=51 (20 MHz BW)
# subcarrierSpacing
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
dl_bwp2_subcarrierSpacing = 1;
# BWP 3 Configuration
dl_bwp-Id_3 = 3;
dl_bwp3_locationAndBandwidth = 6325; // RBstart=0, L=24 (10 MHz BW)
# subcarrierSpacing
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
dl_bwp3_subcarrierSpacing = 1;
firstActiveDownlinkBWP-Id = 1; #BWP-Id
defaultDownlinkBWP-Id = 1; #BWP-Id
# bwp-InactivityTimer ENUMERATED {ms2, ms3, ms4, ms5, ms6, ms8, ms10, ms20, ms30,
# ms40,ms50, ms60, ms80,ms100, ms200,ms300, ms500,
# ms750, ms1280, ms1920, ms2560, spare10, spare9, spare8,
# spare7, spare6, spare5, spare4, spare3, spare2, spare1 }
# UplinkConfig
# BWP-Uplink
# BWP 1 Configuration
ul_bwp-Id_1 = 1;
ul_bwp1_locationAndBandwidth = 28875; // RBstart=0, L=106 (40 MHz BW)
# subcarrierSpacing
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
ul_bwp1_subcarrierSpacing = 1;
# BWP 2 Configuration
ul_bwp-Id_2 = 2;
ul_bwp2_locationAndBandwidth = 13750; // RBstart=0, L=51 (20 MHz BW)
# subcarrierSpacing
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
ul_bwp2_subcarrierSpacing = 1;
# BWP 3 Configuration
ul_bwp-Id_3 = 3;
ul_bwp3_locationAndBandwidth = 6325; // RBstart=0, L=24 (10 MHz BW)
# subcarrierSpacing
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
ul_bwp3_subcarrierSpacing = 1;
firstActiveUplinkBWP-Id = 1; #BWP-Id
}
);
# ------- 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.70.132"; });
NETWORK_INTERFACES : {
GNB_IPV4_ADDRESS_FOR_NG_AMF = "192.168.70.129";
GNB_IPV4_ADDRESS_FOR_NGU = "192.168.70.129";
GNB_PORT_FOR_S1U = 2152; # Spec 2152
};
}
);
MACRLCs = (
{
num_cc = 1;
tr_s_preference = "local_L1";
tr_n_preference = "local_RRC";
pusch_TargetSNRx10 = 250;
pucch_TargetSNRx10 = 200;
ulsch_max_frame_inactivity = 0;
}
);
L1s = (
{
num_cc = 1;
tr_n_preference = "local_mac";
prach_dtx_threshold = 120;
pucch0_dtx_threshold = 100;
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 = [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";
}
);
rfsimulator: {
serveraddr = "server";
serverport = 4043;
options = (); #("saviq"); or/and "chanmod"
modelname = "AWGN";
IQfile = "/tmp/rfsimulator.iqs"
}
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";
nr_rrc_log_level ="info";
rrc_log_level ="info";
ngap_log_level ="debug";
f1ap_log_level ="debug";
};

View File

@@ -161,8 +161,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

@@ -161,8 +161,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

@@ -0,0 +1,76 @@
neighbour_list = (
{
nr_cellid = 1;
neighbour_cell_configuration = (
{
gNB_ID = 0xb00;
nr_cellid = 2;
physical_cellId = 0x002;
absoluteFrequencySSB = 641280 ;
subcarrierSpacing = 1; #30 KHz
plmn = { mcc = 216; mnc = 03; mnc_length = 2};
tracking_area_code = 2;
},
{
gNB_ID = 0xa00;
nr_cellid = 3;
physical_cellId = 0x003;
absoluteFrequencySSB = 641280 ;
subcarrierSpacing = 1; #30 KHz
plmn = { mcc = 999; mnc = 99; mnc_length = 2};
tracking_area_code = 3;
},
{
gNB_ID = 0xc00;
nr_cellid = 4;
physical_cellId = 0x004;
absoluteFrequencySSB = 641280 ;
subcarrierSpacing = 1; #30 KHz
plmn = { mcc = 999; mnc = 99; mnc_length = 2};
tracking_area_code = 4;
}
)
},
{
nr_cellid = 2;
neighbour_cell_configuration = (
{
gNB_ID = 0xe00;
nr_cellid = 1;
physical_cellId = 0x000;
absoluteFrequencySSB = 641280 ;
subcarrierSpacing = 1; #30 KHz
plmn = { mcc = 001; mnc = 01; mnc_length = 2};
tracking_area_code = 1;
}
)
}
);
nr_measurement_configuration = {
Periodical = {
enable = 1;
includeBeamMeasurements = 1;
maxNrofRS_IndexesToReport = 4;
};
A2 = {
enable = 1;
threshold = 60;
timeToTrigger = 1;
};
A3 = ({
cell_id = -1; #Default
offset = 10;
hysteresis = 0;
timeToTrigger = 1
}, {
cell_id = 2;
offset = 5;
hysteresis = 1;
timeToTrigger = 2
})
};

View File

@@ -21,15 +21,20 @@
#---------------------------------------------------------------------
#
# Dockerfile for the Open-Air-Interface BUILD service
# Valid for Ubuntu 20.04
# Valid for Ubuntu 22.04
#
#---------------------------------------------------------------------
FROM ran-base:develop as ran-tests
RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get upgrade --yes && \
DEBIAN_FRONTEND=noninteractive apt-get install --yes \
libgtest-dev
RUN rm -Rf /oai-ran
WORKDIR /oai-ran
COPY . .
WORKDIR /oai-ran/build
RUN cmake -GNinja -DENABLE_TESTS=ON -DCMAKE_BUILD_TYPE=Debug .. && ninja tests
RUN cmake -GNinja -DENABLE_TESTS=ON -DCMAKE_BUILD_TYPE=Debug -DSANITIZE_ADDRESS=True .. && ninja tests

View File

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

View File

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

View File

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

View File

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

View File

@@ -44,7 +44,7 @@
<desc>Run nr_ulsim with T2 LDPC offload: SNR = 30, MCS = 5, 106 PRBs, 1 layer</desc>
<physim_run>nr_ulsim</physim_run>
<physim_time_threshold>100</physim_time_threshold>
<physim_run_args>-n100 -s30 -m5 -r106 -R106 -o -P</physim_run_args>
<physim_run_args>-n100 -s30 -m5 -r106 -R106 -o -P --ldpc_offload.dpdk_dev d8:00.0</physim_run_args>
</testCase>
<testCase id="010121">
@@ -60,7 +60,7 @@
<desc>Run nr_ulsim with T2 LDPC offload: SNR = 30, MCS = 15, 106 PRBs, 1 layer</desc>
<physim_run>nr_ulsim</physim_run>
<physim_time_threshold>150</physim_time_threshold>
<physim_run_args>-n100 -s30 -m15 -r106 -R106 -o -P</physim_run_args>
<physim_run_args>-n100 -s30 -m15 -r106 -R106 -o -P --ldpc_offload.dpdk_dev d8:00.0</physim_run_args>
</testCase>
<testCase id="010131">
@@ -76,7 +76,7 @@
<desc>Run nr_ulsim with T2 LDPC offload: SNR = 30, MCS = 25, 106 PRBs, 1 layer</desc>
<physim_run>nr_ulsim</physim_run>
<physim_time_threshold>250</physim_time_threshold>
<physim_run_args>-n100 -s30 -m25 -r106 -R106 -o -P</physim_run_args>
<physim_run_args>-n100 -s30 -m25 -r106 -R106 -o -P --ldpc_offload.dpdk_dev d8:00.0</physim_run_args>
</testCase>
<testCase id="010211">
@@ -92,7 +92,7 @@
<desc>Run nr_ulsim with T2 LDPC offload: SNR = 30, MCS = 5, 273 PRBs, 1 layer</desc>
<physim_run>nr_ulsim</physim_run>
<physim_time_threshold>150</physim_time_threshold>
<physim_run_args>-n100 -s30 -m5 -r273 -R273 -o -P</physim_run_args>
<physim_run_args>-n100 -s30 -m5 -r273 -R273 -o -P --ldpc_offload.dpdk_dev d8:00.0</physim_run_args>
</testCase>
<testCase id="010221">
@@ -108,7 +108,7 @@
<desc>Run nr_ulsim with T2 LDPC offload: SNR = 30, MCS = 15, 273 PRBs, 1 layer</desc>
<physim_run>nr_ulsim</physim_run>
<physim_time_threshold>350</physim_time_threshold>
<physim_run_args>-n100 -s30 -m15 -r273 -R273 -o -P</physim_run_args>
<physim_run_args>-n100 -s30 -m15 -r273 -R273 -o -P --ldpc_offload.dpdk_dev d8:00.0</physim_run_args>
</testCase>
<testCase id="010231">
@@ -124,7 +124,7 @@
<desc>Run nr_ulsim with T2 LDPC offload: SNR = 30, MCS = 25, 273 PRBs, 1 layer</desc>
<physim_run>nr_ulsim</physim_run>
<physim_time_threshold>550</physim_time_threshold>
<physim_run_args>-n100 -s30 -m25 -r273 -R273 -o -P</physim_run_args>
<physim_run_args>-n100 -s30 -m25 -r273 -R273 -o -P --ldpc_offload.dpdk_dev d8:00.0</physim_run_args>
</testCase>
<testCase id="010311">
@@ -140,7 +140,7 @@
<desc>Run nr_ulsim with T2 LDPC offload: SNR = 30, MCS = 5, 273 PRBs, 2 layers</desc>
<physim_run>nr_ulsim</physim_run>
<physim_time_threshold>250</physim_time_threshold>
<physim_run_args>-n100 -s30 -m5 -r273 -R273 -o -W2 -z2 -y2 -P</physim_run_args>
<physim_run_args>-n100 -s30 -m5 -r273 -R273 -o -W2 -z2 -y2 -P --ldpc_offload.dpdk_dev d8:00.0</physim_run_args>
</testCase>
<testCase id="010321">
@@ -156,7 +156,7 @@
<desc>Run nr_ulsim with T2 LDPC offload: SNR = 30, MCS = 15, 273 PRBs, 2 layers</desc>
<physim_run>nr_ulsim</physim_run>
<physim_time_threshold>650</physim_time_threshold>
<physim_run_args>-n100 -s30 -m15 -r273 -R273 -o -W2 -z2 -y2 -P</physim_run_args>
<physim_run_args>-n100 -s30 -m15 -r273 -R273 -o -W2 -z2 -y2 -P --ldpc_offload.dpdk_dev d8:00.0</physim_run_args>
</testCase>
<testCase id="010331">
@@ -172,7 +172,7 @@
<desc>Run nr_ulsim with T2 LDPC offload: SNR = 30, MCS = 25, 273 PRBs, 2 layers</desc>
<physim_run>nr_ulsim</physim_run>
<physim_time_threshold>1100</physim_time_threshold>
<physim_run_args>-n100 -s30 -m25 -r273 -R273 -o -W2 -z2 -y2 -P</physim_run_args>
<physim_run_args>-n100 -s30 -m25 -r273 -R273 -o -W2 -z2 -y2 -P --ldpc_offload.dpdk_dev d8:00.0</physim_run_args>
</testCase>
</testCaseList>

View File

@@ -44,7 +44,7 @@
<desc>Run nr_dlsim with T2 LDPC offload: SNR = 30, MCS = 5, 106 PRBs, 1 layer</desc>
<physim_run>nr_dlsim</physim_run>
<physim_time_threshold>100</physim_time_threshold>
<physim_run_args>-n100 -s30 -e5 -b106 -R106 -c -P</physim_run_args>
<physim_run_args>-n100 -s30 -e5 -b106 -R106 -c -P --ldpc_offload.dpdk_dev d8:00.0</physim_run_args>
</testCase>
<testCase id="000121">
@@ -60,7 +60,7 @@
<desc>Run nr_dlsim with T2 LDPC offload: SNR = 30, MCS = 15, 106 PRBs, 1 layer</desc>
<physim_run>nr_dlsim</physim_run>
<physim_time_threshold>100</physim_time_threshold>
<physim_run_args>-n100 -s30 -e15 -b106 -R106 -c -P</physim_run_args>
<physim_run_args>-n100 -s30 -e15 -b106 -R106 -c -P --ldpc_offload.dpdk_dev d8:00.0</physim_run_args>
</testCase>
<testCase id="000131">
@@ -76,7 +76,7 @@
<desc>Run nr_dlsim with T2 LDPC offload: SNR = 30, MCS = 25, 106 PRBs, 1 layer</desc>
<physim_run>nr_dlsim</physim_run>
<physim_time_threshold>200</physim_time_threshold>
<physim_run_args>-n100 -s30 -e25 -b106 -R106 -c -P</physim_run_args>
<physim_run_args>-n100 -s30 -e25 -b106 -R106 -c -P --ldpc_offload.dpdk_dev d8:00.0</physim_run_args>
</testCase>
<testCase id="000211">
@@ -92,7 +92,7 @@
<desc>Run nr_dlsim with T2 LDPC offload: SNR = 30, MCS = 5, 273 PRBs, 1 layer</desc>
<physim_run>nr_dlsim</physim_run>
<physim_time_threshold>150</physim_time_threshold>
<physim_run_args>-n100 -s30 -e5 -b273 -R273 -c -P</physim_run_args>
<physim_run_args>-n100 -s30 -e5 -b273 -R273 -c -P --ldpc_offload.dpdk_dev d8:00.0</physim_run_args>
</testCase>
<testCase id="000221">
@@ -108,7 +108,7 @@
<desc>Run nr_dlsim with T2 LDPC offload: SNR = 30, MCS = 15, 273 PRBs, 1 layer</desc>
<physim_run>nr_dlsim</physim_run>
<physim_time_threshold>250</physim_time_threshold>
<physim_run_args>-n100 -s30 -e15 -b273 -R273 -c -P</physim_run_args>
<physim_run_args>-n100 -s30 -e15 -b273 -R273 -c -P --ldpc_offload.dpdk_dev d8:00.0</physim_run_args>
</testCase>
<testCase id="000231">
@@ -124,7 +124,7 @@
<desc>Run nr_dlsim with T2 LDPC offload: SNR = 30, MCS = 25, 273 PRBs, 1 layer</desc>
<physim_run>nr_dlsim</physim_run>
<physim_time_threshold>400</physim_time_threshold>
<physim_run_args>-n100 -s30 -e25 -b273 -R273 -c -P</physim_run_args>
<physim_run_args>-n100 -s30 -e25 -b273 -R273 -c -P --ldpc_offload.dpdk_dev d8:00.0</physim_run_args>
</testCase>
<testCase id="000311">
@@ -140,7 +140,7 @@
<desc>Run nr_dlsim with T2 LDPC offload: SNR = 30, MCS = 5, 273 PRBs, 2 layers</desc>
<physim_run>nr_dlsim</physim_run>
<physim_time_threshold>200</physim_time_threshold>
<physim_run_args>-n100 -s30 -e5 -b273 -R273 -c -x2 -z2 -y2 -P</physim_run_args>
<physim_run_args>-n100 -s30 -e5 -b273 -R273 -c -x2 -z2 -y2 -P --ldpc_offload.dpdk_dev d8:00.0</physim_run_args>
</testCase>
<testCase id="000321">
@@ -156,7 +156,7 @@
<desc>Run nr_dlsim with T2 LDPC offload: SNR = 30, MCS = 15, 273 PRBs, 2 layers</desc>
<physim_run>nr_dlsim</physim_run>
<physim_time_threshold>500</physim_time_threshold>
<physim_run_args>-n100 -s30 -e15 -b273 -R273 -c -x2 -z2 -y2 -P</physim_run_args>
<physim_run_args>-n100 -s30 -e15 -b273 -R273 -c -x2 -z2 -y2 -P --ldpc_offload.dpdk_dev d8:00.0</physim_run_args>
</testCase>
<testCase id="000331">
@@ -172,7 +172,7 @@
<desc>Run nr_dlsim with T2 LDPC offload: SNR = 30, MCS = 25, 273 PRBs, 2 layers</desc>
<physim_run>nr_dlsim</physim_run>
<physim_time_threshold>800</physim_time_threshold>
<physim_run_args>-n100 -s30 -e25 -b273 -R273 -c -x2 -z2 -y2 -P</physim_run_args>
<physim_run_args>-n100 -s30 -e25 -b273 -R273 -c -x2 -z2 -y2 -P --ldpc_offload.dpdk_dev d8:00.0</physim_run_args>
</testCase>
</testCaseList>

View File

@@ -12,7 +12,7 @@
</tr>
</table>
This page is only valid for an `Ubuntu18` host.
This page is only valid for an `Ubuntu 22` host.
**Table of Contents**

View File

@@ -84,8 +84,9 @@ services:
oai-cu:
image: oaisoftwarealliance/oai-gnb:develop
privileged: true
container_name: rfsim5g-oai-cu
cap_drop:
- ALL
environment:
USE_ADDITIONAL_OPTIONS: --sa --log_config.global_log_options level,nocolor,time
ASAN_OPTIONS: detect_leaks=0
@@ -104,14 +105,15 @@ services:
oai-du:
image: oaisoftwarealliance/oai-gnb:develop
privileged: true
container_name: rfsim5g-oai-du
cap_drop:
- ALL
environment:
USE_ADDITIONAL_OPTIONS: --sa --rfsim
--log_config.global_log_options level,nocolor,time
--rfsimulator.options chanmod
--telnetsrv --telnetsrv.listenaddr 192.168.71.171
ASAN_OPTIONS: detect_leaks=0
ASAN_OPTIONS: detect_leaks=0:detect_odr_violation=0
depends_on:
- oai-cu
networks:
@@ -128,8 +130,12 @@ services:
oai-nr-ue:
image: oaisoftwarealliance/oai-nr-ue:develop
privileged: true
container_name: rfsim5g-oai-nr-ue
cap_drop:
- ALL
cap_add:
- NET_ADMIN # for interface bringup
- NET_RAW # for ping
environment:
USE_ADDITIONAL_OPTIONS: --sa --rfsim --log_config.global_log_options level,nocolor,time
-r 106 --numerology 1 -C 3619200000
@@ -137,11 +143,14 @@ services:
--rfsimulator.serveraddr 192.168.71.171
--rfsimulator.options chanmod
--telnetsrv --telnetsrv.shrmod ciUE --telnetsrv.listenaddr 192.168.71.181 --telnetsrv.listenport 8091
ASAN_OPTIONS: detect_odr_violation=0
depends_on:
- oai-du
networks:
public_net:
ipv4_address: 192.168.71.181
devices:
- /dev/net/tun:/dev/net/tun
volumes:
- ../../conf_files/nrue.uicc.conf:/opt/oai-nr-ue/etc/nr-ue.conf
- ../../conf_files/rfsim_channel_ci.conf:/opt/oai-nr-ue/etc/rfsim_channel_ci.conf

View File

@@ -82,8 +82,9 @@ services:
retries: 5
oai-gnb:
image: oaisoftwarealliance/oai-gnb:develop
privileged: true
container_name: rfsim5g-oai-gnb
cap_drop:
- ALL
environment:
USE_ADDITIONAL_OPTIONS: --sa -E --rfsim --log_config.global_log_options level,nocolor,time
ASAN_OPTIONS: detect_leaks=0
@@ -101,8 +102,12 @@ services:
retries: 5
oai-nr-ue:
image: oaisoftwarealliance/oai-nr-ue:develop
privileged: true
container_name: rfsim5g-oai-nr-ue
cap_drop:
- ALL
cap_add:
- NET_ADMIN # for interface bringup
- NET_RAW # for ping
environment:
USE_ADDITIONAL_OPTIONS: -E --sa --rfsim -r 106 --numerology 1 --uicc0.imsi 208990100001100 --band 66 -C 2169090000 --CO -400000000 --ssb 378 --rfsimulator.serveraddr 192.168.71.140 --log_config.global_log_options level,nocolor,time
depends_on:
@@ -110,6 +115,8 @@ services:
networks:
public_net:
ipv4_address: 192.168.71.150
devices:
- /dev/net/tun:/dev/net/tun
volumes:
- ../../conf_files/nrue.uicc.conf:/opt/oai-nr-ue/etc/nr-ue.conf
healthcheck:

View File

@@ -12,10 +12,8 @@
</tr>
</table>
This page is valid for an `Ubuntu18` host.
It is also valid for `Ubuntu 20.04`.
It is also valid for `Ubuntu 22.04`.
This tutorial is only valid once this file is merged into the `develop` branch.
# 1. Adapt the `docker-compose` to your environment #
The yaml file is in the following directory: `ci-scripts/yaml_files/5g_l2sim_tdd`

View File

@@ -82,8 +82,9 @@ services:
retries: 5
oai-gnb:
image: oaisoftwarealliance/oai-gnb:develop
privileged: true
container_name: "l2sim-oai-gnb"
cap_drop:
- ALL
network_mode: "host"
environment:
TZ: Europe/Paris
@@ -102,8 +103,9 @@ services:
proxy:
image: oai-lte-multi-ue-proxy:latest
privileged: true
container_name: "l2sim-proxy"
cap_drop:
- ALL
network_mode: "host"
environment:
TZ: Europe/Paris
@@ -118,14 +120,20 @@ services:
oai-nr-ue0:
image: oaisoftwarealliance/oai-nr-ue:develop
privileged: true
container_name: "l2sim-oai-nr-ue0"
cap_drop:
- ALL
cap_add:
- NET_ADMIN # for interface bringup
- NET_RAW # for ping
network_mode: "host"
environment:
TZ: Europe/Paris
OPENAIR_DIR: /opt/oai-nr-ue
USE_ADDITIONAL_OPTIONS: --nfapi STANDALONE_PNF --node-number 2 --sa --emulate-l1 --log_config.global_log_options level,time,thread_id,nocolor
ASAN_OPTIONS: detect_leaks=0
devices:
- /dev/net/tun:/dev/net/tun
volumes:
- ../../conf_files/nrue.band78.106prb.l2sim.conf:/opt/oai-nr-ue/etc/nr-ue.conf
- ../../../openair1/SIMULATION/LTE_PHY/BLER_SIMULATIONS/AWGN/AWGN_results:/opt/oai-nr-ue/openair1/SIMULATION/LTE_PHY/BLER_SIMULATIONS/AWGN/AWGN_results

View File

@@ -12,7 +12,7 @@
</tr>
</table>
This page is only valid for an `Ubuntu18` host.
This page is only valid for an `Ubuntu 22` host.
**NOTE: this version (2023-01-27) has been updated for the `v1.5.0` version of the `OAI 5G CN`.**
@@ -237,12 +237,18 @@ Create the entry for the second UE in `docker-compose.yaml` file as follows:
```yaml
oai-nr-ue2:
image: oai-nr-ue:develop
privileged: true
container_name: rfsim5g-oai-nr-ue2
cap_drop:
- ALL
cap_add:
- NET_ADMIN # for interface bringup
- NET_RAW # for ping
environment:
USE_ADDITIONAL_OPTIONS: -E --sa --rfsim -r 106 --numerology 1 -C 3619200000 --rfsimulator.serveraddr 192.168.71.140 --log_config.global_log_options level,nocolor,time
depends_on:
- oai-gnb
devices:
- /dev/net/tun:/dev/net/tun
volumes:
- ../../conf_files/nrue.uicc.conf:/opt/oai-nr-ue/etc/nr-ue.conf
networks:
@@ -529,3 +535,40 @@ snssais:
```
The `ST` and `SD` values shall also match.
# 6. Running with local changes
You can run the testcase with local changes by substituting the binaries in
execution images. `local-override.yaml` file provides a way to substitute the
gNB and nrUE executables as well as librfsimulator.so. Refer to the `-volumes`
section in the file for details. This includes an image build service as well as
code compilation service. This is necessary as the executable has to be linked
against the same libraries that are present in the executing image. This might
take a while the first time but other that that is very fast. Here is a list of
commands (wait between each command). Tested with `docker compose` v2.27.0
This command deploys OAI 5G Core Network
```bash
docker compose -f docker-compose.yaml -f local-override.yaml up -d mysql oai-amf oai-smf oai-upf oai-ext-dn
```
This command builds base images locally, builds local gNB & nrUE executable and
runs the gnb service with modified gNB executable.
```bash
docker compose -f docker-compose.yaml -f local-override.yaml up -d oai-gnb
```
This command rebuilds both the gNB & nrUE and runs the oai-nr-ue container with
modified nrUE executable.
```bash
docker compose -f docker-compose.yaml -f local-override.yaml up -d oai-nr-ue
```
## 6.1 Running nrUE in gdb
`local-override-ue-gdb.yaml` is an additional override file which can be used
to run the UE executable in gdb. Replace the last command above with the
following:
```bash
docker compose -f docker-compose.yaml -f local-override.yaml -f local-override-ue-gdb.yaml run oai-nr-ue
```

View File

@@ -82,8 +82,9 @@ services:
retries: 5
oai-gnb:
image: oaisoftwarealliance/oai-gnb:develop
privileged: true
container_name: rfsim5g-oai-gnb
cap_drop:
- ALL
environment:
USE_ADDITIONAL_OPTIONS: --sa -E --rfsim --log_config.global_log_options level,nocolor,time
ASAN_OPTIONS: detect_leaks=0
@@ -101,8 +102,12 @@ services:
retries: 5
oai-nr-ue:
image: oaisoftwarealliance/oai-nr-ue:develop
privileged: true
container_name: rfsim5g-oai-nr-ue
cap_drop:
- ALL
cap_add:
- NET_ADMIN # for interface bringup
- NET_RAW # for ping
environment:
USE_ADDITIONAL_OPTIONS: -E --sa --rfsim -r 106 --numerology 1 --uicc0.imsi 208990100001100 -C 3619200000 --rfsimulator.serveraddr 192.168.71.140 --log_config.global_log_options level,nocolor,time
depends_on:
@@ -110,6 +115,8 @@ services:
networks:
public_net:
ipv4_address: 192.168.71.150
devices:
- /dev/net/tun:/dev/net/tun
volumes:
- ../../conf_files/nrue.uicc.conf:/opt/oai-nr-ue/etc/nr-ue.conf
healthcheck:
@@ -119,8 +126,12 @@ services:
retries: 5
oai-nr-ue2:
image: oaisoftwarealliance/oai-nr-ue:develop
privileged: true
container_name: rfsim5g-oai-nr-ue2
cap_drop:
- ALL
cap_add:
- NET_ADMIN # for interface bringup
- NET_RAW # for ping
environment:
USE_ADDITIONAL_OPTIONS: -E --sa --rfsim -r 106 --numerology 1 --uicc0.imsi 208990100001101 -C 3619200000 --rfsimulator.serveraddr 192.168.71.140 --log_config.global_log_options level,nocolor,time
depends_on:
@@ -128,6 +139,8 @@ services:
networks:
public_net:
ipv4_address: 192.168.71.151
devices:
- /dev/net/tun:/dev/net/tun
volumes:
- ../../conf_files/nrue.uicc.conf:/opt/oai-nr-ue/etc/nr-ue.conf
healthcheck:
@@ -137,8 +150,12 @@ services:
retries: 5
oai-nr-ue3:
image: oaisoftwarealliance/oai-nr-ue:develop
privileged: true
container_name: rfsim5g-oai-nr-ue3
cap_drop:
- ALL
cap_add:
- NET_ADMIN # for interface bringup
- NET_RAW # for ping
environment:
USE_ADDITIONAL_OPTIONS: -E --sa --rfsim -r 106 --numerology 1 --uicc0.imsi 208990100001102 -C 3619200000 --rfsimulator.serveraddr 192.168.71.140 --log_config.global_log_options level,nocolor,time
depends_on:
@@ -146,6 +163,8 @@ services:
networks:
public_net:
ipv4_address: 192.168.71.152
devices:
- /dev/net/tun:/dev/net/tun
volumes:
- ../../conf_files/nrue.uicc.conf:/opt/oai-nr-ue/etc/nr-ue.conf
healthcheck:
@@ -155,8 +174,12 @@ services:
retries: 5
oai-nr-ue4:
image: oaisoftwarealliance/oai-nr-ue:develop
privileged: true
container_name: rfsim5g-oai-nr-ue4
cap_drop:
- ALL
cap_add:
- NET_ADMIN # for interface bringup
- NET_RAW # for ping
environment:
USE_ADDITIONAL_OPTIONS: -E --sa --rfsim -r 106 --numerology 1 --uicc0.imsi 208990100001103 -C 3619200000 --rfsimulator.serveraddr 192.168.71.140 --log_config.global_log_options level,nocolor,time
depends_on:
@@ -164,6 +187,8 @@ services:
networks:
public_net:
ipv4_address: 192.168.71.153
devices:
- /dev/net/tun:/dev/net/tun
volumes:
- ../../conf_files/nrue.uicc.conf:/opt/oai-nr-ue/etc/nr-ue.conf
healthcheck:
@@ -173,8 +198,12 @@ services:
retries: 5
oai-nr-ue5:
image: oaisoftwarealliance/oai-nr-ue:develop
privileged: true
container_name: rfsim5g-oai-nr-ue5
cap_drop:
- ALL
cap_add:
- NET_ADMIN # for interface bringup
- NET_RAW # for ping
environment:
USE_ADDITIONAL_OPTIONS: -E --sa --rfsim -r 106 --numerology 1 --uicc0.imsi 208990100001104 -C 3619200000 --rfsimulator.serveraddr 192.168.71.140 --log_config.global_log_options level,nocolor,time
depends_on:
@@ -182,6 +211,8 @@ services:
networks:
public_net:
ipv4_address: 192.168.71.154
devices:
- /dev/net/tun:/dev/net/tun
volumes:
- ../../conf_files/nrue.uicc.conf:/opt/oai-nr-ue/etc/nr-ue.conf
healthcheck:
@@ -191,8 +222,12 @@ services:
retries: 5
oai-nr-ue6:
image: oaisoftwarealliance/oai-nr-ue:develop
privileged: true
container_name: rfsim5g-oai-nr-ue6
cap_drop:
- ALL
cap_add:
- NET_ADMIN # for interface bringup
- NET_RAW # for ping
environment:
USE_ADDITIONAL_OPTIONS: -E --sa --rfsim -r 106 --numerology 1 --uicc0.imsi 208990100001105 -C 3619200000 --rfsimulator.serveraddr 192.168.71.140 --log_config.global_log_options level,nocolor,time
depends_on:
@@ -200,6 +235,8 @@ services:
networks:
public_net:
ipv4_address: 192.168.71.155
devices:
- /dev/net/tun:/dev/net/tun
volumes:
- ../../conf_files/nrue.uicc.conf:/opt/oai-nr-ue/etc/nr-ue.conf
healthcheck:
@@ -209,8 +246,12 @@ services:
retries: 5
oai-nr-ue7:
image: oaisoftwarealliance/oai-nr-ue:develop
privileged: true
container_name: rfsim5g-oai-nr-ue7
cap_drop:
- ALL
cap_add:
- NET_ADMIN # for interface bringup
- NET_RAW # for ping
environment:
USE_ADDITIONAL_OPTIONS: -E --sa --rfsim -r 106 --numerology 1 --uicc0.imsi 208990100001106 -C 3619200000 --rfsimulator.serveraddr 192.168.71.140 --log_config.global_log_options level,nocolor,time
depends_on:
@@ -218,6 +259,8 @@ services:
networks:
public_net:
ipv4_address: 192.168.71.156
devices:
- /dev/net/tun:/dev/net/tun
volumes:
- ../../conf_files/nrue.uicc.conf:/opt/oai-nr-ue/etc/nr-ue.conf
healthcheck:
@@ -227,8 +270,12 @@ services:
retries: 5
oai-nr-ue8:
image: oaisoftwarealliance/oai-nr-ue:develop
privileged: true
container_name: rfsim5g-oai-nr-ue8
cap_drop:
- ALL
cap_add:
- NET_ADMIN # for interface bringup
- NET_RAW # for ping
environment:
USE_ADDITIONAL_OPTIONS: -E --sa --rfsim -r 106 --numerology 1 --uicc0.imsi 208990100001107 -C 3619200000 --rfsimulator.serveraddr 192.168.71.140 --log_config.global_log_options level,nocolor,time
depends_on:
@@ -236,6 +283,8 @@ services:
networks:
public_net:
ipv4_address: 192.168.71.157
devices:
- /dev/net/tun:/dev/net/tun
volumes:
- ../../conf_files/nrue.uicc.conf:/opt/oai-nr-ue/etc/nr-ue.conf
healthcheck:
@@ -245,8 +294,12 @@ services:
retries: 5
oai-nr-ue9:
image: oaisoftwarealliance/oai-nr-ue:develop
privileged: true
container_name: rfsim5g-oai-nr-ue9
cap_drop:
- ALL
cap_add:
- NET_ADMIN # for interface bringup
- NET_RAW # for ping
environment:
USE_ADDITIONAL_OPTIONS: -E --sa --rfsim -r 106 --numerology 1 --uicc0.imsi 208990100001108 -C 3619200000 --rfsimulator.serveraddr 192.168.71.140 --log_config.global_log_options level,nocolor,time
depends_on:
@@ -254,6 +307,8 @@ services:
networks:
public_net:
ipv4_address: 192.168.71.158
devices:
- /dev/net/tun:/dev/net/tun
volumes:
- ../../conf_files/nrue.uicc.conf:/opt/oai-nr-ue/etc/nr-ue.conf
healthcheck:
@@ -263,8 +318,12 @@ services:
retries: 5
oai-nr-ue10:
image: oaisoftwarealliance/oai-nr-ue:develop
privileged: true
container_name: rfsim5g-oai-nr-ue10
cap_drop:
- ALL
cap_add:
- NET_ADMIN # for interface bringup
- NET_RAW # for ping
environment:
USE_ADDITIONAL_OPTIONS: -E --sa --rfsim -r 106 --numerology 1 --uicc0.imsi 208990100001109 -C 3619200000 --rfsimulator.serveraddr 192.168.71.140 --log_config.global_log_options level,nocolor,time
depends_on:
@@ -272,6 +331,8 @@ services:
networks:
public_net:
ipv4_address: 192.168.71.159
devices:
- /dev/net/tun:/dev/net/tun
volumes:
- ../../conf_files/nrue.uicc.conf:/opt/oai-nr-ue/etc/nr-ue.conf
healthcheck:

View File

@@ -0,0 +1,6 @@
services:
oai-nr-ue:
privileged: true
stdin_open: true
tty: true
command: gdb --args /opt/oai-nr-ue/bin/nr-uesoftmodem -O /opt/oai-nr-ue/etc/nr-ue.conf -E --sa --rfsim -r 106 --numerology 1 --uicc0.imsi 208990100001100 -C 3619200000 --rfsimulator.serveraddr 192.168.71.140 --log_config.global_log_options level,nocolor,time

View File

@@ -0,0 +1,27 @@
include:
- ../local_common_overrides/build_images.yaml
- ../local_common_overrides/rebuild_nr_softmodems.yaml
services:
oai-gnb:
privileged: true
depends_on:
rebuild-nr-softmodems:
condition: service_completed_successfully
volumes:
- ../../../cmake_targets/ran_build/build/nr-softmodem:/opt/oai-gnb/bin/nr-softmodem
- ../../../cmake_targets/ran_build/build/librfsimulator.so:/usr/local/lib/librfsimulator.so
oai-nr-ue:
privileged: true
image: ue-local
depends_on:
build-ran-build:
condition: service_completed_successfully
restart: true
oai-gnb:
condition: service_started
rebuild-nr-softmodems:
condition: service_completed_successfully
volumes:
- ../../../cmake_targets/ran_build/build/nr-uesoftmodem:/opt/oai-nr-ue/bin/nr-uesoftmodem
- ../../../cmake_targets/ran_build/build/librfsimulator.so:/usr/local/lib/librfsimulator.so
- ../../../crashdumps/:/cores/

View File

@@ -82,8 +82,9 @@ services:
retries: 5
oai-gnb:
image: oaisoftwarealliance/oai-gnb:develop
privileged: true
container_name: rfsim5g-oai-gnb
cap_drop:
- ALL
environment:
USE_ADDITIONAL_OPTIONS: --sa --rfsim --log_config.global_log_options level,nocolor,time
ASAN_OPTIONS: detect_leaks=0
@@ -101,8 +102,12 @@ services:
retries: 5
oai-nr-ue:
image: oaisoftwarealliance/oai-nr-ue:develop
privileged: true
container_name: rfsim5g-oai-nr-ue
cap_drop:
- ALL
cap_add:
- NET_ADMIN # for interface bringup
- NET_RAW # for ping
environment:
USE_ADDITIONAL_OPTIONS: --sa --rfsim -r 24 --ssb 24 --numerology 1 -C 3604800000 --uicc0.imsi 208990100001100 --rfsimulator.serveraddr 192.168.71.140 --log_config.global_log_options level,nocolor,time
depends_on:
@@ -110,6 +115,8 @@ services:
networks:
public_net:
ipv4_address: 192.168.71.150
devices:
- /dev/net/tun:/dev/net/tun
volumes:
- ../../conf_files/nrue.uicc.conf:/opt/oai-nr-ue/etc/nr-ue.conf
healthcheck:

View File

@@ -82,8 +82,9 @@ services:
retries: 5
oai-gnb:
image: oaisoftwarealliance/oai-gnb:develop
privileged: true
container_name: rfsim5g-oai-gnb
cap_drop:
- ALL
environment:
USE_ADDITIONAL_OPTIONS: --sa --rfsim --log_config.global_log_options level,nocolor,time
ASAN_OPTIONS: detect_leaks=0
@@ -102,8 +103,12 @@ services:
oai-nr-ue:
image: oaisoftwarealliance/oai-nr-ue:develop
privileged: true
container_name: rfsim5g-oai-nr-ue
cap_drop:
- ALL
cap_add:
- NET_ADMIN # for interface bringup
- NET_RAW # for ping
environment:
USE_ADDITIONAL_OPTIONS: --sa --rfsim -r 106 --numerology 1 --band 78 -C 3319680000 --ue-nb-ant-tx 2 --uicc0.imsi 208990100001100 --ue-nb-ant-rx 2 --uecap_file /opt/oai-nr-ue/etc/uecap.xml --rfsimulator.serveraddr 192.168.71.140 --log_config.global_log_options level,nocolor,time
depends_on:
@@ -111,6 +116,8 @@ services:
networks:
public_net:
ipv4_address: 192.168.71.150
devices:
- /dev/net/tun:/dev/net/tun
volumes:
- ../../../targets/PROJECTS/GENERIC-NR-5GC/CONF/uecap_ports2.xml:/opt/oai-nr-ue/etc/uecap.xml
- ../../conf_files/nrue.uicc.conf:/opt/oai-nr-ue/etc/nr-ue.conf

View File

@@ -1,8 +1,9 @@
services:
oai-du:
image: oaisoftwarealliance/oai-gnb:develop
privileged: true
container_name: rfsim5g-oai-du
cap_drop:
- ALL
network_mode: "host"
environment:
USE_ADDITIONAL_OPTIONS: --sa --rfsim --MACRLCs.[0].local_n_address 172.21.16.109 --MACRLCs.[0].remote_n_address 172.21.6.22 --log_config.global_log_options level,nocolor,time
@@ -15,13 +16,19 @@ services:
retries: 5
oai-nr-ue:
image: oaisoftwarealliance/oai-nr-ue:develop
privileged: true
container_name: rfsim5g-oai-nr-ue
cap_drop:
- ALL
cap_add:
- NET_ADMIN # for interface bringup
- NET_RAW # for ping
network_mode: "host"
environment:
USE_ADDITIONAL_OPTIONS: --sa --rfsim -r 106 --numerology 1 -C 3619200000 --uicc0.imsi 208990100001140 --rfsimulator.serveraddr 127.0.0.1 --log_config.global_log_options level,nocolor,time
depends_on:
- oai-du
devices:
- /dev/net/tun:/dev/net/tun
volumes:
- ../../conf_files/nrue.uicc.conf:/opt/oai-nr-ue/etc/nr-ue.conf
healthcheck:

View File

@@ -66,8 +66,9 @@ services:
oai-cucp:
image: oaisoftwarealliance/oai-gnb:develop
privileged: true
container_name: rfsim5g-oai-cucp
cap_drop:
- ALL
environment:
USE_ADDITIONAL_OPTIONS: --sa --log_config.global_log_options level,nocolor,time
--gNBs.[0].E1_INTERFACE.[0].ipv4_cucp 192.168.77.2
@@ -92,8 +93,9 @@ services:
oai-cuup:
image: oaisoftwarealliance/oai-nr-cuup:develop
privileged: true
container_name: rfsim5g-oai-cuup
cap_drop:
- ALL
environment:
USE_ADDITIONAL_OPTIONS: --sa --log_config.global_log_options level,nocolor,time
--gNBs.[0].E1_INTERFACE.[0].ipv4_cucp 192.168.77.2
@@ -120,8 +122,9 @@ services:
oai-cuup2:
image: oaisoftwarealliance/oai-nr-cuup:develop
privileged: true
container_name: rfsim5g-oai-cuup2
cap_drop:
- ALL
environment:
USE_ADDITIONAL_OPTIONS: --sa --log_config.global_log_options level,nocolor,time
--gNBs.[0].gNB_CU_UP_ID 0xe01
@@ -151,8 +154,9 @@ services:
oai-cuup3:
image: oaisoftwarealliance/oai-nr-cuup:develop
privileged: true
container_name: rfsim5g-oai-cuup3
cap_drop:
- ALL
environment:
USE_ADDITIONAL_OPTIONS: --sa --log_config.global_log_options level,nocolor,time
--gNBs.[0].gNB_CU_UP_ID 0xe02
@@ -182,8 +186,9 @@ services:
oai-du:
image: oaisoftwarealliance/oai-gnb:develop
privileged: true
container_name: rfsim5g-oai-du
cap_drop:
- ALL
environment:
USE_ADDITIONAL_OPTIONS: --sa --rfsim --log_config.global_log_options level,nocolor,time
--MACRLCs.[0].local_n_address 192.168.72.3
@@ -210,8 +215,9 @@ services:
oai-du2:
image: oaisoftwarealliance/oai-gnb:develop
privileged: true
container_name: rfsim5g-oai-du2
cap_drop:
- ALL
environment:
USE_ADDITIONAL_OPTIONS: --sa --rfsim --log_config.global_log_options level,nocolor,time
--gNBs.[0].gNB_DU_ID 0xe01
@@ -241,8 +247,9 @@ services:
oai-du3:
image: oaisoftwarealliance/oai-gnb:develop
privileged: true
container_name: rfsim5g-oai-du3
cap_drop:
- ALL
environment:
USE_ADDITIONAL_OPTIONS: --sa --rfsim --log_config.global_log_options level,nocolor,time
--gNBs.[0].gNB_DU_ID 0xe02
@@ -272,8 +279,12 @@ services:
oai-nr-ue:
image: oaisoftwarealliance/oai-nr-ue:develop
privileged: true
container_name: rfsim5g-oai-nr-ue
cap_drop:
- ALL
cap_add:
- NET_ADMIN # for interface bringup
- NET_RAW # for ping
environment:
USE_ADDITIONAL_OPTIONS: --sa --rfsim --log_config.global_log_options level,nocolor,time
-r 106 --numerology 1 -C 3619200000
@@ -284,6 +295,8 @@ services:
networks:
ue_net:
ipv4_address: 192.168.78.5
devices:
- /dev/net/tun:/dev/net/tun
volumes:
- ../../conf_files/nrue.uicc.conf:/opt/oai-nr-ue/etc/nr-ue.conf
healthcheck:
@@ -294,8 +307,12 @@ services:
oai-nr-ue2:
image: oaisoftwarealliance/oai-nr-ue:develop
privileged: true
container_name: rfsim5g-oai-nr-ue2
cap_drop:
- ALL
cap_add:
- NET_ADMIN # for interface bringup
- NET_RAW # for ping
environment:
USE_ADDITIONAL_OPTIONS: --sa --rfsim --log_config.global_log_options level,nocolor,time
-r 106 --numerology 1 -C 3619200000
@@ -306,6 +323,8 @@ services:
networks:
ue_net:
ipv4_address: 192.168.78.6
devices:
- /dev/net/tun:/dev/net/tun
volumes:
- ../../conf_files/nrue.uicc.conf:/opt/oai-nr-ue/etc/nr-ue.conf
healthcheck:
@@ -316,8 +335,12 @@ services:
oai-nr-ue3:
image: oaisoftwarealliance/oai-nr-ue:develop
privileged: true
container_name: rfsim5g-oai-nr-ue3
cap_drop:
- ALL
cap_add:
- NET_ADMIN # for interface bringup
- NET_RAW # for ping
environment:
USE_ADDITIONAL_OPTIONS: --sa --rfsim --log_config.global_log_options level,nocolor,time
-r 106 --numerology 1 -C 3619200000
@@ -329,6 +352,8 @@ services:
networks:
ue_net:
ipv4_address: 192.168.78.7
devices:
- /dev/net/tun:/dev/net/tun
volumes:
- ../../conf_files/nrue.uicc.conf:/opt/oai-nr-ue/etc/nr-ue.conf
healthcheck:

View File

@@ -1,14 +1,20 @@
services:
oai-gnb:
image: oaisoftwarealliance/oai-gnb:develop
privileged: true
container_name: rfsim5g-oai-gnb
cap_drop:
- ALL
cap_add:
- NET_ADMIN # for interface bringup
- NET_RAW # for ping
environment:
USE_ADDITIONAL_OPTIONS: --phy-test --rfsim --rfsimulator.wait_timeout 20 --noS1 --log_config.global_log_options level,nocolor,time
ASAN_OPTIONS: detect_leaks=0
networks:
public_net:
ipv4_address: 192.168.71.140
devices:
- /dev/net/tun:/dev/net/tun
volumes:
- ../../conf_files/gnb.band66.106prb.rfsim.phytest-dora.conf:/opt/oai-gnb/etc/gnb.conf
- rrc.config:/opt/oai-gnb/
@@ -20,11 +26,17 @@ services:
oai-nr-ue:
image: oaisoftwarealliance/oai-nr-ue:develop
privileged: true
container_name: rfsim5g-oai-nr-ue
cap_drop:
- ALL
cap_add:
- NET_ADMIN # for interface bringup
- NET_RAW # for ping
environment:
USE_ADDITIONAL_OPTIONS: --phy-test --rfsim --noS1 --reconfig-file etc/rrc/reconfig.raw --rbconfig-file etc/rrc/rbconfig.raw --rfsimulator.serveraddr 192.168.71.140 --log_config.global_log_options level,nocolor,time
ASAN_OPTIONS: detect_leaks=0
devices:
- /dev/net/tun:/dev/net/tun
volumes:
- ../../conf_files/nrue.uicc.conf:/opt/oai-nr-ue/etc/nr-ue.conf
- rrc.config:/opt/oai-nr-ue/etc/rrc/

View File

@@ -83,8 +83,9 @@ services:
oai-gnb:
image: oaisoftwarealliance/oai-gnb:develop
privileged: true
container_name: rfsim5g-oai-gnb
cap_drop:
- ALL
environment:
USE_ADDITIONAL_OPTIONS: --sa --rfsim --log_config.global_log_options level,nocolor,time
ASAN_OPTIONS: detect_leaks=0
@@ -101,13 +102,19 @@ services:
oai-nr-ue:
image: oaisoftwarealliance/oai-nr-ue:develop
privileged: true
container_name: rfsim5g-oai-nr-ue
cap_drop:
- ALL
cap_add:
- NET_ADMIN # for interface bringup
- NET_RAW # for ping
environment:
USE_ADDITIONAL_OPTIONS: --sa --rfsim
--rfsimulator.serveraddr 192.168.71.140 --log_config.global_log_options level,nocolor,time
-r 32 --numerology 3 --band 261 -C 27533160000 --ssb 73
ASAN_OPTIONS: detect_leaks=0
devices:
- /dev/net/tun:/dev/net/tun
volumes:
- ../../conf_files/nrue.uicc.conf:/opt/oai-nr-ue/etc/nr-ue.conf
depends_on:

View File

@@ -1,14 +1,20 @@
services:
oai-gnb:
image: oaisoftwarealliance/oai-gnb:develop
privileged: true
container_name: rfsim5g-oai-gnb
cap_drop:
- ALL
cap_add:
- NET_ADMIN # for interface bringup
- NET_RAW # for ping
environment:
USE_ADDITIONAL_OPTIONS: --do-ra --rfsim --rfsimulator.wait_timeout 20 --noS1 --log_config.global_log_options level,nocolor,time
ASAN_OPTIONS: detect_leaks=0
networks:
public_net:
ipv4_address: 192.168.71.140
devices:
- /dev/net/tun:/dev/net/tun
volumes:
- ../../conf_files/gnb.band78.106prb.rfsim.phytest-dora.conf:/opt/oai-gnb/etc/gnb.conf
- rrc.config:/opt/oai-gnb/
@@ -20,11 +26,17 @@ services:
oai-nr-ue:
image: oaisoftwarealliance/oai-nr-ue:develop
privileged: true
container_name: rfsim5g-oai-nr-ue
cap_drop:
- ALL
cap_add:
- NET_ADMIN # for interface bringup
- NET_RAW # for ping
environment:
USE_ADDITIONAL_OPTIONS: --do-ra --rfsim --noS1 --reconfig-file etc/rrc/reconfig.raw --rbconfig-file etc/rrc/rbconfig.raw --rfsimulator.serveraddr 192.168.71.140 --log_config.global_log_options level,nocolor,time
ASAN_OPTIONS: detect_leaks=0
devices:
- /dev/net/tun:/dev/net/tun
volumes:
- ../../conf_files/nrue.uicc.conf:/opt/oai-nr-ue/etc/nr-ue.conf
- rrc.config:/opt/oai-nr-ue/etc/rrc/

View File

@@ -0,0 +1,27 @@
include:
- ../local_common_overrides/build_images.yaml
- ../local_common_overrides/rebuild_nr_softmodems.yaml
services:
oai-gnb:
privileged: true
depends_on:
rebuild-nr-softmodems:
condition: service_completed_successfully
# volumes:
# replace the gnb executable here
oai-nr-ue:
privileged: true
image: ue-local
depends_on:
build-ran-build:
condition: service_completed_successfully
restart: true
oai-gnb:
condition: service_started
rebuild-nr-softmodems:
condition: service_completed_successfully
container_name: local-oai-nr-ue
volumes:
- ../../../cmake_targets/ran_build/build/nr-uesoftmodem:/opt/oai-nr-ue/bin/nr-uesoftmodem
- ../../../cmake_targets/ran_build/build/librfsimulator.so:/usr/local/lib/librfsimulator.so
- ../../../crashdumps/:/cores/

View File

@@ -82,8 +82,9 @@ services:
retries: 5
oai-gnb:
image: oaisoftwarealliance/oai-gnb:develop
privileged: true
container_name: rfsim5g-oai-gnb
cap_drop:
- ALL
environment:
USE_ADDITIONAL_OPTIONS: --sa --rfsim --log_config.global_log_options level,nocolor,time
ASAN_OPTIONS: detect_leaks=0
@@ -102,15 +103,21 @@ services:
oai-nr-ue:
image: oaisoftwarealliance/oai-nr-ue:develop
privileged: true
container_name: rfsim5g-oai-nr-ue
cap_drop:
- ALL
cap_add:
- NET_ADMIN # for interface bringup
- NET_RAW # for ping
environment:
USE_ADDITIONAL_OPTIONS: --sa --rfsim -r 25 --numerology 0 --uicc0.imsi 208990100001100 --band 66 -C 2152260000 --CO -400000000 --ssb 76 --rfsimulator.serveraddr 192.168.71.140 --log_config.global_log_options level,nocolor,time
USE_ADDITIONAL_OPTIONS: --sa --rfsim -r 25 --numerology 0 --uicc0.imsi 208990100001100 --band 66 -C 2152680000 --CO -400000000 --ssb 48 --rfsimulator.serveraddr 192.168.71.140 --log_config.global_log_options level,nocolor,time
depends_on:
- oai-gnb
networks:
public_net:
ipv4_address: 192.168.71.150
devices:
- /dev/net/tun:/dev/net/tun
volumes:
- ../../conf_files/nrue.uicc.conf:/opt/oai-nr-ue/etc/nr-ue.conf
healthcheck:

View File

@@ -1,9 +1,13 @@
services:
oai-gnb:
image: oai-gnb:latest
privileged: true
network_mode: "host"
container_name: oai-gnb
cap_drop:
- ALL
cap_add:
- SYS_NICE
- IPC_LOCK
environment:
TZ: Europe/Paris
USE_ADDITIONAL_OPTIONS: --log_config.global_log_options level,nocolor,time

View File

@@ -1,9 +1,13 @@
services:
oai-gnb:
image: oai-gnb:latest
privileged: true
network_mode: "host"
container_name: oai-gnb
cap_drop:
- ALL
cap_add:
- SYS_NICE
- IPC_LOCK
environment:
TZ: Europe/Paris
USE_ADDITIONAL_OPTIONS: --log_config.global_log_options level,nocolor,time

View File

@@ -1,14 +1,18 @@
services:
oai-gnb:
image: oai-gnb:latest
privileged: true
network_mode: "host"
container_name: oai-gnb
cap_drop:
- ALL
cap_add:
- SYS_NICE
- IPC_LOCK
ulimits:
core: -1 # for core dumps
environment:
TZ: Europe/Paris
USE_ADDITIONAL_OPTIONS: --sa --tune-offset 20000000 -A 45 --log_config.global_log_options level,nocolor,time
USE_ADDITIONAL_OPTIONS: --sa --tune-offset 20000000 -A 90 --log_config.global_log_options level,nocolor,time
volumes:
- ../../conf_files/gnb.sa.band78.106prb.n310.7ds2u.conf:/opt/oai-gnb/etc/gnb.conf
healthcheck:

View File

@@ -1,15 +1,23 @@
services:
oai-nr-ue:
image: oai-nr-ue:latest
privileged: true
network_mode: host
container_name: oai-nr-ue
cap_drop:
- ALL
cap_add:
- NET_ADMIN # for interface bringup
- NET_RAW # for ping
- SYS_NICE # for performance
- IPC_LOCK # for memory locking
devices:
- /dev/net/tun:/dev/net/tun
ulimits:
core: -1 # for core dumps
#entrypoint: /bin/bash -c "sleep infinity"
environment:
TZ: Europe/Paris
USE_ADDITIONAL_OPTIONS: --usrp-args type=n3xx,name=ni-n3xx-31641B9,addr=192.168.10.2 -r 106 --numerology 1 --band 78 -C 3511200000 --sa --ue-fo-compensation --ue-rxgain 65 --tune-offset 20000000 -A 45 --log_config.global_log_options level,nocolor,time --uicc0.imsi 001020000000111 --uicc0.nssai_sd 16777215
USE_ADDITIONAL_OPTIONS: --usrp-args type=n3xx,name=ni-n3xx-31641B9,addr=192.168.10.2 -r 106 --numerology 1 --band 78 -C 3511200000 --sa --ue-fo-compensation --ue-rxgain 65 --tune-offset 20000000 -A 90 --log_config.global_log_options level,nocolor,time --uicc0.imsi 001020000000111 --uicc0.nssai_sd 16777215
volumes:
- ../../conf_files/ue.sa.conf:/opt/oai-nr-ue/etc/nr-ue.conf
healthcheck:

View File

@@ -0,0 +1,45 @@
services:
build-ran-base:
image: ran-base
build:
context: ../../../
dockerfile: docker/Dockerfile.base.ubuntu22
tags:
- ran-base
build-ran-build:
image: ran-build
build:
context: ../../../
dockerfile: docker/Dockerfile.build.ubuntu22
tags:
- ran-build
depends_on:
build-ran-base:
condition: service_completed_successfully
build-gnb-image:
image: gnb-local
build:
context: ../../../
dockerfile: docker/Dockerfile.gNB.ubuntu22
tags:
- gnb-local
depends_on:
build-ran-build:
condition: service_completed_successfully
entrypoint: ""
command: echo "gnb-image built"
build-ue-image:
image: ue-local
build:
context: ../../../
dockerfile: docker/Dockerfile.nrUE.ubuntu22
tags:
- ue-local
depends_on:
build-ran-build:
condition: service_completed_successfully
entrypoint: ""
command: echo "ue-image built"

View File

@@ -0,0 +1,13 @@
services:
rebuild-nr-softmodems:
image: ran-build
volumes:
- ../../../:/oai-dir/
command:
bash -c "cd /oai-dir/ && mkdir -p cmake_targets/ran_build/build && cd cmake_targets/ran_build/build && cmake ../../../ -GNinja && cmake --build . --target nr-uesoftmodem rfsimulator nr-softmodem"
entrypoint: ""
depends_on:
build-gnb-image:
condition: service_completed_successfully
build-ue-image:
condition: service_completed_successfully

View File

@@ -1,16 +1,21 @@
services:
gnb_mono_tdd:
image: oai-gnb:latest
privileged: true
container_name: nsa-b200-gnb
cap_drop:
- ALL
cap_add:
- SYS_NICE
- IPC_LOCK
ulimits:
core: -1 # for core dumps
environment:
USE_B2XX: 'yes'
USE_ADDITIONAL_OPTIONS: -E -q --RUs.[0].sdr_addrs serial=30C51D4 --continuous-tx --log_config.global_log_options level,nocolor,time,line_num,function
devices:
- /dev/bus/usb/:/dev/bus/usb/
volumes:
- ../../conf_files/gnb.nsa.band78.106prb.usrpb200.conf:/opt/oai-gnb/etc/gnb.conf
- /dev:/dev
networks:
public_net:
ipv4_address: 192.168.68.194

View File

@@ -1,9 +1,13 @@
services:
oai-gnb:
image: oai-gnb-aw2s:latest
privileged: true
network_mode: "host"
container_name: oai-gnb-aw2s
cap_drop:
- ALL
cap_add:
- SYS_NICE
- IPC_LOCK
ulimits:
core: -1 # for core dumps
environment:

View File

@@ -1,19 +1,26 @@
services:
gnb_mono_tdd:
image: oai-gnb:latest
privileged: true
container_name: sa-b200-gnb
cap_drop:
- ALL
cap_add:
- SYS_NICE
- IPC_LOCK
ulimits:
core: -1 # for core dumps
environment:
USE_B2XX: 'yes'
USE_ADDITIONAL_OPTIONS: --sa --RUs.[0].sdr_addrs serial=30C51D4 --telnetsrv --telnetsrv.shrmod ci --continuous-tx --log_config.global_log_options level,nocolor,time,line_num,function
devices:
- /dev/bus/usb/:/dev/bus/usb/
volumes:
- ../../conf_files/gnb.sa.band78.51prb.usrpb200.conf:/opt/oai-gnb/etc/gnb.conf
- /dev:/dev
networks:
public_net:
ipv4_address: 192.168.68.194
# for performance reasons, we use host mode: in bridge mode, we have
# unacceptable DL TCP performance. However, the whole point of
# containerization is to not be in host mode, so update this to macvlan
# later.
network_mode: "host"
#entrypoint: /bin/bash -c "sleep infinity"
healthcheck:
# pgrep does NOT work
@@ -21,12 +28,3 @@ services:
interval: 10s
timeout: 5s
retries: 5
networks:
public_net:
name: sa-b200-gnb-net
ipam:
config:
- subnet: 192.168.68.192/26
driver_opts:
com.docker.network.bridge.name: "sa-gnb-net"

View File

@@ -1,17 +1,22 @@
services:
gnb_cucp:
image: oai-gnb:latest
privileged: true
container_name: sa-cucp-gnb
cap_drop:
- ALL
ulimits:
core: -1 # for core dumps
environment:
USE_ADDITIONAL_OPTIONS: --sa --telnetsrv --telnetsrv.shrmod ci --log_config.global_log_options level,nocolor,time,line_num,function
USE_ADDITIONAL_OPTIONS: --sa
--telnetsrv --telnetsrv.listenport 9090 --telnetsrv.shrmod ci
--log_config.global_log_options level,nocolor,time,line_num,function
volumes:
- ../../conf_files/gnb-cucp.sa.f1.quectel.conf:/opt/oai-gnb/etc/gnb.conf
networks:
public_net:
ipv4_address: 192.168.68.194
# for performance reasons, we use host mode: in bridge mode, we have
# unacceptable DL TCP performance. However, the whole point of
# containerization is to not be in host mode, so update this to macvlan
# later.
network_mode: "host"
healthcheck:
# pgrep does NOT work
test: /bin/bash -c "ps aux | grep -v grep | grep -c softmodem"
@@ -21,17 +26,24 @@ services:
gnb_cuup:
image: oai-nr-cuup:latest
privileged: true
container_name: sa-cuup-gnb
cap_drop:
- ALL
cap_add:
- SYS_NICE
- IPC_LOCK
ulimits:
core: -1 # for core dumps
environment:
USE_ADDITIONAL_OPTIONS: --sa --log_config.global_log_options level,nocolor,time,line_num,function
USE_ADDITIONAL_OPTIONS: --sa
--log_config.global_log_options level,nocolor,time,line_num,function
volumes:
- ../../conf_files/gnb-cuup.sa.f1.quectel.conf:/opt/oai-gnb/etc/gnb.conf
networks:
public_net:
ipv4_address: 192.168.68.196
# for performance reasons, we use host mode: in bridge mode, we have
# unacceptable DL TCP performance. However, the whole point of
# containerization is to not be in host mode, so update this to macvlan
# later.
network_mode: "host"
healthcheck:
# pgrep does NOT work
test: /bin/bash -c "ps aux | grep -v grep | grep -c nr-cuup"
@@ -41,8 +53,12 @@ services:
gnb_du_tdd:
image: oai-gnb:latest
privileged: true
container_name: sa-du-b200-gnb
cap_drop:
- ALL
cap_add:
- SYS_NICE
- IPC_LOCK
ulimits:
core: -1 # for core dumps
environment:
@@ -50,16 +66,19 @@ services:
USE_ADDITIONAL_OPTIONS: --sa
--RUs.[0].sdr_addrs serial=30C51D4
--continuous-tx -E
--telnetsrv --telnetsrv.shrmod ci
--telnetsrv --telnetsrv.listenport 9091 --telnetsrv.shrmod ci
--gNBs.[0].min_rxtxtime 2 --gNBs.[0].do_CSIRS 1 --gNBs.[0].do_SRS 1
--RUs.[0].att_rx 14 --RUs.[0].att_tx 14
--log_config.global_log_options level,nocolor,time,line_num,function
devices:
- /dev/bus/usb/:/dev/bus/usb/
volumes:
- ../../conf_files/gnb-du.sa.band78.106prb.usrpb200.conf:/opt/oai-gnb/etc/gnb.conf
- /dev:/dev
networks:
public_net:
ipv4_address: 192.168.68.195
# for performance reasons, we use host mode: in bridge mode, we have
# unacceptable DL TCP performance. However, the whole point of
# containerization is to not be in host mode, so update this to macvlan
# later.
network_mode: "host"
#entrypoint: /bin/bash -c "sleep infinity"
healthcheck:
# pgrep does NOT work
@@ -67,12 +86,3 @@ services:
interval: 10s
timeout: 5s
retries: 5
networks:
public_net:
name: sa-b200-gnb-net
ipam:
config:
- subnet: 192.168.68.192/26
driver_opts:
com.docker.network.bridge.name: "sa-gnb-net"

View File

@@ -1,17 +1,22 @@
services:
gnb_cu:
image: oai-gnb:latest
privileged: true
container_name: sa-cu-gnb
cap_drop:
- ALL
ulimits:
core: -1 # for core dumps
environment:
USE_ADDITIONAL_OPTIONS: --sa --telnetsrv --telnetsrv.shrmod ci --log_config.global_log_options level,nocolor,time,line_num,function
USE_ADDITIONAL_OPTIONS: --sa
--telnetsrv --telnetsrv.listenport 9090 --telnetsrv.shrmod ci
--log_config.global_log_options level,nocolor,time,line_num,function
volumes:
- ../../conf_files/gnb-cu.sa.f1.conf:/opt/oai-gnb/etc/gnb.conf
networks:
public_net:
ipv4_address: 192.168.68.194
# for performance reasons, we use host mode: in bridge mode, we have
# unacceptable DL TCP performance. However, the whole point of
# containerization is to not be in host mode, so update this to macvlan
# later.
network_mode: "host"
#entrypoint: /bin/bash -c "sleep infinity"
healthcheck:
# pgrep does NOT work
@@ -22,19 +27,29 @@ services:
gnb_du_fdd:
image: oai-gnb:latest
privileged: true
container_name: sa-du-b200-gnb
cap_drop:
- ALL
cap_add:
- SYS_NICE
- IPC_LOCK
ulimits:
core: -1 # for core dumps
environment:
USE_B2XX: 'yes'
USE_ADDITIONAL_OPTIONS: --sa --RUs.[0].sdr_addrs serial=30C51D4 --continuous-tx --telnetsrv --telnetsrv.shrmod ci --log_config.global_log_options level,nocolor,time,line_num,function --gNBs.[0].min_rxtxtime 2 --gNBs.[0].do_CSIRS 1 --gNBs.[0].do_SRS 0 --L1s.[0].max_ldpc_iterations 20
USE_ADDITIONAL_OPTIONS: --sa --RUs.[0].sdr_addrs serial=30C51D4 --continuous-tx
--telnetsrv --telnetsrv.listenport 9091 --telnetsrv.shrmod ci
--gNBs.[0].min_rxtxtime 2 --gNBs.[0].do_CSIRS 1 --gNBs.[0].do_SRS 0 --L1s.[0].max_ldpc_iterations 20
--log_config.global_log_options level,nocolor,time,line_num,function
devices:
- /dev/bus/usb/:/dev/bus/usb/
volumes:
- ../../conf_files/gnb-du.sa.band1.52prb.usrpb210.conf:/opt/oai-gnb/etc/gnb.conf
- /dev:/dev
networks:
public_net:
ipv4_address: 192.168.68.195
# for performance reasons, we use host mode: in bridge mode, we have
# unacceptable DL TCP performance. However, the whole point of
# containerization is to not be in host mode, so update this to macvlan
# later.
network_mode: "host"
#entrypoint: /bin/bash -c "sleep infinity"
healthcheck:
# pgrep does NOT work
@@ -42,12 +57,3 @@ services:
interval: 10s
timeout: 5s
retries: 5
networks:
public_net:
name: sa-b200-gnb-net
ipam:
config:
- subnet: 192.168.68.192/26
driver_opts:
com.docker.network.bridge.name: "sa-gnb-net"

View File

@@ -3,13 +3,10 @@
# Check if cuBB_SDK is defined, if not, use default path
cuBB_Path="${cuBB_SDK:-/opt/nvidia/cuBB}"
# Run gdrcopy insmod
cd "$cuBB_Path"/cuPHY-CP/external/gdrcopy/ || exit 1
./insmod.sh
cd "$cuBB_Path" || exit 1
# Add gdrcopy to LD_LIBRARY_PATH
export LD_LIBRARY_PATH=/usr/local/nvidia/lib:/usr/local/nvidia/lib64:/opt/mellanox/dpdk/lib/x86_64-linux-gnu:/opt/mellanox/doca/lib/x86_64-linux-gnu:/opt/nvidia/cuBB/cuPHY-CP/external/gdrcopy/build/x86_64/
export LD_LIBRARY_PATH=$LD_LIBRART_PATH:"$cuBB_Path/gpu-dpdk/build/install/lib/x86_64-linux-gnu:$cuBB_Path/build/cuPHY-CP/cuphydriver/src"
# Restart MPS
# Export variables
@@ -21,17 +18,18 @@ export CUDA_MPS_LOG_DIRECTORY=/var
echo quit | nvidia-cuda-mps-control
# Start MPS
nvidia-cuda-mps-control -d
echo start_server -uid 0 | nvidia-cuda-mps-control
sudo -E nvidia-cuda-mps-control -d
sudo -E echo start_server -uid 0 | sudo -E nvidia-cuda-mps-control
# Start cuphycontroller_scf
# Check if an argument is provided
if [ $# -eq 0 ]; then
# No argument provided, use default value
argument="P5G_SCF_FXN"
argument="P5G_FXN"
else
# Argument provided, use it
argument="$1"
fi
"$cuBB_Path"/build/cuPHY-CP/cuphycontroller/examples/cuphycontroller_scf "$argument"
sudo -E "$cuBB_Path"/build/cuPHY-CP/cuphycontroller/examples/cuphycontroller_scf "$argument"
sudo -E ./build/cuPHY-CP/gt_common_libs/nvIPC/tests/pcap/pcap_collect

View File

@@ -23,10 +23,10 @@ services:
- ../../../cmake_targets/share:/opt/cuBB/share
userns_mode: host
ipc: "shareable"
image: cubb-build:23-2
image: cubb-build:24-1
environment:
- cuBB_SDK=/opt/nvidia/cuBB
command: bash -c " rm -rf /tmp/phy.log && chmod +x /opt/nvidia/cuBB/aerial_l1_entrypoint.sh && /opt/nvidia/cuBB/aerial_l1_entrypoint.sh"
command: bash -c "sudo rm -rf /tmp/phy.log && sudo chmod +x /opt/nvidia/cuBB/aerial_l1_entrypoint.sh && /opt/nvidia/cuBB/aerial_l1_entrypoint.sh"
healthcheck:
test: ["CMD-SHELL",'grep -q "L1 is ready!" /tmp/phy.log && echo 0 || echo 1']
interval: 20s
@@ -38,7 +38,11 @@ services:
depends_on:
nv-cubb:
condition: service_healthy
privileged: true
cap_drop:
- ALL
cap_add:
- SYS_NICE
- IPC_LOCK
ipc: "container:nv-cubb"
environment:
USE_ADDITIONAL_OPTIONS: --log_config.global_log_options level,nocolor,time

View File

@@ -1,19 +1,26 @@
services:
gnb_mono_tdd:
image: oai-gnb:latest
privileged: true
container_name: sa-b200-gnb
cap_drop:
- ALL
cap_add:
- SYS_NICE
- IPC_LOCK
ulimits:
core: -1 # for core dumps
environment:
USE_B2XX: 'yes'
USE_ADDITIONAL_OPTIONS: --sa --RUs.[0].sdr_addrs serial=30C51D4 --telnetsrv --telnetsrv.shrmod ci --continuous-tx --log_config.global_log_options level,nocolor,time,line_num,function -E
devices:
- /dev/bus/usb/:/dev/bus/usb/
volumes:
- ../../conf_files/gnb.sa.band78.106prb.usrpb200.sc-fdma.conf:/opt/oai-gnb/etc/gnb.conf
- /dev:/dev
networks:
public_net:
ipv4_address: 192.168.68.194
# for performance reasons, we use host mode: in bridge mode, we have
# unacceptable DL TCP performance. However, the whole point of
# containerization is to not be in host mode, so update this to macvlan
# later.
network_mode: "host"
#entrypoint: /bin/bash -c "sleep infinity"
healthcheck:
# pgrep does NOT work
@@ -21,12 +28,3 @@ services:
interval: 10s
timeout: 5s
retries: 5
networks:
public_net:
name: sa-b200-gnb-net
ipam:
config:
- subnet: 192.168.68.192/26
driver_opts:
com.docker.network.bridge.name: "sa-gnb-net"

View File

@@ -30,7 +30,6 @@ fi
source $OPENAIR_DIR/cmake_targets/tools/test_helper
SUDO="sudo -E"
tdir=$OPENAIR_DIR/cmake_targets/autotests
rm -fr $tdir/bin
mkdir -p $tdir/bin
@@ -178,8 +177,6 @@ RUN_GROUP=0
test_case_group=""
test_case_group_array=()
test_case_array=()
echo_info "Note that the user should be sudoer for executing certain commands, for example loading kernel modules"
until [ -z "$1" ]; do
case "$1" in
@@ -207,15 +204,6 @@ until [ -z "$1" ]; do
esac
done
tmpfile=`mktemp`
$SUDO echo $HOME > $tmpfile
tstsudo=`cat $tmpfile`
if [ "$tstsudo" != "$HOME" ]; then
echo_error "$USER does not have sudo privileges. Exiting"
exit
fi
rm -fr $tmpfile
test_case_excl_list=`xmlstarlet sel -t -v "/testCaseList/TestCaseExclusionList" $xml_conf`
test_case_excl_list=`sed "s/\+/\*/g" <<< "$test_case_excl_list" ` # Replace + with * for bash string substituion
echo "Test Case Exclusion List = $test_case_excl_list "

View File

@@ -12,15 +12,15 @@
(Test 10b: 5 MHz, R6-1.FDD (MCS 24,18 PRB), EVA5, 17.5dB (70%)),
(Test 11: 10 MHz, R7.FDD (MCS 25), EVA5, 17.7dB (70%))</desc>
<main_exec>dlsim</main_exec>
<main_exec_args> -m=5 -g=F -s=-1 -w=1.0 -f=.2 -n=500 -B=50 -c=2 -z=2 -O=60
-m=4 -g=F -s=0 -w=1.0 -f=.2 -n=500 -B=6 -c=4 -z=2 -O=60
-m=15 -g=F -s=6.7 -w=1.0 -f=.2 -n=500 -B=50 -c=2 -z=2 -O=60
-m=15 -g=F -s=6.7 -w=1.0 -f=.2 -n=500 -B=25 -c=2 -z=2 -O=60
-m=15 -g=G -s=1.4 -w=1.0 -f=.2 -n=500 -B=50 -c=2 -z=2 -O=25
-m=15 -g=G -s=1.4 -w=1.0 -f=.2 -n=500 -B=25 -c=2 -z=2 -O=25
-m=25 -g=F -s=17.4 -w=1.0 -f=.2 -n=500 -B=25 -c=3 -z=2 -O=60
-m=25 -g=F -s=17.5 -w=1.0 -f=.2 -n=500 -B=25 -c=3 -z=2 -r=1022 -O=60
-m=26 -g=F -s=17.7 -w=1.0 -f=.2 -n=500 -B=50 -c=2 -z=2 -O=60</main_exec_args>
<main_exec_args> -m=5 -g=F -s=-1 -w=1.0 -f=.2 -n=500 -B=50 -c=2 -z=2 -Tperf=60
-m=4 -g=F -s=0 -w=1.0 -f=.2 -n=500 -B=6 -c=4 -z=2 -Tperf=60
-m=15 -g=F -s=6.7 -w=1.0 -f=.2 -n=500 -B=50 -c=2 -z=2 -Tperf=60
-m=15 -g=F -s=6.7 -w=1.0 -f=.2 -n=500 -B=25 -c=2 -z=2 -Tperf=60
-m=15 -g=G -s=1.4 -w=1.0 -f=.2 -n=500 -B=50 -c=2 -z=2 -Tperf=25
-m=15 -g=G -s=1.4 -w=1.0 -f=.2 -n=500 -B=25 -c=2 -z=2 -Tperf=25
-m=25 -g=F -s=17.4 -w=1.0 -f=.2 -n=500 -B=25 -c=3 -z=2 -Tperf=60
-m=25 -g=F -s=17.5 -w=1.0 -f=.2 -n=500 -B=25 -c=3 -z=2 -r=1022 -Tperf=60
-m=26 -g=F -s=17.7 -w=1.0 -f=.2 -n=500 -B=50 -c=2 -z=2 -Tperf=60</main_exec_args>
<tags>test1 test5 test6 test6b test7 test7b test10 test10b test11</tags>
<search_expr_true>"passed"</search_expr_true>
<search_expr_false>segmentation fault|assertion|exiting|fatal</search_expr_false>
@@ -34,11 +34,11 @@
(TM2 Test 1: 10 MHz, R.11 FDD (MCS 14), EVA5, 6.8 dB (70%)),
(TM2 Test 1b: 5 MHz, R.11-2 FDD (MCS 13), EVA5, 5.9 dB (70%))</desc>
<main_exec>dlsim</main_exec>
<main_exec_args> -m=26 -g=F -s=17.6 -w=1.0 -f=.2 -n=500 -B=100 -c=2 -z=2 -O=60
-m=26 -g=F -s=17.3 -w=1.0 -f=.2 -n=500 -B=100 -c=2 -z=2 -r=1600 -O=60
-m=26 -g=F -s=16.6 -w=1.0 -f=.2 -n=500 -B=100 -c=2 -z=2 -r=1899 -O=60
-m=14 -g=F -s=6.8 -w=1.0 -f=.2 -n=500 -B=50 -c=2 -x=2 -y=2 -z=2 -O=60
-m=13 -g=F -s=5.9 -w=1.0 -f=.2 -n=500 -B=25 -c=3 -x=2 -y=2 -z=2 -O=60</main_exec_args>
<main_exec_args> -m=26 -g=F -s=17.6 -w=1.0 -f=.2 -n=500 -B=100 -c=2 -z=2 -Tperf=60
-m=26 -g=F -s=17.3 -w=1.0 -f=.2 -n=500 -B=100 -c=2 -z=2 -r=1600 -Tperf=60
-m=26 -g=F -s=16.6 -w=1.0 -f=.2 -n=500 -B=100 -c=2 -z=2 -r=1899 -Tperf=60
-m=14 -g=F -s=6.8 -w=1.0 -f=.2 -n=500 -B=50 -c=2 -x=2 -y=2 -z=2 -Tperf=60
-m=13 -g=F -s=5.9 -w=1.0 -f=.2 -n=500 -B=25 -c=3 -x=2 -y=2 -z=2 -Tperf=60</main_exec_args>
<tags>test15 test15b test15c TM2_test1 TM2_test1b</tags>
<search_expr_true>"passed"</search_expr_true>
<search_expr_false>segmentation fault|assertion|exiting|fatal</search_expr_false>
@@ -53,12 +53,12 @@
(Test 5: 20 MHz, FDD (MCS 5), AWGN, 6dB (70%)),
(Test 6: 20 MHz, FDD (MCS 16), AWGN, 12 dB (70%))</desc>
<main_exec>ulsim</main_exec>
<main_exec_args> -BnbRBs=25 -mcs=5 -yN_rx=1 -gchannel=N -xTransmission=1 -snr=6 -wsnrInterrupt=1.0 -e_snr_step=.1 -P -nb_frame=500 -Operf=70
-BnbRBs=25 -mcs=16 -yN_rx=1 -gchannel=N -xTransmission=1 -snr=12 -wsnrInterrupt=1.0 -e_snr_step=.1 -P -nb_frame=500 -Operf=70
-BnbRBs=50 -mcs=5 -yN_rx=1 -gchannel=N -xTransmission=1 -snr=6 -wsnrInterrupt=1.0 -e_snr_step=.1 -P -nb_frame=500 -Operf=70
-BnbRBs=50 -mcs=16 -yN_rx=1 -gchannel=N -xTransmission=1 -snr=12 -wsnrInterrupt=1.0 -e_snr_step=.1 -P -nb_frame=500 -Operf=70
-BnbRBs=100 -mcs=5 -yN_rx=1 -gchannel=N -xTransmission=1 -snr=6 -wsnrInterrupt=1.0 -e_snr_step=.1 -P -nb_frame=500 -Operf=70
-BnbRBs=100 -mcs=16 -yN_rx=1 -gchannel=N -xTransmission=1 -snr=12 -wsnrInterrupt=1.0 -e_snr_step=.1 -P -nb_frame=500 -Operf=70 </main_exec_args>
<main_exec_args> -BnbRBs=25 -mcs=5 -yN_rx=1 -gchannel=N -xTransmission=1 -snr=6 -wsnrInterrupt=1.0 -e_snr_step=.1 -P -nb_frame=500 -Tperf=70
-BnbRBs=25 -mcs=16 -yN_rx=1 -gchannel=N -xTransmission=1 -snr=12 -wsnrInterrupt=1.0 -e_snr_step=.1 -P -nb_frame=500 -Tperf=70
-BnbRBs=50 -mcs=5 -yN_rx=1 -gchannel=N -xTransmission=1 -snr=6 -wsnrInterrupt=1.0 -e_snr_step=.1 -P -nb_frame=500 -Tperf=70
-BnbRBs=50 -mcs=16 -yN_rx=1 -gchannel=N -xTransmission=1 -snr=12 -wsnrInterrupt=1.0 -e_snr_step=.1 -P -nb_frame=500 -Tperf=70
-BnbRBs=100 -mcs=5 -yN_rx=1 -gchannel=N -xTransmission=1 -snr=6 -wsnrInterrupt=1.0 -e_snr_step=.1 -P -nb_frame=500 -Tperf=70
-BnbRBs=100 -mcs=16 -yN_rx=1 -gchannel=N -xTransmission=1 -snr=12 -wsnrInterrupt=1.0 -e_snr_step=.1 -P -nb_frame=500 -Tperf=70</main_exec_args>
<tags>test1 test2 test3 test4 test5 test6</tags>
<search_expr_true>"passed"</search_expr_true>
<search_expr_false>segmentation fault|assertion|exiting|fatal</search_expr_false>
@@ -116,7 +116,7 @@
<main_exec>nr_pbchsim</main_exec>
<main_exec_args>-s-11 -S-8 -n10 -R106 -N2
-s-11 -S-8 -n10 -o8000 -I -R106
-s-11 -S-8 -n10 -R106 -O6</main_exec_args>
-s-11 -S-8 -n10 -R106 -c6</main_exec_args>
<tags>test1 test2 test3</tags>
<search_expr_true>PBCH test OK</search_expr_true>
<search_expr_false>segmentation fault|assertion|exiting|fatal</search_expr_false>

View File

@@ -52,7 +52,7 @@ TARGET_LIST=""
function print_help() {
echo_info "
This script compiles OpenAirInterface Software, and can install dependencies
for a number of distributions (Ubuntu 18-22, Fedora, RHEL7/8).
for a number of distributions (Ubuntu 22-24, Fedora, RHEL9).
Options:
--arch-native
Passes -march=native to the compiler.
@@ -85,7 +85,7 @@ Options:
--RU
Makes the OAI RRU
--UE
Makes the UE specific parts (ue_ip, usim, nvram) from the given configuration file
Makes the UE specific parts (usim, nvram) from the given configuration file
--nrUE
Makes the NR UE softmodem
--UE-conf-nvram [configuration file]
@@ -124,6 +124,8 @@ Options:
--disable-cpu-affinity
Disables CPU Affinity between UHD/TX/RX Threads (Valid only when deadline scheduler is disabled). By defaulT, CPU Affinity is enabled when not using deadline scheduler. It is enabled only with >2 CPUs. For eNB, CPU_0-> Device library (UHD), CPU_1->TX Threads, CPU_2...CPU_MAX->Rx Threads. For UE, CPU_0->Device Library(UHD), CPU_1..CPU_MAX -> All the UE threads
--enable-cpu-affinity
--enable-LTTNG
Enable LTTNG log. While lttng is enabled, T-Tracer will be disabled
--disable-T-Tracer
Disables the T tracer.
--disable-hardware-dependency
@@ -269,9 +271,6 @@ function main() {
--UE-gen-nvram)
gen_nvram_path=$(readlink -f "$2")
shift 2;;
--UE-ip)
TARGET_LIST="$TARGET_LIST ue_ip"
shift;;
-w | --hardware)
case "$2" in
"USRP" | "BLADERF" | "LMSSDR" | "IRIS")
@@ -353,6 +352,11 @@ function main() {
BUILD_DOXYGEN=1
echo_info "Will build doxygen support"
shift;;
--enable-LTTNG)
CMAKE_CMD="$CMAKE_CMD -DENABLE_LTTNG=ON -DT_TRACER=OFF"
echo_info "Enable LTTNG tracer"
USE_LTTNG=1
shift 1;;
--disable-T-Tracer)
CMAKE_CMD="$CMAKE_CMD -DT_TRACER=False"
echo_info "Disabling the T tracer"
@@ -411,22 +415,21 @@ function main() {
CMAKE_CMD="$CMAKE_CMD -DSANITIZE_ADDRESS=True -DSANITIZE_UNDEFINED=True"
shift;;
--sanitize-address | -fsanitize=address)
grep -sq "Ubuntu 18.04" /etc/os-release && echo_error "Bug in OS with this option, see CMakeLists.txt"
CMAKE_CMD="$CMAKE_CMD -DSANITIZE_ADDRESS=True"
shift;;
--sanitize-undefined | -fundefined=address)
--sanitize-undefined | -fsanitize=undefined)
CMAKE_CMD="$CMAKE_CMD -DSANITIZE_UNDEFINED=True"
shift;;
--sanitize-memory | -fsanitize=memory)
CMAKE_CMD="$CMAKE_CMD -DSANITIZE_MEMORY=ON -DSANITIZE_ADDRESS=OFF -DSANITIZE_UNDEFINED=OFF"
shift;;
--sanitize-thread | -fsanitize=thread)
CMAKE_CMD="$CMAKE_CMD -DSANITIZE_THREAD=True"
shift;;
--trace-asn1c-enc-dec)
CMAKE_CMD="$CMAKE_CMD -DTRACE_ASN1C_ENC_DEC=ON"
echo_info "Enabling asn1c internal traces via OAI logging system"
shift 1;;
--sanitize-thread | -fthread=address)
CMAKE_CMD="$CMAKE_CMD -DSANITIZE_THREAD=True"
shift;;
-h | --help)
print_help
exit 1;;
@@ -454,6 +457,10 @@ function main() {
if [ "$INSTALL_EXTERNAL" = "1" ] ; then
echo_info "Installing packages"
check_install_oai_software
if [ "$USE_LTTNG" = "1" ] ; then
echo_info "installing LTTng"
install_lttng $1
fi
if [ "$HW" == "OAI_USRP" ] ; then
echo_info "installing packages for USRP support"
check_install_usrp_uhd_driver
@@ -542,22 +549,15 @@ function main() {
# Auto-tests #
##############
if [ "$OAI_TEST" = "1" ] ; then
echo_error "These scripts ASSUME that user is in /etc/sudoers and can execute commands without PASSWORD prompt"
echo_error "Add the following lines in /etc/sudoers file to make your __user_name__ sudo without password prompt"
echo_error " __your_user_name__ ALL = (ALL:ALL) NOPASSWD: ALL"
echo_error " __your_user_name__ ALL = (ALL) NOPASSWD: ALL "
echo_info "The log file for the autotest script for debugging is located here: $OPENAIR_DIR/cmake_targets/autotests/log/autotests.log "
echo_info "The results of autotests results is located here: $OPENAIR_DIR/cmake_targets/autotests/log/results_autotests.xml "
echo_info "You can hit CTRL-C at any time to terminate the autotests..."
echo "Current User Name: $USER"
read -s -p "Enter Password: " mypassword
echo -e "\n"
rm -fr $OPENAIR_DIR/cmake_targets/autotests/log
mkdir -p $OPENAIR_DIR/cmake_targets/autotests/log
if [ "$RUN_GROUP" -eq "1" ]; then
$OPENAIR_DIR/cmake_targets/autotests/run_exec_autotests.bash -g "$TEST_CASE_GROUP" -p $mypassword >& $OPENAIR_DIR/cmake_targets/autotests/log/autotests.log &
$OPENAIR_DIR/cmake_targets/autotests/run_exec_autotests.bash -g "$TEST_CASE_GROUP" >& $OPENAIR_DIR/cmake_targets/autotests/log/autotests.log
else
$OPENAIR_DIR/cmake_targets/autotests/run_exec_autotests.bash -p $mypassword >& $OPENAIR_DIR/cmake_targets/autotests/log/autotests.log &
$OPENAIR_DIR/cmake_targets/autotests/run_exec_autotests.bash >& $OPENAIR_DIR/cmake_targets/autotests/log/autotests.log
fi
wait
else

View File

@@ -1,8 +1,8 @@
set(CMAKE_SYSTEM_NAME Linux)
set(CMAKE_SYSTEM_PROCESSOR arm)
set(CMAKE_C_COMPILER /usr/bin/aarch64-linux-gnu-gcc-9)
set(CMAKE_CXX_COMPILER /usr/bin/aarch64-linux-gnu-g++-9)
set(CMAKE_C_COMPILER /usr/bin/aarch64-linux-gnu-gcc-11)
set(CMAKE_CXX_COMPILER /usr/bin/aarch64-linux-gnu-g++-11)
set(CROSS_COMPILE 1)
set(bnProc_gen_128_DIR ${CMAKE_CURRENT_BINARY_DIR}/${NATIVE_DIR}) # /../build)

View File

@@ -109,6 +109,8 @@ elseif (xran_VERSION_STRING STREQUAL "oran_e_maintenance_release_v1.1")
set(xran_VERSION 5.1.1)
elseif (xran_VERSION_STRING STREQUAL "oran_e_maintenance_release_v1.2")
set(xran_VERSION 5.1.2)
elseif (xran_VERSION_STRING STREQUAL "oran_e_maintenance_release_v1.3")
set(xran_VERSION 5.1.3)
endif()
unset(xran_VERSION_LINE)
unset(xran_VERSION_STRING)

View File

@@ -103,11 +103,11 @@ get_distribution_release() {
check_supported_distribution() {
local distribution=$(get_distribution_release)
case "$distribution" in
"ubuntu24.04") return 0 ;;
"ubuntu23.10") return 0 ;;
"ubuntu22.04") return 0 ;;
"ubuntu21.04") return 0 ;;
"ubuntu20.04") return 0 ;;
"ubuntu18.04") return 0 ;;
"debian11") return 0 ;;
"fedora36") return 0 ;;
"fedora37") return 0 ;;
@@ -171,10 +171,6 @@ clean_kernel() {
$SUDO iptables -t filter -F
$SUDO iptables -t raw -F
echo_info "Flushed iptables"
$SUDO rmmod nasmesh > /dev/null 2>&1
$SUDO rmmod oai_nw_drv > /dev/null 2>&1
$SUDO rmmod ue_ip > /dev/null 2>&1
echo_info "removed drivers from kernel"
}
clean_all_files() {
@@ -321,7 +317,7 @@ check_install_usrp_uhd_driver(){
$SUDO apt-get remove libuhd3.14.1 -y || true
$SUDO apt-get remove libuhd3.15.0 -y || true
local distribution=$(get_distribution_release)
if [[ "$distribution" == "ubuntu18.04" || "$distribution" == "ubuntu20.04" || "$distribution" == "ubuntu22.04" ]]; then
if [[ "$distribution" == "ubuntu20.04" || "$distribution" == "ubuntu22.04" ]]; then
$SUDO apt-get remove libuhd4.?.? -y || true
fi
v=$(lsb_release -cs)
@@ -351,7 +347,7 @@ check_install_usrp_uhd_driver(){
$SUDO apt-get update
$SUDO apt-get -y install python-tk $boost_libs_ubuntu libusb-1.0-0-dev
case "$(get_distribution_release)" in
"ubuntu18.04" | "ubuntu20.04" | "ubuntu22.04")
"ubuntu20.04" | "ubuntu22.04")
$SUDO apt-get -y install libuhd-dev libuhd4.5.0 uhd-host
;;
esac
@@ -528,24 +524,11 @@ check_install_soapy () {
install_soapy_iris_from_source
}
# for ubuntu 18 we need a special repository (https://apt.kitware.com/) to install cmake >= 3.12
add_cmake_repo () {
$SUDO $INSTALLER -y install wget
wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | gpg --dearmor - | $SUDO tee /usr/share/keyrings/kitware-archive-keyring.gpg >/dev/null
echo 'deb [signed-by=/usr/share/keyrings/kitware-archive-keyring.gpg] https://apt.kitware.com/ubuntu/ bionic main' | $SUDO tee /etc/apt/sources.list.d/kitware.list >/dev/null
$SUDO $INSTALLER -y update
$SUDO rm /usr/share/keyrings/kitware-archive-keyring.gpg
$SUDO $INSTALLER -y install kitware-archive-keyring
}
check_install_additional_tools (){
$SUDO $INSTALLER update -y
local optional_packages=""
if [[ "$OS_BASEDISTRO" == "debian" ]]; then
case "$(get_distribution_release)" in
"ubuntu18.04")
optional_packages="python-dev python-pip python-pyroute2 python python-numpy python-scipy python-matplotlib ctags"
;;
"ubuntu20.04" | "ubuntu21.04" | "ubuntu22.04" | "debian11" )
optional_packages="python3 python3-pip python3-dev python3-scipy python3-matplotlib python3-pyroute2 universal-ctags"
;;
@@ -586,10 +569,6 @@ check_install_oai_software() {
if [[ "$OS_BASEDISTRO" == "debian" ]]; then
$SUDO apt install -y software-properties-common
case "$(get_distribution_release)" in
"ubuntu18.04")
add_cmake_repo
specific_packages=""
;;
"debian11")
specific_packages="libz-dev"
;;
@@ -602,7 +581,6 @@ check_install_oai_software() {
ninja-build \
pkg-config \
git \
libatlas-base-dev \
libblas-dev \
liblapack-dev \
liblapacke-dev \
@@ -632,7 +610,6 @@ check_install_oai_software() {
gcc \
gcc-c++ \
git \
atlas-devel \
pkgconfig \
libconfig-devel \
libffi-devel \
@@ -667,7 +644,10 @@ install_asn1c_from_source(){
# GIT_SSL_NO_VERIFY=true git clone https://gitlab.eurecom.fr/oai/asn1c.git /tmp/asn1c
git clone https://github.com/mouse07410/asn1c /tmp/asn1c
cd /tmp/asn1c
git checkout vlm_master
#git checkout vlm_master
# hotfix: current vlm_master (5fa129cf3161da9ff2d67341e6277e818c0f5d6a)
# breaks F1, NG, so use the one before.
git checkout 940dd5fa9f3917913fd487b13dfddfacd0ded06e
# Showing which version is used
git log -n1
autoreconf -iv
@@ -701,6 +681,97 @@ install_simde_from_source(){
$SUDO \cp -rv ../simde /usr/include
}
install_lttng() {
if [[ "$OS_DISTRO" != "ubuntu" ]]; then
echo_info "LTTng is supported only for ubuntu at the moment."
echo_info $distribution
return
fi
set +e
$SUDO apt-add-repository ppa:lttng/stable-2.13 -y && apt-get update
$SUDO apt-get install -y lttng-tools lttng-modules-dkms liblttng-ust-dev
if [[ $? > 0 ]]; then
echo "Failed to install LTTng using apt. Installing from source"
install_lttng_deps
install_lttng_from_source
fi
set -e
}
install_lttng_deps() {
echo "installing dependencies of LTTng"
$SUDO apt-get install uuid-dev libxml2-dev -y
}
install_lttng_from_source() {
echo "installing LTTng from source"
install_popt_1_18_from_source
install_userspace_rcu
install_lttng_ust_2_13_from_source
install_lttng_tools_2_13_from_source
}
install_popt_1_18_from_source() {
$SUDO $INSTALLER -y install wget
echo_info "\nInstalling popt_1_18."
cd $(mktemp -d) &&
wget http://ftp.rpm.org/popt/releases/popt-1.x/popt-1.18.tar.gz
tar -xf popt-1.18.tar.gz && cd popt-1.18
./configure && make -j16 && $SUDO make install
}
install_userspace_rcu() {
echo_info "\nInstalling U-RCU from source."
cd /tmp
$SUDO rm -rf /tmp/urcu
git clone https://github.com/urcu/userspace-rcu.git /tmp/urcu
cd /tmp/urcu
git checkout stable-0.12
./bootstrap && ./configure && make
$SUDO make install
$SUDO ldconfig
}
install_lttng_modules_2_13_from_source() {
$SUDO $INSTALLER -y install wget
echo_info "\nInstalling LTTng Modules."
cd $(mktemp -d) &&
wget https://lttng.org/files/lttng-modules/lttng-modules-latest-2.13.tar.bz2 &&
tar -xf lttng-modules-latest-2.13.tar.bz2 &&
cd lttng-modules-2.13.* &&
make &&
$SUDO make modules_install &&
$SUDO depmod -a
}
install_lttng_ust_2_13_from_source() {
$SUDO $INSTALLER -y install wget
echo_info "\nInstalling LTTng UST."
cd $(mktemp -d) &&
wget https://lttng.org/files/lttng-ust/lttng-ust-latest-2.13.tar.bz2 &&
tar -xf lttng-ust-latest-2.13.tar.bz2 &&
cd lttng-ust-2.13.* &&
./configure --disable-numa &&
make &&
$SUDO make install &&
$SUDO ldconfig
}
install_lttng_tools_2_13_from_source() {
$SUDO $INSTALLER -y install wget
echo_info "\nInstalling LTTng Tools."
cd $(mktemp -d) &&
wget https://lttng.org/files/lttng-tools/lttng-tools-latest-2.13.tar.bz2 &&
tar -xf lttng-tools-latest-2.13.tar.bz2 &&
cd lttng-tools-2.13.* &&
./configure &&
make &&
$SUDO make install &&
$SUDO ldconfig
}
#################################################
# 2. compile
################################################

View File

@@ -1,54 +0,0 @@
#!/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
# */
# 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
#
#######################################
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
}
load_module $OPENAIR_DIR/cmake_targets/ran_build/build/nasmesh.ko
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
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

View File

@@ -1,71 +0,0 @@
#!/bin/bash
#WARNING: this file may not work properly, be sure to know what you
#do when using it
#/*
# * 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
# */
################################################################################
# file init_nas_s1
# brief loads the ue_ip module and sets up IP for the UE
# you may want to edit it to fit your settings (replace oip0 by oipX for
# instance)
# author Florian Kaltenberger
#
#######################################
LTEIF=oip1
#OPENAIR_DIR=/home/oai/svn-oai/openair4G
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
}
load_module ../ran_build/build/ue_ip.ko
if [ "$1" = "UE" ]; then
echo "bring up $LTEIF interface for UE"
sudo ifconfig $LTEIF up
fi
sudo ip route flush cache
sleep 1
sudo sysctl -w net.ipv4.conf.all.log_martians=1
echo "Disabling reverse path filtering"
sudo sysctl -w net.ipv4.conf.all.rp_filter=0
sudo ip route flush cache
# Check table 200 lte in /etc/iproute2/rt_tables
fgrep lte /etc/iproute2/rt_tables > /dev/null
if [ $? -ne 0 ]; then
echo "200 lte " >> /etc/iproute2/rt_tables
fi
sudo ip rule add fwmark 1 table lte
sudo ip route add default dev $LTEIF table lte

View File

@@ -7,7 +7,7 @@ index 7508117..0dbe0bd 100644
#include <rte_mbuf.h>
-#define VERSIONX "oran_e_maintenance_release_v1.0"
+#define VERSIONX "oran_e_maintenance_release_v1.2"
+#define VERSIONX "oran_e_maintenance_release_v1.3"
#define APP_O_DU 0
#define APP_O_RU 1
@@ -114,7 +114,7 @@ index 7419ae1..a85f973 100644
* @ingroup xran
*
diff --git a/fhi_lib/lib/api/xran_up_api.h b/fhi_lib/lib/api/xran_up_api.h
index 7d3afc5..3e00c5a 100644
index 7d3afc5..e2f1f21 100644
--- a/fhi_lib/lib/api/xran_up_api.h
+++ b/fhi_lib/lib/api/xran_up_api.h
@@ -80,6 +80,7 @@ int32_t xran_extract_iq_samples(struct rte_mbuf *mbuf,
@@ -125,6 +125,16 @@ index 7d3afc5..3e00c5a 100644
union ecpri_seq_id *seq_id,
uint16_t *num_prbu,
uint16_t *start_prbu,
@@ -89,7 +90,8 @@ int32_t xran_extract_iq_samples(struct rte_mbuf *mbuf,
int8_t expect_comp,
enum xran_comp_hdr_type staticComp,
uint8_t *compMeth,
- uint8_t *iqWidth);
+ uint8_t *iqWidth,
+ uint8_t *is_prach);
inline int xran_prepare_iq_symbol_portion(
struct rte_mbuf *mbuf,
diff --git a/fhi_lib/lib/ethernet/ethdi.c b/fhi_lib/lib/ethernet/ethdi.c
index b6ba257..b53325f 100644
--- a/fhi_lib/lib/ethernet/ethdi.c
@@ -173,9 +183,18 @@ index e6d3067..8e0abee 100644
static int16_t saturateAbs(int16_t inVal)
{
diff --git a/fhi_lib/lib/src/xran_bfp_uplane.cpp b/fhi_lib/lib/src/xran_bfp_uplane.cpp
index a345df4..7831fa0 100644
index a345df4..109b05a 100644
--- a/fhi_lib/lib/src/xran_bfp_uplane.cpp
+++ b/fhi_lib/lib/src/xran_bfp_uplane.cpp
@@ -90,7 +90,7 @@ namespace BFP_UPlane
{
const __m512i* rawData = reinterpret_cast<const __m512i*>(dataIn.dataExpanded);
/// Abs
- const auto rawDataAbs = _mm512_abs_epi16(rawData[0]);
+ const auto rawDataAbs = _mm512_abs_epi16(_mm512_loadu_epi16(rawData));
/// No need to do a full horizontal max operation here, just do a max IQ step,
/// compute the exponents and then use a reduce max over all exponent values. This
/// is the fastest way to handle a single RB.
@@ -116,7 +116,7 @@ namespace BFP_UPlane
/// Get AVX512 pointer aligned to desired RB
const __m512i* rawDataIn = reinterpret_cast<const __m512i*>(dataIn.dataExpanded + numREOffset);
@@ -195,10 +214,18 @@ index a345df4..7831fa0 100644
dataOut->dataCompressed[thisRBExpAddr] = thisExp;
/// Now have 1 RB worth of bytes separated into 3 chunks (1 per lane)
diff --git a/fhi_lib/lib/src/xran_common.c b/fhi_lib/lib/src/xran_common.c
index baa673f..edd4ecb 100644
index baa673f..00bfdf2 100644
--- a/fhi_lib/lib/src/xran_common.c
+++ b/fhi_lib/lib/src/xran_common.c
@@ -656,6 +656,7 @@ process_mbuf(struct rte_mbuf *pkt, void* handle, struct xran_eaxc_info *p_cid)
@@ -650,12 +650,15 @@ process_mbuf(struct rte_mbuf *pkt, void* handle, struct xran_eaxc_info *p_cid)
uint8_t compMeth = 0;
uint8_t iqWidth = 0;
+ uint8_t is_prach = 0;
+
void *pHandle = NULL;
int ret = MBUF_FREE;
uint32_t mb_free = 0;
int32_t valid_res = 0;
int expect_comp = (p_dev_ctx->fh_cfg.ru_conf.compMeth != XRAN_COMPMETHOD_NONE);
enum xran_comp_hdr_type staticComp = p_dev_ctx->fh_cfg.ru_conf.xranCompHdrType;
@@ -206,7 +233,7 @@ index baa673f..edd4ecb 100644
if (staticComp == XRAN_COMP_HDR_TYPE_STATIC)
{
@@ -674,6 +675,7 @@ process_mbuf(struct rte_mbuf *pkt, void* handle, struct xran_eaxc_info *p_cid)
@@ -674,6 +677,7 @@ process_mbuf(struct rte_mbuf *pkt, void* handle, struct xran_eaxc_info *p_cid)
&subframe_id,
&slot_id,
&symb_id,
@@ -214,7 +241,14 @@ index baa673f..edd4ecb 100644
&seq,
&num_prbu,
&start_prbu,
@@ -688,23 +690,9 @@ process_mbuf(struct rte_mbuf *pkt, void* handle, struct xran_eaxc_info *p_cid)
@@ -683,28 +687,15 @@ process_mbuf(struct rte_mbuf *pkt, void* handle, struct xran_eaxc_info *p_cid)
expect_comp,
staticComp,
&compMeth,
- &iqWidth);
+ &iqWidth,
+ &is_prach);
if (num_bytes <= 0){
print_err("num_bytes is wrong [%d]\n", num_bytes);
return MBUF_FREE;
}
@@ -241,7 +275,16 @@ index baa673f..edd4ecb 100644
#ifndef FCN_ADAPT
if(valid_res != 0) {
print_dbg("valid_res is wrong [%d] ant %u (%u : %u : %u : %u) seq %u num_bytes %d\n", valid_res, Ant_ID, frame_id, subframe_id, slot_id, symb_id, seq.seq_id, num_bytes);
@@ -1189,7 +1177,7 @@ int generate_cpmsg_prach(void *pHandle, struct xran_cp_gen_params *params, struc
@@ -756,7 +747,7 @@ process_mbuf(struct rte_mbuf *pkt, void* handle, struct xran_eaxc_info *p_cid)
print_dbg("Transport layer fragmentation (eCPRI) is not supported\n");
}
- } else if (Ant_ID >= p_dev_ctx->PrachCPConfig.eAxC_offset && p_dev_ctx->fh_cfg.prachEnable) {
+ } else if (/*Ant_ID >= p_dev_ctx->PrachCPConfig.eAxC_offset && */p_dev_ctx->fh_cfg.prachEnable && is_prach) {
/* PRACH packet has ruportid = num_eAxc + ant_id */
Ant_ID -= p_dev_ctx->PrachCPConfig.eAxC_offset;
symbol_total_bytes[p_dev_ctx->xran_port_id][CC_ID][Ant_ID] += num_bytes;
@@ -1189,7 +1180,7 @@ int generate_cpmsg_prach(void *pHandle, struct xran_cp_gen_params *params, struc
timeOffset += startSymId * (2048 + 144);
}
timeOffset = timeOffset >> nNumerology; //original number is Tc, convert to Ts based on mu
@@ -250,7 +293,7 @@ index baa673f..edd4ecb 100644
timeOffset += 16;
params->dir = XRAN_DIR_UL;
@@ -1295,8 +1283,7 @@ int32_t ring_processing_func(void* args)
@@ -1295,8 +1286,7 @@ int32_t ring_processing_func(void* args)
for (i = 0; i < ctx->io_cfg.num_vfs && i < XRAN_VF_MAX; i++){
for(qi = 0; qi < ctx->rxq_per_port[i]; qi++) {
@@ -430,7 +473,7 @@ index 36bd72c..f7f5678 100644
int idx = 0;
uint16_t *psrc = (uint16_t *)iq_data_start;
diff --git a/fhi_lib/lib/src/xran_up_api.c b/fhi_lib/lib/src/xran_up_api.c
index 397853a..4a714b5 100644
index 397853a..8977e3d 100644
--- a/fhi_lib/lib/src/xran_up_api.c
+++ b/fhi_lib/lib/src/xran_up_api.c
@@ -329,6 +329,7 @@ int32_t xran_extract_iq_samples(struct rte_mbuf *mbuf,
@@ -441,7 +484,26 @@ index 397853a..4a714b5 100644
union ecpri_seq_id *seq_id,
uint16_t *num_prbu,
uint16_t *start_prbu,
@@ -387,6 +388,8 @@ int32_t xran_extract_iq_samples(struct rte_mbuf *mbuf,
@@ -338,7 +339,8 @@ int32_t xran_extract_iq_samples(struct rte_mbuf *mbuf,
int8_t expect_comp,
enum xran_comp_hdr_type staticComp,
uint8_t *compMeth,
- uint8_t *iqWidth)
+ uint8_t *iqWidth,
+ uint8_t *is_prach)
{
#if XRAN_MLOG_VAR
uint32_t mlogVar[10];
@@ -374,6 +376,8 @@ int32_t xran_extract_iq_samples(struct rte_mbuf *mbuf,
return 0; /* packet too short */
radio_hdr->sf_slot_sym.value = rte_be_to_cpu_16(radio_hdr->sf_slot_sym.value);
+ if (radio_hdr->data_feature.filter_id > 0) *is_prach = 1;
+ else *is_prach = 0;
if (frame_id)
*frame_id = radio_hdr->frame_id;
@@ -387,6 +391,8 @@ int32_t xran_extract_iq_samples(struct rte_mbuf *mbuf,
if (symb_id)
*symb_id = radio_hdr->sf_slot_sym.symb_id;
@@ -450,7 +512,7 @@ index 397853a..4a714b5 100644
/* Process data section hdr */
struct data_section_hdr *data_hdr =
(void *)rte_pktmbuf_adj(mbuf, sizeof(*radio_hdr));
@@ -401,6 +404,7 @@ int32_t xran_extract_iq_samples(struct rte_mbuf *mbuf,
@@ -401,6 +407,7 @@ int32_t xran_extract_iq_samples(struct rte_mbuf *mbuf,
*sym_inc = data_hdr->fields.sym_inc;
*rb = data_hdr->fields.rb;
*sect_id = data_hdr->fields.sect_id;

View File

@@ -69,7 +69,6 @@ To get help on supported parameters you can use specific options:
--worker-config: two option for worker 'WORKER_DISABLE' or 'WORKER_ENABLE'
--nbiot-disable: disable nb-iot, even if defined in config
--noS1: Disable s1 interface
--nokrnmod: (noS1 only): Use tun instead of namesh module
--------------------------------------------------------------------
[LIBCONFIG] (root): 4/4 parameters successfully set, (4 to default value)

View File

@@ -141,7 +141,7 @@ int config_setdefault_int64(configmodule_interface_t *cfg, paramdef_t *cfgoption
config_check_valptr(cfg, cfgoptions, sizeof(*cfgoptions->i64ptr), 1);
if (((cfgoptions->paramflags & PARAMFLAG_MANDATORY) == 0)) {
*(cfgoptions->u64ptr) = cfgoptions->defuintval;
*(cfgoptions->u64ptr) = cfgoptions->defint64val;
status=1;
printf_params(cfg,
"[CONFIG] %s.%s set to default value %llu\n",

View File

@@ -208,9 +208,11 @@ int config_cmdlineonly_get(configmodule_interface_t *cfg, paramdef_t *cfgoptions
}
} /* for loop on options */
printf("[CONFIG] %s: %i/%i parameters successfully set \n",
((prefix == NULL)?"(root)":prefix),
numdefvals,numoptions );
printf_params(cfg,
"[CONFIG] %s: %i/%i parameters successfully set \n",
prefix == NULL ? "(root)" : prefix,
numdefvals,
numoptions);
if (fatalerror == 1) {
fprintf(stderr,"[CONFIG] fatal errors found when assigning %s parameters \n",
@@ -341,9 +343,20 @@ configmodule_interface_t *load_configmodule(int argc,
atoken = strtok_r(NULL,":",&strtokctx);
}
printf("[CONFIG] get parameters from %s ", cfgmode);
for (i = 0; i < cfgptr->num_cfgP; i++) {
printf("%s ", cfgptr->cfgP[i]);
/* check if that file actually exists */
if (access(cfgptr->cfgP[i], F_OK) != 0) {
fprintf(stderr, "error: file %s does not exist\n", cfgptr->cfgP[i]);
for (int j = 0; j < cfgptr->num_cfgP; ++j)
free(cfgptr->cfgP[j]);
free(modeparams);
free(cfgptr->cfgmode);
free(cfgptr->argv_info);
free(cfgptr);
if (cfgmode != NULL)
free(cfgmode);
return NULL;
}
}
if (cfgptr->rtflags & CONFIG_PRINTPARAMS) {

View File

@@ -70,7 +70,7 @@ int read_strlist(configmodule_interface_t *cfg, paramdef_t *cfgoptions, config_s
str=config_setting_get_string_elem(setting,i);
if (str==NULL) {
printf("[LIBCONFIG] %s%i not found in config file\n", cfgoptions->optname,i);
printf_params(cfg, "[LIBCONFIG] %s%i not found in config file\n", cfgoptions->optname,i);
} else {
snprintf(cfgoptions->strlistptr[i], DEFAULT_EXTRA_SZ, "%s",str);
st++;
@@ -481,9 +481,12 @@ int config_libconfig_get(configmodule_interface_t *cfg, paramdef_t *cfgoptions,
}
} /* for loop on options */
printf("[LIBCONFIG] %s: %i/%i parameters successfully set, (%i to default value)\n",
((prefix == NULL)?"(root)":prefix),
status,numoptions,numdefvals );
printf_params(cfg,
"[LIBCONFIG] %s: %i/%i parameters successfully set, (%i to default value)\n",
prefix == NULL ? "(root)" : prefix,
status,
numoptions,
numdefvals);
if (fatalerror == 1) {
fprintf(stderr,"[LIBCONFIG] fatal errors found when processing %s \n", libconfig_privdata.configfile );
@@ -517,8 +520,7 @@ int config_libconfig_getlist(configmodule_interface_t *cfg,
status = ParamList->numelt = config_setting_length(setting);
printf_params(cfg, "[LIBCONFIG] %i %s in config file %s \n", ParamList->numelt, listpath, libconfig_privdata.configfile);
} else {
printf("[LIBCONFIG] list %s not found in config file %s \n",
listpath,libconfig_privdata.configfile );
printf_params(cfg, "[LIBCONFIG] list %s not found in config file %s \n", listpath, libconfig_privdata.configfile);
ParamList->numelt= 0;
status = -1;
}
@@ -574,8 +576,10 @@ int config_libconfig_init(configmodule_interface_t *cfg)
config_set_auto_convert (&(libconfig_privdata.cfg), CONFIG_TRUE);
/* Read the file. If there is an error, report it and exit. */
if( config_read_file(&(libconfig_privdata.cfg), libconfig_privdata.configfile) == CONFIG_FALSE) {
fprintf(stderr,"[LIBCONFIG] %s %d file %s - line %d: %s\n",__FILE__, __LINE__,
libconfig_privdata.configfile, config_error_line(&(libconfig_privdata.cfg)),
fprintf(stderr,
"[LIBCONFIG] file %s - line %d: %s\n",
libconfig_privdata.configfile,
config_error_line(&(libconfig_privdata.cfg)),
config_error_text(&(libconfig_privdata.cfg)));
config_destroy(&(libconfig_privdata.cfg));
printf( "\n");

View File

@@ -10,3 +10,9 @@ if(ENABLE_WEBSRV)
endif()
add_subdirectory(T)
add_subdirectory(nr)
add_subdirectory(LOG)
add_subdirectory(threadPool)
add_library(utils utils.c system.c time_meas.c time_stat.c)
target_include_directories(utils PUBLIC .)
target_link_libraries(utils PRIVATE ${T_LIB})

View File

@@ -0,0 +1,10 @@
set(log_sources log.c)
if (ENABLE_LTTNG)
set(log_sources ${log_sources} lttng-tp.c)
endif()
add_library(LOG ${log_sources})
target_include_directories(LOG PUBLIC .)
target_link_libraries(LOG PRIVATE ${T_LIB})
if (ENABLE_LTTNG)
target_link_libraries(LOG PUBLIC lttng-ust)
endif()

View File

@@ -15,5 +15,6 @@ By default, this facility is included at build-time and activated at run-time. T
* [runtime usage](rtusage.md)
* [developer usage](devusage.md)
* [module architecture](arch.md)
* [lttng usage](lttng_logs.md)
[oai Wikis home](https://gitlab.eurecom.fr/oai/openairinterface5g/wikis/home)

View File

@@ -0,0 +1,153 @@
# OAI gNB LTTng Tracing Setup Guide
## Overview
This guide will walk you through setting up tracing for an OpenAirInterface (OAI) gNB (gNodeB) using LTTng (Linux Trace Toolkit Next Generation) and Babeltrace.
### What is LTTng and Why Use It?
LTTng, or Linux Trace Toolkit Next Generation, is a powerful logging framework designed for Linux systems. It provides low-overhead tracing capabilities, allowing developers to monitor and analyze system behavior in real-time without significant performance impact. LTTng offers several advantages:
- **Low Overhead**: LTTng introduces minimal overhead to the system, making it suitable for use in production environments without affecting system performance.
- **Customizable**: LTTng allows users to define custom tracepoints in their applications, providing fine-grained control over what events to trace and collect.
- **Scalability**: It can scale to large distributed systems, making it suitable for tracing complex software stacks across multiple nodes.
## Prerequisites
- Ubuntu system
Note: only LTTng 2.3.8 is supported.
## Building OAI gNB
1. **Clean and Build OAI gNB with LTTng:**
1.1 Install Dependencies
```bash
./build_oai --ninja -I --clean --enable-LTTNG
```
1.2 Build gNB and nrUE
```
./build_oai --ninja --gNB --nrUE -w SIMU --enable-LTTNG
```
## Setting up LTTng
1. **Start LTTng Session and Relay:**
```bash
sudo lttng-sessiond -d
sudo lttng-relayd -d
```
2. **Create Live LTTng Session:**
```bash
sudo lttng create my-session --live --set-url=net://127.0.0.1
```
3. **Enable gNB Trace Events:**
```bash
sudo lttng enable-event --userspace OAI:gNB
```
4. **Start LTTng Tracing:**
```bash
sudo lttng start
```
## Running the gNB
1. **Run gNB:**
```bash
./$binary_path -O $configuration_file PARALLEL_SINGLE_THREAD --rfsimulator.serveraddr server --rfsim --sa -E
```
## Verifying Tracepoints
1. **List Active Tracepoints:**
```bash
sudo lttng list -u
```
*Possible Output:*
```
UST events:
-------------
PID: 1154722 - Name: /home/firecell/Desktop/FirecellRepos/firecellrd-oai5g-ran/cmake_targets/ran_build/build/nr-softmodem
OAI:gNB (loglevel: TRACE_DEBUG_FUNCTION (12)) (type: tracepoint)
```
## Analyzing Traces
1. **Install Babeltrace:**
```bash
sudo apt-get install babeltrace
```
2. **Capture Trace Logs Live:**
- To learn the full path of the trace session:
```bash
babeltrace --input-format=lttng-live net://localhost
```
- Trace logs using the full path:
```bash
babeltrace --input-format=lttng-live net://localhost/host/firecell-XPS-15-9530/my-session
```
*Possible Output:*
```
[19:35:32.181608002] (+2.664882127) firecell-XPS-15-9530 OAI:gNB: { cpu_id = 10 }, { MODNAME = "OAI-NR_MAC info", EVENTID = -1, SFN = -1, SLOT = -1, FUNCTION = "gNB_dlsch_ulsch_scheduler", LINE = 246, MSG = "Frame.Slot 0.0\n" }
```
3. **Capture Trace Logs Offline:**
- Create an offline trace session with a specified output directory:
```bash
sudo lttng create offline_session --output=/home/trace_offline/
```
- Enable gNB trace events:
```bash
sudo lttng enable-event --userspace OAI:gNB
```
- Start capturing trace logs:
```bash
sudo lttng start
```
- Stop the trace capture:
```bash
sudo lttng stop
```
- Destroy the trace session:
```bash
sudo lttng destroy
```
- Use Babeltrace to analyze the captured trace logs:
```bash
sudo babeltrace /home/trace_offline/
```

View File

@@ -603,6 +603,25 @@ void logRecord_mt(const char *file,
log_output_memory(c, file,func,line,comp,level,format,args);
va_end(args);
}
#if ENABLE_LTTNG
void logRecord_lttng(const char *file, const char *func, int line, int comp, int level, const char *format, ...)
{
log_component_t *c = &g_log->log_component[comp];
char header[48];
char buf[MAX_LOG_TOTAL];
va_list args;
va_start(args, format);
vsnprintf(buf, sizeof(buf) - 1, format, args);
va_end(args);
if (map_int_to_str(log_level_names, level) != NULL)
snprintf(header, sizeof(header), "OAI-%s %s", c->name, map_int_to_str(log_level_names, level));
else
snprintf(header, sizeof(header), "OAI-%s", c->name);
LOG_FC(header, func, line, buf);
}
#endif
void vlogRecord_mt(const char *file,
const char *func,

View File

@@ -28,7 +28,7 @@
*/
#ifndef __LOG_H__
# define __LOG_H__
#define __LOG_H__
/*--- INCLUDES ---------------------------------------------------------------*/
#include <unistd.h>
@@ -52,6 +52,9 @@
#endif
#include <pthread.h>
#include <common/utils/utils.h>
#if ENABLE_LTTNG
#include "lttng-log.h"
#endif
/*----------------------------------------------------------------------------*/
#include <assert.h>
#ifdef NDEBUG
@@ -234,6 +237,10 @@ void logTerm (void);
int isLogInitDone (void);
void logRecord_mt(const char *file, const char *func, int line,int comp, int level, const char *format, ...) __attribute__ ((format (printf, 6, 7)));
void vlogRecord_mt(const char *file, const char *func, int line, int comp, int level, const char *format, va_list args );
#if ENABLE_LTTNG
void logRecord_lttng(const char *file, const char *func, int line, int comp, int level, const char *format, ...)
__attribute__((format(printf, 6, 7)));
#endif
void log_dump(int component, void *buffer, int buffsize,int datatype, const char *format, ... );
int set_log(int component, int level);
void set_glog(int level);
@@ -425,9 +432,50 @@ int32_t write_file_matlab(const char *fname, const char *vname, void *data, int
/* define variable only used in LOG macro's */
#define LOG_VAR(A, B) A B
#else /* no T_TRACER */
#else /* T_TRACER */
#if ENABLE_LTTNG
#define LOG_E(c, x...) \
do { \
if (g_log->log_component[c].level >= OAILOG_ERR) { \
logRecord_lttng(__FILE__, __FUNCTION__, __LINE__, c, OAILOG_ERR, x); \
} \
} while (0)
#define LOG_W(c, x...) \
do { \
if (g_log->log_component[c].level >= OAILOG_WARNING) { \
logRecord_lttng(__FILE__, __FUNCTION__, __LINE__, c, OAILOG_WARNING, x); \
} \
} while (0)
#define LOG_A(c, x...) \
do { \
if (g_log->log_component[c].level >= OAILOG_ANALYSIS) { \
logRecord_lttng(__FILE__, __FUNCTION__, __LINE__, c, OAILOG_ANALYSIS, x); \
} \
} while (0)
#define LOG_I(c, x...) \
do { \
if (g_log->log_component[c].level >= OAILOG_INFO) { \
logRecord_lttng(__FILE__, __FUNCTION__, __LINE__, c, OAILOG_INFO, x); \
} \
} while (0)
#define LOG_D(c, x...) \
do { \
if (g_log->log_component[c].level >= OAILOG_DEBUG) { \
logRecord_lttng(__FILE__, __FUNCTION__, __LINE__, c, OAILOG_DEBUG, x); \
} \
} while (0)
#define LOG_T(c, x...) \
do { \
if (g_log->log_component[c].level >= OAILOG_TRACE) { \
logRecord_lttng(__FILE__, __FUNCTION__, __LINE__, c, OAILOG_TRACE, x); \
} \
} while (0)
#define LOG_DDUMP(c, b, s, f, x...) \
do { \
if (g_log->log_component[c].level >= OAILOG_DEBUG) \
log_dump(c, b, s, f, x); \
} while (0)
#else
#define LOG_E(c, x...) \
do { \
if (g_log->log_component[c].level >= OAILOG_ERR) \
@@ -469,6 +517,7 @@ int32_t write_file_matlab(const char *fname, const char *vname, void *data, int
if (g_log->log_component[c].level >= OAILOG_TRACE) \
logRecord_mt(__FILE__, __FUNCTION__, __LINE__, c, OAILOG_TRACE, x); \
} while (0)
#endif
#define VLOG(c, l, f, args) \
do { \
@@ -477,8 +526,8 @@ int32_t write_file_matlab(const char *fname, const char *vname, void *data, int
} while (0)
#define nfapi_log(FILE, FNC, LN, COMP, LVL, FMT...)
#define LOG_DEBUGFLAG(D) (g_log->dump_mask & D)
#define LOG_DUMPFLAG(D) (g_log->debug_mask & D)
#define LOG_DEBUGFLAG(D) (g_log->debug_mask & D)
#define LOG_DUMPFLAG(D) (g_log->dump_mask & D)
#define LOG_DUMPMSG(c, f, b, s, x...) \
do { \
if (g_log->dump_mask & f) \

View File

@@ -19,28 +19,26 @@
* contact@openairinterface.org
*/
/*! \file socket.h
* \brief
* \author Lionel Gauthier
* \date 2011
* \version 1.0
* \company Eurecom
* \email: lionel.gauthier@eurecom.fr
/*! \file lttng-log.h
* \brief LTTng Log interface
* \author Anurag Asokan
* \date 2024
* \version 0.5
* @ingroup util
*/
#ifndef __SIMULATION_ETH_TRANSPORT_SOCKET__H__
#define __SIMULATION_ETH_TRANSPORT_SOCKET__H__
#ifndef __LTTNG_LOG_H__
#define __LTTNG_LOG_H__
#if ENABLE_LTTNG
#include "lttng-tp.h"
# ifdef SOCKET_C
# define private_socket(x) x
# define public_socket(x) x
# else
# define private_socket(x)
# define public_socket(x) extern x
# endif
# include "stdint.h"
public_socket (void socket_setnonblocking (int sockP);
)
public_socket (int make_socket_inet (int typeP, uint16_t * portP, struct sockaddr_in *ptr_addressP);
)
#define LOG_FC(component, func, line, log) \
do { \
tracepoint(OAI, gNB, component, -1, -1, -1, func, line, log); \
} while (0)
#else
#define LOG_FC(component, func, line, log)
#endif
#endif /** __LTTNG_LOG_H__ */

View File

@@ -19,10 +19,16 @@
* contact@openairinterface.org
*/
#ifndef UE_IP_SAP_H
#define UE_IP_SAP_H
typedef unsigned short OaiNwDrvRadioBearerId_t;
/*! \file lttng-tp.c
* \brief Lttng trace implementaion
* \author Anurag Asokan
* \date 2024
* \version 0.5
* @ingroup util
#define UE_IP_PRIMITIVE_MAX_LENGTH 180 // maximum length of a NAS primitive
*/
//This file is used to define the tracepoints for the lttng tracing.In order to to do linkage with the lttng-tp.h file, we need to define the tracepoints here.
#define TRACEPOINT_CREATE_PROBES
#define TRACEPOINT_DEFINE
#endif
#include "lttng-tp.h"

View File

@@ -19,41 +19,36 @@
* contact@openairinterface.org
*/
#include "common/openairinterface5g_limits.h"
#ifndef _UE_IP_CST
#define _UE_IP_CST
/*! \file lttng-tp.h
* \brief Lttng tracer implementaion
* \author Anurag Asokan
* \date 2024
* \version 0.5
* @ingroup util
#define UE_IP_MAX_LENGTH 180
*/
// General Constants
#define UE_IP_MTU 1500
#define UE_IP_TX_QUEUE_LEN 100
#define UE_IP_ADDR_LEN 8
#define UE_IP_INET6_ADDRSTRLEN 46
#define UE_IP_INET_ADDRSTRLEN 16
#define UE_IP_DEFAULT_RAB_ID 1
#ifndef _LTTNG_TP_H
#define _LTTNG_TP_H
#define UE_IP_RESET_RX_FLAGS 0
#undef TRACEPOINT_PROVIDER
#define TRACEPOINT_PROVIDER OAI
#undef TRACEPOINT_INCLUDE
#define TRACEPOINT_INCLUDE "./common/utils/LOG/lttng-tp.h"
#define UE_IP_RETRY_LIMIT_DEFAULT (int)5
#include <stdbool.h>
#include <lttng/tracepoint.h>
#define UE_IP_MESSAGE_MAXLEN (int)5004
TRACEPOINT_EVENT(
OAI,
gNB,
TP_ARGS(const char*, log_modName, int, event_id, int, sfn, int, slot, const char*, funcName, int, lineNo, const char*, msg),
TP_FIELDS(ctf_string(MODNAME, log_modName) ctf_integer(int32_t, EVENTID, event_id) ctf_integer(int32_t, SFN, sfn)
ctf_integer(int32_t, SLOT, slot) ctf_string(FUNCTION, funcName) ctf_integer(int32_t, LINE, lineNo)
ctf_string(MSG, msg)))
TRACEPOINT_LOGLEVEL(OAI, gNB, TRACE_DEBUG_FUNCTION)
#define UE_IP_TIMER_ESTABLISHMENT_DEFAULT (int)12
#define UE_IP_TIMER_RELEASE_DEFAULT (int)2
#define UE_IP_TIMER_IDLE UINT_MAX
#define UE_IP_TIMER_TICK HZ
#define UE_IP_PDCPH_SIZE (int)sizeof(struct pdcp_data_req_header_s)
#define UE_IP_IPV4_SIZE (int)20
#define UE_IP_IPV6_SIZE (int)40
#define UE_IP_NB_INSTANCES_MAX NUMBER_OF_UE_MAX /*MAX_MOBILES_PER_ENB*/
#endif
#endif /* _LTTNG_TP_H */
#include <lttng/tracepoint-event.h>

View File

@@ -99,46 +99,52 @@ Use a recent version of wireshark. The steps below were done using
version 3.3.2. Maybe some options are different for your version
of wireshark. Adapt as necessary.
First, do the previous steps for LTE.
1) First, do the previous steps for LTE.
2) Then, in the menu, choose `Edit->Preferences`.
3) In the preference window, unroll `Protocols` and configure the following:
Then, in the menu, choose `Edit->Preferences`.
**MAC**
In the preference window, unroll `Protocols`.
Go to `MAC-NR`. Select:
Go to `MAC-NR`. Select both options (`Attempt to decode BCCH, PCCH and CCCH data using NR RRC dissector`
and `Attempt to dissect LCID 1-3 as srb1-3`).
* `Attempt to decode BCCH, PCCH and CCCH data using NR RRC dissector`
* `Attempt to dissect LCID 1-3 as srb1-3`
For `Source of LCID -> drb channel settings` choose option `From static table`.
Then click the `Edit...` button of `LCID -> DRB Mappings Table`.
In the new window, click on `+`. Choose LCID `4`, DRBID `1`, UL RLC Bearer
For `Source of LCID -> drb channel settings`:
* choose option `From static table`.
* click the `Edit...` button of `LCID -> DRB Mappings Table`.
* In the new window, click on `+`. Choose LCID `4`, DRBID `1`, UL RLC Bearer
Type `AM, SN Len=18`, same thing for DL RLC Bearer Type.
* Click OK.
Then click OK.
**RLC**
Now, go to `RLC-NR`. Select `Call PDCP dissector for SRB PDUs`.
Now, go to `RLC-NR`. Select:
For `Call PDCP dissector for UL DRB PDUs` choose `18-bit SN`. Same
for DL.
Select `Call RRC dissector for CCCH PDUs`.
* `Call PDCP dissector for SRB PDUs`.
* `Call PDCP dissector for UL DRB PDUs` choose `18-bit SN`. Same for DL.
* `Call RRC dissector for CCCH PDUs`.
* `Try to reassemble AM frames`.
You don't need to select `May see RLC headers only` and
`Try to reassemble UM frames`.
Now, go to `PDCP-NR`. Select what you want in there. It's good
to select `Show uncompressed User-Plane data as IP`. Also good
to select `Show unciphered Signalling-Plane data as RRC`.
For `Do sequence number analysis` it can be good to use
`Only-RLC-frames` but anything will do. We don't use ROHC so you
don't need to select `Attempt to decode ROHC data`. And the
layer info to show depends on what you want to analyse.
`Traffic Info` is a good choice.
**PDCP**
Now, go to `PDCP-NR`. Select what you need in there.
It's good to select:
* `Show uncompressed User-Plane data as IP`
* `Show unciphered Signalling-Plane data as RRC`.
* `Only-RLC-frames` in `Do sequence number analysis`, but anything will do.
* `Traffic Info` as layer info to show, depending on what you want to analyse.
We don't use ROHC so you don't need to select `Attempt to decode ROHC data`.
You are done with the preferences. You can click OK.
Then, in the menu `Analyze`, choose `Enabled Protocols...`. In the new window
search for `nr` and select `mac_nr_udp` to have `MAC-NR over UDP`.
4) Then, in the menu `Analyze`, choose `Enabled Protocols...`.
5) In the new window search for `nr` and select `mac_nr_udp` to have `MAC-NR over UDP`.
And that's it. Maybe other settings can be changed, but those steps should be
enough for a start.

View File

@@ -4,6 +4,11 @@ ID = ENB_MASTER_TICK
GROUP = ALL:GENERAL:ENB
FORMAT = int,eNB_ID : int,frame : int,subframe
ID = USRP_RX_ANT0
DESC = RX IQ data as received by USRP driver on antenna 0
GROUP = ALL:HEAVY
FORMAT = int,timestap : buffer,data
#PHY logs
ID = ENB_PHY_UL_TICK
DESC = eNodeB uplink tick - one tick per ms at start of uplink processing

View File

@@ -40,7 +40,7 @@ elm_arr_t find_if_arr_it(seq_arr_t* arr, void* start_it, void* end_it, void* val
return (elm_arr_t){.found = false, .it = NULL};
}
elm_arr_t find_if_arr(seq_arr_t* arr, void* value, bool (*f)(const void*, const void*))
elm_arr_t find_if(seq_arr_t* arr, void* value, bool (*f)(const void*, const void*))
{
assert(arr != NULL);
void* start_it = seq_arr_front(arr);

View File

@@ -42,7 +42,7 @@ typedef struct {
* @param f Function representing the predicate
* @return Whether the predicate was fullfilled and the iterator to the element if true
*/
elm_arr_t find_if_arr(seq_arr_t* arr, void* value, bool (*f)(const void* value, const void* it));
elm_arr_t find_if(seq_arr_t* arr, void* value, bool (*f)(const void* value, const void* it));
/**
* @brief Find elements in an array in the semi-open range [start_it, end_it)

View File

@@ -52,7 +52,7 @@ int main()
// Find element in the array
int value = 50;
elm_arr_t elm = find_if_arr(&arr, &value, eq_int);
elm_arr_t elm = find_if(&arr, &value, eq_int);
assert(elm.found == true);
// Check
assert(*(int*)elm.it == 50);

View File

@@ -0,0 +1,6 @@
add_library(nr_common nr_common.c)
target_include_directories(nr_common PUBLIC .)
target_link_libraries(nr_common PRIVATE UTIL)
if (ENABLE_TESTS)
add_subdirectory(tests)
endif()

View File

@@ -182,6 +182,123 @@ const nr_bandentry_t nr_bandtable[] = {
{261,27500040,28350000,27500040,28350000, 2,2070833, 120}
};
// synchronization raster per band tables (Rel.15)
// (38.101-1 Table 5.4.3.3-1 and 38.101-2 Table 5.4.3.3-1)
// band nb, sub-carrier spacing index, Range of gscn (First, Step size, Last)
// clang-format off
const sync_raster_t sync_raster[] = {
{1, 0, 5279, 1, 5419},
{2, 0, 4829, 1, 4969},
{3, 0, 4517, 1, 4693},
{5, 0, 2177, 1, 2230},
{5, 1, 2183, 1, 2224},
{7, 0, 6554, 1, 6718},
{8, 0, 2318, 1, 2395},
{12, 0, 1828, 1, 1858},
{13, 0, 1871, 1, 1885},
{14, 0, 1901, 1, 1915},
{18, 0, 2156, 1, 2182},
{20, 0, 1982, 1, 2047},
{24, 0, 3818, 1, 3892},
{24, 1, 3824, 1, 3886},
{25, 0, 4829, 1, 4981},
{26, 0, 2153, 1, 2230},
{28, 0, 1901, 1, 2002},
{29, 0, 1798, 1, 1813},
{30, 0, 5879, 1, 5893},
{34, 0, 5030, 1, 5056},
{34, 1, 5036, 1, 5050},
{38, 0, 6431, 1, 6544},
{38, 1, 6437, 1, 6538},
{39, 0, 4706, 1, 4795},
{39, 1, 4712, 1, 4789},
{40, 1, 5762, 1, 5989},
{41, 0, 6246, 3, 6717},
{41, 1, 6252, 3, 6714},
{48, 1, 7884, 1, 7982},
{50, 0, 3584, 1, 3787},
{51, 0, 3572, 1, 3574},
{53, 0, 6215, 1, 6232},
{53, 1, 6221, 1, 6226},
{65, 0, 5279, 1, 5494},
{66, 0, 5279, 1, 5494},
{66, 1, 5285, 1, 5488},
{67, 0, 1850, 1, 1888},
{70, 0, 4993, 1, 5044},
{71, 0, 1547, 1, 1624},
{74, 0, 3692, 1, 3790},
{75, 0, 3584, 1, 3787},
{76, 0, 3572, 1, 3574},
{77, 1, 7711, 1, 8329},
{78, 1, 7711, 1, 8051},
{79, 1, 8480, 16, 8880},
{85, 0, 1826, 1, 1858},
{90, 1, 6252, 1, 6714},
{91, 0, 3572, 1, 3574},
{92, 0, 3584, 1, 3787},
{93, 0, 3572, 1, 3574},
{94, 0, 3584, 1, 3587},
{257, 3, 22388, 1, 22558},
{257, 4, 22390, 2, 22556},
{258, 3, 22257, 1, 22443},
{258, 4, 22258, 2, 22442},
{260, 3, 22995, 1, 23166},
{260, 4, 22996, 2, 23164},
{261, 3, 22446, 1, 22492},
{261, 4, 22446, 2, 22490},
};
// clang-format on
// Section 5.4.3 of 38.101-1 and -2
void check_ssb_raster(uint64_t freq, int band, int scs)
{
int start_gscn = 0, step_gscn = 0, end_gscn = 0;
for (int i = 0; i < sizeof(sync_raster) / sizeof(sync_raster_t); i++) {
if (sync_raster[i].band == band && sync_raster[i].scs_index == scs) {
start_gscn = sync_raster[i].first_gscn;
step_gscn = sync_raster[i].step_gscn;
end_gscn = sync_raster[i].last_gscn;
break;
}
}
AssertFatal(start_gscn != 0, "Couldn't find band %d with SCS %d\n", band, scs);
int gscn;
if (freq < 3000000000) {
int N = 0;
int M = 0;
for (int k = 0; k < 3; k++) {
M = (k << 1) + 1;
if ((freq - M * 50000) % 1200000 == 0) {
N = (freq - M * 50000) / 1200000;
break;
}
}
AssertFatal(N != 0, "SSB frequency %lu Hz not on the synchronization raster (N * 1200kHz + M * 50 kHz)\n", freq);
gscn = (3 * N) + (M - 3) / 2;
} else if (freq < 24250000000) {
AssertFatal((freq - 3000000000) % 1440000 == 0,
"SSB frequency %lu Hz not on the synchronization raster (3000 MHz + N * 1.44 MHz)\n",
freq);
gscn = ((freq - 3000000000) / 1440000) + 7499;
} else {
AssertFatal((freq - 24250080000) % 17280000 == 0,
"SSB frequency %lu Hz not on the synchronization raster (24250.08 MHz + N * 17.28 MHz)\n",
freq);
gscn = ((freq - 24250080000) / 17280000) + 22256;
}
AssertFatal(gscn >= start_gscn && gscn <= end_gscn,
"GSCN %d corresponding to SSB frequency %lu does not belong to GSCN range for band %d\n",
gscn,
freq,
band);
int rel_gscn = gscn - start_gscn;
AssertFatal(rel_gscn % step_gscn == 0,
"GSCN %d corresponding to SSB frequency %lu not in accordance with GSCN step for band %d\n",
gscn,
freq,
band);
}
int get_supported_bw_mhz(frequency_range_t frequency_range, int scs, int nb_rb)
{
int bw_index = get_supported_band_index(scs, frequency_range, nb_rb);
@@ -239,8 +356,8 @@ bool compare_relative_ul_channel_bw(int nr_band, int scs, int nb_ul, frame_type_
int band_size_khz = get_supported_bw_mhz(nr_band > 256 ? FR2 : FR1, scs, nb_ul) * 1000;
float limit = frame_type == TDD ? 0.04 : 0.03;
float rel_bw = (float) (2 * band_size_khz) / (float) (nr_bandtable[index].ul_max + nr_bandtable[index].ul_min);
return rel_bw <= limit;
float rel_bw = (float) (band_size_khz) / (float) (nr_bandtable[index].ul_max - nr_bandtable[index].ul_min);
return rel_bw > limit;
}
uint16_t get_band(uint64_t downlink_frequency, int32_t delta_duplex)
@@ -272,7 +389,10 @@ uint16_t get_band(uint64_t downlink_frequency, int32_t delta_duplex)
printf("DL frequency %"PRIu64": band %d, UL frequency %"PRIu64"\n",
downlink_frequency, current_band, downlink_frequency+delta_duplex);
AssertFatal(current_band != 0, "Can't find EUTRA band for frequency %"PRIu64" and duplex_spacing %u\n", downlink_frequency, delta_duplex);
AssertFatal(current_band != 0,
"Can't find EUTRA band for frequency %" PRIu64 " and duplex_spacing %d\n",
downlink_frequency,
delta_duplex);
return current_band;
}
@@ -524,16 +644,9 @@ int get_dmrs_port(int nl, uint16_t dmrs_ports)
frame_type_t get_frame_type(uint16_t current_band, uint8_t scs_index)
{
frame_type_t current_type;
int32_t delta_duplex = get_delta_duplex(current_band, scs_index);
if (delta_duplex == 0)
current_type = TDD;
else
current_type = FDD;
LOG_I(NR_MAC, "NR band %d, duplex mode %s, duplex spacing = %d KHz\n", current_band, duplex_mode[current_type], delta_duplex);
frame_type_t current_type = delta_duplex == 0 ? TDD : FDD;
LOG_D(NR_MAC, "NR band %d, duplex mode %s, duplex spacing = %d KHz\n", current_band, duplex_mode[current_type], delta_duplex);
return current_type;
}
@@ -544,7 +657,7 @@ int32_t get_delta_duplex(int nr_bandP, uint8_t scs_index)
int32_t delta_duplex = (nr_bandtable[nr_table_idx].ul_min - nr_bandtable[nr_table_idx].dl_min);
LOG_I(NR_MAC, "NR band duplex spacing is %d KHz (nr_bandtable[%d].band = %d)\n", delta_duplex, nr_table_idx, nr_bandtable[nr_table_idx].band);
LOG_D(NR_MAC, "NR band duplex spacing is %d KHz (nr_bandtable[%d].band = %d)\n", delta_duplex, nr_table_idx, nr_bandtable[nr_table_idx].band);
return delta_duplex;
}
@@ -910,6 +1023,132 @@ uint32_t get_ssb_offset_to_pointA(uint32_t absoluteFrequencySSB,
return ssb_offset_point_a;
}
static double get_start_freq(const double fc, const int nbRB, const int mu)
{
const int scs = MU_SCS(mu) * 1000;
return fc - ((double)nbRB / 2 * NR_NB_SC_PER_RB * scs);
}
static double get_stop_freq(const double fc, const int nbRB, const int mu)
{
int scs = MU_SCS(mu) * 1000;
return fc + ((double)nbRB / 2 * NR_NB_SC_PER_RB * scs);
}
static void compute_M_and_N(const int gscn, int *rM, int *rN)
{
if (gscn > 1 && gscn < 7499) {
for (int M = 1; M < 6; M += 2) {
/* GSCN = 3N + (M-3) / 2
N(int) = 2 * GSCN + 3 - M
*/
if (((2 * gscn + 3 - M) % 6) == 0) {
*rM = M;
*rN = (2 * gscn + 3 - M) / 6;
break;
}
}
} else if (gscn > 7498 && gscn < 22256) {
*rN = gscn - 7499;
} else if (gscn > 22255 && gscn < 26638) {
*rN = gscn - 22256;
} else {
LOG_E(NR_PHY, "Invalid GSCN\n");
abort();
}
}
// Section 5.4.3 of 38.101-1 and -2
static double get_ssref_from_gscn(const int gscn)
{
int M, N = -1;
compute_M_and_N(gscn, &M, &N);
if (gscn > 1 && gscn < 7499) { // Sub 3GHz
AssertFatal(N > 0 && N < 2500, "Invalid N\n");
AssertFatal(M > 0 && M < 6 && (M & 0x1), "Invalid M\n");
return (N * 1200e3 + M * 50e3);
} else if (gscn > 7498 && gscn < 22256) {
AssertFatal(N > -1 && N < 14757, "Invalid N\n");
return (3000e6 + N * 1.44e6);
} else if (gscn > 22255 && gscn < 26638) {
AssertFatal(N > -1 && N < 4382, "Invalid N\n");
return (24250.08e6 + N * 17.28e6);
} else {
LOG_E(NR_PHY, "Invalid GSCN\n");
abort();
}
}
static void find_gscn_to_scan(const double startFreq,
const double stopFreq,
const sync_raster_t gscn,
int *scanGscnStart,
int *scanGscnStop)
{
const double scs = MU_SCS(gscn.scs_index) * 1e3;
const double ssbBW = 20 * NR_NB_SC_PER_RB * scs;
for (int g = gscn.first_gscn; g < gscn.last_gscn; g += gscn.step_gscn) {
const double centerSSBFreq = get_ssref_from_gscn(g);
const double startSSBFreq = centerSSBFreq - ssbBW / 2;
if (startSSBFreq < startFreq)
continue;
*scanGscnStart = g;
break;
}
*scanGscnStop = *scanGscnStart;
for (int g = gscn.last_gscn; g > gscn.first_gscn; g -= gscn.step_gscn) {
const double centerSSBFreq = get_ssref_from_gscn(g);
const double stopSSBFreq = centerSSBFreq + ssbBW / 2 - 1;
if (stopSSBFreq > stopFreq)
continue;
*scanGscnStop = g;
break;
}
}
static int get_ssb_first_sc(const double pointA, const double ssbCenter, const int mu)
{
const double scs = MU_SCS(mu) * 1e3;
const int ssbRBs = 20;
return (int)((ssbCenter - pointA) / scs - (ssbRBs / 2 * NR_NB_SC_PER_RB));
}
/* Returns array of first SCS offset in the scanning window */
int get_scan_ssb_first_sc(const double fc, const int nbRB, const int nrBand, const int mu, nr_gscn_info_t ssbInfo[MAX_GSCN_BAND])
{
const double startFreq = get_start_freq(fc, nbRB, mu);
const double stopFreq = get_stop_freq(fc, nbRB, mu);
int scanGscnStart = 0;
int scanGscnStop = 0;
const sync_raster_t *tmpRaster = sync_raster;
const sync_raster_t * end=sync_raster + sizeofArray(sync_raster);
while (tmpRaster < end && (tmpRaster->band != nrBand || tmpRaster->scs_index != mu))
tmpRaster++;
if (tmpRaster >= end) {
LOG_E(PHY, "raster not found nrband=%d, mu=%d\n", nrBand, mu);
return 0;
}
find_gscn_to_scan(startFreq, stopFreq, *tmpRaster, &scanGscnStart, &scanGscnStop);
const double scs = MU_SCS(mu) * 1e3;
const double pointA = fc - ((double)nbRB / 2 * scs * NR_NB_SC_PER_RB);
int numGscn = 0;
for (int g = scanGscnStart; (g <= scanGscnStop) && (numGscn < MAX_GSCN_BAND); g += tmpRaster->step_gscn) {
ssbInfo[numGscn].ssRef = get_ssref_from_gscn(g);
ssbInfo[numGscn].ssbFirstSC = get_ssb_first_sc(pointA, ssbInfo[numGscn].ssRef, mu);
ssbInfo[numGscn].gscn = g;
numGscn++;
}
return numGscn;
}
int get_delay_idx(int delay, int max_delay_comp)
{
int delay_idx = max_delay_comp + delay;
@@ -934,38 +1173,6 @@ void init_delay_table(uint16_t ofdm_symbol_size,
}
}
void freq2time(uint16_t ofdm_symbol_size,
int16_t *freq_signal,
int16_t *time_signal)
{
const idft_size_idx_t idft_size = get_idft(ofdm_symbol_size);
idft(idft_size, freq_signal, time_signal, 1);
}
void nr_est_delay(int ofdm_symbol_size, const c16_t *ls_est, c16_t *ch_estimates_time, delay_t *delay)
{
freq2time(ofdm_symbol_size, (int16_t *)ls_est, (int16_t *)ch_estimates_time);
int max_pos = delay->delay_max_pos;
int max_val = delay->delay_max_val;
const int sync_pos = 0;
for (int i = 0; i < ofdm_symbol_size; i++) {
int temp = c16amp2(ch_estimates_time[i]) >> 1;
if (temp > max_val) {
max_pos = i;
max_val = temp;
}
}
if (max_pos > ofdm_symbol_size / 2)
max_pos = max_pos - ofdm_symbol_size;
delay->delay_max_pos = max_pos;
delay->delay_max_val = max_val;
delay->est_delay = max_pos - sync_pos;
}
void nr_timer_start(NR_timer_t *timer)
{
timer->active = true;

View File

@@ -77,8 +77,17 @@ static inline const char *rnti_types(nr_rnti_type_t rr)
}
#undef R
#define MU_SCS(m) (15 << m)
#define MAX_GSCN_BAND 620 // n78 has the highest GSCN range of 619
#define NR_MAX_NB_LAYERS 4 // 8
// Since the IQ samples are represented by SQ15 R+I (see https://en.wikipedia.org/wiki/Q_(number_format)) we need to compensate when
// calcualting signal energy. Instead of shifting each sample right by 15, we can normalize the result in dB scale once its
// calcualted. Signal energy is calculated using RMS^2, where each sample is squared before taking the average of the sum, therefore
// the total shift is 2 * 15, in dB scale thats 10log10(2^(15*2))
#define SQ15_SQUARED_NORM_FACTOR_DB 90.3089986992
typedef struct nr_bandentry_s {
int16_t band;
uint64_t ul_min;
@@ -98,6 +107,12 @@ typedef struct {
int last_gscn;
} sync_raster_t;
typedef struct {
int gscn;
double ssRef;
int ssbFirstSC;
} nr_gscn_info_t;
typedef enum frequency_range_e {
FR1 = 0,
FR2
@@ -226,11 +241,13 @@ uint32_t get_ssb_offset_to_pointA(uint32_t absoluteFrequencySSB,
int get_ssb_subcarrier_offset(uint32_t absoluteFrequencySSB, uint32_t absoluteFrequencyPointA, int scs);
int get_delay_idx(int delay, int max_delay_comp);
void freq2time(uint16_t ofdm_symbol_size,
int16_t *freq_signal,
int16_t *time_signal);
int get_scan_ssb_first_sc(const double fc,
const int nbRB,
const int nrBand,
const int mu,
nr_gscn_info_t ssbStartSC[MAX_GSCN_BAND]);
void nr_est_delay(int ofdm_symbol_size, const c16_t *ls_est, c16_t *ch_estimates_time, delay_t *delay);
void check_ssb_raster(uint64_t freq, int band, int scs);
#define CEILIDIV(a,b) ((a+b-1)/b)
#define ROUNDIDIV(a,b) (((a<<1)+b)/(b<<1))

View File

@@ -0,0 +1,5 @@
add_executable(test_nr_common test_nr_common.cpp)
target_link_libraries(test_nr_common PRIVATE nr_common GTest::gtest minimal_lib)
add_dependencies(tests test_nr_common)
add_test(NAME test_nr_common
COMMAND ./test_nr_common)

View File

@@ -0,0 +1,47 @@
/*
* 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
*/
#include <gtest/gtest.h>
extern "C" {
#include "nr_common.h"
#include "common/utils/LOG/log.h"
}
TEST(nr_common, nr_timer) {
NR_timer_t timer;
nr_timer_setup(&timer, 10, 1);
nr_timer_start(&timer);
EXPECT_TRUE(is_nr_timer_active(timer));
EXPECT_FALSE(nr_timer_expired(timer));
for (auto i = 0; i < 10; i++) {
nr_timer_tick(&timer);
}
EXPECT_FALSE(is_nr_timer_active(timer));
EXPECT_TRUE(nr_timer_expired(timer));
}
int main(int argc, char **argv)
{
logInit();
testing::InitGoogleTest(&argc, argv);
return RUN_ALL_TESTS();
}

View File

@@ -85,7 +85,7 @@
if (eL == TARGET->list.array[iJ]->FIELD) \
break; \
} \
if (iJ == TARGET->list.count) \
if (iJ < TARGET->list.count) \
asn_sequence_del(&TARGET->list, iJ, 1); \
else \
LOG_E(NR_MAC, "Element not present in the list, impossible to release\n"); \

View File

@@ -343,7 +343,7 @@ typedef struct timer_elm_s {
tasks[newQueue]= new task_list_t;
tasks[newQueue]->task_parms = {0};
pthread_mutex_unlock (&lock_nb_queues);
LOG_I(ITTI,"Starting itti queue: %s as task %d\n", taskInfo->name, newQueue);
LOG_D(ITTI, "Starting itti queue: %s as task %d\n", taskInfo->name, newQueue);
pthread_mutex_init(&tasks[newQueue]->queue_cond_lock, NULL);
memcpy(&tasks[newQueue]->admin, taskInfo, sizeof(task_info_t));
AssertFatal( ( tasks[newQueue]->epoll_fd = epoll_create1(0) ) >=0, "");

View File

@@ -32,6 +32,7 @@
#include "system.h"
#include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>
#include <unistd.h>
#include <pthread.h>
#include <string.h>
@@ -95,17 +96,6 @@ static void read_pipe(int p, char *b, int size) {
size -= ret;
}
}
int checkIfFedoraDistribution(void) {
return !system("grep -iq 'ID_LIKE.*fedora' /etc/os-release ");
}
int checkIfGenericKernelOnFedora(void) {
return system("uname -a | grep -q rt");
}
int checkIfInsideContainer(void) {
return !system("egrep -q 'libpod|podman|kubepods' /proc/self/cgroup");
}
/********************************************************************/
/* background process */
@@ -225,43 +215,71 @@ int rt_sleep_ns (uint64_t x)
return clock_nanosleep(CLOCK_MONOTONIC, TIMER_ABSTIME, &myTime, NULL);
}
void threadCreate(pthread_t* t, void * (*func)(void*), void * param, char* name, int affinity, int priority){
pthread_attr_t attr;
#ifdef HAVE_LIB_CAP
#include <sys/capability.h>
/* \brief reports if the current thread has capability CAP_SYS_NICE, i.e. */
bool has_cap_sys_nice(void)
{
/* get capabilities of calling PID */
cap_t cap = cap_get_pid(0);
cap_flag_value_t val;
/* check to what CAP_SYS_NICE is currently ("effective capability") set */
int ret = cap_get_flag(cap, CAP_SYS_NICE, CAP_EFFECTIVE, &val);
AssertFatal(ret == 0, "Error in cap_get_flag(): ret %d errno %d\n", ret, errno);
cap_free(cap);
/* return true if CAP_SYS_NICE is currently set */
return val == CAP_SET;
}
#else
/* libcap has not been detected on this system. We do not need to require it --
* we can try to read directly via a syscall. This is discouraged, though; from
* the man page: "The portable interfaces are cap_set_proc(3) and
* cap_get_proc(3); if possible, you should use those interfaces in
* applications". */
#include <sys/syscall.h> /* Definition of SYS_* constants */
#include <linux/capability.h> /* capabilities used below */
/* \brief reports if the current thread has capability CAP_SYS_NICE, i.e. */
bool has_cap_sys_nice(void)
{
struct __user_cap_header_struct hdr = {.version = _LINUX_CAPABILITY_VERSION_3};
struct __user_cap_data_struct cap[2];
if (syscall(SYS_capget, &hdr, cap) == -1)
return false;
return (cap[0].effective & (1 << CAP_SYS_NICE)) != 0;
}
#endif
void threadCreate(pthread_t* t, void * (*func)(void*), void * param, char* name, int affinity, int priority)
{
int ret;
int settingPriority = 1;
bool set_prio = has_cap_sys_nice();
pthread_attr_t attr;
ret=pthread_attr_init(&attr);
AssertFatal(ret == 0, "Error in pthread_attr_init(): ret: %d, errno: %d\n", ret, errno);
LOG_I(UTIL,"Creating thread %s with affinity %d and priority %d\n",name,affinity,priority);
if (checkIfFedoraDistribution())
if (checkIfGenericKernelOnFedora())
if (checkIfInsideContainer())
settingPriority = 0;
if (settingPriority) {
ret=pthread_attr_setinheritsched(&attr, PTHREAD_EXPLICIT_SCHED);
if (set_prio) {
ret = pthread_attr_setinheritsched(&attr, PTHREAD_EXPLICIT_SCHED);
AssertFatal(ret == 0, "Error in pthread_attr_setinheritsched(): ret: %d, errno: %d\n", ret, errno);
ret=pthread_attr_setschedpolicy(&attr, SCHED_OAI);
ret = pthread_attr_setschedpolicy(&attr, SCHED_OAI);
AssertFatal(ret == 0, "Error in pthread_attr_setschedpolicy(): ret: %d, errno: %d\n", ret, errno);
if(priority<sched_get_priority_min(SCHED_OAI) || priority>sched_get_priority_max(SCHED_OAI)) {
LOG_E(UTIL,"Prio not possible: %d, min is %d, max: %d, forced in the range\n",
priority,
sched_get_priority_min(SCHED_OAI),
sched_get_priority_max(SCHED_OAI));
if(priority<sched_get_priority_min(SCHED_OAI))
priority=sched_get_priority_min(SCHED_OAI);
if(priority>sched_get_priority_max(SCHED_OAI))
priority=sched_get_priority_max(SCHED_OAI);
}
AssertFatal(priority<=sched_get_priority_max(SCHED_OAI),"");
struct sched_param sparam={0};
AssertFatal(priority >= sched_get_priority_min(SCHED_OAI) && priority <= sched_get_priority_max(SCHED_OAI),
"Scheduling priority %d not possible: must be within [%d, %d]\n",
priority,
sched_get_priority_min(SCHED_OAI),
sched_get_priority_max(SCHED_OAI));
AssertFatal(priority <= sched_get_priority_max(SCHED_OAI), "");
struct sched_param sparam = {0};
sparam.sched_priority = priority;
ret=pthread_attr_setschedparam(&attr, &sparam);
ret = pthread_attr_setschedparam(&attr, &sparam);
AssertFatal(ret == 0, "Error in pthread_attr_setschedparam(): ret: %d errno: %d\n", ret, errno);
LOG_I(UTIL, "%s() for %s: creating thread with affinity %x, priority %d\n", __func__, name, affinity, priority);
} else {
affinity = -1;
priority = -1;
LOG_I(UTIL, "%s() for %s: creating thread (no affinity, default priority)\n", __func__, name);
}
LOG_I(UTIL,"threadCreate for %s, affinity %x, priority %d\n",name,affinity,priority);
ret=pthread_create(t, &attr, func, param);
AssertFatal(ret == 0, "Error in pthread_create(): ret: %d, errno: %d\n", ret, errno);
@@ -314,11 +332,6 @@ void thread_top_init(char *thread_name,
}
}
if (checkIfFedoraDistribution())
if (checkIfGenericKernelOnFedora())
if (checkIfInsideContainer())
settingPriority = 0;
if (settingPriority) {
memset(&sparam, 0, sizeof(sparam));
sparam.sched_priority = sched_get_priority_max(SCHED_FIFO);
@@ -347,37 +360,10 @@ void thread_top_init(char *thread_name,
}
}
// Block CPU C-states deep sleep
void set_latency_target(void) {
int ret;
static int latency_target_fd=-1;
uint32_t latency_target_value=2; // in microseconds
if (latency_target_fd == -1) {
if ( (latency_target_fd = open("/dev/cpu_dma_latency", O_RDWR)) != -1 ) {
ret = write(latency_target_fd, &latency_target_value, sizeof(latency_target_value));
if (ret == 0) {
printf("# error setting cpu_dma_latency to %u!: %s\n", latency_target_value, strerror(errno));
close(latency_target_fd);
latency_target_fd=-1;
return;
}
}
}
if (latency_target_fd != -1)
LOG_I(HW,"# /dev/cpu_dma_latency set to %u us\n", latency_target_value);
else
LOG_E(HW,"Can't set /dev/cpu_dma_latency to %u us\n", latency_target_value);
// Set CPU frequency to it's maximum
int system_ret = system("for d in /sys/devices/system/cpu/cpu[0-9]*; do cat $d/cpufreq/cpuinfo_max_freq > $d/cpufreq/scaling_min_freq; done");
if (system_ret == -1) {
LOG_E(HW, "Can't set cpu frequency: [%d] %s\n", errno, strerror(errno));
return;
}
if (!((WIFEXITED(system_ret)) && (WEXITSTATUS(system_ret) == 0))) {
LOG_E(HW, "Can't set cpu frequency\n");
}
mlockall(MCL_CURRENT | MCL_FUTURE);
/* \brief lock memory to RAM to avoid delays */
void lock_memory_to_ram(void)
{
int rc = mlockall(MCL_CURRENT | MCL_FUTURE);
if (rc != 0)
LOG_W(UTIL, "mlockall() failed: %d, %s\n", errno, strerror(errno));
}

View File

@@ -23,6 +23,7 @@
#define _SYSTEM_H_OAI_
#include <stdint.h>
#include <pthread.h>
#include <stdbool.h>
#ifdef __cplusplus
extern "C" {
#endif
@@ -42,8 +43,9 @@ int background_system(char *command);
void start_background_system(void);
void set_latency_target(void);
void lock_memory_to_ram(void);
bool has_cap_sys_nice(void);
void threadCreate(pthread_t *t, void *(*func)(void *), void *param, char *name, int affinity, int priority);
#define SCHED_OAI SCHED_RR
@@ -61,9 +63,6 @@ void thread_top_init(char *thread_name,
* Functions to check system at runtime.
****************************************************/
int checkIfFedoraDistribution(void);
int checkIfGenericKernelOnFedora(void);
int checkIfInsideContainer(void);
int rt_sleep_ns (uint64_t x);
#ifdef __cplusplus
}

View File

@@ -36,6 +36,7 @@ add_library(telnetsrv MODULE
)
target_link_libraries(telnetsrv PRIVATE history)
target_link_libraries(telnetsrv PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs)
target_link_libraries(telnetsrv PRIVATE UTIL)
message(STATUS "Add enb specific telnet functions in libtelnetsrv_enb.so")
add_library(telnetsrv_enb MODULE

View File

@@ -0,0 +1,6 @@
if (ENABLE_TESTS)
add_subdirectory(test)
endif()
add_library(thread-pool thread-pool.c)
target_link_libraries(thread-pool PRIVATE utils)
target_include_directories(thread-pool PUBLIC .)

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