1 /*******************************************************************************
2 ################################################################################
3 # Copyright (c) [2017-2019] [Radisys] #
5 # Licensed under the Apache License, Version 2.0 (the "License"); #
6 # you may not use this file except in compliance with the License. #
7 # You may obtain a copy of the License at #
9 # http://www.apache.org/licenses/LICENSE-2.0 #
11 # Unless required by applicable law or agreed to in writing, software #
12 # distributed under the License is distributed on an "AS IS" BASIS, #
13 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. #
14 # See the License for the specific language governing permissions and #
15 # limitations under the License. #
16 ################################################################################
17 *******************************************************************************/
19 #ifndef __DU_CONFIG_H_
20 #define __DU_CONFIG_H__
23 #include "CmInterface.h"
27 #define GNB_ID 1 /* As per 38.423,Sec 9.2.2.1, gnbId range b/w 0 to 4294967295 */
34 #define CELL_TYPE SMALL
36 //TODO: while testing for TDD, Mu1 and 100 MHz, this flag must be enabled
38 #define NR_DL_ARFCN 623400
39 #define NR_UL_ARFCN 623400
40 #define NR_FREQ_BAND 78
41 #define NR_SCS SCS_30KHZ
43 #define NR_DL_ARFCN 428000
44 #define NR_UL_ARFCN 390000
45 #define NR_FREQ_BAND 1
46 #define NR_SCS SCS_15KHZ
59 /* Spec 38.104 Table 5.4.2.3-1:Applicable NR-ARFCN per operating band in FR1 */
64 #define MEAS_TIMING_ARFCN 630432
66 #define FREQ_SHIFT_7P5KHZ FALSE
67 #define SSB_MULT_CARRIER_BAND FALSE
68 #define MULT_CELL_CARRIER FALSE
69 #define NUM_SYMBOLS_PER_SLOT 14 /* Number of symbols within a slot */
70 #define CORESET0_END_PRB 48
71 #define CORESET1_NUM_PRB 24
73 /* MACRO defines for PRACH Configuration */
74 #define PRACH_MAX_PRB 24 /* As per (spec 38.211-Table 6.3.3.2-1), max allocated PRBs can go upto 24 */
75 #define NUM_UNUSED_ROOT_SEQ 0
76 #define UNUSED_ROOT_SEQ 1
77 #define PRACH_MULT_CARRIER_BAND FALSE
79 #define RSS_MEASUREMENT_UNIT DONT_REPORT_RSSI
80 #define RA_CONT_RES_TIMER 64
82 /* MACRCO Ddefine for PDCCH Configuration */
83 #define PDCCH_CTRL_RSRC_SET_ONE_ID 1
84 #define PDCCH_CTRL_RSRC_SET_ONE_DURATION 2 /* Duration for control resource set id i */
85 #define PDCCH_CTRL_RSRC_SET_ONE_PRECOD_GRANULARITY 1 /* Precoded granularity */
86 #define PDCCH_SRCH_SPC_TWO_ID 2
87 #define PDCCH_SRCH_SPC_TWO_AGG_LVL1_CANDIDATE 7 /* Num of candidate at aggregation level 1 */
88 #define PDCCH_SRCH_SPC_TWO_AGG_LVL2_CANDIDATE 7 /* Num of candidate at aggregation level 2 */
89 #define PDCCH_SRCH_SPC_TWO_AGG_LVL4_CANDIDATE 4 /* Num of candidate at aggregation level 4 */
90 #define PDCCH_SRCH_SPC_TWO_AGG_LVL8_CANDIDATE 2 /* Num of candidate at aggregation level 8 */
91 #define PDCCH_SRCH_SPC_TWO_AGG_LVL16_CANDIDATE 1 /* Num of candidate at aggregation level 16 */
92 #define PDCCH_SRCH_SPC_TWO_UE_SPEC_DCI_FORMAT 0 /* format 0-0 and 1-0 */
93 #define PDCCH_SYMBOL_WITHIN_SLOT 128 /* Symbol within Slot Value */
95 /* MACRO Ddefine for PDSCH Configuration */
96 #define NUM_TIME_DOM_RSRC_ALLOC 2
97 #define PDSCH_START_SYMBOL 3
98 #define PDSCH_LENGTH_SYMBOL 11
99 #define PDSCH_RES_ALLOC_TYPE 1 /* Resource allocation type */
100 #define PDSCH_MAX_CODEWORD_SCH_BY_DCI 0 /* Max num of codewords scheduled by DCI */
101 #define PDSCH_RBG_SIZE 0 /* 0: config1 */
102 #define PDSCH_NUM_HARQ_PROC 5
104 /* MACRO Define for PUSCH Configuration */
105 #define MAX_UL_ALLOC 16
106 #define PUSCH_K2_CFG1 4
107 #define PUSCH_K2_CFG2 5
108 #define PUSCH_START_SYMBOL 3
109 #define PUSCH_LENGTH_SYMBOL 11
111 #define PUSCH_TRANSFORM_PRECODER 1 /* 1: Disabled */
112 #define PUSCH_MAX_MIMO_LAYERS 1
113 #define PUSCH_PROCESS_TYPE2_ENABLED false
115 /* MACRO defines for SRC config */
116 #define SRS_RSRC_ID 1
117 #define SRS_RSET_ID 1
118 #define SRS_COMB_OFFSET_N2 0
119 #define SRS_CYCLIC_SHIFT_N2 0
120 #define SRS_FREQ_DOM_POS 0
121 #define SRS_FREQ_DOM_SHIFT 0
126 #define APERIODIC_SRS_RESRC_TRIGGER 1
131 #define MAX_DU_PORT 2
132 #define F1_INTERFACE 0
133 #define E2_INTERFACE 1
141 /* Macro definitions for F1 procedures */
142 #define CU_DU_NAME_LEN_MAX 30 /* Max length of CU/DU name string */
143 #define MAX_F1_CONNECTIONS 65536 /* Max num of F1 connections */
145 #define MAXNRARFCN 3279165 /* Maximum values of NRAFCN */
146 #define MAX_NRCELL_BANDS 2 /* Maximum number of frequency bands */
147 #define MAX_NUM_OF_SLICE_ITEMS 1024 /* Maximum number of signalled slice support items */
148 #define MAX_BPLMN_NRCELL_MINUS_1 1 /* Maximum number of PLMN Ids broadcast in an NR cell minus 1 */
149 #define MAXNUMOFSIBTYPES 32 /* Maximum number of SIB types */
150 #define MAX_TNL_ASSOC 32 /* Max num of TNL Assoc between CU and DU */
151 #define MAXCELLINENB 256 /* Max num of cells served by eNB */
152 #define MAX_NUM_OF_UE_ID 65536 /* Max num of UEs served by DU */
153 #define MAXNUMOFUACPLMN 12 /* Maximum number of PLMN ids*/
154 #define MAXNUMOFUACPERPLMN 64 /* Maximum number of signalled categories per PLMN */
155 #define NR_RANAC 150 /* RANAC */
156 #define DEFAULT_CELLS 1 /* Max num of broadcast PLMN ids */
157 #define IE_EXTENSION_LIST_COUNT 1
159 /* Macro definitions for MIB/SIB1 */
161 #define CELL_IDENTITY 1
163 /* Macro definitions for DUtoCuRrcContainer */
164 #define CELL_GRP_ID 0
166 #define SR_PROHIBIT_TMR 5
167 #define SR_TRANS_MAX 2
168 #define PERIODIC_BSR_TMR 2
169 #define RETX_BSR_TMR 5
170 #define SR_DELAY_TMR 6
172 #define TIME_ALIGNMENT_TMR 7
173 #define PHR_PERIODIC_TMR 7
174 #define PHR_PROHIBHIT_TMR 0
175 #define PHR_PWR_FACTOR_CHANGE 3
176 #define PHR_MODE_OTHER_CG 0
177 #define SN_FIELD_LEN_12BIT 0 /*As per Spec 38.331, The network configures only value size12 in SN-FieldLengthAM for SRB */
178 #define T_POLL_RETRANSMIT 8 /* Enum for 45ms */
179 #define T_POLL_RETRANSMIT_VAL 45 /* Value in ms */
180 #define POLL_PDU 0 /* Enum for 4 pdus */
181 #define POLL_PDU_VAL 4 /* Value of poll pdu */
182 #define POLL_BYTE 43 /* Enum for infinite poll bytes */
183 #define POLL_BYTE_VAL -1 /* Value for infinite poll byte */
184 #define MAX_RETX_THRESHOLD 5 /* Enum for 8 retransmissions */
185 #define MAX_RETX_THRESHOLD_VAL 8 /* Value for 8 retransmissions */
186 #define T_REASSEMBLY 8 /* enum for RE_ASM_40MS */
187 #define T_REASSEMBLY_VAL 40 /* default re assembly timer */
188 #define T_STATUS_PROHIBHIT 7 /* enum for PROH_35MS */
189 #define T_STATUS_PROHIBHIT_VAL 35 /* default status prohibit timer */
190 #define MAC_LC_PRIORITY 1
191 #define PRIORTISIED_BIT_RATE 15
192 #define BUCKET_SIZE_DURATION 5
195 #define PDSCH_HARQ_ACK_CODEBOOK 1
196 #define SERV_CELL_IDX 0
197 #define RLM_SYNC_OUT_SYNC_THRESHOLD 0
198 #define ACTIVE_DL_BWP_ID 0
199 #define ACTIVE_UL_BWP_ID 0
200 #define SCRAMBLING_ID NR_PCI
201 #define DMRS_ADDITIONAL_POS 0 /* DMRS Additional poistion */
202 #define RES_ALLOC_TYPE 1 /* Resource allocation type */
204 /* MACRO definitions for modulcation order */
205 #define MOD_ORDER_QPSK 2
206 #define MOD_ORDER_QAM16 4
207 #define MOD_ORDER_QAM64 6
208 #define MOD_ORDER_QAM256 8
209 #define PDSCH_MCS_INDEX 20 /* For 64QAM, valid mcs index: 17-28 in 38.214 - Table 5.1.3.1-1*/
210 #define PUSCH_MCS_INDEX 10 /* For 16QAM, valid mcs index: 10-16 in 38.214 - Table 5.1.3.1-1*/
213 #define MIN_TEID 1 /*[Spec 29.281,Sec 5.1]: All Zero TEIDs are never assigned for setting up GTP-U Tunnel*/
214 #define MAX_TEID MAX_NUM_DRB * MAX_NUM_UE /*[Spec 29.281]: Max limit is not mentioned but as per GTP-U Header Format, TEID occupies 4 octets */
219 #define DEDICATED_RATIO 10
220 #define NUM_OF_SUPPORTED_SLICE 2
223 /* Macros for Drx configuration */
224 #define DRX_ONDURATION_TIMER_VALUE_PRESENT_IN_MS true
225 #define DRX_ONDURATION_TIMER_VALUE_IN_SUBMS 32
226 #define DRX_ONDURATION_TIMER_VALUE_IN_MS 10
227 #define DRX_INACTIVITY_TIMER 2
228 #define DRX_HARQ_RTT_TIMER_DL 56
229 #define DRX_HARQ_RTT_TIMER_UL 56
230 #define DRX_RETRANSMISSION_TIMER_DL 4
231 #define DRX_RETRANSMISSION_TIMER_UL 4
232 #define DRX_LONG_CYCLE_START_OFFSET_CHOICE 40
233 #define DRX_LONG_CYCLE_START_OFFSET_VAL 8
234 #define DRX_SHORT_CYCLE_PRESENT true
235 #define DRX_SHORT_CYCLE 2
236 #define DRX_SHORT_CYCLE_TIMER 2
237 #define DRX_SLOT_OFFSET 0
240 /* In case of initial configuration we are supporting only 2 measurement
241 * information RRU.PrbTotDl and RRU.PrbTotUl.
242 * In case of configuration modification we are supporting 3 measurement
243 * information RRU.PrbTotDl, RRU.PrbTotUl and UECNTX.RelReq */
244 #define NUM_OF_MEASUREMENT_INFO_SUPPORTED(_configType) \
245 ((_configType == CONFIG_ADD) ? 2 :3)
263 INVALID_CU_UE_F1AP_ID,
264 INVALID_DU_UE_F1AP_ID,
265 INTERACTION_WITH_OTHER_PROC,
267 RADIO_RELATED_REASON,
268 INSUFFICIENT_RADIO_RESOURCE,
274 SLICE_RESOURCE_UNAVAILABLE,
275 AMF_ABNORMAL_RELEASE,
281 TRANS_CAUSE_UNSPECIFIED,
282 TRANSPORT_RESOURCE_UNAVAIL
288 ABSTRACT_SYNTAX_ERR_REJECT,
289 ABSTRACT_SYNTAX_ERR_NOTIFY,
290 INCOMPATIBLE_MESSAGE,
292 ABSTRACT_SYNTAX_ERR_MSG_CONSTRUCT,
293 PROTOCOL_CAUSE_UNSPECIFIED
298 CONTROL_PROC_OVERLOAD,
299 INSUFF_USER_PLANE_RESOURCE,
301 O_AND_M_INTERVENTION,
302 MISC_CAUSE_UNSPECIFIED
425 REJECT_RRC_CONN_NON_EMERG_MODT,
426 REJECT_RRC_CONN_SIGNALLING,
427 PERMIT_EMERG_SESSION_AND_MOBILE_TERM_SERVICE,
428 PERMIT_HIGH_PRIOR_SESSION_AND_MOBILE_TERM_SERVICE
429 }F1UacStandardAction;
433 PDSCH_MAPPING_TYPE_A,
434 PDSCH_MAPPING_TYPE_B,
439 PUSCH_MAPPING_TYPE_A,
440 PUSCH_MAPPING_TYPE_B,
443 typedef struct f1RrcVersion
445 char rrcVer[30]; /* Latest RRC Version */
446 uint32_t extRrcVer; /* Latest RRC version extended */
449 typedef struct f1FailCause
453 RadioNwCause radioNwCause; /* Radio Network Layer Cause */
454 TransLayerCause transLayerCause; /* Transport Layer Cause */
455 ProtocolCause protCause; /* Protocol Cause */
456 MiscCause miscCause; /* Miscellaneous Cause */
460 typedef struct f1ProcCode
466 typedef struct f1TriggMsg
472 typedef struct f1ProcCrit
478 typedef struct f1CritDignosIE
480 F1ProcCritVal ieCritVal;
485 typedef struct f1CritDiagnostic
488 F1ProcCode procCode; /* Procedure Code */
489 F1TriggMsg triggeringMsg; /* Triggering Message */
490 F1ProcCrit procCrit; /* Criticality of Triggering msg/proc */
492 F1CritDignosIE diagnosIE;
495 typedef struct f1FailureIE
497 uint32_t transId; /* Uniquely identify transaction */
498 F1FailCause cause; /* Failure cause */
499 uint8_t timeToWait; /* Seconds to be waited before retry */
500 F1CritDiagnostic critDiagnostic; /* Critical diagnostics */
503 typedef struct f1LogicalConnUeAssoc
505 uint32_t gnbCuUeF1apId;
506 uint32_t gnbDuUeF1apId;
507 }F1LogicalConnUeAssoc;
509 typedef struct f1ResetType
513 F1ResetAll resetAll; /* Reset All */
514 F1LogicalConnUeAssoc ueAssocLogicalConn[MAX_F1_CONNECTIONS]; /* In case of Partial Reset : UE associated logical F1 conn list*/
518 typedef struct nrEcgi
524 typedef struct f1SibType
531 typedef struct f1TxBw
533 F1NrScs nrScs; /* NR subcarrier spacing */
534 F1Nrb nrb; /* Transmission bandwidth expressed in units of RBs */
537 typedef struct f1SulInfo
539 uint32_t sulArfcn; /* SUL ARFCN */
540 F1TxBw sulTxBw; /* SUL transmission bandwidth */
543 typedef struct f1FreqBand
546 uint16_t sulBand[MAX_NRCELL_BANDS];
549 typedef struct f1NrFreqInfo
553 F1FreqBand freqBand[MAX_NRCELL_BANDS];
556 typedef struct f1NrFddInfo
558 F1NrFreqInfo ulNrFreqInfo; /* UL NR Frequency Info */
559 F1NrFreqInfo dlNrFreqInfo; /* DL NR Frequency Info */
560 F1TxBw ulTxBw; /* UL Transmission bandwidth */
561 F1TxBw dlTxBw; /* DL Transmission bandwidth */
564 typedef struct f1NrTddInfo
566 F1NrFreqInfo nrFreqInfo; /* NR Frequency Info */
567 F1TxBw nrTxBw; /* NR Transmission Bandwidth */
570 typedef struct f1NrModeInfo
579 typedef struct f1EutraFddInfo
581 uint16_t ulOffset; /* UL offset to Point A */
582 uint16_t dlOffset; /* DL offset to Point A */
585 typedef struct f1EutraTddInfo
587 uint16_t tddOffset; /* Offset to Point A */
590 typedef struct f1EutraModeInfo
599 typedef struct epIpAddr
601 char transportAddr[20]; /* Transport Layer Address */
604 typedef struct epIpAddrPort
610 typedef struct f1SrvdPlmn
613 Plmn extPlmn; /* Extended available PLMN list */
614 SupportedSliceList taiSliceSuppLst;
617 typedef struct f1BrdcstPlmnInfo
619 Plmn plmn[MAX_PLMN]; /* PLMN id list */
620 Plmn extPlmn[MAX_PLMN]; /* Extended PLMN id list */
621 uint16_t tac; /* 5GS-TAC */
622 uint32_t nrCellId; /* NR Cell id */
623 uint8_t ranac; /* RAN Area code */
626 typedef struct f1CellInfo
628 NrEcgi nrCgi; /* Cell global Identity */
629 uint32_t nrPci; /* Physical Cell Identity */
630 F1SrvdPlmn srvdPlmn[MAX_PLMN];
633 typedef struct f1DuCellInfo
635 F1CellInfo cellInfo; /* cell info */
636 uint16_t tac; /* tracking area code */
637 uint16_t epsTac; /* Configured EPS TAC */
638 NrModeInfo f1Mode; /* NR mode info : FDD/TDD */
639 uint8_t measTimeCfgDuration; /* Measurement timing configuration */
640 F1CellDir cellDir; /* Cell Direction */
641 F1CellType cellType; /* Cell Type */
642 F1BrdcstPlmnInfo brdcstPlmnInfo[MAX_BPLMN_NRCELL_MINUS_1]; /* Broadcast PLMN Identity Info List */
645 typedef struct f1DuSysInfo
647 uint8_t *mibMsg; /* MIB message */
649 uint8_t *sib1Msg; /* SIB1 message */
653 typedef struct f1CuSysInfo
655 F1SibType sibTypeToUpd[MAXNUMOFSIBTYPES]; /* SIB types to be updated */
658 typedef struct f1DuSrvdCellInfo
660 F1DuCellInfo duCellInfo; /* gNB-DU served cell info */
661 F1DuSysInfo duSysInfo; /* gNB-DU System Information */
664 typedef struct f1DuSrvdCellToDel
666 NrEcgi oldNrCgi; /* Old NR CGI */
667 F1DuSrvdCellInfo srvdCellInfo; /* Info of served cell to be deleted */
670 typedef struct f1CuActCellInfo
672 F1CellInfo cuCellInfo; /* gNB-CU available cell info */
673 F1CuSysInfo cuSysInfo; /* gNB-CU System Information */
676 typedef struct f1ActCellFail
682 typedef struct srvStatus
685 bool switchOffOngoing;
688 typedef struct f1CellStatus
691 SrvStatus status; /* Service status */
694 typedef struct f1DedSIDelUE
696 uint32_t gnbCuUeF1apId;
700 typedef struct tnlAssocInfo
703 EpIpAddr epIpAddr; /* Endpoint-IP Address */
704 EpIpAddrPort epIpAddrport; /* Endpoint-IP Address and Port */
707 typedef struct f1TnlAssocUsage
713 typedef struct f1TnlAssoc
715 F1TnlAssocAddr assocInfo; /* TNL Assoc Transport Layer Info */
716 F1TnlAssocUsage assocUsage; /* TNL Assoc usage */
719 typedef struct f1TnlAssocToRmv
721 F1TnlAssocAddr assocInfoCu; /* TNL Assoc Transport Layer Info of CU */
722 F1TnlAssocAddr assocInfoDu; /* TNL Assoc Transport Layer Info of DU */
725 typedef struct f1TnlAssocSetupFail
727 F1TnlAssocAddr assocInfo;
729 }F1TnlAssocSetupFail;
732 typedef struct f1CellBarred
735 CellBarred cellBarred;
738 typedef struct f1EutraCell
740 uint32_t eutraCellId; /* EUTRA cell id */
741 F1EutraModeInfo mode; /* EUTRA mode info : FDD/TDD */
742 uint8_t rsrcInd; /* Protected EUTRA resource Indication */
745 typedef struct f1ProtectEUTRARsrc
747 uint32_t specShareGrpId; /* Spectrum sharing group id */
748 F1EutraCell eutraCellList[MAXCELLINENB]; /* EUTRA cells list */
751 typedef struct f1UacOperatorDefined
753 uint8_t accessCategory;
755 }F1UacOperatorDefined;
757 typedef struct f1UacCategoryType
761 F1UacStandardAction action; /* UAC standardized action */
762 F1UacOperatorDefined operatorDef; /* UAC operator defined */
766 typedef struct f1UacType
768 uint8_t uacReducInd; /* Value 0 means no access rate reduction. Value 100 means full access rate reduction */
769 F1UacCategoryType uacCategoryType; /* UAC Category type */
772 /* Unified Access Class Assistance Information */
773 typedef struct f1UacAssistInfo
775 Plmn plmn[MAXNUMOFUACPLMN]; /* UAC PLMN list */
776 F1UacType uacType[MAXNUMOFUACPERPLMN]; /* UAC Type list */
779 /* F1 setup related structures */
781 typedef struct f1SetupReq
783 uint32_t transId; /* Uniquely identify transaction */
784 uint32_t duId; /* DU ID */
785 char duName[CU_DU_NAME_LEN_MAX]; /* DU name */
786 F1DuSrvdCellInfo srvdCellLst[MAX_NUM_CELL]; /* Serving cell list */
787 F1RrcVersion rrcVersion; /* RRC version */
790 typedef struct f1setupRsp
792 uint32_t transId; /* Uniquely identify transaction */
793 char cuName[CU_DU_NAME_LEN_MAX]; /* CU Name */
794 F1CuActCellInfo actCellInfo; /* cells to be activated */
795 F1RrcVersion rrcVersion; /* RRC version */
798 typedef struct f1SetupFail
800 F1FailureIE setupFail;
803 /* At reception of the RESET message the gNB-DU shall release all allocated resources on F1
804 * and radio resources related to the UE association(s) indicated explicitly or implicitly in
805 * the RESET message and remove the indicated UE contexts including F1AP ID. */
806 typedef struct f1Reset
808 uint32_t transId; /* Uniquely identify transaction */
809 F1FailCause cause; /* Failure cause */
810 F1ResetType resetType; /* type of reset */
813 /* After the gNB-CU has released all assigned F1 resources and the UE F1AP IDs for all indicated
814 * UE associations which can be used for new UE-associated logical F1-connections over the F1 interface,
815 * the gNB-CU shall respond with the RESET ACKNOWLEDGE message. */
816 typedef struct f1ResetAck
818 uint32_t transId; /* Uniquely identify transaction */
819 F1LogicalConnUeAssoc ueAssocLogicalConn[MAX_F1_CONNECTIONS]; /* UE associated logical F1-connection list */
820 F1CritDiagnostic critDiagnostic; /* Critical diagnostics */
823 typedef struct f1ErrorInd
825 uint32_t transId; /* Uniquely identify transaction */
826 F1Entity errorOrigin; /* Specifies if error is originated at DU or CU */
827 F1FailCause cause; /* Failure cause */
828 /* If failure is due to Ue related message. */
829 uint32_t gnbCuUeF1apId; /* gNB-CU UE F1AP Id */
830 uint32_t gnbDuUeF1apId; /* gNB-DU UE F1AP Id */
831 F1CritDiagnostic critDiagnostic; /* Critical diagnostics */
834 typedef struct f1GnbDuCfgUpd
836 uint32_t transId; /* Uniquely identify transaction */
837 F1DuSrvdCellInfo srvdCellLstAdd[MAX_NUM_CELL]; /* Served cell list to be added */
838 F1DuSrvdCellToDel srvdCellLstMod[MAX_NUM_CELL]; /* Served cell list to be modified */
839 NrEcgi srvdCellLstDel[MAX_NUM_CELL]; /* Served cell list to be deleted */
840 F1CellStatus cellStatus[MAX_NUM_CELL]; /* Cell status */
841 F1DedSIDelUE ueLst[MAX_NUM_UE]; /* Ue list that requires dedicated SI delivery */
843 F1TnlAssocToRmv gnbDuTnlAssocRmv[MAX_TNL_ASSOC]; /* TNL Assoc list to remove */
846 typedef struct f1GnbDuCfgUpdAck
848 uint32_t transId; /* Uniquely identify transaction */
849 F1CuActCellInfo cellLstAct[MAX_NUM_CELL]; /* List of cells to be activated */
850 F1CritDiagnostic critDiagnostic; /* Critical diagnostics */
851 NrEcgi cellLstDeact[MAX_NUM_CELL]; /* List of cells to be deactivated */
854 typedef struct f1GnbDuCfgUpdFail
856 F1FailureIE gnbDuCfgUpdFail;
859 /* Sent by the gNB-CU to transfer updated information associated to an F1-C interface instance */
860 typedef struct f1GnbCuCfgUpd
862 uint32_t transId; /* Uniquely identifies transaction */
863 F1CuActCellInfo cellLstAct[MAX_NUM_CELL]; /* List of cells to be activated */
864 NrEcgi cellLstDeact[MAX_NUM_CELL]; /* List of cells to be deactivated */
865 F1TnlAssoc assocLstAdd[MAX_TNL_ASSOC]; /* List of TNL assocs to be added */
866 F1TnlAssoc assocLstUpd[MAX_TNL_ASSOC]; /* List of TNL assocs to be updated */
867 F1TnlAssocToRmv assocLstRmv[MAX_TNL_ASSOC]; /* List of TNL assocs to be removed */
868 F1CellBarred cellToBarList[MAX_NUM_CELL]; /* List of Cells to be barred */
869 F1ProtectEUTRARsrc protectEutraRsrcList[MAXCELLINENB]; /* List of Protected EUTRA resources */
872 /* Sent by a gNB-DU to a gNB-CU to acknowledge update of information
873 * associated to an F1-C interface instance */
874 typedef struct f1GnbCuCfgUpdAck
876 uint32_t transId; /* Uniquely identify transaction */
877 F1ActCellFail actCellFailList[MAX_NUM_CELL]; /* Cells failed to be activated list */
878 F1CritDiagnostic critDiagnostic; /* Critical diagnostics */
879 F1TnlAssocAddr assocSetupList[MAX_TNL_ASSOC]; /* TNL Assoc Setup list */
880 F1TnlAssocSetupFail assocSetupFailList[MAX_TNL_ASSOC]; /* TNL Assoc Setup fail list */
881 F1DedSIDelUE dedSiDelUelist[MAX_NUM_OF_UE_ID]; /* Dedicated SI delivery needed UE list */
884 typedef struct f1GnbCuCfgUpdFail
886 F1FailureIE gnbCuCfgUpdFail;
889 /* This procedure enables coordination of radio resource allocation between a gNB-CU and
890 * a gNB-DU. Coordination request is sent by CU to DU */
891 typedef struct f1GnbDuRsrcCoordReq
893 uint32_t transId; /* Uniquely identifies transaction */
894 F1ReqType reqType; /* Request type */
895 uint8_t cellResCoordReqCont; /* Container for X2AP E-UTRA - NR cell resource coordination request */
896 F1IgnoreReq ignoreReq; /* Ignore coordination request */
897 }F1GnbDuRsrcCoordReq;
899 /* This message is sent by a gNB-DU to a gNB-CU, to express the desired resource allocation
900 * for data traffic, as a response to the GNB-DU RESOURCE COORDINATION REQUEST. */
901 typedef struct f1GnbDuRsrcCoordRsp
903 uint32_t transId; /* Uniquely identifies transaction */
904 uint8_t cellResCoordRspCont; /* Container for X2AP E-UTRA - NR cell resource coordination response */
905 }F1GnbDuRsrcCoordRsp;
907 /* This message is sent by the gNB-DU to indicate to the gNB-CU its status of overload */
908 typedef struct f1GnbDuStatusInd
910 uint32_t transId; /* Uniquely identifies transaction */
911 F1GnbDuOvrloadInfo ovrloadInfo; /* gNB-DU overloaded information */
914 /* This message is sent by either the gNB-DU or the gNB-CU to intiate the removal
915 * of the interface instance and the related resources */
916 typedef struct f1RmvReq
918 uint32_t transId; /* Uniquely identifies transaction */
921 /* This message acknowledges the initiation of removal of the interface
922 * instance and the related resources */
923 typedef struct f1RmvRsp
925 uint32_t transId; /* Uniquely identifies transaction */
926 F1CritDiagnostic critDiagnos; /* Crititcality diagnostics */
929 /* This message indicates that removing the interface instance and the related
930 * resources cannot be accepted */
931 typedef struct f1RmvFail
933 uint32_t transId; /* Uniquely identifies transaction */
934 F1FailCause cause; /* Failure cause */
935 F1CritDiagnostic critDiagnostic; /* Criticality diagnostics */
938 /* This message is sent by the gNB-CU to indicate to the gNB-DU a need to reduce
939 * the rate at which UEs access the network. */
940 typedef struct f1NwkAccessRateRed
942 uint32_t transId; /* Uniquely identifies transaction */
943 F1UacAssistInfo uacAssistInfo; /* UAC Assistance Information */
947 typedef struct f1Ipaddr
953 typedef struct sctpParams
956 uint16_t duPort[MAX_DU_PORT];
963 typedef struct f1EgtpParams
965 F1IpAddr localIp; /* Ip address of local node */
966 uint16_t localPort; /* Sender Port at local node */
967 F1IpAddr destIp; /* Ip address of peer node */
968 uint16_t destPort; /* Sender port at peer node */
969 uint32_t minTunnelId;
970 uint32_t maxTunnelId;
973 typedef struct schedulerCfg
975 uint8_t numTxAntPorts; /*!< Number of Tx antenna ports */
976 uint8_t ulSchdType; /*!< Indicates which UL scheduler to use, range
977 * is 0..(number of schedulers - 1) */
978 uint8_t dlSchdType; /*!< Indicates which DL scheduler to use, range
979 * is 0..(number of schedulers - 1) */
980 uint8_t numCells; /*!< Max number of cells */
981 uint8_t maxUlUePerTti; /*!< Max number of UE in UL per TTI */
982 uint8_t maxDlUePerTti; /*!< Max number of UE in DL per TTI */
985 typedef struct mibParams
988 long subCarrierSpacingCommon;
989 long ssb_SubcarrierOffset;
990 long dmrs_TypeA_Position;
991 long controlResourceSetZero;
992 long searchSpaceZero;
994 long intraFreqReselection;
997 typedef struct siSchedInfo
999 long winLen; /* SI Window Length */
1000 long broadcastSta; /* Broadcast status */
1001 long preiodicity; /* si periodicity */
1003 long sibValTag; /* Value tag */
1006 typedef struct pdcchCfgCommon
1009 long ctrlRsrcSetZero; /* Control resource set zero */
1010 long searchSpcZero; /* Search space zero */
1011 long searchSpcId; /* Search space id */
1012 long ctrlRsrcSetId; /* Control resource set id */
1013 uint8_t monitorSlotPrdAndOffPresent;
1014 long monitorSlotPrdAndOff; /* Monitoring slot periodicity and offset */
1015 uint8_t monitorSymbolsInSlot[2]; /* Monitoring symbols within slot */
1016 long numCandAggLvl1; /* Number of candiates at aggregation level 1 */
1017 long numCandAggLvl2; /* Number of candiates at aggregation level 2 */
1018 long numCandAggLvl4; /* Number of candiates at aggregation level 4 */
1019 long numCandAggLvl8; /* Number of candiates at aggregation level 8 */
1020 long numCandAggLvl16; /* Number of candiates at aggregation level 16 */
1021 uint8_t searchSpcType; /* Search Space type */
1022 uint8_t commSrchSpcDciFrmt; /* DCI format of common search space type */
1023 long searchSpcSib1; /* Id of serch space for SIB1 */
1024 long pagingSearchSpc; /* Id of search space for paging */
1025 long raSearchSpc; /* Id of search space for Random Access proc */
1028 typedef struct pdschTimeDomainRsrcAlloc
1031 long mapType; /* Mapping Type */
1033 }PdschTimeDomainRsrcAlloc;
1035 typedef struct pdschCfgCommon
1038 uint8_t numTimeDomRsrcAlloc;
1039 PdschTimeDomainRsrcAlloc timeDomAlloc[MAX_NUM_DL_ALLOC];
1042 typedef struct bcchCfg
1044 long modPrdCoeff; /* Modification period co-efficient */
1047 typedef struct pcchCfg
1049 uint16_t dfltPagingCycle; /* Default paging cycle */
1050 uint8_t nAndPagingFrmOffsetType; /*Number of PagingFrames in PagingCycle defined in terms of T.*/
1051 uint8_t pageFrameOffset; /* Paging Frame offset */
1052 uint8_t ns; /* Number of paging occassions in paging frame */
1053 uint8_t firstPDCCHMontioringType; /* First PDCCH Monitoring Paging Occasion Presence Type*/
1054 uint16_t firstPDCCHMontioringInfo[MAX_PO_PER_PF];/*Indicates the first PDCCH monitoring occasion of each PO of the PF*/
1057 typedef struct scsSpecCarrier
1059 long scsOffset; /* Offset to point A considering subcarrier spacing */
1060 long scs; /* subcarrier spacing */
1061 long scsBw; /* Carrier bandwidth considering subcarrier spacing */
1065 typedef struct dlCfgCommon
1067 long freqBandInd; /* Downlink frequency band indicator */
1068 long offsetToPointA; /* DL ofset to point A */
1069 long locAndBw; /* Frequency location and bandwidth */
1070 ScsSpecCarrier dlScsCarrier; /* SCS Specific carrier */
1071 PdcchCfgCommon pdcchCfg;
1072 PdschCfgCommon pdschCfg;
1077 typedef struct rachCfgCommon
1080 long prachCfgIdx; /* PRACH configuration index */
1081 long msg1Fdm; /* Num of PRACH transmission occassions */
1082 long msg1FreqStart; /* Offset of lowest msg1 transmission occassion */
1083 long zeroCorrZoneCfg; /* Zero correlation zone configuration */
1084 long preambleRcvdTgtPwr; /* Traget power level */
1085 long preambleTransMax; /* Max num of preamble transmission */
1086 long pwrRampingStep; /* Power ramping steps for PRACH */
1087 long raRspWindow; /* RA response window */
1088 long numRaPreamble; /* Total num of preamble used in random access */
1089 long numSsbPerRachOcc; /* Numer of SSBs per RACH Occassion */
1090 long numCbPreamblePerSsb; /* Number of Contention-Based preamble per SSB */
1091 long contResTimer; /* Contention resolution timer */
1093 uint8_t rootSeqIdxPresent;
1094 long rootSeqIdx; /* PRACH root sequence index */
1095 long msg1Scs; /* Msg1 subcarrier spacing */
1096 long restrictedSetCfg; /* Restricted set configuration */
1099 typedef struct puschCfgCmnTimeDomAlloc
1104 }PuschCfgCmnTimeDomAlloc;
1106 typedef struct puschCfgCommon
1108 uint8_t puschCfgPresent;
1109 uint8_t numTimeDomRsrcAlloc;
1110 PuschCfgCmnTimeDomAlloc timeDomAllocList[MAX_UL_ALLOC];
1111 long msg3DeltaPreamble;
1112 long p0NominalWithGrant;
1115 typedef struct pucchCfgCommon
1123 typedef struct ulCfgCommon
1125 long freqBandInd; /* Uplink frequency band indicator */
1126 long pMax; /* Max UL transmission power that UE applies */
1127 long locAndBw; /* Frequency location and bandwidth */
1128 ScsSpecCarrier ulScsCarrier; /* SCS Specific carrier */
1129 RachCfgCommon rachCfg;
1130 PuschCfgCommon puschCfg;
1131 PucchCfgCommon pucchCfg;
1132 long timeAlignTimerComm;
1135 typedef struct tddUlDlCfgCommon
1137 long refScs; /* Reference subcarrier spacing */
1138 long txPrd; /* Transmission periodicity */
1145 typedef struct srvCellCfgCommSib
1150 uint8_t ssbPosInBurst;
1151 long ssbPrdServingCell;
1152 TddUlDlCfgCommon tddCfg;
1153 long ssPbchBlockPwr;
1156 typedef struct sib1Params
1161 uint8_t cellIdentity;
1162 long cellResvdForOpUse;
1163 long connEstFailCnt;
1164 long connEstFailOffValidity;
1165 long connEstFailOffset;
1166 SiSchedInfo siSchedInfo;
1167 SrvCellCfgCommSib srvCellCfgCommSib;
1170 typedef struct threadInfo
1172 SSTskId duAppSTskId;
1173 uint8_t duAppCoreId;
1178 SSTskId rlcUlSTskId;
1179 uint8_t rlcUlCoreId;
1180 SSTskId rlcMacSTskId;
1181 uint8_t rlcMacCoreId;
1184 SSTskId lwrMacSTskId;
1185 uint8_t lwrMacCoreId;
1188 typedef struct duCfgParams
1193 uint16_t maxSupportedUes;
1195 ThreadInfo threadInfo;
1196 SctpParams sctpParams; /* SCTP Params */
1197 F1EgtpParams egtpParams; /* EGTP Params */
1198 F1DuSrvdCellInfo srvdCellLst[MAX_NUM_CELL]; /* Serving cell list *///TODO: this must be removed eventually
1199 MacCellCfg macCellCfg; /* MAC cell configuration */
1200 MibParams mibParams; /* MIB Params */
1201 Sib1Params sib1Params; /* SIB1 Params */
1202 MacSliceCfgReq tempSliceCfg;
1208 typedef struct rRMPolicyMemberList
1214 }RRMPolicyMemberList;
1225 typedef struct rrmPolicyList
1228 RrmResourceType resourceType;
1229 uint8_t rRMMemberNum;
1230 RRMPolicyMemberList rRMPolicyMemberList[2];
1231 uint8_t rRMPolicyMaxRatio;
1232 uint8_t rRMPolicyMinRatio;
1233 uint8_t rRMPolicyDedicatedRatio;
1237 DuCfgParams duCfgParam;
1239 /*function declarations */
1240 uint8_t readClCfg();
1242 uint8_t duReadCfg();
1243 void printDuConfig();
1245 uint8_t fillDuSrvdCellSysInfo(F1DuSysInfo *sysInfo);
1247 uint16_t calcSliv(uint8_t startSymbol, uint8_t lengthSymbol);
1248 uint8_t cpyRrmPolicyInDuCfgParams(RrmPolicyList rrmPolicy[], uint8_t policyNum, MacSliceCfgReq *tempSliceCfg);
1250 #endif /* __DU_CONFIG_H__ */
1252 /**********************************************************************
1254 **********************************************************************/