Commit 9f114f66 authored by Vaibhav Shrivastava's avatar Vaibhav Shrivastava

4G RLC/PDCP and GNB_APP Rebased Changes

parent 2f9e334a
...@@ -51,6 +51,8 @@ ...@@ -51,6 +51,8 @@
#define CONFIG_STRING_L1_PUCCH0_DTX_THRESHOLD "pucch0_dtx_threshold" #define CONFIG_STRING_L1_PUCCH0_DTX_THRESHOLD "pucch0_dtx_threshold"
#define CONFIG_STRING_L1_PRACH_DTX_THRESHOLD "prach_dtx_threshold" #define CONFIG_STRING_L1_PRACH_DTX_THRESHOLD "prach_dtx_threshold"
#define CONFIG_STRING_L1_PUSCH_DTX_THRESHOLD "pusch_dtx_threshold" #define CONFIG_STRING_L1_PUSCH_DTX_THRESHOLD "pusch_dtx_threshold"
#define CONFIG_STRING_L1_SRS_DTX_THRESHOLD "srs_dtx_threshold"
#define CONFIG_STRING_L1_MAX_LDPC_ITERATIONS "max_ldpc_iterations"
/*----------------------------------------------------------------------------------------------------------------------------------------------------*/ /*----------------------------------------------------------------------------------------------------------------------------------------------------*/
/* L1 configuration parameters */ /* L1 configuration parameters */
/* optname helpstr paramflags XXXptr defXXXval type numelt */ /* optname helpstr paramflags XXXptr defXXXval type numelt */
...@@ -65,11 +67,13 @@ ...@@ -65,11 +67,13 @@
{CONFIG_STRING_L1_REMOTE_N_PORTC, NULL, 0, uptr:NULL, defintval:50030, TYPE_UINT, 0}, \ {CONFIG_STRING_L1_REMOTE_N_PORTC, NULL, 0, uptr:NULL, defintval:50030, TYPE_UINT, 0}, \
{CONFIG_STRING_L1_LOCAL_N_PORTD, NULL, 0, uptr:NULL, defintval:50031, TYPE_UINT, 0}, \ {CONFIG_STRING_L1_LOCAL_N_PORTD, NULL, 0, uptr:NULL, defintval:50031, TYPE_UINT, 0}, \
{CONFIG_STRING_L1_REMOTE_N_PORTD, NULL, 0, uptr:NULL, defintval:50031, TYPE_UINT, 0}, \ {CONFIG_STRING_L1_REMOTE_N_PORTD, NULL, 0, uptr:NULL, defintval:50031, TYPE_UINT, 0}, \
{CONFIG_STRING_L1_THREAD_POOL_SIZE, "Maximum number of CPU cores for L1 processing (either max HW CPU cores or this value is used)", 0, uptr:NULL, defintval:4, TYPE_UINT, 0}, \ {CONFIG_STRING_L1_THREAD_POOL_SIZE, "thread_pool_size paramter removed, please use --thread-pool", 0, uptr:NULL, defintval:2022, TYPE_UINT, 0}, \
{CONFIG_STRING_L1_OFDM_OFFSET_DIVISOR, NULL, 0, uptr:NULL, defuintval:8, TYPE_UINT, 0}, \ {CONFIG_STRING_L1_OFDM_OFFSET_DIVISOR, NULL, 0, uptr:NULL, defuintval:8, TYPE_UINT, 0}, \
{CONFIG_STRING_L1_PUCCH0_DTX_THRESHOLD, NULL, 0, uptr:NULL, defintval:100, TYPE_UINT, 0}, \ {CONFIG_STRING_L1_PUCCH0_DTX_THRESHOLD, NULL, 0, uptr:NULL, defintval:100, TYPE_UINT, 0}, \
{CONFIG_STRING_L1_PRACH_DTX_THRESHOLD, NULL, 0, uptr:NULL, defintval:150, TYPE_UINT, 0}, \ {CONFIG_STRING_L1_PRACH_DTX_THRESHOLD, NULL, 0, uptr:NULL, defintval:150, TYPE_UINT, 0}, \
{CONFIG_STRING_L1_PUSCH_DTX_THRESHOLD, NULL, 0, uptr:NULL, defintval:50, TYPE_UINT, 0} \ {CONFIG_STRING_L1_PUSCH_DTX_THRESHOLD, NULL, 0, uptr:NULL, defintval:50, TYPE_UINT, 0}, \
{CONFIG_STRING_L1_SRS_DTX_THRESHOLD, NULL, 0, uptr:NULL, defintval:50, TYPE_UINT, 0}, \
{CONFIG_STRING_L1_MAX_LDPC_ITERATIONS, NULL, 0, uptr:NULL, defintval:5, TYPE_UINT, 0}, \
} }
#define L1_CC_IDX 0 #define L1_CC_IDX 0
#define L1_TRANSPORT_N_PREFERENCE_IDX 1 #define L1_TRANSPORT_N_PREFERENCE_IDX 1
...@@ -85,6 +89,8 @@ ...@@ -85,6 +89,8 @@
#define L1_PUCCH0_DTX_THRESHOLD 11 #define L1_PUCCH0_DTX_THRESHOLD 11
#define L1_PRACH_DTX_THRESHOLD 12 #define L1_PRACH_DTX_THRESHOLD 12
#define L1_PUSCH_DTX_THRESHOLD 13 #define L1_PUSCH_DTX_THRESHOLD 13
#define L1_SRS_DTX_THRESHOLD 14
#define L1_MAX_LDPC_ITERATIONS 15
/*----------------------------------------------------------------------------------------------------------------------------------------------------*/ /*----------------------------------------------------------------------------------------------------------------------------------------------------*/
#endif #endif
...@@ -58,12 +58,19 @@ ...@@ -58,12 +58,19 @@
#define CONFIG_STRING_MACRLC_ULSCH_MAX_FRAME_INACTIVITY "ulsch_max_frame_inactivity" #define CONFIG_STRING_MACRLC_ULSCH_MAX_FRAME_INACTIVITY "ulsch_max_frame_inactivity"
#define CONFIG_STRING_MACRLC_PUSCHTARGETSNRX10 "pusch_TargetSNRx10" #define CONFIG_STRING_MACRLC_PUSCHTARGETSNRX10 "pusch_TargetSNRx10"
#define CONFIG_STRING_MACRLC_PUCCHTARGETSNRX10 "pucch_TargetSNRx10" #define CONFIG_STRING_MACRLC_PUCCHTARGETSNRX10 "pucch_TargetSNRx10"
#define CONFIG_STRING_MACRLC_UL_PRBBLACK_SNR_THRESHOLD "ul_prbblack_SNR_threshold"
#define CONFIG_STRING_MACRLC_PUCCHFAILURETHRES "pucch_FailureThres" #define CONFIG_STRING_MACRLC_PUCCHFAILURETHRES "pucch_FailureThres"
#define CONFIG_STRING_MACRLC_PUSCHFAILURETHRES "pusch_FailureThres" #define CONFIG_STRING_MACRLC_PUSCHFAILURETHRES "pusch_FailureThres"
#define CONFIG_STRING_MACRLC_DL_BLER_TARGET_UPPER "dl_bler_target_upper" #define CONFIG_STRING_MACRLC_DL_BLER_TARGET_UPPER "dl_bler_target_upper"
#define CONFIG_STRING_MACRLC_DL_BLER_TARGET_LOWER "dl_bler_target_lower" #define CONFIG_STRING_MACRLC_DL_BLER_TARGET_LOWER "dl_bler_target_lower"
#define CONFIG_STRING_MACRLC_DL_RD2_BLER_THRESHOLD "dl_rd2_bler_threshold"
#define CONFIG_STRING_MACRLC_DL_MAX_MCS "dl_max_mcs" #define CONFIG_STRING_MACRLC_DL_MAX_MCS "dl_max_mcs"
#define CONFIG_STRING_MACRLC_UL_BLER_TARGET_UPPER "ul_bler_target_upper"
#define CONFIG_STRING_MACRLC_UL_BLER_TARGET_LOWER "ul_bler_target_lower"
#define CONFIG_STRING_MACRLC_UL_MAX_MCS "ul_max_mcs"
#define CONFIG_STRING_MACRLC_DL_HARQ_ROUND_MAX "dl_harq_round_max"
#define CONFIG_STRING_MACRLC_UL_HARQ_ROUND_MAX "ul_harq_round_max"
#define CONFIG_STRING_MACRLC_MIN_GRANT_PRB "min_grant_prb"
#define CONFIG_STRING_MACRLC_MIN_GRANT_MCS "min_grant_mcs"
/*-------------------------------------------------------------------------------------------------------------------------------------------------------*/ /*-------------------------------------------------------------------------------------------------------------------------------------------------------*/
...@@ -91,12 +98,19 @@ ...@@ -91,12 +98,19 @@
{CONFIG_STRING_MACRLC_ULSCH_MAX_FRAME_INACTIVITY, NULL, 0, uptr:NULL, defintval:10, TYPE_UINT, 0}, \ {CONFIG_STRING_MACRLC_ULSCH_MAX_FRAME_INACTIVITY, NULL, 0, uptr:NULL, defintval:10, TYPE_UINT, 0}, \
{CONFIG_STRING_MACRLC_PUSCHTARGETSNRX10, NULL, 0, iptr:NULL, defintval:200, TYPE_INT, 0}, \ {CONFIG_STRING_MACRLC_PUSCHTARGETSNRX10, NULL, 0, iptr:NULL, defintval:200, TYPE_INT, 0}, \
{CONFIG_STRING_MACRLC_PUCCHTARGETSNRX10, NULL, 0, iptr:NULL, defintval:150, TYPE_INT, 0}, \ {CONFIG_STRING_MACRLC_PUCCHTARGETSNRX10, NULL, 0, iptr:NULL, defintval:150, TYPE_INT, 0}, \
{CONFIG_STRING_MACRLC_UL_PRBBLACK_SNR_THRESHOLD, "SNR threshold to decide whether a PRB will be blacklisted or not", 0, iptr:NULL, defintval:10, TYPE_INT, 0}, \
{CONFIG_STRING_MACRLC_PUCCHFAILURETHRES, NULL, 0, iptr:NULL, defintval:10, TYPE_INT, 0}, \ {CONFIG_STRING_MACRLC_PUCCHFAILURETHRES, NULL, 0, iptr:NULL, defintval:10, TYPE_INT, 0}, \
{CONFIG_STRING_MACRLC_PUSCHFAILURETHRES, NULL, 0, iptr:NULL, defintval:10, TYPE_INT, 0}, \ {CONFIG_STRING_MACRLC_PUSCHFAILURETHRES, NULL, 0, iptr:NULL, defintval:10, TYPE_INT, 0}, \
{CONFIG_STRING_MACRLC_DL_BLER_TARGET_UPPER, "Upper threshold of BLER to decrease DL MCS", 0, dblptr:NULL, defdblval:0.15, TYPE_DOUBLE, 0}, \ {CONFIG_STRING_MACRLC_DL_BLER_TARGET_UPPER, "Upper threshold of BLER to decrease DL MCS", 0, dblptr:NULL, defdblval:0.15, TYPE_DOUBLE, 0}, \
{CONFIG_STRING_MACRLC_DL_BLER_TARGET_LOWER, "Lower threshold of BLER to increase DL MCS", 0, dblptr:NULL, defdblval:0.05, TYPE_DOUBLE, 0}, \ {CONFIG_STRING_MACRLC_DL_BLER_TARGET_LOWER, "Lower threshold of BLER to increase DL MCS", 0, dblptr:NULL, defdblval:0.05, TYPE_DOUBLE, 0}, \
{CONFIG_STRING_MACRLC_DL_RD2_BLER_THRESHOLD, "Threshold of RD2/RETX2 BLER to decrease DL MCS", 0, dblptr:NULL, defdblval:0.01, TYPE_DOUBLE, 0}, \
{CONFIG_STRING_MACRLC_DL_MAX_MCS, "Maximum DL MCS that should be used", 0, u8ptr:NULL, defintval:28, TYPE_UINT8, 0}, \ {CONFIG_STRING_MACRLC_DL_MAX_MCS, "Maximum DL MCS that should be used", 0, u8ptr:NULL, defintval:28, TYPE_UINT8, 0}, \
{CONFIG_STRING_MACRLC_UL_BLER_TARGET_UPPER, "Upper threshold of BLER to decrease UL MCS", 0, dblptr:NULL, defdblval:0.15, TYPE_DOUBLE, 0}, \
{CONFIG_STRING_MACRLC_UL_BLER_TARGET_LOWER, "Lower threshold of BLER to increase UL MCS", 0, dblptr:NULL, defdblval:0.05, TYPE_DOUBLE, 0}, \
{CONFIG_STRING_MACRLC_UL_MAX_MCS, "Maximum UL MCS that should be used", 0, u8ptr:NULL, defintval:9, TYPE_UINT8, 0}, \
{CONFIG_STRING_MACRLC_DL_HARQ_ROUND_MAX, "Maximum number of DL HARQ rounds", 0, u8ptr:NULL, defintval:4, TYPE_UINT8, 0}, \
{CONFIG_STRING_MACRLC_UL_HARQ_ROUND_MAX, "Maximum number of UL HARQ rounds", 0, u8ptr:NULL, defintval:4, TYPE_UINT8, 0}, \
{CONFIG_STRING_MACRLC_MIN_GRANT_PRB, "Minimal Periodic ULSCH Grant PRBs", 0, u8ptr:NULL, defintval:5, TYPE_UINT8, 0}, \
{CONFIG_STRING_MACRLC_MIN_GRANT_MCS, "Minimal Periodic ULSCH Grant MCS", 0, u8ptr:NULL, defintval:9, TYPE_UINT8, 0}, \
} }
#define MACRLC_CC_IDX 0 #define MACRLC_CC_IDX 0
#define MACRLC_TRANSPORT_N_PREFERENCE_IDX 1 #define MACRLC_TRANSPORT_N_PREFERENCE_IDX 1
...@@ -118,12 +132,55 @@ ...@@ -118,12 +132,55 @@
#define MACRLC_ULSCH_MAX_FRAME_INACTIVITY 17 #define MACRLC_ULSCH_MAX_FRAME_INACTIVITY 17
#define MACRLC_PUSCHTARGETSNRX10_IDX 18 #define MACRLC_PUSCHTARGETSNRX10_IDX 18
#define MACRLC_PUCCHTARGETSNRX10_IDX 19 #define MACRLC_PUCCHTARGETSNRX10_IDX 19
#define MACRLC_PUCCHFAILURETHRES_IDX 20 #define MACRLC_UL_PRBBLACK_SNR_THRESHOLD_IDX 20
#define MACRLC_PUSCHFAILURETHRES_IDX 21 #define MACRLC_PUCCHFAILURETHRES_IDX 21
#define MACRLC_DL_BLER_TARGET_UPPER_IDX 22 #define MACRLC_PUSCHFAILURETHRES_IDX 22
#define MACRLC_DL_BLER_TARGET_LOWER_IDX 23 #define MACRLC_DL_BLER_TARGET_UPPER_IDX 23
#define MACRLC_DL_RD2_BLER_THRESHOLD_IDX 24 #define MACRLC_DL_BLER_TARGET_LOWER_IDX 24
#define MACRLC_DL_MAX_MCS_IDX 25 #define MACRLC_DL_MAX_MCS_IDX 25
#define MACRLC_UL_BLER_TARGET_UPPER_IDX 26
#define MACRLC_UL_BLER_TARGET_LOWER_IDX 27
#define MACRLC_UL_MAX_MCS_IDX 28
#define MACRLC_DL_HARQ_ROUND_MAX_IDX 29
#define MACRLC_UL_HARQ_ROUND_MAX_IDX 30
#define MACRLC_MIN_GRANT_PRB_IDX 31
#define MACRLC_MIN_GRANT_MCS_IDX 32
#define MACRLCPARAMS_CHECK { \
{ .s5 = { NULL } }, \
{ .s5 = { NULL } }, \
{ .s5 = { NULL } }, \
{ .s5 = { NULL } }, \
{ .s5 = { NULL } }, \
{ .s5 = { NULL } }, \
{ .s5 = { NULL } }, \
{ .s5 = { NULL } }, \
{ .s5 = { NULL } }, \
{ .s5 = { NULL } }, \
{ .s5 = { NULL } }, \
{ .s5 = { NULL } }, \
{ .s5 = { NULL } }, \
{ .s5 = { NULL } }, \
{ .s5 = { NULL } }, \
{ .s5 = { NULL } }, \
{ .s5 = { NULL } }, \
{ .s5 = { NULL } }, \
{ .s5 = { NULL } }, \
{ .s5 = { NULL } }, \
{ .s5 = { NULL } }, \
{ .s5 = { NULL } }, \
{ .s5 = { NULL } }, \
{ .s5 = { NULL } }, \
{ .s5 = { NULL } }, \
{ .s5 = { NULL } }, \
{ .s5 = { NULL } }, \
{ .s5 = { NULL } }, \
{ .s5 = { NULL } }, \
{ .s2 = { config_check_intrange, {1, 8} } }, /* DL max HARQ rounds */ \
{ .s2 = { config_check_intrange, {1, 8} } }, /* UL max HARQ rounds */ \
{ .s5 = { NULL } }, \
{ .s5 = { NULL } }, \
}
/*---------------------------------------------------------------------------------------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------------------------------------------------------------------------------------*/
#endif #endif
...@@ -132,6 +132,34 @@ ...@@ -132,6 +132,34 @@
#define GNB_CONFIG_STRING_ULPTRSMAXPORTS_0 "ul_ptrsMaxPorts_0" #define GNB_CONFIG_STRING_ULPTRSMAXPORTS_0 "ul_ptrsMaxPorts_0"
#define GNB_CONFIG_STRING_ULPTRSPOWER_0 "ul_ptrsPower_0" #define GNB_CONFIG_STRING_ULPTRSPOWER_0 "ul_ptrsPower_0"
#define GNB_CONFIG_STRING_DLBWP1_ID "dl_bwp-Id_1"
#define GNB_CONFIG_STRING_DLBWP2_ID "dl_bwp-Id_2"
#define GNB_CONFIG_STRING_DLBWP3_ID "dl_bwp-Id_3"
#define GNB_CONFIG_STRING_DLBWP4_ID "dl_bwp-Id_4"
#define GNB_CONFIG_STRING_LOCATIONANDBANDWIDTH_DLBWP1 "dl_bwp1_locationAndBandwidth"
#define GNB_CONFIG_STRING_LOCATIONANDBANDWIDTH_DLBWP2 "dl_bwp2_locationAndBandwidth"
#define GNB_CONFIG_STRING_LOCATIONANDBANDWIDTH_DLBWP3 "dl_bwp3_locationAndBandwidth"
#define GNB_CONFIG_STRING_LOCATIONANDBANDWIDTH_DLBWP4 "dl_bwp4_locationAndBandwidth"
#define GNB_CONFIG_STRING_SCS_DLBWP1 "dl_bwp1_subcarrierSpacing"
#define GNB_CONFIG_STRING_SCS_DLBWP2 "dl_bwp2_subcarrierSpacing"
#define GNB_CONFIG_STRING_SCS_DLBWP3 "dl_bwp3_subcarrierSpacing"
#define GNB_CONFIG_STRING_SCS_DLBWP4 "dl_bwp4_subcarrierSpacing"
#define GNB_CONFIG_STRING_FIRSTACTIVEDLBWP_ID "firstActiveDownlinkBWP-Id"
#define GNB_CONFIG_STRING_DEFAULTDLBWP_ID "defaultDownlinkBWP-Id"
#define GNB_CONFIG_STRING_ULBWP1_ID "ul_bwp-Id_1"
#define GNB_CONFIG_STRING_ULBWP2_ID "ul_bwp-Id_2"
#define GNB_CONFIG_STRING_ULBWP3_ID "ul_bwp-Id_3"
#define GNB_CONFIG_STRING_ULBWP4_ID "ul_bwp-Id_4"
#define GNB_CONFIG_STRING_LOCATIONANDBANDWIDTH_ULBWP1 "ul_bwp1_locationAndBandwidth"
#define GNB_CONFIG_STRING_LOCATIONANDBANDWIDTH_ULBWP2 "ul_bwp2_locationAndBandwidth"
#define GNB_CONFIG_STRING_LOCATIONANDBANDWIDTH_ULBWP3 "ul_bwp3_locationAndBandwidth"
#define GNB_CONFIG_STRING_LOCATIONANDBANDWIDTH_ULBWP4 "ul_bwp4_locationAndBandwidth"
#define GNB_CONFIG_STRING_SCS_ULBWP1 "ul_bwp1_subcarrierSpacing"
#define GNB_CONFIG_STRING_SCS_ULBWP2 "ul_bwp2_subcarrierSpacing"
#define GNB_CONFIG_STRING_SCS_ULBWP3 "ul_bwp3_subcarrierSpacing"
#define GNB_CONFIG_STRING_SCS_ULBWP4 "ul_bwp4_subcarrierSpacing"
#define GNB_CONFIG_STRING_FIRSTACTIVEULBWP_ID "firstActiveUplinkBWP-Id"
/*--------------------------------------------------------------------------------------------------------------------*/ /*--------------------------------------------------------------------------------------------------------------------*/
/* pdcch_ConfigSIB1 parameters */ /* pdcch_ConfigSIB1 parameters */
/*--------------------------------------------------------------------------------------------------------------------*/ /*--------------------------------------------------------------------------------------------------------------------*/
...@@ -240,10 +268,33 @@ ...@@ -240,10 +268,33 @@
{GNB_CONFIG_STRING_ULPTRSTIMEDENSITY2_0,NULL,0,i64ptr:scd->uplinkConfig->uplinkBWP_ToAddModList->list.array[0]->bwp_Dedicated->pusch_Config->choice.setup->dmrs_UplinkForPUSCH_MappingTypeB->choice.setup->phaseTrackingRS->choice.setup->transformPrecoderDisabled->timeDensity->list.array[2],defint64val:-1,TYPE_INT64,0}, \ {GNB_CONFIG_STRING_ULPTRSTIMEDENSITY2_0,NULL,0,i64ptr:scd->uplinkConfig->uplinkBWP_ToAddModList->list.array[0]->bwp_Dedicated->pusch_Config->choice.setup->dmrs_UplinkForPUSCH_MappingTypeB->choice.setup->phaseTrackingRS->choice.setup->transformPrecoderDisabled->timeDensity->list.array[2],defint64val:-1,TYPE_INT64,0}, \
{GNB_CONFIG_STRING_ULPTRSREOFFSET_0,NULL,0,i64ptr:scd->uplinkConfig->uplinkBWP_ToAddModList->list.array[0]->bwp_Dedicated->pusch_Config->choice.setup->dmrs_UplinkForPUSCH_MappingTypeB->choice.setup->phaseTrackingRS->choice.setup->transformPrecoderDisabled->resourceElementOffset,defint64val:-1,TYPE_INT64,0}, \ {GNB_CONFIG_STRING_ULPTRSREOFFSET_0,NULL,0,i64ptr:scd->uplinkConfig->uplinkBWP_ToAddModList->list.array[0]->bwp_Dedicated->pusch_Config->choice.setup->dmrs_UplinkForPUSCH_MappingTypeB->choice.setup->phaseTrackingRS->choice.setup->transformPrecoderDisabled->resourceElementOffset,defint64val:-1,TYPE_INT64,0}, \
{GNB_CONFIG_STRING_ULPTRSMAXPORTS_0,NULL,0,i64ptr:&scd->uplinkConfig->uplinkBWP_ToAddModList->list.array[0]->bwp_Dedicated->pusch_Config->choice.setup->dmrs_UplinkForPUSCH_MappingTypeB->choice.setup->phaseTrackingRS->choice.setup->transformPrecoderDisabled->maxNrofPorts,defint64val:0,TYPE_INT64,0}, \ {GNB_CONFIG_STRING_ULPTRSMAXPORTS_0,NULL,0,i64ptr:&scd->uplinkConfig->uplinkBWP_ToAddModList->list.array[0]->bwp_Dedicated->pusch_Config->choice.setup->dmrs_UplinkForPUSCH_MappingTypeB->choice.setup->phaseTrackingRS->choice.setup->transformPrecoderDisabled->maxNrofPorts,defint64val:0,TYPE_INT64,0}, \
{GNB_CONFIG_STRING_ULPTRSPOWER_0,NULL,0,i64ptr:&scd->uplinkConfig->uplinkBWP_ToAddModList->list.array[0]->bwp_Dedicated->pusch_Config->choice.setup->dmrs_UplinkForPUSCH_MappingTypeB->choice.setup->phaseTrackingRS->choice.setup->transformPrecoderDisabled->ptrs_Power,defint64val:0,TYPE_INT64,0}} {GNB_CONFIG_STRING_ULPTRSPOWER_0,NULL,0,i64ptr:&scd->uplinkConfig->uplinkBWP_ToAddModList->list.array[0]->bwp_Dedicated->pusch_Config->choice.setup->dmrs_UplinkForPUSCH_MappingTypeB->choice.setup->phaseTrackingRS->choice.setup->transformPrecoderDisabled->ptrs_Power,defint64val:0,TYPE_INT64,0}, \
{GNB_CONFIG_STRING_FIRSTACTIVEDLBWP_ID,NULL,0,i64ptr:scd->firstActiveDownlinkBWP_Id,defint64val:1,TYPE_INT64,0}, \
{GNB_CONFIG_STRING_FIRSTACTIVEULBWP_ID,NULL,0,i64ptr:scd->uplinkConfig->firstActiveUplinkBWP_Id,defint64val:1,TYPE_INT64,0}, \
{GNB_CONFIG_STRING_DLBWP1_ID,NULL,0,i64ptr:&scd->downlinkBWP_ToAddModList->list.array[0]->bwp_Id,defint64val:1,TYPE_INT64,0}, \
{GNB_CONFIG_STRING_DLBWP2_ID,NULL,0,i64ptr:&scd->downlinkBWP_ToAddModList->list.array[1]->bwp_Id,defint64val:2,TYPE_INT64,0}, \
{GNB_CONFIG_STRING_DLBWP3_ID,NULL,0,i64ptr:&scd->downlinkBWP_ToAddModList->list.array[2]->bwp_Id,defint64val:3,TYPE_INT64,0}, \
{GNB_CONFIG_STRING_DLBWP4_ID,NULL,0,i64ptr:&scd->downlinkBWP_ToAddModList->list.array[3]->bwp_Id,defint64val:4,TYPE_INT64,0}, \
{GNB_CONFIG_STRING_SCS_DLBWP1,NULL,0,i64ptr:&scd->downlinkBWP_ToAddModList->list.array[0]->bwp_Common->genericParameters.subcarrierSpacing,defint64val:1,TYPE_INT64,0}, \
{GNB_CONFIG_STRING_SCS_DLBWP2,NULL,0,i64ptr:&scd->downlinkBWP_ToAddModList->list.array[1]->bwp_Common->genericParameters.subcarrierSpacing,defint64val:1,TYPE_INT64,0}, \
{GNB_CONFIG_STRING_SCS_DLBWP3,NULL,0,i64ptr:&scd->downlinkBWP_ToAddModList->list.array[2]->bwp_Common->genericParameters.subcarrierSpacing,defint64val:1,TYPE_INT64,0}, \
{GNB_CONFIG_STRING_SCS_DLBWP4,NULL,0,i64ptr:&scd->downlinkBWP_ToAddModList->list.array[3]->bwp_Common->genericParameters.subcarrierSpacing,defint64val:1,TYPE_INT64,0}, \
{GNB_CONFIG_STRING_LOCATIONANDBANDWIDTH_DLBWP1,NULL,0,i64ptr:&scd->downlinkBWP_ToAddModList->list.array[0]->bwp_Common->genericParameters.locationAndBandwidth,defint64val:0,TYPE_INT64,0}, \
{GNB_CONFIG_STRING_LOCATIONANDBANDWIDTH_DLBWP2,NULL,0,i64ptr:&scd->downlinkBWP_ToAddModList->list.array[1]->bwp_Common->genericParameters.locationAndBandwidth,defint64val:0,TYPE_INT64,0}, \
{GNB_CONFIG_STRING_LOCATIONANDBANDWIDTH_DLBWP3,NULL,0,i64ptr:&scd->downlinkBWP_ToAddModList->list.array[2]->bwp_Common->genericParameters.locationAndBandwidth,defint64val:0,TYPE_INT64,0}, \
{GNB_CONFIG_STRING_LOCATIONANDBANDWIDTH_DLBWP4,NULL,0,i64ptr:&scd->downlinkBWP_ToAddModList->list.array[3]->bwp_Common->genericParameters.locationAndBandwidth,defint64val:0,TYPE_INT64,0}, \
{GNB_CONFIG_STRING_ULBWP1_ID,NULL,0,i64ptr:&scd->uplinkConfig->uplinkBWP_ToAddModList->list.array[0]->bwp_Id,defint64val:1,TYPE_INT64,0}, \
{GNB_CONFIG_STRING_ULBWP2_ID,NULL,0,i64ptr:&scd->uplinkConfig->uplinkBWP_ToAddModList->list.array[1]->bwp_Id,defint64val:2,TYPE_INT64,0}, \
{GNB_CONFIG_STRING_ULBWP3_ID,NULL,0,i64ptr:&scd->uplinkConfig->uplinkBWP_ToAddModList->list.array[2]->bwp_Id,defint64val:3,TYPE_INT64,0}, \
{GNB_CONFIG_STRING_ULBWP4_ID,NULL,0,i64ptr:&scd->uplinkConfig->uplinkBWP_ToAddModList->list.array[3]->bwp_Id,defint64val:4,TYPE_INT64,0}, \
{GNB_CONFIG_STRING_SCS_ULBWP1,NULL,0,i64ptr:&scd->uplinkConfig->uplinkBWP_ToAddModList->list.array[0]->bwp_Common->genericParameters.subcarrierSpacing,defint64val:1,TYPE_INT64,0}, \
{GNB_CONFIG_STRING_SCS_ULBWP2,NULL,0,i64ptr:&scd->uplinkConfig->uplinkBWP_ToAddModList->list.array[1]->bwp_Common->genericParameters.subcarrierSpacing,defint64val:1,TYPE_INT64,0}, \
{GNB_CONFIG_STRING_SCS_ULBWP3,NULL,0,i64ptr:&scd->uplinkConfig->uplinkBWP_ToAddModList->list.array[2]->bwp_Common->genericParameters.subcarrierSpacing,defint64val:1,TYPE_INT64,0}, \
{GNB_CONFIG_STRING_SCS_ULBWP4,NULL,0,i64ptr:&scd->uplinkConfig->uplinkBWP_ToAddModList->list.array[3]->bwp_Common->genericParameters.subcarrierSpacing,defint64val:1,TYPE_INT64,0}, \
{GNB_CONFIG_STRING_LOCATIONANDBANDWIDTH_ULBWP1,NULL,0,i64ptr:&scd->uplinkConfig->uplinkBWP_ToAddModList->list.array[0]->bwp_Common->genericParameters.locationAndBandwidth,defint64val:0,TYPE_INT64,0}, \
{GNB_CONFIG_STRING_LOCATIONANDBANDWIDTH_ULBWP2,NULL,0,i64ptr:&scd->uplinkConfig->uplinkBWP_ToAddModList->list.array[1]->bwp_Common->genericParameters.locationAndBandwidth,defint64val:0,TYPE_INT64,0}, \
{GNB_CONFIG_STRING_LOCATIONANDBANDWIDTH_ULBWP3,NULL,0,i64ptr:&scd->uplinkConfig->uplinkBWP_ToAddModList->list.array[2]->bwp_Common->genericParameters.locationAndBandwidth,defint64val:0,TYPE_INT64,0}, \
{GNB_CONFIG_STRING_LOCATIONANDBANDWIDTH_ULBWP4,NULL,0,i64ptr:&scd->uplinkConfig->uplinkBWP_ToAddModList->list.array[3]->bwp_Common->genericParameters.locationAndBandwidth,defint64val:0,TYPE_INT64,0}, \
{GNB_CONFIG_STRING_DEFAULTDLBWP_ID,NULL,0,i64ptr:scd->defaultDownlinkBWP_Id,defint64val:0,TYPE_INT64,0}}
#endif #endif
This diff is collapsed.
This diff is collapsed.
...@@ -91,7 +91,7 @@ typedef struct ru_config_s { ...@@ -91,7 +91,7 @@ typedef struct ru_config_s {
} ru_config_t; } ru_config_t;
*/ */
extern void NRRCconfig_RU(void); extern void NRRCconfig_RU(void);
extern void RCconfig_nr_flexran(void); extern void RCconfig_nr_prs(void);
extern void RCconfig_NR_L1(void); extern void RCconfig_NR_L1(void);
extern void RCconfig_nr_ssparam(void); extern void RCconfig_nr_ssparam(void);
extern void RCconfig_nr_macrlc(void); extern void RCconfig_nr_macrlc(void);
......
This diff is collapsed.
This diff is collapsed.
...@@ -51,7 +51,7 @@ typedef rlc_op_status_t (*send_rlc_data_req_func_t)(const protocol_ctxt_t *cons ...@@ -51,7 +51,7 @@ typedef rlc_op_status_t (*send_rlc_data_req_func_t)(const protocol_ctxt_t *cons
const rb_id_t, const mui_t, const rb_id_t, const mui_t,
confirm_t, sdu_size_t, mem_block_t *,const uint32_t *const, const uint32_t *const); confirm_t, sdu_size_t, mem_block_t *,const uint32_t *const, const uint32_t *const);
typedef boolean_t (pdcp_data_ind_t)( const protocol_ctxt_t *, const srb_flag_t, typedef bool (pdcp_data_ind_t)( const protocol_ctxt_t *, const srb_flag_t,
const MBMS_flag_t, const rb_id_t, const sdu_size_t, const MBMS_flag_t, const rb_id_t, const sdu_size_t,
mem_block_t *,const uint32_t *const, const uint32_t *const); mem_block_t *,const uint32_t *const, const uint32_t *const);
typedef pdcp_data_ind_t* pdcp_data_ind_func_t; typedef pdcp_data_ind_t* pdcp_data_ind_func_t;
...@@ -123,7 +123,6 @@ extern uint32_t Pdcp_stats_rx_outoforder[MAX_eNB][MAX_MOBILES_PER_ENB][NB_RB_MAX ...@@ -123,7 +123,6 @@ extern uint32_t Pdcp_stats_rx_outoforder[MAX_eNB][MAX_MOBILES_PER_ENB][NB_RB_MAX
void pdcp_update_perioidical_stats(const protocol_ctxt_t *const ctxt_pP); void pdcp_update_perioidical_stats(const protocol_ctxt_t *const ctxt_pP);
/*Packet Probing for agent PDCP*/ /*Packet Probing for agent PDCP*/
//uint64_t *pdcp_packet_counter; //uint64_t *pdcp_packet_counter;
//uint64_t *pdcp_size_packet; //uint64_t *pdcp_size_packet;
...@@ -153,14 +152,13 @@ typedef struct pdcp_stats_s { ...@@ -153,14 +152,13 @@ typedef struct pdcp_stats_s {
typedef struct pdcp_s { typedef struct pdcp_s {
//boolean_t instanciated_instance;
uint16_t header_compression_profile; uint16_t header_compression_profile;
/* SR: added this flag to distinguish UE/eNB instance as pdcp_run for virtual /* SR: added this flag to distinguish UE/eNB instance as pdcp_run for virtual
* mode can receive data on NETLINK for eNB while eNB_flag = 0 and for UE when eNB_flag = 1 * mode can receive data on NETLINK for eNB while eNB_flag = 0 and for UE when eNB_flag = 1
*/ */
boolean_t is_ue; bool is_ue;
boolean_t is_srb; bool is_srb;
/* Configured security algorithms */ /* Configured security algorithms */
uint8_t cipheringAlgorithm; uint8_t cipheringAlgorithm;
...@@ -218,7 +216,7 @@ typedef struct pdcp_s { ...@@ -218,7 +216,7 @@ typedef struct pdcp_s {
} pdcp_t; } pdcp_t;
typedef struct pdcp_mbms_s { typedef struct pdcp_mbms_s {
boolean_t instanciated_instance; bool instanciated_instance;
rb_id_t rb_id; rb_id_t rb_id;
} pdcp_mbms_t; } pdcp_mbms_t;
...@@ -231,7 +229,7 @@ typedef struct pdcp_mbms_s { ...@@ -231,7 +229,7 @@ typedef struct pdcp_mbms_s {
* under targets/TEST/PDCP/ * under targets/TEST/PDCP/
*/ */
/*! \fn boolean_t pdcp_data_req(const protocol_ctxt_t* const , srb_flag_t , rb_id_t , mui_t , confirm_t ,sdu_size_t , unsigned char* , pdcp_transmission_mode_t ) /*! \fn bool pdcp_data_req(const protocol_ctxt_t* const , srb_flag_t , rb_id_t , mui_t , confirm_t ,sdu_size_t , unsigned char* , pdcp_transmission_mode_t )
* \brief This functions handles data transfer requests coming either from RRC or from IP * \brief This functions handles data transfer requests coming either from RRC or from IP
* \param[in] ctxt_pP Running context. * \param[in] ctxt_pP Running context.
* \param[in] rab_id Radio Bearer ID * \param[in] rab_id Radio Bearer ID
...@@ -240,38 +238,34 @@ typedef struct pdcp_mbms_s { ...@@ -240,38 +238,34 @@ typedef struct pdcp_mbms_s {
* \param[in] sdu_buffer_size Size of incoming SDU in bytes * \param[in] sdu_buffer_size Size of incoming SDU in bytes
* \param[in] sdu_buffer Buffer carrying SDU * \param[in] sdu_buffer Buffer carrying SDU
* \param[in] mode flag to indicate whether the userplane data belong to the control plane or data plane or transparent * \param[in] mode flag to indicate whether the userplane data belong to the control plane or data plane or transparent
* \return TRUE on success, FALSE otherwise * \return true on success, false otherwise
* \note None * \note None
* @ingroup _pdcp * @ingroup _pdcp
*/ */
boolean_t pdcp_data_req( bool pdcp_data_req(protocol_ctxt_t *ctxt_pP,
protocol_ctxt_t *ctxt_pP, const srb_flag_t srb_flagP,
const srb_flag_t srb_flagP, const rb_id_t rb_id,
const rb_id_t rb_id, const mui_t muiP,
const mui_t muiP, const confirm_t confirmP,
const confirm_t confirmP, const sdu_size_t sdu_buffer_size,
const sdu_size_t sdu_buffer_size, unsigned char *const sdu_buffer,
unsigned char *const sdu_buffer, const pdcp_transmission_mode_t mode,
const pdcp_transmission_mode_t mode, const uint32_t * sourceL2Id,
const uint32_t * sourceL2Id, const uint32_t * destinationL2Id);
const uint32_t * destinationL2Id
); bool cu_f1u_data_req(protocol_ctxt_t *ctxt_pP,
const srb_flag_t srb_flagP,
boolean_t cu_f1u_data_req( const rb_id_t rb_id,
protocol_ctxt_t *ctxt_pP, const mui_t muiP,
const srb_flag_t srb_flagP, const confirm_t confirmP,
const rb_id_t rb_id, const sdu_size_t sdu_buffer_size,
const mui_t muiP, unsigned char *const sdu_buffer,
const confirm_t confirmP, const pdcp_transmission_mode_t mode,
const sdu_size_t sdu_buffer_size, const uint32_t *const sourceL2Id,
unsigned char *const sdu_buffer, const uint32_t *const destinationL2Id);
const pdcp_transmission_mode_t mode,
const uint32_t *const sourceL2Id, /*! \fn bool pdcp_data_ind(const protocol_ctxt_t* const, srb_flag_t, MBMS_flag_t, rb_id_t, sdu_size_t, mem_block_t*, bool)
const uint32_t *const destinationL2Id
);
/*! \fn boolean_t pdcp_data_ind(const protocol_ctxt_t* const, srb_flag_t, MBMS_flag_t, rb_id_t, sdu_size_t, mem_block_t*, boolean_t)
* \brief This functions handles data transfer indications coming from RLC * \brief This functions handles data transfer indications coming from RLC
* \param[in] ctxt_pP Running context. * \param[in] ctxt_pP Running context.
* \param[in] Shows if rb is SRB * \param[in] Shows if rb is SRB
...@@ -280,7 +274,7 @@ boolean_t cu_f1u_data_req( ...@@ -280,7 +274,7 @@ boolean_t cu_f1u_data_req(
* \param[in] sdu_buffer_size Size of incoming SDU in bytes * \param[in] sdu_buffer_size Size of incoming SDU in bytes
* \param[in] sdu_buffer Buffer carrying SDU * \param[in] sdu_buffer Buffer carrying SDU
* \param[in] is_data_plane flag to indicate whether the userplane data belong to the control plane or data plane * \param[in] is_data_plane flag to indicate whether the userplane data belong to the control plane or data plane
* \return TRUE on success, FALSE otherwise * \return TRUE on success, false otherwise
* \note None * \note None
* @ingroup _pdcp * @ingroup _pdcp
*/ */
...@@ -317,20 +311,18 @@ void rrc_pdcp_config_req ( ...@@ -317,20 +311,18 @@ void rrc_pdcp_config_req (
* \param[in] defaultDRB Default DRB ID * \param[in] defaultDRB Default DRB ID
* \return A status about the processing, OK or error code. * \return A status about the processing, OK or error code.
*/ */
boolean_t rrc_pdcp_config_asn1_req ( bool rrc_pdcp_config_asn1_req(const protocol_ctxt_t *const ctxt_pP,
const protocol_ctxt_t *const ctxt_pP, LTE_SRB_ToAddModList_t *const srb2add_list,
LTE_SRB_ToAddModList_t *const srb2add_list, LTE_DRB_ToAddModList_t *const drb2add_list,
LTE_DRB_ToAddModList_t *const drb2add_list, LTE_DRB_ToReleaseList_t *const drb2release_list,
LTE_DRB_ToReleaseList_t *const drb2release_list, const uint8_t security_modeP,
const uint8_t security_modeP, uint8_t *const kRRCenc,
uint8_t *const kRRCenc, uint8_t *const kRRCint,
uint8_t *const kRRCint, uint8_t *const kUPenc,
uint8_t *const kUPenc, LTE_PMCH_InfoList_r9_t *pmch_InfoList_r9,
LTE_PMCH_InfoList_r9_t *pmch_InfoList_r9, rb_id_t *const defaultDRB);
rb_id_t *const defaultDRB
); /*! \fn bool pdcp_config_req_asn1 (const protocol_ctxt_t* const ctxt_pP, srb_flag_t srb_flagP, uint32_t action, rb_id_t rb_id, uint8_t rb_sn, uint8_t rb_report, uint16_t header_compression_profile, uint8_t security_mode)
/*! \fn boolean_t pdcp_config_req_asn1 (const protocol_ctxt_t* const ctxt_pP, srb_flag_t srb_flagP, uint32_t action, rb_id_t rb_id, uint8_t rb_sn, uint8_t rb_report, uint16_t header_compression_profile, uint8_t security_mode)
* \brief Function for RRC to configure a Radio Bearer. * \brief Function for RRC to configure a Radio Bearer.
* \param[in] ctxt_pP Running context. * \param[in] ctxt_pP Running context.
* \param[in] pdcp_pP Pointer on PDCP structure. * \param[in] pdcp_pP Pointer on PDCP structure.
...@@ -350,22 +342,21 @@ boolean_t rrc_pdcp_config_asn1_req ( ...@@ -350,22 +342,21 @@ boolean_t rrc_pdcp_config_asn1_req (
* \param[in] kUPenc User-Plane encryption key * \param[in] kUPenc User-Plane encryption key
* \return A status about the processing, OK or error code. * \return A status about the processing, OK or error code.
*/ */
boolean_t pdcp_config_req_asn1 ( bool pdcp_config_req_asn1(const protocol_ctxt_t *const ctxt_pP,
const protocol_ctxt_t *const ctxt_pP, pdcp_t *const pdcp_pP,
pdcp_t *const pdcp_pP, const srb_flag_t srb_flagP,
const srb_flag_t srb_flagP, const rlc_mode_t rlc_mode,
const rlc_mode_t rlc_mode, const uint32_t action,
const uint32_t action, const uint16_t lc_id,
const uint16_t lc_id, const uint16_t mch_id,
const uint16_t mch_id, const rb_id_t rb_id,
const rb_id_t rb_id, const uint8_t rb_sn,
const uint8_t rb_sn, const uint8_t rb_report,
const uint8_t rb_report, const uint16_t header_compression_profile,
const uint16_t header_compression_profile, const uint8_t security_mode,
const uint8_t security_mode, uint8_t *const kRRCenc,
uint8_t *const kRRCenc, uint8_t *const kRRCint,
uint8_t *const kRRCint, uint8_t *const kUPenc);
uint8_t *const kUPenc);
/*! \fn void pdcp_add_UE(const protocol_ctxt_t* const ctxt_pP) /*! \fn void pdcp_add_UE(const protocol_ctxt_t* const ctxt_pP)
* \brief Function (for RRC) to add a new UE in PDCP module * \brief Function (for RRC) to add a new UE in PDCP module
...@@ -374,13 +365,12 @@ boolean_t pdcp_config_req_asn1 ( ...@@ -374,13 +365,12 @@ boolean_t pdcp_config_req_asn1 (
*/ */
void pdcp_add_UE(const protocol_ctxt_t *const ctxt_pP); void pdcp_add_UE(const protocol_ctxt_t *const ctxt_pP);
/*! \fn boolean_t pdcp_remove_UE(const protocol_ctxt_t* const ctxt_pP) /*! \fn bool pdcp_remove_UE(const protocol_ctxt_t* const ctxt_pP)
* \brief Function for RRC to remove UE from PDCP module hashtable * \brief Function for RRC to remove UE from PDCP module hashtable
* \param[in] ctxt_pP Running context. * \param[in] ctxt_pP Running context.
* \return A status about the processing, OK or error code. * \return A status about the processing, OK or error code.
*/ */
boolean_t pdcp_remove_UE( bool pdcp_remove_UE(const protocol_ctxt_t *const ctxt_pP);
const protocol_ctxt_t *const ctxt_pP);
/*! \fn void rrc_pdcp_config_release( const protocol_ctxt_t* const, rb_id_t) /*! \fn void rrc_pdcp_config_release( const protocol_ctxt_t* const, rb_id_t)
* \brief This functions is unused * \brief This functions is unused
......
This diff is collapsed.
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
#include "pdcp.h" #include "pdcp.h"
#include "pdcp_primitives.h" #include "pdcp_primitives.h"
extern boolean_t util_mark_nth_bit_of_octet(uint8_t* octet, uint8_t index); extern bool util_mark_nth_bit_of_octet(uint8_t* octet, uint8_t index);
/* /*
* Parses data/control field out of buffer of User Plane PDCP Data PDU with * Parses data/control field out of buffer of User Plane PDCP Data PDU with
...@@ -123,13 +123,13 @@ uint8_t pdcp_get_sequence_number_of_pdu_with_SRB_sn(unsigned char* pdu_buffer) ...@@ -123,13 +123,13 @@ uint8_t pdcp_get_sequence_number_of_pdu_with_SRB_sn(unsigned char* pdu_buffer)
* Fills the incoming buffer with the fields of the header for srb sn * Fills the incoming buffer with the fields of the header for srb sn
* *
* @param pdu_buffer PDCP PDU buffer * @param pdu_buffer PDCP PDU buffer
* @return TRUE on success, FALSE otherwise * @return true on success, false otherwise
*/ */
boolean_t pdcp_serialize_control_plane_data_pdu_with_SRB_sn_buffer(unsigned char* pdu_buffer, \ bool pdcp_serialize_control_plane_data_pdu_with_SRB_sn_buffer(unsigned char* pdu_buffer,
pdcp_control_plane_data_pdu_header* pdu) pdcp_control_plane_data_pdu_header* pdu)
{ {
if (pdu_buffer == NULL || pdu == NULL) { if (pdu_buffer == NULL || pdu == NULL) {
return FALSE; return false;
} }
/* /*
...@@ -138,20 +138,20 @@ boolean_t pdcp_serialize_control_plane_data_pdu_with_SRB_sn_buffer(unsigned char ...@@ -138,20 +138,20 @@ boolean_t pdcp_serialize_control_plane_data_pdu_with_SRB_sn_buffer(unsigned char
uint8_t sequence_number = pdu->sn; uint8_t sequence_number = pdu->sn;
pdu_buffer[0] = sequence_number & 0x1F; // 5bit sn pdu_buffer[0] = sequence_number & 0x1F; // 5bit sn
return TRUE; return true;
} }
/* /*
* Fills the incoming buffer with the fields of the header for long sn * Fills the incoming buffer with the fields of the header for long sn
* *
* @param pdu_buffer PDCP PDU buffer * @param pdu_buffer PDCP PDU buffer
* @return TRUE on success, FALSE otherwise * @return true on success, false otherwise
*/ */
boolean_t pdcp_serialize_user_plane_data_pdu_with_long_sn_buffer(unsigned char* pdu_buffer, \ bool pdcp_serialize_user_plane_data_pdu_with_long_sn_buffer(unsigned char* pdu_buffer,
pdcp_user_plane_data_pdu_header_with_long_sn* pdu) pdcp_user_plane_data_pdu_header_with_long_sn* pdu)
{ {
if (pdu_buffer == NULL || pdu == NULL) { if (pdu_buffer == NULL || pdu == NULL) {
return FALSE; return false;
} }
/* /*
...@@ -170,7 +170,7 @@ boolean_t pdcp_serialize_user_plane_data_pdu_with_long_sn_buffer(unsigned char* ...@@ -170,7 +170,7 @@ boolean_t pdcp_serialize_user_plane_data_pdu_with_long_sn_buffer(unsigned char*
pdu_buffer[0] |= 0x80; // set the first bit as 1 pdu_buffer[0] |= 0x80; // set the first bit as 1
} }
return TRUE; return true;
} }
/* /*
...@@ -178,13 +178,14 @@ boolean_t pdcp_serialize_user_plane_data_pdu_with_long_sn_buffer(unsigned char* ...@@ -178,13 +178,14 @@ boolean_t pdcp_serialize_user_plane_data_pdu_with_long_sn_buffer(unsigned char*
* *
* @param pdu_buffer The buffer that PDU will be serialized into * @param pdu_buffer The buffer that PDU will be serialized into
* @param pdu A status report header * @param pdu A status report header
* @return TRUE on success, FALSE otherwise * @return true on success, false otherwise
*/ */
boolean_t pdcp_serialize_control_pdu_for_pdcp_status_report(unsigned char* pdu_buffer, \ bool pdcp_serialize_control_pdu_for_pdcp_status_report(unsigned char* pdu_buffer,
uint8_t bitmap[512], pdcp_control_pdu_for_pdcp_status_report* pdu) uint8_t bitmap[512],
pdcp_control_pdu_for_pdcp_status_report* pdu)
{ {
if (pdu_buffer == NULL || pdu == NULL) { if (pdu_buffer == NULL || pdu == NULL) {
return FALSE; return false;
} }
/* /*
...@@ -205,6 +206,6 @@ boolean_t pdcp_serialize_control_pdu_for_pdcp_status_report(unsigned char* pdu_b ...@@ -205,6 +206,6 @@ boolean_t pdcp_serialize_control_pdu_for_pdcp_status_report(unsigned char* pdu_b
*/ */
memcpy(pdu_buffer + 2, bitmap, 512); memcpy(pdu_buffer + 2, bitmap, 512);
return TRUE; return true;
} }
...@@ -142,18 +142,18 @@ uint8_t pdcp_get_sequence_number_of_pdu_with_SRB_sn(unsigned char* pdu_buffer); ...@@ -142,18 +142,18 @@ uint8_t pdcp_get_sequence_number_of_pdu_with_SRB_sn(unsigned char* pdu_buffer);
* Fills the incoming buffer with the fields of the header for SRB1 * Fills the incoming buffer with the fields of the header for SRB1
* *
* @param pdu_buffer PDCP PDU buffer * @param pdu_buffer PDCP PDU buffer
* @return TRUE on success, FALSE otherwise * @return true on success, false otherwise
*/ */
boolean_t pdcp_serialize_control_plane_data_pdu_with_SRB_sn_buffer(unsigned char* pdu_buffer, \ bool pdcp_serialize_control_plane_data_pdu_with_SRB_sn_buffer(unsigned char* pdu_buffer,
pdcp_control_plane_data_pdu_header* pdu); pdcp_control_plane_data_pdu_header* pdu);
/* /*
* Fills the incoming buffer with the fields of the header for long SN (RLC UM and AM) * Fills the incoming buffer with the fields of the header for long SN (RLC UM and AM)
* *
* @param pdu_buffer PDCP PDU buffer * @param pdu_buffer PDCP PDU buffer
* @return TRUE on success, FALSE otherwise * @return true on success, false otherwise
*/ */
boolean_t pdcp_serialize_user_plane_data_pdu_with_long_sn_buffer(unsigned char* pdu_buffer, \ bool pdcp_serialize_user_plane_data_pdu_with_long_sn_buffer(unsigned char* pdu_buffer,
pdcp_user_plane_data_pdu_header_with_long_sn* pdu); pdcp_user_plane_data_pdu_header_with_long_sn* pdu);
/* /*
* Fills the incoming status report header with given value of bitmap * Fills the incoming status report header with given value of bitmap
...@@ -162,10 +162,11 @@ boolean_t pdcp_serialize_user_plane_data_pdu_with_long_sn_buffer(unsigned char* ...@@ -162,10 +162,11 @@ boolean_t pdcp_serialize_user_plane_data_pdu_with_long_sn_buffer(unsigned char*
* @param FMS First Missing PDCP SN * @param FMS First Missing PDCP SN
* @param bitmap Received/Missing sequence number bitmap * @param bitmap Received/Missing sequence number bitmap
* @param pdu A status report header * @param pdu A status report header
* @return TRUE on success, FALSE otherwise * @return true on success, false otherwise
*/ */
boolean_t pdcp_serialize_control_pdu_for_pdcp_status_report(unsigned char* pdu_buffer, \ bool pdcp_serialize_control_pdu_for_pdcp_status_report(unsigned char* pdu_buffer,
uint8_t bitmap[512], pdcp_control_pdu_for_pdcp_status_report* pdu); uint8_t bitmap[512],
pdcp_control_pdu_for_pdcp_status_report* pdu);
int pdcp_netlink_dequeue_element(const protocol_ctxt_t* const ctxt_pP, int pdcp_netlink_dequeue_element(const protocol_ctxt_t* const ctxt_pP,
struct pdcp_netlink_element_s **data_ppP); struct pdcp_netlink_element_s **data_ppP);
......
...@@ -127,7 +127,7 @@ pdcp_apply_security( ...@@ -127,7 +127,7 @@ pdcp_apply_security(
/* SRBs */ /* SRBs */
uint8_t *mac_i; uint8_t *mac_i;
LOG_D(PDCP, "[OSA][RB %ld] %s Applying control-plane integrity security %d \n", LOG_D(PDCP, "[OSA][RB %ld] %s Applying control-plane security %d \n",
rb_id, (pdcp_pP->is_ue != 0) ? "UE -> eNB" : "eNB -> UE", pdcp_pP->integrityProtAlgorithm); rb_id, (pdcp_pP->is_ue != 0) ? "UE -> eNB" : "eNB -> UE", pdcp_pP->integrityProtAlgorithm);
encrypt_params.message = pdcp_pdu_buffer; encrypt_params.message = pdcp_pdu_buffer;
......
...@@ -33,12 +33,12 @@ ...@@ -33,12 +33,12 @@
/* /*
* Initializes sequence numbering state * Initializes sequence numbering state
* @param pdcp_entity The PDCP entity to be initialized * @param pdcp_entity The PDCP entity to be initialized
* @return boolean_t TRUE on success, FALSE otherwise * @return bool true on success, false otherwise
*/ */
boolean_t pdcp_init_seq_numbers(pdcp_t* pdcp_entity) bool pdcp_init_seq_numbers(pdcp_t* pdcp_entity)
{ {
if (pdcp_entity == NULL) { if (pdcp_entity == NULL) {
return FALSE; return false;
} }
/* Sequence number state variables */ /* Sequence number state variables */
...@@ -55,34 +55,34 @@ boolean_t pdcp_init_seq_numbers(pdcp_t* pdcp_entity) ...@@ -55,34 +55,34 @@ boolean_t pdcp_init_seq_numbers(pdcp_t* pdcp_entity)
// Shall UE and eNB behave differently on initialization? (see 7.1.e) // Shall UE and eNB behave differently on initialization? (see 7.1.e)
pdcp_entity->last_submitted_pdcp_rx_sn = 4095; pdcp_entity->last_submitted_pdcp_rx_sn = 4095;
return TRUE; return true;
} }
boolean_t pdcp_is_seq_num_size_valid(pdcp_t* pdcp_entity) bool pdcp_is_seq_num_size_valid(pdcp_t* pdcp_entity)
{ {
if (pdcp_entity == NULL) { if (pdcp_entity == NULL) {
return FALSE; return false;
} }
// Check if the size of SN is valid (see 3GPP TS 36.323 v10.1.0 item 6.3.2) // Check if the size of SN is valid (see 3GPP TS 36.323 v10.1.0 item 6.3.2)
if (pdcp_entity->seq_num_size != 5 && pdcp_entity->seq_num_size != 7 && pdcp_entity->seq_num_size != 12) { if (pdcp_entity->seq_num_size != 5 && pdcp_entity->seq_num_size != 7 && pdcp_entity->seq_num_size != 12) {
LOG_W(PDCP, "Incoming SN size is invalid! (Expected: {5 | 7 | 12}, Received: %d\n", pdcp_entity->seq_num_size); LOG_W(PDCP, "Incoming SN size is invalid! (Expected: {5 | 7 | 12}, Received: %d\n", pdcp_entity->seq_num_size);
return FALSE; return false;
} }
return TRUE; return true;
} }
/** /**
* Check if SN number is in the range according to SN size * Check if SN number is in the range according to SN size
*/ */
boolean_t pdcp_is_seq_num_valid(uint16_t seq_num, uint8_t seq_num_size) bool pdcp_is_seq_num_valid(uint16_t seq_num, uint8_t seq_num_size)
{ {
if (seq_num >= 0 && seq_num <= pdcp_calculate_max_seq_num_for_given_size(seq_num_size)) { if (seq_num >= 0 && seq_num <= pdcp_calculate_max_seq_num_for_given_size(seq_num_size)) {
return TRUE; return true;
} }
return FALSE; return false;
} }
uint16_t pdcp_calculate_max_seq_num_for_given_size(uint8_t seq_num_size) uint16_t pdcp_calculate_max_seq_num_for_given_size(uint8_t seq_num_size)
...@@ -96,7 +96,7 @@ uint16_t pdcp_calculate_max_seq_num_for_given_size(uint8_t seq_num_size) ...@@ -96,7 +96,7 @@ uint16_t pdcp_calculate_max_seq_num_for_given_size(uint8_t seq_num_size)
uint16_t pdcp_get_next_tx_seq_number(pdcp_t* pdcp_entity) uint16_t pdcp_get_next_tx_seq_number(pdcp_t* pdcp_entity)
{ {
if (pdcp_is_seq_num_size_valid(pdcp_entity) == FALSE) { if (pdcp_is_seq_num_size_valid(pdcp_entity) == false) {
return -1; return -1;
} }
...@@ -118,10 +118,10 @@ uint16_t pdcp_get_next_tx_seq_number(pdcp_t* pdcp_entity) ...@@ -118,10 +118,10 @@ uint16_t pdcp_get_next_tx_seq_number(pdcp_t* pdcp_entity)
return pdcp_seq_num & max_seq_num; return pdcp_seq_num & max_seq_num;
} }
boolean_t pdcp_advance_rx_window(pdcp_t* pdcp_entity) bool pdcp_advance_rx_window(pdcp_t* pdcp_entity)
{ {
if (pdcp_is_seq_num_size_valid(pdcp_entity) == FALSE) { if (pdcp_is_seq_num_size_valid(pdcp_entity) == false) {
return FALSE; return false;
} }
/* /*
...@@ -137,10 +137,10 @@ boolean_t pdcp_advance_rx_window(pdcp_t* pdcp_entity) ...@@ -137,10 +137,10 @@ boolean_t pdcp_advance_rx_window(pdcp_t* pdcp_entity)
pdcp_entity->next_pdcp_rx_sn++; pdcp_entity->next_pdcp_rx_sn++;
} }
return TRUE; return true;
} }
boolean_t pdcp_mark_current_pdu_as_received(uint16_t seq_num, pdcp_t* pdcp_entity) bool pdcp_mark_current_pdu_as_received(uint16_t seq_num, pdcp_t* pdcp_entity)
{ {
/* /*
* Incoming sequence number and PDCP entity were already * Incoming sequence number and PDCP entity were already
...@@ -158,5 +158,5 @@ boolean_t pdcp_mark_current_pdu_as_received(uint16_t seq_num, pdcp_t* pdcp_entit ...@@ -158,5 +158,5 @@ boolean_t pdcp_mark_current_pdu_as_received(uint16_t seq_num, pdcp_t* pdcp_entit
LOG_D(PDCP, "Marking %d. bit of %d. octet of status bitmap\n", (seq_num % 8) + 1, octet_index); LOG_D(PDCP, "Marking %d. bit of %d. octet of status bitmap\n", (seq_num % 8) + 1, octet_index);
util_mark_nth_bit_of_octet(&pdcp_entity->missing_pdu_bitmap[octet_index], seq_num % 8); util_mark_nth_bit_of_octet(&pdcp_entity->missing_pdu_bitmap[octet_index], seq_num % 8);
util_print_binary_representation((uint8_t*)"Current state of relevant octet: ", pdcp_entity->missing_pdu_bitmap[octet_index]); util_print_binary_representation((uint8_t*)"Current state of relevant octet: ", pdcp_entity->missing_pdu_bitmap[octet_index]);
return TRUE; return true;
} }
...@@ -35,17 +35,17 @@ ...@@ -35,17 +35,17 @@
* @param pdcp_entity The PDCP entity to be initialized * @param pdcp_entity The PDCP entity to be initialized
* @return none * @return none
*/ */
boolean_t pdcp_init_seq_numbers(pdcp_t* pdcp_entity); bool pdcp_init_seq_numbers(pdcp_t* pdcp_entity);
/** /**
* Checks if incoming PDCP entitiy pointer and relevant sequence number size is valid * Checks if incoming PDCP entitiy pointer and relevant sequence number size is valid
* @return TRUE (0x01) if it is valid, FALSE (0x00) otherwise * @return true (0x01) if it is valid, false (0x00) otherwise
*/ */
boolean_t pdcp_is_seq_num_size_valid(pdcp_t* pdcp_entity); bool pdcp_is_seq_num_size_valid(pdcp_t* pdcp_entity);
/** /**
* Check if SN number is in the range according to SN size * Check if SN number is in the range according to SN size
* @return TRUE if it is valid, FALSE otherwise * @return true if it is valid, false otherwise
*/ */
boolean_t pdcp_is_seq_num_valid(uint16_t seq_num, uint8_t seq_num_size); bool pdcp_is_seq_num_valid(uint16_t seq_num, uint8_t seq_num_size);
/** /**
* Returns the maximum allowed sequence number value for given size of SN field * Returns the maximum allowed sequence number value for given size of SN field
* @return Max sequence number value * @return Max sequence number value
...@@ -58,11 +58,11 @@ uint16_t pdcp_get_next_tx_seq_number(pdcp_t* pdcp_entity); ...@@ -58,11 +58,11 @@ uint16_t pdcp_get_next_tx_seq_number(pdcp_t* pdcp_entity);
/** /**
* Advances the RX window state of given PDCP entity upon successfull receipt of a SDU * Advances the RX window state of given PDCP entity upon successfull receipt of a SDU
*/ */
boolean_t pdcp_advance_rx_window(pdcp_t* pdcp_entity); bool pdcp_advance_rx_window(pdcp_t* pdcp_entity);
/** /**
* Updates missing PDU bitmap with incoming sequence number * Updates missing PDU bitmap with incoming sequence number
* @return TRUE if successful, FALSE otherwise * @return true if successful, false otherwise
*/ */
boolean_t pdcp_mark_current_pdu_as_received(uint16_t seq_num, pdcp_t* pdcp_entity); bool pdcp_mark_current_pdu_as_received(uint16_t seq_num, pdcp_t* pdcp_entity);
#endif #endif
/*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
* except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/
/*! \file pdcp.c
* \brief pdcp interface with RLC
* \author Navid Nikaein and Lionel GAUTHIER
* \date 2009-2012
* \email navid.nikaein@eurecom.fr
* \version 1.0
*/
#define PDCP_C
#define MBMS_MULTICAST_OUT
#include "assertions.h"
#include "hashtable.h"
#include "pdcp.h"
#include "pdcp_util.h"
#include "pdcp_sequence_manager.h"
#include "LAYER2/RLC/rlc.h"
#include "LAYER2/MAC/mac_extern.h"
#include "RRC/LTE/rrc_proto.h"
#include "pdcp_primitives.h"
#include "OCG.h"
#include "OCG_extern.h"
#include "otg_rx.h"
#include "common/utils/LOG/log.h"
#include <inttypes.h>
#include "platform_constants.h"
#include "nfapi/oai_integration/vendor_ext.h"
#include "common/utils/LOG/vcd_signal_dumper.h"
#include "common/ngran_types.h"
#include "targets/COMMON/openairinterface5g_limits.h"
#include "targets/RT/USER/lte-softmodem.h"
#include "SIMULATION/ETH_TRANSPORT/proto.h"
#include "UTIL/OSA/osa_defs.h"
#include "openair2/RRC/NAS/nas_config.h"
#include "intertask_interface.h"
#include "openair3/S1AP/s1ap_eNB.h"
#include <pthread.h>
# include "gtpv1u_eNB_task.h"
#include <openair3/ocp-gtpu/gtp_itf.h>
#include "ENB_APP/enb_config.h"
int pdcp_fill_ss_pdcp_cnt (
pdcp_t *pdcp_p,
uint32_t rb_id,
ss_get_pdcp_cnt_t *pc
)
{
return 0;
}
void
pdcp_config_set_security_cipher(
pdcp_t *pdcp_pP,
uint8_t security_modeP)
//-----------------------------------------------------------------------------
{
DevAssert(pdcp_pP != NULL);
pdcp_pP->cipheringAlgorithm = security_modeP;
pdcp_pP->security_activated = 1;
}
...@@ -130,9 +130,9 @@ void util_print_binary_representation(unsigned char* message, uint8_t octet) ...@@ -130,9 +130,9 @@ void util_print_binary_representation(unsigned char* message, uint8_t octet)
* *
* @param octet 8-bit data * @param octet 8-bit data
* @param index Index of bit to be set * @param index Index of bit to be set
* @return TRUE on success, FALSE otherwise * @return true on success, false otherwise
*/ */
boolean_t util_mark_nth_bit_of_octet(uint8_t* octet, uint8_t index) bool util_mark_nth_bit_of_octet(uint8_t* octet, uint8_t index)
{ {
uint8_t mask = 0x80; uint8_t mask = 0x80;
...@@ -148,6 +148,6 @@ boolean_t util_mark_nth_bit_of_octet(uint8_t* octet, uint8_t index) ...@@ -148,6 +148,6 @@ boolean_t util_mark_nth_bit_of_octet(uint8_t* octet, uint8_t index)
*/ */
*octet |= mask; *octet |= mask;
return TRUE; return true;
} }
...@@ -66,8 +66,8 @@ void util_print_binary_representation(unsigned char* message, uint8_t octet); ...@@ -66,8 +66,8 @@ void util_print_binary_representation(unsigned char* message, uint8_t octet);
* *
* @param octet Octet * @param octet Octet
* @param index Index * @param index Index
* @return TRUE on success, FALSE otherwise * @return true on success, false otherwise
*/ */
boolean_t util_mark_nth_bit_of_octet(uint8_t* octet, uint8_t index); bool util_mark_nth_bit_of_octet(uint8_t* octet, uint8_t index);
#endif // PDCP_UTIL_H #endif // PDCP_UTIL_H
...@@ -52,7 +52,7 @@ rlc_am_get_status_pdu_buffer_occupancy( ...@@ -52,7 +52,7 @@ rlc_am_get_status_pdu_buffer_occupancy(
rlc_sn_t sn_cursor = rlc_pP->vr_r; rlc_sn_t sn_cursor = rlc_pP->vr_r;
rlc_sn_t sn_prev = rlc_pP->vr_r; rlc_sn_t sn_prev = rlc_pP->vr_r;
rlc_sn_t sn_end = rlc_pP->vr_ms; rlc_sn_t sn_end = rlc_pP->vr_ms;
boolean_t segment_loop_end = false; bool segment_loop_end = false;
if (sn_prev != sn_end) { if (sn_prev != sn_end) {
while ((RLC_AM_DIFF_SN(sn_prev,rlc_pP->vr_r) < RLC_AM_DIFF_SN(sn_end,rlc_pP->vr_r)) && (cursor_p != NULL)) { while ((RLC_AM_DIFF_SN(sn_prev,rlc_pP->vr_r) < RLC_AM_DIFF_SN(sn_end,rlc_pP->vr_r)) && (cursor_p != NULL)) {
......
...@@ -54,7 +54,7 @@ typedef struct rlc_am_entity_s { ...@@ -54,7 +54,7 @@ typedef struct rlc_am_entity_s {
rb_id_t rb_id; /*!< \brief Radio bearer identifier, for statistics and trace purpose. */ rb_id_t rb_id; /*!< \brief Radio bearer identifier, for statistics and trace purpose. */
logical_chan_id_t channel_id; /*!< \brief Transport channel identifier. */ logical_chan_id_t channel_id; /*!< \brief Transport channel identifier. */
boolean_t is_data_plane; /*!< \brief To know if the RLC belongs to a data radio bearer or a signalling radio bearer, for statistics and trace purpose. */ bool is_data_plane; /*!< \brief To know if the RLC belongs to a data radio bearer or a signalling radio bearer, for statistics and trace purpose. */
rlc_buffer_occupancy_t sdu_buffer_occupancy; /*!< \brief Number of bytes of unsegmented SDUs. */ rlc_buffer_occupancy_t sdu_buffer_occupancy; /*!< \brief Number of bytes of unsegmented SDUs. */
rlc_buffer_occupancy_t status_buffer_occupancy; /*!< \brief Number of bytes of control PDUs waiting for transmission. */ rlc_buffer_occupancy_t status_buffer_occupancy; /*!< \brief Number of bytes of control PDUs waiting for transmission. */
...@@ -76,7 +76,7 @@ typedef struct rlc_am_entity_s { ...@@ -76,7 +76,7 @@ typedef struct rlc_am_entity_s {
rlc_am_tx_data_pdu_management_t *tx_data_pdu_buffer; /*!< \brief Transmission PDU data buffer. Used also for retransmissions */ rlc_am_tx_data_pdu_management_t *tx_data_pdu_buffer; /*!< \brief Transmission PDU data buffer. Used also for retransmissions */
signed int retrans_num_pdus; /*!< \brief Number of PDUs in the retransmission buffer. */ signed int retrans_num_pdus; /*!< \brief Number of PDUs in the retransmission buffer. */
signed int retrans_num_bytes_to_retransmit; /*!< \brief Number of bytes in the retransmission buffer to be retransmitted. Only payload is taken into account */ signed int retrans_num_bytes_to_retransmit; /*!< \brief Number of bytes in the retransmission buffer to be retransmitted. Only payload is taken into account */
boolean_t force_poll; /*!< \brief force poll due to t_poll_retransmit time-out. */ bool force_poll; /*!< \brief force poll due to t_poll_retransmit time-out. */
//--------------------------------------------------------------------- //---------------------------------------------------------------------
// RX BUFFERS // RX BUFFERS
...@@ -186,8 +186,8 @@ typedef struct rlc_am_entity_s { ...@@ -186,8 +186,8 @@ typedef struct rlc_am_entity_s {
// note occupancy of other buffers is deducted from nb elements in lists // note occupancy of other buffers is deducted from nb elements in lists
rlc_buffer_occupancy_t buffer_occupancy_retransmission_buffer; /*!< \brief Number of PDUs. */ rlc_buffer_occupancy_t buffer_occupancy_retransmission_buffer; /*!< \brief Number of PDUs. */
boolean_t initialized; /*!< \brief Boolean for rlc_am_entity_t struct initialization. */ bool initialized; /*!< \brief Boolean for rlc_am_entity_t struct initialization. */
boolean_t configured; /*!< \brief Boolean for rlc_am_entity_t struct configuration. */ bool configured; /*!< \brief Boolean for rlc_am_entity_t struct configuration. */
} rlc_am_entity_t; } rlc_am_entity_t;
/** @} */ /** @} */
# endif # endif
...@@ -32,7 +32,7 @@ rlc_am_init( ...@@ -32,7 +32,7 @@ rlc_am_init(
const protocol_ctxt_t* const ctxt_pP, const protocol_ctxt_t* const ctxt_pP,
rlc_am_entity_t *const rlc_pP) rlc_am_entity_t *const rlc_pP)
{ {
if (rlc_pP->initialized == TRUE) { if (rlc_pP->initialized == true) {
LOG_D(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[AM INIT] INITIALIZATION ALREADY DONE, DOING NOTHING\n", LOG_D(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[AM INIT] INITIALIZATION ALREADY DONE, DOING NOTHING\n",
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP)); PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP));
} else { } else {
...@@ -79,7 +79,7 @@ rlc_am_init( ...@@ -79,7 +79,7 @@ rlc_am_init(
rlc_pP->last_absolute_subframe_status_indication = 0xFFFFFFFF; // any value > 1 rlc_pP->last_absolute_subframe_status_indication = 0xFFFFFFFF; // any value > 1
rlc_pP->initialized = TRUE; rlc_pP->initialized = true;
} }
} }
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
...@@ -134,7 +134,7 @@ rlc_am_reestablish( ...@@ -134,7 +134,7 @@ rlc_am_reestablish(
rlc_pP->last_absolute_subframe_status_indication = 0xFFFFFFFF; // any value > 1 rlc_pP->last_absolute_subframe_status_indication = 0xFFFFFFFF; // any value > 1
rlc_pP->initialized = TRUE; rlc_pP->initialized = true;
} }
...@@ -197,7 +197,7 @@ rlc_am_configure( ...@@ -197,7 +197,7 @@ rlc_am_configure(
const uint32_t t_reorderingP, const uint32_t t_reorderingP,
const uint32_t t_status_prohibitP) const uint32_t t_status_prohibitP)
{ {
if (rlc_pP->configured == TRUE) { if (rlc_pP->configured == true) {
LOG_I(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[RECONFIGURE] max_retx_threshold %d poll_pdu %d poll_byte %d t_poll_retransmit %d t_reordering %d t_status_prohibit %d\n", LOG_I(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[RECONFIGURE] max_retx_threshold %d poll_pdu %d poll_byte %d t_poll_retransmit %d t_reordering %d t_status_prohibit %d\n",
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP), PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),
max_retx_thresholdP, max_retx_thresholdP,
...@@ -235,7 +235,7 @@ rlc_am_configure( ...@@ -235,7 +235,7 @@ rlc_am_configure(
rlc_am_init_timer_reordering (ctxt_pP, rlc_pP, t_reorderingP); rlc_am_init_timer_reordering (ctxt_pP, rlc_pP, t_reorderingP);
rlc_am_init_timer_status_prohibit(ctxt_pP, rlc_pP, t_status_prohibitP); rlc_am_init_timer_status_prohibit(ctxt_pP, rlc_pP, t_status_prohibitP);
rlc_pP->configured = TRUE; rlc_pP->configured = true;
} }
} }
......
...@@ -183,12 +183,10 @@ rlc_am_send_sdu ( ...@@ -183,12 +183,10 @@ rlc_am_send_sdu (
} }
} }
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
void void rlc_am_reassemble_pdu(const protocol_ctxt_t *const ctxt_pP,
rlc_am_reassemble_pdu( rlc_am_entity_t *const rlc_pP,
const protocol_ctxt_t *const ctxt_pP, mem_block_t *const tb_pP,
rlc_am_entity_t *const rlc_pP, bool free_rlc_pdu) {
mem_block_t *const tb_pP,
boolean_t free_rlc_pdu) {
int i,j; int i,j;
rlc_am_pdu_info_t *pdu_info = &((rlc_am_rx_pdu_management_t *)(tb_pP->data))->pdu_info; rlc_am_pdu_info_t *pdu_info = &((rlc_am_rx_pdu_management_t *)(tb_pP->data))->pdu_info;
LOG_D(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[REASSEMBLY PDU] TRY REASSEMBLY PDU SN=%03d\n", LOG_D(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[REASSEMBLY PDU] TRY REASSEMBLY PDU SN=%03d\n",
......
...@@ -57,14 +57,14 @@ void rlc_am_reassembly (const protocol_ctxt_t* const ctxtP, rlc_am_entity_t * ...@@ -57,14 +57,14 @@ void rlc_am_reassembly (const protocol_ctxt_t* const ctxtP, rlc_am_entity_t *
*/ */
void rlc_am_send_sdu (const protocol_ctxt_t* const ctxtP, rlc_am_entity_t * const rlc_pP); void rlc_am_send_sdu (const protocol_ctxt_t* const ctxtP, rlc_am_entity_t * const rlc_pP);
/*! \fn void rlc_am_reassemble_pdu(const protocol_ctxt_t* const ctxtP, rlc_am_entity_t * const rlc_pP, const mem_block_t* const tb_pP,boolean_t free_rlc_pdu) /*! \fn void rlc_am_reassemble_pdu(const protocol_ctxt_t* const ctxtP, rlc_am_entity_t * const rlc_pP, const mem_block_t* const tb_pP, bool free_rlc_pdu)
* \brief Reassembly a RLC AM PDU, depending of the content of this PDU, data will be reassemblied to the current output SDU, the current will be sent to higher layers or not, after or before the reassembly, or no send of SDU will be triggered, depending on FI field in PDU header. * \brief Reassembly a RLC AM PDU, depending of the content of this PDU, data will be reassemblied to the current output SDU, the current will be sent to higher layers or not, after or before the reassembly, or no send of SDU will be triggered, depending on FI field in PDU header.
* \param[in] ctxtP Running context. * \param[in] ctxtP Running context.
* \param[in] rlc_pP RLC AM protocol instance pointer. * \param[in] rlc_pP RLC AM protocol instance pointer.
* \param[in] tb_pP RLC AM PDU embedded in a mem_block_t. * \param[in] tb_pP RLC AM PDU embedded in a mem_block_t.
* \param[in] free_rlc_pdu Flag for freeing RLC AM PDU after reassembly. * \param[in] free_rlc_pdu Flag for freeing RLC AM PDU after reassembly.
*/ */
void rlc_am_reassemble_pdu(const protocol_ctxt_t* const ctxtP, rlc_am_entity_t * const rlc_pP, mem_block_t* const tb_pP,boolean_t free_rlc_pdu); void rlc_am_reassemble_pdu(const protocol_ctxt_t* const ctxtP, rlc_am_entity_t * const rlc_pP, mem_block_t* const tb_pP, bool free_rlc_pdu);
/** @} */ /** @} */
#endif #endif
...@@ -328,7 +328,7 @@ rlc_am_receive_process_data_pdu ( ...@@ -328,7 +328,7 @@ rlc_am_receive_process_data_pdu (
rlc_am_pdu_info_t* pdu_info_p = &((rlc_am_rx_pdu_management_t*)(tb_pP->data))->pdu_info; rlc_am_pdu_info_t* pdu_info_p = &((rlc_am_rx_pdu_management_t*)(tb_pP->data))->pdu_info;
rlc_am_pdu_sn_10_t* rlc_am_pdu_sn_10_p = (rlc_am_pdu_sn_10_t*)first_byte_pP; rlc_am_pdu_sn_10_t* rlc_am_pdu_sn_10_p = (rlc_am_pdu_sn_10_t*)first_byte_pP;
rlc_am_rx_pdu_status_t pdu_status = RLC_AM_DATA_PDU_STATUS_OK; rlc_am_rx_pdu_status_t pdu_status = RLC_AM_DATA_PDU_STATUS_OK;
boolean_t reassemble = false; bool reassemble = false;
if (rlc_am_get_data_pdu_infos(ctxt_pP,rlc_pP, rlc_am_pdu_sn_10_p, tb_size_in_bytesP, pdu_info_p) >= 0) { if (rlc_am_get_data_pdu_infos(ctxt_pP,rlc_pP, rlc_am_pdu_sn_10_p, tb_size_in_bytesP, pdu_info_p) >= 0) {
......
...@@ -29,13 +29,12 @@ ...@@ -29,13 +29,12 @@
#include "LAYER2/MAC/mac_extern.h" #include "LAYER2/MAC/mac_extern.h"
#include "common/utils/LOG/log.h" #include "common/utils/LOG/log.h"
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
boolean_t rlc_am_nack_pdu ( bool rlc_am_nack_pdu(const protocol_ctxt_t* const ctxt_pP,
const protocol_ctxt_t* const ctxt_pP, rlc_am_entity_t *const rlc_pP,
rlc_am_entity_t *const rlc_pP, const rlc_sn_t snP,
const rlc_sn_t snP, const rlc_sn_t prev_nack_snP,
const rlc_sn_t prev_nack_snP, sdu_size_t so_startP,
sdu_size_t so_startP, sdu_size_t so_endP)
sdu_size_t so_endP)
{ {
// 5.2.1 Retransmission // 5.2.1 Retransmission
// ... // ...
...@@ -54,8 +53,8 @@ boolean_t rlc_am_nack_pdu ( ...@@ -54,8 +53,8 @@ boolean_t rlc_am_nack_pdu (
rlc_am_tx_data_pdu_management_t *tx_data_pdu_buffer_p = &rlc_pP->tx_data_pdu_buffer[snP % RLC_AM_WINDOW_SIZE]; rlc_am_tx_data_pdu_management_t *tx_data_pdu_buffer_p = &rlc_pP->tx_data_pdu_buffer[snP % RLC_AM_WINDOW_SIZE];
//int pdu_sdu_index; //int pdu_sdu_index;
//int sdu_index; //int sdu_index;
boolean_t status = TRUE; bool status = true;
boolean_t retx_count_increment = FALSE; bool retx_count_increment = false;
sdu_size_t pdu_data_to_retx = 0; sdu_size_t pdu_data_to_retx = 0;
if (mb_p != NULL) { if (mb_p != NULL) {
...@@ -63,7 +62,7 @@ boolean_t rlc_am_nack_pdu ( ...@@ -63,7 +62,7 @@ boolean_t rlc_am_nack_pdu (
if(so_startP > so_endP) { if(so_startP > so_endP) {
LOG_E(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[NACK-PDU] ERROR NACK MISSING PDU, so_startP %d, so_endP %d\n", LOG_E(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[NACK-PDU] ERROR NACK MISSING PDU, so_startP %d, so_endP %d\n",
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),so_startP, so_endP); PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),so_startP, so_endP);
status = FALSE; status = false;
} }
// Handle full PDU NACK first // Handle full PDU NACK first
else if ((so_startP == 0) && (so_endP == 0x7FFF)) { else if ((so_startP == 0) && (so_endP == 0x7FFF)) {
...@@ -71,9 +70,7 @@ boolean_t rlc_am_nack_pdu ( ...@@ -71,9 +70,7 @@ boolean_t rlc_am_nack_pdu (
pdu_data_to_retx = tx_data_pdu_buffer_p->payload_size; pdu_data_to_retx = tx_data_pdu_buffer_p->payload_size;
/* Increment VtReTxNext if this is the first NACK or if some segments have already been transmitted */ /* Increment VtReTxNext if this is the first NACK or if some segments have already been transmitted */
if ((tx_data_pdu_buffer_p->flags.retransmit == 0) || (tx_data_pdu_buffer_p->nack_so_start)) if ((tx_data_pdu_buffer_p->flags.retransmit == 0) || (tx_data_pdu_buffer_p->nack_so_start))
{ retx_count_increment = true;
retx_count_increment = TRUE;
}
tx_data_pdu_buffer_p->nack_so_start = 0; tx_data_pdu_buffer_p->nack_so_start = 0;
tx_data_pdu_buffer_p->num_holes = 0; tx_data_pdu_buffer_p->num_holes = 0;
...@@ -89,11 +86,11 @@ boolean_t rlc_am_nack_pdu ( ...@@ -89,11 +86,11 @@ boolean_t rlc_am_nack_pdu (
if(tx_data_pdu_buffer_p->nack_so_start >= tx_data_pdu_buffer_p->payload_size){ if(tx_data_pdu_buffer_p->nack_so_start >= tx_data_pdu_buffer_p->payload_size){
LOG_E(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[NACK-PDU] ERROR NACK MISSING PDU, nack_so_start %d, payload_size %d\n", LOG_E(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[NACK-PDU] ERROR NACK MISSING PDU, nack_so_start %d, payload_size %d\n",
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),tx_data_pdu_buffer_p->nack_so_start, tx_data_pdu_buffer_p->payload_size); PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),tx_data_pdu_buffer_p->nack_so_start, tx_data_pdu_buffer_p->payload_size);
status = FALSE; status = false;
} }
} }
else { else {
status = FALSE; status = false;
} }
} }
else if (tx_data_pdu_buffer_p->flags.max_retransmit == 0) { else if (tx_data_pdu_buffer_p->flags.max_retransmit == 0) {
...@@ -107,9 +104,8 @@ boolean_t rlc_am_nack_pdu ( ...@@ -107,9 +104,8 @@ boolean_t rlc_am_nack_pdu (
if (prev_nack_snP != snP) { if (prev_nack_snP != snP) {
/* New NACK_SN with SO */ /* New NACK_SN with SO */
/* check whether a new segment is to be placed in Retransmission Buffer, then increment vrReTx */ /* check whether a new segment is to be placed in Retransmission Buffer, then increment vrReTx */
if ((tx_data_pdu_buffer_p->flags.retransmit == 0) || (so_startP < tx_data_pdu_buffer_p->nack_so_start)) { if ((tx_data_pdu_buffer_p->flags.retransmit == 0) || (so_startP < tx_data_pdu_buffer_p->nack_so_start))
retx_count_increment = TRUE; retx_count_increment = true;
}
tx_data_pdu_buffer_p->num_holes = 1; tx_data_pdu_buffer_p->num_holes = 1;
tx_data_pdu_buffer_p->retx_hole_index = 0; tx_data_pdu_buffer_p->retx_hole_index = 0;
...@@ -129,21 +125,18 @@ boolean_t rlc_am_nack_pdu ( ...@@ -129,21 +125,18 @@ boolean_t rlc_am_nack_pdu (
tx_data_pdu_buffer_p->nack_so_stop = so_endP; tx_data_pdu_buffer_p->nack_so_stop = so_endP;
tx_data_pdu_buffer_p->num_holes ++; tx_data_pdu_buffer_p->num_holes ++;
pdu_data_to_retx = so_endP - so_startP + 1; pdu_data_to_retx = so_endP - so_startP + 1;
} else {
status = false;
} }
else { } else {
status = FALSE; status = false;
}
}
else {
status = FALSE;
} }
} }
else { else {
status = FALSE; status = false;
} }
} } else {
else { status = false;
status = FALSE;
} }
if (status) { if (status) {
...@@ -175,17 +168,16 @@ boolean_t rlc_am_nack_pdu ( ...@@ -175,17 +168,16 @@ boolean_t rlc_am_nack_pdu (
LOG_D(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[NACK-PDU] ERROR NACK MISSING PDU SN %05d\n", LOG_D(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[NACK-PDU] ERROR NACK MISSING PDU SN %05d\n",
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP), PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),
snP); snP);
status = FALSE; status = false;
} }
return status; return status;
} }
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
void rlc_am_ack_pdu ( void rlc_am_ack_pdu(const protocol_ctxt_t* const ctxt_pP,
const protocol_ctxt_t* const ctxt_pP, rlc_am_entity_t *const rlc_pP,
rlc_am_entity_t *const rlc_pP, const rlc_sn_t snP,
const rlc_sn_t snP, bool free_pdu)
boolean_t free_pdu)
{ {
mem_block_t* mb_p = rlc_pP->tx_data_pdu_buffer[snP % RLC_AM_WINDOW_SIZE].mem_block; mem_block_t* mb_p = rlc_pP->tx_data_pdu_buffer[snP % RLC_AM_WINDOW_SIZE].mem_block;
rlc_am_tx_data_pdu_management_t *tx_data_pdu_buffer = &rlc_pP->tx_data_pdu_buffer[snP % RLC_AM_WINDOW_SIZE]; rlc_am_tx_data_pdu_management_t *tx_data_pdu_buffer = &rlc_pP->tx_data_pdu_buffer[snP % RLC_AM_WINDOW_SIZE];
...@@ -283,7 +275,7 @@ mem_block_t* rlc_am_retransmit_get_am_segment( ...@@ -283,7 +275,7 @@ mem_block_t* rlc_am_retransmit_get_am_segment(
sdu_size_t retx_so_start,retx_so_stop; //starting and ending SO for retransmission in this PDU sdu_size_t retx_so_start,retx_so_stop; //starting and ending SO for retransmission in this PDU
rlc_sn_t sn = pdu_mngt->sn; rlc_sn_t sn = pdu_mngt->sn;
uint16_t header_so_part; uint16_t header_so_part;
boolean_t fi_start, fi_end; bool fi_start, fi_end;
uint8_t sdu_index = 0; uint8_t sdu_index = 0;
uint8_t sdu_segment_index = 0; uint8_t sdu_segment_index = 0;
uint8_t num_LIs_pdu_segment = pdu_mngt->nb_sdus - 1; uint8_t num_LIs_pdu_segment = pdu_mngt->nb_sdus - 1;
...@@ -377,11 +369,11 @@ mem_block_t* rlc_am_retransmit_get_am_segment( ...@@ -377,11 +369,11 @@ mem_block_t* rlc_am_retransmit_get_am_segment(
/* Set FI part to false if SO Start and SO End are different from PDU boundaries */ /* Set FI part to false if SO Start and SO End are different from PDU boundaries */
if (retx_so_start) if (retx_so_start)
{ {
fi_start = FALSE; fi_start = false;
} }
if (retx_so_stop < pdu_mngt->payload_size - 1) if (retx_so_stop < pdu_mngt->payload_size - 1)
{ {
fi_end = FALSE; fi_end = false;
} }
/* Header content is filled at the end */ /* Header content is filled at the end */
...@@ -423,7 +415,7 @@ mem_block_t* rlc_am_retransmit_get_am_segment( ...@@ -423,7 +415,7 @@ mem_block_t* rlc_am_retransmit_get_am_segment(
else else
{ {
/* if retx_so_start is still not included then set data_size with full original PDU data size */ /* if retx_so_start is still not included then set data_size with full original PDU data size */
/* Set fi_start to FALSE in this case */ /* Set fi_start to false in this case */
data_size = pdu_mngt->payload_size; data_size = pdu_mngt->payload_size;
} }
sdu_index ++; sdu_index ++;
...@@ -432,7 +424,7 @@ mem_block_t* rlc_am_retransmit_get_am_segment( ...@@ -432,7 +424,7 @@ mem_block_t* rlc_am_retransmit_get_am_segment(
if (retx_so_start == data_size) if (retx_so_start == data_size)
{ {
/* Set FI Start if retx_so_start = cumulated data size */ /* Set FI Start if retx_so_start = cumulated data size */
fi_start = TRUE; fi_start = true;
/* there must be at least one SDU more */ /* there must be at least one SDU more */
//Assertion(eNB)_PRAN_DesignDocument_annex No.778 //Assertion(eNB)_PRAN_DesignDocument_annex No.778
if(sdu_index >= pdu_mngt->nb_sdus) if(sdu_index >= pdu_mngt->nb_sdus)
...@@ -464,8 +456,8 @@ mem_block_t* rlc_am_retransmit_get_am_segment( ...@@ -464,8 +456,8 @@ mem_block_t* rlc_am_retransmit_get_am_segment(
} }
else if (retx_so_start != 0) else if (retx_so_start != 0)
{ {
/* in all other cases set fi_start to FALSE if it SO Start is not 0 */ /* in all other cases set fi_start to false if it SO Start is not 0 */
fi_start = FALSE; fi_start = false;
} }
/* Set first SDU portion of the segment */ /* Set first SDU portion of the segment */
...@@ -582,10 +574,10 @@ mem_block_t* rlc_am_retransmit_get_am_segment( ...@@ -582,10 +574,10 @@ mem_block_t* rlc_am_retransmit_get_am_segment(
"RLC AM Tx PDU Segment Data Error: retx_so_stop=%d OriginalPDUDataLength=%d SOStart=%d SegmentLength=%d numLISegment=%d numLIPDU=%d sn=%d LcId=%d !\n", "RLC AM Tx PDU Segment Data Error: retx_so_stop=%d OriginalPDUDataLength=%d SOStart=%d SegmentLength=%d numLISegment=%d numLIPDU=%d sn=%d LcId=%d !\n",
retx_so_stop,pdu_mngt->payload_size,retx_so_start,*payload_sizeP,num_LIs_pdu_segment,pdu_mngt->nb_sdus - 1,sn,rlc_pP->channel_id); retx_so_stop,pdu_mngt->payload_size,retx_so_start,*payload_sizeP,num_LIs_pdu_segment,pdu_mngt->nb_sdus - 1,sn,rlc_pP->channel_id);
*/ */
/* init FI End to FALSE if retx_so_stop is not end of PDU */ /* init FI End to false if retx_so_stop is not end of PDU */
if (retx_so_stop != pdu_mngt->payload_size - 1) if (retx_so_stop != pdu_mngt->payload_size - 1)
{ {
fi_end = FALSE; fi_end = false;
} }
/* Check consistency between sdus_segment_size and payload_sizeP */ /* Check consistency between sdus_segment_size and payload_sizeP */
...@@ -596,7 +588,7 @@ mem_block_t* rlc_am_retransmit_get_am_segment( ...@@ -596,7 +588,7 @@ mem_block_t* rlc_am_retransmit_get_am_segment(
data_size += sdus_segment_size[i]; data_size += sdus_segment_size[i];
if ((retx_so_stop == data_size - 1) && (i < num_LIs_pdu_segment)) if ((retx_so_stop == data_size - 1) && (i < num_LIs_pdu_segment))
{ {
fi_end = TRUE; fi_end = true;
} }
} }
//Assertion(eNB)_PRAN_DesignDocument_annex No.782 //Assertion(eNB)_PRAN_DesignDocument_annex No.782
...@@ -665,7 +657,7 @@ mem_block_t* rlc_am_retransmit_get_am_segment( ...@@ -665,7 +657,7 @@ mem_block_t* rlc_am_retransmit_get_am_segment(
pdu_mngt->nack_so_start = pdu_mngt->hole_so_start[pdu_mngt->retx_hole_index]; pdu_mngt->nack_so_start = pdu_mngt->hole_so_start[pdu_mngt->retx_hole_index];
} }
/* Content is supposed to be init with 0 so with FIStart=FIEnd=TRUE */ /* Content is supposed to be init with 0 so with FIStart=FIEnd=true */
RLC_AM_PDU_SET_D_C(*pdu_segment_header_p); RLC_AM_PDU_SET_D_C(*pdu_segment_header_p);
RLC_AM_PDU_SET_RF(*pdu_segment_header_p); RLC_AM_PDU_SET_RF(*pdu_segment_header_p);
/* Change FI */ /* Change FI */
......
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
# ifndef __RLC_AM_RETRANSMIT_H__ # ifndef __RLC_AM_RETRANSMIT_H__
# define __RLC_AM_RETRANSMIT_H__ # define __RLC_AM_RETRANSMIT_H__
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
/*! \fn boolean_t rlc_am_nack_pdu (const protocol_ctxt_t* const ctxt_pP, rlc_am_entity_t *rlcP, int16_t snP, int16_t prev_nack_snP,sdu_size_t so_startP, sdu_size_t so_endP) /*! \fn bool rlc_am_nack_pdu (const protocol_ctxt_t* const ctxt_pP, rlc_am_entity_t *rlcP, int16_t snP, int16_t prev_nack_snP,sdu_size_t so_startP, sdu_size_t so_endP)
* \brief The RLC AM PDU which have the sequence number snP is marked NACKed with segment offset fields. * \brief The RLC AM PDU which have the sequence number snP is marked NACKed with segment offset fields.
* \param[in] ctxtP Running context. * \param[in] ctxtP Running context.
* \param[in] rlcP RLC AM protocol instance pointer. * \param[in] rlcP RLC AM protocol instance pointer.
...@@ -46,13 +46,12 @@ ...@@ -46,13 +46,12 @@
* \return OK/KO * \return OK/KO
* \note It may appear a new hole in the retransmission buffer depending on the segment offset informations. Depending on the state of the retransmission buffer, negative confirmation can be sent to higher layers about the drop by the RLC AM instance of a particular SDU. * \note It may appear a new hole in the retransmission buffer depending on the segment offset informations. Depending on the state of the retransmission buffer, negative confirmation can be sent to higher layers about the drop by the RLC AM instance of a particular SDU.
*/ */
boolean_t rlc_am_nack_pdu ( bool rlc_am_nack_pdu(const protocol_ctxt_t* const ctxt_pP,
const protocol_ctxt_t* const ctxt_pP, rlc_am_entity_t *const rlcP,
rlc_am_entity_t *const rlcP, const rlc_sn_t snP,
const rlc_sn_t snP, const rlc_sn_t prev_nack_snP,
const rlc_sn_t prev_nack_snP, sdu_size_t so_startP,
sdu_size_t so_startP, sdu_size_t so_endP);
sdu_size_t so_endP);
/*! \fn void rlc_am_ack_pdu (const protocol_ctxt_t* const ctxt_pP,rlc_am_entity_t *rlcP, rlc_sn_t snP) /*! \fn void rlc_am_ack_pdu (const protocol_ctxt_t* const ctxt_pP,rlc_am_entity_t *rlcP, rlc_sn_t snP)
* \brief The RLC AM PDU which have the sequence number snP is marked ACKed. * \brief The RLC AM PDU which have the sequence number snP is marked ACKed.
...@@ -62,11 +61,10 @@ boolean_t rlc_am_nack_pdu ( ...@@ -62,11 +61,10 @@ boolean_t rlc_am_nack_pdu (
* \param[in] free_pdu Boolean indicating that the PDU can be freed because smaller than new vtA. * \param[in] free_pdu Boolean indicating that the PDU can be freed because smaller than new vtA.
* \note Depending on the state of the retransmission buffer, positive confirmation can be sent to higher layers about the receiving by the peer RLC AM instance of a particular SDU. * \note Depending on the state of the retransmission buffer, positive confirmation can be sent to higher layers about the receiving by the peer RLC AM instance of a particular SDU.
*/ */
void rlc_am_ack_pdu ( void rlc_am_ack_pdu(const protocol_ctxt_t* const ctxt_pP,
const protocol_ctxt_t* const ctxt_pP, rlc_am_entity_t *const rlcP,
rlc_am_entity_t *const rlcP, const rlc_sn_t snP,
const rlc_sn_t snP, bool free_pdu);
boolean_t free_pdu);
/*! \fn mem_block_t* rlc_am_retransmit_get_copy (const protocol_ctxt_t* const ctxt_pP, rlc_am_entity_t *rlcP, rlc_sn_t snP) /*! \fn mem_block_t* rlc_am_retransmit_get_copy (const protocol_ctxt_t* const ctxt_pP, rlc_am_entity_t *rlcP, rlc_sn_t snP)
* \brief The RLC AM PDU which have the sequence number snP is marked ACKed. * \brief The RLC AM PDU which have the sequence number snP is marked ACKed.
......
...@@ -31,14 +31,13 @@ ...@@ -31,14 +31,13 @@
#include "common/utils/LOG/log.h" #include "common/utils/LOG/log.h"
boolean_t rlc_am_rx_check_vr_reassemble( bool rlc_am_rx_check_vr_reassemble(const protocol_ctxt_t* const ctxt_pP,
const protocol_ctxt_t* const ctxt_pP, const rlc_am_entity_t* const rlc_pP)
const rlc_am_entity_t* const rlc_pP)
{ {
mem_block_t* cursor_p = rlc_pP->receiver_buffer.head; mem_block_t* cursor_p = rlc_pP->receiver_buffer.head;
rlc_am_rx_pdu_management_t * pdu_cursor_mgnt_p = NULL; rlc_am_rx_pdu_management_t * pdu_cursor_mgnt_p = NULL;
sdu_size_t next_waited_so = 0; sdu_size_t next_waited_so = 0;
boolean_t reassemble = FALSE; bool reassemble = false;
if (cursor_p != NULL) { if (cursor_p != NULL) {
...@@ -48,7 +47,7 @@ boolean_t rlc_am_rx_check_vr_reassemble( ...@@ -48,7 +47,7 @@ boolean_t rlc_am_rx_check_vr_reassemble(
if (sn_ref != rlc_pP->vr_r) { if (sn_ref != rlc_pP->vr_r) {
/* Case vrR has advanced from head : most likely case */ /* Case vrR has advanced from head : most likely case */
reassemble = TRUE; reassemble = true;
/* Handle first SN if it is made of PDU segments : set them all to be reassembled */ /* Handle first SN if it is made of PDU segments : set them all to be reassembled */
if (pdu_info_p->rf) { if (pdu_info_p->rf) {
pdu_cursor_mgnt_p = (rlc_am_rx_pdu_management_t *) (cursor_p->data); pdu_cursor_mgnt_p = (rlc_am_rx_pdu_management_t *) (cursor_p->data);
...@@ -58,7 +57,7 @@ boolean_t rlc_am_rx_check_vr_reassemble( ...@@ -58,7 +57,7 @@ boolean_t rlc_am_rx_check_vr_reassemble(
{ {
LOG_E(RLC, "AM Rx Check Reassembly head SN=%d with PDU segments != vrR=%d should be fully received LCID=%d\n", LOG_E(RLC, "AM Rx Check Reassembly head SN=%d with PDU segments != vrR=%d should be fully received LCID=%d\n",
sn_ref,rlc_pP->vr_r,rlc_pP->channel_id); sn_ref,rlc_pP->vr_r,rlc_pP->channel_id);
return FALSE; return false;
} }
/* /*
AssertFatal(pdu_cursor_mgnt_p->all_segments_received > 0,"AM Rx Check Reassembly head SN=%d with PDU segments != vrR=%d should be fully received LCID=%d\n", AssertFatal(pdu_cursor_mgnt_p->all_segments_received > 0,"AM Rx Check Reassembly head SN=%d with PDU segments != vrR=%d should be fully received LCID=%d\n",
...@@ -94,7 +93,7 @@ boolean_t rlc_am_rx_check_vr_reassemble( ...@@ -94,7 +93,7 @@ boolean_t rlc_am_rx_check_vr_reassemble(
{ {
LOG_E(RLC, "AM Rx Check Reassembly vr=%d should be partly received SNHead=%d LCID=%d\n", LOG_E(RLC, "AM Rx Check Reassembly vr=%d should be partly received SNHead=%d LCID=%d\n",
rlc_pP->vr_r,sn_ref,rlc_pP->channel_id); rlc_pP->vr_r,sn_ref,rlc_pP->channel_id);
return FALSE; return false;
} }
/* /*
AssertFatal(pdu_cursor_mgnt_p->all_segments_received == 0,"AM Rx Check Reassembly vr=%d should be partly received SNHead=%d LCID=%d\n", AssertFatal(pdu_cursor_mgnt_p->all_segments_received == 0,"AM Rx Check Reassembly vr=%d should be partly received SNHead=%d LCID=%d\n",
...@@ -123,7 +122,7 @@ boolean_t rlc_am_rx_check_vr_reassemble( ...@@ -123,7 +122,7 @@ boolean_t rlc_am_rx_check_vr_reassemble(
{ {
LOG_E(RLC, "AM Rx Check Reassembly SNHead=vr=%d should be partly received LCID=%d\n", LOG_E(RLC, "AM Rx Check Reassembly SNHead=vr=%d should be partly received LCID=%d\n",
rlc_pP->vr_r,rlc_pP->channel_id); rlc_pP->vr_r,rlc_pP->channel_id);
return FALSE; return false;
} }
/* /*
AssertFatal(pdu_cursor_mgnt_p->all_segments_received == 0,"AM Rx Check Reassembly SNHead=vr=%d should be partly received LCID=%d\n", AssertFatal(pdu_cursor_mgnt_p->all_segments_received == 0,"AM Rx Check Reassembly SNHead=vr=%d should be partly received LCID=%d\n",
...@@ -132,7 +131,7 @@ boolean_t rlc_am_rx_check_vr_reassemble( ...@@ -132,7 +131,7 @@ boolean_t rlc_am_rx_check_vr_reassemble(
while ((cursor_p != NULL) && (pdu_info_p->sn == rlc_pP->vr_r) && (pdu_info_p->so == next_waited_so)) { while ((cursor_p != NULL) && (pdu_info_p->sn == rlc_pP->vr_r) && (pdu_info_p->so == next_waited_so)) {
if (pdu_cursor_mgnt_p->segment_reassembled == RLC_AM_RX_PDU_SEGMENT_REASSEMBLE_NO) { if (pdu_cursor_mgnt_p->segment_reassembled == RLC_AM_RX_PDU_SEGMENT_REASSEMBLE_NO) {
pdu_cursor_mgnt_p->segment_reassembled = RLC_AM_RX_PDU_SEGMENT_REASSEMBLE_PENDING; pdu_cursor_mgnt_p->segment_reassembled = RLC_AM_RX_PDU_SEGMENT_REASSEMBLE_PENDING;
reassemble = TRUE; reassemble = true;
} }
next_waited_so += pdu_info_p->payload_size; next_waited_so += pdu_info_p->payload_size;
cursor_p = cursor_p->next; cursor_p = cursor_p->next;
...@@ -157,7 +156,7 @@ mem_block_t * create_new_segment_from_pdu( ...@@ -157,7 +156,7 @@ mem_block_t * create_new_segment_from_pdu(
int16_t new_li_list[RLC_AM_MAX_SDU_IN_PDU]; int16_t new_li_list[RLC_AM_MAX_SDU_IN_PDU];
int16_t header_size = 0; int16_t header_size = 0;
uint8_t num_li = 0; uint8_t num_li = 0;
boolean_t fi_start, fi_end, lsf; bool fi_start, fi_end, lsf;
/* Init some PDU Segment header fixed parameters */ /* Init some PDU Segment header fixed parameters */
fi_start = !((pdu_rx_info_p->fi & 0x2) >> 1); fi_start = !((pdu_rx_info_p->fi & 0x2) >> 1);
...@@ -170,11 +169,11 @@ mem_block_t * create_new_segment_from_pdu( ...@@ -170,11 +169,11 @@ mem_block_t * create_new_segment_from_pdu(
header_size = RLC_AM_PDU_SEGMENT_HEADER_MIN_SIZE; header_size = RLC_AM_PDU_SEGMENT_HEADER_MIN_SIZE;
if (so_offset) { if (so_offset) {
fi_start = FALSE; fi_start = false;
} }
if (so_offset + data_length_to_copy != pdu_rx_info_p->payload_size) { if (so_offset + data_length_to_copy != pdu_rx_info_p->payload_size) {
fi_end = FALSE; fi_end = false;
lsf = FALSE; lsf = false;
} }
} // end no LI in original segment } // end no LI in original segment
else { else {
...@@ -185,7 +184,7 @@ mem_block_t * create_new_segment_from_pdu( ...@@ -185,7 +184,7 @@ mem_block_t * create_new_segment_from_pdu(
/* set LSF to false if we know that end of the original segment will not be copied */ /* set LSF to false if we know that end of the original segment will not be copied */
if (so_offset + data_length_to_copy != pdu_rx_info_p->payload_size) { if (so_offset + data_length_to_copy != pdu_rx_info_p->payload_size) {
lsf = FALSE; lsf = false;
} }
/* catch the first LI containing so_offset */ /* catch the first LI containing so_offset */
...@@ -223,7 +222,7 @@ mem_block_t * create_new_segment_from_pdu( ...@@ -223,7 +222,7 @@ mem_block_t * create_new_segment_from_pdu(
num_li = j; num_li = j;
/* set FI End if remaining size = 0 */ /* set FI End if remaining size = 0 */
if (remaining_size == 0) { if (remaining_size == 0) {
fi_end = TRUE; fi_end = true;
} }
} }
} }
...@@ -263,7 +262,7 @@ mem_block_t * create_new_segment_from_pdu( ...@@ -263,7 +262,7 @@ mem_block_t * create_new_segment_from_pdu(
} }
/* Fill Header part in the buffer */ /* Fill Header part in the buffer */
/* Content is supposed to be init with 0 so with FIStart=FIEnd=TRUE */ /* Content is supposed to be init with 0 so with FIStart=FIEnd=true */
/* copy first two bytes from original: D/C + RF + FI + E+ SN*/ /* copy first two bytes from original: D/C + RF + FI + E+ SN*/
memset(pdu_segment_header_p, 0, header_size); memset(pdu_segment_header_p, 0, header_size);
RLC_AM_PDU_SET_D_C(*pdu_segment_header_p); RLC_AM_PDU_SET_D_C(*pdu_segment_header_p);
...@@ -1106,7 +1105,7 @@ rlc_am_rx_list_reassemble_rlc_sdus( ...@@ -1106,7 +1105,7 @@ rlc_am_rx_list_reassemble_rlc_sdus(
do { do {
if (rlc_am_rx_pdu_management_p->all_segments_received > 0) { if (rlc_am_rx_pdu_management_p->all_segments_received > 0) {
cursor_p = list2_remove_head(&rlc_pP->receiver_buffer); cursor_p = list2_remove_head(&rlc_pP->receiver_buffer);
rlc_am_reassemble_pdu(ctxt_pP, rlc_pP, cursor_p,TRUE); rlc_am_reassemble_pdu(ctxt_pP, rlc_pP, cursor_p, true);
rlc_am_rx_old_pdu_management = rlc_am_rx_pdu_management_p; rlc_am_rx_old_pdu_management = rlc_am_rx_pdu_management_p;
cursor_p = list2_get_head(&rlc_pP->receiver_buffer); cursor_p = list2_get_head(&rlc_pP->receiver_buffer);
...@@ -1123,7 +1122,7 @@ rlc_am_rx_list_reassemble_rlc_sdus( ...@@ -1123,7 +1122,7 @@ rlc_am_rx_list_reassemble_rlc_sdus(
else if (rlc_am_rx_pdu_management_p->segment_reassembled == RLC_AM_RX_PDU_SEGMENT_REASSEMBLE_PENDING) { else if (rlc_am_rx_pdu_management_p->segment_reassembled == RLC_AM_RX_PDU_SEGMENT_REASSEMBLE_PENDING) {
rlc_am_rx_pdu_management_p->segment_reassembled = RLC_AM_RX_PDU_SEGMENT_REASSEMBLED; rlc_am_rx_pdu_management_p->segment_reassembled = RLC_AM_RX_PDU_SEGMENT_REASSEMBLED;
rlc_am_reassemble_pdu(ctxt_pP, rlc_pP, cursor_p,FALSE); rlc_am_reassemble_pdu(ctxt_pP, rlc_pP, cursor_p, false);
rlc_am_rx_old_pdu_management = rlc_am_rx_pdu_management_p; rlc_am_rx_old_pdu_management = rlc_am_rx_pdu_management_p;
cursor_p = cursor_p->next; cursor_p = cursor_p->next;
......
...@@ -61,13 +61,13 @@ rlc_am_rx_pdu_status_t rlc_am_rx_list_check_duplicate_insert_pdu(const protocol_ ...@@ -61,13 +61,13 @@ rlc_am_rx_pdu_status_t rlc_am_rx_list_check_duplicate_insert_pdu(const protocol_
*/ */
signed int rlc_am_rx_list_insert_pdu(const protocol_ctxt_t* const ctxt_pP, rlc_am_entity_t* const rlcP, mem_block_t* const tbP); signed int rlc_am_rx_list_insert_pdu(const protocol_ctxt_t* const ctxt_pP, rlc_am_entity_t* const rlcP, mem_block_t* const tbP);
/*! \fn boolean_t rlc_am_rx_check_vr_reassemble(const protocol_ctxt_t* const ctxt_pP,const rlc_am_entity_t* const rlc_pP) /*! \fn bool rlc_am_rx_check_vr_reassemble(const protocol_ctxt_t* const ctxt_pP,const rlc_am_entity_t* const rlc_pP)
* \brief Check if reassembly taking into account potential new vrR value * \brief Check if reassembly taking into account potential new vrR value
* \param[in] ctxt_pP Running context. * \param[in] ctxt_pP Running context.
* \param[in] rlcP RLC AM protocol instance pointer. * \param[in] rlcP RLC AM protocol instance pointer.
* \return TRUE if reassembly must be done, FALSE else * \return true if reassembly must be done, false else
*/ */
boolean_t rlc_am_rx_check_vr_reassemble(const protocol_ctxt_t* const ctxt_pP,const rlc_am_entity_t* const rlc_pP); bool rlc_am_rx_check_vr_reassemble(const protocol_ctxt_t* const ctxt_pP,const rlc_am_entity_t* const rlc_pP);
/*! \fn void rlc_am_rx_check_all_byte_segments(const protocol_ctxt_t* const ctxt_pP, rlc_am_entity_t* const rlcP, mem_block_t* const tbP) /*! \fn void rlc_am_rx_check_all_byte_segments(const protocol_ctxt_t* const ctxt_pP, rlc_am_entity_t* const rlcP, mem_block_t* const tbP)
* \brief Check if all sub-segments of a PDU are received, if yes then call rlc_am_rx_mark_all_segments_received() procedure. * \brief Check if all sub-segments of a PDU are received, if yes then call rlc_am_rx_mark_all_segments_received() procedure.
......
...@@ -32,12 +32,11 @@ ...@@ -32,12 +32,11 @@
#include "common/utils/LOG/log.h" #include "common/utils/LOG/log.h"
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
void rlc_am_pdu_polling ( void rlc_am_pdu_polling(const protocol_ctxt_t* const ctxt_pP,
const protocol_ctxt_t* const ctxt_pP, rlc_am_entity_t *const rlc_pP,
rlc_am_entity_t *const rlc_pP, rlc_am_pdu_sn_10_t *const pdu_pP,
rlc_am_pdu_sn_10_t *const pdu_pP, const int16_t payload_sizeP,
const int16_t payload_sizeP, bool is_new_pdu)
boolean_t is_new_pdu)
{ {
// 5.2.2 Polling // 5.2.2 Polling
// An AM RLC entity can poll its peer AM RLC entity in order to trigger STATUS reporting at the peer AM RLC entity. // An AM RLC entity can poll its peer AM RLC entity in order to trigger STATUS reporting at the peer AM RLC entity.
......
...@@ -36,14 +36,14 @@ ...@@ -36,14 +36,14 @@
# define __RLC_AM_SEGMENT_H__ # define __RLC_AM_SEGMENT_H__
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
/*! \fn void rlc_am_pdu_polling (const protocol_ctxt_t* const ctxt_pP, rlc_am_entity_t *const rlcP, rlc_am_pdu_sn_10_t *pduP, int16_t payload_sizeP,boolean_t is_new_pdu) /*! \fn void rlc_am_pdu_polling (const protocol_ctxt_t* const ctxt_pP, rlc_am_entity_t *const rlcP, rlc_am_pdu_sn_10_t *pduP, int16_t payload_sizeP, bool is_new_pdu)
* \brief Set or not the poll bit in the PDU header depending on RLC AM protocol variables. * \brief Set or not the poll bit in the PDU header depending on RLC AM protocol variables.
* \param[in] ctxt_pP Running context. * \param[in] ctxt_pP Running context.
* \param[in] rlcP RLC AM protocol instance pointer. * \param[in] rlcP RLC AM protocol instance pointer.
* \param[in] pduP Pointer on the header of the PDU in order to be able to set the poll bit if necessary. * \param[in] pduP Pointer on the header of the PDU in order to be able to set the poll bit if necessary.
* \param[in] payload_sizeP Size of the payload of the PDU. * \param[in] payload_sizeP Size of the payload of the PDU.
*/ */
void rlc_am_pdu_polling (const protocol_ctxt_t* const ctxt_pP, rlc_am_entity_t *const rlcP, rlc_am_pdu_sn_10_t *pduP, int16_t payload_sizeP,boolean_t is_new_pdu); void rlc_am_pdu_polling (const protocol_ctxt_t* const ctxt_pP, rlc_am_entity_t *const rlcP, rlc_am_pdu_sn_10_t *pduP, int16_t payload_sizeP, bool is_new_pdu);
/*! \fn void rlc_am_segment_10 (const protocol_ctxt_t* const ctxt_pP, rlc_am_entity_t * const rlcP) /*! \fn void rlc_am_segment_10 (const protocol_ctxt_t* const ctxt_pP, rlc_am_entity_t * const rlcP)
* \brief Segment a PDU with 10 bits sequence number, based on segmentation information given by MAC (size to transmit). * \brief Segment a PDU with 10 bits sequence number, based on segmentation information given by MAC (size to transmit).
......
...@@ -237,7 +237,7 @@ rlc_am_receive_process_control_pdu( ...@@ -237,7 +237,7 @@ rlc_am_receive_process_control_pdu(
rlc_sn_t nack_sn,prev_nack_sn; rlc_sn_t nack_sn,prev_nack_sn;
sdu_size_t data_cnf_so_stop = 0x7FFF; sdu_size_t data_cnf_so_stop = 0x7FFF;
unsigned int nack_index; unsigned int nack_index;
boolean_t status = TRUE; bool status = true;
if (rlc_am_get_control_pdu_infos(rlc_am_pdu_sn_10_p, tb_size_in_bytes_pP, &rlc_pP->control_pdu_info) >= 0) { if (rlc_am_get_control_pdu_infos(rlc_am_pdu_sn_10_p, tb_size_in_bytes_pP, &rlc_pP->control_pdu_info) >= 0) {
rlc_am_tx_buffer_display(ctxt_pP, rlc_pP, " TX BUFFER BEFORE PROCESS OF STATUS PDU"); rlc_am_tx_buffer_display(ctxt_pP, rlc_pP, " TX BUFFER BEFORE PROCESS OF STATUS PDU");
...@@ -282,7 +282,7 @@ rlc_am_receive_process_control_pdu( ...@@ -282,7 +282,7 @@ rlc_am_receive_process_control_pdu(
if (RLC_AM_DIFF_SN(rlc_pP->vt_s,rlc_pP->vt_a) >= RLC_AM_DIFF_SN(ack_sn,rlc_pP->vt_a)) { if (RLC_AM_DIFF_SN(rlc_pP->vt_s,rlc_pP->vt_a) >= RLC_AM_DIFF_SN(ack_sn,rlc_pP->vt_a)) {
if (rlc_pP->control_pdu_info.num_nack == 0) { if (rlc_pP->control_pdu_info.num_nack == 0) {
while (sn_cursor != ack_sn) { while (sn_cursor != ack_sn) {
rlc_am_ack_pdu(ctxt_pP, rlc_pP, sn_cursor,TRUE); rlc_am_ack_pdu(ctxt_pP, rlc_pP, sn_cursor, true);
sn_cursor = RLC_AM_NEXT_SN(sn_cursor); sn_cursor = RLC_AM_NEXT_SN(sn_cursor);
} }
...@@ -294,7 +294,7 @@ rlc_am_receive_process_control_pdu( ...@@ -294,7 +294,7 @@ rlc_am_receive_process_control_pdu(
prev_nack_sn = 0x3FFF; prev_nack_sn = 0x3FFF;
while (sn_cursor != nack_sn) { while (sn_cursor != nack_sn) {
rlc_am_ack_pdu(ctxt_pP, rlc_pP, sn_cursor,TRUE); rlc_am_ack_pdu(ctxt_pP, rlc_pP, sn_cursor, true);
sn_cursor = RLC_AM_NEXT_SN(sn_cursor); sn_cursor = RLC_AM_NEXT_SN(sn_cursor);
} }
...@@ -316,7 +316,7 @@ rlc_am_receive_process_control_pdu( ...@@ -316,7 +316,7 @@ rlc_am_receive_process_control_pdu(
rlc_am_ack_pdu(ctxt_pP, rlc_am_ack_pdu(ctxt_pP,
rlc_pP, rlc_pP,
sn_cursor, sn_cursor,
FALSE); false);
} else { } else {
status = rlc_am_nack_pdu (ctxt_pP, status = rlc_am_nack_pdu (ctxt_pP,
rlc_pP, rlc_pP,
...@@ -348,13 +348,13 @@ rlc_am_receive_process_control_pdu( ...@@ -348,13 +348,13 @@ rlc_am_receive_process_control_pdu(
LOG_E(RLC, PROTOCOL_RLC_AM_CTXT_FMT" WARNING CONTROL PDU ACK SN %d OUT OF WINDOW vtA=%d vtS=%d\n", LOG_E(RLC, PROTOCOL_RLC_AM_CTXT_FMT" WARNING CONTROL PDU ACK SN %d OUT OF WINDOW vtA=%d vtS=%d\n",
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),ack_sn,rlc_pP->vt_a,rlc_pP->vt_s); PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),ack_sn,rlc_pP->vt_a,rlc_pP->vt_s);
*tb_size_in_bytes_pP = 0; *tb_size_in_bytes_pP = 0;
status = FALSE; status = false;
} }
} else { } else {
LOG_E(RLC, PROTOCOL_RLC_AM_CTXT_FMT" ERROR IN DECODING CONTROL PDU\n", LOG_E(RLC, PROTOCOL_RLC_AM_CTXT_FMT" ERROR IN DECODING CONTROL PDU\n",
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP)); PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP));
*tb_size_in_bytes_pP = 0; *tb_size_in_bytes_pP = 0;
status = FALSE; status = false;
} }
if (status) { if (status) {
...@@ -480,8 +480,8 @@ rlc_am_send_status_pdu( ...@@ -480,8 +480,8 @@ rlc_am_send_status_pdu(
int waited_so = 0; int waited_so = 0;
mem_block_t *tb_p = NULL; mem_block_t *tb_p = NULL;
sdu_size_t pdu_size = 0; sdu_size_t pdu_size = 0;
boolean_t status_report_completed = false; bool status_report_completed = false;
boolean_t segment_loop_end = false; bool segment_loop_end = false;
memset(&control_pdu_info, 0, sizeof(rlc_am_control_pdu_info_t)); memset(&control_pdu_info, 0, sizeof(rlc_am_control_pdu_info_t));
LOG_D(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[SEND-STATUS] nb_bits_to_transmit %d (15 already allocated for header)\n", LOG_D(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[SEND-STATUS] nb_bits_to_transmit %d (15 already allocated for header)\n",
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP), PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),
......
...@@ -1170,7 +1170,7 @@ void rlc_am_v9_3_0_test(void) ...@@ -1170,7 +1170,7 @@ void rlc_am_v9_3_0_test(void)
{ {
// initscr(); // initscr();
// cbreak(); // cbreak();
// keypad(stdscr, TRUE); // keypad(stdscr, true);
// under test // under test
pool_buffer_init(); pool_buffer_init();
set_comp_log(RLC, LOG_ERR, LOG_MED, 1); set_comp_log(RLC, LOG_ERR, LOG_MED, 1);
......
...@@ -111,7 +111,7 @@ rlc_am_check_timer_poll_retransmit( ...@@ -111,7 +111,7 @@ rlc_am_check_timer_poll_retransmit(
} }
rlc_pP->force_poll= TRUE; rlc_pP->force_poll = true;
//BugFix : new ms_time_out is computed when next poll is transmitter //BugFix : new ms_time_out is computed when next poll is transmitter
} }
} }
......
...@@ -31,13 +31,11 @@ ...@@ -31,13 +31,11 @@
#include "list.h" #include "list.h"
#include "LAYER2/MAC/mac_extern.h" #include "LAYER2/MAC/mac_extern.h"
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
void void rlc_tm_send_sdu(const protocol_ctxt_t* const ctxt_pP,
rlc_tm_send_sdu ( rlc_tm_entity_t * const rlc_pP,
const protocol_ctxt_t* const ctxt_pP, const bool error_indicationP,
rlc_tm_entity_t * const rlc_pP, uint8_t * const srcP,
const boolean_t error_indicationP, const sdu_size_t length_in_bitsP)
uint8_t * const srcP,
const sdu_size_t length_in_bitsP)
{ {
int length_in_bytes; int length_in_bytes;
#if DEBUG_RLC_TM_DISPLAY_ASCII_DATA #if DEBUG_RLC_TM_DISPLAY_ASCII_DATA
......
...@@ -51,7 +51,7 @@ ...@@ -51,7 +51,7 @@
/*! \fn void rlc_tm_send_sdu ( /*! \fn void rlc_tm_send_sdu (
* const protocol_ctxt_t* const ctxt_pP, * const protocol_ctxt_t* const ctxt_pP,
* rlc_tm_entity_t * const rlc_pP, * rlc_tm_entity_t * const rlc_pP,
* const boolean_t error_indicationP, * const bool error_indicationP,
* uint8_t * const srcP, * uint8_t * const srcP,
* const sdu_size_t length_in_bitsP) * const sdu_size_t length_in_bitsP)
* \brief Send SDU if any reassemblied to upper layer. * \brief Send SDU if any reassemblied to upper layer.
...@@ -60,12 +60,11 @@ ...@@ -60,12 +60,11 @@
* \param[in] srcP SDU data pointer. * \param[in] srcP SDU data pointer.
* \param[in] length_in_bitsP Length of SDU in bits. * \param[in] length_in_bitsP Length of SDU in bits.
*/ */
void rlc_tm_send_sdu ( void rlc_tm_send_sdu(const protocol_ctxt_t* const ctxt_pP,
const protocol_ctxt_t* const ctxt_pP, rlc_tm_entity_t * const rlc_pP,
rlc_tm_entity_t * const rlc_pP, const bool error_indicationP,
const boolean_t error_indicationP, uint8_t * const srcP,
uint8_t * const srcP, const sdu_size_t length_in_bitsP);
const sdu_size_t length_in_bitsP);
/*! \fn void rlc_tm_no_segment (const protocol_ctxt_t* const ctxt_pP, rlc_tm_entity_t * const rlcP) /*! \fn void rlc_tm_no_segment (const protocol_ctxt_t* const ctxt_pP, rlc_tm_entity_t * const rlcP)
* \brief Schedule a SDU to be transmited by lower layers. * \brief Schedule a SDU to be transmited by lower layers.
......
...@@ -40,14 +40,13 @@ ...@@ -40,14 +40,13 @@
* \brief Structure containing a RLC TM instance protocol variables, allocation variables, buffers and other miscellaneous variables. * \brief Structure containing a RLC TM instance protocol variables, allocation variables, buffers and other miscellaneous variables.
*/ */
typedef struct rlc_tm_entity { typedef struct rlc_tm_entity {
boolean_t allocation; /*!< \brief Boolean for rlc_tm_entity_t struct allocation. */ bool allocation; /*!< \brief Boolean for rlc_tm_entity_t struct allocation. */
rlc_protocol_state_t protocol_state; /*!< \brief Protocol state, can be RLC_NULL_STATE, RLC_DATA_TRANSFER_READY_STATE, RLC_LOCAL_SUSPEND_STATE. */ rlc_protocol_state_t protocol_state; /*!< \brief Protocol state, can be RLC_NULL_STATE, RLC_DATA_TRANSFER_READY_STATE, RLC_LOCAL_SUSPEND_STATE. */
boolean_t is_uplink_downlink; /*!< \brief Is this instance is a transmitter, a receiver or both? */ bool is_uplink_downlink; /*!< \brief Is this instance is a transmitter, a receiver or both? */
boolean_t is_data_plane; /*!< \brief To know if the RLC belongs to a data radio bearer or a signalling radio bearer, for statistics and trace purpose. */ bool is_data_plane; /*!< \brief To know if the RLC belongs to a data radio bearer or a signalling radio bearer, for statistics and trace purpose. */
// for stats and trace purpose : // for stats and trace purpose :
logical_chan_id_t channel_id; /*!< \brief Transport channel identifier. */ logical_chan_id_t channel_id; /*!< \brief Transport channel identifier. */
rb_id_t rb_id; /*!< \brief Radio bearer identifier, for statistics and trace purpose. */ rb_id_t rb_id; /*!< \brief Radio bearer identifier, for statistics and trace purpose. */
//boolean_t is_enb; /*!< \brief To know if the RLC belongs to a eNB or UE. */
//----------------------------- //-----------------------------
// tranmission // tranmission
//----------------------------- //-----------------------------
......
...@@ -133,10 +133,9 @@ rlc_tm_cleanup ( ...@@ -133,10 +133,9 @@ rlc_tm_cleanup (
} }
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
void rlc_tm_configure( void rlc_tm_configure(const protocol_ctxt_t* const ctxt_pP,
const protocol_ctxt_t* const ctxt_pP, rlc_tm_entity_t * const rlcP,
rlc_tm_entity_t * const rlcP, const bool is_uplink_downlinkP)
const boolean_t is_uplink_downlinkP)
{ {
rlcP->is_uplink_downlink = is_uplink_downlinkP; rlcP->is_uplink_downlink = is_uplink_downlinkP;
rlc_tm_reset_state_variables (ctxt_pP, rlcP); rlc_tm_reset_state_variables (ctxt_pP, rlcP);
......
...@@ -78,27 +78,24 @@ void rlc_tm_init ( ...@@ -78,27 +78,24 @@ void rlc_tm_init (
* \brief Reset protocol variables and state variables to initial values. * \brief Reset protocol variables and state variables to initial values.
* \param[in] rlcP RLC TM protocol instance pointer. * \param[in] rlcP RLC TM protocol instance pointer.
*/ */
void rlc_tm_reset_state_variables ( void rlc_tm_reset_state_variables(const protocol_ctxt_t* const ctxt_pP,
const protocol_ctxt_t* const ctxt_pP, rlc_tm_entity_t * const rlcP);
rlc_tm_entity_t * const rlcP);
/*! \fn void rlc_tm_cleanup(rlc_tm_entity_t * const rlcP) /*! \fn void rlc_tm_cleanup(rlc_tm_entity_t * const rlcP)
* \brief Free all allocated memory (lists and buffers) previously allocated by this RLC TM instance. * \brief Free all allocated memory (lists and buffers) previously allocated by this RLC TM instance.
* \param[in] rlcP RLC TM protocol instance pointer. * \param[in] rlcP RLC TM protocol instance pointer.
*/ */
void rlc_tm_cleanup( void rlc_tm_cleanup(rlc_tm_entity_t * const rlcP);
rlc_tm_entity_t * const rlcP);
/*! \fn void rlc_tm_configure(const protocol_ctxt_t* const ctxt_pP,rlc_tm_entity_t * const rlcP, const boolean_t is_uplink_downlinkP) /*! \fn void rlc_tm_configure(const protocol_ctxt_t* const ctxt_pP,rlc_tm_entity_t * const rlcP, const bool is_uplink_downlinkP)
* \brief Configure RLC TM protocol parameters. * \brief Configure RLC TM protocol parameters.
* \param[in] rlcP RLC TM protocol instance pointer. * \param[in] rlcP RLC TM protocol instance pointer.
* \param[in] is_uplink_downlinkP Is this instance is TRANSMITTER_ONLY, * \param[in] is_uplink_downlinkP Is this instance is TRANSMITTER_ONLY,
RECEIVER_ONLY, or TRANSMITTER_AND_RECEIVER. RECEIVER_ONLY, or TRANSMITTER_AND_RECEIVER.
*/ */
void rlc_tm_configure( void rlc_tm_configure(const protocol_ctxt_t* const ctxt_pP,
const protocol_ctxt_t* const ctxt_pP, rlc_tm_entity_t * const rlcP,
rlc_tm_entity_t * const rlcP, const bool is_uplink_downlinkP);
const boolean_t is_uplink_downlinkP);
/*! \fn void rlc_tm_set_debug_infos(const protocol_ctxt_t* const ctxt_pP, rlc_tm_entity_t * const rlcP, const rb_id_t rb_idP, const srb_flag_t srb_flagP) /*! \fn void rlc_tm_set_debug_infos(const protocol_ctxt_t* const ctxt_pP, rlc_tm_entity_t * const rlcP, const rb_id_t rb_idP, const srb_flag_t srb_flagP)
* \brief Set debug informations for a RLC TM protocol instance, these informations are only for trace purpose. * \brief Set debug informations for a RLC TM protocol instance, these informations are only for trace purpose.
......
...@@ -263,7 +263,7 @@ rlc_um_init ( ...@@ -263,7 +263,7 @@ rlc_um_init (
} }
rlc_pP->first_pdu = 1; rlc_pP->first_pdu = 1;
rlc_pP->initialized = TRUE; rlc_pP->initialized = true;
} }
} }
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
......
...@@ -53,12 +53,11 @@ typedef struct rlc_um_timer_s { ...@@ -53,12 +53,11 @@ typedef struct rlc_um_timer_s {
*/ */
typedef struct rlc_um_entity_s { typedef struct rlc_um_entity_s {
boolean_t initialized; /*!< \brief Boolean for rlc_am_entity_t struct initialization. */ bool initialized; /*!< \brief Boolean for rlc_am_entity_t struct initialization. */
boolean_t is_uplink_downlink; /*!< \brief Is this instance is a transmitter, a receiver or both? */ bool is_uplink_downlink; /*!< \brief Is this instance is a transmitter, a receiver or both? */
rlc_protocol_state_t protocol_state; /*!< \brief Protocol state, can be RLC_NULL_STATE, RLC_DATA_TRANSFER_READY_STATE, RLC_LOCAL_SUSPEND_STATE. */ rlc_protocol_state_t protocol_state; /*!< \brief Protocol state, can be RLC_NULL_STATE, RLC_DATA_TRANSFER_READY_STATE, RLC_LOCAL_SUSPEND_STATE. */
boolean_t is_data_plane; /*!< \brief To know if the RLC belongs to a data radio bearer or a signalling radio bearer, for statistics and trace purpose. */ bool is_data_plane; /*!< \brief To know if the RLC belongs to a data radio bearer or a signalling radio bearer, for statistics and trace purpose. */
//boolean_t is_enb; /*!< \brief To know if the RLC belongs to a eNB or UE. */ bool is_mxch; /*!< \brief To know if the RLC belongs to a MBMS bearer. */
boolean_t is_mxch; /*!< \brief To know if the RLC belongs to a MBMS bearer. */
//----------------------------- //-----------------------------
// PROTOCOL VARIABLES // PROTOCOL VARIABLES
//----------------------------- //-----------------------------
...@@ -114,7 +113,7 @@ typedef struct rlc_um_entity_s { ...@@ -114,7 +113,7 @@ typedef struct rlc_um_entity_s {
//----------------------------- //-----------------------------
// STATISTICS // STATISTICS
//----------------------------- //-----------------------------
boolean_t first_pdu; /*!< \brief Act as a boolean, tells if the next PDU is the first PDU to be received. */ bool first_pdu; /*!< \brief Act as a boolean, tells if the next PDU is the first PDU to be received. */
unsigned int stat_tx_pdcp_sdu; /*!< \brief Number of SDUs received from upper layers. */ unsigned int stat_tx_pdcp_sdu; /*!< \brief Number of SDUs received from upper layers. */
unsigned int stat_tx_pdcp_bytes; /*!< \brief Number of SDU bytes received from upper layers. */ unsigned int stat_tx_pdcp_bytes; /*!< \brief Number of SDU bytes received from upper layers. */
......
...@@ -364,9 +364,6 @@ rlc_um_segment_10 (const protocol_ctxt_t* const ctxt_pP, rlc_um_entity_t *rlc_pP ...@@ -364,9 +364,6 @@ rlc_um_segment_10 (const protocol_ctxt_t* const ctxt_pP, rlc_um_entity_t *rlc_pP
sdu_mngt_p->sdu_remaining_size, sdu_mngt_p->sdu_remaining_size,
pdu_remaining_size - sdu_mngt_p->sdu_remaining_size); pdu_remaining_size - sdu_mngt_p->sdu_remaining_size);
#endif #endif
//#if !EXMIMO
// assert(1!=1);
//#endif
memcpy(data, data_sdu_p, sdu_mngt_p->sdu_remaining_size); memcpy(data, data_sdu_p, sdu_mngt_p->sdu_remaining_size);
// reduce the size of the PDU // reduce the size of the PDU
continue_fill_pdu_with_sdu = 0; continue_fill_pdu_with_sdu = 0;
......
...@@ -34,20 +34,19 @@ ...@@ -34,20 +34,19 @@
#include "common/utils/LOG/log.h" #include "common/utils/LOG/log.h"
#include "UTIL/OCG/OCG_vars.h" #include "UTIL/OCG/OCG_vars.h"
#include "common/utils/LOG/vcd_signal_dumper.h" #include "common/utils/LOG/vcd_signal_dumper.h"
#include "targets/COMMON/openairinterface5g_limits.h" #include "common/openairinterface5g_limits.h"
#include "assertions.h" #include "assertions.h"
#include <rlc.h> #include <rlc.h>
#include "common/ran_context.h" #include "common/ran_context.h"
extern RAN_CONTEXT_t RC; extern RAN_CONTEXT_t RC;
extern boolean_t pdcp_data_ind( extern bool pdcp_data_ind(const protocol_ctxt_t *const ctxt_pP,
const protocol_ctxt_t *const ctxt_pP, const srb_flag_t srb_flagP,
const srb_flag_t srb_flagP, const MBMS_flag_t MBMS_flagP,
const MBMS_flag_t MBMS_flagP, const rb_id_t rb_idP,
const rb_id_t rb_idP, const sdu_size_t sdu_buffer_sizeP,
const sdu_size_t sdu_buffer_sizeP, mem_block_t *const sdu_buffer_pP);
mem_block_t *const sdu_buffer_pP);
#define DEBUG_RLC_PDCP_INTERFACE 1 #define DEBUG_RLC_PDCP_INTERFACE 1
//#define TRACE_RLC_PAYLOAD 1 //#define TRACE_RLC_PAYLOAD 1
...@@ -397,7 +396,7 @@ rlc_op_status_t rlc_data_req (const protocol_ctxt_t *const ctxt_pP, ...@@ -397,7 +396,7 @@ rlc_op_status_t rlc_data_req (const protocol_ctxt_t *const ctxt_pP,
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_RLC_DATA_REQ,VCD_FUNCTION_IN); VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_RLC_DATA_REQ,VCD_FUNCTION_IN);
if (MBMS_flagP == TRUE) { if (MBMS_flagP == true) {
if (ctxt_pP->enb_flag) { if (ctxt_pP->enb_flag) {
log_ch_id = rlc_mbms_enb_get_lcid_by_rb_id(ctxt_pP->module_id,rb_idP); log_ch_id = rlc_mbms_enb_get_lcid_by_rb_id(ctxt_pP->module_id,rb_idP);
mbms_id_p = &rlc_mbms_lcid2service_session_id_eNB[ctxt_pP->module_id][log_ch_id]; mbms_id_p = &rlc_mbms_lcid2service_session_id_eNB[ctxt_pP->module_id][log_ch_id];
...@@ -591,7 +590,7 @@ void rlc_data_ind ( ...@@ -591,7 +590,7 @@ void rlc_data_ind (
T(T_ENB_RLC_UL, T_INT(ctxt_pP->module_id), T_INT(ctxt_pP->rnti), T_INT(rb_idP), T_INT(sdu_sizeP)); T(T_ENB_RLC_UL, T_INT(ctxt_pP->module_id), T_INT(ctxt_pP->rnti), T_INT(rb_idP), T_INT(sdu_sizeP));
#endif #endif
const ngran_node_t type = RC.rrc[ctxt_pP->module_id]->node_type; const ngran_node_t type = RC.rrc[ctxt_pP->module_id]->node_type;
AssertFatal(type != ngran_eNB_CU && type != ngran_ng_eNB_CU && type != ngran_gNB_CU, AssertFatal(!NODE_IS_CU(type),
"Can't be CU, bad node type %d\n", type); "Can't be CU, bad node type %d\n", type);
if (NODE_IS_DU(type) && srb_flagP == 1) { if (NODE_IS_DU(type) && srb_flagP == 1) {
......
...@@ -107,7 +107,7 @@ typedef struct { ...@@ -107,7 +107,7 @@ typedef struct {
rlc_buffer_occupancy_t pdus_in_buffer; /*!< \brief Number of PDUs buffered in RLC protocol instance (OBSOLETE). */ rlc_buffer_occupancy_t pdus_in_buffer; /*!< \brief Number of PDUs buffered in RLC protocol instance (OBSOLETE). */
frame_t head_sdu_creation_time; /*!< \brief Head SDU creation time. */ frame_t head_sdu_creation_time; /*!< \brief Head SDU creation time. */
sdu_size_t head_sdu_remaining_size_to_send; /*!< \brief remaining size of sdu: could be the total size or the remaining size of already segmented sdu */ sdu_size_t head_sdu_remaining_size_to_send; /*!< \brief remaining size of sdu: could be the total size or the remaining size of already segmented sdu */
boolean_t head_sdu_is_segmented; /*!< \brief 0 if head SDU has not been segmented, 1 if already segmented */ bool head_sdu_is_segmented; /*!< \brief 0 if head SDU has not been segmented, 1 if already segmented */
} mac_rlc_status_resp_t; } mac_rlc_status_resp_t;
...@@ -399,30 +399,31 @@ tbs_size_t mac_rlc_data_req (const module_id_t, const rnti_t, con ...@@ -399,30 +399,31 @@ tbs_size_t mac_rlc_data_req (const module_id_t, const rnti_t, con
,const uint32_t sourceL2Id ,const uint32_t sourceL2Id
,const uint32_t destinationL2Id ,const uint32_t destinationL2Id
); );
/*! \fn rlc_op_status_t enqueue_mac_rlc_data_req (const protocol_ctxt_t* const ctxtP, const srb_flag_t srb_flagP, const MBMS_flag_t MBMS_flagP, const rb_id_t rb_idP, mui_t muiP, confirm_t confirmP, sdu_size_t sdu_sizeP, mem_block_t *sduP)
* \brief Interface with higher layers, map request to the RLC corresponding to the radio bearer. +/*! \fn rlc_op_status_t enqueue_mac_rlc_data_req (const protocol_ctxt_t* const ctxtP, const srb_flag_t srb_flagP, const MBMS_flag_t MBMS_flagP, const rb_id_t rb_idP, mui_t muiP, confirm_t confirmP, sdu_size_t sdu_sizeP, mem_block_t *sduP)
* \param[in] ctxtP Running context. +* \brief Interface with higher layers, map request to the RLC corresponding to the radio bearer.
* \param[in] srb_flagP Flag to indicate SRB (1) or DRB (0) +* \param[in] ctxtP Running context.
* \param[in] MBMS_flagP Flag to indicate whether this is the MBMS service (1) or not (0) +* \param[in] srb_flagP Flag to indicate SRB (1) or DRB (0)
* \param[in] rb_idP Radio bearer identifier. +* \param[in] MBMS_flagP Flag to indicate whether this is the MBMS service (1) or not (0)
* \param[in] muiP Message Unit identifier. +* \param[in] rb_idP Radio bearer identifier.
* \param[in] confirmP Boolean, is confirmation requested. +* \param[in] muiP Message Unit identifier.
* \param[in] sdu_sizeP Size of SDU in bytes. +* \param[in] confirmP Boolean, is confirmation requested.
* \param[in] sduP SDU. +* \param[in] sdu_sizeP Size of SDU in bytes.
* \return A status about the processing, OK or error code. +* \param[in] sduP SDU.
*/ +* \return A status about the processing, OK or error code.
rlc_op_status_t enqueue_mac_rlc_data_req ( +*/
const protocol_ctxt_t *const, +rlc_op_status_t enqueue_mac_rlc_data_req (
const srb_flag_t, + const protocol_ctxt_t *const,
const MBMS_flag_t, + const srb_flag_t,
const rb_id_t, + const MBMS_flag_t,
const mui_t, + const rb_id_t,
const confirm_t, + const mui_t,
const sdu_size_t, + const confirm_t,
mem_block_t *const, + const sdu_size_t,
const uint32_t *const, + mem_block_t *const,
const uint32_t *const + const uint32_t *const,
); + const uint32_t *const
+);
/*! \fn void mac_rlc_data_ind (const module_id_t mod_idP, const rnti_t rntiP, const frame_t frameP, const eNB_flag_t eNB_flagP, const MBMS_flag_t MBMS_flagP, logical_chan_id_t rb_idP, uint32_t frameP, char* bufferP, tb_size_t tb_sizeP, num_tb_t num_tbP, crc_t *crcs) /*! \fn void mac_rlc_data_ind (const module_id_t mod_idP, const rnti_t rntiP, const frame_t frameP, const eNB_flag_t eNB_flagP, const MBMS_flag_t MBMS_flagP, logical_chan_id_t rb_idP, uint32_t frameP, char* bufferP, tb_size_t tb_sizeP, num_tb_t num_tbP, crc_t *crcs)
* \brief Interface with MAC layer, deserialize the transport blocks sent by MAC, then map data indication to the RLC instance corresponding to the radio bearer identifier. * \brief Interface with MAC layer, deserialize the transport blocks sent by MAC, then map data indication to the RLC instance corresponding to the radio bearer identifier.
......
...@@ -258,7 +258,8 @@ void mac_rlc_data_ind ( ...@@ -258,7 +258,8 @@ void mac_rlc_data_ind (
#endif // DEBUG_MAC_INTERFACE #endif // DEBUG_MAC_INTERFACE
#if T_TRACER #if T_TRACER
//Trace UL RLC PDU Here + //Trace UL RLC PDU Here
+
if (enb_flagP) if (enb_flagP)
T(T_ENB_RLC_MAC_UL, T_INT(module_idP), T_INT(rntiP), T_INT(channel_idP), T_INT(tb_sizeP)); T(T_ENB_RLC_MAC_UL, T_INT(module_idP), T_INT(rntiP), T_INT(channel_idP), T_INT(tb_sizeP));
...@@ -427,8 +428,8 @@ rlc_buffer_occupancy_t mac_rlc_get_buffer_occupancy_ind( ...@@ -427,8 +428,8 @@ rlc_buffer_occupancy_t mac_rlc_get_buffer_occupancy_ind(
/* Assumptions : for UE only */ /* Assumptions : for UE only */
/* At each TTI, Buffer Occupancy is first computed in mac_rlc_status_ind called by MAC ue_scheduler() function */ /* At each TTI, Buffer Occupancy is first computed in mac_rlc_status_ind called by MAC ue_scheduler() function */
/* Then this function is called during MAC multiplexing ue_get_sdu(), and it may be call several times for the same bearer if it is in AM mode and there are several PDU types to transmit */ /* Then this function is called during MAC multiplexing ue_get_sdu(), and it may be call several times for the same bearer if it is in AM mode and there are several PDU types to transmit */
//AssertFatal(enb_flagP == FALSE,"RLC Tx mac_rlc_get_buffer_occupancy_ind function is not implemented for eNB LcId=%d\n", channel_idP); //AssertFatal(enb_flagP == false,"RLC Tx mac_rlc_get_buffer_occupancy_ind function is not implemented for eNB LcId=%d\n", channel_idP);
if(enb_flagP != FALSE) { if(enb_flagP != false) {
LOG_E(RLC, "Tx mac_rlc_get_buffer_occupancy_ind function is not implemented for eNB LcId=%u\n", channel_idP); LOG_E(RLC, "Tx mac_rlc_get_buffer_occupancy_ind function is not implemented for eNB LcId=%u\n", channel_idP);
return 0; return 0;
} }
......
...@@ -480,7 +480,7 @@ rlc_op_status_t rrc_rlc_remove_rlc ( ...@@ -480,7 +480,7 @@ rlc_op_status_t rrc_rlc_remove_rlc (
/* for no gcc warnings */ /* for no gcc warnings */
(void)lcid; (void)lcid;
if (MBMS_flagP == TRUE) { if (MBMS_flagP == true) {
if (ctxt_pP->enb_flag) { if (ctxt_pP->enb_flag) {
lcid = rlc_mbms_enb_get_lcid_by_rb_id(ctxt_pP->module_id,rb_idP); lcid = rlc_mbms_enb_get_lcid_by_rb_id(ctxt_pP->module_id,rb_idP);
mbms_id_p = &rlc_mbms_lcid2service_session_id_eNB[ctxt_pP->module_id][lcid]; mbms_id_p = &rlc_mbms_lcid2service_session_id_eNB[ctxt_pP->module_id][lcid];
...@@ -581,7 +581,7 @@ rlc_union_t *rrc_rlc_add_rlc ( ...@@ -581,7 +581,7 @@ rlc_union_t *rrc_rlc_add_rlc (
rlc_mbms_id_t *mbms_id_p = NULL; rlc_mbms_id_t *mbms_id_p = NULL;
logical_chan_id_t lcid = 0; logical_chan_id_t lcid = 0;
if (MBMS_flagP == FALSE) { if (MBMS_flagP == false) {
//AssertFatal (rb_idP < NB_RB_MAX, "RB id is too high (%u/%d)!\n", rb_idP, NB_RB_MAX); //AssertFatal (rb_idP < NB_RB_MAX, "RB id is too high (%u/%d)!\n", rb_idP, NB_RB_MAX);
//AssertFatal (chan_idP < RLC_MAX_LC, "LC id is too high (%u/%d)!\n", chan_idP, RLC_MAX_LC); //AssertFatal (chan_idP < RLC_MAX_LC, "LC id is too high (%u/%d)!\n", chan_idP, RLC_MAX_LC);
if(rb_idP >= NB_RB_MAX) { if(rb_idP >= NB_RB_MAX) {
...@@ -595,7 +595,7 @@ rlc_union_t *rrc_rlc_add_rlc ( ...@@ -595,7 +595,7 @@ rlc_union_t *rrc_rlc_add_rlc (
} }
} }
if (MBMS_flagP == TRUE) { if (MBMS_flagP == true) {
if (ctxt_pP->enb_flag) { if (ctxt_pP->enb_flag) {
lcid = rlc_mbms_enb_get_lcid_by_rb_id(ctxt_pP->module_id,rb_idP); lcid = rlc_mbms_enb_get_lcid_by_rb_id(ctxt_pP->module_id,rb_idP);
mbms_id_p = &rlc_mbms_lcid2service_session_id_eNB[ctxt_pP->module_id][lcid]; mbms_id_p = &rlc_mbms_lcid2service_session_id_eNB[ctxt_pP->module_id][lcid];
...@@ -640,11 +640,11 @@ rlc_union_t *rrc_rlc_add_rlc ( ...@@ -640,11 +640,11 @@ rlc_union_t *rrc_rlc_add_rlc (
} else if (h_rc == HASH_TABLE_KEY_NOT_EXISTS) { } else if (h_rc == HASH_TABLE_KEY_NOT_EXISTS) {
rlc_union_p = calloc(1, sizeof(rlc_union_t)); rlc_union_p = calloc(1, sizeof(rlc_union_t));
h_rc = hashtable_insert(rlc_coll_p, key, rlc_union_p); h_rc = hashtable_insert(rlc_coll_p, key, rlc_union_p);
if(MBMS_flagP != TRUE) if(MBMS_flagP != true)
h_lcid_rc = hashtable_insert(rlc_coll_p, key_lcid, rlc_union_p); h_lcid_rc = hashtable_insert(rlc_coll_p, key_lcid, rlc_union_p);
if ((h_rc == HASH_TABLE_OK) && (h_lcid_rc == HASH_TABLE_OK)) { if ((h_rc == HASH_TABLE_OK) && (h_lcid_rc == HASH_TABLE_OK)) {
if (MBMS_flagP == TRUE) { if (MBMS_flagP == true) {
LOG_I(RLC, PROTOCOL_CTXT_FMT" RLC service id %u session id %u rrc_rlc_add_rlc\n", LOG_I(RLC, PROTOCOL_CTXT_FMT" RLC service id %u session id %u rrc_rlc_add_rlc\n",
PROTOCOL_CTXT_ARGS(ctxt_pP), PROTOCOL_CTXT_ARGS(ctxt_pP),
mbms_id_p->service_id, mbms_id_p->service_id,
......
...@@ -613,7 +613,6 @@ void rlc_entity_am_recv_pdu(rlc_entity_t *_entity, char *buffer, int size, lte_r ...@@ -613,7 +613,6 @@ void rlc_entity_am_recv_pdu(rlc_entity_t *_entity, char *buffer, int size, lte_r
rlc_info->pduLength = size; rlc_info->pduLength = size;
rlc_info->sequenceNumberLength = 10; /*TODO */ rlc_info->sequenceNumberLength = 10; /*TODO */
LOG_LTE_RLC_P(OAILOG_INFO, "UL_RLC_AM_PDU", -1, -1, *(rlc_info), (unsigned char *)buffer, size); LOG_LTE_RLC_P(OAILOG_INFO, "UL_RLC_AM_PDU", -1, -1, *(rlc_info), (unsigned char *)buffer, size);
if (dc == 0) goto control; if (dc == 0) goto control;
/* data PDU */ /* data PDU */
...@@ -1522,6 +1521,7 @@ int rlc_entity_am_generate_pdu(rlc_entity_t *_entity, char *buffer, int size, lt ...@@ -1522,6 +1521,7 @@ int rlc_entity_am_generate_pdu(rlc_entity_t *_entity, char *buffer, int size, lt
if (ret != 0) if (ret != 0)
return ret; return ret;
} }
rlc_info->pduLength = ret; rlc_info->pduLength = ret;
if (entity->retransmit_list != NULL) { if (entity->retransmit_list != NULL) {
ret = generate_retx_pdu(entity, buffer, size); ret = generate_retx_pdu(entity, buffer, size);
......
...@@ -276,7 +276,7 @@ void rlc_entity_am_recv_sdu(rlc_entity_t *entity, char *buffer, int size, ...@@ -276,7 +276,7 @@ void rlc_entity_am_recv_sdu(rlc_entity_t *entity, char *buffer, int size,
void rlc_entity_am_recv_pdu(rlc_entity_t *entity, char *buffer, int size, lte_rlc_pkt_info_t *rlc_info); void rlc_entity_am_recv_pdu(rlc_entity_t *entity, char *buffer, int size, lte_rlc_pkt_info_t *rlc_info);
rlc_entity_buffer_status_t rlc_entity_am_buffer_status( rlc_entity_buffer_status_t rlc_entity_am_buffer_status(
rlc_entity_t *entity, int maxsize); rlc_entity_t *entity, int maxsize);
int rlc_entity_am_generate_pdu(rlc_entity_t *entity, char *buffer, int size,lte_rlc_pkt_info_t *rlc_info); int rlc_entity_am_generate_pdu(rlc_entity_t *entity, char *buffer, int size, lte_rlc_pkt_info_t *rlc_info);
void rlc_entity_am_set_time(rlc_entity_t *entity, uint64_t now); void rlc_entity_am_set_time(rlc_entity_t *entity, uint64_t now);
void rlc_entity_am_discard_sdu(rlc_entity_t *entity, int sdu_id); void rlc_entity_am_discard_sdu(rlc_entity_t *entity, int sdu_id);
void rlc_entity_am_reestablishment(rlc_entity_t *entity); void rlc_entity_am_reestablishment(rlc_entity_t *entity);
......
...@@ -228,7 +228,7 @@ static void rlc_um_reception_actions(rlc_entity_um_t *entity, ...@@ -228,7 +228,7 @@ static void rlc_um_reception_actions(rlc_entity_um_t *entity,
} }
} }
void rlc_entity_um_recv_pdu(rlc_entity_t *_entity, char *buffer, int size,lte_rlc_pkt_info_t *rlc_info) void rlc_entity_um_recv_pdu(rlc_entity_t *_entity, char *buffer, int size, lte_rlc_pkt_info_t *rlc_info)
{ {
#define R(d) do { if (rlc_pdu_decoder_in_error(&d)) goto err; } while (0) #define R(d) do { if (rlc_pdu_decoder_in_error(&d)) goto err; } while (0)
rlc_entity_um_t *entity = (rlc_entity_um_t *)_entity; rlc_entity_um_t *entity = (rlc_entity_um_t *)_entity;
...@@ -547,6 +547,7 @@ int rlc_entity_um_generate_pdu(rlc_entity_t *_entity, char *buffer, int size,lte ...@@ -547,6 +547,7 @@ int rlc_entity_um_generate_pdu(rlc_entity_t *_entity, char *buffer, int size,lte
/* update VT(US) */ /* update VT(US) */
entity->vt_us = (entity->vt_us + 1) % entity->sn_modulus; entity->vt_us = (entity->vt_us + 1) % entity->sn_modulus;
rlc_info->pduLength = pdu_size.header_size + pdu_size.data_size; rlc_info->pduLength = pdu_size.header_size + pdu_size.data_size;
return pdu_size.header_size + pdu_size.data_size; return pdu_size.header_size + pdu_size.data_size;
......
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
#include "pdcp.h" #include "pdcp.h"
/* from new rlc module */ /* from new rlc module */
#include "asn1_utils.h" #include "rlc_asn1_utils.h"
#include "rlc_ue_manager.h" #include "rlc_ue_manager.h"
#include "rlc_entity.h" #include "rlc_entity.h"
...@@ -54,6 +54,7 @@ void mac_rlc_data_ind ( ...@@ -54,6 +54,7 @@ void mac_rlc_data_ind (
rlc_entity_t *rb; rlc_entity_t *rb;
int rnti; int rnti;
int channel_id; int channel_id;
lte_rlc_pkt_info_t rlc_info; lte_rlc_pkt_info_t rlc_info;
if (enb_flagP == 1 && module_idP != 0) { if (enb_flagP == 1 && module_idP != 0) {
LOG_E(RLC, "%s:%d:%s: fatal, module_id must be 0 for eNB\n", LOG_E(RLC, "%s:%d:%s: fatal, module_id must be 0 for eNB\n",
...@@ -83,6 +84,7 @@ void mac_rlc_data_ind ( ...@@ -83,6 +84,7 @@ void mac_rlc_data_ind (
rnti = rntiP; rnti = rntiP;
channel_id = channel_idP; channel_id = channel_idP;
} }
rlc_info.channelId = channel_id - 1; rlc_info.channelId = channel_id - 1;
rlc_info.ueid = rnti; rlc_info.ueid = rnti;
if (channel_id > 2) if (channel_id > 2)
...@@ -129,10 +131,10 @@ tbs_size_t mac_rlc_data_req( ...@@ -129,10 +131,10 @@ tbs_size_t mac_rlc_data_req(
rlc_ue_t *ue; rlc_ue_t *ue;
rlc_entity_t *rb; rlc_entity_t *rb;
int maxsize; int maxsize;
lte_rlc_pkt_info_t rlc_pkt; lte_rlc_pkt_info_t rlc_pkt;
rlc_pkt.direction = 1 /* Downlink */; rlc_pkt.direction = 1 /* Downlink */;
rlc_pkt.ueid = rntiP; rlc_pkt.ueid = rntiP;
rlc_manager_lock(rlc_ue_manager); rlc_manager_lock(rlc_ue_manager);
ue = rlc_manager_get_ue(rlc_ue_manager, rntiP); ue = rlc_manager_get_ue(rlc_ue_manager, rntiP);
...@@ -149,6 +151,7 @@ tbs_size_t mac_rlc_data_req( ...@@ -149,6 +151,7 @@ tbs_size_t mac_rlc_data_req(
rb = NULL; rb = NULL;
} }
if (rb != NULL) { if (rb != NULL) {
rb->set_time(rb, rlc_current_time); rb->set_time(rb, rlc_current_time);
maxsize = tb_sizeP; maxsize = tb_sizeP;
...@@ -158,6 +161,7 @@ tbs_size_t mac_rlc_data_req( ...@@ -158,6 +161,7 @@ tbs_size_t mac_rlc_data_req(
exit(1); exit(1);
ret = 0; ret = 0;
} }
switch ((channel_idP)) switch ((channel_idP))
{ {
case 1 ... 3: case 1 ... 3:
...@@ -313,7 +317,7 @@ rlc_op_status_t rlc_data_req (const protocol_ctxt_t *const ctxt_pP, ...@@ -313,7 +317,7 @@ rlc_op_status_t rlc_data_req (const protocol_ctxt_t *const ctxt_pP,
const uint32_t *const destinationL2Id const uint32_t *const destinationL2Id
) )
{ {
int rnti = ctxt_pP->rnti; int rnti = ctxt_pP->rntiMaybeUEid;
rlc_ue_t *ue; rlc_ue_t *ue;
rlc_entity_t *rb; rlc_entity_t *rb;
...@@ -325,8 +329,7 @@ rlc_op_status_t rlc_data_req (const protocol_ctxt_t *const ctxt_pP, ...@@ -325,8 +329,7 @@ rlc_op_status_t rlc_data_req (const protocol_ctxt_t *const ctxt_pP,
MBMS_flagP); MBMS_flagP);
if (ctxt_pP->enb_flag) if (ctxt_pP->enb_flag)
T(T_ENB_RLC_DL, T_INT(ctxt_pP->module_id), T(T_ENB_RLC_DL, T_INT(ctxt_pP->module_id), T_INT(ctxt_pP->rntiMaybeUEid), T_INT(rb_idP), T_INT(sdu_sizeP));
T_INT(ctxt_pP->rnti), T_INT(rb_idP), T_INT(sdu_sizeP));
rlc_manager_lock(rlc_ue_manager); rlc_manager_lock(rlc_ue_manager);
ue = rlc_manager_get_ue(rlc_ue_manager, rnti); ue = rlc_manager_get_ue(rlc_ue_manager, rnti);
...@@ -439,9 +442,10 @@ rb_found: ...@@ -439,9 +442,10 @@ rb_found:
/* used fields? */ /* used fields? */
ctx.module_id = ue->module_id; ctx.module_id = ue->module_id;
ctx.rnti = ue->rnti; ctx.rntiMaybeUEid = ue->rnti;
ctx.frame = RC.ss.mac_rlc_data_ind_frame; /* Populating the frame received from Lower layer */ ctx.frame = RC.ss.mac_rlc_data_ind_frame; /* Populating the frame received from Lower layer */
ctx.subframe = RC.ss.mac_rlc_data_ind_subframe; /* Populating the subframe received from Lower layer */ ctx.subframe = RC.ss.mac_rlc_data_ind_subframe; /* Populating the subframe received from Lower layer */
is_enb = rlc_manager_get_enb_flag(rlc_ue_manager); is_enb = rlc_manager_get_enb_flag(rlc_ue_manager);
ctx.enb_flag = is_enb; ctx.enb_flag = is_enb;
...@@ -451,7 +455,7 @@ rb_found: ...@@ -451,7 +455,7 @@ rb_found:
T_INT(ue->rnti), T_INT(rb_id), T_INT(size)); T_INT(ue->rnti), T_INT(rb_id), T_INT(size));
const ngran_node_t type = RC.rrc[0 /*ctxt_pP->module_id*/]->node_type; const ngran_node_t type = RC.rrc[0 /*ctxt_pP->module_id*/]->node_type;
AssertFatal(type != ngran_eNB_CU && type != ngran_ng_eNB_CU && type != ngran_gNB_CU, AssertFatal(!NODE_IS_CU(type),
"Can't be CU, bad node type %d\n", type); "Can't be CU, bad node type %d\n", type);
if (NODE_IS_DU(type)) { if (NODE_IS_DU(type)) {
...@@ -467,14 +471,14 @@ rb_found: ...@@ -467,14 +471,14 @@ rb_found:
} else { } else {
// Fixme: very dirty workaround of incomplete F1-U implementation // Fixme: very dirty workaround of incomplete F1-U implementation
instance_t DUuniqInstance=0; instance_t DUuniqInstance=0;
MessageDef *msg = itti_alloc_new_message(TASK_RLC_ENB, 0, GTPV1U_ENB_TUNNEL_DATA_REQ); MessageDef *msg = itti_alloc_new_message_sized(TASK_RLC_ENB, 0, GTPV1U_TUNNEL_DATA_REQ, sizeof(gtpv1u_tunnel_data_req_t) + size);
gtpv1u_enb_tunnel_data_req_t *req=&GTPV1U_ENB_TUNNEL_DATA_REQ(msg); gtpv1u_tunnel_data_req_t *req=&GTPV1U_TUNNEL_DATA_REQ(msg);
req->buffer=malloc(size); req->buffer=(uint8_t*)(req+1);
memcpy(req->buffer,buf,size); memcpy(req->buffer,buf,size);
req->length=size; req->length=size;
req->offset=0; req->offset=0;
req->rnti=ue->rnti; req->ue_id=ue->rnti;
req->rab_id=rb_id+4; req->bearer_id=rb_id+4;
LOG_D(RLC, "Received uplink user-plane traffic at RLC-DU to be sent to the CU, size %d \n", size); LOG_D(RLC, "Received uplink user-plane traffic at RLC-DU to be sent to the CU, size %d \n", size);
itti_send_msg_to_task(TASK_GTPV1_U, DUuniqInstance, msg); itti_send_msg_to_task(TASK_GTPV1_U, DUuniqInstance, msg);
return; return;
...@@ -558,6 +562,7 @@ static void max_retx_reached(void *_ue, rlc_entity_t *entity) ...@@ -558,6 +562,7 @@ static void max_retx_reached(void *_ue, rlc_entity_t *entity)
int rb_id; int rb_id;
MessageDef *msg; MessageDef *msg;
int is_enb; int is_enb;
/* is it SRB? */ /* is it SRB? */
for (i = 0; i < 2; i++) { for (i = 0; i < 2; i++) {
if (entity == ue->srb[i]) { if (entity == ue->srb[i]) {
...@@ -869,7 +874,7 @@ rlc_op_status_t rrc_rlc_config_asn1_req (const protocol_ctxt_t * const ctxt_pP ...@@ -869,7 +874,7 @@ rlc_op_status_t rrc_rlc_config_asn1_req (const protocol_ctxt_t * const ctxt_pP
const uint32_t destinationL2Id const uint32_t destinationL2Id
) )
{ {
int rnti = ctxt_pP->rnti; int rnti = ctxt_pP->rntiMaybeUEid;
int module_id = ctxt_pP->module_id; int module_id = ctxt_pP->module_id;
int i; int i;
int j; int j;
...@@ -1014,8 +1019,8 @@ rlc_op_status_t rrc_rlc_config_req ( ...@@ -1014,8 +1019,8 @@ rlc_op_status_t rrc_rlc_config_req (
exit(1); exit(1);
} }
rlc_manager_lock(rlc_ue_manager); rlc_manager_lock(rlc_ue_manager);
LOG_D(RLC, "%s:%d:%s: remove rb %d (is_srb %d) for UE %d\n", __FILE__, __LINE__, __FUNCTION__, (int)rb_idP, srb_flagP, ctxt_pP->rnti); LOG_D(RLC, "%s:%d:%s: remove rb %d (is_srb %d) for UE %ld\n", __FILE__, __LINE__, __FUNCTION__, (int)rb_idP, srb_flagP, ctxt_pP->rntiMaybeUEid);
ue = rlc_manager_get_ue(rlc_ue_manager, ctxt_pP->rnti); ue = rlc_manager_get_ue(rlc_ue_manager, ctxt_pP->rntiMaybeUEid);
if (srb_flagP) { if (srb_flagP) {
if (ue->srb[rb_idP-1] != NULL) { if (ue->srb[rb_idP-1] != NULL) {
ue->srb[rb_idP-1]->delete(ue->srb[rb_idP-1]); ue->srb[rb_idP-1]->delete(ue->srb[rb_idP-1]);
...@@ -1038,7 +1043,7 @@ rlc_op_status_t rrc_rlc_config_req ( ...@@ -1038,7 +1043,7 @@ rlc_op_status_t rrc_rlc_config_req (
if (ue->drb[i] != NULL) if (ue->drb[i] != NULL)
break; break;
if (i == 5) if (i == 5)
rlc_manager_remove_ue(rlc_ue_manager, ctxt_pP->rnti); rlc_manager_remove_ue(rlc_ue_manager, ctxt_pP->rntiMaybeUEid);
} }
rlc_manager_unlock(rlc_ue_manager); rlc_manager_unlock(rlc_ue_manager);
return RLC_OP_STATUS_OK; return RLC_OP_STATUS_OK;
...@@ -1051,9 +1056,9 @@ void rrc_rlc_register_rrc (rrc_data_ind_cb_t rrc_data_indP, rrc_data_conf_cb_t r ...@@ -1051,9 +1056,9 @@ void rrc_rlc_register_rrc (rrc_data_ind_cb_t rrc_data_indP, rrc_data_conf_cb_t r
rlc_op_status_t rrc_rlc_remove_ue (const protocol_ctxt_t* const x) rlc_op_status_t rrc_rlc_remove_ue (const protocol_ctxt_t* const x)
{ {
LOG_D(RLC, "%s:%d:%s: remove UE %d\n", __FILE__, __LINE__, __FUNCTION__, x->rnti); LOG_D(RLC, "%s:%d:%s: remove UE %ld\n", __FILE__, __LINE__, __FUNCTION__, x->rntiMaybeUEid);
rlc_manager_lock(rlc_ue_manager); rlc_manager_lock(rlc_ue_manager);
rlc_manager_remove_ue(rlc_ue_manager, x->rnti); rlc_manager_remove_ue(rlc_ue_manager, x->rntiMaybeUEid);
rlc_manager_unlock(rlc_ue_manager); rlc_manager_unlock(rlc_ue_manager);
return RLC_OP_STATUS_OK; return RLC_OP_STATUS_OK;
...@@ -1100,3 +1105,15 @@ void du_rlc_data_req(const protocol_ctxt_t *const ctxt_pP, ...@@ -1100,3 +1105,15 @@ void du_rlc_data_req(const protocol_ctxt_t *const ctxt_pP,
sdu_sizeP, sdu_sizeP,
sdu_pP, NULL, NULL); sdu_pP, NULL, NULL);
} }
/* HACK to be removed: nr_rlc_get_available_tx_space is needed by
* openair3/ocp-gtpu/gtp_itf.cpp which is compiled in lte-softmodem
* so let's put a dummy nr_rlc_get_available_tx_space here
*/
int nr_rlc_get_available_tx_space(
const rnti_t rntiP,
const logical_chan_id_t channel_idP)
{
abort();
return 0;
}
This diff is collapsed.
EUTRA-InterNodeDefinitions DEFINITIONS AUTOMATIC TAGS ::=
BEGIN
HandoverCommand ::= SEQUENCE {
criticalExtensions CHOICE {
c1 CHOICE{
handoverCommand-r8 HandoverCommand-r8-IEs,
spare7 NULL,
spare6 NULL, spare5 NULL, spare4 NULL,
spare3 NULL, spare2 NULL, spare1 NULL
},
criticalExtensionsFuture SEQUENCE {}
}
}
HandoverCommand-r8-IEs ::= SEQUENCE {
handoverCommandMessage OCTET STRING (CONTAINING DL-DCCH-Message),
nonCriticalExtension SEQUENCE {} OPTIONAL
}
HandoverPreparationInformation ::= SEQUENCE {
criticalExtensions CHOICE {
c1 CHOICE{
handoverPreparationInformation-r8 HandoverPreparationInformation-r8-IEs,
spare7 NULL,
spare6 NULL, spare5 NULL, spare4 NULL,
spare3 NULL, spare2 NULL, spare1 NULL
},
criticalExtensionsFuture SEQUENCE {}
}
}
HandoverPreparationInformation-r8-IEs ::= SEQUENCE {
ue-RadioAccessCapabilityInfo UE-CapabilityRAT-ContainerList,
as-Config AS-Config OPTIONAL, -- Cond HO
rrm-Config RRM-Config OPTIONAL,
as-Context AS-Context OPTIONAL, -- Cond HO
nonCriticalExtension SEQUENCE {} OPTIONAL
}
UERadioAccessCapabilityInformation ::= SEQUENCE {
criticalExtensions CHOICE {
c1 CHOICE{
ueRadioAccessCapabilityInformation-r8
UERadioAccessCapabilityInformation-r8-IEs,
spare7 NULL,
spare6 NULL, spare5 NULL, spare4 NULL,
spare3 NULL, spare2 NULL, spare1 NULL
},
criticalExtensionsFuture SEQUENCE {}
}
}
UERadioAccessCapabilityInformation-r8-IEs ::= SEQUENCE {
ue-RadioAccessCapabilityInfo OCTET STRING (CONTAINING UECapabilityInformation),
nonCriticalExtension SEQUENCE {} OPTIONAL
}
AS-Config ::= SEQUENCE {
sourceMeasConfig MeasConfig,
sourceRadioResourceConfig RadioResourceConfigDedicated,
sourceSecurityAlgorithmConfig SecurityAlgorithmConfig,
sourceUE-Identity C-RNTI,
sourceMasterInformationBlock MasterInformationBlock,
sourceSystemInformationBlockType1 SystemInformationBlockType1,
sourceSystemInformationBlockType2 SystemInformationBlockType2,
antennaInfoCommon AntennaInfoCommon,
sourceDl-CarrierFreq ARFCN-ValueEUTRA,
...
}
AS-Context ::= SEQUENCE {
reestablishmentInfo ReestablishmentInfo OPTIONAL -- Cond HO
}
ReestablishmentInfo ::= SEQUENCE {
sourcePhysCellId PhysCellId,
targetCellShortMAC-I ShortMAC-I,
additionalReestabInfoList AdditionalReestabInfoList OPTIONAL,
...
}
AdditionalReestabInfoList ::= SEQUENCE ( SIZE (1..maxReestabInfo) ) OF AdditionalReestabInfo
AdditionalReestabInfo ::= SEQUENCE{
cellIdentity CellIdentity,
key-eNodeB-Star Key-eNodeB-Star,
shortMAC-I ShortMAC-I
}
Key-eNodeB-Star ::= BIT STRING (SIZE (256))
RRM-Config ::= SEQUENCE {
ue-InactiveTime ENUMERATED {
s1, s2, s3, s5, s7, s10, s15, s20,
s25, s30, s40, s50, min1, min1s20c, min1s40,
min2, min2s30, min3, min3s30, min4, min5, min6,
min7, min8, min9, min10, min12, min14, min17, min20,
min24, min28, min33, min38, min44, min50, hr1,
hr1min30, hr2, hr2min30, hr3, hr3min30, hr4, hr5, hr6,
hr8, hr10, hr13, hr16, hr20, day1, day1hr12, day2,
day2hr12, day3, day4, day5, day7, day10, day14, day19,
day24, day30, dayMoreThan30} OPTIONAL,
...
}
maxReestabInfo INTEGER ::= 32 -- Maximum number of KeNB* and shortMAC-I forwarded
-- at handover for re-establishment preparation
END
EUTRA-InterNodeDefinitions DEFINITIONS AUTOMATIC TAGS ::=
BEGIN
HandoverCommand ::= SEQUENCE {
criticalExtensions CHOICE {
c1 CHOICE{
handoverCommand-r8 HandoverCommand-r8-IEs,
spare7 NULL,
spare6 NULL, spare5 NULL, spare4 NULL,
spare3 NULL, spare2 NULL, spare1 NULL
},
criticalExtensionsFuture SEQUENCE {}
}
}
HandoverCommand-r8-IEs ::= SEQUENCE {
handoverCommandMessage OCTET STRING (CONTAINING DL-DCCH-Message),
nonCriticalExtension SEQUENCE {} OPTIONAL
}
HandoverPreparationInformation ::= SEQUENCE {
criticalExtensions CHOICE {
c1 CHOICE{
handoverPreparationInformation-r8 HandoverPreparationInformation-r8-IEs,
spare7 NULL,
spare6 NULL, spare5 NULL, spare4 NULL,
spare3 NULL, spare2 NULL, spare1 NULL
},
criticalExtensionsFuture SEQUENCE {}
}
}
HandoverPreparationInformation-r8-IEs ::= SEQUENCE {
ue-RadioAccessCapabilityInfo UE-CapabilityRAT-ContainerList,
as-Config AS-Config OPTIONAL, -- Cond HO
rrm-Config RRM-Config OPTIONAL,
as-Context AS-Context OPTIONAL, -- Cond HO
nonCriticalExtension HandoverPreparationInformation-v920-IEs OPTIONAL
}
HandoverPreparationInformation-v920-IEs ::= SEQUENCE {
ue-ConfigRelease-r9 ENUMERATED {
rel9, rel10, spare6, spare5, spare4, spare3,
spare2, spare1, ...} OPTIONAL, -- Cond HO2
nonCriticalExtension SEQUENCE {} OPTIONAL
}
UERadioAccessCapabilityInformation ::= SEQUENCE {
criticalExtensions CHOICE {
c1 CHOICE{
ueRadioAccessCapabilityInformation-r8
UERadioAccessCapabilityInformation-r8-IEs,
spare7 NULL,
spare6 NULL, spare5 NULL, spare4 NULL,
spare3 NULL, spare2 NULL, spare1 NULL
},
criticalExtensionsFuture SEQUENCE {}
}
}
UERadioAccessCapabilityInformation-r8-IEs ::= SEQUENCE {
ue-RadioAccessCapabilityInfo OCTET STRING (CONTAINING UECapabilityInformation),
nonCriticalExtension SEQUENCE {} OPTIONAL
}
AS-Config ::= SEQUENCE {
sourceMeasConfig MeasConfig,
sourceRadioResourceConfig RadioResourceConfigDedicated,
sourceSecurityAlgorithmConfig SecurityAlgorithmConfig,
sourceUE-Identity C-RNTI,
sourceMasterInformationBlock MasterInformationBlock,
sourceSystemInformationBlockType1 SystemInformationBlockType1(WITH COMPONENTS
{..., nonCriticalExtension ABSENT}),
sourceSystemInformationBlockType2 SystemInformationBlockType2,
antennaInfoCommon AntennaInfoCommon,
sourceDl-CarrierFreq ARFCN-ValueEUTRA,
...,
[[ sourceSystemInformationBlockType1Ext OCTET STRING (CONTAINING
SystemInformationBlockType1-v890-IEs) OPTIONAL,
sourceOtherConfig-r9 OtherConfig-r9
]],
[[ sourceSCellConfigList-r10 SCellToAddModList-r10 OPTIONAL
]]
}
AS-Context ::= SEQUENCE {
reestablishmentInfo ReestablishmentInfo OPTIONAL -- Cond HO
}
ReestablishmentInfo ::= SEQUENCE {
sourcePhysCellId PhysCellId,
targetCellShortMAC-I ShortMAC-I,
additionalReestabInfoList AdditionalReestabInfoList OPTIONAL,
...
}
AdditionalReestabInfoList ::= SEQUENCE ( SIZE (1..maxReestabInfo) ) OF AdditionalReestabInfo
AdditionalReestabInfo ::= SEQUENCE{
cellIdentity CellIdentity,
key-eNodeB-Star Key-eNodeB-Star,
shortMAC-I ShortMAC-I
}
Key-eNodeB-Star ::= BIT STRING (SIZE (256))
RRM-Config ::= SEQUENCE {
ue-InactiveTime ENUMERATED {
s1, s2, s3, s5, s7, s10, s15, s20,
s25, s30, s40, s50, min1, min1s20c, min1s40,
min2, min2s30, min3, min3s30, min4, min5, min6,
min7, min8, min9, min10, min12, min14, min17, min20,
min24, min28, min33, min38, min44, min50, hr1,
hr1min30, hr2, hr2min30, hr3, hr3min30, hr4, hr5, hr6,
hr8, hr10, hr13, hr16, hr20, day1, day1hr12, day2,
day2hr12, day3, day4, day5, day7, day10, day14, day19,
day24, day30, dayMoreThan30} OPTIONAL,
...,
[[ candidateCellInfoList-r10 CandidateCellInfoList-r10 OPTIONAL
]]
}
CandidateCellInfoList-r10 ::= SEQUENCE (SIZE (1..maxFreq)) OF CandidateCellInfo-r10
CandidateCellInfo-r10 ::= SEQUENCE {
-- cellIdentification
physCellId-r10 PhysCellId,
dl-CarrierFreq-r10 ARFCN-ValueEUTRA,
-- available measurement results
rsrpResult-r10 RSRP-Range OPTIONAL,
rsrqResult-r10 RSRQ-Range OPTIONAL,
...
}
maxReestabInfo INTEGER ::= 32 -- Maximum number of KeNB* and shortMAC-I forwarded
-- at handover for re-establishment preparation
END
EUTRA-UE-Variables DEFINITIONS AUTOMATIC TAGS ::=
BEGIN
VarMeasConfig ::= SEQUENCE {
-- Measurement identities
measIdList MeasIdToAddModList OPTIONAL,
-- Measurement objects
measObjectList MeasObjectToAddModList OPTIONAL,
-- Reporting configurations
reportConfigList ReportConfigToAddModList OPTIONAL,
-- Other parameters
quantityConfig QuantityConfig OPTIONAL,
s-Measure RSRP-Range OPTIONAL,
speedStatePars CHOICE {
release NULL,
setup SEQUENCE {
mobilityStateParameters MobilityStateParameters,
timeToTrigger-SF SpeedStateScaleFactors
}
} OPTIONAL
}
VarMeasReportList ::= SEQUENCE (SIZE (1..maxMeasId)) OF VarMeasReport
VarMeasReport ::= SEQUENCE {
-- List of measurement that have been triggered
measId MeasId,
cellsTriggeredList CellsTriggeredList OPTIONAL,
numberOfReportsSent INTEGER
}
CellsTriggeredList ::= SEQUENCE (SIZE (1..maxCellMeas)) OF PhysCellId
VarShortMAC-Input ::= SEQUENCE {
cellIdentity CellIdentity,
physCellId PhysCellId,
c-RNTI C-RNTI
}
END
EUTRA-UE-Variables DEFINITIONS AUTOMATIC TAGS ::=
BEGIN
VarLogMeasConfig-r10 ::= SEQUENCE {
areaConfiguration-r10 AreaConfiguration-r10 OPTIONAL,
loggingDuration-r10 LoggingDuration-r10,
loggingInterval-r10 LoggingInterval-r10
}
VarLogMeasReport-r10 ::= SEQUENCE {
traceReference-r10 TraceReference-r10,
traceRecordingSessionRef-r10 OCTET STRING (SIZE (2)),
tce-Id-r10 OCTET STRING (SIZE (1)),
plmn-Identity-r10 PLMN-Identity,
absoluteTimeInfo-r10 AbsoluteTimeInfo-r10,
logMeasInfoList-r10 LogMeasInfoList-r10
}
LogMeasInfoList-r10 ::= SEQUENCE (SIZE (1..maxLogMeas-r10)) OF LogMeasInfo-r10
VarMeasConfig ::= SEQUENCE {
-- Measurement identities
measIdList MeasIdToAddModList OPTIONAL,
-- Measurement objects
measObjectList MeasObjectToAddModList OPTIONAL,
-- Reporting configurations
reportConfigList ReportConfigToAddModList OPTIONAL,
-- Other parameters
quantityConfig QuantityConfig OPTIONAL,
s-Measure INTEGER (-140..-44) OPTIONAL,
speedStatePars CHOICE {
release NULL,
setup SEQUENCE {
mobilityStateParameters MobilityStateParameters,
timeToTrigger-SF SpeedStateScaleFactors
}
} OPTIONAL
}
VarMeasReportList ::= SEQUENCE (SIZE (1..maxMeasId)) OF VarMeasReport
VarMeasReport ::= SEQUENCE {
-- List of measurement that have been triggered
measId MeasId,
cellsTriggeredList CellsTriggeredList OPTIONAL,
numberOfReportsSent INTEGER
}
CellsTriggeredList ::= SEQUENCE (SIZE (1..maxCellMeas)) OF CHOICE {
physCellIdEUTRA PhysCellId,
physCellIdUTRA CHOICE {
fdd PhysCellIdUTRA-FDD,
tdd PhysCellIdUTRA-TDD
},
physCellIdGERAN SEQUENCE {
carrierFreq CarrierFreqGERAN,
physCellId PhysCellIdGERAN
},
physCellIdCDMA2000 PhysCellIdCDMA2000
}
VarRLF-Report-r10 ::= SEQUENCE {
rlf-Report-r10 RLF-Report-r9,
plmn-Identity-r10 PLMN-Identity
}
VarShortMAC-Input ::= SEQUENCE {
cellIdentity CellIdentity,
physCellId PhysCellId,
c-RNTI C-RNTI
}
maxLogMeas-r10 INTEGER ::= 4060-- Maximum number of logged measurement entries
-- that can be stored by the UE
END
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment