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_COMMON_H__
20 #define __DU_COMMON_H__
35 #define DU_SELECTOR_LC 0
36 #define DU_SELECTOR_TC 1
37 #define DU_SELECTOR_LWLC 2
40 /* Macro definitions for F1 procedures */
41 #define CU_DU_NAME_LEN_MAX 30 /* Max length of CU/DU name string */
42 #define MAX_F1_CONNECTIONS 65536 /* Max num of F1 connections */
43 #define MAXCELLINGNBDU 2 /* Max num of cells served by gNB-DU */
44 #define MAXNUMOFBPLMN 1 /* Max num of broadcast PLMN ids */
45 #define MAXNRARFCN 3279165 /* Maximum values of NRAFCN */
46 #define MAXNRCELLBANDS 2 /* Maximum number of frequency bands */
47 #define MAXNUMOFSLICEITEMS 1024 /* Maximum number of signalled slice support items */
48 #define MAXBPLMNNRMINUS1 1 /* Maximum number of PLMN Ids broadcast in an NR cell minus 1 */
49 #define MAXNUMOFSIBTYPES 32 /* Maximum number of SIB types */
50 #define MAX_UEID 512 /* Maximum number of UE Ids */
51 #define MAXNUMOFTNLASSOCS 32 /* Max num of TNL Assoc between CU and DU */
52 #define MAXCELLINENB 256 /* Max num of cells served by eNB */
53 #define MAXNUMOFUEID 65536 /* Max num of UEs served by DU */
54 #define MAXNUMOFUACPLMN 12 /* Maximum number of PLMN ids*/
55 #define MAXNUMOFUACPERPLMN 64 /* Maximum number of signalled categories per PLMN */
57 #define MAX_IPV6_LEN 16 /* Max lenght of IPV6 Address */
71 INVALID_CU_UE_F1AP_ID,
72 INVALID_DU_UE_F1AP_ID,
73 INTERACTION_WITH_OTHER_PROC,
76 INSUFFICIENT_RADIO_RESOURCE,
82 SLICE_RESOURCE_UNAVAILABLE,
89 TRANS_CAUSE_UNSPECIFIED,
90 TRANSPORT_RESOURCE_UNAVAIL
96 ABSTRACT_SYNTAX_ERR_REJECT,
97 ABSTRACT_SYNTAX_ERR_NOTIFY,
100 ABSTRACT_SYNTAX_ERR_MSG_CONSTRUCT,
101 PROTOCOL_CAUSE_UNSPECIFIED
106 CONTROL_PROC_OVERLOAD,
107 INSUFF_USER_PLANE_RESOURCE,
109 O_AND_M_INTERVENTION,
110 MISC_CAUSE_UNSPECIFIED
233 REJECT_RRC_CONN_NON_EMERG_MODT,
234 REJECT_RRC_CONN_SIGNALLING,
235 PERMIT_EMERG_SESSION_AND_MOBILE_TERM_SERVICE,
236 PERMIT_HIGH_PRIOR_SESSION_AND_MOBILE_TERM_SERVICE
237 }F1UacStandardAction;
239 typedef struct f1RrcVersion
241 U8 rrcVer; /* Latest RRC Version */
242 U32 extRrcVer; /* Latest RRC version extended */
245 typedef struct f1FailCause
249 RadioNwCause radioNwCause; /* Radio Network Layer Cause */
250 TransLayerCause transLayerCause; /* Transport Layer Cause */
251 ProtocolCause protCause; /* Protocol Cause */
252 MiscCause miscCause; /* Miscellaneous Cause */
256 typedef struct f1ProcCode
262 typedef struct f1TriggMsg
268 typedef struct f1ProcCrit
274 typedef struct f1CritDignosIE
276 F1ProcCritVal ieCritVal;
281 typedef struct f1CritDiagnostic
284 F1ProcCode procCode; /* Procedure Code */
285 F1TriggMsg triggeringMsg; /* Triggering Message */
286 F1ProcCrit procCrit; /* Criticality of Triggering msg/proc */
288 F1CritDignosIE diagnosIE;
291 typedef struct f1FailureIE
293 U32 transId; /* Uniquely identify transaction */
294 F1FailCause cause; /* Failure cause */
295 U8 timeToWait; /* Seconds to be waited before retry */
296 F1CritDiagnostic critDiagnostic; /* Critical diagnostics */
299 typedef struct f1LogicalConnUeAssoc
303 }F1LogicalConnUeAssoc;
305 typedef struct f1ResetType
309 F1ResetAll resetAll; /* Reset All */
310 F1LogicalConnUeAssoc ueAssocLogicalConn[MAX_F1_CONNECTIONS]; /* In case of Partial Reset : UE associated logical F1 conn list*/
314 typedef struct f1PLMN
320 typedef struct nrEcgi
326 typedef struct f1SibType
333 typedef struct f1TxBw
335 F1NrScs nrScs; /* NR subcarrier spacing */
336 F1Nrb nrb; /* Transmission bandwidth expressed in units of RBs */
339 typedef struct f1SulInfo
342 U32 sulArfcn; /* SUL ARFCN */
343 F1TxBw sulTxBw; /* SUL transmission bandwidth */
346 typedef struct f1FreqBand
349 U16 sulBand[MAXNRCELLBANDS];
352 typedef struct f1NrFreqInfo
356 F1FreqBand freqBand[MAXNRCELLBANDS];
359 typedef struct f1NrFddInfo
361 F1NrFreqInfo ulNrFreqInfo; /* UL NR Frequency Info */
362 F1NrFreqInfo dlNrFreqInfo; /* DL NR Frequency Info */
363 F1TxBw ulTxBw; /* UL Transmission bandwidth */
364 F1TxBw dlTxBw; /* DL Transmission bandwidth */
367 typedef struct f1NrTddInfo
369 F1NrFreqInfo nrFreqInfo; /* NR Frequency Info */
370 F1TxBw nrTxBw; /* NR Transmission Bandwidth */
373 typedef struct f1NrModeInfo
382 typedef struct f1EutraFddInfo
384 U16 ulOffset; /* UL offset to Point A */
385 U16 dlOffset; /* DL offset to Point A */
388 typedef struct f1EutraTddInfo
390 U16 tddOffset; /* Offset to Point A */
393 typedef struct f1EutraModeInfo
408 typedef struct f1Snsaai
414 typedef struct epIpAddr
416 char transportAddr[20]; /* Transport Layer Address */
419 typedef struct epIpAddrPort
425 typedef struct f1TaiSliceSuppLst
428 F1Snsaai snssai[MAXNUMOFSLICEITEMS];
431 typedef struct f1SrvdPlmn
434 F1TaiSliceSuppLst taiSliceSuppLst;
437 typedef struct f1BrdcstPlmnInfo
439 F1Plmn plmn[MAXNUMOFBPLMN]; /* PLMN id list */
440 F1Plmn extPlmn[MAXNUMOFBPLMN]; /* Extended PLMN id list */
441 F1Tac tac; /* 5GS-TAC */
442 U32 nrCellId; /* NR Cell id */
443 U8 ranac; /* RAN Area code */
447 typedef struct f1CellInfo
449 NrEcgi nrCgi; /* Cell global Identity */
450 U32 nrPci; /* Physical Cell Identity */
451 F1Plmn plmn[MAXNUMOFBPLMN]; /* Available PLMN list */
452 F1Plmn extPlmn[MAXNUMOFBPLMN]; /* Extended available PLMN list */
455 typedef struct f1DuCellInfo
457 F1CellInfo cellInfo; /* cell info */
458 F1Tac tac; /* tracking area code */
459 F1Tac epsTac; /* Configured EPS TAC */
460 F1NrModeInfo f1Mode; /* NR mode info : FDD/TDD */
461 U8 measTimeCfg; /* Measurement timing configuration */
462 F1CellDir cellDir; /* Cell Direction */
463 F1CellType cellType; /* Cell Type */
464 F1BrdcstPlmnInfo brdcstPlmnInfo[MAXBPLMNNRMINUS1]; /* Broadcast PLMN Identity Info List */
467 typedef struct f1DuSysInfo
469 U8 mibMsg; /* MIB message */
470 U8 sib1Msg; /* SIB1 message */
473 typedef struct f1CuSysInfo
475 F1SibType sibTypeToUpd[MAXNUMOFSIBTYPES]; /* SIB types to be updated */
478 typedef struct f1DuSrvdCellInfo
480 F1DuCellInfo duCellInfo; /* gNB-DU served cell info */
481 F1DuSysInfo duSysInfo; /* gNB-DU System Information */
484 typedef struct f1DuSrvdCellToDel
486 NrEcgi oldNrCgi; /* Old NR CGI */
487 F1DuSrvdCellInfo srvdCellInfo; /* Info of served cell to be deleted */
490 typedef struct f1CuActCellInfo
492 F1CellInfo cuCellInfo; /* gNB-CU available cell info */
493 F1CuSysInfo cuSysInfo; /* gNB-CU System Information */
496 typedef struct f1ActCellFail
502 typedef struct srvStatus
505 Bool switchOffOngoing;
508 typedef struct f1CellStatus
511 SrvStatus status; /* Service status */
514 typedef struct f1DedSIDelUE
520 typedef struct tnlAssocInfo
523 EpIpAddr epIpAddr; /* Endpoint-IP Address */
524 EpIpAddrPort epIpAddrport; /* Endpoint-IP Address and Port */
527 typedef struct f1TnlAssocUsage
533 typedef struct f1TnlAssoc
535 F1TnlAssocAddr assocInfo; /* TNL Assoc Transport Layer Info */
536 F1TnlAssocUsage assocUsage; /* TNL Assoc usage */
539 typedef struct f1TnlAssocToRmv
541 F1TnlAssocAddr assocInfoCu; /* TNL Assoc Transport Layer Info of CU */
542 F1TnlAssocAddr assocInfoDu; /* TNL Assoc Transport Layer Info of DU */
545 typedef struct f1TnlAssocSetupFail
547 F1TnlAssocAddr assocInfo;
549 }F1TnlAssocSetupFail;
552 typedef struct f1CellBarred
555 CellBarred cellBarred;
558 typedef struct f1EutraCell
560 U32 eutraCellId; /* EUTRA cell id */
561 F1EutraModeInfo mode; /* EUTRA mode info : FDD/TDD */
562 U8 rsrcInd; /* Protected EUTRA resource Indication */
565 typedef struct f1ProtectEUTRARsrc
567 U32 specShareGrpId; /* Spectrum sharing group id */
568 F1EutraCell eutraCellList[MAXCELLINENB]; /* EUTRA cells list */
571 typedef struct f1UacOperatorDefined
575 }F1UacOperatorDefined;
577 typedef struct f1UacCategoryType
581 F1UacStandardAction action; /* UAC standardized action */
582 F1UacOperatorDefined operatorDef; /* UAC operator defined */
586 typedef struct f1UacType
588 U8 uacReducInd; /* Value 0 means no access rate reduction. Value 100 means full access rate reduction */
589 F1UacCategoryType uacCategoryType; /* UAC Category type */
592 /* Unified Access Class Assistance Information */
593 typedef struct f1UacAssistInfo
595 F1Plmn plmn[MAXNUMOFUACPLMN]; /* UAC PLMN list */
596 F1UacType uacType[MAXNUMOFUACPERPLMN]; /* UAC Type list */
599 /* F1 setup related structures */
601 typedef struct f1SetupReq
603 U32 transId; /* Uniquely identify transaction */
604 U32 duId; /* DU ID */
605 char duName[CU_DU_NAME_LEN_MAX]; /* DU name */
606 F1DuSrvdCellInfo srvdCellLst[MAXCELLINGNBDU]; /* Serving cell list */
607 F1RrcVersion rrcVersion; /* RRC version */
610 typedef struct f1setupRsp
612 U32 transId; /* Uniquely identify transaction */
613 U32 cuId; /* CU ID */
614 char cuName[CU_DU_NAME_LEN_MAX]; /* CU Name */
615 F1CuActCellInfo actCellInfo; /* cells to be activated */
616 F1RrcVersion rrcVersion; /* RRC version */
619 typedef struct f1SetupFail
621 F1FailureIE setupFail;
624 /* At reception of the RESET message the gNB-DU shall release all allocated resources on F1
625 * and radio resources related to the UE association(s) indicated explicitly or implicitly in
626 * the RESET message and remove the indicated UE contexts including F1AP ID. */
627 typedef struct f1Reset
629 U32 transId; /* Uniquely identify transaction */
630 F1FailCause cause; /* Failure cause */
631 F1ResetType resetType; /* type of reset */
634 /* After the gNB-CU has released all assigned F1 resources and the UE F1AP IDs for all indicated
635 * UE associations which can be used for new UE-associated logical F1-connections over the F1 interface,
636 * the gNB-CU shall respond with the RESET ACKNOWLEDGE message. */
637 typedef struct f1ResetAck
639 U32 transId; /* Uniquely identify transaction */
640 F1LogicalConnUeAssoc ueAssocLogicalConn[MAX_F1_CONNECTIONS]; /* UE associated logical F1-connection list */
641 F1CritDiagnostic critDiagnostic; /* Critical diagnostics */
644 typedef struct f1ErrorInd
646 U32 transId; /* Uniquely identify transaction */
647 F1Entity errorOrigin; /* Specifies if error is originated at DU or CU */
648 F1FailCause cause; /* Failure cause */
649 /* If failure is due to Ue related message. */
650 U32 gnbCuUeF1apId; /* gNB-CU UE F1AP Id */
651 U32 gnbDuUeF1apId; /* gNB-DU UE F1AP Id */
652 F1CritDiagnostic critDiagnostic; /* Critical diagnostics */
655 typedef struct f1GnbDuCfgUpd
657 U32 transId; /* Uniquely identify transaction */
658 F1DuSrvdCellInfo srvdCellLstAdd[MAXCELLINGNBDU]; /* Served cell list to be added */
659 F1DuSrvdCellToDel srvdCellLstMod[MAXCELLINGNBDU]; /* Served cell list to be modified */
660 NrEcgi srvdCellLstDel[MAXCELLINGNBDU]; /* Served cell list to be deleted */
661 F1CellStatus cellStatus[MAXCELLINGNBDU]; /* Cell status */
662 F1DedSIDelUE ueLst[MAX_UEID]; /* Ue list that requires dedicated SI delivery */
664 F1TnlAssocToRmv gnbDuTnlAssocRmv[MAXNUMOFTNLASSOCS]; /* TNL Assoc list to remove */
667 typedef struct f1GnbDuCfgUpdAck
669 U32 transId; /* Uniquely identify transaction */
670 F1CuActCellInfo cellLstAct[MAXCELLINGNBDU]; /* List of cells to be activated */
671 F1CritDiagnostic critDiagnostic; /* Critical diagnostics */
672 NrEcgi cellLstDeact[MAXCELLINGNBDU]; /* List of cells to be deactivated */
675 typedef struct f1GnbDuCfgUpdFail
677 F1FailureIE gnbDuCfgUpdFail;
680 /* Sent by the gNB-CU to transfer updated information associated to an F1-C interface instance */
681 typedef struct f1GnbCuCfgUpd
683 U32 transId; /* Uniquely identifies transaction */
684 F1CuActCellInfo cellLstAct[MAXCELLINGNBDU]; /* List of cells to be activated */
685 NrEcgi cellLstDeact[MAXCELLINGNBDU]; /* List of cells to be deactivated */
686 F1TnlAssoc assocLstAdd[MAXNUMOFTNLASSOCS]; /* List of TNL assocs to be added */
687 F1TnlAssoc assocLstUpd[MAXNUMOFTNLASSOCS]; /* List of TNL assocs to be updated */
688 F1TnlAssocToRmv assocLstRmv[MAXNUMOFTNLASSOCS]; /* List of TNL assocs to be removed */
689 F1CellBarred cellToBarList[MAXCELLINGNBDU]; /* List of Cells to be barred */
690 F1ProtectEUTRARsrc protectEutraRsrcList[MAXCELLINENB]; /* List of Protected EUTRA resources */
693 /* Sent by a gNB-DU to a gNB-CU to acknowledge update of information
694 * associated to an F1-C interface instance */
695 typedef struct f1GnbCuCfgUpdAck
697 U32 transId; /* Uniquely identify transaction */
698 F1ActCellFail actCellFailList[MAXCELLINGNBDU]; /* Cells failed to be activated list */
699 F1CritDiagnostic critDiagnostic; /* Critical diagnostics */
700 F1TnlAssocAddr assocSetupList[MAXNUMOFTNLASSOCS]; /* TNL Assoc Setup list */
701 F1TnlAssocSetupFail assocSetupFailList[MAXNUMOFTNLASSOCS]; /* TNL Assoc Setup fail list */
702 F1DedSIDelUE dedSiDelUelist[MAXNUMOFUEID]; /* Dedicated SI delivery needed UE list */
705 typedef struct f1GnbCuCfgUpdFail
707 F1FailureIE gnbCuCfgUpdFail;
710 /* This procedure enables coordination of radio resource allocation between a gNB-CU and
711 * a gNB-DU. Coordination request is sent by CU to DU */
712 typedef struct f1GnbDuRsrcCoordReq
714 U32 transId; /* Uniquely identifies transaction */
715 F1ReqType reqType; /* Request type */
716 U8 cellResCoordReqCont; /* Container for X2AP E-UTRA - NR cell resource coordination request */
717 F1IgnoreReq ignoreReq; /* Ignore coordination request */
718 }F1GnbDuRsrcCoordReq;
720 /* This message is sent by a gNB-DU to a gNB-CU, to express the desired resource allocation
721 * for data traffic, as a response to the GNB-DU RESOURCE COORDINATION REQUEST. */
722 typedef struct f1GnbDuRsrcCoordRsp
724 U32 transId; /* Uniquely identifies transaction */
725 U8 cellResCoordRspCont; /* Container for X2AP E-UTRA - NR cell resource coordination response */
726 }F1GnbDuRsrcCoordRsp;
728 /* This message is sent by the gNB-DU to indicate to the gNB-CU its status of overload */
729 typedef struct f1GnbDuStatusInd
731 U32 transId; /* Uniquely identifies transaction */
732 F1GnbDuOvrloadInfo ovrloadInfo; /* gNB-DU overloaded information */
735 /* This message is sent by either the gNB-DU or the gNB-CU to intiate the removal
736 * of the interface instance and the related resources */
737 typedef struct f1RmvReq
739 U32 transId; /* Uniquely identifies transaction */
742 /* This message acknowledges the initiation of removal of the interface
743 * instance and the related resources */
744 typedef struct f1RmvRsp
746 U32 transId; /* Uniquely identifies transaction */
747 F1CritDiagnostic critDiagnos; /* Crititcality diagnostics */
750 /* This message indicates that removing the interface instance and the related
751 * resources cannot be accepted */
752 typedef struct f1RmvFail
754 U32 transId; /* Uniquely identifies transaction */
755 F1FailCause cause; /* Failure cause */
756 F1CritDiagnostic critDiagnostic; /* Criticality diagnostics */
759 /* This message is sent by the gNB-CU to indicate to the gNB-DU a need to reduce
760 * the rate at which UEs access the network. */
761 typedef struct f1NwkAccessRateRed
763 U32 transId; /* Uniquely identifies transaction */
764 F1UacAssistInfo uacAssistInfo; /* UAC Assistance Information */
767 typedef struct f1Ipaddr
772 U8 ipV6Addr[MAX_IPV6_LEN];
775 typedef struct f1SctpParams
783 typedef struct duCfgParams
785 F1SctpParams sctpParams; /* SCTP Params */
788 U8 duName[CU_DU_NAME_LEN_MAX];
789 F1DuSrvdCellInfo srvdCellLst[MAXCELLINGNBDU]; /* Serving cell list */
790 F1RrcVersion rrcVersion; /* RRC version */
791 ClCellCfg clCellCfg; /* CL cell configuration */
795 #endif /* __DU_COMMON_H__ */
797 /**********************************************************************
799 **********************************************************************/