Commit e15fa14c authored by Robert Schmidt's avatar Robert Schmidt

Merge branch 'integration_2024_w40b' into 'develop'

Integration: `2024.w40b`

See merge request oai/openairinterface5g!3021

* !2890 F1AP encoding/decoding library
* !2969 Time domain samples scope for NR UE & gNB
* !2998 warmup RF board in UE
* !3009 Fix the ratio of PDSCH EPRE to DM-RS EPRE
* !2965 Refactoring of prepare_scc in gNB config
* !3002 CI: Change frequency used by AW2S pipeline
* !3007 Enable gNB configuration through YAML file
* !3001 Minor ue fixes
* !2971 Use getaddrinfo() when connecting to rfsimulator
parents d8a6c5c9 36682aa7
......@@ -293,7 +293,7 @@ set_property(CACHE KPM_VERSION PROPERTY STRINGS "KPM_V2_03" "KPM_V3_00")
message(STATUS "Selected KPM Version: ${KPM_VERSION}")
add_boolean_option(ENABLE_IMSCOPE OFF "Enable phy scope based on imgui" ON)
add_boolean_option(ENABLE_IMSCOPE OFF "Enable phy scope based on imgui" OFF)
##################################################
# ASN.1 grammar C code generation & dependencies #
......@@ -435,20 +435,18 @@ add_library(f1ap
${F1AP_DIR}/f1ap_cu_rrc_message_transfer.c
${F1AP_DIR}/f1ap_cu_task.c
${F1AP_DIR}/f1ap_cu_ue_context_management.c
${F1AP_DIR}/f1ap_cu_warning_message_transmission.c
${F1AP_DIR}/f1ap_du_interface_management.c
${F1AP_DIR}/f1ap_du_paging.c
${F1AP_DIR}/f1ap_du_rrc_message_transfer.c
${F1AP_DIR}/f1ap_du_system_information.c
${F1AP_DIR}/f1ap_du_task.c
${F1AP_DIR}/f1ap_du_ue_context_management.c
${F1AP_DIR}/f1ap_du_warning_message_transmission.c
${F1AP_DIR}/f1ap_encoder.c
${F1AP_DIR}/f1ap_handlers.c
${F1AP_DIR}/f1ap_itti_messaging.c)
target_include_directories(f1ap PUBLIC F1AP_DIR)
target_link_libraries(f1ap PUBLIC asn1_f1ap L2_NR)
target_link_libraries(f1ap PRIVATE ngap nr_rrc HASHTABLE)
target_link_libraries(f1ap PRIVATE ngap nr_rrc HASHTABLE f1ap_lib)
target_include_directories(f1ap PRIVATE ${F1AP_DIR}/lib)
# LPP
##############
......@@ -1438,6 +1436,8 @@ add_library(L2_NR
${GNB_APP_SRC}
)
target_link_libraries(L2_NR PRIVATE ds alg)
target_link_libraries(L2_NR PRIVATE f1ap_lib)
target_include_directories(L2_NR PRIVATE ${F1AP_DIR}/lib)
add_library(e1_if
${NR_RRC_DIR}/cucp_cuup_direct.c
......
/* UE simulator configuration file version 2021-06-17
* LTE / 5G Non StandAlone
* Copyright (C) 2019-2021 Amarisoft
*/
{
#define N_ANTENNA_DL 1
#define N_ANTENNA_UL 1
#define DL_ARFCN 631296
#define TDD 1
log_options: "all.level=warn,all.max_size=0,nas.level=debug,nas.max_size=1,rrc.level=debug,rrc.max_size=1",
log_filename: "/tmp/ue.log",
/* Enable remote API and Web interface */
com_addr: "0.0.0.0:9002",
include "rf_driver_20/1chan.cfg",
/* If true, allow the simulation of several UEs at the same time and
allow dynamic UE creation from remote API */
cell_groups: [{
group_type: "nr",
multi_ue: true,
ldpc_max_its:8,
cells: [{
rf_port: 0,
bandwidth: 20,
band: 78,
dl_nr_arfcn: DL_ARFCN,
ssb_nr_arfcn: DL_ARFCN,
subcarrier_spacing: 30,
n_antenna_dl: N_ANTENNA_DL,
n_antenna_ul: N_ANTENNA_UL,
rx_to_tx_latency:2,
global_timing_advance:-1,
}],
}],
/* UE capabilities */
/* USIM data */
ue_list: [
{
"ue_id" : 1,
"imsi": "001020000000001",
"K": "fec86ba6eb707ed08905757b1bb44b8f",
"sim_algo":"milenage",
"op": "1006020f0a478bf6b699f15c062e42b3",
as_release: 15,
ue_category: "nr",
apn:"oai",
attach_pdn_type:"ipv4",
default_nssai: [ { sst: 1, }, ],
default_pdu_session_snssai: { sst: 1, },
tun_setup_script: "ue-ifup",
},
{
"ue_id" : 2,
"imsi": "001020000000002",
"K": "fec86ba6eb707ed08905757b1bb44b8f",
"sim_algo":"milenage",
"op": "1006020f0a478bf6b699f15c062e42b3",
as_release: 15,
ue_category: "nr",
apn:"oai",
attach_pdn_type:"ipv4",
default_nssai: [ { sst: 1, }, ],
default_pdu_session_snssai: { sst: 1, },
tun_setup_script: "ue-ifup",
},
{
"ue_id" : 3,
"imsi": "001020000000003",
"K": "fec86ba6eb707ed08905757b1bb44b8f",
"sim_algo":"milenage",
"op": "1006020f0a478bf6b699f15c062e42b3",
as_release: 15,
ue_category: "nr",
apn:"oai",
attach_pdn_type:"ipv4",
default_nssai: [ { sst: 1, }, ],
default_pdu_session_snssai: { sst: 1, },
tun_setup_script: "ue-ifup",
},
{
"ue_id" : 4,
"imsi": "001020000000004",
"K": "fec86ba6eb707ed08905757b1bb44b8f",
"sim_algo":"milenage",
"op": "1006020f0a478bf6b699f15c062e42b3",
as_release: 15,
ue_category: "nr",
apn:"oai",
attach_pdn_type:"ipv4",
default_nssai: [ { sst: 1, }, ],
default_pdu_session_snssai: { sst: 1, },
tun_setup_script: "ue-ifup",
},
{
"ue_id" : 5,
"imsi": "001020000000005",
"K": "fec86ba6eb707ed08905757b1bb44b8f",
"sim_algo":"milenage",
"op": "1006020f0a478bf6b699f15c062e42b3",
as_release: 15,
ue_category: "nr",
apn:"oai",
attach_pdn_type:"ipv4",
default_nssai: [ { sst: 1, }, ],
default_pdu_session_snssai: { sst: 1, },
tun_setup_script: "ue-ifup",
},
{
"ue_id" : 6,
"imsi": "001020000000006",
"K": "fec86ba6eb707ed08905757b1bb44b8f",
"sim_algo":"milenage",
"op": "1006020f0a478bf6b699f15c062e42b3",
as_release: 15,
ue_category: "nr",
apn:"oai",
attach_pdn_type:"ipv4",
default_nssai: [ { sst: 1, }, ],
default_pdu_session_snssai: { sst: 1, },
tun_setup_script: "ue-ifup",
},
{
"ue_id" : 7,
"imsi": "001020000000007",
"K": "fec86ba6eb707ed08905757b1bb44b8f",
"sim_algo":"milenage",
"op": "1006020f0a478bf6b699f15c062e42b3",
as_release: 15,
ue_category: "nr",
apn:"oai",
attach_pdn_type:"ipv4",
default_nssai: [ { sst: 1, }, ],
default_pdu_session_snssai: { sst: 1, },
tun_setup_script: "ue-ifup",
},
{
"ue_id" : 8,
"imsi": "001020000000008",
"K": "fec86ba6eb707ed08905757b1bb44b8f",
"sim_algo":"milenage",
"op": "1006020f0a478bf6b699f15c062e42b3",
as_release: 15,
ue_category: "nr",
apn:"oai",
attach_pdn_type:"ipv4",
default_nssai: [ { sst: 1, }, ],
default_pdu_session_snssai: { sst: 1, },
tun_setup_script: "ue-ifup",
},
{
"ue_id" : 9,
"imsi": "001020000000009",
"K": "fec86ba6eb707ed08905757b1bb44b8f",
"sim_algo":"milenage",
"op": "1006020f0a478bf6b699f15c062e42b3",
as_release: 15,
ue_category: "nr",
apn:"oai",
attach_pdn_type:"ipv4",
default_nssai: [ { sst: 1, }, ],
default_pdu_session_snssai: { sst: 1, },
tun_setup_script: "ue-ifup",
},
{
"ue_id" : 10,
"imsi": "001020000000010",
"K": "fec86ba6eb707ed08905757b1bb44b8f",
"sim_algo":"milenage",
"op": "1006020f0a478bf6b699f15c062e42b3",
as_release: 15,
ue_category: "nr",
apn:"oai",
attach_pdn_type:"ipv4",
default_nssai: [ { sst: 1, }, ],
default_pdu_session_snssai: { sst: 1, },
tun_setup_script: "ue-ifup",
},
{
"ue_id" : 11,
"imsi": "001020000000011",
"K": "fec86ba6eb707ed08905757b1bb44b8f",
"sim_algo":"milenage",
"op": "1006020f0a478bf6b699f15c062e42b3",
as_release: 15,
ue_category: "nr",
apn:"oai",
attach_pdn_type:"ipv4",
default_nssai: [ { sst: 1, }, ],
default_pdu_session_snssai: { sst: 1, },
tun_setup_script: "ue-ifup",
},
{
"ue_id" : 12,
"imsi": "001020000000012",
"K": "fec86ba6eb707ed08905757b1bb44b8f",
"sim_algo":"milenage",
"op": "1006020f0a478bf6b699f15c062e42b3",
as_release: 15,
ue_category: "nr",
apn:"oai",
attach_pdn_type:"ipv4",
default_nssai: [ { sst: 1, }, ],
default_pdu_session_snssai: { sst: 1, },
tun_setup_script: "ue-ifup",
},
{
"ue_id" : 13,
"imsi": "001020000000013",
"K": "fec86ba6eb707ed08905757b1bb44b8f",
"sim_algo":"milenage",
"op": "1006020f0a478bf6b699f15c062e42b3",
as_release: 15,
ue_category: "nr",
apn:"oai",
attach_pdn_type:"ipv4",
default_nssai: [ { sst: 1, }, ],
default_pdu_session_snssai: { sst: 1, },
tun_setup_script: "ue-ifup",
},
{
"ue_id" : 14,
"imsi": "001020000000014",
"K": "fec86ba6eb707ed08905757b1bb44b8f",
"sim_algo":"milenage",
"op": "1006020f0a478bf6b699f15c062e42b3",
as_release: 15,
ue_category: "nr",
apn:"oai",
attach_pdn_type:"ipv4",
default_nssai: [ { sst: 1, }, ],
default_pdu_session_snssai: { sst: 1, },
tun_setup_script: "ue-ifup",
},
{
"ue_id" : 15,
"imsi": "001020000000015",
"K": "fec86ba6eb707ed08905757b1bb44b8f",
"sim_algo":"milenage",
"op": "1006020f0a478bf6b699f15c062e42b3",
as_release: 15,
ue_category: "nr",
apn:"oai",
attach_pdn_type:"ipv4",
default_nssai: [ { sst: 1, }, ],
default_pdu_session_snssai: { sst: 1, },
tun_setup_script: "ue-ifup",
},
{
"ue_id" : 16,
"imsi": "001020000000016",
"K": "fec86ba6eb707ed08905757b1bb44b8f",
"sim_algo":"milenage",
"op": "1006020f0a478bf6b699f15c062e42b3",
as_release: 15,
ue_category: "nr",
apn:"oai",
attach_pdn_type:"ipv4",
default_nssai: [ { sst: 1, }, ],
default_pdu_session_snssai: { sst: 1, },
tun_setup_script: "ue-ifup",
},
],
}
......@@ -5,6 +5,7 @@
{
#define N_ANTENNA_DL 2
#define N_ANTENNA_UL 2
#define DL_ARFCN 631296
#define TDD 1
log_options: "all.level=warn,all.max_size=0,nas.level=debug,nas.max_size=1,rrc.level=debug,rrc.max_size=1",
......@@ -25,8 +26,8 @@ allow dynamic UE creation from remote API */
rf_port: 0,
bandwidth: 20,
band: 78,
dl_nr_arfcn:630048,
ssb_nr_arfcn:630048,
dl_nr_arfcn: DL_ARFCN,
ssb_nr_arfcn: DL_ARFCN,
subcarrier_spacing: 30,
n_antenna_dl: N_ANTENNA_DL,
n_antenna_ul: N_ANTENNA_UL,
......
......@@ -111,7 +111,11 @@ ltebox-nepes:
amarisoft_ue:
Host: amariue
InitScript: /root/lteue-linux-2023-10-27/ue/lteue /root/oaicicd/ran_sa_aw2s_asue_2x2/aw2s-multi-00102-2x2.cfg &
InitScript: /root/lteue-linux-2023-10-27/ue/lteue /root/oaicicd/ran_sa_aw2s_asue/aw2s-multi-00102-20.cfg &
TermScript: /root/2023-10-27/libs/ws.js -t 10 127.0.0.1:9002 '{"message":"quit"}' || killall -KILL lteue-avx2
amarisoft_ue_2x2:
Host: amariue
InitScript: /root/lteue-linux-2023-10-27/ue/lteue /root/oaicicd/ran_sa_aw2s_asue_2x2/aw2s-multi-00102-2x2-v2.cfg &
TermScript: /root/2023-10-27/libs/ws.js -t 10 127.0.0.1:9002 '{"message":"quit"}' || killall -KILL lteue-avx2
amarisoft_ue_fhi72:
Host: amariue
......
Active_gNBs:
- gnb-rfsim
# Asn1_verbosity, choice in: none, info, annoying
Asn1_verbosity: none
gNBs:
##### Identification parameters:
- gNB_ID: 0xe00
gNB_name: gnb-rfsim
tracking_area_code: 1
plmn_list:
- mcc: 208
mnc: 99
mnc_length: 2
snssaiList:
- sst: 1
sd: 0xffffff
nr_cellid: 12345678
##### Physical parameters:
min_rxtxtime: 6
servingCellConfigCommon:
#spCellConfigCommon
- physCellId: 0
# downlinkConfigCommon
#frequencyInfoDL
# this is 3300.60 MHz + 53*12*30e-3 MHz = 3319.68
absoluteFrequencySSB: 621312
# this is 3300.60 MHz
dl_absoluteFrequencyPointA: 620040
#scs-SpecificCarrierList
dl_offstToCarrier: 0
# subcarrierSpacing
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
dl_subcarrierSpacing: 1
dl_carrierBandwidth: 106
#initialDownlinkBWP
#genericParameters
# this is RBstart=0,L=106 (275*(L-1))+RBstart
initialDLBWPlocationAndBandwidth: 28875
# subcarrierSpacing
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
initialDLBWPsubcarrierSpacing: 1
#pdcch-ConfigCommon
initialDLBWPcontrolResourceSetZero: 11
initialDLBWPsearchSpaceZero: 0
#uplinkConfigCommon
#frequencyInfoUL
ul_frequencyBand: 78
#scs-SpecificCarrierList
ul_offstToCarrier: 0
# subcarrierSpacing
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
ul_subcarrierSpacing: 1
ul_carrierBandwidth: 106
pMax: 20
#initialUplinkBWP
#genericParameters
initialULBWPlocationAndBandwidth: 28875
# subcarrierSpacing
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
initialULBWPsubcarrierSpacing: 1
#rach-ConfigCommon
#rach-ConfigGeneric
prach_ConfigurationIndex: 98
#prach_msg1_FDM
#0 = one, 1=two, 2=four, 3=eight
prach_msg1_FDM: 0
prach_msg1_FrequencyStart: 0
zeroCorrelationZoneConfig: 12
preambleReceivedTargetPower: -104
#preamblTransMax (0...10) = (3,4,5,6,7,8,10,20,50,100,200)
preambleTransMax: 6
#powerRampingStep
# 0=dB0,1=dB2,2=dB4,3=dB6
powerRampingStep: 1
#ra_ReponseWindow
#1,2,4,8,10,20,40,80
ra_ResponseWindow: 5
#ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR
#1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen
ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR: 3
#oneHalf (0..15) 4,8,12,16,...60,64
ssb_perRACH_OccasionAndCB_PreamblesPerSSB: 15
#ra_ContentionResolutionTimer
#(0..7) 8,16,24,32,40,48,56,64
ra_ContentionResolutionTimer: 7
rsrp_ThresholdSSB: 19
#prach-RootSequenceIndex_PR
#1 = 839, 2 = 139
prach_RootSequenceIndex_PR: 2
prach_RootSequenceIndex: 1
# SCS for msg1, can only be 15 for 30 kHz < 6 GHz, takes precendence over the one derived from prach-ConfigIndex
msg1_SubcarrierSpacing: 1
# restrictedSetConfig
# 0=unrestricted, 1=restricted type A, 2=restricted type B
restrictedSetConfig: 0
msg3_DeltaPreamble: 1
p0_NominalWithGrant: -90
# pucch-ConfigCommon setup :
# pucchGroupHopping
# 0 = neither, 1= group hopping, 2=sequence hopping
pucchGroupHopping: 0
hoppingId: 40
p0_nominal: -90
ssb_PositionsInBurst_Bitmap: 1
# ssb_periodicityServingCell
# 0 = ms5, 1=ms10, 2=ms20, 3=ms40, 4=ms80, 5=ms160, 6=spare2, 7=spare1
ssb_periodicityServingCell: 2
# dmrs_TypeA_position
# 0 = pos2, 1 = pos3
dmrs_TypeA_Position: 0
# subcarrierSpacing
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
subcarrierSpacing: 1
#tdd-UL-DL-ConfigurationCommon
# subcarrierSpacing
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
referenceSubcarrierSpacing: 1
# pattern1
# dl_UL_TransmissionPeriodicity
# 0=ms0p5, 1=ms0p625, 2=ms1, 3=ms1p25, 4=ms2, 5=ms2p5, 6=ms5, 7=ms10
dl_UL_TransmissionPeriodicity: 6
nrofDownlinkSlots: 7
nrofDownlinkSymbols: 6
nrofUplinkSlots: 2
nrofUplinkSymbols: 4
ssPBCH_BlockPower: -25
SCTP:
SCTP_INSTREAMS: 2
SCTP_OUTSTREAMS: 2
##### AMF parameters:
amf_ip_address:
- ipv4: 192.168.71.132
NETWORK_INTERFACES:
GNB_IPV4_ADDRESS_FOR_NG_AMF: 192.168.71.140
GNB_IPV4_ADDRESS_FOR_NGU: 192.168.71.140
GNB_PORT_FOR_S1U: 2152 # Spec 2152
MACRLCs:
- num_cc: 1
tr_s_preference: local_L1
tr_n_preference: local_RRC
pusch_TargetSNRx10: 200
pucch_TargetSNRx10: 200
L1s:
- num_cc: 1
tr_n_preference: local_mac
prach_dtx_threshold: 200
# pucch0_dtx_threshold = 150;
RUs:
- local_rf: yes
nb_tx: 1
nb_rx: 1
att_tx: 0
att_rx: 0
bands: [78]
max_pdschReferenceSignalPower: -27
max_rxgain: 75
eNB_instances: [0]
##beamforming 1x2 matrix: 1 layer x 2 antennas
bf_weights: [0x00007fff, 0x0000]
##beamforming 1x4 matrix: 1 layer x 4 antennas
#bf_weights = [0x00007fff, 0x0000,0x0000, 0x0000];
## beamforming 2x2 matrix:
# bf_weights = [0x00007fff, 0x00000000, 0x00000000, 0x00007fff];
## beamforming 4x4 matrix:
#bf_weights = [0x00007fff, 0x0000, 0x0000, 0x0000, 0x00000000, 0x00007fff, 0x0000, 0x0000, 0x0000, 0x0000, 0x00007fff, 0x0000, 0x0000, 0x0000, 0x0000, 0x00007fff];
sf_extension: 0
sdr_addrs: serial=XXXXXXX
rfsimulator:
serveraddr: server
security:
# preferred ciphering algorithms
# the first one of the list that an UE supports in chosen
# valid values: nea0, nea1, nea2, nea3
ciphering_algorithms: [nea0]
# preferred integrity algorithms
# the first one of the list that an UE supports in chosen
# valid values: nia0, nia1, nia2, nia3
integrity_algorithms: [nia2, nia0]
# setting 'drb_ciphering' to "no" disables ciphering for DRBs, no matter
# what 'ciphering_algorithms' configures; same thing for 'drb_integrity'
drb_ciphering: yes
drb_integrity: no
log_config:
global_log_level: info
hw_log_level: info
phy_log_level: info
mac_log_level: info
rlc_log_level: info
pdcp_log_level: info
rrc_log_level: info
ngap_log_level: debug
f1ap_log_level: debug
This diff is collapsed.
......@@ -21,10 +21,10 @@ gNBs =
nr_cellid = 12345678L
////////// Physical parameters:
pdsch_AntennaPorts_XP = 2;
pusch_AntennaPorts = 2;
pdsch_AntennaPorts_XP = 1;
pusch_AntennaPorts = 1;
do_CSIRS = 1;
do_SRS = 1;
do_SRS = 0;
servingCellConfigCommon = (
{
......@@ -34,11 +34,11 @@ gNBs =
# downlinkConfigCommon
#frequencyInfoDL
# this is 3410.4 MHz => 301 REs from PointA 25 PRBs + 1 RE
absoluteFrequencySSB = 630048;
# this is 3469.44 MHz => 301 REs from PointA 25 PRBs + 1 RE
absoluteFrequencySSB = 631296;
dl_frequencyBand = 78;
# this is 3410.4 - (51*12*30e-3/2) = 3401.22 MHz
dl_absoluteFrequencyPointA = 629436;
# this is 3469.44 - (51*12*30e-3/2) = 3460.26 MHz
dl_absoluteFrequencyPointA = 630684;
#scs-SpecificCarrierList
dl_offstToCarrier = 0;
# subcarrierSpacing
......@@ -207,8 +207,8 @@ RUs = (
remote_portd = 52183;
local_rf = "no"
tr_preference = "udp_ecpri_if5"
nb_tx = 2
nb_rx = 2
nb_tx = 1
nb_rx = 1
att_tx = 18
att_rx = 0;
num_tp_cores = 4;
......
......@@ -24,55 +24,64 @@
<htmlTabRef>TEST-5G-AW2S</htmlTabRef>
<htmlTabName>20 MHz TDD SA</htmlTabName>
<htmlTabIcon>tasks</htmlTabIcon>
<repeatCount>1</repeatCount>
<TestCaseRequestedList>
010000
001000
800813
020000
002000
002001
002002
002003
002004
002005
002006
002007
002008
002009
002010
002011
002012
002013
002014
002015
000100
000010
000020
000030
000040
002016
000200
003000
004000
000002
030000
333333
110000
101000
100813
120000
102000
102001
102002
102003
102004
102005
102006
102007
102008
102009
102010
102011
102012
102013
102014
102015
100100
100010
100020
100030
100040
102016
100200
103000
104000
100002
130000
444444
</TestCaseRequestedList>
<TestCaseExclusionList></TestCaseExclusionList>
<testCase id="010000">
<testCase id="110000">
<class>Pull_Cluster_Image</class>
<desc>Pull Images from Cluster</desc>
<oc_project>oaicicd-ran</oc_project>
<images_to_pull>oai-gnb-aw2s</images_to_pull>
</testCase>
<testCase id="800813">
<testCase id="101000">
<class>Initialize_UE</class>
<desc>Initialize Amarisoft UE</desc>
<id>amarisoft_ue</id>
</testCase>
<testCase id="100813">
<class>Create_Workspace</class>
<desc>Create new Workspace</desc>
<desc>Creating new Workspace</desc>
<eNB_instance>0</eNB_instance>
<eNB_serverId>0</eNB_serverId>
</testCase>
<testCase id="020000">
<testCase id="120000">
<class>Deploy_Object</class>
<desc>Deploy gNB (TDD/Band78/20MHz/aw2s) in a container</desc>
<yaml_path>ci-scripts/yaml_files/sa_aw2s_gnb</yaml_path>
......@@ -80,106 +89,100 @@
<eNB_serverId>0</eNB_serverId>
</testCase>
<testCase id="001000">
<class>Initialize_UE</class>
<desc>Initialize Amarisoft UE</desc>
<id>amarisoft_ue</id>
</testCase>
<testCase id="002001">
<testCase id="102001">
<class>Attach_UE</class>
<desc>Attach UE</desc>
<id>amarisoft_ue_1</id>
</testCase>
<testCase id="002002">
<testCase id="102002">
<class>Attach_UE</class>
<desc>Attach UE</desc>
<id>amarisoft_ue_2</id>
</testCase>
<testCase id="002003">
<testCase id="102003">
<class>Attach_UE</class>
<desc>Attach UE</desc>
<id>amarisoft_ue_3</id>
</testCase>
<testCase id="002004">
<testCase id="102004">
<class>Attach_UE</class>
<desc>Attach UE</desc>
<id>amarisoft_ue_4</id>
</testCase>
<testCase id="002005">
<testCase id="102005">
<class>Attach_UE</class>
<desc>Attach UE</desc>
<id>amarisoft_ue_5</id>
</testCase>
<testCase id="002006">
<testCase id="102006">
<class>Attach_UE</class>
<desc>Attach UE</desc>
<id>amarisoft_ue_6</id>
</testCase>
<testCase id="002007">
<testCase id="102007">
<class>Attach_UE</class>
<desc>Attach UE</desc>
<id>amarisoft_ue_7</id>
</testCase>
<testCase id="002008">
<testCase id="102008">
<class>Attach_UE</class>
<desc>Attach UE</desc>
<id>amarisoft_ue_8</id>
</testCase>
<testCase id="002009">
<testCase id="102009">
<class>Attach_UE</class>
<desc>Attach UE</desc>
<id>amarisoft_ue_9</id>
</testCase>
<testCase id="002010">
<testCase id="102010">
<class>Attach_UE</class>
<desc>Attach UE</desc>
<id>amarisoft_ue_10</id>
</testCase>
<testCase id="002011">
<testCase id="102011">
<class>Attach_UE</class>
<desc>Attach UE</desc>
<id>amarisoft_ue_11</id>
</testCase>
<testCase id="002012">
<testCase id="102012">
<class>Attach_UE</class>
<desc>Attach UE</desc>
<id>amarisoft_ue_12</id>
</testCase>
<testCase id="002013">
<testCase id="102013">
<class>Attach_UE</class>
<desc>Attach UE</desc>
<id>amarisoft_ue_13</id>
</testCase>
<testCase id="002014">
<testCase id="102014">
<class>Attach_UE</class>
<desc>Attach UE</desc>
<id>amarisoft_ue_14</id>
</testCase>
<testCase id="002015">
<testCase id="102015">
<class>Attach_UE</class>
<desc>Attach UE</desc>
<id>amarisoft_ue_15</id>
</testCase>
<testCase id="000010">
<testCase id="100010">
<class>Iperf</class>
<desc>iperf (DL/7Mbps/UDP)(30 sec)(multi-ue profile)</desc>
<iperf_args>-u -b 70M -t 30 -R</iperf_args>
<desc>iperf (DL/3Mbps/UDP)(30 sec)(multi-ue profile)</desc>
<iperf_args>-u -b 45M -t 30 -R</iperf_args>
<id>amarisoft_ue_1 amarisoft_ue_2 amarisoft_ue_3 amarisoft_ue_4 amarisoft_ue_5 amarisoft_ue_6 amarisoft_ue_7 amarisoft_ue_8 amarisoft_ue_9 amarisoft_ue_10 amarisoft_ue_11 amarisoft_ue_12 amarisoft_ue_13 amarisoft_ue_14 amarisoft_ue_15</id>
<iperf_packetloss_threshold>25</iperf_packetloss_threshold>
<iperf_bitrate_threshold>80</iperf_bitrate_threshold>
......@@ -187,19 +190,19 @@
<svr_id>oc-cn5g</svr_id>
</testCase>
<testCase id="000030">
<testCase id="100030">
<class>Iperf</class>
<desc>iperf (DL/TCP)(30 sec)(multi-ue profile)</desc>
<iperf_args>-t 30 -R</iperf_args>
<id>amarisoft_ue_1 amarisoft_ue_2 amarisoft_ue_3 amarisoft_ue_4 amarisoft_ue_5 amarisoft_ue_6 amarisoft_ue_7 amarisoft_ue_8 amarisoft_ue_9 amarisoft_ue_10 amarisoft_ue_11 amarisoft_ue_12 amarisoft_ue_13 amarisoft_ue_14 amarisoft_ue_15</id>
<iperf_tcp_rate_target>4</iperf_tcp_rate_target>
<iperf_tcp_rate_target>2</iperf_tcp_rate_target>
<svr_id>oc-cn5g</svr_id>
</testCase>
<testCase id="000020">
<testCase id="100020">
<class>Iperf</class>
<desc>iperf (UL/3.6Mbps/UDP)(30 sec)(multi-ue profile)</desc>
<iperf_args>-u -b 36M -t 30</iperf_args>
<desc>iperf (UL/1Mbps/UDP)(30 sec)(multi-ue profile)</desc>
<iperf_args>-u -b 15M -t 30</iperf_args>
<id>amarisoft_ue_1 amarisoft_ue_2 amarisoft_ue_3 amarisoft_ue_4 amarisoft_ue_5 amarisoft_ue_6 amarisoft_ue_7 amarisoft_ue_8 amarisoft_ue_9 amarisoft_ue_10 amarisoft_ue_11 amarisoft_ue_12 amarisoft_ue_13 amarisoft_ue_14 amarisoft_ue_15</id>
<iperf_packetloss_threshold>25</iperf_packetloss_threshold>
<iperf_bitrate_threshold>80</iperf_bitrate_threshold>
......@@ -207,7 +210,7 @@
<svr_id>oc-cn5g</svr_id>
</testCase>
<testCase id="000040">
<testCase id="100040">
<class>Iperf</class>
<desc>iperf (UL/TCP)(30 sec)(multi-ue profile)</desc>
<iperf_args>-t 30</iperf_args>
......@@ -217,51 +220,51 @@
<svr_id>oc-cn5g</svr_id>
</testCase>
<testCase id="000100">
<testCase id="100100">
<class>Ping</class>
<desc>Ping: 20pings in 20sec, multi-ue</desc>
<desc>Ping: 50 pings in 10sec, multi-ue</desc>
<id>amarisoft_ue_1 amarisoft_ue_2 amarisoft_ue_3 amarisoft_ue_4 amarisoft_ue_5 amarisoft_ue_6 amarisoft_ue_7 amarisoft_ue_8 amarisoft_ue_9 amarisoft_ue_10 amarisoft_ue_11 amarisoft_ue_12 amarisoft_ue_13 amarisoft_ue_14 amarisoft_ue_15</id>
<ping_args>-c 20 %cn_ip%</ping_args>
<ping_args>-c 50 -i 0.2 %cn_ip%</ping_args>
<ping_packetloss_threshold>5</ping_packetloss_threshold>
<ping_rttavg_threshold>25</ping_rttavg_threshold>
</testCase>
<testCase id="002016">
<testCase id="102016">
<class>Attach_UE</class>
<desc>Attach UE</desc>
<id>amarisoft_ue_16</id>
</testCase>
<testCase id="000200">
<testCase id="100200">
<class>Ping</class>
<desc>Ping: 50pings in 10sec, multi-ue</desc>
<id>amarisoft_ue_16</id>
<ping_args>-c 50 -i 0.2 %cn_ip%</ping_args>
<ping_packetloss_threshold>1</ping_packetloss_threshold>
<ping_packetloss_threshold>5</ping_packetloss_threshold>
<ping_rttavg_threshold>30</ping_rttavg_threshold>
</testCase>
<testCase id="003000">
<testCase id="103000">
<class>Detach_UE</class>
<always_exec>true</always_exec>
<desc>Detach UE</desc>
<id>amarisoft_ue_1 amarisoft_ue_2 amarisoft_ue_3 amarisoft_ue_4 amarisoft_ue_5 amarisoft_ue_6 amarisoft_ue_7 amarisoft_ue_8 amarisoft_ue_9 amarisoft_ue_10 amarisoft_ue_11 amarisoft_ue_12 amarisoft_ue_13 amarisoft_ue_14 amarisoft_ue_15 amarisoft_ue_16</id>
</testCase>
<testCase id="004000">
<testCase id="104000">
<class>Terminate_UE</class>
<always_exec>true</always_exec>
<desc>Terminate UE</desc>
<id>amarisoft_ue</id>
</testCase>
<testCase id="000002">
<testCase id="100002">
<class>IdleSleep</class>
<desc>Sleep</desc>
<idle_sleep_time_in_sec>5</idle_sleep_time_in_sec>
</testCase>
<testCase id="030000">
<testCase id="130000">
<class>Undeploy_Object</class>
<always_exec>true</always_exec>
<desc>Undeploy gNB</desc>
......@@ -270,7 +273,7 @@
<eNB_serverId>0</eNB_serverId>
</testCase>
<testCase id="333333">
<testCase id="444444">
<class>Clean_Test_Server_Images</class>
<always_exec>true</always_exec>
<desc>Clean Test Images on Test Server</desc>
......
<!--
Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The OpenAirInterface Software Alliance licenses this file to You under
the OAI Public License, Version 1.1 (the "License"); you may not use this file
except in compliance with the License.
You may obtain a copy of the License at
http://www.openairinterface.org/?page_id=698
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
For more information about the OpenAirInterface (OAI) Software Alliance:
contact@openairinterface.org
-->
<testCaseList>
<htmlTabRef>TEST-5G-2x2-AW2S</htmlTabRef>
<htmlTabName>20 MHz TDD 2x2 SA</htmlTabName>
<htmlTabIcon>tasks</htmlTabIcon>
<TestCaseRequestedList>
010000
001000
800813
020000
002000
002001
002002
002003
002004
002005
002006
002007
002008
002009
002010
002011
002012
002013
002014
002015
000100
000010
000020
000030
000040
002016
000200
003000
004000
000002
030000
333333
</TestCaseRequestedList>
<TestCaseExclusionList></TestCaseExclusionList>
<testCase id="010000">
<class>Pull_Cluster_Image</class>
<desc>Pull Images from Cluster</desc>
<oc_project>oaicicd-ran</oc_project>
<images_to_pull>oai-gnb-aw2s</images_to_pull>
</testCase>
<testCase id="800813">
<class>Create_Workspace</class>
<desc>Create new Workspace</desc>
<eNB_instance>0</eNB_instance>
<eNB_serverId>0</eNB_serverId>
</testCase>
<testCase id="020000">
<class>Deploy_Object</class>
<desc>Deploy gNB (TDD/Band78/20MHz/aw2s) in a container</desc>
<yaml_path>ci-scripts/yaml_files/sa_aw2s_2x2_gnb</yaml_path>
<eNB_instance>0</eNB_instance>
<eNB_serverId>0</eNB_serverId>
</testCase>
<testCase id="001000">
<class>Initialize_UE</class>
<desc>Initialize Amarisoft UE</desc>
<id>amarisoft_ue_2x2</id>
</testCase>
<testCase id="002001">
<class>Attach_UE</class>
<desc>Attach UE</desc>
<id>amarisoft_ue_1</id>
</testCase>
<testCase id="002002">
<class>Attach_UE</class>
<desc>Attach UE</desc>
<id>amarisoft_ue_2</id>
</testCase>
<testCase id="002003">
<class>Attach_UE</class>
<desc>Attach UE</desc>
<id>amarisoft_ue_3</id>
</testCase>
<testCase id="002004">
<class>Attach_UE</class>
<desc>Attach UE</desc>
<id>amarisoft_ue_4</id>
</testCase>
<testCase id="002005">
<class>Attach_UE</class>
<desc>Attach UE</desc>
<id>amarisoft_ue_5</id>
</testCase>
<testCase id="002006">
<class>Attach_UE</class>
<desc>Attach UE</desc>
<id>amarisoft_ue_6</id>
</testCase>
<testCase id="002007">
<class>Attach_UE</class>
<desc>Attach UE</desc>
<id>amarisoft_ue_7</id>
</testCase>
<testCase id="002008">
<class>Attach_UE</class>
<desc>Attach UE</desc>
<id>amarisoft_ue_8</id>
</testCase>
<testCase id="002009">
<class>Attach_UE</class>
<desc>Attach UE</desc>
<id>amarisoft_ue_9</id>
</testCase>
<testCase id="002010">
<class>Attach_UE</class>
<desc>Attach UE</desc>
<id>amarisoft_ue_10</id>
</testCase>
<testCase id="002011">
<class>Attach_UE</class>
<desc>Attach UE</desc>
<id>amarisoft_ue_11</id>
</testCase>
<testCase id="002012">
<class>Attach_UE</class>
<desc>Attach UE</desc>
<id>amarisoft_ue_12</id>
</testCase>
<testCase id="002013">
<class>Attach_UE</class>
<desc>Attach UE</desc>
<id>amarisoft_ue_13</id>
</testCase>
<testCase id="002014">
<class>Attach_UE</class>
<desc>Attach UE</desc>
<id>amarisoft_ue_14</id>
</testCase>
<testCase id="002015">
<class>Attach_UE</class>
<desc>Attach UE</desc>
<id>amarisoft_ue_15</id>
</testCase>
<testCase id="000010">
<class>Iperf</class>
<desc>iperf (DL/4Mbps/UDP)(30 sec)(multi-ue profile)</desc>
<iperf_args>-u -b 60M -t 30 -R</iperf_args>
<id>amarisoft_ue_1 amarisoft_ue_2 amarisoft_ue_3 amarisoft_ue_4 amarisoft_ue_5 amarisoft_ue_6 amarisoft_ue_7 amarisoft_ue_8 amarisoft_ue_9 amarisoft_ue_10 amarisoft_ue_11 amarisoft_ue_12 amarisoft_ue_13 amarisoft_ue_14 amarisoft_ue_15</id>
<iperf_packetloss_threshold>25</iperf_packetloss_threshold>
<iperf_bitrate_threshold>80</iperf_bitrate_threshold>
<iperf_profile>balanced</iperf_profile>
<svr_id>oc-cn5g</svr_id>
</testCase>
<testCase id="000030">
<class>Iperf</class>
<desc>iperf (DL/TCP)(30 sec)(multi-ue profile)</desc>
<iperf_args>-t 30 -R</iperf_args>
<id>amarisoft_ue_1 amarisoft_ue_2 amarisoft_ue_3 amarisoft_ue_4 amarisoft_ue_5 amarisoft_ue_6 amarisoft_ue_7 amarisoft_ue_8 amarisoft_ue_9 amarisoft_ue_10 amarisoft_ue_11 amarisoft_ue_12 amarisoft_ue_13 amarisoft_ue_14 amarisoft_ue_15</id>
<iperf_tcp_rate_target>4</iperf_tcp_rate_target>
<svr_id>oc-cn5g</svr_id>
</testCase>
<testCase id="000020">
<class>Iperf</class>
<desc>iperf (UL/1.5Mbps/UDP)(30 sec)(multi-ue profile)</desc>
<iperf_args>-u -b 22.5M -t 30</iperf_args>
<id>amarisoft_ue_1 amarisoft_ue_2 amarisoft_ue_3 amarisoft_ue_4 amarisoft_ue_5 amarisoft_ue_6 amarisoft_ue_7 amarisoft_ue_8 amarisoft_ue_9 amarisoft_ue_10 amarisoft_ue_11 amarisoft_ue_12 amarisoft_ue_13 amarisoft_ue_14 amarisoft_ue_15</id>
<iperf_packetloss_threshold>25</iperf_packetloss_threshold>
<iperf_bitrate_threshold>80</iperf_bitrate_threshold>
<iperf_profile>balanced</iperf_profile>
<svr_id>oc-cn5g</svr_id>
</testCase>
<testCase id="000040">
<class>Iperf</class>
<desc>iperf (UL/TCP)(30 sec)(multi-ue profile)</desc>
<iperf_args>-t 30</iperf_args>
<svr_id>oc-cn5g</svr_id>
<id>amarisoft_ue_1 amarisoft_ue_2 amarisoft_ue_3 amarisoft_ue_4 amarisoft_ue_5 amarisoft_ue_6 amarisoft_ue_7 amarisoft_ue_8 amarisoft_ue_9 amarisoft_ue_10 amarisoft_ue_11 amarisoft_ue_12 amarisoft_ue_13 amarisoft_ue_14 amarisoft_ue_15</id>
<iperf_tcp_rate_target>1</iperf_tcp_rate_target>
<svr_id>oc-cn5g</svr_id>
</testCase>
<testCase id="000100">
<class>Ping</class>
<desc>Ping: 20pings in 20sec, multi-ue</desc>
<id>amarisoft_ue_1 amarisoft_ue_2 amarisoft_ue_3 amarisoft_ue_4 amarisoft_ue_5 amarisoft_ue_6 amarisoft_ue_7 amarisoft_ue_8 amarisoft_ue_9 amarisoft_ue_10 amarisoft_ue_11 amarisoft_ue_12 amarisoft_ue_13 amarisoft_ue_14 amarisoft_ue_15</id>
<ping_args>-c 20 %cn_ip%</ping_args>
<ping_packetloss_threshold>5</ping_packetloss_threshold>
<ping_rttavg_threshold>25</ping_rttavg_threshold>
</testCase>
<testCase id="002016">
<class>Attach_UE</class>
<desc>Attach UE</desc>
<id>amarisoft_ue_16</id>
</testCase>
<testCase id="000200">
<class>Ping</class>
<desc>Ping: 50pings in 10sec, multi-ue</desc>
<id>amarisoft_ue_16</id>
<ping_args>-c 50 -i 0.2 %cn_ip%</ping_args>
<ping_packetloss_threshold>5</ping_packetloss_threshold>
<ping_rttavg_threshold>30</ping_rttavg_threshold>
</testCase>
<testCase id="003000">
<class>Detach_UE</class>
<always_exec>true</always_exec>
<desc>Detach UE</desc>
<id>amarisoft_ue_1 amarisoft_ue_2 amarisoft_ue_3 amarisoft_ue_4 amarisoft_ue_5 amarisoft_ue_6 amarisoft_ue_7 amarisoft_ue_8 amarisoft_ue_9 amarisoft_ue_10 amarisoft_ue_11 amarisoft_ue_12 amarisoft_ue_13 amarisoft_ue_14 amarisoft_ue_15 amarisoft_ue_16</id>
</testCase>
<testCase id="004000">
<class>Terminate_UE</class>
<always_exec>true</always_exec>
<desc>Terminate UE</desc>
<id>amarisoft_ue_2x2</id>
</testCase>
<testCase id="000002">
<class>IdleSleep</class>
<desc>Sleep</desc>
<idle_sleep_time_in_sec>5</idle_sleep_time_in_sec>
</testCase>
<testCase id="030000">
<class>Undeploy_Object</class>
<always_exec>true</always_exec>
<desc>Undeploy gNB</desc>
<yaml_path>ci-scripts/yaml_files/sa_aw2s_2x2_gnb</yaml_path>
<eNB_instance>0</eNB_instance>
<eNB_serverId>0</eNB_serverId>
</testCase>
<testCase id="333333">
<class>Clean_Test_Server_Images</class>
<always_exec>true</always_exec>
<desc>Clean Test Images on Test Server</desc>
<test_svr_id>0</test_svr_id>
</testCase>
</testCaseList>
......@@ -94,7 +94,7 @@ services:
public_net:
ipv4_address: 192.168.71.140
volumes:
- ../../conf_files/gnb.sa.band78.106prb.rfsim.conf:/opt/oai-gnb/etc/gnb.conf
- ../../conf_files/gnb.sa.band78.106prb.rfsim.yaml:/opt/oai-gnb/etc/gnb.yaml
healthcheck:
test: /bin/bash -c "pgrep nr-softmodem"
interval: 10s
......
......@@ -289,7 +289,7 @@ services:
USE_ADDITIONAL_OPTIONS: --sa --rfsim --log_config.global_log_options level,nocolor,time
-r 106 --numerology 1 -C 3619200000
--uicc0.imsi 208990100001100
--rfsimulator.serveraddr 192.168.78.2
--rfsimulator.serveraddr oai-du
depends_on:
- oai-du
networks:
......
services:
oai-gnb:
image: ${REGISTRY:-oaisoftwarealliance}/oai-gnb-aw2s:${TAG:-develop}
network_mode: "host"
container_name: oai-gnb-aw2s
cap_drop:
- ALL
cap_add:
- SYS_NICE
- IPC_LOCK
ulimits:
core: -1 # for core dumps
environment:
TZ: Europe/Paris
USE_ADDITIONAL_OPTIONS: --sa
volumes:
- ../../conf_files/gnb.sa.band78.51prb.aw2s.ddsuu.2x2.conf:/opt/oai-gnb-aw2s/etc/gnb.conf
healthcheck:
test: /bin/bash -c "pgrep nr-softmodem"
interval: 10s
timeout: 5s
retries: 5
......@@ -19,13 +19,16 @@
* contact@openairinterface.org
*/
/*! \file f1ap_du_interface_management.h
* \brief f1ap interface management for DU
* \author EURECOM/NTUST
* \date 2018
* \version 0.1
* \company Eurecom
* \email: navid.nikaein@eurecom.fr, bing-kai.hong@eurecom.fr
* \note
* \warning
*/
\ No newline at end of file
#ifndef FIVEG_PLATFORM_TYPES_H__
#define FIVEG_PLATFORM_TYPES_H__
#include <stdint.h>
typedef struct nssai_s {
uint8_t sst;
uint32_t sd;
} nssai_t;
typedef enum { NON_DYNAMIC, DYNAMIC } fiveQI_t;
#endif
......@@ -55,5 +55,4 @@ typedef enum { CPtype = 0, UPtype } E1_t;
#define NODE_IS_MBMS(nOdE_TyPe) ((nOdE_TyPe) == ngran_eNB_MBMS_STA)
#define GTPV1_U_PORT_NUMBER (2152)
typedef enum { non_dynamic, dynamic } fiveQI_type_t;
#endif
......@@ -75,7 +75,7 @@ static inline void *calloc_or_fail(size_t nmemb, size_t size)
if (ptr == NULL) {
fprintf(stderr, "Failed to calloc() %zu elements of %zu bytes: out of memory", nmemb, size);
exit(EXIT_FAILURE);
abort();
}
return ptr;
......
......@@ -79,7 +79,7 @@ More details about the E1AP procedures in OAI are available in this document: [E
# 2. Running the E1 Split
The setup is assuming that all modules are running on the same machine. The user can refer to the [F1 design document](./../F1-design.md) for local deployment of the DU.
The setup is assuming that all modules are running on the same machine. The user can refer to the [F1 design document](./../F1AP/F1-design.md) for local deployment of the DU.
## 2.1 Configuration File
......
<table style="border-collapse: collapse; border: none;">
<tr style="border-collapse: collapse; border: none;">
<td style="border-collapse: collapse; border: none;">
<a href="http://www.openairinterface.org/">
<img src="./images/oai_final_logo.png" alt="" border=3 height=50 width=150>
</img>
</a>
</td>
<td style="border-collapse: collapse; border: none; vertical-align: center;">
<b><font size = "5">F1AP Messages Encoding & Decoding Library</font></b>
</td>
</tr>
</table>
[[_TOC_]]
# Intro
This library is for the encoding, decoding and testing of F1AP (F1 Application Protocol) messages.
# Implementation Details
The library includes the following components:
1. **Common Functions**:
This file [f1ap_lib_common.c](../../openair2/F1AP/lib/f1ap_lib_common.c) and its corresponding header contain utility functions and macros shared across different F1AP functions.
2. **Message-Specific Modules**:
Each F1AP message (e.g., DL RRC, UL RRC, etc.) has its corresponding modules and each module will include the encoder, decoder, equality check, and memory management functions specific to that message type. Specifically, the goal is to achieve the following:
* **Encoder & Decoder**: Implement encoding and decoding functions for each F1AP message. These functions will convert F1AP messages coming from upper or lower layers into an F1AP PDU to be sent over F1 interface.
* **Equality Check (eq_X)**: `eq_X()` function that compares two messages for equality. This function is useful for testing purposes, ensuring that encoded and decoded messages match.
* **Deep Copy (cp_X)**: `cp_X()` function that performs a deep copy of a message. This function is beneficial when sending ITTI messages, as it avoids manual copying.
* **Memory Management (free_X)**: `free_X()` function to release memory associated with a message. Proper memory management helps prevent memory leaks.
e.g. The following module contains functions that performs the encoding/decoding, equality check, deep copy and memory management for DL/UL RRC message transfer:
* [f1ap_rrc_message_transfer.c](../../openair2/F1AP/lib/f1ap_rrc_message_transfer.c)
# Testing
The functions in the file [f1ap_lib_common.c](../../openair2/F1AP/tests/f1ap_lib_test.c) are used to test F1AP message encoding and decoding functionalities, according to the following steps:
* call the encoder function for the message to be transferred into a F1AP PDU
* use `f1ap_encode_decode` to perform the following steps:
- Validates the input encoded PDU against constraints.
- Encodes the PDU using APER into a binary buffer.
- Decodes the binary buffer back into a PDU.
- Returns the decoded PDU.
* call the decoder function for the decoded F1AP PDU to obtain the decoded message
* call `eq_dl_rrc_message_transfer` to compare the original message with the decoded one
* call `cp_dl_rrc_message_transfer` to deep copy the original message, then compare the with the original one
* free all messages and PDUs
A flowchart for a function testing F1AP messages, such as `test_f1ap_setup_request`, would look like this:
```mermaid
flowchart TD
create[Create F1AP message]-->|f1ap_setup_req_t msg|enc[encode_f1ap_setup_request]
enc-->|F1AP_F1AP_PDU_t *f1enc|encdec[f1ap_encode_decode]
encdec-->|F1AP_F1AP_PDU_t *f1dec|dec[decode_f1ap_setup_request]
create-->|f1ap_setup_req_t msg|eq
dec-->|f1ap_setup_req_t decoded|eq[eq_f1ap_setup_request]
create-->|f1ap_setup_req_t msg|cp[cp_f1ap_setup_request]
cp-->|f1ap_setup_req_t cp|eq[eq_f1ap_setup_request]
```
......@@ -65,7 +65,7 @@ Legacy unmaintained files:
- General software architecture notes: [SW_archi.md](./SW_archi.md)
- [Information on E1](./E1AP/E1-design.md)
- [Information on F1](./F1-design.md)
- [Information on F1](./F1AP/F1-design.md)
- [Information on how NR nFAPI works](./NR_NFAPI_archi.md)
- [Flow graph of the L1 in gNB](SW-archi-graph.md)
- [L1 threads in NR-UE](./nr-ue-design.md)
......
......@@ -24,6 +24,10 @@ cmake .. -GNinja -DENABLE_TESTS=ON
ninja tests
```
The user can use either `ninja` or `make`.
# Run unit tests
Then, you can run `ctest` to run all tests:
```bash
......
......@@ -78,7 +78,8 @@ RUN apt-get update && \
iputils-ping \
gdb \
moreutils \
libusb-1.0-0 && \
libusb-1.0-0 \
libyaml-cpp-dev && \
rm -rf /var/lib/apt/lists/*
WORKDIR /opt/oai-gnb/bin
......@@ -86,7 +87,10 @@ COPY --from=ran-build \
/oai-ran/cmake_targets/ran_build/build/nr-softmodem ./
COPY ./docker/scripts/gnb_entrypoint.sh ./entrypoint.sh
COPY --from=ran-build /oai-ran/cmake_targets/ran_build/build/libparams_libconfig.so /usr/local/lib/
COPY --from=ran-build \
/oai-ran/cmake_targets/ran_build/build/libparams_libconfig.so \
/oai-ran/cmake_targets/ran_build/build/libparams_yaml.so \
/usr/local/lib/
#copy files from nvIPC
COPY --from=ran-build \
......@@ -107,4 +111,4 @@ RUN ldconfig && \
WORKDIR /opt/oai-gnb
COPY --from=ran-build /tini /tini
ENTRYPOINT ["/tini", "-v", "--", "/opt/oai-gnb/bin/entrypoint.sh"]
CMD ["/opt/oai-gnb/bin/nr-softmodem", "-O", "/opt/oai-gnb/etc/gnb.conf"]
CMD ["/opt/oai-gnb/bin/nr-softmodem"]
......@@ -78,7 +78,8 @@ RUN apt-get update && \
iputils-ping \
gdb \
moreutils \
libusb-1.0-0 && \
libusb-1.0-0 \
libyaml-cpp-dev && \
rm -rf /var/lib/apt/lists/*
WORKDIR /opt/oai-gnb/bin
......@@ -92,6 +93,7 @@ COPY --from=ran-build \
/oai-ran/cmake_targets/ran_build/build/libparams_libconfig.so \
/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/libparams_yaml.so \
/usr/local/lib/
#copy files from nvIPC
......@@ -113,4 +115,4 @@ RUN ldconfig && \
WORKDIR /opt/oai-gnb
COPY --from=ran-build /tini /tini
ENTRYPOINT ["/tini", "-v", "--", "/opt/oai-gnb/bin/entrypoint.sh"]
CMD ["/opt/oai-gnb/bin/nr-softmodem", "-O", "/opt/oai-gnb/etc/gnb.conf"]
CMD ["/opt/oai-gnb/bin/nr-softmodem"]
......@@ -41,6 +41,9 @@ RUN /bin/sh oaienv && \
FROM registry.access.redhat.com/ubi9/ubi:latest AS oai-gnb-aw2s
ENV TZ=Europe/Paris
# Install EPEL for RHEL9
RUN dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm
RUN dnf update -y && \
dnf install -y \
procps-ng \
......@@ -50,7 +53,8 @@ RUN dnf update -y && \
lksctp-tools \
tzdata \
net-tools \
iputils && \
iputils \
yaml-cpp-devel && \
echo "/usr/local/lib" > /etc/ld.so.conf.d/local-lib.conf && \
echo "/usr/local/lib64" >> /etc/ld.so.conf.d/local-lib.conf
......@@ -69,6 +73,7 @@ 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 \
/oai-ran/cmake_targets/ran_build/build/libparams_yaml.so \
/usr/local/lib/
COPY --from=gnb-base \
......@@ -98,4 +103,4 @@ WORKDIR /opt/oai-gnb-aw2s
COPY --from=gnb-base /tini /tini
ENTRYPOINT ["/tini", "-v", "--", "/opt/oai-gnb-aw2s/bin/entrypoint.sh"]
CMD ["/opt/oai-gnb-aw2s/bin/nr-softmodem", "-O", "/opt/oai-gnb-aw2s/etc/gnb.conf"]
CMD ["/opt/oai-gnb-aw2s/bin/nr-softmodem"]
......@@ -70,6 +70,7 @@ 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 \
/oai-ran/cmake_targets/ran_build/build/libparams_yaml.so \
/usr/local/lib/
COPY --from=gnb-base \
......@@ -96,4 +97,4 @@ WORKDIR /opt/oai-gnb-aw2s
COPY --from=gnb-base /tini /tini
ENTRYPOINT ["/tini", "-v", "--", "/opt/oai-gnb-aw2s/bin/entrypoint.sh"]
CMD ["/opt/oai-gnb-aw2s/bin/nr-softmodem", "-O", "/opt/oai-gnb-aw2s/etc/gnb.conf"]
CMD ["/opt/oai-gnb-aw2s/bin/nr-softmodem"]
......@@ -55,7 +55,8 @@ RUN apt-get update && \
openssl \
net-tools \
iproute2 \
iputils-ping && \
iputils-ping \
libyaml-cpp-dev && \
rm -rf /var/lib/apt/lists/*
COPY ./libori.so /usr/local/lib/
......@@ -73,6 +74,7 @@ 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 \
/oai-ran/cmake_targets/ran_build/build/libparams_yaml.so \
/usr/local/lib/
......@@ -95,4 +97,4 @@ WORKDIR /opt/oai-gnb-aw2s
COPY --from=gnb-base /tini /tini
ENTRYPOINT ["/tini", "-v", "--", "/opt/oai-gnb-aw2s/bin/entrypoint.sh"]
CMD ["/opt/oai-gnb-aw2s/bin/nr-softmodem", "-O", "/opt/oai-gnb-aw2s/etc/gnb.conf"]
CMD ["/opt/oai-gnb-aw2s/bin/nr-softmodem"]
......@@ -33,6 +33,9 @@ FROM ran-build-fhi72:latest AS gnb-build
FROM registry.access.redhat.com/ubi9/ubi:latest AS oai-gnb-fhi72
ENV TZ=Europe/Paris
# Install EPEL for RHEL9
RUN dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm
# Copy the entitlements
COPY ./etc-pki-entitlement /etc/pki/entitlement
......@@ -55,7 +58,8 @@ RUN rm -f /etc/rhsm-host && \
python3 \
python3-pip \
net-tools \
iputils && \
iputils \
yaml-cpp-devel && \
pip3 install six && \
pip3 install requests && \
echo "/usr/local/lib" > /etc/ld.so.conf.d/local-lib.conf && \
......@@ -78,6 +82,7 @@ COPY --from=gnb-build \
/oai-ran/cmake_targets/ran_build/build/libldpc*.so \
/oai-ran/cmake_targets/ran_build/build/libtelnetsrv.so \
/oai-ran/cmake_targets/ran_build/build/libtelnetsrv_ci.so \
/oai-ran/cmake_targets/ran_build/build/libparams_yaml.so \
/usr/local/lib/
## Libxran library
......@@ -122,4 +127,4 @@ RUN ldconfig && \
WORKDIR /opt/oai-gnb
COPY --from=gnb-base /tini /tini
ENTRYPOINT ["/tini", "-v", "--", "/opt/oai-gnb/bin/entrypoint.sh"]
CMD ["/opt/oai-gnb/bin/nr-softmodem", "-O", "/opt/oai-gnb/etc/gnb.conf"]
CMD ["/opt/oai-gnb/bin/nr-softmodem"]
......@@ -70,6 +70,7 @@ COPY --from=gnb-build \
/oai-ran/cmake_targets/ran_build/build/libldpc*.so \
/oai-ran/cmake_targets/ran_build/build/libtelnetsrv.so \
/oai-ran/cmake_targets/ran_build/build/libtelnetsrv_ci.so \
/oai-ran/cmake_targets/ran_build/build/libparams_yaml.so \
/usr/local/lib/
## Libxran library
......@@ -114,4 +115,4 @@ RUN ldconfig && \
WORKDIR /opt/oai-gnb
COPY --from=gnb-base /tini /tini
ENTRYPOINT ["/tini", "-v", "--", "/opt/oai-gnb/bin/entrypoint.sh"]
CMD ["/opt/oai-gnb/bin/nr-softmodem", "-O", "/opt/oai-gnb/etc/gnb.conf"]
CMD ["/opt/oai-gnb/bin/nr-softmodem"]
......@@ -58,7 +58,8 @@ RUN apt-get update && \
libnuma-dev \
python3 \
python3-six \
python3-requests &&\
python3-requests \
libyaml-cpp-dev && \
# if the --sanitize option was used to build, additional packages are required
/bin/bash -c 'if [[ "$BUILD_OPTION" = "--sanitize" ]]; then DEBIAN_FRONTEND=noninteractive apt-get install --yes \
libasan5 \
......@@ -80,6 +81,7 @@ COPY --from=gnb-build \
/oai-ran/cmake_targets/ran_build/build/libldpc*.so \
/oai-ran/cmake_targets/ran_build/build/libtelnetsrv.so \
/oai-ran/cmake_targets/ran_build/build/libtelnetsrv_ci.so \
/oai-ran/cmake_targets/ran_build/build/libparams_yaml.so \
/usr/local/lib/
## Libxran library
......@@ -110,4 +112,4 @@ RUN ldconfig && \
WORKDIR /opt/oai-gnb
COPY --from=gnb-base /tini /tini
ENTRYPOINT ["/tini", "-v", "--", "/opt/oai-gnb/bin/entrypoint.sh"]
CMD ["/opt/oai-gnb/bin/nr-softmodem", "-O", "/opt/oai-gnb/etc/gnb.conf"]
CMD ["/opt/oai-gnb/bin/nr-softmodem"]
......@@ -34,6 +34,9 @@ FROM ran-build:latest AS gnb-build
FROM registry.access.redhat.com/ubi9/ubi:latest AS oai-gnb
ENV TZ=Europe/Paris
# Install EPEL for RHEL9
RUN dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm
RUN dnf update -y && \
dnf install -y \
procps-ng \
......@@ -46,7 +49,8 @@ RUN dnf update -y && \
python3 \
python3-pip \
net-tools \
iputils && \
iputils \
yaml-cpp-devel && \
pip3 install six && \
pip3 install requests && \
echo "/usr/local/lib" > /etc/ld.so.conf.d/local-lib.conf && \
......@@ -67,6 +71,7 @@ COPY --from=gnb-build \
/oai-ran/cmake_targets/ran_build/build/libldpc*.so \
/oai-ran/cmake_targets/ran_build/build/libtelnetsrv.so \
/oai-ran/cmake_targets/ran_build/build/libtelnetsrv_ci.so \
/oai-ran/cmake_targets/ran_build/build/libparams_yaml.so \
/usr/local/lib/
COPY --from=gnb-base \
......@@ -125,4 +130,4 @@ WORKDIR /opt/oai-gnb
COPY --from=gnb-base /tini /tini
ENTRYPOINT ["/tini", "-v", "--", "/opt/oai-gnb/bin/entrypoint.sh"]
CMD ["/opt/oai-gnb/bin/nr-softmodem", "-O", "/opt/oai-gnb/etc/gnb.conf"]
CMD ["/opt/oai-gnb/bin/nr-softmodem"]
......@@ -68,6 +68,7 @@ COPY --from=gnb-build \
/oai-ran/cmake_targets/ran_build/build/libldpc*.so \
/oai-ran/cmake_targets/ran_build/build/libtelnetsrv.so \
/oai-ran/cmake_targets/ran_build/build/libtelnetsrv_ci.so \
/oai-ran/cmake_targets/ran_build/build/libparams_yaml.so \
/usr/local/lib/
COPY --from=gnb-base \
......@@ -123,4 +124,4 @@ WORKDIR /opt/oai-gnb
COPY --from=gnb-base /tini /tini
ENTRYPOINT ["/tini", "-v", "--", "/opt/oai-gnb/bin/entrypoint.sh"]
CMD ["/opt/oai-gnb/bin/nr-softmodem", "-O", "/opt/oai-gnb/etc/gnb.conf"]
CMD ["/opt/oai-gnb/bin/nr-softmodem"]
......@@ -63,7 +63,8 @@ RUN apt-get update && \
python3 \
python3-six \
python3-requests \
libusb-1.0-0 && \
libusb-1.0-0 \
libyaml-cpp-dev && \
# if the --sanitize option was used to build, additional packages are required
/bin/bash -c 'if [[ "$BUILD_OPTION" = "--sanitize" ]]; then DEBIAN_FRONTEND=noninteractive apt-get install --yes \
#libasan5 \ # see below
......@@ -93,6 +94,7 @@ COPY --from=gnb-build \
/oai-ran/cmake_targets/ran_build/build/libldpc*.so \
/oai-ran/cmake_targets/ran_build/build/libtelnetsrv.so \
/oai-ran/cmake_targets/ran_build/build/libtelnetsrv_ci.so \
/oai-ran/cmake_targets/ran_build/build/libparams_yaml.so \
/usr/local/lib/
# Now we are copying from builder-image the UHD files.
......@@ -128,4 +130,4 @@ WORKDIR /opt/oai-gnb
COPY --from=gnb-base /tini /tini
ENTRYPOINT ["/tini", "-v", "--", "/opt/oai-gnb/bin/entrypoint.sh"]
CMD ["/opt/oai-gnb/bin/nr-softmodem", "-O", "/opt/oai-gnb/etc/gnb.conf"]
CMD ["/opt/oai-gnb/bin/nr-softmodem"]
......@@ -9,14 +9,29 @@ echo "=================================="
echo "/proc/sys/kernel/core_pattern=$(cat /proc/sys/kernel/core_pattern)"
if [ ! -f $CONFIGFILE ]; then
echo "No configuration file found: please mount at $CONFIGFILE"
exit 255
echo "No configuration file $CONFIGFILE found: attempting to find YAML config"
YAML_CONFIGFILE=$PREFIX/etc/gnb.yaml
if [ ! -f $YAML_CONFIGFILE ]; then
echo "No configuration file $YAML_CONFIGFILE found. Please mount either at $CONFIGFILE or $YAML_CONFIGFILE"
exit 255
fi
CONFIGFILE=$YAML_CONFIGFILE
fi
echo "=================================="
echo "== Configuration file:"
cat $CONFIGFILE
new_args=()
while [[ $# -gt 0 ]]; do
new_args+=("$1")
shift
done
new_args+=("-O")
new_args+=("$CONFIGFILE")
# enable printing of stack traces on assert
export OAI_GDBSTACKS=1
......@@ -24,7 +39,6 @@ echo "=================================="
echo "== Starting gNB soft modem with AW2S"
if [[ -v USE_ADDITIONAL_OPTIONS ]]; then
echo "Additional option(s): ${USE_ADDITIONAL_OPTIONS}"
new_args=()
while [[ $# -gt 0 ]]; do
new_args+=("$1")
shift
......@@ -35,6 +49,6 @@ if [[ -v USE_ADDITIONAL_OPTIONS ]]; then
echo "${new_args[@]}"
exec "${new_args[@]}"
else
echo "$@"
exec "$@"
echo "${new_args[@]}"
exec "${new_args[@]}"
fi
......@@ -9,14 +9,29 @@ echo "=================================="
echo "/proc/sys/kernel/core_pattern=$(cat /proc/sys/kernel/core_pattern)"
if [ ! -f $CONFIGFILE ]; then
echo "No configuration file found: please mount at $CONFIGFILE"
exit 255
echo "No configuration file $CONFIGFILE found: attempting to find YAML config"
YAML_CONFIGFILE=$PREFIX/etc/gnb.yaml
if [ ! -f $YAML_CONFIGFILE ]; then
echo "No configuration file $YAML_CONFIGFILE found. Please mount either at $CONFIGFILE or $YAML_CONFIGFILE"
exit 255
fi
CONFIGFILE=$YAML_CONFIGFILE
fi
echo "=================================="
echo "== Configuration file:"
cat $CONFIGFILE
new_args=()
while [[ $# -gt 0 ]]; do
new_args+=("$1")
shift
done
new_args+=("-O")
new_args+=("$CONFIGFILE")
# Load the USRP binaries
echo "=================================="
echo "== Load USRP binaries"
......@@ -35,7 +50,6 @@ echo "=================================="
echo "== Starting gNB soft modem"
if [[ -v USE_ADDITIONAL_OPTIONS ]]; then
echo "Additional option(s): ${USE_ADDITIONAL_OPTIONS}"
new_args=()
while [[ $# -gt 0 ]]; do
new_args+=("$1")
shift
......@@ -46,6 +60,6 @@ if [[ -v USE_ADDITIONAL_OPTIONS ]]; then
echo "${new_args[@]}"
exec "${new_args[@]}"
else
echo "$@"
exec "$@"
echo "${new_args[@]}"
exec "${new_args[@]}"
fi
......@@ -622,6 +622,7 @@ static void rx_rf(RU_t *ru, int *frame, int *slot)
rxp,
samples_per_slot,
ru->nb_rx);
gNBscopeCopy(ru, gNbTimeDomainSamples, rxp[0], sizeof(c16_t), 1, samples_per_slot, 0);
}
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_READ, 0 );
......
......@@ -37,6 +37,7 @@
#include "LAYER2/nr_pdcp/nr_pdcp_oai_api.h"
#include "LAYER2/nr_rlc/nr_rlc_oai_api.h"
#include "RRC/NR/MESSAGES/asn1_msg.h"
#include "openair1/PHY/TOOLS/phy_scope_interface.h"
/*
* NR SLOT PROCESSING SEQUENCE
......@@ -706,8 +707,10 @@ void readFrame(PHY_VARS_NR_UE *UE, openair0_timestamp *timestamp, bool toTrash)
+ 4 * ((x * fp->samples_per_subframe) + fp->get_samples_slot_timestamp(slot, fp, 0));
}
int tmp = UE->rfdevice.trx_read_func(&UE->rfdevice, timestamp, rxp, fp->get_samples_per_slot(slot, fp), fp->nb_antennas_rx);
AssertFatal(fp->get_samples_per_slot(slot, fp) == tmp, "");
int read_block_size = fp->get_samples_per_slot(slot, fp);
int tmp = UE->rfdevice.trx_read_func(&UE->rfdevice, timestamp, rxp, read_block_size, fp->nb_antennas_rx);
UEscopeCopy(UE, ueTimeDomainSamplesBeforeSync, rxp[0], sizeof(c16_t), 1, read_block_size, 0);
AssertFatal(read_block_size == tmp, "");
if (IS_SOFTMODEM_RFSIM)
dummyWrite(UE, *timestamp, fp->get_samples_per_slot(slot, fp));
......@@ -812,6 +815,11 @@ void *UE_thread(void *arg)
if (get_softmodem_params()->sync_ref && UE->sl_mode == 2) {
UE->is_synchronized = 1;
} else {
//warm up the RF board
int64_t tmp;
for (int i = 0; i < 50; i++)
readFrame(UE, &tmp, true);
}
while (!oai_exit) {
......@@ -962,6 +970,7 @@ void *UE_thread(void *arg)
const int readBlockSize = get_readBlockSize(slot_nr, fp) - iq_shift_to_apply;
openair0_timestamp rx_timestamp;
int tmp = UE->rfdevice.trx_read_func(&UE->rfdevice, &rx_timestamp, rxp, readBlockSize, fp->nb_antennas_rx);
UEscopeCopy(UE, ueTimeDomainSamples, rxp[0], sizeof(c16_t), 1, readBlockSize, 0);
AssertFatal(readBlockSize == tmp, "");
if(slot_nr == (nb_slot_frame - 1)) {
......
......@@ -72,6 +72,7 @@ void nr_generate_pdsch(processingData_L1tx_t *msgTx, int frame, int slot)
const int layerSz = frame_parms->N_RB_DL * NR_SYMBOLS_PER_SLOT * NR_NB_SC_PER_RB;
const int dmrs_Type = rel15->dmrsConfigType;
const int nb_re_dmrs = rel15->numDmrsCdmGrpsNoData * (rel15->dmrsConfigType == NFAPI_NR_DMRS_TYPE1 ? 6 : 4);
const int amp_dmrs = (int)((double)amp * sqrt(rel15->numDmrsCdmGrpsNoData)); // 3GPP TS 38.214 Section 4.1: Table 4.1-1
LOG_D(PHY,"pdsch: BWPStart %d, BWPSize %d, rbStart %d, rbsize %d\n",
rel15->BWPStart,rel15->BWPSize,rel15->rbStart,rel15->rbSize);
const int n_dmrs = (rel15->BWPStart + rel15->rbStart + rel15->rbSize) * nb_re_dmrs;
......@@ -296,7 +297,7 @@ void nr_generate_pdsch(processingData_L1tx_t *msgTx, int frame, int slot)
/* Map DMRS Symbol */
if ((dmrs_symbol_map & (1 << l_symbol))
&& (k == ((start_sc + get_dmrs_freq_idx(n, k_prime, delta, dmrs_Type)) % (frame_parms->ofdm_symbol_size)))) {
txdataF_precoding[layer][l_symbol][k] = c16mulRealShift(mod_dmrs[dmrs_idx], Wt[l_prime] * Wf[k_prime] * amp, 15);
txdataF_precoding[layer][l_symbol][k] = c16mulRealShift(mod_dmrs[dmrs_idx], Wt[l_prime] * Wf[k_prime] * amp_dmrs, 15);
#ifdef DEBUG_DLSCH_MAPPING
printf("dmrs_idx %u\t l %d \t k %d \t k_prime %d \t n %d \t txdataF: %d %d\n",
dmrs_idx,
......
......@@ -202,7 +202,7 @@ void nr_scan_ssb(void *arg)
/* process pss search on received buffer */
ssbInfo->syncRes.frame_id = frame_id;
int nid2;
int freq_offset_pss;
int freq_offset_pss = 0;
const int sync_pos = pss_synchro_nr((const c16_t **)rxdata,
fp,
pssTime,
......
......@@ -279,8 +279,17 @@ class IQHist {
}
} else if (plot_type == 1) {
if (ImPlot::BeginPlot(label.c_str(), {(float)ImGui::GetWindowWidth() * 0.3f, (float)ImGui::GetWindowWidth() * 0.3f})) {
// Limit the amount of data plotted with scatterplot (issue with vertices/draw call)
ImPlot::PlotScatter(label.c_str(), iq_data->real.data(), iq_data->imag.data(), std::min(16000, iq_data->len));
int points_drawn = 0;
while (points_drawn < iq_data->len) {
// Limit the amount of data plotted with PlotScatter call (issue with vertices/draw call)
int points_to_draw = std::min(iq_data->len - points_drawn, 16000);
ImPlot::SetNextMarkerStyle(ImPlotMarker_Circle, 1, IMPLOT_AUTO_COL, 1);
ImPlot::PlotScatter(label.c_str(),
iq_data->real.data() + points_drawn,
iq_data->imag.data() + points_drawn,
points_to_draw);
points_drawn += points_to_draw;
}
ImPlot::EndPlot();
}
} else if (plot_type == 2) {
......@@ -480,6 +489,26 @@ void ShowUeScope(PHY_VARS_NR_UE *ue, float t)
pdsch_iq_hist->Draw(iq_data, t, new_data);
ImGui::TreePop();
}
if (ImGui::TreeNode("Time domain samples")) {
static auto iq_data = new IQData();
static auto time_domain_iq = new IQHist("Time domain samples");
bool new_data = false;
if (time_domain_iq->ShouldReadData()) {
new_data = iq_data->TryCollect(&scope_array[ueTimeDomainSamples], t, time_domain_iq->GetEpsilon());
}
time_domain_iq->Draw(iq_data, t, new_data);
ImGui::TreePop();
}
if (ImGui::TreeNode("Time domain samples - before sync")) {
static auto iq_data = new IQData();
static auto time_domain_iq = new IQHist("Time domain samples - before sync");
bool new_data = false;
if (time_domain_iq->ShouldReadData()) {
new_data = iq_data->TryCollect(&scope_array[ueTimeDomainSamplesBeforeSync], t, time_domain_iq->GetEpsilon());
}
time_domain_iq->Draw(iq_data, t, new_data);
ImGui::TreePop();
}
if (ImGui::TreeNode("Broadcast channel")) {
ImGui::Text("RSRP %d", ue->measurements.ssb_rsrp_dBm[ue->frame_parms.ssb_index]);
if (ImGui::TreeNode("IQ")) {
......@@ -552,6 +581,16 @@ void ShowGnbScope(PHY_VARS_gNB *gNB, float t)
pusch_llr_plot->Draw(t, gNBPuschLlr, "PUSCH LLR");
ImGui::TreePop();
}
if (ImGui::TreeNode("Time domain samples")) {
static auto iq_data = new IQData();
static auto time_domain_iq = new IQHist("Time domain samples");
bool new_data = false;
if (time_domain_iq->ShouldReadData()) {
new_data = iq_data->TryCollect(&scope_array[gNbTimeDomainSamples], t, time_domain_iq->GetEpsilon());
}
time_domain_iq->Draw(iq_data, t, new_data);
ImGui::TreePop();
}
}
void *imscope_thread(void *data_void_ptr)
......@@ -722,6 +761,7 @@ extern "C" void imscope_autoinit(void *dataptr)
scope->copyDataUnsafeWithOffset = copyDataUnsafeWithOffset;
scope->unlockScopeData = unlockScopeData;
scope_params->gNB->scopeData = scope;
scope_params->ru->scopeData = scope;
} else {
PHY_VARS_NR_UE *ue = (PHY_VARS_NR_UE *)dataptr;
scopeData_t *scope = (scopeData_t *)calloc(1, sizeof(scopeData_t));
......
......@@ -73,6 +73,9 @@ enum scopeDataType {
MAX_SCOPE_TYPES,
gNBPuschRxIq = MAX_SCOPE_TYPES,
gNBPuschLlr,
ueTimeDomainSamples,
ueTimeDomainSamplesBeforeSync,
gNbTimeDomainSamples,
EXTRA_SCOPE_TYPES
};
......@@ -127,12 +130,12 @@ void copyData(void *, enum scopeDataType type, void *dataIn, int elementSz, int
}
#define gNBscopeCopyWithMetadata(gnb, type, ...) \
if (gnb->scopeData) { \
((scopeData_t *)gnb->scopeData)->copyData((scopeData_t *)gNB->scopeData, type, ##__VA_ARGS__); \
((scopeData_t *)gnb->scopeData)->copyData((scopeData_t *)gnb->scopeData, type, ##__VA_ARGS__); \
}
#define gNBscopeCopy(gnb, type, ...) \
if (gnb->scopeData) { \
metadata mt = {.slot = -1, .frame = -1}; \
((scopeData_t *)gnb->scopeData)->copyData((scopeData_t *)gNB->scopeData, type, ##__VA_ARGS__, &mt); \
((scopeData_t *)gnb->scopeData)->copyData((scopeData_t *)gnb->scopeData, type, ##__VA_ARGS__, &mt); \
}
#define GnbScopeUpdate(gnb, type, numElt) \
if (gnb->scopeData) \
......
......@@ -661,7 +661,8 @@ typedef struct RU_t_s {
/// number of cores for RU ThreadPool
int num_tpcores;
/// structure for analyzing high-level RT measurements
rt_ru_profiling_t rt_ru_profiling;
rt_ru_profiling_t rt_ru_profiling;
void* scopeData;
} RU_t;
......
......@@ -163,7 +163,7 @@ typedef struct qos_characteristics_s {
} packet_error_rate;
} dynamic;
};
fiveQI_type_t qos_type;
fiveQI_t qos_type;
} qos_characteristics_t;
typedef struct ngran_allocation_retention_priority_s {
......
......@@ -24,8 +24,7 @@
#include <netinet/in.h>
#include <netinet/sctp.h>
#include "s1ap_messages_types.h"
#include "ngap_messages_types.h"
#include "common/5g_platform_types.h"
//-------------------------------------------------------------------------------------------//
// Defines to access message fields.
......@@ -82,12 +81,12 @@
#define F1AP_MAX_NO_UE_ID 1024
#define F1AP_MAX_NO_OF_INDIVIDUAL_CONNECTIONS_TO_RESET 65536
typedef net_ip_address_t f1ap_net_ip_address_t;
/* 9.3.1.42 of 3GPP TS 38.473 - gNB-CU System Information */
#define F1AP_MAX_NO_SIB_TYPES 32
typedef struct f1ap_net_config_t {
f1ap_net_ip_address_t CU_f1_ip_address;
f1ap_net_ip_address_t DU_f1c_ip_address;
char *CU_f1_ip_address;
char *DU_f1c_ip_address;
char *DU_f1u_ip_address;
uint16_t CUport;
uint16_t DUport;
......@@ -99,6 +98,11 @@ typedef struct f1ap_plmn_t {
uint8_t mnc_digit_length;
} f1ap_plmn_t;
typedef struct f1ap_cp_tnl_s {
in_addr_t tl_address; // currently only IPv4 supported
uint16_t port;
} f1ap_cp_tnl_t;
typedef enum f1ap_mode_t { F1AP_MODE_TDD = 0, F1AP_MODE_FDD = 1 } f1ap_mode_t;
typedef struct f1ap_nr_frequency_info_t {
......@@ -179,18 +183,24 @@ typedef struct f1ap_du_register_req_t {
f1ap_net_config_t net_config;
} f1ap_du_register_req_t;
typedef struct f1ap_sib_msg_t {
/// RRC container with system information owned by gNB-CU
uint8_t *SI_container;
int SI_container_length;
/// SIB block type, e.g. 2 for sibType2
int SI_type;
} f1ap_sib_msg_t;
typedef struct served_cells_to_activate_s {
f1ap_plmn_t plmn;
// NR Global Cell Id
uint64_t nr_cellid;
/// NRPCI
/// NRPCI [int 0..1007]
uint16_t nrpci;
/// num SI messages per DU cell
uint8_t num_SI;
/// SI message containers (up to 21 messages per cell)
uint8_t *SI_container[21];
int SI_container_length[21];
int SI_type[21];
/// gNB-CU System Information message (up to 32 messages per cell)
f1ap_sib_msg_t SI_msg[F1AP_MAX_NO_SIB_TYPES];
} served_cells_to_activate_t;
typedef struct f1ap_setup_resp_s {
......@@ -208,18 +218,8 @@ typedef struct f1ap_setup_resp_s {
} f1ap_setup_resp_t;
typedef struct f1ap_gnb_cu_configuration_update_s {
/* Connexion id used between SCTP/F1AP */
uint16_t cnx_id;
/* SCTP association id */
sctp_assoc_t assoc_id;
/* Number of SCTP streams used for a mme association */
uint16_t sctp_in_streams;
uint16_t sctp_out_streams;
/// string holding gNB_CU_name
char *gNB_CU_name;
/// Transaction ID
uint64_t transaction_id;
/// number of DU cells to activate
uint16_t num_cells_to_activate; //0< num_cells_to_activate/mod <= 512;
served_cells_to_activate_t cells_to_activate[F1AP_MAX_NB_CELLS];
......@@ -228,26 +228,37 @@ typedef struct f1ap_gnb_cu_configuration_update_s {
typedef struct f1ap_setup_failure_s {
uint16_t cause;
uint16_t time_to_wait;
uint16_t criticality_diagnostics;
uint16_t criticality_diagnostics;
/// Transaction ID (M)
uint64_t transaction_id;
} f1ap_setup_failure_t;
typedef struct f1ap_gnb_cu_configuration_update_acknowledge_s {
uint64_t transaction_id;
// Cells Failed to be Activated List
uint16_t num_cells_failed_to_be_activated;
f1ap_plmn_t plmn[F1AP_MAX_NB_CELLS];
uint64_t nr_cellid[F1AP_MAX_NB_CELLS];
uint16_t cause[F1AP_MAX_NB_CELLS];
struct {
// NR CGI
f1ap_plmn_t plmn;
uint64_t nr_cellid;
uint16_t cause;
} cells_failed_to_be_activated[F1AP_MAX_NB_CELLS];
int have_criticality;
uint16_t criticality_diagnostics;
uint16_t criticality_diagnostics;
// gNB-CU TNL Association Setup List
uint16_t noofTNLAssociations_to_setup;
uint16_t have_port[F1AP_MAX_NO_OF_TNL_ASSOCIATIONS];
in_addr_t tl_address[F1AP_MAX_NO_OF_TNL_ASSOCIATIONS]; // currently only IPv4 supported
f1ap_cp_tnl_t tnlAssociations_to_setup[F1AP_MAX_NO_OF_TNL_ASSOCIATIONS];
// gNB-CU TNL Association Failed to Setup List
uint16_t noofTNLAssociations_failed;
in_addr_t tl_address_failed[F1AP_MAX_NO_OF_TNL_ASSOCIATIONS]; // currently only IPv4 supported
uint16_t cause_failed[F1AP_MAX_NO_OF_TNL_ASSOCIATIONS];
f1ap_cp_tnl_t tnlAssociations_failed[F1AP_MAX_NO_OF_TNL_ASSOCIATIONS];
// Dedicated SI Delivery Needed UE List
uint16_t noofDedicatedSIDeliveryNeededUEs;
uint32_t gNB_CU_ue_id[F1AP_MAX_NO_UE_ID];
f1ap_plmn_t ue_plmn[F1AP_MAX_NO_UE_ID];
uint64_t ue_nr_cellid[F1AP_MAX_NO_UE_ID];
struct {
uint32_t gNB_CU_ue_id;
// NR CGI
f1ap_plmn_t ue_plmn;
uint64_t ue_nr_cellid;
} dedicatedSIDeliveryNeededUEs[F1AP_MAX_NO_UE_ID];
} f1ap_gnb_cu_configuration_update_acknowledge_t;
typedef struct f1ap_gnb_cu_configuration_update_failure_s {
......@@ -285,16 +296,13 @@ typedef struct f1ap_gnb_du_configuration_update_s {
f1ap_plmn_t plmn;
uint64_t nr_cellid; // NR Global Cell Id
} cell_to_delete[F1AP_MAX_NB_CELLS];
/// string holding gNB_CU_name
/// gNB-DU unique ID, at least within a gNB-CU (0 .. 2^36 - 1)
uint64_t *gNB_DU_ID;
} f1ap_gnb_du_configuration_update_t;
typedef struct f1ap_gnb_du_configuration_update_acknowledge_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];
......@@ -334,6 +342,7 @@ typedef struct f1ap_initial_ul_rrc_message_s {
int rrc_container_length;
uint8_t *du2cu_rrc_container;
int du2cu_rrc_container_length;
uint8_t transaction_id;
} f1ap_initial_ul_rrc_message_t;
typedef struct f1ap_ul_rrc_message_s {
......@@ -346,7 +355,7 @@ typedef struct f1ap_ul_rrc_message_s {
typedef struct f1ap_up_tnl_s {
in_addr_t tl_address; // currently only IPv4 supported
teid_t teid;
uint32_t teid;
uint16_t port;
} f1ap_up_tnl_t;
......@@ -376,7 +385,7 @@ typedef struct f1ap_qos_characteristics_s {
} packet_error_rate;
} dynamic;
};
fiveQI_type_t qos_type;
fiveQI_t qos_type;
} f1ap_qos_characteristics_t;
typedef struct f1ap_ngran_allocation_retention_priority_s {
......@@ -401,6 +410,7 @@ typedef struct f1ap_drb_information_s {
uint8_t flows_to_be_setup_length;
} f1ap_drb_information_t;
typedef enum f1ap_rlc_mode_t { F1AP_RLC_MODE_AM, F1AP_RLC_MODE_UM_BIDIR, F1AP_RLC_UM_UNI_UL, F1AP_RLC_UM_UNI_DL } f1ap_rlc_mode_t;
typedef struct f1ap_drb_to_be_setup_s {
long drb_id;
f1ap_up_tnl_t up_ul_tnl[2];
......@@ -408,7 +418,7 @@ typedef struct f1ap_drb_to_be_setup_s {
f1ap_up_tnl_t up_dl_tnl[2];
uint8_t up_dl_tnl_length;
f1ap_drb_information_t drb_info;
rlc_mode_t rlc_mode;
f1ap_rlc_mode_t rlc_mode;
nssai_t nssai;
} f1ap_drb_to_be_setup_t;
......
......@@ -31,8 +31,9 @@
#define NGAP_MESSAGES_TYPES_H_
#include "common/platform_constants.h"
#include "common/platform_types.h"
#include "common/ngran_types.h"
#include "common/5g_platform_types.h"
#include "LTE_asn_constant.h"
#include "s1ap_messages_types.h"
//-------------------------------------------------------------------------------------------//
// Defines to access message fields.
......@@ -196,16 +197,11 @@ typedef enum ngap_rrc_establishment_cause_e {
NGAP_RRC_CAUSE_LAST
} ngap_rrc_establishment_cause_t;
typedef struct nssai_s {
uint8_t sst;
uint32_t sd;
} nssai_t;
typedef struct pdusession_level_qos_parameter_s {
uint8_t qfi;
uint64_t fiveQI;
uint64_t qos_priority;
fiveQI_type_t fiveQI_type;
fiveQI_t fiveQI_type;
ngap_allocation_retention_priority_t allocation_retention_priority;
} pdusession_level_qos_parameter_t;
......
......@@ -686,7 +686,7 @@ static int fill_BEARER_CONTEXT_SETUP_REQUEST(e1ap_bearer_setup_req_t *const bear
ieC6_1_1_1->qoS_Flow_Identifier = k->qfi;
/* QoS Characteristics */
qos_characteristics_t *qos_char_in = &k->qos_params.qos_characteristics;
if (qos_char_in->qos_type == non_dynamic) { // non Dynamic 5QI
if (qos_char_in->qos_type == NON_DYNAMIC) { // non Dynamic 5QI
ieC6_1_1_1->qoSFlowLevelQoSParameters.qoS_Characteristics.present = E1AP_QoS_Characteristics_PR_non_Dynamic_5QI;
asn1cCalloc(ieC6_1_1_1->qoSFlowLevelQoSParameters.qoS_Characteristics.choice.non_Dynamic_5QI, non_Dynamic_5QI);
non_Dynamic_5QI->fiveQI = qos_char_in->non_dynamic.fiveqi;
......@@ -1002,12 +1002,12 @@ static void extract_BEARER_CONTEXT_SETUP_REQUEST(const E1AP_E1AP_PDU_t *pdu, e1a
qos_characteristics_t *qos_char = &qos_flow->qos_params.qos_characteristics;
if (qos2Setup->qoSFlowLevelQoSParameters.qoS_Characteristics.present == E1AP_QoS_Characteristics_PR_non_Dynamic_5QI) {
qos_char->qos_type = non_dynamic;
qos_char->qos_type = NON_DYNAMIC;
qos_char->non_dynamic.fiveqi =
qos2Setup->qoSFlowLevelQoSParameters.qoS_Characteristics.choice.non_Dynamic_5QI->fiveQI;
} else {
E1AP_Dynamic5QIDescriptor_t *dynamic5QI = qos2Setup->qoSFlowLevelQoSParameters.qoS_Characteristics.choice.dynamic_5QI;
qos_char->qos_type = dynamic;
qos_char->qos_type = DYNAMIC;
qos_char->dynamic.qos_priority_level = dynamic5QI->qoSPriorityLevel;
qos_char->dynamic.packet_delay_budget = dynamic5QI->packetDelayBudget;
qos_char->dynamic.packet_error_rate.per_scalar = dynamic5QI->packetErrorRate.pER_Scalar;
......
add_subdirectory(lib)
add_subdirectory(MESSAGES)
if(ENABLE_TESTS)
......@@ -5,4 +6,6 @@ if(ENABLE_TESTS)
target_link_libraries(f1ap_ids_test UTIL HASHTABLE minimal_lib)
add_dependencies(tests f1ap_ids_test)
add_test(NAME F1AP_ID_test COMMAND f1ap_ids_test)
add_subdirectory(tests)
endif()
......@@ -411,8 +411,6 @@ typedef struct f1ap_cudu_inst_s {
instance_t gtpInst;
} f1ap_cudu_inst_t;
static const int nrb_lut[29] = {11, 18, 24, 25, 31, 32, 38, 51, 52, 65, 66, 78, 79, 93, 106, 107, 121, 132, 133, 135, 160, 162, 189, 216, 217, 245, 264, 270, 273};
uint8_t F1AP_get_next_transaction_identifier(instance_t mod_idP, instance_t cu_mod_idP);
f1ap_cudu_inst_t *getCxt(instance_t instanceP);
......
......@@ -36,17 +36,9 @@
/*
* Reset
*/
int CU_send_RESET(sctp_assoc_t assoc_id, const f1ap_reset_t *reset);
int CU_handle_RESET_ACKNOWLEDGE(instance_t instance, sctp_assoc_t assoc_id, uint32_t stream, F1AP_F1AP_PDU_t *pdu);
int CU_handle_RESET(instance_t instance, sctp_assoc_t assoc_id, uint32_t stream, F1AP_F1AP_PDU_t *pdu);
int CU_send_RESET_ACKNOWLEDGE(sctp_assoc_t assoc_id, const f1ap_reset_ack_t *ack);
/*
* Error Indication
*/
int CU_handle_ERROR_INDICATION(instance_t instance, sctp_assoc_t assoc_id, uint32_t stream, F1AP_F1AP_PDU_t *pdu);
int CU_send_ERROR_INDICATION(sctp_assoc_t assoc_id, F1AP_ErrorIndication_t *ErrorIndication);
/*
* F1 Setup
*/
......@@ -61,9 +53,6 @@ int CU_send_F1_SETUP_FAILURE(sctp_assoc_t assoc_id, const f1ap_setup_failure_t *
*/
int CU_handle_gNB_DU_CONFIGURATION_UPDATE(instance_t instance, sctp_assoc_t assoc_id, uint32_t stream, F1AP_F1AP_PDU_t *pdu);
int CU_send_gNB_DU_CONFIGURATION_FAILURE(sctp_assoc_t assoc_id,
f1ap_gnb_du_configuration_update_failure_t *GNBDUConfigurationUpdateFailure);
int CU_send_gNB_DU_CONFIGURATION_UPDATE_ACKNOWLEDGE(
sctp_assoc_t assoc_id,
f1ap_gnb_du_configuration_update_acknowledge_t *GNBDUConfigurationUpdateAcknowledge);
......@@ -72,25 +61,10 @@ int CU_send_gNB_DU_CONFIGURATION_UPDATE_ACKNOWLEDGE(
* gNB-CU Configuration Update
*/
int CU_send_gNB_CU_CONFIGURATION_UPDATE(sctp_assoc_t assoc_id, f1ap_gnb_cu_configuration_update_t *f1ap_gnb_cu_configuration_update);
int CU_handle_gNB_CU_CONFIGURATION_UPDATE_FAILURE(instance_t instance,
sctp_assoc_t assoc_id,
uint32_t stream,
F1AP_F1AP_PDU_t *pdu);
int CU_handle_gNB_CU_CONFIGURATION_UPDATE_ACKNOWLEDGE(instance_t instance,
sctp_assoc_t assoc_id,
uint32_t stream,
F1AP_F1AP_PDU_t *pdu);
/*
* gNB-DU Resource Coordination
*/
int CU_handle_gNB_DU_RESOURCE_COORDINATION_REQUEST(instance_t instance,
sctp_assoc_t assoc_id,
uint32_t stream,
F1AP_F1AP_PDU_t *pdu);
int CU_send_gNB_DU_RESOURCE_COORDINATION_RESPONSE(sctp_assoc_t assoc_id,
F1AP_GNBDUResourceCoordinationResponse_t *GNBDUResourceCoordinationResponse);
#endif /* F1AP_CU_INTERFACE_MANAGEMENT_H_ */
......@@ -44,7 +44,7 @@ static void f1ap_write_drb_qos_param(const f1ap_qos_flow_level_qos_parameters_t
int type = drb_qos_in->qos_characteristics.qos_type;
const f1ap_qos_characteristics_t *drb_qos_char_in = &drb_qos_in->qos_characteristics;
if (type == non_dynamic) {
if (type == NON_DYNAMIC) {
asn1_qosparam->qoS_Characteristics.present = F1AP_QoS_Characteristics_PR_non_Dynamic_5QI;
asn1cCalloc(asn1_qosparam->qoS_Characteristics.choice.non_Dynamic_5QI, tmp);
......@@ -130,7 +130,7 @@ static void f1ap_write_flows_mapped(const f1ap_flows_mapped_to_drb_t *flows_mapp
const f1ap_qos_characteristics_t *flow_qos_char_in = &flow_qos_params_in->qos_characteristics;
int type = flow_qos_params_in->qos_characteristics.qos_type;
if (type == non_dynamic) {
if (type == NON_DYNAMIC) {
QosParams->present = F1AP_QoS_Characteristics_PR_non_Dynamic_5QI;
asn1cCalloc(QosParams->choice.non_Dynamic_5QI, tmp);
......@@ -483,12 +483,15 @@ int CU_send_UE_CONTEXT_SETUP_REQUEST(sctp_assoc_t assoc_id, f1ap_ue_context_setu
/* 12.1.4 rLCMode */
/* TODO use rlc_mode from f1ap_drb_to_be_setup */
switch (f1ap_ue_context_setup_req->drbs_to_be_setup[i].rlc_mode) {
case RLC_MODE_AM:
case F1AP_RLC_MODE_AM:
drbs_toBeSetup_item->rLCMode = F1AP_RLCMode_rlc_am;
break;
default:
case F1AP_RLC_MODE_UM_BIDIR:
drbs_toBeSetup_item->rLCMode = F1AP_RLCMode_rlc_um_bidirectional;
break;
default:
AssertFatal(false, "modes other than AM/UM-Bidir not supported\n");
break;
}
/* OPTIONAL */
......@@ -1218,12 +1221,15 @@ int CU_send_UE_CONTEXT_MODIFICATION_REQUEST(sctp_assoc_t assoc_id, f1ap_ue_conte
/* 12.1.4 rLCMode */
/* TODO use rlc_mode from f1ap_drb_to_be_setup */
switch (f1ap_ue_context_modification_req->drbs_to_be_setup[i].rlc_mode) {
case RLC_MODE_AM:
case F1AP_RLC_MODE_AM:
drbs_toBeSetupMod_item->rLCMode = F1AP_RLCMode_rlc_am;
break;
default:
case F1AP_RLC_MODE_UM_BIDIR:
drbs_toBeSetupMod_item->rLCMode = F1AP_RLCMode_rlc_um_bidirectional;
break;
default:
AssertFatal(false, "modes other than AM/UM-Bidir not supported\n");
break;
}
/* OPTIONAL */
......
/*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
* except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/
/*! \file f1ap_du_interface_management.h
* \brief f1ap interface management for DU
* \author EURECOM/NTUST
* \date 2018
* \version 0.1
* \company Eurecom
* \email: navid.nikaein@eurecom.fr, bing-kai.hong@eurecom.fr
* \note
* \warning
*/
\ No newline at end of file
......@@ -38,14 +38,6 @@
*/
int DU_handle_RESET(instance_t instance, sctp_assoc_t assoc_id, uint32_t stream, F1AP_F1AP_PDU_t *pdu);
int DU_send_RESET_ACKNOWLEDGE(sctp_assoc_t assoc_id, const f1ap_reset_ack_t *ack);
int DU_send_RESET(sctp_assoc_t assoc_id, const f1ap_reset_t *reset);
int DU_handle_RESET_ACKNOWLEDGE(instance_t instance, sctp_assoc_t assoc_id, uint32_t stream, F1AP_F1AP_PDU_t *pdu);
/*
* Error Indication
*/
int DU_send_ERROR_INDICATION(sctp_assoc_t assoc_id, F1AP_F1AP_PDU_t *pdu_p);
int DU_handle_ERROR_INDICATION(instance_t instance, sctp_assoc_t assoc_id, uint32_t stream, F1AP_F1AP_PDU_t *pdu);
/*
* F1 Setup
......@@ -59,14 +51,7 @@ int DU_handle_F1_SETUP_FAILURE(instance_t instance, sctp_assoc_t assoc_id, uint3
/*
* gNB-DU Configuration Update
*/
int DU_send_gNB_DU_CONFIGURATION_UPDATE(sctp_assoc_t assoc_id, const f1ap_gnb_du_configuration_update_t *upd);
int DU_handle_gNB_DU_CONFIGURATION_FAILURE(instance_t instance, sctp_assoc_t assoc_id, uint32_t stream, F1AP_F1AP_PDU_t *pdu);
int DU_handle_gNB_DU_CONFIGURATION_UPDATE_ACKNOWLEDGE(instance_t instance,
sctp_assoc_t assoc_id,
uint32_t stream,
F1AP_F1AP_PDU_t *pdu);
int DU_send_gNB_DU_CONFIGURATION_UPDATE(sctp_assoc_t assoc_id, f1ap_gnb_du_configuration_update_t *msg);
/*
* gNB-CU Configuration Update
......@@ -79,17 +64,9 @@ int DU_send_gNB_CU_CONFIGURATION_UPDATE_FAILURE(sctp_assoc_t assoc_id,
int DU_send_gNB_CU_CONFIGURATION_UPDATE_ACKNOWLEDGE(sctp_assoc_t assoc_id,
f1ap_gnb_cu_configuration_update_acknowledge_t *GNBCUConfigurationUpdateAcknowledge);
/*
* gNB-DU Resource Coordination
*/
int DU_send_gNB_DU_RESOURCE_COORDINATION_REQUEST(sctp_assoc_t assoc_id,
F1AP_GNBDUResourceCoordinationRequest_t *GNBDUResourceCoordinationRequest);
int DU_handle_gNB_DU_RESOURCE_COORDINATION_RESPONSE(instance_t instance,
sctp_assoc_t assoc_id,
uint32_t stream,
F1AP_F1AP_PDU_t *pdu);
int DU_handle_gNB_DU_CONFIGURATION_UPDATE_ACKNOWLEDGE(instance_t instance,
sctp_assoc_t assoc_id,
uint32_t stream,
F1AP_F1AP_PDU_t *pdu);
#endif /* F1AP_DU_INTERFACE_MANAGEMENT_H_ */
......@@ -44,7 +44,7 @@ static instance_t du_create_gtpu_instance_to_cu(const f1ap_net_config_t *nc)
{
openAddr_t tmp = {0};
strncpy(tmp.originHost, nc->DU_f1u_ip_address, sizeof(tmp.originHost) - 1);
strncpy(tmp.destinationHost, nc->CU_f1_ip_address.ipv4_address, sizeof(tmp.destinationHost) - 1);
strncpy(tmp.destinationHost, nc->CU_f1_ip_address, sizeof(tmp.destinationHost) - 1);
sprintf(tmp.originService, "%d", nc->DUport);
sprintf(tmp.destinationService, "%d", nc->CUport);
return gtpv1Init(tmp);
......@@ -63,9 +63,20 @@ void du_task_send_sctp_association_req(instance_t instance, f1ap_net_config_t *n
sctp_new_association_req_p->in_streams = 2; //du_inst->sctp_in_streams;
sctp_new_association_req_p->out_streams = 2; //du_inst->sctp_out_streams;
// remote
memcpy(&sctp_new_association_req_p->remote_address, &nc->CU_f1_ip_address, sizeof(nc->CU_f1_ip_address));
sctp_new_association_req_p->remote_address.ipv4 = 1;
strncpy(sctp_new_association_req_p->remote_address.ipv4_address,
nc->CU_f1_ip_address,
sizeof(sctp_new_association_req_p->remote_address.ipv4_address) - 1);
// local
memcpy(&sctp_new_association_req_p->local_address, &nc->DU_f1c_ip_address, sizeof(nc->DU_f1c_ip_address));
sctp_new_association_req_p->local_address.ipv4 = 1;
strncpy(sctp_new_association_req_p->local_address.ipv4_address,
nc->DU_f1c_ip_address,
sizeof(sctp_new_association_req_p->local_address.ipv4_address) - 1);
LOG_D(F1AP,
"Local IPv4 Address: %s, Remote IPv4 Address: %s\n",
sctp_new_association_req_p->local_address.ipv4_address,
sctp_new_association_req_p->remote_address.ipv4_address);
// du_f1ap_register_to_sctp
itti_send_msg_to_task(TASK_SCTP, instance, message_p);
}
......@@ -89,6 +100,8 @@ void du_task_handle_sctp_association_resp(instance_t instance, sctp_new_associat
f1ap_du_data->du.assoc_id = sctp_new_association_resp->assoc_id;
f1ap_du_data->sctp_in_streams = sctp_new_association_resp->in_streams;
f1ap_du_data->sctp_out_streams = sctp_new_association_resp->out_streams;
/* next transaction ID */
f1ap_du_data->setupReq.transaction_id = F1AP_get_next_transaction_identifier(0, 0);
/* setup parameters for F1U and start the server */
DU_send_F1_SETUP_REQUEST(f1ap_du_data->du.assoc_id, &f1ap_du_data->setupReq);
}
......
......@@ -45,13 +45,13 @@ static void f1ap_read_drb_qos_param(const F1AP_QoSFlowLevelQoSParameters_t *asn1
const F1AP_QoS_Characteristics_t *dRB_QoS_Char = &asn1_qos->qoS_Characteristics;
if (dRB_QoS_Char->present == F1AP_QoS_Characteristics_PR_non_Dynamic_5QI) {
drb_qos_char->qos_type = non_dynamic;
drb_qos_char->qos_type = NON_DYNAMIC;
drb_qos_char->non_dynamic.fiveqi = dRB_QoS_Char->choice.non_Dynamic_5QI->fiveQI;
drb_qos_char->non_dynamic.qos_priority_level = (dRB_QoS_Char->choice.non_Dynamic_5QI->qoSPriorityLevel != NULL)
? *dRB_QoS_Char->choice.non_Dynamic_5QI->qoSPriorityLevel
: -1;
} else {
drb_qos_char->qos_type = dynamic;
drb_qos_char->qos_type = DYNAMIC;
drb_qos_char->dynamic.fiveqi =
(dRB_QoS_Char->choice.dynamic_5QI->fiveQI != NULL) ? *dRB_QoS_Char->choice.dynamic_5QI->fiveQI : -1;
drb_qos_char->dynamic.qos_priority_level = dRB_QoS_Char->choice.dynamic_5QI->qoSPriorityLevel;
......@@ -84,13 +84,13 @@ static void f1ap_read_flows_mapped(const F1AP_Flows_Mapped_To_DRB_List_t *asn1_f
const F1AP_QoS_Characteristics_t *Flow_QoS_Char = &Flow_QoS->qoS_Characteristics;
if (Flow_QoS_Char->present == F1AP_QoS_Characteristics_PR_non_Dynamic_5QI) {
flow_qos_char->qos_type = non_dynamic;
flow_qos_char->qos_type = NON_DYNAMIC;
flow_qos_char->non_dynamic.fiveqi = Flow_QoS_Char->choice.non_Dynamic_5QI->fiveQI;
flow_qos_char->non_dynamic.qos_priority_level = (Flow_QoS_Char->choice.non_Dynamic_5QI->qoSPriorityLevel != NULL)
? *Flow_QoS_Char->choice.non_Dynamic_5QI->qoSPriorityLevel
: -1;
} else {
flow_qos_char->qos_type = dynamic;
flow_qos_char->qos_type = DYNAMIC;
flow_qos_char->dynamic.fiveqi =
(Flow_QoS_Char->choice.dynamic_5QI->fiveQI != NULL) ? *Flow_QoS_Char->choice.dynamic_5QI->fiveQI : -1;
flow_qos_char->dynamic.qos_priority_level = Flow_QoS_Char->choice.dynamic_5QI->qoSPriorityLevel;
......@@ -209,11 +209,14 @@ int DU_handle_UE_CONTEXT_SETUP_REQUEST(instance_t instance, sctp_assoc_t assoc_i
switch (drbs_tobesetup_item_p->rLCMode) {
case F1AP_RLCMode_rlc_am:
drb_p->rlc_mode = RLC_MODE_AM;
drb_p->rlc_mode = F1AP_RLC_MODE_AM;
break;
case F1AP_RLCMode_rlc_um_bidirectional:
drb_p->rlc_mode = F1AP_RLC_MODE_UM_BIDIR;
break;
default:
drb_p->rlc_mode = RLC_MODE_TM;
LOG_W(F1AP, "unsupported RLC Mode %ld received: setting UM bidir\n", drbs_tobesetup_item_p->rLCMode);
drb_p->rlc_mode = F1AP_RLC_MODE_UM_BIDIR;
break;
}
......@@ -930,13 +933,16 @@ int DU_handle_UE_CONTEXT_MODIFICATION_REQUEST(instance_t instance, sctp_assoc_t
drb_p->up_ul_tnl[0].port = getCxt(instance)->net_config.CUport;
switch (drbs_tobesetupmod_item_p->rLCMode) {
case F1AP_RLCMode_rlc_am:
drb_p->rlc_mode = RLC_MODE_AM;
break;
default:
drb_p->rlc_mode = RLC_MODE_TM;
break;
case F1AP_RLCMode_rlc_am:
drb_p->rlc_mode = F1AP_RLC_MODE_AM;
break;
case F1AP_RLCMode_rlc_um_bidirectional:
drb_p->rlc_mode = F1AP_RLC_MODE_UM_BIDIR;
break;
default:
LOG_W(F1AP, "unsupported RLC Mode %ld received: setting UM bidir\n", drbs_tobesetupmod_item_p->rLCMode);
drb_p->rlc_mode = F1AP_RLC_MODE_UM_BIDIR;
break;
}
if (drbs_tobesetupmod_item_p->qoSInformation.present == F1AP_QoSInformation_PR_eUTRANQoS) {
......
/*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
* except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/
/*! \file f1ap_du_interface_management.h
* \brief f1ap interface management for DU
* \author EURECOM/NTUST
* \date 2018
* \version 0.1
* \company Eurecom
* \email: navid.nikaein@eurecom.fr, bing-kai.hong@eurecom.fr
* \note
* \warning
*/
......@@ -48,10 +48,8 @@ static const f1ap_message_processing_t f1ap_messages_processing[][3] = {
// {CU_handle_RESET, DU_handle_RESET_ACKNOWLEDGE, 0}, /* Reset */
{CU_handle_F1_SETUP_REQUEST, DU_handle_F1_SETUP_RESPONSE, DU_handle_F1_SETUP_FAILURE}, /* F1Setup */
{0, 0, 0}, /* ErrorIndication */
{CU_handle_gNB_DU_CONFIGURATION_UPDATE, 0, 0}, /* gNBDUConfigurationUpdate */
{DU_handle_gNB_CU_CONFIGURATION_UPDATE,
CU_handle_gNB_CU_CONFIGURATION_UPDATE_ACKNOWLEDGE,
CU_handle_gNB_CU_CONFIGURATION_UPDATE_FAILURE}, /* gNBCUConfigurationUpdate */
{CU_handle_gNB_DU_CONFIGURATION_UPDATE, DU_handle_gNB_DU_CONFIGURATION_UPDATE_ACKNOWLEDGE, 0}, /* gNBDUConfigurationUpdate */
{DU_handle_gNB_CU_CONFIGURATION_UPDATE, CU_handle_gNB_CU_CONFIGURATION_UPDATE_ACKNOWLEDGE, 0}, /* gNBCUConfigurationUpdate */
{DU_handle_UE_CONTEXT_SETUP_REQUEST, CU_handle_UE_CONTEXT_SETUP_RESPONSE, 0}, /* UEContextSetup */
{DU_handle_UE_CONTEXT_RELEASE_COMMAND, CU_handle_UE_CONTEXT_RELEASE_COMPLETE, 0}, /* UEContextRelease */
{DU_handle_UE_CONTEXT_MODIFICATION_REQUEST, CU_handle_UE_CONTEXT_MODIFICATION_RESPONSE, 0}, /* UEContextModification */
......
add_library(f1ap_lib OBJECT
f1ap_lib_common.c
f1ap_rrc_message_transfer.c
f1ap_interface_management.c
)
target_link_libraries(f1ap_lib PRIVATE asn1_f1ap)
target_include_directories(f1ap_lib PUBLIC
${CMAKE_SOURCE_DIR}
${CMAKE_CURRENT_SOURCE_DIR}
)
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment