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 */
37 #define MEAS_TIMING_ARFCN 630432
39 #define FREQ_SHIFT_7P5KHZ FALSE
40 #define SSB_MULT_CARRIER_BAND FALSE
41 #define MULT_CELL_CARRIER FALSE
42 #define NUM_SYMBOLS_PER_SLOT 14 /* Number of symbols within a slot */
43 #define CORESET0_END_PRB 48
44 #define CORESET1_NUM_PRB 24
46 /* MACRO defines for PRACH Configuration */
47 #define PRACH_MAX_PRB 24 /* As per (spec 38.211-Table 6.3.3.2-1), max allocated PRBs can go upto 24 */
48 #define NUM_UNUSED_ROOT_SEQ 0
49 #define UNUSED_ROOT_SEQ 1
50 #define PRACH_MULT_CARRIER_BAND FALSE
52 #define RSS_MEASUREMENT_UNIT DONT_REPORT_RSSI
53 #define RA_CONT_RES_TIMER 64
55 /* MACRCO Ddefine for PDCCH Configuration */
56 #define PDCCH_CTRL_RSRC_SET_ONE_ID 1
57 #define PDCCH_CTRL_RSRC_SET_ONE_DURATION 2 /* Duration for control resource set id i */
58 #define PDCCH_CTRL_RSRC_SET_ONE_PRECOD_GRANULARITY 1 /* Precoded granularity */
59 #define PDCCH_SRCH_SPC_TWO_ID 2
60 #define PDCCH_SRCH_SPC_TWO_AGG_LVL1_CANDIDATE 7 /* Num of candidate at aggregation level 1 */
61 #define PDCCH_SRCH_SPC_TWO_AGG_LVL2_CANDIDATE 7 /* Num of candidate at aggregation level 2 */
62 #define PDCCH_SRCH_SPC_TWO_AGG_LVL4_CANDIDATE 4 /* Num of candidate at aggregation level 4 */
63 #define PDCCH_SRCH_SPC_TWO_AGG_LVL8_CANDIDATE 2 /* Num of candidate at aggregation level 8 */
64 #define PDCCH_SRCH_SPC_TWO_AGG_LVL16_CANDIDATE 1 /* Num of candidate at aggregation level 16 */
65 #define PDCCH_SRCH_SPC_TWO_UE_SPEC_DCI_FORMAT 0 /* format 0-0 and 1-0 */
66 #define PDCCH_SYMBOL_WITHIN_SLOT 128 /* Symbol within Slot Value */
68 /* MACRO Ddefine for PDSCH Configuration */
69 #define NUM_TIME_DOM_RSRC_ALLOC 2
70 #define PDSCH_START_SYMBOL 3
71 #define PDSCH_LENGTH_SYMBOL 11
72 #define PDSCH_RES_ALLOC_TYPE 1 /* Resource allocation type */
73 #define PDSCH_MAX_CODEWORD_SCH_BY_DCI 0 /* Max num of codewords scheduled by DCI */
74 #define PDSCH_RBG_SIZE 0 /* 0: config1 */
75 #define PDSCH_NUM_HARQ_PROC 5
77 /* MACRO Define for PUSCH Configuration */
78 #define MAX_UL_ALLOC 16
79 #define PUSCH_K2_CFG1 4
80 #define PUSCH_K2_CFG2 5
81 #define PUSCH_START_SYMBOL 3
82 #define PUSCH_LENGTH_SYMBOL 11
84 #define PUSCH_TRANSFORM_PRECODER 1 /* 1: Disabled */
85 #define PUSCH_MAX_MIMO_LAYERS 1
86 #define PUSCH_PROCESS_TYPE2_ENABLED false
88 /* MACRO defines for SRC config */
91 #define SRS_COMB_OFFSET_N2 0
92 #define SRS_CYCLIC_SHIFT_N2 0
93 #define SRS_FREQ_DOM_POS 0
94 #define SRS_FREQ_DOM_SHIFT 0
99 #define APERIODIC_SRS_RESRC_TRIGGER 1
104 #define MAX_DU_PORT 2
105 #define F1_INTERFACE 0
106 #define E2_INTERFACE 1
114 /* Macro definitions for F1 procedures */
115 #define CU_DU_NAME_LEN_MAX 30 /* Max length of CU/DU name string */
116 #define MAX_F1_CONNECTIONS 65536 /* Max num of F1 connections */
118 #define MAXNRARFCN 3279165 /* Maximum values of NRAFCN */
119 #define MAX_NRCELL_BANDS 2 /* Maximum number of frequency bands */
120 #define MAX_NUM_OF_SLICE_ITEMS 1024 /* Maximum number of signalled slice support items */
121 #define MAX_BPLMN_NRCELL_MINUS_1 1 /* Maximum number of PLMN Ids broadcast in an NR cell minus 1 */
122 #define MAXNUMOFSIBTYPES 32 /* Maximum number of SIB types */
123 #define MAX_TNL_ASSOC 32 /* Max num of TNL Assoc between CU and DU */
124 #define MAXCELLINENB 256 /* Max num of cells served by eNB */
125 #define MAX_NUM_OF_UE_ID 65536 /* Max num of UEs served by DU */
126 #define MAXNUMOFUACPLMN 12 /* Maximum number of PLMN ids*/
127 #define MAXNUMOFUACPERPLMN 64 /* Maximum number of signalled categories per PLMN */
128 #define DEFAULT_CELLS 1 /* Max num of broadcast PLMN ids */
129 #define IE_EXTENSION_LIST_COUNT 1
131 /* Macro definitions for MIB/SIB1 */
133 #define CELL_IDENTITY 1
135 /* Macro definitions for DUtoCuRrcContainer */
136 #define CELL_GRP_ID 0
138 #define SR_PROHIBIT_TMR 5
139 #define SR_TRANS_MAX 2
140 #define PERIODIC_BSR_TMR 2
141 #define RETX_BSR_TMR 5
142 #define SR_DELAY_TMR 6
144 #define TIME_ALIGNMENT_TMR 7
145 #define PHR_PERIODIC_TMR 7
146 #define PHR_PROHIBHIT_TMR 0
147 #define PHR_PWR_FACTOR_CHANGE 3
148 #define PHR_MODE_OTHER_CG 0
149 #define SN_FIELD_LEN_12BIT 0 /*As per Spec 38.331, The network configures only value size12 in SN-FieldLengthAM for SRB */
150 #define T_POLL_RETRANSMIT 8 /* Enum for 45ms */
151 #define T_POLL_RETRANSMIT_VAL 45 /* Value in ms */
152 #define POLL_PDU 0 /* Enum for 4 pdus */
153 #define POLL_PDU_VAL 4 /* Value of poll pdu */
154 #define POLL_BYTE 43 /* Enum for infinite poll bytes */
155 #define POLL_BYTE_VAL -1 /* Value for infinite poll byte */
156 #define MAX_RETX_THRESHOLD 5 /* Enum for 8 retransmissions */
157 #define MAX_RETX_THRESHOLD_VAL 8 /* Value for 8 retransmissions */
158 #define T_REASSEMBLY 8 /* enum for RE_ASM_40MS */
159 #define T_REASSEMBLY_VAL 40 /* default re assembly timer */
160 #define T_STATUS_PROHIBHIT 7 /* enum for PROH_35MS */
161 #define T_STATUS_PROHIBHIT_VAL 35 /* default status prohibit timer */
162 #define MAC_LC_PRIORITY 1
163 #define PRIORTISIED_BIT_RATE 15
164 #define BUCKET_SIZE_DURATION 5
167 #define PDSCH_HARQ_ACK_CODEBOOK 1
168 #define SERV_CELL_IDX 0
169 #define RLM_SYNC_OUT_SYNC_THRESHOLD 0
170 #define ACTIVE_DL_BWP_ID 0
171 #define ACTIVE_UL_BWP_ID 0
172 #define SCRAMBLING_ID NR_PCI
173 #define DMRS_ADDITIONAL_POS 0 /* DMRS Additional poistion */
174 #define RES_ALLOC_TYPE 1 /* Resource allocation type */
176 /* MACRO definitions for modulcation order */
177 #define MOD_ORDER_QPSK 2
178 #define MOD_ORDER_QAM16 4
179 #define MOD_ORDER_QAM64 6
180 #define MOD_ORDER_QAM256 8
181 #define PDSCH_MCS_INDEX 20 /* For 64QAM, valid mcs index: 17-28 in 38.214 - Table 5.1.3.1-1*/
182 #define PUSCH_MCS_INDEX 10 /* For 16QAM, valid mcs index: 10-16 in 38.214 - Table 5.1.3.1-1*/
185 #define MIN_TEID 1 /*[Spec 29.281,Sec 5.1]: All Zero TEIDs are never assigned for setting up GTP-U Tunnel*/
186 #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 */
191 #define DEDICATED_RATIO 10
194 /* Macros for Drx configuration */
195 #define DRX_ONDURATION_TIMER_VALUE_PRESENT_IN_MS true
196 #define DRX_ONDURATION_TIMER_VALUE_IN_SUBMS 32
197 #define DRX_ONDURATION_TIMER_VALUE_IN_MS 10
198 #define DRX_INACTIVITY_TIMER 2
199 #define DRX_HARQ_RTT_TIMER_DL 56
200 #define DRX_HARQ_RTT_TIMER_UL 56
201 #define DRX_RETRANSMISSION_TIMER_DL 4
202 #define DRX_RETRANSMISSION_TIMER_UL 4
203 #define DRX_LONG_CYCLE_START_OFFSET_CHOICE 40
204 #define DRX_LONG_CYCLE_START_OFFSET_VAL 8
205 #define DRX_SHORT_CYCLE_PRESENT true
206 #define DRX_SHORT_CYCLE 2
207 #define DRX_SHORT_CYCLE_TIMER 2
208 #define DRX_SLOT_OFFSET 0
211 /* In case of initial configuration we are supporting only 2 measurement
212 * information RRU.PrbTotDl and RRU.PrbTotUl.
213 * In case of configuration modification we are supporting 3 measurement
214 * information RRU.PrbTotDl, RRU.PrbTotUl and UECNTX.RelReq */
215 #define NUM_OF_MEASUREMENT_INFO_SUPPORTED(_configType) \
216 ((_configType == CONFIG_ADD) ? 2 :3)
234 INVALID_CU_UE_F1AP_ID,
235 INVALID_DU_UE_F1AP_ID,
236 INTERACTION_WITH_OTHER_PROC,
238 RADIO_RELATED_REASON,
239 INSUFFICIENT_RADIO_RESOURCE,
245 SLICE_RESOURCE_UNAVAILABLE,
246 AMF_ABNORMAL_RELEASE,
252 TRANS_CAUSE_UNSPECIFIED,
253 TRANSPORT_RESOURCE_UNAVAIL
259 ABSTRACT_SYNTAX_ERR_REJECT,
260 ABSTRACT_SYNTAX_ERR_NOTIFY,
261 INCOMPATIBLE_MESSAGE,
263 ABSTRACT_SYNTAX_ERR_MSG_CONSTRUCT,
264 PROTOCOL_CAUSE_UNSPECIFIED
269 CONTROL_PROC_OVERLOAD,
270 INSUFF_USER_PLANE_RESOURCE,
272 O_AND_M_INTERVENTION,
273 MISC_CAUSE_UNSPECIFIED
396 REJECT_RRC_CONN_NON_EMERG_MODT,
397 REJECT_RRC_CONN_SIGNALLING,
398 PERMIT_EMERG_SESSION_AND_MOBILE_TERM_SERVICE,
399 PERMIT_HIGH_PRIOR_SESSION_AND_MOBILE_TERM_SERVICE
400 }F1UacStandardAction;
404 PDSCH_MAPPING_TYPE_A,
405 PDSCH_MAPPING_TYPE_B,
410 PUSCH_MAPPING_TYPE_A,
411 PUSCH_MAPPING_TYPE_B,
414 typedef struct f1RrcVersion
416 char rrcVer[30]; /* Latest RRC Version */
417 uint32_t extRrcVer; /* Latest RRC version extended */
420 typedef struct f1FailCause
424 RadioNwCause radioNwCause; /* Radio Network Layer Cause */
425 TransLayerCause transLayerCause; /* Transport Layer Cause */
426 ProtocolCause protCause; /* Protocol Cause */
427 MiscCause miscCause; /* Miscellaneous Cause */
431 typedef struct f1ProcCode
437 typedef struct f1TriggMsg
443 typedef struct f1ProcCrit
449 typedef struct f1CritDignosIE
451 F1ProcCritVal ieCritVal;
456 typedef struct f1CritDiagnostic
459 F1ProcCode procCode; /* Procedure Code */
460 F1TriggMsg triggeringMsg; /* Triggering Message */
461 F1ProcCrit procCrit; /* Criticality of Triggering msg/proc */
463 F1CritDignosIE diagnosIE;
466 typedef struct f1FailureIE
468 uint32_t transId; /* Uniquely identify transaction */
469 F1FailCause cause; /* Failure cause */
470 uint8_t timeToWait; /* Seconds to be waited before retry */
471 F1CritDiagnostic critDiagnostic; /* Critical diagnostics */
474 typedef struct f1LogicalConnUeAssoc
476 uint32_t gnbCuUeF1apId;
477 uint32_t gnbDuUeF1apId;
478 }F1LogicalConnUeAssoc;
480 typedef struct f1ResetType
484 F1ResetAll resetAll; /* Reset All */
485 F1LogicalConnUeAssoc ueAssocLogicalConn[MAX_F1_CONNECTIONS]; /* In case of Partial Reset : UE associated logical F1 conn list*/
489 typedef struct nrEcgi
495 typedef struct f1SibType
502 typedef struct f1TxBw
504 F1NrScs nrScs; /* NR subcarrier spacing */
505 F1Nrb nrb; /* Transmission bandwidth expressed in units of RBs */
508 typedef struct f1SulInfo
510 uint32_t sulArfcn; /* SUL ARFCN */
511 F1TxBw sulTxBw; /* SUL transmission bandwidth */
514 typedef struct f1FreqBand
517 uint16_t sulBand[MAX_NRCELL_BANDS];
520 typedef struct f1NrFreqInfo
524 F1FreqBand freqBand[MAX_NRCELL_BANDS];
527 typedef struct f1NrFddInfo
529 F1NrFreqInfo ulNrFreqInfo; /* UL NR Frequency Info */
530 F1NrFreqInfo dlNrFreqInfo; /* DL NR Frequency Info */
531 F1TxBw ulTxBw; /* UL Transmission bandwidth */
532 F1TxBw dlTxBw; /* DL Transmission bandwidth */
535 typedef struct f1NrTddInfo
537 F1NrFreqInfo nrFreqInfo; /* NR Frequency Info */
538 F1TxBw nrTxBw; /* NR Transmission Bandwidth */
541 typedef struct f1NrModeInfo
550 typedef struct f1EutraFddInfo
552 uint16_t ulOffset; /* UL offset to Point A */
553 uint16_t dlOffset; /* DL offset to Point A */
556 typedef struct f1EutraTddInfo
558 uint16_t tddOffset; /* Offset to Point A */
561 typedef struct f1EutraModeInfo
570 typedef struct epIpAddr
572 char transportAddr[20]; /* Transport Layer Address */
575 typedef struct epIpAddrPort
581 typedef struct f1SrvdPlmn
584 Plmn extPlmn; /* Extended available PLMN list */
585 SupportedSliceList taiSliceSuppLst;
588 typedef struct f1BrdcstPlmnInfo
590 Plmn plmn[MAX_PLMN]; /* PLMN id list */
591 Plmn extPlmn[MAX_PLMN]; /* Extended PLMN id list */
592 uint16_t tac; /* 5GS-TAC */
593 uint32_t nrCellId; /* NR Cell id */
594 uint8_t ranac; /* RAN Area code */
597 typedef struct f1CellInfo
599 NrEcgi nrCgi; /* Cell global Identity */
600 uint32_t nrPci; /* Physical Cell Identity */
601 F1SrvdPlmn srvdPlmn[MAX_PLMN];
604 typedef struct f1DuCellInfo
606 F1CellInfo cellInfo; /* cell info */
607 uint16_t tac; /* tracking area code */
608 uint16_t epsTac; /* Configured EPS TAC */
609 NrModeInfo f1Mode; /* NR mode info : FDD/TDD */
610 uint8_t measTimeCfgDuration; /* Measurement timing configuration */
611 F1CellDir cellDir; /* Cell Direction */
612 F1CellType cellType; /* Cell Type */
613 F1BrdcstPlmnInfo brdcstPlmnInfo[MAX_BPLMN_NRCELL_MINUS_1]; /* Broadcast PLMN Identity Info List */
616 typedef struct f1DuSysInfo
618 uint8_t *mibMsg; /* MIB message */
620 uint8_t *sib1Msg; /* SIB1 message */
624 typedef struct f1CuSysInfo
626 F1SibType sibTypeToUpd[MAXNUMOFSIBTYPES]; /* SIB types to be updated */
629 typedef struct f1DuSrvdCellInfo
631 F1DuCellInfo duCellInfo; /* gNB-DU served cell info */
632 F1DuSysInfo duSysInfo; /* gNB-DU System Information */
635 typedef struct f1DuSrvdCellToDel
637 NrEcgi oldNrCgi; /* Old NR CGI */
638 F1DuSrvdCellInfo srvdCellInfo; /* Info of served cell to be deleted */
641 typedef struct f1CuActCellInfo
643 F1CellInfo cuCellInfo; /* gNB-CU available cell info */
644 F1CuSysInfo cuSysInfo; /* gNB-CU System Information */
647 typedef struct f1ActCellFail
653 typedef struct srvStatus
656 bool switchOffOngoing;
659 typedef struct f1CellStatus
662 SrvStatus status; /* Service status */
665 typedef struct f1DedSIDelUE
667 uint32_t gnbCuUeF1apId;
671 typedef struct tnlAssocInfo
674 EpIpAddr epIpAddr; /* Endpoint-IP Address */
675 EpIpAddrPort epIpAddrport; /* Endpoint-IP Address and Port */
678 typedef struct f1TnlAssocUsage
684 typedef struct f1TnlAssoc
686 F1TnlAssocAddr assocInfo; /* TNL Assoc Transport Layer Info */
687 F1TnlAssocUsage assocUsage; /* TNL Assoc usage */
690 typedef struct f1TnlAssocToRmv
692 F1TnlAssocAddr assocInfoCu; /* TNL Assoc Transport Layer Info of CU */
693 F1TnlAssocAddr assocInfoDu; /* TNL Assoc Transport Layer Info of DU */
696 typedef struct f1TnlAssocSetupFail
698 F1TnlAssocAddr assocInfo;
700 }F1TnlAssocSetupFail;
703 typedef struct f1CellBarred
706 CellBarred cellBarred;
709 typedef struct f1EutraCell
711 uint32_t eutraCellId; /* EUTRA cell id */
712 F1EutraModeInfo mode; /* EUTRA mode info : FDD/TDD */
713 uint8_t rsrcInd; /* Protected EUTRA resource Indication */
716 typedef struct f1ProtectEUTRARsrc
718 uint32_t specShareGrpId; /* Spectrum sharing group id */
719 F1EutraCell eutraCellList[MAXCELLINENB]; /* EUTRA cells list */
722 typedef struct f1UacOperatorDefined
724 uint8_t accessCategory;
726 }F1UacOperatorDefined;
728 typedef struct f1UacCategoryType
732 F1UacStandardAction action; /* UAC standardized action */
733 F1UacOperatorDefined operatorDef; /* UAC operator defined */
737 typedef struct f1UacType
739 uint8_t uacReducInd; /* Value 0 means no access rate reduction. Value 100 means full access rate reduction */
740 F1UacCategoryType uacCategoryType; /* UAC Category type */
743 /* Unified Access Class Assistance Information */
744 typedef struct f1UacAssistInfo
746 Plmn plmn[MAXNUMOFUACPLMN]; /* UAC PLMN list */
747 F1UacType uacType[MAXNUMOFUACPERPLMN]; /* UAC Type list */
750 /* F1 setup related structures */
752 typedef struct f1SetupReq
754 uint32_t transId; /* Uniquely identify transaction */
755 uint32_t duId; /* DU ID */
756 char duName[CU_DU_NAME_LEN_MAX]; /* DU name */
757 F1DuSrvdCellInfo srvdCellLst[MAX_NUM_CELL]; /* Serving cell list */
758 F1RrcVersion rrcVersion; /* RRC version */
761 typedef struct f1setupRsp
763 uint32_t transId; /* Uniquely identify transaction */
764 char cuName[CU_DU_NAME_LEN_MAX]; /* CU Name */
765 F1CuActCellInfo actCellInfo; /* cells to be activated */
766 F1RrcVersion rrcVersion; /* RRC version */
769 typedef struct f1SetupFail
771 F1FailureIE setupFail;
774 /* At reception of the RESET message the gNB-DU shall release all allocated resources on F1
775 * and radio resources related to the UE association(s) indicated explicitly or implicitly in
776 * the RESET message and remove the indicated UE contexts including F1AP ID. */
777 typedef struct f1Reset
779 uint32_t transId; /* Uniquely identify transaction */
780 F1FailCause cause; /* Failure cause */
781 F1ResetType resetType; /* type of reset */
784 /* After the gNB-CU has released all assigned F1 resources and the UE F1AP IDs for all indicated
785 * UE associations which can be used for new UE-associated logical F1-connections over the F1 interface,
786 * the gNB-CU shall respond with the RESET ACKNOWLEDGE message. */
787 typedef struct f1ResetAck
789 uint32_t transId; /* Uniquely identify transaction */
790 F1LogicalConnUeAssoc ueAssocLogicalConn[MAX_F1_CONNECTIONS]; /* UE associated logical F1-connection list */
791 F1CritDiagnostic critDiagnostic; /* Critical diagnostics */
794 typedef struct f1ErrorInd
796 uint32_t transId; /* Uniquely identify transaction */
797 F1Entity errorOrigin; /* Specifies if error is originated at DU or CU */
798 F1FailCause cause; /* Failure cause */
799 /* If failure is due to Ue related message. */
800 uint32_t gnbCuUeF1apId; /* gNB-CU UE F1AP Id */
801 uint32_t gnbDuUeF1apId; /* gNB-DU UE F1AP Id */
802 F1CritDiagnostic critDiagnostic; /* Critical diagnostics */
805 typedef struct f1GnbDuCfgUpd
807 uint32_t transId; /* Uniquely identify transaction */
808 F1DuSrvdCellInfo srvdCellLstAdd[MAX_NUM_CELL]; /* Served cell list to be added */
809 F1DuSrvdCellToDel srvdCellLstMod[MAX_NUM_CELL]; /* Served cell list to be modified */
810 NrEcgi srvdCellLstDel[MAX_NUM_CELL]; /* Served cell list to be deleted */
811 F1CellStatus cellStatus[MAX_NUM_CELL]; /* Cell status */
812 F1DedSIDelUE ueLst[MAX_NUM_UE]; /* Ue list that requires dedicated SI delivery */
814 F1TnlAssocToRmv gnbDuTnlAssocRmv[MAX_TNL_ASSOC]; /* TNL Assoc list to remove */
817 typedef struct f1GnbDuCfgUpdAck
819 uint32_t transId; /* Uniquely identify transaction */
820 F1CuActCellInfo cellLstAct[MAX_NUM_CELL]; /* List of cells to be activated */
821 F1CritDiagnostic critDiagnostic; /* Critical diagnostics */
822 NrEcgi cellLstDeact[MAX_NUM_CELL]; /* List of cells to be deactivated */
825 typedef struct f1GnbDuCfgUpdFail
827 F1FailureIE gnbDuCfgUpdFail;
830 /* Sent by the gNB-CU to transfer updated information associated to an F1-C interface instance */
831 typedef struct f1GnbCuCfgUpd
833 uint32_t transId; /* Uniquely identifies transaction */
834 F1CuActCellInfo cellLstAct[MAX_NUM_CELL]; /* List of cells to be activated */
835 NrEcgi cellLstDeact[MAX_NUM_CELL]; /* List of cells to be deactivated */
836 F1TnlAssoc assocLstAdd[MAX_TNL_ASSOC]; /* List of TNL assocs to be added */
837 F1TnlAssoc assocLstUpd[MAX_TNL_ASSOC]; /* List of TNL assocs to be updated */
838 F1TnlAssocToRmv assocLstRmv[MAX_TNL_ASSOC]; /* List of TNL assocs to be removed */
839 F1CellBarred cellToBarList[MAX_NUM_CELL]; /* List of Cells to be barred */
840 F1ProtectEUTRARsrc protectEutraRsrcList[MAXCELLINENB]; /* List of Protected EUTRA resources */
843 /* Sent by a gNB-DU to a gNB-CU to acknowledge update of information
844 * associated to an F1-C interface instance */
845 typedef struct f1GnbCuCfgUpdAck
847 uint32_t transId; /* Uniquely identify transaction */
848 F1ActCellFail actCellFailList[MAX_NUM_CELL]; /* Cells failed to be activated list */
849 F1CritDiagnostic critDiagnostic; /* Critical diagnostics */
850 F1TnlAssocAddr assocSetupList[MAX_TNL_ASSOC]; /* TNL Assoc Setup list */
851 F1TnlAssocSetupFail assocSetupFailList[MAX_TNL_ASSOC]; /* TNL Assoc Setup fail list */
852 F1DedSIDelUE dedSiDelUelist[MAX_NUM_OF_UE_ID]; /* Dedicated SI delivery needed UE list */
855 typedef struct f1GnbCuCfgUpdFail
857 F1FailureIE gnbCuCfgUpdFail;
860 /* This procedure enables coordination of radio resource allocation between a gNB-CU and
861 * a gNB-DU. Coordination request is sent by CU to DU */
862 typedef struct f1GnbDuRsrcCoordReq
864 uint32_t transId; /* Uniquely identifies transaction */
865 F1ReqType reqType; /* Request type */
866 uint8_t cellResCoordReqCont; /* Container for X2AP E-UTRA - NR cell resource coordination request */
867 F1IgnoreReq ignoreReq; /* Ignore coordination request */
868 }F1GnbDuRsrcCoordReq;
870 /* This message is sent by a gNB-DU to a gNB-CU, to express the desired resource allocation
871 * for data traffic, as a response to the GNB-DU RESOURCE COORDINATION REQUEST. */
872 typedef struct f1GnbDuRsrcCoordRsp
874 uint32_t transId; /* Uniquely identifies transaction */
875 uint8_t cellResCoordRspCont; /* Container for X2AP E-UTRA - NR cell resource coordination response */
876 }F1GnbDuRsrcCoordRsp;
878 /* This message is sent by the gNB-DU to indicate to the gNB-CU its status of overload */
879 typedef struct f1GnbDuStatusInd
881 uint32_t transId; /* Uniquely identifies transaction */
882 F1GnbDuOvrloadInfo ovrloadInfo; /* gNB-DU overloaded information */
885 /* This message is sent by either the gNB-DU or the gNB-CU to intiate the removal
886 * of the interface instance and the related resources */
887 typedef struct f1RmvReq
889 uint32_t transId; /* Uniquely identifies transaction */
892 /* This message acknowledges the initiation of removal of the interface
893 * instance and the related resources */
894 typedef struct f1RmvRsp
896 uint32_t transId; /* Uniquely identifies transaction */
897 F1CritDiagnostic critDiagnos; /* Crititcality diagnostics */
900 /* This message indicates that removing the interface instance and the related
901 * resources cannot be accepted */
902 typedef struct f1RmvFail
904 uint32_t transId; /* Uniquely identifies transaction */
905 F1FailCause cause; /* Failure cause */
906 F1CritDiagnostic critDiagnostic; /* Criticality diagnostics */
909 /* This message is sent by the gNB-CU to indicate to the gNB-DU a need to reduce
910 * the rate at which UEs access the network. */
911 typedef struct f1NwkAccessRateRed
913 uint32_t transId; /* Uniquely identifies transaction */
914 F1UacAssistInfo uacAssistInfo; /* UAC Assistance Information */
918 typedef struct f1Ipaddr
924 typedef struct sctpParams
927 uint16_t duPort[MAX_DU_PORT];
934 typedef struct f1EgtpParams
936 F1IpAddr localIp; /* Ip address of local node */
937 uint16_t localPort; /* Sender Port at local node */
938 F1IpAddr destIp; /* Ip address of peer node */
939 uint16_t destPort; /* Sender port at peer node */
940 uint32_t minTunnelId;
941 uint32_t maxTunnelId;
944 typedef struct schedulerCfg
946 uint8_t numTxAntPorts; /*!< Number of Tx antenna ports */
947 uint8_t ulSchdType; /*!< Indicates which UL scheduler to use, range
948 * is 0..(number of schedulers - 1) */
949 uint8_t dlSchdType; /*!< Indicates which DL scheduler to use, range
950 * is 0..(number of schedulers - 1) */
951 uint8_t numCells; /*!< Max number of cells */
952 uint8_t maxUlUePerTti; /*!< Max number of UE in UL per TTI */
953 uint8_t maxDlUePerTti; /*!< Max number of UE in DL per TTI */
956 typedef struct mibParams
959 long subCarrierSpacingCommon;
960 long ssb_SubcarrierOffset;
961 long dmrs_TypeA_Position;
962 long controlResourceSetZero;
963 long searchSpaceZero;
965 long intraFreqReselection;
968 typedef struct siSchedInfo
970 long winLen; /* SI Window Length */
971 long broadcastSta; /* Broadcast status */
972 long preiodicity; /* si periodicity */
974 long sibValTag; /* Value tag */
977 typedef struct pdcchCfgCommon
980 long ctrlRsrcSetZero; /* Control resource set zero */
981 long searchSpcZero; /* Search space zero */
982 long searchSpcId; /* Search space id */
983 long ctrlRsrcSetId; /* Control resource set id */
984 uint8_t monitorSlotPrdAndOffPresent;
985 long monitorSlotPrdAndOff; /* Monitoring slot periodicity and offset */
986 uint8_t monitorSymbolsInSlot[2]; /* Monitoring symbols within slot */
987 long numCandAggLvl1; /* Number of candiates at aggregation level 1 */
988 long numCandAggLvl2; /* Number of candiates at aggregation level 2 */
989 long numCandAggLvl4; /* Number of candiates at aggregation level 4 */
990 long numCandAggLvl8; /* Number of candiates at aggregation level 8 */
991 long numCandAggLvl16; /* Number of candiates at aggregation level 16 */
992 uint8_t searchSpcType; /* Search Space type */
993 uint8_t commSrchSpcDciFrmt; /* DCI format of common search space type */
994 long searchSpcSib1; /* Id of serch space for SIB1 */
995 long pagingSearchSpc; /* Id of search space for paging */
996 long raSearchSpc; /* Id of search space for Random Access proc */
999 typedef struct pdschTimeDomainRsrcAlloc
1002 long mapType; /* Mapping Type */
1004 }PdschTimeDomainRsrcAlloc;
1006 typedef struct pdschCfgCommon
1009 uint8_t numTimeDomRsrcAlloc;
1010 PdschTimeDomainRsrcAlloc timeDomAlloc[MAX_NUM_DL_ALLOC];
1013 typedef struct bcchCfg
1015 long modPrdCoeff; /* Modification period co-efficient */
1018 typedef struct pcchCfg
1020 uint16_t dfltPagingCycle; /* Default paging cycle */
1021 uint8_t nAndPagingFrmOffsetType; /*Number of PagingFrames in PagingCycle defined in terms of T.*/
1022 uint8_t pageFrameOffset; /* Paging Frame offset */
1023 uint8_t ns; /* Number of paging occassions in paging frame */
1024 uint8_t firstPDCCHMontioringType; /* First PDCCH Monitoring Paging Occasion Presence Type*/
1025 uint16_t firstPDCCHMontioringInfo[MAX_PO_PER_PF];/*Indicates the first PDCCH monitoring occasion of each PO of the PF*/
1028 typedef struct scsSpecCarrier
1030 long scsOffset; /* Offset to point A considering subcarrier spacing */
1031 long scs; /* subcarrier spacing */
1032 long scsBw; /* Carrier bandwidth considering subcarrier spacing */
1036 typedef struct dlCfgCommon
1038 long freqBandInd; /* Downlink frequency band indicator */
1039 long offsetToPointA; /* DL ofset to point A */
1040 long locAndBw; /* Frequency location and bandwidth */
1041 ScsSpecCarrier dlScsCarrier; /* SCS Specific carrier */
1042 PdcchCfgCommon pdcchCfg;
1043 PdschCfgCommon pdschCfg;
1048 typedef struct rachCfgCommon
1051 long prachCfgIdx; /* PRACH configuration index */
1052 long msg1Fdm; /* Num of PRACH transmission occassions */
1053 long msg1FreqStart; /* Offset of lowest msg1 transmission occassion */
1054 long zeroCorrZoneCfg; /* Zero correlation zone configuration */
1055 long preambleRcvdTgtPwr; /* Traget power level */
1056 long preambleTransMax; /* Max num of preamble transmission */
1057 long pwrRampingStep; /* Power ramping steps for PRACH */
1058 long raRspWindow; /* RA response window */
1059 long numRaPreamble; /* Total num of preamble used in random access */
1060 long numSsbPerRachOcc; /* Numer of SSBs per RACH Occassion */
1061 long numCbPreamblePerSsb; /* Number of Contention-Based preamble per SSB */
1062 long contResTimer; /* Contention resolution timer */
1064 uint8_t rootSeqIdxPresent;
1065 long rootSeqIdx; /* PRACH root sequence index */
1066 long msg1Scs; /* Msg1 subcarrier spacing */
1067 long restrictedSetCfg; /* Restricted set configuration */
1070 typedef struct puschCfgCmnTimeDomAlloc
1075 }PuschCfgCmnTimeDomAlloc;
1077 typedef struct puschCfgCommon
1079 uint8_t puschCfgPresent;
1080 uint8_t numTimeDomRsrcAlloc;
1081 PuschCfgCmnTimeDomAlloc timeDomAllocList[MAX_UL_ALLOC];
1082 long msg3DeltaPreamble;
1083 long p0NominalWithGrant;
1086 typedef struct pucchCfgCommon
1094 typedef struct ulCfgCommon
1096 long freqBandInd; /* Uplink frequency band indicator */
1097 long pMax; /* Max UL transmission power that UE applies */
1098 long locAndBw; /* Frequency location and bandwidth */
1099 ScsSpecCarrier ulScsCarrier; /* SCS Specific carrier */
1100 RachCfgCommon rachCfg;
1101 PuschCfgCommon puschCfg;
1102 PucchCfgCommon pucchCfg;
1103 long timeAlignTimerComm;
1106 typedef struct tddUlDlCfgCommon
1108 long refScs; /* Reference subcarrier spacing */
1109 long txPrd; /* Transmission periodicity */
1116 typedef struct srvCellCfgCommSib
1121 uint8_t ssbPosInBurst;
1122 long ssbPrdServingCell;
1123 TddUlDlCfgCommon tddCfg;
1124 long ssPbchBlockPwr;
1127 typedef struct sib1Params
1132 uint8_t cellIdentity;
1133 long cellResvdForOpUse;
1134 long connEstFailCnt;
1135 long connEstFailOffValidity;
1136 long connEstFailOffset;
1137 SiSchedInfo siSchedInfo;
1138 SrvCellCfgCommSib srvCellCfgCommSib;
1141 typedef struct threadInfo
1143 SSTskId duAppSTskId;
1144 uint8_t duAppCoreId;
1149 SSTskId rlcUlSTskId;
1150 uint8_t rlcUlCoreId;
1151 SSTskId rlcMacSTskId;
1152 uint8_t rlcMacCoreId;
1155 SSTskId lwrMacSTskId;
1156 uint8_t lwrMacCoreId;
1159 typedef struct duCfgParams
1164 ThreadInfo threadInfo;
1165 SctpParams sctpParams; /* SCTP Params */
1166 F1EgtpParams egtpParams; /* EGTP Params */
1167 F1DuSrvdCellInfo srvdCellLst[MAX_NUM_CELL]; /* Serving cell list *///TODO: this must be removed eventually
1168 MacCellCfg macCellCfg; /* MAC cell configuration */
1169 MibParams mibParams; /* MIB Params */
1170 Sib1Params sib1Params; /* SIB1 Params */
1171 MacSliceCfgReq tempSliceCfg;
1177 typedef struct rRMPolicyMemberList
1183 }RRMPolicyMemberList;
1194 typedef struct rrmPolicyList
1197 RrmResourceType resourceType;
1198 uint8_t rRMMemberNum;
1199 RRMPolicyMemberList rRMPolicyMemberList[2];
1200 uint8_t rRMPolicyMaxRatio;
1201 uint8_t rRMPolicyMinRatio;
1202 uint8_t rRMPolicyDedicatedRatio;
1206 DuCfgParams duCfgParam;
1208 /*function declarations */
1209 uint8_t readClCfg();
1211 uint8_t duReadCfg();
1212 void printDuConfig();
1214 uint8_t fillDuSrvdCellSysInfo(F1DuSysInfo *sysInfo);
1216 uint16_t calcSliv(uint8_t startSymbol, uint8_t lengthSymbol);
1217 uint8_t cpyRrmPolicyInDuCfgParams(RrmPolicyList rrmPolicy[], uint8_t policyNum, MacSliceCfgReq *tempSliceCfg);
1219 #endif /* __DU_CONFIG_H__ */
1221 /**********************************************************************
1223 **********************************************************************/