mirror of
https://gitlab.eurecom.fr/oai/openairinterface5g.git
synced 2026-07-18 23:20:32 +00:00
Compare commits
27 Commits
Aerial_Int
...
t2-offload
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
23a9634ea5 | ||
|
|
1dab8f9770 | ||
|
|
a6616fec71 | ||
|
|
5867d4db39 | ||
|
|
b47fcfc8b9 | ||
|
|
630dc0295a | ||
|
|
585044c9f5 | ||
|
|
59f640a9c4 | ||
|
|
5ba6411d88 | ||
|
|
784bf75e4c | ||
|
|
c8d75cfde2 | ||
|
|
bb55895865 | ||
|
|
d53af9c632 | ||
|
|
73cb5f4c38 | ||
|
|
528bf3be84 | ||
|
|
e248c3508c | ||
|
|
e2a372e88e | ||
|
|
a3b4d69f8b | ||
|
|
3e750fe9f6 | ||
|
|
60ed140a3e | ||
|
|
942b43a763 | ||
|
|
f95d778f71 | ||
|
|
148052dd5a | ||
|
|
a4c00c4d9d | ||
|
|
6ddfc64e59 | ||
|
|
94fe7808da | ||
|
|
a8763de019 |
@@ -60,8 +60,6 @@ ForEachMacros:
|
||||
- foreach
|
||||
- Q_FOREACH
|
||||
- BOOST_FOREACH
|
||||
- RB_FOREACH
|
||||
- UE_iterator
|
||||
IncludeBlocks: Preserve
|
||||
IncludeCategories:
|
||||
- Regex: '^<ext/.*\.h>'
|
||||
|
||||
@@ -193,13 +193,6 @@ if (SANITIZE_ADDRESS)
|
||||
# wrong in the pthread library, or something subtly wrong in this CMakeLists.txt. Use Ubuntu 20.04 instead.
|
||||
endif ()
|
||||
|
||||
add_boolean_option(SANITIZE_THREAD False "enable the address sanitizer (TSan)" ON)
|
||||
if (SANITIZE_THREAD)
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fsanitize=thread -fno-omit-frame-pointer -fno-common")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=thread -fno-omit-frame-pointer -fno-common")
|
||||
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fsanitize=thread")
|
||||
endif()
|
||||
|
||||
add_boolean_option(SANITIZE_UNDEFINED False "enable the undefined behavior sanitizer (UBSan)" ON)
|
||||
if (SANITIZE_UNDEFINED)
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fsanitize=undefined -fno-sanitize-recover=all")
|
||||
@@ -300,8 +293,8 @@ set(E2AP_VERSION "E2AP_V2" CACHE STRING "E2AP version")
|
||||
set_property(CACHE E2AP_VERSION PROPERTY STRINGS "E2AP_V1" "E2AP_V2" "E2AP_V3")
|
||||
message(STATUS "Selected E2AP_VERSION: ${E2AP_VERSION}")
|
||||
|
||||
set(KPM_VERSION "KPM_V2_03" CACHE STRING "The KPM SM version to use")
|
||||
set_property(CACHE KPM_VERSION PROPERTY STRINGS "KPM_V2_03" "KPM_V3_00")
|
||||
set(KPM_VERSION "KPM_V2" CACHE STRING "The KPM SM version to use")
|
||||
set_property(CACHE KPM_VERSION PROPERTY STRINGS "KPM_V2" "KPM_V3")
|
||||
message(STATUS "Selected KPM Version: ${KPM_VERSION}")
|
||||
|
||||
|
||||
@@ -470,23 +463,19 @@ add_list1_option(NB_ANTENNAS_RX "4" "Number of antennas in reception" "1" "2" "4
|
||||
add_list1_option(NB_ANTENNAS_TX "4" "Number of antennas in transmission" "1" "2" "4")
|
||||
|
||||
set (CONFIG_ROOTDIR ${OPENAIR_DIR}/common/config)
|
||||
add_library(config_internals OBJECT
|
||||
${CONFIG_ROOTDIR}/config_common.c
|
||||
)
|
||||
|
||||
add_library(CONFIG_LIB
|
||||
${CONFIG_ROOTDIR}/config_load_configmodule.c
|
||||
${CONFIG_ROOTDIR}/config_userapi.c
|
||||
${CONFIG_ROOTDIR}/config_cmdline.c
|
||||
)
|
||||
target_link_libraries(CONFIG_LIB PRIVATE config_internals dl UTIL)
|
||||
|
||||
# CONFIG_LIB is a wrapper around a particular config implementation, default is
|
||||
# libconfig in params_libconfig below
|
||||
pkg_check_modules(libconfig REQUIRED libconfig)
|
||||
target_link_libraries(CONFIG_LIB PRIVATE dl UTIL)
|
||||
add_library(params_libconfig MODULE ${CONFIG_ROOTDIR}/libconfig/config_libconfig.c)
|
||||
target_include_directories(params_libconfig PRIVATE ${libconfig_INCLUDE_DIRS})
|
||||
target_link_libraries(params_libconfig PRIVATE config_internals ${libconfig_LIBRARIES})
|
||||
target_link_libraries(params_libconfig PRIVATE ${libconfig_LIBRARIES})
|
||||
|
||||
# shared library loader
|
||||
add_library(shlib_loader OBJECT common/utils/load_module_shlib.c)
|
||||
@@ -500,15 +489,15 @@ target_link_libraries(shlib_loader PRIVATE CONFIG_LIB)
|
||||
add_boolean_option(ENABLE_LDPC_T2 OFF "Build support for LDPC Offload to T2 library" OFF)
|
||||
set(ENV{PKG_CONFIG_PATH} "$ENV{PKG_CONFIG_PATH}:/usr/local/lib/x86_64-linux-gnu/pkgconfig")
|
||||
if (ENABLE_LDPC_T2)
|
||||
pkg_check_modules(LIBDPDK_T2 REQUIRED libdpdk=20.11.9)
|
||||
find_library(PMD_T2 NAMES rte_baseband_accl_ldpc HINTS ${LIBDPDK_T2_LIBRARY_DIRS})
|
||||
pkg_check_modules(LIBDPDK_OFFLOAD REQUIRED libdpdk=20.11.7)
|
||||
find_library(PMD_T2 NAMES rte_baseband_accl_ldpc HINTS "/opt/dpdk-t2/lib/x86_64-linux-gnu/")
|
||||
if (NOT PMD_T2)
|
||||
message(FATAL_ERROR "could not find poll-mode driver for AccelerComm T2 LDPC Offload (rte_baseband_accl_ldpc.so)")
|
||||
message(FATAL_ERROR "could not find PMD T2")
|
||||
endif()
|
||||
message(STATUS "T2 build: use ${PMD_T2}")
|
||||
add_library(ldpc_t2 MODULE ${OPENAIR1_DIR}/PHY/CODING/nrLDPC_decoder/nrLDPC_decoder_offload.c)
|
||||
set_target_properties(ldpc_t2 PROPERTIES COMPILE_FLAGS "-DALLOW_EXPERIMENTAL_API")
|
||||
target_link_libraries(ldpc_t2 ${LIBDPDK_T2_LDFLAGS} ${PMD_T2})
|
||||
set_target_properties(ldpc_t2 PROPERTIES COMPILE_FLAGS "-DALLOW_EXPERIMENTAL_API -DOFFLOAD_T2")
|
||||
target_link_libraries(ldpc_t2 ${LIBDPDK_OFFLOAD_LDFLAGS} ${PMD_T2})
|
||||
endif()
|
||||
|
||||
##########################################################
|
||||
@@ -726,6 +715,7 @@ 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
|
||||
@@ -1278,6 +1268,7 @@ set(L2_NR_SRC
|
||||
${NR_SDAP_SRC}
|
||||
${NR_RRC_DIR}/rrc_gNB.c
|
||||
${NR_RRC_DIR}/nr_rrc_common.c
|
||||
${NR_RRC_DIR}/L2_nr_interface.c
|
||||
${NR_RRC_DIR}/mac_rrc_dl_direct.c
|
||||
${NR_RRC_DIR}/mac_rrc_dl_f1ap.c
|
||||
${NR_RRC_DIR}/nr_rrc_config.c
|
||||
@@ -1288,7 +1279,6 @@ set(L2_NR_SRC
|
||||
${NR_RRC_DIR}/rrc_gNB_NGAP.c
|
||||
${NR_RRC_DIR}/rrc_gNB_radio_bearers.c
|
||||
${NR_RRC_DIR}/rrc_gNB_cuup.c
|
||||
${NR_RRC_DIR}/rrc_gNB_du.c
|
||||
)
|
||||
|
||||
set(L2_SRC_UE
|
||||
@@ -1432,7 +1422,7 @@ target_link_libraries(L2 PRIVATE x2ap s1ap lte_rrc m2ap)
|
||||
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_link_libraries(L2 PUBLIC e2_agent e2_ran_func)
|
||||
target_compile_definitions(L2 PRIVATE E2_AGENT)
|
||||
target_compile_definitions(L2 PRIVATE ${E2AP_VERSION} ${KPM_VERSION})
|
||||
endif()
|
||||
@@ -1459,7 +1449,7 @@ target_link_libraries(e1_if PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs asn1_f1ap
|
||||
|
||||
target_link_libraries(L2_NR PRIVATE f1ap x2ap s1ap ngap nr_rrc e1ap nr_rlc)
|
||||
if(E2_AGENT)
|
||||
target_link_libraries(L2_NR PUBLIC e2_agent e2_agent_arg e2_ran_func_du_cucp_cuup)
|
||||
target_link_libraries(L2_NR PUBLIC e2_agent e2_ran_func)
|
||||
target_compile_definitions(L2_NR PRIVATE ${E2AP_VERSION} ${KPM_VERSION})
|
||||
target_compile_definitions(L2_NR PRIVATE E2_AGENT)
|
||||
endif()
|
||||
@@ -1686,7 +1676,7 @@ set(libnas_ies_OBJS
|
||||
|
||||
set (libnas_utils_OBJS
|
||||
${NAS_SRC}COMMON/UTIL/device.c
|
||||
common/utils/mem/memory.c
|
||||
${NAS_SRC}COMMON/UTIL/memory.c
|
||||
${NAS_SRC}COMMON/UTIL/nas_timer.c
|
||||
${NAS_SRC}COMMON/UTIL/socket.c
|
||||
${NAS_SRC}COMMON/UTIL/stty.c
|
||||
@@ -1886,6 +1876,8 @@ set (SIMUSRC
|
||||
)
|
||||
add_library(SIMU STATIC ${SIMUSRC} )
|
||||
target_include_directories(SIMU PUBLIC ${OPENAIR1_DIR}/SIMULATION/TOOLS ${OPENAIR1_DIR}/SIMULATION/RF)
|
||||
target_link_libraries(SIMU PRIVATE ${blas_LIBRARIES} ${cblas_LIBRARIES} ${lapacke_LIBRARIES})
|
||||
target_include_directories(SIMU PRIVATE ${blas_INCLUDE_DIRS} ${lapacke_INCLUDE_DIRS})
|
||||
|
||||
# Qt-based scope
|
||||
add_boolean_option(ENABLE_NRQTSCOPE OFF "Build the Qt-Scope" OFF)
|
||||
@@ -2051,6 +2043,7 @@ add_executable(nr-softmodem
|
||||
${rrc_h}
|
||||
${nr_rrc_h}
|
||||
${s1ap_h}
|
||||
# ${OPENAIR_BIN_DIR}/messages_xml.h
|
||||
${OPENAIR_DIR}/executables/nr-gnb.c
|
||||
${OPENAIR_DIR}/executables/nr-ru.c
|
||||
${OPENAIR_DIR}/executables/nr-softmodem.c
|
||||
@@ -2065,39 +2058,7 @@ add_executable(nr-softmodem
|
||||
${PHY_INTERFACE_DIR}/queue_t.c
|
||||
${OPENAIR1_DIR}/PHY/TOOLS/phy_scope_interface.c
|
||||
)
|
||||
add_boolean_option(OAI_AERIAL OFF "Activate OAI's AERIAL driver" OFF)
|
||||
if (OAI_AERIAL)
|
||||
message(STATUS "Building with support for Aerial")
|
||||
|
||||
target_sources(
|
||||
nr-softmodem
|
||||
PRIVATE
|
||||
${OPENAIR_DIR}/fapi/oai-integration/fapi_nvIPC.c
|
||||
${OPENAIR_DIR}/fapi/oai-integration/fapi_vnf_p7.c
|
||||
${OPENAIR_DIR}/fapi/oai-integration/fapi_vnf_p5.c )
|
||||
|
||||
find_library(NVIPC_LIB nvipc REQUIRED)
|
||||
if (NOT NVIPC_LIB)
|
||||
message(FATAL_ERROR "-- nvipc library not found")
|
||||
else ()
|
||||
message(STATUS " nvipc library found in ${NVIPC_LIB}")
|
||||
#add_library(nvipc STATIC SHARED IMPORTED GLOBAL)
|
||||
endif ()
|
||||
|
||||
find_library(NVLOG_LIB nvlog REQUIRED)
|
||||
if (NOT NVLOG_LIB)
|
||||
message(FATAL_ERROR "-- nvlog library not found")
|
||||
else ()
|
||||
message(STATUS " nvlog library found in ${NVLOG_LIB}")
|
||||
endif ()
|
||||
|
||||
add_compile_definitions(ENABLE_L2_SLT_RSP)
|
||||
add_compile_definitions(FAPI_BYTE_ORDERING_BIG_ENDIAN)
|
||||
add_compile_definitions(ENABLE_AERIAL)
|
||||
target_link_libraries(nr-softmodem PRIVATE "${NVLOG_LIB}" "${NVIPC_LIB}")
|
||||
else()
|
||||
message(STATUS "No Support for Aerial")
|
||||
endif()
|
||||
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
|
||||
@@ -2117,6 +2078,10 @@ endif()
|
||||
|
||||
add_dependencies(nr-softmodem ldpc_orig ldpc_optim ldpc_optim8seg ldpc)
|
||||
|
||||
if (ENABLE_LDPC_T1)
|
||||
add_dependencies(nr-softmodem ldpc_t1)
|
||||
endif()
|
||||
|
||||
if (ENABLE_LDPC_T2)
|
||||
add_dependencies(nr-softmodem ldpc_t2)
|
||||
endif()
|
||||
@@ -2144,10 +2109,6 @@ target_link_libraries(nr-cuup PRIVATE
|
||||
GTPV1U e1ap f1ap SIMU_ETH
|
||||
z sctp dl pthread shlib_loader ${T_LIB})
|
||||
target_link_libraries(nr-cuup PRIVATE asn1_lte_rrc_hdrs asn1_nr_rrc_hdrs)
|
||||
if(E2_AGENT)
|
||||
target_link_libraries(nr-cuup PRIVATE e2_agent e2_agent_arg e2_ran_func_cuup)
|
||||
target_compile_definitions(nr-cuup PRIVATE ${E2AP_VERSION} ${KPM_VERSION} E2_AGENT)
|
||||
endif()
|
||||
|
||||
# nr-uesoftmodem is UE implementation
|
||||
#######################################
|
||||
@@ -2155,6 +2116,7 @@ endif()
|
||||
add_executable(nr-uesoftmodem
|
||||
${rrc_h}
|
||||
${s1ap_h}
|
||||
# ${OPENAIR_BIN_DIR}/messages_xml.h
|
||||
${OPENAIR_DIR}/executables/nr-uesoftmodem.c
|
||||
${OPENAIR_DIR}/executables/nr-ue.c
|
||||
${OPENAIR_DIR}/executables/softmodem-common.c
|
||||
@@ -2337,6 +2299,10 @@ add_executable(nr_ulsim
|
||||
${PHY_INTERFACE_DIR}/queue_t.c
|
||||
)
|
||||
|
||||
if (ENABLE_LDPC_T1)
|
||||
add_dependencies(nr_ulsim ldpc_t1)
|
||||
endif()
|
||||
|
||||
if (ENABLE_LDPC_T2)
|
||||
add_dependencies(nr_ulsim ldpc_t2)
|
||||
endif()
|
||||
@@ -2406,7 +2372,7 @@ if (${T_TRACER})
|
||||
PHY_COMMON PHY PHY_UE PHY_NR PHY_NR_COMMON PHY_NR_UE PHY_RU PHY_MEX
|
||||
L2 L2_LTE L2_NR L2_LTE_NR L2_UE NR_L2_UE L2_UE_LTE_NR MAC_NR_COMMON MAC_UE_NR ngap
|
||||
CN_UTILS GTPV1U SCTP_CLIENT MME_APP LIB_NAS_UE NB_IoT SIMU SIMU_ETH OPENAIR0_LIB
|
||||
ldpc_orig ldpc_optim ldpc_optim8seg ldpc_t2 ldpc_cl ldpc_cuda ldpc dfts config_internals)
|
||||
ldpc_orig ldpc_optim ldpc_optim8seg ldpc dfts)
|
||||
if (TARGET ${i})
|
||||
add_dependencies(${i} generate_T)
|
||||
endif()
|
||||
@@ -2472,6 +2438,9 @@ make_driver(nasmesh ${OPENAIR2_DIR}/NETWORK_DRIVER/MESH ${nasmesh_src})
|
||||
# user space tool for configuring MESH IP driver
|
||||
################
|
||||
add_executable(rb_tool
|
||||
${OPENAIR2_DIR}/NETWORK_DRIVER/MESH/constant.h
|
||||
${OPENAIR2_DIR}/NETWORK_DRIVER/MESH/ioctl.h
|
||||
${OPENAIR2_DIR}/NETWORK_DRIVER/MESH/rrc_nas_primitives.h
|
||||
${OPENAIR2_DIR}/NETWORK_DRIVER/MESH/RB_TOOL/rb_tool.c
|
||||
)
|
||||
target_include_directories(rb_tool PRIVATE ${OPENAIR2_DIR}/NETWORK_DRIVER/MESH/)
|
||||
|
||||
@@ -1,281 +0,0 @@
|
||||
/* UE simulator configuration file version 2021-06-17
|
||||
* LTE / 5G Non StandAlone
|
||||
* Copyright (C) 2019-2021 Amarisoft
|
||||
*/
|
||||
{
|
||||
#define N_ANTENNA_DL 2
|
||||
#define N_ANTENNA_UL 2
|
||||
#define TDD 1
|
||||
|
||||
log_options: "all.level=warn,all.max_size=0,nas.level=debug,nas.max_size=1,rrc.level=debug,rrc.max_size=1",
|
||||
log_filename: "/tmp/ue.log",
|
||||
|
||||
/* Enable remote API and Web interface */
|
||||
com_addr: "0.0.0.0:9002",
|
||||
|
||||
include "rf_driver/1chan.cfg",
|
||||
|
||||
/* If true, allow the simulation of several UEs at the same time and
|
||||
allow dynamic UE creation from remote API */
|
||||
|
||||
cell_groups: [{
|
||||
group_type: "nr",
|
||||
multi_ue: true,
|
||||
cells: [{
|
||||
rf_port: 0,
|
||||
bandwidth: 20,
|
||||
band: 78,
|
||||
dl_nr_arfcn:627360,
|
||||
ssb_nr_arfcn:627360,
|
||||
subcarrier_spacing: 30,
|
||||
n_antenna_dl: N_ANTENNA_DL,
|
||||
n_antenna_ul: N_ANTENNA_UL,
|
||||
rx_to_tx_latency:2,
|
||||
}],
|
||||
}],
|
||||
|
||||
/* UE capabilities */
|
||||
/* USIM data */
|
||||
ue_list: [
|
||||
{
|
||||
"ue_id" : 1,
|
||||
"imsi": "208970000000111",
|
||||
"K": "fec86ba6eb707ed08905757b1bb44b8f",
|
||||
"sim_algo":"milenage",
|
||||
"op": "1006020f0a478bf6b699f15c062e42b3",
|
||||
|
||||
as_release: 15,
|
||||
ue_category: "nr",
|
||||
apn:"oai",
|
||||
attach_pdn_type:"ipv4",
|
||||
default_nssai: [ { sst: 1, }, ],
|
||||
default_pdu_session_snssai: { sst: 1, },
|
||||
tun_setup_script: "ue-ifup",
|
||||
},
|
||||
{
|
||||
"ue_id" : 2,
|
||||
"imsi": "208970000000112",
|
||||
"K": "fec86ba6eb707ed08905757b1bb44b8f",
|
||||
"sim_algo":"milenage",
|
||||
"op": "1006020f0a478bf6b699f15c062e42b3",
|
||||
|
||||
as_release: 15,
|
||||
ue_category: "nr",
|
||||
apn:"oai",
|
||||
attach_pdn_type:"ipv4",
|
||||
default_nssai: [ { sst: 1, }, ],
|
||||
default_pdu_session_snssai: { sst: 1, },
|
||||
tun_setup_script: "ue-ifup",
|
||||
},
|
||||
{
|
||||
"ue_id" : 3,
|
||||
"imsi": "208970000000113",
|
||||
"K": "fec86ba6eb707ed08905757b1bb44b8f",
|
||||
"sim_algo":"milenage",
|
||||
"op": "1006020f0a478bf6b699f15c062e42b3",
|
||||
|
||||
as_release: 15,
|
||||
ue_category: "nr",
|
||||
apn:"oai",
|
||||
attach_pdn_type:"ipv4",
|
||||
default_nssai: [ { sst: 1, }, ],
|
||||
default_pdu_session_snssai: { sst: 1, },
|
||||
tun_setup_script: "ue-ifup",
|
||||
},
|
||||
{
|
||||
"ue_id" : 4,
|
||||
"imsi": "208970000000114",
|
||||
"K": "fec86ba6eb707ed08905757b1bb44b8f",
|
||||
"sim_algo":"milenage",
|
||||
"op": "1006020f0a478bf6b699f15c062e42b3",
|
||||
|
||||
as_release: 15,
|
||||
ue_category: "nr",
|
||||
apn:"oai",
|
||||
attach_pdn_type:"ipv4",
|
||||
default_nssai: [ { sst: 1, }, ],
|
||||
default_pdu_session_snssai: { sst: 1, },
|
||||
tun_setup_script: "ue-ifup",
|
||||
},
|
||||
{
|
||||
"ue_id" : 5,
|
||||
"imsi": "208970000000115",
|
||||
"K": "fec86ba6eb707ed08905757b1bb44b8f",
|
||||
"sim_algo":"milenage",
|
||||
"op": "1006020f0a478bf6b699f15c062e42b3",
|
||||
|
||||
as_release: 15,
|
||||
ue_category: "nr",
|
||||
apn:"oai",
|
||||
attach_pdn_type:"ipv4",
|
||||
default_nssai: [ { sst: 1, }, ],
|
||||
default_pdu_session_snssai: { sst: 1, },
|
||||
tun_setup_script: "ue-ifup",
|
||||
},
|
||||
{
|
||||
"ue_id" : 6,
|
||||
"imsi": "208970000000116",
|
||||
"K": "fec86ba6eb707ed08905757b1bb44b8f",
|
||||
"sim_algo":"milenage",
|
||||
"op": "1006020f0a478bf6b699f15c062e42b3",
|
||||
|
||||
as_release: 15,
|
||||
ue_category: "nr",
|
||||
apn:"oai",
|
||||
attach_pdn_type:"ipv4",
|
||||
default_nssai: [ { sst: 1, }, ],
|
||||
default_pdu_session_snssai: { sst: 1, },
|
||||
tun_setup_script: "ue-ifup",
|
||||
},
|
||||
{
|
||||
"ue_id" : 7,
|
||||
"imsi": "208970000000100",
|
||||
"K": "fec86ba6eb707ed08905757b1bb44b8f",
|
||||
"sim_algo":"milenage",
|
||||
"op": "1006020f0a478bf6b699f15c062e42b3",
|
||||
|
||||
as_release: 15,
|
||||
ue_category: "nr",
|
||||
apn:"oai",
|
||||
attach_pdn_type:"ipv4",
|
||||
default_nssai: [ { sst: 1, }, ],
|
||||
default_pdu_session_snssai: { sst: 1, },
|
||||
tun_setup_script: "ue-ifup",
|
||||
},
|
||||
{
|
||||
"ue_id" : 8,
|
||||
"imsi": "208970000000102",
|
||||
"K": "fec86ba6eb707ed08905757b1bb44b8f",
|
||||
"sim_algo":"milenage",
|
||||
"op": "1006020f0a478bf6b699f15c062e42b3",
|
||||
|
||||
as_release: 15,
|
||||
ue_category: "nr",
|
||||
apn:"oai",
|
||||
attach_pdn_type:"ipv4",
|
||||
default_nssai: [ { sst: 1, }, ],
|
||||
default_pdu_session_snssai: { sst: 1, },
|
||||
tun_setup_script: "ue-ifup",
|
||||
},
|
||||
{
|
||||
"ue_id" : 9,
|
||||
"imsi": "208970000000103",
|
||||
"K": "fec86ba6eb707ed08905757b1bb44b8f",
|
||||
"sim_algo":"milenage",
|
||||
"op": "1006020f0a478bf6b699f15c062e42b3",
|
||||
|
||||
as_release: 15,
|
||||
ue_category: "nr",
|
||||
apn:"oai",
|
||||
attach_pdn_type:"ipv4",
|
||||
default_nssai: [ { sst: 1, }, ],
|
||||
default_pdu_session_snssai: { sst: 1, },
|
||||
tun_setup_script: "ue-ifup",
|
||||
},
|
||||
{
|
||||
"ue_id" : 10,
|
||||
"imsi": "208970000000104",
|
||||
"K": "fec86ba6eb707ed08905757b1bb44b8f",
|
||||
"sim_algo":"milenage",
|
||||
"op": "1006020f0a478bf6b699f15c062e42b3",
|
||||
|
||||
as_release: 15,
|
||||
ue_category: "nr",
|
||||
apn:"oai",
|
||||
attach_pdn_type:"ipv4",
|
||||
default_nssai: [ { sst: 1, }, ],
|
||||
default_pdu_session_snssai: { sst: 1, },
|
||||
tun_setup_script: "ue-ifup",
|
||||
},
|
||||
{
|
||||
"ue_id" : 11,
|
||||
"imsi": "208970000000110",
|
||||
"K": "fec86ba6eb707ed08905757b1bb44b8f",
|
||||
"sim_algo":"milenage",
|
||||
"op": "1006020f0a478bf6b699f15c062e42b3",
|
||||
|
||||
as_release: 15,
|
||||
ue_category: "nr",
|
||||
apn:"oai",
|
||||
attach_pdn_type:"ipv4",
|
||||
default_nssai: [ { sst: 1, }, ],
|
||||
default_pdu_session_snssai: { sst: 1, },
|
||||
tun_setup_script: "ue-ifup",
|
||||
},
|
||||
{
|
||||
"ue_id" : 12,
|
||||
"imsi": "208970000000105",
|
||||
"K": "fec86ba6eb707ed08905757b1bb44b8f",
|
||||
"sim_algo":"milenage",
|
||||
"op": "1006020f0a478bf6b699f15c062e42b3",
|
||||
|
||||
as_release: 15,
|
||||
ue_category: "nr",
|
||||
apn:"oai",
|
||||
attach_pdn_type:"ipv4",
|
||||
default_nssai: [ { sst: 1, }, ],
|
||||
default_pdu_session_snssai: { sst: 1, },
|
||||
tun_setup_script: "ue-ifup",
|
||||
},
|
||||
{
|
||||
"ue_id" : 13,
|
||||
"imsi": "208970000000106",
|
||||
"K": "fec86ba6eb707ed08905757b1bb44b8f",
|
||||
"sim_algo":"milenage",
|
||||
"op": "1006020f0a478bf6b699f15c062e42b3",
|
||||
|
||||
as_release: 15,
|
||||
ue_category: "nr",
|
||||
apn:"oai",
|
||||
attach_pdn_type:"ipv4",
|
||||
default_nssai: [ { sst: 1, }, ],
|
||||
default_pdu_session_snssai: { sst: 1, },
|
||||
tun_setup_script: "ue-ifup",
|
||||
},
|
||||
{
|
||||
"ue_id" : 14,
|
||||
"imsi": "208970000000107",
|
||||
"K": "fec86ba6eb707ed08905757b1bb44b8f",
|
||||
"sim_algo":"milenage",
|
||||
"op": "1006020f0a478bf6b699f15c062e42b3",
|
||||
|
||||
as_release: 15,
|
||||
ue_category: "nr",
|
||||
apn:"oai",
|
||||
attach_pdn_type:"ipv4",
|
||||
default_nssai: [ { sst: 1, }, ],
|
||||
default_pdu_session_snssai: { sst: 1, },
|
||||
tun_setup_script: "ue-ifup",
|
||||
},
|
||||
{
|
||||
"ue_id" : 15,
|
||||
"imsi": "208970000000108",
|
||||
"K": "fec86ba6eb707ed08905757b1bb44b8f",
|
||||
"sim_algo":"milenage",
|
||||
"op": "1006020f0a478bf6b699f15c062e42b3",
|
||||
|
||||
as_release: 15,
|
||||
ue_category: "nr",
|
||||
apn:"oai",
|
||||
attach_pdn_type:"ipv4",
|
||||
default_nssai: [ { sst: 1, }, ],
|
||||
default_pdu_session_snssai: { sst: 1, },
|
||||
tun_setup_script: "ue-ifup",
|
||||
},
|
||||
{
|
||||
"ue_id" : 16,
|
||||
"imsi": "208970000000109",
|
||||
"K": "fec86ba6eb707ed08905757b1bb44b8f",
|
||||
"sim_algo":"milenage",
|
||||
"op": "1006020f0a478bf6b699f15c062e42b3",
|
||||
|
||||
as_release: 15,
|
||||
ue_category: "nr",
|
||||
apn:"oai",
|
||||
attach_pdn_type:"ipv4",
|
||||
default_nssai: [ { sst: 1, }, ],
|
||||
default_pdu_session_snssai: { sst: 1, },
|
||||
tun_setup_script: "ue-ifup",
|
||||
},
|
||||
],
|
||||
}
|
||||
@@ -19,16 +19,6 @@ nrmodule2_quectel:
|
||||
IF: wwan0
|
||||
MTU: 1500
|
||||
LogStore: /media/ci_qlogs
|
||||
sphex_quectel:
|
||||
Host: sphex
|
||||
InitScript: sudo stdbuf -oL /home/oaicicd/quectel-CM/quectel-CM -4 -s oai.ipv4 &> /tmp/quecel-cm.log &
|
||||
TermScript: sudo -S killall --signal SIGKILL quectel-CM
|
||||
AttachScript: sudo python3 ci_ctl_qtel.py /dev/ttyUSB3 wup
|
||||
DetachScript: sudo python3 ci_ctl_qtel.py /dev/ttyUSB3 detach
|
||||
NetworkScript: ip a show dev wwan0
|
||||
IF: wwan0
|
||||
MTU: 1500
|
||||
LogStore: /media/ci_qlogs
|
||||
|
||||
adb_ue_1:
|
||||
Host: nano
|
||||
@@ -59,75 +49,75 @@ adb_ue_2:
|
||||
|
||||
amarisoft_ue:
|
||||
Host: amariue
|
||||
InitScript: /root/lteue-linux-2023-10-27/ue/lteue /root/oaicicd/ran_sa_aw2s_asue_2x2/aw2s-multi-20897-2x2.cfg &
|
||||
TermScript: /root/2023-10-27/libs/ws.js -t 10 127.0.0.1:9002 '{"message":"quit"}' || killall -KILL lteue-avx2
|
||||
InitScript: /root/2023-06-10/lteue-linux-2023-06-10/lteue /root/oaicicd/ran_sa_aw2s_asue/aw2s-multi-20897-2x2.cfg &
|
||||
TermScript: /root/2023-06-10/libs/ws.js -t 10 127.0.0.1:9002 '{"message":"quit"}' || killall -KILL lteue-avx2
|
||||
amarisoft_ue_1:
|
||||
Host: amariue
|
||||
AttachScript: /root/2023-10-27/libs/ws.js 127.0.0.1:9002 '{"message":"power_on","ue_id":1}'
|
||||
DetachScript: /root/2023-10-27/libs/ws.js 127.0.0.1:9002 '{"message":"power_off","ue_id":1}'
|
||||
AttachScript: /root/2023-06-10/libs/ws.js 127.0.0.1:9002 '{"message":"power_on","ue_id":1}'
|
||||
DetachScript: /root/2023-06-10/libs/ws.js 127.0.0.1:9002 '{"message":"power_off","ue_id":1}'
|
||||
NetworkScript: ip netns exec ue1 ip a show dev pdn0
|
||||
CmdPrefix: ip netns exec ue1
|
||||
MTU: 1500
|
||||
amarisoft_ue_2:
|
||||
Host: amariue
|
||||
AttachScript: /root/2023-10-27/libs/ws.js 127.0.0.1:9002 '{"message":"power_on","ue_id":2}'
|
||||
DetachScript: /root/2023-10-27/libs/ws.js 127.0.0.1:9002 '{"message":"power_off","ue_id":2}'
|
||||
AttachScript: /root/2023-06-10/libs/ws.js 127.0.0.1:9002 '{"message":"power_on","ue_id":2}'
|
||||
DetachScript: /root/2023-06-10/libs/ws.js 127.0.0.1:9002 '{"message":"power_off","ue_id":2}'
|
||||
NetworkScript: ip netns exec ue2 ip a show dev pdn0
|
||||
CmdPrefix: ip netns exec ue2
|
||||
MTU: 1500
|
||||
amarisoft_ue_3:
|
||||
Host: amariue
|
||||
AttachScript: /root/2023-10-27/libs/ws.js 127.0.0.1:9002 '{"message":"power_on","ue_id":3}'
|
||||
DetachScript: /root/2023-10-27/libs/ws.js 127.0.0.1:9002 '{"message":"power_off","ue_id":3}'
|
||||
AttachScript: /root/2023-06-10/libs/ws.js 127.0.0.1:9002 '{"message":"power_on","ue_id":3}'
|
||||
DetachScript: /root/2023-06-10/libs/ws.js 127.0.0.1:9002 '{"message":"power_off","ue_id":3}'
|
||||
NetworkScript: ip netns exec ue3 ip a show dev pdn0
|
||||
CmdPrefix: ip netns exec ue3
|
||||
MTU: 1500
|
||||
amarisoft_ue_4:
|
||||
Host: amariue
|
||||
AttachScript: /root/2023-10-27/libs/ws.js 127.0.0.1:9002 '{"message":"power_on","ue_id":4}'
|
||||
DetachScript: /root/2023-10-27/libs/ws.js 127.0.0.1:9002 '{"message":"power_off","ue_id":4}'
|
||||
AttachScript: /root/2023-06-10/libs/ws.js 127.0.0.1:9002 '{"message":"power_on","ue_id":4}'
|
||||
DetachScript: /root/2023-06-10/libs/ws.js 127.0.0.1:9002 '{"message":"power_off","ue_id":4}'
|
||||
NetworkScript: ip netns exec ue4 ip a show dev pdn0
|
||||
CmdPrefix: ip netns exec ue4
|
||||
MTU: 1500
|
||||
amarisoft_ue_5:
|
||||
Host: amariue
|
||||
AttachScript: /root/2023-10-27/libs/ws.js 127.0.0.1:9002 '{"message":"power_on","ue_id":5}'
|
||||
DetachScript: /root/2023-10-27/libs/ws.js 127.0.0.1:9002 '{"message":"power_off","ue_id":5}'
|
||||
AttachScript: /root/2023-06-10/libs/ws.js 127.0.0.1:9002 '{"message":"power_on","ue_id":5}'
|
||||
DetachScript: /root/2023-06-10/libs/ws.js 127.0.0.1:9002 '{"message":"power_off","ue_id":5}'
|
||||
NetworkScript: ip netns exec ue5 ip a show dev pdn0
|
||||
CmdPrefix: ip netns exec ue5
|
||||
MTU: 1500
|
||||
amarisoft_ue_6:
|
||||
Host: amariue
|
||||
AttachScript: /root/2023-10-27/libs/ws.js 127.0.0.1:9002 '{"message":"power_on","ue_id":6}'
|
||||
DetachScript: /root/2023-10-27/libs/ws.js 127.0.0.1:9002 '{"message":"power_off","ue_id":6}'
|
||||
AttachScript: /root/2023-06-10/libs/ws.js 127.0.0.1:9002 '{"message":"power_on","ue_id":6}'
|
||||
DetachScript: /root/2023-06-10/libs/ws.js 127.0.0.1:9002 '{"message":"power_off","ue_id":6}'
|
||||
NetworkScript: ip netns exec ue6 ip a show dev pdn0
|
||||
CmdPrefix: ip netns exec ue6
|
||||
MTU: 1500
|
||||
amarisoft_ue_7:
|
||||
Host: amariue
|
||||
AttachScript: /root/2023-10-27/libs/ws.js 127.0.0.1:9002 '{"message":"power_on","ue_id":7}'
|
||||
DetachScript: /root/2023-10-27/libs/ws.js 127.0.0.1:9002 '{"message":"power_off","ue_id":7}'
|
||||
AttachScript: /root/2023-06-10/libs/ws.js 127.0.0.1:9002 '{"message":"power_on","ue_id":7}'
|
||||
DetachScript: /root/2023-06-10/libs/ws.js 127.0.0.1:9002 '{"message":"power_off","ue_id":7}'
|
||||
NetworkScript: ip netns exec ue7 ip a show dev pdn0
|
||||
CmdPrefix: ip netns exec ue7
|
||||
MTU: 1500
|
||||
amarisoft_ue_8:
|
||||
Host: amariue
|
||||
AttachScript: /root/2023-10-27/libs/ws.js 127.0.0.1:9002 '{"message":"power_on","ue_id":8}'
|
||||
DetachScript: /root/2023-10-27/libs/ws.js 127.0.0.1:9002 '{"message":"power_off","ue_id":8}'
|
||||
AttachScript: /root/2023-06-10/libs/ws.js 127.0.0.1:9002 '{"message":"power_on","ue_id":8}'
|
||||
DetachScript: /root/2023-06-10/libs/ws.js 127.0.0.1:9002 '{"message":"power_off","ue_id":8}'
|
||||
NetworkScript: ip netns exec ue8 ip a show dev pdn0
|
||||
CmdPrefix: ip netns exec ue8
|
||||
MTU: 1500
|
||||
amarisoft_ue_9:
|
||||
Host: amariue
|
||||
AttachScript: /root/2023-10-27/libs/ws.js 127.0.0.1:9002 '{"message":"power_on","ue_id":9}'
|
||||
DetachScript: /root/2023-10-27/libs/ws.js 127.0.0.1:9002 '{"message":"power_off","ue_id":9}'
|
||||
AttachScript: /root/2023-06-10/libs/ws.js 127.0.0.1:9002 '{"message":"power_on","ue_id":9}'
|
||||
DetachScript: /root/2023-06-10/libs/ws.js 127.0.0.1:9002 '{"message":"power_off","ue_id":9}'
|
||||
NetworkScript: ip netns exec ue9 ip a show dev pdn0
|
||||
CmdPrefix: ip netns exec ue9
|
||||
MTU: 1500
|
||||
amarisoft_ue_10:
|
||||
Host: amariue
|
||||
AttachScript: /root/2023-10-27/libs/ws.js 127.0.0.1:9002 '{"message":"power_on","ue_id":10}'
|
||||
DetachScript: /root/2023-10-27/libs/ws.js 127.0.0.1:9002 '{"message":"power_off","ue_id":10}'
|
||||
AttachScript: /root/2023-06-10/libs/ws.js 127.0.0.1:9002 '{"message":"power_on","ue_id":10}'
|
||||
DetachScript: /root/2023-06-10/libs/ws.js 127.0.0.1:9002 '{"message":"power_off","ue_id":10}'
|
||||
NetworkScript: ip netns exec ue10 ip a show dev pdn0
|
||||
CmdPrefix: ip netns exec ue10
|
||||
MTU: 1500
|
||||
|
||||
@@ -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', 'oai-gnb-aerial']
|
||||
IMAGES = ['oai-enb', 'oai-lte-ru', 'oai-lte-ue', 'oai-gnb', 'oai-nr-cuup', 'oai-gnb-aw2s', 'oai-nr-ue']
|
||||
|
||||
def CreateWorkspace(sshSession, sourcePath, ranRepository, ranCommitID, ranTargetBranch, ranAllowMerge):
|
||||
if ranCommitID == '':
|
||||
@@ -364,31 +364,25 @@ class Containerize():
|
||||
self.cliBuildOptions = '--no-cache --disable-compression'
|
||||
|
||||
# we always build the ran-build image with all targets
|
||||
# Creating a tupple with the imageName, the DockerFile prefix pattern, targetName and sanitized option
|
||||
imageNames = [('ran-build', 'build', 'ran-build', '')]
|
||||
imageNames = [('ran-build', 'build')]
|
||||
result = re.search('eNB', self.imageKind)
|
||||
# Creating a tupple with the imageName and the DockerFile prefix pattern on obelix
|
||||
if result is not None:
|
||||
imageNames.append(('oai-enb', 'eNB', 'oai-enb', ''))
|
||||
imageNames.append(('oai-enb', 'eNB'))
|
||||
result = re.search('gNB', self.imageKind)
|
||||
if result is not None:
|
||||
imageNames.append(('oai-gnb', 'gNB', 'oai-gnb', ''))
|
||||
imageNames.append(('oai-gnb', 'gNB'))
|
||||
result = re.search('all', self.imageKind)
|
||||
if result is not None:
|
||||
imageNames.append(('oai-enb', 'eNB', 'oai-enb', ''))
|
||||
imageNames.append(('oai-gnb', 'gNB', 'oai-gnb', ''))
|
||||
imageNames.append(('oai-nr-cuup', 'nr-cuup', 'oai-nr-cuup', ''))
|
||||
imageNames.append(('oai-lte-ue', 'lteUE', 'oai-lte-ue', ''))
|
||||
imageNames.append(('oai-nr-ue', 'nrUE', 'oai-nr-ue', ''))
|
||||
imageNames.append(('oai-enb', 'eNB'))
|
||||
imageNames.append(('oai-gnb', 'gNB'))
|
||||
imageNames.append(('oai-nr-cuup', 'nr-cuup'))
|
||||
imageNames.append(('oai-lte-ue', 'lteUE'))
|
||||
imageNames.append(('oai-nr-ue', 'nrUE'))
|
||||
if self.host == 'Red Hat':
|
||||
imageNames.append(('oai-physim', 'phySim', 'oai-physim', ''))
|
||||
imageNames.append(('oai-physim', '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"'))
|
||||
imageNames.append(('oai-nr-ue', 'nrUE', 'oai-nr-ue-asan', '--build-arg "BUILD_OPTION=--sanitize"'))
|
||||
imageNames.append(('oai-nr-cuup', 'nr-cuup', 'oai-nr-cuup-asan', '--build-arg "BUILD_OPTION=--sanitize"'))
|
||||
imageNames.append(('oai-lte-ru', 'lteRU'))
|
||||
result = re.search('build_cross_arm64', self.imageKind)
|
||||
if result is not None:
|
||||
self.dockerfileprefix = '.ubuntu20.cross-arm64'
|
||||
@@ -427,8 +421,8 @@ class Containerize():
|
||||
cmd.run(f"{self.cli} image prune --force")
|
||||
if forceBaseImageBuild:
|
||||
cmd.run(f"{self.cli} image rm {baseImage}:{baseTag}")
|
||||
for image,pattern,name,option in imageNames:
|
||||
cmd.run(f"{self.cli} image rm {name}:{imageTag}")
|
||||
for image,pattern in imageNames:
|
||||
cmd.run(f"{self.cli} image rm {image}:{imageTag}")
|
||||
|
||||
# Build the base image only on Push Events (not on Merge Requests)
|
||||
# On when the base image docker file is being modified.
|
||||
@@ -466,54 +460,46 @@ class Containerize():
|
||||
# Build the target image(s)
|
||||
status = True
|
||||
attemptedImages = ['ran-base']
|
||||
for image,pattern,name,option in imageNames:
|
||||
attemptedImages += [name]
|
||||
for image,pattern in imageNames:
|
||||
attemptedImages += [image]
|
||||
# the archived Dockerfiles have "ran-base:latest" as base image
|
||||
# we need to update them with proper tag
|
||||
cmd.run(f'git checkout -- docker/Dockerfile.{pattern}{self.dockerfileprefix}')
|
||||
cmd.run(f'sed -i -e "s#{baseImage}:latest#{baseImage}:{baseTag}#" docker/Dockerfile.{pattern}{self.dockerfileprefix}')
|
||||
# target images should use the proper ran-build image
|
||||
if image != 'ran-build' and "-asan" in name:
|
||||
cmd.run(f'sed -i -e "s#ran-build:latest#ran-build-asan:{imageTag}#" docker/Dockerfile.{pattern}{self.dockerfileprefix}')
|
||||
elif image != 'ran-build':
|
||||
if 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')
|
||||
ret = cmd.run(f'{self.cli} build {self.cliBuildOptions} --target {image} --tag {image}:{imageTag} --file docker/Dockerfile.{pattern}{self.dockerfileprefix} . > cmake_targets/log/{image}.log 2>&1', timeout=1200)
|
||||
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}/")
|
||||
cmd.run(f"docker run --name test-log -d {image}:{imageTag} /bin/true")
|
||||
cmd.run(f"docker cp test-log:/oai-ran/cmake_targets/log/ cmake_targets/log/{image}/")
|
||||
cmd.run(f"docker rm -f test-log")
|
||||
else:
|
||||
cmd.run(f"mkdir -p cmake_targets/log/{name}")
|
||||
cmd.run(f"mkdir -p cmake_targets/log/{image}")
|
||||
# check the status of the build
|
||||
ret = cmd.run(f"{self.cli} image inspect --format=\'Size = {{{{.Size}}}} bytes\' {name}:{imageTag}")
|
||||
ret = cmd.run(f"{self.cli} image inspect --format=\'Size = {{{{.Size}}}} bytes\' {image}:{imageTag}")
|
||||
if ret.returncode != 0:
|
||||
logging.error('\u001B[1m Could not build properly ' + name + '\u001B[0m')
|
||||
logging.error('\u001B[1m Could not build properly ' + image + '\u001B[0m')
|
||||
status = False
|
||||
# Here we should check if the last container corresponds to a failed command and destroy it
|
||||
cmd.run(f"{self.cli} ps --quiet --filter \"status=exited\" -n1 | xargs --no-run-if-empty {self.cli} rm -f")
|
||||
allImagesSize[name] = 'N/A -- Build Failed'
|
||||
allImagesSize[image] = 'N/A -- Build Failed'
|
||||
break
|
||||
else:
|
||||
result = re.search('Size *= *(?P<size>[0-9\-]+) *bytes', cmd.getBefore())
|
||||
if result is not None:
|
||||
size = float(result.group("size")) / 1000000 # convert to MB
|
||||
imageSizeStr = f'{size:.1f}'
|
||||
logging.debug(f'\u001B[1m {name} size is {imageSizeStr} Mbytes\u001B[0m')
|
||||
allImagesSize[name] = f'{imageSizeStr} Mbytes'
|
||||
logging.debug(f'\u001B[1m {image} size is {imageSizeStr} Mbytes\u001B[0m')
|
||||
allImagesSize[image] = f'{imageSizeStr} Mbytes'
|
||||
else:
|
||||
logging.debug(f'{name} size is unknown')
|
||||
allImagesSize[name] = 'unknown'
|
||||
logging.debug(f'{image} size is unknown')
|
||||
allImagesSize[image] = 'unknown'
|
||||
# Now pruning dangling images in between target builds
|
||||
cmd.run(f"{self.cli} image prune --force")
|
||||
|
||||
# Remove all intermediate build images and clean up
|
||||
if self.ranAllowMerge and forceBaseImageBuild:
|
||||
cmd.run(f"{self.cli} image rm {baseImage}:{baseTag}")
|
||||
cmd.run(f"{self.cli} image rm ran-build:{imageTag} ran-build-asan:{imageTag}")
|
||||
cmd.run(f"{self.cli} image rm ran-build:{imageTag}")
|
||||
cmd.run(f"{self.cli} volume prune --force")
|
||||
|
||||
# create a zip with all logs
|
||||
@@ -712,11 +698,10 @@ class Containerize():
|
||||
orgTag = 'develop'
|
||||
if self.ranAllowMerge:
|
||||
orgTag = 'ci-temp'
|
||||
for image in IMAGES:
|
||||
imageNames = ['oai-enb', 'oai-gnb', 'oai-lte-ue', 'oai-nr-ue', 'oai-lte-ru', 'oai-nr-cuup']
|
||||
for image in imageNames:
|
||||
tagToUse = ImageTagToUse(image, self.ranCommitID, self.ranBranch, self.ranAllowMerge)
|
||||
mySSH.command(f'docker image tag {image}:{orgTag} {imagePrefix}/{tagToUse}', '\$', 5)
|
||||
if re.search('Error response from daemon: No such image:', mySSH.getBefore()) is not None:
|
||||
continue
|
||||
mySSH.command(f'docker push {imagePrefix}/{tagToUse}', '\$', 120)
|
||||
if re.search(': digest:', mySSH.getBefore()) is None:
|
||||
logging.debug(mySSH.getBefore())
|
||||
@@ -873,7 +858,7 @@ class Containerize():
|
||||
|
||||
# Checking Status
|
||||
grep = ''
|
||||
if svcName != '': grep = f' | grep -A3 --color=never {svcName}'
|
||||
if svcName != '': grep = f' | grep -A3 {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
|
||||
@@ -922,8 +907,8 @@ class Containerize():
|
||||
if healthyNb == 1:
|
||||
cnt = 0
|
||||
while (cnt < 20):
|
||||
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', mySSH.getBefore())
|
||||
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())
|
||||
if result is None:
|
||||
time.sleep(6)
|
||||
cnt += 1
|
||||
@@ -977,46 +962,46 @@ class Containerize():
|
||||
HELP.GenericHelp(CONST.Version)
|
||||
sys.exit('Insufficient Parameter')
|
||||
logging.debug('\u001B[1m Undeploying OAI Object from server: ' + lIpAddr + '\u001B[0m')
|
||||
copyin_res = 0
|
||||
mySSH = cls_cmd.getConnection(lIpAddr)
|
||||
yamlDir = f'{lSourcePath}/{self.yamlPath[self.eNB_instance]}'
|
||||
mySSH.run(f'cd {yamlDir}')
|
||||
mySSH = SSH.SSHConnection()
|
||||
mySSH.open(lIpAddr, lUserName, lPassWord)
|
||||
|
||||
mySSH.command('cd ' + lSourcePath + '/' + self.yamlPath[self.eNB_instance], '\$', 5)
|
||||
|
||||
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.run(f'docker-compose -f {yamlDir}/ci-docker-compose.yml config --services')
|
||||
mySSH.command(f'docker-compose -f ci-docker-compose.yml config --services', '\$', 5)
|
||||
# first line has command, last line has next command prompt
|
||||
allServices = mySSH.getBefore().split('\n')[:]
|
||||
allServices = mySSH.getBefore().split('\r\n')[1:-1]
|
||||
services = []
|
||||
for s in allServices:
|
||||
mySSH.run(f'docker-compose -f {yamlDir}/ci-docker-compose.yml ps --all -- {s}')
|
||||
running = mySSH.getBefore().split('\r\n')[:]
|
||||
mySSH.command(f'docker-compose -f ci-docker-compose.yml ps --all -- {s}', '\$', 5, silent=False)
|
||||
running = mySSH.getBefore().split('\r\n')[2:-1]
|
||||
logging.debug(f'running services: {running}')
|
||||
if len(running) > 0: # something is running for that service
|
||||
services.append(s)
|
||||
logging.info(f'stopping services {services}')
|
||||
|
||||
mySSH.run(f'docker-compose -f {yamlDir}/ci-docker-compose.yml stop -t3')
|
||||
mySSH.command(f'docker-compose -f ci-docker-compose.yml stop -t3', '\$', 30)
|
||||
time.sleep(5) # give some time to running containers to stop
|
||||
for svcName in allServices:
|
||||
for svcName in services:
|
||||
# head -n -1 suppresses the final "X exited with status code Y"
|
||||
filename = f'{svcName}-{HTML.testCase_id}.log'
|
||||
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}')
|
||||
# when nv-cubb container is available, copy L1 pcap, OAI Aerial pipeline
|
||||
if 'nv-cubb' in allServices:
|
||||
mySSH.copyin(f'/home/oaicicd/share/nvipc.pcap', f'gnb_nvipc.pcap')
|
||||
mySSH.run(f'cp /home/oaicicd/share/nvipc.pcap {lSourcePath}/cmake_targets/gnb_nvipc.pcap')
|
||||
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 down -v')
|
||||
mySSH.command('docker-compose -f ci-docker-compose.yml down -v', '\$', 5)
|
||||
mySSH.close()
|
||||
|
||||
# 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!'
|
||||
HTML.CreateHtmlTestRow('N/A', 'KO', CONST.ENB_PROCESS_NOLOGFILE_TO_ANALYZE)
|
||||
@@ -1024,7 +1009,7 @@ class Containerize():
|
||||
# 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(f'Analyzing UE logfile {filename}')
|
||||
logging.debug('\u001B[1m Analyzing UE logfile ' + filename + ' \u001B[0m')
|
||||
logStatus = cls_oaicitest.OaiCiTest().AnalyzeLogFile_UE(f'{filename}', HTML, RAN)
|
||||
if (logStatus < 0):
|
||||
fullStatus = False
|
||||
@@ -1043,12 +1028,11 @@ class Containerize():
|
||||
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(f'./{files}.log', f'{self.eNBSourceCodePath}/cmake_targets/')
|
||||
mySSH.copyout(self.eNBIPAddress, self.eNBUserName, self.eNBPassword, f'./{files}.log', f'{self.eNBSourceCodePath}/cmake_targets/')
|
||||
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
|
||||
@@ -1077,16 +1061,6 @@ class Containerize():
|
||||
imageNames = ['oai-enb', 'oai-gnb', 'oai-lte-ue', 'oai-nr-ue', 'oai-lte-ru', 'oai-nr-cuup']
|
||||
for image in imageNames:
|
||||
tagToUse = ImageTagToUse(image, self.ranCommitID, self.ranBranch, self.ranAllowMerge)
|
||||
# In the scenario, for 5G images, we have the choice of either pulling normal images
|
||||
# or -asan images. We need to detect which kind we did pull.
|
||||
if image == 'oai-gnb' or image == 'oai-nr-ue' or image == 'oai-nr-cuup':
|
||||
ret = myCmd.run(f'docker image inspect oai-ci/{tagToUse}', reportNonZero=False, silent=self.displayedNewTags)
|
||||
if ret.returncode != 0:
|
||||
tagToUse = tagToUse.replace('oai-gnb', 'oai-gnb-asan')
|
||||
tagToUse = tagToUse.replace('oai-nr-ue', 'oai-nr-ue-asan')
|
||||
tagToUse = tagToUse.replace('oai-nr-cuup', 'oai-nr-cuup-asan')
|
||||
if not self.displayedNewTags:
|
||||
logging.debug(f'\u001B[1m Using sanitized version of {image} with {tagToUse}\u001B[0m')
|
||||
cmd = f'sed -i -e "s@oaisoftwarealliance/{image}:develop@oai-ci/{tagToUse}@" docker-compose-ci.yml'
|
||||
myCmd.run(cmd, silent=self.displayedNewTags)
|
||||
self.displayedNewTags = True
|
||||
@@ -1225,7 +1199,12 @@ class Containerize():
|
||||
logPath = '../cmake_targets/log/' + ymlPath[1]
|
||||
myCmd = cls_cmd.LocalCmd(d = self.yamlPath[0])
|
||||
cmd = 'cp docker-compose.y*ml docker-compose-ci.yml'
|
||||
myCmd.run(cmd)
|
||||
myCmd.run(cmd, silent=self.displayedNewTags)
|
||||
for image in IMAGES:
|
||||
tagToUse = ImageTagToUse(image, self.ranCommitID, self.ranBranch, self.ranAllowMerge)
|
||||
cmd = f'sed -i -e "s@oaisoftwarealliance/{image}:develop@oai-ci/{tagToUse}@" docker-compose-ci.yml'
|
||||
myCmd.run(cmd, silent=self.displayedNewTags)
|
||||
self.displayedNewTags = True
|
||||
|
||||
# check which containers are running for log recovery later
|
||||
cmd = 'docker-compose -f docker-compose-ci.yml ps --all'
|
||||
@@ -1266,7 +1245,7 @@ class Containerize():
|
||||
fullStatus = True
|
||||
if anyLogs:
|
||||
# Analyzing log file(s)!
|
||||
listOfPossibleRanContainers = ['enb*', 'gnb*', 'cu*', 'du*']
|
||||
listOfPossibleRanContainers = ['enb', 'gnb', 'cu', 'du']
|
||||
for container in listOfPossibleRanContainers:
|
||||
filenames = './*-oai-' + container + '.log'
|
||||
cmd = f'ls {filenames}'
|
||||
|
||||
@@ -23,8 +23,8 @@ gNBs =
|
||||
tr_s_preference = "f1";
|
||||
|
||||
local_s_if_name = "eth0";
|
||||
local_s_address = "192.168.71.150";
|
||||
remote_s_address = "192.168.71.171";
|
||||
local_s_address = "192.168.71.140";
|
||||
remote_s_address = "192.168.71.142";
|
||||
local_s_portc = 501;
|
||||
local_s_portd = 2153;
|
||||
remote_s_portc = 500;
|
||||
@@ -51,9 +51,9 @@ gNBs =
|
||||
{
|
||||
|
||||
GNB_INTERFACE_NAME_FOR_NG_AMF = "eth0";
|
||||
GNB_IPV4_ADDRESS_FOR_NG_AMF = "192.168.71.150";
|
||||
GNB_IPV4_ADDRESS_FOR_NG_AMF = "192.168.71.140";
|
||||
GNB_INTERFACE_NAME_FOR_NGU = "eth0";
|
||||
GNB_IPV4_ADDRESS_FOR_NGU = "192.168.71.150";
|
||||
GNB_IPV4_ADDRESS_FOR_NGU = "192.168.71.140";
|
||||
GNB_PORT_FOR_S1U = 2152; # Spec 2152
|
||||
};
|
||||
}
|
||||
@@ -75,11 +75,15 @@ security = {
|
||||
drb_ciphering = "yes";
|
||||
drb_integrity = "no";
|
||||
};
|
||||
|
||||
log_config : {
|
||||
global_log_level = "info";
|
||||
pdcp_log_level = "info";
|
||||
rrc_log_level = "info";
|
||||
f1ap_log_level = "info";
|
||||
ngap_log_level = "info";
|
||||
};
|
||||
log_config :
|
||||
{
|
||||
global_log_level ="info";
|
||||
hw_log_level ="info";
|
||||
phy_log_level ="info";
|
||||
mac_log_level ="info";
|
||||
rlc_log_level ="debug";
|
||||
pdcp_log_level ="info";
|
||||
rrc_log_level ="info";
|
||||
f1ap_log_level ="debug";
|
||||
ngap_log_level ="debug";
|
||||
};
|
||||
|
||||
@@ -78,8 +78,12 @@ security = {
|
||||
log_config :
|
||||
{
|
||||
global_log_level ="info";
|
||||
hw_log_level ="info";
|
||||
phy_log_level ="info";
|
||||
mac_log_level ="info";
|
||||
rlc_log_level ="debug";
|
||||
pdcp_log_level ="info";
|
||||
rrc_log_level ="info";
|
||||
f1ap_log_level ="info";
|
||||
ngap_log_level ="info";
|
||||
f1ap_log_level ="debug";
|
||||
ngap_log_level ="debug";
|
||||
};
|
||||
@@ -16,7 +16,7 @@ gNBs =
|
||||
|
||||
// Tracking area code, 0x0000 and 0xfffe are reserved values
|
||||
tracking_area_code = 1;
|
||||
plmn_list = ({ mcc = 208; mnc = 99; mnc_length = 2; snssaiList = ({ sst = 1 }, { sst = 2 }, { sst = 3 }) });
|
||||
plmn_list = ({ mcc = 208; mnc = 99; mnc_length = 2; snssaiList = ({ sst = 1, sd = 0xffffff }) });
|
||||
|
||||
|
||||
nr_cellid = 12345678L;
|
||||
@@ -24,8 +24,8 @@ gNBs =
|
||||
tr_s_preference = "f1";
|
||||
|
||||
local_s_if_name = "lo";
|
||||
local_s_address = "192.168.71.150";
|
||||
remote_s_address = "0.0.0.0"; # multiple DUs
|
||||
local_s_address = "192.168.72.140";
|
||||
remote_s_address = "192.168.72.143";
|
||||
local_s_portc = 501;
|
||||
local_s_portd = 2152;
|
||||
remote_s_portc = 500;
|
||||
@@ -52,9 +52,9 @@ gNBs =
|
||||
(
|
||||
{
|
||||
type = "cp";
|
||||
ipv4_cucp = "192.168.71.150";
|
||||
ipv4_cucp = "192.168.72.140";
|
||||
port_cucp = 38462;
|
||||
ipv4_cuup = "0.0.0.0"; # multiple CU-UPs
|
||||
ipv4_cuup = "192.168.72.141";
|
||||
port_cuup = 38462;
|
||||
}
|
||||
)
|
||||
|
||||
@@ -8,7 +8,6 @@ gNBs =
|
||||
{
|
||||
////////// Identification parameters:
|
||||
gNB_ID = 0xe00;
|
||||
gNB_CU_UP_ID = 0xe00;
|
||||
|
||||
# cell_type = "CELL_MACRO_GNB";
|
||||
|
||||
@@ -22,12 +21,12 @@ gNBs =
|
||||
tr_s_preference = "f1";
|
||||
|
||||
local_s_if_name = "lo";
|
||||
local_s_address = "192.168.72.161";
|
||||
remote_s_address = "192.168.72.171";
|
||||
local_s_address = "192.168.72.141";
|
||||
remote_s_address = "192.168.72.142";
|
||||
local_s_portc = 501;
|
||||
local_s_portd = 2153;
|
||||
local_s_portd = 2152;
|
||||
remote_s_portc = 500;
|
||||
remote_s_portd = 2153;
|
||||
remote_s_portd = 2152;
|
||||
|
||||
# ------- SCTP definitions
|
||||
SCTP :
|
||||
@@ -41,17 +40,17 @@ gNBs =
|
||||
(
|
||||
{
|
||||
type = "up";
|
||||
ipv4_cucp = "192.168.71.150";
|
||||
ipv4_cuup = "192.168.71.161";
|
||||
ipv4_cucp = "192.168.72.140";
|
||||
ipv4_cuup = "192.168.72.141";
|
||||
}
|
||||
)
|
||||
|
||||
NETWORK_INTERFACES :
|
||||
{
|
||||
GNB_INTERFACE_NAME_FOR_NG_AMF = "demo-oai";
|
||||
GNB_IPV4_ADDRESS_FOR_NG_AMF = "192.168.71.161/24";
|
||||
GNB_IPV4_ADDRESS_FOR_NG_AMF = "192.168.71.141/24";
|
||||
GNB_INTERFACE_NAME_FOR_NGU = "demo-oai";
|
||||
GNB_IPV4_ADDRESS_FOR_NGU = "192.168.71.161/24";
|
||||
GNB_IPV4_ADDRESS_FOR_NGU = "192.168.71.141/24";
|
||||
GNB_PORT_FOR_S1U = 2152; # Spec 2152
|
||||
};
|
||||
}
|
||||
|
||||
@@ -8,7 +8,6 @@ gNBs =
|
||||
{
|
||||
////////// Identification parameters:
|
||||
gNB_ID = 0xe00;
|
||||
gNB_CU_UP_ID = 0xe00;
|
||||
|
||||
# cell_type = "CELL_MACRO_GNB";
|
||||
|
||||
|
||||
@@ -7,7 +7,6 @@ gNBs =
|
||||
{
|
||||
////////// Identification parameters:
|
||||
gNB_ID = 0xe00;
|
||||
gNB_DU_ID = 0xe00;
|
||||
|
||||
# cell_type = "CELL_MACRO_GNB";
|
||||
|
||||
@@ -218,7 +217,7 @@ THREAD_STRUCT = (
|
||||
|
||||
rfsimulator: {
|
||||
serveraddr = "server";
|
||||
serverport = 4043;
|
||||
serverport = "4043";
|
||||
options = (); #("saviq"); or/and "chanmod"
|
||||
modelname = "AWGN";
|
||||
IQfile = "/tmp/rfsimulator.iqs"
|
||||
|
||||
@@ -1,218 +0,0 @@
|
||||
Active_gNBs = ( "gNB-Eurecom-DU");
|
||||
# Asn1_verbosity, choice in: none, info, annoying
|
||||
Asn1_verbosity = "none";
|
||||
|
||||
gNBs =
|
||||
(
|
||||
{
|
||||
////////// Identification parameters:
|
||||
gNB_ID = 0xe00;
|
||||
gNB_DU_ID = 0xe00;
|
||||
|
||||
# cell_type = "CELL_MACRO_GNB";
|
||||
|
||||
gNB_name = "gNB-Eurecom-DU";
|
||||
|
||||
// Tracking area code, 0x0000 and 0xfffe are reserved values
|
||||
tracking_area_code = 1;
|
||||
plmn_list = ({ mcc = 222; mnc = 01; mnc_length = 2; snssaiList = ({ sst = 1, sd = 0xffffff }) });
|
||||
|
||||
|
||||
nr_cellid = 12345678L;
|
||||
|
||||
////////// Physical parameters:
|
||||
|
||||
min_rxtxtime = 6;
|
||||
|
||||
|
||||
servingCellConfigCommon = (
|
||||
{
|
||||
#spCellConfigCommon
|
||||
|
||||
physCellId = 0;
|
||||
|
||||
# downlinkConfigCommon
|
||||
#frequencyInfoDL
|
||||
# this is 3600 MHz + 43 PRBs@30kHz SCS (same as initial BWP)
|
||||
absoluteFrequencySSB = 423130;
|
||||
dl_frequencyBand = 1;
|
||||
# this is 3600 MHz
|
||||
dl_absoluteFrequencyPointA = 422194;
|
||||
#scs-SpecificCarrierList
|
||||
dl_offstToCarrier = 0;
|
||||
# subcarrierSpacing
|
||||
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
|
||||
dl_subcarrierSpacing = 0;
|
||||
dl_carrierBandwidth = 52;
|
||||
#initialDownlinkBWP
|
||||
#genericParameters
|
||||
# this is RBstart=27,L=48 (275*(L-1))+RBstart
|
||||
initialDLBWPlocationAndBandwidth = 14025; # 6366 12925 12956 28875 12952
|
||||
# subcarrierSpacing
|
||||
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
|
||||
initialDLBWPsubcarrierSpacing = 0;
|
||||
#pdcch-ConfigCommon
|
||||
initialDLBWPcontrolResourceSetZero = 7;
|
||||
initialDLBWPsearchSpaceZero = 0;
|
||||
|
||||
#uplinkConfigCommon
|
||||
#frequencyInfoUL
|
||||
ul_frequencyBand = 1;
|
||||
ul_absoluteFrequencyPointA = 384194;
|
||||
#scs-SpecificCarrierList
|
||||
ul_offstToCarrier = 0;
|
||||
# subcarrierSpacing
|
||||
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
|
||||
ul_subcarrierSpacing = 0;
|
||||
ul_carrierBandwidth = 52;
|
||||
pMax = 20;
|
||||
#initialUplinkBWP
|
||||
#genericParameters
|
||||
initialULBWPlocationAndBandwidth = 14025;
|
||||
# subcarrierSpacing
|
||||
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
|
||||
initialULBWPsubcarrierSpacing = 0;
|
||||
#rach-ConfigCommon
|
||||
#rach-ConfigGeneric
|
||||
prach_ConfigurationIndex = 98;
|
||||
#prach_msg1_FDM
|
||||
#0 = one, 1=two, 2=four, 3=eight
|
||||
prach_msg1_FDM = 0;
|
||||
prach_msg1_FrequencyStart = 0;
|
||||
zeroCorrelationZoneConfig = 12;
|
||||
preambleReceivedTargetPower = -90;
|
||||
#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 = 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 = 0,
|
||||
# restrictedSetConfig
|
||||
# 0=unrestricted, 1=restricted type A, 2=restricted type B
|
||||
restrictedSetConfig = 0,
|
||||
|
||||
msg3_DeltaPreamble = 1;
|
||||
p0_NominalWithGrant =-90;
|
||||
|
||||
# pucch-ConfigCommon setup :
|
||||
# pucchGroupHopping
|
||||
# 0 = neither, 1= group hopping, 2=sequence hopping
|
||||
pucchGroupHopping = 0;
|
||||
hoppingId = 40;
|
||||
p0_nominal = -70;
|
||||
n_TimingAdvanceOffset = 0;
|
||||
# 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 = 0;
|
||||
|
||||
|
||||
#tdd-UL-DL-ConfigurationCommon
|
||||
# subcarrierSpacing
|
||||
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
|
||||
referenceSubcarrierSpacing = 0;
|
||||
ssPBCH_BlockPower = -25;
|
||||
}
|
||||
|
||||
);
|
||||
|
||||
|
||||
# ------- SCTP definitions
|
||||
SCTP :
|
||||
{
|
||||
# Number of streams to use in input/output
|
||||
SCTP_INSTREAMS = 2;
|
||||
SCTP_OUTSTREAMS = 2;
|
||||
};
|
||||
}
|
||||
);
|
||||
|
||||
MACRLCs = (
|
||||
{
|
||||
num_cc = 1;
|
||||
tr_s_preference = "local_L1";
|
||||
tr_n_preference = "f1";
|
||||
local_n_if_name = "eth0";
|
||||
local_n_address = "192.168.68.195";
|
||||
remote_n_address = "192.168.68.194";
|
||||
local_n_portc = 500;
|
||||
local_n_portd = 2153;
|
||||
remote_n_portc = 501;
|
||||
remote_n_portd = 2153;
|
||||
pusch_TargetSNRx10 = 200;
|
||||
pucch_TargetSNRx10 = 200;
|
||||
ulsch_max_frame_inactivity = 1;
|
||||
}
|
||||
);
|
||||
|
||||
L1s = (
|
||||
{
|
||||
num_cc = 1;
|
||||
tr_n_preference = "local_mac";
|
||||
prach_dtx_threshold = 200;
|
||||
pucch0_dtx_threshold = 150;
|
||||
ofdm_offset_divisor = 8; #set this to UINT_MAX for offset 0
|
||||
}
|
||||
);
|
||||
|
||||
RUs = (
|
||||
{
|
||||
local_rf = "yes"
|
||||
nb_tx = 1
|
||||
nb_rx = 1
|
||||
# The higher att for TX than RX is because we use a circulator (as for TDD),
|
||||
# while we should use a duplexer in the FDD case. However, it uses the same setup.
|
||||
att_tx = 18
|
||||
att_rx = 0;
|
||||
bands = [1];
|
||||
max_pdschReferenceSignalPower = -27;
|
||||
max_rxgain = 108;
|
||||
eNB_instances = [0];
|
||||
#beamforming 1x4 matrix:
|
||||
bf_weights = [0x00007fff, 0x0000, 0x0000, 0x0000];
|
||||
clock_src = "internal";
|
||||
}
|
||||
);
|
||||
|
||||
THREAD_STRUCT = (
|
||||
{
|
||||
#three config for level of parallelism "PARALLEL_SINGLE_THREAD", "PARALLEL_RU_L1_SPLIT", or "PARALLEL_RU_L1_TRX_SPLIT"
|
||||
parallel_config = "PARALLEL_SINGLE_THREAD";
|
||||
#two option for worker "WORKER_DISABLE" or "WORKER_ENABLE"
|
||||
worker_config = "WORKER_ENABLE";
|
||||
}
|
||||
);
|
||||
|
||||
log_config : {
|
||||
global_log_level = "info";
|
||||
};
|
||||
@@ -7,7 +7,6 @@ gNBs =
|
||||
{
|
||||
////////// Identification parameters:
|
||||
gNB_ID = 0xe00;
|
||||
gNB_DU_ID = 0xe00;
|
||||
|
||||
# cell_type = "CELL_MACRO_GNB";
|
||||
|
||||
@@ -15,7 +14,7 @@ gNBs =
|
||||
|
||||
// Tracking area code, 0x0000 and 0xfffe are reserved values
|
||||
tracking_area_code = 1;
|
||||
plmn_list = ({ mcc = 208; mnc = 99; mnc_length = 2; snssaiList = ({ sst = 1 }, { sst = 2 }, { sst = 3 } ) });
|
||||
plmn_list = ({ mcc = 208; mnc = 99; mnc_length = 2; snssaiList = ({ sst = 1, sd = 0xffffff }) });
|
||||
|
||||
|
||||
nr_cellid = 12345678L;
|
||||
@@ -23,6 +22,7 @@ gNBs =
|
||||
////////// Physical parameters:
|
||||
|
||||
min_rxtxtime = 6;
|
||||
force_256qam_off = 1;
|
||||
|
||||
servingCellConfigCommon = (
|
||||
{
|
||||
@@ -169,8 +169,8 @@ MACRLCs = (
|
||||
tr_s_preference = "local_L1";
|
||||
tr_n_preference = "f1";
|
||||
local_n_if_name = "eth0";
|
||||
local_n_address = "192.168.71.171";
|
||||
remote_n_address = "192.168.71.150";
|
||||
local_n_address = "192.168.71.142";
|
||||
remote_n_address = "192.168.71.140";
|
||||
local_n_portc = 500;
|
||||
local_n_portd = 2153;
|
||||
remote_n_portc = 501;
|
||||
@@ -217,17 +217,21 @@ THREAD_STRUCT = (
|
||||
);
|
||||
rfsimulator: {
|
||||
serveraddr = "server";
|
||||
serverport = 4043;
|
||||
serverport = "4043";
|
||||
options = (); #("saviq"); or/and "chanmod"
|
||||
modelname = "AWGN";
|
||||
IQfile = "/tmp/rfsimulator.iqs"
|
||||
}
|
||||
|
||||
log_config: {
|
||||
global_log_level = "info";
|
||||
hw_log_level = "info";
|
||||
phy_log_level = "info";
|
||||
mac_log_level = "info";
|
||||
rlc_log_level = "info";
|
||||
f1ap_log_level = "info";
|
||||
};
|
||||
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";
|
||||
f1ap_log_level ="debug";
|
||||
ngap_log_level ="debug";
|
||||
};
|
||||
|
||||
@@ -7,7 +7,6 @@ gNBs =
|
||||
{
|
||||
////////// Identification parameters:
|
||||
gNB_ID = 0xe00;
|
||||
gNB_DU_ID = 0xe00;
|
||||
|
||||
# cell_type = "CELL_MACRO_GNB";
|
||||
|
||||
|
||||
@@ -63,7 +63,6 @@ gNBs =
|
||||
# subcarrierSpacing
|
||||
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
|
||||
initialULBWPsubcarrierSpacing = 1;
|
||||
initialDLBWPcontrolResourceSetZero = 0;
|
||||
#rach-ConfigCommon
|
||||
#rach-ConfigGeneric
|
||||
prach_ConfigurationIndex = 98;
|
||||
|
||||
@@ -230,7 +230,7 @@ THREAD_STRUCT = (
|
||||
rfsimulator :
|
||||
{
|
||||
serveraddr = "server";
|
||||
serverport = 4043;
|
||||
serverport = "4043";
|
||||
options = (); #("saviq"); or/and "chanmod"
|
||||
modelname = "AWGN";
|
||||
IQfile = "/tmp/rfsimulator.iqs";
|
||||
|
||||
@@ -240,7 +240,7 @@ THREAD_STRUCT = (
|
||||
rfsimulator :
|
||||
{
|
||||
serveraddr = "server";
|
||||
serverport = 4043;
|
||||
serverport = "4043";
|
||||
options = (); #("saviq"); or/and "chanmod"
|
||||
modelname = "AWGN";
|
||||
IQfile = "/tmp/rfsimulator.iqs";
|
||||
|
||||
@@ -220,7 +220,7 @@ RUs = (
|
||||
att_rx = 0;
|
||||
bands = [78];
|
||||
max_pdschReferenceSignalPower = -27;
|
||||
max_rxgain = 65;
|
||||
max_rxgain = 75;
|
||||
eNB_instances = [0];
|
||||
##beamforming 1x2 matrix: 1 layer x 2 antennas
|
||||
bf_weights = [0x00007fff, 0x0000];
|
||||
|
||||
@@ -232,7 +232,7 @@ THREAD_STRUCT = (
|
||||
rfsimulator :
|
||||
{
|
||||
serveraddr = "server";
|
||||
serverport = 4043;
|
||||
serverport = "4043";
|
||||
options = (); #("saviq"); or/and "chanmod"
|
||||
modelname = "AWGN";
|
||||
IQfile = "/tmp/rfsimulator.iqs";
|
||||
|
||||
@@ -22,9 +22,9 @@ gNBs =
|
||||
|
||||
////////// Physical parameters:
|
||||
pdsch_AntennaPorts_XP = 2;
|
||||
pusch_AntennaPorts = 2;
|
||||
pusch_AntennaPorts = 1;
|
||||
do_CSIRS = 1;
|
||||
do_SRS = 1;
|
||||
do_SRS = 0;
|
||||
|
||||
servingCellConfigCommon = (
|
||||
{
|
||||
@@ -75,7 +75,7 @@ gNBs =
|
||||
initialULBWPsubcarrierSpacing = 1;
|
||||
#rach-ConfigCommon
|
||||
#rach-ConfigGeneric
|
||||
prach_ConfigurationIndex = 100;
|
||||
prach_ConfigurationIndex = 98;
|
||||
#prach_msg1_FDM
|
||||
#0 = one, 1=two, 2=four, 3=eight
|
||||
prach_msg1_FDM = 0;
|
||||
|
||||
@@ -230,7 +230,7 @@ THREAD_STRUCT = (
|
||||
rfsimulator :
|
||||
{
|
||||
serveraddr = "server";
|
||||
serverport = 4043;
|
||||
serverport = "4043";
|
||||
options = (); #("saviq"); or/and "chanmod"
|
||||
modelname = "AWGN";
|
||||
IQfile = "/tmp/rfsimulator.iqs";
|
||||
|
||||
@@ -229,7 +229,7 @@ THREAD_STRUCT = (
|
||||
rfsimulator :
|
||||
{
|
||||
serveraddr = "server";
|
||||
serverport = 4043;
|
||||
serverport = "4043";
|
||||
options = (); #("saviq"); or/and "chanmod"
|
||||
modelname = "AWGN";
|
||||
IQfile = "/tmp/rfsimulator.iqs";
|
||||
|
||||
@@ -1,318 +0,0 @@
|
||||
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 = -34;
|
||||
}
|
||||
|
||||
);
|
||||
|
||||
|
||||
# ------- 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 = 280; # 150;
|
||||
pucch_TargetSNRx10 = 100; #200;
|
||||
ulsch_max_frame_inactivity = 10;
|
||||
dl_max_mcs = 25;
|
||||
ul_max_mcs = 18;
|
||||
}
|
||||
);
|
||||
|
||||
L1s = (
|
||||
{
|
||||
#num_cc = 1;
|
||||
#tr_n_preference = "local_mac";
|
||||
#prach_dtx_threshold = 120;
|
||||
#pucch0_dtx_threshold = 80;
|
||||
num_cc = 1;
|
||||
tr_n_preference = "aerial";
|
||||
local_n_if_name = "lo";
|
||||
remote_n_address = "127.0.0.2"; // vnf addr
|
||||
local_n_address = "127.0.0.1"; // pnf addr
|
||||
local_n_portc = 50000; // pnf p5 port [!]
|
||||
remote_n_portc = 50001; // vnf p5 port
|
||||
local_n_portd = 50010; // pnf p7 port
|
||||
remote_n_portd = 50011; // vnf p7 port
|
||||
prach_dtx_threshold = 120;
|
||||
pucch0_dtx_threshold = 80;
|
||||
ofdm_offset_divisor = 8; #set this to UINT_MAX for offset 0
|
||||
}
|
||||
);
|
||||
|
||||
#RUs = (
|
||||
#{
|
||||
# local_rf = "yes"
|
||||
# nb_tx = 2;
|
||||
# nb_rx = 2;
|
||||
# att_tx = 0;
|
||||
# att_rx = 0;
|
||||
# bands = [78];
|
||||
# max_pdschReferenceSignalPower = -27;
|
||||
# max_rxgain = 75;
|
||||
# eNB_instances = [0];
|
||||
# ##beamforming 1x2 matrix: 1 layer x 2 antennas
|
||||
# bf_weights = [0x00007fff, 0x0000];
|
||||
# #clock_src = "internal";
|
||||
# sdr_addrs = "mgmt_addr=192.168.10.2,addr=192.168.10.2,clock_source=internal,time_source=internal"
|
||||
#}
|
||||
#);
|
||||
|
||||
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";
|
||||
}
|
||||
);
|
||||
|
||||
rfsimulator :
|
||||
{
|
||||
serveraddr = "server";
|
||||
serverport = "4043";
|
||||
options = (); #("saviq"); or/and "chanmod"
|
||||
modelname = "AWGN";
|
||||
IQfile = "/tmp/rfsimulator.iqs";
|
||||
};
|
||||
|
||||
security = {
|
||||
# preferred ciphering algorithms
|
||||
# the first one of the list that an UE supports in chosen
|
||||
# valid values: nea0, nea1, nea2, nea3
|
||||
ciphering_algorithms = ( "nea0" );
|
||||
|
||||
# preferred integrity algorithms
|
||||
# the first one of the list that an UE supports in chosen
|
||||
# valid values: nia0, nia1, nia2, nia3
|
||||
integrity_algorithms = ( "nia2", "nia0" );
|
||||
|
||||
# setting 'drb_ciphering' to "no" disables ciphering for DRBs, no matter
|
||||
# what 'ciphering_algorithms' configures; same thing for 'drb_integrity'
|
||||
drb_ciphering = "yes";
|
||||
drb_integrity = "no";
|
||||
};
|
||||
|
||||
log_config :
|
||||
{
|
||||
global_log_level ="info";
|
||||
hw_log_level ="info";
|
||||
phy_log_level ="info";
|
||||
mac_log_level ="info";
|
||||
rlc_log_level ="info";
|
||||
pdcp_log_level ="info";
|
||||
rrc_log_level ="info";
|
||||
ngap_log_level ="debug";
|
||||
f1ap_log_level ="debug";
|
||||
};
|
||||
@@ -8,7 +8,7 @@ ColNames :
|
||||
- Average vs Reference Deviation (Reference Value; Acceptability Threshold)
|
||||
Ref :
|
||||
feprx : 84.0
|
||||
feptx_prec : 14.0
|
||||
feptx_prec : 11.0
|
||||
feptx_ofdm : 35.0
|
||||
feptx_total : 100.0
|
||||
L1 Tx processing : 400.0
|
||||
|
||||
@@ -262,12 +262,10 @@ 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(f'cd {self.SourceCodePath}/docker-compose', '\$', 5)
|
||||
mySSH.command('cd /opt/oai-cn5g-fed-v1.5/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)
|
||||
@@ -584,7 +582,7 @@ class EPCManagement():
|
||||
mySSH.command('docker logs ' + c + ' > ' + self.SourceCodePath + '/logs/' + c + '.log', '\$', 5)
|
||||
|
||||
logging.debug('Terminating OAI CN5G')
|
||||
mySSH.command(f'cd {self.SourceCodePath}/docker-compose', '\$', 5)
|
||||
mySSH.command('cd /opt/oai-cn5g-fed-v1.5/docker-compose', '\$', 5)
|
||||
mySSH.command('python3 ./core-network.py '+self.cfgUnDeploy, '\$', 60)
|
||||
mySSH.command('docker volume prune --force || true', '\$', 60)
|
||||
time.sleep(2)
|
||||
|
||||
@@ -27,10 +27,14 @@
|
||||
<TestCaseRequestedList>
|
||||
111111
|
||||
100021
|
||||
000020
|
||||
000021
|
||||
000022
|
||||
000023
|
||||
000024
|
||||
020021
|
||||
020022
|
||||
030021
|
||||
100021
|
||||
</TestCaseRequestedList>
|
||||
<TestCaseExclusionList></TestCaseExclusionList>
|
||||
@@ -39,41 +43,83 @@
|
||||
<class>Pull_Local_Registry</class>
|
||||
<desc>Pull Images from Local Registry</desc>
|
||||
<test_svr_id>0</test_svr_id>
|
||||
<images_to_pull>oai-gnb-asan oai-nr-cuup-asan oai-nr-ue-asan</images_to_pull>
|
||||
<images_to_pull>oai-gnb oai-nr-cuup oai-nr-ue</images_to_pull>
|
||||
</testCase>
|
||||
|
||||
<testCase id="000020">
|
||||
<class>DeployGenObject</class>
|
||||
<desc>Deploy MySql Database</desc>
|
||||
<yaml_path>yaml_files/5g_rfsimulator_e1</yaml_path>
|
||||
<services>mysql</services>
|
||||
<nb_healthy>1</nb_healthy>
|
||||
</testCase>
|
||||
|
||||
<testCase id="000021">
|
||||
<class>DeployGenObject</class>
|
||||
<desc>Deploy OAI 5G CoreNetwork</desc>
|
||||
<yaml_path>yaml_files/5g_rfsimulator_e1</yaml_path>
|
||||
<services>mysql oai-amf oai-smf oai-upf</services>
|
||||
<nb_healthy>4</nb_healthy>
|
||||
<services>oai-nrf oai-amf oai-smf oai-spgwu oai-ext-dn</services>
|
||||
<nb_healthy>6</nb_healthy>
|
||||
</testCase>
|
||||
|
||||
<testCase id="000022">
|
||||
<class>DeployGenObject</class>
|
||||
<desc>Deploy OAI 5G RAN RF sim SA (1 CU-CP, 3 CU-UPs, 3 DUs)</desc>
|
||||
<desc>Deploy OAI 5G CU-CP RF sim SA</desc>
|
||||
<yaml_path>yaml_files/5g_rfsimulator_e1</yaml_path>
|
||||
<services>oai-cucp oai-cuup oai-cuup2 oai-cuup3 oai-du oai-du2 oai-du3</services>
|
||||
<nb_healthy>11</nb_healthy>
|
||||
<services>oai-cucp</services>
|
||||
<nb_healthy>7</nb_healthy>
|
||||
</testCase>
|
||||
|
||||
<testCase id="000023">
|
||||
<class>DeployGenObject</class>
|
||||
<desc>Deploy OAI 5G CU-UP and DU RF sim SA</desc>
|
||||
<yaml_path>yaml_files/5g_rfsimulator_e1</yaml_path>
|
||||
<services>oai-cuup oai-du</services>
|
||||
<nb_healthy>9</nb_healthy>
|
||||
</testCase>
|
||||
|
||||
<testCase id="000024">
|
||||
<class>DeployGenObject</class>
|
||||
<desc>Deploy OAI 5G NR-UE RF sim SA</desc>
|
||||
<yaml_path>yaml_files/5g_rfsimulator_e1</yaml_path>
|
||||
<services>oai-nr-ue oai-nr-ue2 oai-nr-ue3</services>
|
||||
<nb_healthy>14</nb_healthy>
|
||||
<services>oai-nr-ue</services>
|
||||
<nb_healthy>10</nb_healthy>
|
||||
</testCase>
|
||||
|
||||
<testCase id="020021">
|
||||
<class>Ping</class>
|
||||
<desc>Ping ext-dn from all NR-UEs</desc>
|
||||
<id>rfsim5g_ue rfsim5g_ue2 rfsim5g_ue3</id>
|
||||
<ping_args> -c 20 12.1.1.1 -i0.25</ping_args>
|
||||
<desc>Ping ext-dn from NR-UE</desc>
|
||||
<id>rfsim5g_ue</id>
|
||||
<ping_args> -c 20 192.168.73.135</ping_args>
|
||||
<ping_packetloss_threshold>5</ping_packetloss_threshold>
|
||||
</testCase>
|
||||
|
||||
<testCase id="020022">
|
||||
<class>Ping</class>
|
||||
<desc>Ping NR-UE from ext-dn</desc>
|
||||
<id>rfsim5g_ext_dn</id>
|
||||
<ping_args>-c 20 12.1.1.2</ping_args>
|
||||
<ping_packetloss_threshold>5</ping_packetloss_threshold>
|
||||
</testCase>
|
||||
|
||||
<testCase id="030021">
|
||||
<class>IperfFromContainer</class>
|
||||
<desc>Iperf UDP Downlink</desc>
|
||||
<server_container_name>rfsim5g-oai-nr-ue</server_container_name>
|
||||
<client_container_name>rfsim5g-oai-ext-dn</client_container_name>
|
||||
<server_options>-B 12.1.1.2 -u -i 1 -s</server_options>
|
||||
<client_options>-c 12.1.1.2 -u -i 1 -t 30 -b 3M</client_options>
|
||||
</testCase>
|
||||
|
||||
<testCase id="030022">
|
||||
<class>IperfFromContainer</class>
|
||||
<desc>Iperf UDP Uplink</desc>
|
||||
<server_container_name>rfsim5g-oai-ext-dn</server_container_name>
|
||||
<client_container_name>rfsim5g-oai-nr-ue</client_container_name>
|
||||
<server_options>-u -i 1 -s</server_options>
|
||||
<client_options>-B 12.1.1.2 -c 192.168.73.135 -u -i 1 -t 30 -b 1M</client_options>
|
||||
</testCase>
|
||||
|
||||
<testCase id="100021">
|
||||
<class>UndeployGenObject</class>
|
||||
<desc>Undeploy all OAI 5G stack</desc>
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
-->
|
||||
<testCaseList>
|
||||
<htmlTabRef>rfsim-5gnr-down-e1</htmlTabRef>
|
||||
<htmlTabName>CleanUp E1+F1 split</htmlTabName>
|
||||
<htmlTabName>CleanUp CUCP-CUUP-DU E1+F1 split</htmlTabName>
|
||||
<htmlTabIcon>trash</htmlTabIcon>
|
||||
<TestCaseRequestedList>
|
||||
100022
|
||||
|
||||
@@ -27,11 +27,14 @@
|
||||
<TestCaseRequestedList>
|
||||
111111
|
||||
100021
|
||||
000020
|
||||
000021
|
||||
000022
|
||||
000023
|
||||
000024
|
||||
020021
|
||||
020022
|
||||
030021
|
||||
030022
|
||||
100021
|
||||
</TestCaseRequestedList>
|
||||
<TestCaseExclusionList></TestCaseExclusionList>
|
||||
@@ -40,30 +43,62 @@
|
||||
<class>Pull_Local_Registry</class>
|
||||
<desc>Pull Images from Local Registry</desc>
|
||||
<test_svr_id>0</test_svr_id>
|
||||
<images_to_pull>oai-gnb-asan oai-nr-cuup-asan oai-nr-ue-asan</images_to_pull>
|
||||
<images_to_pull>oai-gnb oai-nr-ue</images_to_pull>
|
||||
</testCase>
|
||||
|
||||
<testCase id="000020">
|
||||
<class>DeployGenObject</class>
|
||||
<desc>Deploy MySql Database</desc>
|
||||
<yaml_path>yaml_files/5g_f1_rfsimulator</yaml_path>
|
||||
<services>mysql</services>
|
||||
<nb_healthy>1</nb_healthy>
|
||||
</testCase>
|
||||
|
||||
<testCase id="000021">
|
||||
<class>DeployGenObject</class>
|
||||
<desc>Deploy OAI 5G CoreNetwork</desc>
|
||||
<yaml_path>yaml_files/5g_f1_rfsimulator</yaml_path>
|
||||
<services>mysql oai-amf oai-smf oai-upf oai-ext-dn</services>
|
||||
<nb_healthy>5</nb_healthy>
|
||||
<services>oai-nrf oai-amf oai-smf oai-spgwu oai-ext-dn</services>
|
||||
<nb_healthy>6</nb_healthy>
|
||||
</testCase>
|
||||
|
||||
<testCase id="000022">
|
||||
<class>DeployGenObject</class>
|
||||
<desc>Deploy OAI 5G CU+DU+UE RF sim SA</desc>
|
||||
<desc>Deploy OAI 5G CU RF sim SA</desc>
|
||||
<yaml_path>yaml_files/5g_f1_rfsimulator</yaml_path>
|
||||
<services>oai-cu oai-du oai-nr-ue</services>
|
||||
<services>oai-cu</services>
|
||||
<nb_healthy>7</nb_healthy>
|
||||
</testCase>
|
||||
|
||||
<testCase id="000023">
|
||||
<class>DeployGenObject</class>
|
||||
<desc>Deploy OAI 5G DU RF sim SA</desc>
|
||||
<yaml_path>yaml_files/5g_f1_rfsimulator</yaml_path>
|
||||
<services>oai-du</services>
|
||||
<nb_healthy>8</nb_healthy>
|
||||
</testCase>
|
||||
|
||||
<testCase id="000024">
|
||||
<class>DeployGenObject</class>
|
||||
<desc>Deploy OAI 5G NR-UE RF sim SA</desc>
|
||||
<yaml_path>yaml_files/5g_f1_rfsimulator</yaml_path>
|
||||
<services>oai-nr-ue</services>
|
||||
<nb_healthy>9</nb_healthy>
|
||||
</testCase>
|
||||
|
||||
<testCase id="020021">
|
||||
<class>Ping</class>
|
||||
<desc>Ping ext-dn from all NR-UEs</desc>
|
||||
<desc>Ping ext-dn from NR-UE</desc>
|
||||
<id>rfsim5g_ue</id>
|
||||
<ping_args> -c 20 192.168.72.135 -i0.25</ping_args>
|
||||
<ping_args> -c 20 192.168.72.135</ping_args>
|
||||
<ping_packetloss_threshold>5</ping_packetloss_threshold>
|
||||
</testCase>
|
||||
|
||||
<testCase id="020022">
|
||||
<class>Ping</class>
|
||||
<desc>Ping NR-UE from ext-dn</desc>
|
||||
<id>rfsim5g_ext_dn</id>
|
||||
<ping_args>-c 20 12.1.1.2</ping_args>
|
||||
<ping_packetloss_threshold>5</ping_packetloss_threshold>
|
||||
</testCase>
|
||||
|
||||
@@ -73,7 +108,7 @@
|
||||
<server_container_name>rfsim5g-oai-nr-ue</server_container_name>
|
||||
<client_container_name>rfsim5g-oai-ext-dn</client_container_name>
|
||||
<server_options>-B 12.1.1.2 -u -i 1 -s</server_options>
|
||||
<client_options>-c 12.1.1.2 -u -i 1 -t 10 -b 20M</client_options>
|
||||
<client_options>-c 12.1.1.2 -u -i 1 -t 30 -b 3M</client_options>
|
||||
</testCase>
|
||||
|
||||
<testCase id="030022">
|
||||
@@ -82,7 +117,7 @@
|
||||
<server_container_name>rfsim5g-oai-ext-dn</server_container_name>
|
||||
<client_container_name>rfsim5g-oai-nr-ue</client_container_name>
|
||||
<server_options>-u -i 1 -s</server_options>
|
||||
<client_options>-B 12.1.1.2 -c 192.168.72.135 -u -i 1 -t 10 -b 5M</client_options>
|
||||
<client_options>-B 12.1.1.2 -c 192.168.72.135 -u -i 1 -t 30 -b 1M</client_options>
|
||||
</testCase>
|
||||
|
||||
<testCase id="100021">
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
<class>Pull_Local_Registry</class>
|
||||
<desc>Pull Images from Local Registry</desc>
|
||||
<test_svr_id>0</test_svr_id>
|
||||
<images_to_pull>oai-gnb-asan oai-nr-ue-asan</images_to_pull>
|
||||
<images_to_pull>oai-gnb oai-nr-ue</images_to_pull>
|
||||
</testCase>
|
||||
|
||||
<testCase id="000010">
|
||||
@@ -59,8 +59,8 @@
|
||||
<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>
|
||||
<nb_healthy>5</nb_healthy>
|
||||
<services>oai-nrf oai-amf oai-smf oai-spgwu oai-ext-dn</services>
|
||||
<nb_healthy>6</nb_healthy>
|
||||
</testCase>
|
||||
|
||||
<testCase id="000012">
|
||||
@@ -68,7 +68,7 @@
|
||||
<desc>Deploy OAI 5G gNB RF sim SA</desc>
|
||||
<yaml_path>yaml_files/5g_fdd_rfsimulator</yaml_path>
|
||||
<services>oai-gnb</services>
|
||||
<nb_healthy>6</nb_healthy>
|
||||
<nb_healthy>7</nb_healthy>
|
||||
</testCase>
|
||||
|
||||
<testCase id="000013">
|
||||
@@ -76,7 +76,7 @@
|
||||
<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>
|
||||
<nb_healthy>8</nb_healthy>
|
||||
</testCase>
|
||||
|
||||
<testCase id="020011">
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
<class>Pull_Local_Registry</class>
|
||||
<desc>Pull Images from Local Registry</desc>
|
||||
<test_svr_id>0</test_svr_id>
|
||||
<images_to_pull>oai-gnb-asan oai-nr-ue-asan</images_to_pull>
|
||||
<images_to_pull>oai-gnb oai-nr-ue</images_to_pull>
|
||||
</testCase>
|
||||
|
||||
<testCase id="000000">
|
||||
@@ -60,8 +60,8 @@
|
||||
<class>DeployGenObject</class>
|
||||
<desc>Deploy OAI 5G CoreNetwork</desc>
|
||||
<yaml_path>yaml_files/5g_l2sim_tdd</yaml_path>
|
||||
<services>oai-amf oai-smf oai-upf oai-ext-dn</services>
|
||||
<nb_healthy>5</nb_healthy>
|
||||
<services>oai-nrf oai-amf oai-smf oai-spgwu oai-ext-dn</services>
|
||||
<nb_healthy>6</nb_healthy>
|
||||
</testCase>
|
||||
|
||||
<testCase id="000002">
|
||||
@@ -69,7 +69,7 @@
|
||||
<desc>Deploy OAI 5G gNB L2 sim SA</desc>
|
||||
<yaml_path>yaml_files/5g_l2sim_tdd</yaml_path>
|
||||
<services>oai-gnb</services>
|
||||
<nb_healthy>6</nb_healthy>
|
||||
<nb_healthy>7</nb_healthy>
|
||||
</testCase>
|
||||
|
||||
<testCase id="000003">
|
||||
@@ -77,7 +77,7 @@
|
||||
<desc>Deploy OAI 5G NR-UE L2 sim SA and Proxy</desc>
|
||||
<yaml_path>yaml_files/5g_l2sim_tdd</yaml_path>
|
||||
<services>proxy oai-nr-ue0</services>
|
||||
<nb_healthy>8</nb_healthy>
|
||||
<nb_healthy>9</nb_healthy>
|
||||
</testCase>
|
||||
|
||||
<testCase id="000004">
|
||||
|
||||
@@ -28,6 +28,7 @@
|
||||
<TestCaseRequestedList>
|
||||
111111
|
||||
100001
|
||||
000000
|
||||
000001
|
||||
000002
|
||||
000003
|
||||
@@ -35,7 +36,6 @@
|
||||
000005
|
||||
000006
|
||||
000007
|
||||
000008
|
||||
020001
|
||||
020002
|
||||
020003
|
||||
@@ -58,15 +58,23 @@
|
||||
<class>Pull_Local_Registry</class>
|
||||
<desc>Pull Images from Local Registry</desc>
|
||||
<test_svr_id>0</test_svr_id>
|
||||
<images_to_pull>oai-gnb-asan oai-nr-ue</images_to_pull>
|
||||
<images_to_pull>oai-gnb oai-nr-ue</images_to_pull>
|
||||
</testCase>
|
||||
|
||||
<testCase id="000000">
|
||||
<class>DeployGenObject</class>
|
||||
<desc>Deploy MySql Database</desc>
|
||||
<yaml_path>yaml_files/5g_rfsimulator</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</yaml_path>
|
||||
<services>mysql oai-amf oai-smf oai-upf oai-ext-dn</services>
|
||||
<nb_healthy>5</nb_healthy>
|
||||
<services>oai-nrf oai-amf oai-smf oai-spgwu oai-ext-dn</services>
|
||||
<nb_healthy>6</nb_healthy>
|
||||
</testCase>
|
||||
|
||||
<testCase id="000002">
|
||||
@@ -74,7 +82,7 @@
|
||||
<desc>Deploy OAI 5G gNB RF sim SA</desc>
|
||||
<yaml_path>yaml_files/5g_rfsimulator</yaml_path>
|
||||
<services>oai-gnb</services>
|
||||
<nb_healthy>6</nb_healthy>
|
||||
<nb_healthy>7</nb_healthy>
|
||||
</testCase>
|
||||
|
||||
<testCase id="000003">
|
||||
@@ -82,7 +90,7 @@
|
||||
<desc>Deploy OAI 5G NR-UE RF sim SA</desc>
|
||||
<yaml_path>yaml_files/5g_rfsimulator</yaml_path>
|
||||
<services>oai-nr-ue</services>
|
||||
<nb_healthy>7</nb_healthy>
|
||||
<nb_healthy>8</nb_healthy>
|
||||
</testCase>
|
||||
|
||||
<testCase id="000004">
|
||||
@@ -90,7 +98,7 @@
|
||||
<desc>Deploy Second OAI 5G NR-UE RF sim SA</desc>
|
||||
<yaml_path>yaml_files/5g_rfsimulator</yaml_path>
|
||||
<services>oai-nr-ue2</services>
|
||||
<nb_healthy>8</nb_healthy>
|
||||
<nb_healthy>9</nb_healthy>
|
||||
</testCase>
|
||||
|
||||
<testCase id="000005">
|
||||
@@ -98,7 +106,7 @@
|
||||
<desc>Deploy OAI 5G NR-UEs (#3, #4, #5) RF sim SA</desc>
|
||||
<yaml_path>yaml_files/5g_rfsimulator</yaml_path>
|
||||
<services>oai-nr-ue3 oai-nr-ue4 oai-nr-ue5</services>
|
||||
<nb_healthy>11</nb_healthy>
|
||||
<nb_healthy>12</nb_healthy>
|
||||
</testCase>
|
||||
|
||||
<testCase id="000006">
|
||||
@@ -106,7 +114,7 @@
|
||||
<desc>Deploy OAI 5G NR-UEs (#6, #7, #8) RF sim SA</desc>
|
||||
<yaml_path>yaml_files/5g_rfsimulator</yaml_path>
|
||||
<services>oai-nr-ue6 oai-nr-ue7 oai-nr-ue8</services>
|
||||
<nb_healthy>14</nb_healthy>
|
||||
<nb_healthy>15</nb_healthy>
|
||||
</testCase>
|
||||
|
||||
<testCase id="000007">
|
||||
@@ -114,13 +122,7 @@
|
||||
<desc>Deploy OAI 5G NR-UEs (#9, #10) RF sim SA</desc>
|
||||
<yaml_path>yaml_files/5g_rfsimulator</yaml_path>
|
||||
<services>oai-nr-ue9 oai-nr-ue10</services>
|
||||
<nb_healthy>16</nb_healthy>
|
||||
</testCase>
|
||||
|
||||
<testCase id="000008">
|
||||
<class>Attach_UE</class>
|
||||
<desc>Attach OAI UE (Wait for IP)</desc>
|
||||
<id>rfsim5g_ue rfsim5g_ue2 rfsim5g_ue3 rfsim5g_ue4 rfsim5g_ue5 rfsim5g_ue6 rfsim5g_ue7 rfsim5g_ue8 rfsim5g_ue9 rfsim5g_ue10</id>
|
||||
<nb_healthy>17</nb_healthy>
|
||||
</testCase>
|
||||
|
||||
<testCase id="020001">
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
<class>Pull_Local_Registry</class>
|
||||
<desc>Pull Images from Local Registry</desc>
|
||||
<test_svr_id>0</test_svr_id>
|
||||
<images_to_pull>oai-gnb-asan oai-nr-ue-asan</images_to_pull>
|
||||
<images_to_pull>oai-gnb oai-nr-ue</images_to_pull>
|
||||
</testCase>
|
||||
|
||||
<testCase id="000000">
|
||||
@@ -59,8 +59,8 @@
|
||||
<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>
|
||||
<nb_healthy>5</nb_healthy>
|
||||
<services>oai-nrf oai-amf oai-smf oai-spgwu oai-ext-dn</services>
|
||||
<nb_healthy>6</nb_healthy>
|
||||
</testCase>
|
||||
|
||||
<testCase id="000002">
|
||||
@@ -68,7 +68,7 @@
|
||||
<desc>Deploy OAI 5G gNB RF sim SA</desc>
|
||||
<yaml_path>yaml_files/5g_rfsimulator_24prb</yaml_path>
|
||||
<services>oai-gnb</services>
|
||||
<nb_healthy>6</nb_healthy>
|
||||
<nb_healthy>7</nb_healthy>
|
||||
</testCase>
|
||||
|
||||
<testCase id="000003">
|
||||
@@ -76,7 +76,7 @@
|
||||
<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>
|
||||
<nb_healthy>8</nb_healthy>
|
||||
</testCase>
|
||||
|
||||
<testCase id="020001">
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
<class>Pull_Local_Registry</class>
|
||||
<desc>Pull Images from Local Registry</desc>
|
||||
<test_svr_id>0</test_svr_id>
|
||||
<images_to_pull>oai-gnb-asan oai-nr-ue-asan</images_to_pull>
|
||||
<images_to_pull>oai-gnb oai-nr-ue</images_to_pull>
|
||||
</testCase>
|
||||
|
||||
<testCase id="000000">
|
||||
@@ -59,8 +59,8 @@
|
||||
<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>
|
||||
<nb_healthy>5</nb_healthy>
|
||||
<services>oai-nrf oai-amf oai-smf oai-spgwu oai-ext-dn</services>
|
||||
<nb_healthy>6</nb_healthy>
|
||||
</testCase>
|
||||
|
||||
<testCase id="000002">
|
||||
@@ -68,7 +68,7 @@
|
||||
<desc>Deploy OAI 5G gNB RF sim SA</desc>
|
||||
<yaml_path>yaml_files/5g_rfsimulator_2x2</yaml_path>
|
||||
<services>oai-gnb</services>
|
||||
<nb_healthy>6</nb_healthy>
|
||||
<nb_healthy>7</nb_healthy>
|
||||
</testCase>
|
||||
|
||||
<testCase id="000003">
|
||||
@@ -76,7 +76,7 @@
|
||||
<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>
|
||||
<nb_healthy>8</nb_healthy>
|
||||
</testCase>
|
||||
|
||||
<testCase id="020001">
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
<class>Pull_Local_Registry</class>
|
||||
<desc>Pull Images from Local Registry</desc>
|
||||
<test_svr_id>0</test_svr_id>
|
||||
<images_to_pull>oai-gnb-asan oai-nr-ue-asan</images_to_pull>
|
||||
<images_to_pull>oai-gnb oai-nr-ue</images_to_pull>
|
||||
</testCase>
|
||||
|
||||
<testCase id="004000">
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
<class>Pull_Local_Registry</class>
|
||||
<desc>Pull Images from Local Registry</desc>
|
||||
<test_svr_id>0</test_svr_id>
|
||||
<images_to_pull>oai-gnb-asan oai-nr-ue-asan</images_to_pull>
|
||||
<images_to_pull>oai-gnb oai-nr-ue</images_to_pull>
|
||||
</testCase>
|
||||
|
||||
<testCase id="004000">
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
<class>Pull_Local_Registry</class>
|
||||
<desc>Pull Images from Local Registry</desc>
|
||||
<test_svr_id>0</test_svr_id>
|
||||
<images_to_pull>oai-gnb-asan oai-nr-ue-asan</images_to_pull>
|
||||
<images_to_pull>oai-gnb oai-nr-ue</images_to_pull>
|
||||
</testCase>
|
||||
|
||||
<testCase id="004000">
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
<class>Pull_Local_Registry</class>
|
||||
<desc>Pull Images from Local Registry</desc>
|
||||
<test_svr_id>0</test_svr_id>
|
||||
<images_to_pull>oai-gnb-asan oai-nr-ue-asan</images_to_pull>
|
||||
<images_to_pull>oai-gnb oai-nr-ue</images_to_pull>
|
||||
</testCase>
|
||||
|
||||
<testCase id="000000">
|
||||
@@ -59,8 +59,8 @@
|
||||
<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>
|
||||
<nb_healthy>5</nb_healthy>
|
||||
<services>oai-nrf oai-amf oai-smf oai-spgwu oai-ext-dn</services>
|
||||
<nb_healthy>6</nb_healthy>
|
||||
</testCase>
|
||||
|
||||
<testCase id="000002">
|
||||
@@ -68,7 +68,7 @@
|
||||
<desc>Deploy OAI 5G gNB RF sim SA</desc>
|
||||
<yaml_path>yaml_files/5g_rfsimulator_u0_25prb</yaml_path>
|
||||
<services>oai-gnb</services>
|
||||
<nb_healthy>6</nb_healthy>
|
||||
<nb_healthy>7</nb_healthy>
|
||||
</testCase>
|
||||
|
||||
<testCase id="000003">
|
||||
@@ -76,7 +76,7 @@
|
||||
<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>
|
||||
<nb_healthy>8</nb_healthy>
|
||||
</testCase>
|
||||
|
||||
<testCase id="020001">
|
||||
|
||||
@@ -185,8 +185,8 @@
|
||||
|
||||
<testCase id="070000">
|
||||
<class>Iperf</class>
|
||||
<desc>iperf (DL/70Mbps/UDP)(60 sec)(single-ue profile)</desc>
|
||||
<iperf_args>-u -b 70M -t 60 -i 1 -fm</iperf_args>
|
||||
<desc>iperf (DL/90Mbps/UDP)(60 sec)(single-ue profile)</desc>
|
||||
<iperf_args>-u -b 90M -t 60 -i 1 -fm</iperf_args>
|
||||
<direction>DL</direction>
|
||||
<id>idefix</id>
|
||||
<iperf_packetloss_threshold>25</iperf_packetloss_threshold>
|
||||
|
||||
@@ -1,137 +0,0 @@
|
||||
<!--
|
||||
|
||||
Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
contributor license agreements. See the NOTICE file distributed with
|
||||
this work for additional information regarding copyright ownership.
|
||||
The OpenAirInterface Software Alliance licenses this file to You under
|
||||
the OAI Public License, Version 1.1 (the "License"); you may not use this file
|
||||
except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.openairinterface.org/?page_id=698
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
contact@openairinterface.org
|
||||
|
||||
-->
|
||||
<testCaseList>
|
||||
<htmlTabRef>gNB-PHY-Test-40</htmlTabRef>
|
||||
<htmlTabName>Timing phytest 40 MHz</htmlTabName>
|
||||
<htmlTabIcon>tasks</htmlTabIcon>
|
||||
<repeatCount>1</repeatCount>
|
||||
<TestCaseRequestedList>
|
||||
111111
|
||||
000222
|
||||
001111
|
||||
002222
|
||||
002223
|
||||
000111
|
||||
100000
|
||||
000011
|
||||
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 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>
|
||||
|
||||
@@ -35,11 +35,6 @@
|
||||
002003
|
||||
002004
|
||||
002005
|
||||
002006
|
||||
002007
|
||||
002008
|
||||
002009
|
||||
002010
|
||||
000100
|
||||
000010
|
||||
000020
|
||||
@@ -102,42 +97,12 @@
|
||||
<id>amarisoft_ue_5</id>
|
||||
</testCase>
|
||||
|
||||
<testCase id="002006">
|
||||
<class>Attach_UE</class>
|
||||
<desc>Attach UE</desc>
|
||||
<id>amarisoft_ue_6</id>
|
||||
</testCase>
|
||||
|
||||
<testCase id="002007">
|
||||
<class>Attach_UE</class>
|
||||
<desc>Attach UE</desc>
|
||||
<id>amarisoft_ue_7</id>
|
||||
</testCase>
|
||||
|
||||
<testCase id="002008">
|
||||
<class>Attach_UE</class>
|
||||
<desc>Attach UE</desc>
|
||||
<id>amarisoft_ue_8</id>
|
||||
</testCase>
|
||||
|
||||
<testCase id="002009">
|
||||
<class>Attach_UE</class>
|
||||
<desc>Attach UE</desc>
|
||||
<id>amarisoft_ue_9</id>
|
||||
</testCase>
|
||||
|
||||
<testCase id="002010">
|
||||
<class>Attach_UE</class>
|
||||
<desc>Attach UE</desc>
|
||||
<id>amarisoft_ue_10</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>
|
||||
<desc>iperf (DL/20Mbps/UDP)(30 sec)(multi-ue profile)</desc>
|
||||
<iperf_args>-u -b 60M -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</id>
|
||||
<iperf_packetloss_threshold>25</iperf_packetloss_threshold>
|
||||
<iperf_bitrate_threshold>80</iperf_bitrate_threshold>
|
||||
<iperf_profile>balanced</iperf_profile>
|
||||
@@ -145,10 +110,10 @@
|
||||
|
||||
<testCase id="000020">
|
||||
<class>Iperf</class>
|
||||
<desc>iperf (UL/3.6Mbps/UDP)(30 sec)(multi-ue profile)</desc>
|
||||
<iperf_args>-u -b 36M -t 30 -i 1 </iperf_args>
|
||||
<desc>iperf (UL/5Mbps/UDP)(30 sec)(multi-ue profile)</desc>
|
||||
<iperf_args>-u -b 15M -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</id>
|
||||
<iperf_packetloss_threshold>25</iperf_packetloss_threshold>
|
||||
<iperf_bitrate_threshold>80</iperf_bitrate_threshold>
|
||||
<iperf_profile>balanced</iperf_profile>
|
||||
@@ -157,7 +122,7 @@
|
||||
<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</id>
|
||||
<ping_args>-c 20 %cn_ip%</ping_args>
|
||||
<ping_packetloss_threshold>1</ping_packetloss_threshold>
|
||||
<ping_rttavg_threshold>25</ping_rttavg_threshold>
|
||||
@@ -166,7 +131,7 @@
|
||||
<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>
|
||||
<id>amarisoft_ue_1 amarisoft_ue_2 amarisoft_ue_3 amarisoft_ue_4 amarisoft_ue_5</id>
|
||||
<ping_args>-c 100 -i 0.2 %cn_ip%</ping_args>
|
||||
<ping_packetloss_threshold>1</ping_packetloss_threshold>
|
||||
<ping_rttavg_threshold>30</ping_rttavg_threshold>
|
||||
@@ -175,7 +140,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</id>
|
||||
</testCase>
|
||||
|
||||
<testCase id="004000">
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
-->
|
||||
<testCaseList>
|
||||
<htmlTabRef>TEST-SA-FR1-F1-B200</htmlTabRef>
|
||||
<htmlTabName>10 MHz FDD F1 SA</htmlTabName>
|
||||
<htmlTabName>40 MHz TDD F1 SA</htmlTabName>
|
||||
<htmlTabIcon>tasks</htmlTabIcon>
|
||||
<repeatCount>1</repeatCount>
|
||||
<TestCaseRequestedList>
|
||||
@@ -89,11 +89,11 @@
|
||||
|
||||
<testCase id="130102">
|
||||
<class>Deploy_Object</class>
|
||||
<desc>Deploy gNB-DU (FDD/Band1/10MHz/B200) in a container</desc>
|
||||
<desc>Deploy gNB-DU (TDD/Band78/40MHz/B200) in a container</desc>
|
||||
<yaml_path>ci-scripts/yaml_files/sa_f1_b200_gnb</yaml_path>
|
||||
<eNB_instance>0</eNB_instance>
|
||||
<eNB_serverId>0</eNB_serverId>
|
||||
<services>gnb_du_fdd</services>
|
||||
<services>gnb_du_tdd</services>
|
||||
</testCase>
|
||||
|
||||
<testCase id="100000">
|
||||
@@ -159,8 +159,8 @@
|
||||
|
||||
<testCase id="170000">
|
||||
<class>Iperf</class>
|
||||
<desc>iperf (DL/50Mbps/UDP)(30 sec)</desc>
|
||||
<iperf_args>-u -b 50M -t 30 -i 1 -fm</iperf_args>
|
||||
<desc>iperf (DL/80Mbps/UDP)(30 sec)</desc>
|
||||
<iperf_args>-u -b 80M -t 30 -i 1 -fm</iperf_args>
|
||||
<direction>DL</direction>
|
||||
<id>idefix</id>
|
||||
<iperf_packetloss_threshold>10</iperf_packetloss_threshold>
|
||||
@@ -170,8 +170,8 @@
|
||||
|
||||
<testCase id="170001">
|
||||
<class>Iperf</class>
|
||||
<desc>iperf (UL/25Mbps/UDP)(30 sec)</desc>
|
||||
<iperf_args>-u -b 25M -t 30 -i 1 -fm</iperf_args>
|
||||
<desc>iperf (UL/8Mbps/UDP)(30 sec)</desc>
|
||||
<iperf_args>-u -b 8M -t 30 -i 1 -fm</iperf_args>
|
||||
<direction>UL</direction>
|
||||
<id>idefix</id>
|
||||
<iperf_packetloss_threshold>1</iperf_packetloss_threshold>
|
||||
@@ -181,8 +181,8 @@
|
||||
|
||||
<testCase id="170002">
|
||||
<class>Iperf</class>
|
||||
<desc>iperf (BIDIR TCP)(60 sec)(single-ue profile)</desc>
|
||||
<iperf_args>-t 60 --bidir</iperf_args>
|
||||
<desc>iperf (BIDIR TCP)(20 sec)(single-ue profile)</desc>
|
||||
<iperf_args>-t 20 --bidir</iperf_args>
|
||||
<direction>BIDIR</direction>
|
||||
<id>idefix</id>
|
||||
<iperf_profile>single-ue</iperf_profile>
|
||||
|
||||
@@ -129,8 +129,8 @@
|
||||
|
||||
<testCase id="270000">
|
||||
<class>Iperf</class>
|
||||
<desc>iperf (DL/80Mbps/UDP)(30 sec)(single-ue profile)</desc>
|
||||
<iperf_args>-u -b 80M -t 30 -i 1 -fm</iperf_args>
|
||||
<desc>iperf (DL/100Mbps/UDP)(30 sec)(single-ue profile)</desc>
|
||||
<iperf_args>-u -b 100M -t 30 -i 1 -fm</iperf_args>
|
||||
<direction>DL</direction>
|
||||
<id>idefix</id>
|
||||
<iperf_packetloss_threshold>5</iperf_packetloss_threshold>
|
||||
|
||||
@@ -1,45 +0,0 @@
|
||||
<!--
|
||||
|
||||
Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
contributor license agreements. See the NOTICE file distributed with
|
||||
this work for additional information regarding copyright ownership.
|
||||
The OpenAirInterface Software Alliance licenses this file to You under
|
||||
the OAI Public License, Version 1.1 (the "License"); you may not use this file
|
||||
except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.openairinterface.org/?page_id=698
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
contact@openairinterface.org
|
||||
|
||||
-->
|
||||
<testCaseList>
|
||||
<htmlTabRef>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>
|
||||
@@ -1,39 +0,0 @@
|
||||
<!--
|
||||
|
||||
Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
contributor license agreements. See the NOTICE file distributed with
|
||||
this work for additional information regarding copyright ownership.
|
||||
The OpenAirInterface Software Alliance licenses this file to You under
|
||||
the OAI Public License, Version 1.1 (the "License"); you may not use this file
|
||||
except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.openairinterface.org/?page_id=698
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
contact@openairinterface.org
|
||||
|
||||
-->
|
||||
<testCaseList>
|
||||
<htmlTabRef>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>
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
<mode>TesteNB</mode>
|
||||
<class>Build_eNB</class>
|
||||
<desc>Build gNB (USRP)</desc>
|
||||
<Build_eNB_args>--gNB -w USRP --ninja -c -P --build-lib "ldpc_cuda" --cmake-opt -DASN1C_EXEC=/opt/asn1c/bin/asn1c</Build_eNB_args>
|
||||
<Build_eNB_args>--gNB -w USRP --ninja -c -P --build-lib "ldpc_cuda ldpc_t1" --cmake-opt -DASN1C_EXEC=/opt/asn1c/bin/asn1c</Build_eNB_args>
|
||||
<forced_workspace_cleanup>True</forced_workspace_cleanup>
|
||||
</testCase>
|
||||
|
||||
|
||||
102
ci-scripts/xml_files/t1_offload_test.xml
Normal file
102
ci-scripts/xml_files/t1_offload_test.xml
Normal file
@@ -0,0 +1,102 @@
|
||||
<!--
|
||||
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-t1-offload</htmlTabRef>
|
||||
<htmlTabName>Test T1 Offload</htmlTabName>
|
||||
<htmlTabIcon>tasks</htmlTabIcon>
|
||||
<repeatCount>1</repeatCount>
|
||||
<TestCaseRequestedList>000111 000112 000121 000122 000131 000132 000211 000212 000221 000222 000231 000232</TestCaseRequestedList>
|
||||
<TestCaseExclusionList></TestCaseExclusionList>
|
||||
|
||||
<testCase id="000111">
|
||||
<class>Run_LDPCt1Test</class>
|
||||
<desc>Run nr_ulsim with CPU</desc>
|
||||
<physim_run_args>-n100 -s30 -m5 -r106 -R106 -C10 -P</physim_run_args>
|
||||
</testCase>
|
||||
|
||||
<testCase id="000112">
|
||||
<class>Run_LDPCt1Test</class>
|
||||
<desc>Run nr_ulsim with T1 LDPC offload</desc>
|
||||
<physim_run_args>-n100 -s30 -m5 -r106 -R106 -o -P</physim_run_args>
|
||||
</testCase>
|
||||
|
||||
<testCase id="000121">
|
||||
<class>Run_LDPCt1Test</class>
|
||||
<desc>Run nr_ulsim with CPU</desc>
|
||||
<physim_run_args>-n100 -s30 -m15 -r106 -R106 -C10 -P</physim_run_args>
|
||||
</testCase>
|
||||
|
||||
<testCase id="000122">
|
||||
<class>Run_LDPCt1Test</class>
|
||||
<desc>Run nr_ulsim with T1 LDPC offload</desc>
|
||||
<physim_run_args>-n100 -s30 -m15 -r106 -R106 -o -P</physim_run_args>
|
||||
</testCase>
|
||||
|
||||
<testCase id="000131">
|
||||
<class>Run_LDPCt1Test</class>
|
||||
<desc>Run nr_ulsim with CPU</desc>
|
||||
<physim_run_args>-n100 -s30 -m25 -r106 -R106 -C10 -P</physim_run_args>
|
||||
</testCase>
|
||||
|
||||
<testCase id="000132">
|
||||
<class>Run_LDPCt1Test</class>
|
||||
<desc>Run nr_ulsim with T1 LDPC offload</desc>
|
||||
<physim_run_args>-n100 -s30 -m25 -r106 -R106 -o -P</physim_run_args>
|
||||
</testCase>
|
||||
|
||||
<testCase id="000211">
|
||||
<class>Run_LDPCt1Test</class>
|
||||
<desc>Run nr_ulsim with CPU</desc>
|
||||
<physim_run_args>-n100 -s30 -m5 -r273 -R273 -C10 -P</physim_run_args>
|
||||
</testCase>
|
||||
|
||||
<testCase id="000212">
|
||||
<class>Run_LDPCt1Test</class>
|
||||
<desc>Run nr_ulsim with T1 LDPC offload</desc>
|
||||
<physim_run_args>-n100 -s30 -m5 -r273 -R273 -o -P</physim_run_args>
|
||||
</testCase>
|
||||
|
||||
<testCase id="000221">
|
||||
<class>Run_LDPCt1Test</class>
|
||||
<desc>Run nr_ulsim with CPU</desc>
|
||||
<physim_run_args>-n100 -s30 -m15 -r273 -R273 -C10 -P</physim_run_args>
|
||||
</testCase>
|
||||
|
||||
<testCase id="000222">
|
||||
<class>Run_LDPCt1Test</class>
|
||||
<desc>Run nr_ulsim with T1 LDPC offload</desc>
|
||||
<physim_run_args>-n100 -s30 -m15 -r273 -R273 -o -P</physim_run_args>
|
||||
</testCase>
|
||||
|
||||
<testCase id="000231">
|
||||
<class>Run_LDPCt1Test</class>
|
||||
<desc>Run nr_ulsim with CPU</desc>
|
||||
<physim_run_args>-n100 -s30 -m25 -r273 -R273 -C10 -P</physim_run_args>
|
||||
</testCase>
|
||||
|
||||
<testCase id="000232">
|
||||
<class>Run_LDPCt1Test</class>
|
||||
<desc>Run nr_ulsim with T1 LDPC offload</desc>
|
||||
<physim_run_args>-n100 -s30 -m25 -r273 -R273 -o -P</physim_run_args>
|
||||
</testCase>
|
||||
|
||||
</testCaseList>
|
||||
57
ci-scripts/yaml_files/5g_f1_rfsimulator/amf-healthcheck.sh
Executable file
57
ci-scripts/yaml_files/5g_f1_rfsimulator/amf-healthcheck.sh
Executable file
@@ -0,0 +1,57 @@
|
||||
#!/bin/bash
|
||||
set -eo pipefail
|
||||
|
||||
STATUS=0
|
||||
AMF_PORT_FOR_NGAP=38412
|
||||
AMF_PORT_FOR_N11_HTTP=80
|
||||
AMF_IP_NGAP_INTERFACE=$(ifconfig $AMF_INTERFACE_NAME_FOR_NGAP | grep inet | awk {'print $2'})
|
||||
AMF_IP_N11_INTERFACE=$(ifconfig $AMF_INTERFACE_NAME_FOR_N11 | grep inet | awk {'print $2'})
|
||||
N2_PORT_STATUS=$(netstat -Snpl | grep -o "$AMF_IP_NGAP_INTERFACE:$AMF_PORT_FOR_NGAP")
|
||||
N11_PORT_STATUS=$(netstat -tnpl | grep -o "$AMF_IP_N11_INTERFACE:$AMF_PORT_FOR_N11_HTTP")
|
||||
#Check if entrypoint properly configured the conf file and no parameter is unset (optional)
|
||||
NB_UNREPLACED_AT=`cat /openair-amf/etc/*.conf | grep -v contact@openairinterface.org | grep -c @ || true`
|
||||
|
||||
if [ $NB_UNREPLACED_AT -ne 0 ]; then
|
||||
STATUS=1
|
||||
echo "Healthcheck error: configuration file is not configured properly"
|
||||
fi
|
||||
|
||||
if [[ -z $N2_PORT_STATUS ]]; then
|
||||
STATUS=1
|
||||
echo "Healthcheck error: N2 SCTP port $AMF_PORT_FOR_NGAP is not listening"
|
||||
fi
|
||||
|
||||
if [[ -z $N11_PORT_STATUS ]]; then
|
||||
STATUS=1
|
||||
echo "Healthcheck error: N11/SBI TCP/HTTP port $AMF_PORT_FOR_N11_HTTP is not listening"
|
||||
fi
|
||||
|
||||
#host="${MYSQL_SERVER}"
|
||||
#user="${MYSQL_USER:-root}"
|
||||
#export MYSQL_PWD="${MYSQL_PASS}"
|
||||
|
||||
#args=(
|
||||
# -h"$host"
|
||||
# -u"$user"
|
||||
# --silent
|
||||
#)
|
||||
|
||||
#if ! command -v mysql &> /dev/null; then
|
||||
# echo "Installing mysql command"
|
||||
# apt update
|
||||
# apt-get -y install mysql-client
|
||||
#else
|
||||
# if select="$(echo 'SELECT 1' | mysql "${args[@]}")" && [ "$select" = '1' ]; then
|
||||
# database_check=$(mysql -h$host -u$user -D oai_db --silent -e "SELECT * FROM users;")
|
||||
# if [[ -z $database_check ]]; then
|
||||
# echo "Healthcheck error: oai_db not populated"
|
||||
# STATUS=1
|
||||
# fi
|
||||
# STATUS=0
|
||||
# else
|
||||
# echo "Healthcheck error: Mysql port inactive"
|
||||
# STATUS=1
|
||||
# fi
|
||||
#fi
|
||||
|
||||
exit $STATUS
|
||||
@@ -1,11 +1,20 @@
|
||||
version: '3.8'
|
||||
services:
|
||||
oai-nrf:
|
||||
container_name: "rfsim5g-oai-nrf"
|
||||
image: oaisoftwarealliance/oai-nrf:v1.5.0
|
||||
environment:
|
||||
- NRF_INTERFACE_NAME_FOR_SBI=eth0
|
||||
- TZ=Europe/Paris
|
||||
networks:
|
||||
public_net:
|
||||
ipv4_address: 192.168.71.130
|
||||
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
|
||||
- ./oai_db.sql:/docker-entrypoint-initdb.d/oai_db.sql
|
||||
- ./mysql-healthcheck.sh:/tmp/mysql-healthcheck.sh
|
||||
environment:
|
||||
- TZ=Europe/Paris
|
||||
- MYSQL_DATABASE=oai_db
|
||||
@@ -22,36 +31,108 @@ services:
|
||||
ipv4_address: 192.168.71.131
|
||||
oai-amf:
|
||||
container_name: "rfsim5g-oai-amf"
|
||||
image: oaisoftwarealliance/oai-amf:v2.0.0
|
||||
image: oaisoftwarealliance/oai-amf:v1.5.0
|
||||
environment:
|
||||
- TZ=Europe/paris
|
||||
volumes:
|
||||
- ../5g_rfsimulator_e1/mini_nonrf_config_3slices.yaml:/openair-amf/etc/config.yaml
|
||||
- MCC=208
|
||||
- MNC=99
|
||||
- REGION_ID=128
|
||||
- AMF_SET_ID=1
|
||||
- SERVED_GUAMI_MCC_0=208
|
||||
- SERVED_GUAMI_MNC_0=99
|
||||
- SERVED_GUAMI_REGION_ID_0=128
|
||||
- SERVED_GUAMI_AMF_SET_ID_0=1
|
||||
- SERVED_GUAMI_MCC_1=460
|
||||
- SERVED_GUAMI_MNC_1=11
|
||||
- SERVED_GUAMI_REGION_ID_1=10
|
||||
- SERVED_GUAMI_AMF_SET_ID_1=1
|
||||
- PLMN_SUPPORT_MCC=208
|
||||
- PLMN_SUPPORT_MNC=99
|
||||
- PLMN_SUPPORT_TAC=0x0001
|
||||
# Only one slice is defined (1, 0xFFFFFF).
|
||||
- SST_0=1
|
||||
- AMF_INTERFACE_NAME_FOR_NGAP=eth0
|
||||
- AMF_INTERFACE_NAME_FOR_N11=eth0
|
||||
# One single SMF instance
|
||||
- SMF_INSTANCE_ID_0=1
|
||||
- SMF_FQDN_0=oai-smf
|
||||
- SMF_IPV4_ADDR_0=192.168.71.133
|
||||
- SELECTED_0=true
|
||||
# mysql definition in AMF is mandatory in mini deployment.
|
||||
- MYSQL_SERVER=192.168.71.131
|
||||
- MYSQL_USER=root
|
||||
- MYSQL_PASS=linux
|
||||
- MYSQL_DB=oai_db
|
||||
# NF registration
|
||||
- NRF_IPV4_ADDRESS=192.168.71.130
|
||||
- NRF_FQDN=oai-nrf
|
||||
- NF_REGISTRATION=yes
|
||||
- SMF_SELECTION=yes
|
||||
- USE_FQDN_DNS=yes
|
||||
- USE_HTTP2=no
|
||||
depends_on:
|
||||
- oai-nrf
|
||||
- mysql
|
||||
networks:
|
||||
public_net:
|
||||
ipv4_address: 192.168.71.132
|
||||
oai-smf:
|
||||
container_name: "rfsim5g-oai-smf"
|
||||
image: oaisoftwarealliance/oai-smf:v2.0.0
|
||||
image: oaisoftwarealliance/oai-smf:v1.5.0
|
||||
environment:
|
||||
- TZ=Europe/Paris
|
||||
volumes:
|
||||
- ../5g_rfsimulator_e1/mini_nonrf_config_3slices.yaml:/openair-smf/etc/config.yaml
|
||||
- SMF_INTERFACE_NAME_FOR_N4=eth0
|
||||
- SMF_INTERFACE_NAME_FOR_SBI=eth0
|
||||
- DEFAULT_DNS_IPV4_ADDRESS=172.21.3.100
|
||||
- DEFAULT_DNS_SEC_IPV4_ADDRESS=4.4.4.4
|
||||
- AMF_IPV4_ADDRESS=192.168.71.132
|
||||
- AMF_FQDN=oai-amf
|
||||
- UPF_IPV4_ADDRESS=192.168.71.134
|
||||
- UPF_FQDN_0=oai-spgwu
|
||||
- NRF_IPV4_ADDRESS=192.168.71.130
|
||||
- NRF_FQDN=oai-nrf
|
||||
- REGISTER_NRF=yes
|
||||
- DISCOVER_UPF=yes
|
||||
- USE_FQDN_DNS=yes
|
||||
- USE_LOCAL_SUBSCRIPTION_INFO=yes
|
||||
- UE_MTU=1500
|
||||
# Only one slice is defined (1, 0xFFFFFF)
|
||||
- DNN_NI0=oai
|
||||
- TYPE0=IPv4
|
||||
- DNN_RANGE0=12.1.1.2 - 12.1.1.127
|
||||
- NSSAI_SST0=1
|
||||
- SESSION_AMBR_UL0=200Mbps
|
||||
- SESSION_AMBR_DL0=400Mbps
|
||||
- DEFAULT_CSCF_IPV4_ADDRESS=127.0.0.1
|
||||
- ENABLE_USAGE_REPORTING=no
|
||||
depends_on:
|
||||
- oai-nrf
|
||||
- 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
|
||||
oai-spgwu:
|
||||
container_name: "rfsim5g-oai-spgwu"
|
||||
image: oaisoftwarealliance/oai-spgwu-tiny:v1.5.0
|
||||
environment:
|
||||
- TZ=Europe/Paris
|
||||
volumes:
|
||||
- ../5g_rfsimulator_e1/mini_nonrf_config_3slices.yaml:/openair-upf/etc/config.yaml
|
||||
- SGW_INTERFACE_NAME_FOR_S1U_S12_S4_UP=eth0
|
||||
- SGW_INTERFACE_NAME_FOR_SX=eth0
|
||||
- PGW_INTERFACE_NAME_FOR_SGI=eth0
|
||||
- NETWORK_UE_NAT_OPTION=yes
|
||||
- NETWORK_UE_IP=12.1.1.0/24
|
||||
- ENABLE_5G_FEATURES=yes
|
||||
- REGISTER_NRF=yes
|
||||
- USE_FQDN_NRF=yes
|
||||
- UPF_FQDN_5G=oai-spgwu
|
||||
- NRF_IPV4_ADDRESS=192.168.71.130
|
||||
- NRF_FQDN=oai-nrf
|
||||
# Only one slice is defined (1, 0xFFFFFF)
|
||||
- NSSAI_SST_0=1
|
||||
- NSSAI_SD_0=0xffffff
|
||||
- DNN_0=oai
|
||||
depends_on:
|
||||
- oai-nrf
|
||||
- oai-smf
|
||||
cap_add:
|
||||
- NET_ADMIN
|
||||
@@ -64,7 +145,6 @@ services:
|
||||
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
|
||||
@@ -73,7 +153,7 @@ services:
|
||||
"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
|
||||
- oai-spgwu
|
||||
networks:
|
||||
traffic_net:
|
||||
ipv4_address: 192.168.72.135
|
||||
@@ -82,19 +162,17 @@ services:
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
|
||||
oai-cu:
|
||||
image: oaisoftwarealliance/oai-gnb:develop
|
||||
privileged: true
|
||||
container_name: rfsim5g-oai-cu
|
||||
environment:
|
||||
USE_ADDITIONAL_OPTIONS: --sa --log_config.global_log_options level,nocolor,time
|
||||
ASAN_OPTIONS: detect_leaks=0
|
||||
USE_ADDITIONAL_OPTIONS: --sa --rfsim --log_config.global_log_options level,nocolor,time
|
||||
depends_on:
|
||||
- oai-ext-dn
|
||||
networks:
|
||||
public_net:
|
||||
ipv4_address: 192.168.71.150
|
||||
ipv4_address: 192.168.71.140
|
||||
volumes:
|
||||
- ../../conf_files/gnb-cu.sa.band78.106prb.conf:/opt/oai-gnb/etc/gnb.conf
|
||||
healthcheck:
|
||||
@@ -102,19 +180,17 @@ services:
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
|
||||
oai-du:
|
||||
image: oaisoftwarealliance/oai-gnb:develop
|
||||
privileged: true
|
||||
container_name: rfsim5g-oai-du
|
||||
environment:
|
||||
environment:
|
||||
USE_ADDITIONAL_OPTIONS: --sa --rfsim --log_config.global_log_options level,nocolor,time
|
||||
ASAN_OPTIONS: detect_leaks=0
|
||||
depends_on:
|
||||
- oai-cu
|
||||
networks:
|
||||
public_net:
|
||||
ipv4_address: 192.168.71.171
|
||||
ipv4_address: 192.168.71.142
|
||||
volumes:
|
||||
- ../../conf_files/gnb-du.sa.band78.106prb.rfsim.conf:/opt/oai-gnb/etc/gnb.conf
|
||||
healthcheck:
|
||||
@@ -122,21 +198,17 @@ services:
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
|
||||
oai-nr-ue:
|
||||
image: oaisoftwarealliance/oai-nr-ue:develop
|
||||
privileged: true
|
||||
container_name: rfsim5g-oai-nr-ue
|
||||
environment:
|
||||
USE_ADDITIONAL_OPTIONS: --sa --rfsim --log_config.global_log_options level,nocolor,time
|
||||
-r 106 --numerology 1 -C 3619200000
|
||||
--uicc0.imsi 208990100001100
|
||||
--rfsimulator.serveraddr 192.168.71.171
|
||||
environment:
|
||||
USE_ADDITIONAL_OPTIONS: --sa --rfsim -r 106 --numerology 1 --uicc0.imsi 208990100001100 -C 3619200000 --rfsimulator.serveraddr 192.168.71.142 --log_config.global_log_options level,nocolor,time
|
||||
depends_on:
|
||||
- oai-du
|
||||
networks:
|
||||
public_net:
|
||||
ipv4_address: 192.168.71.181
|
||||
ipv4_address: 192.168.71.150
|
||||
volumes:
|
||||
- ../../conf_files/nrue.uicc.conf:/opt/oai-nr-ue/etc/nr-ue.conf
|
||||
healthcheck:
|
||||
@@ -156,7 +228,7 @@ networks:
|
||||
com.docker.network.bridge.name: "rfsim5g-public"
|
||||
traffic_net:
|
||||
driver: bridge
|
||||
name: rfsim5g-oai-traffic-net
|
||||
name: rfsim5g-oai-traffic_net-net
|
||||
ipam:
|
||||
config:
|
||||
- subnet: 192.168.72.128/26
|
||||
|
||||
46
ci-scripts/yaml_files/5g_f1_rfsimulator/mysql-healthcheck.sh
Executable file
46
ci-scripts/yaml_files/5g_f1_rfsimulator/mysql-healthcheck.sh
Executable file
@@ -0,0 +1,46 @@
|
||||
#!/bin/bash
|
||||
set -eo pipefail
|
||||
|
||||
if [ "$MYSQL_ROOT_PASSWORD" ] && [ -z "$MYSQL_USER" ] && [ -z "$MYSQL_PASSWORD" ]; then
|
||||
echo >&2 'Healthcheck error: cannot determine root password (and MYSQL_USER and MYSQL_PASSWORD were not set)'
|
||||
exit 0
|
||||
fi
|
||||
|
||||
host="$(hostname --ip-address || echo '127.0.0.1')"
|
||||
user="${MYSQL_USER:-root}"
|
||||
export MYSQL_PWD="${MYSQL_PASSWORD:-$MYSQL_ROOT_PASSWORD}"
|
||||
|
||||
args=(
|
||||
# force mysql to not use the local "mysqld.sock" (test "external" connectivity)
|
||||
-h"$host"
|
||||
-u"$user"
|
||||
--silent
|
||||
)
|
||||
|
||||
STATUS=0
|
||||
if command -v mysqladmin &> /dev/null; then
|
||||
if mysqladmin "${args[@]}" ping > /dev/null; then
|
||||
database_check=$(mysql -u$user -D oai_db --silent -e "SELECT * FROM users;")
|
||||
if [[ -z $database_check ]]; then
|
||||
echo "Healthcheck error: oai_db not populated"
|
||||
STATUS=1
|
||||
fi
|
||||
STATUS=0
|
||||
else
|
||||
echo "Healthcheck error: Mysql port inactive"
|
||||
STATUS=1
|
||||
fi
|
||||
else
|
||||
if select="$(echo 'SELECT 1' | mysql "${args[@]}")" && [ "$select" = '1' ]; then
|
||||
database_check=$(mysql -u$user -D oai_db --silent -e "SELECT * FROM users;")
|
||||
if [[ -z $database_check ]]; then
|
||||
echo "Healthcheck error: oai_db not populated"
|
||||
STATUS=1
|
||||
fi
|
||||
STATUS=0
|
||||
else
|
||||
echo "Healthcheck error: Mysql port inactive"
|
||||
STATUS=1
|
||||
fi
|
||||
fi
|
||||
exit $STATUS
|
||||
20
ci-scripts/yaml_files/5g_f1_rfsimulator/nrf-healthcheck.sh
Executable file
20
ci-scripts/yaml_files/5g_f1_rfsimulator/nrf-healthcheck.sh
Executable file
@@ -0,0 +1,20 @@
|
||||
#!/bin/bash
|
||||
set -eo pipefail
|
||||
|
||||
STATUS=0
|
||||
NRF_IP_SBI_INTERFACE=$(ifconfig $NRF_INTERFACE_NAME_FOR_SBI | grep inet | awk {'print $2'})
|
||||
NRF_SBI_PORT_STATUS=$(netstat -tnpl | grep -o "$NRF_IP_SBI_INTERFACE:$NRF_INTERFACE_PORT_FOR_SBI")
|
||||
#Check if entrypoint properly configured the conf file and no parameter is unset(optional)
|
||||
NB_UNREPLACED_AT=`cat /openair-nrf/etc/*.conf | grep -v contact@openairinterface.org | grep -c @ || true`
|
||||
|
||||
if [ $NB_UNREPLACED_AT -ne 0 ]; then
|
||||
STATUS=1
|
||||
echo "Healthcheck error: UNHEALTHY configuration file is not configured properly"
|
||||
fi
|
||||
|
||||
if [[ -z $NRF_SBI_PORT_STATUS ]]; then
|
||||
STATUS=1
|
||||
echo "Healthcheck error: UNHEALTHY SBI TCP/HTTP port $NRF_INTERFACE_PORT_FOR_SBI is not listening."
|
||||
fi
|
||||
|
||||
exit $STATUS
|
||||
217
ci-scripts/yaml_files/5g_f1_rfsimulator/oai_db.sql
Executable file
217
ci-scripts/yaml_files/5g_f1_rfsimulator/oai_db.sql
Executable file
File diff suppressed because one or more lines are too long
21
ci-scripts/yaml_files/5g_f1_rfsimulator/smf-healthcheck.sh
Executable file
21
ci-scripts/yaml_files/5g_f1_rfsimulator/smf-healthcheck.sh
Executable file
@@ -0,0 +1,21 @@
|
||||
#!/bin/bash
|
||||
set -eo pipefail
|
||||
|
||||
STATUS=0
|
||||
SMF_IP_SBI_INTERFACE=$(ifconfig $SMF_INTERFACE_NAME_FOR_SBI | grep inet | awk {'print $2'})
|
||||
SMF_SBI_PORT_STATUS=$(netstat -tnpl | grep -o "$SMF_IP_SBI_INTERFACE:$SMF_INTERFACE_PORT_FOR_SBI")
|
||||
|
||||
#Check if entrypoint properly configured the conf file and no parameter is unset(optional)
|
||||
#NB_UNREPLACED_AT=`cat /openair-smf/etc/*.conf | grep -v contact@openairinterface.org | grep -c @ || true`
|
||||
|
||||
#if [ $NB_UNREPLACED_AT -ne 0 ]; then
|
||||
# STATUS=-1
|
||||
# echo "Healthcheck error: UNHEALTHY configuration file is not configured properly"
|
||||
#fi
|
||||
#
|
||||
if [[ -z $SMF_SBI_PORT_STATUS ]]; then
|
||||
STATUS=-1
|
||||
echo "Healthcheck error: UNHEALTHY SBI TCP/HTTP port $SMF_INTERFACE_PORT_FOR_SBI is not listening."
|
||||
fi
|
||||
|
||||
exit $STATUS
|
||||
28
ci-scripts/yaml_files/5g_f1_rfsimulator/spgwu-healthcheck.sh
Executable file
28
ci-scripts/yaml_files/5g_f1_rfsimulator/spgwu-healthcheck.sh
Executable file
@@ -0,0 +1,28 @@
|
||||
#!/bin/bash
|
||||
set -eo pipefail
|
||||
|
||||
STATUS=0
|
||||
SGW_PORT_FOR_S1U_S12_S4_UP=2152
|
||||
SGW_PORT_FOR_SX=8805
|
||||
SGW_IP_S1U_INTERFACE=$(ifconfig $SGW_INTERFACE_NAME_FOR_S1U_S12_S4_UP | grep inet | awk {'print $2'})
|
||||
SGW_IP_SX_INTERFACE=$(ifconfig $SGW_INTERFACE_NAME_FOR_SX | grep inet | awk {'print $2'})
|
||||
S1U_S12_S4_UP_PORT_STATUS=$(netstat -unpl | grep -o "$SGW_IP_S1U_INTERFACE:$SGW_PORT_FOR_S1U_S12_S4_UP")
|
||||
SX_PORT_STATUS=$(netstat -unpl | grep -o "$SGW_IP_SX_INTERFACE:$SGW_PORT_FOR_SX")
|
||||
#Check if entrypoint properly configured the conf file and no parameter is unset (optional)
|
||||
NB_UNREPLACED_AT=`cat /openair-spgwu/etc/*.conf | grep -v contact@openairinterface.org | grep -c @ || true`
|
||||
if [ $NB_UNREPLACED_AT -ne 0 ]; then
|
||||
STATUS=1
|
||||
echo "Healthcheck error: UNHEALTHY configuration file is not configured properly"
|
||||
fi
|
||||
|
||||
if [[ -z $S1U_S12_S4_UP_PORT_STATUS ]]; then
|
||||
STATUS=1
|
||||
echo "Healthcheck error: UNHEALTHY S1U port $SGW_PORT_FOR_S1U_S12_S4_UP is not listening."
|
||||
fi
|
||||
|
||||
if [[ -z $SX_PORT_STATUS ]]; then
|
||||
STATUS=1
|
||||
echo "Healthcheck error: UNHEALTHY SX port $SGW_PORT_FOR_SX is not listening."
|
||||
fi
|
||||
|
||||
exit $STATUS
|
||||
57
ci-scripts/yaml_files/5g_fdd_rfsimulator/amf-healthcheck.sh
Executable file
57
ci-scripts/yaml_files/5g_fdd_rfsimulator/amf-healthcheck.sh
Executable file
@@ -0,0 +1,57 @@
|
||||
#!/bin/bash
|
||||
set -eo pipefail
|
||||
|
||||
STATUS=0
|
||||
AMF_PORT_FOR_NGAP=38412
|
||||
AMF_PORT_FOR_N11_HTTP=80
|
||||
AMF_IP_NGAP_INTERFACE=$(ifconfig $AMF_INTERFACE_NAME_FOR_NGAP | grep inet | awk {'print $2'})
|
||||
AMF_IP_N11_INTERFACE=$(ifconfig $AMF_INTERFACE_NAME_FOR_N11 | grep inet | awk {'print $2'})
|
||||
N2_PORT_STATUS=$(netstat -Snpl | grep -o "$AMF_IP_NGAP_INTERFACE:$AMF_PORT_FOR_NGAP")
|
||||
N11_PORT_STATUS=$(netstat -tnpl | grep -o "$AMF_IP_N11_INTERFACE:$AMF_PORT_FOR_N11_HTTP")
|
||||
#Check if entrypoint properly configured the conf file and no parameter is unset (optional)
|
||||
NB_UNREPLACED_AT=`cat /openair-amf/etc/*.conf | grep -v contact@openairinterface.org | grep -c @ || true`
|
||||
|
||||
if [ $NB_UNREPLACED_AT -ne 0 ]; then
|
||||
STATUS=1
|
||||
echo "Healthcheck error: configuration file is not configured properly"
|
||||
fi
|
||||
|
||||
if [[ -z $N2_PORT_STATUS ]]; then
|
||||
STATUS=1
|
||||
echo "Healthcheck error: N2 SCTP port $AMF_PORT_FOR_NGAP is not listening"
|
||||
fi
|
||||
|
||||
if [[ -z $N11_PORT_STATUS ]]; then
|
||||
STATUS=1
|
||||
echo "Healthcheck error: N11/SBI TCP/HTTP port $AMF_PORT_FOR_N11_HTTP is not listening"
|
||||
fi
|
||||
|
||||
#host="${MYSQL_SERVER}"
|
||||
#user="${MYSQL_USER:-root}"
|
||||
#export MYSQL_PWD="${MYSQL_PASS}"
|
||||
|
||||
#args=(
|
||||
# -h"$host"
|
||||
# -u"$user"
|
||||
# --silent
|
||||
#)
|
||||
|
||||
#if ! command -v mysql &> /dev/null; then
|
||||
# echo "Installing mysql command"
|
||||
# apt update
|
||||
# apt-get -y install mysql-client
|
||||
#else
|
||||
# if select="$(echo 'SELECT 1' | mysql "${args[@]}")" && [ "$select" = '1' ]; then
|
||||
# database_check=$(mysql -h$host -u$user -D oai_db --silent -e "SELECT * FROM users;")
|
||||
# if [[ -z $database_check ]]; then
|
||||
# echo "Healthcheck error: oai_db not populated"
|
||||
# STATUS=1
|
||||
# fi
|
||||
# STATUS=0
|
||||
# else
|
||||
# echo "Healthcheck error: Mysql port inactive"
|
||||
# STATUS=1
|
||||
# fi
|
||||
#fi
|
||||
|
||||
exit $STATUS
|
||||
@@ -1,11 +1,20 @@
|
||||
version: '3.8'
|
||||
services:
|
||||
oai-nrf:
|
||||
container_name: "rfsim5g-oai-nrf"
|
||||
image: oaisoftwarealliance/oai-nrf:v1.5.0
|
||||
environment:
|
||||
- NRF_INTERFACE_NAME_FOR_SBI=eth0
|
||||
- TZ=Europe/Paris
|
||||
networks:
|
||||
public_net:
|
||||
ipv4_address: 192.168.71.130
|
||||
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
|
||||
- ./oai_db.sql:/docker-entrypoint-initdb.d/oai_db.sql
|
||||
- ./mysql-healthcheck.sh:/tmp/mysql-healthcheck.sh
|
||||
environment:
|
||||
- TZ=Europe/Paris
|
||||
- MYSQL_DATABASE=oai_db
|
||||
@@ -22,36 +31,108 @@ services:
|
||||
ipv4_address: 192.168.71.131
|
||||
oai-amf:
|
||||
container_name: "rfsim5g-oai-amf"
|
||||
image: oaisoftwarealliance/oai-amf:v2.0.0
|
||||
image: oaisoftwarealliance/oai-amf:v1.5.0
|
||||
environment:
|
||||
- TZ=Europe/paris
|
||||
volumes:
|
||||
- ../5g_rfsimulator/mini_nonrf_config.yaml:/openair-amf/etc/config.yaml
|
||||
- MCC=208
|
||||
- MNC=99
|
||||
- REGION_ID=128
|
||||
- AMF_SET_ID=1
|
||||
- SERVED_GUAMI_MCC_0=208
|
||||
- SERVED_GUAMI_MNC_0=99
|
||||
- SERVED_GUAMI_REGION_ID_0=128
|
||||
- SERVED_GUAMI_AMF_SET_ID_0=1
|
||||
- SERVED_GUAMI_MCC_1=460
|
||||
- SERVED_GUAMI_MNC_1=11
|
||||
- SERVED_GUAMI_REGION_ID_1=10
|
||||
- SERVED_GUAMI_AMF_SET_ID_1=1
|
||||
- PLMN_SUPPORT_MCC=208
|
||||
- PLMN_SUPPORT_MNC=99
|
||||
- PLMN_SUPPORT_TAC=0x0001
|
||||
# Only one slice is defined (1, 0xFFFFFF).
|
||||
- SST_0=1
|
||||
- AMF_INTERFACE_NAME_FOR_NGAP=eth0
|
||||
- AMF_INTERFACE_NAME_FOR_N11=eth0
|
||||
# One single SMF instance
|
||||
- SMF_INSTANCE_ID_0=1
|
||||
- SMF_FQDN_0=oai-smf
|
||||
- SMF_IPV4_ADDR_0=192.168.71.133
|
||||
- SELECTED_0=true
|
||||
# mysql definition in AMF is mandatory in mini deployment.
|
||||
- MYSQL_SERVER=192.168.71.131
|
||||
- MYSQL_USER=root
|
||||
- MYSQL_PASS=linux
|
||||
- MYSQL_DB=oai_db
|
||||
# NF registration
|
||||
- NRF_IPV4_ADDRESS=192.168.71.130
|
||||
- NRF_FQDN=oai-nrf
|
||||
- NF_REGISTRATION=yes
|
||||
- SMF_SELECTION=yes
|
||||
- USE_FQDN_DNS=yes
|
||||
- USE_HTTP2=no
|
||||
depends_on:
|
||||
- oai-nrf
|
||||
- mysql
|
||||
networks:
|
||||
public_net:
|
||||
ipv4_address: 192.168.71.132
|
||||
oai-smf:
|
||||
container_name: "rfsim5g-oai-smf"
|
||||
image: oaisoftwarealliance/oai-smf:v2.0.0
|
||||
image: oaisoftwarealliance/oai-smf:v1.5.0
|
||||
environment:
|
||||
- TZ=Europe/Paris
|
||||
volumes:
|
||||
- ../5g_rfsimulator/mini_nonrf_config.yaml:/openair-smf/etc/config.yaml
|
||||
- SMF_INTERFACE_NAME_FOR_N4=eth0
|
||||
- SMF_INTERFACE_NAME_FOR_SBI=eth0
|
||||
- DEFAULT_DNS_IPV4_ADDRESS=172.21.3.100
|
||||
- DEFAULT_DNS_SEC_IPV4_ADDRESS=4.4.4.4
|
||||
- AMF_IPV4_ADDRESS=192.168.71.132
|
||||
- AMF_FQDN=oai-amf
|
||||
- UPF_IPV4_ADDRESS=192.168.71.134
|
||||
- UPF_FQDN_0=oai-spgwu
|
||||
- NRF_IPV4_ADDRESS=192.168.71.130
|
||||
- NRF_FQDN=oai-nrf
|
||||
- REGISTER_NRF=yes
|
||||
- DISCOVER_UPF=yes
|
||||
- USE_FQDN_DNS=yes
|
||||
- USE_LOCAL_SUBSCRIPTION_INFO=yes
|
||||
- UE_MTU=1500
|
||||
# Only one slice is defined (1, 0xFFFFFF)
|
||||
- DNN_NI0=oai
|
||||
- TYPE0=IPv4
|
||||
- DNN_RANGE0=12.1.1.2 - 12.1.1.127
|
||||
- NSSAI_SST0=1
|
||||
- SESSION_AMBR_UL0=200Mbps
|
||||
- SESSION_AMBR_DL0=400Mbps
|
||||
- DEFAULT_CSCF_IPV4_ADDRESS=127.0.0.1
|
||||
- ENABLE_USAGE_REPORTING=no
|
||||
depends_on:
|
||||
- oai-nrf
|
||||
- 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
|
||||
oai-spgwu:
|
||||
container_name: "rfsim5g-oai-spgwu"
|
||||
image: oaisoftwarealliance/oai-spgwu-tiny:v1.5.0
|
||||
environment:
|
||||
- TZ=Europe/Paris
|
||||
volumes:
|
||||
- ../5g_rfsimulator/mini_nonrf_config.yaml:/openair-upf/etc/config.yaml
|
||||
- SGW_INTERFACE_NAME_FOR_S1U_S12_S4_UP=eth0
|
||||
- SGW_INTERFACE_NAME_FOR_SX=eth0
|
||||
- PGW_INTERFACE_NAME_FOR_SGI=eth0
|
||||
- NETWORK_UE_NAT_OPTION=yes
|
||||
- NETWORK_UE_IP=12.1.1.0/24
|
||||
- ENABLE_5G_FEATURES=yes
|
||||
- REGISTER_NRF=yes
|
||||
- USE_FQDN_NRF=yes
|
||||
- UPF_FQDN_5G=oai-spgwu
|
||||
- NRF_IPV4_ADDRESS=192.168.71.130
|
||||
- NRF_FQDN=oai-nrf
|
||||
# Only one slice is defined (1, 0xFFFFFF)
|
||||
- NSSAI_SST_0=1
|
||||
- NSSAI_SD_0=0xffffff
|
||||
- DNN_0=oai
|
||||
depends_on:
|
||||
- oai-nrf
|
||||
- oai-smf
|
||||
cap_add:
|
||||
- NET_ADMIN
|
||||
@@ -72,7 +153,7 @@ services:
|
||||
"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
|
||||
- oai-spgwu
|
||||
networks:
|
||||
traffic_net:
|
||||
ipv4_address: 192.168.72.135
|
||||
@@ -85,9 +166,8 @@ services:
|
||||
image: oaisoftwarealliance/oai-gnb:develop
|
||||
privileged: true
|
||||
container_name: rfsim5g-oai-gnb
|
||||
environment:
|
||||
environment:
|
||||
USE_ADDITIONAL_OPTIONS: --sa -E --rfsim --log_config.global_log_options level,nocolor,time
|
||||
ASAN_OPTIONS: detect_leaks=0
|
||||
depends_on:
|
||||
- oai-ext-dn
|
||||
networks:
|
||||
|
||||
46
ci-scripts/yaml_files/5g_fdd_rfsimulator/mysql-healthcheck.sh
Executable file
46
ci-scripts/yaml_files/5g_fdd_rfsimulator/mysql-healthcheck.sh
Executable file
@@ -0,0 +1,46 @@
|
||||
#!/bin/bash
|
||||
set -eo pipefail
|
||||
|
||||
if [ "$MYSQL_ROOT_PASSWORD" ] && [ -z "$MYSQL_USER" ] && [ -z "$MYSQL_PASSWORD" ]; then
|
||||
echo >&2 'Healthcheck error: cannot determine root password (and MYSQL_USER and MYSQL_PASSWORD were not set)'
|
||||
exit 0
|
||||
fi
|
||||
|
||||
host="$(hostname --ip-address || echo '127.0.0.1')"
|
||||
user="${MYSQL_USER:-root}"
|
||||
export MYSQL_PWD="${MYSQL_PASSWORD:-$MYSQL_ROOT_PASSWORD}"
|
||||
|
||||
args=(
|
||||
# force mysql to not use the local "mysqld.sock" (test "external" connectivity)
|
||||
-h"$host"
|
||||
-u"$user"
|
||||
--silent
|
||||
)
|
||||
|
||||
STATUS=0
|
||||
if command -v mysqladmin &> /dev/null; then
|
||||
if mysqladmin "${args[@]}" ping > /dev/null; then
|
||||
database_check=$(mysql -u$user -D oai_db --silent -e "SELECT * FROM users;")
|
||||
if [[ -z $database_check ]]; then
|
||||
echo "Healthcheck error: oai_db not populated"
|
||||
STATUS=1
|
||||
fi
|
||||
STATUS=0
|
||||
else
|
||||
echo "Healthcheck error: Mysql port inactive"
|
||||
STATUS=1
|
||||
fi
|
||||
else
|
||||
if select="$(echo 'SELECT 1' | mysql "${args[@]}")" && [ "$select" = '1' ]; then
|
||||
database_check=$(mysql -u$user -D oai_db --silent -e "SELECT * FROM users;")
|
||||
if [[ -z $database_check ]]; then
|
||||
echo "Healthcheck error: oai_db not populated"
|
||||
STATUS=1
|
||||
fi
|
||||
STATUS=0
|
||||
else
|
||||
echo "Healthcheck error: Mysql port inactive"
|
||||
STATUS=1
|
||||
fi
|
||||
fi
|
||||
exit $STATUS
|
||||
20
ci-scripts/yaml_files/5g_fdd_rfsimulator/nrf-healthcheck.sh
Executable file
20
ci-scripts/yaml_files/5g_fdd_rfsimulator/nrf-healthcheck.sh
Executable file
@@ -0,0 +1,20 @@
|
||||
#!/bin/bash
|
||||
set -eo pipefail
|
||||
|
||||
STATUS=0
|
||||
NRF_IP_SBI_INTERFACE=$(ifconfig $NRF_INTERFACE_NAME_FOR_SBI | grep inet | awk {'print $2'})
|
||||
NRF_SBI_PORT_STATUS=$(netstat -tnpl | grep -o "$NRF_IP_SBI_INTERFACE:$NRF_INTERFACE_PORT_FOR_SBI")
|
||||
#Check if entrypoint properly configured the conf file and no parameter is unset(optional)
|
||||
NB_UNREPLACED_AT=`cat /openair-nrf/etc/*.conf | grep -v contact@openairinterface.org | grep -c @ || true`
|
||||
|
||||
if [ $NB_UNREPLACED_AT -ne 0 ]; then
|
||||
STATUS=1
|
||||
echo "Healthcheck error: UNHEALTHY configuration file is not configured properly"
|
||||
fi
|
||||
|
||||
if [[ -z $NRF_SBI_PORT_STATUS ]]; then
|
||||
STATUS=1
|
||||
echo "Healthcheck error: UNHEALTHY SBI TCP/HTTP port $NRF_INTERFACE_PORT_FOR_SBI is not listening."
|
||||
fi
|
||||
|
||||
exit $STATUS
|
||||
217
ci-scripts/yaml_files/5g_fdd_rfsimulator/oai_db.sql
Executable file
217
ci-scripts/yaml_files/5g_fdd_rfsimulator/oai_db.sql
Executable file
File diff suppressed because one or more lines are too long
21
ci-scripts/yaml_files/5g_fdd_rfsimulator/smf-healthcheck.sh
Executable file
21
ci-scripts/yaml_files/5g_fdd_rfsimulator/smf-healthcheck.sh
Executable file
@@ -0,0 +1,21 @@
|
||||
#!/bin/bash
|
||||
set -eo pipefail
|
||||
|
||||
STATUS=0
|
||||
SMF_IP_SBI_INTERFACE=$(ifconfig $SMF_INTERFACE_NAME_FOR_SBI | grep inet | awk {'print $2'})
|
||||
SMF_SBI_PORT_STATUS=$(netstat -tnpl | grep -o "$SMF_IP_SBI_INTERFACE:$SMF_INTERFACE_PORT_FOR_SBI")
|
||||
|
||||
#Check if entrypoint properly configured the conf file and no parameter is unset(optional)
|
||||
#NB_UNREPLACED_AT=`cat /openair-smf/etc/*.conf | grep -v contact@openairinterface.org | grep -c @ || true`
|
||||
|
||||
#if [ $NB_UNREPLACED_AT -ne 0 ]; then
|
||||
# STATUS=-1
|
||||
# echo "Healthcheck error: UNHEALTHY configuration file is not configured properly"
|
||||
#fi
|
||||
#
|
||||
if [[ -z $SMF_SBI_PORT_STATUS ]]; then
|
||||
STATUS=-1
|
||||
echo "Healthcheck error: UNHEALTHY SBI TCP/HTTP port $SMF_INTERFACE_PORT_FOR_SBI is not listening."
|
||||
fi
|
||||
|
||||
exit $STATUS
|
||||
28
ci-scripts/yaml_files/5g_fdd_rfsimulator/spgwu-healthcheck.sh
Executable file
28
ci-scripts/yaml_files/5g_fdd_rfsimulator/spgwu-healthcheck.sh
Executable file
@@ -0,0 +1,28 @@
|
||||
#!/bin/bash
|
||||
set -eo pipefail
|
||||
|
||||
STATUS=0
|
||||
SGW_PORT_FOR_S1U_S12_S4_UP=2152
|
||||
SGW_PORT_FOR_SX=8805
|
||||
SGW_IP_S1U_INTERFACE=$(ifconfig $SGW_INTERFACE_NAME_FOR_S1U_S12_S4_UP | grep inet | awk {'print $2'})
|
||||
SGW_IP_SX_INTERFACE=$(ifconfig $SGW_INTERFACE_NAME_FOR_SX | grep inet | awk {'print $2'})
|
||||
S1U_S12_S4_UP_PORT_STATUS=$(netstat -unpl | grep -o "$SGW_IP_S1U_INTERFACE:$SGW_PORT_FOR_S1U_S12_S4_UP")
|
||||
SX_PORT_STATUS=$(netstat -unpl | grep -o "$SGW_IP_SX_INTERFACE:$SGW_PORT_FOR_SX")
|
||||
#Check if entrypoint properly configured the conf file and no parameter is unset (optional)
|
||||
NB_UNREPLACED_AT=`cat /openair-spgwu/etc/*.conf | grep -v contact@openairinterface.org | grep -c @ || true`
|
||||
if [ $NB_UNREPLACED_AT -ne 0 ]; then
|
||||
STATUS=1
|
||||
echo "Healthcheck error: UNHEALTHY configuration file is not configured properly"
|
||||
fi
|
||||
|
||||
if [[ -z $S1U_S12_S4_UP_PORT_STATUS ]]; then
|
||||
STATUS=1
|
||||
echo "Healthcheck error: UNHEALTHY S1U port $SGW_PORT_FOR_S1U_S12_S4_UP is not listening."
|
||||
fi
|
||||
|
||||
if [[ -z $SX_PORT_STATUS ]]; then
|
||||
STATUS=1
|
||||
echo "Healthcheck error: UNHEALTHY SX port $SGW_PORT_FOR_SX is not listening."
|
||||
fi
|
||||
|
||||
exit $STATUS
|
||||
@@ -96,9 +96,10 @@ Now pull images.
|
||||
|
||||
```bash
|
||||
docker pull mysql:8.0
|
||||
docker pull oaisoftwarealliance/oai-amf:v2.0.0
|
||||
docker pull oaisoftwarealliance/oai-smf:v2.0.0
|
||||
docker pull oaisoftwarealliance/oai-upf:v2.0.0
|
||||
docker pull oaisoftwarealliance/oai-amf:v1.5.0
|
||||
docker pull oaisoftwarealliance/oai-nrf:v1.5.0
|
||||
docker pull oaisoftwarealliance/oai-smf:v1.5.0
|
||||
docker pull oaisoftwarealliance/oai-spgwu-tiny:v1.5.0
|
||||
docker pull oaisoftwarealliance/trf-gen-cn5g:focal
|
||||
|
||||
docker pull oaisoftwarealliance/oai-gnb:develop
|
||||
@@ -138,13 +139,14 @@ sudo ifconfig lo: 127.0.0.2 netmask 255.0.0.0 up
|
||||
|
||||
```bash
|
||||
cd ci-scripts/yaml_files/5g_l2sim_tdd
|
||||
docker-compose up -d mysql oai-amf oai-smf oai-upf oai-ext-dn
|
||||
docker-compose up -d mysql oai-nrf oai-amf oai-smf oai-spgwu oai-ext-dn
|
||||
```
|
||||
```bash
|
||||
Creating network "l2sim-oai-public-net" with driver "bridge"
|
||||
Creating network "l2sim-oai-traffic_net-net" with driver "bridge"
|
||||
Creating l2sim-oai-nrf ... done
|
||||
Creating l2sim-mysql ... done
|
||||
Creating l2sim-oai-upf ... done
|
||||
Creating l2sim-oai-spgwu ... done
|
||||
Creating l2sim-oai-amf ... done
|
||||
Creating l2sim-oai-smf ... done
|
||||
Creating l2sim-oai-ext-dn ... done
|
||||
@@ -158,11 +160,12 @@ docker-compose ps -a
|
||||
```bash
|
||||
Name Command State Ports
|
||||
-------------------------------------------------------------------------------------------------
|
||||
l2sim-mysql docker-entrypoint.sh mysqld Up (healthy) 3306/tcp, 33060/tcp
|
||||
l2sim-mysql docker-entrypoint.sh mysqld Up (healthy) 3306/tcp, 33060/tcp
|
||||
l2sim-oai-amf /bin/bash /openair-amf/bin ... Up (healthy) 38412/sctp, 80/tcp, 9090/tcp
|
||||
l2sim-oai-ext-dn /bin/bash -c apt update; ... Up (healthy)
|
||||
l2sim-oai-smf /bin/bash /openair-smf/bin ... Up (healthy) 80/tcp, 8805/udp, 9090/tcp
|
||||
l2sim-oai-upf /bin/bash /openair-upf/bin ... Up (healthy) 2152/udp, 8805/udp
|
||||
l2sim-oai-ext-dn /bin/bash -c apt update; ... Up (healthy)
|
||||
l2sim-oai-nrf /bin/bash /openair-nrf/bin ... Up (healthy) 80/tcp, 9090/tcp
|
||||
l2sim-oai-smf /bin/bash /openair-smf/bin ... Up (healthy) 80/tcp, 8805/udp, 9090/tcp
|
||||
l2sim-oai-spgwu /openair-spgwu-tiny/bin/en ... Up (healthy) 2152/udp, 8805/udp
|
||||
```
|
||||
|
||||
At this point, you can prepare a capture on the newly-created public docker bridges:
|
||||
@@ -203,7 +206,8 @@ sudo nohup tshark -f "(host 192.168.72.135 and icmp) or (not host 192.168.72.135
|
||||
docker-compose up -d oai-gnb
|
||||
```
|
||||
```bash
|
||||
l2sim-oai-upf is up-to-date
|
||||
l2sim-oai-nrf is up-to-date
|
||||
l2sim-oai-spgwu is up-to-date
|
||||
l2sim-oai-ext-dn is up-to-date
|
||||
Creating l2sim-oai-gnb ... done
|
||||
```
|
||||
@@ -216,12 +220,13 @@ $ docker-compose ps -a
|
||||
```bash
|
||||
Name Command State Ports
|
||||
-------------------------------------------------------------------------------------------------
|
||||
l2sim-mysql docker-entrypoint.sh mysqld Up (healthy) 3306/tcp, 33060/tcp
|
||||
l2sim-mysql docker-entrypoint.sh mysqld Up (healthy) 3306/tcp, 33060/tcp
|
||||
l2sim-oai-amf /bin/bash /openair-amf/bin ... Up (healthy) 38412/sctp, 80/tcp, 9090/tcp
|
||||
l2sim-oai-ext-dn /bin/bash -c apt update; ... Up (healthy)
|
||||
l2sim-oai-gnb /opt/oai-gnb/bin/entrypoin ... Up (healthy)
|
||||
l2sim-oai-smf /bin/bash /openair-smf/bin ... Up (healthy) 80/tcp, 8805/udp, 9090/tcp
|
||||
l2sim-oai-upf /bin/bash /openair-upf/bin ... Up (healthy) 2152/udp, 8805/udp
|
||||
l2sim-oai-ext-dn /bin/bash -c apt update; ... Up (healthy)
|
||||
l2sim-oai-gnb /opt/oai-gnb/bin/entrypoin ... Up (healthy)
|
||||
l2sim-oai-nrf /bin/bash /openair-nrf/bin ... Up (healthy) 80/tcp, 9090/tcp
|
||||
l2sim-oai-smf /bin/bash /openair-smf/bin ... Up (healthy) 80/tcp, 8805/udp, 9090/tcp
|
||||
l2sim-oai-spgwu /openair-spgwu-tiny/bin/en ... Up (healthy) 2152/udp, 8805/udp
|
||||
```
|
||||
|
||||
You can verify that the `gNB` is connected with the `AMF`:
|
||||
@@ -245,9 +250,10 @@ docker-compose up -d proxy oai-nr-ue
|
||||
```
|
||||
```bash
|
||||
l2sim-mysql is up-to-date
|
||||
l2sim-oai-nrf is up-to-date
|
||||
l2sim-oai-amf is up-to-date
|
||||
l2sim-oai-smf is up-to-date
|
||||
l2sim-oai-upf is up-to-date
|
||||
l2sim-oai-spgwu is up-to-date
|
||||
l2sim-oai-ext-dn is up-to-date
|
||||
l2sim-oai-gnb is up-to-date
|
||||
Creating l2sim-oai-nr-ue ... done
|
||||
@@ -262,17 +268,18 @@ docker-compose ps -a
|
||||
```bash
|
||||
Name Command State Ports
|
||||
-------------------------------------------------------------------------------------------------
|
||||
l2sim-mysql docker-entrypoint.sh mysqld Up (healthy) 3306/tcp, 33060/tcp
|
||||
l2sim-mysql docker-entrypoint.sh mysqld Up (healthy) 3306/tcp, 33060/tcp
|
||||
l2sim-oai-amf /bin/bash /openair-amf/bin ... Up (healthy) 38412/sctp, 80/tcp, 9090/tcp
|
||||
l2sim-oai-ext-dn /bin/bash -c apt update; ... Up (healthy)
|
||||
l2sim-oai-gnb /opt/oai-gnb/bin/entrypoin ... Up (healthy)
|
||||
l2sim-oai-nr-ue0 /opt/oai-nr-ue/bin/entrypo ... Up (healthy)
|
||||
l2sim-oai-smf /bin/bash /openair-smf/bin ... Up (healthy) 80/tcp, 8805/udp, 9090/tcp
|
||||
l2sim-oai-upf /bin/bash /openair-upf/bin ... Up (healthy) 2152/udp, 8805/udp
|
||||
l2sim-proxy /oai-lte-multi-ue-proxy/bi ... Up (healthy)
|
||||
l2sim-oai-ext-dn /bin/bash -c apt update; ... Up (healthy)
|
||||
l2sim-oai-gnb /opt/oai-gnb/bin/entrypoin ... Up (healthy)
|
||||
l2sim-oai-nr-ue0 /opt/oai-nr-ue/bin/entrypo ... Up (healthy)
|
||||
l2sim-oai-nrf /bin/bash /openair-nrf/bin ... Up (healthy) 80/tcp, 9090/tcp
|
||||
l2sim-oai-smf /bin/bash /openair-smf/bin ... Up (healthy) 80/tcp, 8805/udp, 9090/tcp
|
||||
l2sim-oai-spgwu /openair-spgwu-tiny/bin/en ... Up (healthy) 2152/udp, 8805/udp
|
||||
l2sim-proxy /oai-lte-multi-ue-proxy/bi ... Up (healthy)
|
||||
```
|
||||
```bash
|
||||
docker stats --no-stream --format "table {{.Container}}\t{{.CPUPerc}} {{.MemUsage}}\t{{.MemPerc}}" l2sim-mysql l2sim-oai-amf l2sim-oai-ext-dn l2sim-oai-gnb l2sim-oai-nr-ue0 l2sim-oai-smf l2sim-oai-upf l2sim-proxy
|
||||
docker stats --no-stream --format "table {{.Container}}\t{{.CPUPerc}} {{.MemUsage}}\t{{.MemPerc}}" l2sim-mysql l2sim-oai-amf l2sim-oai-ext-dn l2sim-oai-gnb l2sim-oai-nr-ue0 l2sim-oai-nrf l2sim-oai-smf l2sim-oai-spgwu l2sim-proxy
|
||||
```
|
||||
```bash
|
||||
CONTAINER CPU % MEM USAGE / LIMIT MEM %
|
||||
@@ -281,8 +288,9 @@ l2sim-oai-amf 4.05% 29.49MiB / 62.54GiB 0.05%
|
||||
l2sim-oai-ext-dn 0.00% 31.27MiB / 62.54GiB 0.05%
|
||||
l2sim-oai-gnb 1.29% 1.853GiB / 62.54GiB 2.96%
|
||||
l2sim-oai-nr-ue0 1.43% 350.8MiB / 62.54GiB 0.55%
|
||||
l2sim-oai-nrf 0.21% 9.105MiB / 62.54GiB 0.01%
|
||||
l2sim-oai-smf 3.24% 30.23MiB / 62.54GiB 0.05%
|
||||
l2sim-oai-upf 0.00% 11.78MiB / 62.54GiB 0.02%
|
||||
l2sim-oai-spgwu 0.00% 11.78MiB / 62.54GiB 0.02%
|
||||
l2sim-proxy 6.97% 290.4MiB / 62.54GiB 0.45%
|
||||
```
|
||||
|
||||
@@ -381,17 +389,19 @@ Stopping l2sim-oai-nr-ue2 ... done
|
||||
Stopping l2sim-oai-nr-ue ... done
|
||||
Stopping l2sim-oai-gnb ... done
|
||||
Stopping l2sim-oai-ext-dn ... done
|
||||
Stopping l2sim-oai-upf ... done
|
||||
Stopping l2sim-oai-spgwu ... done
|
||||
Stopping l2sim-oai-smf ... done
|
||||
Stopping l2sim-oai-amf ... done
|
||||
Stopping l2sim-oai-nrf ... done
|
||||
Stopping l2sim-mysql ... done
|
||||
Removing l2sim-oai-nr-ue2 ... done
|
||||
Removing l2sim-oai-nr-ue ... done
|
||||
Removing l2sim-oai-gnb ... done
|
||||
Removing l2sim-oai-ext-dn ... done
|
||||
Removing l2sim-oai-upf ... done
|
||||
Removing l2sim-oai-spgwu ... done
|
||||
Removing l2sim-oai-smf ... done
|
||||
Removing l2sim-oai-amf ... done
|
||||
Removing l2sim-oai-nrf ... done
|
||||
Removing l2sim-mysql ... done
|
||||
Removing network l2sim-oai-public-net
|
||||
Removing network l2sim-oai-traffic-net
|
||||
|
||||
@@ -1,5 +1,14 @@
|
||||
version: '3.8'
|
||||
services:
|
||||
oai-nrf:
|
||||
container_name: "l2sim-oai-nrf"
|
||||
image: oaisoftwarealliance/oai-nrf:v1.5.0
|
||||
environment:
|
||||
- NRF_INTERFACE_NAME_FOR_SBI=eth0
|
||||
- TZ=Europe/Paris
|
||||
networks:
|
||||
public_net:
|
||||
ipv4_address: 192.168.71.130
|
||||
mysql:
|
||||
container_name: "l2sim-mysql"
|
||||
image: mysql:8.0
|
||||
@@ -22,36 +31,108 @@ services:
|
||||
ipv4_address: 192.168.71.131
|
||||
oai-amf:
|
||||
container_name: "l2sim-oai-amf"
|
||||
image: oaisoftwarealliance/oai-amf:v2.0.0
|
||||
image: oaisoftwarealliance/oai-amf:v1.5.0
|
||||
environment:
|
||||
- TZ=Europe/paris
|
||||
volumes:
|
||||
- ../5g_rfsimulator/mini_nonrf_config.yaml:/openair-amf/etc/config.yaml
|
||||
- MCC=208
|
||||
- MNC=99
|
||||
- REGION_ID=128
|
||||
- AMF_SET_ID=1
|
||||
- SERVED_GUAMI_MCC_0=208
|
||||
- SERVED_GUAMI_MNC_0=99
|
||||
- SERVED_GUAMI_REGION_ID_0=128
|
||||
- SERVED_GUAMI_AMF_SET_ID_0=1
|
||||
- SERVED_GUAMI_MCC_1=460
|
||||
- SERVED_GUAMI_MNC_1=11
|
||||
- SERVED_GUAMI_REGION_ID_1=10
|
||||
- SERVED_GUAMI_AMF_SET_ID_1=1
|
||||
- PLMN_SUPPORT_MCC=208
|
||||
- PLMN_SUPPORT_MNC=99
|
||||
- PLMN_SUPPORT_TAC=0x0001
|
||||
# Only one slice is defined (1, 0xFFFFFF).
|
||||
- SST_0=1
|
||||
- AMF_INTERFACE_NAME_FOR_NGAP=eth0
|
||||
- AMF_INTERFACE_NAME_FOR_N11=eth0
|
||||
# One single SMF instance
|
||||
- SMF_INSTANCE_ID_0=1
|
||||
- SMF_FQDN_0=oai-smf
|
||||
- SMF_IPV4_ADDR_0=192.168.71.133
|
||||
- SELECTED_0=true
|
||||
# mysql definition in AMF is mandatory in mini deployment.
|
||||
- MYSQL_SERVER=192.168.71.131
|
||||
- MYSQL_USER=root
|
||||
- MYSQL_PASS=linux
|
||||
- MYSQL_DB=oai_db
|
||||
# NF registration
|
||||
- NRF_IPV4_ADDRESS=192.168.71.130
|
||||
- NRF_FQDN=oai-nrf
|
||||
- NF_REGISTRATION=yes
|
||||
- SMF_SELECTION=yes
|
||||
- USE_FQDN_DNS=yes
|
||||
- USE_HTTP2=no
|
||||
depends_on:
|
||||
- oai-nrf
|
||||
- mysql
|
||||
networks:
|
||||
public_net:
|
||||
ipv4_address: 192.168.71.132
|
||||
oai-smf:
|
||||
container_name: "l2sim-oai-smf"
|
||||
image: oaisoftwarealliance/oai-smf:v2.0.0
|
||||
image: oaisoftwarealliance/oai-smf:v1.5.0
|
||||
environment:
|
||||
- TZ=Europe/Paris
|
||||
volumes:
|
||||
- ../5g_rfsimulator/mini_nonrf_config.yaml:/openair-smf/etc/config.yaml
|
||||
- SMF_INTERFACE_NAME_FOR_N4=eth0
|
||||
- SMF_INTERFACE_NAME_FOR_SBI=eth0
|
||||
- DEFAULT_DNS_IPV4_ADDRESS=172.21.3.100
|
||||
- DEFAULT_DNS_SEC_IPV4_ADDRESS=4.4.4.4
|
||||
- AMF_IPV4_ADDRESS=192.168.71.132
|
||||
- AMF_FQDN=oai-amf
|
||||
- UPF_IPV4_ADDRESS=192.168.71.134
|
||||
- UPF_FQDN_0=oai-spgwu
|
||||
- NRF_IPV4_ADDRESS=192.168.71.130
|
||||
- NRF_FQDN=oai-nrf
|
||||
- REGISTER_NRF=yes
|
||||
- DISCOVER_UPF=yes
|
||||
- USE_FQDN_DNS=yes
|
||||
- USE_LOCAL_SUBSCRIPTION_INFO=yes
|
||||
- UE_MTU=1500
|
||||
# Only one slice is defined (1, 0xFFFFFF)
|
||||
- DNN_NI0=oai
|
||||
- TYPE0=IPv4
|
||||
- DNN_RANGE0=12.1.1.2 - 12.1.1.127
|
||||
- NSSAI_SST0=1
|
||||
- SESSION_AMBR_UL0=200Mbps
|
||||
- SESSION_AMBR_DL0=400Mbps
|
||||
- DEFAULT_CSCF_IPV4_ADDRESS=127.0.0.1
|
||||
- ENABLE_USAGE_REPORTING=no
|
||||
depends_on:
|
||||
- oai-nrf
|
||||
- oai-amf
|
||||
networks:
|
||||
public_net:
|
||||
ipv4_address: 192.168.71.133
|
||||
oai-upf:
|
||||
container_name: "l2sim-oai-upf"
|
||||
image: oaisoftwarealliance/oai-upf:v2.0.0
|
||||
oai-spgwu:
|
||||
container_name: "l2sim-oai-spgwu"
|
||||
image: oaisoftwarealliance/oai-spgwu-tiny:v1.5.0
|
||||
environment:
|
||||
- TZ=Europe/Paris
|
||||
volumes:
|
||||
- ../5g_rfsimulator/mini_nonrf_config.yaml:/openair-upf/etc/config.yaml
|
||||
- SGW_INTERFACE_NAME_FOR_S1U_S12_S4_UP=eth0
|
||||
- SGW_INTERFACE_NAME_FOR_SX=eth0
|
||||
- PGW_INTERFACE_NAME_FOR_SGI=eth0
|
||||
- NETWORK_UE_NAT_OPTION=yes
|
||||
- NETWORK_UE_IP=12.1.1.0/24
|
||||
- ENABLE_5G_FEATURES=yes
|
||||
- REGISTER_NRF=yes
|
||||
- USE_FQDN_NRF=yes
|
||||
- UPF_FQDN_5G=oai-spgwu
|
||||
- NRF_IPV4_ADDRESS=192.168.71.130
|
||||
- NRF_FQDN=oai-nrf
|
||||
# Only one slice is defined (1, 0xFFFFFF)
|
||||
- NSSAI_SST_0=1
|
||||
- NSSAI_SD_0=0xffffff
|
||||
- DNN_0=oai
|
||||
depends_on:
|
||||
- oai-nrf
|
||||
- oai-smf
|
||||
cap_add:
|
||||
- NET_ADMIN
|
||||
@@ -72,7 +153,7 @@ services:
|
||||
"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
|
||||
- oai-spgwu
|
||||
networks:
|
||||
traffic_net:
|
||||
ipv4_address: 192.168.72.135
|
||||
@@ -89,9 +170,8 @@ services:
|
||||
environment:
|
||||
TZ: Europe/Paris
|
||||
USE_ADDITIONAL_OPTIONS: --sa --nfapi VNF --emulate-l1 --log_config.global_log_options level,time,thread_id,nocolor
|
||||
ASAN_OPTIONS: detect_leaks=0
|
||||
depends_on:
|
||||
- oai-upf
|
||||
- oai-spgwu
|
||||
- oai-amf
|
||||
volumes:
|
||||
- ../../conf_files/gnb.sa.band78.106prb.l2sim.conf:/opt/oai-gnb/etc/gnb.conf
|
||||
@@ -126,7 +206,6 @@ services:
|
||||
TZ: Europe/Paris
|
||||
OPENAIR_DIR: /opt/oai-nr-ue
|
||||
USE_ADDITIONAL_OPTIONS: --nfapi STANDALONE_PNF --node-number 2 --sa --emulate-l1 --log_config.global_log_options level,time,thread_id,nocolor
|
||||
ASAN_OPTIONS: detect_leaks=0
|
||||
volumes:
|
||||
- ../../conf_files/nrue.band78.106prb.l2sim.conf:/opt/oai-nr-ue/etc/nr-ue.conf
|
||||
- ../../../openair1/SIMULATION/LTE_PHY/BLER_SIMULATIONS/AWGN/AWGN_results:/opt/oai-nr-ue/openair1/SIMULATION/LTE_PHY/BLER_SIMULATIONS/AWGN/AWGN_results
|
||||
|
||||
@@ -37,9 +37,10 @@ Now pull images.
|
||||
|
||||
```bash
|
||||
$ docker pull mysql:8.0
|
||||
$ docker pull oaisoftwarealliance/oai-amf:v2.0.0
|
||||
$ docker pull oaisoftwarealliance/oai-smf:v2.0.0
|
||||
$ docker pull oaisoftwarealliance/oai-upf:v2.0.0
|
||||
$ docker pull oaisoftwarealliance/oai-amf:v1.5.0
|
||||
$ docker pull oaisoftwarealliance/oai-nrf:v1.5.0
|
||||
$ docker pull oaisoftwarealliance/oai-smf:v1.5.0
|
||||
$ docker pull oaisoftwarealliance/oai-spgwu-tiny:v1.5.0
|
||||
$ docker pull oaisoftwarealliance/trf-gen-cn5g:focal
|
||||
|
||||
$ docker pull oaisoftwarealliance/oai-gnb:develop
|
||||
@@ -52,7 +53,7 @@ $ docker logout
|
||||
|
||||
**CAUTION: 2023/01/27 with the release `v1.5.0` of the `CN5G`, the previous version was not compatible any-more.**
|
||||
|
||||
**This new version is working only with the `v2.0.0` of the `CN5G`.**
|
||||
**This new version is working only with the `v1.5.0` of the `CN5G`.**
|
||||
|
||||
# 2. Deploy containers #
|
||||
|
||||
@@ -64,18 +65,18 @@ $ 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 and DU components, the following commands **SHALL** be run from the `ci-scripts/yaml_files/5g_f1_rfsimulator` folder.
|
||||
|
||||
## 2.1. Deploy OAI 5G Core Network ##
|
||||
|
||||
```bash
|
||||
$ cd ci-scripts/yaml_files/5g_rfsimulator
|
||||
$ docker-compose up -d mysql oai-amf oai-smf oai-upf oai-ext-dn
|
||||
$ docker-compose up -d mysql oai-nrf oai-amf oai-smf oai-spgwu oai-ext-dn
|
||||
Creating network "rfsim5g-oai-public-net" with driver "bridge"
|
||||
Creating network "rfsim5g-oai-traffic_net-net" with driver "bridge"
|
||||
Creating rfsim5g-oai-nrf ... done
|
||||
Creating rfsim5g-mysql ... done
|
||||
Creating rfsim5g-oai-upf ... done
|
||||
Creating rfsim5g-oai-spgwu ... done
|
||||
Creating rfsim5g-oai-amf ... done
|
||||
Creating rfsim5g-oai-smf ... done
|
||||
Creating rfsim5g-oai-ext-dn ... done
|
||||
@@ -85,19 +86,20 @@ Wait for a bit.
|
||||
|
||||
```bash
|
||||
$ docker-compose ps -a
|
||||
Name Command State Ports
|
||||
Name Command State Ports
|
||||
-------------------------------------------------------------------------------------------------
|
||||
rfsim5g-mysql docker-entrypoint.sh mysqld Up (healthy) 3306/tcp, 33060/tcp
|
||||
rfsim5g-mysql docker-entrypoint.sh mysqld Up (healthy) 3306/tcp, 33060/tcp
|
||||
rfsim5g-oai-amf /bin/bash /openair-amf/bin ... Up (healthy) 38412/sctp, 80/tcp, 9090/tcp
|
||||
rfsim5g-oai-ext-dn /bin/bash -c apt update; ... Up (healthy)
|
||||
rfsim5g-oai-smf /bin/bash -c /openair-smf/ ... Up (healthy) 80/tcp, 8805/udp, 9090/tcp
|
||||
rfsim5g-oai-upf /bin/bash -c /openair-upf/ ... Up (healthy) 2152/udp, 8805/udp
|
||||
rfsim5g-oai-ext-dn /bin/bash -c apt update; ... Up (healthy)
|
||||
rfsim5g-oai-nrf /bin/bash /openair-nrf/bin ... Up (healthy) 80/tcp, 9090/tcp
|
||||
rfsim5g-oai-smf /bin/bash -c /openair-smf/ ... Up (healthy) 80/tcp, 8805/udp, 9090/tcp
|
||||
rfsim5g-oai-spgwu /openair-spgwu-tiny/bin/en ... Up (healthy) 2152/udp, 8805/udp
|
||||
```
|
||||
|
||||
At this point, you can prepare a capture on the newly-created public docker bridges:
|
||||
|
||||
```bash
|
||||
$ ifconfig
|
||||
$ ifconfig
|
||||
...
|
||||
rfsim5g-public: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
|
||||
inet 192.168.71.129 netmask 255.255.255.192 broadcast 192.168.71.191
|
||||
@@ -128,7 +130,8 @@ The gNB can be deployed either in monolithic mode, or in CU/DU split mode.
|
||||
|
||||
```bash
|
||||
$ docker-compose up -d oai-gnb
|
||||
rfsim5g-oai-upf is up-to-date
|
||||
rfsim5g-oai-nrf is up-to-date
|
||||
rfsim5g-oai-spgwu is up-to-date
|
||||
rfsim5g-oai-ext-dn is up-to-date
|
||||
Creating rfsim5g-oai-gnb ... done
|
||||
```
|
||||
@@ -146,14 +149,15 @@ Wait for a bit.
|
||||
|
||||
```bash
|
||||
$ docker-compose ps -a
|
||||
Name Command State Ports
|
||||
Name Command State Ports
|
||||
-------------------------------------------------------------------------------------------------
|
||||
rfsim5g-mysql docker-entrypoint.sh mysqld Up (healthy) 3306/tcp, 33060/tcp
|
||||
rfsim5g-mysql docker-entrypoint.sh mysqld Up (healthy) 3306/tcp, 33060/tcp
|
||||
rfsim5g-oai-amf /bin/bash /openair-amf/bin ... Up (healthy) 38412/sctp, 80/tcp, 9090/tcp
|
||||
rfsim5g-oai-ext-dn /bin/bash -c apt update; ... Up (healthy)
|
||||
rfsim5g-oai-gnb /opt/oai-gnb/bin/entrypoin ... Up (healthy)
|
||||
rfsim5g-oai-smf /bin/bash -c /openair-smf/ ... Up (healthy) 80/tcp, 8805/udp, 9090/tcp
|
||||
rfsim5g-oai-upf /bin/bash -c /openair-upf/ ... Up (healthy) 2152/udp, 8805/udp
|
||||
rfsim5g-oai-ext-dn /bin/bash -c apt update; ... Up (healthy)
|
||||
rfsim5g-oai-gnb /opt/oai-gnb/bin/entrypoin ... Up (healthy)
|
||||
rfsim5g-oai-nrf /bin/bash /openair-nrf/bin ... Up (healthy) 80/tcp, 9090/tcp
|
||||
rfsim5g-oai-smf /bin/bash -c /openair-smf/ ... Up (healthy) 80/tcp, 8805/udp, 9090/tcp
|
||||
rfsim5g-oai-spgwu /openair-spgwu-tiny/bin/en ... Up (healthy) 2152/udp, 8805/udp
|
||||
```
|
||||
|
||||
You can verify that the `gNB` is connected with the `AMF`:
|
||||
@@ -173,9 +177,10 @@ $ docker logs rfsim5g-oai-amf
|
||||
```bash
|
||||
$ docker-compose up -d oai-nr-ue
|
||||
rfsim5g-mysql is up-to-date
|
||||
rfsim5g-oai-nrf is up-to-date
|
||||
rfsim5g-oai-amf is up-to-date
|
||||
rfsim5g-oai-smf is up-to-date
|
||||
rfsim5g-oai-upf is up-to-date
|
||||
rfsim5g-oai-spgwu is up-to-date
|
||||
rfsim5g-oai-ext-dn is up-to-date
|
||||
rfsim5g-oai-gnb is up-to-date
|
||||
Creating rfsim5g-oai-nr-ue ... done
|
||||
@@ -185,22 +190,23 @@ Wait for a bit.
|
||||
|
||||
```bash
|
||||
$ docker-compose ps -a
|
||||
Name Command State Ports
|
||||
Name Command State Ports
|
||||
-------------------------------------------------------------------------------------------------
|
||||
rfsim5g-mysql docker-entrypoint.sh mysqld Up (healthy) 3306/tcp, 33060/tcp
|
||||
rfsim5g-mysql docker-entrypoint.sh mysqld Up (healthy) 3306/tcp, 33060/tcp
|
||||
rfsim5g-oai-amf /bin/bash /openair-amf/bin ... Up (healthy) 38412/sctp, 80/tcp, 9090/tcp
|
||||
rfsim5g-oai-ext-dn /bin/bash -c apt update; ... Up (healthy)
|
||||
rfsim5g-oai-gnb /opt/oai-gnb/bin/entrypoin ... Up (healthy)
|
||||
rfsim5g-oai-nr-ue /opt/oai-nr-ue/bin/entrypo ... Up (healthy)
|
||||
rfsim5g-oai-smf /bin/bash -c /openair-smf/ ... Up (healthy) 80/tcp, 8805/udp, 9090/tcp
|
||||
rfsim5g-oai-upf /bin/bash -c /openair-upf/ ... Up (healthy) 2152/udp, 8805/udp
|
||||
rfsim5g-oai-ext-dn /bin/bash -c apt update; ... Up (healthy)
|
||||
rfsim5g-oai-gnb /opt/oai-gnb/bin/entrypoin ... Up (healthy)
|
||||
rfsim5g-oai-nr-ue /opt/oai-nr-ue/bin/entrypo ... Up (healthy)
|
||||
rfsim5g-oai-nrf /bin/bash /openair-nrf/bin ... Up (healthy) 80/tcp, 9090/tcp
|
||||
rfsim5g-oai-smf /bin/bash -c /openair-smf/ ... Up (healthy) 80/tcp, 8805/udp, 9090/tcp
|
||||
rfsim5g-oai-spgwu /openair-spgwu-tiny/bin/en ... Up (healthy) 2152/udp, 8805/udp
|
||||
```
|
||||
|
||||
Making sure the OAI UE is connected:
|
||||
|
||||
```bash
|
||||
$ docker exec -it rfsim5g-oai-nr-ue /bin/bash
|
||||
root@bb4d400a832d:/opt/oai-nr-ue# ifconfig
|
||||
root@bb4d400a832d:/opt/oai-nr-ue# ifconfig
|
||||
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
|
||||
inet 192.168.71.150 netmask 255.255.255.192 broadcast 192.168.71.191
|
||||
ether 02:42:c0:a8:47:89 txqueuelen 0 (Ethernet)
|
||||
@@ -259,9 +265,10 @@ Create the entry for the second UE in `docker-compose.yaml` file as follows:
|
||||
```bash
|
||||
$ docker-compose up -d oai-nr-ue2
|
||||
rfsim5g-mysql is up-to-date
|
||||
rfsim5g-oai-nrf is up-to-date
|
||||
rfsim5g-oai-amf is up-to-date
|
||||
rfsim5g-oai-smf is up-to-date
|
||||
rfsim5g-oai-upf is up-to-date
|
||||
rfsim5g-oai-spgwu is up-to-date
|
||||
rfsim5g-oai-ext-dn is up-to-date
|
||||
rfsim5g-oai-gnb is up-to-date
|
||||
Creating rfsim5g-oai-nr-ue2 ... done
|
||||
@@ -271,7 +278,7 @@ Wait for a bit.
|
||||
|
||||
```bash
|
||||
$ docker-compose ps -a
|
||||
Name Command State Ports
|
||||
Name Command State Ports
|
||||
-------------------------------------------------------------------------------------------------
|
||||
rfsim5g-mysql docker-entrypoint.sh mysqld Up (healthy) 3306/tcp, 33060/tcp
|
||||
rfsim5g-oai-amf /bin/bash /openair-amf/bin ... Up (healthy) 38412/sctp, 80/tcp, 9090/tcp
|
||||
@@ -279,15 +286,16 @@ rfsim5g-oai-ext-dn /bin/bash -c apt update; ... Up (healthy)
|
||||
rfsim5g-oai-gnb /opt/oai-gnb/bin/entrypoin ... Up (healthy)
|
||||
rfsim5g-oai-nr-ue /opt/oai-nr-ue/bin/entrypo ... Up (healthy)
|
||||
rfsim5g-oai-nr-ue2 /opt/oai-nr-ue/bin/entrypo ... Up (healthy)
|
||||
rfsim5g-oai-nrf /bin/bash /openair-nrf/bin ... Up (healthy) 80/tcp, 9090/tcp
|
||||
rfsim5g-oai-smf /bin/bash /openair-smf/bin ... Up (healthy) 80/tcp, 8805/udp, 9090/tcp
|
||||
rfsim5g-oai-upf /bin/bash /openair-upf/bin ... Up (healthy) 2152/udp, 8805/udp
|
||||
rfsim5g-oai-spgwu /openair-spgwu-tiny/bin/en ... Up (healthy) 2152/udp, 8805/udp
|
||||
```
|
||||
|
||||
Making sure the Second OAI UE is connected:
|
||||
|
||||
```bash
|
||||
$ docker exec -it rfsim5g-oai-nr-ue2 /bin/bash
|
||||
root@bb4d400a832d:/opt/oai-nr-ue# ifconfig
|
||||
root@bb4d400a832d:/opt/oai-nr-ue# ifconfig
|
||||
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
|
||||
inet 192.168.71.151 netmask 255.255.255.192 broadcast 192.168.71.191
|
||||
ether 02:42:c0:a8:47:8a txqueuelen 0 (Ethernet)
|
||||
@@ -449,17 +457,19 @@ Stopping rfsim5g-oai-nr-ue2 ... done
|
||||
Stopping rfsim5g-oai-nr-ue ... done
|
||||
Stopping rfsim5g-oai-gnb ... done
|
||||
Stopping rfsim5g-oai-ext-dn ... done
|
||||
Stopping rfsim5g-oai-upf ... done
|
||||
Stopping rfsim5g-oai-spgwu ... done
|
||||
Stopping rfsim5g-oai-smf ... done
|
||||
Stopping rfsim5g-oai-amf ... done
|
||||
Stopping rfsim5g-oai-nrf ... done
|
||||
Stopping rfsim5g-mysql ... done
|
||||
Removing rfsim5g-oai-nr-ue2 ... done
|
||||
Removing rfsim5g-oai-nr-ue ... done
|
||||
Removing rfsim5g-oai-gnb ... done
|
||||
Removing rfsim5g-oai-ext-dn ... done
|
||||
Removing rfsim5g-oai-upf ... done
|
||||
Removing rfsim5g-oai-spgwu ... done
|
||||
Removing rfsim5g-oai-smf ... done
|
||||
Removing rfsim5g-oai-amf ... done
|
||||
Removing rfsim5g-oai-nrf ... done
|
||||
Removing rfsim5g-mysql ... done
|
||||
Removing network rfsim5g-oai-public-net
|
||||
Removing network rfsim5g-oai-traffic-net
|
||||
@@ -511,21 +521,24 @@ docker-compose entry mount another config, or add `--uicc0.imsi
|
||||
feature of the configuration module to overwrite any configuration option in
|
||||
the config file on the command line.
|
||||
|
||||
We are also using a dedicated `oai-smf.conf` for the `SMF` container: the `oai` DNN shall match the one in the NR-UE section of `docker-compose.yaml` (`DNN: oai`).
|
||||
|
||||
## 5.2. Making the gNB connect to the core network ##
|
||||
|
||||
Mainly you need to match the PLMN in `gNB`, `AMF` and `UPF` parameters in the `mini_nonrf_config.yaml`:
|
||||
Mainly you need to match the PLMN in `gNB`, `AMF` and `SPGWU` parameters:
|
||||
|
||||
```yaml
|
||||
plmn_support_list:
|
||||
- mcc: 208
|
||||
mnc: 99
|
||||
tac: 0x0001
|
||||
nssai:
|
||||
- *embb_slice1
|
||||
...
|
||||
snssais:
|
||||
- &embb_slice1
|
||||
sst: 1
|
||||
```
|
||||
* `AMF`
|
||||
- `MCC=208`
|
||||
- `MNC=99`
|
||||
- `PLMN_SUPPORT_TAC=0x0001`
|
||||
- ...
|
||||
* `SPGWU`
|
||||
- `MCC=208`
|
||||
- `MNC=99`
|
||||
- `TAC=1`
|
||||
* `gNB`
|
||||
- `MCC: '208'`
|
||||
- `MNC: '99'`
|
||||
- `TAC: 1`
|
||||
|
||||
The `ST` and `SD` values shall also match.
|
||||
|
||||
@@ -1,5 +1,14 @@
|
||||
version: '3.8'
|
||||
services:
|
||||
oai-nrf:
|
||||
container_name: "rfsim5g-oai-nrf"
|
||||
image: oaisoftwarealliance/oai-nrf:v1.5.0
|
||||
environment:
|
||||
- NRF_INTERFACE_NAME_FOR_SBI=eth0
|
||||
- TZ=Europe/Paris
|
||||
networks:
|
||||
public_net:
|
||||
ipv4_address: 192.168.71.130
|
||||
mysql:
|
||||
container_name: "rfsim5g-mysql"
|
||||
image: mysql:8.0
|
||||
@@ -22,36 +31,108 @@ services:
|
||||
ipv4_address: 192.168.71.131
|
||||
oai-amf:
|
||||
container_name: "rfsim5g-oai-amf"
|
||||
image: oaisoftwarealliance/oai-amf:v2.0.0
|
||||
image: oaisoftwarealliance/oai-amf:v1.5.0
|
||||
environment:
|
||||
- TZ=Europe/paris
|
||||
volumes:
|
||||
- ./mini_nonrf_config.yaml:/openair-amf/etc/config.yaml
|
||||
- MCC=208
|
||||
- MNC=99
|
||||
- REGION_ID=128
|
||||
- AMF_SET_ID=1
|
||||
- SERVED_GUAMI_MCC_0=208
|
||||
- SERVED_GUAMI_MNC_0=99
|
||||
- SERVED_GUAMI_REGION_ID_0=128
|
||||
- SERVED_GUAMI_AMF_SET_ID_0=1
|
||||
- SERVED_GUAMI_MCC_1=460
|
||||
- SERVED_GUAMI_MNC_1=11
|
||||
- SERVED_GUAMI_REGION_ID_1=10
|
||||
- SERVED_GUAMI_AMF_SET_ID_1=1
|
||||
- PLMN_SUPPORT_MCC=208
|
||||
- PLMN_SUPPORT_MNC=99
|
||||
- PLMN_SUPPORT_TAC=0x0001
|
||||
# Only one slice is defined (1, 0xFFFFFF).
|
||||
- SST_0=1
|
||||
- AMF_INTERFACE_NAME_FOR_NGAP=eth0
|
||||
- AMF_INTERFACE_NAME_FOR_N11=eth0
|
||||
# One single SMF instance
|
||||
- SMF_INSTANCE_ID_0=1
|
||||
- SMF_FQDN_0=oai-smf
|
||||
- SMF_IPV4_ADDR_0=192.168.71.133
|
||||
- SELECTED_0=true
|
||||
# mysql definition in AMF is mandatory in mini deployment.
|
||||
- MYSQL_SERVER=192.168.71.131
|
||||
- MYSQL_USER=root
|
||||
- MYSQL_PASS=linux
|
||||
- MYSQL_DB=oai_db
|
||||
# NF registration
|
||||
- NRF_IPV4_ADDRESS=192.168.71.130
|
||||
- NRF_FQDN=oai-nrf
|
||||
- NF_REGISTRATION=yes
|
||||
- SMF_SELECTION=yes
|
||||
- USE_FQDN_DNS=yes
|
||||
- USE_HTTP2=no
|
||||
depends_on:
|
||||
- oai-nrf
|
||||
- mysql
|
||||
networks:
|
||||
public_net:
|
||||
ipv4_address: 192.168.71.132
|
||||
oai-smf:
|
||||
container_name: "rfsim5g-oai-smf"
|
||||
image: oaisoftwarealliance/oai-smf:v2.0.0
|
||||
image: oaisoftwarealliance/oai-smf:v1.5.0
|
||||
environment:
|
||||
- TZ=Europe/Paris
|
||||
volumes:
|
||||
- ./mini_nonrf_config.yaml:/openair-smf/etc/config.yaml
|
||||
- SMF_INTERFACE_NAME_FOR_N4=eth0
|
||||
- SMF_INTERFACE_NAME_FOR_SBI=eth0
|
||||
- DEFAULT_DNS_IPV4_ADDRESS=172.21.3.100
|
||||
- DEFAULT_DNS_SEC_IPV4_ADDRESS=4.4.4.4
|
||||
- AMF_IPV4_ADDRESS=192.168.71.132
|
||||
- AMF_FQDN=oai-amf
|
||||
- UPF_IPV4_ADDRESS=192.168.71.134
|
||||
- UPF_FQDN_0=oai-spgwu
|
||||
- NRF_IPV4_ADDRESS=192.168.71.130
|
||||
- NRF_FQDN=oai-nrf
|
||||
- REGISTER_NRF=yes
|
||||
- DISCOVER_UPF=yes
|
||||
- USE_FQDN_DNS=yes
|
||||
- USE_LOCAL_SUBSCRIPTION_INFO=yes
|
||||
- UE_MTU=1500
|
||||
# Only one slice is defined (1, 0xFFFFFF)
|
||||
- DNN_NI0=oai
|
||||
- TYPE0=IPv4
|
||||
- DNN_RANGE0=12.1.1.2 - 12.1.1.127
|
||||
- NSSAI_SST0=1
|
||||
- SESSION_AMBR_UL0=200Mbps
|
||||
- SESSION_AMBR_DL0=400Mbps
|
||||
- DEFAULT_CSCF_IPV4_ADDRESS=127.0.0.1
|
||||
- ENABLE_USAGE_REPORTING=no
|
||||
depends_on:
|
||||
- oai-nrf
|
||||
- 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
|
||||
oai-spgwu:
|
||||
container_name: "rfsim5g-oai-spgwu"
|
||||
image: oaisoftwarealliance/oai-spgwu-tiny:v1.5.0
|
||||
environment:
|
||||
- TZ=Europe/Paris
|
||||
volumes:
|
||||
- ./mini_nonrf_config.yaml:/openair-upf/etc/config.yaml
|
||||
- SGW_INTERFACE_NAME_FOR_S1U_S12_S4_UP=eth0
|
||||
- SGW_INTERFACE_NAME_FOR_SX=eth0
|
||||
- PGW_INTERFACE_NAME_FOR_SGI=eth0
|
||||
- NETWORK_UE_NAT_OPTION=yes
|
||||
- NETWORK_UE_IP=12.1.1.0/24
|
||||
- ENABLE_5G_FEATURES=yes
|
||||
- REGISTER_NRF=yes
|
||||
- USE_FQDN_NRF=yes
|
||||
- UPF_FQDN_5G=oai-spgwu
|
||||
- NRF_IPV4_ADDRESS=192.168.71.130
|
||||
- NRF_FQDN=oai-nrf
|
||||
# Only one slice is defined (1, 0xFFFFFF)
|
||||
- NSSAI_SST_0=1
|
||||
- NSSAI_SD_0=0xffffff
|
||||
- DNN_0=oai
|
||||
depends_on:
|
||||
- oai-nrf
|
||||
- oai-smf
|
||||
cap_add:
|
||||
- NET_ADMIN
|
||||
@@ -72,7 +153,7 @@ services:
|
||||
"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
|
||||
- oai-spgwu
|
||||
networks:
|
||||
traffic_net:
|
||||
ipv4_address: 192.168.72.135
|
||||
@@ -87,7 +168,6 @@ services:
|
||||
container_name: rfsim5g-oai-gnb
|
||||
environment:
|
||||
USE_ADDITIONAL_OPTIONS: --sa -E --rfsim --log_config.global_log_options level,nocolor,time
|
||||
ASAN_OPTIONS: detect_leaks=0
|
||||
depends_on:
|
||||
- oai-ext-dn
|
||||
networks:
|
||||
|
||||
@@ -1,189 +0,0 @@
|
||||
################################################################################
|
||||
# Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
# contributor license agreements. See the NOTICE file distributed with
|
||||
# this work for additional information regarding copyright ownership.
|
||||
# The OpenAirInterface Software Alliance licenses this file to You under
|
||||
# the OAI Public License, Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.openairinterface.org/?page_id=698
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#-------------------------------------------------------------------------------
|
||||
# For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
# contact@openairinterface.org
|
||||
################################################################################
|
||||
|
||||
# OAI CN Configuration File
|
||||
### This file can be used by all OAI NFs
|
||||
### Some fields are specific to an NF and will be ignored by other NFs
|
||||
|
||||
## NOTE ON YAML ANCHORS ##
|
||||
# We use YAML anchors to ease the configuration and to avoid duplicating parts of the configuration.
|
||||
# This is especially true for the SNSSAIs, as we have to define them for multiple NFs.
|
||||
# Please note that the use of anchors is not mandatory, and you can define the SNSSAI in each NF yourself.
|
||||
# You can read more about anchors here: https://yaml.org/spec/1.2.2/#anchors-and-aliases
|
||||
|
||||
############# Common configuration
|
||||
|
||||
# Log level for all the NFs
|
||||
log_level:
|
||||
general: debug
|
||||
|
||||
# If you enable registration, the other NFs will use the NRF discovery mechanism
|
||||
register_nf:
|
||||
general: no
|
||||
|
||||
http_version: 1
|
||||
|
||||
############## SBI Interfaces
|
||||
### Each NF takes its local SBI interfaces and remote interfaces from here, unless it gets them using NRF discovery mechanisms
|
||||
nfs:
|
||||
amf:
|
||||
host: oai-amf
|
||||
sbi:
|
||||
port: 80
|
||||
api_version: v1
|
||||
interface_name: eth0
|
||||
n2:
|
||||
interface_name: eth0
|
||||
port: 38412
|
||||
smf:
|
||||
host: oai-smf
|
||||
sbi:
|
||||
port: 80
|
||||
api_version: v1
|
||||
interface_name: eth0
|
||||
n4:
|
||||
interface_name: eth0
|
||||
port: 8805
|
||||
|
||||
upf:
|
||||
host: oai-upf
|
||||
sbi:
|
||||
port: 80
|
||||
api_version: v1
|
||||
interface_name: eth0
|
||||
n3:
|
||||
interface_name: eth0
|
||||
port: 2152
|
||||
n4:
|
||||
interface_name: eth0
|
||||
port: 8805
|
||||
n6:
|
||||
interface_name: eth1
|
||||
n9:
|
||||
interface_name: eth0
|
||||
port: 2152
|
||||
|
||||
#### Common for UDR and AMF
|
||||
database:
|
||||
host: mysql
|
||||
user: test
|
||||
type: mysql
|
||||
password: test
|
||||
database_name: oai_db
|
||||
generate_random: true
|
||||
connection_timeout: 300 # seconds
|
||||
|
||||
## general single_nssai configuration
|
||||
## Defines YAML anchors, which are reused in the config file
|
||||
snssais:
|
||||
- &embb_slice1
|
||||
sst: 1
|
||||
|
||||
############## NF-specific configuration
|
||||
amf:
|
||||
amf_name: "OAI-AMF"
|
||||
# This really depends on if we want to keep the "mini" version or not
|
||||
support_features_options:
|
||||
enable_simple_scenario: yes # "no" by default with the normal deployment scenarios with AMF/SMF/UPF/AUSF/UDM/UDR/NRF.
|
||||
# set it to "yes" to use with the minimalist deployment scenario (including only AMF/SMF/UPF) by using the internal AUSF/UDM implemented inside AMF.
|
||||
# There's no NRF in this scenario, SMF info is taken from "nfs" section.
|
||||
enable_nssf: no
|
||||
enable_smf_selection: no
|
||||
relative_capacity: 30
|
||||
statistics_timer_interval: 20 # in seconds
|
||||
emergency_support: false
|
||||
served_guami_list:
|
||||
- mcc: 208
|
||||
mnc: 99
|
||||
amf_region_id: 01
|
||||
amf_set_id: 001
|
||||
amf_pointer: 01
|
||||
plmn_support_list:
|
||||
- mcc: 208
|
||||
mnc: 99
|
||||
tac: 0x0001
|
||||
nssai:
|
||||
- *embb_slice1
|
||||
supported_integrity_algorithms:
|
||||
- "NIA0"
|
||||
- "NIA1"
|
||||
- "NIA2"
|
||||
supported_encryption_algorithms:
|
||||
- "NEA0"
|
||||
- "NEA1"
|
||||
- "NEA2"
|
||||
|
||||
smf:
|
||||
ue_mtu: 1500
|
||||
support_features:
|
||||
use_local_subscription_info: yes # Use infos from local_subscription_info or from UDM
|
||||
use_local_pcc_rules: yes # Use infos from local_pcc_rules or from PCF
|
||||
upfs:
|
||||
- host: oai-upf
|
||||
port: 8805
|
||||
config:
|
||||
enable_usage_reporting: no
|
||||
# follows UPFInfo from 3GPP TS 29.510, currently only these values from interfaceUpfInfoList are supported
|
||||
upf_info:
|
||||
interfaceUpfInfoList:
|
||||
- interfaceType: "N3"
|
||||
networkInstance: "access.oai.org"
|
||||
- interfaceType: "N6"
|
||||
networkInstance: "core.oai.org"
|
||||
ue_dns:
|
||||
primary_ipv4: "172.21.3.100"
|
||||
primary_ipv6: "2001:4860:4860::8888"
|
||||
secondary_ipv4: "8.8.8.8"
|
||||
secondary_ipv6: "2001:4860:4860::8888"
|
||||
ims:
|
||||
pcscf_ipv4: "127.0.0.1"
|
||||
pcscf_ipv6: "fe80::7915:f408:1787:db8b"
|
||||
# the DNN you configure here should be configured in "dnns"
|
||||
# follows the SmfInfo datatype from 3GPP TS 29.510
|
||||
smf_info:
|
||||
sNssaiSmfInfoList:
|
||||
- sNssai: *embb_slice1
|
||||
dnnSmfInfoList:
|
||||
- dnn: "oai"
|
||||
local_subscription_infos:
|
||||
- single_nssai: *embb_slice1
|
||||
dnn: "oai"
|
||||
qos_profile:
|
||||
5qi: 9
|
||||
session_ambr_ul: "200Mbps"
|
||||
session_ambr_dl: "400Mbps"
|
||||
|
||||
upf:
|
||||
support_features:
|
||||
enable_bpf_datapath: no # If "on": BPF is used as datapath else simpleswitch is used, DEFAULT= off
|
||||
enable_snat: yes # If "on": Source natting is done for UE, DEFAULT= off
|
||||
remote_n6_gw: localhost # Dummy host since simple-switch does not use N6 GW
|
||||
upf_info:
|
||||
sNssaiUpfInfoList:
|
||||
- sNssai: *embb_slice1
|
||||
dnnUpfInfoList:
|
||||
- dnn: "oai"
|
||||
|
||||
## DNN configuration
|
||||
dnns:
|
||||
- dnn: "oai"
|
||||
pdu_session_type: "IPV4"
|
||||
ipv4_subnet: "12.1.1.0/24"
|
||||
0
ci-scripts/yaml_files/5g_rfsimulator/oai_db.sql
Normal file → Executable file
0
ci-scripts/yaml_files/5g_rfsimulator/oai_db.sql
Normal file → Executable file
@@ -1,5 +1,14 @@
|
||||
version: '3.8'
|
||||
services:
|
||||
oai-nrf:
|
||||
container_name: "rfsim5g-oai-nrf"
|
||||
image: oaisoftwarealliance/oai-nrf:v1.5.0
|
||||
environment:
|
||||
- NRF_INTERFACE_NAME_FOR_SBI=eth0
|
||||
- TZ=Europe/Paris
|
||||
networks:
|
||||
public_net:
|
||||
ipv4_address: 192.168.71.130
|
||||
mysql:
|
||||
container_name: "rfsim5g-mysql"
|
||||
image: mysql:8.0
|
||||
@@ -22,36 +31,108 @@ services:
|
||||
ipv4_address: 192.168.71.131
|
||||
oai-amf:
|
||||
container_name: "rfsim5g-oai-amf"
|
||||
image: oaisoftwarealliance/oai-amf:v2.0.0
|
||||
image: oaisoftwarealliance/oai-amf:v1.5.0
|
||||
environment:
|
||||
- TZ=Europe/paris
|
||||
volumes:
|
||||
- ../5g_rfsimulator/mini_nonrf_config.yaml:/openair-amf/etc/config.yaml
|
||||
- MCC=208
|
||||
- MNC=99
|
||||
- REGION_ID=128
|
||||
- AMF_SET_ID=1
|
||||
- SERVED_GUAMI_MCC_0=208
|
||||
- SERVED_GUAMI_MNC_0=99
|
||||
- SERVED_GUAMI_REGION_ID_0=128
|
||||
- SERVED_GUAMI_AMF_SET_ID_0=1
|
||||
- SERVED_GUAMI_MCC_1=460
|
||||
- SERVED_GUAMI_MNC_1=11
|
||||
- SERVED_GUAMI_REGION_ID_1=10
|
||||
- SERVED_GUAMI_AMF_SET_ID_1=1
|
||||
- PLMN_SUPPORT_MCC=208
|
||||
- PLMN_SUPPORT_MNC=99
|
||||
- PLMN_SUPPORT_TAC=0x0001
|
||||
# Only one slice is defined (1, 0xFFFFFF).
|
||||
- SST_0=1
|
||||
- AMF_INTERFACE_NAME_FOR_NGAP=eth0
|
||||
- AMF_INTERFACE_NAME_FOR_N11=eth0
|
||||
# One single SMF instance
|
||||
- SMF_INSTANCE_ID_0=1
|
||||
- SMF_FQDN_0=oai-smf
|
||||
- SMF_IPV4_ADDR_0=192.168.71.133
|
||||
- SELECTED_0=true
|
||||
# mysql definition in AMF is mandatory in mini deployment.
|
||||
- MYSQL_SERVER=192.168.71.131
|
||||
- MYSQL_USER=root
|
||||
- MYSQL_PASS=linux
|
||||
- MYSQL_DB=oai_db
|
||||
# NF registration
|
||||
- NRF_IPV4_ADDRESS=192.168.71.130
|
||||
- NRF_FQDN=oai-nrf
|
||||
- NF_REGISTRATION=yes
|
||||
- SMF_SELECTION=yes
|
||||
- USE_FQDN_DNS=yes
|
||||
- USE_HTTP2=no
|
||||
depends_on:
|
||||
- oai-nrf
|
||||
- mysql
|
||||
networks:
|
||||
public_net:
|
||||
ipv4_address: 192.168.71.132
|
||||
oai-smf:
|
||||
container_name: "rfsim5g-oai-smf"
|
||||
image: oaisoftwarealliance/oai-smf:v2.0.0
|
||||
image: oaisoftwarealliance/oai-smf:v1.5.0
|
||||
environment:
|
||||
- TZ=Europe/Paris
|
||||
volumes:
|
||||
- ../5g_rfsimulator/mini_nonrf_config.yaml:/openair-smf/etc/config.yaml
|
||||
- SMF_INTERFACE_NAME_FOR_N4=eth0
|
||||
- SMF_INTERFACE_NAME_FOR_SBI=eth0
|
||||
- DEFAULT_DNS_IPV4_ADDRESS=172.21.3.100
|
||||
- DEFAULT_DNS_SEC_IPV4_ADDRESS=4.4.4.4
|
||||
- AMF_IPV4_ADDRESS=192.168.71.132
|
||||
- AMF_FQDN=oai-amf
|
||||
- UPF_IPV4_ADDRESS=192.168.71.134
|
||||
- UPF_FQDN_0=oai-spgwu
|
||||
- NRF_IPV4_ADDRESS=192.168.71.130
|
||||
- NRF_FQDN=oai-nrf
|
||||
- REGISTER_NRF=yes
|
||||
- DISCOVER_UPF=yes
|
||||
- USE_FQDN_DNS=yes
|
||||
- USE_LOCAL_SUBSCRIPTION_INFO=yes
|
||||
- UE_MTU=1500
|
||||
# Only one slice is defined (1, 0xFFFFFF)
|
||||
- DNN_NI0=oai
|
||||
- TYPE0=IPv4
|
||||
- DNN_RANGE0=12.1.1.2 - 12.1.1.127
|
||||
- NSSAI_SST0=1
|
||||
- SESSION_AMBR_UL0=200Mbps
|
||||
- SESSION_AMBR_DL0=400Mbps
|
||||
- DEFAULT_CSCF_IPV4_ADDRESS=127.0.0.1
|
||||
- ENABLE_USAGE_REPORTING=no
|
||||
depends_on:
|
||||
- oai-nrf
|
||||
- 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
|
||||
oai-spgwu:
|
||||
container_name: "rfsim5g-oai-spgwu"
|
||||
image: oaisoftwarealliance/oai-spgwu-tiny:v1.5.0
|
||||
environment:
|
||||
- TZ=Europe/Paris
|
||||
volumes:
|
||||
- ../5g_rfsimulator/mini_nonrf_config.yaml:/openair-upf/etc/config.yaml
|
||||
- SGW_INTERFACE_NAME_FOR_S1U_S12_S4_UP=eth0
|
||||
- SGW_INTERFACE_NAME_FOR_SX=eth0
|
||||
- PGW_INTERFACE_NAME_FOR_SGI=eth0
|
||||
- NETWORK_UE_NAT_OPTION=yes
|
||||
- NETWORK_UE_IP=12.1.1.0/24
|
||||
- ENABLE_5G_FEATURES=yes
|
||||
- REGISTER_NRF=yes
|
||||
- USE_FQDN_NRF=yes
|
||||
- UPF_FQDN_5G=oai-spgwu
|
||||
- NRF_IPV4_ADDRESS=192.168.71.130
|
||||
- NRF_FQDN=oai-nrf
|
||||
# Only one slice is defined (1, 0xFFFFFF)
|
||||
- NSSAI_SST_0=1
|
||||
- NSSAI_SD_0=0xffffff
|
||||
- DNN_0=oai
|
||||
depends_on:
|
||||
- oai-nrf
|
||||
- oai-smf
|
||||
cap_add:
|
||||
- NET_ADMIN
|
||||
@@ -72,7 +153,7 @@ services:
|
||||
"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
|
||||
- oai-spgwu
|
||||
networks:
|
||||
traffic_net:
|
||||
ipv4_address: 192.168.72.135
|
||||
@@ -87,7 +168,6 @@ services:
|
||||
container_name: rfsim5g-oai-gnb
|
||||
environment:
|
||||
USE_ADDITIONAL_OPTIONS: --sa --rfsim --log_config.global_log_options level,nocolor,time
|
||||
ASAN_OPTIONS: detect_leaks=0
|
||||
depends_on:
|
||||
- oai-ext-dn
|
||||
networks:
|
||||
|
||||
@@ -1,5 +1,14 @@
|
||||
version: '3.8'
|
||||
services:
|
||||
oai-nrf:
|
||||
container_name: "rfsim5g-oai-nrf"
|
||||
image: oaisoftwarealliance/oai-nrf:v1.5.0
|
||||
environment:
|
||||
- NRF_INTERFACE_NAME_FOR_SBI=eth0
|
||||
- TZ=Europe/Paris
|
||||
networks:
|
||||
public_net:
|
||||
ipv4_address: 192.168.71.130
|
||||
mysql:
|
||||
container_name: "rfsim5g-mysql"
|
||||
image: mysql:8.0
|
||||
@@ -22,36 +31,108 @@ services:
|
||||
ipv4_address: 192.168.71.131
|
||||
oai-amf:
|
||||
container_name: "rfsim5g-oai-amf"
|
||||
image: oaisoftwarealliance/oai-amf:v2.0.0
|
||||
image: oaisoftwarealliance/oai-amf:v1.5.0
|
||||
environment:
|
||||
- TZ=Europe/paris
|
||||
volumes:
|
||||
- ../5g_rfsimulator/mini_nonrf_config.yaml:/openair-amf/etc/config.yaml
|
||||
- MCC=208
|
||||
- MNC=99
|
||||
- REGION_ID=128
|
||||
- AMF_SET_ID=1
|
||||
- SERVED_GUAMI_MCC_0=208
|
||||
- SERVED_GUAMI_MNC_0=99
|
||||
- SERVED_GUAMI_REGION_ID_0=128
|
||||
- SERVED_GUAMI_AMF_SET_ID_0=1
|
||||
- SERVED_GUAMI_MCC_1=460
|
||||
- SERVED_GUAMI_MNC_1=11
|
||||
- SERVED_GUAMI_REGION_ID_1=10
|
||||
- SERVED_GUAMI_AMF_SET_ID_1=1
|
||||
- PLMN_SUPPORT_MCC=208
|
||||
- PLMN_SUPPORT_MNC=99
|
||||
- PLMN_SUPPORT_TAC=0x0001
|
||||
# Only one slice is defined (1, 0xFFFFFF).
|
||||
- SST_0=1
|
||||
- AMF_INTERFACE_NAME_FOR_NGAP=eth0
|
||||
- AMF_INTERFACE_NAME_FOR_N11=eth0
|
||||
# One single SMF instance
|
||||
- SMF_INSTANCE_ID_0=1
|
||||
- SMF_FQDN_0=oai-smf
|
||||
- SMF_IPV4_ADDR_0=192.168.71.133
|
||||
- SELECTED_0=true
|
||||
# mysql definition in AMF is mandatory in mini deployment.
|
||||
- MYSQL_SERVER=192.168.71.131
|
||||
- MYSQL_USER=root
|
||||
- MYSQL_PASS=linux
|
||||
- MYSQL_DB=oai_db
|
||||
# NF registration
|
||||
- NRF_IPV4_ADDRESS=192.168.71.130
|
||||
- NRF_FQDN=oai-nrf
|
||||
- NF_REGISTRATION=yes
|
||||
- SMF_SELECTION=yes
|
||||
- USE_FQDN_DNS=yes
|
||||
- USE_HTTP2=no
|
||||
depends_on:
|
||||
- oai-nrf
|
||||
- mysql
|
||||
networks:
|
||||
public_net:
|
||||
ipv4_address: 192.168.71.132
|
||||
oai-smf:
|
||||
container_name: "rfsim5g-oai-smf"
|
||||
image: oaisoftwarealliance/oai-smf:v2.0.0
|
||||
image: oaisoftwarealliance/oai-smf:v1.5.0
|
||||
environment:
|
||||
- TZ=Europe/Paris
|
||||
volumes:
|
||||
- ../5g_rfsimulator/mini_nonrf_config.yaml:/openair-smf/etc/config.yaml
|
||||
- SMF_INTERFACE_NAME_FOR_N4=eth0
|
||||
- SMF_INTERFACE_NAME_FOR_SBI=eth0
|
||||
- DEFAULT_DNS_IPV4_ADDRESS=172.21.3.100
|
||||
- DEFAULT_DNS_SEC_IPV4_ADDRESS=4.4.4.4
|
||||
- AMF_IPV4_ADDRESS=192.168.71.132
|
||||
- AMF_FQDN=oai-amf
|
||||
- UPF_IPV4_ADDRESS=192.168.71.134
|
||||
- UPF_FQDN_0=oai-spgwu
|
||||
- NRF_IPV4_ADDRESS=192.168.71.130
|
||||
- NRF_FQDN=oai-nrf
|
||||
- REGISTER_NRF=yes
|
||||
- DISCOVER_UPF=yes
|
||||
- USE_FQDN_DNS=yes
|
||||
- USE_LOCAL_SUBSCRIPTION_INFO=yes
|
||||
- UE_MTU=1500
|
||||
# Only one slice is defined (1, 0xFFFFFF)
|
||||
- DNN_NI0=oai
|
||||
- TYPE0=IPv4
|
||||
- DNN_RANGE0=12.1.1.2 - 12.1.1.127
|
||||
- NSSAI_SST0=1
|
||||
- SESSION_AMBR_UL0=200Mbps
|
||||
- SESSION_AMBR_DL0=400Mbps
|
||||
- DEFAULT_CSCF_IPV4_ADDRESS=127.0.0.1
|
||||
- ENABLE_USAGE_REPORTING=no
|
||||
depends_on:
|
||||
- oai-nrf
|
||||
- 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
|
||||
oai-spgwu:
|
||||
container_name: "rfsim5g-oai-spgwu"
|
||||
image: oaisoftwarealliance/oai-spgwu-tiny:v1.5.0
|
||||
environment:
|
||||
- TZ=Europe/Paris
|
||||
volumes:
|
||||
- ../5g_rfsimulator/mini_nonrf_config.yaml:/openair-upf/etc/config.yaml
|
||||
- SGW_INTERFACE_NAME_FOR_S1U_S12_S4_UP=eth0
|
||||
- SGW_INTERFACE_NAME_FOR_SX=eth0
|
||||
- PGW_INTERFACE_NAME_FOR_SGI=eth0
|
||||
- NETWORK_UE_NAT_OPTION=yes
|
||||
- NETWORK_UE_IP=12.1.1.0/24
|
||||
- ENABLE_5G_FEATURES=yes
|
||||
- REGISTER_NRF=yes
|
||||
- USE_FQDN_NRF=yes
|
||||
- UPF_FQDN_5G=oai-spgwu
|
||||
- NRF_IPV4_ADDRESS=192.168.71.130
|
||||
- NRF_FQDN=oai-nrf
|
||||
# Only one slice is defined (1, 0xFFFFFF)
|
||||
- NSSAI_SST_0=1
|
||||
- NSSAI_SD_0=0xffffff
|
||||
- DNN_0=oai
|
||||
depends_on:
|
||||
- oai-nrf
|
||||
- oai-smf
|
||||
cap_add:
|
||||
- NET_ADMIN
|
||||
@@ -72,7 +153,7 @@ services:
|
||||
"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
|
||||
- oai-spgwu
|
||||
networks:
|
||||
traffic_net:
|
||||
ipv4_address: 192.168.72.135
|
||||
@@ -87,7 +168,6 @@ services:
|
||||
container_name: rfsim5g-oai-gnb
|
||||
environment:
|
||||
USE_ADDITIONAL_OPTIONS: --sa --rfsim --log_config.global_log_options level,nocolor,time
|
||||
ASAN_OPTIONS: detect_leaks=0
|
||||
depends_on:
|
||||
- oai-ext-dn
|
||||
networks:
|
||||
|
||||
@@ -1,229 +0,0 @@
|
||||
# CI test for 5G F1+E1 splits with RFsimulator
|
||||
|
||||
## General
|
||||
|
||||
This docker-compose file deploys a core, RAN, and 3 UEs. Specifically:
|
||||
|
||||
- 5GC mini deployment,
|
||||
- 1 CU-CP,
|
||||
- 3 CU-UPs, one for slices SST=1,2,3,
|
||||
- 3 DUs,
|
||||
- 3 UEs connecting to each DU, each requesting slice SST=1,2,3.
|
||||
|
||||
The CU-CP associates each UE X connecting through DU X to CU-UP X, X=1,2,3. To this end, the docker-compose file deliberately employs the three `f1u_netX` networks to route the user-plane traffic of each DU X/CU-UP X pair, through the `f1u_netX` network in order to effectively test that the correct CU-UP is associated. Basically, the traffic test will only succeed if the correct pair of DU/CU-UP has been established; if not, the DU/CU-UP cannot communicate, as the traffic cannot be routed.
|
||||
|
||||
Core network components are on `core_net` network, CU-CP <--> CU-UP X communicate via `e1_net` network, CU-CP <--> DU X communicate via `f1c_net` network and DU X <--> NR_UE X communicate via `ue_net` network.
|
||||
|
||||
|
||||
## Connectivity
|
||||
|
||||
```
|
||||
AMF --> 192.168.71.132 (N2,Namf)
|
||||
SMF --> 192.168.71.133 (N4,Nsmf)
|
||||
UPF --> 192.168.71.134 (N3)
|
||||
CU-CP --> 192.168.71.X (N2), 192.168.72.2 (F1C), 192.168.77.2 (E1)
|
||||
CU-UP1 --> 192.168.71.X (N3), 192.168.73.2 (F1U), 192.168.77.3 (E1)
|
||||
CU-UP2 --> 192.168.71.X (N3), 192.168.74.2 (F1U), 192.168.77.4 (E1)
|
||||
CU-UP3 --> 192.168.71.X (N3), 192.168.76.2 (F1U), 192.168.77.5 (E1)
|
||||
DU1 --> 192.168.72.2 (F1C), 192.168.73.3 (F1U), 192.168.78.2 (RFSIM)
|
||||
DU2 --> 192.168.72.3 (F1C), 192.168.74.3 (F1U), 192.168.78.3 (RFSIM)
|
||||
DU3 --> 192.168.72.4 (F1C), 192.168.76.3 (F1U), 192.168.78.4 (RFSIM)
|
||||
UE1 --> 192.168.78.5 (RFSIM)
|
||||
UE2 --> 192.168.78.6 (RFSIM)
|
||||
UE3 --> 192.168.78.7 (RFSIM)
|
||||
```
|
||||
|
||||
## How to run
|
||||
|
||||
You should be able to deploy the [basic 5G RFsim deployment](../5g_rfsimulator/README.md).
|
||||
|
||||
First, start the MySQL server and 5GC:
|
||||
|
||||
```bash
|
||||
docker-compose up -d mysql oai-amf oai-smf oai-upf
|
||||
docker-compose ps -a
|
||||
```
|
||||
|
||||
Wait till everything is healthy.
|
||||
|
||||
Next, start the RAN:
|
||||
|
||||
```bash
|
||||
docker-compose up -d oai-cucp oai-cuup{,2,3} oai-du{,2,3}
|
||||
```
|
||||
|
||||
You can verify that the DUs and CU-UPs connected successfully:
|
||||
```bash
|
||||
docker logs rfsim5g-oai-cucp
|
||||
```
|
||||
|
||||
<details>
|
||||
<summary>The output is similar to:</summary>
|
||||
|
||||
```console
|
||||
[...]
|
||||
18535.139811 [RRC] I Accepting new CU-UP ID 3585 name gNB-OAI (assoc_id 257)
|
||||
18535.425744 [RRC] I Accepting new CU-UP ID 3584 name gNB-OAI (assoc_id 260)
|
||||
18535.425757 [RRC] I Accepting new CU-UP ID 3586 name gNB-OAI (assoc_id 261)
|
||||
18535.669733 [NR_RRC] I Received F1 Setup Request from gNB_DU 3585 (du-rfsim) on assoc_id 263
|
||||
18535.669814 [RRC] I Accepting DU 3585 (du-rfsim), sending F1 Setup Response
|
||||
18536.066417 [NR_RRC] I Received F1 Setup Request from gNB_DU 3586 (du-rfsim) on assoc_id 265
|
||||
18536.066476 [RRC] I Accepting DU 3586 (du-rfsim), sending F1 Setup Response
|
||||
18536.135581 [NR_RRC] I Received F1 Setup Request from gNB_DU 3584 (du-rfsim) on assoc_id 267
|
||||
18536.135650 [RRC] I Accepting DU 3584 (du-rfsim), sending F1 Setup Response
|
||||
```
|
||||
</details>
|
||||
|
||||
You should see that the CU-UP initialized two GTP instances (one for NG-U, the other for F1-U):
|
||||
|
||||
```bash
|
||||
docker logs -f rfsim5g-oai-cuup
|
||||
```
|
||||
|
||||
<details>
|
||||
<summary>The output is similar to:</summary>
|
||||
|
||||
```console
|
||||
[...]
|
||||
122690.500374 [GTPU] I Initializing UDP for local address 192.168.73.2 with port 2153
|
||||
122690.500406 [GTPU] I Created gtpu instance id: 96
|
||||
122690.500413 [GTPU] I Configuring GTPu address : 192.168.71.161, port : 2152
|
||||
122690.500414 [GTPU] I Initializing UDP for local address 192.168.71.161 with port 2152
|
||||
122690.500420 [GTPU] I Created gtpu instance id: 97
|
||||
```
|
||||
</details>
|
||||
|
||||
|
||||
|
||||
You should see the typical periodical output at the DUs:
|
||||
|
||||
```bash
|
||||
docker logs rfsim5g-oai-du
|
||||
```
|
||||
<details>
|
||||
<summary>The output is similar to:</summary>
|
||||
|
||||
```console
|
||||
[...]
|
||||
18626.446953 [NR_MAC] I Frame.Slot 128.0
|
||||
|
||||
18629.151076 [NR_MAC] I Frame.Slot 256.0
|
||||
```
|
||||
</details>
|
||||
|
||||
```
|
||||
|
||||
Next, connect the UEs. They are configured to connect to each DU by setting the
|
||||
RFsimulator server address to the `public_net` IP address of each DU. For each,
|
||||
you should see that they get an IP address
|
||||
|
||||
```bash
|
||||
docker compose up -d oai-nr-ue{,2,3}
|
||||
```
|
||||
|
||||
```bash
|
||||
docker logs rfsim5g-oai-nr-ue
|
||||
```
|
||||
|
||||
<details>
|
||||
<summary>The output is similar to:</summary>
|
||||
|
||||
```console
|
||||
[...]
|
||||
18758.176149 [NR_RRC] I rrcReconfigurationComplete Encoded 10 bits (2 bytes)
|
||||
18758.176153 [NR_RRC] I Logical Channel UL-DCCH (SRB1), Generating RRCReconfigurationComplete (bytes 2)
|
||||
18758.176154 [NAS] I [UE 0] Received NAS_CONN_ESTABLI_CNF: errCode 1, length 87
|
||||
18758.176455 [OIP] I Interface oaitun_ue1 successfully configured, ip address 12.1.1.3, mask 255.255.255.0 broadcast address 12.1.1.255
|
||||
```
|
||||
</details>
|
||||
|
||||
|
||||
Alternatively, check that they all received an IP address (the associated IP addresses might be different):
|
||||
|
||||
```bash
|
||||
docker exec -it rfsim5g-oai-nr-ue3 ip a show oaitun_ue1
|
||||
```
|
||||
<details>
|
||||
<summary>The output is similar to:</summary>
|
||||
|
||||
```console
|
||||
[...]
|
||||
inet 12.1.1.2/24 brd 12.1.1.255 scope global oaitun_ue1
|
||||
[...]
|
||||
```
|
||||
</details>
|
||||
|
||||
```bash
|
||||
docker exec -it rfsim5g-oai-nr-ue2 ip a show oaitun_ue1
|
||||
```
|
||||
<details>
|
||||
<summary>The output is similar to:</summary>
|
||||
|
||||
```console
|
||||
[...]
|
||||
inet 12.1.1.4/24 brd 12.1.1.255 scope global oaitun_ue1
|
||||
[...]
|
||||
```
|
||||
</details>
|
||||
|
||||
```bash
|
||||
docker exec -it rfsim5g-oai-nr-ue ip a show oaitun_ue1
|
||||
```
|
||||
<details>
|
||||
<summary>The output is similar to:</summary>
|
||||
|
||||
```console
|
||||
[...]
|
||||
inet 12.1.1.3/24 brd 12.1.1.255 scope global oaitun_ue1
|
||||
[...]
|
||||
```
|
||||
</details>
|
||||
|
||||
|
||||
|
||||
Also, note that each DU sees only one UE! At the CU-CP, you should see that
|
||||
each DU has been associated to a different CU-UP, based on the NSSAI (`exact
|
||||
NSSAI match`):
|
||||
```bash
|
||||
docker logs rfsim5g-oai-cucp | grep CU-U
|
||||
```
|
||||
|
||||
<details>
|
||||
<summary>The output is similar to:</summary>
|
||||
|
||||
```console
|
||||
[...]
|
||||
18757.531423 [RRC] I selecting CU-UP ID 3586 based on exact NSSAI match (3:0xffffff)
|
||||
18757.531434 [RRC] I UE 1 associating to CU-UP assoc_id 261 out of 3 CU-UPs
|
||||
18758.171502 [RRC] I selecting CU-UP ID 3584 based on exact NSSAI match (1:0xffffff)
|
||||
18758.171510 [RRC] I UE 2 associating to CU-UP assoc_id 260 out of 3 CU-UPs
|
||||
18758.772320 [RRC] I selecting CU-UP ID 3585 based on exact NSSAI match (2:0xffffff)
|
||||
18758.772327 [RRC] I UE 3 associating to CU-UP assoc_id 257 out of 3 CU-UPs
|
||||
```
|
||||
</details>
|
||||
|
||||
|
||||
Also, each UE should be able to ping the core network. For instance, with UE 1:
|
||||
```bash
|
||||
docker exec -it rfsim5g-oai-nr-ue ping -c1 12.1.1.1
|
||||
```
|
||||
<details>
|
||||
<summary>The output is similar to:</summary>
|
||||
|
||||
```console
|
||||
PING 12.1.1.1 (12.1.1.1) 56(84) bytes of data.
|
||||
64 bytes from 12.1.1.1: icmp_seq=1 ttl=64 time=15.2 ms
|
||||
|
||||
--- 12.1.1.1 ping statistics ---
|
||||
1 packets transmitted, 1 received, 0% packet loss, time 0ms
|
||||
rtt min/avg/max/mdev = 15.155/15.155/15.155/0.000 ms
|
||||
```
|
||||
</details>
|
||||
|
||||
|
||||
Finally, undeploy the UEs (to give them time to do deregistration), and then
|
||||
the rest of the network:
|
||||
```bash
|
||||
docker compose stop oai-nr-ue{,2,3}
|
||||
docker compose down
|
||||
```
|
||||
@@ -1,5 +1,14 @@
|
||||
version: '3.8'
|
||||
services:
|
||||
oai-nrf:
|
||||
container_name: "rfsim5g-oai-nrf"
|
||||
image: oaisoftwarealliance/oai-nrf:v1.5.0
|
||||
environment:
|
||||
- NRF_INTERFACE_NAME_FOR_SBI=eth0
|
||||
- TZ=Europe/Paris
|
||||
networks:
|
||||
core_net:
|
||||
ipv4_address: 192.168.71.130
|
||||
mysql:
|
||||
container_name: "rfsim5g-mysql"
|
||||
image: mysql:8.0
|
||||
@@ -22,36 +31,108 @@ services:
|
||||
ipv4_address: 192.168.71.131
|
||||
oai-amf:
|
||||
container_name: "rfsim5g-oai-amf"
|
||||
image: oaisoftwarealliance/oai-amf:v2.0.0
|
||||
image: oaisoftwarealliance/oai-amf:v1.5.0
|
||||
environment:
|
||||
- TZ=Europe/paris
|
||||
volumes:
|
||||
- ./mini_nonrf_config_3slices.yaml:/openair-amf/etc/config.yaml
|
||||
- MCC=208
|
||||
- MNC=99
|
||||
- REGION_ID=128
|
||||
- AMF_SET_ID=1
|
||||
- SERVED_GUAMI_MCC_0=208
|
||||
- SERVED_GUAMI_MNC_0=99
|
||||
- SERVED_GUAMI_REGION_ID_0=128
|
||||
- SERVED_GUAMI_AMF_SET_ID_0=1
|
||||
- SERVED_GUAMI_MCC_1=460
|
||||
- SERVED_GUAMI_MNC_1=11
|
||||
- SERVED_GUAMI_REGION_ID_1=10
|
||||
- SERVED_GUAMI_AMF_SET_ID_1=1
|
||||
- PLMN_SUPPORT_MCC=208
|
||||
- PLMN_SUPPORT_MNC=99
|
||||
- PLMN_SUPPORT_TAC=0x0001
|
||||
# Only one slice is defined (1, 0xFFFFFF).
|
||||
- SST_0=1
|
||||
- AMF_INTERFACE_NAME_FOR_NGAP=eth0
|
||||
- AMF_INTERFACE_NAME_FOR_N11=eth0
|
||||
# One single SMF instance
|
||||
- SMF_INSTANCE_ID_0=1
|
||||
- SMF_FQDN_0=oai-smf
|
||||
- SMF_IPV4_ADDR_0=192.168.71.133
|
||||
- SELECTED_0=true
|
||||
# mysql definition in AMF is mandatory in mini deployment.
|
||||
- MYSQL_SERVER=192.168.71.131
|
||||
- MYSQL_USER=root
|
||||
- MYSQL_PASS=linux
|
||||
- MYSQL_DB=oai_db
|
||||
# NF registration
|
||||
- NRF_IPV4_ADDRESS=192.168.71.130
|
||||
- NRF_FQDN=oai-nrf
|
||||
- NF_REGISTRATION=yes
|
||||
- SMF_SELECTION=yes
|
||||
- USE_FQDN_DNS=yes
|
||||
- USE_HTTP2=no
|
||||
depends_on:
|
||||
- oai-nrf
|
||||
- mysql
|
||||
networks:
|
||||
core_net:
|
||||
ipv4_address: 192.168.71.132
|
||||
oai-smf:
|
||||
container_name: "rfsim5g-oai-smf"
|
||||
image: oaisoftwarealliance/oai-smf:v2.0.0
|
||||
image: oaisoftwarealliance/oai-smf:v1.5.0
|
||||
environment:
|
||||
- TZ=Europe/Paris
|
||||
volumes:
|
||||
- ./mini_nonrf_config_3slices.yaml:/openair-smf/etc/config.yaml
|
||||
- SMF_INTERFACE_NAME_FOR_N4=eth0
|
||||
- SMF_INTERFACE_NAME_FOR_SBI=eth0
|
||||
- DEFAULT_DNS_IPV4_ADDRESS=172.21.3.100
|
||||
- DEFAULT_DNS_SEC_IPV4_ADDRESS=4.4.4.4
|
||||
- AMF_IPV4_ADDRESS=192.168.71.132
|
||||
- AMF_FQDN=oai-amf
|
||||
- UPF_IPV4_ADDRESS=192.168.71.134
|
||||
- UPF_FQDN_0=oai-spgwu
|
||||
- NRF_IPV4_ADDRESS=192.168.71.130
|
||||
- NRF_FQDN=oai-nrf
|
||||
- REGISTER_NRF=yes
|
||||
- DISCOVER_UPF=yes
|
||||
- USE_FQDN_DNS=yes
|
||||
- USE_LOCAL_SUBSCRIPTION_INFO=yes
|
||||
- UE_MTU=1500
|
||||
# Only one slice is defined (1, 0xFFFFFF)
|
||||
- DNN_NI0=oai
|
||||
- TYPE0=IPv4
|
||||
- DNN_RANGE0=12.1.1.2 - 12.1.1.127
|
||||
- NSSAI_SST0=1
|
||||
- SESSION_AMBR_UL0=200Mbps
|
||||
- SESSION_AMBR_DL0=400Mbps
|
||||
- DEFAULT_CSCF_IPV4_ADDRESS=127.0.0.1
|
||||
- ENABLE_USAGE_REPORTING=no
|
||||
depends_on:
|
||||
- oai-nrf
|
||||
- oai-amf
|
||||
networks:
|
||||
core_net:
|
||||
ipv4_address: 192.168.71.133
|
||||
oai-upf:
|
||||
container_name: "rfsim5g-oai-upf"
|
||||
image: oaisoftwarealliance/oai-upf:v2.0.0
|
||||
oai-spgwu:
|
||||
container_name: "rfsim5g-oai-spgwu"
|
||||
image: oaisoftwarealliance/oai-spgwu-tiny:v1.5.0
|
||||
environment:
|
||||
- TZ=Europe/Paris
|
||||
volumes:
|
||||
- ./mini_nonrf_config_3slices.yaml:/openair-upf/etc/config.yaml
|
||||
- SGW_INTERFACE_NAME_FOR_S1U_S12_S4_UP=eth0
|
||||
- SGW_INTERFACE_NAME_FOR_SX=eth0
|
||||
- PGW_INTERFACE_NAME_FOR_SGI=eth0
|
||||
- NETWORK_UE_NAT_OPTION=yes
|
||||
- NETWORK_UE_IP=12.1.1.0/24
|
||||
- ENABLE_5G_FEATURES=yes
|
||||
- REGISTER_NRF=yes
|
||||
- USE_FQDN_NRF=yes
|
||||
- UPF_FQDN_5G=oai-spgwu
|
||||
- NRF_IPV4_ADDRESS=192.168.71.130
|
||||
- NRF_FQDN=oai-nrf
|
||||
# Only one slice is defined (1, 0xFFFFFF)
|
||||
- NSSAI_SST_0=1
|
||||
- NSSAI_SD_0=0xffffff
|
||||
- DNN_0=oai
|
||||
depends_on:
|
||||
- oai-nrf
|
||||
- oai-smf
|
||||
cap_add:
|
||||
- NET_ADMIN
|
||||
@@ -63,26 +144,39 @@ services:
|
||||
core_net:
|
||||
ipv4_address: 192.168.71.134
|
||||
traffic_net:
|
||||
ipv4_address: 192.168.72.134
|
||||
ipv4_address: 192.168.73.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.73.134 dev eth0; sleep infinity"
|
||||
depends_on:
|
||||
- oai-spgwu
|
||||
networks:
|
||||
traffic_net:
|
||||
ipv4_address: 192.168.73.135
|
||||
healthcheck:
|
||||
test: /bin/bash -c "ping -c 2 192.168.73.134"
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
|
||||
oai-cucp:
|
||||
image: oaisoftwarealliance/oai-gnb:develop
|
||||
privileged: true
|
||||
container_name: rfsim5g-oai-cucp
|
||||
environment:
|
||||
USE_ADDITIONAL_OPTIONS: --sa --log_config.global_log_options level,nocolor,time
|
||||
--gNBs.[0].E1_INTERFACE.[0].ipv4_cucp 192.168.77.2
|
||||
--gNBs.[0].local_s_address 192.168.72.2
|
||||
ASAN_OPTIONS: detect_leaks=0
|
||||
USE_ADDITIONAL_OPTIONS: --sa --rfsim --log_config.global_log_options level,nocolor,time
|
||||
depends_on:
|
||||
- oai-upf
|
||||
- oai-ext-dn
|
||||
networks:
|
||||
core_net:
|
||||
ipv4_address: 192.168.71.150
|
||||
f1c_net:
|
||||
ipv4_address: 192.168.72.2
|
||||
e1_net:
|
||||
ipv4_address: 192.168.77.2
|
||||
ipv4_address: 192.168.71.140
|
||||
ran_net:
|
||||
ipv4_address: 192.168.72.140
|
||||
volumes:
|
||||
- ../../conf_files/gnb-cucp.sa.f1.conf:/opt/oai-gnb/etc/gnb.conf
|
||||
healthcheck:
|
||||
@@ -96,83 +190,15 @@ services:
|
||||
privileged: true
|
||||
container_name: rfsim5g-oai-cuup
|
||||
environment:
|
||||
USE_ADDITIONAL_OPTIONS: --sa --log_config.global_log_options level,nocolor,time
|
||||
--gNBs.[0].E1_INTERFACE.[0].ipv4_cucp 192.168.77.2
|
||||
--gNBs.[0].E1_INTERFACE.[0].ipv4_cuup 192.168.77.3
|
||||
--gNBs.[0].local_s_address 192.168.73.2
|
||||
--gNBs.[0].remote_s_address 127.0.0.1
|
||||
ASAN_OPTIONS: detect_leaks=0
|
||||
USE_ADDITIONAL_OPTIONS: --sa --rfsim
|
||||
#--log_config.global_log_options level,nocolor,time
|
||||
depends_on:
|
||||
- oai-cucp
|
||||
networks:
|
||||
core_net:
|
||||
ipv4_address: 192.168.71.161
|
||||
f1u_1_net:
|
||||
ipv4_address: 192.168.73.2
|
||||
e1_net:
|
||||
ipv4_address: 192.168.77.3
|
||||
volumes:
|
||||
- ../../conf_files/gnb-cuup.sa.f1.conf:/opt/oai-gnb/etc/gnb.conf
|
||||
healthcheck:
|
||||
test: /bin/bash -c "pgrep nr-cuup"
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
|
||||
oai-cuup2:
|
||||
image: oaisoftwarealliance/oai-nr-cuup:develop
|
||||
privileged: true
|
||||
container_name: rfsim5g-oai-cuup2
|
||||
environment:
|
||||
USE_ADDITIONAL_OPTIONS: --sa --log_config.global_log_options level,nocolor,time
|
||||
--gNBs.[0].gNB_CU_UP_ID 0xe01
|
||||
--gNBs.[0].E1_INTERFACE.[0].ipv4_cucp 192.168.77.2
|
||||
--gNBs.[0].E1_INTERFACE.[0].ipv4_cuup 192.168.77.4
|
||||
--gNBs.[0].local_s_address 192.168.74.2
|
||||
--gNBs.[0].remote_s_address 127.0.0.1
|
||||
--gNBs.[0].NETWORK_INTERFACES.GNB_IPV4_ADDRESS_FOR_NGU 192.168.71.162
|
||||
--gNBs.[0].plmn_list.[0].snssaiList.[0].sst 2
|
||||
ASAN_OPTIONS: detect_leaks=0
|
||||
depends_on:
|
||||
- oai-cucp
|
||||
networks:
|
||||
core_net:
|
||||
ipv4_address: 192.168.71.162
|
||||
f1u_2_net:
|
||||
ipv4_address: 192.168.74.2
|
||||
e1_net:
|
||||
ipv4_address: 192.168.77.4
|
||||
volumes:
|
||||
- ../../conf_files/gnb-cuup.sa.f1.conf:/opt/oai-gnb/etc/gnb.conf
|
||||
healthcheck:
|
||||
test: /bin/bash -c "pgrep nr-cuup"
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
|
||||
oai-cuup3:
|
||||
image: oaisoftwarealliance/oai-nr-cuup:develop
|
||||
privileged: true
|
||||
container_name: rfsim5g-oai-cuup3
|
||||
environment:
|
||||
USE_ADDITIONAL_OPTIONS: --sa --log_config.global_log_options level,nocolor,time
|
||||
--gNBs.[0].gNB_CU_UP_ID 0xe02
|
||||
--gNBs.[0].E1_INTERFACE.[0].ipv4_cucp 192.168.77.2
|
||||
--gNBs.[0].E1_INTERFACE.[0].ipv4_cuup 192.168.77.5
|
||||
--gNBs.[0].local_s_address 192.168.76.2
|
||||
--gNBs.[0].remote_s_address 127.0.0.1
|
||||
--gNBs.[0].NETWORK_INTERFACES.GNB_IPV4_ADDRESS_FOR_NGU 192.168.71.163
|
||||
--gNBs.[0].plmn_list.[0].snssaiList.[0].sst 3
|
||||
ASAN_OPTIONS: detect_leaks=0
|
||||
depends_on:
|
||||
- oai-cucp
|
||||
networks:
|
||||
core_net:
|
||||
ipv4_address: 192.168.71.163
|
||||
f1u_3_net:
|
||||
ipv4_address: 192.168.76.2
|
||||
e1_net:
|
||||
ipv4_address: 192.168.77.5
|
||||
ipv4_address: 192.168.71.141
|
||||
ran_net:
|
||||
ipv4_address: 192.168.72.141
|
||||
volumes:
|
||||
- ../../conf_files/gnb-cuup.sa.f1.conf:/opt/oai-gnb/etc/gnb.conf
|
||||
healthcheck:
|
||||
@@ -187,81 +213,11 @@ services:
|
||||
container_name: rfsim5g-oai-du
|
||||
environment:
|
||||
USE_ADDITIONAL_OPTIONS: --sa --rfsim --log_config.global_log_options level,nocolor,time
|
||||
--MACRLCs.[0].local_n_address 192.168.73.3
|
||||
--MACRLCs.[0].remote_n_address 192.168.72.2
|
||||
ASAN_OPTIONS: detect_leaks=0
|
||||
depends_on:
|
||||
- oai-cucp
|
||||
- oai-cuup
|
||||
networks:
|
||||
f1c_net:
|
||||
ipv4_address: 192.168.72.3
|
||||
f1u_1_net:
|
||||
ipv4_address: 192.168.73.3
|
||||
ue_net:
|
||||
ipv4_address: 192.168.78.2
|
||||
ran_net:
|
||||
ipv4_address: 192.168.72.142
|
||||
volumes:
|
||||
- ../../conf_files/gnb-du.sa.band78.106prb.rfsim.conf:/opt/oai-gnb/etc/gnb.conf
|
||||
healthcheck:
|
||||
test: /bin/bash -c "pgrep nr-softmodem"
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
|
||||
oai-du2:
|
||||
image: oaisoftwarealliance/oai-gnb:develop
|
||||
privileged: true
|
||||
container_name: rfsim5g-oai-du2
|
||||
environment:
|
||||
USE_ADDITIONAL_OPTIONS: --sa --rfsim --log_config.global_log_options level,nocolor,time
|
||||
--gNBs.[0].gNB_DU_ID 0xe01
|
||||
--gNBs.[0].nr_cellid 87654321
|
||||
--gNBs.[0].servingCellConfigCommon.[0].physCellId 1
|
||||
--MACRLCs.[0].local_n_address 192.168.74.3
|
||||
--MACRLCs.[0].remote_n_address 192.168.72.2
|
||||
ASAN_OPTIONS: detect_leaks=0
|
||||
depends_on:
|
||||
- oai-cucp
|
||||
- oai-cuup2
|
||||
networks:
|
||||
f1c_net:
|
||||
ipv4_address: 192.168.72.4
|
||||
f1u_2_net:
|
||||
ipv4_address: 192.168.74.3
|
||||
ue_net:
|
||||
ipv4_address: 192.168.78.3
|
||||
volumes:
|
||||
- ../../conf_files/gnb-du.sa.band78.106prb.rfsim.conf:/opt/oai-gnb/etc/gnb.conf
|
||||
healthcheck:
|
||||
test: /bin/bash -c "pgrep nr-softmodem"
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
|
||||
oai-du3:
|
||||
image: oaisoftwarealliance/oai-gnb:develop
|
||||
privileged: true
|
||||
container_name: rfsim5g-oai-du3
|
||||
environment:
|
||||
USE_ADDITIONAL_OPTIONS: --sa --rfsim --log_config.global_log_options level,nocolor,time
|
||||
--gNBs.[0].gNB_DU_ID 0xe02
|
||||
--gNBs.[0].nr_cellid 11111111
|
||||
--gNBs.[0].servingCellConfigCommon.[0].physCellId 2
|
||||
--MACRLCs.[0].local_n_address 192.168.76.3
|
||||
--MACRLCs.[0].remote_n_address 192.168.72.2
|
||||
ASAN_OPTIONS: detect_leaks=0
|
||||
depends_on:
|
||||
- oai-cucp
|
||||
- oai-cuup3
|
||||
networks:
|
||||
f1c_net:
|
||||
ipv4_address: 192.168.72.5
|
||||
f1u_3_net:
|
||||
ipv4_address: 192.168.76.3
|
||||
ue_net:
|
||||
ipv4_address: 192.168.78.4
|
||||
volumes:
|
||||
- ../../conf_files/gnb-du.sa.band78.106prb.rfsim.conf:/opt/oai-gnb/etc/gnb.conf
|
||||
- ../../conf_files/gnb-du.band78.106prb.rfsim.conf:/opt/oai-gnb/etc/gnb.conf
|
||||
healthcheck:
|
||||
test: /bin/bash -c "pgrep nr-softmodem"
|
||||
interval: 10s
|
||||
@@ -273,60 +229,12 @@ services:
|
||||
privileged: true
|
||||
container_name: rfsim5g-oai-nr-ue
|
||||
environment:
|
||||
USE_ADDITIONAL_OPTIONS: --sa --rfsim --log_config.global_log_options level,nocolor,time
|
||||
-r 106 --numerology 1 -C 3619200000
|
||||
--uicc0.imsi 208990100001100
|
||||
--rfsimulator.serveraddr 192.168.78.2
|
||||
USE_ADDITIONAL_OPTIONS: --sa --rfsim -r 106 --numerology 1 -C 3619200000 --rfsimulator.serveraddr 192.168.72.142 --log_config.global_log_options level,nocolor,time
|
||||
depends_on:
|
||||
- oai-du
|
||||
networks:
|
||||
ue_net:
|
||||
ipv4_address: 192.168.78.5
|
||||
volumes:
|
||||
- ../../conf_files/nrue.uicc.conf:/opt/oai-nr-ue/etc/nr-ue.conf
|
||||
healthcheck:
|
||||
test: /bin/bash -c "pgrep nr-uesoftmodem"
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
|
||||
oai-nr-ue2:
|
||||
image: oaisoftwarealliance/oai-nr-ue:develop
|
||||
privileged: true
|
||||
container_name: rfsim5g-oai-nr-ue2
|
||||
environment:
|
||||
USE_ADDITIONAL_OPTIONS: --sa --rfsim --log_config.global_log_options level,nocolor,time
|
||||
-r 106 --numerology 1 -C 3619200000
|
||||
--uicc0.imsi 208990100001101 --uicc0.nssai_sst 2
|
||||
--rfsimulator.serveraddr 192.168.78.3
|
||||
depends_on:
|
||||
- oai-du2
|
||||
networks:
|
||||
ue_net:
|
||||
ipv4_address: 192.168.78.6
|
||||
volumes:
|
||||
- ../../conf_files/nrue.uicc.conf:/opt/oai-nr-ue/etc/nr-ue.conf
|
||||
healthcheck:
|
||||
test: /bin/bash -c "pgrep nr-uesoftmodem"
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
|
||||
oai-nr-ue3:
|
||||
image: oaisoftwarealliance/oai-nr-ue:develop
|
||||
privileged: true
|
||||
container_name: rfsim5g-oai-nr-ue3
|
||||
environment:
|
||||
USE_ADDITIONAL_OPTIONS: --sa --rfsim --log_config.global_log_options level,nocolor,time
|
||||
-r 106 --numerology 1 -C 3619200000
|
||||
--uicc0.imsi 208990100001102 --uicc0.nssai_sst 3
|
||||
--rfsimulator.serveraddr 192.168.78.4
|
||||
ASAN_OPTIONS: detect_leaks=0
|
||||
depends_on:
|
||||
- oai-du3
|
||||
networks:
|
||||
ue_net:
|
||||
ipv4_address: 192.168.78.7
|
||||
ran_net:
|
||||
ipv4_address: 192.168.72.150
|
||||
volumes:
|
||||
- ../../conf_files/nrue.uicc.conf:/opt/oai-nr-ue/etc/nr-ue.conf
|
||||
healthcheck:
|
||||
@@ -344,59 +252,19 @@ networks:
|
||||
- subnet: 192.168.71.128/26
|
||||
driver_opts:
|
||||
com.docker.network.bridge.name: "rfsim5g-core"
|
||||
traffic_net:
|
||||
ran_net:
|
||||
driver: bridge
|
||||
name: rfsim5g-oai-traffic-net
|
||||
name: rfsim5g-oai-ran-net
|
||||
ipam:
|
||||
config:
|
||||
- subnet: 192.168.72.128/26
|
||||
driver_opts:
|
||||
com.docker.network.bridge.name: "rfsim5g-ran"
|
||||
traffic_net:
|
||||
driver: bridge
|
||||
name: rfsim5g-oai-traffic_net-net
|
||||
ipam:
|
||||
config:
|
||||
- subnet: 192.168.73.128/26
|
||||
driver_opts:
|
||||
com.docker.network.bridge.name: "rfsim5g-traffic"
|
||||
f1c_net:
|
||||
driver: bridge
|
||||
name: rfsim5g-oai-f1c-net
|
||||
ipam:
|
||||
config:
|
||||
- subnet: 192.168.72.0/28
|
||||
driver_opts:
|
||||
com.docker.network.bridge.name: "rfsim5g-f1c"
|
||||
f1u_1_net:
|
||||
driver: bridge
|
||||
name: rfsim5g-oai-f1u-1-net
|
||||
ipam:
|
||||
config:
|
||||
- subnet: 192.168.73.0/28
|
||||
driver_opts:
|
||||
com.docker.network.bridge.name: "rfsim5g-f1u_1"
|
||||
f1u_2_net:
|
||||
driver: bridge
|
||||
name: rfsim5g-oai-f1u-2-net
|
||||
ipam:
|
||||
config:
|
||||
- subnet: 192.168.74.0/28
|
||||
driver_opts:
|
||||
com.docker.network.bridge.name: "rfsim5g-f1u_2"
|
||||
f1u_3_net:
|
||||
driver: bridge
|
||||
name: rfsim5g-oai-f1u-3-net
|
||||
ipam:
|
||||
config:
|
||||
- subnet: 192.168.76.0/28
|
||||
driver_opts:
|
||||
com.docker.network.bridge.name: "rfsim5g-f1u_3"
|
||||
e1_net:
|
||||
driver: bridge
|
||||
name: rfsim5g-oai-e1-net
|
||||
ipam:
|
||||
config:
|
||||
- subnet: 192.168.77.1/28
|
||||
driver_opts:
|
||||
com.docker.network.bridge.name: "rfsim5g-e1"
|
||||
ue_net:
|
||||
driver: bridge
|
||||
name: rfsim5g-oai-ue-net
|
||||
ipam:
|
||||
config:
|
||||
- subnet: 192.168.78.1/28
|
||||
driver_opts:
|
||||
com.docker.network.bridge.name: "rfsim5g-ue"
|
||||
|
||||
@@ -1,213 +0,0 @@
|
||||
################################################################################
|
||||
# Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
# contributor license agreements. See the NOTICE file distributed with
|
||||
# this work for additional information regarding copyright ownership.
|
||||
# The OpenAirInterface Software Alliance licenses this file to You under
|
||||
# the OAI Public License, Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.openairinterface.org/?page_id=698
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#-------------------------------------------------------------------------------
|
||||
# For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
# contact@openairinterface.org
|
||||
################################################################################
|
||||
|
||||
# OAI CN Configuration File
|
||||
### This file can be used by all OAI NFs
|
||||
### Some fields are specific to an NF and will be ignored by other NFs
|
||||
|
||||
## NOTE ON YAML ANCHORS ##
|
||||
# We use YAML anchors to ease the configuration and to avoid duplicating parts of the configuration.
|
||||
# This is especially true for the SNSSAIs, as we have to define them for multiple NFs.
|
||||
# Please note that the use of anchors is not mandatory, and you can define the SNSSAI in each NF yourself.
|
||||
# You can read more about anchors here: https://yaml.org/spec/1.2.2/#anchors-and-aliases
|
||||
|
||||
############# Common configuration
|
||||
|
||||
# Log level for all the NFs
|
||||
log_level:
|
||||
general: debug
|
||||
|
||||
# If you enable registration, the other NFs will use the NRF discovery mechanism
|
||||
register_nf:
|
||||
general: no
|
||||
|
||||
http_version: 1
|
||||
|
||||
############## SBI Interfaces
|
||||
### Each NF takes its local SBI interfaces and remote interfaces from here, unless it gets them using NRF discovery mechanisms
|
||||
nfs:
|
||||
amf:
|
||||
host: oai-amf
|
||||
sbi:
|
||||
port: 80
|
||||
api_version: v1
|
||||
interface_name: eth0
|
||||
n2:
|
||||
interface_name: eth0
|
||||
port: 38412
|
||||
smf:
|
||||
host: oai-smf
|
||||
sbi:
|
||||
port: 80
|
||||
api_version: v1
|
||||
interface_name: eth0
|
||||
n4:
|
||||
interface_name: eth0
|
||||
port: 8805
|
||||
|
||||
upf:
|
||||
host: oai-upf
|
||||
sbi:
|
||||
port: 80
|
||||
api_version: v1
|
||||
interface_name: eth0
|
||||
n3:
|
||||
interface_name: eth0
|
||||
port: 2152
|
||||
n4:
|
||||
interface_name: eth0
|
||||
port: 8805
|
||||
n6:
|
||||
interface_name: eth1
|
||||
n9:
|
||||
interface_name: eth0
|
||||
port: 2152
|
||||
|
||||
#### Common for UDR and AMF
|
||||
database:
|
||||
host: mysql
|
||||
user: test
|
||||
type: mysql
|
||||
password: test
|
||||
database_name: oai_db
|
||||
generate_random: true
|
||||
connection_timeout: 300 # seconds
|
||||
|
||||
## general single_nssai configuration
|
||||
## Defines YAML anchors, which are reused in the config file
|
||||
snssais:
|
||||
- &embb_slice1
|
||||
sst: 1
|
||||
- &embb_slice2
|
||||
sst: 2
|
||||
- &embb_slice3
|
||||
sst: 3
|
||||
|
||||
############## NF-specific configuration
|
||||
amf:
|
||||
amf_name: "OAI-AMF"
|
||||
# This really depends on if we want to keep the "mini" version or not
|
||||
support_features_options:
|
||||
enable_simple_scenario: yes # "no" by default with the normal deployment scenarios with AMF/SMF/UPF/AUSF/UDM/UDR/NRF.
|
||||
# set it to "yes" to use with the minimalist deployment scenario (including only AMF/SMF/UPF) by using the internal AUSF/UDM implemented inside AMF.
|
||||
# There's no NRF in this scenario, SMF info is taken from "nfs" section.
|
||||
enable_nssf: no
|
||||
enable_smf_selection: no
|
||||
relative_capacity: 30
|
||||
statistics_timer_interval: 20 # in seconds
|
||||
emergency_support: false
|
||||
served_guami_list:
|
||||
- mcc: 208
|
||||
mnc: 99
|
||||
amf_region_id: 01
|
||||
amf_set_id: 001
|
||||
amf_pointer: 01
|
||||
plmn_support_list:
|
||||
- mcc: 208
|
||||
mnc: 99
|
||||
tac: 0x0001
|
||||
nssai:
|
||||
- *embb_slice1
|
||||
- *embb_slice2
|
||||
- *embb_slice3
|
||||
supported_integrity_algorithms:
|
||||
- "NIA0"
|
||||
- "NIA1"
|
||||
- "NIA2"
|
||||
supported_encryption_algorithms:
|
||||
- "NEA0"
|
||||
- "NEA1"
|
||||
- "NEA2"
|
||||
|
||||
smf:
|
||||
ue_mtu: 1500
|
||||
support_features:
|
||||
use_local_subscription_info: yes # Use infos from local_subscription_info or from UDM
|
||||
use_local_pcc_rules: yes # Use infos from local_pcc_rules or from PCF
|
||||
upfs:
|
||||
- host: oai-upf
|
||||
port: 8805
|
||||
config:
|
||||
enable_usage_reporting: no
|
||||
# follows UPFInfo from 3GPP TS 29.510, currently only these values from interfaceUpfInfoList are supported
|
||||
upf_info:
|
||||
interfaceUpfInfoList:
|
||||
- interfaceType: "N3"
|
||||
networkInstance: "access.oai.org"
|
||||
- interfaceType: "N6"
|
||||
networkInstance: "core.oai.org"
|
||||
ue_dns:
|
||||
primary_ipv4: "172.21.3.100"
|
||||
primary_ipv6: "2001:4860:4860::8888"
|
||||
secondary_ipv4: "8.8.8.8"
|
||||
secondary_ipv6: "2001:4860:4860::8888"
|
||||
ims:
|
||||
pcscf_ipv4: "127.0.0.1"
|
||||
pcscf_ipv6: "fe80::7915:f408:1787:db8b"
|
||||
# the DNN you configure here should be configured in "dnns"
|
||||
# follows the SmfInfo datatype from 3GPP TS 29.510
|
||||
smf_info:
|
||||
sNssaiSmfInfoList:
|
||||
- sNssai: *embb_slice1
|
||||
dnnSmfInfoList:
|
||||
- dnn: "oai"
|
||||
local_subscription_infos:
|
||||
- single_nssai: *embb_slice1
|
||||
dnn: "oai"
|
||||
qos_profile:
|
||||
5qi: 9
|
||||
session_ambr_ul: "200Mbps"
|
||||
session_ambr_dl: "400Mbps"
|
||||
- single_nssai: *embb_slice2
|
||||
dnn: "oai"
|
||||
qos_profile:
|
||||
5qi: 9
|
||||
session_ambr_ul: "200Mbps"
|
||||
session_ambr_dl: "400Mbps"
|
||||
- single_nssai: *embb_slice3
|
||||
dnn: "oai"
|
||||
qos_profile:
|
||||
5qi: 9
|
||||
session_ambr_ul: "200Mbps"
|
||||
session_ambr_dl: "400Mbps"
|
||||
|
||||
upf:
|
||||
support_features:
|
||||
enable_bpf_datapath: no # If "on": BPF is used as datapath else simpleswitch is used, DEFAULT= off
|
||||
enable_snat: yes # If "on": Source natting is done for UE, DEFAULT= off
|
||||
remote_n6_gw: localhost # Dummy host since simple-switch does not use N6 GW
|
||||
upf_info:
|
||||
sNssaiUpfInfoList:
|
||||
- sNssai: *embb_slice1
|
||||
dnnUpfInfoList:
|
||||
- dnn: "oai"
|
||||
- sNssai: *embb_slice2
|
||||
dnnUpfInfoList:
|
||||
- dnn: "oai"
|
||||
- sNssai: *embb_slice3
|
||||
dnnUpfInfoList:
|
||||
- dnn: "oai"
|
||||
|
||||
## DNN configuration
|
||||
dnns:
|
||||
- dnn: "oai"
|
||||
pdu_session_type: "IPV4"
|
||||
ipv4_subnet: "12.1.1.0/24"
|
||||
@@ -6,7 +6,6 @@ services:
|
||||
container_name: rfsim5g-oai-gnb
|
||||
environment:
|
||||
USE_ADDITIONAL_OPTIONS: --phy-test --rfsim --rfsimulator.wait_timeout 20 --noS1 --log_config.global_log_options level,nocolor,time
|
||||
ASAN_OPTIONS: detect_leaks=0
|
||||
networks:
|
||||
public_net:
|
||||
ipv4_address: 192.168.71.140
|
||||
@@ -25,7 +24,6 @@ services:
|
||||
container_name: rfsim5g-oai-nr-ue
|
||||
environment:
|
||||
USE_ADDITIONAL_OPTIONS: --phy-test --rfsim --noS1 --reconfig-file etc/rrc/reconfig.raw --rbconfig-file etc/rrc/rbconfig.raw --rfsimulator.serveraddr 192.168.71.140 --log_config.global_log_options level,nocolor,time
|
||||
ASAN_OPTIONS: detect_leaks=0
|
||||
volumes:
|
||||
- ../../conf_files/nrue.uicc.conf:/opt/oai-nr-ue/etc/nr-ue.conf
|
||||
- rrc.config:/opt/oai-nr-ue/etc/rrc/
|
||||
|
||||
@@ -6,7 +6,6 @@ services:
|
||||
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
|
||||
ASAN_OPTIONS: detect_leaks=0
|
||||
networks:
|
||||
public_net:
|
||||
ipv4_address: 192.168.71.140
|
||||
@@ -25,7 +24,6 @@ services:
|
||||
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
|
||||
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/
|
||||
|
||||
@@ -6,7 +6,6 @@ services:
|
||||
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
|
||||
ASAN_OPTIONS: detect_leaks=0
|
||||
networks:
|
||||
public_net:
|
||||
ipv4_address: 192.168.71.140
|
||||
@@ -25,7 +24,6 @@ services:
|
||||
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
|
||||
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/
|
||||
|
||||
@@ -1,5 +1,14 @@
|
||||
version: '3.8'
|
||||
services:
|
||||
oai-nrf:
|
||||
container_name: "rfsim5g-oai-nrf"
|
||||
image: oaisoftwarealliance/oai-nrf:v1.5.0
|
||||
environment:
|
||||
- NRF_INTERFACE_NAME_FOR_SBI=eth0
|
||||
- TZ=Europe/Paris
|
||||
networks:
|
||||
public_net:
|
||||
ipv4_address: 192.168.71.130
|
||||
mysql:
|
||||
container_name: "rfsim5g-mysql"
|
||||
image: mysql:8.0
|
||||
@@ -22,36 +31,108 @@ services:
|
||||
ipv4_address: 192.168.71.131
|
||||
oai-amf:
|
||||
container_name: "rfsim5g-oai-amf"
|
||||
image: oaisoftwarealliance/oai-amf:v2.0.0
|
||||
image: oaisoftwarealliance/oai-amf:v1.5.0
|
||||
environment:
|
||||
- TZ=Europe/paris
|
||||
volumes:
|
||||
- ../5g_rfsimulator/mini_nonrf_config.yaml:/openair-amf/etc/config.yaml
|
||||
- MCC=208
|
||||
- MNC=99
|
||||
- REGION_ID=128
|
||||
- AMF_SET_ID=1
|
||||
- SERVED_GUAMI_MCC_0=208
|
||||
- SERVED_GUAMI_MNC_0=99
|
||||
- SERVED_GUAMI_REGION_ID_0=128
|
||||
- SERVED_GUAMI_AMF_SET_ID_0=1
|
||||
- SERVED_GUAMI_MCC_1=460
|
||||
- SERVED_GUAMI_MNC_1=11
|
||||
- SERVED_GUAMI_REGION_ID_1=10
|
||||
- SERVED_GUAMI_AMF_SET_ID_1=1
|
||||
- PLMN_SUPPORT_MCC=208
|
||||
- PLMN_SUPPORT_MNC=99
|
||||
- PLMN_SUPPORT_TAC=0x0001
|
||||
# Only one slice is defined (1, 0xFFFFFF).
|
||||
- SST_0=1
|
||||
- AMF_INTERFACE_NAME_FOR_NGAP=eth0
|
||||
- AMF_INTERFACE_NAME_FOR_N11=eth0
|
||||
# One single SMF instance
|
||||
- SMF_INSTANCE_ID_0=1
|
||||
- SMF_FQDN_0=oai-smf
|
||||
- SMF_IPV4_ADDR_0=192.168.71.133
|
||||
- SELECTED_0=true
|
||||
# mysql definition in AMF is mandatory in mini deployment.
|
||||
- MYSQL_SERVER=192.168.71.131
|
||||
- MYSQL_USER=root
|
||||
- MYSQL_PASS=linux
|
||||
- MYSQL_DB=oai_db
|
||||
# NF registration
|
||||
- NRF_IPV4_ADDRESS=192.168.71.130
|
||||
- NRF_FQDN=oai-nrf
|
||||
- NF_REGISTRATION=yes
|
||||
- SMF_SELECTION=yes
|
||||
- USE_FQDN_DNS=yes
|
||||
- USE_HTTP2=no
|
||||
depends_on:
|
||||
- oai-nrf
|
||||
- mysql
|
||||
networks:
|
||||
public_net:
|
||||
ipv4_address: 192.168.71.132
|
||||
oai-smf:
|
||||
container_name: "rfsim5g-oai-smf"
|
||||
image: oaisoftwarealliance/oai-smf:v2.0.0
|
||||
image: oaisoftwarealliance/oai-smf:v1.5.0
|
||||
environment:
|
||||
- TZ=Europe/Paris
|
||||
volumes:
|
||||
- ../5g_rfsimulator/mini_nonrf_config.yaml:/openair-smf/etc/config.yaml
|
||||
- SMF_INTERFACE_NAME_FOR_N4=eth0
|
||||
- SMF_INTERFACE_NAME_FOR_SBI=eth0
|
||||
- DEFAULT_DNS_IPV4_ADDRESS=172.21.3.100
|
||||
- DEFAULT_DNS_SEC_IPV4_ADDRESS=4.4.4.4
|
||||
- AMF_IPV4_ADDRESS=192.168.71.132
|
||||
- AMF_FQDN=oai-amf
|
||||
- UPF_IPV4_ADDRESS=192.168.71.134
|
||||
- UPF_FQDN_0=oai-spgwu
|
||||
- NRF_IPV4_ADDRESS=192.168.71.130
|
||||
- NRF_FQDN=oai-nrf
|
||||
- REGISTER_NRF=yes
|
||||
- DISCOVER_UPF=yes
|
||||
- USE_FQDN_DNS=yes
|
||||
- USE_LOCAL_SUBSCRIPTION_INFO=yes
|
||||
- UE_MTU=1500
|
||||
# Only one slice is defined (1, 0xFFFFFF)
|
||||
- DNN_NI0=oai
|
||||
- TYPE0=IPv4
|
||||
- DNN_RANGE0=12.1.1.2 - 12.1.1.127
|
||||
- NSSAI_SST0=1
|
||||
- SESSION_AMBR_UL0=200Mbps
|
||||
- SESSION_AMBR_DL0=400Mbps
|
||||
- DEFAULT_CSCF_IPV4_ADDRESS=127.0.0.1
|
||||
- ENABLE_USAGE_REPORTING=no
|
||||
depends_on:
|
||||
- oai-nrf
|
||||
- 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
|
||||
oai-spgwu:
|
||||
container_name: "rfsim5g-oai-spgwu"
|
||||
image: oaisoftwarealliance/oai-spgwu-tiny:v1.5.0
|
||||
environment:
|
||||
- TZ=Europe/Paris
|
||||
volumes:
|
||||
- ../5g_rfsimulator/mini_nonrf_config.yaml:/openair-upf/etc/config.yaml
|
||||
- SGW_INTERFACE_NAME_FOR_S1U_S12_S4_UP=eth0
|
||||
- SGW_INTERFACE_NAME_FOR_SX=eth0
|
||||
- PGW_INTERFACE_NAME_FOR_SGI=eth0
|
||||
- NETWORK_UE_NAT_OPTION=yes
|
||||
- NETWORK_UE_IP=12.1.1.0/24
|
||||
- ENABLE_5G_FEATURES=yes
|
||||
- REGISTER_NRF=yes
|
||||
- USE_FQDN_NRF=yes
|
||||
- UPF_FQDN_5G=oai-spgwu
|
||||
- NRF_IPV4_ADDRESS=192.168.71.130
|
||||
- NRF_FQDN=oai-nrf
|
||||
# Only one slice is defined (1, 0xFFFFFF)
|
||||
- NSSAI_SST_0=1
|
||||
- NSSAI_SD_0=0xffffff
|
||||
- DNN_0=oai
|
||||
depends_on:
|
||||
- oai-nrf
|
||||
- oai-smf
|
||||
cap_add:
|
||||
- NET_ADMIN
|
||||
@@ -72,7 +153,7 @@ services:
|
||||
"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
|
||||
- oai-spgwu
|
||||
networks:
|
||||
traffic_net:
|
||||
ipv4_address: 192.168.72.135
|
||||
@@ -87,7 +168,6 @@ services:
|
||||
container_name: rfsim5g-oai-gnb
|
||||
environment:
|
||||
USE_ADDITIONAL_OPTIONS: --sa --rfsim --log_config.global_log_options level,nocolor,time
|
||||
ASAN_OPTIONS: detect_leaks=0
|
||||
depends_on:
|
||||
- oai-ext-dn
|
||||
networks:
|
||||
|
||||
@@ -7,7 +7,7 @@ services:
|
||||
container_name: oai-gnb
|
||||
environment:
|
||||
TZ: Europe/Paris
|
||||
USE_ADDITIONAL_OPTIONS: --sa --tune-offset 20000000 -A 45 --log_config.global_log_options level,nocolor,time
|
||||
USE_ADDITIONAL_OPTIONS: --sa --tune-offset 20000000 --log_config.global_log_options level,nocolor,time
|
||||
volumes:
|
||||
- ../../conf_files/gnb.sa.band78.106prb.n310.7ds2u.conf:/opt/oai-gnb/etc/gnb.conf
|
||||
healthcheck:
|
||||
|
||||
@@ -8,7 +8,7 @@ services:
|
||||
#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.20.2 -r 106 --numerology 1 --band 78 -C 3511200000 --sa --ue-fo-compensation --ue-rxgain 65 --tune-offset 20000000 --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:
|
||||
|
||||
@@ -8,7 +8,7 @@ services:
|
||||
environment:
|
||||
USE_ADDITIONAL_OPTIONS: --sa --telnetsrv --telnetsrv.shrmod ci --log_config.global_log_options level,nocolor,time,line_num,function
|
||||
volumes:
|
||||
- ../../conf_files/gnb-cu.sa.f1.conf:/opt/oai-gnb/etc/gnb.conf
|
||||
- ../../conf_files/gnb-cu.sa.band78.106prb.usrpb200.conf:/opt/oai-gnb/etc/gnb.conf
|
||||
networks:
|
||||
public_net:
|
||||
ipv4_address: 192.168.68.194
|
||||
@@ -20,15 +20,15 @@ services:
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
|
||||
gnb_du_fdd:
|
||||
gnb_du_tdd:
|
||||
image: oai-gnb:latest
|
||||
privileged: true
|
||||
container_name: sa-du-b200-gnb
|
||||
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 --continuous-tx -E --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 1 --RUs.[0].att_rx 18 --RUs.[0].att_tx 18
|
||||
volumes:
|
||||
- ../../conf_files/gnb-du.sa.band1.52prb.usrpb210.conf:/opt/oai-gnb/etc/gnb.conf
|
||||
- ../../conf_files/gnb-du.sa.band78.106prb.usrpb200.conf:/opt/oai-gnb/etc/gnb.conf
|
||||
- /dev:/dev
|
||||
networks:
|
||||
public_net:
|
||||
|
||||
@@ -1,46 +0,0 @@
|
||||
#!/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
|
||||
|
||||
export NVIPC_DEBUG_EN=2
|
||||
|
||||
"$cuBB_Path"/build/cuPHY-CP/cuphycontroller/examples/cuphycontroller_scf "$argument"
|
||||
#Collect pcap
|
||||
"$cuBB_Path"/build/cuPHY-CP/gt_common_libs/nvIPC/tests/pcap/pcap_collect
|
||||
|
||||
cp -f nvipc.pcap /opt/cuBB/share
|
||||
cp -f /tmp/phy.log /opt/cuBB/share
|
||||
chmod 666 /opt/cuBB/share/nvipc.pcap
|
||||
chmod 666 /opt/cuBB/share/phy.log
|
||||
@@ -1,63 +0,0 @@
|
||||
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
|
||||
- ~/share:/opt/cuBB/share
|
||||
- /var/log/aerial:/var/log/aerial
|
||||
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"
|
||||
deploy:
|
||||
resources:
|
||||
reservations:
|
||||
devices:
|
||||
- driver: nvidia
|
||||
count: all
|
||||
capabilities:
|
||||
- gpu
|
||||
network_mode: host
|
||||
shm_size: 4096m
|
||||
stdin_open: true
|
||||
tty: true
|
||||
volumes:
|
||||
- ../../conf_files/vnf.sa.band78.fr1.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
|
||||
@@ -139,7 +139,7 @@ target_include_directories(secu_cn PRIVATE
|
||||
################################################################################
|
||||
set(util_SRC
|
||||
${OPENAIR_NAS_DIR}/COMMON/UTIL/device.c
|
||||
${OPENAIR_DIR}/common/utils/mem/memory.c
|
||||
${OPENAIR_NAS_DIR}/COMMON/UTIL/memory.c
|
||||
${OPENAIR_NAS_DIR}/COMMON/UTIL/nas_log.c
|
||||
${OPENAIR_NAS_DIR}/COMMON/UTIL/nas_timer.c
|
||||
${OPENAIR_NAS_DIR}/COMMON/UTIL/OctetString.c
|
||||
@@ -149,8 +149,19 @@ set(util_SRC
|
||||
${OPENAIR_NAS_DIR}/COMMON/UTIL/socket.c
|
||||
${OPENAIR_NAS_DIR}/COMMON/UTIL/stty.c
|
||||
)
|
||||
set(util_HDR
|
||||
${OPENAIR_NAS_DIR}/COMMON/UTIL/device.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/UTIL/memory.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/UTIL/nas_log.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/UTIL/nas_timer.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/UTIL/OctetString.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/UTIL/parser.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/UTIL/TLVDecoder.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/UTIL/TLVEncoder.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/UTIL/socket.h
|
||||
)
|
||||
|
||||
add_library(util ${util_SRC})
|
||||
add_library(util ${util_SRC} ${util_HDR})
|
||||
target_include_directories(util PRIVATE ${OPENAIR_NAS_DIR}/COMMON/UTIL
|
||||
${OPENAIR_NAS_DIR}/COMMON
|
||||
)
|
||||
@@ -167,7 +178,15 @@ set(api_user_SRC
|
||||
${OPENAIR_NAS_DIR}/UE/API/USER/user_indication.c
|
||||
)
|
||||
|
||||
add_library(api_user ${api_user_SRC})
|
||||
set(api_user_HDR
|
||||
${OPENAIR_NAS_DIR}/UE/API/USER/at_command.h
|
||||
${OPENAIR_NAS_DIR}/UE/API/USER/at_error.h
|
||||
${OPENAIR_NAS_DIR}/UE/API/USER/at_response.h
|
||||
${OPENAIR_NAS_DIR}/UE/API/USER/user_api.h
|
||||
${OPENAIR_NAS_DIR}/UE/API/USER/user_indication.h
|
||||
)
|
||||
|
||||
add_library(api_user ${api_user_SRC} ${api_user_HDR})
|
||||
target_include_directories(api_user PRIVATE ${OPENAIR_NAS_DIR}/UE/API/USER
|
||||
${OPENAIR_NAS_DIR}/COMMON
|
||||
${OPENAIR_NAS_DIR}/UE
|
||||
@@ -181,7 +200,13 @@ set(api_usim_SRC
|
||||
${OPENAIR_NAS_DIR}/UE/API/USIM/usim_api.c
|
||||
)
|
||||
|
||||
add_library(api_usim ${api_usim_SRC})
|
||||
set(api_usim_HDR
|
||||
${OPENAIR_NAS_DIR}/UE/API/USIM/aka_functions.h
|
||||
${OPENAIR_NAS_DIR}/UE/API/USIM/usim_api.h
|
||||
|
||||
)
|
||||
|
||||
add_library(api_usim ${api_usim_SRC} ${api_usim_HDR})
|
||||
target_include_directories(api_usim PRIVATE ${OPENAIR_NAS_DIR}/UE/API/USIM)
|
||||
|
||||
################################################################################
|
||||
@@ -192,8 +217,13 @@ set(api_network_SRC
|
||||
${OPENAIR_NAS_DIR}/COMMON/API/NETWORK/nas_message.c
|
||||
${OPENAIR_NAS_DIR}/COMMON/API/NETWORK/network_api.c
|
||||
)
|
||||
set(api_network_HDR
|
||||
${OPENAIR_NAS_DIR}/COMMON/API/NETWORK/as_message.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/API/NETWORK/nas_message.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/API/NETWORK/network_api.h
|
||||
)
|
||||
|
||||
add_library(api_network ${api_network_SRC})
|
||||
add_library(api_network ${api_network_SRC} ${api_network_HDR})
|
||||
target_include_directories(api_network PRIVATE ${OPENAIR_NAS_DIR}/COMMON/API/NETWORK
|
||||
${OPENAIR_NAS_DIR}/COMMON
|
||||
)
|
||||
@@ -281,7 +311,60 @@ set(emm_SRC
|
||||
|
||||
)
|
||||
|
||||
add_library(emm ${emm_SRC})
|
||||
set(emm_HDR
|
||||
${OPENAIR_NAS_DIR}/UE/EMM/emmData.h
|
||||
${OPENAIR_NAS_DIR}/UE/EMM/emm_main.h
|
||||
${OPENAIR_NAS_DIR}/UE/EMM/emm_proc.h
|
||||
${OPENAIR_NAS_DIR}/UE/EMM/IdleMode.h
|
||||
${OPENAIR_NAS_DIR}/UE/EMM/LowerLayer.h
|
||||
|
||||
${OPENAIR_NAS_DIR}/COMMON/EMM/MSG/AttachAccept.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/EMM/MSG/AttachComplete.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/EMM/MSG/AttachReject.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/EMM/MSG/AttachRequest.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/EMM/MSG/AuthenticationFailure.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/EMM/MSG/AuthenticationReject.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/EMM/MSG/AuthenticationRequest.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/EMM/MSG/AuthenticationResponse.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/EMM/MSG/CsServiceNotification.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/EMM/MSG/DetachAccept.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/EMM/MSG/DetachRequest.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/EMM/MSG/DownlinkNasTransport.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/EMM/MSG/emm_cause.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/EMM/MSG/EmmInformation.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/EMM/MSG/emm_msgDef.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/EMM/MSG/emm_msg.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/EMM/MSG/EmmStatus.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/EMM/MSG/ExtendedServiceRequest.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/EMM/MSG/GutiReallocationCommand.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/EMM/MSG/GutiReallocationComplete.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/EMM/MSG/IdentityRequest.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/EMM/MSG/IdentityResponse.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/EMM/MSG/NASSecurityModeCommand.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/EMM/MSG/NASSecurityModeComplete.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/EMM/MSG/SecurityModeReject.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/EMM/MSG/ServiceReject.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/EMM/MSG/ServiceRequest.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/EMM/MSG/TrackingAreaUpdateAccept.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/EMM/MSG/TrackingAreaUpdateComplete.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/EMM/MSG/TrackingAreaUpdateReject.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/EMM/MSG/TrackingAreaUpdateRequest.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/EMM/MSG/UplinkNasTransport.h
|
||||
|
||||
${OPENAIR_NAS_DIR}/UE/EMM/SAP/emm_asDef.h
|
||||
${OPENAIR_NAS_DIR}/UE/EMM/SAP/emm_as.h
|
||||
${OPENAIR_NAS_DIR}/UE/EMM/SAP/emm_esmDef.h
|
||||
${OPENAIR_NAS_DIR}/UE/EMM/SAP/emm_esm.h
|
||||
${OPENAIR_NAS_DIR}/UE/EMM/SAP/emm_fsm.h
|
||||
${OPENAIR_NAS_DIR}/UE/EMM/SAP/emm_recv.h
|
||||
${OPENAIR_NAS_DIR}/UE/EMM/SAP/emm_regDef.h
|
||||
${OPENAIR_NAS_DIR}/UE/EMM/SAP/emm_reg.h
|
||||
${OPENAIR_NAS_DIR}/UE/EMM/SAP/emm_sap.h
|
||||
${OPENAIR_NAS_DIR}/UE/EMM/SAP/emm_send.h
|
||||
|
||||
)
|
||||
|
||||
add_library(emm ${emm_SRC} ${emm_HDR})
|
||||
|
||||
target_include_directories(emm PRIVATE
|
||||
${OPENAIR_DIR}/common/utils
|
||||
@@ -340,7 +423,41 @@ set(esm_SRC
|
||||
${OPENAIR_NAS_DIR}/UE/ESM/SAP/esm_send.c
|
||||
)
|
||||
|
||||
add_library(esm ${esm_SRC})
|
||||
set(esm_HDR
|
||||
${OPENAIR_TARGETS}/COMMON/openairinterface5g_limits.h
|
||||
${OPENAIR_NAS_DIR}/UE/ESM/esm_main.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/ESM/MSG/ActivateDedicatedEpsBearerContextAccept.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/ESM/MSG/ActivateDedicatedEpsBearerContextReject.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/ESM/MSG/ActivateDedicatedEpsBearerContextRequest.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/ESM/MSG/ActivateDefaultEpsBearerContextAccept.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/ESM/MSG/ActivateDefaultEpsBearerContextReject.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/ESM/MSG/ActivateDefaultEpsBearerContextRequest.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/ESM/MSG/BearerResourceAllocationReject.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/ESM/MSG/BearerResourceAllocationRequest.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/ESM/MSG/BearerResourceModificationReject.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/ESM/MSG/BearerResourceModificationRequest.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/ESM/MSG/DeactivateEpsBearerContextAccept.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/ESM/MSG/DeactivateEpsBearerContextRequest.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/ESM/MSG/esm_cause.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/ESM/MSG/EsmInformationRequest.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/ESM/MSG/EsmInformationResponse.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/ESM/MSG/esm_msgDef.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/ESM/MSG/esm_msg.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/ESM/MSG/EsmStatus.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/ESM/MSG/ModifyEpsBearerContextAccept.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/ESM/MSG/ModifyEpsBearerContextReject.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/ESM/MSG/ModifyEpsBearerContextRequest.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/ESM/MSG/PdnConnectivityReject.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/ESM/MSG/PdnConnectivityRequest.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/ESM/MSG/PdnDisconnectReject.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/ESM/MSG/PdnDisconnectRequest.h
|
||||
${OPENAIR_NAS_DIR}/UE/ESM/SAP/esm_recv.h
|
||||
${OPENAIR_NAS_DIR}/UE/ESM/SAP/esm_sap.h
|
||||
${OPENAIR_NAS_DIR}/UE/ESM/SAP/esm_send.h
|
||||
${OPENAIR_DIR}/common/utils/utils.h
|
||||
)
|
||||
|
||||
add_library(esm ${esm_SRC} ${esm_HDR})
|
||||
|
||||
target_include_directories(esm PRIVATE
|
||||
${OPENAIR_DIR}/common/utils
|
||||
@@ -436,8 +553,89 @@ set(ies_SRC
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES/UeSecurityCapability.c
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES/VoiceDomainPreferenceAndUeUsageSetting.c
|
||||
)
|
||||
set(ies_HDR
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES/AccessPointName.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES/AdditionalUpdateResult.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES/AdditionalUpdateType.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES/ApnAggregateMaximumBitRate.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES/AuthenticationFailureParameter.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES/AuthenticationParameterAutn.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES/AuthenticationParameterRand.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES/AuthenticationResponseParameter.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES/CipheringKeySequenceNumber.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES/Cli.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES/CsfbResponse.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES/DaylightSavingTime.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES/DetachType.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES/DrxParameter.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES/EmergencyNumberList.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES/EmmCause.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES/EpsAttachResult.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES/EpsAttachType.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES/EpsBearerContextStatus.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES/EpsBearerIdentity.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES/EpsMobileIdentity.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES/EpsNetworkFeatureSupport.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES/EpsQualityOfService.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES/EpsUpdateResult.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES/EpsUpdateType.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES/EsmCause.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES/EsmInformationTransferFlag.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES/EsmMessageContainer.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES/GprsTimer.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES/GutiType.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES/IdentityType2.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES/ImeisvRequest.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES/KsiAndSequenceNumber.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES/LcsClientIdentity.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES/LcsIndicator.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES/LinkedEpsBearerIdentity.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES/LlcServiceAccessPointIdentifier.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES/LocationAreaIdentification.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES/MessageType.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES/MobileIdentity.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES/MobileStationClassmark2.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES/MobileStationClassmark3.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES/MsNetworkCapability.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES/MsNetworkFeatureSupport.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES/NasKeySetIdentifier.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES/NasMessageContainer.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES/NasRequestType.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES/NasSecurityAlgorithms.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES/NetworkName.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES/Nonce.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES/PacketFlowIdentifier.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES/PagingIdentity.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES/PdnAddress.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES/PdnType.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES/PlmnList.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES/ProcedureTransactionIdentity.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES/ProtocolConfigurationOptions.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES/ProtocolDiscriminator.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES/PTmsiSignature.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES/QualityOfService.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES/RadioPriority.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES/SecurityHeaderType.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES/ServiceType.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES/ShortMac.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES/SsCode.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES/SupportedCodecList.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES/TimeZoneAndTime.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES/TimeZone.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES/TmsiStatus.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES/TrackingAreaIdentity.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES/TrackingAreaIdentityList.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES/TrafficFlowAggregateDescription.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES/TrafficFlowTemplate.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES/TransactionIdentifier.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES/UeNetworkCapability.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES/UeRadioCapabilityInformationUpdateNeeded.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES/UeSecurityCapability.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES/VoiceDomainPreferenceAndUeUsageSetting.h
|
||||
|
||||
add_library(ies ${ies_SRC})
|
||||
)
|
||||
|
||||
add_library(ies ${ies_SRC} ${ies_HDR})
|
||||
|
||||
target_include_directories(ies PRIVATE
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES
|
||||
|
||||
@@ -46,7 +46,7 @@ BUILD_DOXYGEN=0
|
||||
DISABLE_HARDWARE_DEPENDENCY="False"
|
||||
CMAKE_BUILD_TYPE="RelWithDebInfo"
|
||||
CMAKE_CMD="$CMAKE"
|
||||
OPTIONAL_LIBRARIES="telnetsrv enbscope uescope nrscope nrqtscope ldpc_cuda ldpc_t2 websrv oai_iqplayer"
|
||||
OPTIONAL_LIBRARIES="telnetsrv enbscope uescope nrscope nrqtscope ldpc_cuda ldpc_t1 ldpc_t2 websrv oai_iqplayer"
|
||||
TARGET_LIST=""
|
||||
|
||||
function print_help() {
|
||||
@@ -93,10 +93,10 @@ Options:
|
||||
--UE-gen-nvram [output path]
|
||||
Specify gen_nvram_path (default \"$gen_nvram_path\")
|
||||
-w | --hardware
|
||||
USRP, BLADERF, LMSSDR, IRIS, SIMU, AW2SORI, AERIAL, None (Default)
|
||||
USRP, BLADERF, LMSSDR, IRIS, SIMU, AW2SORI, 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
|
||||
Selects the transport protocol type, options: None, Ethernet, benetel4g, benetel5g
|
||||
-P | --phy_simulators
|
||||
Makes the unitary tests Layer 1 simulators
|
||||
-S | --core_simulators
|
||||
@@ -158,8 +158,6 @@ Options:
|
||||
Enable the memory sanitizer on all targets. Requires clang, and is
|
||||
incompatible with ASan/UBSan. To build, issue:
|
||||
CC=/usr/bin/clang CXX=/usr/bin/clang++ ./build_oai ... --sanitize-memory
|
||||
--sanitize-thread | -fsanitize=thread
|
||||
Enable the thread sanitizer on all targets
|
||||
-h | --help
|
||||
Print this help"
|
||||
}
|
||||
@@ -248,7 +246,7 @@ function main() {
|
||||
RU=1
|
||||
TARGET_LIST="$TARGET_LIST oairu"
|
||||
echo_info "Will compile RRU"
|
||||
shift;;
|
||||
shift;;
|
||||
--UE)
|
||||
UE=1
|
||||
TARGET_LIST="$TARGET_LIST lte-uesoftmodem"
|
||||
@@ -289,10 +287,6 @@ 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")
|
||||
;;
|
||||
*)
|
||||
@@ -306,14 +300,10 @@ function main() {
|
||||
TARGET_LIST="$TARGET_LIST oai_eth_transpro"
|
||||
CMAKE_CMD="$CMAKE_CMD -DOAI_${2^^}=ON" # ^^ makes uppercase
|
||||
;;
|
||||
"benetel4g" | "benetel5g" | "oran_fhlib_4g")
|
||||
"benetel4g" | "benetel5g")
|
||||
TARGET_LIST="$TARGET_LIST $2"
|
||||
CMAKE_CMD="$CMAKE_CMD -DOAI_${2^^}=ON" # ^^ makes uppercase
|
||||
;;
|
||||
"oran_fhlib_5g")
|
||||
TARGET_LIST="$TARGET_LIST $2"
|
||||
CMAKE_CMD="$CMAKE_CMD -DOAI_FHI72=ON"
|
||||
;;
|
||||
"None")
|
||||
;;
|
||||
*)
|
||||
@@ -395,7 +385,7 @@ function main() {
|
||||
echo_info "Enabling build of optional shared library $lib"
|
||||
done
|
||||
fi
|
||||
shift 2;;
|
||||
shift 2;;
|
||||
--noavx512)
|
||||
CMAKE_CMD="$CMAKE_CMD -DAVX512=OFF"
|
||||
echo_info "Disabling AVX512 instructions"
|
||||
@@ -426,14 +416,11 @@ function main() {
|
||||
CMAKE_CMD="$CMAKE_CMD -DTRACE_ASN1C_ENC_DEC=ON"
|
||||
echo_info "Enabling asn1c internal traces via OAI logging system"
|
||||
shift 1;;
|
||||
--sanitize-thread | -fthread=address)
|
||||
CMAKE_CMD="$CMAKE_CMD -DSANITIZE_THREAD=True"
|
||||
shift;;
|
||||
-h | --help)
|
||||
print_help
|
||||
exit 1;;
|
||||
*)
|
||||
print_help
|
||||
*)
|
||||
print_help
|
||||
echo_fatal "Unknown option $1"
|
||||
break;;
|
||||
esac
|
||||
@@ -462,7 +449,7 @@ function main() {
|
||||
if [ ! -v BUILD_UHD_FROM_SOURCE ] && [ ! "$DISABLE_HARDWARE_DEPENDENCY" == "True" ]; then
|
||||
install_usrp_uhd_driver $UHD_IMAGES_DIR
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
if [ "$HW" == "OAI_BLADERF" ] ; then
|
||||
echo_info "installing packages for BLADERF support"
|
||||
check_install_bladerf_driver
|
||||
@@ -511,12 +498,6 @@ function main() {
|
||||
echo_info "Built Doxygen based documentation. The documentation file is located here: $OPENAIR_DIR/$BUILD_DIR/build/html/index.html"
|
||||
fi
|
||||
|
||||
# TODO: once we got the CMakeLists.txt file done for the ORAN files, remove the following lines
|
||||
if [[ $TARGET_LIST =~ "oran_fhlib_5g" ]]; then
|
||||
rm -f liboai_transpro.so
|
||||
ln -s liboran_fhlib_5g.so liboai_transpro.so
|
||||
fi
|
||||
|
||||
if [ "$UE" = 1 ] ; then
|
||||
|
||||
echo_info "Compiling UE specific part"
|
||||
|
||||
@@ -28,12 +28,24 @@ set(CONF2UEDATA_LIB_SRC
|
||||
${OPENAIR_DIR}/openair3/NAS/TOOLS/display.c
|
||||
${OPENAIR_DIR}/openair3/NAS/UE/API/USIM/usim_api.c
|
||||
${OPENAIR_DIR}/openair3/NAS/UE/API/USIM/aka_functions.c
|
||||
${OPENAIR_DIR}/common/utils/mem/memory.c
|
||||
${OPENAIR_DIR}/openair3/NAS/COMMON/UTIL/memory.c
|
||||
${OPENAIR_DIR}/openair3/NAS/COMMON/UTIL/OctetString.c
|
||||
${OPENAIR_DIR}/openair3/NAS/COMMON/UTIL/TLVEncoder.c
|
||||
${OPENAIR_DIR}/common/utils/utils.c
|
||||
)
|
||||
|
||||
set(conf2uedata_HDR
|
||||
${OPENAIR_DIR}/openair3/NAS/TOOLS/conf2uedata.h
|
||||
${OPENAIR_DIR}/openair3/NAS/TOOLS/conf_emm.h
|
||||
${OPENAIR_DIR}/openair3/NAS/UE/API/USIM/usim_api.h
|
||||
${OPENAIR_DIR}/openair3/NAS/UE/API/USIM/aka_functions.h
|
||||
${OPENAIR_DIR}/openair3/NAS/COMMON/UTIL/memory.h
|
||||
${OPENAIR_DIR}/openair3/NAS/COMMON/UTIL/nas_log.h
|
||||
${OPENAIR_DIR}/openair3/NAS/COMMON/UTIL/OctetString.h
|
||||
${OPENAIR_DIR}/openair3/NAS/COMMON/UTIL/TLVEncoder.h
|
||||
${OPENAIR_DIR}/common/utils/utils.h
|
||||
)
|
||||
|
||||
include_directories(
|
||||
${OPENAIR_DIR}/common/utils
|
||||
${OPENAIR_DIR}/openair3/NAS/UE
|
||||
@@ -53,7 +65,7 @@ set(conf2uedata_SRC
|
||||
${CONF2UEDATA_LIB_SRC}
|
||||
)
|
||||
|
||||
add_executable(conf2uedata ${conf2uedata_SRC} )
|
||||
add_executable(conf2uedata ${conf2uedata_SRC} ${conf2uedata_HDR} )
|
||||
target_link_libraries(conf2uedata ${CONFIG_LIBRARIES})
|
||||
|
||||
# usim binary
|
||||
@@ -64,7 +76,7 @@ set(usim_SRC
|
||||
)
|
||||
|
||||
|
||||
add_executable(usim ${usim_SRC} )
|
||||
add_executable(usim ${usim_SRC} ${conf2uedata_HDR} )
|
||||
target_link_libraries(usim ${CONFIG_LIBRARIES})
|
||||
|
||||
# nvram binary
|
||||
@@ -75,5 +87,5 @@ set(nvram_SRC
|
||||
)
|
||||
|
||||
|
||||
add_executable(nvram ${nvram_SRC})
|
||||
add_executable(nvram ${nvram_SRC} ${conf2uedata_HDR} )
|
||||
target_link_libraries(nvram ${CONFIG_LIBRARIES})
|
||||
|
||||
@@ -1,140 +0,0 @@
|
||||
#
|
||||
# Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
# contributor license agreements. See the NOTICE file distributed with
|
||||
# this work for additional information regarding copyright ownership.
|
||||
# The OpenAirInterface Software Alliance licenses this file to You under
|
||||
# the OAI Public License, Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.openairinterface.org/?page_id=698
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
# ------------------------------------------------------------------------------
|
||||
# For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
# contact@openairinterface.org
|
||||
#
|
||||
|
||||
# FindXran
|
||||
# -------
|
||||
#
|
||||
# Finds the xran library. Note that the library number is as follows:
|
||||
# - oran_bronze_release_v1.1 -> 2.1.1 (B = second letter)
|
||||
# - oran_e_maintenance_release_v1.0 -> 5.1.0
|
||||
# the version is currently hardcoded to 5.1.0
|
||||
#
|
||||
# Required options
|
||||
# ^^^^^^^^^^^^^^^^
|
||||
#
|
||||
# ``xran_LOCATION``
|
||||
# The location of the library.
|
||||
#
|
||||
# Imported Targets
|
||||
# ^^^^^^^^^^^^^^^^
|
||||
#
|
||||
# This module provides the following imported targets, if found:
|
||||
#
|
||||
# ``xran::xran``
|
||||
# The xran library
|
||||
#
|
||||
# Result Variables
|
||||
# ^^^^^^^^^^^^^^^^
|
||||
#
|
||||
# This will define the following variables:
|
||||
#
|
||||
# ``xran_FOUND``
|
||||
# True if the system has the xran library.
|
||||
# ``xran_VERSION``
|
||||
# The version of the xran library which was found.
|
||||
# ``xran_INCLUDE_DIRS``
|
||||
# Include directories needed to use xran.
|
||||
# ``xran_LIBRARIES``
|
||||
# Libraries needed to link to xran.
|
||||
#
|
||||
# Cache Variables
|
||||
# ^^^^^^^^^^^^^^^
|
||||
#
|
||||
# The following cache variables may also be set:
|
||||
#
|
||||
# ``xran_INCLUDE_DIR``
|
||||
# The directory containing ``foo.h``.
|
||||
# ``xran_LIBRARY``
|
||||
# The path to the xran library.
|
||||
|
||||
option(xran_LOCATION "directory of XRAN library" "")
|
||||
if (NOT xran_LOCATION)
|
||||
message(FATAL_ERROR "xran_LOCATION required")
|
||||
endif()
|
||||
if (NOT EXISTS ${xran_LOCATION})
|
||||
message(FATAL_ERROR "no such directory: ${xran_LOCATION}")
|
||||
endif()
|
||||
|
||||
find_path(xran_INCLUDE_DIR
|
||||
NAMES
|
||||
xran_common.h
|
||||
xran_compression.h
|
||||
xran_cp_api.h
|
||||
xran_ecpri_owd_measurements.h
|
||||
xran_fh_o_du.h
|
||||
xran_pkt.h
|
||||
xran_pkt_up.h
|
||||
xran_sync_api.h
|
||||
PATHS ${xran_LOCATION}
|
||||
PATH_SUFFIXES api
|
||||
)
|
||||
find_library(xran_LIBRARY
|
||||
NAMES xran
|
||||
PATHS ${xran_LOCATION}/build
|
||||
)
|
||||
if (NOT xran_LIBRARY)
|
||||
message(FATAL_ERROR "could not detect xran build artifacts at ${xran_LOCATION}/build")
|
||||
endif()
|
||||
|
||||
set(xran_VERSION_FILE "${xran_LOCATION}/../app/src/common.h")
|
||||
if(NOT EXISTS ${xran_VERSION_FILE})
|
||||
message(FATAL_ERROR "could not find xran version file at ${xran_VERSION_FILE}")
|
||||
endif()
|
||||
|
||||
file(STRINGS ${xran_VERSION_FILE} xran_VERSION_LINE REGEX "^#define[ \t]+VERSIONX[ \t]+\"[a-z_.0-9]+\"$")
|
||||
string(REGEX REPLACE "^#define[ \t]+VERSIONX[ \t]+\"([a-z_.0-9]+)\"$" "\\1" xran_VERSION_STRING "${xran_VERSION_LINE}")
|
||||
message(STATUS "Found xran release ${xran_VERSION_STRING}")
|
||||
set(xran_VERSION "NOTFOUND")
|
||||
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)
|
||||
endif()
|
||||
unset(xran_VERSION_LINE)
|
||||
unset(xran_VERSION_STRING)
|
||||
unset(xran_VERSION_FILE)
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(xran
|
||||
FOUND_VAR xran_FOUND
|
||||
REQUIRED_VARS
|
||||
xran_LIBRARY
|
||||
xran_INCLUDE_DIR
|
||||
VERSION_VAR xran_VERSION
|
||||
)
|
||||
|
||||
if(xran_FOUND)
|
||||
set(xran_LIBRARIES ${xran_LIBRARY})
|
||||
set(xran_INCLUDE_DIRS ${xran_INCLUDE_DIR})
|
||||
endif()
|
||||
|
||||
if(xran_FOUND AND NOT TARGET xran::xran)
|
||||
add_library(xran::xran UNKNOWN IMPORTED)
|
||||
set_target_properties(xran::xran PROPERTIES
|
||||
IMPORTED_LOCATION "${xran_LIBRARY}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${xran_INCLUDE_DIR}"
|
||||
)
|
||||
endif()
|
||||
|
||||
mark_as_advanced(
|
||||
xran_INCLUDE_DIR
|
||||
xran_LIBRARY
|
||||
)
|
||||
@@ -667,8 +667,6 @@ install_asn1c_from_source(){
|
||||
git clone https://github.com/mouse07410/asn1c /tmp/asn1c
|
||||
cd /tmp/asn1c
|
||||
git checkout vlm_master
|
||||
# Showing which version is used
|
||||
git log -n1
|
||||
autoreconf -iv
|
||||
./configure --prefix /opt/asn1c/
|
||||
make -j`nproc`
|
||||
|
||||
@@ -1,76 +0,0 @@
|
||||
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,443 +0,0 @@
|
||||
diff --git a/fhi_lib/app/src/common.h b/fhi_lib/app/src/common.h
|
||||
index 7508117..a93c085 100644
|
||||
--- a/fhi_lib/app/src/common.h
|
||||
+++ b/fhi_lib/app/src/common.h
|
||||
@@ -28,7 +28,7 @@
|
||||
#include <rte_common.h>
|
||||
#include <rte_mbuf.h>
|
||||
|
||||
-#define VERSIONX "oran_e_maintenance_release_v1.0"
|
||||
+#define VERSIONX "oran_e_maintenance_release_v1.1"
|
||||
|
||||
#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
|
||||
--- a/fhi_lib/lib/Makefile
|
||||
+++ b/fhi_lib/lib/Makefile
|
||||
@@ -23,11 +23,11 @@ MYCUSTOMSPACE1='------------------------------------------------------------'
|
||||
##############################################################
|
||||
# Tools configuration
|
||||
##############################################################
|
||||
-CC := icc
|
||||
-CPP := icpc
|
||||
+CC := gcc
|
||||
+CPP := g++
|
||||
AS := as
|
||||
AR := ar
|
||||
-LD := icc
|
||||
+LD := gcc
|
||||
OBJDUMP := objdump
|
||||
|
||||
ifeq ($(SHELL),cmd.exe)
|
||||
@@ -95,8 +95,7 @@ CPP_SRC = $(SRC_DIR)/xran_compression.cpp \
|
||||
$(SRC_DIR)/xran_bfp_cplane32.cpp \
|
||||
$(SRC_DIR)/xran_bfp_cplane64.cpp \
|
||||
$(SRC_DIR)/xran_bfp_uplane_9b16rb.cpp \
|
||||
- $(SRC_DIR)/xran_bfp_uplane.cpp \
|
||||
- $(SRC_DIR)/xran_mod_compression.cpp
|
||||
+ $(SRC_DIR)/xran_bfp_uplane.cpp
|
||||
|
||||
CPP_SRC_SNC = $(SRC_DIR)/xran_compression_snc.cpp \
|
||||
$(SRC_DIR)/xran_bfp_cplane8_snc.cpp \
|
||||
@@ -112,12 +111,12 @@ CC_FLAGS += -std=gnu11 -Wall -Wno-deprecated-declarations \
|
||||
-fPIC \
|
||||
-Wall \
|
||||
-Wimplicit-function-declaration \
|
||||
- -g -O3 -wd1786 -mcmodel=large
|
||||
+ -g -O -mavx512bw -march=skylake-avx512 -mtune=skylake-avx512#--wd1786 -mcmodel=large
|
||||
|
||||
-CPP_FLAGS := -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -D_GNU_SOURCE -D_REENTRANT -pipe -no-prec-div \
|
||||
- -no-prec-div -fp-model fast=2 -fPIC \
|
||||
- -no-prec-sqrt -falign-functions=16 -fast-transcendentals \
|
||||
- -Werror -Wno-unused-variable -std=c++14 -mcmodel=large
|
||||
+CPP_FLAGS := -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -D_GNU_SOURCE -D_REENTRANT -pipe \
|
||||
+ -fPIC \
|
||||
+ -falign-functions=16 \
|
||||
+ -Werror -Wno-unused-variable -std=c++14 -mcmodel=large -mavx512bw -march=skylake-avx512 -mtune=skylake-avx512
|
||||
|
||||
INC := -I$(API_DIR) -I$(ETH_DIR) -I$(SRC_DIR) -I$(RTE_INC)
|
||||
DEF :=
|
||||
@@ -150,8 +149,8 @@ CPP_SNC_OBJTARGETS := $(addprefix $(PROJECT_OBJ_DIR)/,$(CPP_OBJS_SNC))
|
||||
|
||||
AS_OBJTARGETS := $(addprefix $(PROJECT_OBJ_DIR)/,$(AS_OBJS))
|
||||
#-qopt-report=5 -qopt-matmul -qopt-report-phase=all
|
||||
-CPP_COMP := -O3 -DNDEBUG -xcore-avx512 -fPIE -restrict -fasm-blocks
|
||||
-CPP_COMP_SNC := -O3 -DNDEBUG -march=icelake-server -fPIE -restrict -fasm-blocks
|
||||
+CPP_COMP := -O3 -DNDEBUG -fPIE
|
||||
+CPP_COMP_SNC := -O3 -DNDEBUG -march=icelake-server -fPIE
|
||||
CC_FLAGS_FULL := $(CC_FLAGS) $(INC) $(DEF)
|
||||
CPP_FLAGS_FULL := $(CPP_FLAGS) $(CPP_COMP) $(INC) $(DEF)
|
||||
CPP_FLAGS_FULL_SNC := $(CPP_FLAGS) $(CPP_COMP_SNC) $(INC) $(DEF)
|
||||
diff --git a/fhi_lib/lib/api/xran_fh_o_du.h b/fhi_lib/lib/api/xran_fh_o_du.h
|
||||
index 7419ae1..a85f973 100644
|
||||
--- a/fhi_lib/lib/api/xran_fh_o_du.h
|
||||
+++ b/fhi_lib/lib/api/xran_fh_o_du.h
|
||||
@@ -1104,6 +1104,30 @@ int32_t xran_reg_physide_cb(void *pHandle, xran_fh_tti_callback_fn Cb, void *cbP
|
||||
*/
|
||||
int32_t xran_get_slot_idx (uint32_t PortId, uint32_t *nFrameIdx, uint32_t *nSubframeIdx, uint32_t *nSlotIdx, uint64_t *nSecond);
|
||||
|
||||
+/**
|
||||
+ * @ingroup xran
|
||||
+ *
|
||||
+ * Function returns Frame, Subframe, Slot Number based on rx_tti
|
||||
+ *
|
||||
+ * @param tti
|
||||
+ * tti for which to compute Frame, Subframe, Slot
|
||||
+ *
|
||||
+ * @param nFrameIdx
|
||||
+ * Pointer to Frame number [0-99]
|
||||
+ *
|
||||
+ * @param nSubframeIdx
|
||||
+ * Pointer to Subframe number [0-10]
|
||||
+ *
|
||||
+ * @param nSlotIdx
|
||||
+ * Pointer to Slot number [0-7]
|
||||
+ *
|
||||
+ * @param nSecond
|
||||
+ * Pointer to current UTC second
|
||||
+ *
|
||||
+ * @return
|
||||
+ * current TTI number [0-7999]
|
||||
+ */
|
||||
+int32_t xran_get_slot_idx_from_tti (uint32_t tti, uint32_t *nFrameIdx, uint32_t *nSubframeIdx, uint32_t * nSlotIdx, uint64_t *nSecond);
|
||||
/**
|
||||
* @ingroup xran
|
||||
*
|
||||
diff --git a/fhi_lib/lib/api/xran_up_api.h b/fhi_lib/lib/api/xran_up_api.h
|
||||
index 7d3afc5..3e00c5a 100644
|
||||
--- a/fhi_lib/lib/api/xran_up_api.h
|
||||
+++ b/fhi_lib/lib/api/xran_up_api.h
|
||||
@@ -80,6 +80,7 @@ int32_t xran_extract_iq_samples(struct rte_mbuf *mbuf,
|
||||
uint8_t *subframe_id,
|
||||
uint8_t *slot_id,
|
||||
uint8_t *symb_id,
|
||||
+ uint8_t *filter_id,
|
||||
union ecpri_seq_id *seq_id,
|
||||
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
|
||||
--- 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,
|
||||
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");
|
||||
+ printf("Created ring %s on core %d\n",ring_name,*lcore_id);
|
||||
for(qi = 0; qi < io_cfg->num_rxq; qi++) {
|
||||
snprintf(ring_name, RTE_DIM(ring_name), "%s_%d_%d", "rx_ring_cp", i, qi);
|
||||
ctx->rx_ring[i][qi] = rte_ring_create(ring_name, NUM_MBUFS_RING_TRX,
|
||||
rte_lcore_to_socket_id(*lcore_id), RING_F_SP_ENQ);
|
||||
PANIC_ON(ctx->rx_ring[i][qi] == NULL, "failed to allocate rx ring");
|
||||
+ printf("Created ring %s on core %d\n",ring_name,*lcore_id);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
@@ -553,7 +555,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");
|
||||
- printf("created %s\n", ring_name);
|
||||
+ printf("created %s on core %d\n", ring_name, *lcore_id);
|
||||
}
|
||||
|
||||
return 1;
|
||||
diff --git a/fhi_lib/lib/src/xran_bfp_ref.cpp b/fhi_lib/lib/src/xran_bfp_ref.cpp
|
||||
index e6d3067..8e0abee 100644
|
||||
--- a/fhi_lib/lib/src/xran_bfp_ref.cpp
|
||||
+++ b/fhi_lib/lib/src/xran_bfp_ref.cpp
|
||||
@@ -29,6 +29,7 @@
|
||||
#include <complex>
|
||||
#include <algorithm>
|
||||
#include <limits.h>
|
||||
+#include <limits>
|
||||
|
||||
static int16_t saturateAbs(int16_t inVal)
|
||||
{
|
||||
diff --git a/fhi_lib/lib/src/xran_bfp_uplane.cpp b/fhi_lib/lib/src/xran_bfp_uplane.cpp
|
||||
index a345df4..7831fa0 100644
|
||||
--- a/fhi_lib/lib/src/xran_bfp_uplane.cpp
|
||||
+++ b/fhi_lib/lib/src/xran_bfp_uplane.cpp
|
||||
@@ -116,7 +116,7 @@ namespace BFP_UPlane
|
||||
/// Get AVX512 pointer aligned to desired RB
|
||||
const __m512i* rawDataIn = reinterpret_cast<const __m512i*>(dataIn.dataExpanded + numREOffset);
|
||||
/// Apply the exponent shift
|
||||
- const auto compData = _mm512_srai_epi16(*rawDataIn, thisExp);
|
||||
+ const auto compData = _mm512_srai_epi16(_mm512_loadu_epi16(rawDataIn), thisExp);
|
||||
/// Pack compressed data network byte order
|
||||
const auto compDataBytePacked = networkBytePack(compData);
|
||||
/// Store exponent first
|
||||
@@ -201,7 +201,7 @@ namespace BFP_UPlane
|
||||
/// Get AVX512 pointer aligned to desired RB
|
||||
const __m512i* rawDataIn = reinterpret_cast<const __m512i*>(dataIn.dataExpanded + numREOffset);
|
||||
/// Apply the exponent shift
|
||||
- const auto compData = _mm512_srai_epi16(*rawDataIn, thisExp);
|
||||
+ const auto compData = _mm512_srai_epi16(_mm512_loadu_epi16(rawDataIn), thisExp);
|
||||
/// Store exponent first
|
||||
dataOut->dataCompressed[thisRBExpAddr] = thisExp;
|
||||
/// Now have 1 RB worth of bytes separated into 3 chunks (1 per lane)
|
||||
diff --git a/fhi_lib/lib/src/xran_common.c b/fhi_lib/lib/src/xran_common.c
|
||||
index baa673f..edd4ecb 100644
|
||||
--- a/fhi_lib/lib/src/xran_common.c
|
||||
+++ b/fhi_lib/lib/src/xran_common.c
|
||||
@@ -656,6 +656,7 @@ process_mbuf(struct rte_mbuf *pkt, void* handle, struct xran_eaxc_info *p_cid)
|
||||
int32_t valid_res = 0;
|
||||
int expect_comp = (p_dev_ctx->fh_cfg.ru_conf.compMeth != XRAN_COMPMETHOD_NONE);
|
||||
enum xran_comp_hdr_type staticComp = p_dev_ctx->fh_cfg.ru_conf.xranCompHdrType;
|
||||
+ uint8_t filter_id;
|
||||
|
||||
if (staticComp == XRAN_COMP_HDR_TYPE_STATIC)
|
||||
{
|
||||
@@ -674,6 +675,7 @@ process_mbuf(struct rte_mbuf *pkt, void* handle, struct xran_eaxc_info *p_cid)
|
||||
&subframe_id,
|
||||
&slot_id,
|
||||
&symb_id,
|
||||
+ &filter_id,
|
||||
&seq,
|
||||
&num_prbu,
|
||||
&start_prbu,
|
||||
@@ -688,23 +690,9 @@ process_mbuf(struct rte_mbuf *pkt, void* handle, struct xran_eaxc_info *p_cid)
|
||||
print_err("num_bytes is wrong [%d]\n", num_bytes);
|
||||
return MBUF_FREE;
|
||||
}
|
||||
-
|
||||
- valid_res = xran_pkt_validate(p_dev_ctx,
|
||||
- pkt,
|
||||
- iq_samp_buf,
|
||||
- num_bytes,
|
||||
- CC_ID,
|
||||
- Ant_ID,
|
||||
- frame_id,
|
||||
- subframe_id,
|
||||
- slot_id,
|
||||
- symb_id,
|
||||
- &seq,
|
||||
- num_prbu,
|
||||
- start_prbu,
|
||||
- sym_inc,
|
||||
- rb,
|
||||
- sect_id);
|
||||
+ pCnt->rx_counter++;
|
||||
+ pCnt->Rx_on_time++;
|
||||
+ pCnt->Total_msgs_rcvd++;
|
||||
#ifndef FCN_ADAPT
|
||||
if(valid_res != 0) {
|
||||
print_dbg("valid_res is wrong [%d] ant %u (%u : %u : %u : %u) seq %u num_bytes %d\n", valid_res, Ant_ID, frame_id, subframe_id, slot_id, symb_id, seq.seq_id, num_bytes);
|
||||
@@ -1189,7 +1177,7 @@ int generate_cpmsg_prach(void *pHandle, struct xran_cp_gen_params *params, struc
|
||||
timeOffset += startSymId * (2048 + 144);
|
||||
}
|
||||
timeOffset = timeOffset >> nNumerology; //original number is Tc, convert to Ts based on mu
|
||||
- if ((slot_id == 0) || (slot_id == (SLOTNUM_PER_SUBFRAME(pxran_lib_ctx->interval_us_local) >> 1)))
|
||||
+ if (startSymId > 0 && ((slot_id == 0) || (slot_id == (SLOTNUM_PER_SUBFRAME(pxran_lib_ctx->interval_us_local) >> 1))))
|
||||
timeOffset += 16;
|
||||
|
||||
params->dir = XRAN_DIR_UL;
|
||||
@@ -1295,8 +1283,7 @@ int32_t ring_processing_func(void* args)
|
||||
|
||||
for (i = 0; i < ctx->io_cfg.num_vfs && i < XRAN_VF_MAX; i++){
|
||||
for(qi = 0; qi < ctx->rxq_per_port[i]; qi++) {
|
||||
- if (process_ring(ctx->rx_ring[i][qi], i, qi))
|
||||
- return 0;
|
||||
+ process_ring(ctx->rx_ring[i][qi],i,qi);
|
||||
}
|
||||
}
|
||||
|
||||
diff --git a/fhi_lib/lib/src/xran_common.h b/fhi_lib/lib/src/xran_common.h
|
||||
index 3ed75cd..d61fe7f 100644
|
||||
--- a/fhi_lib/lib/src/xran_common.h
|
||||
+++ b/fhi_lib/lib/src/xran_common.h
|
||||
@@ -221,7 +221,7 @@ int generate_cpmsg_prach(void *pHandle, struct xran_cp_gen_params *params, struc
|
||||
struct xran_eaxcid_config *xran_get_conf_eAxC(void *pHandle);
|
||||
int xran_register_cb_mbuf2ring(xran_ethdi_mbuf_send_fn mbuf_send_cp, xran_ethdi_mbuf_send_fn mbuf_send_up);
|
||||
|
||||
-uint16_t xran_alloc_sectionid(void *pHandle, uint8_t dir, uint8_t cc_id, uint8_t ant_id, uint8_t slot_id);
|
||||
+//uint16_t xran_alloc_sectionid(void *pHandle, uint8_t dir, uint8_t cc_id, uint8_t ant_id, uint8_t slot_id);
|
||||
uint8_t xran_get_seqid(void *pHandle, uint8_t dir, uint8_t cc_id, uint8_t ant_id, uint8_t slot_id);
|
||||
int32_t ring_processing_func(void* arg);
|
||||
int xran_init_prach(struct xran_fh_config* pConf, struct xran_device_ctx * p_xran_dev_ctx);
|
||||
diff --git a/fhi_lib/lib/src/xran_compression.cpp b/fhi_lib/lib/src/xran_compression.cpp
|
||||
index 112caae..7c74342 100644
|
||||
--- a/fhi_lib/lib/src/xran_compression.cpp
|
||||
+++ b/fhi_lib/lib/src/xran_compression.cpp
|
||||
@@ -62,7 +62,7 @@ xranlib_compress(const struct xranlib_compress_request *request,
|
||||
return xranlib_5gnr_mod_compression(&mod_request, &mod_response);
|
||||
}
|
||||
else{
|
||||
- if(_may_i_use_cpu_feature(_FEATURE_AVX512IFMA52)) {
|
||||
+ if(false) {
|
||||
return xranlib_compress_avxsnc(request,response);
|
||||
} else {
|
||||
return xranlib_compress_avx512(request,response);
|
||||
@@ -89,7 +89,7 @@ xranlib_decompress(const struct xranlib_decompress_request *request,
|
||||
return xranlib_5gnr_mod_decompression(&mod_request, &mod_response);
|
||||
}
|
||||
else{
|
||||
- if(_may_i_use_cpu_feature(_FEATURE_AVX512IFMA52)) {
|
||||
+ if(false) {
|
||||
return xranlib_decompress_avxsnc(request,response);
|
||||
} else {
|
||||
return xranlib_decompress_avx512(request,response);
|
||||
@@ -101,7 +101,7 @@ int32_t
|
||||
xranlib_compress_bfw(const struct xranlib_compress_request *request,
|
||||
struct xranlib_compress_response *response)
|
||||
{
|
||||
- if(_may_i_use_cpu_feature(_FEATURE_AVX512IFMA52)) {
|
||||
+ if(false) {
|
||||
return xranlib_compress_avxsnc_bfw(request,response);
|
||||
} else {
|
||||
return xranlib_compress_avx512_bfw(request,response);
|
||||
@@ -112,7 +112,7 @@ int32_t
|
||||
xranlib_decompress_bfw(const struct xranlib_decompress_request *request,
|
||||
struct xranlib_decompress_response *response)
|
||||
{
|
||||
- if(_may_i_use_cpu_feature(_FEATURE_AVX512IFMA52)) {
|
||||
+ if(false) {
|
||||
return xranlib_decompress_avxsnc_bfw(request,response);
|
||||
} else {
|
||||
return xranlib_decompress_avx512_bfw(request,response);
|
||||
diff --git a/fhi_lib/lib/src/xran_main.c b/fhi_lib/lib/src/xran_main.c
|
||||
index 89dcc1f..640f6b6 100644
|
||||
--- a/fhi_lib/lib/src/xran_main.c
|
||||
+++ b/fhi_lib/lib/src/xran_main.c
|
||||
@@ -272,7 +272,7 @@ xran_init_prach(struct xran_fh_config* pConf, struct xran_device_ctx * p_xran_de
|
||||
printf("PRACH start symbol %u lastsymbol %u\n", p_xran_dev_ctx->prach_start_symbol[0], p_xran_dev_ctx->prach_last_symbol[0]);
|
||||
}
|
||||
|
||||
- pPrachCPConfig->eAxC_offset = xran_get_num_eAxc(p_xran_dev_ctx);
|
||||
+ pPrachCPConfig->eAxC_offset = pPRACHConfig->eAxC_offset;
|
||||
print_dbg("PRACH eAxC_offset %d\n", pPrachCPConfig->eAxC_offset);
|
||||
|
||||
/* Save some configs for app */
|
||||
@@ -844,7 +844,7 @@ tx_cp_ul_cb(struct rte_timer *tim, void *arg)
|
||||
struct xran_cp_gen_params params;
|
||||
struct xran_section_gen_info sect_geninfo[8];
|
||||
struct rte_mbuf *mbuf = xran_ethdi_mbuf_alloc();
|
||||
- prach_port_id = ant_id + num_eAxc;
|
||||
+ prach_port_id = ant_id + pPrachCPConfig->eAxC_offset;
|
||||
/* start new section information list */
|
||||
xran_cp_reset_section_info(pHandle, XRAN_DIR_UL, cc_id, prach_port_id, ctx_id);
|
||||
|
||||
@@ -1059,6 +1059,7 @@ int32_t handle_ecpri_ethertype(struct rte_mbuf* pkt_q[], uint16_t xport_id, stru
|
||||
{
|
||||
case ECPRI_IQ_DATA:
|
||||
pkt_data[num_data++] = pkt;
|
||||
+ uint8_t *pkt_bytes=rte_pktmbuf_mtod(pkt,uint8_t*);
|
||||
break;
|
||||
// For RU emulation
|
||||
case ECPRI_RT_CONTROL_DATA:
|
||||
@@ -1076,7 +1077,7 @@ int32_t handle_ecpri_ethertype(struct rte_mbuf* pkt_q[], uint16_t xport_id, stru
|
||||
break;
|
||||
default:
|
||||
if (p_dev_ctx->fh_init.io_cfg.id == O_DU) {
|
||||
- print_err("Invalid eCPRI message type - %d", ecpri_hdr->cmnhdr.bits.ecpri_mesg_type);
|
||||
+ rte_pktmbuf_free(pkt);
|
||||
}
|
||||
break;
|
||||
}
|
||||
@@ -1771,8 +1772,7 @@ ring_processing_func_per_port(void* args)
|
||||
for (i = 0; i < ctx->io_cfg.num_vfs && i < XRAN_VF_MAX; i = i+1) {
|
||||
if (ctx->vf2xran_port[i] == port_id) {
|
||||
for(qi = 0; qi < ctx->rxq_per_port[port_id]; qi++){
|
||||
- if (process_ring(ctx->rx_ring[i][qi], i, qi))
|
||||
- return 0;
|
||||
+ process_ring(ctx->rx_ring[i][qi],i,qi);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1837,8 +1837,6 @@ xran_spawn_workers(void)
|
||||
nWorkerCore = nWorkerCore << 1;
|
||||
}
|
||||
|
||||
- extern int _may_i_use_cpu_feature(unsigned __int64);
|
||||
- icx_cpu = _may_i_use_cpu_feature(_FEATURE_AVX512IFMA52);
|
||||
|
||||
printf("O-XU %d\n", eth_ctx->io_cfg.id);
|
||||
printf("HW %d\n", icx_cpu);
|
||||
@@ -3074,6 +3072,24 @@ xran_get_slot_idx (uint32_t PortId, uint32_t *nFrameIdx, uint32_t *nSubframeIdx,
|
||||
return tti;
|
||||
}
|
||||
|
||||
+int32_t
|
||||
+xran_get_slot_idx_from_tti (uint32_t tti, uint32_t *nFrameIdx, uint32_t *nSubframeIdx, uint32_t *nSlotIdx, uint64_t *nSecond)
|
||||
+{
|
||||
+ struct xran_device_ctx * p_xran_dev_ctx = xran_dev_get_ctx_by_id(0);
|
||||
+ if (!p_xran_dev_ctx)
|
||||
+ {
|
||||
+ print_err("Null xRAN context on port id %u!!\n", 0);
|
||||
+ return 0;
|
||||
+ }
|
||||
+
|
||||
+ *nSlotIdx = (uint32_t)XranGetSlotNum(tti, SLOTNUM_PER_SUBFRAME(p_xran_dev_ctx->interval_us_local));
|
||||
+ *nSubframeIdx = (uint32_t)XranGetSubFrameNum(tti,SLOTNUM_PER_SUBFRAME(p_xran_dev_ctx->interval_us_local), SUBFRAMES_PER_SYSTEMFRAME);
|
||||
+ *nFrameIdx = (uint32_t)XranGetFrameNum(tti,0/*xran_getSfnSecStart()*/,SUBFRAMES_PER_SYSTEMFRAME, SLOTNUM_PER_SUBFRAME(p_xran_dev_ctx->interval_us_local));
|
||||
+ *nSecond = timing_get_current_second();
|
||||
+
|
||||
+ return tti;
|
||||
+}
|
||||
+
|
||||
int32_t
|
||||
xran_set_debug_stop(int32_t value, int32_t count)
|
||||
{
|
||||
diff --git a/fhi_lib/lib/src/xran_mod_compression.cpp b/fhi_lib/lib/src/xran_mod_compression.cpp
|
||||
index 7d4a5d0..87bdbd5 100644
|
||||
--- a/fhi_lib/lib/src/xran_mod_compression.cpp
|
||||
+++ b/fhi_lib/lib/src/xran_mod_compression.cpp
|
||||
@@ -747,10 +747,11 @@ int xranlib_5gnr_mod_compression(const struct xranlib_5gnr_mod_compression_reque
|
||||
#ifdef C_Module_Used
|
||||
return (xranlib_5gnr_mod_compression_c(request, response));
|
||||
#else
|
||||
- if(_may_i_use_cpu_feature(_FEATURE_AVX512IFMA52))
|
||||
+ if (false) {
|
||||
return (xranlib_5gnr_mod_compression_snc(request, response));
|
||||
- else
|
||||
+ } else {
|
||||
return (xranlib_5gnr_mod_compression_avx512(request, response));
|
||||
+ }
|
||||
#endif
|
||||
}
|
||||
|
||||
diff --git a/fhi_lib/lib/src/xran_rx_proc.c b/fhi_lib/lib/src/xran_rx_proc.c
|
||||
index 36bd72c..f7f5678 100644
|
||||
--- a/fhi_lib/lib/src/xran_rx_proc.c
|
||||
+++ b/fhi_lib/lib/src/xran_rx_proc.c
|
||||
@@ -107,6 +107,10 @@ int xran_process_prach_sym(void *arg,
|
||||
if(mb)
|
||||
rte_pktmbuf_free(mb);
|
||||
|
||||
+ mb = p_xran_dev_ctx->sFHPrachRxBbuIoBufCtrlDecomp[tti % XRAN_N_FE_BUF_LEN][CC_ID][Ant_ID].sBufferList.pBuffers[symb_id_offset].pCtrl;
|
||||
+ if(mb)
|
||||
+ rte_pktmbuf_free(mb);
|
||||
+
|
||||
if(p_xran_dev_ctx->fh_cfg.ru_conf.byteOrder == XRAN_CPU_LE_BYTE_ORDER) {
|
||||
int idx = 0;
|
||||
uint16_t *psrc = (uint16_t *)iq_data_start;
|
||||
diff --git a/fhi_lib/lib/src/xran_up_api.c b/fhi_lib/lib/src/xran_up_api.c
|
||||
index 397853a..4a714b5 100644
|
||||
--- a/fhi_lib/lib/src/xran_up_api.c
|
||||
+++ b/fhi_lib/lib/src/xran_up_api.c
|
||||
@@ -329,6 +329,7 @@ int32_t xran_extract_iq_samples(struct rte_mbuf *mbuf,
|
||||
uint8_t *subframe_id,
|
||||
uint8_t *slot_id,
|
||||
uint8_t *symb_id,
|
||||
+ uint8_t *filter_id,
|
||||
union ecpri_seq_id *seq_id,
|
||||
uint16_t *num_prbu,
|
||||
uint16_t *start_prbu,
|
||||
@@ -387,6 +388,8 @@ int32_t xran_extract_iq_samples(struct rte_mbuf *mbuf,
|
||||
if (symb_id)
|
||||
*symb_id = radio_hdr->sf_slot_sym.symb_id;
|
||||
|
||||
+ if (filter_id)
|
||||
+ *filter_id = radio_hdr->data_feature.filter_id;
|
||||
/* Process data section hdr */
|
||||
struct data_section_hdr *data_hdr =
|
||||
(void *)rte_pktmbuf_adj(mbuf, sizeof(*radio_hdr));
|
||||
@@ -401,6 +404,7 @@ int32_t xran_extract_iq_samples(struct rte_mbuf *mbuf,
|
||||
*sym_inc = data_hdr->fields.sym_inc;
|
||||
*rb = data_hdr->fields.rb;
|
||||
*sect_id = data_hdr->fields.sect_id;
|
||||
+ if (*num_prbu == 0) *num_prbu=273;
|
||||
|
||||
if(expect_comp) {
|
||||
const struct data_section_compression_hdr *data_compr_hdr;
|
||||
@@ -11,7 +11,7 @@ paramdef_t someoptions[] = {
|
||||
{"opt1", "<help opt1>", 0, uptr:&varopt1, defuintval:0, TYPE_UINT, 0 },
|
||||
};
|
||||
|
||||
config_get( someoptions,sizeofArray(someoptions),"somesection");
|
||||
config_get( someoptions,sizeof(someoptions)/sizeof(paramdef_t),"somesection");
|
||||
|
||||
```
|
||||
new code:
|
||||
@@ -31,7 +31,7 @@ paramdef_t someoptions[] = {
|
||||
{"opt2", "<help opt2>", 0, strptr:&varopt2,defstrval:"",TYPE_STRING,0 },
|
||||
};
|
||||
|
||||
config_get( someoptions,sizeofArray(someoptions),"somesection");
|
||||
config_get( someoptions,sizeof(someoptions)/sizeof(paramdef_t),"somesection");
|
||||
|
||||
```
|
||||
|
||||
|
||||
@@ -105,7 +105,7 @@ character string, used as a prefix for the section name. It has to be specified
|
||||
list to be read is under another section.
|
||||
*/
|
||||
config_getlist( &NbIoT_MacRLC_ParamList,NbIoT_MacRLC_Params,
|
||||
sizeofArray(NbIoT_MacRLC_Params),
|
||||
sizeof(NbIoT_MacRLC_Params)/sizeof(paramdef_t),
|
||||
NULL);
|
||||
|
||||
/*
|
||||
|
||||
@@ -35,13 +35,11 @@
|
||||
#include <stdio.h>
|
||||
#include <ctype.h>
|
||||
#include <errno.h>
|
||||
#include "common/platform_types.h"
|
||||
#include <platform_types.h>
|
||||
#include "config_userapi.h"
|
||||
#include "config_common.h"
|
||||
#include "../utils/LOG/log.h"
|
||||
|
||||
static int parse_stringlist(configmodule_interface_t *cfg, paramdef_t *cfgoptions, char *val)
|
||||
{
|
||||
int parse_stringlist(paramdef_t *cfgoptions, char *val) {
|
||||
char *atoken;
|
||||
char *tokctx = NULL;
|
||||
char *tmpval=strdup(val);
|
||||
@@ -59,22 +57,21 @@ static int parse_stringlist(configmodule_interface_t *cfg, paramdef_t *cfgoption
|
||||
AssertFatal(MAX_LIST_SIZE > numelt,
|
||||
"This piece of code use fixed size arry of constant #define MAX_LIST_SIZE %d\n",
|
||||
MAX_LIST_SIZE );
|
||||
config_check_valptr(cfg, cfgoptions, sizeof(char *), numelt);
|
||||
|
||||
config_check_valptr(cfgoptions, sizeof(char*), numelt);
|
||||
|
||||
cfgoptions->numelt=numelt;
|
||||
atoken=strtok_r(val, ",",&tokctx);
|
||||
|
||||
for( int i=0; i<cfgoptions->numelt && atoken != NULL ; i++) {
|
||||
snprintf(cfgoptions->strlistptr[i],DEFAULT_EXTRA_SZ,"%s",atoken);
|
||||
printf_params(cfg, "[LIBCONFIG] %s[%i]: %s\n", cfgoptions->optname, i, cfgoptions->strlistptr[i]);
|
||||
printf_params("[LIBCONFIG] %s[%i]: %s\n", cfgoptions->optname,i,cfgoptions->strlistptr[i]);
|
||||
atoken=strtok_r(NULL, ",",&tokctx);
|
||||
}
|
||||
|
||||
return (cfgoptions->numelt > 0);
|
||||
}
|
||||
|
||||
static int processoption(configmodule_interface_t *cfg, paramdef_t *cfgoptions, char *value)
|
||||
{
|
||||
int processoption(paramdef_t *cfgoptions, char *value) {
|
||||
char *tmpval = value;
|
||||
int optisset=0;
|
||||
char defbool[2]="1";
|
||||
@@ -82,7 +79,6 @@ static int processoption(configmodule_interface_t *cfg, paramdef_t *cfgoptions,
|
||||
if ( value == NULL) {
|
||||
if( (cfgoptions->paramflags &PARAMFLAG_BOOL) == 0 ) { /* not a boolean, argument required */
|
||||
CONFIG_PRINTF_ERROR("[CONFIG] command line, option %s requires an argument\n",cfgoptions->optname);
|
||||
AssertFatal(false, "[CONFIG] command line, requires an argument\n");
|
||||
} else { /* boolean value option without argument, set value to true*/
|
||||
tmpval = defbool;
|
||||
}
|
||||
@@ -93,18 +89,19 @@ static int processoption(configmodule_interface_t *cfg, paramdef_t *cfgoptions,
|
||||
|
||||
case TYPE_STRING:
|
||||
if (cfgoptions->numelt == 0 )
|
||||
config_check_valptr(cfg, cfgoptions, 1, strlen(tmpval) + 1);
|
||||
config_check_valptr(cfgoptions, 1,
|
||||
strlen(tmpval)+1);
|
||||
if (cfgoptions->numelt < (strlen(tmpval)+1)) {
|
||||
CONFIG_PRINTF_ERROR("[CONFIG] command line option %s value too long\n",
|
||||
cfgoptions->optname);
|
||||
}
|
||||
snprintf(*cfgoptions->strptr, cfgoptions->numelt ,"%s",tmpval);
|
||||
printf_cmdl(cfg, "[CONFIG] %s set to %s from command line\n", cfgoptions->optname, tmpval);
|
||||
printf_cmdl("[CONFIG] %s set to %s from command line\n", cfgoptions->optname, tmpval);
|
||||
optisset=1;
|
||||
break;
|
||||
|
||||
case TYPE_STRINGLIST:
|
||||
optisset = parse_stringlist(cfg, cfgoptions, tmpval);
|
||||
optisset=parse_stringlist(cfgoptions,tmpval);
|
||||
break;
|
||||
|
||||
case TYPE_UINT32:
|
||||
@@ -113,8 +110,8 @@ static int processoption(configmodule_interface_t *cfg, paramdef_t *cfgoptions,
|
||||
case TYPE_INT16:
|
||||
case TYPE_UINT8:
|
||||
case TYPE_INT8:
|
||||
config_check_valptr(cfg, cfgoptions, sizeof(*cfgoptions->iptr), 1);
|
||||
config_assign_int(cfg, cfgoptions, cfgoptions->optname, (int32_t)strtol(tmpval, &charptr, 0));
|
||||
config_check_valptr(cfgoptions, sizeof(*cfgoptions->iptr), 1);
|
||||
config_assign_int(cfgoptions,cfgoptions->optname,(int32_t)strtol(tmpval,&charptr,0));
|
||||
|
||||
if( *charptr != 0) {
|
||||
CONFIG_PRINTF_ERROR("[CONFIG] command line, option %s requires an integer argument\n",cfgoptions->optname);
|
||||
@@ -125,14 +122,14 @@ static int processoption(configmodule_interface_t *cfg, paramdef_t *cfgoptions,
|
||||
|
||||
case TYPE_UINT64:
|
||||
case TYPE_INT64:
|
||||
config_check_valptr(cfg, cfgoptions, sizeof(*cfgoptions->i64ptr), 1);
|
||||
config_check_valptr(cfgoptions, sizeof(*cfgoptions->i64ptr), 1);
|
||||
*(cfgoptions->i64ptr)=strtoll(tmpval,&charptr,0);
|
||||
|
||||
if( *charptr != 0) {
|
||||
CONFIG_PRINTF_ERROR("[CONFIG] command line, option %s requires an integer argument\n",cfgoptions->optname);
|
||||
}
|
||||
|
||||
printf_cmdl(cfg, "[CONFIG] %s set to %lli from command line\n", cfgoptions->optname, (long long)*cfgoptions->i64ptr);
|
||||
printf_cmdl("[CONFIG] %s set to %lli from command line\n", cfgoptions->optname, (long long)*cfgoptions->i64ptr);
|
||||
optisset=1;
|
||||
break;
|
||||
|
||||
@@ -141,14 +138,14 @@ static int processoption(configmodule_interface_t *cfg, paramdef_t *cfgoptions,
|
||||
break;
|
||||
|
||||
case TYPE_DOUBLE:
|
||||
config_check_valptr(cfg, cfgoptions, sizeof(*cfgoptions->dblptr), 1);
|
||||
config_check_valptr(cfgoptions, sizeof(*cfgoptions->dblptr), 1);
|
||||
*cfgoptions->dblptr = strtof(tmpval,&charptr);
|
||||
|
||||
if( *charptr != 0) {
|
||||
CONFIG_PRINTF_ERROR("[CONFIG] command line, option %s requires a double argument\n",cfgoptions->optname);
|
||||
}
|
||||
|
||||
printf_cmdl(cfg, "[CONFIG] %s set to %lf from command line\n", cfgoptions->optname, *(cfgoptions->dblptr));
|
||||
printf_cmdl("[CONFIG] %s set to %lf from command line\n", cfgoptions->optname, *(cfgoptions->dblptr));
|
||||
optisset=1;
|
||||
break;
|
||||
|
||||
@@ -170,8 +167,7 @@ static int processoption(configmodule_interface_t *cfg, paramdef_t *cfgoptions,
|
||||
/*--------------------------------------------------------------------*/
|
||||
/* check unknown options in the command line
|
||||
*/
|
||||
int config_check_unknown_cmdlineopt(configmodule_interface_t *cfg, char *prefix)
|
||||
{
|
||||
int config_check_unknown_cmdlineopt(char *prefix) {
|
||||
int unknowndetected=0;
|
||||
char testprefix[CONFIG_MAXOPTLENGTH];
|
||||
int finalcheck = 0;
|
||||
@@ -186,21 +182,18 @@ int config_check_unknown_cmdlineopt(configmodule_interface_t *cfg, char *prefix)
|
||||
}
|
||||
}
|
||||
|
||||
for (int i = 1; i < cfg->argc; i++) {
|
||||
if (!finalcheck && strstr(cfg->argv[i], testprefix) == NULL)
|
||||
continue;
|
||||
for (int i=1; i<config_get_if()->argc ; i++) {
|
||||
if ( !finalcheck && strstr(config_get_if()->argv[i],testprefix) == NULL ) continue;
|
||||
|
||||
if (!finalcheck && testprefix[0] == 0 && index(cfg->argv[i], '.') != NULL)
|
||||
continue;
|
||||
if ( !finalcheck && testprefix[0]==0 && index(config_get_if()->argv[i],'.') != NULL) continue;
|
||||
|
||||
if (!finalcheck && isdigit(cfg->argv[i][0]))
|
||||
continue;
|
||||
if ( !finalcheck && isdigit(config_get_if()->argv[i][0])) continue;
|
||||
|
||||
if (!finalcheck && cfg->argv[i][0] == '-' && isdigit(cfg->argv[i][1]))
|
||||
continue;
|
||||
if ( !finalcheck && config_get_if()->argv[i][0] == '-' && isdigit(config_get_if()->argv[i][1])) continue;
|
||||
|
||||
if ((cfg->argv_info[i] & CONFIG_CMDLINEOPT_PROCESSED) == 0) {
|
||||
fprintf(stderr, "[CONFIG] unknown option: %s\n", cfg->argv[i]);
|
||||
if ( (config_get_if()->argv_info[i] & CONFIG_CMDLINEOPT_PROCESSED) == 0 ) {
|
||||
fprintf(stderr,"[CONFIG] unknown option: %s\n",
|
||||
config_get_if()->argv[i] );
|
||||
unknowndetected++;
|
||||
}
|
||||
}
|
||||
@@ -211,11 +204,10 @@ int config_check_unknown_cmdlineopt(configmodule_interface_t *cfg, char *prefix)
|
||||
}
|
||||
|
||||
return unknowndetected;
|
||||
} /* config_check_unknown_cmdlineopt */
|
||||
} /* config_check_unknown_cmdlineopt */
|
||||
|
||||
int config_process_cmdline(configmodule_interface_t *cfg, paramdef_t *cfgoptions, int numoptions, char *prefix)
|
||||
{
|
||||
int c = cfg->argc;
|
||||
int config_process_cmdline(paramdef_t *cfgoptions,int numoptions, char *prefix) {
|
||||
int c = config_get_if()->argc;
|
||||
int i,j;
|
||||
char *pp;
|
||||
char cfgpath[CONFIG_MAXOPTLENGTH];
|
||||
@@ -223,16 +215,15 @@ int config_process_cmdline(configmodule_interface_t *cfg, paramdef_t *cfgoptions
|
||||
i = 0;
|
||||
|
||||
while (c > 0 ) {
|
||||
char *oneargv =
|
||||
strdup(cfg->argv[i]); /* we use strtok_r which modifies its string paramater, and we don't want argv to be modified */
|
||||
char *oneargv = strdup(config_get_if()->argv[i]); /* we use strtok_r which modifies its string paramater, and we don't want argv to be modified */
|
||||
if(!oneargv) abort();
|
||||
/* first check help options, either --help, -h or --help_<section> */
|
||||
if (strncmp(oneargv, "-h",2) == 0 || strncmp(oneargv, "--help",6) == 0 ) {
|
||||
char *tokctx = NULL;
|
||||
pp=strtok_r(oneargv, "_",&tokctx);
|
||||
cfg->argv_info[i] |= CONFIG_CMDLINEOPT_PROCESSED;
|
||||
config_get_if()->argv_info[i] |= CONFIG_CMDLINEOPT_PROCESSED;
|
||||
|
||||
if (pp == NULL || strcasecmp(pp, cfg->argv[i]) == 0) {
|
||||
if (pp == NULL || strcasecmp(pp,config_get_if()->argv[i] ) == 0 ) {
|
||||
if( prefix == NULL) {
|
||||
config_printhelp(cfgoptions,numoptions,"(root section)");
|
||||
|
||||
@@ -272,10 +263,10 @@ int config_process_cmdline(configmodule_interface_t *cfg, paramdef_t *cfgoptions
|
||||
((strlen(oneargv) > 2) && (strcmp(oneargv + 2, cfgoptions[n].optname) == 0 ) && (cfgoptions[n].paramflags & PARAMFLAG_CMDLINE_NOPREFIXENABLED )) ) {
|
||||
char *valptr=NULL;
|
||||
int ret;
|
||||
cfg->argv_info[i] |= CONFIG_CMDLINEOPT_PROCESSED;
|
||||
config_get_if()->argv_info[i] |= CONFIG_CMDLINEOPT_PROCESSED;
|
||||
|
||||
if (c > 0) {
|
||||
pp = cfg->argv[i + 1];
|
||||
pp = config_get_if()->argv[i+1];
|
||||
|
||||
if (pp != NULL ) {
|
||||
ret = strlen(pp);
|
||||
@@ -289,11 +280,11 @@ int config_process_cmdline(configmodule_interface_t *cfg, paramdef_t *cfgoptions
|
||||
}
|
||||
}
|
||||
|
||||
j += processoption(cfg, &(cfgoptions[n]), valptr);
|
||||
j += processoption(&(cfgoptions[n]), valptr);
|
||||
|
||||
if ( valptr != NULL ) {
|
||||
i++;
|
||||
cfg->argv_info[i] |= CONFIG_CMDLINEOPT_PROCESSED;
|
||||
config_get_if()->argv_info[i] |= CONFIG_CMDLINEOPT_PROCESSED;
|
||||
c--;
|
||||
}
|
||||
|
||||
@@ -307,6 +298,6 @@ int config_process_cmdline(configmodule_interface_t *cfg, paramdef_t *cfgoptions
|
||||
c--;
|
||||
} /* fin du while */
|
||||
|
||||
printf_cmdl(cfg, "[CONFIG] %s %i options set from command line\n", ((prefix == NULL) ? "(root)" : prefix), j);
|
||||
printf_cmdl("[CONFIG] %s %i options set from command line\n",((prefix == NULL) ? "(root)":prefix),j);
|
||||
return j;
|
||||
} /* parse_cmdline*/
|
||||
} /* parse_cmdline*/
|
||||
|
||||
@@ -1,313 +0,0 @@
|
||||
/*
|
||||
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The OpenAirInterface Software Alliance licenses this file to You under
|
||||
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
|
||||
* except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.openairinterface.org/?page_id=698
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*-------------------------------------------------------------------------------
|
||||
* For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
* contact@openairinterface.org
|
||||
*/
|
||||
|
||||
#define _GNU_SOURCE
|
||||
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
#include <errno.h>
|
||||
#include <dlfcn.h>
|
||||
#include <arpa/inet.h>
|
||||
#include "common/platform_types.h"
|
||||
#include "config_common.h"
|
||||
#include "../utils/LOG/log.h"
|
||||
static int managed_ptr_sz(configmodule_interface_t *cfg, void *ptr)
|
||||
{
|
||||
AssertFatal(cfg->numptrs < CONFIG_MAX_ALLOCATEDPTRS,
|
||||
"This code use fixed size array as #define CONFIG_MAX_ALLOCATEDPTRS %d\n",
|
||||
CONFIG_MAX_ALLOCATEDPTRS);
|
||||
int i;
|
||||
pthread_mutex_lock(&cfg->memBlocks_mutex);
|
||||
int numptrs=cfg->numptrs;
|
||||
for (i=0; i<numptrs; i++ )
|
||||
if (cfg->oneBlock[i].ptrs == ptr)
|
||||
break;
|
||||
pthread_mutex_unlock(&cfg->memBlocks_mutex);
|
||||
if ( i == numptrs )
|
||||
return -1;
|
||||
else
|
||||
return cfg->oneBlock[i].sz;
|
||||
}
|
||||
|
||||
void config_check_valptr(configmodule_interface_t *cfg, paramdef_t *cfgoptions, int elt_sz, int nb_elt)
|
||||
{
|
||||
const bool toFree=!(cfgoptions->paramflags & PARAMFLAG_NOFREE);
|
||||
|
||||
// let's see if the value has been read
|
||||
// the datamodel is more difficult than it should be
|
||||
// and it is not thread safe
|
||||
if (cfgoptions->voidptr) {
|
||||
int sz;
|
||||
if ( cfgoptions-> type == TYPE_STRING)
|
||||
sz = managed_ptr_sz(cfg, *cfgoptions->strptr);
|
||||
else
|
||||
sz = managed_ptr_sz(cfg, cfgoptions->voidptr);
|
||||
if ( sz != -1 ) // the same variable pointer has been used!
|
||||
cfgoptions->numelt=sz;
|
||||
}
|
||||
|
||||
if (cfgoptions->voidptr != NULL
|
||||
&& (cfgoptions->type == TYPE_INTARRAY
|
||||
|| cfgoptions->type == TYPE_UINTARRAY
|
||||
|| cfgoptions->type == TYPE_STRINGLIST )) {
|
||||
int sz;
|
||||
if (cfgoptions->type == TYPE_STRING || cfgoptions->type == TYPE_STRINGLIST)
|
||||
sz = managed_ptr_sz(cfg, *cfgoptions->strptr);
|
||||
else
|
||||
sz = managed_ptr_sz(cfg, cfgoptions->voidptr);
|
||||
if ( sz == -1) {
|
||||
fprintf(stderr,"[CONFIG] %s NOT SUPPORTED not NULL pointer with array types", cfgoptions->optname);
|
||||
return ;
|
||||
}
|
||||
}
|
||||
|
||||
if (cfgoptions->voidptr == NULL ) {
|
||||
if (cfgoptions->type == TYPE_STRING) {
|
||||
// difficult datamodel
|
||||
cfgoptions->strptr = config_allocate_new(cfg, sizeof(*cfgoptions->strptr), toFree);
|
||||
} else if ( cfgoptions->type == TYPE_STRINGLIST) {
|
||||
AssertFatal(nb_elt<MAX_LIST_SIZE,
|
||||
"This piece of code use fixed size arry of constant #define MAX_LIST_SIZE %d\n",
|
||||
MAX_LIST_SIZE );
|
||||
cfgoptions->strlistptr = config_allocate_new(cfg, sizeof(char *) * MAX_LIST_SIZE, toFree);
|
||||
for (int i=0; i<MAX_LIST_SIZE; i++)
|
||||
cfgoptions->strlistptr[i] = config_allocate_new(cfg, DEFAULT_EXTRA_SZ, toFree);
|
||||
} else {
|
||||
if ( cfgoptions->type == TYPE_INTARRAY || cfgoptions->type == TYPE_UINTARRAY )
|
||||
nb_elt=max(nb_elt, MAX_LIST_SIZE); // make room if the list is larger than the default one
|
||||
cfgoptions->voidptr = config_allocate_new(cfg, elt_sz * nb_elt, toFree);
|
||||
}
|
||||
}
|
||||
|
||||
if (cfgoptions->type == TYPE_STRING && *cfgoptions->strptr == NULL) {
|
||||
*cfgoptions->strptr = config_allocate_new(cfg, nb_elt + DEFAULT_EXTRA_SZ, toFree);
|
||||
cfgoptions->numelt=nb_elt+DEFAULT_EXTRA_SZ;
|
||||
}
|
||||
}
|
||||
|
||||
void *config_allocate_new(configmodule_interface_t *cfg, int sz, bool autoFree)
|
||||
{
|
||||
void *ptr = calloc(sz, 1);
|
||||
AssertFatal(ptr, "calloc fails\n");
|
||||
// add the memory piece in the managed memory pieces list
|
||||
pthread_mutex_lock(&cfg->memBlocks_mutex);
|
||||
int newBlockIdx=cfg->numptrs++;
|
||||
oneBlock_t* tmp=&cfg->oneBlock[newBlockIdx];
|
||||
tmp->ptrs = (char *)ptr;
|
||||
tmp->ptrsAllocated = true;
|
||||
tmp->sz=sz;
|
||||
tmp->toFree=autoFree;
|
||||
pthread_mutex_unlock(&cfg->memBlocks_mutex);
|
||||
return ptr;
|
||||
}
|
||||
|
||||
int config_setdefault_int(configmodule_interface_t *cfg, paramdef_t *cfgoptions, char *prefix)
|
||||
{
|
||||
int status = 0;
|
||||
config_check_valptr(cfg, cfgoptions, sizeof(*cfgoptions->iptr), 1);
|
||||
|
||||
if (((cfgoptions->paramflags & PARAMFLAG_MANDATORY) == 0)) {
|
||||
config_assign_int(cfg, cfgoptions, cfgoptions->optname, cfgoptions->defintval);
|
||||
status=1;
|
||||
printf_params(cfg, "[CONFIG] %s.%s set to default value\n", ((prefix == NULL) ? "" : prefix), cfgoptions->optname);
|
||||
}
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
int config_setdefault_int64(configmodule_interface_t *cfg, paramdef_t *cfgoptions, char *prefix)
|
||||
{
|
||||
int status = 0;
|
||||
config_check_valptr(cfg, cfgoptions, sizeof(*cfgoptions->i64ptr), 1);
|
||||
|
||||
if (((cfgoptions->paramflags & PARAMFLAG_MANDATORY) == 0)) {
|
||||
*(cfgoptions->u64ptr) = cfgoptions->defuintval;
|
||||
status=1;
|
||||
printf_params(cfg,
|
||||
"[CONFIG] %s.%s set to default value %llu\n",
|
||||
((prefix == NULL) ? "" : prefix),
|
||||
cfgoptions->optname,
|
||||
(long long unsigned)(*(cfgoptions->u64ptr)));
|
||||
}
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
int config_setdefault_intlist(configmodule_interface_t *cfg, paramdef_t *cfgoptions, char *prefix)
|
||||
{
|
||||
int status = 0;
|
||||
|
||||
if (cfgoptions->defintarrayval != NULL) {
|
||||
config_check_valptr(cfg, cfgoptions, sizeof(cfgoptions->iptr), cfgoptions->numelt);
|
||||
cfgoptions->iptr = cfgoptions->defintarrayval;
|
||||
status=1;
|
||||
|
||||
for (int j = 0; j < cfgoptions->numelt; j++) {
|
||||
printf_params(cfg, "[CONFIG] %s[%i] set to default value %i\n", cfgoptions->optname, j, (int)cfgoptions->iptr[j]);
|
||||
}
|
||||
}
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
int config_setdefault_string(configmodule_interface_t *cfg, paramdef_t *cfgoptions, char *prefix)
|
||||
{
|
||||
int status = 0;
|
||||
|
||||
if (cfgoptions->defstrval != NULL) {
|
||||
status=1;
|
||||
|
||||
if (cfgoptions->numelt == 0)
|
||||
config_check_valptr(cfg, cfgoptions, 1, strlen(cfgoptions->defstrval) + 1);
|
||||
if (cfgoptions->numelt < strlen(cfgoptions->defstrval) + 1) {
|
||||
fprintf(stderr,"[CONFIG] %s size too small\n", cfgoptions->optname);
|
||||
}
|
||||
snprintf(*cfgoptions->strptr, cfgoptions->numelt, "%s", cfgoptions->defstrval);
|
||||
printf_params(cfg,
|
||||
"[CONFIG] %s.%s set to default value \"%s\"\n",
|
||||
((prefix == NULL) ? "" : prefix),
|
||||
cfgoptions->optname,
|
||||
*cfgoptions->strptr);
|
||||
}
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
int config_setdefault_stringlist(configmodule_interface_t *cfg, paramdef_t *cfgoptions, char *prefix)
|
||||
{
|
||||
int status = 0;
|
||||
|
||||
if (cfgoptions->defstrlistval != NULL) {
|
||||
cfgoptions->strlistptr = cfgoptions->defstrlistval;
|
||||
status=1;
|
||||
|
||||
for (int j = 0; j < cfgoptions->numelt; j++)
|
||||
printf_params(cfg,
|
||||
"[CONFIG] %s.%s[%i] set to default value %s\n",
|
||||
((prefix == NULL) ? "" : prefix),
|
||||
cfgoptions->optname,
|
||||
j,
|
||||
cfgoptions->strlistptr[j]);
|
||||
}
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
int config_setdefault_double(configmodule_interface_t *cfg, paramdef_t *cfgoptions, char *prefix)
|
||||
{
|
||||
int status = 0;
|
||||
config_check_valptr(cfg, cfgoptions, sizeof(*cfgoptions->dblptr), 1);
|
||||
|
||||
if( ((cfgoptions->paramflags & PARAMFLAG_MANDATORY) == 0)) {
|
||||
*(cfgoptions->dblptr)=cfgoptions->defdblval;
|
||||
status=1;
|
||||
printf_params(cfg, "[CONFIG] %s set to default value %lf\n", cfgoptions->optname, *(cfgoptions->dblptr));
|
||||
}
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
int config_assign_ipv4addr(configmodule_interface_t *cfg, paramdef_t *cfgoptions, char *ipv4addr)
|
||||
{
|
||||
config_check_valptr(cfg, cfgoptions, sizeof(*cfgoptions->uptr), 1);
|
||||
int rst=inet_pton(AF_INET, ipv4addr,cfgoptions->uptr );
|
||||
|
||||
if (rst == 1 && *(cfgoptions->uptr) > 0) {
|
||||
printf_params(cfg, "[CONFIG] %s: %s\n", cfgoptions->optname, ipv4addr);
|
||||
return 1;
|
||||
} else {
|
||||
if ( strncmp(ipv4addr,ANY_IPV4ADDR_STRING,sizeof(ANY_IPV4ADDR_STRING)) == 0) {
|
||||
printf_params(cfg, "[CONFIG] %s:%s (INADDR_ANY) \n", cfgoptions->optname, ipv4addr);
|
||||
*cfgoptions->uptr=INADDR_ANY;
|
||||
return 1;
|
||||
} else {
|
||||
fprintf(stderr,"[CONFIG] %s not valid for %s \n", ipv4addr, cfgoptions->optname);
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int config_setdefault_ipv4addr(configmodule_interface_t *cfg, paramdef_t *cfgoptions, char *prefix)
|
||||
{
|
||||
int status = 0;
|
||||
|
||||
if (cfgoptions->defstrval != NULL) {
|
||||
status = config_assign_ipv4addr(cfg, cfgoptions, cfgoptions->defstrval);
|
||||
}
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
|
||||
|
||||
void config_assign_int(configmodule_interface_t *cfg, paramdef_t *cfgoptions, char *fullname, int val)
|
||||
{
|
||||
int tmpval=val;
|
||||
|
||||
if ( ((cfgoptions->paramflags &PARAMFLAG_BOOL) != 0) && tmpval >0) {
|
||||
tmpval =1;
|
||||
}
|
||||
|
||||
switch (cfgoptions->type) {
|
||||
case TYPE_UINT8:
|
||||
*(cfgoptions->u8ptr) = (uint8_t)tmpval;
|
||||
printf_params(cfg, "[CONFIG] %s: %u\n", fullname, (uint8_t)tmpval);
|
||||
break;
|
||||
|
||||
case TYPE_INT8:
|
||||
*(cfgoptions->i8ptr) = (int8_t)tmpval;
|
||||
printf_params(cfg, "[CONFIG] %s: %i\n", fullname, (int8_t)tmpval);
|
||||
break;
|
||||
|
||||
case TYPE_UINT16:
|
||||
*(cfgoptions->u16ptr) = (uint16_t)tmpval;
|
||||
printf_params(cfg, "[CONFIG] %s: %hu\n", fullname, (uint16_t)tmpval);
|
||||
break;
|
||||
|
||||
case TYPE_INT16:
|
||||
*(cfgoptions->i16ptr) = (int16_t)tmpval;
|
||||
printf_params(cfg, "[CONFIG] %s: %hi\n", fullname, (int16_t)tmpval);
|
||||
break;
|
||||
|
||||
case TYPE_UINT32:
|
||||
*(cfgoptions->uptr) = (uint32_t)tmpval;
|
||||
printf_params(cfg, "[CONFIG] %s: %u\n", fullname, (uint32_t)tmpval);
|
||||
break;
|
||||
|
||||
case TYPE_MASK:
|
||||
*(cfgoptions->uptr) = *(cfgoptions->uptr) | (uint32_t)tmpval;
|
||||
printf_params(cfg, "[CONFIG] %s: 0x%08x\n", fullname, (uint32_t)tmpval);
|
||||
break;
|
||||
|
||||
case TYPE_INT32:
|
||||
*(cfgoptions->iptr) = (int32_t)tmpval;
|
||||
printf_params(cfg, "[CONFIG] %s: %i\n", fullname, (int32_t)tmpval);
|
||||
break;
|
||||
|
||||
default:
|
||||
fprintf (stderr,"[CONFIG] %s %i type %i non integer parameter %s not assigned\n",__FILE__, __LINE__,cfgoptions->type,fullname);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -1,58 +0,0 @@
|
||||
/*
|
||||
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The OpenAirInterface Software Alliance licenses this file to You under
|
||||
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
|
||||
* except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.openairinterface.org/?page_id=698
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*-------------------------------------------------------------------------------
|
||||
* For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
* contact@openairinterface.org
|
||||
*/
|
||||
|
||||
/*! \file common/config/config_userapi.h
|
||||
* \brief: configuration module, include file to be used by the source code calling the
|
||||
* configuration module to access configuration parameters
|
||||
* \author Francois TABURET
|
||||
* \date 2017
|
||||
* \version 0.1
|
||||
* \company NOKIA BellLabs France
|
||||
* \email: francois.taburet@nokia-bell-labs.com
|
||||
* \note
|
||||
* \warning
|
||||
*/
|
||||
#ifndef INCLUDE_CONFIG_COMMON_H
|
||||
#define INCLUDE_CONFIG_COMMON_H
|
||||
#include "config_load_configmodule.h"
|
||||
#include "common/utils/utils.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
void config_check_valptr(configmodule_interface_t *cfg, paramdef_t *cfgoptions, int elt_sz, int nb_elt);
|
||||
/* functions to set a parameter to its default value */
|
||||
int config_setdefault_int(configmodule_interface_t *cfg, paramdef_t *cfgoptions, char *prefix);
|
||||
int config_setdefault_int64(configmodule_interface_t *cfg, paramdef_t *cfgoptions, char *prefix);
|
||||
int config_setdefault_intlist(configmodule_interface_t *cfg, paramdef_t *cfgoptions, char *prefix);
|
||||
int config_setdefault_string(configmodule_interface_t *cfg, paramdef_t *cfgoptions, char *prefix);
|
||||
int config_setdefault_stringlist(configmodule_interface_t *cfg, paramdef_t *cfgoptions, char *prefix);
|
||||
int config_setdefault_double(configmodule_interface_t *cfg, paramdef_t *cfgoptions, char *prefix);
|
||||
int config_setdefault_ipv4addr(configmodule_interface_t *cfg, paramdef_t *cfgoptions, char *prefix);
|
||||
void *config_allocate_new(configmodule_interface_t *cfg, int sz, bool autoFree);
|
||||
void config_assign_int(configmodule_interface_t *cfg, paramdef_t *cfgoptions, char *fullname, int val);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -36,7 +36,7 @@
|
||||
#include <unistd.h>
|
||||
#include <errno.h>
|
||||
#include <dlfcn.h>
|
||||
#include "common/platform_types.h"
|
||||
#include <platform_types.h>
|
||||
|
||||
#define CONFIG_LOADCONFIG_MAIN
|
||||
#include "config_load_configmodule.h"
|
||||
@@ -44,25 +44,6 @@
|
||||
#include "../utils/LOG/log.h"
|
||||
#define CONFIG_SHAREDLIBFORMAT "libparams_%s.so"
|
||||
#include "nfapi/oai_integration/vendor_ext.h"
|
||||
#include "config_common.h"
|
||||
|
||||
// clang-format off
|
||||
static char config_helpstr [] = "\n lte-softmodem -O [config mode]<:dbgl[debugflags]><:incp[path]>\n \
|
||||
debugflags can also be defined in the config section of the config file\n \
|
||||
debugflags: mask, 1->print parameters, 2->print memory allocations debug messages\n \
|
||||
4->print command line processing debug messages\n \
|
||||
incp parameter can be used to define the include path used for config files (@include directive)\n \
|
||||
defaults is set to the path of the main config file.\n";
|
||||
|
||||
static paramdef_t Config_Params[] = {
|
||||
/*--------------------------------------------------------------------------------------------------------------------------*/
|
||||
/* config parameters for config module */
|
||||
/* optname helpstr paramflags XXXptr defXXXval type numelt */
|
||||
/*--------------------------------------------------------------------------------------------------------------------------*/
|
||||
{CONFIGP_DEBUGFLAGS, config_helpstr, 0, .uptr = NULL, .defintval = 0, TYPE_MASK, 0},
|
||||
{CONFIGP_TMPDIR, CONFIG_HELP_TMPDIR, PARAMFLAG_NOFREE, .strptr = NULL, .defstrval = "/tmp", TYPE_STRING, 0},
|
||||
};
|
||||
// clang-format on
|
||||
|
||||
int load_config_sharedlib(configmodule_interface_t *cfgptr) {
|
||||
void *lib_handle;
|
||||
@@ -71,7 +52,7 @@ int load_config_sharedlib(configmodule_interface_t *cfgptr) {
|
||||
int st;
|
||||
st=0;
|
||||
sprintf(libname,CONFIG_SHAREDLIBFORMAT,cfgptr->cfgmode);
|
||||
lib_handle = dlopen(libname, RTLD_LAZY | RTLD_GLOBAL | RTLD_NODELETE);
|
||||
lib_handle = dlopen(libname,RTLD_NOW | RTLD_GLOBAL | RTLD_NODELETE);
|
||||
|
||||
if (!lib_handle) {
|
||||
fprintf(stderr,"[CONFIG] %s %d Error calling dlopen(%s): %s\n",__FILE__, __LINE__, libname,dlerror());
|
||||
@@ -84,7 +65,7 @@ int load_config_sharedlib(configmodule_interface_t *cfgptr) {
|
||||
printf("[CONFIG] %s %d no function %s for config mode %s\n",
|
||||
__FILE__, __LINE__,fname, cfgptr->cfgmode);
|
||||
} else {
|
||||
st = cfgptr->init(cfgptr);
|
||||
st=cfgptr->init(cfgptr->cfgP,cfgptr->num_cfgP);
|
||||
printf("[CONFIG] function %s returned %i\n",
|
||||
fname, st);
|
||||
}
|
||||
@@ -140,18 +121,14 @@ int nooptfunc(void) {
|
||||
return 0;
|
||||
};
|
||||
|
||||
int config_cmdlineonly_getlist(configmodule_interface_t *cfg,
|
||||
paramlist_def_t *ParamList,
|
||||
paramdef_t *params,
|
||||
int numparams,
|
||||
char *prefix)
|
||||
{
|
||||
int config_cmdlineonly_getlist(paramlist_def_t *ParamList,
|
||||
paramdef_t *params, int numparams, char *prefix) {
|
||||
ParamList->numelt = 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
int config_cmdlineonly_get(configmodule_interface_t *cfg, paramdef_t *cfgoptions, int numoptions, char *prefix)
|
||||
{
|
||||
|
||||
int config_cmdlineonly_get(paramdef_t *cfgoptions,int numoptions, char *prefix ) {
|
||||
int defval;
|
||||
int fatalerror=0;
|
||||
int numdefvals=0;
|
||||
@@ -161,11 +138,11 @@ int config_cmdlineonly_get(configmodule_interface_t *cfg, paramdef_t *cfgoptions
|
||||
|
||||
switch(cfgoptions[i].type) {
|
||||
case TYPE_STRING:
|
||||
defval = config_setdefault_string(cfg, &cfgoptions[i], prefix);
|
||||
defval=config_setdefault_string(&(cfgoptions[i]), prefix);
|
||||
break;
|
||||
|
||||
case TYPE_STRINGLIST:
|
||||
defval = config_setdefault_stringlist(cfg, &cfgoptions[i], prefix);
|
||||
defval=config_setdefault_stringlist(&(cfgoptions[i]), prefix);
|
||||
break;
|
||||
|
||||
case TYPE_UINT8:
|
||||
@@ -175,25 +152,25 @@ int config_cmdlineonly_get(configmodule_interface_t *cfg, paramdef_t *cfgoptions
|
||||
case TYPE_UINT32:
|
||||
case TYPE_INT32:
|
||||
case TYPE_MASK:
|
||||
defval = config_setdefault_int(cfg, &cfgoptions[i], prefix);
|
||||
defval=config_setdefault_int(&(cfgoptions[i]), prefix);
|
||||
break;
|
||||
|
||||
case TYPE_UINT64:
|
||||
case TYPE_INT64:
|
||||
defval = config_setdefault_int64(cfg, &cfgoptions[i], prefix);
|
||||
defval=config_setdefault_int64(&(cfgoptions[i]), prefix);
|
||||
break;
|
||||
|
||||
case TYPE_UINTARRAY:
|
||||
case TYPE_INTARRAY:
|
||||
defval = config_setdefault_intlist(cfg, &cfgoptions[i], prefix);
|
||||
defval=config_setdefault_intlist(&(cfgoptions[i]), prefix);
|
||||
break;
|
||||
|
||||
case TYPE_DOUBLE:
|
||||
defval = config_setdefault_double(cfg, &cfgoptions[i], prefix);
|
||||
defval=config_setdefault_double(&(cfgoptions[i]), prefix);
|
||||
break;
|
||||
|
||||
case TYPE_IPV4ADDR:
|
||||
defval = config_setdefault_ipv4addr(cfg, &cfgoptions[i], prefix);
|
||||
defval=config_setdefault_ipv4addr(&(cfgoptions[i]), prefix);
|
||||
break;
|
||||
|
||||
default:
|
||||
@@ -254,7 +231,7 @@ configmodule_interface_t *load_configmodule(int argc,
|
||||
OWoptIdx = i;
|
||||
}
|
||||
if ( strstr(argv[i], "help_config") != NULL ) {
|
||||
config_printhelp(Config_Params, sizeofArray(Config_Params), CONFIG_SECTIONNAME);
|
||||
config_printhelp(Config_Params,CONFIG_PARAMLENGTH(Config_Params),CONFIG_SECTIONNAME);
|
||||
exit(0);
|
||||
}
|
||||
|
||||
@@ -294,12 +271,8 @@ configmodule_interface_t *load_configmodule(int argc,
|
||||
modeparams=cfgmode;
|
||||
cfgmode=strdup(CONFIG_LIBCONFIGFILE);
|
||||
}
|
||||
static configmodule_interface_t *cfgptr;
|
||||
if (cfgptr)
|
||||
printf("ERROR: Call load_configmodule more than one time\n");
|
||||
|
||||
// The macros are not thread safe print_params and similar
|
||||
cfgptr = calloc(sizeof(configmodule_interface_t), 1);
|
||||
if (cfgptr == NULL) {
|
||||
cfgptr = calloc(sizeof(configmodule_interface_t),1);
|
||||
/* argv_info is used to memorize command line options which have been recognized */
|
||||
/* and to detect unrecognized command line options which might have been specified */
|
||||
cfgptr->argv_info = calloc(sizeof(int32_t), argc+10);
|
||||
@@ -341,10 +314,11 @@ configmodule_interface_t *load_configmodule(int argc,
|
||||
atoken = strtok_r(NULL,":",&strtokctx);
|
||||
}
|
||||
|
||||
printf("[CONFIG] get parameters from %s ", cfgmode);
|
||||
for (i = 0; i < cfgptr->num_cfgP; i++) {
|
||||
printf("%s ", cfgptr->cfgP[i]);
|
||||
}
|
||||
printf("[CONFIG] get parameters from %s ",cfgmode);
|
||||
}
|
||||
for (i=0; i<cfgptr->num_cfgP; i++) {
|
||||
printf("%s ",cfgptr->cfgP[i]);
|
||||
}
|
||||
|
||||
if (cfgptr->rtflags & CONFIG_PRINTPARAMS) {
|
||||
cfgptr->status = malloc(sizeof(configmodule_status_t));
|
||||
@@ -354,11 +328,11 @@ configmodule_interface_t *load_configmodule(int argc,
|
||||
|
||||
if (i == 0) {
|
||||
printf("[CONFIG] config module %s loaded\n",cfgmode);
|
||||
int idx = config_paramidx_fromname(Config_Params, sizeofArray(Config_Params), CONFIGP_DEBUGFLAGS);
|
||||
int idx = config_paramidx_fromname(Config_Params, CONFIG_PARAMLENGTH(Config_Params), CONFIGP_DEBUGFLAGS);
|
||||
Config_Params[idx].uptr = &(cfgptr->rtflags);
|
||||
idx = config_paramidx_fromname(Config_Params, sizeofArray(Config_Params), CONFIGP_TMPDIR);
|
||||
idx = config_paramidx_fromname(Config_Params, CONFIG_PARAMLENGTH(Config_Params), CONFIGP_TMPDIR);
|
||||
Config_Params[idx].strptr = &(cfgptr->tmpdir);
|
||||
config_get(cfgptr, Config_Params, sizeofArray(Config_Params), CONFIG_SECTIONNAME);
|
||||
config_get(Config_Params,CONFIG_PARAMLENGTH(Config_Params), CONFIG_SECTIONNAME );
|
||||
} else {
|
||||
fprintf(stderr,"[CONFIG] %s %d config module \"%s\" couldn't be loaded\n", __FILE__, __LINE__,cfgmode);
|
||||
cfgptr->rtflags = cfgptr->rtflags | CONFIG_HELP | CONFIG_ABORT;
|
||||
@@ -377,7 +351,7 @@ configmodule_interface_t *load_configmodule(int argc,
|
||||
if (cfgmode != NULL) free(cfgmode);
|
||||
|
||||
if (CONFIG_ISFLAGSET(CONFIG_ABORT)) {
|
||||
config_printhelp(Config_Params, sizeofArray(Config_Params), CONFIG_SECTIONNAME);
|
||||
config_printhelp(Config_Params,CONFIG_PARAMLENGTH(Config_Params),CONFIG_SECTIONNAME );
|
||||
// exit(-1);
|
||||
}
|
||||
|
||||
@@ -385,11 +359,10 @@ configmodule_interface_t *load_configmodule(int argc,
|
||||
}
|
||||
|
||||
/* Possibly write config file, with parameters which have been read and after command line parsing */
|
||||
void write_parsedcfg(configmodule_interface_t *cfgptr)
|
||||
void write_parsedcfg(void)
|
||||
{
|
||||
if (cfgptr->status && (cfgptr->rtflags & CONFIG_SAVERUNCFG)) {
|
||||
printf_params(cfgptr,
|
||||
"[CONFIG] Runtime params creation status: %i null values, %i errors, %i empty list or array, %i successfull \n",
|
||||
printf_params("[CONFIG] Runtime params creation status: %i null values, %i errors, %i empty list or array, %i successfull \n",
|
||||
cfgptr->status->num_err_nullvalue,
|
||||
cfgptr->status->num_err_write,
|
||||
cfgptr->status->emptyla,
|
||||
@@ -398,20 +371,19 @@ void write_parsedcfg(configmodule_interface_t *cfgptr)
|
||||
if (cfgptr != NULL) {
|
||||
if (cfgptr->write_parsedcfg != NULL) {
|
||||
printf("[CONFIG] calling config module write_parsedcfg function...\n");
|
||||
cfgptr->write_parsedcfg(cfgptr);
|
||||
cfgptr->write_parsedcfg();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* free memory allocated when reading parameters */
|
||||
/* config module could be initialized again after this call */
|
||||
void end_configmodule(configmodule_interface_t *cfgptr)
|
||||
{
|
||||
write_parsedcfg(cfgptr);
|
||||
void end_configmodule(void) {
|
||||
write_parsedcfg();
|
||||
if (cfgptr != NULL) {
|
||||
if (cfgptr->end != NULL) {
|
||||
printf ("[CONFIG] calling config module end function...\n");
|
||||
cfgptr->end(cfgptr);
|
||||
cfgptr->end();
|
||||
}
|
||||
|
||||
pthread_mutex_lock(&cfgptr->memBlocks_mutex);
|
||||
@@ -436,3 +408,8 @@ void end_configmodule(configmodule_interface_t *cfgptr)
|
||||
cfgptr=NULL;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -59,14 +59,11 @@
|
||||
#define CONFIG_HELP (1<<20) // print help message
|
||||
#define CONFIG_ABORT (1<<21) // config failed,abort execution
|
||||
#define CONFIG_NOOOPT (1<<22) // no -O option found when parsing command line
|
||||
struct configmodule_interface;
|
||||
typedef int (*configmodule_getfunc_t)(struct configmodule_interface *, paramdef_t *, int numparams, char *prefix);
|
||||
typedef int (
|
||||
*configmodule_getlistfunc_t)(struct configmodule_interface *, paramlist_def_t *, paramdef_t *, int numparams, char *prefix);
|
||||
typedef int(*configmodule_initfunc_t)(char *cfgP[],int numP);
|
||||
typedef int(*configmodule_getfunc_t)(paramdef_t *,int numparams, char *prefix);
|
||||
typedef int(*configmodule_getlistfunc_t)(paramlist_def_t *, paramdef_t *,int numparams, char *prefix);
|
||||
typedef int (*configmodule_setfunc_t)(paramdef_t *cfgoptions, int numoptions, char *prefix);
|
||||
typedef void (*configmodule_endfunc_t)(struct configmodule_interface *cfg);
|
||||
|
||||
typedef int (*configmodule_initfunc_t)(struct configmodule_interface *cfg);
|
||||
typedef void(*configmodule_endfunc_t)(void);
|
||||
|
||||
typedef struct configmodule_status {
|
||||
int num_paramgroups;
|
||||
@@ -108,23 +105,41 @@ typedef struct configmodule_interface {
|
||||
configmodule_status_t *status; // allocated in debug mode only
|
||||
} configmodule_interface_t;
|
||||
|
||||
#ifdef CONFIG_LOADCONFIG_MAIN
|
||||
configmodule_interface_t *cfgptr=NULL;
|
||||
|
||||
static char config_helpstr [] = "\n lte-softmodem -O [config mode]<:dbgl[debugflags]><:incp[path]>\n \
|
||||
debugflags can also be defined in the config section of the config file\n \
|
||||
debugflags: mask, 1->print parameters, 2->print memory allocations debug messages\n \
|
||||
4->print command line processing debug messages\n \
|
||||
incp parameter can be used to define the include path used for config files (@include directive)\n \
|
||||
defaults is set to the path of the main config file.\n";
|
||||
|
||||
#define CONFIG_HELP_TMPDIR "<Repository to create temporary file>"
|
||||
|
||||
#define CONFIG_SECTIONNAME "config"
|
||||
#define CONFIGP_DEBUGFLAGS "debugflags"
|
||||
#define CONFIGP_TMPDIR "tmpdir"
|
||||
|
||||
// extern configmodule_interface_t *cfgptr;
|
||||
// clang-format off
|
||||
static paramdef_t Config_Params[] = {
|
||||
/*--------------------------------------------------------------------------------------------------------------------------*/
|
||||
/* config parameters for config module */
|
||||
/* optname helpstr paramflags XXXptr defXXXval type numelt */
|
||||
/*--------------------------------------------------------------------------------------------------------------------------*/
|
||||
{CONFIGP_DEBUGFLAGS, config_helpstr, 0, .uptr = NULL, .defintval = 0, TYPE_MASK, 0},
|
||||
{CONFIGP_TMPDIR, CONFIG_HELP_TMPDIR, PARAMFLAG_NOFREE, .strptr = NULL, .defstrval = "/tmp", TYPE_STRING, 0},
|
||||
};
|
||||
// clang-format on
|
||||
|
||||
#define printf_params(cfg, ...) \
|
||||
if ((cfg->rtflags & (CONFIG_PRINTPARAMS)) != 0) { \
|
||||
printf(__VA_ARGS__); \
|
||||
}
|
||||
#else
|
||||
extern configmodule_interface_t *cfgptr;
|
||||
#endif
|
||||
|
||||
#define printf_cmdl(cfg, ...) \
|
||||
if ((cfg->rtflags & (CONFIG_DEBUGCMDLINE)) != 0) { \
|
||||
printf(__VA_ARGS__); \
|
||||
}
|
||||
|
||||
#define printf_params(...) if ( (cfgptr->rtflags & (CONFIG_PRINTPARAMS)) != 0 ) { printf ( __VA_ARGS__ ); }
|
||||
#define printf_ptrs(...) if ( (cfgptr->rtflags & (CONFIG_DEBUGPTR)) != 0 ) { printf ( __VA_ARGS__ ); }
|
||||
#define printf_cmdl(...) if ( (cfgptr->rtflags & (CONFIG_DEBUGCMDLINE)) != 0 ) { printf ( __VA_ARGS__ ); }
|
||||
|
||||
#define CONFIG_ENABLECMDLINEONLY (1<<1)
|
||||
extern configmodule_interface_t *load_configmodule(int argc, char **argv, uint32_t initflags);
|
||||
@@ -133,8 +148,8 @@ extern configmodule_interface_t *load_configmodule(int argc, char **argv, uint32
|
||||
* should be used as soon as there is no need to read parameters but doesn't prevent
|
||||
* a new config module init
|
||||
*/
|
||||
void end_configmodule(configmodule_interface_t *cfg);
|
||||
void write_parsedcfg(configmodule_interface_t *cfg);
|
||||
extern void end_configmodule(void);
|
||||
extern void write_parsedcfg(void);
|
||||
|
||||
/* free all config module memory, to be used at end of program as
|
||||
* it will free parameters values even those specified with the PARAMFLAG_NOFREE flag */
|
||||
|
||||
@@ -33,6 +33,7 @@
|
||||
#ifndef INCLUDE_CONFIG_PARAMDESC_H
|
||||
#define INCLUDE_CONFIG_PARAMDESC_H
|
||||
|
||||
|
||||
#define MAX_OPTNAME_SIZE 64
|
||||
#define CONFIG_MAXOPTLENGTH 512 /* max full option length, full option name exemple: (prefix1.[<index>].prefix2.optname */
|
||||
|
||||
@@ -55,47 +56,42 @@
|
||||
/* checkedparam_t is possibly used in paramdef_t for specific parameter value validation */
|
||||
#define CONFIG_MAX_NUMCHECKVAL 20
|
||||
typedef struct paramdef paramdef_t;
|
||||
typedef struct configmodule_interface configmodule_interface_t;
|
||||
typedef union checkedparam {
|
||||
struct {
|
||||
int (*f1)(configmodule_interface_t *cfg, paramdef_t *param); /* check an integer against a list of authorized values */
|
||||
int (*f1)(paramdef_t *param); /* check an integer against a list of authorized values */
|
||||
int okintval[CONFIG_MAX_NUMCHECKVAL]; /* integer array, store possible values */
|
||||
int num_okintval; /* number of valid values in the checkingval array */
|
||||
} s1;
|
||||
struct {
|
||||
int (*f1a)(configmodule_interface_t *cfg,
|
||||
paramdef_t *param); /* check an integer against a list of authorized values and set param value */
|
||||
int (*f1a)(paramdef_t *param); /* check an integer against a list of authorized values and set param value */
|
||||
/* to the corresponding item in setintval array (mainly for RRC params) */
|
||||
int okintval[CONFIG_MAX_NUMCHECKVAL]; /* integer array, store possible values in config file */
|
||||
int setintval[CONFIG_MAX_NUMCHECKVAL]; /* integer array, values set in the paramdef structure */
|
||||
int num_okintval; /* number of valid values in the checkingval array */
|
||||
} s1a;
|
||||
struct {
|
||||
int (*f2)(configmodule_interface_t *cfg,
|
||||
paramdef_t *param); /* check an integer against an authorized range, defined by its min and max value */
|
||||
int (*f2)(paramdef_t *param); /* check an integer against an authorized range, defined by its min and max value */
|
||||
int okintrange[CONFIG_MAX_NUMCHECKVAL]; /* integer array, store min and max values */
|
||||
|
||||
} s2;
|
||||
struct {
|
||||
int (*f3)(configmodule_interface_t *cfg, paramdef_t *param); /* check a string against a list of authorized values */
|
||||
int (*f3)(paramdef_t *param); /* check a string against a list of authorized values */
|
||||
char *okstrval[CONFIG_MAX_NUMCHECKVAL]; /* string array, store possible values */
|
||||
int num_okstrval; /* number of valid values in the checkingval array */
|
||||
} s3;
|
||||
struct {
|
||||
int (*f3a)(configmodule_interface_t *cfg,
|
||||
paramdef_t *param); /* check a string against a list of authorized values and set param value */
|
||||
int (*f3a)(paramdef_t *param); /* check a string against a list of authorized values and set param value */
|
||||
/* to the corresponding item in setintval array (mainly for RRC params) */
|
||||
char *okstrval[CONFIG_MAX_NUMCHECKVAL]; /* string array, store possible values */
|
||||
int setintval[CONFIG_MAX_NUMCHECKVAL]; /* integer array, values set in the paramdef structure */
|
||||
int num_okstrval; /* number of valid values in the checkingval array */
|
||||
} s3a;
|
||||
struct {
|
||||
int (*f4)(configmodule_interface_t *cfg,
|
||||
paramdef_t *param); /* generic check function, no arguments but the param description */
|
||||
int (*f4)(paramdef_t *param); /* generic check function, no arguments but the param description */
|
||||
|
||||
} s4;
|
||||
struct {
|
||||
void (*checkfunc)(configmodule_interface_t *cfg);
|
||||
void (*checkfunc)(void) ;
|
||||
} s5;
|
||||
} checkedparam_t;
|
||||
|
||||
@@ -161,10 +157,13 @@ typedef struct paramdef {
|
||||
#define TYPE_LIST 55
|
||||
|
||||
#define ANY_IPV4ADDR_STRING "0.0.0.0"
|
||||
|
||||
typedef struct paramlist_def {
|
||||
char listname[MAX_OPTNAME_SIZE];
|
||||
paramdef_t **paramarray;
|
||||
int numelt ;
|
||||
} paramlist_def_t;
|
||||
|
||||
/* macro helpers for module users */
|
||||
#define CONFIG_PARAMLENGTH(A) (sizeof(A)/sizeof(paramdef_t))
|
||||
#endif /* INCLUDE_CONFIG_PARAMDESC_H */
|
||||
|
||||
@@ -39,14 +39,162 @@
|
||||
#include <errno.h>
|
||||
#include <dlfcn.h>
|
||||
#include <arpa/inet.h>
|
||||
#include "common/platform_types.h"
|
||||
#include <platform_types.h>
|
||||
#include "config_userapi.h"
|
||||
#include "config_common.h"
|
||||
#include "../utils/LOG/log.h"
|
||||
|
||||
static void config_assign_processedint(configmodule_interface_t *cfg, paramdef_t *cfgoption, int val)
|
||||
{
|
||||
cfgoption->processedvalue = config_allocate_new(cfg, sizeof(int), !(cfgoption->paramflags & PARAMFLAG_NOFREE));
|
||||
configmodule_interface_t *config_get_if(void) {
|
||||
if (cfgptr == NULL) {
|
||||
if (isLogInitDone())
|
||||
LOG_W(ENB_APP,"[CONFIG] %s %d config module not initialized\n",__FILE__,__LINE__);
|
||||
}
|
||||
|
||||
return cfgptr;
|
||||
}
|
||||
|
||||
static int managed_ptr_sz(void* ptr) {
|
||||
configmodule_interface_t * cfg=config_get_if();
|
||||
AssertFatal(cfg->numptrs < CONFIG_MAX_ALLOCATEDPTRS,
|
||||
"This code use fixed size array as #define CONFIG_MAX_ALLOCATEDPTRS %d\n",
|
||||
CONFIG_MAX_ALLOCATEDPTRS);
|
||||
int i;
|
||||
pthread_mutex_lock(&cfg->memBlocks_mutex);
|
||||
int numptrs=cfg->numptrs;
|
||||
for (i=0; i<numptrs; i++ )
|
||||
if (cfg->oneBlock[i].ptrs == ptr)
|
||||
break;
|
||||
pthread_mutex_unlock(&cfg->memBlocks_mutex);
|
||||
if ( i == numptrs )
|
||||
return -1;
|
||||
else
|
||||
return cfg->oneBlock[i].sz;
|
||||
}
|
||||
|
||||
void *config_allocate_new(int sz, bool autoFree) {
|
||||
void *ptr = calloc(sz,1);
|
||||
AssertFatal(ptr, "calloc fails\n");
|
||||
configmodule_interface_t * cfg=config_get_if();
|
||||
// add the memory piece in the managed memory pieces list
|
||||
pthread_mutex_lock(&cfg->memBlocks_mutex);
|
||||
int newBlockIdx=cfg->numptrs++;
|
||||
oneBlock_t* tmp=&cfg->oneBlock[newBlockIdx];
|
||||
tmp->ptrs = (char *)ptr;
|
||||
tmp->ptrsAllocated = true;
|
||||
tmp->sz=sz;
|
||||
tmp->toFree=autoFree;
|
||||
pthread_mutex_unlock(&cfg->memBlocks_mutex);
|
||||
return ptr;
|
||||
}
|
||||
|
||||
void config_check_valptr(paramdef_t *cfgoptions, int elt_sz, int nb_elt) {
|
||||
|
||||
const bool toFree=!(cfgoptions->paramflags & PARAMFLAG_NOFREE);
|
||||
|
||||
// let's see if the value has been read
|
||||
// the datamodel is more difficult than it should be
|
||||
// and it is not thread safe
|
||||
if (cfgoptions->voidptr) {
|
||||
int sz;
|
||||
if ( cfgoptions-> type == TYPE_STRING)
|
||||
sz=managed_ptr_sz(*cfgoptions->strptr);
|
||||
else
|
||||
sz=managed_ptr_sz(cfgoptions->voidptr);
|
||||
if ( sz != -1 ) // the same variable pointer has been used!
|
||||
cfgoptions->numelt=sz;
|
||||
}
|
||||
|
||||
if (cfgoptions->voidptr != NULL
|
||||
&& (cfgoptions->type == TYPE_INTARRAY
|
||||
|| cfgoptions->type == TYPE_UINTARRAY
|
||||
|| cfgoptions->type == TYPE_STRINGLIST )) {
|
||||
int sz;
|
||||
if ( cfgoptions->type == TYPE_STRING ||
|
||||
cfgoptions->type == TYPE_STRINGLIST )
|
||||
sz=managed_ptr_sz(*cfgoptions->strptr);
|
||||
else
|
||||
sz=managed_ptr_sz(cfgoptions->voidptr);
|
||||
if ( sz == -1) {
|
||||
CONFIG_PRINTF_ERROR("[CONFIG] %s NOT SUPPORTED not NULL pointer with array types", cfgoptions->optname);
|
||||
return ;
|
||||
}
|
||||
}
|
||||
|
||||
if (cfgoptions->voidptr == NULL ) {
|
||||
if (cfgoptions->type == TYPE_STRING) {
|
||||
// difficult datamodel
|
||||
cfgoptions->strptr = config_allocate_new(sizeof(*cfgoptions->strptr), toFree);
|
||||
} else if ( cfgoptions->type == TYPE_STRINGLIST) {
|
||||
AssertFatal(nb_elt<MAX_LIST_SIZE,
|
||||
"This piece of code use fixed size arry of constant #define MAX_LIST_SIZE %d\n",
|
||||
MAX_LIST_SIZE );
|
||||
cfgoptions->strlistptr= config_allocate_new(sizeof(char*)*MAX_LIST_SIZE, toFree);
|
||||
for (int i=0; i<MAX_LIST_SIZE; i++)
|
||||
cfgoptions->strlistptr[i]= config_allocate_new(DEFAULT_EXTRA_SZ, toFree);
|
||||
} else {
|
||||
if ( cfgoptions->type == TYPE_INTARRAY || cfgoptions->type == TYPE_UINTARRAY )
|
||||
nb_elt=max(nb_elt, MAX_LIST_SIZE); // make room if the list is larger than the default one
|
||||
cfgoptions->voidptr = config_allocate_new(elt_sz*nb_elt, toFree);
|
||||
}
|
||||
}
|
||||
|
||||
if (cfgoptions->type == TYPE_STRING && *cfgoptions->strptr == NULL) {
|
||||
*cfgoptions->strptr = config_allocate_new(nb_elt+DEFAULT_EXTRA_SZ, toFree);
|
||||
cfgoptions->numelt=nb_elt+DEFAULT_EXTRA_SZ;
|
||||
}
|
||||
|
||||
printf_ptrs("[CONFIG] %s ptr: %p requested size: elt_sz: %d, nb_elt: %d\n",cfgoptions->optname, cfgoptions->voidptr, elt_sz, nb_elt);
|
||||
}
|
||||
|
||||
void config_assign_int(paramdef_t *cfgoptions, char *fullname, int val) {
|
||||
int tmpval=val;
|
||||
|
||||
if ( ((cfgoptions->paramflags &PARAMFLAG_BOOL) != 0) && tmpval >0) {
|
||||
tmpval =1;
|
||||
}
|
||||
|
||||
switch (cfgoptions->type) {
|
||||
case TYPE_UINT8:
|
||||
*(cfgoptions->u8ptr) = (uint8_t)tmpval;
|
||||
printf_params("[CONFIG] %s: %u\n", fullname, (uint8_t)tmpval);
|
||||
break;
|
||||
|
||||
case TYPE_INT8:
|
||||
*(cfgoptions->i8ptr) = (int8_t)tmpval;
|
||||
printf_params("[CONFIG] %s: %i\n", fullname, (int8_t)tmpval);
|
||||
break;
|
||||
|
||||
case TYPE_UINT16:
|
||||
*(cfgoptions->u16ptr) = (uint16_t)tmpval;
|
||||
printf_params("[CONFIG] %s: %hu\n", fullname, (uint16_t)tmpval);
|
||||
break;
|
||||
|
||||
case TYPE_INT16:
|
||||
*(cfgoptions->i16ptr) = (int16_t)tmpval;
|
||||
printf_params("[CONFIG] %s: %hi\n", fullname, (int16_t)tmpval);
|
||||
break;
|
||||
|
||||
case TYPE_UINT32:
|
||||
*(cfgoptions->uptr) = (uint32_t)tmpval;
|
||||
printf_params("[CONFIG] %s: %u\n", fullname, (uint32_t)tmpval);
|
||||
break;
|
||||
|
||||
case TYPE_MASK:
|
||||
*(cfgoptions->uptr) = *(cfgoptions->uptr) | (uint32_t)tmpval;
|
||||
printf_params("[CONFIG] %s: 0x%08x\n", fullname, (uint32_t)tmpval);
|
||||
break;
|
||||
|
||||
case TYPE_INT32:
|
||||
*(cfgoptions->iptr) = (int32_t)tmpval;
|
||||
printf_params("[CONFIG] %s: %i\n", fullname, (int32_t)tmpval);
|
||||
break;
|
||||
|
||||
default:
|
||||
fprintf (stderr,"[CONFIG] %s %i type %i non integer parameter %s not assigned\n",__FILE__, __LINE__,cfgoptions->type,fullname);
|
||||
break;
|
||||
}
|
||||
}
|
||||
void config_assign_processedint(paramdef_t *cfgoption, int val) {
|
||||
cfgoption->processedvalue = config_allocate_new(sizeof(int),!(cfgoption->paramflags & PARAMFLAG_NOFREE));
|
||||
|
||||
if ( cfgoption->processedvalue != NULL) {
|
||||
*(cfgoption->processedvalue) = val;
|
||||
@@ -55,15 +203,14 @@ static void config_assign_processedint(configmodule_interface_t *cfg, paramdef_t
|
||||
}
|
||||
}
|
||||
|
||||
int config_get_processedint(configmodule_interface_t *cfg, paramdef_t *cfgoption)
|
||||
{
|
||||
int config_get_processedint(paramdef_t *cfgoption) {
|
||||
int ret;
|
||||
|
||||
if ( cfgoption->processedvalue != NULL) {
|
||||
ret=*(cfgoption->processedvalue);
|
||||
free( cfgoption->processedvalue);
|
||||
cfgoption->processedvalue=NULL;
|
||||
printf_params(cfg, "[CONFIG] %s: set from %s to %i\n", cfgoption->optname, *cfgoption->strptr, ret);
|
||||
printf_params("[CONFIG] %s: set from %s to %i\n",cfgoption->optname, *cfgoption->strptr, ret);
|
||||
} else {
|
||||
fprintf (stderr,"[CONFIG] %s %d %s has no processed integer availablle\n",__FILE__, __LINE__, cfgoption->optname);
|
||||
ret=0;
|
||||
@@ -84,8 +231,7 @@ void config_printhelp(paramdef_t *params,int numparams, char *prefix) {
|
||||
printf("--------------------------------------------------------------------\n\n");
|
||||
}
|
||||
|
||||
int config_execcheck(configmodule_interface_t *cfg, paramdef_t *params, int numparams, char *prefix)
|
||||
{
|
||||
int config_execcheck(paramdef_t *params, int numparams, char *prefix) {
|
||||
int st=0;
|
||||
|
||||
for (int i=0 ; i<numparams ; i++) {
|
||||
@@ -94,7 +240,7 @@ int config_execcheck(configmodule_interface_t *cfg, paramdef_t *params, int nump
|
||||
}
|
||||
|
||||
if (params[i].chkPptr->s4.f4 != NULL) {
|
||||
st += params[i].chkPptr->s4.f4(cfg, &(params[i]));
|
||||
st += params[i].chkPptr->s4.f4(&(params[i]));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -115,8 +261,7 @@ int config_paramidx_fromname(paramdef_t *params, int numparams, char *name) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
int config_get(configmodule_interface_t *cfgif, paramdef_t *params, int numparams, char *prefix)
|
||||
{
|
||||
int config_get(paramdef_t *params, int numparams, char *prefix) {
|
||||
int ret= -1;
|
||||
|
||||
if (CONFIG_ISFLAGSET(CONFIG_ABORT)) {
|
||||
@@ -124,15 +269,16 @@ int config_get(configmodule_interface_t *cfgif, paramdef_t *params, int numparam
|
||||
return ret;
|
||||
}
|
||||
|
||||
configmodule_interface_t *cfgif = config_get_if();
|
||||
if (cfgif != NULL) {
|
||||
ret = cfgif->get(cfgif, params, numparams, prefix);
|
||||
ret = config_get_if()->get(params, numparams, prefix);
|
||||
|
||||
if (ret >= 0) {
|
||||
config_process_cmdline(cfgif, params, numparams, prefix);
|
||||
config_process_cmdline(params, numparams, prefix);
|
||||
if (cfgif->rtflags & CONFIG_SAVERUNCFG) {
|
||||
cfgif->set(params, numparams, prefix);
|
||||
config_get_if()->set(params, numparams, prefix);
|
||||
}
|
||||
config_execcheck(cfgif, params, numparams, prefix);
|
||||
config_execcheck(params, numparams, prefix);
|
||||
}
|
||||
|
||||
return ret;
|
||||
@@ -141,13 +287,16 @@ int config_get(configmodule_interface_t *cfgif, paramdef_t *params, int numparam
|
||||
return ret;
|
||||
}
|
||||
|
||||
int config_getlist(configmodule_interface_t *cfg, paramlist_def_t *ParamList, paramdef_t *params, int numparams, char *prefix)
|
||||
{
|
||||
int config_getlist(paramlist_def_t *ParamList, paramdef_t *params, int numparams, char *prefix) {
|
||||
if (CONFIG_ISFLAGSET(CONFIG_ABORT)) {
|
||||
fprintf(stderr,"[CONFIG] config_get skipped, config module not properly initialized\n");
|
||||
return -1;
|
||||
}
|
||||
const int ret = cfg->getlist(cfg, ParamList, params, numparams, prefix);
|
||||
|
||||
if (!config_get_if())
|
||||
return -1;
|
||||
|
||||
const int ret = config_get_if()->getlist(ParamList, params, numparams, prefix);
|
||||
|
||||
if (ret >= 0 && params) {
|
||||
char *newprefix;
|
||||
@@ -165,11 +314,11 @@ int config_getlist(configmodule_interface_t *cfg, paramlist_def_t *ParamList, pa
|
||||
for (int i = 0; i < ParamList->numelt; ++i) {
|
||||
// TODO config_process_cmdline?
|
||||
sprintf(cfgpath, "%s.[%i]", newprefix, i);
|
||||
config_process_cmdline(cfg, ParamList->paramarray[i], numparams, cfgpath);
|
||||
if (cfg->rtflags & CONFIG_SAVERUNCFG) {
|
||||
cfg->set(ParamList->paramarray[i], numparams, cfgpath);
|
||||
config_process_cmdline(ParamList->paramarray[i],numparams,cfgpath);
|
||||
if (config_get_if()->rtflags & CONFIG_SAVERUNCFG) {
|
||||
config_get_if()->set(ParamList->paramarray[i], numparams, cfgpath);
|
||||
}
|
||||
config_execcheck(cfg, ParamList->paramarray[i], numparams, cfgpath);
|
||||
config_execcheck(ParamList->paramarray[i], numparams, cfgpath);
|
||||
}
|
||||
|
||||
if (prefix)
|
||||
@@ -198,8 +347,7 @@ void print_intvalueerror(paramdef_t *param, char *fname, int *okval, int numokva
|
||||
fprintf(stderr, " \n");
|
||||
}
|
||||
|
||||
int config_check_intval(configmodule_interface_t *cfg, paramdef_t *param)
|
||||
{
|
||||
int config_check_intval(paramdef_t *param) {
|
||||
if ( param == NULL ) {
|
||||
fprintf(stderr,"[CONFIG] config_check_intval: NULL param argument\n");
|
||||
return -1;
|
||||
@@ -215,15 +363,10 @@ int config_check_intval(configmodule_interface_t *cfg, paramdef_t *param)
|
||||
return -1;
|
||||
}
|
||||
|
||||
int config_check_modify_integer(configmodule_interface_t *cfg, paramdef_t *param)
|
||||
{
|
||||
int config_check_modify_integer(paramdef_t *param) {
|
||||
for (int i=0; i < param->chkPptr->s1a.num_okintval ; i++) {
|
||||
if (*(param->uptr) == param->chkPptr->s1a.okintval[i] ) {
|
||||
printf_params(cfg,
|
||||
"[CONFIG] %s: read value %i, set to %i\n",
|
||||
param->optname,
|
||||
*(param->uptr),
|
||||
param->chkPptr->s1a.setintval[i]);
|
||||
printf_params("[CONFIG] %s: read value %i, set to %i\n",param->optname,*(param->uptr),param->chkPptr->s1a.setintval [i]);
|
||||
*(param->uptr) = param->chkPptr->s1a.setintval [i];
|
||||
return 0;
|
||||
}
|
||||
@@ -233,8 +376,7 @@ int config_check_modify_integer(configmodule_interface_t *cfg, paramdef_t *param
|
||||
return -1;
|
||||
}
|
||||
|
||||
int config_check_intrange(configmodule_interface_t *cfg, paramdef_t *param)
|
||||
{
|
||||
int config_check_intrange(paramdef_t *param) {
|
||||
if( *(param->iptr) >= param->chkPptr->s2.okintrange[0] && *(param->iptr) <= param->chkPptr->s2.okintrange[1] ) {
|
||||
return 0;
|
||||
}
|
||||
@@ -255,8 +397,7 @@ void print_strvalueerror(paramdef_t *param, char *fname, char **okval, int numok
|
||||
fprintf(stderr, " \n");
|
||||
}
|
||||
|
||||
int config_check_strval(configmodule_interface_t *cfg, paramdef_t *param)
|
||||
{
|
||||
int config_check_strval(paramdef_t *param) {
|
||||
if ( param == NULL ) {
|
||||
fprintf(stderr,"[CONFIG] config_check_strval: NULL param argument\n");
|
||||
return -1;
|
||||
@@ -272,11 +413,10 @@ int config_check_strval(configmodule_interface_t *cfg, paramdef_t *param)
|
||||
return -1;
|
||||
}
|
||||
|
||||
int config_checkstr_assign_integer(configmodule_interface_t *cfg, paramdef_t *param)
|
||||
{
|
||||
int config_checkstr_assign_integer(paramdef_t *param) {
|
||||
for (int i=0; i < param->chkPptr->s3a.num_okstrval ; i++) {
|
||||
if (strcasecmp(*param->strptr,param->chkPptr->s3a.okstrval[i] ) == 0) {
|
||||
config_assign_processedint(cfg, param, param->chkPptr->s3a.setintval[i]);
|
||||
config_assign_processedint(param, param->chkPptr->s3a.setintval[i]);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
@@ -290,3 +430,123 @@ void config_set_checkfunctions(paramdef_t *params, checkedparam_t *checkfunction
|
||||
params[i].chkPptr = &(checkfunctions[i]);
|
||||
}
|
||||
}
|
||||
|
||||
int config_setdefault_string(paramdef_t *cfgoptions, char *prefix) {
|
||||
int status = 0;
|
||||
|
||||
if( cfgoptions->defstrval != NULL) {
|
||||
status=1;
|
||||
|
||||
if (cfgoptions->numelt == 0 )
|
||||
config_check_valptr(cfgoptions, 1, strlen(cfgoptions->defstrval)+1);
|
||||
if ( cfgoptions->numelt < strlen(cfgoptions->defstrval)+1 ) {
|
||||
CONFIG_PRINTF_ERROR("[CONFIG] %s size too small\n", cfgoptions->optname);
|
||||
}
|
||||
snprintf(*cfgoptions->strptr, cfgoptions->numelt, "%s",cfgoptions->defstrval);
|
||||
printf_params("[CONFIG] %s.%s set to default value \"%s\"\n", ((prefix == NULL) ? "" : prefix), cfgoptions->optname, *cfgoptions->strptr);
|
||||
|
||||
}
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
int config_setdefault_stringlist(paramdef_t *cfgoptions, char *prefix) {
|
||||
int status = 0;
|
||||
|
||||
if( cfgoptions->defstrlistval != NULL) {
|
||||
cfgoptions->strlistptr=cfgoptions->defstrlistval;
|
||||
status=1;
|
||||
|
||||
for(int j=0; j<cfgoptions->numelt; j++)
|
||||
printf_params("[CONFIG] %s.%s[%i] set to default value %s\n", ((prefix == NULL) ? "" : prefix), cfgoptions->optname,j, cfgoptions->strlistptr[j]);
|
||||
}
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
int config_setdefault_int(paramdef_t *cfgoptions, char *prefix) {
|
||||
int status = 0;
|
||||
config_check_valptr(cfgoptions, sizeof(*cfgoptions->iptr), 1);
|
||||
|
||||
if( ((cfgoptions->paramflags & PARAMFLAG_MANDATORY) == 0)) {
|
||||
config_assign_int(cfgoptions,cfgoptions->optname,cfgoptions->defintval);
|
||||
status=1;
|
||||
printf_params("[CONFIG] %s.%s set to default value\n", ((prefix == NULL) ? "" : prefix), cfgoptions->optname);
|
||||
}
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
int config_setdefault_int64(paramdef_t *cfgoptions, char *prefix) {
|
||||
int status = 0;
|
||||
config_check_valptr(cfgoptions, sizeof(*cfgoptions->i64ptr), 1);
|
||||
|
||||
if( ((cfgoptions->paramflags & PARAMFLAG_MANDATORY) == 0)) {
|
||||
*(cfgoptions->u64ptr)=cfgoptions->defuintval;
|
||||
status=1;
|
||||
printf_params("[CONFIG] %s.%s set to default value %llu\n", ((prefix == NULL) ? "" : prefix), cfgoptions->optname, (long long unsigned)(*(cfgoptions->u64ptr)));
|
||||
}
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
int config_setdefault_intlist(paramdef_t *cfgoptions, char *prefix) {
|
||||
int status = 0;
|
||||
|
||||
if( cfgoptions->defintarrayval != NULL) {
|
||||
config_check_valptr(cfgoptions, sizeof(cfgoptions->iptr), cfgoptions->numelt);
|
||||
cfgoptions->iptr=cfgoptions->defintarrayval;
|
||||
status=1;
|
||||
|
||||
for (int j=0; j<cfgoptions->numelt ; j++) {
|
||||
printf_params("[CONFIG] %s[%i] set to default value %i\n",cfgoptions->optname,j,(int)cfgoptions->iptr[j]);
|
||||
}
|
||||
}
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
int config_setdefault_double(paramdef_t *cfgoptions, char *prefix) {
|
||||
int status = 0;
|
||||
config_check_valptr(cfgoptions, sizeof(*cfgoptions->dblptr), 1);
|
||||
|
||||
if( ((cfgoptions->paramflags & PARAMFLAG_MANDATORY) == 0)) {
|
||||
*(cfgoptions->dblptr)=cfgoptions->defdblval;
|
||||
status=1;
|
||||
printf_params("[CONFIG] %s set to default value %lf\n",cfgoptions->optname, *(cfgoptions->dblptr));
|
||||
}
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
int config_assign_ipv4addr(paramdef_t *cfgoptions, char *ipv4addr) {
|
||||
config_check_valptr(cfgoptions, sizeof(*cfgoptions->uptr), 1);
|
||||
int rst=inet_pton(AF_INET, ipv4addr,cfgoptions->uptr );
|
||||
|
||||
if (rst == 1 && *(cfgoptions->uptr) > 0) {
|
||||
printf_params("[CONFIG] %s: %s\n",cfgoptions->optname, ipv4addr);
|
||||
return 1;
|
||||
} else {
|
||||
if ( strncmp(ipv4addr,ANY_IPV4ADDR_STRING,sizeof(ANY_IPV4ADDR_STRING)) == 0) {
|
||||
printf_params("[CONFIG] %s:%s (INADDR_ANY) \n",cfgoptions->optname,ipv4addr);
|
||||
*cfgoptions->uptr=INADDR_ANY;
|
||||
return 1;
|
||||
} else {
|
||||
fprintf(stderr,"[CONFIG] %s not valid for %s \n", ipv4addr, cfgoptions->optname);
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
int config_setdefault_ipv4addr(paramdef_t *cfgoptions, char *prefix) {
|
||||
int status = 0;
|
||||
|
||||
if (cfgoptions->defstrval != NULL) {
|
||||
status = config_assign_ipv4addr(cfgoptions, cfgoptions->defstrval);
|
||||
}
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
@@ -33,49 +33,60 @@
|
||||
#ifndef INCLUDE_CONFIG_USERAPI_H
|
||||
#define INCLUDE_CONFIG_USERAPI_H
|
||||
#include "config_load_configmodule.h"
|
||||
#include "common/utils/utils.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
#ifndef NOT_uniqCfg
|
||||
extern configmodule_interface_t *uniqCfg;
|
||||
#define config_get_if() uniqCfg // Existing code implicit uniq configuration context
|
||||
#endif
|
||||
|
||||
/* utility functions to ease usage of config module structures */
|
||||
#define CONFIG_GETSOURCE ((config_get_if() == NULL) ? NULL : config_get_if()->cfgmode)
|
||||
#define CONFIG_GETSOURCE ( (config_get_if()==NULL) ? NULL : config_get_if()->cfgmode )
|
||||
#define CONFIG_GETNUMP ( (config_get_if()==NULL) ? 0 : config_get_if()->num_cfgP )
|
||||
#define CONFIG_GETP(P) ( (config_get_if()==NULL) ? NULL : config_get_if()->cfgP[P] )
|
||||
#define CONFIG_ISFLAGSET(P) ( (config_get_if()==NULL) ? 0 : !!(config_get_if()->rtflags & P))
|
||||
#define CONFIG_SETRTFLAG(P) if (config_get_if()) { config_get_if()->rtflags |= P; }
|
||||
#define CONFIG_CLEARRTFLAG(P) if (config_get_if()) { config_get_if()->rtflags &= (~P); }
|
||||
#define CONFIG_ISPARAMFLAGSET(P,F) ( !!(P.paramflags & F))
|
||||
int config_paramidx_fromname(paramdef_t *params, int numparams, char *name);
|
||||
extern int config_paramidx_fromname(paramdef_t *params,int numparams, char *name);
|
||||
|
||||
/* utility functions, to be used by configuration module and/or configuration libraries */
|
||||
void config_printhelp(paramdef_t *, int numparams, char *prefix);
|
||||
int config_process_cmdline(configmodule_interface_t *cfg, paramdef_t *params, int numparams, char *prefix);
|
||||
int config_assign_ipv4addr(configmodule_interface_t *cfg, paramdef_t *cfgoptions, char *ipv4addr);
|
||||
extern configmodule_interface_t *config_get_if(void);
|
||||
void config_check_valptr(paramdef_t *cfgoptions, int elt_sz, int nb_elt);
|
||||
extern void config_printhelp(paramdef_t *,int numparams, char *prefix);
|
||||
extern int config_process_cmdline(paramdef_t *params,int numparams, char *prefix);
|
||||
extern void config_assign_processedint(paramdef_t *cfgoption, int val);
|
||||
extern void config_assign_int(paramdef_t *cfgoptions, char *fullname, int val);
|
||||
extern int config_assign_ipv4addr(paramdef_t *cfgoptions, char *ipv4addr);
|
||||
|
||||
/* apis to get/check parameters, to be used by oai modules, at configuration time */
|
||||
#define CONFIG_CHECKALLSECTIONS "ALLSECTIONS"
|
||||
int config_check_unknown_cmdlineopt(configmodule_interface_t *cfg, char *prefix);
|
||||
int config_get(configmodule_interface_t *cfg, paramdef_t *params, int numparams, char *prefix);
|
||||
int config_getlist(configmodule_interface_t *cfg, paramlist_def_t *ParamList, paramdef_t *params, int numparams, char *prefix);
|
||||
extern int config_check_unknown_cmdlineopt(char *prefix);
|
||||
extern int config_get(paramdef_t *params,int numparams, char *prefix);
|
||||
extern int config_getlist(paramlist_def_t *ParamList, paramdef_t *params, int numparams, char *prefix);
|
||||
|
||||
/* apis to set some of the paramdef_t fields before using the get/getlist api's */
|
||||
void config_set_checkfunctions(paramdef_t *params, checkedparam_t *checkfunctions, int numparams);
|
||||
extern void config_set_checkfunctions(paramdef_t *params, checkedparam_t *checkfunctions, int numparams);
|
||||
|
||||
/* apis to retrieve parameters info after calling get or getlist functions */
|
||||
int config_isparamset(paramdef_t *params, int paramidx);
|
||||
int config_get_processedint(configmodule_interface_t *cfg, paramdef_t *cfgoption);
|
||||
extern int config_isparamset(paramdef_t *params,int paramidx);
|
||||
extern int config_get_processedint(paramdef_t *cfgoption);
|
||||
|
||||
/* functions to be used in parameters definition, to check parameters values */
|
||||
int config_check_intval(configmodule_interface_t *cfg, paramdef_t *param);
|
||||
int config_check_modify_integer(configmodule_interface_t *cfg, paramdef_t *param);
|
||||
int config_check_intrange(configmodule_interface_t *cfg, paramdef_t *param);
|
||||
int config_check_strval(configmodule_interface_t *cfg, paramdef_t *param);
|
||||
int config_checkstr_assign_integer(configmodule_interface_t *cfg, paramdef_t *param);
|
||||
extern int config_check_intval(paramdef_t *param);
|
||||
extern int config_check_modify_integer(paramdef_t *param);
|
||||
extern int config_check_intrange(paramdef_t *param);
|
||||
extern int config_check_strval(paramdef_t *param);
|
||||
extern int config_checkstr_assign_integer(paramdef_t *param);
|
||||
|
||||
/* functions to set a parameter to its default value */
|
||||
extern int config_setdefault_string(paramdef_t *cfgoptions, char *prefix);
|
||||
extern int config_setdefault_stringlist(paramdef_t *cfgoptions, char *prefix);
|
||||
extern int config_setdefault_int(paramdef_t *cfgoptions, char *prefix);
|
||||
extern int config_setdefault_int64(paramdef_t *cfgoptions, char *prefix);
|
||||
extern int config_setdefault_intlist(paramdef_t *cfgoptions, char *prefix);
|
||||
extern int config_setdefault_double(paramdef_t *cfgoptions, char *prefix);
|
||||
extern int config_setdefault_ipv4addr(paramdef_t *cfgoptions, char *prefix);
|
||||
void *config_allocate_new(int sz, bool autoFree);
|
||||
#define CONFIG_GETCONFFILE (config_get_if()->cfgP[0])
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
@@ -43,8 +43,6 @@
|
||||
|
||||
#include "config_libconfig.h"
|
||||
#include "config_libconfig_private.h"
|
||||
#define NOT_uniqCfg
|
||||
#include "../config_common.h"
|
||||
#include "../config_userapi.h"
|
||||
#include "errno.h"
|
||||
#include "assertions.h"
|
||||
@@ -53,15 +51,14 @@
|
||||
#define config_setting_lookup config_lookup_from
|
||||
#endif
|
||||
|
||||
void config_libconfig_end(configmodule_interface_t *cfg);
|
||||
void config_libconfig_end(void );
|
||||
|
||||
int read_strlist(configmodule_interface_t *cfg, paramdef_t *cfgoptions, config_setting_t *setting, char *cfgpath)
|
||||
{
|
||||
int read_strlist(paramdef_t *cfgoptions,config_setting_t *setting, char *cfgpath) {
|
||||
const char *str;
|
||||
int st;
|
||||
int numelt;
|
||||
numelt=config_setting_length(setting);
|
||||
config_check_valptr(cfg, cfgoptions, sizeof(char *), numelt);
|
||||
config_check_valptr(cfgoptions, sizeof(char *), numelt);
|
||||
st=0;
|
||||
AssertFatal(MAX_LIST_SIZE > numelt,
|
||||
"This piece of code use fixed size arry of constant #define MAX_LIST_SIZE %d\n",
|
||||
@@ -74,7 +71,7 @@ int read_strlist(configmodule_interface_t *cfg, paramdef_t *cfgoptions, config_s
|
||||
} else {
|
||||
snprintf(cfgoptions->strlistptr[i], DEFAULT_EXTRA_SZ, "%s",str);
|
||||
st++;
|
||||
printf_params(cfg, "[LIBCONFIG] %s%i: %s\n", cfgpath, i, cfgoptions->strlistptr[i]);
|
||||
printf_params("[LIBCONFIG] %s%i: %s\n", cfgpath,i,cfgoptions->strlistptr[i]);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -82,27 +79,22 @@ int read_strlist(configmodule_interface_t *cfg, paramdef_t *cfgoptions, config_s
|
||||
return st;
|
||||
}
|
||||
|
||||
static int read_intarray(configmodule_interface_t *cfg, paramdef_t *cfgoptions, config_setting_t *setting, char *cfgpath)
|
||||
{
|
||||
int read_intarray(paramdef_t *cfgoptions,config_setting_t *setting, char *cfgpath) {
|
||||
cfgoptions->numelt=config_setting_length(setting);
|
||||
|
||||
if (cfgoptions->numelt > 0) {
|
||||
cfgoptions->iptr =
|
||||
config_allocate_new(cfg, cfgoptions->numelt * sizeof(*cfgoptions->iptr), !(cfgoptions->paramflags & PARAMFLAG_NOFREE));
|
||||
cfgoptions->iptr=config_allocate_new(cfgoptions->numelt*sizeof(*cfgoptions->iptr),
|
||||
!(cfgoptions->paramflags & PARAMFLAG_NOFREE) );
|
||||
|
||||
for (int i=0; i< cfgoptions->numelt && cfgoptions->iptr != NULL; i++) {
|
||||
cfgoptions->iptr[i]=config_setting_get_int_elem(setting,i);
|
||||
printf_params(cfg, "[LIBCONFIG] %s[%i]: %i\n", cfgpath, i, cfgoptions->iptr[i]);
|
||||
printf_params("[LIBCONFIG] %s[%i]: %i\n", cfgpath,i,cfgoptions->iptr[i]);
|
||||
} /* for loop on array element... */
|
||||
}
|
||||
|
||||
return cfgoptions->numelt;
|
||||
}
|
||||
int config_libconfig_setparams(configmodule_interface_t *cfg,
|
||||
paramdef_t *cfgoptions,
|
||||
int numoptions,
|
||||
config_setting_t *asetting,
|
||||
char *prefix)
|
||||
int config_libconfig_setparams(paramdef_t *cfgoptions, int numoptions, config_setting_t *asetting, char *prefix)
|
||||
{
|
||||
int status;
|
||||
int errors = 0;
|
||||
@@ -114,7 +106,7 @@ int config_libconfig_setparams(configmodule_interface_t *cfg,
|
||||
for (int i = 0; i < numoptions; i++) {
|
||||
if (cfgoptions[i].paramflags & PARAMFLAG_CMDLINEONLY) {
|
||||
continue;
|
||||
printf_params(cfg, "[LIBCONFIG] setting %s.%s skipped (command line only) \n", secprefix, cfgoptions[i].optname);
|
||||
printf_params("[LIBCONFIG] setting %s.%s skipped (command line only) \n", secprefix, cfgoptions[i].optname);
|
||||
}
|
||||
status = CONFIG_FALSE;
|
||||
config_setting_t *psetting;
|
||||
@@ -123,7 +115,7 @@ int config_libconfig_setparams(configmodule_interface_t *cfg,
|
||||
psetting = config_lookup(&(libconfig_privdata.runtcfg), spath);
|
||||
free(spath);
|
||||
if (psetting != NULL) {
|
||||
printf_params(cfg, "[LIBCONFIG] setting %s.%s already created \n", secprefix, cfgoptions[i].optname);
|
||||
printf_params("[LIBCONFIG] setting %s.%s already created \n", secprefix, cfgoptions[i].optname);
|
||||
continue;
|
||||
}
|
||||
switch (cfgoptions[i].type) {
|
||||
@@ -145,7 +137,7 @@ int config_libconfig_setparams(configmodule_interface_t *cfg,
|
||||
if (psetting != NULL) {
|
||||
if (cfgoptions[i].numelt <= 0) {
|
||||
emptyla++;
|
||||
printf_params(cfg, "[LIBCONFIG], no element in list %s\n", cfgoptions[i].optname);
|
||||
printf_params("[LIBCONFIG], no element in list %s\n", cfgoptions[i].optname);
|
||||
status = CONFIG_TRUE;
|
||||
}
|
||||
for (int j = 0; j < cfgoptions[i].numelt; j++) {
|
||||
@@ -184,7 +176,7 @@ int config_libconfig_setparams(configmodule_interface_t *cfg,
|
||||
if (psetting != NULL) {
|
||||
if (cfgoptions[i].numelt <= 0) {
|
||||
emptyla++;
|
||||
printf_params(cfg, "[LIBCONFIG], no element in array %s.%s\n", secprefix, cfgoptions[i].optname);
|
||||
printf_params("[LIBCONFIG], no element in array %s.%s\n", secprefix, cfgoptions[i].optname);
|
||||
status = CONFIG_TRUE;
|
||||
}
|
||||
for (int j = 0; j < cfgoptions[i].numelt; j++) {
|
||||
@@ -230,24 +222,24 @@ int config_libconfig_setparams(configmodule_interface_t *cfg,
|
||||
fprintf(stderr, "[LIBCONFIG] Error creating setting %i: %s.%s type %i\n", i, secprefix, cfgoptions[i].optname, cfgoptions[i].type);
|
||||
}
|
||||
}
|
||||
printf_params(cfg, "[LIBCONFIG], in group \"%s\" %i settings \n", secprefix, numoptions);
|
||||
printf_params("[LIBCONFIG], in group \"%s\" %i settings \n", secprefix, numoptions);
|
||||
if (notused > 0)
|
||||
printf_params(cfg, "[LIBCONFIG], ..... %i settings with NULL value pointer\n", notused);
|
||||
printf_params("[LIBCONFIG], ..... %i settings with NULL value pointer\n", notused);
|
||||
if (errors > 0)
|
||||
fprintf(stderr, "[LIBCONFIG] .....%i settings creation errors \n", errors);
|
||||
if (emptyla > 0)
|
||||
fprintf(stderr, "[LIBCONFIG] .....%i empty lists or arrays settings \n", emptyla);
|
||||
|
||||
if (cfg->status) {
|
||||
cfg->status->num_err_nullvalue += notused;
|
||||
cfg->status->num_err_write += errors;
|
||||
cfg->status->num_write += numoptions;
|
||||
cfg->status->emptyla += emptyla;
|
||||
if (cfgptr->status) {
|
||||
cfgptr->status->num_err_nullvalue += notused;
|
||||
cfgptr->status->num_err_write += errors;
|
||||
cfgptr->status->num_write += numoptions;
|
||||
cfgptr->status->emptyla += emptyla;
|
||||
}
|
||||
return errors;
|
||||
}
|
||||
|
||||
int config_libconfig_set(configmodule_interface_t *cfg, paramdef_t *cfgoptions, int numoptions, char *prefix)
|
||||
int config_libconfig_set(paramdef_t *cfgoptions, int numoptions, char *prefix)
|
||||
{
|
||||
char *tokctx1 = NULL;
|
||||
int listidx = -1;
|
||||
@@ -258,13 +250,13 @@ int config_libconfig_set(configmodule_interface_t *cfg, paramdef_t *cfgoptions,
|
||||
prefixbck = strdup(prefix);
|
||||
prefix_elem1 = strtok_r(prefixbck, ".", &tokctx1);
|
||||
}
|
||||
printf_params(cfg, "[LIBCONFIG], processing prefix %s\n", (prefix == NULL) ? "NULL" : prefix);
|
||||
printf_params("[LIBCONFIG], processing prefix %s\n", (prefix == NULL) ? "NULL" : prefix);
|
||||
|
||||
/* parse the prefix , possibly creating groups, lists and list elements */
|
||||
while (prefix_elem1 != NULL) {
|
||||
int n1 = strlen(prefix_elem1);
|
||||
char *prefix_elem2 = prefix_elem1 + n1 + 1;
|
||||
printf_params(cfg, "[LIBCONFIG], processing elem1 %s elem2 %s\n", prefix_elem1, prefix_elem2);
|
||||
printf_params("[LIBCONFIG], processing elem1 %s elem2 %s\n", prefix_elem1, prefix_elem2);
|
||||
/* prefix (the path to the parameter name) may contain groups and elements from a list, which are specified with [] */
|
||||
if (prefix_elem2[0] != '[') { // not a list
|
||||
|
||||
@@ -273,11 +265,11 @@ int config_libconfig_set(configmodule_interface_t *cfg, paramdef_t *cfgoptions,
|
||||
asetting = config_setting_add(asetting, prefix_elem1, CONFIG_TYPE_GROUP);
|
||||
else
|
||||
asetting = tmpset;
|
||||
printf_params(cfg, "[LIBCONFIG], creating or looking for group %s: %s\n", prefix_elem1, (asetting == NULL) ? "NOK" : "OK");
|
||||
printf_params("[LIBCONFIG], creating or looking for group %s: %s\n", prefix_elem1, (asetting == NULL) ? "NOK" : "OK");
|
||||
} else { // a list
|
||||
listidx = (int)strtol(prefix_elem2 + 1, NULL, 10);
|
||||
if (errno == EINVAL || errno == ERANGE) {
|
||||
printf_params(cfg, "[LIBCONFIG], Error %s looking for list index in %s \n", strerror(errno), prefix_elem2);
|
||||
printf_params("[LIBCONFIG], Error %s looking for list index in %s \n", strerror(errno), prefix_elem2);
|
||||
break;
|
||||
}
|
||||
config_setting_t *tmpset = config_setting_lookup(asetting, prefix_elem1);
|
||||
@@ -285,17 +277,14 @@ int config_libconfig_set(configmodule_interface_t *cfg, paramdef_t *cfgoptions,
|
||||
asetting = config_setting_add(asetting, prefix_elem1, CONFIG_TYPE_LIST);
|
||||
else
|
||||
asetting = tmpset;
|
||||
printf_params(cfg, "[LIBCONFIG], creating or looking for list %s: %s\n", prefix_elem1, (asetting == NULL) ? "NOK" : "OK");
|
||||
printf_params("[LIBCONFIG], creating or looking for list %s: %s\n", prefix_elem1, (asetting == NULL) ? "NOK" : "OK");
|
||||
if (asetting != NULL) {
|
||||
tmpset = config_setting_get_elem(asetting, listidx);
|
||||
if (tmpset == NULL)
|
||||
asetting = config_setting_add(asetting, NULL, CONFIG_TYPE_GROUP);
|
||||
else
|
||||
asetting = tmpset;
|
||||
printf_params(cfg,
|
||||
"[LIBCONFIG], creating or looking for list element %i: %s\n",
|
||||
listidx,
|
||||
(asetting == NULL) ? "NOK" : "OK");
|
||||
printf_params("[LIBCONFIG], creating or looking for list element %i: %s\n", listidx, (asetting == NULL) ? "NOK" : "OK");
|
||||
}
|
||||
prefix_elem1 = strtok_r(NULL, ".", &tokctx1); // skip the [x] elements we already took care of it
|
||||
if (prefix_elem1 == NULL) {
|
||||
@@ -310,8 +299,8 @@ int config_libconfig_set(configmodule_interface_t *cfg, paramdef_t *cfgoptions,
|
||||
}
|
||||
free(prefixbck);
|
||||
if (asetting != NULL) {
|
||||
config_libconfig_setparams(cfg, cfgoptions, numoptions, asetting, prefix);
|
||||
printf_params(cfg, "[LIBCONFIG] %i settings added in group %s\n", numoptions, (prefix == NULL) ? "" : prefix);
|
||||
config_libconfig_setparams(cfgoptions, numoptions, asetting, prefix);
|
||||
printf_params("[LIBCONFIG] %i settings added in group %s\n", numoptions, (prefix == NULL) ? "" : prefix);
|
||||
return 0;
|
||||
} else {
|
||||
fprintf(stderr, "[LIBCONFIG] Error parsing %s params, skipped...\n", (prefix == NULL) ? "" : prefix);
|
||||
@@ -319,8 +308,7 @@ int config_libconfig_set(configmodule_interface_t *cfg, paramdef_t *cfgoptions,
|
||||
}
|
||||
}
|
||||
|
||||
int config_libconfig_get(configmodule_interface_t *cfg, paramdef_t *cfgoptions, int numoptions, char *prefix)
|
||||
{
|
||||
int config_libconfig_get(paramdef_t *cfgoptions,int numoptions, char *prefix ) {
|
||||
config_setting_t *setting;
|
||||
char *str;
|
||||
int i,u;
|
||||
@@ -342,7 +330,7 @@ int config_libconfig_get(configmodule_interface_t *cfg, paramdef_t *cfgoptions,
|
||||
}
|
||||
|
||||
if( (cfgoptions->paramflags & PARAMFLAG_DONOTREAD) != 0) {
|
||||
printf_params(cfg, "[LIBCONFIG] %s.%s ignored\n", cfgpath, cfgoptions[i].optname);
|
||||
printf_params("[LIBCONFIG] %s.%s ignored\n", cfgpath,cfgoptions[i].optname );
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -352,14 +340,14 @@ int config_libconfig_get(configmodule_interface_t *cfg, paramdef_t *cfgoptions,
|
||||
switch(cfgoptions[i].type) {
|
||||
case TYPE_STRING:
|
||||
if ( config_lookup_string(&(libconfig_privdata.cfg), cfgpath, (const char**)&str)) {
|
||||
config_check_valptr(cfg, &cfgoptions[i], 1, strlen(str) + 1);
|
||||
config_check_valptr(&(cfgoptions[i]), 1, strlen(str)+1);
|
||||
if ( strlen(str)+1 > cfgoptions[i].numelt )
|
||||
fprintf(stderr,"[LIBCONFIG] %s: %s exceeds maximum length of %i bytes, value truncated\n",
|
||||
cfgpath,str,cfgoptions[i].numelt);
|
||||
snprintf( *cfgoptions[i].strptr , cfgoptions[i].numelt, "%s", str);
|
||||
printf_params(cfg, "[LIBCONFIG] %s: \"%s\"\n", cfgpath, *cfgoptions[i].strptr);
|
||||
printf_params("[LIBCONFIG] %s: \"%s\"\n", cfgpath, *cfgoptions[i].strptr);
|
||||
} else {
|
||||
defval = config_setdefault_string(cfg, &cfgoptions[i], prefix);
|
||||
defval=config_setdefault_string(&cfgoptions[i],prefix);
|
||||
}
|
||||
|
||||
break;
|
||||
@@ -368,9 +356,9 @@ int config_libconfig_get(configmodule_interface_t *cfg, paramdef_t *cfgoptions,
|
||||
setting = config_setting_lookup (config_root_setting(&(libconfig_privdata.cfg)),cfgpath );
|
||||
|
||||
if ( setting != NULL) {
|
||||
read_strlist(cfg, &cfgoptions[i], setting, cfgpath);
|
||||
read_strlist(&cfgoptions[i],setting,cfgpath);
|
||||
} else {
|
||||
defval = config_setdefault_stringlist(cfg, &(cfgoptions[i]), prefix);
|
||||
defval=config_setdefault_stringlist(&(cfgoptions[i]),prefix);
|
||||
}
|
||||
|
||||
break;
|
||||
@@ -383,10 +371,10 @@ int config_libconfig_get(configmodule_interface_t *cfg, paramdef_t *cfgoptions,
|
||||
case TYPE_INT32:
|
||||
case TYPE_MASK:
|
||||
if ( config_lookup_int(&(libconfig_privdata.cfg),cfgpath, &u)) {
|
||||
config_check_valptr(cfg, &(cfgoptions[i]), sizeof(*cfgoptions[i].iptr), 1);
|
||||
config_assign_int(cfg, &(cfgoptions[i]), cfgpath, u);
|
||||
config_check_valptr(&(cfgoptions[i]), sizeof(*cfgoptions[i].iptr), 1);
|
||||
config_assign_int(&(cfgoptions[i]),cfgpath,u);
|
||||
} else {
|
||||
defval = config_setdefault_int(cfg, &(cfgoptions[i]), prefix);
|
||||
defval=config_setdefault_int(&(cfgoptions[i]),prefix);
|
||||
}
|
||||
|
||||
break;
|
||||
@@ -394,17 +382,17 @@ int config_libconfig_get(configmodule_interface_t *cfg, paramdef_t *cfgoptions,
|
||||
case TYPE_UINT64:
|
||||
case TYPE_INT64:
|
||||
if ( config_lookup_int64(&(libconfig_privdata.cfg),cfgpath, &llu)) {
|
||||
config_check_valptr(cfg, &cfgoptions[i], sizeof(*cfgoptions[i].i64ptr), 1);
|
||||
config_check_valptr(&cfgoptions[i], sizeof(*cfgoptions[i].i64ptr), 1);
|
||||
|
||||
if(cfgoptions[i].type==TYPE_UINT64) {
|
||||
*(cfgoptions[i].u64ptr) = (uint64_t)llu;
|
||||
printf_params(cfg, "[LIBCONFIG] %s: %lu\n", cfgpath, *cfgoptions[i].u64ptr);
|
||||
printf_params("[LIBCONFIG] %s: %lu\n", cfgpath,*cfgoptions[i].u64ptr);
|
||||
} else {
|
||||
*(cfgoptions[i].i64ptr) = llu;
|
||||
printf_params(cfg, "[LIBCONFIG] %s: %ld\n", cfgpath, *cfgoptions[i].i64ptr);
|
||||
printf_params("[LIBCONFIG] %s: %ld\n", cfgpath,*cfgoptions[i].i64ptr);
|
||||
}
|
||||
} else {
|
||||
defval = config_setdefault_int64(cfg, &(cfgoptions[i]), prefix);
|
||||
defval=config_setdefault_int64(&(cfgoptions[i]),prefix);
|
||||
}
|
||||
|
||||
break;
|
||||
@@ -414,29 +402,29 @@ int config_libconfig_get(configmodule_interface_t *cfg, paramdef_t *cfgoptions,
|
||||
setting = config_setting_lookup (config_root_setting(&(libconfig_privdata.cfg)),cfgpath );
|
||||
|
||||
if ( setting != NULL) {
|
||||
read_intarray(cfg, &cfgoptions[i], setting, cfgpath);
|
||||
read_intarray(&cfgoptions[i],setting,cfgpath);
|
||||
} else {
|
||||
defval = config_setdefault_intlist(cfg, &(cfgoptions[i]), prefix);
|
||||
defval=config_setdefault_intlist(&(cfgoptions[i]),prefix);
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case TYPE_DOUBLE:
|
||||
if ( config_lookup_float(&(libconfig_privdata.cfg),cfgpath, &dbl)) {
|
||||
config_check_valptr(cfg, &cfgoptions[i], sizeof(*cfgoptions[i].dblptr), 1);
|
||||
config_check_valptr(&cfgoptions[i],sizeof(*cfgoptions[i].dblptr), 1);
|
||||
*cfgoptions[i].dblptr = dbl;
|
||||
printf_params(cfg, "[LIBCONFIG] %s: %lf\n", cfgpath, *(cfgoptions[i].dblptr));
|
||||
printf_params("[LIBCONFIG] %s: %lf\n", cfgpath,*(cfgoptions[i].dblptr) );
|
||||
} else {
|
||||
defval = config_setdefault_double(cfg, &(cfgoptions[i]), prefix);
|
||||
defval=config_setdefault_double(&(cfgoptions[i]),prefix);
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case TYPE_IPV4ADDR:
|
||||
if ( !config_lookup_string(&(libconfig_privdata.cfg),cfgpath, (const char **)&str)) {
|
||||
defval = config_setdefault_ipv4addr(cfg, &(cfgoptions[i]), prefix);
|
||||
defval=config_setdefault_ipv4addr(&(cfgoptions[i]),prefix);
|
||||
} else {
|
||||
rst = config_assign_ipv4addr(cfg, cfgoptions, str);
|
||||
rst=config_assign_ipv4addr(cfgoptions, str);
|
||||
|
||||
if (rst < 0) {
|
||||
fprintf(stderr,"[LIBCONFIG] %s not valid for %s \n", str, cfgpath);
|
||||
@@ -490,19 +478,15 @@ int config_libconfig_get(configmodule_interface_t *cfg, paramdef_t *cfgoptions,
|
||||
|
||||
if (fatalerror == 1) {
|
||||
fprintf(stderr,"[LIBCONFIG] fatal errors found when processing %s \n", libconfig_privdata.configfile );
|
||||
config_libconfig_end(cfg);
|
||||
end_configmodule(cfg);
|
||||
config_libconfig_end();
|
||||
end_configmodule();
|
||||
}
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
int config_libconfig_getlist(configmodule_interface_t *cfg,
|
||||
paramlist_def_t *ParamList,
|
||||
paramdef_t *params,
|
||||
int numparams,
|
||||
char *prefix)
|
||||
{
|
||||
int config_libconfig_getlist(paramlist_def_t *ParamList,
|
||||
paramdef_t *params, int numparams, char *prefix) {
|
||||
config_setting_t *setting;
|
||||
int i,j,status;
|
||||
char *listpath=NULL;
|
||||
@@ -518,7 +502,8 @@ int config_libconfig_getlist(configmodule_interface_t *cfg,
|
||||
|
||||
if ( setting) {
|
||||
status = ParamList->numelt = config_setting_length(setting);
|
||||
printf_params(cfg, "[LIBCONFIG] %i %s in config file %s \n", ParamList->numelt, listpath, libconfig_privdata.configfile);
|
||||
printf_params("[LIBCONFIG] %i %s in config file %s \n",
|
||||
ParamList->numelt,listpath,libconfig_privdata.configfile );
|
||||
} else {
|
||||
printf("[LIBCONFIG] list %s not found in config file %s \n",
|
||||
listpath,libconfig_privdata.configfile );
|
||||
@@ -527,10 +512,10 @@ int config_libconfig_getlist(configmodule_interface_t *cfg,
|
||||
}
|
||||
|
||||
if (ParamList->numelt > 0 && params != NULL) {
|
||||
ParamList->paramarray = config_allocate_new(cfg, ParamList->numelt * sizeof(paramdef_t *), true);
|
||||
ParamList->paramarray = config_allocate_new(ParamList->numelt * sizeof(paramdef_t *), true);
|
||||
|
||||
for (i=0 ; i < ParamList->numelt ; i++) {
|
||||
ParamList->paramarray[i] = config_allocate_new(cfg, numparams * sizeof(paramdef_t), true);
|
||||
ParamList->paramarray[i] = config_allocate_new(numparams * sizeof(paramdef_t), true);
|
||||
memcpy(ParamList->paramarray[i], params, sizeof(paramdef_t)*numparams);
|
||||
|
||||
for (j=0; j<numparams; j++) {
|
||||
@@ -538,7 +523,7 @@ int config_libconfig_getlist(configmodule_interface_t *cfg,
|
||||
}
|
||||
|
||||
sprintf(cfgpath,"%s.[%i]",listpath,i);
|
||||
config_libconfig_get(cfg, ParamList->paramarray[i], numparams, cfgpath);
|
||||
config_libconfig_get(ParamList->paramarray[i], numparams, cfgpath );
|
||||
} /* for i... */
|
||||
} /* ParamList->numelt > 0 && params != NULL */
|
||||
|
||||
@@ -548,15 +533,12 @@ int config_libconfig_getlist(configmodule_interface_t *cfg,
|
||||
return status;
|
||||
}
|
||||
|
||||
int config_libconfig_init(configmodule_interface_t *cfg)
|
||||
{
|
||||
char **cfgP = cfg->cfgP;
|
||||
int numP = cfg->num_cfgP;
|
||||
int config_libconfig_init(char *cfgP[], int numP) {
|
||||
config_init(&(libconfig_privdata.cfg));
|
||||
libconfig_privdata.configfile = strdup((char *)cfgP[0]);
|
||||
cfg->numptrs = 0;
|
||||
pthread_mutex_init(&cfg->memBlocks_mutex, NULL);
|
||||
memset(cfg->oneBlock, 0, sizeof(cfg->oneBlock));
|
||||
config_get_if()->numptrs=0;
|
||||
pthread_mutex_init(&config_get_if()->memBlocks_mutex, NULL);
|
||||
memset(config_get_if()->oneBlock,0,sizeof(config_get_if()->oneBlock));
|
||||
/* search for include path parameter and set config file include path accordingly */
|
||||
for (int i=0; i<numP; i++) {
|
||||
if (strncmp(cfgP[i],"incp",4) == 0) {
|
||||
@@ -587,7 +569,7 @@ int config_libconfig_init(configmodule_interface_t *cfg)
|
||||
}
|
||||
|
||||
/* possibly init a libconfig struct for saving really used params */
|
||||
if (cfg->rtflags & CONFIG_SAVERUNCFG) {
|
||||
if (cfgptr->rtflags & CONFIG_SAVERUNCFG) {
|
||||
config_init(&(libconfig_privdata.runtcfg));
|
||||
// config_set_options (&(libconfig_privdata.runtcfg), CONFIG_OPTION_ALLOW_OVERRIDES, CONFIG_TRUE);
|
||||
}
|
||||
@@ -595,34 +577,25 @@ int config_libconfig_init(configmodule_interface_t *cfg)
|
||||
return 0;
|
||||
}
|
||||
|
||||
void config_libconfig_write_parsedcfg(configmodule_interface_t *cfg)
|
||||
void config_libconfig_write_parsedcfg(void)
|
||||
{
|
||||
if (cfg->rtflags & CONFIG_SAVERUNCFG) {
|
||||
if (cfgptr->rtflags & CONFIG_SAVERUNCFG) {
|
||||
char *fname = strdup(libconfig_privdata.configfile);
|
||||
int newcfgflen = strlen(libconfig_privdata.configfile) + strlen(cfg->tmpdir) + 20;
|
||||
cfg->status->debug_cfgname = realloc(cfg->status->debug_cfgname, newcfgflen);
|
||||
int newcfgflen = strlen(libconfig_privdata.configfile) + strlen(cfgptr->tmpdir) + 20;
|
||||
cfgptr->status->debug_cfgname = realloc(cfgptr->status->debug_cfgname, newcfgflen);
|
||||
time_t t = time(NULL);
|
||||
struct tm tm = *localtime(&t);
|
||||
snprintf(cfg->status->debug_cfgname,
|
||||
newcfgflen,
|
||||
"%s/%s-run%d_%02d_%02d_%02d%02d",
|
||||
cfg->tmpdir,
|
||||
basename(fname),
|
||||
tm.tm_year + 1900,
|
||||
tm.tm_mon + 1,
|
||||
tm.tm_mday,
|
||||
tm.tm_hour,
|
||||
tm.tm_min);
|
||||
if (config_write_file(&(libconfig_privdata.runtcfg), cfg->status->debug_cfgname) != CONFIG_TRUE) {
|
||||
snprintf(cfgptr->status->debug_cfgname, newcfgflen, "%s/%s-run%d_%02d_%02d_%02d%02d", cfgptr->tmpdir, basename(fname), tm.tm_year + 1900, tm.tm_mon + 1, tm.tm_mday, tm.tm_hour, tm.tm_min);
|
||||
if (config_write_file(&(libconfig_privdata.runtcfg), cfgptr->status->debug_cfgname) != CONFIG_TRUE) {
|
||||
fprintf(stderr,
|
||||
"[LIBCONFIG] %s %d file %s - line %d: %s\n",
|
||||
__FILE__,
|
||||
__LINE__,
|
||||
cfg->status->debug_cfgname,
|
||||
cfgptr->status->debug_cfgname,
|
||||
config_error_line(&(libconfig_privdata.runtcfg)),
|
||||
config_error_text(&(libconfig_privdata.runtcfg)));
|
||||
} else {
|
||||
printf("[LIBCONFIG] file %s created successfully\n", cfg->status->debug_cfgname);
|
||||
printf("[LIBCONFIG] file %s created successfully\n", cfgptr->status->debug_cfgname);
|
||||
}
|
||||
free(fname);
|
||||
} else {
|
||||
@@ -630,10 +603,9 @@ void config_libconfig_write_parsedcfg(configmodule_interface_t *cfg)
|
||||
}
|
||||
}
|
||||
|
||||
void config_libconfig_end(configmodule_interface_t *cfg)
|
||||
{
|
||||
void config_libconfig_end(void ) {
|
||||
config_destroy(&(libconfig_privdata.cfg));
|
||||
if (cfg->rtflags & CONFIG_SAVERUNCFG) {
|
||||
if (cfgptr->rtflags & CONFIG_SAVERUNCFG) {
|
||||
config_destroy(&(libconfig_privdata.runtcfg));
|
||||
}
|
||||
if ( libconfig_privdata.configfile != NULL ) {
|
||||
|
||||
@@ -89,9 +89,7 @@
|
||||
#define NUM_MAX_CBA_GROUP 4
|
||||
|
||||
#define printk printf
|
||||
#define RETURNok (0)
|
||||
#define RETURNerror (-1)
|
||||
#define DEFAULT_NAS_PATH "PWD"
|
||||
|
||||
#define UNUSED_VARIABLE(vARIABLE) (void)(vARIABLE)
|
||||
|
||||
#endif /* __PLATFORM_CONSTANTS_H__ */
|
||||
|
||||
@@ -89,7 +89,7 @@ const mapping log_options[] = {{"nocolor", FLAG_NOCOLOR},
|
||||
{"wall_clock", FLAG_REAL_TIME},
|
||||
{NULL, -1}};
|
||||
|
||||
const mapping log_maskmap[] = LOG_MASKMAP_INIT;
|
||||
mapping log_maskmap[] = LOG_MASKMAP_INIT;
|
||||
|
||||
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 */
|
||||
@@ -283,7 +283,7 @@ void log_getconfig(log_t *g_log)
|
||||
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)];
|
||||
int ret = config_get(config_get_if(), logparams_defaults, sizeofArray(logparams_defaults), CONFIG_STRING_LOG_PREFIX);
|
||||
int ret = config_get( logparams_defaults,sizeof(logparams_defaults)/sizeof(paramdef_t),CONFIG_STRING_LOG_PREFIX);
|
||||
|
||||
if (ret <0) {
|
||||
fprintf(stderr,"[LOG] init aborted, configuration couldn't be performed\n");
|
||||
@@ -337,8 +337,8 @@ void log_getconfig(log_t *g_log)
|
||||
}
|
||||
|
||||
/* read the per component parameters */
|
||||
config_get(config_get_if(), logparams_level, MAX_LOG_PREDEF_COMPONENTS, CONFIG_STRING_LOG_PREFIX);
|
||||
config_get(config_get_if(), logparams_logfile, MAX_LOG_PREDEF_COMPONENTS, CONFIG_STRING_LOG_PREFIX);
|
||||
config_get( logparams_level, MAX_LOG_PREDEF_COMPONENTS,CONFIG_STRING_LOG_PREFIX);
|
||||
config_get( 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++) {
|
||||
@@ -367,10 +367,10 @@ void log_getconfig(log_t *g_log)
|
||||
logparams_dump[i].numelt = 0;
|
||||
}
|
||||
|
||||
config_get(config_get_if(), logparams_debug, sizeofArray(log_maskmap) - 1, CONFIG_STRING_LOG_PREFIX);
|
||||
config_get(config_get_if(), logparams_dump, sizeofArray(log_maskmap) - 1, CONFIG_STRING_LOG_PREFIX);
|
||||
config_get( logparams_debug,(sizeof(log_maskmap)/sizeof(mapping)) - 1,CONFIG_STRING_LOG_PREFIX);
|
||||
config_get( logparams_dump,(sizeof(log_maskmap)/sizeof(mapping)) - 1,CONFIG_STRING_LOG_PREFIX);
|
||||
|
||||
if (config_check_unknown_cmdlineopt(config_get_if(), CONFIG_STRING_LOG_PREFIX) > 0)
|
||||
if (config_check_unknown_cmdlineopt(CONFIG_STRING_LOG_PREFIX) > 0)
|
||||
exit(1);
|
||||
|
||||
/* set the debug mask according to the debug parameters values */
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user