Merge branch 'develop-nr' into nr_pdcch
This commit is contained in:
@@ -22,7 +22,7 @@
|
||||
#ifndef GTPV1_U_MESSAGES_TYPES_H_
|
||||
#define GTPV1_U_MESSAGES_TYPES_H_
|
||||
|
||||
#include "asn1_constants.h"
|
||||
#include "asn_constant.h"
|
||||
|
||||
|
||||
#define GTPV1U_MAX_BEARERS_PER_UE max_val_DRB_Identity
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
#include "RadioResourceConfigDedicated.h"
|
||||
#include "MeasGapConfig.h"
|
||||
#include "TDD-Config.h"
|
||||
#if defined(Rel10) || defined(Rel14)
|
||||
#if (RRC_VERSION >= MAKE_VERSION(9, 0, 0))
|
||||
#include "MBSFN-AreaInfoList-r9.h"
|
||||
#include "MBSFN-SubframeConfigList.h"
|
||||
#endif
|
||||
@@ -356,7 +356,7 @@ typedef struct {
|
||||
TDD_Config_t *tdd_Config,
|
||||
uint8_t *SIwindowsize,
|
||||
uint16_t *SIperiod
|
||||
#if defined(Rel10) || defined(Rel14)
|
||||
#if (RRC_VERSION >= MAKE_VERSION(9, 0, 0))
|
||||
,
|
||||
MBMS_flag_t MBMS_Flag,
|
||||
struct MBSFN_SubframeConfigList *mbsfn_SubframeConfigList,
|
||||
@@ -364,10 +364,20 @@ typedef struct {
|
||||
struct PMCH_InfoList_r9 *pmch_InfoList
|
||||
#endif
|
||||
);
|
||||
unsigned int (*mac_rlc_data_req)(module_id_t, unsigned int, const unsigned int,char*);
|
||||
unsigned int (*mac_rlc_data_req)(module_id_t, unsigned int, const unsigned int,char*
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
,uint32_t
|
||||
,uint32_t
|
||||
#endif
|
||||
);
|
||||
void (*mac_rlc_data_ind)(module_id_t, logical_chan_id_t, char*, tb_size_t, num_tb_t, crc_t* );
|
||||
mac_rlc_status_resp_t (*mac_rlc_status_ind) (module_id_t enb_mod_idP, module_id_t ue_mod_idP, frame_t frameP, sub_frame_t subframeP, eNB_flag_t eNB_flagP, MBMS_flag_t MBMS_flagP,
|
||||
logical_chan_id_t channel_idP, tb_size_t tb_sizeP);
|
||||
logical_chan_id_t channel_idP, tb_size_t tb_sizeP
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
,uint32_t sourceL2Id
|
||||
,uint32_t destinationL2Id
|
||||
#endif
|
||||
);
|
||||
signed int (*rrc_rlc_data_req)(module_id_t, rb_id_t, mui_t, confirm_t, sdu_size_t, char *);
|
||||
void (*rrc_rlc_register_rrc) (void (*rrc_data_indP)(module_id_t , rb_id_t , sdu_size_t , char* ),
|
||||
void (*rrc_data_confP) (module_id_t , rb_id_t , mui_t ) ) ;
|
||||
|
||||
@@ -29,9 +29,9 @@
|
||||
***************************************************************************/
|
||||
|
||||
#ifdef CMAKER
|
||||
#include "asn1_constants.h"
|
||||
#include "asn_constant.h"
|
||||
#else
|
||||
#include "RRC/LITE/MESSAGES/asn1_constants.h"
|
||||
#include "RRC/LTE/MESSAGES/asn1_constants.h"
|
||||
#endif
|
||||
|
||||
#ifndef __PLATFORM_CONSTANTS_H__
|
||||
@@ -67,20 +67,29 @@
|
||||
|
||||
# define MAX_MODULES NB_MODULES_MAX
|
||||
|
||||
#ifdef LARGE_SCALE
|
||||
#ifndef UE_EXPANSION
|
||||
# ifdef LARGE_SCALE
|
||||
# define MAX_MOBILES_PER_ENB 128
|
||||
# define MAX_MOBILES_PER_ENB_NB_IoT 128
|
||||
# define MAX_MOBILES_PER_GNB 128
|
||||
# define MAX_eNB 2
|
||||
# define MAX_gNB 2
|
||||
#else
|
||||
# else
|
||||
# define MAX_MOBILES_PER_ENB 16
|
||||
# define MAX_MOBILES_PER_ENB_NB_IoT 16
|
||||
# define MAX_MOBILES_PER_GNB 16
|
||||
# define MAX_eNB 2
|
||||
# define MAX_gNB 2
|
||||
# endif
|
||||
#else
|
||||
# define MAX_MOBILES_PER_ENB 256
|
||||
# define MAX_MOBILES_PER_ENB_NB_IoT 256
|
||||
# define MAX_MOBILES_PER_GNB 256
|
||||
# define MAX_eNB 2
|
||||
# define MAX_gNB 2
|
||||
#endif
|
||||
|
||||
|
||||
#define MAX_MANAGED_ENB_PER_MOBILE 2
|
||||
#define MAX_MANAGED_GNB_PER_MOBILE 2
|
||||
|
||||
@@ -91,7 +100,7 @@
|
||||
#define DEFAULT_RAB_ID 1
|
||||
|
||||
#define NB_RB_MAX (maxDRB + 3) /* was 11, now 14, maxDRB comes from asn1_constants.h, + 3 because of 3 SRB, one invisible id 0, then id 1 and 2 */
|
||||
#if defined(Rel10) || defined(Rel14)
|
||||
#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
#define NB_RB_MBMS_MAX (maxSessionPerPMCH*maxServiceCount)
|
||||
#else
|
||||
// Do not allocate unused memory
|
||||
|
||||
@@ -69,7 +69,7 @@ typedef uint32_t frame_t;
|
||||
typedef int32_t sframe_t;
|
||||
typedef uint32_t sub_frame_t;
|
||||
typedef uint32_t slot_t;
|
||||
typedef uint8_t module_id_t;
|
||||
typedef uint16_t module_id_t;
|
||||
typedef uint8_t slice_id_t;
|
||||
typedef uint8_t eNB_index_t;
|
||||
typedef uint16_t ue_id_t;
|
||||
@@ -93,6 +93,10 @@ typedef boolean_t srb_flag_t;
|
||||
#define SRB_FLAG_NO FALSE
|
||||
#define SRB_FLAG_YES TRUE
|
||||
|
||||
typedef boolean_t sl_discovery_flag_t;
|
||||
#define SL_DISCOVERY_FLAG_NO FALSE
|
||||
#define SL_DISCOVERY_FLAG_YES TRUE
|
||||
|
||||
typedef enum link_direction_e {
|
||||
UNKNOWN_DIR = 0,
|
||||
DIR_UPLINK = 1,
|
||||
@@ -169,7 +173,9 @@ typedef enum ip_traffic_type_e {
|
||||
TRAFFIC_IPV4_TYPE_UNICAST = 5,
|
||||
TRAFFIC_IPV4_TYPE_MULTICAST = 6,
|
||||
TRAFFIC_IPV4_TYPE_BROADCAST = 7,
|
||||
TRAFFIC_IPV4_TYPE_UNKNOWN = 8
|
||||
TRAFFIC_IPV4_TYPE_UNKNOWN = 8,
|
||||
TRAFFIC_PC5S_SIGNALLING = 9,
|
||||
TRAFFIC_PC5S_SESSION_INIT = 10
|
||||
} ip_traffic_type_t;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
|
||||
#ifndef RAL_MESSAGES_TYPES_H_
|
||||
#define RAL_MESSAGES_TYPES_H_
|
||||
#include "asn1_constants.h"
|
||||
#include "asn_constant.h"
|
||||
#include "platform_types.h"
|
||||
#include "commonDef.h"
|
||||
/* 802.21 mappings with the RRC protocol :
|
||||
|
||||
@@ -35,8 +35,14 @@
|
||||
#ifdef CMAKER
|
||||
#include "SystemInformationBlockType2.h"
|
||||
#else
|
||||
#include "RRC/LITE/MESSAGES/SystemInformationBlockType2.h"
|
||||
#include "RRC/LTE/MESSAGES/SystemInformationBlockType2.h"
|
||||
#endif
|
||||
#include "SL-OffsetIndicator-r12.h"
|
||||
#include "SubframeBitmapSL-r12.h"
|
||||
#include "SL-CP-Len-r12.h"
|
||||
#include "SL-PeriodComm-r12.h"
|
||||
#include "SL-DiscResourcePool-r12.h"
|
||||
|
||||
|
||||
//-------------------------------------------------------------------------------------------//
|
||||
// Messages for RRC logging
|
||||
@@ -119,9 +125,9 @@ typedef struct RrcConfigurationReq_s {
|
||||
long pucch_delta_shift[MAX_NUM_CCs];
|
||||
long pucch_nRB_CQI[MAX_NUM_CCs];
|
||||
long pucch_nCS_AN[MAX_NUM_CCs];
|
||||
#if !defined(Rel10) && !defined(Rel14)
|
||||
//#if (RRC_VERSION < MAKE_VERSION(10, 0, 0))
|
||||
long pucch_n1_AN[MAX_NUM_CCs];
|
||||
#endif
|
||||
//#endif
|
||||
long pdsch_referenceSignalPower[MAX_NUM_CCs];
|
||||
long pdsch_p_b[MAX_NUM_CCs];
|
||||
long pusch_n_SB[MAX_NUM_CCs];
|
||||
@@ -170,8 +176,56 @@ typedef struct RrcConfigurationReq_s {
|
||||
long ue_TimersAndConstants_n310[MAX_NUM_CCs];
|
||||
long ue_TimersAndConstants_n311[MAX_NUM_CCs];
|
||||
long ue_TransmissionMode[MAX_NUM_CCs];
|
||||
long ue_multiple_max[MAX_NUM_CCs];
|
||||
|
||||
//TTN - for D2D
|
||||
//SIB18
|
||||
e_SL_CP_Len_r12 rxPool_sc_CP_Len[MAX_NUM_CCs];
|
||||
e_SL_PeriodComm_r12 rxPool_sc_Period[MAX_NUM_CCs];
|
||||
e_SL_CP_Len_r12 rxPool_data_CP_Len[MAX_NUM_CCs];
|
||||
long rxPool_ResourceConfig_prb_Num[MAX_NUM_CCs];
|
||||
long rxPool_ResourceConfig_prb_Start[MAX_NUM_CCs];
|
||||
long rxPool_ResourceConfig_prb_End[MAX_NUM_CCs];
|
||||
SL_OffsetIndicator_r12_PR rxPool_ResourceConfig_offsetIndicator_present[MAX_NUM_CCs];
|
||||
long rxPool_ResourceConfig_offsetIndicator_choice[MAX_NUM_CCs];
|
||||
SubframeBitmapSL_r12_PR rxPool_ResourceConfig_subframeBitmap_present[MAX_NUM_CCs];
|
||||
char* rxPool_ResourceConfig_subframeBitmap_choice_bs_buf[MAX_NUM_CCs];
|
||||
long rxPool_ResourceConfig_subframeBitmap_choice_bs_size[MAX_NUM_CCs];
|
||||
long rxPool_ResourceConfig_subframeBitmap_choice_bs_bits_unused[MAX_NUM_CCs];
|
||||
|
||||
//SIB19
|
||||
//for discRxPool
|
||||
SL_CP_Len_r12_t discRxPool_cp_Len[MAX_NUM_CCs];
|
||||
e_SL_DiscResourcePool_r12__discPeriod_r12 discRxPool_discPeriod[MAX_NUM_CCs];
|
||||
long discRxPool_numRetx[MAX_NUM_CCs];
|
||||
long discRxPool_numRepetition[MAX_NUM_CCs];
|
||||
long discRxPool_ResourceConfig_prb_Num[MAX_NUM_CCs];
|
||||
long discRxPool_ResourceConfig_prb_Start[MAX_NUM_CCs];
|
||||
long discRxPool_ResourceConfig_prb_End[MAX_NUM_CCs];
|
||||
SL_OffsetIndicator_r12_PR discRxPool_ResourceConfig_offsetIndicator_present[MAX_NUM_CCs];
|
||||
long discRxPool_ResourceConfig_offsetIndicator_choice[MAX_NUM_CCs];
|
||||
SubframeBitmapSL_r12_PR discRxPool_ResourceConfig_subframeBitmap_present[MAX_NUM_CCs];
|
||||
char* discRxPool_ResourceConfig_subframeBitmap_choice_bs_buf[MAX_NUM_CCs];
|
||||
long discRxPool_ResourceConfig_subframeBitmap_choice_bs_size[MAX_NUM_CCs];
|
||||
long discRxPool_ResourceConfig_subframeBitmap_choice_bs_bits_unused[MAX_NUM_CCs];
|
||||
//for discRxPoolPS
|
||||
SL_CP_Len_r12_t discRxPoolPS_cp_Len[MAX_NUM_CCs];
|
||||
e_SL_DiscResourcePool_r12__discPeriod_r12 discRxPoolPS_discPeriod[MAX_NUM_CCs];
|
||||
long discRxPoolPS_numRetx[MAX_NUM_CCs];
|
||||
long discRxPoolPS_numRepetition[MAX_NUM_CCs];
|
||||
long discRxPoolPS_ResourceConfig_prb_Num[MAX_NUM_CCs];
|
||||
long discRxPoolPS_ResourceConfig_prb_Start[MAX_NUM_CCs];
|
||||
long discRxPoolPS_ResourceConfig_prb_End[MAX_NUM_CCs];
|
||||
SL_OffsetIndicator_r12_PR discRxPoolPS_ResourceConfig_offsetIndicator_present[MAX_NUM_CCs];
|
||||
long discRxPoolPS_ResourceConfig_offsetIndicator_choice[MAX_NUM_CCs];
|
||||
SubframeBitmapSL_r12_PR discRxPoolPS_ResourceConfig_subframeBitmap_present[MAX_NUM_CCs];
|
||||
char* discRxPoolPS_ResourceConfig_subframeBitmap_choice_bs_buf[MAX_NUM_CCs];
|
||||
long discRxPoolPS_ResourceConfig_subframeBitmap_choice_bs_size[MAX_NUM_CCs];
|
||||
long discRxPoolPS_ResourceConfig_subframeBitmap_choice_bs_bits_unused[MAX_NUM_CCs];
|
||||
} RrcConfigurationReq;
|
||||
|
||||
#define MAX_NUM_NBIOT_CELEVELS 3
|
||||
|
||||
typedef struct NbIoTRrcConfigurationReq_s {
|
||||
uint32_t cell_identity;
|
||||
|
||||
@@ -275,14 +329,12 @@ typedef struct NRRrcConfigurationReq_s {
|
||||
long SIB1_ss_PBCH_BlockPower[MAX_NUM_CCs];
|
||||
//NR FrequencyInfoDL
|
||||
long absoluteFrequencySSB[MAX_NUM_CCs];
|
||||
uint32_t ssb_SubcarrierOffset[MAX_NUM_CCs];
|
||||
long DL_FreqBandIndicatorNR[MAX_NUM_CCs];
|
||||
long DL_absoluteFrequencyPointA[MAX_NUM_CCs];
|
||||
|
||||
//NR DL SCS-SpecificCarrier
|
||||
uint32_t DL_offsetToCarrier[MAX_NUM_CCs];
|
||||
long DL_SCS_SubcarrierSpacing[MAX_NUM_CCs];
|
||||
long DL_SCS_SpecificCarrier_k0[MAX_NUM_CCs];
|
||||
uint32_t DL_carrierBandwidth[MAX_NUM_CCs];
|
||||
|
||||
//NR BWP-DownlinkCommon
|
||||
@@ -300,14 +352,14 @@ typedef struct NRRrcConfigurationReq_s {
|
||||
//NR UL SCS-SpecificCarrier
|
||||
uint32_t UL_offsetToCarrier[MAX_NUM_CCs];
|
||||
long UL_SCS_SubcarrierSpacing[MAX_NUM_CCs];
|
||||
long UL_SCS_SpecificCarrier_k0[MAX_NUM_CCs];
|
||||
uint32_t UL_carrierBandwidth[MAX_NUM_CCs];
|
||||
|
||||
// NR BWP-UplinkCommon
|
||||
uint32_t UL_locationAndBandwidth[MAX_NUM_CCs];
|
||||
long UL_BWP_SubcarrierSpacing[MAX_NUM_CCs];
|
||||
lte_prefix_type_t UL_BWP_prefix_type[MAX_NUM_CCs];
|
||||
|
||||
long UL_timeAlignmentTimerCommon[MAX_NUM_CCs];
|
||||
long ServingCellConfigCommon_n_TimingAdvanceOffset[MAX_NUM_CCs];
|
||||
long ServingCellConfigCommon_ssb_PositionsInBurst_PR[MAX_NUM_CCs];
|
||||
long ServingCellConfigCommon_ssb_periodicityServingCell[MAX_NUM_CCs]; //ServingCellConfigCommon
|
||||
long ServingCellConfigCommon_dmrs_TypeA_Position[MAX_NUM_CCs]; //ServingCellConfigCommon
|
||||
@@ -367,16 +419,19 @@ typedef struct NRRrcConfigurationReq_s {
|
||||
///NR PUSCH-TimeDomainResourceAllocation
|
||||
uint32_t PUSCH_TimeDomainResourceAllocation_k2[MAX_NUM_CCs];
|
||||
long PUSCH_TimeDomainResourceAllocation_mappingType[MAX_NUM_CCs];
|
||||
uint32_t PUSCH_TimeDomainResourceAllocation_startSymbolAndLength[MAX_NUM_CCs];
|
||||
|
||||
//NR PUCCH-ConfigCommon
|
||||
uint32_t pucch_ResourceCommon[MAX_NUM_CCs];
|
||||
long pucch_GroupHopping[MAX_NUM_CCs];
|
||||
uint32_t hoppingId[MAX_NUM_CCs];
|
||||
long p0_nominal[MAX_NUM_CCs];
|
||||
|
||||
//NR PDSCH-ConfigCOmmon
|
||||
//NR PDSCH-TimeDomainResourceAllocation
|
||||
uint32_t PDSCH_TimeDomainResourceAllocation_k0[MAX_NUM_CCs];
|
||||
long PDSCH_TimeDomainResourceAllocation_mappingType[MAX_NUM_CCs];
|
||||
|
||||
long PDSCH_TimeDomainResourceAllocation_startSymbolAndLength[MAX_NUM_CCs];
|
||||
|
||||
//NR RateMatchPattern is used to configure one rate matching pattern for PDSCH
|
||||
long rateMatchPatternId[MAX_NUM_CCs];
|
||||
@@ -388,11 +443,12 @@ typedef struct NRRrcConfigurationReq_s {
|
||||
long RateMatchPattern_mode[MAX_NUM_CCs];
|
||||
|
||||
//NR PDCCH-ConfigCommon
|
||||
uint32_t controlResourceSetZero[MAX_NUM_CCs];
|
||||
uint32_t searchSpaceZero[MAX_NUM_CCs];
|
||||
long searchSpaceSIB1[MAX_NUM_CCs];
|
||||
long searchSpaceOtherSystemInformation[MAX_NUM_CCs];
|
||||
long pagingSearchSpace[MAX_NUM_CCs];
|
||||
long ra_SearchSpace[MAX_NUM_CCs];
|
||||
long rach_ra_ControlResourceSet[MAX_NUM_CCs];
|
||||
//NR PDCCH-ConfigCommon commonControlResourcesSets
|
||||
long PDCCH_common_controlResourceSetId[MAX_NUM_CCs];
|
||||
long PDCCH_common_ControlResourceSet_duration[MAX_NUM_CCs];
|
||||
@@ -403,19 +459,14 @@ typedef struct NRRrcConfigurationReq_s {
|
||||
long PDCCH_precoderGranularity[MAX_NUM_CCs]; //Corresponds to L1 parameter 'CORESET-precoder-granuality'
|
||||
long PDCCH_TCI_StateId[MAX_NUM_CCs];
|
||||
BOOLEAN_t tci_PresentInDCI[MAX_NUM_CCs];
|
||||
uint32_t PDCCH_DMRS_ScramblingID[MAX_NUM_CCs];
|
||||
|
||||
//NR PDCCH-ConfigCommon commonSearchSpaces
|
||||
long SearchSpaceId[MAX_NUM_CCs];
|
||||
long commonSearchSpaces_controlResourceSetId[MAX_NUM_CCs];
|
||||
long SearchSpace_monitoringSlotPeriodicityAndOffset_choice[MAX_NUM_CCs];
|
||||
long SearchSpace_monitoringSlotPeriodicityAndOffset_sl1[MAX_NUM_CCs];
|
||||
long SearchSpace_monitoringSlotPeriodicityAndOffset_sl2[MAX_NUM_CCs];
|
||||
long SearchSpace_monitoringSlotPeriodicityAndOffset_sl4[MAX_NUM_CCs];
|
||||
long SearchSpace_monitoringSlotPeriodicityAndOffset_sl5[MAX_NUM_CCs];
|
||||
long SearchSpace_monitoringSlotPeriodicityAndOffset_sl8[MAX_NUM_CCs];
|
||||
long SearchSpace_monitoringSlotPeriodicityAndOffset_sl10[MAX_NUM_CCs];
|
||||
long SearchSpace_monitoringSlotPeriodicityAndOffset_sl16[MAX_NUM_CCs];
|
||||
long SearchSpace_monitoringSlotPeriodicityAndOffset_sl20[MAX_NUM_CCs];
|
||||
uint32_t SearchSpace_monitoringSlotPeriodicityAndOffset_value[MAX_NUM_CCs];
|
||||
uint32_t SearchSpace_duration[MAX_NUM_CCs];
|
||||
long SearchSpace_nrofCandidates_aggregationLevel1[MAX_NUM_CCs];
|
||||
long SearchSpace_nrofCandidates_aggregationLevel2[MAX_NUM_CCs];
|
||||
long SearchSpace_nrofCandidates_aggregationLevel4[MAX_NUM_CCs];
|
||||
|
||||
@@ -38,6 +38,7 @@ MESSAGE_DEF(S1AP_E_RAB_MODIFY_RESPONSE_LOG , MESSAGE_PRIORITY_MED, IttiMsgTex
|
||||
MESSAGE_DEF(S1AP_PAGING_LOG , MESSAGE_PRIORITY_MED, IttiMsgText , s1ap_paging_log)
|
||||
MESSAGE_DEF(S1AP_E_RAB_RELEASE_REQUEST_LOG , MESSAGE_PRIORITY_MED, IttiMsgText , s1ap_e_rab_release_request_log)
|
||||
MESSAGE_DEF(S1AP_E_RAB_RELEASE_RESPONSE_LOG , MESSAGE_PRIORITY_MED, IttiMsgText , s1ap_e_rab_release_response_log)
|
||||
MESSAGE_DEF(S1AP_ERROR_INDICATION_LOG , MESSAGE_PRIORITY_MED, IttiMsgText , s1ap_error_indication_log)
|
||||
|
||||
/* eNB application layer -> S1AP messages */
|
||||
MESSAGE_DEF(S1AP_REGISTER_ENB_REQ , MESSAGE_PRIORITY_MED, s1ap_register_enb_req_t , s1ap_register_enb_req)
|
||||
|
||||
@@ -49,7 +49,7 @@ void flexran_agent_ue_state_change(mid_t mod_id, uint32_t rnti, uint8_t state_ch
|
||||
Protocol__FlexHeader *header = NULL;
|
||||
void *data;
|
||||
int priority = 0;
|
||||
err_code_t err_code;
|
||||
err_code_t err_code=0;
|
||||
|
||||
int xid = 0;
|
||||
|
||||
@@ -241,7 +241,8 @@ void flexran_agent_ue_state_change(mid_t mod_id, uint32_t rnti, uint8_t state_ch
|
||||
LOG_D(FLEXRAN_AGENT,"sent message with size %d\n", size);
|
||||
return;
|
||||
error:
|
||||
LOG_E(FLEXRAN_AGENT, "Could not send UE state message becasue of %d \n",err_code);
|
||||
if (err_code != 0)
|
||||
LOG_E(FLEXRAN_AGENT, "Could not send UE state message becasue of %d \n",err_code);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -53,7 +53,10 @@
|
||||
#define CONFIG_STRING_MACRLC_REMOTE_S_PORTC "remote_s_portc"
|
||||
#define CONFIG_STRING_MACRLC_LOCAL_S_PORTD "local_s_portd"
|
||||
#define CONFIG_STRING_MACRLC_REMOTE_S_PORTD "remote_s_portd"
|
||||
|
||||
#define CONFIG_STRING_MACRLC_SCHED_MODE "scheduler_mode"
|
||||
#define CONFIG_STRING_MACRLC_PHY_TEST_MODE "phy_test_mode"
|
||||
#define CONFIG_MACRLC_PUSCH10xSNR "puSch10xSnr"
|
||||
#define CONFIG_MACRLC_PUCCH10xSNR "puCch10xSnr"
|
||||
|
||||
/*-------------------------------------------------------------------------------------------------------------------------------------------------------*/
|
||||
/* MacRLC configuration parameters */
|
||||
@@ -77,6 +80,10 @@
|
||||
{CONFIG_STRING_MACRLC_REMOTE_S_PORTC, NULL, 0, uptr:NULL, defintval:50020, TYPE_UINT, 0}, \
|
||||
{CONFIG_STRING_MACRLC_LOCAL_S_PORTD, NULL, 0, uptr:NULL, defintval:50021, TYPE_UINT, 0}, \
|
||||
{CONFIG_STRING_MACRLC_REMOTE_S_PORTD, NULL, 0, uptr:NULL, defintval:50021, TYPE_UINT, 0}, \
|
||||
{CONFIG_STRING_MACRLC_SCHED_MODE, NULL, 0, strptr:NULL, defstrval:"default", TYPE_STRING, 0}, \
|
||||
{CONFIG_STRING_MACRLC_PHY_TEST_MODE, NULL, 0, uptr:NULL, defintval:1, TYPE_UINT, 0}, \
|
||||
{CONFIG_MACRLC_PUSCH10xSNR, NULL, 0, iptr:NULL, defintval:200, TYPE_INT, 0}, \
|
||||
{CONFIG_MACRLC_PUCCH10xSNR, NULL, 0, iptr:NULL, defintval:200, TYPE_INT, 0}, \
|
||||
}
|
||||
#define MACRLC_CC_IDX 0
|
||||
#define MACRLC_TRANSPORT_N_PREFERENCE_IDX 1
|
||||
@@ -95,4 +102,8 @@
|
||||
#define MACRLC_REMOTE_S_PORTC_IDX 14
|
||||
#define MACRLC_LOCAL_S_PORTD_IDX 15
|
||||
#define MACRLC_REMOTE_S_PORTD_IDX 16
|
||||
#define MACRLC_SCHED_MODE_IDX 17
|
||||
#define MACRLC_PHY_TEST_IDX 18
|
||||
#define MACRLC_PUSCH10xSNR_IDX 19
|
||||
#define MACRLC_PUCCH10xSNR_IDX 20
|
||||
/*---------------------------------------------------------------------------------------------------------------------------------------------------------*/
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
#endif
|
||||
#include "SystemInformationBlockType2.h"
|
||||
|
||||
#include "PHY/extern.h"
|
||||
#include "PHY/phy_extern.h"
|
||||
#include "targets/ARCH/ETHERNET/USERSPACE/LIB/ethernet_lib.h"
|
||||
#include "common/config/config_userapi.h"
|
||||
#include "RRC_config_tools.h"
|
||||
|
||||
@@ -31,8 +31,7 @@
|
||||
#include <string.h>
|
||||
#include <inttypes.h>
|
||||
|
||||
#include "log.h"
|
||||
#include "log_extern.h"
|
||||
#include "common/utils/LOG/log.h"
|
||||
#include "assertions.h"
|
||||
#if defined(ENABLE_ITTI)
|
||||
# include "intertask_interface.h"
|
||||
|
||||
@@ -113,8 +113,6 @@ static uint32_t eNB_app_register(uint32_t enb_id_start, uint32_t enb_id_end)//,
|
||||
|
||||
for (enb_id = enb_id_start; (enb_id < enb_id_end) ; enb_id++) {
|
||||
{
|
||||
s1ap_register_enb_req_t *s1ap_register_eNB;
|
||||
|
||||
/* note: there is an implicit relationship between the data structure and the message name */
|
||||
msg_p = itti_alloc_new_message (TASK_ENB_APP, S1AP_REGISTER_ENB_REQ);
|
||||
|
||||
@@ -122,8 +120,7 @@ static uint32_t eNB_app_register(uint32_t enb_id_start, uint32_t enb_id_end)//,
|
||||
|
||||
if (enb_id == 0) RCconfig_gtpu();
|
||||
|
||||
s1ap_register_eNB = &S1AP_REGISTER_ENB_REQ(msg_p);
|
||||
LOG_I(ENB_APP,"default drx %d\n",s1ap_register_eNB->default_drx);
|
||||
LOG_I(ENB_APP,"default drx %d\n",((S1AP_REGISTER_ENB_REQ(msg_p)).default_drx));
|
||||
|
||||
LOG_I(ENB_APP,"[eNB %d] eNB_app_register for instance %d\n", enb_id, ENB_MODULE_ID_TO_INSTANCE(enb_id));
|
||||
|
||||
@@ -152,7 +149,6 @@ void *eNB_app_task(void *args_p)
|
||||
# endif
|
||||
uint32_t enb_id;
|
||||
MessageDef *msg_p = NULL;
|
||||
const char *msg_name = NULL;
|
||||
instance_t instance;
|
||||
int result;
|
||||
/* for no gcc warnings */
|
||||
@@ -200,7 +196,6 @@ void *eNB_app_task(void *args_p)
|
||||
// Wait for a message
|
||||
itti_receive_msg (TASK_ENB_APP, &msg_p);
|
||||
|
||||
msg_name = ITTI_MSG_NAME (msg_p);
|
||||
instance = ITTI_MSG_INSTANCE (msg_p);
|
||||
|
||||
switch (ITTI_MSG_ID(msg_p)) {
|
||||
@@ -216,7 +211,7 @@ void *eNB_app_task(void *args_p)
|
||||
# if defined(ENABLE_USE_MME)
|
||||
|
||||
case S1AP_REGISTER_ENB_CNF:
|
||||
LOG_I(ENB_APP, "[eNB %d] Received %s: associated MME %d\n", instance, msg_name,
|
||||
LOG_I(ENB_APP, "[eNB %d] Received %s: associated MME %d\n", instance, ITTI_MSG_NAME (msg_p),
|
||||
S1AP_REGISTER_ENB_CNF(msg_p).nb_mme);
|
||||
|
||||
DevAssert(register_enb_pending > 0);
|
||||
@@ -237,10 +232,8 @@ void *eNB_app_task(void *args_p)
|
||||
itti_send_msg_to_task (TASK_L2L1, INSTANCE_DEFAULT, msg_init_p);
|
||||
|
||||
} else {
|
||||
uint32_t not_associated = enb_nb - registered_enb;
|
||||
|
||||
LOG_W(ENB_APP, " %d eNB %s not associated with a MME, retrying registration in %d seconds ...\n",
|
||||
not_associated, not_associated > 1 ? "are" : "is", ENB_REGISTER_RETRY_DELAY);
|
||||
LOG_W(ENB_APP, " %d eNB not associated with a MME, retrying registration in %d seconds ...\n",
|
||||
enb_nb - registered_enb, ENB_REGISTER_RETRY_DELAY);
|
||||
|
||||
/* Restart the eNB registration process in ENB_REGISTER_RETRY_DELAY seconds */
|
||||
if (timer_setup (ENB_REGISTER_RETRY_DELAY, 0, TASK_ENB_APP, INSTANCE_DEFAULT, TIMER_ONE_SHOT,
|
||||
@@ -258,14 +251,14 @@ void *eNB_app_task(void *args_p)
|
||||
break;
|
||||
|
||||
case S1AP_DEREGISTERED_ENB_IND:
|
||||
LOG_W(ENB_APP, "[eNB %d] Received %s: associated MME %d\n", instance, msg_name,
|
||||
LOG_W(ENB_APP, "[eNB %d] Received %s: associated MME %d\n", instance, ITTI_MSG_NAME (msg_p),
|
||||
S1AP_DEREGISTERED_ENB_IND(msg_p).nb_mme);
|
||||
|
||||
/* TODO handle recovering of registration */
|
||||
break;
|
||||
|
||||
case TIMER_HAS_EXPIRED:
|
||||
LOG_I(ENB_APP, " Received %s: timer_id %ld\n", msg_name, TIMER_HAS_EXPIRED(msg_p).timer_id);
|
||||
LOG_I(ENB_APP, " Received %s: timer_id %ld\n", ITTI_MSG_NAME (msg_p), TIMER_HAS_EXPIRED(msg_p).timer_id);
|
||||
|
||||
if (TIMER_HAS_EXPIRED (msg_p).timer_id == enb_register_retry_timer_id) {
|
||||
/* Restart the registration process */
|
||||
@@ -277,7 +270,7 @@ void *eNB_app_task(void *args_p)
|
||||
# endif
|
||||
|
||||
default:
|
||||
LOG_E(ENB_APP, "Received unexpected message %s\n", msg_name);
|
||||
LOG_E(ENB_APP, "Received unexpected message %s\n", ITTI_MSG_NAME (msg_p));
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
+413
-26
@@ -30,8 +30,7 @@
|
||||
#include <string.h>
|
||||
#include <inttypes.h>
|
||||
|
||||
#include "log.h"
|
||||
#include "log_extern.h"
|
||||
#include "common/utils/LOG/log.h"
|
||||
#include "assertions.h"
|
||||
#include "enb_config.h"
|
||||
#include "UTIL/OTG/otg.h"
|
||||
@@ -102,6 +101,53 @@ void RCconfig_flexran()
|
||||
ue_TimersAndConstants_n310, ue_TimersAndConstants_n311,
|
||||
ue_TransmissionMode;
|
||||
|
||||
int32_t ue_multiple_max = 0;
|
||||
|
||||
e_SL_CP_Len_r12 rxPool_sc_CP_Len;
|
||||
e_SL_PeriodComm_r12 rxPool_sc_Period;
|
||||
e_SL_CP_Len_r12 rxPool_data_CP_Len;
|
||||
long rxPool_ResourceConfig_prb_Num;
|
||||
long rxPool_ResourceConfig_prb_Start;
|
||||
long rxPool_ResourceConfig_prb_End;
|
||||
SL_OffsetIndicator_r12_PR rxPool_ResourceConfig_offsetIndicator_present;
|
||||
long rxPool_ResourceConfig_offsetIndicator_choice;
|
||||
SubframeBitmapSL_r12_PR rxPool_ResourceConfig_subframeBitmap_present;
|
||||
char* rxPool_ResourceConfig_subframeBitmap_choice_bs_buf;
|
||||
long rxPool_ResourceConfig_subframeBitmap_choice_bs_size;
|
||||
long rxPool_ResourceConfig_subframeBitmap_choice_bs_bits_unused;
|
||||
|
||||
//SIB19
|
||||
//for discRxPool
|
||||
SL_CP_Len_r12_t discRxPool_cp_Len;
|
||||
e_SL_DiscResourcePool_r12__discPeriod_r12 discRxPool_discPeriod;
|
||||
long discRxPool_numRetx;
|
||||
long discRxPool_numRepetition;
|
||||
long discRxPool_ResourceConfig_prb_Num;
|
||||
long discRxPool_ResourceConfig_prb_Start;
|
||||
long discRxPool_ResourceConfig_prb_End;
|
||||
SL_OffsetIndicator_r12_PR discRxPool_ResourceConfig_offsetIndicator_present;
|
||||
long discRxPool_ResourceConfig_offsetIndicator_choice;
|
||||
SubframeBitmapSL_r12_PR discRxPool_ResourceConfig_subframeBitmap_present;
|
||||
char* discRxPool_ResourceConfig_subframeBitmap_choice_bs_buf;
|
||||
long discRxPool_ResourceConfig_subframeBitmap_choice_bs_size;
|
||||
long discRxPool_ResourceConfig_subframeBitmap_choice_bs_bits_unused;
|
||||
//for discRxPoolPS
|
||||
SL_CP_Len_r12_t discRxPoolPS_cp_Len;
|
||||
e_SL_DiscResourcePool_r12__discPeriod_r12 discRxPoolPS_discPeriod;
|
||||
long discRxPoolPS_numRetx;
|
||||
long discRxPoolPS_numRepetition;
|
||||
long discRxPoolPS_ResourceConfig_prb_Num;
|
||||
long discRxPoolPS_ResourceConfig_prb_Start;
|
||||
long discRxPoolPS_ResourceConfig_prb_End;
|
||||
SL_OffsetIndicator_r12_PR discRxPoolPS_ResourceConfig_offsetIndicator_present;
|
||||
long discRxPoolPS_ResourceConfig_offsetIndicator_choice;
|
||||
SubframeBitmapSL_r12_PR discRxPoolPS_ResourceConfig_subframeBitmap_present;
|
||||
char* discRxPoolPS_ResourceConfig_subframeBitmap_choice_bs_buf;
|
||||
long discRxPoolPS_ResourceConfig_subframeBitmap_choice_bs_size;
|
||||
long discRxPoolPS_ResourceConfig_subframeBitmap_choice_bs_bits_unused;
|
||||
|
||||
|
||||
|
||||
/* get number of eNBs */
|
||||
paramdef_t ENBSParams[] = ENBSPARAMS_DESC;
|
||||
config_get(ENBSParams, sizeof(ENBSParams)/sizeof(paramdef_t), NULL);
|
||||
@@ -182,6 +228,7 @@ void RCconfig_flexran()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void RCconfig_L1(void) {
|
||||
int i,j;
|
||||
paramdef_t L1_Params[] = L1PARAMS_DESC;
|
||||
@@ -197,7 +244,6 @@ void RCconfig_L1(void) {
|
||||
|
||||
config_getlist( &L1_ParamList,L1_Params,sizeof(L1_Params)/sizeof(paramdef_t), NULL);
|
||||
if (L1_ParamList.numelt > 0) {
|
||||
|
||||
for (j = 0; j < RC.nb_L1_inst; j++) {
|
||||
RC.nb_L1_CC[j] = *(L1_ParamList.paramarray[j][L1_CC_IDX].uptr);
|
||||
|
||||
@@ -299,6 +345,8 @@ void RCconfig_macrlc() {
|
||||
RC.nb_mac_CC = (int*)malloc(RC.nb_macrlc_inst*sizeof(int));
|
||||
|
||||
for (j=0;j<RC.nb_macrlc_inst;j++) {
|
||||
RC.mac[j]->puSch10xSnr = *(MacRLC_ParamList.paramarray[j][MACRLC_PUSCH10xSNR_IDX ].iptr);
|
||||
RC.mac[j]->puCch10xSnr = *(MacRLC_ParamList.paramarray[j][MACRLC_PUCCH10xSNR_IDX ].iptr);
|
||||
RC.nb_mac_CC[j] = *(MacRLC_ParamList.paramarray[j][MACRLC_CC_IDX].iptr);
|
||||
//RC.mac[j]->phy_test = *(MacRLC_ParamList.paramarray[j][MACRLC_PHY_TEST_IDX].iptr);
|
||||
//printf("PHY_TEST = %d,%d\n", RC.mac[j]->phy_test, j);
|
||||
@@ -339,7 +387,17 @@ void RCconfig_macrlc() {
|
||||
printf("**************** RETURNED FROM configure_nfapi_vnf() vnf_port:%d\n", RC.mac[j]->eth_params_s.my_portc);
|
||||
} else { // other midhaul
|
||||
AssertFatal(1==0,"MACRLC %d: %s unknown southbound midhaul\n",j,*(MacRLC_ParamList.paramarray[j][MACRLC_TRANSPORT_S_PREFERENCE_IDX].strptr));
|
||||
}
|
||||
}
|
||||
if (strcmp(*(MacRLC_ParamList.paramarray[j][MACRLC_SCHED_MODE_IDX].strptr), "default") == 0){
|
||||
global_scheduler_mode=SCHED_MODE_DEFAULT;
|
||||
printf("sched mode = default %d [%s]\n",global_scheduler_mode,*(MacRLC_ParamList.paramarray[j][MACRLC_SCHED_MODE_IDX].strptr));
|
||||
}else if (strcmp(*(MacRLC_ParamList.paramarray[j][MACRLC_SCHED_MODE_IDX].strptr), "fairRR") == 0){
|
||||
global_scheduler_mode=SCHED_MODE_FAIR_RR;
|
||||
printf("sched mode = fairRR %d [%s]\n",global_scheduler_mode,*(MacRLC_ParamList.paramarray[j][MACRLC_SCHED_MODE_IDX].strptr));
|
||||
}else{
|
||||
global_scheduler_mode=SCHED_MODE_DEFAULT;
|
||||
printf("sched mode = default %d [%s]\n",global_scheduler_mode,*(MacRLC_ParamList.paramarray[j][MACRLC_SCHED_MODE_IDX].strptr));
|
||||
}
|
||||
}// j=0..num_inst
|
||||
} else {// MacRLC_ParamList.numelt > 0
|
||||
AssertFatal (0,
|
||||
@@ -351,7 +409,6 @@ int RCconfig_RRC(MessageDef *msg_p, uint32_t i, eNB_RRC_INST *rrc) {
|
||||
|
||||
int num_enbs = 0;
|
||||
|
||||
int num_component_carriers = 0;
|
||||
int j,k = 0;
|
||||
int32_t enb_id = 0;
|
||||
int nb_cc = 0;
|
||||
@@ -380,7 +437,7 @@ int RCconfig_RRC(MessageDef *msg_p, uint32_t i, eNB_RRC_INST *rrc) {
|
||||
int32_t pucch_delta_shift = 0;
|
||||
int32_t pucch_nRB_CQI = 0;
|
||||
int32_t pucch_nCS_AN = 0;
|
||||
//#if !defined(Rel10) && !defined(Rel14)
|
||||
//#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
int32_t pucch_n1_AN = 0;
|
||||
//#endif
|
||||
int32_t pdsch_referenceSignalPower = 0;
|
||||
@@ -433,6 +490,53 @@ int RCconfig_RRC(MessageDef *msg_p, uint32_t i, eNB_RRC_INST *rrc) {
|
||||
int32_t ue_TimersAndConstants_n311 = 0;
|
||||
int32_t ue_TransmissionMode = 0;
|
||||
|
||||
int32_t ue_multiple_max = 0;
|
||||
|
||||
//TTN - for D2D
|
||||
//SIB18
|
||||
const char* rxPool_sc_CP_Len = NULL;
|
||||
const char* rxPool_sc_Period = NULL;
|
||||
const char* rxPool_data_CP_Len = NULL;
|
||||
libconfig_int rxPool_ResourceConfig_prb_Num = 0;
|
||||
libconfig_int rxPool_ResourceConfig_prb_Start = 0;
|
||||
libconfig_int rxPool_ResourceConfig_prb_End = 0;
|
||||
const char* rxPool_ResourceConfig_offsetIndicator_present = NULL;
|
||||
libconfig_int rxPool_ResourceConfig_offsetIndicator_choice = 0;
|
||||
const char* rxPool_ResourceConfig_subframeBitmap_present = NULL;
|
||||
char* rxPool_ResourceConfig_subframeBitmap_choice_bs_buf = NULL;
|
||||
libconfig_int rxPool_ResourceConfig_subframeBitmap_choice_bs_size = 0;
|
||||
libconfig_int rxPool_ResourceConfig_subframeBitmap_choice_bs_bits_unused = 0;
|
||||
//SIB19
|
||||
//For discRxPool
|
||||
const char* discRxPool_cp_Len = NULL;
|
||||
const char* discRxPool_discPeriod = NULL;
|
||||
libconfig_int discRxPool_numRetx = 0;
|
||||
libconfig_int discRxPool_numRepetition = 0;
|
||||
|
||||
libconfig_int discRxPool_ResourceConfig_prb_Num = 0;
|
||||
libconfig_int discRxPool_ResourceConfig_prb_Start = 0;
|
||||
libconfig_int discRxPool_ResourceConfig_prb_End = 0;
|
||||
const char* discRxPool_ResourceConfig_offsetIndicator_present = NULL;
|
||||
libconfig_int discRxPool_ResourceConfig_offsetIndicator_choice = 0;
|
||||
const char* discRxPool_ResourceConfig_subframeBitmap_present = NULL;
|
||||
char* discRxPool_ResourceConfig_subframeBitmap_choice_bs_buf = NULL;
|
||||
libconfig_int discRxPool_ResourceConfig_subframeBitmap_choice_bs_size = 0;
|
||||
libconfig_int discRxPool_ResourceConfig_subframeBitmap_choice_bs_bits_unused = 0;
|
||||
//For discRxPoolPS
|
||||
const char* discRxPoolPS_cp_Len = NULL;
|
||||
const char* discRxPoolPS_discPeriod = NULL;
|
||||
libconfig_int discRxPoolPS_numRetx = 0;
|
||||
libconfig_int discRxPoolPS_numRepetition = 0;
|
||||
|
||||
libconfig_int discRxPoolPS_ResourceConfig_prb_Num = 0;
|
||||
libconfig_int discRxPoolPS_ResourceConfig_prb_Start = 0;
|
||||
libconfig_int discRxPoolPS_ResourceConfig_prb_End = 0;
|
||||
const char* discRxPoolPS_ResourceConfig_offsetIndicator_present = NULL;
|
||||
libconfig_int discRxPoolPS_ResourceConfig_offsetIndicator_choice = 0;
|
||||
const char* discRxPoolPS_ResourceConfig_subframeBitmap_present = NULL;
|
||||
char* discRxPoolPS_ResourceConfig_subframeBitmap_choice_bs_buf = NULL;
|
||||
libconfig_int discRxPoolPS_ResourceConfig_subframeBitmap_choice_bs_size = 0;
|
||||
libconfig_int discRxPoolPS_ResourceConfig_subframeBitmap_choice_bs_bits_unused = 0;
|
||||
|
||||
int32_t srb1_timer_poll_retransmit = 0;
|
||||
int32_t srb1_timer_reordering = 0;
|
||||
@@ -598,20 +702,14 @@ int RCconfig_RRC(MessageDef *msg_p, uint32_t i, eNB_RRC_INST *rrc) {
|
||||
sprintf(enbpath,"%s.[%i]",ENB_CONFIG_STRING_ENB_LIST,k),
|
||||
config_getlist( &CCsParamList,NULL,0,enbpath);
|
||||
|
||||
LOG_I(RRC,"num component carriers %d \n", num_component_carriers);
|
||||
LOG_I(RRC,"num component carriers %d \n",CCsParamList.numelt);
|
||||
if ( CCsParamList.numelt> 0) {
|
||||
char ccspath[MAX_OPTNAME_SIZE*2 + 16];
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//enb_properties_loc.properties[enb_properties_loc_index]->nb_cc = num_component_carriers;
|
||||
|
||||
|
||||
for (j = 0; j < CCsParamList.numelt ;j++) {
|
||||
|
||||
sprintf(ccspath,"%s.%s.[%i]",enbpath,ENB_CONFIG_STRING_COMPONENT_CARRIERS,j);
|
||||
LOG_I(RRC, "enb_config::RCconfig_RRC() parameter number: %d, total number of parameters: %zd, ccspath: %s \n \n", j, sizeof(CCsParams)/sizeof(paramdef_t), ccspath);
|
||||
config_get( CCsParams,sizeof(CCsParams)/sizeof(paramdef_t),ccspath);
|
||||
|
||||
|
||||
@@ -646,7 +744,7 @@ int RCconfig_RRC(MessageDef *msg_p, uint32_t i, eNB_RRC_INST *rrc) {
|
||||
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for prefix_type choice: NORMAL or EXTENDED !\n",
|
||||
RC.config_file_name, i, prefix_type);
|
||||
}
|
||||
#ifdef Rel14
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
if (!pbch_repetition)
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %d define %s: TRUE,FALSE!\n",
|
||||
@@ -783,13 +881,11 @@ int RCconfig_RRC(MessageDef *msg_p, uint32_t i, eNB_RRC_INST *rrc) {
|
||||
RC.config_file_name, i, prach_zero_correlation);
|
||||
|
||||
RRC_CONFIGURATION_REQ (msg_p).prach_freq_offset[j] = prach_freq_offset;
|
||||
|
||||
if ((prach_freq_offset <0) || (prach_freq_offset > 94))
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for prach_freq_offset choice: 0..94!\n",
|
||||
RC.config_file_name, i, prach_freq_offset);
|
||||
|
||||
|
||||
RRC_CONFIGURATION_REQ (msg_p).pucch_delta_shift[j] = pucch_delta_shift-1;
|
||||
|
||||
if ((pucch_delta_shift <1) || (pucch_delta_shift > 3))
|
||||
@@ -811,7 +907,7 @@ int RCconfig_RRC(MessageDef *msg_p, uint32_t i, eNB_RRC_INST *rrc) {
|
||||
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for pucch_nCS_AN choice: 0..7!\n",
|
||||
RC.config_file_name, i, pucch_nCS_AN);
|
||||
|
||||
#if !defined(Rel10) && !defined(Rel14)
|
||||
//#if (RRC_VERSION < MAKE_VERSION(10, 0, 0))
|
||||
RRC_CONFIGURATION_REQ (msg_p).pucch_n1_AN[j] = pucch_n1_AN;
|
||||
|
||||
if ((pucch_n1_AN <0) || (pucch_n1_AN > 2047))
|
||||
@@ -819,7 +915,7 @@ int RCconfig_RRC(MessageDef *msg_p, uint32_t i, eNB_RRC_INST *rrc) {
|
||||
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for pucch_n1_AN choice: 0..2047!\n",
|
||||
RC.config_file_name, i, pucch_n1_AN);
|
||||
|
||||
#endif
|
||||
//#endif
|
||||
RRC_CONFIGURATION_REQ (msg_p).pdsch_referenceSignalPower[j] = pdsch_referenceSignalPower;
|
||||
|
||||
if ((pdsch_referenceSignalPower <-60) || (pdsch_referenceSignalPower > 50))
|
||||
@@ -991,7 +1087,7 @@ int RCconfig_RRC(MessageDef *msg_p, uint32_t i, eNB_RRC_INST *rrc) {
|
||||
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for pusch_p0_Nominal choice: -126..24 !\n",
|
||||
RC.config_file_name, i, pusch_p0_Nominal);
|
||||
|
||||
#ifndef Rel14
|
||||
#if (RRC_VERSION <= MAKE_VERSION(12, 0, 0))
|
||||
if (strcmp(pusch_alpha,"AL0")==0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).pusch_alpha[j] = UplinkPowerControlCommon__alpha_al0;
|
||||
} else if (strcmp(pusch_alpha,"AL04")==0) {
|
||||
@@ -1009,7 +1105,9 @@ int RCconfig_RRC(MessageDef *msg_p, uint32_t i, eNB_RRC_INST *rrc) {
|
||||
} else if (strcmp(pusch_alpha,"AL1")==0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).pusch_alpha[j] = UplinkPowerControlCommon__alpha_al1;
|
||||
}
|
||||
#else
|
||||
#endif
|
||||
|
||||
#if (RRC_VERSION >= MAKE_VERSION(12, 0, 0))
|
||||
if (strcmp(pusch_alpha,"AL0")==0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).pusch_alpha[j] = Alpha_r12_al0;
|
||||
} else if (strcmp(pusch_alpha,"AL04")==0) {
|
||||
@@ -1212,7 +1310,7 @@ int RCconfig_RRC(MessageDef *msg_p, uint32_t i, eNB_RRC_INST *rrc) {
|
||||
|
||||
|
||||
switch (rach_preambleTransMax) {
|
||||
#ifndef Rel14
|
||||
#if (RRC_VERSION < MAKE_VERSION(14, 0, 0))
|
||||
case 3:
|
||||
RRC_CONFIGURATION_REQ (msg_p).rach_preambleTransMax[j] = RACH_ConfigCommon__ra_SupervisionInfo__preambleTransMax_n3;
|
||||
break;
|
||||
@@ -1442,6 +1540,295 @@ int RCconfig_RRC(MessageDef *msg_p, uint32_t i, eNB_RRC_INST *rrc) {
|
||||
RC.config_file_name, i, ue_TransmissionMode);
|
||||
break;
|
||||
}
|
||||
|
||||
RRC_CONFIGURATION_REQ (msg_p).ue_multiple_max[j] = ue_multiple_max;
|
||||
|
||||
switch (N_RB_DL) {
|
||||
case 25:
|
||||
if ((ue_multiple_max < 1) || (ue_multiple_max > 4))
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for ue_multiple_max choice: 1..4!\n",
|
||||
RC.config_file_name, i, ue_multiple_max);
|
||||
break;
|
||||
case 50:
|
||||
if ((ue_multiple_max < 1) || (ue_multiple_max > 8))
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for ue_multiple_max choice: 1..8!\n",
|
||||
RC.config_file_name, i, ue_multiple_max);
|
||||
break;
|
||||
case 100:
|
||||
if ((ue_multiple_max < 1) || (ue_multiple_max > 16))
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for ue_multiple_max choice: 1..16!\n",
|
||||
RC.config_file_name, i, ue_multiple_max);
|
||||
break;
|
||||
default:
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for N_RB_DL choice: 25,50,100 !\n",
|
||||
RC.config_file_name, i, N_RB_DL);
|
||||
break;
|
||||
}
|
||||
|
||||
//TTN - for D2D
|
||||
//SIB18
|
||||
if (strcmp(rxPool_sc_CP_Len,"normal")==0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).rxPool_sc_CP_Len[j] = SL_CP_Len_r12_normal;
|
||||
} else if (strcmp(rxPool_sc_CP_Len,"extended")==0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).rxPool_sc_CP_Len[j] = SL_CP_Len_r12_extended;
|
||||
} else
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for rxPool_sc_CP_Len choice: normal,extended!\n",
|
||||
RC.config_file_name, i, rxPool_sc_CP_Len);
|
||||
|
||||
if (strcmp(rxPool_sc_Period,"sf40")==0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).rxPool_sc_Period[j] = SL_PeriodComm_r12_sf40;
|
||||
} else if (strcmp(rxPool_sc_Period,"sf60")==0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).rxPool_sc_Period[j] = SL_PeriodComm_r12_sf60;
|
||||
} else if (strcmp(rxPool_sc_Period,"sf70")==0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).rxPool_sc_Period[j] = SL_PeriodComm_r12_sf70;
|
||||
} else if (strcmp(rxPool_sc_Period,"sf80")==0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).rxPool_sc_Period[j] = SL_PeriodComm_r12_sf80;
|
||||
} else if (strcmp(rxPool_sc_Period,"sf120")==0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).rxPool_sc_Period[j] = SL_PeriodComm_r12_sf120;
|
||||
} else if (strcmp(rxPool_sc_Period,"sf140")==0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).rxPool_sc_Period[j] = SL_PeriodComm_r12_sf140;
|
||||
} else if (strcmp(rxPool_sc_Period,"sf160")==0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).rxPool_sc_Period[j] = SL_PeriodComm_r12_sf160;
|
||||
} else if (strcmp(rxPool_sc_Period,"sf240")==0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).rxPool_sc_Period[j] = SL_PeriodComm_r12_sf240;
|
||||
} else if (strcmp(rxPool_sc_Period,"sf280")==0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).rxPool_sc_Period[j] = SL_PeriodComm_r12_sf280;
|
||||
} else if (strcmp(rxPool_sc_Period,"sf320")==0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).rxPool_sc_Period[j] = SL_PeriodComm_r12_sf320;
|
||||
} else if (strcmp(rxPool_sc_Period,"spare6")==0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).rxPool_sc_Period[j] = SL_PeriodComm_r12_spare6;
|
||||
} else if (strcmp(rxPool_sc_Period,"spare5")==0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).rxPool_sc_Period[j] = SL_PeriodComm_r12_spare5;
|
||||
} else if (strcmp(rxPool_sc_Period,"spare4")==0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).rxPool_sc_Period[j] = SL_PeriodComm_r12_spare4;
|
||||
} else if (strcmp(rxPool_sc_Period,"spare3")==0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).rxPool_sc_Period[j] = SL_PeriodComm_r12_spare3;
|
||||
} else if (strcmp(rxPool_sc_Period,"spare2")==0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).rxPool_sc_Period[j] = SL_PeriodComm_r12_spare2;
|
||||
} else if (strcmp(rxPool_sc_Period,"spare")==0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).rxPool_sc_Period[j] = SL_PeriodComm_r12_spare;
|
||||
} else
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for rxPool_sc_Period choice: sf40,sf60,sf70,sf80,sf120,sf140,sf160,sf240,sf280,sf320,spare6,spare5,spare4,spare3,spare2,spare!\n",
|
||||
RC.config_file_name, i, rxPool_sc_Period);
|
||||
|
||||
if (strcmp(rxPool_data_CP_Len,"normal")==0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).rxPool_data_CP_Len[j] = SL_CP_Len_r12_normal;
|
||||
} else if (strcmp(rxPool_data_CP_Len,"extended")==0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).rxPool_data_CP_Len[j] = SL_CP_Len_r12_extended;
|
||||
} else
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for rxPool_data_CP_Len choice: normal,extended!\n",
|
||||
RC.config_file_name, i, rxPool_data_CP_Len);
|
||||
|
||||
RRC_CONFIGURATION_REQ (msg_p).rxPool_ResourceConfig_prb_Num[j] = rxPool_ResourceConfig_prb_Num;
|
||||
RRC_CONFIGURATION_REQ (msg_p).rxPool_ResourceConfig_prb_Start[j] = rxPool_ResourceConfig_prb_Start;
|
||||
RRC_CONFIGURATION_REQ (msg_p).rxPool_ResourceConfig_prb_End[j] = rxPool_ResourceConfig_prb_End;
|
||||
|
||||
if (strcmp(rxPool_ResourceConfig_offsetIndicator_present,"prNothing")==0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).rxPool_ResourceConfig_offsetIndicator_present[j] = SL_OffsetIndicator_r12_PR_NOTHING;
|
||||
} else if (strcmp(rxPool_ResourceConfig_offsetIndicator_present,"prSmall")==0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).rxPool_ResourceConfig_offsetIndicator_present[j] = SL_OffsetIndicator_r12_PR_small_r12;
|
||||
} else if (strcmp(rxPool_ResourceConfig_offsetIndicator_present,"prLarge")==0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).rxPool_ResourceConfig_offsetIndicator_present[j] = SL_OffsetIndicator_r12_PR_large_r12;
|
||||
} else
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for rxPool_ResourceConfig_offsetIndicator_present choice: prNothing,prSmal,prLarge!\n",
|
||||
RC.config_file_name, i, rxPool_ResourceConfig_offsetIndicator_present);
|
||||
|
||||
RRC_CONFIGURATION_REQ (msg_p).rxPool_ResourceConfig_offsetIndicator_choice[j] = rxPool_ResourceConfig_offsetIndicator_choice;
|
||||
|
||||
if (strcmp(rxPool_ResourceConfig_subframeBitmap_present,"prNothing")==0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).rxPool_ResourceConfig_subframeBitmap_present[j] = SubframeBitmapSL_r12_PR_NOTHING;
|
||||
} else if (strcmp(rxPool_ResourceConfig_subframeBitmap_present,"prBs4")==0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).rxPool_ResourceConfig_subframeBitmap_present[j] = SubframeBitmapSL_r12_PR_bs4_r12;
|
||||
} else if (strcmp(rxPool_ResourceConfig_subframeBitmap_present,"prBs8")==0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).rxPool_ResourceConfig_subframeBitmap_present[j] = SubframeBitmapSL_r12_PR_bs8_r12;
|
||||
} else if (strcmp(rxPool_ResourceConfig_subframeBitmap_present,"prBs12")==0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).rxPool_ResourceConfig_subframeBitmap_present[j] = SubframeBitmapSL_r12_PR_bs12_r12;
|
||||
} else if (strcmp(rxPool_ResourceConfig_subframeBitmap_present,"prBs16")==0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).rxPool_ResourceConfig_subframeBitmap_present[j] = SubframeBitmapSL_r12_PR_bs16_r12;
|
||||
} else if (strcmp(rxPool_ResourceConfig_subframeBitmap_present,"prBs30")==0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).rxPool_ResourceConfig_subframeBitmap_present[j] = SubframeBitmapSL_r12_PR_bs30_r12;
|
||||
} else if (strcmp(rxPool_ResourceConfig_subframeBitmap_present,"prBs40")==0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).rxPool_ResourceConfig_subframeBitmap_present[j] = SubframeBitmapSL_r12_PR_bs40_r12;
|
||||
} else if (strcmp(rxPool_ResourceConfig_subframeBitmap_present,"prBs42")==0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).rxPool_ResourceConfig_subframeBitmap_present[j] = SubframeBitmapSL_r12_PR_bs42_r12;
|
||||
} else
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for rxPool_ResourceConfig_subframeBitmap_present choice: prNothing,prBs4,prBs8,prBs12,prBs16,prBs30,prBs40,prBs42!\n",
|
||||
RC.config_file_name, i, rxPool_ResourceConfig_subframeBitmap_present);
|
||||
|
||||
RRC_CONFIGURATION_REQ (msg_p).rxPool_ResourceConfig_subframeBitmap_choice_bs_buf[j] = rxPool_ResourceConfig_subframeBitmap_choice_bs_buf;
|
||||
RRC_CONFIGURATION_REQ (msg_p).rxPool_ResourceConfig_subframeBitmap_choice_bs_size[j] = rxPool_ResourceConfig_subframeBitmap_choice_bs_size;
|
||||
RRC_CONFIGURATION_REQ (msg_p).rxPool_ResourceConfig_subframeBitmap_choice_bs_bits_unused[j] = rxPool_ResourceConfig_subframeBitmap_choice_bs_bits_unused;
|
||||
|
||||
//SIB19 - for discRxPool
|
||||
if (strcmp(discRxPool_cp_Len,"normal")==0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).discRxPool_cp_Len[j] = SL_CP_Len_r12_normal;
|
||||
} else if (strcmp(discRxPool_cp_Len,"extended")==0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).discRxPool_cp_Len[j] = SL_CP_Len_r12_extended;
|
||||
} else
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for discRxPool_cp_Len choice: normal,extended!\n",
|
||||
RC.config_file_name, i, discRxPool_cp_Len);
|
||||
|
||||
|
||||
if (strcmp(discRxPool_discPeriod,"rf32")==0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).discRxPool_discPeriod[j] = SL_DiscResourcePool_r12__discPeriod_r12_rf32;
|
||||
} else if (strcmp(discRxPool_discPeriod,"rf64")==0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).discRxPool_discPeriod[j] = SL_DiscResourcePool_r12__discPeriod_r12_rf64;
|
||||
} else if (strcmp(discRxPool_discPeriod,"rf128")==0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).discRxPool_discPeriod[j] = SL_DiscResourcePool_r12__discPeriod_r12_rf128;
|
||||
} else if (strcmp(discRxPool_discPeriod,"rf256")==0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).discRxPool_discPeriod[j] = SL_DiscResourcePool_r12__discPeriod_r12_rf256;
|
||||
} else if (strcmp(discRxPool_discPeriod,"rf512")==0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).discRxPool_discPeriod[j] = SL_DiscResourcePool_r12__discPeriod_r12_rf512;
|
||||
} else if (strcmp(discRxPool_discPeriod,"rf1024")==0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).discRxPool_discPeriod[j] = SL_DiscResourcePool_r12__discPeriod_r12_rf1024;
|
||||
} else if (strcmp(discRxPool_discPeriod,"rf16")==0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).discRxPool_discPeriod[j] = SL_DiscResourcePool_r12__discPeriod_r12_rf16_v1310;
|
||||
} else if (strcmp(discRxPool_discPeriod,"spare")==0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).discRxPool_discPeriod[j] = SL_DiscResourcePool_r12__discPeriod_r12_spare;
|
||||
} else
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for discRxPool_discPeriod choice: rf32,rf64,rf128,rf512,rf1024,rf16,spare!\n",
|
||||
RC.config_file_name, i, discRxPool_discPeriod);
|
||||
|
||||
|
||||
|
||||
RRC_CONFIGURATION_REQ (msg_p).discRxPool_numRetx[j] = discRxPool_numRetx;
|
||||
RRC_CONFIGURATION_REQ (msg_p).discRxPool_numRepetition[j] = discRxPool_numRepetition;
|
||||
|
||||
|
||||
RRC_CONFIGURATION_REQ (msg_p).discRxPool_ResourceConfig_prb_Num[j] = discRxPool_ResourceConfig_prb_Num;
|
||||
RRC_CONFIGURATION_REQ (msg_p).discRxPool_ResourceConfig_prb_Start[j] = discRxPool_ResourceConfig_prb_Start;
|
||||
RRC_CONFIGURATION_REQ (msg_p).discRxPool_ResourceConfig_prb_End[j] = discRxPool_ResourceConfig_prb_End;
|
||||
|
||||
if (strcmp(discRxPool_ResourceConfig_offsetIndicator_present,"prNothing")==0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).discRxPool_ResourceConfig_offsetIndicator_present[j] = SL_OffsetIndicator_r12_PR_NOTHING;
|
||||
} else if (strcmp(discRxPool_ResourceConfig_offsetIndicator_present,"prSmall")==0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).discRxPool_ResourceConfig_offsetIndicator_present[j] = SL_OffsetIndicator_r12_PR_small_r12;
|
||||
} else if (strcmp(discRxPool_ResourceConfig_offsetIndicator_present,"prLarge")==0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).discRxPool_ResourceConfig_offsetIndicator_present[j] = SL_OffsetIndicator_r12_PR_large_r12;
|
||||
} else
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for discRxPool_ResourceConfig_offsetIndicator_present choice: prNothing,prSmal,prLarge!\n",
|
||||
RC.config_file_name, i, discRxPool_ResourceConfig_offsetIndicator_present);
|
||||
|
||||
RRC_CONFIGURATION_REQ (msg_p).discRxPool_ResourceConfig_offsetIndicator_choice[j] = discRxPool_ResourceConfig_offsetIndicator_choice;
|
||||
|
||||
if (strcmp(discRxPool_ResourceConfig_subframeBitmap_present,"prNothing")==0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).discRxPool_ResourceConfig_subframeBitmap_present[j] = SubframeBitmapSL_r12_PR_NOTHING;
|
||||
} else if (strcmp(discRxPool_ResourceConfig_subframeBitmap_present,"prBs4")==0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).discRxPool_ResourceConfig_subframeBitmap_present[j] = SubframeBitmapSL_r12_PR_bs4_r12;
|
||||
} else if (strcmp(discRxPool_ResourceConfig_subframeBitmap_present,"prBs8")==0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).discRxPool_ResourceConfig_subframeBitmap_present[j] = SubframeBitmapSL_r12_PR_bs8_r12;
|
||||
} else if (strcmp(discRxPool_ResourceConfig_subframeBitmap_present,"prBs12")==0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).discRxPool_ResourceConfig_subframeBitmap_present[j] = SubframeBitmapSL_r12_PR_bs12_r12;
|
||||
} else if (strcmp(discRxPool_ResourceConfig_subframeBitmap_present,"prBs16")==0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).discRxPool_ResourceConfig_subframeBitmap_present[j] = SubframeBitmapSL_r12_PR_bs16_r12;
|
||||
} else if (strcmp(discRxPool_ResourceConfig_subframeBitmap_present,"prBs30")==0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).discRxPool_ResourceConfig_subframeBitmap_present[j] = SubframeBitmapSL_r12_PR_bs30_r12;
|
||||
} else if (strcmp(discRxPool_ResourceConfig_subframeBitmap_present,"prBs40")==0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).discRxPool_ResourceConfig_subframeBitmap_present[j] = SubframeBitmapSL_r12_PR_bs40_r12;
|
||||
} else if (strcmp(discRxPool_ResourceConfig_subframeBitmap_present,"prBs42")==0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).discRxPool_ResourceConfig_subframeBitmap_present[j] = SubframeBitmapSL_r12_PR_bs42_r12;
|
||||
} else
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for discRxPool_ResourceConfig_subframeBitmap_present choice: prNothing,prBs4,prBs8,prBs12,prBs16,prBs30,prBs40,prBs42!\n",
|
||||
RC.config_file_name, i, discRxPool_ResourceConfig_subframeBitmap_present);
|
||||
|
||||
RRC_CONFIGURATION_REQ (msg_p).discRxPool_ResourceConfig_subframeBitmap_choice_bs_buf[j] = discRxPool_ResourceConfig_subframeBitmap_choice_bs_buf;
|
||||
RRC_CONFIGURATION_REQ (msg_p).discRxPool_ResourceConfig_subframeBitmap_choice_bs_size[j] = discRxPool_ResourceConfig_subframeBitmap_choice_bs_size;
|
||||
RRC_CONFIGURATION_REQ (msg_p).discRxPool_ResourceConfig_subframeBitmap_choice_bs_bits_unused[j] = discRxPool_ResourceConfig_subframeBitmap_choice_bs_bits_unused;
|
||||
|
||||
//SIB19 - For discRxPoolPS
|
||||
if (strcmp(discRxPoolPS_cp_Len,"normal")==0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_cp_Len[j] = SL_CP_Len_r12_normal;
|
||||
} else if (strcmp(discRxPoolPS_cp_Len,"extended")==0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_cp_Len[j] = SL_CP_Len_r12_extended;
|
||||
} else
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for discRxPoolPS_cp_Len choice: normal,extended!\n",
|
||||
RC.config_file_name, i, discRxPoolPS_cp_Len);
|
||||
|
||||
|
||||
if (strcmp(discRxPoolPS_discPeriod,"rf32")==0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_discPeriod[j] = SL_DiscResourcePool_r12__discPeriod_r12_rf32;
|
||||
} else if (strcmp(discRxPoolPS_discPeriod,"rf64")==0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_discPeriod[j] = SL_DiscResourcePool_r12__discPeriod_r12_rf64;
|
||||
} else if (strcmp(discRxPoolPS_discPeriod,"rf128")==0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_discPeriod[j] = SL_DiscResourcePool_r12__discPeriod_r12_rf128;
|
||||
} else if (strcmp(discRxPoolPS_discPeriod,"rf256")==0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_discPeriod[j] = SL_DiscResourcePool_r12__discPeriod_r12_rf256;
|
||||
} else if (strcmp(discRxPoolPS_discPeriod,"rf512")==0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_discPeriod[j] = SL_DiscResourcePool_r12__discPeriod_r12_rf512;
|
||||
} else if (strcmp(discRxPoolPS_discPeriod,"rf1024")==0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_discPeriod[j] = SL_DiscResourcePool_r12__discPeriod_r12_rf1024;
|
||||
} else if (strcmp(discRxPoolPS_discPeriod,"rf16")==0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_discPeriod[j] = SL_DiscResourcePool_r12__discPeriod_r12_rf16_v1310;
|
||||
} else if (strcmp(discRxPoolPS_discPeriod,"spare")==0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_discPeriod[j] = SL_DiscResourcePool_r12__discPeriod_r12_spare;
|
||||
} else
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for discRxPoolPS_discPeriod choice: rf32,rf64,rf128,rf512,rf1024,rf16,spare!\n",
|
||||
RC.config_file_name, i, discRxPoolPS_discPeriod);
|
||||
|
||||
|
||||
|
||||
RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_numRetx[j] = discRxPoolPS_numRetx;
|
||||
RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_numRepetition[j] = discRxPoolPS_numRepetition;
|
||||
|
||||
|
||||
RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_ResourceConfig_prb_Num[j] = discRxPoolPS_ResourceConfig_prb_Num;
|
||||
RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_ResourceConfig_prb_Start[j] = discRxPoolPS_ResourceConfig_prb_Start;
|
||||
RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_ResourceConfig_prb_End[j] = discRxPoolPS_ResourceConfig_prb_End;
|
||||
|
||||
if (strcmp(discRxPoolPS_ResourceConfig_offsetIndicator_present,"prNothing")==0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_ResourceConfig_offsetIndicator_present[j] = SL_OffsetIndicator_r12_PR_NOTHING;
|
||||
} else if (strcmp(discRxPoolPS_ResourceConfig_offsetIndicator_present,"prSmall")==0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_ResourceConfig_offsetIndicator_present[j] = SL_OffsetIndicator_r12_PR_small_r12;
|
||||
} else if (strcmp(discRxPoolPS_ResourceConfig_offsetIndicator_present,"prLarge")==0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_ResourceConfig_offsetIndicator_present[j] = SL_OffsetIndicator_r12_PR_large_r12;
|
||||
} else
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for discRxPoolPS_ResourceConfig_offsetIndicator_present choice: prNothing,prSmal,prLarge!\n",
|
||||
RC.config_file_name, i, discRxPoolPS_ResourceConfig_offsetIndicator_present);
|
||||
|
||||
RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_ResourceConfig_offsetIndicator_choice[j] = discRxPoolPS_ResourceConfig_offsetIndicator_choice;
|
||||
|
||||
if (strcmp(discRxPoolPS_ResourceConfig_subframeBitmap_present,"prNothing")==0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_ResourceConfig_subframeBitmap_present[j] = SubframeBitmapSL_r12_PR_NOTHING;
|
||||
} else if (strcmp(discRxPoolPS_ResourceConfig_subframeBitmap_present,"prBs4")==0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_ResourceConfig_subframeBitmap_present[j] = SubframeBitmapSL_r12_PR_bs4_r12;
|
||||
} else if (strcmp(discRxPoolPS_ResourceConfig_subframeBitmap_present,"prBs8")==0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_ResourceConfig_subframeBitmap_present[j] = SubframeBitmapSL_r12_PR_bs8_r12;
|
||||
} else if (strcmp(discRxPoolPS_ResourceConfig_subframeBitmap_present,"prBs12")==0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_ResourceConfig_subframeBitmap_present[j] = SubframeBitmapSL_r12_PR_bs12_r12;
|
||||
} else if (strcmp(discRxPoolPS_ResourceConfig_subframeBitmap_present,"prBs16")==0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_ResourceConfig_subframeBitmap_present[j] = SubframeBitmapSL_r12_PR_bs16_r12;
|
||||
} else if (strcmp(discRxPoolPS_ResourceConfig_subframeBitmap_present,"prBs30")==0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_ResourceConfig_subframeBitmap_present[j] = SubframeBitmapSL_r12_PR_bs30_r12;
|
||||
} else if (strcmp(discRxPoolPS_ResourceConfig_subframeBitmap_present,"prBs40")==0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_ResourceConfig_subframeBitmap_present[j] = SubframeBitmapSL_r12_PR_bs40_r12;
|
||||
} else if (strcmp(discRxPoolPS_ResourceConfig_subframeBitmap_present,"prBs42")==0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_ResourceConfig_subframeBitmap_present[j] = SubframeBitmapSL_r12_PR_bs42_r12;
|
||||
} else
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for discRxPoolPS_ResourceConfig_subframeBitmap_present choice: prNothing,prBs4,prBs8,prBs12,prBs16,prBs30,prBs40,prBs42!\n",
|
||||
RC.config_file_name, i, discRxPoolPS_ResourceConfig_subframeBitmap_present);
|
||||
|
||||
RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_ResourceConfig_subframeBitmap_choice_bs_buf[j] = discRxPoolPS_ResourceConfig_subframeBitmap_choice_bs_buf;
|
||||
RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_ResourceConfig_subframeBitmap_choice_bs_size[j] = discRxPoolPS_ResourceConfig_subframeBitmap_choice_bs_size;
|
||||
RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_ResourceConfig_subframeBitmap_choice_bs_bits_unused[j] = discRxPoolPS_ResourceConfig_subframeBitmap_choice_bs_bits_unused;
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
char srb1path[MAX_OPTNAME_SIZE*2 + 8];
|
||||
@@ -1968,12 +2355,12 @@ int RCconfig_S1(MessageDef *msg_p, uint32_t i) {
|
||||
#endif
|
||||
}
|
||||
if (strcmp(*(S1ParamList.paramarray[l][ENB_MME_IP_ADDRESS_PREFERENCE_IDX].strptr), "ipv4") == 0) {
|
||||
S1AP_REGISTER_ENB_REQ (msg_p).mme_ip_address[j].ipv4 = 1;
|
||||
S1AP_REGISTER_ENB_REQ (msg_p).mme_ip_address[l].ipv4 = 1;
|
||||
} else if (strcmp(*(S1ParamList.paramarray[l][ENB_MME_IP_ADDRESS_PREFERENCE_IDX].strptr), "ipv6") == 0) {
|
||||
S1AP_REGISTER_ENB_REQ (msg_p).mme_ip_address[j].ipv6 = 1;
|
||||
S1AP_REGISTER_ENB_REQ (msg_p).mme_ip_address[l].ipv6 = 1;
|
||||
} else if (strcmp(*(S1ParamList.paramarray[l][ENB_MME_IP_ADDRESS_PREFERENCE_IDX].strptr), "no") == 0) {
|
||||
S1AP_REGISTER_ENB_REQ (msg_p).mme_ip_address[j].ipv4 = 1;
|
||||
S1AP_REGISTER_ENB_REQ (msg_p).mme_ip_address[j].ipv6 = 1;
|
||||
S1AP_REGISTER_ENB_REQ (msg_p).mme_ip_address[l].ipv4 = 1;
|
||||
S1AP_REGISTER_ENB_REQ (msg_p).mme_ip_address[l].ipv6 = 1;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
#include "SystemInformationBlockType2.h"
|
||||
#include "rrc_messages_types.h"
|
||||
#else
|
||||
#include "RRC/LITE/MESSAGES/SystemInformationBlockType2.h"
|
||||
#include "RRC/LTE/MESSAGES/SystemInformationBlockType2.h"
|
||||
#endif
|
||||
#include "intertask_interface_types.h"
|
||||
#include "RRC/LTE/rrc_defs.h"
|
||||
@@ -96,6 +96,7 @@ extern void RCconfig_RU(void);
|
||||
extern void RCconfig_flexran(void);
|
||||
extern void RCconfig_L1(void);
|
||||
extern void RCconfig_macrlc(void);
|
||||
extern void UE_config_stub_pnf(void);
|
||||
extern int RCconfig_gtpu(void );
|
||||
extern void RCConfig(void);
|
||||
|
||||
|
||||
+134
-10
@@ -35,11 +35,6 @@
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#define ENB_CONFIG_STRING_CC_NODE_FUNCTION "node_function"
|
||||
#define ENB_CONFIG_STRING_CC_NODE_TIMING "node_timing"
|
||||
#define ENB_CONFIG_STRING_CC_NODE_SYNCH_REF "node_synch_ref"
|
||||
@@ -259,7 +254,7 @@ typedef enum {
|
||||
#define ENB_CONFIG_STRING_PUCCH_DELTA_SHIFT "pucch_delta_shift"
|
||||
#define ENB_CONFIG_STRING_PUCCH_NRB_CQI "pucch_nRB_CQI"
|
||||
#define ENB_CONFIG_STRING_PUCCH_NCS_AN "pucch_nCS_AN"
|
||||
//#if !defined(Rel10) && !defined(Rel14)
|
||||
//#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
#define ENB_CONFIG_STRING_PUCCH_N1_AN "pucch_n1_AN"
|
||||
//#endif
|
||||
#define ENB_CONFIG_STRING_PDSCH_RS_EPRE "pdsch_referenceSignalPower"
|
||||
@@ -309,7 +304,56 @@ typedef enum {
|
||||
#define ENB_CONFIG_STRING_UETIMERS_N310 "ue_TimersAndConstants_n310"
|
||||
#define ENB_CONFIG_STRING_UETIMERS_N311 "ue_TimersAndConstants_n311"
|
||||
#define ENB_CONFIG_STRING_UE_TRANSMISSION_MODE "ue_TransmissionMode"
|
||||
#define ENB_CONFIG_STRING_UE_MULTIPLE_MAX "ue_multiple_max"
|
||||
|
||||
//TTN - for D2D
|
||||
//SIB18
|
||||
#define ENB_CONFIG_STRING_RXPOOL_SC_CP_LEN "rxPool_sc_CP_Len"
|
||||
#define ENB_CONFIG_STRING_RXPOOL_SC_PRIOD "rxPool_sc_Period"
|
||||
#define ENB_CONFIG_STRING_RXPOOL_DATA_CP_LEN "rxPool_data_CP_Len"
|
||||
#define ENB_CONFIG_STRING_RXPOOL_RC_PRB_NUM "rxPool_ResourceConfig_prb_Num"
|
||||
#define ENB_CONFIG_STRING_RXPOOL_RC_PRB_START "rxPool_ResourceConfig_prb_Start"
|
||||
#define ENB_CONFIG_STRING_RXPOOL_RC_PRB_END "rxPool_ResourceConfig_prb_End"
|
||||
#define ENB_CONFIG_STRING_RXPOOL_RC_OFFSETIND_PRESENT "rxPool_ResourceConfig_offsetIndicator_present"
|
||||
#define ENB_CONFIG_STRING_RXPOOL_RC_OFFSETIND_CHOICE "rxPool_ResourceConfig_offsetIndicator_choice"
|
||||
#define ENB_CONFIG_STRING_RXPOOL_RC_SFBITMAP_PRESENT "rxPool_ResourceConfig_subframeBitmap_present"
|
||||
#define ENB_CONFIG_STRING_RXPOOL_RC_SFBITMAP_CHOICE_BS_BUF "rxPool_ResourceConfig_subframeBitmap_choice_bs_buf"
|
||||
#define ENB_CONFIG_STRING_RXPOOL_RC_SFBITMAP_CHOICE_BS_SIZE "rxPool_ResourceConfig_subframeBitmap_choice_bs_size"
|
||||
#define ENB_CONFIG_STRING_RXPOOL_RC_SFBITMAP_CHOICE_BS_ASN_BITS_UNUSED "rxPool_ResourceConfig_subframeBitmap_choice_bs_bits_unused"
|
||||
//SIB19 for DiscRxPool
|
||||
#define ENB_CONFIG_STRING_DISCRXPOOL_CP_LEN "discRxPool_cp_Len"
|
||||
#define ENB_CONFIG_STRING_DISCRXPOOL_DISCPERIOD "discRxPool_discPeriod"
|
||||
#define ENB_CONFIG_STRING_DISCRXPOOL_NUMRETX "discRxPool_numRetx"
|
||||
#define ENB_CONFIG_STRING_DISCRXPOOL_NUMREPETITION "discRxPool_numRepetition"
|
||||
#define ENB_CONFIG_STRING_DISCRXPOOL_RC_PRB_NUM "discRxPool_ResourceConfig_prb_Num"
|
||||
#define ENB_CONFIG_STRING_DISCRXPOOL_RC_PRB_START "discRxPool_ResourceConfig_prb_Start"
|
||||
#define ENB_CONFIG_STRING_DISCRXPOOL_RC_PRB_END "discRxPool_ResourceConfig_prb_End"
|
||||
#define ENB_CONFIG_STRING_DISCRXPOOL_RC_OFFSETIND_PRESENT "discRxPool_ResourceConfig_offsetIndicator_present"
|
||||
#define ENB_CONFIG_STRING_DISCRXPOOL_RC_OFFSETIND_CHOICE "discRxPool_ResourceConfig_offsetIndicator_choice"
|
||||
#define ENB_CONFIG_STRING_DISCRXPOOL_RC_SFBITMAP_PRESENT "discRxPool_ResourceConfig_subframeBitmap_present"
|
||||
#define ENB_CONFIG_STRING_DISCRXPOOL_RC_SFBITMAP_CHOICE_BS_BUF "discRxPool_ResourceConfig_subframeBitmap_choice_bs_buf"
|
||||
#define ENB_CONFIG_STRING_DISCRXPOOL_RC_SFBITMAP_CHOICE_BS_SIZE "discRxPool_ResourceConfig_subframeBitmap_choice_bs_size"
|
||||
#define ENB_CONFIG_STRING_DISCRXPOOL_RC_SFBITMAP_CHOICE_BS_ASN_BITS_UNUSED "discRxPool_ResourceConfig_subframeBitmap_choice_bs_bits_unused"
|
||||
|
||||
//SIB19 for DiscRxPoolPS
|
||||
#define ENB_CONFIG_STRING_DISCRXPOOLPS_CP_LEN "DISCRXPOOLPS_cp_Len"
|
||||
#define ENB_CONFIG_STRING_DISCRXPOOLPS_DISCPERIOD "DISCRXPOOLPS_discPeriod"
|
||||
#define ENB_CONFIG_STRING_DISCRXPOOLPS_NUMRETX "DISCRXPOOLPS_numRetx"
|
||||
#define ENB_CONFIG_STRING_DISCRXPOOLPS_NUMREPETITION "DISCRXPOOLPS_numRepetition"
|
||||
#define ENB_CONFIG_STRING_DISCRXPOOLPS_RC_PRB_NUM "DISCRXPOOLPS_ResourceConfig_prb_Num"
|
||||
#define ENB_CONFIG_STRING_DISCRXPOOLPS_RC_PRB_START "DISCRXPOOLPS_ResourceConfig_prb_Start"
|
||||
#define ENB_CONFIG_STRING_DISCRXPOOLPS_RC_PRB_END "DISCRXPOOLPS_ResourceConfig_prb_End"
|
||||
#define ENB_CONFIG_STRING_DISCRXPOOLPS_RC_OFFSETIND_PRESENT "DISCRXPOOLPS_ResourceConfig_offsetIndicator_present"
|
||||
#define ENB_CONFIG_STRING_DISCRXPOOLPS_RC_OFFSETIND_CHOICE "DISCRXPOOLPS_ResourceConfig_offsetIndicator_choice"
|
||||
#define ENB_CONFIG_STRING_DISCRXPOOLPS_RC_SFBITMAP_PRESENT "DISCRXPOOLPS_ResourceConfig_subframeBitmap_present"
|
||||
#define ENB_CONFIG_STRING_DISCRXPOOLPS_RC_SFBITMAP_CHOICE_BS_BUF "DISCRXPOOLPS_ResourceConfig_subframeBitmap_choice_bs_buf"
|
||||
#define ENB_CONFIG_STRING_DISCRXPOOLPS_RC_SFBITMAP_CHOICE_BS_SIZE "DISCRXPOOLPS_ResourceConfig_subframeBitmap_choice_bs_size"
|
||||
#define ENB_CONFIG_STRING_DISCRXPOOLPS_RC_SFBITMAP_CHOICE_BS_ASN_BITS_UNUSED "DISCRXPOOLPS_ResourceConfig_subframeBitmap_choice_bs_bits_unused"
|
||||
|
||||
/*-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/
|
||||
/* component carriers configuration parameters */
|
||||
/* optname helpstr paramflags XXXptr defXXXval type numelt */
|
||||
/*-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/
|
||||
/* init for checkedparam_t structure */
|
||||
|
||||
#define CCPARAMS_CHECK { \
|
||||
@@ -381,11 +425,51 @@ typedef enum {
|
||||
{ .s1a= { config_check_modify_integer, UETIMER_N310_OKVALUES, UETIMER_N310_MODVALUES,8}} , \
|
||||
{ .s1a= { config_check_modify_integer, UETIMER_N311_OKVALUES, UETIMER_N311_MODVALUES,8}} , \
|
||||
{ .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 }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
}
|
||||
/*---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/
|
||||
/* component carriers configuration parameters */
|
||||
/* optname helpstr paramflags XXXptr defXXXval type numelt checked_param */
|
||||
/*---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/
|
||||
|
||||
#define CCPARAMS_DESC { \
|
||||
{ENB_CONFIG_STRING_FRAME_TYPE, NULL, 0, strptr:&frame_type, defstrval:"FDD", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_TDD_CONFIG, NULL, 0, iptr:&tdd_config, defintval:3, TYPE_UINT, 0}, \
|
||||
@@ -407,7 +491,7 @@ typedef enum {
|
||||
{ENB_CONFIG_STRING_PUCCH_DELTA_SHIFT, NULL, 0, iptr:&pucch_delta_shift, defintval:1, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_PUCCH_NRB_CQI, NULL, 0, iptr:&pucch_nRB_CQI, defintval:1, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_PUCCH_NCS_AN, NULL, 0, iptr:&pucch_nCS_AN, defintval:0, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_PUCCH_N1_AN, NULL, 0, iptr:&pucch_n1_AN, defintval:32, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_PUCCH_N1_AN, NULL, 0, iptr:&pucch_n1_AN, defintval:0, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_PDSCH_RS_EPRE, NULL, 0, iptr:&pdsch_referenceSignalPower, defintval:-29, TYPE_INT, 0}, \
|
||||
{ENB_CONFIG_STRING_PDSCH_PB, NULL, 0, iptr:&pdsch_p_b, defintval:0, TYPE_INT, 0}, \
|
||||
{ENB_CONFIG_STRING_PUSCH_N_SB, NULL, 0, iptr:&pusch_n_SB, defintval:1, TYPE_INT, 0}, \
|
||||
@@ -454,7 +538,46 @@ typedef enum {
|
||||
{ENB_CONFIG_STRING_UETIMERS_T311, NULL, 0, iptr:&ue_TimersAndConstants_t311, defintval:10000, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_UETIMERS_N310, NULL, 0, iptr:&ue_TimersAndConstants_n310, defintval:20, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_UETIMERS_N311, NULL, 0, iptr:&ue_TimersAndConstants_n311, defintval:1, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_UE_TRANSMISSION_MODE, NULL, 0, iptr:&ue_TransmissionMode, defintval:1, TYPE_UINT, 0} \
|
||||
{ENB_CONFIG_STRING_UE_TRANSMISSION_MODE, NULL, 0, iptr:&ue_TransmissionMode, defintval:1, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_UE_MULTIPLE_MAX, NULL, 0, iptr:&ue_multiple_max, defintval:4, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_RXPOOL_SC_CP_LEN, NULL, 0, strptr:(char **)&rxPool_sc_CP_Len, defstrval:"normal", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_RXPOOL_SC_PRIOD, NULL, 0, strptr:(char **)&rxPool_sc_Period, defstrval:"sf40", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_RXPOOL_DATA_CP_LEN, NULL, 0, strptr:(char **)&rxPool_data_CP_Len, defstrval:"normal", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_RXPOOL_RC_PRB_NUM, NULL, 0, iptr:(int32_t *)&rxPool_ResourceConfig_prb_Num, defintval:1, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_RXPOOL_RC_PRB_START, NULL, 0, iptr:(int32_t *)&rxPool_ResourceConfig_prb_Start, defintval:1, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_RXPOOL_RC_PRB_END, NULL, 0, iptr:(int32_t *)&rxPool_ResourceConfig_prb_End, defintval:1, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_RXPOOL_RC_OFFSETIND_PRESENT, NULL, 0, strptr:(char **)&rxPool_ResourceConfig_offsetIndicator_present, defstrval:"prNothing", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_RXPOOL_RC_OFFSETIND_CHOICE, NULL, 0, iptr:(int32_t *)&rxPool_ResourceConfig_offsetIndicator_choice, defintval:1, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_RXPOOL_RC_SFBITMAP_PRESENT, NULL, 0, strptr:(char **)&rxPool_ResourceConfig_subframeBitmap_present, defstrval:"prNothing", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_RXPOOL_RC_SFBITMAP_CHOICE_BS_BUF, NULL, 0, strptr:(char **)&rxPool_ResourceConfig_subframeBitmap_choice_bs_buf, defstrval:"001001", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_RXPOOL_RC_SFBITMAP_CHOICE_BS_SIZE, NULL, 0, iptr:(int32_t *)&rxPool_ResourceConfig_subframeBitmap_choice_bs_size, defintval:1, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_RXPOOL_RC_SFBITMAP_CHOICE_BS_ASN_BITS_UNUSED, NULL, 0, iptr:(int32_t *)&rxPool_ResourceConfig_subframeBitmap_choice_bs_bits_unused, defintval:1, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_DISCRXPOOL_CP_LEN, NULL, 0, strptr:(char **)&discRxPool_cp_Len, defstrval:"normal", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_DISCRXPOOL_DISCPERIOD, NULL, 0, strptr:(char **)&discRxPool_discPeriod, defstrval:"rf32", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_DISCRXPOOL_NUMRETX, NULL, 0, iptr:(int32_t *)&discRxPool_numRetx, defintval:1, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_DISCRXPOOL_NUMREPETITION, NULL, 0, iptr:(int32_t *)&discRxPool_numRepetition, defintval:1, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_DISCRXPOOL_RC_PRB_NUM, NULL, 0, iptr:(int32_t *)&discRxPool_ResourceConfig_prb_Num, defintval:1, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_DISCRXPOOL_RC_PRB_START, NULL, 0, iptr:(int32_t *)&discRxPool_ResourceConfig_prb_Start, defintval:1, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_DISCRXPOOL_RC_PRB_END, NULL, 0, iptr:(int32_t *)&discRxPool_ResourceConfig_prb_End, defintval:1, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_DISCRXPOOL_RC_OFFSETIND_PRESENT, NULL, 0, strptr:(char **)&discRxPool_ResourceConfig_offsetIndicator_present, defstrval:"prNothing", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_DISCRXPOOL_RC_OFFSETIND_CHOICE, NULL, 0, iptr:(int32_t *)&discRxPool_ResourceConfig_offsetIndicator_choice, defintval:1, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_DISCRXPOOL_RC_SFBITMAP_PRESENT, NULL, 0, strptr:(char **)&discRxPool_ResourceConfig_subframeBitmap_present, defstrval:"prNothing", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_DISCRXPOOL_RC_SFBITMAP_CHOICE_BS_BUF, NULL, 0, strptr:(char **)&discRxPool_ResourceConfig_subframeBitmap_choice_bs_buf, defstrval:"001001", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_DISCRXPOOL_RC_SFBITMAP_CHOICE_BS_SIZE, NULL, 0, iptr:(int32_t *)&discRxPool_ResourceConfig_subframeBitmap_choice_bs_size, defintval:1, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_DISCRXPOOL_RC_SFBITMAP_CHOICE_BS_ASN_BITS_UNUSED,NULL, 0, iptr:(int32_t *)&discRxPool_ResourceConfig_subframeBitmap_choice_bs_bits_unused, defintval:1, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_DISCRXPOOLPS_CP_LEN, NULL, 0, strptr:(char **)&discRxPoolPS_cp_Len, defstrval:"normal", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_DISCRXPOOLPS_DISCPERIOD, NULL, 0, strptr:(char **)&discRxPoolPS_discPeriod, defstrval:"rf32", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_DISCRXPOOLPS_NUMRETX, NULL, 0, iptr:(int32_t *)&discRxPoolPS_numRetx, defintval:1, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_DISCRXPOOLPS_NUMREPETITION, NULL, 0, iptr:(int32_t *)&discRxPoolPS_numRepetition, defintval:1, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_DISCRXPOOLPS_RC_PRB_NUM, NULL, 0, iptr:(int32_t *)&discRxPoolPS_ResourceConfig_prb_Num, defintval:1, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_DISCRXPOOLPS_RC_PRB_START, NULL, 0, iptr:(int32_t *)&discRxPoolPS_ResourceConfig_prb_Start, defintval:1, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_DISCRXPOOLPS_RC_PRB_END, NULL, 0, iptr:(int32_t *)&discRxPoolPS_ResourceConfig_prb_End, defintval:1, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_DISCRXPOOLPS_RC_OFFSETIND_PRESENT, NULL, 0, strptr:(char **)&discRxPoolPS_ResourceConfig_offsetIndicator_present, defstrval:"prNothing", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_DISCRXPOOLPS_RC_OFFSETIND_CHOICE, NULL, 0, iptr:(int32_t *)&discRxPoolPS_ResourceConfig_offsetIndicator_choice, defintval:1, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_DISCRXPOOLPS_RC_SFBITMAP_PRESENT, NULL, 0, strptr:(char **)&discRxPoolPS_ResourceConfig_subframeBitmap_present, defstrval:"prNothing", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_DISCRXPOOLPS_RC_SFBITMAP_CHOICE_BS_BUF, NULL, 0, strptr:(char **)&discRxPoolPS_ResourceConfig_subframeBitmap_choice_bs_buf, defstrval:"001001", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_DISCRXPOOLPS_RC_SFBITMAP_CHOICE_BS_SIZE, NULL, 0, iptr:(int32_t *)&discRxPoolPS_ResourceConfig_subframeBitmap_choice_bs_size, defintval:1, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_DISCRXPOOLPS_RC_SFBITMAP_CHOICE_BS_ASN_BITS_UNUSED,NULL, 0, iptr:(int32_t *)&discRxPoolPS_ResourceConfig_subframeBitmap_choice_bs_bits_unused, defintval:1, TYPE_UINT, 0} \
|
||||
}
|
||||
|
||||
#define ENB_CONFIG_FRAME_TYPE_IDX 0
|
||||
@@ -705,9 +828,9 @@ typedef enum {
|
||||
#define CONFIG_STRING_MACRLC_REMOTE_S_PORTC "remote_s_portc"
|
||||
#define CONFIG_STRING_MACRLC_LOCAL_S_PORTD "local_s_portd"
|
||||
#define CONFIG_STRING_MACRLC_REMOTE_S_PORTD "remote_s_portd"
|
||||
#define CONFIG_STRING_MACRLC_SCHED_MODE "scheduler_mode"
|
||||
#define CONFIG_STRING_MACRLC_PHY_TEST_MODE "phy_test_mode"
|
||||
|
||||
|
||||
#define MACRLC_CC_IDX 0
|
||||
#define MACRLC_TRANSPORT_N_PREFERENCE_IDX 1
|
||||
#define MACRLC_LOCAL_N_IF_NAME_IDX 2
|
||||
@@ -725,5 +848,6 @@ typedef enum {
|
||||
#define MACRLC_REMOTE_S_PORTC_IDX 14
|
||||
#define MACRLC_LOCAL_S_PORTD_IDX 15
|
||||
#define MACRLC_REMOTE_S_PORTD_IDX 16
|
||||
#define MACRLC_PHY_TEST_IDX 17
|
||||
#define MACRLC_SCHED_MODE_IDX 17
|
||||
#define MACRLC_PHY_TEST_IDX 18
|
||||
/*---------------------------------------------------------------------------------------------------------------------------------------------------------*/
|
||||
|
||||
@@ -47,11 +47,10 @@ void *flexran_agent_task(void *args){
|
||||
Protocol__FlexranMessage *msg;
|
||||
void *data;
|
||||
int size;
|
||||
err_code_t err_code;
|
||||
err_code_t err_code=0;
|
||||
int priority = 0;
|
||||
|
||||
MessageDef *msg_p = NULL;
|
||||
const char *msg_name = NULL;
|
||||
int result;
|
||||
struct flexran_agent_timer_element_s * elem = NULL;
|
||||
|
||||
@@ -61,7 +60,6 @@ void *flexran_agent_task(void *args){
|
||||
// Wait for a message
|
||||
itti_receive_msg (TASK_FLEXRAN_AGENT, &msg_p);
|
||||
DevAssert(msg_p != NULL);
|
||||
msg_name = ITTI_MSG_NAME (msg_p);
|
||||
|
||||
switch (ITTI_MSG_ID(msg_p)) {
|
||||
case TERMINATE_MESSAGE:
|
||||
@@ -88,7 +86,7 @@ void *flexran_agent_task(void *args){
|
||||
break;
|
||||
|
||||
default:
|
||||
LOG_E(FLEXRAN_AGENT, "Received unexpected message %s\n", msg_name);
|
||||
LOG_E(FLEXRAN_AGENT, "Received unexpected message %s\n", ITTI_MSG_NAME (msg_p));
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -96,7 +94,8 @@ void *flexran_agent_task(void *args){
|
||||
AssertFatal (result == EXIT_SUCCESS, "Failed to free memory (%d)!\n", result);
|
||||
continue;
|
||||
error:
|
||||
LOG_E(FLEXRAN_AGENT,"flexran_agent_task: error %d occured\n",err_code);
|
||||
if (err_code != 0)
|
||||
LOG_E(FLEXRAN_AGENT,"flexran_agent_task: error %d occured\n",err_code);
|
||||
} while (1);
|
||||
|
||||
return NULL;
|
||||
@@ -108,7 +107,7 @@ void *receive_thread(void *args) {
|
||||
void *data;
|
||||
int size;
|
||||
int priority;
|
||||
err_code_t err_code;
|
||||
err_code_t err_code=0;
|
||||
|
||||
Protocol__FlexranMessage *msg;
|
||||
|
||||
@@ -140,7 +139,8 @@ void *receive_thread(void *args) {
|
||||
return NULL;
|
||||
|
||||
error:
|
||||
LOG_E(FLEXRAN_AGENT,"receive_thread: error %d occured\n",err_code);
|
||||
if (err_code != 0)
|
||||
LOG_E(FLEXRAN_AGENT,"receive_thread: error %d occured\n",err_code);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -299,7 +299,7 @@ Protocol__FlexranMessage *flexran_agent_timeout(void* args){
|
||||
//memcpy (timer_args, args, sizeof(*timer_args));
|
||||
flexran_agent_timer_args_t *timer_args = (flexran_agent_timer_args_t *) args;
|
||||
|
||||
LOG_I(FLEXRAN_AGENT, "flexran_agent %d timeout\n", timer_args->mod_id);
|
||||
LOG_UI(FLEXRAN_AGENT, "flexran_agent %d timeout\n", timer_args->mod_id);
|
||||
//LOG_I(FLEXRAN_AGENT, "eNB action %d ENB flags %d \n", timer_args->cc_actions,timer_args->cc_report_flags);
|
||||
//LOG_I(FLEXRAN_AGENT, "UE action %d UE flags %d \n", timer_args->ue_actions,timer_args->ue_report_flags);
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
#include "flexran_agent_async.h"
|
||||
#include "flexran_agent_defs.h"
|
||||
|
||||
#include "log.h"
|
||||
#include "common/utils/LOG/log.h"
|
||||
|
||||
flexran_agent_async_channel_t * flexran_agent_async_channel_info(mid_t mod_id, char *dst_ip, uint16_t dst_port) {
|
||||
|
||||
|
||||
@@ -102,7 +102,7 @@ typedef enum {
|
||||
} ran_name_t;
|
||||
|
||||
typedef uint8_t xid_t;
|
||||
typedef uint8_t mid_t; // module or enb id
|
||||
typedef uint16_t mid_t; // module or enb id
|
||||
typedef uint8_t lcid_t;
|
||||
typedef int32_t err_code_t;
|
||||
|
||||
|
||||
@@ -130,16 +130,15 @@ void * flexran_agent_pack_message(Protocol__FlexranMessage *msg,
|
||||
int * size){
|
||||
|
||||
void * buffer;
|
||||
err_code_t err_code = PROTOCOL__FLEXRAN_ERR__NO_ERR;
|
||||
|
||||
if (flexran_agent_serialize_message(msg, &buffer, size) < 0 ) {
|
||||
err_code = PROTOCOL__FLEXRAN_ERR__MSG_ENCODING;
|
||||
LOG_E(FLEXRAN_AGENT,"errno %d occured\n",PROTOCOL__FLEXRAN_ERR__MSG_ENCODING);
|
||||
goto error;
|
||||
}
|
||||
|
||||
// free the msg --> later keep this in the data struct and just update the values
|
||||
//TODO call proper destroy function
|
||||
err_code = ((*message_destruction_callback[msg->msg_case-1])(msg));
|
||||
((*message_destruction_callback[msg->msg_case-1])(msg));
|
||||
|
||||
DevAssert(buffer !=NULL);
|
||||
|
||||
@@ -148,8 +147,6 @@ void * flexran_agent_pack_message(Protocol__FlexranMessage *msg,
|
||||
return buffer;
|
||||
|
||||
error :
|
||||
LOG_E(FLEXRAN_AGENT,"errno %d occured\n",err_code);
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
*/
|
||||
|
||||
#include "flexran_agent_net_comm.h"
|
||||
#include "log.h"
|
||||
#include "common/utils/LOG/log.h"
|
||||
|
||||
flexran_agent_channel_t *agent_channel[NUM_MAX_ENB][FLEXRAN_AGENT_MAX];
|
||||
flexran_agent_channel_instance_t channel_instance;
|
||||
|
||||
@@ -140,7 +140,11 @@ rlc_buffer_occupancy_t flexran_get_tx_queue_size(mid_t mod_id, mid_t ue_id, logi
|
||||
rnti_t rnti = flexran_get_ue_crnti(mod_id, ue_id);
|
||||
frame_t frame = flexran_get_current_frame(mod_id);
|
||||
sub_frame_t subframe = flexran_get_current_subframe(mod_id);
|
||||
mac_rlc_status_resp_t rlc_status = mac_rlc_status_ind(mod_id,rnti, mod_id, frame, subframe, ENB_FLAG_YES,MBMS_FLAG_NO, channel_id, 0);
|
||||
mac_rlc_status_resp_t rlc_status = mac_rlc_status_ind(mod_id,rnti, mod_id, frame, subframe, ENB_FLAG_YES,MBMS_FLAG_NO, channel_id, 0
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
,0, 0
|
||||
#endif
|
||||
);
|
||||
return rlc_status.bytes_in_buffer;
|
||||
}
|
||||
|
||||
@@ -149,7 +153,11 @@ rlc_buffer_occupancy_t flexran_get_num_pdus_buffer(mid_t mod_id, mid_t ue_id, lo
|
||||
rnti_t rnti = flexran_get_ue_crnti(mod_id,ue_id);
|
||||
frame_t frame = flexran_get_current_frame(mod_id);
|
||||
sub_frame_t subframe = flexran_get_current_subframe(mod_id);
|
||||
mac_rlc_status_resp_t rlc_status = mac_rlc_status_ind(mod_id,rnti, mod_id, frame, subframe, ENB_FLAG_YES,MBMS_FLAG_NO, channel_id, 0);
|
||||
mac_rlc_status_resp_t rlc_status = mac_rlc_status_ind(mod_id,rnti, mod_id, frame, subframe, ENB_FLAG_YES,MBMS_FLAG_NO, channel_id, 0
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
,0, 0
|
||||
#endif
|
||||
);
|
||||
return rlc_status.pdus_in_buffer;
|
||||
}
|
||||
|
||||
@@ -158,7 +166,11 @@ frame_t flexran_get_hol_delay(mid_t mod_id, mid_t ue_id, logical_chan_id_t chann
|
||||
rnti_t rnti = flexran_get_ue_crnti(mod_id,ue_id);
|
||||
frame_t frame = flexran_get_current_frame(mod_id);
|
||||
sub_frame_t subframe = flexran_get_current_subframe(mod_id);
|
||||
mac_rlc_status_resp_t rlc_status = mac_rlc_status_ind(mod_id, rnti, mod_id, frame, subframe, ENB_FLAG_YES, MBMS_FLAG_NO, channel_id, 0);
|
||||
mac_rlc_status_resp_t rlc_status = mac_rlc_status_ind(mod_id, rnti, mod_id, frame, subframe, ENB_FLAG_YES, MBMS_FLAG_NO, channel_id, 0
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
,0, 0
|
||||
#endif
|
||||
);
|
||||
return rlc_status.head_sdu_creation_time;
|
||||
}
|
||||
|
||||
|
||||
@@ -19,13 +19,13 @@
|
||||
* contact@openairinterface.org
|
||||
*/
|
||||
|
||||
/*! \file openair2/ENB_APP/L1_paramdef.f
|
||||
/*! \file openair2/GNB_APP/L1_nr_paramdef.f
|
||||
* \brief definition of configuration parameters for all eNodeB modules
|
||||
* \author Francois TABURET
|
||||
* \date 2017
|
||||
* \author Francois TABURET, WEI-TAI CHEN
|
||||
* \date 2018
|
||||
* \version 0.1
|
||||
* \company NOKIA BellLabs France
|
||||
* \email: francois.taburet@nokia-bell-labs.com
|
||||
* \company NOKIA BellLabs France, NTUST
|
||||
* \email: francois.taburet@nokia-bell-labs.com, kroempa@gmail.com
|
||||
* \note
|
||||
* \warning
|
||||
*/
|
||||
|
||||
@@ -19,13 +19,13 @@
|
||||
* contact@openairinterface.org
|
||||
*/
|
||||
|
||||
/*! \file openair2/ENB_APP/MACRLC_paramdef.f
|
||||
* \brief definition of configuration parameters for all eNodeB modules
|
||||
* \author Francois TABURET
|
||||
* \date 2017
|
||||
/*! \file openair2/GNB_APP/MACRLC_nr_paramdef.f
|
||||
* \brief definition of configuration parameters for all gNodeB modules
|
||||
* \author Francois TABURET, WEI-TAI CHEN
|
||||
* \date 2018
|
||||
* \version 0.1
|
||||
* \company NOKIA BellLabs France
|
||||
* \email: francois.taburet@nokia-bell-labs.com
|
||||
* \company NOKIA BellLabs France, NTUST
|
||||
* \email: francois.taburet@nokia-bell-labs.com, kroempa@gmail.com
|
||||
* \note
|
||||
* \warning
|
||||
*/
|
||||
|
||||
@@ -19,13 +19,13 @@
|
||||
* contact@openairinterface.org
|
||||
*/
|
||||
|
||||
/*! \file openair2/GNB_APP/RRC_paramsvalues.h
|
||||
/*! \file openair2/GNB_APP/RRC_nr_paramsvalues.h
|
||||
* \brief macro definitions for RRC authorized and asn1 parameters values, to be used in paramdef_t/chechedparam_t structure initializations
|
||||
* \author Francois TABURET
|
||||
* \date 2017
|
||||
* \author Francois TABURET, WEI-TAI CHEN
|
||||
* \date 2018
|
||||
* \version 0.1
|
||||
* \company NOKIA BellLabs France
|
||||
* \email: francois.taburet@nokia-bell-labs.com
|
||||
* \company NOKIA BellLabs France, NTUST
|
||||
* \email: francois.taburet@nokia-bell-labs.com, kroempa@gmail.com
|
||||
* \note
|
||||
* \warning
|
||||
*/
|
||||
|
||||
@@ -22,9 +22,9 @@
|
||||
/*
|
||||
gnb_app.c
|
||||
-------------------
|
||||
AUTHOR : Laurent Winckel, Sebastien ROUX, Lionel GAUTHIER, Navid Nikaein
|
||||
COMPANY : EURECOM
|
||||
EMAIL : Lionel.Gauthier@eurecom.fr and Navid Nikaein
|
||||
AUTHOR : Laurent Winckel, Sebastien ROUX, Lionel GAUTHIER, Navid Nikaein, WEI-TAI CHEN
|
||||
COMPANY : EURECOM, NTUST
|
||||
EMAIL : Lionel.Gauthier@eurecom.fr and Navid Nikaein, kroempa@gmail.com
|
||||
*/
|
||||
|
||||
#include <string.h>
|
||||
|
||||
@@ -22,9 +22,9 @@
|
||||
/*
|
||||
gnb_app.h
|
||||
-------------------
|
||||
AUTHOR : Laurent Winckel, Sebastien ROUX, Lionel GAUTHIER, Navid Nikaein
|
||||
COMPANY : EURECOM
|
||||
EMAIL : Lionel.Gauthier@eurecom.fr
|
||||
AUTHOR : Laurent Winckel, Sebastien ROUX, Lionel GAUTHIER, Navid Nikaein, WEI-TAI CHEN
|
||||
COMPANY : EURECOM, NTUST
|
||||
EMAIL : Lionel.Gauthier@eurecom.fr, kroempa@gmail.com
|
||||
*/
|
||||
|
||||
#ifndef GNB_APP_H_
|
||||
|
||||
+233
-125
@@ -20,18 +20,18 @@
|
||||
*/
|
||||
|
||||
/*
|
||||
enb_config.c
|
||||
gnb_config.c
|
||||
-------------------
|
||||
AUTHOR : Lionel GAUTHIER, navid nikaein, Laurent Winckel
|
||||
COMPANY : EURECOM
|
||||
EMAIL : Lionel.Gauthier@eurecom.fr, navid.nikaein@eurecom.fr
|
||||
AUTHOR : Lionel GAUTHIER, navid nikaein, Laurent Winckel, WEI-TAI CHEN
|
||||
COMPANY : EURECOM, NTUST
|
||||
EMAIL : Lionel.Gauthier@eurecom.fr, navid.nikaein@eurecom.fr, kroempa@gmail.com
|
||||
*/
|
||||
|
||||
#include <string.h>
|
||||
#include <inttypes.h>
|
||||
|
||||
#include "log.h"
|
||||
#include "log_extern.h"
|
||||
#include "common/utils/LOG/log.h"
|
||||
#include "common/utils/LOG/log_extern.h"
|
||||
#include "assertions.h"
|
||||
#include "gnb_config.h"
|
||||
#include "UTIL/OTG/otg.h"
|
||||
@@ -60,6 +60,22 @@
|
||||
#include "gnb_paramdef.h"
|
||||
#include "LAYER2/NR_MAC_gNB/mac_proto.h"
|
||||
|
||||
#include "NR_SCS-SpecificCarrier.h"
|
||||
#include "NR_TDD-UL-DL-ConfigCommon.h"
|
||||
#include "NR_FrequencyInfoUL.h"
|
||||
#include "NR_RACH-ConfigGeneric.h"
|
||||
#include "NR_RACH-ConfigCommon.h"
|
||||
#include "NR_PUSCH-TimeDomainResourceAllocation.h"
|
||||
#include "NR_PUSCH-ConfigCommon.h"
|
||||
#include "NR_PUCCH-ConfigCommon.h"
|
||||
#include "NR_PDSCH-TimeDomainResourceAllocation.h"
|
||||
#include "NR_PDSCH-ConfigCommon.h"
|
||||
#include "NR_RateMatchPattern.h"
|
||||
#include "NR_RateMatchPatternLTE-CRS.h"
|
||||
#include "NR_SearchSpace.h"
|
||||
#include "NR_ControlResourceSet.h"
|
||||
#include "NR_EUTRA-MBSFN-SubframeConfig.h"
|
||||
|
||||
extern uint16_t sf_ahead;
|
||||
|
||||
void RCconfig_nr_flexran()
|
||||
@@ -81,7 +97,9 @@ void RCconfig_nr_flexran()
|
||||
char *frame_type, *DL_prefix_type, *UL_prefix_type, *SIB1_frequencyOffsetSSB,
|
||||
*DL_SCS_SubcarrierSpacing, *DL_BWP_SubcarrierSpacing, *DL_BWP_prefix_type,
|
||||
*UL_frequencyShift7p5khz, *UL_SCS_SubcarrierSpacing, *UL_BWP_SubcarrierSpacing,
|
||||
*UL_BWP_prefix_type, *ServingCellConfigCommon_ssb_PositionsInBurst_PR,
|
||||
*UL_BWP_prefix_type, *UL_timeAlignmentTimerCommon,
|
||||
*ServingCellConfigCommon_n_TimingAdvanceOffset,
|
||||
*ServingCellConfigCommon_ssb_PositionsInBurst_PR,
|
||||
*NIA_SubcarrierSpacing, *referenceSubcarrierSpacing, *dl_UL_TransmissionPeriodicity,
|
||||
*rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_choice,
|
||||
*rach_groupBconfigured, *rach_messagePowerOffsetGroupB,
|
||||
@@ -101,11 +119,11 @@ void RCconfig_nr_flexran()
|
||||
int32_t eutra_band, uplink_frequency_offset, N_RB_DL, nb_antenna_ports,
|
||||
MIB_subCarrierSpacingCommon, MIB_ssb_SubcarrierOffset, MIB_dmrs_TypeA_Position,
|
||||
pdcch_ConfigSIB1, SIB1_ssb_PeriodicityServingCell, SIB1_ss_PBCH_BlockPower,
|
||||
absoluteFrequencySSB, ssb_SubcarrierOffset, DL_FreqBandIndicatorNR,
|
||||
DL_absoluteFrequencyPointA, DL_offsetToCarrier, DL_SCS_SpecificCarrier_k0,
|
||||
absoluteFrequencySSB, DL_FreqBandIndicatorNR,
|
||||
DL_absoluteFrequencyPointA, DL_offsetToCarrier,
|
||||
DL_carrierBandwidth, DL_locationAndBandwidth, UL_FreqBandIndicatorNR,
|
||||
UL_absoluteFrequencyPointA, UL_additionalSpectrumEmission, UL_p_Max,
|
||||
UL_offsetToCarrier, UL_SCS_SpecificCarrier_k0, UL_carrierBandwidth,
|
||||
UL_offsetToCarrier, UL_carrierBandwidth,
|
||||
UL_locationAndBandwidth, ServingCellConfigCommon_ssb_periodicityServingCell,
|
||||
ServingCellConfigCommon_dmrs_TypeA_Position, ServingCellConfigCommon_ss_PBCH_BlockPower,
|
||||
nrofDownlinkSlots, nrofDownlinkSymbols, nrofUplinkSlots, nrofUplinkSymbols,
|
||||
@@ -122,20 +140,19 @@ void RCconfig_nr_flexran()
|
||||
prach_RootSequenceIndex_l139, prach_ConfigurationIndex, prach_msg1_FrequencyStart,
|
||||
zeroCorrelationZoneConfig, preambleReceivedTargetPower, preambleTransMax,
|
||||
ra_ResponseWindow, msg3_DeltaPreamble, p0_NominalWithGrant,
|
||||
PUSCH_TimeDomainResourceAllocation_k2, p0_nominal, PDSCH_TimeDomainResourceAllocation_k0,
|
||||
PUSCH_TimeDomainResourceAllocation_k2,
|
||||
PUSCH_TimeDomainResourceAllocation_startSymbolAndLength,
|
||||
pucch_ResourceCommon, hoppingId, p0_nominal, PDSCH_TimeDomainResourceAllocation_k0,
|
||||
PDSCH_TimeDomainResourceAllocation_startSymbolAndLength,
|
||||
rateMatchPatternId, periodicityAndPattern, RateMatchPattern_controlResourceSet,
|
||||
controlResourceSetZero, searchSpaceZero,
|
||||
searchSpaceSIB1, searchSpaceOtherSystemInformation, pagingSearchSpace,
|
||||
ra_SearchSpace, rach_ra_ControlResourceSet, PDCCH_common_controlResourceSetId,
|
||||
ra_SearchSpace, PDCCH_common_controlResourceSetId,
|
||||
PDCCH_common_ControlResourceSet_duration, PDCCH_reg_BundleSize, PDCCH_interleaverSize,
|
||||
PDCCH_shiftIndex, PDCCH_TCI_StateId, SearchSpaceId, commonSearchSpaces_controlResourceSetId,
|
||||
SearchSpace_monitoringSlotPeriodicityAndOffset_sl1,
|
||||
SearchSpace_monitoringSlotPeriodicityAndOffset_sl2,
|
||||
SearchSpace_monitoringSlotPeriodicityAndOffset_sl4,
|
||||
SearchSpace_monitoringSlotPeriodicityAndOffset_sl5,
|
||||
SearchSpace_monitoringSlotPeriodicityAndOffset_sl8,
|
||||
SearchSpace_monitoringSlotPeriodicityAndOffset_sl10,
|
||||
SearchSpace_monitoringSlotPeriodicityAndOffset_sl16,
|
||||
SearchSpace_monitoringSlotPeriodicityAndOffset_sl20,
|
||||
PDCCH_shiftIndex, PDCCH_TCI_StateId, PDCCH_DMRS_ScramblingID,
|
||||
SearchSpaceId, commonSearchSpaces_controlResourceSetId,
|
||||
SearchSpace_monitoringSlotPeriodicityAndOffset_value,
|
||||
SearchSpace_duration,
|
||||
SearchSpace_nrofCandidates_aggregationLevel1,
|
||||
SearchSpace_nrofCandidates_aggregationLevel2,
|
||||
SearchSpace_nrofCandidates_aggregationLevel4,
|
||||
@@ -398,7 +415,7 @@ void RCconfig_nr_macrlc() {
|
||||
|
||||
}
|
||||
|
||||
int RCconfig_NRRRC(MessageDef *msg_p, uint32_t i, gNB_RRC_INST *rrc) {
|
||||
void RCconfig_NRRRC(MessageDef *msg_p, uint32_t i, gNB_RRC_INST *rrc) {
|
||||
|
||||
int num_gnbs = 0;
|
||||
int num_component_carriers = 0;
|
||||
@@ -428,23 +445,22 @@ int RCconfig_NRRRC(MessageDef *msg_p, uint32_t i, gNB_RRC_INST *rrc) {
|
||||
char* SIB1_frequencyOffsetSSB = NULL;
|
||||
int32_t SIB1_ssb_PeriodicityServingCell = 0;
|
||||
int32_t SIB1_ss_PBCH_BlockPower = 0;
|
||||
//DownlinkConfigCommon
|
||||
//NR FrequencyInfoDL
|
||||
int32_t absoluteFrequencySSB = 0;
|
||||
int32_t ssb_SubcarrierOffset = 0;
|
||||
int32_t DL_FreqBandIndicatorNR = 0;
|
||||
int32_t DL_absoluteFrequencyPointA = 0;
|
||||
|
||||
//NR DL SCS-SpecificCarrier
|
||||
int32_t DL_offsetToCarrier = 0;
|
||||
char* DL_SCS_SubcarrierSpacing = 0;
|
||||
int32_t DL_SCS_SpecificCarrier_k0 = 0;
|
||||
int32_t DL_carrierBandwidth = 0;
|
||||
|
||||
// NR BWP-DownlinkCommon
|
||||
int32_t DL_locationAndBandwidth = 0;
|
||||
char* DL_BWP_SubcarrierSpacing = 0;
|
||||
char* DL_BWP_prefix_type = NULL;
|
||||
|
||||
|
||||
//NR FrequencyInfoUL
|
||||
int32_t UL_FreqBandIndicatorNR = 0;
|
||||
int32_t UL_absoluteFrequencyPointA = 0;
|
||||
@@ -455,14 +471,15 @@ int RCconfig_NRRRC(MessageDef *msg_p, uint32_t i, gNB_RRC_INST *rrc) {
|
||||
//NR UL SCS-SpecificCarrier
|
||||
int32_t UL_offsetToCarrier = 0;
|
||||
char* UL_SCS_SubcarrierSpacing = 0;
|
||||
int32_t UL_SCS_SpecificCarrier_k0 = 0;
|
||||
int32_t UL_carrierBandwidth = 0;
|
||||
|
||||
// NR BWP-UplinkCommon
|
||||
int32_t UL_locationAndBandwidth = 0;
|
||||
char* UL_BWP_SubcarrierSpacing = 0;
|
||||
char* UL_BWP_prefix_type = NULL;
|
||||
char* UL_timeAlignmentTimerCommon = 0;
|
||||
|
||||
char* ServingCellConfigCommon_n_TimingAdvanceOffset = 0;
|
||||
char* ServingCellConfigCommon_ssb_PositionsInBurst_PR = 0;
|
||||
int32_t ServingCellConfigCommon_ssb_periodicityServingCell = 0;
|
||||
int32_t ServingCellConfigCommon_dmrs_TypeA_Position = 0;
|
||||
@@ -521,15 +538,19 @@ int RCconfig_NRRRC(MessageDef *msg_p, uint32_t i, gNB_RRC_INST *rrc) {
|
||||
///PUSCH-TimeDomainResourceAllocation
|
||||
int32_t PUSCH_TimeDomainResourceAllocation_k2 = 0;
|
||||
char* PUSCH_TimeDomainResourceAllocation_mappingType = NULL;
|
||||
int32_t PUSCH_TimeDomainResourceAllocation_startSymbolAndLength = 0;
|
||||
|
||||
//PUCCH-ConfigCommon
|
||||
int32_t pucch_ResourceCommon = 0;
|
||||
char* pucch_GroupHopping = NULL;
|
||||
int32_t hoppingId = 0;
|
||||
int32_t p0_nominal = 0;
|
||||
|
||||
//PDSCH-ConfigCOmmon
|
||||
//PDSCH-TimeDomainResourceAllocation
|
||||
int32_t PDSCH_TimeDomainResourceAllocation_k0 = 0;
|
||||
char* PDSCH_TimeDomainResourceAllocation_mappingType = NULL;
|
||||
int32_t PDSCH_TimeDomainResourceAllocation_startSymbolAndLength = 0;
|
||||
|
||||
//RateMatchPattern is used to configure one rate matching pattern for PDSCH
|
||||
int32_t rateMatchPatternId = 0;
|
||||
@@ -541,11 +562,13 @@ int RCconfig_NRRRC(MessageDef *msg_p, uint32_t i, gNB_RRC_INST *rrc) {
|
||||
char* RateMatchPattern_mode = NULL;
|
||||
|
||||
//PDCCH-ConfigCommon
|
||||
int32_t controlResourceSetZero = 0;
|
||||
int32_t searchSpaceZero = 0;
|
||||
int32_t searchSpaceSIB1 = 0;
|
||||
int32_t searchSpaceOtherSystemInformation = 0;
|
||||
int32_t pagingSearchSpace = 0;
|
||||
int32_t ra_SearchSpace = 0;
|
||||
int32_t rach_ra_ControlResourceSet = 0;
|
||||
|
||||
//NR PDCCH-ConfigCommon commonControlResourcesSets
|
||||
int32_t PDCCH_common_controlResourceSetId = 0;
|
||||
int32_t PDCCH_common_ControlResourceSet_duration = 0;
|
||||
@@ -556,19 +579,14 @@ int RCconfig_NRRRC(MessageDef *msg_p, uint32_t i, gNB_RRC_INST *rrc) {
|
||||
char* PDCCH_precoderGranularity = NULL;
|
||||
int32_t PDCCH_TCI_StateId = 0;
|
||||
char* tci_PresentInDCI = NULL;
|
||||
int32_t PDCCH_DMRS_ScramblingID = 0;
|
||||
|
||||
//NR PDCCH-ConfigCommon commonSearchSpaces
|
||||
int32_t SearchSpaceId = 0;
|
||||
int32_t commonSearchSpaces_controlResourceSetId = 0;
|
||||
char* SearchSpace_monitoringSlotPeriodicityAndOffset_choice = NULL;
|
||||
int32_t SearchSpace_monitoringSlotPeriodicityAndOffset_sl1 = 0;
|
||||
int32_t SearchSpace_monitoringSlotPeriodicityAndOffset_sl2 = 0;
|
||||
int32_t SearchSpace_monitoringSlotPeriodicityAndOffset_sl4 = 0;
|
||||
int32_t SearchSpace_monitoringSlotPeriodicityAndOffset_sl5 = 0;
|
||||
int32_t SearchSpace_monitoringSlotPeriodicityAndOffset_sl8 = 0;
|
||||
int32_t SearchSpace_monitoringSlotPeriodicityAndOffset_sl10 = 0;
|
||||
int32_t SearchSpace_monitoringSlotPeriodicityAndOffset_sl16 = 0;
|
||||
int32_t SearchSpace_monitoringSlotPeriodicityAndOffset_sl20 = 0;
|
||||
int32_t SearchSpace_monitoringSlotPeriodicityAndOffset_value = 0;
|
||||
int32_t SearchSpace_duration = 0;
|
||||
int32_t SearchSpace_nrofCandidates_aggregationLevel1 = 0;
|
||||
int32_t SearchSpace_nrofCandidates_aggregationLevel2 = 0;
|
||||
int32_t SearchSpace_nrofCandidates_aggregationLevel4 = 0;
|
||||
@@ -592,6 +610,7 @@ int RCconfig_NRRRC(MessageDef *msg_p, uint32_t i, gNB_RRC_INST *rrc) {
|
||||
int32_t RateMatchPatternLTE_CRS_radioframeAllocationOffset = 0;
|
||||
char* RateMatchPatternLTE_CRS_subframeAllocation_choice = NULL;
|
||||
|
||||
|
||||
/*int32_t srb1_timer_poll_retransmit = 0;
|
||||
int32_t srb1_timer_reordering = 0;
|
||||
int32_t srb1_timer_status_prohibit = 0;
|
||||
@@ -870,12 +889,6 @@ int RCconfig_NRRRC(MessageDef *msg_p, uint32_t i, gNB_RRC_INST *rrc) {
|
||||
RC.config_file_name, i, absoluteFrequencySSB);
|
||||
}
|
||||
|
||||
NRRRC_CONFIGURATION_REQ (msg_p).ssb_SubcarrierOffset[j] = ssb_SubcarrierOffset;
|
||||
if ((ssb_SubcarrierOffset <1) || (ssb_SubcarrierOffset > 23)){
|
||||
AssertFatal (0,"Failed to parse gNB configuration file %s, gnb %d unknown value \"%d\" for ssb_SubcarrierOffset choice: 1..23 !\n",
|
||||
RC.config_file_name, i, ssb_SubcarrierOffset);
|
||||
}
|
||||
|
||||
NRRRC_CONFIGURATION_REQ (msg_p).DL_FreqBandIndicatorNR[j] = DL_FreqBandIndicatorNR;
|
||||
if ((DL_FreqBandIndicatorNR <1) || (DL_FreqBandIndicatorNR > 1024)){
|
||||
AssertFatal (0,"Failed to parse gNB configuration file %s, gnb %d unknown value \"%d\" for DL_FreqBandIndicatorNR choice: 1..1024 !\n",
|
||||
@@ -911,25 +924,6 @@ int RCconfig_NRRRC(MessageDef *msg_p, uint32_t i, gNB_RRC_INST *rrc) {
|
||||
RC.config_file_name, i, DL_SCS_SubcarrierSpacing);
|
||||
}
|
||||
|
||||
switch (DL_SCS_SpecificCarrier_k0) {
|
||||
case -6:
|
||||
NRRRC_CONFIGURATION_REQ (msg_p).DL_SCS_SpecificCarrier_k0[j] = NR_SCS_SpecificCarrier__k0_n_6;
|
||||
break;
|
||||
|
||||
case 0:
|
||||
NRRRC_CONFIGURATION_REQ (msg_p).DL_SCS_SpecificCarrier_k0[j] = NR_SCS_SpecificCarrier__k0_n0;
|
||||
break;
|
||||
|
||||
case 6:
|
||||
NRRRC_CONFIGURATION_REQ (msg_p).DL_SCS_SpecificCarrier_k0[j] = NR_SCS_SpecificCarrier__k0_n6;
|
||||
break;
|
||||
|
||||
default:
|
||||
AssertFatal (0,"Failed to parse gNB configuration file %s, gnb %d unknown value \"%d\" for DL_SCS_SpecificCarrier_k0 choice: -6,0,6 !\n",
|
||||
RC.config_file_name, i, DL_SCS_SpecificCarrier_k0);
|
||||
break;
|
||||
}
|
||||
|
||||
NRRRC_CONFIGURATION_REQ (msg_p).DL_carrierBandwidth[j] = DL_carrierBandwidth;
|
||||
if ((DL_carrierBandwidth <1) || (DL_carrierBandwidth > 275)){
|
||||
AssertFatal (0,"Failed to parse gNB configuration file %s, gnb %d unknown value \"%d\" for DL_carrierBandwidth choice: 1..275 !\n",
|
||||
@@ -1022,32 +1016,12 @@ int RCconfig_NRRRC(MessageDef *msg_p, uint32_t i, gNB_RRC_INST *rrc) {
|
||||
RC.config_file_name, i, UL_SCS_SubcarrierSpacing);
|
||||
}
|
||||
|
||||
switch (UL_SCS_SpecificCarrier_k0) {
|
||||
case -6:
|
||||
NRRRC_CONFIGURATION_REQ (msg_p).UL_SCS_SpecificCarrier_k0[j] = NR_SCS_SpecificCarrier__k0_n_6;
|
||||
break;
|
||||
|
||||
case 0:
|
||||
NRRRC_CONFIGURATION_REQ (msg_p).UL_SCS_SpecificCarrier_k0[j] = NR_SCS_SpecificCarrier__k0_n0;
|
||||
break;
|
||||
|
||||
case 6:
|
||||
NRRRC_CONFIGURATION_REQ (msg_p).UL_SCS_SpecificCarrier_k0[j] = NR_SCS_SpecificCarrier__k0_n6;
|
||||
break;
|
||||
|
||||
default:
|
||||
AssertFatal (0,"Failed to parse gNB configuration file %s, gnb %d unknown value \"%d\" for UL_SCS_SpecificCarrier_k0 choice: -6,0,6 !\n",
|
||||
RC.config_file_name, i, UL_SCS_SpecificCarrier_k0);
|
||||
break;
|
||||
}
|
||||
|
||||
NRRRC_CONFIGURATION_REQ (msg_p).UL_carrierBandwidth[j] = UL_carrierBandwidth;
|
||||
if ((UL_carrierBandwidth <1) || (UL_carrierBandwidth > 275)){
|
||||
AssertFatal (0,"Failed to parse gNB configuration file %s, gnb %d unknown value \"%d\" for UL_carrierBandwidth choice: 1..275 !\n",
|
||||
RC.config_file_name, i, UL_carrierBandwidth);
|
||||
}
|
||||
|
||||
|
||||
/////////////////////////////////NR BWP-UplinkCommon///////////////////////////
|
||||
NRRRC_CONFIGURATION_REQ (msg_p).UL_locationAndBandwidth[j] = UL_locationAndBandwidth;
|
||||
if ((UL_locationAndBandwidth <0) || (UL_locationAndBandwidth > 37949)){
|
||||
@@ -1082,6 +1056,38 @@ int RCconfig_NRRRC(MessageDef *msg_p, uint32_t i, gNB_RRC_INST *rrc) {
|
||||
RC.config_file_name, i, UL_BWP_prefix_type);
|
||||
}
|
||||
|
||||
if (strcmp(UL_timeAlignmentTimerCommon,"ms500")==0) {
|
||||
NRRRC_CONFIGURATION_REQ (msg_p).UL_timeAlignmentTimerCommon[j] = NR_TimeAlignmentTimer_ms500;
|
||||
}else if (strcmp(UL_timeAlignmentTimerCommon,"ms750")==0) {
|
||||
NRRRC_CONFIGURATION_REQ (msg_p).UL_timeAlignmentTimerCommon[j] = NR_TimeAlignmentTimer_ms750;
|
||||
}else if (strcmp(UL_timeAlignmentTimerCommon,"ms1280")==0) {
|
||||
NRRRC_CONFIGURATION_REQ (msg_p).UL_timeAlignmentTimerCommon[j] = NR_TimeAlignmentTimer_ms1280;
|
||||
}else if (strcmp(UL_timeAlignmentTimerCommon,"ms1920")==0) {
|
||||
NRRRC_CONFIGURATION_REQ (msg_p).UL_timeAlignmentTimerCommon[j] = NR_TimeAlignmentTimer_ms1920;
|
||||
}else if (strcmp(UL_timeAlignmentTimerCommon,"ms2560")==0) {
|
||||
NRRRC_CONFIGURATION_REQ (msg_p).UL_timeAlignmentTimerCommon[j] = NR_TimeAlignmentTimer_ms2560;
|
||||
}else if (strcmp(UL_timeAlignmentTimerCommon,"ms5120")==0) {
|
||||
NRRRC_CONFIGURATION_REQ (msg_p).UL_timeAlignmentTimerCommon[j] = NR_TimeAlignmentTimer_ms5120;
|
||||
}else if (strcmp(UL_timeAlignmentTimerCommon,"ms10240")==0) {
|
||||
NRRRC_CONFIGURATION_REQ (msg_p).UL_timeAlignmentTimerCommon[j] = NR_TimeAlignmentTimer_ms10240;
|
||||
}else if (strcmp(UL_timeAlignmentTimerCommon,"infinity")==0) {
|
||||
NRRRC_CONFIGURATION_REQ (msg_p).UL_timeAlignmentTimerCommon[j] = NR_TimeAlignmentTimer_infinity;
|
||||
}else {
|
||||
AssertFatal (0,"Failed to parse gNB configuration file %s, gnb %d unknown value \"%s\" for UL_timeAlignmentTimerCommon choice: ms500,ms750,ms1280,ms1920,ms2560,ms5120,ms10240,infinity!\n",
|
||||
RC.config_file_name, i, UL_timeAlignmentTimerCommon);
|
||||
}
|
||||
|
||||
if (strcmp(ServingCellConfigCommon_n_TimingAdvanceOffset,"n0")==0) {
|
||||
NRRRC_CONFIGURATION_REQ (msg_p).ServingCellConfigCommon_n_TimingAdvanceOffset[j] = NR_ServingCellConfigCommon__n_TimingAdvanceOffset_n0;
|
||||
}else if (strcmp(ServingCellConfigCommon_n_TimingAdvanceOffset,"n25600")==0) {
|
||||
NRRRC_CONFIGURATION_REQ (msg_p).ServingCellConfigCommon_n_TimingAdvanceOffset[j] = NR_ServingCellConfigCommon__n_TimingAdvanceOffset_n25600;
|
||||
}else if (strcmp(ServingCellConfigCommon_n_TimingAdvanceOffset,"n39936")==0) {
|
||||
NRRRC_CONFIGURATION_REQ (msg_p).ServingCellConfigCommon_n_TimingAdvanceOffset[j] = NR_ServingCellConfigCommon__n_TimingAdvanceOffset_n39936;
|
||||
}else {
|
||||
AssertFatal (0,"Failed to parse gNB configuration file %s, gnb %d unknown value \"%s\" for ServingCellConfigCommon_n_TimingAdvanceOffset choice n0,n25600,n39936!\n",
|
||||
RC.config_file_name, i, ServingCellConfigCommon_n_TimingAdvanceOffset);
|
||||
}
|
||||
|
||||
if (strcmp(ServingCellConfigCommon_ssb_PositionsInBurst_PR,"shortBitmap")==0) {
|
||||
NRRRC_CONFIGURATION_REQ (msg_p).ServingCellConfigCommon_ssb_PositionsInBurst_PR[j] = NR_ServingCellConfigCommon__ssb_PositionsInBurst_PR_shortBitmap;
|
||||
}else if (strcmp(ServingCellConfigCommon_ssb_PositionsInBurst_PR,"mediumBitmap")==0) {
|
||||
@@ -1179,21 +1185,21 @@ int RCconfig_NRRRC(MessageDef *msg_p, uint32_t i, gNB_RRC_INST *rrc) {
|
||||
}
|
||||
|
||||
if (strcmp(dl_UL_TransmissionPeriodicity,"ms0p5")==0) {
|
||||
NRRRC_CONFIGURATION_REQ (msg_p).dl_UL_TransmissionPeriodicity[j] = NR_TDD_UL_DL_ConfigCommon__dl_UL_TransmissionPeriodicity_ms0p5;
|
||||
NRRRC_CONFIGURATION_REQ (msg_p).dl_UL_TransmissionPeriodicity[j] = NR_TDD_UL_DL_Pattern__dl_UL_TransmissionPeriodicity_ms0p5;
|
||||
}else if (strcmp(dl_UL_TransmissionPeriodicity,"ms0p625")==0) {
|
||||
NRRRC_CONFIGURATION_REQ (msg_p).dl_UL_TransmissionPeriodicity[j] = NR_TDD_UL_DL_ConfigCommon__dl_UL_TransmissionPeriodicity_ms0p625;
|
||||
NRRRC_CONFIGURATION_REQ (msg_p).dl_UL_TransmissionPeriodicity[j] = NR_TDD_UL_DL_Pattern__dl_UL_TransmissionPeriodicity_ms0p625;
|
||||
}else if (strcmp(dl_UL_TransmissionPeriodicity,"ms1")==0) {
|
||||
NRRRC_CONFIGURATION_REQ (msg_p).dl_UL_TransmissionPeriodicity[j] = NR_TDD_UL_DL_ConfigCommon__dl_UL_TransmissionPeriodicity_ms1;
|
||||
NRRRC_CONFIGURATION_REQ (msg_p).dl_UL_TransmissionPeriodicity[j] = NR_TDD_UL_DL_Pattern__dl_UL_TransmissionPeriodicity_ms1;
|
||||
}else if (strcmp(dl_UL_TransmissionPeriodicity,"ms1p25")==0) {
|
||||
NRRRC_CONFIGURATION_REQ (msg_p).dl_UL_TransmissionPeriodicity[j] = NR_TDD_UL_DL_ConfigCommon__dl_UL_TransmissionPeriodicity_ms1p25;
|
||||
NRRRC_CONFIGURATION_REQ (msg_p).dl_UL_TransmissionPeriodicity[j] = NR_TDD_UL_DL_Pattern__dl_UL_TransmissionPeriodicity_ms1p25;
|
||||
}else if (strcmp(dl_UL_TransmissionPeriodicity,"ms2")==0) {
|
||||
NRRRC_CONFIGURATION_REQ (msg_p).dl_UL_TransmissionPeriodicity[j] = NR_TDD_UL_DL_ConfigCommon__dl_UL_TransmissionPeriodicity_ms2;
|
||||
NRRRC_CONFIGURATION_REQ (msg_p).dl_UL_TransmissionPeriodicity[j] = NR_TDD_UL_DL_Pattern__dl_UL_TransmissionPeriodicity_ms2;
|
||||
}else if (strcmp(dl_UL_TransmissionPeriodicity,"ms2p5")==0) {
|
||||
NRRRC_CONFIGURATION_REQ (msg_p).dl_UL_TransmissionPeriodicity[j] = NR_TDD_UL_DL_ConfigCommon__dl_UL_TransmissionPeriodicity_ms2p5;
|
||||
NRRRC_CONFIGURATION_REQ (msg_p).dl_UL_TransmissionPeriodicity[j] = NR_TDD_UL_DL_Pattern__dl_UL_TransmissionPeriodicity_ms2p5;
|
||||
}else if (strcmp(dl_UL_TransmissionPeriodicity,"ms5")==0) {
|
||||
NRRRC_CONFIGURATION_REQ (msg_p).dl_UL_TransmissionPeriodicity[j] = NR_TDD_UL_DL_ConfigCommon__dl_UL_TransmissionPeriodicity_ms5;
|
||||
NRRRC_CONFIGURATION_REQ (msg_p).dl_UL_TransmissionPeriodicity[j] = NR_TDD_UL_DL_Pattern__dl_UL_TransmissionPeriodicity_ms5;
|
||||
}else if (strcmp(dl_UL_TransmissionPeriodicity,"ms10")==0) {
|
||||
NRRRC_CONFIGURATION_REQ (msg_p).dl_UL_TransmissionPeriodicity[j] = NR_TDD_UL_DL_ConfigCommon__dl_UL_TransmissionPeriodicity_ms10;
|
||||
NRRRC_CONFIGURATION_REQ (msg_p).dl_UL_TransmissionPeriodicity[j] = NR_TDD_UL_DL_Pattern__dl_UL_TransmissionPeriodicity_ms10;
|
||||
}else {
|
||||
AssertFatal (0,"Failed to parse gNB configuration file %s, gnb %d unknown value \"%s\" for dl_UL_TransmissionPeriodicity choice: minusinfinity,ms0p5,ms0p625,ms1,ms1p25,ms2,ms2p5,ms5,ms10 !\n",
|
||||
RC.config_file_name, i, dl_UL_TransmissionPeriodicity);
|
||||
@@ -1823,7 +1829,7 @@ int RCconfig_NRRRC(MessageDef *msg_p, uint32_t i, gNB_RRC_INST *rrc) {
|
||||
|
||||
/////////////////////////////////NR PUSCH-TimeDomainResourceAllocation///////////////////////////
|
||||
NRRRC_CONFIGURATION_REQ (msg_p).PUSCH_TimeDomainResourceAllocation_k2[j] = PUSCH_TimeDomainResourceAllocation_k2;
|
||||
if ((PUSCH_TimeDomainResourceAllocation_k2 <0) || (PUSCH_TimeDomainResourceAllocation_k2>7)){
|
||||
if ((PUSCH_TimeDomainResourceAllocation_k2 <0) || (PUSCH_TimeDomainResourceAllocation_k2>32)){
|
||||
AssertFatal (0,"Failed to parse gNB configuration file %s, gnb %d unknown value \"%d\" for PUSCH_TimeDomainResourceAllocation_k2 choice: 0..7 !\n",
|
||||
RC.config_file_name, i, PUSCH_TimeDomainResourceAllocation_k2);
|
||||
}
|
||||
@@ -1837,7 +1843,19 @@ int RCconfig_NRRRC(MessageDef *msg_p, uint32_t i, gNB_RRC_INST *rrc) {
|
||||
RC.config_file_name, i, PUSCH_TimeDomainResourceAllocation_mappingType);
|
||||
}
|
||||
|
||||
NRRRC_CONFIGURATION_REQ (msg_p).PUSCH_TimeDomainResourceAllocation_startSymbolAndLength[j] = PUSCH_TimeDomainResourceAllocation_startSymbolAndLength;
|
||||
if ((PUSCH_TimeDomainResourceAllocation_startSymbolAndLength <0) || (PUSCH_TimeDomainResourceAllocation_startSymbolAndLength>127)){
|
||||
AssertFatal (0,"Failed to parse gNB configuration file %s, gnb %d unknown value \"%d\" for PUSCH_TimeDomainResourceAllocation_startSymbolAndLength choice: 0..127 !\n",
|
||||
RC.config_file_name, i, PUSCH_TimeDomainResourceAllocation_startSymbolAndLength);
|
||||
}
|
||||
|
||||
/////////////////////////////////NR PUCCH-ConfigCommon///////////////////////////
|
||||
NRRRC_CONFIGURATION_REQ (msg_p).pucch_ResourceCommon[j] = pucch_ResourceCommon;
|
||||
if ((pucch_ResourceCommon <0) || (pucch_ResourceCommon>15)){
|
||||
AssertFatal (0,"Failed to parse gNB configuration file %s, gnb %d unknown value \"%d\" for pucch_ResourceCommon choice: 0..15 !\n",
|
||||
RC.config_file_name, i, pucch_ResourceCommon);
|
||||
}
|
||||
|
||||
if (strcmp(pucch_GroupHopping , "neither") == 0){
|
||||
NRRRC_CONFIGURATION_REQ (msg_p).pucch_GroupHopping[j] = NR_PUCCH_ConfigCommon__pucch_GroupHopping_neither;
|
||||
}else if (strcmp(pucch_GroupHopping , "enable") == 0){
|
||||
@@ -1849,6 +1867,12 @@ int RCconfig_NRRRC(MessageDef *msg_p, uint32_t i, gNB_RRC_INST *rrc) {
|
||||
RC.config_file_name, i, pucch_GroupHopping);
|
||||
}
|
||||
|
||||
NRRRC_CONFIGURATION_REQ (msg_p).hoppingId[j] = hoppingId;
|
||||
if ((hoppingId <0) || (hoppingId>1024)){
|
||||
AssertFatal (0,"Failed to parse gNB configuration file %s, gnb %d unknown value \"%d\" for hoppingId choice: 0..1024 !\n",
|
||||
RC.config_file_name, i, hoppingId);
|
||||
}
|
||||
|
||||
NRRRC_CONFIGURATION_REQ (msg_p).p0_nominal[j] = p0_nominal;
|
||||
if ((p0_nominal <-202) || (p0_nominal>24)){
|
||||
AssertFatal (0,"Failed to parse gNB configuration file %s, gnb %d unknown value \"%d\" for p0_nominal choice: -202..24 !\n",
|
||||
@@ -1871,6 +1895,12 @@ int RCconfig_NRRRC(MessageDef *msg_p, uint32_t i, gNB_RRC_INST *rrc) {
|
||||
RC.config_file_name, i, PDSCH_TimeDomainResourceAllocation_mappingType);
|
||||
}
|
||||
|
||||
NRRRC_CONFIGURATION_REQ (msg_p).PDSCH_TimeDomainResourceAllocation_startSymbolAndLength[j] = PDSCH_TimeDomainResourceAllocation_startSymbolAndLength;
|
||||
if ((PDSCH_TimeDomainResourceAllocation_startSymbolAndLength <0) || (PDSCH_TimeDomainResourceAllocation_startSymbolAndLength>127)){
|
||||
AssertFatal (0,"Failed to parse gNB configuration file %s, gnb %d unknown value \"%d\" for PDSCH_TimeDomainResourceAllocation_startSymbolAndLength choice: 0..127 !\n",
|
||||
RC.config_file_name, i, PDSCH_TimeDomainResourceAllocation_startSymbolAndLength);
|
||||
}
|
||||
|
||||
//////////////////////////////////NR RateMatchPattern///////////////////////////
|
||||
NRRRC_CONFIGURATION_REQ (msg_p).rateMatchPatternId[j] = rateMatchPatternId;
|
||||
if ((rateMatchPatternId <0) || (rateMatchPatternId>3)){
|
||||
@@ -1950,15 +1980,35 @@ int RCconfig_NRRRC(MessageDef *msg_p, uint32_t i, gNB_RRC_INST *rrc) {
|
||||
}
|
||||
|
||||
if (strcmp(RateMatchPattern_mode , "dynamic") == 0){
|
||||
#if (NR_RRC_VERSION >= MAKE_VERSION(15, 3, 0))
|
||||
NRRRC_CONFIGURATION_REQ (msg_p).RateMatchPattern_mode[j] = NR_RateMatchPattern__dummy_dynamic;
|
||||
#else
|
||||
NRRRC_CONFIGURATION_REQ (msg_p).RateMatchPattern_mode[j] = NR_RateMatchPattern__mode_dynamic;
|
||||
#endif
|
||||
}else if (strcmp(RateMatchPattern_mode , "semiStatic") == 0){
|
||||
#if (NR_RRC_VERSION >= MAKE_VERSION(15, 3, 0))
|
||||
NRRRC_CONFIGURATION_REQ (msg_p).RateMatchPattern_mode[j] = NR_RateMatchPattern__dummy_semiStatic;
|
||||
#else
|
||||
NRRRC_CONFIGURATION_REQ (msg_p).RateMatchPattern_mode[j] = NR_RateMatchPattern__mode_semiStatic;
|
||||
#endif
|
||||
}else {
|
||||
AssertFatal (0,"Failed to parse gNB configuration file %s, gnb %d unknown value \"%s\" for RateMatchPattern_mode !\n",
|
||||
RC.config_file_name, i, RateMatchPattern_mode);
|
||||
}
|
||||
|
||||
//////////////////////////////////NR PDCCH-ConfigCommon///////////////////////////
|
||||
NRRRC_CONFIGURATION_REQ (msg_p).controlResourceSetZero[j] = controlResourceSetZero;
|
||||
if ((controlResourceSetZero <0) || (controlResourceSetZero>15)){
|
||||
AssertFatal (0,"Failed to parse gNB configuration file %s, gnb %d unknown value \"%d\" for controlResourceSetZero choice: 0..15 !\n",
|
||||
RC.config_file_name, i, controlResourceSetZero);
|
||||
}
|
||||
|
||||
NRRRC_CONFIGURATION_REQ (msg_p).searchSpaceZero[j] = searchSpaceZero;
|
||||
if ((searchSpaceZero <0) || (searchSpaceZero>15)){
|
||||
AssertFatal (0,"Failed to parse gNB configuration file %s, gnb %d unknown value \"%d\" for searchSpaceZero choice: 0..15 !\n",
|
||||
RC.config_file_name, i, searchSpaceZero);
|
||||
}
|
||||
|
||||
NRRRC_CONFIGURATION_REQ (msg_p).searchSpaceSIB1[j] = searchSpaceSIB1;
|
||||
if ((searchSpaceSIB1 <0) || (searchSpaceSIB1>39)){
|
||||
AssertFatal (0,"Failed to parse gNB configuration file %s, gnb %d unknown value \"%d\" for searchSpaceSIB1 choice: 0..39 !\n",
|
||||
@@ -1983,12 +2033,6 @@ int RCconfig_NRRRC(MessageDef *msg_p, uint32_t i, gNB_RRC_INST *rrc) {
|
||||
RC.config_file_name, i, ra_SearchSpace);
|
||||
}
|
||||
|
||||
NRRRC_CONFIGURATION_REQ (msg_p).rach_ra_ControlResourceSet[j] = rach_ra_ControlResourceSet;
|
||||
if ((rach_ra_ControlResourceSet <0) || (rach_ra_ControlResourceSet>11)){
|
||||
AssertFatal (0,"Failed to parse gNB configuration file %s, gnb %d unknown value \"%d\" for rach_ra_ControlResourceSet choice: 0..11 !\n",
|
||||
RC.config_file_name, i, rach_ra_ControlResourceSet);
|
||||
}
|
||||
|
||||
//////////////////////////////////NR PDCCH commonControlResourcesSets///////////////////////////
|
||||
NRRRC_CONFIGURATION_REQ (msg_p).PDCCH_common_controlResourceSetId[j] = PDCCH_common_controlResourceSetId;
|
||||
if ((PDCCH_common_controlResourceSetId <0) || (PDCCH_common_controlResourceSetId>11)){
|
||||
@@ -2070,6 +2114,12 @@ int RCconfig_NRRRC(MessageDef *msg_p, uint32_t i, gNB_RRC_INST *rrc) {
|
||||
NRRRC_CONFIGURATION_REQ (msg_p).tci_PresentInDCI[j] = TRUE;
|
||||
}
|
||||
|
||||
NRRRC_CONFIGURATION_REQ (msg_p).PDCCH_DMRS_ScramblingID[j] = PDCCH_DMRS_ScramblingID;
|
||||
if ((PDCCH_DMRS_ScramblingID <0) || (PDCCH_DMRS_ScramblingID>65535)){
|
||||
AssertFatal (0,"Failed to parse gNB configuration file %s, gnb %d unknown value \"%d\" for PDCCH_DMRS_ScramblingID choice: 0..65535 !\n",
|
||||
RC.config_file_name, i, PDCCH_DMRS_ScramblingID);
|
||||
}
|
||||
|
||||
//////////////////////////////////NR PDCCH commonSearchSpaces///////////////////////////
|
||||
NRRRC_CONFIGURATION_REQ (msg_p).SearchSpaceId[j] = SearchSpaceId;
|
||||
if ((SearchSpaceId <0) || (SearchSpaceId>39)){
|
||||
@@ -2086,69 +2136,69 @@ int RCconfig_NRRRC(MessageDef *msg_p, uint32_t i, gNB_RRC_INST *rrc) {
|
||||
if (strcmp(SearchSpace_monitoringSlotPeriodicityAndOffset_choice , "sl1") == 0){
|
||||
NRRRC_CONFIGURATION_REQ (msg_p).SearchSpace_monitoringSlotPeriodicityAndOffset_choice[j] = NR_SearchSpace__monitoringSlotPeriodicityAndOffset_PR_sl1;
|
||||
|
||||
NRRRC_CONFIGURATION_REQ (msg_p).SearchSpace_monitoringSlotPeriodicityAndOffset_sl1[j] = 0;
|
||||
NRRRC_CONFIGURATION_REQ (msg_p).SearchSpace_monitoringSlotPeriodicityAndOffset_value[j] = 0;
|
||||
|
||||
}else if (strcmp(SearchSpace_monitoringSlotPeriodicityAndOffset_choice , "sl2") == 0){
|
||||
NRRRC_CONFIGURATION_REQ (msg_p).SearchSpace_monitoringSlotPeriodicityAndOffset_choice[j] = NR_SearchSpace__monitoringSlotPeriodicityAndOffset_PR_sl2;
|
||||
|
||||
NRRRC_CONFIGURATION_REQ (msg_p).SearchSpace_monitoringSlotPeriodicityAndOffset_sl2[j] = SearchSpace_monitoringSlotPeriodicityAndOffset_sl2;
|
||||
if ((SearchSpace_monitoringSlotPeriodicityAndOffset_sl2 <0) || (SearchSpace_monitoringSlotPeriodicityAndOffset_sl2>1)){
|
||||
AssertFatal (0,"Failed to parse gNB configuration file %s, gnb %d unknown value \"%d\" for SearchSpace_monitoringSlotPeriodicityAndOffset_sl2 choice: 0..1 !\n",
|
||||
RC.config_file_name, i, SearchSpace_monitoringSlotPeriodicityAndOffset_sl2);
|
||||
NRRRC_CONFIGURATION_REQ (msg_p).SearchSpace_monitoringSlotPeriodicityAndOffset_value[j] = SearchSpace_monitoringSlotPeriodicityAndOffset_value;
|
||||
if ((SearchSpace_monitoringSlotPeriodicityAndOffset_value <0) || (SearchSpace_monitoringSlotPeriodicityAndOffset_value>1)){
|
||||
AssertFatal (0,"Failed to parse gNB configuration file %s, gnb %d unknown value \"%d\" for SearchSpace_monitoringSlotPeriodicityAndOffset_value choice: 0..1 !\n",
|
||||
RC.config_file_name, i, SearchSpace_monitoringSlotPeriodicityAndOffset_value);
|
||||
}
|
||||
|
||||
}else if (strcmp(SearchSpace_monitoringSlotPeriodicityAndOffset_choice , "sl4") == 0){
|
||||
NRRRC_CONFIGURATION_REQ (msg_p).SearchSpace_monitoringSlotPeriodicityAndOffset_choice[j] = NR_SearchSpace__monitoringSlotPeriodicityAndOffset_PR_sl4;
|
||||
|
||||
NRRRC_CONFIGURATION_REQ (msg_p).SearchSpace_monitoringSlotPeriodicityAndOffset_sl4[j] = SearchSpace_monitoringSlotPeriodicityAndOffset_sl4;
|
||||
if ((SearchSpace_monitoringSlotPeriodicityAndOffset_sl4 <0) || (SearchSpace_monitoringSlotPeriodicityAndOffset_sl4>3)){
|
||||
AssertFatal (0,"Failed to parse gNB configuration file %s, gnb %d unknown value \"%d\" for SearchSpace_monitoringSlotPeriodicityAndOffset_sl4 choice: 0..3 !\n",
|
||||
RC.config_file_name, i, SearchSpace_monitoringSlotPeriodicityAndOffset_sl4);
|
||||
NRRRC_CONFIGURATION_REQ (msg_p).SearchSpace_monitoringSlotPeriodicityAndOffset_value[j] = SearchSpace_monitoringSlotPeriodicityAndOffset_value;
|
||||
if ((SearchSpace_monitoringSlotPeriodicityAndOffset_value <0) || (SearchSpace_monitoringSlotPeriodicityAndOffset_value>3)){
|
||||
AssertFatal (0,"Failed to parse gNB configuration file %s, gnb %d unknown value \"%d\" for SearchSpace_monitoringSlotPeriodicityAndOffset_value choice: 0..3 !\n",
|
||||
RC.config_file_name, i, SearchSpace_monitoringSlotPeriodicityAndOffset_value);
|
||||
}
|
||||
|
||||
}else if (strcmp(SearchSpace_monitoringSlotPeriodicityAndOffset_choice , "sl5") == 0){
|
||||
NRRRC_CONFIGURATION_REQ (msg_p).SearchSpace_monitoringSlotPeriodicityAndOffset_choice[j] = NR_SearchSpace__monitoringSlotPeriodicityAndOffset_PR_sl5;
|
||||
|
||||
NRRRC_CONFIGURATION_REQ (msg_p).SearchSpace_monitoringSlotPeriodicityAndOffset_sl5[j] = SearchSpace_monitoringSlotPeriodicityAndOffset_sl5;
|
||||
if ((SearchSpace_monitoringSlotPeriodicityAndOffset_sl5 <0) || (SearchSpace_monitoringSlotPeriodicityAndOffset_sl5>4)){
|
||||
AssertFatal (0,"Failed to parse gNB configuration file %s, gnb %d unknown value \"%d\" for SearchSpace_monitoringSlotPeriodicityAndOffset_sl5 choice: 0..4 !\n",
|
||||
RC.config_file_name, i, SearchSpace_monitoringSlotPeriodicityAndOffset_sl5);
|
||||
NRRRC_CONFIGURATION_REQ (msg_p).SearchSpace_monitoringSlotPeriodicityAndOffset_value[j] = SearchSpace_monitoringSlotPeriodicityAndOffset_value;
|
||||
if ((SearchSpace_monitoringSlotPeriodicityAndOffset_value <0) || (SearchSpace_monitoringSlotPeriodicityAndOffset_value>4)){
|
||||
AssertFatal (0,"Failed to parse gNB configuration file %s, gnb %d unknown value \"%d\" for SearchSpace_monitoringSlotPeriodicityAndOffset_value choice: 0..4 !\n",
|
||||
RC.config_file_name, i, SearchSpace_monitoringSlotPeriodicityAndOffset_value);
|
||||
}
|
||||
|
||||
}else if (strcmp(SearchSpace_monitoringSlotPeriodicityAndOffset_choice , "sl8") == 0){
|
||||
NRRRC_CONFIGURATION_REQ (msg_p).SearchSpace_monitoringSlotPeriodicityAndOffset_choice[j] = NR_SearchSpace__monitoringSlotPeriodicityAndOffset_PR_sl8;
|
||||
|
||||
NRRRC_CONFIGURATION_REQ (msg_p).SearchSpace_monitoringSlotPeriodicityAndOffset_sl8[j] = SearchSpace_monitoringSlotPeriodicityAndOffset_sl8;
|
||||
if ((SearchSpace_monitoringSlotPeriodicityAndOffset_sl8 <0) || (SearchSpace_monitoringSlotPeriodicityAndOffset_sl8>7)){
|
||||
AssertFatal (0,"Failed to parse gNB configuration file %s, gnb %d unknown value \"%d\" for SearchSpace_monitoringSlotPeriodicityAndOffset_sl8 choice: 0..7 !\n",
|
||||
RC.config_file_name, i, SearchSpace_monitoringSlotPeriodicityAndOffset_sl8);
|
||||
NRRRC_CONFIGURATION_REQ (msg_p).SearchSpace_monitoringSlotPeriodicityAndOffset_value[j] = SearchSpace_monitoringSlotPeriodicityAndOffset_value;
|
||||
if ((SearchSpace_monitoringSlotPeriodicityAndOffset_value <0) || (SearchSpace_monitoringSlotPeriodicityAndOffset_value>7)){
|
||||
AssertFatal (0,"Failed to parse gNB configuration file %s, gnb %d unknown value \"%d\" for SearchSpace_monitoringSlotPeriodicityAndOffset_value choice: 0..7 !\n",
|
||||
RC.config_file_name, i, SearchSpace_monitoringSlotPeriodicityAndOffset_value);
|
||||
}
|
||||
|
||||
}else if (strcmp(SearchSpace_monitoringSlotPeriodicityAndOffset_choice , "sl10") == 0){
|
||||
NRRRC_CONFIGURATION_REQ (msg_p).SearchSpace_monitoringSlotPeriodicityAndOffset_choice[j] = NR_SearchSpace__monitoringSlotPeriodicityAndOffset_PR_sl10;
|
||||
|
||||
NRRRC_CONFIGURATION_REQ (msg_p).SearchSpace_monitoringSlotPeriodicityAndOffset_sl10[j] = SearchSpace_monitoringSlotPeriodicityAndOffset_sl10;
|
||||
if ((SearchSpace_monitoringSlotPeriodicityAndOffset_sl10 <0) || (SearchSpace_monitoringSlotPeriodicityAndOffset_sl10>9)){
|
||||
AssertFatal (0,"Failed to parse gNB configuration file %s, gnb %d unknown value \"%d\" for SearchSpace_monitoringSlotPeriodicityAndOffset_sl10 choice: 0..9 !\n",
|
||||
RC.config_file_name, i, SearchSpace_monitoringSlotPeriodicityAndOffset_sl10);
|
||||
NRRRC_CONFIGURATION_REQ (msg_p).SearchSpace_monitoringSlotPeriodicityAndOffset_value[j] = SearchSpace_monitoringSlotPeriodicityAndOffset_value;
|
||||
if ((SearchSpace_monitoringSlotPeriodicityAndOffset_value <0) || (SearchSpace_monitoringSlotPeriodicityAndOffset_value>9)){
|
||||
AssertFatal (0,"Failed to parse gNB configuration file %s, gnb %d unknown value \"%d\" for SearchSpace_monitoringSlotPeriodicityAndOffset_value choice: 0..9 !\n",
|
||||
RC.config_file_name, i, SearchSpace_monitoringSlotPeriodicityAndOffset_value);
|
||||
}
|
||||
|
||||
}else if (strcmp(SearchSpace_monitoringSlotPeriodicityAndOffset_choice , "sl16") == 0){
|
||||
NRRRC_CONFIGURATION_REQ (msg_p).SearchSpace_monitoringSlotPeriodicityAndOffset_choice[j] = NR_SearchSpace__monitoringSlotPeriodicityAndOffset_PR_sl16;
|
||||
|
||||
NRRRC_CONFIGURATION_REQ (msg_p).SearchSpace_monitoringSlotPeriodicityAndOffset_sl16[j] = SearchSpace_monitoringSlotPeriodicityAndOffset_sl16;
|
||||
if ((SearchSpace_monitoringSlotPeriodicityAndOffset_sl16 <0) || (SearchSpace_monitoringSlotPeriodicityAndOffset_sl16>15)){
|
||||
AssertFatal (0,"Failed to parse gNB configuration file %s, gnb %d unknown value \"%d\" for SearchSpace_monitoringSlotPeriodicityAndOffset_sl16 choice: 0..15 !\n",
|
||||
RC.config_file_name, i, SearchSpace_monitoringSlotPeriodicityAndOffset_sl16);
|
||||
NRRRC_CONFIGURATION_REQ (msg_p).SearchSpace_monitoringSlotPeriodicityAndOffset_value[j] = SearchSpace_monitoringSlotPeriodicityAndOffset_value;
|
||||
if ((SearchSpace_monitoringSlotPeriodicityAndOffset_value <0) || (SearchSpace_monitoringSlotPeriodicityAndOffset_value>15)){
|
||||
AssertFatal (0,"Failed to parse gNB configuration file %s, gnb %d unknown value \"%d\" for SearchSpace_monitoringSlotPeriodicityAndOffset_value choice: 0..15 !\n",
|
||||
RC.config_file_name, i, SearchSpace_monitoringSlotPeriodicityAndOffset_value);
|
||||
}
|
||||
|
||||
}else if (strcmp(SearchSpace_monitoringSlotPeriodicityAndOffset_choice , "sl20") == 0){
|
||||
NRRRC_CONFIGURATION_REQ (msg_p).SearchSpace_monitoringSlotPeriodicityAndOffset_choice[j] = NR_SearchSpace__monitoringSlotPeriodicityAndOffset_PR_sl20;
|
||||
|
||||
NRRRC_CONFIGURATION_REQ (msg_p).SearchSpace_monitoringSlotPeriodicityAndOffset_sl20[j] = SearchSpace_monitoringSlotPeriodicityAndOffset_sl20;
|
||||
if ((SearchSpace_monitoringSlotPeriodicityAndOffset_sl20 <0) || (SearchSpace_monitoringSlotPeriodicityAndOffset_sl20>19)){
|
||||
AssertFatal (0,"Failed to parse gNB configuration file %s, gnb %d unknown value \"%d\" for SearchSpace_monitoringSlotPeriodicityAndOffset_sl20 choice: 0..19 !\n",
|
||||
RC.config_file_name, i, SearchSpace_monitoringSlotPeriodicityAndOffset_sl20);
|
||||
NRRRC_CONFIGURATION_REQ (msg_p).SearchSpace_monitoringSlotPeriodicityAndOffset_value[j] = SearchSpace_monitoringSlotPeriodicityAndOffset_value;
|
||||
if ((SearchSpace_monitoringSlotPeriodicityAndOffset_value <0) || (SearchSpace_monitoringSlotPeriodicityAndOffset_value>19)){
|
||||
AssertFatal (0,"Failed to parse gNB configuration file %s, gnb %d unknown value \"%d\" for SearchSpace_monitoringSlotPeriodicityAndOffset_value choice: 0..19 !\n",
|
||||
RC.config_file_name, i, SearchSpace_monitoringSlotPeriodicityAndOffset_value);
|
||||
}
|
||||
|
||||
}else if (strcmp(SearchSpace_monitoringSlotPeriodicityAndOffset_choice , "UNABLE") == 0){
|
||||
@@ -2159,7 +2209,12 @@ int RCconfig_NRRRC(MessageDef *msg_p, uint32_t i, gNB_RRC_INST *rrc) {
|
||||
RC.config_file_name, i, SearchSpace_monitoringSlotPeriodicityAndOffset_choice);
|
||||
}// End if (strcmp(SearchSpace_monitoringSlotPeriodicityAndOffset_choice , "sl1")
|
||||
|
||||
|
||||
NRRRC_CONFIGURATION_REQ (msg_p).SearchSpace_duration[j] = SearchSpace_duration;
|
||||
if ((SearchSpace_duration <2) || (SearchSpace_duration>2559)){
|
||||
AssertFatal (0,"Failed to parse gNB configuration file %s, gnb %d unknown value \"%d\" for SearchSpace_duration choice: 2..2559 !\n",
|
||||
RC.config_file_name, i, SearchSpace_duration);
|
||||
}
|
||||
|
||||
switch(SearchSpace_nrofCandidates_aggregationLevel1){
|
||||
case 0:
|
||||
NRRRC_CONFIGURATION_REQ (msg_p).SearchSpace_nrofCandidates_aggregationLevel1[j] = NR_SearchSpace__nrofCandidates__aggregationLevel1_n0;
|
||||
@@ -2393,41 +2448,86 @@ int RCconfig_NRRRC(MessageDef *msg_p, uint32_t i, gNB_RRC_INST *rrc) {
|
||||
|
||||
switch(Common_dci_Format2_3_monitoringPeriodicity){
|
||||
case 1:
|
||||
#if (NR_RRC_VERSION >= MAKE_VERSION(15, 3, 0))
|
||||
NRRRC_CONFIGURATION_REQ (msg_p).Common_dci_Format2_3_monitoringPeriodicity[j] = NR_SearchSpace__searchSpaceType__common__dci_Format2_3__dummy1_sl1;
|
||||
#else
|
||||
NRRRC_CONFIGURATION_REQ (msg_p).Common_dci_Format2_3_monitoringPeriodicity[j] = NR_SearchSpace__searchSpaceType__common__dci_Format2_3__monitoringPeriodicity_n1;
|
||||
#endif
|
||||
break;
|
||||
case 2:
|
||||
#if (NR_RRC_VERSION >= MAKE_VERSION(15, 3, 0))
|
||||
NRRRC_CONFIGURATION_REQ (msg_p).Common_dci_Format2_3_monitoringPeriodicity[j] = NR_SearchSpace__searchSpaceType__common__dci_Format2_3__dummy1_sl2;
|
||||
#else
|
||||
NRRRC_CONFIGURATION_REQ (msg_p).Common_dci_Format2_3_monitoringPeriodicity[j] = NR_SearchSpace__searchSpaceType__common__dci_Format2_3__monitoringPeriodicity_n2;
|
||||
#endif
|
||||
break;
|
||||
case 4:
|
||||
#if (NR_RRC_VERSION >= MAKE_VERSION(15, 3, 0))
|
||||
NRRRC_CONFIGURATION_REQ (msg_p).Common_dci_Format2_3_monitoringPeriodicity[j] = NR_SearchSpace__searchSpaceType__common__dci_Format2_3__dummy1_sl4;
|
||||
#else
|
||||
NRRRC_CONFIGURATION_REQ (msg_p).Common_dci_Format2_3_monitoringPeriodicity[j] = NR_SearchSpace__searchSpaceType__common__dci_Format2_3__monitoringPeriodicity_n4;
|
||||
#endif
|
||||
break;
|
||||
case 5:
|
||||
#if (NR_RRC_VERSION >= MAKE_VERSION(15, 3, 0))
|
||||
NRRRC_CONFIGURATION_REQ (msg_p).Common_dci_Format2_3_monitoringPeriodicity[j] = NR_SearchSpace__searchSpaceType__common__dci_Format2_3__dummy1_sl5;
|
||||
#else
|
||||
NRRRC_CONFIGURATION_REQ (msg_p).Common_dci_Format2_3_monitoringPeriodicity[j] = NR_SearchSpace__searchSpaceType__common__dci_Format2_3__monitoringPeriodicity_n5;
|
||||
#endif
|
||||
break;
|
||||
case 8:
|
||||
#if (NR_RRC_VERSION >= MAKE_VERSION(15, 3, 0))
|
||||
NRRRC_CONFIGURATION_REQ (msg_p).Common_dci_Format2_3_monitoringPeriodicity[j] = NR_SearchSpace__searchSpaceType__common__dci_Format2_3__dummy1_sl8;
|
||||
#else
|
||||
NRRRC_CONFIGURATION_REQ (msg_p).Common_dci_Format2_3_monitoringPeriodicity[j] = NR_SearchSpace__searchSpaceType__common__dci_Format2_3__monitoringPeriodicity_n8;
|
||||
#endif
|
||||
break;
|
||||
case 10:
|
||||
#if (NR_RRC_VERSION >= MAKE_VERSION(15, 3, 0))
|
||||
NRRRC_CONFIGURATION_REQ (msg_p).Common_dci_Format2_3_monitoringPeriodicity[j] = NR_SearchSpace__searchSpaceType__common__dci_Format2_3__dummy1_sl10;
|
||||
#else
|
||||
NRRRC_CONFIGURATION_REQ (msg_p).Common_dci_Format2_3_monitoringPeriodicity[j] = NR_SearchSpace__searchSpaceType__common__dci_Format2_3__monitoringPeriodicity_n10;
|
||||
#endif
|
||||
break;
|
||||
case 16:
|
||||
#if (NR_RRC_VERSION >= MAKE_VERSION(15, 3, 0))
|
||||
NRRRC_CONFIGURATION_REQ (msg_p).Common_dci_Format2_3_monitoringPeriodicity[j] = NR_SearchSpace__searchSpaceType__common__dci_Format2_3__dummy1_sl16;
|
||||
#else
|
||||
NRRRC_CONFIGURATION_REQ (msg_p).Common_dci_Format2_3_monitoringPeriodicity[j] = NR_SearchSpace__searchSpaceType__common__dci_Format2_3__monitoringPeriodicity_n16;
|
||||
#endif
|
||||
break;
|
||||
case 20:
|
||||
#if (NR_RRC_VERSION >= MAKE_VERSION(15, 3, 0))
|
||||
NRRRC_CONFIGURATION_REQ (msg_p).Common_dci_Format2_3_monitoringPeriodicity[j] = NR_SearchSpace__searchSpaceType__common__dci_Format2_3__dummy1_sl20;
|
||||
#else
|
||||
NRRRC_CONFIGURATION_REQ (msg_p).Common_dci_Format2_3_monitoringPeriodicity[j] = NR_SearchSpace__searchSpaceType__common__dci_Format2_3__monitoringPeriodicity_n20;
|
||||
#endif
|
||||
break;
|
||||
default:
|
||||
#if (NR_RRC_VERSION >= MAKE_VERSION(15, 3, 0))
|
||||
AssertFatal (0,"Failed to parse gNB configuration file %s, gnb %d unknown value \"%d\" for Common_dci_Format2_3_dummy1 choice: 1,2,4,5,8,10,16,20 !\n",
|
||||
RC.config_file_name, i, Common_dci_Format2_3_monitoringPeriodicity);
|
||||
#else
|
||||
AssertFatal (0,"Failed to parse gNB configuration file %s, gnb %d unknown value \"%d\" for Common_dci_Format2_3_monitoringPeriodicity choice: 1,2,4,5,8,10,16,20 !\n",
|
||||
RC.config_file_name, i, Common_dci_Format2_3_monitoringPeriodicity);
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
|
||||
switch(Common_dci_Format2_3_nrofPDCCH_Candidates){
|
||||
case 1:
|
||||
#if (NR_RRC_VERSION >= MAKE_VERSION(15, 3, 0))
|
||||
NRRRC_CONFIGURATION_REQ (msg_p).Common_dci_Format2_3_nrofPDCCH_Candidates[j] = NR_SearchSpace__searchSpaceType__common__dci_Format2_3__dummy2_n1;
|
||||
#else
|
||||
NRRRC_CONFIGURATION_REQ (msg_p).Common_dci_Format2_3_nrofPDCCH_Candidates[j] = NR_SearchSpace__searchSpaceType__common__dci_Format2_3__nrofPDCCH_Candidates_n1;
|
||||
#endif
|
||||
break;
|
||||
case 2:
|
||||
#if (NR_RRC_VERSION >= MAKE_VERSION(15, 3, 0))
|
||||
NRRRC_CONFIGURATION_REQ (msg_p).Common_dci_Format2_3_nrofPDCCH_Candidates[j] = NR_SearchSpace__searchSpaceType__common__dci_Format2_3__dummy2_n2;
|
||||
#else
|
||||
NRRRC_CONFIGURATION_REQ (msg_p).Common_dci_Format2_3_nrofPDCCH_Candidates[j] = NR_SearchSpace__searchSpaceType__common__dci_Format2_3__nrofPDCCH_Candidates_n2;
|
||||
#endif
|
||||
break;
|
||||
default:
|
||||
AssertFatal (0,"Failed to parse gNB configuration file %s, gnb %d unknown value \"%d\" for Common_dci_Format2_3_nrofPDCCH_Candidates choice: 1,2 !\n",
|
||||
@@ -2551,9 +2651,17 @@ int RCconfig_NRRRC(MessageDef *msg_p, uint32_t i, gNB_RRC_INST *rrc) {
|
||||
}
|
||||
|
||||
if (strcmp(RateMatchPatternLTE_CRS_subframeAllocation_choice , "oneFrame") == 0){
|
||||
#if (NR_RRC_VERSION >= MAKE_VERSION(15, 3, 0))
|
||||
NRRRC_CONFIGURATION_REQ (msg_p).RateMatchPatternLTE_CRS_subframeAllocation_choice[j] = NR_EUTRA_MBSFN_SubframeConfig__subframeAllocation1_PR_oneFrame;
|
||||
#else
|
||||
NRRRC_CONFIGURATION_REQ (msg_p).RateMatchPatternLTE_CRS_subframeAllocation_choice[j] = NR_EUTRA_MBSFN_SubframeConfig__subframeAllocation_PR_oneFrame;
|
||||
#endif
|
||||
}else if (strcmp(RateMatchPatternLTE_CRS_subframeAllocation_choice , "fourFrames") == 0){
|
||||
#if (NR_RRC_VERSION >= MAKE_VERSION(15, 3, 0))
|
||||
NRRRC_CONFIGURATION_REQ (msg_p).RateMatchPatternLTE_CRS_subframeAllocation_choice[j] = NR_EUTRA_MBSFN_SubframeConfig__subframeAllocation1_PR_fourFrames;
|
||||
#else
|
||||
NRRRC_CONFIGURATION_REQ (msg_p).RateMatchPatternLTE_CRS_subframeAllocation_choice[j] = NR_EUTRA_MBSFN_SubframeConfig__subframeAllocation_PR_fourFrames;
|
||||
#endif
|
||||
}else {
|
||||
AssertFatal (0,"Failed to parse gNB configuration file %s, gnb %d unknown value \"%s\" for RateMatchPatternLTE_CRS_subframeAllocation_choice !\n",
|
||||
RC.config_file_name, i, RateMatchPatternLTE_CRS_subframeAllocation_choice);
|
||||
|
||||
@@ -22,9 +22,9 @@
|
||||
/*
|
||||
gnb_config.h
|
||||
-------------------
|
||||
AUTHOR : Lionel GAUTHIER, Navid Nikaein, Laurent Winckel
|
||||
COMPANY : EURECOM
|
||||
EMAIL : Lionel.Gauthier@eurecom.fr, navid.nikaein@eurecom.fr
|
||||
AUTHOR : Lionel GAUTHIER, Navid Nikaein, Laurent Winckel, WEI-TAI CHEN
|
||||
COMPANY : EURECOM, NTSUT
|
||||
EMAIL : Lionel.Gauthier@eurecom.fr, navid.nikaein@eurecom.fr, kroempa@gmail.com
|
||||
*/
|
||||
|
||||
#ifndef GNB_CONFIG_H_
|
||||
@@ -101,7 +101,7 @@ extern void NRRCConfig(void);
|
||||
//void enb_config_display(void);
|
||||
//void ru_config_display(void);
|
||||
|
||||
int RCconfig_NRRRC(MessageDef *msg_p, uint32_t i, gNB_RRC_INST *rrc);
|
||||
void RCconfig_NRRRC(MessageDef *msg_p, uint32_t i, gNB_RRC_INST *rrc);
|
||||
int RCconfig_NR_S1(MessageDef *msg_p, uint32_t i);
|
||||
|
||||
#endif /* GNB_CONFIG_H_ */
|
||||
|
||||
+99
-110
@@ -20,12 +20,12 @@
|
||||
*/
|
||||
|
||||
/*! \file openair2/GNB_APP/gnb_paramdef.f
|
||||
* \brief definition of configuration parameters for all eNodeB modules
|
||||
* \author Francois TABURET
|
||||
* \date 2017
|
||||
* \brief definition of configuration parameters for all gNodeB modules
|
||||
* \author Francois TABURET, WEI-TAI CHEN
|
||||
* \date 2018
|
||||
* \version 0.1
|
||||
* \company NOKIA BellLabs France
|
||||
* \email: francois.taburet@nokia-bell-labs.com
|
||||
* \company NOKIA BellLabs France, NTUST
|
||||
* \email: francois.taburet@nokia-bell-labs.com, kroempa@gmail.com
|
||||
* \note
|
||||
* \warning
|
||||
*/
|
||||
@@ -239,14 +239,12 @@ typedef enum {
|
||||
#define GNB_CONFIG_STRING_SIB1_SS_PBCH_BLOCKPOWER "SIB1_ss_PBCH_BlockPower"
|
||||
//NR FREQUENCYINFODL
|
||||
#define GNB_CONFIG_STRING_ABSOLUTEFREQUENCYSSB "absoluteFrequencySSB"
|
||||
#define GNB_CONFIG_STRING_SSB_SUBCARRIEROFFSET "SubcarrierSpacing"
|
||||
#define GNB_CONFIG_STRING_DL_FREQBANDINDICATORNR "DL_FreqBandIndicatorNR"
|
||||
#define GNB_CONFIG_STRING_DL_ABSOLUTEFREQUENCYPOINTA "DL_absoluteFrequencyPointA"
|
||||
|
||||
//NR DL SCS-SPECIFICCARRIER
|
||||
#define GNB_CONFIG_STRING_DL_OFFSETTOCARRIER "DL_offsetToCarrier"
|
||||
#define GNB_CONFIG_STRING_DL_SCS_SUBCARRIERSPACING "DL_SCS_SubcarrierSpacing"
|
||||
#define GNB_CONFIG_STRING_DL_SCS_SPECIFICCARRIER_K0 "DL_SCS_SpecificCarrier_k0"
|
||||
#define GNB_CONFIG_STRING_DL_CARRIERBANDWIDTH "DL_carrierBandwidth"
|
||||
|
||||
// NR BWP-DOWNLINKCOMMON
|
||||
@@ -264,14 +262,15 @@ typedef enum {
|
||||
//NR UL SCS-SPECIFICCARRIER
|
||||
#define GNB_CONFIG_STRING_UL_OFFSETTOCARRIER "UL_offsetToCarrier"
|
||||
#define GNB_CONFIG_STRING_UL_SCS_SUBCARRIERSPACING "UL_SCS_SubcarrierSpacing"
|
||||
#define GNB_CONFIG_STRING_UL_SCS_SPECIFICCARRIER_K0 "UL_SCS_SpecificCarrier_k0"
|
||||
#define GNB_CONFIG_STRING_UL_CARRIERBANDWIDTH "UL_carrierBandwidth"
|
||||
|
||||
// NR BWP-UPLINKCOMMON
|
||||
#define GNB_CONFIG_STRING_UL_LOCATIONANDBANDWIDTH "UL_locationAndBandwidth"
|
||||
#define GNB_CONFIG_STRING_UL_BWP_SUBCARRIERSPACING "UL_BWP_SubcarrierSpacing"
|
||||
#define GNB_CONFIG_STRING_UL_BWP_PREFIX_TYPE "UL_BWP_prefix_type"
|
||||
#define GNB_CONFIG_STRING_UL_TIMEALIGNMENTTIMERCOMMON "UL_timeAlignmentTimerCommon"
|
||||
|
||||
#define GNB_CONFIG_STRING_SERVINGCELLCONFIGCOMMON_N_TIMINGADVANCEOFFSET "ServingCellConfigCommon_n_TimingAdvanceOffset"
|
||||
#define GNB_CONFIG_STRING_SERVINGCELLCONFIGCOMMON_SSB_POSITIONSINBURST_PR "ServingCellConfigCommon_ssb_PositionsInBurst_PR"
|
||||
#define GNB_CONFIG_STRING_SERVINGCELLCONFIGCOMMON_SSB_PERIODICITYSERVINGCELL "ServingCellConfigCommon_ssb_periodicityServingCell"
|
||||
#define GNB_CONFIG_STRING_SERVINGCELLCONFIGCOMMON_DMRS_TYPEA_POSITION "ServingCellConfigCommon_dmrs_TypeA_Position"
|
||||
@@ -331,16 +330,19 @@ typedef enum {
|
||||
///PUSCH-TIMEDOMAINRESOURCEALLOCATION
|
||||
#define GNB_CONFIG_STRING_PUSCH_TIMEDOMAINRESOURCEALLOCATION_K2 "PUSCH_TimeDomainResourceAllocation_k2"
|
||||
#define GNB_CONFIG_STRING_PUSCH_TIMEDOMAINRESOURCEALLOCATION_MAPPINGTYPE "PUSCH_TimeDomainResourceAllocation_mappingType"
|
||||
#define GNB_CONFIG_STRING_PUSCH_TIMEDOMAINRESOURCEALLOCATION_STARTSYMBOLANDLENGTH "PUSCH_TimeDomainResourceAllocation_startSymbolAndLength"
|
||||
|
||||
//PUCCH-CONFIGCOMMON
|
||||
#define GNB_CONFIG_STRING_PUCCH_RESOURCECOMMON "pucch_ResourceCommon"
|
||||
#define GNB_CONFIG_STRING_PUCCH_GROUPHOPPING "pucch_GroupHopping"
|
||||
#define GNB_CONFIG_STRING_HOPPINGID "hoppingId"
|
||||
#define GNB_CONFIG_STRING_P0_NOMINAL "p0_nominal"
|
||||
|
||||
//PDSCH-CONFIGCOMMON
|
||||
//PDSCH-TIMEDOMAINRESOURCEALLOCATION
|
||||
#define GNB_CONFIG_STRING_PDSCH_TIMEDOMAINRESOURCEALLOCATION_K0 "PDSCH_TimeDomainResourceAllocation_k0"
|
||||
#define GNB_CONFIG_STRING_PDSCH_TIMEDOMAINRESOURCEALLOCATION_MAPPINGTYPE "PDSCH_TimeDomainResourceAllocation_mappingType"
|
||||
|
||||
#define GNB_CONFIG_STRING_PDSCH_TIMEDOMAINRESOURCEALLOCATION_STARTSYMBOLANDLENGTH "PDSCH_TimeDomainResourceAllocation_startSymbolAndLength"
|
||||
//RATEMATCHPATTERN IS USED TO CONFIGURE ONE RATE MATCHING PATTERN FOR PDSCH
|
||||
#define GNB_CONFIG_STRING_RATEMATCHPATTERNID "rateMatchPatternId"
|
||||
#define GNB_CONFIG_STRING_RATEMATCHPATTERN_PATTERNTYPE "RateMatchPattern_patternType"
|
||||
@@ -351,11 +353,12 @@ typedef enum {
|
||||
#define GNB_CONFIG_STRING_RATEMATCHPATTERN_MODE "RateMatchPattern_mode"
|
||||
|
||||
//PDCCH-CONFIGCOMMON
|
||||
#define GNB_CONFIG_STRING_CONTROLRESOURCESETZERO "controlResourceSetZero"
|
||||
#define GNB_CONFIG_STRING_SEARCHSPACEZERO "searchSpaceZero"
|
||||
#define GNB_CONFIG_STRING_SEARCHSPACESIB1 "searchSpaceSIB1"
|
||||
#define GNB_CONFIG_STRING_SEARCHSPACEOTHERSYSTEMINFORMATION "searchSpaceOtherSystemInformation"
|
||||
#define GNB_CONFIG_STRING_PAGINGSEARCHSPACE "pagingSearchSpace"
|
||||
#define GNB_CONFIG_STRING_RA_SEARCHSPACE "ra_SearchSpace"
|
||||
#define GNB_CONFIG_STRING_RACH_RA_CONTROLRESOURCESET "rach_ra_ControlResourceSet"
|
||||
//NR PDCCH-CONFIGCOMMON COMMONCONTROLRESOURCESSETS
|
||||
#define GNB_CONFIG_STRING_PDCCH_COMMON_CONTROLRESOURCESETID "PDCCH_common_controlResourceSetId"
|
||||
#define GNB_CONFIG_STRING_PDCCH_COMMON_CONTROLRESOURCESET_DURATION "PDCCH_common_ControlResourceSet_duration"
|
||||
@@ -366,19 +369,14 @@ typedef enum {
|
||||
#define GNB_CONFIG_STRING_PDCCH_PRECODERGRANULARITY "PDCCH_precoderGranularity"
|
||||
#define GNB_CONFIG_STRING_PDCCH_TCI_STATEID "PDCCH_TCI_StateId"
|
||||
#define GNB_CONFIG_STRING_TCI_PRESENTINDCI "tci_PresentInDCI"
|
||||
#define GNB_CONFIG_STRING_PDCCH_DMRS_SCRAMBLINGID "pdcch_DMRS_ScramblingID"
|
||||
|
||||
//NR PDCCH-ConfigCommon commonSearchSpaces
|
||||
#define GNB_CONFIG_STRING_SEARCHSPACEID "SearchSpaceId"
|
||||
#define GNB_CONFIG_STRING_COMMONSEARCHSPACES_CONTROLRESOURCESETID "commonSearchSpaces_controlResourceSetId"
|
||||
#define GNB_CONFIG_STRING_SEARCHSPACE_MONITORINGSLOTPERIODICITYANDOFFSET_CHOICE "SearchSpace_monitoringSlotPeriodicityAndOffset_choice"
|
||||
#define GNB_CONFIG_STRING_SEARCHSPACE_MONITORINGSLOTPERIODICITYANDOFFSET_SL1 "SearchSpace_monitoringSlotPeriodicityAndOffset_sl1"
|
||||
#define GNB_CONFIG_STRING_SEARCHSPACE_MONITORINGSLOTPERIODICITYANDOFFSET_SL2 "SearchSpace_monitoringSlotPeriodicityAndOffset_sl2"
|
||||
#define GNB_CONFIG_STRING_SEARCHSPACE_MONITORINGSLOTPERIODICITYANDOFFSET_SL4 "SearchSpace_monitoringSlotPeriodicityAndOffset_sl4"
|
||||
#define GNB_CONFIG_STRING_SEARCHSPACE_MONITORINGSLOTPERIODICITYANDOFFSET_SL5 "SearchSpace_monitoringSlotPeriodicityAndOffset_sl5"
|
||||
#define GNB_CONFIG_STRING_SEARCHSPACE_MONITORINGSLOTPERIODICITYANDOFFSET_SL8 "SearchSpace_monitoringSlotPeriodicityAndOffset_sl8"
|
||||
#define GNB_CONFIG_STRING_SEARCHSPACE_MONITORINGSLOTPERIODICITYANDOFFSET_SL10 "SearchSpace_monitoringSlotPeriodicityAndOffset_sl10"
|
||||
#define GNB_CONFIG_STRING_SEARCHSPACE_MONITORINGSLOTPERIODICITYANDOFFSET_SL16 "SearchSpace_monitoringSlotPeriodicityAndOffset_sl16"
|
||||
#define GNB_CONFIG_STRING_SEARCHSPACE_MONITORINGSLOTPERIODICITYANDOFFSET_SL20 "SearchSpace_monitoringSlotPeriodicityAndOffset_sl20"
|
||||
#define GNB_CONFIG_STRING_SEARCHSPACE_MONITORINGSLOTPERIODICITYANDOFFSET_VALUE "SearchSpace_monitoringSlotPeriodicityAndOffset_value"
|
||||
#define GNB_CONFIG_STRING_SEARCHSPACE_DURATION "SearchSpace_duration"
|
||||
#define GNB_CONFIG_STRING_SEARCHSPACE_NROFCANDIDATES_AGGREGATIONLEVEL1 "SearchSpace_nrofCandidates_aggregationLevel1"
|
||||
#define GNB_CONFIG_STRING_SEARCHSPACE_NROFCANDIDATES_AGGREGATIONLEVEL2 "SearchSpace_nrofCandidates_aggregationLevel2"
|
||||
#define GNB_CONFIG_STRING_SEARCHSPACE_NROFCANDIDATES_AGGREGATIONLEVEL4 "SearchSpace_nrofCandidates_aggregationLevel4"
|
||||
@@ -403,15 +401,7 @@ typedef enum {
|
||||
|
||||
/* init for checkedparam_t structure */
|
||||
|
||||
#define NRCCPARAMS_CHECK { \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
#define NRCCPARAMS_CHECK { \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
@@ -579,12 +569,10 @@ typedef enum {
|
||||
{GNB_CONFIG_STRING_SIB1_SSB_PERIODICITYSERVINGCELL, NULL, 0, iptr:&SIB1_ssb_PeriodicityServingCell, defintval:5, TYPE_UINT, 0}, \
|
||||
{GNB_CONFIG_STRING_SIB1_SS_PBCH_BLOCKPOWER, NULL, 0, iptr:&SIB1_ss_PBCH_BlockPower, defintval:-60, TYPE_INT, 0}, \
|
||||
{GNB_CONFIG_STRING_ABSOLUTEFREQUENCYSSB, NULL, 0, iptr:&absoluteFrequencySSB, defintval:0, TYPE_UINT, 0}, \
|
||||
{GNB_CONFIG_STRING_SSB_SUBCARRIEROFFSET, NULL, 0, iptr:&ssb_SubcarrierOffset, defintval:15, TYPE_UINT, 0}, \
|
||||
{GNB_CONFIG_STRING_DL_FREQBANDINDICATORNR, NULL, 0, iptr:&DL_FreqBandIndicatorNR, defintval:15, TYPE_UINT, 0}, \
|
||||
{GNB_CONFIG_STRING_DL_ABSOLUTEFREQUENCYPOINTA, NULL, 0, iptr:&DL_absoluteFrequencyPointA, defintval:15, TYPE_UINT, 0}, \
|
||||
{GNB_CONFIG_STRING_DL_OFFSETTOCARRIER, NULL, 0, iptr:&DL_offsetToCarrier, defintval:15, TYPE_UINT, 0}, \
|
||||
{GNB_CONFIG_STRING_DL_SCS_SUBCARRIERSPACING, NULL, 0, strptr:&DL_SCS_SubcarrierSpacing, defstrval:"kHz15", TYPE_STRING, 0}, \
|
||||
{GNB_CONFIG_STRING_DL_SCS_SPECIFICCARRIER_K0, NULL, 0, iptr:&DL_SCS_SpecificCarrier_k0, defintval:0, TYPE_INT, 0}, \
|
||||
{GNB_CONFIG_STRING_DL_CARRIERBANDWIDTH, NULL, 0, iptr:&DL_carrierBandwidth, defintval:15, TYPE_UINT, 0}, \
|
||||
{GNB_CONFIG_STRING_DL_LOCATIONANDBANDWIDTH, NULL, 0, iptr:&DL_locationAndBandwidth, defintval:15, TYPE_UINT, 0}, \
|
||||
{GNB_CONFIG_STRING_DL_BWP_SUBCARRIERSPACING, NULL, 0, strptr:&DL_BWP_SubcarrierSpacing, defstrval:"kHz15", TYPE_STRING, 0}, \
|
||||
@@ -596,11 +584,12 @@ typedef enum {
|
||||
{GNB_CONFIG_STRING_UL_FREQUENCYSHIFT7P5KHZ, NULL, 0, strptr:&UL_frequencyShift7p5khz, defstrval:"TRUE", TYPE_STRING, 0}, \
|
||||
{GNB_CONFIG_STRING_UL_OFFSETTOCARRIER, NULL, 0, iptr:&UL_offsetToCarrier, defintval:10, TYPE_UINT, 0}, \
|
||||
{GNB_CONFIG_STRING_UL_SCS_SUBCARRIERSPACING, NULL, 0, strptr:&UL_SCS_SubcarrierSpacing, defstrval:"kHz15", TYPE_STRING, 0}, \
|
||||
{GNB_CONFIG_STRING_UL_SCS_SPECIFICCARRIER_K0, NULL, 0, iptr:&UL_SCS_SpecificCarrier_k0, defintval:0, TYPE_INT, 0}, \
|
||||
{GNB_CONFIG_STRING_UL_CARRIERBANDWIDTH, NULL, 0, iptr:&UL_carrierBandwidth, defintval:15, TYPE_UINT, 0}, \
|
||||
{GNB_CONFIG_STRING_UL_LOCATIONANDBANDWIDTH, NULL, 0, iptr:&UL_locationAndBandwidth, defintval:15, TYPE_UINT, 0}, \
|
||||
{GNB_CONFIG_STRING_UL_BWP_SUBCARRIERSPACING, NULL, 0, strptr:&UL_BWP_SubcarrierSpacing, defstrval:"kHz15", TYPE_STRING, 0}, \
|
||||
{GNB_CONFIG_STRING_UL_BWP_PREFIX_TYPE, NULL, 0, strptr:&UL_BWP_prefix_type, defstrval:"NORMAL", TYPE_STRING, 0}, \
|
||||
{GNB_CONFIG_STRING_UL_TIMEALIGNMENTTIMERCOMMON, NULL, 0, strptr:&UL_timeAlignmentTimerCommon, defstrval:"infinity", TYPE_STRING, 0}, \
|
||||
{GNB_CONFIG_STRING_SERVINGCELLCONFIGCOMMON_N_TIMINGADVANCEOFFSET, NULL, 0, strptr:&ServingCellConfigCommon_n_TimingAdvanceOffset, defstrval:"n0", TYPE_STRING, 0}, \
|
||||
{GNB_CONFIG_STRING_SERVINGCELLCONFIGCOMMON_SSB_POSITIONSINBURST_PR, NULL, 0, strptr:&ServingCellConfigCommon_ssb_PositionsInBurst_PR, defstrval:"shortBitmap", TYPE_STRING, 0}, \
|
||||
{GNB_CONFIG_STRING_SERVINGCELLCONFIGCOMMON_SSB_PERIODICITYSERVINGCELL, NULL, 0, iptr:&ServingCellConfigCommon_ssb_periodicityServingCell, defintval:10, TYPE_UINT, 0}, \
|
||||
{GNB_CONFIG_STRING_SERVINGCELLCONFIGCOMMON_DMRS_TYPEA_POSITION, NULL, 0, iptr:&ServingCellConfigCommon_dmrs_TypeA_Position, defintval:0, TYPE_UINT, 0}, \
|
||||
@@ -648,10 +637,14 @@ typedef enum {
|
||||
{GNB_CONFIG_STRING_P0_NOMINALWITHGRANT, NULL, 0, iptr:&p0_NominalWithGrant, defintval:0, TYPE_INT, 0}, \
|
||||
{GNB_CONFIG_STRING_PUSCH_TIMEDOMAINRESOURCEALLOCATION_K2, NULL, 0, iptr:&PUSCH_TimeDomainResourceAllocation_k2, defintval:0, TYPE_UINT, 0}, \
|
||||
{GNB_CONFIG_STRING_PUSCH_TIMEDOMAINRESOURCEALLOCATION_MAPPINGTYPE, NULL, 0, strptr:&PUSCH_TimeDomainResourceAllocation_mappingType, defstrval:"typeA", TYPE_STRING, 0}, \
|
||||
{GNB_CONFIG_STRING_PUSCH_TIMEDOMAINRESOURCEALLOCATION_STARTSYMBOLANDLENGTH, NULL, 0, iptr:&PUSCH_TimeDomainResourceAllocation_startSymbolAndLength, defintval:0, TYPE_UINT, 0}, \
|
||||
{GNB_CONFIG_STRING_PUCCH_RESOURCECOMMON, NULL, 0, iptr:&pucch_ResourceCommon, defintval:0, TYPE_UINT, 0}, \
|
||||
{GNB_CONFIG_STRING_PUCCH_GROUPHOPPING, NULL, 0, strptr:&pucch_GroupHopping, defstrval:"neither", TYPE_STRING, 0}, \
|
||||
{GNB_CONFIG_STRING_HOPPINGID, NULL, 0, iptr:&hoppingId, defintval:0, TYPE_UINT, 0}, \
|
||||
{GNB_CONFIG_STRING_P0_NOMINAL, NULL, 0, iptr:&p0_nominal, defintval:-30, TYPE_INT, 0}, \
|
||||
{GNB_CONFIG_STRING_PDSCH_TIMEDOMAINRESOURCEALLOCATION_K0, NULL, 0, iptr:&PDSCH_TimeDomainResourceAllocation_k0, defintval:2, TYPE_UINT, 0}, \
|
||||
{GNB_CONFIG_STRING_PDSCH_TIMEDOMAINRESOURCEALLOCATION_MAPPINGTYPE, NULL, 0, strptr:&PDSCH_TimeDomainResourceAllocation_mappingType, defstrval:"typeA", TYPE_STRING, 0}, \
|
||||
{GNB_CONFIG_STRING_PDSCH_TIMEDOMAINRESOURCEALLOCATION_STARTSYMBOLANDLENGTH, NULL, 0, iptr:&PDSCH_TimeDomainResourceAllocation_startSymbolAndLength, defintval:0, TYPE_UINT, 0}, \
|
||||
{GNB_CONFIG_STRING_RATEMATCHPATTERNID, NULL, 0, iptr:&rateMatchPatternId, defintval:0, TYPE_UINT, 0}, \
|
||||
{GNB_CONFIG_STRING_RATEMATCHPATTERN_PATTERNTYPE, NULL, 0, strptr:&RateMatchPattern_patternType, defstrval:"bitmaps", TYPE_STRING, 0}, \
|
||||
{GNB_CONFIG_STRING_SYMBOLSINRESOURCEBLOCK, NULL, 0, strptr:&symbolsInResourceBlock, defstrval:"oneSlot", TYPE_STRING, 0}, \
|
||||
@@ -659,11 +652,12 @@ typedef enum {
|
||||
{GNB_CONFIG_STRING_RATEMATCHPATTERN_CONTROLRESOURCESET, NULL, 0, iptr:&RateMatchPattern_controlResourceSet, defintval:5, TYPE_UINT, 0}, \
|
||||
{GNB_CONFIG_STRING_RATEMATCHPATTERN_SUBCARRIERSPACING, NULL, 0, strptr:&RateMatchPattern_subcarrierSpacing, defstrval:"kHz15", TYPE_STRING, 0}, \
|
||||
{GNB_CONFIG_STRING_RATEMATCHPATTERN_MODE, NULL, 0, strptr:&RateMatchPattern_mode, defstrval:"dynamic", TYPE_STRING, 0}, \
|
||||
{GNB_CONFIG_STRING_CONTROLRESOURCESETZERO, NULL, 0, iptr:&controlResourceSetZero, defintval:0, TYPE_UINT, 0}, \
|
||||
{GNB_CONFIG_STRING_SEARCHSPACEZERO, NULL, 0, iptr:&searchSpaceZero, defintval:0, TYPE_UINT, 0}, \
|
||||
{GNB_CONFIG_STRING_SEARCHSPACESIB1, NULL, 0, iptr:&searchSpaceSIB1, defintval:10, TYPE_UINT, 0}, \
|
||||
{GNB_CONFIG_STRING_SEARCHSPACEOTHERSYSTEMINFORMATION, NULL, 0, iptr:&searchSpaceOtherSystemInformation, defintval:10, TYPE_UINT, 0}, \
|
||||
{GNB_CONFIG_STRING_PAGINGSEARCHSPACE, NULL, 0, iptr:&pagingSearchSpace, defintval:10, TYPE_UINT, 0}, \
|
||||
{GNB_CONFIG_STRING_RA_SEARCHSPACE, NULL, 0, iptr:&ra_SearchSpace, defintval:10, TYPE_UINT, 0}, \
|
||||
{GNB_CONFIG_STRING_RACH_RA_CONTROLRESOURCESET, NULL, 0, iptr:&rach_ra_ControlResourceSet, defintval:10, TYPE_UINT, 0}, \
|
||||
{GNB_CONFIG_STRING_PDCCH_COMMON_CONTROLRESOURCESETID, NULL, 0, iptr:&PDCCH_common_controlResourceSetId, defintval:5, TYPE_UINT, 0}, \
|
||||
{GNB_CONFIG_STRING_PDCCH_COMMON_CONTROLRESOURCESET_DURATION, NULL, 0, iptr:&PDCCH_common_ControlResourceSet_duration, defintval:2, TYPE_UINT, 0}, \
|
||||
{GNB_CONFIG_STRING_PDCCH_CCE_REG_MAPPINGTYPE, NULL, 0, strptr:&PDCCH_cce_REG_MappingType, defstrval:"nonInterleaved", TYPE_STRING, 0}, \
|
||||
@@ -673,17 +667,12 @@ typedef enum {
|
||||
{GNB_CONFIG_STRING_PDCCH_PRECODERGRANULARITY, NULL, 0, strptr:&PDCCH_precoderGranularity, defstrval:"sameAsREG-bundle", TYPE_STRING, 0}, \
|
||||
{GNB_CONFIG_STRING_PDCCH_TCI_STATEID, NULL, 0, iptr:&PDCCH_TCI_StateId, defintval:32, TYPE_UINT, 0}, \
|
||||
{GNB_CONFIG_STRING_TCI_PRESENTINDCI, NULL, 0, strptr:&tci_PresentInDCI, defstrval:"ENABLE", TYPE_STRING, 0}, \
|
||||
{GNB_CONFIG_STRING_PDCCH_DMRS_SCRAMBLINGID, NULL, 0, iptr:&PDCCH_DMRS_ScramblingID, defintval:0, TYPE_UINT, 0}, \
|
||||
{GNB_CONFIG_STRING_SEARCHSPACEID, NULL, 0, iptr:&SearchSpaceId, defintval:10, TYPE_UINT, 0}, \
|
||||
{GNB_CONFIG_STRING_COMMONSEARCHSPACES_CONTROLRESOURCESETID, NULL, 0, iptr:&commonSearchSpaces_controlResourceSetId, defintval:5, TYPE_UINT, 0}, \
|
||||
{GNB_CONFIG_STRING_SEARCHSPACE_MONITORINGSLOTPERIODICITYANDOFFSET_CHOICE, NULL, 0, strptr:&SearchSpace_monitoringSlotPeriodicityAndOffset_choice, defstrval:"sl1", TYPE_STRING, 0}, \
|
||||
{GNB_CONFIG_STRING_SEARCHSPACE_MONITORINGSLOTPERIODICITYANDOFFSET_SL1, NULL, 0, iptr:&SearchSpace_monitoringSlotPeriodicityAndOffset_sl1, defintval:0, TYPE_UINT, 0}, \
|
||||
{GNB_CONFIG_STRING_SEARCHSPACE_MONITORINGSLOTPERIODICITYANDOFFSET_SL2, NULL, 0, iptr:&SearchSpace_monitoringSlotPeriodicityAndOffset_sl2, defintval:0, TYPE_UINT, 0}, \
|
||||
{GNB_CONFIG_STRING_SEARCHSPACE_MONITORINGSLOTPERIODICITYANDOFFSET_SL4, NULL, 0, iptr:&SearchSpace_monitoringSlotPeriodicityAndOffset_sl4, defintval:0, TYPE_UINT, 0}, \
|
||||
{GNB_CONFIG_STRING_SEARCHSPACE_MONITORINGSLOTPERIODICITYANDOFFSET_SL5, NULL, 0, iptr:&SearchSpace_monitoringSlotPeriodicityAndOffset_sl5, defintval:0, TYPE_UINT, 0}, \
|
||||
{GNB_CONFIG_STRING_SEARCHSPACE_MONITORINGSLOTPERIODICITYANDOFFSET_SL8, NULL, 0, iptr:&SearchSpace_monitoringSlotPeriodicityAndOffset_sl8, defintval:0, TYPE_UINT, 0}, \
|
||||
{GNB_CONFIG_STRING_SEARCHSPACE_MONITORINGSLOTPERIODICITYANDOFFSET_SL10, NULL, 0, iptr:&SearchSpace_monitoringSlotPeriodicityAndOffset_sl10, defintval:0, TYPE_UINT, 0}, \
|
||||
{GNB_CONFIG_STRING_SEARCHSPACE_MONITORINGSLOTPERIODICITYANDOFFSET_SL16, NULL, 0, iptr:&SearchSpace_monitoringSlotPeriodicityAndOffset_sl16, defintval:0, TYPE_UINT, 0}, \
|
||||
{GNB_CONFIG_STRING_SEARCHSPACE_MONITORINGSLOTPERIODICITYANDOFFSET_SL20, NULL, 0, iptr:&SearchSpace_monitoringSlotPeriodicityAndOffset_sl20, defintval:0, TYPE_UINT, 0}, \
|
||||
{GNB_CONFIG_STRING_SEARCHSPACE_MONITORINGSLOTPERIODICITYANDOFFSET_VALUE, NULL, 0, iptr:&SearchSpace_monitoringSlotPeriodicityAndOffset_value, defintval:0, TYPE_UINT, 0}, \
|
||||
{GNB_CONFIG_STRING_SEARCHSPACE_DURATION, NULL, 0, iptr:&SearchSpace_duration, defintval:0, TYPE_UINT, 0}, \
|
||||
{GNB_CONFIG_STRING_SEARCHSPACE_NROFCANDIDATES_AGGREGATIONLEVEL1, NULL, 0, iptr:&SearchSpace_nrofCandidates_aggregationLevel1, defintval:0, TYPE_UINT, 0}, \
|
||||
{GNB_CONFIG_STRING_SEARCHSPACE_NROFCANDIDATES_AGGREGATIONLEVEL2, NULL, 0, iptr:&SearchSpace_nrofCandidates_aggregationLevel2, defintval:0, TYPE_UINT, 0}, \
|
||||
{GNB_CONFIG_STRING_SEARCHSPACE_NROFCANDIDATES_AGGREGATIONLEVEL4, NULL, 0, iptr:&SearchSpace_nrofCandidates_aggregationLevel4, defintval:0, TYPE_UINT, 0}, \
|
||||
@@ -730,12 +719,10 @@ typedef enum {
|
||||
#define GNB_CONFIG_SIB1_SSB_PERIODICITYSERVINGCELL_IDX 18
|
||||
#define GNB_CONFIG_SIB1_SS_PBCH_BLOCKPOWER_IDX 19
|
||||
#define GNB_CONFIG_ABSOLUTEFREQUENCYSSB_IDX 20
|
||||
#define GNB_CONFIG_SSB_SUBCARRIEROFFSET_IDX 21
|
||||
#define GNB_CONFIG_DL_FREQBANDINDICATORNR_IDX 22
|
||||
#define GNB_CONFIG_DL_ABSOLUTEFREQUENCYPOINTA_IDX 23
|
||||
#define GNB_CONFIG_DL_OFFSETTOCARRIER_IDX 24
|
||||
#define GNB_CONFIG_DL_SUBCARRIERSPACING_IDX 25
|
||||
#define GNB_CONFIG_DL_SCS_SPECIFICCARRIER_K0_IDX 26
|
||||
#define GNB_CONFIG_DL_CARRIERBANDWIDTH_IDX 27
|
||||
#define GNB_CONFIG_DL_LOCATIONANDBANDWIDTH_IDX 28
|
||||
#define GNB_CONFIG_DL_BWP_SUBCARRIERSPACING_IDX 29
|
||||
@@ -747,12 +734,13 @@ typedef enum {
|
||||
#define GNB_CONFIG_UL_FREQUENCYSHIFT7P5KHZ_IDX 35
|
||||
#define GNB_CONFIG_UL_OFFSETTOCARRIER_IDX 36
|
||||
#define GNB_CONFIG_UL_SCS_SUBCARRIERSPACING_IDX 37
|
||||
#define GNB_CONFIG_UL_SCS_SPECIFICCARRIER_K0_IDX 38
|
||||
#define GNB_CONFIG_UL_CARRIERBANDWIDTH_IDX 39
|
||||
#define GNB_CONFIG_UL_LOCATIONANDBANDWIDTH_IDX 41
|
||||
#define GNB_CONFIG_UL_BWP_SUBCARRIERSPACING_IDX 42
|
||||
#define GNB_CONFIG_UL_BWP_PREFIX_TYPE_IDX 43
|
||||
#define GNB_CONFIG_SERVINGCELLCONFIGCOMMON_SSB_POSITIONSINBURST_PR_IDX 44
|
||||
#define GNB_CONFIG_TIMEALIGNMENTTIMERCOMMON_IDX 44
|
||||
#define GNB_CONFIG_SERVINGCELLCONFIGCOMMON_N_TIMINGADVANCEOFFSET_IDX
|
||||
#define GNB_CONFIG_SERVINGCELLCONFIGCOMMON_SSB_POSITIONSINBURST_PR_IDX 45
|
||||
#define GNB_CONFIG_SERVINGCELLCONFIGCOMMON_SSB_PERIODICITYSERVINGCELL_IDX 46
|
||||
#define GNB_CONFIG_SERVINGCELLCONFIGCOMMON_DMRS_TYPEA_POSITION_IDX 47
|
||||
#define GNB_CONFIG_NIA_SUBCARRIERSPACING_IDX 48
|
||||
@@ -777,64 +765,64 @@ typedef enum {
|
||||
#define GNB_CONFIG_RACH_RA_MSG3SIZEGROUPA_IDX 67
|
||||
#define GNB_CONFIG_RACH_MESSAGEPOWEROFFSETGROUPB_IDX 68
|
||||
#define GNB_CONFIG_RACH_NUMBEROFRA_PREAMBLESGROUPA_IDX 69
|
||||
#define GNB_CONFIG_RACH_RA_CONTENTIONRESOLUTIONTIMER_IDX 60
|
||||
#define GNB_CONFIG_RSRP_THRESHOLDSSB_IDX 70
|
||||
#define GNB_CONFIG_RSRP_THRESHOLDSSB_SUL_IDX 71
|
||||
#define GNB_CONFIG_PRACH_ROOTSEQUENCEINDEX_CHOICE_IDX 72
|
||||
#define GNB_CONFIG_PRACH_ROOTSEQUENCEINDEX_L839_IDX 73
|
||||
#define GNB_CONFIG_PRACH_ROOTSEQUENCEINDEX_L139_IDX 74
|
||||
#define GNB_CONFIG_PRACH_MSG1_SUBCARRIERSPACING_IDX 75
|
||||
#define GNB_CONFIG_RESTRICTEDSETCONFIG_IDX 76
|
||||
#define GNB_CONFIG_MSG3_TRANSFORMPRECODING_IDX 77
|
||||
#define GNB_CONFIG_PRACH_CONFIGURATIONINDEX_IDX 78
|
||||
#define GNB_CONFIG_PRACH_MSG1_FDM_IDX 79
|
||||
#define GNB_CONFIG_PRACH_MSG1_FREQUENCYSTART_IDX 80
|
||||
#define GNB_CONFIG_ZEROCORRELATIONZONECONFIG_IDX 81
|
||||
#define GNB_CONFIG_PREAMBLERECEIVEDTARGETPOWER_IDX 82
|
||||
#define GNB_CONFIG_PREAMBLETRANSMAX_IDX 83
|
||||
#define GNB_CONFIG_POWERRAMPINGSTEP_IDX 84
|
||||
#define GNB_CONFIG_RA_RESPONSEWINDOW_IDX 85
|
||||
#define GNB_CONFIG_GROUPHOPPINGENABLEDTRANSFORMPRECODING_IDX 86
|
||||
#define GNB_CONFIG_MSG3_DELTAPREAMBLE_IDX 87
|
||||
#define GNB_CONFIG_P0_NOMINALWITHGRANT_IDX 88
|
||||
#define GNB_CONFIG_PUSCH_TIMEDOMAINRESOURCEALLOCATION_K2_IDX 89
|
||||
#define GNB_CONFIG_PUSCH_TIMEDOMAINRESOURCEALLOCATION_MAPPINGTYPE_IDX 90
|
||||
#define GNB_CONFIG_PUCCH_GROUPHOPPING_IDX 91
|
||||
#define GNB_CONFIG_P0_NOMINAL_IDX 92
|
||||
#define GNB_CONFIG_PDSCH_TIMEDOMAINRESOURCEALLOCATION_K0_IDX 93
|
||||
#define GNB_CONFIG_PDSCH_TIMEDOMAINRESOURCEALLOCATION_MAPPINGTYPE_IDX 94
|
||||
#define GNB_CONFIG_RATEMATCHPATTERNID_IDX 95
|
||||
#define GNB_CONFIG_RATEMATCHPATTERN_PATTERNTYPE_IDX 96
|
||||
#define GNB_CONFIG_SYMBOLSINRESOURCEBLOCK_IDX 97
|
||||
#define GNB_CONFIG_PERIODICITYANDPATTERN_IDX 98
|
||||
#define GNB_CONFIG_RATEMATCHPATTERN_CONTROLRESOURCESET_IDX 99
|
||||
#define GNB_CONFIG_RATEMATCHPATTERN_SUBCARRIERSPACING_IDX 100
|
||||
#define GNB_CONFIG_RATEMATCHPATTERN_MODE_IDX 101
|
||||
#define GNB_CONFIG_SEARCHSPACESIB1_IDX 102
|
||||
#define GNB_CONFIG_SEARCHSPACEOTHERSYSTEMINFORMATION_IDX 103
|
||||
#define GNB_CONFIG_PAGINGSEARCHSPACE_IDX 104
|
||||
#define GNB_CONFIG_RA_SEARCHSPACE_IDX 105
|
||||
#define GNB_CONFIG_RACH_RA_CONTROLRESOURCESET_IDX 106
|
||||
#define GNB_CONFIG_PDCCH_COMMON_CONTROLRESOURCESETID_IDX 107
|
||||
#define GNB_CONFIG_PDCCH_COMMON_CONTROLRESOURCESET_DURATION_IDX 108
|
||||
#define GNB_CONFIG_PDCCH_CCE_REG_MAPPINGTYPE_IDX 109
|
||||
#define GNB_CONFIG_PDCCH_REG_BUNDLESIZE_IDX 110
|
||||
#define GNB_CONFIG_PDCCH_INTERLEAVERSIZE_IDX 111
|
||||
#define GNB_CONFIG_PDCCH_SHIFTINDEX_IDX 112
|
||||
#define GNB_CONFIG_PDCCH_PRECODERGRANULARITY_IDX 113
|
||||
#define GNB_CONFIG_PDCCH_TCI_STATEID_IDX 114
|
||||
#define GNB_CONFIG_TCI_PRESENTINDCI_IDX 115
|
||||
#define GNB_CONFIG_SEARCHSPACEID_IDX 116
|
||||
#define GNB_CONFIG_COMMONSEARCHSPACES_CONTROLRESOURCESETID_IDX 117
|
||||
#define GNB_CONFIG_SEARCHSPACE_MONITORINGSLOTPERIODICITYANDOFFSET_CHOICE_IDX 118
|
||||
#define GNB_CONFIG_SEARCHSPACE_MONITORINGSLOTPERIODICITYANDOFFSET_SL1_IDX 119
|
||||
#define GNB_CONFIG_SEARCHSPACE_MONITORINGSLOTPERIODICITYANDOFFSET_SL2_IDX 120
|
||||
#define GNB_CONFIG_SEARCHSPACE_MONITORINGSLOTPERIODICITYANDOFFSET_SL4_IDX 121
|
||||
#define GNB_CONFIG_SEARCHSPACE_MONITORINGSLOTPERIODICITYANDOFFSET_SL5_IDX 122
|
||||
#define GNB_CONFIG_SEARCHSPACE_MONITORINGSLOTPERIODICITYANDOFFSET_SL8_IDX 123
|
||||
#define GNB_CONFIG_SEARCHSPACE_MONITORINGSLOTPERIODICITYANDOFFSET_SL10_IDX 124
|
||||
#define GNB_CONFIG_SEARCHSPACE_MONITORINGSLOTPERIODICITYANDOFFSET_SL16_IDX 125
|
||||
#define GNB_CONFIG_SEARCHSPACE_MONITORINGSLOTPERIODICITYANDOFFSET_SL20_IDX 126
|
||||
#define GNB_CONFIG_RACH_RA_CONTENTIONRESOLUTIONTIMER_IDX 70
|
||||
#define GNB_CONFIG_RSRP_THRESHOLDSSB_IDX 71
|
||||
#define GNB_CONFIG_RSRP_THRESHOLDSSB_SUL_IDX 72
|
||||
#define GNB_CONFIG_PRACH_ROOTSEQUENCEINDEX_CHOICE_IDX 73
|
||||
#define GNB_CONFIG_PRACH_ROOTSEQUENCEINDEX_L839_IDX 74
|
||||
#define GNB_CONFIG_PRACH_ROOTSEQUENCEINDEX_L139_IDX 75
|
||||
#define GNB_CONFIG_PRACH_MSG1_SUBCARRIERSPACING_IDX 76
|
||||
#define GNB_CONFIG_RESTRICTEDSETCONFIG_IDX 77
|
||||
#define GNB_CONFIG_MSG3_TRANSFORMPRECODING_IDX 78
|
||||
#define GNB_CONFIG_PRACH_CONFIGURATIONINDEX_IDX 79
|
||||
#define GNB_CONFIG_PRACH_MSG1_FDM_IDX 80
|
||||
#define GNB_CONFIG_PRACH_MSG1_FREQUENCYSTART_IDX 81
|
||||
#define GNB_CONFIG_ZEROCORRELATIONZONECONFIG_IDX 82
|
||||
#define GNB_CONFIG_PREAMBLERECEIVEDTARGETPOWER_IDX 83
|
||||
#define GNB_CONFIG_PREAMBLETRANSMAX_IDX 84
|
||||
#define GNB_CONFIG_POWERRAMPINGSTEP_IDX 85
|
||||
#define GNB_CONFIG_RA_RESPONSEWINDOW_IDX 86
|
||||
#define GNB_CONFIG_GROUPHOPPINGENABLEDTRANSFORMPRECODING_IDX 87
|
||||
#define GNB_CONFIG_MSG3_DELTAPREAMBLE_IDX 88
|
||||
#define GNB_CONFIG_P0_NOMINALWITHGRANT_IDX 89
|
||||
#define GNB_CONFIG_PUSCH_TIMEDOMAINRESOURCEALLOCATION_K2_IDX 90
|
||||
#define GNB_CONFIG_PUSCH_TIMEDOMAINRESOURCEALLOCATION_MAPPINGTYPE_IDX 91
|
||||
#define GNB_CONFIG_PUSCH_TIMEDOMAINRESOURCEALLOCATION_STARTSYMBOLANDLENGTH_IDX 92
|
||||
#define GNB_CONFIG_PUCCH_RESOURCECOMMON_IDX 93
|
||||
#define GNB_CONFIG_PUCCH_GROUPHOPPING_IDX 94
|
||||
#define GNB_CONFIG_HOPPINGID_IDX 95
|
||||
#define GNB_CONFIG_P0_NOMINAL_IDX 96
|
||||
#define GNB_CONFIG_PDSCH_TIMEDOMAINRESOURCEALLOCATION_K0_IDX 97
|
||||
#define GNB_CONFIG_PDSCH_TIMEDOMAINRESOURCEALLOCATION_MAPPINGTYPE_IDX 98
|
||||
#define GNB_CONFIG_PDSCH_TIMEDOMAINRESOURCEALLOCATION_STARTSYMBOLANDLENGTH
|
||||
#define GNB_CONFIG_RATEMATCHPATTERNID_IDX 99
|
||||
#define GNB_CONFIG_RATEMATCHPATTERN_PATTERNTYPE_IDX 100
|
||||
#define GNB_CONFIG_SYMBOLSINRESOURCEBLOCK_IDX 101
|
||||
#define GNB_CONFIG_PERIODICITYANDPATTERN_IDX 102
|
||||
#define GNB_CONFIG_RATEMATCHPATTERN_CONTROLRESOURCESET_IDX 103
|
||||
#define GNB_CONFIG_RATEMATCHPATTERN_SUBCARRIERSPACING_IDX 104
|
||||
#define GNB_CONFIG_RATEMATCHPATTERN_MODE_IDX 105
|
||||
#define GNB_CONFIG_CONTROLRESOURCESETZERO_IDX 106
|
||||
#define GNB_CONFIG_SEARCHSPACEZERO_IDX 107
|
||||
#define GNB_CONFIG_SEARCHSPACESIB1_IDX 108
|
||||
#define GNB_CONFIG_SEARCHSPACEOTHERSYSTEMINFORMATION_IDX 109
|
||||
#define GNB_CONFIG_PAGINGSEARCHSPACE_IDX 110
|
||||
#define GNB_CONFIG_RA_SEARCHSPACE_IDX 111
|
||||
#define GNB_CONFIG_PDCCH_COMMON_CONTROLRESOURCESETID_IDX 112
|
||||
#define GNB_CONFIG_PDCCH_COMMON_CONTROLRESOURCESET_DURATION_IDX 113
|
||||
#define GNB_CONFIG_PDCCH_CCE_REG_MAPPINGTYPE_IDX 114
|
||||
#define GNB_CONFIG_PDCCH_REG_BUNDLESIZE_IDX 115
|
||||
#define GNB_CONFIG_PDCCH_INTERLEAVERSIZE_IDX 116
|
||||
#define GNB_CONFIG_PDCCH_SHIFTINDEX_IDX 117
|
||||
#define GNB_CONFIG_PDCCH_PRECODERGRANULARITY_IDX 118
|
||||
#define GNB_CONFIG_PDCCH_TCI_STATEID_IDX 119
|
||||
#define GNB_CONFIG_TCI_PRESENTINDCI_IDX 120
|
||||
#define GNB_CONFIG_PDCCH_DMRS_SCRAMBLINGID_IDX 121
|
||||
#define GNB_CONFIG_SEARCHSPACEID_IDX 122
|
||||
#define GNB_CONFIG_COMMONSEARCHSPACES_CONTROLRESOURCESETID_IDX 123
|
||||
#define GNB_CONFIG_SEARCHSPACE_MONITORINGSLOTPERIODICITYANDOFFSET_CHOICE_IDX 124
|
||||
#define GNB_CONFIG_SEARCHSPACE_MONITORINGSLOTPERIODICITYANDOFFSET_VALUE_IDX 125
|
||||
#define GNB_CONFIG_SEARCHSPACE_DURATION_IDX 126
|
||||
#define GNB_CONFIG_SEARCHSPACE_NROFCANDIDATES_AGGREGATIONLEVEL1_IDX 127
|
||||
#define GNB_CONFIG_SEARCHSPACE_NROFCANDIDATES_AGGREGATIONLEVEL2_IDX 128
|
||||
#define GNB_CONFIG_SEARCHSPACE_NROFCANDIDATES_AGGREGATIONLEVEL4_IDX 129
|
||||
@@ -848,14 +836,14 @@ typedef enum {
|
||||
#define GNB_CONFIG_COMMON_DCI_FORMAT2_0_NROFCANDIDATES_SFI_AGGREGATIONLEVEL16_IDX 137
|
||||
#define GNB_CONFIG_COMMON_DCI_FORMAT2_3_MONITORINGPERIODICITY_IDX 138
|
||||
#define GNB_CONFIG_COMMON_DCI_FORMAT2_3_NROFPDCCH_CANDIDATES_IDX 139
|
||||
#define GNB_CONFIG_UE_SPECIFIC__DCI_FORMATS_IDX 141
|
||||
#define GNB_CONFIG_RATEMATCHPATTERNLTE_CRS_CARRIERFREQDL_IDX 142
|
||||
#define GNB_CONFIG_RATEMATCHPATTERNLTE_CRS_CARRIERBANDWIDTHDL_IDX 143
|
||||
#define GNB_CONFIG_RATEMATCHPATTERNLTE_CRS_NROFCRS_PORTS_IDX 144
|
||||
#define GNB_CONFIG_RATEMATCHPATTERNLTE_CRS_V_SHIFT_IDX 145
|
||||
#define GNB_CONFIG_RATEMATCHPATTERNLTE_CRS_RADIOFRAMEALLOCATIONPERIOD_IDX 146
|
||||
#define GNB_CONFIG_RATEMATCHPATTERNLTE_CRS_RADIOFRAMEALLOCATIONOFFSET_IDX 147
|
||||
#define GNB_CONFIG_RATEMATCHPATTERNLTE_CRS_SUBFRAMEALLOCATION_CHOICE_IDX 148
|
||||
#define GNB_CONFIG_UE_SPECIFIC__DCI_FORMATS_IDX 140
|
||||
#define GNB_CONFIG_RATEMATCHPATTERNLTE_CRS_CARRIERFREQDL_IDX 141
|
||||
#define GNB_CONFIG_RATEMATCHPATTERNLTE_CRS_CARRIERBANDWIDTHDL_IDX 142
|
||||
#define GNB_CONFIG_RATEMATCHPATTERNLTE_CRS_NROFCRS_PORTS_IDX 143
|
||||
#define GNB_CONFIG_RATEMATCHPATTERNLTE_CRS_V_SHIFT_IDX 144
|
||||
#define GNB_CONFIG_RATEMATCHPATTERNLTE_CRS_RADIOFRAMEALLOCATIONPERIOD_IDX 145
|
||||
#define GNB_CONFIG_RATEMATCHPATTERNLTE_CRS_RADIOFRAMEALLOCATIONOFFSET_IDX 146
|
||||
#define GNB_CONFIG_RATEMATCHPATTERNLTE_CRS_SUBFRAMEALLOCATION_CHOICE_IDX 147
|
||||
|
||||
|
||||
/*------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/
|
||||
@@ -1057,4 +1045,5 @@ typedef enum {
|
||||
#define MACRLC_REMOTE_S_PORTC_IDX 14
|
||||
#define MACRLC_LOCAL_S_PORTD_IDX 15
|
||||
#define MACRLC_REMOTE_S_PORTD_IDX 16
|
||||
#define MACRLC_PHY_TEST_IDX 17
|
||||
#define MACRLC_SCHED_MODE_IDX 17
|
||||
#define MACRLC_PHY_TEST_IDX 18
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
#include "SystemInformationBlockType2.h"
|
||||
//#include "RadioResourceConfigCommonSIB.h"
|
||||
#include "RadioResourceConfigDedicated.h"
|
||||
#ifdef Rel14
|
||||
#if (RRC_VERSION >= MAKE_VERSION(13, 0, 0))
|
||||
#include "PRACH-ConfigSIB-v1310.h"
|
||||
#endif
|
||||
#include "MeasGapConfig.h"
|
||||
@@ -45,11 +45,11 @@
|
||||
#include "mac.h"
|
||||
#include "mac_proto.h"
|
||||
#include "mac_extern.h"
|
||||
#include "UTIL/LOG/log.h"
|
||||
#include "UTIL/LOG/vcd_signal_dumper.h"
|
||||
#include "common/utils/LOG/log.h"
|
||||
#include "common/utils/LOG/vcd_signal_dumper.h"
|
||||
|
||||
#include "common/ran_context.h"
|
||||
#if defined(Rel10) || defined(Rel14)
|
||||
#if (RRC_VERSION >= MAKE_VERSION(9, 0, 0))
|
||||
#include "MBSFN-AreaInfoList-r9.h"
|
||||
#include "MBSFN-AreaInfo-r9.h"
|
||||
#include "MBSFN-SubframeConfigList.h"
|
||||
@@ -193,7 +193,7 @@ void config_mib(int Mod_idP,
|
||||
int p_eNBP,
|
||||
uint32_t dl_CarrierFreqP,
|
||||
uint32_t ul_CarrierFreqP
|
||||
#ifdef Rel14
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
,
|
||||
uint32_t pbch_repetitionP
|
||||
#endif
|
||||
@@ -218,7 +218,7 @@ void config_mib(int Mod_idP,
|
||||
cfg->rf_config.dl_channel_bandwidth.value = to_prb(dl_BandwidthP);
|
||||
cfg->rf_config.dl_channel_bandwidth.tl.tag = NFAPI_RF_CONFIG_DL_CHANNEL_BANDWIDTH_TAG;
|
||||
cfg->num_tlv++;
|
||||
LOG_E(PHY,"%s() dl_BandwidthP:%d\n", __FUNCTION__, dl_BandwidthP);
|
||||
LOG_D(PHY,"%s() dl_BandwidthP:%d\n", __FUNCTION__, dl_BandwidthP);
|
||||
|
||||
cfg->rf_config.ul_channel_bandwidth.value = to_prb(dl_BandwidthP);
|
||||
cfg->rf_config.ul_channel_bandwidth.tl.tag = NFAPI_RF_CONFIG_UL_CHANNEL_BANDWIDTH_TAG;
|
||||
@@ -265,14 +265,14 @@ void config_mib(int Mod_idP,
|
||||
cfg->sch_config.physical_cell_id.tl.tag = NFAPI_SCH_CONFIG_PHYSICAL_CELL_ID_TAG;
|
||||
cfg->num_tlv++;
|
||||
|
||||
#ifdef Rel14
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
cfg->emtc_config.pbch_repetitions_enable_r13.value = pbch_repetitionP;
|
||||
cfg->emtc_config.pbch_repetitions_enable_r13.tl.tag = NFAPI_EMTC_CONFIG_PBCH_REPETITIONS_ENABLE_R13_TAG;
|
||||
cfg->num_tlv++;
|
||||
#endif
|
||||
LOG_I(MAC,
|
||||
"%s() NFAPI_CONFIG_REQUEST(num_tlv:%u) DL_BW:%u UL_BW:%u Ncp %d,p_eNB %d,earfcn %d,band %d,phich_resource %u phich_duration %u phich_power_offset %u PSS %d SSS %d PCI %d"
|
||||
#ifdef Rel14
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
|
||||
" PBCH repetition %d"
|
||||
#endif
|
||||
@@ -290,7 +290,7 @@ void config_mib(int Mod_idP,
|
||||
,cfg->sch_config.primary_synchronization_signal_epre_eprers.value
|
||||
,cfg->sch_config.secondary_synchronization_signal_epre_eprers.value
|
||||
,cfg->sch_config.physical_cell_id.value
|
||||
#ifdef Rel14
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
,cfg->emtc_config.pbch_repetitions_enable_r13.value
|
||||
#endif
|
||||
);
|
||||
@@ -329,7 +329,7 @@ void
|
||||
config_sib2(int Mod_idP,
|
||||
int CC_idP,
|
||||
RadioResourceConfigCommonSIB_t * radioResourceConfigCommonP,
|
||||
#ifdef Rel14
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
RadioResourceConfigCommonSIB_t * radioResourceConfigCommon_BRP,
|
||||
#endif
|
||||
ARFCN_ValueEUTRA_t *ul_CArrierFreqP,
|
||||
@@ -445,7 +445,7 @@ config_sib2(int Mod_idP,
|
||||
cfg->num_tlv++;
|
||||
}
|
||||
|
||||
#ifdef Rel14
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
if (RC.mac[Mod_idP]->common_channels[CC_idP].mib->message.schedulingInfoSIB1_BR_r13 > 0) {
|
||||
AssertFatal(radioResourceConfigCommon_BRP != NULL, "radioResource rou is missing\n");
|
||||
AssertFatal(radioResourceConfigCommon_BRP->ext4 != NULL, "ext4 is missing\n");
|
||||
@@ -676,20 +676,20 @@ rrc_mac_config_req_eNB(module_id_t Mod_idP,
|
||||
int physCellId,
|
||||
int p_eNB,
|
||||
int Ncp, int eutra_band, uint32_t dl_CarrierFreq,
|
||||
#ifdef Rel14
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
int pbch_repetition,
|
||||
#endif
|
||||
rnti_t rntiP,
|
||||
BCCH_BCH_Message_t * mib,
|
||||
RadioResourceConfigCommonSIB_t *
|
||||
radioResourceConfigCommon,
|
||||
#ifdef Rel14
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
RadioResourceConfigCommonSIB_t *
|
||||
radioResourceConfigCommon_BR,
|
||||
#endif
|
||||
struct PhysicalConfigDedicated
|
||||
*physicalConfigDedicated,
|
||||
#if defined(Rel10) || defined(Rel14)
|
||||
#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
SCellToAddMod_r10_t * sCellToAddMod_r10,
|
||||
//struct PhysicalConfigDedicatedSCell_r10 *physicalConfigDedicatedSCell_r10,
|
||||
#endif
|
||||
@@ -707,12 +707,12 @@ rrc_mac_config_req_eNB(module_id_t Mod_idP,
|
||||
additionalSpectrumEmission,
|
||||
struct MBSFN_SubframeConfigList
|
||||
*mbsfn_SubframeConfigList
|
||||
#if defined(Rel10) || defined(Rel14)
|
||||
#if (RRC_VERSION >= MAKE_VERSION(9, 0, 0))
|
||||
, uint8_t MBMS_Flag,
|
||||
MBSFN_AreaInfoList_r9_t * mbsfn_AreaInfoList,
|
||||
PMCH_InfoList_r9_t * pmch_InfoList
|
||||
#endif
|
||||
#ifdef Rel14
|
||||
#if (RRC_VERSION >= MAKE_VERSION(13, 0, 0))
|
||||
,
|
||||
SystemInformationBlockType1_v1310_IEs_t *
|
||||
sib1_v13ext
|
||||
@@ -727,7 +727,7 @@ rrc_mac_config_req_eNB(module_id_t Mod_idP,
|
||||
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_RRC_MAC_CONFIG, VCD_FUNCTION_IN);
|
||||
|
||||
LOG_E(MAC, "RC.mac:%p mib:%p\n", RC.mac, mib);
|
||||
LOG_D(MAC, "RC.mac:%p mib:%p\n", RC.mac, mib);
|
||||
|
||||
if (mib != NULL) {
|
||||
if (RC.mac == NULL)
|
||||
@@ -763,7 +763,7 @@ rrc_mac_config_req_eNB(module_id_t Mod_idP,
|
||||
p_eNB,
|
||||
dl_CarrierFreq,
|
||||
ul_CarrierFreq
|
||||
#ifdef Rel14
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
, pbch_repetition
|
||||
#endif
|
||||
);
|
||||
@@ -775,7 +775,7 @@ rrc_mac_config_req_eNB(module_id_t Mod_idP,
|
||||
RC.mac[Mod_idP]->common_channels[CC_idP].schedulingInfoList = schedulingInfoList;
|
||||
config_sib1(Mod_idP,CC_idP,tdd_Config);
|
||||
}
|
||||
#ifdef Rel14
|
||||
#if (RRC_VERSION >= MAKE_VERSION(13, 0, 0))
|
||||
if (sib1_v13ext != NULL) {
|
||||
RC.mac[Mod_idP]->common_channels[CC_idP].sib1_v13ext = sib1_v13ext;
|
||||
}
|
||||
@@ -834,7 +834,7 @@ rrc_mac_config_req_eNB(module_id_t Mod_idP,
|
||||
dl_Bandwidth;
|
||||
|
||||
config_sib2(Mod_idP, CC_idP, radioResourceConfigCommon,
|
||||
#ifdef Rel14
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
radioResourceConfigCommon_BR,
|
||||
#endif
|
||||
NULL, ul_Bandwidth, additionalSpectrumEmission,
|
||||
@@ -876,7 +876,7 @@ rrc_mac_config_req_eNB(module_id_t Mod_idP,
|
||||
}
|
||||
|
||||
|
||||
#if defined(Rel10) || defined(Rel14)
|
||||
#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
|
||||
if (sCellToAddMod_r10 != NULL) {
|
||||
UE_id = find_UE_id(Mod_idP, rntiP);
|
||||
@@ -909,11 +909,11 @@ rrc_mac_config_req_eNB(module_id_t Mod_idP,
|
||||
subframeAllocation.choice.oneFrame.buf[0]);
|
||||
}
|
||||
|
||||
#ifdef Rel10
|
||||
#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
RC.mac[Mod_idP]->common_channels[0].MBMS_flag = MBMS_Flag;
|
||||
#endif
|
||||
}
|
||||
#if defined(Rel10) || defined(Rel14)
|
||||
#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
|
||||
if (mbsfn_AreaInfoList != NULL) {
|
||||
// One eNB could be part of multiple mbsfn syc area, this could change over time so reset each time
|
||||
@@ -962,8 +962,8 @@ rrc_mac_config_req_eNB(module_id_t Mod_idP,
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
LOG_E(MAC, "%s() %s:%d RC.mac[Mod_idP]->if_inst->PHY_config_req:%p\n", __FUNCTION__, __FILE__, __LINE__, RC.mac[Mod_idP]->if_inst->PHY_config_req);
|
||||
|
||||
LOG_D(MAC, "%s() %s:%d RC.mac[Mod_idP]->if_inst->PHY_config_req:%p\n", __FUNCTION__, __FILE__, __LINE__, RC.mac[Mod_idP]->if_inst->PHY_config_req);
|
||||
|
||||
// if in nFAPI mode
|
||||
if (
|
||||
@@ -987,6 +987,7 @@ rrc_mac_config_req_eNB(module_id_t Mod_idP,
|
||||
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_RRC_MAC_CONFIG, VCD_FUNCTION_OUT);
|
||||
}
|
||||
|
||||
RC.mac[Mod_idP]->scheduler_mode = global_scheduler_mode;
|
||||
|
||||
return(0);
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@ typedef enum operationModeInf{
|
||||
iNB_IoTand_DifferentPCI_r13 = 2,
|
||||
guardband_r13 = 3,
|
||||
standalone_r13 = 4
|
||||
}operationModeInf_t;
|
||||
} operationModeInf_t;
|
||||
|
||||
///SIB1_SchedulingInfo_NB_IoT_r13
|
||||
typedef enum si_Periodicity{
|
||||
@@ -32,14 +32,14 @@ typedef enum si_Periodicity{
|
||||
si_Periodicity_rf1024=10240,
|
||||
si_Periodicity_rf2048=20480,
|
||||
si_Periodicity_rf4096=40960
|
||||
}si_Periodicity_NB_IoT;
|
||||
} si_Periodicity_NB_IoT;
|
||||
|
||||
typedef enum si_RepetitionPattern{
|
||||
si_RepetitionPattern_every2ndRF=0,
|
||||
si_RepetitionPattern_every4thRF,
|
||||
si_RepetitionPattern_every8thRF,
|
||||
si_RepetitionPattern_every16thRF
|
||||
}si_RepetitionPattern_NB_IoT;
|
||||
} si_RepetitionPattern_NB_IoT;
|
||||
|
||||
typedef enum sib_MappingInfo{
|
||||
sib2_v=0x1,
|
||||
@@ -48,7 +48,7 @@ typedef enum sib_MappingInfo{
|
||||
sib5_v=0x8,
|
||||
sib14_v=0x10,
|
||||
sib16_v=0x20
|
||||
}sib_MappingInfo_NB_IoT;
|
||||
} sib_MappingInfo_NB_IoT;
|
||||
|
||||
typedef enum si_TB{
|
||||
si_TB_56=2,
|
||||
@@ -59,7 +59,7 @@ typedef enum si_TB{
|
||||
si_TB_440=8,
|
||||
si_TB_552=8,
|
||||
si_TB_680=8
|
||||
}si_TB_NB_IoT;
|
||||
} si_TB_NB_IoT;
|
||||
|
||||
///RACH_ConfigCommon configuration
|
||||
|
||||
@@ -72,7 +72,7 @@ typedef enum ra_ResponseWindowSize{
|
||||
ra_ResponseWindowSize_pp7=7,
|
||||
ra_ResponseWindowSize_pp8=8,
|
||||
ra_ResponseWindowSize_pp10=10
|
||||
}ra_ResponseWindowSize_NB_IoT;
|
||||
} ra_ResponseWindowSize_NB_IoT;
|
||||
|
||||
typedef enum mac_ContentionResolutionTimer{
|
||||
mac_ContentionResolutionTimer_pp1=1,
|
||||
@@ -83,7 +83,7 @@ typedef enum mac_ContentionResolutionTimer{
|
||||
mac_ContentionResolutionTimer_pp16=16,
|
||||
mac_ContentionResolutionTimer_pp32=32,
|
||||
mac_ContentionResolutionTimer_pp64=64
|
||||
}mac_ContentionResolutionTimer_NB_IoT;
|
||||
} mac_ContentionResolutionTimer_NB_IoT;
|
||||
|
||||
///NPRACH_ConfigSIB configuration
|
||||
|
||||
@@ -96,7 +96,7 @@ typedef enum nprach_Periodicity{
|
||||
nprach_Periodicity_ms640=640,
|
||||
nprach_Periodicity_ms1280=1280,
|
||||
nprach_Periodicity_ms2560=2560
|
||||
}nprach_Periodicity_NB_IoT;
|
||||
} nprach_Periodicity_NB_IoT;
|
||||
|
||||
typedef enum nprach_StartTime{
|
||||
nprach_StartTime_ms8=8,
|
||||
@@ -107,7 +107,7 @@ typedef enum nprach_StartTime{
|
||||
nprach_StartTime_ms256=256,
|
||||
nprach_StartTime_ms512=512,
|
||||
nprach_StartTime_ms1024=1024
|
||||
}nprach_StartTime_NB_IoT;
|
||||
} nprach_StartTime_NB_IoT;
|
||||
|
||||
typedef enum nprach_SubcarrierOffset{
|
||||
nprach_SubcarrierOffset_n0=0,
|
||||
@@ -117,21 +117,21 @@ typedef enum nprach_SubcarrierOffset{
|
||||
nprach_SubcarrierOffset_n2=2,
|
||||
nprach_SubcarrierOffset_n18=18,
|
||||
nprach_SubcarrierOffset_n34=34
|
||||
}nprach_SubcarrierOffset_NB_IoT;
|
||||
} nprach_SubcarrierOffset_NB_IoT;
|
||||
|
||||
typedef enum nprach_NumSubcarriers{
|
||||
nprach_NumSubcarriers_n12=12,
|
||||
nprach_NumSubcarriers_n24=24,
|
||||
nprach_NumSubcarriers_n36=36,
|
||||
nprach_NumSubcarriers_n48=48
|
||||
}nprach_NumSubcarriers_NB_IoT;
|
||||
} nprach_NumSubcarriers_NB_IoT;
|
||||
|
||||
typedef enum nprach_SubcarrierMSG3_RangeStart{
|
||||
nprach_SubcarrierMSG3_RangeStart_zero=0,
|
||||
nprach_SubcarrierMSG3_RangeStart_oneThird=1/3,
|
||||
nprach_SubcarrierMSG3_RangeStart_twoThird=2/3,
|
||||
nprach_SubcarrierMSG3_RangeStart_one=1
|
||||
}nprach_SubcarrierMSG3_RangeStart_NB_IoT;
|
||||
} nprach_SubcarrierMSG3_RangeStart_NB_IoT;
|
||||
|
||||
typedef enum maxNumPreambleAttemptCE{
|
||||
maxNumPreambleAttemptCE_n3=3,
|
||||
@@ -141,7 +141,7 @@ typedef enum maxNumPreambleAttemptCE{
|
||||
maxNumPreambleAttemptCE_n7=7,
|
||||
maxNumPreambleAttemptCE_n8=8,
|
||||
maxNumPreambleAttemptCE_n10=10
|
||||
}maxNumPreambleAttemptCE_NB_IoT;
|
||||
} maxNumPreambleAttemptCE_NB_IoT;
|
||||
|
||||
typedef enum numRepetitionsPerPreambleAttempt{
|
||||
numRepetitionsPerPreambleAttempt_n1=1,
|
||||
@@ -152,7 +152,7 @@ typedef enum numRepetitionsPerPreambleAttempt{
|
||||
numRepetitionsPerPreambleAttempt_n32=32,
|
||||
numRepetitionsPerPreambleAttempt_n64=64,
|
||||
numRepetitionsPerPreambleAttempt_n128=128
|
||||
}numRepetitionsPerPreambleAttempt_NB_IoT;
|
||||
} numRepetitionsPerPreambleAttempt_NB_IoT;
|
||||
|
||||
typedef enum npdcch_NumRepetitions_RA{
|
||||
npdcch_NumRepetitions_RA_r1=1,
|
||||
@@ -167,7 +167,7 @@ typedef enum npdcch_NumRepetitions_RA{
|
||||
npdcch_NumRepetitions_RA_r512=512,
|
||||
npdcch_NumRepetitions_RA_r1024=1024,
|
||||
npdcch_NumRepetitions_RA_r2048=2048
|
||||
}npdcch_NumRepetitions_RA_NB_IoT;
|
||||
} npdcch_NumRepetitions_RA_NB_IoT;
|
||||
|
||||
typedef enum npdcch_StartSF_CSS_RA{
|
||||
npdcch_StartSF_CSS_RA_v1dot5=3/2,
|
||||
@@ -178,14 +178,14 @@ typedef enum npdcch_StartSF_CSS_RA{
|
||||
npdcch_StartSF_CSS_RA_v32=32,
|
||||
npdcch_StartSF_CSS_RA_v48=48,
|
||||
npdcch_StartSF_CSS_RA_v64=64
|
||||
}npdcch_StartSF_CSS_RA_NB_IoT;
|
||||
} npdcch_StartSF_CSS_RA_NB_IoT;
|
||||
|
||||
typedef enum npdcch_Offset_RA{
|
||||
zero=0,
|
||||
oneEighth=1/8,
|
||||
oneFourth=1/4,
|
||||
threeEighth=3/8
|
||||
}npdcch_Offset_RA_NB_IoT;
|
||||
} npdcch_Offset_RA_NB_IoT;
|
||||
|
||||
typedef enum si_window_length_e{
|
||||
ms160=160,
|
||||
@@ -195,7 +195,7 @@ typedef enum si_window_length_e{
|
||||
ms960=960,
|
||||
ms1280=1280,
|
||||
ms1600=1600
|
||||
}si_window_length_t;
|
||||
} si_window_length_t;
|
||||
|
||||
typedef enum si_periodicity_e{
|
||||
rf64=640,
|
||||
@@ -205,14 +205,14 @@ typedef enum si_periodicity_e{
|
||||
rf1024=10240,
|
||||
rf2048=20480,
|
||||
rf4096=40960
|
||||
}si_periodicity_t;
|
||||
} si_periodicity_t;
|
||||
|
||||
typedef enum si_repetition_pattern_e{
|
||||
every2ndRF=20,
|
||||
every4thRF=40,
|
||||
every8thRF=80,
|
||||
every16thRF=160
|
||||
}si_repetition_pattern_t;
|
||||
} si_repetition_pattern_t;
|
||||
|
||||
typedef enum si_tb_e{
|
||||
b56=2,
|
||||
@@ -223,7 +223,7 @@ typedef enum si_tb_e{
|
||||
b440=8,
|
||||
b552=8,
|
||||
b680=8
|
||||
}si_tb_t;
|
||||
} si_tb_t;
|
||||
|
||||
|
||||
typedef struct sibs_NB_IoT_sched_s{
|
||||
@@ -232,21 +232,21 @@ typedef struct sibs_NB_IoT_sched_s{
|
||||
sib_MappingInfo_NB_IoT sib_mapping_info; //bit vector
|
||||
si_tb_t si_tb;
|
||||
|
||||
}sibs_NB_IoT_sched_t;
|
||||
} sibs_NB_IoT_sched_t;
|
||||
|
||||
|
||||
///-------------------------------------------------------MAC--------------------------------------------------------------------///
|
||||
typedef struct sib1_NB_IoT_sched_s{
|
||||
int repetitions; // 4, 8, 16
|
||||
int starting_rf;
|
||||
}sib1_NB_IoT_sched_t;
|
||||
} sib1_NB_IoT_sched_t;
|
||||
|
||||
typedef struct {
|
||||
|
||||
uint32_t mac_ra_ResponseWindowSize_NB_IoT;
|
||||
uint32_t mac_ContentionResolutionTimer_NB_IoT;
|
||||
|
||||
}mac_RACH_ConfigCommon_NB_IoT;
|
||||
} mac_RACH_ConfigCommon_NB_IoT;
|
||||
|
||||
typedef struct {
|
||||
|
||||
@@ -262,7 +262,7 @@ typedef struct {
|
||||
uint32_t mac_npdcch_StartSF_CSS_RA_NB_IoT; // G
|
||||
uint32_t mac_npdcch_Offset_RA_NB_IoT; // alpha offset
|
||||
|
||||
}mac_NPRACH_ConfigSIB_NB_IoT;
|
||||
} mac_NPRACH_ConfigSIB_NB_IoT;
|
||||
|
||||
typedef struct{
|
||||
//npdcch-NumRepetitions-r13
|
||||
@@ -271,7 +271,7 @@ typedef struct{
|
||||
double G;
|
||||
//npdcch-Offset-USS-r13
|
||||
double a_offset;
|
||||
}npdcch_ConfigDedicated_NB_IoT;
|
||||
} npdcch_ConfigDedicated_NB_IoT;
|
||||
|
||||
typedef struct rrc_config_NB_IoT_s{
|
||||
|
||||
@@ -296,6 +296,6 @@ typedef struct rrc_config_NB_IoT_s{
|
||||
///NPDCCH Dedicated config
|
||||
npdcch_ConfigDedicated_NB_IoT npdcch_ConfigDedicated[3];
|
||||
|
||||
}rrc_config_NB_IoT_t;
|
||||
} rrc_config_NB_IoT_t;
|
||||
|
||||
#endif
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
#include "SystemInformationBlockType2.h"
|
||||
//#include "RadioResourceConfigCommonSIB.h"
|
||||
#include "RadioResourceConfigDedicated.h"
|
||||
#ifdef Rel14
|
||||
#if (RRC_VERSION >= MAKE_VERSION(13, 0, 0))
|
||||
#include "PRACH-ConfigSIB-v1310.h"
|
||||
#endif
|
||||
#include "MeasGapConfig.h"
|
||||
@@ -46,11 +46,12 @@
|
||||
#include "mac.h"
|
||||
#include "mac_proto.h"
|
||||
#include "mac_extern.h"
|
||||
#include "UTIL/LOG/log.h"
|
||||
#include "UTIL/LOG/vcd_signal_dumper.h"
|
||||
#include "common/utils/LOG/log.h"
|
||||
#include "common/utils/LOG/vcd_signal_dumper.h"
|
||||
#include "PHY/INIT/phy_init.h"
|
||||
|
||||
#include "common/ran_context.h"
|
||||
#if defined(Rel10) || defined(Rel14)
|
||||
#if (RRC_VERSION >= MAKE_VERSION(9, 0, 0))
|
||||
#include "MBSFN-AreaInfoList-r9.h"
|
||||
#include "MBSFN-AreaInfo-r9.h"
|
||||
#include "MBSFN-SubframeConfigList.h"
|
||||
@@ -60,6 +61,8 @@
|
||||
extern void mac_init_cell_params(int Mod_idP,int CC_idP);
|
||||
extern void phy_reset_ue(module_id_t Mod_id,uint8_t CC_id,uint8_t eNB_index);
|
||||
|
||||
extern uint8_t nfapi_mode;
|
||||
|
||||
|
||||
/* sec 5.9, 36.321: MAC Reset Procedure */
|
||||
void ue_mac_reset(module_id_t module_idP, uint8_t eNB_index)
|
||||
@@ -108,7 +111,7 @@ rrc_mac_config_req_ue(module_id_t Mod_idP,
|
||||
radioResourceConfigCommon,
|
||||
struct PhysicalConfigDedicated
|
||||
*physicalConfigDedicated,
|
||||
#if defined(Rel10) || defined(Rel14)
|
||||
#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
SCellToAddMod_r10_t * sCellToAddMod_r10,
|
||||
//struct PhysicalConfigDedicatedSCell_r10 *physicalConfigDedicatedSCell_r10,
|
||||
#endif
|
||||
@@ -127,13 +130,18 @@ rrc_mac_config_req_ue(module_id_t Mod_idP,
|
||||
additionalSpectrumEmission,
|
||||
struct MBSFN_SubframeConfigList
|
||||
*mbsfn_SubframeConfigList
|
||||
#if defined(Rel10) || defined(Rel14)
|
||||
#if (RRC_VERSION >= MAKE_VERSION(9, 0, 0))
|
||||
, uint8_t MBMS_Flag,
|
||||
MBSFN_AreaInfoList_r9_t * mbsfn_AreaInfoList,
|
||||
PMCH_InfoList_r9_t * pmch_InfoList
|
||||
#endif
|
||||
#ifdef CBA
|
||||
, uint8_t num_active_cba_groups, uint16_t cba_rnti
|
||||
#endif
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
,config_action_t config_action
|
||||
,const uint32_t * const sourceL2Id
|
||||
,const uint32_t * const destinationL2Id
|
||||
#endif
|
||||
)
|
||||
{
|
||||
@@ -211,7 +219,7 @@ rrc_mac_config_req_ue(module_id_t Mod_idP,
|
||||
mac_MainConfig->ul_SCH_Config->periodicBSR_Timer;
|
||||
} else {
|
||||
UE_mac_inst[Mod_idP].scheduling_info.periodicBSR_Timer =
|
||||
#ifndef Rel14
|
||||
#if (RRC_VERSION < MAKE_VERSION(12, 0, 0))
|
||||
(uint16_t)
|
||||
MAC_MainConfig__ul_SCH_Config__periodicBSR_Timer_infinity
|
||||
#else
|
||||
@@ -228,16 +236,17 @@ rrc_mac_config_req_ue(module_id_t Mod_idP,
|
||||
(uint16_t)
|
||||
MAC_MainConfig__ul_SCH_Config__maxHARQ_Tx_n5;
|
||||
}
|
||||
phy_config_harq_ue(Mod_idP, 0, eNB_index,
|
||||
UE_mac_inst[Mod_idP].
|
||||
scheduling_info.maxHARQ_Tx);
|
||||
if(nfapi_mode!=3)
|
||||
phy_config_harq_ue(Mod_idP, 0, eNB_index,
|
||||
UE_mac_inst[Mod_idP].
|
||||
scheduling_info.maxHARQ_Tx);
|
||||
|
||||
if (mac_MainConfig->ul_SCH_Config->retxBSR_Timer) {
|
||||
UE_mac_inst[Mod_idP].scheduling_info.retxBSR_Timer =
|
||||
(uint16_t) mac_MainConfig->ul_SCH_Config->
|
||||
retxBSR_Timer;
|
||||
} else {
|
||||
#ifndef Rel14
|
||||
#if (RRC_VERSION < MAKE_VERSION(12, 0, 0))
|
||||
UE_mac_inst[Mod_idP].scheduling_info.retxBSR_Timer =
|
||||
(uint16_t)
|
||||
MAC_MainConfig__ul_SCH_Config__retxBSR_Timer_sf2560;
|
||||
@@ -247,7 +256,7 @@ rrc_mac_config_req_ue(module_id_t Mod_idP,
|
||||
#endif
|
||||
}
|
||||
}
|
||||
#if defined(Rel10) || defined(Rel14)
|
||||
#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
|
||||
if (mac_MainConfig->ext1
|
||||
&& mac_MainConfig->ext1->sr_ProhibitTimer_r9) {
|
||||
@@ -348,11 +357,12 @@ rrc_mac_config_req_ue(module_id_t Mod_idP,
|
||||
|
||||
|
||||
if (physicalConfigDedicated != NULL) {
|
||||
phy_config_dedicated_ue(Mod_idP, 0, eNB_index,
|
||||
physicalConfigDedicated);
|
||||
if(nfapi_mode!=3)
|
||||
phy_config_dedicated_ue(Mod_idP, 0, eNB_index,
|
||||
physicalConfigDedicated);
|
||||
UE_mac_inst[Mod_idP].physicalConfigDedicated = physicalConfigDedicated; // for SR proc
|
||||
}
|
||||
#if defined(Rel10) || defined(Rel14)
|
||||
#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
|
||||
if (sCellToAddMod_r10 != NULL) {
|
||||
|
||||
@@ -522,7 +532,7 @@ rrc_mac_config_req_ue(module_id_t Mod_idP,
|
||||
// UE_mac_inst[Mod_idP].mbsfn_SubframeConfig[i]->subframeAllocation.choice.oneFrame.buf[0]);
|
||||
}
|
||||
}
|
||||
#if defined(Rel10) || defined(Rel14)
|
||||
#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
|
||||
if (mbsfn_AreaInfoList != NULL) {
|
||||
LOG_I(MAC, "[UE %d][CONFIG] Received %d MBSFN Area Info\n",
|
||||
@@ -579,6 +589,34 @@ rrc_mac_config_req_ue(module_id_t Mod_idP,
|
||||
#endif
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
|
||||
(VCD_SIGNAL_DUMPER_FUNCTIONS_RRC_MAC_CONFIG, VCD_FUNCTION_OUT);
|
||||
//for D2D
|
||||
#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
switch (config_action) {
|
||||
case CONFIG_ACTION_ADD:
|
||||
if (sourceL2Id){
|
||||
UE_mac_inst[Mod_idP].sourceL2Id = *sourceL2Id;
|
||||
LOG_I(MAC,"[UE %d] Configure source L2Id 0x%08x \n", Mod_idP, *sourceL2Id );
|
||||
}
|
||||
if (destinationL2Id) {
|
||||
LOG_I(MAC,"[UE %d] Configure destination L2Id 0x%08x\n", Mod_idP, *destinationL2Id );
|
||||
int j = 0;
|
||||
int i = 0;
|
||||
for (i=0; i< MAX_NUM_DEST; i++) {
|
||||
if ((UE_mac_inst[Mod_idP].destinationList[i] == 0) && (j == 0)) j = i+1;
|
||||
if (UE_mac_inst[Mod_idP].destinationList[i] == *destinationL2Id) break; //destination already exists!
|
||||
}
|
||||
if ((i == MAX_NUM_DEST) && (j > 0)) UE_mac_inst[Mod_idP].destinationList[j-1] = *destinationL2Id;
|
||||
UE_mac_inst[Mod_idP].numCommFlows++;
|
||||
}
|
||||
break;
|
||||
case CONFIG_ACTION_REMOVE:
|
||||
//TODO
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
return (0);
|
||||
}
|
||||
|
||||
@@ -36,8 +36,8 @@
|
||||
|
||||
#include "LAYER2/MAC/mac_proto.h"
|
||||
#include "LAYER2/NR_MAC_gNB/mac_proto.h"
|
||||
#include "UTIL/LOG/log.h"
|
||||
#include "UTIL/LOG/vcd_signal_dumper.h"
|
||||
#include "common/utils/LOG/log.h"
|
||||
#include "common/utils/LOG/vcd_signal_dumper.h"
|
||||
#include "UTIL/OPT/opt.h"
|
||||
#include "OCG.h"
|
||||
#include "OCG_extern.h"
|
||||
@@ -53,6 +53,9 @@
|
||||
#include "flexran_agent_extern.h"
|
||||
#include "flexran_agent_mac.h"
|
||||
|
||||
/* for fair round robin SCHED */
|
||||
#include "eNB_scheduler_fairRR.h"
|
||||
|
||||
#if defined(ENABLE_ITTI)
|
||||
#include "intertask_interface.h"
|
||||
#endif
|
||||
@@ -208,7 +211,7 @@ schedule_CSI(module_id_t module_idP, frame_t frameP, sub_frame_t subframeP)
|
||||
ul_req->number_of_pdus++;
|
||||
ul_req->tl.tag = NFAPI_UL_CONFIG_REQUEST_BODY_TAG;
|
||||
|
||||
#if defined(Rel10) || defined(Rel14)
|
||||
#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
// PUT rel10-13 UCI options here
|
||||
#endif
|
||||
} else
|
||||
@@ -311,7 +314,7 @@ schedule_SR(module_id_t module_idP, frame_t frameP, sub_frame_t subframeP)
|
||||
LOG_D(MAC,"Frame %d, Subframe %d : Scheduling SR for UE %d/%x is_harq:%d\n",frameP,subframeP,UE_id,UE_list->UE_template[CC_id][UE_id].rnti, is_harq);
|
||||
|
||||
// check Rel10 or Rel8 SR
|
||||
#if defined(Rel10) || defined(Rel14)
|
||||
#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
if ((UE_list-> UE_template[CC_id][UE_id].physicalConfigDedicated->ext2)
|
||||
&& (UE_list->UE_template[CC_id][UE_id].physicalConfigDedicated->ext2->schedulingRequestConfig_v1020)
|
||||
&& (UE_list->UE_template[CC_id][UE_id].physicalConfigDedicated->ext2->schedulingRequestConfig_v1020)) {
|
||||
@@ -361,8 +364,9 @@ check_ul_failure(module_id_t module_idP, int CC_id, int UE_id,
|
||||
// check uplink failure
|
||||
if ((UE_list->UE_sched_ctrl[UE_id].ul_failure_timer > 0) &&
|
||||
(UE_list->UE_sched_ctrl[UE_id].ul_out_of_sync == 0)) {
|
||||
LOG_I(MAC, "UE %d rnti %x: UL Failure timer %d \n", UE_id, rnti,
|
||||
UE_list->UE_sched_ctrl[UE_id].ul_failure_timer);
|
||||
if (UE_list->UE_sched_ctrl[UE_id].ul_failure_timer == 1)
|
||||
LOG_I(MAC, "UE %d rnti %x: UL Failure timer %d \n", UE_id, rnti,
|
||||
UE_list->UE_sched_ctrl[UE_id].ul_failure_timer);
|
||||
if (UE_list->UE_sched_ctrl[UE_id].ra_pdcch_order_sent == 0) {
|
||||
UE_list->UE_sched_ctrl[UE_id].ra_pdcch_order_sent = 1;
|
||||
|
||||
@@ -387,23 +391,24 @@ check_ul_failure(module_id_t module_idP, int CC_id, int UE_id,
|
||||
DL_req[CC_id].dl_config_request_body.number_dci++;
|
||||
DL_req[CC_id].dl_config_request_body.number_pdu++;
|
||||
DL_req[CC_id].dl_config_request_body.tl.tag = NFAPI_DL_CONFIG_REQUEST_BODY_TAG;
|
||||
LOG_I(MAC,
|
||||
LOG_D(MAC,
|
||||
"UE %d rnti %x: sending PDCCH order for RAPROC (failure timer %d), resource_block_coding %d \n",
|
||||
UE_id, rnti,
|
||||
UE_list->UE_sched_ctrl[UE_id].ul_failure_timer,
|
||||
dl_config_pdu->dci_dl_pdu.
|
||||
dci_dl_pdu_rel8.resource_block_coding);
|
||||
} else { // ra_pdcch_sent==1
|
||||
LOG_I(MAC,
|
||||
LOG_D(MAC,
|
||||
"UE %d rnti %x: sent PDCCH order for RAPROC waiting (failure timer %d) \n",
|
||||
UE_id, rnti,
|
||||
UE_list->UE_sched_ctrl[UE_id].ul_failure_timer);
|
||||
if ((UE_list->UE_sched_ctrl[UE_id].ul_failure_timer % 40) == 0) UE_list->UE_sched_ctrl[UE_id].ra_pdcch_order_sent = 0; // resend every 4 frames
|
||||
if ((UE_list->UE_sched_ctrl[UE_id].ul_failure_timer % 80) == 0) UE_list->UE_sched_ctrl[UE_id].ra_pdcch_order_sent = 0; // resend every 8 frames
|
||||
}
|
||||
|
||||
UE_list->UE_sched_ctrl[UE_id].ul_failure_timer++;
|
||||
// check threshold
|
||||
if (UE_list->UE_sched_ctrl[UE_id].ul_failure_timer > 20000) {
|
||||
if (UE_list->UE_sched_ctrl[UE_id].ul_failure_timer > 4000) {
|
||||
// note: probably ul_failure_timer should be less than UE radio link failure time(see T310/N310/N311)
|
||||
// inform RRC of failure and clear timer
|
||||
LOG_I(MAC,
|
||||
"UE %d rnti %x: UL Failure after repeated PDCCH orders: Triggering RRC \n",
|
||||
@@ -420,16 +425,6 @@ check_ul_failure(module_id_t module_idP, int CC_id, int UE_id,
|
||||
}
|
||||
}
|
||||
} // ul_failure_timer>0
|
||||
|
||||
#if 0
|
||||
/* U-plane inactivity timer is disabled. Uncomment to re-enable. */
|
||||
UE_list->UE_sched_ctrl[UE_id].uplane_inactivity_timer++;
|
||||
if(UE_list->UE_sched_ctrl[UE_id].uplane_inactivity_timer > (U_PLANE_INACTIVITY_VALUE*subframe_num(&RC.eNB[module_idP][CC_id]->frame_parms))){
|
||||
LOG_D(MAC,"UE %d rnti %x: U-Plane Failure after repeated PDCCH orders: Triggering RRC \n",UE_id,rnti);
|
||||
mac_eNB_rrc_uplane_failure(module_idP,CC_id,frameP,subframeP,rnti);
|
||||
UE_list->UE_sched_ctrl[UE_id].uplane_inactivity_timer = 0;
|
||||
}// time > 60s
|
||||
#endif
|
||||
}
|
||||
|
||||
void
|
||||
@@ -438,7 +433,7 @@ clear_nfapi_information(eNB_MAC_INST * eNB, int CC_idP,
|
||||
{
|
||||
nfapi_dl_config_request_t *DL_req = &eNB->DL_req[0];
|
||||
nfapi_ul_config_request_t *UL_req = &eNB->UL_req[0];
|
||||
nfapi_hi_dci0_request_t *HI_DCI0_req = &eNB->HI_DCI0_req[0];
|
||||
nfapi_hi_dci0_request_t *HI_DCI0_req = &eNB->HI_DCI0_req[CC_idP][subframeP];
|
||||
nfapi_tx_request_t *TX_req = &eNB->TX_req[0];
|
||||
|
||||
eNB->pdu_index[CC_idP] = 0;
|
||||
@@ -451,8 +446,8 @@ clear_nfapi_information(eNB_MAC_INST * eNB, int CC_idP,
|
||||
DL_req[CC_idP].dl_config_request_body.number_pdsch_rnti = 0;
|
||||
DL_req[CC_idP].dl_config_request_body.transmission_power_pcfich = 6000;
|
||||
|
||||
HI_DCI0_req[CC_idP].hi_dci0_request_body.sfnsf = subframeP + (frameP<<4);
|
||||
HI_DCI0_req[CC_idP].hi_dci0_request_body.number_of_dci = 0;
|
||||
HI_DCI0_req->hi_dci0_request_body.sfnsf = subframeP + (frameP<<4);
|
||||
HI_DCI0_req->hi_dci0_request_body.number_of_dci = 0;
|
||||
|
||||
|
||||
UL_req[CC_idP].ul_config_request_body.number_of_pdus = 0;
|
||||
@@ -524,7 +519,7 @@ eNB_dlsch_ulsch_scheduler(module_id_t module_idP, frame_t frameP,
|
||||
memset(cc[CC_id].vrb_map_UL, 0, 100);
|
||||
|
||||
|
||||
#if defined(Rel10) || defined(Rel14)
|
||||
#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
cc[CC_id].mcch_active = 0;
|
||||
#endif
|
||||
|
||||
@@ -534,7 +529,6 @@ eNB_dlsch_ulsch_scheduler(module_id_t module_idP, frame_t frameP,
|
||||
// refresh UE list based on UEs dropped by PHY in previous subframe
|
||||
for (i = 0; i < MAX_MOBILES_PER_ENB; i++) {
|
||||
if (UE_list->active[i]) {
|
||||
|
||||
rnti = UE_RNTI(module_idP, i);
|
||||
CC_id = UE_PCCID(module_idP, i);
|
||||
|
||||
@@ -572,18 +566,26 @@ eNB_dlsch_ulsch_scheduler(module_id_t module_idP, frame_t frameP,
|
||||
if(RC.mac[module_idP]->UE_list.UE_sched_ctrl[i].ue_reestablishment_reject_timer >=
|
||||
RC.mac[module_idP]->UE_list.UE_sched_ctrl[i].ue_reestablishment_reject_timer_thres) {
|
||||
RC.mac[module_idP]->UE_list.UE_sched_ctrl[i].ue_reestablishment_reject_timer = 0;
|
||||
for (int ue_id_l = 0; ue_id_l < MAX_MOBILES_PER_ENB; ue_id_l++) {
|
||||
if (reestablish_rnti_map[ue_id_l][0] == rnti) {
|
||||
// clear currentC-RNTI from map
|
||||
reestablish_rnti_map[ue_id_l][0] = 0;
|
||||
reestablish_rnti_map[ue_id_l][1] = 0;
|
||||
break;
|
||||
//clear reestablish_rnti_map
|
||||
if(RC.mac[module_idP]->UE_list.UE_sched_ctrl[i].ue_reestablishment_reject_timer_thres >20){
|
||||
for (int ue_id_l = 0; ue_id_l < MAX_MOBILES_PER_ENB; ue_id_l++) {
|
||||
if (reestablish_rnti_map[ue_id_l][0] == rnti) {
|
||||
// clear currentC-RNTI from map
|
||||
reestablish_rnti_map[ue_id_l][0] = 0;
|
||||
reestablish_rnti_map[ue_id_l][1] = 0;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
PROTOCOL_CTXT_SET_BY_MODULE_ID(&ctxt, module_idP, ENB_FLAG_YES, rnti, 0, 0,module_idP);
|
||||
rrc_rlc_remove_ue(&ctxt);
|
||||
pdcp_remove_UE(&ctxt);
|
||||
}
|
||||
// Note: This should not be done in the MAC!
|
||||
for (int ii=0; ii<MAX_MOBILES_PER_ENB; ii++) {
|
||||
LTE_eNB_ULSCH_t *ulsch = RC.eNB[module_idP][CC_id]->ulsch[ii];
|
||||
if((ulsch != NULL) && (ulsch->rnti == rnti)){
|
||||
void clean_eNb_ulsch(LTE_eNB_ULSCH_t *ulsch);
|
||||
LOG_I(MAC, "clean_eNb_ulsch UE %x \n", rnti);
|
||||
clean_eNb_ulsch(ulsch);
|
||||
}
|
||||
@@ -591,6 +593,7 @@ eNB_dlsch_ulsch_scheduler(module_id_t module_idP, frame_t frameP,
|
||||
for (int ii=0; ii<MAX_MOBILES_PER_ENB; ii++) {
|
||||
LTE_eNB_DLSCH_t *dlsch = RC.eNB[module_idP][CC_id]->dlsch[ii][0];
|
||||
if((dlsch != NULL) && (dlsch->rnti == rnti)){
|
||||
void clean_eNb_dlsch(LTE_eNB_DLSCH_t *dlsch);
|
||||
LOG_I(MAC, "clean_eNb_dlsch UE %x \n", rnti);
|
||||
clean_eNb_dlsch(dlsch);
|
||||
}
|
||||
@@ -617,15 +620,17 @@ eNB_dlsch_ulsch_scheduler(module_id_t module_idP, frame_t frameP,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#if (!defined(PRE_SCD_THREAD))
|
||||
PROTOCOL_CTXT_SET_BY_MODULE_ID(&ctxt, module_idP, ENB_FLAG_YES,
|
||||
NOT_A_RNTI, frameP, subframeP,
|
||||
module_idP);
|
||||
pdcp_run(&ctxt);
|
||||
|
||||
|
||||
rrc_rx_tx(&ctxt, CC_id);
|
||||
#endif
|
||||
|
||||
#if defined(Rel10) || defined(Rel14)
|
||||
#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
|
||||
for (CC_id = 0; CC_id < MAX_NUM_CCs; CC_id++) {
|
||||
if (cc[CC_id].MBMS_flag > 0) {
|
||||
@@ -637,15 +642,33 @@ eNB_dlsch_ulsch_scheduler(module_id_t module_idP, frame_t frameP,
|
||||
|
||||
#endif
|
||||
|
||||
static int debug_flag=0;
|
||||
void (*schedule_ulsch_p)(module_id_t module_idP, frame_t frameP, sub_frame_t subframe)=NULL;
|
||||
void (*schedule_ue_spec_p)(module_id_t module_idP, frame_t frameP, sub_frame_t subframe, int *mbsfn_flag)=NULL;
|
||||
if(RC.mac[module_idP]->scheduler_mode == SCHED_MODE_DEFAULT){
|
||||
schedule_ulsch_p = schedule_ulsch;
|
||||
schedule_ue_spec_p = schedule_dlsch;
|
||||
}else if(RC.mac[module_idP]->scheduler_mode == SCHED_MODE_FAIR_RR){
|
||||
memset(dlsch_ue_select, 0, sizeof(dlsch_ue_select));
|
||||
schedule_ulsch_p = schedule_ulsch_fairRR;
|
||||
schedule_ue_spec_p = schedule_ue_spec_fairRR;
|
||||
}
|
||||
if(debug_flag==0){
|
||||
LOG_E(MAC,"SCHED_MODE=%d\n",RC.mac[module_idP]->scheduler_mode);
|
||||
debug_flag=1;
|
||||
}
|
||||
|
||||
// This schedules MIB
|
||||
|
||||
if ((subframeP == 0) && (frameP & 3) == 0){
|
||||
schedule_mib(module_idP, frameP, subframeP);
|
||||
}
|
||||
|
||||
/*
|
||||
if((subframeP == 0) && (frameP & 7) == 0){
|
||||
schedule_nr_mib(module_idP, frameP, subframeP);
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
if (phy_test == 0){
|
||||
// This schedules SI for legacy LTE and eMTC starting in subframeP
|
||||
@@ -659,13 +682,22 @@ eNB_dlsch_ulsch_scheduler(module_id_t module_idP, frame_t frameP,
|
||||
// This schedules SRS in subframeP
|
||||
schedule_SRS(module_idP, frameP, subframeP);
|
||||
// This schedules ULSCH in subframeP (dci0)
|
||||
schedule_ulsch(module_idP, frameP, subframeP);
|
||||
if (schedule_ulsch_p != NULL) {
|
||||
schedule_ulsch_p(module_idP, frameP, subframeP);
|
||||
} else {
|
||||
LOG_E(MAC," %s %d: schedule_ulsch_p is NULL, function not called\n",__FILE__,__LINE__);
|
||||
}
|
||||
// This schedules UCI_SR in subframeP
|
||||
schedule_SR(module_idP, frameP, subframeP);
|
||||
// This schedules UCI_CSI in subframeP
|
||||
schedule_CSI(module_idP, frameP, subframeP);
|
||||
// This schedules DLSCH in subframeP
|
||||
schedule_dlsch(module_idP, frameP, subframeP, mbsfn_status);
|
||||
if (schedule_ue_spec_p != NULL) {
|
||||
schedule_ue_spec_p(module_idP, frameP, subframeP, mbsfn_status);
|
||||
} else {
|
||||
LOG_E(MAC," %s %d: schedule_ue_spec_p is NULL, function not called\n",__FILE__,__LINE__);
|
||||
}
|
||||
|
||||
}
|
||||
else{
|
||||
schedule_ulsch_phy_test(module_idP,frameP,subframeP);
|
||||
@@ -676,8 +708,10 @@ eNB_dlsch_ulsch_scheduler(module_id_t module_idP, frame_t frameP,
|
||||
flexran_agent_send_update_stats(module_idP);
|
||||
|
||||
// Allocate CCEs for good after scheduling is done
|
||||
for (CC_id = 0; CC_id < MAX_NUM_CCs; CC_id++)
|
||||
allocate_CCEs(module_idP, CC_id, subframeP, 0);
|
||||
for (CC_id = 0; CC_id < MAX_NUM_CCs; CC_id++) {
|
||||
if(cc[CC_id].tdd_Config == NULL || !(is_UL_sf(&cc[CC_id],subframeP)))
|
||||
allocate_CCEs(module_idP, CC_id, frameP, subframeP, 2);
|
||||
}
|
||||
|
||||
stop_meas(&RC.mac[module_idP]->eNB_scheduler);
|
||||
|
||||
|
||||
@@ -40,15 +40,17 @@
|
||||
#include "LAYER2/MAC/mac_extern.h"
|
||||
|
||||
#include "LAYER2/MAC/mac_proto.h"
|
||||
#include "UTIL/LOG/log.h"
|
||||
#include "UTIL/LOG/vcd_signal_dumper.h"
|
||||
#include "common/utils/LOG/log.h"
|
||||
#include "common/utils/LOG/vcd_signal_dumper.h"
|
||||
#include "UTIL/OPT/opt.h"
|
||||
#include "OCG.h"
|
||||
#include "OCG_extern.h"
|
||||
#include "PHY/LTE_TRANSPORT/transport_common_proto.h"
|
||||
|
||||
#include "RRC/LTE/rrc_extern.h"
|
||||
#include "RRC/L2_INTERFACE/openair_rrc_L2_interface.h"
|
||||
|
||||
#include "SCHED/sched_common.h"
|
||||
//#include "LAYER2/MAC/pre_processor.c"
|
||||
#include "pdcp.h"
|
||||
|
||||
@@ -61,6 +63,7 @@
|
||||
#include "T.h"
|
||||
|
||||
#include "common/ran_context.h"
|
||||
#include "LAYER2/MAC/eNB_scheduler_fairRR.h"
|
||||
|
||||
extern RAN_CONTEXT_t RC;
|
||||
|
||||
@@ -105,10 +108,10 @@ add_msg3(module_id_t module_idP, int CC_id, RA_t * ra, frame_t frameP,
|
||||
nfapi_ul_config_request_t *ul_req;
|
||||
nfapi_ul_config_request_body_t *ul_req_body;
|
||||
nfapi_ul_config_request_pdu_t *ul_config_pdu;
|
||||
nfapi_hi_dci0_request_t *hi_dci0_req = &mac->HI_DCI0_req[CC_id];
|
||||
nfapi_hi_dci0_request_body_t *hi_dci0_req_body = &hi_dci0_req->hi_dci0_request_body;
|
||||
nfapi_hi_dci0_request_t *hi_dci0_req;
|
||||
nfapi_hi_dci0_request_body_t *hi_dci0_req_body;
|
||||
nfapi_hi_dci0_request_pdu_t *hi_dci0_pdu;
|
||||
|
||||
uint8_t sf_ahead_dl;
|
||||
uint8_t rvseq[4] = { 0, 2, 3, 1 };
|
||||
|
||||
|
||||
@@ -117,7 +120,7 @@ add_msg3(module_id_t module_idP, int CC_id, RA_t * ra, frame_t frameP,
|
||||
AssertFatal(ra->state != IDLE, "RA is not active for RA %X\n",
|
||||
ra->rnti);
|
||||
|
||||
#ifdef Rel14
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
if (ra->rach_resource_type > 0) {
|
||||
LOG_D(MAC,
|
||||
"[eNB %d][RAPROC] Frame %d, Subframe %d : CC_id %d CE level %d is active, Msg3 in (%d,%d)\n",
|
||||
@@ -173,9 +176,9 @@ add_msg3(module_id_t module_idP, int CC_id, RA_t * ra, frame_t frameP,
|
||||
ra->Msg3_subframe);
|
||||
|
||||
LOG_D(MAC,
|
||||
"Frame %d, Subframe %d Adding Msg3 UL Config Request for (%d,%d) : (%d,%d,%d)\n",
|
||||
"Frame %d, Subframe %d Adding Msg3 UL Config Request for (%d,%d) : (%d,%d,%d) for rnti: %d\n",
|
||||
frameP, subframeP, ra->Msg3_frame, ra->Msg3_subframe,
|
||||
ra->msg3_nb_rb, ra->msg3_first_rb, ra->msg3_round);
|
||||
ra->msg3_nb_rb, ra->msg3_first_rb, ra->msg3_round, ra->rnti);
|
||||
|
||||
ul_config_pdu = &ul_req_body->ul_config_pdu_list[ul_req_body->number_of_pdus];
|
||||
|
||||
@@ -210,6 +213,9 @@ add_msg3(module_id_t module_idP, int CC_id, RA_t * ra, frame_t frameP,
|
||||
LOG_D(MAC, "MSG3: UL_CONFIG SFN/SF:%d number_of_pdus:%d ra->msg3_round:%d\n", NFAPI_SFNSF2DEC(ul_req->sfn_sf), ul_req_body->number_of_pdus, ra->msg3_round);
|
||||
|
||||
if (ra->msg3_round != 0) { // program HI too
|
||||
sf_ahead_dl = ul_subframe2_k_phich(cc, subframeP);
|
||||
hi_dci0_req = &mac->HI_DCI0_req[CC_id][(subframeP+sf_ahead_dl)%10];
|
||||
hi_dci0_req_body = &hi_dci0_req->hi_dci0_request_body;
|
||||
hi_dci0_pdu = &hi_dci0_req_body->hi_dci0_pdu_list[hi_dci0_req_body->number_of_dci + hi_dci0_req_body->number_of_hi];
|
||||
memset((void *) hi_dci0_pdu, 0,
|
||||
sizeof(nfapi_hi_dci0_request_pdu_t));
|
||||
@@ -224,7 +230,7 @@ add_msg3(module_id_t module_idP, int CC_id, RA_t * ra, frame_t frameP,
|
||||
hi_dci0_req_body->sfnsf = sfnsf_add_subframe(ra->Msg3_frame, ra->Msg3_subframe, 0);
|
||||
hi_dci0_req_body->tl.tag = NFAPI_HI_DCI0_REQUEST_BODY_TAG;
|
||||
|
||||
hi_dci0_req->sfn_sf = sfnsf_add_subframe(ra->Msg3_frame, ra->Msg3_subframe, 4);
|
||||
hi_dci0_req->sfn_sf = sfnsf_add_subframe(frameP, subframeP, sf_ahead_dl);
|
||||
hi_dci0_req->header.message_id = NFAPI_HI_DCI0_REQUEST;
|
||||
|
||||
if (nfapi_mode) {
|
||||
@@ -266,7 +272,7 @@ generate_Msg2(module_id_t module_idP, int CC_idP, frame_t frameP,
|
||||
dl_config_pdu = &dl_req->dl_config_pdu_list[dl_req->number_pdu];
|
||||
N_RB_DL = to_prb(cc[CC_idP].mib->message.dl_Bandwidth);
|
||||
|
||||
#ifdef Rel14
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
int rmax = 0;
|
||||
int rep = 0;
|
||||
int reps = 0;
|
||||
@@ -282,7 +288,7 @@ generate_Msg2(module_id_t module_idP, int CC_idP, frame_t frameP,
|
||||
|
||||
LOG_D(MAC,"absSF:%d absSF_Msg2:%d ra->rach_resource_type:%d\n",absSF,absSF_Msg2,ra->rach_resource_type);
|
||||
|
||||
if (absSF > absSF_Msg2)
|
||||
if (absSF < absSF_Msg2)
|
||||
return; // we're not ready yet, need to be to start ==
|
||||
|
||||
if (cc[CC_idP].radioResourceConfigCommon_BR) {
|
||||
@@ -485,6 +491,9 @@ generate_Msg2(module_id_t module_idP, int CC_idP, frame_t frameP,
|
||||
TX_req->segments[0].segment_length = 7;
|
||||
TX_req->segments[0].segment_data = cc[CC_idP].RAR_pdu.payload;
|
||||
mac->TX_req[CC_idP].tx_request_body.number_of_pdus++;
|
||||
if(RC.mac[module_idP]->scheduler_mode == SCHED_MODE_FAIR_RR){
|
||||
set_dl_ue_select_msg2(CC_idP, 4, -1, ra->rnti);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -586,6 +595,9 @@ generate_Msg2(module_id_t module_idP, int CC_idP, frame_t frameP,
|
||||
TX_req->segments[0].segment_data =
|
||||
cc[CC_idP].RAR_pdu.payload;
|
||||
mac->TX_req[CC_idP].tx_request_body.number_of_pdus++;
|
||||
if(RC.mac[module_idP]->scheduler_mode == SCHED_MODE_FAIR_RR){
|
||||
set_dl_ue_select_msg2(CC_idP, 4, -1, ra->rnti);
|
||||
}
|
||||
} // PDCCH CCE allocation is feasible
|
||||
} // Msg2 frame/subframe condition
|
||||
} // else BL/CE
|
||||
@@ -619,7 +631,7 @@ generate_Msg4(module_id_t module_idP, int CC_idP, frame_t frameP,
|
||||
uint8_t offset;
|
||||
|
||||
|
||||
#ifdef Rel14
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
int rmax = 0;
|
||||
int rep = 0;
|
||||
int reps = 0;
|
||||
@@ -692,25 +704,25 @@ generate_Msg4(module_id_t module_idP, int CC_idP, frame_t frameP,
|
||||
|
||||
// set HARQ process round to 0 for this UE
|
||||
|
||||
if (cc->tdd_Config)
|
||||
ra->harq_pid = ((frameP * 10) + subframeP) % 10;
|
||||
else
|
||||
ra->harq_pid = ((frameP * 10) + subframeP) & 7;
|
||||
ra->harq_pid = frame_subframe2_dl_harq_pid(cc->tdd_Config,frameP ,subframeP);
|
||||
|
||||
// Get RRCConnectionSetup for Piggyback
|
||||
/* // Get RRCConnectionSetup for Piggyback
|
||||
rrc_sdu_length = mac_rrc_data_req(module_idP, CC_idP, frameP, CCCH, 1, // 1 transport block
|
||||
&cc[CC_idP].CCCH_pdu.payload[0], 0); // not used in this case
|
||||
|
||||
AssertFatal(rrc_sdu_length > 0,
|
||||
"[MAC][eNB Scheduler] CCCH not allocated\n");
|
||||
if(rrc_sdu_length <= 0) {
|
||||
LOG_D(MAC,"[MAC][eNB Scheduler] CCCH not allocated (%d)\n",rrc_sdu_length);
|
||||
return;
|
||||
}
|
||||
//AssertFatal(rrc_sdu_length > 0,
|
||||
//"[MAC][eNB Scheduler] CCCH not allocated\n");
|
||||
|
||||
|
||||
LOG_D(MAC,
|
||||
"[eNB %d][RAPROC] CC_id %d Frame %d, subframeP %d: UE_id %d, rrc_sdu_length %d\n",
|
||||
module_idP, CC_idP, frameP, subframeP, UE_id, rrc_sdu_length);
|
||||
module_idP, CC_idP, frameP, subframeP, UE_id, rrc_sdu_length);*/
|
||||
|
||||
|
||||
#ifdef Rel14
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
if (ra->rach_resource_type > 0) {
|
||||
|
||||
// Generate DCI + repetitions first
|
||||
@@ -816,6 +828,20 @@ generate_Msg4(module_id_t module_idP, int CC_idP, frame_t frameP,
|
||||
|
||||
// Program PDSCH
|
||||
|
||||
// Get RRCConnectionSetup for Piggyback
|
||||
/*rrc_sdu_length = mac_rrc_data_req(module_idP, CC_idP, frameP, CCCH, 1, // 1 transport block
|
||||
&cc[CC_idP].CCCH_pdu.payload[0], ENB_FLAG_YES, module_idP, 0); // not used in this case*/
|
||||
|
||||
rrc_sdu_length = mac_rrc_data_req(module_idP, CC_idP, frameP, CCCH, 1, // 1 transport block
|
||||
&cc[CC_idP].CCCH_pdu.payload[0], 0); // not used in this case
|
||||
|
||||
LOG_D(MAC,
|
||||
"[eNB %d][RAPROC] CC_id %d Frame %d, subframeP %d: UE_id %d, rrc_sdu_length %d\n",
|
||||
module_idP, CC_idP, frameP, subframeP, UE_id, rrc_sdu_length);
|
||||
|
||||
AssertFatal(rrc_sdu_length > 0,
|
||||
"[MAC][eNB Scheduler] CCCH not allocated\n");
|
||||
|
||||
LOG_D(MAC,
|
||||
"[eNB %d][RAPROC] CC_id %d Frame %d, subframeP %d: Generating Msg4 BR with RRC Piggyback (ce_level %d RNTI %x)\n",
|
||||
module_idP, CC_idP, frameP, subframeP,
|
||||
@@ -972,13 +998,35 @@ generate_Msg4(module_id_t module_idP, int CC_idP, frame_t frameP,
|
||||
module_idP, CC_idP, frameP, UE_RNTI(module_idP,UE_id),
|
||||
rrc_sdu_length);
|
||||
}
|
||||
if(RC.mac[module_idP]->scheduler_mode == SCHED_MODE_FAIR_RR){
|
||||
set_dl_ue_select_msg4(CC_idP, 4, UE_id, ra->rnti);
|
||||
}
|
||||
} // Msg4 frame/subframe
|
||||
} // msg4_mpdcch_repetition_count
|
||||
} // rach_resource_type > 0
|
||||
else
|
||||
#endif
|
||||
{ // This is normal LTE case
|
||||
if ((ra->Msg4_frame == frameP) && (ra->Msg4_subframe == subframeP)) {
|
||||
{
|
||||
// This is normal LTE case
|
||||
LOG_D(MAC, "generate_Msg4 1 ra->Msg4_frame SFN/SF: %d.%d, frameP SFN/SF: %d.%d FOR eNB_Mod: %d \n", ra->Msg4_frame, ra->Msg4_subframe, frameP, subframeP, module_idP);
|
||||
if ((ra->Msg4_frame == frameP) && (ra->Msg4_subframe == subframeP)) {
|
||||
|
||||
// Get RRCConnectionSetup for Piggyback
|
||||
/*rrc_sdu_length = mac_rrc_data_req(module_idP, CC_idP, frameP, CCCH, 1, // 1 transport block
|
||||
&cc[CC_idP].CCCH_pdu.payload[0], ENB_FLAG_YES, module_idP, 0); // not used in this case*/
|
||||
|
||||
rrc_sdu_length = mac_rrc_data_req(module_idP, CC_idP, frameP, CCCH, 1, // 1 transport block
|
||||
&cc[CC_idP].CCCH_pdu.payload[0], 0); // not used in this case
|
||||
|
||||
LOG_D(MAC,
|
||||
"[eNB %d][RAPROC] CC_id %d Frame %d, subframeP %d: UE_id %d, rrc_sdu_length %d\n",
|
||||
module_idP, CC_idP, frameP, subframeP, UE_id, rrc_sdu_length);
|
||||
|
||||
AssertFatal(rrc_sdu_length > 0,
|
||||
"[MAC][eNB Scheduler] CCCH not allocated, rrc_sdu_length: %d\n", rrc_sdu_length);
|
||||
|
||||
|
||||
|
||||
LOG_D(MAC,
|
||||
"[eNB %d][RAPROC] CC_id %d Frame %d, subframeP %d: Generating Msg4 with RRC Piggyback (RNTI %x)\n",
|
||||
module_idP, CC_idP, frameP, subframeP, ra->rnti);
|
||||
@@ -1052,10 +1100,8 @@ generate_Msg4(module_id_t module_idP, int CC_idP, frame_t frameP,
|
||||
"Frame %d, Subframe %d: Preparing for Msg4 retransmission currently %d.%d\n",
|
||||
frameP, subframeP, ra->Msg4_frame,
|
||||
ra->Msg4_subframe);
|
||||
if (ra->Msg4_subframe > 1)
|
||||
ra->Msg4_frame++;
|
||||
ra->Msg4_frame &= 1023;
|
||||
ra->Msg4_subframe = (ra->Msg4_subframe + 8) % 10;
|
||||
get_retransmission_timing(mac->common_channels[CC_idP].tdd_Config,&ra->Msg4_frame,&ra->Msg4_subframe);
|
||||
|
||||
LOG_D(MAC,
|
||||
"Frame %d, Subframe %d: Msg4 retransmission in %d.%d\n",
|
||||
frameP, subframeP, ra->Msg4_frame,
|
||||
@@ -1063,9 +1109,7 @@ generate_Msg4(module_id_t module_idP, int CC_idP, frame_t frameP,
|
||||
lcid = 0;
|
||||
|
||||
// put HARQ process round to 0
|
||||
if (cc->tdd_Config) ra->harq_pid = ((frameP * 10) + subframeP) % 10;
|
||||
else
|
||||
ra->harq_pid = ((frameP * 10) + subframeP) & 7;
|
||||
ra->harq_pid = frame_subframe2_dl_harq_pid(cc->tdd_Config,frameP ,subframeP);
|
||||
UE_list->UE_sched_ctrl[UE_id].round[CC_idP][ra->harq_pid] = 0;
|
||||
|
||||
if ((ra->msg4_TBsize - rrc_sdu_length - msg4_header) <= 2) {
|
||||
@@ -1160,7 +1204,9 @@ generate_Msg4(module_id_t module_idP, int CC_idP, frame_t frameP,
|
||||
UE_id),
|
||||
rrc_sdu_length);
|
||||
}
|
||||
|
||||
if(RC.mac[module_idP]->scheduler_mode == SCHED_MODE_FAIR_RR){
|
||||
set_dl_ue_select_msg4(CC_idP, 4, UE_id, ra->rnti);
|
||||
}
|
||||
} // CCE Allocation feasible
|
||||
} // msg4 frame/subframe
|
||||
} // else rach_resource_type
|
||||
@@ -1184,7 +1230,7 @@ check_Msg4_retransmission(module_id_t module_idP, int CC_idP,
|
||||
|
||||
int round;
|
||||
/*
|
||||
#ifdef Rel14
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
COMMON_channels_t *cc = mac->common_channels;
|
||||
|
||||
int rmax = 0;
|
||||
@@ -1232,12 +1278,12 @@ check_Msg4_retransmission(module_id_t module_idP, int CC_idP,
|
||||
N_RB_DL = to_prb(cc[CC_idP].mib->message.dl_Bandwidth);
|
||||
|
||||
LOG_D(MAC,
|
||||
"[eNB %d][RAPROC] CC_id %d Frame %d, subframeP %d: Checking if Msg4 for harq_pid %d was acknowledged (round %d)\n",
|
||||
module_idP, CC_idP, frameP, subframeP, ra->harq_pid, round);
|
||||
"[eNB %d][RAPROC] CC_id %d Frame %d, subframeP %d: Checking if Msg4 for harq_pid %d was acknowledged (round %d), UE_id: %d \n",
|
||||
module_idP, CC_idP, frameP, subframeP, ra->harq_pid, round, UE_id);
|
||||
|
||||
if (round != 8) {
|
||||
|
||||
#ifdef Rel14
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
if (ra->rach_resource_type > 0) {
|
||||
AssertFatal(1 == 0,
|
||||
"Msg4 Retransmissions not handled yet for BL/CE UEs\n");
|
||||
@@ -1282,6 +1328,7 @@ check_Msg4_retransmission(module_id_t module_idP, int CC_idP,
|
||||
ra->rnti, round, frameP, subframeP);
|
||||
// DLSCH Config
|
||||
//DJP - fix this pdu_index = -1
|
||||
LOG_D(MAC, "check_Msg4_retransmission() before fill_nfapi_dlsch_config() with pdu_index = -1 \n");
|
||||
fill_nfapi_dlsch_config(mac, dl_req_body, ra->msg4_TBsize,
|
||||
-1
|
||||
/* retransmission, no pdu_index */
|
||||
@@ -1304,6 +1351,9 @@ check_Msg4_retransmission(module_id_t module_idP, int CC_idP,
|
||||
(cc->p_eNB == 1) ? 1 : 2, // transmission mode
|
||||
1, // num_bf_prb_per_subband
|
||||
1); // num_bf_vector
|
||||
if(RC.mac[module_idP]->scheduler_mode == SCHED_MODE_FAIR_RR){
|
||||
set_dl_ue_select_msg4(CC_idP, 4, UE_id, ra->rnti);
|
||||
}
|
||||
} else
|
||||
LOG_D(MAC,
|
||||
"msg4 retransmission for rnti %x (round %d) fsf %d/%d CCE allocation failed!\n",
|
||||
@@ -1320,10 +1370,7 @@ check_Msg4_retransmission(module_id_t module_idP, int CC_idP,
|
||||
dci_dl_pdu_rel8.cce_idx);
|
||||
|
||||
// prepare frame for retransmission
|
||||
if (ra->Msg4_subframe > 1)
|
||||
ra->Msg4_frame++;
|
||||
ra->Msg4_frame &= 1023;
|
||||
ra->Msg4_subframe = (ra->Msg4_subframe + 8) % 10;
|
||||
get_retransmission_timing(mac->common_channels[CC_idP].tdd_Config,&ra->Msg4_frame,&ra->Msg4_subframe);
|
||||
|
||||
LOG_W(MAC,
|
||||
"[eNB %d][RAPROC] CC_id %d Frame %d, subframeP %d: Msg4 not acknowledged, adding ue specific dci (rnti %x) for RA (Msg4 Retransmission round %d in %d.%d)\n",
|
||||
@@ -1341,6 +1388,7 @@ check_Msg4_retransmission(module_id_t module_idP, int CC_idP,
|
||||
UE_id = find_UE_id(module_idP, ra->rnti);
|
||||
DevAssert(UE_id != -1);
|
||||
mac->UE_list.UE_template[UE_PCCID(module_idP, UE_id)][UE_id].configured = TRUE;
|
||||
cancel_ra_proc(module_idP, CC_idP, frameP, ra->rnti);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1371,7 +1419,7 @@ schedule_RA(module_id_t module_idP, frame_t frameP, sub_frame_t subframeP)
|
||||
|
||||
if (ra->state == MSG2)
|
||||
generate_Msg2(module_idP, CC_id, frameP, subframeP, ra);
|
||||
else if (ra->state == MSG4)
|
||||
else if (ra->state == MSG4 && ra->Msg4_frame == frameP && ra->Msg4_subframe == subframeP )
|
||||
generate_Msg4(module_idP, CC_id, frameP, subframeP, ra);
|
||||
else if (ra->state == WAITMSG4ACK)
|
||||
check_Msg4_retransmission(module_idP, CC_id, frameP,
|
||||
@@ -1392,7 +1440,7 @@ initiate_ra_proc(module_id_t module_idP,
|
||||
sub_frame_t subframeP,
|
||||
uint16_t preamble_index,
|
||||
int16_t timing_offset, uint16_t ra_rnti
|
||||
#ifdef Rel14
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
, uint8_t rach_resource_type
|
||||
#endif
|
||||
)
|
||||
@@ -1403,10 +1451,12 @@ initiate_ra_proc(module_id_t module_idP,
|
||||
COMMON_channels_t *cc = &RC.mac[module_idP]->common_channels[CC_id];
|
||||
RA_t *ra = &cc->ra[0];
|
||||
|
||||
#ifdef Rel14
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
|
||||
struct PRACH_ConfigSIB_v1310 *ext4_prach = NULL;
|
||||
PRACH_ParametersListCE_r13_t *prach_ParametersListCE_r13 = NULL;
|
||||
|
||||
static uint8_t failure_cnt = 0;
|
||||
|
||||
if (cc->radioResourceConfigCommon_BR
|
||||
&& cc->radioResourceConfigCommon_BR->ext4) {
|
||||
@@ -1414,12 +1464,12 @@ initiate_ra_proc(module_id_t module_idP,
|
||||
prach_ParametersListCE_r13 = &ext4_prach->prach_ParametersListCE_r13;
|
||||
}
|
||||
|
||||
#endif /* Rel14 */
|
||||
#endif /* #if (RRC_VERSION >= MAKE_VERSION(14, 0, 0)) */
|
||||
|
||||
LOG_D(MAC,
|
||||
"[eNB %d][RAPROC] CC_id %d Frame %d, Subframe %d Initiating RA procedure for preamble index %d\n",
|
||||
module_idP, CC_id, frameP, subframeP, preamble_index);
|
||||
#ifdef Rel14
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
LOG_D(MAC,
|
||||
"[eNB %d][RAPROC] CC_id %d Frame %d, Subframe %d PRACH resource type %d\n",
|
||||
module_idP, CC_id, frameP, subframeP, rach_resource_type);
|
||||
@@ -1429,7 +1479,7 @@ initiate_ra_proc(module_id_t module_idP,
|
||||
uint16_t msg2_subframe = subframeP;
|
||||
int offset;
|
||||
|
||||
#ifdef Rel14
|
||||
#if (RRC_VERSION >= MAKE_VERSION(13, 0, 0))
|
||||
|
||||
if (prach_ParametersListCE_r13 &&
|
||||
prach_ParametersListCE_r13->list.count < rach_resource_type) {
|
||||
@@ -1440,7 +1490,7 @@ initiate_ra_proc(module_id_t module_idP,
|
||||
return;
|
||||
}
|
||||
|
||||
#endif /* Rel14 */
|
||||
#endif /* #if (RRC_VERSION >= MAKE_VERSION(14, 0, 0)) */
|
||||
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_INITIATE_RA_PROC, 1);
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_INITIATE_RA_PROC, 0);
|
||||
@@ -1453,17 +1503,28 @@ initiate_ra_proc(module_id_t module_idP,
|
||||
ra[i].state = MSG2;
|
||||
ra[i].timing_offset = timing_offset;
|
||||
ra[i].preamble_subframe = subframeP;
|
||||
#ifdef Rel14
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
ra[i].rach_resource_type = rach_resource_type;
|
||||
ra[i].msg2_mpdcch_repetition_cnt = 0;
|
||||
ra[i].msg4_mpdcch_repetition_cnt = 0;
|
||||
#endif
|
||||
|
||||
// DJP - this is because VNF is 2 subframes ahead of PNF and TX needs 4 subframes
|
||||
if (nfapi_mode)
|
||||
offset = 7;
|
||||
else
|
||||
offset = 5;
|
||||
|
||||
//TODO Fill in other TDD config. What about nfapi_mode?
|
||||
if(cc->tdd_Config!=NULL){
|
||||
switch(cc->tdd_Config->subframeAssignment){
|
||||
default: printf("%s:%d: TODO\n", __FILE__, __LINE__); abort();
|
||||
case 1 :
|
||||
offset = 6;
|
||||
break;
|
||||
}
|
||||
}else{//FDD
|
||||
// DJP - this is because VNF is 2 subframes ahead of PNF and TX needs 4 subframes
|
||||
if (nfapi_mode)
|
||||
offset = 7;
|
||||
else
|
||||
offset = 5;
|
||||
}
|
||||
|
||||
add_subframe(&msg2_frame, &msg2_subframe, offset);
|
||||
|
||||
@@ -1510,6 +1571,7 @@ initiate_ra_proc(module_id_t module_idP,
|
||||
}
|
||||
ra[i].RA_rnti = ra_rnti;
|
||||
ra[i].preamble_index = preamble_index;
|
||||
failure_cnt = 0;
|
||||
LOG_D(MAC,
|
||||
"[eNB %d][RAPROC] CC_id %d Frame %d Activating RAR generation in Frame %d, subframe %d for process %d, rnti %x, state %d\n",
|
||||
module_idP, CC_id, frameP, ra[i].Msg2_frame,
|
||||
@@ -1522,6 +1584,13 @@ initiate_ra_proc(module_id_t module_idP,
|
||||
LOG_E(MAC,
|
||||
"[eNB %d][RAPROC] FAILURE: CC_id %d Frame %d Initiating RA procedure for preamble index %d\n",
|
||||
module_idP, CC_id, frameP, preamble_index);
|
||||
|
||||
failure_cnt++;
|
||||
if(failure_cnt > 20) {
|
||||
LOG_E(MAC,"[eNB %d][RAPROC] CC_id %d Frame %d Clear Random access information\n", module_idP, CC_id, frameP);
|
||||
clear_ra_proc(module_idP, CC_id, frameP);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void
|
||||
@@ -1544,6 +1613,22 @@ cancel_ra_proc(module_id_t module_idP, int CC_id, frame_t frameP,
|
||||
ra[i].RRC_timer = 20;
|
||||
ra[i].rnti = 0;
|
||||
ra[i].msg3_round = 0;
|
||||
LOG_I(MAC,"[eNB %d][RAPROC] CC_id %d Frame %d Canceled RA procedure for UE rnti %x\n", module_idP, CC_id, frameP, rnti);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void clear_ra_proc(module_id_t module_idP, int CC_id, frame_t frameP)
|
||||
{
|
||||
unsigned char i;
|
||||
RA_t *ra = (RA_t *) & RC.mac[module_idP]->common_channels[CC_id].ra[0];
|
||||
|
||||
for (i = 0; i < NB_RA_PROC_MAX; i++) {
|
||||
LOG_D(MAC,"[eNB %d][RAPROC] CC_id %d Frame %d Clear Random access information rnti %x\n", module_idP, CC_id, frameP, ra[i].rnti);
|
||||
ra[i].state = IDLE;
|
||||
ra[i].timing_offset = 0;
|
||||
ra[i].RRC_timer = 20;
|
||||
ra[i].rnti = 0;
|
||||
ra[i].msg3_round = 0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -33,8 +33,8 @@
|
||||
#include "LAYER2/MAC/mac.h"
|
||||
#include "LAYER2/MAC/mac_proto.h"
|
||||
#include "LAYER2/MAC/mac_extern.h"
|
||||
#include "UTIL/LOG/log.h"
|
||||
#include "UTIL/LOG/vcd_signal_dumper.h"
|
||||
#include "common/utils/LOG/log.h"
|
||||
#include "common/utils/LOG/vcd_signal_dumper.h"
|
||||
#include "UTIL/OPT/opt.h"
|
||||
#include "OCG.h"
|
||||
#include "OCG_extern.h"
|
||||
@@ -59,7 +59,7 @@ extern RAN_CONTEXT_t RC;
|
||||
// NEED TO ADD schedule_SI_BR for SIB1_BR and SIB23_BR
|
||||
// CCE_allocation_infeasible to be done for EPDCCH/MPDCCH
|
||||
|
||||
#ifdef Rel14
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
|
||||
#define size_Sj25 2
|
||||
int Sj25[size_Sj25] = { 0, 3 };
|
||||
@@ -81,7 +81,6 @@ schedule_SIB1_BR(module_id_t module_idP,
|
||||
frame_t frameP, sub_frame_t subframeP)
|
||||
//------------------------------------------------------------------------------
|
||||
{
|
||||
|
||||
int8_t bcch_sdu_length;
|
||||
int CC_id;
|
||||
eNB_MAC_INST *eNB = RC.mac[module_idP];
|
||||
@@ -506,7 +505,6 @@ schedule_SI_BR(module_id_t module_idP, frame_t frameP,
|
||||
void
|
||||
schedule_mib(module_id_t module_idP, frame_t frameP, sub_frame_t subframeP)
|
||||
{
|
||||
|
||||
eNB_MAC_INST *eNB = RC.mac[module_idP];
|
||||
COMMON_channels_t *cc;
|
||||
nfapi_dl_config_request_pdu_t *dl_config_pdu;
|
||||
@@ -535,7 +533,7 @@ schedule_mib(module_id_t module_idP, frame_t frameP, sub_frame_t subframeP)
|
||||
LOG_D(MAC, "Frame %d, subframe %d: Adding BCH PDU in position %d (length %d)\n", frameP, subframeP, dl_req->number_pdu, mib_sdu_length);
|
||||
|
||||
if ((frameP & 1023) < 40)
|
||||
#ifdef Rel14
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
LOG_D(MAC,
|
||||
"[eNB %d] Frame %d : MIB->BCH CC_id %d, Received %d bytes (cc->mib->message.schedulingInfoSIB1_BR_r13 %d)\n",
|
||||
module_idP, frameP, CC_id, mib_sdu_length,
|
||||
@@ -791,7 +789,7 @@ schedule_SI(module_id_t module_idP, frame_t frameP, sub_frame_t subframeP)
|
||||
}
|
||||
}
|
||||
}
|
||||
#ifdef Rel14
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
schedule_SIB1_BR(module_idP, frameP, subframeP);
|
||||
schedule_SI_BR(module_idP, frameP, subframeP);
|
||||
#endif
|
||||
|
||||
@@ -33,11 +33,12 @@
|
||||
#include "LAYER2/MAC/mac.h"
|
||||
#include "LAYER2/MAC/mac_proto.h"
|
||||
#include "LAYER2/MAC/mac_extern.h"
|
||||
#include "UTIL/LOG/log.h"
|
||||
#include "UTIL/LOG/vcd_signal_dumper.h"
|
||||
#include "common/utils/LOG/log.h"
|
||||
#include "common/utils/LOG/vcd_signal_dumper.h"
|
||||
#include "UTIL/OPT/opt.h"
|
||||
#include "OCG.h"
|
||||
#include "OCG_extern.h"
|
||||
#include "PHY/LTE_TRANSPORT/transport_common_proto.h"
|
||||
|
||||
#include "RRC/LTE/rrc_extern.h"
|
||||
#include "RRC/L2_INTERFACE/openair_rrc_L2_interface.h"
|
||||
@@ -367,22 +368,25 @@ set_ul_DAI(int module_idP, int UE_idP, int CC_idP, int frameP,
|
||||
|
||||
case 1:
|
||||
switch (subframeP) {
|
||||
case 0:
|
||||
case 1:
|
||||
UE_list->UE_template[CC_idP][UE_idP].DAI_ul[7] = DAI;
|
||||
break;
|
||||
|
||||
case 4:
|
||||
UE_list->UE_template[CC_idP][UE_idP].DAI_ul[8] = DAI;
|
||||
break;
|
||||
UE_list->UE_template[CC_idP][UE_idP].DAI_ul[8] = DAI;
|
||||
break;
|
||||
|
||||
case 5:
|
||||
case 6:
|
||||
UE_list->UE_template[CC_idP][UE_idP].DAI_ul[2] = DAI;
|
||||
break;
|
||||
UE_list->UE_template[CC_idP][UE_idP].DAI_ul[2] = DAI;
|
||||
break;
|
||||
|
||||
case 9:
|
||||
UE_list->UE_template[CC_idP][UE_idP].DAI_ul[3] = DAI;
|
||||
break;
|
||||
UE_list->UE_template[CC_idP][UE_idP].DAI_ul[3] = DAI;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
||||
case 2:
|
||||
// if ((subframeP==3)||(subframeP==8))
|
||||
@@ -471,7 +475,7 @@ schedule_dlsch(module_id_t module_idP,
|
||||
slice_sched_dl[i] = dlsym(NULL, dl_scheduler_type[i]);
|
||||
update_dl_scheduler[i] = 0 ;
|
||||
update_dl_scheduler_current[i] = 0;
|
||||
LOG_N(MAC,"update dl scheduler slice %d\n", i);
|
||||
LOG_I(MAC,"update dl scheduler slice %d\n", i);
|
||||
}
|
||||
|
||||
if (total_slice_percentage <= 1.0){ // the new total RB share is within the range
|
||||
@@ -479,7 +483,7 @@ schedule_dlsch(module_id_t module_idP,
|
||||
// check if the number of slices has changed, and log
|
||||
if (n_active_slices_current != n_active_slices ){
|
||||
if ((n_active_slices > 0) && (n_active_slices <= MAX_NUM_SLICES)) {
|
||||
LOG_N(MAC,"[eNB %d]frame %d subframe %d: number of active DL slices has changed: %d-->%d\n",
|
||||
LOG_I(MAC,"[eNB %d]frame %d subframe %d: number of active DL slices has changed: %d-->%d\n",
|
||||
module_idP, frameP, subframeP, n_active_slices_current, n_active_slices);
|
||||
|
||||
n_active_slices_current = n_active_slices;
|
||||
@@ -492,7 +496,7 @@ schedule_dlsch(module_id_t module_idP,
|
||||
|
||||
// check if the slice rb share has changed, and log the console
|
||||
if (slice_percentage_current[i] != slice_percentage[i]){ // new slice percentage
|
||||
LOG_N(MAC,"[eNB %d][SLICE %d][DL] frame %d subframe %d: total percentage %f-->%f, slice RB percentage has changed: %f-->%f\n",
|
||||
LOG_I(MAC,"[eNB %d][SLICE %d][DL] frame %d subframe %d: total percentage %f-->%f, slice RB percentage has changed: %f-->%f\n",
|
||||
module_idP, i, frameP, subframeP, total_slice_percentage_current, total_slice_percentage, slice_percentage_current[i], slice_percentage[i]);
|
||||
total_slice_percentage_current= total_slice_percentage;
|
||||
slice_percentage_current[i] = slice_percentage[i];
|
||||
@@ -502,7 +506,7 @@ schedule_dlsch(module_id_t module_idP,
|
||||
// check if the slice max MCS, and log the console
|
||||
if (slice_maxmcs_current[i] != slice_maxmcs[i]){
|
||||
if ((slice_maxmcs[i] >= 0) && (slice_maxmcs[i] < 29)){
|
||||
LOG_N(MAC,"[eNB %d][SLICE %d][DL] frame %d subframe %d: slice MAX MCS has changed: %d-->%d\n",
|
||||
LOG_I(MAC,"[eNB %d][SLICE %d][DL] frame %d subframe %d: slice MAX MCS has changed: %d-->%d\n",
|
||||
module_idP, i, frameP, subframeP, slice_maxmcs_current[i], slice_maxmcs[i]);
|
||||
slice_maxmcs_current[i] = slice_maxmcs[i];
|
||||
} else {
|
||||
@@ -513,7 +517,7 @@ schedule_dlsch(module_id_t module_idP,
|
||||
|
||||
// check if a new scheduler, and log the console
|
||||
if (update_dl_scheduler_current[i] != update_dl_scheduler[i]){
|
||||
LOG_N(MAC,"[eNB %d][SLICE %d][DL] frame %d subframe %d: DL scheduler for this slice is updated: %s \n",
|
||||
LOG_I(MAC,"[eNB %d][SLICE %d][DL] frame %d subframe %d: DL scheduler for this slice is updated: %s \n",
|
||||
module_idP, i, frameP, subframeP, dl_scheduler_type[i]);
|
||||
update_dl_scheduler_current[i] = update_dl_scheduler[i];
|
||||
}
|
||||
@@ -539,7 +543,7 @@ schedule_dlsch(module_id_t module_idP,
|
||||
|
||||
// Check for new sorting policy
|
||||
if (sorting_policy_current[i] != sorting_policy[i]) {
|
||||
LOG_N(MAC,"[eNB %d][SLICE %d][DL] frame %d subframe %d: UE sorting policy has changed (%x-->%x)\n",
|
||||
LOG_I(MAC,"[eNB %d][SLICE %d][DL] frame %d subframe %d: UE sorting policy has changed (%x-->%x)\n",
|
||||
module_idP, i, frameP, subframeP, sorting_policy_current[i], sorting_policy[i]);
|
||||
sorting_policy_current[i] = sorting_policy[i];
|
||||
}
|
||||
@@ -594,12 +598,6 @@ schedule_ue_spec(module_id_t module_idP,slice_id_t slice_idP,
|
||||
int header_length_last;
|
||||
int header_length_total;
|
||||
|
||||
#if 0
|
||||
if (UE_list->head == -1) {
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
start_meas(&eNB->schedule_dlsch);
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
|
||||
(VCD_SIGNAL_DUMPER_FUNCTIONS_SCHEDULE_DLSCH, VCD_FUNCTION_IN);
|
||||
@@ -631,8 +629,7 @@ schedule_ue_spec(module_id_t module_idP,slice_id_t slice_idP,
|
||||
break;
|
||||
case 6:
|
||||
case 7:
|
||||
if ((tdd_sfa != 1) && (tdd_sfa != 2) && (tdd_sfa != 4)
|
||||
&& (tdd_sfa != 5))
|
||||
if ((tdd_sfa != 3) && (tdd_sfa != 4) && (tdd_sfa != 5))
|
||||
return;
|
||||
break;
|
||||
case 8:
|
||||
@@ -641,8 +638,7 @@ schedule_ue_spec(module_id_t module_idP,slice_id_t slice_idP,
|
||||
return;
|
||||
break;
|
||||
case 9:
|
||||
if ((tdd_sfa != 1) && (tdd_sfa != 3) && (tdd_sfa != 4)
|
||||
&& (tdd_sfa != 6))
|
||||
if (tdd_sfa == 0)
|
||||
return;
|
||||
break;
|
||||
|
||||
@@ -760,19 +756,10 @@ schedule_ue_spec(module_id_t module_idP,slice_id_t slice_idP,
|
||||
CC_id, UE_id, subframeP, S_DL_NONE);
|
||||
continue;
|
||||
}
|
||||
#warning RK->CR This old API call has to be revisited for FAPI, or logic must be changed
|
||||
#if 0
|
||||
/* add "fake" DCI to have CCE_allocation_infeasible work properly for next allocations */
|
||||
/* if we don't add it, next allocations may succeed but overall allocations may fail */
|
||||
/* will be removed at the end of this function */
|
||||
add_ue_spec_dci(&eNB->common_channels[CC_id].DCI_pdu, &(char[]) {
|
||||
0}, rnti, 1, aggregation, 1, format1, 0);
|
||||
#endif
|
||||
|
||||
nb_available_rb = ue_sched_ctl->pre_nb_available_rbs[CC_id];
|
||||
|
||||
if (cc->tdd_Config) harq_pid = ((frameP * 10) + subframeP) % 10;
|
||||
else harq_pid = ((frameP * 10) + subframeP) & 7;
|
||||
harq_pid = frame_subframe2_dl_harq_pid(cc->tdd_Config,frameP ,subframeP);
|
||||
|
||||
round = ue_sched_ctl->round[CC_id][harq_pid];
|
||||
|
||||
@@ -831,7 +818,7 @@ schedule_ue_spec(module_id_t module_idP,slice_id_t slice_idP,
|
||||
if (cc[CC_id].tdd_Config != NULL) {
|
||||
UE_list->UE_template[CC_id][UE_id].DAI++;
|
||||
update_ul_dci(module_idP, CC_id, rnti,
|
||||
UE_list->UE_template[CC_id][UE_id].DAI);
|
||||
UE_list->UE_template[CC_id][UE_id].DAI, subframeP);
|
||||
LOG_D(MAC,
|
||||
"DAI update: CC_id %d subframeP %d: UE %d, DAI %d\n",
|
||||
CC_id, subframeP, UE_id,
|
||||
@@ -1003,7 +990,11 @@ schedule_ue_spec(module_id_t module_idP,slice_id_t slice_idP,
|
||||
// RLC data on DCCH
|
||||
if (TBS - ta_len - header_length_total - sdu_length_total - 3 > 0) {
|
||||
rlc_status = mac_rlc_status_ind(module_idP, rnti, module_idP, frameP, subframeP, ENB_FLAG_YES, MBMS_FLAG_NO, DCCH,
|
||||
TBS - ta_len - header_length_total - sdu_length_total - 3);
|
||||
TBS - ta_len - header_length_total - sdu_length_total - 3
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
,0, 0
|
||||
#endif
|
||||
);
|
||||
|
||||
sdu_lengths[0] = 0;
|
||||
|
||||
@@ -1014,7 +1005,62 @@ schedule_ue_spec(module_id_t module_idP,slice_id_t slice_idP,
|
||||
|
||||
sdu_lengths[0] = mac_rlc_data_req(module_idP, rnti, module_idP, frameP, ENB_FLAG_YES, MBMS_FLAG_NO, DCCH,
|
||||
TBS, //not used
|
||||
(char *)&dlsch_buffer[0]);
|
||||
(char *)&dlsch_buffer[0]
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
,0, 0
|
||||
#endif
|
||||
);
|
||||
|
||||
pthread_mutex_lock(&rrc_release_freelist);
|
||||
if((rrc_release_info.num_UEs > 0) && (rlc_am_mui.rrc_mui_num > 0)){
|
||||
uint16_t release_total = 0;
|
||||
for(uint16_t release_num = 0;release_num < NUMBER_OF_UE_MAX;release_num++){
|
||||
if(rrc_release_info.RRC_release_ctrl[release_num].flag > 0){
|
||||
release_total++;
|
||||
}else{
|
||||
continue;
|
||||
}
|
||||
|
||||
if(rrc_release_info.RRC_release_ctrl[release_num].flag == 1){
|
||||
if(rrc_release_info.RRC_release_ctrl[release_num].rnti == rnti){
|
||||
for(uint16_t mui_num = 0;mui_num < rlc_am_mui.rrc_mui_num;mui_num++){
|
||||
if(rrc_release_info.RRC_release_ctrl[release_num].rrc_eNB_mui == rlc_am_mui.rrc_mui[mui_num]){
|
||||
rrc_release_info.RRC_release_ctrl[release_num].flag = 3;
|
||||
LOG_D(MAC,"DLSCH Release send:index %d rnti %x mui %d mui_num %d flag 1->3\n",release_num,rnti,rlc_am_mui.rrc_mui[mui_num],mui_num);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if(rrc_release_info.RRC_release_ctrl[release_num].flag == 2){
|
||||
if(rrc_release_info.RRC_release_ctrl[release_num].rnti == rnti){
|
||||
for(uint16_t mui_num = 0;mui_num < rlc_am_mui.rrc_mui_num;mui_num++){
|
||||
if(rrc_release_info.RRC_release_ctrl[release_num].rrc_eNB_mui == rlc_am_mui.rrc_mui[mui_num]){
|
||||
rrc_release_info.RRC_release_ctrl[release_num].flag = 4;
|
||||
LOG_D(MAC,"DLSCH Release send:index %d rnti %x mui %d mui_num %d flag 2->4\n",release_num,rnti,rlc_am_mui.rrc_mui[mui_num],mui_num);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if(release_total >= rrc_release_info.num_UEs)
|
||||
break;
|
||||
}
|
||||
}
|
||||
pthread_mutex_unlock(&rrc_release_freelist);
|
||||
|
||||
RA_t *ra = &eNB->common_channels[CC_id].ra[0];
|
||||
for (uint8_t ra_ii = 0; ra_ii < NB_RA_PROC_MAX; ra_ii++) {
|
||||
if((ra[ra_ii].rnti == rnti) && (ra[ra_ii].state == MSGCRNTI)){
|
||||
for(uint16_t mui_num = 0;mui_num < rlc_am_mui.rrc_mui_num;mui_num++){
|
||||
if(ra[ra_ii].crnti_rrc_mui == rlc_am_mui.rrc_mui[mui_num]){
|
||||
ra[ra_ii].crnti_harq_pid = harq_pid;
|
||||
ra[ra_ii].state = MSGCRNTI_ACK;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
T(T_ENB_MAC_UE_DL_SDU, T_INT(module_idP),
|
||||
T_INT(CC_id), T_INT(rnti), T_INT(frameP),
|
||||
@@ -1053,7 +1099,11 @@ schedule_ue_spec(module_id_t module_idP,slice_id_t slice_idP,
|
||||
// RLC data on DCCH1
|
||||
if (TBS - ta_len - header_length_total - sdu_length_total - 3 > 0) {
|
||||
rlc_status = mac_rlc_status_ind(module_idP, rnti, module_idP, frameP, subframeP, ENB_FLAG_YES, MBMS_FLAG_NO, DCCH + 1,
|
||||
TBS - ta_len - header_length_total - sdu_length_total - 3);
|
||||
TBS - ta_len - header_length_total - sdu_length_total - 3
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
,0, 0
|
||||
#endif
|
||||
);
|
||||
|
||||
// DCCH SDU
|
||||
sdu_lengths[num_sdus] = 0;
|
||||
@@ -1065,7 +1115,11 @@ schedule_ue_spec(module_id_t module_idP,slice_id_t slice_idP,
|
||||
|
||||
sdu_lengths[num_sdus] += mac_rlc_data_req(module_idP, rnti, module_idP, frameP, ENB_FLAG_YES, MBMS_FLAG_NO, DCCH + 1,
|
||||
TBS, //not used
|
||||
(char *)&dlsch_buffer[sdu_length_total]);
|
||||
(char *)&dlsch_buffer[sdu_length_total]
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
,0, 0
|
||||
#endif
|
||||
);
|
||||
|
||||
T(T_ENB_MAC_UE_DL_SDU, T_INT(module_idP),
|
||||
T_INT(CC_id), T_INT(rnti), T_INT(frameP),
|
||||
@@ -1095,6 +1149,7 @@ schedule_ue_spec(module_id_t module_idP,slice_id_t slice_idP,
|
||||
|
||||
LOG_T(MAC, "\n");
|
||||
#endif
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1115,7 +1170,11 @@ schedule_ue_spec(module_id_t module_idP,slice_id_t slice_idP,
|
||||
ENB_FLAG_YES,
|
||||
MBMS_FLAG_NO,
|
||||
lcid,
|
||||
TBS - ta_len - header_length_total - sdu_length_total - 3);
|
||||
TBS - ta_len - header_length_total - sdu_length_total - 3
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
,0, 0
|
||||
#endif
|
||||
);
|
||||
|
||||
|
||||
|
||||
@@ -1129,7 +1188,11 @@ schedule_ue_spec(module_id_t module_idP,slice_id_t slice_idP,
|
||||
|
||||
sdu_lengths[num_sdus] = mac_rlc_data_req(module_idP, rnti, module_idP, frameP, ENB_FLAG_YES, MBMS_FLAG_NO, lcid,
|
||||
TBS, //not used
|
||||
(char *)&dlsch_buffer[sdu_length_total]);
|
||||
(char *)&dlsch_buffer[sdu_length_total]
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
,0, 0
|
||||
#endif
|
||||
);
|
||||
|
||||
T(T_ENB_MAC_UE_DL_SDU, T_INT(module_idP),
|
||||
T_INT(CC_id), T_INT(rnti), T_INT(frameP),
|
||||
@@ -1290,12 +1353,6 @@ schedule_ue_spec(module_id_t module_idP,slice_id_t slice_idP,
|
||||
dlsch_buffer, sdu_length_total);
|
||||
// memcpy(RC.mac[0].DLSCH_pdu[0][0].payload[0][offset],dcch_buffer,sdu_lengths[0]);
|
||||
|
||||
#if 0
|
||||
// fill remainder of DLSCH with random data
|
||||
for (j = 0; j < (TBS - sdu_length_total - offset); j++) {
|
||||
UE_list->DLSCH_pdu[CC_id][0][UE_id].payload[0][offset + sdu_length_total + j] = (char) (taus() & 0xff);
|
||||
}
|
||||
#endif
|
||||
// fill remainder of DLSCH with 0
|
||||
for (j = 0; j < (TBS - sdu_length_total - offset); j++) {
|
||||
UE_list->DLSCH_pdu[CC_id][0][UE_id].payload[0][offset + sdu_length_total + j] = 0;
|
||||
@@ -1342,18 +1399,18 @@ schedule_ue_spec(module_id_t module_idP,slice_id_t slice_idP,
|
||||
if (cc[CC_id].tdd_Config != NULL) { // TDD
|
||||
UE_list->UE_template[CC_id][UE_id].DAI++;
|
||||
update_ul_dci(module_idP, CC_id, rnti,
|
||||
UE_list->UE_template[CC_id][UE_id].
|
||||
DAI);
|
||||
UE_list->UE_template[CC_id][UE_id].DAI,
|
||||
subframeP);
|
||||
}
|
||||
|
||||
// do PUCCH power control
|
||||
// this is the normalized RX power
|
||||
eNB_UE_stats = &UE_list->eNB_UE_stats[CC_id][UE_id];
|
||||
|
||||
/* TODO: fix how we deal with power, unit is not dBm, it's special from nfapi */
|
||||
normalized_rx_power = ue_sched_ctl->pucch1_snr[CC_id];
|
||||
target_rx_power = 208;
|
||||
|
||||
/* unit is not dBm, it's special from nfapi */
|
||||
// converting to dBm: ToDo: Noise power hard coded to 30
|
||||
normalized_rx_power = (5*ue_sched_ctl->pucch1_snr[CC_id]-640)/10+30;
|
||||
target_rx_power= eNB->puCch10xSnr/10 + 30;
|
||||
// this assumes accumulated tpc
|
||||
// make sure that we are only sending a tpc update once a frame, otherwise the control loop will freak out
|
||||
int32_t framex10psubframe = UE_list->UE_template[CC_id][UE_id].pucch_tpc_tx_frame * 10 + UE_list->UE_template[CC_id][UE_id].pucch_tpc_tx_subframe;
|
||||
@@ -1501,7 +1558,6 @@ schedule_ue_spec(module_id_t module_idP,slice_id_t slice_idP,
|
||||
} // CC_id loop
|
||||
|
||||
|
||||
|
||||
fill_DLSCH_dci(module_idP, frameP, subframeP, mbsfn_flag);
|
||||
|
||||
stop_meas(&eNB->schedule_dlsch);
|
||||
@@ -1558,8 +1614,7 @@ fill_DLSCH_dci(module_id_t module_idP,
|
||||
// clear scheduling flag
|
||||
eNB_dlsch_info[module_idP][CC_id][UE_id].status = S_DL_WAITING;
|
||||
rnti = UE_RNTI(module_idP, UE_id);
|
||||
if (cc->tdd_Config) harq_pid = ((frameP * 10) + subframeP) % 10;
|
||||
else harq_pid = ((frameP * 10) + subframeP) & 7;
|
||||
harq_pid = frame_subframe2_dl_harq_pid(cc->tdd_Config,frameP ,subframeP);
|
||||
nb_rb = UE_list->UE_template[CC_id][UE_id].nb_rb[harq_pid];
|
||||
|
||||
/// Synchronizing rballoc with rballoc_sub
|
||||
@@ -1638,12 +1693,12 @@ unsigned char *get_dlsch_sdu(module_id_t module_idP,
|
||||
//------------------------------------------------------------------------------
|
||||
void
|
||||
update_ul_dci(module_id_t module_idP,
|
||||
uint8_t CC_idP, rnti_t rntiP, uint8_t daiP)
|
||||
uint8_t CC_idP, rnti_t rntiP, uint8_t daiP, sub_frame_t subframe)
|
||||
//------------------------------------------------------------------------------
|
||||
{
|
||||
|
||||
nfapi_hi_dci0_request_t *HI_DCI0_req =
|
||||
&RC.mac[module_idP]->HI_DCI0_req[CC_idP];
|
||||
&RC.mac[module_idP]->HI_DCI0_req[CC_idP][subframe];
|
||||
nfapi_hi_dci0_request_pdu_t *hi_dci0_pdu =
|
||||
&HI_DCI0_req->hi_dci0_request_body.hi_dci0_pdu_list[0];
|
||||
COMMON_channels_t *cc = &RC.mac[module_idP]->common_channels[CC_idP];
|
||||
@@ -1652,7 +1707,7 @@ update_ul_dci(module_id_t module_idP,
|
||||
|
||||
if (cc->tdd_Config != NULL) { // TDD
|
||||
for (i = 0;
|
||||
i <HI_DCI0_req->hi_dci0_request_body.number_of_dci + HI_DCI0_req->hi_dci0_request_body.number_of_dci;
|
||||
i <HI_DCI0_req->hi_dci0_request_body.number_of_dci + HI_DCI0_req->hi_dci0_request_body.number_of_hi;
|
||||
i++) {
|
||||
|
||||
if ((hi_dci0_pdu[i].pdu_type == NFAPI_HI_DCI0_DCI_PDU_TYPE) &&
|
||||
@@ -1726,7 +1781,7 @@ set_ue_dai(sub_frame_t subframeP,
|
||||
|
||||
default:
|
||||
UE_list->UE_template[CC_id][UE_id].DAI = 0;
|
||||
LOG_N(MAC, "unknow TDD config %d\n", tdd_config);
|
||||
LOG_I(MAC, "unknow TDD config %d\n", tdd_config);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -1791,21 +1846,9 @@ void schedule_PCH(module_id_t module_idP,frame_t frameP,sub_frame_t subframeP)
|
||||
LOG_D(MAC,"[eNB %d] Frame %d subframe %d: PCCH->PCH CC_id %d UE_id %d, Received %d bytes \n", module_idP, frameP, subframeP, CC_id,i, pcch_sdu_length);
|
||||
#ifdef FORMAT1C
|
||||
//NO SIB
|
||||
if ((subframeP == 1 || subframeP == 2 || subframeP == 4 || subframeP == 6 || subframeP == 9) ||
|
||||
if ((subframeP == 0 || subframeP == 1 || subframeP == 2 || subframeP == 4 || subframeP == 6 || subframeP == 9) ||
|
||||
(subframeP == 5 && ((frameP % 2) != 0 && (frameP % 8) != 1))) {
|
||||
switch (n_rb_dl) {
|
||||
#if 0
|
||||
case 6:
|
||||
n_gap = n_rb_dl/2; /* expect: 3 */
|
||||
n_vrb_dl = 2*((n_gap < (n_rb_dl - n_gap)) ? n_gap : (n_rb_dl - n_gap));; /* expect: 6 */
|
||||
first_rb = 0;
|
||||
break;
|
||||
case 15:
|
||||
n_gap = GAP_MAP[2][0]; /* expect: 8 */
|
||||
n_vrb_dl = 2*((n_gap < (n_rb_dl - n_gap)) ? n_gap : (n_rb_dl - n_gap)); /* expect: 14 */
|
||||
first_rb = 6;
|
||||
break;
|
||||
#endif
|
||||
case 25:
|
||||
n_gap = GAP_MAP[3][0]; /* expect: 12 */
|
||||
n_vrb_dl = 2*((n_gap < (n_rb_dl - n_gap)) ? n_gap : (n_rb_dl - n_gap)); /* expect: 24 */
|
||||
@@ -1832,18 +1875,6 @@ void schedule_PCH(module_id_t module_idP,frame_t frameP,sub_frame_t subframeP)
|
||||
}
|
||||
} else if (subframeP == 5 && ((frameP % 2) == 0 || (frameP % 8) == 1)) { // SIB + paging
|
||||
switch (n_rb_dl) {
|
||||
#if 0
|
||||
case 6:
|
||||
n_gap = n_rb_dl/2; /* expect: 3 */
|
||||
n_vrb_dl = 2*((n_gap < (n_rb_dl - n_gap)) ? n_gap : (n_rb_dl - n_gap));; /* expect: 6 */
|
||||
first_rb = 0;
|
||||
break;
|
||||
case 15:
|
||||
n_gap = GAP_MAP[2][0]; /* expect: 8 */
|
||||
n_vrb_dl = 2*((n_gap < (n_rb_dl - n_gap)) ? n_gap : (n_rb_dl - n_gap)); /* expect: 14 */
|
||||
first_rb = 10;
|
||||
break;
|
||||
#endif
|
||||
case 25:
|
||||
n_gap = GAP_MAP[3][0]; /* expect: 12 */
|
||||
n_vrb_dl = 2*((n_gap < (n_rb_dl - n_gap)) ? n_gap : (n_rb_dl - n_gap)); /* expect: 24 */
|
||||
@@ -1910,7 +1941,7 @@ void schedule_PCH(module_id_t module_idP,frame_t frameP,sub_frame_t subframeP)
|
||||
}
|
||||
#else
|
||||
//NO SIB
|
||||
if ((subframeP == 1 || subframeP == 2 || subframeP == 4 || subframeP == 6 || subframeP == 9) ||
|
||||
if ((subframeP == 0 || subframeP == 1 || subframeP == 2 || subframeP == 4 || subframeP == 6 || subframeP == 9) ||
|
||||
(subframeP == 5 && ((frameP % 2) != 0 && (frameP % 8) != 1))) {
|
||||
switch (n_rb_dl) {
|
||||
case 25:
|
||||
@@ -1988,16 +2019,24 @@ void schedule_PCH(module_id_t module_idP,frame_t frameP,sub_frame_t subframeP)
|
||||
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.mcs_1 = mcs;
|
||||
|
||||
// Rel10 fields
|
||||
#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel10.pdsch_start = 3;
|
||||
#endif
|
||||
// Rel13 fields
|
||||
#if (RRC_VERSION >= MAKE_VERSION(13, 0, 0))
|
||||
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel13.ue_type = 0; // regular UE
|
||||
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel13.pdsch_payload_type = 2; // not BR
|
||||
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel13.initial_transmission_sf_io = 0xFFFF;
|
||||
#endif
|
||||
|
||||
if (!CCE_allocation_infeasible(module_idP, CC_id, 0, subframeP, dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.aggregation_level, P_RNTI)) {
|
||||
LOG_D(MAC,"Frame %d: Subframe %d : Adding common DCI for P_RNTI\n", frameP,subframeP);
|
||||
dl_req->number_dci++;
|
||||
dl_req->number_pdu++;
|
||||
dl_req->tl.tag = NFAPI_DL_CONFIG_REQUEST_BODY_TAG;
|
||||
eNB->DL_req[CC_id].sfn_sf = frameP<<4 | subframeP;
|
||||
eNB->DL_req[CC_id].header.message_id = NFAPI_DL_CONFIG_REQUEST;
|
||||
|
||||
dl_config_pdu = &dl_req->dl_config_pdu_list[dl_req->number_pdu];
|
||||
memset((void*)dl_config_pdu,0,sizeof(nfapi_dl_config_request_pdu_t));
|
||||
dl_config_pdu->pdu_type = NFAPI_DL_CONFIG_DLSCH_PDU_TYPE;
|
||||
@@ -2038,6 +2077,7 @@ void schedule_PCH(module_id_t module_idP,frame_t frameP,sub_frame_t subframeP)
|
||||
TX_req->num_segments = 1;
|
||||
TX_req->segments[0].segment_length = pcch_sdu_length;
|
||||
TX_req->segments[0].segment_data = cc[CC_id].PCCH_pdu.payload;
|
||||
eNB->TX_req[CC_id].tx_request_body.tl.tag = NFAPI_TX_REQUEST_BODY_TAG;
|
||||
eNB->TX_req[CC_id].tx_request_body.number_of_pdus++;
|
||||
} else {
|
||||
LOG_E(MAC,"[eNB %d] CCid %d Frame %d, subframe %d : Cannot add DCI 1A/1C for Paging\n",module_idP, CC_id, frameP, subframeP);
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,131 @@
|
||||
/*
|
||||
* 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 eNB_scheduler_fairRR.h
|
||||
* \brief eNB scheduler fair round robin header
|
||||
* \author Masayuki Harada
|
||||
* \date 2018
|
||||
* \email masayuki.harada@jp.fujitsu.com
|
||||
* \version 1.0
|
||||
* @ingroup _mac
|
||||
*/
|
||||
|
||||
|
||||
#ifndef __LAYER2_MAC_ENB_SCHEDULER_FAIRRR_H__
|
||||
#define __LAYER2_MAC_ENB_SCHEDULER_FAIRRR_H__
|
||||
|
||||
/* define */
|
||||
enum SCH_UE_PRIORITY {
|
||||
SCH_PRIORITY_NONE,
|
||||
SCH_DL_SI,
|
||||
SCH_DL_PAGING,
|
||||
SCH_DL_MSG2,
|
||||
SCH_DL_MSG4,
|
||||
SCH_UL_PRACH,
|
||||
SCH_UL_MSG3,
|
||||
SCH_DL_RETRANS,
|
||||
SCH_UL_RETRANS,
|
||||
SCH_DL_FIRST,
|
||||
SCH_UL_FIRST,
|
||||
SCH_UL_INACTIVE
|
||||
};
|
||||
|
||||
typedef struct {
|
||||
int UE_id;
|
||||
enum SCH_UE_PRIORITY ue_priority;
|
||||
rnti_t rnti;
|
||||
uint16_t nb_rb;
|
||||
} DLSCH_UE_INFO;
|
||||
|
||||
typedef struct {
|
||||
uint16_t ue_num;
|
||||
DLSCH_UE_INFO list[20];
|
||||
} DLSCH_UE_SELECT;
|
||||
|
||||
typedef struct {
|
||||
int UE_id;
|
||||
enum SCH_UE_PRIORITY ue_priority;
|
||||
uint8_t start_rb;
|
||||
uint8_t nb_rb;
|
||||
uint16_t ul_total_buffer;
|
||||
} ULSCH_UE_INFO;
|
||||
|
||||
typedef struct {
|
||||
uint8_t ue_num;
|
||||
ULSCH_UE_INFO list[20];
|
||||
} ULSCH_UE_SELECT;
|
||||
|
||||
/* proto */
|
||||
void set_dl_ue_select_msg2(int CC_idP, uint16_t nb_rb, int UE_id, rnti_t rnti);
|
||||
void set_dl_ue_select_msg4(int CC_idP, uint16_t nb_rb, int UE_id, rnti_t rnti);
|
||||
|
||||
void dlsch_scheduler_pre_ue_select_fairRR(
|
||||
module_id_t module_idP,
|
||||
frame_t frameP,
|
||||
sub_frame_t subframeP,
|
||||
int* mbsfn_flag,
|
||||
uint16_t nb_rbs_required[MAX_NUM_CCs][NUMBER_OF_UE_MAX],
|
||||
DLSCH_UE_SELECT dlsch_ue_select[MAX_NUM_CCs]);
|
||||
|
||||
void dlsch_scheduler_pre_processor_fairRR (module_id_t Mod_id,
|
||||
frame_t frameP,
|
||||
sub_frame_t subframeP,
|
||||
int N_RBG[MAX_NUM_CCs],
|
||||
int *mbsfn_flag);
|
||||
|
||||
void fill_DLSCH_dci_fairRR(
|
||||
module_id_t module_idP,
|
||||
frame_t frameP,
|
||||
sub_frame_t subframeP,
|
||||
int* mbsfn_flagP);
|
||||
|
||||
void schedule_ue_spec_fairRR(module_id_t module_idP,
|
||||
frame_t frameP, sub_frame_t subframeP, int *mbsfn_flag);
|
||||
|
||||
void ulsch_scheduler_pre_ue_select_fairRR(
|
||||
module_id_t module_idP,
|
||||
frame_t frameP,
|
||||
sub_frame_t subframeP,
|
||||
sub_frame_t sched_subframeP,
|
||||
ULSCH_UE_SELECT ulsch_ue_select[MAX_NUM_CCs]);
|
||||
|
||||
void ulsch_scheduler_pre_processor_fairRR(module_id_t module_idP,
|
||||
frame_t frameP,
|
||||
sub_frame_t subframeP,
|
||||
sub_frame_t sched_subframeP,
|
||||
ULSCH_UE_SELECT ulsch_ue_select[MAX_NUM_CCs]);
|
||||
|
||||
void schedule_ulsch_fairRR(module_id_t module_idP, frame_t frameP,
|
||||
sub_frame_t subframeP);
|
||||
|
||||
void schedule_ulsch_rnti_fairRR(module_id_t module_idP,
|
||||
frame_t frameP,
|
||||
sub_frame_t subframeP,
|
||||
unsigned char sched_subframeP,
|
||||
ULSCH_UE_SELECT ulsch_ue_select[MAX_NUM_CCs]);
|
||||
|
||||
|
||||
/* extern */
|
||||
extern DLSCH_UE_SELECT dlsch_ue_select[MAX_NUM_CCs];
|
||||
extern int last_dlsch_ue_id[MAX_NUM_CCs];
|
||||
extern int last_ulsch_ue_id[MAX_NUM_CCs];
|
||||
|
||||
#endif
|
||||
@@ -33,11 +33,12 @@
|
||||
#include "LAYER2/MAC/mac.h"
|
||||
#include "LAYER2/MAC/mac_proto.h"
|
||||
#include "LAYER2/MAC/mac_extern.h"
|
||||
#include "UTIL/LOG/log.h"
|
||||
#include "UTIL/LOG/vcd_signal_dumper.h"
|
||||
#include "common/utils/LOG/log.h"
|
||||
#include "common/utils/LOG/vcd_signal_dumper.h"
|
||||
#include "UTIL/OPT/opt.h"
|
||||
#include "OCG.h"
|
||||
#include "OCG_extern.h"
|
||||
#include "PHY/LTE_TRANSPORT/transport_common_proto.h"
|
||||
|
||||
#include "RRC/LTE/rrc_extern.h"
|
||||
#include "RRC/L2_INTERFACE/openair_rrc_L2_interface.h"
|
||||
@@ -58,7 +59,7 @@
|
||||
|
||||
extern RAN_CONTEXT_t RC;
|
||||
|
||||
#if defined(Rel10) || defined(Rel14)
|
||||
#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
int8_t
|
||||
get_mbsfn_sf_alloction(module_id_t module_idP, uint8_t CC_id,
|
||||
uint8_t mbsfn_sync_area)
|
||||
@@ -584,7 +585,7 @@ schedule_MBMS(module_id_t module_idP, uint8_t CC_id, frame_t frameP,
|
||||
|
||||
TBS =
|
||||
get_TBS_DL(cc->MCH_pdu.mcs, to_prb(cc->mib->message.dl_Bandwidth));
|
||||
#if defined(Rel10) || defined(Rel14)
|
||||
#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
// do not let mcch and mtch multiplexing when relaying is active
|
||||
// for sync area 1, so not transmit data
|
||||
//if ((i == 0) && ((RC.mac[module_idP]->MBMS_flag != multicast_relay) || (RC.mac[module_idP]->mcch_active==0))) {
|
||||
@@ -631,7 +632,12 @@ schedule_MBMS(module_id_t module_idP, uint8_t CC_id, frame_t frameP,
|
||||
module_idP, ENB_FLAG_YES, MBMS_FLAG_YES,
|
||||
MTCH,
|
||||
TBS - header_len_mcch - header_len_msi -
|
||||
sdu_length_total - header_len_mtch);
|
||||
sdu_length_total - header_len_mtch
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
,0, 0
|
||||
#endif
|
||||
);
|
||||
|
||||
LOG_D(MAC,
|
||||
"e-MBMS log channel %u frameP %d, subframeP %d, rlc_status.bytes_in_buffer is %d\n",
|
||||
MTCH, frameP, subframeP, rlc_status.bytes_in_buffer);
|
||||
@@ -645,8 +651,14 @@ schedule_MBMS(module_id_t module_idP, uint8_t CC_id, frame_t frameP,
|
||||
|
||||
sdu_lengths[num_sdus] = mac_rlc_data_req(module_idP, 0, module_idP, frameP, ENB_FLAG_YES, MBMS_FLAG_YES, MTCH, 0, //not used
|
||||
(char *)
|
||||
&mch_buffer
|
||||
[sdu_length_total]);
|
||||
&mch_buffer[sdu_length_total]
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
,0,
|
||||
0
|
||||
#endif
|
||||
);
|
||||
|
||||
|
||||
//sdu_lengths[num_sdus] = mac_rlc_data_req(module_idP,frameP, MBMS_FLAG_NO, MTCH+(MAX_NUM_RB*(MAX_MOBILES_PER_ENB+1)), (char*)&mch_buffer[sdu_length_total]);
|
||||
LOG_I(MAC,
|
||||
"[eNB %d][MBMS USER-PLANE] CC_id %d Got %d bytes for MTCH %d\n",
|
||||
@@ -664,7 +676,7 @@ schedule_MBMS(module_id_t module_idP, uint8_t CC_id, frame_t frameP,
|
||||
header_len_mtch = 0;
|
||||
}
|
||||
}
|
||||
#if defined(Rel10) || defined(Rel14)
|
||||
#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
// }
|
||||
#endif
|
||||
|
||||
|
||||
@@ -32,14 +32,15 @@
|
||||
#include "assertions.h"
|
||||
#include "PHY/defs_eNB.h"
|
||||
#include "PHY/phy_extern.h"
|
||||
#include "PHY/LTE_TRANSPORT/transport_common_proto.h"
|
||||
|
||||
#include "SCHED/sched_eNB.h"
|
||||
|
||||
#include "LAYER2/MAC/mac.h"
|
||||
#include "LAYER2/MAC/mac_proto.h"
|
||||
#include "LAYER2/MAC/mac_extern.h"
|
||||
#include "UTIL/LOG/log.h"
|
||||
#include "UTIL/LOG/vcd_signal_dumper.h"
|
||||
#include "common/utils/LOG/log.h"
|
||||
#include "common/utils/LOG/vcd_signal_dumper.h"
|
||||
#include "UTIL/OPT/opt.h"
|
||||
#include "OCG.h"
|
||||
#include "OCG_extern.h"
|
||||
@@ -66,13 +67,13 @@ schedule_ue_spec_phy_test(
|
||||
uint16_t TBS;
|
||||
uint16_t nb_rb;
|
||||
|
||||
unsigned char harq_pid = subframeP%5;
|
||||
unsigned char harq_pid = (frameP*10+subframeP)%8;
|
||||
uint16_t rnti = 0x1235;
|
||||
uint32_t rb_alloc = 0x1FFFFFFF;
|
||||
uint32_t rb_alloc = 0x1FFFFF;
|
||||
int32_t tpc = 1;
|
||||
int32_t mcs = 28;
|
||||
int32_t cqi = 15;
|
||||
int32_t ndi = subframeP/5;
|
||||
int32_t ndi = (frameP*10+subframeP)/8;
|
||||
int32_t dai = 0;
|
||||
|
||||
eNB_MAC_INST *eNB = RC.mac[module_idP];
|
||||
@@ -91,10 +92,9 @@ schedule_ue_spec_phy_test(
|
||||
continue;
|
||||
|
||||
nb_rb = conv_nprb(0,rb_alloc,N_RB_DL);
|
||||
//printf("////////////////////////////////////*************************nb_rb = %d\n",nb_rb);
|
||||
TBS = get_TBS_DL(mcs,nb_rb);
|
||||
|
||||
LOG_D(PHY,"schedule_ue_spec_phy_test: subframe %d/%d: nb_rb=%d, TBS=%d, mcs=%d (rb_alloc=%x, N_RB_DL=%d)\n",frameP,subframeP,nb_rb,TBS,mcs,rb_alloc,N_RB_DL);
|
||||
LOG_D(MAC,"schedule_ue_spec_phy_test: subframe %d/%d: nb_rb=%d, TBS=%d, mcs=%d harq_pid=%d (rb_alloc=%x, N_RB_DL=%d) pdu_number = %d \n", frameP, subframeP, nb_rb, TBS, mcs, harq_pid, rb_alloc, N_RB_DL, dl_req->number_pdu);
|
||||
|
||||
dl_config_pdu = &dl_req->dl_config_pdu_list[dl_req->number_pdu];
|
||||
memset((void*)dl_config_pdu,0,sizeof(nfapi_dl_config_request_pdu_t));
|
||||
@@ -135,6 +135,8 @@ schedule_ue_spec_phy_test(
|
||||
//ue_sched_ctl->round[CC_id][harq_pid] = 0;
|
||||
dl_req->number_dci++;
|
||||
dl_req->number_pdu++;
|
||||
eNB->DL_req[CC_id].sfn_sf = frameP<<4 | subframeP;
|
||||
//eNB->DL_req[CC_id].header.message_id = NFAPI_DL_CONFIG_REQUEST;
|
||||
|
||||
// Toggle NDI for next time
|
||||
/*
|
||||
@@ -149,7 +151,6 @@ schedule_ue_spec_phy_test(
|
||||
AssertFatal(UE_list->UE_template[CC_id][UE_id].physicalConfigDedicated->pdsch_ConfigDedicated!=NULL,"physicalConfigDedicated->pdsch_ConfigDedicated is NULL\n");
|
||||
*/
|
||||
|
||||
|
||||
|
||||
fill_nfapi_dlsch_config(eNB,
|
||||
dl_req,
|
||||
@@ -195,32 +196,35 @@ void schedule_ulsch_phy_test(module_id_t module_idP,frame_t frameP,sub_frame_t s
|
||||
int UE_id = 0;
|
||||
uint8_t aggregation = 2;
|
||||
rnti_t rnti = 0x1235;
|
||||
uint8_t mcs = 0;
|
||||
uint8_t mcs = 20;
|
||||
uint8_t harq_pid = 0;
|
||||
uint32_t cqi_req = 0,cshift,ndi,tpc = 1;
|
||||
int32_t normalized_rx_power;
|
||||
int32_t target_rx_power= 178;
|
||||
int CC_id = 0;
|
||||
int nb_rb = 96;
|
||||
eNB_MAC_INST *eNB = RC.mac[module_idP];
|
||||
COMMON_channels_t *cc = eNB->common_channels;
|
||||
UE_list_t *UE_list=&eNB->UE_list;
|
||||
eNB_MAC_INST *mac = RC.mac[module_idP];
|
||||
COMMON_channels_t *cc = &mac->common_channels[0];
|
||||
UE_list_t *UE_list=&mac->UE_list;
|
||||
UE_TEMPLATE *UE_template;
|
||||
UE_sched_ctrl *UE_sched_ctrl;
|
||||
int sched_frame=frameP;
|
||||
int sched_subframe = (subframeP+4)%10;
|
||||
uint16_t ul_req_index;
|
||||
uint8_t dlsch_flag;
|
||||
|
||||
if (sched_subframe<subframeP) sched_frame++;
|
||||
|
||||
nfapi_hi_dci0_request_body_t *hi_dci0_req = &eNB->HI_DCI0_req[CC_id].hi_dci0_request_body;
|
||||
nfapi_hi_dci0_request_t *hi_dci0_req = &mac->HI_DCI0_req[CC_id][subframeP];
|
||||
nfapi_hi_dci0_request_body_t *hi_dci0_req_body = &hi_dci0_req->hi_dci0_request_body;
|
||||
nfapi_hi_dci0_request_pdu_t *hi_dci0_pdu;
|
||||
|
||||
//nfapi_ul_config_request_pdu_t *ul_config_pdu = &ul_req->ul_config_pdu_list[0];;
|
||||
nfapi_ul_config_request_body_t *ul_req = &eNB->UL_req[CC_id].ul_config_request_body;
|
||||
nfapi_ul_config_request_body_t *ul_req = &mac->UL_req[CC_id].ul_config_request_body;
|
||||
|
||||
|
||||
eNB->UL_req[CC_id].sfn_sf = (sched_frame<<4) + sched_subframe;
|
||||
eNB->HI_DCI0_req[CC_id].sfn_sf = (frameP<<4)+subframeP;
|
||||
mac->UL_req[CC_id].sfn_sf = (sched_frame<<4) + sched_subframe;
|
||||
hi_dci0_req->sfn_sf = (frameP << 4) + subframeP;
|
||||
|
||||
for (CC_id=0; CC_id<MAX_NUM_CCs; CC_id++) {
|
||||
//rnti = UE_RNTI(module_idP,UE_id);
|
||||
@@ -234,7 +238,6 @@ void schedule_ulsch_phy_test(module_id_t module_idP,frame_t frameP,sub_frame_t s
|
||||
UE_sched_ctrl = &UE_list->UE_sched_ctrl[UE_id];
|
||||
harq_pid = subframe2harqpid(&cc[CC_id],sched_frame,sched_subframe);
|
||||
|
||||
LOG_D(MAC,"Scheduling for frame %d, subframe %d => harq_pid %d\n",sched_frame,sched_subframe,harq_pid);
|
||||
|
||||
RC.eNB[module_idP][CC_id]->pusch_stats_BO[UE_id][(frameP*10)+subframeP] = UE_template->TBS_UL[harq_pid];
|
||||
|
||||
@@ -244,7 +247,7 @@ void schedule_ulsch_phy_test(module_id_t module_idP,frame_t frameP,sub_frame_t s
|
||||
//compute the expected ULSCH RX power (for the stats)
|
||||
|
||||
// this is the normalized RX power and this should be constant (regardless of mcs
|
||||
normalized_rx_power = UE_sched_ctrl->pusch_snr[CC_id];
|
||||
normalized_rx_power = (5*UE_sched_ctrl->pusch_snr[CC_id]-640)/10+30;
|
||||
|
||||
// new transmission
|
||||
|
||||
@@ -280,7 +283,7 @@ void schedule_ulsch_phy_test(module_id_t module_idP,frame_t frameP,sub_frame_t s
|
||||
// save it for a potential retransmission
|
||||
UE_template->cshift[harq_pid] = cshift;
|
||||
|
||||
hi_dci0_pdu = &hi_dci0_req->hi_dci0_pdu_list[eNB->HI_DCI0_req[CC_id].hi_dci0_request_body.number_of_dci+eNB->HI_DCI0_req[CC_id].hi_dci0_request_body.number_of_hi];
|
||||
hi_dci0_pdu = &hi_dci0_req_body->hi_dci0_pdu_list[hi_dci0_req_body->number_of_dci + hi_dci0_req_body->number_of_hi];
|
||||
memset((void*)hi_dci0_pdu,0,sizeof(nfapi_hi_dci0_request_pdu_t));
|
||||
hi_dci0_pdu->pdu_type = NFAPI_HI_DCI0_DCI_PDU_TYPE;
|
||||
hi_dci0_pdu->pdu_size = 2+sizeof(nfapi_hi_dci0_dci_pdu);
|
||||
@@ -297,18 +300,28 @@ void schedule_ulsch_phy_test(module_id_t module_idP,frame_t frameP,sub_frame_t s
|
||||
hi_dci0_pdu->dci_pdu.dci_pdu_rel8.tpc = tpc;
|
||||
hi_dci0_pdu->dci_pdu.dci_pdu_rel8.cqi_csi_request = cqi_req;
|
||||
hi_dci0_pdu->dci_pdu.dci_pdu_rel8.dl_assignment_index = UE_template->DAI_ul[sched_subframe];
|
||||
hi_dci0_pdu->dci_pdu.dci_pdu_rel8.harq_pid = harq_pid;
|
||||
|
||||
|
||||
hi_dci0_req_body->number_of_dci++;
|
||||
|
||||
eNB->HI_DCI0_req[CC_id].hi_dci0_request_body.number_of_dci++;
|
||||
|
||||
|
||||
ul_req_index = 0;
|
||||
dlsch_flag = 0;
|
||||
for(ul_req_index = 0;ul_req_index < ul_req->number_of_pdus;ul_req_index++){
|
||||
if(ul_req->ul_config_pdu_list[ul_req_index].pdu_type == NFAPI_UL_CONFIG_UCI_HARQ_PDU_TYPE){
|
||||
dlsch_flag = 1;
|
||||
LOG_D(MAC,"Frame %d, Subframe %d:rnti %x ul_req_index %d Switched UCI HARQ to ULSCH HARQ(first)\n",frameP,subframeP,rnti,ul_req_index);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// Add UL_config PDUs
|
||||
fill_nfapi_ulsch_config_request_rel8(&ul_req->ul_config_pdu_list[ul_req->number_of_pdus],
|
||||
fill_nfapi_ulsch_config_request_rel8(& ul_req->ul_config_pdu_list[ul_req_index],
|
||||
cqi_req,
|
||||
cc,
|
||||
0,//UE_template->physicalConfigDedicated,
|
||||
get_tmode(module_idP,CC_id,UE_id),
|
||||
eNB->ul_handle,
|
||||
mac->ul_handle,//eNB->ul_handle,
|
||||
rnti,
|
||||
first_rb[CC_id], // resource_block_start
|
||||
nb_rb, // number_of_resource_blocks
|
||||
@@ -324,9 +337,9 @@ void schedule_ulsch_phy_test(module_id_t module_idP,frame_t frameP,sub_frame_t s
|
||||
0, // n_srs
|
||||
get_TBS_UL(mcs,nb_rb)
|
||||
);
|
||||
#ifdef Rel14
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
if (UE_template->rach_resource_type>0) { // This is a BL/CE UE allocation
|
||||
fill_nfapi_ulsch_config_request_emtc(&ul_req->ul_config_pdu_list[ul_req->number_of_pdus],
|
||||
fill_nfapi_ulsch_config_request_emtc(&ul_req->ul_config_pdu_list[ul_req_index],
|
||||
UE_template->rach_resource_type>2 ? 2 : 1,
|
||||
1, //total_number_of_repetitions
|
||||
1, //repetition_number
|
||||
@@ -334,7 +347,7 @@ void schedule_ulsch_phy_test(module_id_t module_idP,frame_t frameP,sub_frame_t s
|
||||
}
|
||||
#endif
|
||||
ul_req->number_of_pdus = 1;
|
||||
eNB->ul_handle++;
|
||||
mac->ul_handle++;
|
||||
|
||||
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -36,11 +36,12 @@
|
||||
#include "LAYER2/MAC/mac.h"
|
||||
#include "LAYER2/MAC/mac_proto.h"
|
||||
#include "LAYER2/MAC/mac_extern.h"
|
||||
#include "UTIL/LOG/log.h"
|
||||
#include "UTIL/LOG/vcd_signal_dumper.h"
|
||||
#include "common/utils/LOG/log.h"
|
||||
#include "common/utils/LOG/vcd_signal_dumper.h"
|
||||
#include "UTIL/OPT/opt.h"
|
||||
#include "OCG.h"
|
||||
#include "OCG_extern.h"
|
||||
#include "PHY/LTE_TRANSPORT/transport_common_proto.h"
|
||||
|
||||
#include "RRC/LTE/rrc_extern.h"
|
||||
#include "RRC/L2_INTERFACE/openair_rrc_L2_interface.h"
|
||||
@@ -106,6 +107,7 @@ char *ul_scheduler_type[MAX_NUM_SLICES] = {"schedule_ulsch_rnti",
|
||||
"schedule_ulsch_rnti",
|
||||
"schedule_ulsch_rnti"
|
||||
};
|
||||
extern mui_t rrc_eNB_mui;
|
||||
|
||||
/* Slice Function Pointer */
|
||||
slice_scheduler_ul slice_sched_ul[MAX_NUM_SLICES] = {0};
|
||||
@@ -156,8 +158,8 @@ rx_sdu(const module_id_t enb_mod_idP,
|
||||
|
||||
if (UE_id != -1) {
|
||||
LOG_D(MAC,
|
||||
"[eNB %d][PUSCH %d] CC_id %d Received ULSCH sdu round %d from PHY (rnti %x, UE_id %d) ul_cqi %d\n",
|
||||
enb_mod_idP, harq_pid, CC_idP,
|
||||
"[eNB %d][PUSCH %d] CC_id %d %d.%d Received ULSCH sdu round %d from PHY (rnti %x, UE_id %d) ul_cqi %d\n",
|
||||
enb_mod_idP, harq_pid, CC_idP,frameP,subframeP,
|
||||
UE_list->UE_sched_ctrl[UE_id].round_UL[CC_idP][harq_pid],
|
||||
current_rnti, UE_id, ul_cqi);
|
||||
|
||||
@@ -189,12 +191,16 @@ rx_sdu(const module_id_t enb_mod_idP,
|
||||
if (UE_list->UE_template[CC_idP][UE_id].scheduled_ul_bytes < 0)
|
||||
UE_list->UE_template[CC_idP][UE_id].scheduled_ul_bytes = 0;
|
||||
} else { // we've got an error
|
||||
LOG_D(MAC,
|
||||
"[eNB %d][PUSCH %d] CC_id %d ULSCH in error in round %d, ul_cqi %d\n",
|
||||
enb_mod_idP, harq_pid, CC_idP,
|
||||
LOG_I(MAC,
|
||||
"[eNB %d][PUSCH %d] CC_id %d %d.%d ULSCH in error in round %d, ul_cqi %d\n",
|
||||
enb_mod_idP, harq_pid, CC_idP,frameP,subframeP,
|
||||
UE_list->UE_sched_ctrl[UE_id].round_UL[CC_idP][harq_pid],
|
||||
ul_cqi);
|
||||
|
||||
if(ul_cqi>200){ // too high energy pattern
|
||||
UE_list->UE_sched_ctrl[UE_id].pusch_snr[CC_idP] = ul_cqi;
|
||||
}
|
||||
|
||||
// AssertFatal(1==0,"ulsch in error\n");
|
||||
if (UE_list->UE_sched_ctrl[UE_id].round_UL[CC_idP][harq_pid] == 3) {
|
||||
UE_list->UE_sched_ctrl[UE_id].ul_scheduled &= (~(1 << harq_pid));
|
||||
@@ -206,6 +212,9 @@ rx_sdu(const module_id_t enb_mod_idP,
|
||||
UE_list->UE_template[CC_idP][UE_id].scheduled_ul_bytes -= UE_list->UE_template[CC_idP][UE_id].TBS_UL[harq_pid];
|
||||
if (UE_list->UE_template[CC_idP][UE_id].scheduled_ul_bytes < 0)
|
||||
UE_list->UE_template[CC_idP][UE_id].scheduled_ul_bytes = 0;
|
||||
|
||||
if (find_RA_id(enb_mod_idP, CC_idP, current_rnti) != -1)
|
||||
cancel_ra_proc(enb_mod_idP, CC_idP, frameP, current_rnti);
|
||||
} else
|
||||
UE_list->UE_sched_ctrl[UE_id].round_UL[CC_idP][harq_pid]++;
|
||||
|
||||
@@ -215,7 +224,9 @@ rx_sdu(const module_id_t enb_mod_idP,
|
||||
LOG_D(MAC,
|
||||
"Programming PHICH NACK for rnti %x harq_pid %d (first_rb %d)\n",
|
||||
current_rnti, harq_pid, first_rb);
|
||||
nfapi_hi_dci0_request_t *hi_dci0_req = &mac->HI_DCI0_req[CC_idP];
|
||||
nfapi_hi_dci0_request_t *hi_dci0_req;
|
||||
uint8_t sf_ahead_dl = ul_subframe2_k_phich(&mac->common_channels[CC_idP] , subframeP);
|
||||
hi_dci0_req = &mac->HI_DCI0_req[CC_idP][(subframeP+sf_ahead_dl)%10];
|
||||
nfapi_hi_dci0_request_body_t *hi_dci0_req_body = &hi_dci0_req->hi_dci0_request_body;
|
||||
nfapi_hi_dci0_request_pdu_t *hi_dci0_pdu =
|
||||
&hi_dci0_req_body->hi_dci0_pdu_list[hi_dci0_req_body->number_of_dci + hi_dci0_req_body->number_of_hi];
|
||||
@@ -229,7 +240,7 @@ rx_sdu(const module_id_t enb_mod_idP,
|
||||
hi_dci0_req_body->number_of_hi++;
|
||||
hi_dci0_req_body->sfnsf = sfnsf_add_subframe(frameP,subframeP, 0);
|
||||
hi_dci0_req_body->tl.tag = NFAPI_HI_DCI0_REQUEST_BODY_TAG;
|
||||
hi_dci0_req->sfn_sf = sfnsf_add_subframe(frameP,subframeP, 4);
|
||||
hi_dci0_req->sfn_sf = sfnsf_add_subframe(frameP,subframeP, sf_ahead_dl);
|
||||
hi_dci0_req->header.message_id = NFAPI_HI_DCI0_REQUEST;
|
||||
|
||||
return;
|
||||
@@ -259,7 +270,7 @@ rx_sdu(const module_id_t enb_mod_idP,
|
||||
(int) mac->common_channels[CC_idP].
|
||||
radioResourceConfigCommon->rach_ConfigCommon.
|
||||
maxHARQ_Msg3Tx);
|
||||
if (ra[RA_id].msg3_round == mac->common_channels[CC_idP].radioResourceConfigCommon->rach_ConfigCommon.maxHARQ_Msg3Tx - 1) {
|
||||
if (ra[RA_id].msg3_round >= mac->common_channels[CC_idP].radioResourceConfigCommon->rach_ConfigCommon.maxHARQ_Msg3Tx - 1) {
|
||||
cancel_ra_proc(enb_mod_idP, CC_idP, frameP, current_rnti);
|
||||
}
|
||||
|
||||
@@ -267,8 +278,9 @@ rx_sdu(const module_id_t enb_mod_idP,
|
||||
first_rb = UE_list->UE_template[CC_idP][UE_id].first_rb_ul[harq_pid];
|
||||
ra[RA_id].msg3_round++;
|
||||
// prepare handling of retransmission
|
||||
ra[RA_id].Msg3_frame = (ra[RA_id].Msg3_frame + ((ra[RA_id].Msg3_subframe > 1) ? 1 : 0)) % 1024;
|
||||
ra[RA_id].Msg3_subframe = (ra[RA_id].Msg3_subframe + 8) % 10;
|
||||
get_Msg3allocret(&mac->common_channels[CC_idP],
|
||||
ra[RA_id].Msg3_subframe, ra[RA_id].Msg3_frame,
|
||||
&ra[RA_id].Msg3_frame, &ra[RA_id].Msg3_subframe);
|
||||
add_msg3(enb_mod_idP, CC_idP, &ra[RA_id], frameP, subframeP);
|
||||
}
|
||||
|
||||
@@ -284,6 +296,12 @@ rx_sdu(const module_id_t enb_mod_idP,
|
||||
}
|
||||
payload_ptr = parse_ulsch_header(sduP, &num_ce, &num_sdu, rx_ces, rx_lcids, rx_lengths, sdu_lenP);
|
||||
|
||||
if(payload_ptr == NULL){
|
||||
LOG_E(MAC,"[eNB %d][PUSCH %d] CC_id %d ulsch header unknown lcid(rnti %x, UE_id %d)\n",
|
||||
enb_mod_idP, harq_pid, CC_idP,current_rnti, UE_id);
|
||||
return;
|
||||
}
|
||||
|
||||
T(T_ENB_MAC_UE_UL_PDU, T_INT(enb_mod_idP), T_INT(CC_idP),
|
||||
T_INT(current_rnti), T_INT(frameP), T_INT(subframeP),
|
||||
T_INT(harq_pid), T_INT(sdu_lenP), T_INT(num_ce), T_INT(num_sdu));
|
||||
@@ -331,8 +349,8 @@ rx_sdu(const module_id_t enb_mod_idP,
|
||||
enb_mod_idP, frameP, subframeP, CC_idP, rx_ces[i], i,
|
||||
num_ce, old_rnti, old_UE_id);
|
||||
/* receiving CRNTI means that the current rnti has to go away */
|
||||
cancel_ra_proc(enb_mod_idP, CC_idP, frameP,
|
||||
current_rnti);
|
||||
//cancel_ra_proc(enb_mod_idP, CC_idP, frameP,
|
||||
// current_rnti);
|
||||
if (old_UE_id != -1) {
|
||||
/* TODO: if the UE did random access (followed by a MAC uplink with
|
||||
* CRNTI) because none of its scheduling request was granted, then
|
||||
@@ -345,16 +363,45 @@ rx_sdu(const module_id_t enb_mod_idP,
|
||||
* We have to take care of this. As the code is, nothing is done and
|
||||
* the UE state in the eNB is wrong.
|
||||
*/
|
||||
UE_id = old_UE_id;
|
||||
UE_list->UE_sched_ctrl[UE_id].ul_inactivity_timer = 0;
|
||||
UE_list->UE_sched_ctrl[UE_id].ul_failure_timer = 0;
|
||||
if (UE_list->UE_sched_ctrl[UE_id].ul_out_of_sync > 0) {
|
||||
UE_list->UE_sched_ctrl[UE_id].ul_out_of_sync = 0;
|
||||
mac_eNB_rrc_ul_in_sync(enb_mod_idP, CC_idP, frameP,
|
||||
subframeP, old_rnti);
|
||||
}
|
||||
current_rnti = old_rnti;
|
||||
}
|
||||
for (ii = 0; ii < NB_RA_PROC_MAX; ii++) {
|
||||
ra = &mac->common_channels[CC_idP].ra[ii];
|
||||
if ((ra->rnti == current_rnti) && (ra->state != IDLE)) {
|
||||
mac_rrc_data_ind(enb_mod_idP,
|
||||
CC_idP,
|
||||
frameP, subframeP,
|
||||
old_rnti,
|
||||
DCCH,
|
||||
(uint8_t *) payload_ptr,
|
||||
rx_lengths[i],
|
||||
0);
|
||||
// prepare transmission of Msg4(RRCConnectionReconfiguration)
|
||||
ra->state = MSGCRNTI;
|
||||
LOG_I(MAC,
|
||||
"[eNB %d] Frame %d, Subframe %d CC_id %d : (rnti %x UE_id %d) RRCConnectionReconfiguration(Msg4)\n",
|
||||
enb_mod_idP, frameP, subframeP, CC_idP, old_rnti, old_UE_id);
|
||||
|
||||
UE_id = old_UE_id;
|
||||
current_rnti = old_rnti;
|
||||
ra->rnti = old_rnti;
|
||||
ra->crnti_rrc_mui = rrc_eNB_mui-1;
|
||||
ra->crnti_harq_pid = -1;
|
||||
//clear timer
|
||||
UE_list->UE_sched_ctrl[UE_id].uplane_inactivity_timer = 0;
|
||||
UE_list->UE_sched_ctrl[UE_id].ul_inactivity_timer = 0;
|
||||
UE_list->UE_sched_ctrl[UE_id].ul_failure_timer = 0;
|
||||
if (UE_list->UE_sched_ctrl[UE_id].ul_out_of_sync > 0) {
|
||||
UE_list->UE_sched_ctrl[UE_id].ul_out_of_sync = 0;
|
||||
mac_eNB_rrc_ul_in_sync(enb_mod_idP, CC_idP, frameP,
|
||||
subframeP, old_rnti);
|
||||
}
|
||||
UE_list->UE_template[CC_idP][UE_id].ul_SR = 1;
|
||||
UE_list->UE_sched_ctrl[UE_id].crnti_reconfigurationcomplete_flag = 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
cancel_ra_proc(enb_mod_idP, CC_idP, frameP,current_rnti);
|
||||
}
|
||||
crnti_rx = 1;
|
||||
payload_ptr += 2;
|
||||
break;
|
||||
@@ -543,14 +590,15 @@ rx_sdu(const module_id_t enb_mod_idP,
|
||||
if ((UE_id = add_new_ue(enb_mod_idP, CC_idP,
|
||||
mac->common_channels[CC_idP].
|
||||
ra[ii].rnti, harq_pid
|
||||
#ifdef Rel14
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
,
|
||||
mac->common_channels[CC_idP].
|
||||
ra[ii].rach_resource_type
|
||||
#endif
|
||||
)) == -1) {
|
||||
AssertFatal(1 == 0,
|
||||
"[MAC][eNB] Max user count reached\n");
|
||||
LOG_E(MAC,"[MAC][eNB] Max user count reached\n");
|
||||
cancel_ra_proc(enb_mod_idP, CC_idP, frameP,current_rnti);
|
||||
break;
|
||||
// kill RA procedure
|
||||
} else
|
||||
LOG_D(MAC,
|
||||
@@ -583,10 +631,22 @@ rx_sdu(const module_id_t enb_mod_idP,
|
||||
|
||||
|
||||
|
||||
// Program Msg4 PDCCH+DLSCH/MPDCCH transmission 4 subframes from now, // Check if this is ok for BL/CE, or if the rule is different
|
||||
ra->Msg4_frame = frameP + ((subframeP > 5) ? 1 : 0);
|
||||
ra->Msg4_subframe = (subframeP + 4) % 10;
|
||||
if(mac->common_channels[CC_idP].tdd_Config!=NULL){
|
||||
switch(mac->common_channels[CC_idP].tdd_Config->subframeAssignment){
|
||||
case 1:
|
||||
ra->Msg4_frame = frameP + ((subframeP > 2) ? 1 : 0);
|
||||
ra->Msg4_subframe = (subframeP + 7) % 10;
|
||||
break;
|
||||
default: printf("%s:%d: TODO\n", __FILE__, __LINE__); abort();
|
||||
// TODO need to be complete for other tdd configs.
|
||||
}
|
||||
}else{
|
||||
// Program Msg4 PDCCH+DLSCH/MPDCCH transmission 4 subframes from now, // Check if this is ok for BL/CE, or if the rule is different
|
||||
ra->Msg4_frame = frameP + ((subframeP > 5) ? 1 : 0);
|
||||
ra->Msg4_subframe = (subframeP + 4) % 10;
|
||||
}
|
||||
|
||||
UE_list->UE_sched_ctrl[UE_id].crnti_reconfigurationcomplete_flag = 0;
|
||||
} // if process is active
|
||||
} // loop on RA processes
|
||||
|
||||
@@ -713,7 +773,10 @@ rx_sdu(const module_id_t enb_mod_idP,
|
||||
LOG_D(MAC,
|
||||
"Programming PHICH ACK for rnti %x harq_pid %d (first_rb %d)\n",
|
||||
current_rnti, harq_pid, first_rb);
|
||||
nfapi_hi_dci0_request_t *hi_dci0_req = &mac->HI_DCI0_req[CC_idP];
|
||||
nfapi_hi_dci0_request_t *hi_dci0_req;
|
||||
uint8_t sf_ahead_dl = ul_subframe2_k_phich(&mac->common_channels[CC_idP] , subframeP);
|
||||
hi_dci0_req = &mac->HI_DCI0_req[CC_idP][(subframeP+sf_ahead_dl)%10];
|
||||
|
||||
nfapi_hi_dci0_request_body_t *hi_dci0_req_body = &hi_dci0_req->hi_dci0_request_body;
|
||||
nfapi_hi_dci0_request_pdu_t *hi_dci0_pdu =
|
||||
&hi_dci0_req_body->hi_dci0_pdu_list[hi_dci0_req_body->number_of_dci + hi_dci0_req_body->number_of_hi];
|
||||
@@ -727,7 +790,7 @@ rx_sdu(const module_id_t enb_mod_idP,
|
||||
hi_dci0_req_body->number_of_hi++;
|
||||
hi_dci0_req_body->sfnsf = sfnsf_add_subframe(frameP,subframeP, 0);
|
||||
hi_dci0_req_body->tl.tag = NFAPI_HI_DCI0_REQUEST_BODY_TAG;
|
||||
hi_dci0_req->sfn_sf = sfnsf_add_subframe(frameP,subframeP, 4);
|
||||
hi_dci0_req->sfn_sf = sfnsf_add_subframe(frameP,subframeP, sf_ahead_dl);
|
||||
hi_dci0_req->header.message_id = NFAPI_HI_DCI0_REQUEST;
|
||||
|
||||
/* NN--> FK: we could either check the payload, or use a phy helper to detect a false msg3 */
|
||||
@@ -737,7 +800,7 @@ rx_sdu(const module_id_t enb_mod_idP,
|
||||
/*
|
||||
if (msg3_flagP != NULL) {
|
||||
if( *msg3_flagP == 1 ) {
|
||||
LOG_N(MAC,"[eNB %d] CC_id %d frame %d : false msg3 detection: signal phy to canceling RA and remove the UE\n", enb_mod_idP, CC_idP, frameP);
|
||||
LOG_I(MAC,"[eNB %d] CC_id %d frame %d : false msg3 detection: signal phy to canceling RA and remove the UE\n", enb_mod_idP, CC_idP, frameP);
|
||||
*msg3_flagP=0;
|
||||
}
|
||||
} */
|
||||
@@ -847,7 +910,8 @@ unsigned char *parse_ulsch_header(unsigned char *mac_header,
|
||||
ce_len++;
|
||||
} else {
|
||||
LOG_E(MAC, "unknown CE %d \n", lcid);
|
||||
AssertFatal(1 == 0, "unknown CE");
|
||||
//AssertFatal(1 == 0, "unknown CE");
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -894,6 +958,7 @@ schedule_ulsch(module_id_t module_idP, frame_t frameP,
|
||||
|
||||
start_meas(&mac->schedule_ulsch);
|
||||
|
||||
int sched_frame=frameP;
|
||||
int sched_subframe = (subframeP + 4) % 10;
|
||||
|
||||
cc = &mac->common_channels[0];
|
||||
@@ -903,8 +968,10 @@ schedule_ulsch(module_id_t module_idP, frame_t frameP,
|
||||
tdd_sfa = cc->tdd_Config->subframeAssignment;
|
||||
switch (subframeP) {
|
||||
case 0:
|
||||
if ((tdd_sfa == 0) || (tdd_sfa == 3) || (tdd_sfa == 6))
|
||||
if ((tdd_sfa == 0) || (tdd_sfa == 3))
|
||||
sched_subframe = 4;
|
||||
else if (tdd_sfa == 6)
|
||||
sched_subframe = 7;
|
||||
else
|
||||
return;
|
||||
break;
|
||||
@@ -913,6 +980,8 @@ schedule_ulsch(module_id_t module_idP, frame_t frameP,
|
||||
sched_subframe = 7;
|
||||
else if (tdd_sfa == 6)
|
||||
sched_subframe = 8;
|
||||
else
|
||||
return;
|
||||
break;
|
||||
default:
|
||||
return;
|
||||
@@ -935,12 +1004,12 @@ schedule_ulsch(module_id_t module_idP, frame_t frameP,
|
||||
if (tdd_sfa == 0)
|
||||
sched_subframe = 9;
|
||||
else if (tdd_sfa == 6)
|
||||
sched_subframe = 3;
|
||||
sched_subframe = 2;
|
||||
else
|
||||
return;
|
||||
break;
|
||||
case 6:
|
||||
if (tdd_sfa == 1)
|
||||
if (tdd_sfa == 0 || tdd_sfa == 1)
|
||||
sched_subframe = 2;
|
||||
else if (tdd_sfa == 6)
|
||||
sched_subframe = 3;
|
||||
@@ -950,21 +1019,23 @@ schedule_ulsch(module_id_t module_idP, frame_t frameP,
|
||||
case 7:
|
||||
return;
|
||||
case 8:
|
||||
if ((tdd_sfa >= 2) || (tdd_sfa <= 5))
|
||||
sched_subframe = 2;
|
||||
if ((tdd_sfa >= 2) && (tdd_sfa <= 5))
|
||||
sched_subframe = 2;
|
||||
else
|
||||
return;
|
||||
return;
|
||||
break;
|
||||
case 9:
|
||||
if ((tdd_sfa == 1) || (tdd_sfa == 3) || (tdd_sfa == 4))
|
||||
sched_subframe = 3;
|
||||
sched_subframe = 3;
|
||||
else if (tdd_sfa == 6)
|
||||
sched_subframe = 4;
|
||||
sched_subframe = 4;
|
||||
else
|
||||
return;
|
||||
return;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (sched_subframe < subframeP) sched_frame++;
|
||||
|
||||
for (CC_id = 0; CC_id < MAX_NUM_CCs; CC_id++) {
|
||||
|
||||
|
||||
@@ -1024,7 +1095,7 @@ schedule_ulsch(module_id_t module_idP, frame_t frameP,
|
||||
//total_slice_percentage_current_uplink+=slice_percentage_uplink[i];
|
||||
//if (total_slice_percentage_current_uplink> 1)
|
||||
//total_slice_percentage_current_uplink=1;
|
||||
LOG_N(MAC,"update ul scheduler slice %d\n", i);
|
||||
LOG_I(MAC,"update ul scheduler slice %d\n", i);
|
||||
}
|
||||
// the new total RB share is within the range
|
||||
if (total_slice_percentage_uplink <= 1.0){
|
||||
@@ -1032,7 +1103,7 @@ schedule_ulsch(module_id_t module_idP, frame_t frameP,
|
||||
// check if the number of slices has changed, and log
|
||||
if (n_active_slices_current_uplink != n_active_slices_uplink ){
|
||||
if ((n_active_slices_uplink > 0) && (n_active_slices_uplink <= MAX_NUM_SLICES)) {
|
||||
LOG_N(MAC,"[eNB %d]frame %d subframe %d: number of active UL slices has changed: %d-->%d\n",
|
||||
LOG_I(MAC,"[eNB %d]frame %d subframe %d: number of active UL slices has changed: %d-->%d\n",
|
||||
module_idP, frameP, subframeP, n_active_slices_current_uplink, n_active_slices_uplink);
|
||||
n_active_slices_current_uplink = n_active_slices_uplink;
|
||||
} else {
|
||||
@@ -1044,7 +1115,7 @@ schedule_ulsch(module_id_t module_idP, frame_t frameP,
|
||||
|
||||
// check if the slice rb share has changed, and log the console
|
||||
if (slice_percentage_current_uplink[i] != slice_percentage_uplink[i]){
|
||||
LOG_N(MAC,"[eNB %d][SLICE %d][UL] frame %d subframe %d: total percentage %f-->%f, slice RB percentage has changed: %f-->%f\n",
|
||||
LOG_I(MAC,"[eNB %d][SLICE %d][UL] frame %d subframe %d: total percentage %f-->%f, slice RB percentage has changed: %f-->%f\n",
|
||||
module_idP, i, frameP, subframeP, total_slice_percentage_current_uplink,
|
||||
total_slice_percentage_uplink, slice_percentage_current_uplink[i], slice_percentage_uplink[i]);
|
||||
total_slice_percentage_current_uplink = total_slice_percentage_uplink;
|
||||
@@ -1054,7 +1125,7 @@ schedule_ulsch(module_id_t module_idP, frame_t frameP,
|
||||
// check if the slice max MCS, and log the console
|
||||
if (slice_maxmcs_current_uplink[i] != slice_maxmcs_uplink[i]){
|
||||
if ((slice_maxmcs_uplink[i] >= 0) && (slice_maxmcs_uplink[i] <= 16)){
|
||||
LOG_N(MAC,"[eNB %d][SLICE %d][UL] frame %d subframe %d: slice MAX MCS has changed: %d-->%d\n",
|
||||
LOG_I(MAC,"[eNB %d][SLICE %d][UL] frame %d subframe %d: slice MAX MCS has changed: %d-->%d\n",
|
||||
module_idP, i, frameP, subframeP, slice_maxmcs_current_uplink[i], slice_maxmcs_uplink[i]);
|
||||
slice_maxmcs_current_uplink[i] = slice_maxmcs_uplink[i];
|
||||
} else {
|
||||
@@ -1066,7 +1137,7 @@ schedule_ulsch(module_id_t module_idP, frame_t frameP,
|
||||
|
||||
// check if a new scheduler, and log the console
|
||||
if (update_ul_scheduler_current[i] != update_ul_scheduler[i]){
|
||||
LOG_N(MAC,"[eNB %d][SLICE %d][UL] frame %d subframe %d: UL scheduler for this slice is updated: %s \n",
|
||||
LOG_I(MAC,"[eNB %d][SLICE %d][UL] frame %d subframe %d: UL scheduler for this slice is updated: %s \n",
|
||||
module_idP, i, frameP, subframeP, ul_scheduler_type[i]);
|
||||
update_ul_scheduler_current[i] = update_ul_scheduler[i];
|
||||
}
|
||||
@@ -1111,8 +1182,7 @@ schedule_ulsch_rnti(module_id_t module_idP,
|
||||
uint8_t status = 0;
|
||||
uint8_t rb_table_index = -1;
|
||||
uint32_t cqi_req, cshift, ndi, tpc;
|
||||
int32_t normalized_rx_power;
|
||||
int32_t target_rx_power = -90;
|
||||
int32_t normalized_rx_power, target_rx_power;
|
||||
static int32_t tpc_accumulated = 0;
|
||||
int n;
|
||||
int CC_id = 0;
|
||||
@@ -1125,19 +1195,21 @@ schedule_ulsch_rnti(module_id_t module_idP,
|
||||
UE_sched_ctrl *UE_sched_ctrl;
|
||||
int sched_frame = frameP;
|
||||
int rvidx_tab[4] = { 0, 2, 3, 1 };
|
||||
uint16_t ul_req_index;
|
||||
uint8_t dlsch_flag;
|
||||
|
||||
if (sched_subframeP < subframeP)
|
||||
sched_frame++;
|
||||
|
||||
nfapi_hi_dci0_request_t *hi_dci0_req = &mac->HI_DCI0_req[CC_id];
|
||||
nfapi_hi_dci0_request_t *hi_dci0_req = &mac->HI_DCI0_req[CC_id][subframeP];
|
||||
nfapi_hi_dci0_request_body_t *hi_dci0_req_body = &hi_dci0_req->hi_dci0_request_body;
|
||||
nfapi_hi_dci0_request_pdu_t *hi_dci0_pdu;
|
||||
|
||||
nfapi_ul_config_request_t *ul_req_tmp = &mac->UL_req_tmp[CC_id][sched_subframeP];
|
||||
nfapi_ul_config_request_body_t *ul_req_tmp_body = &ul_req_tmp->ul_config_request_body;
|
||||
|
||||
nfapi_ul_config_ulsch_harq_information *ulsch_harq_information;
|
||||
//LOG_D(MAC, "entering ulsch preprocesor\n");
|
||||
ulsch_scheduler_pre_processor(module_idP, slice_id, frameP, subframeP, first_rb);
|
||||
ulsch_scheduler_pre_processor(module_idP, slice_id, frameP, subframeP, sched_subframeP, first_rb);
|
||||
|
||||
//LOG_D(MAC, "exiting ulsch preprocesor\n");
|
||||
|
||||
@@ -1260,25 +1332,32 @@ schedule_ulsch_rnti(module_id_t module_idP,
|
||||
// reset the scheduling request
|
||||
UE_template->ul_SR = 0;
|
||||
status = mac_eNB_get_rrc_status(module_idP, rnti);
|
||||
if (status < RRC_CONNECTED)
|
||||
cqi_req = 0;
|
||||
else if (UE_sched_ctrl->cqi_req_timer > 30) {
|
||||
if (nfapi_mode) {
|
||||
cqi_req = 0;
|
||||
} else {
|
||||
cqi_req = 1;
|
||||
cqi_req = 0;
|
||||
|
||||
if (status >= RRC_CONNECTED && UE_sched_ctrl->cqi_req_timer > 30) {
|
||||
if (UE_sched_ctrl->cqi_received == 0) {
|
||||
if (nfapi_mode) {
|
||||
cqi_req = 0;
|
||||
} else {
|
||||
cqi_req = 1;
|
||||
UE_sched_ctrl->cqi_req_flag |= 1 << sched_subframeP;
|
||||
}
|
||||
}
|
||||
UE_sched_ctrl->cqi_req_timer = 0;
|
||||
} else
|
||||
cqi_req = 0;
|
||||
else if (UE_sched_ctrl->cqi_received == 1) {
|
||||
UE_sched_ctrl->cqi_req_flag = 0;
|
||||
UE_sched_ctrl->cqi_received = 0;
|
||||
UE_sched_ctrl->cqi_req_timer = 0;
|
||||
}
|
||||
}
|
||||
|
||||
//power control
|
||||
//compute the expected ULSCH RX power (for the stats)
|
||||
|
||||
// this is the normalized RX power and this should be constant (regardless of mcs
|
||||
normalized_rx_power = UE_sched_ctrl->pusch_snr[CC_id];
|
||||
target_rx_power = 178;
|
||||
|
||||
//is not in dBm, unit from nfapi, converting to dBm: ToDo: Noise power hard coded to 30
|
||||
normalized_rx_power = (5*UE_sched_ctrl->pusch_snr[CC_id]-640)/10+30;
|
||||
target_rx_power= mac->puSch10xSnr/10 + 30;
|
||||
//printf("\n mac->puSch10xSnr = %d, normalized_rx_power = %d, target_rx_power = %d \n",mac->puSch10xSnr,normalized_rx_power,target_rx_power);
|
||||
// this assumes accumulated tpc
|
||||
// make sure that we are only sending a tpc update once a frame, otherwise the control loop will freak out
|
||||
int32_t framex10psubframe = UE_template->pusch_tpc_tx_frame * 10 + UE_template->pusch_tpc_tx_subframe;
|
||||
@@ -1403,9 +1482,10 @@ schedule_ulsch_rnti(module_id_t module_idP,
|
||||
hi_dci0_pdu->dci_pdu.dci_pdu_rel8.tpc = tpc;
|
||||
hi_dci0_pdu->dci_pdu.dci_pdu_rel8.cqi_csi_request = cqi_req;
|
||||
hi_dci0_pdu->dci_pdu.dci_pdu_rel8.dl_assignment_index = UE_template->DAI_ul[sched_subframeP];
|
||||
hi_dci0_pdu->dci_pdu.dci_pdu_rel8.harq_pid = harq_pid;
|
||||
|
||||
hi_dci0_req_body->number_of_dci++;
|
||||
hi_dci0_req_body->sfnsf = sfnsf_add_subframe(frameP, subframeP, 4);
|
||||
hi_dci0_req_body->sfnsf = sfnsf_add_subframe(sched_frame, sched_subframeP, 0); //(frameP, subframeP, 4);
|
||||
hi_dci0_req_body->tl.tag = NFAPI_HI_DCI0_REQUEST_BODY_TAG;
|
||||
|
||||
hi_dci0_req->sfn_sf = frameP<<4|subframeP; // sfnsf_add_subframe(sched_frame, sched_subframeP, 0); // sunday!
|
||||
@@ -1417,8 +1497,18 @@ schedule_ulsch_rnti(module_id_t module_idP,
|
||||
harq_pid, frameP, subframeP, UE_id, rnti,
|
||||
sched_frame, sched_subframeP);
|
||||
|
||||
ul_req_index = 0;
|
||||
dlsch_flag = 0;
|
||||
for(ul_req_index = 0;ul_req_index < ul_req_tmp_body->number_of_pdus;ul_req_index++){
|
||||
if(ul_req_tmp_body->ul_config_pdu_list[ul_req_index].pdu_type == NFAPI_UL_CONFIG_UCI_HARQ_PDU_TYPE){
|
||||
dlsch_flag = 1;
|
||||
LOG_D(MAC,"Frame %d, Subframe %d:rnti %x ul_req_index %d Switched UCI HARQ to ULSCH HARQ(first)\n",frameP,subframeP,rnti,ul_req_index);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// Add UL_config PDUs
|
||||
fill_nfapi_ulsch_config_request_rel8(&ul_req_tmp_body->ul_config_pdu_list[ul_req_tmp_body->number_of_pdus], cqi_req, cc, UE_template->physicalConfigDedicated, get_tmode(module_idP, CC_id, UE_id), mac->ul_handle, rnti, first_rb[CC_id], // resource_block_start
|
||||
fill_nfapi_ulsch_config_request_rel8(&ul_req_tmp_body->ul_config_pdu_list[ul_req_index], cqi_req, cc, UE_template->physicalConfigDedicated, get_tmode(module_idP, CC_id, UE_id), mac->ul_handle, rnti, first_rb[CC_id], // resource_block_start
|
||||
rb_table[rb_table_index], // number_of_resource_blocks
|
||||
UE_template->mcs_UL[harq_pid], cshift, // cyclic_shift_2_for_drms
|
||||
0, // frequency_hopping_enabled_flag
|
||||
@@ -1434,31 +1524,50 @@ schedule_ulsch_rnti(module_id_t module_idP,
|
||||
mcs_UL[harq_pid],
|
||||
rb_table
|
||||
[rb_table_index]));
|
||||
#ifdef Rel14
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
if (UE_template->rach_resource_type > 0) { // This is a BL/CE UE allocation
|
||||
fill_nfapi_ulsch_config_request_emtc(&ul_req_tmp_body->ul_config_pdu_list[ul_req_tmp_body->number_of_pdus], UE_template->rach_resource_type > 2 ? 2 : 1, 1, //total_number_of_repetitions
|
||||
fill_nfapi_ulsch_config_request_emtc(&ul_req_tmp_body->ul_config_pdu_list[ul_req_index], UE_template->rach_resource_type > 2 ? 2 : 1, 1, //total_number_of_repetitions
|
||||
1, //repetition_number
|
||||
(frameP *
|
||||
10) +
|
||||
subframeP);
|
||||
}
|
||||
#endif
|
||||
if(dlsch_flag == 1){
|
||||
if(cqi_req == 1){
|
||||
ul_req_tmp_body->ul_config_pdu_list[ul_req_index].pdu_type = NFAPI_UL_CONFIG_ULSCH_CQI_HARQ_RI_PDU_TYPE;
|
||||
ulsch_harq_information = &ul_req_tmp_body->ul_config_pdu_list[ul_req_index].ulsch_cqi_harq_ri_pdu.harq_information;
|
||||
ul_req_tmp_body->ul_config_pdu_list[ul_req_index].ulsch_cqi_harq_ri_pdu.initial_transmission_parameters.initial_transmission_parameters_rel8.tl.tag=NFAPI_UL_CONFIG_REQUEST_INITIAL_TRANSMISSION_PARAMETERS_REL8_TAG;
|
||||
ul_req_tmp_body->ul_config_pdu_list[ul_req_index].ulsch_cqi_harq_ri_pdu.initial_transmission_parameters.initial_transmission_parameters_rel8.n_srs_initial = 0; // last symbol not punctured
|
||||
ul_req_tmp_body->ul_config_pdu_list[ul_req_index].ulsch_cqi_harq_ri_pdu.initial_transmission_parameters.initial_transmission_parameters_rel8.initial_number_of_resource_blocks = rb_table[rb_table_index];
|
||||
|
||||
}else{
|
||||
ul_req_tmp_body->ul_config_pdu_list[ul_req_index].pdu_type = NFAPI_UL_CONFIG_ULSCH_HARQ_PDU_TYPE;
|
||||
ulsch_harq_information = &ul_req_tmp_body->ul_config_pdu_list[ul_req_index].ulsch_harq_pdu.harq_information;
|
||||
ul_req_tmp_body->ul_config_pdu_list[ul_req_index].ulsch_harq_pdu.initial_transmission_parameters.initial_transmission_parameters_rel8.tl.tag = NFAPI_UL_CONFIG_REQUEST_INITIAL_TRANSMISSION_PARAMETERS_REL8_TAG;
|
||||
ul_req_tmp_body->ul_config_pdu_list[ul_req_index].ulsch_harq_pdu.initial_transmission_parameters.initial_transmission_parameters_rel8.n_srs_initial = 0; // last symbol not punctured
|
||||
ul_req_tmp_body->ul_config_pdu_list[ul_req_index].ulsch_harq_pdu.initial_transmission_parameters.initial_transmission_parameters_rel8.initial_number_of_resource_blocks = rb_table[rb_table_index];
|
||||
}
|
||||
fill_nfapi_ulsch_harq_information(module_idP, CC_id,rnti, ulsch_harq_information,subframeP);
|
||||
}else{
|
||||
ul_req_tmp_body->number_of_pdus++;
|
||||
}
|
||||
|
||||
ul_req_tmp->header.message_id = NFAPI_UL_CONFIG_REQUEST;
|
||||
ul_req_tmp_body->number_of_pdus++;
|
||||
ul_req_tmp_body->tl.tag = NFAPI_UL_CONFIG_REQUEST_BODY_TAG;
|
||||
mac->ul_handle++;
|
||||
|
||||
uint16_t ul_sched_frame = sched_frame;
|
||||
uint16_t ul_sched_subframeP = sched_subframeP;
|
||||
|
||||
add_subframe(&ul_sched_frame, &ul_sched_subframeP, 2);
|
||||
//add_subframe(&ul_sched_frame, &ul_sched_subframeP, 2);
|
||||
ul_req_tmp->sfn_sf = ul_sched_frame<<4|ul_sched_subframeP;
|
||||
|
||||
add_ue_ulsch_info(module_idP,
|
||||
CC_id, UE_id, subframeP,
|
||||
S_UL_SCHEDULED);
|
||||
|
||||
//LOG_D(MAC, "[eNB %d] CC_id %d Frame %d, subframeP %d: Generated ULSCH DCI for next UE_id %d, format 0\n", module_idP, CC_id, frameP, subframeP, UE_id);
|
||||
LOG_D(MAC, "[eNB %d] CC_id %d Frame %d, subframeP %d: Generated ULSCH DCI for next UE_id %d, format 0\n", module_idP, CC_id, frameP, subframeP, UE_id);
|
||||
LOG_D(MAC,"[PUSCH %d] SFN/SF:%04d%d UL_CFG:SFN/SF:%04d%d CQI:%d for UE %d/%x\n", harq_pid,frameP,subframeP,ul_sched_frame,ul_sched_subframeP,cqi_req,UE_id,rnti);
|
||||
|
||||
// increment first rb for next UE allocation
|
||||
@@ -1471,40 +1580,21 @@ schedule_ulsch_rnti(module_id_t module_idP,
|
||||
T_INT(first_rb[CC_id]),
|
||||
T_INT(rb_table[rb_table_index]), T_INT(round));
|
||||
|
||||
#if 0
|
||||
/* This is done in rx_sdu, as it has to.
|
||||
* Since the code is a bit different, let's keep this version here for review, in case of problem.
|
||||
*/
|
||||
// fill in NAK information
|
||||
|
||||
hi_dci0_pdu = &hi_dci0_req_body->hi_dci0_pdu_list[hi_dci0_req_body->number_of_dci + hi_dci0_req_body->number_of_hi];
|
||||
memset((void *) hi_dci0_pdu, 0,
|
||||
sizeof(nfapi_hi_dci0_request_pdu_t));
|
||||
hi_dci0_pdu->pdu_type = NFAPI_HI_DCI0_HI_PDU_TYPE;
|
||||
hi_dci0_pdu->pdu_size = 2 + sizeof(nfapi_hi_dci0_hi_pdu);
|
||||
hi_dci0_pdu->hi_pdu.hi_pdu_rel8.tl.tag = NFAPI_HI_DCI0_REQUEST_HI_PDU_REL8_TAG;
|
||||
hi_dci0_pdu->hi_pdu.hi_pdu_rel8.resource_block_start = UE_template->first_rb_ul[harq_pid];
|
||||
hi_dci0_pdu->hi_pdu.hi_pdu_rel8.cyclic_shift_2_for_drms = UE_template->cshift[harq_pid];
|
||||
hi_dci0_pdu->hi_pdu.hi_pdu_rel8.hi_value = 0;
|
||||
hi_dci0_req_body->number_of_hi++;
|
||||
hi_dci0_req_body->sfnsf = sfnsf_add_subframe(sched_frame, sched_subframeP, 0);
|
||||
hi_dci0_req->sfn_sf = frameP<<4|subframeP;
|
||||
hi_dci0_req->header.message_id = NFAPI_HI_DCI0_REQUEST;
|
||||
|
||||
LOG_D(MAC,
|
||||
"[eNB %d][PUSCH %d/%x] CC_id %d Frame %d subframeP %d Scheduled (PHICH) UE %d (mcs %d, first rb %d, nb_rb %d, TBS %d, round %d)\n",
|
||||
module_idP, harq_pid, rnti, CC_id, frameP,
|
||||
subframeP, UE_id, UE_template->mcs_UL[harq_pid],
|
||||
UE_template->first_rb_ul[harq_pid],
|
||||
UE_template->nb_rb_ul[harq_pid],
|
||||
UE_template->TBS_UL[harq_pid], round);
|
||||
#endif
|
||||
// Add UL_config PDUs
|
||||
LOG_D(MAC,
|
||||
"[PUSCH %d] Frame %d, Subframe %d: Adding UL CONFIG.Request for UE %d/%x, ulsch_frame %d, ulsch_subframe %d\n",
|
||||
harq_pid, frameP, subframeP, UE_id, rnti,
|
||||
sched_frame, sched_subframeP);
|
||||
fill_nfapi_ulsch_config_request_rel8(&ul_req_tmp_body->ul_config_pdu_list[ul_req_tmp_body->number_of_pdus], cqi_req, cc, UE_template->physicalConfigDedicated, get_tmode(module_idP, CC_id, UE_id), mac->ul_handle, rnti, UE_template->first_rb_ul[harq_pid], // resource_block_start
|
||||
ul_req_index = 0;
|
||||
dlsch_flag = 0;
|
||||
for(ul_req_index = 0;ul_req_index < ul_req_tmp_body->number_of_pdus;ul_req_index++){
|
||||
if(ul_req_tmp_body->ul_config_pdu_list[ul_req_index].pdu_type == NFAPI_UL_CONFIG_UCI_HARQ_PDU_TYPE){
|
||||
dlsch_flag = 1;
|
||||
LOG_D(MAC,"Frame %d, Subframe %d:rnti %x ul_req_index %d Switched UCI HARQ to ULSCH HARQ(first)\n",frameP,subframeP,rnti,ul_req_index);
|
||||
break;
|
||||
}
|
||||
}
|
||||
fill_nfapi_ulsch_config_request_rel8(&ul_req_tmp_body->ul_config_pdu_list[ul_req_index], cqi_req, cc, UE_template->physicalConfigDedicated, get_tmode(module_idP, CC_id, UE_id), mac->ul_handle, rnti, UE_template->first_rb_ul[harq_pid], // resource_block_start
|
||||
UE_template->nb_rb_ul[harq_pid], // number_of_resource_blocks
|
||||
UE_template->mcs_UL[harq_pid], cshift, // cyclic_shift_2_for_drms
|
||||
0, // frequency_hopping_enabled_flag
|
||||
@@ -1517,16 +1607,35 @@ schedule_ulsch_rnti(module_id_t module_idP,
|
||||
0, // n_srs
|
||||
UE_template->
|
||||
TBS_UL[harq_pid]);
|
||||
#ifdef Rel14
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
if (UE_template->rach_resource_type > 0) { // This is a BL/CE UE allocation
|
||||
fill_nfapi_ulsch_config_request_emtc(&ul_req_tmp_body->ul_config_pdu_list[ul_req_tmp_body->number_of_pdus], UE_template->rach_resource_type > 2 ? 2 : 1, 1, //total_number_of_repetitions
|
||||
fill_nfapi_ulsch_config_request_emtc(&ul_req_tmp_body->ul_config_pdu_list[ul_req_index], UE_template->rach_resource_type > 2 ? 2 : 1, 1, //total_number_of_repetitions
|
||||
1, //repetition_number
|
||||
(frameP *
|
||||
10) +
|
||||
subframeP);
|
||||
}
|
||||
#endif
|
||||
ul_req_tmp_body->number_of_pdus++;
|
||||
if(dlsch_flag == 1){
|
||||
if(cqi_req == 1){
|
||||
ul_req_tmp_body->ul_config_pdu_list[ul_req_index].pdu_type = NFAPI_UL_CONFIG_ULSCH_CQI_HARQ_RI_PDU_TYPE;
|
||||
ulsch_harq_information = &ul_req_tmp_body->ul_config_pdu_list[ul_req_index].ulsch_cqi_harq_ri_pdu.harq_information;
|
||||
ul_req_tmp_body->ul_config_pdu_list[ul_req_index].ulsch_cqi_harq_ri_pdu.initial_transmission_parameters.initial_transmission_parameters_rel8.tl.tag=NFAPI_UL_CONFIG_REQUEST_INITIAL_TRANSMISSION_PARAMETERS_REL8_TAG;
|
||||
ul_req_tmp_body->ul_config_pdu_list[ul_req_index].ulsch_cqi_harq_ri_pdu.initial_transmission_parameters.initial_transmission_parameters_rel8.n_srs_initial = 0; // last symbol not punctured
|
||||
ul_req_tmp_body->ul_config_pdu_list[ul_req_index].ulsch_cqi_harq_ri_pdu.initial_transmission_parameters.initial_transmission_parameters_rel8.initial_number_of_resource_blocks = UE_template->nb_rb_ul[harq_pid];
|
||||
|
||||
}else{
|
||||
ul_req_tmp_body->ul_config_pdu_list[ul_req_index].pdu_type = NFAPI_UL_CONFIG_ULSCH_HARQ_PDU_TYPE;
|
||||
ulsch_harq_information = &ul_req_tmp_body->ul_config_pdu_list[ul_req_index].ulsch_harq_pdu.harq_information;
|
||||
ul_req_tmp_body->ul_config_pdu_list[ul_req_index].ulsch_harq_pdu.initial_transmission_parameters.initial_transmission_parameters_rel8.tl.tag = NFAPI_UL_CONFIG_REQUEST_INITIAL_TRANSMISSION_PARAMETERS_REL8_TAG;
|
||||
ul_req_tmp_body->ul_config_pdu_list[ul_req_index].ulsch_harq_pdu.initial_transmission_parameters.initial_transmission_parameters_rel8.n_srs_initial = 0; // last symbol not punctured
|
||||
ul_req_tmp_body->ul_config_pdu_list[ul_req_index].ulsch_harq_pdu.initial_transmission_parameters.initial_transmission_parameters_rel8.initial_number_of_resource_blocks = UE_template->nb_rb_ul[harq_pid];
|
||||
}
|
||||
fill_nfapi_ulsch_harq_information(module_idP, CC_id,rnti, ulsch_harq_information,subframeP);
|
||||
}else{
|
||||
ul_req_tmp_body->number_of_pdus++;
|
||||
}
|
||||
|
||||
mac->ul_handle++;
|
||||
|
||||
ul_req_tmp_body->tl.tag = NFAPI_UL_CONFIG_REQUEST_BODY_TAG;
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
|
||||
#include "mac.h"
|
||||
#include "mac_extern.h"
|
||||
#include "UTIL/LOG/log.h"
|
||||
#include "common/utils/LOG/log.h"
|
||||
#include "mac_proto.h"
|
||||
|
||||
int8_t get_Po_NOMINAL_PUSCH(module_id_t module_idP, uint8_t CC_id)
|
||||
|
||||
+251
-52
@@ -54,30 +54,29 @@
|
||||
#include "RACH-ConfigCommon.h"
|
||||
#include "MeasObjectToAddModList.h"
|
||||
#include "MobilityControlInfo.h"
|
||||
#if defined(Rel10) || defined(Rel14)
|
||||
#if (RRC_VERSION >= MAKE_VERSION(9, 0, 0))
|
||||
#include "MBSFN-AreaInfoList-r9.h"
|
||||
#include "MBSFN-SubframeConfigList.h"
|
||||
#include "PMCH-InfoList-r9.h"
|
||||
#endif
|
||||
#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
#include "SCellToAddMod-r10.h"
|
||||
#endif
|
||||
#ifdef Rel14
|
||||
#if (RRC_VERSION >= MAKE_VERSION(13, 0, 0))
|
||||
#include "SystemInformationBlockType1-v1310-IEs.h"
|
||||
#include "SystemInformationBlockType18-r12.h"
|
||||
#endif
|
||||
|
||||
#include "RadioResourceConfigCommonSIB.h"
|
||||
#include "nfapi_interface.h"
|
||||
#include "PHY_INTERFACE/IF_Module.h"
|
||||
|
||||
#include "PHY/TOOLS/time_meas.h"
|
||||
|
||||
#include "PHY/defs_common.h" // for PRACH_RESOURCES_t
|
||||
#include "PHY/LTE_TRANSPORT/transport_common.h"
|
||||
|
||||
#include "targets/ARCH/COMMON/common_lib.h"
|
||||
|
||||
//solve implicit declaration
|
||||
#include "PHY/LTE_ESTIMATION/lte_estimation.h"
|
||||
#include "PHY/LTE_TRANSPORT/transport_proto.h"
|
||||
#include "PHY/LTE_TRANSPORT/transport_common_proto.h"
|
||||
|
||||
/** @defgroup _mac MAC
|
||||
* @ingroup _oai2
|
||||
* @{
|
||||
@@ -88,10 +87,11 @@
|
||||
#define PCCH_PAYLOAD_SIZE_MAX 128
|
||||
#define RAR_PAYLOAD_SIZE_MAX 128
|
||||
|
||||
#define SCH_PAYLOAD_SIZE_MAX 4096
|
||||
#define SCH_PAYLOAD_SIZE_MAX 8192
|
||||
#define DCH_PAYLOAD_SIZE_MAX 4096
|
||||
/// Logical channel ids from 36-311 (Note BCCH is not specified in 36-311, uses the same as first DRB)
|
||||
|
||||
#if defined(Rel10) || defined(Rel14)
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
|
||||
// Mask for identifying subframe for MBMS
|
||||
#define MBSFN_TDD_SF3 0x80 // for TDD
|
||||
@@ -130,11 +130,7 @@
|
||||
/*!\brief Maximum number od control elemenets */
|
||||
#define MAX_NUM_CE 5
|
||||
/*!\brief Maximum number of random access process */
|
||||
#if defined(USRP_REC_PLAY)
|
||||
#define NB_RA_PROC_MAX 1
|
||||
#else
|
||||
#define NB_RA_PROC_MAX 4
|
||||
#endif
|
||||
/*!\brief size of buffer status report table */
|
||||
#define BSR_TABLE_SIZE 64
|
||||
/*!\brief The power headroom reporting range is from -23 ...+40 dB and beyond, with step 1 */
|
||||
@@ -165,6 +161,7 @@
|
||||
/*!\brief maximum number of slices / groups */
|
||||
#define MAX_NUM_SLICES 4
|
||||
|
||||
|
||||
#define U_PLANE_INACTIVITY_VALUE 6000
|
||||
|
||||
/*
|
||||
@@ -243,6 +240,75 @@ typedef struct {
|
||||
uint8_t R:2;
|
||||
} __attribute__ ((__packed__)) SCH_SUBHEADER_FIXED;
|
||||
|
||||
|
||||
|
||||
/*!\brief MAC subheader long with 24bit DST field */
|
||||
typedef struct {
|
||||
uint8_t R0:4;
|
||||
uint8_t V:4;//Version number: Possible values "0001", "0010", "0011" based on TS36.321 section 6.2.3.
|
||||
uint8_t SRC07; //Prose UE source ID. Size 24 bits.
|
||||
uint8_t SRC815; //Prose UE source ID. Size 24 bits.
|
||||
uint8_t SRC1623; //Prose UE source ID. Size 24 bits.
|
||||
uint8_t DST07; //Prose UE destination ID. Size 24 bits.
|
||||
uint8_t DST815; //Prose UE destination ID. Size 24 bits.
|
||||
uint8_t DST1623; //Prose UE destination ID. Size 24 bits.
|
||||
uint8_t LCID:5;
|
||||
uint8_t E:1;
|
||||
uint8_t R1:2;
|
||||
uint8_t L:7; // Length field indicating the size of the corresponding SDU in bytes.
|
||||
uint8_t F:1;
|
||||
}__attribute__((__packed__))SLSCH_SUBHEADER_24_Bit_DST_SHORT;
|
||||
|
||||
/*!\brief MAC subheader long with 24bit DST field */
|
||||
typedef struct {
|
||||
uint8_t R0:4;
|
||||
uint8_t V:4;//Version number: Possible values "0001", "0010", "0011" based on TS36.321 section 6.2.3.
|
||||
uint8_t SRC07; //Prose UE source ID. Size 24 bits.
|
||||
uint8_t SRC815; //Prose UE source ID. Size 24 bits.
|
||||
uint8_t SRC1623; //Prose UE source ID. Size 24 bits.
|
||||
uint8_t DST07; //Prose UE destination ID. Size 24 bits.
|
||||
uint8_t DST815; //Prose UE destination ID. Size 24 bits.
|
||||
uint8_t DST1623; //Prose UE destination ID. Size 24 bits.
|
||||
uint8_t LCID:5;
|
||||
uint8_t E:1;
|
||||
uint8_t R1:2;
|
||||
uint8_t L_MSB:7; // Length field indicating the size of the corresponding SDU in bytes.
|
||||
uint8_t F:1;
|
||||
uint8_t L_LSB:8;
|
||||
}__attribute__((__packed__))SLSCH_SUBHEADER_24_Bit_DST_LONG;
|
||||
|
||||
/*!\brief MAC subheader long with 24bit DST field */
|
||||
typedef struct {
|
||||
uint8_t R0:4;
|
||||
uint8_t V:4;//Version number: Possible values "0001", "0010", "0011" based on TS36.321 section 6.2.3.
|
||||
uint8_t SRC07; //Prose UE source ID. Size 24 bits.
|
||||
uint8_t SRC815; //Prose UE source ID. Size 24 bits.
|
||||
uint8_t DST07; //Prose UE destination ID. Size 16 bits.
|
||||
uint8_t DST815; //Prose UE destination ID. Size 16 bits.
|
||||
uint8_t LCID:5;
|
||||
uint8_t E:1;
|
||||
uint8_t R1:2;
|
||||
uint8_t L:7; // Length field indicating the size of the corresponding SDU in bytes.
|
||||
uint8_t F:1;
|
||||
}__attribute__((__packed__))SLSCH_SUBHEADER_16_Bit_DST_SHORT;
|
||||
|
||||
/*!\brief MAC subheader long with 24bit DST field */
|
||||
typedef struct {
|
||||
uint8_t R0:4;
|
||||
uint8_t V:4;//Version number: Possible values "0001", "0010", "0011" based on TS36.321 section 6.2.3.
|
||||
uint8_t SRC07; //Prose UE source ID. Size 24 bits.
|
||||
uint8_t SRC815; //Prose UE source ID. Size 24 bits.
|
||||
uint8_t SRC1623; //Prose UE source ID. Size 24 bits.
|
||||
uint8_t DST07; //Prose UE destination ID. Size 16 bits.
|
||||
uint8_t DST815; //Prose UE destination ID. Size 16 bits.
|
||||
uint8_t LCID:5;
|
||||
uint8_t E:1;
|
||||
uint8_t R1:2;
|
||||
uint8_t L_MSB:7; // Length field indicating the size of the corresponding SDU in bytes.
|
||||
uint8_t F:1;
|
||||
uint8_t L_LSB:8;
|
||||
}__attribute__((__packed__))SLSCH_SUBHEADER_16_Bit_DST_LONG;
|
||||
|
||||
/*!\brief mac control element: short buffer status report for a specific logical channel group ID*/
|
||||
typedef struct {
|
||||
uint8_t Buffer_size:6; // octet 1 LSB
|
||||
@@ -258,6 +324,29 @@ typedef struct {
|
||||
uint8_t Buffer_size0:6;
|
||||
} __attribute__ ((__packed__)) BSR_LONG;
|
||||
|
||||
/*!\brief mac control element: sidelink buffer status report */
|
||||
typedef struct {
|
||||
uint8_t DST_1:4;
|
||||
uint8_t LCGID_1: 2;
|
||||
uint8_t Buffer_size_1:6;
|
||||
uint8_t DST_2:4;
|
||||
uint8_t LCGID_2: 2;
|
||||
uint8_t Buffer_size_2:6;
|
||||
}__attribute__((__packed__))SL_BSR;
|
||||
|
||||
/*!\brief mac control element: truncated sidelink buffer status report */
|
||||
typedef struct {
|
||||
uint8_t DST:4;
|
||||
uint8_t LCGID: 2;
|
||||
uint8_t Buffer_size:6;
|
||||
uint8_t R1:1;
|
||||
uint8_t R2:1;
|
||||
uint8_t R3:1;
|
||||
uint8_t R4:1;
|
||||
}__attribute__((__packed__))SL_BSR_Truncated;
|
||||
|
||||
|
||||
|
||||
#define BSR_LONG_SIZE (sizeof(BSR_LONG))
|
||||
/*!\brief mac control element: timing advance */
|
||||
typedef struct {
|
||||
@@ -291,7 +380,7 @@ typedef struct {
|
||||
uint8_t payload[PCCH_PAYLOAD_SIZE_MAX];
|
||||
} __attribute__ ((__packed__)) PCCH_PDU;
|
||||
|
||||
#if defined(Rel10) || defined(Rel14)
|
||||
#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
/*! \brief MCCH payload */
|
||||
typedef struct {
|
||||
uint8_t payload[MCCH_PAYLOAD_SIZE_MAX];
|
||||
@@ -348,7 +437,7 @@ typedef struct {
|
||||
/*!\brief LCID of padding LCID for DLSCH */
|
||||
#define SHORT_PADDING 31
|
||||
|
||||
#if defined(Rel10) || defined(Rel14)
|
||||
#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
// MCH LCHAN IDs (table6.2.1-4 TS36.321)
|
||||
/*!\brief LCID of MCCH for DL */
|
||||
#define MCCH_LCHANID 0
|
||||
@@ -356,6 +445,9 @@ typedef struct {
|
||||
#define MCH_SCHDL_INFO 3
|
||||
/*!\brief LCID of Carrier component activation/deactivation */
|
||||
#define CC_ACT_DEACT 27
|
||||
//TTN (for D2D)
|
||||
#define SL_DISCOVERY 8 //LCID (fake)
|
||||
#define MAX_NUM_DEST 10
|
||||
#endif
|
||||
|
||||
// ULSCH LCHAN IDs
|
||||
@@ -402,6 +494,11 @@ typedef struct {
|
||||
uint16_t Pdu_size;
|
||||
} __attribute__ ((__packed__)) ULSCH_PDU;
|
||||
|
||||
/*! \brief Uplink SCH PDU Structure */
|
||||
typedef struct {
|
||||
int8_t payload[DCH_PAYLOAD_SIZE_MAX]; /*!< \brief SACH payload */
|
||||
uint16_t Pdu_size;
|
||||
} __attribute__ ((__packed__)) ULDCH_PDU;
|
||||
|
||||
/*!\brief RA process state*/
|
||||
typedef enum {
|
||||
@@ -409,7 +506,9 @@ typedef enum {
|
||||
MSG2,
|
||||
WAITMSG3,
|
||||
MSG4,
|
||||
WAITMSG4ACK
|
||||
WAITMSG4ACK,
|
||||
MSGCRNTI,
|
||||
MSGCRNTI_ACK
|
||||
} RA_state;
|
||||
|
||||
/*!\brief UE ULSCH scheduling states*/
|
||||
@@ -439,6 +538,12 @@ typedef enum {
|
||||
CBA_RS /// random allocation
|
||||
} CBA_POLICY;
|
||||
|
||||
/*!\brief scheduler mode */
|
||||
typedef enum {
|
||||
SCHED_MODE_DEFAULT = 0, /// default cheduler
|
||||
SCHED_MODE_FAIR_RR /// fair raund robin
|
||||
} SCHEDULER_MODES;
|
||||
|
||||
|
||||
/*! \brief temporary struct for ULSCH sched */
|
||||
typedef struct {
|
||||
@@ -531,7 +636,6 @@ typedef struct {
|
||||
} eNB_STATS;
|
||||
/*! \brief eNB statistics for the connected UEs*/
|
||||
typedef struct {
|
||||
|
||||
/// CRNTI of UE
|
||||
rnti_t crnti; ///user id (rnti) of connected UEs
|
||||
// rrc status
|
||||
@@ -793,7 +897,7 @@ typedef struct {
|
||||
eNB_UE_estimated_distances distance;
|
||||
#endif
|
||||
|
||||
#ifdef Rel14
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
uint8_t rach_resource_type;
|
||||
uint16_t mpdcch_repetition_cnt;
|
||||
frame_t Msg2_frame;
|
||||
@@ -847,7 +951,10 @@ typedef struct {
|
||||
int16_t ta_update;
|
||||
uint16_t ul_consecutive_errors;
|
||||
int32_t context_active_timer;
|
||||
/// timer for regular CQI request on PUSCH
|
||||
int32_t cqi_req_timer;
|
||||
/// indicator that CQI was received on PUSCH when requested
|
||||
int32_t cqi_received;
|
||||
int32_t ul_inactivity_timer;
|
||||
int32_t ul_failure_timer;
|
||||
uint32_t ue_reestablishment_reject_timer;
|
||||
@@ -883,7 +990,9 @@ typedef struct {
|
||||
uint8_t aperiodic_wideband_cqi1[NFAPI_CC_MAX];
|
||||
uint8_t aperiodic_wideband_pmi1[NFAPI_CC_MAX];
|
||||
uint8_t dl_cqi[NFAPI_CC_MAX];
|
||||
int32_t uplane_inactivity_timer;
|
||||
int32_t uplane_inactivity_timer;
|
||||
uint8_t crnti_reconfigurationcomplete_flag;
|
||||
uint8_t cqi_req_flag;
|
||||
} UE_sched_ctrl;
|
||||
/*! \brief eNB template for the Random access information */
|
||||
typedef struct {
|
||||
@@ -935,13 +1044,15 @@ typedef struct {
|
||||
int msg4_TBsize;
|
||||
/// MCS used for Msg4
|
||||
int msg4_mcs;
|
||||
#ifdef Rel14
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
uint8_t rach_resource_type;
|
||||
uint8_t msg2_mpdcch_repetition_cnt;
|
||||
uint8_t msg4_mpdcch_repetition_cnt;
|
||||
uint8_t msg2_narrowband;
|
||||
uint8_t msg34_narrowband;
|
||||
#endif
|
||||
int32_t crnti_rrc_mui;
|
||||
int8_t crnti_harq_pid;
|
||||
} RA_t;
|
||||
|
||||
|
||||
@@ -991,6 +1102,22 @@ typedef struct {
|
||||
|
||||
} UE_list_t;
|
||||
|
||||
/*! \brief deleting control information*/
|
||||
typedef struct {
|
||||
///rnti of UE
|
||||
rnti_t rnti;
|
||||
///remove UE context flag
|
||||
boolean_t removeContextFlg;
|
||||
} UE_free_ctrl;
|
||||
/*! \brief REMOVE UE list used by eNB to order UEs/CC for deleting*/
|
||||
typedef struct {
|
||||
/// deleting control info
|
||||
UE_free_ctrl UE_free_ctrl[NUMBER_OF_UE_MAX+1];
|
||||
int num_UEs;
|
||||
int head_freelist; ///the head position of the delete list
|
||||
int tail_freelist; ///the tail position of the delete list
|
||||
} UE_free_list_t;
|
||||
|
||||
/*! \brief eNB common channels */
|
||||
typedef struct {
|
||||
int physCellId;
|
||||
@@ -1000,7 +1127,7 @@ typedef struct {
|
||||
uint32_t dl_CarrierFreq;
|
||||
BCCH_BCH_Message_t *mib;
|
||||
RadioResourceConfigCommonSIB_t *radioResourceConfigCommon;
|
||||
#ifdef Rel14
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
RadioResourceConfigCommonSIB_t *radioResourceConfigCommon_BR;
|
||||
#endif
|
||||
TDD_Config_t *tdd_Config;
|
||||
@@ -1031,7 +1158,7 @@ typedef struct {
|
||||
struct MBSFN_SubframeConfig *mbsfn_SubframeConfig[8];
|
||||
/// number of subframe allocation pattern available for MBSFN sync area
|
||||
uint8_t num_sf_allocation_pattern;
|
||||
#if defined(Rel10) || defined(Rel14)
|
||||
#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
/// MBMS Flag
|
||||
uint8_t MBMS_flag;
|
||||
/// Outgoing MCCH pdu for PHY
|
||||
@@ -1053,7 +1180,7 @@ typedef struct {
|
||||
/// Outgoing MCH pdu for PHY
|
||||
MCH_PDU MCH_pdu;
|
||||
#endif
|
||||
#ifdef Rel14
|
||||
#if (RRC_VERSION >= MAKE_VERSION(13, 0, 0))
|
||||
/// Rel13 parameters from SIB1
|
||||
SystemInformationBlockType1_v1310_IEs_t *sib1_v13ext;
|
||||
/// Counter for SIB1-BR scheduling
|
||||
@@ -1079,7 +1206,7 @@ typedef struct eNB_MAC_INST_s {
|
||||
/// Common cell resources
|
||||
COMMON_channels_t common_channels[NFAPI_CC_MAX];
|
||||
/// current PDU index (BCH,MCH,DLSCH)
|
||||
uint16_t pdu_index[NFAPI_CC_MAX];
|
||||
int16_t pdu_index[NFAPI_CC_MAX];
|
||||
|
||||
/// NFAPI Config Request Structure
|
||||
nfapi_config_request_t config[NFAPI_CC_MAX];
|
||||
@@ -1100,9 +1227,9 @@ typedef struct eNB_MAC_INST_s {
|
||||
nfapi_ul_config_request_t UL_req_tmp[NFAPI_CC_MAX][10];
|
||||
/// Preallocated HI_DCI0 pdu list
|
||||
nfapi_hi_dci0_request_pdu_t
|
||||
hi_dci0_pdu_list[NFAPI_CC_MAX][MAX_NUM_HI_DCI0_PDU];
|
||||
hi_dci0_pdu_list[NFAPI_CC_MAX][10][MAX_NUM_HI_DCI0_PDU];
|
||||
/// NFAPI HI/DCI0 Config Request Structure
|
||||
nfapi_hi_dci0_request_t HI_DCI0_req[NFAPI_CC_MAX];
|
||||
nfapi_hi_dci0_request_t HI_DCI0_req[NFAPI_CC_MAX][10];
|
||||
/// Prealocated TX pdu list
|
||||
nfapi_tx_request_pdu_t
|
||||
tx_request_pdu[NFAPI_CC_MAX][MAX_NUM_TX_REQUEST_PDU];
|
||||
@@ -1141,6 +1268,13 @@ typedef struct eNB_MAC_INST_s {
|
||||
time_stats_t rx_ulsch_sdu; // include rlc_data_ind
|
||||
/// processing time of eNB PCH scheduler
|
||||
time_stats_t schedule_pch;
|
||||
|
||||
UE_free_list_t UE_free_list;
|
||||
/// for scheduling selection
|
||||
SCHEDULER_MODES scheduler_mode;
|
||||
|
||||
int32_t puSch10xSnr;
|
||||
int32_t puCch10xSnr;
|
||||
} eNB_MAC_INST;
|
||||
|
||||
/*
|
||||
@@ -1248,10 +1382,36 @@ typedef struct {
|
||||
struct RACH_ConfigDedicated *rach_ConfigDedicated;
|
||||
/// pointer to RRC PHY configuration
|
||||
struct PhysicalConfigDedicated *physicalConfigDedicated;
|
||||
#if defined(Rel10) || defined(Rel14)
|
||||
/// pointer to RRC PHY configuration SCEll
|
||||
struct PhysicalConfigDedicatedSCell_r10
|
||||
*physicalConfigDedicatedSCell_r10;
|
||||
#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
/// pointer to RRC PHY configuration SCEll
|
||||
struct PhysicalConfigDedicatedSCell_r10 *physicalConfigDedicatedSCell_r10;
|
||||
/// Preconfiguration for Sidelink
|
||||
struct SL_Preconfiguration_r12 *SL_Preconfiguration;
|
||||
/// RX Pool for Sidelink from SIB18
|
||||
SL_CommRxPoolList_r12_t commRxPool_r12;
|
||||
/// TX Pool Normal for Sidelink from SIB18
|
||||
struct SL_CommTxPoolList_r12 *commTxPoolNormalCommon_r12;
|
||||
/// TX Pool Exceptional for Sidelink from SIB18
|
||||
struct SL_CommTxPoolList_r12 *commTxPoolExceptional_r12;
|
||||
/// Common Sync Config for Sidelink from SIB18
|
||||
struct SL_SyncConfigList_r12 *commSyncConfig_r12;
|
||||
/// Dedicated Sync TX control for Sidelink
|
||||
struct SL_SyncTxControl_r12 *sl_SyncTxControl_r12;
|
||||
/// Dedicated Discovery TX control for Sidelink
|
||||
struct SL_DiscConfig_r12 *sl_DiscConfig_r12;
|
||||
/// Dedicated TX config for Sidelink
|
||||
struct SL_CommConfig_r12 *sl_CommConfig_r12;
|
||||
//SL sourceL2ID
|
||||
uint32_t sourceL2Id;
|
||||
//SL groupL2Id
|
||||
uint32_t groupL2Id;
|
||||
//SL destinationL2Id
|
||||
uint32_t destinationL2Id;
|
||||
//List of destinations
|
||||
uint32_t destinationList[MAX_NUM_DEST];
|
||||
uint8_t numCommFlows;
|
||||
uint32_t SL_LCID[MAX_NUM_LCID];
|
||||
|
||||
#endif
|
||||
/// pointer to TDD Configuration (NULL for FDD)
|
||||
TDD_Config_t *tdd_Config;
|
||||
@@ -1273,6 +1433,13 @@ typedef struct {
|
||||
RAR_PDU RAR_pdu;
|
||||
/// Incoming DLSCH pdu for PHY
|
||||
DLSCH_PDU DLSCH_pdu[MAX_MOBILES_PER_ENB][2];
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
int sltx_active;
|
||||
SLSCH_t slsch;
|
||||
SLDCH_t sldch;
|
||||
ULSCH_PDU slsch_pdu;
|
||||
int slsch_lcid;
|
||||
#endif
|
||||
/// number of attempt for rach
|
||||
uint8_t RA_attempt_number;
|
||||
/// Random-access procedure flag
|
||||
@@ -1325,7 +1492,7 @@ typedef struct {
|
||||
struct MBSFN_SubframeConfig *mbsfn_SubframeConfig[8]; // FIXME replace 8 by MAX_MBSFN_AREA?
|
||||
/// number of subframe allocation pattern available for MBSFN sync area
|
||||
uint8_t num_sf_allocation_pattern;
|
||||
#if defined(Rel10) || defined(Rel14)
|
||||
#if (RRC_VERSION >= MAKE_VERSION(9, 0, 0))
|
||||
/// number of active MBSFN area
|
||||
uint8_t num_active_mbsfn_area;
|
||||
/// MBSFN Area Info
|
||||
@@ -1337,26 +1504,41 @@ typedef struct {
|
||||
/// MSI status
|
||||
uint8_t msi_status; // could be an array if there are >1 MCH in one MBSFN area
|
||||
#endif
|
||||
//#ifdef CBA
|
||||
/// CBA RNTI for each group
|
||||
uint16_t cba_rnti[NUM_MAX_CBA_GROUP];
|
||||
/// last SFN for CBA channel access
|
||||
uint8_t cba_last_access[NUM_MAX_CBA_GROUP];
|
||||
//#endif
|
||||
/// total UE scheduler processing time
|
||||
time_stats_t ue_scheduler; // total
|
||||
/// UE ULSCH tx processing time inlcuding RLC interface (rlc_data_req) and mac header generation
|
||||
time_stats_t tx_ulsch_sdu;
|
||||
/// UE DLSCH rx processing time inlcuding RLC interface (mac_rrc_data_ind or mac_rlc_status_ind+mac_rlc_data_ind) and mac header parser
|
||||
time_stats_t rx_dlsch_sdu;
|
||||
/// UE query for MCH subframe processing time
|
||||
time_stats_t ue_query_mch;
|
||||
/// UE MCH rx processing time
|
||||
time_stats_t rx_mch_sdu;
|
||||
/// UE BCCH rx processing time including RLC interface (mac_rrc_data_ind)
|
||||
time_stats_t rx_si;
|
||||
/// UE PCCH rx processing time including RLC interface (mac_rrc_data_ind)
|
||||
time_stats_t rx_p;
|
||||
//#ifdef CBA
|
||||
/// CBA RNTI for each group
|
||||
uint16_t cba_rnti[NUM_MAX_CBA_GROUP];
|
||||
/// last SFN for CBA channel access
|
||||
uint8_t cba_last_access[NUM_MAX_CBA_GROUP];
|
||||
//#endif
|
||||
/// total UE scheduler processing time
|
||||
time_stats_t ue_scheduler; // total
|
||||
/// UE ULSCH tx processing time inlcuding RLC interface (rlc_data_req) and mac header generation
|
||||
time_stats_t tx_ulsch_sdu;
|
||||
/// UE DLSCH rx processing time inlcuding RLC interface (mac_rrc_data_ind or mac_rlc_status_ind+mac_rlc_data_ind) and mac header parser
|
||||
time_stats_t rx_dlsch_sdu ;
|
||||
/// UE query for MCH subframe processing time
|
||||
time_stats_t ue_query_mch;
|
||||
/// UE MCH rx processing time
|
||||
time_stats_t rx_mch_sdu;
|
||||
/// UE BCCH rx processing time including RLC interface (mac_rrc_data_ind)
|
||||
time_stats_t rx_si;
|
||||
/// UE PCCH rx processing time including RLC interface (mac_rrc_data_ind)
|
||||
time_stats_t rx_p;
|
||||
/// Mutex for nfapi UL_INFO
|
||||
pthread_mutex_t UL_INFO_mutex;
|
||||
/// UE_Mode variable should be used in the case of Phy_stub operation since we won't have access to PHY_VARS_UE
|
||||
/// where the UE_mode originally is for the full stack operation mode. The transitions between the states of the UE_Mode
|
||||
/// will be triggered within phy_stub_ue.c in this case
|
||||
UE_MODE_t UE_mode[NUMBER_OF_CONNECTED_eNB_MAX];
|
||||
/// Phy_stub mode: Boolean variable to distinguish whether a Msg3 or a regular ULSCH data pdu should be generated
|
||||
/// after the reception of NFAPI_UL_CONFIG_ULSCH_PDU_TYPE.
|
||||
uint8_t first_ULSCH_Tx;
|
||||
uint8_t SI_Decoded;
|
||||
int ra_frame; // This variable keeps the frame in which the RA started for the specific UE. It is used in order
|
||||
// to make sure that different UEs RA starts within a number of frames difference.
|
||||
|
||||
eth_params_t eth_params_n;
|
||||
|
||||
} UE_MAC_INST;
|
||||
/*! \brief ID of the neighboring cells used for HO*/
|
||||
typedef struct {
|
||||
@@ -1364,6 +1546,23 @@ typedef struct {
|
||||
uint8_t n_adj_cells;
|
||||
} neigh_cell_id_t;
|
||||
|
||||
typedef struct {
|
||||
volatile uint8_t flag;
|
||||
rnti_t rnti;
|
||||
mui_t rrc_eNB_mui;
|
||||
}RRC_release_ctrl;
|
||||
|
||||
typedef struct {
|
||||
uint16_t num_UEs;
|
||||
RRC_release_ctrl RRC_release_ctrl[NUMBER_OF_UE_MAX];
|
||||
} RRC_release_list_t;
|
||||
|
||||
typedef struct {
|
||||
uint8_t rrc_mui_num;
|
||||
mui_t rrc_mui[128];
|
||||
}mac_rlc_am_muilist_t;
|
||||
|
||||
#include "mac_proto.h"
|
||||
|
||||
/*@}*/
|
||||
#endif /*__LAYER2_MAC_DEFS_H__ */
|
||||
|
||||
@@ -76,4 +76,14 @@ extern uint32_t RRC_CONNECTION_FLAG;
|
||||
extern uint8_t rb_table[34];
|
||||
|
||||
|
||||
#if defined(PRE_SCD_THREAD)
|
||||
extern uint16_t pre_nb_rbs_required[2][MAX_NUM_CCs][NUMBER_OF_UE_MAX];
|
||||
extern uint8_t dlsch_ue_select_tbl_in_use;
|
||||
extern uint8_t new_dlsch_ue_select_tbl_in_use;
|
||||
extern boolean_t pre_scd_activeUE[NUMBER_OF_UE_MAX];
|
||||
extern eNB_UE_STATS pre_scd_eNB_UE_stats[MAX_NUM_CCs][NUMBER_OF_UE_MAX];
|
||||
#endif
|
||||
|
||||
extern mac_rlc_am_muilist_t rlc_am_mui;
|
||||
extern SCHEDULER_MODES global_scheduler_mode;
|
||||
#endif //DEF_H
|
||||
|
||||
@@ -136,8 +136,7 @@ void schedule_ulsch_rnti(module_id_t module_idP, slice_id_t slice_idP, frame_t f
|
||||
@param subframe Index of subframe
|
||||
@param mbsfn_flag Indicates that this subframe is for MCH/MCCH
|
||||
*/
|
||||
void fill_DLSCH_dci(module_id_t module_idP, frame_t frameP,
|
||||
sub_frame_t subframe, int *mbsfn_flag);
|
||||
void fill_DLSCH_dci(module_id_t module_idP,frame_t frameP,sub_frame_t subframe,int *mbsfn_flag);
|
||||
|
||||
/** \brief UE specific DLSCH scheduling. Retrieves next ue to be schduled from round-robin scheduler and gets the appropriate harq_pid for the subframe from PHY. If the process is active and requires a retransmission, it schedules the retransmission with the same PRB count and MCS as the first transmission. Otherwise it consults RLC for DCCH/DTCH SDUs (status with maximum number of available PRBS), builds the MAC header (timing advance sent by default) and copies
|
||||
@param Mod_id Instance ID of eNB
|
||||
@@ -268,7 +267,7 @@ void eNB_dlsch_ulsch_scheduler(module_id_t module_idP, frame_t frameP, sub_frame
|
||||
void initiate_ra_proc(module_id_t module_idP, int CC_id, frame_t frameP,
|
||||
sub_frame_t subframeP, uint16_t preamble_index,
|
||||
int16_t timing_offset, uint16_t rnti
|
||||
#ifdef Rel14
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
, uint8_t rach_resource_type
|
||||
#endif
|
||||
);
|
||||
@@ -287,7 +286,7 @@ unsigned short fill_rar(const module_id_t module_idP,
|
||||
const uint16_t N_RB_UL,
|
||||
const uint8_t input_buffer_length);
|
||||
|
||||
#ifdef Rel14
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
unsigned short fill_rar_br(eNB_MAC_INST * eNB,
|
||||
int CC_id,
|
||||
RA_t * ra,
|
||||
@@ -315,6 +314,9 @@ void cancel_ra_proc(module_id_t module_idP, int CC_id, frame_t frameP,
|
||||
@param Msg3_frame frame where scheduling takes place
|
||||
@param Msg3_subframe subframe where scheduling takes place
|
||||
*/
|
||||
|
||||
void clear_ra_proc(module_id_t module_idP, int CC_id, frame_t frameP);
|
||||
|
||||
void set_msg3_subframe(module_id_t Mod_id,
|
||||
int CC_id,
|
||||
int frame,
|
||||
@@ -428,7 +430,7 @@ int get_nCCE_offset(int *CCE_table,
|
||||
const unsigned short rnti,
|
||||
const unsigned char subframe);
|
||||
|
||||
int allocate_CCEs(int module_idP, int CC_idP, int subframe, int test_only);
|
||||
int allocate_CCEs(int module_idP, int CC_idP, frame_t frameP, sub_frame_t subframeP, int test_only);
|
||||
|
||||
boolean_t CCE_allocation_infeasible(int module_idP,
|
||||
int CC_idP,
|
||||
@@ -440,6 +442,7 @@ void set_ue_dai(sub_frame_t subframeP,
|
||||
int UE_id,
|
||||
uint8_t CC_id, uint8_t tdd_config, UE_list_t * UE_list);
|
||||
|
||||
uint8_t frame_subframe2_dl_harq_pid(TDD_Config_t *tdd_Config, int abs_frameP, sub_frame_t subframeP);
|
||||
/** \brief First stage of PCH Scheduling. Gets a PCH SDU from RRC if available and computes the MCS required to transport it as a function of the SDU length. It assumes a length less than or equal to 64 bytes (MCS 6, 3 PRBs).
|
||||
@param Mod_id Instance ID of eNB
|
||||
@param frame Frame index
|
||||
@@ -513,8 +516,17 @@ void ue_send_sdu(module_id_t module_idP, uint8_t CC_id, frame_t frame,
|
||||
sub_frame_t subframe, uint8_t * sdu, uint16_t sdu_len,
|
||||
uint8_t CH_index);
|
||||
|
||||
void ue_send_sl_sdu(module_id_t module_idP,
|
||||
uint8_t CC_id,
|
||||
frame_t frameP,
|
||||
sub_frame_t subframeP,
|
||||
uint8_t* sdu,
|
||||
uint16_t sdu_len,
|
||||
uint8_t eNB_index,
|
||||
sl_discovery_flag_t sl_discovery_flag
|
||||
);
|
||||
|
||||
#if defined(Rel10) || defined(Rel14)
|
||||
#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
/* \brief Called by PHY to transfer MCH transport block to ue MAC.
|
||||
@param Mod_id Index of module instance
|
||||
@param frame Frame index
|
||||
@@ -535,7 +547,7 @@ void ue_send_mch_sdu(module_id_t module_idP, uint8_t CC_id, frame_t frameP,
|
||||
@param[out] sync_area return the sync area
|
||||
@param[out] mcch_active flag indicating whether this MCCH is active in this SF
|
||||
*/
|
||||
int ue_query_mch(uint8_t Mod_id, uint8_t CC_id, uint32_t frame,
|
||||
int ue_query_mch(module_id_t Mod_id, uint8_t CC_id, uint32_t frame,
|
||||
sub_frame_t subframe, uint8_t eNB_index,
|
||||
uint8_t * sync_area, uint8_t * mcch_active);
|
||||
|
||||
@@ -546,13 +558,36 @@ int ue_query_mch(uint8_t Mod_id, uint8_t CC_id, uint32_t frame,
|
||||
@param eNB_id Index of eNB that UE is attached to
|
||||
@param rnti C_RNTI of UE
|
||||
@param subframe subframe number
|
||||
@returns 0 for no SR, 1 for SR
|
||||
*/
|
||||
void ue_get_sdu(module_id_t module_idP, int CC_id, frame_t frameP,
|
||||
sub_frame_t subframe, uint8_t eNB_index,
|
||||
uint8_t * ulsch_buffer, uint16_t buflen,
|
||||
uint8_t * access_mode);
|
||||
|
||||
/* \brief Called by PHY to get sdu for PSBCH/SSS/PSS transmission.
|
||||
@param Mod_id Instance id of UE in machine
|
||||
@param frame_tx TX frame index
|
||||
@param subframe_tx TX subframe index
|
||||
@returns pointer to SLSS_t descriptor
|
||||
*/
|
||||
SLSS_t *ue_get_slss(module_id_t module_idP, int CC_id,frame_t frameP, sub_frame_t subframe);
|
||||
|
||||
/* \brief Called by PHY to get sdu for PSDCH transmission.
|
||||
@param Mod_id Instance id of UE in machine
|
||||
@param frame_tx TX frame index
|
||||
@param subframe_tx TX subframe index
|
||||
@returns pointer to SLDCH_t descriptor
|
||||
*/
|
||||
SLDCH_t *ue_get_sldch(module_id_t module_idP, int CC_id,frame_t frameP, sub_frame_t subframe);
|
||||
|
||||
/* \brief Called by PHY to get sdu for PSSCH transmission.
|
||||
@param Mod_id Instance id of UE in machine
|
||||
@param frame_tx TX frame index
|
||||
@param subframe_tx TX subframe index
|
||||
@returns pointer to SLSCH_t descriptor
|
||||
*/
|
||||
SLSCH_t *ue_get_slsch(module_id_t module_idP, int CC_id,frame_t frameP, sub_frame_t subframe);
|
||||
|
||||
/* \brief Function called by PHY to retrieve information to be transmitted using the RA procedure. If the UE is not in PUSCH mode for a particular eNB index, this is assumed to be an Msg3 and MAC attempts to retrieves the CCCH message from RRC. If the UE is in PUSCH mode for a particular eNB index and PUCCH format 0 (Scheduling Request) is not activated, the MAC may use this resource for random-access to transmit a BSR along with the C-RNTI control element (see 5.1.4 from 36.321)
|
||||
@param Mod_id Index of UE instance
|
||||
@param Mod_id Component Carrier Index
|
||||
@@ -636,12 +671,14 @@ int to_prb(int);
|
||||
int to_rbg(int);
|
||||
int mac_init(void);
|
||||
int add_new_ue(module_id_t Mod_id, int CC_id, rnti_t rnti, int harq_pid
|
||||
#ifdef Rel14
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
, uint8_t rach_resource_type
|
||||
#endif
|
||||
);
|
||||
int rrc_mac_remove_ue(module_id_t Mod_id, rnti_t rntiP);
|
||||
|
||||
void store_dlsch_buffer(module_id_t Mod_id, slice_id_t slice_id, frame_t frameP, sub_frame_t subframeP);
|
||||
void assign_rbs_required(module_id_t Mod_id, slice_id_t slice_id, frame_t frameP, sub_frame_t subframe, uint16_t nb_rbs_required[NFAPI_CC_MAX][MAX_MOBILES_PER_ENB], int min_rb_unit[NFAPI_CC_MAX]);
|
||||
|
||||
int maxround(module_id_t Mod_id, uint16_t rnti, int frame,
|
||||
sub_frame_t subframe, uint8_t ul_flag);
|
||||
@@ -652,9 +689,17 @@ int UE_num_active_CC(UE_list_t * listP, int ue_idP);
|
||||
int UE_PCCID(module_id_t mod_idP, int ue_idP);
|
||||
rnti_t UE_RNTI(module_id_t mod_idP, int ue_idP);
|
||||
|
||||
uint8_t find_rb_table_index(uint8_t average_rbs);
|
||||
|
||||
void set_ul_DAI(int module_idP,
|
||||
int UE_idP,
|
||||
int CC_idP,
|
||||
int frameP,
|
||||
int subframeP);
|
||||
|
||||
void ulsch_scheduler_pre_processor(module_id_t module_idP, slice_id_t slice_id, int frameP,
|
||||
sub_frame_t subframeP,
|
||||
unsigned char sched_subframeP,
|
||||
uint16_t * first_rb);
|
||||
void store_ulsch_buffer(module_id_t module_idP, int frameP,
|
||||
sub_frame_t subframeP);
|
||||
@@ -663,6 +708,7 @@ void assign_max_mcs_min_rb(module_id_t module_idP, int slice_id, int frameP,
|
||||
sub_frame_t subframeP, uint16_t * first_rb);
|
||||
void adjust_bsr_info(int buffer_occupancy, uint16_t TBS,
|
||||
UE_TEMPLATE * UE_template);
|
||||
|
||||
int phy_stats_exist(module_id_t Mod_id, int rnti);
|
||||
void sort_UEs(module_id_t Mod_idP, slice_id_t slice_id, int frameP, sub_frame_t subframeP);
|
||||
|
||||
@@ -829,7 +875,7 @@ uint32_t allocate_prbs_sub(int nb_rb, int N_RB_DL, int N_RBG,
|
||||
uint8_t * rballoc);
|
||||
|
||||
void update_ul_dci(module_id_t module_idP, uint8_t CC_id, rnti_t rnti,
|
||||
uint8_t dai);
|
||||
uint8_t dai, sub_frame_t subframe);
|
||||
|
||||
int get_bw_index(module_id_t module_id, uint8_t CC_id);
|
||||
|
||||
@@ -887,20 +933,20 @@ int rrc_mac_config_req_eNB(module_id_t module_idP,
|
||||
int p_eNB,
|
||||
int Ncp,
|
||||
int eutra_band, uint32_t dl_CarrierFreq,
|
||||
#ifdef Rel14
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
int pbch_repetition,
|
||||
#endif
|
||||
rnti_t rntiP,
|
||||
BCCH_BCH_Message_t * mib,
|
||||
RadioResourceConfigCommonSIB_t *
|
||||
radioResourceConfigCommon,
|
||||
#ifdef Rel14
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
RadioResourceConfigCommonSIB_t *
|
||||
radioResourceConfigCommon_BR,
|
||||
#endif
|
||||
struct PhysicalConfigDedicated
|
||||
*physicalConfigDedicated,
|
||||
#if defined(Rel10) || defined(Rel14)
|
||||
#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
SCellToAddMod_r10_t * sCellToAddMod_r10,
|
||||
//struct PhysicalConfigDedicatedSCell_r10 *physicalConfigDedicatedSCell_r10,
|
||||
#endif
|
||||
@@ -918,13 +964,13 @@ int rrc_mac_config_req_eNB(module_id_t module_idP,
|
||||
additionalSpectrumEmission,
|
||||
struct MBSFN_SubframeConfigList
|
||||
*mbsfn_SubframeConfigList
|
||||
#if defined(Rel10) || defined(Rel14)
|
||||
#if (RRC_VERSION >= MAKE_VERSION(9, 0, 0))
|
||||
,
|
||||
uint8_t MBMS_Flag,
|
||||
MBSFN_AreaInfoList_r9_t * mbsfn_AreaInfoList,
|
||||
PMCH_InfoList_r9_t * pmch_InfoList
|
||||
#endif
|
||||
#ifdef Rel14
|
||||
#if (RRC_VERSION >= MAKE_VERSION(13, 0, 0))
|
||||
,
|
||||
SystemInformationBlockType1_v1310_IEs_t *
|
||||
sib1_ext_r13
|
||||
@@ -958,7 +1004,7 @@ int rrc_mac_config_req_ue(module_id_t module_idP,
|
||||
radioResourceConfigCommon,
|
||||
struct PhysicalConfigDedicated
|
||||
*physicalConfigDedicated,
|
||||
#if defined(Rel10) || defined(Rel14)
|
||||
#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
SCellToAddMod_r10_t * sCellToAddMod_r10,
|
||||
//struct PhysicalConfigDedicatedSCell_r10 *physicalConfigDedicatedSCell_r10,
|
||||
#endif
|
||||
@@ -977,7 +1023,7 @@ int rrc_mac_config_req_ue(module_id_t module_idP,
|
||||
additionalSpectrumEmission,
|
||||
struct MBSFN_SubframeConfigList
|
||||
*mbsfn_SubframeConfigList
|
||||
#if defined(Rel10) || defined(Rel14)
|
||||
#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
,
|
||||
uint8_t MBMS_Flag,
|
||||
MBSFN_AreaInfoList_r9_t * mbsfn_AreaInfoList,
|
||||
@@ -987,7 +1033,13 @@ int rrc_mac_config_req_ue(module_id_t module_idP,
|
||||
,
|
||||
uint8_t num_active_cba_groups, uint16_t cba_rnti
|
||||
#endif
|
||||
);
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
,config_action_t config_action
|
||||
,const uint32_t * const sourceL2Id
|
||||
,const uint32_t * const destinationL2Id
|
||||
#endif
|
||||
);
|
||||
|
||||
|
||||
uint16_t getRIV(uint16_t N_RB_DL, uint16_t RBstart, uint16_t Lcrbs);
|
||||
|
||||
@@ -1009,6 +1061,12 @@ uint16_t mac_computeRIV(uint16_t N_RB_DL, uint16_t RBstart,
|
||||
|
||||
int get_phich_resource_times6(COMMON_channels_t * cc);
|
||||
|
||||
uint8_t frame_subframe2_dl_harq_pid(TDD_Config_t *tdd_Config, int abs_frameP, sub_frame_t subframeP);
|
||||
|
||||
uint8_t ul_subframe2_k_phich(COMMON_channels_t * cc, sub_frame_t ul_subframe);
|
||||
|
||||
unsigned char ul_ACK_subframe2M(TDD_Config_t *tdd_Config,unsigned char subframe);
|
||||
|
||||
int to_rbg(int dl_Bandwidth);
|
||||
|
||||
int to_prb(int dl_Bandwidth);
|
||||
@@ -1054,7 +1112,7 @@ void extract_pusch_csi(module_id_t mod_idP, int CC_idP, int UE_id,
|
||||
|
||||
uint16_t fill_nfapi_tx_req(nfapi_tx_request_body_t * tx_req_body,
|
||||
uint16_t absSF, uint16_t pdu_length,
|
||||
uint16_t pdu_index, uint8_t * pdu);
|
||||
int16_t pdu_index, uint8_t * pdu);
|
||||
|
||||
void fill_nfapi_ulsch_config_request_rel8(nfapi_ul_config_request_pdu_t *
|
||||
ul_config_pdu, uint8_t cqi_req,
|
||||
@@ -1078,7 +1136,7 @@ void fill_nfapi_ulsch_config_request_rel8(nfapi_ul_config_request_pdu_t *
|
||||
uint8_t current_tx_nb,
|
||||
uint8_t n_srs, uint16_t size);
|
||||
|
||||
#ifdef Rel14
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
void fill_nfapi_ulsch_config_request_emtc(nfapi_ul_config_request_pdu_t *
|
||||
ul_config_pdu, uint8_t ue_type,
|
||||
uint16_t
|
||||
@@ -1094,7 +1152,7 @@ void program_dlsch_acknak(module_id_t module_idP, int CC_idP, int UE_idP,
|
||||
|
||||
void fill_nfapi_dlsch_config(eNB_MAC_INST * eNB,
|
||||
nfapi_dl_config_request_body_t * dl_req,
|
||||
uint16_t length, uint16_t pdu_index,
|
||||
uint16_t length, int16_t pdu_index,
|
||||
uint16_t rnti,
|
||||
uint8_t resource_allocation_type,
|
||||
uint8_t
|
||||
@@ -1128,7 +1186,8 @@ void fill_nfapi_ulsch_harq_information(module_id_t module_idP,
|
||||
int CC_idP,
|
||||
uint16_t rntiP,
|
||||
nfapi_ul_config_ulsch_harq_information
|
||||
* harq_information);
|
||||
* harq_information,
|
||||
sub_frame_t subframeP);
|
||||
|
||||
uint16_t fill_nfapi_uci_acknak(module_id_t module_idP,
|
||||
int CC_idP,
|
||||
@@ -1154,7 +1213,7 @@ uint8_t get_tmode(module_id_t module_idP, int CC_idP, int UE_idP);
|
||||
uint8_t get_ul_req_index(module_id_t module_idP, int CC_idP,
|
||||
sub_frame_t subframeP);
|
||||
|
||||
#ifdef Rel14
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
int get_numnarrowbandbits(long dl_Bandwidth);
|
||||
|
||||
int mpdcch_sf_condition(eNB_MAC_INST * eNB, int CC_id, frame_t frameP,
|
||||
@@ -1177,11 +1236,20 @@ uint32_t from_earfcn(int eutra_bandP, uint32_t dl_earfcn);
|
||||
int32_t get_uldl_offset(int eutra_bandP);
|
||||
int l2_init_ue(int eMBMS_active, char *uecap_xer, uint8_t cba_group_active,
|
||||
uint8_t HO_active);
|
||||
#if defined(PRE_SCD_THREAD)
|
||||
void pre_scd_nb_rbs_required( module_id_t module_idP,
|
||||
frame_t frameP,
|
||||
sub_frame_t subframeP,
|
||||
int min_rb_unit[MAX_NUM_CCs],
|
||||
uint16_t nb_rbs_required[MAX_NUM_CCs][NUMBER_OF_UE_MAX]);
|
||||
#endif
|
||||
|
||||
/*Slice related functions */
|
||||
uint16_t flexran_nb_rbs_allowed_slice(float rb_percentage, int total_rbs);
|
||||
|
||||
int ue_slice_membership(int UE_id, int slice_id);
|
||||
|
||||
/* from here: prototypes to get rid of compilation warnings: doc to be written by function author */
|
||||
uint8_t ul_subframe2_k_phich(COMMON_channels_t * cc, sub_frame_t ul_subframe);
|
||||
#endif
|
||||
/** @}*/
|
||||
|
||||
@@ -124,7 +124,7 @@ DCI1A_5MHz_TDD_1_6_t BCCH_alloc_pdu;
|
||||
DCI1A_5MHz_TDD_1_6_t CCCH_alloc_pdu;
|
||||
DCI1_5MHz_TDD_t DLSCH_alloc_pdu;
|
||||
|
||||
#if defined(Rel10) || defined(Rel14)
|
||||
#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
DCI1C_5MHz_t MCCH_alloc_pdu;
|
||||
#endif
|
||||
|
||||
@@ -142,4 +142,6 @@ DCI2_5MHz_2A_TDD_t DLSCH_alloc_pdu2;
|
||||
|
||||
DCI1E_5MHz_2A_M10PRB_TDD_t DLSCH_alloc_pdu1E;
|
||||
|
||||
mac_rlc_am_muilist_t rlc_am_mui;
|
||||
SCHEDULER_MODES global_scheduler_mode;
|
||||
#endif
|
||||
|
||||
+74
-80
@@ -38,7 +38,7 @@
|
||||
//#include "SCHED/sched_eNB.h"
|
||||
#include "LAYER2/PDCP_v10.1.0/pdcp.h"
|
||||
#include "RRC/LTE/rrc_defs.h"
|
||||
#include "UTIL/LOG/log.h"
|
||||
#include "common/utils/LOG/log.h"
|
||||
#include "RRC/L2_INTERFACE/openair_rrc_L2_interface.h"
|
||||
|
||||
#include "common/ran_context.h"
|
||||
@@ -46,73 +46,79 @@
|
||||
extern RAN_CONTEXT_t RC;
|
||||
|
||||
|
||||
void mac_top_init_eNB(void)
|
||||
{
|
||||
void mac_top_init_eNB(void){
|
||||
|
||||
module_id_t i, j;
|
||||
int list_el;
|
||||
UE_list_t *UE_list;
|
||||
eNB_MAC_INST *mac;
|
||||
|
||||
LOG_I(MAC, "[MAIN] Init function start:nb_macrlc_inst=%d\n",
|
||||
RC.nb_macrlc_inst);
|
||||
LOG_I(MAC, "[MAIN] Init function start:nb_macrlc_inst=%d\n",RC.nb_macrlc_inst);
|
||||
|
||||
if (RC.nb_macrlc_inst > 0) {
|
||||
|
||||
RC.mac = (eNB_MAC_INST **) malloc16(RC.nb_macrlc_inst *sizeof(eNB_MAC_INST *));
|
||||
|
||||
AssertFatal(RC.mac != NULL,"can't ALLOCATE %zu Bytes for %d eNB_MAC_INST with size %zu \n",
|
||||
|
||||
if (RC.mac == NULL){
|
||||
RC.mac = (eNB_MAC_INST **) malloc16(RC.nb_macrlc_inst *sizeof(eNB_MAC_INST *));
|
||||
bzero(RC.mac, RC.nb_macrlc_inst * sizeof(eNB_MAC_INST *));
|
||||
}
|
||||
|
||||
AssertFatal(RC.mac != NULL,
|
||||
"can't ALLOCATE %zu Bytes for %d eNB_MAC_INST with size %zu \n",
|
||||
RC.nb_macrlc_inst * sizeof(eNB_MAC_INST *),
|
||||
RC.nb_macrlc_inst, sizeof(eNB_MAC_INST));
|
||||
|
||||
for (i = 0; i < RC.nb_macrlc_inst; i++) {
|
||||
if (RC.mac[i] == NULL) {
|
||||
RC.mac[i] = (eNB_MAC_INST *) malloc16(sizeof(eNB_MAC_INST));
|
||||
|
||||
AssertFatal(RC.mac != NULL,"can't ALLOCATE %zu Bytes for %d eNB_MAC_INST with size %zu \n",
|
||||
AssertFatal(RC.mac[i] != NULL,
|
||||
"can't ALLOCATE %zu Bytes for %d eNB_MAC_INST with size %zu \n",
|
||||
RC.nb_macrlc_inst * sizeof(eNB_MAC_INST *),
|
||||
RC.nb_macrlc_inst, sizeof(eNB_MAC_INST));
|
||||
LOG_D(MAC,"[MAIN] ALLOCATE %zu Bytes for %d eNB_MAC_INST @ %p\n",
|
||||
sizeof(eNB_MAC_INST), RC.nb_macrlc_inst, RC.mac);
|
||||
|
||||
LOG_D(MAC,"[MAIN] ALLOCATE %zu Bytes for %d eNB_MAC_INST @ %p\n",sizeof(eNB_MAC_INST), RC.nb_macrlc_inst, RC.mac);
|
||||
|
||||
bzero(RC.mac[i], sizeof(eNB_MAC_INST));
|
||||
}
|
||||
|
||||
RC.mac[i]->Mod_id = i;
|
||||
|
||||
for (j = 0; j < MAX_NUM_CCs; j++) {
|
||||
RC.mac[i]->DL_req[j].dl_config_request_body.dl_config_pdu_list = RC.mac[i]->dl_config_pdu_list[j];
|
||||
RC.mac[i]->UL_req[j].ul_config_request_body.ul_config_pdu_list = RC.mac[i]->ul_config_pdu_list[j];
|
||||
|
||||
for (int k = 0; k < 10; k++)
|
||||
RC.mac[i]->UL_req_tmp[j][k].ul_config_request_body.ul_config_pdu_list =RC.mac[i]->ul_config_pdu_list_tmp[j][k];
|
||||
|
||||
RC.mac[i]->Mod_id = i;
|
||||
|
||||
for (j = 0; j < MAX_NUM_CCs; j++) {
|
||||
RC.mac[i]->DL_req[j].dl_config_request_body.
|
||||
dl_config_pdu_list = RC.mac[i]->dl_config_pdu_list[j];
|
||||
RC.mac[i]->UL_req[j].ul_config_request_body.
|
||||
ul_config_pdu_list = RC.mac[i]->ul_config_pdu_list[j];
|
||||
|
||||
for (int k = 0; k < 10; k++)
|
||||
RC.mac[i]->UL_req_tmp[j][k].ul_config_request_body.ul_config_pdu_list =RC.mac[i]->ul_config_pdu_list_tmp[j][k];
|
||||
|
||||
RC.mac[i]->HI_DCI0_req[j].hi_dci0_request_body.hi_dci0_pdu_list =RC.mac[i]->hi_dci0_pdu_list[j];
|
||||
RC.mac[i]->TX_req[j].tx_request_body.tx_pdu_list =
|
||||
RC.mac[i]->tx_request_pdu[j];
|
||||
RC.mac[i]->ul_handle = 0;
|
||||
|
||||
for(int sf=0;sf<10;sf++){
|
||||
RC.mac[i]->HI_DCI0_req[j][sf].hi_dci0_request_body.hi_dci0_pdu_list =RC.mac[i]->hi_dci0_pdu_list[j][sf];
|
||||
}
|
||||
}//END for (i = 0; i < RC.nb_macrlc_inst; i++)
|
||||
|
||||
AssertFatal(rlc_module_init() == 0,
|
||||
"Could not initialize RLC layer\n");
|
||||
RC.mac[i]->TX_req[j].tx_request_body.tx_pdu_list =RC.mac[i]->tx_request_pdu[j];
|
||||
RC.mac[i]->ul_handle = 0;
|
||||
}
|
||||
}
|
||||
|
||||
// These should be out of here later
|
||||
pdcp_layer_init();
|
||||
AssertFatal(rlc_module_init() == 0,"Could not initialize RLC layer\n");
|
||||
|
||||
rrc_init_global_param();
|
||||
// These should be out of here later
|
||||
pdcp_layer_init();
|
||||
|
||||
}else {
|
||||
rrc_init_global_param();
|
||||
|
||||
}else{
|
||||
RC.mac = NULL;
|
||||
}
|
||||
|
||||
// Initialize Linked-List for Active UEs
|
||||
for (i = 0; i < RC.nb_macrlc_inst; i++) {
|
||||
|
||||
mac = RC.mac[i];
|
||||
|
||||
|
||||
mac->if_inst = IF_Module_init(i);
|
||||
|
||||
UE_list = &mac->UE_list;
|
||||
|
||||
UE_list->num_UEs = 0;
|
||||
UE_list->head = -1;
|
||||
UE_list->head_ul = -1;
|
||||
@@ -126,74 +132,62 @@ void mac_top_init_eNB(void)
|
||||
UE_list->next[list_el] = -1;
|
||||
UE_list->next_ul[list_el] = -1;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void mac_init_cell_params(int Mod_idP, int CC_idP)
|
||||
{
|
||||
void mac_init_cell_params(int Mod_idP, int CC_idP){
|
||||
|
||||
int j;
|
||||
UE_TEMPLATE *UE_template;
|
||||
int j;
|
||||
UE_TEMPLATE *UE_template;
|
||||
|
||||
LOG_D(MAC, "[MSC_NEW][FRAME 00000][MAC_eNB][MOD %02d][]\n", Mod_idP);
|
||||
//COMMON_channels_t *cc = &RC.mac[Mod_idP]->common_channels[CC_idP];
|
||||
LOG_D(MAC, "[MSC_NEW][FRAME 00000][MAC_eNB][MOD %02d][]\n", Mod_idP);
|
||||
//COMMON_channels_t *cc = &RC.mac[Mod_idP]->common_channels[CC_idP];
|
||||
|
||||
memset(&RC.mac[Mod_idP]->eNB_stats, 0, sizeof(eNB_STATS));
|
||||
UE_template =
|
||||
(UE_TEMPLATE *) & RC.mac[Mod_idP]->UE_list.UE_template[CC_idP][0];
|
||||
memset(&RC.mac[Mod_idP]->eNB_stats, 0, sizeof(eNB_STATS));
|
||||
UE_template = (UE_TEMPLATE *) & RC.mac[Mod_idP]->UE_list.UE_template[CC_idP][0];
|
||||
|
||||
for (j = 0; j < MAX_MOBILES_PER_ENB; j++) {
|
||||
UE_template[j].rnti = 0;
|
||||
// initiallize the eNB to UE statistics
|
||||
memset(&RC.mac[Mod_idP]->UE_list.eNB_UE_stats[CC_idP][j], 0,
|
||||
sizeof(eNB_UE_STATS));
|
||||
}
|
||||
for (j = 0; j < MAX_MOBILES_PER_ENB; j++) {
|
||||
UE_template[j].rnti = 0;
|
||||
// initiallize the eNB to UE statistics
|
||||
memset(&RC.mac[Mod_idP]->UE_list.eNB_UE_stats[CC_idP][j], 0,sizeof(eNB_UE_STATS));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
int rlcmac_init_global_param(void)
|
||||
{
|
||||
int rlcmac_init_global_param(void){
|
||||
LOG_I(MAC, "[MAIN] CALLING RLC_MODULE_INIT...\n");
|
||||
|
||||
if (rlc_module_init() != 0) {
|
||||
return (-1);
|
||||
}
|
||||
|
||||
LOG_I(MAC, "[MAIN] CALLING RLC_MODULE_INIT...\n");
|
||||
pdcp_layer_init();
|
||||
|
||||
if (rlc_module_init() != 0) {
|
||||
return (-1);
|
||||
}
|
||||
LOG_I(MAC, "[MAIN] Init Global Param Done\n");
|
||||
|
||||
pdcp_layer_init();
|
||||
|
||||
LOG_I(MAC, "[MAIN] Init Global Param Done\n");
|
||||
|
||||
return 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
void mac_top_cleanup(void)
|
||||
{
|
||||
void mac_top_cleanup(void){
|
||||
|
||||
if (NB_UE_INST > 0) {
|
||||
free(UE_mac_inst);
|
||||
}
|
||||
if (NB_UE_INST > 0) {
|
||||
free(UE_mac_inst);
|
||||
}
|
||||
|
||||
if (RC.nb_macrlc_inst > 0) {
|
||||
free(RC.mac);
|
||||
}
|
||||
if (RC.nb_macrlc_inst > 0) {
|
||||
free(RC.mac);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
int l2_init_eNB(void)
|
||||
{
|
||||
int l2_init_eNB(void){
|
||||
|
||||
LOG_I(MAC, "[MAIN] MAC_INIT_GLOBAL_PARAM IN...\n");
|
||||
|
||||
rlcmac_init_global_param();
|
||||
|
||||
LOG_I(MAC, "[MAIN] MAC_INIT_GLOBAL_PARAM IN...\n");
|
||||
LOG_D(MAC, "[MAIN] ALL INIT OK\n");
|
||||
|
||||
rlcmac_init_global_param();
|
||||
|
||||
LOG_D(MAC, "[MAIN] ALL INIT OK\n");
|
||||
|
||||
|
||||
return (1);
|
||||
return (1);
|
||||
}
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
#include "SCHED_UE/sched_UE.h"
|
||||
#include "LAYER2/PDCP_v10.1.0/pdcp.h"
|
||||
#include "RRC/LTE/rrc_defs.h"
|
||||
#include "UTIL/LOG/log.h"
|
||||
#include "common/utils/LOG/log.h"
|
||||
#include "RRC/L2_INTERFACE/openair_rrc_L2_interface.h"
|
||||
|
||||
|
||||
|
||||
@@ -36,14 +36,15 @@
|
||||
#include "LAYER2/MAC/mac.h"
|
||||
#include "LAYER2/MAC/mac_proto.h"
|
||||
#include "LAYER2/MAC/mac_extern.h"
|
||||
#include "UTIL/LOG/log.h"
|
||||
#include "UTIL/LOG/vcd_signal_dumper.h"
|
||||
#include "common/utils/LOG/log.h"
|
||||
#include "common/utils/LOG/vcd_signal_dumper.h"
|
||||
#include "UTIL/OPT/opt.h"
|
||||
#include "OCG.h"
|
||||
#include "OCG_extern.h"
|
||||
#include "RRC/LTE/rrc_extern.h"
|
||||
#include "RRC/L2_INTERFACE/openair_rrc_L2_interface.h"
|
||||
#include "rlc.h"
|
||||
#include "PHY/LTE_TRANSPORT/transport_common_proto.h"
|
||||
|
||||
#include "common/ran_context.h"
|
||||
|
||||
@@ -125,13 +126,19 @@ store_dlsch_buffer(module_id_t Mod_id, slice_id_t slice_id, frame_t frameP,
|
||||
UE_template->dl_buffer_head_sdu_remaining_size_to_send[i] = 0;
|
||||
}
|
||||
|
||||
|
||||
rnti = UE_RNTI(Mod_id, UE_id);
|
||||
|
||||
for (i = 0; i < MAX_NUM_LCID; i++) { // loop over all the logical channels
|
||||
for (i = 0; i < MAX_NUM_LCID; i++) { // loop over all the logical channels
|
||||
|
||||
rlc_status =
|
||||
mac_rlc_status_ind(Mod_id, rnti, Mod_id, frameP, subframeP,
|
||||
ENB_FLAG_YES, MBMS_FLAG_NO, i, 0);
|
||||
ENB_FLAG_YES, MBMS_FLAG_NO, i, 0
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
,0, 0
|
||||
#endif
|
||||
);
|
||||
|
||||
UE_template->dl_buffer_info[i] = rlc_status.bytes_in_buffer; //storing the dlsch buffer for each logical channel
|
||||
UE_template->dl_pdus_in_buffer[i] = rlc_status.pdus_in_buffer;
|
||||
UE_template->dl_buffer_head_sdu_creation_time[i] =
|
||||
@@ -208,7 +215,6 @@ assign_rbs_required(module_id_t Mod_id,
|
||||
|
||||
//update CQI information across component carriers
|
||||
for (n = 0; n < UE_list->numactiveCCs[UE_id]; n++) {
|
||||
|
||||
CC_id = UE_list->ordered_CCids[n][UE_id];
|
||||
eNB_UE_stats = &UE_list->eNB_UE_stats[CC_id][UE_id];
|
||||
|
||||
@@ -312,10 +318,8 @@ maxround(module_id_t Mod_id, uint16_t rnti, int frame,
|
||||
cc = &RC.mac[Mod_id]->common_channels[CC_id];
|
||||
|
||||
UE_id = find_UE_id(Mod_id, rnti);
|
||||
if (cc->tdd_Config)
|
||||
harq_pid = ((frame * 10) + subframe) % 10;
|
||||
else
|
||||
harq_pid = ((frame * 10) + subframe) & 7;
|
||||
|
||||
harq_pid = frame_subframe2_dl_harq_pid(cc->tdd_Config,frame ,subframe);
|
||||
|
||||
round = UE_list->UE_sched_ctrl[UE_id].round[CC_id][harq_pid];
|
||||
if (round > round_max) {
|
||||
@@ -426,36 +430,6 @@ static int ue_dl_compare(const void *_a, const void *_b, void *_params)
|
||||
}
|
||||
|
||||
return 0;
|
||||
#if 0
|
||||
/* The above order derives from the following. */
|
||||
if (round2 > round1) { // Check first if one of the UEs has an active HARQ process which needs service and swap order
|
||||
swap_UEs(UE_list, UE_id1, UE_id2, 0);
|
||||
} else if (round2 == round1) {
|
||||
// RK->NN : I guess this is for fairness in the scheduling. This doesn't make sense unless all UEs have the same configuration of logical channels. This should be done on the sum of all information that has to be sent. And still it wouldn't ensure fairness. It should be based on throughput seen by each UE or maybe using the head_sdu_creation_time, i.e. swap UEs if one is waiting longer for service.
|
||||
// for(j=0;j<MAX_NUM_LCID;j++){
|
||||
// if (eNB_mac_inst[Mod_id][pCC_id1].UE_template[UE_id1].dl_buffer_info[j] <
|
||||
// eNB_mac_inst[Mod_id][pCC_id2].UE_template[UE_id2].dl_buffer_info[j]){
|
||||
|
||||
// first check the buffer status for SRB1 and SRB2
|
||||
|
||||
if ((UE_list->UE_template[pCC_id1][UE_id1].dl_buffer_info[1] +
|
||||
UE_list->UE_template[pCC_id1][UE_id1].dl_buffer_info[2]) <
|
||||
(UE_list->UE_template[pCC_id2][UE_id2].dl_buffer_info[1] +
|
||||
UE_list->UE_template[pCC_id2][UE_id2].dl_buffer_info[2])) {
|
||||
swap_UEs(UE_list, UE_id1, UE_id2, 0);
|
||||
} else if (UE_list->UE_template[pCC_id1]
|
||||
[UE_id1].dl_buffer_head_sdu_creation_time_max <
|
||||
UE_list->UE_template[pCC_id2]
|
||||
[UE_id2].dl_buffer_head_sdu_creation_time_max) {
|
||||
swap_UEs(UE_list, UE_id1, UE_id2, 0);
|
||||
} else if (UE_list->UE_template[pCC_id1][UE_id1].dl_buffer_total <
|
||||
UE_list->UE_template[pCC_id2][UE_id2].dl_buffer_total) {
|
||||
swap_UEs(UE_list, UE_id1, UE_id2, 0);
|
||||
} else if (cqi1 < cqi2) {
|
||||
swap_UEs(UE_list, UE_id1, UE_id2, 0);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
void decode_sorting_policy(module_id_t Mod_idP, slice_id_t slice_id) {
|
||||
@@ -495,8 +469,6 @@ void sort_UEs(module_id_t Mod_idP, slice_id_t slice_id, int frameP, sub_frame_t
|
||||
continue;
|
||||
if ((rnti = UE_RNTI(Mod_idP, i)) == NOT_A_RNTI)
|
||||
continue;
|
||||
if (UE_list->UE_sched_ctrl[i].ul_out_of_sync == 1)
|
||||
continue;
|
||||
if (!ue_slice_membership(i, slice_id))
|
||||
continue;
|
||||
|
||||
@@ -516,78 +488,6 @@ void sort_UEs(module_id_t Mod_idP, slice_id_t slice_id, int frameP, sub_frame_t
|
||||
} else {
|
||||
UE_list->head = -1;
|
||||
}
|
||||
|
||||
#if 0
|
||||
|
||||
|
||||
int UE_id1, UE_id2;
|
||||
int pCC_id1, pCC_id2;
|
||||
int cqi1, cqi2, round1, round2;
|
||||
int i = 0, ii = 0; //,j=0;
|
||||
rnti_t rnti1, rnti2;
|
||||
|
||||
UE_list_t *UE_list = &RC.mac[Mod_idP]->UE_list;
|
||||
|
||||
for (i = UE_list->head; i >= 0; i = UE_list->next[i]) {
|
||||
|
||||
for (ii = UE_list->next[i]; ii >= 0; ii = UE_list->next[ii]) {
|
||||
|
||||
UE_id1 = i;
|
||||
rnti1 = UE_RNTI(Mod_idP, UE_id1);
|
||||
if (rnti1 == NOT_A_RNTI)
|
||||
continue;
|
||||
if (UE_list->UE_sched_ctrl[UE_id1].ul_out_of_sync == 1)
|
||||
continue;
|
||||
pCC_id1 = UE_PCCID(Mod_idP, UE_id1);
|
||||
cqi1 = maxcqi(Mod_idP, UE_id1); //
|
||||
round1 = maxround(Mod_idP, rnti1, frameP, subframeP, 0);
|
||||
|
||||
UE_id2 = ii;
|
||||
rnti2 = UE_RNTI(Mod_idP, UE_id2);
|
||||
if (rnti2 == NOT_A_RNTI)
|
||||
continue;
|
||||
if (UE_list->UE_sched_ctrl[UE_id2].ul_out_of_sync == 1)
|
||||
continue;
|
||||
cqi2 = maxcqi(Mod_idP, UE_id2);
|
||||
round2 = maxround(Mod_idP, rnti2, frameP, subframeP, 0); //mac_xface->get_ue_active_harq_pid(Mod_id,rnti2,subframe,&harq_pid2,&round2,0);
|
||||
pCC_id2 = UE_PCCID(Mod_idP, UE_id2);
|
||||
|
||||
if (round2 > round1) { // Check first if one of the UEs has an active HARQ process which needs service and swap order
|
||||
swap_UEs(UE_list, UE_id1, UE_id2, 0);
|
||||
} else if (round2 == round1) {
|
||||
// RK->NN : I guess this is for fairness in the scheduling. This doesn't make sense unless all UEs have the same configuration of logical channels. This should be done on the sum of all information that has to be sent. And still it wouldn't ensure fairness. It should be based on throughput seen by each UE or maybe using the head_sdu_creation_time, i.e. swap UEs if one is waiting longer for service.
|
||||
// for(j=0;j<MAX_NUM_LCID;j++){
|
||||
// if (eNB_mac_inst[Mod_id][pCC_id1].UE_template[UE_id1].dl_buffer_info[j] <
|
||||
// eNB_mac_inst[Mod_id][pCC_id2].UE_template[UE_id2].dl_buffer_info[j]){
|
||||
|
||||
// first check the buffer status for SRB1 and SRB2
|
||||
|
||||
if ((UE_list->UE_template[pCC_id1][UE_id1].
|
||||
dl_buffer_info[1] +
|
||||
UE_list->UE_template[pCC_id1][UE_id1].
|
||||
dl_buffer_info[2]) <
|
||||
(UE_list->UE_template[pCC_id2][UE_id2].
|
||||
dl_buffer_info[1] +
|
||||
UE_list->UE_template[pCC_id2][UE_id2].
|
||||
dl_buffer_info[2])) {
|
||||
swap_UEs(UE_list, UE_id1, UE_id2, 0);
|
||||
} else if (UE_list->UE_template[pCC_id1]
|
||||
[UE_id1].dl_buffer_head_sdu_creation_time_max <
|
||||
UE_list->UE_template[pCC_id2]
|
||||
[UE_id2].dl_buffer_head_sdu_creation_time_max) {
|
||||
swap_UEs(UE_list, UE_id1, UE_id2, 0);
|
||||
} else if (UE_list->UE_template[pCC_id1][UE_id1].
|
||||
dl_buffer_total <
|
||||
UE_list->UE_template[pCC_id2][UE_id2].
|
||||
dl_buffer_total) {
|
||||
swap_UEs(UE_list, UE_id1, UE_id2, 0);
|
||||
} else if (cqi1 < cqi2) {
|
||||
swap_UEs(UE_list, UE_id1, UE_id2, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
void dlsch_scheduler_pre_processor_accounting(module_id_t Mod_id,
|
||||
@@ -632,8 +532,6 @@ void dlsch_scheduler_pre_processor_accounting(module_id_t Mod_id,
|
||||
|
||||
if (rnti == NOT_A_RNTI)
|
||||
continue;
|
||||
if (UE_list->UE_sched_ctrl[UE_id].ul_out_of_sync == 1)
|
||||
continue;
|
||||
if (!ue_slice_membership(UE_id, slice_id))
|
||||
continue;
|
||||
|
||||
@@ -713,8 +611,6 @@ void dlsch_scheduler_pre_processor_accounting(module_id_t Mod_id,
|
||||
|
||||
if (rnti == NOT_A_RNTI)
|
||||
continue;
|
||||
if (UE_list->UE_sched_ctrl[UE_id].ul_out_of_sync == 1)
|
||||
continue;
|
||||
if (!ue_slice_membership(UE_id, slice_id))
|
||||
continue;
|
||||
|
||||
@@ -722,11 +618,7 @@ void dlsch_scheduler_pre_processor_accounting(module_id_t Mod_id,
|
||||
CC_id = UE_list->ordered_CCids[ii][UE_id];
|
||||
ue_sched_ctl = &UE_list->UE_sched_ctrl[UE_id];
|
||||
cc = &RC.mac[Mod_id]->common_channels[CC_id];
|
||||
// TODO Can we use subframe2harqpid() here?
|
||||
if (cc->tdd_Config)
|
||||
harq_pid = ((frameP * 10) + subframeP) % 10;
|
||||
else
|
||||
harq_pid = ((frameP * 10) + subframeP) & 7;
|
||||
harq_pid = frame_subframe2_dl_harq_pid(cc->tdd_Config,frameP ,subframeP);
|
||||
round = ue_sched_ctl->round[CC_id][harq_pid];
|
||||
|
||||
// control channel or retransmission
|
||||
@@ -791,8 +683,6 @@ void dlsch_scheduler_pre_processor_accounting(module_id_t Mod_id,
|
||||
// LOG_D(MAC,"UE %d rnti 0x\n", UE_id, rnti );
|
||||
if (rnti == NOT_A_RNTI)
|
||||
continue;
|
||||
if (UE_list->UE_sched_ctrl[UE_id].ul_out_of_sync == 1)
|
||||
continue;
|
||||
if (!ue_slice_membership(UE_id, slice_id))
|
||||
continue;
|
||||
|
||||
@@ -1157,7 +1047,6 @@ dlsch_scheduler_pre_processor_reset(int module_idP,
|
||||
int i, j;
|
||||
UE_list_t *UE_list = &RC.mac[module_idP]->UE_list;
|
||||
UE_sched_ctrl *ue_sched_ctl = &UE_list->UE_sched_ctrl[UE_id];
|
||||
rnti_t rnti = UE_RNTI(module_idP, UE_id);
|
||||
|
||||
uint8_t *vrb_map = RC.mac[module_idP]->common_channels[CC_id].vrb_map;
|
||||
int N_RB_DL =
|
||||
@@ -1168,7 +1057,7 @@ dlsch_scheduler_pre_processor_reset(int module_idP,
|
||||
#endif
|
||||
|
||||
|
||||
LOG_D(MAC, "Running preprocessor for UE %d (%x)\n", UE_id, rnti);
|
||||
LOG_D(MAC, "Running preprocessor for UE %d (%x)\n", UE_id,(int)(UE_RNTI(module_idP, UE_id)));
|
||||
// initialize harq_pid and round
|
||||
|
||||
if (ue_sched_ctl->ta_timer)
|
||||
@@ -1187,7 +1076,6 @@ dlsch_scheduler_pre_processor_reset(int module_idP,
|
||||
&ue_sched_ctl->round[CC_id],
|
||||
openair_harq_DL);
|
||||
|
||||
|
||||
if (ue_sched_ctl->ta_timer == 0) {
|
||||
|
||||
// WE SHOULD PROTECT the eNB_UE_stats with a mutex here ...
|
||||
@@ -1396,11 +1284,12 @@ dlsch_scheduler_pre_processor_allocate(module_id_t Mod_id,
|
||||
|
||||
/// ULSCH PRE_PROCESSOR
|
||||
|
||||
|
||||
void
|
||||
ulsch_scheduler_pre_processor(module_id_t module_idP,
|
||||
slice_id_t slice_id, int frameP,
|
||||
sub_frame_t subframeP, uint16_t * first_rb)
|
||||
void ulsch_scheduler_pre_processor(module_id_t module_idP,
|
||||
slice_id_t slice_id,
|
||||
int frameP,
|
||||
sub_frame_t subframeP,
|
||||
unsigned char sched_subframeP,
|
||||
uint16_t *first_rb)
|
||||
{
|
||||
|
||||
int16_t i;
|
||||
@@ -1525,7 +1414,7 @@ ulsch_scheduler_pre_processor(module_id_t module_idP,
|
||||
CC_id = UE_list->ordered_ULCCids[n][UE_id];
|
||||
UE_template = &UE_list->UE_template[CC_id][UE_id];
|
||||
harq_pid = subframe2harqpid(&RC.mac[module_idP]->common_channels[CC_id],
|
||||
frameP, subframeP);
|
||||
frameP, sched_subframeP);
|
||||
|
||||
// mac_xface->get_ue_active_harq_pid(module_idP,CC_id,rnti,frameP,subframeP,&harq_pid,&round,openair_harq_UL);
|
||||
|
||||
@@ -1596,23 +1485,8 @@ ulsch_scheduler_pre_processor(module_id_t module_idP,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#if 0
|
||||
/* this logging is wrong, ue_sched_ctl may not be valid here
|
||||
* TODO: fix
|
||||
*/
|
||||
for (CC_id = 0; CC_id < RC.nb_mac_CC[module_idP]; CC_id++) {
|
||||
|
||||
if (total_allocated_rbs[CC_id] > 0) {
|
||||
LOG_D(MAC, "[eNB %d] total RB allocated for all UEs = %d/%d\n",
|
||||
module_idP, total_allocated_rbs[CC_id],
|
||||
ue_sched_ctl->max_rbs_allowed_slice_uplink[CC_id][slice_id] - first_rb[CC_id]);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
assign_max_mcs_min_rb(module_id_t module_idP, int slice_id, int frameP,
|
||||
sub_frame_t subframeP, uint16_t * first_rb)
|
||||
@@ -1796,31 +1670,6 @@ static int ue_ul_compare(const void *_a, const void *_b, void *_params)
|
||||
return 1;
|
||||
|
||||
return 0;
|
||||
|
||||
#if 0
|
||||
/* The above order derives from the following.
|
||||
* The last case is not handled: "if (UE_list->UE_template[pCCid2][UE_id2].ul_total_buffer > 0 )"
|
||||
* I don't think it makes a big difference.
|
||||
*/
|
||||
if (round2 > round1) {
|
||||
swap_UEs(UE_list, UE_id1, UE_id2, 1);
|
||||
} else if (round2 == round1) {
|
||||
if (UE_list->UE_template[pCCid1][UE_id1].ul_buffer_info[LCGID0] <
|
||||
UE_list->UE_template[pCCid2][UE_id2].ul_buffer_info[LCGID0]) {
|
||||
swap_UEs(UE_list, UE_id1, UE_id2, 1);
|
||||
} else if (UE_list->UE_template[pCCid1][UE_id1].ul_total_buffer <
|
||||
UE_list->UE_template[pCCid2][UE_id2].ul_total_buffer) {
|
||||
swap_UEs(UE_list, UE_id1, UE_id2, 1);
|
||||
} else if (UE_list->UE_template[pCCid1][UE_id1].
|
||||
pre_assigned_mcs_ul <
|
||||
UE_list->UE_template[pCCid2][UE_id2].
|
||||
pre_assigned_mcs_ul) {
|
||||
if (UE_list->UE_template[pCCid2][UE_id2].ul_total_buffer > 0) {
|
||||
swap_UEs(UE_list, UE_id1, UE_id2, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
void sort_ue_ul(module_id_t module_idP, int frameP, sub_frame_t subframeP)
|
||||
@@ -1855,71 +1704,4 @@ void sort_ue_ul(module_id_t module_idP, int frameP, sub_frame_t subframeP)
|
||||
} else {
|
||||
UE_list->head_ul = -1;
|
||||
}
|
||||
|
||||
#if 0
|
||||
int UE_id1, UE_id2;
|
||||
int pCCid1, pCCid2;
|
||||
int round1, round2;
|
||||
int i = 0, ii = 0;
|
||||
rnti_t rnti1, rnti2;
|
||||
|
||||
UE_list_t *UE_list = &RC.mac[module_idP]->UE_list;
|
||||
|
||||
for (i = UE_list->head_ul; i >= 0; i = UE_list->next_ul[i]) {
|
||||
|
||||
//LOG_I(MAC,"sort ue ul i %d\n",i);
|
||||
for (ii = UE_list->next_ul[i]; ii >= 0; ii = UE_list->next_ul[ii]) {
|
||||
//LOG_I(MAC,"sort ul ue 2 ii %d\n",ii);
|
||||
|
||||
UE_id1 = i;
|
||||
rnti1 = UE_RNTI(module_idP, UE_id1);
|
||||
|
||||
if (rnti1 == NOT_A_RNTI)
|
||||
continue;
|
||||
if (UE_list->UE_sched_ctrl[i].ul_out_of_sync == 1)
|
||||
continue;
|
||||
|
||||
|
||||
pCCid1 = UE_PCCID(module_idP, UE_id1);
|
||||
round1 = maxround(module_idP, rnti1, frameP, subframeP, 1);
|
||||
|
||||
UE_id2 = ii;
|
||||
rnti2 = UE_RNTI(module_idP, UE_id2);
|
||||
|
||||
if (rnti2 == NOT_A_RNTI)
|
||||
continue;
|
||||
if (UE_list->UE_sched_ctrl[UE_id2].ul_out_of_sync == 1)
|
||||
continue;
|
||||
|
||||
pCCid2 = UE_PCCID(module_idP, UE_id2);
|
||||
round2 = maxround(module_idP, rnti2, frameP, subframeP, 1);
|
||||
|
||||
if (round2 > round1) {
|
||||
swap_UEs(UE_list, UE_id1, UE_id2, 1);
|
||||
} else if (round2 == round1) {
|
||||
if (UE_list->
|
||||
UE_template[pCCid1][UE_id1].ul_buffer_info[LCGID0] <
|
||||
UE_list->UE_template[pCCid2][UE_id2].
|
||||
ul_buffer_info[LCGID0]) {
|
||||
swap_UEs(UE_list, UE_id1, UE_id2, 1);
|
||||
} else if (UE_list->UE_template[pCCid1][UE_id1].
|
||||
ul_total_buffer <
|
||||
UE_list->UE_template[pCCid2][UE_id2].
|
||||
ul_total_buffer) {
|
||||
swap_UEs(UE_list, UE_id1, UE_id2, 1);
|
||||
} else if (UE_list->
|
||||
UE_template[pCCid1][UE_id1].pre_assigned_mcs_ul
|
||||
<
|
||||
UE_list->
|
||||
UE_template[pCCid2][UE_id2].pre_assigned_mcs_ul)
|
||||
{
|
||||
if (UE_list->UE_template[pCCid2][UE_id2].
|
||||
ul_total_buffer > 0) {
|
||||
swap_UEs(UE_list, UE_id1, UE_id2, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
#include "openair1/PHY/LTE_TRANSPORT/defs_NB_IoT.h"
|
||||
#include "LAYER2/MAC/defs_NB_IoT.h"
|
||||
#include "COMMON/platform_types.h"
|
||||
#include "openair2/RRC/LITE/defs_NB_IoT.h"
|
||||
#include "openair2/RRC/LTE/defs_NB_IoT.h"
|
||||
/** \addtogroup _mac
|
||||
* @{
|
||||
*/
|
||||
|
||||
@@ -33,17 +33,22 @@
|
||||
#include "mac_extern.h"
|
||||
#include "mac.h"
|
||||
#include "mac_proto.h"
|
||||
#include "UTIL/LOG/vcd_signal_dumper.h"
|
||||
#include "common/utils/LOG/vcd_signal_dumper.h"
|
||||
#include "PHY_INTERFACE/phy_interface_extern.h"
|
||||
#include "SCHED_UE/sched_UE.h"
|
||||
#include "COMMON/mac_rrc_primitives.h"
|
||||
#include "RRC/LTE/rrc_extern.h"
|
||||
#include "RRC/L2_INTERFACE/openair_rrc_L2_interface.h"
|
||||
#include "UTIL/LOG/log.h"
|
||||
#include "common/utils/LOG/log.h"
|
||||
#include "UTIL/OPT/opt.h"
|
||||
#include "OCG.h"
|
||||
#include "OCG_extern.h"
|
||||
#include "SIMULATION/TOOLS/sim.h" // for taus
|
||||
#include "PHY/LTE_TRANSPORT/transport_common_proto.h"
|
||||
#include "PHY/LTE_ESTIMATION/lte_estimation.h"
|
||||
|
||||
extern uint8_t nfapi_mode;
|
||||
extern UE_MODE_t get_ue_mode(uint8_t Mod_id,uint8_t CC_id,uint8_t eNB_index);
|
||||
|
||||
/// This routine implements Section 5.1.2 (UE Random Access Resource Selection) from 36.321
|
||||
void
|
||||
@@ -54,7 +59,6 @@ get_prach_resources(module_id_t module_idP,
|
||||
uint8_t first_Msg3,
|
||||
RACH_ConfigDedicated_t * rach_ConfigDedicated)
|
||||
{
|
||||
|
||||
uint8_t Msg3_size = UE_mac_inst[module_idP].RA_Msg3_size;
|
||||
PRACH_RESOURCES_t *prach_resources =
|
||||
&UE_mac_inst[module_idP].RA_prach_resources;
|
||||
@@ -293,23 +297,32 @@ PRACH_RESOURCES_t *ue_get_rach(module_id_t module_idP, int CC_id,
|
||||
sub_frame_t subframeP)
|
||||
{
|
||||
|
||||
|
||||
uint8_t Size = 0;
|
||||
UE_MODE_t UE_mode = get_ue_mode(module_idP, 0, eNB_indexP);
|
||||
UE_MODE_t UE_mode;
|
||||
// Modification for phy_stub_ue operation
|
||||
if(nfapi_mode == 3) { // phy_stub_ue mode
|
||||
UE_mode = UE_mac_inst[module_idP].UE_mode[0];
|
||||
LOG_D(MAC, "ue_get_rach , UE_mode: %d", UE_mode);
|
||||
}
|
||||
else { // Full stack mode
|
||||
UE_mode = get_ue_mode(module_idP,0,eNB_indexP);
|
||||
}
|
||||
|
||||
|
||||
uint8_t lcid = CCCH;
|
||||
uint16_t Size16;
|
||||
struct RACH_ConfigCommon *rach_ConfigCommon =
|
||||
(struct RACH_ConfigCommon *) NULL;
|
||||
int32_t frame_diff = 0;
|
||||
mac_rlc_status_resp_t rlc_status;
|
||||
uint8_t dcch_header_len = 0;
|
||||
uint16_t sdu_lengths[8];
|
||||
uint16_t sdu_lengths;
|
||||
uint8_t ulsch_buff[MAX_ULSCH_PAYLOAD_BYTES];
|
||||
|
||||
AssertFatal(CC_id == 0,
|
||||
"Transmission on secondary CCs is not supported yet\n");
|
||||
|
||||
if (UE_mode == PRACH) {
|
||||
LOG_D(MAC, "ue_get_rach 3, RA_active value: %d", UE_mac_inst[module_idP].RA_active);
|
||||
if (UE_mac_inst[module_idP].radioResourceConfigCommon) {
|
||||
rach_ConfigCommon =
|
||||
&UE_mac_inst[module_idP].
|
||||
@@ -341,7 +354,6 @@ PRACH_RESOURCES_t *ue_get_rach(module_id_t module_idP, int CC_id,
|
||||
module_idP, frameP, Size);
|
||||
|
||||
if (Size > 0) {
|
||||
|
||||
UE_mac_inst[module_idP].RA_active = 1;
|
||||
UE_mac_inst[module_idP].RA_PREAMBLE_TRANSMISSION_COUNTER =
|
||||
1;
|
||||
@@ -392,11 +404,14 @@ PRACH_RESOURCES_t *ue_get_rach(module_id_t module_idP, int CC_id,
|
||||
[DCCH]] > 0) {
|
||||
// This is for triggering a transmission on DCCH using PRACH (during handover, or sending SR for example)
|
||||
dcch_header_len = 2 + 2; /// SHORT Subheader + C-RNTI control element
|
||||
rlc_status =
|
||||
mac_rlc_status_ind(module_idP,
|
||||
LOG_USEDINLOG_VAR(mac_rlc_status_resp_t,rlc_status)=mac_rlc_status_ind(module_idP,
|
||||
UE_mac_inst[module_idP].crnti,
|
||||
eNB_indexP, frameP, subframeP,
|
||||
ENB_FLAG_NO, MBMS_FLAG_NO, DCCH, 6);
|
||||
ENB_FLAG_NO, MBMS_FLAG_NO, DCCH, 6
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
,0, 0
|
||||
#endif
|
||||
);
|
||||
|
||||
if (UE_mac_inst[module_idP].crnti_before_ho)
|
||||
LOG_D(MAC,
|
||||
@@ -411,11 +426,21 @@ PRACH_RESOURCES_t *ue_get_rach(module_id_t module_idP, int CC_id,
|
||||
module_idP, frameP, rlc_status.bytes_in_buffer,
|
||||
dcch_header_len);
|
||||
|
||||
sdu_lengths[0] = mac_rlc_data_req(module_idP, UE_mac_inst[module_idP].crnti, eNB_indexP, frameP, ENB_FLAG_NO, MBMS_FLAG_NO, DCCH, 6, //not used
|
||||
(char *) &ulsch_buff[0]);
|
||||
sdu_lengths = mac_rlc_data_req(module_idP, UE_mac_inst[module_idP].crnti, eNB_indexP, frameP, ENB_FLAG_NO, MBMS_FLAG_NO, DCCH, 6, //not used
|
||||
(char *) &ulsch_buff[0]
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
,0,
|
||||
0
|
||||
#endif
|
||||
);
|
||||
|
||||
if(sdu_lengths > 0)
|
||||
LOG_D(MAC, "[UE %d] TX Got %d bytes for DCCH\n",
|
||||
module_idP, sdu_lengths);
|
||||
else
|
||||
LOG_E(MAC, "[UE %d] TX DCCH error\n",
|
||||
module_idP );
|
||||
|
||||
LOG_D(MAC, "[UE %d] TX Got %d bytes for DCCH\n",
|
||||
module_idP, sdu_lengths[0]);
|
||||
update_bsr(module_idP, frameP, subframeP, eNB_indexP);
|
||||
UE_mac_inst[module_idP].
|
||||
scheduling_info.BSR[UE_mac_inst[module_idP].
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
#include "mac_proto.h"
|
||||
#include "mac_extern.h"
|
||||
#include "SIMULATION/TOOLS/sim.h"
|
||||
#include "UTIL/LOG/log.h"
|
||||
#include "common/utils/LOG/log.h"
|
||||
#include "OCG.h"
|
||||
#include "OCG_extern.h"
|
||||
#include "UTIL/OPT/opt.h"
|
||||
@@ -71,7 +71,16 @@ fill_rar(const module_id_t module_idP,
|
||||
ra->timing_offset /= 16; //T_A = N_TA/16, where N_TA should be on a 30.72Msps
|
||||
rar[0] = (uint8_t) (ra->timing_offset >> (2 + 4)); // 7 MSBs of timing advance + divide by 4
|
||||
rar[1] = (uint8_t) (ra->timing_offset << (4 - 2)) & 0xf0; // 4 LSBs of timing advance + divide by 4
|
||||
ra->msg3_first_rb = 6;
|
||||
COMMON_channels_t *cc = &RC.mac[module_idP]->common_channels[CC_id];
|
||||
if(N_RB_UL == 25){
|
||||
ra->msg3_first_rb = 1;
|
||||
}else{
|
||||
if (cc->tdd_Config && N_RB_UL == 100) {
|
||||
ra->msg3_first_rb = 3;
|
||||
} else {
|
||||
ra->msg3_first_rb = 2;
|
||||
}
|
||||
}
|
||||
ra->msg3_nb_rb = 1;
|
||||
uint16_t rballoc = mac_computeRIV(N_RB_UL, ra->msg3_first_rb, ra->msg3_nb_rb); // first PRB only for UL Grant
|
||||
rar[1] |= (rballoc >> 7) & 7; // Hopping = 0 (bit 3), 3 MSBs of rballoc
|
||||
@@ -80,6 +89,7 @@ fill_rar(const module_id_t module_idP,
|
||||
ra->msg3_TPC = 3;
|
||||
ra->msg3_ULdelay = 0;
|
||||
ra->msg3_cqireq = 0;
|
||||
ra->msg3_round = 0;
|
||||
rar[2] |= ((ra->msg3_mcs & 0x8) >> 3); // mcs 10
|
||||
rar[3] =
|
||||
(((ra->msg3_mcs & 0x7) << 5)) | ((ra->msg3_TPC & 7) << 2) |
|
||||
@@ -98,7 +108,7 @@ fill_rar(const module_id_t module_idP,
|
||||
return (ra->rnti);
|
||||
}
|
||||
|
||||
#ifdef Rel14
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
//------------------------------------------------------------------------------
|
||||
unsigned short
|
||||
fill_rar_br(eNB_MAC_INST * eNB,
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
#include "mac_proto.h"
|
||||
#include "mac_extern.h"
|
||||
#include "SIMULATION/TOOLS/sim.h"
|
||||
#include "UTIL/LOG/log.h"
|
||||
#include "common/utils/LOG/log.h"
|
||||
#include "OCG.h"
|
||||
#include "OCG_extern.h"
|
||||
#include "UTIL/OPT/opt.h"
|
||||
@@ -93,7 +93,7 @@ uint16_t ue_process_rar(const module_id_t module_idP, const int CC_id, const fra
|
||||
}
|
||||
|
||||
LOG_I(MAC,
|
||||
"[eNB %d][RAPROC] Frame %d Received RAR (%02x|%02x.%02x.%02x.%02x.%02x.%02x) for preamble %d/%d\n",
|
||||
"[UE %d][RAPROC] Frame %d Received RAR (%02x|%02x.%02x.%02x.%02x.%02x.%02x) for preamble %d/%d\n",
|
||||
module_idP, frameP, *(uint8_t *) rarh, rar[0], rar[1], rar[2],
|
||||
rar[3], rar[4], rar[5], rarh->RAPID, preamble_index);
|
||||
#ifdef DEBUG_RAR
|
||||
|
||||
+396
-101
@@ -40,14 +40,18 @@
|
||||
#include "PHY/impl_defs_top.h"
|
||||
#include "PHY_INTERFACE/phy_interface_extern.h"
|
||||
#include "COMMON/mac_rrc_primitives.h"
|
||||
#include "PHY/INIT/phy_init.h"
|
||||
#include "PHY/LTE_ESTIMATION/lte_estimation.h"
|
||||
|
||||
#include "RRC/L2_INTERFACE/openair_rrc_L2_interface.h"
|
||||
#include "RRC/LTE/rrc_extern.h"
|
||||
#include "UTIL/LOG/log.h"
|
||||
#include "UTIL/LOG/vcd_signal_dumper.h"
|
||||
#include "common/utils/LOG/log.h"
|
||||
#include "common/utils/LOG/vcd_signal_dumper.h"
|
||||
#include "UTIL/OPT/opt.h"
|
||||
#include "OCG.h"
|
||||
#include "OCG_extern.h"
|
||||
#include "openair2/PHY_INTERFACE/phy_stub_UE.h"
|
||||
|
||||
#include "pdcp.h"
|
||||
|
||||
#if defined(ENABLE_ITTI)
|
||||
@@ -63,6 +67,17 @@
|
||||
|
||||
extern uint8_t usim_test;
|
||||
|
||||
extern UL_IND_t *UL_INFO;
|
||||
|
||||
extern uint8_t nfapi_mode;
|
||||
|
||||
/*
|
||||
*
|
||||
#ifndef USER_MODE
|
||||
#define msg debug_msg
|
||||
#endif
|
||||
*/
|
||||
|
||||
mapping BSR_names[] = {
|
||||
{"NONE", 0},
|
||||
{"SHORT BSR", 1},
|
||||
@@ -75,6 +90,7 @@ mapping BSR_names[] = {
|
||||
|
||||
void ue_init_mac(module_id_t module_idP)
|
||||
{
|
||||
|
||||
int i;
|
||||
// default values as deined in 36.331 sec 9.2.2
|
||||
LOG_I(MAC, "[UE%d] Applying default macMainConfig\n", module_idP);
|
||||
@@ -137,6 +153,19 @@ void ue_init_mac(module_id_t module_idP)
|
||||
UE_mac_inst[module_idP].scheduling_info.LCID_buffer_remain[i] = 0;
|
||||
}
|
||||
|
||||
if(nfapi_mode == 3) {
|
||||
pthread_mutex_init(&UE_mac_inst[module_idP].UL_INFO_mutex,NULL);
|
||||
UE_mac_inst[module_idP].UE_mode[0] = NOT_SYNCHED; //PRACH;
|
||||
UE_mac_inst[module_idP].first_ULSCH_Tx =0;
|
||||
UE_mac_inst[module_idP].SI_Decoded = 0;
|
||||
next_ra_frame = 0;
|
||||
next_Mod_id = 0;
|
||||
tx_request_pdu_list = NULL;
|
||||
tx_req_num_elems = 0;
|
||||
|
||||
|
||||
}
|
||||
|
||||
#ifdef CBA
|
||||
|
||||
for (i = 0; i < NUM_MAX_CBA_GROUP; i++) {
|
||||
@@ -387,7 +416,8 @@ ue_send_sdu(module_id_t module_idP,
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
|
||||
(VCD_SIGNAL_DUMPER_FUNCTIONS_UE_SEND_SDU, VCD_FUNCTION_IN);
|
||||
|
||||
LOG_T(MAC, "sdu: %x.%x.%x\n", sdu[0], sdu[1], sdu[2]);
|
||||
|
||||
//LOG_D(MAC,"sdu: %x.%x.%x\n",sdu[0],sdu[1],sdu[2]);
|
||||
|
||||
if (opt_enabled) {
|
||||
trace_pdu(1, sdu, sdu_len, module_idP, 3,
|
||||
@@ -445,7 +475,16 @@ ue_send_sdu(module_id_t module_idP,
|
||||
LOG_E(MAC,
|
||||
"[UE %d][RAPROC] Contention detected, RA failed\n",
|
||||
module_idP);
|
||||
ra_failed(module_idP, CC_id, eNB_index);
|
||||
if(nfapi_mode == 3) { // phy_stub mode
|
||||
// Modification for phy_stub mode operation here. We only need to make sure that the ue_mode is back to
|
||||
// PRACH state.
|
||||
LOG_I(MAC, "nfapi_mode3: Setting UE_mode BACK to PRACH 1\n");
|
||||
UE_mac_inst[module_idP].UE_mode[eNB_index] = PRACH;
|
||||
//ra_failed(module_idP,CC_id,eNB_index);UE_mac_inst[module_idP].RA_contention_resolution_timer_active = 0;
|
||||
}
|
||||
else{
|
||||
ra_failed(module_idP, CC_id, eNB_index);
|
||||
}
|
||||
UE_mac_inst
|
||||
[module_idP].
|
||||
RA_contention_resolution_timer_active = 0;
|
||||
@@ -461,7 +500,14 @@ ue_send_sdu(module_id_t module_idP,
|
||||
UE_mac_inst
|
||||
[module_idP].
|
||||
RA_contention_resolution_timer_active = 0;
|
||||
ra_succeeded(module_idP, CC_id, eNB_index);
|
||||
if(nfapi_mode == 3) // phy_stub mode
|
||||
{
|
||||
// Modification for phy_stub mode operation here. We only need to change the ue_mode to PUSCH
|
||||
UE_mac_inst[module_idP].UE_mode[eNB_index] = PUSCH;
|
||||
}
|
||||
else { // Full stack mode
|
||||
ra_succeeded(module_idP,CC_id,eNB_index);
|
||||
}
|
||||
}
|
||||
|
||||
payload_ptr += 6;
|
||||
@@ -472,9 +518,14 @@ ue_send_sdu(module_id_t module_idP,
|
||||
LOG_D(MAC, "[UE] CE %d : UE Timing Advance : %d\n", i,
|
||||
payload_ptr[0]);
|
||||
#endif
|
||||
process_timing_advance(module_idP, CC_id, payload_ptr[0]);
|
||||
payload_ptr++;
|
||||
break;
|
||||
|
||||
// Eliminate call to process_timing_advance for the phy_stub UE operation mode. Is this correct?
|
||||
if (nfapi_mode!=3)
|
||||
{
|
||||
process_timing_advance(module_idP,CC_id,payload_ptr[0]);
|
||||
}
|
||||
payload_ptr++;
|
||||
break;
|
||||
|
||||
case DRX_CMD:
|
||||
#ifdef DEBUG_HEADER_PARSING
|
||||
@@ -490,7 +541,6 @@ ue_send_sdu(module_id_t module_idP,
|
||||
LOG_D(MAC, "[UE] SDU %d : LCID %d, length %d\n", i,
|
||||
rx_lcids[i], rx_lengths[i]);
|
||||
#endif
|
||||
|
||||
if (rx_lcids[i] == CCCH) {
|
||||
|
||||
LOG_D(MAC,
|
||||
@@ -507,6 +557,7 @@ ue_send_sdu(module_id_t module_idP,
|
||||
|
||||
LOG_T(MAC, "\n");
|
||||
#endif
|
||||
|
||||
mac_rrc_data_ind_ue(module_idP,
|
||||
CC_id,
|
||||
frameP, subframeP,
|
||||
@@ -638,7 +689,7 @@ ue_decode_p(module_id_t module_idP, int CC_id, frame_t frameP,
|
||||
}
|
||||
}
|
||||
|
||||
#if defined(Rel10) || defined(Rel14)
|
||||
#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
unsigned char *parse_mch_header(unsigned char *mac_header,
|
||||
unsigned char *num_sdu,
|
||||
unsigned char *rx_lcids,
|
||||
@@ -770,9 +821,82 @@ ue_send_mch_sdu(module_id_t module_idP, uint8_t CC_id, frame_t frameP,
|
||||
#endif
|
||||
}
|
||||
|
||||
int8_t
|
||||
ue_get_mbsfn_sf_alloction(module_id_t module_idP,
|
||||
uint8_t mbsfn_sync_area, unsigned char eNB_index)
|
||||
void ue_send_sl_sdu(module_id_t module_idP,
|
||||
uint8_t CC_id,
|
||||
frame_t frameP,
|
||||
sub_frame_t subframeP,
|
||||
uint8_t* sdu,
|
||||
uint16_t sdu_len,
|
||||
uint8_t eNB_index,
|
||||
sl_discovery_flag_t sl_discovery_flag
|
||||
) {
|
||||
|
||||
int rlc_sdu_len;
|
||||
char *rlc_sdu;
|
||||
uint32_t destinationL2Id =0x00000000;
|
||||
|
||||
if (sl_discovery_flag == SL_DISCOVERY_FLAG_NO) {
|
||||
|
||||
// Notes: 1. no control elements are supported yet
|
||||
// 2. we exit with error if LCID != 3
|
||||
// 3. we exit with error if E=1 (more than one SDU/CE)
|
||||
// extract header
|
||||
SLSCH_SUBHEADER_24_Bit_DST_LONG *longh = (SLSCH_SUBHEADER_24_Bit_DST_LONG *)sdu;
|
||||
AssertFatal(longh->E==0,"E is non-zero\n");
|
||||
AssertFatal(((longh->LCID==3)|(longh->LCID==10)),"LCID is %d (not 3 or 10)\n",longh->LCID);
|
||||
//filter incoming packet based on destination address
|
||||
destinationL2Id = (longh->DST07<<16) | (longh->DST815 <<8) | (longh->DST1623);
|
||||
LOG_I( MAC, "[DestinationL2Id: 0x%08x] \n", destinationL2Id );
|
||||
//in case of 1-n communication, verify that UE belongs to that group
|
||||
int i=0;
|
||||
for (i=0; i< MAX_NUM_DEST; i++)
|
||||
if (UE_mac_inst[module_idP].destinationList[i] == destinationL2Id) break;
|
||||
//match the destinationL2Id with UE L2Id or groupL2ID
|
||||
if (!((destinationL2Id == UE_mac_inst[module_idP].sourceL2Id) | (i < MAX_NUM_DEST))){
|
||||
LOG_I( MAC, "[Destination Id is neither matched with Source Id nor with Group Id, drop the packet!!! \n");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
if (longh->F==1) {
|
||||
rlc_sdu_len = ((longh->L_MSB<<8)&0x7F00)|(longh->L_LSB&0xFF);
|
||||
rlc_sdu = (char *)sdu+sizeof(SLSCH_SUBHEADER_24_Bit_DST_LONG);
|
||||
}
|
||||
else {
|
||||
rlc_sdu_len = ((SLSCH_SUBHEADER_24_Bit_DST_SHORT *)sdu)->L;
|
||||
rlc_sdu = (char *)sdu+sizeof(SLSCH_SUBHEADER_24_Bit_DST_SHORT);
|
||||
}
|
||||
mac_rlc_data_ind(
|
||||
module_idP,
|
||||
0x1234,
|
||||
eNB_index,
|
||||
frameP,
|
||||
ENB_FLAG_NO,
|
||||
MBMS_FLAG_NO,
|
||||
longh->LCID, //3/10
|
||||
rlc_sdu,
|
||||
rlc_sdu_len,
|
||||
1,
|
||||
NULL);
|
||||
} else { //SL_DISCOVERY
|
||||
uint16_t len = sdu_len;
|
||||
LOG_I( MAC, "SL DISCOVERY \n");
|
||||
mac_rrc_data_ind_ue(module_idP,
|
||||
CC_id,
|
||||
frameP,subframeP,
|
||||
UE_mac_inst[module_idP].crnti,
|
||||
SL_DISCOVERY,
|
||||
sdu, //(uint8_t*)&UE_mac_inst[Mod_id].SL_Discovery[0].Rx_buffer.Payload[0],
|
||||
len,
|
||||
eNB_index,
|
||||
0);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
int8_t ue_get_mbsfn_sf_alloction (module_id_t module_idP, uint8_t mbsfn_sync_area, unsigned char eNB_index)
|
||||
|
||||
{
|
||||
// currently there is one-to-one mapping between sf allocation pattern and sync area
|
||||
if (mbsfn_sync_area >= MAX_MBSFN_AREA) {
|
||||
@@ -1716,9 +1840,13 @@ ue_get_sdu(module_id_t module_idP, int CC_id, frame_t frameP,
|
||||
MBMS_FLAG_NO,
|
||||
lcid,
|
||||
buflen_remain,
|
||||
(char *)
|
||||
&ulsch_buff
|
||||
[sdu_length_total]);
|
||||
(char *)&ulsch_buff[sdu_length_total]
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
,0,
|
||||
0
|
||||
#endif
|
||||
);
|
||||
|
||||
|
||||
|
||||
AssertFatal(buflen_remain >= sdu_lengths[num_sdus],
|
||||
@@ -1856,7 +1984,15 @@ ue_get_sdu(module_id_t module_idP, int CC_id, frame_t frameP,
|
||||
}
|
||||
// build PHR and update the timers
|
||||
if (phr_ce_len == sizeof(POWER_HEADROOM_CMD)) {
|
||||
phr_p->PH = get_phr_mapping(module_idP, CC_id, eNB_index);
|
||||
if(nfapi_mode ==3){
|
||||
//Substitute with a static value for the MAC layer abstraction (phy_stub mode)
|
||||
phr_p->PH = 40;
|
||||
}
|
||||
else{
|
||||
phr_p->PH = get_phr_mapping(module_idP, CC_id, eNB_index);
|
||||
}
|
||||
|
||||
|
||||
phr_p->R = 0;
|
||||
LOG_D(MAC,
|
||||
"[UE %d] Frame %d report PHR with mapping (%d->%d) for LCID %d\n",
|
||||
@@ -1870,7 +2006,6 @@ ue_get_sdu(module_id_t module_idP, int CC_id, frame_t frameP,
|
||||
LOG_T(MAC, "[UE %d] Frame %d: bsr s %p bsr_l %p, phr_p %p\n",
|
||||
module_idP, frameP, bsr_s, bsr_l, phr_p);
|
||||
|
||||
|
||||
// Check BSR padding: it is done after PHR according to Logical Channel Prioritization order
|
||||
// Check for max padding size, ie MAC Hdr for last RLC PDU = 1
|
||||
/* For Padding BSR:
|
||||
@@ -2131,6 +2266,8 @@ ue_get_sdu(module_id_t module_idP, int CC_id, frame_t frameP,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// called at each subframe
|
||||
// Performs :
|
||||
@@ -2161,8 +2298,6 @@ ue_scheduler(const module_id_t module_idP,
|
||||
|
||||
#if defined(ENABLE_ITTI)
|
||||
MessageDef *msg_p;
|
||||
const char *msg_name;
|
||||
instance_t instance;
|
||||
int result;
|
||||
#endif
|
||||
#if UE_TIMING_TRACE
|
||||
@@ -2181,14 +2316,12 @@ ue_scheduler(const module_id_t module_idP,
|
||||
itti_poll_msg(TASK_MAC_UE, &msg_p);
|
||||
|
||||
if (msg_p != NULL) {
|
||||
msg_name = ITTI_MSG_NAME(msg_p);
|
||||
instance = ITTI_MSG_INSTANCE(msg_p);
|
||||
|
||||
switch (ITTI_MSG_ID(msg_p)) {
|
||||
case RRC_MAC_CCCH_DATA_REQ:
|
||||
LOG_I(MAC,
|
||||
"Received %s from %s: instance %d, frameP %d, eNB_index %d\n",
|
||||
msg_name, ITTI_MSG_ORIGIN_NAME(msg_p), instance,
|
||||
ITTI_MSG_NAME(msg_p), ITTI_MSG_ORIGIN_NAME(msg_p), ITTI_MSG_INSTANCE(msg_p),
|
||||
RRC_MAC_CCCH_DATA_REQ(msg_p).frame,
|
||||
RRC_MAC_CCCH_DATA_REQ(msg_p).enb_index);
|
||||
|
||||
@@ -2197,7 +2330,7 @@ ue_scheduler(const module_id_t module_idP,
|
||||
|
||||
|
||||
default:
|
||||
LOG_E(MAC, "Received unexpected message %s\n", msg_name);
|
||||
LOG_E(MAC, "Received unexpected message %s\n", ITTI_MSG_NAME(msg_p));
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -2249,7 +2382,7 @@ ue_scheduler(const module_id_t module_idP,
|
||||
return (PHY_RESYNCH);
|
||||
|
||||
case RRC_Handover_failed:
|
||||
LOG_N(MAC, "Handover failure for UE %d eNB_index %d\n", module_idP,
|
||||
LOG_I(MAC, "Handover failure for UE %d eNB_index %d\n", module_idP,
|
||||
eNB_indexP);
|
||||
//Invalid...need to add another MAC UE state for re-connection procedure
|
||||
phy_config_afterHO_ue(module_idP, 0, eNB_indexP,
|
||||
@@ -2292,6 +2425,7 @@ ue_scheduler(const module_id_t module_idP,
|
||||
#if UE_TIMING_TRACE
|
||||
stop_meas(&UE_mac_inst[module_idP].ue_scheduler);
|
||||
#endif
|
||||
|
||||
//return(RRC_OK);
|
||||
}
|
||||
|
||||
@@ -2315,7 +2449,17 @@ ue_scheduler(const module_id_t module_idP,
|
||||
LOG_E(MAC,
|
||||
"Module id %u Contention resolution timer expired, RA failed\n",
|
||||
module_idP);
|
||||
ra_failed(module_idP, 0, eNB_indexP);
|
||||
if(nfapi_mode == 3) { // phy_stub mode
|
||||
// Modification for phy_stub mode operation here. We only need to make sure that the ue_mode is back to
|
||||
// PRACH state.
|
||||
LOG_I(MAC, "nfapi_mode3: Setting UE_mode to PRACH 2 \n");
|
||||
UE_mac_inst[module_idP].UE_mode[eNB_indexP] = PRACH;
|
||||
//ra_failed(module_idP,CC_id,eNB_index);UE_mac_inst[module_idP].RA_contention_resolution_timer_active = 0;
|
||||
}
|
||||
else{
|
||||
ra_failed(module_idP, CC_id, eNB_indexP);
|
||||
}
|
||||
//ra_failed(module_idP, 0, eNB_indexP);
|
||||
}
|
||||
}
|
||||
// Get RLC status info and update Bj for all lcids that are active
|
||||
@@ -2633,92 +2777,92 @@ update_bsr(module_id_t module_idP, frame_t frameP,
|
||||
sub_frame_t subframeP, eNB_index_t eNB_index)
|
||||
{
|
||||
|
||||
mac_rlc_status_resp_t rlc_status;
|
||||
boolean_t bsr_regular_triggered = FALSE;
|
||||
uint8_t lcid;
|
||||
uint8_t lcgid;
|
||||
uint8_t num_lcid_with_data = 0; // for LCID with data only if LCGID is defined
|
||||
uint16_t lcgid_buffer_remain[MAX_NUM_LCGID] = { 0, 0, 0, 0 };
|
||||
int32_t lcid_bytes_in_buffer[MAX_NUM_LCID];
|
||||
/* Array for ordering LCID with data per decreasing priority order */
|
||||
uint8_t lcid_reordered_array[MAX_NUM_LCID] =
|
||||
{ MAX_NUM_LCID, MAX_NUM_LCID, MAX_NUM_LCID, MAX_NUM_LCID,
|
||||
MAX_NUM_LCID, MAX_NUM_LCID, MAX_NUM_LCID, MAX_NUM_LCID,
|
||||
MAX_NUM_LCID,
|
||||
MAX_NUM_LCID, MAX_NUM_LCID
|
||||
};
|
||||
uint8_t pos_next = 0;
|
||||
uint8_t highest_priority = 16;
|
||||
uint8_t array_index = 0;
|
||||
mac_rlc_status_resp_t rlc_status;
|
||||
boolean_t bsr_regular_triggered = FALSE;
|
||||
uint8_t lcid;
|
||||
uint8_t lcgid;
|
||||
uint8_t num_lcid_with_data = 0; // for LCID with data only if LCGID is defined
|
||||
uint16_t lcgid_buffer_remain[MAX_NUM_LCGID] = {0,0,0,0};
|
||||
int32_t lcid_bytes_in_buffer[MAX_NUM_LCID];
|
||||
/* Array for ordering LCID with data per decreasing priority order */
|
||||
uint8_t lcid_reordered_array[MAX_NUM_LCID]=
|
||||
{MAX_NUM_LCID,MAX_NUM_LCID,MAX_NUM_LCID,MAX_NUM_LCID,MAX_NUM_LCID,MAX_NUM_LCID,MAX_NUM_LCID,MAX_NUM_LCID,MAX_NUM_LCID,MAX_NUM_LCID,MAX_NUM_LCID};
|
||||
uint8_t pos_next = 0;
|
||||
uint8_t highest_priority = 16;
|
||||
uint8_t array_index = 0;
|
||||
|
||||
// Reset All BSR Infos
|
||||
lcid_bytes_in_buffer[0] = 0;
|
||||
for (lcid = DCCH; lcid < MAX_NUM_LCID; lcid++) {
|
||||
// Reset transmission status
|
||||
lcid_bytes_in_buffer[lcid] = 0;
|
||||
UE_mac_inst[module_idP].scheduling_info.LCID_status[lcid] =
|
||||
LCID_EMPTY;
|
||||
}
|
||||
// Reset All BSR Infos
|
||||
lcid_bytes_in_buffer[0] = 0;
|
||||
for (lcid=DCCH; lcid < MAX_NUM_LCID; lcid++)
|
||||
{
|
||||
// Reset transmission status
|
||||
lcid_bytes_in_buffer[lcid] = 0;
|
||||
UE_mac_inst[module_idP].scheduling_info.LCID_status[lcid]=LCID_EMPTY;
|
||||
}
|
||||
|
||||
for (lcgid = 0; lcgid < MAX_NUM_LCGID; lcgid++) {
|
||||
// Reset Buffer Info
|
||||
UE_mac_inst[module_idP].scheduling_info.BSR[lcgid] = 0;
|
||||
UE_mac_inst[module_idP].scheduling_info.BSR_bytes[lcgid] = 0;
|
||||
}
|
||||
for (lcgid=0; lcgid < MAX_NUM_LCGID; lcgid++)
|
||||
{
|
||||
// Reset Buffer Info
|
||||
UE_mac_inst[module_idP].scheduling_info.BSR[lcgid]=0;
|
||||
UE_mac_inst[module_idP].scheduling_info.BSR_bytes[lcgid]=0;
|
||||
}
|
||||
|
||||
//Get Buffer Occupancy and fill lcid_reordered_array
|
||||
for (lcid = DCCH; lcid < MAX_NUM_LCID; lcid++) {
|
||||
if (UE_mac_inst[module_idP].logicalChannelConfig[lcid]) {
|
||||
lcgid = UE_mac_inst[module_idP].scheduling_info.LCGID[lcid];
|
||||
//Get Buffer Occupancy and fill lcid_reordered_array
|
||||
for (lcid=DCCH; lcid < MAX_NUM_LCID; lcid++)
|
||||
{
|
||||
if (UE_mac_inst[module_idP].logicalChannelConfig[lcid])
|
||||
{
|
||||
lcgid = UE_mac_inst[module_idP].scheduling_info.LCGID[lcid];
|
||||
|
||||
// Store already available data to transmit per Group
|
||||
if (lcgid < MAX_NUM_LCGID) {
|
||||
lcgid_buffer_remain[lcgid] +=
|
||||
UE_mac_inst[module_idP].
|
||||
scheduling_info.LCID_buffer_remain[lcid];
|
||||
}
|
||||
// Store already available data to transmit per Group
|
||||
if (lcgid < MAX_NUM_LCGID)
|
||||
{
|
||||
lcgid_buffer_remain[lcgid] += UE_mac_inst[module_idP].scheduling_info.LCID_buffer_remain[lcid];
|
||||
}
|
||||
|
||||
rlc_status = mac_rlc_status_ind(module_idP, UE_mac_inst[module_idP].crnti, eNB_index, frameP, subframeP, ENB_FLAG_NO, MBMS_FLAG_NO, lcid, 0xFFFF); //TBS is not used in RLC at this step, set a special value for debug
|
||||
rlc_status = mac_rlc_status_ind(module_idP, UE_mac_inst[module_idP].crnti,eNB_index,frameP,subframeP,ENB_FLAG_NO,MBMS_FLAG_NO,
|
||||
lcid,
|
||||
0xFFFF //TBS is not used in RLC at this step, set a special value for debug
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
,0, 0
|
||||
#endif
|
||||
);
|
||||
|
||||
lcid_bytes_in_buffer[lcid] = rlc_status.bytes_in_buffer;
|
||||
lcid_bytes_in_buffer[lcid] = rlc_status.bytes_in_buffer;
|
||||
|
||||
if (rlc_status.bytes_in_buffer > 0) {
|
||||
LOG_D(MAC,
|
||||
"[UE %d] PDCCH Tick : LCID%d LCGID%d has data to transmit =%d bytes at frame %d subframe %d\n",
|
||||
module_idP, lcid, lcgid, rlc_status.bytes_in_buffer,
|
||||
frameP, subframeP);
|
||||
if (rlc_status.bytes_in_buffer > 0)
|
||||
{
|
||||
LOG_D(MAC,"[UE %d] PDCCH Tick : LCID%d LCGID%d has data to transmit =%d bytes at frame %d subframe %d\n",
|
||||
module_idP, lcid,lcgid,rlc_status.bytes_in_buffer,frameP,subframeP);
|
||||
|
||||
UE_mac_inst[module_idP].scheduling_info.LCID_status[lcid] =
|
||||
LCID_NOT_EMPTY;
|
||||
//Update BSR_bytes and position in lcid_reordered_array only if Group is defined
|
||||
if (lcgid < MAX_NUM_LCGID) {
|
||||
num_lcid_with_data++;
|
||||
// sum lcid buffer which has same lcgid
|
||||
UE_mac_inst[module_idP].scheduling_info.
|
||||
BSR_bytes[lcgid] += rlc_status.bytes_in_buffer;
|
||||
UE_mac_inst[module_idP].scheduling_info.LCID_status[lcid] = LCID_NOT_EMPTY;
|
||||
//Update BSR_bytes and position in lcid_reordered_array only if Group is defined
|
||||
if (lcgid < MAX_NUM_LCGID)
|
||||
{
|
||||
num_lcid_with_data ++;
|
||||
// sum lcid buffer which has same lcgid
|
||||
UE_mac_inst[module_idP].scheduling_info.BSR_bytes[lcgid] += rlc_status.bytes_in_buffer;
|
||||
|
||||
//Fill in the array
|
||||
array_index = 0;
|
||||
do {
|
||||
if (UE_mac_inst[module_idP].logicalChannelConfig
|
||||
[lcid]->ul_SpecificParameters->priority <=
|
||||
highest_priority) {
|
||||
//Insert if priority is higher or equal (lower or equal in value)
|
||||
for (pos_next = num_lcid_with_data - 1;
|
||||
pos_next > array_index; pos_next--) {
|
||||
lcid_reordered_array[pos_next] =
|
||||
lcid_reordered_array[pos_next - 1];
|
||||
//Fill in the array
|
||||
array_index = 0;
|
||||
do
|
||||
{
|
||||
if (UE_mac_inst[module_idP].logicalChannelConfig[lcid]->ul_SpecificParameters->priority <= highest_priority)
|
||||
{
|
||||
//Insert if priority is higher or equal (lower or equal in value)
|
||||
for (pos_next=num_lcid_with_data-1; pos_next > array_index; pos_next--)
|
||||
{
|
||||
lcid_reordered_array[pos_next] = lcid_reordered_array[pos_next - 1];
|
||||
|
||||
}
|
||||
lcid_reordered_array[array_index] = lcid;
|
||||
break;
|
||||
}
|
||||
lcid_reordered_array[array_index] = lcid;
|
||||
break;
|
||||
|
||||
}
|
||||
array_index++;
|
||||
}
|
||||
while ((array_index < num_lcid_with_data)
|
||||
&& (array_index < MAX_NUM_LCID));
|
||||
}
|
||||
}
|
||||
array_index ++;
|
||||
}
|
||||
while ((array_index < num_lcid_with_data) && (array_index < MAX_NUM_LCID));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3029,3 +3173,154 @@ int get_db_dl_PathlossChange(uint8_t dl_PathlossChange)
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
SLSS_t *ue_get_slss(module_id_t Mod_id,int CC_id,frame_t frame_tx,sub_frame_t subframe_tx) {
|
||||
|
||||
return((SLSS_t*)NULL);
|
||||
}
|
||||
|
||||
SLDCH_t *ue_get_sldch(module_id_t Mod_id,int CC_id,frame_t frame_tx,sub_frame_t subframe_tx) {
|
||||
|
||||
//UE_MAC_INST *ue = &UE_mac_inst[Mod_id];
|
||||
SLDCH_t *sldch = &UE_mac_inst[Mod_id].sldch;
|
||||
|
||||
sldch->payload_length = mac_rrc_data_req_ue(Mod_id,
|
||||
CC_id,
|
||||
frame_tx,
|
||||
SL_DISCOVERY,
|
||||
1,
|
||||
(uint8_t*)(sldch->payload), //&UE_mac_inst[Mod_id].SL_Discovery[0].Tx_buffer.Payload[0],
|
||||
0, //eNB_indexP
|
||||
0);
|
||||
|
||||
|
||||
|
||||
if (sldch->payload_length >0 ) {
|
||||
LOG_I(MAC,"Got %d bytes from RRC for SLDCH @ %p\n",sldch->payload_length,sldch);
|
||||
return (sldch);
|
||||
}
|
||||
else
|
||||
|
||||
return((SLDCH_t*)NULL);
|
||||
}
|
||||
|
||||
|
||||
SLSCH_t *ue_get_slsch(module_id_t module_idP,int CC_id,frame_t frameP,sub_frame_t subframeP) {
|
||||
|
||||
mac_rlc_status_resp_t rlc_status; //, rlc_status_data;
|
||||
uint32_t absSF = (frameP*10)+subframeP;
|
||||
UE_MAC_INST *ue = &UE_mac_inst[module_idP];
|
||||
int rvtab[4] = {0,2,3,1};
|
||||
int sdu_length;
|
||||
//uint8_t sl_lcids[2] = {3, 10}; //list of lcids for SL - hardcoded
|
||||
int i = 0;
|
||||
|
||||
// Note: this is hard-coded for now for the default SL configuration (4 SF PSCCH, 36 SF PSSCH)
|
||||
SLSCH_t *slsch = &UE_mac_inst[module_idP].slsch;
|
||||
|
||||
LOG_D(MAC,"Checking SLSCH for absSF %d\n",absSF);
|
||||
if ((absSF%40) == 0) { // fill PSCCH data later in first subframe of SL period
|
||||
ue->sltx_active = 0;
|
||||
|
||||
for (i = 0; i < MAX_NUM_LCID; i++){
|
||||
if (ue->SL_LCID[i] > 0) {
|
||||
for (int j = 0; j < ue->numCommFlows; j++){
|
||||
if ((ue->sourceL2Id > 0) && (ue->destinationList[j] >0) ){
|
||||
rlc_status = mac_rlc_status_ind(module_idP, 0x1234,0,frameP,subframeP,ENB_FLAG_NO,MBMS_FLAG_NO,
|
||||
ue->SL_LCID[i], 0xFFFF, ue->sourceL2Id, ue->destinationList[j]);
|
||||
if (rlc_status.bytes_in_buffer > 2){
|
||||
LOG_I(MAC,"SFN.SF %d.%d: Scheduling for %d bytes in Sidelink buffer\n",frameP,subframeP,rlc_status.bytes_in_buffer);
|
||||
// Fill in group id for off-network communications
|
||||
ue->sltx_active = 1;
|
||||
//store LCID, destinationL2Id
|
||||
ue->slsch_lcid = ue->SL_LCID[i];
|
||||
ue->destinationL2Id = ue->destinationList[j];
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if ( ue->sltx_active == 1) break;
|
||||
}
|
||||
} // we're not in the SCCH period
|
||||
else if (((absSF & 3) == 0 ) &&
|
||||
(ue->sltx_active == 1)) { // every 4th subframe, check for new data from RLC
|
||||
// 10 PRBs, mcs 19
|
||||
int TBS = 4584/8;
|
||||
int req;
|
||||
|
||||
|
||||
if (TBS <= rlc_status.bytes_in_buffer) req = TBS;
|
||||
else req = rlc_status.bytes_in_buffer;
|
||||
|
||||
if (req>0) {
|
||||
sdu_length = mac_rlc_data_req(module_idP,
|
||||
0x1234,
|
||||
0,
|
||||
frameP,
|
||||
ENB_FLAG_NO,
|
||||
MBMS_FLAG_NO,
|
||||
ue->slsch_lcid,
|
||||
req,
|
||||
(char*)(ue->slsch_pdu.payload + sizeof(SLSCH_SUBHEADER_24_Bit_DST_LONG))
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
,ue->sourceL2Id,
|
||||
ue->destinationL2Id
|
||||
#endif
|
||||
);
|
||||
|
||||
// Notes: 1. hard-coded to 24-bit destination format for now
|
||||
if (sdu_length > 0) {
|
||||
|
||||
LOG_I(MAC,"SFN.SF %d.%d : got %d bytes from Sidelink buffer (%d requested)\n",frameP,subframeP,sdu_length,req);
|
||||
LOG_I(MAC,"sourceL2Id: 0x%08x \n",ue->sourceL2Id);
|
||||
LOG_I(MAC,"groupL2Id/destinationL2Id: 0x%08x \n",ue->destinationL2Id);
|
||||
|
||||
slsch->payload = (unsigned char*)ue->slsch_pdu.payload;
|
||||
if (sdu_length < 128) {
|
||||
slsch->payload++;
|
||||
SLSCH_SUBHEADER_24_Bit_DST_SHORT *shorth= (SLSCH_SUBHEADER_24_Bit_DST_SHORT *)slsch->payload;
|
||||
shorth->F = 0;
|
||||
shorth->L = sdu_length;
|
||||
shorth->E = 0;
|
||||
shorth->LCID = ue->slsch_lcid;
|
||||
shorth->SRC07 = (ue->sourceL2Id>>16) & 0x000000ff;
|
||||
shorth->SRC815 = (ue->sourceL2Id>>8) & 0x000000ff;
|
||||
shorth->SRC1623 = ue->sourceL2Id & 0x000000ff;
|
||||
shorth->DST07 = (ue->destinationL2Id >>16) & 0x000000ff;
|
||||
shorth->DST815 = (ue->destinationL2Id >>8) & 0x000000ff;
|
||||
shorth->DST1623 = ue->destinationL2Id & 0x000000ff;
|
||||
shorth->V = 0x1;
|
||||
}
|
||||
else {
|
||||
SLSCH_SUBHEADER_24_Bit_DST_LONG *longh= (SLSCH_SUBHEADER_24_Bit_DST_LONG *)slsch->payload;
|
||||
longh->F = 1;
|
||||
longh->L_LSB = sdu_length&0xff;
|
||||
longh->L_MSB = (sdu_length>>8)&0x7f;
|
||||
longh->E = 0;
|
||||
longh->LCID = ue->slsch_lcid;
|
||||
longh->SRC07 = (ue->sourceL2Id >>16) & 0x000000ff;
|
||||
longh->SRC815 = (ue->sourceL2Id>>8) & 0x000000ff;
|
||||
longh->SRC1623 = ue->sourceL2Id & 0x000000ff;
|
||||
longh->DST07 = (ue->destinationL2Id >>16) & 0x000000ff;
|
||||
longh->DST815 = (ue->destinationL2Id>>8) & 0x000000ff;
|
||||
longh->DST1623 = ue->destinationL2Id & 0x000000ff;
|
||||
longh->V = 0x1;
|
||||
}
|
||||
slsch->rvidx = 0;
|
||||
slsch->payload_length = TBS;
|
||||
// fill in SLSCH configuration
|
||||
return(&ue->slsch);
|
||||
}
|
||||
else ue->sltx_active = 0;
|
||||
}
|
||||
|
||||
} else if ((absSF%40)>3 && ue->sltx_active == 1) { // handle retransmission of SDU
|
||||
LOG_I(MAC,"SFN.SF %d.%d : retransmission\n",frameP,subframeP);
|
||||
slsch->rvidx = rvtab[absSF&3];
|
||||
return(&ue->slsch);
|
||||
}
|
||||
|
||||
return(NULL);
|
||||
}
|
||||
|
||||
@@ -97,21 +97,22 @@ int nr_rrc_mac_config_req_ue(
|
||||
|
||||
}
|
||||
|
||||
if(mac_cell_group_configP->cs_RNTI != NULL ){
|
||||
switch(mac_cell_group_configP->cs_RNTI->present){
|
||||
if(phy_cell_group_configP->cs_RNTI != NULL ){
|
||||
switch(phy_cell_group_configP->cs_RNTI->present){
|
||||
case NR_SetupRelease_RNTI_Value_PR_NOTHING:
|
||||
break;
|
||||
case NR_SetupRelease_RNTI_Value_PR_release:
|
||||
mac->cs_RNTI = NULL;
|
||||
break;
|
||||
case NR_SetupRelease_RNTI_Value_PR_setup:
|
||||
mac->cs_RNTI = &mac_cell_group_configP->cs_RNTI->choice.setup;
|
||||
mac->cs_RNTI = &phy_cell_group_configP->cs_RNTI->choice.setup;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if(phy_cell_group_configP != NULL ){
|
||||
|
||||
@@ -91,8 +91,6 @@ typedef struct {
|
||||
fapi_nr_tx_request_t tx_request;
|
||||
fapi_nr_ul_config_request_t ul_config_request;
|
||||
fapi_nr_dl_config_request_t dl_config_request;
|
||||
fapi_nr_dci_indication_t dci_indication;
|
||||
fapi_nr_rx_indication_t rx_indication;
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -114,8 +114,13 @@ int8_t nr_ue_decode_mib(
|
||||
|
||||
uint32_t is_condition_A = (ssb_subcarrier_offset == 0); // 38.213 ch.13
|
||||
frequency_range_t frequency_range = FR1;
|
||||
#if (NR_RRC_VERSION >= MAKE_VERSION(15, 3, 0))
|
||||
uint32_t index_4msb = (mac->mib->pdcch_ConfigSIB1.controlResourceSetZero);
|
||||
uint32_t index_4lsb = (mac->mib->pdcch_ConfigSIB1.searchSpaceZero);
|
||||
#else
|
||||
uint32_t index_4msb = (mac->mib->pdcch_ConfigSIB1 >> 4) & 0xf;
|
||||
uint32_t index_4lsb = (mac->mib->pdcch_ConfigSIB1 & 0xf);
|
||||
#endif
|
||||
int32_t num_rbs = -1;
|
||||
int32_t num_symbols = -1;
|
||||
int32_t rb_offset = -1;
|
||||
@@ -428,7 +433,11 @@ int8_t nr_ue_decode_mib(
|
||||
mac->phy_config.config_req.pbch_config.subcarrier_spacing_common = mac->mib->subCarrierSpacingCommon;
|
||||
mac->phy_config.config_req.pbch_config.ssb_subcarrier_offset = ssb_subcarrier_offset; // after calculation
|
||||
mac->phy_config.config_req.pbch_config.dmrs_type_a_position = mac->mib->dmrs_TypeA_Position;
|
||||
#if (NR_RRC_VERSION >= MAKE_VERSION(15, 3, 0))
|
||||
mac->phy_config.config_req.pbch_config.pdcch_config_sib1 = (mac->mib->pdcch_ConfigSIB1.controlResourceSetZero) * 16 + (mac->mib->pdcch_ConfigSIB1.searchSpaceZero);
|
||||
#else
|
||||
mac->phy_config.config_req.pbch_config.pdcch_config_sib1 = mac->mib->pdcch_ConfigSIB1;
|
||||
#endif
|
||||
mac->phy_config.config_req.pbch_config.cell_barred = mac->mib->cellBarred;
|
||||
mac->phy_config.config_req.pbch_config.intra_frequency_reselection = mac->mib->intraFreqReselection;
|
||||
mac->phy_config.config_req.pbch_config.half_frame_bit = half_frame_bit;
|
||||
@@ -479,9 +488,6 @@ NR_UE_L2_STATE_t nr_ue_scheduler(
|
||||
search_space_mask = search_space_mask | type0_pdcch;
|
||||
mac->type0_pdcch_consecutive_slots = mac->type0_pdcch_dci_config.duration;
|
||||
}
|
||||
//if((mac->type0_pdcch_ss_sfn_c == SFN_C_EQ_SFN_SSB) && ( get_ssb_frame() )){
|
||||
// search_space_mask = search_space_mask | type0_pdcch;
|
||||
//}
|
||||
}
|
||||
if(mac->type0_pdcch_ss_mux_pattern == 2){
|
||||
// 38.213 Table 13-13, 13-14
|
||||
@@ -499,20 +505,8 @@ NR_UE_L2_STATE_t nr_ue_scheduler(
|
||||
}
|
||||
}
|
||||
|
||||
#if 0
|
||||
uint16_t rnti;
|
||||
|
||||
fapi_nr_coreset_t coreset;
|
||||
uint32_t duration;
|
||||
uint8_t aggregation_level;
|
||||
uint8_t number_of_candidates;
|
||||
uint16_t monitoring_symbols_within_slot;
|
||||
// DCI foramt-specific
|
||||
uint8_t format_2_0_number_of_candidates[5]; // aggregation level 1, 2, 4, 8, 16
|
||||
uint8_t format_2_3_monitorying_periodicity;
|
||||
uint8_t format_2_3_number_of_candidates;
|
||||
#endif
|
||||
fapi_nr_dl_config_request_t *dl_config = &mac->dl_config_request;
|
||||
// Type0 PDCCH search space
|
||||
if((search_space_mask & type0_pdcch) || ( mac->type0_pdcch_consecutive_slots != 0 )){
|
||||
mac->type0_pdcch_consecutive_slots = mac->type0_pdcch_consecutive_slots - 1;
|
||||
|
||||
@@ -1155,7 +1149,7 @@ printf("\n>>> nr_ue_process_dci at MAC layer with dci_format=%d\n",dci_format);
|
||||
* 49 PADDING_NR_DCI: (Note 2) If DCI format 0_0 is monitored in common search space
|
||||
* 50 SUL_IND_0_0:
|
||||
*/
|
||||
ul_config->ul_config_list[ul_config->number_pdus].pdu_type = FAPI_NR_DL_CONFIG_TYPE_PUSCH;
|
||||
ul_config->ul_config_list[ul_config->number_pdus].pdu_type = FAPI_NR_UL_CONFIG_TYPE_PUSCH;
|
||||
ul_config->ul_config_list[ul_config->number_pdus].ulsch_config_pdu.rnti = rnti;
|
||||
fapi_nr_ul_config_pusch_pdu_rel15_t *ulsch_config_pdu_0_0 = &ul_config->ul_config_list[ul_config->number_pdus].ulsch_config_pdu.ulsch_pdu_rel15;
|
||||
/* IDENTIFIER_DCI_FORMATS */
|
||||
@@ -1227,7 +1221,7 @@ printf("\n>>> nr_ue_process_dci at MAC layer with dci_format=%d\n",dci_format);
|
||||
* 48 UL_SCH_IND
|
||||
* 49 PADDING_NR_DCI: (Note 2) If DCI format 0_0 is monitored in common search space
|
||||
*/
|
||||
ul_config->ul_config_list[ul_config->number_pdus].pdu_type = FAPI_NR_DL_CONFIG_TYPE_PUSCH;
|
||||
ul_config->ul_config_list[ul_config->number_pdus].pdu_type = FAPI_NR_UL_CONFIG_TYPE_PUSCH;
|
||||
ul_config->ul_config_list[ul_config->number_pdus].ulsch_config_pdu.rnti = rnti;
|
||||
fapi_nr_ul_config_pusch_pdu_rel15_t *ulsch_config_pdu_0_1 = &ul_config->ul_config_list[ul_config->number_pdus].ulsch_config_pdu.ulsch_pdu_rel15;
|
||||
/* IDENTIFIER_DCI_FORMATS */
|
||||
@@ -1620,6 +1614,7 @@ printf("\n>>> nr_ue_process_dci at MAC layer with dci_format=%d\n",dci_format);
|
||||
dlsch_config_pdu_1_0->pdsch_to_harq_feedback_time_ind);
|
||||
|
||||
dl_config->dl_config_list[dl_config->number_pdus].pdu_type = FAPI_NR_DL_CONFIG_TYPE_DLSCH;
|
||||
|
||||
printf(">>> (nr_ue_procedures.c) pdu_type=%d\n\n",dl_config->dl_config_list[dl_config->number_pdus].pdu_type);
|
||||
|
||||
if(mac->if_module != NULL && mac->if_module->dl_indication != NULL)
|
||||
|
||||
@@ -1,15 +1,49 @@
|
||||
/*
|
||||
* 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 config.c
|
||||
* \brief gNB configuration performed by RRC or as a consequence of RRC procedures
|
||||
* \author Navid Nikaein and Raymond Knopp, WEI-TAI CHEN
|
||||
* \date 2010 - 2014, 2018
|
||||
* \version 0.1
|
||||
* \company Eurecom, NTUST
|
||||
* \email: navid.nikaein@eurecom.fr, kroempa@gmail.com
|
||||
* @ingroup _mac
|
||||
|
||||
*/
|
||||
|
||||
#include "COMMON/platform_types.h"
|
||||
#include "COMMON/platform_constants.h"
|
||||
#include "common/ran_context.h"
|
||||
|
||||
#include "UTIL/LOG/log.h"
|
||||
#include "UTIL/LOG/vcd_signal_dumper.h"
|
||||
#include "common/utils/LOG/log.h"
|
||||
#include "common/utils/LOG/vcd_signal_dumper.h"
|
||||
|
||||
#include "NR_BCCH-BCH-Message.h"
|
||||
#include "NR_ServingCellConfigCommon.h"
|
||||
|
||||
#include "LAYER2/NR_MAC_gNB/mac_proto.h"
|
||||
|
||||
#include "NR_MIB.h"
|
||||
|
||||
extern RAN_CONTEXT_t RC;
|
||||
//extern int l2_init_gNB(void);
|
||||
extern void mac_top_init_gNB(void);
|
||||
@@ -162,13 +196,13 @@ void config_common(int Mod_idP,
|
||||
//cfg->subframe_config.tl.tag =
|
||||
//cfg->num_tlv++;
|
||||
|
||||
cfg->rf_config.dl_channel_bandwidth.value = dl_BandwidthP;
|
||||
cfg->rf_config.dl_channel_bandwidth.tl.tag = NFAPI_RF_CONFIG_DL_CHANNEL_BANDWIDTH_TAG; //temporary
|
||||
cfg->rf_config.dl_carrier_bandwidth.value = dl_BandwidthP;
|
||||
cfg->rf_config.dl_carrier_bandwidth.tl.tag = NFAPI_RF_CONFIG_DL_CHANNEL_BANDWIDTH_TAG; //temporary
|
||||
cfg->num_tlv++;
|
||||
LOG_I(PHY,"%s() dl_BandwidthP:%d\n", __FUNCTION__, dl_BandwidthP);
|
||||
|
||||
cfg->rf_config.ul_channel_bandwidth.value = dl_BandwidthP;
|
||||
cfg->rf_config.ul_channel_bandwidth.tl.tag = NFAPI_RF_CONFIG_UL_CHANNEL_BANDWIDTH_TAG; //temporary
|
||||
cfg->rf_config.ul_carrier_bandwidth.value = dl_BandwidthP;
|
||||
cfg->rf_config.ul_carrier_bandwidth.tl.tag = NFAPI_RF_CONFIG_UL_CHANNEL_BANDWIDTH_TAG; //temporary
|
||||
cfg->num_tlv++;
|
||||
|
||||
//cfg->sch_config.half_frame_index.value = 0; Fix in PHY
|
||||
@@ -198,7 +232,11 @@ int rrc_mac_config_req_gNB(module_id_t Mod_idP,
|
||||
mib->message.choice.mib->subCarrierSpacingCommon,
|
||||
mib->message.choice.mib->ssb_SubcarrierOffset,
|
||||
mib->message.choice.mib->dmrs_TypeA_Position,
|
||||
#if (NR_RRC_VERSION >= MAKE_VERSION(15, 3, 0))
|
||||
mib->message.choice.mib->pdcch_ConfigSIB1.controlResourceSetZero * 16 + mib->message.choice.mib->pdcch_ConfigSIB1.searchSpaceZero,
|
||||
#else
|
||||
mib->message.choice.mib->pdcch_ConfigSIB1,
|
||||
#endif
|
||||
mib->message.choice.mib->cellBarred,
|
||||
mib->message.choice.mib->intraFreqReselection
|
||||
);
|
||||
|
||||
@@ -21,10 +21,11 @@
|
||||
|
||||
/*! \file gNB_scheduler.c
|
||||
* \brief gNB scheduler top level function operates on per subframe basis
|
||||
* \author Navid Nikaein and Raymond Knopp
|
||||
* \date 2010 - 2014
|
||||
* \email: navid.nikaein@eurecom.fr
|
||||
* \author Navid Nikaein and Raymond Knopp, WEI-TAI CHEN
|
||||
* \date 2010 - 2014, 2018
|
||||
* \email: navid.nikaein@eurecom.fr, kroempa@gmail.com
|
||||
* \version 0.5
|
||||
* \company Eurecom, NTUST
|
||||
* @ingroup _mac
|
||||
|
||||
*/
|
||||
@@ -35,8 +36,8 @@
|
||||
#include "LAYER2/MAC/mac_extern.h"
|
||||
#include "LAYER2/MAC/mac_proto.h"
|
||||
#include "LAYER2/NR_MAC_gNB/mac_proto.h"
|
||||
#include "UTIL/LOG/log.h"
|
||||
#include "UTIL/LOG/vcd_signal_dumper.h"
|
||||
#include "common/utils/LOG/log.h"
|
||||
#include "common/utils/LOG/vcd_signal_dumper.h"
|
||||
#include "UTIL/OPT/opt.h"
|
||||
#include "OCG.h"
|
||||
#include "OCG_extern.h"
|
||||
|
||||
@@ -19,12 +19,13 @@
|
||||
* contact@openairinterface.org
|
||||
*/
|
||||
|
||||
/*! \file eNB_scheduler_bch.c
|
||||
/*! \file gNB_scheduler_bch.c
|
||||
* \brief procedures related to eNB for the BCH transport channel
|
||||
* \author Navid Nikaein and Raymond Knopp
|
||||
* \date 2010 - 2014
|
||||
* \email: navid.nikaein@eurecom.fr
|
||||
* \author Navid Nikaein and Raymond Knopp, WEI-TAI CHEN
|
||||
* \date 2010 - 2014, 2018
|
||||
* \email: navid.nikaein@eurecom.fr, kroempa@gmail.com
|
||||
* \version 1.0
|
||||
* \company Eurecom, NTUST
|
||||
* @ingroup _mac
|
||||
|
||||
*/
|
||||
@@ -33,8 +34,8 @@
|
||||
#include "LAYER2/NR_MAC_gNB/nr_mac_gNB.h"
|
||||
#include "LAYER2/NR_MAC_gNB/mac_proto.h"
|
||||
#include "LAYER2/MAC/mac_extern.h"
|
||||
#include "UTIL/LOG/log.h"
|
||||
#include "UTIL/LOG/vcd_signal_dumper.h"
|
||||
#include "common/utils/LOG/log.h"
|
||||
#include "common/utils/LOG/vcd_signal_dumper.h"
|
||||
#include "UTIL/OPT/opt.h"
|
||||
#include "OCG.h"
|
||||
#include "OCG_extern.h"
|
||||
|
||||
@@ -67,7 +67,7 @@ void nr_schedule_css_dlsch_phytest(module_id_t module_idP,
|
||||
nr_configure_css_dci_from_mib(&gNB->pdcch_type0_params,
|
||||
kHz30, kHz30, nr_FR1, 0, 0,
|
||||
fp->slots_per_frame,
|
||||
cfg->rf_config.dl_channel_bandwidth.value);
|
||||
cfg->rf_config.dl_carrier_bandwidth.value);
|
||||
memcpy((void*)params_rel15, (void*)&gNB->pdcch_type0_params, sizeof(nfapi_nr_dl_config_pdcch_parameters_rel15_t));
|
||||
|
||||
pdu_rel15->frequency_domain_assignment = 5;
|
||||
|
||||
@@ -19,12 +19,13 @@
|
||||
* contact@openairinterface.org
|
||||
*/
|
||||
|
||||
/*! \file eNB_scheduler_primitives.c
|
||||
* \brief primitives used by eNB for BCH, RACH, ULSCH, DLSCH scheduling
|
||||
* \author Navid Nikaein and Raymond Knopp
|
||||
* \date 2010 - 2014
|
||||
* \email: navid.nikaein@eurecom.fr
|
||||
/*! \file gNB_scheduler_primitives.c
|
||||
* \brief primitives used by gNB for BCH, RACH, ULSCH, DLSCH scheduling
|
||||
* \author Navid Nikaein and Raymond Knopp, WEI-TAI CHEN
|
||||
* \date 2010 - 2014, 2018
|
||||
* \email: navid.nikaein@eurecom.fr, kroempa@gmail.com
|
||||
* \version 1.0
|
||||
* \company Eurecom, NTUST
|
||||
* @ingroup _mac
|
||||
|
||||
*/
|
||||
@@ -36,8 +37,8 @@
|
||||
#include "LAYER2/MAC/mac_extern.h"
|
||||
|
||||
#include "LAYER2/NR_MAC_gNB/mac_proto.h"
|
||||
#include "UTIL/LOG/log.h"
|
||||
#include "UTIL/LOG/vcd_signal_dumper.h"
|
||||
#include "common/utils/LOG/log.h"
|
||||
#include "common/utils/LOG/vcd_signal_dumper.h"
|
||||
#include "UTIL/OPT/opt.h"
|
||||
#include "OCG.h"
|
||||
#include "OCG_extern.h"
|
||||
|
||||
@@ -1,3 +1,32 @@
|
||||
/*
|
||||
* 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 mac_proto.h
|
||||
* \brief MAC functions prototypes for gNB
|
||||
* \author Navid Nikaein and Raymond Knopp, WEI-TAI CHEN
|
||||
* \date 2010 - 2014, 2018
|
||||
* \email navid.nikaein@eurecom.fr, kroempa@gmail.com
|
||||
* \version 1.0
|
||||
* \company Eurecom, NTUST
|
||||
*/
|
||||
|
||||
#ifndef __LAYER2_NR_MAC_PROTO_H__
|
||||
#define __LAYER2_NR_MAC_PROTO_H__
|
||||
|
||||
@@ -21,10 +21,11 @@
|
||||
|
||||
/*! \file main.c
|
||||
* \brief top init of Layer 2
|
||||
* \author Navid Nikaein and Raymond Knopp
|
||||
* \date 2010 - 2014
|
||||
* \author Navid Nikaein and Raymond Knopp, WEI-TAI CHEN
|
||||
* \date 2010 - 2014, 2018
|
||||
* \version 1.0
|
||||
* \email: navid.nikaein@eurecom.fr
|
||||
* \company Eurecom, NTUST
|
||||
* \email: navid.nikaein@eurecom.fr, kroempa@gmail.com
|
||||
* @ingroup _mac
|
||||
|
||||
*/
|
||||
@@ -35,7 +36,7 @@
|
||||
|
||||
#include "LAYER2/PDCP_v10.1.0/pdcp.h"
|
||||
#include "RRC/NR/nr_rrc_defs.h"
|
||||
#include "UTIL/LOG/log.h"
|
||||
#include "common/utils/LOG/log.h"
|
||||
//#include "RRC/L2_INTERFACE/openair_rrc_L2_interface.h"
|
||||
|
||||
#include "common/ran_context.h"
|
||||
@@ -121,4 +122,4 @@ void mac_top_init_gNB(void)
|
||||
UE_list->next_ul[list_el] = -1;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,12 +19,13 @@
|
||||
* contact@openairinterface.org
|
||||
*/
|
||||
|
||||
/*! \file LAYER2/MAC/defs.h
|
||||
/*! \file mac.h
|
||||
* \brief MAC data structures, constant, and function prototype
|
||||
* \author Navid Nikaein and Raymond Knopp
|
||||
* \date 2011
|
||||
* \author Navid Nikaein and Raymond Knopp, WIE-TAI CHEN
|
||||
* \date 2011, 2018
|
||||
* \version 0.5
|
||||
* \email navid.nikaein@eurecom.fr
|
||||
* \company Eurecom, NTUST
|
||||
* \email navid.nikaein@eurecom.fr, kroempa@gmail.com
|
||||
|
||||
*/
|
||||
/** @defgroup _oai2 openair2 Reference Implementation
|
||||
|
||||
@@ -42,10 +42,10 @@
|
||||
#include "OCG.h"
|
||||
#include "OCG_extern.h"
|
||||
#include "otg_rx.h"
|
||||
#include "UTIL/LOG/log.h"
|
||||
#include "common/utils/LOG/log.h"
|
||||
#include <inttypes.h>
|
||||
#include "platform_constants.h"
|
||||
#include "UTIL/LOG/vcd_signal_dumper.h"
|
||||
#include "common/utils/LOG/vcd_signal_dumper.h"
|
||||
#include "msc.h"
|
||||
|
||||
#if defined(ENABLE_SECURITY)
|
||||
@@ -83,6 +83,10 @@ boolean_t pdcp_data_req(
|
||||
const sdu_size_t sdu_buffer_sizeP,
|
||||
unsigned char *const sdu_buffer_pP,
|
||||
const pdcp_transmission_mode_t modeP
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
,const uint32_t * const sourceL2Id
|
||||
,const uint32_t * const destinationL2Id
|
||||
#endif
|
||||
)
|
||||
//-----------------------------------------------------------------------------
|
||||
{
|
||||
@@ -165,7 +169,11 @@ boolean_t pdcp_data_req(
|
||||
(unsigned char*)&pdcp_pdu_p->data[0],
|
||||
sdu_buffer_sizeP);
|
||||
#endif
|
||||
rlc_status = rlc_data_req(ctxt_pP, srb_flagP, MBMS_FLAG_YES, rb_idP, muiP, confirmP, sdu_buffer_sizeP, pdcp_pdu_p);
|
||||
rlc_status = rlc_data_req(ctxt_pP, srb_flagP, MBMS_FLAG_YES, rb_idP, muiP, confirmP, sdu_buffer_sizeP, pdcp_pdu_p
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
,NULL, NULL
|
||||
#endif
|
||||
);
|
||||
} else {
|
||||
rlc_status = RLC_OP_STATUS_OUT_OF_RESSOURCES;
|
||||
LOG_W(PDCP,PROTOCOL_CTXT_FMT" PDCP_DATA_REQ SDU DROPPED, OUT OF MEMORY \n",
|
||||
@@ -351,7 +359,12 @@ boolean_t pdcp_data_req(
|
||||
|
||||
LOG_F(PDCP,"\n");
|
||||
#endif
|
||||
rlc_status = rlc_data_req(ctxt_pP, srb_flagP, MBMS_FLAG_NO, rb_idP, muiP, confirmP, pdcp_pdu_size, pdcp_pdu_p);
|
||||
rlc_status = rlc_data_req(ctxt_pP, srb_flagP, MBMS_FLAG_NO, rb_idP, muiP, confirmP, pdcp_pdu_size, pdcp_pdu_p
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
,sourceL2Id
|
||||
,destinationL2Id
|
||||
#endif
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
@@ -582,9 +595,7 @@ pdcp_data_ind(
|
||||
}
|
||||
|
||||
if (pdcp_is_rx_seq_number_valid(sequence_number, pdcp_p, srb_flagP) == TRUE) {
|
||||
#if 0
|
||||
LOG_T(PDCP, "Incoming PDU has a sequence number (%d) in accordance with RX window\n", sequence_number);
|
||||
#endif
|
||||
/* if (dc == PDCP_DATA_PDU )
|
||||
LOG_D(PDCP, "Passing piggybacked SDU to NAS driver...\n");
|
||||
else
|
||||
@@ -599,13 +610,9 @@ pdcp_data_ind(
|
||||
* XXX Till we implement in-sequence delivery and duplicate discarding
|
||||
* mechanism all out-of-order packets will be delivered to RRC/IP
|
||||
*/
|
||||
#if 0
|
||||
LOG_D(PDCP, "Ignoring PDU...\n");
|
||||
free_mem_block(sdu_buffer, __func__);
|
||||
LOG_W(PDCP, "Ignoring PDU...\n");
|
||||
free_mem_block(sdu_buffer_pP, __func__);
|
||||
return FALSE;
|
||||
#else
|
||||
//LOG_W(PDCP, "Delivering out-of-order SDU to upper layer...\n");
|
||||
#endif
|
||||
}
|
||||
|
||||
// SRB1/2: control-plane data
|
||||
@@ -780,6 +787,8 @@ pdcp_data_ind(
|
||||
} else {
|
||||
((pdcp_data_ind_header_t*) new_sdu_p->data)->rb_id = rb_id + (ctxt_pP->module_id * maxDRB);
|
||||
}
|
||||
((pdcp_data_ind_header_t*) new_sdu_p->data)->inst = ctxt_pP->module_id;
|
||||
|
||||
#ifdef DEBUG_PDCP_FIFO_FLUSH_SDU
|
||||
static uint32_t pdcp_inst = 0;
|
||||
((pdcp_data_ind_header_t*) new_sdu_p->data)->inst = pdcp_inst++;
|
||||
@@ -851,7 +860,7 @@ pdcp_data_ind(
|
||||
|
||||
void pdcp_update_stats(const protocol_ctxt_t* const ctxt_pP){
|
||||
|
||||
uint8_t pdcp_uid = 0;
|
||||
uint16_t pdcp_uid = 0;
|
||||
uint8_t rb_id = 0;
|
||||
|
||||
// these stats are measured for both eNB and UE on per seond basis
|
||||
@@ -906,15 +915,6 @@ pdcp_run (
|
||||
//-----------------------------------------------------------------------------
|
||||
{
|
||||
|
||||
#if defined(ENABLE_ITTI)
|
||||
MessageDef *msg_p;
|
||||
const char *msg_name;
|
||||
instance_t instance;
|
||||
int result;
|
||||
protocol_ctxt_t ctxt;
|
||||
#endif
|
||||
|
||||
|
||||
if (ctxt_pP->enb_flag) {
|
||||
start_meas(&eNB_pdcp_stats[ctxt_pP->module_id].pdcp_run);
|
||||
} else {
|
||||
@@ -929,14 +929,15 @@ pdcp_run (
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PDCP_RUN, VCD_FUNCTION_IN);
|
||||
|
||||
#if defined(ENABLE_ITTI)
|
||||
MessageDef *msg_p;
|
||||
int result;
|
||||
protocol_ctxt_t ctxt;
|
||||
|
||||
do {
|
||||
// Checks if a message has been sent to PDCP sub-task
|
||||
itti_poll_msg (ctxt_pP->enb_flag ? TASK_PDCP_ENB : TASK_PDCP_UE, &msg_p);
|
||||
|
||||
if (msg_p != NULL) {
|
||||
msg_name = ITTI_MSG_NAME (msg_p);
|
||||
instance = ITTI_MSG_INSTANCE (msg_p);
|
||||
|
||||
switch (ITTI_MSG_ID(msg_p)) {
|
||||
case RRC_DCCH_DATA_REQ:
|
||||
@@ -950,9 +951,9 @@ pdcp_run (
|
||||
RRC_DCCH_DATA_REQ (msg_p).eNB_index);
|
||||
LOG_I(PDCP, PROTOCOL_CTXT_FMT"Received %s from %s: instance %d, rb_id %d, muiP %d, confirmP %d, mode %d\n",
|
||||
PROTOCOL_CTXT_ARGS(&ctxt),
|
||||
msg_name,
|
||||
ITTI_MSG_NAME (msg_p),
|
||||
ITTI_MSG_ORIGIN_NAME(msg_p),
|
||||
instance,
|
||||
ITTI_MSG_INSTANCE (msg_p),
|
||||
RRC_DCCH_DATA_REQ (msg_p).rb_id,
|
||||
RRC_DCCH_DATA_REQ (msg_p).muip,
|
||||
RRC_DCCH_DATA_REQ (msg_p).confirmp,
|
||||
@@ -965,7 +966,11 @@ pdcp_run (
|
||||
RRC_DCCH_DATA_REQ (msg_p).confirmp,
|
||||
RRC_DCCH_DATA_REQ (msg_p).sdu_size,
|
||||
RRC_DCCH_DATA_REQ (msg_p).sdu_p,
|
||||
RRC_DCCH_DATA_REQ (msg_p).mode);
|
||||
RRC_DCCH_DATA_REQ (msg_p).mode
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
, NULL, NULL
|
||||
#endif
|
||||
);
|
||||
if (result != TRUE)
|
||||
LOG_E(PDCP, "PDCP data request failed!\n");
|
||||
|
||||
@@ -990,7 +995,7 @@ pdcp_run (
|
||||
break;
|
||||
|
||||
default:
|
||||
LOG_E(PDCP, "Received unexpected message %s\n", msg_name);
|
||||
LOG_E(PDCP, "Received unexpected message %s\n", ITTI_MSG_NAME (msg_p));
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -999,29 +1004,6 @@ pdcp_run (
|
||||
}
|
||||
} while(msg_p != NULL);
|
||||
|
||||
# if 0
|
||||
{
|
||||
MessageDef *msg_resp_p;
|
||||
|
||||
msg_resp_p = itti_alloc_new_message(TASK_PDCP_ENB, MESSAGE_TEST);
|
||||
|
||||
itti_send_msg_to_task(TASK_RRC_ENB, 1, msg_resp_p);
|
||||
}
|
||||
{
|
||||
MessageDef *msg_resp_p;
|
||||
|
||||
msg_resp_p = itti_alloc_new_message(TASK_PDCP_ENB, MESSAGE_TEST);
|
||||
|
||||
itti_send_msg_to_task(TASK_ENB_APP, 2, msg_resp_p);
|
||||
}
|
||||
{
|
||||
MessageDef *msg_resp_p;
|
||||
|
||||
msg_resp_p = itti_alloc_new_message(TASK_PDCP_ENB, MESSAGE_TEST);
|
||||
|
||||
itti_send_msg_to_task(TASK_MAC_ENB, 3, msg_resp_p);
|
||||
}
|
||||
# endif
|
||||
#endif
|
||||
|
||||
// IP/NAS -> PDCP traffic : TX, read the pkt from the upper layer buffer
|
||||
@@ -1143,7 +1125,7 @@ rrc_pdcp_config_asn1_req (
|
||||
uint8_t *const kRRCenc_pP,
|
||||
uint8_t *const kRRCint_pP,
|
||||
uint8_t *const kUPenc_pP
|
||||
#if defined(Rel10) || defined(Rel14)
|
||||
#if (RRC_VERSION >= MAKE_VERSION(9, 0, 0))
|
||||
,PMCH_InfoList_r9_t* const pmch_InfoList_r9_pP
|
||||
#endif
|
||||
,rb_id_t *const defaultDRB
|
||||
@@ -1170,7 +1152,7 @@ rrc_pdcp_config_asn1_req (
|
||||
hashtable_rc_t h_rc;
|
||||
hash_key_t key_defaultDRB = HASHTABLE_NOT_A_KEY_VALUE;
|
||||
hashtable_rc_t h_defaultDRB_rc;
|
||||
#if defined(Rel10) || defined(Rel14)
|
||||
#if (RRC_VERSION >= MAKE_VERSION(9, 0, 0))
|
||||
int i,j;
|
||||
MBMS_SessionInfoList_r9_t *mbms_SessionInfoList_r9_p = NULL;
|
||||
MBMS_SessionInfo_r9_t *MBMS_SessionInfo_p = NULL;
|
||||
@@ -1468,7 +1450,7 @@ rrc_pdcp_config_asn1_req (
|
||||
}
|
||||
}
|
||||
|
||||
#if defined(Rel10) || defined(Rel14)
|
||||
#if (RRC_VERSION >= MAKE_VERSION(9, 0, 0))
|
||||
|
||||
if (pmch_InfoList_r9_pP != NULL) {
|
||||
for (i=0; i<pmch_InfoList_r9_pP->list.count; i++) {
|
||||
@@ -1592,7 +1574,7 @@ pdcp_config_req_asn1 (
|
||||
pdcp_pP->first_missing_pdu = -1;
|
||||
pdcp_pP->rx_hfn_offset = 0;
|
||||
|
||||
LOG_N(PDCP, PROTOCOL_PDCP_CTXT_FMT" Action ADD LCID %d (%s id %d) "
|
||||
LOG_I(PDCP, PROTOCOL_PDCP_CTXT_FMT" Action ADD LCID %d (%s id %d) "
|
||||
"configured with SN size %d bits and RLC %s\n",
|
||||
PROTOCOL_PDCP_CTXT_ARGS(ctxt_pP,pdcp_pP),
|
||||
lc_idP,
|
||||
@@ -1641,7 +1623,7 @@ pdcp_config_req_asn1 (
|
||||
pdcp_pP->seq_num_size=5;
|
||||
}
|
||||
|
||||
LOG_N(PDCP,PROTOCOL_PDCP_CTXT_FMT" Action MODIFY LCID %d "
|
||||
LOG_I(PDCP,PROTOCOL_PDCP_CTXT_FMT" Action MODIFY LCID %d "
|
||||
"RB id %d reconfigured with SN size %d and RLC %s \n",
|
||||
PROTOCOL_PDCP_CTXT_ARGS(ctxt_pP,pdcp_pP),
|
||||
lc_idP,
|
||||
@@ -1678,7 +1660,7 @@ pdcp_config_req_asn1 (
|
||||
|
||||
memset(pdcp_pP, 0, sizeof(pdcp_t));
|
||||
break;
|
||||
#if defined(Rel10) || defined(Rel14)
|
||||
#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
|
||||
case CONFIG_ACTION_MBMS_ADD:
|
||||
case CONFIG_ACTION_MBMS_MODIFY:
|
||||
@@ -1794,6 +1776,7 @@ rrc_pdcp_config_req (
|
||||
|
||||
if (ctxt_pP->enb_flag == ENB_FLAG_NO) {
|
||||
pdcp_p->is_ue = TRUE;
|
||||
pdcp_UE_UE_module_id_to_rnti[ctxt_pP->module_id] = ctxt_pP->rnti;
|
||||
} else {
|
||||
pdcp_p->is_ue = FALSE;
|
||||
}
|
||||
@@ -1812,9 +1795,9 @@ rrc_pdcp_config_req (
|
||||
}
|
||||
|
||||
pdcp_p->first_missing_pdu = -1;
|
||||
LOG_D(PDCP,PROTOCOL_PDCP_CTXT_FMT" Config request : Action ADD: radio bearer id %d (already added) configured\n",
|
||||
PROTOCOL_PDCP_CTXT_ARGS(ctxt_pP,pdcp_p),
|
||||
rb_idP);
|
||||
LOG_D(PDCP,PROTOCOL_PDCP_CTXT_FMT" Config request : Action ADD: radio bearer id %d (already added) configured\n",
|
||||
PROTOCOL_PDCP_CTXT_ARGS(ctxt_pP,pdcp_p),
|
||||
rb_idP);
|
||||
break;
|
||||
|
||||
case CONFIG_ACTION_MODIFY:
|
||||
@@ -1871,10 +1854,10 @@ rrc_pdcp_config_req (
|
||||
|
||||
if (ctxt_pP->enb_flag == ENB_FLAG_NO) {
|
||||
pdcp_p->is_ue = TRUE;
|
||||
|
||||
pdcp_UE_UE_module_id_to_rnti[ctxt_pP->module_id] = ctxt_pP->rnti;
|
||||
} else {
|
||||
pdcp_p->is_ue = FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
pdcp_p->next_pdcp_tx_sn = 0;
|
||||
pdcp_p->next_pdcp_rx_sn = 0;
|
||||
@@ -1998,7 +1981,7 @@ void pdcp_layer_init(void)
|
||||
|
||||
module_id_t instance;
|
||||
int i,j;
|
||||
#if defined(Rel10) || defined(Rel14)
|
||||
#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
mbms_session_id_t session_id;
|
||||
mbms_service_id_t service_id;
|
||||
#endif
|
||||
@@ -2010,7 +1993,7 @@ void pdcp_layer_init(void)
|
||||
AssertFatal(pdcp_coll_p != NULL, "UNRECOVERABLE error, PDCP hashtable_create failed");
|
||||
|
||||
for (instance = 0; instance < MAX_MOBILES_PER_ENB; instance++) {
|
||||
#if defined(Rel10) || defined(Rel14)
|
||||
#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
|
||||
for (service_id = 0; service_id < maxServiceCount; service_id++) {
|
||||
for (session_id = 0; session_id < maxSessionPerPMCH; session_id++) {
|
||||
@@ -2024,7 +2007,7 @@ void pdcp_layer_init(void)
|
||||
|
||||
|
||||
for (instance = 0; instance < NUMBER_OF_eNB_MAX; instance++) {
|
||||
#if defined(Rel10) || defined(Rel14)
|
||||
#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
|
||||
for (service_id = 0; service_id < maxServiceCount; service_id++) {
|
||||
for (session_id = 0; session_id < maxSessionPerPMCH; session_id++) {
|
||||
|
||||
+129
-123
@@ -34,34 +34,6 @@
|
||||
#ifndef __PDCP_H__
|
||||
# define __PDCP_H__
|
||||
//-----------------------------------------------------------------------------
|
||||
# ifdef PDCP_C
|
||||
# define private_pdcp(x) x
|
||||
# define protected_pdcp(x) x
|
||||
# define public_pdcp(x) x
|
||||
# else
|
||||
# define private_pdcp(x)
|
||||
# define public_pdcp(x) extern x
|
||||
# ifdef PDCP_FIFO_C
|
||||
# define protected_pdcp(x) extern x
|
||||
# else
|
||||
# define protected_pdcp(x)
|
||||
# endif
|
||||
# endif
|
||||
|
||||
# ifdef PDCP_FIFO_C
|
||||
# define private_pdcp_fifo(x) x
|
||||
# define protected_pdcp_fifo(x) x
|
||||
# define public_pdcp_fifo(x) x
|
||||
# else
|
||||
# define private_pdcp_fifo(x)
|
||||
# define public_pdcp_fifo(x) extern x
|
||||
# ifdef PDCP_C
|
||||
# define protected_pdcp_fifo(x) extern x
|
||||
# else
|
||||
# define protected_pdcp_fifo(x)
|
||||
# endif
|
||||
# endif
|
||||
//-----------------------------------------------------------------------------
|
||||
#ifndef NON_ACCESS_STRATUM
|
||||
#include "UTIL/MEM/mem_block.h"
|
||||
#include "UTIL/LISTS/list.h"
|
||||
@@ -74,7 +46,7 @@
|
||||
#include "DRB-ToAddModList.h"
|
||||
#include "SRB-ToAddMod.h"
|
||||
#include "SRB-ToAddModList.h"
|
||||
#if defined(Rel10) || defined(Rel14)
|
||||
#if (RRC_VERSION >= MAKE_VERSION(9, 0, 0))
|
||||
#include "MBMS-SessionInfoList-r9.h"
|
||||
#include "PMCH-InfoList-r9.h"
|
||||
#endif
|
||||
@@ -94,41 +66,41 @@ extern int pdcp_instance_cnt;
|
||||
int init_pdcp_thread(void);
|
||||
void cleanup_pdcp_thread(void);
|
||||
|
||||
public_pdcp(uint32_t Pdcp_stats_tx_window_ms[MAX_NUM_CCs][MAX_MOBILES_PER_ENB]);
|
||||
public_pdcp(uint32_t Pdcp_stats_tx_bytes[MAX_NUM_CCs][MAX_MOBILES_PER_ENB][NB_RB_MAX]);
|
||||
public_pdcp(uint32_t Pdcp_stats_tx_bytes_w[MAX_NUM_CCs][MAX_MOBILES_PER_ENB][NB_RB_MAX]);
|
||||
public_pdcp(uint32_t Pdcp_stats_tx_bytes_tmp_w[MAX_NUM_CCs][MAX_MOBILES_PER_ENB][NB_RB_MAX]);
|
||||
public_pdcp(uint32_t Pdcp_stats_tx[MAX_NUM_CCs][MAX_MOBILES_PER_ENB][NB_RB_MAX]);
|
||||
public_pdcp(uint32_t Pdcp_stats_tx_w[MAX_NUM_CCs][MAX_MOBILES_PER_ENB][NB_RB_MAX]);
|
||||
public_pdcp(uint32_t Pdcp_stats_tx_tmp_w[MAX_NUM_CCs][MAX_MOBILES_PER_ENB][NB_RB_MAX]);
|
||||
public_pdcp(uint32_t Pdcp_stats_tx_sn[MAX_NUM_CCs][MAX_MOBILES_PER_ENB][NB_RB_MAX]);
|
||||
public_pdcp(uint32_t Pdcp_stats_tx_throughput_w[MAX_NUM_CCs][MAX_MOBILES_PER_ENB][NB_RB_MAX]);
|
||||
public_pdcp(uint32_t Pdcp_stats_tx_aiat[MAX_NUM_CCs][MAX_MOBILES_PER_ENB][NB_RB_MAX]);
|
||||
public_pdcp(uint32_t Pdcp_stats_tx_aiat_w[MAX_NUM_CCs][MAX_MOBILES_PER_ENB][NB_RB_MAX]);
|
||||
public_pdcp(uint32_t Pdcp_stats_tx_aiat_tmp_w[MAX_NUM_CCs][MAX_MOBILES_PER_ENB][NB_RB_MAX]);
|
||||
public_pdcp(uint32_t Pdcp_stats_tx_iat[MAX_NUM_CCs][MAX_MOBILES_PER_ENB][NB_RB_MAX]);
|
||||
uint32_t Pdcp_stats_tx_window_ms[MAX_NUM_CCs][MAX_MOBILES_PER_ENB];
|
||||
uint32_t Pdcp_stats_tx_bytes[MAX_NUM_CCs][MAX_MOBILES_PER_ENB][NB_RB_MAX];
|
||||
uint32_t Pdcp_stats_tx_bytes_w[MAX_NUM_CCs][MAX_MOBILES_PER_ENB][NB_RB_MAX];
|
||||
uint32_t Pdcp_stats_tx_bytes_tmp_w[MAX_NUM_CCs][MAX_MOBILES_PER_ENB][NB_RB_MAX];
|
||||
uint32_t Pdcp_stats_tx[MAX_NUM_CCs][MAX_MOBILES_PER_ENB][NB_RB_MAX];
|
||||
uint32_t Pdcp_stats_tx_w[MAX_NUM_CCs][MAX_MOBILES_PER_ENB][NB_RB_MAX];
|
||||
uint32_t Pdcp_stats_tx_tmp_w[MAX_NUM_CCs][MAX_MOBILES_PER_ENB][NB_RB_MAX];
|
||||
uint32_t Pdcp_stats_tx_sn[MAX_NUM_CCs][MAX_MOBILES_PER_ENB][NB_RB_MAX];
|
||||
uint32_t Pdcp_stats_tx_throughput_w[MAX_NUM_CCs][MAX_MOBILES_PER_ENB][NB_RB_MAX];
|
||||
uint32_t Pdcp_stats_tx_aiat[MAX_NUM_CCs][MAX_MOBILES_PER_ENB][NB_RB_MAX];
|
||||
uint32_t Pdcp_stats_tx_aiat_w[MAX_NUM_CCs][MAX_MOBILES_PER_ENB][NB_RB_MAX];
|
||||
uint32_t Pdcp_stats_tx_aiat_tmp_w[MAX_NUM_CCs][MAX_MOBILES_PER_ENB][NB_RB_MAX];
|
||||
uint32_t Pdcp_stats_tx_iat[MAX_NUM_CCs][MAX_MOBILES_PER_ENB][NB_RB_MAX];
|
||||
|
||||
public_pdcp(uint32_t Pdcp_stats_rx_window_ms[MAX_NUM_CCs][MAX_MOBILES_PER_ENB]);
|
||||
public_pdcp(uint32_t Pdcp_stats_rx[MAX_NUM_CCs][MAX_MOBILES_PER_ENB][NB_RB_MAX]);
|
||||
public_pdcp(uint32_t Pdcp_stats_rx_w[MAX_NUM_CCs][MAX_MOBILES_PER_ENB][NB_RB_MAX]);
|
||||
public_pdcp(uint32_t Pdcp_stats_rx_tmp_w[MAX_NUM_CCs][MAX_MOBILES_PER_ENB][NB_RB_MAX]);
|
||||
public_pdcp(uint32_t Pdcp_stats_rx_bytes[MAX_NUM_CCs][MAX_MOBILES_PER_ENB][NB_RB_MAX]);
|
||||
public_pdcp(uint32_t Pdcp_stats_rx_bytes_w[MAX_NUM_CCs][MAX_MOBILES_PER_ENB][NB_RB_MAX]);
|
||||
public_pdcp(uint32_t Pdcp_stats_rx_bytes_tmp_w[MAX_NUM_CCs][MAX_MOBILES_PER_ENB][NB_RB_MAX]);
|
||||
public_pdcp(uint32_t Pdcp_stats_rx_sn[MAX_NUM_CCs][MAX_MOBILES_PER_ENB][NB_RB_MAX]);
|
||||
public_pdcp(uint32_t Pdcp_stats_rx_goodput_w[MAX_NUM_CCs][MAX_MOBILES_PER_ENB][NB_RB_MAX]);
|
||||
public_pdcp(uint32_t Pdcp_stats_rx_aiat[MAX_NUM_CCs][MAX_MOBILES_PER_ENB][NB_RB_MAX]);
|
||||
public_pdcp(uint32_t Pdcp_stats_rx_aiat_w[MAX_NUM_CCs][MAX_MOBILES_PER_ENB][NB_RB_MAX]);
|
||||
public_pdcp(uint32_t Pdcp_stats_rx_aiat_tmp_w[MAX_NUM_CCs][MAX_MOBILES_PER_ENB][NB_RB_MAX]);
|
||||
public_pdcp(uint32_t Pdcp_stats_rx_iat[MAX_NUM_CCs][MAX_MOBILES_PER_ENB][NB_RB_MAX]);
|
||||
public_pdcp(uint32_t Pdcp_stats_rx_outoforder[MAX_NUM_CCs][MAX_MOBILES_PER_ENB][NB_RB_MAX]);
|
||||
uint32_t Pdcp_stats_rx_window_ms[MAX_NUM_CCs][MAX_MOBILES_PER_ENB];
|
||||
uint32_t Pdcp_stats_rx[MAX_NUM_CCs][MAX_MOBILES_PER_ENB][NB_RB_MAX];
|
||||
uint32_t Pdcp_stats_rx_w[MAX_NUM_CCs][MAX_MOBILES_PER_ENB][NB_RB_MAX];
|
||||
uint32_t Pdcp_stats_rx_tmp_w[MAX_NUM_CCs][MAX_MOBILES_PER_ENB][NB_RB_MAX];
|
||||
uint32_t Pdcp_stats_rx_bytes[MAX_NUM_CCs][MAX_MOBILES_PER_ENB][NB_RB_MAX];
|
||||
uint32_t Pdcp_stats_rx_bytes_w[MAX_NUM_CCs][MAX_MOBILES_PER_ENB][NB_RB_MAX];
|
||||
uint32_t Pdcp_stats_rx_bytes_tmp_w[MAX_NUM_CCs][MAX_MOBILES_PER_ENB][NB_RB_MAX];
|
||||
uint32_t Pdcp_stats_rx_sn[MAX_NUM_CCs][MAX_MOBILES_PER_ENB][NB_RB_MAX];
|
||||
uint32_t Pdcp_stats_rx_goodput_w[MAX_NUM_CCs][MAX_MOBILES_PER_ENB][NB_RB_MAX];
|
||||
uint32_t Pdcp_stats_rx_aiat[MAX_NUM_CCs][MAX_MOBILES_PER_ENB][NB_RB_MAX];
|
||||
uint32_t Pdcp_stats_rx_aiat_w[MAX_NUM_CCs][MAX_MOBILES_PER_ENB][NB_RB_MAX];
|
||||
uint32_t Pdcp_stats_rx_aiat_tmp_w[MAX_NUM_CCs][MAX_MOBILES_PER_ENB][NB_RB_MAX];
|
||||
uint32_t Pdcp_stats_rx_iat[MAX_NUM_CCs][MAX_MOBILES_PER_ENB][NB_RB_MAX];
|
||||
uint32_t Pdcp_stats_rx_outoforder[MAX_NUM_CCs][MAX_MOBILES_PER_ENB][NB_RB_MAX];
|
||||
|
||||
public_pdcp(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*/
|
||||
//public_pdcp(uint64_t *pdcp_packet_counter);
|
||||
//public_pdcp(uint64_t *pdcp_size_packet);
|
||||
//uint64_t *pdcp_packet_counter;
|
||||
//uint64_t *pdcp_size_packet;
|
||||
typedef struct pdcp_enb_s {
|
||||
// used for eNB stats generation
|
||||
uint16_t uid[MAX_MOBILES_PER_ENB];
|
||||
@@ -141,7 +113,7 @@ typedef struct pdcp_enb_s {
|
||||
|
||||
} pdcp_enb_t;
|
||||
|
||||
public_pdcp(pdcp_enb_t pdcp_enb[MAX_NUM_CCs]);
|
||||
pdcp_enb_t pdcp_enb[MAX_NUM_CCs];
|
||||
|
||||
typedef struct pdcp_stats_s {
|
||||
time_stats_t pdcp_run;
|
||||
@@ -223,7 +195,7 @@ typedef struct pdcp_s {
|
||||
|
||||
} pdcp_t;
|
||||
|
||||
#if defined(Rel10) || defined(Rel14)
|
||||
#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
typedef struct pdcp_mbms_s {
|
||||
boolean_t instanciated_instance;
|
||||
rb_id_t rb_id;
|
||||
@@ -251,7 +223,7 @@ typedef struct pdcp_mbms_s {
|
||||
* \note None
|
||||
* @ingroup _pdcp
|
||||
*/
|
||||
public_pdcp(boolean_t pdcp_data_req(
|
||||
boolean_t pdcp_data_req(
|
||||
protocol_ctxt_t* ctxt_pP,
|
||||
const srb_flag_t srb_flagP,
|
||||
const rb_id_t rb_id,
|
||||
@@ -259,7 +231,12 @@ public_pdcp(boolean_t pdcp_data_req(
|
||||
const confirm_t confirmP, \
|
||||
const sdu_size_t sdu_buffer_size,
|
||||
unsigned char* const sdu_buffer,
|
||||
const pdcp_transmission_mode_t mode));
|
||||
const pdcp_transmission_mode_t mode
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
,const uint32_t * const sourceL2Id
|
||||
,const uint32_t * const destinationL2Id
|
||||
#endif
|
||||
);
|
||||
|
||||
/*! \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
|
||||
@@ -274,13 +251,13 @@ public_pdcp(boolean_t pdcp_data_req(
|
||||
* \note None
|
||||
* @ingroup _pdcp
|
||||
*/
|
||||
public_pdcp(boolean_t pdcp_data_ind(
|
||||
boolean_t pdcp_data_ind(
|
||||
const protocol_ctxt_t* const ctxt_pP,
|
||||
const srb_flag_t srb_flagP,
|
||||
const MBMS_flag_t MBMS_flagP,
|
||||
const rb_id_t rb_id,
|
||||
const sdu_size_t sdu_buffer_size,
|
||||
mem_block_t* const sdu_buffer));
|
||||
mem_block_t* const sdu_buffer);
|
||||
|
||||
/*! \fn void rrc_pdcp_config_req(const protocol_ctxt_t* const ,uint32_t,rb_id_t,uint8_t)
|
||||
* \brief This functions initializes relevant PDCP entity
|
||||
@@ -292,12 +269,12 @@ public_pdcp(boolean_t pdcp_data_ind(
|
||||
* \note None
|
||||
* @ingroup _pdcp
|
||||
*/
|
||||
public_pdcp(void rrc_pdcp_config_req (
|
||||
void rrc_pdcp_config_req (
|
||||
const protocol_ctxt_t* const ctxt_pP,
|
||||
const srb_flag_t srb_flagP,
|
||||
const uint32_t actionP,
|
||||
const rb_id_t rb_idP,
|
||||
const uint8_t security_modeP);)
|
||||
const uint8_t security_modeP);
|
||||
|
||||
/*! \fn bool rrc_pdcp_config_asn1_req (const protocol_ctxt_t* const , SRB_ToAddModList_t* srb2add_list, DRB_ToAddModList_t* drb2add_list, DRB_ToReleaseList_t* drb2release_list)
|
||||
* \brief Function for RRC to configure a Radio Bearer.
|
||||
@@ -313,8 +290,7 @@ public_pdcp(void rrc_pdcp_config_req (
|
||||
* \param[in] defaultDRB Default DRB ID
|
||||
* \return A status about the processing, OK or error code.
|
||||
*/
|
||||
public_pdcp(
|
||||
boolean_t rrc_pdcp_config_asn1_req (
|
||||
boolean_t rrc_pdcp_config_asn1_req (
|
||||
const protocol_ctxt_t* const ctxt_pP,
|
||||
SRB_ToAddModList_t *const srb2add_list,
|
||||
DRB_ToAddModList_t *const drb2add_list,
|
||||
@@ -323,11 +299,11 @@ public_pdcp(
|
||||
uint8_t *const kRRCenc,
|
||||
uint8_t *const kRRCint,
|
||||
uint8_t *const kUPenc
|
||||
#if defined(Rel10) || defined(Rel14)
|
||||
#if (RRC_VERSION >= MAKE_VERSION(9, 0, 0))
|
||||
,PMCH_InfoList_r9_t *pmch_InfoList_r9
|
||||
#endif
|
||||
,rb_id_t *const defaultDRB
|
||||
));
|
||||
);
|
||||
|
||||
/*! \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.
|
||||
@@ -349,7 +325,7 @@ public_pdcp(
|
||||
* \param[in] kUPenc User-Plane encryption key
|
||||
* \return A status about the processing, OK or error code.
|
||||
*/
|
||||
public_pdcp(boolean_t pdcp_config_req_asn1 (
|
||||
boolean_t pdcp_config_req_asn1 (
|
||||
const protocol_ctxt_t* const ctxt_pP,
|
||||
pdcp_t *const pdcp_pP,
|
||||
const srb_flag_t srb_flagP,
|
||||
@@ -364,22 +340,22 @@ public_pdcp(boolean_t pdcp_config_req_asn1 (
|
||||
const uint8_t security_mode,
|
||||
uint8_t *const kRRCenc,
|
||||
uint8_t *const kRRCint,
|
||||
uint8_t *const kUPenc));
|
||||
uint8_t *const kUPenc);
|
||||
|
||||
/*! \fn void pdcp_add_UE(const protocol_ctxt_t* const ctxt_pP)
|
||||
* \brief Function (for RRC) to add a new UE in PDCP module
|
||||
* \param[in] ctxt_pP Running context.
|
||||
* \return A status about the processing, OK or error code.
|
||||
*/
|
||||
public_pdcp(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)
|
||||
* \brief Function for RRC to remove UE from PDCP module hashtable
|
||||
* \param[in] ctxt_pP Running context.
|
||||
* \return A status about the processing, OK or error code.
|
||||
*/
|
||||
public_pdcp(boolean_t pdcp_remove_UE(
|
||||
const protocol_ctxt_t* const ctxt_pP));
|
||||
boolean_t pdcp_remove_UE(
|
||||
const protocol_ctxt_t* const ctxt_pP);
|
||||
|
||||
/*! \fn void rrc_pdcp_config_release( const protocol_ctxt_t* const, rb_id_t)
|
||||
* \brief This functions is unused
|
||||
@@ -389,7 +365,7 @@ public_pdcp(boolean_t pdcp_remove_UE(
|
||||
* \note None
|
||||
* @ingroup _pdcp
|
||||
*/
|
||||
//public_pdcp(void rrc_pdcp_config_release ( const protocol_ctxt_t* const ctxt_pP, rb_id_t);)
|
||||
//void rrc_pdcp_config_release ( const protocol_ctxt_t* const ctxt_pP, rb_id_t);
|
||||
|
||||
/*! \fn void pdcp_run(const protocol_ctxt_t* const ctxt_pP)
|
||||
* \brief Runs PDCP entity to let it handle incoming/outgoing SDUs
|
||||
@@ -398,27 +374,23 @@ public_pdcp(boolean_t pdcp_remove_UE(
|
||||
* \note None
|
||||
* @ingroup _pdcp
|
||||
*/
|
||||
public_pdcp(void pdcp_run (
|
||||
const protocol_ctxt_t* const ctxt_pP);)
|
||||
public_pdcp(int pdcp_module_init (void);)
|
||||
public_pdcp(void pdcp_module_cleanup (void);)
|
||||
public_pdcp(void pdcp_layer_init (void);)
|
||||
public_pdcp(void pdcp_layer_cleanup (void);)
|
||||
void pdcp_run (
|
||||
const protocol_ctxt_t* const ctxt_pP);
|
||||
int pdcp_module_init (void);
|
||||
void pdcp_module_cleanup (void);
|
||||
void pdcp_layer_init (void);
|
||||
void pdcp_layer_cleanup (void);
|
||||
#if defined(PDCP_USE_NETLINK_QUEUES)
|
||||
public_pdcp(int pdcp_netlink_init (void);)
|
||||
int pdcp_netlink_init (void);
|
||||
|
||||
#endif
|
||||
#define PDCP2NW_DRIVER_FIFO 21
|
||||
#define NW_DRIVER2PDCP_FIFO 22
|
||||
|
||||
protected_pdcp_fifo(int pdcp_fifo_flush_sdus (
|
||||
const protocol_ctxt_t* const ctxt_pP);)
|
||||
protected_pdcp_fifo(int pdcp_fifo_read_input_sdus_remaining_bytes (
|
||||
const protocol_ctxt_t* const ctxt_pP);)
|
||||
protected_pdcp_fifo(int pdcp_fifo_read_input_sdus (
|
||||
const protocol_ctxt_t* const ctxt_pP);)
|
||||
protected_pdcp_fifo(void pdcp_fifo_read_input_sdus_from_otg (
|
||||
const protocol_ctxt_t* const ctxt_pP);)
|
||||
int pdcp_fifo_flush_sdus ( const protocol_ctxt_t* const ctxt_pP);
|
||||
int pdcp_fifo_read_input_sdus_remaining_bytes ( const protocol_ctxt_t* const ctxt_pP);
|
||||
int pdcp_fifo_read_input_sdus ( const protocol_ctxt_t* const ctxt_pP);
|
||||
void pdcp_fifo_read_input_sdus_from_otg ( const protocol_ctxt_t* const ctxt_pP);
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
@@ -432,6 +404,10 @@ typedef struct pdcp_data_req_header_s {
|
||||
sdu_size_t data_size;
|
||||
signed int inst;
|
||||
ip_traffic_type_t traffic_type;
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
uint32_t sourceL2Id;
|
||||
uint32_t destinationL2Id;
|
||||
#endif
|
||||
} pdcp_data_req_header_t;
|
||||
|
||||
typedef struct pdcp_data_ind_header_s {
|
||||
@@ -439,6 +415,10 @@ typedef struct pdcp_data_ind_header_s {
|
||||
sdu_size_t data_size;
|
||||
signed int inst;
|
||||
ip_traffic_type_t dummy_traffic_type;
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
uint32_t sourceL2Id;
|
||||
uint32_t destinationL2Id;
|
||||
#endif
|
||||
} pdcp_data_ind_header_t;
|
||||
|
||||
struct pdcp_netlink_element_s {
|
||||
@@ -448,14 +428,40 @@ struct pdcp_netlink_element_s {
|
||||
uint8_t *data;
|
||||
};
|
||||
|
||||
#if 0
|
||||
/*
|
||||
* Missing PDU information struct, a copy of this will be enqueued
|
||||
* into pdcp.missing_pdus for every missing PDU
|
||||
*/
|
||||
typedef struct pdcp_missing_pdu_info_t {
|
||||
pdcp_sn_t sequence_number;
|
||||
} pdcp_missing_pdu_info_t;
|
||||
//TTN for D2D (PC5S)
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
#define PDCP_SOCKET_PORT_NO 9999 //temporary value
|
||||
#define PC5_SIGNALLING_PAYLOAD_SIZE 100 //should be updated with a correct value
|
||||
int pdcp_pc5_sockfd;
|
||||
struct sockaddr_in prose_ctrl_addr;
|
||||
struct sockaddr_in prose_pdcp_addr;
|
||||
struct sockaddr_in pdcp_sin;
|
||||
void pdcp_pc5_socket_init(void);
|
||||
|
||||
typedef struct {
|
||||
rb_id_t rb_id;
|
||||
sdu_size_t data_size;
|
||||
signed int inst;
|
||||
ip_traffic_type_t traffic_type;
|
||||
uint32_t sourceL2Id;
|
||||
uint32_t destinationL2Id;
|
||||
} __attribute__((__packed__)) pc5s_header_t;
|
||||
|
||||
//new PC5S-message
|
||||
typedef struct {
|
||||
unsigned char bytes[PC5_SIGNALLING_PAYLOAD_SIZE];
|
||||
} __attribute__((__packed__)) PC5SignallingMessage ;
|
||||
|
||||
//example of PC5-S messages
|
||||
typedef struct {
|
||||
pc5s_header_t pc5s_header;
|
||||
union {
|
||||
uint8_t status;
|
||||
PC5SignallingMessage pc5_signalling_message;
|
||||
} pc5sPrimitive;
|
||||
} __attribute__((__packed__)) sidelink_pc5s_element;
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
/*
|
||||
@@ -481,31 +487,31 @@ typedef struct pdcp_missing_pdu_info_t {
|
||||
#define PDCP_SN_12BIT 12
|
||||
|
||||
|
||||
protected_pdcp(signed int pdcp_2_nas_irq;)
|
||||
public_pdcp(pdcp_stats_t UE_pdcp_stats[MAX_MOBILES_PER_ENB];)
|
||||
public_pdcp(pdcp_stats_t eNB_pdcp_stats[NUMBER_OF_eNB_MAX];)
|
||||
//protected_pdcp(pdcp_t pdcp_array_srb_ue[MAX_MOBILES_PER_ENB][2];)
|
||||
//protected_pdcp(pdcp_t pdcp_array_drb_ue[MAX_MOBILES_PER_ENB][maxDRB];)
|
||||
//public_pdcp(pdcp_t pdcp_array_srb_eNB[NUMBER_OF_eNB_MAX][MAX_MOBILES_PER_ENB][2];)
|
||||
//protected_pdcp(pdcp_t pdcp_array_drb_eNB[NUMBER_OF_eNB_MAX][MAX_MOBILES_PER_ENB][maxDRB];)
|
||||
signed int pdcp_2_nas_irq;
|
||||
pdcp_stats_t UE_pdcp_stats[MAX_MOBILES_PER_ENB];
|
||||
pdcp_stats_t eNB_pdcp_stats[NUMBER_OF_eNB_MAX];
|
||||
//pdcp_t pdcp_array_srb_ue[MAX_MOBILES_PER_ENB][2];
|
||||
//pdcp_t pdcp_array_drb_ue[MAX_MOBILES_PER_ENB][maxDRB];
|
||||
//pdcp_t pdcp_array_srb_eNB[NUMBER_OF_eNB_MAX][MAX_MOBILES_PER_ENB][2];
|
||||
//pdcp_t pdcp_array_drb_eNB[NUMBER_OF_eNB_MAX][MAX_MOBILES_PER_ENB][maxDRB];
|
||||
|
||||
// for UE code conly
|
||||
protected_pdcp(rnti_t pdcp_UE_UE_module_id_to_rnti[MAX_MOBILES_PER_ENB];)
|
||||
protected_pdcp(rnti_t pdcp_eNB_UE_instance_to_rnti[MAX_MOBILES_PER_ENB];) // for noS1 mode
|
||||
protected_pdcp(unsigned int pdcp_eNB_UE_instance_to_rnti_index;)
|
||||
#if defined(Rel10) || defined(Rel14)
|
||||
public_pdcp(pdcp_mbms_t pdcp_mbms_array_ue[MAX_MOBILES_PER_ENB][maxServiceCount][maxSessionPerPMCH];) // some constants from openair2/RRC/LITE/MESSAGES/asn1_constants.h
|
||||
public_pdcp(pdcp_mbms_t pdcp_mbms_array_eNB[NUMBER_OF_eNB_MAX][maxServiceCount][maxSessionPerPMCH];) // some constants from openair2/RRC/LITE/MESSAGES/asn1_constants.h
|
||||
rnti_t pdcp_UE_UE_module_id_to_rnti[MAX_MOBILES_PER_ENB];
|
||||
rnti_t pdcp_eNB_UE_instance_to_rnti[MAX_MOBILES_PER_ENB]; // for noS1 mode
|
||||
unsigned int pdcp_eNB_UE_instance_to_rnti_index;
|
||||
#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
pdcp_mbms_t pdcp_mbms_array_ue[MAX_MOBILES_PER_ENB][maxServiceCount][maxSessionPerPMCH]; // some constants from openair2/RRC/LTE/MESSAGES/asn1_constants.h
|
||||
pdcp_mbms_t pdcp_mbms_array_eNB[NUMBER_OF_eNB_MAX][maxServiceCount][maxSessionPerPMCH]; // some constants from openair2/RRC/LTE/MESSAGES/asn1_constants.h
|
||||
#endif
|
||||
protected_pdcp(sdu_size_t pdcp_output_sdu_bytes_to_write;)
|
||||
protected_pdcp(sdu_size_t pdcp_output_header_bytes_to_write;)
|
||||
protected_pdcp(list_t pdcp_sdu_list;)
|
||||
protected_pdcp(int pdcp_sent_a_sdu;)
|
||||
protected_pdcp(pdcp_data_req_header_t pdcp_input_header;)
|
||||
protected_pdcp(unsigned char pdcp_input_sdu_buffer[MAX_IP_PACKET_SIZE];)
|
||||
protected_pdcp(sdu_size_t pdcp_input_index_header;)
|
||||
protected_pdcp(sdu_size_t pdcp_input_sdu_size_read;)
|
||||
protected_pdcp(sdu_size_t pdcp_input_sdu_remaining_size_to_read;)
|
||||
sdu_size_t pdcp_output_sdu_bytes_to_write;
|
||||
sdu_size_t pdcp_output_header_bytes_to_write;
|
||||
list_t pdcp_sdu_list;
|
||||
int pdcp_sent_a_sdu;
|
||||
pdcp_data_req_header_t pdcp_input_header;
|
||||
unsigned char pdcp_input_sdu_buffer[MAX_IP_PACKET_SIZE];
|
||||
sdu_size_t pdcp_input_index_header;
|
||||
sdu_size_t pdcp_input_sdu_size_read;
|
||||
sdu_size_t pdcp_input_sdu_remaining_size_to_read;
|
||||
|
||||
#define PDCP_COLL_KEY_VALUE(mODULE_iD, rNTI, iS_eNB, rB_iD, iS_sRB) \
|
||||
((hash_key_t)mODULE_iD | \
|
||||
@@ -536,7 +542,7 @@ protected_pdcp(sdu_size_t pdcp_input_sdu_remaining_size_to_read;)
|
||||
(((hash_key_t)(sESSION_ID)) << 37) | \
|
||||
(((hash_key_t)(0x0000000000000001)) << 63))
|
||||
|
||||
public_pdcp(hash_table_t *pdcp_coll_p;)
|
||||
hash_table_t *pdcp_coll_p;
|
||||
|
||||
#endif
|
||||
/*@}*/
|
||||
|
||||
@@ -45,6 +45,7 @@ configure_pdcp_req (struct pdcp_entity *pdcpP, void *rlcP, uint8_t rlc_sap_typeP
|
||||
mem_block *mb;
|
||||
|
||||
mb = get_free_mem_block (sizeof (struct cpdcp_primitive), __func__);
|
||||
if(mb==NULL) return;
|
||||
((struct cpdcp_primitive *) mb->data)->type = CPDCP_CONFIG_REQ;
|
||||
((struct cpdcp_primitive *) mb->data)->primitive.config_req.rlc_sap = rlcP;
|
||||
((struct cpdcp_primitive *) mb->data)->primitive.config_req.rlc_type_sap = rlc_sap_typeP;
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -52,7 +52,7 @@
|
||||
#include "queue.h"
|
||||
#include "liblfds611.h"
|
||||
|
||||
#include "UTIL/LOG/log.h"
|
||||
#include "common/utils/LOG/log.h"
|
||||
#include "UTIL/OCG/OCG.h"
|
||||
#include "UTIL/OCG/OCG_extern.h"
|
||||
#include "LAYER2/MAC/mac_extern.h"
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
* \version 0.1
|
||||
*/
|
||||
|
||||
#include "UTIL/LOG/log.h"
|
||||
#include "common/utils/LOG/log.h"
|
||||
#include "platform_types.h"
|
||||
#include "platform_constants.h"
|
||||
#include "pdcp.h"
|
||||
|
||||
@@ -52,7 +52,12 @@ extern int reception_from_rohc_bs(void);
|
||||
#else
|
||||
extern BOOL pdcp_data_ind (module_id_t module_idP, rb_id_t rab_idP, sdu_size_t data_sizeP, mem_block_t * sduP, uint8_t is_data_plane);
|
||||
extern BOOL pdcp_data_req (module_id_t module_id, uint32_t frame, uint8_t eNB_flag, rb_id_t rab_id, uint32_t muiP, uint32_t confirmP, sdu_size_t sdu_buffer_size, unsigned char* sdu_buffer,
|
||||
uint8_t is_data_pdu);
|
||||
uint8_t is_data_pdu
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
,const uint32_t * const sourceL2Id
|
||||
,const uint32_t * const destinationL2Id
|
||||
#endif
|
||||
);
|
||||
//extern BOOL pdcp_data_req (struct pdcp_entity *pdcpP, mem_block * sduP);
|
||||
extern void send_pdcp_control_primitive (struct pdcp_entity *pdcpP, mem_block * cprimitiveP);
|
||||
extern void control_pdcp (struct pdcp_entity *pdcpP);
|
||||
@@ -63,4 +68,7 @@ extern void pdcp_process_input_sdus_tr (struct pdcp_entity *pdcpP);
|
||||
extern void init_pdcp (struct pdcp_entity *pdcpP, struct rb_dispatcher *rbP, uint8_t rb_idP);
|
||||
extern void *pdcp_tx (void *argP);
|
||||
#endif
|
||||
|
||||
extern void pdcp_pc5_socket_init(void);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -29,10 +29,10 @@
|
||||
|
||||
#include "assertions.h"
|
||||
|
||||
#include "UTIL/LOG/log.h"
|
||||
#include "common/utils/LOG/log.h"
|
||||
#include "UTIL/OSA/osa_defs.h"
|
||||
|
||||
#include "UTIL/LOG/vcd_signal_dumper.h"
|
||||
#include "common/utils/LOG/vcd_signal_dumper.h"
|
||||
|
||||
#include "LAYER2/MAC/mac_extern.h"
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
*/
|
||||
|
||||
#include "pdcp_sequence_manager.h"
|
||||
#include "UTIL/LOG/log_if.h"
|
||||
#include "common/utils//LOG/log_if.h"
|
||||
#include "pdcp_util.h"
|
||||
|
||||
/*
|
||||
@@ -128,9 +128,7 @@ boolean_t pdcp_advance_rx_window(pdcp_t* pdcp_entity)
|
||||
* Update sequence numbering state and Hyper Frame Number if SN has already reached
|
||||
* its max value (see 5.1 PDCP Data Transfer Procedures)
|
||||
*/
|
||||
#if 0
|
||||
LOG_D(PDCP, "Advancing RX window...\n");
|
||||
#endif
|
||||
|
||||
if (pdcp_entity->next_pdcp_rx_sn == pdcp_calculate_max_seq_num_for_given_size(pdcp_entity->seq_num_size)) {
|
||||
pdcp_entity->next_pdcp_rx_sn = 0;
|
||||
@@ -152,9 +150,7 @@ boolean_t pdcp_is_rx_seq_number_valid(uint16_t seq_num, pdcp_t* pdcp_entity,srb_
|
||||
|
||||
uint16_t reordering_window = 0;
|
||||
|
||||
#if 0
|
||||
LOG_D(PDCP, "Incoming RX Sequence number is %04d\n", seq_num);
|
||||
#endif
|
||||
|
||||
if (pdcp_is_seq_num_size_valid(pdcp_entity) == FALSE || pdcp_is_seq_num_valid(seq_num, pdcp_entity->seq_num_size) == FALSE) {
|
||||
return FALSE;
|
||||
@@ -165,9 +161,7 @@ boolean_t pdcp_is_rx_seq_number_valid(uint16_t seq_num, pdcp_t* pdcp_entity,srb_
|
||||
* (and to build PDCP Control PDU for PDCP status report)
|
||||
*/
|
||||
if (pdcp_mark_current_pdu_as_received(seq_num, pdcp_entity) == TRUE) {
|
||||
#if 0
|
||||
LOG_I(PDCP, "Received sequence number successfuly marked\n");
|
||||
#endif
|
||||
LOG_D(PDCP, "Received sequence number successfuly marked\n");
|
||||
} else {
|
||||
LOG_W(PDCP, "Cannot mark received sequence number on the bitmap!\n");
|
||||
}
|
||||
@@ -192,13 +186,11 @@ boolean_t pdcp_is_rx_seq_number_valid(uint16_t seq_num, pdcp_t* pdcp_entity,srb_
|
||||
|
||||
// same the old next_pdcp_rx_sn to revert otherwise
|
||||
pdcp_entity->next_pdcp_rx_sn_before_integrity = pdcp_entity->next_pdcp_rx_sn;
|
||||
#if 0
|
||||
|
||||
if (seq_num != pdcp_entity->next_pdcp_rx_sn) {
|
||||
LOG_D(PDCP,"Re-adjusting the sequence number to %d\n", seq_num);
|
||||
}
|
||||
|
||||
#endif
|
||||
//set Next_PDCP_RX_SN to the received PDCP SN +1 ;
|
||||
pdcp_entity->next_pdcp_rx_sn = seq_num;
|
||||
pdcp_advance_rx_window(pdcp_entity); // + 1, and check if it is larger than Maximum_PDCP_SN:
|
||||
@@ -247,9 +239,7 @@ boolean_t pdcp_is_rx_seq_number_valid(uint16_t seq_num, pdcp_t* pdcp_entity,srb_
|
||||
//set Next_PDCP_RX_SN to the received PDCP SN +1 ;
|
||||
pdcp_entity->next_pdcp_rx_sn = seq_num;
|
||||
pdcp_advance_rx_window(pdcp_entity); // + 1, anc check if it is larger than Maximum_PDCP_SN:
|
||||
#if 0
|
||||
LOG_D(PDCP,"Re-adjusting the sequence number to %d\n", seq_num);
|
||||
#endif
|
||||
} else if (seq_num < pdcp_entity->next_pdcp_rx_sn) {
|
||||
// use COUNT based on RX_HFN and the received PDCP SN for deciphering the PDCP PDU;
|
||||
pdcp_entity->rx_hfn_offset = 0;
|
||||
@@ -311,12 +301,8 @@ boolean_t pdcp_mark_current_pdu_as_received(uint16_t seq_num, pdcp_t* pdcp_entit
|
||||
/*
|
||||
* Set relevant bit
|
||||
*/
|
||||
#if 0
|
||||
LOG_D(PDCP, "Marking %d. bit of %d. octet of status bitmap\n", (seq_num % 8) + 1, octet_index);
|
||||
#endif
|
||||
util_mark_nth_bit_of_octet(&pdcp_entity->missing_pdu_bitmap[octet_index], seq_num % 8);
|
||||
#if 0
|
||||
util_print_binary_representation((uint8_t*)"Current state of relevant octet: ", pdcp_entity->missing_pdu_bitmap[octet_index]);
|
||||
#endif
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
|
||||
#include <assert.h>
|
||||
|
||||
#include "UTIL/LOG/log.h"
|
||||
#include "common/utils/LOG/log.h"
|
||||
#include "pdcp_util.h"
|
||||
|
||||
/*
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
#ifndef PDCP_UTIL_H
|
||||
#define PDCP_UTIL_H
|
||||
|
||||
#include "UTIL/LOG/log.h"
|
||||
#include "common/utils/LOG/log.h"
|
||||
#include "../../COMMON/platform_types.h"
|
||||
#include "pdcp.h"
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
#include "rlc_primitives.h"
|
||||
#include "list.h"
|
||||
#include "LAYER2/MAC/mac_extern.h"
|
||||
#include "UTIL/LOG/log.h"
|
||||
#include "common/utils/LOG/log.h"
|
||||
#include "UL-AM-RLC.h"
|
||||
#include "DL-AM-RLC.h"
|
||||
|
||||
@@ -200,7 +200,7 @@ void
|
||||
config_req_rlc_am (
|
||||
const protocol_ctxt_t* const ctxt_pP,
|
||||
const srb_flag_t srb_flagP,
|
||||
rlc_am_info_t * const config_am_pP,
|
||||
const rlc_am_info_t * config_am_pP,
|
||||
const rb_id_t rb_idP,
|
||||
const logical_chan_id_t chan_idP
|
||||
)
|
||||
@@ -240,7 +240,7 @@ config_req_rlc_am (
|
||||
uint16_t pollPDU_tab[PollPDU_pInfinity+1]= {4,8,16,32,64,128,256,RLC_AM_POLL_PDU_INFINITE}; //PollPDU_pInfinity is chosen to 0xFFFF for now
|
||||
uint32_t maxRetxThreshold_tab[UL_AM_RLC__maxRetxThreshold_t32+1]= {1,2,3,4,6,8,16,32};
|
||||
uint32_t pollByte_tab[PollByte_spare1]= {25000,50000,75000,100000,125000,250000,375000,500000,750000,1000000,1250000,1500000,2000000,3000000,RLC_AM_POLL_BYTE_INFINITE}; // PollByte_kBinfinity is chosen to 0xFFFFFFFF for now
|
||||
#if defined(Rel14)
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
uint32_t PollRetransmit_tab[T_PollRetransmit_spare5]= {5,10,15,20,25,30,35,40,45,50,55,60,65,70,75,80,85,90,95,100,105,110,115,120,125,130,135,140,145,150,155,160,165,170,175,180,185,190,195,200,205,210,215,220,225,230,235,240,245,250,300,350,400,450,500,800,1000,2000,4000};
|
||||
uint32_t am_t_Reordering_tab[32]= {0,5,10,15,20,25,30,35,40,45,50,55,60,65,70,75,80,85,90,95,100,110,120,130,140,150,160,170,180,190,200,1600};
|
||||
uint32_t t_StatusProhibit_tab[T_StatusProhibit_spare2]= {0,5,10,15,20,25,30,35,40,45,50,55,60,65,70,75,80,85,90,95,100,105,110,115,120,125,130,135,140,145,150,155,160,165,170,175,180,185,190,195,200,205,210,215,220,225,230,235,240,245,250,300,350,400,450,500,800,1000,1200,1600,2000,2400};
|
||||
@@ -271,7 +271,7 @@ void config_req_rlc_am_asn1 (
|
||||
if ((config_am_pP->ul_AM_RLC.maxRetxThreshold <= UL_AM_RLC__maxRetxThreshold_t32) &&
|
||||
(config_am_pP->ul_AM_RLC.pollPDU<=PollPDU_pInfinity) &&
|
||||
(config_am_pP->ul_AM_RLC.pollByte<PollByte_spare1) &&
|
||||
#if defined(Rel14)
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
(config_am_pP->ul_AM_RLC.t_PollRetransmit<T_PollRetransmit_spare5) &&
|
||||
(config_am_pP->dl_AM_RLC.t_Reordering<32) &&
|
||||
(config_am_pP->dl_AM_RLC.t_StatusProhibit<T_StatusProhibit_spare2) ) {
|
||||
@@ -499,7 +499,7 @@ rlc_am_rx (
|
||||
switch (rlc->protocol_state) {
|
||||
|
||||
case RLC_NULL_STATE:
|
||||
LOG_N(RLC, PROTOCOL_RLC_AM_CTXT_FMT" ERROR MAC_DATA_IND IN RLC_NULL_STATE\n", PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP, rlc));
|
||||
LOG_I(RLC, PROTOCOL_RLC_AM_CTXT_FMT" ERROR MAC_DATA_IND IN RLC_NULL_STATE\n", PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP, rlc));
|
||||
list_free (&data_indP.data);
|
||||
break;
|
||||
|
||||
@@ -509,6 +509,7 @@ rlc_am_rx (
|
||||
|
||||
default:
|
||||
LOG_E(RLC, PROTOCOL_RLC_AM_CTXT_FMT" TX UNKNOWN PROTOCOL STATE 0x%02X\n", PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP, rlc), rlc->protocol_state);
|
||||
list_free (&data_indP.data);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -551,7 +552,9 @@ rlc_am_mac_status_indication (
|
||||
|
||||
rlc->last_absolute_subframe_status_indication = PROTOCOL_CTXT_TIME_MILLI_SECONDS(ctxt_pP);
|
||||
|
||||
rlc->nb_bytes_requested_by_mac = tb_sizeP;
|
||||
if (tb_sizeP > 0) {
|
||||
rlc->nb_bytes_requested_by_mac = tb_sizeP;
|
||||
}
|
||||
|
||||
status_resp.buffer_occupancy_in_bytes = rlc_am_get_buffer_occupancy_in_bytes(ctxt_pP, rlc);
|
||||
|
||||
@@ -585,7 +588,6 @@ rlc_am_mac_status_indication (
|
||||
|
||||
sdu_size = ((rlc_am_tx_sdu_management_t *) (rlc->input_sdus[rlc->current_sdu_index].mem_block->data))->sdu_size;
|
||||
sdu_remaining_size = ((rlc_am_tx_sdu_management_t *) (rlc->input_sdus[rlc->current_sdu_index].mem_block->data))->sdu_remaining_size;
|
||||
|
||||
status_resp.head_sdu_remaining_size_to_send = sdu_remaining_size;
|
||||
|
||||
if (sdu_size == sdu_remaining_size) {
|
||||
@@ -1139,7 +1141,6 @@ rlc_am_data_req (
|
||||
uint32_t mui;
|
||||
uint16_t data_offset;
|
||||
uint16_t data_size;
|
||||
uint8_t conf;
|
||||
#if TRACE_RLC_AM_PDU
|
||||
char message_string[7000];
|
||||
size_t message_string_size = 0;
|
||||
@@ -1162,7 +1163,6 @@ rlc_am_data_req (
|
||||
mui = ((struct rlc_am_data_req *) (sdu_pP->data))->mui;
|
||||
data_offset = ((struct rlc_am_data_req *) (sdu_pP->data))->data_offset;
|
||||
data_size = ((struct rlc_am_data_req *) (sdu_pP->data))->data_size;
|
||||
conf = ((struct rlc_am_data_req *) (sdu_pP->data))->conf;
|
||||
|
||||
MSC_LOG_RX_MESSAGE(
|
||||
(ctxt_pP->enb_flag == ENB_FLAG_YES) ? MSC_RLC_ENB:MSC_RLC_UE,
|
||||
@@ -1180,7 +1180,7 @@ rlc_am_data_req (
|
||||
message_string_size += sprintf(&message_string[message_string_size], "Bearer : %u\n", l_rlc_p->rb_id);
|
||||
message_string_size += sprintf(&message_string[message_string_size], "SDU size : %u\n", data_size);
|
||||
message_string_size += sprintf(&message_string[message_string_size], "MUI : %u\n", mui);
|
||||
message_string_size += sprintf(&message_string[message_string_size], "CONF : %u\n", conf);
|
||||
message_string_size += sprintf(&message_string[message_string_size], "CONF : %u\n", ((struct rlc_am_data_req *) (sdu_pP->data))->conf);
|
||||
|
||||
message_string_size += sprintf(&message_string[message_string_size], "\nPayload : \n");
|
||||
message_string_size += sprintf(&message_string[message_string_size], "------+-------------------------------------------------|\n");
|
||||
@@ -1231,7 +1231,6 @@ rlc_am_data_req (
|
||||
|
||||
l_rlc_p->input_sdus[l_rlc_p->next_sdu_index].mui = mui;
|
||||
l_rlc_p->input_sdus[l_rlc_p->next_sdu_index].sdu_size = data_size;
|
||||
//l_rlc_p->input_sdus[l_rlc_p->next_sdu_index].confirm = conf;
|
||||
|
||||
l_rlc_p->sdu_buffer_occupancy += data_size;
|
||||
l_rlc_p->nb_sdu += 1;
|
||||
@@ -1259,7 +1258,7 @@ rlc_am_data_req (
|
||||
l_rlc_p->nb_sdu,
|
||||
l_rlc_p->current_sdu_index,
|
||||
l_rlc_p->next_sdu_index,
|
||||
conf,
|
||||
((struct rlc_am_data_req *) (sdu_pP->data))->conf,
|
||||
mui,
|
||||
l_rlc_p->vt_a,
|
||||
l_rlc_p->vt_s);
|
||||
|
||||
@@ -35,21 +35,6 @@
|
||||
|
||||
# ifndef __RLC_AM_H__
|
||||
# define __RLC_AM_H__
|
||||
# ifdef RLC_AM_C
|
||||
# define private_rlc_am(x)
|
||||
# define protected_rlc_am(x)
|
||||
# define public_rlc_am(x)
|
||||
# else
|
||||
# ifdef RLC_AM_MODULE
|
||||
# define private_rlc_am(x)
|
||||
# define protected_rlc_am(x) extern x
|
||||
# define public_rlc_am(x) extern x
|
||||
# else
|
||||
# define private_rlc_am(x)
|
||||
# define protected_rlc_am(x)
|
||||
# define public_rlc_am(x) extern x
|
||||
# endif
|
||||
# endif
|
||||
# include "platform_types.h"
|
||||
# include "rlc_def.h"
|
||||
# include "rlc_def_lte.h"
|
||||
@@ -117,9 +102,9 @@
|
||||
* \param[in] ctxt_pP Running context.
|
||||
* \param[in] rlc_pP RLC AM protocol instance pointer.
|
||||
*/
|
||||
public_rlc_am(void rlc_am_release (
|
||||
void rlc_am_release (
|
||||
const protocol_ctxt_t* const ctxtP,
|
||||
rlc_am_entity_t * const rlc_pP);)
|
||||
rlc_am_entity_t * const rlc_pP);
|
||||
|
||||
/** @addtogroup _rlc_am_init_impl_
|
||||
* @{
|
||||
@@ -133,12 +118,14 @@ public_rlc_am(void rlc_am_release (
|
||||
* \param[in] rb_idP Radio bearer identifier.
|
||||
* \param[in] chan_idP Transport channel identifier.
|
||||
*/
|
||||
public_rlc_am(void config_req_rlc_am (
|
||||
const protocol_ctxt_t* const ctxtP,
|
||||
const srb_flag_t srb_flagP,
|
||||
const rlc_am_info_t * const config_amP,
|
||||
const rb_id_t rb_idP,
|
||||
const logical_chan_id_t chan_idP);)
|
||||
void
|
||||
config_req_rlc_am (
|
||||
const protocol_ctxt_t* const ctxt_pP,
|
||||
const srb_flag_t srb_flagP,
|
||||
const rlc_am_info_t * config_am_pP,
|
||||
const rb_id_t rb_idP,
|
||||
const logical_chan_id_t chan_idP
|
||||
);
|
||||
|
||||
/*! \fn void config_req_rlc_am_asn1 (const protocol_ctxt_t* const ctxtP, const srb_flag_t srb_flagP, struct RLC_Config__am * config_amP, rb_id_t rb_idP, logical_chan_id_t chan_idP)
|
||||
* \brief Configure the UL and DL parameters of the RLC AM with the asn1c autogenerated pameters structs
|
||||
@@ -148,12 +135,12 @@ public_rlc_am(void config_req_rlc_am (
|
||||
* \param[in] rb_idP Radio bearer identifier.
|
||||
* \param[in] chan_idP Transport channel identifier.
|
||||
*/
|
||||
public_rlc_am(void config_req_rlc_am_asn1 (
|
||||
void config_req_rlc_am_asn1 (
|
||||
const protocol_ctxt_t* const ctxtP,
|
||||
const srb_flag_t srb_flagP,
|
||||
const struct RLC_Config__am * const config_amP,
|
||||
const rb_id_t rb_idP,
|
||||
const logical_chan_id_t chan_idP);)
|
||||
const logical_chan_id_t chan_idP);
|
||||
|
||||
/** @} */
|
||||
|
||||
@@ -218,7 +205,7 @@ public_rlc_am(void config_req_rlc_am_asn1 (
|
||||
* \param[out] stat_timer_poll_retransmit_timed_out Number of times the timer "poll_retransmit" has timed-out.
|
||||
* \param[out] stat_timer_status_prohibit_timed_out Number of times the timer "status_prohibit" has timed-out.
|
||||
*/
|
||||
public_rlc_am(void rlc_am_stat_req (
|
||||
void rlc_am_stat_req (
|
||||
const protocol_ctxt_t* const ctxtP,
|
||||
rlc_am_entity_t * const rlc_pP,
|
||||
unsigned int* stat_tx_pdcp_sdu,
|
||||
@@ -247,14 +234,18 @@ public_rlc_am(void rlc_am_stat_req (
|
||||
unsigned int* stat_rx_control_bytes,
|
||||
unsigned int* stat_timer_reordering_timed_out,
|
||||
unsigned int* stat_timer_poll_retransmit_timed_out,
|
||||
unsigned int* stat_timer_status_prohibit_timed_out);)
|
||||
unsigned int* stat_timer_status_prohibit_timed_out);
|
||||
|
||||
/*! \fn void rlc_am_get_pdus (const protocol_ctxt_t* const ctxtP, void * const rlc_pP)
|
||||
* \brief Request the segmentation of SDUs based on status previously sent by MAC.
|
||||
* \param[in] ctxt_pP Running context.
|
||||
* \param[in] rlc_pP RLC AM protocol instance pointer.
|
||||
*/
|
||||
private_rlc_am( void rlc_am_get_pdus (const protocol_ctxt_t* const ctxtP,void * const rlc_pP);)
|
||||
void
|
||||
rlc_am_get_pdus (
|
||||
const protocol_ctxt_t* const ctxt_pP,
|
||||
rlc_am_entity_t * const rlc_pP
|
||||
);
|
||||
|
||||
/*! \fn void rlc_am_rx (const protocol_ctxt_t* const ctxtP,void * const rlc_pP, struct mac_data_ind data_indication)
|
||||
* \brief Process the received PDUs from lower layer.
|
||||
@@ -262,7 +253,7 @@ private_rlc_am( void rlc_am_get_pdus (const protocol_ctxt_t* const ctxtP,v
|
||||
* \param[in] rlc_pP RLC AM protocol instance pointer.
|
||||
* \param[in] data_indication PDUs from MAC.
|
||||
*/
|
||||
protected_rlc_am( void rlc_am_rx (const protocol_ctxt_t* const ctxtP,void * const rlc_pP, struct mac_data_ind);)
|
||||
void rlc_am_rx (const protocol_ctxt_t* const ctxtP,void * const rlc_pP, struct mac_data_ind);
|
||||
|
||||
/*! \fn struct mac_status_resp rlc_am_mac_status_indication (const protocol_ctxt_t* const ctxtP,void * const rlc_pP, uint16_t tbs_sizeP, struct mac_status_ind tx_statusP,const eNB_flag_t enb_flagP)
|
||||
* \brief Request the maximum number of bytes that can be served by RLC instance to MAC and fix the amount of bytes requested by MAC for next RLC transmission.
|
||||
@@ -273,14 +264,14 @@ protected_rlc_am( void rlc_am_rx (const protocol_ctxt_t* const ctxtP,void *
|
||||
* \param[in] enb_flagP eNB or UE flag indication.
|
||||
* \return The maximum number of bytes that can be served by RLC instance to MAC.
|
||||
*/
|
||||
public_rlc_am( struct mac_status_resp rlc_am_mac_status_indication (const protocol_ctxt_t* const ctxtP, void * const rlc_pP, uint16_t tbs_sizeP, struct mac_status_ind tx_statusP,const eNB_flag_t enb_flagP);)
|
||||
struct mac_status_resp rlc_am_mac_status_indication (const protocol_ctxt_t* const ctxtP, void * const rlc_pP, uint16_t tbs_sizeP, struct mac_status_ind tx_statusP,const eNB_flag_t enb_flagP);
|
||||
|
||||
/*! \fn void rlc_am_set_nb_bytes_requested_by_mac (void * const rlc_pP,const tb_size_t tb_sizeP)
|
||||
* \brief Set available TBS for RLC Tx just before am_mac_data_request. Used for UE only.
|
||||
* \param[in] rlc_pP RLC AM protocol instance pointer.
|
||||
* \param[in] tb_sizeP Available Tx Transport Block size in bytes.
|
||||
*/
|
||||
public_rlc_am( void rlc_am_set_nb_bytes_requested_by_mac (void * const rlc_pP,const tb_size_t tb_sizeP);)
|
||||
void rlc_am_set_nb_bytes_requested_by_mac (void * const rlc_pP,const tb_size_t tb_sizeP);
|
||||
|
||||
/*! \fn struct mac_data_req rlc_am_mac_data_request (const protocol_ctxt_t* const ctxtP,void * const rlc_pP,const eNB_flag_t enb_flagP)
|
||||
* \brief Gives PDUs to lower layer MAC.
|
||||
@@ -289,7 +280,7 @@ public_rlc_am( void rlc_am_set_nb_bytes_requested_by_mac (void * const
|
||||
* \param[in] enb_flagP eNB or UE flag
|
||||
* \return A PDU of the previously requested number of bytes, and the updated maximum number of bytes that can be served by RLC instance to MAC for next RLC transmission.
|
||||
*/
|
||||
public_rlc_am( struct mac_data_req rlc_am_mac_data_request (const protocol_ctxt_t* const ctxtP,void * const rlc_pP,const eNB_flag_t enb_flagP);)
|
||||
struct mac_data_req rlc_am_mac_data_request (const protocol_ctxt_t* const ctxtP,void * const rlc_pP,const eNB_flag_t enb_flagP);
|
||||
|
||||
/*! \fn void rlc_am_mac_data_indication (const protocol_ctxt_t* const ctxtP,void * const rlc_pP, struct mac_data_ind data_indP)
|
||||
* \brief Receive PDUs from lower layer MAC.
|
||||
@@ -297,14 +288,14 @@ public_rlc_am( struct mac_data_req rlc_am_mac_data_request (const protocol_ct
|
||||
* \param[in] rlc_pP RLC AM protocol instance pointer.
|
||||
* \param[in] data_indP PDUs from MAC.
|
||||
*/
|
||||
public_rlc_am( void rlc_am_mac_data_indication (const protocol_ctxt_t* const ctxtP,void * const rlc_pP, struct mac_data_ind data_indP);)
|
||||
void rlc_am_mac_data_indication (const protocol_ctxt_t* const ctxtP,void * const rlc_pP, struct mac_data_ind data_indP);
|
||||
|
||||
/*! \fn uint32_t rlc_am_get_buffer_occupancy_in_bytes (const protocol_ctxt_t* const ctxt_pP, rlc_am_entity_t * const rlc_pP)
|
||||
* \brief Get Tx Buffer Occupancy.
|
||||
* \param[in] ctxt_pP Running context.
|
||||
* \param[in] rlc_pP RLC AM protocol instance pointer.
|
||||
*/
|
||||
public_rlc_am( uint32_t rlc_am_get_buffer_occupancy_in_bytes (const protocol_ctxt_t* const ctxt_pP, rlc_am_entity_t * const rlc_pP);)
|
||||
uint32_t rlc_am_get_buffer_occupancy_in_bytes (const protocol_ctxt_t* const ctxt_pP, rlc_am_entity_t * const rlc_pP);
|
||||
|
||||
/*! \fn void rlc_am_data_req (const protocol_ctxt_t* const ctxtP,void * const rlc_pP, mem_block_t *sduP)
|
||||
* \brief Interface with higher layers, buffer higher layer SDUS for transmission.
|
||||
@@ -312,6 +303,6 @@ public_rlc_am( uint32_t rlc_am_get_buffer_occupancy_in_bytes (const protocol_
|
||||
* \param[in] rlc_pP RLC AM protocol instance pointer.
|
||||
* \param[in] sduP SDU. (A struct rlc_am_data_req is mapped on sduP->data.)
|
||||
*/
|
||||
public_rlc_am( void rlc_am_data_req (const protocol_ctxt_t* const ctxtP,void * const rlc_pP, mem_block_t *sduP);)
|
||||
void rlc_am_data_req (const protocol_ctxt_t* const ctxtP,void * const rlc_pP, mem_block_t *sduP);
|
||||
/** @} */
|
||||
# endif
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
//-----------------------------------------------------------------------------
|
||||
#include "rlc_am.h"
|
||||
#include "LAYER2/MAC/mac_extern.h"
|
||||
#include "UTIL/LOG/log.h"
|
||||
#include "common/utils/LOG/log.h"
|
||||
|
||||
#define TRACE_RLC_AM_FREE_SDU 0
|
||||
//-----------------------------------------------------------------------------
|
||||
@@ -42,8 +42,17 @@ void rlc_am_free_in_sdu(
|
||||
{
|
||||
if (index_in_bufferP <= RLC_AM_SDU_CONTROL_BUFFER_SIZE) {
|
||||
/* BugFix: SDU shall have been already freed during initial PDU segmentation or concatenation !! */
|
||||
//Assertion(eNB)_PRAN_DesignDocument_annex No.761
|
||||
if(rlcP->input_sdus[index_in_bufferP].mem_block != NULL)
|
||||
{
|
||||
LOG_E(RLC, "RLC AM Tx SDU Conf: Data Part is not empty index=%d LcId=%d\n",
|
||||
index_in_bufferP,rlcP->channel_id);
|
||||
return;
|
||||
}
|
||||
/*
|
||||
AssertFatal(rlcP->input_sdus[index_in_bufferP].mem_block == NULL, "RLC AM Tx SDU Conf: Data Part is not empty index=%d LcId=%d\n",
|
||||
index_in_bufferP,rlcP->channel_id);
|
||||
*/
|
||||
/*
|
||||
if (rlcP->input_sdus[index_in_bufferP].mem_block != NULL) {
|
||||
free_mem_block(rlcP->input_sdus[index_in_bufferP].mem_block, __func__);
|
||||
@@ -121,8 +130,13 @@ rlc_am_pdu_sdu_data_cnf(
|
||||
|
||||
for (pdu_sdu_index = 0; pdu_sdu_index < rlc_pP->tx_data_pdu_buffer[snP % RLC_AM_WINDOW_SIZE].nb_sdus; pdu_sdu_index++) {
|
||||
sdu_index = rlc_pP->tx_data_pdu_buffer[snP % RLC_AM_WINDOW_SIZE].sdus_index[pdu_sdu_index];
|
||||
assert(sdu_index >= 0);
|
||||
assert(sdu_index < RLC_AM_SDU_CONTROL_BUFFER_SIZE);
|
||||
//assert(sdu_index >= 0);
|
||||
//assert(sdu_index < RLC_AM_SDU_CONTROL_BUFFER_SIZE);
|
||||
if(sdu_index < 0 || sdu_index >= RLC_AM_SDU_CONTROL_BUFFER_SIZE) {
|
||||
LOG_E(RLC, "sdu_index error. sdu_index %d, pdu_sdu_index %d\n", sdu_index, pdu_sdu_index);
|
||||
continue;
|
||||
}
|
||||
|
||||
rlc_pP->input_sdus[sdu_index].nb_pdus_ack += 1;
|
||||
|
||||
if ((rlc_pP->input_sdus[sdu_index].nb_pdus_ack == rlc_pP->input_sdus[sdu_index].nb_pdus) &&
|
||||
|
||||
@@ -34,22 +34,6 @@
|
||||
*/
|
||||
# ifndef __RLC_AM_IN_SDU_H__
|
||||
# define __RLC_AM_IN_SDU_H__
|
||||
//-----------------------------------------------------------------------------
|
||||
# ifdef RLC_AM_IN_SDU_C
|
||||
# define private_rlc_am_in_sdu(x) x
|
||||
# define protected_rlc_am_in_sdu(x) x
|
||||
# define public_rlc_am_in_sdu(x) x
|
||||
# else
|
||||
# ifdef RLC_AM_MODULE
|
||||
# define private_rlc_am_in_sdu(x)
|
||||
# define protected_rlc_am_in_sdu(x) extern x
|
||||
# define public_rlc_am_in_sdu(x) extern x
|
||||
# else
|
||||
# define private_rlc_am_in_sdu(x)
|
||||
# define protected_rlc_am_in_sdu(x)
|
||||
# define public_rlc_am_in_sdu(x) extern x
|
||||
# endif
|
||||
# endif
|
||||
/*! \fn void rlc_am_free_in_sdu (const protocol_ctxt_t* const ctxt_pP, rlc_am_entity_t *rlcP, unsigned int index_in_bufferP)
|
||||
* \brief Free a higher layer SDU stored in input_sdus[] buffer.
|
||||
* \param[in] ctxtP Running context.
|
||||
@@ -57,7 +41,7 @@
|
||||
* \param[in] index_in_bufferP Position index of the SDU.
|
||||
* \note Update also the RLC AM instance variables nb_sdu, current_sdu_index, nb_sdu_no_segmented.
|
||||
*/
|
||||
protected_rlc_am_in_sdu(void rlc_am_free_in_sdu (const protocol_ctxt_t* const ctxt_pP, rlc_am_entity_t *rlcP, unsigned int index_in_bufferP);)
|
||||
void rlc_am_free_in_sdu (const protocol_ctxt_t* const ctxt_pP, rlc_am_entity_t *rlcP, unsigned int index_in_bufferP);
|
||||
|
||||
|
||||
/*! \fn void rlc_am_free_in_sdu_data (const protocol_ctxt_t* const ctxt_pP, rlc_am_entity_t *rlcP, unsigned int index_in_bufferP)
|
||||
@@ -67,7 +51,7 @@ protected_rlc_am_in_sdu(void rlc_am_free_in_sdu (const protocol_ctxt_t* con
|
||||
* \param[in] index_in_bufferP Position index of the SDU.
|
||||
* \note This procedure is called when the SDU segmentation is done for this SDU. Update also the RLC AM instance variable nb_sdu_no_segmented.
|
||||
*/
|
||||
protected_rlc_am_in_sdu(void rlc_am_free_in_sdu_data (const protocol_ctxt_t* const ctxt_pP, rlc_am_entity_t *rlcP, unsigned int index_in_bufferP);)
|
||||
void rlc_am_free_in_sdu_data (const protocol_ctxt_t* const ctxt_pP, rlc_am_entity_t *rlcP, unsigned int index_in_bufferP);
|
||||
|
||||
|
||||
/*! \fn signed int rlc_am_in_sdu_is_empty(const protocol_ctxt_t* const ctxt_pP, rlc_am_entity_t *rlcP)
|
||||
@@ -76,7 +60,7 @@ protected_rlc_am_in_sdu(void rlc_am_free_in_sdu_data (const protocol_ctxt_t* con
|
||||
* \param[in] rlcP RLC AM protocol instance pointer.
|
||||
* \return 1 if the buffer is empty, else 0.
|
||||
*/
|
||||
protected_rlc_am_in_sdu(signed int rlc_am_in_sdu_is_empty(const protocol_ctxt_t* const ctxt_pP, rlc_am_entity_t *rlcP);)
|
||||
signed int rlc_am_in_sdu_is_empty(const protocol_ctxt_t* const ctxt_pP, rlc_am_entity_t *rlcP);
|
||||
|
||||
/*! \fn void rlc_am_pdu_sdu_data_cnf(const protocol_ctxt_t* const ctxt_pP,rlc_am_entity_t* const rlc_pP,const rlc_sn_t snP)
|
||||
* \brief Process SDU cnf of a ACKED PDU for all SDUs concatenated in this PDU.
|
||||
@@ -84,6 +68,6 @@ protected_rlc_am_in_sdu(signed int rlc_am_in_sdu_is_empty(const protocol_ctxt_t*
|
||||
* \param[in] rlcP RLC AM protocol instance pointer.
|
||||
* \param[in] snP Sequence number of the PDU.
|
||||
*/
|
||||
protected_rlc_am_in_sdu(void rlc_am_pdu_sdu_data_cnf(const protocol_ctxt_t* const ctxt_pP,rlc_am_entity_t* const rlc_pP,const rlc_sn_t snP);)
|
||||
void rlc_am_pdu_sdu_data_cnf(const protocol_ctxt_t* const ctxt_pP,rlc_am_entity_t* const rlc_pP,const rlc_sn_t snP);
|
||||
/** @} */
|
||||
# endif
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//-----------------------------------------------------------------------------
|
||||
#include "rlc_am.h"
|
||||
#include "LAYER2/MAC/mac_extern.h"
|
||||
#include "UTIL/LOG/log.h"
|
||||
#include "common/utils/LOG/log.h"
|
||||
//-----------------------------------------------------------------------------
|
||||
void
|
||||
rlc_am_init(
|
||||
|
||||
@@ -37,21 +37,6 @@
|
||||
|
||||
# include "UTIL/MEM/mem_block.h"
|
||||
//-----------------------------------------------------------------------------
|
||||
# ifdef RLC_AM_INIT_C
|
||||
# define private_rlc_am_init(x) x
|
||||
# define protected_rlc_am_init(x) x
|
||||
# define public_rlc_am_init(x) x
|
||||
# else
|
||||
# ifdef RLC_AM_MODULE
|
||||
# define private_rlc_am_init(x)
|
||||
# define protected_rlc_am_init(x) extern x
|
||||
# define public_rlc_am_init(x) extern x
|
||||
# else
|
||||
# define private_rlc_am_init(x)
|
||||
# define protected_rlc_am_init(x)
|
||||
# define public_rlc_am_init(x) extern x
|
||||
# endif
|
||||
# endif
|
||||
//-----------------------------------------------------------------------------
|
||||
#include "platform_types.h"
|
||||
#include "platform_constants.h"
|
||||
@@ -76,13 +61,13 @@ typedef volatile struct {
|
||||
* \param[in] ctxtP Running context.
|
||||
* \param[in] rlc_pP RLC AM protocol instance pointer.
|
||||
*/
|
||||
public_rlc_am_init( void rlc_am_init (const protocol_ctxt_t* const ctxtP, rlc_am_entity_t* rlc_pP);)
|
||||
void rlc_am_init (const protocol_ctxt_t* const ctxtP, rlc_am_entity_t* rlc_pP);
|
||||
|
||||
/*! \fn void rlc_am_cleanup(rlc_am_entity_t *const rlc_pP)
|
||||
* \brief Free all memory resources allocated and kept by this RLC AM instance.
|
||||
* \param[in] rlc_pP RLC AM protocol instance pointer.
|
||||
*/
|
||||
public_rlc_am_init( void rlc_am_cleanup(rlc_am_entity_t* rlc_pP);)
|
||||
void rlc_am_cleanup(rlc_am_entity_t* rlc_pP);
|
||||
|
||||
/*! \fn void rlc_am_configure(const protocol_ctxt_t* const ctxtP, rlc_am_entity_t * const rlc_pP, uint16_t max_retx_thresholdP, uint16_t poll_pduP, uint16_t poll_byteP, uint32_t t_poll_retransmitP, uint32_t t_reorderingP, uint32_t t_status_prohibitP)
|
||||
* \brief Set RLC AM protocol parameters.
|
||||
@@ -96,14 +81,14 @@ AMD PDU.
|
||||
* \param[in] t_reorderingP This timer is used by the receiving side of an AM RLC entity in order to detect loss of RLC PDUs at lower layer, value in frames.
|
||||
* \param[in] t_status_prohibitP This timer is used by the receiving side of an AM RLC entity in order to prohibit transmission of a STATUS PDU, value in frames.
|
||||
*/
|
||||
public_rlc_am_init( void rlc_am_configure(const protocol_ctxt_t* const ctxtP,
|
||||
void rlc_am_configure(const protocol_ctxt_t* const ctxtP,
|
||||
rlc_am_entity_t * const rlc_pP,
|
||||
const uint16_t max_retx_thresholdP,
|
||||
const uint16_t poll_pduP,
|
||||
const uint16_t poll_byteP,
|
||||
const uint32_t t_poll_retransmitP,
|
||||
const uint32_t t_reorderingP,
|
||||
const uint32_t t_status_prohibitP);)
|
||||
const uint32_t t_status_prohibitP);
|
||||
|
||||
|
||||
/*! \fn void rlc_am_set_debug_infos(const protocol_ctxt_t* const ctxtP, rlc_am_entity_t * const rlc_pP, const srb_flag_t srb_flagP, const rb_id_t rb_idP)
|
||||
@@ -114,6 +99,6 @@ public_rlc_am_init( void rlc_am_configure(const protocol_ctxt_t* const ctxtP,
|
||||
* \param[in] rb_idP Radio bearer identifier.
|
||||
* \param[in] chan_idP Transport channel identifier.
|
||||
*/
|
||||
public_rlc_am_init( void rlc_am_set_debug_infos(const protocol_ctxt_t* const ctxtP, rlc_am_entity_t * const rlc_pP, const srb_flag_t srb_flagP, const rb_id_t rb_idP, const logical_chan_id_t chan_idP);)
|
||||
void rlc_am_set_debug_infos(const protocol_ctxt_t* const ctxtP, rlc_am_entity_t * const rlc_pP, const srb_flag_t srb_flagP, const rb_id_t rb_idP, const logical_chan_id_t chan_idP);
|
||||
/** @} */
|
||||
#endif
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
#include "rlc_am.h"
|
||||
#include "list.h"
|
||||
//#include "LAYER2/MAC/extern.h"
|
||||
#include "UTIL/LOG/log.h"
|
||||
#include "common/utils/LOG/log.h"
|
||||
#include "msc.h"
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
@@ -57,7 +57,12 @@ rlc_am_reassembly (
|
||||
if (rlc_pP->output_sdu_in_construction == NULL) {
|
||||
rlc_pP->output_sdu_in_construction = get_free_mem_block (RLC_SDU_MAX_SIZE, __func__);
|
||||
rlc_pP->output_sdu_size_to_write = 0;
|
||||
assert(rlc_pP->output_sdu_in_construction != NULL);
|
||||
//assert(rlc_pP->output_sdu_in_construction != NULL);
|
||||
if(rlc_pP->output_sdu_in_construction == NULL) {
|
||||
LOG_E(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[REASSEMBLY PAYLOAD] output_sdu_in_construction is NULL\n",
|
||||
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP));
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (rlc_pP->output_sdu_in_construction != NULL) {
|
||||
@@ -198,10 +203,16 @@ rlc_am_send_sdu (
|
||||
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP));
|
||||
//msg("[RLC_AM][MOD %d] Freeing mem_block ...\n", rlc_pP->module_id);
|
||||
//free_mem_block (rlc_pP->output_sdu_in_construction, __func__);
|
||||
//Assertion(eNB)_PRAN_DesignDocument_annex No.764
|
||||
LOG_E(RLC, PROTOCOL_RLC_AM_CTXT_FMT" SEND SDU REQUESTED %d bytes\n",
|
||||
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
||||
rlc_pP->output_sdu_size_to_write);
|
||||
/*
|
||||
AssertFatal(3==4,
|
||||
PROTOCOL_RLC_AM_CTXT_FMT" SEND SDU REQUESTED %d bytes",
|
||||
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
||||
rlc_pP->output_sdu_size_to_write);
|
||||
*/
|
||||
}
|
||||
|
||||
rlc_pP->output_sdu_size_to_write = 0;
|
||||
@@ -270,7 +281,9 @@ rlc_am_reassemble_pdu(
|
||||
break;
|
||||
|
||||
default:
|
||||
assert(0 != 0);
|
||||
//Assertion(eNB)_PRAN_DesignDocument_annex No.1428
|
||||
LOG_E(RLC, "RLC_E_FIXED_PART_DATA_FIELD_FOLLOW error pdu_info->fi[%d]\n", pdu_info->fi);
|
||||
// assert(0 != 0);
|
||||
}
|
||||
} else {
|
||||
switch (pdu_info->fi) {
|
||||
@@ -386,7 +399,9 @@ rlc_am_reassemble_pdu(
|
||||
break;
|
||||
|
||||
default:
|
||||
assert(1 != 1);
|
||||
//Assertion(eNB)_PRAN_DesignDocument_annex No.1429
|
||||
LOG_E(RLC, "not RLC_E_FIXED_PART_DATA_FIELD_FOLLOW error pdu_info->fi[%d]\n", pdu_info->fi);
|
||||
// assert(1 != 1);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -34,27 +34,12 @@
|
||||
*/
|
||||
#ifndef __RLC_AM_REASSEMBLY_H__
|
||||
# define __RLC_AM_REASSEMBLY_H__
|
||||
# ifdef RLC_AM_REASSEMBLY_C
|
||||
# define private_rlc_am_reassembly(x) x
|
||||
# define protected_rlc_am_reassembly(x) x
|
||||
# define public_rlc_am_reassembly(x) x
|
||||
# else
|
||||
# ifdef RLC_AM_MODULE
|
||||
# define private_rlc_am_reassembly(x)
|
||||
# define protected_rlc_am_reassembly(x) extern x
|
||||
# define public_rlc_am_reassembly(x) extern x
|
||||
# else
|
||||
# define private_rlc_am_reassembly(x)
|
||||
# define protected_rlc_am_reassembly(x)
|
||||
# define public_rlc_am_reassembly(x) extern x
|
||||
# endif
|
||||
# endif
|
||||
/*! \fn void rlc_am_clear_rx_sdu (const protocol_ctxt_t* const ctxtP, rlc_am_entity_t * const rlc_pP)
|
||||
* \brief Reset the data cursor index in the output SDU buffer to zero.
|
||||
* \param[in] ctxtP Running context.
|
||||
* \param[in] rlc_pP RLC AM protocol instance pointer.
|
||||
*/
|
||||
private_rlc_am_reassembly( void rlc_am_clear_rx_sdu (const protocol_ctxt_t* const ctxtP, rlc_am_entity_t * const rlc_pP);)
|
||||
void rlc_am_clear_rx_sdu (const protocol_ctxt_t* const ctxtP, rlc_am_entity_t * const rlc_pP);
|
||||
|
||||
/*! \fn void rlc_am_reassembly (const protocol_ctxt_t* const ctxtP, rlc_am_entity_t * const rlc_pPuint8_t * srcP, int32_t lengthP)
|
||||
* \brief Concatenate datas at the tail of the output SDU in construction. This SDU in construction will be sent to higher layer.
|
||||
@@ -63,14 +48,14 @@ private_rlc_am_reassembly( void rlc_am_clear_rx_sdu (const protocol_ctxt_t* co
|
||||
* \param[in] srcP Pointer on data to be reassemblied.
|
||||
* \param[in] lengthP Length of data to be reassemblied.
|
||||
*/
|
||||
private_rlc_am_reassembly( void rlc_am_reassembly (const protocol_ctxt_t* const ctxtP, rlc_am_entity_t * const rlc_pP, uint8_t * srcP, int32_t lengthP);)
|
||||
void rlc_am_reassembly (const protocol_ctxt_t* const ctxtP, rlc_am_entity_t * const rlc_pP, uint8_t * srcP, int32_t lengthP);
|
||||
|
||||
/*! \fn void rlc_am_send_sdu (rlc_am_entity_t *rlc_pP,frame_t frameP)
|
||||
* \brief Send the output SDU in construction to higher layer.
|
||||
* \param[in] ctxtP Running context.
|
||||
* \param[in] rlc_pP RLC AM protocol instance pointer.
|
||||
*/
|
||||
private_rlc_am_reassembly( 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)
|
||||
* \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.
|
||||
@@ -79,7 +64,7 @@ private_rlc_am_reassembly( void rlc_am_send_sdu (const protocol_ctxt_t* co
|
||||
* \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.
|
||||
*/
|
||||
protected_rlc_am_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,boolean_t free_rlc_pdu);
|
||||
/** @} */
|
||||
#endif
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
#include "rlc_am.h"
|
||||
#include "list.h"
|
||||
#include "LAYER2/MAC/mac_extern.h"
|
||||
#include "UTIL/LOG/log.h"
|
||||
#include "common/utils/LOG/log.h"
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
@@ -47,9 +47,15 @@ rlc_am_get_data_pdu_infos(
|
||||
pdu_info_pP->d_c = header_pP->b1 >> 7;
|
||||
pdu_info_pP->num_li = 0;
|
||||
|
||||
|
||||
//Assertion(eNB)_PRAN_DesignDocument_annex No.766
|
||||
if(pdu_info_pP->d_c == 0)
|
||||
{
|
||||
LOG_E(RLC, "RLC AM Rx PDU Data D/C Header Error LcId=%d\n", rlc_pP->channel_id);
|
||||
return -2;
|
||||
}
|
||||
/*
|
||||
AssertFatal (pdu_info_pP->d_c != 0, "RLC AM Rx PDU Data D/C Header Error LcId=%d\n", rlc_pP->channel_id);
|
||||
|
||||
*/
|
||||
pdu_info_pP->rf = (header_pP->b1 >> 6) & 0x01;
|
||||
pdu_info_pP->p = (header_pP->b1 >> 5) & 0x01;
|
||||
pdu_info_pP->fi = (header_pP->b1 >> 3) & 0x03;
|
||||
@@ -264,9 +270,17 @@ rlc_am_receive_routing (
|
||||
rlc_pP->stat_rx_control_pdu += 1;
|
||||
rlc_am_receive_process_control_pdu (ctxt_pP, rlc_pP, tb_p, &first_byte_p, &tb_size_in_bytes);
|
||||
// Test if remaining bytes not processed (up to know, highest probability is bug in MAC)
|
||||
//Assertion(eNB)_PRAN_DesignDocument_annex No.767
|
||||
if(tb_size_in_bytes != 0)
|
||||
{
|
||||
LOG_E(RLC, "Remaining %d bytes following a control PDU\n",
|
||||
tb_size_in_bytes);
|
||||
}
|
||||
/*
|
||||
AssertFatal( tb_size_in_bytes == 0,
|
||||
"Remaining %d bytes following a control PDU",
|
||||
tb_size_in_bytes);
|
||||
*/
|
||||
}
|
||||
|
||||
LOG_D(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[RX ROUTING] VR(R)=%03d VR(MR)=%03d\n",
|
||||
@@ -396,14 +410,20 @@ rlc_am_receive_process_data_pdu (
|
||||
}
|
||||
|
||||
if (pdu_info_p->sn == rlc_pP->vr_r) {
|
||||
mem_block_t* cursor_p = rlc_pP->receiver_buffer.head;
|
||||
rlc_am_rx_pdu_management_t * pdu_cursor_mgnt_p = (rlc_am_rx_pdu_management_t *) (cursor_p->data);
|
||||
if( (((rlc_am_rx_pdu_management_t*)(tb_pP->data))->all_segments_received) == (pdu_cursor_mgnt_p->all_segments_received)){
|
||||
if (((rlc_am_rx_pdu_management_t*)(tb_pP->data))->all_segments_received) {
|
||||
rlc_am_rx_update_vr_r(ctxt_pP, rlc_pP, tb_pP);
|
||||
rlc_pP->vr_mr = (rlc_pP->vr_r + RLC_AM_WINDOW_SIZE) & RLC_AM_SN_MASK;
|
||||
}
|
||||
|
||||
reassemble = rlc_am_rx_check_vr_reassemble(ctxt_pP, rlc_pP);
|
||||
//TODO : optimization : check whether a reassembly is needed by looking at LI, FI, SO, etc...
|
||||
|
||||
}else{
|
||||
LOG_E(RLC, "BAD all_segments_received!!! discard buffer!!!\n");
|
||||
/* Discard received block if out of window, duplicate or header error */
|
||||
free_mem_block (tb_pP, __func__);
|
||||
}
|
||||
}
|
||||
|
||||
//FNA: fix check VrX out of receiving window
|
||||
|
||||
@@ -34,21 +34,6 @@
|
||||
*/
|
||||
# ifndef __RLC_AM_RECEIVER_H__
|
||||
# define __RLC_AM_RECEIVER_H__
|
||||
# ifdef RLC_AM_RECEIVER_C
|
||||
# define private_rlc_am_receiver(x) x
|
||||
# define protected_rlc_am_receiver(x) x
|
||||
# define public_rlc_am_receiver(x) x
|
||||
# else
|
||||
# ifdef RLC_AM_MODULE
|
||||
# define private_rlc_am_receiver(x)
|
||||
# define protected_rlc_am_receiver(x) extern x
|
||||
# define public_rlc_am_receiver(x) extern x
|
||||
# else
|
||||
# define private_rlc_am_receiver(x)
|
||||
# define protected_rlc_am_receiver(x)
|
||||
# define public_rlc_am_receiver(x) extern x
|
||||
# endif
|
||||
# endif
|
||||
/*! \fn signed int rlc_am_get_data_pdu_infos( const protocol_ctxt_t* const ctxt_pP, const rlc_am_entity_t * const rlc_pP,rlc_am_pdu_sn_10_t* headerP, int16_t sizeP, rlc_am_pdu_info_t* pdu_infoP)
|
||||
* \brief Extract PDU informations (header fields, data size, etc) from the serialized PDU.
|
||||
* \param[in] ctxt_pP Running context.
|
||||
@@ -58,12 +43,12 @@
|
||||
* \param[in] pdu_infoP Structure containing extracted informations from PDU.
|
||||
* \return 0 if no error was encountered during the parsing of the PDU, else -1;
|
||||
*/
|
||||
protected_rlc_am_receiver( signed int rlc_am_get_data_pdu_infos(
|
||||
signed int rlc_am_get_data_pdu_infos(
|
||||
const protocol_ctxt_t* const ctxt_pP,
|
||||
const rlc_am_entity_t * const rlc_pP,
|
||||
rlc_am_pdu_sn_10_t* headerP,
|
||||
int16_t sizeP,
|
||||
rlc_am_pdu_info_t* pdu_infoP));
|
||||
rlc_am_pdu_info_t* pdu_infoP);
|
||||
|
||||
/*! \fn void rlc_am_display_data_pdu_infos(const protocol_ctxt_t* const ctxt_pP, rlc_am_entity_t * const rlc_pP, rlc_am_pdu_info_t* pdu_infoP)
|
||||
* \brief Display RLC AM PDU informations.
|
||||
@@ -71,7 +56,7 @@ protected_rlc_am_receiver( signed int rlc_am_get_data_pdu_infos(
|
||||
* \param[in] rlc_pP RLC AM protocol instance pointer.
|
||||
* \param[in] pdu_infoP Structure containing extracted informations of a PDU.
|
||||
*/
|
||||
protected_rlc_am_receiver( void rlc_am_display_data_pdu_infos(const protocol_ctxt_t* const ctxt_pP,rlc_am_entity_t * const rlc_pP, rlc_am_pdu_info_t* pdu_infoP);)
|
||||
void rlc_am_display_data_pdu_infos(const protocol_ctxt_t* const ctxt_pP,rlc_am_entity_t * const rlc_pP, rlc_am_pdu_info_t* pdu_infoP);
|
||||
|
||||
/*! \fn void rlc_am_rx_update_vr_ms(const protocol_ctxt_t* const ctxt_pP,rlc_am_entity_t * const rlc_pP,mem_block_t* tb_pP)
|
||||
* \brief Update RLC AM protocol variable VR(MS).
|
||||
@@ -80,7 +65,7 @@ protected_rlc_am_receiver( void rlc_am_display_data_pdu_infos(const protocol_ctx
|
||||
* \param[in] tb_pP PDU embedded in a mem_block_t struct.
|
||||
* \note It is assumed that the sequence number of the transport block is equal to VR(MS)
|
||||
*/
|
||||
protected_rlc_am_receiver( void rlc_am_rx_update_vr_ms(const protocol_ctxt_t* const ctxt_pP, rlc_am_entity_t * const rlc_pP, mem_block_t* tb_pP);)
|
||||
void rlc_am_rx_update_vr_ms(const protocol_ctxt_t* const ctxt_pP, rlc_am_entity_t * const rlc_pP, mem_block_t* tb_pP);
|
||||
|
||||
/*! \fn void rlc_am_rx_update_vr_r (const protocol_ctxt_t* const ctxt_pP, rlc_am_entity_t * const rlc_pP,mem_block_t* tb_pP)
|
||||
* \brief Update RLC AM protocol variable VR(R).
|
||||
@@ -89,7 +74,7 @@ protected_rlc_am_receiver( void rlc_am_rx_update_vr_ms(const protocol_ctxt_t* co
|
||||
* \param[in] tb_pP PDU embedded in a mem_block_t struct.
|
||||
* \note It is assumed that the sequence number of the transport block is equal to VR(R)
|
||||
*/
|
||||
protected_rlc_am_receiver( void rlc_am_rx_update_vr_r (const protocol_ctxt_t* const ctxt_pP, rlc_am_entity_t * const rlc_pP, mem_block_t* tb_pP);)
|
||||
void rlc_am_rx_update_vr_r (const protocol_ctxt_t* const ctxt_pP, rlc_am_entity_t * const rlc_pP, mem_block_t* tb_pP);
|
||||
|
||||
/*! \fn void rlc_am_receive_routing (const protocol_ctxt_t* const ctxt_pP, rlc_am_entity_t * const rlc_pP, struct mac_data_ind data_indP)
|
||||
* \brief Convert transport blocks received from MAC layer into RLC AM PDUs, and dispatch to the right processing block these PDUS upon their type (CONTROL/DATA).
|
||||
@@ -97,7 +82,7 @@ protected_rlc_am_receiver( void rlc_am_rx_update_vr_r (const protocol_ctxt_t* co
|
||||
* \param[in] rlc_pP RLC AM protocol instance pointer.
|
||||
* \param[in] data_indP Transport blocks received from MAC layer.
|
||||
*/
|
||||
protected_rlc_am_receiver( void rlc_am_receive_routing (const protocol_ctxt_t* const ctxt_pP, rlc_am_entity_t * const rlc_pP, struct mac_data_ind data_indP));
|
||||
void rlc_am_receive_routing (const protocol_ctxt_t* const ctxt_pP, rlc_am_entity_t * const rlc_pP, struct mac_data_ind data_indP);
|
||||
|
||||
/*! \fn void rlc_am_receive_process_data_pdu (const protocol_ctxt_t* const ctxt_pP, rlc_am_entity_t * const rlc_pP, mem_block_t* tb_pP, uint8_t* first_byteP, uint16_t tb_size_in_bytesP)
|
||||
* \brief Process an incoming data PDU received from MAC layer.
|
||||
@@ -107,7 +92,7 @@ protected_rlc_am_receiver( void rlc_am_receive_routing (const protocol_ctxt_t* c
|
||||
* \param[in] first_byteP Pointer on first byte of the PDU.
|
||||
* \param[in] tb_size_in_bytesP Transport block size in bytes (same as PDU size in bytes).
|
||||
*/
|
||||
private_rlc_am_receiver( void rlc_am_receive_process_data_pdu (const protocol_ctxt_t* const ctxt_pP, rlc_am_entity_t * const rlc_pP, mem_block_t* tb_pP, uint8_t* first_byteP,
|
||||
uint16_t tb_size_in_bytesP));
|
||||
void rlc_am_receive_process_data_pdu (const protocol_ctxt_t* const ctxt_pP, rlc_am_entity_t * const rlc_pP, mem_block_t* tb_pP, uint8_t* first_byteP,
|
||||
uint16_t tb_size_in_bytesP);
|
||||
/** @} */
|
||||
# endif
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
#include "rlc_am.h"
|
||||
#include "rlc.h"
|
||||
#include "LAYER2/MAC/mac_extern.h"
|
||||
#include "UTIL/LOG/log.h"
|
||||
#include "common/utils/LOG/log.h"
|
||||
#include "msc.h"
|
||||
//-----------------------------------------------------------------------------
|
||||
boolean_t rlc_am_nack_pdu (
|
||||
@@ -60,10 +60,14 @@ boolean_t rlc_am_nack_pdu (
|
||||
sdu_size_t pdu_data_to_retx = 0;
|
||||
|
||||
if (mb_p != NULL) {
|
||||
assert(so_startP <= so_endP);
|
||||
|
||||
//assert(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",
|
||||
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),so_startP, so_endP);
|
||||
status = FALSE;
|
||||
}
|
||||
// Handle full PDU NACK first
|
||||
if ((so_startP == 0) && (so_endP == 0x7FFF)) {
|
||||
else if ((so_startP == 0) && (so_endP == 0x7FFF)) {
|
||||
if ((prev_nack_snP != snP) && (tx_data_pdu_buffer_p->flags.ack == 0) && (tx_data_pdu_buffer_p->flags.max_retransmit == 0)) {
|
||||
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 */
|
||||
@@ -82,12 +86,17 @@ boolean_t rlc_am_nack_pdu (
|
||||
snP,
|
||||
so_stopP);
|
||||
#endif
|
||||
assert(tx_data_pdu_buffer_p->nack_so_start < tx_data_pdu_buffer_p->payload_size);
|
||||
//assert(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",
|
||||
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;
|
||||
}
|
||||
}
|
||||
else {
|
||||
status = FALSE;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (tx_data_pdu_buffer_p->flags.max_retransmit == 0) {
|
||||
// Handle Segment offset
|
||||
if (so_endP == 0x7FFF) {
|
||||
@@ -163,36 +172,6 @@ boolean_t rlc_am_nack_pdu (
|
||||
rlc_pP->retrans_num_pdus ++;
|
||||
}
|
||||
}
|
||||
|
||||
/* TODO: Move this part in UL SCH processing */
|
||||
#if 0
|
||||
if (rlc_pP->tx_data_pdu_buffer[snP].retx_count >= rlc_pP->max_retx_threshold) {
|
||||
for (pdu_sdu_index = 0; pdu_sdu_index < rlc_pP->tx_data_pdu_buffer[snP].nb_sdus; pdu_sdu_index++) {
|
||||
sdu_index = rlc_pP->tx_data_pdu_buffer[snP].sdus_index[pdu_sdu_index];
|
||||
assert(pdu_sdu_index < RLC_AM_MAX_SDU_IN_PDU);
|
||||
assert(sdu_index < RLC_AM_SDU_CONTROL_BUFFER_SIZE);
|
||||
rlc_pP->input_sdus[sdu_index].nb_pdus_ack += 1;
|
||||
|
||||
if (rlc_pP->input_sdus[sdu_index].nb_pdus_ack == rlc_pP->input_sdus[sdu_index].nb_pdus) {
|
||||
#if TEST_RLC_AM
|
||||
rlc_am_v9_3_0_test_data_conf (rlc_pP->module_id, rlc_pP->rb_id, rlc_pP->input_sdus[sdu_index].mui, RLC_SDU_CONFIRM_NO);
|
||||
#else
|
||||
rlc_data_conf(ctxt_pP, rlc_pP->rb_id, rlc_pP->input_sdus[sdu_index].mui, RLC_SDU_CONFIRM_NO, rlc_pP->is_data_plane);
|
||||
#endif
|
||||
rlc_pP->stat_tx_pdcp_sdu_discarded += 1;
|
||||
rlc_pP->stat_tx_pdcp_bytes_discarded += rlc_pP->input_sdus[sdu_index].sdu_size;
|
||||
MSC_LOG_EVENT((ctxt_pP->enb_flag == ENB_FLAG_YES) ? MSC_RLC_ENB:MSC_RLC_UE,\
|
||||
"0 "PROTOCOL_RLC_AM_MSC_FMT" Dropped SDU mui %u cause max_retx %u reached",\
|
||||
PROTOCOL_RLC_AM_MSC_ARGS(ctxt_pP,rlc_pP),
|
||||
rlc_pP->input_sdus[sdu_index].mui,
|
||||
rlc_pP->max_retx_threshold);
|
||||
|
||||
rlc_am_free_in_sdu(ctxt_pP, rlc_pP, sdu_index);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
} else {
|
||||
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),
|
||||
@@ -225,9 +204,18 @@ void rlc_am_ack_pdu (
|
||||
}
|
||||
|
||||
if (tx_data_pdu_buffer->retx_payload_size) {
|
||||
//Assertion(eNB)_PRAN_DesignDocument_annex No.768
|
||||
if(tx_data_pdu_buffer->flags.ack != 0)
|
||||
{
|
||||
LOG_E(RLC, "RLC AM Rx Status Report sn=%d acked twice but is pending for Retx vtA=%d vtS=%d LcId=%d\n",
|
||||
snP, rlc_pP->vt_a,rlc_pP->vt_s,rlc_pP->channel_id);
|
||||
return;
|
||||
}
|
||||
/*
|
||||
AssertFatal (tx_data_pdu_buffer->flags.ack == 0,
|
||||
"RLC AM Rx Status Report sn=%d acked twice but is pending for Retx vtA=%d vtS=%d LcId=%d\n",
|
||||
snP, rlc_pP->vt_a,rlc_pP->vt_s,rlc_pP->channel_id);
|
||||
*/
|
||||
rlc_pP->retrans_num_bytes_to_retransmit -= tx_data_pdu_buffer->retx_payload_size;
|
||||
tx_data_pdu_buffer->retx_payload_size = 0;
|
||||
tx_data_pdu_buffer->num_holes = 0;
|
||||
@@ -256,15 +244,23 @@ mem_block_t* rlc_am_retransmit_get_copy (
|
||||
const rlc_sn_t snP)
|
||||
{
|
||||
mem_block_t* mb_original_p = rlc_pP->tx_data_pdu_buffer[snP % RLC_AM_WINDOW_SIZE].mem_block;
|
||||
|
||||
//Assertion(eNB)_PRAN_DesignDocument_annex No.784
|
||||
if(mb_original_p == NULL)
|
||||
{
|
||||
LOG_E(RLC,"RLC AM PDU Copy Error: Empty block sn=%d vtA=%d vtS=%d LcId=%d !\n",
|
||||
snP,rlc_pP->vt_a,rlc_pP->vt_s,rlc_pP->channel_id);
|
||||
return NULL;
|
||||
}
|
||||
/*
|
||||
AssertFatal (mb_original_p != NULL, "RLC AM PDU Copy Error: Empty block sn=%d vtA=%d vtS=%d LcId=%d !\n",
|
||||
snP,rlc_pP->vt_a,rlc_pP->vt_s,rlc_pP->channel_id);
|
||||
|
||||
*/
|
||||
rlc_am_tx_data_pdu_management_t *pdu_mngt = &rlc_pP->tx_data_pdu_buffer[snP % RLC_AM_WINDOW_SIZE];
|
||||
|
||||
/* We need to allocate a new buffer and copy to it because header content may change for Polling bit */
|
||||
int size = pdu_mngt->header_and_payload_size + sizeof(struct mac_tb_req);
|
||||
mem_block_t* mb_copy = get_free_mem_block(size, __func__);
|
||||
if(mb_copy == NULL) return NULL;
|
||||
memcpy(mb_copy->data, mb_original_p->data, size);
|
||||
|
||||
rlc_am_pdu_sn_10_t *pdu_p = (rlc_am_pdu_sn_10_t*) (&mb_copy->data[sizeof(struct mac_tb_req)]);
|
||||
@@ -295,20 +291,43 @@ mem_block_t* rlc_am_retransmit_get_am_segment(
|
||||
uint8_t li_bit_offset = 4; /* toggle between 0 and 4 */
|
||||
uint8_t li_jump_offset = 1; /* toggle between 1 and 2 */
|
||||
|
||||
|
||||
//Assertion(eNB)_PRAN_DesignDocument_annex No.774
|
||||
if(mb_original_p == NULL)
|
||||
{
|
||||
LOG_E(RLC,"RLC AM PDU Segment Error: Empty block sn=%d vtA=%d vtS=%d LcId=%d !\n",
|
||||
sn,rlc_pP->vt_a,rlc_pP->vt_s,rlc_pP->channel_id);
|
||||
return NULL;
|
||||
}
|
||||
/*
|
||||
AssertFatal (mb_original_p != NULL, "RLC AM PDU Segment Error: Empty block sn=%d vtA=%d vtS=%d LcId=%d !\n",
|
||||
sn,rlc_pP->vt_a,rlc_pP->vt_s,rlc_pP->channel_id);
|
||||
|
||||
|
||||
*/
|
||||
//Assertion(eNB)_PRAN_DesignDocument_annex No.775
|
||||
if(pdu_mngt->payload != mb_original_p->data + sizeof(struct mac_tb_req) + pdu_mngt->header_and_payload_size - pdu_mngt->payload_size)
|
||||
{
|
||||
LOG_E(RLC,"RLC AM PDU Segment Error: Inconsistent data pointers p1=%p p2=%p sn = %d total size = %d data size = %d LcId=%d !\n",
|
||||
pdu_mngt->payload,mb_original_p->data + sizeof(struct mac_tb_req),pdu_mngt->header_and_payload_size,pdu_mngt->payload_size,sn,rlc_pP->channel_id);
|
||||
return NULL;
|
||||
}
|
||||
/*
|
||||
AssertFatal (pdu_mngt->payload == mb_original_p->data + sizeof(struct mac_tb_req) + pdu_mngt->header_and_payload_size - pdu_mngt->payload_size,
|
||||
"RLC AM PDU Segment Error: Inconsistent data pointers p1=%p p2=%p sn = %d total size = %d data size = %d LcId=%d !\n",
|
||||
pdu_mngt->payload,mb_original_p->data + sizeof(struct mac_tb_req),pdu_mngt->header_and_payload_size,pdu_mngt->payload_size,sn,rlc_pP->channel_id);
|
||||
|
||||
*/
|
||||
/* Init ReTx Hole list if not configured, ie the whole PDU has to be retransmitted */
|
||||
if (pdu_mngt->num_holes == 0)
|
||||
{
|
||||
//Assertion(eNB)_PRAN_DesignDocument_annex No.776
|
||||
if(pdu_mngt->retx_payload_size != pdu_mngt->payload_size)
|
||||
{
|
||||
LOG_E(RLC,"RLC AM PDU ReTx Segment: Expecting full PDU size ReTxSize=%d DataSize=%d sn=%d vtA=%d vtS=%d LcId=%d !\n",
|
||||
pdu_mngt->retx_payload_size,pdu_mngt->payload_size,sn,rlc_pP->vt_a,rlc_pP->vt_s,rlc_pP->channel_id);
|
||||
return NULL;
|
||||
}
|
||||
/*
|
||||
AssertFatal (pdu_mngt->retx_payload_size == pdu_mngt->payload_size,"RLC AM PDU ReTx Segment: Expecting full PDU size ReTxSize=%d DataSize=%d sn=%d vtA=%d vtS=%d LcId=%d !\n",
|
||||
pdu_mngt->retx_payload_size,pdu_mngt->payload_size,sn,rlc_pP->vt_a,rlc_pP->vt_s,rlc_pP->channel_id);
|
||||
*/
|
||||
pdu_mngt->retx_hole_index = 0;
|
||||
pdu_mngt->hole_so_start[0] = 0;
|
||||
pdu_mngt->hole_so_stop[0] = pdu_mngt->payload_size - 1;
|
||||
@@ -318,11 +337,18 @@ mem_block_t* rlc_am_retransmit_get_am_segment(
|
||||
/* Init SO Start and SO Stop */
|
||||
retx_so_start = pdu_mngt->hole_so_start[pdu_mngt->retx_hole_index];
|
||||
retx_so_stop = pdu_mngt->hole_so_stop[pdu_mngt->retx_hole_index];
|
||||
|
||||
//Assertion(eNB)_PRAN_DesignDocument_annex No.777
|
||||
if((retx_so_start > retx_so_stop) || (retx_so_stop - retx_so_start + 1 > pdu_mngt->payload_size))
|
||||
{
|
||||
LOG_E(RLC,"RLC AM Tx PDU Segment Data SO Error: retx_so_start=%d retx_so_stop=%d OriginalPDUDataLength=%d sn=%d LcId=%d!\n",
|
||||
retx_so_start,retx_so_stop,pdu_mngt->payload_size,sn,rlc_pP->channel_id);
|
||||
return NULL;
|
||||
}
|
||||
/*
|
||||
AssertFatal ((retx_so_start <= retx_so_stop) && (retx_so_stop - retx_so_start + 1 <= pdu_mngt->payload_size),
|
||||
"RLC AM Tx PDU Segment Data SO Error: retx_so_start=%d retx_so_stop=%d OriginalPDUDataLength=%d sn=%d LcId=%d!\n",
|
||||
retx_so_start,retx_so_stop,pdu_mngt->payload_size,sn,rlc_pP->channel_id);
|
||||
|
||||
*/
|
||||
/* Init FI to the same value as original PDU */
|
||||
fi_start = (!(RLC_AM_PDU_GET_FI_START(*(pdu_mngt->first_byte))));
|
||||
fi_end = (!(RLC_AM_PDU_GET_FI_END(*(pdu_mngt->first_byte))));
|
||||
@@ -339,6 +365,7 @@ mem_block_t* rlc_am_retransmit_get_am_segment(
|
||||
*payload_sizeP = retx_so_stop - retx_so_start + 1;
|
||||
|
||||
mem_pdu_segment_p = get_free_mem_block((*payload_sizeP + RLC_AM_PDU_SEGMENT_HEADER_MIN_SIZE + sizeof(struct mac_tb_req)), __func__);
|
||||
if(mem_pdu_segment_p == NULL) return NULL;
|
||||
pdu_segment_header_p = (uint8_t *)&mem_pdu_segment_p->data[sizeof(struct mac_tb_req)];
|
||||
((struct mac_tb_req*)(mem_pdu_segment_p->data))->data_ptr = pdu_segment_header_p;
|
||||
((struct mac_tb_req*)(mem_pdu_segment_p->data))->tb_size = RLC_AM_PDU_SEGMENT_HEADER_MIN_SIZE + *payload_sizeP;
|
||||
@@ -408,8 +435,17 @@ mem_block_t* rlc_am_retransmit_get_am_segment(
|
||||
/* Set FI Start if retx_so_start = cumulated data size */
|
||||
fi_start = TRUE;
|
||||
/* there must be at least one SDU more */
|
||||
//Assertion(eNB)_PRAN_DesignDocument_annex No.778
|
||||
if(sdu_index >= pdu_mngt->nb_sdus)
|
||||
{
|
||||
LOG_E(RLC,"RLC AM Tx PDU Segment Error: sdu_index=%d nb_sdus=%d sn=%d LcId=%d !\n",
|
||||
sdu_index,pdu_mngt->nb_sdus,sn,rlc_pP->channel_id);
|
||||
return NULL;
|
||||
}
|
||||
/*
|
||||
AssertFatal (sdu_index < pdu_mngt->nb_sdus, "RLC AM Tx PDU Segment Error: sdu_index=%d nb_sdus=%d sn=%d LcId=%d !\n",
|
||||
sdu_index,pdu_mngt->nb_sdus,sn,rlc_pP->channel_id);
|
||||
*/
|
||||
if (sdu_index < pdu_mngt->nb_sdus - 1)
|
||||
{
|
||||
temp_read = ((*pdu_original_header_p) << 8) | (*(pdu_original_header_p + 1));
|
||||
@@ -487,17 +523,33 @@ mem_block_t* rlc_am_retransmit_get_am_segment(
|
||||
|
||||
/* Set number of LIs in the segment */
|
||||
num_LIs_pdu_segment = sdu_segment_index - 1;
|
||||
|
||||
//Assertion(eNB)_PRAN_DesignDocument_annex No.779
|
||||
if(num_LIs_pdu_segment > pdu_mngt->nb_sdus - 1)
|
||||
{
|
||||
LOG_E(RLC, "RLC AM Tx PDU Segment Data Error: nbLISegment=%d nbLIPDU=%d sn=%d LcId=%d !\n",
|
||||
num_LIs_pdu_segment,pdu_mngt->nb_sdus - 1,sn,rlc_pP->channel_id);
|
||||
return NULL;
|
||||
}
|
||||
/*
|
||||
AssertFatal (num_LIs_pdu_segment <= pdu_mngt->nb_sdus - 1, "RLC AM Tx PDU Segment Data Error: nbLISegment=%d nbLIPDU=%d sn=%d LcId=%d !\n",
|
||||
num_LIs_pdu_segment,pdu_mngt->nb_sdus - 1,sn,rlc_pP->channel_id);
|
||||
|
||||
*/
|
||||
/* Bound to available TBS taking into account min PDU segment header*/
|
||||
sdu_segment_index = 0;
|
||||
while ((sdu_segment_index < num_LIs_pdu_segment + 1) && (rlc_pP->nb_bytes_requested_by_mac > *payload_sizeP + RLC_AM_PDU_SEGMENT_HEADER_SIZE(sdu_segment_index)))
|
||||
{
|
||||
//Assertion(eNB)_PRAN_DesignDocument_annex No.780
|
||||
if(sdus_segment_size[sdu_segment_index] <= 0)
|
||||
{
|
||||
LOG_E(RLC, "RLC AM Tx PDU Segment Data Error: EMpty LI index=%d numLISegment=%d numLIPDU=%d PDULength=%d SOStart=%d SOStop=%d sn=%d LcId=%d !\n",
|
||||
sdu_segment_index,num_LIs_pdu_segment,pdu_mngt->nb_sdus - 1,pdu_mngt->payload_size,retx_so_start,retx_so_stop,sn,rlc_pP->channel_id);
|
||||
sdu_segment_index++;
|
||||
continue;
|
||||
}
|
||||
/*
|
||||
AssertFatal (sdus_segment_size[sdu_segment_index] > 0, "RLC AM Tx PDU Segment Data Error: EMpty LI index=%d numLISegment=%d numLIPDU=%d PDULength=%d SOStart=%d SOStop=%d sn=%d LcId=%d !\n",
|
||||
sdu_segment_index,num_LIs_pdu_segment,pdu_mngt->nb_sdus - 1,pdu_mngt->payload_size,retx_so_start,retx_so_stop,sn,rlc_pP->channel_id);
|
||||
|
||||
*/
|
||||
/* Add next sdu_segment_index to data part */
|
||||
if (RLC_AM_PDU_SEGMENT_HEADER_SIZE(sdu_segment_index) + (*payload_sizeP) + sdus_segment_size[sdu_segment_index] <= rlc_pP->nb_bytes_requested_by_mac)
|
||||
{
|
||||
@@ -519,11 +571,18 @@ mem_block_t* rlc_am_retransmit_get_am_segment(
|
||||
|
||||
/* update retx_so_stop */
|
||||
retx_so_stop = retx_so_start + (*payload_sizeP) - 1;
|
||||
|
||||
//Assertion(eNB)_PRAN_DesignDocument_annex No.781
|
||||
if((retx_so_stop > pdu_mngt->payload_size - 1) || (retx_so_stop - retx_so_start + 1 >= pdu_mngt->payload_size))
|
||||
{
|
||||
LOG_E(RLC,"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);
|
||||
return NULL;
|
||||
}
|
||||
/*
|
||||
AssertFatal ((retx_so_stop <= pdu_mngt->payload_size - 1) && (retx_so_stop - retx_so_start + 1 < pdu_mngt->payload_size),
|
||||
"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);
|
||||
|
||||
*/
|
||||
/* init FI End to FALSE if retx_so_stop is not end of PDU */
|
||||
if (retx_so_stop != pdu_mngt->payload_size - 1)
|
||||
{
|
||||
@@ -541,16 +600,33 @@ mem_block_t* rlc_am_retransmit_get_am_segment(
|
||||
fi_end = TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
//Assertion(eNB)_PRAN_DesignDocument_annex No.782
|
||||
if(data_size != *payload_sizeP)
|
||||
{
|
||||
LOG_E(RLC,"RLC AM Tx PDU Segment Data Error: SduSum=%d Data=%d sn=%d LcId=%d !\n",
|
||||
data_size,*payload_sizeP,sn,rlc_pP->channel_id);
|
||||
return NULL;
|
||||
}
|
||||
/*
|
||||
AssertFatal (data_size == *payload_sizeP, "RLC AM Tx PDU Segment Data Error: SduSum=%d Data=%d sn=%d LcId=%d !\n",
|
||||
data_size,*payload_sizeP,sn,rlc_pP->channel_id);
|
||||
|
||||
*/
|
||||
|
||||
|
||||
/* Allocation */
|
||||
//Assertion(eNB)_PRAN_DesignDocument_annex No.783
|
||||
if(header_segment_length + *payload_sizeP > pdu_mngt->header_and_payload_size + 2)
|
||||
{
|
||||
LOG_E(RLC, "RLC AM PDU Segment Error: Hdr=%d Data=%d Original Hdr+Data =%d sn=%d LcId=%d !\n",
|
||||
header_segment_length,*payload_sizeP,pdu_mngt->header_and_payload_size,sn,rlc_pP->channel_id);
|
||||
return NULL;
|
||||
}
|
||||
/*
|
||||
AssertFatal (header_segment_length + *payload_sizeP <= pdu_mngt->header_and_payload_size + 2, "RLC AM PDU Segment Error: Hdr=%d Data=%d Original Hdr+Data =%d sn=%d LcId=%d !\n",
|
||||
header_segment_length,*payload_sizeP,pdu_mngt->header_and_payload_size,sn,rlc_pP->channel_id);
|
||||
*/
|
||||
mem_pdu_segment_p = get_free_mem_block((*payload_sizeP + header_segment_length + sizeof(struct mac_tb_req)), __func__);
|
||||
if(mem_pdu_segment_p == NULL) return NULL;
|
||||
pdu_segment_header_p = (uint8_t *)&mem_pdu_segment_p->data[sizeof(struct mac_tb_req)];
|
||||
((struct mac_tb_req*)(mem_pdu_segment_p->data))->data_ptr = pdu_segment_header_p;
|
||||
((struct mac_tb_req*)(mem_pdu_segment_p->data))->tb_size = header_segment_length + *payload_sizeP;
|
||||
@@ -662,472 +738,6 @@ mem_block_t* rlc_am_retransmit_get_am_segment(
|
||||
return mem_pdu_segment_p;
|
||||
}
|
||||
|
||||
#if 0
|
||||
//-----------------------------------------------------------------------------
|
||||
mem_block_t* rlc_am_retransmit_get_subsegment(
|
||||
const protocol_ctxt_t* const ctxt_pP,
|
||||
rlc_am_entity_t *const rlc_pP,
|
||||
const rlc_sn_t snP,
|
||||
sdu_size_t * const sizeP /* in-out*/)
|
||||
{
|
||||
|
||||
// 5.2 ARQ procedures
|
||||
// ARQ procedures are only performed by an AM RLC entity.
|
||||
// 5.2.1 Retransmission
|
||||
// The transmitting side of an AM RLC entity can receive a negative acknowledgement (notification of reception failure
|
||||
// by its peer AM RLC entity) for an AMD PDU or a portion of an AMD PDU by the following:
|
||||
// - STATUS PDU from its peer AM RLC entity.
|
||||
//
|
||||
// When receiving a negative acknowledgement for an AMD PDU or a portion of an AMD PDU by a STATUS PDU from
|
||||
// its peer AM RLC entity, the transmitting side of the AM RLC entity shall:
|
||||
// - if the SN of the corresponding AMD PDU falls within the range VT(A) <= SN < VT(S):
|
||||
// - consider the AMD PDU or the portion of the AMD PDU for which a negative acknowledgement was
|
||||
// received for retransmission.
|
||||
//
|
||||
// When an AMD PDU or a portion of an AMD PDU is considered for retransmission, the transmitting side of the AM
|
||||
// RLC entity shall:
|
||||
// - if the AMD PDU is considered for retransmission for the first time:
|
||||
// - set the RETX_COUNT associated with the AMD PDU to zero;
|
||||
// - else, if it (the AMD PDU or the portion of the AMD PDU that is considered for retransmission) is not pending
|
||||
// for retransmission already, or a portion of it is not pending for retransmission already:
|
||||
// - increment the RETX_COUNT;
|
||||
// - if RETX_COUNT = maxRetxThreshold:
|
||||
// - indicate to upper layers that max retransmission has been reached.
|
||||
//
|
||||
// When retransmitting an AMD PDU, the transmitting side of an AM RLC entity shall:
|
||||
// - if the AMD PDU can entirely fit within the total size of RLC PDU(s) indicated by lower layer at the particular
|
||||
// transmission opportunity:
|
||||
// - deliver the AMD PDU as it is except for the P field (the P field should be set according to sub clause 5.2.2) to
|
||||
// lower layer;
|
||||
// - otherwise:
|
||||
// - segment the AMD PDU, form a new AMD PDU segment which will fit within the total size of RLC PDU(s)
|
||||
// indicated by lower layer at the particular transmission opportunity and deliver the new AMD PDU segment
|
||||
// to lower layer.
|
||||
//
|
||||
// When retransmitting a portion of an AMD PDU, the transmitting side of an AM RLC entity shall:
|
||||
// - segment the portion of the AMD PDU as necessary, form a new AMD PDU segment which will fit within the
|
||||
// total size of RLC PDU(s) indicated by lower layer at the particular transmission opportunity and deliver the new
|
||||
// AMD PDU segment to lower layer.
|
||||
//
|
||||
// When forming a new AMD PDU segment, the transmitting side of an AM RLC entity shall:
|
||||
// - only map the Data field of the original AMD PDU to the Data field of the new AMD PDU segment;
|
||||
// - set the header of the new AMD PDU segment in accordance with the description in sub clause 6.;
|
||||
// - set the P field according to sub clause 5.2.2.
|
||||
|
||||
mem_block_t* mb_original_p = rlc_pP->tx_data_pdu_buffer[snP].mem_block;
|
||||
|
||||
if (mb_original_p != NULL) {
|
||||
mem_block_t* mb_sub_segment_p = get_free_mem_block(*sizeP + sizeof(struct mac_tb_req), __func__);
|
||||
rlc_am_pdu_sn_10_t* pdu_original_p = (rlc_am_pdu_sn_10_t*) (&mb_original_p->data[sizeof(struct mac_tb_req)]);
|
||||
rlc_am_pdu_sn_10_t* pdu_sub_segment_p = (rlc_am_pdu_sn_10_t*) (&mb_sub_segment_p->data[sizeof(struct mac_tb_req)]);
|
||||
rlc_am_pdu_info_t pdu_info;
|
||||
int max_copy_payload_size;
|
||||
//LG avoid WARNING int test_max_copy_payload_size;
|
||||
int test_pdu_copy_size = 0;
|
||||
|
||||
((struct mac_tb_req*)(mb_sub_segment_p->data))->data_ptr = (uint8_t*)&(mb_sub_segment_p->data[sizeof(struct mac_tb_req)]);
|
||||
|
||||
if (rlc_am_get_data_pdu_infos(ctxt_pP, rlc_pP, pdu_original_p, rlc_pP->tx_data_pdu_buffer[snP].header_and_payload_size, &pdu_info) >= 0) {
|
||||
int li_index = 0;
|
||||
int start_offset = rlc_pP->tx_data_pdu_buffer[snP].nack_so_start;
|
||||
int stop_offset = rlc_pP->tx_data_pdu_buffer[snP].nack_so_stop;
|
||||
|
||||
LOG_D(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[RE-SEGMENT] ORIGINAL PDU SN %04d:\n",
|
||||
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
||||
snP);
|
||||
rlc_am_display_data_pdu_infos(ctxt_pP, rlc_pP, &pdu_info);
|
||||
|
||||
// all 15 bits set to 1 (indicate that the missing portion of the AMD PDU includes all bytes
|
||||
// to the last byte of the AMD PDU)
|
||||
if (stop_offset == 0x7FFF) {
|
||||
rlc_pP->tx_data_pdu_buffer[snP].nack_so_stop = rlc_pP->tx_data_pdu_buffer[snP].payload_size - 1;
|
||||
stop_offset = rlc_pP->tx_data_pdu_buffer[snP].nack_so_stop;
|
||||
LOG_D(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[RE-SEGMENT] UPDATED RETRANS PDU SN %04d nack_so_stop FROM 0x7FFF to %05d\n",
|
||||
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
||||
snP,
|
||||
stop_offset);
|
||||
}
|
||||
|
||||
// FIXED PART AMD PDU SEGMENT HEADER
|
||||
// 6.2.1.5 AMD PDU segment
|
||||
// AMD PDU segment consists of a Data field and an AMD PDU segment header.
|
||||
//
|
||||
// AMD PDU segment header consists of a fixed part (fields that are present for every AMD PDU segment) and an
|
||||
// extension part (fields that are present for an AMD PDU segment when necessary). The fixed part of the AMD PDU
|
||||
// segment header itself is byte aligned and consists of a D/C, a RF, a P, a FI, an E, a SN, a LSF and a SO. The extension
|
||||
// part of the AMD PDU segment header itself is byte aligned and consists of E(s) and LI(s).
|
||||
//
|
||||
// An AMD PDU segment header consists of an extension part only when more than one Data field elements are present
|
||||
// in the AMD PDU segment, in which case an E and a LI are present for every Data field element except the last.
|
||||
// Furthermore, when an AMD PDU segment header consists of an odd number of LI(s), four padding bits follow after the
|
||||
// last LI.
|
||||
|
||||
pdu_sub_segment_p->b1 = (pdu_original_p->b1 & 0x83) | 0x40;
|
||||
pdu_sub_segment_p->b2 = pdu_original_p->b2;
|
||||
pdu_sub_segment_p->data[0] = ((uint8_t)(start_offset >> 8));
|
||||
pdu_sub_segment_p->data[1] = ((uint8_t)(start_offset & 0xFF));
|
||||
|
||||
*sizeP = *sizeP - 4;
|
||||
|
||||
|
||||
int continue_fill_pdu_with_pdu = 1;
|
||||
int test_pdu_remaining_size = *sizeP;
|
||||
int test_num_li = 0;
|
||||
int fill_num_li ;
|
||||
int test_li_sum = 0;
|
||||
int not_test_fi = 0; // by default not 1st byte and not last byte af a SDU
|
||||
int test_start_offset;
|
||||
unsigned int test_li_length_in_bytes = 1;
|
||||
int16_t test_li_list[RLC_AM_MAX_SDU_IN_PDU];
|
||||
uint8_t* fill_payload_p;
|
||||
//int test_fi_last_byte_pdu_is_last_byte_sdu = 0;
|
||||
//int test_fi_first_byte_pdu_is_first_byte_sdu = 0;
|
||||
|
||||
rlc_am_e_li_t* e_li_sub_segment = (rlc_am_e_li_t*)(&pdu_sub_segment_p->data[2]);
|
||||
//int first_enter_in_start_offset_lt_li_sum = 1;
|
||||
int not_fi_original = ((pdu_original_p->b1 & 0x18) >> 3) ^ 3;
|
||||
|
||||
//-------------------------------------------------------
|
||||
// set MAX payload size that can be copied
|
||||
// first constraint : the size of the hole to retransmit
|
||||
rlc_am_get_next_hole(ctxt_pP, rlc_pP, snP, &start_offset, &stop_offset);
|
||||
max_copy_payload_size = stop_offset - start_offset + 1;
|
||||
assert(max_copy_payload_size > 0);
|
||||
assert(test_pdu_remaining_size > 0);
|
||||
LOG_T(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[RE-SEGMENT] HOLE FOUND SO %d -> %d\n",
|
||||
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
||||
start_offset,
|
||||
stop_offset);
|
||||
LOG_T(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[RE-SEGMENT] ORIGINAL FI %d\n",
|
||||
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
||||
(pdu_original_p->b1 & 0x18) >> 3);
|
||||
|
||||
// second constraint the size of the pdu_p requested by MAC layer
|
||||
if (max_copy_payload_size > test_pdu_remaining_size) {
|
||||
LOG_T(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[RE-SEGMENT] CUT max_copy_payload_size with test_pdu_remaining_size %d -> %d\n",
|
||||
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
||||
max_copy_payload_size,
|
||||
test_pdu_remaining_size);
|
||||
max_copy_payload_size = test_pdu_remaining_size;
|
||||
}
|
||||
|
||||
|
||||
if (start_offset == 0) {
|
||||
not_test_fi = (not_fi_original & 0x02);
|
||||
}
|
||||
|
||||
test_start_offset = start_offset;
|
||||
|
||||
//.find the li corresponding to the nack_so_start (start_offset)
|
||||
if (pdu_info.num_li > 0) {
|
||||
LOG_T(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[RE-SEGMENT] ORIGINAL NUM LI %d\n",
|
||||
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
||||
pdu_info.num_li);
|
||||
|
||||
while ((li_index < pdu_info.num_li) && (continue_fill_pdu_with_pdu)) {
|
||||
LOG_T(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[RE-SEGMENT] FIND LI %d\n",
|
||||
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
||||
pdu_info.li_list[li_index]);
|
||||
|
||||
if (max_copy_payload_size > test_pdu_remaining_size) {
|
||||
LOG_T(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[RE-SEGMENT] CUT max_copy_payload_size with test_pdu_remaining_size %d -> %d\n",
|
||||
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
||||
max_copy_payload_size,
|
||||
test_pdu_remaining_size);
|
||||
max_copy_payload_size = test_pdu_remaining_size;
|
||||
}
|
||||
|
||||
assert(max_copy_payload_size >= 0);
|
||||
assert(test_pdu_remaining_size >= 0);
|
||||
|
||||
test_li_sum += pdu_info.li_list[li_index];
|
||||
|
||||
//---------------------------------------------------------------
|
||||
if (test_start_offset < test_li_sum) {
|
||||
|
||||
LOG_T(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[RE-SEGMENT] test_start_offset < test_li_sum %d < %d\n",
|
||||
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
||||
test_start_offset,
|
||||
test_li_sum);
|
||||
/*if (test_max_copy_payload_size > (test_li_sum - test_start_offset)) {
|
||||
#if TRACE_RLC_AM_RESEGMENT
|
||||
LOG_D(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u][RE-SEGMENT] CUT test_max_copy_payload_size with test_li_sum - test_start_offset %d -> %d\n",ctxt_pP->frame, rlc_pP->module_id, rlc_pP->rb_id, test_max_copy_payload_size, test_li_sum - test_start_offset);
|
||||
#endif
|
||||
test_max_copy_payload_size = test_li_sum - test_start_offset;
|
||||
}*/
|
||||
|
||||
if ((max_copy_payload_size + test_start_offset) < test_li_sum) {
|
||||
LOG_T(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[RE-SEGMENT] (max_copy_payload_size %d + test_start_offset %d) < test_li_sum %d\n",
|
||||
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
||||
max_copy_payload_size,
|
||||
test_start_offset,
|
||||
test_li_sum);
|
||||
LOG_T(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[RE-SEGMENT] COPY SO %d -> %d %d BYTES\n",
|
||||
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
||||
test_start_offset ,
|
||||
test_start_offset + max_copy_payload_size - 1,
|
||||
max_copy_payload_size );
|
||||
assert(max_copy_payload_size > 0);
|
||||
continue_fill_pdu_with_pdu = 0;
|
||||
test_pdu_copy_size = test_pdu_copy_size + max_copy_payload_size;
|
||||
test_start_offset = test_start_offset + max_copy_payload_size;
|
||||
not_test_fi = not_test_fi & 0x02; // clear b0, last byte does not correspond to last byte of a SDU
|
||||
max_copy_payload_size = 0;
|
||||
|
||||
} else if ((max_copy_payload_size + test_start_offset) == test_li_sum) {
|
||||
LOG_T(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[RE-SEGMENT] (max_copy_payload_size + test_start_offset) == test_li_sum %d == %d\n",
|
||||
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
||||
(max_copy_payload_size + test_start_offset) ,
|
||||
test_li_sum);
|
||||
LOG_T(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[RE-SEGMENT] COPY SO %d -> %d %d BYTES\n",
|
||||
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
||||
test_start_offset ,
|
||||
test_start_offset + max_copy_payload_size - 1,
|
||||
max_copy_payload_size );
|
||||
assert(max_copy_payload_size > 0);
|
||||
continue_fill_pdu_with_pdu = 0;
|
||||
test_pdu_copy_size = test_pdu_copy_size + max_copy_payload_size;
|
||||
test_start_offset = test_start_offset + max_copy_payload_size;
|
||||
not_test_fi = not_test_fi | 0x01;// set b0, last byte does correspond to last byte of a SDU
|
||||
max_copy_payload_size = 0;
|
||||
|
||||
} else if ((max_copy_payload_size + test_start_offset - (test_li_length_in_bytes ^ 3)) > test_li_sum) {
|
||||
LOG_T(RLC,
|
||||
PROTOCOL_RLC_AM_CTXT_FMT"[RE-SEGMENT] (max_copy_payload_size + test_start_offset - (test_li_length_in_bytes ^ 3)) > test_li_sum %d > %d\n SET LI %d\n",
|
||||
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
||||
(max_copy_payload_size + test_start_offset) + (test_li_length_in_bytes ^ 3),
|
||||
test_li_sum,
|
||||
test_li_sum - test_start_offset);
|
||||
LOG_T(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[RE-SEGMENT] COPY SO %d -> %d %d BYTES\n",
|
||||
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
||||
test_start_offset ,
|
||||
test_li_sum - 1,
|
||||
test_li_sum - test_start_offset );
|
||||
assert((test_li_sum - test_start_offset) > 0);
|
||||
test_li_list[test_num_li++] = test_li_sum - test_start_offset;
|
||||
test_pdu_copy_size = test_pdu_copy_size + test_li_sum - test_start_offset;
|
||||
test_li_length_in_bytes = test_li_length_in_bytes ^ 3;
|
||||
|
||||
test_pdu_remaining_size = test_pdu_remaining_size - test_li_sum + test_start_offset -
|
||||
test_li_length_in_bytes;
|
||||
|
||||
max_copy_payload_size = max_copy_payload_size - test_li_sum + test_start_offset - test_li_length_in_bytes;
|
||||
LOG_T(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[RE-SEGMENT] NOW max_copy_payload_size %d BYTES test_start_offset %d\n",
|
||||
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
||||
max_copy_payload_size,
|
||||
test_li_sum);
|
||||
// normally the next while itereation will add bytes to PDU
|
||||
//not_test_fi = not_test_fi | 0x01; // set b0, last byte does correspond to last byte of a SDU
|
||||
test_start_offset = test_li_sum;
|
||||
|
||||
} else {
|
||||
LOG_T(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[RE-SEGMENT] (test_max_copy_payload_size + test_start_offset ) > test_li_sum %d > %d\n NO REMAINING SIZE FOR LI",
|
||||
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
||||
(max_copy_payload_size + test_start_offset),
|
||||
test_li_sum);
|
||||
LOG_T(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[RE-SEGMENT] COPY SO %d -> %d %d BYTES\n",
|
||||
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
||||
test_start_offset ,
|
||||
test_li_sum - 1,
|
||||
test_li_sum - test_start_offset );
|
||||
assert((test_li_sum - test_start_offset) > 0);
|
||||
continue_fill_pdu_with_pdu = 0;
|
||||
test_pdu_copy_size = test_pdu_copy_size + test_li_sum - test_start_offset;
|
||||
|
||||
test_pdu_remaining_size = test_pdu_remaining_size - test_li_sum + test_start_offset;
|
||||
|
||||
max_copy_payload_size = max_copy_payload_size - test_li_sum + test_start_offset;
|
||||
test_start_offset = test_li_sum;
|
||||
not_test_fi = not_test_fi | 0x01; // set b0, last byte does correspond to last byte of a SDU
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------
|
||||
// start offset start at the begining of a SDU
|
||||
// and it cant be the first data field of the original PDU
|
||||
} else if (test_start_offset == test_li_sum) {
|
||||
LOG_T(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[RE-SEGMENT] (test_start_offset == test_li_sum) %d == %d\n",
|
||||
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
||||
test_start_offset ,
|
||||
test_li_sum);
|
||||
|
||||
if ((test_num_li == 0) && (test_pdu_copy_size == 0)) {
|
||||
not_test_fi = not_test_fi | 0x02; // set b1, first byte does correspond to first byte of a SDU
|
||||
}
|
||||
}
|
||||
|
||||
li_index = li_index + 1;
|
||||
}
|
||||
|
||||
if ((continue_fill_pdu_with_pdu > 0) &&
|
||||
(li_index == pdu_info.num_li) &&
|
||||
(pdu_info.hidden_size > 0) &&
|
||||
(test_pdu_remaining_size > 0) &&
|
||||
(max_copy_payload_size > 0) ) {
|
||||
|
||||
if (max_copy_payload_size > test_pdu_remaining_size) {
|
||||
LOG_T(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[RE-SEGMENT] TRYING HIDDEN SIZE...CUT max_copy_payload_size with test_pdu_remaining_size %d -> %d\n",
|
||||
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
||||
max_copy_payload_size,
|
||||
test_pdu_remaining_size);
|
||||
max_copy_payload_size = test_pdu_remaining_size;
|
||||
}
|
||||
|
||||
// remaining bytes to fill, redundant check, but ...
|
||||
if ((max_copy_payload_size + test_start_offset) >= (pdu_info.hidden_size + test_li_sum)) {
|
||||
test_pdu_copy_size += (pdu_info.hidden_size + test_li_sum - test_start_offset);
|
||||
LOG_T(RLC,
|
||||
PROTOCOL_RLC_AM_CTXT_FMT"[RE-SEGMENT] COPYING WHOLE REMAINING SIZE %d (max_copy_payload_size %d, test_start_offset %d, pdu_info.hidden_size %d test_li_sum %d test_pdu_copy_size %d)\n",
|
||||
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
||||
pdu_info.hidden_size + test_li_sum - test_start_offset,
|
||||
max_copy_payload_size,
|
||||
test_start_offset,
|
||||
pdu_info.hidden_size,
|
||||
test_li_sum,
|
||||
test_pdu_copy_size);
|
||||
test_start_offset = pdu_info.hidden_size + test_li_sum;
|
||||
not_test_fi = (not_test_fi & 0x2) | (not_fi_original & 0x1); // set b0 idendical to the b0 of the non segmented PDU
|
||||
} else {
|
||||
LOG_T(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[RE-SEGMENT] COPYING REMAINING SIZE %d (/%d)\n",
|
||||
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
||||
max_copy_payload_size,
|
||||
pdu_info.hidden_size);
|
||||
test_pdu_copy_size += max_copy_payload_size;
|
||||
test_start_offset = test_start_offset + max_copy_payload_size;
|
||||
not_test_fi = not_test_fi & 0x2; // clear b0 because no SDU ending in this PDU
|
||||
}
|
||||
}
|
||||
} else { // num_li == 0
|
||||
LOG_T(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[RE-SEGMENT] (num_li == 0)\n",
|
||||
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP));
|
||||
test_pdu_copy_size = max_copy_payload_size;
|
||||
|
||||
if ((stop_offset == (start_offset + max_copy_payload_size - 1)) && (stop_offset == rlc_pP->tx_data_pdu_buffer[snP].payload_size - 1)) {
|
||||
not_test_fi = (not_test_fi & 0x2) | (not_fi_original & 0x1); // set b0 idendical to the b0 of the non segmented PDU
|
||||
} else {
|
||||
not_test_fi = not_test_fi & 0x2; // clear b0 because no SDU ending in this PDU
|
||||
}
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------
|
||||
/*if (stop_offset == (rlc_pP->tx_data_pdu_buffer[snP].payload_size - 1)) {
|
||||
test_fi = (test_fi & 0x02) | (fi_original & 0x01);
|
||||
}*/
|
||||
//---------------------------------------------------------------
|
||||
// write FI field in header
|
||||
//---------------------------------------------------------------
|
||||
pdu_sub_segment_p->b1 = pdu_sub_segment_p->b1 | (((not_test_fi << 3) ^ 0x18) & 0x18);
|
||||
//---------------------------------------------------------------
|
||||
// fill the segment pdu_p with Lis and data
|
||||
//---------------------------------------------------------------
|
||||
LOG_T(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[RE-SEGMENT] fill the segment pdu_p with Lis and data, test_num_li %d\n",
|
||||
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP), test_num_li);
|
||||
|
||||
if (test_num_li > 0) {
|
||||
pdu_sub_segment_p->b1 = pdu_sub_segment_p->b1 | 0x04; // set E bit
|
||||
test_li_length_in_bytes = 1;
|
||||
|
||||
for (fill_num_li=0; fill_num_li < test_num_li; fill_num_li++) {
|
||||
test_li_length_in_bytes = test_li_length_in_bytes ^ 3;
|
||||
|
||||
if (test_li_length_in_bytes == 2) {
|
||||
if (fill_num_li == (test_num_li - 1)) {
|
||||
e_li_sub_segment->b1 = 0;
|
||||
} else {
|
||||
e_li_sub_segment->b1 = 0x80;
|
||||
}
|
||||
|
||||
e_li_sub_segment->b1 = e_li_sub_segment->b1 | (test_li_list[fill_num_li] >> 4);
|
||||
e_li_sub_segment->b2 = test_li_list[fill_num_li] << 4;
|
||||
fill_payload_p = (uint8_t*)(&e_li_sub_segment->b3);
|
||||
*sizeP = *sizeP - 2;
|
||||
} else {
|
||||
if (fill_num_li != (test_num_li - 1)) {
|
||||
e_li_sub_segment->b2 = e_li_sub_segment->b2 | 0x08;
|
||||
}
|
||||
|
||||
e_li_sub_segment->b2 = e_li_sub_segment->b2 | (test_li_list[fill_num_li] >> 8);
|
||||
e_li_sub_segment->b3 = test_li_list[fill_num_li] & 0xFF;
|
||||
e_li_sub_segment++;
|
||||
fill_payload_p = (uint8_t*)e_li_sub_segment;
|
||||
*sizeP = *sizeP - 1;
|
||||
}
|
||||
|
||||
LOG_T(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[RE-SEGMENT] ADD LI %d\n",
|
||||
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
||||
test_li_list[fill_num_li]);
|
||||
}
|
||||
} else {
|
||||
LOG_T(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[RE-SEGMENT] ADD NO LI\n",
|
||||
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP));
|
||||
fill_payload_p = (uint8_t*)e_li_sub_segment;
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------
|
||||
// copy payload to retransmit
|
||||
//---------------------------------------------------------------
|
||||
memcpy(fill_payload_p,
|
||||
&rlc_pP->tx_data_pdu_buffer[snP].payload[start_offset],
|
||||
test_pdu_copy_size);
|
||||
|
||||
((struct mac_tb_req*)(mb_sub_segment_p->data))->tb_size = (tb_size_t)(((uint64_t)fill_payload_p)+ test_pdu_copy_size) - ((uint64_t)(&pdu_sub_segment_p->b1));
|
||||
|
||||
// set LSF
|
||||
if ((test_pdu_copy_size + start_offset) == rlc_pP->tx_data_pdu_buffer[snP].payload_size) {
|
||||
pdu_sub_segment_p->data[0] = pdu_sub_segment_p->data[0] | 0x80;
|
||||
|
||||
rlc_pP->tx_data_pdu_buffer[snP].flags.retransmit = 0;
|
||||
|
||||
LOG_D(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[RE-SEGMENT] RE-SEND DATA PDU SN %04d SO %d %d BYTES PAYLOAD %d BYTES LSF!\n",
|
||||
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
||||
snP,
|
||||
start_offset,
|
||||
((struct mac_tb_req*)(mb_sub_segment_p->data))->tb_size,
|
||||
test_pdu_copy_size);
|
||||
} else {
|
||||
LOG_D(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[RE-SEGMENT] RE-SEND DATA PDU SN %04d SO %d %d BYTES PAYLOAD %d BYTES\n",
|
||||
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
||||
snP,
|
||||
start_offset,
|
||||
((struct mac_tb_req*)(mb_sub_segment_p->data))->tb_size,
|
||||
test_pdu_copy_size);
|
||||
}
|
||||
|
||||
LOG_T(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[RE-SEGMENT] *sizeP %d = *sizeP %d - test_pdu_copy_size %d\n",
|
||||
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
||||
*sizeP - test_pdu_copy_size, *sizeP,
|
||||
test_pdu_copy_size);
|
||||
|
||||
*sizeP = *sizeP - test_pdu_copy_size;
|
||||
//---------------------------------------------------------------
|
||||
// update nack_so_start
|
||||
//---------------------------------------------------------------
|
||||
rlc_am_remove_hole(ctxt_pP, rlc_pP, snP, start_offset, test_pdu_copy_size+start_offset - 1);
|
||||
//rlc_pP->tx_data_pdu_buffer[snP].nack_so_start = rlc_pP->tx_data_pdu_buffer[snP].nack_so_start + test_pdu_copy_size;
|
||||
LOG_D(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[RE-SEGMENT] RE-SEND DATA PDU SN %04d NOW nack_so_start %d nack_so_stop %d\n",
|
||||
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
||||
snP,
|
||||
rlc_pP->tx_data_pdu_buffer[snP].nack_so_start,
|
||||
rlc_pP->tx_data_pdu_buffer[snP].nack_so_stop);
|
||||
/*if (rlc_pP->tx_data_pdu_buffer[snP].nack_so_start == rlc_pP->tx_data_pdu_buffer[snP].nack_so_stop) {
|
||||
rlc_pP->tx_data_pdu_buffer[snP].nack_so_start = 0;
|
||||
rlc_pP->tx_data_pdu_buffer[snP].nack_so_stop = 0x7FFF;
|
||||
}*/
|
||||
} else {
|
||||
LOG_D(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[RE-SEGMENT] COULD NOT GET INFO FOR DATA PDU SN %04d -> RETURN NULL\n",
|
||||
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
||||
snP);
|
||||
return NULL;
|
||||
}
|
||||
return mb_sub_segment_p;
|
||||
} else {
|
||||
LOG_D(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[RE-SEGMENT] RE-SEND DATA PDU SN %04d BUT NO PDU AVAILABLE -> RETURN NULL\n",
|
||||
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
||||
snP);
|
||||
assert(3==4);
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
//-----------------------------------------------------------------------------
|
||||
void rlc_am_tx_buffer_display (
|
||||
const protocol_ctxt_t* const ctxt_pP,
|
||||
@@ -1170,7 +780,11 @@ void rlc_am_tx_buffer_display (
|
||||
LOG_D(RLC, "SO:%04d->%04d)\t", tx_data_pdu_buffer_p->nack_so_start, tx_data_pdu_buffer_p->nack_so_stop);
|
||||
} else {
|
||||
for (i=0; i<tx_data_pdu_buffer_p->num_holes; i++) {
|
||||
assert(i < RLC_AM_MAX_HOLES_REPORT_PER_PDU);
|
||||
//assert(i < RLC_AM_MAX_HOLES_REPORT_PER_PDU);
|
||||
if(i >= RLC_AM_MAX_HOLES_REPORT_PER_PDU) {
|
||||
LOG_E(RLC, "num_holes error. %d %d %d\n", tx_data_pdu_buffer_p->num_holes, i, RLC_AM_MAX_HOLES_REPORT_PER_PDU);
|
||||
break;
|
||||
}
|
||||
LOG_D(RLC, "SO:%04d->%04d)\t", tx_data_pdu_buffer_p->hole_so_start[i], tx_data_pdu_buffer_p->hole_so_stop[i]);
|
||||
}
|
||||
}
|
||||
@@ -1193,22 +807,50 @@ mem_block_t * rlc_am_get_pdu_to_retransmit(
|
||||
rlc_sn_t sn_end = rlc_pP->vt_s;
|
||||
mem_block_t* pdu_p = NULL;
|
||||
rlc_am_tx_data_pdu_management_t* tx_data_pdu_management;
|
||||
|
||||
//Assertion(eNB)_PRAN_DesignDocument_annex No.769
|
||||
if((rlc_pP->retrans_num_pdus <= 0) || (rlc_pP->vt_a == rlc_pP->vt_s))
|
||||
{
|
||||
LOG_E(RLC, "RLC AM ReTx start process Error: NbPDUtoRetx=%d vtA=%d vtS=%d LcId=%d !\n",
|
||||
rlc_pP->retrans_num_pdus,rlc_pP->vt_a,rlc_pP->vt_s,rlc_pP->channel_id);
|
||||
return NULL;
|
||||
}
|
||||
/*
|
||||
AssertFatal ((rlc_pP->retrans_num_pdus > 0) && (rlc_pP->vt_a != rlc_pP->vt_s), "RLC AM ReTx start process Error: NbPDUtoRetx=%d vtA=%d vtS=%d LcId=%d !\n",
|
||||
rlc_pP->retrans_num_pdus,rlc_pP->vt_a,rlc_pP->vt_s,rlc_pP->channel_id);
|
||||
|
||||
*/
|
||||
do
|
||||
{
|
||||
tx_data_pdu_management = &rlc_pP->tx_data_pdu_buffer[sn % RLC_AM_WINDOW_SIZE];
|
||||
if ((tx_data_pdu_management->flags.retransmit) && (tx_data_pdu_management->flags.max_retransmit == 0))
|
||||
{
|
||||
//Assertion(eNB)_PRAN_DesignDocument_annex No.770
|
||||
if(tx_data_pdu_management->sn != sn)
|
||||
{
|
||||
LOG_E(RLC, "RLC AM ReTx PDU Error: SN Error pdu_sn=%d sn=%d vtA=%d vtS=%d LcId=%d !\n",
|
||||
tx_data_pdu_management->sn,sn,rlc_pP->vt_a,rlc_pP->vt_s,rlc_pP->channel_id);
|
||||
}
|
||||
//Assertion(eNB)_PRAN_DesignDocument_annex No.771
|
||||
else if(tx_data_pdu_management->flags.transmitted != 1)
|
||||
{
|
||||
LOG_E(RLC, "RLC AM ReTx PDU Error: State Error sn=%d vtA=%d vtS=%d LcId=%d !\n",
|
||||
sn,rlc_pP->vt_a,rlc_pP->vt_s,rlc_pP->channel_id);
|
||||
}
|
||||
//Assertion(eNB)_PRAN_DesignDocument_annex No.772
|
||||
else if(tx_data_pdu_management->retx_payload_size <= 0)
|
||||
{
|
||||
LOG_E(RLC, "RLC AM ReTx PDU Error: No Data to Retx sn=%d vtA=%d vtS=%d LcId=%d !\n",
|
||||
sn,rlc_pP->vt_a,rlc_pP->vt_s,rlc_pP->channel_id);
|
||||
}
|
||||
else
|
||||
{
|
||||
/*
|
||||
AssertFatal (tx_data_pdu_management->sn == sn, "RLC AM ReTx PDU Error: SN Error pdu_sn=%d sn=%d vtA=%d vtS=%d LcId=%d !\n",
|
||||
tx_data_pdu_management->sn,sn,rlc_pP->vt_a,rlc_pP->vt_s,rlc_pP->channel_id);
|
||||
AssertFatal (tx_data_pdu_management->flags.transmitted == 1, "RLC AM ReTx PDU Error: State Error sn=%d vtA=%d vtS=%d LcId=%d !\n",
|
||||
sn,rlc_pP->vt_a,rlc_pP->vt_s,rlc_pP->channel_id);
|
||||
AssertFatal (tx_data_pdu_management->retx_payload_size > 0, "RLC AM ReTx PDU Error: No Data to Retx sn=%d vtA=%d vtS=%d LcId=%d !\n",
|
||||
sn,rlc_pP->vt_a,rlc_pP->vt_s,rlc_pP->channel_id);
|
||||
|
||||
*/
|
||||
/* Either the whole RLC PDU is to be transmitted and there is enough MAC TBS or there is minimum TBS size for transmitting 1 AM PDU segment */
|
||||
if ((tx_data_pdu_management->retx_payload_size == tx_data_pdu_management->payload_size) && (rlc_pP->nb_bytes_requested_by_mac >= tx_data_pdu_management->header_and_payload_size))
|
||||
{
|
||||
@@ -1256,9 +898,18 @@ mem_block_t * rlc_am_get_pdu_to_retransmit(
|
||||
|
||||
if (pdu_p != NULL)
|
||||
{
|
||||
//Assertion(eNB)_PRAN_DesignDocument_annex No.773
|
||||
if((tx_data_pdu_management->retx_payload_size < pdu_data_size)|| (rlc_pP->retrans_num_bytes_to_retransmit < pdu_data_size))
|
||||
{
|
||||
LOG_E(RLC, "RLC AM ReTx PDU Segment Error: DataSize=%d PDUReTxsize=%d TotalReTxsize=%d sn=%d LcId=%d !\n",
|
||||
pdu_data_size,tx_data_pdu_management->retx_payload_size,rlc_pP->retrans_num_bytes_to_retransmit,sn,rlc_pP->channel_id);
|
||||
}
|
||||
else
|
||||
{
|
||||
/*
|
||||
AssertFatal ((tx_data_pdu_management->retx_payload_size >= pdu_data_size) && (rlc_pP->retrans_num_bytes_to_retransmit >= pdu_data_size), "RLC AM ReTx PDU Segment Error: DataSize=%d PDUReTxsize=%d TotalReTxsize=%d sn=%d LcId=%d !\n",
|
||||
pdu_data_size,tx_data_pdu_management->retx_payload_size,rlc_pP->retrans_num_bytes_to_retransmit,sn,rlc_pP->channel_id);
|
||||
|
||||
*/
|
||||
tx_data_pdu_management->retx_payload_size -= pdu_data_size;
|
||||
rlc_pP->retrans_num_bytes_to_retransmit -= pdu_data_size;
|
||||
if (tx_data_pdu_management->retx_payload_size == 0)
|
||||
@@ -1276,6 +927,7 @@ mem_block_t * rlc_am_get_pdu_to_retransmit(
|
||||
rlc_pP->stat_tx_retransmit_bytes += pdu_data_size;
|
||||
rlc_pP->stat_tx_retransmit_bytes_by_status += pdu_data_size;
|
||||
|
||||
}//Assertion(eNB)_PRAN_DesignDocument_annex No.773
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -1300,101 +952,10 @@ mem_block_t * rlc_am_get_pdu_to_retransmit(
|
||||
break;
|
||||
}
|
||||
|
||||
}//Assertion(eNB)_PRAN_DesignDocument_annex No.770 No.771 No.772
|
||||
}
|
||||
|
||||
sn = RLC_AM_NEXT_SN(sn);
|
||||
} while((sn != sn_end) && (rlc_pP->retrans_num_pdus > 0));
|
||||
|
||||
return pdu_p;
|
||||
}
|
||||
|
||||
#if 0
|
||||
//-----------------------------------------------------------------------------
|
||||
void rlc_am_retransmit_any_pdu(
|
||||
const protocol_ctxt_t* const ctxt_pP,
|
||||
rlc_am_entity_t* const rlc_pP)
|
||||
{
|
||||
rlc_sn_t sn = (rlc_pP->vt_s - 1) & RLC_AM_SN_MASK;
|
||||
rlc_sn_t sn_end = (rlc_pP->vt_a - 1) & RLC_AM_SN_MASK;
|
||||
int found_pdu = 0;
|
||||
rlc_sn_t found_pdu_sn = 0; // avoid warning
|
||||
mem_block_t* pdu_p = NULL;
|
||||
rlc_am_pdu_sn_10_t* pdu_sn_10_p = NULL;
|
||||
|
||||
LOG_D(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[FORCE-TRAFFIC] rlc_am_retransmit_any_pdu()\n",
|
||||
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP));
|
||||
|
||||
while (sn != sn_end) {
|
||||
if (rlc_pP->tx_data_pdu_buffer[sn].mem_block != NULL) {
|
||||
if (!found_pdu) {
|
||||
found_pdu = 1;
|
||||
found_pdu_sn = sn;
|
||||
}
|
||||
|
||||
if (rlc_pP->tx_data_pdu_buffer[sn].header_and_payload_size <= rlc_pP->nb_bytes_requested_by_mac) {
|
||||
LOG_D(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[FORCE-TRAFFIC] RE-SEND DATA PDU SN %04d\n",
|
||||
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
||||
sn);
|
||||
#if MESSAGE_CHART_GENERATOR_RLC_MAC
|
||||
MSC_LOG_EVENT((ctxt_pP->enb_flag == ENB_FLAG_YES) ? MSC_RLC_ENB:MSC_RLC_UE,\
|
||||
"0 "PROTOCOL_RLC_AM_MSC_FMT" RTX any pdu found SN %u",\
|
||||
PROTOCOL_RLC_AM_MSC_ARGS(ctxt_pP,rlc_pP), sn);
|
||||
#endif
|
||||
rlc_am_nack_pdu (ctxt_pP, rlc_pP, sn, 0, 0x7FFF);
|
||||
// no need for update rlc_pP->nb_bytes_requested_by_mac
|
||||
pdu_p = rlc_am_retransmit_get_copy(ctxt_pP, rlc_pP, sn);
|
||||
pdu_sn_10_p = (rlc_am_pdu_sn_10_t*) (&pdu_p->data[sizeof(struct mac_tb_req)]);
|
||||
rlc_am_pdu_polling(ctxt_pP, rlc_pP, pdu_sn_10_p, rlc_pP->tx_data_pdu_buffer[sn].header_and_payload_size,false);
|
||||
//BugFix: polling is checked and done in function above !
|
||||
//pdu_sn_10_p->b1 = pdu_sn_10_p->b1 | 0x20;
|
||||
//BugFix : pdu_without_poll and byte_without_poll are reset only if a Poll is transmitted
|
||||
//rlc_pP->c_pdu_without_poll = 0;
|
||||
//rlc_pP->c_byte_without_poll = 0;
|
||||
//rlc_pP->poll_sn = (rlc_pP->vt_s -1) & RLC_AM_SN_MASK;
|
||||
rlc_pP->stat_tx_data_pdu += 1;
|
||||
rlc_pP->stat_tx_retransmit_pdu += 1;
|
||||
rlc_pP->stat_tx_data_bytes += ((struct mac_tb_req*)(pdu_p->data))->tb_size;
|
||||
rlc_pP->stat_tx_retransmit_bytes += ((struct mac_tb_req*)(pdu_p->data))->tb_size;
|
||||
list_add_tail_eurecom (pdu_p, &rlc_pP->pdus_to_mac_layer);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
sn = (sn - 1) & RLC_AM_SN_MASK;
|
||||
}
|
||||
|
||||
// no pdu_p with correct size has been found
|
||||
// so re-segment a pdu_p if possible
|
||||
if (found_pdu) {
|
||||
LOG_D(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[FORCE-TRAFFIC] SEND SEGMENT OF DATA PDU SN %04d\n",
|
||||
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
||||
found_pdu_sn);
|
||||
|
||||
if (rlc_pP->nb_bytes_requested_by_mac > 4) {
|
||||
#if MESSAGE_CHART_GENERATOR_RLC_MAC
|
||||
MSC_LOG_EVENT((ctxt_pP->enb_flag == ENB_FLAG_YES) ? MSC_RLC_ENB:MSC_RLC_UE,\
|
||||
"0 "PROTOCOL_RLC_AM_MSC_FMT" RTX any pdu found SN %u (subseg)",\
|
||||
PROTOCOL_RLC_AM_MSC_ARGS(ctxt_pP,rlc_pP), found_pdu_sn);
|
||||
#endif
|
||||
rlc_am_nack_pdu (ctxt_pP, rlc_pP, found_pdu_sn, 0, 0x7FFF);
|
||||
pdu_p = rlc_am_retransmit_get_subsegment(ctxt_pP, rlc_pP, found_pdu_sn, &rlc_pP->nb_bytes_requested_by_mac);
|
||||
pdu_sn_10_p = (rlc_am_pdu_sn_10_t*) (&pdu_p->data[sizeof(struct mac_tb_req)]);
|
||||
rlc_am_pdu_polling(ctxt_pP, rlc_pP, pdu_sn_10_p, rlc_pP->tx_data_pdu_buffer[found_pdu_sn].header_and_payload_size,false);
|
||||
pdu_sn_10_p->b1 = pdu_sn_10_p->b1 | 0x20;
|
||||
rlc_pP->c_pdu_without_poll = 0;
|
||||
rlc_pP->c_byte_without_poll = 0;
|
||||
//rlc_pP->poll_sn = (rlc_pP->vt_s -1) & RLC_AM_SN_MASK;
|
||||
rlc_pP->stat_tx_data_pdu += 1;
|
||||
rlc_pP->stat_tx_retransmit_pdu += 1;
|
||||
rlc_pP->stat_tx_data_bytes += ((struct mac_tb_req*)(pdu_p->data))->tb_size;
|
||||
rlc_pP->stat_tx_retransmit_bytes += ((struct mac_tb_req*)(pdu_p->data))->tb_size;
|
||||
list_add_tail_eurecom (pdu_p, &rlc_pP->pdus_to_mac_layer);
|
||||
return;
|
||||
} else {
|
||||
LOG_D(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[FORCE-TRAFFIC] ... BUT NOT ENOUGH BYTES ALLOWED BY MAC %0d\n",
|
||||
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
||||
rlc_pP->nb_bytes_requested_by_mac);
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -35,21 +35,6 @@
|
||||
# ifndef __RLC_AM_RETRANSMIT_H__
|
||||
# define __RLC_AM_RETRANSMIT_H__
|
||||
//-----------------------------------------------------------------------------
|
||||
# ifdef RLC_AM_RETRANSMIT_C
|
||||
# define private_rlc_am_retransmit(x) x
|
||||
# define protected_rlc_am_retransmit(x) x
|
||||
# define public_rlc_am_retransmit(x) x
|
||||
# else
|
||||
# ifdef RLC_AM_MODULE
|
||||
# define private_rlc_am_retransmit(x)
|
||||
# define protected_rlc_am_retransmit(x) extern x
|
||||
# define public_rlc_am_retransmit(x) extern x
|
||||
# else
|
||||
# define private_rlc_am_retransmit(x)
|
||||
# define protected_rlc_am_retransmit(x)
|
||||
# define public_rlc_am_retransmit(x) extern x
|
||||
# endif
|
||||
# endif
|
||||
/*! \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)
|
||||
* \brief The RLC AM PDU which have the sequence number snP is marked NACKed with segment offset fields.
|
||||
* \param[in] ctxtP Running context.
|
||||
@@ -61,13 +46,13 @@
|
||||
* \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.
|
||||
*/
|
||||
protected_rlc_am_retransmit(boolean_t rlc_am_nack_pdu (
|
||||
boolean_t rlc_am_nack_pdu (
|
||||
const protocol_ctxt_t* const ctxt_pP,
|
||||
rlc_am_entity_t *const rlcP,
|
||||
const rlc_sn_t snP,
|
||||
const rlc_sn_t prev_nack_snP,
|
||||
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)
|
||||
* \brief The RLC AM PDU which have the sequence number snP is marked ACKed.
|
||||
@@ -77,11 +62,11 @@ protected_rlc_am_retransmit(boolean_t rlc_am_nack_pdu (
|
||||
* \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.
|
||||
*/
|
||||
protected_rlc_am_retransmit(void rlc_am_ack_pdu (
|
||||
void rlc_am_ack_pdu (
|
||||
const protocol_ctxt_t* const ctxt_pP,
|
||||
rlc_am_entity_t *const rlcP,
|
||||
const rlc_sn_t snP,
|
||||
boolean_t 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)
|
||||
* \brief The RLC AM PDU which have the sequence number snP is marked ACKed.
|
||||
@@ -90,12 +75,10 @@ protected_rlc_am_retransmit(void rlc_am_ack_pdu (
|
||||
* \param[in] snP Sequence number of the PDU to be copied.
|
||||
* \return A copy of the PDU having sequence number equal to parameter snP.
|
||||
*/
|
||||
protected_rlc_am_retransmit(mem_block_t* rlc_am_retransmit_get_copy (
|
||||
mem_block_t* rlc_am_retransmit_get_copy (
|
||||
const protocol_ctxt_t* const ctxt_pP,
|
||||
rlc_am_entity_t *const rlcP,
|
||||
const rlc_sn_t snP));
|
||||
|
||||
#if 0
|
||||
const rlc_sn_t snP);
|
||||
/*! \fn mem_block_t* rlc_am_retransmit_get_subsegment (const protocol_ctxt_t* const ctxt_pP,rlc_am_entity_t *rlcP,rlc_sn_t snP, sdu_size_t *sizeP)
|
||||
* \brief The RLC AM PDU which have the sequence number snP is marked ACKed.
|
||||
* \param[in] ctxtP Running context.
|
||||
@@ -104,32 +87,29 @@ protected_rlc_am_retransmit(mem_block_t* rlc_am_retransmit_get_copy (
|
||||
* \param[in,out] sizeP Maximum size allowed for the subsegment, it is updated with the amount of bytes not used (sizeP[out] = sizeP[in] - size of segment).
|
||||
* \return A copy of a segment of the PDU having sequence number equal to parameter snP.
|
||||
*/
|
||||
protected_rlc_am_retransmit(mem_block_t* rlc_am_retransmit_get_subsegment (
|
||||
mem_block_t* rlc_am_retransmit_get_subsegment (
|
||||
const protocol_ctxt_t* const ctxt_pP,
|
||||
rlc_am_entity_t *const rlcP,
|
||||
const rlc_sn_t snP,
|
||||
sdu_size_t *const sizeP));
|
||||
#endif
|
||||
|
||||
sdu_size_t *const sizeP);
|
||||
/*! \fn mem_block_t* rlc_am_get_pdu_to_retransmit(const protocol_ctxt_t* const ctxt_pP, rlc_am_entity_t* rlcP)
|
||||
* \brief Find a PDU or PDU segment to retransmit.
|
||||
* \param[in] ctxtP Running context.
|
||||
* \param[in] rlcP RLC AM protocol instance pointer.
|
||||
* \return A copy of the retransmitted PDU or PDU segment or NULL if TBS was not big enough
|
||||
*/
|
||||
protected_rlc_am_retransmit(mem_block_t* rlc_am_get_pdu_to_retransmit(
|
||||
mem_block_t* rlc_am_get_pdu_to_retransmit(
|
||||
const protocol_ctxt_t* const ctxt_pP,
|
||||
rlc_am_entity_t* const rlcP);)
|
||||
#if 0
|
||||
|
||||
rlc_am_entity_t* const rlcP);
|
||||
/*! \fn void rlc_am_retransmit_any_pdu(const protocol_ctxt_t* const ctxt_pP, rlc_am_entity_t* rlcP)
|
||||
* \brief Retransmit any PDU in order to unblock peer entity, if no suitable PDU is found (depending on requested MAC size) to be retransmitted, then try to retransmit a subsegment of any PDU.
|
||||
* \param[in] ctxtP Running context.
|
||||
* \param[in] rlcP RLC AM protocol instance pointer.
|
||||
*/
|
||||
protected_rlc_am_retransmit(void rlc_am_retransmit_any_pdu(
|
||||
void rlc_am_retransmit_any_pdu(
|
||||
const protocol_ctxt_t* const ctxt_pP,
|
||||
rlc_am_entity_t* const rlcP);)
|
||||
#endif
|
||||
rlc_am_entity_t* const rlcP);
|
||||
|
||||
/*! \fn void rlc_am_tx_buffer_display (const protocol_ctxt_t* const ctxt_pP,rlc_am_entity_t* rlcP, char* message_pP)
|
||||
* \brief Display the dump of the retransmission buffer.
|
||||
@@ -137,9 +117,9 @@ protected_rlc_am_retransmit(void rlc_am_retransmit_any_pdu(
|
||||
* \param[in] rlcP RLC AM protocol instance pointer.
|
||||
* \param[in] message_pP Message to be displayed along with the display of the dump of the retransmission buffer.
|
||||
*/
|
||||
protected_rlc_am_retransmit(void rlc_am_tx_buffer_display (
|
||||
void rlc_am_tx_buffer_display (
|
||||
const protocol_ctxt_t* const ctxt_pP,
|
||||
rlc_am_entity_t* const rlcP,
|
||||
char* const message_pP);)
|
||||
char* const message_pP);
|
||||
/** @} */
|
||||
# endif
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
#include "list.h"
|
||||
#include "rlc_am.h"
|
||||
#include "LAYER2/MAC/mac_extern.h"
|
||||
#include "UTIL/LOG/log.h"
|
||||
#include "common/utils/LOG/log.h"
|
||||
|
||||
|
||||
boolean_t rlc_am_rx_check_vr_reassemble(
|
||||
@@ -53,8 +53,17 @@ boolean_t rlc_am_rx_check_vr_reassemble(
|
||||
if (pdu_info_p->rf) {
|
||||
pdu_cursor_mgnt_p = (rlc_am_rx_pdu_management_t *) (cursor_p->data);
|
||||
next_waited_so = 0;
|
||||
//Assertion(eNB)_PRAN_DesignDocument_annex No.785
|
||||
if(pdu_cursor_mgnt_p->all_segments_received <= 0)
|
||||
{
|
||||
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);
|
||||
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",
|
||||
sn_ref,rlc_pP->vr_r,rlc_pP->channel_id);
|
||||
*/
|
||||
while ((cursor_p != NULL) && (pdu_info_p->sn == sn_ref) && (pdu_info_p->so == next_waited_so)) {
|
||||
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;
|
||||
@@ -80,8 +89,17 @@ boolean_t rlc_am_rx_check_vr_reassemble(
|
||||
if ((cursor_p != NULL) && (pdu_info_p->sn == rlc_pP->vr_r)) {
|
||||
pdu_cursor_mgnt_p = (rlc_am_rx_pdu_management_t *) (cursor_p->data);
|
||||
next_waited_so = 0;
|
||||
//Assertion(eNB)_PRAN_DesignDocument_annex No.786
|
||||
if(pdu_cursor_mgnt_p->all_segments_received != 0)
|
||||
{
|
||||
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);
|
||||
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",
|
||||
rlc_pP->vr_r,sn_ref,rlc_pP->channel_id);
|
||||
*/
|
||||
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) {
|
||||
pdu_cursor_mgnt_p->segment_reassembled = RLC_AM_RX_PDU_SEGMENT_REASSEMBLE_PENDING;
|
||||
@@ -100,8 +118,17 @@ boolean_t rlc_am_rx_check_vr_reassemble(
|
||||
|
||||
pdu_cursor_mgnt_p = (rlc_am_rx_pdu_management_t *) (cursor_p->data);
|
||||
next_waited_so = 0;
|
||||
//Assertion(eNB)_PRAN_DesignDocument_annex No.787
|
||||
if(pdu_cursor_mgnt_p->all_segments_received != 0)
|
||||
{
|
||||
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);
|
||||
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",
|
||||
rlc_pP->vr_r,rlc_pP->channel_id);
|
||||
*/
|
||||
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) {
|
||||
pdu_cursor_mgnt_p->segment_reassembled = RLC_AM_RX_PDU_SEGMENT_REASSEMBLE_PENDING;
|
||||
@@ -333,8 +360,15 @@ rlc_am_rx_pdu_status_t rlc_am_rx_list_handle_pdu_segment(
|
||||
/*****************************************************/
|
||||
// 1) Find previous cursor to the PDU to insert
|
||||
/*****************************************************/
|
||||
//Assertion(eNB)_PRAN_DesignDocument_annex No.791
|
||||
if(cursor_p == NULL)
|
||||
{
|
||||
LOG_E(RLC, "AM Rx PDU Error, received buffer empty LcID=%d\n",rlc_pP->channel_id);
|
||||
return RLC_AM_DATA_PDU_STATUS_HEADER_ERROR;
|
||||
}
|
||||
/*
|
||||
AssertFatal(cursor_p != NULL,"AM Rx PDU Error, received buffer empty LcID=%d\n",rlc_pP->channel_id);
|
||||
|
||||
*/
|
||||
do {
|
||||
pdu_info_cursor_p = &((rlc_am_rx_pdu_management_t*)(cursor_p->data))->pdu_info;
|
||||
|
||||
@@ -483,11 +517,20 @@ rlc_am_rx_pdu_status_t rlc_am_rx_list_handle_pdu_segment(
|
||||
}
|
||||
}
|
||||
|
||||
//Assertion(eNB)_PRAN_DesignDocument_annex No.792
|
||||
if((so_start_segment > so_end_segment) || (pdu_rx_info_p->so > so_start_segment) ||
|
||||
(so_end_segment > pdu_rx_info_p->so + pdu_rx_info_p->payload_size - 1))
|
||||
{
|
||||
LOG_E(RLC, " AM RX PDU Segment Duplicate elimination error FirstSO=0 OldSOStart=%d OldSOEnd=%d newSOStart=%d newSOEnd =%d SN=%d\n",
|
||||
pdu_rx_info_p->so,pdu_rx_info_p->so + pdu_rx_info_p->payload_size - 1,so_start_segment,so_end_segment,pdu_rx_info_p->sn);
|
||||
return RLC_AM_DATA_PDU_STATUS_AM_SEGMENT_DUPLICATE;
|
||||
}
|
||||
/*
|
||||
AssertFatal((so_start_segment <= so_end_segment) && (pdu_rx_info_p->so <= so_start_segment) &&
|
||||
(so_end_segment <= pdu_rx_info_p->so + pdu_rx_info_p->payload_size - 1),
|
||||
" AM RX PDU Segment Duplicate elimination error FirstSO=0 OldSOStart=%d OldSOEnd=%d newSOStart=%d newSOEnd =%d SN=%d\n",
|
||||
pdu_rx_info_p->so,pdu_rx_info_p->so + pdu_rx_info_p->payload_size - 1,so_start_segment,so_end_segment,pdu_rx_info_p->sn);
|
||||
|
||||
*/
|
||||
} // end pdu_info_cursor_p->so == 0
|
||||
else {
|
||||
// Handle most likely case : PDU Segment without duplicate is inserted before first stored PDU segment
|
||||
@@ -527,12 +570,20 @@ rlc_am_rx_pdu_status_t rlc_am_rx_list_handle_pdu_segment(
|
||||
so_end_segment = pdu_info_cursor_p->so - 1;
|
||||
}
|
||||
}
|
||||
|
||||
//Assertion(eNB)_PRAN_DesignDocument_annex No.793
|
||||
if((so_start_segment > so_end_segment) ||
|
||||
(so_end_segment > pdu_rx_info_p->so + pdu_rx_info_p->payload_size - 1))
|
||||
{
|
||||
LOG_E(RLC, " AM RX PDU Segment Duplicate elimination at the end error FirstSO!=0 SOStart=%d OldSOEnd=%d newSOEnd =%d SN=%d\n",
|
||||
pdu_rx_info_p->so,pdu_rx_info_p->so + pdu_rx_info_p->payload_size - 1,so_end_segment,pdu_rx_info_p->sn);
|
||||
return RLC_AM_DATA_PDU_STATUS_AM_SEGMENT_DUPLICATE;
|
||||
}
|
||||
/*
|
||||
AssertFatal((so_start_segment <= so_end_segment) &&
|
||||
(so_end_segment <= pdu_rx_info_p->so + pdu_rx_info_p->payload_size - 1),
|
||||
" AM RX PDU Segment Duplicate elimination at the end error FirstSO!=0 SOStart=%d OldSOEnd=%d newSOEnd =%d SN=%d\n",
|
||||
pdu_rx_info_p->so,pdu_rx_info_p->so + pdu_rx_info_p->payload_size - 1,so_end_segment,pdu_rx_info_p->sn);
|
||||
|
||||
*/
|
||||
}
|
||||
else {
|
||||
// Second Case: Duplicate at the begining and potentially at the end
|
||||
@@ -618,21 +669,38 @@ rlc_am_rx_pdu_status_t rlc_am_rx_list_handle_pdu_segment(
|
||||
so_end_segment = pdu_info_cursor_p->so - 1;
|
||||
}
|
||||
}
|
||||
|
||||
//Assertion(eNB)_PRAN_DesignDocument_annex No.794
|
||||
if((so_start_segment > so_end_segment) || (pdu_rx_info_p->so > so_start_segment) ||
|
||||
(so_end_segment > pdu_rx_info_p->so + pdu_rx_info_p->payload_size - 1))
|
||||
{
|
||||
LOG_E(RLC, " AM RX PDU Segment Duplicate elimination error FirstSO!=0 OldSOStart=%d OldSOEnd=%d newSOStart=%d newSOEnd =%d SN=%d\n",
|
||||
pdu_rx_info_p->so,pdu_rx_info_p->so + pdu_rx_info_p->payload_size - 1,so_start_segment,so_end_segment,pdu_rx_info_p->sn);
|
||||
return RLC_AM_DATA_PDU_STATUS_AM_SEGMENT_DUPLICATE;
|
||||
}
|
||||
/*
|
||||
AssertFatal((so_start_segment <= so_end_segment) && (pdu_rx_info_p->so <= so_start_segment) &&
|
||||
(so_end_segment <= pdu_rx_info_p->so + pdu_rx_info_p->payload_size - 1),
|
||||
" AM RX PDU Segment Duplicate elimination error FirstSO!=0 OldSOStart=%d OldSOEnd=%d newSOStart=%d newSOEnd =%d SN=%d\n",
|
||||
pdu_rx_info_p->so,pdu_rx_info_p->so + pdu_rx_info_p->payload_size - 1,so_start_segment,so_end_segment,pdu_rx_info_p->sn);
|
||||
*/
|
||||
}
|
||||
|
||||
} // end pdu_info_cursor_p->so != 0
|
||||
|
||||
|
||||
/* Last step : duplicate bytes had been removed, build a new PDU segment */
|
||||
//Assertion(eNB)_PRAN_DesignDocument_annex No.795
|
||||
if((pdu_rx_info_p->so == so_start_segment) && (so_end_segment == pdu_rx_info_p->so + pdu_rx_info_p->payload_size - 1))
|
||||
{
|
||||
LOG_E(RLC, " AM RX PDU Segment Duplicate elimination error FirstSO!=0 OldSOStart=%d OldSOEnd=%d newSOStart=%d newSOEnd =%d SN=%d\n",
|
||||
pdu_rx_info_p->so,pdu_rx_info_p->so + pdu_rx_info_p->payload_size - 1,so_start_segment,so_end_segment,pdu_rx_info_p->sn);
|
||||
return RLC_AM_DATA_PDU_STATUS_AM_SEGMENT_DUPLICATE;
|
||||
}
|
||||
/*
|
||||
AssertFatal((pdu_rx_info_p->so != so_start_segment) || (so_end_segment != pdu_rx_info_p->so + pdu_rx_info_p->payload_size - 1),
|
||||
" AM RX PDU Segment Duplicate elimination error FirstSO!=0 OldSOStart=%d OldSOEnd=%d newSOStart=%d newSOEnd =%d SN=%d\n",
|
||||
pdu_rx_info_p->so,pdu_rx_info_p->so + pdu_rx_info_p->payload_size - 1,so_start_segment,so_end_segment,pdu_rx_info_p->sn);
|
||||
|
||||
*/
|
||||
mem_block_t* trunc_segment = create_new_segment_from_pdu(tb_pP,so_start_segment - pdu_rx_info_p->so,so_end_segment - so_start_segment + 1);
|
||||
if (trunc_segment != NULL) {
|
||||
LOG_I(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[PROCESS RX PDU SEGMENT] CREATE SEGMENT FROM SEGMENT OFFSET=%d DATA LENGTH=%d SN=%d\n",
|
||||
@@ -672,8 +740,15 @@ rlc_am_rx_pdu_status_t rlc_am_rx_list_handle_pdu(
|
||||
/*****************************************************/
|
||||
// 1) Find previous cursor to the PDU to insert
|
||||
/*****************************************************/
|
||||
//Assertion(eNB)_PRAN_DesignDocument_annex No.788
|
||||
if(cursor_p == NULL)
|
||||
{
|
||||
LOG_E(RLC, "AM Rx PDU Error, received buffer empty LcID=%d\n",rlc_pP->channel_id);
|
||||
return RLC_AM_DATA_PDU_STATUS_HEADER_ERROR;
|
||||
}
|
||||
/*
|
||||
AssertFatal(cursor_p != NULL,"AM Rx PDU Error, received buffer empty LcID=%d\n",rlc_pP->channel_id);
|
||||
|
||||
*/
|
||||
do {
|
||||
pdu_info_cursor_p = &((rlc_am_rx_pdu_management_t*)(cursor_p->data))->pdu_info;
|
||||
|
||||
@@ -749,9 +824,25 @@ rlc_am_rx_pdu_status_t rlc_am_rx_list_handle_pdu(
|
||||
else {
|
||||
/* First update cursor until discontinuity */
|
||||
previous_cursor_p = cursor_p;
|
||||
//Assertion(eNB)_PRAN_DesignDocument_annex No.789
|
||||
if(pdu_info_cursor_p->rf == 0)
|
||||
{
|
||||
LOG_E(RLC, "AM Rx PDU Error, stored SN=%d should be a PDU segment\n",pdu_info_cursor_p->sn);
|
||||
return RLC_AM_DATA_PDU_STATUS_HEADER_ERROR;
|
||||
}
|
||||
/*
|
||||
AssertFatal(pdu_info_cursor_p->rf != 0,"AM Rx PDU Error, stored SN=%d should be a PDU segment\n",pdu_info_cursor_p->sn);
|
||||
*/
|
||||
//Assertion(eNB)_PRAN_DesignDocument_annex No.790
|
||||
if(((rlc_am_rx_pdu_management_t *) (cursor_p->data))->all_segments_received != 0)
|
||||
{
|
||||
LOG_E(RLC, "AM Rx PDU Error, stored SN=%d already fully received\n",pdu_info_cursor_p->sn);
|
||||
return RLC_AM_DATA_PDU_STATUS_SN_DUPLICATE;
|
||||
}
|
||||
/*
|
||||
AssertFatal(((rlc_am_rx_pdu_management_t *) (cursor_p->data))->all_segments_received == 0,
|
||||
"AM Rx PDU Error, stored SN=%d already fully received\n",pdu_info_cursor_p->sn);
|
||||
*/
|
||||
sdu_size_t next_waited_so = 0;
|
||||
while ((cursor_p != NULL) && (pdu_info_cursor_p->sn == pdu_rx_info_p->sn) && (pdu_info_cursor_p->so == next_waited_so)) {
|
||||
next_waited_so += pdu_info_cursor_p->payload_size;
|
||||
@@ -836,459 +927,6 @@ rlc_am_rx_list_check_duplicate_insert_pdu(
|
||||
|
||||
return pdu_status;
|
||||
}
|
||||
#if 0
|
||||
// returns 0 if success
|
||||
// returns neg value if failure
|
||||
//-----------------------------------------------------------------------------
|
||||
signed int
|
||||
rlc_am_rx_list_insert_pdu(
|
||||
const protocol_ctxt_t* const ctxt_pP,
|
||||
rlc_am_entity_t* const rlc_pP,
|
||||
mem_block_t* const tb_pP)
|
||||
{
|
||||
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_cursor_p = NULL;
|
||||
rlc_am_pdu_info_t* pdu_info_previous_cursor_p = NULL;
|
||||
mem_block_t* cursor_p = NULL;
|
||||
mem_block_t* previous_cursor_p = NULL;
|
||||
cursor_p = rlc_pP->receiver_buffer.head;
|
||||
// it is assumed this pdu is in rx window
|
||||
|
||||
//TODO : check for duplicate
|
||||
// should be rewrite
|
||||
/* look for previous SN */
|
||||
|
||||
if (cursor_p) {
|
||||
if (rlc_pP->vr_mr < rlc_pP->vr_r) {
|
||||
if (pdu_info_p->sn >= rlc_pP->vr_r) {
|
||||
pdu_info_cursor_p = &((rlc_am_rx_pdu_management_t*)(cursor_p->data))->pdu_info;
|
||||
|
||||
while ((cursor_p != NULL) && (pdu_info_cursor_p->sn >= rlc_pP->vr_r)) { // LG added =
|
||||
if (pdu_info_p->sn < pdu_info_cursor_p->sn) {
|
||||
if (previous_cursor_p != NULL) {
|
||||
pdu_info_previous_cursor_p = &((rlc_am_rx_pdu_management_t*)(previous_cursor_p->data))->pdu_info;
|
||||
|
||||
if (pdu_info_previous_cursor_p->sn == pdu_info_p->sn) {
|
||||
if (pdu_info_p->rf != pdu_info_previous_cursor_p->rf) {
|
||||
LOG_N(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[INSERT PDU] LINE %d RX PDU SN %04d WRONG RF -> DROPPED (vr(mr) < vr(r) and sn >= vr(r))\n",
|
||||
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
||||
__LINE__,
|
||||
pdu_info_p->sn);
|
||||
return -2;
|
||||
} else if (pdu_info_p->rf == 1) {
|
||||
if ((pdu_info_previous_cursor_p->so + pdu_info_previous_cursor_p->payload_size - 1) >= pdu_info_p->so) {
|
||||
LOG_N(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[INSERT PDU] LINE %d RX PDU SN %04d SO OVERLAP -> DROPPED (vr(mr) < vr(r) and sn >= vr(r))\n",
|
||||
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
||||
__LINE__,
|
||||
pdu_info_p->sn);
|
||||
return -2;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
LOG_D(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[INSERT PDU] LINE %d RX PDU SN %04d (vr(mr) > vr(r))\n",
|
||||
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
||||
__LINE__,
|
||||
pdu_info_p->sn);
|
||||
list2_insert_before_element(tb_pP, cursor_p, &rlc_pP->receiver_buffer);
|
||||
return 0;
|
||||
|
||||
} else if (pdu_info_p->sn == pdu_info_cursor_p->sn) {
|
||||
if (pdu_info_cursor_p->rf == 0) {
|
||||
LOG_N(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[INSERT PDU] LINE %d RX PDU SN %04d DUPLICATE -> DROPPED\n",
|
||||
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
||||
__LINE__,
|
||||
pdu_info_p->sn);
|
||||
return -2;
|
||||
} else if (pdu_info_p->rf == 1) {
|
||||
if ((pdu_info_p->so + pdu_info_p->payload_size - 1) < pdu_info_cursor_p->so) {
|
||||
|
||||
if (previous_cursor_p != NULL) {
|
||||
pdu_info_previous_cursor_p = &((rlc_am_rx_pdu_management_t*)(previous_cursor_p->data))->pdu_info;
|
||||
|
||||
if (pdu_info_previous_cursor_p->sn == pdu_info_cursor_p->sn) {
|
||||
if ((pdu_info_previous_cursor_p->so + pdu_info_previous_cursor_p->payload_size - 1) < pdu_info_p->so) {
|
||||
|
||||
LOG_D(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[INSERT PDU] LINE %d RX PDU SN %04d SEGMENT OFFSET %05d (vr(mr) < vr(r) and sn >= vr(r))\n",
|
||||
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
||||
__LINE__,
|
||||
pdu_info_p->sn,
|
||||
pdu_info_p->so);
|
||||
list2_insert_before_element(tb_pP, cursor_p, &rlc_pP->receiver_buffer);
|
||||
return 0;
|
||||
} else {
|
||||
LOG_N(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[INSERT PDU] LINE %d RX PDU SN %04d OVERLAP PREVIOUS SO DUPLICATE -> DROPPED\n",
|
||||
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
||||
__LINE__,
|
||||
pdu_info_p->sn);
|
||||
return -2;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
LOG_D(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[INSERT PDU] LINE %d RX PDU SN %04d SEGMENT OFFSET %05d (vr(mr) < vr(r) and sn >= vr(r))\n",
|
||||
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
||||
__LINE__,
|
||||
pdu_info_p->sn,
|
||||
pdu_info_p->so);
|
||||
list2_insert_before_element(tb_pP, cursor_p, &rlc_pP->receiver_buffer);
|
||||
return 0;
|
||||
|
||||
} else if (pdu_info_p->so <= pdu_info_cursor_p->so) {
|
||||
LOG_N(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[INSERT PDU] LINE %d RX PDU SN %04d OVERLAP SO DUPLICATE -> DROPPED\n",
|
||||
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
||||
__LINE__,
|
||||
pdu_info_p->sn);
|
||||
return -2;
|
||||
}
|
||||
} else {
|
||||
LOG_N(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[INSERT PDU] LINE %d RX PDU SN %04d DROPPED\n",
|
||||
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
||||
__LINE__,
|
||||
pdu_info_p->sn);
|
||||
return -2;
|
||||
}
|
||||
}
|
||||
|
||||
previous_cursor_p = cursor_p;
|
||||
cursor_p = cursor_p->next;
|
||||
|
||||
if (cursor_p != NULL) {
|
||||
pdu_info_cursor_p = &((rlc_am_rx_pdu_management_t*)(cursor_p->data))->pdu_info;
|
||||
}
|
||||
}
|
||||
|
||||
if (cursor_p != NULL) {
|
||||
LOG_D(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[INSERT PDU] LINE %d RX PDU SN %04d (vr(mr) < vr(r) and sn >= vr(r))\n",
|
||||
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
||||
__LINE__,
|
||||
pdu_info_p->sn);
|
||||
list2_insert_before_element(tb_pP, cursor_p, &rlc_pP->receiver_buffer);
|
||||
return 0;
|
||||
} else {
|
||||
if (pdu_info_cursor_p->rf == 0) {
|
||||
LOG_D(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[INSERT PDU] LINE %d RX PDU SN %04d (vr(mr) < vr(r) and vr(h) > vr(r) and sn >= vr(r))\n",
|
||||
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
||||
__LINE__,
|
||||
pdu_info_p->sn);
|
||||
list2_add_tail(tb_pP, &rlc_pP->receiver_buffer);
|
||||
return 0;
|
||||
} else if ((pdu_info_p->rf == 1) && (pdu_info_cursor_p->rf == 1) && (pdu_info_p->sn == pdu_info_cursor_p->sn)) {
|
||||
if ((pdu_info_cursor_p->so + pdu_info_cursor_p->payload_size - 1) < pdu_info_p->so) {
|
||||
LOG_D(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[INSERT PDU] LINE %d RX PDU SN %04d (vr(mr) < vr(r) and vr(h) > vr(r) and sn >= vr(r))\n",
|
||||
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
||||
__LINE__,
|
||||
pdu_info_p->sn);
|
||||
list2_add_tail(tb_pP, &rlc_pP->receiver_buffer);
|
||||
return 0;
|
||||
} else {
|
||||
LOG_N(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[INSERT PDU] LINE %d RX PDU SN %04d DROPPED\n",
|
||||
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
||||
__LINE__,
|
||||
pdu_info_p->sn);
|
||||
return -2;
|
||||
}
|
||||
} else if (pdu_info_p->sn != pdu_info_cursor_p->sn) {
|
||||
LOG_D(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[INSERT PDU] LINE %d RX PDU SN %04d (vr(mr) < vr(r) and vr(h) > vr(r) and sn >= vr(r))\n",
|
||||
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
||||
__LINE__,
|
||||
pdu_info_p->sn);
|
||||
list2_add_tail(tb_pP, &rlc_pP->receiver_buffer);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
LOG_N(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[INSERT PDU] LINE %d RX PDU SN %04d DROPPED\n",
|
||||
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
||||
__LINE__,
|
||||
pdu_info_p->sn);
|
||||
return -2;
|
||||
} else { // (pdu_info_p->sn < rlc_pP->vr_r)
|
||||
cursor_p = rlc_pP->receiver_buffer.tail;
|
||||
pdu_info_cursor_p = &((rlc_am_rx_pdu_management_t*)(cursor_p->data))->pdu_info;
|
||||
|
||||
while ((cursor_p != NULL) && (pdu_info_cursor_p->sn < rlc_pP->vr_r)) {
|
||||
//pdu_info_cursor_p = &((rlc_am_rx_pdu_management_t*)(cursor_p->data))->pdu_info;
|
||||
if (pdu_info_p->sn > pdu_info_cursor_p->sn) {
|
||||
if (previous_cursor_p != NULL) {
|
||||
pdu_info_previous_cursor_p = &((rlc_am_rx_pdu_management_t*)(previous_cursor_p->data))->pdu_info;
|
||||
|
||||
if (pdu_info_previous_cursor_p->sn == pdu_info_cursor_p->sn) {
|
||||
if (pdu_info_p->rf != pdu_info_previous_cursor_p->rf) {
|
||||
LOG_N(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[INSERT PDU] LINE %d RX PDU SN %04d WRONG RF -> DROPPED (vr(mr) < vr(r) and sn >= vr(r))\n",
|
||||
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
||||
__LINE__, pdu_info_p->sn);
|
||||
return -2;
|
||||
} else if (pdu_info_p->rf == 1) {
|
||||
if ((pdu_info_p->so + pdu_info_p->payload_size - 1) >= pdu_info_previous_cursor_p->so) {
|
||||
LOG_N(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[INSERT PDU] LINE %d RX PDU SN %04d SO OVERLAP -> DROPPED (vr(mr) < vr(r) and sn >= vr(r))\n",
|
||||
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
||||
__LINE__,
|
||||
pdu_info_p->sn);
|
||||
return -2;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
LOG_D(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[INSERT PDU] LINE %d RX PDU SN %04d (vr(mr) < vr(r))\n",
|
||||
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
||||
__LINE__,
|
||||
pdu_info_p->sn);
|
||||
list2_insert_after_element(tb_pP, cursor_p, &rlc_pP->receiver_buffer);
|
||||
return 0;
|
||||
} else if (pdu_info_p->sn == pdu_info_cursor_p->sn) {
|
||||
if (pdu_info_cursor_p->rf == 0) {
|
||||
LOG_N(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[INSERT PDU] LINE %d RX PDU SN %04d DUPLICATE -> DROPPED\n",
|
||||
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
||||
__LINE__,
|
||||
pdu_info_p->sn);
|
||||
return -2;
|
||||
} else if (pdu_info_p->rf == 1) {
|
||||
if ((pdu_info_cursor_p->so + pdu_info_cursor_p->payload_size - 1) < pdu_info_p->so) {
|
||||
|
||||
if (previous_cursor_p != NULL) {
|
||||
pdu_info_previous_cursor_p = &((rlc_am_rx_pdu_management_t*)(previous_cursor_p->data))->pdu_info;
|
||||
|
||||
if (pdu_info_previous_cursor_p->sn == pdu_info_cursor_p->sn) {
|
||||
if ((pdu_info_p->so + pdu_info_p->payload_size - 1) < pdu_info_previous_cursor_p->so) {
|
||||
|
||||
LOG_D(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[INSERT PDU] LINE %d RX PDU SN %04d SEGMENT OFFSET %05d (vr(mr) < vr(r) and sn < vr(r))\n",
|
||||
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
||||
__LINE__,
|
||||
pdu_info_p->sn,
|
||||
pdu_info_p->so);
|
||||
list2_insert_after_element(tb_pP, cursor_p, &rlc_pP->receiver_buffer);
|
||||
return 0;
|
||||
} else {
|
||||
LOG_N(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[INSERT PDU] LINE %d RX PDU SN %04d OVERLAP PREVIOUS SO DUPLICATE -> DROPPED\n",
|
||||
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
||||
__LINE__,
|
||||
pdu_info_p->sn);
|
||||
return -2;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
LOG_D(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[INSERT PDU] LINE %d RX PDU SN %04d SEGMENT OFFSET %05d (vr(mr) < vr(r) and sn < vr(r))\n",
|
||||
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
||||
__LINE__,
|
||||
pdu_info_p->sn,
|
||||
pdu_info_p->so);
|
||||
list2_insert_after_element(tb_pP, cursor_p, &rlc_pP->receiver_buffer);
|
||||
return 0;
|
||||
|
||||
} else if (pdu_info_cursor_p->so <= pdu_info_p->so) {
|
||||
LOG_N(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[INSERT PDU] LINE %d RX PDU SN %04d OVERLAP SO DUPLICATE -> DROPPED\n",
|
||||
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
||||
__LINE__,
|
||||
pdu_info_p->sn);
|
||||
return -2;
|
||||
}
|
||||
} else {
|
||||
LOG_N(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[INSERT PDU] LINE %d RX PDU SN %04d DROPPED\n",
|
||||
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
||||
__LINE__,
|
||||
pdu_info_p->sn);
|
||||
return -2;
|
||||
}
|
||||
}
|
||||
|
||||
previous_cursor_p = cursor_p;
|
||||
cursor_p = cursor_p->previous;
|
||||
|
||||
if (cursor_p != NULL) {
|
||||
pdu_info_cursor_p = &((rlc_am_rx_pdu_management_t*)(cursor_p->data))->pdu_info;
|
||||
}
|
||||
}
|
||||
|
||||
if (cursor_p != NULL) {
|
||||
LOG_D(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[INSERT PDU] LINE %d RX PDU SN %04d (vr(mr) < vr(r) and sn < vr(r))\n",
|
||||
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
||||
__LINE__,
|
||||
pdu_info_p->sn);
|
||||
list2_insert_after_element(tb_pP, cursor_p, &rlc_pP->receiver_buffer);
|
||||
return 0;
|
||||
} else {
|
||||
if (pdu_info_cursor_p->rf == 0) {
|
||||
LOG_D(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[INSERT PDU] LINE %d RX PDU SN %04d (vr(mr) < vr(r) and vr(h) > vr(r) and sn >= vr(r))\n",
|
||||
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
||||
__LINE__,
|
||||
pdu_info_p->sn);
|
||||
list2_add_tail(tb_pP, &rlc_pP->receiver_buffer);
|
||||
return 0;
|
||||
} else if ((pdu_info_p->rf == 1) && (pdu_info_cursor_p->rf == 1) && (pdu_info_p->sn == pdu_info_cursor_p->sn)) {
|
||||
if ((pdu_info_cursor_p->so + pdu_info_cursor_p->payload_size - 1) < pdu_info_p->so) {
|
||||
LOG_D(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[INSERT PDU] LINE %d RX PDU SN %04d (vr(mr) < vr(r) and vr(h) > vr(r) and sn >= vr(r))\n",
|
||||
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
||||
__LINE__,
|
||||
pdu_info_p->sn);
|
||||
list2_add_tail(tb_pP, &rlc_pP->receiver_buffer);
|
||||
return 0;
|
||||
} else {
|
||||
LOG_N(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[INSERT PDU] LINE %d RX PDU SN %04d DROPPED\n",
|
||||
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
||||
__LINE__,
|
||||
pdu_info_p->sn);
|
||||
return -2;
|
||||
}
|
||||
} else if (pdu_info_p->sn != pdu_info_cursor_p->sn) {
|
||||
LOG_D(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[INSERT PDU] LINE %d RX PDU SN %04d (vr(mr) < vr(r) and vr(h) > vr(r) and sn >= vr(r))\n",
|
||||
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
||||
__LINE__,
|
||||
pdu_info_p->sn);
|
||||
list2_add_tail(tb_pP, &rlc_pP->receiver_buffer);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
LOG_N(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[INSERT PDU] LINE %d RX PDU SN %04d DROPPED\n",
|
||||
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
||||
__LINE__,
|
||||
pdu_info_p->sn);
|
||||
return -2;
|
||||
}
|
||||
} else { // (pdu_info_p->vr_mr > rlc_pP->vr_r), > and not >=
|
||||
// FAR MORE SIMPLE CASE
|
||||
while (cursor_p != NULL) {
|
||||
//msg ("[FRAME %05u][%s][RLC_AM][MOD %u/%u][RB %u][INSERT PDU] LINE %d cursor_p %p\n", ctxt_pP->frame, rlc_pP->module_id, rlc_pP->rb_id, __LINE__, cursor_p);
|
||||
pdu_info_cursor_p = &((rlc_am_rx_pdu_management_t*)(cursor_p->data))->pdu_info;
|
||||
|
||||
if (pdu_info_p->sn < pdu_info_cursor_p->sn) {
|
||||
|
||||
if (previous_cursor_p != NULL) {
|
||||
pdu_info_previous_cursor_p = &((rlc_am_rx_pdu_management_t*)(previous_cursor_p->data))->pdu_info;
|
||||
|
||||
if (pdu_info_previous_cursor_p->sn == pdu_info_p->sn) {
|
||||
if (pdu_info_p->rf != pdu_info_previous_cursor_p->rf) {
|
||||
LOG_N(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[INSERT PDU] LINE %d RX PDU SN %04d WRONG RF -> DROPPED (vr(mr) > vr(r))\n",
|
||||
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
||||
__LINE__,
|
||||
pdu_info_p->sn);
|
||||
return -2;
|
||||
} else if (pdu_info_p->rf == 1) {
|
||||
if ((pdu_info_previous_cursor_p->so + pdu_info_previous_cursor_p->payload_size - 1) >= pdu_info_p->so) {
|
||||
LOG_N(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[INSERT PDU] LINE %d RX PDU SN %04d SO OVERLAP -> DROPPED (vr(mr) > vr(r))\n",
|
||||
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
||||
__LINE__,
|
||||
pdu_info_p->sn);
|
||||
return -2;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
LOG_D(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[INSERT PDU] LINE %d RX PDU SN %04d (vr(mr) > vr(r))\n",
|
||||
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
||||
__LINE__,
|
||||
pdu_info_p->sn);
|
||||
list2_insert_before_element(tb_pP, cursor_p, &rlc_pP->receiver_buffer);
|
||||
return 0;
|
||||
|
||||
} else if (pdu_info_p->sn == pdu_info_cursor_p->sn) {
|
||||
if (pdu_info_cursor_p->rf == 0) {
|
||||
LOG_N(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[INSERT PDU] LINE %d RX PDU SN %04d WRONG RF -> DROPPED (vr(mr) > vr(r))\n",
|
||||
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
||||
__LINE__,
|
||||
pdu_info_p->sn);
|
||||
return -2;
|
||||
} else if (pdu_info_p->rf == 1) {
|
||||
|
||||
if ((pdu_info_p->so + pdu_info_p->payload_size - 1) < pdu_info_cursor_p->so) {
|
||||
|
||||
if (previous_cursor_p != NULL) {
|
||||
pdu_info_previous_cursor_p = &((rlc_am_rx_pdu_management_t*)(previous_cursor_p->data))->pdu_info;
|
||||
|
||||
if (pdu_info_previous_cursor_p->sn == pdu_info_cursor_p->sn) {
|
||||
if ((pdu_info_previous_cursor_p->so + pdu_info_previous_cursor_p->payload_size - 1) < pdu_info_p->so) {
|
||||
|
||||
LOG_D(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[INSERT PDU] LINE %d RX PDU SN %04d SEGMENT OFFSET %05d (vr(mr) > vr(r) and sn >= vr(r))\n",
|
||||
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
||||
__LINE__,
|
||||
pdu_info_p->sn,
|
||||
pdu_info_p->so);
|
||||
LOG_D(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[INSERT PDU] PREVIOUS SO %d PAYLOAD SIZE %d\n",
|
||||
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
||||
pdu_info_previous_cursor_p->so,
|
||||
pdu_info_previous_cursor_p->payload_size);
|
||||
list2_insert_before_element(tb_pP, cursor_p, &rlc_pP->receiver_buffer);
|
||||
return 0;
|
||||
} else {
|
||||
LOG_N(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[INSERT PDU] LINE %d RX PDU SN %04d OVERLAP PREVIOUS SO DUPLICATE -> DROPPED\n",
|
||||
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
||||
__LINE__,
|
||||
pdu_info_p->sn);
|
||||
return -2;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
LOG_D(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[INSERT PDU] LINE %d RX PDU SN %04d SEGMENT OFFSET %05d (vr(mr) > vr(r) and sn >= vr(r))\n",
|
||||
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
||||
__LINE__,
|
||||
pdu_info_p->sn,
|
||||
pdu_info_p->so);
|
||||
list2_insert_before_element(tb_pP, cursor_p, &rlc_pP->receiver_buffer);
|
||||
return 0;
|
||||
} else if (pdu_info_p->so <= pdu_info_cursor_p->so) {
|
||||
LOG_N(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[INSERT PDU] LINE %d RX PDU SN %04d OVERLAP SO DUPLICATE -> DROPPED\n",
|
||||
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
||||
__LINE__,
|
||||
pdu_info_p->sn);
|
||||
return -2;
|
||||
}
|
||||
} else {
|
||||
LOG_N(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[INSERT PDU] LINE %d RX PDU SN %04d DROPPED\n",
|
||||
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
||||
__LINE__,
|
||||
pdu_info_p->sn);
|
||||
return -2;
|
||||
}
|
||||
}
|
||||
|
||||
previous_cursor_p = cursor_p;
|
||||
cursor_p = cursor_p->next;
|
||||
}
|
||||
|
||||
LOG_D(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[INSERT PDU] LINE %d RX PDU SN %04d (vr(mr) > vr(r))(last inserted)\n",
|
||||
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
||||
__LINE__,
|
||||
pdu_info_p->sn);
|
||||
|
||||
// pdu_info_cursor_p can not be NULL here
|
||||
if (pdu_info_p->sn == pdu_info_cursor_p->sn) {
|
||||
if ((pdu_info_cursor_p->so + pdu_info_cursor_p->payload_size - 1) < pdu_info_p->so) {
|
||||
list2_add_tail(tb_pP, &rlc_pP->receiver_buffer);
|
||||
return 0;
|
||||
} else {
|
||||
LOG_N(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[INSERT PDU] LINE %d RX PDU SN %04d OVERLAP SO DUPLICATE -> DROPPED\n",
|
||||
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
||||
__LINE__,
|
||||
pdu_info_p->sn);
|
||||
return -2;
|
||||
}
|
||||
} else {
|
||||
list2_add_tail(tb_pP, &rlc_pP->receiver_buffer);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
LOG_D(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[INSERT PDU] LINE %d RX PDU SN %04d (only inserted)\n",
|
||||
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
||||
__LINE__,
|
||||
pdu_info_p->sn);
|
||||
list2_add_head(tb_pP, &rlc_pP->receiver_buffer);
|
||||
return 0;
|
||||
}
|
||||
|
||||
LOG_N(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[INSERT PDU] LINE %d RX PDU SN %04d DROPPED @4\n",
|
||||
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
||||
__LINE__,
|
||||
pdu_info_p->sn);
|
||||
return -1;
|
||||
}
|
||||
#endif
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
void
|
||||
@@ -1558,7 +1196,8 @@ list2_insert_before_element (
|
||||
|
||||
return element_to_insert_pP;
|
||||
} else {
|
||||
assert(2==1);
|
||||
//assert(2==1);
|
||||
LOG_E(RLC, "list2_insert_before_element error. element_to_insert_pP %p, element_pP %p\n", element_to_insert_pP,element_pP);
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
@@ -1585,7 +1224,8 @@ list2_insert_after_element (
|
||||
|
||||
return element_to_insert_pP;
|
||||
} else {
|
||||
assert(2==1);
|
||||
//assert(2==1);
|
||||
LOG_E(RLC, "list2_insert_after_element error. element_to_insert_pP %p, element_pP %p\n", element_to_insert_pP,element_pP);
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
@@ -1635,7 +1275,12 @@ rlc_am_rx_list_display (
|
||||
//if (cursor_p == cursor_p->next) {
|
||||
// rlc_am_v9_3_0_test_print_trace();
|
||||
//}
|
||||
assert(cursor_p != cursor_p->next);
|
||||
//assert(cursor_p != cursor_p->next);
|
||||
if(cursor_p == cursor_p->next)
|
||||
{
|
||||
LOG_E(RLC, "rlc_am_rx_list_display error. cursor_p %p, cursor_p->next %p\n", cursor_p, cursor_p->next);
|
||||
break;
|
||||
}
|
||||
cursor_p = cursor_p->next;
|
||||
loop++;
|
||||
}
|
||||
|
||||
@@ -38,22 +38,6 @@
|
||||
|
||||
# include "UTIL/MEM/mem_block.h"
|
||||
//-----------------------------------------------------------------------------
|
||||
# ifdef RLC_AM_RX_LIST_C
|
||||
# define private_rlc_am_rx_list(x) x
|
||||
# define protected_rlc_am_rx_list(x) x
|
||||
# define public_rlc_am_rx_list(x) x
|
||||
# else
|
||||
# ifdef RLC_AM_MODULE
|
||||
# define private_rlc_am_rx_list(x)
|
||||
# define protected_rlc_am_rx_list(x) extern x
|
||||
# define public_rlc_am_rx_list(x) extern x
|
||||
# else
|
||||
# define private_rlc_am_rx_list(x)
|
||||
# define protected_rlc_am_rx_list(x)
|
||||
# define public_rlc_am_rx_list(x) extern x
|
||||
# endif
|
||||
# endif
|
||||
//-----------------------------------------------------------------------------
|
||||
#include "platform_types.h"
|
||||
#include "platform_constants.h"
|
||||
//#include "PHY/defs.h"
|
||||
@@ -66,9 +50,8 @@
|
||||
* \param[in] tbP A PDU embedded in a mem_block_t.
|
||||
* \return Zero if the PDU could be inserted in the RX buffer, a negative value if the PDU could not be inserted.
|
||||
*/
|
||||
protected_rlc_am_rx_list( rlc_am_rx_pdu_status_t rlc_am_rx_list_check_duplicate_insert_pdu(const protocol_ctxt_t* const ctxt_pP,rlc_am_entity_t* const rlc_pP,mem_block_t* const tb_pP);)
|
||||
rlc_am_rx_pdu_status_t rlc_am_rx_list_check_duplicate_insert_pdu(const protocol_ctxt_t* const ctxt_pP,rlc_am_entity_t* const rlc_pP,mem_block_t* const tb_pP);
|
||||
|
||||
#if 0
|
||||
/*! \fn 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)
|
||||
* \brief Insert a PDU in the RX buffer (implemented with a list).
|
||||
* \param[in] ctxt_pP Running context.
|
||||
@@ -76,8 +59,7 @@ protected_rlc_am_rx_list( rlc_am_rx_pdu_status_t rlc_am_rx_list_check_duplicate_
|
||||
* \param[in] tbP A PDU embedded in a mem_block_t.
|
||||
* \return Zero if the PDU could be inserted in the RX buffer, a negative value if the PDU could not be inserted.
|
||||
*/
|
||||
protected_rlc_am_rx_list( 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);)
|
||||
#endif
|
||||
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)
|
||||
* \brief Check if reassembly taking into account potential new vrR value
|
||||
@@ -85,7 +67,7 @@ protected_rlc_am_rx_list( signed int rlc_am_rx_list_insert_pdu(const protocol_ct
|
||||
* \param[in] rlcP RLC AM protocol instance pointer.
|
||||
* \return TRUE if reassembly must be done, FALSE else
|
||||
*/
|
||||
protected_rlc_am_rx_list( boolean_t rlc_am_rx_check_vr_reassemble(const protocol_ctxt_t* const ctxt_pP,const rlc_am_entity_t* const rlc_pP);)
|
||||
boolean_t 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)
|
||||
* \brief Check if all sub-segments of a PDU are received, if yes then call rlc_am_rx_mark_all_segments_received() procedure.
|
||||
@@ -93,7 +75,7 @@ protected_rlc_am_rx_list( boolean_t rlc_am_rx_check_vr_reassemble(const protocol
|
||||
* \param[in] rlcP RLC AM protocol instance pointer.
|
||||
* \param[in] tbP A PDU embedded in a mem_block_t.
|
||||
*/
|
||||
protected_rlc_am_rx_list( 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);)
|
||||
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_mark_all_segments_received (const protocol_ctxt_t* const ctxt_pP, rlc_am_entity_t* const rlcP, mem_block_t* const first_segment_tbP)
|
||||
* \brief Mark all PDUs having the same sequence number as first_segment_tbP with the information that all segments have been received.
|
||||
@@ -101,14 +83,14 @@ protected_rlc_am_rx_list( void rlc_am_rx_check_all_byte_segments(const protocol_
|
||||
* \param[in] rlcP RLC AM protocol instance pointer.
|
||||
* \param[in] first_segment_tbP A PDU embedded in a mem_block_t, it is the first PDU in the RX buffer (list) that have its sequence number.
|
||||
*/
|
||||
protected_rlc_am_rx_list( void rlc_am_rx_mark_all_segments_received(const protocol_ctxt_t* const ctxt_pP, rlc_am_entity_t* const rlcP, mem_block_t* const first_segment_tbP);)
|
||||
void rlc_am_rx_mark_all_segments_received(const protocol_ctxt_t* const ctxt_pP, rlc_am_entity_t* const rlcP, mem_block_t* const first_segment_tbP);
|
||||
|
||||
/*! \fn void rlc_am_rx_list_reassemble_rlc_sdus(const protocol_ctxt_t* const ctxt_pP, rlc_am_entity_t* const rlcP)
|
||||
* \brief Reassembly all SDUS that it is possible to reassembly by parsing the RX buffer and looking for PDUs having the flag 'all segments received'.
|
||||
* \param[in] ctxt_pP Running context.
|
||||
* \param[in] rlcP RLC AM protocol instance pointer.
|
||||
*/
|
||||
protected_rlc_am_rx_list( void rlc_am_rx_list_reassemble_rlc_sdus(const protocol_ctxt_t* const ctxt_pP, rlc_am_entity_t* const rlcP);)
|
||||
void rlc_am_rx_list_reassemble_rlc_sdus(const protocol_ctxt_t* const ctxt_pP, rlc_am_entity_t* const rlcP);
|
||||
|
||||
/*! \fn mem_block_t* list2_insert_before_element (mem_block_t * element_to_insertP, mem_block_t * elementP, list2_t * listP)
|
||||
* \brief Insert a PDU embedded in a mem_block_t in a list at a position before a designated element of the list.
|
||||
@@ -116,7 +98,7 @@ protected_rlc_am_rx_list( void rlc_am_rx_list_reassemble_rlc_sdus(const protocol
|
||||
* \param[in] elementP Element in the list.
|
||||
* \param[in] listP List where elements are linked.
|
||||
*/
|
||||
public_rlc_am_rx_list( mem_block_t* list2_insert_before_element (mem_block_t * element_to_insertP, mem_block_t * elementP, list2_t * listP);)
|
||||
mem_block_t* list2_insert_before_element (mem_block_t * element_to_insertP, mem_block_t * elementP, list2_t * listP);
|
||||
|
||||
/*! \fn mem_block_t* list2_insert_after_element (mem_block_t * element_to_insertP, mem_block_t * elementP, list2_t * listP)
|
||||
* \brief Insert a PDU embedded in a mem_block_t in a list at a position after a designated element of the list.
|
||||
@@ -124,13 +106,13 @@ public_rlc_am_rx_list( mem_block_t* list2_insert_before_element (mem_block_t * e
|
||||
* \param[in] elementP Element in the list.
|
||||
* \param[in] listP List where elements are linked.
|
||||
*/
|
||||
public_rlc_am_rx_list( mem_block_t* list2_insert_after_element (mem_block_t * element_to_insertP, mem_block_t * elementP, list2_t * listP);)
|
||||
mem_block_t* list2_insert_after_element (mem_block_t * element_to_insertP, mem_block_t * elementP, list2_t * listP);
|
||||
|
||||
/*! \fn void rlc_am_rx_list_display (const rlc_am_entity_t* const rlcP, char* messageP)
|
||||
* \brief Display the dump of the RX buffer.
|
||||
* \param[in] rlcP RLC AM protocol instance pointer.
|
||||
* \param[in] messageP Message to be displayed along with the display of the dump of the RX buffer.
|
||||
*/
|
||||
protected_rlc_am_rx_list( void rlc_am_rx_list_display (const rlc_am_entity_t* const rlcP, char* messageP);)
|
||||
void rlc_am_rx_list_display (const rlc_am_entity_t* const rlcP, char* messageP);
|
||||
/** @} */
|
||||
#endif
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
#include "list.h"
|
||||
#include "rlc_am.h"
|
||||
#include "LAYER2/MAC/mac_extern.h"
|
||||
#include "UTIL/LOG/log.h"
|
||||
#include "common/utils/LOG/log.h"
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
void rlc_am_pdu_polling (
|
||||
@@ -209,7 +209,7 @@ void rlc_am_segment_10 (
|
||||
}
|
||||
|
||||
if (!(pdu_mem_p = get_free_mem_block (data_pdu_size + sizeof(struct mac_tb_req), __func__))) {
|
||||
LOG_C(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[SEGMENT] ERROR COULD NOT GET NEW PDU, EXIT\n",
|
||||
LOG_E(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[SEGMENT] ERROR COULD NOT GET NEW PDU, EXIT\n",
|
||||
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP));
|
||||
RLC_AM_MUTEX_UNLOCK(&rlc_pP->lock_input_sdus);
|
||||
return;
|
||||
@@ -299,7 +299,12 @@ void rlc_am_segment_10 (
|
||||
|
||||
pdu_mngt_p->sdus_index[pdu_mngt_p->nb_sdus++] = sdu_buffer_index;
|
||||
sdu_mngt_p->pdus_index[sdu_mngt_p->nb_pdus++] = rlc_pP->vt_s % RLC_AM_PDU_RETRANSMISSION_BUFFER_SIZE;
|
||||
assert(sdu_mngt_p->nb_pdus < RLC_AM_MAX_SDU_FRAGMENTS);
|
||||
//assert(sdu_mngt_p->nb_pdus < RLC_AM_MAX_SDU_FRAGMENTS);
|
||||
if(sdu_mngt_p->nb_pdus >= RLC_AM_MAX_SDU_FRAGMENTS) {
|
||||
LOG_E(RLC,PROTOCOL_RLC_AM_CTXT_FMT"[SEGMENT] loop error. %d %d\n",
|
||||
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP), sdu_mngt_p->nb_pdus, RLC_AM_MAX_SDU_FRAGMENTS);
|
||||
break;
|
||||
}
|
||||
sdu_buffer_index = (sdu_buffer_index + 1) % RLC_AM_SDU_CONTROL_BUFFER_SIZE;
|
||||
}
|
||||
|
||||
@@ -353,6 +358,8 @@ void rlc_am_segment_10 (
|
||||
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
||||
pdu_remaining_size);
|
||||
//msg ("[FRAME %05d][%s][RLC_AM][MOD %u/%u][RB %u][SEGMENT] pdu_mem_p %p pdu_p %p pdu_p->data %p data %p data_sdu_p %p pdu_remaining_size %d\n", rlc_pP->module_id, rlc_pP->rb_id, ctxt_pP->frame, pdu_mem_p, pdu_p, pdu_p->data, data, data_sdu_p,pdu_remaining_size);
|
||||
rlc_am_mui.rrc_mui[rlc_am_mui.rrc_mui_num] = sdu_mngt_p->mui;
|
||||
rlc_am_mui.rrc_mui_num++;
|
||||
|
||||
memcpy(data, data_sdu_p, pdu_remaining_size);
|
||||
pdu_mngt_p->payload_size += pdu_remaining_size;
|
||||
@@ -371,6 +378,9 @@ void rlc_am_segment_10 (
|
||||
LOG_T(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[SEGMENT] Exactly Filling remaining PDU with %d remaining bytes of SDU\n",
|
||||
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
||||
pdu_remaining_size);
|
||||
rlc_am_mui.rrc_mui[rlc_am_mui.rrc_mui_num] = sdu_mngt_p->mui;
|
||||
rlc_am_mui.rrc_mui_num++;
|
||||
|
||||
memcpy(data, data_sdu_p, pdu_remaining_size);
|
||||
pdu_mngt_p->payload_size += pdu_remaining_size;
|
||||
|
||||
@@ -387,6 +397,8 @@ void rlc_am_segment_10 (
|
||||
continue_fill_pdu_with_sdu = 0;
|
||||
pdu_remaining_size = 0;
|
||||
} else if ((sdu_mngt_p->sdu_remaining_size + (li_length_in_bytes ^ 3)) < pdu_remaining_size ) {
|
||||
rlc_am_mui.rrc_mui[rlc_am_mui.rrc_mui_num] = sdu_mngt_p->mui;
|
||||
rlc_am_mui.rrc_mui_num++;
|
||||
if (fill_num_li == (RLC_AM_MAX_SDU_IN_PDU - 1)) {
|
||||
LOG_T(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[SEGMENT] [SIZE %d] REACHING RLC_AM_MAX_SDU_IN_PDU LIs -> STOP SEGMENTATION FOR THIS PDU SDU\n",
|
||||
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
||||
@@ -462,11 +474,14 @@ void rlc_am_segment_10 (
|
||||
rlc_pP->current_sdu_index = (rlc_pP->current_sdu_index + 1) % RLC_AM_SDU_CONTROL_BUFFER_SIZE;
|
||||
}
|
||||
} else {
|
||||
LOG_T(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[SEGMENT] Filling PDU with %d all remaining bytes of SDU and reduce TB size by %d bytes\n",
|
||||
LOG_E(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[SEGMENT] Filling PDU with %d all remaining bytes of SDU and reduce TB size by %d bytes\n",
|
||||
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
||||
sdu_mngt_p->sdu_remaining_size,
|
||||
pdu_remaining_size - sdu_mngt_p->sdu_remaining_size);
|
||||
assert(1!=1);
|
||||
//assert(1!=1);
|
||||
rlc_am_mui.rrc_mui[rlc_am_mui.rrc_mui_num] = sdu_mngt_p->mui;
|
||||
rlc_am_mui.rrc_mui_num++;
|
||||
|
||||
memcpy(data, data_sdu_p, sdu_mngt_p->sdu_remaining_size);
|
||||
pdu_mngt_p->payload_size += sdu_mngt_p->sdu_remaining_size;
|
||||
pdu_remaining_size = pdu_remaining_size - sdu_mngt_p->sdu_remaining_size;
|
||||
@@ -520,7 +535,11 @@ void rlc_am_segment_10 (
|
||||
pdu_tb_req_p->data_ptr = (unsigned char*)pdu_p;
|
||||
pdu_tb_req_p->tb_size = data_pdu_size - pdu_remaining_size;
|
||||
//#warning "why 3000: changed to RLC_SDU_MAX_SIZE "
|
||||
assert(pdu_tb_req_p->tb_size < RLC_SDU_MAX_SIZE );
|
||||
//assert(pdu_tb_req_p->tb_size < RLC_SDU_MAX_SIZE );
|
||||
if(pdu_tb_req_p->tb_size >= RLC_SDU_MAX_SIZE) {
|
||||
LOG_E(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[SEGMENT] tb_size error. %d, %d\n",
|
||||
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),pdu_tb_req_p->tb_size, RLC_SDU_MAX_SIZE);
|
||||
}
|
||||
rlc_am_pdu_polling(ctxt_pP, rlc_pP, pdu_p, pdu_mngt_p->payload_size,true);
|
||||
|
||||
//list_add_tail_eurecom (pdu_mem_p, &rlc_pP->segmentation_pdu_list);
|
||||
|
||||
@@ -35,21 +35,6 @@
|
||||
# ifndef __RLC_AM_SEGMENT_H__
|
||||
# define __RLC_AM_SEGMENT_H__
|
||||
//-----------------------------------------------------------------------------
|
||||
# ifdef RLC_AM_SEGMENT_C
|
||||
# define private_rlc_am_segment(x) x
|
||||
# define protected_rlc_am_segment(x) x
|
||||
# define public_rlc_am_segment(x) x
|
||||
# else
|
||||
# ifdef RLC_AM_MODULE
|
||||
# define private_rlc_am_segment(x)
|
||||
# define protected_rlc_am_segment(x) extern x
|
||||
# define public_rlc_am_segment(x) extern x
|
||||
# else
|
||||
# define private_rlc_am_segment(x)
|
||||
# define protected_rlc_am_segment(x)
|
||||
# define public_rlc_am_segment(x) extern x
|
||||
# endif
|
||||
# endif
|
||||
|
||||
/*! \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)
|
||||
* \brief Set or not the poll bit in the PDU header depending on RLC AM protocol variables.
|
||||
@@ -58,13 +43,13 @@
|
||||
* \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.
|
||||
*/
|
||||
protected_rlc_am_segment(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,boolean_t is_new_pdu);
|
||||
|
||||
/*! \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).
|
||||
* \param[in] ctxt_pP Running context.
|
||||
* \param[in] rlcP RLC AM protocol instance pointer.
|
||||
*/
|
||||
protected_rlc_am_segment(void rlc_am_segment_10 (const protocol_ctxt_t* const ctxt_pP,rlc_am_entity_t *const rlcP);)
|
||||
void rlc_am_segment_10 (const protocol_ctxt_t* const ctxt_pP,rlc_am_entity_t *const rlcP);
|
||||
/** @} */
|
||||
# endif
|
||||
|
||||
@@ -19,301 +19,4 @@
|
||||
* contact@openairinterface.org
|
||||
*/
|
||||
|
||||
#if 0
|
||||
#define RLC_AM_MODULE 1
|
||||
#define RLC_AM_SEGMENT_HOLES_C 1
|
||||
//-----------------------------------------------------------------------------
|
||||
#include "rlc_am.h"
|
||||
#include "LAYER2/MAC/extern.h"
|
||||
#include "UTIL/LOG/log.h"
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
void rlc_am_clear_holes (
|
||||
const protocol_ctxt_t* const ctxt_pP,
|
||||
rlc_am_entity_t *const rlc_pP,
|
||||
const rlc_sn_t snP)
|
||||
{
|
||||
rlc_pP->tx_data_pdu_buffer[snP].num_holes = 0;
|
||||
}
|
||||
//-----------------------------------------------------------------------------
|
||||
void rlc_am_shift_down_holes (
|
||||
const protocol_ctxt_t* const ctxt_pP,
|
||||
rlc_am_entity_t *const rlc_pP,
|
||||
const rlc_sn_t snP,
|
||||
const int indexP)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i=indexP; i < rlc_pP->tx_data_pdu_buffer[snP].num_holes - 1; i++) {
|
||||
rlc_pP->tx_data_pdu_buffer[snP].hole_so_start[i] = rlc_pP->tx_data_pdu_buffer[snP].hole_so_start[i+1];
|
||||
rlc_pP->tx_data_pdu_buffer[snP].hole_so_stop[i] = rlc_pP->tx_data_pdu_buffer[snP].hole_so_stop[i+1];
|
||||
}
|
||||
|
||||
rlc_pP->tx_data_pdu_buffer[snP].num_holes = rlc_pP->tx_data_pdu_buffer[snP].num_holes - 1;
|
||||
}
|
||||
//-----------------------------------------------------------------------------
|
||||
void rlc_am_shift_up_holes (
|
||||
const protocol_ctxt_t* const ctxt_pP,
|
||||
rlc_am_entity_t *const rlc_pP,
|
||||
const rlc_sn_t snP,
|
||||
const int indexP)
|
||||
{
|
||||
// shift include indexP
|
||||
int i;
|
||||
|
||||
for (i=rlc_pP->tx_data_pdu_buffer[snP].num_holes; i > indexP; i--) {
|
||||
rlc_pP->tx_data_pdu_buffer[snP].hole_so_start[i] = rlc_pP->tx_data_pdu_buffer[snP].hole_so_start[i-1];
|
||||
rlc_pP->tx_data_pdu_buffer[snP].hole_so_stop[i] = rlc_pP->tx_data_pdu_buffer[snP].hole_so_stop[i-1];
|
||||
}
|
||||
|
||||
rlc_pP->tx_data_pdu_buffer[snP].num_holes = rlc_pP->tx_data_pdu_buffer[snP].num_holes + 1;
|
||||
assert(rlc_pP->tx_data_pdu_buffer[snP].num_holes < RLC_AM_MAX_HOLES_REPORT_PER_PDU);
|
||||
}
|
||||
//-----------------------------------------------------------------------------
|
||||
void rlc_am_remove_hole (
|
||||
const protocol_ctxt_t* const ctxt_pP,
|
||||
rlc_am_entity_t *const rlc_pP,
|
||||
const rlc_sn_t snP,
|
||||
const sdu_size_t so_startP,
|
||||
const sdu_size_t so_stopP)
|
||||
{
|
||||
int i;
|
||||
#if TRACE_RLC_AM_HOLE
|
||||
LOG_D(RLC,
|
||||
PROTOCOL_RLC_AM_CTXT_FMT"[HOLE] REMOVE HOLE SN %04d so_startP %05d so_stopP %05d rlc_pP->tx_data_pdu_buffer[snP].nack_so_start %05d rlc_pP->tx_data_pdu_buffer[snP].nack_so_stop %05d\n",
|
||||
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
||||
snP,
|
||||
so_startP,
|
||||
so_stopP,
|
||||
rlc_pP->tx_data_pdu_buffer[snP].nack_so_start,
|
||||
rlc_pP->tx_data_pdu_buffer[snP].nack_so_stop);
|
||||
#endif
|
||||
assert(so_startP <= so_stopP);
|
||||
|
||||
if (rlc_pP->tx_data_pdu_buffer[snP].num_holes == 0) {
|
||||
assert(so_startP == rlc_pP->tx_data_pdu_buffer[snP].nack_so_start);
|
||||
assert(so_stopP <= rlc_pP->tx_data_pdu_buffer[snP].nack_so_stop);
|
||||
#if TRACE_RLC_AM_HOLE
|
||||
LOG_D(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[HOLE] REMOVE HOLE SN %04d MODIFIED nack_so_start %05d->%05d\n",
|
||||
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
||||
snP,
|
||||
rlc_pP->tx_data_pdu_buffer[snP].nack_so_start,
|
||||
so_stopP+1);
|
||||
#endif
|
||||
rlc_pP->tx_data_pdu_buffer[snP].nack_so_start = so_stopP+1;
|
||||
|
||||
if (rlc_pP->tx_data_pdu_buffer[snP].nack_so_start >= rlc_pP->tx_data_pdu_buffer[snP].nack_so_stop) {
|
||||
rlc_pP->tx_data_pdu_buffer[snP].nack_so_start = 0;
|
||||
rlc_pP->tx_data_pdu_buffer[snP].nack_so_stop = 0x7FFF;
|
||||
}
|
||||
} else {
|
||||
// normally should be removed in increasing order...
|
||||
for (i = 0; i < rlc_pP->tx_data_pdu_buffer[snP].num_holes; i++) {
|
||||
if (so_startP <= rlc_pP->tx_data_pdu_buffer[snP].hole_so_start[i]) {
|
||||
if (so_stopP >= rlc_pP->tx_data_pdu_buffer[snP].hole_so_stop[i]) {
|
||||
rlc_am_shift_down_holes(ctxt_pP, rlc_pP, snP, i);
|
||||
i = i - 1;
|
||||
} else {
|
||||
rlc_pP->tx_data_pdu_buffer[snP].hole_so_start[i] = so_stopP;
|
||||
|
||||
if (rlc_pP->tx_data_pdu_buffer[snP].num_holes == 0) {
|
||||
rlc_pP->tx_data_pdu_buffer[snP].nack_so_start = 0;
|
||||
rlc_pP->tx_data_pdu_buffer[snP].nack_so_stop = 0x7FFF;
|
||||
} else {
|
||||
rlc_pP->tx_data_pdu_buffer[snP].nack_so_start = rlc_pP->tx_data_pdu_buffer[snP].hole_so_start[0];
|
||||
rlc_pP->tx_data_pdu_buffer[snP].nack_so_stop = rlc_pP->tx_data_pdu_buffer[snP].hole_so_stop[rlc_pP->tx_data_pdu_buffer[snP].num_holes - 1];
|
||||
}
|
||||
|
||||
#if TRACE_RLC_AM_HOLE
|
||||
LOG_D(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[HOLE] REMOVE HOLE SN %04d NOW nack_so_start %05d nack_so_stop %05d num holes %d\n",
|
||||
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
||||
snP,
|
||||
rlc_pP->tx_data_pdu_buffer[snP].nack_so_start,
|
||||
rlc_pP->tx_data_pdu_buffer[snP].nack_so_stop,
|
||||
rlc_pP->tx_data_pdu_buffer[snP].num_holes);
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
} else if (so_startP > rlc_pP->tx_data_pdu_buffer[snP].hole_so_start[i]) {
|
||||
if (so_startP <= rlc_pP->tx_data_pdu_buffer[snP].hole_so_stop[i]) {
|
||||
if (so_stopP < rlc_pP->tx_data_pdu_buffer[snP].hole_so_stop[i]) {
|
||||
// BAD CASE: 1 HOLE IS SPLITTED IN 2 HOLES
|
||||
rlc_am_shift_up_holes(ctxt_pP, rlc_pP, snP, i+1);
|
||||
rlc_pP->tx_data_pdu_buffer[snP].hole_so_start[i+1] = so_startP+1;
|
||||
rlc_pP->tx_data_pdu_buffer[snP].hole_so_stop[i+1] = rlc_pP->tx_data_pdu_buffer[snP].hole_so_stop[i];
|
||||
rlc_pP->tx_data_pdu_buffer[snP].hole_so_stop[i] = so_startP - 1;
|
||||
} else {
|
||||
rlc_pP->tx_data_pdu_buffer[snP].hole_so_stop[i] = so_startP;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (rlc_pP->tx_data_pdu_buffer[snP].num_holes == 0) {
|
||||
rlc_pP->tx_data_pdu_buffer[snP].nack_so_start = 0;
|
||||
rlc_pP->tx_data_pdu_buffer[snP].nack_so_stop = 0x7FFF;
|
||||
} else {
|
||||
rlc_pP->tx_data_pdu_buffer[snP].nack_so_start = rlc_pP->tx_data_pdu_buffer[snP].hole_so_start[0];
|
||||
rlc_pP->tx_data_pdu_buffer[snP].nack_so_stop = rlc_pP->tx_data_pdu_buffer[snP].hole_so_stop[rlc_pP->tx_data_pdu_buffer[snP].num_holes - 1];
|
||||
}
|
||||
}
|
||||
|
||||
#if TRACE_RLC_AM_HOLE
|
||||
LOG_D(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[HOLE] REMOVE HOLE SN %04d NOW nack_so_start %05d nack_so_stop %05d num holes %d\n",
|
||||
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
||||
snP,
|
||||
rlc_pP->tx_data_pdu_buffer[snP].nack_so_start,
|
||||
rlc_pP->tx_data_pdu_buffer[snP].nack_so_stop,
|
||||
rlc_pP->tx_data_pdu_buffer[snP].num_holes);
|
||||
#endif
|
||||
assert(rlc_pP->tx_data_pdu_buffer[snP].nack_so_start < rlc_pP->tx_data_pdu_buffer[snP].payload_size);
|
||||
}
|
||||
//-----------------------------------------------------------------------------
|
||||
void rlc_am_get_next_hole (
|
||||
const protocol_ctxt_t* const ctxt_pP,
|
||||
rlc_am_entity_t *const rlc_pP,
|
||||
const rlc_sn_t snP,
|
||||
sdu_size_t* const so_startP,
|
||||
sdu_size_t* const so_stopP)
|
||||
{
|
||||
if (rlc_pP->tx_data_pdu_buffer[snP].num_holes == 0) {
|
||||
*so_startP = rlc_pP->tx_data_pdu_buffer[snP].nack_so_start;
|
||||
*so_stopP = rlc_pP->tx_data_pdu_buffer[snP].nack_so_stop;
|
||||
#if TRACE_RLC_AM_HOLE
|
||||
LOG_D(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[HOLE] rlc_am_get_next_hole(SN %04d) %05d->%05d (NUM HOLES == 0)\n",
|
||||
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
||||
snP,
|
||||
*so_startP,
|
||||
*so_stopP);
|
||||
#endif
|
||||
} else {
|
||||
*so_startP = rlc_pP->tx_data_pdu_buffer[snP].hole_so_start[0];
|
||||
*so_stopP = rlc_pP->tx_data_pdu_buffer[snP].hole_so_stop[0];
|
||||
#if TRACE_RLC_AM_HOLE
|
||||
LOG_D(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[HOLE] rlc_am_get_next_hole(SN %04d) %05d->%05d (NUM HOLES == %d)\n",
|
||||
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
||||
snP,
|
||||
*so_startP,
|
||||
*so_stopP,
|
||||
rlc_pP->tx_data_pdu_buffer[snP].num_holes);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
//-----------------------------------------------------------------------------
|
||||
void rlc_am_add_hole (
|
||||
const protocol_ctxt_t* const ctxt_pP,
|
||||
rlc_am_entity_t *const rlc_pP,
|
||||
const rlc_sn_t snP,
|
||||
const sdu_size_t so_startP,
|
||||
sdu_size_t so_stopP)
|
||||
{
|
||||
int i, hole_index;
|
||||
|
||||
assert(so_startP <= so_stopP);
|
||||
assert(so_startP < 0x7FFF);
|
||||
assert(so_stopP <= 0x7FFF);
|
||||
|
||||
|
||||
// if global NACK
|
||||
if ((so_startP == 0) && ((so_stopP == 0x7FFF) || (so_stopP == rlc_pP->tx_data_pdu_buffer[snP].payload_size - 1))) {
|
||||
rlc_pP->tx_data_pdu_buffer[snP].num_holes = 0;
|
||||
rlc_pP->tx_data_pdu_buffer[snP].nack_so_start = so_startP;
|
||||
rlc_pP->tx_data_pdu_buffer[snP].nack_so_stop = so_stopP;
|
||||
#if TRACE_RLC_AM_HOLE
|
||||
LOG_D(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[HOLE] SN %04d GLOBAL NACK 0->%05d\n",
|
||||
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
||||
snP,
|
||||
so_stopP);
|
||||
#endif
|
||||
assert(rlc_pP->tx_data_pdu_buffer[snP].nack_so_start < rlc_pP->tx_data_pdu_buffer[snP].payload_size);
|
||||
return;
|
||||
}
|
||||
|
||||
if (so_stopP == 0x7FFF) {
|
||||
so_stopP = rlc_pP->tx_data_pdu_buffer[snP].payload_size - 1;
|
||||
}
|
||||
|
||||
// first hole
|
||||
if (rlc_pP->tx_data_pdu_buffer[snP].num_holes == 0) {
|
||||
rlc_pP->tx_data_pdu_buffer[snP].hole_so_start[0] = so_startP;
|
||||
rlc_pP->tx_data_pdu_buffer[snP].hole_so_stop [0] = so_stopP;
|
||||
|
||||
rlc_pP->tx_data_pdu_buffer[snP].num_holes = 1;
|
||||
|
||||
rlc_pP->tx_data_pdu_buffer[snP].nack_so_start = so_startP;
|
||||
rlc_pP->tx_data_pdu_buffer[snP].nack_so_stop = so_stopP;
|
||||
#if TRACE_RLC_AM_HOLE
|
||||
LOG_D(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[HOLE] FIRST HOLE SN %04d GLOBAL NACK %05d->%05d\n",
|
||||
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
||||
snP,
|
||||
so_startP,
|
||||
so_stopP);
|
||||
#endif
|
||||
assert(rlc_pP->tx_data_pdu_buffer[snP].nack_so_start < rlc_pP->tx_data_pdu_buffer[snP].payload_size);
|
||||
return;
|
||||
}
|
||||
|
||||
hole_index = 0;
|
||||
|
||||
while (hole_index < rlc_pP->tx_data_pdu_buffer[snP].num_holes) {
|
||||
if (so_stopP < rlc_pP->tx_data_pdu_buffer[snP].hole_so_start[hole_index]) {
|
||||
assert(rlc_pP->tx_data_pdu_buffer[snP].num_holes < RLC_AM_MAX_HOLES_REPORT_PER_PDU);
|
||||
|
||||
if (hole_index > 0) {
|
||||
assert(so_startP > rlc_pP->tx_data_pdu_buffer[snP].hole_so_stop[hole_index-1]);
|
||||
}
|
||||
|
||||
for (i=rlc_pP->tx_data_pdu_buffer[snP].num_holes; i >= hole_index; i--) {
|
||||
rlc_pP->tx_data_pdu_buffer[snP].hole_so_start[i] = rlc_pP->tx_data_pdu_buffer[snP].hole_so_start[i-1];
|
||||
rlc_pP->tx_data_pdu_buffer[snP].hole_so_stop[i] = rlc_pP->tx_data_pdu_buffer[snP].hole_so_stop[i-1];
|
||||
}
|
||||
|
||||
rlc_pP->tx_data_pdu_buffer[snP].hole_so_start[hole_index] = so_startP;
|
||||
rlc_pP->tx_data_pdu_buffer[snP].hole_so_stop[hole_index] = so_stopP;
|
||||
|
||||
// update nack "window" vars nack_so_start, nack_so_stop
|
||||
if (hole_index == 0) {
|
||||
rlc_pP->tx_data_pdu_buffer[snP].nack_so_start = so_startP;
|
||||
}
|
||||
|
||||
rlc_pP->tx_data_pdu_buffer[snP].num_holes += 1;
|
||||
#if TRACE_RLC_AM_HOLE
|
||||
LOG_D(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[HOLE] INSERT %d th HOLE SN %04d GLOBAL NACK %05d->%05d\n",
|
||||
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
||||
rlc_pP->tx_data_pdu_buffer[snP].num_holes,
|
||||
snP,
|
||||
so_startP,
|
||||
so_stopP);
|
||||
#endif
|
||||
assert(rlc_pP->tx_data_pdu_buffer[snP].nack_so_start < rlc_pP->tx_data_pdu_buffer[snP].payload_size);
|
||||
assert(rlc_pP->tx_data_pdu_buffer[snP].num_holes < RLC_AM_MAX_HOLES_REPORT_PER_PDU);
|
||||
return;
|
||||
}
|
||||
|
||||
hole_index = hole_index + 1;
|
||||
}
|
||||
|
||||
// if here insert to the "tail"
|
||||
if (so_startP > rlc_pP->tx_data_pdu_buffer[snP].hole_so_stop[hole_index - 1]) {
|
||||
assert(rlc_pP->tx_data_pdu_buffer[snP].num_holes < RLC_AM_MAX_HOLES_REPORT_PER_PDU);
|
||||
rlc_pP->tx_data_pdu_buffer[snP].hole_so_start[hole_index] = so_startP;
|
||||
rlc_pP->tx_data_pdu_buffer[snP].hole_so_stop[hole_index] = so_stopP;
|
||||
rlc_pP->tx_data_pdu_buffer[snP].num_holes += 1;
|
||||
// update nack "window" vars nack_so_start, nack_so_stop
|
||||
rlc_pP->tx_data_pdu_buffer[snP].nack_so_stop = so_stopP;
|
||||
#if TRACE_RLC_AM_HOLE
|
||||
LOG_D(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[HOLE] INSERT THE %d th LAST HOLE SN %04d GLOBAL NACK %05d->%05d\n",
|
||||
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
||||
rlc_pP->tx_data_pdu_buffer[snP].num_holes,
|
||||
snP,
|
||||
so_startP,
|
||||
so_stopP);
|
||||
#endif
|
||||
} else {
|
||||
assert(1==2);
|
||||
}
|
||||
|
||||
assert(rlc_pP->tx_data_pdu_buffer[snP].num_holes < RLC_AM_MAX_HOLES_REPORT_PER_PDU);
|
||||
assert(rlc_pP->tx_data_pdu_buffer[snP].nack_so_start < rlc_pP->tx_data_pdu_buffer[snP].payload_size);
|
||||
}
|
||||
#endif
|
||||
/* This file is empty. Might be deleted ? */
|
||||
|
||||
@@ -32,35 +32,19 @@
|
||||
* @ingroup _rlc_am_internal_segment_impl_
|
||||
* @{
|
||||
*/
|
||||
#if 0
|
||||
#ifndef __RLC_AM_SEGMENT_HOLES_H__
|
||||
# define __RLC_AM_SEGMENT_HOLES_H__
|
||||
//-----------------------------------------------------------------------------
|
||||
# ifdef RLC_AM_SEGMENT_HOLES_C
|
||||
# define private_rlc_am_segments_holes(x) x
|
||||
# define protected_rlc_am_segments_holes(x) x
|
||||
# define public_rlc_am_segments_holes(x) x
|
||||
# else
|
||||
# ifdef RLC_AM_MODULE
|
||||
# define private_rlc_am_segments_holes(x)
|
||||
# define protected_rlc_am_segments_holes(x) extern x
|
||||
# define public_rlc_am_segments_holes(x) extern x
|
||||
# else
|
||||
# define private_rlc_am_segments_holes(x)
|
||||
# define protected_rlc_am_segments_holes(x)
|
||||
# define public_rlc_am_segments_holes(x) extern x
|
||||
# endif
|
||||
# endif
|
||||
/*! \fn void rlc_am_clear_holes (const protocol_ctxt_t* const ctxt_pP, rlc_am_entity_t * const rlcP, rlc_sn_t snP)
|
||||
* \brief Remove all marked holes for PDU with sequence number "snP".
|
||||
* \param[in] ctxt_pP Running context.
|
||||
* \param[in] rlcP RLC AM protocol instance pointer.
|
||||
* \param[in] snP Sequence number.
|
||||
*/
|
||||
protected_rlc_am_segments_holes(void rlc_am_clear_holes (
|
||||
void rlc_am_clear_holes (
|
||||
const protocol_ctxt_t* const ctxt_pP,
|
||||
rlc_am_entity_t *const rlcP,
|
||||
const rlc_sn_t snP);)
|
||||
const rlc_sn_t snP);
|
||||
|
||||
/*! \fn void rlc_am_remove_hole (const protocol_ctxt_t* const ctxt_pP, rlc_am_entity_t * const rlcP, rlc_sn_t snP, sdu_size_t so_startP, sdu_size_t so_stopP)
|
||||
* \brief Remove for PDU with sequence number "snP" a NACK for byte segment offset [so_startP, so_stopP].
|
||||
@@ -70,12 +54,12 @@ protected_rlc_am_segments_holes(void rlc_am_clear_holes (
|
||||
* \param[in] so_startP Start of segment offset.
|
||||
* \param[in] so_stopP End of segment offset.
|
||||
*/
|
||||
protected_rlc_am_segments_holes(void rlc_am_remove_hole (
|
||||
void rlc_am_remove_hole (
|
||||
const protocol_ctxt_t* const ctxt_pP,
|
||||
rlc_am_entity_t *const rlcP,
|
||||
const rlc_sn_t snP,
|
||||
const sdu_size_t so_startP,
|
||||
const sdu_size_t so_stopP);)
|
||||
const sdu_size_t so_stopP);
|
||||
|
||||
/*! \fn void rlc_am_get_next_hole (const protocol_ctxt_t* const ctxt_pP, rlc_am_entity_t * const rlcP, rlc_sn_t snP, sdu_size_t* so_startP, sdu_size_t* so_stopP)
|
||||
* \brief Get for PDU with sequence number "snP" the first hole start and stop parameters.
|
||||
@@ -85,12 +69,12 @@ protected_rlc_am_segments_holes(void rlc_am_remove_hole (
|
||||
* \param[in,out] so_startP Start of segment offset.
|
||||
* \param[in,out] so_stopP End of segment offset.
|
||||
*/
|
||||
protected_rlc_am_segments_holes(void rlc_am_get_next_hole (
|
||||
void rlc_am_get_next_hole (
|
||||
const protocol_ctxt_t* const ctxt_pP,
|
||||
rlc_am_entity_t *const rlcP,
|
||||
const rlc_sn_t snP,
|
||||
sdu_size_t* const so_startP,
|
||||
sdu_size_t* const so_stopP);)
|
||||
sdu_size_t* const so_stopP);
|
||||
|
||||
/*! \fn void rlc_am_add_hole (const protocol_ctxt_t* const ctxt_pP, rlc_am_entity_t * const rlcP, rlc_sn_t snP, sdu_size_t so_startP, sdu_size_t so_stopP)
|
||||
* \brief Mark for PDU with sequence number "snP" a NACK for byte segment offset [so_startP, so_stopP].
|
||||
@@ -100,12 +84,11 @@ protected_rlc_am_segments_holes(void rlc_am_get_next_hole (
|
||||
* \param[in,out] so_startP Start of segment offset.
|
||||
* \param[in,out] so_stopP End of segment offset.
|
||||
*/
|
||||
protected_rlc_am_segments_holes(void rlc_am_add_hole (
|
||||
void rlc_am_add_hole (
|
||||
const protocol_ctxt_t* const ctxt_pP,
|
||||
rlc_am_entity_t *const rlcP,
|
||||
const rlc_sn_t snP,
|
||||
const sdu_size_t so_startP,
|
||||
sdu_size_t so_stopP);)
|
||||
sdu_size_t so_stopP);
|
||||
/** @} */
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
#include "assertions.h"
|
||||
#include "list.h"
|
||||
#include "rlc_am.h"
|
||||
#include "UTIL/LOG/log.h"
|
||||
#include "common/utils/LOG/log.h"
|
||||
|
||||
# if ENABLE_ITTI
|
||||
//-----------------------------------------------------------------------------
|
||||
@@ -153,7 +153,10 @@ rlc_am_write16_bit_field(
|
||||
signed int bits_to_writeP,
|
||||
const uint16_t valueP)
|
||||
{
|
||||
assert(bits_to_writeP <= 16);
|
||||
//assert(bits_to_writeP <= 16);
|
||||
if(bits_to_writeP > 16) {
|
||||
LOG_E(RLC, "bits_to_writeP error. %d\n", bits_to_writeP);
|
||||
}
|
||||
|
||||
if (bits_to_writeP > 8) {
|
||||
rlc_am_write8_bit_field(data_ppP,bit_pos_pP, bits_to_writeP - 8, (uint8_t)(valueP >> 8));
|
||||
@@ -211,6 +214,9 @@ rlc_am_get_control_pdu_infos(
|
||||
if (!pdu_info_pP->nack_list[pdu_info_pP->num_nack - 1].e1) {
|
||||
nack_to_read = 0;
|
||||
*total_size_pP = *total_size_pP - (sdu_size_t)((uint64_t)byte_pos_p + (uint64_t)((bit_pos + 7)/8) - (uint64_t)header_pP);
|
||||
if (*total_size_pP != 0) {
|
||||
LOG_E(RLC, "[RLC_AM_GET_CONTROL_PDU_INFOS][FIRST]header_pP->b1=%d,header_pP->b2=%d\n",header_pP->b1,header_pP->b2);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -224,7 +230,9 @@ rlc_am_get_control_pdu_infos(
|
||||
} else {
|
||||
*total_size_pP = *total_size_pP - 2;
|
||||
}
|
||||
|
||||
if (*total_size_pP != 0) {
|
||||
LOG_E(RLC, "[RLC_AM_GET_CONTROL_PDU_INFOS][SECOND]header_pP->b1=%d,header_pP->b2=%d\n",header_pP->b1,header_pP->b2);
|
||||
}
|
||||
return 0;
|
||||
} else {
|
||||
return -1;
|
||||
@@ -308,8 +316,13 @@ rlc_am_receive_process_control_pdu(
|
||||
// POLL_SN:
|
||||
// - if t-PollRetransmit is running:
|
||||
// - stop and reset t-PollRetransmit.
|
||||
assert(ack_sn < RLC_AM_SN_MODULO);
|
||||
assert(rlc_pP->control_pdu_info.num_nack < RLC_AM_MAX_NACK_IN_STATUS_PDU);
|
||||
//assert(ack_sn < RLC_AM_SN_MODULO);
|
||||
//assert(rlc_pP->control_pdu_info.num_nack < RLC_AM_MAX_NACK_IN_STATUS_PDU);
|
||||
if(ack_sn >= RLC_AM_SN_MODULO || rlc_pP->control_pdu_info.num_nack >= RLC_AM_MAX_NACK_IN_STATUS_PDU) {
|
||||
LOG_E(RLC, PROTOCOL_RLC_AM_CTXT_FMT" illegal ack_sn %d, num_nack %d\n",
|
||||
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP), ack_sn, rlc_pP->control_pdu_info.num_nack);
|
||||
return;
|
||||
}
|
||||
|
||||
/* Note : ackSn can be equal to current vtA only in case the status pdu contains a list of nack_sn with same value = vtA with SOStart/SOEnd */
|
||||
/* and meaning the report is not complete due to not enough ressources to fill all SOStart/SOEnd of this NACK_SN */
|
||||
@@ -387,13 +400,15 @@ rlc_am_receive_process_control_pdu(
|
||||
|
||||
|
||||
} else {
|
||||
LOG_N(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);
|
||||
*tb_size_in_bytes_pP = 0;
|
||||
status = FALSE;
|
||||
}
|
||||
} else {
|
||||
LOG_W(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));
|
||||
*tb_size_in_bytes_pP = 0;
|
||||
status = FALSE;
|
||||
}
|
||||
|
||||
@@ -610,10 +625,13 @@ rlc_am_send_status_pdu(
|
||||
|
||||
/* Now process all Segments of sn_cursor if PDU not fully received */
|
||||
if ((!status_report_completed) && (all_segments_received == 0) && (sn_cursor != rlc_pP->vr_ms)) {
|
||||
AssertFatal (sn_nack == sn_cursor, "RLC AM Tx Status PDU Data sn_nack=%d and sn_cursor=%d should be equal LcId=%d\n",sn_nack,sn_cursor, rlc_pP->channel_id);
|
||||
//AssertFatal (sn_nack == sn_cursor, "RLC AM Tx Status PDU Data sn_nack=%d and sn_cursor=%d should be equal LcId=%d\n",sn_nack,sn_cursor, rlc_pP->channel_id);
|
||||
if(sn_nack != sn_cursor){
|
||||
LOG_E(RLC, "RLC AM Tx Status PDU Data sn_nack=%d and sn_cursor=%d should be equal LcId=%d\n",sn_nack,sn_cursor, rlc_pP->channel_id);
|
||||
}
|
||||
|
||||
/* First ensure there is enough TBS for at least 1 SOStart/SOEnd, else break */
|
||||
if ((nb_bits_transmitted + RLC_AM_SN_BITS + (RLC_AM_PDU_E_BITS << 1) + (RLC_AM_STATUS_PDU_SO_LENGTH << 1)) <= nb_bits_to_transmit) {
|
||||
else if ((nb_bits_transmitted + RLC_AM_SN_BITS + (RLC_AM_PDU_E_BITS << 1) + (RLC_AM_STATUS_PDU_SO_LENGTH << 1)) <= nb_bits_to_transmit) {
|
||||
/* Init loop flags */
|
||||
/* Check lsf */
|
||||
segment_loop_end = (pdu_info_cursor_p->lsf == 1);
|
||||
@@ -756,8 +774,14 @@ rlc_am_send_status_pdu(
|
||||
} // End main while NACK_SN
|
||||
|
||||
/* Clear E1 of last nack_sn entry */
|
||||
AssertFatal ((control_pdu_info.num_nack) || (all_segments_received == 0), "RLC AM Tx Status PDU Data Error no NACK_SN vrR=%d vrMS=%d lastSN_NACK=%d Completed=%d NbBytesAvailable=%d LcId=%d\n",
|
||||
rlc_pP->vr_r,rlc_pP->vr_ms,sn_nack,status_report_completed,(nb_bits_to_transmit >> 3),rlc_pP->channel_id);
|
||||
// AssertFatal ((control_pdu_info.num_nack) || (all_segments_received == 0), "RLC AM Tx Status PDU Data Error no NACK_SN vrR=%d vrMS=%d lastSN_NACK=%d Completed=%d NbBytesAvailable=%d LcId=%d\n",
|
||||
// rlc_pP->vr_r,rlc_pP->vr_ms,sn_nack,status_report_completed,(nb_bits_to_transmit >> 3),rlc_pP->channel_id);
|
||||
if (!((control_pdu_info.num_nack) || (all_segments_received == 0))){
|
||||
LOG_E(RLC, "RLC AM Tx Status PDU Data Error no NACK_SN vrR=%d vrMS=%d lastSN_NACK=%d Completed=%d NbBytesAvailable=%d LcId=%d\n",
|
||||
rlc_pP->vr_r,rlc_pP->vr_ms,sn_nack,status_report_completed,(nb_bits_to_transmit >> 3),rlc_pP->channel_id);
|
||||
return;
|
||||
}
|
||||
|
||||
if (control_pdu_info.num_nack) {
|
||||
control_pdu_info.nack_list[control_pdu_info.num_nack - 1].e1 = 0;
|
||||
}
|
||||
@@ -795,8 +819,13 @@ rlc_am_send_status_pdu(
|
||||
|
||||
/* encode the control pdu */
|
||||
pdu_size = (nb_bits_transmitted + 7) >> 3;
|
||||
AssertFatal (pdu_size <= rlc_pP->nb_bytes_requested_by_mac, "RLC AM Tx Status PDU Data size=%d bigger than remaining TBS=%d nb_bits_transmitted=%d LcId=%d\n",
|
||||
// AssertFatal (pdu_size <= rlc_pP->nb_bytes_requested_by_mac, "RLC AM Tx Status PDU Data size=%d bigger than remaining TBS=%d nb_bits_transmitted=%d LcId=%d\n",
|
||||
// pdu_size,rlc_pP->nb_bytes_requested_by_mac,nb_bits_transmitted, rlc_pP->channel_id);
|
||||
if(pdu_size > rlc_pP->nb_bytes_requested_by_mac){
|
||||
LOG_E(RLC, "RLC AM Tx Status PDU Data size=%d bigger than remaining TBS=%d nb_bits_transmitted=%d LcId=%d\n",
|
||||
pdu_size,rlc_pP->nb_bytes_requested_by_mac,nb_bits_transmitted, rlc_pP->channel_id);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
#if TRACE_RLC_AM_STATUS_CREATION
|
||||
@@ -806,6 +835,7 @@ rlc_am_send_status_pdu(
|
||||
pdu_size);
|
||||
#endif
|
||||
tb_p = get_free_mem_block(sizeof(struct mac_tb_req) + pdu_size, __func__);
|
||||
if(tb_p == NULL) return;
|
||||
memset(tb_p->data, 0, sizeof(struct mac_tb_req) + pdu_size);
|
||||
//estimation only ((struct mac_tb_req*)(tb_p->data))->tb_size = pdu_size;
|
||||
((struct mac_tb_req*)(tb_p->data))->data_ptr = (uint8_t*)&(tb_p->data[sizeof(struct mac_tb_req)]);
|
||||
@@ -824,8 +854,14 @@ rlc_am_send_status_pdu(
|
||||
nb_bits_to_transmit >> 3);
|
||||
#endif
|
||||
|
||||
AssertFatal (pdu_size == ((nb_bits_transmitted + 7) >> 3), "RLC AM Tx Status PDU Data encoding size=%d different than expected=%d LcId=%d\n",
|
||||
// AssertFatal (pdu_size == ((nb_bits_transmitted + 7) >> 3), "RLC AM Tx Status PDU Data encoding size=%d different than expected=%d LcId=%d\n",
|
||||
// pdu_size,((nb_bits_transmitted + 7) >> 3), rlc_pP->channel_id);
|
||||
if(pdu_size != ((nb_bits_transmitted + 7) >> 3)){
|
||||
LOG_E(RLC, "RLC AM Tx Status PDU Data encoding size=%d different than expected=%d LcId=%d\n",
|
||||
pdu_size,((nb_bits_transmitted + 7) >> 3), rlc_pP->channel_id);
|
||||
pdu_size = 0;
|
||||
return;
|
||||
}
|
||||
|
||||
// remaining bytes to transmit for RLC (retrans pdus and new data pdus)
|
||||
rlc_pP->nb_bytes_requested_by_mac = rlc_pP->nb_bytes_requested_by_mac - pdu_size;
|
||||
@@ -837,344 +873,3 @@ rlc_am_send_status_pdu(
|
||||
}
|
||||
|
||||
|
||||
#if 0
|
||||
//-----------------------------------------------------------------------------
|
||||
void
|
||||
rlc_am_send_status_pdu_backup(
|
||||
const protocol_ctxt_t* const ctxt_pP,
|
||||
rlc_am_entity_t *const rlc_pP
|
||||
)
|
||||
{
|
||||
// When STATUS reporting has been triggered, the receiving side of an AM RLC entity shall:
|
||||
// - if t-StatusProhibit is not running:
|
||||
// - at the first transmission opportunity indicated by lower layer, construct a STATUS PDU and deliver it to lower layer;
|
||||
// - else:
|
||||
// - at the first transmission opportunity indicated by lower layer after t-StatusProhibit expires, construct a single
|
||||
// STATUS PDU even if status reporting was triggered several times while t-StatusProhibit was running and
|
||||
// deliver it to lower layer;
|
||||
//
|
||||
// When a STATUS PDU has been delivered to lower layer, the receiving side of an AM RLC entity shall:
|
||||
// - start t-StatusProhibit.
|
||||
//
|
||||
// When constructing a STATUS PDU, the AM RLC entity shall:
|
||||
// - for the AMD PDUs with SN such that VR(R) <= SN < VR(MR) that has not been completely received yet, in
|
||||
// increasing SN of PDUs and increasing byte segment order within PDUs, starting with SN = VR(R) up to
|
||||
// the point where the resulting STATUS PDU still fits to the total size of RLC PDU(s) indicated by lower layer:
|
||||
// - for an AMD PDU for which no byte segments have been received yet::
|
||||
// - include in the STATUS PDU a NACK_SN which is set to the SN of the AMD PDU;
|
||||
// - for a continuous sequence of byte segments of a partly received AMD PDU that have not been received yet:
|
||||
// - include in the STATUS PDU a set of NACK_SN, SOstart and SOend
|
||||
// - set the ACK_SN to the SN of the next not received RLC Data PDU which is not indicated as missing in the
|
||||
// resulting STATUS PDU.
|
||||
|
||||
signed int nb_bits_to_transmit = rlc_pP->nb_bytes_requested_by_mac << 3;
|
||||
rlc_am_control_pdu_info_t control_pdu_info;
|
||||
rlc_am_pdu_info_t *pdu_info_cursor_p = NULL;
|
||||
rlc_sn_t previous_sn_cursor = (rlc_pP->vr_r - 1) & RLC_AM_SN_MASK;
|
||||
rlc_sn_t sn_cursor = 0;
|
||||
mem_block_t *cursor_p = rlc_pP->receiver_buffer.head;
|
||||
int all_segments_received = 0;
|
||||
int waited_so = 0;
|
||||
mem_block_t *tb_p = NULL;
|
||||
sdu_size_t pdu_size = 0;
|
||||
|
||||
memset(&control_pdu_info, 0, sizeof(rlc_am_control_pdu_info_t));
|
||||
// header size
|
||||
nb_bits_to_transmit = nb_bits_to_transmit - 15;
|
||||
#if TRACE_RLC_AM_STATUS_CREATION
|
||||
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),
|
||||
nb_bits_to_transmit);
|
||||
rlc_am_rx_list_display(rlc_pP, " DISPLAY BEFORE CONSTRUCTION OF STATUS REPORT");
|
||||
#endif
|
||||
|
||||
|
||||
if (cursor_p != NULL) {
|
||||
pdu_info_cursor_p = &((rlc_am_rx_pdu_management_t*)(cursor_p->data))->pdu_info;
|
||||
sn_cursor = pdu_info_cursor_p->sn;
|
||||
|
||||
while (!(RLC_AM_SN_IN_WINDOW(sn_cursor, rlc_pP->vr_r))) {
|
||||
cursor_p = cursor_p->next;
|
||||
previous_sn_cursor = sn_cursor;
|
||||
|
||||
pdu_info_cursor_p = &((rlc_am_rx_pdu_management_t*)(cursor_p->data))->pdu_info;
|
||||
sn_cursor = pdu_info_cursor_p->sn;
|
||||
#if TRACE_RLC_AM_STATUS_CREATION
|
||||
LOG_D(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[SEND-STATUS] LINE %d FIND VR(R) <= SN sn_cursor %04d -> %04d\n",
|
||||
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
||||
__LINE__,
|
||||
previous_sn_cursor,
|
||||
sn_cursor);
|
||||
#endif
|
||||
}
|
||||
|
||||
// 12 bits = size of NACK_SN field + E1, E2 bits
|
||||
// 42 bits = size of NACK_SN field + SO_START, SO_END fields, E1, E2 bits
|
||||
while ((cursor_p != NULL) && (nb_bits_to_transmit >= 12)) {
|
||||
pdu_info_cursor_p = &((rlc_am_rx_pdu_management_t*)(cursor_p->data))->pdu_info;
|
||||
all_segments_received = ((rlc_am_rx_pdu_management_t*)(cursor_p->data))->all_segments_received;
|
||||
sn_cursor = pdu_info_cursor_p->sn;
|
||||
#if TRACE_RLC_AM_STATUS_CREATION
|
||||
LOG_D(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[SEND-STATUS] LINE %d LOOPING sn_cursor %04d previous sn_cursor %04d \n",
|
||||
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
||||
__LINE__,
|
||||
sn_cursor,
|
||||
previous_sn_cursor);
|
||||
#endif
|
||||
|
||||
// -------------------------------------------------------------------------------
|
||||
// case resegmentation : several PDUs related to the same SN queued in list
|
||||
// -------------------------------------------------------------------------------
|
||||
if (sn_cursor == previous_sn_cursor) {
|
||||
do {
|
||||
cursor_p = cursor_p->next;
|
||||
|
||||
if (cursor_p != NULL) {
|
||||
pdu_info_cursor_p = &((rlc_am_rx_pdu_management_t*)(cursor_p->data))->pdu_info;
|
||||
all_segments_received = ((rlc_am_rx_pdu_management_t*)(cursor_p->data))->all_segments_received;
|
||||
sn_cursor = pdu_info_cursor_p->sn;
|
||||
#if TRACE_RLC_AM_STATUS_CREATION
|
||||
LOG_D(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[SEND-STATUS] LINE %d NOW sn_cursor %04d \n",
|
||||
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
||||
__LINE__,
|
||||
sn_cursor);
|
||||
#endif
|
||||
} else {
|
||||
if (all_segments_received) {
|
||||
control_pdu_info.ack_sn = (sn_cursor + 1) & RLC_AM_SN_MASK;
|
||||
#if TRACE_RLC_AM_STATUS_CREATION
|
||||
LOG_D(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[SEND-STATUS] LINE %d PREPARE SENDING ACK SN %04d \n",
|
||||
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
||||
__LINE__,
|
||||
control_pdu_info.ack_sn);
|
||||
#endif
|
||||
} else {
|
||||
control_pdu_info.ack_sn = (previous_sn_cursor + 1) & RLC_AM_SN_MASK;
|
||||
#if TRACE_RLC_AM_STATUS_CREATION
|
||||
LOG_D(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[SEND-STATUS] LINE %d PREPARE SENDING ACK SN %04d (CASE PREVIOUS SN)\n",
|
||||
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
||||
__LINE__,
|
||||
control_pdu_info.ack_sn);
|
||||
#endif
|
||||
}
|
||||
|
||||
goto end_push_nack;
|
||||
}
|
||||
} while ((cursor_p != NULL) && (sn_cursor == previous_sn_cursor));
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------------
|
||||
// simple case, PDU(s) is/are missing
|
||||
// -------------------------------------------------------------------------------
|
||||
while (((previous_sn_cursor + 1) & RLC_AM_SN_MASK) != sn_cursor) {
|
||||
if (nb_bits_to_transmit > 12) {
|
||||
previous_sn_cursor = (previous_sn_cursor + 1) & RLC_AM_SN_MASK;
|
||||
control_pdu_info.nack_list[control_pdu_info.num_nack].nack_sn = previous_sn_cursor;
|
||||
control_pdu_info.nack_list[control_pdu_info.num_nack].so_start = 0;
|
||||
control_pdu_info.nack_list[control_pdu_info.num_nack].so_end = 0x7ff;
|
||||
control_pdu_info.nack_list[control_pdu_info.num_nack].e1 = 1;
|
||||
control_pdu_info.nack_list[control_pdu_info.num_nack].e2 = 0;
|
||||
control_pdu_info.num_nack += 1;
|
||||
nb_bits_to_transmit = nb_bits_to_transmit - 12;
|
||||
#if TRACE_RLC_AM_STATUS_CREATION
|
||||
LOG_D(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[SEND-STATUS] LINE %d PREPARE SENDING NACK %04d\n",
|
||||
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
||||
__LINE__,
|
||||
previous_sn_cursor);
|
||||
#endif
|
||||
} else {
|
||||
control_pdu_info.ack_sn = (previous_sn_cursor + 1) & RLC_AM_SN_MASK;
|
||||
#if TRACE_RLC_AM_STATUS_CREATION
|
||||
LOG_D(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[SEND-STATUS] LINE %d NO MORE BITS FOR SENDING NACK %04d -> ABORT AND SET FINAL ACK %04d\n",
|
||||
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
||||
__LINE__,
|
||||
previous_sn_cursor,
|
||||
control_pdu_info.ack_sn);
|
||||
#endif
|
||||
goto end_push_nack;
|
||||
}
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------------
|
||||
// not so simple case, a resegmented PDU(s) is missing
|
||||
// -------------------------------------------------------------------------------
|
||||
if (all_segments_received == 0) {
|
||||
waited_so = 0;
|
||||
#if TRACE_RLC_AM_STATUS_CREATION
|
||||
LOG_D(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[SEND-STATUS] if (all_segments_received == 0) \n",
|
||||
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP));
|
||||
#endif
|
||||
|
||||
do {
|
||||
if (pdu_info_cursor_p->so > waited_so) {
|
||||
if (nb_bits_to_transmit >= 42) {
|
||||
control_pdu_info.nack_list[control_pdu_info.num_nack].nack_sn = sn_cursor;
|
||||
control_pdu_info.nack_list[control_pdu_info.num_nack].so_start = waited_so;
|
||||
control_pdu_info.nack_list[control_pdu_info.num_nack].so_end = pdu_info_cursor_p->so - 1;
|
||||
control_pdu_info.nack_list[control_pdu_info.num_nack].e1 = 1;
|
||||
control_pdu_info.nack_list[control_pdu_info.num_nack].e2 = 1;
|
||||
control_pdu_info.num_nack += 1;
|
||||
nb_bits_to_transmit = nb_bits_to_transmit - 42;
|
||||
#if TRACE_RLC_AM_STATUS_CREATION
|
||||
LOG_D(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[SEND-STATUS] LINE %d PREPARE SENDING NACK %04d SO START %05d SO END %05d (CASE SO %d > WAITED SO %d)\n",
|
||||
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
||||
__LINE__,
|
||||
sn_cursor,
|
||||
waited_so,
|
||||
pdu_info_cursor_p->so - 1,
|
||||
pdu_info_cursor_p->so,
|
||||
waited_so);
|
||||
#endif
|
||||
|
||||
if (pdu_info_cursor_p->lsf == 1) { // last segment flag
|
||||
//waited_so = 0x7FF;
|
||||
waited_so = 0x7FFF;
|
||||
#if TRACE_RLC_AM_STATUS_CREATION
|
||||
LOG_D(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[SEND-STATUS] LINE %d SN %04d SET WAITED SO 0x7FFF)\n",
|
||||
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
||||
__LINE__, sn_cursor);
|
||||
#endif
|
||||
//break;
|
||||
} else {
|
||||
waited_so = pdu_info_cursor_p->so + pdu_info_cursor_p->payload_size;
|
||||
#if TRACE_RLC_AM_STATUS_CREATION
|
||||
LOG_D(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[SEND-STATUS] LINE %d SN %04d SET WAITED SO %d @1\n",
|
||||
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
||||
__LINE__,
|
||||
sn_cursor,
|
||||
waited_so);
|
||||
#endif
|
||||
}
|
||||
} else {
|
||||
control_pdu_info.ack_sn = sn_cursor;
|
||||
goto end_push_nack;
|
||||
}
|
||||
} else { //else { // pdu_info_cursor_p->so <= waited_so
|
||||
waited_so = pdu_info_cursor_p->so + pdu_info_cursor_p->payload_size;
|
||||
|
||||
if (pdu_info_cursor_p->lsf == 1) { // last segment flag
|
||||
//waited_so = 0x7FF;
|
||||
waited_so = 0x7FFF;
|
||||
}
|
||||
|
||||
#if TRACE_RLC_AM_STATUS_CREATION
|
||||
LOG_D(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[SEND-STATUS] LINE %d SN %04d SET WAITED SO %d @2\n",
|
||||
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
||||
__LINE__,
|
||||
sn_cursor, waited_so);
|
||||
#endif
|
||||
}
|
||||
|
||||
cursor_p = cursor_p->next;
|
||||
|
||||
if (cursor_p != NULL) {
|
||||
pdu_info_cursor_p = &((rlc_am_rx_pdu_management_t*)(cursor_p->data))->pdu_info;
|
||||
all_segments_received = ((rlc_am_rx_pdu_management_t*)(cursor_p->data))->all_segments_received;
|
||||
previous_sn_cursor = sn_cursor;
|
||||
sn_cursor = pdu_info_cursor_p->sn;
|
||||
} else {
|
||||
// LG control_pdu_info.ack_sn = (previous_sn_cursor + 1) & RLC_AM_SN_MASK;
|
||||
control_pdu_info.ack_sn = previous_sn_cursor;
|
||||
goto end_push_nack;
|
||||
}
|
||||
} while ((cursor_p != NULL) && (sn_cursor == previous_sn_cursor));
|
||||
|
||||
// may be last segment of PDU not received
|
||||
//if ((sn_cursor != previous_sn_cursor) && (waited_so != 0x7FF)) {
|
||||
if ((sn_cursor != previous_sn_cursor) && (waited_so != 0x7FFF)) {
|
||||
if (nb_bits_to_transmit >= 42) {
|
||||
control_pdu_info.nack_list[control_pdu_info.num_nack].nack_sn = previous_sn_cursor;
|
||||
control_pdu_info.nack_list[control_pdu_info.num_nack].so_start = waited_so;
|
||||
//control_pdu_info.nack_list[control_pdu_info.num_nack].so_end = 0x7FF;
|
||||
control_pdu_info.nack_list[control_pdu_info.num_nack].so_end = 0x7FFF;
|
||||
control_pdu_info.nack_list[control_pdu_info.num_nack].e1 = 1;
|
||||
control_pdu_info.nack_list[control_pdu_info.num_nack].e2 = 1;
|
||||
control_pdu_info.num_nack += 1;
|
||||
nb_bits_to_transmit = nb_bits_to_transmit - 42;
|
||||
#if TRACE_RLC_AM_STATUS_CREATION
|
||||
LOG_D(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[SEND-STATUS] LINE %d PREPARE SENDING NACK %04d SO START %05d SO END %05d\n",
|
||||
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
||||
__LINE__,
|
||||
previous_sn_cursor,
|
||||
waited_so,
|
||||
0x7FFF);
|
||||
#endif
|
||||
} else {
|
||||
control_pdu_info.ack_sn = previous_sn_cursor;
|
||||
goto end_push_nack;
|
||||
}
|
||||
}
|
||||
|
||||
waited_so = 0;
|
||||
} else {
|
||||
waited_so = 0;
|
||||
cursor_p = cursor_p->next;
|
||||
previous_sn_cursor = sn_cursor;
|
||||
}
|
||||
}
|
||||
|
||||
control_pdu_info.ack_sn = (previous_sn_cursor + 1) & RLC_AM_SN_MASK;
|
||||
} else {
|
||||
control_pdu_info.ack_sn = rlc_pP->vr_r;
|
||||
#if TRACE_RLC_AM_STATUS_CREATION
|
||||
LOG_D(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[SEND-STATUS] LINE %d PREPARE SENDING ACK %04d = VR(R)\n",
|
||||
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
||||
__LINE__,
|
||||
control_pdu_info.ack_sn);
|
||||
#endif
|
||||
}
|
||||
|
||||
end_push_nack:
|
||||
|
||||
if (control_pdu_info.num_nack > 0) {
|
||||
control_pdu_info.nack_list[control_pdu_info.num_nack - 1].e1 = 0;
|
||||
}
|
||||
|
||||
//msg ("[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u] nb_bits_to_transmit %d\n",
|
||||
// rlc_pP->module_id, rlc_pP->rb_id, ctxt_pP->frame,nb_bits_to_transmit);
|
||||
|
||||
#if TRACE_RLC_AM_STATUS_CREATION
|
||||
LOG_D(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[SEND-STATUS] LINE %d PREPARE SENDING ACK %04d NUM NACK %d\n",
|
||||
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
||||
__LINE__,
|
||||
control_pdu_info.ack_sn,
|
||||
control_pdu_info.num_nack);
|
||||
#endif
|
||||
// encode the control pdu
|
||||
pdu_size = rlc_pP->nb_bytes_requested_by_mac - ((nb_bits_to_transmit - 7 )>> 3);
|
||||
|
||||
#if TRACE_RLC_AM_STATUS_CREATION
|
||||
LOG_D(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[SEND-STATUS] LINE %d forecast pdu_size %d\n",
|
||||
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
||||
__LINE__,
|
||||
pdu_size);
|
||||
#endif
|
||||
tb_p = get_free_mem_block(sizeof(struct mac_tb_req) + pdu_size, __func__);
|
||||
memset(tb_p->data, 0, sizeof(struct mac_tb_req) + pdu_size);
|
||||
//estimation only ((struct mac_tb_req*)(tb_p->data))->tb_size = pdu_size;
|
||||
((struct mac_tb_req*)(tb_p->data))->data_ptr = (uint8_t*)&(tb_p->data[sizeof(struct mac_tb_req)]);
|
||||
|
||||
// warning reuse of pdu_size
|
||||
pdu_size = rlc_am_write_status_pdu(ctxt_pP, rlc_pP,(rlc_am_pdu_sn_10_t*)(((struct mac_tb_req*)(tb_p->data))->data_ptr), &control_pdu_info);
|
||||
((struct mac_tb_req*)(tb_p->data))->tb_size = pdu_size;
|
||||
//assert((((struct mac_tb_req*)(tb_p->data))->tb_size) < 3000);
|
||||
|
||||
#if TRACE_RLC_AM_STATUS_CREATION
|
||||
LOG_D(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[SEND-STATUS] SEND STATUS PDU SIZE %d, rlc_pP->nb_bytes_requested_by_mac %d, nb_bits_to_transmit>>3 %d\n",
|
||||
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
||||
pdu_size,
|
||||
rlc_pP->nb_bytes_requested_by_mac,
|
||||
nb_bits_to_transmit >> 3);
|
||||
#endif
|
||||
assert(pdu_size == (rlc_pP->nb_bytes_requested_by_mac - (nb_bits_to_transmit >> 3)));
|
||||
|
||||
// remaining bytes to transmit for RLC (retrans pdus and new data pdus)
|
||||
rlc_pP->nb_bytes_requested_by_mac = rlc_pP->nb_bytes_requested_by_mac - pdu_size;
|
||||
// put pdu in trans
|
||||
list_add_head(tb_p, &rlc_pP->control_pdu_list);
|
||||
rlc_pP->stat_tx_control_pdu += 1;
|
||||
rlc_pP->stat_tx_control_bytes += pdu_size;
|
||||
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
@@ -37,21 +37,6 @@
|
||||
|
||||
# include "UTIL/MEM/mem_block.h"
|
||||
//-----------------------------------------------------------------------------
|
||||
# ifdef RLC_AM_STATUS_REPORT_C
|
||||
# define private_rlc_am_status_report(x) x
|
||||
# define protected_rlc_am_status_report(x) x
|
||||
# define public_rlc_am_status_report(x) x
|
||||
# else
|
||||
# ifdef RLC_AM_MODULE
|
||||
# define private_rlc_am_status_report(x)
|
||||
# define protected_rlc_am_status_report(x) extern x
|
||||
# define public_rlc_am_status_report(x) extern x
|
||||
# else
|
||||
# define private_rlc_am_status_report(x)
|
||||
# define protected_rlc_am_status_report(x)
|
||||
# define public_rlc_am_status_report(x) extern x
|
||||
# endif
|
||||
# endif
|
||||
//-----------------------------------------------------------------------------
|
||||
#include "platform_types.h"
|
||||
#include "platform_constants.h"
|
||||
@@ -65,7 +50,7 @@
|
||||
* \param[in] bits_to_readP Number of bits to read (max 16).
|
||||
* \return Value read on 16 bits, bits read are shifted to least significant bits of returned short value.
|
||||
*/
|
||||
protected_rlc_am_status_report( uint16_t rlc_am_read_bit_field (uint8_t** dataP, unsigned int* bit_posP, const signed int bits_to_readP);)
|
||||
uint16_t rlc_am_read_bit_field (uint8_t** dataP, unsigned int* bit_posP, const signed int bits_to_readP);
|
||||
|
||||
/*! \fn void rlc_am_write8_bit_field(uint8_t** dataP, unsigned int* bit_posP, signed int bits_to_writeP, const uint8_t valueP)
|
||||
* \brief Write N bits (max 8) in a byte area seen as a bit-field with the help of a byte index and a modulo 8 bit index.
|
||||
@@ -74,7 +59,7 @@ protected_rlc_am_status_report( uint16_t rlc_am_read_bit_field
|
||||
* \param[in] bits_to_writeP Number of bits to write (max 8).
|
||||
* \param[in] valueP Value to write.
|
||||
*/
|
||||
protected_rlc_am_status_report(void rlc_am_write8_bit_field(uint8_t** dataP, unsigned int* bit_posP, signed int bits_to_writeP, const uint8_t valueP);)
|
||||
void rlc_am_write8_bit_field(uint8_t** dataP, unsigned int* bit_posP, signed int bits_to_writeP, const uint8_t valueP);
|
||||
|
||||
/*! \fn void rlc_am_write16_bit_field(uint8_t** dataP, unsigned int* bit_posP, signed int bits_to_writeP, const uint16_t valueP)
|
||||
* \brief Write N bits (max 16) in a byte area seen as a bit-field with the help of a byte index and a modulo 8 bit index.
|
||||
@@ -83,11 +68,11 @@ protected_rlc_am_status_report(void rlc_am_write8_bit_field(uint8_t** dat
|
||||
* \param[in] bits_to_writeP Number of bits to write (max 16).
|
||||
* \param[in] valueP Value to write.
|
||||
*/
|
||||
protected_rlc_am_status_report(void rlc_am_write16_bit_field(
|
||||
void rlc_am_write16_bit_field(
|
||||
uint8_t** dataP,
|
||||
unsigned int* bit_posP,
|
||||
signed int bits_to_writeP,
|
||||
const uint16_t valueP);)
|
||||
const uint16_t valueP);
|
||||
|
||||
/*! \fn signed int rlc_am_get_control_pdu_infos (rlc_am_pdu_sn_10_t* const headerP, sdu_size_t * const total_sizeP, rlc_am_control_pdu_info_t* const pdu_infoP)
|
||||
* \brief Retrieve control PDU informations from a serialized control PDU.
|
||||
@@ -95,16 +80,16 @@ protected_rlc_am_status_report(void rlc_am_write16_bit_field(
|
||||
* \param[in] total_size_pP Pointer on PDU size in bytes.
|
||||
* \param[in,out] pdu_infoP Struct containing interpreted PDU control informations.
|
||||
*/
|
||||
protected_rlc_am_status_report( signed int rlc_am_get_control_pdu_infos (
|
||||
signed int rlc_am_get_control_pdu_infos (
|
||||
rlc_am_pdu_sn_10_t* const headerP,
|
||||
sdu_size_t * const total_size_pP,
|
||||
rlc_am_control_pdu_info_t* const pdu_infoP);)
|
||||
rlc_am_control_pdu_info_t* const pdu_infoP);
|
||||
|
||||
/*! \fn void rlc_am_display_control_pdu_infos(const rlc_am_control_pdu_info_t* const pdu_infoP)
|
||||
* \brief Dump on LOG output the informations contained in the pdu_infoP structure.
|
||||
* \param[in] pdu_infoP Struct containing interpreted PDU control informations.
|
||||
*/
|
||||
protected_rlc_am_status_report( void rlc_am_display_control_pdu_infos(const rlc_am_control_pdu_info_t* const pdu_infoP);)
|
||||
void rlc_am_display_control_pdu_infos(const rlc_am_control_pdu_info_t* const pdu_infoP);
|
||||
|
||||
/*! \fn void rlc_am_receive_process_control_pdu(const protocol_ctxt_t* const ctxt_pP, rlc_am_entity_t* const rlc_pP, mem_block_t* const tbP, uint8_t* first_byte, const uint16_t tb_size_in_bytes)
|
||||
* \brief Process the informations contained in the control PDU.
|
||||
@@ -114,12 +99,12 @@ protected_rlc_am_status_report( void rlc_am_display_control_pdu_infos(const rlc_
|
||||
* \param[in] first_byte Pointer on first byte of control PDU.
|
||||
* \param[in] tb_size_in_bytes Pointer on size of serialized control PDU in bytes.
|
||||
*/
|
||||
protected_rlc_am_status_report( void rlc_am_receive_process_control_pdu(
|
||||
void rlc_am_receive_process_control_pdu(
|
||||
const protocol_ctxt_t* const ctxt_pP,
|
||||
rlc_am_entity_t* const rlc_pP,
|
||||
mem_block_t* const tbP,
|
||||
uint8_t** first_byte,
|
||||
sdu_size_t * const tb_size_in_bytes);)
|
||||
sdu_size_t * const tb_size_in_bytes);
|
||||
|
||||
/*! \fn int rlc_am_write_status_pdu(const protocol_ctxt_t* const ctxt_pP, rlc_am_entity_t* const rlc_pP, rlc_am_pdu_sn_10_t* const rlc_am_pdu_sn_10P, rlc_am_control_pdu_info_t* const pdu_infoP)
|
||||
* \brief Remove all marked holes for PDU with sequence number "snP".
|
||||
@@ -129,19 +114,19 @@ protected_rlc_am_status_report( void rlc_am_receive_process_control_pdu(
|
||||
* \param[in] pdu_infoP Struct containing PDU control informations elements.
|
||||
* \return The number of bytes that have been written.
|
||||
*/
|
||||
protected_rlc_am_status_report(int rlc_am_write_status_pdu(
|
||||
int rlc_am_write_status_pdu(
|
||||
const protocol_ctxt_t* const ctxt_pP,
|
||||
rlc_am_entity_t *const rlc_pP,
|
||||
rlc_am_pdu_sn_10_t* const rlc_am_pdu_sn_10P,
|
||||
rlc_am_control_pdu_info_t* const pdu_infoP);)
|
||||
rlc_am_control_pdu_info_t* const pdu_infoP);
|
||||
|
||||
/*! \fn void rlc_am_send_status_pdu(const protocol_ctxt_t* const ctxt_pP, rlc_am_entity_t* const rlc_pP)
|
||||
* \brief Send a status PDU based on the receiver buffer content.
|
||||
* \param[in] ctxt_pP Running context.
|
||||
* \param[in] rlc_pP RLC AM protocol instance pointer.
|
||||
*/
|
||||
protected_rlc_am_status_report(void rlc_am_send_status_pdu(
|
||||
void rlc_am_send_status_pdu(
|
||||
const protocol_ctxt_t* const ctxt_pP,
|
||||
rlc_am_entity_t *const rlc_pP);)
|
||||
rlc_am_entity_t *const rlc_pP);
|
||||
/** @} */
|
||||
#endif
|
||||
|
||||
@@ -534,7 +534,7 @@ void rlc_am_v9_3_0_test_send_sdu(rlc_am_entity_t *am_txP, int sdu_indexP)
|
||||
assert(g_send_id_write_index[am_txP->rb_id] < TEST_MAX_SEND_SDU);
|
||||
} else {
|
||||
printf("Out of memory error\n");
|
||||
exit(-1);
|
||||
// exit(-1);
|
||||
}
|
||||
}
|
||||
//-----------------------------------------------------------------------------
|
||||
@@ -577,7 +577,7 @@ void rlc_am_v9_3_0_test_mac_rlc_loop (struct mac_data_ind *data_indP, struct ma
|
||||
data_indP->no_tb += 1;
|
||||
} else {
|
||||
printf("Out of memory error\n");
|
||||
exit(-1);
|
||||
// exit(-1);
|
||||
}
|
||||
} else {
|
||||
printf("[RLC-LOOP] DROPPING 1 TB\n");
|
||||
|
||||
@@ -32,34 +32,19 @@
|
||||
*/
|
||||
# ifndef __RLC_AM_TEST_H__
|
||||
# define __RLC_AM_TEST_H__
|
||||
# ifdef RLC_AM_TEST_C
|
||||
# define private_rlc_am_test(x) x
|
||||
# define protected_rlc_am_test(x) x
|
||||
# define public_rlc_am_test(x) x
|
||||
# else
|
||||
# ifdef RLC_AM_MODULE
|
||||
# define private_rlc_am_test(x)
|
||||
# define protected_rlc_am_test(x) extern x
|
||||
# define public_rlc_am_test(x) extern x
|
||||
# else
|
||||
# define private_rlc_am_test(x)
|
||||
# define protected_rlc_am_test(x)
|
||||
# define public_rlc_am_test(x) extern x
|
||||
# endif
|
||||
# endif
|
||||
public_rlc_am_test(rlc_am_entity_t g_am_tx;)
|
||||
public_rlc_am_test(rlc_am_entity_t g_am_rx;)
|
||||
rlc_am_entity_t g_am_tx;
|
||||
rlc_am_entity_t g_am_rx;
|
||||
|
||||
protected_rlc_am_test(void rlc_am_v9_3_0_test_windows();)
|
||||
protected_rlc_am_test(void rlc_am_v9_3_0_test_read_write_bit_field();)
|
||||
protected_rlc_am_test(void rlc_am_v9_3_0_test_data_conf(module_id_t module_idP, rb_id_t rb_idP, mui_t muiP, rlc_tx_status_t statusP);)
|
||||
protected_rlc_am_test(void rlc_am_v9_3_0_test_send_sdu(rlc_am_entity_t *am_txP, int sdu_indexP);)
|
||||
protected_rlc_am_test(void rlc_am_v9_3_0_test_exchange_pdus(rlc_am_entity_t *am_txP,rlc_am_entity_t *am_RxP,
|
||||
uint16_t bytes_txP,uint16_t bytes_rxP);)
|
||||
protected_rlc_am_test(void rlc_am_v9_3_0_test_mac_rlc_loop (struct mac_data_ind *data_indP, struct mac_data_req *data_requestP, int* drop_countP, int *tx_packetsP, int* dropped_tx_packetsP);)
|
||||
protected_rlc_am_test(void rlc_am_v9_3_0_test_data_ind (module_id_t module_idP, rb_id_t rb_idP, sdu_size_t sizeP,
|
||||
mem_block_t *sduP);)
|
||||
protected_rlc_am_test(void rlc_am_v9_3_0_test_tx_rx();)
|
||||
public_rlc_am_test( void rlc_am_v9_3_0_test_print_trace (void);)
|
||||
public_rlc_am_test( void rlc_am_v9_3_0_test());
|
||||
void rlc_am_v9_3_0_test_windows();
|
||||
void rlc_am_v9_3_0_test_read_write_bit_field();
|
||||
void rlc_am_v9_3_0_test_data_conf(module_id_t module_idP, rb_id_t rb_idP, mui_t muiP, rlc_tx_status_t statusP);
|
||||
void rlc_am_v9_3_0_test_send_sdu(rlc_am_entity_t *am_txP, int sdu_indexP);
|
||||
void rlc_am_v9_3_0_test_exchange_pdus(rlc_am_entity_t *am_txP,rlc_am_entity_t *am_RxP,
|
||||
uint16_t bytes_txP,uint16_t bytes_rxP);
|
||||
void rlc_am_v9_3_0_test_mac_rlc_loop (struct mac_data_ind *data_indP, struct mac_data_req *data_requestP, int* drop_countP, int *tx_packetsP, int* dropped_tx_packetsP);
|
||||
void rlc_am_v9_3_0_test_data_ind (module_id_t module_idP, rb_id_t rb_idP, sdu_size_t sizeP,
|
||||
mem_block_t *sduP);
|
||||
void rlc_am_v9_3_0_test_tx_rx();
|
||||
void rlc_am_v9_3_0_test_print_trace (void);
|
||||
void rlc_am_v9_3_0_test();
|
||||
# endif
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
//-----------------------------------------------------------------------------
|
||||
#include "rlc_am.h"
|
||||
#include "LAYER2/MAC/mac_extern.h"
|
||||
#include "UTIL/LOG/log.h"
|
||||
#include "common/utils/LOG/log.h"
|
||||
#include "msc.h"
|
||||
//-----------------------------------------------------------------------------
|
||||
void
|
||||
@@ -87,9 +87,16 @@ rlc_am_check_timer_poll_retransmit(
|
||||
|
||||
/* Look for the first retransmittable PDU starting from vtS - 1 */
|
||||
while (sn != sn_end) {
|
||||
tx_data_pdu_buffer_p = &rlc_pP->tx_data_pdu_buffer[sn % RLC_AM_WINDOW_SIZE];
|
||||
AssertFatal (tx_data_pdu_buffer_p->mem_block != NULL, "RLC AM Tpoll Retx expiry sn=%d ack=%d is empty vtA=%d vtS=%d LcId=%d\n",
|
||||
sn, tx_data_pdu_buffer_p->flags.ack,rlc_pP->vt_a,rlc_pP->vt_s,rlc_pP->channel_id);
|
||||
tx_data_pdu_buffer_p = &rlc_pP->tx_data_pdu_buffer[sn % RLC_AM_WINDOW_SIZE];
|
||||
//AssertFatal (tx_data_pdu_buffer_p->mem_block != NULL, "RLC AM Tpoll Retx expiry sn=%d ack=%d is empty vtA=%d vtS=%d LcId=%d\n",
|
||||
// sn, tx_data_pdu_buffer_p->flags.ack,rlc_pP->vt_a,rlc_pP->vt_s,rlc_pP->channel_id);
|
||||
if(tx_data_pdu_buffer_p->mem_block == NULL){
|
||||
LOG_E(RLC, "RLC AM Tpoll Retx expiry sn=%d ack=%d is empty vtA=%d vtS=%d LcId=%d\n",
|
||||
sn, tx_data_pdu_buffer_p->flags.ack,rlc_pP->vt_a,rlc_pP->vt_s,rlc_pP->channel_id);
|
||||
sn = RLC_AM_PREV_SN(sn);
|
||||
continue;
|
||||
}
|
||||
|
||||
if ((tx_data_pdu_buffer_p->flags.ack == 0) && (tx_data_pdu_buffer_p->flags.max_retransmit == 0)) {
|
||||
tx_data_pdu_buffer_p->flags.retransmit = 1;
|
||||
tx_data_pdu_buffer_p->retx_payload_size = tx_data_pdu_buffer_p->payload_size;
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user