Compare commits

...

428 Commits

Author SHA1 Message Date
Ilario FAVERO
71fb81e13a fix conversion routine 2022-09-05 15:17:32 +02:00
Ilario FAVERO
06971bd8e6 fixes further to MR feedback 2022-09-02 16:44:37 +02:00
Robert Schmidt
cb3108f4e5 Merge branch 'integration_2022_wk35' into 'develop'
integration_2022_wk35

See merge request oai/openairinterface5g!1682

MR !1571 PHY procedures for SRS MIMO
MR !1666 gzip optim, links for size
MR !1668 Update core images to latest develop for CI
MR !1670 Fix initial_cyclic_shift for pucch-ConfigCommon
MR !1671 Fix unaligned channel processing with odd number of rb
MR !1672 Enable 2 Downlink layers MIMO and other minor improvements in default configuration files
MR !1680 Fix buffer overflow and division by 0 for SRS
2022-08-30 06:23:42 +00:00
luis_pereira87
e2faa154e7 Merge remote-tracking branch 'origin/develop-SRS-buffer-overflow' into integration_2022_wk35
# Conflicts:
#	openair1/PHY/NR_ESTIMATION/nr_ul_channel_estimation.c
2022-08-29 16:50:01 +01:00
Robert Schmidt
a3543668f3 Merge remote-tracking branch 'origin/Update_configuration_files' into integration_2022_wk35 2022-08-29 17:25:38 +02:00
Robert Schmidt
a085522128 Merge remote-tracking branch 'origin/fix-unaligned-channel-processing-with-odd-number-of-rb' into integration_2022_wk35 2022-08-29 17:25:25 +02:00
Robert Schmidt
256483a25d Merge remote-tracking branch 'origin/BugFix_in_initial_cyclic_shift_for_pucch-ConfigCommon' into integration_2022_wk35 2022-08-29 17:25:08 +02:00
Robert Schmidt
abd5b2cf79 Merge remote-tracking branch 'origin/update_5gcn_aug2022' into integration_2022_wk35 2022-08-29 17:24:49 +02:00
Robert Schmidt
845eeae92b Merge remote-tracking branch 'origin/optimize-ci-time' into integration_2022_wk35 2022-08-29 17:24:35 +02:00
Roberto Louro Magueta
e026e20186 Avoid division by 0 for low noise scenario 2022-08-26 11:41:23 +01:00
Roberto Louro Magueta
4e434ecf45 Fix buffer overflow for SRS 2022-08-26 11:04:04 +01:00
Dhanuja Elizabeth Thomas
313a63f52a Update 5gcn images for CI
- in ci-scripts for l2-sim, rf-sim
- in epc.py for OTA tests
2022-08-26 11:01:22 +02:00
luis_pereira87
f3781c4353 Add band n77 configuration file for N300 with 100 MHz
Band n78 is widely used by mobile network operators, we want to transmit over the air without interfere with them, so we set the allocation in this configuration file outside of band n78
2022-08-25 16:48:08 +01:00
luis_pereira87
015a4d945b Enable 2 Downlink layers MIMO and other minor improvements in default configuration files 2022-08-25 13:27:29 +01:00
Roberto Louro Magueta
d39a772436 Remove tabs 2022-08-25 10:33:38 +01:00
Roberto Louro Magueta
432817d1d5 Merge remote-tracking branch 'origin/develop' into develop-SRS-MIMO 2022-08-25 10:26:35 +01:00
Robert Schmidt
a58b3989d1 Install gdb in RAN images to have stack traces on asserts 2022-08-24 15:51:49 +02:00
Robert Schmidt
4dc26bf575 docker entrypoints: print config, log USRP loader 2022-08-24 15:51:49 +02:00
Robert Schmidt
23cf8059aa Save logs of unhealthy containers during deployment 2022-08-24 15:51:49 +02:00
Robert Schmidt
c1b448cd1a Handle errors in Copy_Image_to_Test_Server() 2022-08-24 15:51:49 +02:00
laurent
3a0a14cf7d gzip optim, links for size 2022-08-24 15:51:49 +02:00
Robert Schmidt
e28fccc7fb Hardcode (implicit) physim OC server to use 2022-08-23 10:36:16 +02:00
Roberto Louro Magueta
c6fda387e0 Fix mem_offset after merge 2022-08-22 14:23:12 +01:00
laurent
0475b78ff4 fix unaligned 2022-08-22 12:55:23 +02:00
Roberto Louro Magueta
df0f756c87 Fix build after merge 2022-08-22 11:30:06 +01:00
Roberto Louro Magueta
d04918eb9b Merge remote-tracking branch 'origin/develop' into develop-SRS-MIMO
# Conflicts:
#	openair1/PHY/NR_ESTIMATION/nr_ul_channel_estimation.c
#	openair2/RRC/NR/MESSAGES/asn1_msg.c
#	openair2/RRC/NR/nr_rrc_config.c
#	openair2/RRC/NR/nr_rrc_config.h
2022-08-22 10:45:56 +01:00
luis_pereira87
f9f175a6f1 Fix initial_cyclic_shift for pucch-ConfigCommon 2022-08-22 10:31:15 +01:00
Robert Schmidt
ad8381a66b Merge branch 'integration_2022_wk33' into 'develop'
integration_2022_wk33

See merge request oai/openairinterface5g!1667

MR !1604 RRC harmonization of multiple BWPs configuration
MR !1657 NR fixes for 100MHz and 2 layers
MR !1646 Add 4G L2simulator test
MR !1662 fix a bug: multi ues in rfsimulator 4G
MR !1559 NR UE multi SSB meas
changes to disable legacy 4G F1 test
MR !1661 fix bugs in config module and config usage
MR !1562 Correctly handle SIGINT/stop signal in nr-softmodem
MR !1659 Fix segFault in SRS for odd number of PRBs
2022-08-21 06:10:51 +00:00
Robert Schmidt
2ea9618a8d Limit function name string length for logging output 2022-08-19 18:22:23 +02:00
Robert Schmidt
8aaede906d Do not hard-code default global log level 2022-08-19 18:22:23 +02:00
Robert Schmidt
909b511ed0 Merge remote-tracking branch 'origin/develop-SRS-segFault-51PRBs' into integration_2022_wk33 2022-08-19 18:22:23 +02:00
Robert Schmidt
4674cddb71 Merge remote-tracking branch 'origin/fix-nrsoftmodem-stop' into integration_2022_wk33 2022-08-19 18:22:23 +02:00
Robert Schmidt
5ebe28565e Merge remote-tracking branch 'origin/fix-config-module' into integration_2022_wk33 2022-08-19 18:22:22 +02:00
Robert Schmidt
84f7634874 Disable legacy 4G F1 test and XML scenario files 2022-08-19 18:22:22 +02:00
Roberto Louro Magueta
a0d8009170 Address review comments 2022-08-19 14:31:13 +01:00
Robert Schmidt
f3cdc11269 Merge remote-tracking branch 'origin/NR_UE_multi_SSB_meas' into integration_2022_wk33 2022-08-18 20:53:04 +02:00
Robert Schmidt
db31ddc341 Merge remote-tracking branch 'origin/bug-rfsim-4G-multi-UEs' into integration_2022_wk33 2022-08-18 20:52:21 +02:00
Robert Schmidt
71d0e95f1f Merge remote-tracking branch 'origin/ci-test-4g-l2sim' into integration_2022_wk33 2022-08-18 20:52:04 +02:00
Robert Schmidt
70627a9953 Merge remote-tracking branch 'origin/NR_100MHz_2layers_fixes' into integration_2022_wk33 2022-08-18 20:51:23 +02:00
Robert Schmidt
e0a802df16 Remove irrelevant RU/L1/RFsim config from L2sim gNB config 2022-08-18 20:39:31 +02:00
Robert Schmidt
6c31639522 Only call NR_PHY_config_req when no (n)FAPI 2022-08-18 20:37:06 +02:00
Robert Schmidt
b712e77527 Don't block nr-softmodem in nFAPI mode, not needed 2022-08-18 20:18:18 +02:00
Robert Schmidt
238c8a62b4 Delete dead code in nr-softmodem main() 2022-08-18 20:18:18 +02:00
Robert Schmidt
6bf0f98e7f Skip scheduling of UEs if there are no free HARQs 2022-08-18 19:59:50 +02:00
Roberto Louro Magueta
1638bbba8a Add intermediate variable 2022-08-18 17:00:21 +01:00
laurent
d6d4d87e0b code review comments 2022-08-18 16:43:26 +02:00
laurent
8b159d6ddc remove unclear function free_configmodule(), as we have end_configmodule() that do the same 2022-08-18 09:47:44 +02:00
Robert Schmidt
a08d78d79d Correctly show proxy build info 2022-08-17 23:50:23 +02:00
Robert Schmidt
c139204ce0 Make one L2sim proxy build scenario file 2022-08-17 23:50:23 +02:00
Robert Schmidt
ab5a67463a Reuse existing files from 4g_rfsimulator_fdd_05MHz 2022-08-17 17:35:44 +02:00
frtabu
983c956b77 Fix config module memory leaks 2022-08-16 17:58:55 +02:00
Cedric Roux
0618812554 T tracer: simplify
- don't call exit() if get_message() fails, simply terminate the thread and
  disable the T tracer
- T_dont_fork disappears, monitor_and_kill() as well, so now it's only 2
  processes: the main (enb/gnb/ue) and the local tracer
2022-08-16 14:44:23 +02:00
Robert Schmidt
5cadafc154 CI: check for final 'Bye.' message 2022-08-16 14:44:23 +02:00
Robert Schmidt
6f40b6190c Stop containers before undeploying 2022-08-16 14:44:23 +02:00
Robert Schmidt
d08ef0490d Correctly call stop functions in nr-softmodem main 2022-08-16 14:44:23 +02:00
Robert Schmidt
1df60139e2 Automatically close GTP sockets at program end 2022-08-16 14:44:22 +02:00
Robert Schmidt
19d83ad21e Make GTPV1U REQ in one allocation to avoid mem leak at GTP 2022-08-16 14:44:22 +02:00
Robert Schmidt
51a7b7bd6e Remove memory leaks in FAPI PUCCH 0-4 PDU handling 2022-08-16 14:44:22 +02:00
Robert Schmidt
2465f1fb51 Don't allocate gNB rxdataF, it is managed at the RU
Removes phy_procedures_gNB_common_RX() (only used in nr_ulsim) + fixes
in pucchsim
2022-08-16 14:44:22 +02:00
Robert Schmidt
9957056f38 Drop empty logging statement 2022-08-16 14:44:22 +02:00
Robert Schmidt
61ead59d13 Check oai_exit in wait_on_condition() and friends, no volatile 2022-08-16 14:44:22 +02:00
Robert Schmidt
fffb2d14de Close rfsimulator sockets 2022-08-16 14:44:22 +02:00
Robert Schmidt
649e059f90 RFsim: Mark FD non-blocking once; show errno on problem 2022-08-16 14:44:22 +02:00
Florian Kaltenberger
7e82f2f4e8 sending small end-of-burst TX packet when exiting softmodem 2022-08-16 14:44:22 +02:00
Robert Schmidt
69cf59f32d Stop USRP write thread if necessary 2022-08-16 14:44:21 +02:00
Robert Schmidt
e28bd9ff2a Free USRP objects in trx_usrp_end() 2022-08-16 14:43:59 +02:00
Robert Schmidt
0ae3d3027d Don't call trx_end_func() at nr-softmodem, is done in ru_thread() 2022-08-16 14:41:02 +02:00
Robert Schmidt
004d6d3bab Correctly stop tx_reorder and L1_stats threads 2022-08-16 14:41:02 +02:00
Robert Schmidt
1512e39e4e Rewrite kill_NR_RU_proc() and reuse functions 2022-08-16 14:41:02 +02:00
Robert Schmidt
9ec3deb5bd Improve thread pool documentation 2022-08-16 14:41:02 +02:00
Robert Schmidt
fafed7d181 Remove unused restrictRNTI variable in Tpool 2022-08-16 14:41:02 +02:00
Robert Schmidt
31dcdf2152 Implement abortNotifiedFIFO() to unlock FIFO waits 2022-08-16 14:41:02 +02:00
Robert Schmidt
dfd9a91b50 Rename abortNotifiedFIFO() to abortNotifiedFIFOJob() 2022-08-16 14:41:02 +02:00
Robert Schmidt
d73e1a4133 Handle NULL return of pullTpool() 2022-08-16 14:41:02 +02:00
Robert Schmidt
178e2773ed Handle abortFIFO in FIFO functions 2022-08-16 14:41:02 +02:00
Robert Schmidt
e63cc03c9d Implement abortTpool()
This stops all ongoing threads (using pthread_join()), and marks FIFOs
to not block anymore. In this case, returned messages will be NULL.
2022-08-16 14:41:02 +02:00
Robert Schmidt
078d6fa15b threadCreate(): don't create detached threads
A detached thread cannot be joined with pthread_join(). However, this
is crucial for correct resetting of the nr-softmodem. Therefore, do not
create threads in detached state.
2022-08-16 14:41:02 +02:00
Robert Schmidt
fc298b77b5 Don't stop nr-softmodem on FEP thread exit cond 2022-08-16 14:41:02 +02:00
Robert Schmidt
76f399cdd6 Threading/memory improvements at nr-softmodem end
- First stop threads then free memory
- Don't call kill_NR_RU_proc() twice (is called in stop_RU())
- Memory allocation optimizations
2022-08-16 14:41:02 +02:00
luis_pereira87
604d52a431 Replace sleep by mutex in itti_wait_tasks_end() 2022-08-16 14:41:01 +02:00
Robert Schmidt
c4a657cc33 Avoid additional malloc() for queues and Tpool 2022-08-16 14:41:01 +02:00
Robert Schmidt
31d5bb6ffd Rename abortTpool() to abortTpoolJob(), fix doc 2022-08-16 14:41:01 +02:00
francescomani
df1f4381a2 fix in sib1 memcpy size 2022-08-16 11:18:00 +02:00
francescomani
166aae35ab fixes to get 100MHz working with 2 layers 2022-08-16 11:18:00 +02:00
Robert Schmidt
70bb1a3858 Add L2sim-4G to RAN-Container-Parent and documentation 2022-08-16 09:59:36 +02:00
laurent
65b399fcd7 fix bugs in config module and config usage
fix bug from this MR

fix bug from this MR

stupid-mistake
2022-08-16 09:22:15 +02:00
laurent
d46a7e40a8 fix a bug: multi ues in rfsimulator 4G 2022-08-16 08:51:37 +02:00
Robert Schmidt
793c8de2ae CI: Add L2sim-4G iperf DL&UL test 2022-08-13 15:17:42 +02:00
Robert Schmidt
71c13d85fc Add 4G L2sim XML scenario files 2022-08-13 15:17:42 +02:00
Robert Schmidt
7f8031f69a Add docker-compose.yml for l2sim-4g 2022-08-13 15:17:42 +02:00
Robert Schmidt
c7f79e71e7 Add more users for dummy CI 4G UE sim configuration 2022-08-13 15:17:42 +02:00
Robert Schmidt
df05475b6b Add eNB L2sim config file for enb container image 2022-08-13 15:17:42 +02:00
francescomani
0289bb5791 SRS for multiple BWPs 2022-08-12 15:39:48 +02:00
francescomani
8403b2c6d5 Merge remote-tracking branch 'origin/develop' into NR_RRC_harmonization_after_BWP 2022-08-12 13:05:11 +02:00
Robert Schmidt
61312ca6e2 Merge branch 'integration_2022_wk32' into 'develop'
integration_2022_wk32

See merge request oai/openairinterface5g!1658

MR !1551 Use F1 internally: RRC Message Transfer
MR !1645 fix(ci): Fixes for the legacy LTE bench
MR !1654 Fix for NDI init at UE
MR !1656 ngap: minor fix: access the array correctly
MR !1635 Fix SDAP in RFSIM mode
MR !1643 add asn1c logs
MR !1647 Function to get sample rate and BW
2022-08-12 05:33:12 +00:00
Robert Schmidt
6a0605b000 Merge remote-tracking branch 'origin/get_samplerate_and_bw' into integration_2022_wk32 2022-08-11 18:11:15 +02:00
Robert Schmidt
9c94f86451 Merge remote-tracking branch 'origin/add-asn1c-codec-logs' into integration_2022_wk32 2022-08-11 18:10:55 +02:00
Robert Schmidt
ef526692b5 Merge remote-tracking branch 'origin/fix_sdap' into integration_2022_wk32 2022-08-11 18:04:47 +02:00
francescomani
63a9cbcc66 fixes to correctly configure and schedule CSI-RS in case of multiple BWPs 2022-08-11 15:41:46 +02:00
laurent
eba7dc5c76 Print asn1c encoding logs using OAI logging system 2022-08-11 14:00:43 +02:00
Angelo Athanassopoulos
17aef213a1 Fix: noS1 with SDAP 2022-08-11 11:19:27 +02:00
Robert Schmidt
44f363c63c Merge remote-tracking branch 'origin/minor-fix-bad-sd-flag' into integration_2022_wk32 2022-08-10 20:40:24 +02:00
Robert Schmidt
c607e5c3d6 Merge remote-tracking branch 'origin/NR_phytest_UE_ndi' into integration_2022_wk32 2022-08-10 20:40:03 +02:00
Robert Schmidt
f065de0811 Merge remote-tracking branch 'origin/ci-fix-legacy-bench' into integration_2022_wk32 2022-08-10 20:39:57 +02:00
francescomani
c0244ee68e fix for conflicting csi resources for multiple ues 2022-08-10 16:51:03 +02:00
Raphael Defosseux
888c4ead0f fix(ci): Fixes for the legacy LTE bench
- Problem with escaping chars
 - Killing properly tshark process on EPC
 - standalone Terminate eNB was failing

Signed-off-by: Raphael Defosseux <raphael.defosseux@eurecom.fr>
2022-08-10 15:08:52 +02:00
francescomani
5d39d8125c addressing review comment 2022-08-10 09:38:21 +02:00
Roberto Louro Magueta
0cb014f463 Fix memory alignment in nr_srs_channel_estimation 2022-08-09 17:11:12 +01:00
Robert Schmidt
f1c5378e3b Shorten 5G RFsim tab names 2022-08-09 15:05:58 +02:00
Robert Schmidt
c21f86421e Test SDAP in 5G FDD RFsim test 2022-08-09 15:05:50 +02:00
Cedric Roux
ee7aca5d05 ngap: minor fix: access the array correctly 2022-08-09 12:22:40 +02:00
francescomani
dc531588e9 addressing review comments 2022-08-09 12:01:54 +02:00
francescomani
5cfa5ad6f6 fixes for multiple BWPs 2022-08-08 18:32:39 +02:00
Angelo Athanassopoulos
5382227866 Fix SDAP, get QFI & PDUSession ID from CN 2022-08-08 18:09:59 +02:00
francescomani
b749ac12f7 hotfix for UE NDI init 2022-08-08 17:12:12 +02:00
Roberto Louro Magueta
49d60500c0 Change array size from MAX_NUM_NR_SRS_AP to 1<<srs_pdu->num_ant_ports 2022-08-08 13:49:33 +01:00
Roberto Louro Magueta
7e87265a74 Merge remote-tracking branch 'origin/develop' into develop-SRS-MIMO
# Conflicts:
#	openair1/PHY/NR_ESTIMATION/nr_ul_channel_estimation.c
#	openair1/SCHED_NR/phy_procedures_nr_gNB.c
2022-08-08 11:54:43 +01:00
francescomani
032879c0c1 Merge remote-tracking branch 'origin/develop' into NR_RRC_harmonization_after_BWP 2022-08-08 12:37:40 +02:00
Robert Schmidt
9622a56bf1 gNB RRC: handle F1AP_UL_RRC_MESSAGE 2022-08-07 20:03:05 +02:00
Robert Schmidt
18a68387c4 Transfer Initial UL RRC Message through internal F1 2022-08-07 20:03:04 +02:00
Robert Schmidt
a126cd1220 Delete ITTI-SIM 2022-08-07 19:58:35 +02:00
Robert Schmidt
52dbc6fe75 Refactor linear allocator from LTE/NR; separate LTE/NR headers 2022-08-07 19:49:08 +02:00
Robert Schmidt
0c9006ec66 Do not initialize MAC multiple times 2022-08-07 19:49:08 +02:00
Robert Schmidt
f52809a8fb Add MAC-RRC UL stubs for F1AP and direct 2022-08-07 19:49:08 +02:00
Robert Schmidt
f75cdbcad7 Use F1 DL RRC message transfer internally for RRCSetup 2022-08-07 19:49:08 +02:00
Robert Schmidt
4154e9e9d5 Merge branch 'integration_2022_wk31b' into 'develop'
integration_2022_wk31b

See merge request oai/openairinterface5g!1649

MR !1624 NR PUCCH2 fix
MR !1627 fix for pusch dtx in phytest mode
MR !1634 Minor optimization in function init_symbol_rotation
MR !1637 gtp: small fix: set E if there is an extension header
MR !1641 Resolve AMF ip address using FQDN
delete files rxsigF0.m, txsig0.m, ldpctest_BG_1_Zc_384_rate_1-3_block_length_8448_maxit_5.txt
MR !1593 Reworking of BWP handling at MAC (initial MR)
MR !1652 fix for 3-digit MNC in asn1_msg.c
2022-08-07 17:47:12 +00:00
Robert Schmidt
4f2e97d91c Merge remote-tracking branch 'origin/nr_sib1_mnc_hotfix' into integration_2022_wk31b 2022-08-07 19:39:15 +02:00
Raymond Knopp
087a97f606 fix for 3-digit MNC in asn1_msg.c 2022-08-06 16:30:59 +02:00
francescomani
d793de5700 some fixes in SSB RSRP 2022-08-06 11:27:49 +02:00
Robert Schmidt
ebc55ea206 Merge remote-tracking branch 'origin/NR_BWP_config' into integration_2022_wk31b 2022-08-04 19:13:57 +02:00
Robert Schmidt
ddc6df0bf4 Remove files accidentally added in MR 1382 2022-08-04 18:51:02 +02:00
Robert Schmidt
b0c7a3efe9 Merge remote-tracking branch 'origin/amf-fqdn-support' into integration_2022_wk31b 2022-08-04 18:49:49 +02:00
Robert Schmidt
0c29e5ea5b Merge remote-tracking branch 'origin/gtp-hotfix' into integration_2022_wk31b 2022-08-04 18:49:41 +02:00
Robert Schmidt
cb4e60eed3 Merge remote-tracking branch 'origin/init_symbol_rotation_optimization' into integration_2022_wk31b 2022-08-04 18:49:33 +02:00
Robert Schmidt
0352f98467 Merge remote-tracking branch 'origin/NR_PUSCH_phytest_DTX_fix' into integration_2022_wk31b 2022-08-04 18:49:25 +02:00
francescomani
9333f53dc8 adding an assertion in configure_UE_BWP 2022-08-04 17:46:18 +02:00
francescomani
6e2a83856b common function to get sample rate and BW 2022-08-04 17:19:15 +02:00
francescomani
d908779c38 lowercase bwp 2022-08-04 11:34:25 +02:00
francescomani
8c81c70de9 Fix AckNack and SR multiplexing in PUCCH2
- correctly reset HARQ structure for HARQ Ack/Nack/PUCCH0
- reduce max PUCCH2 bits to have room for SR
2022-08-04 10:53:41 +02:00
Rohan
b64baf144d Resolve AMF ip address using FQDN 2022-08-03 17:27:08 +02:00
francescomani
5fc23d5864 Merge remote-tracking branch 'origin/develop' into NR_RRC_harmonization_after_BWP 2022-08-03 12:11:37 +02:00
francescomani
cbff9df713 Merge remote-tracking branch 'origin/develop' into NR_BWP_config 2022-08-03 10:59:12 +02:00
Cedric Roux
3155ec6df8 gtp: small fix: set E if there is an extension header 2022-08-03 10:34:12 +02:00
francescomani
3d93d0dfc0 fix for pusch dtx in phytest mode 2022-08-03 09:57:40 +02:00
Robert Schmidt
7f910a2e36 Merge branch 'integration_2022_wk30b' into 'develop'
integration_2022_wk30b

See merge request oai/openairinterface5g!1630

MR !1594 Schedule BWP switching to the first active BWP when RA with Msg3 carrying DCCH or DTCH message
MR !1628 Fix a segmentation fault when there is no spCellConfigDedicated with maxMIMO_Layers parameter
MR !1528 CSI Feedback
MR !1631 Fix floating point for SRS
MR !1632 gtp pgu session header
MR !1633 Improve SIB1 length to support maximum value specified in 3GPP TS 38.331 section 5.2.1
MR !1463 Support arbitrary number of retransmissions (up to 8)
2022-08-03 06:42:38 +00:00
Robert Schmidt
a21c31a6a5 Merge remote-tracking branch 'origin/HARQ_rv_circular_array' into integration_2022_wk30b 2022-08-02 11:04:04 +02:00
Robert Schmidt
f29fe05031 Merge remote-tracking branch 'origin/NR_MAC_SIB1_Improvements' into integration_2022_wk30b 2022-08-02 11:04:04 +02:00
Robert Schmidt
d2a784280d Merge remote-tracking branch 'origin/impl-pdu-session-header' into integration_2022_wk30b 2022-08-02 11:04:04 +02:00
Robert Schmidt
48b045b0b0 Merge remote-tracking branch 'origin/develop-SRS-fix' into integration_2022_wk30b 2022-08-02 11:04:04 +02:00
Robert Schmidt
fc6122759b Merge remote-tracking branch 'origin/develop-CSI-Measurements' into integration_2022_wk30b 2022-08-02 11:04:04 +02:00
Robert Schmidt
eb46f216b1 Upgrade path to AS lteue after simulator upgrade 2022-08-02 11:04:03 +02:00
Robert Schmidt
3e7864eb53 Merge remote-tracking branch 'origin/Fix_segfault_when_no_spCellConfigDedicated' into integration_2022_wk30b 2022-08-02 11:04:03 +02:00
laurent
7a6f9659bc gtp-u pdu session extension header implementation, this extension header is mantadory in 5G 2022-08-01 22:57:52 +02:00
luis_pereira87
fdd79391e9 Call function nr_mac_update_timers when there is a Msg3 carrying a DCCH message 2022-08-01 17:57:50 +01:00
francescomani
840cf403db Make max num of HARQ tx configurable per UL/DL
Contributors
  francescomani <email@francescomani.it>
  Robert Schmidt <robert.schmidt@openairinterface.org>
2022-08-01 16:53:43 +02:00
francescomani
4ad4edb871 Log arbitrary number of HARQ rounds
Contributors
  francescomani <email@francescomani.it>
  Robert Schmidt <robert.schmidt@openairinterface.org>
2022-08-01 16:31:01 +02:00
francescomani
989c22a46c Limit RV to interval of 0..3
Contributors
  francescomani <email@francescomani.it>
  Rodolphe Bertolini <rodolphe.bertolini@cea.fr>
2022-08-01 16:29:58 +02:00
francescomani
9e5a77e6e3 Remove max number of HARQ rounds from L1
Contributors:
  francescomani <email@francescomani.it>
  Rodolphe Bertolini <rodolphe.bertolini@cea.fr>
2022-08-01 15:59:16 +02:00
luis_pereira87
48019c33f4 Minor optimization in function init_symbol_rotation 2022-08-01 11:20:55 +01:00
luis_pereira87
47d604b41f Improve SIB1 length to support maximum value specified in 3GPP TS 38.331 section 5.2.1
The physical layer imposes a limit to the maximum size a SIB can take. The maximum SIB1 or SI message size is 2976 bits.
2022-08-01 10:35:08 +01:00
luis_pereira87
7f38019f7e Remove unused code 2022-08-01 10:26:14 +01:00
francescomani
be0fc1a982 Merge remote-tracking branch 'origin/develop' into NR_UE_multi_SSB_meas 2022-07-30 10:21:58 +02:00
Roberto Louro Magueta
6f67792993 Variable rename 2022-07-29 10:42:55 +01:00
Roberto Louro Magueta
069bebfa48 Fix floating point 2022-07-29 10:05:34 +01:00
luis_pereira87
b7b6e8a60f Merge remote-tracking branch 'origin/develop' into develop-CSI-Measurements
# Conflicts:
#	openair1/PHY/NR_ESTIMATION/nr_measurements_gNB.c
2022-07-28 16:50:04 +01:00
francescomani
e8c637cd32 Merge remote-tracking branch 'origin/develop' into NR_RRC_harmonization_after_BWP 2022-07-28 17:21:04 +02:00
francescomani
d5a086d396 Merge remote-tracking branch 'origin/develop' into NR_BWP_config 2022-07-28 16:12:27 +02:00
luis_pereira87
1a77e9ba37 Schedule BWP switching to the first active BWP (previous active BWP before RA with Msg3 carrying DCCH or DTCH message) 2022-07-28 14:49:17 +02:00
Robert Schmidt
add469e7ca Merge branch 'integration_2022_wk30' into 'develop'
integration_2022_wk30

See merge request oai/openairinterface5g!1626

MR !1616 NR SA tutorials v2
MR !1620 nr_pdcp: nia1 implementation
MR !1622 CI: do not trigger tests if nothing is tagged NSA
MR !1623 Fix for ssb subcarrier offset in case of f<3GHz
MR !1606 code maintenance
MR !1568 Add undefined behavior sanitizer in build_oai, fix some errors
MR !1587 Dynamically build L2sim proxy
2022-07-28 11:59:36 +00:00
Robert Schmidt
08e30bf4ab Merge remote-tracking branch 'origin/l2proxy-build' into integration_2022_wk30 2022-07-28 09:45:24 +02:00
Robert Schmidt
57c545d4b3 Merge remote-tracking branch 'origin/use-ubsan' into integration_2022_wk30 2022-07-28 09:45:10 +02:00
luis_pereira87
970bfc92f0 Fix a segmentation fault when there is no spCellConfigDedicated with maxMIMO_Layers parameter 2022-07-28 07:21:36 +01:00
Roberto Louro Magueta
8cd8799981 Update range for reported RSRP 2022-07-27 18:43:47 +01:00
Robert Schmidt
c663688fb2 Merge remote-tracking branch 'origin/accumulated-fixes-2022june' into integration_2022_wk30 2022-07-26 17:22:00 +02:00
laurent
b4331bf7f4 code maintenance: old errors 2022-07-26 17:20:09 +02:00
Robert Schmidt
878491334f Merge remote-tracking branch 'origin/another_SSB_bugfix' into integration_2022_wk30 2022-07-26 17:15:32 +02:00
Robert Schmidt
8b26160d4d Merge remote-tracking branch 'origin/fix-jenkins-trig-nsa' into integration_2022_wk30 2022-07-26 17:15:16 +02:00
Roberto Louro Magueta
3ca83257cc UE sends the report with the RSRP based on CSI-RS to gNB 2022-07-26 15:45:11 +01:00
Robert Schmidt
c59912d7ee Merge remote-tracking branch 'origin/nr-pdcp-nia1' into integration_2022_wk30 2022-07-26 16:39:11 +02:00
Robert Schmidt
a20a6ba431 Merge remote-tracking branch 'origin/NR_SA_Tutorials_v2' into integration_2022_wk30 2022-07-26 16:38:45 +02:00
Roberto Louro Magueta
1f818b4178 RSRP computation at UE based on CSI-RS 2022-07-26 12:45:30 +01:00
Robert Schmidt
e1798745ef Dynamically build L2sim proxy 2022-07-26 09:54:53 +02:00
francescomani
5427ec25b6 applying config_srs to all the instances 2022-07-25 15:24:58 +02:00
francescomani
56e73266cb Merge remote-tracking branch 'origin/develop' into NR_RRC_harmonization_after_BWP 2022-07-25 15:02:38 +02:00
francescomani
228bd5f16d fix for ssb subcarrier offset in case of <3GHz 2022-07-22 17:01:47 +02:00
Robert Schmidt
3c2375eada CI: do not trigger tests if nothing is tagged NSA
The previous version would trigger sub-pipelines (LTE-2x2, ...) if no MR
had the NSA tag (without a commit, etc). Of course, this would make all
pipelines subsequently fail (as not enough arguments, such as the
commit, were given). In this commit, we read the output of `jq` from
JSON, which will result in an empty list if no MR is tagged with the NSA
label (and the output in the console will be nicer as well).
2022-07-21 17:57:26 +02:00
Cedric Roux
667b8e5eed nr_pdcp: nia1 implementation
We reuse existing code from eia1 for actual computation. Maybe not the most
efficient. To be revised if needed.

Some hacks in CMakeLists.txt were introduced to compile
phy simulators. To be removed at some point.
2022-07-21 16:59:38 +02:00
francescomani
2e4e9f6423 Merge remote-tracking branch 'origin/develop' into NR_BWP_config 2022-07-21 11:35:28 +02:00
Roberto Louro Magueta
2f3f858648 Merge remote-tracking branch 'origin/develop' into develop-SRS-MIMO 2022-07-20 20:16:00 +01:00
Roberto Louro Magueta
6ba60eb181 Merge remote-tracking branch 'origin/develop' into develop-CSI-Measurements
# Conflicts:
#	openair2/RRC/NR/nr_rrc_config.h
2022-07-20 19:59:34 +01:00
Robert Schmidt
72bf1b1d3c Merge branch 'integration_2022_wk29' into 'develop'
integration_2022_wk29

See merge request oai/openairinterface5g!1619
2022-07-20 16:30:58 +00:00
luis_pereira87
b1a3cbb068 Fix segmentation fault when changing BWP 2022-07-20 12:55:17 +01:00
laurent
ab36474811 dirty workaround in LTE get_prb(): it is not good, but keep safe in memory instead of writing outside the range 2022-07-20 10:40:32 +02:00
laurent
017fd225bc fix ubsan detected errors 2022-07-20 10:40:32 +02:00
Robert Schmidt
db7f39ba19 Use correct structure in sctp_eNB_accept_associations() 2022-07-20 10:40:32 +02:00
Robert Schmidt
6b757c5320 Correct array sizes in dlsim 2022-07-20 10:40:32 +02:00
Robert Schmidt
b07a167370 Correct indentation in nr_rx_pdsch() 2022-07-20 10:40:32 +02:00
Robert Schmidt
24b651b465 Provide build_oai option UBSan 2022-07-20 10:38:44 +02:00
Robert Schmidt
bc3600a3f9 Merge remote-tracking branch 'origin/f1-undefined' into integration_2022_wk29 2022-07-19 18:12:48 +02:00
Robert Schmidt
fcb07ef5fd Merge remote-tracking branch 'origin/NR_SSB_fix' into integration_2022_wk29 2022-07-19 18:12:40 +02:00
Robert Schmidt
82c62ecd5a Merge remote-tracking branch 'origin/rename_var_to_pusch_DTX' into integration_2022_wk29 2022-07-19 18:12:31 +02:00
Robert Schmidt
05e859b1ef Merge remote-tracking branch 'origin/fix-testbenches-doc' into integration_2022_wk29 2022-07-19 18:12:23 +02:00
Robert Schmidt
6dac7d674c Merge remote-tracking branch 'origin/develop-SRS-Measurements' into integration_2022_wk29 2022-07-19 18:12:14 +02:00
Robert Schmidt
65c9af7d48 Merge branch 'ran-sa-b200-module-sabox-container' into 'develop'
Add basic SA test to RAN-Container-Parent

See merge request oai/openairinterface5g!1615
2022-07-19 07:30:37 +00:00
Robert Schmidt
04251d5b06 Correctly initialize protocol_ctxt in F1 code
In the previous version, not all fields, and in particular the
`eNB_index`, were not initialized, leading to errors when they were used
(e.g., the PDCP code checks that eNB_index == 0).
2022-07-18 17:39:55 +02:00
Robert Schmidt
16c758ae09 CI: Drop IP check when connectiong via SSH and pubkey 2022-07-15 16:00:52 +02:00
luis_pereira87
43298fd02c Address merge request review comments 2022-07-15 13:30:45 +01:00
Robert Schmidt
ae05420c84 CI: log error if oai-amf container is not present for AMF IP addr retrieval 2022-07-15 13:35:19 +02:00
luis_pereira87
0700d5d078 Add 5G SA end-to-end, step-by-step, tutorials for OAI CN5G, OAI gNB and COTS UE 2022-07-15 11:56:44 +01:00
Robert Schmidt
52168e5201 Shut off quectel before running SA tests 2022-07-15 11:05:08 +02:00
Robert Schmidt
63daf5793b Remove useless SA test sleep 2022-07-15 11:05:08 +02:00
Robert Schmidt
0c4aa33939 Trigger SA-B200 test from RAN-Container-Parent 2022-07-14 23:57:52 +02:00
Robert Schmidt
b308cbe101 Add RAN-SA-B200-Module-SABOX-Container test 2022-07-14 23:54:53 +02:00
Robert Schmidt
4b50e4b1f6 CI: decode in getBefore() 2022-07-14 23:54:53 +02:00
Robert Schmidt
87d1a53ca3 CI: Allow publickey authentication in SSHConnection
For pubkey, checks that we are on the right machine
2022-07-14 23:53:52 +02:00
Robert Schmidt
5928d571e7 CI: Fix log message typo in UndeployObject() 2022-07-14 23:53:52 +02:00
Robert Schmidt
f1e3f7fb1f CI: Abort pipeline if DeployObject fails 2022-07-14 23:53:52 +02:00
Roberto Louro Magueta
b0bcff0da2 Fix build warnings in phy simulators 2022-07-08 11:17:28 +01:00
Roberto Louro Magueta
a574c47e9e Fix memory leak 2022-07-08 10:54:37 +01:00
Roberto Louro Magueta
03bea3150a Fix memory leak 2022-07-07 20:16:54 +01:00
Roberto Louro Magueta
70d7a6687b Merge nr_csi_rs_info_t plus nr_csi_im_info_t into nr_csi_info_t 2022-07-07 18:28:05 +01:00
Roberto Louro Magueta
3025627c06 Remove j, koverline and loverline from nr_csi_rs_info_t 2022-07-07 17:23:18 +01:00
Roberto Louro Magueta
36a9139a66 Remove N_cdm_groups, CDM_group_size, kprime and lprime from nr_csi_rs_info_t 2022-07-07 15:51:02 +01:00
Roberto Louro Magueta
e39be3917b Remove csi_rs_ls_estimated_channel and csi_rs_estimated_channel_freq from nr_csi_rs_info_t 2022-07-07 14:33:40 +01:00
Roberto Louro Magueta
acd4e39566 Remove csi_rs_received_signal from nr_csi_rs_info_t 2022-07-07 11:48:37 +01:00
Robert Schmidt
43c980d36b CI: NSA-B200-Container: no Qlog 2022-07-07 09:29:09 +02:00
francescomani
edcb1b2bf5 workaround for pbchsim 2022-07-07 08:57:37 +02:00
francescomani
79586c03f4 fix for pointa and ssboffset 2022-07-07 08:57:37 +02:00
Roberto Louro Magueta
e0e37d8215 To use cast for c16_t 2022-07-06 21:08:08 +01:00
Roberto Louro Magueta
0c2b3a1eeb Remove some variables from nr_csi_rs_info_t 2022-07-06 20:18:44 +01:00
luis_pereira87
24745eafca Rename variable from phy_procedures_errors to pusch_DTX 2022-07-06 08:45:48 +01:00
Roberto Louro Magueta
93f941ecfc Merge remote-tracking branch 'origin/develop-SRS-Measurements' into develop-SRS-MIMO
# Conflicts:
#	openair1/PHY/NR_ESTIMATION/nr_ul_channel_estimation.c
2022-07-05 20:11:03 +01:00
Roberto Louro Magueta
d68f7d6270 Add help string 2022-07-05 17:50:58 +01:00
Roberto Louro Magueta
dadadb7291 To use some casts to c16_t 2022-07-05 17:17:40 +01:00
Roberto Louro Magueta
e8327ffe74 Change k_0_p to stack allocation 2022-07-05 16:47:41 +01:00
Robert Schmidt
805b35643f Updates in TESTBench documentation
- Correct carabe name
- NR freq bands with "nXX"
- add amariue in figure
- minor changes
2022-07-05 16:38:52 +02:00
Roberto Louro Magueta
9a3326b63c Fixes after merge 2022-07-05 15:33:35 +01:00
francescomani
39b5d98c1e Merge remote-tracking branch 'origin/develop' into NR_BWP_config 2022-07-05 14:42:34 +02:00
Roberto Louro Magueta
06fa8c6a52 Merge remote-tracking branch 'origin/develop-SRS-Measurements' into develop-SRS-MIMO
# Conflicts:
#	openair1/PHY/INIT/nr_init.c
#	openair1/PHY/INIT/nr_init_ue.c
#	openair1/PHY/NR_ESTIMATION/nr_ul_channel_estimation.c
#	openair1/PHY/NR_ESTIMATION/nr_ul_estimation.h
#	openair1/PHY/defs_nr_common.h
#	openair1/SCHED_NR/phy_procedures_nr_gNB.c
2022-07-05 13:29:04 +01:00
Roberto Louro Magueta
52f6d38a34 Remove more variables from nr_srs_info_t 2022-07-05 12:58:53 +01:00
Roberto Louro Magueta
53f0773624 Merge remote-tracking branch 'origin/develop' into develop-SRS-Measurements 2022-07-05 11:07:43 +01:00
Roberto Louro Magueta
253e037fb2 Remove some variables from nr_srs_info_t 2022-07-05 11:07:01 +01:00
Roberto Louro Magueta
85802b828f Merge remote-tracking branch 'origin/develop' into develop-CSI-Measurements
# Conflicts:
#	openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c
2022-07-05 10:19:52 +01:00
Robert Schmidt
5091682551 Merge branch 'integration_2022_wk26' into 'develop'
integration_2022_wk26

See merge request oai/openairinterface5g!1605

MR !1602 Use (std) bool instead of custom bool types
MR !1600 Discard RTX if RI changed
MR !1598 Set correct master clock rate for N320
MR !1584 enablement of statistics
MR !1603 Fix decoding multiple ULSCH in the same slot in the case of a ULSCH fails to be detected
MR !1590 Improvements and AVX2 in cpx_rotate_vector()
2022-07-04 15:03:35 +00:00
Roberto Louro Magueta
2b36f2d8f2 Move nr_det_A_MF_2x2, nr_squared_matrix_element and nr_numer_2x2 to csi_rx.c 2022-07-04 14:18:04 +01:00
Roberto Louro Magueta
d864cf9457 Fix indentation 2022-07-04 11:31:33 +01:00
Ilario FAVERO
48906bf385 new handling of statistics for cpu and protocol via CLI telnet 2022-07-01 17:58:36 +02:00
Ilario FAVERO
5b97df2971 new handling of statistics for cpu and protocol via CLI telnet 2022-07-01 17:58:04 +02:00
Ilario FAVERO
1c0ff9b68d added new display function for cpu statistics that mimics the ones dumped in the file 2022-07-01 17:56:29 +02:00
Roberto Louro Magueta
c2fee0520c Fix variable redefinition 2022-06-30 17:59:11 +01:00
Robert Schmidt
2cced7bdb5 Merge remote-tracking branch 'origin/optim-rotate_cpx' into integration_2022_wk26 2022-06-30 15:41:28 +02:00
Robert Schmidt
b7e026fda5 Merge remote-tracking branch 'origin/fix_decoding_multi_ulsch_in_the_same_slot' into integration_2022_wk26 2022-06-29 23:15:15 +02:00
Robert Schmidt
4662ccc46a Merge remote-tracking branch 'origin/stats' into integration_2022_wk26 2022-06-29 23:15:06 +02:00
Robert Schmidt
ae54a1bd05 Merge remote-tracking branch 'origin/fix-n320' into integration_2022_wk26 2022-06-29 23:14:51 +02:00
Robert Schmidt
94ca30e82b Merge remote-tracking branch 'origin/NR_layers_in_harq' into integration_2022_wk26 2022-06-29 23:14:42 +02:00
laurent
df1cffbc7f fix bug introduced by avx2 rotate_cpx change to c16_t 2022-06-29 16:52:47 +02:00
francescomani
38dc925e75 temporary workaround for CQI MCS table 2022-06-29 16:06:58 +02:00
francescomani
605f837eb6 hardcoding the right AL and candidates 2022-06-29 10:00:34 +02:00
francescomani
f76ec13b89 some fixes 2022-06-28 15:47:18 +02:00
Robert Schmidt
ff5ec94d33 Address review: drop bool defines 2022-06-28 09:38:48 +02:00
luis_pereira87
d6e58c9436 Fix decoding multiple ULSCH in the same slot in the case of a ULSCH fails to be detected 2022-06-28 07:35:06 +01:00
laurent
5894bcac22 rebase develop 2022-06-27 18:48:45 +02:00
laurent
ef469b9b51 code review remarks 2022-06-27 18:35:47 +02:00
Laurent Thomas
980bb2420b fix CI discovered bug in avx2 rotate 2022-06-27 18:35:47 +02:00
Laurent Thomas
bf219fc24f avx2 and better simd algo 2022-06-27 18:35:46 +02:00
francescomani
0196dd6dc2 Merge remote-tracking branch 'origin/develop' into NR_RRC_harmonization_after_BWP 2022-06-27 14:44:04 +02:00
Roberto Louro Magueta
c1c6e6142d Merge remote-tracking branch 'origin/develop-SRS-Measurements' into develop-SRS-MIMO 2022-06-27 11:38:28 +01:00
francescomani
e27356500e Merge remote-tracking branch 'origin/develop' into NR_BWP_config 2022-06-27 12:33:41 +02:00
Roberto Louro Magueta
86755bc495 Merge remote-tracking branch 'origin/develop' into develop-SRS-Measurements
# Conflicts:
#	openair2/RRC/NR/MESSAGES/asn1_msg.c
2022-06-27 11:06:55 +01:00
Roberto Louro Magueta
2141d6b5af Merge remote-tracking branch 'origin/develop' into develop-CSI-Measurements
# Conflicts:
#	openair2/RRC/NR/nr_rrc_config.c
#	targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band66.fr1.106PRB.usrpn300.conf
#	targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.24PRB.usrpb210.conf
2022-06-27 10:24:58 +01:00
Robert Schmidt
0b91791f67 Use (std) bool instead of custom bool types
OAI is riddled with boolean_t, FALSE, TRUE, etc. This makes no sense, as
there is a standard bool type, and could lead to nasty bugs if a
definition of a bool is non-standard (0 == false, true == !false). This
commit removes all non-standard bools in the whole project.
2022-06-27 10:07:48 +02:00
Ilario FAVERO
c5b8fa5418 New command line arg for disabling stats: --disable-stats 2022-06-24 14:32:39 +02:00
Roberto Louro Magueta
6d7d884881 Merge branch 'develop-SRS-Measurements' into develop-SRS-MIMO
# Conflicts:
#	openair1/PHY/INIT/nr_init.c
#	openair1/PHY/INIT/nr_init_ue.c
#	openair1/PHY/defs_nr_common.h
2022-06-23 18:30:31 +01:00
Roberto Louro Magueta
07a3634e45 Change some heap allocations to stack allocations 2022-06-23 18:23:23 +01:00
francescomani
1565667908 remove rtx from list 2022-06-23 17:42:55 +02:00
Roberto Louro Magueta
1a4686b021 Remove UE->Msg4_ACKed from condition in nr_schedule_srs 2022-06-23 14:52:05 +01:00
Roberto Louro Magueta
05dde0a30d Compute CQI using CSI-IM 2022-06-22 20:59:19 +01:00
Roberto Louro Magueta
a1806c92a2 Interference plus noise power computation based on CSI-IM 2022-06-22 20:41:57 +01:00
Roberto Louro Magueta
b9a207a6b4 Call nr_slot_fep for CSI-IM symbols 2022-06-22 18:38:05 +01:00
Roberto Louro Magueta
32ec53baa5 Get CSI-IM pdu at phy layer and add debug logs 2022-06-22 18:10:28 +01:00
Roberto Louro Magueta
420ce60800 Fix flag related to received CSI-IM FAPI pdu at UE 2022-06-22 17:54:34 +01:00
Robert Schmidt
586aa46c2c Set correct master clock rate for N320 2022-06-22 16:54:35 +02:00
francescomani
6f481e09f6 abort rtx if RI decreased 2022-06-22 16:15:31 +02:00
francescomani
a24be04929 initializing nrofcandidates in dlsim 2022-06-21 09:52:12 +02:00
francescomani
83a9414258 srs and csi in BWP structures 2022-06-20 18:03:40 +02:00
francescomani
4e69a10cbc change BWP when Msg3_dcch_dtch 2022-06-20 11:41:19 +02:00
francescomani
d71658d373 Merge remote-tracking branch 'origin/develop' into NR_BWP_config 2022-06-20 11:20:19 +02:00
Roberto Louro Magueta
ad5a3e8d94 Fix warning after merge 2022-06-19 03:02:19 +01:00
Roberto Louro Magueta
f4bd7c7529 Merge remote-tracking branch 'origin/develop-SRS-Measurements' into develop-SRS-MIMO
# Conflicts:
#	openair1/PHY/NR_ESTIMATION/nr_ul_channel_estimation.c
#	openair1/PHY/NR_ESTIMATION/nr_ul_estimation.h
#	openair1/SCHED_NR/phy_procedures_nr_gNB.c
#	openair2/RRC/NR/nr_rrc_config.c
#	openair2/RRC/NR/nr_rrc_config.h
2022-06-19 02:44:03 +01:00
Roberto Louro Magueta
8fee72e81f Merge remote-tracking branch 'origin/develop' into develop-SRS-Measurements 2022-06-19 02:16:41 +01:00
Roberto Louro Magueta
504ce6d793 Fix after merge 2022-06-19 02:13:33 +01:00
Roberto Louro Magueta
63e30e29cc Merge remote-tracking branch 'origin/develop' into develop-CSI-Measurements
# Conflicts:
#	openair2/LAYER2/NR_MAC_gNB/config.c
2022-06-19 01:59:50 +01:00
francescomani
633370ffc3 further MAC cleanup with BWPs 2022-06-17 18:50:06 +02:00
francescomani
3cd49db442 removing ul active_bwp 2022-06-17 16:34:01 +02:00
francescomani
66e2810940 moving few parameters from pusch_semistatic to BWP 2022-06-17 12:18:29 +02:00
Roberto Louro Magueta
61e42ce9c6 Consider the invalid timing advance value case for SRS estimation 2022-06-16 13:29:30 +01:00
Roberto Louro Magueta
f6cbde5343 Add const qualifier in some variables 2022-06-16 12:49:13 +01:00
francescomani
40049db9c9 separate dl and ul bwp structures 2022-06-15 18:41:36 +02:00
francescomani
1be8caaf69 removing dl active_bwp 2022-06-14 18:15:42 +02:00
rmagueta
8c08e2d3ee Merge remote-tracking branch 'origin/develop-SRS-Measurements' into develop-SRS-MIMO 2022-06-13 12:52:56 +01:00
rmagueta
7b770042ad Merge remote-tracking branch 'origin/develop' into develop-SRS-Measurements
# Conflicts:
#	openair2/LAYER2/NR_MAC_gNB/main.c
#	openair2/RRC/NR/MESSAGES/asn1_msg.c
2022-06-13 12:00:11 +01:00
rmagueta
e32d55dff9 Update the feature set for the UE 2022-06-13 11:30:37 +01:00
Ilario FAVERO
fbdc6f0fd0 Changed default behavior for statistics generation. You can disable them via commandline arg --disable-stats 2022-06-13 11:34:05 +02:00
rmagueta
607561af6c Merge remote-tracking branch 'origin/develop' into develop-CSI-Measurements
# Conflicts:
#	openair2/RRC/NR/MESSAGES/asn1_msg.c
2022-06-13 10:32:21 +01:00
francescomani
e592045d8f improvements in using genericParameters and other stuff 2022-06-10 18:18:57 +02:00
francescomani
c1c5c68e70 calling get_searchspace/coreset inside BWP function 2022-06-10 13:55:57 +02:00
francescomani
5fa3be8091 Merge remote-tracking branch 'origin/NR_RRC_MAC_CellGroup' into NR_BWP_config 2022-06-10 10:17:00 +02:00
Ilario FAVERO
6c201d6239 new command line arg for enabling stats 2022-06-09 12:53:44 +02:00
Roberto Louro Magueta
87d69126af Merge remote-tracking branch 'origin/develop-SRS-Measurements' into develop-SRS-MIMO 2022-06-09 01:13:44 +01:00
Roberto Louro Magueta
8c577ff253 Merge remote-tracking branch 'origin/develop' into develop-SRS-Measurements
# Conflicts:
#	openair2/RRC/NR/MESSAGES/asn1_msg.c
#	targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.usrpb210.conf
2022-06-09 00:56:55 +01:00
Roberto Louro Magueta
55e943c347 Remove obsolete code after merge 2022-06-09 00:48:39 +01:00
Roberto Louro Magueta
d11705260f Merge remote-tracking branch 'origin/develop' into develop-CSI-Measurements
# Conflicts:
#	openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c
#	openair2/RRC/NR/MESSAGES/asn1_msg.c
2022-06-09 00:33:12 +01:00
francescomani
9f4153b55b Merge remote-tracking branch 'origin/develop' into NR_UE_multi_SSB_meas 2022-06-08 14:10:54 +02:00
francescomani
6c69393eda genericParameters in the new structure 2022-06-08 12:22:16 +02:00
francescomani
4d4f7dd616 initial commit for MAC UE BWP structure (bwp id) 2022-06-07 12:11:37 +02:00
francescomani
b5583d47de temporary workaround for RRC passing CG to MAC (forced encoding of message at MAC) 2022-06-06 11:52:12 +02:00
Roberto Louro Magueta
b8f68c81fb Merge remote-tracking branch 'origin/develop-SRS-Measurements' into develop-SRS-MIMO 2022-06-01 17:30:33 +01:00
Roberto Louro Magueta
616927c04d Fixes after merge 2022-06-01 17:22:59 +01:00
Roberto Louro Magueta
1bb0ce90cc Merge remote-tracking branch 'origin/develop' into develop-SRS-Measurements
# Conflicts:
#	openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c
#	openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_srs.c
#	openair2/LAYER2/NR_MAC_gNB/main.c
2022-06-01 15:46:37 +01:00
Roberto Louro Magueta
91189bd4f8 Fixes after merge 2022-06-01 14:30:45 +01:00
Roberto Louro Magueta
98f5478f7d Merge remote-tracking branch 'origin/develop-CSI' into develop-CSI-Measurements
# Conflicts:
#	openair2/LAYER2/NR_MAC_gNB/config.c
#	openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c
#	openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c
#	openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c
#	openair2/LAYER2/NR_MAC_gNB/mac_proto.h
2022-06-01 12:29:34 +01:00
rmagueta
e6446392b2 Merge remote-tracking branch 'origin/develop-SRS-Measurements' into develop-SRS-MIMO 2022-05-27 11:55:31 +01:00
rmagueta
264eebfb3f Fix build after merge 2022-05-27 11:54:53 +01:00
rmagueta
628a11cde5 Merge remote-tracking branch 'origin/develop' into develop-SRS-Measurements
# Conflicts:
#	openair2/GNB_APP/MACRLC_nr_paramdef.h
#	openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c
2022-05-27 11:38:32 +01:00
rmagueta
2f3079b808 Merge remote-tracking branch 'origin/develop-CSI' into develop-CSI-Measurements
# Conflicts:
#	openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c
#	openair2/RRC/NR/nr_rrc_config.c
2022-05-27 11:13:02 +01:00
Roberto Louro Magueta
e1198b3d96 Add debug logs and comment update for nrofSRS_Ports 2022-05-25 17:30:17 +01:00
Roberto Louro Magueta
17a3a796b8 Merge remote-tracking branch 'origin/develop-SRS-Measurements' into develop-SRS-MIMO 2022-05-25 11:07:59 +01:00
Roberto Louro Magueta
8d02c2c0fc Fix scheduling SRS transmission at UE when there is Dedicated BWPs 2022-05-25 11:06:55 +01:00
Roberto Louro Magueta
af95f834f1 Fix scheduling SRS reception at gNB when there is Dedicated BWPs 2022-05-25 10:36:30 +01:00
Roberto Louro Magueta
40f2f54339 Fix memory allocation for SRS 2022-05-24 17:40:55 +01:00
Roberto Louro Magueta
6e5b77baf3 Merge remote-tracking branch 'origin/develop-CSI' into develop-CSI-Measurements
# Conflicts:
#	openair2/RRC/NR/MESSAGES/asn1_msg.c
2022-05-24 14:55:22 +01:00
Roberto Louro Magueta
58102d24d8 Configuration of nrofSRS_Ports based on UE capability 2022-05-23 20:33:12 +01:00
Roberto Louro Magueta
d8dbd2159c Merge remote-tracking branch 'origin/develop-SRS-Measurements' into develop-SRS-MIMO
# Conflicts:
#	openair1/PHY/NR_TRANSPORT/srs_rx.c
2022-05-23 13:40:35 +01:00
Roberto Louro Magueta
5092eca8cb Some robustness improvements 2022-05-23 13:30:38 +01:00
Roberto Louro Magueta
0eeb174253 Add wideband SNR based on SRS in MAC stats 2022-05-23 11:43:32 +01:00
Roberto Louro Magueta
9e2086c77c Fix warning after merge 2022-05-23 11:29:59 +01:00
Roberto Louro Magueta
01c6129ee1 Merge remote-tracking branch 'origin/develop' into develop-SRS-Measurements
# Conflicts:
#	openair2/RRC/NR/MESSAGES/asn1_msg.c
2022-05-23 10:43:50 +01:00
Roberto Louro Magueta
8bc5f273bd Improve log 2022-05-21 01:24:02 +01:00
Roberto Louro Magueta
23dab34e7c Fix CSI bitlen for rank = 2 2022-05-21 01:15:26 +01:00
Roberto Louro Magueta
c67d3659f1 Fix precoded_sinr_dB computation for rank = 2 2022-05-20 21:12:06 +01:00
Roberto Louro Magueta
4eac17e1c8 Fix in RI computation 2022-05-20 20:51:22 +01:00
francescomani
b57a8622c0 fixes for RRC configuration in SA 2022-05-19 17:41:58 +02:00
Roberto Louro Magueta
7018b7c841 Fixes after merge 2022-05-19 13:38:22 +01:00
Roberto Louro Magueta
9887982e00 Merge remote-tracking branch 'origin/develop-CSI' into develop-CSI-Measurements
# Conflicts:
#	openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c
#	openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h
#	openair2/RRC/NR/MESSAGES/asn1_msg.c
2022-05-19 13:21:00 +01:00
Roberto Louro Magueta
e6e6fdedf9 Free allocated variables for SRS 2022-05-17 18:53:05 +01:00
Roberto Louro Magueta
2ef5edd17c Remove sc_list_length and sc_list variables 2022-05-17 18:16:54 +01:00
Roberto Louro Magueta
86874047ac Channel estimation, channel interpolation and SNR per RB computation based on SRS up to 4 antenna ports 2022-05-17 17:42:48 +01:00
francescomani
7a26d75634 other changes required for multiple BWP CSI config 2022-05-17 18:18:15 +02:00
francescomani
075e8c6d8f Merge remote-tracking branch 'origin/develop' into NR_RRC_harmonization_after_BWP 2022-05-17 15:27:12 +02:00
francescomani
a67791d18e init ssb rsrp vector 2022-05-16 19:37:16 +02:00
Roberto Louro Magueta
997d52b71d Improvements in nr_get_srs_signal to consider multi-ports and multi-symbols 2022-05-16 18:11:01 +01:00
francescomani
ef20a5c3b2 additional fixes in multi-ssb report at UE 2022-05-16 18:09:29 +02:00
francescomani
2f81e507d7 fixes for pbch detection and measurements on multiple SSBs 2022-05-16 15:11:09 +02:00
francescomani
9277afe327 measureing RSRP on all SSBs 2022-05-16 11:59:39 +02:00
Roberto Louro Magueta
52bc76d904 Fixes and improvements in generate_srs_nr function 2022-05-14 21:01:42 +01:00
Roberto Louro Magueta
f6bc787d1e Add comments in nfapi_nr_srs_pdu_t 2022-05-14 00:38:00 +01:00
Roberto Louro Magueta
32de221553 Fix SRS mapping for multiple ports 2022-05-11 19:54:35 +01:00
Roberto Louro Magueta
ccb1e64a38 Merge branch 'bupt-ulmimo-4' into develop-SRS-MIMO 2022-05-11 18:36:50 +01:00
Roberto Louro Magueta
0ddd8c2586 Merge remote-tracking branch 'origin/develop-CSI' into develop-CSI-Measurements
# Conflicts:
#	openair2/RRC/NR/MESSAGES/asn1_msg.c
#	openair2/RRC/NR/nr_rrc_config.h
2022-05-11 14:36:21 +01:00
Roberto Louro Magueta
1c9ef67384 Merge remote-tracking branch 'origin/develop' into develop-SRS-Measurements
# Conflicts:
#	openair2/RRC/NR/MESSAGES/asn1_msg.c
#	openair2/RRC/NR/nr_rrc_config.c
#	openair2/RRC/NR/nr_rrc_config.h
2022-05-11 13:27:21 +01:00
Roberto Louro Magueta
ba5bda5c6e Fix bw_scaling 2022-05-10 15:00:43 +01:00
Roberto Louro Magueta
08975e451f Update the ul_prbblacklist based on SRS measurements and an ul_prbblack_SNR_threshold 2022-05-10 14:03:24 +01:00
Roberto Louro Magueta
5ed67b85a7 Free allocated memory 2022-05-10 13:03:41 +01:00
Roberto Louro Magueta
61a2f398db Add LOGs of SRS indication in handle_nr_srs_measurements 2022-05-10 10:43:24 +01:00
Roberto Louro Magueta
99b262d764 Compute and fill timing_advance field for SRS indication 2022-05-09 19:25:33 +01:00
Roberto Louro Magueta
bdff42cf77 Compute and fill wide_band_snr field for SRS indication 2022-05-09 18:21:04 +01:00
Roberto Louro Magueta
d914817806 Fill srs_reported_symbol_list in SRS indication 2022-05-09 17:58:42 +01:00
Roberto Louro Magueta
ab6d7afd09 Compute the SNR per RB using the SRS 2022-05-09 15:54:20 +01:00
Roberto Louro Magueta
dcf4fd1db2 Compute the noise power per RB 2022-05-06 19:07:59 +01:00
Roberto Louro Magueta
05fffa4916 Merge remote-tracking branch 'origin/develop' into develop-SRS-Measurements
# Conflicts:
#	openair2/RRC/NR/MESSAGES/asn1_msg.c
#	targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.band78.tm1.106PRB.usrpn300.gtp-itti.conf
#	targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band41.fr1.106PRB.usrpb210.conf
#	targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.usrpb210.conf
2022-05-06 13:39:45 +01:00
Roberto Louro Magueta
fc5632eeb9 Merge remote-tracking branch 'origin/develop-CSI' into develop-CSI-Measurements
# Conflicts:
#	openair1/PHY/NR_ESTIMATION/nr_measurements_gNB.c
#	openair1/PHY/NR_TRANSPORT/nr_dci.c
#	openair1/PHY/NR_TRANSPORT/pucch_rx.c
#	openair2/GNB_APP/gnb_config.c
#	openair2/GNB_APP/gnb_paramdef.h
#	openair2/LAYER2/NR_MAC_gNB/config.c
#	openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c
#	openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c
#	openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c
#	openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c
#	openair2/LAYER2/nr_pdcp/nr_pdcp_oai_api.c
#	openair2/RRC/NR/MESSAGES/asn1_msg.c
#	targets/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp
#	targets/PROJECTS/GENERIC-NR-5GC/CONF/cu_gnb.conf
2022-05-06 13:16:48 +01:00
Roberto Louro Magueta
dce83a0508 Add comments in FAPI for SRS indication 2022-05-05 19:49:06 +01:00
Roberto Louro Magueta
b106913dc0 Send SRS measurements (still empty) from PHY to MAC 2022-05-05 18:10:08 +01:00
Roberto Louro Magueta
2fb8d96f11 Move SRS config to update_cellGroupConfig() 2022-05-04 16:25:15 +01:00
Roberto Louro Magueta
70cfd057ec Add do_SRS flag in gnb.sa.band78.fr1.106PRB.usrpb210.conf 2022-05-04 15:09:59 +01:00
Roberto Louro Magueta
39ea2c936f Creation of config_srs() function 2022-05-04 15:05:23 +01:00
luis_pereira87
952a216b92 Remove sib1_tda from configuration files to use default value 2022-05-04 12:49:23 +01:00
Roberto Louro Magueta
73a1e92249 Fix memory leaks 2022-05-03 12:09:19 +01:00
rmagueta
2f753873bc Fix warning: this ‘if’ clause does not guard... [-Wmisleading-indentation] 2022-04-30 16:12:27 +01:00
rmagueta
751335765f Merge remote-tracking branch 'origin/develop-CSI' into develop-CSI-Measurements
# Conflicts:
#	openair1/PHY/NR_ESTIMATION/nr_measurements_gNB.c
#	openair1/PHY/NR_TRANSPORT/pucch_rx.c
#	openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c
#	openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c
#	openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c
#	openair2/RRC/NR/nr_rrc_config.c
2022-04-30 15:52:48 +01:00
francescomani
7733ac1857 bwp-based csi configuration (to be verified) 2022-04-27 19:28:22 +02:00
rmagueta
eb12cb8f10 Fix CI test for FR2 RA 2022-04-18 15:19:29 +01:00
francescomani
10b8e1b34c harmonization of uplink BWPs configuration 2022-04-18 11:59:40 +02:00
rmagueta
a4a5c6ae22 Merge remote-tracking branch 'origin/develop-CSI' into develop-CSI-Measurements 2022-04-18 10:42:04 +01:00
francescomani
28f3997ea6 Merge remote-tracking branch 'origin/NR_PUCCH_RRC_Resources' into NR_RRC_harmonization_after_BWP 2022-04-18 10:06:02 +02:00
francescomani
c791b45adc harmonization of downlink BWPs configuration 2022-04-16 14:34:00 +02:00
francescomani
b62e7be276 adding harmonization of coreset configuration to multiple BWPs 2022-04-16 10:13:02 +02:00
francescomani
6989d4ecba harmonization of coreset configuration 2022-04-16 09:53:06 +02:00
francescomani
3a0cb80469 Merge remote-tracking branch 'origin/nr_csirs_rrc_harmonization' into NR_RRC_harmonization_after_BWP 2022-04-15 13:54:25 +02:00
rmagueta
ad3253fef6 Move CSI-RS configuration from fill_initial_SpCellConfig to update_cellGroupConfig 2022-04-13 19:45:10 +01:00
rmagueta
9def6e815d Merge remote-tracking branch 'origin/develop-2x2-segFault' into develop-CSI-Measurements 2022-04-13 17:55:40 +01:00
rmagueta
27bac2f2c4 The RI, PMI and CQI estimated at the UE are sent by the UE and correctly received by the gNB 2022-04-13 15:33:37 +01:00
rmagueta
cd6ee6a01e Fix build after merge 2022-04-13 11:12:49 +01:00
rmagueta
9b1db62f38 Merge remote-tracking branch 'origin/develop-CSI' into develop-CSI-Measurements 2022-04-13 10:40:58 +01:00
rmagueta
40279dddf3 Get cri_bitlen, ri_bitlen, pmi_bitlen and cqi_bitlen at UE 2022-04-13 01:07:01 +01:00
rmagueta
04b234c878 Send CSI-RS measurements from PHY to MAC at UE 2022-04-12 19:06:02 +01:00
francescomani
1745ffa10f adapting nr_rrc_config_dl_tda for multiple BWPs 2022-04-12 17:36:52 +02:00
rmagueta
1d86347587 Merge remote-tracking branch 'origin/develop-CSI' into develop-CSI-Measurements
# Conflicts:
#	openair1/PHY/INIT/nr_init_ue.c
#	openair1/PHY/NR_TRANSPORT/nr_dci.c
#	openair2/RRC/NR/MESSAGES/asn1_msg.c
2022-04-12 14:48:08 +01:00
rmagueta
3969079fcd Merge remote-tracking branch 'origin/develop-CSI' into develop-CSI-Measurements
# Conflicts:
#	openair2/GNB_APP/gnb_paramdef.h
#	openair2/LAYER2/nr_pdcp/nr_pdcp_oai_api.c
2022-04-08 19:49:40 +01:00
rmagueta
8ffecf4bdf CQI computation 2022-04-07 19:58:56 +01:00
rmagueta
d6a155a803 SINR in dB 2022-04-07 19:30:33 +01:00
rmagueta
7286552aa5 Improvements in PMI computation to allow computation CQI more easily 2022-04-07 18:58:18 +01:00
rmagueta
bf56e881b2 Fix log 2022-04-06 18:43:56 +01:00
rmagueta
6e4bbe8f49 PMI computation for rank=2 case 2022-04-06 18:42:00 +01:00
rmagueta
66b3fffbf0 Minor improvements 2022-04-06 17:44:47 +01:00
rmagueta
8e58e83be6 Remove log 2022-04-06 14:52:34 +01:00
rmagueta
4ee6005a50 Merge remote-tracking branch 'origin/develop-CSI' into develop-CSI-Measurements
# Conflicts:
#	openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c
2022-04-06 13:30:04 +01:00
rmagueta
886b580fac PMI computation for rank=1 case 2022-04-05 19:56:13 +01:00
rmagueta
4254d59a96 Create nr_csi_rs_pmi_estimation function for PMI computation (still almost empty) 2022-04-04 20:13:33 +01:00
rmagueta
f12c6ea65b Add log2_maxh for nr_conjch0_mult_ch1 in nr_csi_rs_ri_estimation 2022-04-04 15:55:16 +01:00
rmagueta
03f7bd3468 Remove unused input in nr_csi_rs_ri_estimation 2022-04-04 14:44:22 +01:00
rmagueta
c37e0af9b0 Change LOG levels 2022-04-04 14:42:37 +01:00
rmagueta
ef63aa45e6 Merge remote-tracking branch 'origin/develop-CSI' into develop-CSI-Measurements 2022-04-04 13:51:52 +01:00
rmagueta
e628c8c2c4 Fix build after merge 2022-04-01 20:13:06 +01:00
rmagueta
2deec7fa09 Merge remote-tracking branch 'origin/develop-CSI' into develop-CSI-Measurements
# Conflicts:
#	openair1/PHY/INIT/nr_init_ue.c
#	openair2/GNB_APP/gnb_config.c
#	openair2/GNB_APP/gnb_paramdef.h
#	openair2/RRC/NR/MESSAGES/asn1_msg.c
#	openair2/RRC/NR/rrc_gNB_reconfig.c
2022-04-01 19:36:57 +01:00
rmagueta
bc2ea375c8 Replace nr_construct_HhH_elements by nr_a_sum_b function in nr_csi_rs_ri_estimation 2022-03-31 20:30:00 +01:00
rmagueta
da1e542a31 Fix dl_antenna_ports after merge 2022-03-30 20:14:57 +01:00
rmagueta
fba2df7557 Fix config files after merge 2022-03-30 19:27:24 +01:00
rmagueta
4c0427ea6c Merge remote-tracking branch 'origin/nr_mimo_precoding_codebook_I' into develop-CSI-Measurements
# Conflicts:
#	openair1/PHY/INIT/nr_init_ue.c
#	openair2/GNB_APP/gnb_config.c
#	openair2/GNB_APP/gnb_paramdef.h
#	targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band41.fr1.106PRB.usrpb210.conf
#	targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.usrpb210.conf
#	targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.162PRB.2x2.usrpn300.conf
2022-03-30 19:23:22 +01:00
rmagueta
38d0dca0bf Minor fixes 2022-03-30 17:00:25 +01:00
rmagueta
ef4d8ab0c7 Merge remote-tracking branch 'origin/develop' into develop-CSI-Measurements 2022-03-30 16:17:17 +01:00
rmagueta
c7a54269de First version of rank indicator computation at UE 2022-03-30 16:16:58 +01:00
rmagueta
1d1aaa30e7 Merge remote-tracking branch 'origin/develop-CSI' into develop-CSI-Measurements
# Conflicts:
#	openair1/PHY/INIT/nr_init.c
#	openair1/PHY/INIT/nr_init_ue.c
#	openair1/PHY/NR_TRANSPORT/nr_csi_rs.c
#	openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c
2022-03-28 15:06:23 +01:00
rmagueta
3e664b5eb7 Fix warning 2022-03-22 18:28:49 +00:00
rmagueta
e834acfaf2 Temporary commit to test CSI-RS without core 2022-03-22 18:25:29 +00:00
rmagueta
17504695f8 Fix updated configurations that was reverted in merge 2022-03-22 18:02:12 +00:00
rmagueta
184e151fde Fix build after merge 2022-03-22 17:40:06 +00:00
rmagueta
a47861628b Merge remote-tracking branch 'origin/develop-CSI' into develop-CSI-Measurements
# Conflicts:
#	openair1/PHY/INIT/nr_init.c
#	openair1/PHY/INIT/nr_init_ue.c
#	openair1/PHY/NR_REFSIG/nr_gold.c
#	openair1/PHY/NR_TRANSPORT/nr_csi_rs.c
#	openair1/PHY/defs_nr_common.h
#	openair2/LAYER2/NR_MAC_gNB/config.c
#	openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c
#	openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c
#	openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c
#	openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c
#	openair2/RRC/NR/MESSAGES/asn1_msg.c
#	openair2/RRC/NR/nr_rrc_proto.h
#	openair2/RRC/NR/rrc_gNB_reconfig.c
#	targets/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp
2022-03-22 17:18:22 +00:00
471 changed files with 12496 additions and 130159 deletions

View File

@@ -238,6 +238,26 @@ pipeline {
}
}
}
stage ("4G L2 Simulators") {
when { expression {doMandatoryTests} }
steps {
script {
triggerSlaveJob ('RAN-L2-Sim-Test-4G', 'Test-L2-Sim-Container-4G')
}
}
post {
always {
script {
finalizeSlaveJob('RAN-L2-Sim-Test-4G')
}
}
failure {
script {
currentBuild.result = 'FAILURE'
}
}
}
}
stage ("5G L2 Simulators") {
when { expression {doMandatoryTests} }
steps {
@@ -278,6 +298,26 @@ pipeline {
}
}
}
stage ("SA B200 Sanity Check") {
when { expression {doMandatoryTests} }
steps {
script {
triggerSlaveJob ('RAN-SA-B200-Module-SABOX-Container', 'Test-SA-B200')
}
}
post {
always {
script {
finalizeSlaveJob('RAN-SA-B200-Module-SABOX-Container')
}
}
failure {
script {
currentBuild.result = 'FAILURE'
}
}
}
}
stage ("Test OAI NR UE - OAI gNB - TDD - Band 78 - N300") {
when { expression {doMandatoryTests} }
steps {

View File

@@ -416,29 +416,6 @@ pipeline {
}
}
}
stage ("Test F1 - FDD - Band 7 - B210") {
when {
expression {doFullTestsuite}
}
steps {
script {
sh "sleep 60"
triggerSlaveJob ('eNB-CI-F1-FDD-Band7-B210', 'Test-F1-FDD-Band7')
}
}
post {
always {
script {
finalizeSlaveJob('eNB-CI-F1-FDD-Band7-B210')
}
}
failure {
script {
currentBuild.result = 'FAILURE'
}
}
}
}
stage ("Test IF4p5 - TDD - Band 40 - B210") {
when {
expression {doFullTestsuite}

View File

@@ -66,7 +66,7 @@ pipeline {
withCredentials([
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.DH_Credentials}", usernameVariable: 'DH_Username', passwordVariable: 'DH_Password']
]) {
def listOfImages = ["oai-enb", "oai-gnb", "oai-lte-ue", "oai-nr-ue"]
def listOfImages = ["oai-enb", "oai-gnb", "oai-lte-ue", "oai-nr-ue", "proxy"]
sh "docker login -u ${DH_Username} -p ${DH_Password} > /dev/null 2>&1"
listOfImages.eachWithIndex { item, iindex ->
sh "docker image tag ${item}:develop ${DH_Account}/${item}:develop"

View File

@@ -36,6 +36,9 @@ def testStageName = params.pipelineTestStageName
// Name of the phone resource
def ciSmartPhoneResource = params.smartphonesResource
// Name of the phone resource
def ciEpcResource = params.epcResource
// Global Parameters. Normally they should be populated when the master job
// triggers the slave job with parameters
def eNB_Repository
@@ -51,7 +54,7 @@ pipeline {
options {
disableConcurrentBuilds()
ansiColor('xterm')
lock (ciSmartPhoneResource)
lock(extra: [[resource: ciEpcResource]], resource: ciSmartPhoneResource)
}
stages {
stage ("Verify Parameters") {
@@ -216,6 +219,76 @@ pipeline {
}
}
}
stage ("Terminate") {
parallel {
stage('Terminate UE') {
// Bypassing this stage if there are no abd server defined
when {
expression { params.ADB_IPAddress != "none" }
}
steps {
echo '\u2705 \u001B[32mTerminate UE\u001B[0m'
withCredentials([
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.ADB_Credentials}", usernameVariable: 'ADB_Username', passwordVariable: 'ADB_Password']
]) {
sh "python3 ci-scripts/main.py --mode=TerminateUE --ADBIPAddress=${params.ADB_IPAddress} --ADBUserName=${ADB_Username} --ADBPassword=${ADB_Password}"
}
}
}
stage('Terminate eNB') {
steps {
echo '\u2705 \u001B[32mTerminate eNB\u001B[0m'
withCredentials([
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.eNB_Credentials}", usernameVariable: 'eNB_Username', passwordVariable: 'eNB_Password']
]) {
sh "python3 ci-scripts/main.py --mode=TerminateeNB --eNBIPAddress=${params.eNB_IPAddress} --eNBUserName=${eNB_Username} --eNBPassword=${eNB_Password}"
}
}
}
stage('Terminate SPGW') {
// Bypassing this stage if EPC server is not defined
when {
expression { params.EPC_IPAddress != "none" }
}
steps {
echo '\u2705 \u001B[32mTerminate SPGW\u001B[0m'
withCredentials([
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.EPC_Credentials}", usernameVariable: 'EPC_Username', passwordVariable: 'EPC_Password']
]) {
sh "python3 ci-scripts/main.py --mode=TerminateSPGW --EPCIPAddress=${params.EPC_IPAddress} --EPCUserName=${EPC_Username} --EPCPassword=${EPC_Password} --EPCType=${params.EPC_Type} --EPCSourceCodePath=${params.EPC_SourceCodePath}"
}
}
}
stage('Terminate MME') {
// Bypassing this stage if EPC server is not defined
when {
expression { params.EPC_IPAddress != "none" }
}
steps {
echo '\u2705 \u001B[32mTerminate MME\u001B[0m'
withCredentials([
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.EPC_Credentials}", usernameVariable: 'EPC_Username', passwordVariable: 'EPC_Password']
]) {
sh "python3 ci-scripts/main.py --mode=TerminateMME --EPCIPAddress=${params.EPC_IPAddress} --EPCUserName=${EPC_Username} --EPCPassword=${EPC_Password} --EPCType=${params.EPC_Type} --EPCSourceCodePath=${params.EPC_SourceCodePath}"
}
}
}
stage('Terminate HSS') {
// Bypassing this stage if EPC server is not defined
when {
expression { params.EPC_IPAddress != "none" }
}
steps {
echo '\u2705 \u001B[32mTerminate HSS\u001B[0m'
withCredentials([
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.EPC_Credentials}", usernameVariable: 'EPC_Username', passwordVariable: 'EPC_Password']
]) {
sh "python3 ci-scripts/main.py --mode=TerminateHSS --EPCIPAddress=${params.EPC_IPAddress} --EPCUserName=${EPC_Username} --EPCPassword=${EPC_Password} --EPCType=${params.EPC_Type} --EPCSourceCodePath=${params.EPC_SourceCodePath}"
}
}
}
}
}
stage('Log Collection') {
parallel {
stage('Log Collection (eNB - Build)') {
@@ -242,7 +315,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"
@@ -259,6 +332,116 @@ pipeline {
}
}
}
stage('Log Collection (SPGW)') {
// Bypassing this stage if EPC server is not defined
when {
expression { params.EPC_IPAddress != "none" }
}
steps {
withCredentials([
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.EPC_Credentials}", usernameVariable: 'EPC_Username', passwordVariable: 'EPC_Password']
]) {
echo '\u2705 \u001B[32mLog Collection (SPGW)\u001B[0m'
sh "python3 ci-scripts/main.py --mode=LogCollectSPGW --EPCIPAddress=${params.EPC_IPAddress} --EPCUserName=${EPC_Username} --EPCPassword=${EPC_Password} --EPCSourceCodePath=${params.EPC_SourceCodePath} --EPCType=${params.EPC_Type}"
echo '\u2705 \u001B[32mLog Transfer (SPGW)\u001B[0m'
sh "sshpass -p \'${EPC_Password}\' scp -o 'StrictHostKeyChecking no' -o 'ConnectTimeout 10' ${EPC_Username}@${params.EPC_IPAddress}:${EPC_SourceCodePath}/scripts/spgw.log.zip ./spgw.log.${env.BUILD_ID}.zip || true"
}
script {
if(fileExists("spgw.log.${env.BUILD_ID}.zip")) {
archiveArtifacts "spgw.log.${env.BUILD_ID}.zip"
}
}
}
}
stage('Log Collection (MME)') {
// Bypassing this stage if EPC server is not defined
when {
expression { params.EPC_IPAddress != "none" }
}
steps {
withCredentials([
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.EPC_Credentials}", usernameVariable: 'EPC_Username', passwordVariable: 'EPC_Password']
]) {
echo '\u2705 \u001B[32mLog Collection (MME)\u001B[0m'
sh "python3 ci-scripts/main.py --mode=LogCollectMME --EPCIPAddress=${params.EPC_IPAddress} --EPCUserName=${EPC_Username} --EPCPassword=${EPC_Password} --EPCSourceCodePath=${params.EPC_SourceCodePath} --EPCType=${params.EPC_Type}"
echo '\u2705 \u001B[32mLog Transfer (MME)\u001B[0m'
sh "sshpass -p \'${EPC_Password}\' scp -o 'StrictHostKeyChecking no' -o 'ConnectTimeout 10' ${EPC_Username}@${params.EPC_IPAddress}:${EPC_SourceCodePath}/scripts/mme.log.zip ./mme.log.${env.BUILD_ID}.zip || true"
}
script {
if(fileExists("mme.log.${env.BUILD_ID}.zip")) {
archiveArtifacts "mme.log.${env.BUILD_ID}.zip"
}
}
}
}
stage('Log Collection (HSS)') {
// Bypassing this stage if EPC server is not defined
when {
expression { params.EPC_IPAddress != "none" }
}
steps {
withCredentials([
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.EPC_Credentials}", usernameVariable: 'EPC_Username', passwordVariable: 'EPC_Password']
]) {
echo '\u2705 \u001B[32mLog Collection (HSS)\u001B[0m'
sh "python3 ci-scripts/main.py --mode=LogCollectHSS --EPCIPAddress=${params.EPC_IPAddress} --EPCUserName=${EPC_Username} --EPCPassword=${EPC_Password} --EPCSourceCodePath=${params.EPC_SourceCodePath} --EPCType=${params.EPC_Type}"
echo '\u2705 \u001B[32mLog Transfer (HSS)\u001B[0m'
sh "sshpass -p \'${EPC_Password}\' scp -o 'StrictHostKeyChecking no' -o 'ConnectTimeout 10' ${EPC_Username}@${params.EPC_IPAddress}:${EPC_SourceCodePath}/scripts/hss.log.zip ./hss.log.${env.BUILD_ID}.zip || true"
}
script {
if(fileExists("hss.log.${env.BUILD_ID}.zip")) {
archiveArtifacts "hss.log.${env.BUILD_ID}.zip"
}
}
}
}
stage('Log Collection (Ping)') {
// Bypassing this stage if EPC server is not defined
when {
expression { params.EPC_IPAddress != "none" }
}
steps {
withCredentials([
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.EPC_Credentials}", usernameVariable: 'EPC_Username', passwordVariable: 'EPC_Password']
]) {
echo '\u2705 \u001B[32mLog Collection (Ping)\u001B[0m'
sh "python3 ci-scripts/main.py --mode=LogCollectPing --EPCIPAddress=${params.EPC_IPAddress} --EPCUserName=${EPC_Username} --EPCPassword=${EPC_Password} --EPCSourceCodePath=${params.EPC_SourceCodePath} --EPCType=${params.EPC_Type}"
echo '\u2705 \u001B[32mLog Transfer (Ping)\u001B[0m'
sh "sshpass -p \'${EPC_Password}\' scp -o 'StrictHostKeyChecking no' -o 'ConnectTimeout 10' ${EPC_Username}@${params.EPC_IPAddress}:${EPC_SourceCodePath}/scripts/ping.log.zip ./ping.log.${env.BUILD_ID}.zip || true"
}
script {
if(fileExists("ping.log.${env.BUILD_ID}.zip")) {
archiveArtifacts "ping.log.${env.BUILD_ID}.zip"
}
}
}
}
stage('Log Collection (Iperf)') {
// Bypassing this stage if EPC server is not defined
when {
expression { params.EPC_IPAddress != "none" }
}
steps {
withCredentials([
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.EPC_Credentials}", usernameVariable: 'EPC_Username', passwordVariable: 'EPC_Password']
]) {
echo '\u2705 \u001B[32mLog Collection (Iperf)\u001B[0m'
sh "python3 ci-scripts/main.py --mode=LogCollectIperf --EPCIPAddress=${params.EPC_IPAddress} --EPCUserName=${EPC_Username} --EPCPassword=${EPC_Password} --EPCSourceCodePath=${params.EPC_SourceCodePath} --EPCType=${params.EPC_Type}"
echo '\u2705 \u001B[32mLog Transfer (Iperf)\u001B[0m'
sh "sshpass -p \'${EPC_Password}\' scp -o 'StrictHostKeyChecking no' -o 'ConnectTimeout 10' ${EPC_Username}@${params.EPC_IPAddress}:${EPC_SourceCodePath}/scripts/iperf.log.zip ./iperf.log.${env.BUILD_ID}.zip || true"
}
script {
if(fileExists("iperf.log.${env.BUILD_ID}.zip")) {
archiveArtifacts "iperf.log.${env.BUILD_ID}.zip"
}
}
}
}
}
}
}

View File

@@ -20,6 +20,9 @@
* contact@openairinterface.org
*/
// necessary for reading JSON
import groovy.json.JsonSlurper
// Template Jenkins Declarative Pipeline script to run Test w/ RF HW
// Location of the python executor node shall be in the same subnet as the others servers
@@ -37,12 +40,12 @@ pipeline {
stages {
stage ("Launcher") {
steps {
script {
//retrieve MR that are opened nd with tag NSA
MR_LIST= sh returnStdout: true, script: 'curl --silent "https://gitlab.eurecom.fr/api/v4/projects/oai%2Fopenairinterface5g/merge_requests?state=opened&per_page=100&labels=NSA" | jq ".[].iid" || true '
echo "List of selected MR:\n${MR_LIST}"
def MR_ARRAY = MR_LIST.split('\n')
//for every selected MR, retrieve the branch name and the latest commit
script {
// retrieve MR that are opened nd with tag NSA
MR_LIST = sh returnStdout: true, script: 'curl --silent "https://gitlab.eurecom.fr/api/v4/projects/oai%2Fopenairinterface5g/merge_requests?state=opened&per_page=100&labels=NSA" | jq -cj "[.[].iid]"'
echo "List of selected MRs: ${MR_LIST.trim()}"
def MR_ARRAY = new JsonSlurper().parseText(MR_LIST.trim())
// for every selected MR, retrieve the branch name and the latest commit
for (MR in MR_ARRAY) {
SRC_BRANCH=sh returnStdout: true, script: """curl --silent "https://gitlab.eurecom.fr/api/v4/projects/oai%2Fopenairinterface5g/merge_requests/${MR}" | jq ".source_branch" || true """
SRC_BRANCH=SRC_BRANCH.trim()

View File

@@ -50,7 +50,7 @@ amarisoft_ue_1:
WakeupScript : none
DetachScript : none
#end
Cmd : /root/NV17-12-21/ue/lteue
Cmd : /root/NV18-06-2022/ue/lteue
Config : /root/NV17-12-21/ue/config/oaicicd-ue-Ping-SATest.cfg
Duration : 60
Ping : /tmp/test_ue1.log
@@ -71,7 +71,7 @@ amarisoft_ue_2:
WakeupScript : none
DetachScript : none
#end
Cmd : /root/NV17-12-21/ue/lteue
Cmd : /root/NV18-06-2022/ue/lteue
Config : /root/NV17-12-21/ue/config/xxxxxxx.cfg #to be updated for an other scenario
Duration : 60
Ping :

View File

@@ -74,6 +74,7 @@ class Containerize():
self.eNB2SourceCodePath = ''
self.forcedWorkspaceCleanup = False
self.imageKind = ''
self.proxyCommit = None
self.eNB_instance = 0
self.eNB_serverId = ['', '', '']
self.yamlPath = ['', '', '']
@@ -421,6 +422,143 @@ class Containerize():
HTML.CreateHtmlTabFooter(False)
sys.exit(1)
def BuildProxy(self, HTML):
if self.ranRepository == '' or self.ranBranch == '' or self.ranCommitID == '':
HELP.GenericHelp(CONST.Version)
sys.exit('Insufficient Parameter')
if self.eNB_serverId[self.eNB_instance] == '0':
lIpAddr = self.eNBIPAddress
lUserName = self.eNBUserName
lPassWord = self.eNBPassword
lSourcePath = self.eNBSourceCodePath
elif self.eNB_serverId[self.eNB_instance] == '1':
lIpAddr = self.eNB1IPAddress
lUserName = self.eNB1UserName
lPassWord = self.eNB1Password
lSourcePath = self.eNB1SourceCodePath
elif self.eNB_serverId[self.eNB_instance] == '2':
lIpAddr = self.eNB2IPAddress
lUserName = self.eNB2UserName
lPassWord = self.eNB2Password
lSourcePath = self.eNB2SourceCodePath
if lIpAddr == '' or lUserName == '' or lPassWord == '' or lSourcePath == '':
HELP.GenericHelp(CONST.Version)
sys.exit('Insufficient Parameter')
if self.proxyCommit is None:
HELP.GenericHelp(CONST.Version)
sys.exit('Insufficient Parameter (need proxyCommit for proxy build)')
logging.debug('Building on server: ' + lIpAddr)
mySSH = SSH.SSHConnection()
mySSH.open(lIpAddr, lUserName, lPassWord)
# Check that we are on Ubuntu
mySSH.command('hostnamectl', '\$', 5)
result = re.search('Ubuntu', mySSH.getBefore())
self.host = result.group(0)
if self.host != 'Ubuntu':
logging.error('\u001B[1m Can build proxy only on Ubuntu server\u001B[0m')
mySSH.close()
sys.exit(1)
self.cli = 'docker'
self.cliBuildOptions = '--no-cache'
# Workaround for some servers, we need to erase completely the workspace
if self.forcedWorkspaceCleanup:
mySSH.command('echo ' + lPassWord + ' | sudo -S rm -Rf ' + lSourcePath, '\$', 15)
oldRanCommidID = self.ranCommitID
oldRanRepository = self.ranRepository
oldRanAllowMerge = self.ranAllowMerge
self.ranCommitID = self.proxyCommit
self.ranRepository = 'https://github.com/EpiSci/oai-lte-5g-multi-ue-proxy.git'
self.ranAllowMerge = False
self._createWorkspace(mySSH, lPassWord, lSourcePath)
# to prevent accidentally overwriting data that might be used later
self.ranCommitID = oldRanCommidID
self.ranRepository = oldRanRepository
self.ranAllowMerge = oldRanAllowMerge
# Let's remove any previous run artifacts if still there
mySSH.command(self.cli + ' image prune --force', '\$', 30)
# Remove any previous proxy image
mySSH.command(self.cli + ' image rm oai-lte-multi-ue-proxy:latest || true', '\$', 30)
tag = self.proxyCommit
logging.debug('building L2sim proxy image for tag ' + tag)
# check if the corresponding proxy image with tag exists. If not, build it
mySSH.command(self.cli + ' image inspect --format=\'Size = {{.Size}} bytes\' proxy:' + tag, '\$', 5)
buildProxy = mySSH.getBefore().count('o such image') != 0
if buildProxy:
mySSH.command(self.cli + ' build ' + self.cliBuildOptions + ' --target oai-lte-multi-ue-proxy --tag proxy:' + tag + ' --file docker/Dockerfile.ubuntu18.04 . > cmake_targets/log/proxy-build.log 2>&1', '\$', 180)
# Note: at this point, OAI images are flattened, but we cannot do this
# here, as the flatten script is not in the proxy repo
mySSH.command(self.cli + ' image inspect --format=\'Size = {{.Size}} bytes\' proxy:' + tag, '\$', 5)
if mySSH.getBefore().count('o such image') != 0:
logging.error('\u001B[1m Build of L2sim proxy failed\u001B[0m')
mySSH.close()
HTML.CreateHtmlTestRow('commit ' + tag, 'KO', CONST.ALL_PROCESSES_OK)
HTML.CreateHtmlTabFooter(False)
sys.exit(1)
else:
logging.debug('L2sim proxy image for tag ' + tag + ' already exists, skipping build')
# retag the build images to that we pick it up later
mySSH.command('docker image tag proxy:' + tag + ' oai-lte-multi-ue-proxy:latest', '\$', 5)
# no merge: is a push to develop, tag the image so we can push it to the registry
if not self.ranAllowMerge:
mySSH.command('docker image tag proxy:' + tag + ' proxy:develop', '\$', 5)
# we assume that the host on which this is built will also run the proxy. The proxy
# currently requires the following command, and the docker-compose up mechanism of
# the CI does not allow to run arbitrary commands. Note that the following actually
# belongs to the deployment, not the build of the proxy...
logging.warning('the following command belongs to deployment, but no mechanism exists to exec it there!')
mySSH.command('sudo ifconfig lo: 127.0.0.2 netmask 255.0.0.0 up', '\$', 5)
# Analyzing the logs
if buildProxy:
self.testCase_id = HTML.testCase_id
mySSH.command('cd ' + lSourcePath + '/cmake_targets', '\$', 5)
mySSH.command('mkdir -p proxy_build_log_' + self.testCase_id, '\$', 5)
mySSH.command('mv log/* ' + 'proxy_build_log_' + self.testCase_id, '\$', 5)
if (os.path.isfile('./proxy_build_log_' + self.testCase_id + '.zip')):
os.remove('./proxy_build_log_' + self.testCase_id + '.zip')
if (os.path.isdir('./proxy_build_log_' + self.testCase_id)):
shutil.rmtree('./proxy_build_log_' + self.testCase_id)
mySSH.command('zip -r -qq proxy_build_log_' + self.testCase_id + '.zip proxy_build_log_' + self.testCase_id, '\$', 5)
mySSH.copyin(lIpAddr, lUserName, lPassWord, lSourcePath + '/cmake_targets/build_log_' + self.testCase_id + '.zip', '.')
# don't delete such that we might recover the zips
#mySSH.command('rm -f build_log_' + self.testCase_id + '.zip','\$', 5)
# we do not analyze the logs (we assume the proxy builds fine at this stage),
# but need to have the following information to correctly display the HTML
files = {}
errorandwarnings = {}
errorandwarnings['errors'] = 0
errorandwarnings['warnings'] = 0
errorandwarnings['status'] = True
files['Target Image Creation'] = errorandwarnings
self.collectInfo['proxy'] = files
mySSH.command('docker image inspect --format=\'Size = {{.Size}} bytes\' proxy:' + tag, '\$', 5)
result = re.search('Size *= *(?P<size>[0-9\-]+) *bytes', mySSH.getBefore())
if result is not None:
imageSize = float(result.group('size')) / 1000000
logging.debug('\u001B[1m proxy size is ' + ('%.0f' % imageSize) + ' Mbytes\u001B[0m')
self.allImagesSize['proxy'] = str(round(imageSize,1)) + ' Mbytes'
else:
logging.debug('proxy size is unknown')
self.allImagesSize['proxy'] = 'unknown'
# Cleaning any created tmp volume
mySSH.command(self.cli + ' volume prune --force || true','\$', 15)
mySSH.close()
logging.info('\u001B[1m Building L2sim Proxy Image Pass\u001B[0m')
HTML.CreateHtmlTestRow('commit ' + tag, 'OK', CONST.ALL_PROCESSES_OK)
HTML.CreateHtmlNextTabHeaderTestRow(self.collectInfo, self.allImagesSize)
def Copy_Image_to_Test_Server(self, HTML):
imageTag = 'develop'
if (self.ranAllowMerge):
@@ -441,9 +579,17 @@ class Containerize():
lUserName = self.eNB2UserName
lPassWord = self.eNB2Password
lSsh.open(lIpAddr, lUserName, lPassWord)
lSsh.command('docker save ' + self.imageToCopy + ':' + imageTag + ' | gzip > ' + self.imageToCopy + '-' + imageTag + '.tar.gz', '\$', 60)
lSsh.copyin(lIpAddr, lUserName, lPassWord, '~/' + self.imageToCopy + '-' + imageTag + '.tar.gz', '.')
lSsh.command('docker save ' + self.imageToCopy + ':' + imageTag + ' | gzip --fast > ' + self.imageToCopy + '-' + imageTag + '.tar.gz', '\$', 60)
ret = lSsh.copyin(lIpAddr, lUserName, lPassWord, '~/' + self.imageToCopy + '-' + imageTag + '.tar.gz', '.')
if ret != 0:
HTML.CreateHtmlTestRow('N/A', 'KO', CONST.ALL_PROCESSES_OK)
self.exitStatus = 1
return False
lSsh.command('rm ' + self.imageToCopy + '-' + imageTag + '.tar.gz', '\$', 60)
if lSsh.getBefore().count('cannot remove'):
HTML.CreateHtmlTestRow('file not created by docker save', 'KO', CONST.ALL_PROCESSES_OK)
self.exitStatus = 1
return False
lSsh.close()
# Going to the Test Server
@@ -461,15 +607,26 @@ class Containerize():
lPassWord = self.eNB2Password
lSsh.open(lIpAddr, lUserName, lPassWord)
lSsh.copyout(lIpAddr, lUserName, lPassWord, './' + self.imageToCopy + '-' + imageTag + '.tar.gz', '~')
# copyout has no return code and will quit if something fails
lSsh.command('docker rmi ' + self.imageToCopy + ':' + imageTag, '\$', 10)
lSsh.command('docker load < ' + self.imageToCopy + '-' + imageTag + '.tar.gz', '\$', 60)
if lSsh.getBefore().count('o such file') or lSsh.getBefore().count('invalid tar header'):
logging.debug(lSsh.getBefore())
HTML.CreateHtmlTestRow('problem during docker load', 'KO', CONST.ALL_PROCESSES_OK)
self.exitStatus = 1
return False
lSsh.command('rm ' + self.imageToCopy + '-' + imageTag + '.tar.gz', '\$', 60)
if lSsh.getBefore().count('cannot remove'):
HTML.CreateHtmlTestRow('file not copied during scp?', 'KO', CONST.ALL_PROCESSES_OK)
self.exitStatus = 1
return False
lSsh.close()
if os.path.isfile('./' + self.imageToCopy + '-' + imageTag + '.tar.gz'):
os.remove('./' + self.imageToCopy + '-' + imageTag + '.tar.gz')
HTML.CreateHtmlTestRow('N/A', 'OK', CONST.ALL_PROCESSES_OK)
return True
def DeployObject(self, HTML, EPC):
if self.eNB_serverId[self.eNB_instance] == '0':
@@ -545,6 +702,9 @@ class Containerize():
logging.debug(' -- ' + str(unhealthyNb) + ' unhealthy container(s)')
logging.debug(' -- ' + str(startingNb) + ' still starting container(s)')
self.testCase_id = HTML.testCase_id
self.eNB_logFile[self.eNB_instance] = 'enb_' + self.testCase_id + '.log'
status = False
if healthyNb == 1:
cnt = 0
@@ -559,16 +719,19 @@ class Containerize():
status = True
logging.info('\u001B[1m Deploying OAI object Pass\u001B[0m')
time.sleep(10)
else:
# containers are unhealthy, so we won't start. However, logs are stored at the end
# in UndeployObject so we here store the logs of the unhealthy container to report it
mySSH.command('docker logs ' + containerName + ' > ' + lSourcePath + '/cmake_targets/' + self.eNB_logFile[self.eNB_instance], '\$', 30)
mySSH.close()
self.testCase_id = HTML.testCase_id
self.eNB_logFile[self.eNB_instance] = 'enb_' + self.testCase_id + '.log'
if status:
HTML.CreateHtmlTestRow('N/A', 'OK', CONST.ALL_PROCESSES_OK)
else:
self.exitStatus = 1
HTML.CreateHtmlTestRow('N/A', 'KO', CONST.ALL_PROCESSES_OK)
def UndeployObject(self, HTML, RAN):
if self.eNB_serverId[self.eNB_instance] == '0':
lIpAddr = self.eNBIPAddress
@@ -588,7 +751,7 @@ class Containerize():
if lIpAddr == '' or lUserName == '' or lPassWord == '' or lSourcePath == '':
HELP.GenericHelp(CONST.Version)
sys.exit('Insufficient Parameter')
logging.debug('\u001B[1m Deploying OAI Object on server: ' + lIpAddr + '\u001B[0m')
logging.debug('\u001B[1m Undeploying OAI Object from server: ' + lIpAddr + '\u001B[0m')
mySSH = SSH.SSHConnection()
mySSH.open(lIpAddr, lUserName, lPassWord)
mySSH.command('cd ' + lSourcePath + '/' + self.yamlPath[self.eNB_instance], '\$', 5)
@@ -793,12 +956,26 @@ class Containerize():
logging.debug(cmd)
subprocess.run(cmd, shell=True)
# if the containers are running, recover the logs!
# check which containers are running for log recovery later
cmd = 'cd ' + self.yamlPath[0] + ' && docker-compose -f docker-compose-ci.yml ps --all'
logging.debug(cmd)
deployStatus = subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT, universal_newlines=True, timeout=30)
deployStatusLogs = subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT, universal_newlines=True, timeout=30)
# Stop the containers to shut down objects
logging.debug('\u001B[1m Stopping containers \u001B[0m')
cmd = 'cd ' + self.yamlPath[0] + ' && docker-compose -f docker-compose-ci.yml stop'
logging.debug(cmd)
try:
deployStatus = subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT, universal_newlines=True, timeout=100)
except Exception as e:
self.exitStatus = 1
logging.error('Could not stop containers')
HTML.CreateHtmlTestRow('Could not stop', 'KO', CONST.ALL_PROCESSES_OK)
logging.error('\u001B[1m Undeploying OAI Object(s) FAILED\u001B[0m')
return
anyLogs = False
for state in deployStatus.split('\n'):
for state in deployStatusLogs.split('\n'):
res = re.search('Name|----------', state)
if res is not None:
continue

View File

@@ -1329,7 +1329,7 @@ class OaiCiTest():
SSH.open(self.ADBIPAddress, self.ADBUserName, self.ADBPassword)
if self.ADBCentralized:
SSH.command('adb devices', '\$', 15)
self.UEDevices = re.findall("\\\\r\\\\n([A-Za-z0-9]+)\\\\tdevice",SSH.getBefore())
self.UEDevices = re.findall('\r\n([A-Za-z0-9]+)\tdevice',SSH.getBefore())
#report number and id of devices found
msg = "UEDevices found by GetAllUEDevices : " + " ".join(self.UEDevices)
logging.debug(msg)
@@ -1379,8 +1379,7 @@ class OaiCiTest():
SSH.open(self.ADBIPAddress, self.ADBUserName, self.ADBPassword)
if self.ADBCentralized:
SSH.command('lsusb | egrep --colour=never "Future Technology Devices International, Ltd FT2232C" | sed -e "s#:.*##" -e "s# #_#g"', '\$', 15)
#self.CatMDevices = re.findall("\\\\r\\\\n([A-Za-z0-9_]+)",SSH.getBefore())
self.CatMDevices = re.findall("\\\\r\\\\n([A-Za-z0-9_]+)",SSH.getBefore())
self.CatMDevices = re.findall('\r\n([A-Za-z0-9_]+)',SSH.getBefore())
else:
if (os.path.isfile('./modules_list.txt')):
os.remove('./modules_list.txt')
@@ -2046,7 +2045,7 @@ class OaiCiTest():
req_bandwidth = '%.1f Gbits/sec' % req_bw
req_bw = req_bw * 1000000000
result = re.search('Server Report:\\\\r\\\\n(?:|\[ *\d+\].*) (?P<bitrate>[0-9\.]+ [KMG]bits\/sec) +(?P<jitter>[0-9\.]+ ms) +(\d+\/..\d+) +(\((?P<packetloss>[0-9\.]+)%\))', SSH.getBefore())
result = re.search('Server Report:\r\n(?:|\[ *\d+\].*) (?P<bitrate>[0-9\.]+ [KMG]bits\/sec) +(?P<jitter>[0-9\.]+ ms) +(\d+\/..\d+) +(\((?P<packetloss>[0-9\.]+)%\))', SSH.getBefore())
if result is not None:
bitrate = result.group('bitrate')
packetloss = result.group('packetloss')
@@ -2262,7 +2261,7 @@ class OaiCiTest():
def Iperf_analyzeV3Output(self, lock, UE_IPAddress, device_id, statusQueue,SSH):
result = re.search('(?P<bitrate>[0-9\.]+ [KMG]bits\/sec) +(?:|[0-9\.]+ ms +\d+\/\d+ \((?P<packetloss>[0-9\.]+)%\)) +(?:|receiver)\\\\r\\\\n(?:|\[ *\d+\] Sent \d+ datagrams)\\\\r\\\\niperf Done\.', SSH.getBefore())
result = re.search('(?P<bitrate>[0-9\.]+ [KMG]bits\/sec) +(?:|[0-9\.]+ ms +\d+\/\d+ \((?P<packetloss>[0-9\.]+)%\)) +(?:|receiver)\r\n(?:|\[ *\d+\] Sent \d+ datagrams)\r\niperf Done\.', SSH.getBefore())
if result is None:
result = re.search('(?P<error>iperf: error - [a-zA-Z0-9 :]+)', SSH.getBefore())
lock.acquire()
@@ -3865,7 +3864,7 @@ class OaiCiTest():
SSH = sshconnection.SSHConnection()
SSH.open(IPAddress, UserName, Password)
SSH.command('lsb_release -a', '\$', 5)
result = re.search('Description:\\\\t(?P<os_type>[a-zA-Z0-9\-\_\.\ ]+)', SSH.getBefore())
result = re.search('Description:\t(?P<os_type>[a-zA-Z0-9\-\_\.\ ]+)', SSH.getBefore())
if result is not None:
OsVersion = result.group('os_type')
logging.debug('OS is: ' + OsVersion)
@@ -3883,13 +3882,13 @@ class OaiCiTest():
logging.debug('OS is: ' + OsVersion)
HTML.OsVersion[idx]=OsVersion
SSH.command('uname -r', '\$', 5)
result = re.search('uname -r\\\\r\\\\n(?P<kernel_version>[a-zA-Z0-9\-\_\.]+)', SSH.getBefore())
result = re.search('uname -r\r\n(?P<kernel_version>[a-zA-Z0-9\-\_\.]+)', SSH.getBefore())
if result is not None:
KernelVersion = result.group('kernel_version')
logging.debug('Kernel Version is: ' + KernelVersion)
HTML.KernelVersion[idx]=KernelVersion
SSH.command('dpkg --list | egrep --color=never libuhd003', '\$', 5)
result = re.search('libuhd003:amd64 *(?P<uhd_version>[0-9\.]+)', SSH.getBefore())
SSH.command('dpkg --list | egrep --color=never libuhd', '\$', 5)
result = re.search('libuhd.*:amd64 *(?P<uhd_version>[0-9\.]+)', SSH.getBefore())
if result is not None:
UhdVersion = result.group('uhd_version')
logging.debug('UHD Version is: ' + UhdVersion)
@@ -3902,7 +3901,7 @@ class OaiCiTest():
logging.debug('UHD Version is: ' + UhdVersion)
HTML.UhdVersion[idx]=UhdVersion
SSH.command('echo ' + Password + ' | sudo -S uhd_find_devices', '\$', 180)
usrp_boards = re.findall('product: ([0-9A-Za-z]+)\\\\r\\\\n', SSH.getBefore())
usrp_boards = re.findall('product: ([0-9A-Za-z]+)', SSH.getBefore())
count = 0
for board in usrp_boards:
if count == 0:
@@ -3914,14 +3913,18 @@ class OaiCiTest():
logging.debug('USRP Board(s) : ' + UsrpBoard)
HTML.UsrpBoard[idx]=UsrpBoard
SSH.command('lscpu', '\$', 5)
result = re.search('CPU\(s\): *(?P<nb_cpus>[0-9]+).*Model name: *(?P<model>[a-zA-Z0-9\-\_\.\ \(\)]+).*CPU MHz: *(?P<cpu_mhz>[0-9\.]+)', SSH.getBefore())
result = re.search('CPU\(s\): *(?P<nb_cpus>[0-9]+)', SSH.getBefore())
if result is not None:
CpuNb = result.group('nb_cpus')
logging.debug('nb_cpus: ' + CpuNb)
HTML.CpuNb[idx]=CpuNb
result = re.search('Model name: *(?P<model>[a-zA-Z0-9\-\_\.\ \(\)]+)', SSH.getBefore())
if result is not None:
CpuModel = result.group('model')
logging.debug('model: ' + CpuModel)
HTML.CpuModel[idx]=CpuModel
result = re.search('CPU MHz: *(?P<cpu_mhz>[0-9\.]+)', SSH.getBefore())
if result is not None:
CpuMHz = result.group('cpu_mhz') + ' MHz'
logging.debug('cpu_mhz: ' + CpuMHz)
HTML.CpuMHz[idx]=CpuMHz

View File

@@ -141,7 +141,7 @@ class PhySim:
logging.debug('oai-physim size is unknown')
# logging to OC Cluster and then switch to corresponding project
mySSH.command(f'oc login -u {ocUserName} -p {ocPassword}', '\$', 30)
mySSH.command(f'oc login -u {ocUserName} -p {ocPassword} --server https://api.oai.cs.eurecom.fr:6443', '\$', 30)
if mySSH.getBefore().count('Login successful.') == 0:
logging.error('\u001B[1m OC Cluster Login Failed\u001B[0m')
mySSH.close()

View File

@@ -214,52 +214,6 @@ MACRLCs = (
}
);
L1s = (
{
num_cc = 1;
tr_n_preference = "local_mac";
thread_pool_size = 8;
prach_dtx_threshold = 120;
pucch0_dtx_threshold = 150;
}
);
RUs = (
{
local_rf = "yes"
nb_tx = 1
nb_rx = 1
att_tx = 0
att_rx = 0;
bands = [78];
max_pdschReferenceSignalPower = -27;
max_rxgain = 75;
eNB_instances = [0];
#beamforming 1x4 matrix:
bf_weights = [0x00007fff, 0x0000, 0x0000, 0x0000];
#clock_src = "external";
sdr_addrs = "mgmt_addr=172.21.19.14,addr=192.168.10.2,second_addr=192.168.20.2,clock_source=internal,time_source=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

View File

@@ -218,16 +218,6 @@ MACRLCs = (
}
)
THREAD_STRUCT = (
{
#three config for level of parallelism "PARALLEL_SINGLE_THREAD", "PARALLEL_RU_L1_SPLIT", or "PARALLEL_RU_L1_TRX_SPLIT"
parallel_config = "PARALLEL_RU_L1_TRX_SPLIT";
#two option for worker "WORKER_DISABLE" or "WORKER_ENABLE"
worker_config = "WORKER_ENABLE";
}
);
log_config =
{
global_log_level ="info";

View File

@@ -215,52 +215,6 @@ MACRLCs = (
}
);
L1s = (
{
num_cc = 1;
tr_n_preference = "local_mac";
thread_pool_size = 8;
prach_dtx_threshold = 120;
pucch0_dtx_threshold = 150;
}
);
RUs = (
{
local_rf = "yes"
nb_tx = 1
nb_rx = 1
att_tx = 0
att_rx = 0;
bands = [78];
max_pdschReferenceSignalPower = -27;
max_rxgain = 75;
eNB_instances = [0];
#beamforming 1x4 matrix:
bf_weights = [0x00007fff, 0x0000, 0x0000, 0x0000];
#clock_src = "external";
sdr_addrs = "mgmt_addr=172.21.19.14,addr=192.168.10.2,second_addr=192.168.20.2,clock_source=internal,time_source=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

View File

@@ -235,16 +235,6 @@ MACRLCs = (
}
)
THREAD_STRUCT = (
{
#three config for level of parallelism "PARALLEL_SINGLE_THREAD", "PARALLEL_RU_L1_SPLIT", or "PARALLEL_RU_L1_TRX_SPLIT"
parallel_config = "PARALLEL_RU_L1_TRX_SPLIT";
#two option for worker "WORKER_DISABLE" or "WORKER_ENABLE"
worker_config = "WORKER_ENABLE";
}
);
log_config =
{
global_log_level ="info";

View File

@@ -33,6 +33,7 @@ gNBs =
////////// Physical parameters:
min_rxtxtime = 6;
enable_sdap = 1;
pdcch_ConfigSIB1 = (
{

View File

@@ -12,32 +12,32 @@ gNBs =
// Tracking area code, 0x0000 and 0xfffe are reserved values
tracking_area_code = 1;
plmn_list = ({
mcc = 208;
mnc = 99;
mcc = 222;
mnc = 01;
mnc_length = 2;
snssaiList = (
{
sst = 1;
sd = 0x1; // 0 false, else true
#sd = 0x1; // 0 false, else true
}
);
});
nr_cellid = 12345678L;
////////// Physical parameters:
pdsch_AntennaPorts_XP = 1;
pusch_AntennaPorts = 2;
do_CSIRS = 0;
ul_prbblacklist = "135,136,137,138"
min_rxtxtime = 2;
do_CSIRS = 1;
do_SRS = 1;
pdcch_ConfigSIB1 = (
pdcch_ConfigSIB1 = (
{
controlResourceSetZero = 12;
searchSpaceZero = 10;
searchSpaceZero = 0;
}
);
);
servingCellConfigCommon = (
{
@@ -47,28 +47,27 @@ gNBs =
# downlinkConfigCommon
#frequencyInfoDL
# this is 3300.24 + 134*12*30e3 = 3348.48 MHz (5G NR GSCN: 7741)
absoluteFrequencySSB = 623232;
dl_frequencyBand = 78;
# this is 3300.24 MHz
dl_absoluteFrequencyPointA = 620016;
# 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;
dl_offstToCarrier = 0;
# subcarrierSpacing
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
dl_subcarrierSpacing = 1;
dl_carrierBandwidth = 273;
dl_subcarrierSpacing = 1;
dl_carrierBandwidth = 106;
#initialDownlinkBWP
#genericParameters
# this is RBstart=0,L=162 (275*(275-L+1))+(274-RBstart))
initialDLBWPlocationAndBandwidth = 31624;
#
# 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;
initialDLBWPsubcarrierSpacing = 1;
#pdcch-ConfigCommon
initialDLBWPcontrolResourceSetZero = 12;
initialDLBWPsearchSpaceZero = 10;
initialDLBWPcontrolResourceSetZero = 12;
initialDLBWPsearchSpaceZero = 0;
#uplinkConfigCommon
#frequencyInfoUL
@@ -78,11 +77,11 @@ gNBs =
# subcarrierSpacing
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
ul_subcarrierSpacing = 1;
ul_carrierBandwidth = 273;
ul_carrierBandwidth = 106;
pMax = 20;
#initialUplinkBWP
#genericParameters
initialULBWPlocationAndBandwidth = 31624;
initialULBWPlocationAndBandwidth = 28875;
# subcarrierSpacing
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
initialULBWPsubcarrierSpacing = 1;
@@ -93,8 +92,8 @@ gNBs =
#0 = one, 1=two, 2=four, 3=eight
prach_msg1_FDM = 0;
prach_msg1_FrequencyStart = 0;
zeroCorrelationZoneConfig = 12;
preambleReceivedTargetPower = -90;
zeroCorrelationZoneConfig = 13;
preambleReceivedTargetPower = -96;
#preamblTransMax (0...10) = (3,4,5,6,7,8,10,20,50,100,200)
preambleTransMax = 6;
#powerRampingStep
@@ -105,9 +104,9 @@ gNBs =
ra_ResponseWindow = 4;
#ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR
#1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen
ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 3;
ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4;
#oneHalf (0..15) 4,8,12,16,...60,64
ssb_perRACH_OccasionAndCB_PreamblesPerSSB = 15;
ssb_perRACH_OccasionAndCB_PreamblesPerSSB = 14;
#ra_ContentionResolutionTimer
#(0..7) 8,16,24,32,40,48,56,64
ra_ContentionResolutionTimer = 7;
@@ -131,7 +130,7 @@ gNBs =
# 0 = neither, 1= group hopping, 2=sequence hopping
pucchGroupHopping = 0;
hoppingId = 40;
p0_nominal = -70;
p0_nominal = -90;
# ssb_PositionsInBurs_BitmapPR
# 1=short, 2=medium, 3=long
ssb_PositionsInBurst_PR = 2;
@@ -163,22 +162,35 @@ gNBs =
nrofUplinkSlots = 2;
nrofUplinkSymbols = 4;
ssPBCH_BlockPower = -25;
ssPBCH_BlockPower = -25;
}
);
# Dedicated Serving Cell Configuration
servingCellConfigDedicated = ({
# BWP-Downlink
# BWP 1 Configuration
dl_bwp-Id_1 = 1;
dl_bwp1_locationAndBandwidth = 1099; // RBstart=0, L=273 (100 MHz BW)
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
@@ -191,17 +203,29 @@ servingCellConfigDedicated = ({
# BWP-Uplink
# BWP 1 Configuration
ul_bwp-Id_1 = 1;
ul_bwp1_locationAndBandwidth = 1099; // RBstart=0, L=273 (100 MHz BW)
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 :
{
@@ -212,7 +236,7 @@ servingCellConfigDedicated = ({
////////// AMF parameters:
amf_ip_address = ( { ipv4 = "192.168.70.132";
amf_ip_address = ( { ipv4 = "172.21.16.136";
ipv6 = "192:168:30::17";
active = "yes";
preference = "ipv4";
@@ -223,9 +247,9 @@ servingCellConfigDedicated = ({
NETWORK_INTERFACES :
{
GNB_INTERFACE_NAME_FOR_NG_AMF = "demo-oai";
GNB_IPV4_ADDRESS_FOR_NG_AMF = "192.168.70.129/24";
GNB_IPV4_ADDRESS_FOR_NG_AMF = "172.21.16.137/24";
GNB_INTERFACE_NAME_FOR_NGU = "demo-oai";
GNB_IPV4_ADDRESS_FOR_NGU = "192.168.70.129/24";
GNB_IPV4_ADDRESS_FOR_NGU = "172.21.16.137/24";
GNB_PORT_FOR_S1U = 2152; # Spec 2152
};
@@ -237,9 +261,8 @@ MACRLCs = (
num_cc = 1;
tr_s_preference = "local_L1";
tr_n_preference = "local_RRC";
pusch_TargetSNRx10 = 150;
pusch_TargetSNRx10 = 200;
pucch_TargetSNRx10 = 200;
pusch_FailureThres = 1000;
ulsch_max_frame_inactivity = 0;
}
);
@@ -247,27 +270,27 @@ MACRLCs = (
L1s = (
{
num_cc = 1;
tr_n_preference = "local_mac";
prach_dtx_threshold = 120;
pucch0_dtx_threshold = 80;
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 = 2;
nb_rx = 2;
att_tx = 0;
att_rx = 0;
nb_tx = 1
nb_rx = 1
att_tx = 10;
att_rx = 10;
bands = [78];
max_pdschReferenceSignalPower = -27;
max_rxgain = 75;
max_rxgain = 114;
eNB_instances = [0];
##beamforming 1x2 matrix: 1 layer x 2 antennas
bf_weights = [0x00007fff, 0x0000];
#clock_src = "internal";
sdr_addrs = "mgmt_addr=192.168.10.2,addr=192.168.10.2,clock_source=internal,time_source=internal"
#beamforming 1x4 matrix:
bf_weights = [0x00007fff, 0x0000, 0x0000, 0x0000];
clock_src = "internal";
}
);
@@ -318,3 +341,4 @@ log_config :
ngap_log_level ="debug";
f1ap_log_level ="debug";
};

View File

@@ -46,6 +46,7 @@ ENB_PROCESS_NOLOGFILE_TO_ANALYZE = -14
ENB_PROCESS_SLAVE_RRU_NOT_SYNCED = -15
ENB_REAL_TIME_PROCESSING_ISSUE = -16
ENB_RETX_ISSUE = -17
ENB_SHUTDOWN_NO_BYE = -18
HSS_PROCESS_FAILED = -2
HSS_PROCESS_OK = +2
MME_PROCESS_FAILED = -3

View File

@@ -253,7 +253,7 @@ class EPCManagement():
logging.debug('Starting OAI CN5G')
mySSH.command('if [ -d ' + self.SourceCodePath + '/scripts ]; then echo ' + self.Password + ' | sudo -S rm -Rf ' + self.SourceCodePath + '/scripts ; fi', '\$', 5)
mySSH.command('mkdir -p ' + self.SourceCodePath + '/scripts', '\$', 5)
mySSH.command('cd /opt/oai-cn5g-fed-v1.3/docker-compose', '\$', 5)
mySSH.command('cd /opt/oai-cn5g-fed-v1.4/docker-compose', '\$', 5)
mySSH.command('python3 ./core-network.py '+self.cfgDeploy, '\$', 60)
if re.search('start-mini-as-ue', self.cfgDeploy):
dFile = 'docker-compose-mini-nrf-asue.yaml'
@@ -311,6 +311,8 @@ class EPCManagement():
tmp = str(response[0],'utf-8')
self.MmeIPAddress = tmp.rstrip()
logging.debug('AMF IP Address ' + self.MmeIPAddress)
else:
logging.error('no container with name oai-amf found, could not retrieve AMF IP address')
mySSH.close()
def CheckHSSProcess(self, status_queue):
@@ -535,7 +537,7 @@ class EPCManagement():
mySSH.command('docker logs ' + c + ' > ' + self.SourceCodePath + '/logs/' + c + '.log', '\$', 5)
logging.debug('Terminating OAI CN5G')
mySSH.command('cd /opt/oai-cn5g-fed-v1.3/docker-compose', '\$', 5)
mySSH.command('cd /opt/oai-cn5g-fed-v1.4/docker-compose', '\$', 5)
mySSH.command('python3 ./core-network.py '+self.cfgUnDeploy, '\$', 60)
mySSH.command('docker volume prune --force || true', '\$', 60)
time.sleep(2)

View File

@@ -102,7 +102,7 @@ def AssignParams(params_dict):
def GetParametersFromXML(action):
if action == 'Build_eNB' or action == 'Build_Image':
if action == 'Build_eNB' or action == 'Build_Image' or action == 'Build_Proxy':
RAN.Build_eNB_args=test.findtext('Build_eNB_args')
CONTAINERS.imageKind=test.findtext('kind')
forced_workspace_cleanup = test.findtext('forced_workspace_cleanup')
@@ -138,6 +138,9 @@ def GetParametersFromXML(action):
RAN.backgroundBuild=True
else:
RAN.backgroundBuild=False
proxy_commit = test.findtext('proxy_commit')
if proxy_commit is not None:
CONTAINERS.proxyCommit = proxy_commit
elif action == 'WaitEndBuild_eNB':
RAN.Build_eNB_args=test.findtext('Build_eNB_args')
@@ -915,10 +918,16 @@ elif re.match('^TesteNB$', mode, re.IGNORECASE) or re.match('^TestUE$', mode, re
HTML=ldpc.Run_PhySim(HTML,CONST,id)
elif action == 'Build_Image':
CONTAINERS.BuildImage(HTML)
elif action == 'Build_Proxy':
CONTAINERS.BuildProxy(HTML)
elif action == 'Copy_Image_to_Test':
CONTAINERS.Copy_Image_to_Test_Server(HTML)
success = CONTAINERS.Copy_Image_to_Test_Server(HTML)
if not success:
RAN.prematureExit = True
elif action == 'Deploy_Object':
CONTAINERS.DeployObject(HTML, EPC)
if CONTAINERS.exitStatus==1:
RAN.prematureExit = True
elif action == 'Undeploy_Object':
CONTAINERS.UndeployObject(HTML, RAN)
elif action == 'Cppcheck_Analysis':

View File

@@ -374,7 +374,7 @@ class RANManagement():
mySSH.open(lIpAddr, lUserName, lPassWord)
eth_interface = 'any'
fltr = 'sctp'
logging.debug('\u001B[1m Launching tshark on interface ' + eth_interface + ' with filter "' + fltr + '"\u001B[0m')
logging.debug('\u001B[1m Launching tshark on xNB on interface ' + eth_interface + ' with filter "' + fltr + '"\u001B[0m')
pcapfile = pcapfile_prefix + self.testCase_id + '_log.pcap'
mySSH.command('echo ' + lPassWord + ' | sudo -S rm -f /tmp/' + pcapfile , '\$', 5)
mySSH.command('echo $USER; nohup sudo -E tshark -i ' + eth_interface + ' -f "' + fltr + '" -w /tmp/' + pcapfile + ' > /dev/null 2>&1 &','\$', 5)
@@ -390,7 +390,7 @@ class RANManagement():
mySSH.open(localEpcIpAddr, localEpcUserName, localEpcPassword)
eth_interface = 'any'
fltr = 'sctp'
logging.debug('\u001B[1m Launching tshark on interface ' + eth_interface + ' with filter "' + fltr + '"\u001B[0m')
logging.debug('\u001B[1m Launching tshark on EPC on interface ' + eth_interface + ' with filter "' + fltr + '"\u001B[0m')
self.epcPcapFile = 'enb_' + self.testCase_id + '_s1log.pcap'
mySSH.command('echo ' + localEpcPassword + ' | sudo -S rm -f /tmp/' + self.epcPcapFile , '\$', 5)
mySSH.command('echo $USER; nohup sudo tshark -f "host ' + lIpAddr +'" -i ' + eth_interface + ' -f "' + fltr + '" -w /tmp/' + self.epcPcapFile + ' > /tmp/tshark.log 2>&1 &', localEpcUserName, 5)
@@ -517,7 +517,7 @@ class RANManagement():
localEpcUserName = EPC.UserName
localEpcPassword = EPC.Password
mySSH.open(localEpcIpAddr, localEpcUserName, localEpcPassword)
logging.debug('\u001B[1m Stopping tshark \u001B[0m')
logging.debug('\u001B[1m Stopping tshark on EPC \u001B[0m')
mySSH.command('echo ' + localEpcPassword + ' | sudo -S killall --signal SIGKILL tshark', '\$', 5)
if self.epcPcapFile != '':
mySSH.command('echo ' + localEpcPassword + ' | sudo -S chmod 666 /tmp/' + self.epcPcapFile, '\$', 5)
@@ -644,18 +644,16 @@ class RANManagement():
time.sleep(5)
mySSH.command('rm -f my-lte-softmodem-run' + str(self.eNB_instance) + '.sh', '\$', 5)
#stopping tshark (valid if eNB and enabled in xml, will not harm otherwise)
logging.debug('\u001B[1m Stopping tshark \u001B[0m')
logging.debug('\u001B[1m Stopping tshark on xNB \u001B[0m')
mySSH.command('echo ' + lPassWord + ' | sudo -S killall --signal SIGKILL tshark', '\$', 5)
time.sleep(1)
mySSH.close()
# If tracer options is on, stopping tshark on EPC side
result = re.search('T_stdout', str(self.Initialize_eNB_args))
if (result is not None):
if EPC.IPAddress != "none" and EPC.IPAddress != '':
localEpcIpAddr = EPC.IPAddress
localEpcUserName = EPC.UserName
localEpcPassword = EPC.Password
logging.debug('\u001B[1m Stopping tshark on EPC (' + localEpcIpAddr + ') \u001B[0m')
mySSH.open(localEpcIpAddr, localEpcUserName, localEpcPassword)
logging.debug('\u001B[1m Stopping tshark \u001B[0m')
mySSH.command('echo ' + localEpcPassword + ' | sudo -S killall --signal SIGKILL tshark', '\$', 5)
time.sleep(1)
if self.epcPcapFile != '':
@@ -814,6 +812,7 @@ class RANManagement():
ULRetxIssue = False
nrRrcRcfgComplete = 0
harqFeedbackPast = 0
showedByeMsg = False # last line is Bye. -> stopped properly
line_cnt=0 #log file line counter
for line in enb_log_file.readlines():
@@ -1026,6 +1025,12 @@ class RANManagement():
if result is not None:
gnb_markers[k].append(line_cnt)
# check whether e/gNB log finishes with "Bye." message
# Note that it is "=" not "|=" so not only is the regex
# asking for EOF (\Z) but we also only retain the last
# line's result
showedByeMsg = re.search(r'^Bye.\n\Z', str(line), re.MULTILINE) is not None
enb_log_file.close()
@@ -1210,6 +1215,13 @@ class RANManagement():
logging.debug('No real time stats found in the log file')
htmleNBFailureMsg += statMsg
if not showedByeMsg:
logging.debug('\u001B[1;37;41m ' + nodeB_prefix + 'NB did not show "Bye." message at end, it likely did not stop properly! \u001B[0m')
htmleNBFailureMsg += 'No Bye. message found, did not stop properly\n'
global_status = CONST.ENB_SHUTDOWN_NO_BYE
else:
logging.debug('"Bye." message found at end.')
else:
#Removing UE log
statMsg = '[MAC] Removing UE msg count = '+str(removing_ue)

View File

@@ -60,7 +60,7 @@ class SSHConnection():
count = 0
connect_status = False
while count < 4:
self.ssh = pexpect.spawn('ssh -o PubkeyAuthentication=no {}@{}'.format(username,ipaddress))
self.ssh = pexpect.spawn('ssh -o PubkeyAuthentication=yes {}@{}'.format(username,ipaddress))
# Longer timeout at connection due to asterix slowness
self.ssh.timeout = 25
self.sshresponse = self.ssh.expect(['Are you sure you want to continue connecting (yes/no)?', 'password:', 'Last login', pexpect.EOF, pexpect.TIMEOUT])
@@ -84,14 +84,11 @@ class SSHConnection():
else:
logging.debug('self.sshresponse = ' + str(self.sshresponse))
elif self.sshresponse == 2:
# Checking if we are really on the remote client defined by its IP address
self.command('stdbuf -o0 ifconfig | egrep --color=never "inet addr:|inet "', prompt, 5)
result = re.search(str(ipaddress), str(self.ssh.before))
if result is None:
self.close()
else:
count = 10
connect_status = True
# We directly ended up on the remote server because of pubkey auth
count = 10
connect_status = True
# this expect() seems to be necessary to advance the read buffer until the prompt, or getBefore() will not return the last command
self.sshresponse = self.ssh.expect([prompt])
else:
# debug output
logging.debug(str(self.ssh.before))
@@ -272,4 +269,4 @@ class SSHConnection():
sys.exit('SCP failed')
def getBefore(self):
return str(self.ssh.before)
return self.ssh.before.decode('utf-8')

View File

@@ -1,3 +1,4 @@
- Build_Proxy
- Build_PhySim
- Run_PhySim
- Build_eNB

View File

@@ -0,0 +1,42 @@
<!--
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
-->
<testCaseList>
<htmlTabRef>l2sim-4glte-proxy-build</htmlTabRef>
<htmlTabName>Build L2sim proxy image</htmlTabName>
<htmlTabIcon>wrench</htmlTabIcon>
<repeatCount>1</repeatCount>
<TestCaseRequestedList>
000001
</TestCaseRequestedList>
<TestCaseExclusionList></TestCaseExclusionList>
<testCase id="000001">
<class>Build_Proxy</class>
<desc>Build L2sim Proxy Image</desc>
<eNB_instance>1</eNB_instance>
<eNB_serverId>1</eNB_serverId>
<forced_workspace_cleanup>True</forced_workspace_cleanup>
<proxy_commit>56cfdc0</proxy_commit>
</testCase>
</testCaseList>

View File

@@ -0,0 +1,135 @@
<!--
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
-->
<testCaseList>
<htmlTabRef>l2sim-4glte-tdd</htmlTabRef>
<htmlTabName>Testing 4G LTE L2 sim - FDD eNB</htmlTabName>
<htmlTabIcon>wrench</htmlTabIcon>
<repeatCount>2</repeatCount>
<TestCaseRequestedList>
100001
000000
000001
000002
000003
000011
200000
020001
020002
030011
030012
200001
100001
</TestCaseRequestedList>
<TestCaseExclusionList></TestCaseExclusionList>
<testCase id="000000">
<class>DeployGenObject</class>
<desc>Deploy Cassandra Database</desc>
<yaml_path>yaml_files/4g_l2sim_fdd</yaml_path>
<services>cassandra db_init</services>
<nb_healthy>1</nb_healthy>
</testCase>
<testCase id="000001">
<class>DeployGenObject</class>
<desc>Deploy OAI 4G CoreNetwork</desc>
<yaml_path>yaml_files/4g_l2sim_fdd</yaml_path>
<services>oai_hss redis magma_mme oai_spgwc oai_spgwu trf_gen</services>
<nb_healthy>7</nb_healthy>
</testCase>
<testCase id="000002">
<class>DeployGenObject</class>
<desc>Deploy OAI 4G eNB L2 sim</desc>
<yaml_path>yaml_files/4g_l2sim_fdd</yaml_path>
<services>oai_enb</services>
<nb_healthy>8</nb_healthy>
</testCase>
<testCase id="000003">
<class>DeployGenObject</class>
<desc>Deploy OAI L2 sim 4G LTE-UE 1 and Proxy</desc>
<yaml_path>yaml_files/4g_l2sim_fdd</yaml_path>
<services>proxy oai_ue1</services>
<nb_healthy>10</nb_healthy>
</testCase>
<testCase id="000011">
<class>IdleSleep</class>
<desc>Sleep</desc>
<idle_sleep_time_in_sec>10</idle_sleep_time_in_sec>
</testCase>
<testCase id="020001">
<class>PingFromContainer</class>
<desc>Ping trf-gen from LTE-UE 1</desc>
<container_name>l2sim4g-oai-lte-ue1</container_name>
<options>-I oaitun_ue1 -c 20 192.168.61.11</options>
<loss_threshold>0</loss_threshold>
</testCase>
<testCase id="020002">
<class>PingFromContainer</class>
<desc>Ping LTE-UE 1 from trf-gen</desc>
<container_name>l2sim4g-trf-gen</container_name>
<options>-c 20 12.0.0.2</options>
<loss_threshold>0</loss_threshold>
</testCase>
<testCase id="030011">
<class>IperfFromContainer</class>
<desc>Iperf UDP Downlink</desc>
<server_container_name>l2sim4g-oai-lte-ue1</server_container_name>
<client_container_name>l2sim4g-trf-gen</client_container_name>
<server_options>-B 12.0.0.2 -u -i 1 -s</server_options>
<client_options>-c 12.0.0.2 -u -i 1 -t 30 -b 1M</client_options>
</testCase>
<testCase id="030012">
<class>IperfFromContainer</class>
<desc>Iperf UDP Uplink</desc>
<server_container_name>l2sim4g-trf-gen</server_container_name>
<client_container_name>l2sim4g-oai-lte-ue1</client_container_name>
<server_options>-u -i 1 -s</server_options>
<client_options>-B 12.0.0.2 -c 192.168.61.11 -u -i 1 -t 30 -b 3M</client_options>
</testCase>
<testCase id="100001">
<class>UndeployGenObject</class>
<desc>Undeploy all OAI 4G stack</desc>
<yaml_path>yaml_files/4g_l2sim_fdd</yaml_path>
</testCase>
<testCase id="200000">
<class>StatsFromGenObject</class>
<desc>Statistics before Traffic Test</desc>
<yaml_path>yaml_files/4g_l2sim_fdd</yaml_path>
</testCase>
<testCase id="200001">
<class>StatsFromGenObject</class>
<desc>Statistics after Traffic Test</desc>
<yaml_path>yaml_files/4g_l2sim_fdd</yaml_path>
</testCase>
</testCaseList>

View File

@@ -0,0 +1,38 @@
<!--
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
-->
<testCaseList>
<htmlTabRef>l2sim-4glte-down</htmlTabRef>
<htmlTabName>CleanUp 4G L2 sim - FDD eNB</htmlTabName>
<htmlTabIcon>trash</htmlTabIcon>
<TestCaseRequestedList>
100002
</TestCaseRequestedList>
<TestCaseExclusionList></TestCaseExclusionList>
<testCase id="100002">
<class>UndeployGenObject</class>
<desc>Undeploy all OAI 4G stack</desc>
<yaml_path>yaml_files/4g_l2sim_fdd</yaml_path>
</testCase>
</testCaseList>

View File

@@ -22,7 +22,7 @@
-->
<testCaseList>
<htmlTabRef>rfsim-5gnr-f1</htmlTabRef>
<htmlTabName>Testing 5G NR RF sim in containers - CU-DU F1 split</htmlTabName>
<htmlTabName>CU-DU F1 split</htmlTabName>
<htmlTabIcon>wrench</htmlTabIcon>
<TestCaseRequestedList>
100021

View File

@@ -22,7 +22,7 @@
-->
<testCaseList>
<htmlTabRef>rfsim-5gnr-down-f1</htmlTabRef>
<htmlTabName>CleanUp 5G RF - CU-DU F1 split</htmlTabName>
<htmlTabName>CleanUp CU-DU F1 split</htmlTabName>
<htmlTabIcon>trash</htmlTabIcon>
<TestCaseRequestedList>
100022

View File

@@ -22,7 +22,7 @@
-->
<testCaseList>
<htmlTabRef>rfsim-5gnr-fdd</htmlTabRef>
<htmlTabName>Testing 5G NR RF sim - Monolithic FDD gNB</htmlTabName>
<htmlTabName>Monolithic FDD gNB with SDAP</htmlTabName>
<htmlTabIcon>wrench</htmlTabIcon>
<repeatCount>4</repeatCount>
<TestCaseRequestedList>

View File

@@ -22,7 +22,7 @@
-->
<testCaseList>
<htmlTabRef>rfsim-5gnr-fdd-down</htmlTabRef>
<htmlTabName>CleanUp 5G RF - Monolithic FDD gNB</htmlTabName>
<htmlTabName>CleanUp Monolithic FDD gNB with SDAP</htmlTabName>
<htmlTabIcon>trash</htmlTabIcon>
<TestCaseRequestedList>
100012

View File

@@ -22,7 +22,7 @@
-->
<testCaseList>
<htmlTabRef>rfsim-5gnr-tdd</htmlTabRef>
<htmlTabName>Testing 5G NR RF sim - Monolithic TDD gNB</htmlTabName>
<htmlTabName>Monolithic TDD gNB</htmlTabName>
<htmlTabIcon>wrench</htmlTabIcon>
<repeatCount>4</repeatCount>
<TestCaseRequestedList>

View File

@@ -22,7 +22,7 @@
-->
<testCaseList>
<htmlTabRef>rfsim-5gnr-down</htmlTabRef>
<htmlTabName>CleanUp 5G RF - Monolithic TDD gNB</htmlTabName>
<htmlTabName>CleanUp Monolithic TDD gNB</htmlTabName>
<htmlTabIcon>trash</htmlTabIcon>
<TestCaseRequestedList>
100002

View File

@@ -0,0 +1,42 @@
<!--
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
-->
<testCaseList>
<htmlTabRef>l2sim-4glte-5gnr-proxy-build</htmlTabRef>
<htmlTabName>Build L2sim proxy image</htmlTabName>
<htmlTabIcon>wrench</htmlTabIcon>
<repeatCount>1</repeatCount>
<TestCaseRequestedList>
000001
</TestCaseRequestedList>
<TestCaseExclusionList></TestCaseExclusionList>
<testCase id="000001">
<class>Build_Proxy</class>
<desc>Build L2sim Proxy Image</desc>
<eNB_instance>1</eNB_instance>
<eNB_serverId>1</eNB_serverId>
<forced_workspace_cleanup>True</forced_workspace_cleanup>
<proxy_commit>56cfdc0</proxy_commit>
</testCase>
</testCaseList>

View File

@@ -53,7 +53,6 @@
<class>Initialize_UE</class>
<desc>Initialize Quectel</desc>
<id>idefix</id>
<UE_Trace>yes</UE_Trace>
</testCase>

View File

@@ -0,0 +1,168 @@
<!--
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
-->
<testCaseList>
<htmlTabRef>TEST-SA-FR1-B200</htmlTabRef>
<htmlTabName>SA SanityCheck with QUECTEL</htmlTabName>
<htmlTabIcon>tasks</htmlTabIcon>
<repeatCount>1</repeatCount>
<TestCaseRequestedList>
010002
030000
030101
000001
010000
000001
050000
050001
010002
000001
030201
</TestCaseRequestedList>
<!--
070001
070000
070002
050002
050003
-->
<TestCaseExclusionList></TestCaseExclusionList>
<testCase id="010000">
<class>Initialize_UE</class>
<desc>Initialize Quectel</desc>
<id>idefix</id>
</testCase>
<testCase id="010002">
<class>Terminate_UE</class>
<desc>Terminate Quectel</desc>
<id>idefix</id>
</testCase>
<testCase id="030000">
<class>Copy_Image_to_Test</class>
<desc>Copy gNB image to test server</desc>
<image_name>oai-gnb</image_name>
<registry_svr_id>1</registry_svr_id>
<test_svr_id>0</test_svr_id>
</testCase>
<testCase id="030101">
<class>Deploy_Object</class>
<desc>Deploy gNB (TDD/Band78/40MHz/B200) in a container</desc>
<yaml_path>ci-scripts/yaml_files/sa_b200_gnb</yaml_path>
<eNB_instance>0</eNB_instance>
<eNB_serverId>0</eNB_serverId>
</testCase>
<testCase id="000001">
<class>IdleSleep</class>
<desc>Sleep</desc>
<idle_sleep_time_in_sec>5</idle_sleep_time_in_sec>
</testCase>
<testCase id="000002">
<class>IdleSleep</class>
<desc>Sleep</desc>
<idle_sleep_time_in_sec>20</idle_sleep_time_in_sec>
</testCase>
<testCase id="050000">
<class>Ping</class>
<desc>Ping: 20pings in 20sec</desc>
<id>idefix</id>
<ping_args>-c 20</ping_args>
<ping_packetloss_threshold>1</ping_packetloss_threshold>
<ping_rttavg_threshold>15</ping_rttavg_threshold>
</testCase>
<testCase id="050001">
<class>Ping</class>
<desc>Ping: 100pings in 20sec</desc>
<id>idefix</id>
<ping_args>-c 100 -i 0.2</ping_args>
<ping_packetloss_threshold>1</ping_packetloss_threshold>
<ping_rttavg_threshold>15</ping_rttavg_threshold>
</testCase>
<testCase id="050002">
<class>Ping</class>
<desc>Ping: 20pings in 20sec</desc>
<id>idefix</id>
<ping_args>-c 20</ping_args>
<ping_packetloss_threshold>1</ping_packetloss_threshold>
<ping_rttavg_threshold>15</ping_rttavg_threshold>
</testCase>
<testCase id="050003">
<class>Ping</class>
<desc>Ping: 100pings in 20sec</desc>
<id>idefix</id>
<ping_args>-c 100 -i 0.2</ping_args>
<ping_packetloss_threshold>1</ping_packetloss_threshold>
<ping_rttavg_threshold>15</ping_rttavg_threshold>
</testCase>
<testCase id="070000">
<class>Iperf</class>
<desc>iperf (DL/125Mbps/UDP)(60 sec)(single-ue profile)</desc>
<iperf_args>-u -b 125M -t 60 -i 1 -fm</iperf_args>
<direction>DL</direction>
<id>idefix</id>
<iperf_packetloss_threshold>25</iperf_packetloss_threshold>
<iperf_bitrate_threshold>80</iperf_bitrate_threshold>
<iperf_profile>single-ue</iperf_profile>
</testCase>
<testCase id="070001">
<class>Iperf</class>
<desc>iperf (UL/8Mbps/UDP)(60 sec)(single-ue profile)</desc>
<iperf_args>-u -b 8M -t 60 -i 1 -fm</iperf_args>
<direction>UL</direction>
<id>idefix</id>
<iperf_packetloss_threshold>1</iperf_packetloss_threshold>
<iperf_bitrate_threshold>95</iperf_bitrate_threshold>
<iperf_profile>single-ue</iperf_profile>
</testCase>
<testCase id="070002">
<class>Iperf</class>
<desc>iperf (BIDIR TCP)(10 sec)(single-ue profile)</desc>
<iperf_args>-t 10 --bidir</iperf_args>
<direction>BIDIR</direction>
<id>idefix</id>
<iperf_profile>single-ue</iperf_profile>
</testCase>
<testCase id="030201">
<class>Undeploy_Object</class>
<desc>Undeploy gNB</desc>
<yaml_path>ci-scripts/yaml_files/sa_b200_gnb</yaml_path>
<eNB_instance>0</eNB_instance>
<eNB_serverId>0</eNB_serverId>
</testCase>
</testCaseList>

View File

@@ -0,0 +1,42 @@
<!--
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
-->
<testCaseList>
<htmlTabRef>TEST-SA-FR1-B200-terminate</htmlTabRef>
<htmlTabName>SA tear-down in case of problem</htmlTabName>
<htmlTabIcon>tasks</htmlTabIcon>
<repeatCount>1</repeatCount>
<TestCaseRequestedList>
030201
</TestCaseRequestedList>
<TestCaseExclusionList></TestCaseExclusionList>
<testCase id="030201">
<class>Undeploy_Object</class>
<desc>Undeploy gNB</desc>
<yaml_path>ci-scripts/yaml_files/sa_b200_gnb</yaml_path>
<eNB_instance>1</eNB_instance>
<eNB_serverId>1</eNB_serverId>
<image_tag>sa-test</image_tag>
</testCase>
</testCaseList>

View File

@@ -1,111 +0,0 @@
<!--
Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The OpenAirInterface Software Alliance licenses this file to You under
the OAI Public License, Version 1.1 (the "License"); you may not use this file
except in compliance with the License.
You may obtain a copy of the License at
http://www.openairinterface.org/?page_id=698
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
For more information about the OpenAirInterface (OAI) Software Alliance:
contact@openairinterface.org
-->
<testCaseList>
<htmlTabRef>test-f1-05</htmlTabRef>
<htmlTabName>Test-F1-CU-DU-05MHz</htmlTabName>
<htmlTabIcon>tasks</htmlTabIcon>
<repeatCount>2</repeatCount>
<TestCaseRequestedList>
030201
040101
030142 030141 000002 040301 000002 040541 040601 040641 040401 040201 030201 030202
</TestCaseRequestedList>
<TestCaseExclusionList>
</TestCaseExclusionList>
<testCase id="000002">
<class>IdleSleep</class>
<desc>Sleep</desc>
<idle_sleep_time_in_sec>5</idle_sleep_time_in_sec>
</testCase>
<testCase id="030141">
<class>Initialize_eNB</class>
<desc>Initialize DU (FDD/Band7/5MHz)</desc>
<Initialize_eNB_args>-O ci-scripts/conf_files/du.band7.tm1.25PRB.usrpb210.conf --log_config.global_log_options level,nocolor,time</Initialize_eNB_args>
<eNB_instance>1</eNB_instance>
</testCase>
<testCase id="030142">
<class>Initialize_eNB</class>
<desc>Initialize CU (FDD/Band7/5MHz)</desc>
<Initialize_eNB_args>-O ci-scripts/conf_files/cu.band7.tm1.25PRB.conf --log_config.global_log_options level,nocolor,time</Initialize_eNB_args>
<eNB_instance>0</eNB_instance>
</testCase>
<testCase id="030201">
<class>Terminate_eNB</class>
<desc>Terminate CU</desc>
<eNB_instance>0</eNB_instance>
</testCase>
<testCase id="030202">
<class>Terminate_eNB</class>
<desc>Terminate DU</desc>
<eNB_instance>1</eNB_instance>
</testCase>
<testCase id="040101">
<class>Initialize_UE</class>
<desc>Initialize UE</desc>
</testCase>
<testCase id="040201">
<class>Terminate_UE</class>
<desc>Terminate UE</desc>
</testCase>
<testCase id="040301">
<class>Attach_UE</class>
<desc>Attach UE</desc>
</testCase>
<testCase id="040401">
<class>Detach_UE</class>
<desc>Detach UE</desc>
</testCase>
<testCase id="040541">
<class>Ping</class>
<desc>ping (5MHz - 20 sec)</desc>
<ping_args>-c 20</ping_args>
<ping_packetloss_threshold>5</ping_packetloss_threshold>
</testCase>
<testCase id="040601">
<class>Iperf</class>
<desc>iperf (5MHz - DL/15Mbps/UDP)(30 sec)(single-ue profile)</desc>
<iperf_args>-u -b 15M -t 30 -i 1</iperf_args>
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
<iperf_profile>single-ue</iperf_profile>
</testCase>
<testCase id="040641">
<class>Iperf</class>
<desc>iperf (5MHz - UL/9Mbps/UDP)(30 sec)(single-ue profile)</desc>
<iperf_args>-u -b 9M -t 30 -i 1 -R</iperf_args>
<iperf_packetloss_threshold>60</iperf_packetloss_threshold>
<iperf_profile>single-ue</iperf_profile>
</testCase>
</testCaseList>

View File

@@ -1,111 +0,0 @@
<!--
Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The OpenAirInterface Software Alliance licenses this file to You under
the OAI Public License, Version 1.1 (the "License"); you may not use this file
except in compliance with the License.
You may obtain a copy of the License at
http://www.openairinterface.org/?page_id=698
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
For more information about the OpenAirInterface (OAI) Software Alliance:
contact@openairinterface.org
-->
<testCaseList>
<htmlTabRef>test-f1-10</htmlTabRef>
<htmlTabName>Test-F1-CU-DU-10MHz</htmlTabName>
<htmlTabIcon>tasks</htmlTabIcon>
<repeatCount>4</repeatCount>
<TestCaseRequestedList>
030201
040101
030152 030151 000002 040301 000002 040551 040611 040651 040401 040201 030201 030202
</TestCaseRequestedList>
<TestCaseExclusionList>
</TestCaseExclusionList>
<testCase id="000002">
<class>IdleSleep</class>
<desc>Sleep</desc>
<idle_sleep_time_in_sec>5</idle_sleep_time_in_sec>
</testCase>
<testCase id="030151">
<class>Initialize_eNB</class>
<desc>Initialize DU (FDD/Band7/10MHz)</desc>
<Initialize_eNB_args>-O ci-scripts/conf_files/du.band7.tm1.50PRB.usrpb210.conf --log_config.global_log_options level,nocolor,time</Initialize_eNB_args>
<eNB_instance>1</eNB_instance>
</testCase>
<testCase id="030152">
<class>Initialize_eNB</class>
<desc>Initialize CU (FDD/Band7/10MHz)</desc>
<Initialize_eNB_args>-O ci-scripts/conf_files/cu.band7.tm1.50PRB.conf --log_config.global_log_options level,nocolor,time</Initialize_eNB_args>
<eNB_instance>0</eNB_instance>
</testCase>
<testCase id="030201">
<class>Terminate_eNB</class>
<desc>Terminate CU</desc>
<eNB_instance>0</eNB_instance>
</testCase>
<testCase id="030202">
<class>Terminate_eNB</class>
<desc>Terminate DU</desc>
<eNB_instance>1</eNB_instance>
</testCase>
<testCase id="040101">
<class>Initialize_UE</class>
<desc>Initialize UE</desc>
</testCase>
<testCase id="040201">
<class>Terminate_UE</class>
<desc>Terminate UE</desc>
</testCase>
<testCase id="040301">
<class>Attach_UE</class>
<desc>Attach UE</desc>
</testCase>
<testCase id="040401">
<class>Detach_UE</class>
<desc>Detach UE</desc>
</testCase>
<testCase id="040551">
<class>Ping</class>
<desc>ping (10MHz - 20 sec)</desc>
<ping_args>-c 20</ping_args>
<ping_packetloss_threshold>5</ping_packetloss_threshold>
</testCase>
<testCase id="040611">
<class>Iperf</class>
<desc>iperf (10MHz - DL/32Mbps/UDP)(30 sec)(single-ue profile)</desc>
<iperf_args>-u -b 32M -t 30 -i 1</iperf_args>
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
<iperf_profile>single-ue</iperf_profile>
</testCase>
<testCase id="040651">
<class>Iperf</class>
<desc>iperf (10MHz - UL/15Mbps/UDP)(30 sec)(single-ue profile)</desc>
<iperf_args>-u -b 15M -t 30 -i 1 -R</iperf_args>
<iperf_packetloss_threshold>60</iperf_packetloss_threshold>
<iperf_profile>single-ue</iperf_profile>
</testCase>
</testCaseList>

View File

@@ -1,111 +0,0 @@
<!--
Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The OpenAirInterface Software Alliance licenses this file to You under
the OAI Public License, Version 1.1 (the "License"); you may not use this file
except in compliance with the License.
You may obtain a copy of the License at
http://www.openairinterface.org/?page_id=698
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
For more information about the OpenAirInterface (OAI) Software Alliance:
contact@openairinterface.org
-->
<testCaseList>
<htmlTabRef>test-f1-20</htmlTabRef>
<htmlTabName>Test-F1-CU-DU-20MHz</htmlTabName>
<htmlTabIcon>tasks</htmlTabIcon>
<repeatCount>4</repeatCount>
<TestCaseRequestedList>
030201
040101
030162 030161 000002 040301 000002 040561 040621 040661 040401 040201 030201 030202
</TestCaseRequestedList>
<TestCaseExclusionList>
</TestCaseExclusionList>
<testCase id="000002">
<class>IdleSleep</class>
<desc>Sleep</desc>
<idle_sleep_time_in_sec>5</idle_sleep_time_in_sec>
</testCase>
<testCase id="030161">
<class>Initialize_eNB</class>
<desc>Initialize DU (FDD/Band7/20MHz)</desc>
<Initialize_eNB_args>-O ci-scripts/conf_files/du.band7.tm1.100PRB.usrpb210.conf --log_config.global_log_options level,nocolor,time</Initialize_eNB_args>
<eNB_instance>1</eNB_instance>
</testCase>
<testCase id="030162">
<class>Initialize_eNB</class>
<desc>Initialize CU (FDD/Band7/20MHz)</desc>
<Initialize_eNB_args>-O ci-scripts/conf_files/cu.band7.tm1.100PRB.conf --log_config.global_log_options level,nocolor,time</Initialize_eNB_args>
<eNB_instance>0</eNB_instance>
</testCase>
<testCase id="030201">
<class>Terminate_eNB</class>
<desc>Terminate CU</desc>
<eNB_instance>0</eNB_instance>
</testCase>
<testCase id="030202">
<class>Terminate_eNB</class>
<desc>Terminate DU</desc>
<eNB_instance>1</eNB_instance>
</testCase>
<testCase id="040101">
<class>Initialize_UE</class>
<desc>Initialize UE</desc>
</testCase>
<testCase id="040201">
<class>Terminate_UE</class>
<desc>Terminate UE</desc>
</testCase>
<testCase id="040301">
<class>Attach_UE</class>
<desc>Attach UE</desc>
</testCase>
<testCase id="040401">
<class>Detach_UE</class>
<desc>Detach UE</desc>
</testCase>
<testCase id="040561">
<class>Ping</class>
<desc>ping (20MHz - 20 sec)</desc>
<ping_args>-c 20</ping_args>
<ping_packetloss_threshold>5</ping_packetloss_threshold>
</testCase>
<testCase id="040621">
<class>Iperf</class>
<desc>iperf (20MHz - DL/70Mbps/UDP)(30 sec)(single-ue profile)</desc>
<iperf_args>-u -b 70M -t 30 -i 1</iperf_args>
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
<iperf_profile>single-ue</iperf_profile>
</testCase>
<testCase id="040661">
<class>Iperf</class>
<desc>iperf (20MHz - UL/15Mbps/UDP)(30 sec)(single-ue profile)</desc>
<iperf_args>-u -b 15M -t 30 -i 1 -R</iperf_args>
<iperf_packetloss_threshold>60</iperf_packetloss_threshold>
<iperf_profile>single-ue</iperf_profile>
</testCase>
</testCaseList>

View File

@@ -0,0 +1,37 @@
<!--
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
-->
<testCaseList>
<htmlTabRef>5gc-closure</htmlTabRef>
<htmlTabName>5GC-Closure</htmlTabName>
<htmlTabIcon>log-out</htmlTabIcon>
<TestCaseRequestedList>
060000
</TestCaseRequestedList>
<TestCaseExclusionList></TestCaseExclusionList>
<testCase id="060000">
<class>Terminate_5GCN</class>
<desc>Terminate 5GC</desc>
</testCase>
</testCaseList>

View File

@@ -0,0 +1,38 @@
<!--
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
-->
<testCaseList>
<htmlTabRef>5gc-start-tab</htmlTabRef>
<htmlTabName>5GC-Start</htmlTabName>
<htmlTabIcon>log-in</htmlTabIcon>
<TestCaseRequestedList>
000100
</TestCaseRequestedList>
<TestCaseExclusionList>
</TestCaseExclusionList>
<testCase id="000100">
<class>Initialize_5GCN</class>
<desc>Initialize 5GC</desc>
</testCase>
</testCaseList>

View File

@@ -26,6 +26,7 @@
<htmlTabIcon>tasks</htmlTabIcon>
<repeatCount>1</repeatCount>
<TestCaseRequestedList>
010002
030000
040000
000002

View File

@@ -26,6 +26,7 @@
<htmlTabIcon>tasks</htmlTabIcon>
<repeatCount>1</repeatCount>
<TestCaseRequestedList>
010002
031000
041000
000002

View File

@@ -26,6 +26,7 @@
<htmlTabIcon>tasks</htmlTabIcon>
<repeatCount>1</repeatCount>
<TestCaseRequestedList>
010002
030000
040000
000002

View File

@@ -26,6 +26,7 @@
<htmlTabIcon>tasks</htmlTabIcon>
<repeatCount>1</repeatCount>
<TestCaseRequestedList>
010002
040000
000002
010000

View File

@@ -26,6 +26,7 @@
<htmlTabIcon>tasks</htmlTabIcon>
<repeatCount>1</repeatCount>
<TestCaseRequestedList>
010002
042000
000002
010000

View File

@@ -26,6 +26,7 @@
<htmlTabIcon>tasks</htmlTabIcon>
<repeatCount>1</repeatCount>
<TestCaseRequestedList>
011002
041000
000002
011000

View File

@@ -26,6 +26,7 @@
<htmlTabIcon>tasks</htmlTabIcon>
<repeatCount>1</repeatCount>
<TestCaseRequestedList>
010002
030000
000002
010000

View File

@@ -26,6 +26,7 @@
<htmlTabIcon>tasks</htmlTabIcon>
<repeatCount>1</repeatCount>
<TestCaseRequestedList>
010002
030001
000002
010000

View File

@@ -0,0 +1,305 @@
version: '3.8'
services:
cassandra:
image: cassandra:2.1
container_name: l2sim4g-cassandra
networks:
private_net:
ipv4_address: 192.168.68.2
environment:
CASSANDRA_CLUSTER_NAME: "OAI HSS Cluster"
CASSANDRA_ENDPOINT_SNITCH: GossipingPropertyFileSnitch
healthcheck:
test: /bin/bash -c "nodetool status"
interval: 10s
timeout: 5s
retries: 5
db_init:
image: cassandra:2.1
container_name: l2sim4g-db-init
depends_on: [cassandra]
deploy:
restart_policy:
condition: on-failure
max_attempts: 10
networks:
private_net:
ipv4_address: 192.168.68.4
volumes:
- ../4g_rfsimulator_fdd_05MHz/oai_db.cql:/home/oai_db.cql
entrypoint: /bin/bash -c "cqlsh --file /home/oai_db.cql 192.168.68.2 && echo 'OK'"
oai_hss:
image: oai-hss:latest
container_name: l2sim4g-oai-hss
privileged: true
depends_on: [cassandra]
networks:
private_net:
ipv4_address: 192.168.68.3
public_net:
ipv4_address: 192.168.61.2
environment:
REALM: openairinterface.org
HSS_FQDN: hss.openairinterface.org
PREFIX: /openair-hss/etc
cassandra_Server_IP: 192.168.68.2
OP_KEY: 1006020f0a478bf6b699f15c062e42b3
LTE_K: fec86ba6eb707ed08905757b1bb44b8f
APN1: oai.ipv4
APN2: internet
FIRST_IMSI: 208960100000001
NB_USERS: 10
healthcheck:
test: /bin/bash -c "pgrep oai_hss"
interval: 10s
timeout: 5s
retries: 5
redis:
image: redis:6.0.5
container_name: l2sim4g-redis
privileged: true
networks:
public_net:
ipv4_address: 192.168.61.6
volumes:
- ../4g_rfsimulator_fdd_05MHz/redis_extern.conf:/usr/local/etc/redis/redis.conf
entrypoint: /bin/bash -c "redis-server /usr/local/etc/redis/redis.conf"
healthcheck:
test: /bin/bash -c "redis-cli -h 192.168.61.6 -p 6380 ping"
interval: 10s
timeout: 5s
retries: 5
magma_mme:
image: magma-mme:latest
container_name: l2sim4g-magma-mme
hostname: mme
privileged: true
depends_on: [oai_hss, redis]
networks:
public_net:
ipv4_address: 192.168.61.3
environment:
TZ: Europe/Paris
REALM: openairinterface.org
PREFIX: /openair-mme/etc
HSS_HOSTNAME: hss
HSS_FQDN: hss.openairinterface.org
HSS_REALM: openairinterface.org
MME_FQDN: mme.openairinterface.org
FEATURES: mme_oai
volumes:
- ../4g_rfsimulator_fdd_05MHz/mme_fd.sprint.conf:/magma-mme/etc/mme_fd.conf.tmplt
- ../4g_rfsimulator_fdd_05MHz/mme.conf:/magma-mme/etc/mme.conf
- ../4g_rfsimulator_fdd_05MHz/entrypoint.sh:/magma-mme/bin/entrypoint.sh
entrypoint: /bin/bash -c "/magma-mme/bin/entrypoint.sh"
healthcheck:
test: /bin/bash -c "pgrep oai_mme"
interval: 10s
timeout: 5s
retries: 5
oai_spgwc:
image: oai-spgwc:latest
privileged: true
depends_on: [magma_mme]
container_name: l2sim4g-oai-spgwc
networks:
public_net:
ipv4_address: 192.168.61.4
environment:
TZ: Europe/Paris
SGW_INTERFACE_NAME_FOR_S11: eth0
PGW_INTERFACE_NAME_FOR_SX: eth0
DEFAULT_DNS_IPV4_ADDRESS: 172.21.3.100
DEFAULT_DNS_SEC_IPV4_ADDRESS: 8.8.4.4
PUSH_PROTOCOL_OPTION: 'true'
APN_NI_1: oai.ipv4
APN_NI_2: oai.ipv4_2
DEFAULT_APN_NI_1: oai.ipv4
UE_IP_ADDRESS_POOL_1: '12.0.0.2 - 12.0.0.254'
UE_IP_ADDRESS_POOL_2: '12.1.1.2 - 12.1.1.254'
MCC: '208'
MNC: '96'
MNC03: '096'
TAC: 1
GW_ID: 1
REALM: openairinterface.org
healthcheck:
test: /bin/bash -c "pgrep oai_spgwc"
interval: 10s
timeout: 5s
retries: 5
oai_spgwu:
image: oai-spgwu-tiny:latest
privileged: true
container_name: l2sim4g-oai-spgwu-tiny
depends_on: [oai_spgwc]
networks:
public_net:
ipv4_address: 192.168.61.5
environment:
TZ: Europe/Paris
PID_DIRECTORY: /var/run
INSTANCE: 1
SGW_INTERFACE_NAME_FOR_S1U_S12_S4_UP: eth0
PGW_INTERFACE_NAME_FOR_SGI: eth0
SGW_INTERFACE_NAME_FOR_SX: eth0
SPGWC0_IP_ADDRESS: 192.168.61.4
NETWORK_UE_IP: '12.0.0.0/24'
NETWORK_UE_NAT_OPTION: 'yes'
MCC: '208'
MNC: '96'
MNC03: '096'
TAC: 1
GW_ID: 1
REALM: openairinterface.org
healthcheck:
test: /bin/bash -c "pgrep oai_spgwu"
interval: 10s
timeout: 5s
retries: 5
trf_gen:
image: trf-gen:production
privileged: true
container_name: l2sim4g-trf-gen
networks:
public_net:
ipv4_address: 192.168.61.11
entrypoint: /bin/bash -c "ip route add 12.0.0.0/24 via 192.168.61.5 dev eth0; sleep infinity"
healthcheck:
test: /bin/bash -c "ping -c 2 192.168.61.5"
interval: 10s
timeout: 5s
retries: 5
oai_enb:
image: oai-enb:develop
privileged: true
container_name: l2sim4g-oai-enb
network_mode: "host"
environment:
TZ: Europe/Paris
USE_NFAPI_VNF: 'yes'
ENB_NAME: enb-l2sim-vnf
MCC: '208'
MNC: '96'
MNC_LENGTH: 2
TAC: 1
UTRA_BAND_ID: 7
DL_FREQUENCY_IN_MHZ: 2680
UL_FREQUENCY_OFFSET_IN_MHZ: 120
NID_CELL: 10
NB_PRB: 25
MME_S1C_IP_ADDRESS: 192.168.61.3
ENB_INTERFACE_NAME_FOR_S1_MME: eth0
ENB_IPV4_ADDRESS_FOR_S1_MME: 192.168.61.1
ENB_INTERFACE_NAME_FOR_S1U: eth0
ENB_IPV4_ADDRESS_FOR_S1U: 192.168.61.1
ENB_IPV4_ADDRESS_FOR_X2C: 192.168.61.1
FLEXRAN_ENABLED: 'no'
FLEXRAN_INTERFACE_NAME: eth0
FLEXRAN_IPV4_ADDRESS: 192.168.61.1
LOCAL_S_IF_NAME: 'lo:'
REMOTE_S_ADDRESS: 127.0.0.1
LOCAL_S_ADDRESS: 127.0.0.2
USE_ADDITIONAL_OPTIONS: --MACRLCs.[0].scheduler_mode "default" --log_config.global_log_options level,nocolor,time
healthcheck:
test: /bin/bash -c "pgrep lte-softmodem"
interval: 10s
timeout: 5s
retries: 5
proxy:
image: oai-lte-multi-ue-proxy:latest
privileged: true
container_name: "l2sim4g-proxy"
network_mode: "host"
environment:
TZ: Europe/Paris
command: "/oai-lte-multi-ue-proxy/bin/proxy 1"
depends_on:
- oai_enb
healthcheck:
test: /bin/bash -c "pgrep proxy"
interval: 10s
timeout: 5s
retries: 5
oai_ue1:
image: oai-lte-ue:develop
privileged: true
container_name: l2sim4g-oai-lte-ue1
network_mode: "host"
environment:
TZ: Europe/Paris
USE_NFAPI: 'yes'
OPENAIR_DIR: /opt/oai-nr-ue
MCC: '208'
MNC: '96'
SHORT_IMSI: '0100000001'
LTE_KEY: 'fec86ba6eb707ed08905757b1bb44b8f'
OPC: 'c42449363bbad02b66d16bc975d77cc1'
MSISDN: '001011234561010'
HPLMN: 20896
UE_NFAPI_IF_NAME: eno1
ENB_IP_ADDRESS: 127.0.0.1
LTE_UE_IP_ADDRESS: 127.0.0.1
USE_ADDITIONAL_OPTIONS: --L2-emul 5 --nokrnmod 1 --num-ues 1 --node-number 2 --log_config.global_log_options level,nocolor,time
volumes:
- ../../../openair1/SIMULATION/LTE_PHY/BLER_SIMULATIONS/AWGN/AWGN_results:/opt/oai-nr-ue/openair1/SIMULATION/LTE_PHY/BLER_SIMULATIONS/AWGN/AWGN_results
healthcheck:
test: /bin/bash -c "pgrep lte-uesoftmodem"
interval: 10s
timeout: 5s
retries: 5
oai_ue2:
image: oai-lte-ue:develop
privileged: true
container_name: l2sim4g-oai-lte-ue2
network_mode: "host"
environment:
TZ: Europe/Paris
USE_NFAPI: 'yes'
OPENAIR_DIR: /opt/oai-nr-ue
MCC: '208'
MNC: '96'
SHORT_IMSI: '0100000002'
LTE_KEY: 'fec86ba6eb707ed08905757b1bb44b8f'
OPC: 'c42449363bbad02b66d16bc975d77cc1'
MSISDN: '001011234561010'
HPLMN: 20896
UE_NFAPI_IF_NAME: eno1
ENB_IP_ADDRESS: 127.0.0.1
LTE_UE_IP_ADDRESS: 127.0.0.1
USE_ADDITIONAL_OPTIONS: --L2-emul 5 --nokrnmod 1 --num-ues 1 --node-number 3 --log_config.global_log_options level,nocolor,time
volumes:
- ../../../openair1/SIMULATION/LTE_PHY/BLER_SIMULATIONS/AWGN/AWGN_results:/opt/oai-nr-ue/openair1/SIMULATION/LTE_PHY/BLER_SIMULATIONS/AWGN/AWGN_results
healthcheck:
test: /bin/bash -c "pgrep lte-uesoftmodem"
interval: 10s
timeout: 5s
retries: 5
networks:
private_net:
name: l2sim4g-oai-private-net
ipam:
config:
- subnet: 192.168.68.0/26
driver_opts:
com.docker.network.bridge.name: "l2sim4g-private"
public_net:
name: l2sim4g-oai-public-net
ipam:
config:
- subnet: 192.168.61.0/26
driver_opts:
com.docker.network.bridge.name: "l2sim4g-public"

View File

@@ -2,7 +2,7 @@ version: '3.8'
services:
oai-nrf:
container_name: "l2sim-oai-nrf"
image: oai-nrf:latest
image: oai-nrf:august-dev
environment:
- NRF_INTERFACE_NAME_FOR_SBI=eth0
- NRF_INTERFACE_PORT_FOR_SBI=80
@@ -42,7 +42,7 @@ services:
ipv4_address: 192.168.71.131
oai-amf:
container_name: "l2sim-oai-amf"
image: oai-amf:latest
image: oai-amf:august-dev
environment:
- TZ=Europe/paris
- INSTANCE=0
@@ -110,7 +110,7 @@ services:
ipv4_address: 192.168.71.132
oai-smf:
container_name: "l2sim-oai-smf"
image: oai-smf:latest
image: oai-smf:august-dev
environment:
- TZ=Europe/Paris
- INSTANCE=0
@@ -156,7 +156,7 @@ services:
ipv4_address: 192.168.71.133
oai-spgwu:
container_name: "l2sim-oai-spgwu"
image: oai-spgwu-tiny:latest
image: oai-spgwu-tiny:august-dev
environment:
- TZ=Europe/Paris
- PID_DIRECTORY=/var/run

View File

@@ -2,7 +2,7 @@ version: '3.8'
services:
oai-nrf:
container_name: "rfsim5g-oai-nrf"
image: oai-nrf:latest
image: oai-nrf:august-dev
environment:
- NRF_INTERFACE_NAME_FOR_SBI=eth0
- NRF_INTERFACE_PORT_FOR_SBI=80
@@ -42,7 +42,7 @@ services:
ipv4_address: 192.168.71.131
oai-amf:
container_name: "rfsim5g-oai-amf"
image: oai-amf:latest
image: oai-amf:august-dev
environment:
- TZ=Europe/paris
- INSTANCE=0
@@ -110,7 +110,7 @@ services:
ipv4_address: 192.168.71.132
oai-smf:
container_name: "rfsim5g-oai-smf"
image: oai-smf:latest
image: oai-smf:august-dev
environment:
- TZ=Europe/Paris
- INSTANCE=0
@@ -156,7 +156,7 @@ services:
ipv4_address: 192.168.71.133
oai-spgwu:
container_name: "rfsim5g-oai-spgwu"
image: oai-spgwu-tiny:latest
image: oai-spgwu-tiny:august-dev
environment:
- TZ=Europe/Paris
- PID_DIRECTORY=/var/run

View File

@@ -0,0 +1,44 @@
version: '3.8'
services:
gnb_mono_tdd:
image: oai-gnb:latest
privileged: true
container_name: sa-b200-gnb
environment:
USE_SA_TDD_MONO_B2XX: 'yes'
USE_B2XX: 'yes'
GNB_NAME: gNB-in-docker
MCC: '222'
MNC: '01'
MNC_LENGTH: 2
TAC: 1
NSSAI_SST: 1
NSSAI_SD0: 1
AMF_IP_ADDRESS: 172.21.16.136
GNB_NGA_IF_NAME: eth0
GNB_NGA_IP_ADDRESS: 192.168.68.194
GNB_NGU_IF_NAME: eth0
GNB_NGU_IP_ADDRESS: 192.168.68.194
USE_ADDITIONAL_OPTIONS: --sa -E -q --RUs.[0].sdr_addrs serial=30C51D4 --continuous-tx --log_config.global_log_options level,nocolor,time,line_num,function
volumes:
- /dev:/dev
networks:
public_net:
ipv4_address: 192.168.68.194
#entrypoint: /bin/bash -c "sleep infinity"
healthcheck:
# pgrep does NOT work
test: /bin/bash -c "ps aux | grep -v grep | grep -c softmodem"
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

@@ -271,6 +271,12 @@ if (SANITIZE_ADDRESS)
# wrong in the pthread library, or something subtly wrong in this CMakeLists.txt. Use Ubuntu 20.04 instead.
endif ()
add_boolean_option(SANITIZE_UNDEFINED False "enable the undefined behavior sanitizer (UBSan)")
if (SANITIZE_UNDEFINED)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fsanitize=undefined -fno-sanitize-recover=all")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=undefined -fno-sanitize-recover=all")
endif ()
add_definitions("-DASN_DISABLE_OER_SUPPORT")
#########################
@@ -328,13 +334,9 @@ add_definitions("-DPACKAGE_BUGREPORT=\"openair4g-devel@lists.eurecom.fr\"")
# Debug related options
#########################################
add_boolean_option(ASN_EMIT_DEBUG False "ASN1 coder/decoder Debug")
add_boolean_option(ASN_THREAD_SAFE True "ASN1 coder/decoder Debug")
add_boolean_option(MSG_PRINT True "print debug messages")
add_boolean_option(DEBUG_ASN1C False "ASN1 coder/decoder Debug traces, see common/utils/config.h, the logs are regular OAI logs, in the log group 'ASN'")
add_boolean_option(DISABLE_XER_PRINT False "print XER Format")
add_boolean_option(XER_PRINT False "print XER Format")
add_boolean_option(RRC_MSG_PRINT False "print RRC messages")
add_boolean_option(PDCP_MSG_PRINT False "print PDCP messages to /tmp/pdcp.log")
add_boolean_option(DEBUG_PDCP_PAYLOAD False "print PDCP PDU to stdout") # if true, make sure that global and PDCP log levels are trace
add_boolean_option(DEBUG_MAC_INTERFACE False "print MAC-RLC PDU exchange to stdout") # if true, make sure that global and PDCP log levels are trace
add_boolean_option(TRACE_RLC_PAYLOAD False "print RLC PDU to stdout") # if true, make sure that global and PDCP log levels are trace
@@ -352,6 +354,12 @@ add_library(ITTI
)
add_dependencies(ITTI rrc_flag)
# asn1c skeletons have hardcoded this flag to make customized debug logs
# OAI uses this feature to re-use OAI LOG_I(ASN, ...)
if (DEBUG_ASN1C)
add_definitions(-DHAVE_CONFIG_H)
endif()
##################################################
# ASN.1 grammar C code generation & dependencies #
##################################################
@@ -839,7 +847,6 @@ add_boolean_option(UE_EXPANSION False "enable UE_EXPANSION w
add_boolean_option(PHY_TX_THREAD False "enable UE_EXPANSION with max 256 UE")
add_boolean_option(PRE_SCD_THREAD False "enable UE_EXPANSION with max 256 UE")
add_boolean_option(UESIM_EXPANSION False "enable UESIM_EXPANSION with max 256 UE")
add_boolean_option(ITTI_SIM False "enable itti simulator")
########################
# Include order
@@ -1205,6 +1212,7 @@ add_library(UTIL
${OPENAIR2_DIR}/UTIL/MATH/oml.c
${OPENAIR2_DIR}/UTIL/OPT/probe.c
${OPENAIR_DIR}/common/utils/threadPool/thread-pool.c
${OPENAIR_DIR}/common/utils/cpustats.c
${OPENAIR_DIR}/common/utils/utils.c
${OPENAIR_DIR}/common/utils/system.c
${OPENAIR_DIR}/common/utils/backtrace.c
@@ -1804,7 +1812,15 @@ set(NR_PDCP_SRC
${OPENAIR2_DIR}/LAYER2/nr_pdcp/nr_pdcp_timer_thread.c
${OPENAIR2_DIR}/LAYER2/nr_pdcp/nr_pdcp_security_nea2.c
${OPENAIR2_DIR}/LAYER2/nr_pdcp/nr_pdcp_integrity_nia2.c
${OPENAIR2_DIR}/LAYER2/nr_pdcp/nr_pdcp_integrity_nia1.c
${OPENAIR2_DIR}/LAYER2/nr_pdcp/asn1_utils.c
#hack: include these files to compile the nr phy simulators
#these files should not be here, will be removed at some point when the
#computation is done directly inside nr_pdcp_integrity_nia1.c instead
#of reusing code of osa_stream_eia.c
${OPENAIR2_DIR}/UTIL/OSA/osa_stream_eia.c
${OPENAIR2_DIR}/UTIL/OSA/osa_snow3g.c
${OPENAIR2_DIR}/UTIL/OSA/osa_rijndael.c
)
set(NR_SDAP_SRC
@@ -1858,6 +1874,8 @@ set(L2_NR_SRC
${NR_RRC_DIR}/rrc_gNB.c
${NR_RRC_DIR}/nr_rrc_common.c
${NR_RRC_DIR}/L2_nr_interface.c
${NR_RRC_DIR}/mac_rrc_dl_direct.c
${NR_RRC_DIR}/mac_rrc_dl_f1ap.c
${NR_RRC_DIR}/nr_rrc_config.c
${NR_RRC_DIR}/rrc_gNB_nsa.c
${NR_RRC_DIR}/rrc_gNB_internode.c
@@ -1936,6 +1954,9 @@ set (MAC_NR_SRC
${NR_GNB_MAC_DIR}/gNB_scheduler_uci.c
${NR_GNB_MAC_DIR}/gNB_scheduler_srs.c
${NR_GNB_MAC_DIR}/gNB_scheduler_RA.c
${NR_GNB_MAC_DIR}/mac_rrc_dl_handler.c
${NR_GNB_MAC_DIR}/mac_rrc_ul_direct.c
${NR_GNB_MAC_DIR}/mac_rrc_ul_f1ap.c
)
@@ -3015,7 +3036,7 @@ if (${T_TRACER})
foreach(i
#all "add_executable" definitions (except tests, rb_tool, updatefw)
lte-softmodem lte-uesoftmodem nr-softmodem
nr-uesoftmodem dlsim dlsim_tm4 dlsim_tm7 nr-ittisim
nr-uesoftmodem dlsim dlsim_tm4 dlsim_tm7
ulsim pbchsim scansim mbmssim pdcchsim pucchsim prachsim
syncsim nr_ulsim nr_dlsim nr_dlschsim nr_pbchsim nr_pucchsim
nr_ulschsim ldpctest polartest smallblocktest cu_test du_test
@@ -3101,50 +3122,6 @@ add_executable(rb_tool
)
target_include_directories(rb_tool PRIVATE ${OPENAIR2_DIR}/NETWORK_DRIVER/MESH/)
# nr-ittisim
###################################################
add_executable(nr-ittisim
${rrc_h}
${nr_rrc_h}
${OPENAIR2_DIR}/GNB_APP/gnb_app.c
${OPENAIR2_DIR}/GNB_APP/gnb_config.c
${OPENAIR_DIR}/executables/nr-gnb.c
${OPENAIR_DIR}/executables/nr-ru.c
${OPENAIR2_DIR}/SIMULATION/NR_RRC/itti_sim.c
${OPENAIR_DIR}/executables/softmodem-common.c
${OPENAIR1_DIR}/SIMULATION/TOOLS/taus.c
${OPENAIR_TARGETS}/ARCH/COMMON/common_lib.c
${OPENAIR_TARGETS}/ARCH/COMMON/record_player.c
${OPENAIR2_DIR}/RRC/NAS/nas_config.c
${OPENAIR2_DIR}/RRC/NAS/rb_config.c
${OPENAIR1_DIR}/SIMULATION/ETH_TRANSPORT/netlink_init.c
${OPENAIR3_DIR}/NAS/UE/nas_ue_task.c
${OPENAIR_DIR}/common/utils/nr/nr_common.c
${OPENAIR_DIR}/common/utils/lte/ue_power.c
${OPENAIR_DIR}/common/utils/lte/prach_utils.c
${OPENAIR2_DIR}/ENB_APP/flexran_agent_ran_api_to_fix.c
${XFORMSINTERFACE_SOURCE}
${T_SOURCE}
${SHLIB_LOADER_SOURCES}
)
target_link_libraries (nr-ittisim
-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 SECU_CN SECU_OSA
ITTI ${FLPT_MSG_LIB} ${FLEXRAN_AGENT_LIB} ${RAL_LIB} ${NAS_SIM_LIB} RRC_LIB NR_RRC_LIB
NGAP_LIB NGAP_GNB S1AP_LIB S1AP_ENB L2_LTE_NR L2_NR MAC_NR_COMMON NFAPI_COMMON_LIB NFAPI_LIB NFAPI_VNF_LIB NFAPI_PNF_LIB NFAPI_USER_LIB
X2AP_LIB X2AP_ENB F1AP_LIB F1AP M2AP_LIB M2AP_ENB M3AP_LIB M3AP_ENB ${FSPT_MSG_LIB}
PHY_NR_UE SCHED_NR_UE_LIB NR_L2_UE
-Wl,--end-group z dl)
target_link_libraries (nr-ittisim ${LIBXML2_LIBRARIES})
target_link_libraries (nr-ittisim pthread m CONFIG_LIB rt crypt ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} ${NETTLE_LIBRARIES} sctp ${XFORMS_LIBRARIES} ${PROTOBUF_LIB} ${CMAKE_DL_LIBS} ${LIBYAML_LIBRARIES} ${ATLAS_LIBRARIES})
target_link_libraries (nr-ittisim ${LIB_LMS_LIBRARIES})
target_link_libraries (nr-ittisim ${T_LIB})
add_dependencies( nr-ittisim ldpc_orig ldpc_optim ldpc_optim8seg ldpc )
# ???
####################
list(APPEND oai_nw_drv_src device.c common.c ioctl.c classifier.c tool.c)

View File

@@ -171,10 +171,12 @@ Options:
Skip build for shared libraries to reduce compilation time when building frequently for debugging purposes
--ninja
Tell cmake to use the Ninja build system. Without, will generate make files
--sanitize
Shortcut for usage of --sanitize-address --sanitize-undefined
--sanitize-address | -fsanitize=address
Enable the address sanitizer on all targets
--ittiSIM
Makes the itti simulator
Enable the address sanitizer on all targets
--sanitize-undefined | -fsanitize=undefined
Enable the undefined behavior sanitizer on all targets
-h | --help
Print this help
@@ -451,14 +453,15 @@ function main() {
CMAKE_CMD="$CMAKE_CMD -GNinja"
MAKE_CMD=ninja
shift;;
--sanitize)
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;;
--ittiSIM)
ittiSIM=1
CMAKE_CMD="$CMAKE_CMD -DITTI_SIM=True"
echo_info "Will compile itti simulator"
--sanitize-undefined | -fundefined=address)
CMAKE_CMD="$CMAKE_CMD -DSANITIZE_UNDEFINED=True"
shift;;
-h | --help)
print_help
@@ -613,9 +616,6 @@ function main() {
if [ "$nrUE" = 1 ] ; then
execlist="$execlist nr-uesoftmodem"
fi
if [ "$ittiSIM" = "1" ] ; then
execlist="$execlist nr-ittisim"
fi
if [[ "$execlist" == "" && "$SIMUS_PHY" != "1" ]]; then
echo_success "installing dependencies successful"

View File

@@ -197,8 +197,8 @@ check_warnings() {
#argument:
# $1: log file
check_errors() {
#we look for 'warning:' in the compilation log file
error_count=`grep "error:" "$1" | wc -l`
#we look for 'error:' in the compilation log file
error_count=`grep -c "error:" "$1"`
if [ $error_count -gt 0 ]; then
echo_error "ERROR: $error_count error. See $1"
fi
@@ -237,8 +237,9 @@ compilations() {
echo_error "$2 compilation failed"
exit 1
fi
if [ -s $3 ] ; then
cp $3 $4
if [ -s "$3" ] ; then
rm -f "$4"
ln -s "$PWD/$3" "$4"
echo_success "$2 compiled"
check_warnings "$dlog/$2.$REL.txt"
else

View File

@@ -11,10 +11,11 @@ configmodule_interface_t *load_configmodule(int argc, char **argv, uint32_t init
* if the bit CONFIG_ENABLECMDLINEONLY is set in `initflags` then the module allows parameters to be set only via the command line. This is used for the oai UE.
```c
void End_configmodule(void)
void end_configmodule(void)
```
* Free memory which has been allocated by the configuration module since its initialization.
* Free memory which has been allocated by the configuration module for storing parameters values, when `PARAMFLAG_NOFREE` flag is not specified in the parameter definition.
* Possibly calls the `config_<config source>_end` function
This call should be used when all configurations have been read. The program will still be able to use parameter values allocated by the config module WHEN THE `PARAMFLAG_NOFREE` flag has been specified in the parameter definition. The config module can be reloaded later in the program (not fully tested as not used today)
## Retrieving parameter's values

View File

@@ -53,13 +53,17 @@ int parse_stringlist(paramdef_t *cfgoptions, char *val) {
}
free(tmpval);
config_check_valptr(cfgoptions,(char **)&(cfgoptions->strlistptr), sizeof(char *) * numelt);
AssertFatal(MAX_LIST_SIZE > numelt,
"This piece of code use fixed size arry of constant #define MAX_LIST_SIZE %d\n",
MAX_LIST_SIZE );
config_check_valptr(cfgoptions, sizeof(char*), numelt);
cfgoptions->numelt=numelt;
atoken=strtok_r(val, ",",&tokctx);
for( int i=0; i<cfgoptions->numelt && atoken != NULL ; i++) {
config_check_valptr(cfgoptions,&(cfgoptions->strlistptr[i]),strlen(atoken)+1);
sprintf(cfgoptions->strlistptr[i],"%s",atoken);
snprintf(cfgoptions->strlistptr[i],DEFAULT_EXTRA_SZ,"%s",atoken);
printf_params("[LIBCONFIG] %s[%i]: %s\n", cfgoptions->optname,i,cfgoptions->strlistptr[i]);
atoken=strtok_r(NULL, ",",&tokctx);
}
@@ -84,13 +88,14 @@ int processoption(paramdef_t *cfgoptions, char *value) {
char *charptr;
case TYPE_STRING:
if (cfgoptions->numelt == 0 ) {
config_check_valptr(cfgoptions, cfgoptions->strptr, strlen(tmpval)+1);
sprintf(*(cfgoptions->strptr), "%s",tmpval);
} else {
sprintf( (char *)(cfgoptions->strptr), "%s",tmpval);
if (cfgoptions->numelt == 0 )
config_check_valptr(cfgoptions, 1,
strlen(tmpval)+1);
if (cfgoptions->numelt < (strlen(tmpval)+1)) {
CONFIG_PRINTF_ERROR("[CONFIG] command line option %s value too long\n",
cfgoptions->optname);
}
snprintf(*cfgoptions->strptr, cfgoptions->numelt ,"%s",tmpval);
printf_cmdl("[CONFIG] %s set to %s from command line\n", cfgoptions->optname, tmpval);
optisset=1;
break;
@@ -105,7 +110,7 @@ int processoption(paramdef_t *cfgoptions, char *value) {
case TYPE_INT16:
case TYPE_UINT8:
case TYPE_INT8:
config_check_valptr(cfgoptions, (char **)&(cfgoptions->iptr),sizeof(int32_t));
config_check_valptr(cfgoptions, sizeof(*cfgoptions->iptr), 1);
config_assign_int(cfgoptions,cfgoptions->optname,(int32_t)strtol(tmpval,&charptr,0));
if( *charptr != 0) {
@@ -117,14 +122,14 @@ int processoption(paramdef_t *cfgoptions, char *value) {
case TYPE_UINT64:
case TYPE_INT64:
config_check_valptr(cfgoptions, (char **)&(cfgoptions->i64ptr),sizeof(uint64_t));
config_check_valptr(cfgoptions, sizeof(*cfgoptions->i64ptr), 1);
*(cfgoptions->i64ptr)=strtoll(tmpval,&charptr,0);
if( *charptr != 0) {
CONFIG_PRINTF_ERROR("[CONFIG] command line, option %s requires an integer argument\n",cfgoptions->optname);
}
printf_cmdl("[CONFIG] %s set to %lli from command line\n", cfgoptions->optname, (long long)*(cfgoptions->i64ptr));
printf_cmdl("[CONFIG] %s set to %lli from command line\n", cfgoptions->optname, (long long)*cfgoptions->i64ptr);
optisset=1;
break;
@@ -133,8 +138,8 @@ int processoption(paramdef_t *cfgoptions, char *value) {
break;
case TYPE_DOUBLE:
config_check_valptr(cfgoptions, (char **)&(cfgoptions->dblptr),sizeof(double));
*(cfgoptions->dblptr) = strtof(tmpval,&charptr);
config_check_valptr(cfgoptions, sizeof(*cfgoptions->dblptr), 1);
*cfgoptions->dblptr = strtof(tmpval,&charptr);
if( *charptr != 0) {
CONFIG_PRINTF_ERROR("[CONFIG] command line, option %s requires a double argument\n",cfgoptions->optname);

View File

@@ -250,46 +250,46 @@ configmodule_interface_t *load_configmodule(int argc,
modeparams=cfgmode;
cfgmode=strdup(CONFIG_LIBCONFIGFILE);
}
cfgptr = calloc(sizeof(configmodule_interface_t),1);
if (cfgptr == NULL) {
cfgptr = calloc(sizeof(configmodule_interface_t),1);
/* argv_info is used to memorize command line options which have been recognized */
/* and to detect unrecognized command line options which might have been specified */
cfgptr->argv_info = calloc(sizeof(int32_t), argc+10);
cfgptr->argv_info = calloc(sizeof(int32_t), argc+10);
/* argv[0] is the exec name, always Ok */
cfgptr->argv_info[0] |= CONFIG_CMDLINEOPT_PROCESSED;
cfgptr->argv_info[0] |= CONFIG_CMDLINEOPT_PROCESSED;
/* when OoptIdx is >0, -O option has been detected at position OoptIdx
* we must memorize arv[OoptIdx is Ok */
if (OoptIdx >= 0) {
cfgptr->argv_info[OoptIdx] |= CONFIG_CMDLINEOPT_PROCESSED;
cfgptr->argv_info[OoptIdx+1] |= CONFIG_CMDLINEOPT_PROCESSED;
}
cfgptr->rtflags = cfgptr->rtflags | tmpflags;
cfgptr->argc = argc;
cfgptr->argv = argv;
cfgptr->cfgmode=strdup(cfgmode);
cfgptr->num_cfgP=0;
atoken=strtok_r(modeparams,":",&strtokctx);
while ( cfgptr->num_cfgP< CONFIG_MAX_OOPT_PARAMS && atoken != NULL) {
/* look for debug level in the config parameters, it is common to all config mode
and will be removed from the parameter array passed to the shared module */
char *aptr;
aptr=strcasestr(atoken,"dbgl");
if (aptr != NULL) {
cfgptr->rtflags = cfgptr->rtflags | strtol(aptr+4,NULL,0);
} else {
cfgptr->cfgP[cfgptr->num_cfgP] = strdup(atoken);
cfgptr->num_cfgP++;
if (OoptIdx >= 0) {
cfgptr->argv_info[OoptIdx] |= CONFIG_CMDLINEOPT_PROCESSED;
cfgptr->argv_info[OoptIdx+1] |= CONFIG_CMDLINEOPT_PROCESSED;
}
atoken = strtok_r(NULL,":",&strtokctx);
cfgptr->rtflags = cfgptr->rtflags | tmpflags;
cfgptr->argc = argc;
cfgptr->argv = argv;
cfgptr->cfgmode=strdup(cfgmode);
cfgptr->num_cfgP=0;
atoken=strtok_r(modeparams,":",&strtokctx);
while ( cfgptr->num_cfgP< CONFIG_MAX_OOPT_PARAMS && atoken != NULL) {
/* look for debug level in the config parameters, it is common to all config mode
and will be removed from the parameter array passed to the shared module */
char *aptr;
aptr=strcasestr(atoken,"dbgl");
if (aptr != NULL) {
cfgptr->rtflags = cfgptr->rtflags | strtol(aptr+4,NULL,0);
} else {
cfgptr->cfgP[cfgptr->num_cfgP] = strdup(atoken);
cfgptr->num_cfgP++;
}
atoken = strtok_r(NULL,":",&strtokctx);
}
printf("[CONFIG] get parameters from %s ",cfgmode);
}
printf("[CONFIG] get parameters from %s ",cfgmode);
for (i=0; i<cfgptr->num_cfgP; i++) {
printf("%s ",cfgptr->cfgP[i]);
}
@@ -336,33 +336,23 @@ void end_configmodule(void) {
cfgptr->end();
}
pthread_mutex_lock(&cfgptr->memBlocks_mutex);
printf ("[CONFIG] free %u config value pointers\n",cfgptr->numptrs);
for(int i=0; i<cfgptr->numptrs ; i++) {
if (cfgptr->ptrs[i] != NULL && cfgptr->ptrsAllocated[i] == true) {
free(cfgptr->ptrs[i]);
cfgptr->ptrs[i]=NULL;
cfgptr->ptrsAllocated[i] = false;
if (cfgptr->oneBlock[i].ptrs != NULL && cfgptr->oneBlock[i].ptrsAllocated== true && cfgptr->oneBlock[i].toFree) {
free(cfgptr->oneBlock[i].ptrs);
memset(&cfgptr->oneBlock[i], 0, sizeof(cfgptr->oneBlock[i]));
}
}
cfgptr->numptrs=0;
}
}
pthread_mutex_unlock(&cfgptr->memBlocks_mutex);
if ( cfgptr->cfgmode )
free(cfgptr->cfgmode);
/* free all memory used by config module */
/* should be called only at program exit */
void free_configmodule(void) {
if (cfgptr != NULL) {
end_configmodule();
if( cfgptr->cfgmode != NULL) free(cfgptr->cfgmode);
printf ("[CONFIG] free %i config parameter pointers\n",cfgptr->num_cfgP);
for (int i=0; i<cfgptr->num_cfgP; i++) {
if ( cfgptr->cfgP[i] != NULL) free(cfgptr->cfgP[i]);
}
if ( cfgptr->argv_info )
free( cfgptr->argv_info );
free(cfgptr);
cfgptr=NULL;
@@ -372,3 +362,4 @@ void free_configmodule(void) {

View File

@@ -41,7 +41,7 @@
#include "common/config/config_paramdesc.h"
#include "common/utils/T/T.h"
#define CONFIG_MAX_OOPT_PARAMS 10 // maximum number of parameters in the -O option (-O <cfgmode>:P1:P2...
#define CONFIG_MAX_ALLOCATEDPTRS 1024 // maximum number of parameters that can be dynamicaly allocated in the config module
#define CONFIG_MAX_ALLOCATEDPTRS 2048 // maximum number of parameters that can be dynamicaly allocated in the config module
/* default values for configuration module parameters */
#define CONFIG_LIBCONFIGFILE "libconfig" // use libconfig file
@@ -62,6 +62,14 @@ typedef int(*configmodule_initfunc_t)(char *cfgP[],int numP);
typedef int(*configmodule_getfunc_t)(paramdef_t *,int numparams, char *prefix);
typedef int(*configmodule_getlistfunc_t)(paramlist_def_t *, paramdef_t *,int numparams, char *prefix);
typedef void(*configmodule_endfunc_t)(void);
typedef struct oneBlock_s{
void *ptrs;
int sz;
bool toFree;
bool ptrsAllocated;
} oneBlock_t;
typedef struct configmodule_interface {
int argc;
char **argv;
@@ -73,10 +81,10 @@ typedef struct configmodule_interface {
configmodule_getfunc_t get;
configmodule_getlistfunc_t getlist;
configmodule_endfunc_t end;
pthread_mutex_t memBlocks_mutex;
uint32_t numptrs;
uint32_t rtflags;
char *ptrs[CONFIG_MAX_ALLOCATEDPTRS];
bool ptrsAllocated[CONFIG_MAX_ALLOCATEDPTRS];
oneBlock_t oneBlock[CONFIG_MAX_ALLOCATEDPTRS];
} configmodule_interface_t;
#ifdef CONFIG_LOADCONFIG_MAIN
@@ -112,7 +120,15 @@ extern configmodule_interface_t *cfgptr;
#define CONFIG_ENABLECMDLINEONLY (1<<1)
extern configmodule_interface_t *load_configmodule(int argc, char **argv, uint32_t initflags);
/* free ressources used to read parameters, keep memory
* allocated for parameters values which has been defined with the PARAMFLAG_NOFREE flag
* should be used as soon as there is no need to read parameters but doesn't prevent
* a new config module init
*/
extern void end_configmodule(void);
/* free all config module memory, to be used at end of program as
* it will free parameters values even those specified with the PARAMFLAG_NOFREE flag */
extern void free_configmodule(void);
#define CONFIG_PRINTF_ERROR(f, x... ) if (isLogInitDone ()) { LOG_E(ENB_APP,f,x);} else {printf(f,x);}; if ( !CONFIG_ISFLAGSET(CONFIG_NOABORTONCHKF) ) exit_fun("exit because configuration failed\n");

View File

@@ -96,11 +96,13 @@ typedef union checkedparam {
/* paramdef is used to describe a parameter, array of paramdef_t strustures is used as the main parameter in */
/* config apis used to retrieve parameters values */
#define MAX_LIST_SIZE 32
#define DEFAULT_EXTRA_SZ 256
typedef struct paramdef {
char optname[MAX_OPTNAME_SIZE]; /* parameter name, can be used as long command line option */
char *helpstr; /* help string */
unsigned int paramflags; /* value is a "ored" combination of above PARAMFLAG_XXXX values */
union { /* pointer to the parameter value, completed by the config module */
union { /* pointer to the parameter value, completed by the config module */
char **strptr;
char **strlistptr;
uint8_t *u8ptr;

View File

@@ -52,59 +52,97 @@ configmodule_interface_t *config_get_if(void) {
return cfgptr;
}
char *config_check_valptr(paramdef_t *cfgoptions, char **ptr, int length) {
if (ptr == NULL ) {
ptr = malloc(sizeof(char *));
static int managed_ptr_sz(void* ptr) {
configmodule_interface_t * cfg=config_get_if();
AssertFatal(cfg->numptrs < CONFIG_MAX_ALLOCATEDPTRS,
"This code use fixed size array as #define CONFIG_MAX_ALLOCATEDPTRS %d\n",
CONFIG_MAX_ALLOCATEDPTRS);
int i;
pthread_mutex_lock(&cfg->memBlocks_mutex);
int numptrs=cfg->numptrs;
for (i=0; i<numptrs; i++ )
if (cfg->oneBlock[i].ptrs == ptr)
break;
pthread_mutex_unlock(&cfg->memBlocks_mutex);
if ( i == numptrs )
return -1;
else
return cfg->oneBlock[i].sz;
}
if (ptr != NULL) {
*ptr=NULL;
cfgoptions->strptr=ptr;
void *config_allocate_new(int sz, bool autoFree) {
void *ptr = calloc(sz,1);
AssertFatal(ptr, "calloc fails\n");
configmodule_interface_t * cfg=config_get_if();
// add the memory piece in the managed memory pieces list
pthread_mutex_lock(&cfg->memBlocks_mutex);
int newBlockIdx=cfg->numptrs++;
oneBlock_t* tmp=&cfg->oneBlock[newBlockIdx];
tmp->ptrs = (char *)ptr;
tmp->ptrsAllocated = true;
tmp->sz=sz;
tmp->toFree=autoFree;
pthread_mutex_unlock(&cfg->memBlocks_mutex);
return ptr;
}
if ( (cfgoptions->paramflags & PARAMFLAG_NOFREE) == 0) {
config_get_if()->ptrs[config_get_if()->numptrs] = (char *)ptr;
config_get_if()->ptrsAllocated[config_get_if()->numptrs] = true;
config_get_if()->numptrs++;
}
} else {
CONFIG_PRINTF_ERROR("[CONFIG] %s %d option %s, cannot allocate pointer: %s \n",
__FILE__, __LINE__, cfgoptions->optname, strerror(errno));
void config_check_valptr(paramdef_t *cfgoptions, int elt_sz, int nb_elt) {
const bool toFree=!(cfgoptions->paramflags & PARAMFLAG_NOFREE);
// let's see if the value has been read
// the datamodel is more difficult than it should be
// and it is not thread safe
if (cfgoptions->voidptr) {
int sz;
if ( cfgoptions-> type == TYPE_STRING)
sz=managed_ptr_sz(*cfgoptions->strptr);
else
sz=managed_ptr_sz(cfgoptions->voidptr);
if ( sz != -1 ) // the same variable pointer has been used!
cfgoptions->numelt=sz;
}
if (cfgoptions->voidptr != NULL
&& (cfgoptions->type == TYPE_INTARRAY
|| cfgoptions->type == TYPE_UINTARRAY
|| cfgoptions->type == TYPE_STRINGLIST )) {
int sz;
if ( cfgoptions->type == TYPE_STRING ||
cfgoptions->type == TYPE_STRINGLIST )
sz=managed_ptr_sz(*cfgoptions->strptr);
else
sz=managed_ptr_sz(cfgoptions->voidptr);
if ( sz != -1) {
CONFIG_PRINTF_ERROR("[CONFIG] %s NOT SUPPORTED not NULL pointer with array types", cfgoptions->optname);
return ;
}
}
printf_ptrs("[CONFIG] %s ptr: 0x%08lx requested size: %i\n",cfgoptions->optname,(uintptr_t)(ptr),length);
if(cfgoptions->numelt > 0 && PARAM_ISSCALAR(cfgoptions) ) { /* already allocated */
if (*ptr != NULL) {
return *ptr;
if (cfgoptions->voidptr == NULL ) {
if (cfgoptions->type == TYPE_STRING) {
// difficult datamodel
cfgoptions->strptr = config_allocate_new(sizeof(*cfgoptions->strptr), toFree);
} else if ( cfgoptions->type == TYPE_STRINGLIST) {
AssertFatal(nb_elt<MAX_LIST_SIZE,
"This piece of code use fixed size arry of constant #define MAX_LIST_SIZE %d\n",
MAX_LIST_SIZE );
cfgoptions->strlistptr= config_allocate_new(sizeof(char*)*MAX_LIST_SIZE, toFree);
for (int i=0; i<MAX_LIST_SIZE; i++)
cfgoptions->strlistptr[i]= config_allocate_new(DEFAULT_EXTRA_SZ, toFree);
} else {
CONFIG_PRINTF_ERROR("[CONFIG] %s %d option %s, definition error: value pointer is NULL, declared as %i bytes allocated\n",
__FILE__, __LINE__,cfgoptions->optname, cfgoptions->numelt);
if ( cfgoptions->type == TYPE_INTARRAY || cfgoptions->type == TYPE_UINTARRAY )
nb_elt=max(nb_elt, MAX_LIST_SIZE); // make room if the list is larger than the default one
cfgoptions->voidptr = config_allocate_new(elt_sz*nb_elt, toFree);
}
}
if (*ptr == NULL) {
// LTS: dummy fix, waiting Francois full fix in 4G branch
// the issue is we don't know at this point the size we will get
// for parmeters on the command line,
// The length sould probably managed, in a later version
// 100 is a very large value for a string parameter of today OAI
if (length<100)
length=100;
*ptr = malloc(length);
if ( *ptr != NULL) {
memset(*ptr,0,length);
if ( (cfgoptions->paramflags & PARAMFLAG_NOFREE) == 0) {
config_get_if()->ptrs[config_get_if()->numptrs] = *ptr;
config_get_if()->numptrs++;
}
} else {
CONFIG_PRINTF_ERROR("[CONFIG] %s %d malloc error\n",__FILE__, __LINE__);
}
if (cfgoptions->type == TYPE_STRING && *cfgoptions->strptr == NULL) {
*cfgoptions->strptr = config_allocate_new(nb_elt+DEFAULT_EXTRA_SZ, toFree);
cfgoptions->numelt=nb_elt+DEFAULT_EXTRA_SZ;
}
return *ptr;
printf_ptrs("[CONFIG] %s ptr: %p requested size: elt_sz: %d, nb_elt: %d\n",cfgoptions->optname, cfgoptions->voidptr, elt_sz, nb_elt);
}
void config_assign_int(paramdef_t *cfgoptions, char *fullname, int val) {
@@ -156,7 +194,7 @@ void config_assign_int(paramdef_t *cfgoptions, char *fullname, int val) {
}
}
void config_assign_processedint(paramdef_t *cfgoption, int val) {
cfgoption->processedvalue = malloc(sizeof(int));
cfgoption->processedvalue = config_allocate_new(sizeof(int),!(cfgoption->paramflags & PARAMFLAG_NOFREE));
if ( cfgoption->processedvalue != NULL) {
*(cfgoption->processedvalue) = val;
@@ -172,7 +210,7 @@ int config_get_processedint(paramdef_t *cfgoption) {
ret=*(cfgoption->processedvalue);
free( cfgoption->processedvalue);
cfgoption->processedvalue=NULL;
printf_params("[CONFIG] %s: set from %s to %i\n",cfgoption->optname, *(cfgoption->strptr), ret);
printf_params("[CONFIG] %s: set from %s to %i\n",cfgoption->optname, *cfgoption->strptr, ret);
} else {
fprintf (stderr,"[CONFIG] %s %d %s has no processed integer availablle\n",__FILE__, __LINE__, cfgoption->optname);
ret=0;
@@ -344,7 +382,7 @@ int config_check_intrange(paramdef_t *param) {
void print_strvalueerror(paramdef_t *param, char *fname, char **okval, int numokval) {
fprintf(stderr,"[CONFIG] %s: %s: %s invalid value, authorized values:\n ",
fname,param->optname, *(param->strptr));
fname,param->optname, *param->strptr);
for ( int i=0; i<numokval ; i++) {
fprintf(stderr, " %s",okval[i]);
@@ -360,7 +398,7 @@ int config_check_strval(paramdef_t *param) {
}
for ( int i=0; i<param->chkPptr->s3.num_okstrval ; i++) {
if( strcasecmp(*(param->strptr),param->chkPptr->s3.okstrval[i] ) == 0) {
if( strcasecmp(*param->strptr,param->chkPptr->s3.okstrval[i] ) == 0) {
return 0;
}
}
@@ -371,7 +409,7 @@ int config_check_strval(paramdef_t *param) {
int config_checkstr_assign_integer(paramdef_t *param) {
for (int i=0; i < param->chkPptr->s3a.num_okstrval ; i++) {
if (strcasecmp(*(param->strptr),param->chkPptr->s3a.okstrval[i] ) == 0) {
if (strcasecmp(*param->strptr,param->chkPptr->s3a.okstrval[i] ) == 0) {
config_assign_processedint(param, param->chkPptr->s3a.setintval[i]);
return 0;
}
@@ -393,14 +431,14 @@ int config_setdefault_string(paramdef_t *cfgoptions, char *prefix) {
if( cfgoptions->defstrval != NULL) {
status=1;
if (cfgoptions->numelt == 0 ) {
config_check_valptr(cfgoptions, cfgoptions->strptr, strlen(cfgoptions->defstrval)+1);
sprintf(*(cfgoptions->strptr), "%s",cfgoptions->defstrval);
printf_params("[CONFIG] %s.%s set to default value \"%s\"\n", ((prefix == NULL) ? "" : prefix), cfgoptions->optname, *(cfgoptions->strptr));
} else {
sprintf((char *)(cfgoptions->strptr), "%s",cfgoptions->defstrval);
printf_params("[CONFIG] %s.%s set to default value \"%s\"\n", ((prefix == NULL) ? "" : prefix), cfgoptions->optname, (char *)(cfgoptions->strptr));
if (cfgoptions->numelt == 0 )
config_check_valptr(cfgoptions, 1, strlen(cfgoptions->defstrval)+1);
if ( cfgoptions->numelt < strlen(cfgoptions->defstrval)+1 ) {
CONFIG_PRINTF_ERROR("[CONFIG] %s size too small\n", cfgoptions->optname);
}
snprintf(*cfgoptions->strptr, cfgoptions->numelt, "%s",cfgoptions->defstrval);
printf_params("[CONFIG] %s.%s set to default value \"%s\"\n", ((prefix == NULL) ? "" : prefix), cfgoptions->optname, *cfgoptions->strptr);
}
return status;
@@ -422,7 +460,7 @@ int config_setdefault_stringlist(paramdef_t *cfgoptions, char *prefix) {
int config_setdefault_int(paramdef_t *cfgoptions, char *prefix) {
int status = 0;
config_check_valptr(cfgoptions, (char **)(&(cfgoptions->iptr)),sizeof(int32_t));
config_check_valptr(cfgoptions, sizeof(*cfgoptions->iptr), 1);
if( ((cfgoptions->paramflags & PARAMFLAG_MANDATORY) == 0)) {
config_assign_int(cfgoptions,cfgoptions->optname,cfgoptions->defintval);
@@ -435,7 +473,7 @@ int config_setdefault_int(paramdef_t *cfgoptions, char *prefix) {
int config_setdefault_int64(paramdef_t *cfgoptions, char *prefix) {
int status = 0;
config_check_valptr(cfgoptions, (char **)&(cfgoptions->i64ptr),sizeof(long long));
config_check_valptr(cfgoptions, sizeof(*cfgoptions->i64ptr), 1);
if( ((cfgoptions->paramflags & PARAMFLAG_MANDATORY) == 0)) {
*(cfgoptions->u64ptr)=cfgoptions->defuintval;
@@ -450,7 +488,7 @@ int config_setdefault_intlist(paramdef_t *cfgoptions, char *prefix) {
int status = 0;
if( cfgoptions->defintarrayval != NULL) {
config_check_valptr(cfgoptions,(char **)&(cfgoptions->iptr), sizeof(int32_t *));
config_check_valptr(cfgoptions, sizeof(cfgoptions->iptr), cfgoptions->numelt);
cfgoptions->iptr=cfgoptions->defintarrayval;
status=1;
@@ -464,7 +502,7 @@ int config_setdefault_intlist(paramdef_t *cfgoptions, char *prefix) {
int config_setdefault_double(paramdef_t *cfgoptions, char *prefix) {
int status = 0;
config_check_valptr(cfgoptions, (char **)&(cfgoptions->dblptr),sizeof(double));
config_check_valptr(cfgoptions, sizeof(*cfgoptions->dblptr), 1);
if( ((cfgoptions->paramflags & PARAMFLAG_MANDATORY) == 0)) {
*(cfgoptions->dblptr)=cfgoptions->defdblval;
@@ -476,7 +514,7 @@ int config_setdefault_double(paramdef_t *cfgoptions, char *prefix) {
}
int config_assign_ipv4addr(paramdef_t *cfgoptions, char *ipv4addr) {
config_check_valptr(cfgoptions,(char **)&(cfgoptions->uptr), sizeof(int));
config_check_valptr(cfgoptions, sizeof(*cfgoptions->uptr), 1);
int rst=inet_pton(AF_INET, ipv4addr,cfgoptions->uptr );
if (rst == 1 && *(cfgoptions->uptr) > 0) {

View File

@@ -51,7 +51,7 @@ extern int config_paramidx_fromname(paramdef_t *params,int numparams, char *name
/* utility functions, to be used by configuration module and/or configuration libraries */
extern configmodule_interface_t *config_get_if(void);
extern char *config_check_valptr(paramdef_t *cfgoptions, char **ptr, int length) ;
void config_check_valptr(paramdef_t *cfgoptions, int elt_sz, int nb_elt);
extern void config_printhelp(paramdef_t *,int numparams, char *prefix);
extern int config_process_cmdline(paramdef_t *params,int numparams, char *prefix);
extern void config_assign_processedint(paramdef_t *cfgoption, int val);
@@ -86,7 +86,7 @@ extern int config_setdefault_int64(paramdef_t *cfgoptions, char *prefix);
extern int config_setdefault_intlist(paramdef_t *cfgoptions, char *prefix);
extern int config_setdefault_double(paramdef_t *cfgoptions, char *prefix);
extern int config_setdefault_ipv4addr(paramdef_t *cfgoptions, char *prefix);
void *config_allocate_new(int sz, bool autoFree);
#define CONFIG_GETCONFFILE (config_get_if()->cfgP[0])
#ifdef __cplusplus

View File

@@ -29,6 +29,7 @@
* \warning
*/
#define _GNU_SOURCE
#include <pthread.h>
#include <libconfig.h>
#include <string.h>
@@ -41,6 +42,7 @@
#include "config_libconfig_private.h"
#include "../config_userapi.h"
#include "errno.h"
#include "assertions.h"
#if ( LIBCONFIG_VER_MAJOR == 1 && LIBCONFIG_VER_MINOR < 5)
#define config_setting_lookup config_lookup_from
@@ -53,17 +55,18 @@ int read_strlist(paramdef_t *cfgoptions,config_setting_t *setting, char *cfgpath
int st;
int numelt;
numelt=config_setting_length(setting);
config_check_valptr(cfgoptions,(char **)&(cfgoptions->strlistptr), sizeof(char *) * numelt);
config_check_valptr(cfgoptions, sizeof(char *), numelt);
st=0;
AssertFatal(MAX_LIST_SIZE > numelt,
"This piece of code use fixed size arry of constant #define MAX_LIST_SIZE %d\n",
MAX_LIST_SIZE );
for (int i=0; i< numelt ; i++) {
str=config_setting_get_string_elem(setting,i);
if (str==NULL) {
printf("[LIBCONFIG] %s%i not found in config file\n", cfgoptions->optname,i);
} else {
config_check_valptr(cfgoptions,&(cfgoptions->strlistptr[i]),strlen(str)+1);
sprintf(cfgoptions->strlistptr[i],"%s",str);
snprintf(cfgoptions->strlistptr[i], DEFAULT_EXTRA_SZ, "%s",str);
st++;
printf_params("[LIBCONFIG] %s%i: %s\n", cfgpath,i,cfgoptions->strlistptr[i]);
}
@@ -77,7 +80,8 @@ int read_intarray(paramdef_t *cfgoptions,config_setting_t *setting, char *cfgpat
cfgoptions->numelt=config_setting_length(setting);
if (cfgoptions->numelt > 0) {
cfgoptions->iptr=malloc(sizeof(int) * (cfgoptions->numelt));
cfgoptions->iptr=config_allocate_new(cfgoptions->numelt*sizeof(*cfgoptions->iptr),
!(cfgoptions->paramflags & PARAMFLAG_NOFREE) );
for (int i=0; i< cfgoptions->numelt && cfgoptions->iptr != NULL; i++) {
cfgoptions->iptr[i]=config_setting_get_int_elem(setting,i);
@@ -123,23 +127,14 @@ int config_libconfig_get(paramdef_t *cfgoptions,int numoptions, char *prefix ) {
switch(cfgoptions[i].type) {
case TYPE_STRING:
if ( config_lookup_string(&(libconfig_privdata.cfg), cfgpath, (const char**)&str)) {
if ( cfgoptions[i].numelt > 0 && str != NULL && strlen(str) >= cfgoptions[i].numelt ) {
config_check_valptr(&(cfgoptions[i]), 1, strlen(str)+1);
if ( strlen(str)+1 > cfgoptions[i].numelt )
fprintf(stderr,"[LIBCONFIG] %s: %s exceeds maximum length of %i bytes, value truncated\n",
cfgpath,str,cfgoptions[i].numelt);
str[strlen(str)-1] = 0;
}
if (cfgoptions[i].numelt == 0 ) {
// config_check_valptr(&(cfgoptions[i]), (char **)(&(cfgoptions[i].strptr)), sizeof(char *));
config_check_valptr(&(cfgoptions[i]), cfgoptions[i].strptr, strlen(str)+1);
sprintf( *(cfgoptions[i].strptr) , "%s", str);
printf_params("[LIBCONFIG] %s: \"%s\"\n", cfgpath,*(cfgoptions[i].strptr) );
} else {
sprintf( (char *)(cfgoptions[i].strptr) , "%s", str);
printf_params("[LIBCONFIG] %s: \"%s\"\n", cfgpath,(char *)cfgoptions[i].strptr );
}
snprintf( *cfgoptions[i].strptr , cfgoptions[i].numelt, "%s", str);
printf_params("[LIBCONFIG] %s: \"%s\"\n", cfgpath, *cfgoptions[i].strptr);
} else {
defval=config_setdefault_string(&(cfgoptions[i]),prefix);
defval=config_setdefault_string(&cfgoptions[i],prefix);
}
break;
@@ -163,7 +158,7 @@ int config_libconfig_get(paramdef_t *cfgoptions,int numoptions, char *prefix ) {
case TYPE_INT32:
case TYPE_MASK:
if ( config_lookup_int(&(libconfig_privdata.cfg),cfgpath, &u)) {
config_check_valptr(&(cfgoptions[i]), (char **)(&(cfgoptions[i].iptr)),sizeof(int32_t));
config_check_valptr(&(cfgoptions[i]), sizeof(*cfgoptions[i].iptr), 1);
config_assign_int(&(cfgoptions[i]),cfgpath,u);
} else {
defval=config_setdefault_int(&(cfgoptions[i]),prefix);
@@ -174,14 +169,14 @@ int config_libconfig_get(paramdef_t *cfgoptions,int numoptions, char *prefix ) {
case TYPE_UINT64:
case TYPE_INT64:
if ( config_lookup_int64(&(libconfig_privdata.cfg),cfgpath, &llu)) {
config_check_valptr(&(cfgoptions[i]), (char **)&(cfgoptions[i].i64ptr),sizeof(long long));
config_check_valptr(&cfgoptions[i], sizeof(*cfgoptions[i].i64ptr), 1);
if(cfgoptions[i].type==TYPE_UINT64) {
*(cfgoptions[i].u64ptr) = (uint64_t)llu;
printf_params("[LIBCONFIG] %s: %llu\n", cfgpath,(long long unsigned)(*(cfgoptions[i].u64ptr)) );
printf_params("[LIBCONFIG] %s: %lu\n", cfgpath,*cfgoptions[i].u64ptr);
} else {
*(cfgoptions[i].i64ptr) = llu;
printf_params("[LIBCONFIG] %s: %lld\n", cfgpath,(long long)(*(cfgoptions[i].i64ptr)) );
printf_params("[LIBCONFIG] %s: %ld\n", cfgpath,*cfgoptions[i].i64ptr);
}
} else {
defval=config_setdefault_int64(&(cfgoptions[i]),prefix);
@@ -203,8 +198,8 @@ int config_libconfig_get(paramdef_t *cfgoptions,int numoptions, char *prefix ) {
case TYPE_DOUBLE:
if ( config_lookup_float(&(libconfig_privdata.cfg),cfgpath, &dbl)) {
config_check_valptr(&(cfgoptions[i]), (char **)&(cfgoptions[i].dblptr),sizeof(double));
*(cfgoptions[i].dblptr) = dbl;
config_check_valptr(&cfgoptions[i],sizeof(*cfgoptions[i].dblptr), 1);
*cfgoptions[i].dblptr = dbl;
printf_params("[LIBCONFIG] %s: %lf\n", cfgpath,*(cfgoptions[i].dblptr) );
} else {
defval=config_setdefault_double(&(cfgoptions[i]),prefix);
@@ -304,27 +299,10 @@ int config_libconfig_getlist(paramlist_def_t *ParamList,
}
if (ParamList->numelt > 0 && params != NULL) {
ParamList->paramarray = malloc(ParamList->numelt * sizeof(paramdef_t *));
if ( ParamList->paramarray != NULL) {
config_get_if()->ptrs[config_get_if()->numptrs] = (char *)(ParamList->paramarray);
config_get_if()->numptrs++;
} else {
fprintf (stderr,"[LIBCONFIG] %s %d malloc error\n",__FILE__, __LINE__);
exit(-1);
}
ParamList->paramarray = config_allocate_new(ParamList->numelt * sizeof(paramdef_t *), true);
for (i=0 ; i < ParamList->numelt ; i++) {
ParamList->paramarray[i] = malloc(numparams * sizeof(paramdef_t));
if ( ParamList->paramarray[i] != NULL) {
config_get_if()->ptrs[config_get_if()->numptrs] = (char *)(ParamList->paramarray[i]);
config_get_if()->numptrs++;
} else {
fprintf (stderr,"[LIBCONFIG] %s %d malloc error\n",__FILE__, __LINE__);
exit(-1);
}
ParamList->paramarray[i] = config_allocate_new(numparams * sizeof(paramdef_t), true);
memcpy(ParamList->paramarray[i], params, sizeof(paramdef_t)*numparams);
for (j=0; j<numparams; j++) {
@@ -346,8 +324,8 @@ int config_libconfig_init(char *cfgP[], int numP) {
config_init(&(libconfig_privdata.cfg));
libconfig_privdata.configfile = strdup((char *)cfgP[0]);
config_get_if()->numptrs=0;
memset(config_get_if()->ptrs,0,sizeof(void *) * CONFIG_MAX_ALLOCATEDPTRS);
memset(config_get_if()->ptrsAllocated, 0, sizeof(config_get_if()->ptrsAllocated));
pthread_mutex_init(&config_get_if()->memBlocks_mutex, NULL);
memset(config_get_if()->oneBlock,0,sizeof(config_get_if()->oneBlock));
/* search for include path parameter and set config file include path accordingly */
for (int i=0; i<numP; i++) {
if (strncmp(cfgP[i],"incp",4) == 0) {

View File

@@ -380,8 +380,8 @@ void log_getconfig(log_t *g_log)
}
int register_log_component(char *name,
char *fext,
int compidx)
char *fext,
int compidx)
{
int computed_compidx=compidx;
@@ -542,11 +542,11 @@ static inline int log_header(log_component_t *c,
char l[32];
if (flag & FLAG_FILE_LINE && flag & FLAG_FUNCT )
snprintf(l, sizeof l, "(%s:%d) ", func, line);
snprintf(l, sizeof l, "(%.23s:%d) ", func, line);
else if (flag & FLAG_FILE_LINE)
snprintf(l, sizeof l, "(%d) ", line);
else if (flag & FLAG_FUNCT)
snprintf(l, sizeof l, "(%s) ", func);
snprintf(l, sizeof l, "(%.28s) ", func);
else
l[0] = 0;
@@ -800,15 +800,13 @@ void logClean (void)
int i;
if(isLogInitDone()) {
LOG_UI(PHY,"\n");
for (i=MIN_LOG_COMPONENTS; i < MAX_LOG_COMPONENTS; i++) {
close_component_filelog(i);
}
}
}
extern volatile int oai_exit;//extern int oai_exit;
extern int oai_exit;
void flush_mem_to_file(void)
{
int fp;

View File

@@ -393,7 +393,7 @@ int32_t write_file_matlab(const char *fname, const char *vname, void *data, int
/* optname help paramflags XXXptr defXXXval type numelt */
/*-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/
#define LOG_GLOBALPARAMS_DESC { \
{LOG_CONFIG_STRING_GLOBAL_LOG_LEVEL, "Default log level for all componemts\n", 0, strptr:(char **)&gloglevel, defstrval:log_level_names[3].name, TYPE_STRING, 0}, \
{LOG_CONFIG_STRING_GLOBAL_LOG_LEVEL, "Default log level for all componemts\n", 0, strptr:&gloglevel, defstrval:log_level_names[3].name, TYPE_STRING, 0}, \
{LOG_CONFIG_STRING_GLOBAL_LOG_ONLINE, "Default console output option, for all components\n", 0, iptr:&(consolelog), defintval:1, TYPE_INT, 0}, \
{LOG_CONFIG_STRING_GLOBAL_LOG_OPTIONS, LOG_CONFIG_HELP_OPTIONS, 0, strlistptr:NULL, defstrlistval:NULL, TYPE_STRINGLIST, 0} \
}

View File

@@ -8,22 +8,19 @@
#include <sys/stat.h>
#include <fcntl.h>
#include <sys/socket.h>
#include <sys/types.h>
#include <signal.h>
#include "common/config/config_userapi.h"
#define QUIT(x) do { \
printf("T tracer: QUIT: %s\n", x); \
exit(1); \
} while (0)
/* array used to activate/disactivate a log */
static int T_IDs[T_NUMBER_OF_IDS];
int *T_active = T_IDs;
int T_stdout = 1;
static int T_socket;
static int local_tracer_pid;
/* T_cache
* - the T macro picks up the head of freelist and marks it busy
@@ -33,63 +30,78 @@ volatile int _T_freelist_head;
volatile int *T_freelist_head = &_T_freelist_head;
T_cache_t *T_cache;
static void get_message(int s) {
#define GET_MESSAGE_FAIL do { \
printf("T tracer: get_message failed\n"); \
return -1; \
} while (0)
/* return -1 if error, 0 if no error */
static int get_message(int s)
{
char t;
int l;
int id;
int is_on;
if (read(s, &t, 1) != 1) QUIT("get_message fails");
if (read(s, &t, 1) != 1) GET_MESSAGE_FAIL;
printf("T tracer: got mess %d\n", t);
switch (t) {
case 0:
/* toggle all those IDs */
/* optimze? (too much syscalls) */
if (read(s, &l, sizeof(int)) != sizeof(int)) QUIT("get_message fails");
if (read(s, &l, sizeof(int)) != sizeof(int)) GET_MESSAGE_FAIL;
while (l) {
if (read(s, &id, sizeof(int)) != sizeof(int)) QUIT("get_message fails");
if (read(s, &id, sizeof(int)) != sizeof(int)) GET_MESSAGE_FAIL;
T_IDs[id] = 1 - T_IDs[id];
l--;
}
break;
case 1:
/* set IDs as given */
/* optimize? */
if (read(s, &l, sizeof(int)) != sizeof(int)) QUIT("get_message fails");
if (read(s, &l, sizeof(int)) != sizeof(int)) GET_MESSAGE_FAIL;
id = 0;
while (l) {
if (read(s, &is_on, sizeof(int)) != sizeof(int))
QUIT("get_message fails");
GET_MESSAGE_FAIL;
T_IDs[id] = is_on;
id++;
l--;
}
break;
case 2:
break; /* do nothing, this message is to wait for local tracer */
}
return 0;
}
static void *T_receive_thread(void *_) {
while (1) get_message(T_socket);
static void *T_receive_thread(void *_)
{
int err = 0;
while (!err) err = get_message(T_socket);
printf("T tracer: fatal: T tracer disabled\n");
shutdown(T_socket, SHUT_RDWR);
close(T_socket);
kill(local_tracer_pid, SIGKILL);
/* disable all traces */
memset(T_IDs, 0, sizeof(T_IDs));
return NULL;
}
static void new_thread(void *(*f)(void *), void *data) {
static void new_thread(void *(*f)(void *), void *data)
{
pthread_t t;
pthread_attr_t att;
@@ -118,27 +130,11 @@ static void new_thread(void *(*f)(void *), void *data) {
void T_local_tracer_main(int remote_port, int wait_for_tracer,
int local_socket, void *shm_array);
/* We monitor the tracee and the local tracer processes.
* When one dies we forcefully kill the other.
*/
#include <sys/types.h>
#include <sys/wait.h>
static void monitor_and_kill(int child1, int child2) {
int child;
int status;
child = wait(&status);
if (child == -1) perror("wait");
kill(child1, SIGKILL);
kill(child2, SIGKILL);
exit(0);
}
void T_init(int remote_port, int wait_for_tracer, int dont_fork) {
void T_init(int remote_port, int wait_for_tracer)
{
int socket_pair[2];
int s;
int child1, child2;
int child;
int i;
if (socketpair(AF_UNIX, SOCK_STREAM, 0, socket_pair)) {
@@ -162,47 +158,40 @@ void T_init(int remote_port, int wait_for_tracer, int dont_fork) {
for (i = 0; i < T_CACHE_SIZE; i++) T_cache[i].busy = 0;
/* child1 runs the local tracer and child2 (or main) runs the tracee */
child1 = fork();
/* child runs the local tracer and main runs the tracee */
child = fork();
if (child1 == -1) abort();
if (child == -1) abort();
if (child1 == 0) {
if (child == 0) {
close(socket_pair[1]);
T_local_tracer_main(remote_port, wait_for_tracer, socket_pair[0],
T_cache);
exit(0);
}
local_tracer_pid = child;
close(socket_pair[0]);
if (dont_fork == 0) {
child2 = fork();
s = socket_pair[1];
T_socket = s;
if (child2 == -1) abort();
if (child2 != 0) {
close(socket_pair[1]);
munmap(T_cache, T_CACHE_SIZE * sizeof(T_cache_t));
monitor_and_kill(child1, child2);
}
/* wait for first message - initial list of active T events */
if (get_message(s) == -1) {
kill(local_tracer_pid, SIGKILL);
return;
}
s = socket_pair[1];
/* wait for first message - initial list of active T events */
get_message(s);
T_socket = s;
new_thread(T_receive_thread, NULL);
}
void T_Config_Init(void) {
int T_port=TTRACER_DEFAULT_PORTNUM; /* by default we wait for the tracer */
int T_nowait=0; /* default port to listen to to wait for the tracer */
int T_dont_fork=0; /* default is to fork, see 'T_init' to understand */
void T_Config_Init(void)
{
int T_port = TTRACER_DEFAULT_PORTNUM;
int T_nowait = 0;
paramdef_t ttraceparams[] = CMDLINE_TTRACEPARAMS_DESC;
/* for a cleaner config file, TTracer params should be defined in a
* specific section...
*/
config_get(ttraceparams,
sizeof(ttraceparams) / sizeof(paramdef_t),
TTRACER_CONFIG_PREFIX);
@@ -217,5 +206,5 @@ void T_Config_Init(void) {
}
if (T_stdout == 0 || T_stdout == 2)
T_init(T_port, 1-T_nowait, T_dont_fork);
T_init(T_port, 1-T_nowait);
}

View File

@@ -15,8 +15,8 @@
#include "T_IDs.h"
#define T_ACTIVE_STDOUT 2
/* known type - this is where you add new types */
/* known type - this is where you add new types */
#define T_INT(x) int, (x)
#define T_FLOAT(x) float, (x)
#define T_BUFFER(x, len) buffer, ((T_buffer){addr:(x), length:(len)})
@@ -111,6 +111,7 @@ typedef struct {
extern volatile int *T_freelist_head;
extern T_cache_t *T_cache;
extern int *T_active;
#define T_GET_SLOT \
T_LOCAL_busy = __sync_fetch_and_or(&T_cache[T_LOCAL_slot].busy, 0x01);
@@ -559,14 +560,12 @@ extern int *T_active;
} \
} while (0)
#define CONFIG_HLP_TPORT "tracer port\n"
#define CONFIG_HLP_NOTWAIT "don't wait for tracer, start immediately\n"
#define CONFIG_HLP_TNOFORK "to ease debugging with gdb\n"
#define CONFIG_HLP_STDOUT "print log messges on console\n"
#define TTRACER_CONFIG_PREFIX "TTracer"
/*-------------------------------------------------------------------------------------------------------------------------------------------------*/
/* configuration parameters for TTRACE utility */
/* optname helpstr paramflags XXXptr defXXXval type numelt */
@@ -575,15 +574,12 @@ extern int *T_active;
#define CMDLINE_TTRACEPARAMS_DESC { \
{"T_port", CONFIG_HLP_TPORT, 0, iptr:&T_port, defintval:TTRACER_DEFAULT_PORTNUM, TYPE_INT, 0},\
{"T_nowait", CONFIG_HLP_NOTWAIT, PARAMFLAG_BOOL, iptr:&T_nowait, defintval:0, TYPE_INT, 0},\
{"T_dont_fork", CONFIG_HLP_TNOFORK, PARAMFLAG_BOOL, iptr:&T_dont_fork, defintval:0, TYPE_INT, 0},\
{"T_stdout", CONFIG_HLP_STDOUT, 0, iptr:&T_stdout, defintval:1, TYPE_INT, 0},\
}
/* log on stdout */
void T_init(int remote_port, int wait_for_tracer, int dont_fork);
void T_init(int remote_port, int wait_for_tracer);
void T_Config_Init(void);
#else /* T_TRACER */
/* if T_TRACER is not defined or is 0, the T is deactivated */

View File

@@ -0,0 +1,71 @@
/*
* 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
*/
#ifndef LINEAR_ALLOC_H
#define LINEAR_ALLOC_H
#include <limits.h>
typedef unsigned int uid_t;
#define UID_LINEAR_ALLOCATOR_SIZE 1024
#define UID_LINEAR_ALLOCATOR_BITMAP_SIZE (((UID_LINEAR_ALLOCATOR_SIZE/8)/sizeof(unsigned int)) + 1)
typedef struct uid_linear_allocator_s {
unsigned int bitmap[UID_LINEAR_ALLOCATOR_BITMAP_SIZE];
} uid_allocator_t;
static inline void uid_linear_allocator_init(uid_allocator_t *uia) {
memset(uia, 0, sizeof(uid_allocator_t));
}
static inline uid_t uid_linear_allocator_new(uid_allocator_t *uia) {
unsigned int bit_index = 1;
uid_t uid = 0;
for (unsigned int i = 0; i < UID_LINEAR_ALLOCATOR_BITMAP_SIZE; i++) {
if (uia->bitmap[i] != UINT_MAX) {
bit_index = 1;
uid = 0;
while ((uia->bitmap[i] & bit_index) == bit_index) {
bit_index = bit_index << 1;
uid += 1;
}
uia->bitmap[i] |= bit_index;
return uid + (i*sizeof(unsigned int)*8);
}
}
return UINT_MAX;
}
static inline void uid_linear_allocator_free(uid_allocator_t *uia, uid_t uid) {
const unsigned int i = uid/sizeof(unsigned int)/8;
const unsigned int bit = uid % (sizeof(unsigned int) * 8);
const unsigned int value = ~(1 << bit);
if (i < UID_LINEAR_ALLOCATOR_BITMAP_SIZE) {
uia->bitmap[i] &= value;
}
}
#endif /* LINEAR_ALLOC_H */

56
common/utils/config.h Normal file
View File

@@ -0,0 +1,56 @@
/*
* 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
*/
#ifndef UTILS_CONFIG_H_ASN1
#define UTILS_CONFIG_H_ASN1
// This is hard coded file name "config.h" and HAVE_CONFIG_H_ in asn1c skeletons
/*
* This file "config.h" will be used by asn1c if HAVE_CONFIG_H_ is defined and
* included. This logs asn1c encoder and decoder traces at execution time using
* the regular OAI logging system, i.e., LOG_I(ASN...);
*
* As it is very verbose, note that you can change the log level per module in
* source or in gdb, e.g., to only activate it for a short time.
*
* In code:
* ```
* set_log(ASN, OAI_INFO); // enable logging
* // do your encoding here
* set_log(ASN, OAI_ERR); // disable logging
* ```
*
* in gdb:
* ```
* gdb> p set_log(ASN, 1) // disable log, 1 == OAI_ERR
* gdb> p set_log(ASN, 5) // enable log, 5 == OAI_INFO
* ```
*/
#include "common/utils/LOG/log.h"
#if DEBUG_ASN1C
#define ASN_DEBUG(x...) do{ LOG_I(ASN,x);LOG_I(ASN,"\n"); } while(false)
#else
#define ASN_DEBUG(x...)
#endif
#endif /* UTILS_CONFIG_H_ASN1 */

319
common/utils/cpustats.c Normal file
View File

@@ -0,0 +1,319 @@
/*
* 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
*/
/*
* This file implements the cpu statistics for Level 1 in gnb and in UE.
* Caveats: Note that we did not merge this development into file telnetsrv_gnb_measurements.c and telnetsrv_5Gue_measurements.c
* belonging to telnetsrv shared library because we needed to provide an API for main programs exectuable without inserting a new
* dependency on the telnetsrv shared library.
*/
#define _GNU_SOURCE
#include <pthread.h>
#include <stdbool.h>
#include <errno.h>
#include <linux/sched.h>
#include "common/utils/LOG/log.h"
#include "common/utils/threadPool/thread-pool.h"
#include "cpustats.h"
#include "common/utils/time_meas.h"
#define UEL1_THREADNAME "L1_UE_stats_act"
#define GNBL1_THREADNAME "L1_stats_act"
/* ==== Global variables ==== */
// IPC communication between main thread and the statistics one
static notifiedFIFO_t GNBL1cpustats_fifo, UEL1cpustats_fifo;
static pthread_t UEL1cpustats_threadid = 0;
static pthread_t gNBL1cpustats_threadid = 0;
// data structure for communication between main thread and the statistics one
typedef struct {
unsigned int msgid;
telnet_printfunc_t prnt;
} proto_stats_msg_t;
// PHY_vars_UE_g: declared in openair1/PHY/phy_vars_nr_ue.h and defined in nr-uesoftmodem.c
extern PHY_VARS_NR_UE *** PHY_vars_UE_g;
/* ==== Static functions ==== */
/* return pointer to the global structure that contains the UE data including statistics*/
static PHY_VARS_NR_UE * getglobal_uephy(void) { return PHY_vars_UE_g[0][0]; }
// RC.nb_nr_macrlc_inst in openair2/LAYER2/NR_MAC_gNB/main.c defines the RAN_CONTEXT RC variable that defines how many instances you will have
// ru stands for 'radio unit' data structure
static RU_t *getglobal_ru(void) { return RC.ru[0];}
static void UEL1cpustats_display(telnet_printfunc_t prnt);
static void UEL1cpustats_thread_main(void);
static void gNBL1cpustats_display(telnet_printfunc_t prnt, PHY_VARS_gNB *param);
static void gNBL1cpustats_thread_main (void * param);
/* xxx: these are the same statistics but with different formatting and list of content of those displayed by
* telnetsrv_measurements.c:measurcmd_display_cpumeasures(). you could think about unifying the 2 functions.
* XXX: this implementation should be fixed using a dynamically allocated buffer instead of a plain one
* it is prone to sigSEGV
*/
static void
UEL1cpustats_display(telnet_printfunc_t prnt)
{
/* PHY_vars_UE_g:
* this global variable is allocated by nr-uesoftmodem.c and shared among threads makes the trick of passing statistics data to statistic thread
* that will consume it. There is just one instance of UE created in nr-ue.c
*/
PHY_VARS_NR_UE *ue = getglobal_uephy();
prnt("Display CPU statistics for UE Level 1\n");
char output[TELNET_MAX_MSGLENGTH];
int stroff = 0;
stroff += print_meas_log(&ue->phy_proc_tx , "L1 TX processing" , NULL, NULL, output , TELNET_MAX_MSGLENGTH - stroff);
stroff += print_meas_log(&ue->ulsch_encoding_stats , "ULSCH encoding" , NULL, NULL, output + stroff, TELNET_MAX_MSGLENGTH - stroff );
stroff += print_meas_log(&ue->phy_proc_rx[0] , "L1 RX processing t0" , NULL, NULL, output + stroff, TELNET_MAX_MSGLENGTH - stroff);
stroff += print_meas_log(&ue->phy_proc_rx[1] , "L1 RX processing t1" , NULL, NULL, output + stroff, TELNET_MAX_MSGLENGTH - stroff);
stroff += print_meas_log(&ue->ue_ul_indication_stats , "UL Indication" , NULL, NULL, output + stroff, TELNET_MAX_MSGLENGTH - stroff);
stroff += print_meas_log(&ue->rx_pdsch_stats , "PDSCH receiver" , NULL, NULL, output + stroff, TELNET_MAX_MSGLENGTH - stroff);
stroff += print_meas_log(&ue->dlsch_decoding_stats[0] , "PDSCH decoding t0" , NULL, NULL, output + stroff, TELNET_MAX_MSGLENGTH - stroff);
stroff += print_meas_log(&ue->dlsch_decoding_stats[1] , "PDSCH decoding t1" , NULL, NULL, output + stroff, TELNET_MAX_MSGLENGTH - stroff);
stroff += print_meas_log(&ue->dlsch_deinterleaving_stats , " -> Deinterleive" , NULL, NULL, output + stroff, TELNET_MAX_MSGLENGTH - stroff);
stroff += print_meas_log(&ue->dlsch_rate_unmatching_stats , " -> Rate Unmatch" , NULL, NULL, output + stroff, TELNET_MAX_MSGLENGTH - stroff);
stroff += print_meas_log(&ue->dlsch_ldpc_decoding_stats , " -> LDPC Decode" , NULL, NULL, output + stroff, TELNET_MAX_MSGLENGTH - stroff);
stroff += print_meas_log(&ue->dlsch_unscrambling_stats , "PDSCH unscrambling" , NULL, NULL, output + stroff, TELNET_MAX_MSGLENGTH - stroff);
stroff += print_meas_log(&ue->dlsch_rx_pdcch_stats , "PDCCH handling" , NULL, NULL, output + stroff, TELNET_MAX_MSGLENGTH - stroff);
prnt("%s\n", output);
}
static void
UEL1cpustats_thread_main(void)
{
if (pthread_setname_np(pthread_self(), UEL1_THREADNAME))
LOG_E(UTIL, "Error setting name on thread %s: %s\n", UEL1_THREADNAME, strerror(errno));
struct sched_param schedp;
schedp.sched_priority = SCHED_NORMAL;
if (pthread_setschedparam(pthread_self(), SCHED_IDLE, &schedp))
LOG_E(UTIL, "Error setting priority in thread %s: %s\n", UEL1_THREADNAME, strerror(errno));
initNotifiedFIFO(&UEL1cpustats_fifo);
cpumeas(CPUMEAS_ENABLE);
while (1){
/*
* Infinite loop that waits for a message on the FIFO.
* Behind the scenes it uses blocking pthread.h:pthread_cond_wait()
*/
notifiedFIFO_elt_t *msg = pullNotifiedFIFO(&UEL1cpustats_fifo);
proto_stats_msg_t *tsm = (proto_stats_msg_t *)NotifiedFifoData(msg);
switch (tsm->msgid)
{
case TIMESTAT_MSGID_DISPLAY:
if (cpumeas(CPUMEAS_GETSTATE))
UEL1cpustats_display(tsm->prnt);
else
tsm->prnt("ERR: before displaying meaningful stats, you need to activate their generation\n");
break;
case TIMESTAT_MSGID_DISABLE:
cpumeas(CPUMEAS_DISABLE);
UEL1cpustats_threadid = 0;
pthread_exit(NULL);
break;
}
delNotifiedFIFO_elt(msg);
}
LOG_I(UTIL, "Exiting thread %s\n", UEL1_THREADNAME);
}
bool
UEL1cpustats_enable(void)
{
if (UEL1cpustats_threadid){
LOG_E(UTIL, "Thread '%s' is already running. Aborting your request to create a new one\n", UEL1_THREADNAME);
return false;
}
int rt = pthread_create(&UEL1cpustats_threadid, NULL, (void *(*)(void *))UEL1cpustats_thread_main, NULL);
if (rt != 0)
LOG_E(UTIL, "Error creating thread %s: %s\n",UEL1_THREADNAME, strerror(errno));
return (rt != 0) ? false : true;
}
void
UEL1cpustats_disable(void)
{
if (!UEL1cpustats_threadid) {
LOG_W(UTIL, "Thread '%s' is not running. Discarding your request to disable stats\n", UEL1_THREADNAME);
return;
}
notifiedFIFO_elt_t *nfe = newNotifiedFIFO_elt(sizeof(time_stats_msg_t), 0, NULL, NULL);
proto_stats_msg_t *msg = (proto_stats_msg_t *)NotifiedFifoData(nfe);
msg->msgid = TIMESTAT_MSGID_DISABLE;
pushNotifiedFIFO(&UEL1cpustats_fifo, nfe);
}
void
UEL1cpustats_measurcmd_display (telnet_printfunc_t prnt)
{
if (!UEL1cpustats_threadid) {
prnt("Thread '%s' is not running. Aborting your request to display stats, you need first to enable statistics\n", UEL1_THREADNAME);
return;
}
notifiedFIFO_elt_t *nfe = newNotifiedFIFO_elt(sizeof(time_stats_msg_t), 0, NULL, NULL);
proto_stats_msg_t *msg = (proto_stats_msg_t *)NotifiedFifoData(nfe);
msg->prnt = prnt;
msg->msgid = TIMESTAT_MSGID_DISPLAY;
pushNotifiedFIFO(&UEL1cpustats_fifo, nfe);
}
/* Display info from specific instance of gNB and from radio unit */
static void
gNBL1cpustats_display(telnet_printfunc_t prnt, PHY_VARS_gNB *gNB)
{
RU_t *ru = getglobal_ru();
char output[TELNET_MAX_MSGLENGTH];
int stroff = 0;
prnt("%s\n");
// XXX: header will be printed automatically by print_meas_log() just the first time it is called in the program. It means that if you
// use a mechanism like 'loop measur show gnb_L1', you will lose the header after the first iteration.
// You should fix the logic of 'print_meas_log() to avoid it printing any header.
stroff += print_meas_log(&gNB->phy_proc_tx , "L1 Tx processing" , NULL, NULL, output , TELNET_MAX_MSGLENGTH - stroff);
stroff += print_meas_log(&gNB->dlsch_encoding_stats , "DLSCH encoding" , NULL, NULL, output+stroff, TELNET_MAX_MSGLENGTH - stroff);
stroff += print_meas_log(&gNB->phy_proc_rx , "L1 Rx processing" , NULL, NULL, output+stroff, TELNET_MAX_MSGLENGTH - stroff);
stroff += print_meas_log(&gNB->ul_indication_stats , "UL Indication" , NULL, NULL, output+stroff, TELNET_MAX_MSGLENGTH - stroff);
stroff += print_meas_log(&gNB->rx_pusch_stats , "PUSCH inner-receiver", NULL, NULL, output+stroff, TELNET_MAX_MSGLENGTH - stroff);
stroff += print_meas_log(&gNB->ulsch_decoding_stats , "PUSCH decoding" , NULL, NULL, output+stroff, TELNET_MAX_MSGLENGTH - stroff);
stroff += print_meas_log(&gNB->schedule_response_stats, "Schedule Response" , NULL, NULL, output+stroff, TELNET_MAX_MSGLENGTH - stroff);
if (ru->feprx)
stroff += print_meas_log(&ru->ofdm_demod_stats , "feprx" , NULL, NULL, output+stroff, TELNET_MAX_MSGLENGTH - stroff);
if (ru->feptx_ofdm) {
stroff += print_meas_log(&ru->precoding_stats , "feptx_prec" , NULL, NULL, output+stroff, TELNET_MAX_MSGLENGTH - stroff);
stroff += print_meas_log(&ru->txdataF_copy_stats , "txdataF_copy" , NULL, NULL, output+stroff, TELNET_MAX_MSGLENGTH - stroff);
stroff += print_meas_log(&ru->ofdm_mod_stats , "feptx_ofdm" , NULL, NULL, output+stroff, TELNET_MAX_MSGLENGTH - stroff);
stroff += print_meas_log(&ru->ofdm_total_stats , "feptx_total" , NULL, NULL, output+stroff, TELNET_MAX_MSGLENGTH - stroff);
}
if (ru->fh_north_asynch_in)
stroff += print_meas_log(&ru->rx_fhaul , "rx_fhaul" , NULL, NULL, output+stroff, TELNET_MAX_MSGLENGTH - stroff);
stroff += print_meas_log(&ru->tx_fhaul , "tx_fhaul" , NULL, NULL, output+stroff, TELNET_MAX_MSGLENGTH - stroff);
if (ru->fh_north_out) {
stroff += print_meas_log(&ru->compression , "compression" , NULL, NULL, output+stroff, TELNET_MAX_MSGLENGTH - stroff);
stroff += print_meas_log(&ru->transport , "transport" , NULL, NULL, output+stroff, TELNET_MAX_MSGLENGTH - stroff);
}
prnt("%s\n", output);
}
static void
gNBL1cpustats_thread_main(void * param)
{
if (pthread_setname_np(pthread_self(), GNBL1_THREADNAME))
LOG_E(UTIL, "Error setting name on thread %s: %s\n", GNBL1_THREADNAME, strerror(errno));
struct sched_param schedp;
schedp.sched_priority = SCHED_NORMAL;
if (pthread_setschedparam(pthread_self(), SCHED_IDLE, &schedp))
LOG_E(UTIL, "Error setting priority in thread %s: %s\n", GNBL1_THREADNAME, strerror(errno));
initNotifiedFIFO(&GNBL1cpustats_fifo);
cpumeas(CPUMEAS_ENABLE);
while (1){
/*
* Infinite loop that waits for a message on the FIFO.
* Behind the scenes it uses blocking pthread.h:pthread_cond_wait()
*/
notifiedFIFO_elt_t *msg = pullNotifiedFIFO(&GNBL1cpustats_fifo);
proto_stats_msg_t *tsm = (proto_stats_msg_t *)NotifiedFifoData(msg);
switch (tsm->msgid)
{
case TIMESTAT_MSGID_DISPLAY:
if (cpumeas(CPUMEAS_GETSTATE))
gNBL1cpustats_display(tsm->prnt, (PHY_VARS_gNB *)param);
else
tsm->prnt("ERR: before displaying meaningful stats, you need to activate their generation\n");
break;
case TIMESTAT_MSGID_DISABLE:
cpumeas(CPUMEAS_DISABLE);
gNBL1cpustats_threadid = 0;
pthread_exit(NULL);
break;
}
delNotifiedFIFO_elt(msg);
}
LOG_I(UTIL, "Exiting thread '%s'\n", GNBL1_THREADNAME);
}
void
gNBL1cpustats_measurcmd_display (telnet_printfunc_t prnt)
{
if (!gNBL1cpustats_threadid) {
prnt("gNB thread %s is not running. Aborting your request to display stats as you need first to enable statistics\n", GNBL1_THREADNAME);
return;
}
notifiedFIFO_elt_t *nfe = newNotifiedFIFO_elt(sizeof(time_stats_msg_t), 0, NULL, NULL);
proto_stats_msg_t *msg = (proto_stats_msg_t *)NotifiedFifoData(nfe);
msg->prnt = prnt;
msg->msgid = TIMESTAT_MSGID_DISPLAY;
pushNotifiedFIFO(&GNBL1cpustats_fifo, nfe);
}
bool
gNBL1cpustats_enable(PHY_VARS_gNB *gNB)
{
if (gNBL1cpustats_threadid) {
LOG_E(UTIL, "Thread '%s' already running, aborting your request to create a new one\n", GNBL1_THREADNAME);
return false;
}
int rt = pthread_create(&gNBL1cpustats_threadid, NULL, (void *(*)(void *))gNBL1cpustats_thread_main, gNB);
if (rt != 0)
LOG_E(UTIL, "Error creating thread '%s': %s\n", GNBL1_THREADNAME, strerror(errno));
return (rt != 0) ? false : true;
}
void
gNBL1cpustats_disable(void)
{
if (!gNBL1cpustats_threadid) {
LOG_W(UTIL, "Thread '%s' is not running. Discarding your request to disable stats\n", GNBL1_THREADNAME);
return;
}
notifiedFIFO_elt_t *nfe = newNotifiedFIFO_elt(sizeof(time_stats_msg_t), 0, NULL, NULL);
proto_stats_msg_t *msg = (proto_stats_msg_t *)NotifiedFifoData(nfe);
msg->msgid = TIMESTAT_MSGID_DISABLE;
pushNotifiedFIFO(&GNBL1cpustats_fifo, nfe);
}

20
common/utils/cpustats.h Normal file
View File

@@ -0,0 +1,20 @@
#ifndef _CPUSTATS_H
#define _CPUSTATS_H
/*
* Activation, deactivation and printing functionalities of cpu statistics for UE and gNB Level 1/PHY indicators
*/
#include "common/utils/telnetsrv/telnetsrv.h"
#include "openair1/PHY/defs_nr_UE.h"
#include "openair1/PHY/defs_gNB.h"
#define UE_STATS_L1 "phycpunew"
void UEL1cpustats_measurcmd_display(telnet_printfunc_t prnt);
bool UEL1cpustats_enable(void);
void UEL1cpustats_disable(void);
#define GNB_STATS_L1 "gnb_L1"
bool gNBL1cpustats_enable(PHY_VARS_gNB *gNB);
void gNBL1cpustats_disable(void);
void gNBL1cpustats_measurcmd_display (telnet_printfunc_t prnt);
#endif

View File

@@ -281,5 +281,9 @@ void loader_reset()
shlib->numfunc = 0;
shlib->len_funcarray = 0;
}
if(loader_data.shlibpath){
free(loader_data.shlibpath);
loader_data.shlibpath=NULL;
}
free(loader_data.shlibs);
}

View File

@@ -51,11 +51,11 @@ typedef struct {
}loader_shlibdesc_t;
typedef struct {
char *mainexec_buildversion;
char *shlibpath;
uint32_t maxshlibs;
uint32_t numshlibs;
loader_shlibdesc_t *shlibs;
char *mainexec_buildversion;
char *shlibpath;
uint32_t maxshlibs;
uint32_t numshlibs;
loader_shlibdesc_t *shlibs;
}loader_data_t;
/* function type of functions which may be implemented by a module */
@@ -79,8 +79,8 @@ loader_data_t loader_data;
/* optname helpstr paramflags XXXptr defXXXval type numelt check func*/
/*----------------------------------------------------------------------------------------------------------------------------------------------------------*/
#define LOADER_PARAMS_DESC { \
{"shlibpath", NULL, PARAMFLAG_NOFREE, strptr:(char **)&(loader_data.shlibpath), defstrval:DEFAULT_PATH, TYPE_STRING, 0, NULL},\
{"maxshlibs", NULL, 0, uptr:&(loader_data.maxshlibs), defintval:DEFAULT_MAXSHLIBS, TYPE_UINT32, 0, NULL}\
{"shlibpath", NULL, PARAMFLAG_NOFREE, strptr:&loader_data.shlibpath, defstrval:DEFAULT_PATH, TYPE_STRING, 0, NULL},\
{"maxshlibs", NULL, 0, uptr:&(loader_data.maxshlibs),defintval:DEFAULT_MAXSHLIBS, TYPE_UINT32, 0, NULL}\
}
/*-------------------------------------------------------------------------------------------------------------*/

View File

@@ -472,6 +472,236 @@ int get_subband_size(int NPRB,int size) {
}
void get_samplerate_and_bw(int mu,
int n_rb,
int8_t threequarter_fs,
double *sample_rate,
unsigned int *samples_per_frame,
double *tx_bw,
double *rx_bw) {
if (mu == 0) {
switch(n_rb) {
case 270:
if (threequarter_fs) {
*sample_rate=92.16e6;
*samples_per_frame = 921600;
*tx_bw = 50e6;
*rx_bw = 50e6;
} else {
*sample_rate=61.44e6;
*samples_per_frame = 614400;
*tx_bw = 50e6;
*rx_bw = 50e6;
}
case 216:
if (threequarter_fs) {
*sample_rate=46.08e6;
*samples_per_frame = 460800;
*tx_bw = 40e6;
*rx_bw = 40e6;
}
else {
*sample_rate=61.44e6;
*samples_per_frame = 614400;
*tx_bw = 40e6;
*rx_bw = 40e6;
}
break;
case 160: //30 MHz
case 133: //25 MHz
if (threequarter_fs) {
AssertFatal(1==0,"N_RB %d cannot use 3/4 sampling\n",n_rb);
}
else {
*sample_rate=30.72e6;
*samples_per_frame = 307200;
*tx_bw = 20e6;
*rx_bw = 20e6;
}
case 106:
if (threequarter_fs) {
*sample_rate=23.04e6;
*samples_per_frame = 230400;
*tx_bw = 20e6;
*rx_bw = 20e6;
}
else {
*sample_rate=30.72e6;
*samples_per_frame = 307200;
*tx_bw = 20e6;
*rx_bw = 20e6;
}
break;
case 52:
if (threequarter_fs) {
*sample_rate=11.52e6;
*samples_per_frame = 115200;
*tx_bw = 10e6;
*rx_bw = 10e6;
}
else {
*sample_rate=15.36e6;
*samples_per_frame = 153600;
*tx_bw = 10e6;
*rx_bw = 10e6;
}
case 25:
if (threequarter_fs) {
*sample_rate=5.76e6;
*samples_per_frame = 57600;
*tx_bw = 5e6;
*rx_bw = 5e6;
}
else {
*sample_rate=7.68e6;
*samples_per_frame = 76800;
*tx_bw = 5e6;
*rx_bw = 5e6;
}
break;
default:
AssertFatal(0==1,"N_RB %d not yet supported for numerology %d\n",n_rb,mu);
}
} else if (mu == 1) {
switch(n_rb) {
case 273:
if (threequarter_fs) {
*sample_rate=184.32e6;
*samples_per_frame = 1843200;
*tx_bw = 100e6;
*rx_bw = 100e6;
} else {
*sample_rate=122.88e6;
*samples_per_frame = 1228800;
*tx_bw = 100e6;
*rx_bw = 100e6;
}
break;
case 217:
if (threequarter_fs) {
*sample_rate=92.16e6;
*samples_per_frame = 921600;
*tx_bw = 80e6;
*rx_bw = 80e6;
} else {
*sample_rate=122.88e6;
*samples_per_frame = 1228800;
*tx_bw = 80e6;
*rx_bw = 80e6;
}
break;
case 162 :
if (threequarter_fs) {
AssertFatal(1==0,"N_RB %d cannot use 3/4 sampling\n",n_rb);
}
else {
*sample_rate=61.44e6;
*samples_per_frame = 614400;
*tx_bw = 60e6;
*rx_bw = 60e6;
}
break;
case 133 :
if (threequarter_fs) {
AssertFatal(1==0,"N_RB %d cannot use 3/4 sampling\n",n_rb);
}
else {
*sample_rate=61.44e6;
*samples_per_frame = 614400;
*tx_bw = 50e6;
*rx_bw = 50e6;
}
break;
case 106:
if (threequarter_fs) {
*sample_rate=46.08e6;
*samples_per_frame = 460800;
*tx_bw = 40e6;
*rx_bw = 40e6;
}
else {
*sample_rate=61.44e6;
*samples_per_frame = 614400;
*tx_bw = 40e6;
*rx_bw = 40e6;
}
break;
case 51:
if (threequarter_fs) {
*sample_rate=23.04e6;
*samples_per_frame = 230400;
*tx_bw = 20e6;
*rx_bw = 20e6;
}
else {
*sample_rate=30.72e6;
*samples_per_frame = 307200;
*tx_bw = 20e6;
*rx_bw = 20e6;
}
break;
case 24:
if (threequarter_fs) {
*sample_rate=11.52e6;
*samples_per_frame = 115200;
*tx_bw = 10e6;
*rx_bw = 10e6;
}
else {
*sample_rate=15.36e6;
*samples_per_frame = 153600;
*tx_bw = 10e6;
*rx_bw = 10e6;
}
break;
default:
AssertFatal(0==1,"N_RB %d not yet supported for numerology %d\n",n_rb,mu);
}
} else if (mu == 3) {
switch(n_rb) {
case 66:
if (threequarter_fs) {
*sample_rate=184.32e6;
*samples_per_frame = 1843200;
*tx_bw = 100e6;
*rx_bw = 100e6;
} else {
*sample_rate = 122.88e6;
*samples_per_frame = 1228800;
*tx_bw = 100e6;
*rx_bw = 100e6;
}
break;
case 32:
if (threequarter_fs) {
*sample_rate=92.16e6;
*samples_per_frame = 921600;
*tx_bw = 50e6;
*rx_bw = 50e6;
} else {
*sample_rate=61.44e6;
*samples_per_frame = 614400;
*tx_bw = 50e6;
*rx_bw = 50e6;
}
break;
default:
AssertFatal(0==1,"N_RB %d not yet supported for numerology %d\n",n_rb,mu);
}
} else {
AssertFatal(0 == 1,"Numerology %d not supported for the moment\n",mu);
}
}
// from start symbol index and nb or symbols to symbol occupation bitmap in a slot
uint16_t SL_to_bitmap(int startSymbolIndex, int nrOfSymbols) {
return ((1<<nrOfSymbols)-1)<<startSymbolIndex;

View File

@@ -37,6 +37,8 @@
#include "assertions.h"
#include "PHY/defs_common.h"
#define MAX_BWP_SIZE 275
typedef struct nr_bandentry_s {
int16_t band;
uint64_t ul_min;
@@ -48,6 +50,11 @@ typedef struct nr_bandentry_s {
uint8_t deltaf_raster;
} nr_bandentry_t;
typedef enum frequency_range_e {
FR1 = 0,
FR2
} frequency_range_t;
extern const nr_bandentry_t nr_bandtable[];
static inline int get_num_dmrs(uint16_t dmrs_mask ) {
@@ -76,6 +83,13 @@ uint16_t SL_to_bitmap(int startSymbolIndex, int nrOfSymbols);
int get_nb_periods_per_frame(uint8_t tdd_period);
int get_supported_band_index(int scs, int band, int n_rbs);
long rrc_get_max_nr_csrs(uint8_t max_rbs, long b_SRS);
void get_samplerate_and_bw(int mu,
int n_rb,
int8_t threequarter_fs,
double *sample_rate,
unsigned int *samples_per_frame,
double *tx_bw,
double *rx_bw);
#define CEILIDIV(a,b) ((a+b-1)/b)
#define ROUNDIDIV(a,b) (((a<<1)+b)/(b<<1))

View File

@@ -17,7 +17,4 @@
#include "openair2/COMMON/flexran_messages_def.h"
#include "openair2/COMMON/f1ap_messages_def.h"
#include "openair2/COMMON/ngap_messages_def.h"
#if ITTI_SIM
#include "openair2/COMMON/itti_sim_messages_def.h"
#endif

View File

@@ -438,23 +438,24 @@ extern "C" {
void itti_send_terminate_message(task_id_t task_id) {
}
static volatile bool shutting_down;
pthread_mutex_t signal_mutex;
static void catch_sigterm(int) {
static const char msg[] = "\n** Caught SIGTERM, shutting down\n";
__attribute__((unused))
int unused = write(STDOUT_FILENO, msg, sizeof(msg) - 1);
shutting_down = true;
pthread_mutex_unlock(&signal_mutex);
}
void itti_wait_tasks_end(void) {
shutting_down = false;
pthread_mutex_init(&signal_mutex, NULL);
pthread_mutex_lock(&signal_mutex);
signal(SIGTERM, catch_sigterm);
//signal(SIGINT, catch_sigterm);
while (! shutting_down)
{
sleep(24 * 3600);
}
signal(SIGINT, catch_sigterm);
pthread_mutex_lock(&signal_mutex);
}
void itti_update_lte_time(uint32_t frame, uint8_t slot) {}

View File

@@ -262,10 +262,6 @@ void *rrc_enb_process_itti_msg(void *);
#include <openair3/SCTP/sctp_eNB_task.h>
#include <openair3/NGAP/ngap_gNB.h>
#ifdef ITTI_SIM
#include <openair2/COMMON/itti_sim_messages_types.h>
#endif
/*
static const char *const messages_definition_xml = {
#include <messages_xml.h>
@@ -308,9 +304,11 @@ void *rrc_enb_process_msg(void *);
TASK_DEF(TASK_BM, TASK_PRIORITY_MED, 200, NULL, NULL) \
TASK_DEF(TASK_PHY_ENB, TASK_PRIORITY_MED, 200, NULL, NULL) \
TASK_DEF(TASK_MAC_ENB, TASK_PRIORITY_MED, 200, NULL, NULL) \
TASK_DEF(TASK_MAC_GNB, TASK_PRIORITY_MED, 200, NULL, NULL) \
TASK_DEF(TASK_RLC_ENB, TASK_PRIORITY_MED, 200, NULL, NULL) \
TASK_DEF(TASK_RRC_ENB_NB_IoT, TASK_PRIORITY_MED, 200, NULL, NULL) \
TASK_DEF(TASK_PDCP_ENB, TASK_PRIORITY_MED, 200, NULL, NULL) \
TASK_DEF(TASK_PDCP_GNB, TASK_PRIORITY_MED, 200, NULL, NULL) \
TASK_DEF(TASK_DATA_FORWARDING, TASK_PRIORITY_MED, 200, NULL, NULL) \
TASK_DEF(TASK_END_MARKER, TASK_PRIORITY_MED, 200, NULL, NULL) \
TASK_DEF(TASK_RRC_ENB, TASK_PRIORITY_MED, 200, NULL,NULL)\

View File

@@ -231,8 +231,6 @@ void threadCreate(pthread_t* t, void * (*func)(void*), void * param, char* name,
int settingPriority = 1;
ret=pthread_attr_init(&attr);
AssertFatal(ret==0,"ret: %d, errno: %d\n",ret, errno);
ret=pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
AssertFatal(ret==0,"ret: %d, errno: %d\n",ret, errno);
if (checkIfFedoraDistribution())
if (checkIfGenericKernelOnFedora())

View File

@@ -46,6 +46,7 @@
#include "common/utils/LOG/log.h"
#include "common/config/config_userapi.h"
#include "common/utils/cpustats.h"
#include "telnetsrv_measurements.h"
#include "telnetsrv_ltemeasur_def.h"
#include "telnetsrv_cpumeasur_def.h"
@@ -63,7 +64,9 @@ void measurcmd_display_pdcpcpu(telnet_printfunc_t prnt);
static telnet_measurgroupdef_t nrUEmeasurgroups[] = {
// {"ue", GROUP_LTESTATS,0, measurcmd_display_macstats, {NULL}},
// {"rlc", GROUP_LTESTATS,0, measurcmd_display_rlcstats, {NULL}},
{"phycpu",GROUP_CPUSTATS,0, measurcmd_display_phycpu, {NULL}},
{"phycpu" , GROUP_CPUSTATS, 0, measurcmd_display_phycpu , {NULL}},
{UE_STATS_L1, GROUP_CPUSTATS, 0, UEL1cpustats_measurcmd_display, {NULL}}
// {"maccpu",GROUP_CPUSTATS,0, measurcmd_display_maccpu, {NULL}},
// {"pdcpcpu",GROUP_CPUSTATS,0, measurcmd_display_pdcpcpu, {NULL}},
};

View File

@@ -0,0 +1,275 @@
#define TELNETSERVERCODE
#include <stdbool.h>
#include "telnetsrv.h"
#include "telnetsrv_measurements.h"
#include "telnetsrv_ltemeasur_def.h"
#include "common/utils/cpustats.h"
#include "openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h"
static void gNBL2pstats_measurcmd_display(telnet_printfunc_t prnt);
static char *gNBL2pstats_gethdrline1(char * bufhdr, size_t maxlen);
static char *gNBL2pstats_gethdrline2(char * bufhdr, size_t maxlen);
static const char *scale_number (float n, int width);
/*
* caveats: 5th fiels of nrgNBmeasurgroups[] entries is NULL as we are not yet defining in this module the statistics content to
* be passed from statistics thread. That field was created for future extensibility work on reuniting statistics management.
*/
static telnet_measurgroupdef_t nrgNBmeasurgroups[] = {
{GNB_STATS_L2_MAC, GROUP_LTESTATS, 0, gNBL2pstats_measurcmd_display , {NULL}},
{GNB_STATS_L1 , GROUP_CPUSTATS, 0, gNBL1cpustats_measurcmd_display, {NULL}}
};
const char SPACE_LABEL=' ';
const char MINUS_LABEL='-';
const char * ULSCH_LABEL="[UL sch]";
const char * DLSCH_LABEL="[DL sch]";
int get_measurgroups(telnet_measurgroupdef_t **measurgroups)
{
*measurgroups = nrgNBmeasurgroups;
return sizeof(nrgNBmeasurgroups)/sizeof(telnet_measurgroupdef_t);
}
// magic numbers for the below table
#define TELNETSRV_TBL_HARQ_DL 10
#define TELNETSRV_TBL_HARQ_UL 16
// XXX: table below would need a bit of tuning to understand expected values ranges and avoid massive use of scaling functionality
static const struct itemtable_t{
int width; // field width in ASCII characters
bool tobescaled; // 1(true), 0(false) scaling the value to i.e. Kb, Mb, etc..
char *itemlabel; // the new libproc item enum identifier
enum {TELNETSRV_SCH_NONE = 0, TELNETSRV_SCH_DL, TELNETSRV_SCH_UL} scheduler;
} itemtable[] = {
{2, false, "UE" , TELNETSRV_SCH_NONE}, // UE number
{4, false, "RNTI" , TELNETSRV_SCH_NONE},
{2, false, "PH" , TELNETSRV_SCH_NONE},
{5, false, "PCMax" , TELNETSRV_SCH_NONE},
{7, false, "RSRPavg" , TELNETSRV_SCH_NONE},
{8, false, "RSRPmeas", TELNETSRV_SCH_NONE},
{3, false, "cqi" , TELNETSRV_SCH_NONE},
{2, false, "ri" , TELNETSRV_SCH_NONE},
{5, false, "pmix1" , TELNETSRV_SCH_NONE}, // uint8
{5, false, "pmix2" , TELNETSRV_SCH_NONE}, // uint8
{4, true , "HARQ" , TELNETSRV_SCH_DL }, // special case pointed by TELNETSRV_TBL_HARQ_DL. Given that we do not know how many dl_rounds elements you
// will have,width here is related to each of the dl_rounds. It is similar reasoning for UL below
{4, true , "E" , TELNETSRV_SCH_DL },
{3, false, "dtx" , TELNETSRV_SCH_DL },
{5, true , "bler" , TELNETSRV_SCH_DL }, // float
{3, false, "mcs" , TELNETSRV_SCH_DL },
{6, true , "bdlsch" , TELNETSRV_SCH_UL }, // tot bytes scheduled
{4, true , "HARQ" , TELNETSRV_SCH_UL }, // special case pointed by TELNETSRV_TBL_HARQ_UL. See HARQ for DL above
{4, true , "E" , TELNETSRV_SCH_UL },
{3, false, "dtx" , TELNETSRV_SCH_UL },
{5, true , "bler" , TELNETSRV_SCH_UL }, // float
{3, false, "mcs" , TELNETSRV_SCH_UL },
{6, true , "bulsch" , TELNETSRV_SCH_UL }, // tot bytes scheduled
{6, true , "brxtot" , TELNETSRV_SCH_UL } // tot bytes received
};
static char * gNBL2pstats_gethdrline1(char *bufhdr, size_t maxlen)
{
unsigned int idx;
int bufhdr_idx=0;
int empty_spaces = 0;
int dl_sch = 0;
int ul_sch = 0;
int width = 0;
gNB_MAC_INST *gNB = RC.nrmac[0];
for (idx=0; idx < (sizeof(itemtable)/sizeof(struct itemtable_t)); idx++)
{
if ((bufhdr_idx + itemtable[idx].width + 1) > maxlen)
return NULL;
// handling special case of HARQ configurable numbers of rounds
width = itemtable[idx].width + 1;
if (idx == TELNETSRV_TBL_HARQ_DL)
width = width * gNB->dl_bler.harq_round_max;
else if (idx == TELNETSRV_TBL_HARQ_UL)
width = width * gNB->ul_bler.harq_round_max;
switch (itemtable[idx].scheduler)
{
case TELNETSRV_SCH_NONE:
empty_spaces += width;
memset(bufhdr + bufhdr_idx, SPACE_LABEL, width);
break;
case TELNETSRV_SCH_DL:
dl_sch += width;
memset(bufhdr + bufhdr_idx, MINUS_LABEL, width);
break;
case TELNETSRV_SCH_UL:
ul_sch += width;
memset(bufhdr + bufhdr_idx, MINUS_LABEL, width);
break;
}
bufhdr_idx += width;
}
bufhdr[bufhdr_idx] = '\n';
bufhdr_idx++;
bufhdr[bufhdr_idx] = '\0';
// now, overwite some parts if there is enough space
if (dl_sch > (sizeof(DLSCH_LABEL) + 4 ))
{
bufhdr[empty_spaces + 2] = SPACE_LABEL;
memcpy(bufhdr + empty_spaces + 3, DLSCH_LABEL, strlen(DLSCH_LABEL));
bufhdr[empty_spaces + 3 + sizeof(DLSCH_LABEL)] = SPACE_LABEL;
bufhdr[empty_spaces + dl_sch - 1] = SPACE_LABEL;
}
if (ul_sch > (sizeof(ULSCH_LABEL) + 4 ))
{
bufhdr[empty_spaces + dl_sch + 2] = SPACE_LABEL;
memcpy(bufhdr + empty_spaces + dl_sch + 3, ULSCH_LABEL, strlen(ULSCH_LABEL));
bufhdr[empty_spaces + dl_sch + 3 + sizeof(ULSCH_LABEL)] = SPACE_LABEL;
bufhdr[empty_spaces + dl_sch + ul_sch - 1] = SPACE_LABEL;
}
return bufhdr;
}
static char * gNBL2pstats_gethdrline2(char *bufhdr, size_t maxlen)
{
unsigned int idx;
int printed=0;
int width;
gNB_MAC_INST *gNB = RC.nrmac[0];
for (idx=0; idx < (sizeof(itemtable)/sizeof(struct itemtable_t)); idx++)
{
if ((printed + itemtable[idx].width + 1) > maxlen)
return NULL;
width = itemtable[idx].width;
if (idx == TELNETSRV_TBL_HARQ_DL)
width = (width + 1)*gNB->dl_bler.harq_round_max - 1;
else if (idx == TELNETSRV_TBL_HARQ_UL)
width = (width + 1)*gNB->ul_bler.harq_round_max - 1;
printed += snprintf(bufhdr + printed, maxlen - printed, "%*s ", width, itemtable[idx].itemlabel);
}
bufhdr[printed] = '\n';
printed++;
bufhdr[printed] = '\0';
return bufhdr;
}
static const char *scale_number (float n, int width)
{
static char buf[128];
buf[0] = '\0';
if (width >= snprintf(buf, sizeof(buf), "%*.0f", width, n))
return buf;
char *plabel;
char scale_labels[] = { 'k', 'M', 'G', 'T', 'P', 'E', 0 };// E=exabytes are enough, no need for zettabytes and over
for (plabel = scale_labels; *plabel != 0; plabel++)
{
n /= 1000.0;
if (width >= snprintf(buf, sizeof(buf), "%*.1f%c", width - 1, n, *plabel))
return buf;
// let's retry with one decimal less to see if fits.
if (width >= snprintf(buf, sizeof(buf), "%*.0f%c", width - 1, n, *plabel))
return buf;
}
// worst case...
snprintf(buf, sizeof(buf), "%*s" , width, "?");
return buf;
}
/**
* Display UE statistics collected at gNB node related to MAC protocol (OSI Layer 2). This is for the moment limited to one instance of gNB
* This function is meant to be used in combination with 'telnet set loopd 1000' and 'loop' command prepended to the 'measur' one to provide
* refresh of 1000ms of the CLI.
*
* XXX: You should anyway consider about keeping an historic on the screen for these stats, one line per iteration,
* not overwriting like loop command does until a specific command is pressed. One idea is to implement that as option of the loop command,
* that forces to go in append instead of refreshing the position on the screen.
*
* XXX: note that max line length is TELNET_MAX_MSGLENGTH that is equal to 2048 chars. We do not check it yet in this function.
*/
static void gNBL2pstats_measurcmd_display(telnet_printfunc_t prnt)
{
const int gnb_inst = 0;
gNB_MAC_INST *gNB = RC.nrmac[gnb_inst]; // CAVEATS: using global vars as signature of this function can't be change to fit more params.
pthread_mutex_lock(&gNB->UE_info.mutex);
static char buf[1024];
prnt(gNBL2pstats_gethdrline1(buf, sizeof(buf)));
prnt(gNBL2pstats_gethdrline2(buf, sizeof(buf)));
/* loop over all the UEs registered: to each UE will be given a number that is just a progressive counter*/
int uenum = 1;
UE_iterator(gNB->UE_info.list, UE)
{
NR_UE_sched_ctrl_t *sched_ctrl = &UE->UE_sched_ctrl;
NR_mac_stats_t *stats = &UE->mac_stats;
const int avg_rsrp = stats->num_rsrp_meas > 0 ? stats->cumul_rsrp / stats->num_rsrp_meas : 0;
prnt("%*d" , itemtable[0].width , uenum++);
prnt(" %0*x" , itemtable[1].width , UE->rnti);
prnt(" %*d" , itemtable[2].width , sched_ctrl->ph);
prnt(" %*d" , itemtable[3].width , sched_ctrl->pcmax);
prnt(" %*d" , itemtable[4].width , avg_rsrp);
prnt(" %*d" , itemtable[5].width , stats->num_rsrp_meas);
prnt(" %*d" , itemtable[6].width , UE->UE_sched_ctrl.CSI_report.cri_ri_li_pmi_cqi_report.wb_cqi_1tb);
prnt(" %*d" , itemtable[7].width , UE->UE_sched_ctrl.CSI_report.cri_ri_li_pmi_cqi_report.ri+1);
prnt(" %*d" , itemtable[8].width , UE->UE_sched_ctrl.CSI_report.cri_ri_li_pmi_cqi_report.pmi_x1);
prnt(" %*d" , itemtable[9].width , UE->UE_sched_ctrl.CSI_report.cri_ri_li_pmi_cqi_report.pmi_x2);
prnt(" ");
for (int i=0; i<gNB->dl_bler.harq_round_max; i++){
if (i!=0)
prnt("/");
prnt(scale_number(stats->dl.rounds[i], itemtable[TELNETSRV_TBL_HARQ_DL].width));
}
prnt(" %*"PRIu64"", itemtable[11].width, stats->dl.errors);
prnt(" %*d" , itemtable[12].width, stats->pucch0_DTX);
prnt(" %*.3f" , itemtable[13].width, sched_ctrl->dl_bler_stats.bler);
prnt(" %*d" , itemtable[14].width, sched_ctrl->dl_bler_stats.mcs);
prnt(" ");
prnt(scale_number(stats->dl.total_bytes, itemtable[15].width));
prnt(" ");
for (int i=0; i<gNB->ul_bler.harq_round_max; i++){
if (i!=0)
prnt("/");
prnt(scale_number(stats->ul.rounds[0], itemtable[TELNETSRV_TBL_HARQ_UL].width));
}
prnt(" %*"PRIu64"", itemtable[17].width, stats->ul.errors);
prnt(" %*d" , itemtable[18].width, stats->ulsch_DTX);
prnt(" %*.3f" , itemtable[19].width, sched_ctrl->ul_bler_stats.bler);
prnt(" %*d" , itemtable[20].width, sched_ctrl->ul_bler_stats.mcs);
prnt(" ");
prnt(scale_number(stats->ulsch_total_bytes_scheduled, itemtable[21].width));
prnt(" ");
prnt(scale_number(stats->ul.total_bytes, itemtable[22].width));
prnt("\n");
/*
* XXX-TODO: the values below
* values: stats->dl.lc_bytes[lc_id] for lc_id = 0 ..63;
* values: stats->ul.lc_bytes[lc_id] for lc_id = 0 ..63;
* were included in the previous version of the stats. We will think about including as they are too many
* to be added to one line stats display.
*/
}
pthread_mutex_unlock(&gNB->UE_info.mutex);
/*
* XXX-TODO: also the values below
* print_meas(&gNB->eNB_scheduler, "DL & UL scheduling timing stats", NULL, NULL);
* print_meas(&gNB->schedule_dlsch,"dlsch scheduler",NULL,NULL);
* print_meas(&gNB->rlc_data_req, "rlc_data_req",NULL,NULL);
* print_meas(&gNB->rlc_status_ind,"rlc_status_ind",NULL,NULL);
* were included in the previous version of the stats. They were using print_meas() to display to stderr and should be changed to
* leverage prnt() function. This can be done via using print_meas_log() that prints to buffer, but unfortunately this function will include
* the header of the fields you are printing (and we want to have just one line header, see gNBL2pstats_gethdrline2()), so you probably would
* need to create a new print function i.e. print_meas_lograw().
*/
}

View File

@@ -47,7 +47,7 @@
#include "common/utils/LOG/log.h"
#include "common/config/config_userapi.h"
#include "telnetsrv_measurements.h"
#include "common/utils/cpustats.h"
static char *grouptypes[] = {"ltestats","cpustats"};
static double cpufreq;
@@ -285,6 +285,94 @@ int measurcmd_async(char *buf, int debug, telnet_printfunc_t prnt) {
free(subcmd);
return CMDSTATUS_FOUND;
}
/**
* Parse command "measur enable STATNAME" and take action. STATNAME can be retrieved from 'measur show groups '
*
* @param[in] buf buffer containing the command to be parsed. Expected "<stats name>"
* @param[in] debug if > 0, it print debugging information on the log file for telnet
* @param[in] prnt printing function for telnet CLI
*
* @return 0(success), error code otherwise
*/
int
measurcmd_enablestats(char *buf, int debug, telnet_printfunc_t prnt)
{
char *statname = NULL;
int ret = CMDSTATUS_NOTFOUND;
if (debug > 0)
prnt("measurcmd_enablestats received %s\n", buf);
if (buf == NULL)
return ret;
if (sscanf(buf, "%ms\n", &statname) != 1){
prnt("Error parsing commandline for enable stats: %s\n", strerror(errno));
return ret;
}
if (strcmp (statname, UE_STATS_L1) == 0){
if (UEL1cpustats_enable() ==false)
prnt ("Error when enabling statistics. See log file of UE for exact cause\n");
else
ret = CMDSTATUS_FOUND;
} else if (strcmp (statname, GNB_STATS_L1) == 0){
if (gNBL1cpustats_enable(RC.gNB[0]) == false)
prnt ("Error when enabling statistics. See log file of gNB for exact cause\n");
else
ret = CMDSTATUS_FOUND;
} else if (strcmp (statname, GNB_STATS_L2_MAC) == 0){
prnt ("Nothing to do for this type of statistic. Already activated\n");
ret = CMDSTATUS_FOUND;
} else {
prnt ("ERR: unsupported stat %s\n", statname);
}
return ret;
}
/**
* Parse command "measur disable STATNAME" and take action. STATNAME can be retrieved from 'measur show groups '
*
* @param[in] buf buffer containing the command to be parsed. Expected "<stats name>"
* @param[in] debug if > 0, it print debugging information on the log file for telnet
* @param[in] prnt printing function for telnet CLI
*
* @return 0(success), error code otherwise
*/
int
measurcmd_disablestats(char *buf, int debug, telnet_printfunc_t prnt)
{
char *statname = NULL;
int ret = CMDSTATUS_NOTFOUND;
if (debug > 0)
prnt("measurcmd_disablestats received %s\n", buf);
if (buf == NULL)
return ret;
if (sscanf(buf, "%ms\n", &statname) != 1){
prnt("Error parsing commandline for disable stats: %s\n", strerror(errno));
return ret;
}
if (strcmp (statname, UE_STATS_L1) == 0){
UEL1cpustats_disable();
ret = CMDSTATUS_FOUND;
} else if (strcmp (statname, GNB_STATS_L1) == 0){
gNBL1cpustats_disable();
ret = CMDSTATUS_FOUND;
} else if (strcmp (statname, GNB_STATS_L2_MAC) == 0){
prnt ("Nothing to do for this type of statistic. They are always activated\n");
ret = CMDSTATUS_FOUND;
} else {
prnt ("ERR: unsupported statistic to be disabled: %s\n", statname);
}
return ret;
}
/*-------------------------------------------------------------------------------------*/
/* function called at telnet server init to add the measur command */

View File

@@ -79,16 +79,24 @@ typedef struct mesurgroupdef {
#define MACSTATS_NAME(valptr) #valptr
#define LTEMAC_MEASURGROUP_NAME "ltemac"
#define PHYCPU_MEASURGROUP_NAME "phycpu"
#define GNB_STATS_L2_MAC "gnb_L2"
#ifdef TELNETSRV_MEASURMENTS_MAIN
int measurcmd_show(char *buf, int debug, telnet_printfunc_t prnt);
int measurcmd_cpustats(char *buf, int debug, telnet_printfunc_t prnt);
int measurcmd_async(char *buf, int debug, telnet_printfunc_t prnt);
int measurcmd_enablestats(char *buf, int debug, telnet_printfunc_t prnt);
int measurcmd_disablestats(char *buf, int debug, telnet_printfunc_t prnt);
telnetshell_cmddef_t measur_cmdarray[] = {
{"show", "groups | <group name> | inq" , measurcmd_show},
{"cpustats","[enable | disable]",measurcmd_cpustats},
{"async","[enable | disable]",measurcmd_async},
{"","",NULL}
{"cpustats", "[enable | disable]", measurcmd_cpustats},
{"enable", "<stat name>", measurcmd_enablestats},
{"disable", "<stat name>", measurcmd_disablestats},
{"async", "[enable | disable]", measurcmd_async},
{"", "", NULL}
};
telnetshell_vardef_t measur_vardef[] = {

View File

@@ -48,9 +48,14 @@ void displayList(notifiedFIFO_t *nf) {
static inline notifiedFIFO_elt_t *pullNotifiedFifoRemember( notifiedFIFO_t *nf, struct one_thread *thr) {
mutexlock(nf->lockF);
while(!nf->outF)
while(!nf->outF && !thr->terminate)
condwait(nf->notifF, nf->lockF);
if (thr->terminate) {
mutexunlock(nf->lockF);
return NULL;
}
notifiedFIFO_elt_t *ret=nf->outF;
nf->outF=nf->outF->next;
@@ -59,7 +64,7 @@ static inline notifiedFIFO_elt_t *pullNotifiedFifoRemember( notifiedFIFO_t *nf,
// For abort feature
thr->runningOnKey=ret->key;
thr->abortFlag=false;
thr->dropJob = false;
mutexunlock(nf->lockF);
return ret;
}
@@ -71,6 +76,10 @@ void *one_thread(void *arg) {
// Infinite loop to process requests
do {
notifiedFIFO_elt_t *elt=pullNotifiedFifoRemember(&tp->incomingFifo, myThread);
if (elt == NULL) {
AssertFatal(myThread->terminate, "pullNotifiedFifoRemember() returned NULL although thread not aborted\n");
break;
}
if (tp->measurePerf) elt->startProcessingTime=rdtsc_oai();
@@ -82,14 +91,15 @@ void *one_thread(void *arg) {
// Check if the job is still alive, else it has been aborted
mutexlock(tp->incomingFifo.lockF);
if (myThread->abortFlag)
if (myThread->dropJob)
delNotifiedFIFO_elt(elt);
else
pushNotifiedFIFO(elt->reponseFifo, elt);
myThread->runningOnKey=-1;
mutexunlock(tp->incomingFifo.lockF);
}
} while (true);
} while (!myThread->terminate);
return NULL;
}
void initNamedTpool(char *params,tpool_t *pool, bool performanceMeas, char *name) {
@@ -113,7 +123,6 @@ void initNamedTpool(char *params,tpool_t *pool, bool performanceMeas, char *name
char *saveptr, * curptr;
char *parms_cpy=strdup(params);
pool->nbThreads=0;
pool->restrictRNTI=false;
curptr=strtok_r(parms_cpy,",",&saveptr);
struct one_thread * ptr;
char *tname = (name == NULL ? "Tpool" : name);
@@ -121,10 +130,6 @@ void initNamedTpool(char *params,tpool_t *pool, bool performanceMeas, char *name
int c=toupper(curptr[0]);
switch (c) {
case 'U':
pool->restrictRNTI=true;
break;
case 'N':
pool->activated=false;
break;
@@ -137,6 +142,8 @@ void initNamedTpool(char *params,tpool_t *pool, bool performanceMeas, char *name
pool->allthreads->coreID=atoi(curptr);
pool->allthreads->id=pool->nbThreads;
pool->allthreads->pool=pool;
pool->allthreads->dropJob = false;
pool->allthreads->terminate = false;
//Configure the thread scheduler policy for Linux
// set the thread name for debugging
sprintf(pool->allthreads->name,"%s%d_%d",tname,pool->nbThreads,pool->allthreads->coreID);
@@ -191,12 +198,12 @@ int main() {
tmp=pullNotifiedFIFO(&myFifo);
printf("pulled: %lu\n", tmp->key);
displayList(&myFifo);
abortNotifiedFIFO(&myFifo,1005);
abortNotifiedFIFOJob(&myFifo,1005);
printf("aborted 1005\n");
displayList(&myFifo);
pushNotifiedFIFO(&myFifo,newNotifiedFIFO_elt(sizeof(struct testData), 12345678, NULL, NULL));
displayList(&myFifo);
abortNotifiedFIFO(&myFifo,12345678);
abortNotifiedFIFOJob(&myFifo,12345678);
printf("aborted 12345678\n");
displayList(&myFifo);
@@ -265,7 +272,7 @@ int main() {
} else
printf("Empty list \n");
abortTpool(&pool,510);
abortTpoolJob(&pool,510);
} while(tmp);
*/
return 0;

View File

@@ -72,6 +72,7 @@ typedef struct notifiedFIFO_s {
notifiedFIFO_elt_t *inF;
pthread_mutex_t lockF;
pthread_cond_t notifF;
bool abortFIFO; // if set, the FIFO always returns NULL -> abort condition
} notifiedFIFO_t;
// You can use this allocator or use any piece of memory
@@ -107,6 +108,7 @@ static inline void delNotifiedFIFO_elt(notifiedFIFO_elt_t *elt) {
static inline void initNotifiedFIFO_nothreadSafe(notifiedFIFO_t *nf) {
nf->inF=NULL;
nf->outF=NULL;
nf->abortFIFO = false;
}
static inline void initNotifiedFIFO(notifiedFIFO_t *nf) {
mutexinit(nf->lockF);
@@ -129,14 +131,18 @@ static inline void pushNotifiedFIFO_nothreadSafe(notifiedFIFO_t *nf, notifiedFIF
static inline void pushNotifiedFIFO(notifiedFIFO_t *nf, notifiedFIFO_elt_t *msg) {
mutexlock(nf->lockF);
pushNotifiedFIFO_nothreadSafe(nf,msg);
condsignal(nf->notifF);
if (!nf->abortFIFO) {
pushNotifiedFIFO_nothreadSafe(nf,msg);
condsignal(nf->notifF);
}
mutexunlock(nf->lockF);
}
static inline notifiedFIFO_elt_t *pullNotifiedFIFO_nothreadSafe(notifiedFIFO_t *nf) {
if (nf->outF == NULL)
return NULL;
if (nf->abortFIFO)
return NULL;
notifiedFIFO_elt_t *ret=nf->outF;
@@ -152,9 +158,9 @@ static inline notifiedFIFO_elt_t *pullNotifiedFIFO_nothreadSafe(notifiedFIFO_t
static inline notifiedFIFO_elt_t *pullNotifiedFIFO(notifiedFIFO_t *nf) {
mutexlock(nf->lockF);
notifiedFIFO_elt_t *ret;
notifiedFIFO_elt_t *ret = NULL;
while((ret=pullNotifiedFIFO_nothreadSafe(nf)) == NULL)
while((ret=pullNotifiedFIFO_nothreadSafe(nf)) == NULL && !nf->abortFIFO)
condwait(nf->notifF, nf->lockF);
mutexunlock(nf->lockF);
@@ -167,6 +173,11 @@ static inline notifiedFIFO_elt_t *pollNotifiedFIFO(notifiedFIFO_t *nf) {
if (tmp != 0 )
return NULL;
if (nf->abortFIFO) {
mutexunlock(nf->lockF);
return NULL;
}
notifiedFIFO_elt_t *ret=pullNotifiedFIFO_nothreadSafe(nf);
mutexunlock(nf->lockF);
return ret;
@@ -189,7 +200,7 @@ static inline time_stats_t exec_time_stats_NotifiedFIFO(const notifiedFIFO_elt_t
// This function aborts all messages matching the key
// If the queue is used in thread pools, it doesn't cancels already running processing
// because the message has already been picked
static inline int abortNotifiedFIFO(notifiedFIFO_t *nf, uint64_t key) {
static inline int abortNotifiedFIFOJob(notifiedFIFO_t *nf, uint64_t key) {
mutexlock(nf->lockF);
int nbDeleted=0;
notifiedFIFO_elt_t **start=&nf->outF;
@@ -211,26 +222,44 @@ static inline int abortNotifiedFIFO(notifiedFIFO_t *nf, uint64_t key) {
return nbDeleted;
}
// This functions aborts all messages in the queue, and marks the queue as
// "aborted", such that every call to it will return NULL
static inline void abortNotifiedFIFO(notifiedFIFO_t *nf) {
mutexlock(nf->lockF);
nf->abortFIFO = true;
notifiedFIFO_elt_t **elt = &nf->outF;
while(*elt != NULL) {
notifiedFIFO_elt_t *p = *elt;
*elt = (*elt)->next;
delNotifiedFIFO_elt(p);
}
if (nf->outF == NULL)
nf->inF = NULL;
mutexunlock(nf->lockF);
condsignal(nf->notifF);
}
struct one_thread {
pthread_t threadID;
int id;
int coreID;
char name[256];
uint64_t runningOnKey;
bool abortFlag;
bool dropJob;
bool terminate;
struct thread_pool *pool;
struct one_thread *next;
};
typedef struct thread_pool {
int activated;
bool activated;
bool measurePerf;
int traceFd;
int dummyTraceFd;
uint64_t cpuCyclesMicroSec;
uint64_t startProcessingUE;
int nbThreads;
bool restrictRNTI;
notifiedFIFO_t incomingFifo;
struct one_thread *allthreads;
} tpool_t;
@@ -256,6 +285,8 @@ static inline void pushTpool(tpool_t *t, notifiedFIFO_elt_t *msg) {
static inline notifiedFIFO_elt_t *pullTpool(notifiedFIFO_t *responseFifo, tpool_t *t) {
notifiedFIFO_elt_t *msg= pullNotifiedFIFO(responseFifo);
if (msg == NULL)
return NULL;
AssertFatal(t->traceFd, "Thread pool used while not initialized");
if (t->measurePerf)
msg->returnTime=rdtsc_oai();
@@ -281,9 +312,10 @@ static inline notifiedFIFO_elt_t *tryPullTpool(notifiedFIFO_t *responseFifo, tpo
return msg;
}
static inline int abortTpool(tpool_t *t, uint64_t key) {
static inline int abortTpoolJob(tpool_t *t, uint64_t key) {
int nbRemoved=0;
notifiedFIFO_t *nf=&t->incomingFifo;
mutexlock(nf->lockF);
notifiedFIFO_elt_t **start=&nf->outF;
@@ -300,20 +332,62 @@ static inline int abortTpool(tpool_t *t, uint64_t key) {
if (t->incomingFifo.outF==NULL)
t->incomingFifo.inF=NULL;
struct one_thread *ptr=t->allthreads;
while(ptr!=NULL) {
if (ptr->runningOnKey==key) {
ptr->abortFlag=true;
struct one_thread *thread = t->allthreads;
while (thread != NULL) {
if (thread->runningOnKey == key) {
thread->dropJob = true;
nbRemoved++;
}
ptr=ptr->next;
thread = thread->next;
}
mutexunlock(nf->lockF);
return nbRemoved;
}
static inline int abortTpool(tpool_t *t) {
int nbRemoved=0;
/* disables threading: if a message comes in now, we cannot have a race below
* as each thread will simply execute the message itself */
t->activated = false;
notifiedFIFO_t *nf=&t->incomingFifo;
mutexlock(nf->lockF);
nf->abortFIFO = true;
notifiedFIFO_elt_t **start=&nf->outF;
/* mark threads to abort them */
struct one_thread *thread = t->allthreads;
while (thread != NULL) {
thread->dropJob = true;
thread->terminate = true;
nbRemoved++;
thread = thread->next;
}
/* clear FIFOs */
while(*start!=NULL) {
notifiedFIFO_elt_t **request=start;
*start=(*start)->next;
delNotifiedFIFO_elt(*request);
*request = NULL;
nbRemoved++;
}
if (t->incomingFifo.outF==NULL)
t->incomingFifo.inF=NULL;
condbroadcast(t->incomingFifo.notifF);
mutexunlock(nf->lockF);
/* join threads that are still runing */
thread = t->allthreads;
while (thread != NULL) {
pthread_cancel(thread->threadID);
thread = thread->next;
}
return nbRemoved;
}
void initNamedTpool(char *params,tpool_t *pool, bool performanceMeas, char *name);
#define initTpool(PARAMPTR,TPOOLPTR, MEASURFLAG) initNamedTpool(PARAMPTR,TPOOLPTR, MEASURFLAG, NULL)
#endif

View File

@@ -1,217 +1,219 @@
# Thread pool
The thread pool is a working server, made of a set of worker threads that can be mapped on CPU cores.
The **thread pool** is a working server, made of a set of worker threads that can be mapped on CPU cores. Each thread pool has an **input queue** ("**FIFO**"), from which its workers pick **jobs** (FIFO element) to execute. When a job is done, the worker sends a message to an output queue, if it has been defined.
Each worker loop on pick from the same input queue jobs to do.
A selective abort allows to cancel parallel jobs. This can be useful, e.g., if a client pushed jobs, but from a response of one job, the other linked jobs become useless.
When a job is done, the worker sends a return if a return is defined.
A selective abort allows to cancel parallel jobs (usage: a client pushed jobs, but from a response of one job, the other linked jobs becomes useless).
All the thread pool functions are thread safe, nevertheless the working functions are implemented by the thread pool client, so the client has to tackle the parallel execution of his functions called "processingFunc" hereafter.
All the thread pool functions are thread safe. The functions executed by worker threads are provided by the thread pool client, so the client has to handle the concurrency/parallel execution of his functions.
## license
Author:
Laurent Thomas, Open cells project
The owner share this piece code to Openairsoftware alliance as per OSA license terms
With contributions from Robert Schmidt, OSA
# jobs
# Jobs
A job is a message (notifiedFIFO_elt_t):
A job is a message of type `notifiedFIFO_elt_t`:
* next:
internal FIFO chain, do not set it
* key:
a long int that the client can use to identify a message or a group of messages
* ResponseFifo:
if the client defines a response FIFO, the message will be posted back after processing
* processingFunc:
any funtion (type void processingFunc(void *)) that the worker will launch
* msgData:
the data passed to processingFunc. It can be added automatically, or you can set it to a buffer you are managing
* malloced:
a boolean that enable internal free in these cases:
no return Fifo or Abort feature
* `next`: internal FIFO chain, do not set it
* `key`: a `long int` that the client can use to identify a job or a group of messages
* `ResponseFifo`: if the client defines a response FIFO, the job will be posted back after processing
* `processingFunc`: any function (of type `void processingFunc(void *)`) that a worker will process
* `msgData`: the data passed to `processingFunc`. It can be added automatically, or you can set it to a buffer you are managing
* `malloced`: a boolean that enables internal free in the case of no return FIFO or abort feature
The job messages can be created with newNotifiedFIFO_elt() and delNotifiedFIFO_elt() or managed by the client.
The job messages can be created and destroyed with `newNotifiedFIFO_elt()` and `delNotifiedFIFO_elt()`, or managed by the client:
# Queues of jobs
* `newNotifiedFIFO_elt()`: Creates a job, that will later be used in queues/FIFO
* `delNotifiedFIFO_elt()`: Deletes a job
* `NotifiedFifoData()`: gives a pointer to the beginning of free usage memory in a job (you can put any data there, up to 'size' parameter you passed to `newNotifiedFIFO_elt()`)
Queues are type of:
These 3 calls are not mandatory, you can also use your own memory to save the `malloc()`/`free()` that are behind these calls.
* notifiedFIFO_t that must be initialized by init_notifiedFIFO()
* No delete function is required, the creator has only to free the data of type notifiedFIFO_t
* push_notifiedFIFO() add a job in the queue
* pull_notifiedFIFO() is blocking, poll_notifiedFIFO() is non blocking
* abort_notifiedFIFO() allows the customer to delete all waiting jobs that match with the key (see key in jobs definition)
## API details
These queues details hereafter
### `notifiedFIFO_elt_t *newNotifiedFIFO_elt(int size, uint64_t key, notifiedFIFO_t *reponseFifo, void (*processingFunc)(void *))`
## Common
Creates a new job. The data part of the job will have size `size`, the job can be identified via `key`. `reponseFifo` is a FIFO queue to which the job should be pushed after being processed by a thread pool (see below for details) using function `processingFunc()`.
newNotifiedFIFO_elt()
The function returns a pointer to an allocated job.
creates a message, that will later be used in queues/FIFO
### `void delNotifiedFIFO_elt(notifiedFIFO_elt_t *elt)`
delNotifiedFIFO_elt()
Free the memory allocated for a job `elt`.
deletes it
### `void *NotifiedFifoData(notifiedFIFO_elt_t *elt)`
NotifiedFifoData()
Returns a pointer (`void *`) to the data segment of an allocated job.
gives a pointer to the beginning of free usage memory in a message (you can put any data there, up to 'size' parameter you passed to newNotifiedFIFO_elt()
# Queues of jobs (`FIFO`)
These 3 calls are not mandatory, you can also use your own memory to save the malloc()/free() that are behind these calls
iFirst level: non thread safe FIFO (or queues)
Queues can be used to enqueue messages/jobs, of type `notifiedFIFO_t`.
# low level: fast and simple
* `initNotifiedFIFO()`: Create a queue
* No delete function is required, the creator has only to free the data of type `notifiedFIFO_t`
* `pushNotifiedFIFO()`: Add a job to a queue
* `pullNotifiedFIFO()`: Pull a job from a queue. This call is blocking until a job arrived.
* `pollNotifiedFIFO()`: Pull a job from a queue. This call is not blocking, so it returns always very shortly
* `abortNotifiedFIFOJob()`: Allows to delete all waiting jobs that match a key (see `key` in jobs definition)
* `abortNotifiedFIFO()`: Aborts a FIFO, such that it will always return `NULL`
initNotifiedFIFO_nothreadSafe()
Note that in 99.9% of cases, `pull()` is better than `poll()`.
to create a queue
The above push/pull/poll functions are built on not-thread-safe versions of these functions that are described below.
pushNotifiedFIFO_nothreadSafe()
## Low level: fast and simple, but not thread-safe
Add a element in a queue
* `initNotifiedFIFO_nothreadSafe()`: Create a queue
* `pushNotifiedFIFO_nothreadSafe()`: Add a element in a queue
* `pullNotifiedFIFO_nothreadSafe()`: Pull a element from a queue
pullNotifiedFIFO_nothreadSafe()
As these queues are not thread safe, there is NO blocking mechanism, neither `pull()` versus `poll()` calls
pull a element from a queue
There is no delete for a message queue: you only have to abandon the memory you allocated to call `initNotifiedFIFO_nothreadSafe(notifiedFIFO_t *nf)`
As these queues are not thread safe, there is NO blocking mechanism, neither pull() versus poll() calls
If you malloced the memory under `nf` parameter, you have to free it.
There is no delete for a message queue: you only have to abandon the memory you allocated to call iinitNotifiedFIFO_nothreadSafe(notifiedFIFO_t *nf)
## FIFO queue abort
So if you malloced the memory under 'nf' parameter you have to free it, if it is automatic variable (local variable) or global variable, nothing is to be done.
It is possible to *abort* the FIFO queue. In this case, any pulling/polling of jobs in the queue will return `NULL`. This can be used when stopping a program, to release multiple queues that might depend on each other (a proper design would try to avoid such dependencies, though).
## API details
## thread safe queues
### `void initNotifiedFIFO(notifiedFIFO_t *nf)`
### `void initNotifiedFIFO_nothreadSafe(notifiedFIFO_t *nf)`
These queues are built on not thread safe queues when we need thread to thread protection
Initializes a FIFO queue pointed to by `nf` ("notified FIFO").
initNotifiedFIFO()
### `void pushNotifiedFIFO(notifiedFIFO_t *nf, notifiedFIFO_elt_t *msg)`
### `void pushNotifiedFIFO_nothreadSafe(notifiedFIFO_t *nf, notifiedFIFO_elt_t *msg)`
to create a queue
Pushes a job `msg` to the FIFO queue `nf`.
pushNotifiedFIFO()
### `notifiedFIFO_elt_t *pullNotifiedFIFO(notifiedFIFO_t *nf)`
Add a element in a queue
Pulls a job from a FIFO queue `nf`. The returned pointer points to the job. This call is blocking, i.e., a caller will be blocked until there is a message.
pullNotifiedFIFO()
If the FIFO has been aborted, the returned pointer will be `NULL`. In other words, if the call to this functions returns `NULL`, the FIFO has been deactivated.
pull a element from a queue, this call is blocking until a message arrived
### `notifiedFIFO_elt_t *pollNotifiedFIFO(notifiedFIFO_t *nf)`
### `notifiedFIFO_elt_t *pullNotifiedFIFO_nothreadSafe(notifiedFIFO_t *nf)`
pollNotifiedFIFO()
Like `pullNotifiedFIFO()`, but non-blocking: they check if the queue `nf` contains a job, and return it. Otherwise, they return `NULL`. Note the slight difference in naming: the thread-safe function is called *poll*, not *pull*.
pull a element from a queue, this call is not blocking, so it returns always very shortly
Note that unlike for `pullNotifiedFIFO()`, returning `NULL` does not inform whether the queue has been aborted; the caller should manually check the `abortFIFO` flag of `nf` in this case.
in 99.9% cases, pull() is better than poll()
### `int abortNotifiedFIFOJob(notifiedFIFO_t *nf, uint64_t key)`
No delete() call, same principle as not thread safe queues
Aborts all jobs in FIFO queue `nf` with key `key`. Jobs already under execution will be silently dropped and not put in the FIFO return queue, if any.
Returns the number of aborted jobs.
### `void abortNotifiedFIFO(notifiedFIFO_t *nf)`
Aborts the entire FIFO queue `nf`: all jobs will be dropped, and the FIFO is marked as aborted, such that a call to `pullNotifiedFIFO()` returns `NULL`.
Returns the total number of jobs that were waiting or under execution.
# Thread pools
## initialization
The clients can create one or more thread pools with `initTpool(char *params,tpool_t *pool, bool performanceMeas )` or `initNamedTpool(char *params,tpool_t *pool, bool performanceMeas , char *name)`
## Initialization
the params string structure: describes a list of cores, separated by "," that run a worker thread
The clients can create one or more thread pools with
If the core exists on the CPU, the thread pool initialization sets the affinity between this thread and the related code (use negative values is allowed, so the thread will never be mapped on a specific core).
* `initTpool(char *params, tpool_t *pool, bool performanceMeas)` or
* `initNamedTpool(char *params,tpool_t *pool, bool performanceMeas , char *name)`
The threads are all Linux real time scheduler, their name is set automatically to `Tpool<thread index>_<core id>` if initTpool is used or to `<name><thread index>_<core id>` when initNamedTpool is used.
The threads are governed by the Linux real time scheduler, and their name is set automatically to `Tpool<thread index>_<core id>` if `initTpool()` is used or to `<name><thread index>_<core id>` when `initNamedTpool()` is used.
## adding jobs
The client create their jobs messages as a notifiedFIFO_elt_t, then they push it with pushTpool() (that internally calls push_notifiedFIFO())
## Adding jobs
If they need a return, they have to create response queues with init_notifiedFIFO() and set this FIFO pointer in the notifiedFIFO_elt_t before pushing the job.
The client create their jobs messages as a `notifiedFIFO_elt_t`. They then push it with `pushTpool()` which internally calls `push_notifiedFIFO()`.
## abort
If they need a return value (e.g., result of a computation), they have to create response queues with `init_notifiedFIFO()` and set this FIFO pointer in the `notifiedFIFO_elt_t` before pushing the job. This way, multiple result queues can be used in one thread pool.
A abort service abortTpool() allows to abort all jobs that match a key (see jobs "key"). When the abort returns, it garanties no job (matching the key) response will be posted on response queues.
## Abort
Nevertheless, jobs already performed before the return of abortTpool() are pushed in the response Fifo queue.
A abort service `abortTpoolJob()` allows to abort all jobs that match a key (see a job's `key`). When the abort returns, it garanties that no job (matching the key) response will be posted on response queues.
Nevertheless, jobs already performed before the return of `abortTpoolJob()` are pushed in the response Fifo queue.
`abortTpool()` kills all jobs in the Tpool, and terminates the pool.
## API details
Each thread pool (there can be several in the same process) should be initialized once using one of the two API's:
### initNamedTpool(char *params,tpool_t *pool, bool performanceMeas,char *name)
### `void initNamedTpool(char *params, tpool_t *pool, bool performanceMeas, char *name)`
### initTpool(char *params,tpool_t *pool, bool performanceMeas)
### `void initTpool(char *params, tpool_t *pool, bool performanceMeas)`
`params`: the configuration parameter is a string, elements separator is a comma ",". An element can be:
* N: if a N is in the parameter list, no threads are created
The purpose is to keep the same API in any case
* a CPU with a little number of cores,
or in debugging sessions to simplify the human work
* a number that represent a valid CPU core on the target CPU
A thread is created and stick on the core (with set affinity)
* a number that is not a valid CPU core
a floating thread is created (Linux is responsible of the real time core allocation)
The `params` string describes a list of cores, separated by "," that run a worker thread. If the core exists on the CPU, the thread pool initialization sets the affinity between this thread and the related core. The following options are available:
example: "-1,-1,-1"
as there is no core number -1, the thread pool is made of 3 floating threads
be careful with fix allocation: it is hard to be more clever than Linux kernel
* `N`: if an `N` is in the parameter list, no threads are created, and the threadpool will be disabled (jobs will be treated by each calling thread independently).
* A number that represent a valid CPU core on the target CPU, i.e., if there are `M` cores, a number within `[0,M-1]`: A thread is created and pinned to the core (with set affinity)
* `-1`: The thread will not be mapped onto a specific core (a "floating" thread)
`pool` is the memory you allocated before to store the thread pool internal state (same concept as above queues)
Example: `-1,-1,-1`: the thread pool is made of 3 floating threads.
Be careful with a fixed allocation: it is hard to be more clever than Linux kernel!
`performanceMeas` is a flag to enable measurements (well described in documentation)
`pool` is a pointer to the thread pool object.
`performanceMeas` is a flag to enable measurements (see also below).
`name` is used to build the thread names.
### pushTpool(tpool_t *t, notifiedFIFO_elt_t *msg)
### `void pushTpool(tpool_t *t, notifiedFIFO_elt_t *msg)`
adds a job to do in the thread pool
Adds a job for processing in the thread pool.
The msg data you can set are:
The job data you can set are, inside `msg`:
* key:
a value for you that you will find back in the response
it is also the key for abortTpool()
* reponseFifo
if you set it, the message will be sent back on this queue when the job is done
if you don't set it, no return is performed, the thread pool frees the message 'msg' when the job is done
* processingFunc
the function the job will run. the function prototype is void <func>(void *memory)
the data part (the pointer returned by NotifiedFifoData(msg)) is passed to the function
it is used to send data to the processing function and also to write back results
of course, writing back results will lead you to use also a return queue (the parameter reponseFifo)
* `key`: an arbitrary key to find a job in a response queue, and which can be used to abort jobs using `abortTpoolJob()`.
* `reponseFifo`: if non-`NULL`, the message will be sent back on this queue when the job is done. If `NULL`, the thread pool automatically frees the job when it is done.
* `processingFunc`: the function to execute for this job.
### pullTpool() collects job result in a return queue
The `processingFunc` prototype is `void <func>(void *memory)`. The data part of the job (the pointer returned by `NotifiedFifoData(msg)`) is passed to the function. The job data will be updated by `processingFunc`, and the job will be pushed into return queue (the parameter `reponseFifo`).
you collect results in one result queue: the message you gave to pushTpool(), nevertheless it has been updated by processingFunc()
### `notifiedFIFO_elt_t *pullTpool(notifiedFIFO_t *responseFifo, tpool_t *t)`
An example of multiple return queues, in eNB: I created one single thread pool (because it depends mainly on CPU hardware), but i use two return queues: one for turbo encode, one for turbo decode.
Collects a job result in a return queue that has been defined in `msg` when calling `pushTpool()`, and that has been updated by `processingFunc()`. Returns the corresponding job pointer of type `notifiedFIFO_elt_t *`.
### tryPullTpool()
Multiple return queues might be useful. Consider the following example in the eNB: I created one single thread pool (because it depends mainly on CPU hardware), but i use two return queues: one for turbo encode, one for turbo decode. Thus, when performing Turbo encoding/decoding, jobs are pushed into a single thread pool, but will end up in different result queues, such that DL/UL processing can be separated more easily.
is the same, but not blocking (pollTpool() would have been a better name)
### `notifiedFIFO_elt_t *tryPullTpool(notifiedFIFO_t *responseFifo, tpool_t *t)`
### abortTpool()
The same as `pullTpool()` in a non-blocking fashion (an alternative name would have been `pollTpool()`).
Is a facility to cancel work you pushed to a thread pool
### `int abortTpoolJob(tpool_t *t, uint64_t key)`
I used it once: when eNB performs turbo decode, I push all segments in the thread pool.
Is a facility to cancel work you pushed to a thread pool: every job with a given `key` will be deleted, and results of jobs with such `key` under execution will be dropped.
But when I get back the decoding results, if one segment can't be decoded, I don't need the results of the other segments of the same UE.
It returns the number of aborted jobs, including the ones that are currently being executed.
I used it once: when eNB performs turbo decode, I push all segments in the thread pool. But when I get back the decoding results, if one segment can't be decoded, I don't need the results of the other segments of the same UE.
### `int abortTpool(tpool_t *t)`
Aborts the complete Tpool: cancel every work in the input queue, marks to drop existing jobs in processing, and terminates all worker threads. It is afterwards still possible to call functions such as `pushTpool()`, but each calling thread will execute the job itself.
Returns the total number of jobs that were aborted, i.e., waiting for execution or being executed.
## Performance measurements
A performance measurement is integrated:
the pool will automacillay fill timestamps:
A performance measurement is integrated: the pool will automacillay fill timestamps if you set the environement variable `threadPoolMeasurements` to a valid file name. The following measurements will be written to Linux pipe on a per-job basis:
* creationTime:
time the request is push to the pool;
* startProcessingTime:
time a worker start to run on the job
* endProcessingTime:
time the worker finished the job
* returnTime:
time the client reads the result
* `creationTime`: time the request is push to the pool;
* `startProcessingTime`: time a worker start to run on the job
* `endProcessingTime`: time the worker finished the job
* `returnTime`: time the client reads the result
if you set the environement variable:
threadPoolMeasurements to a valid file name
These measurements will be wrote to this Linux pipe.
A tool to read the linux fifo and display it in ascii is provided; compute the binay:
in cmake building directory: make/ninja measurement_display
The `measurement_display` tool to read the Linux pipe and display it in ASCII is provided.
In the cmake build directory, type `make/ninja measurement_display`. Use as
follows:
```
sudo threadPoolMeasurements=tpool.meas ./nr-softmodem ...
./measurement_display tpool.meas
```

View File

@@ -62,7 +62,7 @@ typedef struct time_stats {
oai_cputime_t in; /*!< \brief time at measure starting point */
oai_cputime_t diff; /*!< \brief average difference between time at starting point and time at endpoint*/
oai_cputime_t p_time; /*!< \brief absolute process duration */
oai_cputime_t diff_square; /*!< \brief process duration square */
double diff_square; /*!< \brief process duration square */
oai_cputime_t max; /*!< \brief maximum difference between time at starting point and time at endpoint*/
int trials; /*!< \brief number of start point - end point iterations */
int meas_flag; /*!< \brief 1: stop_meas not called (consecutive calls of start_meas) */
@@ -156,7 +156,7 @@ static inline void stop_meas(time_stats_t *ts) {
ts->diff += (out-ts->in);
/// process duration is the difference between two clock points
ts->p_time = (out-ts->in);
ts->diff_square += (out-ts->in)*(out-ts->in);
ts->diff_square += ((double)out-ts->in)*((double)out-ts->in);
if ((out-ts->in) > ts->max)
ts->max = out-ts->in;

View File

@@ -440,6 +440,10 @@ The following features are valid for the gNB and the 5G-NR UE.
- PTRS support
- Support for 1, 2 and 4 RX antennas
- Support for up to 2 layers (currently limited to DMRS configuration type 2)
* Measurements based on NR-CSIRS
- RI, PMI and CQI computation
- Support for 1 and 2 RX antennas
- Support for up to 2 layers
* NR-PUSCH (including Segmentation, LDPC encoding, rate matching, scrambling, modulation, RB mapping, etc).
- PUSCH mapping type A and B
- DMRS configuration type 1 and 2
@@ -488,12 +492,15 @@ The following features are valid for the gNB and the 5G-NR UE.
* UCI processing
- ACK/NACK processing
- Triggering periodic SR
- CSI measurement reporting (SSB RSRP only)
* DLSH scheduler
- CSI measurement reporting
* DLSCH scheduler
- Configuration of fapi PDU according to DCI
- HARQ procedures
* ULSCH scheduler
- Configuration of fapi PDU according to DCI
* NR-CSIRS scheduler
- Scheduling of NR-CSIRS reception
- Fill UCI for CSI measurement reporting
* Scheduler procedures for SRS transmission
- Periodic SRS transmission
* Bandwidth part (BWP) operation

View File

@@ -1,48 +0,0 @@
<table style="border-collapse: collapse; border: none;">
<tr style="border-collapse: collapse; border: none;">
<td style="border-collapse: collapse; border: none;">
<a href="http://www.openairinterface.org/">
<img src="./images/oai_final_logo.png" alt="" border=3 height=50 width=150>
</img>
</a>
</td>
<td style="border-collapse: collapse; border: none; vertical-align: center;">
<b><font size = "5">Running L3 ITTI simulator</font></b>
</td>
</tr>
</table>
This page is valid on the following branches:
- `develop` starting from tag `2020.w48`
# 1. Building the ITTI simulator.
The ITTI simulator is available directly from the standard build.
```bash
$ source oaienv
$ cd cmake_targets
$ sudo ./build_oai -x -w None -c -ittiSIM
```
# 2. Running the ITTI simulator.
The ITTI simulator establishes ITTI-threaded communication between the gNB RRC task and the UE RRC task.
This allows to test the sequence of NGAP/RRC/NAS messages.
The main limitations are:
- NAS is a simple stub that just sends and receives messages
- only initial Attach sequence
## 2.1. Starting the ITTI simulator
The ITTI simulator is able to run with a connected 5GC or without any.
The develop branch tag `2020.w48` only works RRC without 5GC connection.
```bash
$ sudo -E ./ran_build/build/nr-ittisim -O gnb.conf
```

View File

@@ -71,10 +71,6 @@ reboot
# https://docs.docker.com/compose/install/
sudo curl -L "https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
docker network create --driver=bridge --subnet=192.168.70.128/26 -o "com.docker.network.bridge.name"="demo-oai" demo-oai-public-net
sudo service docker restart
```
## 2.2 OAI CN5G Setup
@@ -82,39 +78,36 @@ sudo service docker restart
```bash
# Git oai-cn5g-fed repository
git clone https://gitlab.eurecom.fr/oai/cn5g/oai-cn5g-fed.git ~/oai-cn5g-fed
cd ~/oai-cn5g-fed
git checkout master
./scripts/syncComponents.sh --nrf-branch develop --amf-branch develop --smf-branch develop --spgwu-tiny-branch develop --ausf-branch develop --udm-branch develop --udr-branch develop --upf-vpp-branch develop --nssf-branch develop
# Pull docker images
docker pull oaisoftwarealliance/oai-amf:develop
docker pull oaisoftwarealliance/oai-nrf:develop
docker pull oaisoftwarealliance/oai-smf:develop
docker pull oaisoftwarealliance/oai-udr:develop
docker pull oaisoftwarealliance/oai-udm:develop
docker pull oaisoftwarealliance/oai-ausf:develop
docker pull oaisoftwarealliance/oai-upf-vpp:develop
docker pull oaisoftwarealliance/oai-spgwu-tiny:develop
docker pull oaisoftwarealliance/oai-nssf:develop
docker pull oaisoftwarealliance/trf-gen-cn5g:latest
# Tag docker images
docker image tag oaisoftwarealliance/oai-amf:develop oai-amf:develop
docker image tag oaisoftwarealliance/oai-nrf:develop oai-nrf:develop
docker image tag oaisoftwarealliance/oai-smf:develop oai-smf:develop
docker image tag oaisoftwarealliance/oai-udr:develop oai-udr:develop
docker image tag oaisoftwarealliance/oai-udm:develop oai-udm:develop
docker image tag oaisoftwarealliance/oai-ausf:develop oai-ausf:develop
docker image tag oaisoftwarealliance/oai-upf-vpp:develop oai-upf-vpp:develop
docker image tag oaisoftwarealliance/oai-spgwu-tiny:develop oai-spgwu-tiny:develop
docker image tag oaisoftwarealliance/oai-nssf:develop oai-nssf:develop
docker image tag oaisoftwarealliance/trf-gen-cn5g:latest trf-gen-cn5g:latest
```
## 2.3 OAI CN5G Configuration files
Download and copy the configuration files to ~/oai-cn5g-fed/docker-compose:
- [docker-compose-basic-nrf.yaml](tutorial_resources/docker-compose-basic-nrf.yaml)
- [oai_db.sql](tutorial_resources/oai_db.sql)
Download and copy configuration files:
- Copy [docker-compose-basic-nrf.yaml](tutorial_resources/docker-compose-basic-nrf.yaml) to `~/oai-cn5g-fed/docker-compose`
- Copy [oai_db.sql](tutorial_resources/oai_db.sql) to `~/oai-cn5g-fed/docker-compose/database`
Change permissions on oai_db.sql to prevent mysql permission denied error:
```bash
chmod 644 ~/oai-cn5g-fed/docker-compose/oai_db.sql
chmod 644 ~/oai-cn5g-fed/docker-compose/database/oai_db.sql
```
## 2.4 SIM Card
@@ -175,7 +168,7 @@ cd cmake_targets
```bash
cd ~/oai-cn5g-fed/docker-compose
python3 core-network.py --type start-basic --fqdn yes --scenario 1
python3 core-network.py --type start-basic --scenario 1
```
## 4.2 Run OAI gNB

View File

@@ -72,10 +72,6 @@ reboot
# https://docs.docker.com/compose/install/
sudo curl -L "https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
docker network create --driver=bridge --subnet=192.168.70.128/26 -o "com.docker.network.bridge.name"="demo-oai" demo-oai-public-net
sudo service docker restart
```
## 2.2 OAI CN5G Setup
@@ -83,39 +79,36 @@ sudo service docker restart
```bash
# Git oai-cn5g-fed repository
git clone https://gitlab.eurecom.fr/oai/cn5g/oai-cn5g-fed.git ~/oai-cn5g-fed
cd ~/oai-cn5g-fed
git checkout master
./scripts/syncComponents.sh --nrf-branch develop --amf-branch develop --smf-branch develop --spgwu-tiny-branch develop --ausf-branch develop --udm-branch develop --udr-branch develop --upf-vpp-branch develop --nssf-branch develop
# Pull docker images
docker pull oaisoftwarealliance/oai-amf:develop
docker pull oaisoftwarealliance/oai-nrf:develop
docker pull oaisoftwarealliance/oai-smf:develop
docker pull oaisoftwarealliance/oai-udr:develop
docker pull oaisoftwarealliance/oai-udm:develop
docker pull oaisoftwarealliance/oai-ausf:develop
docker pull oaisoftwarealliance/oai-upf-vpp:develop
docker pull oaisoftwarealliance/oai-spgwu-tiny:develop
docker pull oaisoftwarealliance/oai-nssf:develop
docker pull oaisoftwarealliance/trf-gen-cn5g:latest
# Tag docker images
docker image tag oaisoftwarealliance/oai-amf:develop oai-amf:develop
docker image tag oaisoftwarealliance/oai-nrf:develop oai-nrf:develop
docker image tag oaisoftwarealliance/oai-smf:develop oai-smf:develop
docker image tag oaisoftwarealliance/oai-udr:develop oai-udr:develop
docker image tag oaisoftwarealliance/oai-udm:develop oai-udm:develop
docker image tag oaisoftwarealliance/oai-ausf:develop oai-ausf:develop
docker image tag oaisoftwarealliance/oai-upf-vpp:develop oai-upf-vpp:develop
docker image tag oaisoftwarealliance/oai-spgwu-tiny:develop oai-spgwu-tiny:develop
docker image tag oaisoftwarealliance/oai-nssf:develop oai-nssf:develop
docker image tag oaisoftwarealliance/trf-gen-cn5g:latest trf-gen-cn5g:latest
```
## 2.3 OAI CN5G Configuration files
Download and copy the configuration files to ~/oai-cn5g-fed/docker-compose:
- [docker-compose-basic-nrf.yaml](tutorial_resources/docker-compose-basic-nrf.yaml)
- [oai_db.sql](tutorial_resources/oai_db.sql)
Download and copy configuration files:
- Copy [docker-compose-basic-nrf.yaml](tutorial_resources/docker-compose-basic-nrf.yaml) to `~/oai-cn5g-fed/docker-compose`
- Copy [oai_db.sql](tutorial_resources/oai_db.sql) to `~/oai-cn5g-fed/docker-compose/database`
Change permissions on oai_db.sql to prevent mysql permission denied error:
```bash
chmod 644 ~/oai-cn5g-fed/docker-compose/oai_db.sql
chmod 644 ~/oai-cn5g-fed/docker-compose/database/oai_db.sql
```
## 2.4 SIM Card
@@ -193,7 +186,7 @@ The following steps are recommended. Please change the network interface(s) as r
```bash
cd ~/oai-cn5g-fed/docker-compose
python3 core-network.py --type start-basic --fqdn yes --scenario 1
python3 core-network.py --type start-basic --scenario 1
```
## 4.2 Run OAI gNB

View File

@@ -101,7 +101,6 @@ raw incoming data is in buffer called "rxdata"
## nr_fep_full()
"front end processing" of uplink signal
performs DFT on the signal
same function (duplicates): phy_procedures_gNB_common_RX()
it computes the buffer rxdataF (for frequency) from rxdata (samples over time)
rxdataF is the rxdata in frequency domain, phase aligned
{: .func3}

View File

@@ -9,19 +9,19 @@
| Machine | IP address | Lockable Resource | Function | Connected devices |
| ------------- | --------------- | --------------------- | ------------------ | ----------------------------------------------------- |
| asterix | 172.21.16.127 | CI-Asterix-Usage | gNB | 173.21.19.14 |
| obelix | 172.21.16.128 | CI-Obelix-Usage | eNB, UE (5G) | 172.21.19.13, X300 (192.168.60.2), B200mini (30C51EB) |
| asterix | 172.21.16.127 | CI-Asterix-Usage | gNB (n78) | 173.21.19.14 |
| obelix | 172.21.16.128 | CI-Obelix-Usage | eNB (n40, n78), nrUE | 172.21.19.13, X300 (192.168.60.2), B200mini (30C51EB) |
| porcepix | 172.21.16.136 | CI-NSA-MiniBench | Executor, EPC, 5GC | -- |
| nrmodule2 | 172.21.16.139 | CI-NSA-MiniBench | Quectel | Quectel module |
| nepes | 172.21.16.137 | CI-NSA-MiniBench | gNB | B200mini (30C51D4) |
| nepes | 172.21.16.137 | CI-NSA-MiniBench | gNB (n78) | B200mini (30C51D4) |
| caracal | 172.21.16.132 | CI-Caracal | gNB/phytest | N300 (192.168.10.2) |
| idefix | 172.21.16.135 | CI-NSA-MiniBench | Quectel | Quectel module |
| amariue | 172.21.16.144 | CI-Amarisoft-UE-Usage | TBD | Amarisoft UE simulator |
| amariue | 172.21.16.144 | CI-Amarisoft-UE-Usage | nrUE | Amarisoft UE simulator |
| bellatrix | 192.168.117.115 | CI-RAN-VM-Deployment | Executor | -- |
| nano | 192.168.12.62 | CI-Bench-1-Phones | EPC, adb | 2x COTS (adb) |
| hutch | 192.168.12.19 | CI-Bench-1-Phones | eNB (B7) | B200mini (30C5239) |
| starsky | 192.168.12.18 | CI-Bench-1-Phones | eNB (B40) | b200mini (30A3E3C) |
| carabe | 192.168.12.211 | CI-Bench-2-OAI-Phone | UE 4G (B) | B200mini (30AE8C9) |
| carabe | 192.168.12.211 | CI-Bench-2-OAI-Phone | UE (B7UE) | B200mini (30AE8C9) |
Note: The available resources, and their current usage, is indicated here:
- [Lockable resources of jenkins-oai](https://jenkins-oai.eurecom.fr/lockable-resources/):
@@ -40,7 +40,7 @@ Note: The available resources, and their current usage, is indicated here:
### OTA Testbench
[Proper image to be followed up. TBD: add antennas/circulators]
**Purpose**: Over-the-air 4G/5G (NSA/SA) tests
Note: obelix and porcepix are both used in the OTA testbench and the 5G
NSA/Faraday Cage testbench!
@@ -83,13 +83,19 @@ Webhook
- caracal + N310
- pure performance test through phy-test scheduler, see command line for more
details
- [RAN-L2-Sim-Test-5G](https://jenkins-oai.eurecom.fr/job/RAN-L2-Sim-Test-4G/)
- obelix (eNB, 1x UE, OAI EPC)
- L2simulator: skips physical layer and uses proxy between eNB and UE
- [RAN-L2-Sim-Test-5G](https://jenkins-oai.eurecom.fr/job/RAN-L2-Sim-Test-5G/)
- obelix (gNB, 1x UE, OAI 5GC)
- L2simulator: skips physical layer and uses proxy between gNB and UE,
currently only ping
- [RAN-NSA-B200-Module-LTEBOX-Container](https://jenkins-oai.eurecom.fr/job/RAN-NSA-B200-Module-LTEBOX-Container/)
- obelix + B200, nepes + B200, idefix + Quectel, porcepix w/ ltebox
- basic NSA test, known to be instable
- basic NSA test
- [RAN-SA-B200-Module-SABOX-Container](https://jenkins-oai.eurecom.fr/job/RAN-SA-B200-Module-SABOX-Container/)
- obelix + B200, nepes + B200, idefix + Quectel, porcepix w/ sabox
- basic SA test (40 MHz TDD)
- [RAN-PhySim-Cluster](https://jenkins-oai.eurecom.fr/job/RAN-PhySim-Cluster/)
- asterix (`Asterix-OC-oaicicd-session` resource), tests in OpenShift Cluster
- unitary simulators (`nr_dlsim`, etc.)

View File

@@ -181,21 +181,6 @@ nssai_sd=1;
}
```
Alternatively, the values can be hardcoded/edited in source file ***openair3/UICC/usim_interface.c*** through the following lines:
```bash
#define UICC_PARAMS_DESC {\
{"imsi", "USIM IMSI\n", 0, strptr:&(uicc->imsiStr), defstrval:"2089900007487", TYPE_STRING, 0 },\
{"nmc_size" "number of digits in NMC", 0, iptr:&(uicc->nmc_size), defintval:2, TYPE_INT, 0 },\
{"key", "USIM Ki\n", 0, strptr:&(uicc->keyStr), defstrval:"fec86ba6eb707ed08905757b1bb44b8f", TYPE_STRING, 0 },\
{"opc", "USIM OPc\n", 0, strptr:&(uicc->opcStr), defstrval:"c42449363bbad02b66d16bc975d77cc1", TYPE_STRING, 0 },\
{"amf", "USIM amf\n", 0, strptr:&(uicc->amfStr), defstrval:"8000", TYPE_STRING, 0 },\
{"sqn", "USIM sqn\n", 0, strptr:&(uicc->sqnStr), defstrval:"000000", TYPE_STRING, 0 },\
{"dnn", "UE dnn (apn)\n", 0, strptr:&(uicc->dnnStr), defstrval:"oai", TYPE_STRING, 0 },\
{"nssai_sst", "UE nssai\n", 0, iptr:&(uicc->nssai_sst), defintval:1, TYPE_INT, 0 }, \
{"nssai_sd", "UE nssai\n", 0, iptr:&(uicc->nssai_sd), defintval:1, TYPE_INT, 0 }, \
};
```
For interoperability with OAI or other CNs, it should be ensured that the configuration of the aforementioned parameters match the configuration of the corresponding subscribed user at the core network.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 90 KiB

After

Width:  |  Height:  |  Size: 90 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 87 KiB

After

Width:  |  Height:  |  Size: 87 KiB

View File

@@ -30,7 +30,7 @@
\draw (obelix) -- (b210o);
\node[above right=0.35cm of faraday.south west] (antn)
{\includegraphics[width=0.3cm]{antenna}};
\draw (b210n) -| node [pos=0.2, duplexer] {B78} (antn);
\draw (b210n) -| node [pos=0.2, duplexer] {n78} (antn);
\node[left=5cm of faraday, label=above:porcepix] (porcepix)
{\includegraphics[width=1.2cm]{server}};

Binary file not shown.

Before

Width:  |  Height:  |  Size: 88 KiB

After

Width:  |  Height:  |  Size: 94 KiB

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