Merge branch 'integration_2024_w03' into 'develop'
Integration: 2024.w03 See merge request oai/openairinterface5g!2524 * !2519 fix(build): migrating rocky dockerfiles to Rocky-linux-9 to ease maintenance * !2508 NR UE PDCP RLC indexing * !2511 chore(ci): updating 5G RF / L2 simulator scenarios to release v2.0 * !2486 E2 agent: Use FlexRIC release v2 and add to CU-UP * !2453 Liteon DU integration * !2516 remove ASAN_OPTIONS: detect_leaks=0 from SA rfsim CI tests * !2199 NR precoding matrix generation at MAC
This commit is contained in:
+8
-4
@@ -300,8 +300,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" CACHE STRING "The KPM SM version to use")
|
||||
set_property(CACHE KPM_VERSION PROPERTY STRINGS "KPM_V2" "KPM_V3")
|
||||
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")
|
||||
message(STATUS "Selected KPM Version: ${KPM_VERSION}")
|
||||
|
||||
|
||||
@@ -1433,7 +1433,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_ran_func)
|
||||
target_link_libraries(L2 PUBLIC e2_agent e2_agent_arg e2_ran_func_du_cucp_cuup)
|
||||
target_compile_definitions(L2 PRIVATE E2_AGENT)
|
||||
target_compile_definitions(L2 PRIVATE ${E2AP_VERSION} ${KPM_VERSION})
|
||||
endif()
|
||||
@@ -1460,7 +1460,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_ran_func)
|
||||
target_link_libraries(L2_NR PUBLIC e2_agent e2_agent_arg e2_ran_func_du_cucp_cuup)
|
||||
target_compile_definitions(L2_NR PRIVATE ${E2AP_VERSION} ${KPM_VERSION})
|
||||
target_compile_definitions(L2_NR PRIVATE E2_AGENT)
|
||||
endif()
|
||||
@@ -2113,6 +2113,10 @@ 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
|
||||
#######################################
|
||||
|
||||
@@ -46,8 +46,8 @@
|
||||
<class>DeployGenObject</class>
|
||||
<desc>Deploy OAI 5G CoreNetwork</desc>
|
||||
<yaml_path>yaml_files/5g_rfsimulator_e1</yaml_path>
|
||||
<services>mysql oai-nrf oai-amf oai-smf oai-spgwu</services>
|
||||
<nb_healthy>5</nb_healthy>
|
||||
<services>mysql oai-amf oai-smf oai-upf</services>
|
||||
<nb_healthy>4</nb_healthy>
|
||||
</testCase>
|
||||
|
||||
<testCase id="000022">
|
||||
@@ -55,7 +55,7 @@
|
||||
<desc>Deploy OAI 5G RAN RF sim SA (1 CU-CP, 3 CU-UPs, 3 DUs)</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>12</nb_healthy>
|
||||
<nb_healthy>11</nb_healthy>
|
||||
</testCase>
|
||||
|
||||
<testCase id="000023">
|
||||
@@ -63,7 +63,7 @@
|
||||
<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>15</nb_healthy>
|
||||
<nb_healthy>14</nb_healthy>
|
||||
</testCase>
|
||||
|
||||
<testCase id="020021">
|
||||
|
||||
@@ -47,8 +47,8 @@
|
||||
<class>DeployGenObject</class>
|
||||
<desc>Deploy OAI 5G CoreNetwork</desc>
|
||||
<yaml_path>yaml_files/5g_f1_rfsimulator</yaml_path>
|
||||
<services>mysql oai-nrf oai-amf oai-smf oai-spgwu oai-ext-dn</services>
|
||||
<nb_healthy>6</nb_healthy>
|
||||
<services>mysql oai-amf oai-smf oai-upf oai-ext-dn</services>
|
||||
<nb_healthy>5</nb_healthy>
|
||||
</testCase>
|
||||
|
||||
<testCase id="000022">
|
||||
@@ -56,7 +56,7 @@
|
||||
<desc>Deploy OAI 5G CU+DU+UE RF sim SA</desc>
|
||||
<yaml_path>yaml_files/5g_f1_rfsimulator</yaml_path>
|
||||
<services>oai-cu oai-du oai-nr-ue</services>
|
||||
<nb_healthy>9</nb_healthy>
|
||||
<nb_healthy>8</nb_healthy>
|
||||
</testCase>
|
||||
|
||||
<testCase id="020021">
|
||||
|
||||
@@ -59,8 +59,8 @@
|
||||
<class>DeployGenObject</class>
|
||||
<desc>Deploy OAI 5G CoreNetwork</desc>
|
||||
<yaml_path>yaml_files/5g_fdd_rfsimulator</yaml_path>
|
||||
<services>oai-nrf oai-amf oai-smf oai-spgwu oai-ext-dn</services>
|
||||
<nb_healthy>6</nb_healthy>
|
||||
<services>oai-amf oai-smf oai-upf oai-ext-dn</services>
|
||||
<nb_healthy>5</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>7</nb_healthy>
|
||||
<nb_healthy>6</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>8</nb_healthy>
|
||||
<nb_healthy>7</nb_healthy>
|
||||
</testCase>
|
||||
|
||||
<testCase id="020011">
|
||||
|
||||
@@ -60,8 +60,8 @@
|
||||
<class>DeployGenObject</class>
|
||||
<desc>Deploy OAI 5G CoreNetwork</desc>
|
||||
<yaml_path>yaml_files/5g_l2sim_tdd</yaml_path>
|
||||
<services>oai-nrf oai-amf oai-smf oai-spgwu oai-ext-dn</services>
|
||||
<nb_healthy>6</nb_healthy>
|
||||
<services>oai-amf oai-smf oai-upf oai-ext-dn</services>
|
||||
<nb_healthy>5</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>7</nb_healthy>
|
||||
<nb_healthy>6</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>9</nb_healthy>
|
||||
<nb_healthy>8</nb_healthy>
|
||||
</testCase>
|
||||
|
||||
<testCase id="000004">
|
||||
|
||||
@@ -65,8 +65,8 @@
|
||||
<class>DeployGenObject</class>
|
||||
<desc>Deploy OAI 5G CoreNetwork</desc>
|
||||
<yaml_path>yaml_files/5g_rfsimulator</yaml_path>
|
||||
<services>mysql oai-nrf oai-amf oai-smf oai-spgwu oai-ext-dn</services>
|
||||
<nb_healthy>6</nb_healthy>
|
||||
<services>mysql oai-amf oai-smf oai-upf oai-ext-dn</services>
|
||||
<nb_healthy>5</nb_healthy>
|
||||
</testCase>
|
||||
|
||||
<testCase id="000002">
|
||||
@@ -74,7 +74,7 @@
|
||||
<desc>Deploy OAI 5G gNB RF sim SA</desc>
|
||||
<yaml_path>yaml_files/5g_rfsimulator</yaml_path>
|
||||
<services>oai-gnb</services>
|
||||
<nb_healthy>7</nb_healthy>
|
||||
<nb_healthy>6</nb_healthy>
|
||||
</testCase>
|
||||
|
||||
<testCase id="000003">
|
||||
@@ -82,7 +82,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>8</nb_healthy>
|
||||
<nb_healthy>7</nb_healthy>
|
||||
</testCase>
|
||||
|
||||
<testCase id="000004">
|
||||
@@ -90,7 +90,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>9</nb_healthy>
|
||||
<nb_healthy>8</nb_healthy>
|
||||
</testCase>
|
||||
|
||||
<testCase id="000005">
|
||||
@@ -98,7 +98,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>12</nb_healthy>
|
||||
<nb_healthy>11</nb_healthy>
|
||||
</testCase>
|
||||
|
||||
<testCase id="000006">
|
||||
@@ -106,7 +106,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>15</nb_healthy>
|
||||
<nb_healthy>14</nb_healthy>
|
||||
</testCase>
|
||||
|
||||
<testCase id="000007">
|
||||
@@ -114,7 +114,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>17</nb_healthy>
|
||||
<nb_healthy>16</nb_healthy>
|
||||
</testCase>
|
||||
|
||||
<testCase id="000008">
|
||||
|
||||
@@ -59,8 +59,8 @@
|
||||
<class>DeployGenObject</class>
|
||||
<desc>Deploy OAI 5G CoreNetwork</desc>
|
||||
<yaml_path>yaml_files/5g_rfsimulator_24prb</yaml_path>
|
||||
<services>oai-nrf oai-amf oai-smf oai-spgwu oai-ext-dn</services>
|
||||
<nb_healthy>6</nb_healthy>
|
||||
<services>oai-amf oai-smf oai-upf oai-ext-dn</services>
|
||||
<nb_healthy>5</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>7</nb_healthy>
|
||||
<nb_healthy>6</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>8</nb_healthy>
|
||||
<nb_healthy>7</nb_healthy>
|
||||
</testCase>
|
||||
|
||||
<testCase id="020001">
|
||||
|
||||
@@ -59,8 +59,8 @@
|
||||
<class>DeployGenObject</class>
|
||||
<desc>Deploy OAI 5G CoreNetwork</desc>
|
||||
<yaml_path>yaml_files/5g_rfsimulator_2x2</yaml_path>
|
||||
<services>oai-nrf oai-amf oai-smf oai-spgwu oai-ext-dn</services>
|
||||
<nb_healthy>6</nb_healthy>
|
||||
<services>oai-amf oai-smf oai-upf oai-ext-dn</services>
|
||||
<nb_healthy>5</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>7</nb_healthy>
|
||||
<nb_healthy>6</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>8</nb_healthy>
|
||||
<nb_healthy>7</nb_healthy>
|
||||
</testCase>
|
||||
|
||||
<testCase id="020001">
|
||||
|
||||
@@ -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-nrf oai-amf oai-smf oai-spgwu oai-ext-dn</services>
|
||||
<nb_healthy>6</nb_healthy>
|
||||
<services>oai-amf oai-smf oai-upf oai-ext-dn</services>
|
||||
<nb_healthy>5</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>7</nb_healthy>
|
||||
<nb_healthy>6</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>8</nb_healthy>
|
||||
<nb_healthy>7</nb_healthy>
|
||||
</testCase>
|
||||
|
||||
<testCase id="020001">
|
||||
|
||||
@@ -1,57 +0,0 @@
|
||||
#!/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,20 +1,11 @@
|
||||
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:
|
||||
- ./oai_db.sql:/docker-entrypoint-initdb.d/oai_db.sql
|
||||
- ./mysql-healthcheck.sh:/tmp/mysql-healthcheck.sh
|
||||
- ../5g_rfsimulator/oai_db.sql:/docker-entrypoint-initdb.d/oai_db.sql
|
||||
- ../5g_rfsimulator/mysql-healthcheck.sh:/tmp/mysql-healthcheck.sh
|
||||
environment:
|
||||
- TZ=Europe/Paris
|
||||
- MYSQL_DATABASE=oai_db
|
||||
@@ -31,118 +22,36 @@ services:
|
||||
ipv4_address: 192.168.71.131
|
||||
oai-amf:
|
||||
container_name: "rfsim5g-oai-amf"
|
||||
image: oaisoftwarealliance/oai-amf:v1.5.0
|
||||
image: oaisoftwarealliance/oai-amf:v2.0.0
|
||||
environment:
|
||||
- TZ=Europe/paris
|
||||
- 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
|
||||
# Three slices are defined
|
||||
- SST_0=1
|
||||
- SST_1=2
|
||||
- SST_2=3
|
||||
- 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
|
||||
volumes:
|
||||
- ../5g_rfsimulator_e1/mini_nonrf_config_3slices.yaml:/openair-amf/etc/config.yaml
|
||||
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:v1.5.0
|
||||
image: oaisoftwarealliance/oai-smf:v2.0.0
|
||||
environment:
|
||||
- TZ=Europe/Paris
|
||||
- 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
|
||||
- NSSAI_SST1=2
|
||||
- NSSAI_SST2=3
|
||||
- SESSION_AMBR_UL0=200Mbps
|
||||
- SESSION_AMBR_DL0=400Mbps
|
||||
- DEFAULT_CSCF_IPV4_ADDRESS=127.0.0.1
|
||||
- ENABLE_USAGE_REPORTING=no
|
||||
volumes:
|
||||
- ../5g_rfsimulator_e1/mini_nonrf_config_3slices.yaml:/openair-smf/etc/config.yaml
|
||||
depends_on:
|
||||
- oai-nrf
|
||||
- oai-amf
|
||||
networks:
|
||||
public_net:
|
||||
ipv4_address: 192.168.71.133
|
||||
oai-spgwu:
|
||||
container_name: "rfsim5g-oai-spgwu"
|
||||
image: oaisoftwarealliance/oai-spgwu-tiny:v1.5.0
|
||||
oai-upf:
|
||||
container_name: "rfsim5g-oai-upf"
|
||||
image: oaisoftwarealliance/oai-upf:v2.0.0
|
||||
environment:
|
||||
- TZ=Europe/Paris
|
||||
- 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
|
||||
# Three slices are defined
|
||||
- NSSAI_SST_0=1
|
||||
- NSSAI_SD_0=0xffffff
|
||||
- DNN_0=oai
|
||||
- NSSAI_SST_1=2
|
||||
- NSSAI_SD_1=0xffffff
|
||||
- DNN_1=oai
|
||||
- NSSAI_SST_2=3
|
||||
- NSSAI_SD_2=0xffffff
|
||||
- DNN_2=oai
|
||||
volumes:
|
||||
- ../5g_rfsimulator_e1/mini_nonrf_config_3slices.yaml:/openair-upf/etc/config.yaml
|
||||
depends_on:
|
||||
- oai-nrf
|
||||
- oai-smf
|
||||
cap_add:
|
||||
- NET_ADMIN
|
||||
@@ -164,7 +73,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-spgwu
|
||||
- oai-upf
|
||||
networks:
|
||||
traffic_net:
|
||||
ipv4_address: 192.168.72.135
|
||||
@@ -223,7 +132,6 @@ services:
|
||||
-r 106 --numerology 1 -C 3619200000
|
||||
--uicc0.imsi 208990100001100
|
||||
--rfsimulator.serveraddr 192.168.71.171
|
||||
ASAN_OPTIONS: detect_leaks=0
|
||||
depends_on:
|
||||
- oai-du
|
||||
networks:
|
||||
@@ -248,7 +156,7 @@ networks:
|
||||
com.docker.network.bridge.name: "rfsim5g-public"
|
||||
traffic_net:
|
||||
driver: bridge
|
||||
name: rfsim5g-oai-traffic_net-net
|
||||
name: rfsim5g-oai-traffic-net
|
||||
ipam:
|
||||
config:
|
||||
- subnet: 192.168.72.128/26
|
||||
|
||||
@@ -1,46 +0,0 @@
|
||||
#!/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
|
||||
@@ -1,20 +0,0 @@
|
||||
#!/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
|
||||
File diff suppressed because one or more lines are too long
@@ -1,21 +0,0 @@
|
||||
#!/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
|
||||
@@ -1,28 +0,0 @@
|
||||
#!/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
|
||||
@@ -1,57 +0,0 @@
|
||||
#!/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,20 +1,11 @@
|
||||
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:
|
||||
- ./oai_db.sql:/docker-entrypoint-initdb.d/oai_db.sql
|
||||
- ./mysql-healthcheck.sh:/tmp/mysql-healthcheck.sh
|
||||
- ../5g_rfsimulator/oai_db.sql:/docker-entrypoint-initdb.d/oai_db.sql
|
||||
- ../5g_rfsimulator/mysql-healthcheck.sh:/tmp/mysql-healthcheck.sh
|
||||
environment:
|
||||
- TZ=Europe/Paris
|
||||
- MYSQL_DATABASE=oai_db
|
||||
@@ -31,108 +22,36 @@ services:
|
||||
ipv4_address: 192.168.71.131
|
||||
oai-amf:
|
||||
container_name: "rfsim5g-oai-amf"
|
||||
image: oaisoftwarealliance/oai-amf:v1.5.0
|
||||
image: oaisoftwarealliance/oai-amf:v2.0.0
|
||||
environment:
|
||||
- TZ=Europe/paris
|
||||
- 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
|
||||
volumes:
|
||||
- ../5g_rfsimulator/mini_nonrf_config.yaml:/openair-amf/etc/config.yaml
|
||||
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:v1.5.0
|
||||
image: oaisoftwarealliance/oai-smf:v2.0.0
|
||||
environment:
|
||||
- TZ=Europe/Paris
|
||||
- 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
|
||||
volumes:
|
||||
- ../5g_rfsimulator/mini_nonrf_config.yaml:/openair-smf/etc/config.yaml
|
||||
depends_on:
|
||||
- oai-nrf
|
||||
- oai-amf
|
||||
networks:
|
||||
public_net:
|
||||
ipv4_address: 192.168.71.133
|
||||
oai-spgwu:
|
||||
container_name: "rfsim5g-oai-spgwu"
|
||||
image: oaisoftwarealliance/oai-spgwu-tiny:v1.5.0
|
||||
oai-upf:
|
||||
container_name: "rfsim5g-oai-upf"
|
||||
image: oaisoftwarealliance/oai-upf:v2.0.0
|
||||
environment:
|
||||
- TZ=Europe/Paris
|
||||
- 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
|
||||
volumes:
|
||||
- ../5g_rfsimulator/mini_nonrf_config.yaml:/openair-upf/etc/config.yaml
|
||||
depends_on:
|
||||
- oai-nrf
|
||||
- oai-smf
|
||||
cap_add:
|
||||
- NET_ADMIN
|
||||
@@ -153,7 +72,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-spgwu
|
||||
- oai-upf
|
||||
networks:
|
||||
traffic_net:
|
||||
ipv4_address: 192.168.72.135
|
||||
@@ -166,7 +85,7 @@ 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:
|
||||
@@ -187,7 +106,6 @@ services:
|
||||
container_name: rfsim5g-oai-nr-ue
|
||||
environment:
|
||||
USE_ADDITIONAL_OPTIONS: -E --sa --rfsim -r 106 --numerology 1 --uicc0.imsi 208990100001100 --band 66 -C 2169090000 --CO -400000000 --ssb 378 --rfsimulator.serveraddr 192.168.71.140 --log_config.global_log_options level,nocolor,time
|
||||
ASAN_OPTIONS: detect_leaks=0
|
||||
depends_on:
|
||||
- oai-gnb
|
||||
networks:
|
||||
|
||||
@@ -1,46 +0,0 @@
|
||||
#!/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
|
||||
@@ -1,20 +0,0 @@
|
||||
#!/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
|
||||
File diff suppressed because one or more lines are too long
@@ -1,21 +0,0 @@
|
||||
#!/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
|
||||
@@ -1,28 +0,0 @@
|
||||
#!/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,10 +96,9 @@ Now pull images.
|
||||
|
||||
```bash
|
||||
docker pull mysql:8.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/oai-amf:v2.0.0
|
||||
docker pull oaisoftwarealliance/oai-smf:v2.0.0
|
||||
docker pull oaisoftwarealliance/oai-upf:v2.0.0
|
||||
docker pull oaisoftwarealliance/trf-gen-cn5g:focal
|
||||
|
||||
docker pull oaisoftwarealliance/oai-gnb:develop
|
||||
@@ -139,14 +138,13 @@ 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-nrf oai-amf oai-smf oai-spgwu oai-ext-dn
|
||||
docker-compose up -d mysql oai-amf oai-smf oai-upf 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-spgwu ... done
|
||||
Creating l2sim-oai-upf ... done
|
||||
Creating l2sim-oai-amf ... done
|
||||
Creating l2sim-oai-smf ... done
|
||||
Creating l2sim-oai-ext-dn ... done
|
||||
@@ -160,12 +158,11 @@ 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-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-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
|
||||
```
|
||||
|
||||
At this point, you can prepare a capture on the newly-created public docker bridges:
|
||||
@@ -206,8 +203,7 @@ 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-nrf is up-to-date
|
||||
l2sim-oai-spgwu is up-to-date
|
||||
l2sim-oai-upf is up-to-date
|
||||
l2sim-oai-ext-dn is up-to-date
|
||||
Creating l2sim-oai-gnb ... done
|
||||
```
|
||||
@@ -220,13 +216,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-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
|
||||
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
|
||||
```
|
||||
|
||||
You can verify that the `gNB` is connected with the `AMF`:
|
||||
@@ -250,10 +245,9 @@ 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-spgwu is up-to-date
|
||||
l2sim-oai-upf 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
|
||||
@@ -268,18 +262,17 @@ 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-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)
|
||||
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)
|
||||
```
|
||||
```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-nrf l2sim-oai-smf l2sim-oai-spgwu 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-smf l2sim-oai-upf l2sim-proxy
|
||||
```
|
||||
```bash
|
||||
CONTAINER CPU % MEM USAGE / LIMIT MEM %
|
||||
@@ -288,9 +281,8 @@ 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-spgwu 0.00% 11.78MiB / 62.54GiB 0.02%
|
||||
l2sim-oai-upf 0.00% 11.78MiB / 62.54GiB 0.02%
|
||||
l2sim-proxy 6.97% 290.4MiB / 62.54GiB 0.45%
|
||||
```
|
||||
|
||||
@@ -389,19 +381,17 @@ 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-spgwu ... done
|
||||
Stopping l2sim-oai-upf ... 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-spgwu ... done
|
||||
Removing l2sim-oai-upf ... 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,14 +1,5 @@
|
||||
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
|
||||
@@ -31,108 +22,36 @@ services:
|
||||
ipv4_address: 192.168.71.131
|
||||
oai-amf:
|
||||
container_name: "l2sim-oai-amf"
|
||||
image: oaisoftwarealliance/oai-amf:v1.5.0
|
||||
image: oaisoftwarealliance/oai-amf:v2.0.0
|
||||
environment:
|
||||
- TZ=Europe/paris
|
||||
- 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
|
||||
volumes:
|
||||
- ../5g_rfsimulator/mini_nonrf_config.yaml:/openair-amf/etc/config.yaml
|
||||
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:v1.5.0
|
||||
image: oaisoftwarealliance/oai-smf:v2.0.0
|
||||
environment:
|
||||
- TZ=Europe/Paris
|
||||
- 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
|
||||
volumes:
|
||||
- ../5g_rfsimulator/mini_nonrf_config.yaml:/openair-smf/etc/config.yaml
|
||||
depends_on:
|
||||
- oai-nrf
|
||||
- oai-amf
|
||||
networks:
|
||||
public_net:
|
||||
ipv4_address: 192.168.71.133
|
||||
oai-spgwu:
|
||||
container_name: "l2sim-oai-spgwu"
|
||||
image: oaisoftwarealliance/oai-spgwu-tiny:v1.5.0
|
||||
oai-upf:
|
||||
container_name: "l2sim-oai-upf"
|
||||
image: oaisoftwarealliance/oai-upf:v2.0.0
|
||||
environment:
|
||||
- TZ=Europe/Paris
|
||||
- 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
|
||||
volumes:
|
||||
- ../5g_rfsimulator/mini_nonrf_config.yaml:/openair-upf/etc/config.yaml
|
||||
depends_on:
|
||||
- oai-nrf
|
||||
- oai-smf
|
||||
cap_add:
|
||||
- NET_ADMIN
|
||||
@@ -153,7 +72,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-spgwu
|
||||
- oai-upf
|
||||
networks:
|
||||
traffic_net:
|
||||
ipv4_address: 192.168.72.135
|
||||
@@ -172,7 +91,7 @@ services:
|
||||
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-spgwu
|
||||
- oai-upf
|
||||
- oai-amf
|
||||
volumes:
|
||||
- ../../conf_files/gnb.sa.band78.106prb.l2sim.conf:/opt/oai-gnb/etc/gnb.conf
|
||||
|
||||
@@ -37,10 +37,9 @@ Now pull images.
|
||||
|
||||
```bash
|
||||
$ docker pull mysql:8.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/oai-amf:v2.0.0
|
||||
$ docker pull oaisoftwarealliance/oai-smf:v2.0.0
|
||||
$ docker pull oaisoftwarealliance/oai-upf:v2.0.0
|
||||
$ docker pull oaisoftwarealliance/trf-gen-cn5g:focal
|
||||
|
||||
$ docker pull oaisoftwarealliance/oai-gnb:develop
|
||||
@@ -53,7 +52,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 `v1.5.0` of the `CN5G`.**
|
||||
**This new version is working only with the `v2.0.0` of the `CN5G`.**
|
||||
|
||||
# 2. Deploy containers #
|
||||
|
||||
@@ -72,12 +71,11 @@ For a deployment with the gNB split in CU-CP, CU-UP, and DU components, please r
|
||||
|
||||
```bash
|
||||
$ cd ci-scripts/yaml_files/5g_rfsimulator
|
||||
$ docker-compose up -d mysql oai-nrf oai-amf oai-smf oai-spgwu oai-ext-dn
|
||||
$ docker-compose up -d mysql oai-amf oai-smf oai-upf 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-spgwu ... done
|
||||
Creating rfsim5g-oai-upf ... done
|
||||
Creating rfsim5g-oai-amf ... done
|
||||
Creating rfsim5g-oai-smf ... done
|
||||
Creating rfsim5g-oai-ext-dn ... done
|
||||
@@ -87,20 +85,19 @@ 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-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
|
||||
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
|
||||
```
|
||||
|
||||
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
|
||||
@@ -131,8 +128,7 @@ The gNB can be deployed either in monolithic mode, or in CU/DU split mode.
|
||||
|
||||
```bash
|
||||
$ docker-compose up -d oai-gnb
|
||||
rfsim5g-oai-nrf is up-to-date
|
||||
rfsim5g-oai-spgwu is up-to-date
|
||||
rfsim5g-oai-upf is up-to-date
|
||||
rfsim5g-oai-ext-dn is up-to-date
|
||||
Creating rfsim5g-oai-gnb ... done
|
||||
```
|
||||
@@ -150,15 +146,14 @@ 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-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
|
||||
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
|
||||
```
|
||||
|
||||
You can verify that the `gNB` is connected with the `AMF`:
|
||||
@@ -178,10 +173,9 @@ $ 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-spgwu is up-to-date
|
||||
rfsim5g-oai-upf 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
|
||||
@@ -191,23 +185,22 @@ 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-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
|
||||
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
|
||||
```
|
||||
|
||||
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)
|
||||
@@ -266,10 +259,9 @@ 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-spgwu is up-to-date
|
||||
rfsim5g-oai-upf 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
|
||||
@@ -279,7 +271,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
|
||||
@@ -287,16 +279,15 @@ 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-spgwu /openair-spgwu-tiny/bin/en ... Up (healthy) 2152/udp, 8805/udp
|
||||
rfsim5g-oai-upf /bin/bash /openair-upf/bin ... 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)
|
||||
@@ -458,19 +449,17 @@ 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-spgwu ... done
|
||||
Stopping rfsim5g-oai-upf ... 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-spgwu ... done
|
||||
Removing rfsim5g-oai-upf ... 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
|
||||
@@ -522,24 +511,21 @@ 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 `SPGWU` parameters:
|
||||
Mainly you need to match the PLMN in `gNB`, `AMF` and `UPF` parameters in the `mini_nonrf_config.yaml`:
|
||||
|
||||
* `AMF`
|
||||
- `MCC=208`
|
||||
- `MNC=99`
|
||||
- `PLMN_SUPPORT_TAC=0x0001`
|
||||
- ...
|
||||
* `SPGWU`
|
||||
- `MCC=208`
|
||||
- `MNC=99`
|
||||
- `TAC=1`
|
||||
* `gNB`
|
||||
- `MCC: '208'`
|
||||
- `MNC: '99'`
|
||||
- `TAC: 1`
|
||||
```yaml
|
||||
plmn_support_list:
|
||||
- mcc: 208
|
||||
mnc: 99
|
||||
tac: 0x0001
|
||||
nssai:
|
||||
- *embb_slice1
|
||||
...
|
||||
snssais:
|
||||
- &embb_slice1
|
||||
sst: 1
|
||||
```
|
||||
|
||||
The `ST` and `SD` values shall also match.
|
||||
|
||||
@@ -1,14 +1,5 @@
|
||||
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
|
||||
@@ -31,108 +22,36 @@ services:
|
||||
ipv4_address: 192.168.71.131
|
||||
oai-amf:
|
||||
container_name: "rfsim5g-oai-amf"
|
||||
image: oaisoftwarealliance/oai-amf:v1.5.0
|
||||
image: oaisoftwarealliance/oai-amf:v2.0.0
|
||||
environment:
|
||||
- TZ=Europe/paris
|
||||
- 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
|
||||
volumes:
|
||||
- ./mini_nonrf_config.yaml:/openair-amf/etc/config.yaml
|
||||
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:v1.5.0
|
||||
image: oaisoftwarealliance/oai-smf:v2.0.0
|
||||
environment:
|
||||
- TZ=Europe/Paris
|
||||
- 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
|
||||
volumes:
|
||||
- ./mini_nonrf_config.yaml:/openair-smf/etc/config.yaml
|
||||
depends_on:
|
||||
- oai-nrf
|
||||
- oai-amf
|
||||
networks:
|
||||
public_net:
|
||||
ipv4_address: 192.168.71.133
|
||||
oai-spgwu:
|
||||
container_name: "rfsim5g-oai-spgwu"
|
||||
image: oaisoftwarealliance/oai-spgwu-tiny:v1.5.0
|
||||
oai-upf:
|
||||
container_name: "rfsim5g-oai-upf"
|
||||
image: oaisoftwarealliance/oai-upf:v2.0.0
|
||||
environment:
|
||||
- TZ=Europe/Paris
|
||||
- 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
|
||||
volumes:
|
||||
- ./mini_nonrf_config.yaml:/openair-upf/etc/config.yaml
|
||||
depends_on:
|
||||
- oai-nrf
|
||||
- oai-smf
|
||||
cap_add:
|
||||
- NET_ADMIN
|
||||
@@ -153,7 +72,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-spgwu
|
||||
- oai-upf
|
||||
networks:
|
||||
traffic_net:
|
||||
ipv4_address: 192.168.72.135
|
||||
@@ -187,7 +106,6 @@ services:
|
||||
container_name: rfsim5g-oai-nr-ue
|
||||
environment:
|
||||
USE_ADDITIONAL_OPTIONS: -E --sa --rfsim -r 106 --numerology 1 --uicc0.imsi 208990100001100 -C 3619200000 --rfsimulator.serveraddr 192.168.71.140 --log_config.global_log_options level,nocolor,time
|
||||
ASAN_OPTIONS: detect_leaks=0
|
||||
depends_on:
|
||||
- oai-gnb
|
||||
networks:
|
||||
@@ -206,7 +124,6 @@ services:
|
||||
container_name: rfsim5g-oai-nr-ue2
|
||||
environment:
|
||||
USE_ADDITIONAL_OPTIONS: -E --sa --rfsim -r 106 --numerology 1 --uicc0.imsi 208990100001101 -C 3619200000 --rfsimulator.serveraddr 192.168.71.140 --log_config.global_log_options level,nocolor,time
|
||||
ASAN_OPTIONS: detect_leaks=0
|
||||
depends_on:
|
||||
- oai-gnb
|
||||
networks:
|
||||
@@ -225,7 +142,6 @@ services:
|
||||
container_name: rfsim5g-oai-nr-ue3
|
||||
environment:
|
||||
USE_ADDITIONAL_OPTIONS: -E --sa --rfsim -r 106 --numerology 1 --uicc0.imsi 208990100001102 -C 3619200000 --rfsimulator.serveraddr 192.168.71.140 --log_config.global_log_options level,nocolor,time
|
||||
ASAN_OPTIONS: detect_leaks=0
|
||||
depends_on:
|
||||
- oai-gnb
|
||||
networks:
|
||||
@@ -244,7 +160,6 @@ services:
|
||||
container_name: rfsim5g-oai-nr-ue4
|
||||
environment:
|
||||
USE_ADDITIONAL_OPTIONS: -E --sa --rfsim -r 106 --numerology 1 --uicc0.imsi 208990100001103 -C 3619200000 --rfsimulator.serveraddr 192.168.71.140 --log_config.global_log_options level,nocolor,time
|
||||
ASAN_OPTIONS: detect_leaks=0
|
||||
depends_on:
|
||||
- oai-gnb
|
||||
networks:
|
||||
@@ -263,7 +178,6 @@ services:
|
||||
container_name: rfsim5g-oai-nr-ue5
|
||||
environment:
|
||||
USE_ADDITIONAL_OPTIONS: -E --sa --rfsim -r 106 --numerology 1 --uicc0.imsi 208990100001104 -C 3619200000 --rfsimulator.serveraddr 192.168.71.140 --log_config.global_log_options level,nocolor,time
|
||||
ASAN_OPTIONS: detect_leaks=0
|
||||
depends_on:
|
||||
- oai-gnb
|
||||
networks:
|
||||
@@ -282,7 +196,6 @@ services:
|
||||
container_name: rfsim5g-oai-nr-ue6
|
||||
environment:
|
||||
USE_ADDITIONAL_OPTIONS: -E --sa --rfsim -r 106 --numerology 1 --uicc0.imsi 208990100001105 -C 3619200000 --rfsimulator.serveraddr 192.168.71.140 --log_config.global_log_options level,nocolor,time
|
||||
ASAN_OPTIONS: detect_leaks=0
|
||||
depends_on:
|
||||
- oai-gnb
|
||||
networks:
|
||||
@@ -301,7 +214,6 @@ services:
|
||||
container_name: rfsim5g-oai-nr-ue7
|
||||
environment:
|
||||
USE_ADDITIONAL_OPTIONS: -E --sa --rfsim -r 106 --numerology 1 --uicc0.imsi 208990100001106 -C 3619200000 --rfsimulator.serveraddr 192.168.71.140 --log_config.global_log_options level,nocolor,time
|
||||
ASAN_OPTIONS: detect_leaks=0
|
||||
depends_on:
|
||||
- oai-gnb
|
||||
networks:
|
||||
@@ -320,7 +232,6 @@ services:
|
||||
container_name: rfsim5g-oai-nr-ue8
|
||||
environment:
|
||||
USE_ADDITIONAL_OPTIONS: -E --sa --rfsim -r 106 --numerology 1 --uicc0.imsi 208990100001107 -C 3619200000 --rfsimulator.serveraddr 192.168.71.140 --log_config.global_log_options level,nocolor,time
|
||||
ASAN_OPTIONS: detect_leaks=0
|
||||
depends_on:
|
||||
- oai-gnb
|
||||
networks:
|
||||
@@ -339,7 +250,6 @@ services:
|
||||
container_name: rfsim5g-oai-nr-ue9
|
||||
environment:
|
||||
USE_ADDITIONAL_OPTIONS: -E --sa --rfsim -r 106 --numerology 1 --uicc0.imsi 208990100001108 -C 3619200000 --rfsimulator.serveraddr 192.168.71.140 --log_config.global_log_options level,nocolor,time
|
||||
ASAN_OPTIONS: detect_leaks=0
|
||||
depends_on:
|
||||
- oai-gnb
|
||||
networks:
|
||||
@@ -358,7 +268,6 @@ services:
|
||||
container_name: rfsim5g-oai-nr-ue10
|
||||
environment:
|
||||
USE_ADDITIONAL_OPTIONS: -E --sa --rfsim -r 106 --numerology 1 --uicc0.imsi 208990100001109 -C 3619200000 --rfsimulator.serveraddr 192.168.71.140 --log_config.global_log_options level,nocolor,time
|
||||
ASAN_OPTIONS: detect_leaks=0
|
||||
depends_on:
|
||||
- oai-gnb
|
||||
networks:
|
||||
|
||||
@@ -0,0 +1,189 @@
|
||||
################################################################################
|
||||
# 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"
|
||||
Executable → Regular
@@ -1,14 +1,5 @@
|
||||
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
|
||||
@@ -31,108 +22,36 @@ services:
|
||||
ipv4_address: 192.168.71.131
|
||||
oai-amf:
|
||||
container_name: "rfsim5g-oai-amf"
|
||||
image: oaisoftwarealliance/oai-amf:v1.5.0
|
||||
image: oaisoftwarealliance/oai-amf:v2.0.0
|
||||
environment:
|
||||
- TZ=Europe/paris
|
||||
- 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
|
||||
volumes:
|
||||
- ../5g_rfsimulator/mini_nonrf_config.yaml:/openair-amf/etc/config.yaml
|
||||
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:v1.5.0
|
||||
image: oaisoftwarealliance/oai-smf:v2.0.0
|
||||
environment:
|
||||
- TZ=Europe/Paris
|
||||
- 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
|
||||
volumes:
|
||||
- ../5g_rfsimulator/mini_nonrf_config.yaml:/openair-smf/etc/config.yaml
|
||||
depends_on:
|
||||
- oai-nrf
|
||||
- oai-amf
|
||||
networks:
|
||||
public_net:
|
||||
ipv4_address: 192.168.71.133
|
||||
oai-spgwu:
|
||||
container_name: "rfsim5g-oai-spgwu"
|
||||
image: oaisoftwarealliance/oai-spgwu-tiny:v1.5.0
|
||||
oai-upf:
|
||||
container_name: "rfsim5g-oai-upf"
|
||||
image: oaisoftwarealliance/oai-upf:v2.0.0
|
||||
environment:
|
||||
- TZ=Europe/Paris
|
||||
- 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
|
||||
volumes:
|
||||
- ../5g_rfsimulator/mini_nonrf_config.yaml:/openair-upf/etc/config.yaml
|
||||
depends_on:
|
||||
- oai-nrf
|
||||
- oai-smf
|
||||
cap_add:
|
||||
- NET_ADMIN
|
||||
@@ -153,7 +72,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-spgwu
|
||||
- oai-upf
|
||||
networks:
|
||||
traffic_net:
|
||||
ipv4_address: 192.168.72.135
|
||||
@@ -187,7 +106,6 @@ services:
|
||||
container_name: rfsim5g-oai-nr-ue
|
||||
environment:
|
||||
USE_ADDITIONAL_OPTIONS: --sa --rfsim -r 24 --ssb 24 --numerology 1 -C 3604800000 --uicc0.imsi 208990100001100 --rfsimulator.serveraddr 192.168.71.140 --log_config.global_log_options level,nocolor,time
|
||||
ASAN_OPTIONS: detect_leaks=0
|
||||
depends_on:
|
||||
- oai-gnb
|
||||
networks:
|
||||
|
||||
@@ -1,14 +1,5 @@
|
||||
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
|
||||
@@ -31,108 +22,36 @@ services:
|
||||
ipv4_address: 192.168.71.131
|
||||
oai-amf:
|
||||
container_name: "rfsim5g-oai-amf"
|
||||
image: oaisoftwarealliance/oai-amf:v1.5.0
|
||||
image: oaisoftwarealliance/oai-amf:v2.0.0
|
||||
environment:
|
||||
- TZ=Europe/paris
|
||||
- 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
|
||||
volumes:
|
||||
- ../5g_rfsimulator/mini_nonrf_config.yaml:/openair-amf/etc/config.yaml
|
||||
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:v1.5.0
|
||||
image: oaisoftwarealliance/oai-smf:v2.0.0
|
||||
environment:
|
||||
- TZ=Europe/Paris
|
||||
- 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
|
||||
volumes:
|
||||
- ../5g_rfsimulator/mini_nonrf_config.yaml:/openair-smf/etc/config.yaml
|
||||
depends_on:
|
||||
- oai-nrf
|
||||
- oai-amf
|
||||
networks:
|
||||
public_net:
|
||||
ipv4_address: 192.168.71.133
|
||||
oai-spgwu:
|
||||
container_name: "rfsim5g-oai-spgwu"
|
||||
image: oaisoftwarealliance/oai-spgwu-tiny:v1.5.0
|
||||
oai-upf:
|
||||
container_name: "rfsim5g-oai-upf"
|
||||
image: oaisoftwarealliance/oai-upf:v2.0.0
|
||||
environment:
|
||||
- TZ=Europe/Paris
|
||||
- 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
|
||||
volumes:
|
||||
- ../5g_rfsimulator/mini_nonrf_config.yaml:/openair-upf/etc/config.yaml
|
||||
depends_on:
|
||||
- oai-nrf
|
||||
- oai-smf
|
||||
cap_add:
|
||||
- NET_ADMIN
|
||||
@@ -153,7 +72,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-spgwu
|
||||
- oai-upf
|
||||
networks:
|
||||
traffic_net:
|
||||
ipv4_address: 192.168.72.135
|
||||
@@ -188,7 +107,6 @@ services:
|
||||
container_name: rfsim5g-oai-nr-ue
|
||||
environment:
|
||||
USE_ADDITIONAL_OPTIONS: --sa --rfsim -r 106 --numerology 1 --band 78 -C 3319680000 --ue-nb-ant-tx 2 --uicc0.imsi 208990100001100 --ue-nb-ant-rx 2 --uecap_file /opt/oai-nr-ue/etc/uecap.xml --rfsimulator.serveraddr 192.168.71.140 --log_config.global_log_options level,nocolor,time
|
||||
ASAN_OPTIONS: detect_leaks=0
|
||||
depends_on:
|
||||
- oai-gnb
|
||||
networks:
|
||||
|
||||
@@ -20,8 +20,7 @@ Core network components are on `core_net` network, CU-CP <--> CU-UP X communicat
|
||||
```
|
||||
AMF --> 192.168.71.132 (N2,Namf)
|
||||
SMF --> 192.168.71.133 (N4,Nsmf)
|
||||
NRF --> 192.168.71.130 (Nnrf)
|
||||
SPGWU --> 192.168.71.134 (N3)
|
||||
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)
|
||||
@@ -41,7 +40,7 @@ You should be able to deploy the [basic 5G RFsim deployment](../5g_rfsimulator/R
|
||||
First, start the MySQL server and 5GC:
|
||||
|
||||
```bash
|
||||
docker-compose up -d mysql oai-nrf oai-amf oai-smf oai-spgwu
|
||||
docker-compose up -d mysql oai-amf oai-smf oai-upf
|
||||
docker-compose ps -a
|
||||
```
|
||||
|
||||
|
||||
@@ -1,22 +1,13 @@
|
||||
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/1
|
||||
networks:
|
||||
core_net:
|
||||
ipv4_address: 192.168.71.130
|
||||
mysql:
|
||||
container_name: "rfsim5g-mysql"
|
||||
image: mysql:8.0
|
||||
volumes:
|
||||
- ../5g_f1_rfsimulator/oai_db.sql:/docker-entrypoint-initdb.d/oai_db.sql
|
||||
- ../5g_f1_rfsimulator/mysql-healthcheck.sh:/tmp/mysql-healthcheck.sh
|
||||
- ../5g_rfsimulator/oai_db.sql:/docker-entrypoint-initdb.d/oai_db.sql
|
||||
- ../5g_rfsimulator/mysql-healthcheck.sh:/tmp/mysql-healthcheck.sh
|
||||
environment:
|
||||
- TZ=Europe/1
|
||||
- TZ=Europe/Paris
|
||||
- MYSQL_DATABASE=oai_db
|
||||
- MYSQL_USER=test
|
||||
- MYSQL_PASSWORD=test
|
||||
@@ -31,118 +22,36 @@ services:
|
||||
ipv4_address: 192.168.71.131
|
||||
oai-amf:
|
||||
container_name: "rfsim5g-oai-amf"
|
||||
image: oaisoftwarealliance/oai-amf:v1.5.0
|
||||
image: oaisoftwarealliance/oai-amf:v2.0.0
|
||||
environment:
|
||||
- TZ=Europe/1
|
||||
- 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
|
||||
# Three slices are defined
|
||||
- SST_0=1
|
||||
- SST_1=2
|
||||
- SST_2=3
|
||||
- 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
|
||||
- TZ=Europe/paris
|
||||
volumes:
|
||||
- ./mini_nonrf_config_3slices.yaml:/openair-amf/etc/config.yaml
|
||||
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:v1.5.0
|
||||
image: oaisoftwarealliance/oai-smf:v2.0.0
|
||||
environment:
|
||||
- TZ=Europe/1
|
||||
- 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
|
||||
- NSSAI_SST1=2
|
||||
- NSSAI_SST2=3
|
||||
- SESSION_AMBR_UL0=200Mbps
|
||||
- SESSION_AMBR_DL0=400Mbps
|
||||
- DEFAULT_CSCF_IPV4_ADDRESS=127.0.0.1
|
||||
- ENABLE_USAGE_REPORTING=no
|
||||
- TZ=Europe/Paris
|
||||
volumes:
|
||||
- ./mini_nonrf_config_3slices.yaml:/openair-smf/etc/config.yaml
|
||||
depends_on:
|
||||
- oai-nrf
|
||||
- oai-amf
|
||||
networks:
|
||||
core_net:
|
||||
ipv4_address: 192.168.71.133
|
||||
oai-spgwu:
|
||||
container_name: "rfsim5g-oai-spgwu"
|
||||
image: oaisoftwarealliance/oai-spgwu-tiny:v1.5.0
|
||||
oai-upf:
|
||||
container_name: "rfsim5g-oai-upf"
|
||||
image: oaisoftwarealliance/oai-upf:v2.0.0
|
||||
environment:
|
||||
- TZ=Europe/1
|
||||
- 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
|
||||
# Three slices are defined
|
||||
- NSSAI_SST_0=1
|
||||
- NSSAI_SD_0=0xffffff
|
||||
- DNN_0=oai
|
||||
- NSSAI_SST_1=2
|
||||
- NSSAI_SD_1=0xffffff
|
||||
- DNN_1=oai
|
||||
- NSSAI_SST_2=3
|
||||
- NSSAI_SD_2=0xffffff
|
||||
- DNN_2=oai
|
||||
- TZ=Europe/Paris
|
||||
volumes:
|
||||
- ./mini_nonrf_config_3slices.yaml:/openair-upf/etc/config.yaml
|
||||
depends_on:
|
||||
- oai-nrf
|
||||
- oai-smf
|
||||
cap_add:
|
||||
- NET_ADMIN
|
||||
@@ -153,6 +62,8 @@ services:
|
||||
networks:
|
||||
core_net:
|
||||
ipv4_address: 192.168.71.134
|
||||
traffic_net:
|
||||
ipv4_address: 192.168.72.134
|
||||
|
||||
oai-cucp:
|
||||
image: oaisoftwarealliance/oai-gnb:develop
|
||||
@@ -164,7 +75,7 @@ services:
|
||||
--gNBs.[0].local_s_address 192.168.72.2
|
||||
ASAN_OPTIONS: detect_leaks=0
|
||||
depends_on:
|
||||
- oai-spgwu
|
||||
- oai-upf
|
||||
networks:
|
||||
core_net:
|
||||
ipv4_address: 192.168.71.150
|
||||
@@ -366,7 +277,6 @@ services:
|
||||
-r 106 --numerology 1 -C 3619200000
|
||||
--uicc0.imsi 208990100001100
|
||||
--rfsimulator.serveraddr 192.168.78.2
|
||||
ASAN_OPTIONS: detect_leaks=0
|
||||
depends_on:
|
||||
- oai-du
|
||||
networks:
|
||||
@@ -389,7 +299,6 @@ services:
|
||||
-r 106 --numerology 1 -C 3619200000
|
||||
--uicc0.imsi 208990100001101 --uicc0.nssai_sst 2
|
||||
--rfsimulator.serveraddr 192.168.78.3
|
||||
ASAN_OPTIONS: detect_leaks=0
|
||||
depends_on:
|
||||
- oai-du2
|
||||
networks:
|
||||
@@ -435,6 +344,14 @@ networks:
|
||||
- subnet: 192.168.71.128/26
|
||||
driver_opts:
|
||||
com.docker.network.bridge.name: "rfsim5g-core"
|
||||
traffic_net:
|
||||
driver: bridge
|
||||
name: rfsim5g-oai-traffic-net
|
||||
ipam:
|
||||
config:
|
||||
- subnet: 192.168.72.128/26
|
||||
driver_opts:
|
||||
com.docker.network.bridge.name: "rfsim5g-traffic"
|
||||
f1c_net:
|
||||
driver: bridge
|
||||
name: rfsim5g-oai-f1c-net
|
||||
|
||||
@@ -0,0 +1,213 @@
|
||||
################################################################################
|
||||
# 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"
|
||||
@@ -1,14 +1,5 @@
|
||||
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
|
||||
@@ -31,108 +22,36 @@ services:
|
||||
ipv4_address: 192.168.71.131
|
||||
oai-amf:
|
||||
container_name: "rfsim5g-oai-amf"
|
||||
image: oaisoftwarealliance/oai-amf:v1.5.0
|
||||
image: oaisoftwarealliance/oai-amf:v2.0.0
|
||||
environment:
|
||||
- TZ=Europe/paris
|
||||
- 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
|
||||
volumes:
|
||||
- ../5g_rfsimulator/mini_nonrf_config.yaml:/openair-amf/etc/config.yaml
|
||||
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:v1.5.0
|
||||
image: oaisoftwarealliance/oai-smf:v2.0.0
|
||||
environment:
|
||||
- TZ=Europe/Paris
|
||||
- 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
|
||||
volumes:
|
||||
- ../5g_rfsimulator/mini_nonrf_config.yaml:/openair-smf/etc/config.yaml
|
||||
depends_on:
|
||||
- oai-nrf
|
||||
- oai-amf
|
||||
networks:
|
||||
public_net:
|
||||
ipv4_address: 192.168.71.133
|
||||
oai-spgwu:
|
||||
container_name: "rfsim5g-oai-spgwu"
|
||||
image: oaisoftwarealliance/oai-spgwu-tiny:v1.5.0
|
||||
oai-upf:
|
||||
container_name: "rfsim5g-oai-upf"
|
||||
image: oaisoftwarealliance/oai-upf:v2.0.0
|
||||
environment:
|
||||
- TZ=Europe/Paris
|
||||
- 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
|
||||
volumes:
|
||||
- ../5g_rfsimulator/mini_nonrf_config.yaml:/openair-upf/etc/config.yaml
|
||||
depends_on:
|
||||
- oai-nrf
|
||||
- oai-smf
|
||||
cap_add:
|
||||
- NET_ADMIN
|
||||
@@ -153,7 +72,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-spgwu
|
||||
- oai-upf
|
||||
networks:
|
||||
traffic_net:
|
||||
ipv4_address: 192.168.72.135
|
||||
@@ -188,7 +107,6 @@ services:
|
||||
container_name: rfsim5g-oai-nr-ue
|
||||
environment:
|
||||
USE_ADDITIONAL_OPTIONS: --sa --rfsim -r 25 --numerology 0 --uicc0.imsi 208990100001100 --band 66 -C 2152260000 --CO -400000000 --ssb 76 --rfsimulator.serveraddr 192.168.71.140 --log_config.global_log_options level,nocolor,time
|
||||
ASAN_OPTIONS: detect_leaks=0
|
||||
depends_on:
|
||||
- oai-gnb
|
||||
networks:
|
||||
|
||||
@@ -76,6 +76,8 @@ static inline const char *rnti_types(nr_rnti_type_t rr)
|
||||
}
|
||||
#undef R
|
||||
|
||||
#define NR_MAX_NB_LAYERS 4 // 8
|
||||
|
||||
typedef enum {
|
||||
nr_FR1 = 0,
|
||||
nr_FR2
|
||||
|
||||
@@ -132,3 +132,21 @@ void set_priority(int priority)
|
||||
abort();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Convert a version string x.y.z into numbers.
|
||||
*
|
||||
* The function takes a version string of format "x.y.z" where x is the major
|
||||
* version number, y minor, z patch. It tries to match version, and outputs the
|
||||
* numbers in the correspondingly named variables.
|
||||
*
|
||||
* @return The number of version parts matched (should be three on x.y.z).
|
||||
*/
|
||||
int read_version(const char *version, uint8_t *major, uint8_t *minor, uint8_t *patch)
|
||||
{
|
||||
int ret = sscanf(version, "%hhu.%hhu.%hhu", major, minor, patch);
|
||||
// EOF means "end of input reached or matching failure"
|
||||
if (ret == EOF)
|
||||
return 3;
|
||||
return ret; // ret has number of items matched
|
||||
}
|
||||
|
||||
@@ -107,6 +107,10 @@ void set_priority(int priority);
|
||||
|
||||
char *itoa(int i);
|
||||
|
||||
#define STRINGIFY(S) #S
|
||||
#define TO_STRING(S) STRINGIFY(S)
|
||||
int read_version(const char *version, uint8_t *major, uint8_t *minor, uint8_t *patch);
|
||||
|
||||
#define findInList(keY, result, list, element_type) {\
|
||||
int i;\
|
||||
for (i=0; i<sizeof(list)/sizeof(element_type) ; i++)\
|
||||
|
||||
@@ -21,11 +21,11 @@
|
||||
#---------------------------------------------------------------------
|
||||
#
|
||||
# Dockerfile for the Open-Air-Interface BUILD service
|
||||
# Valid for Rocky 8.7
|
||||
# Valid for Rocky 9
|
||||
#
|
||||
#---------------------------------------------------------------------
|
||||
|
||||
ARG BASE_IMAGE=docker.io/rockylinux:8.7
|
||||
ARG BASE_IMAGE=docker.io/rockylinux:9
|
||||
FROM $BASE_IMAGE AS ran-base
|
||||
|
||||
ENV TZ=Europe/Paris
|
||||
@@ -33,7 +33,6 @@ ENV BUILD_UHD_FROM_SOURCE=True
|
||||
ENV UHD_VERSION=4.4.0.0
|
||||
|
||||
RUN dnf install 'dnf-command(config-manager)' -y && \
|
||||
dnf config-manager --set-enabled powertools && \
|
||||
dnf install epel-release -y && crb enable && \
|
||||
dnf update -y && \
|
||||
dnf install -y \
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
#---------------------------------------------------------------------
|
||||
#
|
||||
# Dockerfile for the Open-Air-Interface BUILD service
|
||||
# Valid for Rocky 8.7
|
||||
# Valid for Rocky 9
|
||||
#
|
||||
#---------------------------------------------------------------------
|
||||
|
||||
|
||||
+21
-26
@@ -21,17 +21,15 @@
|
||||
#---------------------------------------------------------------------
|
||||
#
|
||||
# Dockerfile for the Open-Air-Interface BUILD service
|
||||
# Valid for Rocky 8.7
|
||||
# Valid for Rocky 9
|
||||
#
|
||||
#---------------------------------------------------------------------
|
||||
|
||||
ARG BASE_IMAGE=docker.io/rockylinux:8.7
|
||||
ARG BASE_IMAGE=docker.io/rockylinux:9
|
||||
FROM ran-base:latest AS enb-base
|
||||
|
||||
FROM ran-build:latest AS enb-build
|
||||
|
||||
RUN python3 ./docker/scripts/generateTemplate.py ./docker/scripts/enb_parameters.yaml && \
|
||||
cp /oai-ran/docker/scripts/enb_entrypoint.sh /oai-ran/docker/scripts/entrypoint.sh
|
||||
|
||||
#start from scratch for target executable
|
||||
FROM $BASE_IMAGE as oai-enb
|
||||
@@ -56,9 +54,9 @@ RUN dnf update -y && \
|
||||
|
||||
WORKDIR /opt/oai-enb/bin
|
||||
COPY --from=enb-build \
|
||||
/oai-ran/cmake_targets/ran_build/build/lte-softmodem \
|
||||
/oai-ran/docker/scripts/entrypoint.sh \
|
||||
./
|
||||
/oai-ran/cmake_targets/ran_build/build/lte-softmodem ./
|
||||
|
||||
COPY ./docker/scripts/enb_entrypoint.sh ./entrypoint.sh
|
||||
|
||||
COPY --from=enb-build \
|
||||
/oai-ran/cmake_targets/ran_build/build/liboai_eth_transpro.so \
|
||||
@@ -73,24 +71,25 @@ COPY --from=enb-build \
|
||||
/usr/local/lib/
|
||||
|
||||
COPY --from=enb-base \
|
||||
/lib64/libconfig.so.9 \
|
||||
/lib64/libconfig.so.11 \
|
||||
/lib64/libblas.so.3 \
|
||||
/lib64/libcblas.so.3 \
|
||||
/lib64/liblapack.so.3 \
|
||||
/lib64/liblapacke.so.3 \
|
||||
/lib64/libboost_chrono.so.1.66.0 \
|
||||
/lib64/libboost_date_time.so.1.66.0 \
|
||||
/lib64/libboost_filesystem.so.1.66.0 \
|
||||
/lib64/libboost_program_options.so.1.66.0 \
|
||||
/lib64/libboost_serialization.so.1.66.0 \
|
||||
/lib64/libboost_thread.so.1.66.0 \
|
||||
/lib64/libboost_system.so.1.66.0 \
|
||||
/lib64/libboost_unit_test_framework.so.1.66.0 \
|
||||
/lib64/libboost_atomic.so.1.66.0 \
|
||||
/lib64/libboost_timer.so.1.66.0 \
|
||||
/lib64/libboost_regex.so.1.66.0 \
|
||||
/lib64/libicudata.so.60 \
|
||||
/lib64/libicui18n.so.60 \
|
||||
/lib64/libicuuc.so.60 \
|
||||
/lib64/libboost_chrono.so.1.75.0 \
|
||||
/lib64/libboost_date_time.so.1.75.0 \
|
||||
/lib64/libboost_filesystem.so.1.75.0 \
|
||||
/lib64/libboost_program_options.so.1.75.0 \
|
||||
/lib64/libboost_serialization.so.1.75.0 \
|
||||
/lib64/libboost_thread.so.1.75.0 \
|
||||
/lib64/libboost_system.so.1.75.0 \
|
||||
/lib64/libboost_unit_test_framework.so.1.75.0 \
|
||||
/lib64/libboost_atomic.so.1.75.0 \
|
||||
/lib64/libboost_timer.so.1.75.0 \
|
||||
/lib64/libboost_regex.so.1.75.0 \
|
||||
/lib64/libicudata.so.67 \
|
||||
/lib64/libicui18n.so.67 \
|
||||
/lib64/libicuuc.so.67 \
|
||||
/lib64/
|
||||
|
||||
|
||||
@@ -116,10 +115,6 @@ RUN /bin/bash -c "ln -s /usr/local/lib/liboai_usrpdevif.so /usr/local/lib/liboai
|
||||
echo "ldd on libtelnetsrv.so" && ldd /usr/local/lib/libtelnetsrv.so && \
|
||||
echo "ldd on libtelnetsrv_enb.so" && ldd /usr/local/lib/libtelnetsrv_enb.so
|
||||
|
||||
# Copy the relevant configuration files for eNB
|
||||
WORKDIR /opt/oai-enb/etc
|
||||
COPY --from=enb-build /oai-ran/docker/etc .
|
||||
|
||||
WORKDIR /opt/oai-enb
|
||||
|
||||
# 2152 --> S1U, GTP/UDP
|
||||
|
||||
@@ -21,11 +21,11 @@
|
||||
#---------------------------------------------------------------------
|
||||
#
|
||||
# Dockerfile for the Open-Air-Interface BUILD service
|
||||
# Valid for Rocky 8.7
|
||||
# Valid for Rocky 9
|
||||
#
|
||||
#---------------------------------------------------------------------
|
||||
|
||||
ARG BASE_IMAGE=docker.io/rockylinux:8.7
|
||||
ARG BASE_IMAGE=docker.io/rockylinux:9
|
||||
FROM ran-base:latest AS gnb-base
|
||||
|
||||
FROM ran-build:latest AS gnb-build
|
||||
@@ -55,11 +55,11 @@ RUN dnf update -y && \
|
||||
echo "/usr/local/lib" > /etc/ld.so.conf.d/local-lib.conf && \
|
||||
echo "/usr/local/lib64" >> /etc/ld.so.conf.d/local-lib.conf
|
||||
|
||||
COPY ./libori.so /usr/local/lib
|
||||
|
||||
WORKDIR /opt/oai-gnb-aw2s/bin
|
||||
COPY --from=gnb-build \
|
||||
/oai-ran/cmake_targets/ran_build/build/nr-softmodem \
|
||||
./
|
||||
COPY ./docker/scripts/gnb-aw2s_entrypoint.sh ./entrypoint.sh
|
||||
COPY --from=gnb-build /oai-ran/cmake_targets/ran_build/build/nr-softmodem ./
|
||||
COPY ./docker/scripts/gnb-aw2s_entrypoint.sh /opt/oai-gnb-aw2s/bin/entrypoint.sh
|
||||
|
||||
COPY --from=gnb-build \
|
||||
/oai-ran/cmake_targets/ran_build/build/liboai_eth_transpro.so \
|
||||
@@ -70,21 +70,30 @@ COPY --from=gnb-build \
|
||||
/oai-ran/cmake_targets/ran_build/build/libdfts.so \
|
||||
/oai-ran/cmake_targets/ran_build/build/libldpc*.so \
|
||||
/oai-ran/cmake_targets/ran_build/build/libtelnetsrv.so \
|
||||
/usr/local/lib/libori.so \
|
||||
/usr/local/lib/
|
||||
|
||||
COPY --from=gnb-base \
|
||||
/lib64/libconfig.so.9 \
|
||||
/lib64/libconfig.so.11 \
|
||||
/lib64/libforms.so.2 \
|
||||
/lib64/libblas.so.3 \
|
||||
/lib64/libcblas.so.3 \
|
||||
/lib64/liblapack.so.3 \
|
||||
/lib64/liblapacke.so.3 \
|
||||
/lib64/
|
||||
|
||||
RUN ln -s /usr/local/lib/libaw2sori_transpro.so /usr/local/lib/libthirdparty_transpro.so && \
|
||||
ln -s /usr/local/lib/liboai_eth_transpro.so /usr/local/lib/liboai_transpro.so && \
|
||||
ldconfig
|
||||
ldconfig && \
|
||||
echo "ldd on nr-softmodem" && ldd /opt/oai-gnb-aw2s/bin/nr-softmodem && \
|
||||
echo "ldd on liboai_eth_transpro.so" && ldd /usr/local/lib/liboai_eth_transpro.so && \
|
||||
echo "ldd on librfsimulator.so" && ldd /usr/local/lib/librfsimulator.so && \
|
||||
echo "ldd on libthirdparty_transpro.so" && ldd /usr/local/lib/libthirdparty_transpro.so && \
|
||||
echo "ldd on libcoding.so" && ldd /usr/local/lib/libcoding.so && \
|
||||
echo "ldd on libparams_libconfig.so" && ldd /usr/local/lib/libparams_libconfig.so && \
|
||||
echo "ldd on libdfts.so" && ldd /usr/local/lib/libdfts.so && \
|
||||
echo "ldd on libtelnetsrv.so" && ldd /usr/local/lib/libtelnetsrv.so
|
||||
|
||||
WORKDIR /opt/oai-gnb-aw2s
|
||||
|
||||
ENTRYPOINT ["/opt/oai-gnb-aw2s/bin/entrypoint.sh"]
|
||||
CMD ["/opt/oai-gnb-aw2s/bin/nr-softmodem", "-O", "/opt/oai-gnb-aw2s/etc/gnb.conf"]
|
||||
|
||||
+30
-27
@@ -21,17 +21,15 @@
|
||||
#---------------------------------------------------------------------
|
||||
#
|
||||
# Dockerfile for the Open-Air-Interface BUILD service
|
||||
# Valid for Rocky 8.7
|
||||
# Valid for Rocky 9
|
||||
#
|
||||
#---------------------------------------------------------------------
|
||||
|
||||
ARG BASE_IMAGE=docker.io/rockylinux:8.7
|
||||
ARG BASE_IMAGE=docker.io/rockylinux:9
|
||||
FROM ran-base:latest AS gnb-base
|
||||
|
||||
FROM ran-build:latest AS gnb-build
|
||||
|
||||
RUN python3 ./docker/scripts/generateTemplate.py ./docker/scripts/gnb_parameters.yaml && \
|
||||
cp /oai-ran/docker/scripts/gnb_entrypoint.sh /oai-ran/docker/scripts/entrypoint.sh
|
||||
|
||||
#start from scratch for target executable
|
||||
FROM $BASE_IMAGE as oai-gnb
|
||||
@@ -57,9 +55,8 @@ RUN dnf update -y && \
|
||||
|
||||
WORKDIR /opt/oai-gnb/bin
|
||||
COPY --from=gnb-build \
|
||||
/oai-ran/cmake_targets/ran_build/build/nr-softmodem \
|
||||
/oai-ran/docker/scripts/entrypoint.sh \
|
||||
./
|
||||
/oai-ran/cmake_targets/ran_build/build/nr-softmodem ./
|
||||
COPY ./docker/scripts/gnb_entrypoint.sh ./entrypoint.sh
|
||||
|
||||
COPY --from=gnb-build \
|
||||
/oai-ran/cmake_targets/ran_build/build/liboai_eth_transpro.so \
|
||||
@@ -74,25 +71,26 @@ COPY --from=gnb-build \
|
||||
/usr/local/lib/
|
||||
|
||||
COPY --from=gnb-base \
|
||||
/lib64/libconfig.so.9 \
|
||||
/lib64/libconfig.so.11 \
|
||||
/lib64/libforms.so.2 \
|
||||
/lib64/libblas.so.3 \
|
||||
/lib64/libcblas.so.3 \
|
||||
/lib64/liblapack.so.3 \
|
||||
/lib64/liblapacke.so.3 \
|
||||
/lib64/libboost_chrono.so.1.66.0 \
|
||||
/lib64/libboost_date_time.so.1.66.0 \
|
||||
/lib64/libboost_filesystem.so.1.66.0 \
|
||||
/lib64/libboost_program_options.so.1.66.0 \
|
||||
/lib64/libboost_serialization.so.1.66.0 \
|
||||
/lib64/libboost_thread.so.1.66.0 \
|
||||
/lib64/libboost_system.so.1.66.0 \
|
||||
/lib64/libboost_unit_test_framework.so.1.66.0 \
|
||||
/lib64/libboost_atomic.so.1.66.0 \
|
||||
/lib64/libboost_timer.so.1.66.0 \
|
||||
/lib64/libboost_regex.so.1.66.0 \
|
||||
/lib64/libicudata.so.60 \
|
||||
/lib64/libicui18n.so.60 \
|
||||
/lib64/libicuuc.so.60 \
|
||||
/lib64/libboost_chrono.so.1.75.0 \
|
||||
/lib64/libboost_date_time.so.1.75.0 \
|
||||
/lib64/libboost_filesystem.so.1.75.0 \
|
||||
/lib64/libboost_program_options.so.1.75.0 \
|
||||
/lib64/libboost_serialization.so.1.75.0 \
|
||||
/lib64/libboost_thread.so.1.75.0 \
|
||||
/lib64/libboost_system.so.1.75.0 \
|
||||
/lib64/libboost_unit_test_framework.so.1.75.0 \
|
||||
/lib64/libboost_atomic.so.1.75.0 \
|
||||
/lib64/libboost_timer.so.1.75.0 \
|
||||
/lib64/libboost_regex.so.1.75.0 \
|
||||
/lib64/libicudata.so.67 \
|
||||
/lib64/libicui18n.so.67 \
|
||||
/lib64/libicuuc.so.67 \
|
||||
/lib64/
|
||||
|
||||
# Now we are copying from builder-image the UHD files.
|
||||
@@ -104,11 +102,16 @@ WORKDIR /usr/local/share/uhd/rfnoc
|
||||
COPY --from=gnb-base /usr/local/share/uhd/rfnoc/ .
|
||||
|
||||
RUN /bin/bash -c "ln -s /usr/local/lib/liboai_usrpdevif.so /usr/local/lib/liboai_device.so" && \
|
||||
ldconfig
|
||||
|
||||
# Copy the relevant configuration files for gNB
|
||||
WORKDIR /opt/oai-gnb/etc
|
||||
COPY --from=gnb-build /oai-ran/docker/etc .
|
||||
ldconfig && \
|
||||
echo "ldd on nr-softmodem" && ldd /opt/oai-gnb/bin/nr-softmodem && \
|
||||
echo "ldd on liboai_eth_transpro.so" && ldd /usr/local/lib/liboai_eth_transpro.so && \
|
||||
echo "ldd on librfsimulator.so" && ldd /usr/local/lib/librfsimulator.so && \
|
||||
echo "ldd on liboai_usrpdevif.so" && ldd /usr/local/lib/liboai_usrpdevif.so && \
|
||||
echo "ldd on libcoding.so" && ldd /usr/local/lib/libcoding.so && \
|
||||
echo "ldd on libparams_libconfig.so" && ldd /usr/local/lib/libparams_libconfig.so && \
|
||||
echo "ldd on libdfts.so" && ldd /usr/local/lib/libdfts.so && \
|
||||
echo "ldd on libtelnetsrv.so" && ldd /usr/local/lib/libtelnetsrv.so && \
|
||||
echo "ldd on libtelnetsrv_ci.so" && ldd /usr/local/lib/libtelnetsrv_ci.so
|
||||
|
||||
WORKDIR /opt/oai-gnb
|
||||
#EXPOSE 2152/udp # S1U, GTP/UDP
|
||||
|
||||
@@ -21,18 +21,15 @@
|
||||
#---------------------------------------------------------------------
|
||||
#
|
||||
# Dockerfile for the Open-Air-Interface BUILD service
|
||||
# Valid for Rocky 8.7
|
||||
# Valid for Rocky 9
|
||||
#
|
||||
#---------------------------------------------------------------------
|
||||
|
||||
ARG BASE_IMAGE=docker.io/rockylinux:8.7
|
||||
ARG BASE_IMAGE=docker.io/rockylinux:9
|
||||
FROM ran-base:latest AS lte-ue-base
|
||||
|
||||
FROM ran-build:latest AS lte-ue-build
|
||||
|
||||
RUN python3 ./docker/scripts/generateTemplate.py ./docker/scripts/lte_ue_parameters.yaml && \
|
||||
python3 ./docker/scripts/generateTemplate.py ./docker/scripts/lte_ue_sim_parameters.yaml && \
|
||||
cp /oai-ran/docker/scripts/lte_ue_entrypoint.sh /oai-ran/docker/scripts/entrypoint.sh
|
||||
|
||||
#start from scratch for target executable
|
||||
FROM $BASE_IMAGE as oai-lte-ue
|
||||
@@ -58,12 +55,12 @@ RUN dnf update -y && \
|
||||
WORKDIR /opt/oai-lte-ue/bin
|
||||
COPY --from=lte-ue-build \
|
||||
/oai-ran/cmake_targets/ran_build/build/lte-uesoftmodem \
|
||||
/oai-ran/docker/scripts/entrypoint.sh \
|
||||
/oai-ran/cmake_targets/nas_sim_tools/build/conf2uedata \
|
||||
/oai-ran/cmake_targets/nas_sim_tools/build/nvram \
|
||||
/oai-ran/cmake_targets/nas_sim_tools/build/usim \
|
||||
./
|
||||
|
||||
COPY ./docker/scripts/lte_ue_entrypoint.sh ./entrypoint.sh
|
||||
COPY --from=lte-ue-build \
|
||||
/oai-ran/cmake_targets/ran_build/build/liboai_eth_transpro.so \
|
||||
/oai-ran/cmake_targets/ran_build/build/librfsimulator.so \
|
||||
@@ -75,24 +72,25 @@ COPY --from=lte-ue-build \
|
||||
/usr/local/lib/
|
||||
|
||||
COPY --from=lte-ue-base \
|
||||
/lib64/libconfig.so.9 \
|
||||
/lib64/libconfig.so.11 \
|
||||
/lib64/libblas.so.3 \
|
||||
/lib64/libcblas.so.3 \
|
||||
/lib64/liblapack.so.3 \
|
||||
/lib64/liblapacke.so.3 \
|
||||
/lib64/libboost_chrono.so.1.66.0 \
|
||||
/lib64/libboost_date_time.so.1.66.0 \
|
||||
/lib64/libboost_filesystem.so.1.66.0 \
|
||||
/lib64/libboost_program_options.so.1.66.0 \
|
||||
/lib64/libboost_serialization.so.1.66.0 \
|
||||
/lib64/libboost_thread.so.1.66.0 \
|
||||
/lib64/libboost_system.so.1.66.0 \
|
||||
/lib64/libboost_unit_test_framework.so.1.66.0 \
|
||||
/lib64/libboost_atomic.so.1.66.0 \
|
||||
/lib64/libboost_timer.so.1.66.0 \
|
||||
/lib64/libboost_regex.so.1.66.0 \
|
||||
/lib64/libicudata.so.60 \
|
||||
/lib64/libicui18n.so.60 \
|
||||
/lib64/libicuuc.so.60 \
|
||||
/lib64/libboost_chrono.so.1.75.0 \
|
||||
/lib64/libboost_date_time.so.1.75.0 \
|
||||
/lib64/libboost_filesystem.so.1.75.0 \
|
||||
/lib64/libboost_program_options.so.1.75.0 \
|
||||
/lib64/libboost_serialization.so.1.75.0 \
|
||||
/lib64/libboost_thread.so.1.75.0 \
|
||||
/lib64/libboost_system.so.1.75.0 \
|
||||
/lib64/libboost_unit_test_framework.so.1.75.0 \
|
||||
/lib64/libboost_atomic.so.1.75.0 \
|
||||
/lib64/libboost_timer.so.1.75.0 \
|
||||
/lib64/libboost_regex.so.1.75.0 \
|
||||
/lib64/libicudata.so.67 \
|
||||
/lib64/libicui18n.so.67 \
|
||||
/lib64/libicuuc.so.67 \
|
||||
/lib64/
|
||||
|
||||
# Now we are copying from builder-image the UHD files.
|
||||
@@ -106,17 +104,16 @@ COPY --from=lte-ue-base /usr/local/share/uhd/rfnoc/ .
|
||||
RUN /bin/bash -c "ln -s /usr/local/lib/liboai_usrpdevif.so /usr/local/lib/liboai_device.so" && \
|
||||
ldconfig && \
|
||||
echo "ldd on lte-uesoftmodem" && ldd /opt/oai-lte-ue/bin/lte-uesoftmodem && \
|
||||
echo "ldd on liboai_eth_transpro" && ldd /usr/local/lib/liboai_eth_transpro.so && \
|
||||
echo "ldd on librfsimulator" && ldd /usr/local/lib/librfsimulator.so && \
|
||||
echo "ldd on liboai_usrpdevif" && ldd /usr/local/lib/liboai_usrpdevif.so && \
|
||||
echo "ldd on libcoding" && ldd /usr/local/lib/libcoding.so && \
|
||||
echo "ldd on libparams_libconfig" && ldd /usr/local/lib/libparams_libconfig.so && \
|
||||
echo "ldd on libdfts" && ldd /usr/local/lib/libdfts.so && \
|
||||
echo "ldd on libtelnetsrv" && ldd /usr/local/lib/libtelnetsrv.so
|
||||
|
||||
# Copy the relevant configuration files for UE
|
||||
WORKDIR /opt/oai-lte-ue/etc
|
||||
COPY --from=lte-ue-build /oai-ran/docker/etc .
|
||||
echo "ldd on conf2uedata" && ldd /opt/oai-lte-ue/bin/conf2uedata && \
|
||||
echo "ldd on nvram" && ldd /opt/oai-lte-ue/bin/nvram && \
|
||||
echo "ldd on usim" && ldd /opt/oai-lte-ue/bin/usim && \
|
||||
echo "ldd on liboai_eth_transpro.so" && ldd /usr/local/lib/liboai_eth_transpro.so && \
|
||||
echo "ldd on librfsimulator.so" && ldd /usr/local/lib/librfsimulator.so && \
|
||||
echo "ldd on liboai_usrpdevif.so" && ldd /usr/local/lib/liboai_usrpdevif.so && \
|
||||
echo "ldd on libcoding.so" && ldd /usr/local/lib/libcoding.so && \
|
||||
echo "ldd on libparams_libconfig.so" && ldd /usr/local/lib/libparams_libconfig.so && \
|
||||
echo "ldd on libdfts.so" && ldd /usr/local/lib/libdfts.so && \
|
||||
echo "ldd on libtelnetsrv.so" && ldd /usr/local/lib/libtelnetsrv.so
|
||||
|
||||
WORKDIR /opt/oai-lte-ue
|
||||
CMD ["/opt/oai-lte-ue/bin/lte-uesoftmodem"]
|
||||
|
||||
@@ -21,11 +21,11 @@
|
||||
#---------------------------------------------------------------------
|
||||
#
|
||||
# Dockerfile for the Open-Air-Interface BUILD service
|
||||
# Valid for Rocky 8.7
|
||||
# Valid for Rocky 9
|
||||
#
|
||||
#---------------------------------------------------------------------
|
||||
|
||||
ARG BASE_IMAGE=docker.io/rockylinux:8.7
|
||||
ARG BASE_IMAGE=docker.io/rockylinux:9
|
||||
FROM ran-base:latest AS gnb-base
|
||||
|
||||
FROM ran-build:latest AS gnb-build
|
||||
@@ -36,8 +36,9 @@ RUN cp /oai-ran/docker/scripts/gnb_entrypoint.sh /oai-ran/docker/scripts/entrypo
|
||||
FROM $BASE_IMAGE as oai-nr-cuup
|
||||
ENV TZ=Europe/Paris
|
||||
|
||||
RUN dnf update -y && \
|
||||
dnf install -y \
|
||||
RUN yum repolist --disablerepo=* && \
|
||||
yum update -y && \
|
||||
yum install -y \
|
||||
procps-ng \
|
||||
lksctp-tools \
|
||||
tzdata \
|
||||
@@ -59,8 +60,9 @@ COPY --from=gnb-build \
|
||||
/usr/local/lib/
|
||||
|
||||
COPY --from=gnb-base \
|
||||
/lib64/libconfig.so.9 \
|
||||
/lib64/libconfig.so.11 \
|
||||
/lib64/libblas.so.3 \
|
||||
/lib64/libcblas.so.3 \
|
||||
/lib64/liblapack.so.3 \
|
||||
/lib64/liblapacke.so.3 \
|
||||
/lib64/
|
||||
|
||||
@@ -21,17 +21,15 @@
|
||||
#---------------------------------------------------------------------
|
||||
#
|
||||
# Dockerfile for the Open-Air-Interface BUILD service
|
||||
# Valid for Rocky 8.7
|
||||
# Valid for Rocky 9
|
||||
#
|
||||
#---------------------------------------------------------------------
|
||||
|
||||
ARG BASE_IMAGE=docker.io/rockylinux:8.7
|
||||
ARG BASE_IMAGE=docker.io/rockylinux:9
|
||||
FROM ran-base:latest AS nr-ue-base
|
||||
|
||||
FROM ran-build:latest AS nr-ue-build
|
||||
|
||||
RUN python3 ./docker/scripts/generateTemplate.py ./docker/scripts/nr_ue_parameters.yaml && \
|
||||
cp /oai-ran/docker/scripts/nr_ue_entrypoint.sh /oai-ran/docker/scripts/entrypoint.sh
|
||||
|
||||
#start from scratch for target executable
|
||||
FROM $BASE_IMAGE as oai-nr-ue
|
||||
@@ -59,9 +57,8 @@ RUN dnf update -y && \
|
||||
WORKDIR /opt/oai-nr-ue/bin
|
||||
COPY --from=nr-ue-build \
|
||||
/oai-ran/cmake_targets/ran_build/build/nr-uesoftmodem \
|
||||
/oai-ran/docker/scripts/entrypoint.sh \
|
||||
./
|
||||
|
||||
COPY ./docker/scripts/nr_ue_entrypoint.sh ./entrypoint.sh
|
||||
WORKDIR /opt/oai-nr-ue/etc
|
||||
|
||||
COPY --from=nr-ue-build \
|
||||
@@ -77,25 +74,26 @@ COPY --from=nr-ue-build \
|
||||
/usr/local/lib/
|
||||
|
||||
COPY --from=nr-ue-base \
|
||||
/lib64/libconfig.so.9 \
|
||||
/lib64/libconfig.so.11 \
|
||||
/lib64/libblas.so.3 \
|
||||
/lib64/libcblas.so.3 \
|
||||
/lib64/liblapack.so.3 \
|
||||
/lib64/liblapacke.so.3 \
|
||||
/lib64/libforms.so.2 \
|
||||
/lib64/libboost_chrono.so.1.66.0 \
|
||||
/lib64/libboost_date_time.so.1.66.0 \
|
||||
/lib64/libboost_filesystem.so.1.66.0 \
|
||||
/lib64/libboost_program_options.so.1.66.0 \
|
||||
/lib64/libboost_serialization.so.1.66.0 \
|
||||
/lib64/libboost_thread.so.1.66.0 \
|
||||
/lib64/libboost_system.so.1.66.0 \
|
||||
/lib64/libboost_unit_test_framework.so.1.66.0 \
|
||||
/lib64/libboost_atomic.so.1.66.0 \
|
||||
/lib64/libboost_timer.so.1.66.0 \
|
||||
/lib64/libboost_regex.so.1.66.0 \
|
||||
/lib64/libicudata.so.60 \
|
||||
/lib64/libicui18n.so.60 \
|
||||
/lib64/libicuuc.so.60 \
|
||||
/lib64/libboost_chrono.so.1.75.0 \
|
||||
/lib64/libboost_date_time.so.1.75.0 \
|
||||
/lib64/libboost_filesystem.so.1.75.0 \
|
||||
/lib64/libboost_program_options.so.1.75.0 \
|
||||
/lib64/libboost_serialization.so.1.75.0 \
|
||||
/lib64/libboost_thread.so.1.75.0 \
|
||||
/lib64/libboost_system.so.1.75.0 \
|
||||
/lib64/libboost_unit_test_framework.so.1.75.0 \
|
||||
/lib64/libboost_atomic.so.1.75.0 \
|
||||
/lib64/libboost_timer.so.1.75.0 \
|
||||
/lib64/libboost_regex.so.1.75.0 \
|
||||
/lib64/libicudata.so.67 \
|
||||
/lib64/libicui18n.so.67 \
|
||||
/lib64/libicuuc.so.67 \
|
||||
/lib64/
|
||||
|
||||
# Now we are copying from builder-image the UHD files.
|
||||
@@ -107,11 +105,16 @@ WORKDIR /usr/local/share/uhd/rfnoc
|
||||
COPY --from=nr-ue-base /usr/local/share/uhd/rfnoc/ .
|
||||
|
||||
RUN /bin/bash -c "ln -s /usr/local/lib/liboai_usrpdevif.so /usr/local/lib/liboai_device.so" && \
|
||||
ldconfig
|
||||
|
||||
# Copy the relevant configuration files for eNB
|
||||
WORKDIR /opt/oai-nr-ue/etc
|
||||
COPY --from=nr-ue-build /oai-ran/ci-scripts/conf_files/ue.* .
|
||||
ldconfig && \
|
||||
echo "ldd on nr-uesoftmodem" && ldd /opt/oai-nr-ue/bin/nr-uesoftmodem && \
|
||||
echo "ldd on liboai_eth_transpro.so" && ldd /usr/local/lib/liboai_eth_transpro.so && \
|
||||
echo "ldd on librfsimulator.so" && ldd /usr/local/lib/librfsimulator.so && \
|
||||
echo "ldd on liboai_usrpdevif.so" && ldd /usr/local/lib/liboai_usrpdevif.so && \
|
||||
echo "ldd on libcoding.so" && ldd /usr/local/lib/libcoding.so && \
|
||||
echo "ldd on libparams_libconfig.so" && ldd /usr/local/lib/libparams_libconfig.so && \
|
||||
echo "ldd on libdfts.so" && ldd /usr/local/lib/libdfts.so && \
|
||||
echo "ldd on libtelnetsrv.so" && ldd /usr/local/lib/libtelnetsrv.so && \
|
||||
echo "ldd on libtelnetsrv_5Gue.so" && ldd /usr/local/lib/libtelnetsrv_5Gue.so
|
||||
|
||||
WORKDIR /opt/oai-nr-ue
|
||||
CMD ["/opt/oai-nr-ue/bin/nr-uesoftmodem", "-O", "/opt/oai-nr-ue/etc/nr-ue.conf"]
|
||||
|
||||
@@ -39,6 +39,42 @@ int asn1_xer_print;
|
||||
int oai_exit = 0;
|
||||
instance_t CUuniqInstance = 0;
|
||||
|
||||
#ifdef E2_AGENT
|
||||
#include "openair2/E2AP/flexric/src/agent/e2_agent_api.h"
|
||||
#include "openair2/E2AP/RAN_FUNCTION/init_ran_func.h"
|
||||
|
||||
static void initialize_agent(ngran_node_t node_type, e2_agent_args_t oai_args)
|
||||
{
|
||||
AssertFatal(oai_args.sm_dir != NULL , "Please, specify the directory where the SMs are located in the config file, i.e., add in config file the next line: e2_agent = {near_ric_ip_addr = \"127.0.0.1\"; sm_dir = \"/usr/local/lib/flexric/\");} ");
|
||||
AssertFatal(oai_args.ip != NULL , "Please, specify the IP address of the nearRT-RIC in the config file, i.e., e2_agent = {near_ric_ip_addr = \"127.0.0.1\"; sm_dir = \"/usr/local/lib/flexric/\"");
|
||||
|
||||
printf("After RCconfig_NR_E2agent %s %s \n",oai_args.sm_dir, oai_args.ip );
|
||||
|
||||
fr_args_t args = { .ip = oai_args.ip }; // init_fr_args(0, NULL);
|
||||
memcpy(args.libs_dir, oai_args.sm_dir, 128);
|
||||
|
||||
sleep(1);
|
||||
|
||||
// Only 1 instances is supported in one executable
|
||||
// Advice: run multiple executables to have multiple instances
|
||||
const e1ap_upcp_inst_t *e1inst = getCxtE1(CUuniqInstance);
|
||||
|
||||
const int nb_id = e1inst->gnb_id;
|
||||
const int cu_up_id = e1inst->cuup.setupReq.gNB_cu_up_id;
|
||||
const int mcc = e1inst->cuup.setupReq.plmn[0].id.mcc;
|
||||
const int mnc = e1inst->cuup.setupReq.plmn[0].id.mnc;
|
||||
const int mnc_digit_len = e1inst->cuup.setupReq.plmn[0].id.mnc_digit_length;
|
||||
|
||||
printf("[E2 NODE]: mcc = %d mnc = %d mnc_digit = %d nb_id = %d \n", mcc, mnc, mnc_digit_len, nb_id);
|
||||
|
||||
printf("[E2 NODE]: Args %s %s \n", args.ip, args.libs_dir);
|
||||
|
||||
sm_io_ag_ran_t io = init_ran_func_ag();
|
||||
init_agent_api(mcc, mnc, mnc_digit_len, nb_id, cu_up_id, node_type, io, &args);
|
||||
}
|
||||
#endif // E2_AGENT
|
||||
|
||||
|
||||
void exit_function(const char *file, const char *function, const int line, const char *s, const int assert)
|
||||
{
|
||||
if (assert) {
|
||||
@@ -135,6 +171,22 @@ int main(int argc, char **argv)
|
||||
AssertFatal(msg != NULL, "Send init to task for E1AP UP failed\n");
|
||||
itti_send_msg_to_task(TASK_CUUP_E1, 0, msg);
|
||||
|
||||
#ifdef E2_AGENT
|
||||
//////////////////////////////////
|
||||
//////////////////////////////////
|
||||
//// Init the E2 Agent
|
||||
|
||||
// OAI Wrapper
|
||||
e2_agent_args_t oai_args = RCconfig_NR_E2agent();
|
||||
|
||||
if (oai_args.enabled) {
|
||||
const ngran_node_t node_type = get_node_type();
|
||||
assert(node_type == ngran_gNB_CUUP);
|
||||
initialize_agent(node_type, oai_args);
|
||||
}
|
||||
|
||||
#endif // E2_AGENT
|
||||
|
||||
printf("TYPE <CTRL-C> TO TERMINATE\n");
|
||||
itti_wait_tasks_end(NULL);
|
||||
|
||||
|
||||
@@ -600,7 +600,7 @@ static void initialize_agent(ngran_node_t node_type, e2_agent_args_t oai_args)
|
||||
AssertFatal(mac != NULL, "MAC not initialized\n");
|
||||
cu_du_id = mac->f1_config.gnb_id;
|
||||
nb_id = mac->f1_config.setup_req->gNB_DU_id;
|
||||
} else if (node_type == ngran_gNB_CU) {
|
||||
} else if (node_type == ngran_gNB_CU || node_type == ngran_gNB_CUCP) {
|
||||
// agent buggy: the CU has no second ID, it is the CU-UP ID
|
||||
// however, that is not a problem her for us, so put the same ID twice
|
||||
nb_id = rrc->node_id;
|
||||
|
||||
+11
-11
@@ -981,18 +981,18 @@ void *UE_thread(void *arg)
|
||||
|
||||
void init_NR_UE(int nb_inst, char *uecap_file, char *reconfig_file, char *rbconfig_file)
|
||||
{
|
||||
NR_UE_MAC_INST_t *mac_inst;
|
||||
NR_UE_RRC_INST_t* rrc_inst;
|
||||
|
||||
for (int inst = 0; inst < nb_inst; inst++) {
|
||||
AssertFatal((rrc_inst = nr_l3_init_ue(uecap_file)) != NULL, "can not initialize RRC module\n");
|
||||
AssertFatal((mac_inst = nr_l2_init_ue()) != NULL, "can not initialize L2 module\n");
|
||||
AssertFatal((mac_inst->if_module = nr_ue_if_module_init(inst)) != NULL, "can not initialize IF module\n");
|
||||
NR_UE_RRC_INST_t *rrc_inst = nr_rrc_init_ue(uecap_file, nb_inst);
|
||||
NR_UE_MAC_INST_t *mac_inst = nr_l2_init_ue(nb_inst);
|
||||
AssertFatal(mac_inst, "Couldn't allocate MAC module\n");
|
||||
|
||||
for (int i = 0; i < nb_inst; i++) {
|
||||
NR_UE_MAC_INST_t *mac = get_mac_inst(i);
|
||||
AssertFatal((mac->if_module = nr_ue_if_module_init(i)) != NULL, "can not initialize IF module\n");
|
||||
if (!get_softmodem_params()->sa) {
|
||||
init_nsa_message(rrc_inst, reconfig_file, rbconfig_file);
|
||||
init_nsa_message(&rrc_inst[i], reconfig_file, rbconfig_file);
|
||||
// TODO why do we need noS1 configuration?
|
||||
// temporarily moved here to understand why not using the one provided by gNB
|
||||
nr_rlc_activate_srb0(mac_inst->crnti, NULL, send_srb0_rrc);
|
||||
nr_rlc_activate_srb0(i, NULL, send_srb0_rrc);
|
||||
if (IS_SOFTMODEM_NOS1) {
|
||||
// get default noS1 configuration
|
||||
NR_RadioBearerConfig_t *rbconfig = NULL;
|
||||
@@ -1001,8 +1001,8 @@ void init_NR_UE(int nb_inst, char *uecap_file, char *reconfig_file, char *rbconf
|
||||
|
||||
// set up PDCP, RLC, MAC
|
||||
nr_pdcp_layer_init(false);
|
||||
nr_pdcp_add_drbs(ENB_FLAG_NO, mac_inst->crnti, rbconfig->drb_ToAddModList, 0, NULL, NULL);
|
||||
nr_rlc_add_drb(mac_inst->crnti, rbconfig->drb_ToAddModList->list.array[0]->drb_Identity, rlc_rbconfig);
|
||||
nr_pdcp_add_drbs(ENB_FLAG_NO, i, rbconfig->drb_ToAddModList, 0, NULL, NULL);
|
||||
nr_rlc_add_drb(i, rbconfig->drb_ToAddModList->list.array[0]->drb_Identity, rlc_rbconfig);
|
||||
struct NR_CellGroupConfig__rlc_BearerToAddModList rlc_toadd_list;
|
||||
rlc_toadd_list.list.count = 1;
|
||||
rlc_toadd_list.list.array = calloc(1, sizeof(NR_RLC_BearerConfig_t));
|
||||
|
||||
@@ -454,7 +454,8 @@ configmodule_interface_t *uniqCfg = NULL;
|
||||
// A global var to reduce the changes size
|
||||
ldpc_interface_t ldpc_interface = {0}, ldpc_interface_offload = {0};
|
||||
|
||||
int main( int argc, char **argv ) {
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
int set_exe_prio = 1;
|
||||
if (checkIfFedoraDistribution())
|
||||
if (checkIfGenericKernelOnFedora())
|
||||
@@ -509,7 +510,7 @@ int main( int argc, char **argv ) {
|
||||
memset(PHY_vars_UE_g[0][CC_id], 0, sizeof(*PHY_vars_UE_g[0][CC_id]));
|
||||
}
|
||||
|
||||
init_NR_UE(1, uecap_file, reconfig_file, rbconfig_file);
|
||||
init_NR_UE(NB_UE_INST, uecap_file, reconfig_file, rbconfig_file);
|
||||
|
||||
int mode_offset = get_softmodem_params()->nsa ? NUMBER_OF_UE_MAX : 1;
|
||||
uint16_t node_number = get_softmodem_params()->node_number;
|
||||
|
||||
@@ -74,17 +74,17 @@ typedef enum {
|
||||
NFAPI_NR_PHY_MSG_TYPE_RACH_INDICATION= 0X89,
|
||||
//RESERVED 0X8a ~ 0xff
|
||||
NFAPI_NR_PHY_MSG_TYPE_PNF_PARAM_REQUEST = 0x0100,
|
||||
NFAPI_NR_PHY_MSG_TYPE_PNF_PARAM_RESPONSE = 0x0101,
|
||||
NFAPI_NR_PHY_MSG_TYPE_PNF_CONFIG_REQUEST= 0x0102,
|
||||
NFAPI_NR_PHY_MSG_TYPE_PNF_CONFIG_RESPONSE= 0x0103,
|
||||
NFAPI_NR_PHY_MSG_TYPE_PNF_START_REQUEST= 0x0104,
|
||||
NFAPI_NR_PHY_MSG_TYPE_PNF_START_RESPONSE= 0x0105,
|
||||
NFAPI_NR_PHY_MSG_TYPE_PNF_STOP_REQUEST= 0x0106,
|
||||
NFAPI_NR_PHY_MSG_TYPE_PNF_STOP_RESPONSE= 0x0107,
|
||||
NFAPI_NR_PHY_MSG_TYPE_PNF_PARAM_RESPONSE = 0x0101,
|
||||
NFAPI_NR_PHY_MSG_TYPE_PNF_CONFIG_REQUEST= 0x0102,
|
||||
NFAPI_NR_PHY_MSG_TYPE_PNF_CONFIG_RESPONSE= 0x0103,
|
||||
NFAPI_NR_PHY_MSG_TYPE_PNF_START_REQUEST= 0x0104,
|
||||
NFAPI_NR_PHY_MSG_TYPE_PNF_START_RESPONSE= 0x0105,
|
||||
NFAPI_NR_PHY_MSG_TYPE_PNF_STOP_REQUEST= 0x0106,
|
||||
NFAPI_NR_PHY_MSG_TYPE_PNF_STOP_RESPONSE= 0x0107,
|
||||
|
||||
NFAPI_NR_PHY_MSG_TYPE_UL_NODE_SYNC = 0x0180,
|
||||
NFAPI_NR_PHY_MSG_TYPE_DL_NODE_SYNC,
|
||||
NFAPI_NR_PHY_MSG_TYPE_TIMING_INFO
|
||||
NFAPI_NR_PHY_MSG_TYPE_DL_NODE_SYNC,
|
||||
NFAPI_NR_PHY_MSG_TYPE_TIMING_INFO
|
||||
} nfapi_nr_phy_msg_type_e;
|
||||
|
||||
// SCF222_5G-FAPI_PHY_SPI_Specificayion.pdf Section 3.3
|
||||
@@ -449,6 +449,26 @@ typedef struct
|
||||
|
||||
} nfapi_nr_measurement_config_t;
|
||||
|
||||
// Table 3–62 Precoding matrix (PM) PDU (v.222.10.04)
|
||||
typedef struct {
|
||||
int16_t precoder_weight_Re;
|
||||
int16_t precoder_weight_Im;
|
||||
} nfapi_nr_pm_weights_t;
|
||||
|
||||
|
||||
typedef struct {
|
||||
uint16_t pm_idx;
|
||||
uint16_t numLayers;
|
||||
uint16_t num_ant_ports;
|
||||
nfapi_nr_pm_weights_t weights[4][4]; // TODO temporary hardcoding
|
||||
} nfapi_nr_pm_pdu_t;
|
||||
|
||||
|
||||
typedef struct {
|
||||
uint16_t num_pm_idx;
|
||||
nfapi_nr_pm_pdu_t *pmi_pdu;
|
||||
} nfapi_nr_pm_list_t;
|
||||
|
||||
// ERROR enums
|
||||
typedef enum { // Table 2-22
|
||||
NFAPI_NR_PARAM_MSG_OK = 0,
|
||||
@@ -560,6 +580,7 @@ typedef struct {
|
||||
nfapi_nr_tdd_table_t tdd_table;
|
||||
nfapi_nr_measurement_config_t measurement_config;
|
||||
nfapi_nr_nfapi_t nfapi_config;
|
||||
nfapi_nr_pm_list_t pmi_list;
|
||||
} nfapi_nr_config_request_scf_t;
|
||||
|
||||
|
||||
@@ -592,24 +613,24 @@ typedef struct {
|
||||
//3.3.4 STOP
|
||||
|
||||
typedef struct {
|
||||
nfapi_p4_p5_message_header_t header;
|
||||
nfapi_vendor_extension_tlv_t vendor_extension;
|
||||
nfapi_p4_p5_message_header_t header;
|
||||
nfapi_vendor_extension_tlv_t vendor_extension;
|
||||
} nfapi_nr_stop_request_t;
|
||||
|
||||
|
||||
typedef struct {
|
||||
nfapi_p4_p5_message_header_t header;
|
||||
nfapi_vendor_extension_tlv_t vendor_extension;
|
||||
nfapi_p4_p5_message_header_t header;
|
||||
nfapi_vendor_extension_tlv_t vendor_extension;
|
||||
} nfapi_nr_stop_indication_t;
|
||||
|
||||
typedef enum {
|
||||
NFAPI_NR_STOP_MSG_INVALID_STATE
|
||||
NFAPI_NR_STOP_MSG_INVALID_STATE
|
||||
} nfapi_nr_stop_errors_e;
|
||||
|
||||
//3.3.5 PHY Notifications
|
||||
typedef enum {
|
||||
NFAPI_NR_PHY_API_MSG_OK =0x0,
|
||||
NFAPI_NR_PHY_API_MSG_INVALID_STATE =0x1,
|
||||
NFAPI_NR_PHY_API_MSG_INVALID_STATE =0x1,
|
||||
NFAPI_NR_PHY_API_MSG_INVALID_CONFIG =0x2,
|
||||
NFAPI_NR_PHY_API_SFN_OUT_OF_SYNC =0X3,
|
||||
NFAPI_NR_PHY_API_MSG_SLOR_ERR =0X4,
|
||||
@@ -620,7 +641,7 @@ typedef enum {
|
||||
} nfapi_nr_phy_notifications_errors_e;
|
||||
|
||||
typedef struct {
|
||||
uint16_t sfn; //0~1023
|
||||
uint16_t sfn; //0~1023
|
||||
uint16_t slot;//0~319
|
||||
nfapi_nr_phy_msg_type_e msg_id;//Indicate which message received by the PHY has an error. Values taken from Table 3-4.
|
||||
nfapi_nr_phy_notifications_errors_e error_code;
|
||||
@@ -632,42 +653,22 @@ typedef struct {
|
||||
//table 3-32
|
||||
//?
|
||||
typedef struct {
|
||||
uint16_t beam_idx; //0~65535
|
||||
uint16_t beam_idx; //0~65535
|
||||
} nfapi_nr_dig_beam_t;
|
||||
|
||||
typedef struct {
|
||||
uint16_t dig_beam_weight_Re;
|
||||
uint16_t dig_beam_weight_Re;
|
||||
uint16_t dig_beam_weight_Im;
|
||||
} nfapi_nr_txru_t;
|
||||
|
||||
typedef struct {
|
||||
uint16_t num_dig_beams; //0~65535
|
||||
uint16_t num_dig_beams; //0~65535
|
||||
uint16_t num_txrus; //0~65535
|
||||
nfapi_nr_dig_beam_t* dig_beam_list;
|
||||
nfapi_nr_txru_t* txru_list;
|
||||
} nfapi_nr_dbt_pdu_t;
|
||||
|
||||
|
||||
//table 3-33
|
||||
//?
|
||||
typedef struct {
|
||||
uint16_t num_ant_ports;
|
||||
int16_t precoder_weight_Re;
|
||||
int16_t precoder_weight_Im;
|
||||
} nfapi_nr_num_ant_ports_t;
|
||||
|
||||
typedef struct {
|
||||
uint16_t numLayers; //0~65535
|
||||
nfapi_nr_num_ant_ports_t* num_ant_ports_list;
|
||||
} nfapi_nr_num_layers_t;
|
||||
|
||||
typedef struct {
|
||||
uint16_t pm_idx; //0~65535
|
||||
nfapi_nr_num_layers_t* num_layers_list; //0~65535
|
||||
//nfapi_nr_num_ant_ports_t* num_ant_ports_list;
|
||||
} nfapi_nr_pm_pdu_t;
|
||||
|
||||
|
||||
// Section 3.4
|
||||
|
||||
// Section 3.4.1 slot indication
|
||||
@@ -678,7 +679,7 @@ typedef struct {
|
||||
|
||||
typedef struct {
|
||||
nfapi_p7_message_header_t header;
|
||||
uint16_t sfn; //0->1023
|
||||
uint16_t sfn; //0->1023
|
||||
uint16_t slot;//0->319
|
||||
|
||||
} nfapi_nr_slot_indication_scf_t;
|
||||
@@ -1441,7 +1442,7 @@ typedef struct {
|
||||
|
||||
//3.4.5 slot_errors
|
||||
typedef enum {
|
||||
NFAPI_NR_SLOT_UL_TTI_MSG_INVALID_STATE,
|
||||
NFAPI_NR_SLOT_UL_TTI_MSG_INVALID_STATE,
|
||||
NFAPI_NR_SLOT_UL_TTI_SFN_OUT_OF_SYNC,
|
||||
NFAPI_NR_SLOT_UL_TTI_MSG_BCH_MISSING,
|
||||
NFAPI_NR_SLOT_UL_TTI_MSG_SLOT_ERR
|
||||
@@ -1449,14 +1450,14 @@ typedef enum {
|
||||
} nfapi_nr_slot_errors_ul_tti_e;
|
||||
|
||||
typedef enum {
|
||||
NFAPI_NR_SLOT_DL_TTI_MSG_INVALID_STATE,
|
||||
NFAPI_NR_SLOT_DL_TTI_MSG_INVALID_STATE,
|
||||
NFAPI_NR_SLOT_DL_TTI_MSG_SLOT_ERR
|
||||
|
||||
} nfapi_nr_slot_errors_dl_tti_e;
|
||||
|
||||
|
||||
typedef enum {
|
||||
NFAPI_NR_SLOT_UL_DCI_MSG_INVALID_STATE,
|
||||
NFAPI_NR_SLOT_UL_DCI_MSG_INVALID_STATE,
|
||||
NFAPI_NR_SLOT_UL_DCI_MSG_INVALID_SFN,
|
||||
NFAPI_NR_SLOT_UL_DCI_MSG_UL_DCI_ERR
|
||||
|
||||
|
||||
+3
-415
@@ -99,408 +99,6 @@ void reset_active_stats(PHY_VARS_gNB *gNB, int frame)
|
||||
}
|
||||
}
|
||||
|
||||
int init_codebook_gNB(PHY_VARS_gNB *gNB) {
|
||||
|
||||
if(gNB->frame_parms.nb_antennas_tx>1){
|
||||
int CSI_RS_antenna_ports = gNB->frame_parms.nb_antennas_tx;
|
||||
//NR Codebook Generation for codebook type1 SinglePanel
|
||||
int N1 = gNB->ap_N1;
|
||||
int N2 = gNB->ap_N2;
|
||||
//Uniform Planner Array: UPA
|
||||
// X X X X ... X
|
||||
// X X X X ... X
|
||||
// N2 . . . . ... .
|
||||
// X X X X ... X
|
||||
// |<-----N1---->|
|
||||
int x_polarization = gNB->ap_XP;
|
||||
//Get the uniform planar array parameters
|
||||
// To be confirmed
|
||||
int O2 = N2 > 1? 4 : 1; //Vertical beam oversampling (1 or 4)
|
||||
int O1 = CSI_RS_antenna_ports > 2 ? 4 : 1; //Horizontal beam oversampling (1 or 4)
|
||||
AssertFatal(CSI_RS_antenna_ports == N1*N2*x_polarization,
|
||||
"Nb of antenna ports at PHY %d does not correspond to what passed down with fapi %d\n",
|
||||
N1*N2*x_polarization, CSI_RS_antenna_ports);
|
||||
|
||||
// Generation of codebook Type1 with codebookMode 1 (CSI_RS_antenna_ports < 16)
|
||||
if (CSI_RS_antenna_ports < 16) {
|
||||
//Generate DFT vertical beams
|
||||
//ll: index of a vertical beams vector (represented by i1_1 in TS 38.214)
|
||||
double complex v[N1*O1][N1];
|
||||
for (int ll=0; ll<N1*O1; ll++) { //i1_1
|
||||
for (int nn=0; nn<N1; nn++) {
|
||||
v[ll][nn] = cexp(I*(2*M_PI*nn*ll)/(N1*O1));
|
||||
//printf("v[%d][%d] = %f +j %f\n", ll,nn, creal(v[ll][nn]),cimag(v[ll][nn]));
|
||||
}
|
||||
}
|
||||
//Generate DFT Horizontal beams
|
||||
//mm: index of a Horizontal beams vector (represented by i1_2 in TS 38.214)
|
||||
double complex u[N2*O2][N2];
|
||||
for (int mm=0; mm<N2*O2; mm++) { //i1_2
|
||||
for (int nn=0; nn<N2; nn++) {
|
||||
u[mm][nn] = cexp(I*(2*M_PI*nn*mm)/(N2*O2));
|
||||
//printf("u[%d][%d] = %f +j %f\n", mm,nn, creal(u[mm][nn]),cimag(u[mm][nn]));
|
||||
}
|
||||
}
|
||||
//Generate co-phasing angles
|
||||
//i_2: index of a co-phasing vector
|
||||
//i1_1, i1_2, and i_2 are reported from UEs
|
||||
double complex theta_n[4];
|
||||
for (int nn=0; nn<4; nn++) {
|
||||
theta_n[nn] = cexp(I*M_PI*nn/2);
|
||||
//printf("theta_n[%d] = %f +j %f\n", nn, creal(theta_n[nn]),cimag(theta_n[nn]));
|
||||
}
|
||||
//Kronecker product v_lm
|
||||
double complex v_lm[N1*O1][N2*O2][N2*N1];
|
||||
//v_ll_mm_codebook denotes the elements of a precoding matrix W_i1,1_i_1,2
|
||||
for(int ll=0; ll<N1*O1; ll++) { //i_1_1
|
||||
for (int mm=0; mm<N2*O2; mm++) { //i_1_2
|
||||
for (int nn1=0; nn1<N1; nn1++) {
|
||||
for (int nn2=0; nn2<N2; nn2++) {
|
||||
//printf("indx %d \n",nn1*N2+nn2);
|
||||
v_lm[ll][mm][nn1*N2+nn2] = v[ll][nn1]*u[mm][nn2];
|
||||
//printf("v_lm[%d][%d][%d] = %f +j %f\n",ll,mm, nn1*N2+nn2, creal(v_lm[ll][mm][nn1*N2+nn2]),cimag(v_lm[ll][mm][nn1*N2+nn2]));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
int max_mimo_layers = (CSI_RS_antenna_ports<NR_MAX_NB_LAYERS) ? CSI_RS_antenna_ports : NR_MAX_NB_LAYERS;
|
||||
|
||||
gNB->nr_mimo_precoding_matrix = (int32_t ***)malloc16(max_mimo_layers * sizeof(int32_t **));
|
||||
int32_t ***mat = gNB->nr_mimo_precoding_matrix;
|
||||
double complex res_code;
|
||||
|
||||
//Table 5.2.2.2.1-5:
|
||||
//Codebook for 1-layer CSI reporting using antenna ports 3000 to 2999+PCSI-RS
|
||||
gNB->pmiq_size[0] = N1*O1*N2*O2*4+1;
|
||||
mat[0] = (int32_t **)malloc16(gNB->pmiq_size[0]*sizeof(int32_t *));
|
||||
|
||||
//pmi=0 corresponds to unit matrix
|
||||
mat[0][0] = (int32_t *)calloc(2*N1*N2,sizeof(int32_t));
|
||||
for(int j_col=0; j_col<1; j_col++) { //1 layer
|
||||
for (int i_rows=0; i_rows<2*N1*N2; i_rows++) { //2-x polarized antenna
|
||||
if(j_col==i_rows) {
|
||||
mat[0][0][i_rows+j_col] = 0x7fff;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for(int ll=0; ll<N1*O1; ll++) { //i_1_1
|
||||
for (int mm=0; mm<N2*O2; mm++) { //i_1_2
|
||||
for (int nn=0; nn<4; nn++) {
|
||||
int pmiq = 1+ll*N2*O2*4+mm*4+nn;
|
||||
mat[0][pmiq] = (int32_t *)malloc16((2*N1*N2)*1*sizeof(int32_t));
|
||||
LOG_D(PHY, "layer 1 Codebook pmiq = %d\n",pmiq);
|
||||
for (int len=0; len<N1*N2; len++) {
|
||||
res_code=sqrt(1/(double)CSI_RS_antenna_ports)*v_lm[ll][mm][len];
|
||||
if (creal(res_code)>0)
|
||||
((short*) &mat[0][pmiq][len])[0] = (short) ((creal(res_code)*32768)+0.5);//convert to Q15
|
||||
else
|
||||
((short*) &mat[0][pmiq][len])[0] = (short) ((creal(res_code)*32768)-0.5);//convert to Q15
|
||||
if (cimag(res_code)>0)
|
||||
((short*) &mat[0][pmiq][len])[1] = (short) ((cimag(res_code)*32768)+0.5);//convert to Q15
|
||||
else
|
||||
((short*) &mat[0][pmiq][len])[1] = (short) ((cimag(res_code)*32768)-0.5);//convert to Q15
|
||||
LOG_D(PHY, "1 Layer Precoding Matrix[0][pmi %d][antPort %d]= %f+j %f -> Fixed Point %d+j %d \n",
|
||||
pmiq, len, creal(res_code), cimag(res_code),((short*) &mat[0][pmiq][len])[0],((short*) &mat[0][pmiq][len])[1]);
|
||||
}
|
||||
|
||||
for(int len=N1*N2; len<2*N1*N2; len++) {
|
||||
res_code=sqrt(1/(double)CSI_RS_antenna_ports)*theta_n[nn]*v_lm[ll][mm][len-N1*N2];
|
||||
if (creal(res_code)>0)
|
||||
((short*) &mat[0][pmiq][len])[0] = (short) ((creal(res_code)*32768)+0.5);//convert to Q15
|
||||
else
|
||||
((short*) &mat[0][pmiq][len])[0] = (short) ((creal(res_code)*32768)-0.5);//convert to Q15
|
||||
if (cimag(res_code)>0)
|
||||
((short*) &mat[0][pmiq][len])[1] = (short) ((cimag(res_code)*32768)+0.5);//convert to Q15
|
||||
else
|
||||
((short*) &mat[0][pmiq][len])[1] = (short) ((cimag(res_code)*32768)-0.5);//convert to Q15
|
||||
LOG_D(PHY, "1 Layer Precoding Matrix[0][pmi %d][antPort %d]= %f+j %f -> Fixed Point %d+j %d \n",
|
||||
pmiq, len, creal(res_code), cimag(res_code),((short*) &mat[0][pmiq][len])[0],((short*) &mat[0][pmiq][len])[1]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
int llc = 0;
|
||||
int mmc = 0;
|
||||
double complex phase_sign = 0;
|
||||
//Table 5.2.2.2.1-6:
|
||||
//Codebook for 2-layer CSI reporting using antenna ports 3000 to 2999+PCSI-RS
|
||||
//Compute the code book size for generating 2 layers out of Tx antenna ports
|
||||
|
||||
//pmi_size is computed as follows
|
||||
gNB->pmiq_size[1] = 1;//1 for unity matrix
|
||||
for(int llb=0; llb<N1*O1; llb++) { //i_1_1
|
||||
for (int mmb=0; mmb<N2*O2; mmb++) { //i_1_2
|
||||
for(int ll=0; ll<N1*O1; ll++) { //i_1_1
|
||||
for (int mm=0; mm<N2*O2; mm++) { //i_1_2
|
||||
for (int nn=0; nn<2; nn++) {
|
||||
if((llb != ll) || (mmb != mm) || ((N1 == 1) && (N2 == 1))) gNB->pmiq_size[1] += 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
mat[1] = (int32_t **)malloc16(gNB->pmiq_size[1]*sizeof(int32_t *));
|
||||
|
||||
//pmi=0 corresponds to unit matrix
|
||||
mat[1][0] = (int32_t *)calloc((2*N1*N2)*(2),sizeof(int32_t));
|
||||
for(int j_col=0; j_col<2; j_col++) { //2 layers
|
||||
for (int i_rows=0; i_rows<2*N1*N2; i_rows++) { //2-x polarized antenna
|
||||
if(j_col==i_rows) {
|
||||
mat[1][0][i_rows*2+j_col] = 0x7fff;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//pmi=1,...,pmi_size, we construct
|
||||
int pmiq = 0;
|
||||
for(int llb=0; llb<N1*O1; llb++) { //i_1_1
|
||||
for (int mmb=0; mmb<N2*O2; mmb++) { //i_1_2
|
||||
for(int ll=0; ll<N1*O1; ll++) { //i_1_1
|
||||
for (int mm=0; mm<N2*O2; mm++) { //i_1_2
|
||||
for (int nn=0; nn<2; nn++) {
|
||||
if((llb != ll) || (mmb != mm) || ((N1 == 1) && (N2 == 1))){
|
||||
pmiq += 1;
|
||||
mat[1][pmiq] = (int32_t *)malloc16((2*N1*N2)*(2)*sizeof(int32_t));
|
||||
LOG_D(PHY, "layer 2 Codebook pmiq = %d\n",pmiq);
|
||||
for(int j_col=0; j_col<2; j_col++) {
|
||||
if (j_col==0) {
|
||||
llc = llb;
|
||||
mmc = mmb;
|
||||
phase_sign = 1;
|
||||
}
|
||||
if (j_col==1) {
|
||||
llc = ll;
|
||||
mmc = mm;
|
||||
phase_sign = -1;
|
||||
}
|
||||
for (int i_rows=0; i_rows<N1*N2; i_rows++) {
|
||||
res_code=sqrt(1/(double)(2*CSI_RS_antenna_ports))*v_lm[llc][mmc][i_rows];
|
||||
if (creal(res_code)>0)
|
||||
((short*) &mat[1][pmiq][i_rows*2+j_col])[0] = (short) ((creal(res_code)*32768)+0.5);//convert to Q15
|
||||
else
|
||||
((short*) &mat[1][pmiq][i_rows*2+j_col])[0] = (short) ((creal(res_code)*32768)-0.5);//convert to Q15
|
||||
if (cimag(res_code)>0)
|
||||
((short*) &mat[1][pmiq][i_rows*2+j_col])[1] = (short) ((cimag(res_code)*32768)+0.5);//convert to Q15
|
||||
else
|
||||
((short*) &mat[1][pmiq][i_rows*2+j_col])[1] = (short) ((cimag(res_code)*32768)-0.5);//convert to Q15
|
||||
LOG_D(PHY, "2 Layer Precoding Matrix[1][pmi %d][antPort %d][layerIdx %d]= %f+j %f -> Fixed Point %d+j %d \n",
|
||||
pmiq,i_rows,j_col, creal(res_code), cimag(res_code),((short*) &mat[1][pmiq][i_rows*2+j_col])[0],((short*) &mat[1][pmiq][i_rows*2+j_col])[1]);
|
||||
}
|
||||
for (int i_rows=N1*N2; i_rows<2*N1*N2; i_rows++) {
|
||||
res_code=sqrt(1/(double)(2*CSI_RS_antenna_ports))*(phase_sign)*theta_n[nn]*v_lm[llc][mmc][i_rows-N1*N2];
|
||||
if (creal(res_code)>0)
|
||||
((short*) &mat[1][pmiq][i_rows*2+j_col])[0] = (short) ((creal(res_code)*32768)+0.5);//convert to Q15
|
||||
else
|
||||
((short*) &mat[1][pmiq][i_rows*2+j_col])[0] = (short) ((creal(res_code)*32768)-0.5);//convert to Q15
|
||||
if (cimag(res_code)>0)
|
||||
((short*) &mat[1][pmiq][i_rows*2+j_col])[1] = (short) ((cimag(res_code)*32768)+0.5);//convert to Q15
|
||||
else
|
||||
((short*) &mat[1][pmiq][i_rows*2+j_col])[1] = (short) ((cimag(res_code)*32768)-0.5);//convert to Q15
|
||||
LOG_D(PHY, "2 Layer Precoding Matrix[1][pmi %d][antPort %d][layerIdx %d]= %f+j %f -> Fixed Point %d+j %d \n",
|
||||
pmiq,i_rows,j_col, creal(res_code), cimag(res_code),((short*) &mat[1][pmiq][i_rows*2+j_col])[0],((short*) &mat[1][pmiq][i_rows*2+j_col])[1]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//Table 5.2.2.2.1-7:
|
||||
//Codebook for 3-layer CSI reporting using antenna ports 3000 to 2999+PCSI-RS
|
||||
if(max_mimo_layers>=3) {
|
||||
|
||||
//pmi_size is computed as follows
|
||||
gNB->pmiq_size[2] = 1;//unity matrix
|
||||
for(int llb=0; llb<N1*O1; llb++) { //i_1_1
|
||||
for (int mmb=0; mmb<N2*O2; mmb++) { //i_1_2
|
||||
for(int ll=0; ll<N1*O1; ll++) { //i_1_1
|
||||
for (int mm=0; mm<N2*O2; mm++) { //i_1_2
|
||||
for (int nn=0; nn<2; nn++) {
|
||||
if((llb != ll) || (mmb != mm)) gNB->pmiq_size[2] += 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
mat[2] = (int32_t **)malloc16(gNB->pmiq_size[2]*sizeof(int32_t *));
|
||||
//pmi=0 corresponds to unit matrix
|
||||
mat[2][0] = (int32_t *)calloc((2*N1*N2)*(3),sizeof(int32_t));
|
||||
for(int j_col=0; j_col<3; j_col++) { //3 layers
|
||||
for (int i_rows=0; i_rows<2*N1*N2; i_rows++) { //2-x polarized antenna
|
||||
if(j_col==i_rows) {
|
||||
mat[2][0][i_rows*3+j_col] = 0x7fff;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pmiq = 0;
|
||||
//pmi=1,...,pmi_size are computed as follows
|
||||
for(int llb=0; llb<N1*O1; llb++) { //i_1_1
|
||||
for (int mmb=0; mmb<N2*O2; mmb++) { //i_1_2
|
||||
for(int ll=0; ll<N1*O1; ll++) { //i_1_1
|
||||
for (int mm=0; mm<N2*O2; mm++) { //i_1_2
|
||||
for (int nn=0; nn<2; nn++) {
|
||||
if((llb != ll) || (mmb != mm)){
|
||||
pmiq += 1;
|
||||
mat[2][pmiq] = (int32_t *)malloc16((2*N1*N2)*(3)*sizeof(int32_t));
|
||||
LOG_D(PHY, "layer 3 Codebook pmiq = %d\n",pmiq);
|
||||
for(int j_col=0; j_col<3; j_col++) {
|
||||
if (j_col==0) {
|
||||
llc = llb;
|
||||
mmc = mmb;
|
||||
phase_sign = 1;
|
||||
}
|
||||
if (j_col==1) {
|
||||
llc = ll;
|
||||
mmc = mm;
|
||||
phase_sign = 1;
|
||||
}
|
||||
if (j_col==2) {
|
||||
llc = ll;
|
||||
mmc = mm;
|
||||
phase_sign = -1;
|
||||
}
|
||||
for (int i_rows=0; i_rows<N1*N2; i_rows++) {
|
||||
res_code=sqrt(1/(double)(3*CSI_RS_antenna_ports))*v_lm[llc][mmc][i_rows];
|
||||
if (creal(res_code)>0)
|
||||
((short*) &mat[2][pmiq][i_rows*3+j_col])[0] = (short) ((creal(res_code)*32768)+0.5);//convert to Q15
|
||||
else
|
||||
((short*) &mat[2][pmiq][i_rows*3+j_col])[0] = (short) ((creal(res_code)*32768)-0.5);//convert to Q15
|
||||
if (cimag(res_code)>0)
|
||||
((short*) &mat[2][pmiq][i_rows*3+j_col])[1] = (short) ((cimag(res_code)*32768)+0.5);//convert to Q15
|
||||
else
|
||||
((short*) &mat[2][pmiq][i_rows*3+j_col])[1] = (short) ((cimag(res_code)*32768)-0.5);//convert to Q15
|
||||
LOG_D(PHY, "3 Layer Precoding Matrix[2][pmi %d][antPort %d][layerIdx %d]= %f+j %f -> Fixed Point %d+j %d \n",
|
||||
pmiq,i_rows,j_col, creal(res_code), cimag(res_code),((short*) &mat[2][pmiq][i_rows*3+j_col])[0],((short*) &mat[2][pmiq][i_rows*3+j_col])[1]);
|
||||
}
|
||||
for (int i_rows=N1*N2; i_rows<2*N1*N2; i_rows++) {
|
||||
res_code=sqrt(1/(double)(3*CSI_RS_antenna_ports))*(phase_sign)*theta_n[nn]*v_lm[llc][mmc][i_rows-N1*N2];
|
||||
if (creal(res_code)>0)
|
||||
((short*) &mat[2][pmiq][i_rows*3+j_col])[0] = (short) ((creal(res_code)*32768)+0.5);//convert to Q15
|
||||
else
|
||||
((short*) &mat[2][pmiq][i_rows*3+j_col])[0] = (short) ((creal(res_code)*32768)-0.5);//convert to Q15
|
||||
if (cimag(res_code)>0)
|
||||
((short*) &mat[2][pmiq][i_rows*3+j_col])[1] = (short) ((cimag(res_code)*32768)+0.5);//convert to Q15
|
||||
else
|
||||
((short*) &mat[2][pmiq][i_rows*3+j_col])[1] = (short) ((cimag(res_code)*32768)-0.5);//convert to Q15
|
||||
LOG_D(PHY, "3 Layer Precoding Matrix[2][pmi %d][antPort %d][layerIdx %d]= %f+j %f -> Fixed Point %d+j %d \n",
|
||||
pmiq,i_rows,j_col, creal(res_code), cimag(res_code),((short*) &mat[2][pmiq][i_rows*3+j_col])[0],((short*) &mat[2][pmiq][i_rows*3+j_col])[1]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//Table 5.2.2.2.1-8:
|
||||
//Codebook for 4-layer CSI reporting using antenna ports 3000 to 2999+PCSI-RS
|
||||
if(max_mimo_layers>=4) {
|
||||
//pmi_size is computed as follows
|
||||
gNB->pmiq_size[3] = 1;//unity matrix
|
||||
for(int llb=0; llb<N1*O1; llb++) { //i_1_1
|
||||
for (int mmb=0; mmb<N2*O2; mmb++) { //i_1_2
|
||||
for(int ll=0; ll<N1*O1; ll++) { //i_1_1
|
||||
for (int mm=0; mm<N2*O2; mm++) { //i_1_2
|
||||
for (int nn=0; nn<2; nn++) {
|
||||
if((llb != ll) || (mmb != mm)) gNB->pmiq_size[3] += 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
mat[3] = (int32_t **)malloc16(gNB->pmiq_size[3]*sizeof(int32_t *));
|
||||
//pmi=0 corresponds to unit matrix
|
||||
mat[3][0] = (int32_t *)calloc((2*N1*N2)*(4),sizeof(int32_t));
|
||||
for(int j_col=0; j_col<4; j_col++) { //4 layers
|
||||
for (int i_rows=0; i_rows<2*N1*N2; i_rows++) { //2-x polarized antenna
|
||||
if(j_col==i_rows) {
|
||||
mat[3][0][i_rows*4+j_col] = 0x7fff;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pmiq = 0;
|
||||
//pmi=1,...,pmi_size are computed as follows
|
||||
for(int llb=0; llb<N1*O1; llb++) { //i_1_1
|
||||
for (int mmb=0; mmb<N2*O2; mmb++) { //i_1_2
|
||||
for(int ll=0; ll<N1*O1; ll++) { //i_1_1
|
||||
for (int mm=0; mm<N2*O2; mm++) { //i_1_2
|
||||
for (int nn=0; nn<2; nn++) {
|
||||
|
||||
if((llb != ll) || (mmb != mm)){
|
||||
pmiq += 1;
|
||||
mat[3][pmiq] = (int32_t *)malloc16((2*N1*N2)*4*sizeof(int32_t));
|
||||
LOG_D(PHY, "layer 4 pmiq = %d\n",pmiq);
|
||||
for(int j_col=0; j_col<4; j_col++) {
|
||||
if (j_col==0) {
|
||||
llc = llb;
|
||||
mmc = mmb;
|
||||
phase_sign = 1;
|
||||
}
|
||||
if (j_col==1) {
|
||||
llc = ll;
|
||||
mmc = mm;
|
||||
phase_sign = 1;
|
||||
}
|
||||
if (j_col==2) {
|
||||
llc = llb;
|
||||
mmc = mmb;
|
||||
phase_sign = -1;
|
||||
}
|
||||
if (j_col==3) {
|
||||
llc = ll;
|
||||
mmc = mm;
|
||||
phase_sign = -1;
|
||||
}
|
||||
for (int i_rows=0; i_rows<N1*N2; i_rows++) {
|
||||
res_code=sqrt(1/(double)(4*CSI_RS_antenna_ports))*v_lm[llc][mmc][i_rows];
|
||||
if (creal(res_code)>0)
|
||||
((short*) &mat[3][pmiq][i_rows*4+j_col])[0] = (short) ((creal(res_code)*32768)+0.5);//convert to Q15
|
||||
else
|
||||
((short*) &mat[3][pmiq][i_rows*4+j_col])[0] = (short) ((creal(res_code)*32768)-0.5);//convert to Q15
|
||||
if (cimag(res_code)>0)
|
||||
((short*) &mat[3][pmiq][i_rows*4+j_col])[1] = (short) ((cimag(res_code)*32768)+0.5);//convert to Q15
|
||||
else
|
||||
((short*) &mat[3][pmiq][i_rows*4+j_col])[1] = (short) ((cimag(res_code)*32768)-0.5);//convert to Q15
|
||||
LOG_D(PHY, "4 Layer Precoding Matrix[3][pmi %d][antPort %d][layerIdx %d]= %f+j %f -> Fixed Point %d+j %d \n",
|
||||
pmiq,i_rows,j_col, creal(res_code), cimag(res_code),((short*) &mat[3][pmiq][i_rows*4+j_col])[0],((short*) &mat[3][pmiq][i_rows*4+j_col])[1]);
|
||||
}
|
||||
|
||||
for (int i_rows=N1*N2; i_rows<2*N1*N2; i_rows++) {
|
||||
res_code=sqrt(1/(double)(4*CSI_RS_antenna_ports))*(phase_sign)*theta_n[nn]*v_lm[llc][mmc][i_rows-N1*N2];
|
||||
if (creal(res_code)>0)
|
||||
((short*) &mat[3][pmiq][i_rows*4+j_col])[0] = (short) ((creal(res_code)*32768)+0.5);//convert to Q15
|
||||
else
|
||||
((short*) &mat[3][pmiq][i_rows*4+j_col])[0] = (short) ((creal(res_code)*32768)-0.5);//convert to Q15
|
||||
if (cimag(res_code)>0)
|
||||
((short*) &mat[3][pmiq][i_rows*4+j_col])[1] = (short) ((cimag(res_code)*32768)+0.5);//convert to Q15
|
||||
else
|
||||
((short*) &mat[3][pmiq][i_rows*4+j_col])[1] = (short) ((cimag(res_code)*32768)-0.5);//convert to Q15
|
||||
LOG_D(PHY, "4 Layer Precoding Matrix[3][pmi %d][antPort %d][layerIdx %d]= %f+j %f -> Fixed Point %d+j %d \n",
|
||||
pmiq,i_rows,j_col, creal(res_code), cimag(res_code),((short*) &mat[3][pmiq][i_rows*4+j_col])[0],((short*) &mat[3][pmiq][i_rows*4+j_col])[1]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
// A global var to reduce the changes size
|
||||
ldpc_interface_t ldpc_interface = {0}, ldpc_interface_offload = {0};
|
||||
|
||||
@@ -536,8 +134,6 @@ int phy_init_nr_gNB(PHY_VARS_gNB *gNB)
|
||||
if (gNB->ldpc_offload_flag)
|
||||
load_LDPClib("_t2", &ldpc_interface_offload);
|
||||
gNB->max_nb_pdsch = MAX_MOBILES_PER_GNB;
|
||||
|
||||
init_codebook_gNB(gNB);
|
||||
init_delay_table(fp->ofdm_symbol_size, MAX_DELAY_COMP, NR_MAX_OFDM_SYMBOL_SIZE, fp->delay_table);
|
||||
|
||||
// PBCH DMRS gold sequences generation
|
||||
@@ -725,23 +321,15 @@ int phy_init_nr_gNB(PHY_VARS_gNB *gNB)
|
||||
|
||||
void phy_free_nr_gNB(PHY_VARS_gNB *gNB)
|
||||
{
|
||||
NR_DL_FRAME_PARMS* const fp = &gNB->frame_parms;
|
||||
NR_DL_FRAME_PARMS* const fp = &gNB->frame_parms;
|
||||
const int Ptx = gNB->gNB_config.carrier_config.num_tx_ant.value;
|
||||
const int Prx = gNB->gNB_config.carrier_config.num_rx_ant.value;
|
||||
const int max_ul_mimo_layers = 4; // taken from phy_init_nr_gNB()
|
||||
const int n_buf = Prx * max_ul_mimo_layers;
|
||||
PHY_MEASUREMENTS_gNB *meas=&gNB->measurements;
|
||||
|
||||
PHY_MEASUREMENTS_gNB *meas = &gNB->measurements;
|
||||
free_and_zero(meas->n0_subband_power);
|
||||
free_and_zero(meas->n0_subband_power_dB);
|
||||
int max_dl_mimo_layers =(fp->nb_antennas_tx<NR_MAX_NB_LAYERS) ? fp->nb_antennas_tx : NR_MAX_NB_LAYERS;
|
||||
if (fp->nb_antennas_tx>1) {
|
||||
for (int nl = 0; nl < max_dl_mimo_layers; nl++) {
|
||||
for(int size = 0; size < gNB->pmiq_size[nl]; size++)
|
||||
free_and_zero(gNB->nr_mimo_precoding_matrix[nl][size]);
|
||||
free_and_zero(gNB->nr_mimo_precoding_matrix[nl]);
|
||||
}
|
||||
free_and_zero(gNB->nr_mimo_precoding_matrix);
|
||||
}
|
||||
|
||||
uint32_t ***pdcch_dmrs = gNB->nr_gold_pdcch_dmrs;
|
||||
for (int slot = 0; slot < fp->slots_per_frame; slot++) {
|
||||
|
||||
@@ -703,13 +703,17 @@ c16_t nr_layer_precoder_cm(int n_layers,
|
||||
int n_symbols,
|
||||
int symSz,
|
||||
c16_t datatx_F_precoding[n_layers][n_symbols][symSz],
|
||||
c16_t *prec_matrix,
|
||||
int ap,
|
||||
nfapi_nr_pm_pdu_t *pmi_pdu,
|
||||
int symbol,
|
||||
int offset)
|
||||
{
|
||||
c16_t precodatatx_F = {0};
|
||||
for (int al = 0; al < n_layers; al++)
|
||||
precodatatx_F = c16maddShift(datatx_F_precoding[al][symbol][offset], prec_matrix[al], precodatatx_F, 15);
|
||||
for (int al = 0; al < n_layers; al++) {
|
||||
nfapi_nr_pm_weights_t *w = &pmi_pdu->weights[al][ap];
|
||||
c16_t prec_weight = {.r = w->precoder_weight_Re, .i = w->precoder_weight_Im};
|
||||
precodatatx_F = c16maddShift(datatx_F_precoding[al][symbol][offset], prec_weight, precodatatx_F, 15);
|
||||
}
|
||||
return precodatatx_F;
|
||||
}
|
||||
|
||||
@@ -717,69 +721,77 @@ void nr_layer_precoder_simd(const int n_layers,
|
||||
const int n_symbols,
|
||||
const int symSz,
|
||||
const c16_t txdataF_res_mapped[n_layers][n_symbols][symSz],
|
||||
const c16_t prec_matrix[n_layers],
|
||||
const int ant,
|
||||
const nfapi_nr_pm_pdu_t *pmi_pdu,
|
||||
const int symbol,
|
||||
const int sc_offset,
|
||||
const int re_cnt,
|
||||
c16_t *txdataF_precoded)
|
||||
{
|
||||
uint32_t sc = sc_offset;
|
||||
|
||||
c16_t prec_weight = {0};
|
||||
// For x86, use 256 SIMD for every 8 RE and 128 SIMD for last 4 RE
|
||||
// For aarch64, use 128 SIMD for every 4 RE
|
||||
|
||||
// 256 SIMD: Do 8 RE in one iteration, 3 iterations for 2 RB
|
||||
#ifdef __AVX2__
|
||||
const uint32_t re_cnt_align8 = re_cnt & ~7;
|
||||
for(; sc<sc_offset+(re_cnt_align8); sc+=sizeof(simde__m256i)/sizeof(*prec_matrix)){
|
||||
// Matrix multiplication for 4 elements of the result (sizeof(simde__m256i) / sizeof(*prec_matrix) = 8)
|
||||
simde__m256i y = simde_mm256_set1_epi16(0); // Y = W[0]*X[0] + W[1]*X[1] + ... + W[nrOfLayers-1]*X[nrOfLayers-1]
|
||||
for(int nl=0; nl<n_layers; nl++){
|
||||
const simde__m256i x = simde_mm256_loadu_epi32(&txdataF_res_mapped[nl][symbol][sc]);
|
||||
#ifdef __AVX2__
|
||||
const uint32_t re_cnt_align8 = re_cnt & ~7;
|
||||
for(; sc < sc_offset + (re_cnt_align8); sc += sizeof(simde__m256i) / sizeof(prec_weight)) {
|
||||
// Matrix multiplication for 4 elements of the result (sizeof(simde__m256i) / sizeof(*prec_matrix) = 8)
|
||||
simde__m256i y = simde_mm256_set1_epi16(0); // Y = W[0]*X[0] + W[1]*X[1] + ... + W[nrOfLayers-1]*X[nrOfLayers-1]
|
||||
for(int nl = 0; nl < n_layers; nl++) {
|
||||
prec_weight.r = pmi_pdu->weights[nl][ant].precoder_weight_Re;
|
||||
prec_weight.i = pmi_pdu->weights[nl][ant].precoder_weight_Im;
|
||||
|
||||
// Rearrange precoding matrix weight to match complex multiplication and broadcast it to match SIMD size
|
||||
const simde__m256i w_c = simde_mm256_set1_epi32(c16toI32(c16conj(prec_matrix[nl]))); // broadcast conjugate of w
|
||||
const simde__m256i w_s = simde_mm256_set1_epi32(c16toI32(c16swap(prec_matrix[nl]))); // broadcast swapped real and img of w
|
||||
const simde__m256i x = simde_mm256_loadu_epi32(&txdataF_res_mapped[nl][symbol][sc]);
|
||||
|
||||
// Multiplication and shift
|
||||
const simde__m256i reals = simde_mm256_srai_epi32(simde_mm256_madd_epi16(x, w_c), 15); // (int32_t) .r = (x.r * w.r - x.i * w.i) >> 15
|
||||
const simde__m256i imags = simde_mm256_slli_epi32(simde_mm256_madd_epi16(x, w_s), 1); // (int32_t) .i = (x.r * w.i + x.i * w.r) << 1, since higher 16 bit of each 32 bit is taken by blend_epi16
|
||||
// Rearrange precoding matrix weight to match complex multiplication and broadcast it to match SIMD size
|
||||
const simde__m256i w_c = simde_mm256_set1_epi32(c16toI32(c16conj(prec_weight))); // broadcast conjugate of w
|
||||
const simde__m256i w_s = simde_mm256_set1_epi32(c16toI32(c16swap(prec_weight))); // broadcast swapped real and img of w
|
||||
|
||||
// Re-arrange to match c16_t format
|
||||
const simde__m256i produ = simde_mm256_blend_epi16(reals, imags, 0xAA);
|
||||
// Multiplication and shift
|
||||
const simde__m256i reals = simde_mm256_srai_epi32(simde_mm256_madd_epi16(x, w_c), 15); // (int32_t) .r = (x.r * w.r - x.i * w.i) >> 15
|
||||
const simde__m256i imags = simde_mm256_slli_epi32(simde_mm256_madd_epi16(x, w_s), 1); // (int32_t) .i = (x.r * w.i + x.i * w.r) << 1, since higher 16 bit of each 32 bit is taken by blend_epi16
|
||||
|
||||
// Accumulate the product
|
||||
y = simde_mm256_adds_epi16(y, produ);
|
||||
}
|
||||
// Store the result to txdataF
|
||||
simde_mm256_storeu_si256(&txdataF_precoded[sc], y);
|
||||
// Re-arrange to match c16_t format
|
||||
const simde__m256i produ = simde_mm256_blend_epi16(reals, imags, 0xAA);
|
||||
|
||||
// Accumulate the product
|
||||
y = simde_mm256_adds_epi16(y, produ);
|
||||
}
|
||||
#endif
|
||||
// Store the result to txdataF
|
||||
simde_mm256_storeu_si256(&txdataF_precoded[sc], y);
|
||||
}
|
||||
#endif
|
||||
|
||||
// 128 SIMD: Do 4 RE in one iteration, 3 iterations for 1 RB
|
||||
const uint32_t re_cnt_align4 = re_cnt & ~3;
|
||||
for(; sc<sc_offset+re_cnt_align4; sc+=sizeof(simde__m128i)/sizeof(*prec_matrix)){
|
||||
for(; sc < sc_offset+re_cnt_align4; sc += sizeof(simde__m128i) / sizeof(prec_weight)) {
|
||||
#ifdef DEBUG_DLSCH_PRECODING_PRINT_WITH_TRIVIAL // Get result with trivial solution, TODO: To be removed
|
||||
c16_t y_triv[4];
|
||||
for(int i=0; i<4; i++)
|
||||
for(int i = 0; i < 4; i++)
|
||||
y_triv[i] = nr_layer_precoder_cm(n_layers,
|
||||
NR_SYMBOLS_PER_SLOT,
|
||||
symSz,
|
||||
txdataF_res_mapped,
|
||||
prec_matrix,
|
||||
symbol,
|
||||
sc + i);
|
||||
NR_SYMBOLS_PER_SLOT,
|
||||
symSz,
|
||||
txdataF_res_mapped,
|
||||
ant,
|
||||
pmi_pdu,
|
||||
symbol,
|
||||
sc + i);
|
||||
memcpy(&txdataF_precoded[sc], y_triv, sizeof(y_triv));
|
||||
#endif
|
||||
|
||||
// Matrix multiplication for 4 elements of the result (sizeof(simde__m128i) / sizeof(c16_t) = 4)
|
||||
simde__m128i y = simde_mm_set1_epi16(0); // Y = W[0]*X[0] + W[1]*X[1] + ... + W[nrOfLayers-1]*X[nrOfLayers-1]
|
||||
for(int nl=0; nl<n_layers; nl++){
|
||||
for(int nl = 0; nl < n_layers; nl++) {
|
||||
prec_weight.r = pmi_pdu->weights[nl][ant].precoder_weight_Re;
|
||||
prec_weight.i = pmi_pdu->weights[nl][ant].precoder_weight_Im;
|
||||
|
||||
const simde__m128i x = simde_mm_loadu_epi32(&txdataF_res_mapped[nl][symbol][sc]);
|
||||
|
||||
// Rearrange precoding matrix weight to match complex multiplication and broadcast it to match SIMD size
|
||||
const simde__m128i w_c = simde_mm_set1_epi32(c16toI32(c16conj(prec_matrix[nl]))); // broadcast conjugate of w
|
||||
const simde__m128i w_s = simde_mm_set1_epi32(c16toI32(c16swap(prec_matrix[nl]))); // broadcast swapped real and img of w
|
||||
const simde__m128i w_c = simde_mm_set1_epi32(c16toI32(c16conj(prec_weight))); // broadcast conjugate of w
|
||||
const simde__m128i w_s = simde_mm_set1_epi32(c16toI32(c16swap(prec_weight))); // broadcast swapped real and img of w
|
||||
|
||||
// Multiplication and shift
|
||||
const simde__m128i reals = simde_mm_srai_epi32(simde_mm_madd_epi16(x, w_c), 15); // (int32_t) .r = (x.r * w.r - x.i * w.i) >> 15
|
||||
|
||||
@@ -138,11 +138,13 @@ void apply_nr_rotation_RX(NR_DL_FRAME_PARMS *frame_parms,
|
||||
@param[in] n_layers, number of DLSCH layers
|
||||
*/
|
||||
int nr_layer_precoder(int16_t **datatx_F_precoding, const char *prec_matrix, uint8_t n_layers, int32_t re_offset);
|
||||
|
||||
c16_t nr_layer_precoder_cm(int n_layers,
|
||||
int n_symbols,
|
||||
int symSz,
|
||||
c16_t datatx_F_precoding[n_layers][n_symbols][symSz],
|
||||
c16_t *prec_matrix,
|
||||
int ap,
|
||||
nfapi_nr_pm_pdu_t *pmi_pdu,
|
||||
int symbol,
|
||||
int offset);
|
||||
|
||||
@@ -156,7 +158,8 @@ void nr_layer_precoder_simd(const int n_layers,
|
||||
const int n_symbols,
|
||||
const int symSz,
|
||||
const c16_t txdataF_res_mapped[n_layers][n_symbols][symSz],
|
||||
const c16_t prec_matrix[n_layers],
|
||||
const int ant,
|
||||
const nfapi_nr_pm_pdu_t *pmi_pdu,
|
||||
const int symbol,
|
||||
const int sc_offset,
|
||||
const int re_cnt,
|
||||
|
||||
@@ -535,58 +535,52 @@ void nr_generate_pdsch(processingData_L1tx_t *msgTx, int frame, int slot)
|
||||
}
|
||||
}
|
||||
else { // non-unitary Precoding
|
||||
if(frame_parms->nb_antennas_tx == 1){ // no precoding matrix defined
|
||||
memcpy(&txdataF[ant][txdataF_offset_per_symbol + subCarrier],
|
||||
&txdataF_precoding[ant][l_symbol][subCarrier],
|
||||
re_cnt * sizeof(**txdataF));
|
||||
AssertFatal(frame_parms->nb_antennas_tx > 1, "No precoding can be done with a single antenna port\n");
|
||||
//get the precoding matrix weights:
|
||||
nfapi_nr_pm_pdu_t *pmi_pdu = &gNB->gNB_config.pmi_list.pmi_pdu[pmi - 1]; // pmi 0 is identity matrix
|
||||
AssertFatal(pmi == pmi_pdu->pm_idx, "PMI %d doesn't match to the one in precoding matrix %d\n",
|
||||
pmi, pmi_pdu->pm_idx);
|
||||
AssertFatal(ant < pmi_pdu->num_ant_ports, "Antenna port index %d exceeds precoding matrix AP size %d\n",
|
||||
ant, pmi_pdu->num_ant_ports);
|
||||
AssertFatal(rel15->nrOfLayers == pmi_pdu->numLayers, "Number of layers %d doesn't match to the one in precoding matrix %d\n",
|
||||
rel15->nrOfLayers, pmi_pdu->numLayers);
|
||||
if((subCarrier + re_cnt) < frame_parms->ofdm_symbol_size){ // within ofdm_symbol_size, use SIMDe
|
||||
nr_layer_precoder_simd(rel15->nrOfLayers,
|
||||
NR_SYMBOLS_PER_SLOT,
|
||||
frame_parms->ofdm_symbol_size,
|
||||
txdataF_precoding,
|
||||
ant,
|
||||
pmi_pdu,
|
||||
l_symbol,
|
||||
subCarrier,
|
||||
re_cnt,
|
||||
&txdataF[ant][txdataF_offset_per_symbol]);
|
||||
subCarrier += re_cnt;
|
||||
if (subCarrier >= frame_parms->ofdm_symbol_size) {
|
||||
subCarrier -= frame_parms->ofdm_symbol_size;
|
||||
}
|
||||
}
|
||||
else { // precoding with more than 1 tx
|
||||
//get the precoding matrix weights:
|
||||
c16_t **mat = (c16_t**)gNB->nr_mimo_precoding_matrix[rel15->nrOfLayers - 1];
|
||||
//i_row =0,...,dl_antenna_port
|
||||
//j_col =0,...,nrOfLayers
|
||||
//mat[pmi][i_rows*2+j_col]
|
||||
c16_t *W_prec = &mat[pmi][ant * rel15->nrOfLayers];
|
||||
if((subCarrier + re_cnt) < frame_parms->ofdm_symbol_size){ // within ofdm_symbol_size, use SIMDe
|
||||
nr_layer_precoder_simd(rel15->nrOfLayers,
|
||||
NR_SYMBOLS_PER_SLOT,
|
||||
frame_parms->ofdm_symbol_size,
|
||||
txdataF_precoding,
|
||||
W_prec,
|
||||
l_symbol,
|
||||
subCarrier,
|
||||
re_cnt,
|
||||
&txdataF[ant][txdataF_offset_per_symbol]);
|
||||
subCarrier += re_cnt;
|
||||
}
|
||||
else{ // crossing ofdm_symbol_size, use simple arithmetic operations
|
||||
for (int i = 0; i < re_cnt; i++) {
|
||||
txdataF[ant][txdataF_offset_per_symbol + subCarrier] =
|
||||
nr_layer_precoder_cm(rel15->nrOfLayers,
|
||||
NR_SYMBOLS_PER_SLOT,
|
||||
frame_parms->ofdm_symbol_size,
|
||||
txdataF_precoding,
|
||||
W_prec,
|
||||
l_symbol,
|
||||
subCarrier);
|
||||
else{ // crossing ofdm_symbol_size, use simple arithmetic operations
|
||||
for (int i = 0; i < re_cnt; i++) {
|
||||
txdataF[ant][txdataF_offset_per_symbol + subCarrier] =
|
||||
nr_layer_precoder_cm(rel15->nrOfLayers,
|
||||
NR_SYMBOLS_PER_SLOT,
|
||||
frame_parms->ofdm_symbol_size,
|
||||
txdataF_precoding,
|
||||
ant,
|
||||
pmi_pdu,
|
||||
l_symbol,
|
||||
subCarrier);
|
||||
#ifdef DEBUG_DLSCH_MAPPING
|
||||
printf("antenna %d\t l %d \t subCarrier %d \t txdataF: %d %d\n",
|
||||
ant,
|
||||
symbol,
|
||||
subCarrier,
|
||||
txdataF[ant][l_symbol * frame_parms->ofdm_symbol_size + subCarrier + txdataF_offset].r,
|
||||
txdataF[ant][l_symbol * frame_parms->ofdm_symbol_size + subCarrier + txdataF_offset].i);
|
||||
printf("antenna %d\t l %d \t subCarrier %d \t txdataF: %d %d\n",
|
||||
ant,
|
||||
symbol,
|
||||
subCarrier,
|
||||
txdataF[ant][l_symbol * frame_parms->ofdm_symbol_size + subCarrier + txdataF_offset].r,
|
||||
txdataF[ant][l_symbol * frame_parms->ofdm_symbol_size + subCarrier + txdataF_offset].i);
|
||||
#endif
|
||||
if (++subCarrier >= frame_parms->ofdm_symbol_size) {
|
||||
subCarrier -= frame_parms->ofdm_symbol_size;
|
||||
}
|
||||
if (++subCarrier >= frame_parms->ofdm_symbol_size) {
|
||||
subCarrier -= frame_parms->ofdm_symbol_size;
|
||||
}
|
||||
} // else{ // crossing ofdm_symbol_size, use simple arithmetic operations
|
||||
} // else { // precoding with more than 1 tx
|
||||
}
|
||||
} // else{ // crossing ofdm_symbol_size, use simple arithmetic operations
|
||||
} // else { // non-unitary Precoding
|
||||
|
||||
rb += rb_step;
|
||||
|
||||
@@ -619,13 +619,6 @@ typedef struct PHY_VARS_gNB_s {
|
||||
/// PDSCH DMRS sequence
|
||||
uint32_t ****nr_gold_pdsch_dmrs;
|
||||
|
||||
/// PDSCH codebook I precoding LUTs
|
||||
/// first dimension: Rank number [0,...,noOfLayers-1[
|
||||
/// second dimension: PMI [0,...,CodeSize-1[
|
||||
/// third dimension: [i_rows*noOfLayers+j_col], i_rows=0,...pdsch_AntennaPorts-1 and j_col=0,...,noOfLayers-1
|
||||
int32_t ***nr_mimo_precoding_matrix;
|
||||
int pmiq_size[NR_MAX_NB_LAYERS];
|
||||
|
||||
/// PUSCH DMRS
|
||||
uint32_t ****nr_gold_pusch_dmrs;
|
||||
|
||||
|
||||
@@ -79,7 +79,6 @@
|
||||
|
||||
#define NR_MAX_PDCCH_AGG_LEVEL 16 // 3GPP TS 38.211 V15.8 Section 7.3.2 Table 7.3.2.1-1: Supported PDCCH aggregation levels
|
||||
|
||||
#define NR_MAX_NB_LAYERS 4 // 8
|
||||
#define NR_MAX_NB_PORTS 32
|
||||
|
||||
#define NR_MAX_PDSCH_TBS 3824
|
||||
|
||||
@@ -223,35 +223,21 @@ nrUE_params_t *get_nrUE_params(void) {
|
||||
}
|
||||
|
||||
|
||||
void validate_input_pmi(nr_pdsch_AntennaPorts_t pdsch_AntennaPorts, int nrOfLayers, int pmi)
|
||||
void validate_input_pmi(nfapi_nr_config_request_scf_t *gNB_config,
|
||||
nr_pdsch_AntennaPorts_t pdsch_AntennaPorts,
|
||||
int nrOfLayers,
|
||||
int pmi)
|
||||
{
|
||||
if (pmi == 0)
|
||||
return;
|
||||
|
||||
nfapi_nr_pm_pdu_t *pmi_pdu = &gNB_config->pmi_list.pmi_pdu[pmi - 1]; // pmi 0 is identity matrix
|
||||
AssertFatal(pmi == pmi_pdu->pm_idx, "PMI %d doesn't match to the one in precoding matrix %d\n", pmi, pmi_pdu->pm_idx);
|
||||
AssertFatal(nrOfLayers == pmi_pdu->numLayers, "Number of layers %d doesn't match to the one in precoding matrix %d for PMI %d\n",
|
||||
nrOfLayers, pmi_pdu->numLayers, pmi);
|
||||
int num_antenna_ports = pdsch_AntennaPorts.N1 * pdsch_AntennaPorts.N2 * pdsch_AntennaPorts.XP;
|
||||
int N1 = pdsch_AntennaPorts.N1;
|
||||
int N2 = pdsch_AntennaPorts.N2;
|
||||
int O1 = N1 > 1 ? 4 : 1;
|
||||
int O2 = N2 > 1 ? 4 : 1;
|
||||
int K1, K2;
|
||||
if (num_antenna_ports > 2)
|
||||
get_K1_K2(N1, N2, &K1, &K2);
|
||||
else {
|
||||
K1 = 1; K2 = 1;
|
||||
}
|
||||
int num_pmi = 1; // pmi = 0 is the identity matrix
|
||||
switch (nrOfLayers) {
|
||||
case 1 :
|
||||
num_pmi += N1 * O1 * N2 * O2 * 4;
|
||||
AssertFatal(pmi < num_pmi, "Input PMI index %d exceeds the limit of configured matrices %d for %d layers\n", pmi, num_pmi, nrOfLayers);
|
||||
return;
|
||||
case 2 :
|
||||
num_pmi += N1 * O1 * N2 * O2 * K1 * K2 * 2;
|
||||
AssertFatal(pmi < num_pmi, "Input PMI index %d exceeds the limit of conigured matrices %d for %d layers\n", pmi, num_pmi, nrOfLayers);
|
||||
break;
|
||||
default :
|
||||
AssertFatal(false, "Precoding with more than 2 nrOfLayers not yet supported\n");
|
||||
}
|
||||
AssertFatal(num_antenna_ports == pmi_pdu->num_ant_ports, "Configured antenna ports %d does not match precoding matrix AP size %d for PMI %d\n",
|
||||
num_antenna_ports, pmi_pdu->num_ant_ports, pmi);
|
||||
}
|
||||
|
||||
|
||||
@@ -709,7 +695,7 @@ int main(int argc, char **argv)
|
||||
gNB->ap_N2 = pdsch_AntennaPorts.N2;
|
||||
gNB->ap_XP = pdsch_AntennaPorts.XP;
|
||||
|
||||
validate_input_pmi(pdsch_AntennaPorts, g_nrOfLayers, g_pmi);
|
||||
validate_input_pmi(&gNB_mac->config[0], pdsch_AntennaPorts, g_nrOfLayers, g_pmi);
|
||||
|
||||
NR_UE_NR_Capability_t* UE_Capability_nr = CALLOC(1,sizeof(NR_UE_NR_Capability_t));
|
||||
prepare_sim_uecap(UE_Capability_nr,scc,mu,
|
||||
@@ -849,7 +835,7 @@ int main(int argc, char **argv)
|
||||
nr_gold_pdsch(UE, i, UE->scramblingID_dlsch[i]);
|
||||
}
|
||||
|
||||
nr_l2_init_ue();
|
||||
nr_l2_init_ue(1);
|
||||
UE_mac = get_mac_inst(0);
|
||||
ue_init_config_request(UE_mac, mu);
|
||||
|
||||
|
||||
@@ -690,8 +690,7 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
|
||||
//Configure UE
|
||||
nr_l2_init_ue();
|
||||
|
||||
nr_l2_init_ue(1);
|
||||
NR_UE_MAC_INST_t* UE_mac = get_mac_inst(0);
|
||||
|
||||
ue_init_config_request(UE_mac, mu);
|
||||
|
||||
@@ -146,11 +146,16 @@ typedef struct f1ap_gnb_du_system_info_t {
|
||||
} f1ap_gnb_du_system_info_t;
|
||||
|
||||
typedef struct f1ap_setup_req_s {
|
||||
/// ulong transaction id
|
||||
uint64_t transaction_id;
|
||||
|
||||
// F1_Setup_Req payload
|
||||
uint64_t gNB_DU_id;
|
||||
char *gNB_DU_name;
|
||||
|
||||
|
||||
/// rrc version
|
||||
uint8_t rrc_ver[3];
|
||||
|
||||
/// number of DU cells available
|
||||
uint16_t num_cells_available; //0< num_cells_available <= 512;
|
||||
struct {
|
||||
@@ -179,11 +184,17 @@ typedef struct served_cells_to_activate_s {
|
||||
} served_cells_to_activate_t;
|
||||
|
||||
typedef struct f1ap_setup_resp_s {
|
||||
/// ulong transaction id
|
||||
uint64_t transaction_id;
|
||||
/// string holding gNB_CU_name
|
||||
char *gNB_CU_name;
|
||||
/// number of DU cells to activate
|
||||
uint16_t num_cells_to_activate; //0< num_cells_to_activate <= 512;
|
||||
served_cells_to_activate_t cells_to_activate[F1AP_MAX_NB_CELLS];
|
||||
|
||||
/// rrc version
|
||||
uint8_t rrc_ver[3];
|
||||
|
||||
} f1ap_setup_resp_t;
|
||||
|
||||
typedef struct f1ap_gnb_cu_configuration_update_s {
|
||||
|
||||
@@ -159,7 +159,6 @@ typedef struct RrcMacCcchDataInd_s {
|
||||
} RrcMacCcchDataInd;
|
||||
|
||||
typedef struct NRRrcMacCcchDataInd_s {
|
||||
uint16_t rnti;
|
||||
uint32_t sdu_size;
|
||||
uint8_t sdu[CCCH_SDU_SIZE];
|
||||
} NRRrcMacCcchDataInd;
|
||||
|
||||
@@ -128,3 +128,5 @@ add_subdirectory(flexric/src/sm)
|
||||
add_subdirectory(flexric/src/util)
|
||||
add_subdirectory(RAN_FUNCTION)
|
||||
|
||||
add_library(e2_agent_arg STATIC e2_agent_arg.c)
|
||||
add_dependencies(e2_agent_arg generate_T)
|
||||
|
||||
@@ -1,17 +1,40 @@
|
||||
add_subdirectory(CUSTOMIZED)
|
||||
add_subdirectory(O-RAN)
|
||||
add_library(e2_ran_func_cuup STATIC
|
||||
init_ran_func.c
|
||||
read_setup_ran.c
|
||||
../flexric/test/rnd/fill_rnd_data_e2_setup_req.c # this is not rnd data; it is used to fill E2 Node Component Configuration Addition List in E2 Setup Request message
|
||||
CUSTOMIZED/ran_func_gtp.c # current implementation doesn't take split architecture into account, neither CU/DU nor CU-UP/CU-CP
|
||||
CUSTOMIZED/ran_func_pdcp.c # current implementation doesn't take split architecture into account, neither CU/DU nor CU-UP/CU-CP
|
||||
CUSTOMIZED/ran_func_tc.c # currently, not implemented; therefore, filling rnd data
|
||||
../flexric/test/rnd/fill_rnd_data_tc.c
|
||||
O-RAN/ran_func_kpm.c # this file should only contain PDCP-U/GTP; to be done in the future
|
||||
../flexric/test/rnd/fill_rnd_data_kpm.c # this dependancy will be taken out once RAN Function Definition is implemented
|
||||
O-RAN/ran_func_rc.c # this file should only contain PDCP-U/GTP; to be done in the future
|
||||
../flexric/test/rnd/fill_rnd_data_rc.c # this dependancy will be taken out once RAN Function Definition is implemented
|
||||
)
|
||||
|
||||
add_library(e2_ran_func STATIC
|
||||
init_ran_func.c
|
||||
read_setup_ran.c
|
||||
../flexric/test/rnd/fill_rnd_data_e2_setup_req.c
|
||||
)
|
||||
target_link_libraries(e2_ran_func_cuup PUBLIC asn1_nr_rrc nr_rrc asn1_nr_rrc_hdrs e2_time_obj kpm_ric_info_common_obj 3gpp_derived_ie_obj)
|
||||
target_compile_definitions(e2_ran_func_cuup PUBLIC ${E2AP_VERSION} ${KPM_VERSION} NGRAN_GNB_CUUP)
|
||||
|
||||
target_link_libraries(e2_ran_func
|
||||
PUBLIC
|
||||
e2_ran_func_cust
|
||||
e2_ran_func_oran
|
||||
)
|
||||
|
||||
# This dependency sucks! Create pointers and forward declarations!
|
||||
target_compile_definitions(e2_ran_func PRIVATE ${E2AP_VERSION} ${KPM_VERSION})
|
||||
add_library(e2_ran_func_du_cucp_cuup STATIC
|
||||
init_ran_func.c
|
||||
read_setup_ran.c
|
||||
../flexric/test/rnd/fill_rnd_data_e2_setup_req.c # this is not rnd data; it is used to fill E2 Node Component Configuration Addition List in E2 Setup Request message
|
||||
CUSTOMIZED/ran_func_gtp.c # current implementation doesn't take split architecture into account, neither CU/DU nor CU-UP/CU-CP
|
||||
CUSTOMIZED/ran_func_pdcp.c # current implementation doesn't take split architecture into account, neither CU/DU nor CU-UP/CU-CP
|
||||
O-RAN/ran_func_kpm.c # this file should only contain RRC/PDCP-C; to be done in the future
|
||||
# when nr-softmodem is divided in separate executables
|
||||
../flexric/test/rnd/fill_rnd_data_kpm.c # this dependancy will be taken out once RAN Function Definition is implemented
|
||||
O-RAN/ran_func_rc.c # this file should only contain RRC/PDCP-C; to be done in the future
|
||||
# when nr-softmodem is divided in separate executables
|
||||
../flexric/test/rnd/fill_rnd_data_rc.c # this dependancy will be taken out once RAN Function Definition is implemented
|
||||
CUSTOMIZED/ran_func_mac.c
|
||||
CUSTOMIZED/ran_func_rlc.c
|
||||
CUSTOMIZED/ran_func_slice.c
|
||||
CUSTOMIZED/ran_func_tc.c
|
||||
../flexric/test/rnd/fill_rnd_data_tc.c
|
||||
../flexric/test/rnd/fill_rnd_data_slice.c
|
||||
)
|
||||
|
||||
target_link_libraries(e2_ran_func_du_cucp_cuup PUBLIC asn1_nr_rrc nr_rrc asn1_nr_rrc_hdrs e2_time_obj kpm_ric_info_common_obj 3gpp_derived_ie_obj)
|
||||
target_compile_definitions(e2_ran_func_du_cucp_cuup PUBLIC ${E2AP_VERSION} ${KPM_VERSION} NGRAN_GNB_DU NGRAN_GNB_CUCP NGRAN_GNB_CUUP)
|
||||
|
||||
@@ -1,20 +0,0 @@
|
||||
add_library(e2_ran_func_cust STATIC
|
||||
ran_func_gtp.c
|
||||
ran_func_mac.c
|
||||
ran_func_pdcp.c
|
||||
ran_func_rlc.c
|
||||
ran_func_slice.c
|
||||
ran_func_tc.c
|
||||
# For testing purposes
|
||||
../../flexric/test/rnd/fill_rnd_data_gtp.c
|
||||
../../flexric/test/rnd/fill_rnd_data_tc.c
|
||||
../../flexric/test/rnd/fill_rnd_data_mac.c
|
||||
../../flexric/test/rnd/fill_rnd_data_rlc.c
|
||||
../../flexric/test/rnd/fill_rnd_data_pdcp.c
|
||||
../../flexric/test/rnd/fill_rnd_data_slice.c
|
||||
../../flexric/src/util/time_now_us.c
|
||||
)
|
||||
|
||||
target_link_libraries(e2_ran_func_cust PUBLIC asn1_nr_rrc nr_rrc asn1_nr_rrc_hdrs)
|
||||
# This dependency sucks! Create pointers and forward declarations!
|
||||
target_compile_definitions(e2_ran_func_cust PRIVATE ${E2AP_VERSION} ${KPM_VERSION} )
|
||||
@@ -23,17 +23,17 @@
|
||||
|
||||
#include <assert.h>
|
||||
|
||||
#include "openair2/E2AP/flexric/test/rnd/fill_rnd_data_gtp.h"
|
||||
#include "common/ran_context.h"
|
||||
#include "openair2/LAYER2/NR_MAC_gNB/mac_proto.h"
|
||||
#include "openair2/E2AP/flexric/src/util/time_now_us.h"
|
||||
#include "openair2/LAYER2/nr_pdcp/nr_pdcp_oai_api.h"
|
||||
|
||||
|
||||
#if defined (NGRAN_GNB_CUCP)
|
||||
#include "openair2/RRC/NR/rrc_gNB_UE_context.h"
|
||||
#endif
|
||||
|
||||
|
||||
static
|
||||
const int mod_id = 0;
|
||||
|
||||
void read_gtp_sm(void * data)
|
||||
bool read_gtp_sm(void * data)
|
||||
{
|
||||
assert(data != NULL);
|
||||
|
||||
@@ -42,44 +42,46 @@ void read_gtp_sm(void * data)
|
||||
|
||||
gtp->msg.tstamp = time_now_us();
|
||||
|
||||
NR_UEs_t *UE_info = &RC.nrmac[mod_id]->UE_info;
|
||||
size_t num_ues = 0;
|
||||
UE_iterator(UE_info->list, ue) {
|
||||
if (ue)
|
||||
num_ues += 1;
|
||||
}
|
||||
|
||||
uint64_t ue_id_list[MAX_MOBILES_PER_GNB];
|
||||
size_t num_ues = nr_pdcp_get_num_ues(ue_id_list, MAX_MOBILES_PER_GNB);
|
||||
|
||||
gtp->msg.len = num_ues;
|
||||
if(gtp->msg.len > 0){
|
||||
gtp->msg.ngut = calloc(gtp->msg.len, sizeof(gtp_ngu_t_stats_t) );
|
||||
assert(gtp->msg.ngut != NULL);
|
||||
}
|
||||
|
||||
size_t i = 0;
|
||||
UE_iterator(UE_info->list, UE)
|
||||
{
|
||||
uint16_t const rnti = UE->rnti;
|
||||
struct rrc_gNB_ue_context_s *ue_context_p = rrc_gNB_get_ue_context_by_rnti_any_du(RC.nrrrc[mod_id], rnti);
|
||||
if (ue_context_p != NULL) {
|
||||
gtp->msg.ngut[i].rnti = ue_context_p->ue_context.rnti;
|
||||
int nb_pdu_session = ue_context_p->ue_context.nb_of_pdusessions;
|
||||
if (nb_pdu_session > 0) {
|
||||
int nb_pdu_idx = nb_pdu_session - 1;
|
||||
gtp->msg.ngut[i].teidgnb = ue_context_p->ue_context.pduSession[nb_pdu_idx].param.gNB_teid_N3;
|
||||
gtp->msg.ngut[i].teidupf = ue_context_p->ue_context.pduSession[nb_pdu_idx].param.UPF_teid_N3;
|
||||
// TODO: one PDU session has multiple QoS Flow
|
||||
int nb_qos_flow = ue_context_p->ue_context.pduSession[nb_pdu_idx].param.nb_qos;
|
||||
if (nb_qos_flow > 0) {
|
||||
gtp->msg.ngut[i].qfi = ue_context_p->ue_context.pduSession[nb_pdu_idx].param.qos[nb_qos_flow - 1].qfi;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
LOG_W(NR_RRC,"rrc_gNB_get_ue_context return NULL\n");
|
||||
// if (gtp->msg.ngut != NULL) free(gtp->msg.ngut);
|
||||
}
|
||||
i++;
|
||||
else {
|
||||
return false;
|
||||
}
|
||||
|
||||
#if defined (NGRAN_GNB_CUCP) && defined (NGRAN_GNB_CUUP)
|
||||
if (RC.nrrrc[0]->node_type == ngran_gNB_DU || RC.nrrrc[0]->node_type == ngran_gNB_CUCP) return false;
|
||||
assert((RC.nrrrc[0]->node_type == ngran_gNB_CU || RC.nrrrc[0]->node_type == ngran_gNB) && "Expected node types: CU or gNB-mono");
|
||||
|
||||
for (size_t i = 0; i < num_ues; i++) {
|
||||
rrc_gNB_ue_context_t *ue_context_p = rrc_gNB_get_ue_context(RC.nrrrc[0], ue_id_list[i]);
|
||||
|
||||
gtp->msg.ngut[i].rnti = ue_id_list[i];
|
||||
int nb_pdu_session = ue_context_p->ue_context.nb_of_pdusessions;
|
||||
if (nb_pdu_session > 0) {
|
||||
int nb_pdu_idx = nb_pdu_session - 1;
|
||||
gtp->msg.ngut[i].teidgnb = ue_context_p->ue_context.pduSession[nb_pdu_idx].param.gNB_teid_N3;
|
||||
gtp->msg.ngut[i].teidupf = ue_context_p->ue_context.pduSession[nb_pdu_idx].param.UPF_teid_N3;
|
||||
// TODO: one PDU session has multiple QoS Flow
|
||||
int nb_qos_flow = ue_context_p->ue_context.pduSession[nb_pdu_idx].param.nb_qos;
|
||||
if (nb_qos_flow > 0) {
|
||||
gtp->msg.ngut[i].qfi = ue_context_p->ue_context.pduSession[nb_pdu_idx].param.qos[nb_qos_flow - 1].qfi;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
#elif defined (NGRAN_GNB_CUUP)
|
||||
// For the moment, CU-UP doesn't store PDU session information
|
||||
printf("GTP SM not yet implemented in CU-UP\n");
|
||||
return false;
|
||||
#endif
|
||||
}
|
||||
|
||||
void read_gtp_setup_sm(void* data)
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
|
||||
#include "openair2/E2AP/flexric/src/agent/../sm/sm_io.h"
|
||||
|
||||
void read_gtp_sm(void*);
|
||||
bool read_gtp_sm(void*);
|
||||
|
||||
void read_gtp_setup_sm(void*);
|
||||
|
||||
|
||||
@@ -20,14 +20,13 @@
|
||||
*/
|
||||
|
||||
#include "ran_func_mac.h"
|
||||
#include "openair2/E2AP/flexric/test/rnd/fill_rnd_data_mac.h"
|
||||
#include <assert.h>
|
||||
|
||||
static
|
||||
const int mod_id = 0;
|
||||
|
||||
|
||||
void read_mac_sm(void* data)
|
||||
bool read_mac_sm(void* data)
|
||||
{
|
||||
assert(data != NULL);
|
||||
|
||||
@@ -110,6 +109,8 @@ void read_mac_sm(void* data)
|
||||
|
||||
++i;
|
||||
}
|
||||
|
||||
return num_ues > 0;
|
||||
}
|
||||
|
||||
void read_mac_setup_sm(void* data)
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
#include "openair2/E2AP/flexric/src/util/time_now_us.h"
|
||||
|
||||
|
||||
void read_mac_sm(void*);
|
||||
bool read_mac_sm(void*);
|
||||
|
||||
void read_mac_setup_sm(void*);
|
||||
|
||||
|
||||
@@ -19,164 +19,125 @@
|
||||
* contact@openairinterface.org
|
||||
*/
|
||||
|
||||
#include "ran_func_pdcp.h"
|
||||
|
||||
#include <assert.h>
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "openair2/E2AP/flexric/test/rnd/fill_rnd_data_pdcp.h"
|
||||
#include "ran_func_pdcp.h"
|
||||
#include "common/ran_context.h"
|
||||
#include "openair2/RRC/NR/rrc_gNB_UE_context.h"
|
||||
#include "openair2/LAYER2/nr_pdcp/nr_pdcp_oai_api.h"
|
||||
#include "openair2/LAYER2/nr_rlc/nr_rlc_oai_api.h"
|
||||
#include "openair2/LAYER2/NR_MAC_gNB/mac_proto.h"
|
||||
#include "openair2/E2AP/flexric/src/util/time_now_us.h"
|
||||
|
||||
#if defined (NGRAN_GNB_DU)
|
||||
#include "openair2/LAYER2/NR_MAC_gNB/mac_proto.h"
|
||||
#include "openair2/LAYER2/nr_rlc/nr_rlc_oai_api.h"
|
||||
#endif
|
||||
|
||||
static
|
||||
const int mod_id = 0;
|
||||
#if defined (NGRAN_GNB_CUCP)
|
||||
#include "openair2/RRC/NR/rrc_gNB_UE_context.h"
|
||||
#endif
|
||||
|
||||
static
|
||||
uint32_t num_act_rb(NR_UEs_t* UE_info)
|
||||
#if defined (NGRAN_GNB_CUUP)
|
||||
#include "openair2/LAYER2/nr_pdcp/nr_pdcp_oai_api.h"
|
||||
#endif
|
||||
|
||||
#if defined (NGRAN_GNB_CUUP)
|
||||
void fill_pdcp_stats_for_all_rbs(pdcp_radio_bearer_stats_t* rb, const size_t num_ues, const uint64_t* ue_id_list)
|
||||
{
|
||||
assert(UE_info!= NULL);
|
||||
size_t j = 0;
|
||||
for (size_t i = 0; i < num_ues; i++) {
|
||||
for (int rb_id = 1; rb_id < 6; ++rb_id) {
|
||||
nr_pdcp_statistics_t rb_pdcp = {0};
|
||||
|
||||
uint32_t act_rb = 0;
|
||||
UE_iterator(UE_info->list, UE) {
|
||||
uint16_t const rnti = UE->rnti;
|
||||
for(int rb_id = 1; rb_id < 6; ++rb_id ){
|
||||
nr_rlc_statistics_t rlc = {0};
|
||||
const int srb_flag = 0;
|
||||
const bool rc = nr_rlc_get_statistics(rnti, srb_flag, rb_id, &rlc);
|
||||
if(rc) ++act_rb;
|
||||
const bool rc = nr_pdcp_get_statistics(ue_id_list[i], srb_flag, rb_id, &rb_pdcp);
|
||||
|
||||
if (!rc) continue;
|
||||
|
||||
pdcp_radio_bearer_stats_t *rd = &rb[j++];
|
||||
|
||||
rd->txpdu_pkts = rb_pdcp.txpdu_pkts; /* aggregated number of tx packets */
|
||||
rd->txpdu_bytes = rb_pdcp.txpdu_bytes; /* aggregated bytes of tx packets */
|
||||
rd->txpdu_sn = rb_pdcp.txpdu_sn; /* current sequence number of last tx packet (or TX_NEXT) */
|
||||
rd->rxpdu_pkts = rb_pdcp.rxpdu_pkts; /* aggregated number of rx packets */
|
||||
rd->rxpdu_bytes = rb_pdcp.rxpdu_bytes; /* aggregated bytes of rx packets */
|
||||
rd->rxpdu_sn = rb_pdcp.rxpdu_sn; /* current sequence number of last rx packet (or RX_NEXT) */
|
||||
rd->rxpdu_oo_pkts = rb_pdcp.rxpdu_oo_pkts; /* aggregated number of out-of-order rx pkts (or RX_REORD) */
|
||||
rd->rxpdu_oo_bytes = rb_pdcp.rxpdu_oo_bytes; /* aggregated amount of out-of-order rx bytes */
|
||||
rd->rxpdu_dd_pkts = rb_pdcp.rxpdu_dd_pkts; /* aggregated number of duplicated discarded packets (or dropped packets because of other reasons such as integrity failure) (or RX_DELIV) */
|
||||
rd->rxpdu_dd_bytes = rb_pdcp.rxpdu_dd_bytes; /* aggregated amount of discarded packets' bytes */
|
||||
rd->rxpdu_ro_count = rb_pdcp.rxpdu_ro_count; /* this state variable indicates the COUNT value following the COUNT value associated with the PDCP Data PDU which triggered t-Reordering. (RX_REORD) */
|
||||
rd->txsdu_pkts = rb_pdcp.txsdu_pkts; /* number of SDUs delivered */
|
||||
rd->txsdu_bytes = rb_pdcp.txsdu_bytes; /* number of bytes of SDUs delivered */
|
||||
rd->rxsdu_pkts = rb_pdcp.rxsdu_pkts; /* number of SDUs received */
|
||||
rd->rxsdu_bytes = rb_pdcp.rxsdu_bytes; /* number of bytes of SDUs received */
|
||||
rd->rnti = ue_id_list[i];
|
||||
rd->mode = rb_pdcp.mode; /* 0: PDCP AM, 1: PDCP UM, 2: PDCP TM */
|
||||
rd->rbid = rb_id;
|
||||
}
|
||||
}
|
||||
return act_rb;
|
||||
}
|
||||
#endif
|
||||
|
||||
void read_pdcp_sm(void* data)
|
||||
bool read_pdcp_sm(void* data)
|
||||
{
|
||||
assert(data != NULL);
|
||||
//assert(data->type == PDCP_STATS_V0);
|
||||
|
||||
pdcp_ind_data_t* pdcp = (pdcp_ind_data_t*)data;
|
||||
//fill_pdcp_ind_data(pdcp);
|
||||
// TODO: Need to improve, not good
|
||||
if (NODE_IS_CU(RC.nrrrc[mod_id]->node_type)) {
|
||||
|
||||
uint32_t act_rb = 0;
|
||||
struct rrc_gNB_ue_context_s *ue_context_p1 = NULL;
|
||||
RB_FOREACH(ue_context_p1, rrc_nr_ue_tree_s, &RC.nrrrc[mod_id]->rrc_ue_head) {
|
||||
uint16_t const rnti = ue_context_p1->ue_context.rnti;
|
||||
for(int rb_id = 1; rb_id < 6; ++rb_id ){
|
||||
nr_pdcp_statistics_t rb_pdcp = {0};
|
||||
const int srb_flag = 0;
|
||||
const bool rc = nr_pdcp_get_statistics(rnti, srb_flag, rb_id, &rb_pdcp);
|
||||
if(rc) ++act_rb;
|
||||
}
|
||||
pdcp->msg.tstamp = time_now_us();
|
||||
|
||||
size_t num_ues = 0;
|
||||
uint64_t ue_id_list[MAX_MOBILES_PER_GNB];
|
||||
size_t total_num_rb = 0;
|
||||
|
||||
#if defined (NGRAN_GNB_CUCP) && defined (NGRAN_GNB_CUUP)
|
||||
if (RC.nrrrc[0]->node_type == ngran_gNB_DU || RC.nrrrc[0]->node_type == ngran_gNB_CUCP) return false;
|
||||
assert((RC.nrrrc[0]->node_type == ngran_gNB_CU || RC.nrrrc[0]->node_type == ngran_gNB) && "Expected node types: CU or gNB-mono");
|
||||
|
||||
struct rrc_gNB_ue_context_s *ue_context_p = NULL;
|
||||
RB_FOREACH(ue_context_p, rrc_nr_ue_tree_s, &RC.nrrrc[0]->rrc_ue_head) {
|
||||
ue_id_list[num_ues] = ue_context_p->ue_context.rrc_ue_id;
|
||||
|
||||
for(int rb_id = 1; rb_id < 6; ++rb_id ){
|
||||
nr_pdcp_statistics_t rb_pdcp = {0};
|
||||
const int srb_flag = 0;
|
||||
const bool rc = nr_pdcp_get_statistics(ue_id_list[num_ues], srb_flag, rb_id, &rb_pdcp);
|
||||
if(rc) ++total_num_rb;
|
||||
}
|
||||
num_ues++;
|
||||
|
||||
pdcp->msg.tstamp = time_now_us();
|
||||
AssertFatal(num_ues < MAX_MOBILES_PER_GNB, "cannot have more UEs than global UE number maximum\n");
|
||||
}
|
||||
|
||||
pdcp->msg.len = act_rb;
|
||||
if (pdcp->msg.len > 0) {
|
||||
pdcp->msg.rb = calloc(pdcp->msg.len, sizeof(pdcp_radio_bearer_stats_t));
|
||||
assert(pdcp->msg.rb != NULL && "Memory exhausted!");
|
||||
}
|
||||
|
||||
size_t i = 0;
|
||||
struct rrc_gNB_ue_context_s *ue_context_p2 = NULL;
|
||||
RB_FOREACH(ue_context_p2, rrc_nr_ue_tree_s, &RC.nrrrc[mod_id]->rrc_ue_head) {
|
||||
// TODO: Need to handel multiple UEs
|
||||
uint16_t const rnti = ue_context_p2->ue_context.rnti;
|
||||
|
||||
for (size_t rb_id = 1; rb_id < 6; ++rb_id) {
|
||||
nr_pdcp_statistics_t rb_pdcp = {0};
|
||||
|
||||
const int srb_flag = 0;
|
||||
const bool rc = nr_pdcp_get_statistics(rnti, srb_flag, rb_id, &rb_pdcp);
|
||||
|
||||
if (!rc) continue;
|
||||
|
||||
pdcp_radio_bearer_stats_t *rd = &pdcp->msg.rb[i];
|
||||
|
||||
rd->txpdu_pkts = rb_pdcp.txpdu_pkts; /* aggregated number of tx packets */
|
||||
rd->txpdu_bytes = rb_pdcp.txpdu_bytes; /* aggregated bytes of tx packets */
|
||||
rd->txpdu_sn = rb_pdcp.txpdu_sn; /* current sequence number of last tx packet (or TX_NEXT) */
|
||||
rd->rxpdu_pkts = rb_pdcp.rxpdu_pkts; /* aggregated number of rx packets */
|
||||
rd->rxpdu_bytes = rb_pdcp.rxpdu_bytes; /* aggregated bytes of rx packets */
|
||||
rd->rxpdu_sn = rb_pdcp.rxpdu_sn; /* current sequence number of last rx packet (or RX_NEXT) */
|
||||
rd->rxpdu_oo_pkts = rb_pdcp.rxpdu_oo_pkts; /* aggregated number of out-of-order rx pkts (or RX_REORD) */
|
||||
rd->rxpdu_oo_bytes = rb_pdcp.rxpdu_oo_bytes; /* aggregated amount of out-of-order rx bytes */
|
||||
rd->rxpdu_dd_pkts = rb_pdcp.rxpdu_dd_pkts; /* aggregated number of duplicated discarded packets (or dropped packets because of other reasons such as integrity failure) (or RX_DELIV) */
|
||||
rd->rxpdu_dd_bytes = rb_pdcp.rxpdu_dd_bytes; /* aggregated amount of discarded packets' bytes */
|
||||
rd->rxpdu_ro_count = rb_pdcp.rxpdu_ro_count; /* this state variable indicates the COUNT value following the COUNT value associated with the PDCP Data PDU which triggered t-Reordering. (RX_REORD) */
|
||||
rd->txsdu_pkts = rb_pdcp.txsdu_pkts; /* number of SDUs delivered */
|
||||
rd->txsdu_bytes = rb_pdcp.txsdu_bytes; /* number of bytes of SDUs delivered */
|
||||
rd->rxsdu_pkts = rb_pdcp.rxsdu_pkts; /* number of SDUs received */
|
||||
rd->rxsdu_bytes = rb_pdcp.rxsdu_bytes; /* number of bytes of SDUs received */
|
||||
rd->rnti = rnti;
|
||||
rd->mode = rb_pdcp.mode; /* 0: PDCP AM, 1: PDCP UM, 2: PDCP TM */
|
||||
rd->rbid = rb_id;
|
||||
|
||||
++i;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
||||
//assert(0!=0 && "Calling PDCP");
|
||||
// for the moment and while we don't have a split base station, we use the
|
||||
// MAC structures to obtain the RNTIs which we use to query the PDCP
|
||||
NR_UEs_t *UE_info = &RC.nrmac[mod_id]->UE_info;
|
||||
uint32_t const act_rb = num_act_rb(UE_info);
|
||||
|
||||
pdcp->msg.tstamp = time_now_us();
|
||||
|
||||
pdcp->msg.len = act_rb;
|
||||
if (pdcp->msg.len > 0) {
|
||||
pdcp->msg.rb = calloc(pdcp->msg.len, sizeof(pdcp_radio_bearer_stats_t));
|
||||
assert(pdcp->msg.rb != NULL && "Memory exhausted!");
|
||||
}
|
||||
|
||||
size_t i = 0;
|
||||
UE_iterator(UE_info->list, UE)
|
||||
{
|
||||
|
||||
const int rnti = UE->rnti;
|
||||
for (size_t rb_id = 1; rb_id < 6; ++rb_id) {
|
||||
nr_pdcp_statistics_t rb_pdcp = {0};
|
||||
|
||||
const int srb_flag = 0;
|
||||
const bool rc = nr_pdcp_get_statistics(rnti, srb_flag, rb_id, &rb_pdcp);
|
||||
|
||||
if (!rc) continue;
|
||||
|
||||
pdcp_radio_bearer_stats_t *rd = &pdcp->msg.rb[i];
|
||||
|
||||
rd->txpdu_pkts = rb_pdcp.txpdu_pkts; /* aggregated number of tx packets */
|
||||
rd->txpdu_bytes = rb_pdcp.txpdu_bytes; /* aggregated bytes of tx packets */
|
||||
rd->txpdu_sn = rb_pdcp.txpdu_sn; /* current sequence number of last tx packet (or TX_NEXT) */
|
||||
rd->rxpdu_pkts = rb_pdcp.rxpdu_pkts; /* aggregated number of rx packets */
|
||||
rd->rxpdu_bytes = rb_pdcp.rxpdu_bytes; /* aggregated bytes of rx packets */
|
||||
rd->rxpdu_sn = rb_pdcp.rxpdu_sn; /* current sequence number of last rx packet (or RX_NEXT) */
|
||||
rd->rxpdu_oo_pkts = rb_pdcp.rxpdu_oo_pkts; /* aggregated number of out-of-order rx pkts (or RX_REORD) */
|
||||
rd->rxpdu_oo_bytes = rb_pdcp.rxpdu_oo_bytes; /* aggregated amount of out-of-order rx bytes */
|
||||
rd->rxpdu_dd_pkts = rb_pdcp.rxpdu_dd_pkts; /* aggregated number of duplicated discarded packets (or dropped packets because of other reasons such as integrity failure) (or RX_DELIV) */
|
||||
rd->rxpdu_dd_bytes = rb_pdcp.rxpdu_dd_bytes; /* aggregated amount of discarded packets' bytes */
|
||||
rd->rxpdu_ro_count = rb_pdcp.rxpdu_ro_count; /* this state variable indicates the COUNT value following the COUNT value associated with the PDCP Data PDU which triggered t-Reordering. (RX_REORD) */
|
||||
rd->txsdu_pkts = rb_pdcp.txsdu_pkts; /* number of SDUs delivered */
|
||||
rd->txsdu_bytes = rb_pdcp.txsdu_bytes; /* number of bytes of SDUs delivered */
|
||||
rd->rxsdu_pkts = rb_pdcp.rxsdu_pkts; /* number of SDUs received */
|
||||
rd->rxsdu_bytes = rb_pdcp.rxsdu_bytes; /* number of bytes of SDUs received */
|
||||
rd->rnti = rnti;
|
||||
rd->mode = rb_pdcp.mode; /* 0: PDCP AM, 1: PDCP UM, 2: PDCP TM */
|
||||
rd->rbid = rb_id;
|
||||
|
||||
++i;
|
||||
}
|
||||
#elif defined (NGRAN_GNB_CUUP)
|
||||
num_ues = nr_pdcp_get_num_ues(ue_id_list, MAX_MOBILES_PER_GNB);
|
||||
for (size_t i = 0; i < num_ues; i++) {
|
||||
for(int rb_id = 1; rb_id < 6; ++rb_id ){
|
||||
nr_pdcp_statistics_t rb_pdcp = {0};
|
||||
const int srb_flag = 0;
|
||||
const bool rc = nr_pdcp_get_statistics(ue_id_list[i], srb_flag, rb_id, &rb_pdcp);
|
||||
if(rc) ++total_num_rb;
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
pdcp->msg.len = total_num_rb;
|
||||
if (pdcp->msg.len > 0) {
|
||||
pdcp->msg.rb = calloc(pdcp->msg.len, sizeof(pdcp_radio_bearer_stats_t));
|
||||
assert(pdcp->msg.rb != NULL && "Memory exhausted!");
|
||||
|
||||
// Filling Radio Bearer Statistics
|
||||
#if defined (NGRAN_GNB_CUUP)
|
||||
fill_pdcp_stats_for_all_rbs(pdcp->msg.rb, num_ues, ue_id_list);
|
||||
#endif
|
||||
return true;
|
||||
}
|
||||
else {
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void read_pdcp_setup_sm(void* data)
|
||||
@@ -195,5 +156,3 @@ sm_ag_if_ans_t write_ctrl_pdcp_sm(void const* data)
|
||||
sm_ag_if_ans_t ans = {0};
|
||||
return ans;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
|
||||
#include "openair2/E2AP/flexric/src/agent/../sm/sm_io.h"
|
||||
|
||||
void read_pdcp_sm(void*);
|
||||
bool read_pdcp_sm(void*);
|
||||
|
||||
void read_pdcp_setup_sm(void* data);
|
||||
|
||||
|
||||
@@ -28,7 +28,6 @@
|
||||
#include "openair2/LAYER2/NR_MAC_gNB/mac_proto.h"
|
||||
#include "openair2/LAYER2/nr_rlc/nr_rlc_oai_api.h"
|
||||
#include "openair2/E2AP/flexric/src/util/time_now_us.h"
|
||||
#include "openair2/E2AP/flexric/test/rnd/fill_rnd_data_rlc.h"
|
||||
|
||||
static
|
||||
const int mod_id = 0;
|
||||
@@ -67,7 +66,7 @@ void active_avg_to_tx(NR_UEs_t* const UE_info)
|
||||
}
|
||||
}
|
||||
|
||||
void read_rlc_sm(void* data)
|
||||
bool read_rlc_sm(void* data)
|
||||
{
|
||||
assert(data != NULL);
|
||||
// assert(data->type == RLC_STATS_V0);
|
||||
@@ -161,6 +160,8 @@ void read_rlc_sm(void* data)
|
||||
++i;
|
||||
}
|
||||
}
|
||||
|
||||
return act_rb > 0;
|
||||
}
|
||||
|
||||
void read_rlc_setup_sm(void* data)
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
|
||||
#include "openair2/E2AP/flexric/src/agent/../sm/sm_io.h"
|
||||
|
||||
void read_rlc_sm(void*);
|
||||
bool read_rlc_sm(void*);
|
||||
|
||||
void read_rlc_setup_sm(void* data);
|
||||
|
||||
|
||||
@@ -24,13 +24,15 @@
|
||||
#include <assert.h>
|
||||
#include <stdio.h>
|
||||
|
||||
void read_slice_sm(void* data)
|
||||
bool read_slice_sm(void* data)
|
||||
{
|
||||
assert(data != NULL);
|
||||
// assert(data->type == SLICE_STATS_V0);
|
||||
|
||||
slice_ind_data_t* slice = (slice_ind_data_t*)data;
|
||||
fill_slice_ind_data(slice);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void read_slice_setup_sm(void* data)
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
|
||||
#include "openair2/E2AP/flexric/src/agent/../sm/sm_io.h"
|
||||
|
||||
void read_slice_sm(void*);
|
||||
bool read_slice_sm(void*);
|
||||
|
||||
void read_slice_setup_sm(void* data);
|
||||
|
||||
|
||||
@@ -23,13 +23,15 @@
|
||||
#include "../../flexric/test/rnd/fill_rnd_data_tc.h"
|
||||
#include <assert.h>
|
||||
|
||||
void read_tc_sm(void* data)
|
||||
bool read_tc_sm(void* data)
|
||||
{
|
||||
assert(data != NULL);
|
||||
//assert(data->type == TC_STATS_V0);
|
||||
|
||||
tc_ind_data_t* tc = (tc_ind_data_t*)data;
|
||||
fill_tc_ind_data(tc);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void read_tc_setup_sm(void* data)
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
|
||||
#include "openair2/E2AP/flexric/src/agent/../sm/sm_io.h"
|
||||
|
||||
void read_tc_sm(void*);
|
||||
bool read_tc_sm(void*);
|
||||
|
||||
void read_tc_setup_sm(void* data);
|
||||
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
add_library(e2_ran_func_oran STATIC
|
||||
ran_func_kpm.c
|
||||
ran_func_rc.c
|
||||
# For testing purposes
|
||||
../../flexric/test/rnd/fill_rnd_data_kpm.c
|
||||
../../flexric/test/rnd/fill_rnd_data_rc.c
|
||||
)
|
||||
|
||||
target_link_libraries(e2_ran_func_oran PUBLIC asn1_nr_rrc nr_rrc asn1_nr_rrc_hdrs)
|
||||
target_compile_definitions(e2_ran_func_oran PRIVATE ${E2AP_VERSION} ${KPM_VERSION})
|
||||
File diff suppressed because it is too large
Load Diff
@@ -24,7 +24,7 @@
|
||||
|
||||
#include "openair2/E2AP/flexric/src/agent/../sm/sm_io.h"
|
||||
|
||||
void read_kpm_sm(void*);
|
||||
bool read_kpm_sm(void*);
|
||||
|
||||
void read_kpm_setup_sm(void*);
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
*/
|
||||
|
||||
#include "ran_func_rc.h"
|
||||
#include "../../flexric/test/rnd/fill_rnd_data_rc.h"
|
||||
#include "../../flexric/test/rnd/fill_rnd_data_rc.h" // this dependancy will be taken out once RAN Function Definition is implemented
|
||||
#include "../../flexric/src/sm/rc_sm/ie/ir/lst_ran_param.h"
|
||||
#include "../../flexric/src/sm/rc_sm/ie/ir/ran_param_list.h"
|
||||
#include "../../flexric/src/agent/e2_agent_api.h"
|
||||
@@ -30,11 +30,15 @@
|
||||
#include <pthread.h>
|
||||
#include <unistd.h>
|
||||
|
||||
void read_rc_sm(void* data)
|
||||
// Please note: current implementation doesn't take split architecture into account, neither CU/DU nor CU-UP/CU-CP
|
||||
|
||||
bool read_rc_sm(void* data)
|
||||
{
|
||||
assert(data != NULL);
|
||||
// assert(data->type == RAN_CTRL_STATS_V1_03);
|
||||
assert(0!=0 && "Not implemented");
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void read_rc_setup_sm(void* data)
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
|
||||
#include "openair2/E2AP/flexric/src/agent/../sm/sm_io.h"
|
||||
|
||||
void read_rc_sm(void *);
|
||||
bool read_rc_sm(void *);
|
||||
|
||||
void read_rc_setup_sm(void* data);
|
||||
|
||||
|
||||
@@ -22,24 +22,35 @@
|
||||
#include "init_ran_func.h"
|
||||
#include "read_setup_ran.h"
|
||||
#include "../flexric/src/agent/e2_agent_api.h"
|
||||
|
||||
#if defined (NGRAN_GNB_DU)
|
||||
#include "CUSTOMIZED/ran_func_mac.h"
|
||||
#include "CUSTOMIZED/ran_func_rlc.h"
|
||||
#include "CUSTOMIZED/ran_func_pdcp.h"
|
||||
#include "CUSTOMIZED/ran_func_slice.h"
|
||||
#endif
|
||||
#if defined (NGRAN_GNB_CUUP)
|
||||
#include "CUSTOMIZED/ran_func_tc.h"
|
||||
#include "CUSTOMIZED/ran_func_gtp.h"
|
||||
#include "CUSTOMIZED/ran_func_pdcp.h"
|
||||
#endif
|
||||
|
||||
#include "O-RAN/ran_func_kpm.h"
|
||||
#include "O-RAN/ran_func_rc.h"
|
||||
|
||||
static
|
||||
void init_read_ind_tbl(read_ind_fp (*read_ind_tbl)[SM_AGENT_IF_READ_V0_END])
|
||||
{
|
||||
#if defined (NGRAN_GNB_DU)
|
||||
(*read_ind_tbl)[MAC_STATS_V0] = read_mac_sm;
|
||||
(*read_ind_tbl)[RLC_STATS_V0] = read_rlc_sm ;
|
||||
(*read_ind_tbl)[PDCP_STATS_V0] = read_pdcp_sm ;
|
||||
(*read_ind_tbl)[SLICE_STATS_V0] = read_slice_sm ;
|
||||
#endif
|
||||
#if defined (NGRAN_GNB_CUUP)
|
||||
(*read_ind_tbl)[TC_STATS_V0] = read_tc_sm ;
|
||||
(*read_ind_tbl)[GTP_STATS_V0] = read_gtp_sm ;
|
||||
(*read_ind_tbl)[PDCP_STATS_V0] = read_pdcp_sm ;
|
||||
#endif
|
||||
|
||||
(*read_ind_tbl)[KPM_STATS_V3_0] = read_kpm_sm ;
|
||||
(*read_ind_tbl)[RAN_CTRL_STATS_V1_03] = read_rc_sm;
|
||||
}
|
||||
@@ -47,12 +58,17 @@ void init_read_ind_tbl(read_ind_fp (*read_ind_tbl)[SM_AGENT_IF_READ_V0_END])
|
||||
static
|
||||
void init_read_setup_tbl(read_e2_setup_fp (*read_setup_tbl)[SM_AGENT_IF_E2_SETUP_ANS_V0_END])
|
||||
{
|
||||
#if defined (NGRAN_GNB_DU)
|
||||
(*read_setup_tbl)[MAC_AGENT_IF_E2_SETUP_ANS_V0] = read_mac_setup_sm;
|
||||
(*read_setup_tbl)[RLC_AGENT_IF_E2_SETUP_ANS_V0] = read_rlc_setup_sm ;
|
||||
(*read_setup_tbl)[PDCP_AGENT_IF_E2_SETUP_ANS_V0] = read_pdcp_setup_sm ;
|
||||
(*read_setup_tbl)[SLICE_AGENT_IF_E2_SETUP_ANS_V0] = read_slice_setup_sm ;
|
||||
#endif
|
||||
#if defined (NGRAN_GNB_CUUP)
|
||||
(*read_setup_tbl)[TC_AGENT_IF_E2_SETUP_ANS_V0] = read_tc_setup_sm ;
|
||||
(*read_setup_tbl)[GTP_AGENT_IF_E2_SETUP_ANS_V0] = read_gtp_setup_sm ;
|
||||
(*read_setup_tbl)[PDCP_AGENT_IF_E2_SETUP_ANS_V0] = read_pdcp_setup_sm ;
|
||||
#endif
|
||||
|
||||
(*read_setup_tbl)[KPM_V3_0_AGENT_IF_E2_SETUP_ANS_V0] = read_kpm_setup_sm ;
|
||||
(*read_setup_tbl)[RAN_CTRL_V1_3_AGENT_IF_E2_SETUP_ANS_V0] = read_rc_setup_sm;
|
||||
}
|
||||
@@ -60,24 +76,34 @@ void init_read_setup_tbl(read_e2_setup_fp (*read_setup_tbl)[SM_AGENT_IF_E2_SETUP
|
||||
static
|
||||
void init_write_ctrl( write_ctrl_fp (*write_ctrl_tbl)[SM_AGENT_IF_WRITE_CTRL_V0_END])
|
||||
{
|
||||
#if defined (NGRAN_GNB_DU)
|
||||
(*write_ctrl_tbl)[MAC_CTRL_REQ_V0] = write_ctrl_mac_sm;
|
||||
(*write_ctrl_tbl)[RLC_CTRL_REQ_V0] = write_ctrl_rlc_sm;
|
||||
(*write_ctrl_tbl)[PDCP_CTRL_REQ_V0] = write_ctrl_pdcp_sm;
|
||||
(*write_ctrl_tbl)[SLICE_CTRL_REQ_V0] = write_ctrl_slice_sm;
|
||||
#endif
|
||||
#if defined (NGRAN_GNB_CUUP)
|
||||
(*write_ctrl_tbl)[TC_CTRL_REQ_V0] = write_ctrl_tc_sm;
|
||||
(*write_ctrl_tbl)[GTP_CTRL_REQ_V0] = write_ctrl_gtp_sm;
|
||||
(*write_ctrl_tbl)[PDCP_CTRL_REQ_V0] = write_ctrl_pdcp_sm;
|
||||
#endif
|
||||
|
||||
(*write_ctrl_tbl)[RAN_CONTROL_CTRL_V1_03] = write_ctrl_rc_sm;
|
||||
}
|
||||
|
||||
static
|
||||
void init_write_subs(write_subs_fp (*write_subs_tbl)[SM_AGENT_IF_WRITE_SUBS_V0_END])
|
||||
{
|
||||
#if defined (NGRAN_GNB_DU)
|
||||
(*write_subs_tbl)[MAC_SUBS_V0] = NULL;
|
||||
(*write_subs_tbl)[RLC_SUBS_V0] = NULL;
|
||||
(*write_subs_tbl)[PDCP_SUBS_V0] = NULL;
|
||||
(*write_subs_tbl)[SLICE_SUBS_V0] = NULL;
|
||||
#endif
|
||||
#if defined (NGRAN_GNB_CUUP)
|
||||
(*write_subs_tbl)[TC_SUBS_V0] = NULL;
|
||||
(*write_subs_tbl)[GTP_SUBS_V0] = NULL;
|
||||
(*write_subs_tbl)[PDCP_SUBS_V0] = NULL;
|
||||
#endif
|
||||
|
||||
(*write_subs_tbl)[KPM_SUBS_V3_0] = NULL;
|
||||
(*write_subs_tbl)[RAN_CTRL_SUBS_V1_03] = write_subs_rc_sm;
|
||||
}
|
||||
@@ -96,4 +122,3 @@ sm_io_ag_ran_t init_ran_func_ag(void)
|
||||
|
||||
return io;
|
||||
}
|
||||
|
||||
|
||||
@@ -25,18 +25,66 @@
|
||||
#include <assert.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
void read_setup_ran(void* data)
|
||||
void read_setup_ran(void* data, const ngran_node_t node_type)
|
||||
{
|
||||
assert(data != NULL);
|
||||
#ifdef E2AP_V1
|
||||
|
||||
#elif defined(E2AP_V2) || defined(E2AP_V3)
|
||||
*((e2ap_node_component_config_add_t*)data) = fill_e2ap_node_component_config_add();
|
||||
|
||||
arr_node_component_config_add_t* dst = (arr_node_component_config_add_t*)data;
|
||||
if(node_type == ngran_gNB){
|
||||
dst->len_cca = 1;
|
||||
dst->cca = calloc(1, sizeof(e2ap_node_component_config_add_t));
|
||||
assert(dst->cca != NULL);
|
||||
// NGAP
|
||||
dst->cca[0] = fill_ngap_e2ap_node_component_config_add();
|
||||
} else if(node_type == ngran_gNB_CU){
|
||||
dst->len_cca = 2;
|
||||
dst->cca = calloc(2, sizeof(e2ap_node_component_config_add_t));
|
||||
assert(dst->cca != NULL);
|
||||
// NGAP
|
||||
dst->cca[0] = fill_ngap_e2ap_node_component_config_add();
|
||||
// F1AP
|
||||
dst->cca[1] = fill_f1ap_e2ap_node_component_config_add();
|
||||
} else if(node_type == ngran_gNB_DU){
|
||||
dst->len_cca = 1;
|
||||
dst->cca = calloc(1, sizeof(e2ap_node_component_config_add_t));
|
||||
assert(dst->cca != NULL);
|
||||
// F1AP
|
||||
dst->cca[0] = fill_f1ap_e2ap_node_component_config_add();
|
||||
} else if(node_type == ngran_gNB_CUCP){
|
||||
dst->len_cca = 3;
|
||||
dst->cca = calloc(3, sizeof(e2ap_node_component_config_add_t));
|
||||
assert(dst->cca != NULL);
|
||||
// NGAP
|
||||
dst->cca[0] = fill_ngap_e2ap_node_component_config_add();
|
||||
// F1AP
|
||||
dst->cca[1] = fill_f1ap_e2ap_node_component_config_add();
|
||||
// E1AP
|
||||
dst->cca[2] = fill_e1ap_e2ap_node_component_config_add();
|
||||
} else if(node_type == ngran_gNB_CUUP){
|
||||
dst->len_cca = 3;
|
||||
dst->cca = calloc(3, sizeof(e2ap_node_component_config_add_t));
|
||||
assert(dst->cca != NULL);
|
||||
// NGAP
|
||||
dst->cca[0] = fill_ngap_e2ap_node_component_config_add();
|
||||
// F1AP
|
||||
dst->cca[1] = fill_f1ap_e2ap_node_component_config_add();
|
||||
// E1AP
|
||||
dst->cca[2] = fill_e1ap_e2ap_node_component_config_add();
|
||||
} else if(node_type == ngran_eNB){
|
||||
dst->len_cca = 1;
|
||||
dst->cca = calloc(1, sizeof(e2ap_node_component_config_add_t));
|
||||
assert(dst->cca != NULL);
|
||||
// S1AP
|
||||
dst->cca[0] = fill_s1ap_e2ap_node_component_config_add();
|
||||
} else {
|
||||
assert(0 != 0 && "Not implemented");
|
||||
}
|
||||
|
||||
#else
|
||||
static_assert(0!=0, "Unknown E2AP version");
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -22,6 +22,8 @@
|
||||
#ifndef READ_SETUP_RAN_E2_AGENT_H
|
||||
#define READ_SETUP_RAN_E2_AGENT_H
|
||||
|
||||
void read_setup_ran(void* data);
|
||||
#include "common/ngran_types.h"
|
||||
|
||||
void read_setup_ran(void* data, const ngran_node_t node_type);
|
||||
|
||||
#endif
|
||||
|
||||
+43
-17
@@ -62,6 +62,15 @@ cd oai/
|
||||
|
||||
- By default, OAI will build the E2 Agent with E2AP v2 and KPM v2. If you want a different version, edit the variable E2AP\_VERSION and KPM\_VERSION at OAI's CMakeLists.txt file.
|
||||
|
||||
Currently available versions:
|
||||
| |KPM v2.03|KPM v3.00|
|
||||
|:-----------|:--------|:--------|
|
||||
| E2AP v1.01 | Y | Y |
|
||||
| E2AP v2.03 | Y | Y |
|
||||
| E2AP v3.01 | Y | Y |
|
||||
|
||||
Please note that KPM SM v2.01 is supported only in FlexRIC, but not in OAI.
|
||||
|
||||
```bash
|
||||
cd cmake_targets/
|
||||
./build_oai -I -w SIMU --gNB --nrUE --build-e2 --ninja
|
||||
@@ -89,7 +98,7 @@ git submodule update
|
||||
```bash
|
||||
git clone https://gitlab.eurecom.fr/mosaic5g/flexric flexric
|
||||
cd flexric/
|
||||
git checkout 93961d2480b2c7a5721e03435cb34cf9446d1ad1
|
||||
git checkout 70dd779f5339f4dac3ac176a24b49c45046a59fa
|
||||
```
|
||||
|
||||
### 2.2.2 Build FlexRIC
|
||||
@@ -104,11 +113,21 @@ sudo make install
|
||||
|
||||
By default the service model libraries will be installed in the path `/usr/local/lib/flexric` while the configuration file in `/usr/local/etc/flexric`.
|
||||
|
||||
Available SMs in this version are:
|
||||
* KPM v02.03 and KPM v03.00 (xapp_kpm_moni)
|
||||
* RC v01.03 (xapp_kpm_rc)
|
||||
* GTP (xapp_gtp_moni)
|
||||
* MAC + RLC + PDCP (xapp_mac_rlc_pdcp_moni)
|
||||
#### 2.2.3.1 Available Service Models
|
||||
1. KPM v02.03 and KPM v03.00 (`xapp_kpm_moni`)
|
||||
At the moment, the following measurements are supported in OAI RAN:
|
||||
* "DRB.PdcpSduVolumeDL"
|
||||
* "DRB.PdcpSduVolumeUL"
|
||||
* "DRB.RlcSduDelayDl"
|
||||
* "DRB.UEThpDl"
|
||||
* "DRB.UEThpUl"
|
||||
* "RRU.PrbTotDl"
|
||||
* "RRU.PrbTotUl"
|
||||
|
||||
2. RC v01.03 (`xapp_kpm_rc`)
|
||||
At the moment, OAI RAN supports the RAN control function "QoS flow mapping configuration", i.e. creating a new DRB.
|
||||
|
||||
3. MAC + RLC + PDCP + GTP (`xapp_gtp_mac_rlc_pdcp_moni`)
|
||||
|
||||
If you are interested in TC and SLICE SMs, please follow the instructions at https://gitlab.eurecom.fr/mosaic5g/flexric.
|
||||
|
||||
@@ -122,16 +141,23 @@ e2_agent = {
|
||||
}
|
||||
```
|
||||
|
||||
* start the gNB
|
||||
* start the gNB-mono
|
||||
```bash
|
||||
cd oai/cmake_targets/ran_build/build
|
||||
sudo ./nr-softmodem -O ../../../targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.usrpb210.conf --rfsim --sa -E
|
||||
```
|
||||
|
||||
* if CU-DU split is used, start the gNB as follows
|
||||
* if CU/DU split is used, start the gNB as follows
|
||||
```bash
|
||||
sudo ./nr-softmodem -O <path_to_du_conf_file> --rfsim --sa -E
|
||||
sudo ./nr-softmodem -O <path_to_cu_conf_file> --rfsim --sa -E
|
||||
sudo ./nr-softmodem -O <path_to_cu_conf_file> --sa
|
||||
```
|
||||
|
||||
* if CU-CP/CU-UP/DU split is used, start the gNB as follows
|
||||
```bash
|
||||
sudo ./nr-softmodem -O <path_to_du_conf_file> --rfsim --sa -E
|
||||
sudo ./nr-softmodem -O <path_to_cu_cp_conf_file> --sa
|
||||
sudo ./nr-cuup -O <path_to_cu_up_conf_file> --sa
|
||||
```
|
||||
|
||||
* start the nrUE
|
||||
@@ -152,17 +178,17 @@ cd flexric
|
||||
./build/examples/xApp/c/monitor/xapp_kpm_moni
|
||||
```
|
||||
|
||||
* start the GTP xApp
|
||||
* start the (MAC + RLC + PDCP + GTP) xApp
|
||||
```bash
|
||||
cd flexric
|
||||
./build/examples/xApp/c/monitor/xapp_gtp_moni
|
||||
```
|
||||
|
||||
* start the (MAC + RLC + PDCP) xApp
|
||||
```bash
|
||||
cd flexric
|
||||
./build/examples/xApp/c/monitor/xapp_mac_rlc_pdcp_moni
|
||||
./build/examples/xApp/c/monitor/xapp_gtp_mac_rlc_pdcp_moni
|
||||
```
|
||||
The latency that you observe in your monitor xApp is the latency from the E2 Agent to the nearRT-RIC and xApp.
|
||||
Therefore, FlexRIC is well suited for use cases with ultra low-latency requirements.
|
||||
Additionally, all the data received in the `xapp_gtp_mac_rlc_pdcp_moni` xApp is also written to /tmp/xapp_db in case that offline data processing is wanted (e.g., Machine Learning/Artificial Intelligence applications). You can browse the data using e.g., sqlitebrowser.
|
||||
Please note:
|
||||
* KPM SM database is not been updated, therefore commented in `flexric/src/xApp/db/sqlite3/sqlite3_wrapper.c:1152`
|
||||
* RC SM database is not yet implemented.
|
||||
|
||||
# Optional - Multiple UEs
|
||||
|
||||
|
||||
@@ -0,0 +1,50 @@
|
||||
/*
|
||||
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The OpenAirInterface Software Alliance licenses this file to You under
|
||||
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
|
||||
* except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.openairinterface.org/?page_id=698
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*-------------------------------------------------------------------------------
|
||||
* For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
* contact@openairinterface.org
|
||||
*/
|
||||
|
||||
#include "e2_agent_arg.h"
|
||||
#include "e2_agent_paramdef.h"
|
||||
#include "common/config/config_userapi.h"
|
||||
|
||||
e2_agent_args_t RCconfig_NR_E2agent(void)
|
||||
{
|
||||
paramdef_t e2agent_params[] = E2AGENT_PARAMS_DESC;
|
||||
int ret = config_get(config_get_if(), e2agent_params, sizeofArray(e2agent_params), CONFIG_STRING_E2AGENT);
|
||||
if (ret < 0) {
|
||||
printf("configuration file does not contain a \"%s\" section, applying default parameters from FlexRIC\n", CONFIG_STRING_E2AGENT);
|
||||
return (e2_agent_args_t) { 0 };
|
||||
}
|
||||
|
||||
bool enabled = config_isparamset(e2agent_params, E2AGENT_CONFIG_SMDIR_IDX)
|
||||
&& config_isparamset(e2agent_params, E2AGENT_CONFIG_IP_IDX);
|
||||
e2_agent_args_t dst = {.enabled = enabled};
|
||||
if (!enabled) {
|
||||
printf("E2 agent is DISABLED (for activation, define .%s.{%s,%s} parameters)\n", CONFIG_STRING_E2AGENT, E2AGENT_CONFIG_IP, E2AGENT_CONFIG_SMDIR);
|
||||
return dst;
|
||||
}
|
||||
|
||||
if (e2agent_params[E2AGENT_CONFIG_SMDIR_IDX].strptr != NULL)
|
||||
dst.sm_dir = *e2agent_params[E2AGENT_CONFIG_SMDIR_IDX].strptr;
|
||||
|
||||
if (e2agent_params[E2AGENT_CONFIG_IP_IDX].strptr != NULL)
|
||||
dst.ip = *e2agent_params[E2AGENT_CONFIG_IP_IDX].strptr;
|
||||
|
||||
return dst;
|
||||
}
|
||||
@@ -23,6 +23,8 @@
|
||||
#define E2_AGENT_ARGS_H
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
#include <stddef.h>
|
||||
|
||||
// Wrapper for OAI
|
||||
typedef struct{
|
||||
@@ -31,6 +33,8 @@ typedef struct{
|
||||
const bool enabled;
|
||||
} e2_agent_args_t;
|
||||
|
||||
e2_agent_args_t RCconfig_NR_E2agent(void);
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
/*
|
||||
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The OpenAirInterface Software Alliance licenses this file to You under
|
||||
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
|
||||
* except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.openairinterface.org/?page_id=698
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*-------------------------------------------------------------------------------
|
||||
* For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
* contact@openairinterface.org
|
||||
*/
|
||||
|
||||
#ifndef E2_AGENT_PARAMDEF_H_
|
||||
#define E2_AGENT_PARAMDEF_H_
|
||||
|
||||
/* E2 Agent configuration */
|
||||
#define CONFIG_STRING_E2AGENT "e2_agent"
|
||||
|
||||
#define E2AGENT_CONFIG_IP "near_ric_ip_addr"
|
||||
#define E2AGENT_CONFIG_SMDIR "sm_dir"
|
||||
|
||||
static const char* const e2agent_config_ip_default = "127.0.0.1";
|
||||
static const char* const e2agent_config_smdir_default = ".";
|
||||
|
||||
#define E2AGENT_PARAMS_DESC { \
|
||||
{E2AGENT_CONFIG_IP, "RIC IP address", 0, strptr:NULL, defstrval:(char*)e2agent_config_ip_default, TYPE_STRING, 0}, \
|
||||
{E2AGENT_CONFIG_SMDIR, "Directory with SMs to load", 0, strptr:NULL, defstrval:(char*)e2agent_config_smdir_default, TYPE_STRING, 0}, \
|
||||
}
|
||||
|
||||
#define E2AGENT_CONFIG_IP_IDX 0
|
||||
#define E2AGENT_CONFIG_SMDIR_IDX 1
|
||||
|
||||
#endif
|
||||
+1
-1
Submodule openair2/E2AP/flexric updated: 93961d2480...70dd779f53
@@ -2931,35 +2931,3 @@ void read_config_and_init(void) {
|
||||
RCconfig_RRC(enb_id, RC.rrc[enb_id]);
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef E2_AGENT
|
||||
|
||||
e2_agent_args_t RCconfig_E2agent(void)
|
||||
{
|
||||
paramdef_t e2agent_params[] = E2AGENT_PARAMS_DESC;
|
||||
int ret = config_get(config_get_if(), e2agent_params, sizeofArray(e2agent_params), CONFIG_STRING_E2AGENT);
|
||||
if (ret < 0) {
|
||||
LOG_W(GNB_APP, "configuration file does not contain a \"%s\" section, applying default parameters\n", CONFIG_STRING_E2AGENT);
|
||||
return (e2_agent_args_t) {0};
|
||||
}
|
||||
|
||||
bool enabled = config_isparamset(e2agent_params, E2AGENT_CONFIG_SMDIR_IDX)
|
||||
&& config_isparamset(e2agent_params, E2AGENT_CONFIG_IP_IDX);
|
||||
if (!enabled) {
|
||||
LOG_W(GNB_APP, "E2 agent is DISABLED (for activation, define .%s.{%s,%s} parameters)\n", CONFIG_STRING_E2AGENT, E2AGENT_CONFIG_IP, E2AGENT_CONFIG_SMDIR);
|
||||
return (e2_agent_args_t) {
|
||||
.enabled = false,
|
||||
};
|
||||
}
|
||||
|
||||
return (e2_agent_args_t) {
|
||||
.enabled = true,
|
||||
.ip = *e2agent_params[E2AGENT_CONFIG_IP_IDX].strptr,
|
||||
.sm_dir = *e2agent_params[E2AGENT_CONFIG_SMDIR_IDX].strptr,
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
@@ -1321,32 +1321,7 @@ typedef struct srb1_params_s {
|
||||
#define CONFIG_HLP_PARALLEL "PARALLEL_SINGLE_THREAD, PARALLEL_RU_L1_SPLIT, or PARALLEL_RU_L1_TRX_SPLIT(RU_L1_TRX_SPLIT by defult)\n"
|
||||
/*-------------------------------------------------------------------------------------------------------------------------------------------------------------*/
|
||||
|
||||
#ifdef E2_AGENT
|
||||
|
||||
/* E2 Agent configuration */
|
||||
#define CONFIG_STRING_E2AGENT "e2_agent"
|
||||
|
||||
#define E2AGENT_CONFIG_IP "near_ric_ip_addr"
|
||||
//#define E2AGENT_CONFIG_PORT "port"
|
||||
#define E2AGENT_CONFIG_SMDIR "sm_dir"
|
||||
|
||||
static const char* const e2agent_config_ip_default = "127.0.0.1";
|
||||
static const char* const e2agent_config_smdir_default = ".";
|
||||
|
||||
#define E2AGENT_PARAMS_DESC { \
|
||||
{E2AGENT_CONFIG_IP, "RIC IP address", 0, strptr:NULL, defstrval:(char*)e2agent_config_ip_default, TYPE_STRING, 0}, \
|
||||
{E2AGENT_CONFIG_SMDIR, "Directory with SMs to load", 0, strptr:NULL, defstrval:(char*)e2agent_config_smdir_default, TYPE_STRING, 0}, \
|
||||
}
|
||||
/*
|
||||
// {E2AGENT_CONFIG_PORT, "RIC port", 0, u16ptr:NULL, defuintval:e2agent_config_port_default, TYPE_UINT16, 0}, \
|
||||
}
|
||||
*/
|
||||
|
||||
#define E2AGENT_CONFIG_IP_IDX 0
|
||||
#define E2AGENT_CONFIG_SMDIR_IDX 1
|
||||
//#define E2AGENT_CONFIG_PORT_IDX 2
|
||||
|
||||
#endif // E2_AGENT
|
||||
|
||||
|
||||
#include "enb_paramdef_emtc.h"
|
||||
|
||||
@@ -89,6 +89,12 @@ int CU_handle_F1_SETUP_REQUEST(instance_t instance, sctp_assoc_t assoc_id, uint3
|
||||
MessageDef *message_p = itti_alloc_new_message(TASK_CU_F1, 0, F1AP_SETUP_REQ);
|
||||
message_p->ittiMsgHeader.originInstance = assoc_id;
|
||||
f1ap_setup_req_t *req = &F1AP_SETUP_REQ(message_p);
|
||||
|
||||
/* Transaction ID*/
|
||||
F1AP_FIND_PROTOCOLIE_BY_ID(F1AP_F1SetupRequestIEs_t, ie, container, F1AP_ProtocolIE_ID_id_TransactionID, true);
|
||||
req->transaction_id = ie->value.choice.TransactionID;
|
||||
LOG_D(F1AP, "req->transaction_id %lu \n", req->transaction_id);
|
||||
|
||||
/* gNB_DU_id */
|
||||
// this function exits if the ie is mandatory
|
||||
F1AP_FIND_PROTOCOLIE_BY_ID(F1AP_F1SetupRequestIEs_t, ie, container,
|
||||
@@ -180,22 +186,40 @@ int CU_handle_F1_SETUP_REQUEST(instance_t instance, sctp_assoc_t assoc_id, uint3
|
||||
} else {
|
||||
AssertFatal(false, "unknown NR Mode info %d\n", servedCellInformation->nR_Mode_Info.present);
|
||||
}
|
||||
|
||||
|
||||
struct F1AP_GNB_DU_System_Information * DUsi=served_cells_item->gNB_DU_System_Information;
|
||||
// System Information
|
||||
req->cell[i].sys_info = calloc(1, sizeof(*req->cell[i].sys_info));
|
||||
AssertFatal(req->cell[i].sys_info != NULL, "out of memory\n");
|
||||
f1ap_gnb_du_system_info_t *sys_info = req->cell[i].sys_info;
|
||||
/* mib */
|
||||
sys_info->mib = calloc(DUsi->mIB_message.size, sizeof(char));
|
||||
memcpy(sys_info->mib, DUsi->mIB_message.buf, DUsi->mIB_message.size);
|
||||
sys_info->mib_length = DUsi->mIB_message.size;
|
||||
/* sib1 */
|
||||
sys_info->sib1 = calloc(DUsi->sIB1_message.size, sizeof(char));
|
||||
memcpy(sys_info->sib1, DUsi->sIB1_message.buf, DUsi->sIB1_message.size);
|
||||
sys_info->sib1_length = DUsi->sIB1_message.size;
|
||||
if (DUsi != NULL) {
|
||||
// System Information
|
||||
req->cell[i].sys_info = calloc(1, sizeof(*req->cell[i].sys_info));
|
||||
AssertFatal(req->cell[i].sys_info != NULL, "out of memory\n");
|
||||
f1ap_gnb_du_system_info_t *sys_info = req->cell[i].sys_info;
|
||||
/* mib */
|
||||
sys_info->mib = calloc(DUsi->mIB_message.size, sizeof(char));
|
||||
memcpy(sys_info->mib, DUsi->mIB_message.buf, DUsi->mIB_message.size);
|
||||
sys_info->mib_length = DUsi->mIB_message.size;
|
||||
/* sib1 */
|
||||
sys_info->sib1 = calloc(DUsi->sIB1_message.size, sizeof(char));
|
||||
memcpy(sys_info->sib1, DUsi->sIB1_message.buf, DUsi->sIB1_message.size);
|
||||
sys_info->sib1_length = DUsi->sIB1_message.size;
|
||||
}
|
||||
}
|
||||
|
||||
/* Handle RRC Version */
|
||||
F1AP_FIND_PROTOCOLIE_BY_ID(F1AP_F1SetupRequestIEs_t, ie, container,
|
||||
F1AP_ProtocolIE_ID_id_GNB_DU_RRC_Version, true);
|
||||
// Latest RRC Version: "This IE is not used in this release."
|
||||
// BIT_STRING_to_uint8(&ie->value.choice.RRC_Version.latest_RRC_Version);
|
||||
if (ie->value.choice.RRC_Version.iE_Extensions) {
|
||||
F1AP_ProtocolExtensionContainer_10696P228_t *ext =
|
||||
(F1AP_ProtocolExtensionContainer_10696P228_t *)ie->value.choice.RRC_Version.iE_Extensions;
|
||||
if (ext->list.count > 0) {
|
||||
F1AP_RRC_Version_ExtIEs_t *rrcext = ext->list.array[0];
|
||||
OCTET_STRING_t *os = &rrcext->extensionValue.choice.OCTET_STRING_SIZE_3_;
|
||||
DevAssert(os->size == 3);
|
||||
for (int i = 0; i < 3; ++i)
|
||||
req->rrc_ver[i] = os->buf[i];
|
||||
}
|
||||
}
|
||||
itti_send_msg_to_task(TASK_RRC_GNB, GNB_MODULE_ID_TO_INSTANCE(instance), message_p);
|
||||
|
||||
return 0;
|
||||
@@ -220,7 +244,7 @@ int CU_send_F1_SETUP_RESPONSE(sctp_assoc_t assoc_id, f1ap_setup_resp_t *f1ap_set
|
||||
ie1->id = F1AP_ProtocolIE_ID_id_TransactionID;
|
||||
ie1->criticality = F1AP_Criticality_reject;
|
||||
ie1->value.present = F1AP_F1SetupResponseIEs__value_PR_TransactionID;
|
||||
ie1->value.choice.TransactionID = F1AP_get_next_transaction_identifier(0, 0);
|
||||
ie1->value.choice.TransactionID = f1ap_setup_resp->transaction_id;
|
||||
|
||||
/* optional */
|
||||
/* c2. GNB_CU_Name */
|
||||
@@ -292,6 +316,36 @@ int CU_send_F1_SETUP_RESPONSE(sctp_assoc_t assoc_id, f1ap_setup_resp_t *f1ap_set
|
||||
}
|
||||
}
|
||||
|
||||
/* c5. RRC VERSION */
|
||||
asn1cSequenceAdd(out->protocolIEs.list, F1AP_F1SetupResponseIEs_t, ie4);
|
||||
ie4->id = F1AP_ProtocolIE_ID_id_GNB_CU_RRC_Version;
|
||||
ie4->criticality = F1AP_Criticality_reject;
|
||||
ie4->value.present = F1AP_F1SetupResponseIEs__value_PR_RRC_Version;
|
||||
// RRC Version: "This IE is not used in this release."
|
||||
// we put one bit for each byte in rrc_ver that is != 0
|
||||
uint8_t bits = 0;
|
||||
for (int i = 0; i < 3; ++i)
|
||||
bits |= (f1ap_setup_resp->rrc_ver[i] != 0) << i;
|
||||
BIT_STRING_t *bs = &ie4->value.choice.RRC_Version.latest_RRC_Version;
|
||||
bs->buf = calloc(1, sizeof(char));
|
||||
AssertFatal(bs->buf != NULL, "out of memory\n");
|
||||
bs->buf[0] = bits;
|
||||
bs->size = 1;
|
||||
bs->bits_unused = 5;
|
||||
|
||||
F1AP_ProtocolExtensionContainer_10696P228_t *p = (F1AP_ProtocolExtensionContainer_10696P228_t*)calloc(1, sizeof(F1AP_ProtocolExtensionContainer_10696P228_t));
|
||||
asn1cSequenceAdd(p->list, F1AP_RRC_Version_ExtIEs_t, rrcv_ext);
|
||||
rrcv_ext->id = F1AP_ProtocolIE_ID_id_latest_RRC_Version_Enhanced;
|
||||
rrcv_ext->criticality = F1AP_Criticality_ignore;
|
||||
rrcv_ext->extensionValue.present = F1AP_RRC_Version_ExtIEs__extensionValue_PR_OCTET_STRING_SIZE_3_;
|
||||
OCTET_STRING_t *os = &rrcv_ext->extensionValue.choice.OCTET_STRING_SIZE_3_;
|
||||
os->size = 3;
|
||||
os->buf = malloc(3 * sizeof(*os->buf));
|
||||
AssertFatal(os->buf != NULL, "out of memory\n");
|
||||
for (int i = 0; i < 3; ++i)
|
||||
os->buf[i] = f1ap_setup_resp->rrc_ver[i];
|
||||
ie4->value.choice.RRC_Version.iE_Extensions = (struct F1AP_ProtocolExtensionContainer *)p;
|
||||
|
||||
/* encode */
|
||||
if (f1ap_encode_pdu(&pdu, &buffer, &len) < 0) {
|
||||
LOG_E(F1AP, "Failed to encode F1 setup response\n");
|
||||
|
||||
@@ -274,25 +274,49 @@ int DU_send_F1_SETUP_REQUEST(sctp_assoc_t assoc_id, f1ap_setup_req_t *setup_req)
|
||||
OCTET_STRING_fromBuf(&served_cell_information->measurementTimingConfiguration,
|
||||
measurementTimingConfiguration,
|
||||
strlen(measurementTimingConfiguration));
|
||||
asn1cCalloc(gnb_du_served_cells_item->gNB_DU_System_Information, gNB_DU_System_Information);
|
||||
|
||||
/* 4.1.2 gNB-DU System Information */
|
||||
AssertFatal(setup_req->cell[i].sys_info != NULL, "assume that sys_info is present, which is not the case\n");
|
||||
const f1ap_gnb_du_system_info_t *sys_info = setup_req->cell[i].sys_info;
|
||||
OCTET_STRING_fromBuf(&gNB_DU_System_Information->mIB_message, (const char *)sys_info->mib, sys_info->mib_length);
|
||||
OCTET_STRING_fromBuf(&gNB_DU_System_Information->sIB1_message, (const char *)sys_info->sib1, sys_info->sib1_length);
|
||||
if (setup_req->cell[i].sys_info != NULL) {
|
||||
asn1cCalloc(gnb_du_served_cells_item->gNB_DU_System_Information, gNB_DU_System_Information);
|
||||
const f1ap_gnb_du_system_info_t *sys_info = setup_req->cell[i].sys_info;
|
||||
AssertFatal(sys_info->mib != NULL, "MIB must be present in DU sys info\n");
|
||||
OCTET_STRING_fromBuf(&gNB_DU_System_Information->mIB_message, (const char *)sys_info->mib, sys_info->mib_length);
|
||||
AssertFatal(sys_info->sib1 != NULL, "SIB1 must be present in DU sys info\n");
|
||||
OCTET_STRING_fromBuf(&gNB_DU_System_Information->sIB1_message, (const char *)sys_info->sib1, sys_info->sib1_length);
|
||||
}
|
||||
}
|
||||
|
||||
/* mandatory */
|
||||
/* c5. RRC VERSION */
|
||||
asn1cSequenceAdd(f1Setup->protocolIEs.list, F1AP_F1SetupRequestIEs_t, ie2);
|
||||
ie2->id = F1AP_ProtocolIE_ID_id_GNB_DU_RRC_Version;
|
||||
ie2->criticality = F1AP_Criticality_reject;
|
||||
ie2->value.present = F1AP_F1SetupRequestIEs__value_PR_RRC_Version;
|
||||
ie2->value.choice.RRC_Version.latest_RRC_Version.buf=calloc(1,sizeof(char));
|
||||
ie2->value.choice.RRC_Version.latest_RRC_Version.buf[0] = 0xe0;
|
||||
ie2->value.choice.RRC_Version.latest_RRC_Version.size = 1;
|
||||
ie2->value.choice.RRC_Version.latest_RRC_Version.bits_unused = 5;
|
||||
ie2->id = F1AP_ProtocolIE_ID_id_GNB_DU_RRC_Version;
|
||||
ie2->criticality = F1AP_Criticality_reject;
|
||||
ie2->value.present = F1AP_F1SetupRequestIEs__value_PR_RRC_Version;
|
||||
// RRC Version: "This IE is not used in this release."
|
||||
// we put one bit for each byte in rrc_ver that is != 0
|
||||
uint8_t bits = 0;
|
||||
for (int i = 0; i < 3; ++i)
|
||||
bits |= (setup_req->rrc_ver[i] != 0) << i;
|
||||
BIT_STRING_t *bs = &ie2->value.choice.RRC_Version.latest_RRC_Version;
|
||||
bs->buf = calloc(1, sizeof(char));
|
||||
AssertFatal(bs->buf != NULL, "out of memory\n");
|
||||
bs->buf[0] = bits;
|
||||
bs->size = 1;
|
||||
bs->bits_unused = 5;
|
||||
|
||||
F1AP_ProtocolExtensionContainer_10696P228_t *p = calloc(1, sizeof(F1AP_ProtocolExtensionContainer_10696P228_t));
|
||||
asn1cSequenceAdd(p->list, F1AP_RRC_Version_ExtIEs_t, rrcv_ext);
|
||||
rrcv_ext->id = F1AP_ProtocolIE_ID_id_latest_RRC_Version_Enhanced;
|
||||
rrcv_ext->criticality = F1AP_Criticality_ignore;
|
||||
rrcv_ext->extensionValue.present = F1AP_RRC_Version_ExtIEs__extensionValue_PR_OCTET_STRING_SIZE_3_;
|
||||
OCTET_STRING_t *os = &rrcv_ext->extensionValue.choice.OCTET_STRING_SIZE_3_;
|
||||
os->size = 3;
|
||||
os->buf = malloc(3 * sizeof(*os->buf));
|
||||
AssertFatal(os->buf != NULL, "out of memory\n");
|
||||
for (int i = 0; i < 3; ++i)
|
||||
os->buf[i] = setup_req->rrc_ver[i];
|
||||
ie2->value.choice.RRC_Version.iE_Extensions = (struct F1AP_ProtocolExtensionContainer*)p;
|
||||
|
||||
/* encode */
|
||||
if (f1ap_encode_pdu(&pdu, &buffer, &len) < 0) {
|
||||
LOG_E(F1AP, "Failed to encode F1 setup request\n");
|
||||
@@ -339,7 +363,7 @@ int DU_handle_F1_SETUP_RESPONSE(instance_t instance, sctp_assoc_t assoc_id, uint
|
||||
AssertFatal(ie->criticality == F1AP_Criticality_ignore,
|
||||
"ie->criticality != F1AP_Criticality_ignore\n");
|
||||
AssertFatal(ie->value.present == F1AP_F1SetupResponseIEs__value_PR_GNB_CU_Name,
|
||||
"ie->value.present != F1AP_F1SetupResponseIEs__value_PR_TransactionID\n");
|
||||
"ie->value.present != F1AP_F1SetupResponseIEs__value_PR_GNB_CU_Name\n");
|
||||
resp.gNB_CU_name = malloc(ie->value.choice.GNB_CU_Name.size+1);
|
||||
memcpy(resp.gNB_CU_name, ie->value.choice.GNB_CU_Name.buf, ie->value.choice.GNB_CU_Name.size);
|
||||
resp.gNB_CU_name[ie->value.choice.GNB_CU_Name.size] = '\0';
|
||||
@@ -347,7 +371,21 @@ int DU_handle_F1_SETUP_RESPONSE(instance_t instance, sctp_assoc_t assoc_id, uint
|
||||
break;
|
||||
|
||||
case F1AP_ProtocolIE_ID_id_GNB_CU_RRC_Version:
|
||||
LOG_D(F1AP, "F1AP: Received GNB-CU-RRC-Version, ignoring\n");
|
||||
AssertFatal(ie->criticality == F1AP_Criticality_reject,
|
||||
"ie->criticality != F1AP_Criticality_reject\n");
|
||||
AssertFatal(ie->value.present == F1AP_F1SetupResponseIEs__value_PR_RRC_Version,
|
||||
"ie->value.present != F1AP_F1SetupResponseIEs__value_PR_RRC_Version\n");
|
||||
// RRC Version: "This IE is not used in this release."
|
||||
if(ie->value.choice.RRC_Version.iE_Extensions) {
|
||||
F1AP_ProtocolExtensionContainer_10696P228_t *ext =
|
||||
(F1AP_ProtocolExtensionContainer_10696P228_t *)ie->value.choice.RRC_Version.iE_Extensions;
|
||||
if(ext->list.count > 0){
|
||||
F1AP_RRC_Version_ExtIEs_t *rrcext = ext->list.array[0];
|
||||
OCTET_STRING_t *os = &rrcext->extensionValue.choice.OCTET_STRING_SIZE_3_;
|
||||
for (int i = 0; i < 3; i++)
|
||||
resp.rrc_ver[i] = os->buf[i];
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case F1AP_ProtocolIE_ID_id_Cells_to_be_Activated_List: {
|
||||
|
||||
@@ -1153,18 +1153,20 @@ static f1ap_setup_req_t *RC_read_F1Setup(uint64_t id,
|
||||
|
||||
req->cell[0].info.measurement_timing_information = "0";
|
||||
|
||||
int buf_len = 3; // this is what we assume in monolithic
|
||||
req->cell[0].sys_info = calloc(1, sizeof(*req->cell[0].sys_info));
|
||||
AssertFatal(req->cell[0].sys_info != NULL, "out of memory\n");
|
||||
f1ap_gnb_du_system_info_t *sys_info = req->cell[0].sys_info;
|
||||
sys_info->mib = calloc(buf_len, sizeof(*sys_info->mib));
|
||||
DevAssert(sys_info->mib != NULL);
|
||||
DevAssert(mib != NULL);
|
||||
sys_info->mib_length = encode_MIB_NR(mib, 0, sys_info->mib, buf_len);
|
||||
DevAssert(sys_info->mib_length == buf_len);
|
||||
|
||||
if (get_softmodem_params()->sa) {
|
||||
// in NSA we don't transmit SIB1
|
||||
// in NSA we don't transmit SIB1, so cannot fill DU system information
|
||||
// so cannot send MIB either
|
||||
|
||||
int buf_len = 3; // this is what we assume in monolithic
|
||||
req->cell[0].sys_info = calloc(1, sizeof(*req->cell[0].sys_info));
|
||||
AssertFatal(req->cell[0].sys_info != NULL, "out of memory\n");
|
||||
f1ap_gnb_du_system_info_t *sys_info = req->cell[0].sys_info;
|
||||
sys_info->mib = calloc(buf_len, sizeof(*sys_info->mib));
|
||||
DevAssert(sys_info->mib != NULL);
|
||||
DevAssert(mib != NULL);
|
||||
sys_info->mib_length = encode_MIB_NR(mib, 0, sys_info->mib, buf_len);
|
||||
DevAssert(sys_info->mib_length == buf_len);
|
||||
|
||||
DevAssert(sib1 != NULL);
|
||||
NR_SIB1_t *bcch_SIB1 = sib1->message.choice.c1->choice.systemInformationBlockType1;
|
||||
sys_info->sib1 = calloc(NR_MAX_SIB_LENGTH / 8, sizeof(*sys_info->sib1));
|
||||
@@ -1173,6 +1175,9 @@ static f1ap_setup_req_t *RC_read_F1Setup(uint64_t id,
|
||||
sys_info->sib1_length = (enc_rval.encoded + 7) / 8;
|
||||
}
|
||||
|
||||
int num = read_version(TO_STRING(NR_RRC_VERSION), &req->rrc_ver[0], &req->rrc_ver[1], &req->rrc_ver[2]);
|
||||
AssertFatal(num == 3, "could not read RRC version string %s\n", TO_STRING(NR_RRC_VERSION));
|
||||
|
||||
return req;
|
||||
}
|
||||
|
||||
@@ -2267,33 +2272,3 @@ ngran_node_t get_node_type(void)
|
||||
return ngran_gNB;
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef E2_AGENT
|
||||
|
||||
e2_agent_args_t RCconfig_NR_E2agent(void)
|
||||
{
|
||||
paramdef_t e2agent_params[] = E2AGENT_PARAMS_DESC;
|
||||
int ret = config_get(config_get_if(), e2agent_params, sizeofArray(e2agent_params), CONFIG_STRING_E2AGENT);
|
||||
if (ret < 0) {
|
||||
LOG_W(GNB_APP, "configuration file does not contain a \"%s\" section, applying default parameters from FlexRIC\n", CONFIG_STRING_E2AGENT);
|
||||
return (e2_agent_args_t) { 0 };
|
||||
}
|
||||
|
||||
bool enabled = config_isparamset(e2agent_params, E2AGENT_CONFIG_SMDIR_IDX)
|
||||
&& config_isparamset(e2agent_params, E2AGENT_CONFIG_IP_IDX);
|
||||
e2_agent_args_t dst = {.enabled = enabled};
|
||||
if (!enabled) {
|
||||
LOG_W(GNB_APP, "E2 agent is DISABLED (for activation, define .%s.{%s,%s} parameters)\n", CONFIG_STRING_E2AGENT, E2AGENT_CONFIG_IP, E2AGENT_CONFIG_SMDIR);
|
||||
return dst;
|
||||
}
|
||||
|
||||
if (e2agent_params[E2AGENT_CONFIG_SMDIR_IDX].strptr != NULL)
|
||||
dst.sm_dir = *e2agent_params[E2AGENT_CONFIG_SMDIR_IDX].strptr;
|
||||
|
||||
if (e2agent_params[E2AGENT_CONFIG_IP_IDX].strptr != NULL)
|
||||
dst.ip = *e2agent_params[E2AGENT_CONFIG_IP_IDX].strptr;
|
||||
|
||||
return dst;
|
||||
}
|
||||
|
||||
#endif // E2_AGENT
|
||||
|
||||
@@ -68,7 +68,6 @@
|
||||
// NR UE defs
|
||||
// ==========
|
||||
|
||||
#define NB_NR_UE_MAC_INST 1
|
||||
#define MAX_NUM_BWP_UE 5
|
||||
#define NUM_SLOT_FRAME 10
|
||||
|
||||
@@ -452,6 +451,7 @@ typedef struct {
|
||||
|
||||
/*!\brief Top level UE MAC structure */
|
||||
typedef struct {
|
||||
module_id_t ue_id;
|
||||
NR_UE_L2_STATE_t state;
|
||||
int servCellIndex;
|
||||
long physCellId;
|
||||
|
||||
@@ -149,7 +149,7 @@
|
||||
\param module_id module id */
|
||||
void nr_ue_init_mac(module_id_t module_idP);
|
||||
|
||||
void send_srb0_rrc(int rnti, const uint8_t *sdu, sdu_size_t sdu_len, void *data);
|
||||
void send_srb0_rrc(int ue_id, const uint8_t *sdu, sdu_size_t sdu_len, void *data);
|
||||
|
||||
/**\brief apply default configuration values in nr_mac instance
|
||||
\param mac mac instance */
|
||||
@@ -197,10 +197,10 @@ void nr_rrc_mac_config_req_sib1(module_id_t module_id,
|
||||
|
||||
void nr_rrc_mac_config_req_reset(module_id_t module_id, NR_UE_MAC_reset_cause_t cause);
|
||||
|
||||
/**\brief initialization NR UE MAC instance(s), total number of MAC instance based on NB_NR_UE_MAC_INST*/
|
||||
NR_UE_MAC_INST_t * nr_l2_init_ue();
|
||||
/**\brief initialization NR UE MAC instance(s)*/
|
||||
NR_UE_MAC_INST_t * nr_l2_init_ue(int nb_inst);
|
||||
|
||||
/**\brief fetch MAC instance by module_id, within 0 - (NB_NR_UE_MAC_INST-1)
|
||||
/**\brief fetch MAC instance by module_id
|
||||
\param module_id index of MAC instance(s)*/
|
||||
NR_UE_MAC_INST_t *get_mac_inst(module_id_t module_id);
|
||||
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
#include "openair2/LAYER2/RLC/rlc.h"
|
||||
static NR_UE_MAC_INST_t *nr_ue_mac_inst;
|
||||
|
||||
void send_srb0_rrc(int rnti, const uint8_t *sdu, sdu_size_t sdu_len, void *data)
|
||||
void send_srb0_rrc(int ue_id, const uint8_t *sdu, sdu_size_t sdu_len, void *data)
|
||||
{
|
||||
AssertFatal(sdu_len > 0 && sdu_len < CCCH_SDU_SIZE, "invalid CCCH SDU size %d\n", sdu_len);
|
||||
|
||||
@@ -50,13 +50,12 @@ void send_srb0_rrc(int rnti, const uint8_t *sdu, sdu_size_t sdu_len, void *data)
|
||||
memset(NR_RRC_MAC_CCCH_DATA_IND(message_p).sdu, 0, sdu_len);
|
||||
memcpy(NR_RRC_MAC_CCCH_DATA_IND(message_p).sdu, sdu, sdu_len);
|
||||
NR_RRC_MAC_CCCH_DATA_IND(message_p).sdu_size = sdu_len;
|
||||
NR_RRC_MAC_CCCH_DATA_IND(message_p).rnti = rnti;
|
||||
itti_send_msg_to_task(TASK_RRC_NRUE, 0, message_p);
|
||||
itti_send_msg_to_task(TASK_RRC_NRUE, ue_id, message_p);
|
||||
}
|
||||
|
||||
void send_msg3_rrc_request(module_id_t mod_id, int rnti)
|
||||
{
|
||||
nr_rlc_activate_srb0(rnti, NULL, send_srb0_rrc);
|
||||
nr_rlc_activate_srb0(mod_id, NULL, send_srb0_rrc);
|
||||
nr_mac_rrc_msg3_ind(mod_id, rnti);
|
||||
}
|
||||
|
||||
@@ -112,26 +111,32 @@ void nr_ue_mac_default_configs(NR_UE_MAC_INST_t *mac)
|
||||
}
|
||||
}
|
||||
|
||||
NR_UE_MAC_INST_t *nr_l2_init_ue()
|
||||
NR_UE_MAC_INST_t *nr_l2_init_ue(int nb_inst)
|
||||
{
|
||||
//init mac here
|
||||
nr_ue_mac_inst = (NR_UE_MAC_INST_t *)calloc(NB_NR_UE_MAC_INST, sizeof(NR_UE_MAC_INST_t));
|
||||
nr_ue_mac_inst = (NR_UE_MAC_INST_t *)calloc(nb_inst, sizeof(NR_UE_MAC_INST_t));
|
||||
AssertFatal(nr_ue_mac_inst, "Couldn't allocate %d instances of MAC module\n", nb_inst);
|
||||
|
||||
for (int j = 0; j < NB_NR_UE_MAC_INST; j++) {
|
||||
for (int j = 0; j < nb_inst; j++) {
|
||||
nr_ue_init_mac(j);
|
||||
NR_UE_MAC_INST_t *mac = get_mac_inst(j);
|
||||
mac->ue_id = j;
|
||||
nr_ue_mac_default_configs(mac);
|
||||
if (get_softmodem_params()->sa)
|
||||
ue_init_config_request(mac, get_softmodem_params()->numerology);
|
||||
}
|
||||
|
||||
int rc = rlc_module_init(0);
|
||||
AssertFatal(rc == 0, "%s: Could not initialize RLC layer\n", __FUNCTION__);
|
||||
AssertFatal(rc == 0, "Could not initialize RLC layer\n");
|
||||
|
||||
return (nr_ue_mac_inst);
|
||||
}
|
||||
|
||||
NR_UE_MAC_INST_t *get_mac_inst(module_id_t module_id) {
|
||||
return &nr_ue_mac_inst[(int)module_id];
|
||||
NR_UE_MAC_INST_t *get_mac_inst(module_id_t module_id)
|
||||
{
|
||||
NR_UE_MAC_INST_t *mac = &nr_ue_mac_inst[(int)module_id];
|
||||
AssertFatal(mac, "Couldn't get MAC inst %d\n", module_id);
|
||||
return mac;
|
||||
}
|
||||
|
||||
void reset_mac_inst(NR_UE_MAC_INST_t *nr_mac)
|
||||
@@ -206,12 +211,13 @@ void release_mac_configuration(NR_UE_MAC_INST_t *mac)
|
||||
free(sc->maxMIMO_Layers_PUSCH);
|
||||
memset(&mac->sc_info, 0, sizeof(mac->sc_info));
|
||||
|
||||
mac->current_DL_BWP = NULL;
|
||||
mac->current_UL_BWP = NULL;
|
||||
|
||||
for (int i = 0; i < mac->dl_BWPs.count; i++)
|
||||
release_dl_BWP(mac, i);
|
||||
for (int i = 0; i < mac->ul_BWPs.count; i++)
|
||||
release_ul_BWP(mac, i);
|
||||
mac->current_DL_BWP = NULL;
|
||||
mac->current_UL_BWP = NULL;
|
||||
|
||||
for (int i = 0; i < NR_MAX_NUM_LCID; i++) {
|
||||
nr_release_mac_config_logicalChannelBearer(mac, i + 1);
|
||||
|
||||
@@ -620,7 +620,7 @@ void nr_get_msg3_payload(module_id_t mod_id, uint8_t *buf, int TBS_max)
|
||||
// if RRC has called nr_rlc_srb_recv_sdu(),
|
||||
// we are good even if the name is misleading (we send a ssrb msg, not receive if)
|
||||
tbs_size_t len = mac_rlc_data_req(mod_id,
|
||||
ra->t_crnti,
|
||||
mac->ue_id,
|
||||
0,
|
||||
0,
|
||||
ENB_FLAG_NO,
|
||||
|
||||
@@ -2409,7 +2409,6 @@ bool trigger_periodic_scheduling_request(NR_UE_MAC_INST_t *mac, PUCCH_sched_t *p
|
||||
int8_t nr_ue_get_SR(module_id_t module_idP, frame_t frameP, slot_t slot)
|
||||
{
|
||||
// no UL-SCH resources available for this tti && UE has a valid PUCCH resources for SR configuration for this tti
|
||||
DevCheck(module_idP < NB_NR_UE_MAC_INST, module_idP, NB_NR_UE_MAC_INST, 0);
|
||||
NR_UE_MAC_INST_t *mac = get_mac_inst(module_idP);
|
||||
NR_UE_SCHEDULING_INFO *si = &mac->scheduling_info;
|
||||
int max_sr_transmissions = (1 << (2 + si->sr_TransMax));
|
||||
@@ -3607,7 +3606,7 @@ void nr_ue_process_mac_pdu(nr_downlink_indication_t *dl_info,
|
||||
}
|
||||
|
||||
mac_rlc_data_ind(module_idP,
|
||||
mac->crnti,
|
||||
mac->ue_id,
|
||||
module_idP,
|
||||
frameP,
|
||||
ENB_FLAG_NO,
|
||||
@@ -3745,7 +3744,7 @@ void nr_ue_process_mac_pdu(nr_downlink_indication_t *dl_info,
|
||||
LOG_D(NR_MAC, "%4d.%2d : DLSCH -> LCID %d %d bytes\n", frameP, slot, rx_lcid, mac_len);
|
||||
|
||||
mac_rlc_data_ind(module_idP,
|
||||
mac->crnti,
|
||||
mac->ue_id,
|
||||
gNB_index,
|
||||
frameP,
|
||||
ENB_FLAG_NO,
|
||||
|
||||
@@ -1177,7 +1177,16 @@ bool nr_update_bsr(module_id_t module_idP, frame_t frameP, slot_t slotP, uint8_t
|
||||
lcgid_buffer_remain[lcgid] += mac->scheduling_info.lc_sched_info[lcid - 1].LCID_buffer_remain;
|
||||
}
|
||||
|
||||
mac_rlc_status_resp_t rlc_status = mac_rlc_status_ind(module_idP, mac->crnti,gNB_index,frameP,slotP,ENB_FLAG_NO,MBMS_FLAG_NO, lcid, 0, 0);
|
||||
mac_rlc_status_resp_t rlc_status = mac_rlc_status_ind(module_idP,
|
||||
mac->ue_id,
|
||||
gNB_index,
|
||||
frameP,
|
||||
slotP,
|
||||
ENB_FLAG_NO,
|
||||
MBMS_FLAG_NO,
|
||||
lcid,
|
||||
0,
|
||||
0);
|
||||
|
||||
lcid_bytes_in_buffer[lcid - 1] = rlc_status.bytes_in_buffer;
|
||||
|
||||
@@ -2997,7 +3006,7 @@ static bool fill_mac_sdu(module_id_t module_idP,
|
||||
get_num_bytes_to_reqlc(mac, count_same_priority_lcids, lcid, buflen_ep, *buflen_remain, *counter, lcids_bytes_tot, &target);
|
||||
|
||||
uint16_t sdu_length = mac_rlc_data_req(module_idP,
|
||||
mac->crnti,
|
||||
mac->ue_id,
|
||||
gNB_index,
|
||||
frameP,
|
||||
ENB_FLAG_NO,
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user