Merge remote-tracking branch 'origin/int-f1-setup' into integration_2023_w38
This commit is contained in:
@@ -19,7 +19,6 @@ gNBs =
|
||||
|
||||
|
||||
nr_cellid = 12345678L;
|
||||
force_256qam_off = 1;
|
||||
|
||||
tr_s_preference = "f1";
|
||||
|
||||
@@ -30,136 +29,7 @@ gNBs =
|
||||
local_s_portd = 2153;
|
||||
remote_s_portc = 500;
|
||||
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 :
|
||||
{
|
||||
|
||||
@@ -19,7 +19,6 @@ gNBs =
|
||||
|
||||
|
||||
nr_cellid = 12345678L;
|
||||
force_256qam_off = 1;
|
||||
|
||||
tr_s_preference = "f1";
|
||||
|
||||
@@ -30,135 +29,7 @@ gNBs =
|
||||
local_s_portd = 2153;
|
||||
remote_s_portc = 500;
|
||||
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 :
|
||||
{
|
||||
|
||||
@@ -20,7 +20,6 @@ gNBs =
|
||||
|
||||
|
||||
nr_cellid = 12345678L;
|
||||
force_256qam_off = 1;
|
||||
|
||||
tr_s_preference = "f1";
|
||||
|
||||
@@ -31,136 +30,7 @@ gNBs =
|
||||
local_s_portd = 2152;
|
||||
remote_s_portc = 500;
|
||||
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 :
|
||||
{
|
||||
|
||||
@@ -20,7 +20,6 @@ gNBs =
|
||||
|
||||
|
||||
nr_cellid = 12345678L;
|
||||
force_256qam_off = 1;
|
||||
|
||||
tr_s_preference = "f1";
|
||||
|
||||
@@ -31,136 +30,7 @@ gNBs =
|
||||
local_s_portd = 2153;
|
||||
remote_s_portc = 500;
|
||||
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 :
|
||||
{
|
||||
|
||||
@@ -22,7 +22,6 @@ gNBs =
|
||||
////////// Physical parameters:
|
||||
|
||||
min_rxtxtime = 6;
|
||||
force_256qam_off = 1;
|
||||
|
||||
servingCellConfigCommon = (
|
||||
{
|
||||
|
||||
@@ -22,7 +22,6 @@ gNBs =
|
||||
////////// Physical parameters:
|
||||
|
||||
min_rxtxtime = 6;
|
||||
force_256qam_off = 1;
|
||||
|
||||
|
||||
servingCellConfigCommon = (
|
||||
|
||||
@@ -30,7 +30,7 @@ gNBs =
|
||||
absoluteFrequencySSB = 620736;
|
||||
dl_frequencyBand = 78;
|
||||
# this is 3300.30 MHz
|
||||
dl_absoluteFrequencyPointA = 620020;
|
||||
dl_absoluteFrequencyPointA = 620052;
|
||||
#scs-SpecificCarrierList
|
||||
dl_offstToCarrier = 0;
|
||||
# subcarrierSpacing
|
||||
|
||||
+1
-1
@@ -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
|
||||
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
|
||||
advance.
|
||||
|
||||
@@ -106,7 +106,7 @@ void prepare_and_send_ue_context_modification_f1(rrc_gNB_ue_context_t *ue_contex
|
||||
abort();
|
||||
}
|
||||
|
||||
f1ap_cudu_inst_t *getCxt(F1_t isCU, instance_t instanceP)
|
||||
f1ap_cudu_inst_t *getCxt(instance_t instanceP)
|
||||
{
|
||||
abort();
|
||||
return NULL;
|
||||
|
||||
+12
-3
@@ -95,8 +95,8 @@ extern void nr_phy_config_request(NR_PHY_Config_t *gNB);
|
||||
//extern WORKER_CONF_t get_thread_worker_conf(void);
|
||||
|
||||
void init_NR_RU(char *);
|
||||
void start_NR_RU();
|
||||
void stop_RU(int nb_ru);
|
||||
void do_ru_sync(RU_t *ru);
|
||||
|
||||
void configure_ru(int idx, void *arg);
|
||||
void configure_rru(int idx, void *arg);
|
||||
@@ -1398,7 +1398,6 @@ int start_write_thread(RU_t *ru) {
|
||||
void init_RU_proc(RU_t *ru) {
|
||||
int i=0;
|
||||
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;
|
||||
memset((void *)proc,0,sizeof(RU_proc_t));
|
||||
proc->ru = ru;
|
||||
@@ -1413,7 +1412,6 @@ void init_RU_proc(RU_t *ru) {
|
||||
|
||||
pthread_mutex_init( &proc->mutex_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)
|
||||
threadCreate( &proc->pthread_emulateRF, emulatedRF_thread, (void *)proc, "emulateRF", -1, OAI_PRIORITY_RT );
|
||||
@@ -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 );
|
||||
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) {
|
||||
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) {
|
||||
for (int inst = 0; inst < nb_ru; inst++) {
|
||||
|
||||
+18
-11
@@ -289,9 +289,8 @@ void exit_function(const char *file, const char *function, const int line, const
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
static int create_gNB_tasks(void) {
|
||||
static int create_gNB_tasks(ngran_node_t node_type)
|
||||
{
|
||||
uint32_t gnb_nb = RC.nb_nr_inst;
|
||||
uint32_t gnb_id_start = 0;
|
||||
uint32_t gnb_id_end = gnb_id_start + gnb_nb;
|
||||
@@ -299,6 +298,8 @@ static int create_gNB_tasks(void) {
|
||||
itti_wait_ready(1);
|
||||
LOG_I(PHY, "%s() Task ready initialize structures\n", __FUNCTION__);
|
||||
|
||||
RCconfig_verify(node_type);
|
||||
|
||||
RCconfig_NR_L1();
|
||||
RCconfig_nr_prs();
|
||||
|
||||
@@ -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);
|
||||
|
||||
RC.nrrrc = (gNB_RRC_INST **)malloc(RC.nb_nr_inst*sizeof(gNB_RRC_INST *));
|
||||
LOG_I(PHY, "%s() RC.nb_nr_inst:%d RC.nrrrc:%p\n", __FUNCTION__, RC.nb_nr_inst, RC.nrrrc);
|
||||
ngran_node_t node_type = get_node_type();
|
||||
for (int gnb_id = gnb_id_start; (gnb_id < gnb_id_end) ; gnb_id++) {
|
||||
RC.nrrrc[gnb_id] = (gNB_RRC_INST*)calloc(1,sizeof(gNB_RRC_INST));
|
||||
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) {
|
||||
AssertFatal(RC.nb_nr_inst == 1, "multiple RRC instances are not supported\n");
|
||||
RC.nrrrc = calloc(1, sizeof(*RC.nrrrc));
|
||||
RC.nrrrc[0] = calloc(1,sizeof(gNB_RRC_INST));
|
||||
RCconfig_NRRRC(RC.nrrrc[0]);
|
||||
}
|
||||
|
||||
if (RC.nb_nr_inst > 0 &&
|
||||
@@ -635,8 +634,9 @@ int main( int argc, char **argv ) {
|
||||
RCconfig_NR_L1();
|
||||
|
||||
// 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) {
|
||||
int ret = create_gNB_tasks();
|
||||
int ret = create_gNB_tasks(node_type);
|
||||
AssertFatal(ret == 0, "cannot create ITTI tasks\n");
|
||||
}
|
||||
|
||||
@@ -736,6 +736,13 @@ int main( int argc, char **argv ) {
|
||||
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) {
|
||||
printf("wait RUs\n");
|
||||
wait_RUs();
|
||||
|
||||
@@ -54,6 +54,7 @@ extern void kill_gNB_proc(int inst);
|
||||
// In nr-ru.c
|
||||
extern void init_NR_RU(char *);
|
||||
extern void init_RU_proc(RU_t *ru);
|
||||
extern void start_NR_RU(void);
|
||||
extern void stop_RU(int nb_ru);
|
||||
extern void kill_NR_RU_proc(int inst);
|
||||
extern void set_function_spec_param(RU_t *ru);
|
||||
|
||||
@@ -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)
|
||||
return;
|
||||
@@ -622,11 +622,32 @@ int main(int argc, char **argv)
|
||||
frame_parms->N_RB_DL = 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_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);
|
||||
mac_top_init_gNB(ngran_gNB, scc, NULL, &conf);
|
||||
gNB_mac = RC.nrmac[0];
|
||||
|
||||
gNB_mac->dl_bler.harq_round_max = num_rounds;
|
||||
@@ -673,19 +694,9 @@ int main(int argc, char **argv)
|
||||
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));
|
||||
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_N2 = pdsch_AntennaPorts.N2;
|
||||
gNB->ap_XP = pdsch_AntennaPorts.XP;
|
||||
@@ -696,12 +707,6 @@ int main(int argc, char **argv)
|
||||
prepare_sim_uecap(UE_Capability_nr,scc,mu,
|
||||
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);
|
||||
|
||||
/* RRC parameter validation for secondaryCellGroup */
|
||||
@@ -719,11 +724,6 @@ int main(int argc, char **argv)
|
||||
|
||||
//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
|
||||
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
|
||||
|
||||
@@ -608,23 +608,34 @@ int main(int argc, char *argv[])
|
||||
frame_parms->N_RB_UL = N_RB_UL;
|
||||
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_im = malloc(n_tx*sizeof(double*));
|
||||
r_re = 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));;
|
||||
prepare_scc(scc);
|
||||
uint64_t ssb_bitmap;
|
||||
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
|
||||
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));
|
||||
prepare_scd(scd);
|
||||
|
||||
@@ -632,14 +643,6 @@ int main(int argc, char *argv[])
|
||||
prepare_sim_uecap(UE_Capability_nr,scc,mu,
|
||||
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);
|
||||
|
||||
/* RRC parameter validation for secondaryCellGroup */
|
||||
@@ -647,12 +650,6 @@ int main(int argc, char *argv[])
|
||||
|
||||
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
|
||||
nr_mac_add_test_ue(RC.nrmac[0], secondaryCellGroup->spCellConfig->reconfigurationWithSync->newUE_Identity, secondaryCellGroup);
|
||||
frame_parms->nb_antennas_tx = 1;
|
||||
|
||||
@@ -24,6 +24,8 @@
|
||||
#ifndef E1AP_MESSAGES_TYPES_H
|
||||
#define E1AP_MESSAGES_TYPES_H
|
||||
|
||||
#include <netinet/in.h>
|
||||
#include <netinet/sctp.h>
|
||||
#include "common/ngran_types.h"
|
||||
#include "f1ap_messages_types.h"
|
||||
#include "ngap_messages_types.h"
|
||||
@@ -55,7 +57,7 @@ typedef struct PLMN_ID_s {
|
||||
typedef struct e1ap_setup_req_s {
|
||||
uint64_t gNB_cu_up_id;
|
||||
char * gNB_cu_up_name;
|
||||
int assoc_id;
|
||||
sctp_assoc_t assoc_id;
|
||||
uint64_t transac_id;
|
||||
int supported_plmns;
|
||||
PLMN_ID_t plmns[E1AP_MAX_NUM_PLMNS];
|
||||
|
||||
@@ -19,8 +19,8 @@
|
||||
* contact@openairinterface.org
|
||||
*/
|
||||
|
||||
/* F1AP -> SCTP */
|
||||
MESSAGE_DEF(F1AP_CU_SCTP_REQ , MESSAGE_PRIORITY_MED, f1ap_cu_setup_req_t , f1ap_cu_setup_req)
|
||||
/* To setup F1 at DU */
|
||||
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*/
|
||||
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
|
||||
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)
|
||||
|
||||
/* 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 */
|
||||
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)
|
||||
|
||||
@@ -22,6 +22,8 @@
|
||||
#ifndef F1AP_MESSAGES_TYPES_H_
|
||||
#define F1AP_MESSAGES_TYPES_H_
|
||||
|
||||
#include <netinet/in.h>
|
||||
#include <netinet/sctp.h>
|
||||
#include "rlc.h"
|
||||
#include "s1ap_messages_types.h"
|
||||
|
||||
@@ -30,6 +32,8 @@
|
||||
|
||||
#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_RESP(mSGpTR) (mSGpTR)->ittiMsg.f1ap_setup_resp
|
||||
#define F1AP_GNB_CU_CONFIGURATION_UPDATE(mSGpTR) (mSGpTR)->ittiMsg.f1ap_gnb_cu_configuration_update
|
||||
@@ -37,6 +41,8 @@
|
||||
#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_LOST_CONNECTION(mSGpTR) (mSGpTR)->ittiMsg.f1ap_lost_connection
|
||||
|
||||
#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_UE_CONTEXT_SETUP_REQ(mSGpTR) (mSGpTR)->ittiMsg.f1ap_ue_context_setup_req
|
||||
@@ -75,133 +81,96 @@ typedef struct f1ap_net_ip_address_s {
|
||||
char ipv6_address[46];
|
||||
} f1ap_net_ip_address_t;
|
||||
|
||||
typedef struct f1ap_cu_setup_req_s {
|
||||
// This dummy element is to avoid CLANG warning: empty struct has size 0 in C, size 1 in C++
|
||||
// To be removed if the structure is filled
|
||||
uint32_t dummy;
|
||||
} f1ap_cu_setup_req_t;
|
||||
|
||||
typedef struct cellIDs_s {
|
||||
|
||||
// Served Cell Information
|
||||
/* Tracking area code */
|
||||
uint32_t tac;
|
||||
|
||||
/* Mobile Country Codes
|
||||
* Mobile Network Codes
|
||||
*/
|
||||
uint16_t mcc;
|
||||
uint16_t mnc;
|
||||
uint8_t mnc_digit_length;
|
||||
|
||||
// NR Global Cell Id
|
||||
uint64_t nr_cellid;
|
||||
// NR Physical Cell Ids
|
||||
uint16_t nr_pci;
|
||||
// Number of slide support items (max 16, could be increased to as much as 1024)
|
||||
uint16_t num_ssi;
|
||||
uint8_t sst;
|
||||
uint8_t sd;
|
||||
} cellIDs_t;
|
||||
|
||||
typedef struct f1ap_setup_req_s {
|
||||
|
||||
// Midhaul networking parameters
|
||||
|
||||
/* Connexion id used between SCTP/F1AP */
|
||||
uint16_t cnx_id;
|
||||
|
||||
/* SCTP association id */
|
||||
int32_t assoc_id;
|
||||
|
||||
/* The eNB IP address to bind */
|
||||
typedef struct f1ap_net_config_t {
|
||||
f1ap_net_ip_address_t CU_f1_ip_address;
|
||||
f1ap_net_ip_address_t DU_f1_ip_address;
|
||||
uint16_t CUport;
|
||||
uint16_t DUport;
|
||||
} f1ap_net_config_t;
|
||||
|
||||
/* Number of SCTP streams used for a mme association */
|
||||
uint16_t sctp_in_streams;
|
||||
uint16_t sctp_out_streams;
|
||||
typedef struct f1ap_plmn_t {
|
||||
uint16_t mcc;
|
||||
uint16_t mnc;
|
||||
uint8_t mnc_digit_length;
|
||||
} f1ap_plmn_t;
|
||||
|
||||
uint16_t default_sctp_stream_id;
|
||||
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 Physical Cell Ids
|
||||
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)
|
||||
uint16_t num_ssi;
|
||||
uint8_t sst;
|
||||
uint8_t sd;
|
||||
|
||||
f1ap_mode_t mode;
|
||||
union {
|
||||
f1ap_fdd_info_t fdd;
|
||||
f1ap_tdd_info_t tdd;
|
||||
};
|
||||
|
||||
char *measurement_timing_information;
|
||||
} f1ap_served_cell_info_t;
|
||||
|
||||
typedef struct f1ap_gnb_du_system_info_t {
|
||||
uint8_t *mib;
|
||||
int mib_length;
|
||||
uint8_t *sib1;
|
||||
int sib1_length;
|
||||
} f1ap_gnb_du_system_info_t;
|
||||
|
||||
typedef struct f1ap_setup_req_s {
|
||||
|
||||
// F1_Setup_Req payload
|
||||
uint64_t gNB_DU_id;
|
||||
char *gNB_DU_name;
|
||||
|
||||
/* The type of the cell */
|
||||
enum cell_type_e cell_type;
|
||||
|
||||
/// number of DU cells available
|
||||
uint16_t num_cells_available; //0< num_cells_available <= 512;
|
||||
cellIDs_t cell[F1AP_MAX_NB_CELLS];
|
||||
// fdd_flag = 1 means FDD, 0 means TDD
|
||||
int fdd_flag;
|
||||
|
||||
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];
|
||||
|
||||
|
||||
struct {
|
||||
f1ap_served_cell_info_t info;
|
||||
f1ap_gnb_du_system_info_t *sys_info;
|
||||
} cell[F1AP_MAX_NB_CELLS];
|
||||
} 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 {
|
||||
/// mcc of DU cells
|
||||
uint16_t mcc;
|
||||
/// mnc of DU cells
|
||||
uint16_t mnc;
|
||||
/// mnc digit length of DU cells
|
||||
uint8_t mnc_digit_length;
|
||||
f1ap_plmn_t plmn;
|
||||
// NR Global Cell Id
|
||||
uint64_t nr_cellid;
|
||||
/// NRPCI
|
||||
@@ -215,16 +184,6 @@ typedef struct served_cells_to_activate_s {
|
||||
} served_cells_to_activate_t;
|
||||
|
||||
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
|
||||
char *gNB_CU_name;
|
||||
/// number of DU cells to activate
|
||||
@@ -237,7 +196,7 @@ typedef struct f1ap_gnb_cu_configuration_update_s {
|
||||
uint16_t cnx_id;
|
||||
|
||||
/* SCTP association id */
|
||||
int32_t assoc_id;
|
||||
sctp_assoc_t assoc_id;
|
||||
|
||||
/* Number of SCTP streams used for a mme association */
|
||||
uint16_t sctp_in_streams;
|
||||
@@ -258,9 +217,7 @@ typedef struct f1ap_setup_failure_s {
|
||||
|
||||
typedef struct f1ap_gnb_cu_configuration_update_acknowledge_s {
|
||||
uint16_t num_cells_failed_to_be_activated;
|
||||
uint16_t mcc[F1AP_MAX_NB_CELLS];
|
||||
uint16_t mnc[F1AP_MAX_NB_CELLS];
|
||||
uint8_t mnc_digit_length[F1AP_MAX_NB_CELLS];
|
||||
f1ap_plmn_t plmn[F1AP_MAX_NB_CELLS];
|
||||
uint64_t nr_cellid[F1AP_MAX_NB_CELLS];
|
||||
uint16_t cause[F1AP_MAX_NB_CELLS];
|
||||
int have_criticality;
|
||||
@@ -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 noofDedicatedSIDeliveryNeededUEs;
|
||||
uint32_t gNB_CU_ue_id[F1AP_MAX_NO_UE_ID];
|
||||
uint16_t ue_mcc[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];
|
||||
f1ap_plmn_t ue_plmn[F1AP_MAX_NO_UE_ID];
|
||||
uint64_t ue_nr_cellid[F1AP_MAX_NO_UE_ID];
|
||||
} f1ap_gnb_cu_configuration_update_acknowledge_t;
|
||||
|
||||
@@ -303,12 +258,7 @@ typedef struct f1ap_dl_rrc_message_s {
|
||||
|
||||
typedef struct f1ap_initial_ul_rrc_message_s {
|
||||
uint32_t gNB_DU_ue_id;
|
||||
/// mcc of DU cell
|
||||
uint16_t mcc;
|
||||
/// mnc of DU cell
|
||||
uint16_t mnc;
|
||||
/// mnc digit length of DU cells
|
||||
uint8_t mnc_digit_length;
|
||||
f1ap_plmn_t plmn;
|
||||
/// nr cell id
|
||||
uint64_t nr_cellid;
|
||||
/// crnti
|
||||
@@ -384,9 +334,7 @@ typedef struct f1ap_ue_context_setup_s {
|
||||
uint32_t gNB_CU_ue_id;
|
||||
uint32_t gNB_DU_ue_id;
|
||||
// SpCell Info
|
||||
uint16_t mcc;
|
||||
uint16_t mnc;
|
||||
uint8_t mnc_digit_length;
|
||||
f1ap_plmn_t plmn;
|
||||
uint64_t nr_cellid;
|
||||
uint8_t servCellIndex;
|
||||
uint8_t *cellULConfigured;
|
||||
@@ -456,11 +404,13 @@ typedef struct f1ap_paging_ind_s {
|
||||
uint16_t ueidentityindexvalue;
|
||||
uint64_t fiveg_s_tmsi;
|
||||
uint8_t fiveg_s_tmsi_length;
|
||||
uint16_t mcc;
|
||||
uint16_t mnc;
|
||||
uint8_t mnc_digit_length;
|
||||
f1ap_plmn_t plmn;
|
||||
uint64_t nr_cellid;
|
||||
uint8_t paging_drx;
|
||||
} f1ap_paging_ind_t;
|
||||
|
||||
typedef struct f1ap_lost_connection_t {
|
||||
int dummy;
|
||||
} f1ap_lost_connection_t;
|
||||
|
||||
#endif /* F1AP_MESSAGES_TYPES_H_ */
|
||||
|
||||
@@ -23,6 +23,8 @@
|
||||
#ifndef M2AP_MESSAGES_TYPES_H_
|
||||
#define M2AP_MESSAGES_TYPES_H_
|
||||
|
||||
#include <netinet/in.h>
|
||||
#include <netinet/sctp.h>
|
||||
#include "s1ap_messages_types.h"
|
||||
#include "LTE_PhysCellId.h"
|
||||
|
||||
@@ -104,7 +106,7 @@ typedef struct m2ap_setup_req_s {
|
||||
uint16_t cnx_id;
|
||||
|
||||
/* SCTP association id */
|
||||
int32_t assoc_id;
|
||||
sctp_assoc_t assoc_id;
|
||||
|
||||
/* The eNB IP address to bind */
|
||||
m2ap_net_ip_address_t MCE_M2_ip_address;
|
||||
@@ -258,7 +260,7 @@ typedef struct m2ap_setup_resp_s {
|
||||
uint16_t cnx_id;
|
||||
|
||||
/* SCTP association id */
|
||||
int32_t assoc_id;
|
||||
sctp_assoc_t assoc_id;
|
||||
|
||||
/* Number of SCTP streams used for a mme association */
|
||||
uint16_t sctp_in_streams;
|
||||
|
||||
@@ -22,6 +22,8 @@
|
||||
#ifndef M3AP_MESSAGES_TYPES_H_
|
||||
#define M3AP_MESSAGES_TYPES_H_
|
||||
|
||||
#include <netinet/in.h>
|
||||
#include <netinet/sctp.h>
|
||||
#include "s1ap_messages_types.h"
|
||||
#include "LTE_PhysCellId.h"
|
||||
|
||||
@@ -336,7 +338,7 @@ typedef struct m3ap_setup_req_s{
|
||||
/* Connexion id used between SCTP/M3AP */
|
||||
uint16_t cnx_id;
|
||||
/* SCTP association id */
|
||||
int32_t assoc_id;
|
||||
sctp_assoc_t assoc_id;
|
||||
|
||||
/* Number of SCTP streams used for a mme association */
|
||||
uint16_t sctp_in_streams;
|
||||
|
||||
@@ -55,7 +55,6 @@ MESSAGE_DEF(RRC_STATE_IND, MESSAGE_PRIORITY_MED, RrcStateInd,
|
||||
// eNB: ENB_APP -> RRC messages
|
||||
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(NRRRC_CONFIGURATION_REQ, MESSAGE_PRIORITY_MED, gNB_RrcConfigurationReq, nrrrc_configuration_req)
|
||||
|
||||
// UE: NAS -> RRC messages
|
||||
MESSAGE_DEF(NAS_KENB_REFRESH_REQ, MESSAGE_PRIORITY_MED, NasKenbRefreshReq, nas_kenb_refresh_req)
|
||||
|
||||
@@ -69,8 +69,6 @@
|
||||
|
||||
#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_CELL_SELECTION_REQ(mSGpTR) (mSGpTR)->ittiMsg.nas_cell_selection_req
|
||||
#define NAS_CONN_ESTABLI_REQ(mSGpTR) (mSGpTR)->ittiMsg.nas_conn_establi_req
|
||||
@@ -403,12 +401,6 @@ typedef struct NbIoTRrcConfigurationReq_s {
|
||||
long ue_TimersAndConstants_n311_NB;
|
||||
} NbIoTRrcConfigurationReq;
|
||||
|
||||
typedef struct {
|
||||
int N1;
|
||||
int N2;
|
||||
int XP;
|
||||
} rrc_pdsch_AntennaPorts_t;
|
||||
|
||||
// gNB: GNB_APP -> RRC messages
|
||||
typedef struct NRRrcConfigurationReq_s {
|
||||
uint64_t cell_identity;
|
||||
@@ -417,17 +409,7 @@ typedef struct NRRrcConfigurationReq_s {
|
||||
uint16_t mnc[PLMN_LIST_MAX_SIZE];
|
||||
uint8_t mnc_digit_length[PLMN_LIST_MAX_SIZE];
|
||||
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;
|
||||
int drbs;
|
||||
} gNB_RrcConfigurationReq;
|
||||
|
||||
@@ -22,6 +22,8 @@
|
||||
#ifndef S1AP_MESSAGES_TYPES_H_
|
||||
#define S1AP_MESSAGES_TYPES_H_
|
||||
|
||||
#include <netinet/in.h>
|
||||
#include <netinet/sctp.h>
|
||||
#include "LTE_asn_constant.h"
|
||||
//-------------------------------------------------------------------------------------------//
|
||||
// Defines to access message fields.
|
||||
|
||||
@@ -22,6 +22,9 @@
|
||||
#ifndef 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_MULTI(mSGpTR) (mSGpTR)->ittiMsg.sctp_new_association_req_multi
|
||||
#define SCTP_NEW_ASSOCIATION_RESP(mSGpTR) (mSGpTR)->ittiMsg.sctp_new_association_resp
|
||||
@@ -87,7 +90,7 @@ typedef struct sctp_init_msg_multi_cnf_s {
|
||||
|
||||
typedef struct sctp_new_association_ind_s {
|
||||
/* Assoc id of the new association */
|
||||
int32_t assoc_id;
|
||||
sctp_assoc_t assoc_id;
|
||||
|
||||
/* The port used by remote host */
|
||||
uint16_t port;
|
||||
@@ -102,7 +105,7 @@ typedef struct sctp_new_association_resp_s {
|
||||
uint16_t ulp_cnx_id;
|
||||
|
||||
/* SCTP Association ID */
|
||||
int32_t assoc_id;
|
||||
sctp_assoc_t assoc_id;
|
||||
|
||||
/* Input/output streams */
|
||||
uint16_t out_streams;
|
||||
@@ -114,7 +117,7 @@ typedef struct sctp_new_association_resp_s {
|
||||
|
||||
typedef struct sctp_data_ind_s {
|
||||
/* SCTP Association ID */
|
||||
int32_t assoc_id;
|
||||
sctp_assoc_t assoc_id;
|
||||
|
||||
/* Buffer to send over SCTP */
|
||||
uint32_t buffer_length;
|
||||
@@ -139,7 +142,7 @@ typedef struct sctp_init_s {
|
||||
|
||||
|
||||
typedef struct sctp_close_association_s {
|
||||
uint32_t assoc_id;
|
||||
sctp_assoc_t assoc_id;
|
||||
} sctp_close_association_t;
|
||||
|
||||
|
||||
|
||||
@@ -22,6 +22,8 @@
|
||||
#ifndef X2AP_MESSAGES_TYPES_H_
|
||||
#define X2AP_MESSAGES_TYPES_H_
|
||||
|
||||
#include <netinet/in.h>
|
||||
#include <netinet/sctp.h>
|
||||
#include "s1ap_messages_types.h"
|
||||
#include "LTE_PhysCellId.h"
|
||||
|
||||
@@ -425,7 +427,7 @@ typedef struct x2ap_ENDC_reconf_complete_s {
|
||||
typedef struct x2ap_ENDC_sgnb_release_request_s {
|
||||
int rnti;
|
||||
x2ap_cause_t cause;
|
||||
int assoc_id;
|
||||
sctp_assoc_t assoc_id;
|
||||
} x2ap_ENDC_sgnb_release_request_t;
|
||||
|
||||
typedef struct x2ap_ENDC_sgnb_release_required_s {
|
||||
|
||||
+42
-44
@@ -67,8 +67,8 @@ const char *const e1ap_direction2String(int e1ap_dir)
|
||||
return(e1ap_direction_String[e1ap_dir]);
|
||||
}
|
||||
|
||||
int e1ap_handle_message(instance_t instance, uint32_t assoc_id,
|
||||
const uint8_t *const data, const uint32_t data_length) {
|
||||
int e1ap_handle_message(instance_t instance, sctp_assoc_t assoc_id, const uint8_t *const data, const uint32_t data_length)
|
||||
{
|
||||
E1AP_E1AP_PDU_t pdu= {0};
|
||||
int ret;
|
||||
DevAssert(data != NULL);
|
||||
@@ -128,18 +128,14 @@ int e1ap_send_RESET_ACKNOWLEDGE(instance_t instance, E1AP_Reset_t *Reset) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
int e1ap_handle_RESET(instance_t instance,
|
||||
uint32_t assoc_id,
|
||||
uint32_t stream,
|
||||
E1AP_E1AP_PDU_t *pdu) {
|
||||
int e1ap_handle_RESET(instance_t instance, sctp_assoc_t assoc_id, uint32_t stream, E1AP_E1AP_PDU_t *pdu)
|
||||
{
|
||||
AssertFatal(false,"Not implemented yet\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
int e1ap_handle_RESET_ACKNOWLEDGE(instance_t instance,
|
||||
uint32_t assoc_id,
|
||||
uint32_t stream,
|
||||
E1AP_E1AP_PDU_t *pdu) {
|
||||
int e1ap_handle_RESET_ACKNOWLEDGE(instance_t instance, sctp_assoc_t assoc_id, uint32_t stream, E1AP_E1AP_PDU_t *pdu)
|
||||
{
|
||||
AssertFatal(false,"Not implemented yet\n");
|
||||
return -1;
|
||||
}
|
||||
@@ -147,10 +143,8 @@ int e1ap_handle_RESET_ACKNOWLEDGE(instance_t instance,
|
||||
/*
|
||||
Error Indication
|
||||
*/
|
||||
int e1ap_handle_ERROR_INDICATION(instance_t instance,
|
||||
uint32_t assoc_id,
|
||||
uint32_t stream,
|
||||
E1AP_E1AP_PDU_t *pdu) {
|
||||
int e1ap_handle_ERROR_INDICATION(instance_t instance, sctp_assoc_t assoc_id, uint32_t stream, E1AP_E1AP_PDU_t *pdu)
|
||||
{
|
||||
AssertFatal(false,"Not implemented yet\n");
|
||||
return -1;
|
||||
}
|
||||
@@ -465,13 +459,19 @@ int e1apCUCP_handle_CONFIGURATION_UPDATE(e1ap_setup_req_t *setupReq, E1AP_E1AP_P
|
||||
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");
|
||||
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");
|
||||
return -1;
|
||||
@@ -491,18 +491,14 @@ int e1ap_send_RELEASE_ACKNOWLEDGE(instance_t instance) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
int e1ap_handle_RELEASE_REQUEST(instance_t instance,
|
||||
uint32_t assoc_id,
|
||||
uint32_t stream,
|
||||
E1AP_E1AP_PDU_t *pdu) {
|
||||
int e1ap_handle_RELEASE_REQUEST(instance_t instance, sctp_assoc_t assoc_id, uint32_t stream, E1AP_E1AP_PDU_t *pdu)
|
||||
{
|
||||
AssertFatal(false,"Not implemented yet\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
int e1ap_handle_RELEASE_ACKNOWLEDGE(instance_t instance,
|
||||
uint32_t assoc_id,
|
||||
uint32_t stream,
|
||||
E1AP_E1AP_PDU_t *pdu) {
|
||||
int e1ap_handle_RELEASE_ACKNOWLEDGE(instance_t instance, sctp_assoc_t assoc_id, uint32_t stream, E1AP_E1AP_PDU_t *pdu)
|
||||
{
|
||||
AssertFatal(false,"Not implemented yet\n");
|
||||
return -1;
|
||||
}
|
||||
@@ -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,
|
||||
uint32_t assoc_id,
|
||||
sctp_assoc_t assoc_id,
|
||||
uint32_t stream,
|
||||
E1AP_E1AP_PDU_t *pdu) {
|
||||
E1AP_E1AP_PDU_t *pdu)
|
||||
{
|
||||
AssertFatal(false,"Not implemented yet\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
int e1apCUCP_handle_BEARER_CONTEXT_MODIFICATION_FAILURE(instance_t instance,
|
||||
uint32_t assoc_id,
|
||||
sctp_assoc_t assoc_id,
|
||||
uint32_t stream,
|
||||
E1AP_E1AP_PDU_t *pdu) {
|
||||
E1AP_E1AP_PDU_t *pdu)
|
||||
{
|
||||
AssertFatal(false,"Not implemented yet\n");
|
||||
return -1;
|
||||
}
|
||||
@@ -1277,17 +1275,19 @@ int e1apCUCP_send_BEARER_CONTEXT_MODIFICATION_CONFIRM(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,
|
||||
E1AP_E1AP_PDU_t *pdu) {
|
||||
E1AP_E1AP_PDU_t *pdu)
|
||||
{
|
||||
AssertFatal(false,"Not implemented yet\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
int e1apCUUP_handle_BEARER_CONTEXT_MODIFICATION_CONFIRM(instance_t instance,
|
||||
uint32_t assoc_id,
|
||||
sctp_assoc_t assoc_id,
|
||||
uint32_t stream,
|
||||
E1AP_E1AP_PDU_t *pdu) {
|
||||
E1AP_E1AP_PDU_t *pdu)
|
||||
{
|
||||
AssertFatal(false,"Not implemented yet\n");
|
||||
return -1;
|
||||
}
|
||||
@@ -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,
|
||||
uint32_t assoc_id,
|
||||
sctp_assoc_t assoc_id,
|
||||
uint32_t stream,
|
||||
E1AP_E1AP_PDU_t *pdu) {
|
||||
E1AP_E1AP_PDU_t *pdu)
|
||||
{
|
||||
AssertFatal(false,"Not implemented yet\n");
|
||||
return -1;
|
||||
}
|
||||
@@ -1481,9 +1482,10 @@ int e1apCUUP_send_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,
|
||||
E1AP_E1AP_PDU_t *pdu) {
|
||||
E1AP_E1AP_PDU_t *pdu)
|
||||
{
|
||||
AssertFatal(false,"Not implemented yet\n");
|
||||
return -1;
|
||||
}
|
||||
@@ -1501,18 +1503,14 @@ int e1apCUUP_send_DATA_USAGE_REPORT(instance_t instance) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
int e1apCUCP_handle_DL_DATA_NOTIFICATION(instance_t instance,
|
||||
uint32_t assoc_id,
|
||||
uint32_t stream,
|
||||
E1AP_E1AP_PDU_t *pdu) {
|
||||
int e1apCUCP_handle_DL_DATA_NOTIFICATION(instance_t instance, sctp_assoc_t assoc_id, uint32_t stream, E1AP_E1AP_PDU_t *pdu)
|
||||
{
|
||||
AssertFatal(false,"Not implemented yet\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
int e1apCUCP_handle_send_DATA_USAGE_REPORT(instance_t instance,
|
||||
uint32_t assoc_id,
|
||||
uint32_t stream,
|
||||
E1AP_E1AP_PDU_t *pdu) {
|
||||
int e1apCUCP_handle_send_DATA_USAGE_REPORT(instance_t instance, sctp_assoc_t assoc_id, uint32_t stream, E1AP_E1AP_PDU_t *pdu)
|
||||
{
|
||||
AssertFatal(false,"Not implemented yet\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -34,7 +34,7 @@ typedef struct e1ap_upcp_inst_s {
|
||||
bool same_process;
|
||||
E1_t type;
|
||||
enum sctp_state_e sockState;
|
||||
uint32_t assoc_id;
|
||||
sctp_assoc_t assoc_id;
|
||||
instance_t gtpInstN3;
|
||||
instance_t gtpInstF1U;
|
||||
e1ap_setup_req_t setupReq;
|
||||
|
||||
+29
-27
@@ -32,42 +32,44 @@
|
||||
|
||||
#include "f1ap_common.h"
|
||||
|
||||
static f1ap_cudu_inst_t *f1_du_inst[NUMBER_OF_gNB_MAX]= {0};
|
||||
static f1ap_cudu_inst_t *f1_cu_inst[NUMBER_OF_gNB_MAX]= {0};
|
||||
static f1ap_cudu_inst_t *f1_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};
|
||||
transaction_identifier[mod_idP+cu_mod_idP] =
|
||||
(transaction_identifier[mod_idP+cu_mod_idP] + 1) % F1AP_TRANSACTION_IDENTIFIER_NUMBER;
|
||||
return transaction_identifier[mod_idP+cu_mod_idP];
|
||||
}
|
||||
|
||||
f1ap_cudu_inst_t *getCxt(F1_t isCU, instance_t instanceP) {
|
||||
//Fixme: 4G F1 has race condtions, someone may debug it, using this test
|
||||
/*
|
||||
static pid_t t=-1;
|
||||
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];
|
||||
f1ap_cudu_inst_t *getCxt(instance_t instanceP)
|
||||
{
|
||||
DevAssert(instanceP == 0);
|
||||
return f1_inst[instanceP];
|
||||
}
|
||||
|
||||
void createF1inst(F1_t isCU, instance_t instanceP, f1ap_setup_req_t *req) {
|
||||
if (isCU == CUtype) {
|
||||
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));
|
||||
//memcpy(f1_cu_inst[instanceP]->setupReq, req, sizeof(f1ap_setup_req_t) );
|
||||
} else {
|
||||
AssertFatal(f1_du_inst[instanceP] == NULL, "Double call to F1 DU init\n");
|
||||
f1_du_inst[instanceP]=( f1ap_cudu_inst_t *) calloc(1, sizeof(f1ap_cudu_inst_t));
|
||||
memcpy(&f1_du_inst[instanceP]->setupReq, req, sizeof(f1ap_setup_req_t) );
|
||||
}
|
||||
static pthread_mutex_t f1_inst_mtx = PTHREAD_MUTEX_INITIALIZER;
|
||||
void createF1inst(instance_t instanceP, f1ap_setup_req_t *req, f1ap_net_config_t *nc)
|
||||
{
|
||||
DevAssert(instanceP == 0);
|
||||
pthread_mutex_lock(&f1_inst_mtx);
|
||||
AssertFatal(f1_inst[0] == NULL, "Attempted to initialize multiple F1 instances\n");
|
||||
f1_inst[0] = calloc(1, sizeof(f1ap_cudu_inst_t));
|
||||
AssertFatal(f1_inst[0] != NULL, "out of memory\n");
|
||||
if (req)
|
||||
f1_inst[0]->setupReq = *req;
|
||||
if (nc)
|
||||
f1_inst[0]->net_config = *nc;
|
||||
pthread_mutex_unlock(&f1_inst_mtx);
|
||||
}
|
||||
|
||||
|
||||
int f1ap_assoc_id(F1_t isCu, instance_t instanceP) {
|
||||
f1ap_setup_req_t *f1_inst=f1ap_req(isCu, instanceP);
|
||||
return f1_inst->assoc_id;
|
||||
void destroyF1inst(instance_t instance)
|
||||
{
|
||||
DevAssert(instance == 0);
|
||||
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);
|
||||
}
|
||||
|
||||
+19
-35
@@ -387,56 +387,40 @@
|
||||
|
||||
/** \brief Function array prototype.
|
||||
**/
|
||||
typedef int (*f1ap_message_processing_t)(
|
||||
instance_t instance,
|
||||
uint32_t assoc_id,
|
||||
uint32_t stream,
|
||||
F1AP_F1AP_PDU_t *message_p
|
||||
);
|
||||
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 int (*f1ap_message_processing_t)(instance_t instance, sctp_assoc_t assoc_id, uint32_t stream, F1AP_F1AP_PDU_t *message_p);
|
||||
int f1ap_handle_message(instance_t instance,
|
||||
sctp_assoc_t assoc_id,
|
||||
int32_t stream,
|
||||
const uint8_t *const data,
|
||||
const uint32_t data_length);
|
||||
|
||||
typedef struct f1ap_cudu_inst_s {
|
||||
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_out_streams;
|
||||
uint16_t default_sctp_stream_id;
|
||||
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;
|
||||
|
||||
typedef enum {
|
||||
DUtype=0,
|
||||
CUtype
|
||||
} F1_t;
|
||||
/* GTP instance used by F1 */
|
||||
instance_t gtpInst;
|
||||
} f1ap_cudu_inst_t;
|
||||
|
||||
static const int nrb_lut[29] = {11, 18, 24, 25, 31, 32, 38, 51, 52, 65, 66, 78, 79, 93, 106, 107, 121, 132, 133, 135, 160, 162, 189, 216, 217, 245, 264, 270, 273};
|
||||
|
||||
uint8_t F1AP_get_next_transaction_identifier(instance_t mod_idP, instance_t cu_mod_idP);
|
||||
|
||||
f1ap_cudu_inst_t *getCxt(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) {
|
||||
return &getCxt(isCu, instanceP)->setupReq;
|
||||
}
|
||||
void createF1inst(instance_t instanceP, f1ap_setup_req_t *req, f1ap_net_config_t *nc);
|
||||
void destroyF1inst(instance_t instance);
|
||||
|
||||
//lts: C struct type is not homogeneous, so we need macros instead of functions
|
||||
#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)); \
|
||||
NR_CELL_ID_TO_BIT_STRING((servedCelL)->nr_cellid, &((nRCGi).nRCellIdentity));
|
||||
extern RAN_CONTEXT_t RC;
|
||||
|
||||
@@ -39,17 +39,13 @@ int CU_send_RESET(instance_t instance, F1AP_Reset_t *Reset) {
|
||||
AssertFatal(1==0,"Not implemented yet\n");
|
||||
}
|
||||
|
||||
int CU_handle_RESET_ACKKNOWLEDGE(instance_t instance,
|
||||
uint32_t assoc_id,
|
||||
uint32_t stream,
|
||||
F1AP_F1AP_PDU_t *pdu) {
|
||||
int CU_handle_RESET_ACKKNOWLEDGE(instance_t instance, sctp_assoc_t assoc_id, uint32_t stream, F1AP_F1AP_PDU_t *pdu)
|
||||
{
|
||||
AssertFatal(1==0,"Not implemented yet\n");
|
||||
}
|
||||
|
||||
int CU_handle_RESET(instance_t instance,
|
||||
uint32_t assoc_id,
|
||||
uint32_t stream,
|
||||
F1AP_F1AP_PDU_t *pdu) {
|
||||
int CU_handle_RESET(instance_t instance, sctp_assoc_t assoc_id, uint32_t stream, F1AP_F1AP_PDU_t *pdu)
|
||||
{
|
||||
AssertFatal(1==0,"Not implemented yet\n");
|
||||
}
|
||||
|
||||
@@ -61,10 +57,8 @@ int CU_send_RESET_ACKNOWLEDGE(instance_t instance, F1AP_ResetAcknowledge_t *Rese
|
||||
/*
|
||||
Error Indication
|
||||
*/
|
||||
int CU_handle_ERROR_INDICATION(instance_t instance,
|
||||
uint32_t assoc_id,
|
||||
uint32_t stream,
|
||||
F1AP_F1AP_PDU_t *pdu) {
|
||||
int CU_handle_ERROR_INDICATION(instance_t instance, sctp_assoc_t assoc_id, uint32_t stream, F1AP_F1AP_PDU_t *pdu)
|
||||
{
|
||||
AssertFatal(1==0,"Not implemented yet\n");
|
||||
}
|
||||
|
||||
@@ -76,12 +70,9 @@ int CU_send_ERROR_INDICATION(instance_t instance, F1AP_ErrorIndication_t *ErrorI
|
||||
/*
|
||||
F1 Setup
|
||||
*/
|
||||
int CU_handle_F1_SETUP_REQUEST(instance_t instance,
|
||||
uint32_t assoc_id,
|
||||
uint32_t stream,
|
||||
F1AP_F1AP_PDU_t *pdu) {
|
||||
int CU_handle_F1_SETUP_REQUEST(instance_t instance, sctp_assoc_t assoc_id, uint32_t stream, F1AP_F1AP_PDU_t *pdu)
|
||||
{
|
||||
LOG_D(F1AP, "CU_handle_F1_SETUP_REQUEST\n");
|
||||
MessageDef *message_p;
|
||||
F1AP_F1SetupRequest_t *container;
|
||||
F1AP_F1SetupRequestIEs_t *ie;
|
||||
int i = 0;
|
||||
@@ -94,9 +85,9 @@ int CU_handle_F1_SETUP_REQUEST(instance_t instance,
|
||||
assoc_id, stream);
|
||||
}
|
||||
|
||||
/* assoc_id */
|
||||
f1ap_setup_req_t *req=&getCxt(true, instance)->setupReq;
|
||||
req->assoc_id = assoc_id;
|
||||
MessageDef *message_p = itti_alloc_new_message(TASK_CU_F1, 0, F1AP_SETUP_REQ);
|
||||
message_p->ittiMsgHeader.originInstance = assoc_id;
|
||||
f1ap_setup_req_t *req = &F1AP_SETUP_REQ(message_p);
|
||||
/* gNB_DU_id */
|
||||
// this function exits if the ie is mandatory
|
||||
F1AP_FIND_PROTOCOLIE_BY_ID(F1AP_F1SetupRequestIEs_t, ie, container,
|
||||
@@ -124,95 +115,84 @@ int CU_handle_F1_SETUP_REQUEST(instance_t instance,
|
||||
F1AP_Served_Cell_Information_t *servedCellInformation= &served_cells_item->served_Cell_Information;
|
||||
/* tac */
|
||||
if (servedCellInformation->fiveGS_TAC) {
|
||||
OCTET_STRING_TO_INT16(servedCellInformation->fiveGS_TAC, req->cell[i].tac);
|
||||
LOG_D(F1AP, "req->tac[%d] %d \n", i, req->cell[i].tac);
|
||||
req->cell[i].info.tac = malloc(sizeof(*req->cell[i].info.tac));
|
||||
AssertFatal(req->cell[i].info.tac != NULL, "out of memory\n");
|
||||
OCTET_STRING_TO_INT16(servedCellInformation->fiveGS_TAC, *req->cell[i].info.tac);
|
||||
LOG_D(F1AP, "req->tac[%d] %d \n", i, *req->cell[i].info.tac);
|
||||
}
|
||||
|
||||
/* - nRCGI */
|
||||
TBCD_TO_MCC_MNC(&(servedCellInformation->nRCGI.pLMN_Identity), req->cell[i].mcc,
|
||||
req->cell[i].mnc,req->cell[i].mnc_digit_length);
|
||||
TBCD_TO_MCC_MNC(&(servedCellInformation->nRCGI.pLMN_Identity),
|
||||
req->cell[i].info.plmn.mcc,
|
||||
req->cell[i].info.plmn.mnc,
|
||||
req->cell[i].info.plmn.mnc_digit_length);
|
||||
// NR cellID
|
||||
BIT_STRING_TO_NR_CELL_IDENTITY(&servedCellInformation->nRCGI.nRCellIdentity,
|
||||
req->cell[i].nr_cellid);
|
||||
req->cell[i].info.nr_cellid);
|
||||
LOG_D(F1AP, "[SCTP %d] Received nRCGI: MCC %d, MNC %d, CELL_ID %llu\n", assoc_id,
|
||||
req->cell[i].mcc,
|
||||
req->cell[i].mnc,
|
||||
(long long unsigned int)req->cell[i].nr_cellid);
|
||||
req->cell[i].info.plmn.mcc,
|
||||
req->cell[i].info.plmn.mnc,
|
||||
(long long unsigned int)req->cell[i].info.nr_cellid);
|
||||
/* - nRPCI */
|
||||
req->cell[i].nr_pci = servedCellInformation->nRPCI;
|
||||
LOG_D(F1AP, "req->nr_pci[%d] %d \n", i, req->cell[i].nr_pci);
|
||||
|
||||
// LTS: FIXME cell_type is not a attribute of a cell in the data structure !!!!!!!!!!
|
||||
f1ap_req(true, instance)->cell_type = CELL_MACRO_GNB;
|
||||
req->cell[i].info.nr_pci = servedCellInformation->nRPCI;
|
||||
LOG_D(F1AP, "req->nr_pci[%d] %d \n", i, req->cell[i].info.nr_pci);
|
||||
|
||||
// FDD Cells
|
||||
if (servedCellInformation->nR_Mode_Info.present==F1AP_NR_Mode_Info_PR_fDD) {
|
||||
struct fdd_s *FDDs=&req->nr_mode_info[i].fdd;
|
||||
req->cell[i].info.mode = F1AP_MODE_FDD;
|
||||
f1ap_fdd_info_t *FDDs = &req->cell[i].info.fdd;
|
||||
F1AP_FDD_Info_t * fDD_Info=servedCellInformation->nR_Mode_Info.choice.fDD;
|
||||
FDDs->ul_nr_arfcn=fDD_Info->uL_NRFreqInfo.nRARFCN;
|
||||
FDDs->ul_num_frequency_bands=fDD_Info->uL_NRFreqInfo.freqBandListNr.list.count;
|
||||
FDDs->ul_freqinfo.arfcn = fDD_Info->uL_NRFreqInfo.nRARFCN;
|
||||
AssertFatal(fDD_Info->uL_NRFreqInfo.freqBandListNr.list.count == 1, "cannot handle more than one frequency band\n");
|
||||
for (int f=0; f < fDD_Info->uL_NRFreqInfo.freqBandListNr.list.count; f++) {
|
||||
F1AP_FreqBandNrItem_t * FreqItem=fDD_Info->uL_NRFreqInfo.freqBandListNr.list.array[f];
|
||||
FDDs->ul_nr_band[f]=FreqItem->freqBandIndicatorNr;
|
||||
int num_available_supported_SULBands=FreqItem->supportedSULBandList.list.count;
|
||||
for (int sul=0; sul < num_available_supported_SULBands; sul ++ ) {
|
||||
F1AP_SupportedSULFreqBandItem_t * SulItem= FreqItem->supportedSULBandList.list.array[sul];
|
||||
FDDs->ul_nr_sul_band[sul]=SulItem->freqBandIndicatorNr;
|
||||
}
|
||||
F1AP_FreqBandNrItem_t * FreqItem=fDD_Info->uL_NRFreqInfo.freqBandListNr.list.array[f];
|
||||
FDDs->ul_freqinfo.band = FreqItem->freqBandIndicatorNr;
|
||||
AssertFatal(FreqItem->supportedSULBandList.list.count == 0, "cannot handle SUL bands!\n");
|
||||
}
|
||||
FDDs->dl_nr_arfcn=fDD_Info->dL_NRFreqInfo.nRARFCN;
|
||||
FDDs->dl_freqinfo.arfcn = fDD_Info->dL_NRFreqInfo.nRARFCN;
|
||||
int dlBands=fDD_Info->dL_NRFreqInfo.freqBandListNr.list.count;
|
||||
AssertFatal(dlBands == 0, "cannot handled more than one frequency band\n");
|
||||
for (int dlB=0; dlB < dlBands; dlB++) {
|
||||
F1AP_FreqBandNrItem_t * FreqItem=fDD_Info->dL_NRFreqInfo.freqBandListNr.list.array[dlB];
|
||||
FDDs->dl_nr_band[dlB]=FreqItem->freqBandIndicatorNr;
|
||||
int num_available_supported_SULBands = FreqItem->supportedSULBandList.list.count;
|
||||
for (int sul=0; sul < num_available_supported_SULBands; sul ++ ) {
|
||||
F1AP_SupportedSULFreqBandItem_t * SulItem= FreqItem->supportedSULBandList.list.array[sul];
|
||||
FDDs->ul_nr_sul_band[sul]=SulItem->freqBandIndicatorNr;
|
||||
}
|
||||
FDDs->dl_freqinfo.band = FreqItem->freqBandIndicatorNr;
|
||||
int num_available_supported_SULBands = FreqItem->supportedSULBandList.list.count;
|
||||
AssertFatal(num_available_supported_SULBands == 0, "cannot handle SUL bands!\n");
|
||||
}
|
||||
FDDs->ul_scs=fDD_Info->uL_Transmission_Bandwidth.nRSCS;
|
||||
FDDs->ul_nrb=nrb_lut[fDD_Info->uL_Transmission_Bandwidth.nRNRB];
|
||||
FDDs->dl_scs=fDD_Info->dL_Transmission_Bandwidth.nRSCS;
|
||||
FDDs->dl_nrb=nrb_lut[fDD_Info->dL_Transmission_Bandwidth.nRNRB];
|
||||
}
|
||||
|
||||
// TDD
|
||||
if (servedCellInformation->nR_Mode_Info.present==F1AP_NR_Mode_Info_PR_tDD) {
|
||||
struct tdd_s *TDDs=&req->nr_mode_info[i].tdd;
|
||||
F1AP_TDD_Info_t * tDD_Info=servedCellInformation->nR_Mode_Info.choice.tDD;
|
||||
TDDs->nr_arfcn=tDD_Info->nRFreqInfo.nRARFCN;
|
||||
TDDs->num_frequency_bands=tDD_Info->nRFreqInfo.freqBandListNr.list.count;
|
||||
FDDs->ul_tbw.scs = fDD_Info->uL_Transmission_Bandwidth.nRSCS;
|
||||
FDDs->ul_tbw.nrb = nrb_lut[fDD_Info->uL_Transmission_Bandwidth.nRNRB];
|
||||
FDDs->dl_tbw.scs = fDD_Info->dL_Transmission_Bandwidth.nRSCS;
|
||||
FDDs->dl_tbw.nrb = nrb_lut[fDD_Info->dL_Transmission_Bandwidth.nRNRB];
|
||||
} else if (servedCellInformation->nR_Mode_Info.present==F1AP_NR_Mode_Info_PR_tDD) {
|
||||
req->cell[i].info.mode = F1AP_MODE_TDD;
|
||||
f1ap_tdd_info_t *TDDs = &req->cell[i].info.tdd;
|
||||
F1AP_TDD_Info_t *tDD_Info = servedCellInformation->nR_Mode_Info.choice.tDD;
|
||||
TDDs->freqinfo.arfcn = tDD_Info->nRFreqInfo.nRARFCN;
|
||||
AssertFatal(tDD_Info->nRFreqInfo.freqBandListNr.list.count == 1, "cannot handle more than one frequency band\n");
|
||||
for (int f=0; f < tDD_Info->nRFreqInfo.freqBandListNr.list.count; f++) {
|
||||
struct F1AP_FreqBandNrItem * FreqItem=tDD_Info->nRFreqInfo.freqBandListNr.list.array[f];
|
||||
TDDs->nr_band[f]=FreqItem->freqBandIndicatorNr;
|
||||
int num_available_supported_SULBands=FreqItem->supportedSULBandList.list.count;
|
||||
for (int sul=0; sul < num_available_supported_SULBands; sul ++ ) {
|
||||
struct F1AP_SupportedSULFreqBandItem * SulItem= FreqItem->supportedSULBandList.list.array[sul];
|
||||
TDDs->nr_sul_band[sul]=SulItem->freqBandIndicatorNr;
|
||||
}
|
||||
struct F1AP_FreqBandNrItem * FreqItem=tDD_Info->nRFreqInfo.freqBandListNr.list.array[f];
|
||||
TDDs->freqinfo.band = FreqItem->freqBandIndicatorNr;
|
||||
int num_available_supported_SULBands = FreqItem->supportedSULBandList.list.count;
|
||||
AssertFatal(num_available_supported_SULBands == 0, "cannot hanlde SUL bands!\n");
|
||||
}
|
||||
TDDs->scs=tDD_Info->transmission_Bandwidth.nRSCS;
|
||||
TDDs->nrb=nrb_lut[tDD_Info->transmission_Bandwidth.nRNRB];
|
||||
TDDs->tbw.scs = tDD_Info->transmission_Bandwidth.nRSCS;
|
||||
TDDs->tbw.nrb = nrb_lut[tDD_Info->transmission_Bandwidth.nRNRB];
|
||||
} else {
|
||||
AssertFatal(false, "unknown NR Mode info %d\n", servedCellInformation->nR_Mode_Info.present);
|
||||
}
|
||||
|
||||
struct F1AP_GNB_DU_System_Information * DUsi=served_cells_item->gNB_DU_System_Information;
|
||||
LOG_I(F1AP, "Received Cell in %d context\n", f1ap_req(true, instance)->cell_type==CELL_MACRO_GNB);
|
||||
// System Information
|
||||
req->cell[i].sys_info = calloc(1, sizeof(*req->cell[i].sys_info));
|
||||
AssertFatal(req->cell[i].sys_info != NULL, "out of memory\n");
|
||||
f1ap_gnb_du_system_info_t *sys_info = req->cell[i].sys_info;
|
||||
/* mib */
|
||||
req->mib[i] = calloc(DUsi->mIB_message.size + 1, sizeof(char));
|
||||
memcpy(req->mib[i], DUsi->mIB_message.buf, DUsi->mIB_message.size);
|
||||
/* Convert the mme name to a printable string */
|
||||
req->mib[i][DUsi->mIB_message.size] = '\0';
|
||||
req->mib_length[i] = DUsi->mIB_message.size;
|
||||
LOG_D(F1AP, "req->mib[%d] len = %d \n", i, req->mib_length[i]);
|
||||
sys_info->mib = calloc(DUsi->mIB_message.size, sizeof(char));
|
||||
memcpy(sys_info->mib, DUsi->mIB_message.buf, DUsi->mIB_message.size);
|
||||
sys_info->mib_length = DUsi->mIB_message.size;
|
||||
/* sib1 */
|
||||
req->sib1[i] = calloc(DUsi->sIB1_message.size + 1, sizeof(char));
|
||||
memcpy(req->sib1[i], DUsi->sIB1_message.buf, DUsi->sIB1_message.size);
|
||||
/* Convert the mme name to a printable string */
|
||||
req->sib1[i][DUsi->sIB1_message.size] = '\0';
|
||||
req->sib1_length[i] = DUsi->sIB1_message.size;
|
||||
LOG_D(F1AP, "req->sib1[%d] len = %d \n", i, req->sib1_length[i]);
|
||||
sys_info->sib1 = calloc(DUsi->sIB1_message.size, sizeof(char));
|
||||
memcpy(sys_info->sib1, DUsi->sIB1_message.buf, DUsi->sIB1_message.size);
|
||||
sys_info->sib1_length = DUsi->sIB1_message.size;
|
||||
}
|
||||
|
||||
// char *measurement_timing_information[F1AP_MAX_NB_CELLS];
|
||||
@@ -249,12 +229,6 @@ int CU_handle_F1_SETUP_REQUEST(instance_t instance,
|
||||
// uint16_t nr_sul_band[32];
|
||||
// } tdd;
|
||||
// } nr_mode_info[F1AP_MAX_NB_CELLS];
|
||||
|
||||
|
||||
|
||||
// We copy and store in F1 task data, RRC will free "req" as it frees all itti received messages
|
||||
message_p = itti_alloc_new_message(TASK_CU_F1, 0, F1AP_SETUP_REQ);
|
||||
memcpy(&F1AP_SETUP_REQ(message_p), req, sizeof(f1ap_setup_req_t) );
|
||||
|
||||
if (req->num_cells_available > 0) {
|
||||
itti_send_msg_to_task(TASK_RRC_GNB, GNB_MODULE_ID_TO_INSTANCE(instance), message_p);
|
||||
@@ -267,13 +241,8 @@ int CU_handle_F1_SETUP_REQUEST(instance_t instance,
|
||||
return 0;
|
||||
}
|
||||
|
||||
int CU_send_F1_SETUP_RESPONSE(instance_t instance,
|
||||
f1ap_setup_resp_t *f1ap_setup_resp) {
|
||||
instance_t enb_mod_idP;
|
||||
instance_t cu_mod_idP;
|
||||
// This should be fixed
|
||||
enb_mod_idP = (instance_t)0;
|
||||
cu_mod_idP = (instance_t)0;
|
||||
int CU_send_F1_SETUP_RESPONSE(instance_t instance, f1ap_setup_resp_t *f1ap_setup_resp)
|
||||
{
|
||||
F1AP_F1AP_PDU_t pdu= {0};
|
||||
uint8_t *buffer=NULL;
|
||||
uint32_t len=0;
|
||||
@@ -291,7 +260,7 @@ int CU_send_F1_SETUP_RESPONSE(instance_t instance,
|
||||
ie1->id = F1AP_ProtocolIE_ID_id_TransactionID;
|
||||
ie1->criticality = F1AP_Criticality_reject;
|
||||
ie1->value.present = F1AP_F1SetupResponseIEs__value_PR_TransactionID;
|
||||
ie1->value.choice.TransactionID = F1AP_get_next_transaction_identifier(enb_mod_idP, cu_mod_idP);
|
||||
ie1->value.choice.TransactionID = F1AP_get_next_transaction_identifier(0, 0);
|
||||
|
||||
/* optional */
|
||||
/* c2. GNB_CU_Name */
|
||||
@@ -336,7 +305,7 @@ int CU_send_F1_SETUP_RESPONSE(instance_t instance,
|
||||
|
||||
/* optional */
|
||||
/* - gNB-CU System Information */
|
||||
if (1) {
|
||||
if (f1ap_setup_resp->cells_to_activate[i].num_SI > 0) {
|
||||
/* 3.1.2 gNB-CUSystem Information */
|
||||
F1AP_ProtocolExtensionContainer_10696P112_t *p = calloc(1, sizeof(* p));
|
||||
cells_to_be_activated_item->iE_Extensions = (struct F1AP_ProtocolExtensionContainer *) p;
|
||||
@@ -370,15 +339,12 @@ int CU_send_F1_SETUP_RESPONSE(instance_t instance,
|
||||
}
|
||||
|
||||
ASN_STRUCT_RESET(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;
|
||||
}
|
||||
|
||||
int CU_send_F1_SETUP_FAILURE(instance_t instance) {
|
||||
LOG_D(F1AP, "CU_send_F1_SETUP_FAILURE\n");
|
||||
instance_t enb_mod_idP=0;
|
||||
instance_t cu_mod_idP=0;
|
||||
// This should be fixed
|
||||
F1AP_F1AP_PDU_t pdu= {0};
|
||||
uint8_t *buffer=NULL;
|
||||
uint32_t len=0;
|
||||
@@ -396,7 +362,7 @@ int CU_send_F1_SETUP_FAILURE(instance_t instance) {
|
||||
ie1->id = F1AP_ProtocolIE_ID_id_TransactionID;
|
||||
ie1->criticality = F1AP_Criticality_reject;
|
||||
ie1->value.present = F1AP_F1SetupFailureIEs__value_PR_TransactionID;
|
||||
ie1->value.choice.TransactionID = F1AP_get_next_transaction_identifier(enb_mod_idP, cu_mod_idP);
|
||||
ie1->value.choice.TransactionID = F1AP_get_next_transaction_identifier(0, 0);
|
||||
/* mandatory */
|
||||
/* c2. Cause */
|
||||
asn1cSequenceAdd(out->protocolIEs.list, F1AP_F1SetupFailureIEs_t, ie2);
|
||||
@@ -440,7 +406,7 @@ int CU_send_F1_SETUP_FAILURE(instance_t instance) {
|
||||
}
|
||||
|
||||
ASN_STRUCT_RESET(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;
|
||||
}
|
||||
|
||||
@@ -448,10 +414,8 @@ int CU_send_F1_SETUP_FAILURE(instance_t instance) {
|
||||
gNB-DU Configuration Update
|
||||
*/
|
||||
|
||||
int CU_handle_gNB_DU_CONFIGURATION_UPDATE(instance_t instance,
|
||||
uint32_t assoc_id,
|
||||
uint32_t stream,
|
||||
F1AP_F1AP_PDU_t *pdu) {
|
||||
int CU_handle_gNB_DU_CONFIGURATION_UPDATE(instance_t instance, sctp_assoc_t assoc_id, uint32_t stream, F1AP_F1AP_PDU_t *pdu)
|
||||
{
|
||||
AssertFatal(1==0,"Not implemented yet\n");
|
||||
}
|
||||
|
||||
@@ -488,7 +452,7 @@ int CU_send_gNB_CU_CONFIGURATION_UPDATE(instance_t instance, f1ap_gnb_cu_configu
|
||||
ieC1->id = F1AP_ProtocolIE_ID_id_TransactionID;
|
||||
ieC1->criticality = F1AP_Criticality_reject;
|
||||
ieC1->value.present = F1AP_GNBCUConfigurationUpdateIEs__value_PR_TransactionID;
|
||||
ieC1->value.choice.TransactionID = F1AP_get_next_transaction_identifier(instance, 0);
|
||||
ieC1->value.choice.TransactionID = F1AP_get_next_transaction_identifier(0, 0);
|
||||
|
||||
// mandatory
|
||||
// c2. Cells_to_be_Activated_List
|
||||
@@ -556,30 +520,29 @@ int CU_send_gNB_CU_CONFIGURATION_UPDATE(instance_t instance, f1ap_gnb_cu_configu
|
||||
|
||||
LOG_DUMPMSG(F1AP, LOG_DUMP_CHAR, buffer, len, "F1AP gNB-CU CONFIGURATION UPDATE : ");
|
||||
ASN_STRUCT_RESET(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;
|
||||
}
|
||||
|
||||
int CU_handle_gNB_CU_CONFIGURATION_UPDATE_FAILURE(instance_t instance,
|
||||
uint32_t assoc_id,
|
||||
uint32_t stream,
|
||||
F1AP_F1AP_PDU_t *pdu) {
|
||||
int CU_handle_gNB_CU_CONFIGURATION_UPDATE_FAILURE(instance_t instance, sctp_assoc_t assoc_id, uint32_t stream, F1AP_F1AP_PDU_t *pdu)
|
||||
{
|
||||
AssertFatal(1==0,"Not implemented yet\n");
|
||||
}
|
||||
|
||||
int CU_handle_gNB_CU_CONFIGURATION_UPDATE_ACKNOWLEDGE(instance_t instance,
|
||||
uint32_t assoc_id,
|
||||
uint32_t stream,
|
||||
F1AP_F1AP_PDU_t *pdu) {
|
||||
sctp_assoc_t assoc_id,
|
||||
uint32_t stream,
|
||||
F1AP_F1AP_PDU_t *pdu)
|
||||
{
|
||||
LOG_I(F1AP,"Cell Configuration ok (assoc_id %d)\n",assoc_id);
|
||||
return(0);
|
||||
}
|
||||
|
||||
|
||||
int CU_handle_gNB_DU_RESOURCE_COORDINATION_REQUEST(instance_t instance,
|
||||
uint32_t assoc_id,
|
||||
uint32_t stream,
|
||||
F1AP_F1AP_PDU_t *pdu) {
|
||||
sctp_assoc_t assoc_id,
|
||||
uint32_t stream,
|
||||
F1AP_F1AP_PDU_t *pdu)
|
||||
{
|
||||
AssertFatal(0, "Not implemented yet\n");
|
||||
}
|
||||
|
||||
|
||||
@@ -37,32 +37,20 @@
|
||||
* Reset
|
||||
*/
|
||||
int CU_send_RESET(instance_t instance, F1AP_Reset_t *Reset);
|
||||
int CU_handle_RESET_ACKKNOWLEDGE(instance_t instance,
|
||||
uint32_t assoc_id,
|
||||
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_handle_RESET_ACKKNOWLEDGE(instance_t instance, sctp_assoc_t assoc_id, uint32_t stream, F1AP_F1AP_PDU_t *pdu);
|
||||
int CU_handle_RESET(instance_t instance, sctp_assoc_t assoc_id, uint32_t stream, F1AP_F1AP_PDU_t *pdu);
|
||||
int CU_send_RESET_ACKNOWLEDGE(instance_t instance, F1AP_ResetAcknowledge_t *ResetAcknowledge);
|
||||
|
||||
/*
|
||||
* Error Indication
|
||||
*/
|
||||
int CU_handle_ERROR_INDICATION(instance_t instance,
|
||||
uint32_t assoc_id,
|
||||
uint32_t stream,
|
||||
F1AP_F1AP_PDU_t *pdu);
|
||||
int CU_handle_ERROR_INDICATION(instance_t instance, sctp_assoc_t assoc_id, uint32_t stream, F1AP_F1AP_PDU_t *pdu);
|
||||
int CU_send_ERROR_INDICATION(instance_t instance, F1AP_ErrorIndication_t *ErrorIndication);
|
||||
|
||||
/*
|
||||
* F1 Setup
|
||||
*/
|
||||
int CU_handle_F1_SETUP_REQUEST(instance_t instance,
|
||||
uint32_t assoc_id,
|
||||
uint32_t stream,
|
||||
F1AP_F1AP_PDU_t *pdu);
|
||||
int CU_handle_F1_SETUP_REQUEST(instance_t instance, sctp_assoc_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);
|
||||
|
||||
@@ -71,10 +59,7 @@ int CU_send_F1_SETUP_FAILURE(instance_t instance);
|
||||
/*
|
||||
* gNB-DU Configuration Update
|
||||
*/
|
||||
int CU_handle_gNB_DU_CONFIGURATION_UPDATE(instance_t instance,
|
||||
uint32_t assoc_id,
|
||||
uint32_t stream,
|
||||
F1AP_F1AP_PDU_t *pdu);
|
||||
int CU_handle_gNB_DU_CONFIGURATION_UPDATE(instance_t instance, sctp_assoc_t assoc_id, uint32_t stream, F1AP_F1AP_PDU_t *pdu);
|
||||
|
||||
int CU_send_gNB_DU_CONFIGURATION_FAILURE(instance_t instance,
|
||||
F1AP_GNBDUConfigurationUpdateFailure_t *GNBDUConfigurationUpdateFailure);
|
||||
@@ -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_handle_gNB_CU_CONFIGURATION_UPDATE_FAILURE(instance_t instance,
|
||||
uint32_t assoc_id,
|
||||
uint32_t stream,
|
||||
F1AP_F1AP_PDU_t *pdu);
|
||||
sctp_assoc_t assoc_id,
|
||||
uint32_t stream,
|
||||
F1AP_F1AP_PDU_t *pdu);
|
||||
|
||||
int CU_handle_gNB_CU_CONFIGURATION_UPDATE_ACKNOWLEDGE(instance_t instance,
|
||||
uint32_t assoc_id,
|
||||
uint32_t stream,
|
||||
F1AP_F1AP_PDU_t *pdu);
|
||||
sctp_assoc_t assoc_id,
|
||||
uint32_t stream,
|
||||
F1AP_F1AP_PDU_t *pdu);
|
||||
|
||||
/*
|
||||
* gNB-DU Resource Coordination
|
||||
*/
|
||||
int CU_handle_gNB_DU_RESOURCE_COORDINATION_REQUEST(instance_t instance,
|
||||
uint32_t assoc_id,
|
||||
uint32_t stream,
|
||||
F1AP_F1AP_PDU_t *pdu);
|
||||
sctp_assoc_t assoc_id,
|
||||
uint32_t stream,
|
||||
F1AP_F1AP_PDU_t *pdu);
|
||||
|
||||
int CU_send_gNB_DU_RESOURCE_COORDINATION_RESPONSE(instance_t instance,
|
||||
F1AP_GNBDUResourceCoordinationResponse_t *GNBDUResourceCoordinationResponse);
|
||||
|
||||
@@ -101,8 +101,7 @@ int CU_send_Paging(instance_t instance, f1ap_paging_ind_t *paging) {
|
||||
itemies->criticality = F1AP_Criticality_reject;
|
||||
itemies->value.present = F1AP_PagingCell_ItemIEs__value_PR_PagingCell_Item;
|
||||
F1AP_NRCGI_t *nRCGI = &itemies->value.choice.PagingCell_Item.nRCGI;
|
||||
MCC_MNC_TO_PLMNID(paging->mcc, paging->mnc, paging->mnc_digit_length,
|
||||
&nRCGI->pLMN_Identity);
|
||||
MCC_MNC_TO_PLMNID(paging->plmn.mcc, paging->plmn.mnc, paging->plmn.mnc_digit_length, &nRCGI->pLMN_Identity);
|
||||
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) {
|
||||
return -1;
|
||||
}
|
||||
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;
|
||||
}
|
||||
|
||||
@@ -43,10 +43,8 @@
|
||||
Initial UL RRC Message Transfer
|
||||
*/
|
||||
|
||||
int CU_handle_INITIAL_UL_RRC_MESSAGE_TRANSFER(instance_t instance,
|
||||
uint32_t assoc_id,
|
||||
uint32_t stream,
|
||||
F1AP_F1AP_PDU_t *pdu) {
|
||||
int CU_handle_INITIAL_UL_RRC_MESSAGE_TRANSFER(instance_t instance, sctp_assoc_t assoc_id, uint32_t stream, F1AP_F1AP_PDU_t *pdu)
|
||||
{
|
||||
LOG_D(F1AP, "CU_handle_INITIAL_UL_RRC_MESSAGE_TRANSFER\n");
|
||||
// decode the F1 message
|
||||
// get the rrc message from the contauiner
|
||||
@@ -89,7 +87,6 @@ int CU_handle_INITIAL_UL_RRC_MESSAGE_TRANSFER(instance_t instance,
|
||||
F1AP_ProtocolIE_ID_id_DUtoCURRCContainer, false);
|
||||
|
||||
// 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);
|
||||
f1ap_initial_ul_rrc_message_t *ul_rrc = &F1AP_INITIAL_UL_RRC_MESSAGE(message_p);
|
||||
ul_rrc->gNB_DU_ue_id = du_ue_id;
|
||||
@@ -210,17 +207,15 @@ int CU_send_DL_RRC_MESSAGE_TRANSFER(instance_t instance,
|
||||
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;
|
||||
}
|
||||
|
||||
/*
|
||||
UL RRC Message Transfer
|
||||
*/
|
||||
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)
|
||||
{
|
||||
LOG_D(F1AP, "CU_handle_UL_RRC_MESSAGE_TRANSFER \n");
|
||||
F1AP_ULRRCMessageTransfer_t *container;
|
||||
F1AP_ULRRCMessageTransferIEs_t *ie;
|
||||
|
||||
@@ -33,18 +33,10 @@
|
||||
#ifndef F1AP_CU_RRC_MESSAGE_TRANSFER_H_
|
||||
#define F1AP_CU_RRC_MESSAGE_TRANSFER_H_
|
||||
|
||||
int CU_handle_INITIAL_UL_RRC_MESSAGE_TRANSFER(instance_t instance,
|
||||
uint32_t assoc_id,
|
||||
uint32_t stream,
|
||||
F1AP_F1AP_PDU_t *pdu);
|
||||
int CU_handle_INITIAL_UL_RRC_MESSAGE_TRANSFER(instance_t instance, sctp_assoc_t assoc_id, uint32_t stream, F1AP_F1AP_PDU_t *pdu);
|
||||
|
||||
int CU_send_DL_RRC_MESSAGE_TRANSFER(instance_t instance,
|
||||
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_send_DL_RRC_MESSAGE_TRANSFER(instance_t instance, f1ap_dl_rrc_message_t *f1ap_dl_rrc);
|
||||
|
||||
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_ */
|
||||
|
||||
@@ -48,28 +48,41 @@ static instance_t cu_task_create_gtpu_instance(eth_params_t *IPaddrs) {
|
||||
return gtpv1Init(tmp);
|
||||
}
|
||||
|
||||
static void cu_task_handle_sctp_association_ind(instance_t instance, sctp_new_association_ind_t *sctp_new_association_ind,
|
||||
eth_params_t *IPaddrs) {
|
||||
createF1inst(true, instance, NULL);
|
||||
static void cu_task_handle_sctp_association_ind(instance_t instance,
|
||||
sctp_new_association_ind_t *sctp_new_association_ind,
|
||||
eth_params_t *IPaddrs)
|
||||
{
|
||||
createF1inst(instance, NULL, NULL);
|
||||
// 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->sctp_in_streams = sctp_new_association_ind->in_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) {
|
||||
getCxt(CUtype, instance)->gtpInst = cu_task_create_gtpu_instance(IPaddrs);
|
||||
AssertFatal(getCxt(CUtype, instance)->gtpInst > 0, "Failed to create CU F1-U UDP listener");
|
||||
getCxt(instance)->gtpInst = cu_task_create_gtpu_instance(IPaddrs);
|
||||
AssertFatal(getCxt(instance)->gtpInst > 0, "Failed to create CU F1-U UDP listener");
|
||||
} else
|
||||
LOG_I(F1AP, "In F1AP connection, don't start GTP-U, as we have also E1AP\n");
|
||||
// Fixme: fully inconsistent instances management
|
||||
// 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) {
|
||||
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) {
|
||||
LOG_W(F1AP, "Received unsuccessful result for SCTP association (%u), instance %ld, cnx_id %u\n",
|
||||
sctp_new_association_resp->sctp_state,
|
||||
|
||||
@@ -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 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 } };
|
||||
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->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,
|
||||
// return -1;
|
||||
// }
|
||||
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;
|
||||
}
|
||||
|
||||
int CU_handle_UE_CONTEXT_SETUP_RESPONSE(instance_t instance,
|
||||
uint32_t assoc_id,
|
||||
uint32_t stream,
|
||||
F1AP_F1AP_PDU_t *pdu) {
|
||||
int CU_handle_UE_CONTEXT_SETUP_RESPONSE(instance_t instance, sctp_assoc_t assoc_id, uint32_t stream, F1AP_F1AP_PDU_t *pdu)
|
||||
{
|
||||
MessageDef *msg_p;
|
||||
F1AP_UEContextSetupResponse_t *container;
|
||||
F1AP_UEContextSetupResponseIEs_t *ie;
|
||||
@@ -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;
|
||||
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);
|
||||
GtpuUpdateTunnelOutgoingAddressAndTeid(getCxt(CUtype, instance)->gtpInst,
|
||||
GtpuUpdateTunnelOutgoingAddressAndTeid(getCxt(instance)->gtpInst,
|
||||
f1ap_ue_context_setup_resp->gNB_DU_ue_id,
|
||||
(ebi_t)drbs_setup_item_p->dRBID,
|
||||
drb_p->up_dl_tnl[0].tl_address,
|
||||
@@ -766,14 +764,12 @@ int CU_handle_UE_CONTEXT_SETUP_RESPONSE(instance_t instance,
|
||||
return 0;
|
||||
}
|
||||
|
||||
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)
|
||||
{
|
||||
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);
|
||||
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,
|
||||
return -1;
|
||||
}
|
||||
|
||||
f1ap_itti_send_sctp_data_req(true, instance, buffer, len, 0);
|
||||
f1ap_itti_send_sctp_data_req(instance, buffer, len);
|
||||
return 0;
|
||||
}
|
||||
int CU_handle_UE_CONTEXT_RELEASE_COMPLETE(instance_t instance,
|
||||
uint32_t assoc_id,
|
||||
uint32_t stream,
|
||||
F1AP_F1AP_PDU_t *pdu) {
|
||||
|
||||
int CU_handle_UE_CONTEXT_RELEASE_COMPLETE(instance_t instance, sctp_assoc_t assoc_id, uint32_t stream, F1AP_F1AP_PDU_t *pdu)
|
||||
{
|
||||
F1AP_UEContextReleaseComplete_t *container;
|
||||
F1AP_UEContextReleaseCompleteIEs_t *ie;
|
||||
DevAssert(pdu);
|
||||
@@ -963,7 +958,8 @@ int CU_send_UE_CONTEXT_MODIFICATION_REQUEST(instance_t instance, f1ap_ue_context
|
||||
uint8_t *buffer=NULL;
|
||||
uint32_t len=0;
|
||||
// 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 */
|
||||
/* 0. Message Type */
|
||||
pdu.present = F1AP_F1AP_PDU_PR_initiatingMessage;
|
||||
@@ -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");
|
||||
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;
|
||||
}
|
||||
|
||||
int CU_handle_UE_CONTEXT_MODIFICATION_RESPONSE(instance_t instance,
|
||||
uint32_t assoc_id,
|
||||
uint32_t stream,
|
||||
F1AP_F1AP_PDU_t *pdu) {
|
||||
|
||||
int CU_handle_UE_CONTEXT_MODIFICATION_RESPONSE(instance_t instance, sctp_assoc_t assoc_id, uint32_t stream, F1AP_F1AP_PDU_t *pdu)
|
||||
{
|
||||
MessageDef *msg_p;
|
||||
F1AP_UEContextModificationResponse_t *container;
|
||||
F1AP_UEContextModificationResponseIEs_t *ie;
|
||||
@@ -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;
|
||||
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);
|
||||
GtpuUpdateTunnelOutgoingAddressAndTeid(getCxt(CUtype, instance)->gtpInst,
|
||||
GtpuUpdateTunnelOutgoingAddressAndTeid(getCxt(instance)->gtpInst,
|
||||
f1ap_ue_context_modification_resp->gNB_CU_ue_id,
|
||||
(ebi_t)drbs_setupmod_item_p->dRBID,
|
||||
drb_p->up_dl_tnl[0].tl_address,
|
||||
@@ -1694,14 +1687,12 @@ int CU_handle_UE_CONTEXT_MODIFICATION_RESPONSE(instance_t instance,
|
||||
return 0;
|
||||
}
|
||||
|
||||
int CU_handle_UE_CONTEXT_MODIFICATION_FAILURE(instance_t instance,
|
||||
uint32_t assoc_id,
|
||||
uint32_t stream,
|
||||
F1AP_F1AP_PDU_t *pdu) {
|
||||
AssertFatal(1==0,"Not implemented yet\n");
|
||||
int CU_handle_UE_CONTEXT_MODIFICATION_FAILURE(instance_t instance, sctp_assoc_t assoc_id, uint32_t stream, 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);
|
||||
|
||||
@@ -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");
|
||||
return -1;
|
||||
}
|
||||
f1ap_itti_send_sctp_data_req(true, instance, buffer, len, 0);
|
||||
f1ap_itti_send_sctp_data_req(instance, buffer, len);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -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");
|
||||
return -1;
|
||||
}
|
||||
f1ap_itti_send_sctp_data_req(true, instance, buffer, len, 0);
|
||||
f1ap_itti_send_sctp_data_req(instance, buffer, len);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -39,24 +39,14 @@
|
||||
int CU_send_UE_CONTEXT_SETUP_REQUEST(instance_t instance,
|
||||
f1ap_ue_context_setup_t *f1ap_ue_context_setup_req);
|
||||
|
||||
int CU_handle_UE_CONTEXT_SETUP_RESPONSE(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,
|
||||
uint32_t assoc_id,
|
||||
uint32_t stream,
|
||||
F1AP_F1AP_PDU_t *pdu);
|
||||
int CU_handle_UE_CONTEXT_SETUP_RESPONSE(instance_t instance, sctp_assoc_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)
|
||||
*/
|
||||
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);
|
||||
|
||||
/*
|
||||
* UE Context Release (gNB-CU initiated)
|
||||
@@ -64,28 +54,19 @@ int CU_handle_UE_CONTEXT_RELEASE_REQUEST(instance_t instance,
|
||||
int CU_send_UE_CONTEXT_RELEASE_COMMAND(instance_t instance,
|
||||
f1ap_ue_context_release_cmd_t *cmd);
|
||||
|
||||
int CU_handle_UE_CONTEXT_RELEASE_COMPLETE(instance_t instance,
|
||||
uint32_t assoc_id,
|
||||
uint32_t stream,
|
||||
F1AP_F1AP_PDU_t *pdu);
|
||||
int CU_handle_UE_CONTEXT_RELEASE_COMPLETE(instance_t instance, sctp_assoc_t assoc_id, uint32_t stream, F1AP_F1AP_PDU_t *pdu);
|
||||
|
||||
/*
|
||||
* 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_handle_UE_CONTEXT_MODIFICATION_RESPONSE(instance_t instance,
|
||||
uint32_t assoc_id,
|
||||
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);
|
||||
int CU_handle_UE_CONTEXT_MODIFICATION_RESPONSE(instance_t instance, sctp_assoc_t assoc_id, uint32_t stream, F1AP_F1AP_PDU_t *pdu);
|
||||
int CU_handle_UE_CONTEXT_MODIFICATION_FAILURE(instance_t instance, sctp_assoc_t assoc_id, uint32_t stream, F1AP_F1AP_PDU_t *pdu);
|
||||
|
||||
/*
|
||||
* 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);
|
||||
|
||||
|
||||
@@ -34,6 +34,7 @@
|
||||
#include "f1ap_encoder.h"
|
||||
#include "f1ap_itti_messaging.h"
|
||||
#include "f1ap_du_interface_management.h"
|
||||
#include "openair2/LAYER2/NR_MAC_gNB/mac_rrc_dl_handler.h"
|
||||
#include "assertions.h"
|
||||
|
||||
#include "GNB_APP/gnb_paramdef.h"
|
||||
@@ -49,10 +50,8 @@ int to_NRNRB(int nrb) {
|
||||
AssertFatal(1==0,"nrb %d is not in the list of possible NRNRB\n",nrb);
|
||||
}
|
||||
|
||||
int DU_handle_RESET(instance_t instance,
|
||||
uint32_t assoc_id,
|
||||
uint32_t stream,
|
||||
F1AP_F1AP_PDU_t *pdu) {
|
||||
int DU_handle_RESET(instance_t instance, sctp_assoc_t assoc_id, uint32_t stream, F1AP_F1AP_PDU_t *pdu)
|
||||
{
|
||||
AssertFatal(1==0,"Not implemented yet\n");
|
||||
}
|
||||
|
||||
@@ -64,14 +63,11 @@ int DU_send_RESET(instance_t instance, F1AP_Reset_t *Reset) {
|
||||
AssertFatal(1==0,"Not implemented yet\n");
|
||||
}
|
||||
|
||||
int DU_handle_RESET_ACKNOWLEDGE(instance_t instance,
|
||||
uint32_t assoc_id,
|
||||
uint32_t stream,
|
||||
F1AP_F1AP_PDU_t *pdu) {
|
||||
int DU_handle_RESET_ACKNOWLEDGE(instance_t instance, sctp_assoc_t assoc_id, uint32_t stream, F1AP_F1AP_PDU_t *pdu)
|
||||
{
|
||||
AssertFatal(1==0,"Not implemented yet\n");
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
Error Indication
|
||||
*/
|
||||
@@ -80,22 +76,18 @@ int DU_send_ERROR_INDICATION(instance_t instance, F1AP_F1AP_PDU_t *pdu_p) {
|
||||
AssertFatal(1==0,"Not implemented yet\n");
|
||||
}
|
||||
|
||||
int DU_handle_ERROR_INDICATION(instance_t instance,
|
||||
uint32_t assoc_id,
|
||||
uint32_t stream,
|
||||
F1AP_F1AP_PDU_t *pdu) {
|
||||
int DU_handle_ERROR_INDICATION(instance_t instance, sctp_assoc_t assoc_id, uint32_t stream, F1AP_F1AP_PDU_t *pdu)
|
||||
{
|
||||
AssertFatal(1==0,"Not implemented yet\n");
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
F1 Setup
|
||||
*/
|
||||
|
||||
// SETUP REQUEST
|
||||
int DU_send_F1_SETUP_REQUEST(instance_t instance) {
|
||||
instance_t nb_mod_idP=0;
|
||||
instance_t du_mod_idP=0;
|
||||
int DU_send_F1_SETUP_REQUEST(instance_t instance, f1ap_setup_req_t *setup_req)
|
||||
{
|
||||
F1AP_F1AP_PDU_t pdu= {0};
|
||||
uint8_t *buffer;
|
||||
uint32_t len;
|
||||
@@ -113,23 +105,23 @@ int DU_send_F1_SETUP_REQUEST(instance_t instance) {
|
||||
ieC1->id = F1AP_ProtocolIE_ID_id_TransactionID;
|
||||
ieC1->criticality = F1AP_Criticality_reject;
|
||||
ieC1->value.present = F1AP_F1SetupRequestIEs__value_PR_TransactionID;
|
||||
ieC1->value.choice.TransactionID = F1AP_get_next_transaction_identifier(nb_mod_idP, du_mod_idP);
|
||||
ieC1->value.choice.TransactionID = F1AP_get_next_transaction_identifier(0, 0);
|
||||
/* mandatory */
|
||||
/* c2. GNB_DU_ID (integer value) */
|
||||
asn1cSequenceAdd(f1Setup->protocolIEs.list, F1AP_F1SetupRequestIEs_t, ieC2);
|
||||
ieC2->id = F1AP_ProtocolIE_ID_id_gNB_DU_ID;
|
||||
ieC2->criticality = F1AP_Criticality_reject;
|
||||
ieC2->value.present = F1AP_F1SetupRequestIEs__value_PR_GNB_DU_ID;
|
||||
asn_int642INTEGER(&ieC2->value.choice.GNB_DU_ID, f1ap_req(false, instance)->gNB_DU_id);
|
||||
asn_int642INTEGER(&ieC2->value.choice.GNB_DU_ID, setup_req->gNB_DU_id);
|
||||
|
||||
/* optional */
|
||||
/* c3. GNB_DU_Name */
|
||||
if (f1ap_req(false,instance)->gNB_DU_name != NULL) {
|
||||
if (setup_req->gNB_DU_name != NULL) {
|
||||
asn1cSequenceAdd(f1Setup->protocolIEs.list, F1AP_F1SetupRequestIEs_t, ieC3);
|
||||
ieC3->id = F1AP_ProtocolIE_ID_id_gNB_DU_Name;
|
||||
ieC3->criticality = F1AP_Criticality_ignore;
|
||||
ieC3->value.present = F1AP_F1SetupRequestIEs__value_PR_GNB_DU_Name;
|
||||
char *gNB_DU_name=f1ap_req(false, instance)->gNB_DU_name;
|
||||
char *gNB_DU_name=setup_req->gNB_DU_name;
|
||||
OCTET_STRING_fromBuf(&ieC3->value.choice.GNB_DU_Name, gNB_DU_name, strlen(gNB_DU_name));
|
||||
}
|
||||
|
||||
@@ -139,13 +131,13 @@ int DU_send_F1_SETUP_REQUEST(instance_t instance) {
|
||||
ieCells->id = F1AP_ProtocolIE_ID_id_gNB_DU_Served_Cells_List;
|
||||
ieCells->criticality = F1AP_Criticality_reject;
|
||||
ieCells->value.present = F1AP_F1SetupRequestIEs__value_PR_GNB_DU_Served_Cells_List;
|
||||
int num_cells_available = f1ap_req(false, instance)->num_cells_available;
|
||||
int num_cells_available = setup_req->num_cells_available;
|
||||
LOG_D(F1AP, "num_cells_available = %d \n", num_cells_available);
|
||||
|
||||
for (int i=0; i<num_cells_available; i++) {
|
||||
/* mandatory */
|
||||
/* 4.1 served cells item */
|
||||
cellIDs_t *cell=&f1ap_req(false, instance)->cell[i];
|
||||
f1ap_served_cell_info_t *cell = &setup_req->cell[i].info;
|
||||
asn1cSequenceAdd(ieCells->value.choice.GNB_DU_Served_Cells_List.list,
|
||||
F1AP_GNB_DU_Served_Cells_ItemIEs_t, duServedCell);
|
||||
duServedCell->id = F1AP_ProtocolIE_ID_id_GNB_DU_Served_Cells_Item;
|
||||
@@ -154,13 +146,15 @@ int DU_send_F1_SETUP_REQUEST(instance_t instance) {
|
||||
F1AP_GNB_DU_Served_Cells_Item_t *gnb_du_served_cells_item=&duServedCell->value.choice.GNB_DU_Served_Cells_Item;
|
||||
/* 4.1.1 served cell Information */
|
||||
F1AP_Served_Cell_Information_t *served_cell_information= &gnb_du_served_cells_item->served_Cell_Information;
|
||||
addnRCGI(served_cell_information->nRCGI,cell);
|
||||
addnRCGI(served_cell_information->nRCGI, cell);
|
||||
/* - nRPCI */
|
||||
served_cell_information->nRPCI = cell->nr_pci; // int 0..1007
|
||||
/* - fiveGS_TAC */
|
||||
uint32_t tac=htonl(cell->tac);
|
||||
asn1cCalloc(served_cell_information->fiveGS_TAC, netOrder);
|
||||
OCTET_STRING_fromBuf(netOrder, ((char *)&tac)+1, 3);
|
||||
if (cell->tac != NULL) {
|
||||
uint32_t tac=htonl(*cell->tac);
|
||||
asn1cCalloc(served_cell_information->fiveGS_TAC, netOrder);
|
||||
OCTET_STRING_fromBuf(netOrder, ((char *)&tac)+1, 3);
|
||||
}
|
||||
|
||||
/* - Configured_EPS_TAC */
|
||||
if(0) {
|
||||
@@ -170,7 +164,7 @@ int DU_send_F1_SETUP_REQUEST(instance_t instance) {
|
||||
|
||||
/* servedPLMN information */
|
||||
asn1cSequenceAdd(served_cell_information->servedPLMNs.list, F1AP_ServedPLMNs_Item_t,servedPLMN_item);
|
||||
MCC_MNC_TO_PLMNID(cell->mcc, cell->mnc, cell->mnc_digit_length, &servedPLMN_item->pLMN_Identity);
|
||||
MCC_MNC_TO_PLMNID(cell->plmn.mcc, cell->plmn.mnc, cell->plmn.mnc_digit_length, &servedPLMN_item->pLMN_Identity);
|
||||
// // /* - CHOICE NR-MODE-Info */
|
||||
F1AP_NR_Mode_Info_t *nR_Mode_Info= &served_cell_information->nR_Mode_Info;
|
||||
F1AP_ProtocolExtensionContainer_10696P34_t *p = calloc(1, sizeof(*p));
|
||||
@@ -205,129 +199,85 @@ int DU_send_F1_SETUP_REQUEST(instance_t instance) {
|
||||
}
|
||||
}
|
||||
|
||||
if (f1ap_req(false, instance)->fdd_flag) { // FDD
|
||||
if (setup_req->cell[i].info.mode == F1AP_MODE_FDD) { // FDD
|
||||
const f1ap_fdd_info_t *fdd = &setup_req->cell[i].info.fdd;
|
||||
nR_Mode_Info->present = F1AP_NR_Mode_Info_PR_fDD;
|
||||
asn1cCalloc(nR_Mode_Info->choice.fDD, fDD_Info);
|
||||
/* FDD.1 UL NRFreqInfo */
|
||||
/* FDD.1.1 UL NRFreqInfo ARFCN */
|
||||
fDD_Info->uL_NRFreqInfo.nRARFCN = f1ap_req(false,instance)->nr_mode_info[i].fdd.ul_nr_arfcn; // Integer
|
||||
fDD_Info->uL_NRFreqInfo.nRARFCN = fdd->ul_freqinfo.arfcn; // Integer
|
||||
|
||||
/* FDD.1.2 F1AP_SUL_Information */
|
||||
if(0) { // Optional
|
||||
asn1cCalloc(fDD_Info->uL_NRFreqInfo.sul_Information, fdd_sul_info);
|
||||
fdd_sul_info->sUL_NRARFCN = 0;
|
||||
fdd_sul_info->sUL_transmission_Bandwidth.nRSCS = 0;
|
||||
fdd_sul_info->sUL_transmission_Bandwidth.nRNRB = 0;
|
||||
}
|
||||
|
||||
/* FDD.1.3 freqBandListNr */
|
||||
int fdd_ul_num_available_freq_Bands = f1ap_req(false,instance)->nr_mode_info[i].fdd.ul_num_frequency_bands;
|
||||
LOG_D(F1AP, "fdd_ul_num_available_freq_Bands = %d \n", fdd_ul_num_available_freq_Bands);
|
||||
|
||||
int fdd_ul_num_available_freq_Bands = 1;
|
||||
for (int fdd_ul_j=0; fdd_ul_j<fdd_ul_num_available_freq_Bands; fdd_ul_j++) {
|
||||
asn1cSequenceAdd(fDD_Info->uL_NRFreqInfo.freqBandListNr.list, F1AP_FreqBandNrItem_t, nr_freqBandNrItem);
|
||||
/* FDD.1.3.1 freqBandIndicatorNr*/
|
||||
nr_freqBandNrItem->freqBandIndicatorNr = f1ap_req(false,instance)->nr_mode_info[i].fdd.ul_nr_band[fdd_ul_j]; //
|
||||
/* FDD.1.3.2 supportedSULBandList*/
|
||||
int num_available_supported_SULBands = f1ap_req(false,instance)->nr_mode_info[i].fdd.ul_num_sul_frequency_bands;
|
||||
LOG_D(F1AP, "num_available_supported_SULBands = %d \n", num_available_supported_SULBands);
|
||||
nr_freqBandNrItem->freqBandIndicatorNr = fdd->ul_freqinfo.band;
|
||||
|
||||
for (int fdd_ul_k=0; fdd_ul_k<num_available_supported_SULBands; fdd_ul_k++) {
|
||||
asn1cSequenceAdd(nr_freqBandNrItem->supportedSULBandList.list, F1AP_SupportedSULFreqBandItem_t, nr_supportedSULFreqBandItem);
|
||||
/* FDD.1.3.2.1 freqBandIndicatorNr */
|
||||
nr_supportedSULFreqBandItem->freqBandIndicatorNr = f1ap_req(false,instance)->nr_mode_info[i].fdd.ul_nr_sul_band[fdd_ul_k]; //
|
||||
} // for FDD : UL supported_SULBands
|
||||
/* FDD.1.3.2 supportedSULBandList*/
|
||||
} // for FDD : UL freq_Bands
|
||||
|
||||
/* FDD.2 DL NRFreqInfo */
|
||||
/* FDD.2.1 DL NRFreqInfo ARFCN */
|
||||
fDD_Info->dL_NRFreqInfo.nRARFCN = f1ap_req(false,instance)->nr_mode_info[i].fdd.dl_nr_arfcn; // Integer
|
||||
fDD_Info->dL_NRFreqInfo.nRARFCN = fdd->dl_freqinfo.arfcn; // Integer
|
||||
|
||||
/* FDD.2.2 F1AP_SUL_Information */
|
||||
if(0) { // Optional
|
||||
F1AP_SUL_Information_t *fdd_sul_info=fDD_Info->dL_NRFreqInfo.sul_Information;
|
||||
fdd_sul_info->sUL_NRARFCN = 0;
|
||||
fdd_sul_info->sUL_transmission_Bandwidth.nRSCS = 0;
|
||||
fdd_sul_info->sUL_transmission_Bandwidth.nRNRB = 0;
|
||||
}
|
||||
|
||||
/* FDD.2.3 freqBandListNr */
|
||||
int fdd_dl_num_available_freq_Bands = f1ap_req(false,instance)->nr_mode_info[i].fdd.dl_num_frequency_bands;
|
||||
LOG_D(F1AP, "fdd_dl_num_available_freq_Bands = %d \n", fdd_dl_num_available_freq_Bands);
|
||||
|
||||
int fdd_dl_num_available_freq_Bands = 1;
|
||||
for (int fdd_dl_j=0; fdd_dl_j<fdd_dl_num_available_freq_Bands; fdd_dl_j++) {
|
||||
asn1cSequenceAdd(fDD_Info->dL_NRFreqInfo.freqBandListNr.list, F1AP_FreqBandNrItem_t, nr_freqBandNrItem);
|
||||
/* FDD.2.3.1 freqBandIndicatorNr*/
|
||||
nr_freqBandNrItem->freqBandIndicatorNr = f1ap_req(false,instance)->nr_mode_info[i].fdd.dl_nr_band[fdd_dl_j]; //
|
||||
/* FDD.2.3.2 supportedSULBandList*/
|
||||
int num_available_supported_SULBands = f1ap_req(false,instance)->nr_mode_info[i].fdd.dl_num_sul_frequency_bands;
|
||||
LOG_D(F1AP, "num_available_supported_SULBands = %d \n", num_available_supported_SULBands);
|
||||
nr_freqBandNrItem->freqBandIndicatorNr = fdd->dl_freqinfo.band;
|
||||
|
||||
for (int fdd_dl_k=0; fdd_dl_k<num_available_supported_SULBands; fdd_dl_k++) {
|
||||
asn1cSequenceAdd(nr_freqBandNrItem->supportedSULBandList.list, F1AP_SupportedSULFreqBandItem_t, nr_supportedSULFreqBandItem);
|
||||
/* FDD.2.3.2.1 freqBandIndicatorNr */
|
||||
nr_supportedSULFreqBandItem->freqBandIndicatorNr = f1ap_req(false,instance)->nr_mode_info[i].fdd.dl_nr_sul_band[fdd_dl_k]; //
|
||||
} // for FDD : DL supported_SULBands
|
||||
/* FDD.2.3.2 supportedSULBandList*/
|
||||
} // for FDD : DL freq_Bands
|
||||
|
||||
/* FDD.3 UL Transmission Bandwidth */
|
||||
fDD_Info->uL_Transmission_Bandwidth.nRSCS = f1ap_req(false,instance)->nr_mode_info[i].fdd.ul_scs;
|
||||
fDD_Info->uL_Transmission_Bandwidth.nRNRB = to_NRNRB(f1ap_req(false,instance)->nr_mode_info[i].fdd.ul_nrb);
|
||||
fDD_Info->uL_Transmission_Bandwidth.nRSCS = fdd->ul_tbw.scs;
|
||||
fDD_Info->uL_Transmission_Bandwidth.nRNRB = to_NRNRB(fdd->ul_tbw.nrb);
|
||||
/* FDD.4 DL Transmission Bandwidth */
|
||||
fDD_Info->dL_Transmission_Bandwidth.nRSCS = f1ap_req(false,instance)->nr_mode_info[i].fdd.dl_scs;
|
||||
fDD_Info->dL_Transmission_Bandwidth.nRNRB = to_NRNRB(f1ap_req(false,instance)->nr_mode_info[i].fdd.dl_nrb);
|
||||
} else { // TDD
|
||||
fDD_Info->dL_Transmission_Bandwidth.nRSCS = fdd->dl_tbw.scs;
|
||||
fDD_Info->dL_Transmission_Bandwidth.nRNRB = to_NRNRB(fdd->dl_tbw.nrb);
|
||||
} else if (setup_req->cell[i].info.mode == F1AP_MODE_TDD) { // TDD
|
||||
const f1ap_tdd_info_t *tdd = &setup_req->cell[i].info.tdd;
|
||||
nR_Mode_Info->present = F1AP_NR_Mode_Info_PR_tDD;
|
||||
asn1cCalloc(nR_Mode_Info->choice.tDD, tDD_Info);
|
||||
/* TDD.1 nRFreqInfo */
|
||||
/* TDD.1.1 nRFreqInfo ARFCN */
|
||||
tDD_Info->nRFreqInfo.nRARFCN = f1ap_req(false,instance)->nr_mode_info[i].tdd.nr_arfcn; // Integer
|
||||
tDD_Info->nRFreqInfo.nRARFCN = tdd->freqinfo.arfcn; // Integer
|
||||
|
||||
/* TDD.1.2 F1AP_SUL_Information */
|
||||
if(0) { // Optional
|
||||
F1AP_SUL_Information_t *tdd_sul_info= tDD_Info->nRFreqInfo.sul_Information;
|
||||
tdd_sul_info->sUL_NRARFCN = 0;
|
||||
tdd_sul_info->sUL_transmission_Bandwidth.nRSCS = 0;
|
||||
tdd_sul_info->sUL_transmission_Bandwidth.nRNRB = 0;
|
||||
}
|
||||
|
||||
/* TDD.1.3 freqBandListNr */
|
||||
int tdd_num_available_freq_Bands = f1ap_req(false,instance)->nr_mode_info[i].tdd.num_frequency_bands;
|
||||
LOG_D(F1AP, "tdd_num_available_freq_Bands = %d \n", tdd_num_available_freq_Bands);
|
||||
|
||||
int tdd_num_available_freq_Bands = 1;
|
||||
for (int j=0; j<tdd_num_available_freq_Bands; j++) {
|
||||
asn1cSequenceAdd(tDD_Info->nRFreqInfo.freqBandListNr.list, F1AP_FreqBandNrItem_t, nr_freqBandNrItem);
|
||||
/* TDD.1.3.1 freqBandIndicatorNr*/
|
||||
nr_freqBandNrItem->freqBandIndicatorNr = *f1ap_req(false,instance)->nr_mode_info[i].tdd.nr_band; //
|
||||
nr_freqBandNrItem->freqBandIndicatorNr = tdd->freqinfo.band;
|
||||
/* TDD.1.3.2 supportedSULBandList*/
|
||||
int num_available_supported_SULBands = f1ap_req(false,instance)->nr_mode_info[i].tdd.num_sul_frequency_bands;
|
||||
LOG_D(F1AP, "num_available_supported_SULBands = %d \n", num_available_supported_SULBands);
|
||||
|
||||
for (int k=0; k<num_available_supported_SULBands; k++) {
|
||||
asn1cSequenceAdd(nr_freqBandNrItem->supportedSULBandList.list,F1AP_SupportedSULFreqBandItem_t, nr_supportedSULFreqBandItem);
|
||||
/* TDD.1.3.2.1 freqBandIndicatorNr */
|
||||
nr_supportedSULFreqBandItem->freqBandIndicatorNr = *f1ap_req(false,instance)->nr_mode_info[i].tdd.nr_sul_band; //
|
||||
} // for TDD : supported_SULBands
|
||||
} // for TDD : freq_Bands
|
||||
|
||||
/* TDD.2 transmission_Bandwidth */
|
||||
tDD_Info->transmission_Bandwidth.nRSCS = f1ap_req(false,instance)->nr_mode_info[i].tdd.scs;
|
||||
tDD_Info->transmission_Bandwidth.nRNRB = to_NRNRB(f1ap_req(false,instance)->nr_mode_info[i].tdd.nrb);
|
||||
} // if nR_Mode_Info
|
||||
tDD_Info->transmission_Bandwidth.nRSCS = tdd->tbw.scs;
|
||||
tDD_Info->transmission_Bandwidth.nRNRB = to_NRNRB(tdd->tbw.nrb);
|
||||
} else {
|
||||
AssertFatal(false, "unknown mode %d\n", setup_req->cell[i].info.mode);
|
||||
}
|
||||
|
||||
/* - measurementTimingConfiguration */
|
||||
char *measurementTimingConfiguration = f1ap_req(false,instance)->measurement_timing_information[i]; // sept. 2018
|
||||
char *measurementTimingConfiguration = cell->measurement_timing_information; // sept. 2018
|
||||
OCTET_STRING_fromBuf(&served_cell_information->measurementTimingConfiguration,
|
||||
measurementTimingConfiguration,
|
||||
strlen(measurementTimingConfiguration));
|
||||
asn1cCalloc(gnb_du_served_cells_item->gNB_DU_System_Information, gNB_DU_System_Information);
|
||||
/* 4.1.2 gNB-DU System Information */
|
||||
OCTET_STRING_fromBuf(&gNB_DU_System_Information->mIB_message, // sept. 2018
|
||||
(const char *)f1ap_req(false,instance)->mib[i], //f1ap_du_data->mib,
|
||||
f1ap_req(false,instance)->mib_length[i]);
|
||||
OCTET_STRING_fromBuf(&gNB_DU_System_Information->sIB1_message, // sept. 2018
|
||||
(const char *)f1ap_req(false,instance)->sib1[i],
|
||||
f1ap_req(false,instance)->sib1_length[i]);
|
||||
AssertFatal(setup_req->cell[i].sys_info != NULL, "assume that sys_info is present, which is not the case\n");
|
||||
const f1ap_gnb_du_system_info_t *sys_info = setup_req->cell[i].sys_info;
|
||||
OCTET_STRING_fromBuf(&gNB_DU_System_Information->mIB_message, (const char *)sys_info->mib, sys_info->mib_length);
|
||||
OCTET_STRING_fromBuf(&gNB_DU_System_Information->sIB1_message, (const char *)sys_info->sib1, sys_info->sib1_length);
|
||||
}
|
||||
|
||||
/* mandatory */
|
||||
@@ -348,14 +298,12 @@ int DU_send_F1_SETUP_REQUEST(instance_t instance) {
|
||||
}
|
||||
|
||||
ASN_STRUCT_RESET(asn_DEF_F1AP_F1AP_PDU, &pdu);
|
||||
f1ap_itti_send_sctp_data_req(false, instance, buffer, len, 0);
|
||||
f1ap_itti_send_sctp_data_req(instance, buffer, len);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int DU_handle_F1_SETUP_RESPONSE(instance_t instance,
|
||||
uint32_t assoc_id,
|
||||
uint32_t stream,
|
||||
F1AP_F1AP_PDU_t *pdu) {
|
||||
int DU_handle_F1_SETUP_RESPONSE(instance_t instance, sctp_assoc_t assoc_id, uint32_t stream, F1AP_F1AP_PDU_t *pdu)
|
||||
{
|
||||
LOG_D(F1AP, "DU_handle_F1_SETUP_RESPONSE\n");
|
||||
AssertFatal(pdu->present == F1AP_F1AP_PDU_PR_successfulOutcome,
|
||||
"pdu->present != F1AP_F1AP_PDU_PR_successfulOutcome\n");
|
||||
@@ -370,9 +318,7 @@ int DU_handle_F1_SETUP_RESPONSE(instance_t instance,
|
||||
int TransactionId = -1;
|
||||
int num_cells_to_activate = 0;
|
||||
F1AP_Cells_to_be_Activated_List_Item_t *cell;
|
||||
MessageDef *msg_p = itti_alloc_new_message (TASK_DU_F1, 0, F1AP_SETUP_RESP);
|
||||
LOG_D(F1AP, "F1AP: F1Setup-Resp: protocolIEs.list.count %d\n",
|
||||
in->protocolIEs.list.count);
|
||||
f1ap_setup_resp_t resp = {0};
|
||||
|
||||
for (int i=0; i < in->protocolIEs.list.count; i++) {
|
||||
ie = in->protocolIEs.list.array[i];
|
||||
@@ -393,11 +339,10 @@ int DU_handle_F1_SETUP_RESPONSE(instance_t instance,
|
||||
"ie->criticality != F1AP_Criticality_ignore\n");
|
||||
AssertFatal(ie->value.present == F1AP_F1SetupResponseIEs__value_PR_GNB_CU_Name,
|
||||
"ie->value.present != F1AP_F1SetupResponseIEs__value_PR_TransactionID\n");
|
||||
F1AP_SETUP_RESP (msg_p).gNB_CU_name = malloc(ie->value.choice.GNB_CU_Name.size+1);
|
||||
memcpy(F1AP_SETUP_RESP (msg_p).gNB_CU_name,ie->value.choice.GNB_CU_Name.buf,ie->value.choice.GNB_CU_Name.size);
|
||||
F1AP_SETUP_RESP (msg_p).gNB_CU_name[ie->value.choice.GNB_CU_Name.size]='\0';
|
||||
LOG_D(F1AP, "F1AP: F1Setup-Resp: gNB_CU_name %s\n",
|
||||
F1AP_SETUP_RESP (msg_p).gNB_CU_name);
|
||||
resp.gNB_CU_name = malloc(ie->value.choice.GNB_CU_Name.size+1);
|
||||
memcpy(resp.gNB_CU_name, ie->value.choice.GNB_CU_Name.buf, ie->value.choice.GNB_CU_Name.size);
|
||||
resp.gNB_CU_name[ie->value.choice.GNB_CU_Name.size] = '\0';
|
||||
LOG_D(F1AP, "F1AP: F1Setup-Resp: gNB_CU_name %s\n", resp.gNB_CU_name);
|
||||
break;
|
||||
|
||||
case F1AP_ProtocolIE_ID_id_GNB_CU_RRC_Version:
|
||||
@@ -421,16 +366,17 @@ int DU_handle_F1_SETUP_RESPONSE(instance_t instance,
|
||||
AssertFatal(cells_to_be_activated_list_item_ies->value.present == F1AP_Cells_to_be_Activated_List_ItemIEs__value_PR_Cells_to_be_Activated_List_Item,
|
||||
"cells_to_be_activated_list_item_ies->value.present == F1AP_Cells_to_be_Activated_List_ItemIEs__value_PR_Cells_to_be_Activated_List_Item");
|
||||
cell = &cells_to_be_activated_list_item_ies->value.choice.Cells_to_be_Activated_List_Item;
|
||||
TBCD_TO_MCC_MNC(&cell->nRCGI.pLMN_Identity, F1AP_SETUP_RESP (msg_p).cells_to_activate[i].mcc, F1AP_SETUP_RESP (msg_p).cells_to_activate[i].mnc,
|
||||
F1AP_SETUP_RESP (msg_p).cells_to_activate[i].mnc_digit_length);
|
||||
TBCD_TO_MCC_MNC(&cell->nRCGI.pLMN_Identity,
|
||||
resp.cells_to_activate[i].plmn.mcc,
|
||||
resp.cells_to_activate[i].plmn.mnc,
|
||||
resp.cells_to_activate[i].plmn.mnc_digit_length);
|
||||
LOG_D(F1AP, "nr_cellId : %x %x %x %x %x\n",
|
||||
cell->nRCGI.nRCellIdentity.buf[0],
|
||||
cell->nRCGI.nRCellIdentity.buf[1],
|
||||
cell->nRCGI.nRCellIdentity.buf[2],
|
||||
cell->nRCGI.nRCellIdentity.buf[3],
|
||||
cell->nRCGI.nRCellIdentity.buf[4]);
|
||||
BIT_STRING_TO_NR_CELL_IDENTITY(&cell->nRCGI.nRCellIdentity,
|
||||
F1AP_SETUP_RESP (msg_p).cells_to_activate[i].nr_cellid);
|
||||
BIT_STRING_TO_NR_CELL_IDENTITY(&cell->nRCGI.nRCellIdentity, resp.cells_to_activate[i].nr_cellid);
|
||||
F1AP_ProtocolExtensionContainer_10696P112_t *ext = (F1AP_ProtocolExtensionContainer_10696P112_t *)cell->iE_Extensions;
|
||||
|
||||
if (ext==NULL)
|
||||
@@ -449,24 +395,26 @@ int DU_handle_F1_SETUP_RESPONSE(instance_t instance,
|
||||
case F1AP_Cells_to_be_Activated_List_ItemExtIEs__extensionValue_PR_AvailableSNPN_ID_List
|
||||
*/
|
||||
case F1AP_ProtocolIE_ID_id_gNB_CUSystemInformation: {
|
||||
F1AP_SETUP_RESP (msg_p).cells_to_activate[i].nrpci = (cell->nRPCI != NULL) ? *cell->nRPCI : 0;
|
||||
resp.cells_to_activate[i].nrpci = (cell->nRPCI != NULL) ? *cell->nRPCI : 0;
|
||||
F1AP_GNB_CUSystemInformation_t *gNB_CUSystemInformation = (F1AP_GNB_CUSystemInformation_t *)&cells_to_be_activated_list_itemExtIEs->extensionValue.choice.GNB_CUSystemInformation;
|
||||
F1AP_SETUP_RESP (msg_p).cells_to_activate[i].num_SI = gNB_CUSystemInformation->sibtypetobeupdatedlist.list.count;
|
||||
resp.cells_to_activate[i].num_SI = gNB_CUSystemInformation->sibtypetobeupdatedlist.list.count;
|
||||
AssertFatal(ext->list.count==1,"At least one SI message should be there, and only 1 for now!\n");
|
||||
LOG_D(F1AP, "F1AP: Cell %d MCC %d MNC %d NRCellid %lx num_si %d\n",
|
||||
i, F1AP_SETUP_RESP (msg_p).cells_to_activate[i].mcc, F1AP_SETUP_RESP (msg_p).cells_to_activate[i].mnc,
|
||||
F1AP_SETUP_RESP (msg_p).cells_to_activate[i].nr_cellid, F1AP_SETUP_RESP (msg_p).cells_to_activate[i].num_SI);
|
||||
LOG_D(F1AP,
|
||||
"F1AP: Cell %d MCC %d MNC %d NRCellid %lx num_si %d\n",
|
||||
i,
|
||||
resp.cells_to_activate[i].plmn.mcc,
|
||||
resp.cells_to_activate[i].plmn.mnc,
|
||||
resp.cells_to_activate[i].nr_cellid,
|
||||
resp.cells_to_activate[i].num_SI);
|
||||
|
||||
for (int si = 0; si < gNB_CUSystemInformation->sibtypetobeupdatedlist.list.count; si++) {
|
||||
F1AP_SibtypetobeupdatedListItem_t *sib_item = gNB_CUSystemInformation->sibtypetobeupdatedlist.list.array[si];
|
||||
size_t size = sib_item->sIBmessage.size;
|
||||
F1AP_SETUP_RESP (msg_p).cells_to_activate[i].SI_container_length[si] = size;
|
||||
resp.cells_to_activate[i].SI_container_length[si] = size;
|
||||
LOG_D(F1AP, "F1AP: SI_container_length[%d][%ld] %ld bytes\n", i, sib_item->sIBtype, size);
|
||||
F1AP_SETUP_RESP (msg_p).cells_to_activate[i].SI_container[si] = malloc(F1AP_SETUP_RESP (msg_p).cells_to_activate[i].SI_container_length[si]);
|
||||
memcpy((void *)F1AP_SETUP_RESP (msg_p).cells_to_activate[i].SI_container[si],
|
||||
(void *)sib_item->sIBmessage.buf,
|
||||
size);
|
||||
F1AP_SETUP_RESP (msg_p).cells_to_activate[i].SI_type[si]=sib_item->sIBtype;
|
||||
resp.cells_to_activate[i].SI_container[si] = malloc(resp.cells_to_activate[i].SI_container_length[si]);
|
||||
memcpy(resp.cells_to_activate[i].SI_container[si], sib_item->sIBmessage.buf, size);
|
||||
resp.cells_to_activate[i].SI_type[si]=sib_item->sIBtype;
|
||||
}
|
||||
|
||||
break;
|
||||
@@ -506,30 +454,26 @@ int DU_handle_F1_SETUP_RESPONSE(instance_t instance,
|
||||
|
||||
AssertFatal(TransactionId!=-1,"TransactionId was not sent\n");
|
||||
LOG_D(F1AP,"F1AP: num_cells_to_activate %d\n",num_cells_to_activate);
|
||||
F1AP_SETUP_RESP (msg_p).num_cells_to_activate = num_cells_to_activate;
|
||||
resp.num_cells_to_activate = num_cells_to_activate;
|
||||
|
||||
// tmp
|
||||
// F1AP_SETUP_RESP (msg_p).num_SI[0] = 1;
|
||||
for (int i=0; i<num_cells_to_activate; i++)
|
||||
AssertFatal(F1AP_SETUP_RESP (msg_p).cells_to_activate[i].num_SI > 0, "System Information %d is missing",i);
|
||||
AssertFatal(resp.cells_to_activate[i].num_SI == 0, "System Information handling not implemented");
|
||||
|
||||
LOG_D(F1AP, "Sending F1AP_SETUP_RESP ITTI message\n");
|
||||
itti_send_msg_to_task(TASK_GNB_APP, GNB_MODULE_ID_TO_INSTANCE(assoc_id), msg_p);
|
||||
f1_setup_response(&resp);
|
||||
return 0;
|
||||
}
|
||||
|
||||
// SETUP FAILURE
|
||||
int DU_handle_F1_SETUP_FAILURE(instance_t instance,
|
||||
uint32_t assoc_id,
|
||||
uint32_t stream,
|
||||
F1AP_F1AP_PDU_t *pdu) {
|
||||
LOG_E(F1AP, "DU_handle_F1_SETUP_FAILURE\n");
|
||||
int DU_handle_F1_SETUP_FAILURE(instance_t instance, sctp_assoc_t assoc_id, uint32_t stream, F1AP_F1AP_PDU_t *pdu)
|
||||
{
|
||||
F1AP_F1SetupFailure_t *out;
|
||||
F1AP_F1SetupFailureIEs_t *ie;
|
||||
f1ap_setup_failure_t fail = {0};
|
||||
out = &pdu->choice.unsuccessfulOutcome->value.choice.F1SetupFailure;
|
||||
/* Transaction ID */
|
||||
F1AP_FIND_PROTOCOLIE_BY_ID(F1AP_F1SetupFailureIEs_t, ie, out,
|
||||
F1AP_ProtocolIE_ID_id_TransactionID, true);
|
||||
F1AP_FIND_PROTOCOLIE_BY_ID(F1AP_F1SetupFailureIEs_t, ie, out, F1AP_ProtocolIE_ID_id_TransactionID, true);
|
||||
/* Cause */
|
||||
F1AP_FIND_PROTOCOLIE_BY_ID(F1AP_F1SetupFailureIEs_t, ie, out,
|
||||
F1AP_ProtocolIE_ID_id_Cause, true);
|
||||
@@ -540,10 +484,10 @@ int DU_handle_F1_SETUP_FAILURE(instance_t instance,
|
||||
F1AP_ProtocolIE_ID_id_TimeToWait, true);
|
||||
}
|
||||
|
||||
f1_setup_failure(&fail);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
gNB-DU Configuration Update
|
||||
*/
|
||||
@@ -569,7 +513,7 @@ int DU_send_gNB_DU_CONFIGURATION_UPDATE(instance_t instance,
|
||||
ie1->id = F1AP_ProtocolIE_ID_id_TransactionID;
|
||||
ie1->criticality = F1AP_Criticality_reject;
|
||||
ie1->value.present = F1AP_GNBDUConfigurationUpdateIEs__value_PR_TransactionID;
|
||||
ie1->value.choice.TransactionID = F1AP_get_next_transaction_identifier(instance, du_mod_idP);
|
||||
ie1->value.choice.TransactionID = F1AP_get_next_transaction_identifier(0, 0);
|
||||
/* mandatory */
|
||||
/* c2. Served_Cells_To_Add */
|
||||
asn1cSequenceAdd(out, F1AP_GNBDUConfigurationUpdateIEs_t, ie2);
|
||||
@@ -586,15 +530,17 @@ int DU_send_gNB_DU_CONFIGURATION_UPDATE(instance_t instance,
|
||||
F1AP_Served_Cells_To_Add_Item_t *served_cells_to_add_item= &served_cells_to_add_item_ies->value.choice.Served_Cells_To_Add_Item;
|
||||
F1AP_Served_Cell_Information_t *served_cell_information=&served_cells_to_add_item->served_Cell_Information;
|
||||
/* - nRCGI */
|
||||
addnRCGI(served_cell_information->nRCGI, &f1ap_setup_req->cell[j]);
|
||||
addnRCGI(served_cell_information->nRCGI, &f1ap_setup_req->cell[j].info);
|
||||
/* - nRPCI */
|
||||
/* 2.1.1 serverd cell Information */
|
||||
cellIDs_t *cell=&f1ap_req(false, instance)->cell[j];
|
||||
f1ap_served_cell_info_t *cell = &f1ap_setup_req->cell[j].info;
|
||||
served_cell_information->nRPCI = cell->nr_pci; // int 0..1007
|
||||
/* - fiveGS_TAC */
|
||||
uint32_t tac=htonl(cell->tac);
|
||||
served_cell_information->fiveGS_TAC=(F1AP_FiveGS_TAC_t *) calloc(1,sizeof(F1AP_FiveGS_TAC_t *));
|
||||
OCTET_STRING_fromBuf(served_cell_information->fiveGS_TAC, ((char *)&tac)+1, 3);
|
||||
if (cell->tac != NULL) {
|
||||
uint32_t tac = htonl(*cell->tac);
|
||||
served_cell_information->fiveGS_TAC = calloc(1, sizeof(*served_cell_information->fiveGS_TAC));
|
||||
OCTET_STRING_fromBuf(served_cell_information->fiveGS_TAC, ((char *)&tac)+1, 3);
|
||||
}
|
||||
|
||||
/* - Configured_EPS_TAC */
|
||||
if(1) {
|
||||
@@ -603,12 +549,12 @@ int DU_send_gNB_DU_CONFIGURATION_UPDATE(instance_t instance,
|
||||
}
|
||||
|
||||
asn1cSequenceAdd(served_cell_information->servedPLMNs.list, F1AP_ServedPLMNs_Item_t, servedPLMN_item);
|
||||
MCC_MNC_TO_PLMNID(cell->mcc, cell->mnc, cell->mnc_digit_length, &servedPLMN_item->pLMN_Identity);
|
||||
MCC_MNC_TO_PLMNID(cell->plmn.mcc, cell->plmn.mnc, cell->plmn.mnc_digit_length, &servedPLMN_item->pLMN_Identity);
|
||||
// // /* - CHOICE NR-MODE-Info */
|
||||
F1AP_NR_Mode_Info_t *nR_Mode_Info=&served_cell_information->nR_Mode_Info;
|
||||
LOG_E(F1AP,"Here hardcoded values instead of values from configuration file\n");
|
||||
|
||||
if (f1ap_setup_req->fdd_flag) {
|
||||
if (cell->mode == F1AP_MODE_FDD) {
|
||||
nR_Mode_Info->present = F1AP_NR_Mode_Info_PR_fDD;
|
||||
/* > FDD >> FDD Info */
|
||||
asn1cCalloc(nR_Mode_Info->choice.fDD, fDD_Info);
|
||||
@@ -630,7 +576,7 @@ int DU_send_gNB_DU_CONFIGURATION_UPDATE(instance_t instance,
|
||||
/* >>> DL Transmission Bandwidth */
|
||||
fDD_Info->dL_Transmission_Bandwidth.nRSCS = F1AP_NRSCS_scs15;
|
||||
fDD_Info->dL_Transmission_Bandwidth.nRNRB = F1AP_NRNRB_nrb11;
|
||||
} else { // TDD
|
||||
} else if (cell->mode == F1AP_MODE_TDD) { // TDD
|
||||
nR_Mode_Info->present = F1AP_NR_Mode_Info_PR_tDD;
|
||||
/* > TDD >> TDD Info */
|
||||
asn1cCalloc(nR_Mode_Info->choice.tDD, tDD_Info);
|
||||
@@ -642,6 +588,8 @@ int DU_send_gNB_DU_CONFIGURATION_UPDATE(instance_t instance,
|
||||
nr_supportedSULFreqBandItem->freqBandIndicatorNr = 444L;
|
||||
tDD_Info->transmission_Bandwidth.nRSCS= F1AP_NRSCS_scs15;
|
||||
tDD_Info->transmission_Bandwidth.nRNRB= F1AP_NRNRB_nrb11;
|
||||
} else {
|
||||
AssertFatal(false, "illegal mode %d\n", cell->mode);
|
||||
}
|
||||
|
||||
/* - measurementTimingConfiguration */
|
||||
@@ -668,7 +616,7 @@ int DU_send_gNB_DU_CONFIGURATION_UPDATE(instance_t instance,
|
||||
|
||||
for (int i=0; i<1; i++) {
|
||||
//
|
||||
cellIDs_t *cell=&f1ap_req(false, instance)->cell[i];
|
||||
f1ap_served_cell_info_t *cell = &f1ap_setup_req->cell[i].info;
|
||||
asn1cSequenceAdd(ie3->value.choice.Served_Cells_To_Modify_List.list, F1AP_Served_Cells_To_Modify_ItemIEs_t, served_cells_to_modify_item_ies);
|
||||
served_cells_to_modify_item_ies->id = F1AP_ProtocolIE_ID_id_Served_Cells_To_Modify_Item;
|
||||
served_cells_to_modify_item_ies->criticality = F1AP_Criticality_reject;
|
||||
@@ -681,11 +629,11 @@ int DU_send_gNB_DU_CONFIGURATION_UPDATE(instance_t instance,
|
||||
/* - nRCGI */
|
||||
//addnRGCI(served_cell_information->nRCGI,f1ap_setup_req->cell[i]);
|
||||
/* - nRPCI */
|
||||
served_cell_information->nRPCI = f1ap_setup_req->cell[i].nr_pci; // int 0..1007
|
||||
served_cell_information->nRPCI = cell->nr_pci; // int 0..1007
|
||||
/* - fiveGS_TAC */
|
||||
asn1cCalloc(served_cell_information->fiveGS_TAC, tac );
|
||||
OCTET_STRING_fromBuf(tac,
|
||||
(const char *) &f1ap_setup_req->cell[i].tac,
|
||||
(const char *) &cell->tac,
|
||||
3);
|
||||
|
||||
/* - Configured_EPS_TAC */
|
||||
@@ -697,11 +645,11 @@ int DU_send_gNB_DU_CONFIGURATION_UPDATE(instance_t instance,
|
||||
}
|
||||
|
||||
asn1cSequenceAdd(served_cell_information->servedPLMNs.list, F1AP_ServedPLMNs_Item_t, servedPLMN_item);
|
||||
MCC_MNC_TO_PLMNID(cell->mcc, cell->mnc, cell->mnc_digit_length, &servedPLMN_item->pLMN_Identity);
|
||||
MCC_MNC_TO_PLMNID(cell->plmn.mcc, cell->plmn.mnc, cell->plmn.mnc_digit_length, &servedPLMN_item->pLMN_Identity);
|
||||
// // /* - CHOICE NR-MODE-Info */
|
||||
F1AP_NR_Mode_Info_t *nR_Mode_Info= &served_cell_information->nR_Mode_Info;
|
||||
|
||||
if (f1ap_setup_req->fdd_flag) {
|
||||
if (cell->mode == F1AP_MODE_FDD) {
|
||||
nR_Mode_Info->present = F1AP_NR_Mode_Info_PR_fDD;
|
||||
/* > FDD >> FDD Info */
|
||||
asn1cCalloc(nR_Mode_Info->choice.fDD, fDD_Info);
|
||||
@@ -724,7 +672,7 @@ int DU_send_gNB_DU_CONFIGURATION_UPDATE(instance_t instance,
|
||||
/* >>> DL Transmission Bandwidth */
|
||||
fDD_Info->dL_Transmission_Bandwidth.nRSCS = F1AP_NRSCS_scs15;
|
||||
fDD_Info->dL_Transmission_Bandwidth.nRNRB = F1AP_NRNRB_nrb11;
|
||||
} else { // TDD
|
||||
} else if (cell->mode == F1AP_MODE_TDD) { // TDD
|
||||
nR_Mode_Info->present = F1AP_NR_Mode_Info_PR_tDD;
|
||||
/* > TDD >> TDD Info */
|
||||
asn1cCalloc(nR_Mode_Info->choice.tDD, tDD_Info);
|
||||
@@ -736,6 +684,8 @@ int DU_send_gNB_DU_CONFIGURATION_UPDATE(instance_t instance,
|
||||
nr_supportedSULFreqBandItem->freqBandIndicatorNr = 444L;
|
||||
tDD_Info->transmission_Bandwidth.nRSCS= F1AP_NRSCS_scs15;
|
||||
tDD_Info->transmission_Bandwidth.nRNRB= F1AP_NRNRB_nrb11;
|
||||
} else {
|
||||
AssertFatal(false, "unknown mode %d\n", cell->mode);
|
||||
}
|
||||
|
||||
/* - measurementTimingConfiguration */
|
||||
@@ -768,7 +718,7 @@ int DU_send_gNB_DU_CONFIGURATION_UPDATE(instance_t instance,
|
||||
served_cells_to_delete_item_ies->value.present = F1AP_Served_Cells_To_Delete_ItemIEs__value_PR_Served_Cells_To_Delete_Item;
|
||||
F1AP_Served_Cells_To_Delete_Item_t *served_cells_to_delete_item=&served_cells_to_delete_item_ies->value.choice.Served_Cells_To_Delete_Item;
|
||||
/* 3.1 oldNRCGI */
|
||||
addnRCGI(served_cells_to_delete_item->oldNRCGI, &f1ap_setup_req->cell[i]);
|
||||
addnRCGI(served_cells_to_delete_item->oldNRCGI, &f1ap_setup_req->cell[i].info);
|
||||
}
|
||||
|
||||
if (f1ap_encode_pdu(&pdu, &buffer, &len) < 0) {
|
||||
@@ -780,25 +730,21 @@ int DU_send_gNB_DU_CONFIGURATION_UPDATE(instance_t instance,
|
||||
return 0;
|
||||
}
|
||||
|
||||
int DU_handle_gNB_DU_CONFIGURATION_FAILURE(instance_t instance,
|
||||
uint32_t assoc_id,
|
||||
uint32_t stream,
|
||||
F1AP_F1AP_PDU_t *pdu) {
|
||||
int DU_handle_gNB_DU_CONFIGURATION_FAILURE(instance_t instance, sctp_assoc_t assoc_id, uint32_t stream, F1AP_F1AP_PDU_t *pdu)
|
||||
{
|
||||
AssertFatal(1==0,"Not implemented yet\n");
|
||||
}
|
||||
|
||||
int DU_handle_gNB_DU_CONFIGURATION_UPDATE_ACKNOWLEDGE(instance_t instance,
|
||||
uint32_t assoc_id,
|
||||
uint32_t stream,
|
||||
F1AP_F1AP_PDU_t *pdu) {
|
||||
sctp_assoc_t assoc_id,
|
||||
uint32_t stream,
|
||||
F1AP_F1AP_PDU_t *pdu)
|
||||
{
|
||||
AssertFatal(1==0,"Not implemented yet\n");
|
||||
}
|
||||
|
||||
|
||||
int DU_handle_gNB_CU_CONFIGURATION_UPDATE(instance_t instance,
|
||||
uint32_t assoc_id,
|
||||
uint32_t stream,
|
||||
F1AP_F1AP_PDU_t *pdu) {
|
||||
int DU_handle_gNB_CU_CONFIGURATION_UPDATE(instance_t instance, sctp_assoc_t assoc_id, uint32_t stream, F1AP_F1AP_PDU_t *pdu)
|
||||
{
|
||||
LOG_D(F1AP, "DU_handle_gNB_CU_CONFIGURATION_UPDATE\n");
|
||||
AssertFatal(pdu->present == F1AP_F1AP_PDU_PR_initiatingMessage,
|
||||
"pdu->present != F1AP_F1AP_PDU_PR_initiatingMessage\n");
|
||||
@@ -848,8 +794,10 @@ int DU_handle_gNB_CU_CONFIGURATION_UPDATE(instance_t instance,
|
||||
AssertFatal(cells_to_be_activated_list_item_ies->value.present == F1AP_Cells_to_be_Activated_List_ItemIEs__value_PR_Cells_to_be_Activated_List_Item,
|
||||
"cells_to_be_activated_list_item_ies->value.present == F1AP_Cells_to_be_Activated_List_ItemIEs__value_PR_Cells_to_be_Activated_List_Item");
|
||||
cell = &cells_to_be_activated_list_item_ies->value.choice.Cells_to_be_Activated_List_Item;
|
||||
TBCD_TO_MCC_MNC(&cell->nRCGI.pLMN_Identity, F1AP_GNB_CU_CONFIGURATION_UPDATE (msg_p).cells_to_activate[i].mcc, F1AP_GNB_CU_CONFIGURATION_UPDATE (msg_p).cells_to_activate[i].mnc,
|
||||
F1AP_GNB_CU_CONFIGURATION_UPDATE (msg_p).cells_to_activate[i].mnc_digit_length);
|
||||
TBCD_TO_MCC_MNC(&cell->nRCGI.pLMN_Identity,
|
||||
F1AP_GNB_CU_CONFIGURATION_UPDATE(msg_p).cells_to_activate[i].plmn.mcc,
|
||||
F1AP_GNB_CU_CONFIGURATION_UPDATE(msg_p).cells_to_activate[i].plmn.mnc,
|
||||
F1AP_GNB_CU_CONFIGURATION_UPDATE(msg_p).cells_to_activate[i].plmn.mnc_digit_length);
|
||||
LOG_D(F1AP, "nr_cellId : %x %x %x %x %x\n",
|
||||
cell->nRCGI.nRCellIdentity.buf[0],
|
||||
cell->nRCGI.nRCellIdentity.buf[1],
|
||||
@@ -880,9 +828,13 @@ int DU_handle_gNB_CU_CONFIGURATION_UPDATE(instance_t instance,
|
||||
F1AP_GNB_CUSystemInformation_t *gNB_CUSystemInformation = (F1AP_GNB_CUSystemInformation_t *)&cells_to_be_activated_list_itemExtIEs->extensionValue.choice.GNB_CUSystemInformation;
|
||||
F1AP_GNB_CU_CONFIGURATION_UPDATE (msg_p).cells_to_activate[i].num_SI = gNB_CUSystemInformation->sibtypetobeupdatedlist.list.count;
|
||||
AssertFatal(ext->list.count==1,"At least one SI message should be there, and only 1 for now!\n");
|
||||
LOG_D(F1AP, "F1AP: Cell %d MCC %d MNC %d NRCellid %lx num_si %d\n",
|
||||
i, F1AP_GNB_CU_CONFIGURATION_UPDATE (msg_p).cells_to_activate[i].mcc, F1AP_GNB_CU_CONFIGURATION_UPDATE (msg_p).cells_to_activate[i].mnc,
|
||||
F1AP_GNB_CU_CONFIGURATION_UPDATE (msg_p).cells_to_activate[i].nr_cellid, F1AP_GNB_CU_CONFIGURATION_UPDATE (msg_p).cells_to_activate[i].num_SI);
|
||||
LOG_D(F1AP,
|
||||
"F1AP: Cell %d MCC %d MNC %d NRCellid %lx num_si %d\n",
|
||||
i,
|
||||
F1AP_GNB_CU_CONFIGURATION_UPDATE(msg_p).cells_to_activate[i].plmn.mcc,
|
||||
F1AP_GNB_CU_CONFIGURATION_UPDATE(msg_p).cells_to_activate[i].plmn.mnc,
|
||||
F1AP_GNB_CU_CONFIGURATION_UPDATE(msg_p).cells_to_activate[i].nr_cellid,
|
||||
F1AP_GNB_CU_CONFIGURATION_UPDATE(msg_p).cells_to_activate[i].num_SI);
|
||||
|
||||
for (int si = 0; si < gNB_CUSystemInformation->sibtypetobeupdatedlist.list.count; si++) {
|
||||
F1AP_SibtypetobeupdatedListItem_t *sib_item = gNB_CUSystemInformation->sibtypetobeupdatedlist.list.array[si];
|
||||
@@ -985,7 +937,7 @@ int DU_send_gNB_CU_CONFIGURATION_UPDATE_ACKNOWLEDGE(instance_t instance,
|
||||
}
|
||||
|
||||
ASN_STRUCT_RESET(asn_DEF_F1AP_F1AP_PDU, &pdu);
|
||||
f1ap_itti_send_sctp_data_req(false, instance, buffer, len, 0);
|
||||
f1ap_itti_send_sctp_data_req(instance, buffer, len);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -996,8 +948,9 @@ int DU_send_gNB_DU_RESOURCE_COORDINATION_REQUEST(instance_t instance,
|
||||
}
|
||||
|
||||
int DU_handle_gNB_DU_RESOURCE_COORDINATION_RESPONSE(instance_t instance,
|
||||
uint32_t assoc_id,
|
||||
uint32_t stream,
|
||||
F1AP_F1AP_PDU_t *pdu) {
|
||||
sctp_assoc_t assoc_id,
|
||||
uint32_t stream,
|
||||
F1AP_F1AP_PDU_t *pdu)
|
||||
{
|
||||
AssertFatal(0, "Not implemented yet\n");
|
||||
}
|
||||
|
||||
@@ -36,41 +36,25 @@
|
||||
/*
|
||||
* Reset
|
||||
*/
|
||||
int DU_handle_RESET(instance_t instance,
|
||||
uint32_t assoc_id,
|
||||
uint32_t stream,
|
||||
F1AP_F1AP_PDU_t *pdu);
|
||||
int DU_handle_RESET(instance_t instance, sctp_assoc_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(instance_t instance, F1AP_Reset_t *Reset);
|
||||
int DU_handle_RESET_ACKNOWLEDGE(instance_t instance,
|
||||
uint32_t assoc_id,
|
||||
uint32_t stream,
|
||||
F1AP_F1AP_PDU_t *pdu);
|
||||
int DU_handle_RESET_ACKNOWLEDGE(instance_t instance, sctp_assoc_t assoc_id, uint32_t stream, F1AP_F1AP_PDU_t *pdu);
|
||||
|
||||
/*
|
||||
* Error Indication
|
||||
*/
|
||||
int DU_send_ERROR_INDICATION(instance_t instance, F1AP_F1AP_PDU_t *pdu_p);
|
||||
int DU_handle_ERROR_INDICATION(instance_t instance,
|
||||
uint32_t assoc_id,
|
||||
uint32_t stream,
|
||||
F1AP_F1AP_PDU_t *pdu);
|
||||
|
||||
int DU_handle_ERROR_INDICATION(instance_t instance, sctp_assoc_t assoc_id, uint32_t stream, F1AP_F1AP_PDU_t *pdu);
|
||||
|
||||
/*
|
||||
* 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,
|
||||
uint32_t assoc_id,
|
||||
uint32_t stream,
|
||||
F1AP_F1AP_PDU_t *pdu);
|
||||
int DU_handle_F1_SETUP_RESPONSE(instance_t instance, sctp_assoc_t assoc_id, uint32_t stream, F1AP_F1AP_PDU_t *pdu);
|
||||
|
||||
int DU_handle_F1_SETUP_FAILURE(instance_t instance,
|
||||
uint32_t assoc_id,
|
||||
uint32_t stream,
|
||||
F1AP_F1AP_PDU_t *pdu);
|
||||
int DU_handle_F1_SETUP_FAILURE(instance_t instance, sctp_assoc_t assoc_id, uint32_t stream, F1AP_F1AP_PDU_t *pdu);
|
||||
|
||||
/*
|
||||
* gNB-DU Configuration Update
|
||||
@@ -79,23 +63,17 @@ int DU_send_gNB_DU_CONFIGURATION_UPDATE(instance_t instance,
|
||||
instance_t du_mod_idP,
|
||||
f1ap_setup_req_t *f1ap_du_data);
|
||||
|
||||
int DU_handle_gNB_DU_CONFIGURATION_FAILURE(instance_t instance,
|
||||
uint32_t assoc_id,
|
||||
uint32_t stream,
|
||||
F1AP_F1AP_PDU_t *pdu);
|
||||
int DU_handle_gNB_DU_CONFIGURATION_FAILURE(instance_t instance, sctp_assoc_t assoc_id, uint32_t stream, F1AP_F1AP_PDU_t *pdu);
|
||||
|
||||
int DU_handle_gNB_DU_CONFIGURATION_UPDATE_ACKNOWLEDGE(instance_t instance,
|
||||
uint32_t assoc_id,
|
||||
uint32_t stream,
|
||||
F1AP_F1AP_PDU_t *pdu);
|
||||
sctp_assoc_t assoc_id,
|
||||
uint32_t stream,
|
||||
F1AP_F1AP_PDU_t *pdu);
|
||||
|
||||
/*
|
||||
* gNB-CU Configuration Update
|
||||
*/
|
||||
int DU_handle_gNB_CU_CONFIGURATION_UPDATE(instance_t instance,
|
||||
uint32_t assoc_id,
|
||||
uint32_t stream,
|
||||
F1AP_F1AP_PDU_t *pdu);
|
||||
int DU_handle_gNB_CU_CONFIGURATION_UPDATE(instance_t instance, sctp_assoc_t assoc_id, uint32_t stream, F1AP_F1AP_PDU_t *pdu);
|
||||
|
||||
int DU_send_gNB_CU_CONFIGURATION_UPDATE_FAILURE(instance_t instance,
|
||||
f1ap_gnb_cu_configuration_update_failure_t *GNBCUConfigurationUpdateFailure);
|
||||
@@ -112,8 +90,8 @@ int DU_send_gNB_DU_RESOURCE_COORDINATION_REQUEST(instance_t instance,
|
||||
F1AP_GNBDUResourceCoordinationRequest_t *GNBDUResourceCoordinationRequest);
|
||||
|
||||
int DU_handle_gNB_DU_RESOURCE_COORDINATION_RESPONSE(instance_t instance,
|
||||
uint32_t assoc_id,
|
||||
uint32_t stream,
|
||||
F1AP_F1AP_PDU_t *pdu);
|
||||
sctp_assoc_t assoc_id,
|
||||
uint32_t stream,
|
||||
F1AP_F1AP_PDU_t *pdu);
|
||||
|
||||
#endif /* F1AP_DU_INTERFACE_MANAGEMENT_H_ */
|
||||
|
||||
@@ -35,10 +35,8 @@
|
||||
#include "oai_asn1.h"
|
||||
#include "openair2/RRC/LTE/rrc_proto.h"
|
||||
|
||||
int DU_handle_Paging(instance_t instance,
|
||||
uint32_t assoc_id,
|
||||
uint32_t stream,
|
||||
F1AP_F1AP_PDU_t *pdu) {
|
||||
int DU_handle_Paging(instance_t instance, sctp_assoc_t assoc_id, uint32_t stream, F1AP_F1AP_PDU_t *pdu)
|
||||
{
|
||||
F1AP_Paging_t *paging;
|
||||
F1AP_PagingIEs_t *ie;
|
||||
long tmsi;
|
||||
|
||||
@@ -33,9 +33,6 @@
|
||||
#ifndef F1AP_DU_PAGING_H_
|
||||
#define F1AP_DU_PAGING_H_
|
||||
|
||||
int DU_handle_Paging(instance_t instance,
|
||||
uint32_t assoc_id,
|
||||
uint32_t stream,
|
||||
F1AP_F1AP_PDU_t *pdu);
|
||||
int DU_handle_Paging(instance_t instance, sctp_assoc_t assoc_id, uint32_t stream, F1AP_F1AP_PDU_t *pdu);
|
||||
|
||||
#endif /* F1AP_DU_PAGING_H_ */
|
||||
|
||||
@@ -55,10 +55,8 @@
|
||||
#include "openair2/LAYER2/NR_MAC_gNB/mac_rrc_dl_handler.h"
|
||||
|
||||
/* DL RRC Message Transfer */
|
||||
int DU_handle_DL_RRC_MESSAGE_TRANSFER(instance_t instance,
|
||||
uint32_t assoc_id,
|
||||
uint32_t stream,
|
||||
F1AP_F1AP_PDU_t *pdu) {
|
||||
int DU_handle_DL_RRC_MESSAGE_TRANSFER(instance_t instance, sctp_assoc_t assoc_id, uint32_t stream, F1AP_F1AP_PDU_t *pdu)
|
||||
{
|
||||
F1AP_DLRRCMessageTransfer_t *container;
|
||||
F1AP_DLRRCMessageTransferIEs_t *ie;
|
||||
int executeDuplication;
|
||||
@@ -85,7 +83,7 @@ int DU_handle_DL_RRC_MESSAGE_TRANSFER(instance_t instance,
|
||||
/* 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 = &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 */
|
||||
@@ -172,7 +170,7 @@ int DU_send_INITIAL_UL_RRC_MESSAGE_TRANSFER(instance_t instanceP, const f1ap_ini
|
||||
ie2->criticality = F1AP_Criticality_reject;
|
||||
ie2->value.present = F1AP_InitialULRRCMessageTransferIEs__value_PR_NRCGI;
|
||||
//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 */
|
||||
/* c3. C_RNTI */ // 16
|
||||
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
|
||||
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;
|
||||
}
|
||||
|
||||
@@ -279,6 +277,6 @@ int DU_send_UL_NR_RRC_MESSAGE_TRANSFER(instance_t instance, const f1ap_ul_rrc_me
|
||||
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;
|
||||
}
|
||||
|
||||
@@ -36,10 +36,7 @@
|
||||
|
||||
#include "f1ap_common.h"
|
||||
|
||||
int DU_handle_DL_RRC_MESSAGE_TRANSFER(instance_t instance,
|
||||
uint32_t assoc_id,
|
||||
uint32_t stream,
|
||||
F1AP_F1AP_PDU_t *pdu);
|
||||
int DU_handle_DL_RRC_MESSAGE_TRANSFER(instance_t instance, sctp_assoc_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);
|
||||
|
||||
|
||||
@@ -40,8 +40,9 @@
|
||||
//Fixme: Uniq dirty DU instance, by global var, datamodel need better management
|
||||
instance_t DUuniqInstance=0;
|
||||
|
||||
void du_task_send_sctp_association_req(instance_t instance, f1ap_setup_req_t *f1ap_setup_req) {
|
||||
DevAssert(f1ap_setup_req != NULL);
|
||||
void du_task_send_sctp_association_req(instance_t instance, f1ap_net_config_t *nc)
|
||||
{
|
||||
DevAssert(nc != NULL);
|
||||
MessageDef *message_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);
|
||||
@@ -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->port = F1AP_PORT_NUMBER;
|
||||
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->out_streams = f1ap_setup_req->sctp_out_streams;
|
||||
sctp_new_association_req_p->in_streams = 2; //du_inst->sctp_in_streams;
|
||||
sctp_new_association_req_p->out_streams = 2; //du_inst->sctp_out_streams;
|
||||
// remote
|
||||
memcpy(&sctp_new_association_req_p->remote_address,
|
||||
&f1ap_setup_req->CU_f1_ip_address,
|
||||
sizeof(f1ap_setup_req->CU_f1_ip_address));
|
||||
memcpy(&sctp_new_association_req_p->remote_address, &nc->CU_f1_ip_address, sizeof(nc->CU_f1_ip_address));
|
||||
// local
|
||||
memcpy(&sctp_new_association_req_p->local_address,
|
||||
&f1ap_setup_req->DU_f1_ip_address,
|
||||
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
|
||||
memcpy(&sctp_new_association_req_p->local_address, &nc->DU_f1_ip_address, sizeof(nc->DU_f1_ip_address));
|
||||
// du_f1ap_register_to_sctp
|
||||
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) {
|
||||
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) {
|
||||
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,
|
||||
instance,
|
||||
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
|
||||
}
|
||||
|
||||
// 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->sctp_in_streams = sctp_new_association_resp->in_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 */
|
||||
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) {
|
||||
@@ -109,14 +105,19 @@ void *F1AP_DU_task(void *arg) {
|
||||
LOG_D(F1AP, "DU Task Received %s for instance %ld\n",
|
||||
ITTI_MSG_NAME(msg),myInstance);
|
||||
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
|
||||
// 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. send a sctp_association req
|
||||
f1ap_setup_req_t *msgSetup = &F1AP_SETUP_REQ(msg);
|
||||
createF1inst(false, myInstance, msgSetup);
|
||||
du_task_send_sctp_association_req(myInstance, msgSetup);
|
||||
f1ap_setup_req_t *msgSetup = &F1AP_DU_REGISTER_REQ(msg).setup_req;
|
||||
f1ap_net_config_t *nc = &F1AP_DU_REGISTER_REQ(msg).net_config;
|
||||
createF1inst(myInstance, msgSetup, nc);
|
||||
du_task_send_sctp_association_req(myInstance, nc);
|
||||
} break;
|
||||
|
||||
case F1AP_GNB_CU_CONFIGURATION_UPDATE_ACKNOWLEDGE:
|
||||
|
||||
@@ -22,7 +22,8 @@
|
||||
#ifndef 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_data_ind(instance_t instance, sctp_data_ind_t *sctp_data_ind);
|
||||
void *F1AP_DU_task(void *arg);
|
||||
|
||||
@@ -57,10 +57,7 @@ bool DURecvCb(protocol_ctxt_t *ctxt_pP,
|
||||
return true;
|
||||
}
|
||||
|
||||
int DU_handle_UE_CONTEXT_SETUP_REQUEST(instance_t instance,
|
||||
uint32_t assoc_id,
|
||||
uint32_t stream,
|
||||
F1AP_F1AP_PDU_t *pdu)
|
||||
int DU_handle_UE_CONTEXT_SETUP_REQUEST(instance_t instance, sctp_assoc_t assoc_id, uint32_t stream, F1AP_F1AP_PDU_t *pdu)
|
||||
{
|
||||
F1AP_UEContextSetupRequest_t *container;
|
||||
int i;
|
||||
@@ -85,9 +82,9 @@ int DU_handle_UE_CONTEXT_SETUP_REQUEST(instance_t instance,
|
||||
F1AP_FIND_PROTOCOLIE_BY_ID(F1AP_UEContextSetupRequestIEs_t, ieNet, container,
|
||||
F1AP_ProtocolIE_ID_id_SpCell_ID, true);
|
||||
PLMNID_TO_MCC_MNC(&ieNet->value.choice.NRCGI.pLMN_Identity,
|
||||
f1ap_ue_context_setup_req->mcc,
|
||||
f1ap_ue_context_setup_req->mnc,
|
||||
f1ap_ue_context_setup_req->mnc_digit_length);
|
||||
f1ap_ue_context_setup_req->plmn.mcc,
|
||||
f1ap_ue_context_setup_req->plmn.mnc,
|
||||
f1ap_ue_context_setup_req->plmn.mnc_digit_length);
|
||||
BIT_STRING_TO_NR_CELL_IDENTITY(&ieNet->value.choice.NRCGI.nRCellIdentity, f1ap_ue_context_setup_req->nr_cellid);
|
||||
/* ServCellIndex */
|
||||
F1AP_UEContextSetupRequestIEs_t *ieCell;
|
||||
@@ -150,7 +147,7 @@ int DU_handle_UE_CONTEXT_SETUP_REQUEST(instance_t instance,
|
||||
BIT_STRING_TO_TRANSPORT_LAYER_ADDRESS_IPv4(&ul_up_tnl0->transportLayerAddress, drb_p->up_ul_tnl[0].tl_address);
|
||||
OCTET_STRING_TO_UINT32(&ul_up_tnl0->gTP_TEID, drb_p->up_ul_tnl[0].teid);
|
||||
// 3GPP assumes GTP-U is on port 2152, but OAI is configurable
|
||||
drb_p->up_ul_tnl[0].port=getCxt(false,instance)->setupReq.CUport;
|
||||
drb_p->up_ul_tnl[0].port = getCxt(instance)->net_config.CUport;
|
||||
|
||||
switch (drbs_tobesetup_item_p->rLCMode) {
|
||||
case F1AP_RLCMode_rlc_am:
|
||||
@@ -332,8 +329,7 @@ int DU_send_UE_CONTEXT_SETUP_RESPONSE(instance_t instance, f1ap_ue_context_setup
|
||||
asn1cCalloc(dLUPTNLInformation_ToBeSetup_Item->dLUPTNLInformation.choice.gTPTunnel,gTPTunnel);
|
||||
/* transportLayerAddress */
|
||||
struct sockaddr_in addr= {0};
|
||||
inet_pton(AF_INET, getCxt(false,instance)->setupReq.DU_f1_ip_address.ipv4_address,
|
||||
&addr.sin_addr.s_addr);
|
||||
inet_pton(AF_INET, getCxt(instance)->net_config.DU_f1_ip_address.ipv4_address, &addr.sin_addr.s_addr);
|
||||
TRANSPORT_LAYER_ADDRESS_IPv4_TO_BIT_STRING(addr.sin_addr.s_addr,
|
||||
&gTPTunnel->transportLayerAddress);
|
||||
/* gTP_TEID */
|
||||
@@ -459,7 +455,9 @@ int DU_send_UE_CONTEXT_SETUP_RESPONSE(instance_t instance, f1ap_ue_context_setup
|
||||
F1AP_SCell_FailedtoSetup_Item_t *sCell_FailedtoSetup_item=
|
||||
&sCell_FailedtoSetup_item_ies->value.choice.SCell_FailedtoSetup_Item;
|
||||
/* sCell_ID */
|
||||
addnRCGI(sCell_FailedtoSetup_item->sCell_ID,f1ap_req(false, instance)->cell+i);
|
||||
AssertFatal(false, "handle correct CellID\n");
|
||||
f1ap_served_cell_info_t cellID = {0};
|
||||
addnRCGI(sCell_FailedtoSetup_item->sCell_ID, &cellID);
|
||||
/* cause */
|
||||
asn1cCalloc(sCell_FailedtoSetup_item->cause, tmp);
|
||||
// dummy value
|
||||
@@ -544,10 +542,7 @@ int DU_send_UE_CONTEXT_SETUP_RESPONSE(instance_t instance, f1ap_ue_context_setup
|
||||
return -1;
|
||||
}
|
||||
|
||||
f1ap_itti_send_sctp_data_req(false, instance,
|
||||
buffer,
|
||||
len,
|
||||
getCxt(false, instance)->default_sctp_stream_id);
|
||||
f1ap_itti_send_sctp_data_req(instance, buffer, len);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -622,14 +617,11 @@ int DU_send_UE_CONTEXT_RELEASE_REQUEST(instance_t instance,
|
||||
return -1;
|
||||
}
|
||||
|
||||
f1ap_itti_send_sctp_data_req(false, instance,
|
||||
buffer,
|
||||
len,
|
||||
getCxt(false, instance)->default_sctp_stream_id);
|
||||
f1ap_itti_send_sctp_data_req(instance, buffer, len);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int DU_handle_UE_CONTEXT_RELEASE_COMMAND(instance_t instance, uint32_t assoc_id, uint32_t stream, F1AP_F1AP_PDU_t *pdu)
|
||||
int DU_handle_UE_CONTEXT_RELEASE_COMMAND(instance_t instance, sctp_assoc_t assoc_id, uint32_t stream, F1AP_F1AP_PDU_t *pdu)
|
||||
{
|
||||
F1AP_UEContextReleaseCommand_t *container;
|
||||
F1AP_UEContextReleaseCommandIEs_t *ie;
|
||||
@@ -772,10 +764,7 @@ int DU_send_UE_CONTEXT_RELEASE_COMPLETE(instance_t instance, f1ap_ue_context_rel
|
||||
return -1;
|
||||
}
|
||||
|
||||
f1ap_itti_send_sctp_data_req(false, instance,
|
||||
buffer,
|
||||
len,
|
||||
getCxt(false, instance)->default_sctp_stream_id);
|
||||
f1ap_itti_send_sctp_data_req(instance, buffer, len);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -789,7 +778,7 @@ static instance_t du_create_gtpu_instance_to_cu(char *CUaddr, uint16_t CUport, c
|
||||
return gtpv1Init(tmp);
|
||||
}
|
||||
|
||||
int DU_handle_UE_CONTEXT_MODIFICATION_REQUEST(instance_t instance, uint32_t assoc_id, uint32_t stream, F1AP_F1AP_PDU_t *pdu)
|
||||
int DU_handle_UE_CONTEXT_MODIFICATION_REQUEST(instance_t instance, sctp_assoc_t assoc_id, uint32_t stream, F1AP_F1AP_PDU_t *pdu)
|
||||
{
|
||||
F1AP_UEContextModificationRequest_t *container;
|
||||
int i;
|
||||
@@ -858,7 +847,7 @@ int DU_handle_UE_CONTEXT_MODIFICATION_REQUEST(instance_t instance, uint32_t asso
|
||||
BIT_STRING_TO_TRANSPORT_LAYER_ADDRESS_IPv4(&ul_up_tnl0->transportLayerAddress, drb_p->up_ul_tnl[0].tl_address);
|
||||
OCTET_STRING_TO_UINT32(&ul_up_tnl0->gTP_TEID, drb_p->up_ul_tnl[0].teid);
|
||||
// 3GPP assumes GTP-U is on port 2152, but OAI is configurable
|
||||
drb_p->up_ul_tnl[0].port=getCxt(false,instance)->setupReq.CUport;
|
||||
drb_p->up_ul_tnl[0].port = getCxt(instance)->net_config.CUport;
|
||||
|
||||
extern instance_t DUuniqInstance;
|
||||
if (DUuniqInstance == 0) {
|
||||
@@ -870,16 +859,15 @@ int DU_handle_UE_CONTEXT_MODIFICATION_REQUEST(instance_t instance, uint32_t asso
|
||||
(drb_p->up_ul_tnl[0].tl_address >> 8) & 0xff,
|
||||
(drb_p->up_ul_tnl[0].tl_address >> 16) & 0xff,
|
||||
(drb_p->up_ul_tnl[0].tl_address >> 24) & 0xff);
|
||||
getCxt(DUtype, instance)->gtpInst=du_create_gtpu_instance_to_cu(
|
||||
gtp_tunnel_ip_address,
|
||||
getCxt(false,instance)->setupReq.CUport,
|
||||
getCxt(false,instance)->setupReq.DU_f1_ip_address.ipv4_address,
|
||||
getCxt(false,instance)->setupReq.DUport);
|
||||
AssertFatal(getCxt(DUtype, instance)->gtpInst>0,"Failed to create CU F1-U UDP listener");
|
||||
getCxt(instance)->gtpInst = du_create_gtpu_instance_to_cu(gtp_tunnel_ip_address,
|
||||
getCxt(instance)->net_config.CUport,
|
||||
getCxt(instance)->net_config.DU_f1_ip_address.ipv4_address,
|
||||
getCxt(instance)->net_config.DUport);
|
||||
AssertFatal(getCxt(instance)->gtpInst > 0, "Failed to create CU F1-U UDP listener");
|
||||
// Fixme: fully inconsistent instances management
|
||||
// dirty global var is a bad fix
|
||||
extern instance_t legacyInstanceMapping;
|
||||
legacyInstanceMapping = DUuniqInstance = getCxt(DUtype, instance)->gtpInst;
|
||||
legacyInstanceMapping = DUuniqInstance = getCxt(instance)->gtpInst;
|
||||
}
|
||||
|
||||
switch (drbs_tobesetupmod_item_p->rLCMode) {
|
||||
@@ -1035,7 +1023,7 @@ int DU_send_UE_CONTEXT_MODIFICATION_RESPONSE(instance_t instance, f1ap_ue_contex
|
||||
transport_layer_addr_t tl_addr = {0};
|
||||
memcpy(tl_addr.buffer, &drb->up_ul_tnl[0].tl_address, sizeof(drb->up_ul_tnl[0].tl_address));
|
||||
tl_addr.length = sizeof(drb->up_ul_tnl[0].tl_address) * 8;
|
||||
drb->up_dl_tnl[j].teid = newGtpuCreateTunnel(getCxt(false, instance)->gtpInst,
|
||||
drb->up_dl_tnl[j].teid = newGtpuCreateTunnel(getCxt(instance)->gtpInst,
|
||||
resp->gNB_DU_ue_id,
|
||||
drb->drb_id,
|
||||
drb->drb_id,
|
||||
@@ -1054,8 +1042,7 @@ int DU_send_UE_CONTEXT_MODIFICATION_RESPONSE(instance_t instance, f1ap_ue_contex
|
||||
asn1cCalloc(dLUPTNLInformation_ToBeSetup_Item->dLUPTNLInformation.choice.gTPTunnel,gTPTunnel);
|
||||
/* transportLayerAddress */
|
||||
struct sockaddr_in addr= {0};
|
||||
inet_pton(AF_INET, getCxt(false,instance)->setupReq.DU_f1_ip_address.ipv4_address,
|
||||
&addr.sin_addr.s_addr);
|
||||
inet_pton(AF_INET, getCxt(instance)->net_config.DU_f1_ip_address.ipv4_address, &addr.sin_addr.s_addr);
|
||||
TRANSPORT_LAYER_ADDRESS_IPv4_TO_BIT_STRING(addr.sin_addr.s_addr,
|
||||
&gTPTunnel->transportLayerAddress);
|
||||
/* gTP_TEID */
|
||||
@@ -1093,8 +1080,7 @@ int DU_send_UE_CONTEXT_MODIFICATION_RESPONSE(instance_t instance, f1ap_ue_contex
|
||||
asn1cCalloc(dLUPTNLInformation_ToBeSetup_Item->dLUPTNLInformation.choice.gTPTunnel, gTPTunnel);
|
||||
/* transportLayerAddress */
|
||||
struct sockaddr_in addr= {0};
|
||||
inet_pton(AF_INET, getCxt(false,instance)->setupReq.DU_f1_ip_address.ipv4_address,
|
||||
&addr.sin_addr.s_addr);
|
||||
inet_pton(AF_INET, getCxt(instance)->net_config.DU_f1_ip_address.ipv4_address, &addr.sin_addr.s_addr);
|
||||
TRANSPORT_LAYER_ADDRESS_IPv4_TO_BIT_STRING(addr.sin_addr.s_addr, &gTPTunnel->transportLayerAddress);
|
||||
/* gTP_TEID */
|
||||
INT32_TO_OCTET_STRING(resp->drbs_to_be_modified[i].up_dl_tnl[j].teid, &gTPTunnel->gTP_TEID);
|
||||
@@ -1169,7 +1155,7 @@ int DU_send_UE_CONTEXT_MODIFICATION_RESPONSE(instance_t instance, f1ap_ue_contex
|
||||
/* 8.1 SCell_ToBeSetup_Item */
|
||||
F1AP_SCell_FailedtoSetupMod_Item_t *scell_failedtoSetupMod_item=&scell_failedtoSetupMod_item_ies->value.choice.SCell_FailedtoSetupMod_Item;
|
||||
/* - sCell_ID */
|
||||
addnRCGI(scell_failedtoSetupMod_item->sCell_ID, &f1ap_req(false, instance)->cell[i]);
|
||||
addnRCGI(scell_failedtoSetupMod_item->sCell_ID, &getCxt(instance)->setupReq.cell[i].info);
|
||||
asn1cCalloc(scell_failedtoSetupMod_item->cause, tmp);
|
||||
tmp->present = F1AP_Cause_PR_radioNetwork;
|
||||
tmp->choice.radioNetwork = F1AP_CauseRadioNetwork_unknown_or_already_allocated_gnb_du_ue_f1ap_id;
|
||||
@@ -1278,7 +1264,7 @@ int DU_send_UE_CONTEXT_MODIFICATION_RESPONSE(instance_t instance, f1ap_ue_contex
|
||||
return -1;
|
||||
}
|
||||
|
||||
f1ap_itti_send_sctp_data_req(false, instance, buffer, len, getCxt(false, instance)->default_sctp_stream_id);
|
||||
f1ap_itti_send_sctp_data_req(instance, buffer, len);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -1402,11 +1388,11 @@ int DU_send_UE_CONTEXT_MODIFICATION_REQUIRED(instance_t instance, f1ap_ue_contex
|
||||
return -1;
|
||||
}
|
||||
|
||||
f1ap_itti_send_sctp_data_req(false, instance, buffer, len, getCxt(false, instance)->default_sctp_stream_id);
|
||||
f1ap_itti_send_sctp_data_req(instance, buffer, len);
|
||||
return 0;
|
||||
}
|
||||
|
||||
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_CONFIRM(instance_t instance, sctp_assoc_t assoc_id, uint32_t stream, F1AP_F1AP_PDU_t *pdu)
|
||||
{
|
||||
F1AP_UEContextModificationConfirm_t *container = &pdu->choice.successfulOutcome->value.choice.UEContextModificationConfirm;
|
||||
f1ap_ue_context_modif_confirm_t confirm = {0};
|
||||
@@ -1482,7 +1468,7 @@ int DU_handle_UE_CONTEXT_MODIFICATION_CONFIRM(instance_t instance, uint32_t asso
|
||||
return 0;
|
||||
}
|
||||
|
||||
int DU_handle_UE_CONTEXT_MODIFICATION_REFUSE(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)
|
||||
{
|
||||
F1AP_UEContextModificationRefuse_t *container = &pdu->choice.unsuccessfulOutcome->value.choice.UEContextModificationRefuse;
|
||||
f1ap_ue_context_modif_refuse_t refuse = {0};
|
||||
|
||||
@@ -38,10 +38,7 @@
|
||||
*/
|
||||
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,
|
||||
uint32_t assoc_id,
|
||||
uint32_t stream,
|
||||
F1AP_F1AP_PDU_t *pdu);
|
||||
int DU_handle_UE_CONTEXT_SETUP_REQUEST(instance_t instance, sctp_assoc_t assoc_id, uint32_t stream, F1AP_F1AP_PDU_t *pdu);
|
||||
int DU_send_UE_CONTEXT_SETUP_FAILURE(instance_t instance);
|
||||
|
||||
|
||||
@@ -55,10 +52,7 @@ int DU_send_UE_CONTEXT_RELEASE_REQUEST(instance_t instance,
|
||||
/*
|
||||
* UE Context Release Command (gNB-CU initiated)
|
||||
*/
|
||||
int DU_handle_UE_CONTEXT_RELEASE_COMMAND(instance_t instance,
|
||||
uint32_t assoc_id,
|
||||
uint32_t stream,
|
||||
F1AP_F1AP_PDU_t *pdu);
|
||||
int DU_handle_UE_CONTEXT_RELEASE_COMMAND(instance_t instance, sctp_assoc_t assoc_id, uint32_t stream, F1AP_F1AP_PDU_t *pdu);
|
||||
|
||||
/*
|
||||
* 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
|
||||
/*
|
||||
* UE Context Modification (gNB-CU initiated)
|
||||
*/
|
||||
int DU_handle_UE_CONTEXT_MODIFICATION_REQUEST(instance_t instance,
|
||||
uint32_t assoc_id,
|
||||
uint32_t stream,
|
||||
F1AP_F1AP_PDU_t *pdu);
|
||||
int DU_handle_UE_CONTEXT_MODIFICATION_REQUEST(instance_t instance, sctp_assoc_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_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)
|
||||
*/
|
||||
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, uint32_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);
|
||||
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_REFUSE(instance_t instance, sctp_assoc_t assoc_id, uint32_t stream, F1AP_F1AP_PDU_t *pdu);
|
||||
|
||||
/*
|
||||
* UE Inactivity Notification
|
||||
|
||||
@@ -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,
|
||||
uint32_t assoc_id,
|
||||
sctp_assoc_t assoc_id,
|
||||
int32_t stream,
|
||||
const uint8_t *const data,
|
||||
const uint32_t data_length)
|
||||
|
||||
@@ -22,26 +22,27 @@
|
||||
#include "f1ap_common.h"
|
||||
#include "f1ap_itti_messaging.h"
|
||||
|
||||
void f1ap_itti_send_sctp_data_req(bool isCu, instance_t instance, uint8_t *buffer,
|
||||
uint32_t buffer_length, uint16_t stream) {
|
||||
void f1ap_itti_send_sctp_data_req(instance_t instance, uint8_t *buffer, uint32_t buffer_length)
|
||||
{
|
||||
MessageDef *message_p;
|
||||
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->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_length = buffer_length;
|
||||
sctp_data_req->stream = stream;
|
||||
sctp_data_req->stream = 0;
|
||||
LOG_D(F1AP, "Sending ITTI message to SCTP Task\n");
|
||||
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;
|
||||
sctp_close_association_t *sctp_close_association_p = NULL;
|
||||
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->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);
|
||||
}
|
||||
|
||||
|
||||
@@ -22,7 +22,6 @@
|
||||
#ifndef F1AP_ITTI_MESSAGING_H_
|
||||
#define F1AP_ITTI_MESSAGING_H_
|
||||
|
||||
void f1ap_itti_send_sctp_data_req(bool isCu,instance_t instance, uint8_t *buffer,
|
||||
uint32_t buffer_length, uint16_t stream);
|
||||
void f1ap_itti_send_sctp_data_req(instance_t instance, uint8_t *buffer, uint32_t buffer_length);
|
||||
|
||||
#endif /* F1AP_ITTI_MESSAGING_H_ */
|
||||
|
||||
@@ -52,31 +52,14 @@
|
||||
#include "openair2/LAYER2/nr_pdcp/nr_pdcp_oai_api.h"
|
||||
#include "openair2/E1AP/e1ap.h"
|
||||
#include "gnb_config.h"
|
||||
#include "openair2/LAYER2/NR_MAC_gNB/mac_proto.h"
|
||||
|
||||
extern unsigned char NB_gNB_INST;
|
||||
|
||||
extern RAN_CONTEXT_t RC;
|
||||
|
||||
#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)
|
||||
LOG_E(F1AP, "Create task for F1AP DU failed\n");
|
||||
AssertFatal(1==0,"exiting");
|
||||
}
|
||||
// configure F1AP here for F1C
|
||||
LOG_I(GNB_APP,"ngran_gNB_DU: Allocating ITTI message for F1AP_SETUP_REQ\n");
|
||||
msg_p = itti_alloc_new_message (TASK_GNB_APP, 0, F1AP_SETUP_REQ);
|
||||
RCconfig_NR_DU_F1(msg_p, 0);
|
||||
|
||||
itti_send_msg_to_task (TASK_DU_F1, GNB_MODULE_ID_TO_INSTANCE(0), msg_p);
|
||||
}
|
||||
if (NODE_IS_DU(node_type) || NODE_IS_MONOLITHIC(node_type)) {
|
||||
// need to check SA?
|
||||
nr_mac_send_f1_setup_req();
|
||||
}
|
||||
}
|
||||
do {
|
||||
@@ -249,15 +230,9 @@ void *gNB_app_task(void *args_p)
|
||||
break;
|
||||
|
||||
case F1AP_SETUP_RESP:
|
||||
AssertFatal(NODE_IS_DU(node_type), "Should not have received F1AP_SETUP_RESP in CU/gNB\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));
|
||||
|
||||
AssertFatal(false, "Should not received this, logic bug\n");
|
||||
break;
|
||||
|
||||
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");
|
||||
|
||||
|
||||
@@ -33,7 +33,6 @@
|
||||
#include <stdint.h>
|
||||
|
||||
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_x2(uint32_t gnb_id_start, uint32_t gnb_id_end);
|
||||
#endif /* GNB_APP_H_ */
|
||||
|
||||
+375
-507
File diff suppressed because it is too large
Load Diff
@@ -91,6 +91,8 @@ typedef struct ru_config_s {
|
||||
uint8_t if_compress;
|
||||
} ru_config_t;
|
||||
*/
|
||||
|
||||
void RCconfig_verify(ngran_node_t node_type);
|
||||
extern void NRRCconfig_RU(void);
|
||||
extern void RCconfig_nr_prs(void);
|
||||
extern void RCconfig_NR_L1(void);
|
||||
@@ -100,13 +102,11 @@ extern void NRRCConfig(void);
|
||||
//void enb_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_X2(MessageDef *msg_p, uint32_t i);
|
||||
int RCconfig_NR_DU_F1(MessageDef *msg_p, uint32_t i);
|
||||
int gNB_app_handle_f1ap_setup_resp(f1ap_setup_resp_t *resp);
|
||||
void wait_f1_setup_response(void);
|
||||
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);
|
||||
ngran_node_t get_node_type(void);
|
||||
|
||||
|
||||
@@ -1298,8 +1298,6 @@ typedef struct {
|
||||
/*! \brief top level eNB MAC structure */
|
||||
|
||||
typedef struct eNB_MAC_INST_s {
|
||||
/// Ethernet parameters for northbound midhaul interface
|
||||
eth_params_t eth_params_n;
|
||||
/// Ethernet parameters for fronthaul interface
|
||||
eth_params_t eth_params_s;
|
||||
///
|
||||
@@ -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
|
||||
// to make sure that different UEs RA starts within a number of frames difference.
|
||||
|
||||
eth_params_t eth_params_n;
|
||||
|
||||
} UE_MAC_INST;
|
||||
|
||||
typedef struct {
|
||||
|
||||
@@ -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,
|
||||
frame_t frameP,
|
||||
NR_MIB_t *mib,
|
||||
const NR_MIB_t *mib,
|
||||
uint8_t num_slot_per_frame,
|
||||
uint8_t ssb_subcarrier_offset,
|
||||
uint16_t ssb_start_symbol,
|
||||
|
||||
@@ -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,
|
||||
frame_t frameP,
|
||||
NR_MIB_t *mib,
|
||||
const NR_MIB_t *mib,
|
||||
uint8_t num_slot_per_frame,
|
||||
uint8_t ssb_subcarrier_offset,
|
||||
uint16_t ssb_start_symbol,
|
||||
|
||||
@@ -332,6 +332,12 @@ static void config_common(gNB_MAC_INST *nrmac, int pdsch_AntennaPorts, int pusch
|
||||
cfg->ssb_table.ssb_subcarrier_offset.value =
|
||||
get_ssb_subcarrier_offset(*scc->downlinkConfigCommon->frequencyInfoDL->absoluteFrequencySSB,
|
||||
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->num_tlv++;
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
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)
|
||||
void nr_mac_config_scc(gNB_MAC_INST *nrmac, NR_ServingCellConfigCommon_t *scc, const nr_mac_config_t *config)
|
||||
{
|
||||
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(config != NULL);
|
||||
//NR_SCHED_LOCK(&nrmac->sched_lock);
|
||||
|
||||
AssertFatal(scc->ssb_PositionsInBurst->present > 0 && scc->ssb_PositionsInBurst->present < 4,
|
||||
"SSB Bitmap type %d is not valid\n",
|
||||
scc->ssb_PositionsInBurst->present);
|
||||
@@ -493,9 +464,8 @@ void nr_mac_config_scc(gNB_MAC_INST *nrmac,
|
||||
|
||||
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;
|
||||
nrmac->xp_pdsch_antenna_ports = pdsch_AntennaPorts.XP;
|
||||
config_common(nrmac, num_pdsch_antenna_ports, pusch_AntennaPorts, scc);
|
||||
int num_pdsch_antenna_ports = config->pdsch_AntennaPorts.N1 * config->pdsch_AntennaPorts.N2 * config->pdsch_AntennaPorts.XP;
|
||||
config_common(nrmac, num_pdsch_antenna_ports, config->pusch_AntennaPorts, scc);
|
||||
|
||||
if (NFAPI_MODE == NFAPI_MODE_PNF || NFAPI_MODE == NFAPI_MODE_VNF) {
|
||||
// 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,
|
||||
nrmac->if_inst->NR_PHY_config_req(&phycfg);
|
||||
}
|
||||
|
||||
nrmac->minRXTXTIMEpdsch = minRXTXTIMEpdsch;
|
||||
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;
|
||||
@@ -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->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,
|
||||
(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,
|
||||
|
||||
if (get_softmodem_params()->sa > 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++) {
|
||||
NR_RA_t *ra = &cc->ra[n];
|
||||
ra->cfra = false;
|
||||
@@ -556,31 +524,19 @@ void nr_mac_config_scc(gNB_MAC_INST *nrmac,
|
||||
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);
|
||||
DevAssert(mib != NULL);
|
||||
NR_SCHED_LOCK(&nrmac->sched_lock);
|
||||
AssertFatal(get_softmodem_params()->sa > 0, "error: SIB1 only applicable for SA\n");
|
||||
|
||||
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];
|
||||
|
||||
AssertFatal(cc->sib1 == NULL, "logic bug: updated SIB1 multiple times\n");
|
||||
NR_ServingCellConfigCommon_t *scc = cc->ServingCellConfigCommon;
|
||||
NR_BCCH_DL_SCH_Message_t *sib1 = get_SIB1_NR(scc, plmn, cellID, tac);
|
||||
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)
|
||||
@@ -640,28 +596,24 @@ bool nr_mac_prepare_ra_ue(gNB_MAC_INST *nrmac, uint32_t rnti, NR_CellGroupConfig
|
||||
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(UE != NULL);
|
||||
DevAssert(CellGroup != NULL);
|
||||
|
||||
/* we assume that this function is mutex-protected from outside */
|
||||
NR_SCHED_ENSURE_LOCKED(&nrmac->sched_lock);
|
||||
|
||||
DevAssert(CellGroup != NULL);
|
||||
|
||||
NR_UE_info_t *UE = find_nr_UE(&nrmac->UE_info, rnti);
|
||||
AssertFatal(UE != NULL, "Can't find UE %04x for CellGroup update\n", rnti);
|
||||
|
||||
/* 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);
|
||||
UE->reconfigCellGroup = CellGroup;
|
||||
UE->expect_reconfiguration = true;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
/* 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_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
|
||||
|
||||
// Pause scheduling according to:
|
||||
// 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;
|
||||
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);
|
||||
nr_mac_enable_ue_rrc_processing_timer(RC.nrmac[module_id], UE, false);
|
||||
} 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);
|
||||
|
||||
@@ -105,19 +105,26 @@ static void fill_ssb_vrb_map(NR_COMMON_channels_t *cc, int rbStart, int ssb_subc
|
||||
vrb_map[rbStart + rb] = SL_to_bitmap(symStart % NR_SYMBOLS_PER_SLOT, 4);
|
||||
}
|
||||
|
||||
static int encode_mib(NR_BCCH_BCH_Message_t *mib, frame_t frame, uint8_t *buffer, int buf_size)
|
||||
{
|
||||
int encode_size = 3;
|
||||
AssertFatal(buf_size >= encode_size, "buffer of size %d too small, need 3 bytes\n", buf_size);
|
||||
int encoded = encode_MIB_NR(mib, frame, buffer, encode_size);
|
||||
DevAssert(encoded == encode_size);
|
||||
return encode_size;
|
||||
}
|
||||
|
||||
void schedule_nr_mib(module_id_t module_idP, frame_t frameP, sub_frame_t slotP, nfapi_nr_dl_tti_request_t *DL_req)
|
||||
{
|
||||
gNB_MAC_INST *gNB = RC.nrmac[module_idP];
|
||||
/* already mutex protected: held in gNB_dlsch_ulsch_scheduler() */
|
||||
NR_COMMON_channels_t *cc;
|
||||
nfapi_nr_dl_tti_request_body_t *dl_req;
|
||||
NR_MIB_t *mib = RC.nrrrc[module_idP]->carrier.mib->message.choice.mib;
|
||||
uint8_t num_tdd_period,num_ssb;
|
||||
int mib_sdu_length;
|
||||
int CC_id;
|
||||
|
||||
for (CC_id = 0; CC_id < MAX_NUM_CCs; CC_id++) {
|
||||
cc = &gNB->common_channels[CC_id];
|
||||
NR_COMMON_channels_t *cc= &gNB->common_channels[CC_id];
|
||||
const NR_MIB_t *mib = cc->mib->message.choice.mib;
|
||||
NR_ServingCellConfigCommon_t *scc = cc->ServingCellConfigCommon;
|
||||
const int slots_per_frame = nr_slots_per_frame[*scc->ssbSubcarrierSpacing];
|
||||
dl_req = &DL_req->dl_tti_request_body;
|
||||
@@ -125,8 +132,7 @@ void schedule_nr_mib(module_id_t module_idP, frame_t frameP, sub_frame_t slotP,
|
||||
// get MIB every 8 frames
|
||||
if(((slotP == 0) && (frameP & 7) == 0) ||
|
||||
gNB->first_MIB) {
|
||||
|
||||
mib_sdu_length = mac_rrc_nr_data_req(module_idP, CC_id, frameP, MIBCH, 0, 1, &cc->MIB_pdu.payload[0]);
|
||||
int mib_sdu_length = encode_mib(cc->mib, frameP, cc->MIB_pdu, sizeof(cc->MIB_pdu));
|
||||
|
||||
// flag to avoid sending an empty MIB in the first frames of execution since gNB doesn't get at the beginning in frame 0 slot 0
|
||||
gNB->first_MIB = false;
|
||||
@@ -139,6 +145,8 @@ void schedule_nr_mib(module_id_t module_idP, frame_t frameP, sub_frame_t slotP,
|
||||
mib_sdu_length);
|
||||
}
|
||||
|
||||
uint32_t mib_pdu = (*(uint32_t *)cc->MIB_pdu) & ((1 << 24) - 1);
|
||||
|
||||
int8_t ssb_period = *scc->ssb_periodicityServingCell;
|
||||
uint8_t ssb_frame_periodicity = 1; // every how many frames SSB are generated
|
||||
|
||||
@@ -175,7 +183,7 @@ void schedule_nr_mib(module_id_t module_idP, frame_t frameP, sub_frame_t slotP,
|
||||
// if start symbol is in current slot, schedule current SSB, fill VRB map and call get_type0_PDCCH_CSS_config_parameters
|
||||
if ((ssb_start_symbol/14) == rel_slot){
|
||||
const int prb_offset = offset_pointa >> scs;
|
||||
schedule_ssb(frameP, slotP, scc, dl_req, i_ssb, ssbSubcarrierOffset, offset_pointa, (*(uint32_t*)cc->MIB_pdu.payload) & ((1<<24)-1));
|
||||
schedule_ssb(frameP, slotP, scc, dl_req, i_ssb, ssbSubcarrierOffset, offset_pointa, mib_pdu);
|
||||
fill_ssb_vrb_map(cc, prb_offset, ssbSubcarrierOffset, ssb_start_symbol, CC_id);
|
||||
if (get_softmodem_params()->sa == 1) {
|
||||
get_type0_PDCCH_CSS_config_parameters(&gNB->type0_PDCCH_CSS_config[i_ssb],
|
||||
@@ -204,7 +212,7 @@ void schedule_nr_mib(module_id_t module_idP, frame_t frameP, sub_frame_t slotP,
|
||||
// if start symbol is in current slot, schedule current SSB, fill VRB map and call get_type0_PDCCH_CSS_config_parameters
|
||||
if ((ssb_start_symbol/14) == rel_slot){
|
||||
const int prb_offset = offset_pointa >> scs;
|
||||
schedule_ssb(frameP, slotP, scc, dl_req, i_ssb, ssbSubcarrierOffset, offset_pointa, (*(uint32_t*)cc->MIB_pdu.payload) & ((1<<24)-1));
|
||||
schedule_ssb(frameP, slotP, scc, dl_req, i_ssb, ssbSubcarrierOffset, offset_pointa, mib_pdu);
|
||||
fill_ssb_vrb_map(cc, prb_offset, ssbSubcarrierOffset, ssb_start_symbol, CC_id);
|
||||
if (get_softmodem_params()->sa == 1) {
|
||||
get_type0_PDCCH_CSS_config_parameters(&gNB->type0_PDCCH_CSS_config[i_ssb],
|
||||
@@ -234,7 +242,7 @@ void schedule_nr_mib(module_id_t module_idP, frame_t frameP, sub_frame_t slotP,
|
||||
// if start symbol is in current slot, schedule current SSB, fill VRB map and call get_type0_PDCCH_CSS_config_parameters
|
||||
if ((ssb_start_symbol/14) == rel_slot){
|
||||
const int prb_offset = offset_pointa >> (scs-2); // reference 60kHz
|
||||
schedule_ssb(frameP, slotP, scc, dl_req, i_ssb, ssbSubcarrierOffset, offset_pointa, (*(uint32_t*)cc->MIB_pdu.payload) & ((1<<24)-1));
|
||||
schedule_ssb(frameP, slotP, scc, dl_req, i_ssb, ssbSubcarrierOffset, offset_pointa, mib_pdu);
|
||||
fill_ssb_vrb_map(cc, prb_offset, ssbSubcarrierOffset >> (scs - 2), ssb_start_symbol, CC_id);
|
||||
const NR_TDD_UL_DL_Pattern_t *tdd = &scc->tdd_UL_DL_ConfigurationCommon->pattern1;
|
||||
const int n_slots_frame = nr_slots_per_frame[*scc->ssbSubcarrierSpacing];
|
||||
@@ -532,7 +540,7 @@ void schedule_nr_sib1(module_id_t module_idP,
|
||||
gNB_MAC_INST *gNB_mac = RC.nrmac[module_idP];
|
||||
NR_ServingCellConfigCommon_t *scc = gNB_mac->common_channels[CC_id].ServingCellConfigCommon;
|
||||
|
||||
int time_domain_allocation = gNB_mac->sib1_tda;
|
||||
int time_domain_allocation = gNB_mac->radio_config.sib1_tda;
|
||||
|
||||
int L_max;
|
||||
switch (scc->ssb_PositionsInBurst->present) {
|
||||
@@ -561,14 +569,6 @@ void schedule_nr_sib1(module_id_t module_idP,
|
||||
|
||||
LOG_D(NR_MAC,"(%d.%d) SIB1 transmission: ssb_index %d\n", frameP, slotP, type0_PDCCH_CSS_config->ssb_index);
|
||||
|
||||
// Get SIB1
|
||||
uint8_t sib1_payload[NR_MAX_SIB_LENGTH/8];
|
||||
uint16_t sib1_sdu_length = mac_rrc_nr_data_req(module_idP, CC_id, frameP, BCCH, SI_RNTI, 1, sib1_payload);
|
||||
LOG_D(NR_MAC,"sib1_sdu_length = %i\n", sib1_sdu_length);
|
||||
LOG_D(NR_MAC,"SIB1: \n");
|
||||
for (int k=0;k<sib1_sdu_length;k++)
|
||||
LOG_D(NR_MAC,"byte %d : %x\n",k,((uint8_t*)sib1_payload)[k]);
|
||||
|
||||
default_table_type_t table_type = get_default_table_type(type0_PDCCH_CSS_config->type0_pdcch_ss_mux_pattern);
|
||||
// assuming normal CP
|
||||
NR_tda_info_t tda_info = get_info_from_tda_tables(table_type, time_domain_allocation, gNB_mac->common_channels->ServingCellConfigCommon->dmrs_TypeA_Position, true);
|
||||
@@ -580,6 +580,8 @@ void schedule_nr_sib1(module_id_t module_idP,
|
||||
&tda_info,
|
||||
1);
|
||||
|
||||
|
||||
NR_COMMON_channels_t *cc = &gNB_mac->common_channels[0];
|
||||
// Configure sched_ctrlCommon for SIB1
|
||||
uint32_t TBS = schedule_control_sib1(module_idP, CC_id,
|
||||
type0_PDCCH_CSS_config,
|
||||
@@ -587,7 +589,7 @@ void schedule_nr_sib1(module_id_t module_idP,
|
||||
&dmrs_parms,
|
||||
&tda_info,
|
||||
candidate_idx,
|
||||
sib1_sdu_length);
|
||||
cc->sib1_bcch_length);
|
||||
|
||||
nfapi_nr_dl_tti_request_body_t *dl_req = &DL_req->dl_tti_request_body;
|
||||
int pdu_index = gNB_mac->pdu_index[0]++;
|
||||
@@ -597,7 +599,7 @@ void schedule_nr_sib1(module_id_t module_idP,
|
||||
nfapi_nr_pdu_t *tx_req = &TX_req->pdu_list[ntx_req];
|
||||
|
||||
// Data to be transmitted
|
||||
memcpy(tx_req->TLVs[0].value.direct, sib1_payload, TBS);
|
||||
memcpy(tx_req->TLVs[0].value.direct, cc->sib1_bcch_pdu, TBS);
|
||||
|
||||
tx_req->PDU_length = TBS;
|
||||
tx_req->PDU_index = pdu_index;
|
||||
@@ -609,9 +611,14 @@ void schedule_nr_sib1(module_id_t module_idP,
|
||||
|
||||
type0_PDCCH_CSS_config->active = false;
|
||||
|
||||
T(T_GNB_MAC_DL_PDU_WITH_DATA, T_INT(module_idP), T_INT(CC_id),
|
||||
T_INT(0xffff), T_INT(frameP), T_INT(slotP), T_INT(0 /* harq_pid */),
|
||||
T_BUFFER(sib1_payload, TBS));
|
||||
T(T_GNB_MAC_DL_PDU_WITH_DATA,
|
||||
T_INT(module_idP),
|
||||
T_INT(CC_id),
|
||||
T_INT(0xffff),
|
||||
T_INT(frameP),
|
||||
T_INT(slotP),
|
||||
T_INT(0 /* harq_pid */),
|
||||
T_BUFFER(cc->sib1_bcch_pdu, cc->sib1_bcch_length));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -661,7 +661,8 @@ static void pf_dl(module_id_t module_id,
|
||||
else
|
||||
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->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 uint16_t R = nr_get_code_rate_dl(sched_pdsch->mcs, current_BWP->mcsTableIdx);
|
||||
uint32_t tbs = nr_compute_tbs(Qm,
|
||||
|
||||
@@ -1946,6 +1946,9 @@ int get_nrofHARQ_ProcessesForPDSCH(e_NR_PDSCH_ServingCellConfig__nrofHARQ_Proces
|
||||
|
||||
void delete_nr_ue_data(NR_UE_info_t *UE, NR_COMMON_channels_t *ccPtr, uid_allocator_t *uia)
|
||||
{
|
||||
ASN_STRUCT_FREE(asn_DEF_NR_CellGroupConfig, UE->CellGroup);
|
||||
ASN_STRUCT_FREE(asn_DEF_NR_CellGroupConfig, UE->reconfigCellGroup);
|
||||
ASN_STRUCT_FREE(asn_DEF_NR_UE_NR_Capability, UE->capability);
|
||||
NR_UE_sched_ctrl_t *sched_ctrl = &UE->UE_sched_ctrl;
|
||||
destroy_nr_list(&sched_ctrl->available_dl_harq);
|
||||
destroy_nr_list(&sched_ctrl->feedback_dl_harq);
|
||||
@@ -1953,6 +1956,7 @@ void delete_nr_ue_data(NR_UE_info_t *UE, NR_COMMON_channels_t *ccPtr, uid_alloca
|
||||
destroy_nr_list(&sched_ctrl->available_ul_harq);
|
||||
destroy_nr_list(&sched_ctrl->feedback_ul_harq);
|
||||
destroy_nr_list(&sched_ctrl->retrans_ul_harq);
|
||||
free_sched_pucch_list(sched_ctrl);
|
||||
uid_linear_allocator_free(uia, UE->uid);
|
||||
LOG_I(NR_MAC, "Remove NR rnti 0x%04x\n", UE->rnti);
|
||||
free(UE);
|
||||
@@ -2361,6 +2365,11 @@ void set_sched_pucch_list(NR_UE_sched_ctrl_t *sched_ctrl,
|
||||
}
|
||||
}
|
||||
|
||||
void free_sched_pucch_list(NR_UE_sched_ctrl_t *sched_ctrl)
|
||||
{
|
||||
free(sched_ctrl->sched_pucch);
|
||||
}
|
||||
|
||||
void create_dl_harq_list(NR_UE_sched_ctrl_t *sched_ctrl,
|
||||
const NR_PDSCH_ServingCellConfig_t *pdsch) {
|
||||
const int nrofHARQ = pdsch && pdsch->nrofHARQ_ProcessesForPDSCH ?
|
||||
@@ -2727,20 +2736,80 @@ void nr_csirs_scheduling(int Mod_idP, frame_t frame, sub_frame_t slot, int n_slo
|
||||
}
|
||||
}
|
||||
|
||||
static void nr_mac_apply_cellgroup(gNB_MAC_INST *mac, NR_UE_info_t *UE, frame_t frame, sub_frame_t slot)
|
||||
{
|
||||
LOG_I(NR_MAC, "%4d.%2d RNTI %04x: RRC processing timer expired\n", frame, slot, UE->rnti);
|
||||
|
||||
/* check if there is a new CellGroupConfig to be applied */
|
||||
if (UE->apply_cellgroup && UE->reconfigCellGroup != NULL) {
|
||||
LOG_I(NR_MAC, "%4d.%2d RNTI %04x: Apply CellGroupConfig after RRC processing timer expiry\n", frame, slot, UE->rnti);
|
||||
ASN_STRUCT_FREE(asn_DEF_NR_CellGroupConfig, UE->CellGroup);
|
||||
UE->CellGroup = UE->reconfigCellGroup;
|
||||
UE->reconfigCellGroup = NULL;
|
||||
UE->apply_cellgroup = false;
|
||||
|
||||
if (LOG_DEBUGFLAG(DEBUG_ASN1))
|
||||
xer_fprint(stdout, &asn_DEF_NR_CellGroupConfig, (const void *)UE->CellGroup);
|
||||
}
|
||||
|
||||
NR_ServingCellConfigCommon_t *scc = mac->common_channels[0].ServingCellConfigCommon;
|
||||
|
||||
/* Note! we already did process_CellGroup(), so no need to do this again */
|
||||
NR_UE_sched_ctrl_t *sched_ctrl = &UE->UE_sched_ctrl;
|
||||
configure_UE_BWP(mac, scc, sched_ctrl, NULL, UE, -1, -1);
|
||||
|
||||
reset_srs_stats(UE);
|
||||
|
||||
if (get_softmodem_params()->sa) {
|
||||
// add all available DL HARQ processes for this UE in SA
|
||||
create_dl_harq_list(sched_ctrl, UE->current_DL_BWP.pdsch_servingcellconfig);
|
||||
}
|
||||
}
|
||||
|
||||
int nr_mac_enable_ue_rrc_processing_timer(gNB_MAC_INST *mac, NR_UE_info_t *UE, bool apply_cellgroup)
|
||||
{
|
||||
DevAssert(mac != NULL);
|
||||
DevAssert(UE != NULL);
|
||||
NR_SCHED_ENSURE_LOCKED(&mac->sched_lock);
|
||||
|
||||
const uint16_t sl_ahead = mac->if_inst->sl_ahead;
|
||||
// TODO: account for BWP switch with NR_RRC_BWP_SWITCHING_DELAY_MS
|
||||
int delay = NR_RRC_RECONFIGURATION_DELAY_MS;
|
||||
NR_SubcarrierSpacing_t scs = UE->current_UL_BWP.scs;
|
||||
|
||||
UE->UE_sched_ctrl.rrc_processing_timer = (delay << scs) + sl_ahead;
|
||||
UE->apply_cellgroup = apply_cellgroup;
|
||||
AssertFatal(!UE->apply_cellgroup || (UE->apply_cellgroup && UE->reconfigCellGroup),
|
||||
"logic bug: apply_cellgroup %d and UE->reconfigCellGroup %p: did you try to apply a cellGroup, while none is deposited?\n",
|
||||
UE->apply_cellgroup,
|
||||
UE->reconfigCellGroup);
|
||||
|
||||
// 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.
|
||||
UE->UE_sched_ctrl.ta_frame = (mac->frame - 1 + 1024) % 1024;
|
||||
|
||||
LOG_I(NR_MAC, "%4d.%2d UE %04x: Activate RRC processing timer (%d ms)\n", mac->frame, mac->slot, UE->rnti, delay);
|
||||
return 0;
|
||||
}
|
||||
|
||||
void nr_mac_update_timers(module_id_t module_id,
|
||||
frame_t frame,
|
||||
sub_frame_t slot)
|
||||
{
|
||||
/* already mutex protected: held in gNB_dlsch_ulsch_scheduler() */
|
||||
NR_SCHED_ENSURE_LOCKED(&RC.nrmac[module_id]->sched_lock);
|
||||
gNB_MAC_INST *mac = RC.nrmac[module_id];
|
||||
|
||||
NR_UEs_t *UE_info = &RC.nrmac[module_id]->UE_info;
|
||||
/* already mutex protected: held in gNB_dlsch_ulsch_scheduler() */
|
||||
NR_SCHED_ENSURE_LOCKED(&mac->sched_lock);
|
||||
|
||||
NR_UEs_t *UE_info = &mac->UE_info;
|
||||
UE_iterator(UE_info->list, UE) {
|
||||
NR_UE_sched_ctrl_t *sched_ctrl = &UE->UE_sched_ctrl;
|
||||
|
||||
if (nr_mac_check_release(sched_ctrl, UE->rnti)) {
|
||||
nr_rlc_remove_ue(UE->rnti);
|
||||
mac_remove_nr_ue(RC.nrmac[module_id], UE->rnti);
|
||||
mac_remove_nr_ue(mac, UE->rnti);
|
||||
// go back to examine the next UE, which is at the position the
|
||||
// current UE was
|
||||
UE--;
|
||||
@@ -2748,41 +2817,12 @@ void nr_mac_update_timers(module_id_t module_id,
|
||||
}
|
||||
|
||||
/* check if UL failure and trigger release request if necessary */
|
||||
nr_mac_check_ul_failure(RC.nrmac[module_id], UE->rnti, sched_ctrl);
|
||||
nr_mac_check_ul_failure(mac, UE->rnti, sched_ctrl);
|
||||
|
||||
if (sched_ctrl->rrc_processing_timer > 0) {
|
||||
sched_ctrl->rrc_processing_timer--;
|
||||
if (sched_ctrl->rrc_processing_timer == 0) {
|
||||
LOG_I(NR_MAC, "(%d.%d) De-activating RRC processing timer for UE %04x\n", frame, slot, UE->rnti);
|
||||
|
||||
reset_srs_stats(UE);
|
||||
|
||||
NR_CellGroupConfig_t *cg = NULL;
|
||||
uper_decode(NULL,
|
||||
&asn_DEF_NR_CellGroupConfig, // might be added prefix later
|
||||
(void **)&cg,
|
||||
(uint8_t *)UE->cg_buf,
|
||||
(UE->enc_rval.encoded + 7) / 8,
|
||||
0,
|
||||
0);
|
||||
UE->CellGroup = cg;
|
||||
|
||||
if (LOG_DEBUGFLAG(DEBUG_ASN1)) {
|
||||
xer_fprint(stdout, &asn_DEF_NR_CellGroupConfig, (const void *) UE->CellGroup);
|
||||
}
|
||||
|
||||
NR_ServingCellConfigCommon_t *scc = RC.nrmac[module_id]->common_channels[0].ServingCellConfigCommon;
|
||||
|
||||
LOG_I(NR_MAC,"Modified rnti %04x with CellGroup\n", UE->rnti);
|
||||
process_CellGroup(cg, UE);
|
||||
NR_UE_sched_ctrl_t *sched_ctrl = &UE->UE_sched_ctrl;
|
||||
configure_UE_BWP(RC.nrmac[module_id], scc, sched_ctrl, NULL, UE, -1, -1);
|
||||
|
||||
if (get_softmodem_params()->sa) {
|
||||
// add all available DL HARQ processes for this UE in SA
|
||||
create_dl_harq_list(sched_ctrl, UE->current_DL_BWP.pdsch_servingcellconfig);
|
||||
}
|
||||
}
|
||||
if (sched_ctrl->rrc_processing_timer == 0)
|
||||
nr_mac_apply_cellgroup(mac, UE, frame, slot);
|
||||
}
|
||||
|
||||
// RA timer
|
||||
@@ -2790,7 +2830,7 @@ void nr_mac_update_timers(module_id_t module_id,
|
||||
UE->ra_timer--;
|
||||
if (UE->ra_timer == 0) {
|
||||
LOG_W(NR_MAC, "Removing UE %04x because RA timer expired\n", UE->rnti);
|
||||
mac_remove_nr_ue(RC.nrmac[module_id], UE->rnti);
|
||||
mac_remove_nr_ue(mac, UE->rnti);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2884,16 +2924,13 @@ void prepare_initial_ul_rrc_message(gNB_MAC_INST *mac, NR_UE_info_t *UE)
|
||||
{
|
||||
NR_SCHED_ENSURE_LOCKED(&mac->sched_lock);
|
||||
/* create this UE's initial CellGroup */
|
||||
/* Note: relying on the RRC is a hack, as we are in the DU; there should be
|
||||
* no RRC, remove in the future */
|
||||
module_id_t mod_id = 0;
|
||||
gNB_RRC_INST *rrc = RC.nrrrc[mod_id];
|
||||
const NR_ServingCellConfigCommon_t *scc = rrc->carrier.servingcellconfigcommon;
|
||||
const NR_ServingCellConfig_t *sccd = rrc->configuration.scd;
|
||||
NR_CellGroupConfig_t *cellGroupConfig = get_initial_cellGroupConfig(UE->uid, scc, sccd, &rrc->configuration);
|
||||
int CC_id = 0;
|
||||
const NR_ServingCellConfigCommon_t *scc = mac->common_channels[CC_id].ServingCellConfigCommon;
|
||||
const NR_ServingCellConfig_t *sccd = mac->common_channels[CC_id].pre_ServingCellConfig;
|
||||
NR_CellGroupConfig_t *cellGroupConfig = get_initial_cellGroupConfig(UE->uid, scc, sccd, &mac->radio_config);
|
||||
|
||||
UE->CellGroup = cellGroupConfig;
|
||||
nr_mac_update_cellgroup(mac, UE->rnti, cellGroupConfig);
|
||||
process_CellGroup(cellGroupConfig, UE);
|
||||
|
||||
/* activate SRB0 */
|
||||
nr_rlc_activate_srb0(UE->rnti, mac, UE, send_initial_ul_rrc_message);
|
||||
|
||||
@@ -1209,7 +1209,7 @@ int nr_acknack_scheduling(gNB_MAC_INST *mac,
|
||||
* called often, don't try to lock every time */
|
||||
|
||||
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_UE_UL_BWP_t *ul_bwp = &UE->current_UL_BWP;
|
||||
const int n_slots_frame = nr_slots_per_frame[ul_bwp->scs];
|
||||
|
||||
@@ -38,24 +38,20 @@
|
||||
|
||||
void set_cset_offset(uint16_t);
|
||||
|
||||
void mac_top_init_gNB(ngran_node_t node_type);
|
||||
void mac_top_init_gNB(ngran_node_t node_type,
|
||||
NR_ServingCellConfigCommon_t *scc,
|
||||
NR_ServingCellConfig_t *scd,
|
||||
const nr_mac_config_t *conf);
|
||||
void nr_mac_send_f1_setup_req(void);
|
||||
|
||||
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 *mac_config);
|
||||
void nr_mac_configure_sib1(gNB_MAC_INST *nrmac, const f1ap_plmn_t *plmn, uint64_t cellID, int tac);
|
||||
|
||||
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);
|
||||
void nr_mac_config_mib(gNB_MAC_INST *nrmac, NR_BCCH_BCH_Message_t *mib);
|
||||
void nr_mac_config_sib1(gNB_MAC_INST *nrmac, NR_BCCH_DL_SCH_Message_t *sib1);
|
||||
bool nr_mac_add_test_ue(gNB_MAC_INST *nrmac, uint32_t rnti, NR_CellGroupConfig_t *CellGroup);
|
||||
bool nr_mac_prepare_ra_ue(gNB_MAC_INST *nrmac, uint32_t rnti, NR_CellGroupConfig_t *CellGroup);
|
||||
bool nr_mac_update_cellgroup(gNB_MAC_INST *nrmac, uint32_t rnti, NR_CellGroupConfig_t *CellGroup);
|
||||
|
||||
bool nr_mac_prepare_cellgroup_update(gNB_MAC_INST *nrmac, NR_UE_info_t *UE, NR_CellGroupConfig_t *CellGroup);
|
||||
int nr_mac_enable_ue_rrc_processing_timer(gNB_MAC_INST *mac, NR_UE_info_t *UE, bool apply_cellGroup);
|
||||
|
||||
void clear_nr_nfapi_information(gNB_MAC_INST *gNB,
|
||||
int CC_idP,
|
||||
@@ -395,6 +391,7 @@ uint8_t get_dl_nrOfLayers(const NR_UE_sched_ctrl_t *sched_ctrl, const nr_dci_for
|
||||
void set_sched_pucch_list(NR_UE_sched_ctrl_t *sched_ctrl,
|
||||
const NR_UE_UL_BWP_t *ul_bwp,
|
||||
const NR_ServingCellConfigCommon_t *scc);
|
||||
void free_sched_pucch_list(NR_UE_sched_ctrl_t *sched_ctrl);
|
||||
|
||||
const int get_dl_tda(const gNB_MAC_INST *nrmac, const NR_ServingCellConfigCommon_t *scc, int slot);
|
||||
const int get_ul_tda(gNB_MAC_INST *nrmac, const NR_ServingCellConfigCommon_t *scc, int frame, int slot);
|
||||
|
||||
@@ -30,6 +30,49 @@
|
||||
#include "uper_decoder.h"
|
||||
#include "uper_encoder.h"
|
||||
|
||||
static bool check_plmn_identity(const f1ap_plmn_t *check_plmn, const f1ap_plmn_t *plmn)
|
||||
{
|
||||
return plmn->mcc == check_plmn->mcc && plmn->mnc_digit_length == check_plmn->mnc_digit_length && plmn->mnc == check_plmn->mnc;
|
||||
}
|
||||
|
||||
void f1_setup_response(const f1ap_setup_resp_t *resp)
|
||||
{
|
||||
LOG_I(MAC, "received F1 Setup Response from CU %s\n", resp->gNB_CU_name);
|
||||
|
||||
if (resp->num_cells_to_activate == 0) {
|
||||
LOG_W(NR_MAC, "no cell to activate: cell remains blocked\n");
|
||||
return;
|
||||
}
|
||||
|
||||
gNB_MAC_INST *mac = RC.nrmac[0];
|
||||
NR_SCHED_LOCK(&mac->sched_lock);
|
||||
const f1ap_setup_req_t *setup_req = mac->f1_config.setup_req;
|
||||
const f1ap_served_cell_info_t *du_cell = &setup_req->cell[0].info;
|
||||
|
||||
AssertFatal(resp->num_cells_to_activate == 1, "can only handle one cell, but %d activated\n", resp->num_cells_to_activate);
|
||||
const served_cells_to_activate_t *cu_cell = &resp->cells_to_activate[0];
|
||||
|
||||
AssertFatal(du_cell->nr_cellid == cu_cell->nr_cellid, "CellID mismatch: DU %ld vs CU %ld\n", du_cell->nr_cellid, cu_cell->nr_cellid);
|
||||
AssertFatal(check_plmn_identity(&du_cell->plmn, &cu_cell->plmn), "PLMN mismatch\n");
|
||||
AssertFatal(du_cell->nr_pci == cu_cell->nrpci, "PCI mismatch: DU %d vs CU %d\n", du_cell->nr_pci, cu_cell->nrpci);
|
||||
|
||||
AssertFatal(cu_cell->num_SI == 0, "handling of CU-provided SIBs: not implemented\n");
|
||||
|
||||
mac->f1_config.setup_resp = malloc(sizeof(*mac->f1_config.setup_resp));
|
||||
AssertFatal(mac->f1_config.setup_resp != NULL, "out of memory\n");
|
||||
*mac->f1_config.setup_resp = *resp;
|
||||
if (resp->gNB_CU_name)
|
||||
mac->f1_config.setup_resp->gNB_CU_name = strdup(resp->gNB_CU_name);
|
||||
|
||||
NR_SCHED_UNLOCK(&mac->sched_lock);
|
||||
}
|
||||
|
||||
void f1_setup_failure(const f1ap_setup_failure_t *failure)
|
||||
{
|
||||
LOG_E(MAC, "the CU reported F1AP Setup Failure, is there a configuration mismatch?\n");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
static NR_RLC_BearerConfig_t *get_bearerconfig_from_srb(const f1ap_srb_to_be_setup_t *srb)
|
||||
{
|
||||
long priority = srb->srb_id; // high priority for SRB
|
||||
@@ -95,6 +138,54 @@ static int handle_ue_context_drbs_setup(int rnti,
|
||||
return drbs_len;
|
||||
}
|
||||
|
||||
static NR_UE_NR_Capability_t *get_ue_nr_cap(int rnti, uint8_t *buf, uint32_t len)
|
||||
{
|
||||
if (buf == NULL || len == 0)
|
||||
return NULL;
|
||||
|
||||
NR_UE_CapabilityRAT_ContainerList_t *clist = NULL;
|
||||
asn_dec_rval_t dec_rval = uper_decode(NULL, &asn_DEF_NR_UE_CapabilityRAT_ContainerList, (void **)&clist, buf, len, 0, 0);
|
||||
if (dec_rval.code != RC_OK) {
|
||||
LOG_W(NR_MAC, "cannot decode UE capability container list of UE RNTI %04x, ignoring capabilities\n", rnti);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
NR_UE_NR_Capability_t *cap = NULL;
|
||||
for (int i = 0; i < clist->list.count; i++) {
|
||||
const NR_UE_CapabilityRAT_Container_t *c = clist->list.array[i];
|
||||
if (cap != NULL || c->rat_Type != NR_RAT_Type_nr) {
|
||||
LOG_W(NR_MAC, "UE RNTI %04x: ignoring capability of type %ld\n", rnti, c->rat_Type);
|
||||
continue;
|
||||
}
|
||||
|
||||
asn_dec_rval_t dec_rval = uper_decode(NULL,
|
||||
&asn_DEF_NR_UE_NR_Capability,
|
||||
(void **)&cap,
|
||||
c->ue_CapabilityRAT_Container.buf,
|
||||
c->ue_CapabilityRAT_Container.size,
|
||||
0,
|
||||
0);
|
||||
if (dec_rval.code != RC_OK) {
|
||||
LOG_W(NR_MAC, "cannot decode NR UE capabilities of UE RNTI %04x, ignoring NR capability\n", rnti);
|
||||
cap = NULL;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
return cap;
|
||||
}
|
||||
|
||||
static NR_CellGroupConfig_t *clone_CellGroupConfig(const NR_CellGroupConfig_t *orig)
|
||||
{
|
||||
uint8_t buf[16636];
|
||||
asn_enc_rval_t enc_rval = uper_encode_to_buffer(&asn_DEF_NR_CellGroupConfig, NULL, orig, buf, sizeof(buf));
|
||||
AssertFatal(enc_rval.encoded > 0, "could not clone CellGroupConfig: problem while encoding\n");
|
||||
NR_CellGroupConfig_t *cloned = NULL;
|
||||
asn_dec_rval_t dec_rval = uper_decode(NULL, &asn_DEF_NR_CellGroupConfig, (void **)&cloned, buf, enc_rval.encoded, 0, 0);
|
||||
AssertFatal(dec_rval.code == RC_OK && dec_rval.consumed == enc_rval.encoded,
|
||||
"could not clone CellGroupConfig: problem while decodung\n");
|
||||
return cloned;
|
||||
}
|
||||
|
||||
void ue_context_setup_request(const f1ap_ue_context_setup_t *req)
|
||||
{
|
||||
gNB_MAC_INST *mac = RC.nrmac[0];
|
||||
@@ -104,9 +195,12 @@ void ue_context_setup_request(const f1ap_ue_context_setup_t *req)
|
||||
.gNB_DU_ue_id = req->gNB_DU_ue_id,
|
||||
};
|
||||
|
||||
NR_UE_NR_Capability_t *ue_cap = NULL;
|
||||
if (req->cu_to_du_rrc_information != NULL) {
|
||||
AssertFatal(req->cu_to_du_rrc_information->cG_ConfigInfo == NULL, "CG-ConfigInfo not handled\n");
|
||||
AssertFatal(req->cu_to_du_rrc_information->uE_CapabilityRAT_ContainerList == NULL, "UE capabilities not handled yet\n");
|
||||
ue_cap = get_ue_nr_cap(req->gNB_DU_ue_id,
|
||||
req->cu_to_du_rrc_information->uE_CapabilityRAT_ContainerList,
|
||||
req->cu_to_du_rrc_information->uE_CapabilityRAT_ContainerList_length);
|
||||
AssertFatal(req->cu_to_du_rrc_information->measConfig == NULL, "MeasConfig not handled\n");
|
||||
}
|
||||
|
||||
@@ -115,12 +209,14 @@ void ue_context_setup_request(const f1ap_ue_context_setup_t *req)
|
||||
NR_UE_info_t *UE = find_nr_UE(&RC.nrmac[0]->UE_info, req->gNB_DU_ue_id);
|
||||
AssertFatal(UE != NULL, "did not find UE with RNTI %04x, but UE Context Setup Failed not implemented\n", req->gNB_DU_ue_id);
|
||||
|
||||
NR_CellGroupConfig_t *new_CellGroup = clone_CellGroupConfig(UE->CellGroup);
|
||||
|
||||
if (req->srbs_to_be_setup_length > 0) {
|
||||
resp.srbs_to_be_setup_length = handle_ue_context_srbs_setup(req->gNB_DU_ue_id,
|
||||
req->srbs_to_be_setup_length,
|
||||
req->srbs_to_be_setup,
|
||||
&resp.srbs_to_be_setup,
|
||||
UE->CellGroup);
|
||||
new_CellGroup);
|
||||
}
|
||||
|
||||
if (req->drbs_to_be_setup_length > 0) {
|
||||
@@ -128,27 +224,33 @@ void ue_context_setup_request(const f1ap_ue_context_setup_t *req)
|
||||
req->drbs_to_be_setup_length,
|
||||
req->drbs_to_be_setup,
|
||||
&resp.drbs_to_be_setup,
|
||||
UE->CellGroup);
|
||||
new_CellGroup);
|
||||
}
|
||||
|
||||
if (req->rrc_container != NULL)
|
||||
nr_rlc_srb_recv_sdu(req->gNB_DU_ue_id, DCCH, req->rrc_container, req->rrc_container_length);
|
||||
|
||||
//nr_mac_update_cellgroup()
|
||||
UE->capability = ue_cap;
|
||||
if (ue_cap != NULL) {
|
||||
// store the new UE capabilities, and update the cellGroupConfig
|
||||
ASN_STRUCT_FREE(asn_DEF_NR_UE_NR_Capability, UE->capability);
|
||||
UE->capability = ue_cap;
|
||||
LOG_I(NR_MAC, "UE %04x: received capabilities, updating CellGroupConfig\n", UE->rnti);
|
||||
NR_ServingCellConfigCommon_t *scc = mac->common_channels[0].ServingCellConfigCommon;
|
||||
update_cellGroupConfig(new_CellGroup, UE->uid, UE->capability, &mac->radio_config, scc);
|
||||
}
|
||||
|
||||
resp.du_to_cu_rrc_information = calloc(1, sizeof(du_to_cu_rrc_information_t));
|
||||
AssertFatal(resp.du_to_cu_rrc_information != NULL, "out of memory\n");
|
||||
resp.du_to_cu_rrc_information->cellGroupConfig = calloc(1,1024);
|
||||
AssertFatal(resp.du_to_cu_rrc_information->cellGroupConfig != NULL, "out of memory\n");
|
||||
asn_enc_rval_t enc_rval = uper_encode_to_buffer(&asn_DEF_NR_CellGroupConfig,
|
||||
NULL,
|
||||
UE->CellGroup,
|
||||
resp.du_to_cu_rrc_information->cellGroupConfig,
|
||||
1024);
|
||||
asn_enc_rval_t enc_rval =
|
||||
uper_encode_to_buffer(&asn_DEF_NR_CellGroupConfig, NULL, new_CellGroup, resp.du_to_cu_rrc_information->cellGroupConfig, 1024);
|
||||
AssertFatal(enc_rval.encoded > 0, "Could not encode CellGroup, failed element %s\n", enc_rval.failed_type->name);
|
||||
resp.du_to_cu_rrc_information->cellGroupConfig_length = (enc_rval.encoded + 7) >> 3;
|
||||
|
||||
/* TODO: need to apply after UE context reconfiguration confirmed? */
|
||||
process_CellGroup(UE->CellGroup, UE);
|
||||
nr_mac_prepare_cellgroup_update(mac, UE, new_CellGroup);
|
||||
|
||||
NR_SCHED_UNLOCK(&mac->sched_lock);
|
||||
|
||||
@@ -174,21 +276,26 @@ void ue_context_modification_request(const f1ap_ue_context_modif_req_t *req)
|
||||
.gNB_DU_ue_id = req->gNB_DU_ue_id,
|
||||
};
|
||||
|
||||
NR_UE_NR_Capability_t *ue_cap = NULL;
|
||||
if (req->cu_to_du_rrc_information != NULL) {
|
||||
AssertFatal(req->cu_to_du_rrc_information->cG_ConfigInfo == NULL, "CG-ConfigInfo not handled\n");
|
||||
AssertFatal(req->cu_to_du_rrc_information->uE_CapabilityRAT_ContainerList == NULL, "UE capabilities not handled yet\n");
|
||||
ue_cap = get_ue_nr_cap(req->gNB_DU_ue_id,
|
||||
req->cu_to_du_rrc_information->uE_CapabilityRAT_ContainerList,
|
||||
req->cu_to_du_rrc_information->uE_CapabilityRAT_ContainerList_length);
|
||||
AssertFatal(req->cu_to_du_rrc_information->measConfig == NULL, "MeasConfig not handled\n");
|
||||
}
|
||||
|
||||
NR_SCHED_LOCK(&mac->sched_lock);
|
||||
NR_UE_info_t *UE = find_nr_UE(&RC.nrmac[0]->UE_info, req->gNB_DU_ue_id);
|
||||
|
||||
NR_CellGroupConfig_t *new_CellGroup = clone_CellGroupConfig(UE->CellGroup);
|
||||
|
||||
if (req->srbs_to_be_setup_length > 0) {
|
||||
resp.srbs_to_be_setup_length = handle_ue_context_srbs_setup(req->gNB_DU_ue_id,
|
||||
req->srbs_to_be_setup_length,
|
||||
req->srbs_to_be_setup,
|
||||
&resp.srbs_to_be_setup,
|
||||
UE->CellGroup);
|
||||
new_CellGroup);
|
||||
}
|
||||
|
||||
if (req->drbs_to_be_setup_length > 0) {
|
||||
@@ -196,7 +303,7 @@ void ue_context_modification_request(const f1ap_ue_context_modif_req_t *req)
|
||||
req->drbs_to_be_setup_length,
|
||||
req->drbs_to_be_setup,
|
||||
&resp.drbs_to_be_setup,
|
||||
UE->CellGroup);
|
||||
new_CellGroup);
|
||||
}
|
||||
|
||||
if (req->rrc_container != NULL)
|
||||
@@ -207,24 +314,31 @@ void ue_context_modification_request(const f1ap_ue_context_modif_req_t *req)
|
||||
"RRC reconfiguration outcome unsuccessful, but no rollback mechanism implemented to come back to old configuration\n");
|
||||
}
|
||||
|
||||
if (req->srbs_to_be_setup_length > 0 || req->drbs_to_be_setup_length > 0) {
|
||||
/* TODO: if we change e.g. BWP or MCS table, need to automatically call
|
||||
* configure_UE_BWP() (form nr_mac_update_timers()) after some time? */
|
||||
if (ue_cap != NULL) {
|
||||
// store the new UE capabilities, and update the cellGroupConfig
|
||||
ASN_STRUCT_FREE(asn_DEF_NR_UE_NR_Capability, UE->capability);
|
||||
UE->capability = ue_cap;
|
||||
LOG_I(NR_MAC, "UE %04x: received capabilities, updating CellGroupConfig\n", UE->rnti);
|
||||
NR_ServingCellConfigCommon_t *scc = mac->common_channels[0].ServingCellConfigCommon;
|
||||
update_cellGroupConfig(new_CellGroup, UE->uid, UE->capability, &mac->radio_config, scc);
|
||||
}
|
||||
|
||||
if (req->srbs_to_be_setup_length > 0 || req->drbs_to_be_setup_length > 0 || ue_cap != NULL) {
|
||||
resp.du_to_cu_rrc_information = calloc(1, sizeof(du_to_cu_rrc_information_t));
|
||||
AssertFatal(resp.du_to_cu_rrc_information != NULL, "out of memory\n");
|
||||
resp.du_to_cu_rrc_information->cellGroupConfig = calloc(1, 1024);
|
||||
AssertFatal(resp.du_to_cu_rrc_information->cellGroupConfig != NULL, "out of memory\n");
|
||||
asn_enc_rval_t enc_rval = uper_encode_to_buffer(&asn_DEF_NR_CellGroupConfig,
|
||||
NULL,
|
||||
UE->CellGroup,
|
||||
new_CellGroup,
|
||||
resp.du_to_cu_rrc_information->cellGroupConfig,
|
||||
1024);
|
||||
AssertFatal(enc_rval.encoded > 0, "Could not encode CellGroup, failed element %s\n", enc_rval.failed_type->name);
|
||||
resp.du_to_cu_rrc_information->cellGroupConfig_length = (enc_rval.encoded + 7) >> 3;
|
||||
|
||||
/* works? */
|
||||
nr_mac_update_cellgroup(RC.nrmac[0], req->gNB_DU_ue_id, UE->CellGroup);
|
||||
nr_mac_prepare_cellgroup_update(mac, UE, new_CellGroup);
|
||||
} else {
|
||||
ASN_STRUCT_FREE(asn_DEF_NR_CellGroupConfig, new_CellGroup); // we actually don't need it
|
||||
}
|
||||
NR_SCHED_UNLOCK(&mac->sched_lock);
|
||||
|
||||
@@ -355,26 +469,13 @@ void dl_rrc_message_transfer(const f1ap_dl_rrc_message_t *dl_rrc)
|
||||
|
||||
if (UE->expect_reconfiguration && dl_rrc->srb_id == DCCH) {
|
||||
/* we expected a reconfiguration, and this is on DCCH. We assume this is
|
||||
* the reconfiguration; nr_mac_update_cellgroup() brings the config into
|
||||
* the form expected by nr_mac_update_timers(), and we set the timer to
|
||||
* apply the real configuration at expiration.
|
||||
* Calling it nr_mac_update_cellgroup() is misleading, and using an
|
||||
* intermediate buffer seems not necessary. This is for historical reasons,
|
||||
* when we only had pointer to an RRC structure, and wanted to duplicate
|
||||
* the contents to be applied later. The actually interesting function here
|
||||
* is also configure_UE_BWP(), only called in nr_mac_update_timers().
|
||||
* TODO: This should be cleaned up when the whole CellGroupConfig is
|
||||
* handled entirely at the DU: no intermediate buffer, trigger the timer
|
||||
* from a function (there is nr_mac_enable_ue_rrc_processing_timer(), which
|
||||
* is called from the RRC, hence locks the scheduler, which we cannot use). */
|
||||
LOG_I(NR_MAC, "triggering rrc_processing_timer time UE %04x\n", UE->rnti);
|
||||
pthread_mutex_lock(&mac->sched_lock);
|
||||
nr_mac_update_cellgroup(mac, dl_rrc->gNB_DU_ue_id, UE->reconfigCellGroup);
|
||||
pthread_mutex_unlock(&mac->sched_lock);
|
||||
const uint16_t sl_ahead = mac->if_inst->sl_ahead;
|
||||
NR_SubcarrierSpacing_t scs = 1;
|
||||
int delay = 10;
|
||||
UE->UE_sched_ctrl.rrc_processing_timer = (delay << scs) + sl_ahead;
|
||||
* the reconfiguration: nr_mac_prepare_cellgroup_update() already stored
|
||||
* the CellGroupConfig. Below, we trigger a timer, and the CellGroupConfig
|
||||
* will be applied after its expiry in nr_mac_apply_cellgroup().*/
|
||||
NR_SCHED_LOCK(&mac->sched_lock);
|
||||
nr_mac_enable_ue_rrc_processing_timer(mac, UE, /* apply_cellGroup = */ true);
|
||||
NR_SCHED_UNLOCK(&mac->sched_lock);
|
||||
UE->expect_reconfiguration = false;
|
||||
}
|
||||
|
||||
if (dl_rrc->old_gNB_DU_ue_id != NULL) {
|
||||
@@ -390,9 +491,11 @@ void dl_rrc_message_transfer(const f1ap_dl_rrc_message_t *dl_rrc)
|
||||
* from the current configuration. Also, expect the reconfiguration from
|
||||
* the CU, so save the old UE's CellGroup for the new UE */
|
||||
UE->CellGroup->spCellConfig = NULL;
|
||||
nr_mac_update_cellgroup(mac, dl_rrc->gNB_DU_ue_id, UE->CellGroup);
|
||||
UE->reconfigCellGroup = oldUE->CellGroup;
|
||||
UE->expect_reconfiguration = true;
|
||||
NR_UE_sched_ctrl_t *sched_ctrl = &UE->UE_sched_ctrl;
|
||||
NR_ServingCellConfigCommon_t *scc = mac->common_channels[0].ServingCellConfigCommon;
|
||||
configure_UE_BWP(mac, scc, sched_ctrl, NULL, UE, -1, -1);
|
||||
|
||||
nr_mac_prepare_cellgroup_update(mac, UE, oldUE->CellGroup);
|
||||
oldUE->CellGroup = NULL;
|
||||
mac_remove_nr_ue(mac, *dl_rrc->old_gNB_DU_ue_id);
|
||||
pthread_mutex_unlock(&mac->sched_lock);
|
||||
|
||||
@@ -25,6 +25,9 @@
|
||||
#include "platform_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_modification_request(const f1ap_ue_context_modif_req_t *req);
|
||||
void ue_context_modification_confirm(const f1ap_ue_context_modif_confirm_t *confirm);
|
||||
|
||||
@@ -25,6 +25,8 @@
|
||||
#include "platform_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_modification_response_func_t)(const f1ap_ue_context_modif_req_t *req,
|
||||
const f1ap_ue_context_modif_resp_t *resp);
|
||||
|
||||
@@ -24,6 +24,46 @@
|
||||
|
||||
#include "mac_rrc_ul.h"
|
||||
|
||||
static void f1_setup_request_direct(const f1ap_setup_req_t *req)
|
||||
{
|
||||
MessageDef *msg = itti_alloc_new_message(TASK_MAC_GNB, 0, F1AP_SETUP_REQ);
|
||||
f1ap_setup_req_t *f1ap_msg = &F1AP_SETUP_REQ(msg);
|
||||
f1ap_msg->gNB_DU_id = req->gNB_DU_id;
|
||||
f1ap_msg->gNB_DU_name = strdup(req->gNB_DU_name);
|
||||
f1ap_msg->num_cells_available = req->num_cells_available;
|
||||
for (int n = 0; n < req->num_cells_available; ++n) {
|
||||
f1ap_msg->cell[n].info = req->cell[n].info; // copy most fields
|
||||
if (req->cell[n].info.tac) {
|
||||
f1ap_msg->cell[n].info.tac = malloc(sizeof(*f1ap_msg->cell[n].info.tac));
|
||||
AssertFatal(f1ap_msg->cell[n].info.tac != NULL, "out of memory\n");
|
||||
*f1ap_msg->cell[n].info.tac = *req->cell[n].info.tac;
|
||||
}
|
||||
if (req->cell[n].info.measurement_timing_information)
|
||||
f1ap_msg->cell[n].info.measurement_timing_information = strdup(req->cell[n].info.measurement_timing_information);
|
||||
|
||||
if (req->cell[n].sys_info) {
|
||||
f1ap_gnb_du_system_info_t *orig_sys_info = req->cell[n].sys_info;
|
||||
f1ap_gnb_du_system_info_t *copy_sys_info = calloc(1, sizeof(*copy_sys_info));
|
||||
AssertFatal(copy_sys_info != NULL, "out of memory\n");
|
||||
f1ap_msg->cell[n].sys_info = copy_sys_info;
|
||||
|
||||
copy_sys_info->mib = calloc(orig_sys_info->mib_length, sizeof(uint8_t));
|
||||
AssertFatal(copy_sys_info->mib != NULL, "out of memory\n");
|
||||
memcpy(copy_sys_info->mib, orig_sys_info->mib, orig_sys_info->mib_length);
|
||||
copy_sys_info->mib_length = orig_sys_info->mib_length;
|
||||
|
||||
if (orig_sys_info->sib1_length > 0) {
|
||||
copy_sys_info->sib1 = calloc(orig_sys_info->sib1_length, sizeof(uint8_t));
|
||||
AssertFatal(copy_sys_info->sib1 != NULL, "out of memory\n");
|
||||
memcpy(copy_sys_info->sib1, orig_sys_info->sib1, orig_sys_info->sib1_length);
|
||||
copy_sys_info->sib1_length = orig_sys_info->sib1_length;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
itti_send_msg_to_task(TASK_RRC_GNB, 0, msg);
|
||||
}
|
||||
|
||||
static void ue_context_setup_response_direct(const f1ap_ue_context_setup_t *req, const f1ap_ue_context_setup_t *resp)
|
||||
{
|
||||
DevAssert(req->drbs_to_be_setup_length == resp->drbs_to_be_setup_length);
|
||||
@@ -64,9 +104,7 @@ static void ue_context_modification_response_direct(const f1ap_ue_context_modif_
|
||||
|
||||
f1ap_msg->gNB_CU_ue_id = resp->gNB_CU_ue_id;
|
||||
f1ap_msg->gNB_DU_ue_id = resp->gNB_DU_ue_id;
|
||||
f1ap_msg->mcc = resp->mcc;
|
||||
f1ap_msg->mnc = resp->mnc;
|
||||
f1ap_msg->mnc_digit_length = resp->mnc_digit_length;
|
||||
f1ap_msg->plmn = resp->plmn;
|
||||
f1ap_msg->nr_cellid = resp->nr_cellid;
|
||||
f1ap_msg->servCellIndex = resp->servCellIndex;
|
||||
AssertFatal(resp->cellULConfigured == NULL, "not handled\n");
|
||||
@@ -174,6 +212,7 @@ static void initial_ul_rrc_message_transfer_direct(module_id_t module_id, const
|
||||
|
||||
void mac_rrc_ul_direct_init(struct nr_mac_rrc_ul_if_s *mac_rrc)
|
||||
{
|
||||
mac_rrc->f1_setup_request = f1_setup_request_direct;
|
||||
mac_rrc->ue_context_setup_response = ue_context_setup_response_direct;
|
||||
mac_rrc->ue_context_modification_response = ue_context_modification_response_direct;
|
||||
mac_rrc->ue_context_modification_required = ue_context_modification_required_direct;
|
||||
|
||||
@@ -29,6 +29,76 @@
|
||||
|
||||
#include "mac_rrc_ul.h"
|
||||
|
||||
static f1ap_net_config_t read_DU_IP_config(const eth_params_t* f1_params)
|
||||
{
|
||||
f1ap_net_config_t nc = {0};
|
||||
|
||||
nc.CU_f1_ip_address.ipv6 = 0;
|
||||
nc.CU_f1_ip_address.ipv4 = 1;
|
||||
strcpy(nc.CU_f1_ip_address.ipv4_address, f1_params->remote_addr);
|
||||
nc.CUport = f1_params->remote_portd;
|
||||
LOG_I(GNB_APP,
|
||||
"FIAP: CU_ip4_address in DU %p, strlen %d\n",
|
||||
nc.CU_f1_ip_address.ipv4_address,
|
||||
(int)strlen(f1_params->remote_addr));
|
||||
|
||||
nc.DU_f1_ip_address.ipv6 = 0;
|
||||
nc.DU_f1_ip_address.ipv4 = 1;
|
||||
strcpy(nc.DU_f1_ip_address.ipv4_address, f1_params->my_addr);
|
||||
nc.DUport = f1_params->my_portd;
|
||||
LOG_I(GNB_APP,
|
||||
"FIAP: DU_ip4_address in DU %p, strlen %ld\n",
|
||||
nc.DU_f1_ip_address.ipv4_address,
|
||||
strlen(f1_params->my_addr));
|
||||
|
||||
// sctp_in_streams/sctp_out_streams are given by SCTP layer
|
||||
return nc;
|
||||
}
|
||||
|
||||
|
||||
static void f1_setup_request_f1ap(const f1ap_setup_req_t *req)
|
||||
{
|
||||
MessageDef *msg = itti_alloc_new_message(TASK_MAC_GNB, 0, F1AP_DU_REGISTER_REQ);
|
||||
|
||||
f1ap_setup_req_t *f1ap_setup = &F1AP_DU_REGISTER_REQ(msg).setup_req;
|
||||
f1ap_setup->gNB_DU_id = req->gNB_DU_id;
|
||||
f1ap_setup->gNB_DU_name = strdup(req->gNB_DU_name);
|
||||
f1ap_setup->num_cells_available = req->num_cells_available;
|
||||
for (int n = 0; n < req->num_cells_available; ++n) {
|
||||
f1ap_setup->cell[n].info = req->cell[n].info; // copy most fields
|
||||
if (req->cell[n].info.tac) {
|
||||
f1ap_setup->cell[n].info.tac = malloc(sizeof(*f1ap_setup->cell[n].info.tac));
|
||||
AssertFatal(f1ap_setup->cell[n].info.tac != NULL, "out of memory\n");
|
||||
*f1ap_setup->cell[n].info.tac = *req->cell[n].info.tac;
|
||||
}
|
||||
if (req->cell[n].info.measurement_timing_information)
|
||||
f1ap_setup->cell[n].info.measurement_timing_information = strdup(req->cell[n].info.measurement_timing_information);
|
||||
|
||||
if (req->cell[n].sys_info) {
|
||||
f1ap_gnb_du_system_info_t *orig_sys_info = req->cell[n].sys_info;
|
||||
f1ap_gnb_du_system_info_t *copy_sys_info = calloc(1, sizeof(*copy_sys_info));
|
||||
AssertFatal(copy_sys_info != NULL, "out of memory\n");
|
||||
f1ap_setup->cell[n].sys_info = copy_sys_info;
|
||||
|
||||
copy_sys_info->mib = calloc(orig_sys_info->mib_length, sizeof(uint8_t));
|
||||
AssertFatal(copy_sys_info->mib != NULL, "out of memory\n");
|
||||
memcpy(copy_sys_info->mib, orig_sys_info->mib, orig_sys_info->mib_length);
|
||||
copy_sys_info->mib_length = orig_sys_info->mib_length;
|
||||
|
||||
if (orig_sys_info->sib1_length > 0) {
|
||||
copy_sys_info->sib1 = calloc(orig_sys_info->sib1_length, sizeof(uint8_t));
|
||||
AssertFatal(copy_sys_info->sib1 != NULL, "out of memory\n");
|
||||
memcpy(copy_sys_info->sib1, orig_sys_info->sib1, orig_sys_info->sib1_length);
|
||||
copy_sys_info->sib1_length = orig_sys_info->sib1_length;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
F1AP_DU_REGISTER_REQ(msg).net_config = read_DU_IP_config(&RC.nrmac[0]->eth_params_n);
|
||||
|
||||
itti_send_msg_to_task(TASK_DU_F1, 0, msg);
|
||||
}
|
||||
|
||||
static void ue_context_setup_response_f1ap(const f1ap_ue_context_setup_t *req, const f1ap_ue_context_setup_t *resp)
|
||||
{
|
||||
DevAssert(req->drbs_to_be_setup_length == resp->drbs_to_be_setup_length);
|
||||
@@ -161,6 +231,7 @@ static void initial_ul_rrc_message_transfer_f1ap(module_id_t module_id, const f1
|
||||
|
||||
void mac_rrc_ul_f1ap_init(struct nr_mac_rrc_ul_if_s *mac_rrc)
|
||||
{
|
||||
mac_rrc->f1_setup_request = f1_setup_request_f1ap;
|
||||
mac_rrc->ue_context_setup_response = ue_context_setup_response_f1ap;
|
||||
mac_rrc->ue_context_modification_response = ue_context_modification_response_f1ap;
|
||||
mac_rrc->ue_context_modification_required = ue_context_modification_required_f1ap;
|
||||
|
||||
@@ -205,11 +205,16 @@ static void mac_rrc_init(gNB_MAC_INST *mac, ngran_node_t node_type)
|
||||
}
|
||||
}
|
||||
|
||||
void mac_top_init_gNB(ngran_node_t node_type)
|
||||
void mac_top_init_gNB(ngran_node_t node_type,
|
||||
NR_ServingCellConfigCommon_t *scc,
|
||||
NR_ServingCellConfig_t *scd,
|
||||
const nr_mac_config_t *config)
|
||||
{
|
||||
module_id_t i;
|
||||
gNB_MAC_INST *nrmac;
|
||||
|
||||
AssertFatal(RC.nb_nr_macrlc_inst == 1, "what is the point of calling %s() if you don't need exactly one MAC?\n", __func__);
|
||||
|
||||
LOG_I(MAC, "[MAIN] Init function start:nb_nr_macrlc_inst=%d\n",RC.nb_nr_macrlc_inst);
|
||||
|
||||
if (RC.nb_nr_macrlc_inst > 0) {
|
||||
@@ -239,7 +244,13 @@ void mac_top_init_gNB(ngran_node_t node_type)
|
||||
|
||||
RC.nrmac[i]->ul_handle = 0;
|
||||
|
||||
RC.nrmac[i]->common_channels[0].ServingCellConfigCommon = scc;
|
||||
RC.nrmac[i]->radio_config = *config;
|
||||
|
||||
RC.nrmac[i]->common_channels[0].pre_ServingCellConfig = scd;
|
||||
|
||||
RC.nrmac[i]->first_MIB = true;
|
||||
RC.nrmac[i]->common_channels[0].mib = get_new_MIB_NR(scc);
|
||||
|
||||
RC.nrmac[i]->cset0_bwp_start = 0;
|
||||
RC.nrmac[i]->cset0_bwp_size = 0;
|
||||
@@ -305,4 +316,14 @@ void mac_top_init_gNB(ngran_node_t node_type)
|
||||
du_init_f1_ue_data();
|
||||
|
||||
srand48(0);
|
||||
|
||||
// triggers also PYH initialization in case we have L1 via FAPI
|
||||
nr_mac_config_scc(RC.nrmac[0], scc, config);
|
||||
}
|
||||
|
||||
void nr_mac_send_f1_setup_req(void)
|
||||
{
|
||||
gNB_MAC_INST *mac = RC.nrmac[0];
|
||||
DevAssert(mac);
|
||||
mac->mac_rrc.f1_setup_request(mac->f1_config.setup_req);
|
||||
}
|
||||
|
||||
@@ -71,6 +71,7 @@
|
||||
#include "NR_BCCH-BCH-Message.h"
|
||||
#include "NR_CellGroupConfig.h"
|
||||
#include "NR_BCCH-DL-SCH-Message.h"
|
||||
#include "openair2/RRC/NR/nr_rrc_config.h"
|
||||
|
||||
/* PHY */
|
||||
#include "time_meas.h"
|
||||
@@ -120,6 +121,24 @@ typedef enum {
|
||||
WAIT_Msg4_ACK = 6
|
||||
} RA_gNB_state_t;
|
||||
|
||||
typedef struct nr_pdsch_AntennaPorts_t {
|
||||
int N1;
|
||||
int N2;
|
||||
int XP;
|
||||
} nr_pdsch_AntennaPorts_t;
|
||||
|
||||
typedef struct nr_mac_config_t {
|
||||
int sib1_tda;
|
||||
nr_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;
|
||||
} nr_mac_config_t;
|
||||
|
||||
typedef struct NR_preamble_ue {
|
||||
uint8_t num_preambles;
|
||||
uint8_t *preamble_list;
|
||||
@@ -220,12 +239,15 @@ typedef struct {
|
||||
NR_BCCH_BCH_Message_t *mib;
|
||||
NR_BCCH_DL_SCH_Message_t *sib1;
|
||||
NR_ServingCellConfigCommon_t *ServingCellConfigCommon;
|
||||
/// pre-configured ServingCellConfig that is default for every UE
|
||||
NR_ServingCellConfig_t *pre_ServingCellConfig;
|
||||
NR_ARFCN_ValueEUTRA_t ul_CarrierFreq;
|
||||
long ul_Bandwidth;
|
||||
/// Outgoing MIB PDU for PHY
|
||||
MIB_PDU MIB_pdu;
|
||||
uint8_t MIB_pdu[3];
|
||||
/// Outgoing BCCH pdu for PHY
|
||||
BCCH_PDU BCCH_pdu;
|
||||
uint8_t sib1_bcch_pdu[NR_MAX_SIB_LENGTH / 8];
|
||||
int sib1_bcch_length;
|
||||
/// Outgoing BCCH DCI allocation
|
||||
uint32_t BCCH_alloc_pdu;
|
||||
/// Outgoing CCCH pdu for PHY
|
||||
@@ -656,6 +678,7 @@ typedef struct NR_bler_options {
|
||||
} NR_bler_options_t;
|
||||
|
||||
typedef struct nr_mac_rrc_ul_if_s {
|
||||
f1_setup_request_func_t f1_setup_request;
|
||||
ue_context_setup_response_func_t ue_context_setup_response;
|
||||
ue_context_modification_response_func_t ue_context_modification_response;
|
||||
ue_context_modification_required_func_t ue_context_modification_required;
|
||||
@@ -677,10 +700,10 @@ typedef struct {
|
||||
/// currently active CellGroupConfig
|
||||
NR_CellGroupConfig_t *CellGroup;
|
||||
/// CellGroupConfig that is to be activated after the next reconfiguration
|
||||
NR_CellGroupConfig_t *reconfigCellGroup;
|
||||
bool expect_reconfiguration;
|
||||
char cg_buf[32768]; /* arbitrary size */
|
||||
asn_enc_rval_t enc_rval;
|
||||
NR_CellGroupConfig_t *reconfigCellGroup;
|
||||
bool apply_cellgroup;
|
||||
NR_UE_NR_Capability_t *capability;
|
||||
// UE selected beam index
|
||||
uint8_t UE_beam_index;
|
||||
bool Msg4_ACKed;
|
||||
@@ -708,6 +731,11 @@ typedef bool (*nr_pp_impl_ul)(module_id_t mod_id,
|
||||
frame_t frame,
|
||||
sub_frame_t slot);
|
||||
|
||||
typedef struct f1_config_t {
|
||||
f1ap_setup_req_t *setup_req;
|
||||
f1ap_setup_resp_t *setup_resp;
|
||||
} f1_config_t;
|
||||
|
||||
/*! \brief top level eNB MAC structure */
|
||||
typedef struct gNB_MAC_INST_s {
|
||||
/// Ethernet parameters for northbound midhaul interface
|
||||
@@ -734,9 +762,7 @@ typedef struct gNB_MAC_INST_s {
|
||||
/// Subcarrier Offset
|
||||
int ssb_SubcarrierOffset;
|
||||
int ssb_OffsetPointA;
|
||||
/// SIB1 Time domain allocation
|
||||
int sib1_tda;
|
||||
int minRXTXTIMEpdsch;
|
||||
|
||||
/// Common cell resources
|
||||
NR_COMMON_channels_t common_channels[NFAPI_CC_MAX];
|
||||
/// current PDU index (BCH,DLSCH)
|
||||
@@ -802,20 +828,22 @@ typedef struct gNB_MAC_INST_s {
|
||||
/// UL preprocessor for differentiated scheduling
|
||||
nr_pp_impl_ul pre_processor_ul;
|
||||
|
||||
nr_mac_config_t radio_config;
|
||||
|
||||
NR_UE_sched_ctrl_t *sched_ctrlCommon;
|
||||
uint16_t cset0_bwp_start;
|
||||
uint16_t cset0_bwp_size;
|
||||
NR_Type0_PDCCH_CSS_config_t type0_PDCCH_CSS_config[64];
|
||||
|
||||
int xp_pdsch_antenna_ports;
|
||||
|
||||
bool first_MIB;
|
||||
NR_bler_options_t dl_bler;
|
||||
NR_bler_options_t ul_bler;
|
||||
uint8_t min_grant_prb;
|
||||
uint8_t min_grant_mcs;
|
||||
bool identity_pm;
|
||||
|
||||
nr_mac_rrc_ul_if_t mac_rrc;
|
||||
f1_config_t f1_config;
|
||||
|
||||
int16_t frame;
|
||||
int16_t slot;
|
||||
|
||||
@@ -115,7 +115,7 @@ typedef struct m2ap_MCE_data_s {
|
||||
uint16_t cnx_id;
|
||||
|
||||
/* SCTP association id */
|
||||
int32_t assoc_id;
|
||||
sctp_assoc_t assoc_id;
|
||||
|
||||
/* Nid cells */
|
||||
uint32_t Nid_cell[MAX_NUM_CCs];
|
||||
|
||||
@@ -314,7 +314,7 @@ int m2ap_MCE_generate_m2_setup_response(m2ap_MCE_instance_t *instance_p, m2ap_MC
|
||||
}
|
||||
|
||||
int m2ap_MCE_generate_m2_setup_failure(instance_t instance,
|
||||
uint32_t assoc_id,
|
||||
sctp_assoc_t assoc_id,
|
||||
M2AP_Cause_PR cause_type,
|
||||
long cause_value,
|
||||
long time_to_wait)
|
||||
|
||||
@@ -38,7 +38,7 @@ int m2ap_MCE_generate_m2_setup_request(m2ap_MCE_instance_t *instance_p,
|
||||
int m2ap_MCE_generate_m2_setup_response(m2ap_MCE_instance_t *instance_p, m2ap_MCE_data_t *m2ap_MCE_data_p);
|
||||
|
||||
int m2ap_MCE_generate_m2_setup_failure(instance_t instance,
|
||||
uint32_t assoc_id,
|
||||
sctp_assoc_t assoc_id,
|
||||
M2AP_Cause_PR cause_type,
|
||||
long cause_value,
|
||||
long time_to_wait);
|
||||
|
||||
@@ -74,9 +74,11 @@ static char *m2ap_direction_String[] = {
|
||||
return(m2ap_direction_String[m2ap_dir]);
|
||||
}
|
||||
|
||||
|
||||
int m2ap_MCE_handle_message(instance_t instance, uint32_t assoc_id, int32_t stream,
|
||||
const uint8_t * const data, const uint32_t data_length)
|
||||
int m2ap_MCE_handle_message(instance_t instance,
|
||||
sctp_assoc_t assoc_id,
|
||||
int32_t stream,
|
||||
const uint8_t *const data,
|
||||
const uint32_t data_length)
|
||||
{
|
||||
M2AP_M2AP_PDU_t pdu;
|
||||
int ret;
|
||||
|
||||
@@ -33,11 +33,13 @@
|
||||
|
||||
//void m2ap_handle_m2_setup_message(m2ap_eNB_instance_t *instance_p, m2ap_eNB_data_t *eNB_desc_p, int sctp_shutdown);
|
||||
|
||||
int m2ap_MCE_handle_message(instance_t instance, uint32_t assoc_id, int32_t stream,
|
||||
const uint8_t * const data, const uint32_t data_length);
|
||||
|
||||
//int m2ap_handle_message(instance_t instance, uint32_t assoc_id, int32_t stream,
|
||||
//const uint8_t * const data, const uint32_t data_length);
|
||||
int m2ap_MCE_handle_message(instance_t instance,
|
||||
sctp_assoc_t assoc_id,
|
||||
int32_t stream,
|
||||
const uint8_t *const data,
|
||||
const uint32_t data_length);
|
||||
|
||||
// int m2ap_handle_message(instance_t instance, sctp_assoc_t assoc_id, int32_t stream,
|
||||
// const uint8_t * const data, const uint32_t data_length);
|
||||
|
||||
#endif /* __M2AP_MCE_HANDLERS__H__ */
|
||||
|
||||
@@ -43,8 +43,9 @@ extern m2ap_setup_req_t *m2ap_mce_data_from_enb;
|
||||
/*
|
||||
* MBMS Session start
|
||||
*/
|
||||
int MCE_send_MBMS_SESSION_START_REQUEST(instance_t instance/*, uint32_t assoc_id*/,m2ap_session_start_req_t* m2ap_session_start_req){
|
||||
|
||||
int MCE_send_MBMS_SESSION_START_REQUEST(instance_t instance /*, sctp_assoc_t assoc_id*/,
|
||||
m2ap_session_start_req_t *m2ap_session_start_req)
|
||||
{
|
||||
//AssertFatal(1==0,"Not implemented yet\n");
|
||||
|
||||
//module_id_t enb_mod_idP=0;
|
||||
@@ -153,13 +154,10 @@ int MCE_send_MBMS_SESSION_START_REQUEST(instance_t instance/*, uint32_t assoc_id
|
||||
//MCE_m2ap_itti_send_sctp_data_req(instance, m2ap_mce_data_from_mce->assoid,buffer,len,0);
|
||||
m2ap_MCE_itti_send_sctp_data_req(instance,m2ap_mce_data_from_enb->assoc_id,buffer,len,0);
|
||||
return 0;
|
||||
|
||||
}
|
||||
|
||||
int MCE_handle_MBMS_SESSION_START_RESPONSE(instance_t instance,
|
||||
uint32_t assoc_id,
|
||||
uint32_t stream,
|
||||
M2AP_M2AP_PDU_t *pdu){
|
||||
int MCE_handle_MBMS_SESSION_START_RESPONSE(instance_t instance, sctp_assoc_t assoc_id, uint32_t stream, M2AP_M2AP_PDU_t *pdu)
|
||||
{
|
||||
//AssertFatal(1==0,"Not implemented yet\n");
|
||||
LOG_D(M2AP, "MCE_handle_MBMS_SESSION_START_RESPONSE\n");
|
||||
|
||||
@@ -215,13 +213,10 @@ int MCE_handle_MBMS_SESSION_START_RESPONSE(instance_t instance,
|
||||
assoc_id,ENB_MODULE_ID_TO_INSTANCE(assoc_id));
|
||||
itti_send_msg_to_task(TASK_MCE_APP, ENB_MODULE_ID_TO_INSTANCE(assoc_id), msg_g);
|
||||
return 0;
|
||||
|
||||
}
|
||||
int MCE_handle_MBMS_SESSION_START_FAILURE(instance_t instance,
|
||||
uint32_t assoc_id,
|
||||
uint32_t stream,
|
||||
M2AP_M2AP_PDU_t *pdu){
|
||||
AssertFatal(1==0,"Not implemented yet\n");
|
||||
int MCE_handle_MBMS_SESSION_START_FAILURE(instance_t instance, sctp_assoc_t assoc_id, uint32_t stream, M2AP_M2AP_PDU_t *pdu)
|
||||
{
|
||||
AssertFatal(1 == 0, "Not implemented yet\n");
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -285,10 +280,8 @@ int MCE_send_MBMS_SESSION_STOP_REQUEST(instance_t instance, m2ap_session_stop_re
|
||||
|
||||
}
|
||||
|
||||
int MCE_handle_MBMS_SESSION_STOP_RESPONSE(instance_t instance,
|
||||
uint32_t assoc_id,
|
||||
uint32_t stream,
|
||||
M2AP_M2AP_PDU_t *pdu){
|
||||
int MCE_handle_MBMS_SESSION_STOP_RESPONSE(instance_t instance, sctp_assoc_t assoc_id, uint32_t stream, M2AP_M2AP_PDU_t *pdu)
|
||||
{
|
||||
//AssertFatal(1==0,"Not implemented yet\n");
|
||||
LOG_D(M2AP, "MCE_handle_MBMS_SESSION_STOP_RESPONSE\n");
|
||||
|
||||
@@ -347,14 +340,9 @@ int MCE_handle_MBMS_SESSION_STOP_RESPONSE(instance_t instance,
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
int MCE_handle_MBMS_SESSION_STOP_FAILURE(instance_t instance,
|
||||
uint32_t assoc_id,
|
||||
uint32_t stream,
|
||||
M2AP_M2AP_PDU_t *pdu){
|
||||
int MCE_handle_MBMS_SESSION_STOP_FAILURE(instance_t instance, sctp_assoc_t assoc_id, uint32_t stream, M2AP_M2AP_PDU_t *pdu)
|
||||
{
|
||||
AssertFatal(1==0,"Not implemented yet\n");
|
||||
|
||||
}
|
||||
typedef struct M2AP_MBSFN_Area_Configuration{
|
||||
M2AP_PMCH_Configuration_List_t PMCH_Configuration_List;
|
||||
@@ -375,8 +363,8 @@ int MCE_handle_MBMS_SESSION_STOP_FAILURE(instance_t instance,
|
||||
0x00, 0x18, 0x00, 0x01, 0x80, 0x00, 0x1d, 0x00, 0x01, 0x01};
|
||||
|
||||
|
||||
int MCE_send_MBMS_SCHEDULING_INFORMATION(instance_t instance, /*uint32_t assoc_id,*/m2ap_mbms_scheduling_information_t * m2ap_mbms_scheduling_information){
|
||||
|
||||
int MCE_send_MBMS_SCHEDULING_INFORMATION(instance_t instance, /*sctp_assoc_t assoc_id,*/ m2ap_mbms_scheduling_information_t * m2ap_mbms_scheduling_information)
|
||||
{
|
||||
//module_id_t enb_mod_idP=0;
|
||||
//module_id_t du_mod_idP=0;
|
||||
|
||||
@@ -573,14 +561,13 @@ ASN_SET_ADD(&ie->value.choice.MBSFN_Area_Configuration_List,m2ap_mbsfn_area_conf
|
||||
}
|
||||
m2ap_MCE_itti_send_sctp_data_req(instance,m2ap_mce_data_from_enb->assoc_id,buffer,len,0);
|
||||
return 0;
|
||||
|
||||
}
|
||||
|
||||
int MCE_handle_MBMS_SCHEDULING_INFORMATION_RESPONSE(instance_t instance,
|
||||
uint32_t assoc_id,
|
||||
uint32_t stream,
|
||||
M2AP_M2AP_PDU_t *pdu){
|
||||
}
|
||||
|
||||
int MCE_handle_MBMS_SCHEDULING_INFORMATION_RESPONSE(instance_t instance,
|
||||
sctp_assoc_t assoc_id,
|
||||
uint32_t stream,
|
||||
M2AP_M2AP_PDU_t *pdu)
|
||||
{
|
||||
LOG_D(M2AP, "MCE_handle_MBMS_SCHEDULING_INFORMATION_RESPONSE\n");
|
||||
|
||||
AssertFatal(pdu->present == M2AP_M2AP_PDU_PR_successfulOutcome,
|
||||
@@ -636,8 +623,7 @@ int MCE_handle_MBMS_SCHEDULING_INFORMATION_RESPONSE(instance_t instance,
|
||||
itti_send_msg_to_task(TASK_MCE_APP, ENB_MODULE_ID_TO_INSTANCE(instance), msg_g);
|
||||
//
|
||||
return 0;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Reset
|
||||
@@ -649,19 +635,13 @@ int MCE_send_RESET(instance_t instance, m2ap_reset_t * m2ap_reset) {
|
||||
|
||||
}
|
||||
|
||||
|
||||
int MCE_handle_RESET_ACKKNOWLEDGE(instance_t instance,
|
||||
uint32_t assoc_id,
|
||||
uint32_t stream,
|
||||
M2AP_M2AP_PDU_t *pdu) {
|
||||
int MCE_handle_RESET_ACKKNOWLEDGE(instance_t instance, sctp_assoc_t assoc_id, uint32_t stream, M2AP_M2AP_PDU_t *pdu)
|
||||
{
|
||||
AssertFatal(1==0,"Not implemented yet\n");
|
||||
|
||||
}
|
||||
|
||||
int MCE_handle_RESET(instance_t instance,
|
||||
uint32_t assoc_id,
|
||||
uint32_t stream,
|
||||
M2AP_M2AP_PDU_t *pdu) {
|
||||
int MCE_handle_RESET(instance_t instance, sctp_assoc_t assoc_id, uint32_t stream, M2AP_M2AP_PDU_t *pdu)
|
||||
{
|
||||
AssertFatal(1==0,"Not implemented yet\n");
|
||||
}
|
||||
|
||||
@@ -672,10 +652,7 @@ int MCE_send_RESET_ACKNOWLEDGE(instance_t instance, M2AP_ResetAcknowledge_t *Res
|
||||
/*
|
||||
* M2 Setup
|
||||
*/
|
||||
int MCE_handle_M2_SETUP_REQUEST(instance_t instance,
|
||||
uint32_t assoc_id,
|
||||
uint32_t stream,
|
||||
M2AP_M2AP_PDU_t *pdu)
|
||||
int MCE_handle_M2_SETUP_REQUEST(instance_t instance, sctp_assoc_t assoc_id, uint32_t stream, M2AP_M2AP_PDU_t *pdu)
|
||||
{
|
||||
LOG_D(M2AP, "MCE_handle_M2_SETUP_REQUEST assoc_id %d\n",assoc_id);
|
||||
|
||||
@@ -832,7 +809,7 @@ int MCE_handle_M2_SETUP_REQUEST(instance_t instance,
|
||||
return 0;
|
||||
}
|
||||
|
||||
int MCE_send_M2_SETUP_RESPONSE(instance_t instance, /*uint32_t assoc_id,*/
|
||||
int MCE_send_M2_SETUP_RESPONSE(instance_t instance, /*sctp_assoc_t assoc_id,*/
|
||||
m2ap_setup_resp_t *m2ap_setup_resp) {
|
||||
|
||||
//module_id_t mce_mod_idP;
|
||||
@@ -1144,11 +1121,8 @@ int MCE_send_MCE_CONFIGURATION_UPDATE(instance_t instance, module_id_t du_mod_id
|
||||
|
||||
}
|
||||
|
||||
|
||||
int MCE_handle_MCE_CONFIGURATION_UPDATE_FAILURE(instance_t instance,
|
||||
uint32_t assoc_id,
|
||||
uint32_t stream,
|
||||
M2AP_M2AP_PDU_t *pdu){
|
||||
int MCE_handle_MCE_CONFIGURATION_UPDATE_FAILURE(instance_t instance, sctp_assoc_t assoc_id, uint32_t stream, M2AP_M2AP_PDU_t *pdu)
|
||||
{
|
||||
AssertFatal(1==0,"Not implemented yet\n");
|
||||
|
||||
LOG_D(M2AP, "MCE_handle_MCE_CONFIGURATION_UPDATE_FAILURE\n");
|
||||
@@ -1192,11 +1166,12 @@ int MCE_handle_MCE_CONFIGURATION_UPDATE_FAILURE(instance_t instance,
|
||||
|
||||
}
|
||||
|
||||
|
||||
int MCE_handle_MCE_CONFIGURATION_UPDATE_ACKNOWLEDGE(instance_t instance,
|
||||
uint32_t assoc_id,
|
||||
uint32_t stream,
|
||||
M2AP_M2AP_PDU_t *pdu){
|
||||
sctp_assoc_t assoc_id,
|
||||
uint32_t stream,
|
||||
M2AP_M2AP_PDU_t *pdu)
|
||||
{
|
||||
|
||||
AssertFatal(1==0,"Not implemented yet\n");
|
||||
LOG_D(M2AP, "MCE_handle_MCE_CONFIGURATION_UPDATE_ACKNOWLEDGE assoc_id %d\n",assoc_id);
|
||||
|
||||
@@ -1221,19 +1196,14 @@ int MCE_handle_MCE_CONFIGURATION_UPDATE_ACKNOWLEDGE(instance_t instance,
|
||||
itti_send_msg_to_task(TASK_MCE_APP, ENB_MODULE_ID_TO_INSTANCE(instance), message_p);
|
||||
|
||||
return 0;
|
||||
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* ENB Configuration Update
|
||||
*/
|
||||
|
||||
|
||||
int MCE_handle_ENB_CONFIGURATION_UPDATE(instance_t instance,
|
||||
uint32_t assoc_id,
|
||||
uint32_t stream,
|
||||
M2AP_M2AP_PDU_t *pdu){
|
||||
int MCE_handle_ENB_CONFIGURATION_UPDATE(instance_t instance, sctp_assoc_t assoc_id, uint32_t stream, M2AP_M2AP_PDU_t *pdu)
|
||||
{
|
||||
AssertFatal(1==0,"Not implemented yet\n");
|
||||
LOG_D(M2AP, "MCE_handle_MCE_CONFIGURATION_UPDATE_ACKNOWLEDGE assoc_id %d\n",assoc_id);
|
||||
|
||||
@@ -1280,13 +1250,9 @@ int MCE_send_ENB_CONFIGURATION_UPDATE_ACKNOWLEDGE(instance_t instance,
|
||||
* Error Indication
|
||||
*/
|
||||
|
||||
int MCE_handle_ERROR_INDICATION(instance_t instance,
|
||||
uint32_t assoc_id,
|
||||
uint32_t stream,
|
||||
M2AP_M2AP_PDU_t *pdu) {
|
||||
int MCE_handle_ERROR_INDICATION(instance_t instance, sctp_assoc_t assoc_id, uint32_t stream, M2AP_M2AP_PDU_t *pdu)
|
||||
{
|
||||
AssertFatal(1==0,"Not implemented yet\n");
|
||||
|
||||
|
||||
}
|
||||
|
||||
int MCE_send_ERROR_INDICATION(instance_t instance, M2AP_ErrorIndication_t *ErrorIndication) {
|
||||
@@ -1304,18 +1270,11 @@ int MCE_send_MBMS_SESSION_UPDATE_REQUEST(instance_t instance, m2ap_mbms_session_
|
||||
//M2AP_SessionUpdateRequest_t SessionUpdateRequest;
|
||||
}
|
||||
|
||||
|
||||
|
||||
int MCE_handle_MBMS_SESSION_UPDATE_RESPONSE(instance_t instance,
|
||||
uint32_t assoc_id,
|
||||
uint32_t stream,
|
||||
M2AP_M2AP_PDU_t *pdu){
|
||||
int MCE_handle_MBMS_SESSION_UPDATE_RESPONSE(instance_t instance, sctp_assoc_t assoc_id, uint32_t stream, M2AP_M2AP_PDU_t *pdu)
|
||||
{
|
||||
AssertFatal(1==0,"Not implemented yet\n");
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
int MCE_handle_MBMS_SESSION_UPDATE_FAILURE(instance_t instance,module_id_t du_mod_idP){
|
||||
|
||||
AssertFatal(1==0,"Not implemented yet\n");
|
||||
@@ -1330,12 +1289,8 @@ int MCE_send_MBMS_SERVICE_COUNTING_REQUEST(instance_t instance, module_id_t du_m
|
||||
//M2AP_MbmsServiceCountingRequest_t MbmsServiceCountingRequest;
|
||||
}
|
||||
|
||||
|
||||
|
||||
int MCE_handle_MBMS_SERVICE_COUNTING_RESPONSE(instance_t instance,
|
||||
uint32_t assoc_id,
|
||||
uint32_t stream,
|
||||
M2AP_M2AP_PDU_t *pdu){
|
||||
int MCE_handle_MBMS_SERVICE_COUNTING_RESPONSE(instance_t instance, sctp_assoc_t assoc_id, uint32_t stream, M2AP_M2AP_PDU_t *pdu)
|
||||
{
|
||||
//int i;
|
||||
//AssertFatal(1==0,"Not implemented yet\n");
|
||||
LOG_D(M2AP, "MCE_handle_MBMS_SERVICE_COUNTING_RESPONSE\n");
|
||||
@@ -1468,9 +1423,10 @@ int MCE_handle_MBMS_SESSION_COUNTING_FAILURE(instance_t instance, module_id_t d
|
||||
*/
|
||||
|
||||
int MCE_handle_MBMS_SESSION_COUNTING_RESULTS_REPORT(instance_t instance,
|
||||
uint32_t assoc_id,
|
||||
uint32_t stream,
|
||||
M2AP_M2AP_PDU_t *pdu){
|
||||
sctp_assoc_t assoc_id,
|
||||
uint32_t stream,
|
||||
M2AP_M2AP_PDU_t *pdu)
|
||||
{
|
||||
AssertFatal(1==0,"Not implemented yet\n");
|
||||
|
||||
}
|
||||
@@ -1479,10 +1435,8 @@ int MCE_handle_MBMS_SESSION_COUNTING_RESULTS_REPORT(instance_t instance,
|
||||
/*
|
||||
* Overload Notification
|
||||
*/
|
||||
int MCE_handle_MBMS_OVERLOAD_NOTIFICATION(instance_t instance,
|
||||
uint32_t assoc_id,
|
||||
uint32_t stream,
|
||||
M2AP_M2AP_PDU_t *pdu){
|
||||
int MCE_handle_MBMS_OVERLOAD_NOTIFICATION(instance_t instance, sctp_assoc_t assoc_id, uint32_t stream, M2AP_M2AP_PDU_t *pdu)
|
||||
{
|
||||
AssertFatal(1==0,"Not implemented yet\n");
|
||||
|
||||
}
|
||||
|
||||
@@ -35,69 +35,50 @@
|
||||
/*
|
||||
* MBMS Session start
|
||||
*/
|
||||
int MCE_send_MBMS_SESSION_START_REQUEST(instance_t instance/*,
|
||||
uint32_t assoc_id*/,m2ap_session_start_req_t* m2ap_session_start_req);
|
||||
int MCE_handle_MBMS_SESSION_START_RESPONSE(instance_t instance,
|
||||
uint32_t assoc_id,
|
||||
uint32_t stream,
|
||||
M2AP_M2AP_PDU_t *pdu);
|
||||
int MCE_send_MBMS_SESSION_START_REQUEST(instance_t instance /*,
|
||||
sctp_assoc_t assoc_id*/
|
||||
,
|
||||
m2ap_session_start_req_t *m2ap_session_start_req);
|
||||
int MCE_handle_MBMS_SESSION_START_RESPONSE(instance_t instance, sctp_assoc_t assoc_id, uint32_t stream, M2AP_M2AP_PDU_t *pdu);
|
||||
|
||||
int MCE_handle_MBMS_SESSION_START_FAILURE(instance_t instance,
|
||||
uint32_t assoc_id,
|
||||
uint32_t stream,
|
||||
M2AP_M2AP_PDU_t *pdu);
|
||||
int MCE_handle_MBMS_SESSION_START_FAILURE(instance_t instance, sctp_assoc_t assoc_id, uint32_t stream, M2AP_M2AP_PDU_t *pdu);
|
||||
/*
|
||||
* MBMS Session stop
|
||||
*/
|
||||
int MCE_send_MBMS_SESSION_STOP_REQUEST(instance_t instance,
|
||||
m2ap_session_stop_req_t* m2ap_session_stop_req);
|
||||
|
||||
int MCE_handle_MBMS_SESSION_STOP_RESPONSE(instance_t instance,
|
||||
uint32_t assoc_id,
|
||||
uint32_t stream,
|
||||
M2AP_M2AP_PDU_t *pdu);
|
||||
int MCE_handle_MBMS_SESSION_STOP_RESPONSE(instance_t instance, sctp_assoc_t assoc_id, uint32_t stream, M2AP_M2AP_PDU_t *pdu);
|
||||
|
||||
/*
|
||||
* MBMS Scheduling Information
|
||||
*/
|
||||
int MCE_send_MBMS_SCHEDULING_INFORMATION(instance_t instance,
|
||||
/*uint32_t assoc_id,*/ m2ap_mbms_scheduling_information_t * m2ap_mbms_scheduling_information );
|
||||
/*sctp_assoc_t assoc_id,*/ m2ap_mbms_scheduling_information_t *m2ap_mbms_scheduling_information);
|
||||
|
||||
int MCE_handle_MBMS_SCHEDULING_INFORMATION_RESPONSE(instance_t instance,
|
||||
uint32_t assoc_id,
|
||||
uint32_t stream,
|
||||
M2AP_M2AP_PDU_t *pdu);
|
||||
|
||||
|
||||
sctp_assoc_t assoc_id,
|
||||
uint32_t stream,
|
||||
M2AP_M2AP_PDU_t *pdu);
|
||||
|
||||
/*
|
||||
* Reset
|
||||
*/
|
||||
int MCE_send_RESET(instance_t instance, m2ap_reset_t * m2ap_reset);
|
||||
|
||||
int MCE_handle_RESET_ACKKNOWLEDGE(instance_t instance,
|
||||
uint32_t assoc_id,
|
||||
uint32_t stream,
|
||||
M2AP_M2AP_PDU_t *pdu);
|
||||
int MCE_handle_RESET_ACKKNOWLEDGE(instance_t instance, sctp_assoc_t assoc_id, uint32_t stream, M2AP_M2AP_PDU_t *pdu);
|
||||
|
||||
int MCE_handle_RESET(instance_t instance,
|
||||
uint32_t assoc_id,
|
||||
uint32_t stream,
|
||||
M2AP_M2AP_PDU_t *pdu);
|
||||
int MCE_handle_RESET(instance_t instance, sctp_assoc_t assoc_id, uint32_t stream, M2AP_M2AP_PDU_t *pdu);
|
||||
int MCE_send_RESET_ACKNOWLEDGE(instance_t instance, M2AP_ResetAcknowledge_t *ResetAcknowledge);
|
||||
|
||||
/*
|
||||
* M2AP Setup
|
||||
*/
|
||||
int MCE_handle_M2_SETUP_REQUEST(instance_t instance,
|
||||
uint32_t assoc_id,
|
||||
uint32_t stream,
|
||||
M2AP_M2AP_PDU_t *pdu);
|
||||
int MCE_handle_M2_SETUP_REQUEST(instance_t instance, sctp_assoc_t assoc_id, uint32_t stream, M2AP_M2AP_PDU_t *pdu);
|
||||
|
||||
int MCE_send_M2_SETUP_RESPONSE(instance_t instance,/*uint32_t assoc_id,*/ m2ap_setup_resp_t *m2ap_setup_resp);
|
||||
|
||||
int MCE_send_M2_SETUP_FAILURE(instance_t instance, /*uint32_t assoc_id*/ m2ap_setup_failure_t * m2ap_setup_failure);
|
||||
int MCE_send_M2_SETUP_RESPONSE(instance_t instance, /*sctp_assoc_t assoc_id,*/ m2ap_setup_resp_t *m2ap_setup_resp);
|
||||
|
||||
int MCE_send_M2_SETUP_FAILURE(instance_t instance, /*sctp_assoc_t assoc_id*/ m2ap_setup_failure_t *m2ap_setup_failure);
|
||||
|
||||
/*
|
||||
* MCE Configuration Update
|
||||
@@ -105,25 +86,18 @@ int MCE_send_M2_SETUP_FAILURE(instance_t instance, /*uint32_t assoc_id*/ m2ap_se
|
||||
|
||||
int MCE_send_MCE_CONFIGURATION_UPDATE(instance_t instance, module_id_t du_mod_idP);
|
||||
|
||||
int MCE_handle_MCE_CONFIGURATION_UPDATE_FAILURE(instance_t instance,
|
||||
uint32_t assoc_id,
|
||||
uint32_t stream,
|
||||
M2AP_M2AP_PDU_t *pdu);
|
||||
int MCE_handle_MCE_CONFIGURATION_UPDATE_FAILURE(instance_t instance, sctp_assoc_t assoc_id, uint32_t stream, M2AP_M2AP_PDU_t *pdu);
|
||||
|
||||
int MCE_handle_MCE_CONFIGURATION_UPDATE_ACKNOWLEDGE(instance_t instance,
|
||||
uint32_t assoc_id,
|
||||
uint32_t stream,
|
||||
M2AP_M2AP_PDU_t *pdu);
|
||||
sctp_assoc_t assoc_id,
|
||||
uint32_t stream,
|
||||
M2AP_M2AP_PDU_t *pdu);
|
||||
|
||||
/*
|
||||
* ENB Configuration Update
|
||||
*/
|
||||
|
||||
|
||||
int MCE_handle_ENB_CONFIGURATION_UPDATE(instance_t instance,
|
||||
uint32_t assoc_id,
|
||||
uint32_t stream,
|
||||
M2AP_M2AP_PDU_t *pdu);
|
||||
int MCE_handle_ENB_CONFIGURATION_UPDATE(instance_t instance, sctp_assoc_t assoc_id, uint32_t stream, M2AP_M2AP_PDU_t *pdu);
|
||||
|
||||
int MCE_send_ENB_CONFIGURATION_UPDATE_FAILURE(instance_t instance,
|
||||
m2ap_enb_configuration_update_failure_t *m2ap_enb_configuration_update_failure);
|
||||
@@ -133,10 +107,7 @@ int MCE_send_ENB_CONFIGURATION_UPDATE_ACKNOWLEDGE(instance_t instance,
|
||||
/*
|
||||
* Error Indication
|
||||
*/
|
||||
int MCE_handle_ERROR_INDICATION(instance_t instance,
|
||||
uint32_t assoc_id,
|
||||
uint32_t stream,
|
||||
M2AP_M2AP_PDU_t *pdu);
|
||||
int MCE_handle_ERROR_INDICATION(instance_t instance, sctp_assoc_t assoc_id, uint32_t stream, M2AP_M2AP_PDU_t *pdu);
|
||||
int MCE_send_ERROR_INDICATION(instance_t instance, M2AP_ErrorIndication_t *ErrorIndication);
|
||||
|
||||
|
||||
@@ -145,10 +116,7 @@ int MCE_send_ERROR_INDICATION(instance_t instance, M2AP_ErrorIndication_t *Error
|
||||
*/
|
||||
int MCE_send_MBMS_SESSION_UPDATE_REQUEST(instance_t instance, m2ap_mbms_session_update_req_t * m2ap_mbms_session_update_req);
|
||||
|
||||
int MCE_handle_MBMS_SESSION_UPDATE_RESPONSE(instance_t instance,
|
||||
uint32_t assoc_id,
|
||||
uint32_t stream,
|
||||
M2AP_M2AP_PDU_t *pdu);
|
||||
int MCE_handle_MBMS_SESSION_UPDATE_RESPONSE(instance_t instance, sctp_assoc_t assoc_id, uint32_t stream, M2AP_M2AP_PDU_t *pdu);
|
||||
|
||||
int MCE_handle_MBMS_SESSION_UPDATE_FAILURE(instance_t instance,module_id_t du_mod_idP);
|
||||
|
||||
@@ -157,10 +125,7 @@ int MCE_handle_MBMS_SESSION_UPDATE_FAILURE(instance_t instance,module_id_t du_mo
|
||||
*/
|
||||
int MCE_send_MBMS_SERVICE_COUNTING_REQUEST(instance_t instance, module_id_t du_mod_idP);
|
||||
|
||||
int MCE_handle_MBMS_SERVICE_COUNTING_RESPONSE(instance_t instance,
|
||||
uint32_t assoc_id,
|
||||
uint32_t stream,
|
||||
M2AP_M2AP_PDU_t *pdu);
|
||||
int MCE_handle_MBMS_SERVICE_COUNTING_RESPONSE(instance_t instance, sctp_assoc_t assoc_id, uint32_t stream, M2AP_M2AP_PDU_t *pdu);
|
||||
|
||||
int MCE_handle_MBMS_SESSION_COUNTING_FAILURE(instance_t instance, module_id_t du_mod_idP);
|
||||
/*
|
||||
@@ -168,21 +133,14 @@ int MCE_handle_MBMS_SESSION_COUNTING_FAILURE(instance_t instance, module_id_t du
|
||||
*/
|
||||
|
||||
int MCE_handle_MBMS_SESSION_COUNTING_RESULTS_REPORT(instance_t instance,
|
||||
uint32_t assoc_id,
|
||||
uint32_t stream,
|
||||
M2AP_M2AP_PDU_t *pdu);
|
||||
sctp_assoc_t assoc_id,
|
||||
uint32_t stream,
|
||||
M2AP_M2AP_PDU_t *pdu);
|
||||
|
||||
/*
|
||||
* Overload Notification
|
||||
*/
|
||||
int MCE_handle_MBMS_OVERLOAD_NOTIFICATION(instance_t instance,
|
||||
uint32_t assoc_id,
|
||||
uint32_t stream,
|
||||
M2AP_M2AP_PDU_t *pdu);
|
||||
|
||||
|
||||
|
||||
|
||||
int MCE_handle_MBMS_OVERLOAD_NOTIFICATION(instance_t instance, sctp_assoc_t assoc_id, uint32_t stream, M2AP_M2AP_PDU_t *pdu);
|
||||
|
||||
#endif /* M2AP_MCE_INTERFACE_MANAGEMENT_H_ */
|
||||
|
||||
|
||||
@@ -122,9 +122,7 @@ dump_mce_tree_m2(zz->m2ap_mce_head.rbh_root);
|
||||
}
|
||||
}
|
||||
|
||||
struct m2ap_MCE_data_s *m2ap_get_MCE(m2ap_MCE_instance_t *instance_p,
|
||||
int32_t assoc_id,
|
||||
uint16_t cnx_id)
|
||||
struct m2ap_MCE_data_s *m2ap_get_MCE(m2ap_MCE_instance_t *instance_p, sctp_assoc_t assoc_id, uint16_t cnx_id)
|
||||
{
|
||||
struct m2ap_MCE_data_s temp;
|
||||
struct m2ap_MCE_data_s *found;
|
||||
|
||||
@@ -47,8 +47,6 @@ m2ap_MCE_data_t* m2ap_is_MCE_assoc_id_in_list(uint32_t sctp_assoc_id);
|
||||
|
||||
m2ap_MCE_data_t* m2ap_is_MCE_pci_in_list (const uint32_t pci);
|
||||
|
||||
struct m2ap_MCE_data_s *m2ap_get_MCE(m2ap_MCE_instance_t *instance_p,
|
||||
int32_t assoc_id,
|
||||
uint16_t cnx_id);
|
||||
struct m2ap_MCE_data_s *m2ap_get_MCE(m2ap_MCE_instance_t *instance_p, sctp_assoc_t assoc_id, uint16_t cnx_id);
|
||||
|
||||
#endif /* __M2AP_MCE_MANAGEMENT_PROCEDURES__H__ */
|
||||
|
||||
@@ -76,25 +76,11 @@ extern int asn1_xer_print;
|
||||
|
||||
/** \brief Function callback prototype.
|
||||
**/
|
||||
typedef int (*m2ap_message_decoded_callback)(
|
||||
instance_t instance,
|
||||
uint32_t assocId,
|
||||
uint32_t stream,
|
||||
M2AP_M2AP_PDU_t *pdu);
|
||||
|
||||
typedef int (*m2ap_MCE_message_decoded_callback)(
|
||||
instance_t instance,
|
||||
uint32_t assocId,
|
||||
uint32_t stream,
|
||||
M2AP_M2AP_PDU_t *pdu);
|
||||
|
||||
typedef int (*m2ap_eNB_message_decoded_callback)(
|
||||
instance_t instance,
|
||||
uint32_t assocId,
|
||||
uint32_t stream,
|
||||
M2AP_M2AP_PDU_t *pdu);
|
||||
typedef int (*m2ap_message_decoded_callback)(instance_t instance, sctp_assoc_t assoc_id, uint32_t stream, M2AP_M2AP_PDU_t *pdu);
|
||||
|
||||
typedef int (*m2ap_MCE_message_decoded_callback)(instance_t instance, sctp_assoc_t assoc_id, uint32_t stream, M2AP_M2AP_PDU_t *pdu);
|
||||
|
||||
typedef int (*m2ap_eNB_message_decoded_callback)(instance_t instance, sctp_assoc_t assoc_id, uint32_t stream, M2AP_M2AP_PDU_t *pdu);
|
||||
|
||||
/** \brief Encode a successfull outcome message
|
||||
\param buffer pointer to buffer in which data will be encoded
|
||||
|
||||
@@ -27,6 +27,8 @@
|
||||
*/
|
||||
|
||||
#include <stdint.h>
|
||||
#include <netinet/in.h>
|
||||
#include <netinet/sctp.h>
|
||||
|
||||
#include "queue.h"
|
||||
#include "tree.h"
|
||||
@@ -115,7 +117,7 @@ typedef struct m2ap_eNB_data_s {
|
||||
uint16_t cnx_id;
|
||||
|
||||
/* SCTP association id */
|
||||
int32_t assoc_id;
|
||||
sctp_assoc_t assoc_id;
|
||||
|
||||
/* Nid cells */
|
||||
uint32_t Nid_cell[MAX_NUM_CCs];
|
||||
|
||||
@@ -311,7 +311,7 @@
|
||||
//}
|
||||
|
||||
//int m2ap_MCE_generate_m2_setup_failure(instance_t instance,
|
||||
// uint32_t assoc_id,
|
||||
// sctp_assoc_t assoc_id,
|
||||
// M2AP_Cause_PR cause_type,
|
||||
// long cause_value,
|
||||
// long time_to_wait)
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
//int m2ap_MCE_generate_m2_setup_response(m2ap_eNB_instance_t *instance_p, m2ap_eNB_data_t *m2ap_eNB_data_p);
|
||||
//
|
||||
/*int m2ap_MCE_generate_m2_setup_failure(instance_t instance,
|
||||
uint32_t assoc_id,
|
||||
sctp_assoc_t assoc_id,
|
||||
M2AP_Cause_PR cause_type,
|
||||
long cause_value,
|
||||
long time_to_wait);*/
|
||||
|
||||
@@ -72,9 +72,11 @@ static char *m2ap_direction_String[] = {
|
||||
return(m2ap_direction_String[m2ap_dir]);
|
||||
}
|
||||
|
||||
|
||||
int m2ap_eNB_handle_message(instance_t instance, uint32_t assoc_id, int32_t stream,
|
||||
const uint8_t * const data, const uint32_t data_length)
|
||||
int m2ap_eNB_handle_message(instance_t instance,
|
||||
sctp_assoc_t assoc_id,
|
||||
int32_t stream,
|
||||
const uint8_t *const data,
|
||||
const uint32_t data_length)
|
||||
{
|
||||
M2AP_M2AP_PDU_t pdu;
|
||||
int ret;
|
||||
|
||||
@@ -33,10 +33,13 @@
|
||||
|
||||
//void m2ap_handle_m2_setup_message(m2ap_eNB_instance_t *instance_p, m2ap_eNB_data_t *eNB_desc_p, int sctp_shutdown);
|
||||
|
||||
int m2ap_eNB_handle_message(instance_t instance, uint32_t assoc_id, int32_t stream,
|
||||
const uint8_t * const data, const uint32_t data_length);
|
||||
int m2ap_eNB_handle_message(instance_t instance,
|
||||
sctp_assoc_t assoc_id,
|
||||
int32_t stream,
|
||||
const uint8_t *const data,
|
||||
const uint32_t data_length);
|
||||
|
||||
//int m2ap_handle_message(instance_t instance, uint32_t assoc_id, int32_t stream,
|
||||
//int m2ap_handle_message(instance_t instance, sctp_assoc_t assoc_id, int32_t stream,
|
||||
//const uint8_t * const data, const uint32_t data_length);
|
||||
|
||||
|
||||
|
||||
@@ -60,10 +60,8 @@ extern m2ap_setup_req_t *m2ap_enb_data_g;
|
||||
|
||||
|
||||
//extern m2ap_setup_req_t *m2ap_mce_data_from_enb;
|
||||
int eNB_handle_MBMS_SCHEDULING_INFORMATION(instance_t instance,
|
||||
uint32_t assoc_id,
|
||||
uint32_t stream,
|
||||
M2AP_M2AP_PDU_t *pdu){
|
||||
int eNB_handle_MBMS_SCHEDULING_INFORMATION(instance_t instance, sctp_assoc_t assoc_id, uint32_t stream, M2AP_M2AP_PDU_t *pdu)
|
||||
{
|
||||
LOG_D(M2AP, "eNB_handle_MBMS_SCHEDULING_INFORMATION assoc_id %d\n",assoc_id);
|
||||
|
||||
MessageDef *message_p/*,*message_p2*/;
|
||||
@@ -258,13 +256,8 @@ int eNB_send_MBMS_SCHEDULING_INFORMATION_RESPONSE(instance_t instance, m2ap_mbms
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
int eNB_handle_MBMS_SESSION_START_REQUEST(instance_t instance,
|
||||
uint32_t assoc_id,
|
||||
uint32_t stream,
|
||||
M2AP_M2AP_PDU_t *pdu){
|
||||
int eNB_handle_MBMS_SESSION_START_REQUEST(instance_t instance, sctp_assoc_t assoc_id, uint32_t stream, M2AP_M2AP_PDU_t *pdu)
|
||||
{
|
||||
LOG_D(M2AP, "eNB_handle_MBMS_SESSION_START_REQUEST assoc_id %d\n",assoc_id);
|
||||
|
||||
MessageDef *message_p;
|
||||
@@ -424,10 +417,8 @@ int eNB_send_MBMS_SESSION_START_FAILURE(instance_t instance, m2ap_session_start_
|
||||
return 0;
|
||||
}
|
||||
|
||||
int eNB_handle_MBMS_SESSION_STOP_REQUEST(instance_t instance,
|
||||
uint32_t assoc_id,
|
||||
uint32_t stream,
|
||||
M2AP_M2AP_PDU_t *pdu){
|
||||
int eNB_handle_MBMS_SESSION_STOP_REQUEST(instance_t instance, sctp_assoc_t assoc_id, uint32_t stream, M2AP_M2AP_PDU_t *pdu)
|
||||
{
|
||||
LOG_D(M2AP, "eNB_handle_MBMS_SESSION_STOP_REQUEST assoc_id %d\n",assoc_id);
|
||||
|
||||
MessageDef *message_p;
|
||||
@@ -688,10 +679,7 @@ int eNB_send_M2_SETUP_REQUEST(m2ap_eNB_instance_t *instance_p, m2ap_eNB_data_t*
|
||||
}
|
||||
|
||||
|
||||
int eNB_handle_M2_SETUP_RESPONSE(instance_t instance,
|
||||
uint32_t assoc_id,
|
||||
uint32_t stream,
|
||||
M2AP_M2AP_PDU_t *pdu)
|
||||
int eNB_handle_M2_SETUP_RESPONSE(instance_t instance, sctp_assoc_t assoc_id, uint32_t stream, M2AP_M2AP_PDU_t *pdu)
|
||||
{
|
||||
|
||||
LOG_D(M2AP, "eNB_handle_M2_SETUP_RESPONSE\n");
|
||||
@@ -800,10 +788,8 @@ int eNB_handle_M2_SETUP_RESPONSE(instance_t instance,
|
||||
}
|
||||
|
||||
// SETUP FAILURE
|
||||
int eNB_handle_M2_SETUP_FAILURE(instance_t instance,
|
||||
uint32_t assoc_id,
|
||||
uint32_t stream,
|
||||
M2AP_M2AP_PDU_t *pdu) {
|
||||
int eNB_handle_M2_SETUP_FAILURE(instance_t instance, sctp_assoc_t assoc_id, uint32_t stream, M2AP_M2AP_PDU_t *pdu)
|
||||
{
|
||||
LOG_D(M2AP, "eNB_handle_M2_SETUP_FAILURE\n");
|
||||
|
||||
M2AP_M2SetupFailure_t *in = &pdu->choice.unsuccessfulOutcome.value.choice.M2SetupFailure;
|
||||
@@ -985,10 +971,7 @@ int eNB_send_eNB_CONFIGURATION_UPDATE(instance_t instance, m2ap_enb_configuratio
|
||||
return 0;
|
||||
}
|
||||
|
||||
int eNB_handle_eNB_CONFIGURATION_UPDATE_FAILURE(instance_t instance,
|
||||
uint32_t assoc_id,
|
||||
uint32_t stream,
|
||||
M2AP_M2AP_PDU_t *pdu)
|
||||
int eNB_handle_eNB_CONFIGURATION_UPDATE_FAILURE(instance_t instance, sctp_assoc_t assoc_id, uint32_t stream, M2AP_M2AP_PDU_t *pdu)
|
||||
{
|
||||
|
||||
AssertFatal(1==0,"Not implemented yet\n");
|
||||
@@ -1032,12 +1015,10 @@ int eNB_handle_eNB_CONFIGURATION_UPDATE_FAILURE(instance_t instance,
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
int eNB_handle_eNB_CONFIGURATION_UPDATE_ACKNOWLEDGE(instance_t instance,
|
||||
uint32_t assoc_id,
|
||||
uint32_t stream,
|
||||
M2AP_M2AP_PDU_t *pdu)
|
||||
sctp_assoc_t assoc_id,
|
||||
uint32_t stream,
|
||||
M2AP_M2AP_PDU_t *pdu)
|
||||
{
|
||||
LOG_D(M2AP, "eNB_handle_eNB_CONFIGURATION_UPDATE_ACKNOWLEDGE assoc_id %d\n",assoc_id);
|
||||
|
||||
@@ -1069,10 +1050,7 @@ int eNB_handle_eNB_CONFIGURATION_UPDATE_ACKNOWLEDGE(instance_t instance,
|
||||
/*
|
||||
* MCE Configuration Update
|
||||
*/
|
||||
int eNB_handle_MCE_CONFIGURATION_UPDATE(instance_t instance,
|
||||
uint32_t assoc_id,
|
||||
uint32_t stream,
|
||||
M2AP_M2AP_PDU_t *pdu)
|
||||
int eNB_handle_MCE_CONFIGURATION_UPDATE(instance_t instance, sctp_assoc_t assoc_id, uint32_t stream, M2AP_M2AP_PDU_t *pdu)
|
||||
{
|
||||
LOG_D(M2AP, "eNB_handle_MCE_CONFIGURATION_UPDATE assoc_id %d\n",assoc_id);
|
||||
|
||||
@@ -1126,10 +1104,7 @@ int eNB_send_ERROR_INDICATION(instance_t instance, m2ap_error_indication_t * m2a
|
||||
return 0;
|
||||
}
|
||||
|
||||
int eNB_handle_ERROR_INDICATION(instance_t instance,
|
||||
uint32_t assoc_id,
|
||||
uint32_t stream,
|
||||
M2AP_M2AP_PDU_t *pdu)
|
||||
int eNB_handle_ERROR_INDICATION(instance_t instance, sctp_assoc_t assoc_id, uint32_t stream, M2AP_M2AP_PDU_t *pdu)
|
||||
{
|
||||
AssertFatal(1==0,"Not implemented yet\n");
|
||||
return 0;
|
||||
@@ -1140,10 +1115,7 @@ int eNB_handle_ERROR_INDICATION(instance_t instance,
|
||||
/*
|
||||
* Session Update Request
|
||||
*/
|
||||
int eNB_handle_MBMS_SESSION_UPDATE_REQUEST(instance_t instance,
|
||||
uint32_t assoc_id,
|
||||
uint32_t stream,
|
||||
M2AP_M2AP_PDU_t *pdu)
|
||||
int eNB_handle_MBMS_SESSION_UPDATE_REQUEST(instance_t instance, sctp_assoc_t assoc_id, uint32_t stream, M2AP_M2AP_PDU_t *pdu)
|
||||
{
|
||||
LOG_D(M2AP, "eNB_handle_MBMS_SESSION_STOP_REQUEST assoc_id %d\n",assoc_id);
|
||||
|
||||
@@ -1190,10 +1162,7 @@ int eNB_send_MBMS_SESSION_UPDATE_FAILURE(instance_t instance, m2ap_mbms_session_
|
||||
* Service Counting
|
||||
*/
|
||||
|
||||
int eNB_handle_MBMS_SERVICE_COUNTING_REQ(instance_t instance,
|
||||
uint32_t assoc_id,
|
||||
uint32_t stream,
|
||||
M2AP_M2AP_PDU_t *pdu)
|
||||
int eNB_handle_MBMS_SERVICE_COUNTING_REQ(instance_t instance, sctp_assoc_t assoc_id, uint32_t stream, M2AP_M2AP_PDU_t *pdu)
|
||||
{
|
||||
|
||||
LOG_D(M2AP, "eNB_handle_MBMS_SERVICE_COUNTING_REQUEST assoc_id %d\n",assoc_id);
|
||||
|
||||
@@ -37,10 +37,7 @@
|
||||
* Session Start
|
||||
*/
|
||||
|
||||
int eNB_handle_MBMS_SESSION_START_REQUEST(instance_t instance,
|
||||
uint32_t assoc_id,
|
||||
uint32_t stream,
|
||||
M2AP_M2AP_PDU_t *pdu);
|
||||
int eNB_handle_MBMS_SESSION_START_REQUEST(instance_t instance, sctp_assoc_t assoc_id, uint32_t stream, M2AP_M2AP_PDU_t *pdu);
|
||||
|
||||
int eNB_send_MBMS_SESSION_START_RESPONSE(instance_t instance, m2ap_session_start_resp_t * m2ap_session_start_resp);
|
||||
int eNB_send_MBMS_SESSION_START_FAILURE(instance_t instance, m2ap_session_start_failure_t * m2ap_session_start_failure );
|
||||
@@ -49,10 +46,7 @@ int eNB_send_MBMS_SESSION_START_FAILURE(instance_t instance, m2ap_session_start_
|
||||
* Session Stop
|
||||
*/
|
||||
|
||||
int eNB_handle_MBMS_SESSION_STOP_REQUEST(instance_t instance,
|
||||
uint32_t assoc_id,
|
||||
uint32_t stream,
|
||||
M2AP_M2AP_PDU_t *pdu);
|
||||
int eNB_handle_MBMS_SESSION_STOP_REQUEST(instance_t instance, sctp_assoc_t assoc_id, uint32_t stream, M2AP_M2AP_PDU_t *pdu);
|
||||
int eNB_send_MBMS_SESSION_STOP_RESPONSE(instance_t instance, m2ap_session_stop_resp_t * m2ap_session_stop_resp);
|
||||
|
||||
|
||||
@@ -60,10 +54,7 @@ int eNB_send_MBMS_SESSION_STOP_RESPONSE(instance_t instance, m2ap_session_stop_r
|
||||
* MBMS Scheduling Information
|
||||
*/
|
||||
|
||||
int eNB_handle_MBMS_SCHEDULING_INFORMATION(instance_t instance,
|
||||
uint32_t assoc_id,
|
||||
uint32_t stream,
|
||||
M2AP_M2AP_PDU_t *pdu);
|
||||
int eNB_handle_MBMS_SCHEDULING_INFORMATION(instance_t instance, sctp_assoc_t assoc_id, uint32_t stream, M2AP_M2AP_PDU_t *pdu);
|
||||
|
||||
int eNB_send_MBMS_SCHEDULING_INFORMATION_RESPONSE(instance_t instance, m2ap_mbms_scheduling_information_resp_t * m2ap_mbms_scheduling_information_resp);
|
||||
|
||||
@@ -71,54 +62,36 @@ int eNB_send_MBMS_SCHEDULING_INFORMATION_RESPONSE(instance_t instance, m2ap_mbms
|
||||
/*
|
||||
* Reset
|
||||
*/
|
||||
int eNB_handle_RESET(instance_t instance,
|
||||
uint32_t assoc_id,
|
||||
uint32_t stream,
|
||||
M2AP_M2AP_PDU_t *pdu);
|
||||
int eNB_handle_RESET(instance_t instance, sctp_assoc_t assoc_id, uint32_t stream, M2AP_M2AP_PDU_t *pdu);
|
||||
int eNB_send_RESET_ACKKNOWLEDGE(instance_t instance, M2AP_ResetAcknowledge_t *ResetAcknowledge);
|
||||
int eNB_send_RESET(instance_t instance, M2AP_Reset_t *Reset);
|
||||
int eNB_handle_RESET_ACKNOWLEDGE(instance_t instance,
|
||||
uint32_t assoc_id,
|
||||
uint32_t stream,
|
||||
M2AP_M2AP_PDU_t *pdu);
|
||||
int eNB_handle_RESET_ACKNOWLEDGE(instance_t instance, sctp_assoc_t assoc_id, uint32_t stream, M2AP_M2AP_PDU_t *pdu);
|
||||
|
||||
/*
|
||||
* M2AP Setup
|
||||
*/
|
||||
int eNB_send_M2_SETUP_REQUEST( m2ap_eNB_instance_t *instance_p, m2ap_eNB_data_t *m2ap_eNB_data_p);
|
||||
|
||||
int eNB_handle_M2_SETUP_RESPONSE(instance_t instance,
|
||||
uint32_t assoc_id,
|
||||
uint32_t stream,
|
||||
M2AP_M2AP_PDU_t *pdu);
|
||||
int eNB_handle_M2_SETUP_RESPONSE(instance_t instance, sctp_assoc_t assoc_id, uint32_t stream, M2AP_M2AP_PDU_t *pdu);
|
||||
|
||||
int eNB_handle_M2_SETUP_FAILURE(instance_t instance,
|
||||
uint32_t assoc_id,
|
||||
uint32_t stream,
|
||||
M2AP_M2AP_PDU_t *pdu);
|
||||
int eNB_handle_M2_SETUP_FAILURE(instance_t instance, sctp_assoc_t assoc_id, uint32_t stream, M2AP_M2AP_PDU_t *pdu);
|
||||
|
||||
/*
|
||||
* eNB Configuration Update
|
||||
*/
|
||||
int eNB_send_eNB_CONFIGURATION_UPDATE(instance_t instance, m2ap_enb_configuration_update_t * m2ap_enb_configuration_update);
|
||||
|
||||
int eNB_handle_eNB_CONFIGURATION_UPDATE_FAILURE(instance_t instance,
|
||||
uint32_t assoc_id,
|
||||
uint32_t stream,
|
||||
M2AP_M2AP_PDU_t *pdu);
|
||||
int eNB_handle_eNB_CONFIGURATION_UPDATE_FAILURE(instance_t instance, sctp_assoc_t assoc_id, uint32_t stream, M2AP_M2AP_PDU_t *pdu);
|
||||
|
||||
int eNB_handle_eNB_CONFIGURATION_UPDATE_ACKNOWLEDGE(instance_t instance,
|
||||
uint32_t assoc_id,
|
||||
uint32_t stream,
|
||||
M2AP_M2AP_PDU_t *pdu);
|
||||
sctp_assoc_t assoc_id,
|
||||
uint32_t stream,
|
||||
M2AP_M2AP_PDU_t *pdu);
|
||||
|
||||
/*
|
||||
* MCE Configuration Update
|
||||
*/
|
||||
int eNB_handle_MCE_CONFIGURATION_UPDATE(instance_t instance,
|
||||
uint32_t assoc_id,
|
||||
uint32_t stream,
|
||||
M2AP_M2AP_PDU_t *pdu);
|
||||
int eNB_handle_MCE_CONFIGURATION_UPDATE(instance_t instance, sctp_assoc_t assoc_id, uint32_t stream, M2AP_M2AP_PDU_t *pdu);
|
||||
|
||||
int eNB_send_MCE_CONFIGURATION_UPDATE_FAILURE(instance_t instance,
|
||||
M2AP_MCEConfigurationUpdateFailure_t *MCEConfigurationUpdateFailure);
|
||||
@@ -130,19 +103,12 @@ int eNB_send_MCE_CONFIGURATION_UPDATE_ACKNOWLEDGE(instance_t instance,
|
||||
* Error Indication
|
||||
*/
|
||||
int eNB_send_ERROR_INDICATION(instance_t instance, m2ap_error_indication_t * m2ap_error_indication);
|
||||
int eNB_handle_ERROR_INDICATION(instance_t instance,
|
||||
uint32_t assoc_id,
|
||||
uint32_t stream,
|
||||
M2AP_M2AP_PDU_t *pdu);
|
||||
|
||||
int eNB_handle_ERROR_INDICATION(instance_t instance, sctp_assoc_t assoc_id, uint32_t stream, M2AP_M2AP_PDU_t *pdu);
|
||||
|
||||
/*
|
||||
* Session Update Request
|
||||
*/
|
||||
int eNB_handle_MBMS_SESSION_UPDATE_REQUEST(instance_t instance,
|
||||
uint32_t assoc_id,
|
||||
uint32_t stream,
|
||||
M2AP_M2AP_PDU_t *pdu);
|
||||
int eNB_handle_MBMS_SESSION_UPDATE_REQUEST(instance_t instance, sctp_assoc_t assoc_id, uint32_t stream, M2AP_M2AP_PDU_t *pdu);
|
||||
|
||||
int eNB_send_MBMS_SESSION_UPDATE_RESPONSE(instance_t instance, m2ap_mbms_session_update_resp_t * m2ap_mbms_session_update_resp); //??
|
||||
|
||||
@@ -152,10 +118,7 @@ int eNB_send_MBMS_SESSION_UPDATE_FAILURE(instance_t instance, m2ap_mbms_session_
|
||||
* Service Counting
|
||||
*/
|
||||
|
||||
int eNB_handle_MBMS_SERVICE_COUNTING_REQ(instance_t instance,
|
||||
uint32_t assoc_id,
|
||||
uint32_t stream,
|
||||
M2AP_M2AP_PDU_t *pdu);
|
||||
int eNB_handle_MBMS_SERVICE_COUNTING_REQ(instance_t instance, sctp_assoc_t assoc_id, uint32_t stream, M2AP_M2AP_PDU_t *pdu);
|
||||
int eNB_send_MBMS_SERVICE_COUNTING_REPORT(instance_t instance, m2ap_mbms_service_counting_report_t * m2ap_mbms_service_counting_report);
|
||||
int eNB_send_MBMS_SERVICE_COUNTING_RESP(instance_t instance, m2ap_mbms_service_counting_resp_t * m2ap_mbms_service_counting_resp);
|
||||
int eNB_send_MBMS_SERVICE_COUNTING_FAILURE(instance_t instance, m2ap_mbms_service_counting_failure_t * m2ap_mbms_service_counting_failure);
|
||||
|
||||
@@ -122,9 +122,7 @@ printf("---------------------------------------------\n");
|
||||
}
|
||||
}
|
||||
|
||||
struct m2ap_eNB_data_s *m2ap_get_eNB(m2ap_eNB_instance_t *instance_p,
|
||||
int32_t assoc_id,
|
||||
uint16_t cnx_id)
|
||||
struct m2ap_eNB_data_s *m2ap_get_eNB(m2ap_eNB_instance_t *instance_p, sctp_assoc_t assoc_id, uint16_t cnx_id)
|
||||
{
|
||||
struct m2ap_eNB_data_s temp;
|
||||
struct m2ap_eNB_data_s *found;
|
||||
|
||||
@@ -47,8 +47,6 @@ m2ap_eNB_data_t* m2ap_is_eNB_assoc_id_in_list(uint32_t sctp_assoc_id);
|
||||
|
||||
m2ap_eNB_data_t* m2ap_is_eNB_pci_in_list (const uint32_t pci);
|
||||
|
||||
struct m2ap_eNB_data_s *m2ap_get_eNB(m2ap_eNB_instance_t *instance_p,
|
||||
int32_t assoc_id,
|
||||
uint16_t cnx_id);
|
||||
struct m2ap_eNB_data_s *m2ap_get_eNB(m2ap_eNB_instance_t *instance_p, sctp_assoc_t assoc_id, uint16_t cnx_id);
|
||||
|
||||
#endif /* __M2AP_ENB_MANAGEMENT_PROCEDURES__H__ */
|
||||
|
||||
@@ -74,9 +74,11 @@ static char *m2ap_direction_String[] = {
|
||||
return(m2ap_direction_String[m2ap_dir]);
|
||||
}
|
||||
|
||||
|
||||
int m2ap_handle_message(instance_t instance, uint32_t assoc_id, int32_t stream,
|
||||
const uint8_t * const data, const uint32_t data_length)
|
||||
int m2ap_handle_message(instance_t instance,
|
||||
sctp_assoc_t assoc_id,
|
||||
int32_t stream,
|
||||
const uint8_t *const data,
|
||||
const uint32_t data_length)
|
||||
{
|
||||
M2AP_M2AP_PDU_t pdu;
|
||||
int ret;
|
||||
|
||||
@@ -33,11 +33,16 @@
|
||||
|
||||
void m2ap_handle_m2_setup_message(m2ap_eNB_instance_t *instance_p, m2ap_eNB_data_t *eNB_desc_p, int sctp_shutdown);
|
||||
|
||||
int m2ap_eNB_handle_message(instance_t instance, uint32_t assoc_id, int32_t stream,
|
||||
const uint8_t * const data, const uint32_t data_length);
|
||||
|
||||
int m2ap_handle_message(instance_t instance, uint32_t assoc_id, int32_t stream,
|
||||
const uint8_t * const data, const uint32_t data_length);
|
||||
int m2ap_eNB_handle_message(instance_t instance,
|
||||
sctp_assoc_t assoc_id,
|
||||
int32_t stream,
|
||||
const uint8_t *const data,
|
||||
const uint32_t data_length);
|
||||
|
||||
int m2ap_handle_message(instance_t instance,
|
||||
sctp_assoc_t assoc_id,
|
||||
int32_t stream,
|
||||
const uint8_t *const data,
|
||||
const uint32_t data_length);
|
||||
|
||||
#endif /* M2AP_ENB_OLD_HANDLERS_H_ */
|
||||
|
||||
@@ -30,8 +30,11 @@
|
||||
|
||||
#include "m2ap_itti_messaging.h"
|
||||
|
||||
void m2ap_eNB_itti_send_sctp_data_req(instance_t instance, int32_t assoc_id, uint8_t *buffer,
|
||||
uint32_t buffer_length, uint16_t stream)
|
||||
void m2ap_eNB_itti_send_sctp_data_req(instance_t instance,
|
||||
sctp_assoc_t assoc_id,
|
||||
uint8_t *buffer,
|
||||
uint32_t buffer_length,
|
||||
uint16_t stream)
|
||||
{
|
||||
MessageDef *message_p;
|
||||
sctp_data_req_t *sctp_data_req;
|
||||
@@ -51,7 +54,7 @@ void m2ap_eNB_itti_send_sctp_data_req(instance_t instance, int32_t assoc_id, uin
|
||||
}
|
||||
|
||||
|
||||
void m2ap_eNB_itti_send_sctp_close_association(instance_t instance, int32_t assoc_id)
|
||||
void m2ap_eNB_itti_send_sctp_close_association(instance_t instance, sctp_assoc_t assoc_id)
|
||||
{
|
||||
MessageDef *message_p = NULL;
|
||||
sctp_close_association_t *sctp_close_association_p = NULL;
|
||||
@@ -63,9 +66,11 @@ void m2ap_eNB_itti_send_sctp_close_association(instance_t instance, int32_t asso
|
||||
itti_send_msg_to_task(TASK_SCTP, instance, message_p);
|
||||
}
|
||||
|
||||
|
||||
void m2ap_MCE_itti_send_sctp_data_req(instance_t instance, int32_t assoc_id, uint8_t *buffer,
|
||||
uint32_t buffer_length, uint16_t stream)
|
||||
void m2ap_MCE_itti_send_sctp_data_req(instance_t instance,
|
||||
sctp_assoc_t assoc_id,
|
||||
uint8_t *buffer,
|
||||
uint32_t buffer_length,
|
||||
uint16_t stream)
|
||||
{
|
||||
MessageDef *message_p;
|
||||
sctp_data_req_t *sctp_data_req;
|
||||
@@ -83,7 +88,7 @@ void m2ap_MCE_itti_send_sctp_data_req(instance_t instance, int32_t assoc_id, uin
|
||||
}
|
||||
|
||||
|
||||
void m2ap_MCE_itti_send_sctp_close_association(instance_t instance, int32_t assoc_id)
|
||||
void m2ap_MCE_itti_send_sctp_close_association(instance_t instance, sctp_assoc_t assoc_id)
|
||||
{
|
||||
MessageDef *message_p = NULL;
|
||||
sctp_close_association_t *sctp_close_association_p = NULL;
|
||||
|
||||
@@ -29,18 +29,21 @@
|
||||
#ifndef M2AP_ENB_ITTI_MESSAGING_H_
|
||||
#define M2AP_ENB_ITTI_MESSAGING_H_
|
||||
|
||||
void m2ap_eNB_itti_send_sctp_data_req(instance_t instance, int32_t assoc_id, uint8_t *buffer,
|
||||
uint32_t buffer_length, uint16_t stream);
|
||||
void m2ap_eNB_itti_send_sctp_data_req(instance_t instance,
|
||||
sctp_assoc_t assoc_id,
|
||||
uint8_t *buffer,
|
||||
uint32_t buffer_length,
|
||||
uint16_t stream);
|
||||
|
||||
void m2ap_eNB_itti_send_sctp_close_association(instance_t instance, sctp_assoc_t assoc_id);
|
||||
|
||||
void m2ap_eNB_itti_send_sctp_close_association(instance_t instance, int32_t assoc_id);
|
||||
void m2ap_MCE_itti_send_sctp_data_req(instance_t instance,
|
||||
sctp_assoc_t assoc_id,
|
||||
uint8_t *buffer,
|
||||
uint32_t buffer_length,
|
||||
uint16_t stream);
|
||||
|
||||
|
||||
void m2ap_MCE_itti_send_sctp_data_req(instance_t instance, int32_t assoc_id, uint8_t *buffer,
|
||||
uint32_t buffer_length, uint16_t stream);
|
||||
|
||||
|
||||
void m2ap_MCE_itti_send_sctp_close_association(instance_t instance, int32_t assoc_id);
|
||||
void m2ap_MCE_itti_send_sctp_close_association(instance_t instance, sctp_assoc_t assoc_id);
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -387,7 +387,7 @@ typedef struct HANDOVER_INFO_s {
|
||||
HO_STATE_t state; //current state of handover
|
||||
uint32_t modid_s; //module_idP of serving cell
|
||||
uint32_t modid_t; //module_idP of target cell
|
||||
int assoc_id;
|
||||
sctp_assoc_t assoc_id;
|
||||
uint8_t ueid_s; //UE index in serving cell
|
||||
uint8_t ueid_t; //UE index in target cell
|
||||
LTE_AS_Config_t as_config; /* these two parameters are taken from 36.331 section 10.2.2: HandoverPreparationInformation-r8-IEs */
|
||||
|
||||
@@ -52,50 +52,6 @@
|
||||
|
||||
extern RAN_CONTEXT_t RC;
|
||||
|
||||
void nr_rrc_mac_update_cellgroup(rnti_t rntiMaybeUEid, NR_CellGroupConfig_t *cgc)
|
||||
{
|
||||
gNB_MAC_INST *nrmac = RC.nrmac[0];
|
||||
NR_SCHED_LOCK(&nrmac->sched_lock);
|
||||
nr_mac_update_cellgroup(nrmac, rntiMaybeUEid, cgc);
|
||||
NR_SCHED_UNLOCK(&nrmac->sched_lock);
|
||||
}
|
||||
|
||||
uint16_t mac_rrc_nr_data_req(const module_id_t Mod_idP,
|
||||
const int CC_id,
|
||||
const frame_t frameP,
|
||||
const rb_id_t Srb_id,
|
||||
const rnti_t rnti,
|
||||
const uint8_t Nb_tb,
|
||||
uint8_t *const buffer_pP)
|
||||
{
|
||||
|
||||
LOG_D(RRC,"[eNB %d] mac_rrc_data_req to SRB ID=%ld\n",Mod_idP,Srb_id);
|
||||
|
||||
// MIBCH
|
||||
if ((Srb_id & RAB_OFFSET) == MIBCH) {
|
||||
|
||||
int encode_size = 3;
|
||||
rrc_gNB_carrier_data_t *carrier = &RC.nrrrc[Mod_idP]->carrier;
|
||||
int encoded = encode_MIB_NR(carrier->mib, frameP, buffer_pP, encode_size);
|
||||
DevAssert(encoded == encode_size);
|
||||
LOG_D(NR_RRC, "MIB PDU buffer_pP[0]=%x , buffer_pP[1]=%x, buffer_pP[2]=%x\n", buffer_pP[0], buffer_pP[1],
|
||||
buffer_pP[2]);
|
||||
return encode_size;
|
||||
}
|
||||
|
||||
if ((Srb_id & RAB_OFFSET) == BCCH) {
|
||||
memcpy(&buffer_pP[0], RC.nrrrc[Mod_idP]->carrier.SIB1, RC.nrrrc[Mod_idP]->carrier.sizeof_SIB1);
|
||||
return RC.nrrrc[Mod_idP]->carrier.sizeof_SIB1;
|
||||
}
|
||||
|
||||
// CCCH
|
||||
if ((Srb_id & RAB_OFFSET) == CCCH) {
|
||||
AssertFatal(0, "CCCH is managed by rlc of srb 0, not anymore by mac_rrc_nr_data_req\n");
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int8_t nr_mac_rrc_bwp_switch_req(const module_id_t module_idP,
|
||||
const frame_t frameP,
|
||||
const sub_frame_t sub_frameP,
|
||||
|
||||
@@ -196,8 +196,8 @@ int xer_nr_sprint (char *string, size_t string_size, asn_TYPE_descriptor_t *td,
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
uint8_t do_SIB23_NR(rrc_gNB_carrier_data_t *carrier,
|
||||
gNB_RrcConfigurationReq *configuration) {
|
||||
uint8_t do_SIB23_NR(rrc_gNB_carrier_data_t *carrier)
|
||||
{
|
||||
asn_enc_rval_t enc_rval;
|
||||
SystemInformation_IEs__sib_TypeAndInfo__Member *sib2 = NULL;
|
||||
SystemInformation_IEs__sib_TypeAndInfo__Member *sib3 = NULL;
|
||||
@@ -242,16 +242,6 @@ uint8_t do_SIB23_NR(rrc_gNB_carrier_data_t *carrier,
|
||||
return((enc_rval.encoded+7)/8);
|
||||
}
|
||||
|
||||
void do_SpCellConfig(gNB_RRC_INST *rrc,
|
||||
struct NR_SpCellConfig *spconfig){
|
||||
//gNB_RrcConfigurationReq *common_configuration;
|
||||
//common_configuration = CALLOC(1,sizeof(gNB_RrcConfigurationReq));
|
||||
//Fill servingcellconfigcommon config value
|
||||
//Fill common config to structure
|
||||
// rrc->configuration = common_configuration;
|
||||
spconfig->reconfigurationWithSync = CALLOC(1,sizeof(struct NR_ReconfigurationWithSync));
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
int do_RRCReject(uint8_t Mod_id,
|
||||
uint8_t *const buffer)
|
||||
@@ -474,37 +464,6 @@ void free_nr_noS1_bearer_config(NR_RadioBearerConfig_t **rbconfig,
|
||||
*rlc_rbconfig = NULL;
|
||||
}
|
||||
|
||||
void fill_mastercellGroupConfig(NR_CellGroupConfig_t *cellGroupConfig,
|
||||
NR_CellGroupConfig_t *ue_context_mastercellGroup,
|
||||
int use_rlc_um_for_drb,
|
||||
uint8_t configure_srb,
|
||||
NR_DRB_ToAddModList_t *drb_configList,
|
||||
long *priority)
|
||||
{
|
||||
cellGroupConfig->cellGroupId = 0;
|
||||
cellGroupConfig->rlc_BearerToReleaseList = NULL;
|
||||
cellGroupConfig->rlc_BearerToAddModList = calloc(1, sizeof(*cellGroupConfig->rlc_BearerToAddModList));
|
||||
|
||||
// RLC Bearer Config
|
||||
// TS38.331 9.2.1 Default SRB configurations
|
||||
if (configure_srb){
|
||||
NR_RLC_BearerConfig_t *rlc_BearerConfig = get_SRB_RLC_BearerConfig(2, 3, NR_LogicalChannelConfig__ul_SpecificParameters__bucketSizeDuration_ms5);
|
||||
asn1cSeqAdd(&cellGroupConfig->rlc_BearerToAddModList->list, rlc_BearerConfig);
|
||||
asn1cSeqAdd(&ue_context_mastercellGroup->rlc_BearerToAddModList->list, rlc_BearerConfig);
|
||||
}
|
||||
|
||||
// DRB Configuration
|
||||
if (drb_configList != NULL) {
|
||||
for (int i = 0; i < drb_configList->list.count; ++i) {
|
||||
const NR_RLC_Config_PR rlc_conf = use_rlc_um_for_drb ? NR_RLC_Config_PR_um_Bi_Directional : NR_RLC_Config_PR_am;
|
||||
int rb_id = drb_configList->list.array[i]->drb_Identity;
|
||||
NR_RLC_BearerConfig_t *rlc_BearerConfig = get_DRB_RLC_BearerConfig(3 + rb_id, rb_id, rlc_conf, priority[rb_id - 1]);
|
||||
asn1cSeqAdd(&cellGroupConfig->rlc_BearerToAddModList->list, rlc_BearerConfig);
|
||||
asn1cSeqAdd(&ue_context_mastercellGroup->rlc_BearerToAddModList->list, rlc_BearerConfig);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
int do_RRCSetup(rrc_gNB_ue_context_t *const ue_context_pP,
|
||||
uint8_t *const buffer,
|
||||
@@ -542,9 +501,6 @@ int do_RRCSetup(rrc_gNB_ue_context_t *const ue_context_pP,
|
||||
memcpy(ie->masterCellGroup.buf, masterCellGroup, masterCellGroup_len);
|
||||
ie->masterCellGroup.size = masterCellGroup_len;
|
||||
|
||||
// decode masterCellGroup OCTET_STRING received from DU and place in ue context
|
||||
ue_p->masterCellGroup = decode_cellGroupConfig(masterCellGroup, masterCellGroup_len);
|
||||
|
||||
if (LOG_DEBUGFLAG(DEBUG_ASN1)) {
|
||||
xer_fprint(stdout, &asn_DEF_NR_CellGroupConfig, ue_p->masterCellGroup);
|
||||
xer_fprint(stdout, &asn_DEF_NR_DL_CCCH_Message, (void *)&dl_ccch_msg);
|
||||
@@ -553,6 +509,9 @@ int do_RRCSetup(rrc_gNB_ue_context_t *const ue_context_pP,
|
||||
asn_enc_rval_t enc_rval = uper_encode_to_buffer(&asn_DEF_NR_DL_CCCH_Message, NULL, (void *)&dl_ccch_msg, buffer, 1000);
|
||||
|
||||
AssertFatal(enc_rval.encoded > 0, "ASN1 message encoding failed (%s, %lu)!\n", enc_rval.failed_type->name, enc_rval.encoded);
|
||||
// free what we did not allocate ourselves
|
||||
ie->radioBearerConfig.srb_ToAddModList = NULL;
|
||||
ASN_STRUCT_FREE_CONTENTS_ONLY(asn_DEF_NR_DL_CCCH_Message, &dl_ccch_msg);
|
||||
|
||||
LOG_D(NR_RRC, "RRCSetup Encoded %zd bits (%zd bytes)\n", enc_rval.encoded, (enc_rval.encoded + 7) / 8);
|
||||
return ((enc_rval.encoded + 7) / 8);
|
||||
@@ -617,7 +576,6 @@ uint8_t do_NR_SA_UECapabilityEnquiry( const protocol_ctxt_t *const ctxt_pP,
|
||||
NR_DL_DCCH_Message_t dl_dcch_msg;
|
||||
NR_UE_CapabilityRAT_Request_t *ue_capabilityrat_request;
|
||||
|
||||
asn_enc_rval_t enc_rval;
|
||||
memset(&dl_dcch_msg,0,sizeof(NR_DL_DCCH_Message_t));
|
||||
dl_dcch_msg.message.present = NR_DL_DCCH_MessageType_PR_c1;
|
||||
dl_dcch_msg.message.choice.c1 = CALLOC(1,sizeof(struct NR_DL_DCCH_MessageType__c1));
|
||||
@@ -642,25 +600,16 @@ uint8_t do_NR_SA_UECapabilityEnquiry( const protocol_ctxt_t *const ctxt_pP,
|
||||
sa_band_filter = (NR_UE_CapabilityRequestFilterNR_t*)calloc(1,sizeof(NR_UE_CapabilityRequestFilterNR_t));
|
||||
sa_band_filter->frequencyBandListFilter = sa_band_list;
|
||||
|
||||
OCTET_STRING_t req_freq;
|
||||
unsigned char req_freq_buf[1024];
|
||||
enc_rval = uper_encode_to_buffer(&asn_DEF_NR_UE_CapabilityRequestFilterNR,
|
||||
NULL,
|
||||
(void *)sa_band_filter,
|
||||
req_freq_buf,
|
||||
1024);
|
||||
AssertFatal(enc_rval.encoded >0, "ASN1 message encoding failed (%s, %lu)!\n",
|
||||
enc_rval.failed_type->name, enc_rval.encoded);
|
||||
|
||||
OCTET_STRING_t *req_freq = calloc(1, sizeof(*req_freq));
|
||||
AssertFatal(req_freq != NULL, "out of memory\n");
|
||||
req_freq->size = uper_encode_to_new_buffer(&asn_DEF_NR_UE_CapabilityRequestFilterNR, NULL, sa_band_filter, (void **)&req_freq->buf);
|
||||
AssertFatal(req_freq->size > 0, "ASN1 message encoding failed (encoded %lu bytes)!\n", req_freq->size);
|
||||
|
||||
if ( LOG_DEBUGFLAG(DEBUG_ASN1) ) {
|
||||
xer_fprint(stdout, &asn_DEF_NR_UE_CapabilityRequestFilterNR, (void *)sa_band_filter);
|
||||
}
|
||||
|
||||
req_freq.buf = req_freq_buf;
|
||||
req_freq.size = (enc_rval.encoded+7)/8;
|
||||
|
||||
ue_capabilityrat_request->capabilityRequestFilter = &req_freq;
|
||||
ue_capabilityrat_request->capabilityRequestFilter = req_freq;
|
||||
|
||||
asn1cSeqAdd(&dl_dcch_msg.message.choice.c1->choice.ueCapabilityEnquiry->criticalExtensions.choice.ueCapabilityEnquiry->ue_CapabilityRAT_RequestList.list,
|
||||
ue_capabilityrat_request);
|
||||
@@ -670,14 +619,11 @@ uint8_t do_NR_SA_UECapabilityEnquiry( const protocol_ctxt_t *const ctxt_pP,
|
||||
xer_fprint(stdout, &asn_DEF_NR_DL_DCCH_Message, (void *)&dl_dcch_msg);
|
||||
}
|
||||
|
||||
enc_rval = uper_encode_to_buffer(&asn_DEF_NR_DL_DCCH_Message,
|
||||
NULL,
|
||||
(void *)&dl_dcch_msg,
|
||||
buffer,
|
||||
100);
|
||||
asn_enc_rval_t enc_rval = uper_encode_to_buffer(&asn_DEF_NR_DL_DCCH_Message, NULL, (void *)&dl_dcch_msg, buffer, 100);
|
||||
|
||||
AssertFatal(enc_rval.encoded >0, "ASN1 message encoding failed (%s, %lu)!\n",
|
||||
enc_rval.failed_type->name, enc_rval.encoded);
|
||||
ASN_STRUCT_FREE_CONTENTS_ONLY(asn_DEF_NR_DL_DCCH_Message, &dl_dcch_msg);
|
||||
|
||||
LOG_D(NR_RRC, "[gNB %d] NR UECapabilityRequest for UE %lx Encoded %zd bits (%zd bytes)\n", ctxt_pP->module_id, ctxt_pP->rntiMaybeUEid, enc_rval.encoded, (enc_rval.encoded + 7) / 8);
|
||||
|
||||
@@ -713,33 +659,27 @@ int do_NR_RRCRelease(uint8_t *buffer, size_t buffer_size, uint8_t Transaction_id
|
||||
buffer_size);
|
||||
AssertFatal(enc_rval.encoded > 0, "ASN1 message encoding failed (%s, %lu)!\n",
|
||||
enc_rval.failed_type->name, enc_rval.encoded);
|
||||
ASN_STRUCT_FREE_CONTENTS_ONLY(asn_DEF_NR_DL_DCCH_Message, &dl_dcch_msg);
|
||||
return((enc_rval.encoded+7)/8);
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
int16_t do_RRCReconfiguration(
|
||||
const protocol_ctxt_t *const ctxt_pP,
|
||||
uint8_t *buffer,
|
||||
size_t buffer_size,
|
||||
uint8_t Transaction_id,
|
||||
NR_SRB_ToAddModList_t *SRB_configList,
|
||||
NR_DRB_ToAddModList_t *DRB_configList,
|
||||
NR_DRB_ToReleaseList_t *DRB_releaseList,
|
||||
NR_SecurityConfig_t *security_config,
|
||||
NR_SDAP_Config_t *sdap_config,
|
||||
NR_MeasConfig_t *meas_config,
|
||||
struct NR_RRCReconfiguration_v1530_IEs__dedicatedNAS_MessageList *dedicatedNAS_MessageList,
|
||||
rrc_gNB_ue_context_t *const ue_context_pP,
|
||||
rrc_gNB_carrier_data_t *carrier,
|
||||
const gNB_RrcConfigurationReq *configuration,
|
||||
NR_MAC_CellGroupConfig_t *mac_CellGroupConfig,
|
||||
NR_CellGroupConfig_t *cellGroupConfig)
|
||||
int16_t do_RRCReconfiguration(const gNB_RRC_UE_t *UE,
|
||||
uint8_t *buffer,
|
||||
size_t buffer_size,
|
||||
uint8_t Transaction_id,
|
||||
NR_SRB_ToAddModList_t *SRB_configList,
|
||||
NR_DRB_ToAddModList_t *DRB_configList,
|
||||
NR_DRB_ToReleaseList_t *DRB_releaseList,
|
||||
NR_SecurityConfig_t *security_config,
|
||||
NR_MeasConfig_t *meas_config,
|
||||
struct NR_RRCReconfiguration_v1530_IEs__dedicatedNAS_MessageList *dedicatedNAS_MessageList,
|
||||
NR_CellGroupConfig_t *cellGroupConfig)
|
||||
//------------------------------------------------------------------------------
|
||||
{
|
||||
NR_DL_DCCH_Message_t dl_dcch_msg={0};
|
||||
asn_enc_rval_t enc_rval;
|
||||
NR_RRCReconfiguration_IEs_t *ie;
|
||||
unsigned char masterCellGroup_buf[1000];
|
||||
|
||||
dl_dcch_msg.message.present = NR_DL_DCCH_MessageType_PR_c1;
|
||||
asn1cCalloc(dl_dcch_msg.message.choice.c1, c1);// = CALLOC(1, sizeof(struct NR_DL_DCCH_MessageType__c1));
|
||||
@@ -782,23 +722,16 @@ int16_t do_RRCReconfiguration(
|
||||
ie->nonCriticalExtension->dedicatedNAS_MessageList = dedicatedNAS_MessageList;
|
||||
}
|
||||
|
||||
if(cellGroupConfig!=NULL){
|
||||
update_cellGroupConfig(cellGroupConfig, ue_context_pP->ue_context.rrc_ue_id, ue_context_pP ? ue_context_pP->ue_context.UE_Capability_nr : NULL, configuration);
|
||||
|
||||
enc_rval = uper_encode_to_buffer(&asn_DEF_NR_CellGroupConfig,
|
||||
NULL,
|
||||
(void *)cellGroupConfig,
|
||||
masterCellGroup_buf,
|
||||
1000);
|
||||
AssertFatal(enc_rval.encoded >0, "ASN1 message encoding failed (%s, %lu)!\n",
|
||||
enc_rval.failed_type->name, enc_rval.encoded);
|
||||
if (cellGroupConfig != NULL) {
|
||||
uint8_t *buf = NULL;
|
||||
ssize_t len = uper_encode_to_new_buffer(&asn_DEF_NR_CellGroupConfig, NULL, cellGroupConfig, (void **)&buf);
|
||||
AssertFatal(len > 0, "ASN1 message encoding failed (%lu)!\n", len);
|
||||
if ( LOG_DEBUGFLAG(DEBUG_ASN1) ) {
|
||||
xer_fprint(stdout, &asn_DEF_NR_CellGroupConfig, (const void *) cellGroupConfig);
|
||||
}
|
||||
ie->nonCriticalExtension->masterCellGroup = calloc(1,sizeof(OCTET_STRING_t));
|
||||
|
||||
ie->nonCriticalExtension->masterCellGroup->buf = masterCellGroup_buf;
|
||||
ie->nonCriticalExtension->masterCellGroup->size = (enc_rval.encoded+7)/8;
|
||||
ie->nonCriticalExtension->masterCellGroup->buf = buf;
|
||||
ie->nonCriticalExtension->masterCellGroup->size = len;
|
||||
}
|
||||
|
||||
dl_dcch_msg.message.choice.c1->choice.rrcReconfiguration->criticalExtensions.choice.rrcReconfiguration = ie;
|
||||
@@ -816,11 +749,24 @@ int16_t do_RRCReconfiguration(
|
||||
AssertFatal(enc_rval.encoded >0, "ASN1 message encoding failed (%s, %lu)!\n",
|
||||
enc_rval.failed_type->name, enc_rval.encoded);
|
||||
|
||||
LOG_D(NR_RRC,"[gNB %d] RRCReconfiguration for UE %lx Encoded %zd bits (%zd bytes)\n",
|
||||
ctxt_pP->module_id,
|
||||
ctxt_pP->rntiMaybeUEid,
|
||||
// don't free what we did not allocate, so set fields with pointers to NULL
|
||||
// if memory comes from outside
|
||||
ie->measConfig = NULL;
|
||||
if (ie->radioBearerConfig) {
|
||||
ie->radioBearerConfig->srb_ToAddModList = NULL;
|
||||
ie->radioBearerConfig->drb_ToAddModList = NULL;
|
||||
ie->radioBearerConfig->securityConfig = NULL;
|
||||
ie->radioBearerConfig->srb3_ToRelease = NULL;
|
||||
ie->radioBearerConfig->drb_ToReleaseList = NULL;
|
||||
}
|
||||
if (ie->nonCriticalExtension)
|
||||
ie->nonCriticalExtension->dedicatedNAS_MessageList = NULL;
|
||||
ASN_STRUCT_FREE_CONTENTS_ONLY(asn_DEF_NR_DL_DCCH_Message, &dl_dcch_msg);
|
||||
LOG_D(NR_RRC,
|
||||
"RRCReconfiguration for UE %d: Encoded %zd bits (%zd bytes)\n",
|
||||
UE->rrc_ue_id,
|
||||
enc_rval.encoded,
|
||||
(enc_rval.encoded+7)/8);
|
||||
(enc_rval.encoded + 7) / 8);
|
||||
|
||||
return((enc_rval.encoded+7)/8);
|
||||
}
|
||||
@@ -1002,41 +948,36 @@ uint8_t do_RRCSetupComplete(uint8_t Mod_id, uint8_t *buffer, size_t buffer_size,
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
uint8_t
|
||||
do_NR_DLInformationTransfer(
|
||||
uint8_t Mod_id,
|
||||
uint8_t **buffer,
|
||||
uint8_t transaction_id,
|
||||
uint32_t pdu_length,
|
||||
uint8_t *pdu_buffer
|
||||
)
|
||||
uint8_t do_NR_DLInformationTransfer(uint8_t Mod_id,
|
||||
uint8_t *buffer,
|
||||
size_t buffer_len,
|
||||
uint8_t transaction_id,
|
||||
uint32_t pdu_length,
|
||||
uint8_t *pdu_buffer)
|
||||
//------------------------------------------------------------------------------
|
||||
{
|
||||
ssize_t encoded;
|
||||
NR_DL_DCCH_Message_t dl_dcch_msg={0};
|
||||
dl_dcch_msg.message.present = NR_DL_DCCH_MessageType_PR_c1;
|
||||
asn1cCalloc(dl_dcch_msg.message.choice.c1, c1);
|
||||
c1->present = NR_DL_DCCH_MessageType__c1_PR_dlInformationTransfer;
|
||||
NR_DL_DCCH_Message_t dl_dcch_msg = {0};
|
||||
dl_dcch_msg.message.present = NR_DL_DCCH_MessageType_PR_c1;
|
||||
asn1cCalloc(dl_dcch_msg.message.choice.c1, c1);
|
||||
c1->present = NR_DL_DCCH_MessageType__c1_PR_dlInformationTransfer;
|
||||
|
||||
asn1cCalloc(c1->choice.dlInformationTransfer, infoTransfer);
|
||||
infoTransfer->rrc_TransactionIdentifier = transaction_id;
|
||||
infoTransfer->criticalExtensions.present =
|
||||
NR_DLInformationTransfer__criticalExtensions_PR_dlInformationTransfer;
|
||||
asn1cCalloc(c1->choice.dlInformationTransfer, infoTransfer);
|
||||
infoTransfer->rrc_TransactionIdentifier = transaction_id;
|
||||
infoTransfer->criticalExtensions.present = NR_DLInformationTransfer__criticalExtensions_PR_dlInformationTransfer;
|
||||
|
||||
asn1cCalloc(infoTransfer->criticalExtensions.choice.dlInformationTransfer, dlInfoTransfer);
|
||||
asn1cCalloc(dlInfoTransfer->dedicatedNAS_Message,msg);
|
||||
// we will free the caller buffer, that is ok in the present code logic (else it will leak memory) but not natural,
|
||||
// comprehensive code design
|
||||
msg->buf = pdu_buffer;
|
||||
msg->size = pdu_length;
|
||||
asn1cCalloc(infoTransfer->criticalExtensions.choice.dlInformationTransfer, dlInfoTransfer);
|
||||
asn1cCalloc(dlInfoTransfer->dedicatedNAS_Message, msg);
|
||||
// we will free the caller buffer, that is ok in the present code logic (else it will leak memory) but not natural,
|
||||
// comprehensive code design
|
||||
msg->buf = pdu_buffer;
|
||||
msg->size = pdu_length;
|
||||
|
||||
encoded = uper_encode_to_new_buffer (&asn_DEF_NR_DL_DCCH_Message, NULL, (void *) &dl_dcch_msg, (void **)buffer);
|
||||
AssertFatal(encoded > 0,"ASN1 message encoding failed (%s, %ld)!\n",
|
||||
"DLInformationTransfer", encoded);
|
||||
ASN_STRUCT_FREE_CONTENTS_ONLY(asn_DEF_NR_DL_DCCH_Message,&dl_dcch_msg );
|
||||
LOG_D(NR_RRC,"DLInformationTransfer Encoded %zd bytes\n", encoded);
|
||||
//for (int i=0;i<encoded;i++) printf("%02x ",(*buffer)[i]);
|
||||
return encoded;
|
||||
asn_enc_rval_t r = uper_encode_to_buffer(&asn_DEF_NR_DL_DCCH_Message, NULL, (void *)&dl_dcch_msg, buffer, buffer_len);
|
||||
AssertFatal(r.encoded > 0, "ASN1 message encoding failed (%s, %ld)!\n", "DLInformationTransfer", r.encoded);
|
||||
ASN_STRUCT_FREE_CONTENTS_ONLY(asn_DEF_NR_DL_DCCH_Message, &dl_dcch_msg);
|
||||
LOG_D(NR_RRC, "DLInformationTransfer Encoded %zd bytes\n", r.encoded);
|
||||
// for (int i=0;i<encoded;i++) printf("%02x ",(*buffer)[i]);
|
||||
return r.encoded;
|
||||
}
|
||||
|
||||
uint8_t do_NR_ULInformationTransfer(uint8_t **buffer, uint32_t pdu_length, uint8_t *pdu_buffer) {
|
||||
@@ -1101,14 +1042,11 @@ uint8_t do_RRCReestablishmentRequest(uint8_t Mod_id, uint8_t *buffer, uint16_t c
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
int do_RRCReestablishment(rrc_gNB_ue_context_t *const ue_context_pP,
|
||||
int CC_id,
|
||||
uint8_t *const buffer,
|
||||
size_t buffer_size,
|
||||
const uint8_t Transaction_id,
|
||||
NR_SRB_ToAddModList_t *SRB_configList,
|
||||
const uint8_t *masterCellGroup_from_DU,
|
||||
NR_ServingCellConfigCommon_t *scc,
|
||||
rrc_gNB_carrier_data_t *carrier)
|
||||
uint16_t pci,
|
||||
NR_ARFCN_ValueNR_t absoluteFrequencySSB)
|
||||
{
|
||||
asn_enc_rval_t enc_rval;
|
||||
NR_DL_DCCH_Message_t dl_dcch_msg = {0};
|
||||
@@ -1125,17 +1063,14 @@ int do_RRCReestablishment(rrc_gNB_ue_context_t *const ue_context_pP,
|
||||
rrcReestablishment->criticalExtensions.present = NR_RRCReestablishment__criticalExtensions_PR_rrcReestablishment;
|
||||
rrcReestablishment->criticalExtensions.choice.rrcReestablishment = CALLOC(1, sizeof(NR_RRCReestablishment_IEs_t));
|
||||
|
||||
int module_id = 0;
|
||||
uint16_t pci = RC.nrrrc[module_id]->carrier.physCellId;
|
||||
uint32_t nr_arfcn_dl = (uint64_t)*scc->downlinkConfigCommon->frequencyInfoDL->absoluteFrequencySSB;
|
||||
LOG_I(NR_RRC, "Reestablishment update key pci=%d, earfcn_dl=%u\n", pci, nr_arfcn_dl);
|
||||
LOG_I(NR_RRC, "Reestablishment update key pci=%d, earfcn_dl=%lu\n", pci, absoluteFrequencySSB);
|
||||
|
||||
// 3GPP TS 33.501 Section 6.11 Security handling for RRC connection re-establishment procedure
|
||||
if (ue_context_pP->ue_context.nh_ncc >= 0) {
|
||||
nr_derive_key_ng_ran_star(pci, nr_arfcn_dl, ue_context_pP->ue_context.nh, ue_context_pP->ue_context.kgnb);
|
||||
nr_derive_key_ng_ran_star(pci, absoluteFrequencySSB, ue_context_pP->ue_context.nh, ue_context_pP->ue_context.kgnb);
|
||||
rrcReestablishment->criticalExtensions.choice.rrcReestablishment->nextHopChainingCount = ue_context_pP->ue_context.nh_ncc;
|
||||
} else { // first HO
|
||||
nr_derive_key_ng_ran_star(pci, nr_arfcn_dl, ue_context_pP->ue_context.kgnb, ue_context_pP->ue_context.kgnb);
|
||||
nr_derive_key_ng_ran_star(pci, absoluteFrequencySSB, ue_context_pP->ue_context.kgnb, ue_context_pP->ue_context.kgnb);
|
||||
// LG: really 1
|
||||
rrcReestablishment->criticalExtensions.choice.rrcReestablishment->nextHopChainingCount = 0;
|
||||
}
|
||||
@@ -1148,7 +1083,7 @@ int do_RRCReestablishment(rrc_gNB_ue_context_t *const ue_context_pP,
|
||||
xer_fprint(stdout, &asn_DEF_NR_DL_DCCH_Message, (void *)&dl_dcch_msg);
|
||||
}
|
||||
|
||||
enc_rval = uper_encode_to_buffer(&asn_DEF_NR_DL_DCCH_Message, NULL, (void *)&dl_dcch_msg, buffer, 100);
|
||||
enc_rval = uper_encode_to_buffer(&asn_DEF_NR_DL_DCCH_Message, NULL, (void *)&dl_dcch_msg, buffer, buffer_size);
|
||||
|
||||
AssertFatal(enc_rval.encoded > 0, "ASN1 message encoding failed (%s, %lu)!\n",
|
||||
enc_rval.failed_type->name, enc_rval.encoded);
|
||||
@@ -1190,15 +1125,8 @@ int do_RRCReestablishmentComplete(uint8_t *buffer, size_t buffer_size, int64_t r
|
||||
return((enc_rval.encoded+7)/8);
|
||||
}
|
||||
|
||||
NR_MeasConfig_t *get_defaultMeasConfig(const gNB_RrcConfigurationReq *conf)
|
||||
NR_MeasConfig_t *get_defaultMeasConfig(int arfcn, int band, int scs)
|
||||
{
|
||||
const NR_FrequencyInfoDL_t *freqInfoDL = conf->scc->downlinkConfigCommon->frequencyInfoDL;
|
||||
const NR_ARFCN_ValueNR_t absFreqSSB = *freqInfoDL->absoluteFrequencySSB;
|
||||
DevAssert(freqInfoDL->scs_SpecificCarrierList.list.count == 1);
|
||||
const NR_SubcarrierSpacing_t scs = freqInfoDL->scs_SpecificCarrierList.list.array[0]->subcarrierSpacing;
|
||||
DevAssert(freqInfoDL->frequencyBandList.list.count == 1);
|
||||
const NR_FreqBandIndicatorNR_t band = *freqInfoDL->frequencyBandList.list.array[0];
|
||||
|
||||
NR_MeasConfig_t *mc = calloc(1, sizeof(*mc));
|
||||
mc->measObjectToAddModList = calloc(1, sizeof(*mc->measObjectToAddModList));
|
||||
mc->reportConfigToAddModList = calloc(1, sizeof(*mc->reportConfigToAddModList));
|
||||
@@ -1209,7 +1137,7 @@ NR_MeasConfig_t *get_defaultMeasConfig(const gNB_RrcConfigurationReq *conf)
|
||||
mo1->measObjectId = 1;
|
||||
mo1->measObject.present = NR_MeasObjectToAddMod__measObject_PR_measObjectNR;
|
||||
NR_MeasObjectNR_t *monr1 = calloc(1, sizeof(*monr1));
|
||||
asn1cCallocOne(monr1->ssbFrequency, absFreqSSB);
|
||||
asn1cCallocOne(monr1->ssbFrequency, arfcn);
|
||||
asn1cCallocOne(monr1->ssbSubcarrierSpacing, scs);
|
||||
monr1->referenceSignalConfig.ssb_ConfigMobility = calloc(1, sizeof(*monr1->referenceSignalConfig.ssb_ConfigMobility));
|
||||
monr1->referenceSignalConfig.ssb_ConfigMobility->deriveSSB_IndexFromCell = true;
|
||||
@@ -1278,6 +1206,11 @@ NR_MeasConfig_t *get_defaultMeasConfig(const gNB_RrcConfigurationReq *conf)
|
||||
return mc;
|
||||
}
|
||||
|
||||
void free_defaultMeasConfig(NR_MeasConfig_t *mc)
|
||||
{
|
||||
ASN_STRUCT_FREE(asn_DEF_NR_MeasConfig, mc);
|
||||
}
|
||||
|
||||
uint8_t do_NR_Paging(uint8_t Mod_id, uint8_t *buffer, uint32_t tmsi) {
|
||||
LOG_D(NR_RRC, "[gNB %d] do_NR_Paging start\n", Mod_id);
|
||||
NR_PCCH_Message_t pcch_msg;
|
||||
|
||||
@@ -55,11 +55,7 @@
|
||||
*/
|
||||
int xer_sprint_NR(char *string, size_t string_size, struct asn_TYPE_descriptor_s *td, void *sptr);
|
||||
|
||||
uint8_t do_SIB23_NR(rrc_gNB_carrier_data_t *carrier,
|
||||
gNB_RrcConfigurationReq *configuration);
|
||||
|
||||
void do_SpCellConfig(gNB_RRC_INST *rrc,
|
||||
struct NR_SpCellConfig *spconfig);
|
||||
uint8_t do_SIB23_NR(rrc_gNB_carrier_data_t *carrier);
|
||||
|
||||
int do_RRCReject(uint8_t Mod_id,
|
||||
uint8_t *const buffer);
|
||||
@@ -79,25 +75,6 @@ void fill_nr_noS1_bearer_config(NR_RadioBearerConfig_t **rbconfig,
|
||||
NR_RLC_BearerConfig_t **rlc_rbconfig);
|
||||
void free_nr_noS1_bearer_config(NR_RadioBearerConfig_t **rbconfig,
|
||||
NR_RLC_BearerConfig_t **rlc_rbconfig);
|
||||
/**
|
||||
* @brief Function to fill out the master cell group config to be used in RRCReconfiguration.
|
||||
* If it is misused the ue_context_mastercellGroup, might lead to ASN1 encoding failure,
|
||||
* because in ue_context_mastercellGroup the rlc_BearerConfigs are added but never removed,
|
||||
* so the maximum number of rlc_BearerConfigs is exceeded.
|
||||
*
|
||||
* @param cellGroupConfig The MCG that will be used in do_RRCReconfiguration.
|
||||
* @param ue_context_mastercellGroup The MCG that is stored in the ue context.
|
||||
* @param[in] use_rlc_um_for_drb Set to 1, if RLC uses 'Unacknowledged Mode' for the DRB.
|
||||
* @param[in] configure_srb Set to 1, if SRB2 needs be added to MCG.
|
||||
* @param[in] drb_configList The Data Radio Bearer list, to be added.
|
||||
* @param[in] priority The priorities set for the Data Radio Bearers.
|
||||
*/
|
||||
void fill_mastercellGroupConfig(NR_CellGroupConfig_t *cellGroupConfig,
|
||||
NR_CellGroupConfig_t *ue_context_mastercellGroup,
|
||||
int use_rlc_um_for_drb,
|
||||
uint8_t configure_srb,
|
||||
NR_DRB_ToAddModList_t *drb_configList,
|
||||
long *priority);
|
||||
|
||||
int do_RRCSetup(rrc_gNB_ue_context_t *const ue_context_pP,
|
||||
uint8_t *const buffer,
|
||||
@@ -120,23 +97,17 @@ uint8_t do_NR_SA_UECapabilityEnquiry( const protocol_ctxt_t *const ctxt_pP,
|
||||
|
||||
int do_NR_RRCRelease(uint8_t *buffer, size_t buffer_size, uint8_t Transaction_id);
|
||||
|
||||
int16_t do_RRCReconfiguration(
|
||||
const protocol_ctxt_t *const ctxt_pP,
|
||||
uint8_t *buffer,
|
||||
size_t buffer_size,
|
||||
uint8_t Transaction_id,
|
||||
NR_SRB_ToAddModList_t *SRB_configList,
|
||||
NR_DRB_ToAddModList_t *DRB_configList,
|
||||
NR_DRB_ToReleaseList_t *DRB_releaseList,
|
||||
NR_SecurityConfig_t *security_config,
|
||||
NR_SDAP_Config_t *sdap_config,
|
||||
NR_MeasConfig_t *meas_config,
|
||||
struct NR_RRCReconfiguration_v1530_IEs__dedicatedNAS_MessageList *dedicatedNAS_MessageList,
|
||||
rrc_gNB_ue_context_t *const ue_context_pP,
|
||||
rrc_gNB_carrier_data_t *carrier,
|
||||
const gNB_RrcConfigurationReq *configuration,
|
||||
NR_MAC_CellGroupConfig_t *mac_CellGroupConfig,
|
||||
NR_CellGroupConfig_t *cellGroupConfig);
|
||||
int16_t do_RRCReconfiguration(const gNB_RRC_UE_t *UE,
|
||||
uint8_t *buffer,
|
||||
size_t buffer_size,
|
||||
uint8_t Transaction_id,
|
||||
NR_SRB_ToAddModList_t *SRB_configList,
|
||||
NR_DRB_ToAddModList_t *DRB_configList,
|
||||
NR_DRB_ToReleaseList_t *DRB_releaseList,
|
||||
NR_SecurityConfig_t *security_config,
|
||||
NR_MeasConfig_t *meas_config,
|
||||
struct NR_RRCReconfiguration_v1530_IEs__dedicatedNAS_MessageList *dedicatedNAS_MessageList,
|
||||
NR_CellGroupConfig_t *cellGroupConfig);
|
||||
|
||||
uint8_t do_RRCSetupComplete(uint8_t Mod_id,
|
||||
uint8_t *buffer,
|
||||
@@ -157,14 +128,12 @@ uint8_t do_NR_RRCReconfigurationComplete(
|
||||
const uint8_t Transaction_id
|
||||
);
|
||||
|
||||
uint8_t
|
||||
do_NR_DLInformationTransfer(
|
||||
uint8_t Mod_id,
|
||||
uint8_t **buffer,
|
||||
uint8_t transaction_id,
|
||||
uint32_t pdu_length,
|
||||
uint8_t *pdu_buffer
|
||||
);
|
||||
uint8_t do_NR_DLInformationTransfer(uint8_t Mod_id,
|
||||
uint8_t *buffer,
|
||||
size_t buffer_len,
|
||||
uint8_t transaction_id,
|
||||
uint32_t pdu_length,
|
||||
uint8_t *pdu_buffer);
|
||||
|
||||
uint8_t do_NR_ULInformationTransfer(uint8_t **buffer,
|
||||
uint32_t pdu_length,
|
||||
@@ -173,18 +142,16 @@ uint8_t do_NR_ULInformationTransfer(uint8_t **buffer,
|
||||
uint8_t do_RRCReestablishmentRequest(uint8_t Mod_id, uint8_t *buffer, uint16_t c_rnti);
|
||||
|
||||
int do_RRCReestablishment(rrc_gNB_ue_context_t *const ue_context_pP,
|
||||
int CC_id,
|
||||
uint8_t *const buffer,
|
||||
size_t buffer_size,
|
||||
const uint8_t Transaction_id,
|
||||
NR_SRB_ToAddModList_t *SRB_configList,
|
||||
const uint8_t *masterCellGroup_from_DU,
|
||||
NR_ServingCellConfigCommon_t *scc,
|
||||
rrc_gNB_carrier_data_t *carrier);
|
||||
uint16_t pci,
|
||||
NR_ARFCN_ValueNR_t absoluteFrequencySSB);
|
||||
|
||||
int do_RRCReestablishmentComplete(uint8_t *buffer, size_t buffer_size, int64_t rrc_TransactionIdentifier);
|
||||
|
||||
NR_MeasConfig_t *get_defaultMeasConfig(const gNB_RrcConfigurationReq *conf);
|
||||
NR_MeasConfig_t *get_defaultMeasConfig(int absFreqSSB, int band, int scs);
|
||||
void free_defaultMeasConfig(NR_MeasConfig_t *mc);
|
||||
uint8_t do_NR_Paging(uint8_t Mod_id, uint8_t *buffer, uint32_t tmsi);
|
||||
|
||||
#endif /* __RRC_NR_MESSAGES_ASN1_MSG__H__ */
|
||||
|
||||
@@ -195,7 +195,7 @@ static void cucp_cuup_bearer_context_setup_direct(e1ap_bearer_setup_req_t *const
|
||||
} else {
|
||||
int remote_port = RC.nrrrc[ctxt.module_id]->eth_params_s.remote_portd;
|
||||
in_addr_t my_addr = inet_addr(RC.nrrrc[ctxt.module_id]->eth_params_s.my_addr);
|
||||
instance_t gtpInst = getCxt(CUtype, instance)->gtpInst;
|
||||
instance_t gtpInst = getCxt(instance)->gtpInst;
|
||||
// GTP tunnel for DL
|
||||
fill_e1ap_bearer_setup_resp(&resp, req, gtpInst, UE->rrc_ue_id, remote_port, my_addr);
|
||||
}
|
||||
@@ -210,7 +210,7 @@ static void cucp_cuup_bearer_context_mod_direct(e1ap_bearer_setup_req_t *const r
|
||||
// only update GTP tunnels if it is really a CU
|
||||
if (!NODE_IS_CU(RC.nrrrc[0]->node_type))
|
||||
return;
|
||||
instance_t gtpInst = getCxt(CUtype, instance)->gtpInst;
|
||||
instance_t gtpInst = getCxt(instance)->gtpInst;
|
||||
CU_update_UP_DL_tunnel(req, gtpInst, req->gNB_cu_cp_ue_id);
|
||||
}
|
||||
|
||||
|
||||
@@ -25,6 +25,9 @@
|
||||
#include "platform_types.h"
|
||||
#include "f1ap_messages_types.h"
|
||||
|
||||
typedef void (*f1_setup_response_func_t)(const f1ap_setup_resp_t *resp);
|
||||
typedef void (*f1_setup_failure_func_t)(const f1ap_setup_failure_t *fail);
|
||||
|
||||
typedef void (*ue_context_setup_request_func_t)(const f1ap_ue_context_setup_t *req);
|
||||
typedef void (*ue_context_modification_request_func_t)(const f1ap_ue_context_modif_req_t *req);
|
||||
typedef void (*ue_context_modification_confirm_func_t)(const f1ap_ue_context_modif_confirm_t *confirm);
|
||||
|
||||
@@ -26,6 +26,8 @@
|
||||
|
||||
void mac_rrc_dl_direct_init(nr_mac_rrc_dl_if_t *mac_rrc)
|
||||
{
|
||||
mac_rrc->f1_setup_response = f1_setup_response;
|
||||
mac_rrc->f1_setup_failure = f1_setup_failure;
|
||||
mac_rrc->ue_context_setup_request = ue_context_setup_request;
|
||||
mac_rrc->ue_context_modification_request = ue_context_modification_request;
|
||||
mac_rrc->ue_context_modification_confirm = ue_context_modification_confirm;
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user