Commit d16c4c37 authored by Robert Schmidt's avatar Robert Schmidt

Merge remote-tracking branch 'origin/int-f1-setup' into integration_2023_w38

parents 00acfe30 3f46a711
...@@ -19,7 +19,6 @@ gNBs = ...@@ -19,7 +19,6 @@ gNBs =
nr_cellid = 12345678L; nr_cellid = 12345678L;
force_256qam_off = 1;
tr_s_preference = "f1"; tr_s_preference = "f1";
...@@ -30,136 +29,7 @@ gNBs = ...@@ -30,136 +29,7 @@ gNBs =
local_s_portd = 2153; local_s_portd = 2153;
remote_s_portc = 500; remote_s_portc = 500;
remote_s_portd = 2153; remote_s_portd = 2153;
min_rxtxtime = 6;
servingCellConfigCommon = (
{
#spCellConfigCommon
physCellId = 0;
# downlinkConfigCommon
#frequencyInfoDL
# this is 3600 MHz + 43 PRBs@30kHz SCS (same as initial BWP)
absoluteFrequencySSB = 641280;
dl_frequencyBand = 78;
# this is 3600 MHz
dl_absoluteFrequencyPointA = 640008;
#scs-SpecificCarrierList
dl_offstToCarrier = 0;
# subcarrierSpacing
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
dl_subcarrierSpacing = 1;
dl_carrierBandwidth = 106;
#initialDownlinkBWP
#genericParameters
# this is RBstart=27,L=48 (275*(L-1))+RBstart
initialDLBWPlocationAndBandwidth = 28875; # 6366 12925 12956 28875 12952
# subcarrierSpacing
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
initialDLBWPsubcarrierSpacing = 1;
#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 = 13;
preambleReceivedTargetPower = -96;
#preamblTransMax (0...10) = (3,4,5,6,7,8,10,20,50,100,200)
preambleTransMax = 6;
#powerRampingStep
# 0=dB0,1=dB2,2=dB4,3=dB6
powerRampingStep = 1;
#ra_ReponseWindow
#1,2,4,8,10,20,40,80
ra_ResponseWindow = 4;
#ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR
#1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen
ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4;
#oneHalf (0..15) 4,8,12,16,...60,64
ssb_perRACH_OccasionAndCB_PreamblesPerSSB = 14;
#ra_ContentionResolutionTimer
#(0..7) 8,16,24,32,40,48,56,64
ra_ContentionResolutionTimer = 7;
rsrp_ThresholdSSB = 19;
#prach-RootSequenceIndex_PR
#1 = 839, 2 = 139
prach_RootSequenceIndex_PR = 2;
prach_RootSequenceIndex = 1;
# SCS for msg1, can only be 15 for 30 kHz < 6 GHz, takes precendence over the one derived from prach-ConfigIndex
#
msg1_SubcarrierSpacing = 1,
# restrictedSetConfig
# 0=unrestricted, 1=restricted type A, 2=restricted type B
restrictedSetConfig = 0,
msg3_DeltaPreamble = 1;
p0_NominalWithGrant =-90;
# pucch-ConfigCommon setup :
# pucchGroupHopping
# 0 = neither, 1= group hopping, 2=sequence hopping
pucchGroupHopping = 0;
hoppingId = 40;
p0_nominal = -90;
# ssb_PositionsInBurs_BitmapPR
# 1=short, 2=medium, 3=long
ssb_PositionsInBurst_PR = 2;
ssb_PositionsInBurst_Bitmap = 1;
# ssb_periodicityServingCell
# 0 = ms5, 1=ms10, 2=ms20, 3=ms40, 4=ms80, 5=ms160, 6=spare2, 7=spare1
ssb_periodicityServingCell = 2;
# dmrs_TypeA_position
# 0 = pos2, 1 = pos3
dmrs_TypeA_Position = 0;
# subcarrierSpacing
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
subcarrierSpacing = 1;
#tdd-UL-DL-ConfigurationCommon
# subcarrierSpacing
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
referenceSubcarrierSpacing = 1;
# pattern1
# dl_UL_TransmissionPeriodicity
# 0=ms0p5, 1=ms0p625, 2=ms1, 3=ms1p25, 4=ms2, 5=ms2p5, 6=ms5, 7=ms10
dl_UL_TransmissionPeriodicity = 6;
nrofDownlinkSlots = 7;
nrofDownlinkSymbols = 6;
nrofUplinkSlots = 2;
nrofUplinkSymbols = 4;
ssPBCH_BlockPower = -25;
}
);
# ------- SCTP definitions # ------- SCTP definitions
SCTP : SCTP :
{ {
......
...@@ -19,7 +19,6 @@ gNBs = ...@@ -19,7 +19,6 @@ gNBs =
nr_cellid = 12345678L; nr_cellid = 12345678L;
force_256qam_off = 1;
tr_s_preference = "f1"; tr_s_preference = "f1";
...@@ -30,135 +29,7 @@ gNBs = ...@@ -30,135 +29,7 @@ gNBs =
local_s_portd = 2153; local_s_portd = 2153;
remote_s_portc = 500; remote_s_portc = 500;
remote_s_portd = 2153; remote_s_portd = 2153;
min_rxtxtime = 6;
servingCellConfigCommon = (
{
#spCellConfigCommon
physCellId = 0;
# downlinkConfigCommon
#frequencyInfoDL
# this is 3600 MHz + 43 PRBs@30kHz SCS (same as initial BWP)
absoluteFrequencySSB = 641280;
dl_frequencyBand = 78;
# this is 3600 MHz
dl_absoluteFrequencyPointA = 640008;
#scs-SpecificCarrierList
dl_offstToCarrier = 0;
# subcarrierSpacing
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
dl_subcarrierSpacing = 1;
dl_carrierBandwidth = 106;
#initialDownlinkBWP
#genericParameters
# this is RBstart=27,L=48 (275*(L-1))+RBstart
initialDLBWPlocationAndBandwidth = 28875; # 6366 12925 12956 28875 12952
# subcarrierSpacing
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
initialDLBWPsubcarrierSpacing = 1;
#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 = 13;
preambleReceivedTargetPower = -96;
#preamblTransMax (0...10) = (3,4,5,6,7,8,10,20,50,100,200)
preambleTransMax = 6;
#powerRampingStep
# 0=dB0,1=dB2,2=dB4,3=dB6
powerRampingStep = 1;
#ra_ReponseWindow
#1,2,4,8,10,20,40,80
ra_ResponseWindow = 4;
#ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR
#1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen
ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4;
#oneHalf (0..15) 4,8,12,16,...60,64
ssb_perRACH_OccasionAndCB_PreamblesPerSSB = 14;
#ra_ContentionResolutionTimer
#(0..7) 8,16,24,32,40,48,56,64
ra_ContentionResolutionTimer = 7;
rsrp_ThresholdSSB = 19;
#prach-RootSequenceIndex_PR
#1 = 839, 2 = 139
prach_RootSequenceIndex_PR = 2;
prach_RootSequenceIndex = 1;
# SCS for msg1, can only be 15 for 30 kHz < 6 GHz, takes precendence over the one derived from prach-ConfigIndex
#
msg1_SubcarrierSpacing = 1,
# restrictedSetConfig
# 0=unrestricted, 1=restricted type A, 2=restricted type B
restrictedSetConfig = 0,
msg3_DeltaPreamble = 1;
p0_NominalWithGrant =-90;
# pucch-ConfigCommon setup :
# pucchGroupHopping
# 0 = neither, 1= group hopping, 2=sequence hopping
pucchGroupHopping = 0;
hoppingId = 40;
p0_nominal = -90;
# ssb_PositionsInBurs_BitmapPR
# 1=short, 2=medium, 3=long
ssb_PositionsInBurst_PR = 2;
ssb_PositionsInBurst_Bitmap = 1;
# ssb_periodicityServingCell
# 0 = ms5, 1=ms10, 2=ms20, 3=ms40, 4=ms80, 5=ms160, 6=spare2, 7=spare1
ssb_periodicityServingCell = 2;
# dmrs_TypeA_position
# 0 = pos2, 1 = pos3
dmrs_TypeA_Position = 0;
# subcarrierSpacing
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
subcarrierSpacing = 1;
#tdd-UL-DL-ConfigurationCommon
# subcarrierSpacing
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
referenceSubcarrierSpacing = 1;
# pattern1
# dl_UL_TransmissionPeriodicity
# 0=ms0p5, 1=ms0p625, 2=ms1, 3=ms1p25, 4=ms2, 5=ms2p5, 6=ms5, 7=ms10
dl_UL_TransmissionPeriodicity = 6;
nrofDownlinkSlots = 7;
nrofDownlinkSymbols = 6;
nrofUplinkSlots = 2;
nrofUplinkSymbols = 4;
ssPBCH_BlockPower = -25;
}
);
# ------- SCTP definitions # ------- SCTP definitions
SCTP : SCTP :
{ {
......
...@@ -20,7 +20,6 @@ gNBs = ...@@ -20,7 +20,6 @@ gNBs =
nr_cellid = 12345678L; nr_cellid = 12345678L;
force_256qam_off = 1;
tr_s_preference = "f1"; tr_s_preference = "f1";
...@@ -31,136 +30,7 @@ gNBs = ...@@ -31,136 +30,7 @@ gNBs =
local_s_portd = 2152; local_s_portd = 2152;
remote_s_portc = 500; remote_s_portc = 500;
remote_s_portd = 2152; remote_s_portd = 2152;
ssb_SubcarrierOffset = 0;
min_rxtxtime = 6;
servingCellConfigCommon = (
{
#spCellConfigCommon
physCellId = 0;
# downlinkConfigCommon
#frequencyInfoDL
# this is 3600 MHz + 43 PRBs@30kHz SCS (same as initial BWP)
absoluteFrequencySSB = 641280;
dl_frequencyBand = 78;
# this is 3600 MHz
dl_absoluteFrequencyPointA = 640008;
#scs-SpecificCarrierList
dl_offstToCarrier = 0;
# subcarrierSpacing
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
dl_subcarrierSpacing = 1;
dl_carrierBandwidth = 106;
#initialDownlinkBWP
#genericParameters
# this is RBstart=27,L=48 (275*(L-1))+RBstart
initialDLBWPlocationAndBandwidth = 28875; # 6366 12925 12956 28875 12952
# subcarrierSpacing
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
initialDLBWPsubcarrierSpacing = 1;
#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 = 13;
preambleReceivedTargetPower = -96;
#preamblTransMax (0...10) = (3,4,5,6,7,8,10,20,50,100,200)
preambleTransMax = 6;
#powerRampingStep
# 0=dB0,1=dB2,2=dB4,3=dB6
powerRampingStep = 1;
#ra_ReponseWindow
#1,2,4,8,10,20,40,80
ra_ResponseWindow = 4;
#ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR
#1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen
ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4;
#oneHalf (0..15) 4,8,12,16,...60,64
ssb_perRACH_OccasionAndCB_PreamblesPerSSB = 14;
#ra_ContentionResolutionTimer
#(0..7) 8,16,24,32,40,48,56,64
ra_ContentionResolutionTimer = 7;
rsrp_ThresholdSSB = 19;
#prach-RootSequenceIndex_PR
#1 = 839, 2 = 139
prach_RootSequenceIndex_PR = 2;
prach_RootSequenceIndex = 1;
# SCS for msg1, can only be 15 for 30 kHz < 6 GHz, takes precendence over the one derived from prach-ConfigIndex
#
msg1_SubcarrierSpacing = 1,
# restrictedSetConfig
# 0=unrestricted, 1=restricted type A, 2=restricted type B
restrictedSetConfig = 0,
msg3_DeltaPreamble = 1;
p0_NominalWithGrant =-90;
# pucch-ConfigCommon setup :
# pucchGroupHopping
# 0 = neither, 1= group hopping, 2=sequence hopping
pucchGroupHopping = 0;
hoppingId = 40;
p0_nominal = -90;
# ssb_PositionsInBurs_BitmapPR
# 1=short, 2=medium, 3=long
ssb_PositionsInBurst_PR = 2;
ssb_PositionsInBurst_Bitmap = 1;
# ssb_periodicityServingCell
# 0 = ms5, 1=ms10, 2=ms20, 3=ms40, 4=ms80, 5=ms160, 6=spare2, 7=spare1
ssb_periodicityServingCell = 2;
# dmrs_TypeA_position
# 0 = pos2, 1 = pos3
dmrs_TypeA_Position = 0;
# subcarrierSpacing
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
subcarrierSpacing = 1;
#tdd-UL-DL-ConfigurationCommon
# subcarrierSpacing
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
referenceSubcarrierSpacing = 1;
# pattern1
# dl_UL_TransmissionPeriodicity
# 0=ms0p5, 1=ms0p625, 2=ms1, 3=ms1p25, 4=ms2, 5=ms2p5, 6=ms5, 7=ms10
dl_UL_TransmissionPeriodicity = 6;
nrofDownlinkSlots = 7;
nrofDownlinkSymbols = 6;
nrofUplinkSlots = 2;
nrofUplinkSymbols = 4;
ssPBCH_BlockPower = -25;
}
);
# ------- SCTP definitions # ------- SCTP definitions
SCTP : SCTP :
{ {
......
...@@ -20,7 +20,6 @@ gNBs = ...@@ -20,7 +20,6 @@ gNBs =
nr_cellid = 12345678L; nr_cellid = 12345678L;
force_256qam_off = 1;
tr_s_preference = "f1"; tr_s_preference = "f1";
...@@ -31,136 +30,7 @@ gNBs = ...@@ -31,136 +30,7 @@ gNBs =
local_s_portd = 2153; local_s_portd = 2153;
remote_s_portc = 500; remote_s_portc = 500;
remote_s_portd = 2153; remote_s_portd = 2153;
ssb_SubcarrierOffset = 0;
min_rxtxtime = 6;
servingCellConfigCommon = (
{
#spCellConfigCommon
physCellId = 0;
# downlinkConfigCommon
#frequencyInfoDL
# this is 3600 MHz + 43 PRBs@30kHz SCS (same as initial BWP)
absoluteFrequencySSB = 641280;
dl_frequencyBand = 78;
# this is 3600 MHz
dl_absoluteFrequencyPointA = 640008;
#scs-SpecificCarrierList
dl_offstToCarrier = 0;
# subcarrierSpacing
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
dl_subcarrierSpacing = 1;
dl_carrierBandwidth = 106;
#initialDownlinkBWP
#genericParameters
# this is RBstart=27,L=48 (275*(L-1))+RBstart
initialDLBWPlocationAndBandwidth = 28875; # 6366 12925 12956 28875 12952
# subcarrierSpacing
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
initialDLBWPsubcarrierSpacing = 1;
#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 = 13;
preambleReceivedTargetPower = -96;
#preamblTransMax (0...10) = (3,4,5,6,7,8,10,20,50,100,200)
preambleTransMax = 6;
#powerRampingStep
# 0=dB0,1=dB2,2=dB4,3=dB6
powerRampingStep = 1;
#ra_ReponseWindow
#1,2,4,8,10,20,40,80
ra_ResponseWindow = 4;
#ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR
#1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen
ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4;
#oneHalf (0..15) 4,8,12,16,...60,64
ssb_perRACH_OccasionAndCB_PreamblesPerSSB = 14;
#ra_ContentionResolutionTimer
#(0..7) 8,16,24,32,40,48,56,64
ra_ContentionResolutionTimer = 7;
rsrp_ThresholdSSB = 19;
#prach-RootSequenceIndex_PR
#1 = 839, 2 = 139
prach_RootSequenceIndex_PR = 2;
prach_RootSequenceIndex = 1;
# SCS for msg1, can only be 15 for 30 kHz < 6 GHz, takes precendence over the one derived from prach-ConfigIndex
#
msg1_SubcarrierSpacing = 1,
# restrictedSetConfig
# 0=unrestricted, 1=restricted type A, 2=restricted type B
restrictedSetConfig = 0,
msg3_DeltaPreamble = 1;
p0_NominalWithGrant =-90;
# pucch-ConfigCommon setup :
# pucchGroupHopping
# 0 = neither, 1= group hopping, 2=sequence hopping
pucchGroupHopping = 0;
hoppingId = 40;
p0_nominal = -90;
# ssb_PositionsInBurs_BitmapPR
# 1=short, 2=medium, 3=long
ssb_PositionsInBurst_PR = 2;
ssb_PositionsInBurst_Bitmap = 1;
# ssb_periodicityServingCell
# 0 = ms5, 1=ms10, 2=ms20, 3=ms40, 4=ms80, 5=ms160, 6=spare2, 7=spare1
ssb_periodicityServingCell = 2;
# dmrs_TypeA_position
# 0 = pos2, 1 = pos3
dmrs_TypeA_Position = 0;
# subcarrierSpacing
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
subcarrierSpacing = 1;
#tdd-UL-DL-ConfigurationCommon
# subcarrierSpacing
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
referenceSubcarrierSpacing = 1;
# pattern1
# dl_UL_TransmissionPeriodicity
# 0=ms0p5, 1=ms0p625, 2=ms1, 3=ms1p25, 4=ms2, 5=ms2p5, 6=ms5, 7=ms10
dl_UL_TransmissionPeriodicity = 6;
nrofDownlinkSlots = 7;
nrofDownlinkSymbols = 6;
nrofUplinkSlots = 2;
nrofUplinkSymbols = 4;
ssPBCH_BlockPower = -25;
}
);
# ------- SCTP definitions # ------- SCTP definitions
SCTP : SCTP :
{ {
......
...@@ -22,7 +22,6 @@ gNBs = ...@@ -22,7 +22,6 @@ gNBs =
////////// Physical parameters: ////////// Physical parameters:
min_rxtxtime = 6; min_rxtxtime = 6;
force_256qam_off = 1;
servingCellConfigCommon = ( servingCellConfigCommon = (
{ {
......
...@@ -22,7 +22,6 @@ gNBs = ...@@ -22,7 +22,6 @@ gNBs =
////////// Physical parameters: ////////// Physical parameters:
min_rxtxtime = 6; min_rxtxtime = 6;
force_256qam_off = 1;
servingCellConfigCommon = ( servingCellConfigCommon = (
......
...@@ -30,7 +30,7 @@ gNBs = ...@@ -30,7 +30,7 @@ gNBs =
absoluteFrequencySSB = 620736; absoluteFrequencySSB = 620736;
dl_frequencyBand = 78; dl_frequencyBand = 78;
# this is 3300.30 MHz # this is 3300.30 MHz
dl_absoluteFrequencyPointA = 620020; dl_absoluteFrequencyPointA = 620052;
#scs-SpecificCarrierList #scs-SpecificCarrierList
dl_offstToCarrier = 0; dl_offstToCarrier = 0;
# subcarrierSpacing # subcarrierSpacing
......
...@@ -211,7 +211,7 @@ The scheduler also calls "run_pdcp()", as this is not a autonomous thread, it ne ...@@ -211,7 +211,7 @@ The scheduler also calls "run_pdcp()", as this is not a autonomous thread, it ne
After calling run_pdcp, it updates "rlc" time data but it doesn't actually process rlc After calling run_pdcp, it updates "rlc" time data but it doesn't actually process rlc
it sends a iiti message to activate the thread for RRC, the answer will be asynchronous in ???? it sends a iiti message to activate the thread for RRC, the answer will be asynchronous in ????
Calls schedule_nr_mib() that calls mac_rrc_nr_data_req() to fill MIB, Calls schedule_nr_mib() that fills MIB,
Calls schedule_nr_prach() which schedules the (fixed) PRACH region one frame in Calls schedule_nr_prach() which schedules the (fixed) PRACH region one frame in
advance. advance.
......
...@@ -106,7 +106,7 @@ void prepare_and_send_ue_context_modification_f1(rrc_gNB_ue_context_t *ue_contex ...@@ -106,7 +106,7 @@ void prepare_and_send_ue_context_modification_f1(rrc_gNB_ue_context_t *ue_contex
abort(); abort();
} }
f1ap_cudu_inst_t *getCxt(F1_t isCU, instance_t instanceP) f1ap_cudu_inst_t *getCxt(instance_t instanceP)
{ {
abort(); abort();
return NULL; return NULL;
......
...@@ -95,8 +95,8 @@ extern void nr_phy_config_request(NR_PHY_Config_t *gNB); ...@@ -95,8 +95,8 @@ extern void nr_phy_config_request(NR_PHY_Config_t *gNB);
//extern WORKER_CONF_t get_thread_worker_conf(void); //extern WORKER_CONF_t get_thread_worker_conf(void);
void init_NR_RU(char *); void init_NR_RU(char *);
void start_NR_RU();
void stop_RU(int nb_ru); void stop_RU(int nb_ru);
void do_ru_sync(RU_t *ru);
void configure_ru(int idx, void *arg); void configure_ru(int idx, void *arg);
void configure_rru(int idx, void *arg); void configure_rru(int idx, void *arg);
...@@ -1398,7 +1398,6 @@ int start_write_thread(RU_t *ru) { ...@@ -1398,7 +1398,6 @@ int start_write_thread(RU_t *ru) {
void init_RU_proc(RU_t *ru) { void init_RU_proc(RU_t *ru) {
int i=0; int i=0;
RU_proc_t *proc; RU_proc_t *proc;
LOG_I(PHY,"Initializing RU proc %d (%s,%s),\n",ru->idx,NB_functions[ru->function],NB_timing[ru->if_timing]);
proc = &ru->proc; proc = &ru->proc;
memset((void *)proc,0,sizeof(RU_proc_t)); memset((void *)proc,0,sizeof(RU_proc_t));
proc->ru = ru; proc->ru = ru;
...@@ -1413,7 +1412,6 @@ void init_RU_proc(RU_t *ru) { ...@@ -1413,7 +1412,6 @@ void init_RU_proc(RU_t *ru) {
pthread_mutex_init( &proc->mutex_emulateRF,NULL); pthread_mutex_init( &proc->mutex_emulateRF,NULL);
pthread_cond_init( &proc->cond_emulateRF, NULL); pthread_cond_init( &proc->cond_emulateRF, NULL);
threadCreate( &proc->pthread_FH, ru_thread, (void *)ru, "ru_thread", ru->ru_thread_core, OAI_PRIORITY_RT_MAX );
if(emulate_rf) if(emulate_rf)
threadCreate( &proc->pthread_emulateRF, emulatedRF_thread, (void *)proc, "emulateRF", -1, OAI_PRIORITY_RT ); threadCreate( &proc->pthread_emulateRF, emulatedRF_thread, (void *)proc, "emulateRF", -1, OAI_PRIORITY_RT );
...@@ -1421,7 +1419,12 @@ void init_RU_proc(RU_t *ru) { ...@@ -1421,7 +1419,12 @@ void init_RU_proc(RU_t *ru) {
threadCreate( &ru->ru_stats_thread, ru_stats_thread, (void *)ru,"ru_stats", -1, OAI_PRIORITY_RT ); threadCreate( &ru->ru_stats_thread, ru_stats_thread, (void *)ru,"ru_stats", -1, OAI_PRIORITY_RT );
if (get_thread_worker_conf() == WORKER_ENABLE) { if (get_thread_worker_conf() == WORKER_ENABLE) {
} }
LOG_I(PHY, "Initialized RU proc %d (%s,%s),\n", ru->idx, NB_functions[ru->function], NB_timing[ru->if_timing]);
}
void start_RU_proc(RU_t *ru)
{
threadCreate(&ru->proc.pthread_FH, ru_thread, (void *)ru, "ru_thread", ru->ru_thread_core, OAI_PRIORITY_RT_MAX);
} }
...@@ -1875,6 +1878,12 @@ void init_NR_RU(char *rf_config_file) { ...@@ -1875,6 +1878,12 @@ void init_NR_RU(char *rf_config_file) {
LOG_D(HW,"[nr-softmodem.c] RU threads created\n"); LOG_D(HW,"[nr-softmodem.c] RU threads created\n");
} }
void start_NR_RU()
{
RU_t *ru = RC.ru[0];
start_RU_proc(ru);
}
void stop_RU(int nb_ru) { void stop_RU(int nb_ru) {
for (int inst = 0; inst < nb_ru; inst++) { for (int inst = 0; inst < nb_ru; inst++) {
......
...@@ -289,9 +289,8 @@ void exit_function(const char *file, const char *function, const int line, const ...@@ -289,9 +289,8 @@ void exit_function(const char *file, const char *function, const int line, const
} }
} }
static int create_gNB_tasks(ngran_node_t node_type)
{
static int create_gNB_tasks(void) {
uint32_t gnb_nb = RC.nb_nr_inst; uint32_t gnb_nb = RC.nb_nr_inst;
uint32_t gnb_id_start = 0; uint32_t gnb_id_start = 0;
uint32_t gnb_id_end = gnb_id_start + gnb_nb; uint32_t gnb_id_end = gnb_id_start + gnb_nb;
...@@ -299,6 +298,8 @@ static int create_gNB_tasks(void) { ...@@ -299,6 +298,8 @@ static int create_gNB_tasks(void) {
itti_wait_ready(1); itti_wait_ready(1);
LOG_I(PHY, "%s() Task ready initialize structures\n", __FUNCTION__); LOG_I(PHY, "%s() Task ready initialize structures\n", __FUNCTION__);
RCconfig_verify(node_type);
RCconfig_NR_L1(); RCconfig_NR_L1();
RCconfig_nr_prs(); RCconfig_nr_prs();
...@@ -314,13 +315,11 @@ static int create_gNB_tasks(void) { ...@@ -314,13 +315,11 @@ static int create_gNB_tasks(void) {
LOG_I(GNB_APP,"Allocating gNB_RRC_INST for %d instances\n",RC.nb_nr_inst); LOG_I(GNB_APP,"Allocating gNB_RRC_INST for %d instances\n",RC.nb_nr_inst);
RC.nrrrc = (gNB_RRC_INST **)malloc(RC.nb_nr_inst*sizeof(gNB_RRC_INST *)); if (RC.nb_nr_inst > 0) {
LOG_I(PHY, "%s() RC.nb_nr_inst:%d RC.nrrrc:%p\n", __FUNCTION__, RC.nb_nr_inst, RC.nrrrc); AssertFatal(RC.nb_nr_inst == 1, "multiple RRC instances are not supported\n");
ngran_node_t node_type = get_node_type(); RC.nrrrc = calloc(1, sizeof(*RC.nrrrc));
for (int gnb_id = gnb_id_start; (gnb_id < gnb_id_end) ; gnb_id++) { RC.nrrrc[0] = calloc(1,sizeof(gNB_RRC_INST));
RC.nrrrc[gnb_id] = (gNB_RRC_INST*)calloc(1,sizeof(gNB_RRC_INST)); RCconfig_NRRRC(RC.nrrrc[0]);
LOG_I(PHY, "%s() Creating RRC instance RC.nrrrc[%d]:%p (%d of %d)\n", __FUNCTION__, gnb_id, RC.nrrrc[gnb_id], gnb_id+1, gnb_id_end);
configure_nr_rrc(gnb_id);
} }
if (RC.nb_nr_inst > 0 && if (RC.nb_nr_inst > 0 &&
...@@ -635,8 +634,9 @@ int main( int argc, char **argv ) { ...@@ -635,8 +634,9 @@ int main( int argc, char **argv ) {
RCconfig_NR_L1(); RCconfig_NR_L1();
// don't create if node doesn't connect to RRC/S1/GTP // don't create if node doesn't connect to RRC/S1/GTP
const ngran_node_t node_type = get_node_type();
if (NFAPI_MODE != NFAPI_MODE_PNF) { if (NFAPI_MODE != NFAPI_MODE_PNF) {
int ret = create_gNB_tasks(); int ret = create_gNB_tasks(node_type);
AssertFatal(ret == 0, "cannot create ITTI tasks\n"); AssertFatal(ret == 0, "cannot create ITTI tasks\n");
} }
...@@ -736,6 +736,13 @@ int main( int argc, char **argv ) { ...@@ -736,6 +736,13 @@ int main( int argc, char **argv ) {
wait_nfapi_init("main?"); wait_nfapi_init("main?");
} }
// wait for F1 Setup Response before starting L1 for real
if (NODE_IS_DU(node_type) || NODE_IS_MONOLITHIC(node_type))
wait_f1_setup_response();
if (RC.nb_RU > 0)
start_NR_RU();
if (RC.nb_nr_L1_inst > 0) { if (RC.nb_nr_L1_inst > 0) {
printf("wait RUs\n"); printf("wait RUs\n");
wait_RUs(); wait_RUs();
......
...@@ -54,6 +54,7 @@ extern void kill_gNB_proc(int inst); ...@@ -54,6 +54,7 @@ extern void kill_gNB_proc(int inst);
// In nr-ru.c // In nr-ru.c
extern void init_NR_RU(char *); extern void init_NR_RU(char *);
extern void init_RU_proc(RU_t *ru); extern void init_RU_proc(RU_t *ru);
extern void start_NR_RU(void);
extern void stop_RU(int nb_ru); extern void stop_RU(int nb_ru);
extern void kill_NR_RU_proc(int inst); extern void kill_NR_RU_proc(int inst);
extern void set_function_spec_param(RU_t *ru); extern void set_function_spec_param(RU_t *ru);
......
...@@ -239,7 +239,7 @@ nrUE_params_t *get_nrUE_params(void) { ...@@ -239,7 +239,7 @@ nrUE_params_t *get_nrUE_params(void) {
} }
void validate_input_pmi(rrc_pdsch_AntennaPorts_t pdsch_AntennaPorts, int nrOfLayers, int pmi) void validate_input_pmi(nr_pdsch_AntennaPorts_t pdsch_AntennaPorts, int nrOfLayers, int pmi)
{ {
if (pmi == 0) if (pmi == 0)
return; return;
...@@ -622,11 +622,32 @@ int main(int argc, char **argv) ...@@ -622,11 +622,32 @@ int main(int argc, char **argv)
frame_parms->N_RB_DL = N_RB_DL; frame_parms->N_RB_DL = N_RB_DL;
frame_parms->N_RB_UL = N_RB_DL; frame_parms->N_RB_UL = N_RB_DL;
AssertFatal((gNB->if_inst = NR_IF_Module_init(0)) != NULL, "Cannot register interface");
gNB->if_inst->NR_PHY_config_req = nr_phy_config_request;
NR_ServingCellConfigCommon_t *scc = calloc(1,sizeof(*scc));;
prepare_scc(scc);
uint64_t ssb_bitmap = 1; // Enable only first SSB with index ssb_indx=0
fill_scc_sim(scc, &ssb_bitmap, N_RB_DL, N_RB_DL, mu, mu);
fix_scc(scc, ssb_bitmap);
// TODO do a UECAP for phy-sim
nr_pdsch_AntennaPorts_t pdsch_AntennaPorts = {0};
pdsch_AntennaPorts.N1 = n_tx > 1 ? n_tx >> 1 : 1;
pdsch_AntennaPorts.N2 = 1;
pdsch_AntennaPorts.XP = n_tx > 1 ? 2 : 1;
const nr_mac_config_t conf = {.pdsch_AntennaPorts = pdsch_AntennaPorts,
.pusch_AntennaPorts = n_tx,
.minRXTXTIME = 6,
.do_CSIRS = 0,
.do_SRS = 0,
.force_256qam_off = false};
RC.nb_nr_macrlc_inst = 1; RC.nb_nr_macrlc_inst = 1;
RC.nb_nr_mac_CC = (int*)malloc(RC.nb_nr_macrlc_inst*sizeof(int)); RC.nb_nr_mac_CC = (int*)malloc(RC.nb_nr_macrlc_inst*sizeof(int));
for (i = 0; i < RC.nb_nr_macrlc_inst; i++) for (i = 0; i < RC.nb_nr_macrlc_inst; i++)
RC.nb_nr_mac_CC[i] = 1; RC.nb_nr_mac_CC[i] = 1;
mac_top_init_gNB(ngran_gNB); mac_top_init_gNB(ngran_gNB, scc, NULL, &conf);
gNB_mac = RC.nrmac[0]; gNB_mac = RC.nrmac[0];
gNB_mac->dl_bler.harq_round_max = num_rounds; gNB_mac->dl_bler.harq_round_max = num_rounds;
...@@ -673,19 +694,9 @@ int main(int argc, char **argv) ...@@ -673,19 +694,9 @@ int main(int argc, char **argv)
NR_ServingCellConfigCommon_t *scc = secondaryCellGroup->spCellConfig->reconfigurationWithSync->spCellConfigCommon; NR_ServingCellConfigCommon_t *scc = secondaryCellGroup->spCellConfig->reconfigurationWithSync->spCellConfigCommon;
*/ */
NR_ServingCellConfigCommon_t *scc = calloc(1,sizeof(*scc));;
prepare_scc(scc);
uint64_t ssb_bitmap = 1; // Enable only first SSB with index ssb_indx=0
fill_scc_sim(scc, &ssb_bitmap, N_RB_DL, N_RB_DL, mu, mu);
fix_scc(scc, ssb_bitmap);
NR_ServingCellConfig_t *scd = calloc(1,sizeof(*scd)); NR_ServingCellConfig_t *scd = calloc(1,sizeof(*scd));
prepare_scd(scd); prepare_scd(scd);
rrc_pdsch_AntennaPorts_t pdsch_AntennaPorts = {0};
pdsch_AntennaPorts.N1 = n_tx>1 ? n_tx>>1 : 1;
pdsch_AntennaPorts.N2 = 1;
pdsch_AntennaPorts.XP = n_tx>1 ? 2 : 1;
gNB->ap_N1 = pdsch_AntennaPorts.N1; gNB->ap_N1 = pdsch_AntennaPorts.N1;
gNB->ap_N2 = pdsch_AntennaPorts.N2; gNB->ap_N2 = pdsch_AntennaPorts.N2;
gNB->ap_XP = pdsch_AntennaPorts.XP; gNB->ap_XP = pdsch_AntennaPorts.XP;
...@@ -696,12 +707,6 @@ int main(int argc, char **argv) ...@@ -696,12 +707,6 @@ int main(int argc, char **argv)
prepare_sim_uecap(UE_Capability_nr,scc,mu, prepare_sim_uecap(UE_Capability_nr,scc,mu,
N_RB_DL,g_mcsTableIdx,0); N_RB_DL,g_mcsTableIdx,0);
// TODO do a UECAP for phy-sim
const gNB_RrcConfigurationReq conf = {.pdsch_AntennaPorts = pdsch_AntennaPorts,
.minRXTXTIME = 6,
.do_CSIRS = 0,
.do_SRS = 0,
.force_256qam_off = false};
NR_CellGroupConfig_t *secondaryCellGroup = get_default_secondaryCellGroup(scc, scd, UE_Capability_nr, 0, 1, &conf, 0); NR_CellGroupConfig_t *secondaryCellGroup = get_default_secondaryCellGroup(scc, scd, UE_Capability_nr, 0, 1, &conf, 0);
/* RRC parameter validation for secondaryCellGroup */ /* RRC parameter validation for secondaryCellGroup */
...@@ -719,11 +724,6 @@ int main(int argc, char **argv) ...@@ -719,11 +724,6 @@ int main(int argc, char **argv)
//xer_fprint(stdout, &asn_DEF_NR_CellGroupConfig, (const void*)secondaryCellGroup); //xer_fprint(stdout, &asn_DEF_NR_CellGroupConfig, (const void*)secondaryCellGroup);
AssertFatal((gNB->if_inst = NR_IF_Module_init(0))!=NULL,"Cannot register interface");
gNB->if_inst->NR_PHY_config_req = nr_phy_config_request;
// common configuration
nr_mac_config_scc(RC.nrmac[0], pdsch_AntennaPorts, n_tx, 0, 6, scc);
// UE dedicated configuration // UE dedicated configuration
nr_mac_add_test_ue(RC.nrmac[0], secondaryCellGroup->spCellConfig->reconfigurationWithSync->newUE_Identity, secondaryCellGroup); nr_mac_add_test_ue(RC.nrmac[0], secondaryCellGroup->spCellConfig->reconfigurationWithSync->newUE_Identity, secondaryCellGroup);
// reset preprocessor to the one of DLSIM after it has been set during // reset preprocessor to the one of DLSIM after it has been set during
......
...@@ -608,23 +608,34 @@ int main(int argc, char *argv[]) ...@@ -608,23 +608,34 @@ int main(int argc, char *argv[])
frame_parms->N_RB_UL = N_RB_UL; frame_parms->N_RB_UL = N_RB_UL;
frame_parms->Ncp = extended_prefix_flag ? EXTENDED : NORMAL; frame_parms->Ncp = extended_prefix_flag ? EXTENDED : NORMAL;
AssertFatal((gNB->if_inst = NR_IF_Module_init(0)) != NULL, "Cannot register interface");
gNB->if_inst->NR_PHY_config_req = nr_phy_config_request;
s_re = malloc(n_tx*sizeof(double*)); s_re = malloc(n_tx*sizeof(double*));
s_im = malloc(n_tx*sizeof(double*)); s_im = malloc(n_tx*sizeof(double*));
r_re = malloc(n_rx*sizeof(double*)); r_re = malloc(n_rx*sizeof(double*));
r_im = malloc(n_rx*sizeof(double*)); r_im = malloc(n_rx*sizeof(double*));
RC.nb_nr_macrlc_inst = 1;
RC.nb_nr_mac_CC = (int*)malloc(RC.nb_nr_macrlc_inst*sizeof(int));
for (i = 0; i < RC.nb_nr_macrlc_inst; i++)
RC.nb_nr_mac_CC[i] = 1;
mac_top_init_gNB(ngran_gNB);
NR_ServingCellConfigCommon_t *scc = calloc(1,sizeof(*scc));; NR_ServingCellConfigCommon_t *scc = calloc(1,sizeof(*scc));;
prepare_scc(scc); prepare_scc(scc);
uint64_t ssb_bitmap; uint64_t ssb_bitmap;
fill_scc_sim(scc, &ssb_bitmap, N_RB_DL, N_RB_DL, mu, mu); fill_scc_sim(scc, &ssb_bitmap, N_RB_DL, N_RB_DL, mu, mu);
fix_scc(scc,ssb_bitmap); fix_scc(scc,ssb_bitmap);
// TODO do a UECAP for phy-sim
const nr_mac_config_t conf = {.pdsch_AntennaPorts = {.N1 = 1, .N2 = 1, .XP = 1},
.pusch_AntennaPorts = n_rx,
.minRXTXTIME = 0,
.do_CSIRS = 0,
.do_SRS = 0,
.force_256qam_off = false};
RC.nb_nr_macrlc_inst = 1;
RC.nb_nr_mac_CC = (int*)malloc(RC.nb_nr_macrlc_inst*sizeof(int));
for (i = 0; i < RC.nb_nr_macrlc_inst; i++)
RC.nb_nr_mac_CC[i] = 1;
mac_top_init_gNB(ngran_gNB, scc, NULL /* scd will be updated further below */, &conf);
NR_ServingCellConfig_t *scd = calloc(1,sizeof(NR_ServingCellConfig_t)); NR_ServingCellConfig_t *scd = calloc(1,sizeof(NR_ServingCellConfig_t));
prepare_scd(scd); prepare_scd(scd);
...@@ -632,14 +643,6 @@ int main(int argc, char *argv[]) ...@@ -632,14 +643,6 @@ int main(int argc, char *argv[])
prepare_sim_uecap(UE_Capability_nr,scc,mu, prepare_sim_uecap(UE_Capability_nr,scc,mu,
N_RB_UL,0,mcs_table); N_RB_UL,0,mcs_table);
// TODO do a UECAP for phy-sim
const gNB_RrcConfigurationReq conf = {.pdsch_AntennaPorts = {.N1 = 1, .N2 = 1, .XP = 1},
.pusch_AntennaPorts = n_rx,
.minRXTXTIME = 0,
.do_CSIRS = 0,
.do_SRS = 0,
.force_256qam_off = false};
NR_CellGroupConfig_t *secondaryCellGroup = get_default_secondaryCellGroup(scc, scd, UE_Capability_nr, 0, 1, &conf, 0); NR_CellGroupConfig_t *secondaryCellGroup = get_default_secondaryCellGroup(scc, scd, UE_Capability_nr, 0, 1, &conf, 0);
/* RRC parameter validation for secondaryCellGroup */ /* RRC parameter validation for secondaryCellGroup */
...@@ -647,12 +650,6 @@ int main(int argc, char *argv[]) ...@@ -647,12 +650,6 @@ int main(int argc, char *argv[])
NR_BCCH_BCH_Message_t *mib = get_new_MIB_NR(scc); NR_BCCH_BCH_Message_t *mib = get_new_MIB_NR(scc);
AssertFatal((gNB->if_inst = NR_IF_Module_init(0))!=NULL,"Cannot register interface");
gNB->if_inst->NR_PHY_config_req = nr_phy_config_request;
// common configuration
nr_mac_config_scc(RC.nrmac[0], conf.pdsch_AntennaPorts, n_tx, 0, 6, scc);
nr_mac_config_mib(RC.nrmac[0], mib);
// UE dedicated configuration // UE dedicated configuration
nr_mac_add_test_ue(RC.nrmac[0], secondaryCellGroup->spCellConfig->reconfigurationWithSync->newUE_Identity, secondaryCellGroup); nr_mac_add_test_ue(RC.nrmac[0], secondaryCellGroup->spCellConfig->reconfigurationWithSync->newUE_Identity, secondaryCellGroup);
frame_parms->nb_antennas_tx = 1; frame_parms->nb_antennas_tx = 1;
......
...@@ -24,6 +24,8 @@ ...@@ -24,6 +24,8 @@
#ifndef E1AP_MESSAGES_TYPES_H #ifndef E1AP_MESSAGES_TYPES_H
#define E1AP_MESSAGES_TYPES_H #define E1AP_MESSAGES_TYPES_H
#include <netinet/in.h>
#include <netinet/sctp.h>
#include "common/ngran_types.h" #include "common/ngran_types.h"
#include "f1ap_messages_types.h" #include "f1ap_messages_types.h"
#include "ngap_messages_types.h" #include "ngap_messages_types.h"
...@@ -55,7 +57,7 @@ typedef struct PLMN_ID_s { ...@@ -55,7 +57,7 @@ typedef struct PLMN_ID_s {
typedef struct e1ap_setup_req_s { typedef struct e1ap_setup_req_s {
uint64_t gNB_cu_up_id; uint64_t gNB_cu_up_id;
char * gNB_cu_up_name; char * gNB_cu_up_name;
int assoc_id; sctp_assoc_t assoc_id;
uint64_t transac_id; uint64_t transac_id;
int supported_plmns; int supported_plmns;
PLMN_ID_t plmns[E1AP_MAX_NUM_PLMNS]; PLMN_ID_t plmns[E1AP_MAX_NUM_PLMNS];
......
...@@ -19,8 +19,8 @@ ...@@ -19,8 +19,8 @@
* contact@openairinterface.org * contact@openairinterface.org
*/ */
/* F1AP -> SCTP */ /* To setup F1 at DU */
MESSAGE_DEF(F1AP_CU_SCTP_REQ , MESSAGE_PRIORITY_MED, f1ap_cu_setup_req_t , f1ap_cu_setup_req) MESSAGE_DEF(F1AP_DU_REGISTER_REQ, MESSAGE_PRIORITY_MED, f1ap_du_register_req_t, f1ap_du_register_req)
/* eNB_DU application layer -> F1AP messages or CU F1AP -> RRC*/ /* eNB_DU application layer -> F1AP messages or CU F1AP -> RRC*/
MESSAGE_DEF(F1AP_SETUP_REQ , MESSAGE_PRIORITY_MED, f1ap_setup_req_t , f1ap_setup_req) MESSAGE_DEF(F1AP_SETUP_REQ , MESSAGE_PRIORITY_MED, f1ap_setup_req_t , f1ap_setup_req)
...@@ -32,6 +32,9 @@ MESSAGE_DEF(F1AP_SETUP_RESP , MESSAGE_PRIORITY_MED, f1ap_setup_resp_t ...@@ -32,6 +32,9 @@ MESSAGE_DEF(F1AP_SETUP_RESP , MESSAGE_PRIORITY_MED, f1ap_setup_resp_t
MESSAGE_DEF(F1AP_SETUP_FAILURE , MESSAGE_PRIORITY_MED, f1ap_setup_failure_t , f1ap_setup_failure) MESSAGE_DEF(F1AP_SETUP_FAILURE , MESSAGE_PRIORITY_MED, f1ap_setup_failure_t , f1ap_setup_failure)
MESSAGE_DEF(F1AP_GNB_CU_CONFIGURATION_UPDATE , MESSAGE_PRIORITY_MED, f1ap_gnb_cu_configuration_update_t , f1ap_gnb_cu_configuration_update) MESSAGE_DEF(F1AP_GNB_CU_CONFIGURATION_UPDATE , MESSAGE_PRIORITY_MED, f1ap_gnb_cu_configuration_update_t , f1ap_gnb_cu_configuration_update)
/* F1AP -> RRC to inform about lost connection */
MESSAGE_DEF(F1AP_LOST_CONNECTION, MESSAGE_PRIORITY_MED, f1ap_lost_connection_t, f1ap_lost_connection)
/* MAC -> F1AP messages */ /* MAC -> F1AP messages */
MESSAGE_DEF(F1AP_INITIAL_UL_RRC_MESSAGE , MESSAGE_PRIORITY_MED, f1ap_initial_ul_rrc_message_t , f1ap_initial_ul_rrc_message) MESSAGE_DEF(F1AP_INITIAL_UL_RRC_MESSAGE , MESSAGE_PRIORITY_MED, f1ap_initial_ul_rrc_message_t , f1ap_initial_ul_rrc_message)
MESSAGE_DEF(F1AP_UL_RRC_MESSAGE , MESSAGE_PRIORITY_MED, f1ap_ul_rrc_message_t , f1ap_ul_rrc_message) MESSAGE_DEF(F1AP_UL_RRC_MESSAGE , MESSAGE_PRIORITY_MED, f1ap_ul_rrc_message_t , f1ap_ul_rrc_message)
......
...@@ -22,6 +22,8 @@ ...@@ -22,6 +22,8 @@
#ifndef F1AP_MESSAGES_TYPES_H_ #ifndef F1AP_MESSAGES_TYPES_H_
#define F1AP_MESSAGES_TYPES_H_ #define F1AP_MESSAGES_TYPES_H_
#include <netinet/in.h>
#include <netinet/sctp.h>
#include "rlc.h" #include "rlc.h"
#include "s1ap_messages_types.h" #include "s1ap_messages_types.h"
...@@ -30,6 +32,8 @@ ...@@ -30,6 +32,8 @@
#define F1AP_CU_SCTP_REQ(mSGpTR) (mSGpTR)->ittiMsg.f1ap_cu_sctp_req #define F1AP_CU_SCTP_REQ(mSGpTR) (mSGpTR)->ittiMsg.f1ap_cu_sctp_req
#define F1AP_DU_REGISTER_REQ(mSGpTR) (mSGpTR)->ittiMsg.f1ap_du_register_req
#define F1AP_SETUP_REQ(mSGpTR) (mSGpTR)->ittiMsg.f1ap_setup_req #define F1AP_SETUP_REQ(mSGpTR) (mSGpTR)->ittiMsg.f1ap_setup_req
#define F1AP_SETUP_RESP(mSGpTR) (mSGpTR)->ittiMsg.f1ap_setup_resp #define F1AP_SETUP_RESP(mSGpTR) (mSGpTR)->ittiMsg.f1ap_setup_resp
#define F1AP_GNB_CU_CONFIGURATION_UPDATE(mSGpTR) (mSGpTR)->ittiMsg.f1ap_gnb_cu_configuration_update #define F1AP_GNB_CU_CONFIGURATION_UPDATE(mSGpTR) (mSGpTR)->ittiMsg.f1ap_gnb_cu_configuration_update
...@@ -37,6 +41,8 @@ ...@@ -37,6 +41,8 @@
#define F1AP_GNB_CU_CONFIGURATION_UPDATE_FAILURE(mSGpTR) (mSGpTR)->ittiMsg.f1ap_gnb_cu_configuration_update_failure #define F1AP_GNB_CU_CONFIGURATION_UPDATE_FAILURE(mSGpTR) (mSGpTR)->ittiMsg.f1ap_gnb_cu_configuration_update_failure
#define F1AP_SETUP_FAILURE(mSGpTR) (mSGpTR)->ittiMsg.f1ap_setup_failure #define F1AP_SETUP_FAILURE(mSGpTR) (mSGpTR)->ittiMsg.f1ap_setup_failure
#define F1AP_LOST_CONNECTION(mSGpTR) (mSGpTR)->ittiMsg.f1ap_lost_connection
#define F1AP_INITIAL_UL_RRC_MESSAGE(mSGpTR) (mSGpTR)->ittiMsg.f1ap_initial_ul_rrc_message #define F1AP_INITIAL_UL_RRC_MESSAGE(mSGpTR) (mSGpTR)->ittiMsg.f1ap_initial_ul_rrc_message
#define F1AP_UL_RRC_MESSAGE(mSGpTR) (mSGpTR)->ittiMsg.f1ap_ul_rrc_message #define F1AP_UL_RRC_MESSAGE(mSGpTR) (mSGpTR)->ittiMsg.f1ap_ul_rrc_message
#define F1AP_UE_CONTEXT_SETUP_REQ(mSGpTR) (mSGpTR)->ittiMsg.f1ap_ue_context_setup_req #define F1AP_UE_CONTEXT_SETUP_REQ(mSGpTR) (mSGpTR)->ittiMsg.f1ap_ue_context_setup_req
...@@ -75,133 +81,96 @@ typedef struct f1ap_net_ip_address_s { ...@@ -75,133 +81,96 @@ typedef struct f1ap_net_ip_address_s {
char ipv6_address[46]; char ipv6_address[46];
} f1ap_net_ip_address_t; } f1ap_net_ip_address_t;
typedef struct f1ap_cu_setup_req_s { typedef struct f1ap_net_config_t {
// This dummy element is to avoid CLANG warning: empty struct has size 0 in C, size 1 in C++ f1ap_net_ip_address_t CU_f1_ip_address;
// To be removed if the structure is filled f1ap_net_ip_address_t DU_f1_ip_address;
uint32_t dummy; uint16_t CUport;
} f1ap_cu_setup_req_t; uint16_t DUport;
} f1ap_net_config_t;
typedef struct cellIDs_s {
// Served Cell Information
/* Tracking area code */
uint32_t tac;
/* Mobile Country Codes typedef struct f1ap_plmn_t {
* Mobile Network Codes
*/
uint16_t mcc; uint16_t mcc;
uint16_t mnc; uint16_t mnc;
uint8_t mnc_digit_length; uint8_t mnc_digit_length;
} f1ap_plmn_t;
typedef enum f1ap_mode_t { F1AP_MODE_TDD = 0, F1AP_MODE_FDD = 1 } f1ap_mode_t;
typedef struct f1ap_nr_frequency_info_t {
uint32_t arfcn;
int band;
} f1ap_nr_frequency_info_t;
typedef struct f1ap_transmission_bandwidth_t {
uint8_t scs;
uint16_t nrb;
} f1ap_transmission_bandwidth_t;
typedef struct f1ap_fdd_info_t {
f1ap_nr_frequency_info_t ul_freqinfo;
f1ap_nr_frequency_info_t dl_freqinfo;
f1ap_transmission_bandwidth_t ul_tbw;
f1ap_transmission_bandwidth_t dl_tbw;
} f1ap_fdd_info_t;
typedef struct f1ap_tdd_info_t {
f1ap_nr_frequency_info_t freqinfo;
f1ap_transmission_bandwidth_t tbw;
} f1ap_tdd_info_t;
typedef struct f1ap_served_cell_info_t {
// NR CGI
f1ap_plmn_t plmn;
uint64_t nr_cellid; // NR Global Cell Id
// NR Global Cell Id
uint64_t nr_cellid;
// NR Physical Cell Ids // NR Physical Cell Ids
uint16_t nr_pci; uint16_t nr_pci;
/* Tracking area code */
uint32_t *tac;
// Number of slide support items (max 16, could be increased to as much as 1024) // Number of slide support items (max 16, could be increased to as much as 1024)
uint16_t num_ssi; uint16_t num_ssi;
uint8_t sst; uint8_t sst;
uint8_t sd; uint8_t sd;
} cellIDs_t;
typedef struct f1ap_setup_req_s { f1ap_mode_t mode;
union {
// Midhaul networking parameters f1ap_fdd_info_t fdd;
f1ap_tdd_info_t tdd;
/* Connexion id used between SCTP/F1AP */ };
uint16_t cnx_id;
/* SCTP association id */
int32_t assoc_id;
/* The eNB IP address to bind */ char *measurement_timing_information;
f1ap_net_ip_address_t CU_f1_ip_address; } f1ap_served_cell_info_t;
f1ap_net_ip_address_t DU_f1_ip_address;
uint16_t CUport;
uint16_t DUport;
/* Number of SCTP streams used for a mme association */ typedef struct f1ap_gnb_du_system_info_t {
uint16_t sctp_in_streams; uint8_t *mib;
uint16_t sctp_out_streams; int mib_length;
uint8_t *sib1;
int sib1_length;
} f1ap_gnb_du_system_info_t;
uint16_t default_sctp_stream_id; typedef struct f1ap_setup_req_s {
// F1_Setup_Req payload // F1_Setup_Req payload
uint64_t gNB_DU_id; uint64_t gNB_DU_id;
char *gNB_DU_name; char *gNB_DU_name;
/* The type of the cell */
enum cell_type_e cell_type;
/// number of DU cells available /// number of DU cells available
uint16_t num_cells_available; //0< num_cells_available <= 512; uint16_t num_cells_available; //0< num_cells_available <= 512;
cellIDs_t cell[F1AP_MAX_NB_CELLS]; struct {
// fdd_flag = 1 means FDD, 0 means TDD f1ap_served_cell_info_t info;
int fdd_flag; f1ap_gnb_du_system_info_t *sys_info;
} cell[F1AP_MAX_NB_CELLS];
union {
struct fdd_s {
uint32_t ul_nr_arfcn;
uint8_t ul_scs;
uint16_t ul_nrb;
uint32_t dl_nr_arfcn;
uint8_t dl_scs;
uint16_t dl_nrb;
uint32_t sul_active;
uint32_t sul_nr_arfcn;
uint8_t sul_scs;
uint16_t sul_nrb;
uint8_t ul_num_frequency_bands;
uint16_t ul_nr_band[32];
uint8_t ul_num_sul_frequency_bands;
uint16_t ul_nr_sul_band[32];
uint8_t dl_num_frequency_bands;
uint16_t dl_nr_band[32];
uint8_t dl_num_sul_frequency_bands;
uint16_t dl_nr_sul_band[32];
} fdd;
struct tdd_s {
uint32_t nr_arfcn;
uint8_t scs;
uint16_t nrb;
uint32_t sul_active;
uint32_t sul_nr_arfcn;
uint8_t sul_scs;
uint16_t sul_nrb;
uint8_t num_frequency_bands;
uint16_t nr_band[32];
uint8_t num_sul_frequency_bands;
uint16_t nr_sul_band[32];
} tdd;
} nr_mode_info[F1AP_MAX_NB_CELLS];
char *measurement_timing_information[F1AP_MAX_NB_CELLS];
uint8_t ranac[F1AP_MAX_NB_CELLS];
// System Information
uint8_t *mib[F1AP_MAX_NB_CELLS];
int mib_length[F1AP_MAX_NB_CELLS];
uint8_t *sib1[F1AP_MAX_NB_CELLS];
int sib1_length[F1AP_MAX_NB_CELLS];
} f1ap_setup_req_t; } f1ap_setup_req_t;
typedef struct f1ap_du_register_req_t {
f1ap_setup_req_t setup_req;
f1ap_net_config_t net_config;
} f1ap_du_register_req_t;
typedef struct served_cells_to_activate_s { typedef struct served_cells_to_activate_s {
/// mcc of DU cells f1ap_plmn_t plmn;
uint16_t mcc;
/// mnc of DU cells
uint16_t mnc;
/// mnc digit length of DU cells
uint8_t mnc_digit_length;
// NR Global Cell Id // NR Global Cell Id
uint64_t nr_cellid; uint64_t nr_cellid;
/// NRPCI /// NRPCI
...@@ -215,16 +184,6 @@ typedef struct served_cells_to_activate_s { ...@@ -215,16 +184,6 @@ typedef struct served_cells_to_activate_s {
} served_cells_to_activate_t; } served_cells_to_activate_t;
typedef struct f1ap_setup_resp_s { typedef struct f1ap_setup_resp_s {
/* Connexion id used between SCTP/F1AP */
uint16_t cnx_id;
/* SCTP association id */
int32_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 /// string holding gNB_CU_name
char *gNB_CU_name; char *gNB_CU_name;
/// number of DU cells to activate /// number of DU cells to activate
...@@ -237,7 +196,7 @@ typedef struct f1ap_gnb_cu_configuration_update_s { ...@@ -237,7 +196,7 @@ typedef struct f1ap_gnb_cu_configuration_update_s {
uint16_t cnx_id; uint16_t cnx_id;
/* SCTP association id */ /* SCTP association id */
int32_t assoc_id; sctp_assoc_t assoc_id;
/* Number of SCTP streams used for a mme association */ /* Number of SCTP streams used for a mme association */
uint16_t sctp_in_streams; uint16_t sctp_in_streams;
...@@ -258,9 +217,7 @@ typedef struct f1ap_setup_failure_s { ...@@ -258,9 +217,7 @@ typedef struct f1ap_setup_failure_s {
typedef struct f1ap_gnb_cu_configuration_update_acknowledge_s { typedef struct f1ap_gnb_cu_configuration_update_acknowledge_s {
uint16_t num_cells_failed_to_be_activated; uint16_t num_cells_failed_to_be_activated;
uint16_t mcc[F1AP_MAX_NB_CELLS]; f1ap_plmn_t plmn[F1AP_MAX_NB_CELLS];
uint16_t mnc[F1AP_MAX_NB_CELLS];
uint8_t mnc_digit_length[F1AP_MAX_NB_CELLS];
uint64_t nr_cellid[F1AP_MAX_NB_CELLS]; uint64_t nr_cellid[F1AP_MAX_NB_CELLS];
uint16_t cause[F1AP_MAX_NB_CELLS]; uint16_t cause[F1AP_MAX_NB_CELLS];
int have_criticality; int have_criticality;
...@@ -273,9 +230,7 @@ typedef struct f1ap_gnb_cu_configuration_update_acknowledge_s { ...@@ -273,9 +230,7 @@ typedef struct f1ap_gnb_cu_configuration_update_acknowledge_s {
uint16_t cause_failed[F1AP_MAX_NO_OF_TNL_ASSOCIATIONS]; uint16_t cause_failed[F1AP_MAX_NO_OF_TNL_ASSOCIATIONS];
uint16_t noofDedicatedSIDeliveryNeededUEs; uint16_t noofDedicatedSIDeliveryNeededUEs;
uint32_t gNB_CU_ue_id[F1AP_MAX_NO_UE_ID]; uint32_t gNB_CU_ue_id[F1AP_MAX_NO_UE_ID];
uint16_t ue_mcc[F1AP_MAX_NO_UE_ID]; f1ap_plmn_t ue_plmn[F1AP_MAX_NO_UE_ID];
uint16_t ue_mnc[F1AP_MAX_NO_UE_ID];
uint8_t ue_mnc_digit_length[F1AP_MAX_NO_UE_ID];
uint64_t ue_nr_cellid[F1AP_MAX_NO_UE_ID]; uint64_t ue_nr_cellid[F1AP_MAX_NO_UE_ID];
} f1ap_gnb_cu_configuration_update_acknowledge_t; } f1ap_gnb_cu_configuration_update_acknowledge_t;
...@@ -303,12 +258,7 @@ typedef struct f1ap_dl_rrc_message_s { ...@@ -303,12 +258,7 @@ typedef struct f1ap_dl_rrc_message_s {
typedef struct f1ap_initial_ul_rrc_message_s { typedef struct f1ap_initial_ul_rrc_message_s {
uint32_t gNB_DU_ue_id; uint32_t gNB_DU_ue_id;
/// mcc of DU cell f1ap_plmn_t plmn;
uint16_t mcc;
/// mnc of DU cell
uint16_t mnc;
/// mnc digit length of DU cells
uint8_t mnc_digit_length;
/// nr cell id /// nr cell id
uint64_t nr_cellid; uint64_t nr_cellid;
/// crnti /// crnti
...@@ -384,9 +334,7 @@ typedef struct f1ap_ue_context_setup_s { ...@@ -384,9 +334,7 @@ typedef struct f1ap_ue_context_setup_s {
uint32_t gNB_CU_ue_id; uint32_t gNB_CU_ue_id;
uint32_t gNB_DU_ue_id; uint32_t gNB_DU_ue_id;
// SpCell Info // SpCell Info
uint16_t mcc; f1ap_plmn_t plmn;
uint16_t mnc;
uint8_t mnc_digit_length;
uint64_t nr_cellid; uint64_t nr_cellid;
uint8_t servCellIndex; uint8_t servCellIndex;
uint8_t *cellULConfigured; uint8_t *cellULConfigured;
...@@ -456,11 +404,13 @@ typedef struct f1ap_paging_ind_s { ...@@ -456,11 +404,13 @@ typedef struct f1ap_paging_ind_s {
uint16_t ueidentityindexvalue; uint16_t ueidentityindexvalue;
uint64_t fiveg_s_tmsi; uint64_t fiveg_s_tmsi;
uint8_t fiveg_s_tmsi_length; uint8_t fiveg_s_tmsi_length;
uint16_t mcc; f1ap_plmn_t plmn;
uint16_t mnc;
uint8_t mnc_digit_length;
uint64_t nr_cellid; uint64_t nr_cellid;
uint8_t paging_drx; uint8_t paging_drx;
} f1ap_paging_ind_t; } f1ap_paging_ind_t;
typedef struct f1ap_lost_connection_t {
int dummy;
} f1ap_lost_connection_t;
#endif /* F1AP_MESSAGES_TYPES_H_ */ #endif /* F1AP_MESSAGES_TYPES_H_ */
...@@ -23,6 +23,8 @@ ...@@ -23,6 +23,8 @@
#ifndef M2AP_MESSAGES_TYPES_H_ #ifndef M2AP_MESSAGES_TYPES_H_
#define M2AP_MESSAGES_TYPES_H_ #define M2AP_MESSAGES_TYPES_H_
#include <netinet/in.h>
#include <netinet/sctp.h>
#include "s1ap_messages_types.h" #include "s1ap_messages_types.h"
#include "LTE_PhysCellId.h" #include "LTE_PhysCellId.h"
...@@ -104,7 +106,7 @@ typedef struct m2ap_setup_req_s { ...@@ -104,7 +106,7 @@ typedef struct m2ap_setup_req_s {
uint16_t cnx_id; uint16_t cnx_id;
/* SCTP association id */ /* SCTP association id */
int32_t assoc_id; sctp_assoc_t assoc_id;
/* The eNB IP address to bind */ /* The eNB IP address to bind */
m2ap_net_ip_address_t MCE_M2_ip_address; m2ap_net_ip_address_t MCE_M2_ip_address;
...@@ -258,7 +260,7 @@ typedef struct m2ap_setup_resp_s { ...@@ -258,7 +260,7 @@ typedef struct m2ap_setup_resp_s {
uint16_t cnx_id; uint16_t cnx_id;
/* SCTP association id */ /* SCTP association id */
int32_t assoc_id; sctp_assoc_t assoc_id;
/* Number of SCTP streams used for a mme association */ /* Number of SCTP streams used for a mme association */
uint16_t sctp_in_streams; uint16_t sctp_in_streams;
......
...@@ -22,6 +22,8 @@ ...@@ -22,6 +22,8 @@
#ifndef M3AP_MESSAGES_TYPES_H_ #ifndef M3AP_MESSAGES_TYPES_H_
#define M3AP_MESSAGES_TYPES_H_ #define M3AP_MESSAGES_TYPES_H_
#include <netinet/in.h>
#include <netinet/sctp.h>
#include "s1ap_messages_types.h" #include "s1ap_messages_types.h"
#include "LTE_PhysCellId.h" #include "LTE_PhysCellId.h"
...@@ -336,7 +338,7 @@ typedef struct m3ap_setup_req_s{ ...@@ -336,7 +338,7 @@ typedef struct m3ap_setup_req_s{
/* Connexion id used between SCTP/M3AP */ /* Connexion id used between SCTP/M3AP */
uint16_t cnx_id; uint16_t cnx_id;
/* SCTP association id */ /* SCTP association id */
int32_t assoc_id; sctp_assoc_t assoc_id;
/* Number of SCTP streams used for a mme association */ /* Number of SCTP streams used for a mme association */
uint16_t sctp_in_streams; uint16_t sctp_in_streams;
......
...@@ -55,7 +55,6 @@ MESSAGE_DEF(RRC_STATE_IND, MESSAGE_PRIORITY_MED, RrcStateInd, ...@@ -55,7 +55,6 @@ MESSAGE_DEF(RRC_STATE_IND, MESSAGE_PRIORITY_MED, RrcStateInd,
// eNB: ENB_APP -> RRC messages // eNB: ENB_APP -> RRC messages
MESSAGE_DEF(RRC_CONFIGURATION_REQ, MESSAGE_PRIORITY_MED, RrcConfigurationReq, rrc_configuration_req) MESSAGE_DEF(RRC_CONFIGURATION_REQ, MESSAGE_PRIORITY_MED, RrcConfigurationReq, rrc_configuration_req)
MESSAGE_DEF(NBIOTRRC_CONFIGURATION_REQ, MESSAGE_PRIORITY_MED, NbIoTRrcConfigurationReq, nbiotrrc_configuration_req) MESSAGE_DEF(NBIOTRRC_CONFIGURATION_REQ, MESSAGE_PRIORITY_MED, NbIoTRrcConfigurationReq, nbiotrrc_configuration_req)
MESSAGE_DEF(NRRRC_CONFIGURATION_REQ, MESSAGE_PRIORITY_MED, gNB_RrcConfigurationReq, nrrrc_configuration_req)
// UE: NAS -> RRC messages // UE: NAS -> RRC messages
MESSAGE_DEF(NAS_KENB_REFRESH_REQ, MESSAGE_PRIORITY_MED, NasKenbRefreshReq, nas_kenb_refresh_req) MESSAGE_DEF(NAS_KENB_REFRESH_REQ, MESSAGE_PRIORITY_MED, NasKenbRefreshReq, nas_kenb_refresh_req)
......
...@@ -69,8 +69,6 @@ ...@@ -69,8 +69,6 @@
#define NBIOTRRC_CONFIGURATION_REQ(mSGpTR) (mSGpTR)->ittiMsg.nbiotrrc_configuration_req #define NBIOTRRC_CONFIGURATION_REQ(mSGpTR) (mSGpTR)->ittiMsg.nbiotrrc_configuration_req
#define NRRRC_CONFIGURATION_REQ(mSGpTR) (mSGpTR)->ittiMsg.nrrrc_configuration_req
#define NAS_KENB_REFRESH_REQ(mSGpTR) (mSGpTR)->ittiMsg.nas_kenb_refresh_req #define NAS_KENB_REFRESH_REQ(mSGpTR) (mSGpTR)->ittiMsg.nas_kenb_refresh_req
#define NAS_CELL_SELECTION_REQ(mSGpTR) (mSGpTR)->ittiMsg.nas_cell_selection_req #define NAS_CELL_SELECTION_REQ(mSGpTR) (mSGpTR)->ittiMsg.nas_cell_selection_req
#define NAS_CONN_ESTABLI_REQ(mSGpTR) (mSGpTR)->ittiMsg.nas_conn_establi_req #define NAS_CONN_ESTABLI_REQ(mSGpTR) (mSGpTR)->ittiMsg.nas_conn_establi_req
...@@ -403,12 +401,6 @@ typedef struct NbIoTRrcConfigurationReq_s { ...@@ -403,12 +401,6 @@ typedef struct NbIoTRrcConfigurationReq_s {
long ue_TimersAndConstants_n311_NB; long ue_TimersAndConstants_n311_NB;
} NbIoTRrcConfigurationReq; } NbIoTRrcConfigurationReq;
typedef struct {
int N1;
int N2;
int XP;
} rrc_pdsch_AntennaPorts_t;
// gNB: GNB_APP -> RRC messages // gNB: GNB_APP -> RRC messages
typedef struct NRRrcConfigurationReq_s { typedef struct NRRrcConfigurationReq_s {
uint64_t cell_identity; uint64_t cell_identity;
...@@ -417,17 +409,7 @@ typedef struct NRRrcConfigurationReq_s { ...@@ -417,17 +409,7 @@ typedef struct NRRrcConfigurationReq_s {
uint16_t mnc[PLMN_LIST_MAX_SIZE]; uint16_t mnc[PLMN_LIST_MAX_SIZE];
uint8_t mnc_digit_length[PLMN_LIST_MAX_SIZE]; uint8_t mnc_digit_length[PLMN_LIST_MAX_SIZE];
uint8_t num_plmn; uint8_t num_plmn;
NR_ServingCellConfigCommon_t *scc;
NR_ServingCellConfig_t *scd;
int sib1_tda;
rrc_pdsch_AntennaPorts_t pdsch_AntennaPorts;
int pusch_AntennaPorts;
int minRXTXTIME;
int do_CSIRS;
int do_SRS;
bool force_256qam_off;
int pusch_TargetSNRx10;
int pucch_TargetSNRx10;
bool enable_sdap; bool enable_sdap;
int drbs; int drbs;
} gNB_RrcConfigurationReq; } gNB_RrcConfigurationReq;
......
...@@ -22,6 +22,8 @@ ...@@ -22,6 +22,8 @@
#ifndef S1AP_MESSAGES_TYPES_H_ #ifndef S1AP_MESSAGES_TYPES_H_
#define S1AP_MESSAGES_TYPES_H_ #define S1AP_MESSAGES_TYPES_H_
#include <netinet/in.h>
#include <netinet/sctp.h>
#include "LTE_asn_constant.h" #include "LTE_asn_constant.h"
//-------------------------------------------------------------------------------------------// //-------------------------------------------------------------------------------------------//
// Defines to access message fields. // Defines to access message fields.
......
...@@ -22,6 +22,9 @@ ...@@ -22,6 +22,9 @@
#ifndef SCTP_MESSAGES_TYPES_H_ #ifndef SCTP_MESSAGES_TYPES_H_
#define SCTP_MESSAGES_TYPES_H_ #define SCTP_MESSAGES_TYPES_H_
#include <netinet/in.h>
#include <netinet/sctp.h>
#define SCTP_NEW_ASSOCIATION_REQ(mSGpTR) (mSGpTR)->ittiMsg.sctp_new_association_req #define SCTP_NEW_ASSOCIATION_REQ(mSGpTR) (mSGpTR)->ittiMsg.sctp_new_association_req
#define SCTP_NEW_ASSOCIATION_REQ_MULTI(mSGpTR) (mSGpTR)->ittiMsg.sctp_new_association_req_multi #define SCTP_NEW_ASSOCIATION_REQ_MULTI(mSGpTR) (mSGpTR)->ittiMsg.sctp_new_association_req_multi
#define SCTP_NEW_ASSOCIATION_RESP(mSGpTR) (mSGpTR)->ittiMsg.sctp_new_association_resp #define SCTP_NEW_ASSOCIATION_RESP(mSGpTR) (mSGpTR)->ittiMsg.sctp_new_association_resp
...@@ -87,7 +90,7 @@ typedef struct sctp_init_msg_multi_cnf_s { ...@@ -87,7 +90,7 @@ typedef struct sctp_init_msg_multi_cnf_s {
typedef struct sctp_new_association_ind_s { typedef struct sctp_new_association_ind_s {
/* Assoc id of the new association */ /* Assoc id of the new association */
int32_t assoc_id; sctp_assoc_t assoc_id;
/* The port used by remote host */ /* The port used by remote host */
uint16_t port; uint16_t port;
...@@ -102,7 +105,7 @@ typedef struct sctp_new_association_resp_s { ...@@ -102,7 +105,7 @@ typedef struct sctp_new_association_resp_s {
uint16_t ulp_cnx_id; uint16_t ulp_cnx_id;
/* SCTP Association ID */ /* SCTP Association ID */
int32_t assoc_id; sctp_assoc_t assoc_id;
/* Input/output streams */ /* Input/output streams */
uint16_t out_streams; uint16_t out_streams;
...@@ -114,7 +117,7 @@ typedef struct sctp_new_association_resp_s { ...@@ -114,7 +117,7 @@ typedef struct sctp_new_association_resp_s {
typedef struct sctp_data_ind_s { typedef struct sctp_data_ind_s {
/* SCTP Association ID */ /* SCTP Association ID */
int32_t assoc_id; sctp_assoc_t assoc_id;
/* Buffer to send over SCTP */ /* Buffer to send over SCTP */
uint32_t buffer_length; uint32_t buffer_length;
...@@ -139,7 +142,7 @@ typedef struct sctp_init_s { ...@@ -139,7 +142,7 @@ typedef struct sctp_init_s {
typedef struct sctp_close_association_s { typedef struct sctp_close_association_s {
uint32_t assoc_id; sctp_assoc_t assoc_id;
} sctp_close_association_t; } sctp_close_association_t;
......
...@@ -22,6 +22,8 @@ ...@@ -22,6 +22,8 @@
#ifndef X2AP_MESSAGES_TYPES_H_ #ifndef X2AP_MESSAGES_TYPES_H_
#define X2AP_MESSAGES_TYPES_H_ #define X2AP_MESSAGES_TYPES_H_
#include <netinet/in.h>
#include <netinet/sctp.h>
#include "s1ap_messages_types.h" #include "s1ap_messages_types.h"
#include "LTE_PhysCellId.h" #include "LTE_PhysCellId.h"
...@@ -425,7 +427,7 @@ typedef struct x2ap_ENDC_reconf_complete_s { ...@@ -425,7 +427,7 @@ typedef struct x2ap_ENDC_reconf_complete_s {
typedef struct x2ap_ENDC_sgnb_release_request_s { typedef struct x2ap_ENDC_sgnb_release_request_s {
int rnti; int rnti;
x2ap_cause_t cause; x2ap_cause_t cause;
int assoc_id; sctp_assoc_t assoc_id;
} x2ap_ENDC_sgnb_release_request_t; } x2ap_ENDC_sgnb_release_request_t;
typedef struct x2ap_ENDC_sgnb_release_required_s { typedef struct x2ap_ENDC_sgnb_release_required_s {
......
...@@ -67,8 +67,8 @@ const char *const e1ap_direction2String(int e1ap_dir) ...@@ -67,8 +67,8 @@ const char *const e1ap_direction2String(int e1ap_dir)
return(e1ap_direction_String[e1ap_dir]); return(e1ap_direction_String[e1ap_dir]);
} }
int e1ap_handle_message(instance_t instance, uint32_t assoc_id, int e1ap_handle_message(instance_t instance, sctp_assoc_t assoc_id, const uint8_t *const data, const uint32_t data_length)
const uint8_t *const data, const uint32_t data_length) { {
E1AP_E1AP_PDU_t pdu= {0}; E1AP_E1AP_PDU_t pdu= {0};
int ret; int ret;
DevAssert(data != NULL); DevAssert(data != NULL);
...@@ -128,18 +128,14 @@ int e1ap_send_RESET_ACKNOWLEDGE(instance_t instance, E1AP_Reset_t *Reset) { ...@@ -128,18 +128,14 @@ int e1ap_send_RESET_ACKNOWLEDGE(instance_t instance, E1AP_Reset_t *Reset) {
return -1; return -1;
} }
int e1ap_handle_RESET(instance_t instance, int e1ap_handle_RESET(instance_t instance, sctp_assoc_t assoc_id, uint32_t stream, E1AP_E1AP_PDU_t *pdu)
uint32_t assoc_id, {
uint32_t stream,
E1AP_E1AP_PDU_t *pdu) {
AssertFatal(false,"Not implemented yet\n"); AssertFatal(false,"Not implemented yet\n");
return -1; return -1;
} }
int e1ap_handle_RESET_ACKNOWLEDGE(instance_t instance, int e1ap_handle_RESET_ACKNOWLEDGE(instance_t instance, sctp_assoc_t assoc_id, uint32_t stream, E1AP_E1AP_PDU_t *pdu)
uint32_t assoc_id, {
uint32_t stream,
E1AP_E1AP_PDU_t *pdu) {
AssertFatal(false,"Not implemented yet\n"); AssertFatal(false,"Not implemented yet\n");
return -1; return -1;
} }
...@@ -147,10 +143,8 @@ int e1ap_handle_RESET_ACKNOWLEDGE(instance_t instance, ...@@ -147,10 +143,8 @@ int e1ap_handle_RESET_ACKNOWLEDGE(instance_t instance,
/* /*
Error Indication Error Indication
*/ */
int e1ap_handle_ERROR_INDICATION(instance_t instance, int e1ap_handle_ERROR_INDICATION(instance_t instance, sctp_assoc_t assoc_id, uint32_t stream, E1AP_E1AP_PDU_t *pdu)
uint32_t assoc_id, {
uint32_t stream,
E1AP_E1AP_PDU_t *pdu) {
AssertFatal(false,"Not implemented yet\n"); AssertFatal(false,"Not implemented yet\n");
return -1; return -1;
} }
...@@ -465,13 +459,19 @@ int e1apCUCP_handle_CONFIGURATION_UPDATE(e1ap_setup_req_t *setupReq, E1AP_E1AP_P ...@@ -465,13 +459,19 @@ int e1apCUCP_handle_CONFIGURATION_UPDATE(e1ap_setup_req_t *setupReq, E1AP_E1AP_P
return -1; return -1;
} }
int e1apCUUP_handle_gNB_DU_CONFIGURATION_UPDATE_ACKNOWLEDGE(e1ap_setup_req_t *setupReq, uint32_t assoc_id, uint32_t stream, E1AP_E1AP_PDU_t *pdu) int e1apCUUP_handle_gNB_DU_CONFIGURATION_UPDATE_ACKNOWLEDGE(e1ap_setup_req_t *setupReq,
sctp_assoc_t assoc_id,
uint32_t stream,
E1AP_E1AP_PDU_t *pdu)
{ {
AssertFatal(false,"Not implemented yet\n"); AssertFatal(false,"Not implemented yet\n");
return -1; return -1;
} }
int e1apCUUP_handle_gNB_DU_CONFIGURATION_FAILURE(e1ap_setup_req_t *setupReq, uint32_t assoc_id, uint32_t stream, E1AP_E1AP_PDU_t *pdu) int e1apCUUP_handle_gNB_DU_CONFIGURATION_FAILURE(e1ap_setup_req_t *setupReq,
sctp_assoc_t assoc_id,
uint32_t stream,
E1AP_E1AP_PDU_t *pdu)
{ {
AssertFatal(false,"Not implemented yet\n"); AssertFatal(false,"Not implemented yet\n");
return -1; return -1;
...@@ -491,18 +491,14 @@ int e1ap_send_RELEASE_ACKNOWLEDGE(instance_t instance) { ...@@ -491,18 +491,14 @@ int e1ap_send_RELEASE_ACKNOWLEDGE(instance_t instance) {
return -1; return -1;
} }
int e1ap_handle_RELEASE_REQUEST(instance_t instance, int e1ap_handle_RELEASE_REQUEST(instance_t instance, sctp_assoc_t assoc_id, uint32_t stream, E1AP_E1AP_PDU_t *pdu)
uint32_t assoc_id, {
uint32_t stream,
E1AP_E1AP_PDU_t *pdu) {
AssertFatal(false,"Not implemented yet\n"); AssertFatal(false,"Not implemented yet\n");
return -1; return -1;
} }
int e1ap_handle_RELEASE_ACKNOWLEDGE(instance_t instance, int e1ap_handle_RELEASE_ACKNOWLEDGE(instance_t instance, sctp_assoc_t assoc_id, uint32_t stream, E1AP_E1AP_PDU_t *pdu)
uint32_t assoc_id, {
uint32_t stream,
E1AP_E1AP_PDU_t *pdu) {
AssertFatal(false,"Not implemented yet\n"); AssertFatal(false,"Not implemented yet\n");
return -1; return -1;
} }
...@@ -1251,17 +1247,19 @@ int e1apCUUP_handle_BEARER_CONTEXT_MODIFICATION_REQUEST(e1ap_upcp_inst_t *e1_ins ...@@ -1251,17 +1247,19 @@ int e1apCUUP_handle_BEARER_CONTEXT_MODIFICATION_REQUEST(e1ap_upcp_inst_t *e1_ins
} }
int e1apCUCP_handle_BEARER_CONTEXT_MODIFICATION_RESPONSE(instance_t instance, int e1apCUCP_handle_BEARER_CONTEXT_MODIFICATION_RESPONSE(instance_t instance,
uint32_t assoc_id, sctp_assoc_t assoc_id,
uint32_t stream, uint32_t stream,
E1AP_E1AP_PDU_t *pdu) { E1AP_E1AP_PDU_t *pdu)
{
AssertFatal(false,"Not implemented yet\n"); AssertFatal(false,"Not implemented yet\n");
return -1; return -1;
} }
int e1apCUCP_handle_BEARER_CONTEXT_MODIFICATION_FAILURE(instance_t instance, int e1apCUCP_handle_BEARER_CONTEXT_MODIFICATION_FAILURE(instance_t instance,
uint32_t assoc_id, sctp_assoc_t assoc_id,
uint32_t stream, uint32_t stream,
E1AP_E1AP_PDU_t *pdu) { E1AP_E1AP_PDU_t *pdu)
{
AssertFatal(false,"Not implemented yet\n"); AssertFatal(false,"Not implemented yet\n");
return -1; return -1;
} }
...@@ -1277,17 +1275,19 @@ int e1apCUCP_send_BEARER_CONTEXT_MODIFICATION_CONFIRM(instance_t instance) { ...@@ -1277,17 +1275,19 @@ int e1apCUCP_send_BEARER_CONTEXT_MODIFICATION_CONFIRM(instance_t instance) {
} }
int e1apCUCP_handle_BEARER_CONTEXT_MODIFICATION_REQUIRED(instance_t instance, int e1apCUCP_handle_BEARER_CONTEXT_MODIFICATION_REQUIRED(instance_t instance,
uint32_t assoc_id, sctp_assoc_t assoc_id,
uint32_t stream, uint32_t stream,
E1AP_E1AP_PDU_t *pdu) { E1AP_E1AP_PDU_t *pdu)
{
AssertFatal(false,"Not implemented yet\n"); AssertFatal(false,"Not implemented yet\n");
return -1; return -1;
} }
int e1apCUUP_handle_BEARER_CONTEXT_MODIFICATION_CONFIRM(instance_t instance, int e1apCUUP_handle_BEARER_CONTEXT_MODIFICATION_CONFIRM(instance_t instance,
uint32_t assoc_id, sctp_assoc_t assoc_id,
uint32_t stream, uint32_t stream,
E1AP_E1AP_PDU_t *pdu) { E1AP_E1AP_PDU_t *pdu)
{
AssertFatal(false,"Not implemented yet\n"); AssertFatal(false,"Not implemented yet\n");
return -1; return -1;
} }
...@@ -1464,9 +1464,10 @@ int e1apCUCP_handle_BEARER_CONTEXT_RELEASE_COMPLETE(e1ap_upcp_inst_t *e1_inst, c ...@@ -1464,9 +1464,10 @@ int e1apCUCP_handle_BEARER_CONTEXT_RELEASE_COMPLETE(e1ap_upcp_inst_t *e1_inst, c
} }
int e1apCUCP_handle_BEARER_CONTEXT_RELEASE_REQUEST(instance_t instance, int e1apCUCP_handle_BEARER_CONTEXT_RELEASE_REQUEST(instance_t instance,
uint32_t assoc_id, sctp_assoc_t assoc_id,
uint32_t stream, uint32_t stream,
E1AP_E1AP_PDU_t *pdu) { E1AP_E1AP_PDU_t *pdu)
{
AssertFatal(false,"Not implemented yet\n"); AssertFatal(false,"Not implemented yet\n");
return -1; return -1;
} }
...@@ -1481,9 +1482,10 @@ int e1apCUUP_send_BEARER_CONTEXT_INACTIVITY_NOTIFICATION(instance_t instance) { ...@@ -1481,9 +1482,10 @@ int e1apCUUP_send_BEARER_CONTEXT_INACTIVITY_NOTIFICATION(instance_t instance) {
} }
int e1apCUCP_handle_BEARER_CONTEXT_INACTIVITY_NOTIFICATION(instance_t instance, int e1apCUCP_handle_BEARER_CONTEXT_INACTIVITY_NOTIFICATION(instance_t instance,
uint32_t assoc_id, sctp_assoc_t assoc_id,
uint32_t stream, uint32_t stream,
E1AP_E1AP_PDU_t *pdu) { E1AP_E1AP_PDU_t *pdu)
{
AssertFatal(false,"Not implemented yet\n"); AssertFatal(false,"Not implemented yet\n");
return -1; return -1;
} }
...@@ -1501,18 +1503,14 @@ int e1apCUUP_send_DATA_USAGE_REPORT(instance_t instance) { ...@@ -1501,18 +1503,14 @@ int e1apCUUP_send_DATA_USAGE_REPORT(instance_t instance) {
return -1; return -1;
} }
int e1apCUCP_handle_DL_DATA_NOTIFICATION(instance_t instance, int e1apCUCP_handle_DL_DATA_NOTIFICATION(instance_t instance, sctp_assoc_t assoc_id, uint32_t stream, E1AP_E1AP_PDU_t *pdu)
uint32_t assoc_id, {
uint32_t stream,
E1AP_E1AP_PDU_t *pdu) {
AssertFatal(false,"Not implemented yet\n"); AssertFatal(false,"Not implemented yet\n");
return -1; return -1;
} }
int e1apCUCP_handle_send_DATA_USAGE_REPORT(instance_t instance, int e1apCUCP_handle_send_DATA_USAGE_REPORT(instance_t instance, sctp_assoc_t assoc_id, uint32_t stream, E1AP_E1AP_PDU_t *pdu)
uint32_t assoc_id, {
uint32_t stream,
E1AP_E1AP_PDU_t *pdu) {
AssertFatal(false,"Not implemented yet\n"); AssertFatal(false,"Not implemented yet\n");
return -1; return -1;
} }
......
...@@ -34,7 +34,7 @@ typedef struct e1ap_upcp_inst_s { ...@@ -34,7 +34,7 @@ typedef struct e1ap_upcp_inst_s {
bool same_process; bool same_process;
E1_t type; E1_t type;
enum sctp_state_e sockState; enum sctp_state_e sockState;
uint32_t assoc_id; sctp_assoc_t assoc_id;
instance_t gtpInstN3; instance_t gtpInstN3;
instance_t gtpInstF1U; instance_t gtpInstF1U;
e1ap_setup_req_t setupReq; e1ap_setup_req_t setupReq;
......
...@@ -32,42 +32,44 @@ ...@@ -32,42 +32,44 @@
#include "f1ap_common.h" #include "f1ap_common.h"
static f1ap_cudu_inst_t *f1_du_inst[NUMBER_OF_gNB_MAX]= {0}; static f1ap_cudu_inst_t *f1_inst[NUMBER_OF_gNB_MAX]= {0};
static f1ap_cudu_inst_t *f1_cu_inst[NUMBER_OF_gNB_MAX]= {0};
uint8_t F1AP_get_next_transaction_identifier(instance_t mod_idP, instance_t cu_mod_idP) { uint8_t F1AP_get_next_transaction_identifier(instance_t mod_idP, instance_t cu_mod_idP)
{
DevAssert(mod_idP == 0 && cu_mod_idP == 0);
static uint8_t transaction_identifier[NUMBER_OF_gNB_MAX] = {0}; static uint8_t transaction_identifier[NUMBER_OF_gNB_MAX] = {0};
transaction_identifier[mod_idP+cu_mod_idP] = transaction_identifier[mod_idP+cu_mod_idP] =
(transaction_identifier[mod_idP+cu_mod_idP] + 1) % F1AP_TRANSACTION_IDENTIFIER_NUMBER; (transaction_identifier[mod_idP+cu_mod_idP] + 1) % F1AP_TRANSACTION_IDENTIFIER_NUMBER;
return transaction_identifier[mod_idP+cu_mod_idP]; return transaction_identifier[mod_idP+cu_mod_idP];
} }
f1ap_cudu_inst_t *getCxt(F1_t isCU, instance_t instanceP) { f1ap_cudu_inst_t *getCxt(instance_t instanceP)
//Fixme: 4G F1 has race condtions, someone may debug it, using this test {
/* DevAssert(instanceP == 0);
static pid_t t=-1; return f1_inst[instanceP];
pid_t tNew=gettid();
AssertFatal ( t==-1 || t==tNew, "This is not thread safe\n");
t=tNew;
*/
AssertFatal( instanceP < sizeofArray(f1_cu_inst), "");
return isCU == CUtype ? f1_cu_inst[ instanceP]: f1_du_inst[ instanceP];
} }
void createF1inst(F1_t isCU, instance_t instanceP, f1ap_setup_req_t *req) { static pthread_mutex_t f1_inst_mtx = PTHREAD_MUTEX_INITIALIZER;
if (isCU == CUtype) { void createF1inst(instance_t instanceP, f1ap_setup_req_t *req, f1ap_net_config_t *nc)
AssertFatal(f1_cu_inst[instanceP] == NULL, "Double call to F1 CU init\n"); {
f1_cu_inst[instanceP]=( f1ap_cudu_inst_t *) calloc(1, sizeof( f1ap_cudu_inst_t)); DevAssert(instanceP == 0);
//memcpy(f1_cu_inst[instanceP]->setupReq, req, sizeof(f1ap_setup_req_t) ); pthread_mutex_lock(&f1_inst_mtx);
} else { AssertFatal(f1_inst[0] == NULL, "Attempted to initialize multiple F1 instances\n");
AssertFatal(f1_du_inst[instanceP] == NULL, "Double call to F1 DU init\n"); f1_inst[0] = calloc(1, sizeof(f1ap_cudu_inst_t));
f1_du_inst[instanceP]=( f1ap_cudu_inst_t *) calloc(1, sizeof(f1ap_cudu_inst_t)); AssertFatal(f1_inst[0] != NULL, "out of memory\n");
memcpy(&f1_du_inst[instanceP]->setupReq, req, sizeof(f1ap_setup_req_t) ); if (req)
} f1_inst[0]->setupReq = *req;
if (nc)
f1_inst[0]->net_config = *nc;
pthread_mutex_unlock(&f1_inst_mtx);
} }
void destroyF1inst(instance_t instance)
int f1ap_assoc_id(F1_t isCu, instance_t instanceP) { {
f1ap_setup_req_t *f1_inst=f1ap_req(isCu, instanceP); DevAssert(instance == 0);
return f1_inst->assoc_id; pthread_mutex_lock(&f1_inst_mtx);
AssertFatal(f1_inst[0] != NULL, "Attempted to free uninitialized F1 instances\n");
free(f1_inst[instance]);
f1_inst[instance] = NULL;
pthread_mutex_unlock(&f1_inst_mtx);
} }
...@@ -387,56 +387,40 @@ ...@@ -387,56 +387,40 @@
/** \brief Function array prototype. /** \brief Function array prototype.
**/ **/
typedef int (*f1ap_message_processing_t)( typedef int (*f1ap_message_processing_t)(instance_t instance, sctp_assoc_t assoc_id, uint32_t stream, F1AP_F1AP_PDU_t *message_p);
instance_t instance, int f1ap_handle_message(instance_t instance,
uint32_t assoc_id, sctp_assoc_t assoc_id,
uint32_t stream, int32_t stream,
F1AP_F1AP_PDU_t *message_p const uint8_t *const data,
); const uint32_t data_length);
int f1ap_handle_message(instance_t instance, uint32_t assoc_id, int32_t stream,
const uint8_t *const data, const uint32_t data_length);
typedef struct f1ap_cudu_ue_inst_s {
// used for NB stats generation
rnti_t rnti;
instance_t f1ap_uid;
instance_t du_ue_f1ap_id;
instance_t cu_ue_f1ap_id;
} f1ap_cudu_ue_t;
typedef struct f1ap_cudu_inst_s { typedef struct f1ap_cudu_inst_s {
f1ap_setup_req_t setupReq; f1ap_setup_req_t setupReq;
/* The eNB IP address to bind */
f1ap_net_config_t net_config;
/* SCTP information */
sctp_assoc_t assoc_id;
uint16_t sctp_in_streams; uint16_t sctp_in_streams;
uint16_t sctp_out_streams; uint16_t sctp_out_streams;
uint16_t default_sctp_stream_id;
/* GTP instance used by F1 */
instance_t gtpInst; instance_t gtpInst;
uint64_t gNB_DU_id;
uint16_t num_ues;
f1ap_cudu_ue_t f1ap_ue[MAX_MOBILES_PER_GNB];
} f1ap_cudu_inst_t; } f1ap_cudu_inst_t;
typedef enum {
DUtype=0,
CUtype
} F1_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}; 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); uint8_t F1AP_get_next_transaction_identifier(instance_t mod_idP, instance_t cu_mod_idP);
f1ap_cudu_inst_t *getCxt(F1_t isCU, instance_t instanceP); f1ap_cudu_inst_t *getCxt(instance_t instanceP);
void createF1inst(F1_t isCU, instance_t instanceP, f1ap_setup_req_t *req);
int f1ap_assoc_id(F1_t isCu, instance_t instanceP);
static inline f1ap_setup_req_t *f1ap_req(F1_t isCu, instance_t instanceP) { void createF1inst(instance_t instanceP, f1ap_setup_req_t *req, f1ap_net_config_t *nc);
return &getCxt(isCu, instanceP)->setupReq; void destroyF1inst(instance_t instance);
}
//lts: C struct type is not homogeneous, so we need macros instead of functions //lts: C struct type is not homogeneous, so we need macros instead of functions
#define addnRCGI(nRCGi, servedCelL) \ #define addnRCGI(nRCGi, servedCelL) \
MCC_MNC_TO_PLMNID((servedCelL)->mcc,(servedCelL)-> mnc,(servedCelL)->mnc_digit_length, \ MCC_MNC_TO_PLMNID((servedCelL)->plmn.mcc,(servedCelL)->plmn.mnc,(servedCelL)->plmn.mnc_digit_length, \
&((nRCGi).pLMN_Identity)); \ &((nRCGi).pLMN_Identity)); \
NR_CELL_ID_TO_BIT_STRING((servedCelL)->nr_cellid, &((nRCGi).nRCellIdentity)); NR_CELL_ID_TO_BIT_STRING((servedCelL)->nr_cellid, &((nRCGi).nRCellIdentity));
extern RAN_CONTEXT_t RC; extern RAN_CONTEXT_t RC;
......
...@@ -37,32 +37,20 @@ ...@@ -37,32 +37,20 @@
* Reset * Reset
*/ */
int CU_send_RESET(instance_t instance, F1AP_Reset_t *Reset); int CU_send_RESET(instance_t instance, F1AP_Reset_t *Reset);
int CU_handle_RESET_ACKKNOWLEDGE(instance_t instance, int CU_handle_RESET_ACKKNOWLEDGE(instance_t instance, sctp_assoc_t assoc_id, uint32_t stream, F1AP_F1AP_PDU_t *pdu);
uint32_t assoc_id, int CU_handle_RESET(instance_t instance, sctp_assoc_t assoc_id, uint32_t stream, F1AP_F1AP_PDU_t *pdu);
uint32_t stream,
F1AP_F1AP_PDU_t *pdu);
int CU_handle_RESET(instance_t instance,
uint32_t assoc_id,
uint32_t stream,
F1AP_F1AP_PDU_t *pdu);
int CU_send_RESET_ACKNOWLEDGE(instance_t instance, F1AP_ResetAcknowledge_t *ResetAcknowledge); int CU_send_RESET_ACKNOWLEDGE(instance_t instance, F1AP_ResetAcknowledge_t *ResetAcknowledge);
/* /*
* Error Indication * Error Indication
*/ */
int CU_handle_ERROR_INDICATION(instance_t instance, int CU_handle_ERROR_INDICATION(instance_t instance, sctp_assoc_t assoc_id, uint32_t stream, F1AP_F1AP_PDU_t *pdu);
uint32_t assoc_id,
uint32_t stream,
F1AP_F1AP_PDU_t *pdu);
int CU_send_ERROR_INDICATION(instance_t instance, F1AP_ErrorIndication_t *ErrorIndication); int CU_send_ERROR_INDICATION(instance_t instance, F1AP_ErrorIndication_t *ErrorIndication);
/* /*
* F1 Setup * F1 Setup
*/ */
int CU_handle_F1_SETUP_REQUEST(instance_t instance, int CU_handle_F1_SETUP_REQUEST(instance_t instance, sctp_assoc_t assoc_id, uint32_t stream, F1AP_F1AP_PDU_t *pdu);
uint32_t assoc_id,
uint32_t stream,
F1AP_F1AP_PDU_t *pdu);
int CU_send_F1_SETUP_RESPONSE(instance_t instance, f1ap_setup_resp_t *f1ap_setup_resp); int CU_send_F1_SETUP_RESPONSE(instance_t instance, f1ap_setup_resp_t *f1ap_setup_resp);
...@@ -71,10 +59,7 @@ int CU_send_F1_SETUP_FAILURE(instance_t instance); ...@@ -71,10 +59,7 @@ int CU_send_F1_SETUP_FAILURE(instance_t instance);
/* /*
* gNB-DU Configuration Update * gNB-DU Configuration Update
*/ */
int CU_handle_gNB_DU_CONFIGURATION_UPDATE(instance_t instance, int CU_handle_gNB_DU_CONFIGURATION_UPDATE(instance_t instance, sctp_assoc_t assoc_id, uint32_t stream, F1AP_F1AP_PDU_t *pdu);
uint32_t assoc_id,
uint32_t stream,
F1AP_F1AP_PDU_t *pdu);
int CU_send_gNB_DU_CONFIGURATION_FAILURE(instance_t instance, int CU_send_gNB_DU_CONFIGURATION_FAILURE(instance_t instance,
F1AP_GNBDUConfigurationUpdateFailure_t *GNBDUConfigurationUpdateFailure); F1AP_GNBDUConfigurationUpdateFailure_t *GNBDUConfigurationUpdateFailure);
...@@ -87,22 +72,22 @@ int CU_send_gNB_DU_CONFIGURATION_UPDATE_ACKNOWLEDGE(instance_t instance, ...@@ -87,22 +72,22 @@ int CU_send_gNB_DU_CONFIGURATION_UPDATE_ACKNOWLEDGE(instance_t instance,
*/ */
int CU_send_gNB_CU_CONFIGURATION_UPDATE(instance_t instance, f1ap_gnb_cu_configuration_update_t *f1ap_gnb_cu_configuration_update); int CU_send_gNB_CU_CONFIGURATION_UPDATE(instance_t instance, f1ap_gnb_cu_configuration_update_t *f1ap_gnb_cu_configuration_update);
int CU_handle_gNB_CU_CONFIGURATION_UPDATE_FAILURE(instance_t instance, int CU_handle_gNB_CU_CONFIGURATION_UPDATE_FAILURE(instance_t instance,
uint32_t assoc_id, sctp_assoc_t assoc_id,
uint32_t stream, uint32_t stream,
F1AP_F1AP_PDU_t *pdu); F1AP_F1AP_PDU_t *pdu);
int CU_handle_gNB_CU_CONFIGURATION_UPDATE_ACKNOWLEDGE(instance_t instance, int CU_handle_gNB_CU_CONFIGURATION_UPDATE_ACKNOWLEDGE(instance_t instance,
uint32_t assoc_id, sctp_assoc_t assoc_id,
uint32_t stream, uint32_t stream,
F1AP_F1AP_PDU_t *pdu); F1AP_F1AP_PDU_t *pdu);
/* /*
* gNB-DU Resource Coordination * gNB-DU Resource Coordination
*/ */
int CU_handle_gNB_DU_RESOURCE_COORDINATION_REQUEST(instance_t instance, int CU_handle_gNB_DU_RESOURCE_COORDINATION_REQUEST(instance_t instance,
uint32_t assoc_id, sctp_assoc_t assoc_id,
uint32_t stream, uint32_t stream,
F1AP_F1AP_PDU_t *pdu); F1AP_F1AP_PDU_t *pdu);
int CU_send_gNB_DU_RESOURCE_COORDINATION_RESPONSE(instance_t instance, int CU_send_gNB_DU_RESOURCE_COORDINATION_RESPONSE(instance_t instance,
F1AP_GNBDUResourceCoordinationResponse_t *GNBDUResourceCoordinationResponse); F1AP_GNBDUResourceCoordinationResponse_t *GNBDUResourceCoordinationResponse);
......
...@@ -101,8 +101,7 @@ int CU_send_Paging(instance_t instance, f1ap_paging_ind_t *paging) { ...@@ -101,8 +101,7 @@ int CU_send_Paging(instance_t instance, f1ap_paging_ind_t *paging) {
itemies->criticality = F1AP_Criticality_reject; itemies->criticality = F1AP_Criticality_reject;
itemies->value.present = F1AP_PagingCell_ItemIEs__value_PR_PagingCell_Item; itemies->value.present = F1AP_PagingCell_ItemIEs__value_PR_PagingCell_Item;
F1AP_NRCGI_t *nRCGI = &itemies->value.choice.PagingCell_Item.nRCGI; F1AP_NRCGI_t *nRCGI = &itemies->value.choice.PagingCell_Item.nRCGI;
MCC_MNC_TO_PLMNID(paging->mcc, paging->mnc, paging->mnc_digit_length, MCC_MNC_TO_PLMNID(paging->plmn.mcc, paging->plmn.mnc, paging->plmn.mnc_digit_length, &nRCGI->pLMN_Identity);
&nRCGI->pLMN_Identity);
NR_CELL_ID_TO_BIT_STRING(paging->nr_cellid, &nRCGI->nRCellIdentity); NR_CELL_ID_TO_BIT_STRING(paging->nr_cellid, &nRCGI->nRCellIdentity);
} }
...@@ -115,6 +114,6 @@ int CU_send_Paging(instance_t instance, f1ap_paging_ind_t *paging) { ...@@ -115,6 +114,6 @@ int CU_send_Paging(instance_t instance, f1ap_paging_ind_t *paging) {
return -1; return -1;
} }
ASN_STRUCT_FREE_CONTENTS_ONLY(asn_DEF_F1AP_F1AP_PDU, &pdu); ASN_STRUCT_FREE_CONTENTS_ONLY(asn_DEF_F1AP_F1AP_PDU, &pdu);
f1ap_itti_send_sctp_data_req(true, instance, buffer, len, 0); f1ap_itti_send_sctp_data_req(instance, buffer, len);
return 0; return 0;
} }
...@@ -43,10 +43,8 @@ ...@@ -43,10 +43,8 @@
Initial UL RRC Message Transfer Initial UL RRC Message Transfer
*/ */
int CU_handle_INITIAL_UL_RRC_MESSAGE_TRANSFER(instance_t instance, int CU_handle_INITIAL_UL_RRC_MESSAGE_TRANSFER(instance_t instance, sctp_assoc_t assoc_id, uint32_t stream, F1AP_F1AP_PDU_t *pdu)
uint32_t assoc_id, {
uint32_t stream,
F1AP_F1AP_PDU_t *pdu) {
LOG_D(F1AP, "CU_handle_INITIAL_UL_RRC_MESSAGE_TRANSFER\n"); LOG_D(F1AP, "CU_handle_INITIAL_UL_RRC_MESSAGE_TRANSFER\n");
// decode the F1 message // decode the F1 message
// get the rrc message from the contauiner // get the rrc message from the contauiner
...@@ -89,7 +87,6 @@ int CU_handle_INITIAL_UL_RRC_MESSAGE_TRANSFER(instance_t instance, ...@@ -89,7 +87,6 @@ int CU_handle_INITIAL_UL_RRC_MESSAGE_TRANSFER(instance_t instance,
F1AP_ProtocolIE_ID_id_DUtoCURRCContainer, false); F1AP_ProtocolIE_ID_id_DUtoCURRCContainer, false);
// create an ITTI message and copy SDU // create an ITTI message and copy SDU
AssertFatal(f1ap_req(true, instance)->cell_type == CELL_MACRO_GNB, "illegal cell type %d\n", f1ap_req(true, instance)->cell_type);
message_p = itti_alloc_new_message(TASK_CU_F1, 0, F1AP_INITIAL_UL_RRC_MESSAGE); message_p = itti_alloc_new_message(TASK_CU_F1, 0, F1AP_INITIAL_UL_RRC_MESSAGE);
f1ap_initial_ul_rrc_message_t *ul_rrc = &F1AP_INITIAL_UL_RRC_MESSAGE(message_p); f1ap_initial_ul_rrc_message_t *ul_rrc = &F1AP_INITIAL_UL_RRC_MESSAGE(message_p);
ul_rrc->gNB_DU_ue_id = du_ue_id; ul_rrc->gNB_DU_ue_id = du_ue_id;
...@@ -210,17 +207,15 @@ int CU_send_DL_RRC_MESSAGE_TRANSFER(instance_t instance, ...@@ -210,17 +207,15 @@ int CU_send_DL_RRC_MESSAGE_TRANSFER(instance_t instance,
return -1; return -1;
} }
f1ap_itti_send_sctp_data_req(true, instance, buffer, len, 0 /* BK: fix me*/); f1ap_itti_send_sctp_data_req(instance, buffer, len);
return 0; return 0;
} }
/* /*
UL RRC Message Transfer UL RRC Message Transfer
*/ */
int CU_handle_UL_RRC_MESSAGE_TRANSFER(instance_t instance, int CU_handle_UL_RRC_MESSAGE_TRANSFER(instance_t instance, sctp_assoc_t assoc_id, uint32_t stream, F1AP_F1AP_PDU_t *pdu)
uint32_t assoc_id, {
uint32_t stream,
F1AP_F1AP_PDU_t *pdu) {
LOG_D(F1AP, "CU_handle_UL_RRC_MESSAGE_TRANSFER \n"); LOG_D(F1AP, "CU_handle_UL_RRC_MESSAGE_TRANSFER \n");
F1AP_ULRRCMessageTransfer_t *container; F1AP_ULRRCMessageTransfer_t *container;
F1AP_ULRRCMessageTransferIEs_t *ie; F1AP_ULRRCMessageTransferIEs_t *ie;
......
...@@ -33,18 +33,10 @@ ...@@ -33,18 +33,10 @@
#ifndef F1AP_CU_RRC_MESSAGE_TRANSFER_H_ #ifndef F1AP_CU_RRC_MESSAGE_TRANSFER_H_
#define F1AP_CU_RRC_MESSAGE_TRANSFER_H_ #define F1AP_CU_RRC_MESSAGE_TRANSFER_H_
int CU_handle_INITIAL_UL_RRC_MESSAGE_TRANSFER(instance_t instance, int CU_handle_INITIAL_UL_RRC_MESSAGE_TRANSFER(instance_t instance, sctp_assoc_t assoc_id, uint32_t stream, F1AP_F1AP_PDU_t *pdu);
uint32_t assoc_id,
uint32_t stream,
F1AP_F1AP_PDU_t *pdu);
int CU_send_DL_RRC_MESSAGE_TRANSFER(instance_t instance, int CU_send_DL_RRC_MESSAGE_TRANSFER(instance_t instance, f1ap_dl_rrc_message_t *f1ap_dl_rrc);
f1ap_dl_rrc_message_t *f1ap_dl_rrc);
int CU_handle_UL_RRC_MESSAGE_TRANSFER(instance_t instance,
uint32_t assoc_id,
uint32_t stream,
F1AP_F1AP_PDU_t *pdu);
int CU_handle_UL_RRC_MESSAGE_TRANSFER(instance_t instance, sctp_assoc_t assoc_id, uint32_t stream, F1AP_F1AP_PDU_t *pdu);
#endif /* F1AP_CU_RRC_MESSAGE_TRANSFER_H_ */ #endif /* F1AP_CU_RRC_MESSAGE_TRANSFER_H_ */
...@@ -48,28 +48,41 @@ static instance_t cu_task_create_gtpu_instance(eth_params_t *IPaddrs) { ...@@ -48,28 +48,41 @@ static instance_t cu_task_create_gtpu_instance(eth_params_t *IPaddrs) {
return gtpv1Init(tmp); return gtpv1Init(tmp);
} }
static void cu_task_handle_sctp_association_ind(instance_t instance, sctp_new_association_ind_t *sctp_new_association_ind, static void cu_task_handle_sctp_association_ind(instance_t instance,
eth_params_t *IPaddrs) { sctp_new_association_ind_t *sctp_new_association_ind,
createF1inst(true, instance, NULL); eth_params_t *IPaddrs)
{
createF1inst(instance, NULL, NULL);
// save the assoc id // save the assoc id
f1ap_setup_req_t *f1ap_cu_data=f1ap_req(true, instance); f1ap_cudu_inst_t *f1ap_cu_data = getCxt(instance);
f1ap_cu_data->assoc_id = sctp_new_association_ind->assoc_id; f1ap_cu_data->assoc_id = sctp_new_association_ind->assoc_id;
f1ap_cu_data->sctp_in_streams = sctp_new_association_ind->in_streams; f1ap_cu_data->sctp_in_streams = sctp_new_association_ind->in_streams;
f1ap_cu_data->sctp_out_streams = sctp_new_association_ind->out_streams; f1ap_cu_data->sctp_out_streams = sctp_new_association_ind->out_streams;
f1ap_cu_data->default_sctp_stream_id = 0;
if (RC.nrrrc[instance]->node_type != ngran_gNB_CUCP) { if (RC.nrrrc[instance]->node_type != ngran_gNB_CUCP) {
getCxt(CUtype, instance)->gtpInst = cu_task_create_gtpu_instance(IPaddrs); getCxt(instance)->gtpInst = cu_task_create_gtpu_instance(IPaddrs);
AssertFatal(getCxt(CUtype, instance)->gtpInst > 0, "Failed to create CU F1-U UDP listener"); AssertFatal(getCxt(instance)->gtpInst > 0, "Failed to create CU F1-U UDP listener");
} else } else
LOG_I(F1AP, "In F1AP connection, don't start GTP-U, as we have also E1AP\n"); LOG_I(F1AP, "In F1AP connection, don't start GTP-U, as we have also E1AP\n");
// Fixme: fully inconsistent instances management // Fixme: fully inconsistent instances management
// dirty global var is a bad fix // dirty global var is a bad fix
CUuniqInstance=getCxt(CUtype, instance)->gtpInst; CUuniqInstance=getCxt(instance)->gtpInst;
} }
static void cu_task_handle_sctp_association_resp(instance_t instance, sctp_new_association_resp_t *sctp_new_association_resp) { static void cu_task_handle_sctp_association_resp(instance_t instance, sctp_new_association_resp_t *sctp_new_association_resp) {
DevAssert(sctp_new_association_resp != NULL); DevAssert(sctp_new_association_resp != NULL);
if (sctp_new_association_resp->sctp_state == SCTP_STATE_SHUTDOWN) {
f1ap_cudu_inst_t *f1ap_cu_data = getCxt(instance);
AssertFatal(f1ap_cu_data != NULL, "illegal state: SCTP shutdown for non-existing F1AP endpoint\n");
LOG_I(F1AP, "Received SCTP shutdown for assoc_id %d, removing endpoint\n", sctp_new_association_resp->assoc_id);
destroyF1inst(instance);
/* inform RRC that the DU is gone */
MessageDef *message_p = itti_alloc_new_message(TASK_CU_F1, 0, F1AP_LOST_CONNECTION);
message_p->ittiMsgHeader.originInstance = sctp_new_association_resp->assoc_id;
itti_send_msg_to_task(TASK_RRC_GNB, instance, message_p);
return;
}
if (sctp_new_association_resp->sctp_state != SCTP_STATE_ESTABLISHED) { if (sctp_new_association_resp->sctp_state != SCTP_STATE_ESTABLISHED) {
LOG_W(F1AP, "Received unsuccessful result for SCTP association (%u), instance %ld, cnx_id %u\n", LOG_W(F1AP, "Received unsuccessful result for SCTP association (%u), instance %ld, cnx_id %u\n",
sctp_new_association_resp->sctp_state, sctp_new_association_resp->sctp_state,
......
...@@ -509,7 +509,7 @@ int CU_send_UE_CONTEXT_SETUP_REQUEST(instance_t instance, ...@@ -509,7 +509,7 @@ int CU_send_UE_CONTEXT_SETUP_REQUEST(instance_t instance,
/*Use a dummy teid for the outgoing GTP-U tunnel (DU) which will be updated once we get the UE context setup response from the DU*/ /*Use a dummy teid for the outgoing GTP-U tunnel (DU) which will be updated once we get the UE context setup response from the DU*/
/* Use a dummy address and teid for the outgoing GTP-U tunnel (DU) which will be updated once we get the UE context setup response from the DU */ /* Use a dummy address and teid for the outgoing GTP-U tunnel (DU) which will be updated once we get the UE context setup response from the DU */
transport_layer_addr_t addr = { .length= 32, .buffer= { 0 } }; transport_layer_addr_t addr = { .length= 32, .buffer= { 0 } };
f1ap_ue_context_setup_req->drbs_to_be_setup[i].up_ul_tnl[j].teid = newGtpuCreateTunnel(getCxt(CUtype, instance)->gtpInst, f1ap_ue_context_setup_req->drbs_to_be_setup[i].up_ul_tnl[j].teid = newGtpuCreateTunnel(getCxt(instance)->gtpInst,
f1ap_ue_context_setup_req->gNB_CU_ue_id, f1ap_ue_context_setup_req->gNB_CU_ue_id,
f1ap_ue_context_setup_req->drbs_to_be_setup[i].drb_id, f1ap_ue_context_setup_req->drbs_to_be_setup[i].drb_id,
f1ap_ue_context_setup_req->drbs_to_be_setup[i].drb_id, f1ap_ue_context_setup_req->drbs_to_be_setup[i].drb_id,
...@@ -628,14 +628,12 @@ int CU_send_UE_CONTEXT_SETUP_REQUEST(instance_t instance, ...@@ -628,14 +628,12 @@ int CU_send_UE_CONTEXT_SETUP_REQUEST(instance_t instance,
// return -1; // return -1;
// } // }
LOG_D(F1AP,"F1AP UEContextSetupRequest Encoded %u bits\n", len); LOG_D(F1AP,"F1AP UEContextSetupRequest Encoded %u bits\n", len);
f1ap_itti_send_sctp_data_req(true, instance, buffer, len, 0 /* BK: fix me*/); f1ap_itti_send_sctp_data_req(instance, buffer, len);
return 0; return 0;
} }
int CU_handle_UE_CONTEXT_SETUP_RESPONSE(instance_t instance, int CU_handle_UE_CONTEXT_SETUP_RESPONSE(instance_t instance, sctp_assoc_t assoc_id, uint32_t stream, F1AP_F1AP_PDU_t *pdu)
uint32_t assoc_id, {
uint32_t stream,
F1AP_F1AP_PDU_t *pdu) {
MessageDef *msg_p; MessageDef *msg_p;
F1AP_UEContextSetupResponse_t *container; F1AP_UEContextSetupResponse_t *container;
F1AP_UEContextSetupResponseIEs_t *ie; F1AP_UEContextSetupResponseIEs_t *ie;
...@@ -692,7 +690,7 @@ int CU_handle_UE_CONTEXT_SETUP_RESPONSE(instance_t instance, ...@@ -692,7 +690,7 @@ int CU_handle_UE_CONTEXT_SETUP_RESPONSE(instance_t instance,
F1AP_GTPTunnel_t *dl_up_tnl0 = dl_up_tnl_info_p->dLUPTNLInformation.choice.gTPTunnel; F1AP_GTPTunnel_t *dl_up_tnl0 = dl_up_tnl_info_p->dLUPTNLInformation.choice.gTPTunnel;
BIT_STRING_TO_TRANSPORT_LAYER_ADDRESS_IPv4(&dl_up_tnl0->transportLayerAddress, drb_p->up_dl_tnl[0].tl_address); BIT_STRING_TO_TRANSPORT_LAYER_ADDRESS_IPv4(&dl_up_tnl0->transportLayerAddress, drb_p->up_dl_tnl[0].tl_address);
OCTET_STRING_TO_UINT32(&dl_up_tnl0->gTP_TEID, drb_p->up_dl_tnl[0].teid); OCTET_STRING_TO_UINT32(&dl_up_tnl0->gTP_TEID, drb_p->up_dl_tnl[0].teid);
GtpuUpdateTunnelOutgoingAddressAndTeid(getCxt(CUtype, instance)->gtpInst, GtpuUpdateTunnelOutgoingAddressAndTeid(getCxt(instance)->gtpInst,
f1ap_ue_context_setup_resp->gNB_DU_ue_id, f1ap_ue_context_setup_resp->gNB_DU_ue_id,
(ebi_t)drbs_setup_item_p->dRBID, (ebi_t)drbs_setup_item_p->dRBID,
drb_p->up_dl_tnl[0].tl_address, drb_p->up_dl_tnl[0].tl_address,
...@@ -766,14 +764,12 @@ int CU_handle_UE_CONTEXT_SETUP_RESPONSE(instance_t instance, ...@@ -766,14 +764,12 @@ int CU_handle_UE_CONTEXT_SETUP_RESPONSE(instance_t instance,
return 0; return 0;
} }
int CU_handle_UE_CONTEXT_SETUP_FAILURE(instance_t instance, int CU_handle_UE_CONTEXT_SETUP_FAILURE(instance_t instance, sctp_assoc_t assoc_id, uint32_t stream, F1AP_F1AP_PDU_t *pdu)
uint32_t assoc_id, {
uint32_t stream,
F1AP_F1AP_PDU_t *pdu) {
AssertFatal(1==0,"Not implemented yet\n"); AssertFatal(1==0,"Not implemented yet\n");
} }
int CU_handle_UE_CONTEXT_RELEASE_REQUEST(instance_t instance, uint32_t assoc_id, uint32_t stream, F1AP_F1AP_PDU_t *pdu) int CU_handle_UE_CONTEXT_RELEASE_REQUEST(instance_t instance, sctp_assoc_t assoc_id, uint32_t stream, F1AP_F1AP_PDU_t *pdu)
{ {
MessageDef *msg = itti_alloc_new_message(TASK_CU_F1, 0, F1AP_UE_CONTEXT_RELEASE_REQ); MessageDef *msg = itti_alloc_new_message(TASK_CU_F1, 0, F1AP_UE_CONTEXT_RELEASE_REQ);
f1ap_ue_context_release_req_t *req = &F1AP_UE_CONTEXT_RELEASE_REQ(msg); f1ap_ue_context_release_req_t *req = &F1AP_UE_CONTEXT_RELEASE_REQ(msg);
...@@ -916,13 +912,12 @@ int CU_send_UE_CONTEXT_RELEASE_COMMAND(instance_t instance, ...@@ -916,13 +912,12 @@ int CU_send_UE_CONTEXT_RELEASE_COMMAND(instance_t instance,
return -1; return -1;
} }
f1ap_itti_send_sctp_data_req(true, instance, buffer, len, 0); f1ap_itti_send_sctp_data_req(instance, buffer, len);
return 0; return 0;
} }
int CU_handle_UE_CONTEXT_RELEASE_COMPLETE(instance_t instance,
uint32_t assoc_id, int CU_handle_UE_CONTEXT_RELEASE_COMPLETE(instance_t instance, sctp_assoc_t assoc_id, uint32_t stream, F1AP_F1AP_PDU_t *pdu)
uint32_t stream, {
F1AP_F1AP_PDU_t *pdu) {
F1AP_UEContextReleaseComplete_t *container; F1AP_UEContextReleaseComplete_t *container;
F1AP_UEContextReleaseCompleteIEs_t *ie; F1AP_UEContextReleaseCompleteIEs_t *ie;
DevAssert(pdu); DevAssert(pdu);
...@@ -963,7 +958,8 @@ int CU_send_UE_CONTEXT_MODIFICATION_REQUEST(instance_t instance, f1ap_ue_context ...@@ -963,7 +958,8 @@ int CU_send_UE_CONTEXT_MODIFICATION_REQUEST(instance_t instance, f1ap_ue_context
uint8_t *buffer=NULL; uint8_t *buffer=NULL;
uint32_t len=0; uint32_t len=0;
// for test // for test
cellIDs_t hardCoded= { .mcc=208, .mnc=93, .mnc_digit_length=2}; LOG_W(F1AP, "UE Context Modification Request PLMN is hardcoded!\n");
f1ap_served_cell_info_t hardCoded= { .plmn.mcc=208, .plmn.mnc=93, .plmn.mnc_digit_length=2};
/* Create */ /* Create */
/* 0. Message Type */ /* 0. Message Type */
pdu.present = F1AP_F1AP_PDU_PR_initiatingMessage; pdu.present = F1AP_F1AP_PDU_PR_initiatingMessage;
...@@ -1562,15 +1558,12 @@ int CU_send_UE_CONTEXT_MODIFICATION_REQUEST(instance_t instance, f1ap_ue_context ...@@ -1562,15 +1558,12 @@ int CU_send_UE_CONTEXT_MODIFICATION_REQUEST(instance_t instance, f1ap_ue_context
LOG_E(F1AP, "Failed to encode F1 UE CONTEXT_MODIFICATION REQUEST\n"); LOG_E(F1AP, "Failed to encode F1 UE CONTEXT_MODIFICATION REQUEST\n");
return -1; return -1;
} }
f1ap_itti_send_sctp_data_req(true, instance, buffer, len, 0 /* BK: fix me*/); f1ap_itti_send_sctp_data_req(instance, buffer, len);
return 0; return 0;
} }
int CU_handle_UE_CONTEXT_MODIFICATION_RESPONSE(instance_t instance, int CU_handle_UE_CONTEXT_MODIFICATION_RESPONSE(instance_t instance, sctp_assoc_t assoc_id, uint32_t stream, F1AP_F1AP_PDU_t *pdu)
uint32_t assoc_id, {
uint32_t stream,
F1AP_F1AP_PDU_t *pdu) {
MessageDef *msg_p; MessageDef *msg_p;
F1AP_UEContextModificationResponse_t *container; F1AP_UEContextModificationResponse_t *container;
F1AP_UEContextModificationResponseIEs_t *ie; F1AP_UEContextModificationResponseIEs_t *ie;
...@@ -1628,7 +1621,7 @@ int CU_handle_UE_CONTEXT_MODIFICATION_RESPONSE(instance_t instance, ...@@ -1628,7 +1621,7 @@ int CU_handle_UE_CONTEXT_MODIFICATION_RESPONSE(instance_t instance,
F1AP_GTPTunnel_t *dl_up_tnl0 = dl_up_tnl_info_p->dLUPTNLInformation.choice.gTPTunnel; F1AP_GTPTunnel_t *dl_up_tnl0 = dl_up_tnl_info_p->dLUPTNLInformation.choice.gTPTunnel;
BIT_STRING_TO_TRANSPORT_LAYER_ADDRESS_IPv4(&dl_up_tnl0->transportLayerAddress, drb_p->up_dl_tnl[0].tl_address); BIT_STRING_TO_TRANSPORT_LAYER_ADDRESS_IPv4(&dl_up_tnl0->transportLayerAddress, drb_p->up_dl_tnl[0].tl_address);
OCTET_STRING_TO_UINT32(&dl_up_tnl0->gTP_TEID, drb_p->up_dl_tnl[0].teid); OCTET_STRING_TO_UINT32(&dl_up_tnl0->gTP_TEID, drb_p->up_dl_tnl[0].teid);
GtpuUpdateTunnelOutgoingAddressAndTeid(getCxt(CUtype, instance)->gtpInst, GtpuUpdateTunnelOutgoingAddressAndTeid(getCxt(instance)->gtpInst,
f1ap_ue_context_modification_resp->gNB_CU_ue_id, f1ap_ue_context_modification_resp->gNB_CU_ue_id,
(ebi_t)drbs_setupmod_item_p->dRBID, (ebi_t)drbs_setupmod_item_p->dRBID,
drb_p->up_dl_tnl[0].tl_address, drb_p->up_dl_tnl[0].tl_address,
...@@ -1694,14 +1687,12 @@ int CU_handle_UE_CONTEXT_MODIFICATION_RESPONSE(instance_t instance, ...@@ -1694,14 +1687,12 @@ int CU_handle_UE_CONTEXT_MODIFICATION_RESPONSE(instance_t instance,
return 0; return 0;
} }
int CU_handle_UE_CONTEXT_MODIFICATION_FAILURE(instance_t instance, int CU_handle_UE_CONTEXT_MODIFICATION_FAILURE(instance_t instance, sctp_assoc_t assoc_id, uint32_t stream, F1AP_F1AP_PDU_t *pdu)
uint32_t assoc_id, {
uint32_t stream, AssertFatal(1 == 0, "Not implemented yet\n");
F1AP_F1AP_PDU_t *pdu) {
AssertFatal(1==0,"Not implemented yet\n");
} }
int CU_handle_UE_CONTEXT_MODIFICATION_REQUIRED(instance_t instance, uint32_t assoc_id, uint32_t stream, F1AP_F1AP_PDU_t *pdu) int CU_handle_UE_CONTEXT_MODIFICATION_REQUIRED(instance_t instance, sctp_assoc_t assoc_id, uint32_t stream, F1AP_F1AP_PDU_t *pdu)
{ {
DevAssert(pdu != NULL); DevAssert(pdu != NULL);
...@@ -1892,7 +1883,7 @@ int CU_send_UE_CONTEXT_MODIFICATION_CONFIRM(instance_t instance, f1ap_ue_context ...@@ -1892,7 +1883,7 @@ int CU_send_UE_CONTEXT_MODIFICATION_CONFIRM(instance_t instance, f1ap_ue_context
LOG_E(F1AP, "Failed to encode F1 UE Context Modification Confirm\n"); LOG_E(F1AP, "Failed to encode F1 UE Context Modification Confirm\n");
return -1; return -1;
} }
f1ap_itti_send_sctp_data_req(true, instance, buffer, len, 0); f1ap_itti_send_sctp_data_req(instance, buffer, len);
return 0; return 0;
} }
...@@ -1959,6 +1950,6 @@ int CU_send_UE_CONTEXT_MODIFICATION_REFUSE(instance_t instance, f1ap_ue_context_ ...@@ -1959,6 +1950,6 @@ int CU_send_UE_CONTEXT_MODIFICATION_REFUSE(instance_t instance, f1ap_ue_context_
LOG_E(F1AP, "Failed to encode F1 UE Context Modification Refuse\n"); LOG_E(F1AP, "Failed to encode F1 UE Context Modification Refuse\n");
return -1; return -1;
} }
f1ap_itti_send_sctp_data_req(true, instance, buffer, len, 0); f1ap_itti_send_sctp_data_req(instance, buffer, len);
return 0; return 0;
} }
...@@ -39,24 +39,14 @@ ...@@ -39,24 +39,14 @@
int CU_send_UE_CONTEXT_SETUP_REQUEST(instance_t instance, int CU_send_UE_CONTEXT_SETUP_REQUEST(instance_t instance,
f1ap_ue_context_setup_t *f1ap_ue_context_setup_req); f1ap_ue_context_setup_t *f1ap_ue_context_setup_req);
int CU_handle_UE_CONTEXT_SETUP_RESPONSE(instance_t instance, int CU_handle_UE_CONTEXT_SETUP_RESPONSE(instance_t instance, sctp_assoc_t assoc_id, uint32_t stream, F1AP_F1AP_PDU_t *pdu);
uint32_t assoc_id,
uint32_t stream,
F1AP_F1AP_PDU_t *pdu);
int CU_handle_UE_CONTEXT_SETUP_FAILURE(instance_t instance,
uint32_t assoc_id,
uint32_t stream,
F1AP_F1AP_PDU_t *pdu);
int CU_handle_UE_CONTEXT_SETUP_FAILURE(instance_t instance, sctp_assoc_t assoc_id, uint32_t stream, F1AP_F1AP_PDU_t *pdu);
/* /*
* UE Context Release Request (gNB-DU initiated) * UE Context Release Request (gNB-DU initiated)
*/ */
int CU_handle_UE_CONTEXT_RELEASE_REQUEST(instance_t instance, int CU_handle_UE_CONTEXT_RELEASE_REQUEST(instance_t instance, sctp_assoc_t assoc_id, uint32_t stream, F1AP_F1AP_PDU_t *pdu);
uint32_t assoc_id,
uint32_t stream,
F1AP_F1AP_PDU_t *pdu);
/* /*
* UE Context Release (gNB-CU initiated) * UE Context Release (gNB-CU initiated)
...@@ -64,28 +54,19 @@ int CU_handle_UE_CONTEXT_RELEASE_REQUEST(instance_t instance, ...@@ -64,28 +54,19 @@ int CU_handle_UE_CONTEXT_RELEASE_REQUEST(instance_t instance,
int CU_send_UE_CONTEXT_RELEASE_COMMAND(instance_t instance, int CU_send_UE_CONTEXT_RELEASE_COMMAND(instance_t instance,
f1ap_ue_context_release_cmd_t *cmd); f1ap_ue_context_release_cmd_t *cmd);
int CU_handle_UE_CONTEXT_RELEASE_COMPLETE(instance_t instance, int CU_handle_UE_CONTEXT_RELEASE_COMPLETE(instance_t instance, sctp_assoc_t assoc_id, uint32_t stream, F1AP_F1AP_PDU_t *pdu);
uint32_t assoc_id,
uint32_t stream,
F1AP_F1AP_PDU_t *pdu);
/* /*
* UE Context Modification (gNB-CU initiated) * UE Context Modification (gNB-CU initiated)
*/ */
int CU_send_UE_CONTEXT_MODIFICATION_REQUEST(instance_t instance, f1ap_ue_context_modif_req_t *f1ap_ue_context_modification_req); int CU_send_UE_CONTEXT_MODIFICATION_REQUEST(instance_t instance, f1ap_ue_context_modif_req_t *f1ap_ue_context_modification_req);
int CU_handle_UE_CONTEXT_MODIFICATION_RESPONSE(instance_t instance, int CU_handle_UE_CONTEXT_MODIFICATION_RESPONSE(instance_t instance, sctp_assoc_t assoc_id, uint32_t stream, F1AP_F1AP_PDU_t *pdu);
uint32_t assoc_id, int CU_handle_UE_CONTEXT_MODIFICATION_FAILURE(instance_t instance, sctp_assoc_t assoc_id, uint32_t stream, F1AP_F1AP_PDU_t *pdu);
uint32_t stream,
F1AP_F1AP_PDU_t *pdu);
int CU_handle_UE_CONTEXT_MODIFICATION_FAILURE(instance_t instance,
uint32_t assoc_id,
uint32_t stream,
F1AP_F1AP_PDU_t *pdu);
/* /*
* UE Context Modification Required (gNB-DU initiated) * UE Context Modification Required (gNB-DU initiated)
*/ */
int CU_handle_UE_CONTEXT_MODIFICATION_REQUIRED(instance_t instance, uint32_t assoc_id, uint32_t stream, F1AP_F1AP_PDU_t *pdu); int CU_handle_UE_CONTEXT_MODIFICATION_REQUIRED(instance_t instance, sctp_assoc_t assoc_id, uint32_t stream, F1AP_F1AP_PDU_t *pdu);
int CU_send_UE_CONTEXT_MODIFICATION_CONFIRM(instance_t instance, f1ap_ue_context_modif_confirm_t *confirm); int CU_send_UE_CONTEXT_MODIFICATION_CONFIRM(instance_t instance, f1ap_ue_context_modif_confirm_t *confirm);
......
...@@ -36,41 +36,25 @@ ...@@ -36,41 +36,25 @@
/* /*
* Reset * Reset
*/ */
int DU_handle_RESET(instance_t instance, int DU_handle_RESET(instance_t instance, sctp_assoc_t assoc_id, uint32_t stream, F1AP_F1AP_PDU_t *pdu);
uint32_t assoc_id,
uint32_t stream,
F1AP_F1AP_PDU_t *pdu);
int DU_send_RESET_ACKKNOWLEDGE(instance_t instance, F1AP_ResetAcknowledge_t *ResetAcknowledge); int DU_send_RESET_ACKKNOWLEDGE(instance_t instance, F1AP_ResetAcknowledge_t *ResetAcknowledge);
int DU_send_RESET(instance_t instance, F1AP_Reset_t *Reset); int DU_send_RESET(instance_t instance, F1AP_Reset_t *Reset);
int DU_handle_RESET_ACKNOWLEDGE(instance_t instance, int DU_handle_RESET_ACKNOWLEDGE(instance_t instance, sctp_assoc_t assoc_id, uint32_t stream, F1AP_F1AP_PDU_t *pdu);
uint32_t assoc_id,
uint32_t stream,
F1AP_F1AP_PDU_t *pdu);
/* /*
* Error Indication * Error Indication
*/ */
int DU_send_ERROR_INDICATION(instance_t instance, F1AP_F1AP_PDU_t *pdu_p); int DU_send_ERROR_INDICATION(instance_t instance, F1AP_F1AP_PDU_t *pdu_p);
int DU_handle_ERROR_INDICATION(instance_t instance, int DU_handle_ERROR_INDICATION(instance_t instance, sctp_assoc_t assoc_id, uint32_t stream, F1AP_F1AP_PDU_t *pdu);
uint32_t assoc_id,
uint32_t stream,
F1AP_F1AP_PDU_t *pdu);
/* /*
* F1 Setup * F1 Setup
*/ */
int DU_send_F1_SETUP_REQUEST(instance_t instance); int DU_send_F1_SETUP_REQUEST(instance_t instance, f1ap_setup_req_t *setup_req);
int DU_handle_F1_SETUP_RESPONSE(instance_t instance, int DU_handle_F1_SETUP_RESPONSE(instance_t instance, sctp_assoc_t assoc_id, uint32_t stream, F1AP_F1AP_PDU_t *pdu);
uint32_t assoc_id,
uint32_t stream,
F1AP_F1AP_PDU_t *pdu);
int DU_handle_F1_SETUP_FAILURE(instance_t instance, int DU_handle_F1_SETUP_FAILURE(instance_t instance, sctp_assoc_t assoc_id, uint32_t stream, F1AP_F1AP_PDU_t *pdu);
uint32_t assoc_id,
uint32_t stream,
F1AP_F1AP_PDU_t *pdu);
/* /*
* gNB-DU Configuration Update * gNB-DU Configuration Update
...@@ -79,23 +63,17 @@ int DU_send_gNB_DU_CONFIGURATION_UPDATE(instance_t instance, ...@@ -79,23 +63,17 @@ int DU_send_gNB_DU_CONFIGURATION_UPDATE(instance_t instance,
instance_t du_mod_idP, instance_t du_mod_idP,
f1ap_setup_req_t *f1ap_du_data); f1ap_setup_req_t *f1ap_du_data);
int DU_handle_gNB_DU_CONFIGURATION_FAILURE(instance_t instance, int DU_handle_gNB_DU_CONFIGURATION_FAILURE(instance_t instance, sctp_assoc_t assoc_id, uint32_t stream, F1AP_F1AP_PDU_t *pdu);
uint32_t assoc_id,
uint32_t stream,
F1AP_F1AP_PDU_t *pdu);
int DU_handle_gNB_DU_CONFIGURATION_UPDATE_ACKNOWLEDGE(instance_t instance, int DU_handle_gNB_DU_CONFIGURATION_UPDATE_ACKNOWLEDGE(instance_t instance,
uint32_t assoc_id, sctp_assoc_t assoc_id,
uint32_t stream, uint32_t stream,
F1AP_F1AP_PDU_t *pdu); F1AP_F1AP_PDU_t *pdu);
/* /*
* gNB-CU Configuration Update * gNB-CU Configuration Update
*/ */
int DU_handle_gNB_CU_CONFIGURATION_UPDATE(instance_t instance, int DU_handle_gNB_CU_CONFIGURATION_UPDATE(instance_t instance, sctp_assoc_t assoc_id, uint32_t stream, F1AP_F1AP_PDU_t *pdu);
uint32_t assoc_id,
uint32_t stream,
F1AP_F1AP_PDU_t *pdu);
int DU_send_gNB_CU_CONFIGURATION_UPDATE_FAILURE(instance_t instance, int DU_send_gNB_CU_CONFIGURATION_UPDATE_FAILURE(instance_t instance,
f1ap_gnb_cu_configuration_update_failure_t *GNBCUConfigurationUpdateFailure); f1ap_gnb_cu_configuration_update_failure_t *GNBCUConfigurationUpdateFailure);
...@@ -112,8 +90,8 @@ int DU_send_gNB_DU_RESOURCE_COORDINATION_REQUEST(instance_t instance, ...@@ -112,8 +90,8 @@ int DU_send_gNB_DU_RESOURCE_COORDINATION_REQUEST(instance_t instance,
F1AP_GNBDUResourceCoordinationRequest_t *GNBDUResourceCoordinationRequest); F1AP_GNBDUResourceCoordinationRequest_t *GNBDUResourceCoordinationRequest);
int DU_handle_gNB_DU_RESOURCE_COORDINATION_RESPONSE(instance_t instance, int DU_handle_gNB_DU_RESOURCE_COORDINATION_RESPONSE(instance_t instance,
uint32_t assoc_id, sctp_assoc_t assoc_id,
uint32_t stream, uint32_t stream,
F1AP_F1AP_PDU_t *pdu); F1AP_F1AP_PDU_t *pdu);
#endif /* F1AP_DU_INTERFACE_MANAGEMENT_H_ */ #endif /* F1AP_DU_INTERFACE_MANAGEMENT_H_ */
...@@ -35,10 +35,8 @@ ...@@ -35,10 +35,8 @@
#include "oai_asn1.h" #include "oai_asn1.h"
#include "openair2/RRC/LTE/rrc_proto.h" #include "openair2/RRC/LTE/rrc_proto.h"
int DU_handle_Paging(instance_t instance, int DU_handle_Paging(instance_t instance, sctp_assoc_t assoc_id, uint32_t stream, F1AP_F1AP_PDU_t *pdu)
uint32_t assoc_id, {
uint32_t stream,
F1AP_F1AP_PDU_t *pdu) {
F1AP_Paging_t *paging; F1AP_Paging_t *paging;
F1AP_PagingIEs_t *ie; F1AP_PagingIEs_t *ie;
long tmsi; long tmsi;
......
...@@ -33,9 +33,6 @@ ...@@ -33,9 +33,6 @@
#ifndef F1AP_DU_PAGING_H_ #ifndef F1AP_DU_PAGING_H_
#define F1AP_DU_PAGING_H_ #define F1AP_DU_PAGING_H_
int DU_handle_Paging(instance_t instance, int DU_handle_Paging(instance_t instance, sctp_assoc_t assoc_id, uint32_t stream, F1AP_F1AP_PDU_t *pdu);
uint32_t assoc_id,
uint32_t stream,
F1AP_F1AP_PDU_t *pdu);
#endif /* F1AP_DU_PAGING_H_ */ #endif /* F1AP_DU_PAGING_H_ */
...@@ -55,10 +55,8 @@ ...@@ -55,10 +55,8 @@
#include "openair2/LAYER2/NR_MAC_gNB/mac_rrc_dl_handler.h" #include "openair2/LAYER2/NR_MAC_gNB/mac_rrc_dl_handler.h"
/* DL RRC Message Transfer */ /* DL RRC Message Transfer */
int DU_handle_DL_RRC_MESSAGE_TRANSFER(instance_t instance, int DU_handle_DL_RRC_MESSAGE_TRANSFER(instance_t instance, sctp_assoc_t assoc_id, uint32_t stream, F1AP_F1AP_PDU_t *pdu)
uint32_t assoc_id, {
uint32_t stream,
F1AP_F1AP_PDU_t *pdu) {
F1AP_DLRRCMessageTransfer_t *container; F1AP_DLRRCMessageTransfer_t *container;
F1AP_DLRRCMessageTransferIEs_t *ie; F1AP_DLRRCMessageTransferIEs_t *ie;
int executeDuplication; int executeDuplication;
...@@ -85,7 +83,7 @@ int DU_handle_DL_RRC_MESSAGE_TRANSFER(instance_t instance, ...@@ -85,7 +83,7 @@ int DU_handle_DL_RRC_MESSAGE_TRANSFER(instance_t instance,
/* strange: it is not named OLD_GNB_DU_UE... */ /* strange: it is not named OLD_GNB_DU_UE... */
old_gNB_DU_ue_id_stack = ie->value.choice.GNB_DU_UE_F1AP_ID_1; old_gNB_DU_ue_id_stack = ie->value.choice.GNB_DU_UE_F1AP_ID_1;
old_gNB_DU_ue_id = &old_gNB_DU_ue_id_stack; old_gNB_DU_ue_id = &old_gNB_DU_ue_id_stack;
gtpv1u_update_ue_id(getCxt(false, instance)->gtpInst, old_gNB_DU_ue_id_stack, du_ue_f1ap_id); gtpv1u_update_ue_id(getCxt(instance)->gtpInst, old_gNB_DU_ue_id_stack, du_ue_f1ap_id);
} }
/* mandatory */ /* mandatory */
...@@ -172,7 +170,7 @@ int DU_send_INITIAL_UL_RRC_MESSAGE_TRANSFER(instance_t instanceP, const f1ap_ini ...@@ -172,7 +170,7 @@ int DU_send_INITIAL_UL_RRC_MESSAGE_TRANSFER(instance_t instanceP, const f1ap_ini
ie2->criticality = F1AP_Criticality_reject; ie2->criticality = F1AP_Criticality_reject;
ie2->value.present = F1AP_InitialULRRCMessageTransferIEs__value_PR_NRCGI; ie2->value.present = F1AP_InitialULRRCMessageTransferIEs__value_PR_NRCGI;
//Fixme: takes always the first cell //Fixme: takes always the first cell
addnRCGI(ie2->value.choice.NRCGI, getCxt(DUtype, instanceP)->setupReq.cell); addnRCGI(ie2->value.choice.NRCGI, &getCxt(instanceP)->setupReq.cell[0].info);
/* mandatory */ /* mandatory */
/* c3. C_RNTI */ // 16 /* c3. C_RNTI */ // 16
asn1cSequenceAdd(out->protocolIEs.list, F1AP_InitialULRRCMessageTransferIEs_t, ie3); asn1cSequenceAdd(out->protocolIEs.list, F1AP_InitialULRRCMessageTransferIEs_t, ie3);
...@@ -213,7 +211,7 @@ int DU_send_INITIAL_UL_RRC_MESSAGE_TRANSFER(instance_t instanceP, const f1ap_ini ...@@ -213,7 +211,7 @@ int DU_send_INITIAL_UL_RRC_MESSAGE_TRANSFER(instance_t instanceP, const f1ap_ini
return -1; return -1;
} }
f1ap_itti_send_sctp_data_req(false, instanceP, buffer, len, getCxt(DUtype, instanceP)->default_sctp_stream_id); f1ap_itti_send_sctp_data_req(instanceP, buffer, len);
return 0; return 0;
} }
...@@ -279,6 +277,6 @@ int DU_send_UL_NR_RRC_MESSAGE_TRANSFER(instance_t instance, const f1ap_ul_rrc_me ...@@ -279,6 +277,6 @@ int DU_send_UL_NR_RRC_MESSAGE_TRANSFER(instance_t instance, const f1ap_ul_rrc_me
return -1; return -1;
} }
f1ap_itti_send_sctp_data_req(false, instance, buffer, len, getCxt(DUtype, instance)->default_sctp_stream_id); f1ap_itti_send_sctp_data_req(instance, buffer, len);
return 0; return 0;
} }
...@@ -36,10 +36,7 @@ ...@@ -36,10 +36,7 @@
#include "f1ap_common.h" #include "f1ap_common.h"
int DU_handle_DL_RRC_MESSAGE_TRANSFER(instance_t instance, int DU_handle_DL_RRC_MESSAGE_TRANSFER(instance_t instance, sctp_assoc_t assoc_id, uint32_t stream, F1AP_F1AP_PDU_t *pdu);
uint32_t assoc_id,
uint32_t stream,
F1AP_F1AP_PDU_t *pdu);
int DU_send_UL_NR_RRC_MESSAGE_TRANSFER(instance_t instance, const f1ap_ul_rrc_message_t *msg); int DU_send_UL_NR_RRC_MESSAGE_TRANSFER(instance_t instance, const f1ap_ul_rrc_message_t *msg);
......
...@@ -40,8 +40,9 @@ ...@@ -40,8 +40,9 @@
//Fixme: Uniq dirty DU instance, by global var, datamodel need better management //Fixme: Uniq dirty DU instance, by global var, datamodel need better management
instance_t DUuniqInstance=0; instance_t DUuniqInstance=0;
void du_task_send_sctp_association_req(instance_t instance, f1ap_setup_req_t *f1ap_setup_req) { void du_task_send_sctp_association_req(instance_t instance, f1ap_net_config_t *nc)
DevAssert(f1ap_setup_req != NULL); {
DevAssert(nc != NULL);
MessageDef *message_p = NULL; MessageDef *message_p = NULL;
sctp_new_association_req_t *sctp_new_association_req_p = NULL; sctp_new_association_req_t *sctp_new_association_req_p = NULL;
message_p = itti_alloc_new_message(TASK_DU_F1, 0, SCTP_NEW_ASSOCIATION_REQ); message_p = itti_alloc_new_message(TASK_DU_F1, 0, SCTP_NEW_ASSOCIATION_REQ);
...@@ -49,42 +50,37 @@ void du_task_send_sctp_association_req(instance_t instance, f1ap_setup_req_t *f1 ...@@ -49,42 +50,37 @@ void du_task_send_sctp_association_req(instance_t instance, f1ap_setup_req_t *f1
sctp_new_association_req_p->ulp_cnx_id = instance; sctp_new_association_req_p->ulp_cnx_id = instance;
sctp_new_association_req_p->port = F1AP_PORT_NUMBER; sctp_new_association_req_p->port = F1AP_PORT_NUMBER;
sctp_new_association_req_p->ppid = F1AP_SCTP_PPID; sctp_new_association_req_p->ppid = F1AP_SCTP_PPID;
sctp_new_association_req_p->in_streams = f1ap_setup_req->sctp_in_streams; sctp_new_association_req_p->in_streams = 2; //du_inst->sctp_in_streams;
sctp_new_association_req_p->out_streams = f1ap_setup_req->sctp_out_streams; sctp_new_association_req_p->out_streams = 2; //du_inst->sctp_out_streams;
// remote // remote
memcpy(&sctp_new_association_req_p->remote_address, memcpy(&sctp_new_association_req_p->remote_address, &nc->CU_f1_ip_address, sizeof(nc->CU_f1_ip_address));
&f1ap_setup_req->CU_f1_ip_address,
sizeof(f1ap_setup_req->CU_f1_ip_address));
// local // local
memcpy(&sctp_new_association_req_p->local_address, memcpy(&sctp_new_association_req_p->local_address, &nc->DU_f1_ip_address, sizeof(nc->DU_f1_ip_address));
&f1ap_setup_req->DU_f1_ip_address, // du_f1ap_register_to_sctp
sizeof(f1ap_setup_req->DU_f1_ip_address));
//printf("sib itti message %s\n", f1ap_setup_req_t->sib1[0]);
//printf("nr_cellid : %llx (%lld)",f1ap_setup_req->nr_cellid[0],f1ap_setup_req->nr_cellid[0]);
//du_f1ap_register_to_sctp
itti_send_msg_to_task(TASK_SCTP, instance, message_p); itti_send_msg_to_task(TASK_SCTP, instance, message_p);
} }
void du_task_handle_sctp_association_resp(instance_t instance, sctp_new_association_resp_t *sctp_new_association_resp) { void du_task_handle_sctp_association_resp(instance_t instance, sctp_new_association_resp_t *sctp_new_association_resp) {
DevAssert(sctp_new_association_resp != NULL); DevAssert(sctp_new_association_resp != NULL);
f1ap_cudu_inst_t *f1ap_du_data = getCxt(instance);
DevAssert(f1ap_du_data != NULL);
if (sctp_new_association_resp->sctp_state != SCTP_STATE_ESTABLISHED) { if (sctp_new_association_resp->sctp_state != SCTP_STATE_ESTABLISHED) {
LOG_W(F1AP, "Received unsuccessful result for SCTP association (%u), instance %ld, cnx_id %u\n", LOG_W(F1AP, "Received unsuccessful result for SCTP association (%u), instance %ld, cnx_id %u, retrying...\n",
sctp_new_association_resp->sctp_state, sctp_new_association_resp->sctp_state,
instance, instance,
sctp_new_association_resp->ulp_cnx_id); sctp_new_association_resp->ulp_cnx_id);
//f1ap_handle_setup_message(instance, sctp_new_association_resp->sctp_state == SCTP_STATE_SHUTDOWN); sleep(3);
du_task_send_sctp_association_req(instance, &f1ap_du_data->net_config);
return; // exit -1 for debugging return; // exit -1 for debugging
} }
// save the assoc id // save the assoc id
f1ap_setup_req_t *f1ap_du_data=f1ap_req(false, instance);
f1ap_du_data->assoc_id = sctp_new_association_resp->assoc_id; f1ap_du_data->assoc_id = sctp_new_association_resp->assoc_id;
f1ap_du_data->sctp_in_streams = sctp_new_association_resp->in_streams; f1ap_du_data->sctp_in_streams = sctp_new_association_resp->in_streams;
f1ap_du_data->sctp_out_streams = sctp_new_association_resp->out_streams; f1ap_du_data->sctp_out_streams = sctp_new_association_resp->out_streams;
f1ap_du_data->default_sctp_stream_id = 0;
/* setup parameters for F1U and start the server */ /* setup parameters for F1U and start the server */
DU_send_F1_SETUP_REQUEST(instance); DU_send_F1_SETUP_REQUEST(instance, &f1ap_du_data->setupReq);
} }
void du_task_handle_sctp_data_ind(instance_t instance, sctp_data_ind_t *sctp_data_ind) { void du_task_handle_sctp_data_ind(instance_t instance, sctp_data_ind_t *sctp_data_ind) {
...@@ -109,14 +105,19 @@ void *F1AP_DU_task(void *arg) { ...@@ -109,14 +105,19 @@ void *F1AP_DU_task(void *arg) {
LOG_D(F1AP, "DU Task Received %s for instance %ld\n", LOG_D(F1AP, "DU Task Received %s for instance %ld\n",
ITTI_MSG_NAME(msg),myInstance); ITTI_MSG_NAME(msg),myInstance);
switch (ITTI_MSG_ID(msg)) { switch (ITTI_MSG_ID(msg)) {
case F1AP_SETUP_REQ: { case F1AP_SETUP_REQ:
AssertFatal(false, "the F1AP_SETUP_REQ should not be received; use the F1AP_DU_REGISTER_REQ instead\n");
break;
case F1AP_DU_REGISTER_REQ: {
// this is not a true F1 message, but rather an ITTI message sent by gnb_app // this is not a true F1 message, but rather an ITTI message sent by gnb_app
// 1. save the itti msg so that you can use it to sen f1ap_setup_req, fill the f1ap_setup_req message, // 1. save the itti msg so that you can use it to sen f1ap_setup_req, fill the f1ap_setup_req message,
// 2. store the message in f1ap context, that is also stored in RC // 2. store the message in f1ap context, that is also stored in RC
// 2. send a sctp_association req // 2. send a sctp_association req
f1ap_setup_req_t *msgSetup = &F1AP_SETUP_REQ(msg); f1ap_setup_req_t *msgSetup = &F1AP_DU_REGISTER_REQ(msg).setup_req;
createF1inst(false, myInstance, msgSetup); f1ap_net_config_t *nc = &F1AP_DU_REGISTER_REQ(msg).net_config;
du_task_send_sctp_association_req(myInstance, msgSetup); createF1inst(myInstance, msgSetup, nc);
du_task_send_sctp_association_req(myInstance, nc);
} break; } break;
case F1AP_GNB_CU_CONFIGURATION_UPDATE_ACKNOWLEDGE: case F1AP_GNB_CU_CONFIGURATION_UPDATE_ACKNOWLEDGE:
......
...@@ -22,7 +22,8 @@ ...@@ -22,7 +22,8 @@
#ifndef F1AP_DU_TASK_H_ #ifndef F1AP_DU_TASK_H_
#define F1AP_DU_TASK_H_ #define F1AP_DU_TASK_H_
void du_task_send_sctp_association_req(instance_t instance, f1ap_setup_req_t *f1ap_setup_req); struct f1ap_net_config_t;
void du_task_send_sctp_association_req(instance_t instance, struct f1ap_net_config_t *du_inst);
void du_task_handle_sctp_association_resp(instance_t instance, sctp_new_association_resp_t *sctp_new_association_resp); void du_task_handle_sctp_association_resp(instance_t instance, sctp_new_association_resp_t *sctp_new_association_resp);
void du_task_handle_sctp_data_ind(instance_t instance, sctp_data_ind_t *sctp_data_ind); void du_task_handle_sctp_data_ind(instance_t instance, sctp_data_ind_t *sctp_data_ind);
void *F1AP_DU_task(void *arg); void *F1AP_DU_task(void *arg);
......
...@@ -38,10 +38,7 @@ ...@@ -38,10 +38,7 @@
*/ */
int DU_send_UE_CONTEXT_SETUP_RESPONSE(instance_t instance, f1ap_ue_context_setup_t *req); int DU_send_UE_CONTEXT_SETUP_RESPONSE(instance_t instance, f1ap_ue_context_setup_t *req);
int DU_handle_UE_CONTEXT_SETUP_REQUEST(instance_t instance, int DU_handle_UE_CONTEXT_SETUP_REQUEST(instance_t instance, sctp_assoc_t assoc_id, uint32_t stream, F1AP_F1AP_PDU_t *pdu);
uint32_t assoc_id,
uint32_t stream,
F1AP_F1AP_PDU_t *pdu);
int DU_send_UE_CONTEXT_SETUP_FAILURE(instance_t instance); int DU_send_UE_CONTEXT_SETUP_FAILURE(instance_t instance);
...@@ -55,10 +52,7 @@ int DU_send_UE_CONTEXT_RELEASE_REQUEST(instance_t instance, ...@@ -55,10 +52,7 @@ int DU_send_UE_CONTEXT_RELEASE_REQUEST(instance_t instance,
/* /*
* UE Context Release Command (gNB-CU initiated) * UE Context Release Command (gNB-CU initiated)
*/ */
int DU_handle_UE_CONTEXT_RELEASE_COMMAND(instance_t instance, int DU_handle_UE_CONTEXT_RELEASE_COMMAND(instance_t instance, sctp_assoc_t assoc_id, uint32_t stream, F1AP_F1AP_PDU_t *pdu);
uint32_t assoc_id,
uint32_t stream,
F1AP_F1AP_PDU_t *pdu);
/* /*
* UE Context Release Complete (gNB-DU initiated) * UE Context Release Complete (gNB-DU initiated)
...@@ -68,10 +62,7 @@ int DU_send_UE_CONTEXT_RELEASE_COMPLETE(instance_t instance, f1ap_ue_context_rel ...@@ -68,10 +62,7 @@ int DU_send_UE_CONTEXT_RELEASE_COMPLETE(instance_t instance, f1ap_ue_context_rel
/* /*
* UE Context Modification (gNB-CU initiated) * UE Context Modification (gNB-CU initiated)
*/ */
int DU_handle_UE_CONTEXT_MODIFICATION_REQUEST(instance_t instance, int DU_handle_UE_CONTEXT_MODIFICATION_REQUEST(instance_t instance, sctp_assoc_t assoc_id, uint32_t stream, F1AP_F1AP_PDU_t *pdu);
uint32_t assoc_id,
uint32_t stream,
F1AP_F1AP_PDU_t *pdu);
int DU_send_UE_CONTEXT_MODIFICATION_RESPONSE(instance_t instance, f1ap_ue_context_modif_resp_t *resp); int DU_send_UE_CONTEXT_MODIFICATION_RESPONSE(instance_t instance, f1ap_ue_context_modif_resp_t *resp);
int DU_send_UE_CONTEXT_MODIFICATION_FAILURE(instance_t instance); int DU_send_UE_CONTEXT_MODIFICATION_FAILURE(instance_t instance);
...@@ -80,10 +71,8 @@ int DU_send_UE_CONTEXT_MODIFICATION_FAILURE(instance_t instance); ...@@ -80,10 +71,8 @@ int DU_send_UE_CONTEXT_MODIFICATION_FAILURE(instance_t instance);
* UE Context Modification Required (gNB-DU initiated) * UE Context Modification Required (gNB-DU initiated)
*/ */
int DU_send_UE_CONTEXT_MODIFICATION_REQUIRED(instance_t instance, f1ap_ue_context_modif_required_t *required); int DU_send_UE_CONTEXT_MODIFICATION_REQUIRED(instance_t instance, f1ap_ue_context_modif_required_t *required);
int DU_handle_UE_CONTEXT_MODIFICATION_CONFIRM(instance_t instance, sctp_assoc_t assoc_id, uint32_t stream, F1AP_F1AP_PDU_t *pdu);
int DU_handle_UE_CONTEXT_MODIFICATION_CONFIRM(instance_t instance, uint32_t assoc_id, uint32_t stream, F1AP_F1AP_PDU_t *pdu); int DU_handle_UE_CONTEXT_MODIFICATION_REFUSE(instance_t instance, sctp_assoc_t assoc_id, uint32_t stream, F1AP_F1AP_PDU_t *pdu);
int DU_handle_UE_CONTEXT_MODIFICATION_REFUSE(instance_t instance, uint32_t assoc_id, uint32_t stream, F1AP_F1AP_PDU_t *pdu);
/* /*
* UE Inactivity Notification * UE Inactivity Notification
......
...@@ -97,7 +97,7 @@ static F1AP_F1AP_PDU_t *f1ap_decode_pdu(const uint8_t *const buffer, uint32_t le ...@@ -97,7 +97,7 @@ static F1AP_F1AP_PDU_t *f1ap_decode_pdu(const uint8_t *const buffer, uint32_t le
} }
int f1ap_handle_message(instance_t instance, int f1ap_handle_message(instance_t instance,
uint32_t assoc_id, sctp_assoc_t assoc_id,
int32_t stream, int32_t stream,
const uint8_t *const data, const uint8_t *const data,
const uint32_t data_length) const uint32_t data_length)
......
...@@ -22,26 +22,27 @@ ...@@ -22,26 +22,27 @@
#include "f1ap_common.h" #include "f1ap_common.h"
#include "f1ap_itti_messaging.h" #include "f1ap_itti_messaging.h"
void f1ap_itti_send_sctp_data_req(bool isCu, instance_t instance, uint8_t *buffer, void f1ap_itti_send_sctp_data_req(instance_t instance, uint8_t *buffer, uint32_t buffer_length)
uint32_t buffer_length, uint16_t stream) { {
MessageDef *message_p; MessageDef *message_p;
sctp_data_req_t *sctp_data_req; sctp_data_req_t *sctp_data_req;
message_p = itti_alloc_new_message(isCu?TASK_CU_F1:TASK_DU_F1, 0, SCTP_DATA_REQ); message_p = itti_alloc_new_message(TASK_CU_F1, 0, SCTP_DATA_REQ);
sctp_data_req = &message_p->ittiMsg.sctp_data_req; sctp_data_req = &message_p->ittiMsg.sctp_data_req;
sctp_data_req->assoc_id = f1ap_assoc_id(isCu,instance); sctp_data_req->assoc_id = getCxt(instance)->assoc_id;
sctp_data_req->buffer = buffer; sctp_data_req->buffer = buffer;
sctp_data_req->buffer_length = buffer_length; sctp_data_req->buffer_length = buffer_length;
sctp_data_req->stream = stream; sctp_data_req->stream = 0;
LOG_D(F1AP, "Sending ITTI message to SCTP Task\n"); LOG_D(F1AP, "Sending ITTI message to SCTP Task\n");
itti_send_msg_to_task(TASK_SCTP, instance, message_p); itti_send_msg_to_task(TASK_SCTP, instance, message_p);
} }
void f1ap_itti_send_sctp_close_association(bool isCu, instance_t instance) { void f1ap_itti_send_sctp_close_association(instance_t instance)
{
MessageDef *message_p = NULL; MessageDef *message_p = NULL;
sctp_close_association_t *sctp_close_association_p = NULL; sctp_close_association_t *sctp_close_association_p = NULL;
message_p = itti_alloc_new_message(TASK_S1AP, 0, SCTP_CLOSE_ASSOCIATION); message_p = itti_alloc_new_message(TASK_S1AP, 0, SCTP_CLOSE_ASSOCIATION);
sctp_close_association_p = &message_p->ittiMsg.sctp_close_association; sctp_close_association_p = &message_p->ittiMsg.sctp_close_association;
sctp_close_association_p->assoc_id = f1ap_assoc_id(isCu,instance); sctp_close_association_p->assoc_id = getCxt(instance)->assoc_id;
itti_send_msg_to_task(TASK_SCTP, instance, message_p); itti_send_msg_to_task(TASK_SCTP, instance, message_p);
} }
...@@ -22,7 +22,6 @@ ...@@ -22,7 +22,6 @@
#ifndef F1AP_ITTI_MESSAGING_H_ #ifndef F1AP_ITTI_MESSAGING_H_
#define F1AP_ITTI_MESSAGING_H_ #define F1AP_ITTI_MESSAGING_H_
void f1ap_itti_send_sctp_data_req(bool isCu,instance_t instance, uint8_t *buffer, void f1ap_itti_send_sctp_data_req(instance_t instance, uint8_t *buffer, uint32_t buffer_length);
uint32_t buffer_length, uint16_t stream);
#endif /* F1AP_ITTI_MESSAGING_H_ */ #endif /* F1AP_ITTI_MESSAGING_H_ */
...@@ -52,31 +52,14 @@ ...@@ -52,31 +52,14 @@
#include "openair2/LAYER2/nr_pdcp/nr_pdcp_oai_api.h" #include "openair2/LAYER2/nr_pdcp/nr_pdcp_oai_api.h"
#include "openair2/E1AP/e1ap.h" #include "openair2/E1AP/e1ap.h"
#include "gnb_config.h" #include "gnb_config.h"
#include "openair2/LAYER2/NR_MAC_gNB/mac_proto.h"
extern unsigned char NB_gNB_INST; extern unsigned char NB_gNB_INST;
extern RAN_CONTEXT_t RC; extern RAN_CONTEXT_t RC;
#define GNB_REGISTER_RETRY_DELAY 10 #define GNB_REGISTER_RETRY_DELAY 10
/*------------------------------------------------------------------------------*/
void configure_nr_rrc(uint32_t gnb_id)
{
MessageDef *msg_p = NULL;
// int CC_id;
msg_p = itti_alloc_new_message (TASK_GNB_APP, 0, NRRRC_CONFIGURATION_REQ);
if (RC.nrrrc[gnb_id]) {
RCconfig_NRRRC(msg_p,gnb_id, RC.nrrrc[gnb_id]);
LOG_I(GNB_APP, "RRC starting with node type %d\n", RC.nrrrc[gnb_id]->node_type);
LOG_I(GNB_APP,"Sending configuration message to NR_RRC task\n");
itti_send_msg_to_task (TASK_RRC_GNB, GNB_MODULE_ID_TO_INSTANCE(gnb_id), msg_p);
}
else AssertFatal(0,"NRRRC context for gNB %u not allocated\n",gnb_id);
}
/*------------------------------------------------------------------------------*/ /*------------------------------------------------------------------------------*/
...@@ -179,12 +162,10 @@ void *gNB_app_task(void *args_p) ...@@ -179,12 +162,10 @@ void *gNB_app_task(void *args_p)
LOG_E(F1AP, "Create task for F1AP DU failed\n"); LOG_E(F1AP, "Create task for F1AP DU failed\n");
AssertFatal(1==0,"exiting"); AssertFatal(1==0,"exiting");
} }
// configure F1AP here for F1C }
LOG_I(GNB_APP,"ngran_gNB_DU: Allocating ITTI message for F1AP_SETUP_REQ\n"); if (NODE_IS_DU(node_type) || NODE_IS_MONOLITHIC(node_type)) {
msg_p = itti_alloc_new_message (TASK_GNB_APP, 0, F1AP_SETUP_REQ); // need to check SA?
RCconfig_NR_DU_F1(msg_p, 0); nr_mac_send_f1_setup_req();
itti_send_msg_to_task (TASK_DU_F1, GNB_MODULE_ID_TO_INSTANCE(0), msg_p);
} }
} }
do { do {
...@@ -249,15 +230,9 @@ void *gNB_app_task(void *args_p) ...@@ -249,15 +230,9 @@ void *gNB_app_task(void *args_p)
break; break;
case F1AP_SETUP_RESP: case F1AP_SETUP_RESP:
AssertFatal(NODE_IS_DU(node_type), "Should not have received F1AP_SETUP_RESP in CU/gNB\n"); AssertFatal(false, "Should not received this, logic bug\n");
LOG_I(GNB_APP, "Received %s: associated ngran_gNB_CU %s with %d cells to activate\n", ITTI_MSG_NAME (msg_p),
F1AP_SETUP_RESP(msg_p).gNB_CU_name,F1AP_SETUP_RESP(msg_p).num_cells_to_activate);
cell_to_activate = F1AP_SETUP_RESP(msg_p).num_cells_to_activate;
gNB_app_handle_f1ap_setup_resp(&F1AP_SETUP_RESP(msg_p));
break; break;
case F1AP_GNB_CU_CONFIGURATION_UPDATE: case F1AP_GNB_CU_CONFIGURATION_UPDATE:
AssertFatal(NODE_IS_DU(node_type), "Should not have received F1AP_GNB_CU_CONFIGURATION_UPDATE in CU/gNB\n"); AssertFatal(NODE_IS_DU(node_type), "Should not have received F1AP_GNB_CU_CONFIGURATION_UPDATE in CU/gNB\n");
......
...@@ -33,7 +33,6 @@ ...@@ -33,7 +33,6 @@
#include <stdint.h> #include <stdint.h>
void *gNB_app_task(void *args_p); void *gNB_app_task(void *args_p);
void configure_nr_rrc(uint32_t gnb_id);
uint32_t gNB_app_register(uint32_t gnb_id_start, uint32_t gnb_id_end); uint32_t gNB_app_register(uint32_t gnb_id_start, uint32_t gnb_id_end);
uint32_t gNB_app_register_x2(uint32_t gnb_id_start, uint32_t gnb_id_end); uint32_t gNB_app_register_x2(uint32_t gnb_id_start, uint32_t gnb_id_end);
#endif /* GNB_APP_H_ */ #endif /* GNB_APP_H_ */
This diff is collapsed.
...@@ -91,6 +91,8 @@ typedef struct ru_config_s { ...@@ -91,6 +91,8 @@ typedef struct ru_config_s {
uint8_t if_compress; uint8_t if_compress;
} ru_config_t; } ru_config_t;
*/ */
void RCconfig_verify(ngran_node_t node_type);
extern void NRRCconfig_RU(void); extern void NRRCconfig_RU(void);
extern void RCconfig_nr_prs(void); extern void RCconfig_nr_prs(void);
extern void RCconfig_NR_L1(void); extern void RCconfig_NR_L1(void);
...@@ -100,13 +102,11 @@ extern void NRRCConfig(void); ...@@ -100,13 +102,11 @@ extern void NRRCConfig(void);
//void enb_config_display(void); //void enb_config_display(void);
//void ru_config_display(void); //void ru_config_display(void);
void RCconfig_NRRRC(MessageDef *msg_p, uint32_t i, gNB_RRC_INST *rrc); void RCconfig_NRRRC(gNB_RRC_INST *rrc);
int RCconfig_NR_NG(MessageDef *msg_p, uint32_t i); int RCconfig_NR_NG(MessageDef *msg_p, uint32_t i);
int RCconfig_NR_X2(MessageDef *msg_p, uint32_t i); int RCconfig_NR_X2(MessageDef *msg_p, uint32_t i);
int RCconfig_NR_DU_F1(MessageDef *msg_p, uint32_t i); void wait_f1_setup_response(void);
int gNB_app_handle_f1ap_setup_resp(f1ap_setup_resp_t *resp);
int gNB_app_handle_f1ap_gnb_cu_configuration_update(f1ap_gnb_cu_configuration_update_t *gnb_cu_cfg_update); int gNB_app_handle_f1ap_gnb_cu_configuration_update(f1ap_gnb_cu_configuration_update_t *gnb_cu_cfg_update);
void nr_read_config_and_init(void);
MessageDef *RCconfig_NR_CU_E1(bool separate_CUUP_process); MessageDef *RCconfig_NR_CU_E1(bool separate_CUUP_process);
ngran_node_t get_node_type(void); ngran_node_t get_node_type(void);
......
...@@ -1298,8 +1298,6 @@ typedef struct { ...@@ -1298,8 +1298,6 @@ typedef struct {
/*! \brief top level eNB MAC structure */ /*! \brief top level eNB MAC structure */
typedef struct eNB_MAC_INST_s { typedef struct eNB_MAC_INST_s {
/// Ethernet parameters for northbound midhaul interface
eth_params_t eth_params_n;
/// Ethernet parameters for fronthaul interface /// Ethernet parameters for fronthaul interface
eth_params_t eth_params_s; eth_params_t eth_params_s;
/// ///
...@@ -1662,8 +1660,6 @@ typedef struct { ...@@ -1662,8 +1660,6 @@ typedef struct {
int ra_frame; // This variable keeps the frame in which the RA started for the specific UE. It is used in order int ra_frame; // This variable keeps the frame in which the RA started for the specific UE. It is used in order
// to make sure that different UEs RA starts within a number of frames difference. // to make sure that different UEs RA starts within a number of frames difference.
eth_params_t eth_params_n;
} UE_MAC_INST; } UE_MAC_INST;
typedef struct { typedef struct {
......
...@@ -4105,7 +4105,7 @@ uint32_t get_Y(const NR_SearchSpace_t *ss, int slot, rnti_t rnti) { ...@@ -4105,7 +4105,7 @@ uint32_t get_Y(const NR_SearchSpace_t *ss, int slot, rnti_t rnti) {
void get_type0_PDCCH_CSS_config_parameters(NR_Type0_PDCCH_CSS_config_t *type0_PDCCH_CSS_config, void get_type0_PDCCH_CSS_config_parameters(NR_Type0_PDCCH_CSS_config_t *type0_PDCCH_CSS_config,
frame_t frameP, frame_t frameP,
NR_MIB_t *mib, const NR_MIB_t *mib,
uint8_t num_slot_per_frame, uint8_t num_slot_per_frame,
uint8_t ssb_subcarrier_offset, uint8_t ssb_subcarrier_offset,
uint16_t ssb_start_symbol, uint16_t ssb_start_symbol,
......
...@@ -207,7 +207,7 @@ uint32_t nr_compute_tbslbrm(uint16_t table, ...@@ -207,7 +207,7 @@ uint32_t nr_compute_tbslbrm(uint16_t table,
void get_type0_PDCCH_CSS_config_parameters(NR_Type0_PDCCH_CSS_config_t *type0_PDCCH_CSS_config, void get_type0_PDCCH_CSS_config_parameters(NR_Type0_PDCCH_CSS_config_t *type0_PDCCH_CSS_config,
frame_t frameP, frame_t frameP,
NR_MIB_t *mib, const NR_MIB_t *mib,
uint8_t num_slot_per_frame, uint8_t num_slot_per_frame,
uint8_t ssb_subcarrier_offset, uint8_t ssb_subcarrier_offset,
uint16_t ssb_start_symbol, uint16_t ssb_start_symbol,
......
...@@ -332,6 +332,12 @@ static void config_common(gNB_MAC_INST *nrmac, int pdsch_AntennaPorts, int pusch ...@@ -332,6 +332,12 @@ static void config_common(gNB_MAC_INST *nrmac, int pdsch_AntennaPorts, int pusch
cfg->ssb_table.ssb_subcarrier_offset.value = cfg->ssb_table.ssb_subcarrier_offset.value =
get_ssb_subcarrier_offset(*scc->downlinkConfigCommon->frequencyInfoDL->absoluteFrequencySSB, get_ssb_subcarrier_offset(*scc->downlinkConfigCommon->frequencyInfoDL->absoluteFrequencySSB,
scc->downlinkConfigCommon->frequencyInfoDL->absoluteFrequencyPointA); scc->downlinkConfigCommon->frequencyInfoDL->absoluteFrequencyPointA);
AssertFatal(cfg->ssb_table.ssb_subcarrier_offset.value < 16,
"cannot handle ssb_subcarrier_offset %d resulting from Point A %ld SSB %ld: please increase dl_absoluteFrequencyPointA "
"in the config by 16\n",
cfg->ssb_table.ssb_subcarrier_offset.value,
scc->downlinkConfigCommon->frequencyInfoDL->absoluteFrequencyPointA,
*scc->downlinkConfigCommon->frequencyInfoDL->absoluteFrequencySSB);
cfg->ssb_table.ssb_subcarrier_offset.tl.tag = NFAPI_NR_CONFIG_SSB_SUBCARRIER_OFFSET_TAG; cfg->ssb_table.ssb_subcarrier_offset.tl.tag = NFAPI_NR_CONFIG_SSB_SUBCARRIER_OFFSET_TAG;
cfg->num_tlv++; cfg->num_tlv++;
...@@ -437,48 +443,13 @@ static void config_common(gNB_MAC_INST *nrmac, int pdsch_AntennaPorts, int pusch ...@@ -437,48 +443,13 @@ static void config_common(gNB_MAC_INST *nrmac, int pdsch_AntennaPorts, int pusch
} }
} }
int nr_mac_enable_ue_rrc_processing_timer(module_id_t Mod_idP, rnti_t rnti, NR_SubcarrierSpacing_t subcarrierSpacing, uint32_t rrc_reconfiguration_delay) void nr_mac_config_scc(gNB_MAC_INST *nrmac, NR_ServingCellConfigCommon_t *scc, const nr_mac_config_t *config)
{
if (rrc_reconfiguration_delay == 0) {
return -1;
}
gNB_MAC_INST *nrmac = RC.nrmac[Mod_idP];
NR_SCHED_LOCK(&nrmac->sched_lock);
NR_UE_info_t *UE_info = find_nr_UE(&nrmac->UE_info,rnti);
if (!UE_info) {
LOG_W(NR_MAC, "Could not find UE for RNTI 0x%04x\n", rnti);
NR_SCHED_UNLOCK(&nrmac->sched_lock);
return -1;
}
NR_UE_sched_ctrl_t *sched_ctrl = &UE_info->UE_sched_ctrl;
const uint16_t sl_ahead = nrmac->if_inst->sl_ahead;
sched_ctrl->rrc_processing_timer = (rrc_reconfiguration_delay<<subcarrierSpacing) + sl_ahead;
LOG_I(NR_MAC, "Activating RRC processing timer for UE %04x with %d ms\n", UE_info->rnti, rrc_reconfiguration_delay);
// it might happen that timing advance command should be sent during the RRC
// processing timer. To prevent this, set a variable as if we would have just
// sent it. This way, another TA command will for sure be sent in some
// frames, after RRC processing timer.
sched_ctrl->ta_frame = (nrmac->frame - 1 + 1024) % 1024;
NR_SCHED_UNLOCK(&nrmac->sched_lock);
return 0;
}
void nr_mac_config_scc(gNB_MAC_INST *nrmac,
rrc_pdsch_AntennaPorts_t pdsch_AntennaPorts,
int pusch_AntennaPorts,
int sib1_tda,
int minRXTXTIMEpdsch,
NR_ServingCellConfigCommon_t *scc)
{ {
DevAssert(nrmac != NULL); DevAssert(nrmac != NULL);
AssertFatal(nrmac->common_channels[0].ServingCellConfigCommon == NULL, "logic error: multiple configurations of SCC\n");
NR_SCHED_LOCK(&nrmac->sched_lock);
DevAssert(scc != NULL); DevAssert(scc != NULL);
DevAssert(config != NULL);
//NR_SCHED_LOCK(&nrmac->sched_lock);
AssertFatal(scc->ssb_PositionsInBurst->present > 0 && scc->ssb_PositionsInBurst->present < 4, AssertFatal(scc->ssb_PositionsInBurst->present > 0 && scc->ssb_PositionsInBurst->present < 4,
"SSB Bitmap type %d is not valid\n", "SSB Bitmap type %d is not valid\n",
scc->ssb_PositionsInBurst->present); scc->ssb_PositionsInBurst->present);
...@@ -493,9 +464,8 @@ void nr_mac_config_scc(gNB_MAC_INST *nrmac, ...@@ -493,9 +464,8 @@ void nr_mac_config_scc(gNB_MAC_INST *nrmac,
LOG_I(NR_MAC, "Configuring common parameters from NR ServingCellConfig\n"); LOG_I(NR_MAC, "Configuring common parameters from NR ServingCellConfig\n");
int num_pdsch_antenna_ports = pdsch_AntennaPorts.N1 * pdsch_AntennaPorts.N2 * pdsch_AntennaPorts.XP; int num_pdsch_antenna_ports = config->pdsch_AntennaPorts.N1 * config->pdsch_AntennaPorts.N2 * config->pdsch_AntennaPorts.XP;
nrmac->xp_pdsch_antenna_ports = pdsch_AntennaPorts.XP; config_common(nrmac, num_pdsch_antenna_ports, config->pusch_AntennaPorts, scc);
config_common(nrmac, num_pdsch_antenna_ports, pusch_AntennaPorts, scc);
if (NFAPI_MODE == NFAPI_MODE_PNF || NFAPI_MODE == NFAPI_MODE_VNF) { if (NFAPI_MODE == NFAPI_MODE_PNF || NFAPI_MODE == NFAPI_MODE_VNF) {
// fake that the gNB is configured in nFAPI mode, which would normally be // fake that the gNB is configured in nFAPI mode, which would normally be
...@@ -507,7 +477,6 @@ void nr_mac_config_scc(gNB_MAC_INST *nrmac, ...@@ -507,7 +477,6 @@ void nr_mac_config_scc(gNB_MAC_INST *nrmac,
nrmac->if_inst->NR_PHY_config_req(&phycfg); nrmac->if_inst->NR_PHY_config_req(&phycfg);
} }
nrmac->minRXTXTIMEpdsch = minRXTXTIMEpdsch;
find_SSB_and_RO_available(nrmac); find_SSB_and_RO_available(nrmac);
const NR_TDD_UL_DL_Pattern_t *tdd = scc->tdd_UL_DL_ConfigurationCommon ? &scc->tdd_UL_DL_ConfigurationCommon->pattern1 : NULL; const NR_TDD_UL_DL_Pattern_t *tdd = scc->tdd_UL_DL_ConfigurationCommon ? &scc->tdd_UL_DL_ConfigurationCommon->pattern1 : NULL;
...@@ -528,7 +497,7 @@ void nr_mac_config_scc(gNB_MAC_INST *nrmac, ...@@ -528,7 +497,7 @@ void nr_mac_config_scc(gNB_MAC_INST *nrmac,
nrmac->dlsch_slot_bitmap[slot / 64] |= (uint64_t)((slot % nr_slots_period) < nr_dl_slots) << (slot % 64); nrmac->dlsch_slot_bitmap[slot / 64] |= (uint64_t)((slot % nr_slots_period) < nr_dl_slots) << (slot % 64);
nrmac->ulsch_slot_bitmap[slot / 64] |= (uint64_t)((slot % nr_slots_period) >= nr_ulstart_slot) << (slot % 64); nrmac->ulsch_slot_bitmap[slot / 64] |= (uint64_t)((slot % nr_slots_period) >= nr_ulstart_slot) << (slot % 64);
LOG_I(NR_MAC, LOG_D(NR_MAC,
"slot %d DL %d UL %d\n", "slot %d DL %d UL %d\n",
slot, slot,
(nrmac->dlsch_slot_bitmap[slot / 64] & ((uint64_t)1 << (slot % 64))) != 0, (nrmac->dlsch_slot_bitmap[slot / 64] & ((uint64_t)1 << (slot % 64))) != 0,
...@@ -545,7 +514,6 @@ void nr_mac_config_scc(gNB_MAC_INST *nrmac, ...@@ -545,7 +514,6 @@ void nr_mac_config_scc(gNB_MAC_INST *nrmac,
if (get_softmodem_params()->sa > 0) { if (get_softmodem_params()->sa > 0) {
NR_COMMON_channels_t *cc = &nrmac->common_channels[0]; NR_COMMON_channels_t *cc = &nrmac->common_channels[0];
nrmac->sib1_tda = sib1_tda;
for (int n = 0; n < NR_NB_RA_PROC_MAX; n++) { for (int n = 0; n < NR_NB_RA_PROC_MAX; n++) {
NR_RA_t *ra = &cc->ra[n]; NR_RA_t *ra = &cc->ra[n];
ra->cfra = false; ra->cfra = false;
...@@ -556,31 +524,19 @@ void nr_mac_config_scc(gNB_MAC_INST *nrmac, ...@@ -556,31 +524,19 @@ void nr_mac_config_scc(gNB_MAC_INST *nrmac,
ra->preambles.preamble_list[i] = i; ra->preambles.preamble_list[i] = i;
} }
} }
NR_SCHED_UNLOCK(&nrmac->sched_lock); //NR_SCHED_UNLOCK(&nrmac->sched_lock);
} }
void nr_mac_config_mib(gNB_MAC_INST *nrmac, NR_BCCH_BCH_Message_t *mib) void nr_mac_configure_sib1(gNB_MAC_INST *nrmac, const f1ap_plmn_t *plmn, uint64_t cellID, int tac)
{ {
DevAssert(nrmac != NULL); AssertFatal(get_softmodem_params()->sa > 0, "error: SIB1 only applicable for SA\n");
DevAssert(mib != NULL);
NR_SCHED_LOCK(&nrmac->sched_lock);
NR_COMMON_channels_t *cc = &nrmac->common_channels[0];
AssertFatal(cc->mib == NULL, "logic bug: updated MIB multiple times\n");
cc->mib = mib;
NR_SCHED_UNLOCK(&nrmac->sched_lock);
}
void nr_mac_config_sib1(gNB_MAC_INST *nrmac, NR_BCCH_DL_SCH_Message_t *sib1)
{
DevAssert(nrmac != NULL);
DevAssert(sib1 != NULL);
NR_SCHED_LOCK(&nrmac->sched_lock);
NR_COMMON_channels_t *cc = &nrmac->common_channels[0]; NR_COMMON_channels_t *cc = &nrmac->common_channels[0];
NR_ServingCellConfigCommon_t *scc = cc->ServingCellConfigCommon;
AssertFatal(cc->sib1 == NULL, "logic bug: updated SIB1 multiple times\n"); NR_BCCH_DL_SCH_Message_t *sib1 = get_SIB1_NR(scc, plmn, cellID, tac);
cc->sib1 = sib1; cc->sib1 = sib1;
NR_SCHED_UNLOCK(&nrmac->sched_lock); cc->sib1_bcch_length = encode_SIB1_NR(sib1, cc->sib1_bcch_pdu, sizeof(cc->sib1_bcch_pdu));
AssertFatal(cc->sib1_bcch_length > 0, "could not encode SIB1\n");
} }
bool nr_mac_add_test_ue(gNB_MAC_INST *nrmac, uint32_t rnti, NR_CellGroupConfig_t *CellGroup) bool nr_mac_add_test_ue(gNB_MAC_INST *nrmac, uint32_t rnti, NR_CellGroupConfig_t *CellGroup)
...@@ -640,28 +596,24 @@ bool nr_mac_prepare_ra_ue(gNB_MAC_INST *nrmac, uint32_t rnti, NR_CellGroupConfig ...@@ -640,28 +596,24 @@ bool nr_mac_prepare_ra_ue(gNB_MAC_INST *nrmac, uint32_t rnti, NR_CellGroupConfig
return true; return true;
} }
bool nr_mac_update_cellgroup(gNB_MAC_INST *nrmac, uint32_t rnti, NR_CellGroupConfig_t *CellGroup) /* Prepare a new CellGroupConfig to be applied for this UE. We cannot
* immediatly apply it, as we have to wait for the reconfiguration through RRC.
* This function sets up everything to apply the reconfiguration. Later, we
* will trigger the timer with nr_mac_enable_ue_rrc_processing_timer(); upon
* expiry nr_mac_apply_cellgroup() will apply the CellGroupConfig (radio config
* etc). */
bool nr_mac_prepare_cellgroup_update(gNB_MAC_INST *nrmac, NR_UE_info_t *UE, NR_CellGroupConfig_t *CellGroup)
{ {
DevAssert(nrmac != NULL); DevAssert(nrmac != NULL);
/* we assume that this function is mutex-protected from outside */ DevAssert(UE != NULL);
NR_SCHED_ENSURE_LOCKED(&nrmac->sched_lock);
DevAssert(CellGroup != NULL); DevAssert(CellGroup != NULL);
NR_UE_info_t *UE = find_nr_UE(&nrmac->UE_info, rnti); /* we assume that this function is mutex-protected from outside */
AssertFatal(UE != NULL, "Can't find UE %04x for CellGroup update\n", rnti); NR_SCHED_ENSURE_LOCKED(&nrmac->sched_lock);
/* copy CellGroup by calling asn1c encode this is a temporary hack to avoid the gNB having a pointer to RRC CellGroup structure
* (otherwise it would be applied to early)
* TODO remove once we have a proper implementation */
UE->enc_rval = uper_encode_to_buffer(&asn_DEF_NR_CellGroupConfig, NULL, (void *)CellGroup, UE->cg_buf, 32768);
if (UE->enc_rval.encoded == -1) {
LOG_E(NR_MAC, "ASN1 message CellGroupConfig encoding failed (%s, %lu)!\n", UE->enc_rval.failed_type->name, UE->enc_rval.encoded);
exit(1);
}
process_CellGroup(CellGroup, UE); process_CellGroup(CellGroup, UE);
UE->reconfigCellGroup = CellGroup;
UE->expect_reconfiguration = true;
return true; return true;
} }
...@@ -159,7 +159,7 @@ static int16_t ssb_index_from_prach(module_id_t module_idP, ...@@ -159,7 +159,7 @@ static int16_t ssb_index_from_prach(module_id_t module_idP,
void find_SSB_and_RO_available(gNB_MAC_INST *nrmac) void find_SSB_and_RO_available(gNB_MAC_INST *nrmac)
{ {
/* already mutex protected through nr_mac_config_scc() */ /* already mutex protected through nr_mac_config_scc() */
NR_SCHED_ENSURE_LOCKED(&nrmac->sched_lock); //NR_SCHED_ENSURE_LOCKED(&nrmac->sched_lock);
NR_COMMON_channels_t *cc = &nrmac->common_channels[0]; NR_COMMON_channels_t *cc = &nrmac->common_channels[0];
NR_ServingCellConfigCommon_t *scc = cc->ServingCellConfigCommon; NR_ServingCellConfigCommon_t *scc = cc->ServingCellConfigCommon;
...@@ -1893,14 +1893,9 @@ static void nr_check_Msg4_Ack(module_id_t module_id, int CC_id, frame_t frame, s ...@@ -1893,14 +1893,9 @@ static void nr_check_Msg4_Ack(module_id_t module_id, int CC_id, frame_t frame, s
// Pause scheduling according to: // Pause scheduling according to:
// 3GPP TS 38.331 Section 12 Table 12.1-1: UE performance requirements for RRC procedures for UEs // 3GPP TS 38.331 Section 12 Table 12.1-1: UE performance requirements for RRC procedures for UEs
const NR_ServingCellConfig_t *servingCellConfig = UE->CellGroup && UE->CellGroup->spCellConfig ? UE->CellGroup->spCellConfig->spCellConfigDedicated : NULL; nr_mac_enable_ue_rrc_processing_timer(RC.nrmac[module_id], UE, false);
uint32_t delay_ms = servingCellConfig && servingCellConfig->downlinkBWP_ToAddModList ?
NR_RRC_SETUP_DELAY_MS + NR_RRC_BWP_SWITCHING_DELAY_MS : NR_RRC_SETUP_DELAY_MS;
sched_ctrl->rrc_processing_timer = (delay_ms << ra->DL_BWP.scs);
LOG_I(NR_MAC, "(%d.%d) Activating RRC processing timer for UE %04x with %d ms\n", frame, slot, UE->rnti, delay_ms);
} else { } else {
LOG_I(NR_MAC, "(ue rnti 0x%04x) RA Procedure failed at Msg4!\n", ra->rnti); LOG_I(NR_MAC, "%4d.%2d UE %04x: RA Procedure failed at Msg4!\n", frame, slot, ra->rnti);
} }
nr_clear_ra_proc(module_id, CC_id, frame, ra); nr_clear_ra_proc(module_id, CC_id, frame, ra);
......
...@@ -661,7 +661,8 @@ static void pf_dl(module_id_t module_id, ...@@ -661,7 +661,8 @@ static void pf_dl(module_id_t module_id,
else else
sched_pdsch->mcs = get_mcs_from_bler(bo, stats, &sched_ctrl->dl_bler_stats, max_mcs, frame); sched_pdsch->mcs = get_mcs_from_bler(bo, stats, &sched_ctrl->dl_bler_stats, max_mcs, frame);
sched_pdsch->nrOfLayers = get_dl_nrOfLayers(sched_ctrl, current_BWP->dci_format); sched_pdsch->nrOfLayers = get_dl_nrOfLayers(sched_ctrl, current_BWP->dci_format);
sched_pdsch->pm_index = mac->identity_pm ? 0 : get_pm_index(UE, sched_pdsch->nrOfLayers, mac->xp_pdsch_antenna_ports); sched_pdsch->pm_index =
mac->identity_pm ? 0 : get_pm_index(UE, sched_pdsch->nrOfLayers, mac->radio_config.pdsch_AntennaPorts.XP);
const uint8_t Qm = nr_get_Qm_dl(sched_pdsch->mcs, current_BWP->mcsTableIdx); const uint8_t Qm = nr_get_Qm_dl(sched_pdsch->mcs, current_BWP->mcsTableIdx);
const uint16_t R = nr_get_code_rate_dl(sched_pdsch->mcs, current_BWP->mcsTableIdx); const uint16_t R = nr_get_code_rate_dl(sched_pdsch->mcs, current_BWP->mcsTableIdx);
uint32_t tbs = nr_compute_tbs(Qm, uint32_t tbs = nr_compute_tbs(Qm,
......
...@@ -1209,7 +1209,7 @@ int nr_acknack_scheduling(gNB_MAC_INST *mac, ...@@ -1209,7 +1209,7 @@ int nr_acknack_scheduling(gNB_MAC_INST *mac,
* called often, don't try to lock every time */ * called often, don't try to lock every time */
const int CC_id = 0; const int CC_id = 0;
const int minfbtime = mac->minRXTXTIMEpdsch; const int minfbtime = mac->radio_config.minRXTXTIME;
const NR_ServingCellConfigCommon_t *scc = mac->common_channels[CC_id].ServingCellConfigCommon; const NR_ServingCellConfigCommon_t *scc = mac->common_channels[CC_id].ServingCellConfigCommon;
const NR_UE_UL_BWP_t *ul_bwp = &UE->current_UL_BWP; const NR_UE_UL_BWP_t *ul_bwp = &UE->current_UL_BWP;
const int n_slots_frame = nr_slots_per_frame[ul_bwp->scs]; const int n_slots_frame = nr_slots_per_frame[ul_bwp->scs];
......
This diff is collapsed.
...@@ -25,6 +25,9 @@ ...@@ -25,6 +25,9 @@
#include "platform_types.h" #include "platform_types.h"
#include "f1ap_messages_types.h" #include "f1ap_messages_types.h"
void f1_setup_response(const f1ap_setup_resp_t *resp);
void f1_setup_failure(const f1ap_setup_failure_t *failure);
void ue_context_setup_request(const f1ap_ue_context_setup_t *req); void ue_context_setup_request(const f1ap_ue_context_setup_t *req);
void ue_context_modification_request(const f1ap_ue_context_modif_req_t *req); void ue_context_modification_request(const f1ap_ue_context_modif_req_t *req);
void ue_context_modification_confirm(const f1ap_ue_context_modif_confirm_t *confirm); void ue_context_modification_confirm(const f1ap_ue_context_modif_confirm_t *confirm);
......
...@@ -25,6 +25,8 @@ ...@@ -25,6 +25,8 @@
#include "platform_types.h" #include "platform_types.h"
#include "f1ap_messages_types.h" #include "f1ap_messages_types.h"
typedef void (*f1_setup_request_func_t)(const f1ap_setup_req_t* req);
typedef void (*ue_context_setup_response_func_t)(const f1ap_ue_context_setup_t* req, const f1ap_ue_context_setup_t *resp); typedef void (*ue_context_setup_response_func_t)(const f1ap_ue_context_setup_t* req, const f1ap_ue_context_setup_t *resp);
typedef void (*ue_context_modification_response_func_t)(const f1ap_ue_context_modif_req_t *req, typedef void (*ue_context_modification_response_func_t)(const f1ap_ue_context_modif_req_t *req,
const f1ap_ue_context_modif_resp_t *resp); const f1ap_ue_context_modif_resp_t *resp);
......
This diff is collapsed.
This diff is collapsed.
...@@ -115,7 +115,7 @@ typedef struct m2ap_MCE_data_s { ...@@ -115,7 +115,7 @@ typedef struct m2ap_MCE_data_s {
uint16_t cnx_id; uint16_t cnx_id;
/* SCTP association id */ /* SCTP association id */
int32_t assoc_id; sctp_assoc_t assoc_id;
/* Nid cells */ /* Nid cells */
uint32_t Nid_cell[MAX_NUM_CCs]; uint32_t Nid_cell[MAX_NUM_CCs];
......
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.
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.
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.
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.
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