/* This file contains all utility functions */
#include "common_def.h"
-#ifdef XML_BASED_CONFIG
#include <libxml/parser.h>
#include <libxml/tree.h>
#include <libxml/xmlmemory.h>
#include <arpa/inet.h>
-#endif
#include "du_tmr.h"
#include "legtp.h"
* ****************************************************************/
uint8_t duReadCfg()
{
-#ifdef XML_BASED_CONFIG
const char *filename = "../build/config/odu_config.xml";
xmlDocPtr doc = NULLP;
xmlNodePtr cur = NULLP;
}
cur = xmlDocGetRootElement(doc);
- ns = xmlSearchNsByHref(doc, cur, (const xmlChar *)"odu_config.xml");
+ ns = xmlSearchNsByHref(doc, cur, (const xmlChar *)"urn:o-ran:odu:configuration");
if(ns == NULL)
{
DU_LOG("\nERROR --> DU_APP: XML Namespace not found.\n");
return RFAILED;
}
+#ifdef XML_BASED_CONFIG
parseDuCfgParams(doc, ns, cur);
+#endif
xmlFreeDoc(doc);
xmlCleanupParser();
-#endif
Pst pst;
Buffer *mBuf;
- memset(&duCfgParam, 0, sizeof(DuCfgParams));
-
/* Read configs into duCfgParams */
if(readCfg() != ROK)
{
/* Intel L1 using core 0-15. ODU-High using 16-21 */
/* system task for DU APP */
- if(ODU_CREATE_TASK(PRIOR0, &du_app_stsk) != ROK)
+ if(ODU_CREATE_TASK(PRIOR0, &duCfgParam.threadInfo.duAppSTskId) != ROK)
{
DU_LOG("\nERROR --> DU_APP : System Task creation for DU APP failed");
return RFAILED;
#endif
/* system task for EGTP */
- if(ODU_CREATE_TASK(PRIOR0, &egtp_stsk) != ROK)
+ if(ODU_CREATE_TASK(PRIOR0, &duCfgParam.threadInfo.egtpSTskId) != ROK)
{
DU_LOG("\nERROR --> DU_APP : System Task creation for EGTP failed");
return RFAILED;
#endif
/* system task for RLC_DL and MAC */
- if(ODU_CREATE_TASK(PRIOR0, &rlc_mac_cl_stsk) != ROK)
+ if(ODU_CREATE_TASK(PRIOR0, &duCfgParam.threadInfo.rlcMacSTskId) != ROK)
{
DU_LOG("\nERROR --> DU_APP : System Task creation for RLC DL/MAC failed");
return RFAILED;
#endif
/* system task for RLC UL */
- if(ODU_CREATE_TASK(PRIOR1, &rlc_ul_stsk) != ROK)
+ if(ODU_CREATE_TASK(PRIOR1, &duCfgParam.threadInfo.rlcUlSTskId) != ROK)
{
DU_LOG("\nERROR --> DU_APP : System Task creation for RLC UL failed");
return RFAILED;
#endif
/* system task for SCH */
- if(ODU_CREATE_TASK(PRIOR1, &sch_stsk) != ROK)
+ if(ODU_CREATE_TASK(PRIOR1, &duCfgParam.threadInfo.schSTskId) != ROK)
{
DU_LOG("\nERROR --> DU_APP : System Task creation for SCH failed");
return RFAILED;
#endif
/* system task for SCTP receiver thread */
- if(ODU_CREATE_TASK(PRIOR0, &sctp_stsk) != ROK)
+ if(ODU_CREATE_TASK(PRIOR0, &duCfgParam.threadInfo.sctpSTskId) != ROK)
{
DU_LOG("\nERROR --> DU_APP : System Task creation for SCTP failed");
return RFAILED;
#endif
/* system task for lower-mac receiver thread */
- if(ODU_CREATE_TASK(PRIOR0, &lwr_mac_stsk) != ROK)
+ if(ODU_CREATE_TASK(PRIOR0, &duCfgParam.threadInfo.lwrMacSTskId) != ROK)
{
DU_LOG("\nERROR --> DU_APP : System Task creation for Lower MAC failed");
return RFAILED;
#ifndef INTEL_WLS_MEM
/* system task for phy stub's slot indication generator thread */
- if(ODU_CREATE_TASK(PRIOR0, &phy_stub_slot_ind_stsk) != ROK)
+ if(ODU_CREATE_TASK(PRIOR0, &duCfgParam.threadInfo.phyStubSlotIndSTskId) != ROK)
{
DU_LOG("\nERROR --> DU_APP : System Task creation for Phy stub slot indication generator failed. MAX STSK [%d]", SS_MAX_STSKS);
return RFAILED;
#endif
/* Create TAPA tasks */
- if(duAppInit(du_app_stsk) != ROK)
+ if(duAppInit(duCfgParam.threadInfo.duAppSTskId) != ROK)
{
DU_LOG("\nERROR --> DU_APP : DU APP TAPA Task initialization failed");
return RFAILED;
}
- if(egtpInit(egtp_stsk) != ROK)
+ if(egtpInit(duCfgParam.threadInfo.egtpSTskId) != ROK)
{
DU_LOG("\nERROR --> DU_APP : EGTP TAPA Task initialization failed");
return RFAILED;
}
- if(sctpInit(sctp_stsk) != ROK)
+ if(sctpInit(duCfgParam.threadInfo.sctpSTskId) != ROK)
{
DU_LOG("\nERROR --> DU_APP : SCTP TAPA Task initialization failed");
return RFAILED;
}
- if(rlcDlInit(rlc_mac_cl_stsk) != ROK)
+ if(rlcDlInit(duCfgParam.threadInfo.rlcMacSTskId) != ROK)
{
DU_LOG("\nERROR --> DU_APP : RLC DL Tapa Task initialization failed");
return RFAILED;
}
- if(rlcUlInit(rlc_ul_stsk) != ROK)
+ if(rlcUlInit(duCfgParam.threadInfo.rlcUlSTskId) != ROK)
{
DU_LOG("\nERROR --> DU_APP : RLC UL Tapa Task initialization failed");
return RFAILED;
}
- if(schInit(sch_stsk) != ROK)
+ if(schInit(duCfgParam.threadInfo.schSTskId) != ROK)
{
DU_LOG("\nERROR --> DU_APP : SCH Tapa Task initialization failed");
return RFAILED;
}
- if(lwrMacInit(lwr_mac_stsk) != ROK)
+ if(lwrMacInit(duCfgParam.threadInfo.lwrMacSTskId) != ROK)
{
DU_LOG("\nERROR --> DU_APP : Lower MAC Tapa Task initialization failed");
return RFAILED;
}
#ifndef INTEL_WLS_MEM
- if(phyStubInit(phy_stub_slot_ind_stsk) != ROK)
+ if(phyStubInit(duCfgParam.threadInfo.phyStubSlotIndSTskId) != ROK)
{
DU_LOG("\nERROR --> DU_APP : PHY stub slot indication Tapa Task initialization failed");
return RFAILED;
if(start_O1_module() != ROK)
return RFAILED;
#endif
+
+ memset(&duCfgParam, 0, sizeof(DuCfgParams));
+
//Initialize TAPA layers
if(duInit() != ROK)
{