mirror of
https://gitlab.eurecom.fr/oai/openairinterface5g.git
synced 2026-07-17 06:30:31 +00:00
Compare commits
339 Commits
CG
...
iisc_draft
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
442093069c | ||
|
|
8346517407 | ||
|
|
9567a316c8 | ||
|
|
7a33605d9e | ||
|
|
8e2d468be7 | ||
|
|
f8607ae6c0 | ||
|
|
a108c03160 | ||
|
|
2c9a57f0a7 | ||
|
|
09c37d7b1f | ||
|
|
a601306ad0 | ||
|
|
63f23425ac | ||
|
|
e6d4e96d96 | ||
|
|
3ef7977429 | ||
|
|
6ac9597fbb | ||
|
|
922f070206 | ||
|
|
74dcd3c9d6 | ||
|
|
dfde5dc349 | ||
|
|
8d1f92597a | ||
|
|
665e3e3888 | ||
|
|
883724b977 | ||
|
|
4c07dca3bd | ||
|
|
0ecd346b07 | ||
|
|
7535e99944 | ||
|
|
7bfa2d71f4 | ||
|
|
6a0e636f00 | ||
|
|
ba003cc649 | ||
|
|
fc4c4fc599 | ||
|
|
9379bf85ed | ||
|
|
791531015d | ||
|
|
c45fb43110 | ||
|
|
eaff52f8e8 | ||
|
|
3042c70d3d | ||
|
|
19092a5d15 | ||
|
|
6cf2ab2a15 | ||
|
|
c2a2e07746 | ||
|
|
fd5596bfad | ||
|
|
7258f78fbf | ||
|
|
91e5d80002 | ||
|
|
07750d3a98 | ||
|
|
e3c22441a5 | ||
|
|
4f884db3d6 | ||
|
|
c090b1f767 | ||
|
|
310f62604c | ||
|
|
e60af1c8f6 | ||
|
|
04ac336c80 | ||
|
|
5df946fab6 | ||
|
|
78305b8c54 | ||
|
|
93d8e02c31 | ||
|
|
dea9271bce | ||
|
|
00e549aa62 | ||
|
|
de82f516fe | ||
|
|
557f3e6f05 | ||
|
|
8d93ab5fed | ||
|
|
9efc692ad5 | ||
|
|
5697f396f6 | ||
|
|
740bec4ac0 | ||
|
|
2b37edaa3c | ||
|
|
06c4f4690a | ||
|
|
9c4da620b9 | ||
|
|
73f2c9108d | ||
|
|
9e6f82399f | ||
|
|
a47fd7fcfb | ||
|
|
ab2a08fd43 | ||
|
|
513f56e215 | ||
|
|
8a65ca93fc | ||
|
|
c16bde2928 | ||
|
|
ee3dcc5c77 | ||
|
|
1fa6be2a3d | ||
|
|
819455d375 | ||
|
|
3ecd2e6b62 | ||
|
|
122a5ce9b8 | ||
|
|
44147a473f | ||
|
|
a9123e68fc | ||
|
|
0b43620e05 | ||
|
|
bc9f95c972 | ||
|
|
b97c70fd87 | ||
|
|
73d21d6da0 | ||
|
|
8ce33f58a9 | ||
|
|
f660bd6352 | ||
|
|
2ae8a7b305 | ||
|
|
422d852bdb | ||
|
|
200a408e0f | ||
|
|
2fbb41ddc5 | ||
|
|
a1f40006ce | ||
|
|
a645e10ff5 | ||
|
|
b7a98b77c3 | ||
|
|
b6aefac53a | ||
|
|
823e127c55 | ||
|
|
e5713c9a56 | ||
|
|
1f2656617b | ||
|
|
6108e5b8fb | ||
|
|
51d60c2dae | ||
|
|
c9cf72b33f | ||
|
|
f15606e8ad | ||
|
|
37d3e5bb58 | ||
|
|
72e10a0ee6 | ||
|
|
a0e9716a5a | ||
|
|
f31cf3a68f | ||
|
|
985802c06c | ||
|
|
bb19306797 | ||
|
|
bfe77c7f29 | ||
|
|
8c2dc19470 | ||
|
|
f03601ed8e | ||
|
|
f89876778a | ||
|
|
707c707c86 | ||
|
|
456009cb1f | ||
|
|
57483eed80 | ||
|
|
499bd49450 | ||
|
|
77d749ba87 | ||
|
|
8931e13363 | ||
|
|
73509757ad | ||
|
|
f992bee903 | ||
|
|
fe9d871ac7 | ||
|
|
127ae812f7 | ||
|
|
12517b55f6 | ||
|
|
e9e67b40fe | ||
|
|
53c3e5ce1d | ||
|
|
0eba3d75b8 | ||
|
|
1ab3b8dd8e | ||
|
|
782a850159 | ||
|
|
1fadd7adb6 | ||
|
|
4b3ea3f469 | ||
|
|
78cc3d4967 | ||
|
|
8150a47ba5 | ||
|
|
e615321eb2 | ||
|
|
06820d372f | ||
|
|
2d4e3a0515 | ||
|
|
132949c226 | ||
|
|
d1c2d60d16 | ||
|
|
03619e1ccd | ||
|
|
66bdd0e801 | ||
|
|
e24f5d635c | ||
|
|
c5e4bea6b9 | ||
|
|
fabf7e595f | ||
|
|
573e7d3a4a | ||
|
|
275c3c6aa8 | ||
|
|
fc8d0c59c6 | ||
|
|
066aa33799 | ||
|
|
6259b62a18 | ||
|
|
4245dd9be9 | ||
|
|
0128945922 | ||
|
|
e80d8a01f3 | ||
|
|
c189591827 | ||
|
|
09a75009ce | ||
|
|
8d87f0c4e2 | ||
|
|
98c309ffe3 | ||
|
|
711518ba00 | ||
|
|
7ea8833529 | ||
|
|
70be05381f | ||
|
|
885611cd00 | ||
|
|
c5c883f71d | ||
|
|
1baf2aa3a4 | ||
|
|
c917825dab | ||
|
|
4f32110c72 | ||
|
|
284d07c5ae | ||
|
|
24d30ae78a | ||
|
|
10d7b537a4 | ||
|
|
dd5691f0ce | ||
|
|
bc6d1ad48d | ||
|
|
d1002cc729 | ||
|
|
2129ee3c9c | ||
|
|
ed65b52c3c | ||
|
|
b99e856733 | ||
|
|
543250e933 | ||
|
|
fca1561bf7 | ||
|
|
fc97e197fa | ||
|
|
2653897689 | ||
|
|
56acd1d6d3 | ||
|
|
adbb051bb7 | ||
|
|
d7c3806f13 | ||
|
|
549652353b | ||
|
|
331fb1ce8e | ||
|
|
3c1ed92b80 | ||
|
|
d5eb5ee0f2 | ||
|
|
e9f0541ad0 | ||
|
|
961981f456 | ||
|
|
b7a1b4b405 | ||
|
|
58c2f04b40 | ||
|
|
d60273e200 | ||
|
|
6c015f8099 | ||
|
|
9a44d4b88f | ||
|
|
29ca077b66 | ||
|
|
64e58c1d67 | ||
|
|
d56c7dfc07 | ||
|
|
be0217aabf | ||
|
|
ebe1b711ac | ||
|
|
2962340a8b | ||
|
|
50d4d489f7 | ||
|
|
c92cbe67b5 | ||
|
|
7466297568 | ||
|
|
bedc5bea4c | ||
|
|
d26f0b9196 | ||
|
|
a724dfba4f | ||
|
|
b431e1442f | ||
|
|
4cfba89e68 | ||
|
|
9af386c761 | ||
|
|
e845a9c3b7 | ||
|
|
56c4a6ec07 | ||
|
|
28e13fc6ac | ||
|
|
2a35d5c2f9 | ||
|
|
40987702b4 | ||
|
|
b94dd49ace | ||
|
|
01722ff8fa | ||
|
|
60447a24a1 | ||
|
|
06c2ce1777 | ||
|
|
ffd176e9d5 | ||
|
|
72166d7ae9 | ||
|
|
2a078c757b | ||
|
|
cd5209a782 | ||
|
|
c83ff4c388 | ||
|
|
4ae0fd09f1 | ||
|
|
c464c27f63 | ||
|
|
a0224e8faf | ||
|
|
23f65d8ab6 | ||
|
|
e4b7d9fd58 | ||
|
|
0ab88e390b | ||
|
|
801ebbbb5f | ||
|
|
ab07b080dd | ||
|
|
3efb5b3657 | ||
|
|
1f81b3f1a2 | ||
|
|
c99db698ce | ||
|
|
b1f9e9d57a | ||
|
|
b6087da1b2 | ||
|
|
f392158c40 | ||
|
|
ea0185f84e | ||
|
|
8666b084d5 | ||
|
|
c54a1ff857 | ||
|
|
948188b200 | ||
|
|
edb2dd7d6d | ||
|
|
bc0cab7a08 | ||
|
|
4a8815a41e | ||
|
|
080510568d | ||
|
|
2f313c9aee | ||
|
|
1b237f6abe | ||
|
|
1adcd3fb5a | ||
|
|
10a6ce8bdd | ||
|
|
b284b09377 | ||
|
|
072d65a50e | ||
|
|
ab5da3fe3c | ||
|
|
ca2b0693fb | ||
|
|
9e3163db8d | ||
|
|
d2742b0bf7 | ||
|
|
7337ae8664 | ||
|
|
3972cd44d6 | ||
|
|
29bc4101cc | ||
|
|
8e24272a03 | ||
|
|
7ca22db7d2 | ||
|
|
13521c681f | ||
|
|
819f7c1d22 | ||
|
|
4003936da5 | ||
|
|
81547750f3 | ||
|
|
71790ccbdf | ||
|
|
563109a88f | ||
|
|
ff7c960b2c | ||
|
|
c599e172f1 | ||
|
|
16c82f2598 | ||
|
|
b681779609 | ||
|
|
0439d19849 | ||
|
|
9cf6ffe5fd | ||
|
|
83fdb2d800 | ||
|
|
df739aa590 | ||
|
|
715671022d | ||
|
|
4921c06c04 | ||
|
|
8340b86692 | ||
|
|
3d8b38f7e6 | ||
|
|
c78399ee36 | ||
|
|
be36b2f9bc | ||
|
|
9f315932d0 | ||
|
|
fd8fc31a6f | ||
|
|
3f3a98696f | ||
|
|
24c707c33e | ||
|
|
6069cd6b5d | ||
|
|
15cf5c116e | ||
|
|
713c84e4d4 | ||
|
|
9890410a18 | ||
|
|
d01c147014 | ||
|
|
0e531b44e0 | ||
|
|
ddd53b0ba3 | ||
|
|
3bb9e6b0f5 | ||
|
|
f04e5d97fa | ||
|
|
a7f56d0d52 | ||
|
|
5421a4d172 | ||
|
|
6fe655c7d4 | ||
|
|
4353763984 | ||
|
|
c33a308dff | ||
|
|
0a1651e45c | ||
|
|
f3bba45bfe | ||
|
|
4d411dbce3 | ||
|
|
362bc481bd | ||
|
|
418024835b | ||
|
|
003567675c | ||
|
|
6ba8716700 | ||
|
|
e9d6081abc | ||
|
|
d52b81798b | ||
|
|
4ca52ef456 | ||
|
|
fb69d9c635 | ||
|
|
88852dc9af | ||
|
|
d5f11902b7 | ||
|
|
c5211b0f8c | ||
|
|
b5ba3a69f1 | ||
|
|
b32b9e836f | ||
|
|
223c63826d | ||
|
|
c3e7cb7e35 | ||
|
|
0fb0a9a48e | ||
|
|
8dd12ba2bf | ||
|
|
4f7464d010 | ||
|
|
638acd6040 | ||
|
|
83d46bb516 | ||
|
|
702c608ca1 | ||
|
|
b612e5f021 | ||
|
|
cf183f4349 | ||
|
|
f3c61b12fe | ||
|
|
29ddb924e3 | ||
|
|
c093e4ed4f | ||
|
|
4085544f28 | ||
|
|
fd3c50b6c8 | ||
|
|
970e7855c4 | ||
|
|
a22335a89f | ||
|
|
60af0f1af2 | ||
|
|
05babdfc5c | ||
|
|
7ee0cfc28c | ||
|
|
e29c938130 | ||
|
|
99f3ef1a61 | ||
|
|
6ec4918187 | ||
|
|
be08184fbe | ||
|
|
1675e6e155 | ||
|
|
d7ff30db55 | ||
|
|
3cc3bbbabc | ||
|
|
94a0704e43 | ||
|
|
bb044cf940 | ||
|
|
1ec528dbdb | ||
|
|
58ea7357f8 | ||
|
|
df867e533f | ||
|
|
07c5cf3cad | ||
|
|
3a6e93b809 | ||
|
|
9cf44c11f1 | ||
|
|
6b123ff217 | ||
|
|
03439f9d6a | ||
|
|
e6b02c6d12 |
27
CHANGELOG.md
27
CHANGELOG.md
@@ -1,5 +1,32 @@
|
||||
# RELEASE NOTES: #
|
||||
|
||||
## [v2.1.0](https://gitlab.eurecom.fr/oai/openairinterface5g/-/tags/v2.1.0) -> February 2024. ##
|
||||
|
||||
This release improves existing 5G support and adds various new features.
|
||||
|
||||
* 5G gNB
|
||||
- Add support for O-RAN 7.2 fronthaul interface
|
||||
(tested with 3 O-RUs: Benetel, LITEON, VVDN)
|
||||
- Add support for 2-layer UL MIMO
|
||||
- FDD interoperability with COTS UE
|
||||
- Compiles on ARM (through SIMDE)
|
||||
- Introduce E2 agent and basic support for E2SM-KPM and E2SM-RC
|
||||
- Add support for E1AP
|
||||
- Add support for multiple DUs and CU-UPs at one CU-CP
|
||||
- FR2 SA with OAI UE
|
||||
- Improve computational efficiency
|
||||
* 5G UE
|
||||
- Cleanup in MAC and RRC towards support of 3rd-party gNB
|
||||
- FR2 SA with OAI gNB
|
||||
- Improve computational efficiency
|
||||
|
||||
Overall the stability is improved for the same resource usage.
|
||||
|
||||
There is basic FR2 support between OAI gNB and OAI nrUE. COTS UE
|
||||
interoperability is under testing.
|
||||
|
||||
This release also includes many fixes and documentation updates.
|
||||
|
||||
## [v2.0.0](https://gitlab.eurecom.fr/oai/openairinterface5g/-/tags/v2.0.0) -> August 2023. ##
|
||||
|
||||
This release adds support for 5G and maintains previous features:
|
||||
|
||||
@@ -726,7 +726,6 @@ set(SCHED_SRC_NR_UE
|
||||
add_library(SCHED_NR_UE_LIB ${SCHED_SRC_NR_UE})
|
||||
target_link_libraries(SCHED_NR_UE_LIB PRIVATE asn1_lte_rrc_hdrs asn1_nr_rrc_hdrs)
|
||||
|
||||
|
||||
# nFAPI
|
||||
#################################
|
||||
set(NFAPI_COMMON_SRC
|
||||
@@ -1384,9 +1383,11 @@ set (MAC_NR_SRC_UE
|
||||
${NR_UE_PHY_INTERFACE_DIR}/NR_IF_Module.c
|
||||
${NR_UE_PHY_INTERFACE_DIR}/NR_Packet_Drop.c
|
||||
${NR_UE_MAC_DIR}/config_ue.c
|
||||
${NR_UE_MAC_DIR}/config_ue_sl.c
|
||||
${NR_UE_MAC_DIR}/mac_vars.c
|
||||
${NR_UE_MAC_DIR}/main_ue_nr.c
|
||||
${NR_UE_MAC_DIR}/nr_ue_procedures.c
|
||||
${NR_UE_MAC_DIR}/nr_ue_procedures_sl.c
|
||||
${NR_UE_MAC_DIR}/nr_ue_scheduler.c
|
||||
${NR_UE_MAC_DIR}/nr_ue_dci_configuration.c
|
||||
${NR_UE_MAC_DIR}/nr_ra_procedures.c
|
||||
@@ -1434,8 +1435,7 @@ target_link_libraries(L2 PRIVATE asn1_lte_rrc_hdrs asn1_nr_rrc_hdrs)
|
||||
|
||||
if(E2_AGENT)
|
||||
target_link_libraries(L2 PUBLIC e2_agent e2_agent_arg e2_ran_func_du_cucp_cuup)
|
||||
target_compile_definitions(L2 PRIVATE E2_AGENT)
|
||||
target_compile_definitions(L2 PRIVATE ${E2AP_VERSION} ${KPM_VERSION})
|
||||
target_compile_definitions(L2 PRIVATE ${E2AP_VERSION} ${KPM_VERSION} E2_AGENT)
|
||||
endif()
|
||||
|
||||
|
||||
@@ -1458,11 +1458,10 @@ add_library(e1_if
|
||||
|
||||
target_link_libraries(e1_if PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs asn1_f1ap SECURITY ${OPENSSL_LIBRARIES} e1ap GTPV1U)
|
||||
|
||||
target_link_libraries(L2_NR PRIVATE f1ap x2ap s1ap ngap nr_rrc e1ap nr_rlc)
|
||||
target_link_libraries(L2_NR PRIVATE f1ap x2ap s1ap ngap nr_rrc e1ap nr_rlc xnap)
|
||||
if(E2_AGENT)
|
||||
target_link_libraries(L2_NR PUBLIC e2_agent e2_agent_arg e2_ran_func_du_cucp_cuup)
|
||||
target_compile_definitions(L2_NR PRIVATE ${E2AP_VERSION} ${KPM_VERSION})
|
||||
target_compile_definitions(L2_NR PRIVATE E2_AGENT)
|
||||
target_compile_definitions(L2_NR PRIVATE ${E2AP_VERSION} ${KPM_VERSION} E2_AGENT)
|
||||
endif()
|
||||
|
||||
add_library(L2_LTE_NR
|
||||
@@ -1981,8 +1980,7 @@ target_link_libraries(lte-softmodem PRIVATE ${T_LIB})
|
||||
target_link_libraries(lte-softmodem PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs)
|
||||
|
||||
if(E2_AGENT)
|
||||
target_compile_definitions(lte-softmodem PRIVATE E2_AGENT)
|
||||
target_compile_definitions(lte-softmodem PRIVATE ${E2AP_VERSION} ${KPM_VERSION})
|
||||
target_compile_definitions(lte-softmodem PRIVATE ${E2AP_VERSION} ${KPM_VERSION} E2_AGENT)
|
||||
endif()
|
||||
|
||||
add_executable(oairu
|
||||
@@ -2067,6 +2065,8 @@ add_executable(nr-softmodem
|
||||
${OPENAIR1_DIR}/PHY/TOOLS/phy_scope_interface.c
|
||||
)
|
||||
|
||||
include(${OPENAIR_DIR}/nfapi/CMakeLists.txt)
|
||||
|
||||
target_link_libraries(nr-softmodem PRIVATE
|
||||
-Wl,--start-group
|
||||
UTIL HASHTABLE SCTP_CLIENT SCHED_LIB SCHED_RU_LIB SCHED_NR_LIB PHY_NR PHY PHY_COMMON PHY_NR_COMMON PHY_RU GTPV1U SECURITY
|
||||
@@ -2080,7 +2080,7 @@ target_link_libraries(nr-softmodem PRIVATE ${T_LIB})
|
||||
target_link_libraries(nr-softmodem PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs)
|
||||
target_link_libraries(nr-softmodem PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs)
|
||||
if(E2_AGENT)
|
||||
target_compile_definitions(nr-softmodem PRIVATE ${E2AP_VERSION} ${KPM_VERSION})
|
||||
target_compile_definitions(nr-softmodem PRIVATE ${E2AP_VERSION} ${KPM_VERSION} E2_AGENT)
|
||||
endif()
|
||||
|
||||
|
||||
@@ -2093,10 +2093,6 @@ endif()
|
||||
# force the generation of ASN.1 so that we don't need to wait during the build
|
||||
target_link_libraries(nr-softmodem PRIVATE
|
||||
asn1_lte_rrc asn1_nr_rrc asn1_s1ap asn1_ngap asn1_m2ap asn1_m3ap asn1_x2ap asn1_f1ap asn1_lpp)
|
||||
if(E2_AGENT)
|
||||
target_compile_definitions(nr-softmodem PRIVATE E2_AGENT)
|
||||
endif()
|
||||
|
||||
|
||||
add_executable(nr-cuup
|
||||
executables/nr-cuup.c
|
||||
|
||||
@@ -562,6 +562,29 @@ pipeline {
|
||||
}
|
||||
}
|
||||
}
|
||||
stage ("SA-AERIAL-CN5G") {
|
||||
when { expression {do5Gtest} }
|
||||
steps {
|
||||
script {
|
||||
triggerSlaveJob ('RAN-SA-AERIAL-CN5G', 'SA-AERIAL-CN5G')
|
||||
}
|
||||
}
|
||||
post {
|
||||
always {
|
||||
script {
|
||||
// Using a unique variable name for each test stage to avoid overwriting on a global variable
|
||||
// due to parallel-time concurrency
|
||||
saAERIALStatus = finalizeSlaveJob('RAN-SA-AERIAL-CN5G')
|
||||
}
|
||||
}
|
||||
failure {
|
||||
script {
|
||||
currentBuild.result = 'FAILURE'
|
||||
failingStages += saAERIALStatus
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
stage ("SA-OAIUE-CN5G") {
|
||||
when { expression {do5Gtest} }
|
||||
steps {
|
||||
|
||||
@@ -74,8 +74,9 @@ then
|
||||
IS_NFAPI=`echo $FILE | egrep -c "nfapi/open-nFAPI|nfapi/oai_integration/vendor_ext" || true`
|
||||
IS_OAI_LICENCE_PRESENT=`egrep -c "OAI Public License" $FILE || true`
|
||||
IS_BSD_LICENCE_PRESENT=`egrep -c "the terms of the BSD Licence|License-Identifier: BSD-2-Clause" $FILE || true`
|
||||
IS_MIT_LICENCE_PRESENT=`egrep -c "MIT License" $FILE || true`
|
||||
IS_EXCEPTION=`echo $FILE | egrep -c "common/utils/collection/tree.h|common/utils/collection/queue.h|openair2/UTIL/OPT/packet-rohc.h|openair3/NAS/COMMON/milenage.h|openair1/PHY/CODING/crc.h|openair1/PHY/CODING/crcext.h|openair1/PHY/CODING/types.h|openair1/PHY/CODING/nrLDPC_decoder/nrLDPC_decoder_offload.c|openair1/PHY/CODING/nrLDPC_decoder/nrLDPC_offload.h" || true`
|
||||
if [ $IS_OAI_LICENCE_PRESENT -eq 0 ] && [ $IS_BSD_LICENCE_PRESENT -eq 0 ]
|
||||
if [ $IS_OAI_LICENCE_PRESENT -eq 0 ] && [ $IS_BSD_LICENCE_PRESENT -eq 0 ] && [ $IS_MIT_LICENCE_PRESENT -eq 0 ]
|
||||
then
|
||||
if [ $IS_NFAPI -eq 0 ] && [ $IS_EXCEPTION -eq 0 ]
|
||||
then
|
||||
@@ -184,8 +185,9 @@ do
|
||||
IS_NFAPI=`echo $FULLFILE | egrep -c "nfapi/open-nFAPI|nfapi/oai_integration/vendor_ext" || true`
|
||||
IS_OAI_LICENCE_PRESENT=`egrep -c "OAI Public License" $FULLFILE || true`
|
||||
IS_BSD_LICENCE_PRESENT=`egrep -c "the terms of the BSD Licence|License-Identifier: BSD-2-Clause" $FULLFILE || true`
|
||||
IS_MIT_LICENCE_PRESENT=`egrep -c "MIT License" $FULLFILE || true`
|
||||
IS_EXCEPTION=`echo $FULLFILE | egrep -c "common/utils/collection/tree.h|common/utils/collection/queue.h|openair2/UTIL/OPT/packet-rohc.h|openair3/NAS/COMMON/milenage.h|openair1/PHY/CODING/crc.h|openair1/PHY/CODING/crcext.h|openair1/PHY/CODING/types.h|openair1/PHY/CODING/nrLDPC_decoder/nrLDPC_decoder_offload.c|openair1/PHY/CODING/nrLDPC_decoder/nrLDPC_offload.h" || true`
|
||||
if [ $IS_OAI_LICENCE_PRESENT -eq 0 ] && [ $IS_BSD_LICENCE_PRESENT -eq 0 ]
|
||||
if [ $IS_OAI_LICENCE_PRESENT -eq 0 ] && [ $IS_BSD_LICENCE_PRESENT -eq 0 ] && [ $IS_MIT_LICENCE_PRESENT -eq 0 ]
|
||||
then
|
||||
if [ $IS_NFAPI -eq 0 ] && [ $IS_EXCEPTION -eq 0 ]
|
||||
then
|
||||
|
||||
@@ -9,12 +9,21 @@ idefix:
|
||||
MTU: 1500
|
||||
Trace: True
|
||||
LogStore: /media/usb-drive/ci_qlogs
|
||||
nrmodule2_quectel:
|
||||
Host: nrmodule2
|
||||
InitScript: sudo stdbuf -oL /home/nrmodule2/quectel-CM/quectel-CM -4 -s oai.ipv4 &> /tmp/quecel-cm.log &
|
||||
|
||||
up2:
|
||||
Host: up2
|
||||
AttachScript: sudo /opt/mbim/start_quectel_mbim.sh
|
||||
DetachScript: sudo /opt/mbim/stop_quectel_mbim.sh
|
||||
NetworkScript: ip a show dev wwan0
|
||||
IF: wwan0
|
||||
MTU: 1500
|
||||
|
||||
sphex_quectel:
|
||||
Host: sphex
|
||||
InitScript: sudo stdbuf -oL /home/oaicicd/quectel-CM/quectel-CM -4 -s oai.ipv4 &> /tmp/quecel-cm.log &
|
||||
TermScript: sudo -S killall --signal SIGKILL quectel-CM
|
||||
AttachScript: sudo python3 ci_ctl_qtel.py /dev/ttyUSB2 wup
|
||||
DetachScript: sudo python3 ci_ctl_qtel.py /dev/ttyUSB2 detach
|
||||
AttachScript: sudo python3 ci_ctl_qtel.py /dev/ttyUSB3 wup
|
||||
DetachScript: sudo python3 ci_ctl_qtel.py /dev/ttyUSB3 detach
|
||||
NetworkScript: ip a show dev wwan0
|
||||
IF: wwan0
|
||||
MTU: 1500
|
||||
@@ -121,6 +130,48 @@ amarisoft_ue_10:
|
||||
NetworkScript: ip netns exec ue10 ip a show dev pdn0
|
||||
CmdPrefix: ip netns exec ue10
|
||||
MTU: 1500
|
||||
amarisoft_ue_11:
|
||||
Host: amariue
|
||||
AttachScript: /root/2023-10-27/libs/ws.js 127.0.0.1:9002 '{"message":"power_on","ue_id":11}'
|
||||
DetachScript: /root/2023-10-27/libs/ws.js 127.0.0.1:9002 '{"message":"power_off","ue_id":11}'
|
||||
NetworkScript: ip netns exec ue11 ip a show dev pdn0
|
||||
CmdPrefix: ip netns exec ue11
|
||||
MTU: 1500
|
||||
amarisoft_ue_12:
|
||||
Host: amariue
|
||||
AttachScript: /root/2023-10-27/libs/ws.js 127.0.0.1:9002 '{"message":"power_on","ue_id":12}'
|
||||
DetachScript: /root/2023-10-27/libs/ws.js 127.0.0.1:9002 '{"message":"power_off","ue_id":12}'
|
||||
NetworkScript: ip netns exec ue12 ip a show dev pdn0
|
||||
CmdPrefix: ip netns exec ue12
|
||||
MTU: 1500
|
||||
amarisoft_ue_13:
|
||||
Host: amariue
|
||||
AttachScript: /root/2023-10-27/libs/ws.js 127.0.0.1:9002 '{"message":"power_on","ue_id":13}'
|
||||
DetachScript: /root/2023-10-27/libs/ws.js 127.0.0.1:9002 '{"message":"power_off","ue_id":13}'
|
||||
NetworkScript: ip netns exec ue13 ip a show dev pdn0
|
||||
CmdPrefix: ip netns exec ue13
|
||||
MTU: 1500
|
||||
amarisoft_ue_14:
|
||||
Host: amariue
|
||||
AttachScript: /root/2023-10-27/libs/ws.js 127.0.0.1:9002 '{"message":"power_on","ue_id":14}'
|
||||
DetachScript: /root/2023-10-27/libs/ws.js 127.0.0.1:9002 '{"message":"power_off","ue_id":14}'
|
||||
NetworkScript: ip netns exec ue14 ip a show dev pdn0
|
||||
CmdPrefix: ip netns exec ue14
|
||||
MTU: 1500
|
||||
amarisoft_ue_15:
|
||||
Host: amariue
|
||||
AttachScript: /root/2023-10-27/libs/ws.js 127.0.0.1:9002 '{"message":"power_on","ue_id":15}'
|
||||
DetachScript: /root/2023-10-27/libs/ws.js 127.0.0.1:9002 '{"message":"power_off","ue_id":15}'
|
||||
NetworkScript: ip netns exec ue15 ip a show dev pdn0
|
||||
CmdPrefix: ip netns exec ue15
|
||||
MTU: 1500
|
||||
amarisoft_ue_16:
|
||||
Host: amariue
|
||||
AttachScript: /root/2023-10-27/libs/ws.js 127.0.0.1:9002 '{"message":"power_on","ue_id":16}'
|
||||
DetachScript: /root/2023-10-27/libs/ws.js 127.0.0.1:9002 '{"message":"power_off","ue_id":16}'
|
||||
NetworkScript: ip netns exec ue16 ip a show dev pdn0
|
||||
CmdPrefix: ip netns exec ue16
|
||||
MTU: 1500
|
||||
|
||||
oai_ue_caracal:
|
||||
Host: caracal
|
||||
|
||||
@@ -274,6 +274,11 @@ class Cluster:
|
||||
if result is not None:
|
||||
forceBaseImageBuild = True
|
||||
baseTag = 'ci-temp'
|
||||
# if the branch name contains integration_20xx_wyy, let rebuild ran-base
|
||||
result = re.search('integration_20([0-9]{2})_w([0-9]{2})', self.ranBranch)
|
||||
if not forceBaseImageBuild and result is not None:
|
||||
forceBaseImageBuild = True
|
||||
baseTag = 'ci-temp'
|
||||
else:
|
||||
imageTag = f'develop-{self.ranCommitID[0:8]}'
|
||||
forceBaseImageBuild = True
|
||||
|
||||
@@ -86,6 +86,12 @@ class Cmd(metaclass=abc.ABCMeta):
|
||||
return
|
||||
|
||||
class LocalCmd(Cmd):
|
||||
def __enter__(self):
|
||||
return self
|
||||
|
||||
def __exit__(self, exc_type, exc_value, exc_traceback):
|
||||
self.close()
|
||||
|
||||
def __init__(self, d = None):
|
||||
self.cwd = d
|
||||
if self.cwd is not None:
|
||||
@@ -122,12 +128,40 @@ class LocalCmd(Cmd):
|
||||
if src[0] != '/' or tgt[0] != '/':
|
||||
raise Exception('support only absolute file paths!')
|
||||
opt = '-r' if recursive else ''
|
||||
self.run(f'cp {opt} {src} {tgt}')
|
||||
return self.run(f'cp {opt} {src} {tgt}').returncode == 0
|
||||
|
||||
def copyout(self, src, tgt, recursive=False):
|
||||
self.copyin(src, tgt, recursive)
|
||||
return self.copyin(src, tgt, recursive)
|
||||
|
||||
def PutFile(client, src, tgt):
|
||||
success = True
|
||||
sftp = client.open_sftp()
|
||||
try:
|
||||
sftp.put(src, tgt)
|
||||
except FileNotFoundError as error:
|
||||
logging.error(f"error while putting {src}: {error}")
|
||||
success = False
|
||||
sftp.close()
|
||||
return success
|
||||
|
||||
def GetFile(client, src, tgt):
|
||||
success = True
|
||||
sftp = client.open_sftp()
|
||||
try:
|
||||
sftp.get(src, tgt)
|
||||
except FileNotFoundError as error:
|
||||
logging.error(f"error while getting {src}: {error}")
|
||||
success = False
|
||||
sftp.close()
|
||||
return success
|
||||
|
||||
class RemoteCmd(Cmd):
|
||||
def __enter__(self):
|
||||
return self
|
||||
|
||||
def __exit__(self, exc_type, exc_value, exc_traceback):
|
||||
self.close()
|
||||
|
||||
def __init__(self, hostname, d=None):
|
||||
cIdx = 0
|
||||
logging.getLogger('paramiko').setLevel(logging.ERROR) # prevent spamming through Paramiko
|
||||
@@ -193,36 +227,38 @@ class RemoteCmd(Cmd):
|
||||
def getBefore(self):
|
||||
return self.cp.stdout
|
||||
|
||||
# if recursive is True, tgt must be a directory (and src is file or directory)
|
||||
# if recursive is False, tgt and src must be a file name
|
||||
def copyout(self, src, tgt, recursive=False):
|
||||
logging.debug(f"copyout: local:{src} -> remote:{tgt}")
|
||||
if recursive:
|
||||
tmpfile = f"{uuid.uuid4()}.tar"
|
||||
abstmpfile = f"/tmp/{tmpfile}"
|
||||
cmd = LocalCmd()
|
||||
cmd.run(f"tar -cf {abstmpfile} {src}")
|
||||
sftp = self.client.open_sftp()
|
||||
sftp.put(abstmpfile, abstmpfile)
|
||||
sftp.close()
|
||||
cmd.run(f"rm {abstmpfile}")
|
||||
self.run(f"mv {abstmpfile} {tgt}; cd {tgt} && tar -xf {tmpfile} && rm {tmpfile}")
|
||||
with LocalCmd() as cmd:
|
||||
if cmd.run(f"tar -cf {abstmpfile} {src}").returncode != 0:
|
||||
return False
|
||||
if not PutFile(self.client, abstmpfile, abstmpfile):
|
||||
return False
|
||||
cmd.run(f"rm {abstmpfile}")
|
||||
ret = self.run(f"mv {abstmpfile} {tgt}; cd {tgt} && tar -xf {tmpfile} && rm {tmpfile}")
|
||||
return ret.returncode == 0
|
||||
else:
|
||||
sftp = self.client.open_sftp()
|
||||
sftp.put(src, tgt)
|
||||
sftp.close()
|
||||
return PutFile(self.client, src, tgt)
|
||||
|
||||
# if recursive is True, tgt must be a directory (and src is file or directory)
|
||||
# if recursive is False, tgt and src must be a file name
|
||||
def copyin(self, src, tgt, recursive=False):
|
||||
logging.debug(f"copyin: remote:{src} -> local:{tgt}")
|
||||
if recursive:
|
||||
tmpfile = f"{uuid.uuid4()}.tar"
|
||||
abstmpfile = f"/tmp/{tmpfile}"
|
||||
self.run(f"tar -cf {abstmpfile} {src}")
|
||||
sftp = self.client.open_sftp()
|
||||
sftp.get(abstmpfile, abstmpfile)
|
||||
sftp.close()
|
||||
if self.run(f"tar -cf {abstmpfile} {src}").returncode != 0:
|
||||
return False
|
||||
if not GetFile(self.client, abstmpfile, abstmpfile):
|
||||
return False
|
||||
self.run(f"rm {abstmpfile}")
|
||||
cmd = LocalCmd()
|
||||
cmd.run(f"mv {abstmpfile} {tgt}; cd {tgt} && tar -xf {tmpfile} && rm {tmpfile}")
|
||||
with LocalCmd() as cmd:
|
||||
ret = cmd.run(f"mv {abstmpfile} {tgt}; cd {tgt} && tar -xf {tmpfile} && rm {tmpfile}")
|
||||
return ret.returncode == 0
|
||||
else:
|
||||
sftp = self.client.open_sftp()
|
||||
sftp.get(src, tgt)
|
||||
sftp.close()
|
||||
return GetFile(self.client, src, tgt)
|
||||
|
||||
@@ -58,7 +58,7 @@ import cls_oaicitest
|
||||
# Helper functions used here and in other classes
|
||||
# (e.g., cls_cluster.py)
|
||||
#-----------------------------------------------------------
|
||||
IMAGES = ['oai-enb', 'oai-lte-ru', 'oai-lte-ue', 'oai-gnb', 'oai-nr-cuup', 'oai-gnb-aw2s', 'oai-nr-ue', 'oai-gnb-asan', 'oai-nr-ue-asan', 'oai-nr-cuup-asan']
|
||||
IMAGES = ['oai-enb', 'oai-lte-ru', 'oai-lte-ue', 'oai-gnb', 'oai-nr-cuup', 'oai-gnb-aw2s', 'oai-nr-ue', 'oai-gnb-asan', 'oai-nr-ue-asan', 'oai-nr-cuup-asan', 'oai-gnb-aerial']
|
||||
|
||||
def CreateWorkspace(sshSession, sourcePath, ranRepository, ranCommitID, ranTargetBranch, ranAllowMerge):
|
||||
if ranCommitID == '':
|
||||
@@ -383,6 +383,7 @@ class Containerize():
|
||||
imageNames.append(('oai-physim', 'phySim', 'oai-physim', ''))
|
||||
if self.host == 'Ubuntu':
|
||||
imageNames.append(('oai-lte-ru', 'lteRU', 'oai-lte-ru', ''))
|
||||
imageNames.append(('oai-gnb-aerial', 'gNB.aerial', 'oai-gnb-aerial', ''))
|
||||
# Building again the 5G images with Address Sanitizer
|
||||
imageNames.append(('ran-build', 'build', 'ran-build-asan', '--build-arg "BUILD_OPTION=--sanitize"'))
|
||||
imageNames.append(('oai-gnb', 'gNB', 'oai-gnb-asan', '--build-arg "BUILD_OPTION=--sanitize"'))
|
||||
@@ -419,6 +420,11 @@ class Containerize():
|
||||
if result is not None:
|
||||
forceBaseImageBuild = True
|
||||
baseTag = 'ci-temp'
|
||||
# if the branch name contains integration_20xx_wyy, let rebuild ran-base
|
||||
result = re.search('integration_20([0-9]{2})_w([0-9]{2})', self.ranBranch)
|
||||
if not forceBaseImageBuild and result is not None:
|
||||
forceBaseImageBuild = True
|
||||
baseTag = 'ci-temp'
|
||||
else:
|
||||
forceBaseImageBuild = True
|
||||
|
||||
@@ -475,7 +481,11 @@ class Containerize():
|
||||
cmd.run(f'sed -i -e "s#ran-build:latest#ran-build-asan:{imageTag}#" docker/Dockerfile.{pattern}{self.dockerfileprefix}')
|
||||
elif image != 'ran-build':
|
||||
cmd.run(f'sed -i -e "s#ran-build:latest#ran-build:{imageTag}#" docker/Dockerfile.{pattern}{self.dockerfileprefix}')
|
||||
if image == 'oai-gnb-aerial':
|
||||
cmd.run('cp -f /opt/nvidia-ipc/nvipc_src.2023.11.28.tar.gz .')
|
||||
ret = cmd.run(f'{self.cli} build {self.cliBuildOptions} --target {image} --tag {name}:{imageTag} --file docker/Dockerfile.{pattern}{self.dockerfileprefix} {option} . > cmake_targets/log/{name}.log 2>&1', timeout=1200)
|
||||
if image == 'oai-gnb-aerial':
|
||||
cmd.run('rm -f nvipc_src.2023.11.28.tar.gz')
|
||||
if image == 'ran-build' and ret.returncode == 0:
|
||||
cmd.run(f"docker run --name test-log -d {name}:{imageTag} /bin/true")
|
||||
cmd.run(f"docker cp test-log:/oai-ran/cmake_targets/log/ cmake_targets/log/{name}/")
|
||||
@@ -507,9 +517,13 @@ class Containerize():
|
||||
# Remove all intermediate build images and clean up
|
||||
cmd.run(f"{self.cli} image rm ran-build:{imageTag} ran-build-asan:{imageTag}")
|
||||
cmd.run(f"{self.cli} volume prune --force")
|
||||
# Remove any cached artifacts: we don't use the cache for now, prevent
|
||||
# out of diskspace problem
|
||||
cmd.run(f"{self.cli} buildx prune --filter=until=6h --force")
|
||||
|
||||
# Remove some cached artifacts to prevent out of diskspace problem
|
||||
logging.debug(cmd.run("df -h").stdout)
|
||||
logging.debug(cmd.run("docker system df").stdout)
|
||||
cmd.run(f"{self.cli} buildx prune --filter until=1h --force")
|
||||
logging.debug(cmd.run("df -h").stdout)
|
||||
logging.debug(cmd.run("docker system df").stdout)
|
||||
|
||||
# create a zip with all logs
|
||||
build_log_name = f'build_log_{self.testCase_id}'
|
||||
@@ -657,22 +671,26 @@ class Containerize():
|
||||
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())
|
||||
# Cleaning any created tmp volume
|
||||
mySSH.command(self.cli + ' volume prune --force || true','\$', 15)
|
||||
mySSH.close()
|
||||
|
||||
allImagesSize = {}
|
||||
if result is not None:
|
||||
imageSize = float(result.group('size')) / 1000000
|
||||
logging.debug('\u001B[1m proxy size is ' + ('%.0f' % imageSize) + ' Mbytes\u001B[0m')
|
||||
allImagesSize['proxy'] = str(round(imageSize,1)) + ' Mbytes'
|
||||
logging.info('\u001B[1m Building L2sim Proxy Image Pass\u001B[0m')
|
||||
HTML.CreateHtmlTestRow('commit ' + tag, 'OK', CONST.ALL_PROCESSES_OK)
|
||||
HTML.CreateHtmlNextTabHeaderTestRow(collectInfo, allImagesSize)
|
||||
return True
|
||||
else:
|
||||
logging.debug('proxy size is unknown')
|
||||
logging.error('proxy size is unknown')
|
||||
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(collectInfo, allImagesSize)
|
||||
logging.error('\u001B[1m Build of L2sim proxy failed\u001B[0m')
|
||||
HTML.CreateHtmlTestRow('commit ' + tag, 'KO', CONST.ALL_PROCESSES_OK)
|
||||
HTML.CreateHtmlTabFooter(False)
|
||||
return False
|
||||
|
||||
def BuildRunTests(self, HTML):
|
||||
if self.ranRepository == '' or self.ranBranch == '' or self.ranCommitID == '':
|
||||
@@ -946,12 +964,12 @@ class Containerize():
|
||||
if svcName == '':
|
||||
logging.warning('no service name given: starting all services in ci-docker-compose.yml!')
|
||||
|
||||
mySSH.command(f'docker-compose --file ci-docker-compose.yml up -d -- {svcName}', '\$', 30)
|
||||
mySSH.command(f'docker compose --file ci-docker-compose.yml up -d -- {svcName}', '\$', 30)
|
||||
|
||||
# Checking Status
|
||||
grep = ''
|
||||
if svcName != '': grep = f' | grep -A3 {svcName}'
|
||||
mySSH.command(f'docker-compose --file ci-docker-compose.yml config {grep}', '\$', 5)
|
||||
if svcName != '': grep = f' | grep -A3 --color=never {svcName}'
|
||||
mySSH.command(f'docker compose --file ci-docker-compose.yml config {grep}', '\$', 5)
|
||||
result = re.search('container_name: (?P<container_name>[a-zA-Z0-9\-\_]+)', mySSH.getBefore())
|
||||
unhealthyNb = 0
|
||||
healthyNb = 0
|
||||
@@ -999,8 +1017,8 @@ class Containerize():
|
||||
if healthyNb == 1:
|
||||
cnt = 0
|
||||
while (cnt < 20):
|
||||
mySSH.command('docker logs ' + containerName + ' | egrep --text --color=never -i "wait|sync|Starting"', '\$', 30)
|
||||
result = re.search('got sync|Starting E1AP at CU UP|Starting F1AP at CU|Got sync|Waiting for RUs to be configured', mySSH.getBefore())
|
||||
mySSH.command('docker logs ' + containerName + ' | egrep --text --color=never -i "wait|sync|Starting|ready"', '\$', 30)
|
||||
result = re.search('got sync|Starting E1AP at CU UP|Starting F1AP at CU|Got sync|Waiting for RUs to be configured|cuPHYController initialized|Received CONFIG.response, gNB is ready', mySSH.getBefore())
|
||||
if result is None:
|
||||
time.sleep(6)
|
||||
cnt += 1
|
||||
@@ -1053,78 +1071,80 @@ class Containerize():
|
||||
if lIpAddr == '' or lUserName == '' or lPassWord == '' or lSourcePath == '':
|
||||
HELP.GenericHelp(CONST.Version)
|
||||
sys.exit('Insufficient Parameter')
|
||||
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)
|
||||
|
||||
logging.debug(f'\u001B[1m Undeploying OAI Object from server: {lIpAddr}\u001B[0m')
|
||||
mySSH = cls_cmd.getConnection(lIpAddr)
|
||||
yamlDir = f'{lSourcePath}/{self.yamlPath[self.eNB_instance]}'
|
||||
mySSH.run(f'cd {yamlDir}')
|
||||
svcName = self.services[self.eNB_instance]
|
||||
forceDown = False
|
||||
if svcName != '':
|
||||
logging.warning(f'service name given, but will stop all services in ci-docker-compose.yml!')
|
||||
svcName = ''
|
||||
|
||||
mySSH.command(f'docker-compose -f ci-docker-compose.yml config --services', '\$', 5)
|
||||
ret = mySSH.run(f'docker compose -f {yamlDir}/ci-docker-compose.yml config --services')
|
||||
if ret.returncode != 0:
|
||||
HTML.CreateHtmlTestRow(RAN.runtime_stats, 'KO', "cannot enumerate running services")
|
||||
self.exitStatus = 1
|
||||
return
|
||||
# first line has command, last line has next command prompt
|
||||
allServices = mySSH.getBefore().split('\r\n')[1:-1]
|
||||
allServices = ret.stdout.splitlines()
|
||||
services = []
|
||||
for s in allServices:
|
||||
mySSH.command(f'docker-compose -f ci-docker-compose.yml ps --all -- {s}', '\$', 5, silent=False)
|
||||
running = mySSH.getBefore().split('\r\n')[2:-1]
|
||||
# outputs the hash if the container is running
|
||||
ret = mySSH.run(f'docker compose -f {yamlDir}/ci-docker-compose.yml ps --all --quiet -- {s}')
|
||||
running = ret.stdout.splitlines()
|
||||
logging.debug(f'running services: {running}')
|
||||
if len(running) > 0: # something is running for that service
|
||||
if ret.stdout != "" and ret.returncode == 0: # something is running for that service
|
||||
services.append(s)
|
||||
logging.info(f'stopping services {services}')
|
||||
|
||||
mySSH.command(f'docker-compose -f ci-docker-compose.yml stop -t3', '\$', 30)
|
||||
time.sleep(5) # give some time to running containers to stop
|
||||
mySSH.run(f'docker compose -f {yamlDir}/ci-docker-compose.yml stop -t3')
|
||||
copyin_res = True
|
||||
for svcName in services:
|
||||
# head -n -1 suppresses the final "X exited with status code Y"
|
||||
filename = f'{svcName}-{HTML.testCase_id}.log'
|
||||
mySSH.command(f'docker-compose -f ci-docker-compose.yml logs --no-log-prefix -- {svcName} &> {lSourcePath}/cmake_targets/log/{filename}', '\$', 120)
|
||||
mySSH.run(f'docker compose -f {yamlDir}/ci-docker-compose.yml logs --no-log-prefix -- {svcName} &> {lSourcePath}/cmake_targets/log/{filename}')
|
||||
copyin_res = mySSH.copyin(f'{lSourcePath}/cmake_targets/log/{filename}', f'{filename}') and copyin_res
|
||||
|
||||
mySSH.command('docker-compose -f ci-docker-compose.yml down -v', '\$', 5)
|
||||
mySSH.close()
|
||||
mySSH.run(f'docker compose -f {yamlDir}/ci-docker-compose.yml down -v')
|
||||
|
||||
# Analyzing log file!
|
||||
files = ','.join([f'{s}-{HTML.testCase_id}' for s in services])
|
||||
if len(services) > 1:
|
||||
files = '{' + files + '}'
|
||||
copyin_res = 0
|
||||
if len(services) > 0:
|
||||
copyin_res = mySSH.copyin(lIpAddr, lUserName, lPassWord, f'{lSourcePath}/cmake_targets/log/{files}.log', '.')
|
||||
if copyin_res == -1:
|
||||
HTML.htmleNBFailureMsg='Could not copy logfile to analyze it!'
|
||||
if not copyin_res:
|
||||
HTML.htmleNBFailureMsg='Could not copy logfile(s) to analyze it!'
|
||||
HTML.CreateHtmlTestRow('N/A', 'KO', CONST.ENB_PROCESS_NOLOGFILE_TO_ANALYZE)
|
||||
self.exitStatus = 1
|
||||
# use function for UE log analysis, when oai-nr-ue container is used
|
||||
elif 'oai-nr-ue' in services or 'lte_ue0' in services:
|
||||
self.exitStatus == 0
|
||||
logging.debug('\u001B[1m Analyzing UE logfile ' + filename + ' \u001B[0m')
|
||||
logging.debug(f'Analyzing UE logfile {filename}')
|
||||
logStatus = cls_oaicitest.OaiCiTest().AnalyzeLogFile_UE(f'{filename}', HTML, RAN)
|
||||
if (logStatus < 0):
|
||||
fullStatus = False
|
||||
HTML.CreateHtmlTestRow('UE log Analysis', 'KO', logStatus)
|
||||
self.exitStatus = 1
|
||||
else:
|
||||
HTML.CreateHtmlTestRow('UE log Analysis', 'OK', CONST.ALL_PROCESSES_OK)
|
||||
else:
|
||||
for svcName in services:
|
||||
filename = f'{svcName}-{HTML.testCase_id}.log'
|
||||
logging.debug(f'\u001B[1m Analyzing logfile {filename}\u001B[0m')
|
||||
logStatus = RAN.AnalyzeLogFile_eNB(filename, HTML, self.ran_checkers)
|
||||
if (logStatus < 0):
|
||||
HTML.CreateHtmlTestRow(RAN.runtime_stats, 'KO', logStatus)
|
||||
self.exitStatus = 1
|
||||
if svcName == 'nv-cubb':
|
||||
msg = 'Undeploy PNF/Nvidia CUBB'
|
||||
HTML.CreateHtmlTestRow(msg, 'OK', CONST.ALL_PROCESSES_OK)
|
||||
else:
|
||||
HTML.CreateHtmlTestRow(RAN.runtime_stats, 'OK', CONST.ALL_PROCESSES_OK)
|
||||
filename = f'{svcName}-{HTML.testCase_id}.log'
|
||||
logging.debug(f'\u001B[1m Analyzing logfile {filename}\u001B[0m')
|
||||
logStatus = RAN.AnalyzeLogFile_eNB(filename, HTML, self.ran_checkers)
|
||||
if (logStatus < 0):
|
||||
HTML.CreateHtmlTestRow(RAN.runtime_stats, 'KO', logStatus)
|
||||
self.exitStatus = 1
|
||||
else:
|
||||
HTML.CreateHtmlTestRow(RAN.runtime_stats, 'OK', CONST.ALL_PROCESSES_OK)
|
||||
# all the xNB run logs shall be on the server 0 for logCollecting
|
||||
if self.eNB_serverId[self.eNB_instance] != '0':
|
||||
mySSH.copyout(self.eNBIPAddress, self.eNBUserName, self.eNBPassword, f'./{files}.log', f'{self.eNBSourceCodePath}/cmake_targets/')
|
||||
mySSH.copyout(f'./*.log', f'{lSourcePath}/cmake_targets/', recursive=True)
|
||||
if self.exitStatus == 0:
|
||||
logging.info('\u001B[1m Undeploying OAI Object Pass\u001B[0m')
|
||||
else:
|
||||
logging.error('\u001B[1m Undeploying OAI Object Failed\u001B[0m')
|
||||
mySSH.close()
|
||||
|
||||
def DeployGenObject(self, HTML, RAN, UE):
|
||||
self.exitStatus = 0
|
||||
@@ -1375,6 +1395,7 @@ class Containerize():
|
||||
logStatus = UE.AnalyzeLogFile_UE(f'{logPath}/{filename}', HTML, RAN)
|
||||
if (logStatus < 0):
|
||||
fullStatus = False
|
||||
self.exitStatus = 1
|
||||
HTML.CreateHtmlTestRow('UE log Analysis', 'KO', logStatus)
|
||||
else:
|
||||
HTML.CreateHtmlTestRow('UE log Analysis', 'OK', CONST.ALL_PROCESSES_OK)
|
||||
|
||||
@@ -437,13 +437,19 @@ class HTMLManagement():
|
||||
|
||||
for k in DataLog['Data']:
|
||||
# TestRow
|
||||
avg = DataLog['Data'][k][0]
|
||||
maxval = DataLog['Data'][k][1]
|
||||
count = DataLog['Data'][k][2]
|
||||
valnorm = float(DataLog['Data'][k][3])
|
||||
dev = DataLog['DeviationThreshold'][k]
|
||||
ref = DataLog['Ref'][k]
|
||||
self.htmlFile.write(' <tr>\n')
|
||||
self.htmlFile.write(' <td colspan="3" bgcolor = "lightcyan" >' + k + ' </td>\n')
|
||||
self.htmlFile.write(' <td colspan="2" bgcolor = "lightcyan" >' + DataLog['Data'][k][0] + '; ' + DataLog['Data'][k][1] + '; ' + DataLog['Data'][k][2] + ' </td>\n')
|
||||
if float(DataLog['Data'][k][3])> DataLog['Threshold'][k]:
|
||||
self.htmlFile.write(' <th bgcolor = "red" >' + DataLog['Data'][k][3] + ' (Ref = ' + str(DataLog['Ref'][k]) + ' ; Thres = ' +str(DataLog['Threshold'][k])+') ' + '</th>\n')
|
||||
self.htmlFile.write(f' <td colspan="2" bgcolor = "lightcyan" >{avg}; {maxval}; {count}</td>\n')
|
||||
if valnorm > 1.0 + dev or valnorm < 1.0 - dev:
|
||||
self.htmlFile.write(f' <th bgcolor = "red" >{valnorm} (Avg over Ref = {avg} over {ref}; max allowed deviation = {dev})</th>\n')
|
||||
else:
|
||||
self.htmlFile.write(' <th bgcolor = "green" ><font color="white">' + DataLog['Data'][k][3] + ' (Ref = ' + str(DataLog['Ref'][k]) + ' ; Thres = ' +str(DataLog['Threshold'][k])+') ' + '</th>\n')
|
||||
self.htmlFile.write(f' <th bgcolor = "green" ><font color="white">{valnorm} (Avg over Ref = {avg} over {ref}; max allowed deviation = {dev})</font></th>\n')
|
||||
self.htmlFile.write(' </tr>\n')
|
||||
self.htmlFile.close()
|
||||
|
||||
|
||||
@@ -171,7 +171,6 @@ MACRLCs = (
|
||||
remote_n_portd = 2153;
|
||||
pusch_TargetSNRx10 = 200;
|
||||
pucch_TargetSNRx10 = 200;
|
||||
ulsch_max_frame_inactivity = 1;
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
@@ -178,7 +178,6 @@ MACRLCs = (
|
||||
remote_n_portd = 2153;
|
||||
pusch_TargetSNRx10 = 200;
|
||||
pucch_TargetSNRx10 = 200;
|
||||
ulsch_max_frame_inactivity = 1;
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
262
ci-scripts/conf_files/gnb-vnf.sa.band78.273prb.aerial.conf
Normal file
262
ci-scripts/conf_files/gnb-vnf.sa.band78.273prb.aerial.conf
Normal file
@@ -0,0 +1,262 @@
|
||||
Active_gNBs = ( "gNB-OAI");
|
||||
# Asn1_verbosity, choice in: none, info, annoying
|
||||
Asn1_verbosity = "none";
|
||||
|
||||
sa = 1;
|
||||
nfapi = "AERIAL";
|
||||
|
||||
gNBs =
|
||||
(
|
||||
{
|
||||
////////// Identification parameters:
|
||||
gNB_ID = 0xe00;
|
||||
gNB_name = "gNB-OAI";
|
||||
|
||||
// Tracking area code, 0x0000 and 0xfffe are reserved values
|
||||
tracking_area_code = 1;
|
||||
plmn_list = ({
|
||||
mcc = 208;
|
||||
mnc = 97;
|
||||
mnc_length = 2;
|
||||
snssaiList = (
|
||||
{
|
||||
sst = 1;
|
||||
}
|
||||
);
|
||||
});
|
||||
|
||||
nr_cellid = 12345678L;
|
||||
|
||||
////////// Physical parameters:
|
||||
|
||||
pdsch_AntennaPorts_XP = 2;
|
||||
pusch_AntennaPorts = 2;
|
||||
do_CSIRS = 1;
|
||||
do_SRS = 0;
|
||||
min_rxtxtime = 2;
|
||||
|
||||
pdcch_ConfigSIB1 = (
|
||||
{
|
||||
controlResourceSetZero = 12;
|
||||
searchSpaceZero = 0;
|
||||
}
|
||||
);
|
||||
|
||||
servingCellConfigCommon = (
|
||||
{
|
||||
#spCellConfigCommon
|
||||
|
||||
physCellId = 0;
|
||||
|
||||
# downlinkConfigCommon
|
||||
#frequencyInfoDL
|
||||
# this is 3300.24 + 134*12*30e3 = 3348.48 MHz (5G NR GSCN: 7741)
|
||||
absoluteFrequencySSB = 649920;
|
||||
#652860; #should be 649920
|
||||
#647520;
|
||||
#647540;
|
||||
#649920;
|
||||
#650208;
|
||||
#647540;
|
||||
dl_frequencyBand = 78;
|
||||
# this is 3300.24 MHz
|
||||
dl_absoluteFrequencyPointA = 646724;
|
||||
#649104;
|
||||
#646724;
|
||||
#scs-SpecificCarrierList
|
||||
dl_offstToCarrier = 0;
|
||||
# subcarrierSpacing
|
||||
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
|
||||
dl_subcarrierSpacing = 1;
|
||||
dl_carrierBandwidth = 273;
|
||||
#initialDownlinkBWP
|
||||
#genericParameters
|
||||
# this is RBstart=0,L=162 (275*(275-L+1))+(274-RBstart))
|
||||
initialDLBWPlocationAndBandwidth = 1099;
|
||||
#
|
||||
# subcarrierSpacing
|
||||
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
|
||||
initialDLBWPsubcarrierSpacing = 1;
|
||||
#pdcch-ConfigCommon
|
||||
initialDLBWPcontrolResourceSetZero = 12;
|
||||
initialDLBWPsearchSpaceZero = 0;
|
||||
|
||||
#uplinkConfigCommon
|
||||
#frequencyInfoUL
|
||||
ul_frequencyBand = 78;
|
||||
#scs-SpecificCarrierList
|
||||
ul_offstToCarrier = 0;
|
||||
# subcarrierSpacing
|
||||
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
|
||||
ul_subcarrierSpacing = 1;
|
||||
ul_carrierBandwidth = 273;
|
||||
pMax = 20;
|
||||
#initialUplinkBWP
|
||||
#genericParameters
|
||||
initialULBWPlocationAndBandwidth = 1099;
|
||||
# subcarrierSpacing
|
||||
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
|
||||
initialULBWPsubcarrierSpacing = 1;
|
||||
#rach-ConfigCommon
|
||||
#rach-ConfigGeneric
|
||||
prach_ConfigurationIndex = 159;# testMAC 158; OAI gNB 98
|
||||
#prach_msg1_FDM
|
||||
#0 = one, 1=two, 2=four, 3=eight
|
||||
prach_msg1_FDM = 0;
|
||||
prach_msg1_FrequencyStart = 0;
|
||||
zeroCorrelationZoneConfig = 12;
|
||||
preambleReceivedTargetPower = -96;
|
||||
#preamblTransMax (0...10) = (3,4,5,6,7,8,10,20,50,100,200)
|
||||
preambleTransMax = 6;
|
||||
#powerRampingStep
|
||||
# 0=dB0,1=dB2,2=dB4,3=dB6
|
||||
powerRampingStep = 1;
|
||||
#ra_ReponseWindow
|
||||
#1,2,4,8,10,20,40,80
|
||||
ra_ResponseWindow = 5;
|
||||
#ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR
|
||||
#1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen
|
||||
ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 3;
|
||||
#oneHalf (0..15) 4,8,12,16,...60,64
|
||||
ssb_perRACH_OccasionAndCB_PreamblesPerSSB = 15;
|
||||
#ra_ContentionResolutionTimer
|
||||
#(0..7) 8,16,24,32,40,48,56,64
|
||||
ra_ContentionResolutionTimer = 7;
|
||||
rsrp_ThresholdSSB = 19;
|
||||
#prach-RootSequenceIndex_PR
|
||||
#1 = 839, 2 = 139
|
||||
prach_RootSequenceIndex_PR = 2;
|
||||
prach_RootSequenceIndex = 1;
|
||||
# SCS for msg1, can only be 15 for 30 kHz < 6 GHz, takes precendence over the one derived from prach-ConfigIndex
|
||||
#
|
||||
msg1_SubcarrierSpacing = 1,
|
||||
# restrictedSetConfig
|
||||
# 0=unrestricted, 1=restricted type A, 2=restricted type B
|
||||
restrictedSetConfig = 0,
|
||||
|
||||
msg3_DeltaPreamble = 1;
|
||||
p0_NominalWithGrant = -90;
|
||||
|
||||
# pucch-ConfigCommon setup :
|
||||
# pucchGroupHopping
|
||||
# 0 = neither, 1= group hopping, 2=sequence hopping
|
||||
pucchGroupHopping = 0;
|
||||
hoppingId = 40;
|
||||
p0_nominal = -90;
|
||||
# ssb_PositionsInBurs_BitmapPR
|
||||
# 1=short, 2=medium, 3=long
|
||||
ssb_PositionsInBurst_PR = 2;
|
||||
ssb_PositionsInBurst_Bitmap = 1;
|
||||
|
||||
# ssb_periodicityServingCell
|
||||
# 0 = ms5, 1=ms10, 2=ms20, 3=ms40, 4=ms80, 5=ms160, 6=spare2, 7=spare1
|
||||
ssb_periodicityServingCell = 2;
|
||||
|
||||
# dmrs_TypeA_position
|
||||
# 0 = pos2, 1 = pos3
|
||||
dmrs_TypeA_Position = 0;
|
||||
|
||||
# subcarrierSpacing
|
||||
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
|
||||
subcarrierSpacing = 1;
|
||||
|
||||
|
||||
#tdd-UL-DL-ConfigurationCommon
|
||||
# subcarrierSpacing
|
||||
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
|
||||
referenceSubcarrierSpacing = 1;
|
||||
# pattern1
|
||||
# dl_UL_TransmissionPeriodicity
|
||||
# 0=ms0p5, 1=ms0p625, 2=ms1, 3=ms1p25, 4=ms2, 5=ms2p5, 6=ms5, 7=ms10
|
||||
dl_UL_TransmissionPeriodicity = 5; #6;
|
||||
nrofDownlinkSlots = 3; #7;
|
||||
nrofDownlinkSymbols = 6;
|
||||
nrofUplinkSlots = 1; #2;
|
||||
nrofUplinkSymbols = 0;
|
||||
|
||||
ssPBCH_BlockPower = -25;
|
||||
}
|
||||
|
||||
);
|
||||
|
||||
|
||||
# ------- SCTP definitions
|
||||
SCTP :
|
||||
{
|
||||
# Number of streams to use in input/output
|
||||
SCTP_INSTREAMS = 2;
|
||||
SCTP_OUTSTREAMS = 2;
|
||||
};
|
||||
|
||||
|
||||
////////// AMF parameters:
|
||||
amf_ip_address = ( { ipv4 = "192.168.71.132";
|
||||
ipv6 = "192:168:30::17";
|
||||
active = "yes";
|
||||
preference = "ipv4";
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
NETWORK_INTERFACES :
|
||||
{
|
||||
GNB_INTERFACE_NAME_FOR_NG_AMF = "eno1";
|
||||
GNB_IPV4_ADDRESS_FOR_NG_AMF = "172.21.16.131";
|
||||
GNB_INTERFACE_NAME_FOR_NGU = "eno";
|
||||
GNB_IPV4_ADDRESS_FOR_NGU = "172.21.16.131";
|
||||
GNB_PORT_FOR_S1U = 2152; # Spec 2152
|
||||
};
|
||||
|
||||
}
|
||||
);
|
||||
|
||||
MACRLCs = (
|
||||
{
|
||||
num_cc = 1;
|
||||
local_s_if_name = "lo:";
|
||||
remote_s_address = "127.0.0.1"; // pnf addr [!]
|
||||
local_s_address = "127.0.0.2"; // vnf addr
|
||||
local_s_portc = 50001; // vnf p5 port
|
||||
remote_s_portc = 50000; // pnf p5 port [!]
|
||||
local_s_portd = 50011; // vnf p7 port [!]
|
||||
remote_s_portd = 50010; // pnf p7 port [!]
|
||||
tr_s_preference = "aerial";
|
||||
tr_n_preference = "local_RRC";
|
||||
pusch_TargetSNRx10 = 200; # 150;
|
||||
pucch_TargetSNRx10 = 200; #200;
|
||||
ulsch_max_frame_inactivity = 10;
|
||||
dl_max_mcs = 28;
|
||||
ul_max_mcs = 28;
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
security = {
|
||||
# preferred ciphering algorithms
|
||||
# the first one of the list that an UE supports in chosen
|
||||
# valid values: nea0, nea1, nea2, nea3
|
||||
ciphering_algorithms = ( "nea0" );
|
||||
|
||||
# preferred integrity algorithms
|
||||
# the first one of the list that an UE supports in chosen
|
||||
# valid values: nia0, nia1, nia2, nia3
|
||||
integrity_algorithms = ( "nia2", "nia0" );
|
||||
|
||||
# setting 'drb_ciphering' to "no" disables ciphering for DRBs, no matter
|
||||
# what 'ciphering_algorithms' configures; same thing for 'drb_integrity'
|
||||
drb_ciphering = "yes";
|
||||
drb_integrity = "no";
|
||||
};
|
||||
|
||||
log_config :
|
||||
{
|
||||
global_log_level ="info";
|
||||
hw_log_level ="info";
|
||||
phy_log_level ="info";
|
||||
mac_log_level ="info";
|
||||
rlc_log_level ="info";
|
||||
pdcp_log_level ="info";
|
||||
rrc_log_level ="info";
|
||||
ngap_log_level ="debug";
|
||||
f1ap_log_level ="debug";
|
||||
};
|
||||
@@ -0,0 +1,242 @@
|
||||
Active_gNBs = ( "gNB-Eurecom-5GNRBox");
|
||||
# Asn1_verbosity, choice in: none, info, annoying
|
||||
Asn1_verbosity = "none";
|
||||
|
||||
gNBs =
|
||||
(
|
||||
{
|
||||
////////// Identification parameters:
|
||||
gNB_ID = 0xe00;
|
||||
|
||||
cell_type = "CELL_MACRO_GNB";
|
||||
|
||||
gNB_name = "gNB-Eurecom-5GNRBox";
|
||||
|
||||
// Tracking area code, 0x0000 and 0xfffe are reserved values
|
||||
tracking_area_code = 1;
|
||||
|
||||
plmn_list = ({mcc = 208; mnc = 93; mnc_length = 2;});
|
||||
|
||||
tr_s_preference = "local_mac"
|
||||
|
||||
////////// Physical parameters:
|
||||
|
||||
pdsch_AntennaPorts_XP = 2;
|
||||
pusch_AntennaPorts = 2;
|
||||
min_rxtxtime = 6;
|
||||
|
||||
servingCellConfigCommon = (
|
||||
{
|
||||
#spCellConfigCommon
|
||||
|
||||
physCellId = 0;
|
||||
|
||||
# downlinkConfigCommon
|
||||
#frequencyInfoDL
|
||||
# this is 3600 MHz + 43 PRBs@30kHz SCS (same as initial BWP)
|
||||
absoluteFrequencySSB = 621312;
|
||||
dl_frequencyBand = 78;
|
||||
# this is 3600 MHz
|
||||
dl_absoluteFrequencyPointA = 620040;
|
||||
#scs-SpecificCarrierList
|
||||
dl_offstToCarrier = 0;
|
||||
# subcarrierSpacing
|
||||
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
|
||||
dl_subcarrierSpacing = 1;
|
||||
dl_carrierBandwidth = 273;
|
||||
#initialDownlinkBWP
|
||||
#genericParameters
|
||||
# this is RBstart=41,L=24 (275*(L-1))+RBstart
|
||||
initialDLBWPlocationAndBandwidth = 31624;
|
||||
# subcarrierSpacing
|
||||
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
|
||||
initialDLBWPsubcarrierSpacing = 1;
|
||||
#pdcch-ConfigCommon
|
||||
initialDLBWPcontrolResourceSetZero = 12;
|
||||
initialDLBWPsearchSpaceZero = 0;
|
||||
|
||||
#uplinkConfigCommon
|
||||
#frequencyInfoUL
|
||||
ul_frequencyBand = 78;
|
||||
#scs-SpecificCarrierList
|
||||
ul_offstToCarrier = 0;
|
||||
# subcarrierSpacing
|
||||
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
|
||||
ul_subcarrierSpacing = 1;
|
||||
ul_carrierBandwidth = 273;
|
||||
pMax = 20;
|
||||
#initialUplinkBWP
|
||||
#genericParameters
|
||||
initialULBWPlocationAndBandwidth = 31624;
|
||||
# subcarrierSpacing
|
||||
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
|
||||
initialULBWPsubcarrierSpacing = 1;
|
||||
#rach-ConfigCommon
|
||||
#rach-ConfigGeneric
|
||||
prach_ConfigurationIndex = 98;
|
||||
#prach_msg1_FDM
|
||||
#0 = one, 1=two, 2=four, 3=eight
|
||||
prach_msg1_FDM = 0;
|
||||
prach_msg1_FrequencyStart = 0;
|
||||
zeroCorrelationZoneConfig = 13;
|
||||
preambleReceivedTargetPower = -118;
|
||||
#preamblTransMax (0...10) = (3,4,5,6,7,8,10,20,50,100,200)
|
||||
preambleTransMax = 6;
|
||||
#powerRampingStep
|
||||
# 0=dB0,1=dB2,2=dB4,3=dB6
|
||||
powerRampingStep = 1;
|
||||
#ra_ReponseWindow
|
||||
#1,2,4,8,10,20,40,80
|
||||
ra_ResponseWindow = 4;
|
||||
#ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR
|
||||
#1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen
|
||||
ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4;
|
||||
#oneHalf (0..15) 4,8,12,16,...60,64
|
||||
ssb_perRACH_OccasionAndCB_PreamblesPerSSB = 15;
|
||||
#ra_ContentionResolutionTimer
|
||||
#(0..7) 8,16,24,32,40,48,56,64
|
||||
ra_ContentionResolutionTimer = 7;
|
||||
rsrp_ThresholdSSB = 19;
|
||||
#prach-RootSequenceIndex_PR
|
||||
#1 = 839, 2 = 139
|
||||
prach_RootSequenceIndex_PR = 2;
|
||||
prach_RootSequenceIndex = 1;
|
||||
# SCS for msg1, can only be 15 for 30 kHz < 6 GHz, takes precendence over the one derived from prach-ConfigIndex
|
||||
#
|
||||
msg1_SubcarrierSpacing = 1,
|
||||
# restrictedSetConfig
|
||||
# 0=unrestricted, 1=restricted type A, 2=restricted type B
|
||||
restrictedSetConfig = 0,
|
||||
|
||||
msg3_DeltaPreamble = 1;
|
||||
p0_NominalWithGrant =-90;
|
||||
|
||||
# pucch-ConfigCommon setup :
|
||||
# pucchGroupHopping
|
||||
# 0 = neither, 1= group hopping, 2=sequence hopping
|
||||
pucchGroupHopping = 0;
|
||||
hoppingId = 40;
|
||||
p0_nominal = -90;
|
||||
# ssb_PositionsInBurs_BitmapPR
|
||||
# 1=short, 2=medium, 3=long
|
||||
ssb_PositionsInBurst_PR = 2;
|
||||
ssb_PositionsInBurst_Bitmap = 1;
|
||||
|
||||
# ssb_periodicityServingCell
|
||||
# 0 = ms5, 1=ms10, 2=ms20, 3=ms40, 4=ms80, 5=ms160, 6=spare2, 7=spare1
|
||||
ssb_periodicityServingCell = 2;
|
||||
|
||||
# dmrs_TypeA_position
|
||||
# 0 = pos2, 1 = pos3
|
||||
dmrs_TypeA_Position = 0;
|
||||
|
||||
# subcarrierSpacing
|
||||
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
|
||||
subcarrierSpacing = 1;
|
||||
|
||||
|
||||
#tdd-UL-DL-ConfigurationCommon
|
||||
# subcarrierSpacing
|
||||
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
|
||||
referenceSubcarrierSpacing = 1;
|
||||
# pattern1
|
||||
# dl_UL_TransmissionPeriodicity
|
||||
# 0=ms0p5, 1=ms0p625, 2=ms1, 3=ms1p25, 4=ms2, 5=ms2p5, 6=ms5, 7=ms10
|
||||
dl_UL_TransmissionPeriodicity = 6;
|
||||
nrofDownlinkSlots = 7;
|
||||
nrofDownlinkSymbols = 6;
|
||||
nrofUplinkSlots = 2;
|
||||
nrofUplinkSymbols = 4;
|
||||
|
||||
ssPBCH_BlockPower = -25;
|
||||
}
|
||||
|
||||
);
|
||||
|
||||
|
||||
# ------- SCTP definitions
|
||||
SCTP :
|
||||
{
|
||||
# Number of streams to use in input/output
|
||||
SCTP_INSTREAMS = 2;
|
||||
SCTP_OUTSTREAMS = 2;
|
||||
};
|
||||
|
||||
|
||||
////////// MME parameters:
|
||||
mme_ip_address = ( { ipv4 = "192.168.12.26";
|
||||
ipv6 = "192:168:30::17";
|
||||
port = 36412 ;
|
||||
active = "yes";
|
||||
preference = "ipv4";
|
||||
}
|
||||
);
|
||||
|
||||
NETWORK_INTERFACES : {
|
||||
GNB_INTERFACE_NAME_FOR_S1_MME = "eth0";
|
||||
GNB_IPV4_ADDRESS_FOR_S1_MME = "192.168.12.111/24";
|
||||
GNB_INTERFACE_NAME_FOR_S1U = "eth0";
|
||||
GNB_IPV4_ADDRESS_FOR_S1U = "192.168.12.111/24";
|
||||
GNB_PORT_FOR_S1U = 2152; # Spec 2152
|
||||
};
|
||||
}
|
||||
);
|
||||
|
||||
MACRLCs = ({
|
||||
num_cc = 1;
|
||||
tr_s_preference = "local_L1";
|
||||
tr_n_preference = "local_RRC";
|
||||
});
|
||||
|
||||
L1s = ({
|
||||
num_cc = 1;
|
||||
tr_n_preference = "local_mac";
|
||||
});
|
||||
|
||||
RUs = ({
|
||||
local_rf = "yes"
|
||||
nb_tx = 2
|
||||
nb_rx = 2
|
||||
att_tx = 0
|
||||
att_rx = 0;
|
||||
bands = [7];
|
||||
max_pdschReferenceSignalPower = -27;
|
||||
max_rxgain = 50;
|
||||
eNB_instances = [0];
|
||||
bf_weights = [0x00007fff, 0x0000];
|
||||
sdr_addrs = "addr=192.168.10.2,second_addr=192.168.20.2";
|
||||
});
|
||||
|
||||
THREAD_STRUCT = ({
|
||||
#three config for level of parallelism "PARALLEL_SINGLE_THREAD", "PARALLEL_RU_L1_SPLIT", or "PARALLEL_RU_L1_TRX_SPLIT"
|
||||
parallel_config = "PARALLEL_RU_L1_TRX_SPLIT";
|
||||
#two option for worker "WORKER_DISABLE" or "WORKER_ENABLE"
|
||||
worker_config = "WORKER_ENABLE";
|
||||
});
|
||||
|
||||
security = {
|
||||
# preferred ciphering algorithms
|
||||
# the first one of the list that an UE supports in chosen
|
||||
# valid values: nea0, nea1, nea2, nea3
|
||||
ciphering_algorithms = ( "nea0" );
|
||||
|
||||
# preferred integrity algorithms
|
||||
# the first one of the list that an UE supports in chosen
|
||||
# valid values: nia0, nia1, nia2, nia3
|
||||
integrity_algorithms = ( "nia2", "nia0" );
|
||||
|
||||
# setting 'drb_ciphering' to "no" disables ciphering for DRBs, no matter
|
||||
# what 'ciphering_algorithms' configures; same thing for 'drb_integrity'
|
||||
drb_ciphering = "yes";
|
||||
drb_integrity = "no";
|
||||
};
|
||||
|
||||
log_config : {
|
||||
global_log_level = "info";
|
||||
hw_log_level = "info";
|
||||
phy_log_level = "info";
|
||||
mac_log_level = "info";
|
||||
rlc_log_level = "info";
|
||||
pdcp_log_level = "info";
|
||||
rrc_log_level = "info";
|
||||
};
|
||||
@@ -200,7 +200,6 @@ MACRLCs = (
|
||||
tr_n_preference = "local_RRC";
|
||||
pusch_TargetSNRx10 = 200;
|
||||
pucch_TargetSNRx10 = 200;
|
||||
ulsch_max_frame_inactivity = 0;
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
@@ -202,7 +202,6 @@ MACRLCs = (
|
||||
num_cc = 1;
|
||||
tr_s_preference = "local_L1";
|
||||
tr_n_preference = "local_RRC";
|
||||
ulsch_max_frame_inactivity = 0;
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
@@ -1,41 +1,42 @@
|
||||
Active_gNBs = ( "gNB-Eurecom-5GNRBox");
|
||||
Active_gNBs = ( "gNB-OAI");
|
||||
# Asn1_verbosity, choice in: none, info, annoying
|
||||
Asn1_verbosity = "none";
|
||||
|
||||
sa = 1;
|
||||
|
||||
gNBs =
|
||||
(
|
||||
{
|
||||
////////// Identification parameters:
|
||||
gNB_ID = 0xe00;
|
||||
|
||||
cell_type = "CELL_MACRO_GNB";
|
||||
|
||||
gNB_name = "gNB-Eurecom-5GNRBox";
|
||||
gNB_name = "gNB-OAI";
|
||||
|
||||
// Tracking area code, 0x0000 and 0xfffe are reserved values
|
||||
tracking_area_code = 1;
|
||||
|
||||
plmn_list = ({mcc = 208; mnc = 99; mnc_length = 2;});
|
||||
plmn_list = ({ mcc = 208; mnc = 99; mnc_length = 2; snssaiList = ({ sst = 1; }) });
|
||||
nr_cellid = 12345678L;
|
||||
|
||||
tr_s_preference = "local_mac"
|
||||
|
||||
////////// Physical parameters:
|
||||
|
||||
sib1_tda = 15;
|
||||
min_rxtxtime = 6;
|
||||
|
||||
servingCellConfigCommon = (
|
||||
{
|
||||
#spCellConfigCommon
|
||||
|
||||
physCellId = 0;
|
||||
physCellId = 10;
|
||||
|
||||
# downlinkConfigCommon
|
||||
#frequencyInfoDL
|
||||
# this is pointA + 23 PRBs@120kHz SCS (same as initial BWP)
|
||||
absoluteFrequencySSB = 2071241;
|
||||
# this is pointA + 16 PRBs@120kHz SCS (same as initial BWP)
|
||||
absoluteFrequencySSB = 2071387;
|
||||
dl_frequencyBand = 261;
|
||||
# this is 27.900 GHz
|
||||
dl_absoluteFrequencyPointA = 2070833;
|
||||
dl_absoluteFrequencyPointA = 2071001;
|
||||
#scs-SpecificCarrierList
|
||||
dl_offstToCarrier = 0;
|
||||
# subcarrierSpacing
|
||||
@@ -50,7 +51,7 @@ gNBs =
|
||||
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
|
||||
initialDLBWPsubcarrierSpacing = 3;
|
||||
#pdcch-ConfigCommon
|
||||
initialDLBWPcontrolResourceSetZero = 12;
|
||||
initialDLBWPcontrolResourceSetZero = 1;
|
||||
initialDLBWPsearchSpaceZero = 0;
|
||||
|
||||
#uplinkConfigCommon
|
||||
@@ -85,12 +86,12 @@ gNBs =
|
||||
powerRampingStep = 1;
|
||||
#ra_ReponseWindow
|
||||
#1,2,4,8,10,20,40,80
|
||||
ra_ResponseWindow = 7;
|
||||
ra_ResponseWindow = 5;
|
||||
#ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR
|
||||
#0=oneeighth,1=onefourth,2=half,3=one,4=two,5=four,6=eight,7=sixteen
|
||||
ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4;
|
||||
#1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen
|
||||
ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 3;
|
||||
#oneHalf (0..15) 4,8,12,16,...60,64
|
||||
ssb_perRACH_OccasionAndCB_PreamblesPerSSB = 7;
|
||||
ssb_perRACH_OccasionAndCB_PreamblesPerSSB = 15;
|
||||
#ra_ContentionResolutionTimer
|
||||
#(0..7) 8,16,24,32,40,48,56,64
|
||||
ra_ContentionResolutionTimer = 7;
|
||||
@@ -101,8 +102,7 @@ gNBs =
|
||||
prach_RootSequenceIndex = 1;
|
||||
# SCS for msg1, can only be 15 for 30 kHz < 6 GHz, takes precendence over the one derived from prach-ConfigIndex
|
||||
#
|
||||
msg1_SubcarrierSpacing = 3,
|
||||
|
||||
msg1_SubcarrierSpacing = 3;
|
||||
# restrictedSetConfig
|
||||
# 0=unrestricted, 1=restricted type A, 2=restricted type B
|
||||
restrictedSetConfig = 0,
|
||||
@@ -119,7 +119,7 @@ gNBs =
|
||||
# ssb_PositionsInBurs_BitmapPR
|
||||
# 1=short, 2=medium, 3=long
|
||||
ssb_PositionsInBurst_PR = 3;
|
||||
ssb_PositionsInBurst_Bitmap = 0x0001000100010001L;
|
||||
ssb_PositionsInBurst_Bitmap = 1;
|
||||
|
||||
# ssb_periodicityServingCell
|
||||
# 0 = ms5, 1=ms10, 2=ms20, 3=ms40, 4=ms80, 5=ms160, 6=spare2, 7=spare1
|
||||
@@ -152,7 +152,6 @@ gNBs =
|
||||
|
||||
);
|
||||
|
||||
|
||||
# ------- SCTP definitions
|
||||
SCTP :
|
||||
{
|
||||
@@ -162,91 +161,58 @@ gNBs =
|
||||
};
|
||||
|
||||
|
||||
////////// MME parameters:
|
||||
mme_ip_address = ( { ipv4 = "192.168.18.99";
|
||||
////////// AMF parameters:
|
||||
amf_ip_address = ( { ipv4 = "192.168.71.132";
|
||||
ipv6 = "192:168:30::17";
|
||||
active = "yes";
|
||||
preference = "ipv4";
|
||||
}
|
||||
);
|
||||
|
||||
///X2
|
||||
enable_x2 = "no";
|
||||
t_reloc_prep = 1000; /* unit: millisecond */
|
||||
tx2_reloc_overall = 2000; /* unit: millisecond */
|
||||
t_dc_prep = 1000; /* unit: millisecond */
|
||||
t_dc_overall = 2000; /* unit: millisecond */
|
||||
target_enb_x2_ip_address = (
|
||||
{ ipv4 = "192.168.18.199";
|
||||
ipv6 = "192:168:30::17";
|
||||
preference = "ipv4";
|
||||
}
|
||||
);
|
||||
|
||||
NETWORK_INTERFACES :
|
||||
{
|
||||
|
||||
GNB_INTERFACE_NAME_FOR_S1_MME = "eth0";
|
||||
GNB_IPV4_ADDRESS_FOR_S1_MME = "192.168.18.198/24";
|
||||
GNB_INTERFACE_NAME_FOR_S1U = "eth0";
|
||||
GNB_IPV4_ADDRESS_FOR_S1U = "192.168.18.198/24";
|
||||
GNB_INTERFACE_NAME_FOR_NG_AMF = "eth0";
|
||||
GNB_IPV4_ADDRESS_FOR_NG_AMF = "192.168.71.140/24";
|
||||
GNB_INTERFACE_NAME_FOR_NGU = "eth0";
|
||||
GNB_IPV4_ADDRESS_FOR_NGU = "192.168.71.140/24";
|
||||
GNB_PORT_FOR_S1U = 2152; # Spec 2152
|
||||
GNB_IPV4_ADDRESS_FOR_X2C = "192.168.18.198/24";
|
||||
GNB_PORT_FOR_X2C = 36422; # Spec 36422
|
||||
};
|
||||
}
|
||||
);
|
||||
|
||||
MACRLCs = (
|
||||
{
|
||||
num_cc = 1;
|
||||
tr_s_preference = "local_L1";
|
||||
tr_n_preference = "local_RRC";
|
||||
pusch_TargetSNRx10 = 200;
|
||||
pucch_TargetSNRx10 = 200;
|
||||
}
|
||||
);
|
||||
MACRLCs = ({
|
||||
num_cc = 1;
|
||||
tr_s_preference = "local_L1";
|
||||
tr_n_preference = "local_RRC";
|
||||
pusch_TargetSNRx10 = 200;
|
||||
pucch_TargetSNRx10 = 200;
|
||||
});
|
||||
|
||||
L1s = (
|
||||
{
|
||||
num_cc = 1;
|
||||
tr_n_preference = "local_mac";
|
||||
ofdm_offset_divisor = 8; #set this to UINT_MAX for offset 0
|
||||
prach_dtx_threshold = 120;
|
||||
#pucch0_dtx_threshold = 120;
|
||||
}
|
||||
);
|
||||
|
||||
RUs = (
|
||||
{
|
||||
local_rf = "yes"
|
||||
nb_tx = 1;
|
||||
nb_rx = 1;
|
||||
att_tx = 0;
|
||||
att_rx = 0;
|
||||
bands = [7];
|
||||
sl_ahead = 12;
|
||||
max_pdschReferenceSignalPower = -27;
|
||||
max_rxgain = 75;
|
||||
eNB_instances = [0];
|
||||
sdr_addrs = "addr=192.168.10.2,second_addr=192.168.20.2";
|
||||
if_freq = 5124520000L;
|
||||
clock_src = "external";
|
||||
time_src = "external";
|
||||
}
|
||||
);
|
||||
RUs = ({
|
||||
local_rf = "yes"
|
||||
nb_tx = 1;
|
||||
nb_rx = 1;
|
||||
att_tx = 0;
|
||||
att_rx = 0;
|
||||
sl_ahead = 12;
|
||||
bands = [261];
|
||||
max_pdschReferenceSignalPower = -27;
|
||||
eNB_instances = [0];
|
||||
});
|
||||
|
||||
rfsimulator: {
|
||||
serveraddr = "server";
|
||||
};
|
||||
|
||||
THREAD_STRUCT = (
|
||||
{
|
||||
#three config for level of parallelism "PARALLEL_SINGLE_THREAD", "PARALLEL_RU_L1_SPLIT", or "PARALLEL_RU_L1_TRX_SPLIT"
|
||||
parallel_config = "PARALLEL_RU_L1_TRX_SPLIT";
|
||||
#two option for worker "WORKER_DISABLE" or "WORKER_ENABLE"
|
||||
worker_config = "WORKER_ENABLE";
|
||||
}
|
||||
);
|
||||
|
||||
security = {
|
||||
# preferred ciphering algorithms
|
||||
# the first one of the list that an UE supports in chosen
|
||||
@@ -264,14 +230,6 @@ security = {
|
||||
drb_integrity = "no";
|
||||
};
|
||||
|
||||
log_config :
|
||||
{
|
||||
global_log_level ="info";
|
||||
hw_log_level ="info";
|
||||
phy_log_level ="info";
|
||||
mac_log_level ="info";
|
||||
rlc_log_level ="info";
|
||||
pdcp_log_level ="info";
|
||||
rrc_log_level ="info";
|
||||
};
|
||||
|
||||
log_config: {
|
||||
global_log_level ="info";
|
||||
};
|
||||
@@ -187,7 +187,6 @@ MACRLCs = (
|
||||
tr_n_preference = "local_RRC";
|
||||
pusch_TargetSNRx10 = 150;
|
||||
pucch_TargetSNRx10 = 200;
|
||||
ulsch_max_frame_inactivity = 0;
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
@@ -197,8 +197,6 @@ MACRLCs = (
|
||||
tr_n_preference = "local_RRC";
|
||||
pusch_TargetSNRx10 = 180;
|
||||
pucch_TargetSNRx10 = 200;
|
||||
ulsch_max_frame_inactivity = 1;
|
||||
ul_max_mcs = 16;
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
@@ -188,7 +188,6 @@ MACRLCs = (
|
||||
tr_n_preference = "local_RRC";
|
||||
#pusch_TargetSNRx10 = 150;
|
||||
#pucch_TargetSNRx10 = 200;
|
||||
ulsch_max_frame_inactivity = 0;
|
||||
dl_max_mcs = 16; # there are retransmissions if more
|
||||
}
|
||||
);
|
||||
|
||||
@@ -190,7 +190,6 @@ MACRLCs = (
|
||||
tr_n_preference = "local_RRC";
|
||||
pusch_TargetSNRx10 = 220;
|
||||
pucch_TargetSNRx10 = 200;
|
||||
ulsch_max_frame_inactivity = 0;
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
@@ -184,7 +184,6 @@ MACRLCs = (
|
||||
pusch_TargetSNRx10 = 200;
|
||||
pucch_TargetSNRx10 = 200;
|
||||
ul_prbblack_SNR_threshold = 10;
|
||||
ulsch_max_frame_inactivity = 10;
|
||||
ul_max_mcs = 9;
|
||||
}
|
||||
);
|
||||
|
||||
@@ -203,7 +203,6 @@ MACRLCs = (
|
||||
tr_n_preference = "local_RRC";
|
||||
pusch_TargetSNRx10 = 220;
|
||||
pucch_TargetSNRx10 = 200;
|
||||
ulsch_max_frame_inactivity = 0;
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
@@ -204,7 +204,6 @@ MACRLCs = (
|
||||
tr_n_preference = "local_RRC";
|
||||
# pusch_TargetSNRx10 = 200;
|
||||
# pucch_TargetSNRx10 = 150;
|
||||
ulsch_max_frame_inactivity = 0;
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
@@ -186,7 +186,6 @@ MACRLCs = (
|
||||
tr_n_preference = "local_RRC";
|
||||
pusch_TargetSNRx10 = 150;
|
||||
pucch_TargetSNRx10 = 200;
|
||||
ulsch_max_frame_inactivity = 1;
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
@@ -192,8 +192,6 @@ MACRLCs = (
|
||||
tr_n_preference = "local_RRC";
|
||||
pusch_TargetSNRx10 = 200;
|
||||
pucch_TargetSNRx10 = 200;
|
||||
ulsch_max_frame_inactivity = 10;
|
||||
ul_max_mcs = 28;
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
@@ -184,7 +184,6 @@ MACRLCs = (
|
||||
pusch_TargetSNRx10 = 200;
|
||||
pucch_TargetSNRx10 = 200;
|
||||
ul_prbblack_SNR_threshold = 10;
|
||||
ulsch_max_frame_inactivity = 0;
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
@@ -208,7 +208,6 @@ MACRLCs = (
|
||||
tr_n_preference = "local_RRC";
|
||||
pusch_TargetSNRx10 = 200;
|
||||
pucch_TargetSNRx10 = 200;
|
||||
ulsch_max_frame_inactivity = 1;
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
@@ -199,7 +199,6 @@ MACRLCs = (
|
||||
tr_n_preference = "local_RRC";
|
||||
pusch_TargetSNRx10 = 200;
|
||||
pucch_TargetSNRx10 = 200;
|
||||
ulsch_max_frame_inactivity = 0;
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
@@ -186,7 +186,6 @@ MACRLCs = (
|
||||
pusch_TargetSNRx10 = 200;
|
||||
pucch_TargetSNRx10 = 200;
|
||||
ul_prbblack_SNR_threshold = 10;
|
||||
ulsch_max_frame_inactivity = 0;
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
34
ci-scripts/datalog_rt_stats.100.2x2.yaml
Normal file
34
ci-scripts/datalog_rt_stats.100.2x2.yaml
Normal file
@@ -0,0 +1,34 @@
|
||||
#this is a configuration file
|
||||
#used to build real time processing statistics
|
||||
#for 5G NR phy test (gNB terminate)
|
||||
Title : Processing Time (us) from datalog_rt_stats.100.2x2.yaml
|
||||
ColNames :
|
||||
- Metric
|
||||
- Average; Max; Count
|
||||
- Average vs Reference Deviation (Reference Value; Acceptability Deviation Threshold)
|
||||
Ref :
|
||||
feprx : 150.0
|
||||
feptx_prec : 0.0
|
||||
feptx_ofdm : 65.0
|
||||
feptx_total : 177.0
|
||||
L1 Tx processing : 700.0
|
||||
DLSCH encoding : 226.0
|
||||
L1 Rx processing : 640.0
|
||||
PUSCH inner-receiver : 400.0
|
||||
Schedule Response : 3.0
|
||||
DL & UL scheduling timing : 15.0
|
||||
UL Indication : 3.0
|
||||
Slot Indication : 17.0
|
||||
DeviationThreshold :
|
||||
feprx : 0.25
|
||||
feptx_prec : 0.25
|
||||
feptx_ofdm : 0.25
|
||||
feptx_total : 0.25
|
||||
L1 Tx processing : 0.25
|
||||
DLSCH encoding : 0.25
|
||||
L1 Rx processing : 0.25
|
||||
PUSCH inner-receiver : 0.25
|
||||
Schedule Response : 1.00
|
||||
DL & UL scheduling timing : 0.25
|
||||
UL Indication : 1.00
|
||||
Slot Indication : 0.50
|
||||
@@ -1,34 +1,34 @@
|
||||
#this is a configuration file
|
||||
#used to build real time processing statistics
|
||||
#for 5G NR phy test (gNB terminate)
|
||||
Title : Processing Time (us)
|
||||
Title : Processing Time (us) from datalog_rt_stats.1x1.60.yaml
|
||||
ColNames :
|
||||
- Metric
|
||||
- Average; Max; Count
|
||||
- Average vs Reference Deviation (Reference Value; Acceptability Threshold)
|
||||
- Average vs Reference Deviation (Reference Value; Acceptability Deviation Threshold)
|
||||
Ref :
|
||||
feprx : 46.0
|
||||
feptx_prec : 15.0
|
||||
feptx_ofdm : 35.0
|
||||
feptx_total : 57.0
|
||||
L1 Tx processing : 210.0
|
||||
DLSCH encoding : 137.0
|
||||
L1 Rx processing : 345.0
|
||||
PUSCH inner-receiver : 210.0
|
||||
PUSCH decoding : 2200.0
|
||||
Schedule Response : 48.0
|
||||
DL & UL scheduling timing : 13.0
|
||||
UL Indication : 60.0
|
||||
Threshold :
|
||||
feprx : 1.25
|
||||
feptx_prec : 1.25
|
||||
feptx_ofdm : 1.25
|
||||
feptx_total : 1.25
|
||||
L1 Tx processing : 1.25
|
||||
DLSCH encoding : 1.25
|
||||
L1 Rx processing : 1.25
|
||||
PUSCH inner-receiver : 1.25
|
||||
PUSCH decoding : 1.25
|
||||
Schedule Response : 1.25
|
||||
DL & UL scheduling timing : 1.25
|
||||
UL Indication : 1.25
|
||||
L1 Tx processing : 260.0
|
||||
DLSCH encoding : 160.0
|
||||
L1 Rx processing : 420.0
|
||||
PUSCH inner-receiver : 170.0
|
||||
Schedule Response : 3.0
|
||||
DL & UL scheduling timing : 8.0
|
||||
UL Indication : 3.0
|
||||
Slot Indication : 8.0
|
||||
DeviationThreshold :
|
||||
feprx : 0.25
|
||||
feptx_prec : 0.25
|
||||
feptx_ofdm : 0.25
|
||||
feptx_total : 0.25
|
||||
L1 Tx processing : 0.25
|
||||
DLSCH encoding : 0.25
|
||||
L1 Rx processing : 0.25
|
||||
PUSCH inner-receiver : 0.25
|
||||
Schedule Response : 1.00
|
||||
DL & UL scheduling timing : 0.50
|
||||
UL Indication : 1.00
|
||||
Slot Indication : 0.50
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
#this is a configuration file
|
||||
#used to build real time processing statistics
|
||||
#for 5G NR phy test (gNB terminate)
|
||||
Title : Processing Time (us)
|
||||
Title : Processing Time (us) from datalog_rt_stats.2x2.yaml
|
||||
ColNames :
|
||||
- Metric
|
||||
- Average; Max; Count
|
||||
- Average vs Reference Deviation (Reference Value; Acceptability Threshold)
|
||||
- Average vs Reference Deviation (Reference Value; Acceptability Deviation Threshold)
|
||||
Ref :
|
||||
feprx : 120.0
|
||||
feptx_prec : 30.0
|
||||
@@ -15,18 +15,20 @@ Ref :
|
||||
DLSCH encoding : 230.0
|
||||
L1 Rx processing : 175.0
|
||||
PUSCH inner-receiver : 100.0
|
||||
PUSCH decoding : 180.0
|
||||
DL & UL scheduling timing : 37.0
|
||||
UL Indication : 38.0
|
||||
Threshold :
|
||||
feprx : 1.25
|
||||
feptx_prec : 1.25
|
||||
feptx_ofdm : 1.25
|
||||
feptx_total : 1.25
|
||||
L1 Tx processing : 1.25
|
||||
DLSCH encoding : 1.25
|
||||
L1 Rx processing : 1.25
|
||||
PUSCH inner-receiver : 1.25
|
||||
PUSCH decoding : 1.25
|
||||
DL & UL scheduling timing : 1.25
|
||||
UL Indication : 1.25
|
||||
Schedule Response : 3.0
|
||||
DL & UL scheduling timing : 11.0
|
||||
UL Indication : 3.0
|
||||
Slot Indication : 14.0
|
||||
DeviationThreshold :
|
||||
feprx : 0.25
|
||||
feptx_prec : 0.25
|
||||
feptx_ofdm : 0.25
|
||||
feptx_total : 0.25
|
||||
L1 Tx processing : 0.25
|
||||
DLSCH encoding : 0.25
|
||||
L1 Rx processing : 0.25
|
||||
PUSCH inner-receiver : 0.25
|
||||
Schedule Response : 1.00
|
||||
DL & UL scheduling timing : 0.50
|
||||
UL Indication : 1.00
|
||||
Slot Indication : 0.25
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
#this is a configuration file
|
||||
#used to build real time processing statistics
|
||||
#for 5G NR phy test (gNB terminate)
|
||||
Title : Processing Time (us)
|
||||
Title : Processing Time (us) from datalog_rt_stats.60.2x2.yaml
|
||||
ColNames :
|
||||
- Metric
|
||||
- Average; Max; Count
|
||||
- Average vs Reference Deviation (Reference Value; Acceptability Threshold)
|
||||
- Average vs Reference Deviation (Reference Value; Acceptability Deviation Threshold)
|
||||
Ref :
|
||||
feprx : 84.0
|
||||
feptx_prec : 14.0
|
||||
@@ -15,20 +15,20 @@ Ref :
|
||||
DLSCH encoding : 177.0
|
||||
L1 Rx processing : 345.0
|
||||
PUSCH inner-receiver : 210.0
|
||||
PUSCH decoding : 2200.0
|
||||
Schedule Response : 111.0
|
||||
DL & UL scheduling timing : 20.0
|
||||
UL Indication : 127.0
|
||||
Threshold :
|
||||
feprx : 1.25
|
||||
feptx_prec : 1.25
|
||||
feptx_ofdm : 1.25
|
||||
feptx_total : 1.25
|
||||
L1 Tx processing : 1.25
|
||||
DLSCH encoding : 1.25
|
||||
L1 Rx processing : 1.25
|
||||
PUSCH inner-receiver : 1.25
|
||||
PUSCH decoding : 1.25
|
||||
Schedule Response : 48.0
|
||||
DL & UL scheduling timing : 1.25
|
||||
UL Indication : 1.25
|
||||
Schedule Response : 3.0
|
||||
DL & UL scheduling timing : 13.0
|
||||
UL Indication : 3.0
|
||||
Slot Indication : 15.0
|
||||
DeviationThreshold :
|
||||
feprx : 0.25
|
||||
feptx_prec : 0.25
|
||||
feptx_ofdm : 0.25
|
||||
feptx_total : 0.25
|
||||
L1 Tx processing : 0.25
|
||||
DLSCH encoding : 0.25
|
||||
L1 Rx processing : 0.25
|
||||
PUSCH inner-receiver : 0.25
|
||||
Schedule Response : 1.00
|
||||
DL & UL scheduling timing : 0.35
|
||||
UL Indication : 1.00
|
||||
Slot Indication : 0.35
|
||||
|
||||
@@ -1,34 +1,34 @@
|
||||
#this is a configuration file
|
||||
#used to build real time processing statistics
|
||||
#for 5G NR phy test (gNB terminate)
|
||||
Title : Processing Time (us)
|
||||
Title : Processing Time (us) from datalog_rt_stats.default.yaml
|
||||
ColNames :
|
||||
- Metric
|
||||
- Average; Max; Count
|
||||
- Average vs Reference Deviation (Reference Value; Acceptability Threshold)
|
||||
- Average vs Reference Deviation (Reference Value; Acceptability Deviation Threshold)
|
||||
Ref :
|
||||
feprx : 43.0
|
||||
feptx_prec : 13.0
|
||||
feptx_ofdm : 33.0
|
||||
feptx_total : 55.0
|
||||
L1 Tx processing : 170.0
|
||||
DLSCH encoding : 118.0
|
||||
L1 Rx processing : 305.0
|
||||
L1 Tx processing : 220.0
|
||||
DLSCH encoding : 130.0
|
||||
L1 Rx processing : 387.0
|
||||
PUSCH inner-receiver : 150.0
|
||||
PUSCH decoding : 2200.0
|
||||
Schedule Response : 30.0
|
||||
DL & UL scheduling timing : 10.0
|
||||
UL Indication : 40.0
|
||||
Threshold :
|
||||
feprx : 1.25
|
||||
feptx_prec : 1.25
|
||||
feptx_ofdm : 1.25
|
||||
feptx_total : 1.25
|
||||
L1 Tx processing : 1.25
|
||||
DLSCH encoding : 1.25
|
||||
L1 Rx processing : 1.25
|
||||
PUSCH inner-receiver : 1.25
|
||||
PUSCH decoding : 1.25
|
||||
Schedule Response : 1.25
|
||||
DL & UL scheduling timing : 1.25
|
||||
UL Indication : 1.25
|
||||
Schedule Response : 3.0
|
||||
DL & UL scheduling timing : 6.0
|
||||
UL Indication : 3.0
|
||||
Slot Indication : 7.0
|
||||
DeviationThreshold :
|
||||
feprx : 0.25
|
||||
feptx_prec : 0.25
|
||||
feptx_ofdm : 0.25
|
||||
feptx_total : 0.25
|
||||
L1 Tx processing : 0.25
|
||||
DLSCH encoding : 0.25
|
||||
L1 Rx processing : 0.25
|
||||
PUSCH inner-receiver : 0.25
|
||||
Schedule Response : 1.00
|
||||
DL & UL scheduling timing : 0.50
|
||||
UL Indication : 1.00
|
||||
Slot Indication : 0.50
|
||||
|
||||
@@ -262,10 +262,12 @@ 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.5/docker-compose', '\$', 5)
|
||||
mySSH.command(f'cd {self.SourceCodePath}/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'
|
||||
elif re.search('basic', self.cfgDeploy):\
|
||||
dFile = 'docker-compose-basic-nrf.yaml'
|
||||
else:
|
||||
dFile = 'docker-compose-mini-nrf.yaml'
|
||||
mySSH.command('docker-compose -f ' + dFile + ' ps -a', '\$', 60)
|
||||
@@ -582,7 +584,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.5/docker-compose', '\$', 5)
|
||||
mySSH.command(f'cd {self.SourceCodePath}/docker-compose', '\$', 5)
|
||||
mySSH.command('python3 ./core-network.py '+self.cfgUnDeploy, '\$', 60)
|
||||
mySSH.command('docker volume prune --force || true', '\$', 60)
|
||||
time.sleep(2)
|
||||
|
||||
221
ci-scripts/mbim_scripts/mbim-set-ip.sh
Normal file
221
ci-scripts/mbim_scripts/mbim-set-ip.sh
Normal file
@@ -0,0 +1,221 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Modified by Karim Boutiba (karim.boutiba@eurecom.fr)
|
||||
# mbim-set-ip script version 1.1
|
||||
# Modified mbimcli IPv4 IPv6 parsing script based on parts of project https://github.com/grandcentrix/thinkpad-x260-modem-scripts
|
||||
# Licensed under the Apache License, Version 2.0
|
||||
# Modified by Jörgen Storvist, Techship http://www.techship.com
|
||||
# Further details in the Techship FAQ sections on using MBIM and setting correct modes in cellular modules:
|
||||
# https://techship.com/faq/how-to-set-up-a-simple-data-connection-over-the-mbim-interface-using-libmbim-and-driver-cdc-mbim-in-linux/
|
||||
#
|
||||
# Installation & Usage:
|
||||
#
|
||||
# Verify that the cellular module is exposing the MBIM interface over the USB interface.
|
||||
# Use mbimcli to check status for the cellular connection and enter the PIN code if necessary.
|
||||
# Configure mbim-network.conf and place in /etc/ (example file included in the archive, check link bellow for details).
|
||||
# https://www.freedesktop.org/software/libmbim/man/latest/mbim-network.1.html
|
||||
# Start the mbim data connection with command:
|
||||
# mbim-network <MBIM-INTERFACE> start
|
||||
# Ensure execution of mbim-set-ip script with sufficient system priviledges
|
||||
# ./mbim-set-ip <MBIM-INTERFACE> <NETWORK-INTERFACE>
|
||||
#
|
||||
# Examples:
|
||||
# mbimcli -d /dev/cdc-wdm0 -p --query-device-caps
|
||||
# mbimcli -d /dev/cdc-wdm0 -p --enter-pin=1234
|
||||
# mbim-network /dev/cdc-wdm0 start
|
||||
# ./mbim-set-ip /dev/cdc-wdm0 wwan0
|
||||
#
|
||||
# You should now be able to ping over the data connection.
|
||||
# IP v4 ping: (only if IPv4 address was acquired from cellular module)
|
||||
# ping -4 -I wwan0 8.8.8.8
|
||||
# ping -4 -I wwan0 google.com
|
||||
|
||||
# IP v6 ping: (only if IPv6 address was acquired from cellular module)
|
||||
# ping -6 -I wwan0 2001:4860:4860::8888
|
||||
# ping -6 -I wwan0 google.com
|
||||
#
|
||||
# The script relies on the linux tools mbimcli, ip, systemd-resolve
|
||||
# (Tested on libmbim 1.16.0 running on Ubuntu 18.10 cosmic (development) with kernel version 4.15.0)
|
||||
|
||||
# Details on mbim-network and mbimcli
|
||||
# https://www.freedesktop.org/software/libmbim/man/latest/mbim-network.1.html
|
||||
# https://www.freedesktop.org/software/libmbim/man/latest/mbimcli.1.html
|
||||
|
||||
ipv4_addresses=()
|
||||
ipv4_gateway=""
|
||||
ipv4_dns=()
|
||||
ipv4_mtu=""
|
||||
ipv6_addresses=()
|
||||
ipv6_gateway=""
|
||||
ipv6_dns=()
|
||||
ipv6_mtu=""
|
||||
|
||||
#CONTROL-IFACE
|
||||
CONTROLDEV="$1"
|
||||
#WWAN-IFACE
|
||||
DEV="$2"
|
||||
SESSION="$3"
|
||||
echo $SESSION
|
||||
echo "Requesting IPv4 and IPv6 information through mbimcli proxy:"
|
||||
mbimcli -d $CONTROLDEV -p --query-ip-configuration
|
||||
IPDATA=$(mbimcli -d $CONTROLDEV -p --query-ip-configuration=$SESSION)
|
||||
|
||||
function parse_ip {
|
||||
# IP [0]: '10.134.203.177/30'
|
||||
local line_re="IP \[([0-9]+)\]: '(.+)'"
|
||||
local input=$1
|
||||
if [[ $input =~ $line_re ]]; then
|
||||
local ip_cnt=${BASH_REMATCH[1]}
|
||||
local ip=${BASH_REMATCH[2]}
|
||||
fi
|
||||
echo "$ip"
|
||||
}
|
||||
|
||||
function parse_gateway {
|
||||
# Gateway: '10.134.203.178'
|
||||
local line_re="Gateway: '(.+)'"
|
||||
local input=$1
|
||||
if [[ $input =~ $line_re ]]; then
|
||||
local gw=${BASH_REMATCH[1]}
|
||||
fi
|
||||
echo "$gw"
|
||||
}
|
||||
|
||||
function parse_dns {
|
||||
# DNS [0]: '10.134.203.177/30'
|
||||
local line_re="DNS \[([0-9]+)\]: '(.+)'"
|
||||
local input=$1
|
||||
if [[ $input =~ $line_re ]]; then
|
||||
local dns_cnt=${BASH_REMATCH[1]}
|
||||
local dns=${BASH_REMATCH[2]}
|
||||
fi
|
||||
echo "$dns"
|
||||
}
|
||||
|
||||
function parse_mtu {
|
||||
# MTU: '1500'
|
||||
local line_re="MTU: '([0-9]+)'"
|
||||
local input=$1
|
||||
if [[ $input =~ $line_re ]]; then
|
||||
local mtu=${BASH_REMATCH[1]}
|
||||
fi
|
||||
echo "$mtu"
|
||||
}
|
||||
while read -r line || [[ -n "$line" ]] ; do
|
||||
[ -z "$line" ] && continue
|
||||
case "$line" in
|
||||
*"IPv4 configuration available: 'none'"*)
|
||||
state="start"
|
||||
continue
|
||||
;;
|
||||
*"IPv4 configuration available"*)
|
||||
state="ipv4"
|
||||
continue
|
||||
;;
|
||||
*"IPv6 configuration available: 'none'"*)
|
||||
state="start"
|
||||
continue
|
||||
;;
|
||||
*"IPv6 configuration available"*)
|
||||
state="ipv6"
|
||||
continue
|
||||
;;
|
||||
*)
|
||||
;;
|
||||
esac
|
||||
case "$state" in
|
||||
"ipv4")
|
||||
|
||||
case "$line" in
|
||||
*"IP"*)
|
||||
row=$(parse_ip "$line")
|
||||
ipv4_addresses+=("$row")
|
||||
continue
|
||||
;;
|
||||
*"Gateway"*)
|
||||
row=$(parse_gateway "$line")
|
||||
ipv4_gateway="$row"
|
||||
continue
|
||||
;;
|
||||
*"DNS"*)
|
||||
row=$(parse_dns "$line")
|
||||
ipv4_dns+=("$row")
|
||||
continue
|
||||
;;
|
||||
*"MTU"*)
|
||||
row=$(parse_mtu "$line")
|
||||
ipv4_mtu="$row"
|
||||
continue
|
||||
;;
|
||||
*)
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
|
||||
"ipv6")
|
||||
case "$line" in
|
||||
*"IP"*)
|
||||
row=$(parse_ip "$line")
|
||||
ipv6_addresses+=("$row")
|
||||
continue
|
||||
;;
|
||||
*"Gateway"*)
|
||||
row=$(parse_gateway "$line")
|
||||
ipv6_gateway="$row"
|
||||
continue
|
||||
;;
|
||||
*"DNS"*)
|
||||
row=$(parse_dns "$line")
|
||||
ipv6_dns+=("$row")
|
||||
continue
|
||||
;;
|
||||
*"MTU"*)
|
||||
row=$(parse_mtu "$line")
|
||||
ipv6_mtu="$row"
|
||||
continue
|
||||
;;
|
||||
*)
|
||||
continue
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
*)
|
||||
continue
|
||||
;;
|
||||
esac
|
||||
done <<< "$IPDATA"
|
||||
|
||||
execfile=$(mktemp)
|
||||
|
||||
printf "ip link set $DEV down\n" >> $execfile
|
||||
printf "ip addr flush dev $DEV \n" >> $execfile
|
||||
printf "ip -6 addr flush dev $DEV \n" >> $execfile
|
||||
printf "ip link set $DEV up\n" >> $execfile
|
||||
|
||||
if [[ "${#ipv4_addresses[@]}" > 0 ]]; then
|
||||
printf "ip addr add %s dev $DEV broadcast +\n" "${ipv4_addresses[@]}" >> $execfile
|
||||
printf "ip route add 192.168.61.0/24 via $ipv4_gateway dev $DEV\n" >> $execfile
|
||||
|
||||
if [ -n "$ipv4_mtu" ]; then
|
||||
printf "ip link set mtu $ipv4_mtu dev $DEV \n" >> $execfile
|
||||
fi
|
||||
if [[ "${#ipv4_dns[@]}" > 0 ]]; then
|
||||
printf "resolvectl -4 --interface=$DEV --set-dns=%s\n" "${ipv4_dns[@]}" >>$execfile
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ "${#ipv6_addresses[@]}" > 0 ]]; then
|
||||
printf "ip -6 addr add %s dev $DEV\n" "${ipv6_addresses[@]}" >> $execfile
|
||||
printf "ip -6 route add default via $ipv6_gateway dev $DEV\n" >> $execfile
|
||||
if [ -n "$ipv6_mtu" ]; then
|
||||
printf "ip -6 link set mtu $ipv6_mtu dev $DEV\n" >> $execfile
|
||||
fi
|
||||
if [[ "${#ipv6_dns[@]}" > 0 ]]; then
|
||||
printf "systemd-resolve -6 --interface=$DEV --set-dns=%s\n" "${ipv6_dns[@]}" >>$execfile
|
||||
fi
|
||||
fi
|
||||
echo "Applying the following network interface configurations:"
|
||||
cat $execfile
|
||||
bash $execfile
|
||||
rm $execfile
|
||||
echo "Network interface configurations completed."
|
||||
10
ci-scripts/mbim_scripts/start_quectel_mbim.sh
Normal file
10
ci-scripts/mbim_scripts/start_quectel_mbim.sh
Normal file
@@ -0,0 +1,10 @@
|
||||
set -x
|
||||
|
||||
sudo mbimcli -p -d /dev/cdc-wdm0 --set-radio-state=off
|
||||
sleep 1
|
||||
sudo mbimcli -p -d /dev/cdc-wdm0 --set-radio-state=on
|
||||
sleep 2
|
||||
sudo mbimcli -p -d /dev/cdc-wdm0 --attach-packet-service
|
||||
|
||||
sudo mbimcli -p -d /dev/cdc-wdm0 --connect=session-id=0,access-string=oai.ipv4,ip-type=ipv4
|
||||
sudo /opt/mbim/mbim-set-ip.sh /dev/cdc-wdm0 wwan0 0
|
||||
3
ci-scripts/mbim_scripts/stop_quectel_mbim.sh
Normal file
3
ci-scripts/mbim_scripts/stop_quectel_mbim.sh
Normal file
@@ -0,0 +1,3 @@
|
||||
set -x
|
||||
|
||||
sudo mbimcli -p -d /dev/cdc-wdm0 --set-radio-state=off
|
||||
@@ -1179,8 +1179,10 @@ class RANManagement():
|
||||
self.datalog_rt_stats=datalog_rt_stats
|
||||
#check if there is a fail => will render the test as failed
|
||||
for k in datalog_rt_stats['Data']:
|
||||
if float(datalog_rt_stats['Data'][k][3])> datalog_rt_stats['Threshold'][k]: #condition for fail : avg/ref is greater than the fixed threshold
|
||||
logging.debug('\u001B[1;30;43m datalog_rt_stats metric ' + k + '=' + datalog_rt_stats['Data'][k][3] + ' > threshold ' + str(datalog_rt_stats['Threshold'][k]) + ' \u001B[0m')
|
||||
valnorm = float(datalog_rt_stats['Data'][k][3])
|
||||
dev = datalog_rt_stats['DeviationThreshold'][k]
|
||||
if valnorm > 1.0 + dev or valnorm < 1.0 - dev: # condition for fail : avg/ref deviates by more than "deviation threshold"
|
||||
logging.debug(f'\u001B[1;30;43m normalized datalog_rt_stats metric {k}={valnorm} deviates by more than {dev}\u001B[0m')
|
||||
RealTimeProcessingIssue = True
|
||||
else:
|
||||
statMsg = 'No real time stats found in the log file\n'
|
||||
|
||||
@@ -24,9 +24,9 @@ gnb :
|
||||
DLSCH encoding:
|
||||
L1 Rx processing:
|
||||
PUSCH inner-receiver:
|
||||
PUSCH decoding:
|
||||
DL & UL scheduling timing:
|
||||
UL Indication:
|
||||
Slot Indication:
|
||||
graph :
|
||||
page1:
|
||||
dlsch_err:
|
||||
@@ -44,6 +44,6 @@ gnb :
|
||||
rt.L1 Rx processing:
|
||||
page4:
|
||||
rt.PUSCH inner-receiver:
|
||||
rt.PUSCH decoding:
|
||||
rt.DL & UL scheduling timing:
|
||||
rt.UL Indication:
|
||||
rt.Slot Indication:
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
000021
|
||||
000022
|
||||
000023
|
||||
000024
|
||||
020021
|
||||
100021
|
||||
</TestCaseRequestedList>
|
||||
@@ -66,6 +67,12 @@
|
||||
<nb_healthy>14</nb_healthy>
|
||||
</testCase>
|
||||
|
||||
<testCase id="000024">
|
||||
<class>Attach_UE</class>
|
||||
<desc>Attach OAI UE (Wait for IP)</desc>
|
||||
<id>rfsim5g_ue rfsim5g_ue2 rfsim5g_ue3</id>
|
||||
</testCase>
|
||||
|
||||
<testCase id="020021">
|
||||
<class>Ping</class>
|
||||
<desc>Ping ext-dn from all NR-UEs</desc>
|
||||
|
||||
@@ -29,6 +29,7 @@
|
||||
100021
|
||||
000021
|
||||
000022
|
||||
000023
|
||||
020021
|
||||
030021
|
||||
030022
|
||||
@@ -59,6 +60,12 @@
|
||||
<nb_healthy>8</nb_healthy>
|
||||
</testCase>
|
||||
|
||||
<testCase id="000023">
|
||||
<class>Attach_UE</class>
|
||||
<desc>Attach OAI UE (Wait for IP)</desc>
|
||||
<id>rfsim5g_ue</id>
|
||||
</testCase>
|
||||
|
||||
<testCase id="020021">
|
||||
<class>Ping</class>
|
||||
<desc>Ping ext-dn from all NR-UEs</desc>
|
||||
|
||||
@@ -28,7 +28,6 @@
|
||||
<TestCaseRequestedList>
|
||||
111111
|
||||
100011
|
||||
000010
|
||||
000011
|
||||
000012
|
||||
000013
|
||||
@@ -47,36 +46,26 @@
|
||||
<images_to_pull>oai-gnb-asan oai-nr-ue-asan</images_to_pull>
|
||||
</testCase>
|
||||
|
||||
<testCase id="000010">
|
||||
<class>DeployGenObject</class>
|
||||
<desc>Deploy MySql Database</desc>
|
||||
<yaml_path>yaml_files/5g_fdd_rfsimulator</yaml_path>
|
||||
<services>mysql</services>
|
||||
<nb_healthy>1</nb_healthy>
|
||||
</testCase>
|
||||
|
||||
<testCase id="000011">
|
||||
<class>DeployGenObject</class>
|
||||
<desc>Deploy OAI 5G CoreNetwork</desc>
|
||||
<yaml_path>yaml_files/5g_fdd_rfsimulator</yaml_path>
|
||||
<services>oai-amf oai-smf oai-upf oai-ext-dn</services>
|
||||
<services>mysql oai-amf oai-smf oai-upf oai-ext-dn</services>
|
||||
<nb_healthy>5</nb_healthy>
|
||||
</testCase>
|
||||
|
||||
<testCase id="000012">
|
||||
<class>DeployGenObject</class>
|
||||
<desc>Deploy OAI 5G gNB RF sim SA</desc>
|
||||
<desc>Deploy OAI 5G gNB+UE RF sim SA</desc>
|
||||
<yaml_path>yaml_files/5g_fdd_rfsimulator</yaml_path>
|
||||
<services>oai-gnb</services>
|
||||
<nb_healthy>6</nb_healthy>
|
||||
<services>oai-gnb oai-nr-ue</services>
|
||||
<nb_healthy>7</nb_healthy>
|
||||
</testCase>
|
||||
|
||||
<testCase id="000013">
|
||||
<class>DeployGenObject</class>
|
||||
<desc>Deploy OAI 5G NR-UE RF sim SA</desc>
|
||||
<yaml_path>yaml_files/5g_fdd_rfsimulator</yaml_path>
|
||||
<services>oai-nr-ue</services>
|
||||
<nb_healthy>7</nb_healthy>
|
||||
<class>Attach_UE</class>
|
||||
<desc>Attach OAI UE (Wait for IP)</desc>
|
||||
<id>rfsim5g_ue</id>
|
||||
</testCase>
|
||||
|
||||
<testCase id="020011">
|
||||
|
||||
@@ -28,7 +28,6 @@
|
||||
<TestCaseRequestedList>
|
||||
111111
|
||||
100001
|
||||
000000
|
||||
000001
|
||||
000002
|
||||
000003
|
||||
@@ -47,36 +46,26 @@
|
||||
<images_to_pull>oai-gnb-asan oai-nr-ue-asan</images_to_pull>
|
||||
</testCase>
|
||||
|
||||
<testCase id="000000">
|
||||
<class>DeployGenObject</class>
|
||||
<desc>Deploy MySql Database</desc>
|
||||
<yaml_path>yaml_files/5g_rfsimulator_24prb</yaml_path>
|
||||
<services>mysql</services>
|
||||
<nb_healthy>1</nb_healthy>
|
||||
</testCase>
|
||||
|
||||
<testCase id="000001">
|
||||
<class>DeployGenObject</class>
|
||||
<desc>Deploy OAI 5G CoreNetwork</desc>
|
||||
<yaml_path>yaml_files/5g_rfsimulator_24prb</yaml_path>
|
||||
<services>oai-amf oai-smf oai-upf oai-ext-dn</services>
|
||||
<services>mysql oai-amf oai-smf oai-upf oai-ext-dn</services>
|
||||
<nb_healthy>5</nb_healthy>
|
||||
</testCase>
|
||||
|
||||
<testCase id="000002">
|
||||
<class>DeployGenObject</class>
|
||||
<desc>Deploy OAI 5G gNB RF sim SA</desc>
|
||||
<desc>Deploy OAI 5G gNB+UE RFsim SA</desc>
|
||||
<yaml_path>yaml_files/5g_rfsimulator_24prb</yaml_path>
|
||||
<services>oai-gnb</services>
|
||||
<nb_healthy>6</nb_healthy>
|
||||
<services>oai-gnb oai-nr-ue</services>
|
||||
<nb_healthy>7</nb_healthy>
|
||||
</testCase>
|
||||
|
||||
<testCase id="000003">
|
||||
<class>DeployGenObject</class>
|
||||
<desc>Deploy OAI 5G NR-UE RF sim SA</desc>
|
||||
<yaml_path>yaml_files/5g_rfsimulator_24prb</yaml_path>
|
||||
<services>oai-nr-ue</services>
|
||||
<nb_healthy>7</nb_healthy>
|
||||
<class>Attach_UE</class>
|
||||
<desc>Attach OAI UE (Wait for IP)</desc>
|
||||
<id>rfsim5g_ue</id>
|
||||
</testCase>
|
||||
|
||||
<testCase id="020001">
|
||||
|
||||
@@ -28,7 +28,6 @@
|
||||
<TestCaseRequestedList>
|
||||
111111
|
||||
100001
|
||||
000000
|
||||
000001
|
||||
000002
|
||||
000003
|
||||
@@ -47,36 +46,26 @@
|
||||
<images_to_pull>oai-gnb-asan oai-nr-ue-asan</images_to_pull>
|
||||
</testCase>
|
||||
|
||||
<testCase id="000000">
|
||||
<class>DeployGenObject</class>
|
||||
<desc>Deploy MySql Database</desc>
|
||||
<yaml_path>yaml_files/5g_rfsimulator_2x2</yaml_path>
|
||||
<services>mysql</services>
|
||||
<nb_healthy>1</nb_healthy>
|
||||
</testCase>
|
||||
|
||||
<testCase id="000001">
|
||||
<class>DeployGenObject</class>
|
||||
<desc>Deploy OAI 5G CoreNetwork</desc>
|
||||
<yaml_path>yaml_files/5g_rfsimulator_2x2</yaml_path>
|
||||
<services>oai-amf oai-smf oai-upf oai-ext-dn</services>
|
||||
<services>mysql oai-amf oai-smf oai-upf oai-ext-dn</services>
|
||||
<nb_healthy>5</nb_healthy>
|
||||
</testCase>
|
||||
|
||||
<testCase id="000002">
|
||||
<class>DeployGenObject</class>
|
||||
<desc>Deploy OAI 5G gNB RF sim SA</desc>
|
||||
<desc>Deploy OAI 5G gNB+UE RF sim SA</desc>
|
||||
<yaml_path>yaml_files/5g_rfsimulator_2x2</yaml_path>
|
||||
<services>oai-gnb</services>
|
||||
<nb_healthy>6</nb_healthy>
|
||||
<services>oai-gnb oai-nr-ue</services>
|
||||
<nb_healthy>7</nb_healthy>
|
||||
</testCase>
|
||||
|
||||
<testCase id="000003">
|
||||
<class>DeployGenObject</class>
|
||||
<desc>Deploy OAI 5G NR-UE RF sim SA</desc>
|
||||
<yaml_path>yaml_files/5g_rfsimulator_2x2</yaml_path>
|
||||
<services>oai-nr-ue</services>
|
||||
<nb_healthy>7</nb_healthy>
|
||||
<class>Attach_UE</class>
|
||||
<desc>Attach OAI UE (Wait for IP)</desc>
|
||||
<id>rfsim5g_ue</id>
|
||||
</testCase>
|
||||
|
||||
<testCase id="020001">
|
||||
|
||||
@@ -43,18 +43,16 @@
|
||||
|
||||
<testCase id="000020">
|
||||
<class>DeployGenObject</class>
|
||||
<desc>Deploy OAI-DU</desc>
|
||||
<desc>Deploy OAI-DU+nrUE</desc>
|
||||
<yaml_path>yaml_files/5g_rfsimulator_accelleran</yaml_path>
|
||||
<services>oai-du</services>
|
||||
<nb_healthy>1</nb_healthy>
|
||||
<services>oai-du oai-nr-ue</services>
|
||||
<nb_healthy>2</nb_healthy>
|
||||
</testCase>
|
||||
|
||||
<testCase id="000021">
|
||||
<class>DeployGenObject</class>
|
||||
<desc>Deploy nrUE</desc>
|
||||
<yaml_path>yaml_files/5g_rfsimulator_accelleran</yaml_path>
|
||||
<services>oai-nr-ue</services>
|
||||
<nb_healthy>2</nb_healthy>
|
||||
<class>Attach_UE</class>
|
||||
<desc>Attach OAI UE (Wait for IP)</desc>
|
||||
<id>rfsim5g_ue</id>
|
||||
</testCase>
|
||||
|
||||
<testCase id="020021">
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
<class>Custom_Command</class>
|
||||
<desc>Clean-Up any residual volume</desc>
|
||||
<node>localhost</node>
|
||||
<command>docker volume rm 5g_rfsimulator_fdd_phytest_rrc.config</command>
|
||||
<command>docker volume rm 5g_rfsimulator_fdd_phytest_rrc.config -f</command>
|
||||
</testCase>
|
||||
|
||||
<testCase id="000010">
|
||||
|
||||
@@ -22,13 +22,12 @@
|
||||
-->
|
||||
<testCaseList>
|
||||
<htmlTabRef>rfsim-fr2-32prb-5gnr-tdd</htmlTabRef>
|
||||
<htmlTabName>Monolithic FR2 do-ra gNB</htmlTabName>
|
||||
<htmlTabName>Monolithic FR2 gNB</htmlTabName>
|
||||
<htmlTabIcon>wrench</htmlTabIcon>
|
||||
<repeatCount>1</repeatCount>
|
||||
<TestCaseRequestedList>
|
||||
111111
|
||||
100001
|
||||
004000
|
||||
000000
|
||||
000001
|
||||
020001
|
||||
@@ -44,42 +43,35 @@
|
||||
<images_to_pull>oai-gnb-asan oai-nr-ue-asan</images_to_pull>
|
||||
</testCase>
|
||||
|
||||
<testCase id="004000">
|
||||
<class>Custom_Command</class>
|
||||
<desc>Clean-Up any residual volume</desc>
|
||||
<node>localhost</node>
|
||||
<command>docker volume rm 5g_rfsimulator_fr2_32prb_rrc.config</command>
|
||||
</testCase>
|
||||
|
||||
<testCase id="000000">
|
||||
<class>DeployGenObject</class>
|
||||
<desc>Deploy OAI gNB</desc>
|
||||
<yaml_path>yaml_files/5g_rfsimulator_fr2_32prb</yaml_path>
|
||||
<services>oai-gnb</services>
|
||||
<nb_healthy>1</nb_healthy>
|
||||
<services>mysql oai-amf oai-smf oai-upf oai-ext-dn</services>
|
||||
<nb_healthy>5</nb_healthy>
|
||||
</testCase>
|
||||
|
||||
<testCase id="000001">
|
||||
<class>DeployGenObject</class>
|
||||
<desc>Deploy OAI NR-UE</desc>
|
||||
<yaml_path>yaml_files/5g_rfsimulator_fr2_32prb</yaml_path>
|
||||
<services>oai-nr-ue</services>
|
||||
<nb_healthy>2</nb_healthy>
|
||||
<services>oai-gnb oai-nr-ue</services>
|
||||
<nb_healthy>7</nb_healthy>
|
||||
</testCase>
|
||||
|
||||
<testCase id="020001">
|
||||
<class>Ping</class>
|
||||
<desc>Ping gNB from NR-UE</desc>
|
||||
<desc>Ping ext-dn from NR-UE</desc>
|
||||
<id>rfsim5g_ue</id>
|
||||
<ping_args>-c20 -i0.2 10.0.1.1</ping_args>
|
||||
<ping_args>-c 20 -i0.2 192.168.72.135</ping_args>
|
||||
<ping_packetloss_threshold>0</ping_packetloss_threshold>
|
||||
</testCase>
|
||||
|
||||
<testCase id="020002">
|
||||
<class>Ping</class>
|
||||
<desc>Ping NR-UE from gNB</desc>
|
||||
<id>rfsim5g_gnb_nos1</id>
|
||||
<ping_args>-c20 -i0.2 10.0.1.2</ping_args>
|
||||
<desc>Ping NR-UE from ext-dn</desc>
|
||||
<id>rfsim5g_ext_dn</id>
|
||||
<ping_args>-c 20 12.1.1.2 -i0.2</ping_args>
|
||||
<ping_packetloss_threshold>0</ping_packetloss_threshold>
|
||||
</testCase>
|
||||
|
||||
@@ -87,8 +79,8 @@
|
||||
<class>UndeployGenObject</class>
|
||||
<desc>Undeploy all OAI 5G stack</desc>
|
||||
<yaml_path>yaml_files/5g_rfsimulator_fr2_32prb</yaml_path>
|
||||
<d_retx_th>0,0,0,0</d_retx_th>
|
||||
<u_retx_th>0,0,0,0</u_retx_th>
|
||||
<d_retx_th>10,0,0,0</d_retx_th>
|
||||
<u_retx_th>10,0,0,0</u_retx_th>
|
||||
</testCase>
|
||||
|
||||
</testCaseList>
|
||||
|
||||
@@ -26,7 +26,6 @@
|
||||
<htmlTabIcon>trash</htmlTabIcon>
|
||||
<TestCaseRequestedList>
|
||||
100002
|
||||
004000
|
||||
222222
|
||||
</TestCaseRequestedList>
|
||||
<TestCaseExclusionList></TestCaseExclusionList>
|
||||
@@ -37,13 +36,6 @@
|
||||
<yaml_path>yaml_files/5g_rfsimulator_fr2_32prb</yaml_path>
|
||||
</testCase>
|
||||
|
||||
<testCase id="004000">
|
||||
<class>Custom_Command</class>
|
||||
<desc>Clean-Up any residual volume</desc>
|
||||
<node>localhost</node>
|
||||
<command>docker volume rm 5g_rfsimulator_fr2_32prb_rrc.config</command>
|
||||
</testCase>
|
||||
|
||||
<testCase id="222222">
|
||||
<class>Clean_Test_Server_Images</class>
|
||||
<desc>Clean Test Images on Test Server</desc>
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
<class>Custom_Command</class>
|
||||
<desc>Clean-Up any residual volume</desc>
|
||||
<node>localhost</node>
|
||||
<command>docker volume rm 5g_rfsimulator_tdd_dora_rrc.config</command>
|
||||
<command>docker volume rm 5g_rfsimulator_tdd_dora_rrc.config -f</command>
|
||||
</testCase>
|
||||
|
||||
<testCase id="000000">
|
||||
|
||||
@@ -28,7 +28,6 @@
|
||||
<TestCaseRequestedList>
|
||||
111111
|
||||
100001
|
||||
000000
|
||||
000001
|
||||
000002
|
||||
000003
|
||||
@@ -47,36 +46,26 @@
|
||||
<images_to_pull>oai-gnb-asan oai-nr-ue-asan</images_to_pull>
|
||||
</testCase>
|
||||
|
||||
<testCase id="000000">
|
||||
<class>DeployGenObject</class>
|
||||
<desc>Deploy MySql Database</desc>
|
||||
<yaml_path>yaml_files/5g_rfsimulator_u0_25prb</yaml_path>
|
||||
<services>mysql</services>
|
||||
<nb_healthy>1</nb_healthy>
|
||||
</testCase>
|
||||
|
||||
<testCase id="000001">
|
||||
<class>DeployGenObject</class>
|
||||
<desc>Deploy OAI 5G CoreNetwork</desc>
|
||||
<yaml_path>yaml_files/5g_rfsimulator_u0_25prb</yaml_path>
|
||||
<services>oai-amf oai-smf oai-upf oai-ext-dn</services>
|
||||
<services>mysql oai-amf oai-smf oai-upf oai-ext-dn</services>
|
||||
<nb_healthy>5</nb_healthy>
|
||||
</testCase>
|
||||
|
||||
<testCase id="000002">
|
||||
<class>DeployGenObject</class>
|
||||
<desc>Deploy OAI 5G gNB RF sim SA</desc>
|
||||
<desc>Deploy OAI 5G gNB+nrUE RF sim SA</desc>
|
||||
<yaml_path>yaml_files/5g_rfsimulator_u0_25prb</yaml_path>
|
||||
<services>oai-gnb</services>
|
||||
<nb_healthy>6</nb_healthy>
|
||||
<services>oai-gnb oai-nr-ue</services>
|
||||
<nb_healthy>7</nb_healthy>
|
||||
</testCase>
|
||||
|
||||
<testCase id="000003">
|
||||
<class>DeployGenObject</class>
|
||||
<desc>Deploy OAI 5G NR-UE RF sim SA</desc>
|
||||
<yaml_path>yaml_files/5g_rfsimulator_u0_25prb</yaml_path>
|
||||
<services>oai-nr-ue</services>
|
||||
<nb_healthy>7</nb_healthy>
|
||||
<class>Attach_UE</class>
|
||||
<desc>Attach OAI UE (Wait for IP)</desc>
|
||||
<id>rfsim5g_ue</id>
|
||||
</testCase>
|
||||
|
||||
<testCase id="020001">
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
|
||||
111111
|
||||
100000
|
||||
010000
|
||||
010010
|
||||
030101
|
||||
010001
|
||||
000001
|
||||
@@ -39,7 +39,6 @@
|
||||
070000
|
||||
070001
|
||||
010010
|
||||
010002
|
||||
030201
|
||||
|
||||
</TestCaseRequestedList>
|
||||
@@ -80,28 +79,16 @@
|
||||
<idle_sleep_time_in_sec>5</idle_sleep_time_in_sec>
|
||||
</testCase>
|
||||
|
||||
<testCase id="010000">
|
||||
<class>Initialize_UE</class>
|
||||
<desc>Initialize Quectel</desc>
|
||||
<id>nrmodule2_quectel</id>
|
||||
</testCase>
|
||||
|
||||
<testCase id="010002">
|
||||
<class>Terminate_UE</class>
|
||||
<desc>Terminate Quectel</desc>
|
||||
<id>nrmodule2_quectel</id>
|
||||
</testCase>
|
||||
|
||||
<testCase id="010001">
|
||||
<class>Attach_UE</class>
|
||||
<desc>Attach UE</desc>
|
||||
<id>nrmodule2_quectel</id>
|
||||
<id>up2</id>
|
||||
</testCase>
|
||||
|
||||
<testCase id="050000">
|
||||
<class>Ping</class>
|
||||
<desc>Ping: 20 pings</desc>
|
||||
<id>nrmodule2_quectel</id>
|
||||
<id>up2</id>
|
||||
<ping_args>-c 20 %cn_ip%</ping_args>
|
||||
<ping_packetloss_threshold>1</ping_packetloss_threshold>
|
||||
<ping_rttavg_threshold>60</ping_rttavg_threshold>
|
||||
@@ -110,8 +97,8 @@
|
||||
<testCase id="050001">
|
||||
<class>Ping</class>
|
||||
<desc>Ping: 100 pings, size 1024</desc>
|
||||
<id>nrmodule2_quectel</id>
|
||||
<ping_args>-c 100 -s 1024 -i 0,2 %cn_ip%</ping_args>
|
||||
<id>up2</id>
|
||||
<ping_args>-c 100 -s 1024 -i 0.2 %cn_ip%</ping_args>
|
||||
<ping_packetloss_threshold>1</ping_packetloss_threshold>
|
||||
<ping_rttavg_threshold>60</ping_rttavg_threshold>
|
||||
</testCase>
|
||||
@@ -121,7 +108,7 @@
|
||||
<desc>iperf (DL/26Mbps/UDP)(60 sec)(single-ue profile)</desc>
|
||||
<iperf_args>-u -b 26M -t 60</iperf_args>
|
||||
<direction>DL</direction>
|
||||
<id>nrmodule2_quectel</id>
|
||||
<id>up2</id>
|
||||
<iperf_packetloss_threshold>5</iperf_packetloss_threshold>
|
||||
<iperf_bitrate_threshold>95</iperf_bitrate_threshold>
|
||||
<iperf_profile>single-ue</iperf_profile>
|
||||
@@ -132,7 +119,7 @@
|
||||
<desc>iperf (UL/7Mbps/UDP)(60 sec)(single-ue profile)</desc>
|
||||
<iperf_args>-u -b 7M -t 60</iperf_args>
|
||||
<direction>UL</direction>
|
||||
<id>nrmodule2_quectel</id>
|
||||
<id>up2</id>
|
||||
<iperf_packetloss_threshold>5</iperf_packetloss_threshold>
|
||||
<iperf_bitrate_threshold>95</iperf_bitrate_threshold>
|
||||
<iperf_profile>single-ue</iperf_profile>
|
||||
@@ -141,7 +128,7 @@
|
||||
<testCase id="010010">
|
||||
<class>Detach_UE</class>
|
||||
<desc>Detach UE</desc>
|
||||
<id>nrmodule2_quectel</id>
|
||||
<id>up2</id>
|
||||
</testCase>
|
||||
|
||||
<testCase id="030201">
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
|
||||
111111
|
||||
100000
|
||||
010000
|
||||
010010
|
||||
030101
|
||||
010001
|
||||
000001
|
||||
@@ -39,7 +39,6 @@
|
||||
070000
|
||||
070001
|
||||
010010
|
||||
010002
|
||||
030201
|
||||
|
||||
</TestCaseRequestedList>
|
||||
@@ -80,28 +79,16 @@
|
||||
<idle_sleep_time_in_sec>5</idle_sleep_time_in_sec>
|
||||
</testCase>
|
||||
|
||||
<testCase id="010000">
|
||||
<class>Initialize_UE</class>
|
||||
<desc>Initialize Quectel</desc>
|
||||
<id>nrmodule2_quectel</id>
|
||||
</testCase>
|
||||
|
||||
<testCase id="010002">
|
||||
<class>Terminate_UE</class>
|
||||
<desc>Terminate Quectel</desc>
|
||||
<id>nrmodule2_quectel</id>
|
||||
</testCase>
|
||||
|
||||
<testCase id="010001">
|
||||
<class>Attach_UE</class>
|
||||
<desc>Attach UE</desc>
|
||||
<id>nrmodule2_quectel</id>
|
||||
<id>up2</id>
|
||||
</testCase>
|
||||
|
||||
<testCase id="050000">
|
||||
<class>Ping</class>
|
||||
<desc>Ping: 20 pings</desc>
|
||||
<id>nrmodule2_quectel</id>
|
||||
<id>up2</id>
|
||||
<ping_args>-c 20 %cn_ip%</ping_args>
|
||||
<ping_packetloss_threshold>1</ping_packetloss_threshold>
|
||||
<ping_rttavg_threshold>60</ping_rttavg_threshold>
|
||||
@@ -110,8 +97,8 @@
|
||||
<testCase id="050001">
|
||||
<class>Ping</class>
|
||||
<desc>Ping: 100 pings, size 1024</desc>
|
||||
<id>nrmodule2_quectel</id>
|
||||
<ping_args>-c 100 -s 1024 -i 0,2 %cn_ip%</ping_args>
|
||||
<id>up2</id>
|
||||
<ping_args>-c 100 -s 1024 -i 0.2 %cn_ip%</ping_args>
|
||||
<ping_packetloss_threshold>1</ping_packetloss_threshold>
|
||||
<ping_rttavg_threshold>60</ping_rttavg_threshold>
|
||||
</testCase>
|
||||
@@ -121,7 +108,7 @@
|
||||
<desc>iperf (DL/26Mbps/UDP)(60 sec)(single-ue profile)</desc>
|
||||
<iperf_args>-u -b 1M -t 60</iperf_args>
|
||||
<direction>DL</direction>
|
||||
<id>nrmodule2_quectel</id>
|
||||
<id>up2</id>
|
||||
<iperf_packetloss_threshold>5</iperf_packetloss_threshold>
|
||||
<iperf_bitrate_threshold>95</iperf_bitrate_threshold>
|
||||
<iperf_profile>single-ue</iperf_profile>
|
||||
@@ -132,7 +119,7 @@
|
||||
<desc>iperf (UL/7Mbps/UDP)(60 sec)(single-ue profile)</desc>
|
||||
<iperf_args>-u -b 7M -t 60</iperf_args>
|
||||
<direction>UL</direction>
|
||||
<id>nrmodule2_quectel</id>
|
||||
<id>up2</id>
|
||||
<iperf_packetloss_threshold>5</iperf_packetloss_threshold>
|
||||
<iperf_bitrate_threshold>95</iperf_bitrate_threshold>
|
||||
<iperf_profile>single-ue</iperf_profile>
|
||||
@@ -141,7 +128,7 @@
|
||||
<testCase id="010010">
|
||||
<class>Detach_UE</class>
|
||||
<desc>Detach UE</desc>
|
||||
<id>nrmodule2_quectel</id>
|
||||
<id>up2</id>
|
||||
</testCase>
|
||||
|
||||
<testCase id="030201">
|
||||
|
||||
@@ -26,6 +26,8 @@
|
||||
<htmlTabIcon>tasks</htmlTabIcon>
|
||||
<repeatCount>1</repeatCount>
|
||||
<TestCaseRequestedList>
|
||||
010001
|
||||
010002
|
||||
030202
|
||||
030201
|
||||
222220
|
||||
@@ -33,6 +35,17 @@
|
||||
</TestCaseRequestedList>
|
||||
<TestCaseExclusionList></TestCaseExclusionList>
|
||||
|
||||
<testCase id= "010001">
|
||||
<class>Detach_UE</class>
|
||||
<desc>Detach UE</desc>
|
||||
<id>idefix</id>
|
||||
</testCase>
|
||||
<testCase id="010002">
|
||||
<class>Terminate_UE</class>
|
||||
<desc>Terminate Quectel</desc>
|
||||
<id>idefix</id>
|
||||
</testCase>
|
||||
|
||||
<testCase id="030201">
|
||||
<class>Undeploy_Object</class>
|
||||
<desc>Undeploy eNB</desc>
|
||||
|
||||
139
ci-scripts/xml_files/container_sa_aerial_quectel.xml
Normal file
139
ci-scripts/xml_files/container_sa_aerial_quectel.xml
Normal file
@@ -0,0 +1,139 @@
|
||||
<!--
|
||||
|
||||
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-AERIAL-SA</htmlTabRef>
|
||||
<htmlTabName>AERIAL 100 MHz TDD SA</htmlTabName>
|
||||
<htmlTabIcon>tasks</htmlTabIcon>
|
||||
<repeatCount>1</repeatCount>
|
||||
<TestCaseRequestedList>
|
||||
111111
|
||||
000222
|
||||
001111
|
||||
002222
|
||||
002223
|
||||
000111
|
||||
100000
|
||||
000011
|
||||
000022
|
||||
000033
|
||||
000222
|
||||
003333
|
||||
222222
|
||||
</TestCaseRequestedList>
|
||||
<TestCaseExclusionList></TestCaseExclusionList>
|
||||
|
||||
<testCase id="111111">
|
||||
<class>Pull_Local_Registry</class>
|
||||
<desc>Pull Images from Local Registry</desc>
|
||||
<test_svr_id>0</test_svr_id>
|
||||
<images_to_pull>oai-gnb-aerial</images_to_pull>
|
||||
</testCase>
|
||||
|
||||
<testCase id="001111">
|
||||
<class>Initialize_UE</class>
|
||||
<desc>Initialize Quectel</desc>
|
||||
<id>sphex_quectel</id>
|
||||
</testCase>
|
||||
|
||||
<testCase id="002222">
|
||||
<class>Deploy_Object</class>
|
||||
<desc>Deploy PNF/Nvidia CUBB in a container</desc>
|
||||
<yaml_path>ci-scripts/yaml_files/sa_gnb_aerial</yaml_path>
|
||||
<services>nv-cubb</services>
|
||||
<eNB_instance>0</eNB_instance>
|
||||
<eNB_serverId>0</eNB_serverId>
|
||||
</testCase>
|
||||
|
||||
<testCase id="002223">
|
||||
<class>Deploy_Object</class>
|
||||
<desc>Deploy VNF in a container</desc>
|
||||
<yaml_path>ci-scripts/yaml_files/sa_gnb_aerial</yaml_path>
|
||||
<services>oai-gnb-aerial</services>
|
||||
<eNB_instance>0</eNB_instance>
|
||||
<eNB_serverId>0</eNB_serverId>
|
||||
</testCase>
|
||||
|
||||
<testCase id="000111">
|
||||
<class>Attach_UE</class>
|
||||
<desc>Attach Quectel</desc>
|
||||
<id>sphex_quectel</id>
|
||||
</testCase>
|
||||
|
||||
<testCase id="100000">
|
||||
<class>Custom_Command</class>
|
||||
<desc>Adding a IP route</desc>
|
||||
<node>sphex</node>
|
||||
<command>sudo ip route add 192.168.71.128/26 via 12.1.1.151 dev wwan0</command>
|
||||
</testCase>
|
||||
|
||||
<testCase id="000011">
|
||||
<class>Ping</class>
|
||||
<desc>Ping: 100pings in 20sec</desc>
|
||||
<id>sphex_quectel</id>
|
||||
<ping_args>-c 100 -i 0.2 %cn_ip%</ping_args>
|
||||
<ping_packetloss_threshold>5</ping_packetloss_threshold>
|
||||
</testCase>
|
||||
|
||||
<testCase id="000022">
|
||||
<class>Iperf</class>
|
||||
<desc>iperf (DL/UDP/80M)(30 sec)(single-ue profile)</desc>
|
||||
<iperf_args>-u -b 80M -t 30 -R</iperf_args>
|
||||
<direction>IPERF3</direction>
|
||||
<id>sphex_quectel</id>
|
||||
<iperf_packetloss_threshold>25</iperf_packetloss_threshold>
|
||||
<iperf_bitrate_threshold>80</iperf_bitrate_threshold>
|
||||
</testCase>
|
||||
|
||||
<testCase id="000033">
|
||||
<class>Iperf</class>
|
||||
<desc>iperf (UL/UDP/40M)(30 sec)(single-ue profile)</desc>
|
||||
<iperf_args>-u -b 40M -t 30</iperf_args>
|
||||
<direction>IPERF3</direction>
|
||||
<id>sphex_quectel</id>
|
||||
<iperf_packetloss_threshold>25</iperf_packetloss_threshold>
|
||||
<iperf_bitrate_threshold>80</iperf_bitrate_threshold>
|
||||
</testCase>
|
||||
|
||||
<testCase id="000222">
|
||||
<class>Detach_UE</class>
|
||||
<desc>Detach Quectel</desc>
|
||||
<id>sphex_quectel</id>
|
||||
</testCase>
|
||||
|
||||
<testCase id="003333">
|
||||
<class>Terminate_UE</class>
|
||||
<desc>Terminate Quectel</desc>
|
||||
<id>sphex_quectel</id>
|
||||
</testCase>
|
||||
|
||||
<testCase id="222222">
|
||||
<class>Undeploy_Object</class>
|
||||
<desc>Undeploy gNB</desc>
|
||||
<yaml_path>ci-scripts/yaml_files/sa_gnb_aerial</yaml_path>
|
||||
<eNB_instance>0</eNB_instance>
|
||||
<eNB_serverId>0</eNB_serverId>
|
||||
<d_retx_th>20,100,100,100</d_retx_th>
|
||||
<u_retx_th>20,100,100,100</u_retx_th>
|
||||
</testCase>
|
||||
</testCaseList>
|
||||
|
||||
52
ci-scripts/xml_files/container_sa_aerial_quectel_cleanup.xml
Normal file
52
ci-scripts/xml_files/container_sa_aerial_quectel_cleanup.xml
Normal file
@@ -0,0 +1,52 @@
|
||||
<!--
|
||||
|
||||
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-aerial-cleanup</htmlTabRef>
|
||||
<htmlTabName>CleanUp AERIAL</htmlTabName>
|
||||
<htmlTabIcon>trash</htmlTabIcon>
|
||||
<TestCaseRequestedList>
|
||||
111111
|
||||
222222
|
||||
333333
|
||||
</TestCaseRequestedList>
|
||||
<TestCaseExclusionList></TestCaseExclusionList>
|
||||
|
||||
<testCase id="111111">
|
||||
<class>Clean_Test_Server_Images</class>
|
||||
<desc>Clean Test Images on Test Server</desc>
|
||||
<test_svr_id>0</test_svr_id>
|
||||
</testCase>
|
||||
|
||||
<testCase id="222222">
|
||||
<class>Detach_UE</class>
|
||||
<desc>Terminate UE</desc>
|
||||
<id>sphex_quectel</id>
|
||||
</testCase>
|
||||
|
||||
<testCase id="333333">
|
||||
<class>Terminate_UE</class>
|
||||
<desc>Terminate UE</desc>
|
||||
<id>sphex_quectel</id>
|
||||
</testCase>
|
||||
|
||||
</testCaseList>
|
||||
@@ -40,9 +40,15 @@
|
||||
002008
|
||||
002009
|
||||
002010
|
||||
002011
|
||||
002012
|
||||
002013
|
||||
002014
|
||||
002015
|
||||
000100
|
||||
000010
|
||||
000020
|
||||
002016
|
||||
000200
|
||||
003000
|
||||
004000
|
||||
@@ -132,12 +138,42 @@
|
||||
<id>amarisoft_ue_10</id>
|
||||
</testCase>
|
||||
|
||||
<testCase id="002011">
|
||||
<class>Attach_UE</class>
|
||||
<desc>Attach UE</desc>
|
||||
<id>amarisoft_ue_11</id>
|
||||
</testCase>
|
||||
|
||||
<testCase id="002012">
|
||||
<class>Attach_UE</class>
|
||||
<desc>Attach UE</desc>
|
||||
<id>amarisoft_ue_12</id>
|
||||
</testCase>
|
||||
|
||||
<testCase id="002013">
|
||||
<class>Attach_UE</class>
|
||||
<desc>Attach UE</desc>
|
||||
<id>amarisoft_ue_13</id>
|
||||
</testCase>
|
||||
|
||||
<testCase id="002014">
|
||||
<class>Attach_UE</class>
|
||||
<desc>Attach UE</desc>
|
||||
<id>amarisoft_ue_14</id>
|
||||
</testCase>
|
||||
|
||||
<testCase id="002015">
|
||||
<class>Attach_UE</class>
|
||||
<desc>Attach UE</desc>
|
||||
<id>amarisoft_ue_15</id>
|
||||
</testCase>
|
||||
|
||||
<testCase id="000010">
|
||||
<class>Iperf</class>
|
||||
<desc>iperf (DL/7Mbps/UDP)(30 sec)(multi-ue profile)</desc>
|
||||
<iperf_args>-u -b 70M -t 30 -i 1 -R</iperf_args>
|
||||
<direction>IPERF3</direction>
|
||||
<id>amarisoft_ue_1 amarisoft_ue_2 amarisoft_ue_3 amarisoft_ue_4 amarisoft_ue_5 amarisoft_ue_6 amarisoft_ue_7 amarisoft_ue_8 amarisoft_ue_9 amarisoft_ue_10</id>
|
||||
<id>amarisoft_ue_1 amarisoft_ue_2 amarisoft_ue_3 amarisoft_ue_4 amarisoft_ue_5 amarisoft_ue_6 amarisoft_ue_7 amarisoft_ue_8 amarisoft_ue_9 amarisoft_ue_10 amarisoft_ue_11 amarisoft_ue_12 amarisoft_ue_13 amarisoft_ue_14 amarisoft_ue_15</id>
|
||||
<iperf_packetloss_threshold>25</iperf_packetloss_threshold>
|
||||
<iperf_bitrate_threshold>80</iperf_bitrate_threshold>
|
||||
<iperf_profile>balanced</iperf_profile>
|
||||
@@ -148,7 +184,7 @@
|
||||
<desc>iperf (UL/3.6Mbps/UDP)(30 sec)(multi-ue profile)</desc>
|
||||
<iperf_args>-u -b 36M -t 30 -i 1 </iperf_args>
|
||||
<direction>IPERF3</direction>
|
||||
<id>amarisoft_ue_1 amarisoft_ue_2 amarisoft_ue_3 amarisoft_ue_4 amarisoft_ue_5 amarisoft_ue_6 amarisoft_ue_7 amarisoft_ue_8 amarisoft_ue_9 amarisoft_ue_10</id>
|
||||
<id>amarisoft_ue_1 amarisoft_ue_2 amarisoft_ue_3 amarisoft_ue_4 amarisoft_ue_5 amarisoft_ue_6 amarisoft_ue_7 amarisoft_ue_8 amarisoft_ue_9 amarisoft_ue_10 amarisoft_ue_11 amarisoft_ue_12 amarisoft_ue_13 amarisoft_ue_14 amarisoft_ue_15</id>
|
||||
<iperf_packetloss_threshold>25</iperf_packetloss_threshold>
|
||||
<iperf_bitrate_threshold>80</iperf_bitrate_threshold>
|
||||
<iperf_profile>balanced</iperf_profile>
|
||||
@@ -157,17 +193,23 @@
|
||||
<testCase id="000100">
|
||||
<class>Ping</class>
|
||||
<desc>Ping: 20pings in 20sec, multi-ue</desc>
|
||||
<id>amarisoft_ue_1 amarisoft_ue_2 amarisoft_ue_3 amarisoft_ue_4 amarisoft_ue_5 amarisoft_ue_6 amarisoft_ue_7 amarisoft_ue_8 amarisoft_ue_9 amarisoft_ue_10</id>
|
||||
<id>amarisoft_ue_1 amarisoft_ue_2 amarisoft_ue_3 amarisoft_ue_4 amarisoft_ue_5 amarisoft_ue_6 amarisoft_ue_7 amarisoft_ue_8 amarisoft_ue_9 amarisoft_ue_10 amarisoft_ue_11 amarisoft_ue_12 amarisoft_ue_13 amarisoft_ue_14 amarisoft_ue_15</id>
|
||||
<ping_args>-c 20 %cn_ip%</ping_args>
|
||||
<ping_packetloss_threshold>1</ping_packetloss_threshold>
|
||||
<ping_rttavg_threshold>25</ping_rttavg_threshold>
|
||||
</testCase>
|
||||
|
||||
<testCase id="002016">
|
||||
<class>Attach_UE</class>
|
||||
<desc>Attach UE</desc>
|
||||
<id>amarisoft_ue_16</id>
|
||||
</testCase>
|
||||
|
||||
<testCase id="000200">
|
||||
<class>Ping</class>
|
||||
<desc>Ping: 100pings in 20sec, multi-ue</desc>
|
||||
<id>amarisoft_ue_1 amarisoft_ue_2 amarisoft_ue_3 amarisoft_ue_4 amarisoft_ue_5 amarisoft_ue_6 amarisoft_ue_7 amarisoft_ue_8 amarisoft_ue_9 amarisoft_ue_10</id>
|
||||
<ping_args>-c 100 -i 0.2 %cn_ip%</ping_args>
|
||||
<desc>Ping: 50pings in 10sec, multi-ue</desc>
|
||||
<id>amarisoft_ue_16</id>
|
||||
<ping_args>-c 50 -i 0.2 %cn_ip%</ping_args>
|
||||
<ping_packetloss_threshold>1</ping_packetloss_threshold>
|
||||
<ping_rttavg_threshold>30</ping_rttavg_threshold>
|
||||
</testCase>
|
||||
@@ -175,7 +217,7 @@
|
||||
<testCase id="003000">
|
||||
<class>Detach_UE</class>
|
||||
<desc>Detach UE</desc>
|
||||
<id>amarisoft_ue_1 amarisoft_ue_2 amarisoft_ue_3 amarisoft_ue_4 amarisoft_ue_5 amarisoft_ue_6 amarisoft_ue_7 amarisoft_ue_8 amarisoft_ue_9 amarisoft_ue_10</id>
|
||||
<id>amarisoft_ue_1 amarisoft_ue_2 amarisoft_ue_3 amarisoft_ue_4 amarisoft_ue_5 amarisoft_ue_6 amarisoft_ue_7 amarisoft_ue_8 amarisoft_ue_9 amarisoft_ue_10 amarisoft_ue_11 amarisoft_ue_12 amarisoft_ue_13 amarisoft_ue_14 amarisoft_ue_15 amarisoft_ue_16</id>
|
||||
</testCase>
|
||||
|
||||
<testCase id="004000">
|
||||
|
||||
@@ -26,10 +26,23 @@
|
||||
<htmlTabIcon>tasks</htmlTabIcon>
|
||||
<repeatCount>1</repeatCount>
|
||||
<TestCaseRequestedList>
|
||||
010001
|
||||
010002
|
||||
030201
|
||||
</TestCaseRequestedList>
|
||||
<TestCaseExclusionList></TestCaseExclusionList>
|
||||
|
||||
<testCase id= "010001">
|
||||
<class>Detach_UE</class>
|
||||
<desc>Detach UE</desc>
|
||||
<id>idefix</id>
|
||||
</testCase>
|
||||
<testCase id="010002">
|
||||
<class>Terminate_UE</class>
|
||||
<desc>Terminate Quectel</desc>
|
||||
<id>idefix</id>
|
||||
</testCase>
|
||||
|
||||
<testCase id="030201">
|
||||
<class>Undeploy_Object</class>
|
||||
<desc>Undeploy gNB</desc>
|
||||
|
||||
@@ -37,6 +37,10 @@
|
||||
370001
|
||||
370000
|
||||
370002
|
||||
360001
|
||||
100002
|
||||
360002
|
||||
350000
|
||||
310011
|
||||
310002
|
||||
330201
|
||||
@@ -114,9 +118,9 @@
|
||||
|
||||
<testCase id="350000">
|
||||
<class>Ping</class>
|
||||
<desc>Ping: 20pings in 20sec</desc>
|
||||
<desc>Ping: 50pings in 10sec</desc>
|
||||
<id>idefix</id>
|
||||
<ping_args>-c 20 %cn_ip%</ping_args>
|
||||
<ping_args>-c 20 -i 0.2 %cn_ip%</ping_args>
|
||||
<ping_packetloss_threshold>1</ping_packetloss_threshold>
|
||||
<ping_rttavg_threshold>25</ping_rttavg_threshold>
|
||||
</testCase>
|
||||
@@ -152,6 +156,27 @@
|
||||
<iperf_profile>single-ue</iperf_profile>
|
||||
</testCase>
|
||||
|
||||
<testCase id="360001">
|
||||
<class>Custom_Command</class>
|
||||
<desc>Trigger Reestablishment (on DU)</desc>
|
||||
<node>ofqot</node>
|
||||
<command>echo ci force_reestab | nc -N 192.168.68.195 9090 | grep -E 'Reset RLC counters of UE RNTI [0-9a-f]{4} to trigger reestablishment'</command>
|
||||
<command_fail>yes</command_fail>
|
||||
</testCase>
|
||||
<testCase id="360002">
|
||||
<class>Custom_Command</class>
|
||||
<desc>Verify Reestablishment (on CU)</desc>
|
||||
<node>ofqot</node>
|
||||
<command>echo ci get_reestab_count | nc -N 192.168.68.194 9090 | grep -E 'UE RNTI [0-9a-f]{4} reestab 1'</command>
|
||||
<command_fail>yes</command_fail>
|
||||
</testCase>
|
||||
|
||||
<testCase id="100002">
|
||||
<class>IdleSleep</class>
|
||||
<desc>Sleep</desc>
|
||||
<idle_sleep_time_in_sec>10</idle_sleep_time_in_sec>
|
||||
</testCase>
|
||||
|
||||
<testCase id="330201">
|
||||
<class>Undeploy_Object</class>
|
||||
<desc>Undeploy CU-DU</desc>
|
||||
|
||||
@@ -26,11 +26,24 @@
|
||||
<htmlTabIcon>tasks</htmlTabIcon>
|
||||
<repeatCount>1</repeatCount>
|
||||
<TestCaseRequestedList>
|
||||
010001
|
||||
010002
|
||||
330201
|
||||
222222
|
||||
</TestCaseRequestedList>
|
||||
<TestCaseExclusionList></TestCaseExclusionList>
|
||||
|
||||
<testCase id= "010001">
|
||||
<class>Detach_UE</class>
|
||||
<desc>Detach UE</desc>
|
||||
<id>idefix</id>
|
||||
</testCase>
|
||||
<testCase id="010002">
|
||||
<class>Terminate_UE</class>
|
||||
<desc>Terminate Quectel</desc>
|
||||
<id>idefix</id>
|
||||
</testCase>
|
||||
|
||||
<testCase id="330201">
|
||||
<class>Undeploy_Object</class>
|
||||
<desc>Undeploy CU-CP/CU-UP/DU</desc>
|
||||
|
||||
@@ -26,10 +26,23 @@
|
||||
<htmlTabIcon>tasks</htmlTabIcon>
|
||||
<repeatCount>1</repeatCount>
|
||||
<TestCaseRequestedList>
|
||||
010001
|
||||
010002
|
||||
230201
|
||||
</TestCaseRequestedList>
|
||||
<TestCaseExclusionList></TestCaseExclusionList>
|
||||
|
||||
<testCase id= "010001">
|
||||
<class>Detach_UE</class>
|
||||
<desc>Detach UE</desc>
|
||||
<id>idefix</id>
|
||||
</testCase>
|
||||
<testCase id="010002">
|
||||
<class>Terminate_UE</class>
|
||||
<desc>Terminate Quectel</desc>
|
||||
<id>idefix</id>
|
||||
</testCase>
|
||||
|
||||
<testCase id="230201">
|
||||
<class>Undeploy_Object</class>
|
||||
<desc>Undeploy CU-DU</desc>
|
||||
|
||||
@@ -26,10 +26,23 @@
|
||||
<htmlTabIcon>tasks</htmlTabIcon>
|
||||
<repeatCount>1</repeatCount>
|
||||
<TestCaseRequestedList>
|
||||
010001
|
||||
010002
|
||||
030201
|
||||
</TestCaseRequestedList>
|
||||
<TestCaseExclusionList></TestCaseExclusionList>
|
||||
|
||||
<testCase id= "010001">
|
||||
<class>Detach_UE</class>
|
||||
<desc>Detach UE</desc>
|
||||
<id>idefix</id>
|
||||
</testCase>
|
||||
<testCase id="010002">
|
||||
<class>Terminate_UE</class>
|
||||
<desc>Terminate Quectel</desc>
|
||||
<id>idefix</id>
|
||||
</testCase>
|
||||
|
||||
<testCase id="030201">
|
||||
<class>Undeploy_Object</class>
|
||||
<desc>Undeploy gNB</desc>
|
||||
|
||||
45
ci-scripts/xml_files/fr1_cn5g_basic_deploy.xml
Normal file
45
ci-scripts/xml_files/fr1_cn5g_basic_deploy.xml
Normal file
@@ -0,0 +1,45 @@
|
||||
<!--
|
||||
|
||||
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>cn5g-start-tab</htmlTabRef>
|
||||
<htmlTabName>CN5G-Start</htmlTabName>
|
||||
<htmlTabIcon>log-in</htmlTabIcon>
|
||||
<TestCaseRequestedList>
|
||||
000100
|
||||
000200
|
||||
</TestCaseRequestedList>
|
||||
<TestCaseExclusionList>
|
||||
</TestCaseExclusionList>
|
||||
|
||||
<testCase id="000100">
|
||||
<class>Terminate_5GCN</class>
|
||||
<desc>Terminate 5G Core</desc>
|
||||
<args>--type stop-basic</args>
|
||||
</testCase>
|
||||
|
||||
<testCase id="000200">
|
||||
<class>Initialize_5GCN</class>
|
||||
<desc>Initialize 5G Core</desc>
|
||||
<args>--type start-basic</args>
|
||||
</testCase>
|
||||
</testCaseList>
|
||||
39
ci-scripts/xml_files/fr1_cn5g_basic_undeploy.xml
Normal file
39
ci-scripts/xml_files/fr1_cn5g_basic_undeploy.xml
Normal file
@@ -0,0 +1,39 @@
|
||||
<!--
|
||||
|
||||
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>cn5g-start-tab</htmlTabRef>
|
||||
<htmlTabName>CN5G-Start</htmlTabName>
|
||||
<htmlTabIcon>log-in</htmlTabIcon>
|
||||
<TestCaseRequestedList>
|
||||
000300
|
||||
</TestCaseRequestedList>
|
||||
<TestCaseExclusionList>
|
||||
</TestCaseExclusionList>
|
||||
|
||||
<testCase id="000300">
|
||||
<class>Terminate_5GCN</class>
|
||||
<desc>Terminate 5G Core</desc>
|
||||
<args>--type stop-basic</args>
|
||||
</testCase>
|
||||
</testCaseList>
|
||||
|
||||
68
ci-scripts/xml_files/gnb_phytest_usrp_run_100_2x2.xml
Normal file
68
ci-scripts/xml_files/gnb_phytest_usrp_run_100_2x2.xml
Normal file
@@ -0,0 +1,68 @@
|
||||
<!--
|
||||
|
||||
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>gNB-PHY-Test-100-2x2</htmlTabRef>
|
||||
<htmlTabName>Timing phytest 100 MHz 2x2</htmlTabName>
|
||||
<htmlTabIcon>tasks</htmlTabIcon>
|
||||
<repeatCount>1</repeatCount>
|
||||
<TestCaseRequestedList>
|
||||
100000 390101 000001 390109 200000
|
||||
</TestCaseRequestedList>
|
||||
<TestCaseExclusionList></TestCaseExclusionList>
|
||||
<testCase id="100000">
|
||||
<class>Custom_Command</class>
|
||||
<desc>Disable Sleep States</desc>
|
||||
<node>caracal</node>
|
||||
<command>sudo cpupower idle-set -D 0</command>
|
||||
</testCase>
|
||||
<testCase id="200000">
|
||||
<class>Custom_Command</class>
|
||||
<desc>Enable Sleep States</desc>
|
||||
<node>caracal</node>
|
||||
<command>sudo cpupower idle-set -E</command>
|
||||
</testCase>
|
||||
|
||||
<testCase id="390101">
|
||||
<class>Initialize_eNB</class>
|
||||
<desc>Initialize gNB USRP</desc>
|
||||
<Initialize_eNB_args>-O ci-scripts/conf_files/gnb.band78.273prb.usrpn300.phytest-dora.conf --phy-test -q -U 787200 -T 273 -t 23 -D 130175 -m 23 -M 273 -l 2 --usrp-tx-thread-config 1 --log_config.global_log_options level,nocolor,time</Initialize_eNB_args>
|
||||
<rt_stats_cfg>datalog_rt_stats.100.2x2.yaml</rt_stats_cfg>
|
||||
<air_interface>NR</air_interface>
|
||||
<USRP_IPAddress>192.168.20.2</USRP_IPAddress>
|
||||
<cmd_prefix>numactl --cpunodebind=netdev:enp94s0f0np0 --membind=netdev:enp94s0f0np0</cmd_prefix>
|
||||
</testCase>
|
||||
|
||||
<testCase id="000001">
|
||||
<class>IdleSleep</class>
|
||||
<desc>Sleep</desc>
|
||||
<idle_sleep_time_in_sec>60</idle_sleep_time_in_sec>
|
||||
</testCase>
|
||||
|
||||
|
||||
<testCase id="390109">
|
||||
<class>Terminate_eNB</class>
|
||||
<desc>Terminate gNB</desc>
|
||||
<air_interface>NR</air_interface>
|
||||
</testCase>
|
||||
|
||||
</testCaseList>
|
||||
@@ -65,7 +65,7 @@ $ docker logout
|
||||
All the following commands **SHALL** be run from the `ci-scripts/yaml_files/5g_rfsimulator` folder for a deployment with monolithic gNB.
|
||||
|
||||
For a deployment with the gNB split in CU and DU components, please refer to the `../5g_f1_rfsimulator` folder.
|
||||
For a deployment with the gNB split in CU-CP, CU-UP, and DU components, please refer to the ../5g_rfsimulator_e1` folder.
|
||||
For a deployment with the gNB split in CU-CP, CU-UP, and DU components, please refer to the `../5g_rfsimulator_e1` folder.
|
||||
|
||||
## 2.1. Deploy OAI 5G Core Network ##
|
||||
|
||||
|
||||
@@ -389,7 +389,7 @@ networks:
|
||||
name: rfsim5g-oai-e1-net
|
||||
ipam:
|
||||
config:
|
||||
- subnet: 192.168.77.1/28
|
||||
- subnet: 192.168.77.0/28
|
||||
driver_opts:
|
||||
com.docker.network.bridge.name: "rfsim5g-e1"
|
||||
ue_net:
|
||||
@@ -397,6 +397,6 @@ networks:
|
||||
name: rfsim5g-oai-ue-net
|
||||
ipam:
|
||||
config:
|
||||
- subnet: 192.168.78.1/28
|
||||
- subnet: 192.168.78.0/28
|
||||
driver_opts:
|
||||
com.docker.network.bridge.name: "rfsim5g-ue"
|
||||
|
||||
@@ -1,18 +1,99 @@
|
||||
version: '3.8'
|
||||
services:
|
||||
mysql:
|
||||
container_name: "rfsim5g-mysql"
|
||||
image: mysql:8.0
|
||||
volumes:
|
||||
- ../5g_rfsimulator/oai_db.sql:/docker-entrypoint-initdb.d/oai_db.sql
|
||||
- ../5g_rfsimulator/mysql-healthcheck.sh:/tmp/mysql-healthcheck.sh
|
||||
environment:
|
||||
- TZ=Europe/Paris
|
||||
- MYSQL_DATABASE=oai_db
|
||||
- MYSQL_USER=test
|
||||
- MYSQL_PASSWORD=test
|
||||
- MYSQL_ROOT_PASSWORD=linux
|
||||
healthcheck:
|
||||
test: /bin/bash -c "/tmp/mysql-healthcheck.sh"
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 30
|
||||
networks:
|
||||
public_net:
|
||||
ipv4_address: 192.168.71.131
|
||||
oai-amf:
|
||||
container_name: "rfsim5g-oai-amf"
|
||||
image: oaisoftwarealliance/oai-amf:v2.0.0
|
||||
environment:
|
||||
- TZ=Europe/paris
|
||||
volumes:
|
||||
- ../5g_rfsimulator/mini_nonrf_config.yaml:/openair-amf/etc/config.yaml
|
||||
depends_on:
|
||||
- mysql
|
||||
networks:
|
||||
public_net:
|
||||
ipv4_address: 192.168.71.132
|
||||
oai-smf:
|
||||
container_name: "rfsim5g-oai-smf"
|
||||
image: oaisoftwarealliance/oai-smf:v2.0.0
|
||||
environment:
|
||||
- TZ=Europe/Paris
|
||||
volumes:
|
||||
- ../5g_rfsimulator/mini_nonrf_config.yaml:/openair-smf/etc/config.yaml
|
||||
depends_on:
|
||||
- oai-amf
|
||||
networks:
|
||||
public_net:
|
||||
ipv4_address: 192.168.71.133
|
||||
oai-upf:
|
||||
container_name: "rfsim5g-oai-upf"
|
||||
image: oaisoftwarealliance/oai-upf:v2.0.0
|
||||
environment:
|
||||
- TZ=Europe/Paris
|
||||
volumes:
|
||||
- ../5g_rfsimulator/mini_nonrf_config.yaml:/openair-upf/etc/config.yaml
|
||||
depends_on:
|
||||
- oai-smf
|
||||
cap_add:
|
||||
- NET_ADMIN
|
||||
- SYS_ADMIN
|
||||
cap_drop:
|
||||
- ALL
|
||||
privileged: true
|
||||
networks:
|
||||
public_net:
|
||||
ipv4_address: 192.168.71.134
|
||||
traffic_net:
|
||||
ipv4_address: 192.168.72.134
|
||||
oai-ext-dn:
|
||||
privileged: true
|
||||
container_name: rfsim5g-oai-ext-dn
|
||||
image: oaisoftwarealliance/trf-gen-cn5g:focal
|
||||
entrypoint: /bin/bash -c \
|
||||
"iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE;"\
|
||||
"ip route add 12.1.1.0/24 via 192.168.72.134 dev eth0; sleep infinity"
|
||||
depends_on:
|
||||
- oai-upf
|
||||
networks:
|
||||
traffic_net:
|
||||
ipv4_address: 192.168.72.135
|
||||
healthcheck:
|
||||
test: /bin/bash -c "ping -c 2 192.168.72.134"
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
|
||||
oai-gnb:
|
||||
image: oaisoftwarealliance/oai-gnb:develop
|
||||
privileged: true
|
||||
container_name: rfsim5g-oai-gnb
|
||||
environment:
|
||||
USE_ADDITIONAL_OPTIONS: --do-ra --rfsim --rfsimulator.wait_timeout 20 --noS1 --log_config.global_log_options level,nocolor,time
|
||||
USE_ADDITIONAL_OPTIONS: --sa --rfsim --log_config.global_log_options level,nocolor,time
|
||||
ASAN_OPTIONS: detect_leaks=0
|
||||
networks:
|
||||
public_net:
|
||||
ipv4_address: 192.168.71.140
|
||||
volumes:
|
||||
- ../../conf_files/gnb.band261.32prb.rfsim.phytest-dora.conf:/opt/oai-gnb/etc/gnb.conf
|
||||
- rrc.config:/opt/oai-gnb/
|
||||
- ../../conf_files/gnb.sa.band261.u3.32prb.rfsim.conf:/opt/oai-gnb/etc/gnb.conf
|
||||
healthcheck:
|
||||
test: /bin/bash -c "pgrep nr-softmodem"
|
||||
interval: 10s
|
||||
@@ -24,11 +105,12 @@ services:
|
||||
privileged: true
|
||||
container_name: rfsim5g-oai-nr-ue
|
||||
environment:
|
||||
USE_ADDITIONAL_OPTIONS: --do-ra --rfsim --noS1 --reconfig-file etc/rrc/reconfig.raw --rbconfig-file etc/rrc/rbconfig.raw --rfsimulator.serveraddr 192.168.71.140 --log_config.global_log_options level,nocolor,time
|
||||
USE_ADDITIONAL_OPTIONS: --sa --rfsim
|
||||
--rfsimulator.serveraddr 192.168.71.140 --log_config.global_log_options level,nocolor,time
|
||||
-r 32 --numerology 3 --band 261 -C 27533160000 --ssb 73
|
||||
ASAN_OPTIONS: detect_leaks=0
|
||||
volumes:
|
||||
- ../../conf_files/nrue.uicc.conf:/opt/oai-nr-ue/etc/nr-ue.conf
|
||||
- rrc.config:/opt/oai-nr-ue/etc/rrc/
|
||||
depends_on:
|
||||
- oai-gnb
|
||||
networks:
|
||||
@@ -40,9 +122,6 @@ services:
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
|
||||
volumes:
|
||||
rrc.config:
|
||||
|
||||
networks:
|
||||
public_net:
|
||||
driver: bridge
|
||||
@@ -52,3 +131,11 @@ networks:
|
||||
- subnet: 192.168.71.128/26
|
||||
driver_opts:
|
||||
com.docker.network.bridge.name: "rfsim5g-public"
|
||||
traffic_net:
|
||||
driver: bridge
|
||||
name: rfsim5g-oai-traffic-net
|
||||
ipam:
|
||||
config:
|
||||
- subnet: 192.168.72.128/26
|
||||
driver_opts:
|
||||
com.docker.network.bridge.name: "rfsim5g-traffic"
|
||||
|
||||
@@ -5,6 +5,8 @@ services:
|
||||
privileged: true
|
||||
network_mode: "host"
|
||||
container_name: oai-gnb
|
||||
ulimits:
|
||||
core: -1 # for core dumps
|
||||
environment:
|
||||
TZ: Europe/Paris
|
||||
USE_ADDITIONAL_OPTIONS: --sa --tune-offset 20000000 -A 45 --log_config.global_log_options level,nocolor,time
|
||||
|
||||
@@ -5,10 +5,12 @@ services:
|
||||
privileged: true
|
||||
network_mode: host
|
||||
container_name: oai-nr-ue
|
||||
ulimits:
|
||||
core: -1 # for core dumps
|
||||
#entrypoint: /bin/bash -c "sleep infinity"
|
||||
environment:
|
||||
TZ: Europe/Paris
|
||||
USE_ADDITIONAL_OPTIONS: --usrp-args type=n3xx,name=ni-n3xx-31641B9,addr=192.168.20.2 -r 106 --numerology 1 --band 78 -C 3511200000 --sa --ue-fo-compensation --ue-rxgain 65 --tune-offset 20000000 -A 45 --log_config.global_log_options level,nocolor,time --uicc0.imsi 208970000000111 --uicc0.nssai_sd 16777215
|
||||
USE_ADDITIONAL_OPTIONS: --usrp-args type=n3xx,name=ni-n3xx-31641B9,addr=192.168.10.2 -r 106 --numerology 1 --band 78 -C 3511200000 --sa --ue-fo-compensation --ue-rxgain 65 --tune-offset 20000000 -A 45 --log_config.global_log_options level,nocolor,time --uicc0.imsi 208970000000111 --uicc0.nssai_sd 16777215
|
||||
volumes:
|
||||
- ../../conf_files/ue.sa.conf:/opt/oai-nr-ue/etc/nr-ue.conf
|
||||
healthcheck:
|
||||
|
||||
@@ -5,6 +5,8 @@ services:
|
||||
image: oai-enb:latest
|
||||
privileged: true
|
||||
container_name: nsa-b200-enb
|
||||
ulimits:
|
||||
core: -1 # for core dumps
|
||||
environment:
|
||||
USE_B2XX: 'yes'
|
||||
USE_ADDITIONAL_OPTIONS: --log_config.global_log_options level,nocolor,time,line_num,function
|
||||
|
||||
@@ -5,6 +5,8 @@ services:
|
||||
image: oai-gnb:latest
|
||||
privileged: true
|
||||
container_name: nsa-b200-gnb
|
||||
ulimits:
|
||||
core: -1 # for core dumps
|
||||
environment:
|
||||
USE_B2XX: 'yes'
|
||||
USE_ADDITIONAL_OPTIONS: -E -q --RUs.[0].sdr_addrs serial=30C51D4 --continuous-tx --log_config.global_log_options level,nocolor,time,line_num,function
|
||||
|
||||
@@ -5,6 +5,8 @@ services:
|
||||
privileged: true
|
||||
network_mode: "host"
|
||||
container_name: oai-gnb-aw2s
|
||||
ulimits:
|
||||
core: -1 # for core dumps
|
||||
environment:
|
||||
TZ: Europe/Paris
|
||||
USE_ADDITIONAL_OPTIONS: --sa
|
||||
|
||||
@@ -5,6 +5,8 @@ services:
|
||||
image: oai-gnb:latest
|
||||
privileged: true
|
||||
container_name: sa-b200-gnb
|
||||
ulimits:
|
||||
core: -1 # for core dumps
|
||||
environment:
|
||||
USE_B2XX: 'yes'
|
||||
USE_ADDITIONAL_OPTIONS: --sa --RUs.[0].sdr_addrs serial=30C51D4 --telnetsrv --telnetsrv.shrmod ci --continuous-tx --log_config.global_log_options level,nocolor,time,line_num,function
|
||||
|
||||
@@ -5,8 +5,10 @@ services:
|
||||
image: oai-gnb:latest
|
||||
privileged: true
|
||||
container_name: sa-cucp-gnb
|
||||
ulimits:
|
||||
core: -1 # for core dumps
|
||||
environment:
|
||||
USE_ADDITIONAL_OPTIONS: --sa --log_config.global_log_options level,nocolor,time,line_num,function
|
||||
USE_ADDITIONAL_OPTIONS: --sa --telnetsrv --telnetsrv.shrmod ci --log_config.global_log_options level,nocolor,time,line_num,function
|
||||
volumes:
|
||||
- ../../conf_files/gnb-cucp.sa.f1.quectel.conf:/opt/oai-gnb/etc/gnb.conf
|
||||
networks:
|
||||
@@ -23,6 +25,8 @@ services:
|
||||
image: oai-nr-cuup:latest
|
||||
privileged: true
|
||||
container_name: sa-cuup-gnb
|
||||
ulimits:
|
||||
core: -1 # for core dumps
|
||||
environment:
|
||||
USE_ADDITIONAL_OPTIONS: --sa --log_config.global_log_options level,nocolor,time,line_num,function
|
||||
volumes:
|
||||
@@ -41,9 +45,17 @@ services:
|
||||
image: oai-gnb:latest
|
||||
privileged: true
|
||||
container_name: sa-du-b200-gnb
|
||||
ulimits:
|
||||
core: -1 # for core dumps
|
||||
environment:
|
||||
USE_B2XX: 'yes'
|
||||
USE_ADDITIONAL_OPTIONS: --sa --RUs.[0].sdr_addrs serial=30C51D4 --continuous-tx -E --log_config.global_log_options level,nocolor,time,line_num,function --gNBs.[0].min_rxtxtime 2 --gNBs.[0].do_CSIRS 1 --gNBs.[0].do_SRS 1 --RUs.[0].att_rx 18 --RUs.[0].att_tx 18
|
||||
USE_ADDITIONAL_OPTIONS: --sa
|
||||
--RUs.[0].sdr_addrs serial=30C51D4
|
||||
--continuous-tx -E
|
||||
--telnetsrv --telnetsrv.shrmod ci
|
||||
--gNBs.[0].min_rxtxtime 2 --gNBs.[0].do_CSIRS 1 --gNBs.[0].do_SRS 1
|
||||
--RUs.[0].att_rx 18 --RUs.[0].att_tx 18
|
||||
--log_config.global_log_options level,nocolor,time,line_num,function
|
||||
volumes:
|
||||
- ../../conf_files/gnb-du.sa.band78.106prb.usrpb200.conf:/opt/oai-gnb/etc/gnb.conf
|
||||
- /dev:/dev
|
||||
|
||||
@@ -5,6 +5,8 @@ services:
|
||||
image: oai-gnb:latest
|
||||
privileged: true
|
||||
container_name: sa-cu-gnb
|
||||
ulimits:
|
||||
core: -1 # for core dumps
|
||||
environment:
|
||||
USE_ADDITIONAL_OPTIONS: --sa --telnetsrv --telnetsrv.shrmod ci --log_config.global_log_options level,nocolor,time,line_num,function
|
||||
volumes:
|
||||
@@ -24,9 +26,11 @@ services:
|
||||
image: oai-gnb:latest
|
||||
privileged: true
|
||||
container_name: sa-du-b200-gnb
|
||||
ulimits:
|
||||
core: -1 # for core dumps
|
||||
environment:
|
||||
USE_B2XX: 'yes'
|
||||
USE_ADDITIONAL_OPTIONS: --sa --RUs.[0].sdr_addrs serial=30C51D4 --telnetsrv --telnetsrv.shrmod ci --log_config.global_log_options level,nocolor,time,line_num,function --gNBs.[0].min_rxtxtime 2 --gNBs.[0].do_CSIRS 1 --gNBs.[0].do_SRS 0 --MACRLCs.[0].ul_max_mcs 28 --L1s.[0].max_ldpc_iterations 20
|
||||
USE_ADDITIONAL_OPTIONS: --sa --RUs.[0].sdr_addrs serial=30C51D4 --telnetsrv --telnetsrv.shrmod ci --log_config.global_log_options level,nocolor,time,line_num,function --gNBs.[0].min_rxtxtime 2 --gNBs.[0].do_CSIRS 1 --gNBs.[0].do_SRS 0 --L1s.[0].max_ldpc_iterations 20
|
||||
volumes:
|
||||
- ../../conf_files/gnb-du.sa.band1.52prb.usrpb210.conf:/opt/oai-gnb/etc/gnb.conf
|
||||
- /dev:/dev
|
||||
|
||||
37
ci-scripts/yaml_files/sa_gnb_aerial/aerial_l1_entrypoint.sh
Executable file
37
ci-scripts/yaml_files/sa_gnb_aerial/aerial_l1_entrypoint.sh
Executable file
@@ -0,0 +1,37 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Check if cuBB_SDK is defined, if not, use default path
|
||||
cuBB_Path="${cuBB_SDK:-/opt/nvidia/cuBB}"
|
||||
|
||||
# Run gdrcopy insmod
|
||||
cd "$cuBB_Path"/cuPHY-CP/external/gdrcopy/ || exit 1
|
||||
|
||||
./insmod.sh
|
||||
cd "$cuBB_Path" || exit 1
|
||||
# Add gdrcopy to LD_LIBRARY_PATH
|
||||
export LD_LIBRARY_PATH=/usr/local/nvidia/lib:/usr/local/nvidia/lib64:/opt/mellanox/dpdk/lib/x86_64-linux-gnu:/opt/mellanox/doca/lib/x86_64-linux-gnu:/opt/nvidia/cuBB/cuPHY-CP/external/gdrcopy/build/x86_64/
|
||||
|
||||
# Restart MPS
|
||||
# Export variables
|
||||
export CUDA_DEVICE_MAX_CONNECTIONS=8
|
||||
export CUDA_MPS_PIPE_DIRECTORY=/var
|
||||
export CUDA_MPS_LOG_DIRECTORY=/var
|
||||
|
||||
# Stop existing MPS
|
||||
echo quit | nvidia-cuda-mps-control
|
||||
|
||||
# Start MPS
|
||||
nvidia-cuda-mps-control -d
|
||||
echo start_server -uid 0 | nvidia-cuda-mps-control
|
||||
|
||||
# Start cuphycontroller_scf
|
||||
# Check if an argument is provided
|
||||
if [ $# -eq 0 ]; then
|
||||
# No argument provided, use default value
|
||||
argument="P5G_SCF_FXN"
|
||||
else
|
||||
# Argument provided, use it
|
||||
argument="$1"
|
||||
fi
|
||||
|
||||
"$cuBB_Path"/build/cuPHY-CP/cuphycontroller/examples/cuphycontroller_scf "$argument"
|
||||
65
ci-scripts/yaml_files/sa_gnb_aerial/docker-compose.yaml
Normal file
65
ci-scripts/yaml_files/sa_gnb_aerial/docker-compose.yaml
Normal file
@@ -0,0 +1,65 @@
|
||||
version: "3.8"
|
||||
services:
|
||||
nv-cubb:
|
||||
container_name: nv-cubb
|
||||
deploy:
|
||||
resources:
|
||||
reservations:
|
||||
devices:
|
||||
- driver: nvidia
|
||||
count: all
|
||||
capabilities:
|
||||
- gpu
|
||||
network_mode: host
|
||||
shm_size: 4096m
|
||||
privileged: true
|
||||
stdin_open: true
|
||||
tty: true
|
||||
volumes:
|
||||
- /lib/modules:/lib/modules
|
||||
- /dev/hugepages:/dev/hugepages
|
||||
- /usr/src:/usr/src
|
||||
- ./aerial_l1_entrypoint.sh:/opt/nvidia/cuBB/aerial_l1_entrypoint.sh
|
||||
- /var/log/aerial:/var/log/aerial
|
||||
- ../../../cmake_targets/share:/opt/cuBB/share
|
||||
userns_mode: host
|
||||
ipc: "shareable"
|
||||
image: cubb-build:23-2
|
||||
environment:
|
||||
- cuBB_SDK=/opt/nvidia/cuBB
|
||||
command: bash -c " rm -rf /tmp/phy.log && chmod +x /opt/nvidia/cuBB/aerial_l1_entrypoint.sh && /opt/nvidia/cuBB/aerial_l1_entrypoint.sh"
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL",'grep -q "L1 is ready!" /tmp/phy.log && echo 0 || echo 1']
|
||||
interval: 20s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
oai-gnb-aerial:
|
||||
cpuset: "13-20"
|
||||
image: oai-gnb-aerial:latest
|
||||
depends_on:
|
||||
nv-cubb:
|
||||
condition: service_healthy
|
||||
privileged: true
|
||||
ipc: "container:nv-cubb"
|
||||
environment:
|
||||
USE_ADDITIONAL_OPTIONS: --log_config.global_log_options level,nocolor,time
|
||||
deploy:
|
||||
resources:
|
||||
reservations:
|
||||
devices:
|
||||
- driver: nvidia
|
||||
count: all
|
||||
capabilities:
|
||||
- gpu
|
||||
network_mode: host
|
||||
shm_size: 4096m
|
||||
stdin_open: true
|
||||
tty: true
|
||||
volumes:
|
||||
- ../../conf_files/gnb-vnf.sa.band78.273prb.aerial.conf:/opt/oai-gnb/etc/gnb.conf
|
||||
container_name: oai-gnb-aerial
|
||||
healthcheck:
|
||||
test: /bin/bash -c "ps aux | grep -v grep | grep -c softmodem"
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
@@ -5,6 +5,8 @@ services:
|
||||
image: oai-gnb:latest
|
||||
privileged: true
|
||||
container_name: sa-b200-gnb
|
||||
ulimits:
|
||||
core: -1 # for core dumps
|
||||
environment:
|
||||
USE_B2XX: 'yes'
|
||||
USE_ADDITIONAL_OPTIONS: --sa --RUs.[0].sdr_addrs serial=30C51D4 --telnetsrv --telnetsrv.shrmod ci --continuous-tx --log_config.global_log_options level,nocolor,time,line_num,function -E
|
||||
|
||||
@@ -93,7 +93,7 @@ Options:
|
||||
--UE-gen-nvram [output path]
|
||||
Specify gen_nvram_path (default \"$gen_nvram_path\")
|
||||
-w | --hardware
|
||||
USRP, BLADERF, LMSSDR, IRIS, SIMU, AW2SORI, None (Default)
|
||||
USRP, BLADERF, LMSSDR, IRIS, SIMU, AW2SORI, AERIAL, None (Default)
|
||||
Adds this RF board support (in external packages installation and in compilation)
|
||||
-t | --transport
|
||||
Selects the transport protocol type, options: None, Ethernet, benetel4g, benetel5g, oran_fhlib_5g
|
||||
@@ -289,6 +289,10 @@ function main() {
|
||||
TARGET_LIST="$TARGET_LIST aw2sori_transpro"
|
||||
CMAKE_CMD="$CMAKE_CMD -DOAI_$2=ON"
|
||||
;;
|
||||
"AERIAL"|"Aerial"|"aerial")
|
||||
HW="OAI_AERIAL"
|
||||
CMAKE_CMD="$CMAKE_CMD -DOAI_AERIAL=ON"
|
||||
;;
|
||||
"None")
|
||||
;;
|
||||
*)
|
||||
@@ -504,7 +508,7 @@ function main() {
|
||||
# Doxygen Support #
|
||||
###################
|
||||
if [ "$BUILD_DOXYGEN" = "1" ] ; then
|
||||
echo_info "Built Doxygen based documentation. The documentation file is located here: $OPENAIR_DIR/$BUILD_DIR/build/html/index.html"
|
||||
echo_info "Built Doxygen based documentation. The documentation file is located here: $DIR/$BUILD_DIR/build/doc/html/index.html"
|
||||
fi
|
||||
|
||||
# TODO: once we got the CMakeLists.txt file done for the ORAN files, remove the following lines
|
||||
@@ -521,7 +525,7 @@ function main() {
|
||||
mkdir -p $DIR/nas_sim_tools/build
|
||||
cd $DIR/nas_sim_tools/build
|
||||
|
||||
eval $CMAKE_CMD ..
|
||||
${CMAKE_CMD% *} ..
|
||||
compilations nas_sim_tools usim.txt usim
|
||||
compilations nas_sim_tools nvram.txt nvram
|
||||
compilations nas_sim_tools conf2uedata.txt conf2uedata
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
cmake_minimum_required(VERSION 2.8)
|
||||
cmake_minimum_required(VERSION 3.5)
|
||||
|
||||
project(NAS_SIM_TOOLS)
|
||||
|
||||
@@ -6,6 +6,7 @@ include(FindPkgConfig)
|
||||
pkg_search_module(CONFIG libconfig REQUIRED)
|
||||
include_directories(${CONFIG_INCLUDE_DIRS})
|
||||
add_definitions(-std=gnu99)
|
||||
include("../macros.cmake")
|
||||
|
||||
ENABLE_LANGUAGE(C)
|
||||
|
||||
|
||||
@@ -107,6 +107,8 @@ if (xran_VERSION_STRING STREQUAL "oran_e_maintenance_release_v1.0")
|
||||
set(xran_VERSION 5.1.0)
|
||||
elseif (xran_VERSION_STRING STREQUAL "oran_e_maintenance_release_v1.1")
|
||||
set(xran_VERSION 5.1.1)
|
||||
elseif (xran_VERSION_STRING STREQUAL "oran_e_maintenance_release_v1.2")
|
||||
set(xran_VERSION 5.1.2)
|
||||
endif()
|
||||
unset(xran_VERSION_LINE)
|
||||
unset(xran_VERSION_STRING)
|
||||
|
||||
@@ -666,10 +666,7 @@ install_asn1c_from_source(){
|
||||
# GIT_SSL_NO_VERIFY=true git clone https://gitlab.eurecom.fr/oai/asn1c.git /tmp/asn1c
|
||||
git clone https://github.com/mouse07410/asn1c /tmp/asn1c
|
||||
cd /tmp/asn1c
|
||||
# 2024-02-06: problem compatibility between E2-agent and 4cfcd4f191c3fa41f6ac1b15cb2ad3acc1520af5 from asn1c
|
||||
# Reverting to previous commit that works
|
||||
# TODO : revert to vlm_master once FlexRic and E2-agent are fixed
|
||||
git checkout -f a6bdcd22658d6b7c3ed218d8c1375907ac532b64
|
||||
git checkout vlm_master
|
||||
# Showing which version is used
|
||||
git log -n1
|
||||
autoreconf -iv
|
||||
|
||||
76
cmake_targets/tools/install_libraries_to_system.patch
Normal file
76
cmake_targets/tools/install_libraries_to_system.patch
Normal file
@@ -0,0 +1,76 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 04cfa53..6eef6d6 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -42,6 +42,8 @@ OPTION(DOCA_GPU_DPDK "Enable DOCA GPUNetIO" ON)
|
||||
OPTION(NVIPC_DOCA_ENABLE "Build libnvipc.so with DOCA" ON)
|
||||
OPTION(NVIPC_DOCA_GPUNETIO "Use DOCA gpunetio in DOCA GPU DMA" OFF)
|
||||
|
||||
+project(gt_common_libs)
|
||||
+
|
||||
find_package(PkgConfig REQUIRED)
|
||||
|
||||
# Disable NVIPC_DOCA_ENABLE if DOCA version < 2
|
||||
diff --git a/nvIPC/CMakeLists.txt b/nvIPC/CMakeLists.txt
|
||||
index 633bbb7..dad7a7a 100644
|
||||
--- a/nvIPC/CMakeLists.txt
|
||||
+++ b/nvIPC/CMakeLists.txt
|
||||
@@ -19,7 +19,7 @@
|
||||
# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
# STRICT LIABILITY, OR TOR (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
-
|
||||
+include(GNUInstallDirs)
|
||||
# lib: nvipc
|
||||
set(SOURCES configs/nv_ipc_config.c
|
||||
configs/nv_ipc_yaml_parser.cpp
|
||||
@@ -68,6 +68,8 @@ target_include_directories(nvipc PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE
|
||||
target_include_directories(nvipc PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/cuda>)
|
||||
target_include_directories(nvipc PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/gpudata>)
|
||||
|
||||
+set_target_properties(nvipc PROPERTIES PUBLIC_HEADER $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>)
|
||||
+
|
||||
target_compile_options(nvipc PRIVATE ${AERIAL_ARCH_TUNE_FLAGS})
|
||||
|
||||
if(NVIPC_DPDK_ENABLE OR NVIPC_DOCA_GPUNETIO)
|
||||
@@ -120,4 +122,8 @@ else()
|
||||
target_link_libraries(nvipc PUBLIC rt -pthread nvlog)
|
||||
endif()
|
||||
|
||||
+install(TARGETS nvipc
|
||||
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
+ PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/..)
|
||||
+
|
||||
add_subdirectory(tests)
|
||||
diff --git a/nvlog/CMakeLists.txt b/nvlog/CMakeLists.txt
|
||||
index 7b65242..c0c5080 100644
|
||||
--- a/nvlog/CMakeLists.txt
|
||||
+++ b/nvlog/CMakeLists.txt
|
||||
@@ -20,6 +20,8 @@
|
||||
# STRICT LIABILITY, OR TOR (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
+include(GNUInstallDirs)
|
||||
+
|
||||
if(NOT CMAKE_BUILD_TYPE STREQUAL "Release")
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O0 -g")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O0 -g")
|
||||
@@ -42,6 +44,8 @@ target_include_directories(nvlog PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../../extern
|
||||
target_include_directories(nvlog PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../external/fmtlog_flat)
|
||||
target_link_libraries(nvlog rt -pthread yaml fmtlog-shared fmt::fmt)
|
||||
|
||||
+set_target_properties(nvlog PROPERTIES PUBLIC_HEADER $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>)
|
||||
+
|
||||
######## libnvlog_static.a #############
|
||||
add_library(nvlog_static STATIC ${SOURCES})
|
||||
set_property(TARGET nvlog_static PROPERTY POSITION_INDEPENDENT_CODE ON)
|
||||
@@ -68,5 +72,9 @@ target_compile_options(nvlog_static PRIVATE ${AERIAL_ARCH_TUNE_FLAGS})
|
||||
#add_executable(nvlog_observer ${SOURCES})
|
||||
#target_link_libraries(nvlog_observer nvlog_static -pthread)
|
||||
|
||||
+install(TARGETS nvlog
|
||||
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
+ PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/../)
|
||||
+
|
||||
######## test directory ################
|
||||
add_subdirectory(test)
|
||||
@@ -1,5 +1,5 @@
|
||||
diff --git a/fhi_lib/app/src/common.h b/fhi_lib/app/src/common.h
|
||||
index 7508117..a93c085 100644
|
||||
index 7508117..0dbe0bd 100644
|
||||
--- a/fhi_lib/app/src/common.h
|
||||
+++ b/fhi_lib/app/src/common.h
|
||||
@@ -28,7 +28,7 @@
|
||||
@@ -7,12 +7,12 @@ index 7508117..a93c085 100644
|
||||
#include <rte_mbuf.h>
|
||||
|
||||
-#define VERSIONX "oran_e_maintenance_release_v1.0"
|
||||
+#define VERSIONX "oran_e_maintenance_release_v1.1"
|
||||
+#define VERSIONX "oran_e_maintenance_release_v1.2"
|
||||
|
||||
#define APP_O_DU 0
|
||||
#define APP_O_RU 1
|
||||
diff --git a/fhi_lib/lib/Makefile b/fhi_lib/lib/Makefile
|
||||
index de141bf..5bcde3d 100644
|
||||
index de141bf..c12b912 100644
|
||||
--- a/fhi_lib/lib/Makefile
|
||||
+++ b/fhi_lib/lib/Makefile
|
||||
@@ -23,11 +23,11 @@ MYCUSTOMSPACE1='------------------------------------------------------------'
|
||||
@@ -30,6 +30,15 @@ index de141bf..5bcde3d 100644
|
||||
OBJDUMP := objdump
|
||||
|
||||
ifeq ($(SHELL),cmd.exe)
|
||||
@@ -57,7 +57,7 @@ endif
|
||||
|
||||
RTE_TARGET ?= x86_64-native-linux-icc
|
||||
|
||||
-RTE_INC := $(shell PKG_CONFIG_PATH=/usr/lib64/pkgconfig:$(RTE_SDK)/build/meson-uninstalled pkgconf --cflags-only-I libdpdk)
|
||||
+RTE_INC := $(shell PKG_CONFIG_PATH=$(PKG_CONFIG_PATH):/usr/lib64/pkgconfig:$(RTE_SDK)/build/meson-uninstalled pkgconf --cflags-only-I libdpdk)
|
||||
API_DIR := $(PROJECT_DIR)/api
|
||||
SRC_DIR := $(PROJECT_DIR)/src
|
||||
ETH_DIR := $(PROJECT_DIR)/ethernet
|
||||
@@ -95,8 +95,7 @@ CPP_SRC = $(SRC_DIR)/xran_compression.cpp \
|
||||
$(SRC_DIR)/xran_bfp_cplane32.cpp \
|
||||
$(SRC_DIR)/xran_bfp_cplane64.cpp \
|
||||
@@ -117,10 +126,18 @@ index 7d3afc5..3e00c5a 100644
|
||||
uint16_t *num_prbu,
|
||||
uint16_t *start_prbu,
|
||||
diff --git a/fhi_lib/lib/ethernet/ethdi.c b/fhi_lib/lib/ethernet/ethdi.c
|
||||
index b6ba257..74b3c26 100644
|
||||
index b6ba257..b53325f 100644
|
||||
--- a/fhi_lib/lib/ethernet/ethdi.c
|
||||
+++ b/fhi_lib/lib/ethernet/ethdi.c
|
||||
@@ -479,11 +479,13 @@ xran_ethdi_init_dpdk_io(char *name, const struct xran_io_cfg *io_cfg,
|
||||
@@ -335,6 +335,7 @@ xran_ethdi_init_dpdk_io(char *name, const struct xran_io_cfg *io_cfg,
|
||||
uint16_t count;
|
||||
|
||||
char *argv[] = { name, core_mask, "-n2", iova_mode, socket_mem, socket_limit, "--proc-type=auto",
|
||||
+ "--no-telemetry",
|
||||
"--file-prefix", name, "-a0000:00:00.0", bbdev_wdev, bbdev_vdev};
|
||||
|
||||
|
||||
@@ -479,11 +480,13 @@ xran_ethdi_init_dpdk_io(char *name, const struct xran_io_cfg *io_cfg,
|
||||
ctx->tx_ring[i] = rte_ring_create(ring_name, NUM_MBUFS_RING_TRX,
|
||||
rte_lcore_to_socket_id(*lcore_id), RING_F_SC_DEQ);
|
||||
PANIC_ON(ctx->tx_ring[i] == NULL, "failed to allocate rx ring");
|
||||
@@ -134,7 +151,7 @@ index b6ba257..74b3c26 100644
|
||||
}
|
||||
}
|
||||
} else {
|
||||
@@ -553,7 +555,7 @@ xran_ethdi_init_dpdk_io(char *name, const struct xran_io_cfg *io_cfg,
|
||||
@@ -553,7 +556,7 @@ xran_ethdi_init_dpdk_io(char *name, const struct xran_io_cfg *io_cfg,
|
||||
ctx->up_dl_pkt_gen_ring[i] = rte_ring_create(ring_name, NUM_MBUFS_RING,
|
||||
rte_lcore_to_socket_id(*lcore_id), /*RING_F_SC_DEQ*/0);
|
||||
PANIC_ON(ctx->up_dl_pkt_gen_ring[i] == NULL, "failed to allocate dl gen ring");
|
||||
|
||||
@@ -12,8 +12,7 @@
|
||||
# define NUMBER_OF_SRS_MAX 16
|
||||
# define NUMBER_OF_SCH_STATS_MAX 16
|
||||
|
||||
#define NUMBER_FRAMES_PHY_UE_INACTIVE 10
|
||||
|
||||
#define NUMBER_OF_DU_PER_CU_MAX 2
|
||||
#define MAX_MANAGED_ENB_PER_MOBILE 2
|
||||
#define MAX_MANAGED_GNB_PER_MOBILE 2
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
add_subdirectory(alg)
|
||||
add_subdirectory(ds)
|
||||
add_boolean_option(ENABLE_TELNETSRV OFF "Whether to build telnet support in modems" OFF)
|
||||
if(ENABLE_TELNETSRV)
|
||||
|
||||
@@ -46,7 +46,9 @@
|
||||
#include <time.h>
|
||||
#include <sys/time.h>
|
||||
#include <stdatomic.h>
|
||||
#include "common/utils/LOG/log_extern.h"
|
||||
#include "common/utils/LOG/log.h"
|
||||
|
||||
#define LOG_MEM_SIZE 100*1024*1024
|
||||
|
||||
// main log variables
|
||||
|
||||
@@ -58,53 +60,105 @@ void read_cpu_hardware (void) __attribute__ ((constructor));
|
||||
void read_cpu_hardware (void) {}
|
||||
#endif
|
||||
|
||||
log_mem_cnt_t log_mem_d[2];
|
||||
int log_mem_flag = 0;
|
||||
|
||||
typedef struct {
|
||||
char* buf_p;
|
||||
int buf_index;
|
||||
int enable_flag;
|
||||
} log_mem_cnt_t;
|
||||
|
||||
static log_mem_cnt_t log_mem_d[2];
|
||||
static int log_mem_flag = 0;
|
||||
volatile int log_mem_side=0;
|
||||
pthread_mutex_t log_mem_lock;
|
||||
pthread_cond_t log_mem_notify;
|
||||
pthread_t log_mem_thread;
|
||||
int log_mem_file_cnt=0;
|
||||
static pthread_mutex_t log_mem_lock;
|
||||
static pthread_cond_t log_mem_notify;
|
||||
static pthread_t log_mem_thread;
|
||||
static int log_mem_file_cnt=0;
|
||||
volatile int log_mem_write_flag=0;
|
||||
volatile int log_mem_write_side=0;
|
||||
char __log_mem_filename[1024]={0};
|
||||
char * log_mem_filename = &__log_mem_filename[0];
|
||||
char logmem_filename[1024] = {0};
|
||||
static char * log_mem_filename;
|
||||
|
||||
const mapping log_level_names[] = {{"error", OAILOG_ERR},
|
||||
static mapping log_level_names[] = {{"error", OAILOG_ERR},
|
||||
{"warn", OAILOG_WARNING},
|
||||
{"analysis", OAILOG_ANALYSIS},
|
||||
{"info", OAILOG_INFO},
|
||||
{"debug", OAILOG_DEBUG},
|
||||
{"trace", OAILOG_TRACE},
|
||||
{NULL, -1}};
|
||||
mapping * log_level_names_ptr(void)
|
||||
{
|
||||
return log_level_names;
|
||||
}
|
||||
|
||||
const mapping log_options[] = {{"nocolor", FLAG_NOCOLOR},
|
||||
{"level", FLAG_LEVEL},
|
||||
{"thread", FLAG_THREAD},
|
||||
{"line_num", FLAG_FILE_LINE},
|
||||
{"function", FLAG_FUNCT},
|
||||
{"time", FLAG_TIME},
|
||||
{"thread_id", FLAG_THREAD_ID},
|
||||
{"wall_clock", FLAG_REAL_TIME},
|
||||
|
||||
/** @defgroup _log_format Defined log format
|
||||
* @ingroup _macro
|
||||
* @brief Macro of log formats defined by LOG
|
||||
* @{*/
|
||||
static const unsigned int FLAG_NOCOLOR = 1; /*!< \brief use colors in log messages, depending on level */
|
||||
static const unsigned int FLAG_THREAD = 1 << 1; /*!< \brief display thread name in log messages */
|
||||
static const unsigned int FLAG_LEVEL = 1 << 2; /*!< \brief display log level in log messages */
|
||||
static const unsigned int FLAG_FUNCT = 1 << 3;
|
||||
static const unsigned int FLAG_FILE_LINE = 1 << 4;
|
||||
static const unsigned int FLAG_TIME = 1 << 5;
|
||||
static const unsigned int FLAG_THREAD_ID = 1 << 6;
|
||||
static const unsigned int FLAG_REAL_TIME = 1 << 7;
|
||||
static const unsigned int FLAG_INITIALIZED = 1 << 8;
|
||||
|
||||
/** @}*/
|
||||
static mapping log_options[] = {{"nocolor", FLAG_NOCOLOR},
|
||||
{"level", FLAG_LEVEL},
|
||||
{"thread", FLAG_THREAD},
|
||||
{"line_num", FLAG_FILE_LINE},
|
||||
{"function", FLAG_FUNCT},
|
||||
{"time", FLAG_TIME},
|
||||
{"thread_id", FLAG_THREAD_ID},
|
||||
{"wall_clock", FLAG_REAL_TIME},
|
||||
{NULL, -1}};
|
||||
mapping * log_option_names_ptr(void)
|
||||
{
|
||||
return log_options;
|
||||
}
|
||||
|
||||
static mapping log_maskmap[] = {{"PRACH", DEBUG_PRACH},
|
||||
{"RU", DEBUG_RU},
|
||||
{"UE_PHYPROC", DEBUG_UE_PHYPROC},
|
||||
{"LTEESTIM", DEBUG_LTEESTIM},
|
||||
{"DLCELLSPEC", DEBUG_DLCELLSPEC},
|
||||
{"ULSCH", DEBUG_ULSCH},
|
||||
{"RRC", DEBUG_RRC},
|
||||
{"PDCP", DEBUG_PDCP},
|
||||
{"DFT", DEBUG_DFT},
|
||||
{"ASN1", DEBUG_ASN1},
|
||||
{"CTRLSOCKET", DEBUG_CTRLSOCKET},
|
||||
{"SECURITY", DEBUG_SECURITY},
|
||||
{"NAS", DEBUG_NAS},
|
||||
{"RLC", DEBUG_RLC},
|
||||
{"DLSCH_DECOD", DEBUG_DLSCH_DECOD},
|
||||
{"UE_TIMING", UE_TIMING},
|
||||
{NULL, -1}};
|
||||
mapping * log_maskmap_ptr(void)
|
||||
{
|
||||
return log_maskmap;
|
||||
}
|
||||
|
||||
const mapping log_maskmap[] = LOG_MASKMAP_INIT;
|
||||
|
||||
/* .log_format = 0x13 uncolored standard messages
|
||||
* .log_format = 0x93 colored standard messages */
|
||||
/* keep white space in first position; switching it to 0 allows colors to be disabled*/
|
||||
static const char *const LOG_RED = "\033[1;31m"; /*!< \brief VT100 sequence for bold red foreground */
|
||||
static const char *const LOG_GREEN = "\033[32m"; /*!< \brief VT100 sequence for green foreground */
|
||||
static const char *const LOG_ORANGE = "\033[93m"; /*!< \brief VT100 sequence for orange foreground */
|
||||
static const char *const LOG_BLUE = "\033[34m"; /*!< \brief VT100 sequence for blue foreground */
|
||||
static const char *const LOG_CYBL = "\033[40;36m"; /*!< \brief VT100 sequence for cyan foreground on black background */
|
||||
static const char *const LOG_RESET = "\033[0m"; /*!< \brief VT100 sequence for reset (black) foreground */
|
||||
static const char *const log_level_highlight_start[] =
|
||||
{LOG_RED, LOG_ORANGE, LOG_GREEN, "", LOG_BLUE, LOG_CYBL}; /*!< \brief Optional start-format strings for highlighting */
|
||||
|
||||
static const char *const log_level_highlight_end[] =
|
||||
{LOG_RESET, LOG_RESET, LOG_RESET, LOG_RESET, LOG_RESET, LOG_RESET}; /*!< \brief Optional end-format strings for highlighting */
|
||||
static void log_output_memory(log_component_t *c, const char *file, const char *func, int line, int comp, int level, const char* format,va_list args);
|
||||
|
||||
|
||||
int write_file_matlab(const char *fname,
|
||||
const char *vname,
|
||||
void *data,
|
||||
int length,
|
||||
int dec,
|
||||
unsigned int format,
|
||||
int multiVec)
|
||||
int write_file_matlab(const char *fname, const char *vname, void *data, int length, int dec, unsigned int format, int multiVec)
|
||||
{
|
||||
FILE *fp=NULL;
|
||||
int i;
|
||||
@@ -274,15 +328,15 @@ int write_file_matlab(const char *fname,
|
||||
}
|
||||
|
||||
/* get log parameters from configuration file */
|
||||
void log_getconfig(log_t *g_log)
|
||||
void log_getconfig(log_t *g_log)
|
||||
{
|
||||
char *gloglevel = NULL;
|
||||
int consolelog = 0;
|
||||
paramdef_t logparams_defaults[] = LOG_GLOBALPARAMS_DESC;
|
||||
paramdef_t logparams_level[MAX_LOG_PREDEF_COMPONENTS];
|
||||
paramdef_t logparams_logfile[MAX_LOG_PREDEF_COMPONENTS];
|
||||
paramdef_t logparams_debug[sizeof(log_maskmap)/sizeof(mapping)];
|
||||
paramdef_t logparams_dump[sizeof(log_maskmap)/sizeof(mapping)];
|
||||
paramdef_t logparams_debug[sizeofArray(log_maskmap)];
|
||||
paramdef_t logparams_dump[sizeofArray(log_maskmap)];
|
||||
int ret = config_get(config_get_if(), logparams_defaults, sizeofArray(logparams_defaults), CONFIG_STRING_LOG_PREFIX);
|
||||
|
||||
if (ret <0) {
|
||||
@@ -304,10 +358,10 @@ void log_getconfig(log_t *g_log)
|
||||
}
|
||||
|
||||
/* build the parameter array for setting per component log level and infile options */
|
||||
memset(logparams_level, 0, sizeof(paramdef_t)*MAX_LOG_PREDEF_COMPONENTS);
|
||||
memset(logparams_logfile, 0, sizeof(paramdef_t)*MAX_LOG_PREDEF_COMPONENTS);
|
||||
memset(logparams_level, 0, sizeof(logparams_level));
|
||||
memset(logparams_logfile, 0, sizeof(logparams_logfile));
|
||||
|
||||
for (int i=MIN_LOG_COMPONENTS; i < MAX_LOG_PREDEF_COMPONENTS; i++) {
|
||||
for (int i = 0; i < MAX_LOG_PREDEF_COMPONENTS; i++) {
|
||||
if(g_log->log_component[i].name == NULL) {
|
||||
g_log->log_component[i].name = malloc(17);
|
||||
sprintf((char *)g_log->log_component[i].name,"comp%i?",i);
|
||||
@@ -341,11 +395,11 @@ void log_getconfig(log_t *g_log)
|
||||
config_get(config_get_if(), logparams_logfile, MAX_LOG_PREDEF_COMPONENTS, CONFIG_STRING_LOG_PREFIX);
|
||||
|
||||
/* now set the log levels and infile option, according to what we read */
|
||||
for (int i=MIN_LOG_COMPONENTS; i < MAX_LOG_PREDEF_COMPONENTS; i++) {
|
||||
g_log->log_component[i].level = map_str_to_int(log_level_names, *(logparams_level[i].strptr));
|
||||
for (int i = 0; i < MAX_LOG_PREDEF_COMPONENTS; i++) {
|
||||
g_log->log_component[i].level = map_str_to_int(log_level_names, *logparams_level[i].strptr);
|
||||
set_log(i, g_log->log_component[i].level);
|
||||
|
||||
if (*(logparams_logfile[i].uptr) == 1)
|
||||
if (*logparams_logfile[i].uptr == 1)
|
||||
set_component_filelog(i);
|
||||
}
|
||||
|
||||
@@ -386,16 +440,10 @@ void log_getconfig(log_t *g_log)
|
||||
set_glog_onlinelog(consolelog);
|
||||
}
|
||||
|
||||
int register_log_component(char *name,
|
||||
char *fext,
|
||||
int compidx)
|
||||
int register_log_component(const char *name, const char *fext, int compidx)
|
||||
{
|
||||
int computed_compidx=compidx;
|
||||
|
||||
if (strlen(fext) > 3) {
|
||||
fext[3]=0; /* limit log file extension to 3 chars */
|
||||
}
|
||||
|
||||
if (compidx < 0) { /* this is not a pre-defined component */
|
||||
for (int i = MAX_LOG_PREDEF_COMPONENTS; i< MAX_LOG_COMPONENTS; i++) {
|
||||
if (g_log->log_component[i].name == NULL) {
|
||||
@@ -409,8 +457,9 @@ int register_log_component(char *name,
|
||||
g_log->log_component[computed_compidx].name = strdup(name);
|
||||
g_log->log_component[computed_compidx].stream = stdout;
|
||||
g_log->log_component[computed_compidx].filelog = 0;
|
||||
g_log->log_component[computed_compidx].filelog_name = malloc(strlen(name)+16);/* /tmp/<name>.%s */
|
||||
sprintf(g_log->log_component[computed_compidx].filelog_name,"/tmp/%s.%s",name,fext);
|
||||
g_log->log_rarely_used[computed_compidx].filelog_name = calloc(1, strlen(name) + 16); /* /tmp/<name>.%s */
|
||||
sprintf(g_log->log_rarely_used[computed_compidx].filelog_name, "/tmp/%s.", name);
|
||||
strncat(g_log->log_rarely_used[computed_compidx].filelog_name, fext, 3);
|
||||
} else {
|
||||
fprintf(stderr,"{LOG} %s %d Couldn't register component %s\n",__FILE__,__LINE__,name);
|
||||
}
|
||||
@@ -420,11 +469,13 @@ int register_log_component(char *name,
|
||||
|
||||
static void unregister_all_log_components(void)
|
||||
{
|
||||
log_component_t* lc = &g_log->log_component[0];
|
||||
log_component_t *lc = g_log->log_component;
|
||||
log_component_back_t *lb = g_log->log_rarely_used;
|
||||
while (lc->name) {
|
||||
free((char *)lc->name); // defined as const, but assigned through strdup()
|
||||
free(lc->filelog_name);
|
||||
free(lb->filelog_name);
|
||||
lc++;
|
||||
lb++;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -441,7 +492,6 @@ int isLogInitDone (void)
|
||||
|
||||
int logInit (void)
|
||||
{
|
||||
int i;
|
||||
g_log = calloc(1, sizeof(log_t));
|
||||
|
||||
if (g_log == NULL) {
|
||||
@@ -449,67 +499,17 @@ int logInit (void)
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
memset(g_log,0,sizeof(log_t));
|
||||
register_log_component("PHY","log",PHY);
|
||||
register_log_component("MAC","log",MAC);
|
||||
register_log_component("OPT","log",OPT);
|
||||
register_log_component("RLC","log",RLC);
|
||||
register_log_component("PDCP","log",PDCP);
|
||||
register_log_component("RRC","log",RRC);
|
||||
register_log_component("OMG","csv",OMG);
|
||||
register_log_component("OTG","log",OTG);
|
||||
register_log_component("OTG_LATENCY","dat",OTG_LATENCY);
|
||||
register_log_component("OTG_LATENCY_BG","dat",OTG_LATENCY_BG);
|
||||
register_log_component("OTG_GP","dat",OTG_GP);
|
||||
register_log_component("OTG_GP_BG","dat",OTG_GP_BG);
|
||||
register_log_component("OTG_JITTER","dat",OTG_JITTER);
|
||||
register_log_component("PERF","",PERF);
|
||||
register_log_component("OIP","",OIP);
|
||||
register_log_component("OCM","log",OCM);
|
||||
register_log_component("HW","",HW);
|
||||
register_log_component("OSA","",OSA);
|
||||
register_log_component("eRAL","",RAL_ENB);
|
||||
register_log_component("mRAL","",RAL_UE);
|
||||
register_log_component("ENB_APP","log",ENB_APP);
|
||||
register_log_component("MCE_APP","log",MCE_APP);
|
||||
register_log_component("MME_APP","log",MME_APP);
|
||||
register_log_component("TMR","",TMR);
|
||||
register_log_component("EMU","log",EMU);
|
||||
register_log_component("USIM","txt",USIM);
|
||||
register_log_component("SIM","txt",SIM);
|
||||
/* following log component are used for the localization*/
|
||||
register_log_component("LOCALIZE","log",LOCALIZE);
|
||||
register_log_component("NAS","log",NAS);
|
||||
register_log_component("UDP","",UDP_);
|
||||
register_log_component("GTPU","",GTPU);
|
||||
register_log_component("SDAP","",SDAP);
|
||||
register_log_component("S1AP","",S1AP);
|
||||
register_log_component("F1AP","",F1AP);
|
||||
register_log_component("E1AP","",E1AP);
|
||||
register_log_component("M2AP","",M2AP);
|
||||
register_log_component("M3AP","",M3AP);
|
||||
register_log_component("SCTP","",SCTP);
|
||||
register_log_component("X2AP","",X2AP);
|
||||
register_log_component("LOADER","log",LOADER);
|
||||
register_log_component("ASN1","log",ASN1);
|
||||
register_log_component("NFAPI_VNF","log",NFAPI_VNF);
|
||||
register_log_component("NFAPI_PNF","log",NFAPI_PNF);
|
||||
register_log_component("GNB_APP","log",GNB_APP);
|
||||
register_log_component("NR_RRC","log",NR_RRC);
|
||||
register_log_component("NR_MAC","log",NR_MAC);
|
||||
register_log_component("NR_PHY","log",NR_PHY);
|
||||
register_log_component("NGAP","",NGAP);
|
||||
register_log_component("ITTI","log",ITTI);
|
||||
register_log_component("UTIL","log",UTIL);
|
||||
for (int i = 0; i < MAX_LOG_PREDEF_COMPONENTS; i++)
|
||||
register_log_component(comp_name[i], comp_extension[i], i);
|
||||
|
||||
for (int i=0 ; log_level_names[i].name != NULL ; i++)
|
||||
g_log->level2string[i] = toupper(log_level_names[i].name[0]); // uppercased first letter of level name
|
||||
|
||||
g_log->level2string[i] = toupper(log_level_names[i].name[0]); // uppercased first letter of level name
|
||||
|
||||
g_log->filelog_name = "/tmp/openair.log";
|
||||
log_getconfig(g_log);
|
||||
|
||||
// set all unused component items to 0, they are for non predefined components
|
||||
for (i=MAX_LOG_PREDEF_COMPONENTS; i < MAX_LOG_COMPONENTS; i++) {
|
||||
for (int i=MAX_LOG_PREDEF_COMPONENTS; i < MAX_LOG_COMPONENTS; i++) {
|
||||
memset(&(g_log->log_component[i]),0,sizeof(log_component_t));
|
||||
}
|
||||
|
||||
@@ -536,7 +536,7 @@ static inline int log_header(log_component_t *c,
|
||||
int line,
|
||||
int level)
|
||||
{
|
||||
int flag= g_log->flag | c->flag;
|
||||
int flag = g_log->flag;
|
||||
|
||||
char threadname[64];
|
||||
if (flag & FLAG_THREAD ) {
|
||||
@@ -626,8 +626,8 @@ void log_dump(int component,
|
||||
va_list args;
|
||||
char *wbuf;
|
||||
log_component_t *c = &g_log->log_component[component];
|
||||
int flag= g_log->flag | c->flag;
|
||||
|
||||
int flag = g_log->flag;
|
||||
|
||||
switch(datatype) {
|
||||
case LOG_DUMP_DOUBLE:
|
||||
wbuf=malloc((buffsize * 10) + 64 + MAX_LOG_TOTAL);
|
||||
@@ -670,20 +670,17 @@ int set_log(int component,
|
||||
int level)
|
||||
{
|
||||
/* Checking parameters */
|
||||
DevCheck((component >= MIN_LOG_COMPONENTS) && (component < MAX_LOG_COMPONENTS),
|
||||
component, MIN_LOG_COMPONENTS, MAX_LOG_COMPONENTS);
|
||||
DevCheck((component >= 0) && (component < MAX_LOG_COMPONENTS), component, 0, MAX_LOG_COMPONENTS);
|
||||
DevCheck((level < NUM_LOG_LEVEL) && (level >= OAILOG_DISABLE), level, NUM_LOG_LEVEL,
|
||||
OAILOG_ERR);
|
||||
|
||||
if ( g_log->log_component[component].level != OAILOG_DISABLE )
|
||||
g_log->log_component[component].savedlevel = g_log->log_component[component].level;
|
||||
g_log->log_rarely_used[component].savedlevel = g_log->log_component[component].level;
|
||||
|
||||
g_log->log_component[component].level = level;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
void set_glog(int level)
|
||||
{
|
||||
for (int c=0; c< MAX_LOG_COMPONENTS; c++ ) {
|
||||
@@ -695,7 +692,7 @@ void set_glog_onlinelog(int enable)
|
||||
{
|
||||
for (int c=0; c< MAX_LOG_COMPONENTS; c++ ) {
|
||||
if ( enable ) {
|
||||
g_log->log_component[c].level = g_log->log_component[c].savedlevel;
|
||||
g_log->log_component[c].level = g_log->log_rarely_used[c].savedlevel;
|
||||
g_log->log_component[c].vprint = vfprintf;
|
||||
g_log->log_component[c].print = fprintf;
|
||||
g_log->log_component[c].stream = stdout;
|
||||
@@ -704,6 +701,7 @@ void set_glog_onlinelog(int enable)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void set_glog_filelog(int enable)
|
||||
{
|
||||
static FILE *fptr;
|
||||
@@ -732,13 +730,14 @@ void set_glog_filelog(int enable)
|
||||
void set_component_filelog(int comp)
|
||||
{
|
||||
if (g_log->log_component[comp].stream == NULL || g_log->log_component[comp].stream == stdout) {
|
||||
g_log->log_component[comp].stream = fopen(g_log->log_component[comp].filelog_name,"w");
|
||||
g_log->log_component[comp].stream = fopen(g_log->log_rarely_used[comp].filelog_name, "w");
|
||||
}
|
||||
|
||||
g_log->log_component[comp].vprint = vfprintf;
|
||||
g_log->log_component[comp].print = fprintf;
|
||||
g_log->log_component[comp].filelog = 1;
|
||||
}
|
||||
|
||||
void close_component_filelog(int comp)
|
||||
{
|
||||
g_log->log_component[comp].filelog = 0;
|
||||
@@ -775,40 +774,19 @@ int map_str_to_int(const mapping *map, const char *str)
|
||||
/* map an int to a string. Takes a mapping array and a value */
|
||||
char *map_int_to_str(const mapping *map, const int val)
|
||||
{
|
||||
while (1) {
|
||||
if (map->name == NULL) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
while (map->name) {
|
||||
if (map->value == val) {
|
||||
return map->name;
|
||||
}
|
||||
|
||||
map++;
|
||||
}
|
||||
}
|
||||
|
||||
int is_newline(char *str,
|
||||
int size)
|
||||
{
|
||||
int i;
|
||||
|
||||
for ( i = 0; i < size; i++ ) {
|
||||
if ( str[i] == '\n' ) {
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
/* if we get all the way to here, there must not have been a newline! */
|
||||
return 0;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void logClean (void)
|
||||
{
|
||||
int i;
|
||||
|
||||
if(isLogInitDone()) {
|
||||
for (i=MIN_LOG_COMPONENTS; i < MAX_LOG_COMPONENTS; i++) {
|
||||
for (int i = 0; i < MAX_LOG_COMPONENTS; i++) {
|
||||
close_component_filelog(i);
|
||||
}
|
||||
}
|
||||
@@ -883,7 +861,7 @@ static void log_output_memory(log_component_t *c, const char *file, const char *
|
||||
len = MAX_LOG_TOTAL;
|
||||
}
|
||||
}
|
||||
if ( !((g_log->flag | c->flag) & FLAG_NOCOLOR) ) {
|
||||
if (!((g_log->flag) & FLAG_NOCOLOR)) {
|
||||
int n = snprintf(log_buffer+len, MAX_LOG_TOTAL-len, "%s", log_level_highlight_end[level]);
|
||||
if (n > 0) {
|
||||
len += n;
|
||||
@@ -933,28 +911,22 @@ static void log_output_memory(log_component_t *c, const char *file, const char *
|
||||
}
|
||||
}
|
||||
|
||||
int logInit_log_mem (void)
|
||||
int logInit_log_mem (char * filename)
|
||||
{
|
||||
if (log_mem_flag == 1) {
|
||||
log_mem_d[0].buf_p = malloc(LOG_MEM_SIZE);
|
||||
log_mem_d[0].buf_index = 0;
|
||||
log_mem_d[0].enable_flag = 1;
|
||||
log_mem_d[1].buf_p = malloc(LOG_MEM_SIZE);
|
||||
log_mem_d[1].buf_index = 0;
|
||||
log_mem_d[1].enable_flag = 1;
|
||||
log_mem_side = 0;
|
||||
if ((pthread_mutex_init(&log_mem_lock, NULL) != 0) || (pthread_cond_init(&log_mem_notify, NULL) != 0)) {
|
||||
log_mem_d[1].enable_flag=0;
|
||||
return -1;
|
||||
}
|
||||
pthread_create(&log_mem_thread, NULL, (void *(*)(void *))flush_mem_to_file, (void *)NULL);
|
||||
} else {
|
||||
log_mem_d[0].buf_p = NULL;
|
||||
log_mem_d[1].buf_p = NULL;
|
||||
log_mem_d[0].enable_flag = 0;
|
||||
log_mem_d[1].enable_flag = 0;
|
||||
log_mem_flag = 1;
|
||||
log_mem_filename = filename; // in present code, the parameter is safe permanent pointer
|
||||
for (log_mem_cnt_t *ptr = log_mem_d; ptr < log_mem_d + sizeofArray(log_mem_d); ptr++)
|
||||
*ptr = (log_mem_cnt_t){
|
||||
.buf_p = malloc(LOG_MEM_SIZE),
|
||||
.buf_index = 0,
|
||||
.enable_flag = 1,
|
||||
};
|
||||
log_mem_side = 0;
|
||||
if ((pthread_mutex_init(&log_mem_lock, NULL) != 0) || (pthread_cond_init(&log_mem_notify, NULL) != 0)) {
|
||||
log_mem_d[1].enable_flag=0;
|
||||
return -1;
|
||||
}
|
||||
|
||||
pthread_create(&log_mem_thread, NULL, (void *(*)(void *))flush_mem_to_file, (void *)NULL);
|
||||
printf("log init done\n");
|
||||
|
||||
return 0;
|
||||
|
||||
@@ -57,8 +57,6 @@
|
||||
#ifdef NDEBUG
|
||||
#warning assert is disabled
|
||||
#endif
|
||||
#define NUM_ELEMENTS(ARRAY) (sizeof(ARRAY) / sizeof(ARRAY[0]))
|
||||
#define CHECK_INDEX(ARRAY, INDEX) assert((INDEX) < NUM_ELEMENTS(ARRAY))
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
@@ -87,31 +85,6 @@ extern "C" {
|
||||
#define NUM_LOG_LEVEL 6 /*!< \brief the number of message levels users have with LOG (OAILOG_DISABLE is not available to user as a level, so it is not included)*/
|
||||
/** @}*/
|
||||
|
||||
/** @defgroup _log_format Defined log format
|
||||
* @ingroup _macro
|
||||
* @brief Macro of log formats defined by LOG
|
||||
* @{*/
|
||||
|
||||
/* .log_format = 0x13 uncolored standard messages
|
||||
* .log_format = 0x93 colored standard messages */
|
||||
/* keep white space in first position; switching it to 0 allows colors to be disabled*/
|
||||
#define LOG_RED "\033[1;31m" /*!< \brief VT100 sequence for bold red foreground */
|
||||
#define LOG_GREEN "\033[32m" /*!< \brief VT100 sequence for green foreground */
|
||||
#define LOG_ORANGE "\033[93m" /*!< \brief VT100 sequence for orange foreground */
|
||||
#define LOG_BLUE "\033[34m" /*!< \brief VT100 sequence for blue foreground */
|
||||
#define LOG_CYBL "\033[40;36m" /*!< \brief VT100 sequence for cyan foreground on black background */
|
||||
#define LOG_RESET "\033[0m" /*!< \brief VT100 sequence for reset (black) foreground */
|
||||
#define FLAG_NOCOLOR 0x0001 /*!< \brief use colors in log messages, depending on level */
|
||||
#define FLAG_THREAD 0x0008 /*!< \brief display thread name in log messages */
|
||||
#define FLAG_LEVEL 0x0010 /*!< \brief display log level in log messages */
|
||||
#define FLAG_FUNCT 0x0020
|
||||
#define FLAG_FILE_LINE 0x0040
|
||||
#define FLAG_TIME 0x0100
|
||||
#define FLAG_THREAD_ID 0x0200
|
||||
#define FLAG_REAL_TIME 0x0400
|
||||
#define FLAG_INITIALIZED 0x8000
|
||||
/** @}*/
|
||||
|
||||
#define SET_LOG_OPTION(O) g_log->flag = (g_log->flag | O)
|
||||
#define CLEAR_LOG_OPTION(O) g_log->flag = (g_log->flag & (~O))
|
||||
|
||||
@@ -140,100 +113,78 @@ extern "C" {
|
||||
#define DEBUG_DLSCH_DECOD (1<<14)
|
||||
#define UE_TIMING (1<<20)
|
||||
|
||||
|
||||
#define LOG_MASKMAP_INIT {\
|
||||
{"PRACH", DEBUG_PRACH},\
|
||||
{"RU", DEBUG_RU},\
|
||||
{"UE_PHYPROC", DEBUG_UE_PHYPROC},\
|
||||
{"LTEESTIM", DEBUG_LTEESTIM},\
|
||||
{"DLCELLSPEC", DEBUG_DLCELLSPEC},\
|
||||
{"ULSCH", DEBUG_ULSCH},\
|
||||
{"RRC", DEBUG_RRC},\
|
||||
{"PDCP", DEBUG_PDCP},\
|
||||
{"DFT", DEBUG_DFT},\
|
||||
{"ASN1", DEBUG_ASN1},\
|
||||
{"CTRLSOCKET", DEBUG_CTRLSOCKET},\
|
||||
{"SECURITY", DEBUG_SECURITY},\
|
||||
{"NAS", DEBUG_NAS},\
|
||||
{"RLC", DEBUG_RLC},\
|
||||
{"DLSCH_DECOD", DEBUG_DLSCH_DECOD},\
|
||||
{"UE_TIMING", UE_TIMING},\
|
||||
{NULL,-1}\
|
||||
}
|
||||
|
||||
|
||||
|
||||
#define SET_LOG_DEBUG(B) g_log->debug_mask = (g_log->debug_mask | B)
|
||||
#define CLEAR_LOG_DEBUG(B) g_log->debug_mask = (g_log->debug_mask & (~B))
|
||||
|
||||
#define SET_LOG_DUMP(B) g_log->dump_mask = (g_log->dump_mask | B)
|
||||
#define CLEAR_LOG_DUMP(B) g_log->dump_mask = (g_log->dump_mask & (~B))
|
||||
|
||||
#define FOREACH_COMP(COMP_DEF) \
|
||||
COMP_DEF(PHY, log) \
|
||||
COMP_DEF(MAC, log) \
|
||||
COMP_DEF(EMU, log) \
|
||||
COMP_DEF(SIM, txt) \
|
||||
COMP_DEF(OMG, csv) \
|
||||
COMP_DEF(OPT, log) \
|
||||
COMP_DEF(OTG, log) \
|
||||
COMP_DEF(OTG_LATENCY, dat) \
|
||||
COMP_DEF(OTG_LATENCY_BG, dat) \
|
||||
COMP_DEF(OTG_GP, dat) \
|
||||
COMP_DEF(OTG_GP_BG, dat) \
|
||||
COMP_DEF(OTG_JITTER, dat) \
|
||||
COMP_DEF(RLC, ) \
|
||||
COMP_DEF(PDCP, ) \
|
||||
COMP_DEF(RRC, ) \
|
||||
COMP_DEF(NAS, log) \
|
||||
COMP_DEF(OIP, ) \
|
||||
COMP_DEF(CLI, ) \
|
||||
COMP_DEF(OCM, ) \
|
||||
COMP_DEF(GTPU, ) \
|
||||
COMP_DEF(SDAP, ) \
|
||||
COMP_DEF(SPGW, ) \
|
||||
COMP_DEF(S1AP, ) \
|
||||
COMP_DEF(F1AP, ) \
|
||||
COMP_DEF(E1AP, ) \
|
||||
COMP_DEF(SCTP, ) \
|
||||
COMP_DEF(HW, ) \
|
||||
COMP_DEF(OSA, ) \
|
||||
COMP_DEF(ENB_APP, log) \
|
||||
COMP_DEF(MCE_APP, log) \
|
||||
COMP_DEF(MME_APP, log) \
|
||||
COMP_DEF(TMR, ) \
|
||||
COMP_DEF(USIM, log) \
|
||||
COMP_DEF(F1U, ) \
|
||||
COMP_DEF(X2AP, ) \
|
||||
COMP_DEF(XNAP, ) \
|
||||
COMP_DEF(M2AP, ) \
|
||||
COMP_DEF(M3AP, ) \
|
||||
COMP_DEF(NGAP, ) \
|
||||
COMP_DEF(GNB_APP, log) \
|
||||
COMP_DEF(NR_RRC, log) \
|
||||
COMP_DEF(NR_MAC, log) \
|
||||
COMP_DEF(NR_MAC_DCI, log) \
|
||||
COMP_DEF(NR_PHY_DCI, log) \
|
||||
COMP_DEF(NR_PHY, log) \
|
||||
COMP_DEF(LOADER, log) \
|
||||
COMP_DEF(ASN1, log) \
|
||||
COMP_DEF(NFAPI_VNF, log) \
|
||||
COMP_DEF(NFAPI_PNF, log) \
|
||||
COMP_DEF(ITTI, log) \
|
||||
COMP_DEF(UTIL, log) \
|
||||
COMP_DEF(MAX_LOG_PREDEF_COMPONENTS, )
|
||||
|
||||
#define COMP_ENUM(comp, file_extension) comp,
|
||||
typedef enum { FOREACH_COMP(COMP_ENUM) } comp_name_t;
|
||||
|
||||
typedef enum {
|
||||
MIN_LOG_COMPONENTS = 0,
|
||||
PHY = MIN_LOG_COMPONENTS,
|
||||
MAC,
|
||||
EMU,
|
||||
SIM,
|
||||
OMG,
|
||||
OPT,
|
||||
OTG,
|
||||
OTG_LATENCY,
|
||||
OTG_LATENCY_BG,
|
||||
OTG_GP,
|
||||
OTG_GP_BG,
|
||||
OTG_JITTER,
|
||||
RLC,
|
||||
PDCP,
|
||||
RRC,
|
||||
NAS,
|
||||
PERF,
|
||||
OIP,
|
||||
CLI,
|
||||
OCM,
|
||||
UDP_,
|
||||
GTPU,
|
||||
SDAP,
|
||||
SPGW,
|
||||
S1AP,
|
||||
F1AP,
|
||||
E1AP,
|
||||
SCTP,
|
||||
HW,
|
||||
OSA,
|
||||
RAL_ENB,
|
||||
RAL_UE,
|
||||
ENB_APP,
|
||||
MCE_APP,
|
||||
MME_APP,
|
||||
TMR,
|
||||
USIM,
|
||||
LOCALIZE,
|
||||
F1U,
|
||||
X2AP,
|
||||
M2AP,
|
||||
M3AP,
|
||||
NGAP,
|
||||
GNB_APP,
|
||||
NR_RRC,
|
||||
NR_MAC,
|
||||
NR_PHY,
|
||||
LOADER,
|
||||
ASN1,
|
||||
NFAPI_VNF,
|
||||
NFAPI_PNF,
|
||||
ITTI,
|
||||
UTIL,
|
||||
MAX_LOG_PREDEF_COMPONENTS,
|
||||
}
|
||||
comp_name_t;
|
||||
#define COMP_TEXT(comp, file_extension) #comp,
|
||||
static const char *const comp_name[] = {FOREACH_COMP(COMP_TEXT)};
|
||||
|
||||
#define COMP_EXTENSION(comp, file_extension) #file_extension,
|
||||
static const char *const comp_extension[] = {FOREACH_COMP(COMP_EXTENSION)};
|
||||
|
||||
#define MAX_LOG_DYNALLOC_COMPONENTS 20
|
||||
#define MAX_LOG_COMPONENTS (MAX_LOG_PREDEF_COMPONENTS + MAX_LOG_DYNALLOC_COMPONENTS)
|
||||
|
||||
|
||||
typedef struct {
|
||||
char *name; /*!< \brief string name of item */
|
||||
int value; /*!< \brief integer value of mapping */
|
||||
@@ -241,23 +192,24 @@ typedef struct {
|
||||
|
||||
typedef int(*log_vprint_func_t)(FILE *stream, const char *format, va_list ap );
|
||||
typedef int(*log_print_func_t)(FILE *stream, const char *format, ... );
|
||||
typedef struct {
|
||||
int savedlevel;
|
||||
char *filelog_name;
|
||||
} log_component_back_t;
|
||||
|
||||
typedef struct {
|
||||
const char *name;
|
||||
int level;
|
||||
int savedlevel;
|
||||
int flag;
|
||||
int filelog;
|
||||
char *filelog_name;
|
||||
int level;
|
||||
int filelog;
|
||||
FILE *stream;
|
||||
log_vprint_func_t vprint;
|
||||
log_print_func_t print;
|
||||
/* SR: make the log buffer component relative */
|
||||
char log_buffer[MAX_LOG_TOTAL];
|
||||
log_print_func_t print;
|
||||
} log_component_t;
|
||||
|
||||
|
||||
typedef struct {
|
||||
log_component_t log_component[MAX_LOG_COMPONENTS];
|
||||
log_component_back_t log_rarely_used[MAX_LOG_COMPONENTS];
|
||||
char level2string[NUM_LOG_LEVEL];
|
||||
int flag;
|
||||
char *filelog_name;
|
||||
@@ -265,8 +217,6 @@ typedef struct {
|
||||
uint64_t dump_mask;
|
||||
} log_t;
|
||||
|
||||
|
||||
|
||||
#ifdef LOG_MAIN
|
||||
log_t *g_log;
|
||||
#else
|
||||
@@ -278,8 +228,7 @@ extern "C" {
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
/*--- INCLUDES ---------------------------------------------------------------*/
|
||||
# include "log_if.h"
|
||||
|
||||
/*----------------------------------------------------------------------------*/
|
||||
int logInit (void);
|
||||
void logTerm (void);
|
||||
@@ -290,6 +239,9 @@ void log_dump(int component, void *buffer, int buffsize,int datatype, const char
|
||||
int set_log(int component, int level);
|
||||
void set_glog(int level);
|
||||
|
||||
mapping * log_level_names_ptr(void);
|
||||
mapping * log_option_names_ptr(void);
|
||||
mapping * log_maskmap_ptr(void);
|
||||
void set_glog_onlinelog(int enable);
|
||||
void set_glog_filelog(int enable);
|
||||
void set_component_filelog(int comp);
|
||||
@@ -298,21 +250,11 @@ void set_component_consolelog(int comp);
|
||||
int map_str_to_int(const mapping *map, const char *str);
|
||||
char *map_int_to_str(const mapping *map, const int val);
|
||||
void logClean (void);
|
||||
int is_newline( char *str, int size);
|
||||
|
||||
int register_log_component(char *name, char *fext, int compidx);
|
||||
int register_log_component(const char *name, const char *fext, int compidx);
|
||||
|
||||
#define LOG_MEM_SIZE 100*1024*1024
|
||||
#define LOG_MEM_FILE "./logmem.log"
|
||||
void flush_mem_to_file(void);
|
||||
int logInit_log_mem(void);
|
||||
int logInit_log_mem(char*);
|
||||
void close_log_mem(void);
|
||||
|
||||
typedef struct {
|
||||
char* buf_p;
|
||||
int buf_index;
|
||||
int enable_flag;
|
||||
} log_mem_cnt_t;
|
||||
|
||||
/** @}*/
|
||||
|
||||
@@ -365,9 +307,6 @@ int32_t write_file_matlab(const char *fname, const char *vname, void *data, int
|
||||
" level: add log level indication in log messages\n"\
|
||||
" thread: add threads names in log messages\n"
|
||||
|
||||
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/
|
||||
/* LOG global configuration parameters */
|
||||
/* optname help paramflags XXXptr defXXXval type numelt */
|
||||
@@ -396,41 +335,166 @@ int32_t write_file_matlab(const char *fname, const char *vname, void *data, int
|
||||
# if T_TRACER
|
||||
#include "T.h"
|
||||
/* per component, level dependent macros */
|
||||
# define LOG_E(c, x...) do { T(T_LEGACY_ ## c ## _ERROR, T_PRINTF(x)) ; if (T_stdout) { if( g_log->log_component[c].level >= OAILOG_ERR ) logRecord_mt(__FILE__, __FUNCTION__, __LINE__,c, OAILOG_ERR, x) ;} } while (0)
|
||||
# define LOG_W(c, x...) do { T(T_LEGACY_ ## c ## _WARNING, T_PRINTF(x)); if (T_stdout) { if( g_log->log_component[c].level >= OAILOG_WARNING ) logRecord_mt(__FILE__, __FUNCTION__, __LINE__,c, OAILOG_WARNING, x) ;} } while (0)
|
||||
# define LOG_A(c, x...) do { T(T_LEGACY_ ## c ## _INFO, T_PRINTF(x)) ; if (T_stdout) { if( g_log->log_component[c].level >= OAILOG_ANALYSIS) logRecord_mt(__FILE__, __FUNCTION__, __LINE__,c, OAILOG_ANALYSIS, x);} } while (0)
|
||||
# define LOG_I(c, x...) do { T(T_LEGACY_ ## c ## _INFO, T_PRINTF(x)) ; if (T_stdout) { if( g_log->log_component[c].level >= OAILOG_INFO ) logRecord_mt(__FILE__, __FUNCTION__, __LINE__,c, OAILOG_INFO, x) ;} } while (0)
|
||||
# define LOG_D(c, x...) do { T(T_LEGACY_ ## c ## _DEBUG, T_PRINTF(x)) ; if (T_stdout) { if( g_log->log_component[c].level >= OAILOG_DEBUG ) logRecord_mt(__FILE__, __FUNCTION__, __LINE__,c, OAILOG_DEBUG, x) ;} } while (0)
|
||||
# define LOG_T(c, x...) do { T(T_LEGACY_ ## c ## _TRACE, T_PRINTF(x)) ; if (T_stdout) { if( g_log->log_component[c].level >= OAILOG_TRACE ) logRecord_mt(__FILE__, __FUNCTION__, __LINE__,c, OAILOG_TRACE, x) ;} } while (0)
|
||||
# define VLOG(c,l, f, args) do { if (T_stdout) { if( g_log->log_component[c].level >= l ) vlogRecord_mt(__FILE__, __FUNCTION__, __LINE__,c, l, f, args) ;} } while (0)
|
||||
#define LOG_E(c, x...) \
|
||||
do { \
|
||||
T(T_LEGACY_##c##_ERROR, T_PRINTF(x)); \
|
||||
if (T_stdout) { \
|
||||
if (g_log->log_component[c].level >= OAILOG_ERR) \
|
||||
logRecord_mt(__FILE__, __FUNCTION__, __LINE__, c, OAILOG_ERR, x); \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
#define LOG_W(c, x...) \
|
||||
do { \
|
||||
T(T_LEGACY_##c##_WARNING, T_PRINTF(x)); \
|
||||
if (T_stdout) { \
|
||||
if (g_log->log_component[c].level >= OAILOG_WARNING) \
|
||||
logRecord_mt(__FILE__, __FUNCTION__, __LINE__, c, OAILOG_WARNING, x); \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
#define LOG_A(c, x...) \
|
||||
do { \
|
||||
T(T_LEGACY_##c##_INFO, T_PRINTF(x)); \
|
||||
if (T_stdout) { \
|
||||
if (g_log->log_component[c].level >= OAILOG_ANALYSIS) \
|
||||
logRecord_mt(__FILE__, __FUNCTION__, __LINE__, c, OAILOG_ANALYSIS, x); \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
#define LOG_I(c, x...) \
|
||||
do { \
|
||||
T(T_LEGACY_##c##_INFO, T_PRINTF(x)); \
|
||||
if (T_stdout) { \
|
||||
if (g_log->log_component[c].level >= OAILOG_INFO) \
|
||||
logRecord_mt(__FILE__, __FUNCTION__, __LINE__, c, OAILOG_INFO, x); \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
#define LOG_D(c, x...) \
|
||||
do { \
|
||||
T(T_LEGACY_##c##_DEBUG, T_PRINTF(x)); \
|
||||
if (T_stdout) { \
|
||||
if (g_log->log_component[c].level >= OAILOG_DEBUG) \
|
||||
logRecord_mt(__FILE__, __FUNCTION__, __LINE__, c, OAILOG_DEBUG, x); \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
#define LOG_DDUMP(c, b, s, f, x...) \
|
||||
do { \
|
||||
T(T_LEGACY_##c##_DEBUG, T_PRINTF(x)); \
|
||||
if (T_stdout) { \
|
||||
if (g_log->log_component[c].level >= OAILOG_DEBUG) \
|
||||
log_dump(c, b, s, f, x); \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
#define LOG_T(c, x...) \
|
||||
do { \
|
||||
T(T_LEGACY_##c##_TRACE, T_PRINTF(x)); \
|
||||
if (T_stdout) { \
|
||||
if (g_log->log_component[c].level >= OAILOG_TRACE) \
|
||||
logRecord_mt(__FILE__, __FUNCTION__, __LINE__, c, OAILOG_TRACE, x); \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
#define VLOG(c, l, f, args) \
|
||||
do { \
|
||||
if (T_stdout) { \
|
||||
if (g_log->log_component[c].level >= l) \
|
||||
vlogRecord_mt(__FILE__, __FUNCTION__, __LINE__, c, l, f, args); \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
/* macro used to dump a buffer or a message as in openair2/RRC/LTE/RRC_eNB.c, replaces LOG_F macro */
|
||||
# define LOG_DUMPMSG(c, f, b, s, x...) do { if(g_log->dump_mask & f) log_dump(c, b, s, LOG_DUMP_CHAR, x) ;} while (0) /* */
|
||||
#define LOG_DUMPMSG(c, f, b, s, x...) \
|
||||
do { \
|
||||
if (g_log->dump_mask & f) \
|
||||
log_dump(c, b, s, LOG_DUMP_CHAR, x); \
|
||||
} while (0)
|
||||
|
||||
/* bitmask dependent macros, to isolate debugging code */
|
||||
# define LOG_DEBUGFLAG(D) (g_log->debug_mask & D)
|
||||
#define LOG_DEBUGFLAG(D) (g_log->debug_mask & D)
|
||||
|
||||
/* bitmask dependent macros, to generate debug file such as matlab file or message dump */
|
||||
# define LOG_DUMPFLAG(D) (g_log->dump_mask & D)
|
||||
# define LOG_M(file, vector, data, len, dec, format) do { write_file_matlab(file, vector, data, len, dec, format, 0);} while(0)/* */
|
||||
#define LOG_DUMPFLAG(D) (g_log->dump_mask & D)
|
||||
|
||||
#define LOG_M(file, vector, data, len, dec, format) \
|
||||
do { \
|
||||
write_file_matlab(file, vector, data, len, dec, format, 0); \
|
||||
} while (0)
|
||||
|
||||
/* define variable only used in LOG macro's */
|
||||
# define LOG_VAR(A,B) A B
|
||||
# else /* T_TRACER */
|
||||
# define LOG_E(c, x...) do { if( g_log->log_component[c].level >= OAILOG_ERR ) logRecord_mt(__FILE__, __FUNCTION__, __LINE__,c, OAILOG_ERR, x) ;} while (0)
|
||||
# define LOG_W(c, x...) do { if( g_log->log_component[c].level >= OAILOG_WARNING ) logRecord_mt(__FILE__, __FUNCTION__, __LINE__,c, OAILOG_WARNING, x) ;} while (0)
|
||||
# define LOG_A(c, x...) do { if( g_log->log_component[c].level >= OAILOG_ANALYSIS) logRecord_mt(__FILE__, __FUNCTION__, __LINE__,c, OAILOG_ANALYSIS, x);} while (0)
|
||||
# define LOG_I(c, x...) do { if( g_log->log_component[c].level >= OAILOG_INFO ) logRecord_mt(__FILE__, __FUNCTION__, __LINE__,c, OAILOG_INFO, x) ;} while (0)
|
||||
# define LOG_D(c, x...) do { if( g_log->log_component[c].level >= OAILOG_DEBUG ) logRecord_mt(__FILE__, __FUNCTION__, __LINE__,c, OAILOG_DEBUG, x) ;} while (0)
|
||||
# define LOG_T(c, x...) do { if( g_log->log_component[c].level >= OAILOG_TRACE ) logRecord_mt(__FILE__, __FUNCTION__, __LINE__,c, OAILOG_TRACE, x) ;} while (0)
|
||||
# define VLOG(c,l, f, args) do { if( g_log->log_component[c].level >= l ) vlogRecord_mt(__FILE__, __FUNCTION__, __LINE__,c, l, f, args) ; } while (0)
|
||||
#define LOG_VAR(A, B) A B
|
||||
|
||||
# define nfapi_log(FILE, FNC, LN, COMP, LVL, FMT...)
|
||||
# define LOG_DEBUGFLAG(D) (g_log->dump_mask & D)
|
||||
# define LOG_DUMPFLAG(D) (g_log->debug_mask & D)
|
||||
# define LOG_DUMPMSG(c, f, b, s, x...) do { if(g_log->dump_mask & f) log_dump(c, b, s, LOG_DUMP_CHAR, x) ;} while (0) /* */
|
||||
#else /* no T_TRACER */
|
||||
|
||||
# define LOG_M(file, vector, data, len, dec, format) do { write_file_matlab(file, vector, data, len, dec, format, 0);} while(0)
|
||||
# define LOG_VAR(A,B) A B
|
||||
# define T_ACTIVE(a) (0)
|
||||
# endif /* T_TRACER */
|
||||
#define LOG_E(c, x...) \
|
||||
do { \
|
||||
if (g_log->log_component[c].level >= OAILOG_ERR) \
|
||||
logRecord_mt(__FILE__, __FUNCTION__, __LINE__, c, OAILOG_ERR, x); \
|
||||
} while (0)
|
||||
|
||||
#define LOG_W(c, x...) \
|
||||
do { \
|
||||
if (g_log->log_component[c].level >= OAILOG_WARNING) \
|
||||
logRecord_mt(__FILE__, __FUNCTION__, __LINE__, c, OAILOG_WARNING, x); \
|
||||
} while (0)
|
||||
|
||||
#define LOG_A(c, x...) \
|
||||
do { \
|
||||
if (g_log->log_component[c].level >= OAILOG_ANALYSIS) \
|
||||
logRecord_mt(__FILE__, __FUNCTION__, __LINE__, c, OAILOG_ANALYSIS, x); \
|
||||
} while (0)
|
||||
|
||||
#define LOG_I(c, x...) \
|
||||
do { \
|
||||
if (g_log->log_component[c].level >= OAILOG_INFO) \
|
||||
logRecord_mt(__FILE__, __FUNCTION__, __LINE__, c, OAILOG_INFO, x); \
|
||||
} while (0)
|
||||
|
||||
#define LOG_D(c, x...) \
|
||||
do { \
|
||||
if (g_log->log_component[c].level >= OAILOG_DEBUG) \
|
||||
logRecord_mt(__FILE__, __FUNCTION__, __LINE__, c, OAILOG_DEBUG, x); \
|
||||
} while (0)
|
||||
|
||||
#define LOG_DDUMP(c, b, s, f, x...) \
|
||||
do { \
|
||||
if (g_log->log_component[c].level >= OAILOG_DEBUG) \
|
||||
log_dump(c, b, s, f, x); \
|
||||
} while (0)
|
||||
|
||||
#define LOG_T(c, x...) \
|
||||
do { \
|
||||
if (g_log->log_component[c].level >= OAILOG_TRACE) \
|
||||
logRecord_mt(__FILE__, __FUNCTION__, __LINE__, c, OAILOG_TRACE, x); \
|
||||
} while (0)
|
||||
|
||||
#define VLOG(c, l, f, args) \
|
||||
do { \
|
||||
if (g_log->log_component[c].level >= l) \
|
||||
vlogRecord_mt(__FILE__, __FUNCTION__, __LINE__, c, l, f, args); \
|
||||
} while (0)
|
||||
|
||||
#define nfapi_log(FILE, FNC, LN, COMP, LVL, FMT...)
|
||||
#define LOG_DEBUGFLAG(D) (g_log->dump_mask & D)
|
||||
#define LOG_DUMPFLAG(D) (g_log->debug_mask & D)
|
||||
#define LOG_DUMPMSG(c, f, b, s, x...) \
|
||||
do { \
|
||||
if (g_log->dump_mask & f) \
|
||||
log_dump(c, b, s, LOG_DUMP_CHAR, x); \
|
||||
} while (0) /* */
|
||||
|
||||
#define LOG_M(file, vector, data, len, dec, format) \
|
||||
do { \
|
||||
write_file_matlab(file, vector, data, len, dec, format, 0); \
|
||||
} while (0)
|
||||
|
||||
#define LOG_VAR(A, B) A B
|
||||
#define T_ACTIVE(a) (0)
|
||||
|
||||
#endif /* T_TRACER */
|
||||
|
||||
/* avoid warnings for variables only used in LOG macro's but set outside debug section */
|
||||
#define GCC_NOTUSED __attribute__((unused))
|
||||
|
||||
@@ -361,6 +361,48 @@ ID = LEGACY_NR_MAC_TRACE
|
||||
GROUP = ALL:LEGACY_NR_MAC:LEGACY_GROUP_TRACE:LEGACY
|
||||
FORMAT = string,log
|
||||
|
||||
ID = LEGACY_NR_PHY_DCI_INFO
|
||||
DESC = NR_PHY_DCI legacy logs - info level
|
||||
GROUP = ALL:LEGACY_NR_PHY_DCI:LEGACY_GROUP_INFO:LEGACY
|
||||
FORMAT = string,log
|
||||
ID = LEGACY_NR_PHY_DCI_ERROR
|
||||
DESC = NR_PHY_DCI legacy logs - error level
|
||||
GROUP = ALL:LEGACY_NR_PHY_DCI:LEGACY_GROUP_ERROR:LEGACY
|
||||
FORMAT = string,log
|
||||
ID = LEGACY_NR_PHY_DCI_WARNING
|
||||
DESC = NR_PHY_DCI legacy logs - warning level
|
||||
GROUP = ALL:LEGACY_NR_PHY_DCI:LEGACY_GROUP_WARNING:LEGACY
|
||||
FORMAT = string,log
|
||||
ID = LEGACY_NR_PHY_DCI_DEBUG
|
||||
DESC = NR_PHY_DCI legacy logs - debug level
|
||||
GROUP = ALL:LEGACY_NR_PHY_DCI:LEGACY_GROUP_DEBUG:LEGACY
|
||||
FORMAT = string,log
|
||||
ID = LEGACY_NR_PHY_DCI_TRACE
|
||||
DESC = NR_PHY_DCI legacy logs - trace level
|
||||
GROUP = ALL:LEGACY_NR_PHY_DCI:LEGACY_GROUP_TRACE:LEGACY
|
||||
FORMAT = string,log
|
||||
|
||||
ID = LEGACY_NR_MAC_DCI_INFO
|
||||
DESC = NR_MAC_DCI legacy logs - info level
|
||||
GROUP = ALL:LEGACY_NR_MAC_DCI:LEGACY_GROUP_INFO:LEGACY
|
||||
FORMAT = string,log
|
||||
ID = LEGACY_NR_MAC_DCI_ERROR
|
||||
DESC = NR_MAC_DCI legacy logs - error level
|
||||
GROUP = ALL:LEGACY_NR_MAC_DCI:LEGACY_GROUP_ERROR:LEGACY
|
||||
FORMAT = string,log
|
||||
ID = LEGACY_NR_MAC_DCI_WARNING
|
||||
DESC = NR_MAC_DCI legacy logs - warning level
|
||||
GROUP = ALL:LEGACY_NR_MAC_DCI:LEGACY_GROUP_WARNING:LEGACY
|
||||
FORMAT = string,log
|
||||
ID = LEGACY_NR_MAC_DCI_DEBUG
|
||||
DESC = NR_MAC_DCI legacy logs - debug level
|
||||
GROUP = ALL:LEGACY_NR_MAC_DCI:LEGACY_GROUP_DEBUG:LEGACY
|
||||
FORMAT = string,log
|
||||
ID = LEGACY_NR_MAC_DCI_TRACE
|
||||
DESC = NR_MAC_DCI legacy logs - trace level
|
||||
GROUP = ALL:LEGACY_NR_MAC_DCI:LEGACY_GROUP_TRACE:LEGACY
|
||||
FORMAT = string,log
|
||||
|
||||
ID = LEGACY_PHY_INFO
|
||||
DESC = PHY legacy logs - info level
|
||||
GROUP = ALL:LEGACY_PHY:LEGACY_GROUP_INFO:LEGACY
|
||||
@@ -1198,6 +1240,27 @@ ID = LEGACY_E1AP_ERROR
|
||||
GROUP = ALL:LEGACY_E1AP:LEGACY_GROUP_ERROR:LEGACY
|
||||
FORMAT = string,log
|
||||
|
||||
ID = LEGACY_XNAP_TRACE
|
||||
DESC = XNAP TRACE LEVEL
|
||||
GROUP = ALL:LEGACY_XNAP:LEGACY_GROUP_TRACE:LEGACY
|
||||
FORMAT = string,log
|
||||
ID = LEGACY_XNAP_DEBUG
|
||||
DESC = XNAP DEBUG LEVEL
|
||||
GROUP = ALL:LEGACY_XNAP:LEGACY_GROUP_DEBUG:LEGACY
|
||||
FORMAT = string,log
|
||||
ID = LEGACY_XNAP_INFO
|
||||
DESC = XNAP INFO LEVEL
|
||||
GROUP = ALL:LEGACY_XNAP:LEGACY_GROUP_INFO:LEGACY
|
||||
FORMAT = string,log
|
||||
ID = LEGACY_XNAP_WARNING
|
||||
DESC = XNAP WARNING LEVEL
|
||||
GROUP = ALL:LEGACY_XNAP:LEGACY_GROUP_WARNING:LEGACY
|
||||
FORMAT = string,log
|
||||
ID = LEGACY_XNAP_ERROR
|
||||
DESC = XNAP ERROR LEVEL
|
||||
GROUP = ALL:LEGACY_XNAP:LEGACY_GROUP_ERROR:LEGACY
|
||||
FORMAT = string,log
|
||||
|
||||
#################
|
||||
#### UE LOGS ####
|
||||
#################
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
add_library(tracer_utils OBJECT configuration.c database.c event.c handler.c utils.c)
|
||||
target_link_libraries(tracer_utils PUBLIC m pthread)
|
||||
|
||||
add_library(tracer_events OBJECT event_selector.c)
|
||||
|
||||
add_executable(record record.c)
|
||||
target_link_libraries(record PRIVATE tracer_utils)
|
||||
|
||||
@@ -28,10 +26,19 @@ add_executable(multi multi.c)
|
||||
target_link_libraries(multi PRIVATE tracer_utils T)
|
||||
target_include_directories(multi PRIVATE ..)
|
||||
|
||||
add_executable(textlog textlog.c)
|
||||
target_link_libraries(textlog PRIVATE tracer_utils tracer_filter
|
||||
tracer_logger tracer_view)
|
||||
|
||||
add_subdirectory(filter)
|
||||
add_subdirectory(logger)
|
||||
add_subdirectory(view)
|
||||
|
||||
add_custom_target(T_tools)
|
||||
add_dependencies(T_tools
|
||||
record replay extract_config extract_input_subframe
|
||||
extract_output_subframe extract macpdu2wireshark multi)
|
||||
extract_output_subframe extract macpdu2wireshark multi
|
||||
textlog)
|
||||
add_dependencies(nr-softmodem T_tools)
|
||||
add_dependencies(nr-uesoftmodem T_tools)
|
||||
add_dependencies(lte-softmodem T_tools)
|
||||
@@ -42,9 +49,7 @@ add_dependencies(lte-uesoftmodem T_tools)
|
||||
# GUI-related tools so they can be added on demand, if necessary.
|
||||
add_boolean_option(T_TRACER_GUI OFF "Compile T tracer GUI tools" OFF)
|
||||
if(T_TRACER_GUI)
|
||||
add_executable(textlog textlog.c)
|
||||
target_link_libraries(textlog PRIVATE tracer_utils tracer_filter tracer_gui
|
||||
tracer_logger tracer_view tracer_events)
|
||||
add_library(tracer_events OBJECT event_selector.c)
|
||||
|
||||
find_library(png png REQUIRED)
|
||||
add_executable(enb enb.c)
|
||||
@@ -71,9 +76,6 @@ if(T_TRACER_GUI)
|
||||
tracer_logger tracer_view tracer_events)
|
||||
|
||||
add_subdirectory(gui)
|
||||
add_subdirectory(filter)
|
||||
add_subdirectory(logger)
|
||||
add_subdirectory(view)
|
||||
|
||||
add_dependencies(T_tools textlog enb gnb ue vcd to_vcd)
|
||||
add_dependencies(T_tools enb gnb ue vcd to_vcd)
|
||||
endif()
|
||||
|
||||
@@ -31,9 +31,8 @@ extract: extract.o database.o event.o utils.o configuration.o
|
||||
$(CC) $(CFLAGS) -o $@ $^ $(LIBS)
|
||||
|
||||
textlog: utils.o textlog.o database.o event.o handler.o configuration.o \
|
||||
event_selector.o view/view.a gui/gui.a logger/logger.a \
|
||||
filter/filter.a
|
||||
$(CC) $(CFLAGS) -o textlog $^ $(LIBS) $(XLIBS)
|
||||
view/view.a logger/logger.a filter/filter.a
|
||||
$(CC) $(CFLAGS) -o textlog $^ $(LIBS)
|
||||
|
||||
enb: utils.o enb.o database.o event.o handler.o configuration.o \
|
||||
event_selector.o view/view.a gui/gui.a logger/logger.a \
|
||||
|
||||
@@ -1,42 +1,24 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <pthread.h>
|
||||
#include <signal.h>
|
||||
#include "database.h"
|
||||
#include "event.h"
|
||||
#include "handler.h"
|
||||
#include "logger/logger.h"
|
||||
#include "view/view.h"
|
||||
#include "gui/gui.h"
|
||||
#include "utils.h"
|
||||
#include "event_selector.h"
|
||||
#include "configuration.h"
|
||||
|
||||
typedef struct {
|
||||
int socket;
|
||||
int *is_on;
|
||||
int nevents;
|
||||
pthread_mutex_t lock;
|
||||
} textlog_data;
|
||||
|
||||
void is_on_changed(void *_d)
|
||||
void activate_traces(int socket, int *is_on, int nevents)
|
||||
{
|
||||
textlog_data *d = _d;
|
||||
char t;
|
||||
|
||||
if (pthread_mutex_lock(&d->lock)) abort();
|
||||
|
||||
if (d->socket == -1) goto no_connection;
|
||||
|
||||
t = 1;
|
||||
if (socket_send(d->socket, &t, 1) == -1 ||
|
||||
socket_send(d->socket, &d->nevents, sizeof(int)) == -1 ||
|
||||
socket_send(d->socket, d->is_on, d->nevents * sizeof(int)) == -1)
|
||||
if (socket_send(socket, &t, 1) == -1 ||
|
||||
socket_send(socket, &nevents, sizeof(int)) == -1 ||
|
||||
socket_send(socket, is_on, nevents * sizeof(int)) == -1)
|
||||
abort();
|
||||
|
||||
no_connection:
|
||||
if (pthread_mutex_unlock(&d->lock)) abort();
|
||||
}
|
||||
|
||||
void usage(void)
|
||||
@@ -54,28 +36,18 @@ void usage(void)
|
||||
" -full also dump buffers' content\n"
|
||||
" -raw-time also prints 'raw time'\n"
|
||||
" -ip <host> connect to given IP address (default %s)\n"
|
||||
" -p <port> connect to given port (default %d)\n"
|
||||
" -x GUI output\n"
|
||||
" -debug-gui activate GUI debug logs\n"
|
||||
" -no-gui disable GUI entirely\n",
|
||||
" -p <port> connect to given port (default %d)\n",
|
||||
DEFAULT_REMOTE_IP,
|
||||
DEFAULT_REMOTE_PORT
|
||||
);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
static void *gui_thread(void *_g)
|
||||
{
|
||||
gui *g = _g;
|
||||
gui_loop(g);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
int main(int n, char **v)
|
||||
{
|
||||
extern int volatile gui_logd;
|
||||
char *database_filename = NULL;
|
||||
void *database;
|
||||
int socket;
|
||||
char *ip = DEFAULT_REMOTE_IP;
|
||||
int port = DEFAULT_REMOTE_PORT;
|
||||
char **on_off_name;
|
||||
@@ -86,11 +58,7 @@ int main(int n, char **v)
|
||||
int i;
|
||||
event_handler *h;
|
||||
logger *textlog;
|
||||
gui *g = NULL; /* initialization not necessary but gcc is not happy */
|
||||
int gui_mode = 0;
|
||||
view *out;
|
||||
int gui_active = 1;
|
||||
textlog_data textlog_data;
|
||||
int full = 0;
|
||||
int raw_time = 0;
|
||||
|
||||
@@ -115,16 +83,11 @@ int main(int n, char **v)
|
||||
{ on_off_name[on_off_n]=NULL; on_off_action[on_off_n++]=1; continue; }
|
||||
if (!strcmp(v[i], "-OFF"))
|
||||
{ on_off_name[on_off_n]=NULL; on_off_action[on_off_n++]=0; continue; }
|
||||
if (!strcmp(v[i], "-x")) { gui_mode = 1; continue; }
|
||||
if (!strcmp(v[i], "-debug-gui")) { gui_logd = 1; continue; }
|
||||
if (!strcmp(v[i], "-no-gui")) { gui_active = 0; continue; }
|
||||
if (!strcmp(v[i], "-full")) { full = 1; continue; }
|
||||
if (!strcmp(v[i], "-raw-time")) { raw_time = 1; continue; }
|
||||
usage();
|
||||
}
|
||||
|
||||
if (gui_active == 0) gui_mode = 0;
|
||||
|
||||
if (database_filename == NULL) {
|
||||
printf("ERROR: provide a database file (-d)\n");
|
||||
exit(1);
|
||||
@@ -140,29 +103,12 @@ int main(int n, char **v)
|
||||
|
||||
h = new_handler(database);
|
||||
|
||||
if (gui_active) {
|
||||
g = gui_init();
|
||||
new_thread(gui_thread, g);
|
||||
}
|
||||
|
||||
if (gui_mode) {
|
||||
widget *w, *win;
|
||||
// w = new_textlist(g, 600, 20, 0);
|
||||
w = new_textlist(g, 800, 50, BACKGROUND_COLOR);
|
||||
win = new_toplevel_window(g, 800, 50*12, "textlog");
|
||||
widget_add_child(g, win, w, -1);
|
||||
out = new_view_textlist(1000, 10, g, w);
|
||||
//tout = new_view_textlist(7, 4, g, w);
|
||||
} else {
|
||||
out = new_view_stdout();
|
||||
}
|
||||
out = new_view_stdout();
|
||||
|
||||
for (i = 0; i < number_of_events; i++) {
|
||||
char *name, *desc;
|
||||
database_get_generic_description(database, i, &name, &desc);
|
||||
textlog = new_textlog(h, database, name, desc);
|
||||
// "ENB_PHY_UL_CHANNEL_ESTIMATE",
|
||||
// "ev: {} eNB_id [eNB_ID] frame [frame] subframe [subframe]");
|
||||
logger_add_view(textlog, out);
|
||||
if (full) textlog_dump_buffer(textlog, 1);
|
||||
if (raw_time) textlog_raw_time(textlog, 1);
|
||||
@@ -173,24 +119,21 @@ int main(int n, char **v)
|
||||
for (i = 0; i < on_off_n; i++)
|
||||
on_off(database, on_off_name[i], is_on, on_off_action[i]);
|
||||
|
||||
textlog_data.socket = -1;
|
||||
textlog_data.is_on = is_on;
|
||||
textlog_data.nevents = number_of_events;
|
||||
if (pthread_mutex_init(&textlog_data.lock, NULL)) abort();
|
||||
if (gui_active)
|
||||
setup_event_selector(g, database, is_on, is_on_changed, &textlog_data);
|
||||
|
||||
textlog_data.socket = connect_to(ip, port);
|
||||
socket = connect_to(ip, port);
|
||||
if (socket == -1) {
|
||||
printf("fatal: connection failed\n");
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* send the first message - activate selected traces */
|
||||
is_on_changed(&textlog_data);
|
||||
activate_traces(socket, is_on, number_of_events);
|
||||
|
||||
OBUF ebuf = { osize: 0, omaxsize: 0, obuf: NULL };
|
||||
|
||||
/* read messages */
|
||||
while (1) {
|
||||
event e;
|
||||
e = get_event(textlog_data.socket, &ebuf, database);
|
||||
e = get_event(socket, &ebuf, database);
|
||||
if (e.type == -1) break;
|
||||
handle_event(h, e);
|
||||
}
|
||||
|
||||
6
common/utils/alg/CMakeLists.txt
Normal file
6
common/utils/alg/CMakeLists.txt
Normal file
@@ -0,0 +1,6 @@
|
||||
add_library(alg OBJECT
|
||||
find.c
|
||||
foreach.c
|
||||
)
|
||||
|
||||
target_include_directories(alg PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
49
common/utils/alg/find.c
Normal file
49
common/utils/alg/find.c
Normal file
@@ -0,0 +1,49 @@
|
||||
/*
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2022 Mikel Irazabal
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
*/
|
||||
|
||||
#include "find.h"
|
||||
#include <assert.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
|
||||
elm_arr_t find_if_arr_it(seq_arr_t* arr, void* start_it, void* end_it, void* value, bool (*f)(const void*, const void*))
|
||||
{
|
||||
assert(arr != NULL);
|
||||
|
||||
while (start_it != end_it) {
|
||||
if (f(value, start_it))
|
||||
return (elm_arr_t){.found = true, .it = start_it};
|
||||
start_it = seq_arr_next(arr, start_it);
|
||||
}
|
||||
// If I trusted the average developer I should return it=start_it, but I don't.
|
||||
return (elm_arr_t){.found = false, .it = NULL};
|
||||
}
|
||||
|
||||
elm_arr_t find_if_arr(seq_arr_t* arr, void* value, bool (*f)(const void*, const void*))
|
||||
{
|
||||
assert(arr != NULL);
|
||||
void* start_it = seq_arr_front(arr);
|
||||
void* end_it = seq_arr_end(arr);
|
||||
return find_if_arr_it(arr, start_it, end_it, value, f);
|
||||
}
|
||||
58
common/utils/alg/find.h
Normal file
58
common/utils/alg/find.h
Normal file
@@ -0,0 +1,58 @@
|
||||
/*
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2022 Mikel Irazabal
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef FIND_ALGORITHM
|
||||
#define FIND_ALGORITHM
|
||||
|
||||
#include <stdbool.h>
|
||||
#include "../ds/seq_arr.h"
|
||||
|
||||
typedef struct {
|
||||
void* it;
|
||||
bool found;
|
||||
} elm_arr_t;
|
||||
|
||||
// Sequencial containers
|
||||
|
||||
/**
|
||||
* @brief Find elements in an array if the predicate is true
|
||||
* @param arr The sequence container
|
||||
* @param value Pointer to the value that will be used by the predicate
|
||||
* @param f Function representing the predicate
|
||||
* @return Whether the predicate was fullfilled and the iterator to the element if true
|
||||
*/
|
||||
elm_arr_t find_if_arr(seq_arr_t* arr, void* value, bool (*f)(const void* value, const void* it));
|
||||
|
||||
/**
|
||||
* @brief Find elements in an array in the semi-open range [start_it, end_it)
|
||||
* @param arr The sequence container
|
||||
* @param start_it Iterator to the first element
|
||||
* @param end_it Iterator to the one past last element
|
||||
* @param value Pointer to the value usied in the predicate
|
||||
* @param f Function representing the predicate
|
||||
* @return Whether the predicate was fullfilled and the iterator to the element if true
|
||||
*/
|
||||
elm_arr_t find_if_arr_it(seq_arr_t* arr, void* start_it, void* end_it, void* value, bool (*f)(const void* value, const void* it));
|
||||
|
||||
#endif
|
||||
40
common/utils/alg/foreach.c
Normal file
40
common/utils/alg/foreach.c
Normal file
@@ -0,0 +1,40 @@
|
||||
/*
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2022 Mikel Irazabal
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
*/
|
||||
|
||||
#include "foreach.h"
|
||||
|
||||
#include <assert.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
void for_each(seq_arr_t* arr, void* value, void (*f)(void* value, void* it))
|
||||
{
|
||||
assert(arr != NULL);
|
||||
|
||||
void* it = seq_arr_front(arr);
|
||||
void* end = seq_arr_end(arr);
|
||||
while (it != end) {
|
||||
f(value, it);
|
||||
it = seq_arr_next(arr, it);
|
||||
}
|
||||
}
|
||||
38
common/utils/alg/foreach.h
Normal file
38
common/utils/alg/foreach.h
Normal file
@@ -0,0 +1,38 @@
|
||||
/*
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2022 Mikel Irazabal
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef FOR_EACH_ALGORITHM
|
||||
#define FOR_EACH_ALGORITHM
|
||||
|
||||
#include "../ds/seq_arr.h"
|
||||
|
||||
/**
|
||||
* @brief Apply function to each element in the sequence container
|
||||
* @param arr The sequence container
|
||||
* @param value Pointer to the value that will be used by the function applied
|
||||
* @param fn_apply Function called by every element in the sequence container
|
||||
*/
|
||||
void for_each(seq_arr_t* arr, void* value, void (*fn_apply)(void* value, void* it));
|
||||
|
||||
#endif
|
||||
@@ -1,5 +1,10 @@
|
||||
add_library(ds OBJECT
|
||||
byte_array.c
|
||||
seq_arr.c
|
||||
)
|
||||
|
||||
target_include_directories(ds PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
|
||||
if(ENABLE_TESTS)
|
||||
add_subdirectory(tests)
|
||||
endif()
|
||||
|
||||
190
common/utils/ds/seq_arr.c
Normal file
190
common/utils/ds/seq_arr.c
Normal file
@@ -0,0 +1,190 @@
|
||||
/*
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2022 Mikel Irazabal
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
*/
|
||||
|
||||
#include "seq_arr.h"
|
||||
|
||||
#include <assert.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
static const size_t MIN_SIZE = 8;
|
||||
|
||||
static void maybe_expand(seq_arr_t* arr)
|
||||
{
|
||||
if (arr->size + 1 == arr->cap) {
|
||||
arr->data = realloc(arr->data, 2 * arr->cap * arr->elt_size);
|
||||
assert(arr->data != NULL && "realloc failed to allocate memory");
|
||||
arr->cap *= 2;
|
||||
}
|
||||
}
|
||||
|
||||
static void maybe_shrink(seq_arr_t* arr)
|
||||
{
|
||||
const float occ = (float)arr->size / (float)arr->cap;
|
||||
if (arr->size > MIN_SIZE && occ < 0.25) {
|
||||
assert(arr->cap > MIN_SIZE);
|
||||
seq_arr_t tmp = {.data = NULL, .size = arr->size, .elt_size = arr->elt_size, .cap = arr->cap / 2};
|
||||
tmp.data = calloc(tmp.cap, tmp.cap);
|
||||
assert(tmp.data != NULL && "Memory exhausted");
|
||||
assert(arr->size <= tmp.cap);
|
||||
memcpy(tmp.data, arr->data, arr->size * arr->elt_size);
|
||||
free(arr->data);
|
||||
memcpy(arr, &tmp, sizeof(seq_arr_t));
|
||||
}
|
||||
}
|
||||
|
||||
void seq_arr_init(seq_arr_t* arr, size_t elt_size) //__attribute__(malloc)
|
||||
{
|
||||
assert(arr != NULL);
|
||||
seq_arr_t tmp = {.data = NULL, .size = 0, .elt_size = elt_size, .cap = MIN_SIZE};
|
||||
memcpy(arr, &tmp, sizeof(seq_arr_t));
|
||||
arr->data = calloc(arr->cap, elt_size);
|
||||
assert(arr->data != NULL);
|
||||
}
|
||||
|
||||
void seq_arr_free(seq_arr_t* arr, void (*free_func)(void*))
|
||||
{
|
||||
assert(arr != NULL);
|
||||
assert(arr->data != NULL);
|
||||
|
||||
if (free_func != NULL) {
|
||||
void* start_it = seq_arr_front(arr);
|
||||
void* end_it = seq_arr_end(arr);
|
||||
while (start_it != end_it) {
|
||||
free_func(start_it);
|
||||
start_it = seq_arr_next(arr, start_it);
|
||||
}
|
||||
}
|
||||
|
||||
free(arr->data);
|
||||
}
|
||||
|
||||
void seq_arr_push_back(seq_arr_t* arr, void* data, size_t len)
|
||||
{
|
||||
assert(arr != NULL);
|
||||
assert(arr->data != NULL);
|
||||
// assert(data != NULL);
|
||||
assert(len == arr->elt_size);
|
||||
|
||||
maybe_expand(arr);
|
||||
|
||||
const size_t offset = arr->size * arr->elt_size;
|
||||
memcpy(&arr->data[offset], data, arr->elt_size);
|
||||
arr->size += 1;
|
||||
}
|
||||
|
||||
void seq_arr_erase(seq_arr_t* arr, void* start_it)
|
||||
{
|
||||
// start_it must be in the range of arr->data
|
||||
assert(arr != NULL);
|
||||
assert(start_it != NULL);
|
||||
return seq_arr_erase_deep(arr, start_it, NULL);
|
||||
}
|
||||
|
||||
void seq_arr_erase_deep(seq_arr_t* arr, void* start_it, void (*free_func)(void* it))
|
||||
{
|
||||
// start_it must be in the range of arr->data
|
||||
assert(arr != NULL);
|
||||
assert(start_it != NULL);
|
||||
return seq_arr_erase_it(arr, start_it, seq_arr_next(arr, start_it), free_func);
|
||||
}
|
||||
|
||||
void seq_arr_erase_it(seq_arr_t* arr, void* start_it, void* end_it, void (*free_func)(void* it))
|
||||
{
|
||||
// start_it && end_it must be in the range of arr->data
|
||||
assert(arr != NULL);
|
||||
assert(start_it != NULL);
|
||||
assert(end_it != NULL);
|
||||
assert(end_it >= start_it);
|
||||
|
||||
if (start_it == end_it)
|
||||
return;
|
||||
|
||||
if (free_func != NULL) {
|
||||
void* start_it = seq_arr_front(arr);
|
||||
void* end_it = seq_arr_end(arr);
|
||||
while (start_it != end_it) {
|
||||
free_func(start_it);
|
||||
start_it = seq_arr_next(arr, start_it);
|
||||
}
|
||||
}
|
||||
|
||||
const int num_bytes_move = seq_arr_end(arr) - end_it;
|
||||
assert(num_bytes_move > -1);
|
||||
memmove(start_it, end_it, num_bytes_move);
|
||||
|
||||
const int num_bytes_erase = end_it - start_it;
|
||||
const int32_t num_elm_erase = num_bytes_erase / arr->elt_size;
|
||||
assert(num_elm_erase > 0);
|
||||
arr->size -= num_elm_erase;
|
||||
|
||||
memset(seq_arr_end(arr), 0, num_bytes_erase);
|
||||
|
||||
maybe_shrink(arr);
|
||||
}
|
||||
|
||||
size_t seq_arr_size(seq_arr_t const* arr)
|
||||
{
|
||||
assert(arr != NULL);
|
||||
return arr->size;
|
||||
}
|
||||
|
||||
void* seq_arr_front(seq_arr_t const* arr)
|
||||
{
|
||||
assert(arr != NULL);
|
||||
return arr->data;
|
||||
}
|
||||
|
||||
void* seq_arr_next(seq_arr_t const* arr, void const* it)
|
||||
{
|
||||
assert(arr != NULL);
|
||||
assert(it != NULL);
|
||||
return (uint8_t*)it + arr->elt_size;
|
||||
}
|
||||
|
||||
void* seq_arr_end(seq_arr_t const* arr)
|
||||
{
|
||||
assert(arr != NULL);
|
||||
assert(arr->data != NULL);
|
||||
return &arr->data[arr->size * arr->elt_size];
|
||||
}
|
||||
|
||||
void* seq_arr_at(seq_arr_t const* arr, uint32_t pos)
|
||||
{
|
||||
assert(arr != NULL);
|
||||
assert(arr->data != NULL);
|
||||
assert(pos < arr->size);
|
||||
return arr->data + pos * arr->elt_size;
|
||||
}
|
||||
|
||||
ptrdiff_t seq_arr_dist(seq_arr_t const* arr, void const* first, void const* last)
|
||||
{
|
||||
assert(arr != NULL);
|
||||
assert(first != NULL);
|
||||
assert(last != NULL);
|
||||
const ptrdiff_t pos = (last - first) / arr->elt_size;
|
||||
assert(pos > -1);
|
||||
return pos;
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user