X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=src%2Fdu_app%2Fdu_cfg.c;h=28cb036428b2c6a871502d1385114d93569e268e;hb=90762e17a759aeb1bf115774bc7203722e033c41;hp=e808132dd3d34ae1f1f5eecd4b65b5885287b622;hpb=9bfd39713f94e019675b4a255855177462b39bbd;p=o-du%2Fl2.git diff --git a/src/du_app/du_cfg.c b/src/du_app/du_cfg.c index e808132dd..28cb03642 100644 --- a/src/du_app/du_cfg.c +++ b/src/du_app/du_cfg.c @@ -255,7 +255,7 @@ uint8_t readMacCfg() /* fill Intial DL BWP */ duCfgParam.macCellCfg.cellCfg.initialDlBwp.bwp.firstPrb = 0; - duCfgParam.macCellCfg.cellCfg.initialDlBwp.bwp.numPrb = TOTAL_PRB_20MHZ_MU0; /* configured to total BW */ + duCfgParam.macCellCfg.cellCfg.initialDlBwp.bwp.numPrb = MAX_NUM_RB; /* configured to total BW */ duCfgParam.macCellCfg.cellCfg.initialDlBwp.bwp.scs = duCfgParam.macCellCfg.ssbCfg.scsCmn; duCfgParam.macCellCfg.cellCfg.initialDlBwp.bwp.cyclicPrefix = NORMAL_CYCLIC_PREFIX; duCfgParam.macCellCfg.cellCfg.initialDlBwp.pdcchCommon.commonSearchSpace.searchSpaceId = SEARCHSPACE_1_INDEX; @@ -300,7 +300,7 @@ uint8_t readMacCfg() /* fill Intial UL BWP */ duCfgParam.macCellCfg.cellCfg.initialUlBwp.bwp.firstPrb = 0; - duCfgParam.macCellCfg.cellCfg.initialUlBwp.bwp.numPrb = TOTAL_PRB_20MHZ_MU0; /* configured to total BW */ + duCfgParam.macCellCfg.cellCfg.initialUlBwp.bwp.numPrb = MAX_NUM_RB; /* configured to total BW */ duCfgParam.macCellCfg.cellCfg.initialUlBwp.bwp.scs = duCfgParam.macCellCfg.ssbCfg.scsCmn; duCfgParam.macCellCfg.cellCfg.initialUlBwp.bwp.cyclicPrefix = NORMAL_CYCLIC_PREFIX; duCfgParam.macCellCfg.cellCfg.initialUlBwp.puschCommon.numTimeDomRsrcAlloc = 2; @@ -324,7 +324,7 @@ uint8_t readMacCfg() /* fill PUCCH config common */ duCfgParam.macCellCfg.cellCfg.initialUlBwp.pucchCommon.pucchResourceCommon = PUCCH_RSRC_COMMON; - duCfgParam.macCellCfg.cellCfg.initialUlBwp.pucchCommon.pucchGroupHopping = PUCCH_GROUP_HOPPING; + duCfgParam.macCellCfg.cellCfg.initialUlBwp.pucchCommon.pucchGroupHopping = PUCCH_NEITHER_HOPPING; #ifndef O1_ENABLE @@ -351,35 +351,6 @@ uint8_t readMacCfg() return ROK; } -/******************************************************************* - * - * @brief Configures the DU Parameters - * - * @details - * - * Function : fillDuPort - * - * Functionality: - * - fills the DU Ports. - * - * @params[in] duPort array to be filled - * @return ROK - success - * RFAILED - failure - * - * ****************************************************************/ -uint8_t fillDuPort(uint16_t *duPort) -{ - -#ifdef O1_ENABLE - duPort[F1_INTERFACE] = g_cfg.DU_Port; - duPort[E2_INTERFACE] = g_cfg.RIC_Port; -#else - duPort[F1_INTERFACE] = F1_SCTP_PORT; /* DU Port idx 0 38472 */ - duPort[E2_INTERFACE] = E2_SCTP_PORT; /* RIC Port idx 1 36421 */ -#endif - return ROK; -} - /******************************************************************* * * @brief Configures the DU Parameters @@ -604,7 +575,6 @@ uint8_t readCfg() CmLList *node; uint8_t srvdCellIdx, bandIdx, sliceIdx, plmnIdx, ranFuncIdx, eventTriggerStyleIdx, reportStyleIdx, tnlAssocIdx; uint8_t brdcstPlmnIdx, freqBandIdx, srvdPlmnIdx; - uint32_t ipv4_du, ipv4_cu, ipv4_ric; MibParams mib; Sib1Params sib1; SupportedSliceList *taiSliceSuppLst; @@ -620,77 +590,7 @@ uint8_t readCfg() Snssai snssai[NUM_OF_SUPPORTED_SLICE] = {{1,{2,3,4}},{5,{6,7,8}}}; #endif - /* Gnb Id */ - duCb.gnbId = GNB_ID; - -#ifdef O1_ENABLE - if( getStartupConfig(&g_cfg) != ROK ) - { - RETVALUE(RFAILED); - } - cmInetAddr((S8*)g_cfg.DU_IPV4_Addr, &ipv4_du); - cmInetAddr((S8*)g_cfg.CU_IPV4_Addr, &ipv4_cu); - cmInetAddr((S8*)g_cfg.RIC_IPV4_Addr, &ipv4_ric); - - duCfgParam.sctpParams.cuPort = g_cfg.CU_Port; - duCfgParam.sctpParams.ricPort = g_cfg.RIC_Port; -#else - cmInetAddr((S8*)DU_IP_V4_ADDR, &ipv4_du); - cmInetAddr((S8*)CU_IP_V4_ADDR, &ipv4_cu); - cmInetAddr((S8*)RIC_IP_V4_ADDR, &ipv4_ric); - - duCfgParam.sctpParams.cuPort = F1_SCTP_PORT; - duCfgParam.sctpParams.ricPort = E2_SCTP_PORT; -#endif - - fillDuPort(duCfgParam.sctpParams.duPort); - - /* F1 DU IP Address and Port*/ - duCfgParam.sctpParams.duIpAddr.ipV4Addr = ipv4_du; - - /* F1 CU IP Address and Port*/ - duCfgParam.sctpParams.cuIpAddr.ipV4Addr = ipv4_cu; - - /* Fill RIC Params */ - duCfgParam.sctpParams.ricIpAddr.ipV4Addr = ipv4_ric; - - /* EGTP Parameters */ - duCfgParam.egtpParams.localIp.ipV4Pres = TRUE; - duCfgParam.egtpParams.localIp.ipV4Addr = ipv4_du; - duCfgParam.egtpParams.localPort = F1_EGTP_PORT; - duCfgParam.egtpParams.destIp.ipV4Pres = TRUE; - duCfgParam.egtpParams.destIp.ipV4Addr = ipv4_cu; - duCfgParam.egtpParams.destPort = F1_EGTP_PORT; - duCfgParam.egtpParams.minTunnelId = MIN_TEID; - duCfgParam.egtpParams.maxTunnelId = MAX_TEID; - - duCfgParam.maxUe = 32; //TODO: Check - - /* DU Info */ - duCfgParam.duId = DU_ID; - DU_ALLOC(duCfgParam.duName, sizeof(DU_NAME)); - if(!duCfgParam.duName) - { - DU_LOG("\nDEBUG --> DU_APP: readCfg(): Memory allocation failure for DU name"); - return RFAILED; - } - strcpy((char*)duCfgParam.duName,DU_NAME); - - memset(&duCb.e2apDb, 0, sizeof(E2apDb)); - duCb.e2apDb.e2NodeId = DU_ID; duCb.e2apDb.e2TransInfo.transIdCounter = 0; - - duCb.e2apDb.numOfTNLAssoc = 1; - for(tnlAssocIdx =0; tnlAssocIdxxmlChildrenNode; while (cur != NULL) { +#ifdef O1_ENABLE + sctp->duPort[F1_INTERFACE] = g_cfg.DU_Port; + sctp->duPort[E2_INTERFACE] = g_cfg.RIC_Port; + sctp->cuPort = g_cfg.CU_Port; + sctp->ricPort = g_cfg.RIC_Port; +#else if ((!xmlStrcmp(cur->name, (const xmlChar *)"MAX_DU_PORT")) && (cur->ns == ns)) { max_du_port = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1)); @@ -1167,6 +1072,7 @@ uint8_t parseSctpParams(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, SctpParams * sctp->duPort[E2_INTERFACE] = e2_sctp_port; /* RIC Port idx 1 */ } } + if ((!xmlStrcmp(cur->name, (const xmlChar *)"F1_SCTP_PORT")) && (cur->ns == ns)) { f1_sctp_port = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1)); @@ -1176,10 +1082,6 @@ uint8_t parseSctpParams(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, SctpParams * e2_sctp_port = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1)); } -#ifdef O1_ENABLE - sctp->cuPort = g_cfg.CU_Port; - sctp->ricPort = g_cfg.RIC_Port; -#else sctp->cuPort = f1_sctp_port; sctp->ricPort = e2_sctp_port; #endif @@ -1229,6 +1131,7 @@ uint8_t parseEgtpParams(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, F1EgtpParams return ROK; } +#ifdef XML_BASED_CONFIG /******************************************************************* * * @brief Fill MIB configuration @@ -1290,44 +1193,6 @@ uint8_t parseMibParams(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, MibParams *mi return ROK; } -/******************************************************************* - * - * @brief Fill RRC version - * - * @details - * - * Function : parseF1RrcVersion - * - * Functionality: Fill RRC version - * - * @params[in] XML document pointer - * XML namespace - * Current node in XML - * Pointer to structure to be filled - * @return ROK - success - * RFAILED - failure - * - * ****************************************************************/ -uint8_t parseF1RrcVersion(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur,F1RrcVersion *f1RrcVersion) -{ - memset(f1RrcVersion, 0, sizeof(F1RrcVersion)); - cur = cur->xmlChildrenNode; - while(cur != NULL) - { - if((!xmlStrcmp(cur->name, (const xmlChar *)"RRC_VER")) && (cur->ns == ns)) - { - strcpy((char*)f1RrcVersion->rrcVer, (char*)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1)); - } - - if((!xmlStrcmp(cur->name, (const xmlChar *)"EXT_RRC_VER")) && (cur->ns == ns)) - { - f1RrcVersion->extRrcVer = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1)); - } - cur = cur -> next; - } - return ROK; -} - /******************************************************************* * * @brief Fill PLMN ID @@ -2960,7 +2825,7 @@ uint8_t parsePucchConfigCommon(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, Pucch pucchCfgCmn->pucchResourceCommon = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1)); } - if ((!xmlStrcmp(cur->name, (const xmlChar *)"PUCCH_GROUP_HOPPING")) && (cur->ns == ns)) + if ((!xmlStrcmp(cur->name, (const xmlChar *)"PUCCH_NEITHER_HOPPING")) && (cur->ns == ns)) { pucchCfgCmn->pucchGroupHopping = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1)); } @@ -5280,6 +5145,283 @@ uint8_t parseMacSliceCfgReq(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur,MacSliceC } return ROK; } +#endif + +#ifdef THREAD_AFFINITY +/******************************************************************* + * + * @brief Set thread affinity to the core configured via XML file + * + * @details + * + * Function : parseThreadAffinity + * + * Functionality: Set thread affinity to the core configured + * via XML file + * + * @params[in] XML document pointer + * XML namespace + * Current node in XML + * Thread information + * @return ROK - success + * RFAILED - failure + * + * ****************************************************************/ +uint8_t parseThreadAffinity(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, ThreadInfo *threads) +{ + cur = cur -> xmlChildrenNode; + while(cur != NULL) + { + if ((!xmlStrcmp(cur->name, (const xmlChar *)"DU_APP_CORE")) && (cur->ns == ns)) + { + threads->duAppCoreId = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1)); + ODU_SET_THREAD_AFFINITY(&threads->duAppSTskId, SS_AFFINITY_MODE_EXCL, threads->duAppCoreId, 0); + } + + if ((!xmlStrcmp(cur->name, (const xmlChar *)"EGTP_CORE")) && (cur->ns == ns)) + { + threads->egtpCoreId = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1)); + ODU_SET_THREAD_AFFINITY(&threads->egtpSTskId, SS_AFFINITY_MODE_EXCL, threads->egtpCoreId, 0); + } + + if ((!xmlStrcmp(cur->name, (const xmlChar *)"RLC_MAC_CORE")) && (cur->ns == ns)) + { + threads->rlcMacCoreId = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1)); + ODU_SET_THREAD_AFFINITY(&threads->rlcMacSTskId, SS_AFFINITY_MODE_EXCL, threads->rlcMacCoreId, 0); + } + + if ((!xmlStrcmp(cur->name, (const xmlChar *)"RLC_UL_CORE")) && (cur->ns == ns)) + { + threads->rlcUlCoreId = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1)); + ODU_SET_THREAD_AFFINITY(&threads->rlcUlSTskId, SS_AFFINITY_MODE_EXCL, threads->rlcUlCoreId, 0); + } + + if ((!xmlStrcmp(cur->name, (const xmlChar *)"SCH_CORE")) && (cur->ns == ns)) + { + threads->schCoreId = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1)); + ODU_SET_THREAD_AFFINITY(&threads->schSTskId, SS_AFFINITY_MODE_EXCL, threads->schCoreId, 0); + } + + if ((!xmlStrcmp(cur->name, (const xmlChar *)"SCTP_CORE")) && (cur->ns == ns)) + { + threads->sctpCoreId = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1)); + ODU_SET_THREAD_AFFINITY(&threads->sctpSTskId, SS_AFFINITY_MODE_EXCL, threads->sctpCoreId, 0); + } + + if ((!xmlStrcmp(cur->name, (const xmlChar *)"LOWER_MAC_CORE")) && (cur->ns == ns)) + { + threads->lwrMacCoreId = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1)); + ODU_SET_THREAD_AFFINITY(&threads->lwrMacSTskId, SS_AFFINITY_MODE_EXCL, threads->lwrMacCoreId, 0); + } + + cur = cur -> next; + } + return ROK; +} +#endif + +/******************************************************************* + * + * @brief Fill tmrTqCp + * + * @details + * + * Function : parseTmrTqCp + * + * Functionality: Fill tmrTqCp + * + * @params[in] XML document pointer + * XML namespace + * Current node in XML + * Pointer to structure to be filled + * @return ROK - success + * RFAILED - failure + * + * ****************************************************************/ +uint8_t parseTmrTqCp(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, CmTqCp *tmrTqCp) +{ + memset(tmrTqCp, 0, sizeof(CmTqCp)); + cur = cur ->xmlChildrenNode; + while(cur != NULL) + { + if ((!xmlStrcmp(cur->name, (const xmlChar *)"TIMER_LEN")) && (cur->ns == ns)) + { + tmrTqCp->tmrLen = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1)); + } + cur = cur -> next; + } + return ROK; +} + +/******************************************************************* + * + * @brief Fill DU timer Parameters + * + * @details + * + * Function : parseDuTimerParams + * + * Functionality: Fill DU timer Parmeters + * + * @params[in] XML document pointer + * XML namespace + * Current node in XML + * Pointer to structure to be filled + * @return ROK - success + * RFAILED - failure + * + * ****************************************************************/ +uint8_t parseDuTimerParams(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, DuTimers *duTimers) +{ + memset(duTimers, 0, sizeof(DuTimers)); + + cur = cur->xmlChildrenNode; + while (cur != NULL) + { + if ((!xmlStrcmp(cur->name, (const xmlChar *)"TIMER_TQ_CP")) && (cur->ns == ns)) + { + if(parseTmrTqCp(doc, ns, cur, &duTimers->tmrTqCp) != ROK) + { + return RFAILED; + } + else + { + /* Initialzie the timer queue */ + memset(&(duTimers->tmrTq), 0, sizeof(CmTqType) * duTimers->tmrTqCp.tmrLen); + } + } + + if ((!xmlStrcmp(cur->name, (const xmlChar *)"TIMER_RESOLUTION")) && (cur->ns == ns)) + { + duTimers->tmrRes = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1)); + } + cur = cur -> next; + } + return ROK; +} + +/******************************************************************* + * + * @brief Fill TNL assoc + * + * @details + * + * Function : parseTnlAssoc + * + * Functionality: Fill TNL assoc + * + * @params[in] XML document pointer + * XML namespace + * Current node in XML + * Pointer to structure to be filled + * @return ROK - success + * RFAILED - failure + * + * ****************************************************************/ +uint8_t parseTnlAssoc(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, TNLAssociation *tnlAssoc) +{ + char *duIpV4Addr; + char *ricIpV4Addr; + CmInetIpAddr duIp; + CmInetIpAddr ricIp; + + memset(tnlAssoc, 0, sizeof(TNLAssociation)); + cur = cur ->xmlChildrenNode; + while(cur != NULL) + { + if ((!xmlStrcmp(cur->name, (const xmlChar *)"LOCAL_IP")) && (cur->ns == ns)) + { + duIpV4Addr = (char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1); + cmInetAddr(duIpV4Addr, &(duIp)); + tnlAssoc->localIpAddress.ipV4Pres = true; + tnlAssoc->localIpAddress.ipV4Addr = duIp; + } + + if ((!xmlStrcmp(cur->name, (const xmlChar *)"LOCAL_PORT")) && (cur->ns == ns)) + { + tnlAssoc->localPort = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1)); + } + + if ((!xmlStrcmp(cur->name, (const xmlChar *)"DESTINATION_IP")) && (cur->ns == ns)) + { + ricIpV4Addr = (char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1); + cmInetAddr(ricIpV4Addr, &(ricIp)); + tnlAssoc->destIpAddress.ipV4Pres = true; + tnlAssoc->destIpAddress.ipV4Addr = ricIp; + } + + if ((!xmlStrcmp(cur->name, (const xmlChar *)"DESTINATION_PORT")) && (cur->ns == ns)) + { + tnlAssoc->destPort = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1)); + } + + if ((!xmlStrcmp(cur->name, (const xmlChar *)"ASSOC_USAGE")) && (cur->ns == ns)) + { + tnlAssoc->usage = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1)); + } + cur = cur -> next; + } + return ROK; +} + +/******************************************************************* + * + * @brief Fill E2 config Parameters + * + * @details + * + * Function : parseE2ConfigParams + * + * Functionality: Fill E2 config Parmeters + * + * @params[in] XML document pointer + * XML namespace + * Current node in XML + * Pointer to structure to be filled + * @return ROK - success + * RFAILED - failure + * + * ****************************************************************/ +uint8_t parseE2ConfigParams(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, E2apDb *e2apDb) +{ + uint8_t tnlIdx=0; + xmlNodePtr child = NULLP; + + memset(e2apDb, 0, sizeof(E2apDb)); + cur = cur->xmlChildrenNode; + while (cur != NULL) + { + if ((!xmlStrcmp(cur->name, (const xmlChar *)"E2_NODE_ID")) && (cur->ns == ns)) + { + e2apDb->e2NodeId = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1)); + } + + if ((!xmlStrcmp(cur->name, (const xmlChar *)"NUM_OF_TNL_ASSOC")) && (cur->ns == ns)) + { + e2apDb->numOfTNLAssoc = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1)); + } + + if ((!xmlStrcmp(cur->name, (const xmlChar *)"TNL_ASSOC_LIST")) && (cur->ns == ns)) + { + child = cur->xmlChildrenNode; + while(child != NULL) + { + if ((!xmlStrcmp(child->name, (const xmlChar *)"TNL_ASSOC")) && (child->ns == ns)) + { + if(parseTnlAssoc(doc, ns, child,&e2apDb->tnlAssoc[tnlIdx]) != ROK) + { + return RFAILED; + } + tnlIdx++; + + } + child = child -> next; + } + } + cur = cur -> next; + } + return ROK; +} /******************************************************************* * @@ -5308,18 +5450,22 @@ uint8_t parseDuCfgParams(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur) CmInetIpAddr cuIp; CmInetIpAddr ricIp; - memset(&duCfgParam, 0, sizeof(struct duCfgParams)); cur = cur->xmlChildrenNode; while(cur != NULL) { - if ((!xmlStrcmp(cur->name, (const xmlChar *)"MAX_NUM_DRB")) && (cur->ns == ns)) + if ((!xmlStrcmp(cur->name, (const xmlChar *)"THREAD_AFFINITY")) && (cur->ns == ns)) { - duCfgParam.maxNumDrb = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1)); +#ifdef THREAD_AFFINITY + if(parseThreadAffinity(doc, ns, cur, &duCfgParam.threadInfo) != ROK) + { + return RFAILED; + } +#endif } - if ((!xmlStrcmp(cur->name, (const xmlChar *)"MAX_NUM_UE_SUPPORTED")) && (cur->ns == ns)) + if ((!xmlStrcmp(cur->name, (const xmlChar *)"GNB_ID")) && (cur->ns == ns)) { - duCfgParam.maxSupportedUes = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1)); + duCb.gnbId = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1)); } if ((!xmlStrcmp(cur->name, (const xmlChar *)"DU_ID")) && (cur->ns == ns)) @@ -5339,6 +5485,16 @@ uint8_t parseDuCfgParams(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur) strcpy((char*)duCfgParam.duName, tempDuName); } + if ((!xmlStrcmp(cur->name, (const xmlChar *)"MAX_NUM_DRB")) && (cur->ns == ns)) + { + duCfgParam.maxNumDrb = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1)); + } + + if ((!xmlStrcmp(cur->name, (const xmlChar *)"MAX_NUM_UE_SUPPORTED")) && (cur->ns == ns)) + { + duCfgParam.maxSupportedUes = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1)); + } + if ((!xmlStrcmp(cur->name, (const xmlChar *)"MAX_NUM_UE")) && (cur->ns == ns)) { duCfgParam.maxUe = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1)); @@ -5400,6 +5556,7 @@ uint8_t parseDuCfgParams(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur) duCfgParam.egtpParams.maxTunnelId = duCfgParam.maxNumDrb * duCfgParam.maxSupportedUes; } +#ifdef XML_BASED_CONFIG if ((!xmlStrcmp(cur->name, (const xmlChar *)"MIB_PARAMS")) && (cur->ns == ns)) { if(parseMibParams(doc, ns, cur, &duCfgParam.mibParams) != ROK) @@ -5408,14 +5565,6 @@ uint8_t parseDuCfgParams(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur) } } - if ((!xmlStrcmp(cur->name, (const xmlChar *)"F1_RRC_VERSION")) && (cur->ns == ns)) - { - if(parseF1RrcVersion(doc, ns, cur, &duCfgParam.rrcVersion) != ROK) - { - return RFAILED; - } - } - if ((!xmlStrcmp(cur->name, (const xmlChar *)"F1_DU_SRVD_CELL_INFO")) && (cur->ns == ns)) { if(parseF1DuServedCellInfo(doc, ns, cur, &duCfgParam.srvdCellLst[0]) != ROK) @@ -5447,12 +5596,27 @@ uint8_t parseDuCfgParams(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur) return RFAILED; } } +#endif + if((!xmlStrcmp(cur->name, (const xmlChar *)"DU_TIMER_INFO")) && (cur->ns == ns)) + { + if(parseDuTimerParams(doc, ns, cur, &duCb.duTimersInfo) != ROK) + { + return RFAILED; + } + } + + if((!xmlStrcmp(cur->name, (const xmlChar *)"E2AP_CFG")) && (cur->ns == ns)) + { + if(parseE2ConfigParams(doc, ns, cur, &duCb.e2apDb) != ROK) + { + return RFAILED; + } + } cur = cur -> next; } return ROK; } -#endif /******************************************************************* * @@ -5495,9 +5659,7 @@ uint8_t duReadCfg() return RFAILED; } -#ifdef XML_BASED_CONFIG parseDuCfgParams(doc, ns, cur); -#endif xmlFreeDoc(doc); xmlCleanupParser(); @@ -5530,16 +5692,6 @@ uint8_t duReadCfg() cmInitTimers(&(duCb.e2apDb.e2TimersInfo.e2Timers.ricServiceUpdateTimer.timer), 1); cmInitTimers(&(duCb.e2apDb.e2TimersInfo.e2Timers.e2NodeConfigUpdate.timer), 1); - /* Initialzie the timer queue */ - memset(&(duCb.duTimersInfo.tmrTq), 0, sizeof(CmTqType) * DU_TQ_SIZE); - - /* Initialize the timer control point */ - memset(&(duCb.duTimersInfo.tmrTqCp), 0, sizeof(CmTqCp)); - duCb.duTimersInfo.tmrTqCp.tmrLen = DU_TQ_SIZE; - - /* Initialize the timer resolution */ - duCb.duTimersInfo.tmrRes = DU_TIMER_RESOLUTION; - /* Timer Registration request to system services */ if (ODU_REG_TMR_MT(pst.srcEnt, pst.srcInst, duCb.duTimersInfo.tmrRes, duActvTmr) != ROK) { @@ -5645,6 +5797,16 @@ void printDuConfig() DU_LOG("\n ** DU CONFIGURATION ** \n"); DU_LOG("DU ID %d\n", duCfgParam.duId); DU_LOG("DU Name %s\n", duCfgParam.duName); + + DU_LOG("\n ** Thread Affinity ** \n"); + DU_LOG("DU APP CORE ID %d\n", duCfgParam.threadInfo.duAppCoreId); + DU_LOG("EGTP CORE ID %d\n", duCfgParam.threadInfo.egtpCoreId); + DU_LOG("SCTP CORE ID %d\n", duCfgParam.threadInfo.sctpCoreId); + DU_LOG("RLC-UL CORE ID %d\n", duCfgParam.threadInfo.rlcUlCoreId); + DU_LOG("RLC-DL and MAC CORE ID %d\n", duCfgParam.threadInfo.rlcMacCoreId); + DU_LOG("SCH CORE ID %d\n", duCfgParam.threadInfo.schCoreId); + DU_LOG("Lower MAC CORE ID %d\n", duCfgParam.threadInfo.lwrMacCoreId); + DU_LOG("MAX NUM DRB %d\n", duCfgParam.maxNumDrb); DU_LOG("MAX SUPPORTED UE %d\n", duCfgParam.maxSupportedUes); DU_LOG("MAX UE %d\n",duCfgParam.maxUe); @@ -5682,11 +5844,6 @@ void printDuConfig() DU_LOG("Cell Barred %ld\n", mib->cellBarred); DU_LOG("Intra Frequency Reselection %ld\n", mib->intraFreqReselection); - f1RrcVersion = &duCfgParam.rrcVersion; - DU_LOG("\n ** RRC Version ** \n"); - DU_LOG("RRC Version %s\n", f1RrcVersion->rrcVer); - DU_LOG("Extended RRC Version %d\n", f1RrcVersion->extRrcVer); - duSysInfo = &duCfgParam.srvdCellLst[0].duSysInfo; DU_LOG("\n ** DU System Information ** \n"); DU_LOG("MIB length %d\n", duSysInfo->mibLen);