I_OPTS+=-I$(ROOT_DIR)/src/codec_utils/F1AP
I_OPTS+=-I$(ROOT_DIR)/src/codec_utils/RRC
+ifeq ($(O1_ENABLE),YES)
+I_OPTS+=-I$(ROOT_DIR)/src/o1/o1_client
+endif
+
#-------------------------------------------------------------#
#Linker macros
#-------------------------------------------------------------#
I_OPTS+=-I$(ROOT_DIR)/src/codec_utils/F1AP
I_OPTS+=-I$(ROOT_DIR)/src/codec_utils/RRC
I_OPTS+=-I$(ROOT_DIR)/src/codec_utils/E2AP
+
+ifeq ($(O1_ENABLE),YES)
I_OPTS+=-I$(ROOT_DIR)/src/o1/o1_client
+endif
#-------------------------------------------------------------#
#Linker macros
I_OPTS+=-I$(ROOT_DIR)/src/codec_utils/common
I_OPTS+=-I$(ROOT_DIR)/src/codec_utils/E2AP
+ifeq ($(O1_ENABLE),YES)
+I_OPTS+=-I$(ROOT_DIR)/src/o1/o1_client
+endif
#-------------------------------------------------------------#
#Linker macros
#-------------------------------------------------------------#
--- /dev/null
+module o-ran-sc-odu-interface-v1 {
+ yang-version 1;
+ namespace "urn:o-ran:odu:interface:1.0";
+ prefix rxad;
+
+ import ietf-inet-types { prefix inet; }
+
+ organization
+ "O-RAN Software Community";
+ contact
+ "www.o-ran.org";
+ description
+ "This module defines active interface information visible to operators
+
+ Copyright 2020 the O-RAN Alliance.
+
+ Licensed under the Apache License, Version 2.0 (the 'License');
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an 'AS IS' BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.";
+
+ revision 2020-01-29 {
+ description
+ "initial revision";
+ reference
+ "O-RAN-OAM-Interface-Specification (O1)";
+ }
+
+ grouping interface-info {
+ leaf interface-name {
+ type string;
+ description
+ "The unique interface ID";
+ }
+ leaf interface-address {
+ type inet:ip-address;
+ mandatory true;
+ description
+ "The local IP address to listen on for incoming
+ client connections. INADDR_ANY (0.0.0.0) or
+ INADDR6_ANY (0:0:0:0:0:0:0:0 a.k.a. ::) MUST be
+ used when the server is to listen on all IPv4 or
+ IPv6 addresses, respectively.";
+ }
+ leaf port {
+ type inet:port-number;
+ default "0";
+ description
+ "The local port number to listen on for incoming
+ client connections. An invalid default value (0)
+ is used (instead of 'mandatory true') so that an
+ application level data model may 'refine' it with
+ an application specific default port number value.";
+ }
+ description
+ "interface information";
+ }
+
+ container odu {
+ container interfaces {
+ list interface {
+ key "interface-name";
+ uses interface-info;
+ description
+ "The list of active interfaces in RIC";
+ }
+ description
+ "State data container of the interfaces";
+ }
+ description
+ "Root object for RIC interfaces";
+ }
+}
PLTFRM_FLAGS= -UMSPD -DODU -DINTEL_FAPI #-DODU_SLOT_IND_DEBUG_LOG -DEGTP_TEST
ifeq ($(MODE),TDD)
- PLTFRM_FLAGS += -DMODE=TDD
+ PLTFRM_FLAGS += -DNR_TDD
endif
ifeq ($(CA_ENABLE),YES)
PLTFRM_FLAGS += -DCA_ENABLE=YES
@echo -e "$(OPTS) NODE=TEST_STUB - Mandatory option for cu_stub/ric_stub$(NORM)"
@echo -e "$(OPTS) MODE=TDD - If not specified, MODE=FDD$(NORM)"
@echo -e "$(OPTS) PHY=INTEL_L1 - If not specified, Phy stub is used$(NORM)"
- @echo -e "$(OPTS) PHY_MODE=TIMER - Testing mode for INTEL_L1
+ @echo -e "$(OPTS) PHY_MODE=TIMER - Testing mode for INTEL_L1"
@echo -e "******************************************************************"
prepare_dirs:
$(Q)$(MAKE) -f $(COM_BUILD_DIR)/mt.mak OBJ_DIR=$(OBJ_ROOT)/odu LIB_DIR=$(LIB_ROOT)/odu LOG_DIR=$(LOG_ROOT)/odu CC='$(CC1)'
$(Q)$(MAKE) -f $(COM_BUILD_DIR)/rl.mak OBJ_DIR=$(OBJ_ROOT)/odu LIB_DIR=$(LIB_ROOT)/odu LOG_DIR=$(LOG_ROOT)/odu CC='$(CC1)'
$(Q)$(MAKE) -f $(COM_BUILD_DIR)/phy_stub.mak OBJ_DIR=$(OBJ_ROOT)/odu LIB_DIR=$(LIB_ROOT)/odu LOG_DIR=$(LOG_ROOT)/odu CC='$(CC1)'
+ifeq ($(O1_ENABLE),YES)
$(Q)$(MAKE) -f $(COM_BUILD_DIR)/o1_client.mak OBJ_DIR=$(OBJ_ROOT)/odu LIB_DIR=$(LIB_ROOT)/odu LOG_DIR=$(LOG_ROOT)/odu CC='$(CC1)'
+endif
link_du: du
$(Q)$(CC1) -g -o $(OBJ_ROOT)/odu/odu -Wl,-R../lib/:. $(OBJ_ROOT)/odu/*.o\
$(Q)$(MAKE) -f $(COM_BUILD_DIR)/mt.mak clean OBJ_DIR=$(OBJ_ROOT)/odu LIB_DIR=$(LIB_ROOT)/odu LOG_DIR=$(LOG_ROOT)/odu CC='$(CC1)'
$(Q)$(MAKE) -f $(COM_BUILD_DIR)/rl.mak clean OBJ_DIR=$(OBJ_ROOT)/odu LIB_DIR=$(LIB_ROOT)/odu LOG_DIR=$(LOG_ROOT)/odu CC='$(CC1)'
$(Q)$(MAKE) -f $(COM_BUILD_DIR)/phy_stub.mak clean OBJ_DIR=$(OBJ_ROOT)/odu LIB_DIR=$(LIB_ROOT)/odu LOG_DIR=$(LOG_ROOT)/odu CC='$(CC1)'
+ifeq ($(O1_ENABLE),YES)
$(Q)$(MAKE) -f $(COM_BUILD_DIR)/o1_client.mak clean OBJ_DIR=$(OBJ_ROOT)/odu LIB_DIR=$(LIB_ROOT)/odu LOG_DIR=$(LOG_ROOT)/odu CC='$(CC1)'
+endif
$(Q)rm -rf $(OBJ_ROOT)/odu/*
$(Q)rm -rf $(LIB_ROOT)/odu/*
$(Q)rm -rf $(BIN_DIR)/odu/*
$(Q)$(MAKE) -f $(COM_BUILD_DIR)/asn_rrc.mak OBJ_DIR=$(OBJ_ROOT)/cu_stub LIB_DIR=$(LIB_ROOT)/cu_stub LOG_DIR=$(LOG_ROOT)/cu_stub CC='$(CC1)'
$(Q)$(MAKE) -f $(COM_BUILD_DIR)/cm.mak OBJ_DIR=$(OBJ_ROOT)/cu_stub LIB_DIR=$(LIB_ROOT)/cu_stub LOG_DIR=$(LOG_ROOT)/cu_stub CC='$(CC1)'
$(Q)$(MAKE) -f $(COM_BUILD_DIR)/mt.mak OBJ_DIR=$(OBJ_ROOT)/cu_stub LIB_DIR=$(LIB_ROOT)/cu_stub LOG_DIR=$(LOG_ROOT)/cu_stub CC='$(CC1)'
+ifeq ($(O1_ENABLE),YES)
+ $(Q)$(MAKE) -f $(COM_BUILD_DIR)/o1_client.mak OBJ_DIR=$(OBJ_ROOT)/cu_stub LIB_DIR=$(LIB_ROOT)/cu_stub LOG_DIR=$(LOG_ROOT)/cu_stub CC='$(CC1)'
+endif
clean_cu:
$(Q)$(MAKE) -f $(COM_BUILD_DIR)/cu_stub.mak clean OBJ_DIR=$(OBJ_ROOT)/cu_stub LIB_DIR=$(LIB_ROOT)/cu_stub LOG_DIR=$(LOG_ROOT)/cu_stub CC='$(CC1)'
$(Q)$(MAKE) -f $(COM_BUILD_DIR)/asn_rrc.mak clean OBJ_DIR=$(OBJ_ROOT)/cu_stub LIB_DIR=$(LIB_ROOT)/cu_stub LOG_DIR=$(LOG_ROOT)/cu_stub CC='$(CC1)'
$(Q)$(MAKE) -f $(COM_BUILD_DIR)/cm.mak clean OBJ_DIR=$(OBJ_ROOT)/cu_stub LIB_DIR=$(LIB_ROOT)/cu_stub LOG_DIR=$(LOG_ROOT)/cu_stub CC='$(CC1)'
$(Q)$(MAKE) -f $(COM_BUILD_DIR)/mt.mak clean OBJ_DIR=$(OBJ_ROOT)/cu_stub LIB_DIR=$(LIB_ROOT)/cu_stub LOG_DIR=$(LOG_ROOT)/cu_stub CC='$(CC1)'
+ifeq ($(O1_ENABLE),YES)
+ $(Q)$(MAKE) -f $(COM_BUILD_DIR)/o1_client.mak clean OBJ_DIR=$(OBJ_ROOT)/cu_stub LIB_DIR=$(LIB_ROOT)/cu_stub LOG_DIR=$(LOG_ROOT)/cu_stub CC='$(CC1)'
+endif
$(Q)rm -rf $(OBJ_ROOT)/cu_stub/*
$(Q)rm -rf $(LIB_ROOT)/cu_stub/*
$(Q)rm -rf $(BIN_DIR)/cu_stub/*
$(Q)$(MAKE) -f $(COM_BUILD_DIR)/asn_e2ap.mak OBJ_DIR=$(OBJ_ROOT)/ric_stub LIB_DIR=$(LIB_ROOT)/ric_stub LOG_DIR=$(LOG_ROOT)/ric_stub CC='$(CC1)'
$(Q)$(MAKE) -f $(COM_BUILD_DIR)/cm.mak OBJ_DIR=$(OBJ_ROOT)/ric_stub LIB_DIR=$(LIB_ROOT)/ric_stub LOG_DIR=$(LOG_ROOT)/ric_stub CC='$(CC1)'
$(Q)$(MAKE) -f $(COM_BUILD_DIR)/mt.mak OBJ_DIR=$(OBJ_ROOT)/ric_stub LIB_DIR=$(LIB_ROOT)/ric_stub LOG_DIR=$(LOG_ROOT)/ric_stub CC='$(CC1)'
+ifeq ($(O1_ENABLE),YES)
+ $(Q)$(MAKE) -f $(COM_BUILD_DIR)/o1_client.mak OBJ_DIR=$(OBJ_ROOT)/ric_stub LIB_DIR=$(LIB_ROOT)/ric_stub LOG_DIR=$(LOG_ROOT)/ric_stub CC='$(CC1)'
+endif
clean_ric:
$(Q)$(MAKE) -f $(COM_BUILD_DIR)/ric_stub.mak clean OBJ_DIR=$(OBJ_ROOT)/ric_stub LIB_DIR=$(LIB_ROOT)/ric_stub LOG_DIR=$(LOG_ROOT)/ric_stub CC='$(CC1)'
$(Q)$(MAKE) -f $(COM_BUILD_DIR)/asn_rrc.mak clean OBJ_DIR=$(OBJ_ROOT)/ric_stub LIB_DIR=$(LIB_ROOT)/ric_stub LOG_DIR=$(LOG_ROOT)/ric_stub CC='$(CC1)'
$(Q)$(MAKE) -f $(COM_BUILD_DIR)/cm.mak clean OBJ_DIR=$(OBJ_ROOT)/ric_stub LIB_DIR=$(LIB_ROOT)/ric_stub LOG_DIR=$(LOG_ROOT)/ric_stub CC='$(CC1)'
$(Q)$(MAKE) -f $(COM_BUILD_DIR)/mt.mak clean OBJ_DIR=$(OBJ_ROOT)/ric_stub LIB_DIR=$(LIB_ROOT)/ric_stub LOG_DIR=$(LOG_ROOT)/ric_stub CC='$(CC1)'
+ifeq ($(O1_ENABLE),YES)
+ $(Q)$(MAKE) -f $(COM_BUILD_DIR)/o1_client.mak clean OBJ_DIR=$(OBJ_ROOT)/ric_stub LIB_DIR=$(LIB_ROOT)/ric_stub LOG_DIR=$(LOG_ROOT)/ric_stub CC='$(CC1)'
+endif
$(Q)rm -rf $(OBJ_ROOT)/ric_stub/*
$(Q)rm -rf $(LIB_ROOT)/ric_stub/*
$(Q)rm -rf $(BIN_DIR)/ric_stub/*
uint8_t lwr_mac_procConfigReqEvt(void *msg)
{
#ifdef INTEL_FAPI
- //uint8_t idx = 0;
+#ifdef NR_TDD
+ uint8_t slotIdx = 0;
+ uint8_t symbolIdx =0;
+#endif
uint8_t index = 0;
- uint16_t *cellId;
- uint16_t cellIdx;
+ uint16_t *cellId =NULLP;
+ uint16_t cellIdx =0;
uint32_t msgLen = 0;
uint32_t mib = 0;
MacCellCfg macCfgParams;
//fillTlvs(&configReq->tlvs[index++], FAPI_MULTIPLE_CELLS_SS_PBCH_IN_A_CARRIER_TAG, \
sizeof(uint8_t), macCfgParams.ssbCfg.multCellCarr, &msgLen);
+#ifdef NR_TDD
/* fill TDD table */
- //fillTlvs(&configReq->tlvs[index++], FAPI_TDD_PERIOD_TAG, \
+ fillTlvs(&configReq->tlvs[index++], FAPI_TDD_PERIOD_TAG, \
sizeof(uint8_t), macCfgParams.tddCfg.tddPeriod, &msgLen);
- //fillTlvs(&configReq->tlvs[index++], FAPI_SLOT_CONFIG_TAG, \
- sizeof(uint8_t), macCfgParams.tddCfg.slotCfg[0][0], &msgLen);
-
+ for(slotIdx =0 ;slotIdx< MAXIMUM_TDD_PERIODICITY; slotIdx++)
+ {
+ for(symbolIdx = 0; symbolIdx< MAX_SYMB_PER_SLOT; symbolIdx++)
+ {
+ fillTlvs(&configReq->tlvs[index++], FAPI_SLOT_CONFIG_TAG, \
+ sizeof(uint8_t), macCfgParams.tddCfg.slotCfg[slotIdx][symbolIdx], &msgLen);
+ }
+ }
+#endif
+
/* fill measurement config */
//fillTlvs(&configReq->tlvs[index++], FAPI_RSSI_MEASUREMENT_TAG, \
sizeof(uint8_t), macCfgParams.rssiUnit, &msgLen);
macCellCfg->initialUlBwp.puschCommon.startSymbol;
schCellCfg.schInitialUlBwp.puschCommon.lengthSymbol =
macCellCfg->initialUlBwp.puschCommon.lengthSymbol;
+#ifdef NR_TDD
+ memcpy(&schCellCfg.tddCfg, &macCellCfg->tddCfg, sizeof(TDDCfg));
+#endif
FILL_PST_MAC_TO_SCH(cfgPst, EVENT_SCH_CELL_CFG);
- DU_LOG("\nINFO --> MAC : Received CfgReq for MAC layer, Entity = %d, Instance = %d\n", pst->srcEnt, pst->srcInst,0,0);
+ DU_LOG("\nINFO --> MAC : Received CfgReq for MAC layer, Entity = %d, Instance = %d", pst->srcEnt, pst->srcInst);
RG_IS_INST_VALID(pst->dstInst);
inst = pst->dstInst - RG_INST_START;
return ROK;
}
#endif/*RGR_SI_SCH*/
-
+ UNUSED(inst);
pcch = rgDBMGetPcch(cell);
if ((pcch) && (pcch->lcId == datReq->lcId))
{
@brief This file implements the schedulers main access to MAC layer code.
*/
-static const char* RLOG_MODULE_NAME="MAC";
-static int RLOG_FILE_ID=185;
-static int RLOG_MODULE_ID=4096;
/* header include files -- defines (.h) */
#include "common_def.h"
if (SGetSBuf(cfmPst.region, cfmPst.pool, (Data **)&cfm, sizeof(RgMngmt))
!= ROK)
{
- RLOG_ARG0(L_ERROR,DBG_INSTID,inst, "Memory Unavailable for Confirmation");
+ DU_LOG("\nERROR --> SCH : Memory Unavailable for Confirmation");
SPutSBuf(pst->region, pst->pool, (Data *)cntrl, sizeof(RgMngmt));
return ROK;
} */
cfm.cfm.reason = LCM_REASON_GENCFG_NOT_DONE;
cfm.hdr.elmId.elmnt = cntrl->hdr.elmId.elmnt;
RgMiLrgSchCntrlCfm(&cfmPst, &cfm);
- RLOG_ARG0(L_ERROR,DBG_INSTID,inst, "Gen Cfg not done.");
+ DU_LOG("\nERROR --> SCH : Gen Cfg not done.");
/* SPutSBuf(pst->region, pst->pool, (Data *)cntrl, sizeof(RgMngmt)); */
return ROK;
}
cfm.cfm.status = LCM_PRIM_NOK;
cfm.cfm.reason = LCM_REASON_INVALID_PAR_VAL;
RgMiLrgSchCntrlCfm(&cfmPst, &cfm);
- RLOG_ARG1(L_ERROR,DBG_INSTID,inst, "invalid elmnt=%d",
+ DU_LOG("\nERROR --> SCH : invalid elmnt=%d",
cntrl->hdr.elmId.elmnt);
break;
}
rgSchL2mFillCfmPst(pst, &cfmPst, measInfo);
RGSCHFILLERR(err, RGSCHERR_L2M_MEASREQ, RGSCHERR_SCH_INVALID_CELLID);
rgSchL2mSndCfm(&cfmPst, NULLP, measInfo, TRUE);
- RLOG_ARG2(L_ERROR,DBG_INSTID,inst,
- "Meas req Failed.Invalid Cell Id errType(%d) errCause(%d)",
+ DU_LOG("\nERROR --> SCH : Meas req Failed.Invalid Cell Id errType(%d) errCause(%d)",
err.errType, err.errCause);
return RFAILED;
}
rgSchL2mFillCfmPst(pst, &cfmPst, measInfo);
RGSCHFILLERR(err, RGSCHERR_L2M_MEASREQ, RGSCHERR_SCH_INVALID_MEASTYPE);
rgSchL2mSndCfm(&cfmPst, NULLP, measInfo, TRUE);
- RLOG_ARG2(L_ERROR,DBG_CELLID,cell->cellId,
- "Meas req Failed.Invalid Measurement Type"
+ DU_LOG("\nERROR --> SCH : Meas req Failed.Invalid Measurement Type"
"errCasue(%d) errType(%d)", err.errType, err.errCause);
return RFAILED;
}
rgSchL2mFillCfmPst(pst, &cfmPst, measInfo);
RGSCHFILLERR(err, RGSCHERR_L2M_MEASREQ, RGSCHERR_SCH_DUP_TRANSID);
rgSchL2mSndCfm(&cfmPst, measCb, measInfo, TRUE);
- RLOG_ARG2(L_ERROR,DBG_CELLID,cell->cellId,
- "Meas req Failed.Dublicate TransId"
+ DU_LOG("\nERROR --> SCH : Meas req Failed Duplicate TransId"
"errType(%d) errCause(%d)", err.errType, err.errCause);
return RFAILED;
}
rgSchL2mFillCfmPst(pst, &cfmPst, measInfo);
RGSCHFILLERR(err, RGSCHERR_L2M_MEASREQ, RGSCHERR_SCH_L2MEAS_FAILED);
rgSchL2mSndCfm(&cfmPst, measCb, measInfo, TRUE);
- RLOG_ARG2(L_ERROR,DBG_CELLID,cell->cellId,
- "Meas req Failed.errType(%d) errCause(%d)",
+ DU_LOG("\nERROR --> SCH : Meas req Failed.errType(%d) errCause(%d)",
err.errType, err.errCause);
return RFAILED;
}
}
if (cell == NULLP)
{
- RLOG_ARG0(L_ERROR,DBG_CELLID,measInfo->cellId,
- "Stop req Failed.Invalid Cell Id ");
+ DU_LOG("\nERROR --> SCH : Stop req Failed.Invalid Cell Id ");
return RFAILED;
}
memset(&measCfm, 0, sizeof(LrgSchMeasCfmInfo));
}
if (cell == NULLP)
{
- RLOG_ARG0(L_ERROR,DBG_CELLID,measInfo->cellId,
- "Send req Failed.Invalid Cell Id");
+ DU_LOG("\nERROR --> SCH : Send req Failed.Invalid Cell Id");
return RFAILED;
}
/* This case might not be needed if SAP not configured then it will go
* to else of above if condition */
case LRG_UNBND: /* SAP is not bound */
- RLOG0(L_DEBUG,"SAP Not yet bound");
+ DU_LOG("\nDEBUG --> SCH : SAP Not yet bound");
rgSchCb[instId].rgrSap[spId].sapSta.sapState = LRG_BND;
rgSchCb[instId].rgrSap[spId].sapCfg.suId = suId;
/* Send Bind Confirm with status as SUCCESS */
LRG_EVENT_RGRSAP_ENB, LCM_CAUSE_UNKNOWN, &dgn);
break;
case LRG_BND: /* SAP is already bound*/
- RLOG0(L_DEBUG,"SAP is already bound");
+ DU_LOG("\nDEBUG --> SCH : SAP is already bound");
ret = rgSCHUtlRgrBndCfm(instId, suId, CM_BND_OK);
break;
default: /* Should Never Enter here */
#if (ERRCLASS & ERRCLS_ADD_RES)
- RGSCHLOGERROR(instId, ERRCLS_INT_PAR, ERG001,
- (ErrVal)rgSchCb[instId].rgrSap[spId].sapSta.sapState,
- "Invalid SAP State:RgUiRrgBndReq failed\n");
+ DU_LOG("\nERROR --> SCH : Invalid SAP State:RgUiRrgBndReq failed\n");
#endif
ret = rgSCHUtlRgrBndCfm(instId, suId, CM_BND_NOK);
break;
#if (ERRCLASS & ERRCLS_ADD_RES)
/* ccpu00117035 - MOD - Changed ErrVal argument from accessing sap state
to spId to avoid seg fault due to invalid sapID */
- RGSCHLOGERROR(instId, ERRCLS_INT_PAR, ERG002,
- (ErrVal)spId, "Invalid SAP Id:RgUiRrgBndReq failed\n");
+ DU_LOG("\nERROR --> SCH : Invalid SAP Id:RgUiRrgBndReq failed\n");
#endif
ret = RgUiRgrBndCfm(&tmpPst, suId, CM_BND_NOK);
}
switch(rgSchCb[instId].rgrSap[spId].sapSta.sapState)
{
case LRG_BND: /* SAP is already bound*/
- RLOG0(L_DEBUG,"SAP is already bound");
+ DU_LOG("\nDEBUG --> SCH : SAP is already bound");
/* setting SAP state to UN BOUND */
rgSchCb[instId].rgrSap[spId].sapSta.sapState = LRG_UNBND;
break;
default:
#if (ERRCLASS & ERRCLS_ADD_RES)
- RGSCHLOGERROR(instId, ERRCLS_INT_PAR, ERG003,
- (ErrVal)rgSchCb[instId].rgrSap[spId].sapSta.sapState,
- "Invalid SAP State: RgUiRgrUbndReq failed\n");
+ DU_LOG("\nERROR --> SCH : Invalid SAP State RgUiRgrUbndReq failed\n");
#endif
return RFAILED;
}
else
{
#if (ERRCLASS & ERRCLS_ADD_RES)
- RGSCHLOGERROR(instId,ERRCLS_INT_PAR, ERG004,
- (ErrVal)rgSchCb[instId].rgrSap[spId].sapSta.sapState,
- "Invalid SAP Id:RgUiRgrUbndReq failed\n");
+ DU_LOG("\nERROR --> SCH : Invalid SAP Id RgUiRgrUbndReq failed\n");
#endif
return RFAILED;
}
if (cfgReqInfo == NULLP)
{
- RLOG_ARG0(L_ERROR,DBG_INSTID,instId,"Input Message Buffer "
- "is NULL");
+ DU_LOG("\nERROR --> SCH : Input Message Buffer is NULL");
rgSCHUtlRgrSiCfgCfm(instId, spId, transId, cfmStatus);
return RFAILED;
}
if(LRG_BND != rgSchCb[instId].rgrSap[spId].sapSta.sapState)
{
#if (ERRCLASS & ERRCLS_ADD_RES)
- RGSCHLOGERROR(instId, ERRCLS_INT_PAR, ERG007,
- (ErrVal)rgSchCb[instId].rgrSap[spId].sapSta.sapState,
- "Invalid SAP State: RgUiRgrSiCfgReq failed\n");
+ DU_LOG("\nERROR --> SCH : Invalid SAP State: RgUiRgrSiCfgReq failed\n");
#endif
SPutSBuf(pst->region, pst->pool, (Data *)cfgReqInfo,
(Size)sizeof(*cfgReqInfo));
else
{
#if (ERRCLASS & ERRCLS_ADD_RES)
- RGSCHLOGERROR(instId, ERRCLS_INT_PAR, ERG008,
- (ErrVal)rgSchCb[instId].rgrSap[spId].sapCfg.spId,
- "Invalid SAP Id:RgUiRgrSiCfgReq failed\n");
+ DU_LOG("\nERROR --> SCH : Invalid SAP Id:RgUiRgrSiCfgReq failed\n");
#endif
SPutSBuf(pst->region, pst->pool, (Data *)cfgReqInfo,
(Size)sizeof(*cfgReqInfo));
#endif
if (ret != ROK)
{
- RLOG_ARG0(L_ERROR,DBG_INSTID,instId,"RgUiRgrSiCfgReq:"
+ DU_LOG("\nERROR --> SCH : RgUiRgrSiCfgReq:"
"Configuration Request Handling Failed");
return RFAILED;
}
if (warningSiCfgReqInfo == NULLP)
{
- RLOG_ARG0(L_ERROR,DBG_INSTID,instId,"Input Message Buffer "
+ DU_LOG("\nERROR --> SCH : Input Message Buffer "
"is NULL");
rgSCHUtlRgrWarningSiCfgCfm(instId, spId, 0, transId, cfmStatus);
return RFAILED;
if(LRG_BND != rgSchCb[instId].rgrSap[spId].sapSta.sapState)
{
#if (ERRCLASS & ERRCLS_ADD_RES)
- RGSCHLOGERROR(instId, ERRCLS_INT_PAR, ERG023,
- (ErrVal)rgSchCb[instId].rgrSap[spId].sapSta.sapState,
- "Invalid SAP State: warningSiCfgReqInfo failed\n");
+ DU_LOG("\nERROR --> SCH : Invalid SAP State: warningSiCfgReqInfo failed\n");
#endif
rgSCHUtlFreeWarningSiSeg(pst->region, pst->pool,
&warningSiCfgReqInfo->siPduLst);
else
{
#if (ERRCLASS & ERRCLS_ADD_RES)
- RGSCHLOGERROR(instId, ERRCLS_INT_PAR, ERG024,
- (ErrVal)rgSchCb[instId].rgrSap[spId].sapCfg.spId,
- "Invalid SAP Id:warningSiCfgReqInfo failed\n");
+ DU_LOG("\nERROR --> SCH : Invalid SAP Id:warningSiCfgReqInfo failed\n");
#endif
rgSCHUtlFreeWarningSiSeg(pst->region, pst->pool,
&warningSiCfgReqInfo->siPduLst);
#endif
if(ret != ROK)
{
- RLOG_ARG0(L_ERROR,DBG_INSTID,instId,
- "Configuration Request Handling Failed");
+ DU_LOG("\nERROR --> SCH : Configuration Request Handling Failed");
return RFAILED;
}
if(LRG_BND != rgSchCb[instId].rgrSap[spId].sapSta.sapState)
{
#if (ERRCLASS & ERRCLS_ADD_RES)
- RGSCHLOGERROR(instId, ERRCLS_INT_PAR, ERG025,
- (ErrVal)rgSchCb[instId].rgrSap[spId].sapSta.sapState,
- "Invalid SAP State: RgUiRgrWarningSiStopReq failed\n");
+ DU_LOG("\nERROR --> SCH : Invalid SAP State: RgUiRgrWarningSiStopReq failed\n");
#endif
return RFAILED;
}
else
{
#if (ERRCLASS & ERRCLS_ADD_RES)
- RGSCHLOGERROR(instId, ERRCLS_INT_PAR, ERG026,
- (ErrVal)rgSchCb[instId].rgrSap[spId].sapCfg.spId,
- "Invalid SAP Id:RgUiRgrWarningSiStopReq failed\n");
+ DU_LOG("\nERROR --> SCH : Invalid SAP Id:RgUiRgrWarningSiStopReq failed\n");
#endif
return RFAILED;
}
if (loadInfReq == NULLP)
{
- RLOG_ARG0(L_ERROR,DBG_INSTID,instId,"Input Message Buffer "
+ DU_LOG("\nERROR --> SCH : Input Message Buffer "
"is NULL");
return RFAILED;
}
if(LRG_BND != rgSchCb[instId].rgrSap[spId].sapSta.sapState)
{
#if (ERRCLASS & ERRCLS_ADD_RES)
- RGSCHLOGERROR(instId, ERRCLS_INT_PAR, ERG007,
- (ErrVal)rgSchCb[instId].rgrSap[spId].sapSta.sapState,
- "Invalid SAP State: RgUiRgrLoadInfReq failed\n");
+ DU_LOG("\nERROR --> SCH : Invalid SAP State: RgUiRgrLoadInfReq failed\n");
#endif
SPutSBuf(pst->region, pst->pool, (Data *)loadInfReq,
(Size)sizeof(*loadInfReq));
else
{
#if (ERRCLASS & ERRCLS_ADD_RES)
- RGSCHLOGERROR(instId, ERRCLS_INT_PAR, ERG008,
- (ErrVal)rgSchCb[instId].rgrSap[spId].sapCfg.spId,
- "Invalid SAP Id:RgUiRgrLoadInfReq failed\n");
+ DU_LOG("\nERROR --> SCH : Invalid SAP Id:RgUiRgrLoadInfReq failed\n");
#endif
SPutSBuf(pst->region, pst->pool, (Data *)loadInfReq,
(Size)sizeof(*loadInfReq));
loadInfReq);
if (ret != ROK)
{
- RLOG_ARG0(L_ERROR,DBG_INSTID,instId,
- "Configuration Request Handling Failed");
+ DU_LOG("\nERROR --> SCH : Configuration Request Handling Failed");
return RFAILED;
}
Inst inst = (pst->dstInst - SCH_INST_START);
S16 cellSapId = boRpt->cellSapId;
/*
- RLOG_ARG2(L_DEBUG,DBG_CELLID,boRpt->cellId,"rgMacSchDedBoUpdtReq():"
+ DU_LOG("\nDEBUG --> SCH : rgMacSchDedBoUpdtReq():"
" boRpt->rnti = %u boRpt->lcId = %u",boRpt->rnti, boRpt->lcId);
*/
/* No need to chk for cell being NULL as MAC wouldn't have found instance if
if (cell->cellId != boRpt->cellId)
{
/* Handle Cell fetch failure */
- RGSCHLOGERROR(inst, ERRCLS_INT_PAR,ERG009,(ErrVal)boRpt->cellId,
- "rgMacSchDedBoUpdtReq(): Invalid cell Id");
+ DU_LOG("\nERROR --> SCH : rgMacSchDedBoUpdtReq(): Invalid cell Id");
return RFAILED;
}
#endif
cell = rgSchCb[inst].rgrSap[cellSapId].cell;
if (cell->cellId != boRpt->cellId)
{
- RLOG_ARG1(L_DEBUG,DBG_CELLID,cell->cellId,"RgMacSchCmnBoUpdtReq():"
+ DU_LOG("\nERROR --> SCH : RgMacSchCmnBoUpdtReq():"
"Invalid boRpt cell Id:%d",boRpt->cellId);
return RFAILED;
}
/* handle status response on CCCH */
if(boRpt->lcId == cell->dlCcchId)
{
- RLOG_ARG0(L_DEBUG,DBG_CELLID,cell->cellId,"RgMacSchCmnBoUpdtReq():"
+ DU_LOG("\nDEBUG --> SCH : RgMacSchCmnBoUpdtReq():"
" BO update for CCCH");
rgSCHUtlHndlCcchBoUpdt(cell, boRpt);
}
if (rgSchCb[inst].rgrSap == NULLP || rgSchCb[inst].rgrSap[cellSapId].cell == NULLP)
{
- RLOG_ARG0(L_ERROR,DBG_CELLID,ueDelInd->cellId,"rgrSap or cell is not configured");
+ DU_LOG("\nERROR --> SCH : rgrSap or cell is not configured");
return ROK;
}
cell = rgSchCb[inst].rgrSap[cellSapId].cell;
if (cell->cellId != ueDelInd->cellId)
{
/* Handle Cell fetch failure */
- RLOG_ARG1(L_ERROR,DBG_CELLID,cell->cellId,
- "rgMacSchUeDelInd(): Invalid ueDelInd cell Id:%d",
+ DU_LOG("\nERROR --> SCH : rgMacSchUeDelInd(): Invalid ueDelInd cell Id:%d",
ueDelInd->cellId);
return ROK;
}
cmLListDelFrm(&cell->rntiDb.rntiGuardPool, tmp);
tmp->node = NULLP;
rgSCHDbmRlsRnti(cell, rntiLnk);
- RLOG_ARG2(L_DEBUG,DBG_CELLID,cell->cellId,
- "RNTI:%d Released from the Guard pool(%ld)",
+ DU_LOG("\nDEBUG --> SCH : RNTI:%d Released from the Guard pool(%d)",
ueDelInd->rnti, cell->rntiDb.rntiGuardPool.count);
break;
if(tmp == NULLP)
{
/* Fix : syed HO UE does not have a valid ue->rntiLnk */
- RLOG_ARG2(L_INFO,DBG_CELLID,ueDelInd->cellId,"HO CRNTI:%d not present in the"
- "Guard Pool:%ld", ueDelInd->rnti, cell->rntiDb.rntiGuardPool.count);
+ DU_LOG("\nINFO --> SCH : HO CRNTI:%d not present in the"
+ "Guard Pool:%d", ueDelInd->rnti, cell->rntiDb.rntiGuardPool.count);
}
return ROK;
{
RGSCH_FREE_MEM(subfrmInfo);
err.errType = RGSCHERR_TOM_DATIND;
- RLOG_ARG1(L_ERROR,DBG_CELLID,cell->cellId,
- "Received MSG3 with CRNTI:%d and also CCCH ",
+ DU_LOG("\nDEBUG --> SCH : Received MSG3 with CRNTI:%d and also CCCH ",
datInd->ceInfo.ces.cRnti);
return RFAILED;
}
/* ccpu00141318 - Removed condition for SPS rnti checking*/
RGSCH_FREE_MEM(subfrmInfo);
err.errType = RGSCHERR_TOM_DATIND;
- RLOG_ARG1(L_ERROR,DBG_CELLID,cell->cellId, "Received MSG3 "
+ DU_LOG("\nERROR --> SCH : Received MSG3 "
"with CRNTI:%d unable to find ueCb",
datInd->ceInfo.ces.cRnti);
return RFAILED;
{
RGSCH_FREE_MEM(subfrmInfo);
err.errType = RGSCHERR_TOM_DATIND;
- RLOG_ARG1(L_ERROR,DBG_CELLID,cell->cellId, "Processing for MSG3 failed for CRNTI:%d",
+ DU_LOG("\nERROR --> SCH : Processing for MSG3 failed for CRNTI:%d",
datInd->rnti);
return RFAILED;
}
ret = rgSCHUtlFillSndUeStaInd(cell, ue, ueStaInd);
if(ret != ROK)
{
- RLOG_ARG1(L_ERROR,DBG_CELLID,cell->cellId,
- "Could not Send Ue Sta Ind UEID:%d",ue->ueId);
+ DU_LOG("\nERROR --> SCH : Could not Send Ue Sta Ind UEID:%d",ue->ueId);
}
}
CM_LLIST_NEXT_NODE(lnkLst, tmp);
{
RGSCH_FREE_MEM(subfrmInfo);
err.errType = RGSCHERR_TOM_DATIND;
- RLOG_ARG1(L_ERROR,DBG_CELLID,cell->cellId,"Processing for MSG3 failed for CRNTI:%d",
+ DU_LOG("\nERROR --> SCH : Processing for MSG3 failed for CRNTI:%d",
datInd->rnti);
return RFAILED;
}
{
RGSCH_FREE_MEM(subfrmInfo);
err.errType = RGSCHERR_TOM_DATIND;
- RLOG_ARG1(L_ERROR,DBG_CELLID,cell->cellId,"Unable to get the UE CB for CRNTI:%d",
+ DU_LOG("\nERROR --> SCH : Unable to get the UE CB for CRNTI:%d",
datInd->rnti);
return RFAILED;
}
{
RGSCH_FREE_MEM(subfrmInfo);
err.errType = RGSCHERR_TOM_DATIND;
- RLOG_ARG1(L_ERROR,DBG_CELLID,cell->cellId,"Unable to handle Data"
+ DU_LOG("\nERROR --> SCH : Unable to handle Data"
" Indication for UEID:%d",ue->ueId);
return RFAILED;
}
if ((ue = rgSCHDbmGetUeCb(cell, relInfo->cRnti)) == NULLP)
{
- RLOG_ARG1(L_ERROR,DBG_CELLID,cell->cellId,
- "No Ue exists with CRNTI:%d",relInfo->cRnti);
+ DU_LOG("\nERROR --> SCH : No Ue exists with CRNTI:%d",relInfo->cRnti);
return RFAILED;
}
if ((rgSCHUtlSpsRelInd(cell, ue, relInfo->isExplRel)) != ROK)
{
- RLOG_ARG1(L_ERROR,DBG_CELLID,cell->cellId,
- "RelInd processing for CRNTI:%d failed",relInfo->cRnti);
+ DU_LOG("\nERROR --> SCH : RelInd processing for CRNTI:%d failed",relInfo->cRnti);
return RFAILED;
}
return ROK;
/* If no cellCb return Err with Invalid Cell Id */
if (cell == NULLP)
{
- RLOG_ARG0(L_ERROR,DBG_CELLID,measCfm->cellId,
- "Meas Cfm Failed.Invalid Cell Id");
+ DU_LOG("\nERROR --> SCH : Meas Cfm Failed.Invalid Cell Id");
return RFAILED;
}
if(suId >= rgSchCb[instId].numSaps)
{
- RLOG_ARG0(L_ERROR,DBG_INSTID,instId, "Incorrect SuId");
+ DU_LOG("\nERROR --> SCH : Incorrect SuId");
return RFAILED;
}
/* Lets validate suId first */
if (suId != tfuSap->sapCfg.suId)
{
- RLOG_ARG2(L_ERROR,DBG_INSTID,instId, "Incorrect SuId. Configured (%d)"
+ DU_LOG("\nERROR --> SCH : Incorrect SuId. Configured (%d)"
"Recieved (%d)", tfuSap->sapCfg.suId, suId);
return RFAILED;
}
if ((ret = rgSCHUtlValidateTfuSap (inst, suId)) != ROK)
{
- RLOG_ARG1(L_ERROR,DBG_INSTID,inst,"SAP Validation failed SuId(%d)", suId);
+ DU_LOG("\nERROR --> SCH : SAP Validation failed SuId(%d)", suId);
/* Free up the memory for the request structure */
RGSCH_FREE_MEM(raReqInd);
return (ret);
if(raReqInd == NULLP)
{
- RLOG_ARG0(L_ERROR,DBG_INSTID,inst,"Invalid input pointer for raReqInd Failed");
+ DU_LOG("\nERROR --> SCH : Invalid input pointer for raReqInd Failed");
return RFAILED;
}
if (rgSchCb[inst].tfuSap[suId].cell == NULLP)
{
- RLOG_ARG0(L_ERROR,DBG_CELLID,raReqInd->cellId,"No cell exists");
+ DU_LOG("\nERROR --> SCH : No cell exists");
return RFAILED;
}
if ((ret = rgSCHUtlValidateTfuSap (inst, suId)) != ROK)
{
- RLOG_ARG0(L_ERROR,DBG_INSTID,inst,"SAP Validation failed");
+ DU_LOG("\nERROR --> SCH : SAP Validation failed");
/* Free up the memory for the request structure */
RGSCH_FREE_MEM(ulCqiInd);
return (ret);
if (rgSchCb[inst].tfuSap[suId].cell == NULLP)
{
- RLOG_ARG0(L_ERROR,DBG_INSTID,inst,"No cell exists");
+ DU_LOG("\nERROR --> SCH : No cell exists");
/* Free up the memory for the request structure */
RGSCH_FREE_MEM(ulCqiInd);
return RFAILED;
if ((ret = rgSCHUtlValidateTfuSap (inst, suId)) != ROK)
{
- RLOG_ARG0(L_ERROR,DBG_INSTID,inst,"SAP Validation failed");
+ DU_LOG("\nERROR --> SCH : SAP Validation failed");
/* Free up the memory for the request structure */
RGSCH_FREE_MEM(pucchDeltaPwr);
return (ret);
if (rgSchCb[inst].tfuSap[suId].cell == NULLP)
{
- RLOG_ARG0(L_ERROR,DBG_INSTID,inst,"No cell exists");
+ DU_LOG("\nERROR --> SCH : No cell exists");
return RFAILED;
}
ret = rgSCHTomPucchDeltaPwrInd (rgSchCb[inst].tfuSap[suId].cell, pucchDeltaPwr);
#ifndef NO_ERRCLS
if ((ret = rgSCHUtlValidateTfuSap (inst, suId)) != ROK)
{
- RLOG_ARG0(L_ERROR,DBG_INSTID,inst,"SAP Validation failed");
+ DU_LOG("\nERROR --> SCH : SAP Validation failed");
RGSCH_FREE_MEM(harqAckInd);
return (ret);
}
if (rgSchCb[inst].tfuSap[suId].cell == NULLP)
{
- RLOG_ARG0(L_ERROR,DBG_INSTID,inst,"No cell exists");
+ DU_LOG("\nERROR --> SCH : No cell exists");
return RFAILED;
}
#endif
#ifndef NO_ERRCLS
if ((ret = rgSCHUtlValidateTfuSap (inst, suId)) != ROK)
{
- RLOG_ARG0(L_ERROR,DBG_INSTID,inst,"() SAP Validation failed");
+ DU_LOG("\nERROR --> SCH : SAP Validation failed");
RGSCH_FREE_MEM(srInd);
return (ret);
}
if (rgSchCb[inst].tfuSap[suId].cell == NULLP)
{
- RLOG_ARG0(L_ERROR,DBG_INSTID,inst,"RgLiTfuSrInd()No cell exists");
+ DU_LOG("\nERROR --> SCH : RgLiTfuSrInd()No cell exists");
return RFAILED;
}
#endif
if ((ret = rgSCHUtlValidateTfuSap (inst, suId)) != ROK)
{
- RLOG_ARG0(L_ERROR,DBG_INSTID,inst," SAP Validation failed");
+ DU_LOG("\nERROR --> SCH : SAP Validation failed");
/* Free up the memory for the request structure */
RGSCH_FREE_MEM(dlCqiInd);
return (ret);
if (rgSchCb[inst].tfuSap[suId].cell == NULLP)
{
- RLOG_ARG0(L_ERROR,DBG_INSTID,inst,"No cell exists");
+ DU_LOG("\nERROR --> SCH : No cell exists");
return RFAILED;
}
ret = rgSCHTomDlCqiInd (rgSchCb[inst].tfuSap[suId].cell, dlCqiInd);
#ifdef NO_ERRCLS
if ((ret = rgSCHUtlValidateTfuSap (inst, suId)) != ROK)
{
- RLOG_ARG0(L_ERROR,DBG_INSTID,inst,"SAP Validation failed");
+ DU_LOG("\nERROR --> SCH : SAP Validation failed");
/* Free up the memory for the request structure */
RGSCH_FREE_MEM(rawCqiInd);
return (ret);
if (rgSchCb[inst].tfuSap[suId].cell == NULLP)
{
- RLOG_ARG0(L_ERROR,DBG_INSTID,inst," No cell exists");
+ DU_LOG("\nERROR --> SCH : No cell exists");
return RFAILED;
}
#endif
if ((ret = rgSCHUtlValidateTfuSap (inst, suId)) != ROK)
{
- RLOG_ARG0(L_ERROR,DBG_INSTID,inst," SAP Validation failed");
+ DU_LOG("\nERROR --> SCH : SAP Validation failed");
/* Free up the memory for the request structure */
RGSCH_FREE_MEM(srsInd);
return (ret);
if (rgSchCb[inst].tfuSap[suId].cell == NULLP)
{
- RLOG_ARG0(L_ERROR,DBG_INSTID,inst,"No cell exists");
+ DU_LOG("\nERROR --> SCH : No cell exists");
return RFAILED;
}
ret = rgSCHTomSrsInd (rgSchCb[inst].tfuSap[suId].cell, srsInd);
if ((ret = rgSCHUtlValidateTfuSap (inst, suId)) != ROK)
{
- RLOG_ARG0(L_ERROR,DBG_INSTID,inst,"SAP Validation failed");
+ DU_LOG("\nERROR --> SCH : SAP Validation failed");
/* Free up the memory for the request structure */
RGSCH_FREE_MEM(doaInd);
return (ret);
if (rgSchCb[inst].tfuSap[suId].cell == NULLP)
{
- RLOG_ARG0(L_ERROR,DBG_INSTID,inst,"No cell exists");
+ DU_LOG("\nERROR --> SCH : No cell exists");
return RFAILED;
}
ret = rgSCHTomDoaInd (rgSchCb[inst].tfuSap[suId].cell, doaInd);
#ifndef NO_ERRCLS
if ((ret = rgSCHUtlValidateTfuSap (inst, suId)) != ROK)
{
- RLOG_ARG0(L_ERROR,DBG_INSTID,inst,"SAP Validation failed");
+ DU_LOG("\nERROR --> SCH : SAP Validation failed");
RGSCH_FREE_MEM(crcInd);
return (ret);
}
if (rgSchCb[inst].tfuSap[suId].cell == NULLP)
{
- RLOG_ARG0(L_ERROR,DBG_INSTID,inst,"No cell exists");
+ DU_LOG("\nERROR --> SCH : No cell exists");
return RFAILED;
}
#endif
if ((ret = rgSCHUtlValidateTfuSap (inst, suId)) != ROK)
{
- RLOG_ARG0(L_ERROR,DBG_INSTID,inst,"SAP Validation failed");
+ DU_LOG("\nERROR --> SCH : SAP Validation failed");
/* Free up the memory for the request structure */
RGSCH_FREE_MEM(timingAdvInd);
return (ret);
if (rgSchCb[inst].tfuSap[suId].cell == NULLP)
{
- RLOG_ARG0(L_ERROR,DBG_INSTID,inst,"No cell exists");
+ DU_LOG("\nERROR --> SCH : No cell exists");
return RFAILED;
}
/* Now call the TOM (Tfu ownership module) primitive to process further */
/* This case might not be needed if SAP not configured then it will go
* to else of above if condition */
case LRG_UNBND: /* SAP is not bound */
- RLOG0(L_DEBUG,"SAP is not yet bound");
+ DU_LOG("\nDEBUG --> SCH : SAP is not yet bound");
rgSchCb[instId].rgmSap[spId].sapSta.sapState = LRG_BND;
rgSchCb[instId].rgmSap[spId].sapCfg.suId = suId;
/* Send Bind Confirm with status as SUCCESS */
/*Indicate to Layer manager */
break;
case LRG_BND: /* SAP is already bound*/
- RLOG0(L_DEBUG,"SAP is already bound");
+ DU_LOG("\nDEBUG --> SCH : SAP is already bound");
ret = rgSCHUtlRgmBndCfm(instId, suId, CM_BND_OK);
break;
default: /* Should Never Enter here */
#if (ERRCLASS & ERRCLS_ADD_RES)
- RGSCHLOGERROR(instId, ERRCLS_INT_PAR, ERG001,
- (ErrVal)rgSchCb[instId].rgmSap[spId].sapSta.sapState,
- "Invalid SAP State:RgUiRgmBndReq failed\n");
+ DU_LOG("\nERROR --> SCH : Invalid SAP State:RgUiRgmBndReq failed\n");
#endif
ret = rgSCHUtlRgmBndCfm(instId, suId, CM_BND_NOK);
break;
#if (ERRCLASS & ERRCLS_ADD_RES)
/* ccpu00117035 - MOD - Changed ErrVal argument from accessing sap state
to spId to avoid seg fault due to invalid sapID */
- RGSCHLOGERROR(instId, ERRCLS_INT_PAR, ERG002,
- (ErrVal)spId, "Invalid SAP Id:RgUiRrmBndReq failed\n");
+ DU_LOG("\nERROR --> SCH : Invalid SAP Id:RgUiRrmBndReq failed\n");
#endif
ret = RgUiRgmBndCfm(&tmpPst, suId, CM_BND_NOK);
}
{
case LRG_BND: /* SAP is already bound*/
/* setting SAP state to UN BOUND */
- RLOG0(L_DEBUG,"SAP is already bound");
+ DU_LOG("\nDEBUG --> SCH : SAP is already bound");
rgSchCb[instId].rgmSap[spId].sapSta.sapState = LRG_UNBND;
break;
default:
#if (ERRCLASS & ERRCLS_ADD_RES)
- RGSCHLOGERROR(instId, ERRCLS_INT_PAR, ERG003,
- (ErrVal)rgSchCb[instId].rgmSap[spId].sapSta.sapState,
- "Invalid SAP State: RgUiRgmUbndReq failed\n");
+ DU_LOG("\nERROR --> SCH : Invalid SAP State: RgUiRgmUbndReq failed\n");
#endif
return RFAILED;
}
else
{
#if (ERRCLASS & ERRCLS_ADD_RES)
- RGSCHLOGERROR(instId,ERRCLS_INT_PAR, ERG004,
- (ErrVal)rgSchCb[instId].rgmSap[spId].sapSta.sapState,
- "Invalid SAP Id:RgUiRgmUbndReq failed\n");
+ DU_LOG("\nERROR --> SCH : Invalid SAP Id:RgUiRgmUbndReq failed\n");
#endif
return RFAILED;
}
/* clear the qciPrbRpts for all GBR QCIs */
memset(&prbUsage->qciPrbRpts[0], 0,
(RGM_MAX_QCI_REPORTS * sizeof(RgSchQciPrbUsage)));
-
- RLOG_ARG2(L_DEBUG,DBG_CELLID,cell->cellId,
- "RgUiRgmCfgPrbRprt config type %d with the report period %d",
+ DU_LOG("\nDEBUG --> SCH : RgUiRgmCfgPrbRprt config type %d with the report period %d",
prbUsage->prbRprtEnabld,prbUsage->rprtPeriod);
/* ccpu00134393 : mem leak fix */
if ((ret = rgSCHUtlValidateTfuSap (inst, suId)) != ROK)
{
- RLOG_ARG0(L_ERROR,DBG_INSTID,inst,"SAP Validation failed");
+ DU_LOG("\nERROR --> SCH : SAP Validation failed");
return (ret);
}
if (rgSchCb[inst].tfuSap[suId].cell == NULLP)
{
- RLOG_ARG0(L_ERROR,DBG_INSTID,inst,"No cell exists");
+ DU_LOG("\nERROR --> SCH : No cell exists");
return RFAILED;
}
#endif
RgSchErrInfo *errInfo
)
{
- RGSCHDBGPRM(inst, (rgSchPBuf(inst), "VALIDATE RGR SCH ENB CONFIG: \n"));
+ DU_LOG("\nDEBUG --> SCH : VALIDATE RGR SCH ENB CONFIG: \n");
errInfo->errCause = RGSCHERR_CFG_INVALID_RGR_ENB_CFG;
// TODO
if ((rgSCHCfgVldtRgrSchCfg(inst, schedEnbCfg)) != ROK)
{
- RGSCHDBGERR(inst, (rgSchPBuf(inst), "Validation for scheduler related "
- "config failed\n"));
+ DU_LOG("\nERROR --> SCH : Validation for scheduler related "
+ "config failed\n");
return RFAILED;
}
- RLOG1(L_INFO, "MIMO_DBG:: SCH:: numAntPorts=%d\n",schedEnbCfg->numTxAntPorts);
+ DU_LOG("\nINFO --> SCH : MIMO_DBG:: SCH:: numAntPorts=%d\n",schedEnbCfg->numTxAntPorts);
/* Validation for the ENB parameters */
if ((schedEnbCfg->numTxAntPorts == 0) || (schedEnbCfg->numTxAntPorts > 4))
{
- RGSCHDBGERR(inst, (rgSchPBuf(inst),"Invalid number of transmit antenna"
- " ports %d\n", schedEnbCfg->numTxAntPorts));
+ DU_LOG("\nERROR --> SCH : Invalid number of transmit antenna"
+ " ports %d\n", schedEnbCfg->numTxAntPorts);
return RFAILED;
}
if((schedEnbCfg->accsMode < RGR_CELL_ACCS_OPEN) ||
(schedEnbCfg->accsMode > RGR_CELL_ACCS_HYBRID))
{
- RGSCHDBGERR(inst, (rgSchPBuf(inst), "Invalid CSG Access mode\n"));
+ DU_LOG("\nERROR --> SCH : Invalid CSG Access mode\n");
return RFAILED;
}
errInfo->errCause = RGSCHERR_NONE;
- RGSCHDBGINFO(inst, (rgSchPBuf(inst), "RGR SCHED ENB config validation done:"\n));
+ DU_LOG("\nINFO --> SCH : RGR SCHED ENB config validation done:");
return ROK;
} /* rgSCHCfgVldtRgrSchedEnbCfg */
/* check if cell exists already */
if ((uint8_t *)cell != NULLP)
{
- RLOG_ARG0(L_ERROR,DBG_CELLID,cellCfg->cellId,"Cell Id already exists");
+ DU_LOG("\nERROR --> SCH : Cell Id already exists");
return RFAILED;
}
if(cellCfg->macInst >= SCH_INST_START)
{
- RLOG_ARG1(L_ERROR,DBG_CELLID,cellCfg->cellId, "Invalid MAC Instance %d ",
+ DU_LOG("\nERROR --> SCH : Invalid MAC Instance %d ",
cellCfg->macInst);
return RFAILED;
}
if (cellCfg->macRnti.startRnti < RGSCH_MIN_MAC_RNTI )
{
- RLOG_ARG1(L_ERROR,DBG_CELLID,cellCfg->cellId, "Invalid start RNTI %d for cell ",
+ DU_LOG("\nERROR --> SCH : Invalid start RNTI %d for cell ",
cellCfg->macRnti.startRnti);
return RFAILED;
}
if ((rgSCHCfgVldtRgrCellSchCfg(inst, cellCfg)) != ROK)
{
- RLOG_ARG0(L_ERROR,DBG_CELLID,cellCfg->cellId, "Validation for scheduler related "
+ DU_LOG("\nERROR --> SCH : Validation for scheduler related "
"config failed");
return RFAILED;
}
if ((cellCfg->dlHqCfg.maxDlHqTx < RGSCH_MIN_HQ_TX) ||
(cellCfg->dlHqCfg.maxMsg4HqTx < RGSCH_MIN_HQ_TX))
{
- RLOG_ARG2(L_ERROR,DBG_CELLID,cellCfg->cellId, "Invalid Downlink HARQ configuration:"
+ DU_LOG("\nERROR --> SCH : Invalid Downlink HARQ configuration:"
" maxDlHqTx %d maxMsg4HqTx %d", cellCfg->dlHqCfg.maxDlHqTx,
cellCfg->dlHqCfg.maxMsg4HqTx);
return RFAILED;
if ((cellCfg->cfiCfg.cfi < RGSCH_MIN_CFI_VAL) ||
(cellCfg->cfiCfg.cfi > RGSCH_MAX_CFI_VAL))
{
- RLOG_ARG1(L_ERROR,DBG_CELLID,cellCfg->cellId, "Invalid CFI configuration %d",
+ DU_LOG("\nERROR --> SCH : Invalid CFI configuration %d",
cellCfg->cfiCfg.cfi);
return RFAILED;
}
((cellCfg->puschSubBand.numSubbands -1) * cellCfg->puschSubBand.size))
> (cellCfg->bwCfg.ulTotalBw - 1))
{
- RLOG_ARG4(L_ERROR,DBG_CELLID,cellCfg->cellId, "Invalid PUSCH subband configuration:"
+ DU_LOG("\nERROR --> SCH : Invalid PUSCH subband configuration:"
" subBandStart %d numSubBands %d subBandSize %d ulTotBw %d",
cellCfg->puschSubBand.subbandStart,
cellCfg->puschSubBand.numSubbands, cellCfg->puschSubBand.size,
((cellCfg->bwCfg.ulTotalBw < RGSCH_MIN_UL_BW) ||
(cellCfg->bwCfg.ulTotalBw > RGSCH_MAX_UL_BW)))
{
- RLOG_ARG2(L_ERROR,DBG_CELLID,cellCfg->cellId, "Invalid Bandwidth configuration:"
+ DU_LOG("\nERROR --> SCH : Invalid Bandwidth configuration:"
" ul %d dl %d",cellCfg->bwCfg.ulTotalBw,
cellCfg->bwCfg.dlTotalBw);
return RFAILED;
}
if (cellCfg->phichCfg.ngEnum > RGR_NG_TWO)
{
- RLOG_ARG1(L_ERROR,DBG_CELLID,cellCfg->cellId, "Invalid PHICH Ng configuration %d",
+ DU_LOG("\nERROR --> SCH : Invalid PHICH Ng configuration %d",
(uint8_t)cellCfg->phichCfg.ngEnum);
return RFAILED;
}
if ((cellCfg->phichCfg.isDurExtend == TRUE) &&
(cellCfg->bwCfg.dlTotalBw <= 10) && (cellCfg->cfiCfg.cfi < 2))
{
- RLOG_ARG2(L_ERROR,DBG_CELLID,cellCfg->cellId, "Invalid cfi value for"
+ DU_LOG("\nERROR --> SCH : Invalid cfi value for"
"Extended PHICH duration cfi:%d dlBw:%d",
(uint8_t)cellCfg->cfiCfg.cfi, cellCfg->bwCfg.dlTotalBw);
return RFAILED;
if ((cellCfg->phichCfg.isDurExtend == TRUE) &&
(cellCfg->bwCfg.dlTotalBw > 10) && (cellCfg->cfiCfg.cfi < 3))
{
- RLOG_ARG2(L_ERROR,DBG_CELLID,cellCfg->cellId, "Invalid cfi value for"
+ DU_LOG("\nERROR --> SCH : Invalid cfi value for"
"Extended PHICH duration cfi:%d dlBw:%d",
(uint8_t)cellCfg->cfiCfg.cfi, cellCfg->bwCfg.dlTotalBw);
return RFAILED;
}
- RLOG4(L_INFO,"CA_DBG:: PUCCH configuration:"
+ DU_LOG("\nINFO --> SCH : CA_DBG:: PUCCH configuration:"
" N2_RB %d N1_PUCCH %d deltaShift %d cyclicShift %d",
cellCfg->pucchCfg.resourceSize,
cellCfg->pucchCfg.n1PucchAn,
(cellCfg->pucchCfg.deltaShift > RGSCH_PUCCH_MAXVAL_DS) ||
(cellCfg->pucchCfg.cyclicShift > RGSCH_PUCCH_MAXVAL_CS))
{
- RLOG_ARG4(L_ERROR,DBG_CELLID,cellCfg->cellId, "Invalid PUCCH configuration:"
+ DU_LOG("\nERROR --> SCH : Invalid PUCCH configuration:"
" N2_RB %d N1_PUCCH %d deltaShift %d cyclicShift %d",
cellCfg->pucchCfg.resourceSize,
cellCfg->pucchCfg.n1PucchAn,
}
if (cellCfg->srsCfg.isSrsCfgSetup && cellCfg->srsCfg.srsBwEnum > RGR_SRS_BWCFG_7)
{
- RLOG_ARG1(L_ERROR,DBG_CELLID,cellCfg->cellId, "Invalid SRS configuration: "
+ DU_LOG("\nERROR --> SCH : Invalid SRS configuration: "
" srsBw %d", (uint8_t)cellCfg->srsCfg.srsBwEnum);
return RFAILED;
}
if ((rgSCHCfgVldtRgrCellRACfg(inst, cellCfg)) != ROK)
{
- RLOG_ARG0(L_ERROR,DBG_CELLID,cellCfg->cellId, "Validation for Random access related"
+ DU_LOG("\nERROR --> SCH : Validation for Random access related"
"config failed");
return RFAILED;
}
if ((rgSCHCfgVldtRgrCellPwrCfg(inst, cellCfg, errInfo)) != ROK)
{
- RLOG_ARG0(L_ERROR,DBG_CELLID,cellCfg->cellId, "Validation for cell power "
+ DU_LOG("\nERROR --> SCH : Validation for cell power "
"config failed");
return RFAILED;
}
if( (cellCfg->numCmnLcs < RGR_MIN_CMN_LC_PER_CELL)||
(cellCfg->numCmnLcs > RGR_MAX_CMN_LC_PER_CELL))
{
- RLOG_ARG1(L_ERROR,DBG_CELLID,cellCfg->cellId, "Invalid number(%d) of common logical"
+ DU_LOG("\nERROR --> SCH : Invalid number(%d) of common logical"
"channels in cell config", cellCfg->numCmnLcs);
return RFAILED;
}
if ((rgSCHCfgVldtRgrCmnLcCfg(inst, cellCfg, errInfo)) != ROK)
{
- RLOG_ARG0(L_ERROR,DBG_CELLID,cellCfg->cellId, "Validation for common logical"
+ DU_LOG("\nERROR --> SCH : Validation for common logical"
"channels failed");
return RFAILED;
}
#ifdef RGR_SI_SCH
if ((rgSCHCfgVldtRgrCellSiCfg(inst, &(cellCfg->siCfg))) != ROK)
{
- RLOG_ARG0(L_ERROR,DBG_CELLID,cellCfg->cellId, "Validation for SI"
+ DU_LOG("\nERROR --> SCH : Validation for SI"
"configuration failed");
return RFAILED;
}
if(cellCfg->srsCfg.isSrsCfgSetup && cellCfg->srsCfg.srsSubFrameCfg > 14)
#endif
{
- RLOG_ARG0(L_ERROR,DBG_CELLID,cellCfg->cellId, "Invalid"
+ DU_LOG("\nERROR --> SCH : Invalid"
"Subframe configuration");
return RFAILED;
}
(cellCfg->phichTxPwrOffset > 10000)
)
{
- RLOG_ARG0(L_ERROR,DBG_CELLID,cellCfg->cellId,
- "Invalid txPower offset ");
+ DU_LOG("\nERROR --> SCH : Invalid txPower offset ");
+
return RFAILED;
}
(!((cellCfg->rgrLteAdvCfg.pres & RGR_SFR) &&
(RGR_ENABLE == cellCfg->rgrLteAdvCfg.sfrCfg.status))))
{
- RLOG_ARG0(L_ERROR,DBG_CELLID,cellCfg->cellId, "DSFR is enbaled"
+ DU_LOG("\nERROR --> SCH : DSFR is enbaled"
"Without enabling SFR");
return RFAILED;
}
if ((rgSCHCfgVldtRgrCellLteAdvCfg(inst, &(cellCfg->rgrLteAdvCfg),
cellCfg->bwCfg.dlTotalBw)) != ROK)
{
- RLOG_ARG0(L_ERROR,DBG_CELLID,cellCfg->cellId, "Validation for LTE Adv"
+ DU_LOG("\nERROR --> SCH : Validation for LTE Adv"
"configuration failed");
return RFAILED;
}
#ifdef LTE_ADV
if ((rgSCHCfgVldtRgrCellLteLAACfg(inst, cellCfg)) != ROK)
{
- RLOG_ARG0(L_ERROR,DBG_CELLID,cellCfg->cellId, "Validation for LTE LAA"
+ DU_LOG("\nERROR --> SCH : Validation for LTE LAA"
"configuration failed");
return RFAILED;
}
/* LTE_ADV_FLAG_REMOVED_END */
if (cellCfg->msg4pAVal > RGRUE_DLPWRCNTRL_PA_DB3)
{
- RLOG_ARG1(L_ERROR,DBG_CELLID,cellCfg->cellId, "Invalid"
+ DU_LOG("\nERROR --> SCH : Invalid"
"msg4pAVal %u", cellCfg->msg4pAVal);
return RFAILED;
}
if((rgSCHCfgVldtRgrCellCsgParamCfg(inst,
&(cellCfg->csgParamCfg)) != ROK))
{
- RGSCHDBGERR(inst, (rgSchPBuf(inst), "Validation failed for \n"
- "Access CSG parameter failed\n"));
+ DU_LOG("\nERROR --> SCH : Validation failed for \n"
+ "Access CSG parameter failed\n");
return RFAILED;
}
}
{
if(ROK != rgSCHCfgVldtRgrEmtcCellCfg(cellCfg))
{
- RLOG_ARG1(L_ERROR,DBG_CELLID,cellCfg->cellId,"Invalid EMTC cell Configuration %d for cell" ,cellCfg->cellId);
+ DU_LOG("\nERROR --> SCH : Invalid EMTC cell Configuration %d for cell" ,cellCfg->cellId);
return RFAILED;
}
}
RgrSchedEnbCfg *rgSchedCfg
)
{
- RGSCHDBGPRM(inst, (rgSchPBuf(inst), "rgSCHCfgVldtRgrSchCfg:Validating \
- scheduler related Configuration"));
+ DU_LOG("\nDEBUG --> SCH : rgSCHCfgVldtRgrSchCfg:Validating \
+ scheduler related Configuration");
if (rgSchedCfg->ulSchdType > (RGSCH_NUM_SCHEDULERS - 1))
{
- RGSCHDBGERR(inst, (rgSchPBuf(inst), "rgSCHCfgVldtRgrSchCfg:Invalid \
- UL scheduler type %d \n", rgSchedCfg->ulSchdType));
+ DU_LOG("\nERROR --> SCH : rgSCHCfgVldtRgrSchCfg:Invalid \
+ UL scheduler type %d \n", rgSchedCfg->ulSchdType);
return RFAILED;
}
if (rgSchedCfg->dlSchdType > (RGSCH_NUM_SCHEDULERS - 1))
{
- RGSCHDBGERR(inst, (rgSchPBuf(inst), "rgSCHCfgVldtRgrSchCfg:Invalid \
- DL scheduler type %d \n", rgSchedCfg->dlSchdType));
+ DU_LOG("\nERROR --> SCH : rgSCHCfgVldtRgrSchCfg:Invalid \
+ DL scheduler type %d \n", rgSchedCfg->dlSchdType);
return RFAILED;
}
return ROK;
#if RGSCH_NUM_DLFS_SCHEDULERS
if (cellCfg->dlfsSchdType > RGSCH_NUM_DLFS_SCHEDULERS - 1)
{
- RLOG_ARG1(L_ERROR,DBG_CELLID,cellCfg->cellId,"Invalid dlfs scheduler type %d for cell",
+ DU_LOG("\nERROR --> SCH : Invalid dlfs scheduler type %d for cell",
cellCfg->dlfsSchdType);
return RFAILED;
}
(cellCfg->rachCfg.prachResource >
(cellCfg->bwCfg.ulTotalBw - RGSCH_NUM_RA_RB)))
{
- RLOG_ARG3(L_ERROR,DBG_CELLID,cellCfg->cellId,"Invalid RACH configuration:"
+ DU_LOG("\nERROR --> SCH : Invalid RACH configuration:"
"preamble Fmt %d raWinSize %d maxMsg3Tx %d",
cellCfg->rachCfg.preambleFormat, cellCfg->rachCfg.raWinSize,
cellCfg->rachCfg.maxMsg3Tx);
- RLOG_ARG2(L_ERROR,DBG_CELLID,cellCfg->cellId,"Invalid numRaPreamble %d sizeRaPreambleGrpA %d",
+ DU_LOG("\nERROR --> SCH : Invalid numRaPreamble %d sizeRaPreambleGrpA %d",
cellCfg->rachCfg.numRaPreamble,
cellCfg->rachCfg.sizeRaPreambleGrpA);
return RFAILED;
cellCfg->rachCfg.numRaPreamble) ||
(cellCfg->rachCfg.raOccasion.sfnEnum == RGR_SFN_NA)))
{
- RLOG_ARG2(L_ERROR,DBG_CELLID,cellCfg->cellId,"Invalid RACH Preambleset conf:"
+ DU_LOG("\nERROR --> SCH : Invalid RACH Preambleset conf:"
"preambleSet Start %d preambleSet Size %d",
cellCfg->macPreambleSet.start, cellCfg->macPreambleSet.size);
return RFAILED;
if(maxMsg4TxDelay >= cellCfg->rachCfg.contResTmr)
{
- RLOG_ARG2(L_WARNING,DBG_CELLID,cellCfg->cellId ,
- "Warining !: Contention Resolution timer not greater than the "
+ DU_LOG("\nERROR --> SCH : Warining !: Contention Resolution timer not greater than the "
"guard timer. Conte Res timer %d Guard timer %d",
cellCfg->rachCfg.contResTmr,
maxMsg4TxDelay );
{
/* ccpu00128575 ADD - If contention resolution timer is configured as 0,
Then return fail*/
- RLOG_ARG0(L_ERROR,DBG_CELLID,cellCfg->cellId,
- "Contention Resolution timer is configured as '0'");
+ DU_LOG("\nERROR --> SCH : Contention Resolution timer is configured as '0'");
return RFAILED;
}
#endif
#endif
ue->numSCells++;
#ifdef CA_DBG
- printf("\n SCell added for ue %d numScells %d\n",ue->ueId,ue->numSCells);
+ DU_LOG("\nDEBUG --> SCH : SCell added for ue %d numScells %d\n",ue->ueId,ue->numSCells);
#endif
/* retrieve teh sec cell Cb */
if((secCellCb = (RgSchCellCb *)rgSchUtlGetCellCb(inst, sCellInfo->sCellId)) == NULLP)
{
- RGSCHDBGERRNEW(inst, (rgSchPBuf(inst), "SCell doesnt exists"));
+ DU_LOG("\nERROR --> SCH : SCell doesnt exists");
rgSCHSCellFreeBuf (inst,ue,ueRecfg,idx);
return RFAILED;
}
}
else
{
- RGSCHDBGERRNEW(inst, (rgSchPBuf(inst), "[%d]SCellIdx Tx mode not present ",idx));
+ DU_LOG("\nERROR --> SCH : [%d]SCellIdx Tx mode not present ",idx);
sCellInfoCfg->txMode.pres = TRUE;
sCellInfoCfg->txMode.txModeEnum = RGR_UE_TM_1;
}
aCqiCfg = &sCellInfoCfg->ueSCellDlCqiCfg.aprdCqiCfg;
- RGSCHDBGPRM(cell->instIdx, (rgSchPBuf(cell->instIdx),
- "rgSCHCfgACqiUeCfg cellId =%d,Config Presence =%d for \
+ DU_LOG("\nDEBUG --> SCH : rgSCHCfgACqiUeCfg cellId =%d,Config Presence =%d for \
Sec Cell Id = %d\n",
- cellCb->cellId, aCqiCfg->pres,sCellInfo->sCellId));
+ cellCb->cellId, aCqiCfg->pres,sCellInfo->sCellId);
/* if aperiodic cqi is present then only call the below function as it is
* not mandatory*/
if( ROK != rgSCHCfgACqiUeCfg(secCellCb,ue, &sCellInfo->acqiCb,
sCellInfo->txMode.txModeEnum, aCqiCfg, ue->ueCatEnum))
{
- RGSCHDBGERRNEW(inst, (rgSchPBuf(inst), "[%d]SCellIdx ACQI Cfg"
- "failed..n\n", idx));
+ DU_LOG("\nERROR --> SCH : [%d]SCellIdx ACQI Cfg"
+ "failed..n\n", idx);
rgSCHSCellFreeBuf (inst,ue,ueRecfg,idx);
return RFAILED;
}
if(ROK != rgSCHSCellPCqiCfg(cell,secCellCb,ue,pCqiCfg,
ue->ueCatEnum,sCellInfoCfg->sCellIdx))
{
- RGSCHDBGERRNEW(inst, (rgSchPBuf(inst), "[%d]SCellIdx PCQI Cfg failed..n\n", idx));
+ DU_LOG("\nERROR --> SCH : [%d]SCellIdx PCQI Cfg failed..n\n", idx);
rgSCHSCellFreeBuf (inst,ue,ueRecfg,idx);
return RFAILED;
}
sCellInfo->hqEnt = rgSCHDhmHqEntInit(secCellCb);
if (sCellInfo->hqEnt == NULLP)
{
- RGSCHDBGERRNEW(inst, (rgSchPBuf(inst), "[%d]UEID:Hq Entity Initialization "
- "failed in config\n", ue->ueId));
+ DU_LOG("\nERROR --> SCH : [%d]UEID:Hq Entity Initialization "
+ "failed in config\n", ue->ueId);
rgSCHSCellFreeBuf (inst,ue,ueRecfg,idx);
return RFAILED;
}
/* Init SCell Specific Sched Spfc UE DL CB */
if ((secCellCb->sc.apis->rgSCHRgrSCellUeCfg(secCellCb, ue, sCellInfoCfg, err)) != ROK)
{
- RGSCHDBGERRNEW(inst, (rgSchPBuf(inst), "Spec Sched DL UE CFG FAILED\n"));
+ DU_LOG("\nERROR --> SCH : Spec Sched DL UE CFG FAILED\n");
rgSCHSCellFreeBuf (inst,ue,ueRecfg,idx);
return RFAILED;
}
#ifdef LTE_TDD
if((rgSCHUtlAllocUeANFdbkInfo(ue,sCellInfoCfg->sCellIdx)) != ROK)
{
- RGSCHDBGERRNEW(inst, (rgSchPBuf(inst), "[%d]UEID:Memomy allocation "
+ DU_LOG("\nERROR --> SCH : [%d]UEID:Memomy allocation "
"Failed while UE related Ack Nack Information\n",
- ue->ueId));
+ ue->ueId);
rgSCHSCellFreeBuf (inst,ue,ueRecfg,idx);
return RFAILED;
}
#endif
else
{
- RLOG1(L_ERROR,"Wrong PUCCH Format:%d configured for CA",ue->uciFrmtTyp);
+ DU_LOG("\nERROR --> SCH : Wrong PUCCH Format:%d configured for CA",ue->uciFrmtTyp);
}
return ROK;
Inst inst = cell->instIdx;
- RGSCHDBGPRM(inst, (rgSchPBuf(inst), "VALIDATE RGR UE SCELL RECONFIG: cellId %d "
- "oldUeId %d cell %p \n", ueRecfg->cellId, ueRecfg->oldCrnti));
+ DU_LOG("\nDEBUG --> SCH : VALIDATE RGR UE SCELL RECONFIG: cellId %d "
+ "oldUeId %d cell %p \n", ueRecfg->cellId, ueRecfg->oldCrnti);
errInfo->errCause = RGSCHERR_CFG_INVALID_RGR_UE_SCELL_RECFG;
if((ueRecfg->ueSCellCfgInfo.numSCells > RGR_MAX_SCELL_PER_UE) ||
(ueRecfg->ueSCellCfgInfo.numSCells < 1))
{
- RGSCHDBGERRNEW(inst, (rgSchPBuf(inst), "Invalid number of SCELL "
- " in SCELL Recfg\n"));
+ DU_LOG("\nERROR --> SCH : Invalid number of SCELL "
+ " in SCELL Recfg\n");
return RFAILED;
}
ueSCellDedCfg = &ueRecfg->ueSCellCfgInfo.ueSCellDedCfg[idx];
if(ROK != rgSchUtlVldtCellId(inst, ueSCellDedCfg->sCellId))
{
- RGSCHDBGERRNEW(inst, (rgSchPBuf(inst), "SCellId is out of range"));
+ DU_LOG("\nERROR --> SCH : SCellId is out of range");
return RFAILED;
}
/* Validate existence of sec cell */
sCell = rgSchUtlGetCellCb(inst, ueSCellDedCfg->sCellId);
if(NULLP == sCell )
{
- RGSCHDBGERRNEW(inst, (rgSchPBuf(inst), "SCell doesnt exists"));
+ DU_LOG("\nERROR --> SCH : SCell doesnt exists");
return RFAILED;
}
if((ueSCellDedCfg->sCellIdx < 1) ||
(ueSCellDedCfg->sCellIdx > RGR_MAX_SCELL_PER_UE))
{
- RGSCHDBGERRNEW(inst, (rgSchPBuf(inst),"Invalid Serv Cell Idx %d\n",
- ueSCellDedCfg->sCellIdx));
+ DU_LOG("\nERROR --> SCH : Invalid Serv Cell Idx %d\n",
+ ueSCellDedCfg->sCellIdx);
return RFAILED;
}
/* Is this sec cell alredy confiured */
if(NULLP != ue->cellInfo[ueSCellDedCfg->sCellIdx])
{
- RGSCHDBGERRNEW(inst, (rgSchPBuf(inst),"Secll with id %d already added\n",
- ueSCellDedCfg->sCellIdx));
+ DU_LOG("\nERROR --> SCH : Secll with id %d already added\n",
+ ueSCellDedCfg->sCellIdx);
return RFAILED;
}
/* Validate CQI config params */
if((rgSCHCfgVldtUeCqiModeCfg(sCell, &ueSCellDedCfg->ueSCellDlCqiCfg)) != ROK)
{
- RGSCHDBGERRNEW(inst, (rgSchPBuf(inst), "Invalid CQI Mode "
- " configuration for Ue %d\n",ue->ueId));
+ DU_LOG("\nERROR --> SCH : Invalid CQI Mode "
+ " configuration for Ue %d\n",ue->ueId);
return RFAILED;
}
#ifdef TFU_UPGRADE
&ueSCellDedCfg->ueSCellDlCqiCfg.aprdCqiCfg, ueSCellDedCfg->txMode,
errInfo ))
{
- RGSCHDBGERR(sCell->instIdx, (rgSchPBuf(sCell->instIdx),
- "rgSCHCfgVldtCqiSrSrsUeCfg: Invalid Aperiodic CQI configuration\n"));
+ DU_LOG("\nERROR --> SCH : rgSCHCfgVldtCqiSrSrsUeCfg: Invalid Aperiodic CQI configuration\n");
return RFAILED;
}
errInfo ))
#endif
{
- RGSCHDBGERR(sCell->instIdx, (rgSchPBuf(sCell->instIdx),
- "rgSCHCfgVldtCqiSrSrsUeCfg: Invalid Periodic CQI configuration\n"));
+ DU_LOG("\nERROR --> SCH : rgSCHCfgVldtCqiSrSrsUeCfg: Invalid Periodic CQI configuration\n");
return RFAILED;
}
if((ueSCellDedCfg->txMode.txModeEnum < RGR_UE_TM_1) ||
(ueSCellDedCfg->txMode.txModeEnum > RGR_UE_TM_9))
{
- RGSCHDBGERRNEW(inst, (rgSchPBuf(inst), "SCELL Invalid transmission mode for"
- " UE %d\n", (uint8_t)ueSCellDedCfg->txMode.txModeEnum));
+ DU_LOG("\nERROR --> SCH : SCELL Invalid transmission mode for"
+ " UE %d\n", (uint8_t)ueSCellDedCfg->txMode.txModeEnum);
return RFAILED;
}
#endif
}
errInfo->errCause = RGSCHERR_NONE;
- RGSCHDBGINFO(inst, (rgSchPBuf(inst), "RGR Ue SCell Reconfig validation done: "
- "cellId %d oldUeId %d\n", ueRecfg->cellId, ue->ueId));
+ DU_LOG("\nDEBUG --> SCH : RGR Ue SCell Reconfig validation done: "
+ "cellId %d oldUeId %d\n", ueRecfg->cellId, ue->ueId);
return ROK;
} /* rgSCHCfgVldtRgrUeSCellRecfg */
if (((*cell) == NULLP) ||
((*cell)->cellId != ueRecfg->cellId))
{
- RLOG_ARG1(L_ERROR,DBG_CELLID,ueRecfg->cellId,
- "Cell does not exist for OLD CRNTI:%d",ueRecfg->oldCrnti);
+ DU_LOG("\nERROR --> SCH : Cell does not exist for OLD CRNTI:%d",ueRecfg->oldCrnti);
return RFAILED;
}
/* Fetch the Old Ue */
if ((*ue = rgSCHDbmGetUeCb(*cell, ueRecfg->oldCrnti)) == NULLP)
{
- RLOG_ARG1(L_ERROR,DBG_CELLID,ueRecfg->cellId,"OLD CRNTI:%d does not exist",
+ DU_LOG("\nERROR --> SCH : OLD CRNTI:%d does not exist",
ueRecfg->oldCrnti);
return RFAILED;
}
S16 ret = rgSCHCfgVldtRgrUeSCellRecfg(ueRecfg,*cell, *ue, errInfo);
if ( ret != ROK)
{
- RGSCHDBGERR(inst,(rgSchPBuf(inst), "Ue SCell Recfg Validation FAILED\n"));
+ DU_LOG("\nERROR --> SCH : Ue SCell Recfg Validation FAILED\n");
return RFAILED;
}
errInfo->errCause = RGSCHERR_NONE;
{
if (rgSCHDbmGetUeCb(*cell, ueRecfg->newCrnti) != NULLP)
{
- RLOG_ARG1(L_ERROR,DBG_CELLID,ueRecfg->cellId,"NEW CRNTI:%d already exists",
+ DU_LOG("\nERROR --> SCH : NEW CRNTI:%d already exists",
ueRecfg->newCrnti);
return RFAILED;
}
if ((ueRecfg->ueRecfgTypes & RGR_UE_CSG_PARAM_RECFG) &&\
((*ue)->csgMmbrSta == ueRecfg->csgMmbrSta))
{
- RLOG_ARG2(L_ERROR,DBG_CELLID,ueRecfg->cellId,"UE ID [%d] invalid CSG Membership reconfig :%d ",
+ DU_LOG("\nERROR --> SCH : UE ID [%d] invalid CSG Membership reconfig :%d ",
ueRecfg->newCrnti, (uint8_t)ueRecfg->csgMmbrSta);
return RFAILED;
}
((ueRecfg->txMode.txModeEnum < RGR_UE_TM_1) ||
(ueRecfg->txMode.txModeEnum > RGR_UE_TM_7)))
{
- RLOG_ARG2(L_ERROR,DBG_CELLID,ueRecfg->cellId,"Invalid transmission mode %d"
+ DU_LOG("\nERROR --> SCH : Invalid transmission mode %d"
"for NEW CRNTI:%d", (uint8_t)ueRecfg->txMode.txModeEnum,ueRecfg->newCrnti);
return RFAILED;
}
((ueRecfg->prdDlCqiRecfg.cqiPmiCfgIdx < 1) ||
(ueRecfg->prdDlCqiRecfg.cqiPmiCfgIdx > 1024))))
{
- RLOG_ARG2(L_ERROR,DBG_CELLID,ueRecfg->cellId,"Invalid Periodic CQI INFO"
+ DU_LOG("\nERROR --> SCH : Invalid Periodic CQI INFO"
"OLD CRNTI:%d NEW CRNTI:%d",(uint8_t)ueRecfg->oldCrnti,ueRecfg->newCrnti);
return RFAILED;
}
if ((ueRecfg->ueRecfgTypes & RGR_UE_ULHARQ_RECFG) &&
(ueRecfg->ueUlHqRecfg.maxUlHqTx < RGSCH_MIN_HQ_TX))
{
- RLOG_ARG2(L_ERROR,DBG_CELLID,ueRecfg->cellId,"Invalid Uplink HARQ config %d"
+ DU_LOG("\nERROR --> SCH : Invalid Uplink HARQ config %d"
"for NEW CRNTI:%d", ueRecfg->ueUlHqRecfg.maxUlHqTx,ueRecfg->newCrnti);
return RFAILED;
}
if ((ueRecfg->ueRecfgTypes & RGR_UE_PRD_DLCQI_RECFG) &&
(ueRecfg->prdDlCqiRecfg.prdModeEnum > RGR_PRD_CQI_MOD21))
{
- RLOG_ARG2(L_ERROR,DBG_CELLID,ueRecfg->cellId,"Invalid periodic mode config for"
+ DU_LOG("\nERROR --> SCH : Invalid periodic mode config for"
" DL CQI %d NEW CRNTI:%d", (uint8_t)ueRecfg->prdDlCqiRecfg.prdModeEnum,ueRecfg->newCrnti);
return RFAILED;
}
if ((ueRecfg->ueRecfgTypes & RGR_UE_PCQI_RECFG) &&
(ueRecfg->cqiCfg.cqiSetup.prdModeEnum > RGR_PRD_CQI_MOD21))
{
- RLOG_ARG2(L_ERROR,DBG_CELLID,ueRecfg->cellId,"Invalid periodic mode config for "
+ DU_LOG("\nERROR --> SCH : Invalid periodic mode config for "
"DL CQI %d for NEW CRNTI:%d",(uint8_t)ueRecfg->cqiCfg.cqiSetup.prdModeEnum,ueRecfg->newCrnti);
return RFAILED;
}
/* Validate UE Category */
if (ueRecfg->ueCatEnum > CM_LTE_UE_CAT_8)
{
- RLOG_ARG2(L_ERROR,DBG_CELLID,ueRecfg->cellId,"Invalid category %d for NEW CRNTI:%d",
+ DU_LOG("\nERROR --> SCH : Invalid category %d for NEW CRNTI:%d",
(uint8_t)ueRecfg->ueCatEnum,ueRecfg->newCrnti);
return RFAILED;
}
if ((ueRecfg->ueRecfgTypes & RGR_UE_UE_ACCESS_STRATUM_REL_RECFG) && \
(ueRecfg->accessStratumRls > RGR_REL_11))
{
- RGSCHDBGERRNEW(inst, (rgSchPBuf(inst), "Invalid Access Stratum Release %u for UE\n",
- ueRecfg->accessStratumRls));
+ DU_LOG("\nERROR --> SCH : Invalid Access Stratum Release %u for UE\n",
+ ueRecfg->accessStratumRls);
return RFAILED;
}
- RGSCHDBGINFONEW(inst, (rgSchPBuf(inst), "Configured Access Stratum Release %u\n", \
- ueRecfg->accessStratumRls));
+ DU_LOG("\nINFO --> SCH : Configured Access Stratum Release %u\n", \
+ ueRecfg->accessStratumRls);
if ((ueRecfg->ueRecfgTypes & RGR_UE_APRD_DLCQI_RECFG) &&
((ueRecfg->aprdDlCqiRecfg.pres == TRUE) &&
((ueRecfg->aprdDlCqiRecfg.aprdModeEnum > RGR_APRD_CQI_MOD31) ||
(*cell)->bwCfg.dlTotalBw <= 7)))
{
- RLOG_ARG2(L_ERROR,DBG_CELLID,ueRecfg->cellId,"Invalid aperiodic mode config for"
+ DU_LOG("\nERROR --> SCH : Invalid aperiodic mode config for"
" DL CQI %d for NEW CRNTI:%d", (uint8_t)ueRecfg->aprdDlCqiRecfg.aprdModeEnum,ueRecfg->newCrnti);
return RFAILED;
}
if ((ueRecfg->ueRecfgTypes & RGR_UE_ULPWR_RECFG) &&
(rgSCHCfgVldtUePwrCfg(*cell, &ueRecfg->ueUlPwrRecfg) != ROK))
{
- RLOG_ARG1(L_ERROR,DBG_CELLID,ueRecfg->cellId,"Invalid PUSCH Group power"
+ DU_LOG("\nERROR --> SCH : Invalid PUSCH Group power"
" Reconfiguration for NEW CRNTI:%d",ueRecfg->newCrnti);
return RFAILED;
}
if ((ueRecfg->ueRecfgTypes & RGR_UE_ACKNACK_MEASGAP_RECFG) &&
(rgSCHCfgVldtUeMeasGapAckNakRepRecfg(*cell, ueRecfg) != ROK))
{
- RLOG_ARG1(L_ERROR,DBG_CELLID,ueRecfg->cellId,"Invalid MeasGap/AckNackRep"
+ DU_LOG("\nERROR --> SCH : Invalid MeasGap/AckNackRep"
" Reconfiguration for NEW CRNTI:%d",ueRecfg->newCrnti);
return RFAILED;
}
#ifdef LTEMAC_SPS
if(rgSCHCfgVldtSpsReCfg(*cell, *ue, ueRecfg)!= ROK)
{
- RLOG_ARG1(L_ERROR,DBG_CELLID,ueRecfg->cellId,"Invalid SPS"
+ DU_LOG("\nERROR --> SCH : Invalid SPS"
" Reconfiguration for NEW CRNTI:%d",ueRecfg->newCrnti);
return RFAILED;
}
/* Validated Periodic CQI/PMI, RI , SRS and SR related UeCfg */
if ( ROK != rgSCHCfgVldtCqiSrSrsUeReCfg(*cell, *ue, ueRecfg, errInfo))
{
- RLOG_ARG1(L_ERROR,DBG_CELLID,ueRecfg->cellId,"Invalid ACQI, PCQI/SR/SRS "
+ DU_LOG("\nERROR --> SCH : Invalid ACQI, PCQI/SR/SRS "
"Re-configuration for NEW CRNTI:%d",ueRecfg->newCrnti);
return RFAILED;
}
if ((ueRecfg->ueRecfgTypes & RGR_UE_DRX_RECFG) &&
(rgSCHCfgVldtDrxUeCfg(*cell, &(ueRecfg->ueDrxRecfg)) != ROK))
{
- RLOG_ARG1(L_ERROR,DBG_CELLID,ueRecfg->cellId,"Invalid drxParams"
+ DU_LOG("\nERROR --> SCH : Invalid drxParams"
" Reconfiguration for NEW CRNTI:%d",ueRecfg->newCrnti);
return RFAILED;
}
/* Validate DL Power Control Config parameters */
if(rgSCHCfgVldtCqiReptReCfg(*cell, ueRecfg)!= ROK)
{
- RLOG_ARG1(L_ERROR,DBG_CELLID,ueRecfg->cellId,"Invalid DL Power Control"
+ DU_LOG("\nERROR --> SCH : Invalid DL Power Control"
" Reconfiguration for NEW CRNTI:%d",ueRecfg->newCrnti);
return RFAILED;
}
if (((*cell) == NULLP) ||
((*cell)->cellId != lcRecfg->cellId))
{
- RLOG_ARG2(L_ERROR,DBG_CELLID,lcRecfg->cellId,"Cell does not exist "
+ DU_LOG("\nERROR --> SCH : Cell does not exist "
"for CRNTI:%d LCID:%d",lcRecfg->crnti,lcRecfg->lcId);
return RFAILED;
}
/* Fetch the Ue for dedicated channels */
if ((*ue = rgSCHDbmGetUeCb(*cell, lcRecfg->crnti)) == NULLP)
{
- RLOG_ARG2(L_ERROR,DBG_CELLID,lcRecfg->cellId,"UEID does not exist"
+ DU_LOG("\nERROR --> SCH : UEID does not exist"
"dedicated logical channel for CRNTI:%d LCID:%d",lcRecfg->crnti,lcRecfg->lcId);
return RFAILED;
}
if ((*dlLc = rgSCHDbmGetDlDedLcCb((*ue), lcRecfg->lcId)) == NULLP)
{
- RLOG_ARG2(L_ERROR,DBG_CELLID,lcRecfg->cellId,"Dedicated DL LC does not "
+ DU_LOG("\nERROR --> SCH : Dedicated DL LC does not "
"exist for CRNTI:%d LCID:%d",lcRecfg->crnti,lcRecfg->lcId);
return RFAILED;
}
if ((cell == NULLP) || (cell->cellId != reset->cellId))
{
- RLOG_ARG1(L_ERROR,DBG_CELLID,reset->cellId,"CELL does not exist for CRNTI:%d",
+ DU_LOG("\nERROR --> SCH : CELL does not exist for CRNTI:%d",
reset->crnti);
return RFAILED;
}
/* Fetch the Ue */
if ((*ue = rgSCHDbmGetUeCb(&(*cell), reset->crnti)) == NULLP)
{
- RLOG_ARG1(L_ERROR,DBG_CELLID,reset->cellId,"UE does not exist for CRNTI:%d",
+ DU_LOG("\nERROR --> SCH : UE does not exist for CRNTI:%d",
reset->crnti);
return RFAILED;
}
if (((cell) == NULLP) ||
((cell)->cellId != lcgRecfg->cellId))
{
- RLOG_ARG2(L_ERROR,DBG_CELLID,lcgRecfg->cellId,"Cell does not exist for"
+ DU_LOG("\nERROR --> SCH : Cell does not exist for"
"CRNTI:%d LCGID:%d",lcgRecfg->crnti,lcgRecfg->ulRecfg.lcgId);
return RFAILED;
}
/* Fetch the Ue for dedicated channels */
if ((*ue = rgSCHDbmGetUeCb(&(*cell), lcgRecfg->crnti)) == NULLP)
{
- RLOG_ARG2(L_ERROR,DBG_CELLID,lcgRecfg->cellId,"UE does not exist for "
+ DU_LOG("\nERROR --> SCH : UE does not exist for "
"dedicated logical channel group CRNTI:%d LCGID:%d",
lcgRecfg->crnti,lcgRecfg->ulRecfg.lcgId);
return RFAILED;
}
if (lcgRecfg->ulRecfg.lcgId > (RGSCH_MAX_LCG_PER_UE - 1))
{
- RLOG_ARG2(L_ERROR,DBG_CELLID,lcgRecfg->cellId,"Invalid lcgId for uplink logical"
+ DU_LOG("\nERROR --> SCH : Invalid lcgId for uplink logical"
"channel CRNTI:%d LCGID:%d",
lcgRecfg->crnti,lcgRecfg->ulRecfg.lcgId);
return RFAILED;
if ((lcgRecfg->ulRecfg.gbr != 0) && (lcgRecfg->ulRecfg.mbr < lcgRecfg->ulRecfg.gbr))
{
- RGSCHDBGINFO(inst, (rgSchPBuf(inst), "Dedicated Logical Group %d validation failed"
- " for ue %d for cell %d\n", lcgCfg->ulInfo.lcgId, lcgCfg->crnti, lcgCfg->cellId));
+ DU_LOG("\nERROR --> SCH : Dedicated Logical Group %d validation failed"\
+ " for ue %d for cell %d\n", lcgRecfg->ulRecfg.lcgId,(*ue)->ueId, cell->cellId);
return RFAILED;
}
errInfo->errCause = RGSCHERR_NONE;
if((rgSCHUtlAllocSBuf(cell->instIdx, (Data**)&(cell->dynCfiCb.cceFailSamples),
(cell->dynCfiCb.numFailSamples * sizeof(uint16_t)))) != ROK)
{
- RLOG_ARG0(L_ERROR,DBG_CELLID,cellCfg->cellId,"Memory allocation FAILED for cell");
+ DU_LOG("\nERROR --> SCH : Memory allocation FAILED for cell");
return RFAILED;
}
)
{
- RGSCHDBGPRM(inst, (rgSchPBuf(inst), "APPLYING RGR SCH ENB CONFIG: \n"));
+ DU_LOG("\nDEBUG --> SCH : APPLYING RGR SCH ENB CONFIG: \n");
errInfo->errCause = RGSCHERR_CFG_INVALID_RGR_ENB_CFG;
rgSchCb[inst].rgrSchedEnbCfg = *schedEnbCfg;
- RGSCHDBGPRM(inst, (rgSchPBuf(inst),"\ndlSchdType %d ulSchdType %d dlTptCoeffi %d"
+ DU_LOG("\nDEBUG --> SCH : dlSchdType %d ulSchdType %d dlTptCoeffi %d"
"dlFairCoeffi %d ulTptCoeffi %d ulFairCoeffi %d\n",
schedEnbCfg->dlSchdType, schedEnbCfg->ulSchdType, schedEnbCfg->dlSchInfo.dlPfs.tptCoeffi,
schedEnbCfg->dlSchInfo.dlPfs.fairCoeffi, schedEnbCfg->ulSchInfo.ulPfs.tptCoeffi,
- schedEnbCfg->ulSchInfo.ulPfs.fairCoeffi));
+ schedEnbCfg->ulSchInfo.ulPfs.fairCoeffi);
#ifdef RG_5GTF
rgSchCb[inst].rgSchDynTdd.isDynTddEnbld = schedEnbCfg->isDynTddEnbld;
}
#endif
errInfo->errCause = RGSCHERR_NONE;
- RGSCHDBGINFO(inst, (rgSchPBuf(inst), "RGR SCH ENBconfig done: \n"));
+ DU_LOG("\nINFO --> SCH : RGR SCH gNB done: \n");
return ROK;
} /* rgSCHCfgRgrSchedEnbCfg */
cell->cell5gtfCb.ueGrpPerTti = cellCfg->Cell5gtfCfg.ueGrpPerTti;
cell->cell5gtfCb.numCCs = cellCfg->Cell5gtfCfg.numOfCC;
cell->cell5gtfCb.bwPerCC = cellCfg->Cell5gtfCfg.bwPerCC;
- printf("\ncell cfg at schd,numUes:%u,uepergrp:%u,uegrppertti:%u,numCC:%u,bwPerc:%u cfi %u\n",
+ DU_LOG("\nINFO --> SCH : cell cfg at schd,numUes:%u,uepergrp:%u,uegrppertti:%u,numCC:%u,bwPerc:%u cfi %u\n",
cell->cell5gtfCb.numUes,cell->cell5gtfCb.uePerGrpPerTti,cell->cell5gtfCb.ueGrpPerTti,
cell->cell5gtfCb.numCCs,cell->cell5gtfCb.bwPerCC, cell->cell5gtfCb.cfi);
return ROK;
if((ret = rgSCHUtlAllocSBuf(inst, (Data**)&cell, sizeof(RgSchCellCb)))
!= ROK)
{
- RLOG_ARG0(L_ERROR,DBG_CELLID,cellCfg->cellId,"Memory allocation FAILED for cell");
+ DU_LOG("\nERROR --> SCH : Memory allocation FAILED for cell");
return RFAILED;
}
#ifdef EMTC_ENABLE
if((ret = rgSCHEmtcCellAlloc(cell))
!= ROK)
{
- RLOG_ARG0(L_ERROR,DBG_CELLID,cellCfg->cellId,"Memory allocation FAILED for emtc cell");
+ DU_LOG("\nERROR --> SCH : Memory allocation FAILED for emtc cell");
return RFAILED;
}
}
#endif
if ((uint8_t *)cell == NULLP)
{
- RLOG_ARG0(L_ERROR,DBG_CELLID,cellCfg->cellId,"Memory allocation FAILED for cell");
+ DU_LOG("\nERROR --> SCH : Memory allocation FAILED for cell");
return RFAILED;
}
/* Initialize the lists of the cell */
ret = rgSCHDbmInitCell(cell);
if (ret != ROK)
{
- RLOG_ARG0(L_ERROR,DBG_CELLID,cellCfg->cellId,"DBM initialization FAILED for cell");
+ DU_LOG("\nERROR --> SCH : DBM initialization FAILED for cell");
rgSCHCfgFreeCellCb(cell);
return RFAILED;
}
ret = rgSCHDynCfiCfg(cell, cellCfg);
if(ret != ROK)
{
- RLOG_ARG0(L_ERROR,DBG_CELLID,cellCfg->cellId,"Rgr cell Config failed at "
+ DU_LOG("\nERROR --> SCH : Rgr cell Config failed at "
"Scheduler for cell");
rgSCHCfgFreeCellCb(cell);
return RFAILED;
{
if(cell->isAutoCfgModeEnb)
{
- RLOG0(L_INFO,"Auto Mode Cfg enabled durint cell cfg\n");
+ DU_LOG("\nINFO --> SCH : Auto Mode Cfg enabled durint cell cfg\n");
}
}
/* CPU OvrLoad State Initialization */
#ifdef XEON_LMT_ITBS
cell->thresholds.maxDlItbs = gWrMaxDlItbs;
cell->thresholds.maxUlItbs = gWrMaxUlItbs;
- RLOG2(L_INFO,"LIMIT DL and UL ITBS %d:%d \n",gWrMaxDlItbs,gWrMaxUlItbs);
+ DU_LOG("\nINFO --> SCH : LIMIT DL and UL ITBS %d:%d \n",gWrMaxDlItbs,gWrMaxUlItbs);
#else
cell->thresholds.maxDlItbs = RG_SCH_DL_MAX_ITBS;
cell->thresholds.maxUlItbs = RG_SCH_UL_MAX_ITBS;
ret = rgSCHUtlRgrCellCfg(cell, cellCfg, errInfo);
if (ret != ROK)
{
- RLOG_ARG0(L_ERROR,DBG_CELLID,cellCfg->cellId,"Rgr cell Config failed at "
+ DU_LOG("\nERROR --> SCH : Rgr cell Config failed at "
"Scheduler for cell ");
rgSCHCfgFreeCellCb(cell);
return RFAILED;
cellCfg->macRnti.size);
if (ret != ROK)
{
- RLOG_ARG0(L_ERROR,DBG_CELLID,cellCfg->cellId,"Rgr Cell Config failed at"
+ DU_LOG("\nERROR --> SCH : Rgr Cell Config failed at"
" RNTI DB init for cell");
rgSCHCfgFreeCellCb(cell);
return RFAILED;
/* Update the cell with recieved configuration */
cell->dlHqCfg = cellCfg->dlHqCfg;
- RLOG1(L_INFO,"Config DL HQTX = %d\n",cell->dlHqCfg.maxDlHqTx);
+ DU_LOG("\nINFO --> SCH : Config DL HQTX = %d\n",cell->dlHqCfg.maxDlHqTx);
cell->crntSfIdx = 0;
/* Allocate the subframe allocation information */
if((ret = rgSCHUtlGetSfAlloc(cell)) != ROK)
{
- RLOG_ARG0(L_ERROR,DBG_CELLID,cellCfg->cellId,"Memory allocation FAILED for "
+ DU_LOG("\nERROR --> SCH : Memory allocation FAILED for "
"cell");
rgSCHCfgFreeCellCb(cell);
return RFAILED;
/* Allocate the subframe allocation information */
if((ret = rgSCHUtlGetRlsHqAlloc(cell)) != ROK)
{
- RLOG_ARG0(L_ERROR,DBG_CELLID,cellCfg->cellId,"Memory allocation FAILED for"
+ DU_LOG("\nERROR --> SCH : Memory allocation FAILED for"
"cell");
rgSCHCfgFreeCellCb(cell);
return RFAILED;
if (rgSCHDrxCellCfg(cell,cellCfg) != ROK)
{
- RLOG_ARG0(L_ERROR,DBG_CELLID,cellCfg->cellId,"Drx Memory allocation FAILED for"
+ DU_LOG("\nERROR --> SCH : Drx Memory allocation FAILED for"
" cell");
rgSCHCfgFreeCellCb(cell);
return RFAILED;
ret = rgSCHLaaSCellCbInit(cell, cellCfg);
if (ret != ROK)
{
- RLOG_ARG0(L_ERROR,DBG_CELLID,cellCfg->cellId,"Rgr Cell Config failed at"
+ DU_LOG("\nERROR --> SCH : Rgr Cell Config failed at"
" Initializing the LAA Cell Control Cb");
rgSCHCfgFreeCellCb(cell);
return RFAILED;
}
cell->isPucchFormat3Sptd = cellCfg->isPucchFormat3Sptd;
- RLOG_ARG0(L_INFO,DBG_CELLID,cellCfg->cellId,"Format 3 is Enabled");
- printf ("\n Format 3 is Enabled for CELL:%d",cell->cellId);
+ DU_LOG("\nINFO --> SCH : Format 3 is Enabled");
+ DU_LOG ("\n Format 3 is Enabled for CELL:%d",cell->cellId);
#endif
{
if (rgSCHCfgEmtcCellCfg(cell,&(cellCfg->emtcCellCfg)) != ROK)
{
- RLOG_ARG0(L_ERROR,DBG_CELLID,cellCfg->cellId,"EMTC Config Failed"
- " cell");
+ DU_LOG("\nERROR --> SCH : EMTC Config Failed cell");
return RFAILED;
}
}
ret = rgSCH5gtfCellCfg(cell, cellCfg);
if (ret != ROK)
{
- RLOG_ARG0(L_ERROR, DBG_CELLID,cellCfg->cellId,"5GTF Rgr Cell Config failed");
+ DU_LOG("\nERROR --> SCH : 5GTF Rgr Cell Config failed");
rgSCHCfgFreeCellCb(cell);
return RFAILED;
}
{
if ((raCb = rgSCHDbmGetRaCb(cell, ueCfg->crnti)) == NULLP)
{
- RLOG_ARG1(L_ERROR,DBG_CELLID,ueCfg->cellId,"No RaCb exists for"
+ DU_LOG("\nERROR --> SCH : No RaCb exists for"
"CRNTI:%d ",ueCfg->crnti);
break;
}
if (((rgSCHUtlAllocSBuf(inst, (Data **)&ue, sizeof(RgSchUeCb))) != ROK) ||
((uint8_t *)ue == NULLP))
{
- RLOG_ARG1(L_ERROR,DBG_CELLID,ueCfg->cellId, "Memory allocation"
+ DU_LOG("\nERROR --> SCH : Memory allocation"
" FAILED for CRNTI:%d", ueCfg->crnti);
break;
}
sizeof(RgSchUeCellInfo))) != ROK))
{
#ifndef ALIGN_64BIT
- RGSCHDBGERRNEW(inst, (rgSchPBuf(inst), "[%lu]SCellIdx :Memomy allocation "
- "Failed while Adding SCell Information\n", idx));
+ DU_LOG("\nERROR --> SCH : [%lu]SCellIdx :Memomy allocation "
+ "Failed while Adding SCell Information\n", idx);
#else
- RGSCHDBGERRNEW(inst, (rgSchPBuf(inst), "[%u]SCellIdx :Memomy allocation "
- "Failed while Adding SCell Information\n", idx));
+ DU_LOG("\nERROR --> SCH : [%u]SCellIdx :Memomy allocation "
+ "Failed while Adding SCell Information\n", idx);
#endif
return RFAILED;
}
/* Initialize the lists of the UE */
if((rgSCHDbmInitUe(ue)) != ROK)
{
- RLOG_ARG1(L_ERROR,DBG_CELLID,ueCfg->cellId,"DBM initialization "
+ DU_LOG("\nERROR --> SCH : DBM initialization "
"failed for CRNTI:%d", ueCfg->crnti);
break;
}
ue->isEmtcUe = TRUE;
if (rgSCHUtlUpdUeEmtcInfo(cell, ueCfg, ue) != ROK)
{
- RLOG_ARG1(L_ERROR,DBG_CELLID,ueCfg->cellId,"EMTC UE Cfg"
+ DU_LOG("\nERROR --> SCH : EMTC UE Cfg"
"failed for CRNTI:%d", ueCfg->crnti);
break;
}
/* Initialize scheduler related information for UE */
if(rgSCHUtlRgrUeCfg(cell, ue, ueCfg, errInfo) != ROK)
{
- RLOG_ARG1(L_ERROR,DBG_CELLID,ueCfg->cellId,"Scheduler handling "
+ DU_LOG("\nERROR --> SCH : Scheduler handling "
"failed in config for CRNTI:%d", ueCfg->crnti);
break;
}
ret = rgSCHUhmHqEntInit(cell, ue);
if (ret != ROK)
{
- RLOG_ARG1(L_ERROR,DBG_CELLID,ueCfg->cellId,"UHM HARQ Ent Init "
+ DU_LOG("\nERROR --> SCH : UHM HARQ Ent Init "
"Failed for CRNTI:%d", ueCfg->crnti);
break;
}
{
if((rgSCHRamRgrUeCfg(cell, ue, raCb, errInfo)) != ROK)
{
- RLOG_ARG1(L_ERROR,DBG_CELLID,ueCfg->cellId,"Random access "
+ DU_LOG("\nERROR --> SCH : Random access "
"handling config failed for CRNTI:%d", ueCfg->crnti);
break;
}
hqEnt = RG_SCH_CMN_GET_UE_HQE(ue, cell);
if (hqEnt == NULLP)
{
- RLOG_ARG1(L_ERROR,DBG_CELLID,ueCfg->cellId,"Hq Entity Initialization "
+ DU_LOG("\nERROR --> SCH : Hq Entity Initialization "
"failed in config for CRNTI:%d", ueCfg->crnti);
break;
}
* do this. */
if (raCb->raState == RGSCH_RA_MSG4_DONE)
{
- RLOG_ARG1(L_DEBUG,DBG_CELLID,cell->cellId,
- "RNTI:%d RaCb deleted as Msg4 transmission is done",
+ DU_LOG("\nERROR --> SCH : RNTI:%d RaCb deleted as Msg4 transmission is done",
raCb->tmpCrnti);
rgSCHRamDelRaCb(cell, raCb, FALSE);
}
/* Initialize MeasureGap and Acknack Rep Information for UE */
if((rgSCHMeasGapANRepUeCfg(cell, ue, ueCfg)) != ROK)
{
- RLOG_ARG1(L_ERROR,DBG_CELLID,ueCfg->cellId,"Measurement Gap and"
+ DU_LOG("\nERROR --> SCH : Measurement Gap and"
" AckNack Rep failed in Config for CRNTI:%d", ueCfg->crnti);
break;
}
#ifdef LTE_TDD
if((rgSCHUtlAllocUeANFdbkInfo(ue,RGSCH_PCELL_INDEX)) != ROK)
{
- RLOG_ARG1(L_ERROR,DBG_CELLID,ueCfg->cellId,"Memomy allocation "
+ DU_LOG("\nERROR --> SCH : Memomy allocation "
"Failed while UE related Ack Nack Information for CRNTI:%d",
ueCfg->crnti);
break;
#ifdef TFU_UPGRADE
/* Int ialize APeriodic CQI/PMI/RI Information for UE */
- RGSCHDBGPRM(cell->instIdx,(rgSchPBuf(cell->instIdx),
- "\n rgSCHCfgRgrUeCfg : CellID=%d UeId =%d AcqiCfg Pres =%d",
- cell->cellId, ue->ueId, ueCfg->ueDlCqiCfg.aprdCqiCfg.pres));
+ DU_LOG("\nDEBUG --> SCH : rgSCHCfgRgrUeCfg CellID=%d UeId =%d AcqiCfg Pres =%d", cell->cellId, ue->ueId,\
+ ueCfg->ueDlCqiCfg.aprdCqiCfg.pres);
/*Store Trigger Set Bit String to UE */
#ifdef LTEMAC_HDFDD
if (rgSCHHdFddUeCfg(cell, ue, ueCfg->isHdFddEnbld) != ROK)
{
- RLOG_ARG1(L_ERROR,DBG_CELLID,ueCfg->cellId,
- "Could not do HD-FDD config for CRNTI:%d",ueCfg->crnti);
+ DU_LOG("\nERROR --> SCH : Could not do HD-FDD config for CRNTI:%d",ueCfg->crnti);
break;
}
{
if((rgSCHDrxUeCfg(cell,ue,ueCfg)) != ROK )
{
- RLOG_ARG1(L_ERROR,DBG_CELLID,ueCfg->cellId,"DRX configuration failed",
- ueCfg->crnti);
+ DU_LOG("\nERROR --> SCH : DRX configuration failed");
break;
}
}
#ifdef LTE_ADV
/*Update A Value for PCell TBs*/
ue->f1bCsAVal = rgSCHUtlGetMaxTbSupp(ue->mimoInfo.txMode);
- RLOG_ARG1(L_ERROR,DBG_CELLID, ueCfg->cellId,
- "\n UeCfg A value is %d\n",ue->f1bCsAVal);
+ DU_LOG("\nERROR --> SCH : UeCfg A value is %d\n",ue->f1bCsAVal);
#endif
errInfo->errCause = RGSCHERR_NONE;
ret = rgSCHUtlRgrCellRecfg(cell, cellRecfg, errInfo);
if (ret != ROK)
{
- RLOG_ARG0(L_ERROR,DBG_CELLID,cellRecfg->cellId, "RGR Cell re-configuration failed "
+ DU_LOG("\nERROR --> SCH : RGR Cell re-configuration failed "
"at Scheduler ");
return RFAILED;
}
if( ROK != rgSCHUtlResetCpuOvrLdState(cell, cellRecfg->cntrlCmdCfg.cmdDesc.\
cpuOvrLd.instruction))
{
- RLOG_ARG1(L_ERROR,DBG_CELLID, cellRecfg->cellId,
- "Invalid CPU OvrLd Ins %d for cell",
+ DU_LOG("\nERROR --> SCH : Invalid CPU OvrLd Ins %d for cell",
cellRecfg->cntrlCmdCfg.cmdDesc.cpuOvrLd.instruction);
return RFAILED;
}
if((rgSCHUtlAllocSBuf(inst, (Data**)&(cell->rntpAggrInfo.val),
(len * sizeof(uint8_t)))) != ROK)
{
- RLOG_ARG0(L_ERROR,DBG_CELLID,cellRecfg->cellId,
- "Memory allocation FAILED for RNTP Alloc");
+ DU_LOG("\nERROR --> SCH : Memory allocation FAILED for RNTP Alloc");
return RFAILED;
}
cell->rntpAggrInfo.pres = PRSNT_NODEF;
{
if(cell->isAutoCfgModeEnb)
{
- RLOG0(L_INFO,"Auto Mode Cfg enabled durint cell recfg\n");
+ DU_LOG("\nINFO --> SCH : Auto Mode Cfg enabled durint cell recfg\n");
}
}
CmLteRnti oldRnti = 0;
if ((raCb = rgSCHDbmGetRaCb(cell, ueRecfg->newCrnti)) == NULLP)
{
- RLOG_ARG2(L_ERROR,DBG_CELLID,ueRecfg->cellId,"UEID:No RaCb exists while"
+ DU_LOG("\nERROR --> SCH : UEID:No RaCb exists while"
"Reconfig for OLD CRNTI:%d NEW CRNTI:%d",ueRecfg->oldCrnti,ueRecfg->newCrnti);
return RFAILED;
}
oldRnti = ue->ueId;
}
- RLOG2(L_INFO,"UE ID CHNG OLD %d new %d",ueRecfg->oldCrnti, ueRecfg->newCrnti);
+ DU_LOG("\nINFO --> SCH : UE ID CHNG OLD %d new %d",ueRecfg->oldCrnti, ueRecfg->newCrnti);
/* Fix : syed Deleting Old DL HqEnt. It would be assigned after
* reest RACH(msg4) is completed. */
ret = rgSCHRamRgrUeCfg(cell, ue, raCb, errInfo);
if (ret != ROK)
{
- RLOG_ARG2(L_ERROR,DBG_CELLID,ueRecfg->cellId,"RAM Handling for UE Reconfig failed"
+ DU_LOG("\nERROR --> SCH : RAM Handling for UE Reconfig failed"
"for OLD CRNTI:%d NEW CRNTI:%d",ueRecfg->oldCrnti,ueRecfg->newCrnti);
return RFAILED;
}
/* Inititialize Ue control block */
ue->ueId = ueRecfg->newCrnti;
- RLOG_ARG2(L_DEBUG,DBG_CELLID,cell->cellId,
- "Changing RNTI from %d to %d",
+ DU_LOG("\nDEBUG --> SCH : Changing RNTI from %d to %d",
ueRecfg->oldCrnti,
ueRecfg->newCrnti);
#ifdef EMTC_ENABLE
if ( ret != ROK )
{
- RLOG_ARG2(L_ERROR,DBG_CELLID,ueRecfg->cellId,"UE DRX re-est failed"
+ DU_LOG("\nERROR --> SCH : UE DRX re-est failed"
"for OLD CRNTI:%d NEW CRNTI:%d",ueRecfg->oldCrnti,ueRecfg->newCrnti);
return RFAILED;
}
* for msg4 */
if (raCb->raState == RGSCH_RA_MSG4_DONE)
{
- RLOG_ARG1(L_DEBUG,DBG_CELLID,ueRecfg->cellId,
- "RNTI:%d with RaCb deleted as Msg4 transmission is done",
+ DU_LOG("\nDEBUG --> SCH : RNTI:%d with RaCb deleted as Msg4 transmission is done",
raCb->tmpCrnti);
rgSCHRamDelRaCb(cell, raCb, FALSE);
}
{
/* Fix : syed HO UE does not have a valid ue->rntiLnk */
/* Just indicate to MAC, no need to release at SCH */
- RLOG_ARG2(L_DEBUG,DBG_CELLID,cell->cellId,
- "HO OldRnti:%d RLS and NewRnti:%d CHNG IND TO MAC",
+ DU_LOG("\nDEBUG --> SCH : HO OldRnti:%d RLS and NewRnti:%d CHNG IND TO MAC",
oldRnti, ueRecfg->newCrnti);
rgSCHUtlIndRntiRls2Mac(cell, oldRnti, TRUE, ueRecfg->newCrnti);
}
ret = rgSCHUtlRgrUeRecfg(cell, ue, ueRecfg, errInfo);
if (ret != ROK)
{
- RLOG_ARG2(L_ERROR,DBG_CELLID,ueRecfg->cellId,
- "Scheduler handling while reconfig failed"
+ DU_LOG("\nERROR --> SCH : Scheduler handling while reconfig failed"
"for OLD CRNTI:%d NEW CRNTI:%d",ueRecfg->oldCrnti,ueRecfg->newCrnti);
return RFAILED;
}
ret = rgSCHMeasGapANRepUeRecfg(cell, ue, ueRecfg);
if (ret != ROK)
{
- RLOG_ARG2(L_ERROR,DBG_CELLID,ueRecfg->cellId,"Measurement Gap and"
+ DU_LOG("\nERROR --> SCH : Measurement Gap and"
"AckNack Rep Recfg failed for OLD CRNTI:%d NEW CRNTI:%d",
ueRecfg->oldCrnti,ueRecfg->newCrnti);
return RFAILED;
if (RFAILED == rgSCHCfgRgrUeRecfgRntiChg (cell, ue, ueRecfg, errInfo))
{
- RLOG_ARG2(L_ERROR,DBG_CELLID,ueRecfg->cellId,"RNTI change "
+ DU_LOG("\nERROR --> SCH : RNTI change "
"failed for OLD CRNTI:%d NEW CRNTI:%d",
ueRecfg->oldCrnti,ueRecfg->newCrnti);
return RFAILED;
if ( ret != ROK )
{
- RLOG_ARG2(L_ERROR,DBG_CELLID,ueRecfg->cellId,"UE DRX reconfig failed"
+ DU_LOG("\nERROR --> SCH : UE DRX reconfig failed"
"failed for OLD CRNTI:%d NEW CRNTI:%d",
ueRecfg->oldCrnti,ueRecfg->newCrnti);
return RFAILED;
ret = rgSCHUtlRgrLcRecfg(cell, ue, dlLc, lcRecfg, errInfo);
if (ret != ROK)
{
- RLOG_ARG2(L_ERROR,DBG_CELLID,lcRecfg->cellId,"Scheduler handling for LC Recfg"
+ DU_LOG("\nERROR --> SCH : Scheduler handling for LC Recfg"
" failed for CRNTI:%d LCID:%d",lcRecfg->crnti,lcRecfg->lcId);
return RFAILED;
}
ret = rgSCHUtlRgrLcgRecfg(cell, ue, lcgRecfg, errInfo);
if (ret != ROK)
{
- RLOG_ARG2(L_ERROR,DBG_CELLID,lcgRecfg->cellId,"Scheduler handling for LCG Recfg"
+ DU_LOG("\nERROR --> SCH : Scheduler handling for LCG Recfg"
" failed for CRNTI:%d LCGID:%d",lcgRecfg->crnti,lcgRecfg->ulRecfg.lcgId);
return RFAILED;
}
if (cell->cellId != cellDelInfo->u.cellDel.cellId)
{
- RLOG_ARG0(L_ERROR,DBG_CELLID,cellDelInfo->u.cellDel.cellId,
- "Cell does not exist");
+ DU_LOG("\nERROR --> SCH : Cell does not exist");
return RFAILED;
}
if (cell->cellId != ueDelInfo->u.ueDel.cellId)
{
- RLOG_ARG1(L_ERROR,DBG_CELLID,ueDelInfo->u.ueDel.cellId,
- "Cell does not exist CRNTI:%d",
+ DU_LOG("\nERROR --> SCH : Cell does not exist CRNTI:%d",
ueDelInfo->u.ueDel.crnti);
return RFAILED;
}
{
if((raCb = rgSCHDbmGetRaCb(cell, ueDelInfo->u.ueDel.crnti)) == NULLP)
{
- RLOG_ARG1(L_ERROR,DBG_CELLID,ueDelInfo->u.ueDel.cellId,
- "RaCb does not exist for CRNTI:%d",ueDelInfo->u.ueDel.crnti);
+ DU_LOG("\nERROR --> SCH : RaCb does not exist for CRNTI:%d",ueDelInfo->u.ueDel.crnti);
return RFAILED;
}
else
/* Fetch the Active cell */
if (cell->cellId != lcDelInfo->u.lchDel.cellId)
{
- RLOG_ARG1(L_ERROR,DBG_CELLID,cell->cellId, "Cell does not exist %d",
+ DU_LOG("\nERROR --> SCH : Cell does not exist %d",
lcDelInfo->u.lchDel.cellId);
return RFAILED;
}
/* Fetch the Ue */
if ((ue = rgSCHDbmGetUeCb(cell, lcDelInfo->u.lchDel.crnti)) == NULLP)
{
- RLOG_ARG2(L_ERROR,DBG_CELLID,lcDelInfo->u.lchDel.cellId,
- "UE does not exist for CRNTI:%d LCID:%d",
+ DU_LOG("\nERROR --> SCH : UE does not exist for CRNTI:%d LCID:%d",
lcDelInfo->u.lchDel.crnti,lcDelInfo->u.lchDel.lcId);
return RFAILED;
}
if (lcDelInfo->u.lchDel.lcgId > 3)
{
- RLOG_ARG3(L_ERROR,DBG_CELLID,lcDelInfo->u.lchDel.cellId,
- "[%d]UEID:For LC %d, LCGid %d is invalid",
+ DU_LOG("\nERROR --> SCH : [%d]UEID:For LC %d, LCGid %d is invalid",
lcDelInfo->u.lchDel.crnti,lcDelInfo->u.lchDel.lcId,
lcDelInfo->u.lchDel.lcgId);
return RFAILED;
if ((dlLc = rgSCHDbmGetDlDedLcCb(ue, lcDelInfo->u.lchDel.lcId))
== NULLP)
{
- RLOG_ARG2(L_ERROR,DBG_CELLID,lcDelInfo->u.lchDel.cellId,
- "LC does not exist for CRNTI:%d LCID:%d",
+ DU_LOG("\nERROR --> SCH : LC does not exist for CRNTI:%d LCID:%d",
lcDelInfo->u.lchDel.crnti, lcDelInfo->u.lchDel.lcId);
return RFAILED;
}
/* Fetch the Active cell */
if (cell->cellId != lcDelInfo->u.lcgDel.cellId)
{
- RLOG_ARG2(L_ERROR,DBG_CELLID,lcDelInfo->u.lchDel.cellId,
- "CELL does not exist for CRNTI:%d LCGID:%d",
+ DU_LOG("\nERROR --> SCH : CELL does not exist for CRNTI:%d LCGID:%d",
lcDelInfo->u.lchDel.crnti,lcDelInfo->u.lchDel.lcId);
return RFAILED;
}
/* Fetch the Ue */
if ((ue = rgSCHDbmGetUeCb(cell, lcDelInfo->u.lcgDel.crnti)) == NULLP)
{
- RLOG_ARG2(L_ERROR,DBG_CELLID,lcDelInfo->u.lchDel.cellId,
- "UE does not exist for CRNTI:%d LCGID:%d",
+ DU_LOG("\nERROR --> SCH : UE does not exist for CRNTI:%d LCGID:%d",
lcDelInfo->u.lchDel.crnti,lcDelInfo->u.lchDel.lcId);
return RFAILED;
}
if (((*cell) == NULLP) ||
((*cell)->cellId != lcCfg->cellId))
{
- RLOG_ARG2(L_ERROR,DBG_CELLID,lcCfg->cellId,"Cell does not existi for "
+ DU_LOG("\nERROR --> SCH : Cell does not existi for "
"CRNTI:%d LCID:%d",lcCfg->crnti, lcCfg->lcId);
return RFAILED;
}
/* Fetch the Ue */
if ((*ue = rgSCHDbmGetUeCb(*cell, lcCfg->crnti)) == NULLP)
{
- RLOG_ARG2(L_ERROR,DBG_CELLID,lcCfg->cellId,"UE does not exist for dedicated"
+ DU_LOG("\nERROR --> SCH : UE does not exist for dedicated"
" logical channel CRNTI:%d LCID:%d", lcCfg->crnti, lcCfg->lcId);
return RFAILED;
}
if ((lcCfg->lcId < RGSCH_DEDLC_MIN_LCID)
||(lcCfg->lcId > RGSCH_DEDLC_MAX_LCID))
{
- RLOG_ARG2(L_ERROR,DBG_CELLID,lcCfg->cellId,"Invalid logical channel Id:%d"
+ DU_LOG("\nERROR --> SCH : Invalid logical channel Id:%d"
"for CRNTI:%d",lcCfg->lcId,lcCfg->crnti);
return RFAILED;
}
if (lcCfg->lcType != CM_LTE_LCH_DTCH && lcCfg->lcType != CM_LTE_LCH_DCCH)
{
- RLOG_ARG3(L_ERROR,DBG_CELLID,lcCfg->cellId,"Invalid logical channel Type %d"
+ DU_LOG("\nERROR --> SCH : Invalid logical channel Type %d"
"CRNTI:%d LCID:%d",lcCfg->lcType,lcCfg->crnti, lcCfg->lcId);
return RFAILED;
}
if (((*cell) == NULLP) ||
((*cell)->cellId != lcgCfg->cellId))
{
- RLOG_ARG2(L_ERROR,DBG_CELLID,lcgCfg->cellId,"Cell does not exist for"
+ DU_LOG("\nERROR --> SCH : Cell does not exist for"
"CRNTI:%d LCGID:%d",lcgCfg->crnti,lcgCfg->ulInfo.lcgId);
return RFAILED;
}
/* Fetch the Ue */
if ((*ue = rgSCHDbmGetUeCb(*cell, lcgCfg->crnti)) == NULLP)
{
- RLOG_ARG2(L_ERROR,DBG_CELLID,lcgCfg->cellId,"UE does not exist for "
+ DU_LOG("\nERROR --> SCH : UE does not exist for "
"dedicated logical channel CRNTI:%d LCGID:%d", lcgCfg->crnti, lcgCfg->ulInfo.lcgId);
return RFAILED;
}
}
else
{
- RLOG_ARG0(L_ERROR,DBG_CELLID,cellCfg->cellId,
- "Invalid si config for cell");
+ DU_LOG("\nERROR --> SCH : Invalid si config for cell");
return RFAILED;
}
}
}
else
{
- RLOG_ARG1(L_ERROR,DBG_CELLID, cellCfg->cellId,
- "Invalid transport channel %d for cell", lcCfg->dlTrchType);
+ DU_LOG("\nERROR --> SCH : Invalid transport channel %d for cell", lcCfg->dlTrchType);
return RFAILED;
}
}
/* Uplink CCCH */
if (lcCfg->lcType != CM_LTE_LCH_CCCH)
{
- RLOG_ARG1(L_ERROR,DBG_CELLID, cellCfg->cellId,"Invalid UL common lcType %d "
- "for cell", lcCfg->lcType);
+ DU_LOG("\nERROR --> SCH : Invalid UL common lcType %d for cell", lcCfg->lcType);
return RFAILED;
}
else
/* Invalid direction */
if (!dirVld)
{
- RLOG_ARG1(L_ERROR,DBG_CELLID, cellCfg->cellId,"Invalid Direction %d",
- lcCfg->dir);
+ DU_LOG("\nERROR --> SCH : Invalid Direction %d", lcCfg->dir);
return RFAILED;
}
}
if (bitMask != RGSCH_CELL_ACTIVE_CFG)
{
- RLOG_ARG0(L_ERROR,DBG_CELLID, cellCfg->cellId,
- "Invalid Common channel config for cell");
+ DU_LOG("\nERROR --> SCH : Invalid Common channel config for cell");
return RFAILED;
}
if((ueDlCqiCfg->prdCqiCfg.cqiPmiCfgIdx < 1) ||
(ueDlCqiCfg->prdCqiCfg.cqiPmiCfgIdx > 1024))
{
- RLOG_ARG0(L_ERROR,DBG_CELLID,cell->cellId,
- "Invalid Periodic CQI Info");
+ DU_LOG("\nERROR --> SCH : Invalid Periodic CQI Info");
return RFAILED;
}
#endif
((ueDlCqiCfg->aprdCqiCfg.aprdModeEnum > RGR_APRD_CQI_MOD31) ||
(cell->bwCfg.dlTotalBw <= 7)))
{
- RLOG_ARG1(L_ERROR,DBG_CELLID,cell->cellId,
- "Invalid Aperiodic mode config for DL CQI",
- ueDlCqiCfg->aprdCqiCfg.aprdModeEnum);
+ DU_LOG("\nERROR --> SCH : Invalid Aperiodic mode config for DL CQI");
return RFAILED;
}
#ifndef TFU_UPGRADE
/* Validate UE Periodic CQI mode */
if (ueDlCqiCfg->prdCqiCfg.prdModeEnum > RGR_PRD_CQI_MOD21)
{
- RLOG_ARG1(L_ERROR,DBG_CELLID,cell->cellId,
- "Invalid periodic mode config for DL CQI",
- ueDlCqiCfg->prdCqiCfg.prdModeEnum);
+ DU_LOG("\nERROR --> SCH : Invalid periodic mode config for DL CQI");
return RFAILED;
}
/* Validate K value in periodic CQI Config */
((ueDlCqiCfg->prdCqiCfg.k < 1)||
(ueDlCqiCfg->prdCqiCfg.k > 4)))
{
- RLOG_ARG0(L_ERROR,DBG_CELLID,cell->cellId,
- "Invalid K for Subband CQI reporting");
+ DU_LOG("\nERROR --> SCH : Invalid K for Subband CQI reporting");
return RFAILED;
}
#else
if ((ueDlCqiCfg->prdCqiCfg.type == 1) &&
(ueDlCqiCfg->prdCqiCfg.cqiSetup.prdModeEnum > RGR_PRD_CQI_MOD21))
{
- RLOG_ARG1(L_ERROR,DBG_CELLID,cell->cellId,
- "Invalid periodic mode config for DL CQI",
- ueDlCqiCfg->prdCqiCfg.cqiSetup.prdModeEnum);
+ DU_LOG("\nERROR --> SCH : Invalid periodic mode config for DL CQI");
return RFAILED;
}
if ((ueCfg->ackNackModeEnum == RGR_TDD_ACKNACK_MODE_MULT) &&
(ueCfg->ueAckNackCfg.isAckNackEnabled == TRUE))
{
- RLOG_ARG2(L_ERROR,DBG_CELLID,ueCfg->cellId,"TDD ACK NACK Multiplexing Mode"
+ DU_LOG("\nERROR --> SCH : TDD ACK NACK Multiplexing Mode"
"is not allowed when Ack/Nack is Enabled: %d CRNTI:%d",
ueCfg->ueAckNackCfg.ackNackRepFactor,ueCfg->crnti);
return RFAILED;
if ( (ueCfg->ueAckNackCfg.ackNackRepFactor < RGR_ACKNACK_REPFACT_N2)
|| (ueCfg->ueAckNackCfg.ackNackRepFactor > RGR_ACKNACK_REPFACT_N6))
{
- RLOG_ARG2(L_ERROR,DBG_CELLID,ueCfg->cellId, "Invalid ACK NACK REP Factor:%d CRNTI:%d",
+ DU_LOG("\nERROR --> SCH : Invalid ACK NACK REP Factor:%d CRNTI:%d",
ueCfg->ueAckNackCfg.ackNackRepFactor,ueCfg->crnti);
return RFAILED;
}
case RG_MEAS_GAPPRD_40:
if(ueCfg->ueMesGapCfg.gapOffst >= RG_MEAS_GAPPRD_40)
{
- RLOG_ARG2(L_ERROR,DBG_CELLID,ueCfg->cellId,"Invalid GAP Offset:%d CRNTI:%d",
+ DU_LOG("\nERROR --> SCH : Invalid GAP Offset:%d CRNTI:%d",
ueCfg->ueMesGapCfg.gapOffst,ueCfg->crnti);
return RFAILED;
}
case RG_MEAS_GAPPRD_80:
if(ueCfg->ueMesGapCfg.gapOffst >= RG_MEAS_GAPPRD_80)
{
- RLOG_ARG2(L_ERROR,DBG_CELLID,ueCfg->cellId,"Invalid GAP Offset:%d CRNTI:%d",
+ DU_LOG("\nERROR --> SCH : Invalid GAP Offset:%d CRNTI:%d",
ueCfg->ueMesGapCfg.gapOffst,ueCfg->crnti);
return RFAILED;
}
break;
default:
{
- RLOG_ARG2(L_ERROR,DBG_CELLID,ueCfg->cellId,"Invalid GAP Periodicity Settings:%d"
+ DU_LOG("\nERROR --> SCH : Invalid GAP Periodicity Settings:%d"
"CRNTI:%d", ueCfg->ueMesGapCfg.gapPrd,ueCfg->crnti);
return RFAILED;
}
if ( (ueRecfg->ueAckNackRecfg.ackNackRepFactor < RGR_ACKNACK_REPFACT_N2)
|| (ueRecfg->ueAckNackRecfg.ackNackRepFactor > RGR_ACKNACK_REPFACT_N6))
{
- RLOG_ARG2(L_ERROR,DBG_CELLID,ueRecfg->cellId,"Invalid ACK NACK REP Factor:%d"
+ DU_LOG("\nERROR --> SCH : Invalid ACK NACK REP Factor:%d"
"NEW CRNTI:%d",ueRecfg->ueAckNackRecfg.ackNackRepFactor,ueRecfg->newCrnti);
return RFAILED;
}
case RG_MEAS_GAPPRD_40:
if(ueRecfg->ueMeasGapRecfg.gapOffst >= RG_MEAS_GAPPRD_40)
{
- RLOG_ARG2(L_ERROR,DBG_CELLID,ueRecfg->cellId,"Invalid GAP Offset:%d"
+ DU_LOG("\nERROR --> SCH : Invalid GAP Offset:%d"
"NEW CRNTI:%d",ueRecfg->ueMeasGapRecfg.gapOffst,ueRecfg->newCrnti);
return RFAILED;
}
case RG_MEAS_GAPPRD_80:
if(ueRecfg->ueMeasGapRecfg.gapOffst >= RG_MEAS_GAPPRD_80)
{
- RLOG_ARG2(L_ERROR,DBG_CELLID,ueRecfg->cellId,"Invalid GAP Offset:%d"
+ DU_LOG("\nERROR --> SCH : Invalid GAP Offset:%d"
"NEW CRNTI:%d",ueRecfg->ueMeasGapRecfg.gapOffst,ueRecfg->newCrnti);
return RFAILED;
}
break;
default:
{
- RLOG_ARG2(L_ERROR,DBG_CELLID,ueRecfg->cellId,"Invalid GAP Periodicity Settings:%d"
+ DU_LOG("\nERROR --> SCH : Invalid GAP Periodicity Settings:%d"
"NEW CRNTI:%d",ueRecfg->ueMeasGapRecfg.gapPrd,ueRecfg->newCrnti);
return RFAILED;
}
if ((dlSpsCfg->numPucchVal > RG_SCH_MAX_NUM_N1PUCCH_PER_UE) ||
(dlSpsCfg->numPucchVal == 0))
{
- RLOG_ARG0(L_ERROR,DBG_CELLID,cell->cellId,"Invalid number of n1Pucch values"
+ DU_LOG("\nERROR --> SCH : Invalid number of n1Pucch values"
" in DL SPS Config");
return RFAILED;
}
if (dlSpsCfg->n1PucchVal[idx] > RG_SCH_MAX_N1PUCCH_VAL)
{
#ifdef ALIGN_64BIT
- RLOG_ARG1(L_ERROR,DBG_CELLID,cell->cellId,"Invalid N1Pucch value"
+ DU_LOG("\nERROR --> SCH : Invalid N1Pucch value"
" in DL SPS Config %u", dlSpsCfg->n1PucchVal[idx]);
#else
- RLOG_ARG1(L_ERROR,DBG_CELLID,cell->cellId,"Invalid N1Pucch value"
+ DU_LOG("\nERROR --> SCH : Invalid N1Pucch value"
" in DL SPS Config %lu", dlSpsCfg->n1PucchVal[idx]);
#endif
return RFAILED;
if ((dlSpsCfg->numSpsHqProc == 0) ||
(dlSpsCfg->numSpsHqProc > RGSCH_MAX_DL_HQ_PROC))
{
- RLOG_ARG0(L_ERROR,DBG_CELLID,cell->cellId,"Invalid number of SPS HARQ procs"
+ DU_LOG("\nERROR --> SCH : Invalid number of SPS HARQ procs"
" in DL SPS Config");
return RFAILED;
}
/* Fix */
if (pwrCfg->uePuschPwr.pres)
{
- RLOG_ARG0(L_ERROR,DBG_CELLID,cell->cellId,"Accumulation configutation"
+ DU_LOG("\nERROR --> SCH : Accumulation configutation"
" not in sync with group power configuration");
return RFAILED;
}
if (rgSCHCfgVldtUeGrpPwrCfg(cell, &pwrCfg->uePuschPwr) != ROK)
{
- RLOG_ARG0(L_ERROR,DBG_CELLID,cell->cellId,"Invalid PUSCH Group power"
+ DU_LOG("\nERROR --> SCH : Invalid PUSCH Group power"
" configuration");
return RFAILED;
}
if (rgSCHCfgVldtUeGrpPwrCfg(cell, &pwrCfg->uePucchPwr) != ROK)
{
- RLOG_ARG0(L_ERROR,DBG_CELLID,cell->cellId,"Invalid PUSCH Group power"
+ DU_LOG("\nERROR --> SCH : Invalid PUSCH Group power"
" configuration");
return RFAILED;
}
((grpPwrCfg->tpcRnti <
(cell->rntiDb.rntiStart + cell->rntiDb.maxRntis))))))
{
- RLOG_ARG0(L_ERROR,DBG_CELLID,cell->cellId,"Invalid Uplink Group power "
+ DU_LOG("\nERROR --> SCH : Invalid Uplink Group power "
"configuration");
return RFAILED;
}
(ueRecfg->ueSpsRecfg.spsRnti == RGSCH_SI_RNTI) ||
(ueRecfg->ueSpsRecfg.spsRnti == RGSCH_P_RNTI))
{
- RLOG_ARG2(L_ERROR,DBG_CELLID,ueRecfg->cellId,"Invalid SPS RNTI "
+ DU_LOG("\nERROR --> SCH : Invalid SPS RNTI "
" in DL SPS Recfg OLD CRNTI:%d NEW CCRNTI:%d",
ueRecfg->oldCrnti,ueRecfg->newCrnti);
return RFAILED;
}
if (rgSCHCfgVldtUeDlSpsCfg(cell, &ueRecfg->ueSpsRecfg.dlSpsCfg) != ROK)
{
- RLOG_ARG2(L_ERROR,DBG_CELLID,ueRecfg->cellId,"Invalid DL SPS configuration"
+ DU_LOG("\nERROR --> SCH : Invalid DL SPS configuration"
" for the OLD CRNTI:%d NEW CRNTI:%d",
ueRecfg->oldCrnti,ueRecfg->newCrnti);
return RFAILED;
{
/* ccpu00117035 - MOD - changed instIdx to inst */
/* ccpu00117035 - MOD - changed ueID to oldCrnti*/
- RLOG_ARG2(L_ERROR,DBG_CELLID,ueRecfg->cellId,
- " DRX reconfig not supported DL SPS enabled for OLD CRNTI:%d NEW CRNTI:%d",
+ DU_LOG("\nERROR --> SCH : DRX reconfig not supported DL SPS enabled for OLD CRNTI:%d NEW CRNTI:%d",
ueRecfg->oldCrnti,ueRecfg->newCrnti);
- return RFAILED;
+ return RFAILED;
}
}
#endif
{
if(ue->hdFddEnbld == TRUE)
{
- RLOG_ARG2(L_ERROR,DBG_CELLID,ueRecfg->cellId,
- "DL SPS is not supported for HDFDD enabled for OLD CRNTI:%d NEW CRNTI:%d",
+ DU_LOG("\nERROR --> SCH : DL SPS is not supported for HDFDD enabled for OLD CRNTI:%d NEW CRNTI:%d",
ueRecfg->oldCrnti,ueRecfg->newCrnti);
return RFAILED;
}
{
if(ue->hdFddEnbld == TRUE)
{
- RLOG_ARG2(L_ERROR,DBG_CELLID,ueRecfg->cellId,
- "UL SPS is not supported for HDFDD enabled for OLD CRNTI:%d NEW CRNTI:%d",
+ DU_LOG("\nERROR --> SCH : UL SPS is not supported for HDFDD enabled for OLD CRNTI:%d NEW CRNTI:%d",
ueRecfg->oldCrnti,ueRecfg->newCrnti);
return RFAILED;
}
/* Validate DL Power Control Config parameters */
if (ueRecfg->ueCqiReptCfg.numColltdCqiRept > RGR_CQIRPTS_MAXN)
{
- RLOG_ARG3(L_ERROR,DBG_CELLID,ueRecfg->cellId,"Invalide numColltdCqiRept,"
+ DU_LOG("\nERROR --> SCH : Invalide numColltdCqiRept,"
"MAX supported %d for OLD CRNTI:%d NEW CRNTI:%d",RGR_CQIRPTS_MAXN,
ueRecfg->oldCrnti,ueRecfg->newCrnti);
return RFAILED;
if((ret = rgSCHUtlAllocSBuf(inst, (Data**)&dlLc,
sizeof(RgSchDlLcCb))) != ROK)
{
- RLOG_ARG2(L_ERROR,DBG_CELLID,lcCfg->cellId,"Memory allocation FAILED for "
+ DU_LOG("\nERROR --> SCH : Memory allocation FAILED for "
"Downlink LCId:%d CRNTI:%d", lcCfg->lcId,lcCfg->crnti);
return RFAILED;
}
if ((uint8_t *)dlLc == NULLP)
{
- RLOG_ARG2(L_ERROR,DBG_CELLID,lcCfg->cellId,"Memory allocation FAILED for "
+ DU_LOG("\nERROR --> SCH : Memory allocation FAILED for "
"Downlink LCID:%d CRNTI:%d", lcCfg->lcId,lcCfg->crnti);
return RFAILED;
}
rgSCHCfgFreeDlDedLcCb(cell, ue, dlLc);
}
- RLOG_ARG3(L_ERROR,DBG_CELLID,cell->cellId,"Dedicated logical channel "
+ DU_LOG("\nERROR --> SCH : Dedicated logical channel "
"configuration failed at SCH:UEID:%d LCID:%d CRNTI:%d",
ue->ueId, lcCfg->lcId,lcCfg->crnti);
return RFAILED;
rgSCHCfgFreeDlDedLcCb(cell, ue, dlLc);
}
- RLOG_ARG3(L_ERROR,DBG_CELLID,cell->cellId,"Dedicated logical channel "
+ DU_LOG("\nERROR --> SCH : Dedicated logical channel "
"configuration failed at SCH: UL LC CB already existing"
" UEID:%d LCID:%d CRNTI:%d",
ue->ueId, lcCfg->lcId,lcCfg->crnti);
ret = rgSCHUtlRgrLcgCfg(cell, ue, lcgCfg, errInfo);
if (ret != ROK)
{
- RLOG_ARG3(L_ERROR,DBG_CELLID,cell->cellId,"Dedicated logical channel "
+ DU_LOG("\nERROR --> SCH : Dedicated logical channel "
"configuration failed at SCH: UEID:%d LCGID:%d CRNTI:%d",
ue->ueId, lcgCfg->ulInfo.lcgId,lcgCfg->crnti);
/* Roll back lcgCfg */
if((ret = rgSCHUtlAllocSBuf(cell->instIdx, (Data**)&ulLc,
sizeof(RgSchUlLcCb))) != ROK)
{
- RLOG_ARG0(L_ERROR,DBG_CELLID,cell->cellId, "Memory allocation FAILED for ");
+ DU_LOG("\nERROR --> SCH : Memory allocation FAILED ");
return RFAILED;
}
if ((uint8_t *)ulLc == NULLP)
{
- RLOG_ARG0(L_ERROR,DBG_CELLID,cell->cellId, "Memory allocation FAILED for ");
+ DU_LOG("\nERROR --> SCH : Memory allocation FAILED ");
return RFAILED;
}
/* Create UL LC context to maintain LCG to LC mapping and
This validation is only applicable for FDD mode. */
if(siCfg->retxCnt > siCfg->siWinSize)
{
- RLOG0(L_ERROR,"retxCnt is greater than siWinSize, validation failed");
+ DU_LOG("\nERROR --> SCH : retxCnt is greater than siWinSize, validation failed");
return RFAILED;
}
#endif
/* Validate that a valid value for numSi has been specified */
if(siCfg->numSi > RGR_MAX_NUM_SI)
{
- RLOG0(L_ERROR,"Validation for numSi in SI CFG failed");
+ DU_LOG("\nERROR --> SCH : Validation for numSi in SI CFG failed");
return RFAILED;
}
continue;
default:
- RLOG0(L_ERROR,"Validation for SI Periodicity in SI-CFG failed");
+ DU_LOG("\nERROR --> SCH : Validation for SI Periodicity in SI-CFG failed");
return RFAILED;
}
}
{
if(lteAdvCfg->sfrCfg.cellEdgeRbRange.startRb > lteAdvCfg->sfrCfg.cellEdgeRbRange.endRb)
{
- RLOG0(L_ERROR,"Invalid configuration of cell edge bandwidth for SFR feature");
+ DU_LOG("\nERROR --> SCH : Invalid configuration of cell edge bandwidth for SFR feature");
return RFAILED;
}
if(lteAdvCfg->sfrCfg.cellEdgeRbRange.endRb >= dlTotalBw)
{
- RLOG0(L_ERROR,"Invalid configuration of cell edge end RB for SFR feature");
+ DU_LOG("\nERROR --> SCH : Invalid configuration of cell edge end RB for SFR feature");
return RFAILED;
}
#ifdef TFU_UPGRADE
if(lteAdvCfg->sfrCfg.pwrThreshold.pLow >= lteAdvCfg->sfrCfg.pwrThreshold.pHigh)
{
- RLOG0(L_ERROR,"Invalid configuration of power threshold for SFR feature");
+ DU_LOG("\nERROR --> SCH : Invalid configuration of power threshold for SFR feature");
return RFAILED;
}
#endif
if((RGR_ABS_MUTE != lteAdvCfg->absCfg.absPatternType) &&
(RGR_ABS_TRANSMIT != lteAdvCfg->absCfg.absPatternType))
{
- RLOG0(L_ERROR,"Invalid configuration of ABS pattern type");
+ DU_LOG("\nERROR --> SCH : Invalid configuration of ABS pattern type");
return RFAILED;
}
{
if((temp[idx] != 1) && (temp[idx] != 0))
{
- RLOG0(L_ERROR,"Invalid configuration of ABS pattern type");
- return RFAILED;
+ DU_LOG("\nERROR --> SCH : Invalid configuration of ABS pattern type");
+ return RFAILED;
}
}
}
)
{
- RGSCHDBGPRM(inst, (rgSchPBuf(inst), "Validating CSG Parameters \n"));
+ DU_LOG("\nDEBUG --> SCH : Validating CSG Parameters \n");
if(csgParam->minDlResNonCsg > 100)
{
- RLOG0(L_ERROR,"Invalid Configuration of minimum DL resources "
+ DU_LOG("\nERROR --> SCH : Invalid Configuration of minimum DL resources "
"for NON-CSG");
return RFAILED;
}
if(csgParam->minUlResNonCsg > 100)
{
- RLOG0(L_ERROR,"Invalid Configuration of minimum UL resources "
+ DU_LOG("\nERROR --> SCH : Invalid Configuration of minimum UL resources "
"for NON-CSG");
return RFAILED;
}
if((siCfg->siId < RGSCH_SI_SIID_LOWER_LMT) ||
(siCfg->siId > numSi))
{
- RLOG_ARG0(L_ERROR,DBG_CELLID,cell->cellId, "Invalid SI Id value"
+ DU_LOG("\nERROR --> SCH : Invalid SI Id value"
" specified");
return RFAILED;
}
if((siCfg->siId < RGSCH_SI_SIID_LOWER_LMT) ||
(siCfg->siId > numSi))
{
- RLOG_ARG0(L_ERROR,DBG_CELLID,cell->cellId, "Invalid SI Id value"
+ DU_LOG("\nERROR --> SCH : Invalid SI Id value"
" specified");
return RFAILED;
}
if(siCfg->siId > ((cell->siCfg.minPeriodicity * 10)/cell->siCfg.siWinSize))
{
- RLOG_ARG0(L_ERROR,DBG_CELLID,cell->cellId, "SiId can not be scheduled ");
+ DU_LOG("\nERROR --> SCH : SiId can not be scheduled ");
return RFAILED;
}
break;
break;
#endif
default:
- RLOG_ARG0(L_ERROR,DBG_CELLID,cell->cellId, "Invalid cfgType "
+ DU_LOG("\nERROR --> SCH : Invalid cfgType "
"parameter value");
return RFAILED;
}
/*Validate the specified pdu */
if(NULLP == siCfg->pdu)
{
- RLOG_ARG0(L_ERROR,DBG_CELLID,cell->cellId, "Invalid NULLP pdu "
+ DU_LOG("\nERROR --> SCH : Invalid NULLP pdu "
"specified");
return RFAILED;
}
SFndLenMsg(siCfg->pdu, &msgLen);
if(0 == msgLen)
{
- RLOG_ARG0(L_ERROR,DBG_CELLID,cell->cellId, "Invalid pdu "
+ DU_LOG("\nERROR --> SCH : Invalid pdu "
"specified");
return RFAILED;
}
if((loadInfReq->rgrCcPHighStartRb >= cell->lteAdvCb.sfrCfg.cellEdgeRbRange.startRb) &&
(loadInfReq->rgrCcPHighStartRb <= cell->lteAdvCb.sfrCfg.cellEdgeRbRange.endRb))
{
- RLOG_ARG0(L_ERROR,DBG_CELLID,cell->cellId,"Invalid rgrCcPHighStartRb received specified");
+ DU_LOG("\nERROR --> SCH : Invalid rgrCcPHighStartRb received specified");
return RFAILED;
}
if((loadInfReq->rgrCcPHighEndRb >= cell->lteAdvCb.sfrCfg.cellEdgeRbRange.startRb) &&
(loadInfReq->rgrCcPHighEndRb <= cell->lteAdvCb.sfrCfg.cellEdgeRbRange.endRb))
{
- RLOG_ARG0(L_ERROR,DBG_CELLID,cell->cellId, "Invalid rgrCcPHighEndRb received specified");
+ DU_LOG("\nERROR --> SCH : Invalid rgrCcPHighEndRb received specified");
return RFAILED;
}
if ( ROK != rgSCHCfgVldtRgrTxmodePuschMode(cellCb, txMde,
puschMode, errInfo))
{
- RLOG_ARG1(L_ERROR,DBG_CELLID,cellCb->cellId,
- "Invalid Aperiodic CQI configuration CRNTI:%d",crnti);
+ DU_LOG("\nERROR --> SCH : Invalid Aperiodic CQI configuration CRNTI:%d",crnti);
return RFAILED;
}
}
if ( ROK != rgSCHCfgVldtRgrTxmodePucchMode(cellCb, txMde,
pucchMode, errInfo))
{
- RLOG_ARG1(L_ERROR,DBG_CELLID,cellCb->cellId,
- "Invalid Tx Mode-PUCCH Mode combination CRNTI:%d",crnti);
+ DU_LOG("\nERROR --> SCH : Invalid Tx Mode-PUCCH Mode combination CRNTI:%d",crnti);
return RFAILED;
}
}
((pucchMode == RGR_PRD_CQI_MOD20) ||
(pucchMode == RGR_PRD_CQI_MOD21)))
{
- RLOG_ARG1(L_ERROR,DBG_CELLID,cellCb->cellId,
- "Invalid Reporting Type-PUCCH Mode combination CRNTI:%d",crnti);
+ DU_LOG("\nERROR --> SCH : Invalid Reporting Type-PUCCH Mode combination CRNTI:%d",crnti);
return RFAILED;
}
((pucchMode == RGR_PRD_CQI_MOD10) ||
(pucchMode == RGR_PRD_CQI_MOD11)))
{
- RLOG_ARG1(L_ERROR,DBG_CELLID,cellCb->cellId,
- "Invalid Reporting Type-PUCCH Mode combination CRNTI:%d",crnti);
+ DU_LOG("\nERROR --> SCH : Invalid Reporting Type-PUCCH Mode combination CRNTI:%d",crnti);
return RFAILED;
}
/*TODO- To be compared with configured n2Pucch Index*/
if (cqiCfg->cqiSetup.cqiPResIdx > RG_SCH_PUCCH_RES_MAX_SUPP )
{
- RLOG_ARG3(L_ERROR,DBG_CELLID,cellCb->cellId,
- "Not Supported or Invalid CQI-PUCCH resourceIndex=%d Cfg Val=%d CRNTI:%d",
+ DU_LOG("\nERROR --> SCH : Not Supported or Invalid CQI-PUCCH resourceIndex=%d Cfg Val=%d CRNTI:%d",
RG_SCH_PUCCH_RES_MAX_SUPP, cqiCfg->type,crnti);
return RFAILED;
}
(cqiCfg->cqiSetup.cqiPCfgIdx < 7) ||
(cqiCfg->cqiSetup.cqiPCfgIdx == 317))
{
- RLOG_ARG4(L_ERROR,DBG_CELLID,cellCb->cellId,
- "Not Supported or Invalid Cfg CQI Min Index Sup =%d"
+ DU_LOG("\nERROR --> SCH : Not Supported or Invalid Cfg CQI Min Index Sup =%d"
"Max Index Sup=%d Cfg Val=%d CRNTI:%d", RG_SCH_ICQI_MIN_SUPP,
RG_SCH_ICQI_MAX_SUPP, cqiCfg->type,crnti);
return RFAILED;
if((cqiCfg->cqiSetup.cqiPCfgIdx > RG_SCH_ICQI_MAX_SUPP)||
(cqiCfg->cqiSetup.cqiPCfgIdx == 317))
{
- RLOG_ARG4(L_ERROR,DBG_CELLID,cellCb->cellId,
- "Not Supported or Invalid Cfg CQI Min Index Sup =%d "
+ DU_LOG("\nERROR --> SCH : Not Supported or Invalid Cfg CQI Min Index Sup =%d "
"Max Index Sup=%d Cfg Val=%d CRNTI:%d", RG_SCH_ICQI_MIN_SUPP,
RG_SCH_ICQI_MAX_SUPP, cqiCfg->type,crnti);
return RFAILED;
if((cqiCfg->cqiSetup.cqiPCfgIdx > RG_SCH_ICQI_MAX_SUPP)||
(cqiCfg->cqiSetup.cqiPCfgIdx == 317))
{
- RLOG_ARG4(L_ERROR,DBG_CELLID,cellCb->cellId,
- "Not Supported or Invalid Cfg CQI Min Index Sup =%d"
+ DU_LOG("\nERROR --> SCH : Not Supported or Invalid Cfg CQI Min Index Sup =%d"
"Max Index Sup=%d Cfg Val=%d CRNTI;%d", RG_SCH_ICQI_MIN_SUPP,
RG_SCH_ICQI_MAX_SUPP, cqiCfg->type,crnti);
return RFAILED;
if((cqiCfg->cqiSetup.cqiRepType < RGR_UE_PCQI_WB_REP) ||
(cqiCfg->cqiSetup.cqiRepType > RGR_UE_PCQI_SB_REP))
{
- RLOG_ARG2(L_ERROR,DBG_CELLID,cellCb->cellId,
- "Invalid Cfg CQI Report"
+ DU_LOG("\nERROR --> SCH : Invalid Cfg CQI Report"
"ModeCfg Val=%d CRNTI:%d", cqiCfg->type,crnti);
return RFAILED;
}
((cqiCfg->cqiSetup.k < RG_SCH_CQI_K_MIN) ||
(cqiCfg->cqiSetup.k > RG_SCH_CQI_K_MAX)))
{
- RLOG_ARG2(L_ERROR,DBG_CELLID,cellCb->cellId,
- "Invalid CQI Cfg K Cfg Val=%d CRNTI:%d", cqiCfg->type,crnti);
+ DU_LOG("\nERROR --> SCH : Invalid CQI Cfg K Cfg Val=%d CRNTI:%d", cqiCfg->type,crnti);
return RFAILED;
}
if((cqiCfg->cqiSetup.cqiRepType == RGR_UE_PCQI_SB_REP) &&
(cellCb->bwCfg.dlTotalBw <= 7))
{
- RLOG_ARG2(L_ERROR,DBG_CELLID,cellCb->cellId,
- "Invalid Periodic CQI mode Cfg for dlTotalBw (%d) for CRNTI:%d",
+ DU_LOG("\nERROR --> SCH : Invalid Periodic CQI mode Cfg for dlTotalBw (%d) for CRNTI:%d",
cellCb->bwCfg.dlTotalBw, crnti);
return RFAILED;
}
#ifndef LTE_TDD
if (cqiCfg->cqiSetup.cqiPCfgIdx == RG_SCH_ICQI_RESV_FDD )
{
- RLOG_ARG2(L_ERROR,DBG_CELLID,cellCb->cellId,
- "Reserved value Cfg =%d CRNTI:%d",
+ DU_LOG("\nERROR --> SCH : Reserved value Cfg =%d CRNTI:%d",
cqiCfg->cqiSetup.cqiPResIdx,crnti);
return RFAILED;
}
#endif
)
{
- RLOG_ARG2(L_ERROR,DBG_CELLID,cellCb->cellId,
- "Invalid Transmission Mode =%d CRNTI:%d",
+ DU_LOG("\nERROR --> SCH : Invalid Transmission Mode =%d CRNTI:%d",
txMde,crnti);
return RFAILED;
}
if(cqiCfg->cqiSetup.riCfgIdx > RG_SCH_IRI_MAX_SUPP)
{
- RLOG_ARG2(L_ERROR,DBG_CELLID,cellCb->cellId,
- "Invalid Index RI value Cfg =%d CRNTI:%d",
+ DU_LOG("\nERROR --> SCH : Invalid Index RI value Cfg =%d CRNTI:%d",
cqiCfg->cqiSetup.riCfgIdx,crnti);
- return RFAILED;
+ return RFAILED;
}
}
}
/*ccpu00130768 - ADD - if cell specific SRS is not configured*/
if(cellCb->srsCfg.isSrsCfgPres == FALSE)
{
- RLOG_ARG1(L_ERROR,DBG_CELLID,cellCb->cellId,
- "Cell specific SRS is not configured CRNTI:%d",crnti);
+ DU_LOG("\nERROR --> SCH : Cell specific SRS is not configured CRNTI:%d",crnti);
return RFAILED;
}
if ( (srsCfg->srsSetup.srsCfgIdx < 7) ||
(srsCfg->srsSetup.srsCfgIdx > RG_SCH_ISRS_MAX_SUPP) )
{
- RLOG_ARG4(L_ERROR,DBG_CELLID,cellCb->cellId,
- "Not Supported or Invalid Cfg "
+ DU_LOG("\nERROR --> SCH : Not Supported or Invalid Cfg "
"SRS Min Index Sup =%d Max Index Sup=%d Cfg Val=%d CRNTI:%d",
RG_SCH_ISRS_MIN_SUPP, RG_SCH_ISRS_MAX_SUPP,
srsCfg->srsSetup.srsCfgIdx,crnti);
{
if ( srsCfg->srsSetup.srsCfgIdx > RG_SCH_ISRS_MAX_SUPP )
{
- RLOG_ARG4(L_ERROR,DBG_CELLID,cellCb->cellId,
- "Not Supported or Invalid Cfg"
+ DU_LOG("\nERROR --> SCH : Not Supported or Invalid Cfg"
"SRS Min Index Sup =%d Max Index Sup=%d Cfg Val=%d CRNTI:%d",
RG_SCH_ISRS_MIN_SUPP, RG_SCH_ISRS_MAX_SUPP,
srsCfg->srsSetup.srsCfgIdx,crnti);
#else
if ( srsCfg->srsSetup.srsCfgIdx > RG_SCH_ISRS_MAX_SUPP )
{
- RLOG_ARG4(L_ERROR,DBG_CELLID,cellCb->cellId,
- "Not Supported or Invalid Cfg"
+ DU_LOG("\nERROR --> SCH : Not Supported or Invalid Cfg"
"SRS Min Index Sup =%d Max Index Sup=%d Cfg Val=%d CRNTI:%d",
RG_SCH_ISRS_MIN_SUPP, RG_SCH_ISRS_MAX_SUPP,
srsCfg->srsSetup.srsCfgIdx,crnti);
#else
if(rgSchFddCellSpSrsSubfrmTbl[cellCb->srsCfg.srsSubFrameCfg][srsSubframe] == FALSE) {
#endif
- RLOG_ARG2(L_ERROR,DBG_CELLID,cellCb->cellId,
- "UE specific SRS is not occuring in Cell specific SRS subframe"
+ DU_LOG("\nERROR --> SCH : UE specific SRS is not occuring in Cell specific SRS subframe"
"srs Cfg Idx =%d CRNTI:%d",
srsCfg->srsSetup.srsCfgIdx,crnti);
return RFAILED;
if ( srsCfg->srsSetup.fDomPosi > RG_SCH_SRS_FREQDOM_POS_MAX )
{
- RLOG_ARG4(L_ERROR,DBG_CELLID,cellCb->cellId,
- "Not Supported or Invalid Cfg"
+ DU_LOG("\nERROR --> SCH : Not Supported or Invalid Cfg"
"SRS Min Freq Domain Position =%d"
"Max Freq Domain Position =%d Cfg Val=%d CRNTI:%d",
RG_SCH_SRS_FREQDOM_POS_MIN, RG_SCH_SRS_FREQDOM_POS_MAX,
if ( srsCfg->srsSetup.txComb > RG_SCH_SRS_TXCOMB_MAX )
{
- RLOG_ARG4(L_ERROR,DBG_CELLID,cellCb->cellId,
- "Not Supported or Invalid Cfg"
+ DU_LOG("\nERROR --> SCH : Not Supported or Invalid Cfg"
"SRS Min TX Comb =%d Max TX Comb =%d Cfg Val=%d CRNTI:%d",
RG_SCH_SRS_TXCOMB_MIN, RG_SCH_SRS_TXCOMB_MAX,
srsCfg->srsSetup.srsCfgIdx,crnti);
( srCfg->srSetup.srCfgIdx < 5 ) ||
( srCfg->srSetup.srCfgIdx > RG_SCH_ISR_MAX_SUPP ))
{
- RLOG_ARG4(L_ERROR,DBG_CELLID,cellCb->cellId,
- "Invalid SR Index Cfg =%d"
+ DU_LOG("\nERROR --> SCH : Invalid SR Index Cfg =%d"
"Max Supp=%d,Min Supp=%d CRNTI:%d", srCfg->srSetup.srCfgIdx,
RG_SCH_ISR_MAX_SUPP, RG_SCH_ISR_MIN_SUPP,crnti);
if (( srCfg->srSetup.srResIdx > RG_SCH_SR_RES_IDX ) ||
( srCfg->srSetup.srCfgIdx > RG_SCH_ISR_MAX_SUPP ))
{
- RLOG_ARG4(L_ERROR,DBG_CELLID,cellCb->cellId,
- "Invalid SR Index Cfg =%d"
+ DU_LOG("\nERROR --> SCH : Invalid SR Index Cfg =%d"
"Max Supp=%d,Min Supp=%d CRNTI:%d", srCfg->srSetup.srCfgIdx,
RG_SCH_ISR_MAX_SUPP, RG_SCH_ISR_MIN_SUPP,crnti);
if (( srCfg->srSetup.srResIdx > RG_SCH_SR_RES_IDX ) ||
( srCfg->srSetup.srCfgIdx > RG_SCH_ISR_MAX_SUPP ))
{
- RLOG_ARG4(L_ERROR,DBG_CELLID,cellCb->cellId,
- "Invalid SR Index Cfg =%d"
+ DU_LOG("\nERROR --> SCH : Invalid SR Index Cfg =%d"
"Max Supp=%d,Min Supp=%d CRNTI:%d", srCfg->srSetup.srCfgIdx,
RG_SCH_ISR_MAX_SUPP, RG_SCH_ISR_MIN_SUPP,crnti);
if ( ROK != rgSCHCfgVldtRgrUeACqiCfg (cellCb, ueCfg->crnti,
&ueCfg->ueDlCqiCfg.aprdCqiCfg, ueCfg->txMode, errInfo ))
{
- RLOG_ARG1(L_ERROR,DBG_CELLID,cellCb->cellId,
- "Invalid Aperiodic CQI configuration CRNTI:%d",ueCfg->crnti);
+ DU_LOG("\nERROR --> SCH : Invalid Aperiodic CQI configuration CRNTI:%d",ueCfg->crnti);
return RFAILED;
}
&ueCfg->ueDlCqiCfg.prdCqiCfg, ueCfg->txMode, errInfo ))
#endif
{
- RLOG_ARG1(L_ERROR,DBG_CELLID,cellCb->cellId,
- "Invalid Periodic CQI configuration CRNTI:%d",ueCfg->crnti);
+ DU_LOG("\nERROR --> SCH : Invalid Periodic CQI configuration CRNTI:%d",ueCfg->crnti);
return RFAILED;
}
&ueCfg->srsCfg, errInfo ))
#endif
{
- RLOG_ARG1(L_ERROR,DBG_CELLID,cellCb->cellId,
- "Invalid SRS configuration CRNTI:%d",ueCfg->crnti);
+ DU_LOG("\nERROR --> SCH : Invalid SRS configuration CRNTI:%d",ueCfg->crnti);
return RFAILED;
}
&ueCfg->srCfg, errInfo))
#endif
{
- RLOG_ARG1(L_ERROR,DBG_CELLID,cellCb->cellId,
- "Invalid SR configuration CRNTI:%d",ueCfg->crnti);
+ DU_LOG("\nERROR --> SCH : Invalid SR configuration CRNTI:%d",ueCfg->crnti);
return RFAILED;
}
if ( ROK != rgSCHCfgVldtRgrUeACqiCfg (cellCb, ueReCfg->oldCrnti,
&ueReCfg->aprdDlCqiRecfg, txMode, errInfo ))
{
- RLOG_ARG1(L_ERROR,DBG_CELLID,cellCb->cellId,
- "Invalid Aperiodic CQI configuration OLD CRNTI:%d",ueReCfg->oldCrnti);
+ DU_LOG("\nERROR --> SCH : Invalid Aperiodic CQI configuration OLD CRNTI:%d",ueReCfg->oldCrnti);
return RFAILED;
}
}
#endif
{
- RLOG_ARG1(L_ERROR,DBG_CELLID,cellCb->cellId,
- "Invalid Periodic CQI configuration OLD CRNTI:%d",ueReCfg->oldCrnti);
+ DU_LOG("\nERROR --> SCH : Invalid Periodic CQI configuration OLD CRNTI:%d",ueReCfg->oldCrnti);
return RFAILED;
}
}
&ueReCfg->srsCfg, errInfo ))
#endif
{
- RLOG_ARG1(L_ERROR,DBG_CELLID,cellCb->cellId,
- "Invalid SRS configuration OLD CRNTI:%d",ueReCfg->oldCrnti);
+ DU_LOG("\nERROR --> SCH : Invalid SRS configuration OLD CRNTI:%d",ueReCfg->oldCrnti);
return RFAILED;
}
&ueReCfg->srCfg, errInfo))
#endif
{
- RLOG_ARG1(L_ERROR,DBG_CELLID,cellCb->cellId,
- "Invalid SR configuration OLD CRNTI:%d",ueReCfg->oldCrnti);
+ DU_LOG("\nERROR --> SCH : Invalid SR configuration OLD CRNTI:%d",ueReCfg->oldCrnti);
return RFAILED;
}
}
cqiCfg->cqiSetup.cqiPCfgIdx,
&cqiCb->cqiPeri, &cqiCb->cqiOffset);
#endif
- RLOG_ARG3(L_DEBUG,DBG_CELLID,cellCb->cellId,
- "rgSCHCfgPCqiUeCfg(): UEID:%d CQI Peri=%d, CQI Offset=%d",
+ DU_LOG("\nDEBUG --> SCH : rgSCHCfgPCqiUeCfg(): UEID:%d CQI Peri=%d, CQI Offset=%d",
ueCb->ueId,
cqiCb->cqiPeri,
cqiCb->cqiOffset);
cqiCfg->cqiSetup.riCfgIdx,
&cqiCb->riPeri, &cqiCb->riOffset);
- RLOG_ARG3(L_DEBUG,DBG_CELLID,cellCb->cellId,
- "rgSCHCfgRiUeCfg(): RI Peri=%d, RI Offset=%d UEID:%d",
+ DU_LOG("\nDEBUG --> SCH : rgSCHCfgRiUeCfg(): RI Peri=%d, RI Offset=%d UEID:%d",
cqiCb->riPeri, cqiCb->riOffset,ueCb->ueId);
cqiCb->perRiVal = 1;
periodicity = cqiCb->cqiOffset - cqiCb->riOffset +
RGSCH_MAX_SUBFRM_5G - (crntTime);
tempIdx = crntTime + periodicity;
- printf("CHECK_SID - periodicity %d tempIdx %d\n", periodicity, tempIdx);
+ DU_LOG("\nINFO --> SCH : CHECK_SID - periodicity %d tempIdx %d\n", periodicity, tempIdx);
}
else
{
&ueCb->srsCb.peri, &ueCb->srsCb.offset);
#endif
- RLOG_ARG3(L_DEBUG,DBG_CELLID,cellCb->cellId,
- "rgSCHCfgSrsUeCfg(): SRS Peri=%d, SRS Offset=%d UEID:%d",
+ DU_LOG("\nDEBUG --> SCH : rgSCHCfgSrsUeCfg(): SRS Peri=%d, SRS Offset=%d UEID:%d",
ueCb->srsCb.peri,ueCb->srsCb.offset,ueCb->ueId);
/* 3. Compute next Tranmission index for SRS */
srCfg->srSetup.srCfgIdx,
&ueCb->srCb.peri, &ueCb->srCb.offset);
- RLOG_ARG4(L_DEBUG,DBG_CELLID,cellCb->cellId ,
- "SR Config: idx(%u), period (%u) offset (%u) UEID:%d",
+ DU_LOG("\nDEBUG --> SCH : SR Config: idx(%u), period (%u) offset (%u) UEID:%d",
srCfg->srSetup.srCfgIdx,
ueCb->srCb.peri,
ueCb->srCb.offset,
if ( ueDrxCfg->cqiMask.val != RGR_DRX_SETUP )
{
#ifdef ALIGN_64BIT
- RLOG_ARG1(L_ERROR,DBG_CELLID,cell->cellId,"Invalid cqiMask configuration (%d)",
+ DU_LOG("\nERROR --> SCH : Invalid cqiMask configuration (%d)",
ueDrxCfg->cqiMask.val);
#else
- RLOG_ARG1(L_ERROR,DBG_CELLID,cell->cellId,"Invalid cqiMask configuration(%ld)",
+ DU_LOG("\nERROR --> SCH : Invalid cqiMask configuration(%ld)",
ueDrxCfg->cqiMask.val);
#endif
return RFAILED;
{
if ( rgSCHEmtcCfgVldtDrxOnDurCfg(ueDrxCfg->drxOnDurTmr) != ROK )
{
- RLOG_ARG1(L_ERROR,DBG_CELLID,cell->cellId,"Invalid onDurTimer configuration(%d)",
+ DU_LOG("\nERROR --> SCH : Invalid onDurTimer configuration(%d)",
ueDrxCfg->drxOnDurTmr);
return RFAILED;
}
{
if (rgSCHCfgVldtDrxOnDurCfg(ueDrxCfg->drxOnDurTmr) != ROK )
{
- RLOG_ARG1(L_ERROR,DBG_CELLID,cell->cellId,"Invalid onDurTimer configuration(%d) for EMTC",
+ DU_LOG("\nERROR --> SCH : Invalid onDurTimer configuration(%d) for EMTC",
ueDrxCfg->drxOnDurTmr);
return RFAILED;
}
{
if ( rgSCHCfgVldtDrxOnDurCfg(ueDrxCfg->drxOnDurTmr) != ROK )
{
- RLOG_ARG1(L_ERROR,DBG_CELLID,cell->cellId,"Invalid onDurTimer configuration(%d) for EMTC",
+ DU_LOG("\nERROR --> SCH : Invalid onDurTimer configuration(%d) for EMTC",
ueDrxCfg->drxOnDurTmr);
return RFAILED;
}
if ( rgSCHCfgVldtDrxInActvCfg(ueDrxCfg->drxInactvTmr) != ROK )
{
- RLOG_ARG1(L_ERROR,DBG_CELLID,cell->cellId,"Invalid Inactivity configuration(%d)",
+ DU_LOG("\nERROR --> SCH : Invalid Inactivity configuration(%d)",
ueDrxCfg->drxInactvTmr);
return RFAILED;
}
{
if ( rgSCHEmtcCfgVldtDrxReTxCfg(ueDrxCfg->drxRetxTmr) != ROK )
{
- RLOG_ARG1(L_ERROR,DBG_CELLID,cell->cellId,"Invalid DrxReTX configuration(%d) for EMTC",
+ DU_LOG("\nERROR --> SCH : Invalid DrxReTX configuration(%d) for EMTC",
ueDrxCfg->drxRetxTmr);
return RFAILED;
}
{
if (rgSCHCfgVldtDrxReTxCfg(ueDrxCfg->drxRetxTmr) != ROK )
{
- RLOG_ARG1(L_ERROR,DBG_CELLID,cell->cellId,"Invalid DrxReTX configuration(%d)",
+ DU_LOG("\nERROR --> SCH : Invalid DrxReTX configuration(%d)",
ueDrxCfg->drxRetxTmr);
return RFAILED;
}
{
if ( rgSCHCfgVldtDrxReTxCfg(ueDrxCfg->drxRetxTmr) != ROK )
{
- RLOG_ARG1(L_ERROR,DBG_CELLID,cell->cellId,"Invalid DrxReTX configuration(%d)",
+ DU_LOG("\nERROR --> SCH : Invalid DrxReTX configuration(%d)",
ueDrxCfg->drxRetxTmr);
return RFAILED;
}
{
if ( rgSCHEmtcCfgVldtDrxUlReTxCfg(ueDrxCfg->emtcDrxUlRetxTmr) != ROK )
{
- RLOG_ARG1(L_ERROR,DBG_CELLID,cell->cellId,"Invalid DrxReTX configuration(%d) for EMTC",
+ DU_LOG("\nERROR --> SCH : Invalid DrxReTX configuration(%d) for EMTC",
ueDrxCfg->drxRetxTmr);
return RFAILED;
}
if ( rgSCHCfgVldtDrxLngCycCfg(ueDrxCfg->drxLongCycleOffst) != ROK )
{
- RLOG_ARG0(L_ERROR,DBG_CELLID,cell->cellId,"Invalid LongCycle configuration");
+ DU_LOG("\nERROR --> SCH : Invalid LongCycle configuration");
return RFAILED;
}
if ( ueDrxCfg->drxLongCycleOffst.longDrxCycle < ueDrxCfg->drxOnDurTmr )
{
- RLOG_ARG0(L_ERROR,DBG_CELLID,cell->cellId,"Invalid combination of Long DRX Cycle "
+ DU_LOG("\nERROR --> SCH : Invalid combination of Long DRX Cycle "
" and onDuration timer values");
return RFAILED;
}
if( rgSCHCfgVldtTddDrxCycCfg(cell, ueDrxCfg->drxLongCycleOffst.longDrxCycle,
ueDrxCfg->drxOnDurTmr, ueDrxCfg->drxLongCycleOffst.drxStartOffst) != ROK)
{
- RLOG_ARG0(L_ERROR,DBG_CELLID,cell->cellId,"Invalid combination of Long DRX Cycle "
+ DU_LOG("\nERROR --> SCH : Invalid combination of Long DRX Cycle "
" and onDuration timer values");
return RFAILED;
}
{
if ( ueDrxCfg->drxShortDrx.shortDrxCycle < ueDrxCfg->drxOnDurTmr )
{
- RLOG_ARG0(L_ERROR,DBG_CELLID,cell->cellId,"Invalid combination of short DRX "
+ DU_LOG("\nERROR --> SCH : Invalid combination of short DRX "
"Cycle and onDuration timer values");
return RFAILED;
}
if ( (ueDrxCfg->drxLongCycleOffst.longDrxCycle %
ueDrxCfg->drxShortDrx.shortDrxCycle) != 0)
{
- RLOG_ARG0(L_ERROR,DBG_CELLID,cell->cellId," Long DRX cycle is not multiple of "
+ DU_LOG("\nERROR --> SCH : Long DRX cycle is not multiple of "
"short DRX cycle");
return RFAILED;
}
if ( rgSCHCfgVldtDrxShrtCycCfg(ueDrxCfg->drxShortDrx) != ROK )
{
- RLOG_ARG0(L_ERROR,DBG_CELLID,cell->cellId,"Invalid Short Cycle configuration");
+ DU_LOG("\nERROR --> SCH : Invalid Short Cycle configuration");
return RFAILED;
}
ueDrxCfg->drxLongCycleOffst.drxStartOffst %
ueDrxCfg->drxShortDrx.shortDrxCycle) != ROK)
{
- RLOG_ARG0(L_ERROR,DBG_CELLID,cell->cellId,"Invalid combination of Long DRX Cycle "
+ DU_LOG("\nERROR --> SCH : Invalid combination of Long DRX Cycle "
" and onDuration timer values");
return RFAILED;
}
sizeof(RgrStaIndInfo));
if(retVal != ROK)
{
- RLOG_ARG1(L_ERROR,DBG_CELLID,cell->cellId,
- "Could not allocate memory for sending StaInd OLD CRNTI:%d",ueRecfg->oldCrnti);
+ DU_LOG("\nERROR --> SCH : Could not allocate memory for sending StaInd OLD CRNTI:%d",ueRecfg->oldCrnti);
return (retVal);
}
@brief This file implements the schedulers main access to MAC layer code.
*/
-static const char* RLOG_MODULE_NAME="MAC";
-static int RLOG_FILE_ID=187;
-static int RLOG_MODULE_ID=4096;
/* header include files -- defines (.h) */
#include "common_def.h"
if (allocInfo->ccchSduAlloc.ccchSduDlSf->bw <=
allocInfo->ccchSduAlloc.ccchSduDlSf->bwAssigned)
{
- RLOG_ARG1(L_ERROR,DBG_CELLID,cell->cellId,
- "bw<=bwAssigned for UEID:%d",ueCb->ueId);
+ DU_LOG("\nERROR --> SCH : bw<=bwAssigned for UEID:%d",ueCb->ueId);
return RFAILED;
}
if (rgSCHDhmGetCcchSduHqProc(ueCb, cellSch->dl.time, &(ueDl->proc)) != ROK)
{
- RLOG_ARG1(L_ERROR,DBG_CELLID,cell->cellId,
- "rgSCHDhmGetCcchSduHqProc failed UEID:%d",ueCb->ueId);
+ DU_LOG("\nERROR --> SCH : rgSCHDhmGetCcchSduHqProc failed UEID:%d",ueCb->ueId);
return RFAILED;
}
{
/* Fix : syed Minor failure handling, release hqP if Unsuccessful */
rgSCHDhmRlsHqpTb(ueDl->proc, 0, FALSE);
- RLOG_ARG1(L_ERROR,DBG_CELLID,cell->cellId,
- "rgSCHCmnCcchSduDedAlloc failed UEID:%d",ueCb->ueId);
+ DU_LOG("\nERROR --> SCH : rgSCHCmnCcchSduDedAlloc failed UEID:%d",ueCb->ueId);
return RFAILED;
}
cmLListAdd2Tail(&allocInfo->ccchSduAlloc.ccchSduTxLst, &ueDl->proc->reqLnk);
}
else
{
- RLOG_ARG1(L_ERROR,DBG_CELLID,cell->cellId,"ERROR!! THIS SHOULD "
+ DU_LOG("\nERROR --> SCH : THIS SHOULD "
"NEVER HAPPEN for UEID:%d", ueCb->ueId);
continue;
}
#if (ERRCLASS & ERRCLS_DEBUG)
if (bch == NULLP)
{
- RLOG_ARG0(L_ERROR,DBG_CELLID,cell->cellId,"BCCH on BCH is not configured");
+ DU_LOG("\nERROR --> SCH : BCCH on BCH is not configured");
return;
}
#endif
#if (ERRCLASS & ERRCLS_DEBUG)
if (bcch == NULLP)
{
- RLOG_ARG0(L_ERROR,DBG_CELLID,cell->cellId,"BCCH on DLSCH is not configured");
+ DU_LOG("\nERROR --> SCH : BCCH on DLSCH is not configured");
return;
}
#endif
#if (ERRCLASS & ERRCLS_DEBUG)
if (bcch == NULLP)
{
- RLOG_ARG0(L_ERROR,DBG_CELLID,cell->cellId,"BCCH on DLSCH is not configured");
+ DU_LOG("\nERROR --> SCH : BCCH on DLSCH is not configured");
return;
}
#endif
#ifdef ERRCLS_KW
if (pcch == NULLP)
{
- RLOG_ARG0(L_ERROR,DBG_CELLID,cell->cellId,"PCCH on DLSCH is not configured");
+ DU_LOG("\nERROR --> SCH : PCCH on DLSCH is not configured");
return;
}
#endif
* exceeds the available */
if (rb > sf->bw - sf->bwAssigned)
{
- RLOG_ARG1(L_ERROR,DBG_CELLID,cell->cellId,"BW allocation "
+ DU_LOG("\nERROR --> SCH : BW allocation "
"failed for CRNTI:%d",rnti);
return;
}
/* PDCCH Allocation Failed, Mark cceFailure flag as TRUE */
subFrm->isCceFailure = TRUE;
-
- RLOG_ARG1(L_DEBUG,DBG_CELLID,cell->cellId,
- "PDCCH ERR: NO PDDCH AVAIL IN COMMON SEARCH SPACE aggr:%u",
+ DU_LOG("\nDEBUG --> SCH : PDCCH ERR: NO PDDCH AVAIL IN COMMON SEARCH SPACE aggr:%u",
aggrLvl);
return (NULLP);
}
if (allocInfo->msg4Alloc.msg4DlSf->bw <=
allocInfo->msg4Alloc.msg4DlSf->bwAssigned)
{
- RLOG_ARG0(L_ERROR,DBG_CELLID,cell->cellId ,
- "bw<=bwAssigned");
+ DU_LOG("\nERROR --> SCH : bw<=bwAssigned");
return RFAILED;
}
if (rgSCHDhmGetMsg4HqProc(raCb, cellSch->dl.time) != ROK)
{
- RLOG_ARG0(L_ERROR,DBG_CELLID,cell->cellId,
- "rgSCHDhmGetMsg4HqProc failed");
+ DU_LOG("\nERROR --> SCH : rgSCHDhmGetMsg4HqProc failed");
return RFAILED;
}
{
/* Fix : syed Minor failure handling, release hqP if Unsuccessful */
rgSCHDhmRlsHqpTb(raCb->dlHqE->msg4Proc, 0, FALSE);
- RLOG_ARG0(L_ERROR,DBG_CELLID,cell->cellId,
- "rgSCHCmnMsg4DedAlloc failed.");
+ DU_LOG("\nERROR --> SCH : rgSCHCmnMsg4DedAlloc failed.");
return RFAILED;
}
cmLListAdd2Tail(&allocInfo->msg4Alloc.msg4TxLst, &raCb->dlHqE->msg4Proc->reqLnk);
{
/* PDCCH Allocation Failed, Mark cceFailure flag as TRUE */
subFrm->isCceFailure = TRUE;
- RLOG_ARG1(L_DEBUG,DBG_CELLID,cell->cellId,
- "PDCCH ERR: NO PDDCH AVAIL IN UE SEARCH SPACE :aggr(%u)",
+ DU_LOG("\nDEBUG --> SCH : PDCCH ERR: NO PDDCH AVAIL IN UE SEARCH SPACE :aggr(%u)",
aggrLvl);
return (NULLP);
/* PDCCH Allocation Failed, Mark cceFailure flag as TRUE */
subFrm->isCceFailure = TRUE;
- RLOG_ARG1(L_DEBUG,DBG_CELLID,cell->cellId,
- "PDCCH ERR: NO PDDCH AVAIL IN UE SEARCH SPACE :aggr(%u)",
+ DU_LOG("\nDEBUG --> SCH : PDCCH ERR: NO PDDCH AVAIL IN UE SEARCH SPACE :aggr(%u)",
aggrLvl);
return (NULLP);
}
if (subFrm->bw == subFrm->bwAssigned)
{
- RLOG_ARG1(L_ERROR,DBG_CELLID,cell->cellId,
- "bw == bwAssigned RARNTI:%d",rarnti);
+ DU_LOG("\nERROR --> SCH : bw == bwAssigned RARNTI:%d",rarnti);
return RFAILED;
}
reqLst = &cell->raInfo.raReqLst[raIndex];
if (reqLst->count == 0)
{
- RLOG_ARG1(L_ERROR,DBG_CELLID,cell->cellId,
- "reqLst Count=0 RARNTI:%d",rarnti);
+ DU_LOG("\nERROR --> SCH : reqLst Count=0 RARNTI:%d",rarnti);
return RFAILED;
}
remNumRapid = reqLst->count;
/* Allocation succeeded for 'remNumRapid' */
isAlloc = TRUE;
tbs = allwdTbSz/8;
- printf("\n!!!RAR alloc noBytes:%u,allwdTbSz:%u,tbs:%u,rb:%u\n",
+ DU_LOG("\nINFO --> SCH : RAR alloc noBytes:%u,allwdTbSz:%u,tbs:%u,rb:%u\n",
noBytes,allwdTbSz,tbs,rb);
break;
}
if (!isAlloc)
{
- RLOG_ARG0(L_INFO,DBG_CELLID,cell->cellId,"BW alloc Failed");
+ DU_LOG("\nERROR --> SCH : BW alloc Failed");
return RFAILED;
}
}
else
{
- RLOG_ARG1(L_ERROR,DBG_CELLID,cell->cellId,
- "Error! holeDb sanity check failed RNTI:%d",rnti);
+ DU_LOG("\nERROR --> SCH : holeDb sanity check failed RNTI:%d",rnti);
}
}
if (numSb <= hole->num)
alloc->forMsg3 = TRUE;
alloc->hqProc = hqProc;
rgSCHUhmNewTx(hqProc, (uint8_t)(cell->rachCfg.maxMsg3Tx - 1), alloc);
- //RLOG_ARG4(L_DEBUG,DBG_CELLID,cell->cellId,
- printf(
- "\nRNTI:%d MSG3 ALLOC proc(%lu)procId(%d)schdIdx(%d)\n",
+ DU_LOG("\nDEBUG --> SCH : RNTI:%d MSG3 ALLOC proc(%lu)procId(%d)schdIdx(%d)\n",
alloc->rnti,
((PTR)alloc->hqProc),
alloc->hqProc->procId,
alloc->hqProc->ulSfIdx);
- RLOG_ARG2(L_DEBUG,DBG_CELLID,cell->cellId,
- "alloc(%p)maxMsg3Tx(%d)",
- ((PTR)alloc),
+ DU_LOG("\nDEBUG --> SCH : alloc(%p)maxMsg3Tx(%d)",
+ ((void *)alloc),
cell->rachCfg.maxMsg3Tx);
}
}
#ifdef RG_5GTF
ue->ue5gtfCb.mcs = ueDl->mimoInfo.cwInfo[cwIdx].iTbs[0];
/*
- printf("reportediTbs[%d] cqiBasediTbs[%d] deltaiTbs[%d] iTbsNew[%d] mcs[%d] cwIdx[%d]\n",
+ DU_LOG("\nINFO --> SCH : reportediTbs[%d] cqiBasediTbs[%d] deltaiTbs[%d] iTbsNew[%d] mcs[%d] cwIdx[%d]\n",
reportediTbs, ueDl->laCb[cwIdx].cqiBasediTbs, ueDl->laCb[cwIdx].deltaiTbs,
iTbsNew, ue->ue5gtfCb.mcs, cwIdx);
*/
case TFU_DCI_FORMAT_B2:
{
- //printf(" RG_5GTF:: Pdcch filling with DCI format B2\n");
+ //DU_LOG("\nINFO --> SCH : RG_5GTF:: Pdcch filling with DCI format B2\n");
/* ToDo: Anoop */
break; /* case TFU_DCI_FORMAT_B2: */
}
#endif
break;
default:
- RLOG_ARG1(L_ERROR,DBG_CELLID,cell->cellId,"Allocator's icorrect "
+ DU_LOG("\nERROR --> SCH : Allocator's icorrect "
"dciForamt Fill RNTI:%d",rbAllocInfo->rnti);
break;
}
rgSCHCmnFillHqPTb(cell, rbAllocInfo, 0, pdcch);
//Currently hardcoding values here.
- //printf("Filling 5GTF UL DCI for rnti %d \n",alloc->rnti);
+ //DU_LOG("\nINFO --> SCH : Filling 5GTF UL DCI for rnti %d \n",alloc->rnti);
switch(rbAllocInfo->dciFormat)
{
case TFU_DCI_FORMAT_B1:
break;
}
default:
- RLOG_ARG1(L_ERROR,DBG_CELLID,cell->cellId," 5GTF_ERROR Allocator's icorrect "
+ DU_LOG("\nERROR --> SCH : 5GTF_ERROR Allocator's incorrect "
"dciForamt Fill RNTI:%d",rbAllocInfo->rnti);
break;
}
addedForScell += (rbAllocInfo->tbInfo[0].bytesAlloc << 3);
addedForScell1 += (rbAllocInfo->tbInfo[0].bytesAlloc << 3);
/*
- printf (" Hqp %d cell %d addedForScell %lu addedForScell1 %lu sfn:sf %d:%d \n",
+ DU_LOG("\nINFO --> SCH : Hqp %d cell %d addedForScell %lu addedForScell1 %lu sfn:sf %d:%d \n",
hqP->procId,
hqP->hqE->cell->cellId,
addedForScell,
addedForScell += (rbAllocInfo->tbInfo[1].bytesAlloc << 3);
addedForScell2 += (rbAllocInfo->tbInfo[1].bytesAlloc << 3);
/*
- printf (" Hqp %d cell %d addedForScell %lu addedForScell2 %lu \n",
+ DU_LOG("\nINFO --> SCH : Hqp %d cell %d addedForScell %lu addedForScell2 %lu \n",
hqP->procId,
hqP->hqE->cell->cellId,
addedForScell,
(rbAllocInfo->tbInfo[1].bytesAlloc << 3);
}
/*
- printf ("add DL TPT is %lu sfn:sf %d:%d \n", hqP->hqE->ue->tenbStats->stats.nonPersistent.sch[RG_SCH_CELLINDEX(hqP->hqE->cell)].dlTpt ,
+ DU_LOG("\nINFO --> SCH : add DL TPT is %lu sfn:sf %d:%d \n", hqP->hqE->ue->tenbStats->stats.nonPersistent.sch[RG_SCH_CELLINDEX(hqP->hqE->cell)].dlTpt ,
cell->crntTime.sfn,
cell->crntTime.slot);
*/
case TFU_DCI_FORMAT_B1:
case TFU_DCI_FORMAT_B2:
{
- // printf(" RG_5GTF:: Pdcch filling with DCI format B1/B2\n");
+ // DU_LOG("\nINFO --> SCH : RG_5GTF:: Pdcch filling with DCI format B1/B2\n");
rgSCHCmnFillHqPPdcchDciFrmtB1B2(cell, rbAllocInfo, hqP, \
pdcch, tpc);
break;
}
#endif
default:
- RLOG_ARG1(L_ERROR,DBG_CELLID,cell->cellId,
- "Allocator's incorrect dciForamt Fill for RNTI:%d",rbAllocInfo->rnti);
+ DU_LOG("\nERROR --> SCH : Allocator's incorrect dciForamt Fill for RNTI:%d",rbAllocInfo->rnti);
break;
}
return;
{
/* Fixing DAI value - ccpu00109162 */
pdcch->dci.u.format1aInfo.t.pdschInfo.dai.val = RG_SCH_MAX_DAI_IDX;
- RLOG_ARG1(L_ERROR,DBG_CELLID,cell->cellId,
- "PDCCH is been scheduled without updating anInfo RNTI:%d",
+ DU_LOG("\nERROR --> SCH : PDCCH is been scheduled without updating anInfo RNTI:%d",
rbAllocInfo->rnti);
}
#endif
else
{
pdcch->dci.u.format1bInfo.dai = RG_SCH_MAX_DAI_IDX;
- RLOG_ARG1(L_ERROR,DBG_CELLID,cell->cellId,
- "PDCCH is been scheduled without updating anInfo RNTI:%d",
+ DU_LOG("\nERROR --> SCH : PDCCH is been scheduled without updating anInfo RNTI:%d",
rbAllocInfo->rnti);
}
#endif
else
{
pdcch->dci.u.format2Info.dai = RG_SCH_MAX_DAI_IDX;
- RLOG_ARG1(L_ERROR,DBG_CELLID,cell->cellId,
- "PDCCH is been scheduled without updating anInfo RNTI:%d",
+ DU_LOG("\nERROR --> SCH : PDCCH is been scheduled without updating anInfo RNTI:%d",
rbAllocInfo->rnti);
}
#endif
else
{
pdcch->dci.u.format2AInfo.dai = RG_SCH_MAX_DAI_IDX;
- RLOG_ARG1(L_ERROR,DBG_CELLID,cell->cellId,
- "PDCCH is been scheduled without updating anInfo RNTI:%d",
+ DU_LOG("\nERROR --> SCH : PDCCH is been scheduled without updating anInfo RNTI:%d",
rbAllocInfo->rnti);
}
#endif
idx = (cell->crntTime.sfn * RGSCH_NUM_SUB_FRAMES_5G + cell->crntTime.slot);
cellUl->idx = ((idx) % (RG_SCH_CMN_UL_NUM_SF));
#ifdef UL_ADPT_DBG
- printf("idx %d cellUl->idx %d RGSCH_NUM_SUB_FRAMES_5G %d time(%d %d) \n",idx,cellUl->idx ,RGSCH_NUM_SUB_FRAMES_5G,cell->crntTime.sfn,cell->crntTime.slot);
+ DU_LOG("\nDEBUG --> SCH : idx %d cellUl->idx %d RGSCH_NUM_SUB_FRAMES_5G %d time(%d %d) \n",idx,cellUl->idx ,RGSCH_NUM_SUB_FRAMES_5G,cell->crntTime.sfn,cell->crntTime.slot);
#endif
/* Need to scheduler for after SCHED_DELTA */
/* UL allocation has been advanced by 1 subframe
/* take care of getting the correct subframe for feedback */
idx = (cellUl->idx - TFU_CRCIND_ULDELTA + RG_SCH_CMN_UL_NUM_SF);
#ifdef UL_ADPT_DBG
- printf("Finally setting cellUl->hqFdbkIdx[0] = %d TFU_CRCIND_ULDELTA %d RG_SCH_CMN_UL_NUM_SF %d\n",idx,TFU_CRCIND_ULDELTA,RG_SCH_CMN_UL_NUM_SF);
+ DU_LOG("\nDEBUG --> SCH : Finally setting cellUl->hqFdbkIdx[0] = %d TFU_CRCIND_ULDELTA %d RG_SCH_CMN_UL_NUM_SF %d\n",idx,TFU_CRCIND_ULDELTA,RG_SCH_CMN_UL_NUM_SF);
#endif
cellUl->hqFdbkIdx[0] = (idx % (RG_SCH_CMN_UL_NUM_SF));
cellUl->reTxIdx[0] = (uint8_t) idx;
#ifdef UL_ADPT_DBG
- printf("cellUl->hqFdbkIdx[0] %d cellUl->reTxIdx[0] %d \n",cellUl->hqFdbkIdx[0], cellUl->reTxIdx[0] );
+ DU_LOG("\nDEBUG --> SCH : cellUl->hqFdbkIdx[0] %d cellUl->reTxIdx[0] %d \n",cellUl->hqFdbkIdx[0], cellUl->reTxIdx[0] );
#endif
/* RACHO: update cmn sched specific RACH variables,
* mainly the prachMaskIndex */
pdcch->dci.dciFormat = alloc->grnt.dciFrmt;
//Currently hardcoding values here.
- //printf("Filling 5GTF UL DCI for rnti %d \n",alloc->rnti);
+ //DU_LOG("\nINFO --> SCH : Filling 5GTF UL DCI for rnti %d \n",alloc->rnti);
switch(pdcch->dci.dciFormat)
{
case TFU_DCI_FORMAT_A1:
break;
}
default:
- RLOG1(L_ERROR," 5GTF_ERROR UL Allocator's icorrect "
+ DU_LOG("\nERROR --> SCH : 5GTF_ERROR UL Allocator's icorrect "
"dciForamt Fill RNTI:%d",alloc->rnti);
break;
}
static uint8_t rgSCHCmnGetRefreshDist(RgSchCellCb *cell,RgSchUeCb *ue)
{
uint8_t refOffst;
-#ifdef DEBUGP
- Inst inst = cell->instIdx;
-#endif
for(refOffst = 0; refOffst < RGSCH_MAX_REFRESH_OFFSET; refOffst++)
{
{
cell->refreshUeCnt[refOffst]++;
ue->refreshOffset = refOffst;
- /* printf("UE[%d] refresh offset[%d]. Cell refresh ue count[%d].\n", ue->ueId, refOffst, cell->refreshUeCnt[refOffst]); */
+ /* DU_LOG("\nINFO --> SCH : UE[%d] refresh offset[%d]. Cell refresh ue count[%d].\n", ue->ueId, refOffst, cell->refreshUeCnt[refOffst]); */
return (refOffst);
}
}
- RGSCHDBGERRNEW(inst, (rgSchPBuf(inst), "Allocation of refresh distribution failed\n"));
+ DU_LOG("\nERROR --> SCH : Allocation of refresh distribution failed\n");
/* We should not enter here normally, but incase of failure, allocating from last offset*/
cell->refreshUeCnt[refOffst-1]++;
ue->refreshOffset = refOffst-1;
if((rgSCHUtlAllocSBuf(sCell->instIdx,
(Data**)&(((ue->cellInfo[ue->cellIdToCellIdxMap[idx]])->sch)), (sizeof(RgSchCmnUe))) != ROK))
{
- RGSCHDBGERRNEW(inst, (rgSchPBuf(inst), "Memory allocation FAILED\n"));
+ DU_LOG("\nERROR --> SCH : Memory allocation FAILED\n");
err->errCause = RGSCHERR_SCH_CFG;
return RFAILED;
}
if ((cellSchd->apisDl->rgSCHRgrSCellDlUeCfg(sCell, ue, err)) != ROK)
{
- RGSCHDBGERRNEW(inst, (rgSchPBuf(inst), "Spec Sched DL UE CFG FAILED\n"));
+ DU_LOG("\nERROR --> SCH : Spec Sched DL UE CFG FAILED\n");
return RFAILED;
}
{
if ((cellSchd->apisDlfs->rgSCHDlfsSCellUeCfg(sCell, ue, sCellInfoCfg, err)) != ROK)
{
- RGSCHDBGERRNEW(inst, (rgSchPBuf(inst), "DLFS UE config FAILED\n"));
+ DU_LOG("\nERROR --> SCH : DLFS UE config FAILED\n");
return RFAILED;
}
}
ret = rgSCHUhmHqEntInit(sCell, ue);
if (ret != ROK)
{
- RLOG_ARG1(L_ERROR,DBG_CELLID,sCell->cellId,"SCELL UHM HARQ Ent Init "
+ DU_LOG("\nERROR --> SCH : SCELL UHM HARQ Ent Init "
"Failed for CRNTI:%d", ue->ueId);
return RFAILED;
}
if((rgSCHUtlAllocSBuf(sCell->instIdx,
(Data**)&(allRcd),sizeof(RgSchCmnAllocRecord)) != ROK))
{
- RLOG_ARG1(L_ERROR,DBG_CELLID,sCell->cellId,"SCELL Memory allocation FAILED"
+ DU_LOG("\nERROR --> SCH : SCELL Memory allocation FAILED"
"for CRNTI:%d",ue->ueId);
err->errCause = RGSCHERR_SCH_CFG;
return RFAILED;
ret = rgSCHPwrUeSCellCfg(sCell, ue, sCellInfoCfg);
if (ret != ROK)
{
- RLOG_ARG1(L_ERROR,DBG_CELLID,sCell->cellId, "Could not do "
+ DU_LOG("\nERROR --> SCH : Could not do "
"power config for UE CRNTI:%d",ue->ueId);
return RFAILED;
}
{
if ((cellSchd->apisEmtcUl->rgSCHRgrUlUeCfg(sCell, ue, NULL, err)) != ROK)
{
- RLOG_ARG1(L_ERROR,DBG_CELLID,sCell->cellId, "Spec Sched UL UE CFG FAILED"
+ DU_LOG("\nERROR --> SCH : Spec Sched UL UE CFG FAILED"
"for CRNTI:%d",ue->ueId);
return RFAILED;
}
{
if ((cellSchd->apisUl->rgSCHRgrUlUeCfg(sCell, ue, NULL, err)) != ROK)
{
- RLOG_ARG1(L_ERROR,DBG_CELLID,sCell->cellId, "Spec Sched UL UE CFG FAILED"
+ DU_LOG("\nERROR --> SCH : Spec Sched UL UE CFG FAILED"
"for CRNTI:%d",ue->ueId);
return RFAILED;
}
{
if ((cellSchd->apisDlfs->rgSCHDlfsSCellUeDel(sCellInfo->cell, ue)) != ROK)
{
- RGSCHDBGERRNEW(inst, (rgSchPBuf(inst), "DLFS Scell del FAILED\n"));
+ DU_LOG("\nERROR --> SCH : DLFS Scell del FAILED\n");
return RFAILED;
}
}
ue->ue5gtfCb.nxtCqiRiOccn.slot = 0;
ue->ue5gtfCb.rank = 1;
- printf("\nschd cfg at mac,%u,%u,%u,%u,%u\n",ue->ue5gtfCb.grpId,ue->ue5gtfCb.BeamId,ue->ue5gtfCb.numCC,
+ DU_LOG("\nINFO --> SCH : schd cfg at mac,%u,%u,%u,%u,%u\n",ue->ue5gtfCb.grpId,ue->ue5gtfCb.BeamId,ue->ue5gtfCb.numCC,
ue->ue5gtfCb.mcs,ue->ue5gtfCb.maxPrb);
ue5gtfGrp = &(cell->cell5gtfCb.ueGrp5gConf[ue->ue5gtfCb.BeamId]);
scheduling comes into picture */
if(ue5gtfGrp->beamBitMask & (1 << ue->ue5gtfCb.BeamId))
{
- RLOG_ARG1(L_ERROR,DBG_CELLID,cell->cellId,
- "5GTF_ERROR Invalid beam id CRNTI:%d",cfg->crnti);
+ DU_LOG("\nERROR --> SCH : 5GTF_ERROR Invalid beam id CRNTI:%d",cfg->crnti);
return RFAILED;
}
ue5gtfGrp->beamBitMask |= (1 << ue->ue5gtfCb.BeamId);
if((rgSCHUtlAllocSBuf(cell->instIdx,
(Data**)&(((ue->cellInfo[ue->cellIdToCellIdxMap[idx]])->sch)), (sizeof(RgSchCmnUe))) != ROK))
{
- RLOG_ARG1(L_ERROR,DBG_CELLID,cell->cellId,
- "Memory allocation FAILED for CRNTI:%d",ueCfg->crnti);
+ DU_LOG("\nERROR --> SCH : Memory allocation FAILED for CRNTI:%d",ueCfg->crnti);
err->errCause = RGSCHERR_SCH_CFG;
return RFAILED;
}
*/
if((ueCfg->ueQosCfg.dlAmbr == 0) && (ueCfg->ueQosCfg.ueBr == 0))
{
- RLOG_ARG1(L_ERROR,DBG_CELLID,cell->cellId,"UL Ambr and DL Ambr are"
+ DU_LOG("\nERROR --> SCH : UL Ambr and DL Ambr are"
"configured as 0 for CRNTI:%d",ueCfg->crnti);
err->errCause = RGSCHERR_SCH_CFG;
return RFAILED;
{
if ((cellSchd->apisEmtcDl->rgSCHRgrDlUeCfg(cell, ue, ueCfg, err)) != ROK)
{
- RLOG_ARG1(L_ERROR,DBG_CELLID,cell->cellId,
- "Spec Sched DL UE CFG FAILED for CRNTI:%d",ueCfg->crnti);
+ DU_LOG("\nERROR --> SCH : Spec Sched DL UE CFG FAILED for CRNTI:%d",ueCfg->crnti);
return RFAILED;
}
{
if ((cellSchd->apisDl->rgSCHRgrDlUeCfg(cell, ue, ueCfg, err)) != ROK)
{
- RLOG_ARG1(L_ERROR,DBG_CELLID,cell->cellId,
- "Spec Sched DL UE CFG FAILED for CRNTI:%d",ueCfg->crnti);
+ DU_LOG("\nERROR --> SCH : Spec Sched DL UE CFG FAILED for CRNTI:%d",ueCfg->crnti);
return RFAILED;
}
}
if((rgSCHUtlAllocSBuf(cell->instIdx,
(Data**)&(allRcd),sizeof(RgSchCmnAllocRecord)) != ROK))
{
- RLOG_ARG1(L_ERROR,DBG_CELLID,cell->cellId,"Memory allocation FAILED"
+ DU_LOG("\nERROR --> SCH : Memory allocation FAILED"
"for CRNTI:%d",ueCfg->crnti);
err->errCause = RGSCHERR_SCH_CFG;
return RFAILED;
(Data**)&(ue->ul.lcgArr[cnt].sch), (sizeof(RgSchCmnLcg)));
if (ret != ROK)
{
- RLOG_ARG1(L_ERROR,DBG_CELLID,cell->cellId,
- "SCH struct alloc failed for CRNTI:%d",ueCfg->crnti);
+ DU_LOG("\nERROR --> SCH : SCH struct alloc failed for CRNTI:%d",ueCfg->crnti);
err->errCause = RGSCHERR_SCH_CFG;
return (ret);
}
ret = rgSCHPwrUeCfg(cell, ue, ueCfg);
if (ret != ROK)
{
- RLOG_ARG1(L_ERROR,DBG_CELLID,cell->cellId, "Could not do "
+ DU_LOG("\nERROR --> SCH : Could not do "
"power config for UE CRNTI:%d",ueCfg->crnti);
return RFAILED;
}
ret = rgSCHCmnSpsUeCfg(cell, ue, ueCfg, err);
if (ret != ROK)
{
- RLOG_ARG1(L_ERROR,DBG_CELLID,cell->cellId, "Could not do "
+ DU_LOG("\nERROR --> SCH : Could not do "
"SPS config for CRNTI:%d",ueCfg->crnti);
return RFAILED;
}
{
if ((cellSchd->apisEmtcUl->rgSCHRgrUlUeCfg(cell, ue, ueCfg, err)) != ROK)
{
- RLOG_ARG1(L_ERROR,DBG_CELLID,cell->cellId, "Spec Sched UL UE CFG FAILED"
+ DU_LOG("\nERROR --> SCH : Spec Sched UL UE CFG FAILED"
"for CRNTI:%d",ueCfg->crnti);
return RFAILED;
}
{
if ((cellSchd->apisUl->rgSCHRgrUlUeCfg(cell, ue, ueCfg, err)) != ROK)
{
- RLOG_ARG1(L_ERROR,DBG_CELLID,cell->cellId, "Spec Sched UL UE CFG FAILED"
+ DU_LOG("\nERROR --> SCH : Spec Sched UL UE CFG FAILED"
"for CRNTI:%d",ueCfg->crnti);
return RFAILED;
}
{
if ((cellSchd->apisDlfs->rgSCHDlfsUeCfg(cell, ue, ueCfg, err)) != ROK)
{
- RLOG_ARG1(L_ERROR,DBG_CELLID,cell->cellId, "DLFS UE config FAILED"
+ DU_LOG("\nERROR --> SCH : DLFS UE config FAILED"
"for CRNTI:%d",ueCfg->crnti);
return RFAILED;
}
&& (ueRecfg->prdDlCqiRecfg.prdModeEnum != RGR_PRD_CQI_MOD10)
&& (ueRecfg->prdDlCqiRecfg.prdModeEnum != RGR_PRD_CQI_MOD20))
{
- RLOG_ARG2(L_ERROR,DBG_CELLID,cell->cellId,"Unsupported periodic CQI "
+ DU_LOG("\nERROR --> SCH : Unsupported periodic CQI "
"reporting mode %d for old CRNIT:%d",
(int)ueRecfg->prdDlCqiRecfg.prdModeEnum,ueRecfg->oldCrnti);
err->errCause = RGSCHERR_SCH_CFG;
{
if (rgSCHPwrUeRecfg(cell, ue, ueRecfg) != ROK)
{
- RLOG_ARG1(L_ERROR,DBG_CELLID,cell->cellId,
- "Power Reconfiguration Failed for OLD CRNTI:%d",ueRecfg->oldCrnti);
+ DU_LOG("\nERROR --> SCH : Power Reconfiguration Failed for OLD CRNTI:%d",ueRecfg->oldCrnti);
return RFAILED;
}
}
/* Uplink Sched related Initialization */
if ((ueRecfg->ueQosRecfg.dlAmbr == 0) && (ueRecfg->ueQosRecfg.ueBr == 0))
{
- RLOG_ARG1(L_ERROR,DBG_CELLID,cell->cellId,"Ul Ambr and DL Ambr "
+ DU_LOG("\nERROR --> SCH : Ul Ambr and DL Ambr "
"configured as 0 for OLD CRNTI:%d",ueRecfg->oldCrnti);
err->errCause = RGSCHERR_SCH_CFG;
return RFAILED;
{
if ((cellSchCmn->apisEmtcUl->rgSCHRgrUlUeRecfg(cell, ue, ueRecfg, err)) != ROK)
{
- RLOG_ARG1(L_ERROR,DBG_CELLID,cell->cellId,
- "Spec Sched UL UE ReCFG FAILED for CRNTI:%d",ue->ueId);
+ DU_LOG("\nERROR --> SCH : Spec Sched UL UE ReCFG FAILED for CRNTI:%d",ue->ueId);
return RFAILED;
}
if ((cellSchCmn->apisEmtcDl->rgSCHRgrDlUeRecfg(cell, ue, ueRecfg, err)) != ROK)
{
- RLOG_ARG1(L_ERROR,DBG_CELLID,cell->cellId,
- "Spec Sched DL UE ReCFG FAILED for CRNTI:%d",ue->ueId);
+ DU_LOG("\nERROR --> SCH : Spec Sched DL UE ReCFG FAILED for CRNTI:%d",ue->ueId);
return RFAILED;
}
}
{
if ((cellSchCmn->apisUl->rgSCHRgrUlUeRecfg(cell, ue, ueRecfg, err)) != ROK)
{
- RLOG_ARG1(L_ERROR,DBG_CELLID,cell->cellId,
- "Spec Sched UL UE ReCFG FAILED for CRNTI:%d",ue->ueId);
+ DU_LOG("\nERROR --> SCH : Spec Sched UL UE ReCFG FAILED for CRNTI:%d",ue->ueId);
return RFAILED;
}
if ((cellSchCmn->apisDl->rgSCHRgrDlUeRecfg(cell, ue, ueRecfg, err)) != ROK)
{
- RLOG_ARG1(L_ERROR,DBG_CELLID,cell->cellId,
- "Spec Sched DL UE ReCFG FAILED for CRNTI:%d",ue->ueId);
+ DU_LOG("\nERROR --> SCH : Spec Sched DL UE ReCFG FAILED for CRNTI:%d",ue->ueId);
return RFAILED;
}
}
if ((cellSchCmn->apisDlfs->rgSCHDlfsUeRecfg(cell, ue, \
ueRecfg, err)) != ROK)
{
- RLOG_ARG1(L_ERROR,DBG_CELLID,cell->cellId,
- "DLFS UE re-config FAILED for CRNTI:%d",ue->ueId);
+ DU_LOG("\nERROR --> SCH : DLFS UE re-config FAILED for CRNTI:%d",ue->ueId);
return RFAILED;
}
}
/* Invoke re-configuration on SPS module */
if (rgSCHCmnSpsUeRecfg(cell, ue, ueRecfg, err) != ROK)
{
- RLOG_ARG1(L_ERROR,DBG_CELLID,cell->cellId,
- "DL SPS ReCFG FAILED for UE CRNTI:%d", ue->ueId);
+ DU_LOG("\nERROR --> SCH : DL SPS ReCFG FAILED for UE CRNTI:%d", ue->ueId);
return RFAILED;
}
#endif
/*[ccpu00138609]-ADD- Configure the Max CCCH Counter */
if (cfg->maxCcchPerDlSf > cfg->maxUePerDlSf)
{
- RLOG_ARG2(L_ERROR,DBG_CELLID,cell->cellId,
- "Invalid configuration !: "
+ DU_LOG("\nERROR --> SCH : Invalid configuration !: "
"maxCcchPerDlSf %u > maxUePerDlSf %u",
cfg->maxCcchPerDlSf, cfg->maxUePerDlSf );
/* Fix: MUE_PERTTI_DL syed validating Cell Configuration */
if (cellSch->dl.maxUePerDlSf < cellSch->dl.maxUeNewTxPerTti)
{
- RLOG_ARG2(L_ERROR,DBG_CELLID,cell->cellId,
- "FAILED MaxUePerDlSf(%u) < MaxDlUeNewTxPerTti(%u)",
+ DU_LOG("\nERROR --> SCH : FAILED MaxUePerDlSf(%u) < MaxDlUeNewTxPerTti(%u)",
cellSch->dl.maxUePerDlSf,
cellSch->dl.maxUeNewTxPerTti);
return RFAILED;
/*[ccpu00138609]-ADD- Configure the Max CCCH Counter */
if (cfg->maxCcchPerDlSf > cfg->maxUePerDlSf)
{
- RLOG_ARG2(L_ERROR,DBG_CELLID,cell->cellId,"Invalid configuration !: "
+ DU_LOG("\nERROR --> SCH : Invalid configuration !: "
"maxCcchPerDlSf %u > maxUePerDlSf %u",
cfg->maxCcchPerDlSf, cfg->maxUePerDlSf );
/* Num of PUCCH RBs = puschRbStart*2 */
if (puschRbStart * 2 >= ulBw)
{
- RLOG_ARG0(L_ERROR,DBG_CELLID,cell->cellId,"No bw available for PUSCH");
+ DU_LOG("\nERROR --> SCH : No bw available for PUSCH");
return RFAILED;
}
if(gPrntPucchDet)
{
#ifndef ALIGN_64BIT
- printf("CA_DBG:: puschRbStart:n1Rb:mixedRb:n1PerRb:totalCce:n1Max:n1RbPart:n2Rb::[%d:%d] [%d:%d:%ld:%d:%d:%d:%d:%d]\n",
+ DU_LOG("\nDEBUG --> SCH : CA_DBG:: puschRbStart:n1Rb:mixedRb:n1PerRb:totalCce:n1Max:n1RbPart:n2Rb::[%d:%d] [%d:%d:%ld:%d:%d:%d:%d:%d]\n",
cell->crntTime.sfn, cell->crntTime.slot, puschRbStart, n1Rb, mixedRb,n1PerRb, totalCce, n1Max, n1RbPart, n2Rb);
#else
- printf("CA_DBG:: puschRbStart:n1Rb:mixedRb:n1PerRb:totalCce:n1Max:n1RbPart:n2Rb::[%d:%d] [%d:%d:%d:%d:%d:%d:%d:%d]\n",
+ DU_LOG("\nDEBUG --> SCH : CA_DBG:: puschRbStart:n1Rb:mixedRb:n1PerRb:totalCce:n1Max:n1RbPart:n2Rb::[%d:%d] [%d:%d:%d:%d:%d:%d:%d:%d]\n",
cell->crntTime.sfn, cell->crntTime.slot, puschRbStart, n1Rb, mixedRb,n1PerRb, totalCce, n1Max, n1RbPart, n2Rb);
#endif
}
if (puschRbStart*2 >= ulBw)
{
- RLOG_ARG0(L_ERROR,DBG_CELLID,cell->cellId,"No bw available for PUSCH");
+ DU_LOG("\nERROR --> SCH : No bw available for PUSCH");
return RFAILED;
}
/* Fix: MUE_PERTTI_UL syed validating Cell Configuration */
if (cellUl->maxAllocPerUlSf < cellUl->maxUeNewTxPerTti)
{
- RLOG_ARG2(L_ERROR,DBG_CELLID,cell->cellId,
- "FAILED: MaxUePerUlSf(%u) < MaxUlUeNewTxPerTti(%u)",
+ DU_LOG("\nERROR --> SCH : FAILED: MaxUePerUlSf(%u) < MaxUlUeNewTxPerTti(%u)",
cellUl->maxAllocPerUlSf,
cellUl->maxUeNewTxPerTti);
return RFAILED;
ulUeInfo.ulAllocInfo), (cellUl->maxAllocPerUlSf * sizeof(RgInfUeUlAlloc)));
if (ret != ROK)
{
- RLOG_ARG0(L_ERROR,DBG_CELLID,cell->cellId,"Memory allocation failed ");
+ DU_LOG("\nERROR --> SCH : Memory allocation failed ");
return (ret);
}
}
if (sbSize != rgSchCmnMult235Tbl[sbSize].match)
{
- RLOG_ARG1(L_ERROR,DBG_CELLID,cell->cellId,"Invalid subband size %d", sbSize);
+ DU_LOG("\nERROR --> SCH : Invalid subband size %d", sbSize);
return RFAILED;
}
//Setting the subband size to 4 which is size of VRBG in 5GTF
maxSbPerUe = maxUlBwPerUe / sbSize;
if (maxSbPerUe == 0)
{
- RLOG_ARG0(L_ERROR,DBG_CELLID,cell->cellId, "rgSCHCmnUlCellInit(): "
+ DU_LOG("\nERROR --> SCH : rgSCHCmnUlCellInit(): "
"maxUlBwPerUe/sbSize is zero");
return RFAILED;
}
if ((!RG_SCH_CMN_UL_IS_CQI_VALID(cellCfg->ulCmnCodeRate.ccchCqi))
|| (!RG_SCH_CMN_UL_IS_CQI_VALID(cellCfg->trgUlCqi.trgCqi)))
{
- RLOG_ARG0(L_ERROR,DBG_CELLID,cell->cellId,"rgSCHCmnUlCellInit(): "
+ DU_LOG("\nERROR --> SCH : rgSCHCmnUlCellInit(): "
"Invalid cqi");
return RFAILED;
}
* Refer to 36.213-8.6.1 */
for (i = RG_SCH_CMN_UL_NUM_CQI - 1;i > 0; --i)
{
- RLOG_ARG2(L_INFO,DBG_CELLID,cell->cellId,
- "CQI %u:iTbs %u",
- i,
+ DU_LOG("\nINFO --> SCH : CQI %u:iTbs %u",i,
rgSchCmnUlCqiToTbsTbl[cell->isCpUlExtend][i]);
#ifdef MAC_SCH_STATS
/* ccpu00128489 ADD Update mcs in hqFailStats here instead of at CRC
iTbs = rgSchCmnUlCqiToTbsTbl[cell->isCpUlExtend][i];
if (iTbs <= RGSCH_UL_16QAM_MAX_ITBS) /* corresponds to 16QAM */
{
- RLOG_ARG1(L_INFO,DBG_CELLID,cell->cellId,
- "16 QAM CQI %u", i);
+ DU_LOG("\nINFO --> SCH : 16 QAM CQI %u", i);
cellUl->max16qamCqi = i;
break;
}
if(0 == cell->dynCfiCb.maxCfi)
{
- RLOG_ARG3(L_ERROR,DBG_CELLID,cell->cellId,
- "Incorrect Default CFI(%u), maxCfi(%u), maxPucchRb(%d)",
+ DU_LOG("\nERROR --> SCH : Incorrect Default CFI(%u), maxCfi(%u), maxPucchRb(%d)",
cellSch->cfiCfg.cfi, cell->dynCfiCb.maxCfi,
cell->pucchCfg.maxPucchRb);
if (((ret = rgSCHUtlAllocSBuf(cell->instIdx,
(Data**)&(cell->sc.sch), (sizeof(RgSchCmnCell)))) != ROK))
{
- RLOG_ARG0(L_ERROR,DBG_CELLID,cell->cellId,
- "Memory allocation FAILED");
+ DU_LOG("\nERROR --> SCH : Memory allocation FAILED");
err->errCause = RGSCHERR_SCH_CFG;
return (ret);
}
if (!RG_SCH_CMN_UL_IS_CQI_VALID(recfg->ulCmnCodeRate.ccchCqi))
{
err->errCause = RGSCHERR_SCH_CFG;
- RLOG_ARG0(L_ERROR,DBG_CELLID,cell->cellId, "rgSCHCmnRgrCellRecfg(): "
+ DU_LOG("\nERROR --> SCH : rgSCHCmnRgrCellRecfg(): "
"Invalid cqi");
return RFAILED;
}
(Data**)&((dlLc)->sch), (sizeof(RgSchCmnDlSvc)));
if (ret != ROK)
{
- RLOG_ARG2(L_ERROR,DBG_CELLID,cell->cellId,"rgSCHCmnRgrLchCfg(): "
+ DU_LOG("\nERROR --> SCH : rgSCHCmnRgrLchCfg(): "
"SCH struct alloc failed for CRNTI:%d LCID:%d",ue->ueId,lcCfg->lcId);
err->errCause = RGSCHERR_SCH_CFG;
return (ret);
ret = rgSCHCmnValidateDlQos(&lcCfg->dlInfo.dlQos);
if (ret != ROK)
{
- RLOG_ARG2(L_ERROR,DBG_CELLID,cell->cellId,"rgSchCmnCrgLcCfg(): "
+ DU_LOG("\nERROR --> SCH : rgSchCmnCrgLcCfg(): "
"DlQos validation failed for CRNTI:%d LCID:%d",ue->ueId,lcCfg->lcId);
err->errCause = RGSCHERR_SCH_CFG;
return (ret);
ret = rgSCHCmnSpsDlLcCfg(cell, ue, dlLc, lcCfg, err);
if (ret != ROK)
{
- RLOG_ARG2(L_ERROR,DBG_CELLID,cell->cellId, "rgSchCmnRgrLchCfg(): "
+ DU_LOG("\nERROR --> SCH : rgSchCmnRgrLchCfg(): "
"SPS configuration failed for DL LC for CRNTI:%d LCID:%d",ue->ueId,lcCfg->lcId);
err->errCause = RGSCHERR_SCH_CFG;
return RFAILED;
if (ret != ROK)
{
- RLOG_ARG2(L_ERROR,DBG_CELLID,cell->cellId,
- "DlQos validation failed for CRNTI:%d LCID:%d",ue->ueId,lcRecfg->lcId);
+ DU_LOG("\nERROR --> SCH : DlQos validation failed for CRNTI:%d LCID:%d",ue->ueId,lcRecfg->lcId);
err->errCause = RGSCHERR_SCH_CFG;
return (ret);
}
if (((RgSchCmnDlSvc *)(dlLc->sch))->qci != lcRecfg->dlRecfg.dlQos.qci)
{
- RLOG_ARG2(L_ERROR,DBG_CELLID,cell->cellId, "Qci, hence lc Priority change "
+ DU_LOG("\nERROR --> SCH : Qci, hence lc Priority change "
"not supported for CRNTI:%d LCID:%d",ue->ueId,lcRecfg->lcId);
err->errCause = RGSCHERR_SCH_CFG;
return (ret);
ret = rgSCHCmnSpsDlLcRecfg(cell, ue, dlLc, lcRecfg, err);
if (ret != ROK)
{
- RLOG_ARG2(L_ERROR,DBG_CELLID,cell->cellId,"SPS re-configuration not "
+ DU_LOG("\nERROR --> SCH : SPS re-configuration not "
"supported for dlLC Ignore this CRNTI:%d LCID:%d",ue->ueId,lcRecfg->lcId);
}
}
/* Return the grabbed PDCCH */
rgSCHUtlPdcchPut(cell, &subFrm->pdcchInfo, raRspAlloc->pdcch);
subFrm->raRsp[rarCnt].pdcch = NULLP;
- RLOG_ARG0(L_ERROR,DBG_CELLID,cell->cellId,"rgSCHCmnRaRspAlloc(): "
+ DU_LOG("\nERROR --> SCH : rgSCHCmnRaRspAlloc(): "
"Not even one RaReq.");
return;
}
}
- RLOG_ARG3(L_DEBUG,DBG_CELLID,cell->cellId,
- "RNTI:%d Scheduled RAR @ (%u,%u) ",
+ DU_LOG("\nDEBUG --> SCH : RNTI:%d Scheduled RAR @ (%u,%u) ",
raRspAlloc->rnti,
cell->crntTime.sfn,
cell->crntTime.slot);
pcch = rgSCHDbmGetPcch(cell);
if(pcch == NULLP)
{
- RLOG_ARG0(L_ERROR,DBG_CELLID,cell->cellId,"rgSCHCmnDlBcchPcchFnlz( ): "
+ DU_LOG("\nERROR --> SCH : rgSCHCmnDlBcchPcchFnlz( ): "
"No Pcch Present");
return;
}
rgSCHUhmGetAvlHqProc(cell, ue, &proc);
if (proc == NULLP)
{
- //printf("UE [%d] HQ Proc unavailable\n", ue->ueId);
+ //DU_LOG("\nINFO --> SCH : UE [%d] HQ Proc unavailable\n", ue->ueId);
return RFAILED;
}
#endif
pdcch = rgSCHCmnPdcchAllocCrntSf(cell, ue);
if(pdcch == NULLP)
{
- RLOG_ARG1(L_DEBUG,DBG_CELLID,cell->cellId,
- "rgSCHCmnUlRbAllocForUe(): Could not get PDCCH for CRNTI:%d",ue->ueId);
+ DU_LOG("\nDEBUG --> SCH : rgSCHCmnUlRbAllocForUe(): Could not get PDCCH for CRNTI:%d",ue->ueId);
return RFAILED;
}
gUl5gtfPdcchSchd++;
if((sf->sfBeamInfo[ue->ue5gtfCb.BeamId].vrbgStart > MAX_5GTF_VRBG)
|| (sf->sfBeamInfo[ue->ue5gtfCb.BeamId].totVrbgAllocated > MAX_5GTF_VRBG))
{
- printf("5GTF_ERROR vrbg > 25 valstart = %d valalloc %d\n", sf->sfBeamInfo[ue->ue5gtfCb.BeamId].vrbgStart
+ DU_LOG("\nINFO --> SCH : 5GTF_ERROR vrbg > 25 valstart = %d valalloc %d\n", sf->sfBeamInfo[ue->ue5gtfCb.BeamId].vrbgStart
, sf->sfBeamInfo[ue->ue5gtfCb.BeamId].totVrbgAllocated);
int *p=NULLP;
*p = 10;
}
if (alloc == NULLP)
{
- RLOG_ARG2(L_ERROR,DBG_CELLID,cell->cellId,
- "rgSCHCmnUlRbAllocForUe(): Could not get UlAlloc %d CRNTI:%d",numVrbg,ue->ueId);
+ DU_LOG("\nERROR --> SCH : rgSCHCmnUlRbAllocForUe(): Could not get UlAlloc %d CRNTI:%d",numVrbg,ue->ueId);
rgSCHCmnPdcchRlsCrntSf(cell, pdcch);
return RFAILED;
}
retxAlloc = rgSCHCmnUlGetUlAlloc(cell, sf, alloc->numSb);
if (retxAlloc == NULLP)
{
- RLOG_ARG1(L_ERROR,DBG_CELLID,cell->cellId,
- "rgSCHCmnUlRbAllocForUe():Could not get UlAlloc for msg3Retx RNTI:%d",
+ DU_LOG("\nERROR --> SCH : rgSCHCmnUlRbAllocForUe():Could not get UlAlloc for msg3Retx RNTI:%d",
alloc->rnti);
return;
}
}
else
{
- RLOG_ARG0(L_ERROR,DBG_CELLID,cell->cellId,
- "Error! holeDb sanity check failed");
+ DU_LOG("\nERROR --> SCH : holeDb sanity check failed");
}
}
}
#if (ERRCLASS & ERRCLS_DEBUG)
if (tmrEvnt != RG_SCH_CMN_EVNT_UE_REFRESH)
{
- RLOG_ARG1(L_ERROR,DBG_CELLID,cell->cellId,"rgSCHCmnTmrExpiry(): Invalid "
+ DU_LOG("\nERROR --> SCH : rgSCHCmnTmrExpiry(): Invalid "
"timer event CRNTI:%d",ue->ueId);
return RFAILED;
}
if((cell->emtcEnable)&&(TRUE == ue->isEmtcUe))
{
cellSch->apisEmtcDl->rgSCHDlDedBoUpd(cell, ue, svc);
- //printf("rgSCHEMTCDlDedBoUpd\n");
+ //DU_LOG("\nINFO --> SCH : rgSCHEMTCDlDedBoUpd\n");
}
else
#endif
}
else
{
- RLOG_ARG2(L_ERROR,DBG_CELLID,cell->cellId,"Invalid RI value(%x) CRNTI:%d",
+ DU_LOG("\nERROR --> SCH : Invalid RI value(%x) CRNTI:%d",
pucchCqi->u.mode10Info.u.ri,ue->ueId);
return;
}
}
else
{
- RLOG_ARG2(L_ERROR,DBG_CELLID,cell->cellId, "Invalid RI value(%x) CRNTI:%d",
+ DU_LOG("\nERROR --> SCH : Invalid RI value(%x) CRNTI:%d",
pucchCqi->u.mode11Info.u.ri,ue->ueId);
return;
}
}
else
{
- RLOG_ARG2(L_ERROR,DBG_CELLID,cell->cellId,"Invalid RI value(%x) CRNTI:%d",
+ DU_LOG("\nERROR --> SCH : Invalid RI value(%x) CRNTI:%d",
pucchCqi->u.mode20Info.u.ri,ue->ueId);
return;
}
}
else
{
- RLOG_ARG2(L_ERROR,DBG_CELLID,cell->cellId, "Invalid RI value(%x) CRNTI:%d",
+ DU_LOG("\nERROR --> SCH : Invalid RI value(%x) CRNTI:%d",
pucchCqi->u.mode21Info.u.ri,ue->ueId);
return;
}
break;
default:
{
- RLOG_ARG2(L_ERROR,DBG_CELLID,cell->cellId,"Unknown CQI Mode %d",
+ DU_LOG("\nERROR --> SCH : Unknown CQI Mode %d of UE %d",
pucchCqi->mode,ue->ueId);
/* ccpu00117452 - MOD - Changed macro name from
RGR_RRM_DLPWR_CNTRL to RGR_CQI_REPT */
}
else
{
- RLOG_ARG2(L_ERROR,DBG_CELLID,cell->cellId,"Invalid RI value(%x) CRNTI:%d",
+ DU_LOG("\nERROR --> SCH : Invalid RI value(%x) CRNTI:%d",
puschCqi->ri.val,ue->ueId);
return;
}
break;
default:
{
- RLOG_ARG2(L_ERROR,DBG_CELLID,cell->cellId, "Unknown CQI Mode %d CRNTI:%d",
+ DU_LOG("\nERROR --> SCH : Unknown CQI Mode %d CRNTI:%d",
puschCqi->mode,ue->ueId);
/* CQI decoding failed revert the RI to previous value */
if ((puschCqi->ri.pres == PRSNT_NODEF) &&
}
else
{
- RLOG_ARG1(L_ERROR,DBG_CELLID,cell->cellId,
- "<TA>TA duplicate entry attempt failed: UEID:%u",
+ DU_LOG("\nERROR --> SCH : <TA>TA duplicate entry attempt failed: UEID:%u",
ue->ueId);
}
}
hole);
if (alloc == NULLP)
{
- RLOG_ARG0(L_ERROR,DBG_CELLID,cell->cellId,
- "rgSCHCmnUlRbAllocForPoHoUe(): Could not get UlAlloc");
+ DU_LOG("\nERROR --> SCH : rgSCHCmnUlRbAllocForPoHoUe(): Could not get UlAlloc");
return RFAILED;
}
rgSCHCmnUlAllocFillRbInfo(cell, sf, alloc);
/* KWork fix */
if (grnt == NULLP)
{
- RLOG_ARG1(L_ERROR,DBG_INSTID,cell->instIdx, "Failed to get"
+ DU_LOG("\nERROR --> SCH : Failed to get"
"the grant for HO/PDCCH Order. CRNTI:%d",ue->ueId);
return;
}
/* This should never happen */
if (dstAlloc == NULLP)
{
- RLOG_ARG1(L_ERROR,DBG_CELLID,cell->cellId,"CRNTI:%d "
+ DU_LOG("\nERROR --> SCH : CRNTI:%d "
"rgSCHUtlUlGetSpfcAlloc failed in rgSCHCmnUlInsAllocFrmNewSf2OldSf",
srcAlloc->rnti);
return;
{
nxtAlloc = rgSCHUtlUlAllocNxt(sf, alloc);
#ifdef UL_ADPT_DBG
- printf("rgSCHCmnUlRmvCmpltdAllocs:time(%d %d) alloc->hqProc->remTx %d hqProcId(%d) \n",cell->crntTime.sfn,cell->crntTime.slot,alloc->hqProc->remTx, alloc->grnt.hqProcId);
+ DU_LOG("\nDEBUG --> SCH : rgSCHCmnUlRmvCmpltdAllocs:time(%d %d) alloc->hqProc->remTx %d hqProcId(%d) \n",cell->crntTime.sfn,cell->crntTime.slot,alloc->hqProc->remTx, alloc->grnt.hqProcId);
#endif
alloc->hqProc->rcvdCrcInd = TRUE;
if ((alloc->hqProc->rcvdCrcInd) || (alloc->hqProc->remTx == 0))
alloc->hqProc->alloc = NULLP;
alloc->hqProc->ulSfIdx = RGSCH_INVALID_INFO;
#ifdef UL_ADPT_DBG
- printf("Adding Harq Proc Id in the retx list hqProcId %d \n",alloc->grnt.hqProcId);
+ DU_LOG("\nDEBUG --> SCH : Adding Harq Proc Id in the retx list hqProcId %d \n",alloc->grnt.hqProcId);
#endif
cmLListAdd2Tail(&cmnUlCell->reTxLst, &alloc->hqProc->reTxLnk);
alloc->hqProc->reTxLnk.node = (PTR)alloc->hqProc;
if(alloc == NULLP)
{
rgSCHUtlPdcchPut(cell, &dlSf->pdcchInfo, pdcch);
- RLOG_ARG1(L_ERROR,DBG_CELLID,cell->cellId,
- "UL Alloc fail for msg3 retx for rnti: %d\n",
+ DU_LOG("\nERROR --> SCH : UL Alloc fail for msg3 retx for rnti: %d\n",
proc->reTxAlloc.rnti);
return (FALSE);
}
else /* Intg fix */
{
rgSCHUtlPdcchPut(cell, &dlSf->pdcchInfo, pdcch);
- RLOG_ARG1(L_DEBUG,DBG_CELLID,cell->cellId,
- "Num SB not suffiecient for adap retx for rnti: %d",
+ DU_LOG("\nERROR --> SCH : Num SB not suffiecient for adap retx for rnti: %d",
proc->reTxAlloc.rnti);
return (FALSE);
}
if (cellSch->dl.isDlFreqSel)
{
- printf("5GTF_ERROR DLFS SCH Enabled\n");
+ DU_LOG("\nINFO --> SCH : 5GTF_ERROR DLFS SCH Enabled\n");
cellSch->apisDlfs->rgSCHDlfsAllocRb(cell, allocInfo);
}
else
RgSchSfBeamInfo *beamInfo = &(dlSf->sfBeamInfo[0]);
if(beamInfo->totVrbgAllocated > MAX_5GTF_VRBG)
{
- printf("5GTF_ERROR vrbg allocated > 25\n");
+ DU_LOG("\nINFO --> SCH : 5GTF_ERROR vrbg allocated > 25\n");
return RFAILED;
}
allocInfo->tbInfo[0].bytesAlloc = allocInfo->tbInfo[0].bytesReq;
#endif
- printf("\n[%s],allocInfo->tbInfo[0].bytesAlloc:%u,vrbgReq:%u\n",
+ DU_LOG("\nINFO --> SCH : [%s],allocInfo->tbInfo[0].bytesAlloc:%u,vrbgReq:%u\n",
__func__,allocInfo->tbInfo[0].bytesAlloc,allocInfo->vrbgReq);
return ROK;
if (dlSf->bw <= dlSf->bwAlloced)
{
- RLOG_ARG2(L_ERROR,DBG_CELLID,cell->cellId,
- "BW is fully allocated for subframe (%d) CRNTI:%d", dlSf->sfNum,allocInfo->rnti);
+ DU_LOG("\nERROR --> SCH : BW is fully allocated for subframe (%d) CRNTI:%d", dlSf->sfNum,allocInfo->rnti);
return FALSE;
}
if (dlSf->sfrTotalPoolInfo.ccBwFull == TRUE)
{
- RLOG_ARG1(L_ERROR,DBG_CELLID,cell->cellId,
- "BW is fully allocated for CC Pool CRNTI:%d",allocInfo->rnti);
+ DU_LOG("\nERROR --> SCH : BW is fully allocated for CC Pool CRNTI:%d",allocInfo->rnti);
return FALSE;
}
if ((dlSf->sfrTotalPoolInfo.ceBwFull == TRUE) && (isUeCellEdge))
{
- RLOG_ARG1(L_ERROR,DBG_CELLID,cell->cellId,
- "BW is fully allocated for CE Pool CRNTI:%d",allocInfo->rnti);
+ DU_LOG("\nERROR --> SCH : BW is fully allocated for CE Pool CRNTI:%d",allocInfo->rnti);
return FALSE;
}
if (dlSf->bw <= dlSf->bwAlloced)
{
- RLOG_ARG3(L_DEBUG,DBG_CELLID,cell->cellId, "(%d:%d)FAILED CRNTI:%d",
+ DU_LOG("\nERROR --> SCH : (%d:%d)FAILED CRNTI:%d",
dlSf->bw, dlSf->bwAlloced,allocInfo->rnti);
return (FALSE);
}
dlSf->lstRbgDfct = 1;
}
- RLOG_ARG1(L_ERROR,DBG_CELLID,cell->cellId, "FAILED for CRNTI:%d",
+ DU_LOG("\nERROR --> SCH : FAILED for CRNTI:%d",
allocInfo->rnti);
- printf ("RB Alloc failed for LAA TB type 0\n");
+ DU_LOG("\nERROR --> SCH : RB Alloc failed for LAA TB type 0\n");
return (FALSE);
}
return (TRUE);
}
else
{
- printf ("RB Alloc failed for LAA TB type 2\n");
- RLOG_ARG1(L_ERROR,DBG_CELLID,cell->cellId,"FAILED for CRNTI:%d",allocInfo->rnti);
+ DU_LOG("\nERROR --> SCH : RB Alloc failed for LAA TB type 2\n");
+ DU_LOG("\nERROR --> SCH : FAILED for CRNTI:%d",allocInfo->rnti);
return (FALSE);
}
/* Fix: Number of RBs in case of RETX should be same as
return (TRUE);
}
}
- RLOG_ARG1(L_ERROR,DBG_CELLID,cell->cellId,"FAILED for CRNTI:%d",allocInfo->rnti);
+ DU_LOG("\nERROR --> SCH : FAILED for CRNTI:%d",allocInfo->rnti);
return (FALSE);
}
#endif
/* KWork fix */
if (sfrCCPool1 == NULLP)
{
- RLOG_ARG1(L_ERROR,DBG_CELLID,cell->cellId, "rgSCHCmnNonDlfsUpdDSFRTyp2Alloc():"
+ DU_LOG("\nERROR --> SCH : rgSCHCmnNonDlfsUpdDSFRTyp2Alloc():"
"sfrCCPool1 is NULL for CRNTI:%d",ue->ueId);
return RFAILED;
}
ret = rgSCHCmnBuildRntpInfo(cell, dlSf->rntpInfo.val, dlSf->type2Start, numRb, dlSf->bw);
if (ret != ROK)
{
- RLOG_ARG1(L_ERROR,DBG_CELLID,cell->cellId, "rgSCHCmnNonDlfsUpdDSFRTyp2Alloc():"
+ DU_LOG("\nERROR --> SCH : rgSCHCmnNonDlfsUpdDSFRTyp2Alloc():"
"rgSCHCmnBuildRntpInfo() function returned RFAILED for CRNTI:%d",ue->ueId);
return RFAILED;
}
ret = rgSCHCmnBuildRntpInfo(cell, dlSf->rntpInfo.val, dlSf->type2Start, numRb, dlSf->bw);
if (ret != ROK)
{
- RLOG_ARG1(L_ERROR,DBG_CELLID,cell->cellId, "rgSCHCmnNonDlfsUpdDSFRTyp2Alloc():"
+ DU_LOG("\nERROR --> SCH : rgSCHCmnNonDlfsUpdDSFRTyp2Alloc():"
"rgSCHCmnBuildRntpInfo() function returned RFAILED CRNTI:%d",ue->ueId);
return RFAILED;
}
if (rntpPtr == NULLP)
{
- RLOG_ARG0(L_ERROR,DBG_CELLID,cell->cellId,
- "rgSCHCmnBuildRntpInfo():"
+ DU_LOG("\nERROR --> SCH : rgSCHCmnBuildRntpInfo():"
"rntpPtr can't be NULLP (Memory Allocation Failed)");
return RFAILED;
}
ret = rgSCHCmnBuildRntpInfo(cell, dlSf->rntpInfo.val, sfrPool->type2Start, numRb, dlSf->bw);
if (ret != ROK)
{
- RLOG_ARG1(L_ERROR,DBG_CELLID,cell->cellId,"rgSCHCmnNonDlfsUpdSFRPoolTyp2Alloc():"
+ DU_LOG("\nERROR --> SCH : rgSCHCmnNonDlfsUpdSFRPoolTyp2Alloc():"
"rgSCHCmnBuildRntpInfo() function returned RFAILED for CRNTI:%d",ue->ueId);
return RFAILED;
}
ret = rgSCHCmnBuildRntpInfo(cell, dlSf->rntpInfo.val, sfrPool->type2Start, numRb, dlSf->bw);
if (ret != ROK)
{
- RLOG_ARG1(L_ERROR,DBG_CELLID,cell->cellId, "rgSCHCmnNonDlfsUpdSFRPoolTyp2Alloc():"
+ DU_LOG("\nERROR --> SCH : rgSCHCmnNonDlfsUpdSFRPoolTyp2Alloc():"
"rgSCHCmnBuildRntpInfo() function returned RFAILED for CRNTI:%d",ue->ueId);
return RFAILED;
}
sizeof(RgrLoadInfIndInfo));
if (ret != ROK)
{
- RLOG_ARG0(L_ERROR,DBG_CELLID,cell->cellId, "Could not "
+ DU_LOG("\nERROR --> SCH : Could not "
"allocate memory for sending LoadInfo");
return;
}
ret = rgSCHUtlRgrLoadInfInd(cell, rgrLoadInf);
if(ret == RFAILED)
{
- RLOG_ARG0(L_ERROR,DBG_CELLID,cell->cellId, "rgSCHCmnNonDlfsDsfrRntpComp():"
+ DU_LOG("\nERROR --> SCH : rgSCHCmnNonDlfsDsfrRntpComp():"
"rgSCHUtlRgrLoadInfInd() returned RFAILED");
}
if(beamInfo->totVrbgAllocated > MAX_5GTF_VRBG)
{
- RLOG_ARG1(L_ERROR ,DBG_CELLID,cell->cellId,
- "5GTF_ERROR : vrbg allocated > 25 :ue (%u)",
+ DU_LOG("\nERROR --> SCH : 5GTF_ERROR : vrbg allocated > 25 :ue (%u)",
ue->ueId);
- printf("5GTF_ERROR vrbg allocated > 25\n");
+ DU_LOG("\nERROR --> SCH : 5GTF_ERROR vrbg allocated > 25\n");
return RFAILED;
}
{
/* Returning ROK since PDCCH might be available for another UE and
* further allocations could be done */
- RLOG_ARG1(L_ERROR ,DBG_CELLID,cell->cellId,
- "5GTF_ERROR : PDCCH allocation failed :ue (%u)",
+ DU_LOG("\nERROR --> SCH : 5GTF_ERROR : PDCCH allocation failed :ue (%u)",
ue->ueId);
- printf("5GTF_ERROR PDCCH allocation failed\n");
+ DU_LOG("\nERROR --> SCH : 5GTF_ERROR PDCCH allocation failed\n");
return RFAILED;
}
#ifdef RG_5GTF
RgSchSfBeamInfo *beamInfo = &(dlSf->sfBeamInfo[0]);
if(beamInfo->totVrbgAllocated > MAX_5GTF_VRBG)
{
- RLOG_ARG1(L_ERROR ,DBG_CELLID,cell->cellId,
- "5GTF_ERROR : vrbg allocated > 25 :ue (%u)",
+ DU_LOG("\nERROR --> SCH : 5GTF_ERROR : vrbg allocated > 25 :ue (%u)",
raCb->ue->ueId);
- printf("5GTF_ERROR vrbg allocated > 25\n");
+ DU_LOG("\nERROR --> SCH : 5GTF_ERROR vrbg allocated > 25\n");
return RFAILED;
}
#endif
cell->tenbStats->sch.dl5gtfRbAllocFail++;
#endif
/* Allocation failed : Add UE to the non-scheduled list */
- printf("5GTF_ERROR Dl rb alloc failed adding nonSchdHqPLst\n");
+ DU_LOG("\nERROR --> SCH : 5GTF_ERROR Dl rb alloc failed adding nonSchdHqPLst\n");
cmLListAdd2Tail(nonSchdHqPLst, schdLnkNode);
}
}
/* Allocate for MSG4 retransmissions */
if (allocInfo->msg4Alloc.msg4RetxLst.count)
{
- printf("5GTF_ERROR rgSCHCmnNonDlfsMsg4Alloc RetxLst\n");
+ DU_LOG("\nINFO --> SCH : 5GTF_ERROR rgSCHCmnNonDlfsMsg4Alloc RetxLst\n");
rgSCHCmnNonDlfsMsg4Alloc(cell, &(allocInfo->msg4Alloc), TRUE);
}
/* Assuming all the nodes in the list need allocations: rbsReq is valid */
if (allocInfo->msg4Alloc.msg4TxLst.count)
{
- printf("5GTF_ERROR rgSCHCmnNonDlfsMsg4Alloc txLst\n");
+ DU_LOG("\nINFO --> SCH : 5GTF_ERROR rgSCHCmnNonDlfsMsg4Alloc txLst\n");
rgSCHCmnNonDlfsMsg4Alloc(cell, &(allocInfo->msg4Alloc), FALSE);
}
#ifdef RGR_V1
* retransmissions */
if (allocInfo->ccchSduAlloc.ccchSduRetxLst.count)
{
- printf("5GTF_ERROR rgSCHCmnNonDlfsCcchSduAlloc\n");
+ DU_LOG("\nINFO --> SCH : 5GTF_ERROR rgSCHCmnNonDlfsCcchSduAlloc\n");
rgSCHCmnNonDlfsCcchSduAlloc(cell, &(allocInfo->ccchSduAlloc), TRUE);
}
/* Allocate for CCCH SDU (received after guard timer expiry) transmissions */
if (allocInfo->ccchSduAlloc.ccchSduTxLst.count)
{
- printf("5GTF_ERROR rgSCHCmnNonDlfsCcchSduAlloc\n");
+ DU_LOG("\nINFO --> SCH : 5GTF_ERROR rgSCHCmnNonDlfsCcchSduAlloc\n");
rgSCHCmnNonDlfsCcchSduAlloc(cell, &(allocInfo->ccchSduAlloc), FALSE);
}
#endif
{
break;
}
- printf("5GTF_ERROR calling RAR rgSCHCmnNonDlfsCmnRbAlloc\n");
+ DU_LOG("\nINFO --> SCH : 5GTF_ERROR calling RAR rgSCHCmnNonDlfsCmnRbAlloc\n");
// if ((rgSCHCmnNonDlfsCmnRbAlloc(cell, reqAllocInfo)) != ROK)
if ((rgSCHCmnNonDlfsCmnRbAllocRar(cell, reqAllocInfo)) != ROK)
{
/* Allocate for RETX+TX UEs */
if(allocInfo->dedAlloc.txRetxHqPLst.count)
{
- printf("5GTF_ERROR TX RETX rgSCHCmnNonDlfsDedRbAlloc\n");
+ DU_LOG("\nDEBUG --> SCH : 5GTF_ERROR TX RETX rgSCHCmnNonDlfsDedRbAlloc\n");
rgSCHCmnNonDlfsDedRbAlloc(cell, &(allocInfo->dedAlloc),
&(allocInfo->dedAlloc.txRetxHqPLst),
&(allocInfo->dedAlloc.schdTxRetxHqPLst),
cmnCell->dl.maxUePerDlSf)
{
#ifndef ALIGN_64BIT
- RGSCHDBGERRNEW(cell->instIdx,(rgSchPBuf(cell->instIdx),"UEs selected by"
+ DU_LOG("\nERROR --> SCH : UEs selected by"
" scheduler exceed maximumUePerDlSf(%u)tx-retx %ld retx %ld tx %ld\n",
cmnCell->dl.maxUePerDlSf, allocInfo->dedAlloc.txRetxHqPLst.count,
allocInfo->dedAlloc.retxHqPLst.count,
- allocInfo->dedAlloc.txHqPLst.count));
+ allocInfo->dedAlloc.txHqPLst.count);
#else
- RGSCHDBGERRNEW(cell->instIdx,(rgSchPBuf(cell->instIdx),"UEs selected by"
+ DU_LOG("\nERROR --> SCH : UEs selected by"
" scheduler exceed maximumUePerDlSf(%u)tx-retx %d retx %d tx %d\n",
cmnCell->dl.maxUePerDlSf, allocInfo->dedAlloc.txRetxHqPLst.count,
allocInfo->dedAlloc.retxHqPLst.count,
- allocInfo->dedAlloc.txHqPLst.count));
+ allocInfo->dedAlloc.txHqPLst.count);
#endif
}
}
/* LTE_ADV_FLAG_REMOVED_START */
if(cell->lteAdvCb.dsfrCfg.status == RGR_ENABLE)
{
- printf("5GTF_ERROR RETX rgSCHCmnNonDlfsDsfrRntpComp\n");
+ DU_LOG("\nINFO --> SCH : 5GTF_ERROR RETX rgSCHCmnNonDlfsDsfrRntpComp\n");
rgSCHCmnNonDlfsDsfrRntpComp(cell, allocInfo->dedAlloc.dedDlSf);
}
/* LTE_ADV_FLAG_REMOVED_END */
(proc->tbInfo[1].state == HQ_TB_NACKED))
{
#ifdef LAA_DBG_LOG
- printf ("RETX RB TM3 nack for both hqp %d cell %d \n", proc->procId, proc->hqE->cell->cellId);
+ DU_LOG("\nDEBUG --> SCH : RETX RB TM3 nack for both hqp %d cell %d \n", proc->procId, proc->hqE->cell->cellId);
#endif
/* Both TBs require RETX allocation */
rgSCHCmnDlTM3RetxRetx(cell, subFrm, ue, bo, effBo,\
if (frthrScp)
{
#ifdef LAA_DBG_LOG
- printf ("TX RETX called from proc %d cell %d \n",proc->procId, cell->cellId);
+ DU_LOG("\nDEBUG --> SCH : TX RETX called from proc %d cell %d \n",proc->procId, cell->cellId);
#endif
ret = rgSCHCmnDlAlloc2CwTxRetxRb(cell, subFrm, ue, retxTb, txTb,\
&numRb, effBo);
)
{
#if (ERRCLASS & ERRCLS_DEBUG)
- RLOG_ARG1(L_ERROR,DBG_CELLID,cell->cellId, "Invalid TM 5 for CRNTI:%d",ue->ueId);
+ DU_LOG("\nERROR --> SCH : Invalid TM 5 for CRNTI:%d",ue->ueId);
#endif
return;
}
)
{
#if (ERRCLASS & ERRCLS_DEBUG)
- RLOG_ARG1(L_ERROR,DBG_CELLID,cell->cellId, "Invalid TM 5 for CRNTI:%d",ue->ueId);
+ DU_LOG("\nERROR --> SCH : Invalid TM 5 for CRNTI:%d",ue->ueId);
#endif
return;
}
(allocInfo->tbInfo[1].bytesReq >= ueDl->maxTbSz/8) ||
(allocInfo->rbsReq >= ueDl->maxRb))
{
- RLOG_ARG0(L_DEBUG,DBG_CELLID,cell->cellId,
- "rgSCHCmnDlAllocRb(): UEs max allocation exceed");
+ DU_LOG("\nDEBUG --> SCH : rgSCHCmnDlAllocRb(): UEs max allocation exceed");
return RFAILED;
}
if(*numRb <= 3)
{
- RLOG1(L_ERROR," Number of RBs [%d] are less than or equal to 3",*numRb);
+ DU_LOG("\nERROR --> SCH : Number of RBs [%d] are less than or equal to 3",*numRb);
return RFAILED;
}
}
if(*numRb <= 3)
{
- RLOG1(L_ERROR," Number of RBs [%d] are less than or equal to 3",*numRb);
+ DU_LOG("\nERROR --> SCH : Number of RBs [%d] are less than or equal to 3",*numRb);
return RFAILED;
}
}
/* LTE_ADV_FLAG_REMOVED_START */
if(cell->siCb.siCtx.retxCntRem)
{
- RGSCHLOGERROR(cell->instIdx,ERRCLS_INT_PAR,ERG011,(ErrVal)cell->siCb.siCtx.siId,
- "rgSCHDlSiSched(): SI not scheduled and window expired");
+ DU_LOG("\nERROR --> SCH : rgSCHDlSiSched(): SI not scheduled and window expired");
}
/* LTE_ADV_FLAG_REMOVED_END */
if(cell->siCb.siCtx.warningSiFlag == TRUE)
* exceeds the available */
if (rb > sf->bw - sf->bwAssigned)
{
- RLOG_ARG1(L_ERROR,DBG_CELLID,cell->cellId, "rgSCHDlSiSched(): "
+ DU_LOG("\nERROR --> SCH : rgSCHDlSiSched(): "
"BW allocation failed CRNTI:%d",RGSCH_SI_RNTI);
return;
}
sizeof(RgrStaIndInfo));
if (retVal != ROK)
{
- RLOG_ARG1(L_ERROR,DBG_CELLID,cell->cellId, "Could not "
+ DU_LOG("\nERROR --> SCH : Could not "
"allocate memory for sending StaInd CRNTI:%d",ue->ueId);
return (retVal);
}
{
uint32_t idx = 0;
RgSchCmnCell *cellSch = RG_SCH_CMN_GET_CELL(cell);
-#ifdef DEBUGP
- Inst inst = cell->instIdx;
-#endif
for (idx = 0; (idx < RGINF_MAX_LCG_PER_UE - 1); idx++)
{
if (cellSch->apisEmtcUl->rgSCHRgrUlLcgUpd(cell, ue, datInd) != ROK)
{
- RGSCHDBGERRNEW(inst, (rgSchPBuf(inst), "\n rgSCHCmnUpdUeDataIndLcg(): rgSCHRgrUlLcgUpd returned failure"));
+ DU_LOG("\nERROR --> SCH : rgSCHCmnUpdUeDataIndLcg(): rgSCHRgrUlLcgUpd returned failure");
}
}
{
if (cellSch->apisUl->rgSCHRgrUlLcgUpd(cell, ue, datInd) != ROK)
{
- RGSCHDBGERRNEW(inst, (rgSchPBuf(inst), "\n rgSCHCmnUpdUeDataIndLcg(): rgSCHRgrUlLcgUpd returned failure"));
+ DU_LOG("\nERROR --> SCH : rgSCHCmnUpdUeDataIndLcg(): rgSCHRgrUlLcgUpd returned failure");
}
}
}
{
ul5gtfsidDlAlreadyMarkUl++;
/*
- printf("ul5gtfsidDlAlreadyMarkUl: %d, [sfn:sf] [%04d:%02d]\n",
+ DU_LOG("\nINFO --> SCH : ul5gtfsidDlAlreadyMarkUl: %d, [sfn:sf] [%04d:%02d]\n",
ul5gtfsidDlAlreadyMarkUl, cellSch->dl.time.sfn,
cellSch->dl.time.slot);
*/
/** @file rg_sch_dbm.c
@brief This file contains the APIs exposed for the database handling of the scheduler.
*/
-static const char* RLOG_MODULE_NAME="MAC";
-static int RLOG_FILE_ID=230;
-static int RLOG_MODULE_ID=4096;
/* header include files -- defines (.h) */
#include "common_def.h"
#include "lrg.h"
if (!(cellCb->rntiDb.freeRnti))
{
- RLOG_ARG1(L_ERROR,DBG_CELLID,cellCb->cellId,"RNTI exhausted count:%d",
+ DU_LOG("\nERROR --> SCH : RNTI exhausted count:%d",
cellCb->rntiDb.count);
return (NULLP);
}
cellCb->rntiDb.count--;
- printf("rgSCHDbmGetRnti::rntiLnk->rnti %u\n",rntiLnk->rnti);
+ DU_LOG("\nINFO --> SCH : rgSCHDbmGetRnti::rntiLnk->rnti %u\n",rntiLnk->rnti);
return (rntiLnk);
} /* rgSCHDbmGetRnti */
@brief APIs related to Downlink HARQ for the scheduler.
*/
-static const char* RLOG_MODULE_NAME="MAC";
-static int RLOG_FILE_ID=242;
-static int RLOG_MODULE_ID=4096;
/* header include files -- defines (.h) */
#include "common_def.h"
/* Init the HARQ data structure */
if (rgSCHUtlAllocSBuf(inst, (Data **)&hqE, sizeof(RgSchDlHqEnt)) != ROK)
{
- RLOG_ARG0(L_DEBUG,DBG_CELLID,cell->cellId,
- "rgSCHDhmHqEntInit hqE alloc fail");
+ DU_LOG("\nERROR --> SCH: rgSCHDhmHqEntInit hqE alloc fail");
return (NULLP);
}
#ifdef LTE_TDD
if (rgSCHUtlAllocSBuf(inst, (Data **)&hqE->procs,
hqE->numHqPrcs * sizeof(RgSchDlHqProcCb)) != ROK)
{
- RLOG_ARG0(L_DEBUG,DBG_CELLID,cell->cellId,
- "rgSCHDhmHqEntInit hqP alloc fail in hqE");
+ DU_LOG("\nERROR --> SCH: rgSCHDhmHqEntInit hqP alloc fail in hqE");
return (NULLP);
}
#else
if (hqE == NULLP)
{
- RLOG_ARG1(L_ERROR,DBG_CELLID,cell->cellId, "rgSCHDhmGetAvlHqProc hqE NULL ue %d"
+ DU_LOG("\nERROR --> SCH : rgSCHDhmGetAvlHqProc hqE NULL ue %d"
, ue->ueId);
return RFAILED;
}
if (NULLP == tmp)
{
- RLOG_ARG3(L_ERROR,DBG_CELLID,cell->cellId,
- "rgSCHDhmGetAvlHqProc free %ld inUse %ld ue %d"
+ DU_LOG("\nERROR --> SCH : rgSCHDhmGetAvlHqProc free %d inUse %d ue %d"
, hqE->free.count, hqE->inUse.count, ue->ueId);
/* No Harq Process available in the free queue. */
return RFAILED;
if (hqE->free.count > 8)
{
int *p = NULL;
- printf("Crashing invalid hq count after free \n");
- printf("Crashing %d \n", *p);
+ printf("\nDEBUG --> SCH: Crashing invalid hq count after free \n");
+ printf("\nDEBUG --> SCH: Crashing %d \n", *p);
*p = 10;
}
#endif
else
{
#ifdef DEBUGP
- RLOG_ARG1(L_ERROR,DBG_CELLID,cell->cellId, "Trying to add CRNTI:%d into TA"
+ DU_LOG("\nERROR --> SCH : Trying to add CRNTI:%d into TA"
"ACK List twice", ueCb->ueId);
#endif
}
hqP->hqE->ue->dl.taCb.state = RGSCH_TA_IDLE;
rgSCHUtlReTxTa(cell, ueCb);
- RLOG_ARG0(L_DEBUG,DBG_CELLID,cell->cellId,
- "Nack Rcvd for TA. Max Tries Attempted");
+ DU_LOG("\nERROR --> SCH : Nack Rcvd for TA. Max Tries Attempted");
}
break;
case TFU_HQFDB_DTX:
#ifdef RGR_V1
if(hqP->hqE->raCb->expiryTime.sfn == RGSCH_CONTRES_EXP)
{
- RLOG_ARG1(L_DEBUG,DBG_CELLID,cell->cellId,
- "rgSCHDhmHqTbTrnsFail contRes exp(): tmpCRNTI = %u",
+ DU_LOG("\nDEBUG --> SCH : rgSCHDhmHqTbTrnsFail contRes exp(): tmpCRNTI = %u",
hqP->hqE->raCb->tmpCrnti);
rgSCHRamMsg4Done(cell, (RgSchRaCb *)hqP->hqE->raCb);
return;
#endif
/* Perform RAM MSG4 done processing */
- RLOG_ARG1(L_DEBUG,DBG_CELLID,cell->cellId,
- "rgSCHDhmHqTbTrnsFail(): hq max retx fail: tmpCRNTI = %u",
+ DU_LOG("\nDEBUG --> SCH : rgSCHDhmHqTbTrnsFail(): hq max retx fail: tmpCRNTI = %u",
hqP->hqE->raCb->tmpCrnti);
rgSCHRamMsg4Done(cell, (RgSchRaCb *)hqP->hqE->raCb);
}
if ( found == FALSE )
{
RGSCH_NULL_CHECK(cellCb->instIdx, ue);
- RLOG_ARG3(L_ERROR,DBG_CELLID,cellCb->cellId,"CRNTI:%d"
- " NO HARQ proc available for feedback:timeInfo:snf %d,slot %d",
+ DU_LOG("\nERROR --> SCH : NO HARQ proc available for feedback:timeInfo:snf %d,slot %d",
ue->ueId,timeInfo.sfn, timeInfo.slot);
err->errType = RGSCHERR_DHM_FDBK_IND;
err->errCause = RGSCHERR_DHM_FDBK_IND_INVALID_CB;
{
raCb = rgSCHDbmGetRaCb(cell, rnti);
}
- RGSCHDBGINFO(cell->instIdx,
- (rgSchPBuf(cell->instIdx), "Ack Rcvd. FdbkInd for Msg4Done\n"));
+ DU_LOG("\nDEBUG --> SCH: Ack Rcvd. FdbkInd for Msg4Done\n");
/* Inform Random Access Module regarding the ack received */
if (raCb != NULLP)
{
/*RRC Connection Setup failure issue where RRC connection
* setup was not reaching UE due to message 4 HARQ failure */
- printf("\nMSG4 Ack ,calling rgSCHRamMsg4Done\n");
+ printf("\nDEBUG --> SCH: MSG4 Ack ,calling rgSCHRamMsg4Done\n");
ret = rgSCHRamMsg4Done(cell, raCb);
hqFreed = TRUE;
}
else
{
- printf("\nraCb is NULLP\n");
+ printf("\nDEBUG --> SCH: raCb is NULLP\n");
}
}
else /*ccpu00114124- HARQ Release for Msg4 */
{
if (!sf->relPdcch)
{
- RLOG_ARG3(L_ERROR,DBG_CELLID,cell->cellId,
- "CRNTI:%d NO HARQ proc available for feedback: TimingInfo: "
+ DU_LOG("\nERROR --> SCH : CRNTI:%d NO HARQ proc available for feedback: TimingInfo: "
"sfn %d slot %d", ue->ueId, timingInfo.sfn,
timingInfo.slot);
return RFAILED;
rgSCHUtlReTxTa(cellCb, ue);
- RLOG_ARG0(L_DEBUG,DBG_CELLID,cellCb->cellId,
- "Nack/DTX Rcvd for TA. Max Tries Attempted");
+ DU_LOG("\nDEBUG --> SCH : Nack/DTX Rcvd for TA. Max Tries Attempted");
}
}
}
ue->dl.taCb.state = RGSCH_TA_IDLE;
rgSCHUtlReTxTa(cellCb, ue);
- RLOG_ARG0(L_DEBUG,DBG_CELLID,cellCb->cellId,
- "Nack/DTX Rcvd for TA. Max Tries Attempted");
+ DU_LOG("\nDEBUG --> SCH : Nack/DTX Rcvd for TA. Max Tries Attempted");
}
}
ueDl->laCb[tbCnt].deltaiTbs = ueDl->laCb[tbCnt].deltaiTbs - DL_LA_STEPDOWN;
}
/*
- printf("deltaiTbs[%d] cqibasediTbs[%d] iTbs[%d] tbCnt[%d]\n",
+ printf("\nDEBUG --> SCH: deltaiTbs[%d] cqibasediTbs[%d] iTbs[%d] tbCnt[%d]\n",
ueDl->laCb[tbCnt].deltaiTbs, ueDl->laCb[tbCnt].cqiBasediTbs,
(ueDl->laCb[tbCnt].deltaiTbs + ueDl->laCb[tbCnt].cqiBasediTbs)/100,
tbCnt);
if (hqP->hqPLst)
{
int *p = NULL;
- printf("Crashing already part of free lst\n");
- printf("Crashing %d \n", *p);
+ printf("\nDEBUG --> SCH: Crashing already part of free lst\n");
+ printf("\nDEBUG --> SCH: Crashing %d \n", *p);
*p = 10;
}
#endif
if (hqP->hqE->free.count > 8)
{
int *p = NULL;
- printf("Crashing invalid hq count\n");
- printf("Crashing %d \n", *p);
+ printf("\nDEBUG --> SCH: Crashing invalid hq count\n");
+ printf("\nDEBUG --> SCH: Crashing %d \n", *p);
*p = 10;
}
#endif
if (hqP->hqPLst)
{
int *p = NULL;
- printf("Crashing already part of inuse lst\n");
- printf("Crashing %d \n", *p);
+ printf("\nDEBUG --> SCH: Crashing already part of inuse lst\n");
+ printf("\nDEBUG --> SCH: Crashing %d \n", *p);
*p = 10;
}
#endif
if (hqP->hqE->inUse.count > 8)
{
int *p = NULL;
- printf("Crashing invalid hq count \n");
- printf("Crashing %d \n", *p);
+ printf("\nDEBUG --> SCH: Crashing invalid hq count \n");
+ printf("\nDEBUG --> SCH: Crashing %d \n", *p);
*p = 10;
}
#endif
if (!hqP->hqPLst)
{
int *p = NULL;
- printf("Crashing not part of any lst\n");
- printf("Crashing %d \n", *p);
+ printf("\nDEBUG --> SCH: Crashing not part of any lst\n");
+ printf("\nDEBUG --> SCH: Crashing %d \n", *p);
*p = 10;
}
#endif
if (hqP->hqPLst != &hqP->hqE->free)
{
int *p = NULL;
- printf("Crashing del from wrong lst\n");
- printf("Crashing %d \n", *p);
+ printf("\nDEBUG --> SCH: Crashing del from wrong lst\n");
+ printf("\nDEBUG --> SCH: Crashing %d \n", *p);
*p = 10;
}
#endif
if (hqP->hqE->free.count > 8)
{
int *p = NULL;
- printf("Crashing invalid hq count\n");
- printf("Crashing %d \n", *p);
+ printf("\nDEBUG --> SCH: Crashing invalid hq count\n");
+ printf("\nDEBUG --> SCH: Crashing %d \n", *p);
*p = 10;
}
#endif
if (!hqP->hqPLst)
{
int *p = NULL;
- printf("Crashing not part of any lst\n");
- printf("Crashing %d \n", *p);
+ printf("\nDEBUG --> SCH: Crashing not part of any lst\n");
+ printf("\nDEBUG --> SCH: Crashing %d \n", *p);
*p = 10;
}
if (hqP->hqPLst != &hqP->hqE->inUse)
{
int *p = NULL;
- printf("Crashing del from wrong lst\n");
- printf("Crashing %d \n", *p);
+ printf("\nDEBUG --> SCH: Crashing del from wrong lst\n");
+ printf("\nDEBUG --> SCH: Crashing %d \n", *p);
*p = 10;
}
#endif
if (hqP->hqE->inUse.count > 8)
{
int *p = NULL;
- printf("Crashing invalid hq count\n");
- printf("Crashing %d \n", *p);
+ printf("\nDEBUG --> SCH: Crashing invalid hq count\n");
+ printf("\nDEBUG --> SCH: Crashing %d \n", *p);
*p = 10;
}
#endif
@brief This file implements the DRX processing .
*/
-static const char* RLOG_MODULE_NAME="MAC";
-static int RLOG_MODULE_ID=4096;
-static int RLOG_FILE_ID=163;
/* header include files -- defines (.h) */
#include "common_def.h"
||
(ueCfg == (RgrUeCfg* )NULLP))
{
- RLOG_ARG0(L_ERROR,DBG_CELLID,cell->cellId, "rgSCHDrxUeCfg():"
+ DU_LOG("\nERROR --> SCH : rgSCHDrxUeCfg():"
"Invalid params.cell or ue or ueCfg is NULL ");
return RFAILED;
}
if(ret != ROK)
{
- RLOG_ARG1(L_ERROR,DBG_CELLID,cell->cellId,
- "Memory allocation FAILED for DRX UECB CRBTI:%d",ue->ueId);
+ DU_LOG("\nERROR --> SCH : Memory allocation FAILED for DRX UECB CRBTI:%d",ue->ueId);
return (ret);
}
ueDrxCb->distance = (nxtOnDurTime - curTime) / RG_SCH_MAX_DRXQ_SIZE;
if (ueDrxCb->distance < 0)
{
- RLOG_ARG2(L_ERROR,DBG_CELLID,cell->cellId, "DRXUE. Invalid "
+ DU_LOG("\nERROR --> SCH : DRXUE. Invalid "
"value for distance, %d CRNTI:%d", ueDrxCb->distance,ue->ueId);
}
- //printf("The onduartion index is: %d\n",(int)onDurIndx);
+ //DU_LOG("\nDEBUG --> SCH : The onduartion index is: %d\n",(int)onDurIndx);
cmLListAdd2Tail(&(cell->drxCb->drxQ[onDurIndx].onDurationQ),
&(ueDrxCb->onDurationEnt));
(nxtOnDur == (CmLteTimingInfo* )NULLP)
)
{
- RLOG_ARG0(L_ERROR,DBG_CELLID,cell->cellId,
- "rgSCHDrxGetNxOnDur():Invalid params."
+ DU_LOG("\nERROR --> SCH : rgSCHDrxGetNxOnDur():Invalid params."
"cell/drxCb/nxtOnDur is NULL");
return RFAILED;
}
if ( ret != ROK )
{
- RLOG_ARG1(L_ERROR,DBG_CELLID,cell->cellId,
- "rgSCHdrxUeReCfg():""Memory allocation FAILED for DRX UE Cb CRNTI:%d",
+ DU_LOG("\nERROR --> SCH : rgSCHdrxUeReCfg():""Memory allocation FAILED for DRX UE Cb CRNTI:%d",
ue->ueId);
return (ret);
}
if((ueDrxCb->onDurExpIndx != DRX_INVALID) && (ueDrxCb->onDurExpDistance != DRX_TMR_EXPRD))
{
curIndx = (curTime + RG_SCH_DRX_DL_DELTA) % RG_SCH_MAX_DRXQ_SIZE;
- RLOG_ARG3(L_DEBUG,DBG_CELLID,cell->cellId,
- "OLD ONDUR RUNNING-EXPIRES at %d curIdx-%d nxtOnDurTime-%d",
+ DU_LOG("\nDEBUG --> SCH : OLD ONDUR RUNNING-EXPIRES at %d curIdx-%d nxtOnDurTime-%d",
ueDrxCb->onDurExpIndx,
curIndx,
nxtOnDurTime);
/* Manipulating the time when old onDuration timer can expire */
if(curIndx >= ueDrxCb->onDurExpIndx)
{
- onDurExpTime = curTime + ((ueDrxCb->onDurExpDistance+1) * RG_SCH_MAX_DRXQ_SIZE)+ (ueDrxCb->onDurExpIndx - curIndx + RG_SCH_DRX_DL_DELTA);
+ onDurExpTime = curTime + ((ueDrxCb->onDurExpDistance+1) * RG_SCH_MAX_DRXQ_SIZE)+\
+ (ueDrxCb->onDurExpIndx - curIndx + RG_SCH_DRX_DL_DELTA);
}
else
{
- onDurExpTime = curTime + (ueDrxCb->onDurExpDistance * RG_SCH_MAX_DRXQ_SIZE)+ (ueDrxCb->onDurExpIndx - curIndx + RG_SCH_DRX_DL_DELTA);
+ onDurExpTime = curTime + (ueDrxCb->onDurExpDistance * RG_SCH_MAX_DRXQ_SIZE)+\
+ (ueDrxCb->onDurExpIndx - curIndx + RG_SCH_DRX_DL_DELTA);
}
if(nxtOnDurTime <= onDurExpTime)
ueDrxCb->distance = (nxtOnDurTime - curTime) / RG_SCH_MAX_DRXQ_SIZE;
if (ueDrxCb->distance < 0)
{
- RLOG_ARG2(L_ERROR,DBG_CELLID,cell->cellId,"DRXUE. Invalid "
+ DU_LOG("\nERROR --> SCH : DRXUE. Invalid "
"value for distance, %d CRNTI:%d", ueDrxCb->distance,ue->ueId);
}
/*KWORK_FIX :Removed check for cell being NULL*/
if( (cellCfg == (RgrCellCfg* )NULLP))
{
- RLOG_ARG0(L_ERROR,DBG_CELLID,cell->cellId,
- "rgSCHDrxCellCfg():Invalid Params. cell/cellCfg is NULL");
+ DU_LOG("\nERROR --> SCH : rgSCHDrxCellCfg():Invalid Params. cell/cellCfg is NULL");
return RFAILED;
}
#endif
if(ret != ROK)
{
- RLOG_ARG0(L_ERROR,DBG_CELLID,cell->cellId,"rgSCHDrxCellCfg():"
+ DU_LOG("\nERROR --> SCH : rgSCHDrxCellCfg():"
"Memory allocation FAILED for DRX cell Cb");
return (ret);
}
if( (ue == (RgSchUeCb* )NULLP))
{
- RLOG_ARG0(L_ERROR,DBG_CELLID,cell->cellId,
- "rgSCHDrxSrInd():Invalid Params. cell/ue is NULL");
+ DU_LOG("\nERROR --> SCH : rgSCHDrxSrInd():Invalid Params. cell/ue is NULL");
return RFAILED;
}
#endif
drxUe->distance = (nxtOnDurInSf-curTime) / RG_SCH_MAX_DRXQ_SIZE;
if (drxUe->distance < 0)
{
- RLOG_ARG2(L_ERROR,DBG_CELLID,cell->cellId,"DRXUE. Invalid "
+ DU_LOG("\nERROR --> SCH : DRXUE. Invalid "
"value for distance, %d CRNTI:%d", drxUe->distance,ueCb->ueId);
}
}
}
if (*distance < 0)
{
- RLOG_ARG2(L_ERROR,DBG_CELLID,cell->cellId, "DRXUE. Invalid "
+ DU_LOG("\nERROR --> SCH : DRXUE. Invalid "
"value for distance, %d CRNTI:%d", *distance,ue->ueId);
}
}
drxCell = (cell->drxCb);
delInUlScan = drxCell->delInUlScan;
- //printf("CELL Timer [SFN : %d],[SF : %d]\n",cell->crntTime.sfn,cell->crntTime.slot);
+ //DU_LOG("\nINFO --> SCH : CELL Timer [SFN : %d],[SF : %d]\n",cell->crntTime.sfn,cell->crntTime.slot);
node = drxCell->drxQ[dlIndex].onDurationQ.first;
/* Temporary fix to delete stale entry */
if (drxUe->onDurExpIndx != DRX_INVALID)
{
- RLOG_ARG4(L_DEBUG,DBG_CELLID,cell->cellId,
- "UEID:%d PreExisted[%d:%d]in onDurExpQ new[%d]",
+ DU_LOG("\nDEBUG --> SCH : UEID:%d PreExisted[%d:%d]in onDurExpQ new[%d]",
ue->ueId,
drxUe->onDurExpIndx,
drxUe->onDurExpDistance,
cmLListAdd2Tail(&(drxCell->drxQ[expiryIndex].onDurationExpQ),
&(drxUe->onDurationExpEnt));
- //printf("DRXOnDuration Timer Started at [SFN : %d],[SF : %d]\n",cell->crntTime.sfn,cell->crntTime.slot);
+ //DU_LOG("\nINFO --> SCH : DRXOnDuration Timer Started at [SFN : %d],[SF : %d]\n",cell->crntTime.sfn,cell->crntTime.slot);
drxUe->onDurationExpEnt.node = (PTR)ue;
drxUe->onDurExpIndx = expiryIndex;
- //printf("DRxOnDuration will Expire = [%d]\n",(cell->crntTime.sfn*10+cell->crntTime.slot+drxUe->onDurTmrLen));
+ //DU_LOG("\nINFO --> SCH : DRxOnDuration will Expire = [%d]\n",\
+ (cell->crntTime.sfn*10+cell->crntTime.slot+drxUe->onDurTmrLen));
if ( delInUlScan == FALSE )
{
}
else
{
- RLOG_ARG4(L_ERROR,DBG_CELLID,cell->cellId,"CRNTI:%d "
+ DU_LOG("\nERROR --> SCH : CRNTI:%d "
"Adding Retx Node to expire at RetxIndx: %d at dlIndex %d "
"drxHq->reTxIndx %d", ue->ueId, reTxExpIndx, dlIndex,
drxHq->reTxIndx);
invoked by RRM towards MAC.
*/
-static const char* RLOG_MODULE_NAME="MAC";
-static int RLOG_MODULE_ID=4096;
-static int RLOG_FILE_ID=164;
/* header include files -- defines (.h) */
#include "common_def.h"
CmLteCellId cellId;
RgSchCellCb *cell = NULLP;
uint8_t cfmStatus = RGR_CFG_CFM_NOK;
-#ifdef DEBUGP
- Inst inst = (instCb->rgSchInit.inst );
-#endif
/* Apply the configuration for Cell Configuration or Delete */
if (cfgReqInfo->action != RGR_RECONFIG)
/* Fetch the cell Id for the recieved request */
if((rgSCHGomGetCellIdFrmCfgReq(cfgReqInfo, &cellId)) != ROK)
{
- RLOG_ARG0(L_ERROR,DBG_INSTID,inst, "Action.Config Type Error");
+ DU_LOG("\nERROR --> SCH : Action.Config Type Error");
SPutSBuf(pst->region, pst->pool, (Data *)cfgReqInfo,
(Size)sizeof(*cfgReqInfo));
{
if(cellId != instCb->rgrSap[spId].cell->cellId)
{
- RLOG_ARG2(L_ERROR,DBG_CELLID,cellId, "Cell with Id %d already exists "
+ DU_LOG("\nERROR --> SCH : Cell with Id %d already exists "
"on sap %d", instCb->rgrSap[spId].cell->cellId, spId);
SPutSBuf(pst->region, pst->pool, (Data *)cfgReqInfo,
ret = rgSCHGomEnqCfgReq(pst->region, pst->pool, cell, transId, cfgReqInfo);
if (ret != ROK)
{
- RLOG_ARG0(L_ERROR,DBG_CELLID,cellId, "rgSCHGomHndlCfg: Enqueuing CfgReq "
+ DU_LOG("\nERROR --> SCH : rgSCHGomHndlCfg: Enqueuing CfgReq "
"Failed ");
SPutSBuf(pst->region, pst->pool, (Data *)cfgReqInfo,
uint8_t cfmStatus = RGR_CFG_CFM_OK;
S16 ret;
RgSchErrInfo errInfo;
-#ifdef DEBUGP
- Inst inst = (instCb->rgSchInit.inst );
-#endif
#ifdef EMTC_ENABLE
-printf("\n AT MAC rgSCHGomCfgReq \n");
+printf("\nDEBUG --> SCH: AT MAC rgSCHGomCfgReq \n");
#endif
/* Process Config/Reconfig/Delete request from RRM */
#endif /* LTE_ADV */
default:
{
- RLOG_ARG1(L_ERROR,DBG_INSTID,inst, "Invalid configuration "
+ DU_LOG("\nERROR --> SCH : Invalid configuration "
"action %d", cfgReqInfo->action);
ret = RFAILED;
}
(Size)sizeof(*cfgReqInfo));
cfgReqInfo = NULLP;
#ifdef EMTC_ENABLE
-printf("\n AT MAC sending RGR cfg cfm \n");
+printf("\nDEBUG --> SCH: AT MAC sending RGR cfg cfm \n");
#endif
/* Send back confirmation status to RRM */
schSendCfgCfm(reg, pool, transId, cfmStatus);
#ifdef EMTC_ENABLE
-printf("\n AT MAC RGR cfg cfm sent\n");
+printf("\nDEBUG --> SCH: AT MAC RGR cfg cfm sent\n");
#endif
return (ret);
if (actvTime.sfn >= RGSCH_MAX_SFN
|| actvTime.slot >= RGSCH_NUM_SUB_FRAMES_5G)
{
- RLOG_ARG4(L_ERROR,DBG_CELLID,cell->cellId, "Invalid activation time for RGR "
+ DU_LOG("\nERROR --> SCH : Invalid activation time for RGR "
"config request: activation sfn %d activation slot %d current "
"sfn %d current slot %d", actvTime.sfn, actvTime.slot,
cell->crntTime.sfn, cell->crntTime.slot);
if (sfDiff > (RGR_ACTV_WIN_SIZE * RGSCH_NUM_SUB_FRAMES_5G))
{
- RLOG_ARG4(L_ERROR,DBG_CELLID,cell->cellId,"Invalid activation time for RGR"
+ DU_LOG("\nERROR --> SCH : Invalid activation time for RGR"
" config request: activation sfn %d activation slot %d "
"current sfn %d current slot %d", actvTime.sfn,
actvTime.slot, cell->crntTime.sfn, cell->crntTime.slot);
ret = rgSCHCfgVldtRgrCellCfg(inst, &cfg->u.cellCfg, cell, errInfo);
if (ret != ROK)
{
- RLOG1(L_ERROR,"Rgr Cell configuration "
+ DU_LOG("\nERROR --> SCH : Rgr Cell configuration "
"validation FAILED: Cell %d", cfg->u.cellCfg.cellId);
return RFAILED;
}
ret = rgSCHCfgVldtRgrUeCfg(inst, &cfg->u.ueCfg, &cell, errInfo);
if (ret != ROK)
{
- RLOG1(L_ERROR,"Ue configuration validation"
+ DU_LOG("\nERROR --> SCH : Ue configuration validation"
" FAILED: CRNTI:%d", cfg->u.ueCfg.crnti);
return RFAILED;
}
ret = rgSCHCfgVldtRgrLcCfg(inst, &cfg->u.lchCfg, &cell, &ue, errInfo);
if (ret != ROK)
{
- RLOG1(L_ERROR,"LC configuration validation "
+ DU_LOG("\nERROR --> SCH : LC configuration validation "
"FAILED: LCID:%d", cfg->u.lchCfg.lcId);
return RFAILED;
}
ret = rgSCHCfgVldtRgrLcgCfg(inst, &cfg->u.lcgCfg, &cell, &ue, errInfo);
if (ret != ROK)
{
- RLOG1(L_ERROR,"LCG configuration validation "
+ DU_LOG("\nERROR --> SCH : LCG configuration validation "
"FAILED: LCGID:%d", cfg->u.lcgCfg.ulInfo.lcgId);
return RFAILED;
}
ret = rgSCHCfgVldtRgrSchedEnbCfg(inst, &cfg->u.schedEnbCfg, errInfo);
if (ret != ROK)
{
- RGSCHDBGERR(inst,(rgSchPBuf(inst), "SCH ENB configuration validation "
- "FAILED: \n" ));
+ DU_LOG("\nERROR --> SCH : SCH ENB configuration validation FAILED: \n");
return RFAILED;
}
ret = rgSCHCfgRgrSchedEnbCfg(inst, spId, &cfg->u.schedEnbCfg, errInfo);
default:
{
#if(ERRCLASS & ERRCLS_INT_PAR)
- RLOG1(L_ERROR,"Should never come here: "
+ DU_LOG("\nERROR --> SCH : Should never come here: "
"cfgType %d", cfg->cfgType);
#endif
return RFAILED;
RgSchCellCb *cell = instCb->rgrSap[spId].cell;
Inst inst = (instCb->rgSchInit.inst);
- RGSCHDBGPRM(inst,(rgSchPBuf(inst), "Processing RGR SCell Actication request:"
+ DU_LOG(("\nDEBUG --> SCH : Processing RGR SCell Actication request:"
"%d\n", sCellActDeactEvnt->crnti));
errInfo->errType = RGSCHERR_GOM_SCELL_REQ;
/* Fetch the Ue */
if ((ue = rgSCHDbmGetUeCb(cell, sCellActDeactEvnt->crnti)) == NULLP)
{
- RGSCHDBGERRNEW(inst, (rgSchPBuf(inst), "[%d]UE: does not exist\n",
+ DU_LOG(("\nERROR --> SCH : [%d]UE: does not exist\n",
sCellActDeactEvnt->crnti));
return RFAILED;
}
if (ROK != (rgSCHSCellTrigActDeact(cell, ue, sCellIdx, action)))
{
- RGSCHDBGERR(inst,(rgSchPBuf(inst), "SCell Actication failed"
+ DU_LOG("\nERROR --> SCH : SCell Actication failed"
"for UE [%d] with SCellIdx [%d]\n",
- sCellActDeactEvnt->crnti, idx));
+ sCellActDeactEvnt->crnti, idx);
return RFAILED;
}
- }
- RGSCHDBGINFO(inst,(rgSchPBuf(inst), "RGR Reconfiguration processed\n"));
+ DU_LOG("\nINFO --> SCH : RGR Reconfiguration processed\n");
return ROK;
} /* rgSCHGomHndlSCellActDeactReq */
errInfo);
if (ret != ROK)
{
- RLOG_ARG0(L_ERROR,DBG_CELLID,recfg->u.cellRecfg.cellId,"Rgr Cell Recfg Validation "
+ DU_LOG("\nERROR --> SCH : Rgr Cell Recfg Validation "
"FAILED");
return RFAILED;
}
ret = rgSCHCfgVldtRgrUeRecfg(inst, &recfg->u.ueRecfg, &cell, &ue, errInfo);
if ( ret != ROK)
{
- RLOG_ARG1(L_ERROR,DBG_CELLID,recfg->u.ueRecfg.cellId,"Ue Recfg Validation FAILED"
+ DU_LOG("\nERROR --> SCH : Ue Recfg Validation FAILED"
"OLD CRNTI:%d",recfg->u.ueRecfg.oldCrnti);
return RFAILED;
}
&dlLc, errInfo);
if (ret != ROK)
{
- RLOG_ARG1(L_ERROR,DBG_CELLID,recfg->u.lchRecfg.cellId,"Lc Recfg Validation FAILED"
+ DU_LOG("\nERROR --> SCH : Lc Recfg Validation FAILED"
"LCID:%d",recfg->u.lchRecfg.lcId);
return RFAILED;
}
errInfo);
if (ret != ROK)
{
- RLOG_ARG1(L_ERROR,DBG_CELLID,recfg->u.lcgRecfg.cellId, "Lcg Recfg Validation FAILED"
+ DU_LOG("\nERROR --> SCH : Lcg Recfg Validation FAILED"
"LCGID:%d",recfg->u.lcgRecfg.ulRecfg.lcgId);
return RFAILED;
}
default:
{
#if(ERRCLASS & ERRCLS_INT_PAR)
- RLOG1(L_ERROR,"Should never come here: recfgType %d", recfg->recfgType);
+ DU_LOG("\nERROR --> SCH : Should never come here: recfgType %d", recfg->recfgType);
#endif
return RFAILED;
}
ret = rgSCHCfgVldtRgrUeReset(inst, reset, cell, &ue, errInfo);
if (ret != ROK)
{
- RLOG_ARG1(L_ERROR,DBG_CELLID,reset->cellId,"Rgr UE Reset Validation FAILED"
+ DU_LOG("\nERROR --> SCH : Rgr UE Reset Validation FAILED"
"CRNTI:%d",reset->crnti);
return RFAILED;
}
ret = rgSCHCfgRgrUeReset(cell, ue, reset, errInfo);
if (ret != ROK)
{
- RLOG_ARG1(L_ERROR,DBG_CELLID,reset->cellId,"Rgr UE Reset FAILED"
+ DU_LOG("\nERROR --> SCH : Rgr UE Reset FAILED"
"CRNTI:%d",reset->crnti);
return RFAILED;
}
{
S16 ret;
-#ifdef DEBUGP
- Inst inst = (instCb->rgSchInit.inst);
-#endif
volatile uint32_t startTime=0;
errInfo->errType = RGSCHERR_GOM_DEL_REQ;
if(instCb->rgrSap[spId].cell == NULLP)
{
- RLOG_ARG0(L_ERROR,DBG_INSTID,inst,"Cell doesnt exist");
+ DU_LOG("\nERROR --> SCH : Cell doesnt exist");
return RFAILED;
}
default:
{
#if(ERRCLASS & ERRCLS_INT_PAR)
- RLOG1(L_ERROR,"Should never come here: delType %d", del->delType);
+ DU_LOG("\nERROR --> SCH : Should never come here: delType %d", del->delType);
#endif
return RFAILED;
}
/* check if cell does not exists */
if (((uint8_t *)cell == NULLP) || (cell->cellId != cfgReqInfo->cellId))
{
- RLOG_ARG0(L_ERROR,DBG_CELLID,cfgReqInfo->cellId,"Cell Control block does not exist"
- );
+ DU_LOG("\nERROR --> SCH : Cell Control block does not exist");
RGSCH_FREE_MSG(cfgReqInfo->pdu);
SPutSBuf(reg, pool, (Data *)cfgReqInfo, (Size)sizeof(*cfgReqInfo));
cfgReqInfo = NULLP;
ret = rgSCHCfgVldtRgrSiCfg(inst, cfgReqInfo, cell, &errInfo);
if (ret != ROK)
{
- RLOG_ARG0(L_ERROR,DBG_CELLID,cfgReqInfo->cellId,"Rgr SI configuration "
+ DU_LOG("\nERROR --> SCH : Rgr SI configuration "
"validation FAILED");
RGSCH_FREE_MSG(cfgReqInfo->pdu);
SPutSBuf(reg, pool, (Data *)cfgReqInfo, (Size)sizeof(*cfgReqInfo));
if ( SGetSBuf(reg,pool,&padding,nmPadBytes) != ROK)
{
- RLOG_ARG0(L_ERROR,DBG_CELLID,cfgReqInfo->cellId,"Rgr SI configuration "
+ DU_LOG("\nERROR --> SCH : Rgr SI configuration "
"SGetSBuf failed for padding failed");
SPutSBuf(reg, pool, (Data *)cfgReqInfo, (Size)sizeof(*cfgReqInfo));
cfgReqInfo = NULLP;
#endif
if ( SAddPstMsgMult((Data*)padding,nmPadBytes,cfgReqInfo->pdu) != ROK)
{
- RLOG_ARG0(L_ERROR,DBG_CELLID,cfgReqInfo->cellId,"Rgr SI configuration "
+ DU_LOG("\nERROR --> SCH : Rgr SI configuration "
"Failed to add padding bytes");
SPutSBuf(reg, pool, (Data *)cfgReqInfo, (Size)sizeof(*cfgReqInfo));
cfgReqInfo = NULLP;
ret = rgSCHUtlCalMcsAndNPrb(cell, cfgReqInfo->cfgType, pduLen,0);
if (ret != ROK)
{
- RLOG_ARG0(L_ERROR,DBG_CELLID,cfgReqInfo->cellId,"Failed to get MCS and NPRB"
+ DU_LOG("\nERROR --> SCH : Failed to get MCS and NPRB"
"value");
RGSCH_FREE_MSG(cfgReqInfo->pdu);
SPutSBuf(reg, pool, (Data *)cfgReqInfo, (Size)sizeof(*cfgReqInfo));
ret = rgSCHUtlCalMcsAndNPrb(cell, cfgReqInfo->cfgType, pduLen,0);
if (ret != ROK)
{
- RLOG_ARG0(L_ERROR,DBG_CELLID,cfgReqInfo->cellId,"Failed to get MCS and NPRB"
+ DU_LOG("\nERROR --> SCH : Failed to get MCS and NPRB"
"value");
RGSCH_FREE_MSG(cfgReqInfo->pdu);
SPutSBuf(reg, pool, (Data *)cfgReqInfo, (Size)sizeof(*cfgReqInfo));
cfgReqInfo->siId);
if (ret != ROK)
{
- RLOG_ARG0(L_ERROR,DBG_CELLID,cfgReqInfo->cellId,"Failed to get MCS and NPRB"
+ DU_LOG("\nERROR --> SCH : Failed to get MCS and NPRB"
"value");
RGSCH_FREE_MSG(cfgReqInfo->pdu);
SPutSBuf(reg, pool, (Data *)cfgReqInfo, (Size)sizeof(*cfgReqInfo));
cfgReqInfo->siId);
if (ret != ROK)
{
- RLOG_ARG0(L_ERROR,DBG_CELLID,cfgReqInfo->cellId,"Failed to get MCS and NPRB"
+ DU_LOG("\nERROR --> SCH : Failed to get MCS and NPRB"
"value");
RGSCH_FREE_MSG(cfgReqInfo->pdu);
SPutSBuf(reg, pool, (Data *)cfgReqInfo, (Size)sizeof(*cfgReqInfo));
cell->siCb.siArray[cfgReqInfo->siId-1].isWarningSi = FALSE;
break;
default:
- RLOG_ARG0(L_ERROR,DBG_CELLID,cfgReqInfo->cellId,"Invalid cfgType "
+ DU_LOG("\nERROR --> SCH : Invalid cfgType "
"parameter value");
RGSCH_FREE_MSG(cfgReqInfo->pdu);
SPutSBuf(reg, pool, (Data *)cfgReqInfo,
(warningSiCfgReqInfo->siId >
((minPeriod * 10)/siWinSize)))
{
- RLOG_ARG2(L_ERROR,DBG_CELLID,warningSiCfgReqInfo->cellId,"Warning SI Cfg Failed for siId = %d"
+ DU_LOG("\nERROR --> SCH : Warning SI Cfg Failed for siId = %d"
"warning cellID:%d",warningSiCfgReqInfo->siId,warningSiCfgReqInfo->cellId);
rgSCHUtlFreeWarningSiSeg(reg, pool, &warningSiCfgReqInfo->siPduLst);
SPutSBuf(reg, pool, (Data *)warningSiCfgReqInfo,
#endif
{
- RGSCHLOGERROR(cell->instIdx,ERRCLS_INT_PAR,ERG011,
- (ErrVal)msgLen,
- "rgSCHGomHndlWarningSiCfg():msgLen does not match\
+ DU_LOG("\nERROR --> SCH : rgSCHGomHndlWarningSiCfg():msgLen does not match\
any valid TB Size.");
- RLOG_ARG1(L_ERROR,DBG_CELLID,cell->cellId,"Warning SI Cfg Failed"
+ DU_LOG("\nERROR --> SCH : Warning SI Cfg Failed"
"for siId = %d", warningSiCfgReqInfo->siId);
rgSCHUtlFreeWarningSiSeg(reg, pool,
&warningSiCfgReqInfo->siPduLst);
if (freeNodeFound == FALSE)
{
- RLOG_ARG0(L_DEBUG,DBG_CELLID,cell->cellId,"No SI Index is free");
+ DU_LOG("\nDEBUG --> SCH : No SI Index is free");
rgSCHUtlFreeWarningSiSeg(reg, pool, &warningSiCfgReqInfo->siPduLst);
SPutSBuf(reg, pool, (Data *)warningSiCfgReqInfo,
sizeof(RgrWarningSiCfgReqInfo));
/* check if cell does not exists */
if (((uint8_t *)cell == NULLP) || (cell->cellId != loadInfReq->cellId))
{
- RLOG_ARG1(L_ERROR,DBG_CELLID,loadInfReq->cellId,"Cell Control block does not exist"
+ DU_LOG("\nERROR --> SCH : Cell Control block does not exist"
"for load cellId:%d",loadInfReq->cellId);
SPutSBuf(reg, pool, (Data *)loadInfReq, (Size)sizeof(*loadInfReq));
return RFAILED;
if (cell->lteAdvCb.dsfrCfg.status == RGR_DISABLE)
{
- RLOG_ARG0(L_ERROR,DBG_CELLID,cell->cellId, "rgSCHGomHndlLoadInf(): DSFR Feature not enabled");
+ DU_LOG("\nERROR --> SCH : rgSCHGomHndlLoadInf(): DSFR Feature not enabled");
SPutSBuf(reg, pool, (Data *)loadInfReq, (Size)sizeof(*loadInfReq));
return RFAILED;
}
ret = rgSCHCfgVldtRgrLoadInf(inst, loadInfReq, cell, &errInfo);
if (ret != ROK)
{
- RLOG_ARG0(L_ERROR,DBG_CELLID,cell->cellId,"Rgr LOAD INF Configuration "
+ DU_LOG("\nERROR --> SCH : Rgr LOAD INF Configuration "
"validation FAILED");
SPutSBuf(reg, pool, (Data *)loadInfReq, (Size)sizeof(*loadInfReq));
return RFAILED;
@brief This module handles the Periodic CQI/PMI/RI, SRS, SR and Half Duplex
functionality
*/
-#ifdef LTEMAC_HDFDD
-static const char* RLOG_MODULE_NAME="MAC";
-static int RLOG_MODULE_ID=4096;
-static int RLOG_FILE_ID=165;
-#endif
/* header include files -- defines (.h) */
#include "common_def.h"
{
uint8_t sfi;
- RLOG_ARG2(L_DEBUG,DBG_CELLID,cellCb->cellId,
- "rgSCHHdFddUeCfg(): UeId =%d hdFddEnbl=%d",
+ DU_LOG("\nDEBUG --> SCH : rgSCHHdFddUeCfg(): UeId =%d hdFddEnbl=%d",
ueCb->ueId, hdFddEnbl);
if(ueCb->hdFddEnbld == TRUE)
{
if (hdFddEnbl == FALSE)
{
/* Do not allow switch from HD-FDD to FD-FDD configuration */
- RLOG_ARG1(L_ERROR,DBG_CELLID,cellCb->cellId,
- "rgSCHHdFddUeCfg(): HD-FDD to FD-FDD Configuration is not allowed"
+ DU_LOG("\nERROR --> SCH : rgSCHHdFddUeCfg(): HD-FDD to FD-FDD Configuration is not allowed"
"CRNTI:%d",ueCb->ueId);
}
else
{
/* If already enabled then it can be second reconfiguration */
- RLOG_ARG1(L_ERROR,DBG_CELLID,cellCb->cellId,
- "rgSCHHdFddUeCfg(): HD-FDD already enabled for this UE"
+ DU_LOG("\nERROR --> SCH : rgSCHHdFddUeCfg(): HD-FDD already enabled for this UE"
"CRNTI:%d",ueCb->ueId);
}
return RFAILED;
(ueCb->ul.ulSpsCfg.isUlSpsEnabled == TRUE ||
ueCb->dl.dlSpsCfg.isDlSpsEnabled == TRUE))
{
- RLOG_ARG1(L_ERROR,DBG_CELLID,cellCb->cellId,
- "rgSCHHdFddUeCfg(): Could'nt do HDFDD cfg, SPS already configured"
+ DU_LOG("\nERROR --> SCH : rgSCHHdFddUeCfg(): Could'nt do HDFDD cfg, SPS already configured"
"CRNTI:%d",ueCb->ueId);
return RFAILED;
}
}
else
{
- RLOG_ARG1(L_ERROR,DBG_CELLID,cellCb->cellId,
- "rgSCHHdFddUeCfg(): Could not allocate memory for hd-fdd ueCb"
+ DU_LOG("\nERROR --> SCH : rgSCHHdFddUeCfg(): Could not allocate memory for hd-fdd ueCb"
"CRNTI:%d",ueCb->ueId);
return RFAILED;
}
S16 rgSCHHdFddUeDel(RgSchCellCb *cellCb,RgSchUeCb *ueCb)
{
- RLOG_ARG2(L_DEBUG,DBG_CELLID,cellCb->cellId,
- " rgSCHHdFddUeDel(): UeId =%d hdFdd=%x",
+ DU_LOG("\nDEBUG --> SCH : rgSCHHdFddUeDel(): UeId =%d hdFdd=%x",
ueCb->ueId, ueCb->hdFddEnbld);
RgSchDlSf *sf = NULLP; /* Dl subframe info */
uint8_t ulOffset
- RLOG_ARG1(L_DEBUG,DBG_CELLID,cellCb->cellId,
- " rgSCHCmnHdFddChkUlAllow: ueId=%d ", ueCb->ueId);
+ DU_LOG("\nDEBUG --> SCH : rgSCHCmnHdFddChkUlAllow: ueId=%d ", ueCb->ueId);
*allow = FALSE;
/* Common channel scheduled */
/* Mark the BCCH/PCCH occasion */
RG_SCH_HDFDD_MARKSTATE(ueCb, RG_SCH_HDFDD_DLDATA, sfn, sfi);
- RLOG_ARG1(L_DEBUG,DBG_CELLID,cellCb->cellId,
- "rgSCHCmnHdFddChkUlAllow: Already marked for Cmn DL, ueId = %d ",
+ DU_LOG("\nDEBUG --> SCH : rgSCHCmnHdFddChkUlAllow: Already marked for Cmn DL, ueId = %d ",
ueCb->ueId);
}
if ((ueCb->hdFddCb->subfrm[sfi].sfn == sfn) &&
{
/* Downlink scheduled */
*allow = FALSE;
- RLOG_ARG1(L_DEBUG,DBG_CELLID,cellCb->cellId,
- "rgSCHCmnHdFddChkUlAllow: Already marked for DL, ueId = %d ",
+ DU_LOG("\nERROR --> SCH : rgSCHCmnHdFddChkUlAllow: Already marked for DL, ueId = %d ",
ueCb->ueId);
return;
}
{
/* No place for HARQ feedback */
*allow = FALSE;
- RLOG_ARG1(L_DEBUG,DBG_CELLID,cellCb->cellId,
- "rgSCHCmnHdFddChkUlAllow: No Place for HARQ, ueId = %d ",
+ DU_LOG("\nERROR --> SCH : rgSCHCmnHdFddChkUlAllow: No Place for HARQ, ueId = %d ",
ueCb->ueId);
return;
ueCb->hdFddCb->subfrm[sfi].subFrmDir == RG_SCH_HDFDD_UL)
{
*allow = FALSE;
- RLOG_ARG1(L_DEBUG,DBG_CELLID,cellCb->cellId,
- " rgSCHCmnHdFddChkUlAllow: No Place for UL grant, ueId = %d ",
+ DU_LOG("\nERROR --> SCH : rgSCHCmnHdFddChkUlAllow: No Place for UL grant, ueId = %d ",
ueCb->ueId);
return;
{
/* This subframe may be a switching gaurd time */
*allow = FALSE;
- RLOG_ARG1(L_DEBUG,DBG_CELLID,cellCb->cellId,
- " rgSCHCmnHdFddChkUlAllow: No Place for Guard time, ueId = %d ",
+ DU_LOG("\nERROR --> SCH : rgSCHCmnHdFddChkUlAllow: No Place for Guard time, ueId = %d ",
ueCb->ueId);
return;
/* Mark the BCCH/PCCH occasion */
RG_SCH_HDFDD_MARKSTATE(ueCb, RG_SCH_HDFDD_DLDATA, timeInfo.sfn, sfi);
*allow = FALSE;
- RLOG_ARG1(L_DEBUG,DBG_CELLID,cellCb->cellId,
- "rgSCHCmnHdFddChkUlAllow: Already marked for Cmn DL, ueId = %d ",
+ DU_LOG("\nERROR --> SCH : rgSCHCmnHdFddChkUlAllow: Already marked for Cmn DL, ueId = %d ",
ueCb->ueId);
return;
timeInfo = cellCb->crntTime;
RGSCH_INCR_SUB_FRAME(timeInfo, RG_SCH_CMN_DL_DELTA);
- RLOG_ARG1(L_DEBUG,DBG_CELLID,cellCb->cellId,
- "rgSCHCmnHdFddDlSchAll (): ueId=%d ", ueCb->ueId);
+ DU_LOG("\nDEBUG --> SCH : rgSCHCmnHdFddDlSchAll (): ueId=%d ", ueCb->ueId);
/* Also get subframe pointer to fetch Common Ch allocation */
sf = rgSCHUtlSubFrmGet(cellCb, timeInfo);
(ueCb->hdFddCb->subfrm[sfi].subFrmDir == RG_SCH_HDFDD_UL))
{
/* Uplink scheduled */
- RLOG_ARG1(L_DEBUG,DBG_CELLID,cellCb->cellId,
- "rgSCHCmnHdFddChkDlAllow: sf is UL, ueId=%d ", ueCb->ueId);
+ DU_LOG("\nERROR --> SCH : rgSCHCmnHdFddChkDlAllow: sf is UL, ueId=%d ", ueCb->ueId);
*allow = FALSE;
return;
}
(ueCb->hdFddCb->subfrm[sfi].subFrmDir == RG_SCH_HDFDD_UL))
{
/* This subframe may be a switching guard time */
- RLOG_ARG1(L_DEBUG,DBG_CELLID,cellCb->cellId,
- " rgSCHCmnHdFddChkDlAllow: Guard time rule not met, ueId=%d ",
+ DU_LOG("\nERROR --> SCH : rgSCHCmnHdFddChkDlAllow: Guard time rule not met, ueId=%d ",
ueCb->ueId);
*allow = FALSE;
return;
/* Common channel scheduled */
/* Do the marking for this subframe */
RG_SCH_HDFDD_MARKSTATE(ueCb, RG_SCH_HDFDD_DLDATA, tempTimeInfo.sfn, sfi);
- RLOG_ARG1(L_DEBUG,DBG_CELLID,cellCb->cellId,
- "rgSCHCmnHdFddChkDlAllow: Possible systemInfo, ueId=%d ",
+ DU_LOG("\nDEBUG --> SCH : rgSCHCmnHdFddChkDlAllow: Possible systemInfo, ueId=%d ",
ueCb->ueId);
}
ueCb->hdFddCb->subfrm[sfi].subFrmDir != RG_SCH_HDFDD_UL)
{
/* No place for HARQ feedback */
- RLOG_ARG1(L_DEBUG,DBG_CELLID,cellCb->cellId,
- "rgSCHCmnHdFddChkDlAllow: No place for HARQ feedback, ueId=%d ",
+ DU_LOG("\nERROR --> SCH : rgSCHCmnHdFddChkDlAllow: No place for HARQ feedback, ueId=%d ",
ueCb->ueId);
*allow = FALSE;
/* Common channel scheduled */
/* Do the marking for this subframe */
RG_SCH_HDFDD_MARKSTATE(ueCb, RG_SCH_HDFDD_DLDATA, tempTimeInfo.sfn, sfi);
- RLOG_ARG1(L_DEBUG,DBG_CELLID,cellCb->cellId,
- "rgSCHCmnHdFddChkDlAllow: (GT) Possible systemInfo, ueId=%d ",
+ DU_LOG("\nDEBUG --> SCH : rgSCHCmnHdFddChkDlAllow: (GT) Possible systemInfo, ueId=%d ",
ueCb->ueId);
}
ueCb->hdFddCb->subfrm[sfi].subFrmDir == RG_SCH_HDFDD_DLDATA)
{
/* No place for HARQ feedback */
- RLOG_ARG1(L_DEBUG,DBG_CELLID,cellCb->cellId,
- "rgSCHCmnHdFddChkDlAllow: (GT) No place for HARQ feedback,"
+ DU_LOG("\nERROR --> SCH : rgSCHCmnHdFddChkDlAllow: (GT) No place for HARQ feedback,"
"ueId=%d ",ueCb->ueId);
*allow = FALSE;
if(RG_SCH_HDFDD_ISCMN_SCHED(sf))
{
/* Yes, Cannot send NACK */
- RLOG_ARG1(L_DEBUG,DBG_CELLID,cellCb->cellId,
- "rgSCHCmnHdFddChkNackAllow: Cannot send NACK, ueId = %d ",
+ DU_LOG("\nERROR --> SCH : rgSCHCmnHdFddChkNackAllow: Cannot send NACK, ueId = %d ",
ueCb->ueId);
*sndNACK = FALSE;
}
else
{
/* safe, Send NACK */
- RLOG_ARG1(L_DEBUG,DBG_CELLID,cellCb->cellId,
- "rgSCHCmnHdFddChkNackAllow: NACk can be sent, ueId = %d ",
+ DU_LOG("\nDEBUG --> SCH : rgSCHCmnHdFddChkNackAllow: NACk can be sent, ueId = %d ",
ueCb->ueId);
*sndNACK = TRUE;
}
cell->qciArray[qciVal].dlTotal_UeCount / sampOc;
cfm->numUeQciDlCfm.numActvUeQci[idx].qciValue = qciVal;
- RLOG_ARG3(L_DEBUG,DBG_CELLID,cell->cellId,
- "L2_MEAS:CFM DL QCI %u TOTAL Count %lu Active UE %d ",
+ DU_LOG("\nDEBUG --> SCH : L2_MEAS:CFM DL QCI %u TOTAL Count %lu Active UE %d ",
qciVal,cell->qciArray[qciVal].dlTotal_UeCount,
cfm->numUeQciDlCfm.numActvUeQci[idx].numActvUeQci);
cell->qciArray[qciVal].dlTotal_UeCount / sampOc;
cfm->numUeQciDlCfm.numActvUeQci[idx].qciValue = qciVal;
- RLOG_ARG3(L_DEBUG,DBG_CELLID,cell->cellId,
- "L2_MEAS:CFM DL QCI %u TOTAL Count %lu Active UE %d ",
+ DU_LOG("\nDEBUG --> SCH : L2_MEAS:CFM DL QCI %u TOTAL Count %lu Active UE %d ",
qciVal,cell->qciArray[qciVal].dlTotal_UeCount,
cfm->numUeQciDlCfm.numActvUeQci[idx].numActvUeQci);
cell->qciArray[qciVal].ulTotal_UeCount/ sampOc;
cfm->numUeQciUlCfm.numActvUeQci[idx].qciValue = qciVal;
- RLOG_ARG3(L_DEBUG,DBG_CELLID,cell->cellId,
- "L2_MEAS:CFM UL QCI %d TOTAL Count %lu Active UE %d ",
+ DU_LOG("\nDEBUG --> SCH : L2_MEAS:CFM UL QCI %d TOTAL Count %lu Active UE %d ",
qciVal,cell->qciArray[qciVal].ulTotal_UeCount,
cfm->numUeQciUlCfm.numActvUeQci[idx].numActvUeQci);
cell->qciArray[qciVal].ulTotal_UeCount/ sampOc;
cfm->numUeQciUlCfm.numActvUeQci[idx].qciValue = qciVal;
- RLOG_ARG3(L_DEBUG,DBG_CELLID,cell->cellId,
- "L2_MEAS:CFM UL QCI %d TOTAL Count %lu Active UE %d ",
+ DU_LOG("\nDEBUG --> SCH : L2_MEAS:CFM UL QCI %d TOTAL Count %lu Active UE %d ",
qciVal,cell->qciArray[qciVal].ulTotal_UeCount,
cfm->numUeQciUlCfm.numActvUeQci[idx].numActvUeQci);
if((rgSCHUtlAllocSBuf(inst, (Data **)&measCb,
sizeof(RgSchL2MeasCb))) == RFAILED)
{
- RLOG_ARG0(L_ERROR,DBG_CELLID,cell->cellId,"rgSchL2mAllocMeasCb():"
- "Allocation of RgSchL2MeasCb failed");
+ DU_LOG("\nERROR --> SCH : Allocation of RgSchL2MeasCb failed");
return (NULLP);
}
memcpy(&measCb->measReq, measInfo, sizeof(LrgSchMeasReqInfo));
{
RGSCHFILLERR(err, RGSCHERR_L2M_MEASREQ,
RGSCHERR_SCH_ALLOC_FAILED);
- RLOG_ARG0(L_ERROR,DBG_CELLID,cell->cellId, "rgSchL2mMeasReq():"
- "Allocation of RgSchL2MeasCb failed");
+ DU_LOG("\nERROR --> SCH : Allocation of RgSchL2MeasCb failed");
return RFAILED;
}
/*memcpy(&measCb->measReq, measInfo,\
request primitives are defined here.
*/
-static const char* RLOG_MODULE_NAME="MAC";
-static int RLOG_MODULE_ID=4096;
-static int RLOG_FILE_ID=167;
/* header include files (.h) */
#include "common_def.h"
* with this SAP */
if (rgSchCb[inst].tfuSap[idx].cell != NULLP)
{
- RLOG1(L_INFO,"CELL %d\n", idx);
- RLOG1(L_INFO,"NUM UEs :%d\n",rgSchCb[inst].tfuSap[idx].cell->ueLst.nmbEnt);
+ DU_LOG("\nINFO --> SCH : CELL %d\n", idx);
+ DU_LOG("\nINFO --> SCH : NUM UEs :%d\n",rgSchCb[inst].tfuSap[idx].cell->ueLst.nmbEnt);
}
}
}
(cfg->s.schInstCfg.rgrSap[sapIdx].selector != ODU_SELECTOR_LC))
{
ret = LCM_REASON_INVALID_PAR_VAL;
- RLOG_ARG0(L_ERROR,DBG_INSTID,inst, "rgSCHLmmSapCfg(): unsupported"
+ DU_LOG("\nERROR --> SCH : rgSCHLmmSapCfg(): unsupported"
" Selector value for RGR.");
break;
}
(cfg->s.schInstCfg.tfuSap[sapIdx].selector != ODU_SELECTOR_LC))
{
ret = LCM_REASON_INVALID_PAR_VAL;
- RLOG_ARG0(L_ERROR,DBG_INSTID,inst, "rgSCHLmmSapCfg(): unsupported"
+ DU_LOG("\nERROR --> SCH : rgSCHLmmSapCfg(): unsupported"
" Selector value for TFU.");
break;
}
(cfg->s.schInstCfg.rgmSap[sapIdx].selector != RGM_SEL_TC))
{
ret = LCM_REASON_INVALID_PAR_VAL;
- RLOG_ARG0(L_ERROR,DBG_INSTID,inst, "rgSCHLmmSapCfg(): unsupported"
+ DU_LOG("\nERROR --> SCH : rgSCHLmmSapCfg(): unsupported"
" Selector value for RGM.");
break;
}
default:
cfm->cfm.status = LCM_PRIM_NOK;
cfm->cfm.reason = LCM_REASON_INVALID_PAR_VAL;
- RLOG_ARG1(L_ERROR,DBG_INSTID,inst, "rgSCHLmmGenCntrl(): "
+ DU_LOG("\nERROR --> SCH : rgSCHLmmGenCntrl(): "
"invalid subaction=%d", cntrl->t.cntrl.subAction);
break;
}
default:
cfm->cfm.status = LCM_PRIM_NOK;
cfm->cfm.reason = LCM_REASON_INVALID_PAR_VAL;
- RLOG_ARG1(L_ERROR,DBG_INSTID,inst, "rgSCHLmmGenCntrl():"
+ DU_LOG("\nERROR --> SCH : rgSCHLmmGenCntrl():"
" invalid subaction=%d", cntrl->t.cntrl.subAction);
break;
}
default:
cfm->cfm.status = LCM_PRIM_NOK;
cfm->cfm.reason = LCM_REASON_INVALID_PAR_VAL;
- RLOG_ARG1(L_ERROR,DBG_INSTID,inst, "rgSCHLmmGenCntrl(): invalid"
+ DU_LOG("\nERROR --> SCH : rgSCHLmmGenCntrl(): invalid"
" action=%d", cntrl->t.cntrl.action);
break;
}
default:
cfm->cfm.status = LCM_PRIM_NOK;
cfm->cfm.reason = LCM_REASON_INVALID_PAR_VAL;
- RLOG_ARG1(L_ERROR,DBG_INSTID,inst, "rgSCHLmmSapCntrl(): "
+ DU_LOG("\nERROR --> SCH : rgSCHLmmSapCntrl(): "
"invalid action=%d", cntrl->t.cntrl.action);
break;
}
default:
cfm->cfm.status = LCM_PRIM_NOK;
cfm->cfm.reason = LCM_REASON_INVALID_PAR_VAL;
- RLOG_ARG1(L_ERROR,DBG_INSTID,inst, "rgSCHLmmSapCntrl(): "
+ DU_LOG("\nERROR --> SCH : rgSCHLmmSapCntrl(): "
"invalid action=%d", cntrl->t.cntrl.action);
break;
}
default:
cfm->cfm.status = LCM_PRIM_NOK;
cfm->cfm.reason = LCM_REASON_INVALID_PAR_VAL;
- RLOG_ARG1(L_ERROR,DBG_INSTID,inst, "rgSCHLmmSapCntrl(): "
+ DU_LOG("\nERROR --> SCH : rgSCHLmmSapCntrl(): "
"invalid action=%d", cntrl->t.cntrl.action);
break;
}
{
S16 ret = ROK;
RgSchLowSapCb *tfuSap = (RgSchLowSapCb *)cb;
-#ifdef DEBUGP
- Inst inst = tfuSap->cell->instIdx;
-#endif
switch(tmrEvnt)
}
break;
default:
- RLOG_ARG1(L_ERROR,DBG_INSTID,inst, "rgSCHLmmTmrExpiry(): Invalid"
+ DU_LOG("\nERROR --> SCH : rgSCHLmmTmrExpiry(): Invalid"
" tmrEvnt=%d", tmrEvnt);
ret = RFAILED;
break;
/** @file rg_sch_mga.c
@brief This module handles schedulers' measurement gap and ack-nack repetiton functionality */
-static const char* RLOG_MODULE_NAME="MAC";
-static int RLOG_MODULE_ID=4096;
-static int RLOG_FILE_ID=169;
/* header include files -- defines (.h) */
#include "common_def.h"
&(ue->measGapCb.measQLnk));
break;
default:
- RLOG_ARG1(L_ERROR,DBG_CELLID,cell->cellId,
- "rgSCHMeasGapANRepUeRecfg() Incorrect GAP Period"
+ DU_LOG("\nERROR --> SCH : rgSCHMeasGapANRepUeRecfg() Incorrect GAP Period"
"CRNTI:%d",ue->ueId);
return RFAILED;
}
* ahead - UE cant read PDCCH format0 if it is in measurement gap. */
rgSCHTmrStartTmr (cell, ue, RG_SCH_TMR_UL_MEASGAP,
(RG_SCH_MEAS_GAP_LEN + pdcchToPuschGap - idx));
- //printf("Starting Meas Gap 40 @ DL TTI- (%d:%d) K-%d offset-%d Len %d \n", ackNakTime.sfn, ackNakTime.subframe, harqFdbkOffset, offset, RG_SCH_MEAS_GAP_LEN + harqFdbkOffset-idx);
+ //DU_LOG("\nINFO --> SCH : Starting Meas Gap 40 @ DL TTI- (%d:%d) K-%d offset-%d Len %d \n", ackNakTime.sfn,\
+ ackNakTime.subframe, harqFdbkOffset, offset, RG_SCH_MEAS_GAP_LEN + harqFdbkOffset-idx);
}
node = node->next;
}
/* Start timer */
rgSCHTmrStartTmr (cell, ue, RG_SCH_TMR_UL_MEASGAP,
(RG_SCH_MEAS_GAP_LEN + pdcchToPuschGap - idx));
- //printf("Starting Meas Gap 80 @ DL TTI- (%d:%d) K-%d offset-%d Len %d \n", ackNakTime.sfn, ackNakTime.subframe, harqFdbkOffset, offset, RG_SCH_MEAS_GAP_LEN + harqFdbkOffset-idx);
+ //DU_LOG("\nINFO --> SCH : Starting Meas Gap 80 @ DL TTI- (%d:%d) K-%d offset-%d Len %d \n", ackNakTime.sfn,\
+ ackNakTime.subframe, harqFdbkOffset, offset, RG_SCH_MEAS_GAP_LEN + harqFdbkOffset-idx);
}
node = node->next;
}
@brief This module handles schedulers' power control functionality
*/
-static const char* RLOG_MODULE_NAME="MAC";
-static int RLOG_MODULE_ID=4096;
-static int RLOG_FILE_ID=188;
/* header include files -- defines (.h) */
#include "common_def.h"
#include "lrg.h"
}
#endif
}
- RLOG_ARG4(L_UNUSED,DBG_CELLID,cell->cellId,
- "UEID:%d Output Max Rb (%d), phVal (%d) AvailPwr (%d) ",
+ DU_LOG("\nDEBUG --> SCH : UEID:%d Output Max Rb (%d), phVal (%d) AvailPwr (%d) ",
ue->ueId, maxRb, uePwr->phVal, availPwr);
- RLOG_ARG3(L_UNUSED,DBG_CELLID,cell->cellId,
- "UEID:%d pwrPerRb %d remPuschPwr %d",
+ DU_LOG("\nDEBUG --> SCH : UEID:%d pwrPerRb %d remPuschPwr %d",
ue->ueId,
uePwr->pwrPerRb,
uePwr->remPuschPwr);
rgSCHPwrOnPuschPwrUpd(cell, ue);
- RLOG_ARG4(L_DEBUG,DBG_UEID,ue->ueId,
- "Output: Reported PHR[%d] cqi[%u] allocRb[%u] uePwr->pwrPerRb[%d]",
+ DU_LOG("\nDEBUG --> SCH : Output: Reported PHR[%d] cqi[%u] allocRb[%u] uePwr->pwrPerRb[%d]",
uePwr->phVal,
allocInfo->cqi,
allocInfo->numRb,
}
uePwr->pucchIdx = pucchIdx;
#ifndef ALIGN_64BIT
- RLOG_ARG4(L_UNUSED,DBG_CELLID,cell->cellId,
- "<GRP_PWR>PucchRntiCb cfgdUes(%ld %lu %lu) UEID:%d",
+ DU_LOG("\nDEBUG --> SCH : <GRP_PWR>PucchRntiCb cfgdUes(%ld %lu %lu) UEID:%d",
pucchRntiCb->cfgdUes.count,((uint32_t)pucchRntiCb->cfgdUes.first),
((uint32_t)pucchRntiCb->cfgdUes.last),ue->ueId);
- RLOG_ARG3(L_UNUSED,DBG_CELLID,cell->cellId,
- "UEID:%d isFmt3a(%u) ueNode(%ld)",
+ DU_LOG("\nDEBUG --> SCH : UEID:%d isFmt3a(%u) ueNode(%ld)",
ue->ueId,pucchRntiCb->isFmt3a,
pucchRntiCb->schdLnk.node);
- RLOG_ARG4(L_UNUSED,DBG_CELLID,cell->cellId,
- "toBeSchdUes(%ld %lu %lu) tpcRnti(%u)",
+ DU_LOG("\nDEBUG --> SCH : toBeSchdUes(%ld %lu %lu) tpcRnti(%u)",
pucchRntiCb->toBeSchdUes.count,
((uint32_t)pucchRntiCb->toBeSchdUes.first),
((uint32_t)pucchRntiCb->toBeSchdUes.last),
pucchRntiCb->tpcRnti);
#else
- RLOG_ARG4(L_UNUSED,DBG_CELLID,cell->cellId,
- "<GRP_PWR>PucchRntiCb cfgdUes(%ld %lu %lu) UEID:%d",
+ DU_LOG("\nDEBUG --> SCH : <GRP_PWR>PucchRntiCb cfgdUes(%d %lu %lu) UEID:%d",
pucchRntiCb->cfgdUes.count,((uint64_t)pucchRntiCb->cfgdUes.first),
((uint64_t)pucchRntiCb->cfgdUes.last),ue->ueId);
- RLOG_ARG3(L_UNUSED,DBG_CELLID,cell->cellId,
- "UEID:%d isFmt3a(%u) ueNode(%ld)",
+ DU_LOG("\nDEBUG --> SCH : UEID:%d isFmt3a(%u) ueNode(%ld)",
ue->ueId,pucchRntiCb->isFmt3a,
pucchRntiCb->schdLnk.node);
- RLOG_ARG4(L_UNUSED,DBG_CELLID,cell->cellId,
- "toBeSchdUes(%ld %lu %lu) tpcRnti(%u)",
+ DU_LOG("\nDEBUG --> SCH : toBeSchdUes(%d %lu %lu) tpcRnti(%u)",
pucchRntiCb->toBeSchdUes.count,
((uint64_t)pucchRntiCb->toBeSchdUes.first),
((uint64_t)pucchRntiCb->toBeSchdUes.last),
@brief This file has APIs to handle the random access procedure functionality for the scheduler.
*/
-static const char* RLOG_MODULE_NAME="MAC";
-static int RLOG_MODULE_ID=4096;
-static int RLOG_FILE_ID=171;
/* header include files (.h) */
#include "common_def.h"
/* allocate new raReqInfos and enqueue them */
if (raReqInd->raReqInfoArr[raReqCnt].rapId >= RGSCH_MAX_NUM_RA_PREAMBLE)
{
- RLOG_ARG1(L_ERROR,DBG_CELLID,cell->cellId,
- "RARNTI:%d rgSCHTomRaReqInd(): RAM processing failed errType(%d) ",
- raReqInd->raRnti);
+ DU_LOG("\nERROR --> SCH : RARNTI:%d rgSCHTomRaReqInd(): RAM processing failed", raReqInd->raRnti);
return RFAILED;
}
if((rgSCHUtlAllocSBuf(cell->instIdx, (Data **)(&raReqInfo),
sizeof(RgSchRaReqInfo))) == RFAILED)
{
- RLOG_ARG1(L_ERROR,DBG_CELLID,cell->cellId,"rgSCHRamProcRaReq(): Allocation"
+ DU_LOG("\nERROR --> SCH : rgSCHRamProcRaReq(): Allocation"
" of RaReq failed RARNTI:%d",raRnti);
err->errCause = RGSCHERR_RAM_MEM_EXHAUST;
return RFAILED;
if((rgSCHUtlAllocSBuf(inst, (Data **)(raCb),
sizeof(RgSchRaCb))) == RFAILED)
{
- RLOG_ARG0(L_ERROR,DBG_CELLID,cell->cellId,"rgSCHRamCreateRaCb(): Allocation of "
+ DU_LOG("\nERROR --> SCH : rgSCHRamCreateRaCb(): Allocation of "
"RaCb failed");
err->errCause = RGSCHERR_RAM_MEM_EXHAUST;
return RFAILED;
rgNumRarFailDuetoRntiExhaustion++;
/* No rnti available! */
- RLOG_ARG0(L_ERROR,DBG_CELLID,cell->cellId,"rgSCHRamCreateRaCb(): Allocation of "
+ DU_LOG("\nERROR --> SCH : rgSCHRamCreateRaCb(): Allocation of "
"temporary RNTI failed at MAC(CRNTI exhausted)");
/* ccpu00117052 - MOD - Passing double pointer
for proper NULLP assignment*/
if ((*raCb)->dlHqE == NULLP)
{
/* No memory available! */
- RLOG_ARG0(L_ERROR,DBG_CELLID,cell->cellId,"rgSCHRamCreateRaCb(): Creation of"
+ DU_LOG("\nERROR --> SCH : rgSCHRamCreateRaCb(): Creation of"
" DL HARQ failed");
/* ccpu00117052 - MOD - Passing double pointer
for proper NULLP assignment*/
#endif
if(raCb->raState != RGSCH_RA_MSG3_PENDING)
{
- RLOG_ARG2(L_DEBUG,DBG_CELLID,cell->cellId,
- "RNTI:%d RaCb in wrong State %d Drop Msg 3",
+ DU_LOG("\nERROR --> SCH : RNTI:%d RaCb in wrong State %d Drop Msg 3",
raCb->rntiLnk->rnti,
raCb->raState);
return ROK;
S16 rgSCHRamMsg4Done(RgSchCellCb *cell,RgSchRaCb *raCb)
{
- RLOG_ARG1(L_DEBUG,DBG_CELLID,cell->cellId,
- "rgSCHRamMsg4Done(): tmpCRNTI = %u",
+ DU_LOG("\nDEBUG --> SCH : rgSCHRamMsg4Done(): tmpCRNTI = %u",
raCb->tmpCrnti);
if(raCb->ue != NULLP)
else if(raCb->toDel == TRUE)
{
#ifdef XEON_SPECIFIC_CHANGES
- CM_LOG_DEBUG(CM_LOG_ID_SCH, "Deleting RacB:%d\n", raCb->tmpCrnti);
+ DU_LOG("\nDEBUG --> SCH : Deleting RacB:%d\n", raCb->tmpCrnti);
#endif
/* Delete RACB and release RNTI */
rgSCHRamDelRaCb(cell, raCb, TRUE);
else
{
#ifdef XEON_SPECIFIC_CHANGES
- CM_LOG_DEBUG(CM_LOG_ID_SCH, "Releasing Harq of RacB:%d\n", raCb->tmpCrnti);
+ DU_LOG("\nDEBUG --> SCH : Releasing Harq of RacB:%d\n", raCb->tmpCrnti);
#endif
raCb->raState = RGSCH_RA_MSG4_DONE;
/* Release harq process as final feedback is received for Msg4. In other
* cases, delRaCb will take care of releasing the harq process */
- printf("=======Harq process released \n");
- RLOG_ARG0(L_DEBUG,DBG_CELLID,cell->cellId,
- "Harq process released ");
+ DU_LOG("\nDEBUG --> SCH : Harq process released ");
rgSCHDhmRlsHqpTb(raCb->dlHqE->msg4Proc, 0, TRUE);
}
if ((raCb->dlHqE->msg4Proc->subFrm != NULLP) &&
(raCb->dlHqE->msg4Proc->hqPSfLnk.node != NULLP))
{
- RLOG_ARG1(L_ERROR,DBG_CELLID,cell->cellId,"TMP CRNTI:%d RACH FAILURE!! "
+ DU_LOG("\nERROR --> SCH : TMP CRNTI:%d RACH FAILURE!! "
"msg4proc removed from SF", raCb->tmpCrnti);
rgSCHUtlDlHqPTbRmvFrmTx(raCb->dlHqE->msg4Proc->subFrm,
raCb->dlHqE->msg4Proc, 0, FALSE);
raCb->contResTmrLnk.node = NULLP;
/* MSG4 Fix Start */
- RLOG_ARG1(L_DEBUG,DBG_CELLID,cell->cellId,
- "Con Res Grd Tmr exp RNTI:%d",
+ DU_LOG("\nDEBUG --> SCH : Con Res Grd Tmr exp RNTI:%d",
raCb->rntiLnk->rnti);
rgSCHRamAddToRaInfoSchdLst(cell, raCb);
/* MSG4 Fix End */
@brief The scheduling functionality is implemented in this file.
*/
-static const char* RLOG_MODULE_NAME="MAC";
-static int RLOG_MODULE_ID=4096;
-static int RLOG_FILE_ID=173;
/* header include files -- defines (.h) */
#include "common_def.h"
/* scheduling may be done for this UE */
if (RG_SCH_CMN_PROC_SLCTD_FOR_RETX(proc))
{
- RLOG_ARG1(L_ERROR,DBG_CELLID,cell->cellId,"CRNTI:%d rgSCHSc1DlDedSvcAlloc():"
+ DU_LOG("\nERROR --> SCH : CRNTI:%d rgSCHSc1DlDedSvcAlloc():"
"Ue retransmitting",ue->ueId);
return ROK;
}
{
if (rgSCHDhmGetAvlHqProc(cell, ue, cmnCellDl->time, &proc) != ROK)
{
- RLOG_ARG1(L_ERROR,DBG_CELLID,cell->cellId, "CRNTI:%d rgSCHSc1DlDedSvcAlloc():"
+ DU_LOG("\nERROR --> SCH : CRNTI:%d rgSCHSc1DlDedSvcAlloc():"
" No HARQ Proc available", ue->ueId);
return ROK;
}
static Void rgSCHSc1DlDedNewTx(RgSchCellCb *cell,RgSchCmnDlRbAllocInfo *allocInfo)
{
RgSchDlSf *subFrm = allocInfo->dedAlloc.dedDlSf;
-#ifdef DEBUGP
- Inst inst = cell->instIdx;
-#endif
- RGSCHDBGPRM(inst, (rgSchPBuf(inst), "rgSCHSc1DlDedNewTx\n"));
+ DU_LOG("\nDEBUG --> SCH : rgSCHSc1DlDedNewTx\n");
/* Now perform the new UE selections */
rgSCHSc1DlDedTx(cell, subFrm, allocInfo);
**/
static Void rgSCHSc1DlDedRetx(RgSchCellCb *cell,RgSchCmnDlRbAllocInfo *allocInfo)
{
- RgSchDlSf *subFrm = allocInfo->dedAlloc.dedDlSf;
-#ifdef DEBUGP
- Inst inst = cell->instIdx;
-#endif
- RGSCHDBGPRM(inst, (rgSchPBuf(inst), "rgSCHSc1DlDedRetx\n"));
+ RgSchDlSf *subFrm = allocInfo->dedAlloc.dedDlSf;
+ DU_LOG("\nDEBUG --> SCH : rgSCHSc1DlDedRetx\n");
rgSCHSc1DlRetxAlloc(cell, subFrm, allocInfo);
(Data**)&(((RgSchCmnCell*)((cell)->sc.sch))->dl.schSpfc), \
(sizeof(RgSchSc1DlCell)))) != ROK)
{
- RLOG_ARG0(L_ERROR,DBG_CELLID,cell->cellId,
- "Memory allocation FAILED");
+ DU_LOG("\nERROR --> SCH : Memory allocation FAILED");
err->errCause = RGSCHERR_SCH_SC1_DL_CFG;
return (ret);
}
if((rgSCHUtlAllocSBuf(inst,
(Data**)&(ueSchCmn->dl.schSpfc), (sizeof(RgSchSc1DlUe))) != ROK))
{
- RLOG_ARG1(L_ERROR,DBG_CELLID,cell->cellId, "Memory allocation FAILED"
+ DU_LOG("\nERROR --> SCH : Memory allocation FAILED"
"CRNTI:%d",ue->ueId);
err->errCause = RGSCHERR_SCH_SC1_DL_CFG;
return RFAILED;
(Data**)&(hqEnt->sch),
(hqEnt->numHqPrcs * sizeof(RgSchSc1DlHqProc))) != ROK)
{
- RLOG_ARG1(L_ERROR,DBG_CELLID,cell->cellId,
- "Memory allocation FAILED CRNTI:%d",hqEnt->ue->ueId);
+ DU_LOG("\nERROR --> SCH : Memory allocation FAILED CRNTI:%d",hqEnt->ue->ueId);
return RFAILED;
}
hqSpcSch = (RgSchSc1DlHqProc *)(hqEnt->sch);
(sizeof(RgSchSc1DlSvc)));
if (ret != ROK)
{
- RLOG_ARG2(L_ERROR,DBG_CELLID,cell->cellId, "rgSCHSc1CrgLcCfg():"
+ DU_LOG("\nERROR --> SCH : rgSCHSc1CrgLcCfg():"
"SCH struct alloc failed CRNTI:%d LCID:%d",ue->ueId,lcCfg->lcId);
err->errCause = RGSCHERR_SCH_SC1_DL_CFG;
return (ret);
if(rgSCHUtlAllocSBuf(cell->instIdx,
(Data**)&(ueSchCmn->ul.schSpfc), (sizeof(RgSchSc1UlUe))) != ROK)
{
- RLOG_ARG1(L_ERROR,DBG_CELLID,cell->cellId,
- "Memory allocation FAILED CRNTI:%d",ue->ueId);
+ DU_LOG("\nERROR --> SCH : Memory allocation FAILED CRNTI:%d",ue->ueId);
err->errCause = RGSCHERR_SCH_SC1_UL_CFG;
return RFAILED;
}
(Data**)&(((RgSchCmnCell*)((cell)->sc.sch))->ul.schSpfc), \
(sizeof(RgSchSc1UlCell))) != ROK))
{
- RLOG_ARG0(L_ERROR,DBG_CELLID,cell->cellId,
- "Memory allocation FAILED");
+ DU_LOG("\nERROR --> SCH : Memory allocation FAILED");
err->errCause = RGSCHERR_SCH_SC1_UL_CFG;
return RFAILED;
}
}
else
{
- RGSCHDBGINFONEW(cell->instIdx,(rgSchPBuf(cell->instIdx),
- "SCell is already added in the Act List: ueId(%u)\n", ue->ueId));
+ DU_LOG("\nINFO --> SCH : SCell is already added in the Act List: ueId(%u)\n", ue->ueId);
}
return;
#endif
#ifdef CA_DBG
- printf("ueId is SCELL_ACTIVE\n ueCb->ueId = %d sCell->sCellIdx =%d, sCell->sCellId=%d, sCell->sCellState=%d \n", ueCb->ueId, sCellInfo->sCellIdx, sCellInfo->sCellId, sCellInfo->sCellState);
+ DU_LOG("\nDEBUG --> SCH : ueId is SCELL_ACTIVE\n ueCb->ueId = %d sCell->sCellIdx =%d,\
+ sCell->sCellId=%d, sCell->sCellState=%d \n", ueCb->ueId, sCellInfo->sCellIdx, sCellInfo->sCellId, sCellInfo->sCellState);
#endif
/* Start the sCellDeactivation timer if cfgd */
if(PRSNT_NODEF == ueCb->sCellDeactTmrVal.pres)
cqiCb->nCqiTrIdx = cqiCb->nCqiTrIdx
%RG_SCH_PCQI_SRS_SR_TRINS_SIZE;
- RGSCHDBGINFONEW(inst, (rgSchPBuf(inst), "CQI Config: idx(%u) Periodicity %u"
+ DU_LOG("\nINFO --> SCH : CQI Config: idx(%u) Periodicity %u"
"Offset %u uePosInQ (%u)\n", cqiCfg->cqiSetup.cqiPCfgIdx,
- cqiCb->cqiPeri, cqiCb->cqiOffset,cqiCb->nCqiTrIdx));
+ cqiCb->cqiPeri, cqiCb->cqiOffset,cqiCb->nCqiTrIdx);
cmLListAdd2Tail(&ueCb->cell->pCqiSrsSrLst[cqiCb->nCqiTrIdx].cqiLst,
&cqiCb->cqiLstEnt);
rgSCHUtlSCellHndlCqiCollsn(cqiCb);
- RGSCHDBGINFO(inst,(rgSchPBuf(inst),
- "\n rgSCHCfgPCqiUeCfg():"
+ DU_LOG("\nINFO --> SCH : rgSCHCfgPCqiUeCfg():"
" CrntTime=%d Next CqiTrInstTime=%d Index Stored at=%d ",
- crntTime, cqiTrInstTime, cqiCb->nCqiTrIdx));
+ crntTime, cqiTrInstTime, cqiCb->nCqiTrIdx);
if(cqiCfg->cqiSetup.riEna)
{
rgSCHUtlSCellHndlRiCollsn(cqiCb);
/*werror*/
#ifndef BIT_64
- RGSCHDBGINFONEW(inst,(rgSchPBuf(inst), "SCel RI cfg:"
+ DU_LOG("\nINFO --> SCH : SCel RI cfg:"
"idx %u period %u Offset %u posInQ(%u) riDist(%u)lst count"
"%lu\n", cqiCfg->cqiSetup.riCfgIdx, cqiCb->riPeri,
cqiCb->riOffset, cqiCb->nRiTrIdx, cqiCb->riDist,
- ueCb->cell->pCqiSrsSrLst[cqiCb->nRiTrIdx].riLst.count));
+ ueCb->cell->pCqiSrsSrLst[cqiCb->nRiTrIdx].riLst.count);
#else
- RGSCHDBGINFONEW(inst,(rgSchPBuf(inst), "SCel RI cfg:"
+ DU_LOG("\nINFO --> SCH : SCel RI cfg:"
"idx %u period %u Offset %u posInQ(%u) riDist(%u)lst count"
"%u\n", cqiCfg->cqiSetup.riCfgIdx, cqiCb->riPeri,
cqiCb->riOffset, cqiCb->nRiTrIdx, cqiCb->riDist,
- ueCb->cell->pCqiSrsSrLst[cqiCb->nRiTrIdx].riLst.count));
+ ueCb->cell->pCqiSrsSrLst[cqiCb->nRiTrIdx].riLst.count);
#endif
- RGSCHDBGINFO(inst,(rgSchPBuf(inst),
- "\n rgSCHSCellActivation(): CrntTime=%d Next RiTrInstTime=%d"
+ DU_LOG("\nINFO --> SCH : \n rgSCHSCellActivation(): CrntTime=%d Next RiTrInstTime=%d"
"Index Stored at=%d riDis=%d ",
- crntTime, riTrInsTime, cqiCb->nRiTrIdx, cqiCb->riDist));
+ crntTime, riTrInsTime, cqiCb->nRiTrIdx, cqiCb->riDist);
}
}
#endif
cellSch->apisDl->rgSCHDlSCellDeactv(sCellInfo->cell, sCellInfo->ue);
#ifdef CA_DBG
- printf("SCELL DEATIVATED sCellInfo->ue->ueId =%d, sCellInfo->sCellId =%d\n", sCellInfo->ue->ueId, sCellInfo->sCellId);
+ DU_LOG("\nDEBUG --> SCH : SCELL DEATIVATED sCellInfo->ue->ueId =%d, sCellInfo->sCellId =%d\n",\
+ sCellInfo->ue->ueId, sCellInfo->sCellId);
//MSPD_DBG("SCELL DEATIVATED sCellInfo->ue->ueId =%d, sCellInfo->sCellId =%d\n", sCellInfo->ue->ueId, sCellInfo->sCellId);
#endif
return ROK;
if((secCellCb = (RgSchCellCb *)rgSchUtlGetCellCb(inst, secCellId)) == NULLP)
{
- RGSCHDBGERRNEW(inst, (rgSchPBuf(inst), "SCell doesnt exists"));
+ DU_LOG("\nERROR --> SCH : SCell doesnt exists");
return RFAILED;
}
if(ueCb->cellInfo[idx]->sCellState == RG_SCH_SCELL_ACTVTN_IN_PROG)
{
#ifdef CA_DBG
- printf("\n starting delay timer...\n");
+ DU_LOG("\nINFO --> SCH : starting delay timer...\n");
#endif
rgSCHTmrStartTmr (cell,ueCb->cellInfo[idx] ,RG_SCH_TMR_SCELL_ACT_DELAY,
RG_SCH_CMN_SCELL_ACT_DELAY_TMR);
}
else
{
- printf (" !!!!!! Avoiding DEACT for UE %d because of LAA Cell !!!!!!!!!!!!! \n",
+ DU_LOG("\nERROR --> SCH : !!!!!! Avoiding DEACT for UE %d because of LAA Cell !!!!!!!!!!!!! \n",
sCellInfo->ue->ueId);
}
if((sCellIdx < 1) ||
(sCellIdx > RGR_MAX_SCELL_PER_UE))
{
- RGSCHDBGERRNEW(inst, (rgSchPBuf(inst),"Invalid Serv Cell Idx %d\n", \
- sCellIdx));
+ DU_LOG("\nERROR --> SCH : Invalid Serv Cell Idx %d\n", sCellIdx);
return RFAILED;
}
if(ueCb->cellInfo[sCellIdx] == NULLP)
{
- RGSCHDBGERRNEW(inst, (rgSchPBuf(inst),"Serv Cell not added to this Ue Scell Idx %d ueId %d\n", \
- sCellIdx,ueCb->ueId));
+ DU_LOG("\nERROR --> SCH : Serv Cell not added to this Ue Scell Idx %d ueId %d\n", \
+ sCellIdx,ueCb->ueId);
return RFAILED;
}
{
if(ueCb->cellInfo[sCellIdx]->sCellState != RG_SCH_SCELL_INACTIVE)
{
- RGSCHDBGERRNEW(inst, (rgSchPBuf(inst),"Invalid state %u for preparing SCell Idx %u for UE %u\n", \
- ueCb->cellInfo[sCellIdx]->sCellState, sCellIdx, ueCb->ueId));
+ DU_LOG("\nERROR --> SCH : Invalid state %u for preparing SCell Idx %u for UE %u\n", \
+ ueCb->cellInfo[sCellIdx]->sCellState, sCellIdx, ueCb->ueId);
ret = RFAILED;
}
else
/* Setting allocCmnUlPdcch flag to FALSE, So that PDCCH allocation will be done
from UE Searchspace */
ueCb->allocCmnUlPdcch = FALSE;
- printf("\n***** SCellIdx=%d state Changed to %d State \n",sCellIdx, ueCb->cellInfo[sCellIdx]->sCellState);
- printf("\n***** SCellInfo Addr=%p state Changed to RG_SCH_SCELL_READY\n",(void*)ueCb->cellInfo[sCellIdx]);
+ DU_LOG("\nINFO --> SCH : ***** SCellIdx=%d state Changed to %d State \n",sCellIdx,\
+ ueCb->cellInfo[sCellIdx]->sCellState);
+ DU_LOG("\nINFO --> SCH : ***** SCellInfo Addr=%p state Changed to RG_SCH_SCELL_READY\n",\
+ (void*)ueCb->cellInfo[sCellIdx]);
}
break;
}
{
if(ueCb->cellInfo[sCellIdx]->sCellState != RG_SCH_SCELL_READY)
{
- RGSCHDBGERRNEW(inst, (rgSchPBuf(inst),"Invalid state %u for activating SCell Idx %u for UE %u\n", \
- ueCb->cellInfo[sCellIdx]->sCellState, sCellIdx, ueCb->ueId));
+ DU_LOG("\nERROR --> SCH : Invalid state %u for activating SCell Idx %u for UE %u\n", \
+ ueCb->cellInfo[sCellIdx]->sCellState, sCellIdx, ueCb->ueId);
ret = RFAILED;
}
else
{
if(ueCb->cellInfo[sCellIdx]->sCellState != RG_SCH_SCELL_ACTIVE)
{
- RGSCHDBGERRNEW(inst, (rgSchPBuf(inst),"Invalid state %u for deactivating SCell Idx %u for UE %u\n", \
- ueCb->cellInfo[sCellIdx]->sCellState, sCellIdx, ueCb->ueId));
+ DU_LOG("\nERROR --> SCH : Invalid state %u for deactivating SCell Idx %u for UE %u\n", \
+ ueCb->cellInfo[sCellIdx]->sCellState, sCellIdx, ueCb->ueId);
ret = RFAILED;
}
else
}
default:
{
- RGSCHDBGERRNEW(inst, (rgSchPBuf(inst),"Invalid action received for SCell Idx %u for UE %u\n", \
- sCellIdx, ueCb->ueId));
+ DU_LOG("\nERROR --> SCH : Invalid action received for SCell Idx %u for UE %u\n", \
+ sCellIdx, ueCb->ueId);
ret = RFAILED;
break;
}
if ((ret != ROK) ||
(ROK != (rgSCHSCellTrigActDeact(pCell, ueCb, sCellIdx, action))))
{
- RGSCHDBGERR(pCell->instIdx,(rgSchPBuf(pCell->instIdx), "SCell Actication failed"
- "for UE [%d] with SCellIdx [%d]\n", ueCb->ueId, sCellIdx));
+ DU_LOG("\nERROR --> SCH : SCell Actication failed"
+ "for UE [%d] with SCellIdx [%d]\n", ueCb->ueId, sCellIdx);
}
return;
}
if(sCellInfo == NULLP)
{
- RGSCHDBGERRNEW(inst, (rgSchPBuf(inst),"Serv Cell not added to this Ue Scell Idx %d\
+ DU_LOG("\nERROR --> SCH : Serv Cell not added to this Ue Scell Idx %d\
ueId %d\n",
- sCellIdx,ueCb->ueId));
+ sCellIdx,ueCb->ueId);
return;
}
RgSchUeCellInfo *sCellInfo;
RgSchUePCqiCb *cqiCb = NULLP;
- RGSCHDBGINFO(priCellCb->instIdx, (rgSchPBuf(priCellCb->instIdx),
- "rgSCHSCellPCqiCfg cellId =%d, ueId = %d, CfgType =%d\n",
- secCellCb->cellId, ueCb->ueId, cqiCfg->type));
+ DU_LOG("\nINFO --> SCH : rgSCHSCellPCqiCfg cellId =%d, ueId = %d, CfgType =%d\n",
+ secCellCb->cellId, ueCb->ueId, cqiCfg->type);
if((sCellIdx < 1) ||
(sCellIdx > RGR_MAX_SCELL_PER_UE))
{
- RGSCHDBGERRNEW(inst, (rgSchPBuf(inst),"Invalid Serv Cell Idx %d\n",
- sCellIdx));
+ DU_LOG("\nERROR --> SCH : Invalid Serv Cell Idx %d\n",
+ sCellIdx);
return RFAILED;
}
#endif
- RGSCHDBGINFO(priCellCb->instIdx,(rgSchPBuf(priCellCb->instIdx),
- "\n rgSCHSCellPCqiCfg(): CQI Peri=%d, CQI Offset=%d",
- cqiCb->cqiPeri,cqiCb->cqiOffset));
+ DU_LOG("\nDEBUG --> SCH : rgSCHSCellPCqiCfg(): CQI Peri=%d, CQI Offset=%d",
+ cqiCb->cqiPeri,cqiCb->cqiOffset);
if(RGR_UE_PCQI_SB_REP == cqiCfg->cqiSetup.cqiRepType)
{
cqiCfg->cqiSetup.riCfgIdx,
&cqiCb->riPeri, &cqiCb->riOffset);
- RGSCHDBGINFO(priCellCb->instIdx,(rgSchPBuf(priCellCb->instIdx),
- "\n rgSCHSCellPCqiCfg(): RI Peri=%d, RI Offset=%d",
- cqiCb->riPeri,cqiCb->riOffset));
+ DU_LOG("\nDEBUG --> SCH : rgSCHSCellPCqiCfg(): RI Peri=%d, RI Offset=%d",
+ cqiCb->riPeri,cqiCb->riOffset);
if(ueCb->cellInfo[sCellIdx]->txMode.txModeEnum == RGR_UE_TM_3
|| ueCb->cellInfo[sCellIdx]->txMode.txModeEnum == RGR_UE_TM_4)
/** @file rg_sch_tmr.c
@brief This module does processing related to timers for the scheduler.
*/
-static const char* RLOG_MODULE_NAME="MAC";
-static int RLOG_MODULE_ID=4096;
-static int RLOG_FILE_ID=175;
/* header include files -- defines (.h) */
#include "common_def.h"
{
case RG_SCH_TMR_ACKNACK_REP:
arg.timers = &(ue->ackNakRepCb.ackNakRepTmr);
- RLOG_ARG0(L_ERROR,DBG_INSTID,cell->instIdx,
- "Hit AckNackRep timer");
+ DU_LOG("\nINFO --> SCH : Hit AckNackRep timer");
break;
case RG_SCH_TMR_MEASGAP:
arg.timers = &(ue->measGapCb.measGapTmr);
}
#endif
default:
- RLOG_ARG0(L_ERROR,DBG_INSTID,cell->instIdx,
- "rgSCHTmrStartTmr() Incorrect Timer event");
+ DU_LOG("\nERROR --> SCH : rgSCHTmrStartTmr() Incorrect Timer event");
return;
}
#endif
default:
- RLOG_ARG0(L_ERROR,DBG_INSTID,cell->instIdx,
- "rgSCHTmrStopTmr() Incorrect Timer event");
+ DU_LOG("\nERROR --> SCH : rgSCHTmrStopTmr() Incorrect Timer event");
return;
}
/*TODO Needto handle TA Timer expiry for EMTC UE*/
if(TRUE == ue->isEmtcUe)
{
- RLOG0(L_INFO,"TA Timer Expiry is not handled for EMTC UE\n");
+ DU_LOG("\nINFO --> SCH : TA Timer Expiry is not handled for EMTC UE\n");
break;
}
#endif
default:
if(ue)
{
- RLOG_ARG0(L_ERROR,DBG_INSTID,ue->cell->instIdx,
- "rgSCHTmrProcTmr() Incorrect Timer event");
+ DU_LOG("\nERROR --> SCH : rgSCHTmrProcTmr() Incorrect Timer event");
}
return;
}
@brief This module does processing related to handling of lower interface APIs
invoked by PHY towards scheduler.
*/
-static const char* RLOG_MODULE_NAME="MAC";
-static int RLOG_FILE_ID=228;
-static int RLOG_MODULE_ID=4096;
/* header include files -- defines (.h) */
#include "common_def.h"
{
RgSchCmnCell *cellSch = (RgSchCmnCell *)(cell->sc.sch);
- printf("rapId[%d] cellSch->rachCfg.dedPrmStart[%d] cellSch->rachCfg.numDedPrm[%d]\n",rapId,cellSch->rachCfg.dedPrmStart,cellSch->rachCfg.numDedPrm);
+ DU_LOG("\nINFO --> SCH : rapId[%d] cellSch->rachCfg.dedPrmStart[%d] cellSch->rachCfg.numDedPrm[%d]\n",\
+ rapId,cellSch->rachCfg.dedPrmStart,cellSch->rachCfg.numDedPrm);
/* Finding UE in handOver List */
if ((rapId < cellSch->rachCfg.dedPrmStart) ||
(rapId > cellSch->rachCfg.dedPrmStart +
{
/* This ded Preamble corresponds to handover */
*ue = rgSCHCmnGetHoUe(cell, rapId);
- printf(" his ded Preamble corresponds to hando\n");
+ DU_LOG("\nDEBUG --> SCH : ded Preamble corresponds to handover\n");
}
else/* Finding UE from PDCCH Order Mappings */
{
/* Get the UE which has transmitted this RaReq */
*ue = rgSCHCmnGetPoUe(cell, rapId, timingInfo);
- printf(" ==== inding UE from PDCCH Order Mapping\n");
+ DU_LOG("\nDEBUG --> SCH : UE from PDCCH Order Mapping\n");
}
return ROK;
}
{
err.errType = RGSCHERR_TOM_RAREQIND;
err.errCause = RGSCHERR_TOM_INV_CELL_ID;
- RLOG_ARG3(L_ERROR,DBG_CELLID,cell->cellId,
- "rgSCHTomRaReqInd(): No cell found with raReq cellId = (%d) errorType (%d)"
+ DU_LOG("\nERROR --> SCH : rgSCHTomRaReqInd(): No cell found with raReq cellId = (%d) errorType (%d)"
" errorCause(%d)",raReqInd->cellId, err.errType, err.errCause);
return RFAILED;
}
#if (ERRCLASS & ERRCLS_DEBUG)
if(raReqInd->rachInfoArr[raRntiCnt].raRnti > RGSCH_MAX_RA_RNTI)
{
- RGSCHLOGERROR(cell->instIdx, ERRCLS_INT_PAR, ERG013,
- (ErrVal)raReqInd->rachInfoArr[raRntiCnt].raRnti,
- ("rgSCHTomRaReqInd(): raRnti is out of range\n"));
+ DU_LOG("\nERROR --> SCH : rgSCHTomRaReqInd(): raRnti is out of range\n");
continue;
}
#endif
if(ret == RFAILED)
{
err.errType = RGSCHERR_TOM_RAREQIND;
- RLOG_ARG3(L_ERROR,DBG_CELLID,cell->cellId,
- "RARNTI:%d rgSCHTomRaReqInd(): RAM processing failed errType(%d) "
+ DU_LOG("\nERROR --> SCH : RARNTI:%d rgSCHTomRaReqInd(): RAM processing failed errType(%d) "
"errCause(%d)", raReqInd->rachInfoArr[raRntiCnt].raRnti,
err.errType, err.errCause);
continue;
node = ulCqiInd->ulCqiRpt.first;
if(cell->cellId != ulCqiInd->cellId)
{
- RLOG_ARG1(L_ERROR,DBG_CELLID,cell->cellId,
- "rgSCHTomUlCqiInd() Unable to get the ulCqiInd cell with id(%d)",
+ DU_LOG("\nERROR --> SCH : rgSCHTomUlCqiInd() Unable to get the ulCqiInd cell with id(%d)",
ulCqiInd->cellId);
return RFAILED;
}
#if (ERRCLASS & ERRCLS_DEBUG)
if(ulCqiInfo->numSubband == 0)
{
- RLOG_ARG1(L_ERROR,DBG_CELLID,cell->cellId,"Num Subband is"
+ DU_LOG("\nERROR --> SCH : Num Subband is"
"out of range RNTI:%d",ulCqiInfo->rnti);
continue;
}
if((ue = rgSCHDbmGetSpsUeCb(cell, ulCqiInfo->rnti)) == NULLP)
#endif
{
- RLOG_ARG1(L_ERROR,DBG_CELLID,cell->cellId,"Unable to get "
- "the ue for RNTI:%d", ulCqiInfo->rnti);
+ DU_LOG("\nERROR --> SCH : Unable to get the ue for RNTI:%d", ulCqiInfo->rnti);
continue;
}
}
if(cell->cellId != pucchDeltaPwr->cellId)
{
- RLOG_ARG1(L_ERROR,DBG_CELLID,cell->cellId,
- "rgSCHTomPucchDeltaPwrInd() Unable to get the pucchDeltaPwr cell with id(%d)",
+ DU_LOG("\nERROR --> SCH : rgSCHTomPucchDeltaPwrInd() Unable to get the pucchDeltaPwr cell with id(%d)",
pucchDeltaPwr->cellId);
return RFAILED;
}
if((ue = rgSCHDbmGetSpsUeCb(cell, ueElem->rnti)) == NULLP)
#endif
{
- RLOG_ARG1(L_ERROR,DBG_CELLID,cell->cellId,"RNTI:%d "
+ DU_LOG("\nERROR --> SCH : RNTI:%d "
"rgSCHTomPucchDeltaPwrInd() Unable to get the ue ",
ueElem->rnti);
continue;
if(cell->cellId != harqAckInd->cellId)
{
- RLOG_ARG1(L_ERROR,DBG_CELLID,cell->cellId,"rgSCHTomHarqAckInd() Unable to get"
+ DU_LOG("\nERROR --> SCH : rgSCHTomHarqAckInd() Unable to get"
" the cell for cellId (%d)", harqAckInd->cellId);
err.errType = RGSCHERR_TOM_HARQACKIND;
err.errCause = RGSCHERR_TOM_INV_CELL_ID;
if ((rgSCHDhm5gtfHqFdbkInd (ue, cell, harqAckInd->timingInfo, fdbk, &err)) != ROK)
{
err.errType = RGSCHERR_TOM_HARQACKIND;
- RLOG_ARG2(L_ERROR,DBG_CELLID,cell->cellId,"rgSCHTomHarqAckInd() "
+ DU_LOG("\nERROR --> SCH : rgSCHTomHarqAckInd() "
"HARQ feedback processing failed errType(%d)errCause(%d)n",
err.errType, err.errCause);
continue;
if ((rgSCHDhmRlsDlsfHqProc (cell, harqAckInd->timingInfo)) != ROK)
{
- RLOG_ARG1(L_ERROR,DBG_CELLID,cell->cellId,"Unable to Release Downlink "
+ DU_LOG("\nERROR --> SCH : Unable to Release Downlink "
"subframe for cellId (%d) ", cell->cellId);
err.errType = RGSCHERR_TOM_HARQACKIND;
}
cell, harqAckInd->timingInfo, hqInfo, rlsHqBufs, &err)) != ROK)
{
err.errType = RGSCHERR_TOM_HARQACKIND;
- RLOG_ARG2(L_ERROR,DBG_CELLID,cell->cellId,"rgSCHTomHarqAckInd() HARQ"
+ DU_LOG("\nERROR --> SCH : rgSCHTomHarqAckInd() HARQ"
" feedback processing failed errType(%d) errCause(%d)",
err.errType, err.errCause);
continue;
cell, harqAckInd->timingInfo, hqInfo, rlsHqBufs, &err)) != ROK)
{
err.errType = RGSCHERR_TOM_HARQACKIND;
- RLOG_ARG2(L_ERROR,DBG_CELLID,cell->cellId,"rgSCHTomHarqAckInd() "
+ DU_LOG("\nERROR --> SCH : rgSCHTomHarqAckInd() "
"HARQ feedback processing failed errType(%d)errCause(%d)n",
err.errType, err.errCause);
continue;
cell, harqAckInd->timingInfo, hqInfo, rlsHqBufs, &err)) != ROK)
{
err.errType = RGSCHERR_TOM_HARQACKIND;
- RLOG_ARG2(L_ERROR,DBG_CELLID,cell->cellId,"rgSCHTomHarqAckInd() HARQ"
+ DU_LOG("\nERROR --> SCH : rgSCHTomHarqAckInd() HARQ"
" feedback processing failed errType(%d) errCause(%d).",
err.errType, err.errCause);
continue;
}
else
{
- RLOG_ARG1(L_ERROR,DBG_CELLID,cell->cellId,"RNTI:%d Unable to get the "
+ DU_LOG("\nERROR --> SCH : RNTI:%d Unable to get the "
"UE CB or RA CB ", hqInfo->rnti);
err.errType = RGSCHERR_TOM_HARQACKIND;
continue;
/* Check with TDD call DHM*/
if ((rgSCHDhmRlsDlsfHqProc (cell, harqAckInd->timingInfo)) != ROK)
{
- RLOG_ARG1(L_ERROR,DBG_CELLID,cell->cellId,"Unable to Release Downlink "
+ DU_LOG("\nERROR --> SCH : Unable to Release Downlink "
"subframe for cellId (%d) ", harqAckInd->cellId);
err.errType = RGSCHERR_TOM_HARQACKIND;
}
if(cell->cellId != srInd->cellId)
{
- RLOG_ARG1(L_ERROR,DBG_CELLID,cell->cellId,"Unable to get the cell for srcInd cellId"
+ DU_LOG("\nERROR --> SCH : Unable to get the cell for srcInd cellId"
":%d ", srInd->cellId);
err.errType = RGSCHERR_TOM_SRIND;
err.errCause = RGSCHERR_TOM_INV_CELL_ID;
ue = rgSCHDbmGetUeCb (cell, srInfo->rnti);
if (ue == NULLP)
{
- RLOG_ARG1(L_ERROR,DBG_CELLID,cell->cellId,"RNTI:%d Unable to get the UE CB",
+ DU_LOG("\nERROR --> SCH : RNTI:%d Unable to get the UE CB",
srInfo->rnti);
continue;
}
if (ret != ROK)
{
err.errType = RGSCHERR_TOM_SRIND;
- RLOG_ARG3(L_ERROR,DBG_CELLID,cell->cellId,"Scheduler processing failed "
+ DU_LOG("\nERROR --> SCH : Scheduler processing failed "
"errType(%d) errCause(%d) RNTI:%d", err.errType, err.errCause,srInfo->rnti);
continue;
}
if(cell->cellId != doaInd->cellId)
{
- RLOG_ARG1(L_ERROR,DBG_CELLID,cell->cellId,"Unable to get the cell for doaInd cellId"
+ DU_LOG("\nERROR --> SCH : Unable to get the cell for doaInd cellId"
":%d", doaInd->cellId);
return RFAILED;
}
ue = rgSCHDbmGetUeCb (cell, doaInfo->rnti);
if (ue == NULLP)
{
- RLOG_ARG1(L_ERROR,DBG_CELLID,cell->cellId,"RNTI:%d Unable to get the UE CB",
+ DU_LOG("\nERROR --> SCH : RNTI:%d Unable to get the UE CB",
doaInfo->rnti);
continue;
}
if(cell->cellId != dlCqiInd->cellId)
{
- RLOG_ARG1(L_ERROR,DBG_CELLID,cell->cellId,"Unable to get the cell for cellId"
+ DU_LOG("\nERROR --> SCH : Unable to get the cell for cellId"
":%d", dlCqiInd->cellId);
return RFAILED;
}
ue = rgSCHDbmGetUeCb (cell, dlCqiInfo->rnti);
if (ue == NULLP)
{
- RLOG_ARG1(L_ERROR,DBG_CELLID,cell->cellId,"RNTI:%dUnable to get the UE CB",
+ DU_LOG("\nERROR --> SCH : RNTI:%dUnable to get the UE CB",
dlCqiInfo->rnti);
continue;
}
if (NULLP == cmLListDelFrm(&cell->pCqiSrsSrLst[cqiCb->nCqiTrIdx].cqiLst,
&cqiCb->cqiLstEnt))
{
- RLOG_ARG1(L_ERROR,DBG_CELLID,cell->cellId,"RNTI:%d Unable to remove node",
+ DU_LOG("\nERROR --> SCH : RNTI:%d Unable to remove node",
ue->ueId);
}
cqiCb->nCqiTrIdx = cqiIdx;
if (NULLP == cmLListDelFrm(&cell->pCqiSrsSrLst[riCb->nRiTrIdx].riLst,
&riCb->riLstEnt))
{
- RLOG_ARG1(L_ERROR,DBG_CELLID,cell->cellId,"[%d]UEID:Unable to remove node",
+ DU_LOG("\nERROR --> SCH : [%d]UEID:Unable to remove node",
ue->ueId);
}
RG_SCH_RECORD(&riCb->histElem,RGSCH_ACTION_DEL, &cell->pCqiSrsSrLst[riCb->nRiTrIdx].riLst);
if (NULLP == cmLListDelFrm(&cell->pCqiSrsSrLst[ue->srCb.nSrTrIdx].srLst,
&ue->srCb.srLstEnt))
{
- RLOG_ARG1(L_ERROR,DBG_CELLID,cell->cellId,"RNTI:%d Unable to remove node",
+ DU_LOG("\nERROR --> SCH : RNTI:%d Unable to remove node",
ue->ueId);
}
ue->srCb.nSrTrIdx = srIdx;
if (NULLP == cmLListDelFrm(&cell->pCqiSrsSrLst[ue->srsCb.nSrsTrIdx].srsLst,
&ue->srsCb.srsLstEnt))
{
- RLOG_ARG1(L_ERROR,DBG_CELLID,cell->cellId,"RNTI:%d Unable to remove node",
+ DU_LOG("\nERROR --> SCH : RNTI:%d Unable to remove node",
ue->ueId);
}
cmLListAdd2Tail(&cell->pCqiSrsSrLst[srsIdx].srsLst,
if(cell->cellId != rawCqiInd->cellId)
{
- RLOG_ARG1(L_ERROR,DBG_CELLID,cell->cellId,"Unable to get the cell for cellId"
+ DU_LOG("\nERROR --> SCH : Unable to get the cell for cellId"
":%d", rawCqiInd->cellId);
return RFAILED;
}
/*
if (ue == NULLP)
{
- RLOG_ARG1(L_ERROR,DBG_CELLID,cell->cellId,"CRNTI:%d Unable to get the UECB",
+ DU_LOG("\nERROR --> SCH : CRNTI:%d Unable to get the UECB",
rawCqiInfo->crnti);
continue;
}
#ifdef RG_5GTF
/*
if (rawCqiInfo->numBits >= 5)
- printf("cellId [%d] crnti [%d] numBits [%d] uciPayload [0x%08x] sfn/sf [%d:%d]\n",
+ DU_LOG("\nINFO --> SCH : cellId [%d] crnti [%d] numBits [%d] uciPayload [0x%08x] sfn/sf [%d:%d]\n",
cell->cellId, rawCqiInfo->crnti, rawCqiInfo->numBits, rawCqiInfo->uciPayload,
rawCqiInd->timingInfo.sfn, rawCqiInd->timingInfo.slot);
*/
if ((rgSCHDhm5gtfHqFdbkInd (ue, cell, rawCqiInd->timingInfo, fdbk, &err)) != ROK)
{
err.errType = RGSCHERR_TOM_HARQACKIND;
- RLOG_ARG2(L_ERROR,DBG_CELLID,cell->cellId,"rgSCHTomHarqAckInd() "
+ DU_LOG("\nERROR --> SCH : rgSCHTomHarqAckInd() "
"HARQ feedback processing failed errType(%d)errCause(%d)n",
err.errType, err.errCause);
continue;
cell, rawCqiInd->timingInfo, &hqInfo, rlsHqBufs, &err)) != ROK)
{
err.errType = RGSCHERR_TOM_HARQACKIND;
- RLOG_ARG2(L_ERROR,DBG_CELLID,cell->cellId,"rgSCHTomHarqAckInd() HARQ"
+ DU_LOG("\nERROR --> SCH : rgSCHTomHarqAckInd() HARQ"
" feedback processing failed errType(%d) errCause(%d)",
err.errType, err.errCause);
continue;
cell, rawCqiInd->timingInfo, &hqInfo, rlsHqBufs, &err)) != ROK)
{
err.errType = RGSCHERR_TOM_HARQACKIND;
- RLOG_ARG2(L_ERROR,DBG_CELLID,cell->cellId,"rgSCHTomHarqAckInd() HARQ"
+ DU_LOG("\nERROR --> SCH : rgSCHTomHarqAckInd() HARQ"
" feedback processing failed errType(%d) errCause(%d).",
err.errType, err.errCause);
continue;
}
else
{
- RLOG_ARG1(L_ERROR,DBG_CELLID,cell->cellId,"RNTI:%d Unable to get the "
+ DU_LOG("\nERROR --> SCH : RNTI:%d Unable to get the "
"UE CB or RA CB ", rawCqiInfo->crnti);
err.errType = RGSCHERR_TOM_HARQACKIND;
continue;
}
/*
- printf("rawCqiInfo->numBits [%d] uciPayload [0x%08x] sfn/sf [%d:%d]\n", rawCqiInfo->numBits,
+ DU_LOG("rawCqiInfo->numBits [%d] uciPayload [0x%08x] sfn/sf [%d:%d]\n", rawCqiInfo->numBits,
rawCqiInfo->uciPayload, rawCqiInd->timingInfo.sfn, rawCqiInd->timingInfo.slot);
*/
}
if(ue) {
if (cqi == 0)
{
- printf("\n UE[%d] CQI[%d] Invalid\n", ue->ueId, cqi);
+ DU_LOG("\nERROR --> SCH : UE[%d] CQI[%d] Invalid\n", ue->ueId, cqi);
cqi = 15;
}
ue->ue5gtfCb.mcs = rgSch5gtfCqi2Mcs[cqi - 1];
#endif
}
/*
- printf("UE[%d] CQI[%d] MCS[%d] RI[%d]\n", ue->ueId, cqi, ue->ue5gtfCb.mcs, ri);
+ DU_LOG("\nERROR --> SCH : UE[%d] CQI[%d] MCS[%d] RI[%d]\n", ue->ueId, cqi, ue->ue5gtfCb.mcs, ri);
*/
}
else if (rawCqiInfo->numBits == 6)
hqAck = (rawCqiInfo->uciPayload >> 31) & 0x1;
if (cqi == 0)
{
- printf("UE[%d] CQI[%d] Invalid\n", ue->ueId, cqi);
+ DU_LOG("\nERROR --> SCH : UE[%d] CQI[%d] Invalid\n", ue->ueId, cqi);
cqi = 13;
}
ue->ue5gtfCb.mcs = rgSch5gtfCqi2Mcs[cqi - 1];
if ((rgSCHDhm5gtfHqFdbkInd (ue, cell, rawCqiInd->timingInfo, fdbk, &err)) != ROK)
{
err.errType = RGSCHERR_TOM_HARQACKIND;
- RLOG_ARG2(L_ERROR,DBG_CELLID,cell->cellId,"rgSCHTomHarqAckInd() "
+ DU_LOG("\nERROR --> SCH : rgSCHTomHarqAckInd() "
"HARQ feedback processing failed errType(%d)errCause(%d)n",
err.errType, err.errCause);
continue;
cell, rawCqiInd->timingInfo, &hqInfo, rlsHqBufs, &err)) != ROK)
{
err.errType = RGSCHERR_TOM_HARQACKIND;
- RLOG_ARG2(L_ERROR,DBG_CELLID,cell->cellId,"rgSCHTomHarqAckInd() HARQ"
+ DU_LOG("\nERROR --> SCH : rgSCHTomHarqAckInd() HARQ"
" feedback processing failed errType(%d) errCause(%d)",
err.errType, err.errCause);
continue;
cell, rawCqiInd->timingInfo, &hqInfo, rlsHqBufs, &err)) != ROK)
{
err.errType = RGSCHERR_TOM_HARQACKIND;
- RLOG_ARG2(L_ERROR,DBG_CELLID,cell->cellId,"rgSCHTomHarqAckInd() HARQ"
+ DU_LOG("\nERROR --> SCH : rgSCHTomHarqAckInd() HARQ"
" feedback processing failed errType(%d) errCause(%d).",
err.errType, err.errCause);
continue;
}
else
{
- RLOG_ARG1(L_ERROR,DBG_CELLID,cell->cellId,"RNTI:%d Unable to get the "
+ DU_LOG("\nERROR --> SCH : RNTI:%d Unable to get the "
"UE CB or RA CB ", rawCqiInfo->crnti);
err.errType = RGSCHERR_TOM_HARQACKIND;
continue;
}
/*
- printf("\nUE[%u] CQI[%u] MCS[%u] RI[%u] HQ[%u]\n", ue->ueId, cqi, ue->ue5gtfCb.mcs, ri, hqAck);
+ DU_LOG("\nERROR --> SCH : UE[%u] CQI[%u] MCS[%u] RI[%u] HQ[%u]\n", ue->ueId, cqi, ue->ue5gtfCb.mcs, ri, hqAck);
*/
}
}
if ((rgSCHDhmRlsDlsfHqProc (cell, rawCqiInd->timingInfo)) != ROK)
{
- RLOG_ARG1(L_ERROR,DBG_CELLID,cell->cellId,"Unable to Release Downlink "
+ DU_LOG("\nERROR --> SCH : Unable to Release Downlink "
"subframe for cellId (%d) ", cell->cellId);
err.errType = RGSCHERR_TOM_HARQACKIND;
}
if(cell->cellId != srsInd->cellId)
{
- RLOG_ARG1(L_ERROR,DBG_CELLID,cell->cellId,"Unable to get the cell for cellId"
+ DU_LOG("\nERROR --> SCH : Unable to get the cell for cellId"
":%d", srsInd->cellId);
return RFAILED;
}
ue = rgSCHDbmGetUeCb (cell, srsInfo->ueId);
if (ue == NULLP)
{
- RLOG_ARG1(L_ERROR,DBG_CELLID,cell->cellId,"RNTI:%d Unable to get the "
+ DU_LOG("\nERROR --> SCH : RNTI:%d Unable to get the "
"UE CB", srsInfo->ueId);
continue;
}
if(cell->cellId != crcInd->cellId)
{
- RLOG_ARG1(L_ERROR,DBG_CELLID,cell->cellId,"Unable to get the cell for cellId"
+ DU_LOG("\nERROR --> SCH : Unable to get the cell for cellId"
":%d", crcInd->cellId);
return RFAILED;
}
if (RGSCH_TIMEINFO_SAME(lastCrc, crntCrc))
{
/*Removed the WA to drop 2nd CRC*/
- RLOG_ARG2(L_ERROR,DBG_CELLID,cell->cellId,"Recieved CRC "
+ DU_LOG("\nINFO --> SCH : Recieved CRC "
"twice per TTI @(%u,%u)", cell->crntTime.sfn,
cell->crntTime.slot);
}
if ((ret = rgSCHUtlAllocEventMem(inst, (Ptr *)&cntrlInfo,
sizeof(TfuCntrlReqInfo))) != ROK)
{
- RLOG_ARG0(L_ERROR,DBG_CELLID,cell->cellId,"Unable to Allocate TfuCntrlReqInfo "
+ DU_LOG("\nERROR --> SCH : Unable to Allocate TfuCntrlReqInfo "
"for cell");
return ret;
}
if ((rgSCHTomUtlProcDlSfAtCrc (ulSf, crntHiDci0Frm, cell, cntrlInfo, &err)) != ROK)
{
- RLOG_ARG1(L_ERROR,DBG_CELLID,cell->cellId,"rgSCHTomCrcInd() Unable to process"
+ DU_LOG("\nERROR --> SCH : rgSCHTomCrcInd() Unable to process"
" downlink subframe for cellId %d", crcInd->cellId);
err.errType = RGSCHERR_TOM_TTIIND;
return RFAILED;
if(cell->cellId != timingAdvInd->cellId)
{
- RLOG_ARG1(L_ERROR,DBG_CELLID,cell->cellId,"Unable to get the cell for cellId"
+ DU_LOG("\nERROR --> SCH : Unable to get the cell for cellId"
"=(%d)", timingAdvInd->cellId);
return RFAILED;
}
ue = rgSCHDbmGetUeCb (cell, timingAdvInfo->rnti);
if (ue == NULLP)
{
- RLOG_ARG1(L_ERROR,DBG_CELLID,cell->cellId,"RNTI:%d Unable to get the UE CB",
+ DU_LOG("\nERROR --> SCH : RNTI:%d Unable to get the UE CB",
timingAdvInfo->rnti);
continue;
}
if ((ret = rgSCHUtlAllocEventMem((cell[i]->instIdx), (Ptr *)&cntrlInfo,
sizeof(RgTfuCntrlReqInfo))) != ROK)
{
- RLOG_ARG0(L_ERROR,DBG_CELLID,cell[i]->cellId,"Unable to Allocate TfuCntrlReqInfo"
+ DU_LOG("\nERROR --> SCH : Unable to Allocate TfuCntrlReqInfo"
" for cell");
return;
}
if(gTtiCount == 3000)
{
#ifdef XEON_SPECIFIC_CHANGES
- printf("SChed:: (P/S)::(%u/%u) \n",
+ DU_LOG("\nINFO --> SCH : SChed:: (P/S)::(%u/%u) \n",
gPrimarySchedCount,gSCellSchedCount);
- printf("\n HQFDBK :: %u\n",gHqFdbkCount);
+ DU_LOG("\nINFO --> SCH : HQFDBK :: %u\n",gHqFdbkCount);
long int total;
long int total2 ;
total = gPCellTb1AckCount + gPCellTb1NackCount + gPCellTb1DtxCount;
total2 = gPCellTb2AckCount + gPCellTb2NackCount + gPCellTb2DtxCount;
- printf("\n PCell:: TB1:: (A/N/D)::(%u/%u/%u) TB2:: (A/N/D)::(%u/%u/%u)\n",
+ DU_LOG("\nINFO --> SCH : PCell:: TB1:: (A/N/D)::(%u/%u/%u) TB2:: (A/N/D)::(%u/%u/%u)\n",
gPCellTb1AckCount,gPCellTb1NackCount,gPCellTb1DtxCount,
gPCellTb2AckCount,gPCellTb2NackCount,gPCellTb2DtxCount);
if ((total != 0 ) && total2 != 0)
{
- printf("\n PCell:: TB1:: (AP/NP/DP)::(%.2f/%.2f/%.2f) TB2:: (AP/NP/DP)::(%.2f/%.2f/%.2f)\n",
+ DU_LOG("\nINFO --> SCH : PCell:: TB1:: (AP/NP/DP)::(%.2f/%.2f/%.2f) TB2:: (AP/NP/DP)::(%.2f/%.2f/%.2f)\n",
(float)gPCellTb1AckCount/total * 100,(float)gPCellTb1NackCount/total * 100,(float)gPCellTb1DtxCount/total * 100,
(float)gPCellTb2AckCount/total2 *100 ,(float)gPCellTb2NackCount/total2 *100 ,(float)gPCellTb2DtxCount/total2 *2);
}
total2 = gSCellTb2AckCount + gSCellTb2NackCount + gSCellTb2DtxCount;
- printf("\n SCell:: TB1:: (A/N/D)::(%u/%u/%u) TB2:: (A/N/D)::(%u/%u/%u)\n",
+ DU_LOG("\nINFO --> SCH : SCell:: TB1:: (A/N/D)::(%u/%u/%u) TB2:: (A/N/D)::(%u/%u/%u)\n",
gSCellTb1AckCount,gSCellTb1NackCount,gSCellTb1DtxCount,
gSCellTb2AckCount,gSCellTb2NackCount,gSCellTb2DtxCount);
if ((total != 0 ) && total2 != 0)
{
- printf("\n SCell:: TB1:: (AP/NP/DP)::(%.2f/%.2f/%.2f) TB2:: (AP/NP/DP)::(%.2f/%.2f/%.2f)\n",
+ DU_LOG("\nINFO --> SCH : SCell:: TB1:: (AP/NP/DP)::(%.2f/%.2f/%.2f) TB2:: (AP/NP/DP)::(%.2f/%.2f/%.2f)\n",
(float)gSCellTb1AckCount/total * 100,(float)gSCellTb1NackCount/total * 100,(float)gSCellTb1DtxCount/total * 100,
(float)gSCellTb2AckCount/total2 *100 ,(float)gSCellTb2NackCount/total2 *100 ,(float)gSCellTb2DtxCount/total2 *2);
}
- printf("\n CQI:: Recp(Pucch/Pusch):Rcvd(pcqi/rawacqireport/apcqi/AppReprt)::(%u/%u):(%u/%u/%u/%u)\n",
+ DU_LOG("\nINFO --> SCH : CQI:: Recp(Pucch/Pusch):Rcvd(pcqi/rawacqireport/apcqi/AppReprt)::(%u/%u):(%u/%u/%u/%u)\n",
gCqiRecpCount,gCqiRecpPuschCount,gCqiRcvdCount,gRawACqiCount,
gACqiRcvdCount,gCqiReptToAppCount);
- printf("\n (F1BCS Count/Cqi/Ri/CqiDrop/PucchDrop/PuschCqiDrop)::(%u/%u/%u/%u/%u/%u)\n",
+ DU_LOG("\nINFO --> SCH : (F1BCS Count/Cqi/Ri/CqiDrop/PucchDrop/PuschCqiDrop)::(%u/%u/%u/%u/%u/%u)\n",
gF1bCsCount,gCqiReqCount,gRiReqCount,gCqiDropCount,gPucchDropCount,gPuschCqiDropCount);
- printf("UL::(DCI0/CrcPass/CrcFail)::(%u/%u/%u)\n"
+ DU_LOG("\nINFO --> SCH : UL::(DCI0/CrcPass/CrcFail)::(%u/%u/%u)\n"
"gPcellZeroBoOcc:%u\t gScellZeroBoOcc:%u dbgUeIdChngAndDatReqInClCnt: %u\n"
"DelayedDatReqInMac: %u DelayedDatReqInCl : %u gIccPktRcvrMemDropCnt :%u\n",
gDci0Count,
dbgDelayedDatReqInMac,
gDropDatReqCnt, gIccPktRcvrMemDropCnt);
#else
- printf("SChed:: (P/S)::(%ld/%ld) \n",
+ DU_LOG("\nINFO --> SCH : SChed:: (P/S)::(%ld/%ld) \n",
gPrimarySchedCount,gSCellSchedCount);
- printf("\n HQFDBK :: %ld\n",gHqFdbkCount);
+ DU_LOG("\nINFO --> SCH : HQFDBK :: %ld\n",gHqFdbkCount);
+
- printf("\n PCell:: TB1:: (A/N/D)::(%ld/%ld/%ld) TB2:: (A/N/D)::(%ld/%ld/%ld)\n",
+ DU_LOG("\nINFO --> SCH : PCell:: TB1:: (A/N/D)::(%ld/%ld/%ld) TB2:: (A/N/D)::(%ld/%ld/%ld)\n",
gPCellTb1AckCount,gPCellTb1NackCount,gPCellTb1DtxCount,
gPCellTb2AckCount,gPCellTb2NackCount,gPCellTb2DtxCount);
- printf("\n SCell:: TB1:: (A/N/D)::(%ld/%ld/%ld) TB2:: (A/N/D)::(%ld/%ld/%ld)\n",
+ DU_LOG("\nINFO --> SCH : SCell:: TB1:: (A/N/D)::(%ld/%ld/%ld) TB2:: (A/N/D)::(%ld/%ld/%ld)\n",
gSCellTb1AckCount,gSCellTb1NackCount,gSCellTb1DtxCount,
gSCellTb2AckCount,gSCellTb2NackCount,gSCellTb2DtxCount);
- printf("\n CQI:: Recp(Pucch/Pusch):Rcvd(pcqi/rawacqireport/apcqi/AppReprt)::(%ld/%ld):(%ld/%ld/%ld/%ld)\n",
+ DU_LOG("\nINFO --> SCH : CQI:: Recp(Pucch/Pusch):Rcvd(pcqi/rawacqireport/apcqi/AppReprt)::\
+ (%ld/%ld):(%ld/%ld/%ld/%ld)\n",
gCqiRecpCount,gCqiRecpPuschCount,gCqiRcvdCount,gRawACqiCount,
gACqiRcvdCount,gCqiReptToAppCount);
- printf("\n CQI:: PucchCqiSnrDropCnt/PucchCqiConfBitMaskDropCnt/PuschCqiConfMaskDropCount :: (%ld/%ld/%ld) \n",gCqiPucchLowSnrDropCount,gCqiPucchConfMaskDropCount,gCqiPuschConfMaskDropCount);
+ DU_LOG("\nINFO --> SCH : CQI:: PucchCqiSnrDropCnt/PucchCqiConfBitMaskDropCnt/PuschCqiConfMaskDropCount\
+ :: (%ld/%ld/%ld) \n",gCqiPucchLowSnrDropCount,gCqiPucchConfMaskDropCount,gCqiPuschConfMaskDropCount);
- printf("\n (F1BCS Count/Cqi/Ri/CqiDrop/PucchDrop/PuschCqiDrop)::(%ld/%ld/%ld/%ld/%ld/%ld)\n",
+ DU_LOG("\nINFO --> SCH : (F1BCS Count/Cqi/Ri/CqiDrop/PucchDrop/PuschCqiDrop)::(%ld/%ld/%ld/%ld/%ld/%ld)\n",
gF1bCsCount,gCqiReqCount,gRiReqCount,gCqiDropCount,gPucchDropCount,gPuschCqiDropCount);
- printf("UL::(DCI0/CrcPass/CrcFail)::(%ld/%ld/%ld)\n"
+ DU_LOG("\nINFO --> SCH : UL::(DCI0/CrcPass/CrcFail)::(%ld/%ld/%ld)\n"
"gPcellZeroBoOcc:%ld\t gScellZeroBoOcc:%ld dbgUeIdChngAndDatReqInClCnt: %ld\n"
"DelayedDatReqInMac: %ld DelayedDatReqInCl : %ld gIccPktRcvrMemDropCnt :%ld\n",
gDci0Count,
dbgUeIdChngAndDatReqInClCnt,
dbgDelayedDatReqInMac,
gDropDatReqCnt, gIccPktRcvrMemDropCnt);
- //printf ("\n delayedApiCnt:%ld",delayedApiCnt);
+ //DU_LOG("\nINFO --> SCH : delayedApiCnt:%ld",delayedApiCnt);
#endif
/*LAA STATS*/
if ((ret = rgSCHUtlAllocEventMem(inst, (Ptr *)&recpReqInfo,
sizeof(TfuRecpReqInfo))) != ROK)
{
- RLOG_ARG0(L_ERROR,DBG_CELLID,cell->cellId,"Unable to Allocate TfuRecpReqInfo "
+ DU_LOG("\nERROR --> SCH : Unable to Allocate TfuRecpReqInfo "
"for cell");
err->errCause = RGSCHERR_TOM_MEM_EXHAUST;
return ret;
err);
if (ret != ROK)
{
- RLOG_ARG0(L_ERROR,DBG_CELLID,cell->cellId,"Unable to fill Data recption "
+ DU_LOG("\nERROR --> SCH : Unable to fill Data recption "
"requests for cell");
RGSCH_FREE_MEM(recpReqInfo);
return ret;
ret = rgSCHTomUtlFillHqFdbkRecpReq (recpReqInfo, cell, validIdx,err);
if (ret != ROK)
{
- RLOG_ARG0(L_ERROR,DBG_CELLID,cell->cellId,"Unable to fill Harq Feedback "
+ DU_LOG("\nERROR --> SCH : Unable to fill Harq Feedback "
"reception requests for cell");
RGSCH_FREE_MEM(recpReqInfo);
return ret;
/* sending the RecpReq to Phy */
//if (rgSCHUtlTfuRecpReq(inst, cell->tfuSap->sapCfg.suId, recpReqInfo) != ROK)
{
- RLOG_ARG0(L_ERROR,DBG_CELLID,cell->cellId,"Unable to send Cntrl info for cell");
+ DU_LOG("\nERROR --> SCH : Unable to send Cntrl info for cell");
}
return ROK;
} /* end of rgSCHTomUtlProcUlSf */
if ((ret = rgSCHUtlAllocEventMem(inst, (Ptr *)&recpReqInfo,
sizeof(TfuRecpReqInfo))) != ROK)
{
- RLOG_ARG0(L_ERROR,DBG_CELLID,cell->cellId,"rgSCHTomUtlPrcUlTddSpclSf() Unable to "
+ DU_LOG("\nERROR --> SCH : rgSCHTomUtlPrcUlTddSpclSf() Unable to "
"Allocate TfuRecpReqInfo for cell");
err->errCause = RGSCHERR_TOM_MEM_EXHAUST;
return ret;
ret = rgSCHTomUtlFillSrsRecpReq (recpReqInfo, cell, validIdx, err);
if (ret != ROK)
{
- RLOG_ARG0(L_ERROR,DBG_CELLID,cell->cellId,"rgSCHTomUtlPrcUlTddSpclSf() Unable to fill"
+ DU_LOG("\nERROR --> SCH : rgSCHTomUtlPrcUlTddSpclSf() Unable to fill"
" SRS recption requests for cell");
RGSCH_FREE_MEM(recpReqInfo);
return ret;
/* sending the RecpReq to Phy */
//if (rgSCHUtlTfuRecpReq(inst, cell->tfuSap->sapCfg.suId, recpReqInfo) != ROK)
{
- RLOG_ARG0(L_ERROR,DBG_CELLID,cell->cellId,"rgSCHTomUtlPrcUlTddSpclSf() Unable to send "
+ DU_LOG("\nERROR --> SCH : rgSCHTomUtlPrcUlTddSpclSf() Unable to send "
"Cntrl info for cell");
}
return ROK;
RgSchErrInfo *err
)
{
- Inst inst = cell->instIdx;
S16 ret;
uint8_t sfTyp = 1; /* Dl Subframe */
cntrlInfo->ulTiming = cell->hiDci0Time;
if((0 == (cntrlInfo->dlTiming.sfn % 30)) && (0 == cntrlInfo->dlTiming.slot))
{
- //printf("5GTF_CHECK rgSCHTomUtlProcDlSf Cntrl dl (%d : %d) ul (%d : %d)\n", cntrlInfo->dlTiming.sfn, cntrlInfo->dlTiming.subframe, cntrlInfo->ulTiming.sfn, cntrlInfo->ulTiming.subframe);
+ //DU_LOG("\nERROR --> SCH : 5GTF_CHECK rgSCHTomUtlProcDlSf Cntrl dl (%d : %d) ul (%d : %d)\n", \
+ cntrlInfo->dlTiming.sfn, cntrlInfo->dlTiming.subframe, cntrlInfo->ulTiming.sfn, cntrlInfo->ulTiming.subframe);
}
/* Fill PCFICH info */
/* Fix for DCFI FLE issue: when DL delta is 1 and UL delta is 0 and CFI
/* Fill PHICH info */
if ((ret = rgSCHTomUtlFillPhich (cell, cntrlInfo, ulSf, err)) != ROK)
{
- RGSCHDBGERRNEW(inst,(rgSchPBuf(inst),"Unable to send PHICH info "
- "for cellId (%d)\n", cell->cellId));
+ DU_LOG("\nERROR --> SCH : Unable to send PHICH info "
+ "for cellId (%d)\n", cell->cellId);
RGSCH_FREE_MEM(cntrlInfo);
return ret;
}
if ((ret = rgSCHTomUtlFillUlPdcch (cell, cntrlInfo, ulSf, err)) !=
ROK)
{
- RGSCHDBGERRNEW(inst,(rgSchPBuf(inst),"Unable to send PDCCH info "
- "for cellId (%d)\n", cell->cellId));
+ DU_LOG("\nERROR --> SCH : Unable to send PDCCH info "
+ "for cellId (%d)\n", cell->cellId);
RGSCH_FREE_MEM(cntrlInfo);
return ret;
}
/* Fill PDCCH info */
if ((ret = rgSCHTomUtlFillDlPdcch(cell,cntrlInfo, dlSf, err)) != ROK)
{
- RGSCHDBGERRNEW(inst,(rgSchPBuf(inst),"Unable to send PDCCH info "
- "for cellId (%d)\n", cell->cellId));
+ DU_LOG("\nERROR --> SCH : Unable to send PDCCH info "
+ "for cellId (%d)\n", cell->cellId);
RGSCH_FREE_MEM(cntrlInfo);
return ret;
}
//if (rgSCHUtlTfuCntrlReq(inst, cell->tfuSap->sapCfg.suId, cntrlInfo)
//!= ROK)
{
- RLOG_ARG0(L_ERROR,DBG_CELLID,cell->cellId,"Unable to send Cntrl info "
- "for cell");
+ DU_LOG("\nERROR --> SCH : Unable to send Cntrl info for cell");
}
return ROK;
sizeof(TfuUeRecpReqInfo), &(recpReqInfo->memCp));
if (ret != ROK)
{
- RLOG_ARG0(L_ERROR,DBG_CELLID,cell->cellId,"Unable to Allocate "
- "TfuUeRecpReqInfo for cell");
+ DU_LOG("\nERROR --> SCH : Unable to Allocate TfuUeRecpReqInfo for cell");
err->errCause = RGSCHERR_TOM_MEM_EXHAUST;
return ret;
}
RgSchErrInfo *err
)
{
-#ifdef DEBUGP
- Inst inst = cell->instIdx;
-#endif
S16 ret;
RgSchUeCb *ue;
TfuUePucchRecpReq *pucchReqInfo = NULLP;
sizeof(TfuUeRecpReqInfo), &(recpReqInfo->memCp));
if (ret != ROK)
{
- RGSCHDBGERRNEW(inst,(rgSchPBuf(inst),"Unable to Allocate "
- "TfuUeRecpReqInfo for cellId=%d \n", cell->cellId));
+ DU_LOG("\nERROR --> SCH : Unable to Allocate "
+ "TfuUeRecpReqInfo for cellId=%d \n", cell->cellId);
err->errCause = RGSCHERR_TOM_MEM_EXHAUST;
return ret;
}
sizeof(TfuUeRecpReqInfo), &(recpReqInfo->memCp));
if (ret != ROK)
{
- RGSCHDBGERRNEW(inst,(rgSchPBuf(inst),"Unable to Allocate "
- "TfuUeRecpReqInfo for cellId=%d \n", cell->cellId));
+ DU_LOG("\nERROR --> SCH : Unable to Allocate TfuUeRecpReqInfo for cellId=%d \n", cell->cellId);
err->errCause = RGSCHERR_TOM_MEM_EXHAUST;
return ret;
}
sizeof(TfuUeRecpReqInfo), &(recpReqInfo->memCp));
if (ret != ROK)
{
- RGSCHDBGERRNEW(inst,(rgSchPBuf(inst),"Unable to Allocate "
- "TfuUeRecpReqInfo for cellId=%d \n", cell->cellId));
+ DU_LOG("\nERROR --> SCH : Unable to Allocate "
+ "TfuUeRecpReqInfo for cellId=%d \n", cell->cellId);
err->errCause = RGSCHERR_TOM_MEM_EXHAUST;
return ret;
}
if ((ret = rgSCHUtlGetEventMem((Ptr *)&pucchRecpInfo,
sizeof(TfuUeRecpReqInfo),&(recpReqInfo->memCp))) != ROK)
{
- RLOG_ARG1(L_ERROR,DBG_CELLID,cell->cellId,"Unable to Allocate "
- "TfuUeRecpReqInfo for cell RNTI:%d",ue->ueId);
+ DU_LOG("\nERROR --> SCH : Unable to Allocate TfuUeRecpReqInfo for cell RNTI:%d",ue->ueId);
err->errCause = RGSCHERR_TOM_MEM_EXHAUST;
return ret;
}
if ((ret = rgSCHUtlGetEventMem((Ptr *)&pucchRecpInfo,
sizeof(TfuUeRecpReqInfo),&(recpReqInfo->memCp))) != ROK)
{
- RLOG_ARG1(L_ERROR,DBG_CELLID,cell->cellId,"Unable to Allocate "
+ DU_LOG("\nERROR --> SCH : Unable to Allocate "
"TfuUeRecpReqInfo for cell RNTI:%d",ue->ueId);
err->errCause = RGSCHERR_TOM_MEM_EXHAUST;
return ret;
if ((ret = rgSCHUtlGetEventMem((Ptr *)&pucchRecpInfo,
sizeof(TfuUeRecpReqInfo),&(recpReqInfo->memCp))) != ROK)
{
- RLOG_ARG1(L_ERROR,DBG_CELLID,cell->cellId,"Unable to Allocate "
- "TfuUeRecpReqInfo for cell RNTI:%d ", ue->ueId);
+ DU_LOG("\nERROR --> SCH : Unable to Allocate TfuUeRecpReqInfo for cell RNTI:%d ", ue->ueId);
err->errCause = RGSCHERR_TOM_MEM_EXHAUST;
return ret;
}
cqiPmiSz = rgSCHTomUtlFetchPcqiBitSz(ue, cell->numTxAntPorts, &ri);
if(!cqiPmiSz)
{
- RLOG_ARG1(L_ERROR,DBG_CELLID,cell->cellId,"RNTI:%d Unable to Fill CqiPmi "
- "size", ue->ueId);
+ DU_LOG("\nERROR --> SCH : RNTI:%d Unable to Fill CqiPmi size", ue->ueId);
continue;
}
if ((ret = rgSCHUtlGetEventMem((Ptr *)&pucchRecpInfo,
sizeof(TfuUeRecpReqInfo),&(recpReqInfo->memCp))) != ROK)
{
- RLOG_ARG1(L_ERROR,DBG_CELLID,cell->cellId,"Unable to Allocate "
- "TfuUeRecpReqInfo for cell RNTI:%d ", ue->ueId);
+ DU_LOG("\nERROR --> SCH : Unable to Allocate TfuUeRecpReqInfo for cell RNTI:%d ", ue->ueId);
err->errCause = RGSCHERR_TOM_MEM_EXHAUST;
return ret;
}
if ((ret = rgSCHUtlGetEventMem((Ptr *)&pucchRecpInfo,
sizeof(TfuUeRecpReqInfo),&(recpReqInfo->memCp))) != ROK)
{
- RLOG_ARG1(L_ERROR,DBG_CELLID,cell->cellId,"Unable to Allocate "
- "TfuUeRecpReqInfo for RNTI:%d ",ue->ueId);
+ DU_LOG("\nERROR --> SCH : Unable to Allocate TfuUeRecpReqInfo for RNTI:%d ",ue->ueId);
err->errCause = RGSCHERR_TOM_MEM_EXHAUST;
return ret;
}
sizeof(TfuUeRecpReqInfo),
&(recpReqInfo->memCp))) != ROK)
{
- RLOG_ARG1(L_ERROR,DBG_CELLID,cell->cellId,"Unable to Allocate "
- "TfuUeRecpReqInfo for RNTI:%d ", alloc->ue->ueId);
+ DU_LOG("\nERROR --> SCH : Unable to Allocate TfuUeRecpReqInfo for RNTI:%d ", alloc->ue->ueId);
err->errCause = RGSCHERR_TOM_MEM_EXHAUST;
return ret;
}
if((0 == (recpReqInfo->timingInfo.sfn % 30)) && (0 == recpReqInfo->timingInfo.slot))
{
- //printf("5GTF_CHECK rgSCHTomUtlFillDatRecpReq (%d : %d)\n", recpReqInfo->timingInfo.sfn, recpReqInfo->timingInfo.slot);
+ //DU_LOG("\nERROR --> SCH : 5GTF_CHECK rgSCHTomUtlFillDatRecpReq (%d : %d)\n",\
+ recpReqInfo->timingInfo.sfn, recpReqInfo->timingInfo.slot);
}
/* processing steps are
* - Run through the UL allocations going out in this subframe.
sizeof(TfuUeRecpReqInfo), &(recpReqInfo->memCp));
if(ret != ROK)
{
- RLOG_ARG1(L_ERROR,DBG_CELLID,cell->cellId,"Unable to Allocate "
+ DU_LOG("\nERROR --> SCH : Unable to Allocate "
"TfuUeRecpReqInfo for RNTI:%d ", alloc->rnti);
err->errCause = RGSCHERR_TOM_MEM_EXHAUST;
return ret;
cqiPmiSz = rgSCHTomUtlFetchPcqiBitSz(alloc->ue, cell->numTxAntPorts, &ri);
if(0 == cqiPmiSz)
{
- RLOG_ARG1(L_ERROR,DBG_CELLID,cell->cellId,"Unable to Fill "
+ DU_LOG("\nERROR --> SCH : Unable to Fill "
"CqiPmi size RNTI:%d",alloc->rnti);
return RFAILED;
}
rgSCHTomUtlFetchPcqiBitSz(ue, cell->numTxAntPorts, &ri);
if(0 == pucchRecpInfo->t.pucchRecpReq.cqiInfo.cqiPmiSz)
{
- RLOG_ARG1(L_ERROR,DBG_CELLID,cell->cellId,"RNTI:%d "
- "Unable to Fill CqiPmi size", ue->ueId);
+ DU_LOG("\nERROR --> SCH : RNTI:%d Unable to Fill CqiPmi size", ue->ueId);
return RFAILED;
}
if(pucchRecpInfo->t.pucchRecpReq.uciInfo == TFU_PUCCH_HARQ_SR)
rgSCHTomUtlFetchPcqiBitSz(ue, cell->numTxAntPorts, &ri);
if(0 == pucchRecpInfo->t.pucchRecpReq.cqiInfo.cqiPmiSz)
{
- RLOG_ARG1(L_ERROR,DBG_CELLID,cell->cellId,"RNTI:%d"
- " Unable to Fill CqiPmi size", ue->ueId);
+ DU_LOG("\nERROR --> SCH : RNTI:%d Unable to Fill CqiPmi size", ue->ueId);
return RFAILED;
- }
+ }
pucchRecpInfo->t.pucchRecpReq.uciInfo = TFU_PUCCH_SR_CQI;
}
sizeof(TfuUeRecpReqInfo), &(recpReqInfo->memCp));
if (ret != ROK)
{
- RLOG_ARG1(L_ERROR,DBG_CELLID,cellCb->cellId,"Unable to"
+ DU_LOG("\nERROR --> SCH : Unable to"
"Allocate TfuUeRecpReqInfo for RNTI:%d ", ueCb->ueId);
err->errCause = RGSCHERR_TOM_MEM_EXHAUST;
return ret;
if ((ret = rgSCHUtlGetEventMem((Ptr *)&pucchInfo,
sizeof(RgSchUePucchRecpInfo), memCp)) != ROK)
{
- RLOG_ARG1(L_ERROR,DBG_CELLID,cellCb->cellId,"Unable to "
+ DU_LOG("\nERROR --> SCH : Unable to "
"Allocate TfuUeRecpReqInfo for cell RNTI:%d",rnti);
err->errCause = RGSCHERR_TOM_MEM_EXHAUST;
return ret;
if ((ret = rgSCHUtlGetEventMem((Ptr *)&(pucchInfo->pucchRecpInfo),
sizeof(TfuUeRecpReqInfo), &(recpReqInfo->memCp))) != ROK)
{
- RLOG_ARG1(L_ERROR,DBG_CELLID,cellCb->cellId,"Unable to "
+ DU_LOG("\nERROR --> SCH : Unable to "
"Allocate TfuUeRecpReqInfo for cell RNTI:%d",rnti);
err->errCause = RGSCHERR_TOM_MEM_EXHAUST;
return ret;
if(anInfo == NULL)
{/* ANInfo must be there. adding block
because of kworks*/
- RGSCHDBGERRNEW(cellCb->instIdx,(rgSchPBuf(cellCb->instIdx),
- "ANInfo should not be NULL for cellId=%d \n", cellCb->cellId));
+ DU_LOG("\nERROR --> SCH : ANInfo should not be NULL for cellId=%d \n", cellCb->cellId);
return RFAILED;
}
#endif
}else
{/* This needs to be revisited while
adding support for PUCCH format 3 */
- RGSCHDBGERRNEW(cellCb->instIdx,(rgSchPBuf(cellCb->instIdx),"Invalid Pucch format configured.."));
+ DU_LOG("\nERROR --> SCH : Invalid Pucch format configured..");
return RFAILED;
}
}
/* Fill PHICH info */
if ((ret = rgSCHTomUtlFillPhich (cell, cntrlInfo, ulSf, err)) != ROK)
{
- RLOG_ARG0(L_ERROR,DBG_CELLID,cell->cellId,"Unable to send PHICH info for "
- "cell");
+ DU_LOG("\nERROR --> SCH : Unable to send PHICH info for cell");
RGSCH_FREE_MEM(cntrlInfo);
return ret;
}
/* Fill UL Pdcch */
if ((ret = rgSCHTomUtlFillUlPdcch (cell, cntrlInfo, ulSf, err)) != ROK)
{
- RLOG_ARG0(L_ERROR,DBG_CELLID,cell->cellId,"Unable to send PDCCH info for "
- "cell");
+ DU_LOG("\nERROR --> SCH : Unable to send PDCCH info for cell");
RGSCH_FREE_MEM(cntrlInfo);
return ret;
}
if (cntrlInfo->ulPdcchLst.count || cntrlInfo->phichLst.count)
#endif
{
- //if (rgSCHUtlTfuCntrlReq(inst, cell->tfuSap->sapCfg.suId, cntrlInfo)
- != ROK)
+ //if (rgSCHUtlTfuCntrlReq(inst, cell->tfuSap->sapCfg.suId, cntrlInfo) != ROK)
{
- RLOG_ARG0(L_ERROR,DBG_CELLID,cell->cellId,"Unable to send Cntrl info for"
- " cell");
+ DU_LOG("\nERROR --> SCH : Unable to send Cntrl info for cell");
}
}
else
if (rgSCHUtlAllocSBuf (cell->instIdx,
(Data**)&rgrTtiInd, sizeof(RgrTtiIndInfo)) != ROK)
{
- RGSCHDBGERRNEW(cell->instIdx,(rgSchPBuf(cell->instIdx),
- "Mem alloc failed for RGR TTI ind, cellId (%d))\n",
- cell->cellId));
+ DU_LOG("\nERROR --> SCH : Mem alloc failed for RGR TTI ind, cellId (%d))\n",
+ cell->cellId);
return;
}
rgrTtiInd->cellId = cell->cellId;
if (rgSCHUtlRgrTtiInd (cell, rgrTtiInd) != ROK)
{
- RGSCHDBGERRNEW(cell->instIdx,(rgSchPBuf(cell->instIdx),
- "Failed to send RGR TTI ind, cellId (%d))\n",
- cell->cellId));
+ DU_LOG("\nERROR --> SCH : Failed to send RGR TTI ind, cellId (%d))\n",
+ cell->cellId);
rgSCHUtlFreeSBuf(cell->instIdx, (Data**)&rgrTtiInd,
sizeof(RgrTtiIndInfo));
return;
rgSchDynTddInfo->crntDTddSfIdx = (rgSchDynTddInfo->crntDTddSfIdx + 1) %
RG_SCH_DYNTDD_MAX_SFINFO;
- //printf("Initializing Index %d \n", rgSchDynTddInfo->crntDTddSfIdx);
+ //DU_LOG("\nERROR --> SCH : Initializing Index %d \n", rgSchDynTddInfo->crntDTddSfIdx);
return;
}
if (cell == NULLP)
{
/* Use SCH inst 0 print buff */
- RGSCHDBGERRNEW(schInst,(rgSchPBuf(schInst),
- "RgLiTfuTtiInd()No cell exists for cellId %d\n",
+ DU_LOG("\nERROR --> SCH : RgLiTfuTtiInd()No cell exists for cellId %d\n",
cellInfo->cellId));
continue;
}
/* 4UE_TTI_DELTA */
if(cell->schTickDelta != cellInfo->schTickDelta)
{
- printf("\nMukesh: Delta changed for cellId=%d: curr delta=%d new delta=%d\n"
+ DU_LOG("\nERROR --> SCH : Delta changed for cellId=%d: curr delta=%d new delta=%d\n"
"dlblankSf=%d ulblankSf=%d dummyTti=%d \n",
cell->cellId, cell->schTickDelta, cellInfo->schTickDelta, cellInfo->dlBlankSf,cellInfo->ulBlankSf,
cellInfo->isDummyTti);
}
if((0 == (cellInfo->timingInfo.sfn % 30)) && (0 == cellInfo->timingInfo.slot))
{
- //printf("5GTF_CHECK rgSCHTOMTtiInd (%d : %d)\n", cellInfo->timingInfo.sfn, cellInfo->timingInfo.slot);
+ //DU_LOG("5GTF_CHECK rgSCHTOMTtiInd (%d : %d)\n", cellInfo->timingInfo.sfn, cellInfo->timingInfo.slot);
}
#ifndef EMTC_ENABLE
RGSCHCPYTIMEINFO(cellInfo->timingInfo, cell->crntTime);
if(rgSCHUtlAllocSBuf (cell->instIdx,(Data**)&rgrLoadInf,
sizeof(RgrLoadInfIndInfo)) != ROK)
{
- RGSCHDBGERRNEW(cell->instIdx,(rgSchPBuf(cell->instIdx),"Could not "
- "allocate memory for sending LoadInfo\n"));
+ DU_LOG("\nERROR --> SCH : Could not "\
+ "allocate memory for sending LoadInfo\n");
return;
}
cell->lteAdvCb.absLoadTtiCnt = 0;
if (rgSCHTomUtlProcUlSf (cell, &err) != ROK)
{
/* fill in err type and call sta ind */
- RGSCHDBGERRNEW(cell->instIdx, (rgSchPBuf(cell->instIdx),
- "Unable to process Uplink subframe for cellId (%d))\n",
- cell->cellId));
+ DU_LOG("\nERROR --> SCH : Unable to process Uplink subframe for cellId (%d))\n", cell->cellId);
}
}
/* TDD Fix , to allow Special SF SRS CFg */
if (rgSCHTomUtlPrcUlTddSpclSf(cell, &err) != ROK)
{
/* fill in err type and call sta ind */
- RGSCHDBGERRNEW(cell->instIdx, (rgSchPBuf(cell->instIdx),
- "Unable to process Sipceial subframe for cellId (%d))\n",
- cell->cellId));
+ DU_LOG("\nERROR --> SCH : Unable to process Sipceial subframe for cellId (%d))\n", cell->cellId);
}
}
rgSCHUtlUlHqProcForUe(cell, frm, ue, &hqProc);
if (hqProc == NULLP)
{
- printf("UE[%d] failed to find UL HqProc for [%d:%d]\n",
+ DU_LOG("\nERROR --> SCH : UE[%d] failed to find UL HqProc for [%d:%d]\n",
ue->ueId, frm.sfn, frm.slot);
return;
}
{
hqProc->rcvdCrcInd = TRUE;
hqProc->remTx = 0; /*Reseting the value of rem Tx*/
- printf("\nrgSCHUhmProcMsg3DatInd,id:%u\n",hqProc->procId);
+ DU_LOG("\nINFO --> SCH : rgSCHUhmProcMsg3DatInd,id:%u\n",hqProc->procId);
return;
} /* rgSCHUhmProcMsg3DatInd */
rgSCHUtlUlHqProcForUe(cell, frm, ue, &hqProc);
if (hqProc == NULLP)
{
- printf("UE[%d] failed to find UL HqProc for [%d:%d]\n",
+ DU_LOG("\nERROR --> SCH : UE[%d] failed to find UL HqProc for [%d:%d]\n",
ue->ueId, frm.sfn, frm.slot);
return;
}
{
#ifdef UL_ADPT_DBG
- printf("\n\n########HARQ FREED HARQPROC ID (%d )after rgSCHUhmFreeProc inuse %ld free %ld \n",hqProc->alloc->grnt.hqProcId, (CmLListCp *)(&((RgUeUlHqCb*)hqProc->hqEnt)->inUse)->count,(CmLListCp *) (&((RgUeUlHqCb*)hqProc->hqEnt)->free)->count);
+ DU_LOG("\nDEBUG --> SCH : ########HARQ FREED HARQPROC ID (%d )after rgSCHUhmFreeProc inuse %ld free %ld \n",hqProc->alloc->grnt.hqProcId, (CmLListCp *)(&((RgUeUlHqCb*)hqProc->hqEnt)->inUse)->count,(CmLListCp *) (&((RgUeUlHqCb*)hqProc->hqEnt)->free)->count);
#endif
hqProc->alloc = NULLP;
hqProc->ulSfIdx = RGSCH_INVALID_INFO;
cmLListAdd2Tail(&((RgUeUlHqCb*)hqProc->hqEnt)->free, &hqProc->lnk);
/*
- printf("after rgSCHUhmFreeProc inuse %ld free %ld \n",
+ DU_LOG("\nINFO --> SCH : after rgSCHUhmFreeProc inuse %ld free %ld \n",
(CmLListCp *)(&((RgUeUlHqCb*)hqProc->hqEnt)->inUse)->count,
(CmLListCp *) (&((RgUeUlHqCb*)hqProc->hqEnt)->free)->count);
*/
}
else
{
- printf("\nhqEnt is NULL\n");
+ DU_LOG("\nERROR --> SCH : hqEnt is NULL\n");
}
return;
} /* rgSCHUhmFreeProc */
//RLOG_ARG3(L_ERROR,DBG_CELLID,cell->cellId,
// "rgSCHUhmGetAvlHqProc free %ld inUse %ld ue %d"
// , hqE->free.count, hqE->inUse.count, ue->ueId);
- //printf("5GTF_ERROR rgSCHUhmGetAvlHqProc cellId %d %ld inUse %ld ue %d"
+ //DU_LOG("5GTF_ERROR rgSCHUhmGetAvlHqProc cellId %d %ld inUse %ld ue %d"
//, cell->cellId, hqE->free.count, hqE->inUse.count, ue->ueId);
/* No Harq Process available in the free queue. */
return RFAILED;
cmLListAdd2Tail(&hqE->inUse, &tmpHqProc->lnk);
#ifdef UL_ADPT_DBG
- printf("rgSCHUhmGetAvlHqProc cellId %d free %ld inUse %ld ue %d time (%d %d)\n",cell->cellId, hqE->free.count, hqE->inUse.count, ue->ueId,cellUl->schdTime.sfn,cellUl->schdTime.slot);
+ DU_LOG("\nDEBUG --> SCH : rgSCHUhmGetAvlHqProc cellId %d free %ld inUse %ld UE %d time (%d %d)\n",cell->cellId, hqE->free.count, hqE->inUse.count, ue->ueId,cellUl->schdTime.sfn,cellUl->schdTime.slot);
#endif
tmpHqProc->schdTime = cellUl->schdTime;
{
proc = (RgSchUlHqProcCb *)(lnk->node);
lnk = lnk->next;
- // printf("compare rgSCHUhmGetUlProcByTime time (%d %d) CRC time (%d %d) proc->procId %d \n",proc->schdTime.sfn,proc->schdTime.slot,frm.sfn,frm.slot ,proc->procId);
+ // DU_LOG("\nINFO --> SCH : compare rgSCHUhmGetUlProcByTime time (%d %d) CRC time (%d %d) proc->procId %d
+ // \n",\proc->schdTime.sfn,proc->schdTime.slot,frm.sfn,frm.slot ,proc->procId);
if (RGSCH_TIMEINFO_SAME(proc->schdTime, frm))
{
- // printf("Harq timing Matched rgSCHUhmGetUlProcByTime time (%d %d) proc->procId %d \n",proc->schdTime.sfn,proc->schdTime.slot, proc->procId);
+ // DU_LOG("\nINFO --> SCH : Harq timing Matched rgSCHUhmGetUlProcByTime time (%d %d) proc->procId %d \n",\
+ proc->schdTime.sfn,proc->schdTime.slot, proc->procId);
return (proc);
}
}
@brief This file implements the schedulers main access to MAC layer code.
*/
-static const char* RLOG_MODULE_NAME="MAC";
-static int RLOG_MODULE_ID=4096;
-static int RLOG_FILE_ID=177;
/* header include files -- defines (.h) */
#include "common_def.h"
ret = rgSCHUtlAllocSBuf(cell->instIdx, (Data **)&temp, sizeof(CmLList));
if (ret != ROK)
{
- RLOG_ARG0(L_ERROR,DBG_CELLID,cell->cellId,
- "CE Pool memory allocation FAILED for cell");
+ DU_LOG("\nERROR --> SCH : CE Pool memory allocation FAILED for cell");
rgSchSFRTotalPoolFree(&sf->sfrTotalPoolInfo, cell);
return RFAILED;
}
ret = rgSCHUtlAllocSBuf(cell->instIdx, (Data **)&temp->node, sizeof(RgSchSFRPoolInfo));
if (ret != ROK)
{
- RLOG_ARG0(L_ERROR,DBG_CELLID,cell->cellId,
- "CE Pool memory allocation FAILED for cell ");
+ DU_LOG("\nERROR --> SCH : CE Pool memory allocation FAILED for cell ");
rgSchSFRTotalPoolFree(&sf->sfrTotalPoolInfo,cell);
return RFAILED;
}
ret = rgSCHUtlAllocSBuf(cell->instIdx, (Data **)&temp, sizeof(CmLList));
if (ret != ROK)
{
- RLOG_ARG0(L_ERROR,DBG_CELLID,cell->cellId,
- "CC Pool memory allocation FAILED for cell ");
+ DU_LOG("\nERROR --> SCH : CC Pool memory allocation FAILED for cell ");
rgSchSFRTotalPoolFree(&sf->sfrTotalPoolInfo,cell);
return RFAILED;
}
ret = rgSCHUtlAllocSBuf(cell->instIdx, (Data **)&temp->node, sizeof(RgSchSFRPoolInfo));
if (ret != ROK)
{
- RLOG_ARG0(L_ERROR,DBG_CELLID,cell->cellId,
- "CC Pool memory allocation FAILED for cell ");
+ DU_LOG("\nERROR --> SCH : CC Pool memory allocation FAILED for cell ");
rgSchSFRTotalPoolFree(&sf->sfrTotalPoolInfo,cell);
return RFAILED;
}
ret = rgSCHUtlAllocSBuf(cell->instIdx, (Data **)&temp, sizeof(CmLList));
if (ret != ROK)
{
- RLOG_ARG0(L_ERROR,DBG_CELLID,cell->cellId,
- "CC Pool memory allocation FAILED for cell ");
+ DU_LOG("\nERROR --> SCH : CC Pool memory allocation FAILED for cell ");
rgSchSFRTotalPoolFree(&sf->sfrTotalPoolInfo,cell);
return RFAILED;
}
ret = rgSCHUtlAllocSBuf(cell->instIdx, (Data **)&temp->node, sizeof(RgSchSFRPoolInfo));
if (ret != ROK)
{
- RLOG_ARG0(L_ERROR,DBG_CELLID,cell->cellId,
- "CC Pool memory allocation FAILED for cell ");
+ DU_LOG("\nERROR --> SCH : CC Pool memory allocation FAILED for cell ");
rgSchSFRTotalPoolFree(&sf->sfrTotalPoolInfo,cell);
return RFAILED;
}
if((rgSCHUtlAllocSBuf(inst, (Data**)&(rntpPtr->val),
(len * sizeof(uint8_t)))) != ROK)
{
- RLOG_ARG0(L_ERROR,DBG_CELLID,cell->cellId,"Memory allocation FAILED for RNTP Alloc");
+ DU_LOG("\nERROR --> SCH : Memory allocation FAILED for RNTP Alloc");
return RFAILED;
}
if(ret != ROK)
{
- RLOG_ARG0(L_ERROR,DBG_CELLID,cell->cellId, " rgSCHUtlAddPhich(): "
+ DU_LOG("\nERROR --> SCH : rgSCHUtlAddPhich(): "
"Allocation of RgSchPhich failed");
return RFAILED;
}
{
if ( ((alloc->ue) == NULLP) || (RG_SCH_CMN_GET_UE(alloc->ue, alloc->ue->cell) == NULLP))
{
- RLOG_ARG2(L_ERROR,DBG_CELLID,alloc->ue->cell->cellId,
- "Failed: ue->sch is null RNTI:%d,isRetx=%d",
+ DU_LOG("\nERROR --> SCH : Failed: ue->sch is null RNTI:%d,isRetx=%d",
alloc->rnti, alloc->grnt.isRtx);
return RFAILED;
}
if(cellCfg->prachRscInfo.numRsc <= 0)
{
- RLOG_ARG0(L_ERROR,DBG_CELLID,cell->cellId, "Invalid"
+ DU_LOG("\nERROR --> SCH : Invalid"
"PRACH resources Configuration ");
return;
}
if((rgSCHUtlAllocSBuf(inst, (Data**)&(cell->rntpAggrInfo.val),
(len * sizeof(uint8_t)))) != ROK)
{
- RLOG_ARG0(L_ERROR,DBG_CELLID,cell->cellId,"Memory allocation FAILED for RNTP Alloc");
+ DU_LOG("\nERROR --> SCH : Memory allocation FAILED for RNTP Alloc");
return RFAILED;
}
cell->rntpAggrInfo.pres = PRSNT_NODEF;
ue->f1bCsAVal += rgSCHUtlGetMaxTbSupp(ueRecfg->txMode.txModeEnum);
- RLOG1(L_INFO,"UeReCfg A valie is %d\n",ue->f1bCsAVal);
+ DU_LOG("\nINFO --> SCH : UeReCfg A valie is %d\n",ue->f1bCsAVal);
}
#endif
ue->mimoInfo.txMode = ueRecfg->txMode.txModeEnum;
(Data**)&(cell->rlsHqArr[idx].ueHqInfo),
(sizeof(RgInfUeHqInfo)*RGSCH_MAX_UE_PER_DL_SF))) != ROK)
{
- RLOG_ARG0(L_ERROR,DBG_CELLID,cell->cellId,"Memory allocation FAILED for "
+ DU_LOG("\nERROR --> SCH : Memory allocation FAILED for "
"UE Alloc");
return RFAILED;
}
(Data**)&(cell->sfAllocArr[idx].ueInfo.allocInfo),
(sizeof(RgInfUeAlloc)*RGSCH_MAX_UE_PER_DL_SF))) != ROK)
{
- RLOG_ARG0(L_ERROR,DBG_CELLID,cell->cellId,"Memory allocation FAILED for "
+ DU_LOG("\nERROR --> SCH : Memory allocation FAILED for "
"UE Alloc");
return RFAILED;
}
(Data**)&(cell->sfAllocArr[idx].rarInfo.raRntiInfo),
(sizeof(RgInfRaRntiInfo)*RGSCH_MAX_RARNTI_PER_DL_SF))) != ROK)
{
- RLOG_ARG0(L_ERROR,DBG_CELLID,cell->cellId,"Memory allocation FAILED for "
+ DU_LOG("\nERROR --> SCH : Memory allocation FAILED for "
"RARNTI");
return RFAILED;
}
(Data**)&(cell->sfAllocArr[idx].rarInfo.raRntiInfo[indx].crntiInfo),
(sizeof(RgInfCrntiInfo)* (cellUl->maxMsg3PerUlSf)))) != ROK)
{
- RLOG_ARG0(L_ERROR,DBG_CELLID,cell->cellId,"Memory allocation FAILED for "
+ DU_LOG("\nERROR --> SCH : Memory allocation FAILED for "
"RNTI");
return RFAILED;
}
/* Send an alarm to Layer Manager */
rgSCHLmmStaInd(inst, LCM_CATEGORY_RESOURCE, LCM_EVENT_SMEM_ALLOC_FAIL,
LCM_CAUSE_MEM_ALLOC_FAIL, &dgn);
- RGSCHLOGERROR(inst, ERRCLS_DEBUG, ERG015, 0, "Unable to Allocate Buffer");
- RLOG_ARG0(L_ERROR,DBG_INSTID,inst, "Unable to Allocate the Buffer");
+ DU_LOG("\nERROR --> SCH : Unable to Allocate the Buffer");
return RFAILED;
}
if (ret != ROK)
{
- RGSCHLOGERROR(inst, ERRCLS_DEBUG, ERG016, (ErrVal) 0,
- "rgSCHUtlFreeSBuf failed.\n");
- RLOG_ARG0(L_ERROR,DBG_INSTID,inst, "rgSCHUtlFreeSBuf failed");
+ DU_LOG("\nERROR --> SCH : rgSCHUtlFreeSBuf failed");
return;
}
/*Get the nPrb and mcs parametr values */
if (rgSCHUtlGetAllwdCchTbSz(msgLen*8, &nPrb, &mcs) != (msgLen*8))
{
- RLOG_ARG0(L_ERROR,DBG_CELLID,cell->cellId, "msgLen does "
+ DU_LOG("\nERROR --> SCH : msgLen does "
"not match any valid TB Size");
return RFAILED;
}
allocInfo->pa = (uint8_t)ue->cell->lteAdvCb.sfrCfg.pwrThreshold.pHigh; /* KW fix for LTE_ADV */
if(tmpCnt++ == 100000)
{
- RLOG_ARG2(L_DEBUG,DBG_CELLID,ue->cell->cellId,
- "DSFR::ll UEs can go HIGH, PHigh(%d) for UE(%d)",allocInfo->pa, ue->ueId);
+ DU_LOG("\nDEBUG --> SCH : DSFR::ll UEs can go HIGH, PHigh(%d) for UE(%d)",allocInfo->pa, ue->ueId);
tmpCnt = 0;
}
}
allocInfo->pa = ue->cell->lteAdvCb.sfrCfg.pwrThreshold.pHigh;
if(tmpCnt++ == 100000)
{
- RLOG_ARG2(L_DEBUG,DBG_CELLID,ue->cell->cellId,
- "SFR::UE is CELL EDGE, PHigh(%d) for UE(%d)",allocInfo->pa, ue->ueId);
+ DU_LOG("\nDEBUG --> SCH : SFR::UE is CELL EDGE, PHigh(%d) for UE(%d)",allocInfo->pa, ue->ueId);
tmpCnt = 0;
}
allocInfo->pa = ue->cell->lteAdvCb.sfrCfg.pwrThreshold.pLow;
if(tmpCnt++ == 100000)
{
- RLOG_ARG2(L_DEBUG,DBG_CELLID,ue->cell->cellId,
- "SFR::UE is CELL CENTRE, PLow(%d) for UE(%d)\n",allocInfo->pa, ue->ueId);
+ DU_LOG("\nDEBUG --> SCH : SFR::UE is CELL CENTRE, PLow(%d) for UE(%d)\n",allocInfo->pa, ue->ueId);
tmpCnt = 0;
}
}
CM_LLIST_FIRST_NODE(lnkLst, tmp);
while(NULLP != tmp)
{
- printf("5GTF_ERROR MSG4 Consolidation\n");
+ DU_LOG("\nINFO --> SCH : 5GTF_ERROR MSG4 Consolidation\n");
hqCb = (RgSchDlHqProcCb *)(tmp->node);
CM_LLIST_NEXT_NODE(lnkLst, tmp);
((!(ueCb->dl.dlInactvMask & RG_HQENT_INACTIVE)) &&
((hqP != NULLP) && (hqP->hqE->ccchSduProc))))
{
- RLOG_ARG1(L_ERROR,DBG_CELLID,cell->cellId,"RNTI:%d Unexpected CCCH SDU BO",
+ DU_LOG("\nINFO --> SCH : RNTI:%d Unexpected CCCH SDU BO",
ueCb->ueId);
return ROK;
}
if ((ueCb = rgSCHDbmGetUeCb(cell, staRsp->u.rnti)) == NULLP)
{
/* Handle Ue fetch failure */
- RLOG_ARG1(L_ERROR,DBG_CELLID,cell->cellId,"Invalid UEID:%d",staRsp->u.rnti);
+ DU_LOG("\nERROR --> SCH : Invalid UEID:%d",staRsp->u.rnti);
return RFAILED;
}
/* Update Bo in ueCb */
return (rgSCHUtlUpdtBo(cell, boRpt));
#else
/* Handle RaCb fetch failure */
- RLOG_ARG1(L_ERROR,DBG_CELLID,cell->cellId,
- "Invalid RNTI:%d to fetch raCb",boRpt->u.rnti);
+ DU_LOG("\nERROR --> SCH : Invalid RNTI:%d to fetch raCb",boRpt->u.rnti);
return RFAILED;
#endif
}
if ((ueCb = rgSCHDbmGetUeCb(cell, boRpt->u.rnti)) == NULLP)
{
/* Handle Ue fetch failure */
- RLOG_ARG1(L_ERROR,DBG_CELLID,cell->cellId,"Invalid RNTI:%d",boRpt->u.rnti);
+ DU_LOG("\nERROR --> SCH : Invalid RNTI:%d",boRpt->u.rnti);
return RFAILED;
}
/* Update Bo in ueCb */
dlLc = rgSCHDbmGetBcchOnBch(cell);
if (dlLc == NULLP)
{
- RLOG_ARG2(L_ERROR,DBG_CELLID,cell->cellId,
- "No Logical Channel dlLc is NULLP for RNTI:%d LCID:%d",boUpdt->u.rnti,boUpdt->lcId);
+ DU_LOG("\nERROR --> SCH : No Logical Channel dlLc is NULLP for RNTI:%d LCID:%d",boUpdt->u.rnti,boUpdt->lcId);
return RFAILED;
}
if (boUpdt->lcId != dlLc->lcId)
if (rgSCHUtlGetAllwdCchTbSz(boUpdt->bo*8, &nPrb, &mcs)
!= (boUpdt->bo*8))
{
- RLOG_ARG3(L_ERROR,DBG_CELLID,cell->cellId,"[%ld]BO: does not match any "
+ DU_LOG("\nERROR --> SCH : [%d]BO: does not match any "
"valid TB Size RNTI:%d LCID:%d", boUpdt->bo,boUpdt->u.rnti,boUpdt->lcId);
return RFAILED;
}
if ((dlLc = rgSCHDbmGetCmnLcCb(cell, boUpdt->lcId)) == NULLP)
{
/* Handle lcCb fetch failure */
- RLOG_ARG2(L_ERROR,DBG_CELLID,cell->cellId,
- "LCID:%d Invalid for RNTI:%d",boUpdt->lcId,boUpdt->u.rnti);
+ DU_LOG("\nERROR --> SCH : LCID:%d Invalid for RNTI:%d",boUpdt->lcId,boUpdt->u.rnti);
}
if (((rgSCHUtlAllocSBuf(inst, (Data **)(&boRpt), sizeof(RgSchClcBoRpt))) ==RFAILED) ||
(!boRpt))
{
- RLOG_ARG3(L_ERROR,DBG_CELLID,cell->cellId, "Allocation of common bo %dreport "
+ DU_LOG("\nERROR --> SCH : Allocation of common bo %dreport "
"failed RNTI:%d LCID:%d", boUpdt->bo,boUpdt->u.rnti,boUpdt->lcId);
return RFAILED;
}
ret = RgUiRgrBndCfm(&rgSchCb[instId].rgrSap[suId].sapCfg.sapPst, rgSchCb[instId].rgrSap[suId].sapCfg.suId, status);
if (ret != ROK)
{
- RLOG_ARG0(L_ERROR,DBG_INSTID,instId,"rgSCHUtlRgrBndCfm: RgUiRgrBndCfm Failed ");
+ DU_LOG("\nERROR --> SCH : rgSCHUtlRgrBndCfm: RgUiRgrBndCfm Failed ");
return (ret);
}
return (ret);
ret = RgUiRgmBndCfm(&rgSchCb[instId].rgmSap[suId].sapCfg.sapPst, rgSchCb[instId].rgmSap[suId].sapCfg.suId, status);
if (ret != ROK)
{
- RLOG_ARG0(L_ERROR,DBG_INSTID,instId,"rgSCHUtlRgmBndCfm: RgUiRgrBndCfm Failed ");
+ DU_LOG("\nERROR --> SCH : rgSCHUtlRgmBndCfm: RgUiRgrBndCfm Failed ");
return (ret);
}
return (ret);
S16 schSendCfgCfm(Region reg,Pool pool,RgrCfgTransId transId,uint8_t status)
{
Pst cfmPst;
- Inst inst = 0;
memset((&cfmPst), 0, sizeof(Pst));
if(RgUiRgrCfgCfm(&cfmPst,transId, status) != ROK)
{
- RLOG_ARG0(L_ERROR,DBG_INSTID,inst,"schSendCfgCfm: RgUiRgrCfgCfm Failed");
- printf("\nschSendCfgCfm: RgUiRgrCfgCfm Failed ");
+ DU_LOG("\nERROR --> SCH : schSendCfgCfm: RgUiRgrCfgCfm Failed ");
return RFAILED;
}
return ROK;
rgrSap = cell->rgrSap;
if (rgrSap->sapSta.sapState != LRG_BND)
{
- RLOG_ARG1(L_ERROR,DBG_CELLID,cell->cellId,
- "rgSCHUtlRgrTtiInd() Upper SAP not bound (%d) ",
+ DU_LOG("\nERROR --> SCH : rgSCHUtlRgrTtiInd() Upper SAP not bound (%d) ",
rgrSap->sapSta.sapState);
return RFAILED;
}
raCb = rgSCHDbmGetRaCb (cellCb, rnti);
if (raCb == NULLP)
{
- RLOG_ARG1(L_ERROR,DBG_CELLID,cellCb->cellId, "RNTI:%d Received MSG3, unable to "
+ DU_LOG("\nERROR --> SCH : RNTI:%d Received MSG3, unable to "
"find raCb",rnti);
return RFAILED;
}
ret = rgSCHRamProcMsg3 (cellCb, ueCb, raCb, pdu, err);
if (ret != ROK)
{
- RLOG_ARG1(L_ERROR,DBG_CELLID,cellCb->cellId,"Processing failed in the RAM "
+ DU_LOG("\nERROR --> SCH : Processing failed in the RAM "
"RNTI:%d ",rnti);
return (ret);
}
tfuSap = &(rgSchCb[inst].tfuSap[sapId]);
if (tfuSap->sapSta.sapState != LRG_BND)
{
- RLOG_ARG1(L_ERROR,DBG_CELLID,grpPwrCntrlReq->cellId,
- "rgSCHUtlTfuGrpPwrCntrlReq() Lower SAP not bound (%d) ",tfuSap->sapSta.sapState);
+ DU_LOG("\nERROR --> SCH : rgSCHUtlTfuGrpPwrCntrlReq() Lower SAP not bound (%d) ",tfuSap->sapSta.sapState);
return RFAILED;
}
memcpy (&pst, &(tfuSap->sapCfg.sapPst), sizeof(Pst));
if((ret = RgLiTfuGrpPwrCntrlReq (&pst, tfuSap->sapCfg.spId, grpPwrCntrlReq)) != ROK)
{
- RLOG_ARG0(L_ERROR,DBG_CELLID,grpPwrCntrlReq->cellId,
- "rgSCHUtlTfuGrpPwrCntrlReq() Call to RgLiTfuGrpPwrCntrlReq() failed");
+ DU_LOG("\nERROR --> SCH : rgSCHUtlTfuGrpPwrCntrlReq() Call to RgLiTfuGrpPwrCntrlReq() failed");
}
return (ret);
} /* rgSCHUtlTfuGrpPwrCntrlReq */
if(suId >= rgSchCb[inst].numSaps)
{
- RLOG_ARG0(L_ERROR,DBG_INSTID,inst, "Incorrect SuId");
+ DU_LOG("\nERROR --> SCH : Incorrect SuId");
return RFAILED;
}
tfuSap = &(rgSchCb[inst].tfuSap[suId]);
/* First lets check the suId */
if( suId != tfuSap->sapCfg.suId)
{
- RLOG_ARG2(L_ERROR,DBG_INSTID,inst,"Incorrect SuId. Configured (%d) Recieved (%d)",
+ DU_LOG("\nERROR --> SCH : Incorrect SuId. Configured (%d) Recieved (%d)",
tfuSap->sapCfg.suId, suId);
return RFAILED;
}
if (tfuSap->sapSta.sapState != LRG_BND)
{
- RLOG_ARG1(L_ERROR,DBG_INSTID,inst,"Lower SAP not enabled SuId (%d)",
+ DU_LOG("\nERROR --> SCH : Lower SAP not enabled SuId (%d)",
tfuSap->sapCfg.suId);
return RFAILED;
}
#if (ERRCLASS & ERRCLS_DEBUG)
if (memSize<= 0)
{
- RGSCHLOGERROR(inst, ERRCLS_INT_PAR, ERG022, memSize,
- "rgAllocEventMem(): memSize invalid\n");
+ DU_LOG("\nERROR --> SCH : rgAllocEventMem(): memSize invalid\n");
return (RFAILED);
}
#endif /* ERRCLASS & ERRCLS_DEBUG */
if(ROK != cmAllocEvnt(memSize, TFU_MAX_MEMBLK_SIZE, &sMem, memPtr))
#endif /* */
{
- RLOG_ARG0(L_ERROR,DBG_INSTID,inst,"cmAllocEvnt Failed.");
+ DU_LOG("\nERROR --> SCH : cmAllocEvnt Failed.");
return RFAILED;
}
/*stoping Task*/
else
{
- printf("\nError: allocDb->count is ZERO ====\n");
+ DU_LOG("\nERROR --> SCH : allocDb->count is ZERO ");
}
- //printf("\nallocDb->count:%u\n",allocDb->count);
+ //DU_LOG("\nallocDb->count:%u\n",allocDb->count);
return;
}
rgSchCb[instId].rgrSap[spId].sapCfg.suId,
transId, status) != ROK)
{
- RLOG_ARG0(L_ERROR,DBG_INSTID,instId,"rgSCHUtlRgrSiCfgCfm: "
+ DU_LOG("\nERROR --> SCH : rgSCHUtlRgrSiCfgCfm: "
"RgUiRgrSiCfgCfm Failed ");
return RFAILED;
}
rgSchCb[instId].rgrSap[spId].sapCfg.suId,
transId, siId, status) != ROK)
{
- RLOG_ARG0(L_ERROR,DBG_INSTID,instId,"rgSCHUtlRgrSiCfgCfm: "
+ DU_LOG("\nERROR --> SCH : rgSCHUtlRgrSiCfgCfm: "
"RgUiRgrSiCfgCfm Failed ");
return RFAILED;
}
RgSchDrxDlHqProcCb *drxHq;
RgSchDRXCellCb *drxCell = cellCb->drxCb;
RgSchDrxUeCb *drxUe;
-#ifdef DEBUGP
- Inst inst = cellCb->instIdx;
-#endif
uint8_t cellIdx = ueCb->cellIdToCellIdxMap[RG_SCH_CELLINDEX(dlHq->hqE->cell)];
uint32_t dlInactvMask;
uint32_t ulInactvMask;
/* This condition should never occur */
if(drxHq->reTxIndx >= RG_SCH_MAX_DRXQ_SIZE)
{
- RGSCHDBGERRNEW(inst,(rgSchPBuf(inst),"[%d]UE:DRXUE RETX IDX[%d]"
+ DU_LOG("\nERROR --> SCH : [%d]UE:DRXUE RETX IDX[%d]"
"is out of bound,dlInactvMask %d,procId %d\n", ueCb->ueId,
- drxHq->reTxIndx,ueCb->dl.dlInactvMask, dlHq->procId));
+ drxHq->reTxIndx,ueCb->dl.dlInactvMask, dlHq->procId);
}
drxUe->drxDlInactvMaskPerCell[cellIdx] |= (RG_SCH_DRX_DLHQ_BITMASK << dlHq->procId);
/* Call utility function (rgSCHUtlRgrStaInd) to send rpts to RRM */
if(rgSCHUtlRgrStaInd(cell, staInfo) != ROK)
{
- RLOG_ARG1(L_ERROR,DBG_CELLID,cell->cellId,"Could not send "
+ DU_LOG("\nERROR --> SCH : Could not send "
"CQI reports for RNTI:%d",ue->ueId);
return RFAILED;
}
rgrSap = cell->rgrSap;
if (rgrSap->sapSta.sapState != LRG_BND)
{
- RLOG_ARG1(L_ERROR,DBG_CELLID,cell->cellId,
- "rgSCHUtlRgrStaInd() Upper SAP not bound (%d) ",
+ DU_LOG("\nERROR --> SCH : rgSCHUtlRgrStaInd() Upper SAP not bound (%d) ",
rgrSap->sapSta.sapState);
return RFAILED;
}
rgrSap = cell->rgrSap;
if (rgrSap->sapSta.sapState != LRG_BND)
{
- RLOG_ARG1(L_ERROR,DBG_CELLID,cell->cellId,
- "rgSCHUtlRgrLoadInfInd() Upper SAP not bound (%d) ",
+ DU_LOG("\nERROR --> SCH : rgSCHUtlRgrLoadInfInd() Upper SAP not bound (%d) ",
rgrSap->sapSta.sapState);
return RFAILED;
}
/* Call utility function (rgSCHUtlRgrUeStaInd) to send rpts to RRM */
if(rgSCHUtlRgrUeStaInd(cell, ueStaInfo) != ROK)
{
- RLOG_ARG1(L_ERROR,DBG_CELLID,cell->cellId,"Could not send "
+ DU_LOG("\nERROR --> SCH : Could not send "
"UE Sta reports CRNTI:%d",ue->ueId);
return RFAILED;
}
rgrSap = cell->rgrSap;
if (rgrSap->sapSta.sapState != LRG_BND)
{
- RLOG_ARG1(L_ERROR,DBG_CELLID,cell->cellId,
- "rgSCHUtlRgrUeStaInd() Upper SAP not bound (%d) ",
+ DU_LOG("\nERROR --> SCH : rgSCHUtlRgrUeStaInd() Upper SAP not bound (%d) ",
rgrSap->sapSta.sapState);
return RFAILED;
}
#ifdef DBG_MAC_RRM_PRB_PRINT
if((count % reprotForEvery20Sec) == 0 )
{
- printf("\n====================================================================");
- printf("\nMAC: QCI-1[DL:UL] | QCI-2[DL:UL] | QCI-3[DL:UL] | QCI-4[DL:UL] \n");
- printf("======================================================================\n");
- printf(" [%d: %d]\t | [%d: %d]\t | [%d: %d]\t| [%d: %d]\t\n",
+ DU_LOG("\n====================================================================");
+ DU_LOG("\nINFO --> SCH : QCI-1[DL:UL] | QCI-2[DL:UL] | QCI-3[DL:UL] | QCI-4[DL:UL] \n");
+ DU_LOG("======================================================================\n");
+ DU_LOG(" [%d: %d]\t | [%d: %d]\t | [%d: %d]\t| [%d: %d]\t\n",
prbRprtInd->stQciPrbRpts[0].bAvgPrbDlUsage,
prbRprtInd->stQciPrbRpts[0].bAvgPrbUlUsage,
prbRprtInd->stQciPrbRpts[1].bAvgPrbDlUsage,
Inst inst = cell->instIdx;
RgInfRlsRnti rntiInfo;
- RGSCHDBGINFONEW(inst,(rgSchPBuf(inst),"RNTI Release IND for UE(%d)\n", rnti));
+ DU_LOG("\nINFO --> SCH : RNTI Release IND for UE(%d)\n", rnti);
/* Copy the info to rntiInfo */
rntiInfo.cellId = cell->cellId;
rntiInfo.rnti = rnti;
}
}
#ifdef CPU_OL_DBG_PRINTS
- printf("\n DL CPU OL ADJ = %lu, %lu, %d\n", cell->measurements.dlTpt, cell->cpuOvrLdCntrl.tgtDlTpt,
+ DU_LOG("\nINFO --> SCH : DL CPU OL ADJ = %lu, %lu, %d\n", cell->measurements.dlTpt, cell->cpuOvrLdCntrl.tgtDlTpt,
cell->thresholds.maxDlItbs);
#endif
}
}
}
#ifdef CPU_OL_DBG_PRINTS
- printf("\n UL CPU OL ADJ = %lu, %lu, %d\n", cell->measurements.ulTpt, cell->cpuOvrLdCntrl.tgtUlTpt,
+ DU_LOG("\nDEBUG --> SCH : UL CPU OL ADJ = %lu, %lu, %d\n", cell->measurements.ulTpt, cell->cpuOvrLdCntrl.tgtUlTpt,
cell->thresholds.maxUlItbs);
#endif
}
else
{
#ifdef CPU_OL_DBG_PRINTS
- printf("CPU_OL_TTI__ERROR\n");
+ DU_LOG("\nERROR --> SCH : CPU_OL_TTI__ERROR\n");
#endif
- RLOG_ARG0(L_ERROR,DBG_CELLID,cell->cellId,"Invalid CPU OL");
+ DU_LOG("\nERROR --> SCH : Invalid CPU OL");
}
}
#ifdef CPU_OL_DBG_PRINTS
- printf("dlNxtIndxDecNumUeTti = %d\n", cpuInstr->dlNxtIndxDecNumUeTti);
+ DU_LOG("\nDEBUG --> SCH : dlNxtIndxDecNumUeTti = %d\n", cpuInstr->dlNxtIndxDecNumUeTti);
#endif
- RLOG_ARG1(L_DEBUG,DBG_CELLID,cell->cellId,"dlNxtIndxDecNumUeTti = %d",
+ DU_LOG("\nDEBUG --> SCH : dlNxtIndxDecNumUeTti = %d",
cpuInstr->dlNxtIndxDecNumUeTti);
}
else if ( crntCpuOvrLdIns & RGR_CPU_OVRLD_DL_INC_NUM_UE_PER_TTI )
else
{
#ifdef CPU_OL_DBG_PRINTS
- printf("CPU_OL_TTI__ERROR\n");
+ DU_LOG("\nERROR --> SCH : CPU_OL_TTI__ERROR\n");
#endif
- RLOG_ARG0(L_ERROR,DBG_CELLID,cell->cellId,"Invalid CPU OL");
+ DU_LOG("\nERROR --> SCH : Invalid CPU OL");
}
}
#ifdef CPU_OL_DBG_PRINTS
- printf("dlNxtIndxDecNumUeTti = %d\n", cpuInstr->dlNxtIndxDecNumUeTti);
+ DU_LOG("\nDEBUG --> SCH : dlNxtIndxDecNumUeTti = %d\n", cpuInstr->dlNxtIndxDecNumUeTti);
#endif
- RLOG_ARG1(L_DEBUG,DBG_CELLID,cell->cellId,"dlNxtIndxDecNumUeTti = %d",
+ DU_LOG("\nERROR --> SCH : dlNxtIndxDecNumUeTti = %d",
cpuInstr->dlNxtIndxDecNumUeTti);
}
/* Check for UL CPU commands */
else
{
#ifdef CPU_OL_DBG_PRINTS
- printf("CPU_OL_TTI__ERROR\n");
+ DU_LOG("\nERROR --> SCH : CPU_OL_TTI__ERROR\n");
#endif
- RLOG_ARG0(L_ERROR,DBG_CELLID,cell->cellId,"Invalid CPU OL");
+ DU_LOG("\nERROR --> SCH : Invalid CPU OL");
}
}
#ifdef CPU_OL_DBG_PRINTS
- printf("ulNxtIndxDecNumUeTti = %d\n", cpuInstr->ulNxtIndxDecNumUeTti);
+ DU_LOG("\nDEBUG --> SCH : ulNxtIndxDecNumUeTti = %d\n", cpuInstr->ulNxtIndxDecNumUeTti);
#endif
- RLOG_ARG1(L_DEBUG,DBG_CELLID,cell->cellId,"dlNxtIndxDecNumUeTti = %d",
+ DU_LOG("\nDEBUG --> SCH : dlNxtIndxDecNumUeTti = %d",
cpuInstr->dlNxtIndxDecNumUeTti);
}
else if ( crntCpuOvrLdIns & RGR_CPU_OVRLD_UL_INC_NUM_UE_PER_TTI )
else
{
#ifdef CPU_OL_DBG_PRINTS
- printf("CPU_OL_TTI__ERROR\n");
+ DU_LOG("\nERROR --> SCH : CPU_OL_TTI__ERROR\n");
#endif
- RLOG_ARG0(L_ERROR,DBG_CELLID,cell->cellId,"Invalid CPU OL");
+ DU_LOG("\nERROR --> SCH : Invalid CPU OL");
}
}
#ifdef CPU_OL_DBG_PRINTS
- printf("ulNxtIndxDecNumUeTti = %d\n", cpuInstr->ulNxtIndxDecNumUeTti);
+ DU_LOG("\nDEBUG --> SCH : ulNxtIndxDecNumUeTti = %d\n", cpuInstr->ulNxtIndxDecNumUeTti);
#endif
- RLOG_ARG1(L_DEBUG,DBG_CELLID,cell->cellId,"dlNxtIndxDecNumUeTti = %d",
+ DU_LOG("\nDEBUG --> SCH : dlNxtIndxDecNumUeTti = %d",
cpuInstr->dlNxtIndxDecNumUeTti);
}
#ifdef CPU_OL_DBG_PRINTS
/* TODO: Debug Information - Shall be moved under CPU_OL_DBG_PRINTS */
- printf("maxUeNewDlTxPerTti = %d, maxUeNewUlTxPerTti = %d\n", maxUeNewDlTxPerTti, maxUeNewUlTxPerTti);
- printf("DL Sf numUePerTti:");
+ DU_LOG("\nDEBUG --> SCH : maxUeNewDlTxPerTti = %d, maxUeNewUlTxPerTti = %d\n", maxUeNewDlTxPerTti, maxUeNewUlTxPerTti);
+ DU_LOG("\nINFO --> SCH : DL Sf numUePerTti:");
for ( idx = 0; idx < 10 ; idx ++ )
{
- printf(" %d", cpuInstr->maxUeNewTxPerTti[idx]);
+ DU_LOG(" %d", cpuInstr->maxUeNewTxPerTti[idx]);
}
- printf("\nUL Sf numUePerTti:");
+ DU_LOG("\nINFO --> SCH : UL Sf numUePerTti:");
for ( idx = 0; idx < 10 ; idx ++ )
{
- printf(" %d", cpuInstr->maxUeNewRxPerTti[idx]);
+ DU_LOG(" %d", cpuInstr->maxUeNewRxPerTti[idx]);
}
- printf("\n");
+ DU_LOG("\n");
#endif
return;
uint8_t idx;
#ifdef CPU_OL_DBG_PRINTS
- printf("\n CPU OVR LD Ins Rcvd = %d\n", (int)crntCpuOvrLdIns);
+ DU_LOG("\nDEBUG --> SCH : CPU OVR LD Ins Rcvd = %d\n", (int)crntCpuOvrLdIns);
#endif
- RLOG_ARG0(L_INFO,DBG_CELLID,cell->cellId,"CPU OVR LD Ins Rcvd");
+ DU_LOG("\nINFO --> SCH : CPU OVR LD Ins Rcvd");
if ( RGR_CPU_OVRLD_RESET == crntCpuOvrLdIns )
{
/* The CPU OL instruction received with RESET (0), hence reset it */
#ifdef CPU_OL_DBG_PRINTS
- printf("rgSCHUtlResetCpuOvrLdState: RESET CPU OL instr\n");
+ DU_LOG("\nDEBUG --> SCH : rgSCHUtlResetCpuOvrLdState: RESET CPU OL instr\n");
#endif
- RLOG_ARG0(L_INFO,DBG_CELLID,cell->cellId,"RESET CPU OVR LD");
+ DU_LOG("\nINFO --> SCH : RESET CPU OVR LD");
cell->cpuOvrLdCntrl.cpuOvrLdIns = 0;
/* Reset the max UL and DL itbs to 26 */
cell->thresholds.maxUlItbs = RG_SCH_UL_MAX_ITBS;
cell->cpuOvrLdCntrl.tgtUlTpt = cell->measurements.ulTpt + \
(cell->measurements.ulTpt * 2 )/100;
}
- RLOG_ARG3(L_DEBUG,DBG_CELLID,cell->cellId,"CPU OVR LD UL Reset to "
- "%d, %lu, %lu", (int)crntUlCpuOL, cell->cpuOvrLdCntrl.tgtUlTpt,cell->measurements.ulTpt);
+ DU_LOG("\nDEBUG --> SCH : CPU OVR LD UL Reset to "
+ "%d, %u, %u", (int)crntUlCpuOL, cell->cpuOvrLdCntrl.tgtUlTpt,cell->measurements.ulTpt);
#ifdef CPU_OL_DBG_PRINTS
- printf("\n CPU OVR LD UL Reset to= %d, %lu, %lu\n", (int)crntUlCpuOL, cell->cpuOvrLdCntrl.tgtUlTpt,
+ DU_LOG("\nDEBUG --> SCH : CPU OVR LD UL Reset to= %d, %u, %u\n", (int)crntUlCpuOL, cell->cpuOvrLdCntrl.tgtUlTpt,
cell->measurements.ulTpt);
#endif
}
cell->cpuOvrLdCntrl.tgtDlTpt = cell->measurements.dlTpt + \
(cell->measurements.dlTpt * 1 )/100;
}
- RLOG_ARG3(L_DEBUG,DBG_CELLID,cell->cellId,"CPU OVR LD DL Reset to "
- "%d, %lu, %lu", (int)crntDlCpuOL, cell->cpuOvrLdCntrl.tgtDlTpt,cell->measurements.dlTpt);
+ DU_LOG("\nDEBUG --> SCH : CPU OVR LD DL Reset to "
+ "%d, %u, %u", (int)crntDlCpuOL, cell->cpuOvrLdCntrl.tgtDlTpt,cell->measurements.dlTpt);
#ifdef CPU_OL_DBG_PRINTS
- printf("\n CPU OVR LD DL Reset to= %d, %lu, %lu\n", (int)crntDlCpuOL, cell->cpuOvrLdCntrl.tgtDlTpt,
+ DU_LOG("\nDEBUG --> SCH : CPU OVR LD DL Reset to= %d, %lu, %lu\n", (int)crntDlCpuOL, cell->cpuOvrLdCntrl.tgtDlTpt,
cell->measurements.dlTpt);
#endif
}
cp = &emtcUe->dlResLst;
}else
{
- RLOG0(L_INFO, "*****restype mismatch");
+ DU_LOG("\nINFO --> SCH : *****restype mismatch");
}
if(cp != NULLP )
{
if(cp->count == 0)
{
- RLOG0(L_INFO,"****error count*****\n");
+ DU_LOG("\nINFO --> SCH : ****error count*****\n");
return ROK;
}
}
uint16_t ret = LCM_REASON_NOT_APPL;
Inst inst = (dInst - SCH_INST_START);
- printf("\nEntered SchInstCfg()");
+ DU_LOG("\nDEBUG --> SCH : Entered SchInstCfg()");
/* Check if Instance Configuration is done already */
if (schCb[inst].schInit.cfgDone == TRUE)
{
if (ODU_REG_TMR_MT(schCb[inst].schInit.ent, dInst,
(int)schCb[inst].genCfg.tmrRes, schActvTmr) != ROK)
{
- RLOG_ARG0(L_ERROR,DBG_INSTID,inst, "SchInstCfg(): Failed to "
+ DU_LOG("\nERROR --> SCH : SchInstCfg(): Failed to "
"register timer.");
return (LCM_REASON_MEM_NOAVAIL);
}
#endif
/* Set Config done in TskInit */
schCb[inst].schInit.cfgDone = TRUE;
- printf("\nScheduler gen config done");
+ DU_LOG("\nINFO --> SCH : Scheduler gen config done");
return ret;
}
"pst->dstInst=%d SCH_INST_START=%d", pst->dstInst,SCH_INST_START);
return ROK;
}
- printf("\nSCH : Received scheduler gen config");
+ DU_LOG("\nINFO --> SCH : Received scheduler gen config");
/* Fill the post structure for sending the confirmation */
memset(&cfmPst, 0 , sizeof(Pst));
SchFillCfmPst(pst, &cfmPst, cfg);
return ROK;
}
+#ifdef NR_TDD
+/**
+ *@brief Returns TDD periodicity in micro seconds
+ *
+ * @details
+ *
+ * Function : schGetPeriodicityInMsec
+ *
+ * This API retunrs TDD periodicity in micro seconds
+ *
+ * @param[in] DlUlTxPeriodicity
+ * @return periodicityInMsec
+ * **/
+
+uint16_t schGetPeriodicityInMsec(DlUlTxPeriodicity tddPeriod)
+{
+ uint16_t periodicityInMsec = 0;
+ switch(tddPeriod)
+ {
+ case TX_PRDCTY_MS_0P5:
+ {
+ periodicityInMsec = 500;
+ break;
+ }
+ case TX_PRDCTY_MS_0P625:
+ {
+ periodicityInMsec = 625;
+ break;
+ }
+ case TX_PRDCTY_MS_1:
+ {
+ periodicityInMsec = 1000;
+ break;
+ }
+ case TX_PRDCTY_MS_1P25:
+ {
+ periodicityInMsec = 1250;
+ break;
+ }
+ case TX_PRDCTY_MS_2:
+ {
+ periodicityInMsec = 2000;
+ break;
+ }
+ case TX_PRDCTY_MS_2P5:
+ {
+ periodicityInMsec = 2500;
+ break;
+ }
+ case TX_PRDCTY_MS_5:
+ {
+ periodicityInMsec = 5000;
+ break;
+ }
+ case TX_PRDCTY_MS_10:
+ {
+ periodicityInMsec = 10000;
+ break;
+ }
+ default:
+ {
+ DU_LOG("\nERROR --> SCH : Invalid DlUlTxPeriodicity:%d", tddPeriod);
+ }
+ }
+
+ return periodicityInMsec;
+}
+
/**
- * @brief inti cellCb based on cellCfg
+ * @brief init TDD slot config
+ *
+ * @details
+ *
+ * Function : schInitTddSlotCfg
+ *
+ * This API is invoked after receiving schCellCfg
+ *
+ * @param[in] schCellCb *cell
+ * @param[in] SchCellCfg *schCellCfg
+ * @return int
+ * -# ROK
+ * -# RFAILED
+ **/
+void schInitTddSlotCfg(SchCellCb *cell, SchCellCfg *schCellCfg)
+{
+ uint16_t periodicityInMicroSec = 0;
+ uint32_t slotBitPos, symbBitPos, bitMask;
+ int8_t slotIdx, symbIdx;
+
+ periodicityInMicroSec = schGetPeriodicityInMsec(schCellCfg->tddCfg.tddPeriod);
+ schCellCfg->numerology = 1; //TODO: Remove this
+ cell->numSlotsInPeriodicity = (periodicityInMicroSec * pow(2, schCellCfg->numerology))/1000;
+cell->slotFrmtBitMap = 0;
+ cell->symbFrmtBitMap = 0;
+ slotBitPos = (cell->numSlotsInPeriodicity*2)-1; /* considering 2 bits to represent a slot */
+ symbBitPos = (MAX_SYMB_PER_SLOT*2)-1; /* considering 2 bits to represent a symbol */
+ for(slotIdx = cell->numSlotsInPeriodicity-1; slotIdx >= 0; slotIdx--)
+ {
+ symbIdx = 0;
+ /* If the first and last symbol are the same, the entire slot is the same type */
+ if((schCellCfg->tddCfg.slotCfg[slotIdx][symbIdx] == schCellCfg->tddCfg.slotCfg[slotIdx][MAX_SYMB_PER_SLOT-1]) &&
+ schCellCfg->tddCfg.slotCfg[slotIdx][symbIdx] != FLEXI_SLOT)
+ {
+ switch(schCellCfg->tddCfg.slotCfg[slotIdx][symbIdx])
+ {
+ case DL_SLOT:
+ {
+ /*BitMap to be set to 00 */
+ bitMask = 1<<slotBitPos;
+ cell->slotFrmtBitMap = (cell->slotFrmtBitMap & ~(bitMask)) | ((0<<slotBitPos) & bitMask);
+ slotBitPos--;
+ bitMask = 1<<slotBitPos;
+ cell->slotFrmtBitMap = (cell->slotFrmtBitMap & ~(bitMask)) | ((0<<slotBitPos) & bitMask);
+ slotBitPos--;
+ break;
+ }
+ case UL_SLOT:
+ {
+ /*BitMap to be set to 01 */
+ bitMask = 1<<slotBitPos;
+ cell->slotFrmtBitMap = (cell->slotFrmtBitMap & ~(bitMask)) | ((0<<slotBitPos) & bitMask);
+ slotBitPos--;
+ bitMask = 1<<slotBitPos;
+ cell->slotFrmtBitMap = (cell->slotFrmtBitMap & ~(bitMask)) | ((1<<slotBitPos) & bitMask);
+ slotBitPos--;
+ break;
+ }
+ default:
+ DU_LOG("\nERROR --> SCH : Invalid slot Config in schInitTddSlotCfg");
+ }
+ continue;
+ }
+ /* slot config is flexible. First set slotBitMap to 10 */
+ bitMask = 1<<slotBitPos;
+ cell->slotFrmtBitMap = (cell->slotFrmtBitMap & ~(bitMask)) | ((1<<slotBitPos) & bitMask);
+ slotBitPos--;
+ bitMask = 1<<slotBitPos;
+ cell->slotFrmtBitMap = (cell->slotFrmtBitMap & ~(bitMask)) | ((0<<slotBitPos) & bitMask);
+ slotBitPos--;
+ /* Now set symbol bitmap */
+ for(symbIdx = MAX_SYMB_PER_SLOT-1; symbIdx >= 0; symbIdx--)
+ {
+ switch(schCellCfg->tddCfg.slotCfg[slotIdx][symbIdx])
+ {
+ case DL_SLOT:
+ {
+ /*symbol BitMap to be set to 00 */
+ bitMask = 1<<symbBitPos;
+ cell->symbFrmtBitMap = (cell->symbFrmtBitMap & ~(bitMask)) | ((0<<symbBitPos) & bitMask);
+ symbBitPos--;
+ bitMask = 1<<symbBitPos;
+ cell->symbFrmtBitMap = (cell->symbFrmtBitMap & ~(bitMask)) | ((0<<symbBitPos) & bitMask);
+ symbBitPos--;
+ break;
+ }
+ case UL_SLOT:
+ {
+ /*symbol BitMap to be set to 01 */
+ bitMask = 1<<symbBitPos;
+ cell->symbFrmtBitMap = (cell->symbFrmtBitMap & ~(bitMask)) | ((0<<symbBitPos) & bitMask);
+ symbBitPos--;
+ bitMask = 1<<symbBitPos;
+ cell->symbFrmtBitMap = (cell->symbFrmtBitMap & ~(bitMask)) | ((1<<symbBitPos) & bitMask);
+ symbBitPos--;
+ break;
+ }
+ case FLEXI_SLOT:
+ {
+ /*symbol BitMap to be set to 10 */
+ bitMask = 1<<symbBitPos;
+ cell->symbFrmtBitMap = (cell->symbFrmtBitMap & ~(bitMask)) | ((1<<symbBitPos) & bitMask);
+ symbBitPos--;
+ bitMask = 1<<symbBitPos;
+ cell->symbFrmtBitMap = (cell->symbFrmtBitMap & ~(bitMask)) | ((0<<symbBitPos) & bitMask);
+ symbBitPos--;
+ break;
+ }
+ default:
+ DU_LOG("\nERROR --> SCH : Invalid slot Config in schInitTddSlotCfg");
+ }
+ }
+ }
+
+}
+#endif
+
+
+/**
+ * @brief init cellCb based on cellCfg
*
* @details
*
**/
uint8_t schInitCellCb(Inst inst, SchCellCfg *schCellCfg)
{
- SchCellCb *cell;
+ SchCellCb *cell= NULLP;
SCH_ALLOC(cell, sizeof(SchCellCb));
if(!cell)
{
default:
DU_LOG("\nERROR --> SCH : Numerology %d not supported", schCellCfg->numerology);
}
+#ifdef NR_TDD
+ schInitTddSlotCfg(cell, schCellCfg);
+#endif
SCH_ALLOC(cell->schDlSlotInfo, cell->numSlots * sizeof(SchDlSlotInfo*));
if(!cell->schDlSlotInfo)
uint32_t actvUeBitMap; /*!<Bit map to find active UEs */
uint32_t boIndBitMap; /*!<Bit map to indicate UEs that have recevied BO */
SchUeCb ueCb[MAX_NUM_UE]; /*!<Pointer to UE contexts of this cell */
+#ifdef NR_TDD
+ uint8_t numSlotsInPeriodicity; /*!< number of slots in configured periodicity and SCS */
+ uint32_t slotFrmtBitMap; /*!< 2 bits must be read together to determine D/U/S slots. 00-D, 01-U, 10-S */
+ uint32_t symbFrmtBitMap; /*!< 2 bits must be read together to determine D/U/S symbols. 00-D, 01-U, 10-S */
+#endif
}SchCellCb;
/**
ret = sendUlSchInfoToMac(&ulSchedInfo, schInst);
if(ret != ROK)
{
- DU_LOG("\nSending UL Sch info from SCH to MAC failed");
+ DU_LOG("\nERROR --> SCH : Sending UL Sch info from SCH to MAC failed");
}
schInitUlSlot(schUlSlotInfo);
SCH_ALLOC(schUlSlotInfo->schPuschInfo, sizeof(SchPuschInfo));
if(!schUlSlotInfo->schPuschInfo)
{
- DU_LOG("SCH: Memory allocation failed in schAllocMsg3Pusch");
+ DU_LOG("\nERROR --> SCH : Memory allocation failed in schAllocMsg3Pusch");
return RFAILED;
}
tbSize = 0; /* since nPrb has been incremented, recalculating tbSize */
SCH_ALLOC(rarInfo, sizeof(RarInfo));
if(rarInfo == NULLP)
{
- DU_LOG("\nMAC: Memory Allocation failed for rarInfo");
+ DU_LOG("\nERROR --> SCH : Memory Allocation failed for rarInfo");
return RFAILED;
}
SCH_ALLOC(dlMsgAlloc, sizeof(DlMsgAlloc));
if(!dlMsgAlloc)
{
- DU_LOG("\nMAC: Memory Allocation failed for ded DL msg alloc");
+ DU_LOG("\nERROR --> SCH : Memory Allocation failed for ded DL msg alloc");
return RFAILED;
}
memset(dlMsgAlloc, 0, sizeof(DlMsgAlloc));
ret = schBroadcastAlloc(cell,dlBrdcstAlloc,slot);
if(ret != ROK)
{
- DU_LOG("\nschBroadcastAlloc failed");
+ DU_LOG("\nERROR --> SCH : schBroadcastAlloc failed");
return (ret);
}
}
SCH_ALLOC(rarAlloc, sizeof(RarAlloc));
if(!rarAlloc)
{
- DU_LOG("\nMAC: Memory Allocation failed for RAR alloc");
+ DU_LOG("\nERROR --> SCH : Memory Allocation failed for RAR alloc");
return RFAILED;
}
SCH_ALLOC(msg4Alloc, sizeof(DlMsgAlloc));
if(!msg4Alloc)
{
- DU_LOG("\nMAC: Memory Allocation failed for msg4 alloc");
+ DU_LOG("\nERROR --> SCH : Memory Allocation failed for msg4 alloc");
return RFAILED;
}
SCH_ALLOC(dciInfo, sizeof(DciInfo));
if(!dciInfo)
{
- DU_LOG("\nMAC: Memory Allocation failed for dciInfo alloc");
+ DU_LOG("\nERROR --> SCH : Memory Allocation failed for dciInfo alloc");
return RFAILED;
}
memset(dciInfo,0,sizeof(DciInfo));
ret = sendDlAllocToMac(&dlSchedInfo, schInst);
if(ret != ROK)
{
- DU_LOG("\nSending DL Broadcast allocation from SCH to MAC failed");
+ DU_LOG("\nERROR --> SCH : Sending DL Broadcast allocation from SCH to MAC failed");
return (ret);
}
if(event == EVENT_ADD_UE_CONFIG_REQ_TO_SCH)
{
rspPst.event = EVENT_UE_CONFIG_RSP_TO_MAC;
- DU_LOG("\nSCH: Sending UE Config response to MAC");
+ DU_LOG("\nINFO --> SCH : Sending UE Config response to MAC");
}
else if(event == EVENT_MODIFY_UE_CONFIG_REQ_TO_SCH)
{
rspPst.event = EVENT_UE_RECONFIG_RSP_TO_MAC;
- DU_LOG("\nSCH: Sending UE Reconfig response to MAC");
+ DU_LOG("\nINFO --> SCH : Sending UE Reconfig response to MAC");
}
SchUeCfgRspOpts[rspPst.selector](&rspPst, cfgRsp);
}
}
if(idx == MAX_NUM_CELL)
{
- DU_LOG("\nSCH : Ue create request failed. Invalid cell id %d", ueCfg->cellId);
+ DU_LOG("\nERROR --> SCH : Ue create request failed. Invalid cell id %d", ueCfg->cellId);
SchSendUeCfgRspToMac(srcEvent, ueCfg, inst, RSP_NOK, &cfgRsp);
return NULLP;
}
/* Check if max number of UE configured */
if(cellCb->numActvUe > MAX_NUM_UE)
{
- DU_LOG("SCH : Max number of UE [%d] already configured", MAX_NUM_UE);
+ DU_LOG("\nERROR --> SCH : Max number of UE [%d] already configured", MAX_NUM_UE);
SchSendUeCfgRspToMac(srcEvent, ueCfg, inst, RSP_NOK, &cfgRsp);
return NULLP;
}
if(!ueCfg)
{
- DU_LOG("\nSCH : Adding UE Config Request failed at MacSchAddUeConfigReq()");
+ DU_LOG("\nERROR --> SCH : Adding UE Config Request failed at MacSchAddUeConfigReq()");
return RFAILED;
}
- DU_LOG("\nSCH : Adding UE Config Request for CRNTI[%d]", ueCfg->crnti);
+ DU_LOG("\nDEBUG --> SCH : Adding UE Config Request for CRNTI[%d]", ueCfg->crnti);
cellCb = getSchCellCb(pst->event, inst, ueCfg);
/* Search if UE already configured */
{
if((ueCb->crnti == ueCfg->crnti) && (ueCb->state == SCH_UE_STATE_ACTIVE))
{
- DU_LOG("\n SCH : CRNTI %d already configured ", ueCfg->crnti);
+ DU_LOG("\nDEBUG --> SCH : CRNTI %d already configured ", ueCfg->crnti);
SchSendUeCfgRspToMac(pst->event, ueCfg, inst, RSP_OK, &cfgRsp);
return ROK;
}
}
else
{
- DU_LOG("\n SCH : SchUeCb not found at MacSchAddUeConfigReq() ");
+ DU_LOG("\nERROR --> SCH : SchUeCb not found at MacSchAddUeConfigReq() ");
SchSendUeCfgRspToMac(pst->event, ueCfg, inst, RSP_NOK, &cfgRsp);
return RFAILED;
}
SCH_ALLOC(schUlSlotInfo->schPuschInfo, sizeof(SchPuschInfo));
if(!schUlSlotInfo->schPuschInfo)
{
- DU_LOG("SCH: Memory allocation failed in schAllocMsg3Pusch");
+ DU_LOG("\nERROR --> SCH: Memory allocation failed in schAllocMsg3Pusch");
return RFAILED;
}
memcpy(schUlSlotInfo->schPuschInfo, puschInfo, sizeof(SchPuschInfo));
if(!ueCfg)
{
- DU_LOG("\nSCH : Modifying Ue Config request failed at MacSchModUeConfigReq()");
+ DU_LOG("\nERROR --> SCH : Modifying Ue Config request failed at MacSchModUeConfigReq()");
return RFAILED;
}
- DU_LOG("\nSCH : Modifying Ue Config Request for CRNTI[%d]", ueCfg->crnti);
+ DU_LOG("\nDEBUG --> SCH : Modifying Ue Config Request for CRNTI[%d]", ueCfg->crnti);
cellCb = getSchCellCb(pst->event, inst, ueCfg);
/* Search if UE already configured */
if(!ueCb)
{
- DU_LOG("\n SCH : SchUeCb not found at MacSchModUeConfigReq() ");
+ DU_LOG("\nERROR --> SCH : SchUeCb not found at MacSchModUeConfigReq() ");
SchSendUeCfgRspToMac(pst->event, ueCfg, inst, RSP_NOK, &cfgRsp);
return RFAILED;
}
S32 ret =0; /* temporary return value */
S32 retVal =0; /* temporary return value */
S16 i =0; /* loop index */
- CmInetIovec txArr[CM_INET_MAX_DBUF] = {0}; /* scatter vector */
+ CmInetIovec txArr[CM_INET_MAX_DBUF] = {{0}}; /* scatter vector */
S16 numDBufs =0; /* number of dBufs in message */
struct msghdr msg ={0}; /* sendmsg() message header */
MsgLen msgLen =0; /* message length */
S32 ret; /* temporary return value */
S32 retVal; /* temporary return value */
S16 i; /* loop index */
- CmInetIovec txArr[CM_INET_MAX_DBUF] ={0}; /* scatter vector */
+ CmInetIovec txArr[CM_INET_MAX_DBUF] ={{0}}; /* scatter vector */
S16 numDBufs; /* number of dBufs in message */
struct msghdr msg; /* sendmsg() message header */
MsgLen msgLen; /* message length */
struct msghdr msg = {0}; /* message header */
/* cm_inet_c_001.main_54: Fix for Klockworks issue */
Buffer *tempMsg = NULLP; /* temporary message */
- CmInetIovec rxArr[CM_INET_MAX_DBUF]= {0}; /* dynamic gather array */
+ CmInetIovec rxArr[CM_INET_MAX_DBUF]= {{0}}; /* dynamic gather array */
Buffer **dBufs = NULLP; /* dynamic array with allocated dBufs */
S16 numDBufs =0; /* number of allocated dBufs */
#ifndef LTE_ENB_PAL
if( evntSize > maxBlkSize)
{
- printf("\nNot Allocating memory for Event\n");
+ DU_LOG("\nERROR --> Not Allocating memory for Event\n");
#ifdef ALIGN_64BIT
- printf("eventSize [%d] greater than maxBlkSize [%d]\n",
+ DU_LOG("\nERROR --> eventSize [%d] greater than maxBlkSize [%d]\n",
evntSize, maxBlkSize);
#else
- printf("eventSize [%ld] greater than maxBlkSize [%ld]\n",
+ DU_LOG("\nERROR --> eventSize [%ld] greater than maxBlkSize [%ld]\n",
evntSize, maxBlkSize);
#endif
return RFAILED;
if(((uint64_t)(address - regMemLeakInfo.regStartAddr[region]) & regMinBktSzInfo[region].minBktSzMins1) !=0)
{
- printf("address in InsertToT2kMemLeakInfo is %ld size = %d file is %s line is %d \n", address, size, fileName, lineNo);
+ DU_LOG("\nINFO --> address in InsertToT2kMemLeakInfo is %ld size = %d file is %s line is %d \n", address, size, fileName, lineNo);
}
leakInfo = (((T2kMeamLeakInfo*)(regMemLeakInfo.gMemLeakInfo[region])) + index1);
leakInfo->prevRemLineNo = 0;
leakInfo->prevRemFileName = '\0';
- //printf("InsertToT2kMemLeakInfo the adress from List Address = %x, index1 = %d from File=%s, line=%d \n",address,index1,fileName,lineNo);
+ //DU_LOG("\nINFO --> InsertToT2kMemLeakInfo the adress from List Address = %x, index1 = %d \
+ from File=%s, line=%d \n",address,index1,fileName,lineNo);
if(smallTick++ == 4096)
{
smallTick = 0;
}
else
{
- printf("Something is wrong, trying to insert %ld index1 = %d file is %s line is %d \n",address, index1, fileName, lineNo);
- printf("Address present :%ld, from File:%s, Line:%d, Size:%d, Age:%d",
+ DU_LOG("\nERROR --> Something is wrong, trying to insert %ld index1 = %d file is %s line is %d \n",address, index1, fileName, lineNo);
+ DU_LOG("\nINFO --> Address present :%ld, from File:%s, Line:%d, Size:%d, Age:%d",
leakInfo->address, leakInfo->fileName,
leakInfo->lineNo, leakInfo->size,
leakInfo->age);
if(index1 >= T2K_MEM_LEAK_INFO_TABLE_SIZE)
{
- printf("index1 out of range = %d address is %ld file = %s line = %d. We are going to crash!!!\n",
+ DU_LOG("\nERROR --> index1 out of range = %d address is %ld file = %s line = %d. We are going to crash!!!\n",
index1,
address,
file,
}
else
{
- printf("Something is wrong, trying to remove %ld index1 = %d from File=%s, line=%d address present is %ld region%d \n",address, index1, file,line,leakInfo->address,region);
+ DU_LOG("\nERROR --> Something is wrong, trying to remove %ld index1 = %d from File=%s, line=%d address present is %ld region%d \n",address, index1, file,line,leakInfo->address,region);
- printf("\n Last Del file %s line %d\n",leakInfo->lastDelFileName,
+ DU_LOG("\nINFO --> Last Del file %s line %d\n",leakInfo->lastDelFileName,
leakInfo->lastDelLineNum);
if(leakInfo->prevRemFileName != NULLP)
{
- printf("Previous File:%s, Previous Line:%d\n",
+ DU_LOG("\nINFO --> Previous File:%s, Previous Line:%d\n",
leakInfo->prevRemFileName, leakInfo->prevRemLineNo);
}
}
if(fp == NULL)
{
- printf("Could not open file for dumping mem leak info\n");
+ DU_LOG("\nERROR --> Could not open file for dumping mem leak info\n");
return;
}
for(reg=0; reg <regMemLeakInfo.numActvRegions; reg++)
#ifdef BRDCM_SSI_MEM_LEAK_DEBUG_LEVEL2
/* Initialize the hast list to maintain the SSI memory information for Broadcom */
offset = (uint16_t)((PTR)(&ptrHdr.ent) - (PTR) &ptrHdr);
- printf("###########offset is %d region %d\n", offset, region);
+ DU_LOG("\nINFO --> offset is %d region %d\n", offset, region);
if(cmHashListInit(®Cb->brdcmSsiLstCp, 1000, offset, FALSE,
CM_HASH_KEYTYPE_UINT32_MOD, region, 0) != ROK)
{
/* Initialize the elements with 0xAB */
memset(*ptr, 0xAB, *size);
#endif
-// printf("Pointer allocated %8p size %d\n", *ptr, *size);
+// DU_LOG("\nINFO --> Pointer allocated %8p size %d\n", *ptr, *size);
/* Store this pointer in hash list */
if ((bkt->nextBlk) && *ptr)
#elif SS_LIGHT_MEM_LEAK_STS
if (g_overused[bktIdx] == 0 && OVERUSED(bkt))
{
g_overused[bktIdx] = 1;
- /*printf("cmAlloc: bktIdx %u overused %u numAlloc %u\n", bktIdx, g_overused[bktIdx], bkt->numAlloc); */
+ /*DU_LOG("\nINFO --> cmAlloc: bktIdx %u overused %u numAlloc %u\n", bktIdx, g_overused[bktIdx], bkt->numAlloc); */
}
}
#endif
size(%d) %8p, Bucket Id:%03d\n",
size, ptrHdr->requestedSize, ptr, regCb->mapTbl[idx].bktIdx);
#endif
- printf("Passed size (%d) does not match with allocated \
+ DU_LOG("\nERROR --> Passed size (%d) does not match with allocated \
size(%d) %8p, Bucket Id:%03d\n",
size, ptrHdr->requestedSize, ptr, regCb->mapTbl[idx].bktIdx);
abort();
}
/* Validate the tail part to see if there is any over run */
-// printf("Pointer free request %8p, size %d\n", ptr, size);
+// DU_LOG("\nINFO --> Pointer free request %8p, size %d\n", ptr, size);
#endif
/* validate the block to be freed for trampling */
return (RTRAMPLINGNOK);
}
#ifdef BRDCM_SSI_MEM_LEAK_DEBUG_LEVEL1
- printf("Memory signature is invalid\n");
+ DU_LOG("\nERROR --> Memory signature is invalid\n");
abort();
#endif
}
(Void) SUnlock(&(bkt->bktLock));
#endif
#ifdef BRDCM_SSI_MEM_LEAK_DEBUG_LEVEL1
- printf("Attempt to double deallocate memory at: %8p, Bucket Id:%03d,\
+ DU_LOG("\nERROR --> Attempt to double deallocate memory at: %8p, Bucket Id:%03d,\
size %u bytes \n", ptr, regCb->mapTbl[idx].bktIdx, bkt->size);
abort();
#endif
sprintf(dbgPrntBuf, "Passed size (%d) does not match with allocated size(%d):%8p, Bucket Id:%03d\n",
size, ptrHdr->requestedSize, ptr, regCb->mapTbl[idx].bktIdx);
#endif
- printf("Passed size (%d) does not match with allocated size(%d):%8p, Bucket Id:%03d\n",
+ DU_LOG("\nERROR --> Passed size (%d) does not match with allocated size(%d):%8p, Bucket Id:%03d\n",
size, ptrHdr->requestedSize, ptr, regCb->mapTbl[idx].bktIdx);
abort();
}
}
#endif
#ifdef BRDCM_SSI_MEM_LEAK_DEBUG_LEVEL1
- printf("Memory signature is invalid\n");
+ DU_LOG("\nERROR --> Memory signature is invalid\n");
abort();
#endif
}
SDisplay(0, dbgPrntBuf);
#endif /* DEBUGP */
#ifdef BRDCM_SSI_MEM_LEAK_DEBUG_LEVEL1
- printf("Attempt to double deallocate memory at: %8p, Bucket Id:%03d,\
+ DU_LOG("\nERROR --> Attempt to double deallocate memory at: %8p, Bucket Id:%03d,\
size %u bytes \n", ptr, regCb->mapTbl[idx].bktIdx, bkt->size);
abort();
#endif
{
if (FALSE == gmemLkCb.isStarted)
{
- printf("!!leak capturing started\n");
+ DU_LOG("\nINFO --> leak capturing started\n");
gmemLkCb.isStarted = TRUE;
}
else
{
gmemLkCb.isStarted = FALSE;
- printf("!!leak capturing stopped\n");
+ DU_LOG("\nINFO --> leak capturing stopped\n");
cmPrintLeakLog();
}
return;
static uint32_t leakCount =0;
- printf("---- START OF LEAK LOG ----");
+ DU_LOG("\nINFO --> START OF LEAK LOG ");
SLock(&gmemLkCb.memLock);
- printf("---- Lock Acquired ----");
+ DU_LOG("\nINFO --> Lock Acquired");
for(indx = 0; indx < CM_MAX_ALLOC_ENTERIES; indx++)
{
if(gmemLkCb.allocInfo[indx].used == TRUE)
{
leakCount++;
aBkt =(CmMmBlkHdr *)gmemLkCb.allocInfo[indx].memAddr;
- printf("LeakCnt(%ld)Addr(0x%p)RqSz(%ld)",
+ DU_LOG("LeakCnt(%ld)Addr(0x%p)RqSz(%ld)",
leakCount,gmemLkCb.allocInfo[indx].memAddr, aBkt->requestedSize);
- printf("LineNo(%ld)funcName(%s)\n",
+ DU_LOG("LineNo(%ld)funcName(%s)\n",
aBkt->lineNo, aBkt->currFuncName);
gmemLkCb.allocInfo[indx].used = FALSE;
cmPutFreeIndx(indx);
//if(leakCount % 10 == 0)
// sleep(1);
}
- printf("---- END OF LEAK LOG ----");
+ DU_LOG("\nINFO --> END OF LEAK LOG ");
SUnlock(&gmemLkCb.memLock);
- printf("---- Lock Released ----");
+ DU_LOG("\nINFO --> Lock Released");
leakCount =0;
return;
}
/* If hash list is full then print the error tna continue */
if(hashListCp->totalNumEntries == (CMM_HIST_MAX_MEM_BIN * CMM_HIST_MAX_MEM_ENTRY_PER_BIN))
{
- printf("No place in the hash list. Increase the value of macro CMM_HIST_MAX_MEM_BIN and CMM_HIST_MAX_MEM_ENTRY_PER_BIN \n");
+ DU_LOG("\nERROR --> No place in the hash list. Increase the value of macro CMM_HIST_MAX_MEM_BIN and CMM_HIST_MAX_MEM_ENTRY_PER_BIN \n");
return RFAILED;
} /* End of if */
if(hashListCp->totalNumEntries == (CMM_HIST_MAX_MEM_BIN * CMM_HIST_MAX_MEM_ENTRY_PER_BIN))
{
- printf("No place in the hash list. Increase the value of macro CMM_HIST_MAX_MEM_BIN and CMM_HIST_MAX_MEM_ENTRY_PER_BIN\n");
+ DU_LOG("\nERROR --> No place in the hash list. Increase the value of macro CMM_HIST_MAX_MEM_BIN and CMM_HIST_MAX_MEM_ENTRY_PER_BIN\n");
return RFAILED;
} /* End of if */
} /* End of if (numEnt) */
else
{
- printf ("Unable to find the entry in hash list\n");
+ DU_LOG("\nERROR --> Unable to find the entry in hash list\n");
return RFAILED;
}/* End of else (numEnt) */
}/* end of for (numBin = 0) */
- printf("Unable to find the entry in the hash list\n");
+ DU_LOG("\nERROR --> Unable to find the entry in the hash list\n");
return RFAILED;
} /* end of cmHstGrmFindEntry */
#include "cm_lte.h" /* Common LTE header file */
#include "cm_llist.h" /* Linked list header file */
#include "cm_tkns.h" /* Common tokens header file */
-
+#include "du_log.h"
/* header/extern include files (.x) */
if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
- printf("\n MBuf Allocation failed\n");
+ DU_LOG("\nERROR --> RLC : MBuf Allocation failed\n");
}
return (mBuf);
}
#define ODU_SET_THREAD_AFFINITY SSetAffinity
#define ODU_CREATE_TASK SCreateSTsk
+#ifdef NR_TDD
+/* Maximum slots for max periodicity and highest numerology is 320.
+ * However, aligning to fapi_interface.h, setting this macro to 160 */
+#define MAX_TDD_PERIODICITY_SLOTS 160
+#define MAX_SYMB_PER_SLOT 14
+#endif
+
#define GET_UE_IDX( _crnti,_ueIdx) \
{ \
_ueIdx = _crnti - ODU_START_CRNTI + 1; \
CONFIG_DEL
}ConfigType;
+#ifdef NR_TDD
+typedef enum
+{
+ DL_SLOT,
+ UL_SLOT,
+ FLEXI_SLOT
+}SlotConfig;
+
+typedef enum
+{
+ TX_PRDCTY_MS_0P5,
+ TX_PRDCTY_MS_0P625,
+ TX_PRDCTY_MS_1,
+ TX_PRDCTY_MS_1P25,
+ TX_PRDCTY_MS_2,
+ TX_PRDCTY_MS_2P5,
+ TX_PRDCTY_MS_5,
+ TX_PRDCTY_MS_10
+}DlUlTxPeriodicity;
+#endif
+
typedef struct slotIndInfo
{
uint16_t cellId;
uint16_t cellId;
}OduCellId;
+#ifdef NR_TDD
+typedef struct tddCfg
+{
+ bool pres;
+ DlUlTxPeriodicity tddPeriod; /* DL UL Transmission periodicity */
+ SlotConfig slotCfg[MAX_TDD_PERIODICITY_SLOTS][MAX_SYMB_PER_SLOT];
+}TDDCfg;
+#endif
+
+
uint64_t gSlotCount;
void freqDomRscAllocType0(uint16_t startPrb, uint16_t prbSize, uint8_t *freqDomain);
#endif
if(param->unLicnsdCfgPres)
{
- printf("pverma param->unLicnsdCfgPres cm/ctf -->%d\n",param->unLicnsdCfgPres);
+ DU_LOG("\nDEBUG --> pverma param->unLicnsdCfgPres cm/ctf -->%d\n",param->unLicnsdCfgPres);
CMCHKPK(cmPkCtfUnLicnsdCellParam, ¶m->lteUCfg, mBuf);
}
CMCHKPK(oduUnpackUInt8, param->unLicnsdCfgPres, mBuf);
if(param->unLicnsdCfgPres)
{
- printf("pverma param->unLicnsdCfgPres 2 -->%d \n",param->unLicnsdCfgPres);
+ DU_LOG("\nDEBUG --> pverma param->unLicnsdCfgPres 2 -->%d \n",param->unLicnsdCfgPres);
CMCHKUNPK(cmUnpkCtfUnLicnsdCellParam, ¶m->lteUCfg, mBuf);
}
#ifdef EMTC_ENABLE
CMCHKUNPK(SUnpkS16, ¶m->pilotSigPwr, mBuf);
CMCHKUNPK(SUnpkS16, ¶m->priSigPwr, mBuf);
CMCHKUNPK(SUnpkS16, ¶m->secSigPwr, mBuf);
- printf("param->pilotSigPwr = %d\nparam->priSigPwr = %d\n param->secSigPwr = %d\n",param->pilotSigPwr,param->priSigPwr,param->secSigPwr);
+ DU_LOG("\nDEBUG --> param->pilotSigPwr = %d\nparam->priSigPwr = %d\n param->secSigPwr = %d\n",param->pilotSigPwr,param->priSigPwr,param->secSigPwr);
#ifdef ENABLE_API_LOG
CMCHKUNPK(oduPackUInt8, ¶m->enableAPILog, mBuf);
#endif /* ENABLE_API_LOG */
/* pack the address of the structure */
CMCHKPK(oduPackPointer,(PTR)macCellCfg, mBuf);
- DU_LOG("\nDU-APP : MAC CELL config sent");
+ DU_LOG("\nDEBUG --> DU-APP : MAC CELL config sent");
return ODU_POST_TASK(pst,mBuf);
}
return ROK;
if (ODU_GET_MSG_BUF(pst->region, pst->pool, &mBuf) != ROK)
{
- DU_LOG("\nDU APP : Memory allocation failed for cell start req pack");
+ DU_LOG("\nERROR --> DU APP : Memory allocation failed for cell start req pack");
return RFAILED;
}
if (ODU_GET_MSG_BUF(pst->region, pst->pool, &mBuf) != ROK)
{
- DU_LOG("\nDU APP : Memory allocation failed for cell stop req pack");
+ DU_LOG("\nERROR --> DU APP : Memory allocation failed for cell stop req pack");
return RFAILED;
}
if (ODU_GET_MSG_BUF(pst->region, pst->pool, &mBuf) != ROK)
{
- DU_LOG("\nDU APP : Memory allocation failed for packMacCellUpInd");
+ DU_LOG("\nERROR --> DU APP : Memory allocation failed for packMacCellUpInd");
return RFAILED;
}
if (ODU_GET_MSG_BUF(pst->region, pst->pool, &mBuf) != ROK)
{
- DU_LOG("\nDU APP : Memory allocation failed for stop Ind pack");
+ DU_LOG("\nERROR --> DU APP : Memory allocation failed for stop Ind pack");
return RFAILED;
}
if(pst->selector == ODU_SELECTOR_LC)
{
/*pack the payload here*/
- DU_LOG("\nDU APP : Packed CellId");
CMCHKPK(oduUnpackUInt16, cellId->cellId, mBuf);
CM_FREE_SHRABL_BUF(pst->region, pst->pool, cellId, sizeof(OduCellId));
cellId = NULL;
{
if (ODU_GET_MSG_BUF(pst->region, pst->pool, &mBuf) != ROK)
{
- DU_LOG("\nMAC : Memory allocation failed at packMacUlCcchInd");
+ DU_LOG("\nERROR --> MAC : Memory allocation failed at packMacUlCcchInd");
return RFAILED;
}
/* pack the address of the structure */
}
else
{
- DU_LOG("\nMAC: Only LWLC supported for UL CCCH Ind ");
+ DU_LOG("\nERROR --> MAC: Only LWLC supported for UL CCCH Ind ");
return RFAILED;
}
else
{
/* Nothing to do for other selectors */
- DU_LOG("\n Only LWLC supported for UL CCCH Ind ");
+ DU_LOG("\nERROR --> MAC : Only LWLC supported for UL CCCH Ind ");
ODU_PUT_MSG_BUF(mBuf);
}
return RFAILED;
{
if (ODU_GET_MSG_BUF(pst->region, pst->pool, &mBuf) != ROK)
{
- DU_LOG("\nMAC : Memory allocation failed at packMacDlCcchInd");
+ DU_LOG("\nERROR --> MAC : Memory allocation failed at packMacDlCcchInd");
return RFAILED;
}
/* pack the address of the structure */
}
else
{
- DU_LOG("\nDU APP: Only LWLC supported for DL CCCH Ind ");
+ DU_LOG("\nERROR --> DU APP : Only LWLC supported for DL CCCH Ind ");
return RFAILED;
}
else
{
/* Nothing to do for other selectors */
- DU_LOG("\n Only LWLC supported for DL CCCH Ind ");
+ DU_LOG("\nERROR --> DU APP : Only LWLC supported for DL CCCH Ind ");
ODU_PUT_MSG_BUF(mBuf);
}
{
if (ODU_GET_MSG_BUF(pst->region, pst->pool, &mBuf) != ROK)
{
- DU_LOG("\nMAC : Memory allocation failed at packDuMacUeCreateReq");
+ DU_LOG("\nERROR --> MAC : Memory allocation failed at packDuMacUeCreateReq");
return RFAILED;
}
/* pack the address of the structure */
}
else
{
- DU_LOG("\nMAC: Only LWLC supported for packDuMacUeCreateReq");
+ DU_LOG("\nERROR --> MAC: Only LWLC supported for packDuMacUeCreateReq");
return RFAILED;
}
else
{
/* Nothing to do for other selectors */
- DU_LOG("\n Only LWLC supported for UE Create Request ");
+ DU_LOG("\nERROR --> DU APP : Only LWLC supported for UE Create Request ");
ODU_PUT_MSG_BUF(mBuf);
}
{
if (ODU_GET_MSG_BUF(pst->region, pst->pool, &mBuf) != ROK)
{
- DU_LOG("\nMAC : Memory allocation failed at packDuMacUeCfgRsp");
+ DU_LOG("\nERROR --> MAC : Memory allocation failed at packDuMacUeCfgRsp");
return RFAILED;
}
/* pack the address of the structure */
}
else
{
- DU_LOG("\nMAC: Only LWLC supported for packDuMacUeCfgRsp");
+ DU_LOG("\nERROR --> MAC: Only LWLC supported for packDuMacUeCfgRsp");
return RFAILED;
}
{
if (ODU_GET_MSG_BUF(pst->region, pst->pool, &mBuf) != ROK)
{
- DU_LOG("\nMAC : Memory allocation failed at packDuMacUeReconfigReq");
+ DU_LOG("\nERROR --> MAC : Memory allocation failed at packDuMacUeReconfigReq");
return RFAILED;
}
/* pack the address of the structure */
}
else
{
- DU_LOG("\nMAC: Only LWLC supported for packDuMacUeReconfigReq");
+ DU_LOG("\nERROR --> MAC: Only LWLC supported for packDuMacUeReconfigReq");
return RFAILED;
}
else
{
/* Nothing to do for other selectors */
- DU_LOG("\n Only LWLC supported for UE Create Request ");
+ DU_LOG("\nERROR --> DU APP : Only LWLC supported for UE Create Request ");
ODU_PUT_MSG_BUF(mBuf);
}
#define __MACINT_H__
#define NUM_NUMEROLOGY 5 /* Number of numerology */
-#define MAXIMUM_TDD_PERIODICITY 10
-#define MAX_SYMB_PER_SLOT 14
#define NUM_SSB 1 /* max value is 64 */
#define SSB_MASK_SIZE 1 /* SSB mask size is 32bit for sub6 */
RSSI_UNIT_DBFS
}RSSIMeasUnit;
-typedef enum
-{
- DL_SLOT,
- UL_SLOT,
- GUARD_SLOT
-}SlotConfig;
-
-typedef enum
-{
- TX_PRDCTY_MS_0P5,
- TX_PRDCTY_MS_0P625,
- TX_PRDCTY_MS_1,
- TX_PRDCTY_MS_1P25,
- TX_PRDCTY_MS_2,
- TX_PRDCTY_MS_2P5,
- TX_PRDCTY_MS_5,
- TX_PRDCTY_MS_10
-}DlUlTxPeriodicity;
-
typedef enum
{
BETA_PSS_0DB,
uint8_t raRspWindow; /* RA Response Window */
}PrachCfg;
-typedef struct tddCfg
-{
- bool pres;
- DlUlTxPeriodicity tddPeriod; /* DL UL Transmission periodicity */
- SlotConfig slotCfg[MAXIMUM_TDD_PERIODICITY][MAX_SYMB_PER_SLOT];
-}TDDCfg;
-
typedef struct sib1CellCfg
{
uint8_t *sib1Pdu;
bool freqShft; /* Indicates presence of 7.5kHz frequency shift */
SsbCfg ssbCfg; /* SSB configuration */
PrachCfg prachCfg; /* PRACH Configuration */
+#ifdef NR_TDD
TDDCfg tddCfg; /* TDD periodicity and slot configuration */
+#endif
RSSIMeasUnit rssiUnit; /* RSSI measurement unit */
Sib1CellCfg sib1Cfg; /* SIB1 config */
BwpDlConfig initialDlBwp; /* Initial DL BWP */
{
if (ODU_GET_MSG_BUF(pst->region, pst->pool, &mBuf) != ROK)
{
- DU_LOG("\nRLC : Memory allocation failed at packDuRlcUeCreateReq");
+ DU_LOG("\nERROR --> RLC : Memory allocation failed at packDuRlcUeCreateReq");
return RFAILED;
}
/* pack the address of the structure */
}
else
{
- DU_LOG("\nRLC: Only LWLC supported for packDuRlcUeCreateReq");
+ DU_LOG("\nERROR --> RLC: Only LWLC supported for packDuRlcUeCreateReq");
return RFAILED;
}
else
{
/* Nothing to do for other selectors */
- DU_LOG("\nRLC: Only LWLC supported for UE Create Request ");
+ DU_LOG("\nERROR --> RLC: Only LWLC supported for UE Create Request ");
ODU_PUT_MSG_BUF(mBuf);
}
{
if (ODU_GET_MSG_BUF(pst->region, pst->pool, &mBuf) != ROK)
{
- DU_LOG("\nRLC : Memory allocation failed at packRlcDuUeCfgRsp");
+ DU_LOG("\nERROR --> RLC : Memory allocation failed at packRlcDuUeCfgRsp");
return RFAILED;
}
/* pack the address of the structure */
}
else
{
- DU_LOG("\nRLC: Only LWLC supported for packRlcDuUeCfgRsp");
+ DU_LOG("\nERROR --> RLC: Only LWLC supported for packRlcDuUeCfgRsp");
return RFAILED;
}
else
{
/* Nothing to do for other selectors */
- DU_LOG("\nRLC: Only LWLC supported for UE Cfg Response ");
+ DU_LOG("\nERROR --> RLC: Only LWLC supported for UE Cfg Response ");
ODU_PUT_MSG_BUF(mBuf);
}
{
if (ODU_GET_MSG_BUF(pst->region, pst->pool, &mBuf) != ROK)
{
- DU_LOG("\nRLC : Memory allocation failed at packRlcUlRrcMsgToDu");
+ DU_LOG("\nERROR --> RLC : Memory allocation failed at packRlcUlRrcMsgToDu");
return RFAILED;
}
/* pack the address of the structure */
}
else
{
- DU_LOG("\nRLC: Only LWLC supported for packRlcUlRrcMsgToDu");
+ DU_LOG("\nERROR --> RLC: Only LWLC supported for packRlcUlRrcMsgToDu");
}
return RFAILED;
}
else
{
/* Nothing to do for other selectors */
- DU_LOG("\nRLC: Only LWLC supported for UL RRC Message transfer ");
+ DU_LOG("\nERROR --> RLC: Only LWLC supported for UL RRC Message transfer ");
ODU_PUT_MSG_BUF(mBuf);
}
{
if (ODU_GET_MSG_BUF(pst->region, pst->pool, &mBuf) != ROK)
{
- DU_LOG("\nRLC : Memory allocation failed at packRlcDlRrcMsgToRlc");
+ DU_LOG("\nERROR --> RLC : Memory allocation failed at packRlcDlRrcMsgToRlc");
return RFAILED;
}
/* pack the address of the structure */
}
else
{
- DU_LOG("\nRLC: Only LWLC supported for packDlRrcMsgToRlc");
+ DU_LOG("\nERROR --> RLC: Only LWLC supported for packDlRrcMsgToRlc");
}
return RFAILED;
}
else
{
/* Nothing to do for other selectors */
- DU_LOG("\nRLC: Only LWLC supported for UL RRC Message transfer ");
+ DU_LOG("\nERROR --> RLC: Only LWLC supported for UL RRC Message transfer ");
ODU_PUT_MSG_BUF(mBuf);
}
return RFAILED;
{
if (ODU_GET_MSG_BUF(pst->region, pst->pool, &mBuf) != ROK)
{
- DU_LOG("\nRLC : Memory allocation failed at packRrcDeliveryReportToDu");
+ DU_LOG("\nERROR --> RLC : Memory allocation failed at packRrcDeliveryReportToDu");
return RFAILED;
}
/* pack the address of the structure */
}
else
{
- DU_LOG("\nRLC: Only LWLC supported for packRrcDeliveryReportToDu");
+ DU_LOG("\nERROR --> RLC: Only LWLC supported for packRrcDeliveryReportToDu");
}
return RFAILED;
}
else
{
/* Nothing to do for other selectors */
- DU_LOG("\nRLC: Only LWLC supported for RRC delivery Message transfer ");
+ DU_LOG("\nERROR --> RLC: Only LWLC supported for RRC delivery Message transfer ");
ODU_PUT_MSG_BUF(mBuf);
}
{
if (ODU_GET_MSG_BUF(pst->region, pst->pool, &mBuf) != ROK)
{
- DU_LOG("\nRLC : Memory allocation failed at packDuRlcUeReconfigReq");
+ DU_LOG("\nERROR --> RLC : Memory allocation failed at packDuRlcUeReconfigReq");
return RFAILED;
}
/* pack the address of the structure */
}
else
{
- DU_LOG("\nRLC: Only LWLC supported for packDuRlcUeReconfigReq");
+ DU_LOG("\nERROR --> RLC: Only LWLC supported for packDuRlcUeReconfigReq");
return RFAILED;
}
else
{
/* Nothing to do for other selectors */
- DU_LOG("\nRLC: Only LWLC supported for UE Create Request ");
+ DU_LOG("\nERROR --> RLC: Only LWLC supported for UE Create Request ");
ODU_PUT_MSG_BUF(mBuf);
}
return RFAILED;
{
if (ODU_GET_MSG_BUF(pst->region, pst->pool, &mBuf) != ROK)
{
- DU_LOG("\nRLC : Memory allocation failed at packRlcDlRrcMsgRspToDu");
+ DU_LOG("\nERROR --> RLC : Memory allocation failed at packRlcDlRrcMsgRspToDu");
return RFAILED;
}
/* pack the address of the structure */
}
else
{
- DU_LOG("\nRLC: Only LWLC supported for packRlcDlRrcMsgRspToDu");
+ DU_LOG("\nERROR --> RLC: Only LWLC supported for packRlcDlRrcMsgRspToDu");
}
return RFAILED;
}
else
{
/* Nothing to do for other selectors */
- DU_LOG("\nRLC: Only LWLC supported for DL RRC Message transfer ");
+ DU_LOG("\nERROR --> RLC: Only LWLC supported for DL RRC Message transfer ");
ODU_PUT_MSG_BUF(mBuf);
}
return RFAILED;
if(ODU_GET_MSG_BUF(DFLT_REGION, pst->pool, &mBuf) != ROK)
{
- printf("\nDU_APP : Failed to allocate memory");
+ DU_LOG("\nERROR --> DU_APP : Failed to allocate memory");
return RFAILED;
}
if(egtpCfg.localIp.ipV4Pres)
if(ODU_GET_MSG_BUF(DFLT_REGION, pst->pool, &mBuf) != ROK)
{
- printf("\nEGTP : Failed to allocate memory");
+ DU_LOG("\nERROR --> EGTP : Failed to allocate memory");
return RFAILED;
}
if(ODU_GET_MSG_BUF(DFLT_REGION, pst->pool, &mBuf) != ROK)
{
- printf("\nDU_APP : Failed to allocate memory");
+ DU_LOG("\nERROR --> DU_APP : Failed to allocate memory");
return RFAILED;
}
if(ODU_GET_MSG_BUF(DFLT_REGION, pst->pool, &mBuf) != ROK)
{
- printf("\nEGTP : Failed to allocate memory");
+ DU_LOG("\nERROR --> EGTP : Failed to allocate memory");
return RFAILED;
}
if(ODU_GET_MSG_BUF(DFLT_REGION, pst->pool, &mBuf) != ROK)
{
- printf("\nDU_APP : Failed to allocate memory");
+ DU_LOG("\nERROR --> DU_APP : Failed to allocate memory");
return RFAILED;
}
if(ODU_GET_MSG_BUF(DFLT_REGION, pst->pool, &mBuf) != ROK)
{
- printf("\nEGTP : Failed to allocate memory");
+ DU_LOG("\nERROR --> EGTP : Failed to allocate memory");
return RFAILED;
}
if(ODU_GET_MSG_BUF(DFLT_REGION, pst->pool, &mBuf) != ROK)
{
- printf("\nDU_APP : Failed to allocate memory");
+ DU_LOG("\nERROR --> DU_APP : Failed to allocate memory");
return RFAILED;
}
if(ODU_GET_MSG_BUF(pst->region, pst->pool, &mBuf) != ROK)
{
- printf("\nSCTP : Failed to allocate memory");
+ DU_LOG("\nERROR --> SCTP : Failed to allocate memory");
return RFAILED;
}
if (ODU_POST_TASK(pst, mBuf) != ROK)
{
- printf("\nSCTP : ODU_POST_TASK failed while sending SCTP notification");
+ DU_LOG("\nERROR --> SCTP : ODU_POST_TASK failed while sending SCTP notification");
return RFAILED;
}
SchRachCfg schRachCfg; /* PRACH config */
SchBwpDlCfg schInitialDlBwp; /* Initial DL BWP */
SchBwpUlCfg schInitialUlBwp; /* Initial UL BWP */
+#ifdef NR_TDD
+ TDDCfg tddCfg; /* TDD Cfg */
+#endif
}SchCellCfg;
typedef struct schCellCfgCfm
if (ODU_GET_MSG_BUF(pst->region, pst->pool, &mBuf) != ROK)
{
- DU_LOG("\nRLC: Memory allocation failed at packBOStatus");
+ DU_LOG("\nERROR --> RLC: Memory allocation failed at packBOStatus");
return RFAILED;
}
if (ODU_GET_MSG_BUF(pst->region, pst->pool, &mBuf) != ROK)
{
- DU_LOG("\nMAC: Memory allocation failed at packSchResultRep");
+ DU_LOG("\nERROR --> MAC : Memory allocation failed at packSchResultRep");
return RFAILED;
}
if (pst->selector == ODU_SELECTOR_LWLC)
if (ODU_GET_MSG_BUF(pst->region, pst->pool, &mBuf) != ROK)
{
- DU_LOG("\nRLC: Memory allocation failed at packRlcDlData");
+ DU_LOG("\nERROR --> RLC : Memory allocation failed at packRlcDlData");
return RFAILED;
}
if (ODU_GET_MSG_BUF(pst->region, pst->pool, &mBuf) != ROK)
{
- DU_LOG("\nMAC : Memory allocation failed at packRlcUlData");
+ DU_LOG("\nERROR --> MAC : Memory allocation failed at packRlcUlData");
return RFAILED;
}
if(sctpSend(mBuf) != ROK)
{
- DU_LOG("\nF1AP : SCTP Send failed");
+ DU_LOG("\nERROR --> F1AP : SCTP Send failed");
ODU_PUT_MSG_BUF(mBuf);
return RFAILED;
}
}
else
{
- DU_LOG("\nF1AP : ODU_ADD_POST_MSG_MULT failed");
+ DU_LOG("\nERROR --> F1AP : ODU_ADD_POST_MSG_MULT failed");
ODU_PUT_MSG_BUF(mBuf);
return RFAILED;
}
}
else
{
- DU_LOG("\nF1AP : Failed to allocate memory");
+ DU_LOG("\nERROR --> F1AP : Failed to allocate memory");
return RFAILED;
}
Cells_to_be_Activated_List_t *cellToActivate;
RRC_Version_t *rrcVer;
asn_enc_rval_t encRetVal;
- DU_LOG("\nF1AP : Building F1 Setup Response\n");
+ DU_LOG("\nINFO --> F1AP : Building F1 Setup Response\n");
/* Allocate the memory for F1SetupRequest_t */
CU_ALLOC(f1apMsg, sizeof(F1AP_PDU_t));
if(f1apMsg == NULLP)
{
- DU_LOG("\nF1AP : Memory allocation for F1AP-PDU failed");
+ DU_LOG("\nERROR --> F1AP : Memory allocation for F1AP-PDU failed");
return RFAILED;
}
f1apMsg->present = F1AP_PDU_PR_successfulOutcome;
CU_ALLOC(f1apMsg->choice.successfulOutcome, sizeof(SuccessfulOutcome_t));
if(f1apMsg->choice.successfulOutcome == NULLP)
{
- DU_LOG("\nF1AP : Memory allocation for F1AP-PDU failed");
+ DU_LOG("\nERROR --> F1AP : Memory allocation for F1AP-PDU failed");
CU_FREE(f1apMsg, sizeof(F1AP_PDU_t));
return RFAILED;
}
elementCnt * sizeof(F1SetupResponseIEs_t *));
if(f1SetupRsp->protocolIEs.list.array == NULLP)
{
- DU_LOG("\nF1AP : Memory allocation for F1ResponseIEs failed");
+ DU_LOG("\nERROR --> F1AP : Memory allocation for F1ResponseIEs failed");
CU_FREE(f1apMsg->choice.successfulOutcome, sizeof(SuccessfulOutcome_t));
CU_FREE(f1apMsg, sizeof(F1AP_PDU_t));
return RFAILED;
/* Check encode results */
if(encRetVal.encoded == ENCODE_FAIL)
{
- DU_LOG("\nF1AP : Could not encode F1SetupResponse structure (at %s)\n",\
+ DU_LOG("\nERROR --> F1AP : Could not encode F1SetupResponse structure (at %s)\n",\
encRetVal.failed_type ? encRetVal.failed_type->name : "unknown");
return RFAILED;
}
else
{
- DU_LOG("\nF1AP : Created APER encoded buffer for F1SetupResponse\n");
+ DU_LOG("\nDEBUG --> F1AP : Created APER encoded buffer for F1SetupResponse\n");
for(int i=0; i< encBufSize; i++)
{
- printf("%x",encBuf[i]);
+ DU_LOG("%x",encBuf[i]);
}
}
/* Sending msg */
if(SendF1APMsg(CU_APP_MEM_REG, CU_POOL) != ROK)
{
- DU_LOG("\nF1AP : Sending F1 Setup Response failed");
+ DU_LOG("\nERROR --> F1AP : Sending F1 Setup Response failed");
return RFAILED;
}
GNBDUConfigurationUpdateAcknowledge_t *gNBDuCfgAck;
asn_enc_rval_t enRetVal; /* Encoder return value */
- DU_LOG("\nF1AP : Building GNB-DU Config Update Ack\n");
+ DU_LOG("\nINFO --> F1AP : Building GNB-DU Config Update Ack\n");
/* Allocate the memory for F1SetupRequest_t */
CU_ALLOC(f1apMsg, (Size)sizeof(F1AP_PDU_t));
if(f1apMsg == NULLP)
{
- DU_LOG("\nF1AP : Memory allocation for F1AP-PDU failed");
+ DU_LOG("\nERROR --> F1AP : Memory allocation for F1AP-PDU failed");
return RFAILED;
}
CU_ALLOC(f1apMsg->choice.successfulOutcome, sizeof(SuccessfulOutcome_t));
if(f1apMsg->choice.successfulOutcome == NULLP)
{
- DU_LOG("\nF1AP : Memory allocation for F1AP-PDU failed");
+ DU_LOG("\nERROR --> F1AP : Memory allocation for F1AP-PDU failed");
CU_FREE(f1apMsg, sizeof(F1AP_PDU_t));
return RFAILED;
}
CU_ALLOC(gNBDuCfgAck->protocolIEs.list.array, elementCnt * sizeof(GNBDUConfigurationUpdateAcknowledgeIEs_t *));
if(gNBDuCfgAck->protocolIEs.list.array == NULLP)
{
- DU_LOG("\nF1AP : Memory allocation for DuUpdateAcknowledgeIEs failed");
+ DU_LOG("\nERROR --> F1AP : Memory allocation for DuUpdateAcknowledgeIEs failed");
CU_FREE(f1apMsg->choice.successfulOutcome, sizeof(SuccessfulOutcome_t));
CU_FREE(f1apMsg,(Size)sizeof(F1AP_PDU_t));
return RFAILED;
/* Checking encode results */
if(enRetVal.encoded == ENCODE_FAIL)
{
- DU_LOG("\nF1AP : Could not encode DUConfigUpdateAcknowledge structure (at %s)",enRetVal.failed_type ? enRetVal.failed_type->name : "unknown");
+ DU_LOG("\nERROR --> F1AP : Could not encode DUConfigUpdateAcknowledge structure (at %s)",enRetVal.failed_type ? enRetVal.failed_type->name : "unknown");
return RFAILED;
}
else
{
- DU_LOG("\nF1AP : Created APER encoded buffer for DuConfigUpdateAcknowledge\n");
+ DU_LOG("\nDEBUG --> F1AP : Created APER encoded buffer for DuConfigUpdateAcknowledge\n");
for(int i=0; i< encBufSize; i++)
{
- printf("%x",encBuf[i]);
+ DU_LOG("%x",encBuf[i]);
}
}
/* Sending msg */
if(SendF1APMsg(CU_APP_MEM_REG, CU_POOL) != ROK)
{
- DU_LOG("\nF1AP : Sending GNB-DU Config Update Ack failed");
+ DU_LOG("\nERROR --> F1AP : Sending GNB-DU Config Update Ack failed");
return RFAILED;
}
Reset_t *f1ResetMsg = NULLP;
F1AP_PDU_t *f1apMsg = NULLP;
asn_enc_rval_t encRetVal;
- DU_LOG("\nF1AP : Building F1 Reset request \n");
+ DU_LOG("\nINFO --> F1AP : Building F1 Reset request \n");
do
{
CU_ALLOC(f1apMsg, sizeof(F1AP_PDU_t));
if(f1apMsg == NULLP)
{
- DU_LOG("\nF1AP : Memory allocation for the BuildAndSendF1ResetReq's F1AP-PDU failed");
+ DU_LOG("\nERROR --> F1AP : Memory allocation for the BuildAndSendF1ResetReq's F1AP-PDU failed");
break;
}
f1apMsg->present = F1AP_PDU_PR_initiatingMessage;
CU_ALLOC(f1apMsg->choice.initiatingMessage, sizeof(InitiatingMessage_t));
if(f1apMsg->choice.initiatingMessage == NULLP)
{
- DU_LOG("\nF1AP : Memory allocation for BuildAndSendF1ResetReq failed");
+ DU_LOG("\nERROR --> F1AP : Memory allocation for BuildAndSendF1ResetReq failed");
break;
}
f1apMsg->choice.initiatingMessage->procedureCode = ProcedureCode_id_Reset;
CU_ALLOC(f1ResetMsg->protocolIEs.list.array,f1ResetMsg->protocolIEs.list.size);
if(f1ResetMsg->protocolIEs.list.array == NULLP)
{
- DU_LOG("\nF1AP : Memory allocation failed for BuildAndSendF1ResetReq");
+ DU_LOG("\nERROR --> F1AP : Memory allocation failed for BuildAndSendF1ResetReq");
break;
}
for(idx=0; idx<elementCnt; idx++)
CU_ALLOC(f1ResetMsg->protocolIEs.list.array[idx],sizeof(ResetIEs_t));
if(f1ResetMsg->protocolIEs.list.array[idx] == NULLP)
{
- DU_LOG("\nF1AP : Memory allocation failed for BuildAndSendF1ResetReq msg array");
+ DU_LOG("\nERROR --> F1AP : Memory allocation failed for BuildAndSendF1ResetReq msg array");
break;
}
}
/* Encode results */
if(encRetVal.encoded == ENCODE_FAIL)
{
- DU_LOG("\nF1AP : Could not encode F1Reset structure (at %s)\n",\
+ DU_LOG("\nERROR --> F1AP : Could not encode F1Reset structure (at %s)\n",\
encRetVal.failed_type ? encRetVal.failed_type->name : "unknown");
break;
}
else
{
- DU_LOG("\nF1AP : Created APER encoded buffer for F1Reset\n");
+ DU_LOG("\nDEBUG --> F1AP : Created APER encoded buffer for F1Reset\n");
for(idx=0; idx< encBufSize; idx++)
{
- printf("%x",encBuf[idx]);
+ DU_LOG("%x",encBuf[idx]);
}
}
if(SendF1APMsg(CU_APP_MEM_REG, CU_POOL) != ROK)
{
- DU_LOG("\nF1AP : Sending F1 Reset request failed");
+ DU_LOG("\nERROR --> F1AP : Sending F1 Reset request failed");
break;
}
/* Encode results */
if(encRetVal.encoded == ENCODE_FAIL)
{
- DU_LOG( "\n F1AP : Could not encode RRCContainer for DL-CCCH Msg(at %s)\n",\
+ DU_LOG( "\nERROR --> F1AP : Could not encode RRCContainer for DL-CCCH Msg(at %s)\n",\
encRetVal.failed_type ? encRetVal.failed_type->name : "unknown");
return RFAILED;
}
else
{
- DU_LOG("\n F1AP : Created APER encoded buffer for RRCContainer for DL-CCCH Msg\n");
+ DU_LOG("\nDEBUG --> F1AP : Created APER encoded buffer for RRCContainer for DL-CCCH Msg\n");
for(int i = 0; i< encBufSize; i++)
{
- printf("%x",encBuf[i]);
+ DU_LOG("%x",encBuf[i]);
}
rrcContainer->size = encBufSize;
CU_ALLOC(rrcContainer->buf, rrcContainer->size);
}
else
{
- DU_LOG("\nF1AP: Memory Alloc failed for RRC Setup Msg at fillDlCcchRrcMsg()");
+ DU_LOG("\nERROR --> F1AP: Memory Alloc failed for RRC Setup Msg at fillDlCcchRrcMsg()");
ret = RFAILED;
}
}
else
{
- DU_LOG("\nF1AP: Memory Alloc failed for RRC Msg at fillDlCcchRrcMsg()");
+ DU_LOG("\nERROR --> F1AP: Memory Alloc failed for RRC Msg at fillDlCcchRrcMsg()");
ret = RFAILED;
}
}
}
else
{
- DU_LOG("\nF1AP: RRC Container is NULLP at fillDlCcchRrcMsg()");
+ DU_LOG("\nERROR --> F1AP: RRC Container is NULLP at fillDlCcchRrcMsg()");
ret = RFAILED;
}
}
}
else
{
- DU_LOG("\nF1AP: Memory alloc failed at mappedQoS_FlowsToAdd in fillCnAssoc()");
+ DU_LOG("\nERROR --> F1AP: Memory alloc failed at mappedQoS_FlowsToAdd in fillCnAssoc()");
CU_FREE(cnAssoc->choice.sdap_Config, sizeof(SDAP_Config_t));
ret = RFAILED;
}
}
else
{
- DU_LOG("\nF1AP: Mem alloc failed at fillCnAssoc()");
+ DU_LOG("\nERROR --> F1AP: Mem alloc failed at fillCnAssoc()");
ret = RFAILED;
}
}
ret = fillDrbCfg(DRB1, rrcReconfigMsg->radioBearerConfig->drb_ToAddModList);
if(ret == RFAILED)
{
- DU_LOG("\n F1AP: Failed to fill DrbCfg at fillRrcReconfigIE()");
+ DU_LOG("\nERROR --> F1AP : Failed to fill DrbCfg at fillRrcReconfigIE()");
CU_FREE(rrcReconfigMsg->radioBearerConfig->srb_ToAddModList, sizeof(SRB_ToAddModList_t));
CU_FREE(rrcReconfigMsg->radioBearerConfig->drb_ToAddModList, sizeof(DRB_ToAddModList_t));
}
}
else
{
- DU_LOG("\n F1AP: memory Alloc failed at fillRrcReconfigIE()");
+ DU_LOG("\nERROR --> F1AP : memory Alloc failed at fillRrcReconfigIE()");
CU_FREE(rrcReconfigMsg->radioBearerConfig->srb_ToAddModList, sizeof(SRB_ToAddModList_t));
}
}
/* Encode results */
if(encRetVal.encoded == ENCODE_FAIL)
{
- DU_LOG( "\n F1AP : Could not encode RRCContainer for DL-DCCH Msg (at %s)\n",\
+ DU_LOG( "\nERROR --> F1AP : Could not encode RRCContainer for DL-DCCH Msg (at %s)\n",\
encRetVal.failed_type ? encRetVal.failed_type->name : "unknown");
return RFAILED;
}
else
{
- DU_LOG("\n F1AP : Created APER encoded buffer for RRCContainer for DL-DCCH Msg\n");
+ DU_LOG("\nDEBUG --> F1AP : Created APER encoded buffer for RRCContainer for DL-DCCH Msg\n");
for(int i = 0; i< encBufSize; i++)
{
- printf("%x",encBuf[i]);
+ DU_LOG("%x",encBuf[i]);
}
rrcContainer->size = encBufSize;
CU_ALLOC(rrcContainer->buf, rrcContainer->size);
}
else
{
- DU_LOG("\nF1AP: Failed to fill RrcReconfig IE at fillDlDcchRrcMsg()");
+ DU_LOG("\nERROR --> F1AP: Failed to fill RrcReconfig IE at fillDlDcchRrcMsg()");
}
}
else
{
- DU_LOG("\nF1AP: Memory Alloc failed for RRC Reconfig at fillDlDcchRrcMsg()");
+ DU_LOG("\nERROR --> F1AP: Memory Alloc failed for RRC Reconfig at fillDlDcchRrcMsg()");
ret = RFAILED;
}
}
else
{
- DU_LOG("\nF1AP: Memory Alloc failed for RRC Msg at fillDlDcchRrcMsg()");
+ DU_LOG("\nERROR --> F1AP: Memory Alloc failed for RRC Msg at fillDlDcchRrcMsg()");
ret = RFAILED;
}
}
else
{
- DU_LOG("\nF1AP: Memory Alloc failed for DL Dcch Msg choice at fillDlDcchRrcMsg()");
+ DU_LOG("\nERROR --> F1AP: Memory Alloc failed for DL Dcch Msg choice at fillDlDcchRrcMsg()");
ret = RFAILED;
}
}
else
{
- DU_LOG("\nF1AP: RRC Container is NULLP at fillDlDcchRrcMsg()");
+ DU_LOG("\nERROR --> F1AP: RRC Container is NULLP at fillDlDcchRrcMsg()");
ret = RFAILED;
}
return ret;
{
ret = fillDlCcchRrcMsg(rrcContainer);
if(ret == RFAILED)
- DU_LOG("\n F1AP: Failed to fill DL-CCCH Msg at RRC SETUP");
+ DU_LOG("\nERROR --> F1AP: Failed to fill DL-CCCH Msg at RRC SETUP");
}
else if(rrcMsgType == REGISTRATION_ACCEPT)
{
DLRRCMessageTransfer_t *dlRRCMsg = NULLP;
asn_enc_rval_t encRetVal; /* Encoder return value */
- DU_LOG("\n F1AP : Building DL RRC Message Transfer Message\n");
+ DU_LOG("\nINFO --> F1AP : Building DL RRC Message Transfer Message\n");
CU_ALLOC(f1apMsg, sizeof(F1AP_PDU_t));
if(f1apMsg == NULLP)
{
- DU_LOG(" F1AP : Memory allocation for F1AP-PDU failed");
+ DU_LOG("\nERROR --> F1AP : Memory allocation for F1AP-PDU failed");
return RFAILED;
}
sizeof(InitiatingMessage_t));
if(f1apMsg->choice.initiatingMessage == NULLP)
{
- DU_LOG(" F1AP : Memory allocation for F1AP-PDU failed");
+ DU_LOG("\nERROR --> F1AP : Memory allocation for F1AP-PDU failed");
CU_FREE(f1apMsg, sizeof(F1AP_PDU_t));
return RFAILED;
}
CU_ALLOC(dlRRCMsg->protocolIEs.list.array, dlRRCMsg->protocolIEs.list.size);
if(dlRRCMsg->protocolIEs.list.array == NULLP)
{
- DU_LOG(" F1AP : Memory allocation for DL RRC MessageTransferIEs failed");
+ DU_LOG("\nERROR --> F1AP : Memory allocation for DL RRC MessageTransferIEs failed");
CU_FREE(f1apMsg->choice.initiatingMessage, sizeof(InitiatingMessage_t));
CU_FREE(f1apMsg, sizeof(F1AP_PDU_t));
return RFAILED;
/* Encode results */
if(encRetVal.encoded == ENCODE_FAIL)
{
- DU_LOG( "\n F1AP : Could not encode DL RRC Message Transfer structure (at %s)\n",\
+ DU_LOG( "\nERROR --> F1AP : Could not encode DL RRC Message Transfer structure (at %s)\n",\
encRetVal.failed_type ? encRetVal.failed_type->name : "unknown");
return RFAILED;
}
else
{
- DU_LOG("\n F1AP : Created APER encoded buffer for DL RRC Message transfer\n");
+ DU_LOG("\nDEBUG --> F1AP : Created APER encoded buffer for DL RRC Message transfer\n");
for(int i=0; i< encBufSize; i++)
{
- printf("%x",encBuf[i]);
+ DU_LOG("%x",encBuf[i]);
}
}
/* Sending msg */
if(SendF1APMsg(CU_APP_MEM_REG,CU_POOL) != ROK)
{
- DU_LOG("\n F1AP : Sending DL RRC Message Transfer Failed");
+ DU_LOG("\nERROR --> F1AP : Sending DL RRC Message Transfer Failed");
return RFAILED;
}
uint8_t idx, rrcMsgType;
uint8_t ret =ROK;
InitialULRRCMessageTransfer_t *initULRRCMsg = NULLP;
- DU_LOG("\n filling the required values in DB in procInitULRRCMsg");
+ DU_LOG("\nINFO --> F1AP : filling the required values in DB in procInitULRRCMsg");
initULRRCMsg = &f1apMsg->choice.initiatingMessage->value.choice.InitialULRRCMessageTransfer;
.DUtoCURRCContainer.size > 0) && (initULRRCMsg->protocolIEs\
.list.array[idx]->value.choice.DUtoCURRCContainer.buf != NULLP))
{
- DU_LOG("\n Received Du to Cu RRC Container ");
+ DU_LOG("\nINFO --> Received Du to Cu RRC Container ");
f1apMsgDb.duToCuContainer.size = initULRRCMsg->protocolIEs\
.list.array[idx]->value.choice.DUtoCURRCContainer.size;
CU_ALLOC(f1apMsgDb.duToCuContainer.buf, \
}
else
{
- DU_LOG("\n Failed to receive Du to Cu RRC Container ");
+ DU_LOG("\nERROR --> Failed to receive Du to Cu RRC Container ");
ret = RFAILED;
}
break;
}
default:
- DU_LOG("\n Invalid Event %ld", initULRRCMsg->protocolIEs.list.array[idx]->id);
+ DU_LOG("\nERROR --> Invalid Event %ld", initULRRCMsg->protocolIEs.list.array[idx]->id);
break;
}
}
}
break;
default:
- printf("\nF1AP: Invalid event type %ld", ueSetReq->protocolIEs.list.array[idx]->id);
+ DU_LOG("\nERROR --> F1AP: Invalid event type %ld", ueSetReq->protocolIEs.list.array[idx]->id);
}
}
break;
CU_ALLOC(controlRSetList->list.array, controlRSetList->list.size);
if(!controlRSetList->list.array)
{
- DU_LOG("\nF1AP : Memory allocation failed in BuildControlRSetToAddModList");
+ DU_LOG("\nERROR --> F1AP : Memory allocation failed in BuildControlRSetToAddModList");
return RFAILED;
}
CU_ALLOC(controlRSetList->list.array[idx], sizeof(struct ControlResourceSet));
if(!controlRSetList->list.array[idx])
{
- DU_LOG("\nF1AP : Memory allocation failed in BuildControlRSetToAddModList");
+ DU_LOG("\nERROR --> F1AP : Memory allocation failed in BuildControlRSetToAddModList");
return RFAILED;
}
}
controlRSet->frequencyDomainResources.size);
if(!controlRSet->frequencyDomainResources.buf)
{
- DU_LOG("\nF1AP : Memory allocation failed in BuildControlRSetToAddModList");
+ DU_LOG("\nERROR --> F1AP : Memory allocation failed in BuildControlRSetToAddModList");
return RFAILED;
}
sizeof(struct ControlResourceSet__tci_StatesPDCCH_ToAddList));
if(!controlRset->tci_StatesPDCCH_ToAddList)
{
- DU_LOG("\nF1AP : Memory allocation failed in BuildControlRSetToAddModList");
+ DU_LOG("\nERROR --> F1AP : Memory allocation failed in BuildControlRSetToAddModList");
return RFAILED;
}
controlRset->tci_StatesPDCCH_ToAddList->list.size)
if(!controlRset->tci_StatesPDCCH_ToAddList->list.array)
{
- DU_LOG("\nF1AP : Memory allocation failed in BuildControlRSetToAddModList");
+ DU_LOG("\nERROR --> F1AP : Memory allocation failed in BuildControlRSetToAddModList");
return RFAILED;
}
CU_ALLOC(controlRset->tci_StatesPDCCH_ToAddList->list.array[tciStateIdx], sizeof(TCI_StateId_t));
if(!controlRset->tci_StatesPDCCH_ToAddList->list.array[tciStateIdx])
{
- DU_LOG("\nF1AP : Memory allocation failed in BuildControlRSetToAddModList");
+ DU_LOG("\nERROR --> F1AP : Memory allocation failed in BuildControlRSetToAddModList");
return RFAILED;
}
}
CU_ALLOC(controlRset->tci_PresentInDCI, sizeof(long));
if(!controlRset->tci_PresentInDCI)
{
- DU_LOG("\nF1AP : Memory allocation failed in BuildControlRSetToAddModList");
+ DU_LOG("\nERROR --> F1AP : Memory allocation failed in BuildControlRSetToAddModList");
return RFAILED;
}
/* TODO */
CU_ALLOC(controlRSet->pdcch_DMRS_ScramblingID, sizeof(long));
if(!controlRSet->pdcch_DMRS_ScramblingID)
{
- DU_LOG("\nF1AP : Memory allocation failed in BuildControlRSetToAddModList");
+ DU_LOG("\nERROR --> F1AP : Memory allocation failed in BuildControlRSetToAddModList");
return RFAILED;
}
*(controlRSet->pdcch_DMRS_ScramblingID) = SCRAMBLING_ID;
CU_ALLOC(searchSpcList->list.array, searchSpcList->list.size);
if(!searchSpcList->list.array)
{
- DU_LOG("\nF1AP : Memory allocation failed in BuildSearchSpcToAddModList");
+ DU_LOG("\nERROR --> F1AP : Memory allocation failed in BuildSearchSpcToAddModList");
return RFAILED;
}
CU_ALLOC(searchSpcList->list.array[idx], sizeof(struct SearchSpace));
if(!searchSpcList->list.array[idx])
{
- DU_LOG("\nF1AP : Memory allocation failed in BuildSearchSpcToAddModList");
+ DU_LOG("\nERROR --> F1AP : Memory allocation failed in BuildSearchSpcToAddModList");
return RFAILED;
}
}
CU_ALLOC(searchSpc->controlResourceSetId, sizeof(ControlResourceSetId_t));
if(!searchSpc->controlResourceSetId)
{
- DU_LOG("\nF1AP : Memory allocation failed in BuildSearchSpcToAddModList");
+ DU_LOG("\nERROR --> F1AP : Memory allocation failed in BuildSearchSpcToAddModList");
return RFAILED;
}
*(searchSpc->controlResourceSetId) = PDCCH_CTRL_RSRC_SET_ONE_ID;
sizeof(struct SearchSpace__monitoringSlotPeriodicityAndOffset));
if(!searchSpc->monitoringSlotPeriodicityAndOffset)
{
- DU_LOG("\nF1AP : Memory allocation failed in BuildSearchSpcToAddModList");
+ DU_LOG("\nERROR --> F1AP : Memory allocation failed in BuildSearchSpcToAddModList");
return RFAILED;
}
searchSpc->monitoringSlotPeriodicityAndOffset->present = \
CU_ALLOC(searchSpc->monitoringSymbolsWithinSlot, sizeof(BIT_STRING_t));
if(!searchSpc->monitoringSymbolsWithinSlot)
{
- DU_LOG("\nF1AP : Memory allocation failed in BuildSearchSpcToAddModList");
+ DU_LOG("\nERROR --> F1AP : Memory allocation failed in BuildSearchSpcToAddModList");
return RFAILED;
}
searchSpc->monitoringSymbolsWithinSlot->size);
if(!searchSpc->monitoringSymbolsWithinSlot->buf)
{
- DU_LOG("\nF1AP : Memory allocation failed in BuildSearchSpcToAddModList");
+ DU_LOG("\nERROR --> F1AP : Memory allocation failed in BuildSearchSpcToAddModList");
return RFAILED;
}
CU_ALLOC(searchSpc->nrofCandidates, sizeof(struct SearchSpace__nrofCandidates));
if(!searchSpc->nrofCandidates)
{
- DU_LOG("\nF1AP : Memory allocation failed in BuildSearchSpcToAddModList");
+ DU_LOG("\nERROR --> F1AP : Memory allocation failed in BuildSearchSpcToAddModList");
return RFAILED;
}
CU_ALLOC(searchSpc->searchSpaceType, sizeof(struct SearchSpace__searchSpaceType));
if(!searchSpc->searchSpaceType)
{
- DU_LOG("\nF1AP : Memory allocation failed in BuildSearchSpcToAddModList");
+ DU_LOG("\nERROR --> F1AP : Memory allocation failed in BuildSearchSpcToAddModList");
return RFAILED;
}
sizeof(struct SearchSpace__searchSpaceType__ue_Specific));
if(!searchSpc->searchSpaceType->choice.ue_Specific)
{
- DU_LOG("\nF1AP : Memory allocation failed in BuildSearchSpcToAddModList");
+ DU_LOG("\nERROR --> F1AP : Memory allocation failed in BuildSearchSpcToAddModList");
return RFAILED;
}
searchSpc->searchSpaceType->choice.ue_Specific->dci_Formats = \
sizeof(struct PDCCH_Config__controlResourceSetToAddModList));
if(!pdcchCfg->controlResourceSetToAddModList)
{
- DU_LOG("\nF1AP : Memory allocation failed in BuildBWPDlDedPdcchCfg");
+ DU_LOG("\nERROR --> F1AP : Memory allocation failed in BuildBWPDlDedPdcchCfg");
return RFAILED;
}
sizeof(struct PDCCH_Config__searchSpacesToAddModList));
if(!pdcchCfg->searchSpacesToAddModList)
{
- DU_LOG("\nF1AP : Memory allocation failed in BuildBWPDlDedPdcchCfg");
+ DU_LOG("\nERROR --> F1AP : Memory allocation failed in BuildBWPDlDedPdcchCfg");
return RFAILED;
}
CU_ALLOC(dmrsDlCfg->choice.setup, sizeof(struct DMRS_DownlinkConfig));
if(!dmrsDlCfg->choice.setup)
{
- DU_LOG("\nF1AP : Memory allocation failed in BuildBWPDlDedPdschCfg");
+ DU_LOG("\nERROR --> F1AP : Memory allocation failed in BuildBWPDlDedPdschCfg");
return RFAILED;
}
CU_ALLOC(dmrsDlCfg->choice.setup->dmrs_AdditionalPosition, sizeof(long));
if(!dmrsDlCfg->choice.setup->dmrs_AdditionalPosition)
{
- DU_LOG("\nF1AP : Memory allocation failed in BuildDMRSDLPdschMapTypeA");
+ DU_LOG("\nERROR --> F1AP : Memory allocation failed in BuildDMRSDLPdschMapTypeA");
return RFAILED;
}
*(dmrsDlCfg->choice.setup->dmrs_AdditionalPosition) = DMRS_ADDITIONAL_POS;
sizeof(struct PDSCH_TimeDomainResourceAllocationList));
if(!timeDomAllocList->choice.setup)
{
- DU_LOG("\nF1AP : Memory allocation failed in BuildPdschTimeDomAllocList");
+ DU_LOG("\nERROR --> F1AP : Memory allocation failed in BuildPdschTimeDomAllocList");
return RFAILED;
}
timeDomAllocList->choice.setup->list.size);
if(!timeDomAllocList->choice.setup->list.array)
{
- DU_LOG("\nF1AP : Memory allocation failed in BuildPdschTimeDomAllocList");
+ DU_LOG("\nERROR --> F1AP : Memory allocation failed in BuildPdschTimeDomAllocList");
return RFAILED;
}
sizeof(struct PDSCH_TimeDomainResourceAllocation));
if(!timeDomAllocList->choice.setup->list.array[idx])
{
- DU_LOG("\nF1AP : Memory allocation failed in BuildPdschTimeDomAllocList");
+ DU_LOG("\nERROR --> F1AP : Memory allocation failed in BuildPdschTimeDomAllocList");
return RFAILED;
}
}
sizeof(struct PDSCH_Config__prb_BundlingType__staticBundling));
if(!prbBndlType->choice.staticBundling)
{
- DU_LOG("\nF1AP : Memory allocation failed in BuildPdschPrbBundlingType");
+ DU_LOG("\nERROR --> F1AP : Memory allocation failed in BuildPdschPrbBundlingType");
return RFAILED;
}
prbBndlType->choice.staticBundling->bundleSize = NULLP;
sizeof(struct PDSCH_Config__dmrs_DownlinkForPDSCH_MappingTypeA));
if(!pdschCfg->dmrs_DownlinkForPDSCH_MappingTypeA)
{
- DU_LOG("\nF1AP : Memory allocation failed in BuildBWPDlDedPdschCfg");
+ DU_LOG("\nERROR --> F1AP : Memory allocation failed in BuildBWPDlDedPdschCfg");
return RFAILED;
}
CU_ALLOC(pdschCfg->tci_StatesToAddModList, sizeof(struct PDSCH_Config__tci_StatesToAddModList));
if(!pdschCfg->tci_StatesToAddModList)
{
- DU_LOG("\nF1AP : Memory allocation failed in BuildBWPDlDedPdschCfg");
+ DU_LOG("\nERROR --> F1AP : Memory allocation failed in BuildBWPDlDedPdschCfg");
return RFAILED;
}
if(BuildTCIStatesToAddModList(pdschCfg->tci_StatesToAddModList) != ROK)
sizeof(struct PDSCH_Config__pdsch_TimeDomainAllocationList));
if(!pdschCfg->pdsch_TimeDomainAllocationList)
{
- DU_LOG("\nF1AP : Memory allocation failed in BuildBWPDlDedPdschCfg");
+ DU_LOG("\nERROR --> F1AP : Memory allocation failed in BuildBWPDlDedPdschCfg");
return RFAILED;
}
if(BuildPdschTimeDomAllocList(pdschCfg->pdsch_TimeDomainAllocationList) != ROK)
CU_ALLOC(pdschCfg->maxNrofCodeWordsScheduledByDCI, sizeof(long));
if(!pdschCfg->maxNrofCodeWordsScheduledByDCI)
{
- DU_LOG("\nF1AP : Memory allocation failed in BuildBWPDlDedPdschCfg");
+ DU_LOG("\nERROR --> F1AP : Memory allocation failed in BuildBWPDlDedPdschCfg");
return RFAILED;
}
*(pdschCfg->maxNrofCodeWordsScheduledByDCI) = PDSCH_MAX_CODEWORD_SCH_BY_DCI;
CU_ALLOC(dlBwp->pdcch_Config, sizeof(struct BWP_DownlinkDedicated__pdcch_Config));
if(!dlBwp->pdcch_Config)
{
- DU_LOG("\nF1AP : Memory Allocation failure in BuildInitialDlBWP");
+ DU_LOG("\nERROR --> F1AP : Memory Allocation failure in BuildInitialDlBWP");
return RFAILED;
}
dlBwp->pdcch_Config->present = BWP_DownlinkDedicated__pdcch_Config_PR_setup;
CU_ALLOC(dlBwp->pdcch_Config->choice.setup, sizeof(struct PDCCH_Config));
if(!dlBwp->pdcch_Config->choice.setup)
{
- DU_LOG("\nF1AP : Memory Allocation failure in BuildInitialDlBWP");
+ DU_LOG("\nERROR --> F1AP : Memory Allocation failure in BuildInitialDlBWP");
return RFAILED;
}
if(BuildBWPDlDedPdcchCfg(dlBwp->pdcch_Config->choice.setup) != ROK)
CU_ALLOC(dlBwp->pdsch_Config, sizeof(struct BWP_DownlinkDedicated__pdsch_Config));
if(!dlBwp->pdsch_Config)
{
- DU_LOG("\nF1AP : Memory Allocation failure in BuildInitialDlBWP");
+ DU_LOG("\nERROR --> F1AP : Memory Allocation failure in BuildInitialDlBWP");
return RFAILED;
}
dlBwp->pdsch_Config->present = BWP_DownlinkDedicated__pdsch_Config_PR_setup;
CU_ALLOC(dlBwp->pdsch_Config->choice.setup, sizeof(struct PDSCH_Config));
if(!dlBwp->pdsch_Config->choice.setup)
{
- DU_LOG("\nF1AP : Memory Allocation failure in BuildInitialDlBWP");
+ DU_LOG("\nERROR --> F1AP : Memory Allocation failure in BuildInitialDlBWP");
return RFAILED;
}
CU_ALLOC(dmrsUlCfg->choice.setup, sizeof(DMRS_UplinkConfig_t));
if(!dmrsUlCfg->choice.setup)
{
- DU_LOG("\nF1AP : Memory allocation failed in BuildDMRSULPuschMapTypeA");
+ DU_LOG("\nERROR --> F1AP : Memory allocation failed in BuildDMRSULPuschMapTypeA");
return RFAILED;
}
CU_ALLOC(dmrsUlCfg->choice.setup->dmrs_AdditionalPosition, sizeof(long));
if(!dmrsUlCfg->choice.setup->dmrs_AdditionalPosition)
{
- DU_LOG("\nF1AP : Memory allocation failed in BuildDMRSULPuschMapTypeA");
+ DU_LOG("\nERROR --> F1AP : Memory allocation failed in BuildDMRSULPuschMapTypeA");
return RFAILED;
}
*(dmrsUlCfg->choice.setup->dmrs_AdditionalPosition) = DMRS_ADDITIONAL_POS;
sizeof(struct DMRS_UplinkConfig__transformPrecodingDisabled));
if(!dmrsUlCfg->choice.setup->transformPrecodingDisabled)
{
- DU_LOG("\nF1AP : Memory allocation failed in BuildDMRSULPuschMapTypeA");
+ DU_LOG("\nERROR --> F1AP : Memory allocation failed in BuildDMRSULPuschMapTypeA");
return RFAILED;
}
sizeof(long));
if(!dmrsUlCfg->choice.setup->transformPrecodingDisabled->scramblingID0)
{
- DU_LOG("\nF1AP : Memory allocation failed in BuildDMRSULPuschMapTypeA");
+ DU_LOG("\nERROR --> F1AP : Memory allocation failed in BuildDMRSULPuschMapTypeA");
return RFAILED;
}
*(dmrsUlCfg->choice.setup->transformPrecodingDisabled->scramblingID0) = SCRAMBLING_ID;
sizeof(struct PUSCH_TimeDomainResourceAllocationList));
if(!timeDomAllocList->choice.setup)
{
- DU_LOG("\nF1AP : Memory allocation failed in BuildPuschTimeDomAllocList");
+ DU_LOG("\nERROR --> F1AP : Memory allocation failed in BuildPuschTimeDomAllocList");
return RFAILED;
}
timeDomAllocList->choice.setup->list.size);
if(!timeDomAllocList->choice.setup->list.array)
{
- DU_LOG("\nF1AP : Memory allocation failed in BuildPuschTimeDomAllocList");
+ DU_LOG("\nERROR --> F1AP : Memory allocation failed in BuildPuschTimeDomAllocList");
return RFAILED;
}
sizeof(PUSCH_TimeDomainResourceAllocation_t));
if(!timeDomAllocList->choice.setup->list.array[idx])
{
- DU_LOG("\nF1AP : Memory allocation failed in BuildPuschTimeDomAllocList");
+ DU_LOG("\nERROR --> F1AP : Memory allocation failed in BuildPuschTimeDomAllocList");
return RFAILED;
}
}
CU_ALLOC(timeDomAlloc->k2, sizeof(long));
if(!timeDomAlloc->k2)
{
- DU_LOG("\nF1AP : Memory allocation failed in BuildPuschTimeDomAllocList");
+ DU_LOG("\nERROR --> F1AP : Memory allocation failed in BuildPuschTimeDomAllocList");
return RFAILED;
}
*(timeDomAlloc->k2) = PUSCH_K2;
CU_ALLOC(puschCfg->dataScramblingIdentityPUSCH, sizeof(long));
if(!puschCfg->dataScramblingIdentityPUSCH)
{
- DU_LOG("\nF1AP: Memory allocation failed in BuildBWPUlDedPuschCfg");
+ DU_LOG("\nERROR --> F1AP : Memory allocation failed in BuildBWPUlDedPuschCfg");
return RFAILED;
}
*(puschCfg->dataScramblingIdentityPUSCH) = SCRAMBLING_ID;
sizeof(struct PUSCH_Config__dmrs_UplinkForPUSCH_MappingTypeA));
if(!puschCfg->dmrs_UplinkForPUSCH_MappingTypeA)
{
- DU_LOG("\nF1AP: Memory allocation failed in BuildBWPUlDedPuschCfg");
+ DU_LOG("\nERROR --> F1AP : Memory allocation failed in BuildBWPUlDedPuschCfg");
return RFAILED;
}
sizeof(struct PUSCH_Config__pusch_TimeDomainAllocationList));
if(!puschCfg->pusch_TimeDomainAllocationList)
{
- DU_LOG("\nF1AP: Memory allocation failed in BuildBWPUlDedPuschCfg");
+ DU_LOG("\nERROR --> F1AP : Memory allocation failed in BuildBWPUlDedPuschCfg");
return RFAILED;
}
CU_ALLOC(puschCfg->transformPrecoder, sizeof(long));
if(!puschCfg->transformPrecoder)
{
- DU_LOG("\nF1AP: Memory allocation failed in BuildBWPUlDedPuschCfg");
+ DU_LOG("\nERROR --> F1AP : Memory allocation failed in BuildBWPUlDedPuschCfg");
return RFAILED;
}
*(puschCfg->transformPrecoder) = PUSCH_TRANSFORM_PRECODER;
CU_ALLOC(resourceList->list.array, resourceList->list.size);
if(!resourceList->list.array)
{
- DU_LOG("\nF1AP: Memory allocation failed in BuildSrsRsrcAddModList");
+ DU_LOG("\nERROR --> F1AP: Memory allocation failed in BuildSrsRsrcAddModList");
return RFAILED;
}
CU_ALLOC(resourceList->list.array[rsrcIdx], sizeof(SRS_Resource_t));
if(!resourceList->list.array[rsrcIdx])
{
- DU_LOG("\nF1AP: Memory allocation failed in BuildSrsRsrcAddModList");
+ DU_LOG("\nERROR --> F1AP: Memory allocation failed in BuildSrsRsrcAddModList");
return RFAILED;
}
}
sizeof(struct SRS_Resource__transmissionComb__n2));
if(!resourceList->list.array[rsrcIdx]->transmissionComb.choice.n2)
{
- DU_LOG("\nF1AP: Memory allocation failed in BuildSrsRsrcAddModList");
+ DU_LOG("\nERROR --> F1AP: Memory allocation failed in BuildSrsRsrcAddModList");
return RFAILED;
}
resourceList->list.array[rsrcIdx]->transmissionComb.choice.n2->combOffset_n2\
sizeof(struct SRS_Resource__resourceType__aperiodic));
if(!resourceList->list.array[rsrcIdx]->resourceType.choice.aperiodic)
{
- DU_LOG("\nF1AP: Memory allocation failed in BuildSrsRsrcAddModList");
+ DU_LOG("\nERROR --> F1AP: Memory allocation failed in BuildSrsRsrcAddModList");
return RFAILED;
}
resourceList->list.array[rsrcIdx]->sequenceId = SRS_SEQ_ID;
CU_ALLOC(rsrcSetList->list.array, rsrcSetList->list.size);
if(!rsrcSetList->list.array)
{
- DU_LOG("\nF1AP: Memory allocation failed in BuildSrsRsrcSetAddModList");
+ DU_LOG("\nERROR --> F1AP: Memory allocation failed in BuildSrsRsrcSetAddModList");
return RFAILED;
}
CU_ALLOC(rsrcSetList->list.array[rSetIdx], sizeof(SRS_ResourceSet_t));
if(!rsrcSetList->list.array[rSetIdx])
{
- DU_LOG("\nF1AP: Memory allocation failed in BuildSrsRsrcSetAddModList");
+ DU_LOG("\nERROR --> F1AP: Memory allocation failed in BuildSrsRsrcSetAddModList");
return RFAILED;
}
}
sizeof(struct SRS_ResourceSet__srs_ResourceIdList));
if(!rsrcSetList->list.array[rSetIdx]->srs_ResourceIdList)
{
- DU_LOG("\nF1AP: Memory allocation failed in BuildSrsRsrcSetAddModList");
+ DU_LOG("\nERROR --> F1AP : Memory allocation failed in BuildSrsRsrcSetAddModList");
return RFAILED;
}
CU_ALLOC(rsrcIdList->list.array, rsrcIdList->list.size);
if(!rsrcIdList->list.array)
{
- DU_LOG("\nF1AP: Memory allocation failed in BuildSrsRsrcSetAddModList");
+ DU_LOG("\nERROR --> F1AP: Memory allocation failed in BuildSrsRsrcSetAddModList");
return RFAILED;
}
CU_ALLOC(rsrcIdList->list.array[rsrcIdx], sizeof(SRS_ResourceId_t));
if(!rsrcIdList->list.array[rsrcIdx])
{
- DU_LOG("\nF1AP: Memory allocation failed in BuildSrsRsrcSetAddModList");
+ DU_LOG("\nERROR --> F1AP: Memory allocation failed in BuildSrsRsrcSetAddModList");
return RFAILED;
}
}
sizeof(struct SRS_ResourceSet__resourceType__aperiodic));
if(!rsrcSetList->list.array[rSetIdx]->resourceType.choice.aperiodic)
{
- DU_LOG("\nF1AP: Memory allocation failed in BuildSrsRsrcSetAddModList");
+ DU_LOG("\nERROR --> F1AP: Memory allocation failed in BuildSrsRsrcSetAddModList");
return RFAILED;
}
rsrcSetList->list.array[rSetIdx]->resourceType.choice.aperiodic->aperiodicSRS_ResourceTrigger \
sizeof(struct SRS_Config__srs_ResourceSetToAddModList));
if(!srsCfg->srs_ResourceSetToAddModList)
{
- DU_LOG("\nF1AP: Memory allocation failed in BuildBWPUlDedSrsCfg");
+ DU_LOG("\nERROR --> F1AP: Memory allocation failed in BuildBWPUlDedSrsCfg");
return RFAILED;
}
if(BuildSrsRsrcSetAddModList(srsCfg->srs_ResourceSetToAddModList) != ROK)
sizeof(struct SRS_Config__srs_ResourceToAddModList));
if(!srsCfg->srs_ResourceToAddModList)
{
- DU_LOG("\nF1AP: Memory allocation failed in BuildBWPUlDedSrsCfg");
+ DU_LOG("\nERROR --> F1AP: Memory allocation failed in BuildBWPUlDedSrsCfg");
return RFAILED;
}
CU_ALLOC(ulBwp->pusch_Config, sizeof(struct BWP_UplinkDedicated__pusch_Config));
if(!ulBwp->pusch_Config)
{
- DU_LOG("\nF1AP : Memory allocation failed in BuildInitialUlBWP");
+ DU_LOG("\nERROR --> F1AP : Memory allocation failed in BuildInitialUlBWP");
return RFAILED;
}
CU_ALLOC(ulBwp->pusch_Config->choice.setup, sizeof(PUSCH_Config_t));
if(!ulBwp->pusch_Config->choice.setup)
{
- DU_LOG("\nF1AP : Memory allocation failed in BuildInitialUlBWP");
+ DU_LOG("\nERROR --> F1AP : Memory allocation failed in BuildInitialUlBWP");
return RFAILED;
}
CU_ALLOC(ulBwp->srs_Config, sizeof(struct BWP_UplinkDedicated__srs_Config));
if(!ulBwp->srs_Config)
{
- DU_LOG("\nF1AP : Memory allocation failed in BuildInitialUlBWP");
+ DU_LOG("\nERROR --> F1AP : Memory allocation failed in BuildInitialUlBWP");
return RFAILED;
}
CU_ALLOC(ulBwp->srs_Config->choice.setup, sizeof(SRS_Config_t));
if(!ulBwp->srs_Config->choice.setup)
{
- DU_LOG("\nF1AP : Memory allocation failed in BuildInitialUlBWP");
+ DU_LOG("\nERROR --> F1AP : Memory allocation failed in BuildInitialUlBWP");
return RFAILED;
}
CU_ALLOC(puschCfg->choice.setup, sizeof(struct PUSCH_ServingCellConfig));
if(!puschCfg->choice.setup)
{
- DU_LOG("\nF1AP : Memory allocation failed in BuildPuschSrvCellCfg");
+ DU_LOG("\nERROR --> F1AP : Memory allocation failed in BuildPuschSrvCellCfg");
return RFAILED;
}
CU_ALLOC(puschCfg->choice.setup->ext1, sizeof(struct PUSCH_ServingCellConfig__ext1));
if(!puschCfg->choice.setup->ext1)
{
- DU_LOG("\nF1AP : Memory allocation failed in BuildPuschSrvCellCfg");
+ DU_LOG("\nERROR --> F1AP : Memory allocation failed in BuildPuschSrvCellCfg");
return RFAILED;
}
CU_ALLOC(puschCfg->choice.setup->ext1->maxMIMO_Layers, sizeof(long));
if(!puschCfg->choice.setup->ext1->maxMIMO_Layers)
{
- DU_LOG("\nF1AP : Memory allocation failed in BuildPuschSrvCellCfg");
+ DU_LOG("\nERROR --> F1AP : Memory allocation failed in BuildPuschSrvCellCfg");
return RFAILED;
}
*(puschCfg->choice.setup->ext1->maxMIMO_Layers) = PUSCH_MAX_MIMO_LAYERS;
CU_ALLOC(puschCfg->choice.setup->ext1->processingType2Enabled,sizeof(BOOLEAN_t));
if(!puschCfg->choice.setup->ext1->processingType2Enabled)
{
- DU_LOG("\nF1AP : Memory allocation failed in BuildPuschSrvCellCfg");
+ DU_LOG("\nERROR --> F1AP : Memory allocation failed in BuildPuschSrvCellCfg");
return RFAILED;
}
*(puschCfg->choice.setup->ext1->processingType2Enabled) = PUSCH_PROCESS_TYPE2_ENABLED;
CU_ALLOC(ulCfg->initialUplinkBWP, sizeof(BWP_UplinkDedicated_t));
if(!ulCfg->initialUplinkBWP)
{
- DU_LOG("\nF1AP : Memory Allocation failed in BuildUlCfg");
+ DU_LOG("\nERROR --> F1AP : Memory Allocation failed in BuildUlCfg");
return RFAILED;
}
CU_ALLOC(ulCfg->firstActiveUplinkBWP_Id, sizeof(BWP_Id_t));
if(!ulCfg->firstActiveUplinkBWP_Id)
{
- DU_LOG("\nF1AP : Memory Allocation failed in BuildUlCfg");
+ DU_LOG("\nERROR --> F1AP : Memory Allocation failed in BuildUlCfg");
return RFAILED;
}
*(ulCfg->firstActiveUplinkBWP_Id) = ACTIVE_UL_BWP_ID;
sizeof(struct UplinkConfig__pusch_ServingCellConfig));
if(!ulCfg->pusch_ServingCellConfig)
{
- DU_LOG("\nF1AP : Memory Allocation failed in BuildUlCfg");
+ DU_LOG("\nERROR --> F1AP : Memory Allocation failed in BuildUlCfg");
return RFAILED;
}
CU_ALLOC(pdschCfg->choice.setup, sizeof( struct PDSCH_ServingCellConfig));
if(!pdschCfg->choice.setup)
{
- DU_LOG("\nF1AP : Memory allocation failed in BuildPdschSrvCellCfg");
+ DU_LOG("\nERROR --> F1AP : Memory allocation failed in BuildPdschSrvCellCfg");
return RFAILED;
}
CU_ALLOC(pdschCfg->choice.setup->nrofHARQ_ProcessesForPDSCH, sizeof(long));
if(!pdschCfg->choice.setup->nrofHARQ_ProcessesForPDSCH)
{
- DU_LOG("\nF1AP : Memory allocation failed in BuildPdschSrvCellCfg");
+ DU_LOG("\nERROR --> F1AP : Memory allocation failed in BuildPdschSrvCellCfg");
return RFAILED;
}
*(pdschCfg->choice.setup->nrofHARQ_ProcessesForPDSCH)= PDSCH_NUM_HARQ_PROC;
CU_ALLOC(srvCellCfg->initialDownlinkBWP, sizeof(BWP_DownlinkDedicated_t));
if(!srvCellCfg->initialDownlinkBWP)
{
- DU_LOG("\nF1AP : Memory allocation failure in BuildSpCellCfgDed");
+ DU_LOG("\nERROR --> F1AP : Memory allocation failure in BuildSpCellCfgDed");
return RFAILED;
}
if(BuildInitialDlBWP(srvCellCfg->initialDownlinkBWP) != ROK)
{
- DU_LOG("\nF1AP : BuildInitialDlBWP failed");
+ DU_LOG("\nERROR --> F1AP : BuildInitialDlBWP failed");
return RFAILED;
}
srvCellCfg->downlinkBWP_ToReleaseList = NULLP;
CU_ALLOC(srvCellCfg->firstActiveDownlinkBWP_Id, sizeof(long));
if(!srvCellCfg->firstActiveDownlinkBWP_Id)
{
- DU_LOG("\nF1AP : Memory allocation failure in BuildSpCellCfgDed");
+ DU_LOG("\nERROR --> F1AP : Memory allocation failure in BuildSpCellCfgDed");
return RFAILED;
}
*(srvCellCfg->firstActiveDownlinkBWP_Id) = ACTIVE_DL_BWP_ID;
CU_ALLOC(srvCellCfg->defaultDownlinkBWP_Id, sizeof(long));
if(!srvCellCfg->defaultDownlinkBWP_Id)
{
- DU_LOG("\nF1AP : Memory allocation failure in BuildSpCellCfgDed");
+ DU_LOG("\nERROR --> F1AP : Memory allocation failure in BuildSpCellCfgDed");
return RFAILED;
}
*(srvCellCfg->defaultDownlinkBWP_Id) = ACTIVE_DL_BWP_ID;
CU_ALLOC(srvCellCfg->uplinkConfig, sizeof(UplinkConfig_t));
if(!srvCellCfg->uplinkConfig)
{
- DU_LOG("\nF1AP : Memory allocation failure in BuildSpCellCfgDed");
+ DU_LOG("\nERROR --> F1AP : Memory allocation failure in BuildSpCellCfgDed");
return RFAILED;
}
if(BuildUlCfg(srvCellCfg->uplinkConfig) != ROK)
{
- DU_LOG("\nF1AP : BuildUlCfg failed");
+ DU_LOG("\nERROR --> F1AP : BuildUlCfg failed");
return RFAILED;
}
srvCellCfg->supplementaryUplink = NULLP;
CU_ALLOC(srvCellCfg->pdsch_ServingCellConfig, sizeof(struct ServingCellConfig__pdsch_ServingCellConfig));
if(!srvCellCfg->pdsch_ServingCellConfig)
{
- DU_LOG("\nF1AP : Memory allocation failure in BuildSpCellCfgDed");
+ DU_LOG("\nERROR --> F1AP : Memory allocation failure in BuildSpCellCfgDed");
return RFAILED;
}
if(BuildPdschSrvCellCfg(srvCellCfg->pdsch_ServingCellConfig) != ROK)
{
- DU_LOG("\nF1AP : BuildPdschSrvCellCfg failed");
+ DU_LOG("\nERROR --> F1AP : BuildPdschSrvCellCfg failed");
return RFAILED;
}
CU_ALLOC(srvCellCfg->csi_MeasConfig, sizeof(struct ServingCellConfig__csi_MeasConfig))
if(!srvCellCfg->csi_MeasConfig)
{
- DU_LOG("\nF1AP : Memory allocation failure in BuildSpCellCfgDed");
+ DU_LOG("\nERROR --> F1AP : Memory allocation failure in BuildSpCellCfgDed");
return RFAILED;
}
CU_ALLOC(spCellCfg->servCellIndex, sizeof(long));
if(!spCellCfg->servCellIndex)
{
- DU_LOG("\nF1AP : Memory allocation failure in BuildSpCellCfg");
+ DU_LOG("\nERROR --> F1AP : Memory allocation failure in BuildSpCellCfg");
return RFAILED;
}
*(spCellCfg->servCellIndex) = SERV_CELL_IDX;
CU_ALLOC(spCellCfg->rlmInSyncOutOfSyncThreshold, sizeof(long));
if(!spCellCfg->rlmInSyncOutOfSyncThreshold)
{
- DU_LOG("\nF1AP : Memory allocation failure in BuildSpCellCfg");
+ DU_LOG("\nERROR --> F1AP : Memory allocation failure in BuildSpCellCfg");
return RFAILED;
}
*(spCellCfg->rlmInSyncOutOfSyncThreshold) = RLM_SYNC_OUT_SYNC_THRESHOLD;
CU_ALLOC(spCellCfg->spCellConfigDedicated, sizeof(ServingCellConfig_t));
if(!spCellCfg->spCellConfigDedicated)
{
- DU_LOG("\nF1AP : Memory allocation failure in BuildSpCellCfg");
+ DU_LOG("\nERROR --> F1AP : Memory allocation failure in BuildSpCellCfg");
return RFAILED;
}
if(BuildSpCellCfgDed(spCellCfg->spCellConfigDedicated) != ROK)
{
- DU_LOG("\nF1AP : BuildSpCellCfgDed failed");
+ DU_LOG("\nERROR --> F1AP : BuildSpCellCfgDed failed");
return RFAILED;
}
return ROK;
CU_ALLOC(phyCellGrpCfg->p_NR_FR1, sizeof(long));
if(!phyCellGrpCfg->p_NR_FR1)
{
- DU_LOG("\nF1AP : Memory allocation failure in BuildPhyCellGrpCfg");
+ DU_LOG("\nERROR --> F1AP : Memory allocation failure in BuildPhyCellGrpCfg");
return RFAILED;
}
*(phyCellGrpCfg->p_NR_FR1) = P_NR_FR1;
CU_ALLOC(tagConfig->tag_ToAddModList, sizeof(struct TAG_Config__tag_ToAddModList));
if(!tagConfig->tag_ToAddModList)
{
- DU_LOG("\nF1AP : Memory allocation failure in BuildTagConfig");
+ DU_LOG("\nERROR --> F1AP : Memory allocation failure in BuildTagConfig");
return RFAILED;
}
CU_ALLOC(tagList->list.array, tagList->list.size);
if(!tagList->list.array)
{
- DU_LOG("\nF1AP : Memory allocation failure in BuildTagConfig");
+ DU_LOG("\nERROR --> F1AP : Memory allocation failure in BuildTagConfig");
return RFAILED;
}
CU_ALLOC(tagList->list.array[idx], sizeof(struct TAG));
if(!tagList->list.array[idx])
{
- DU_LOG("\nF1AP : Memory allocation failure in BuildTagConfig");
+ DU_LOG("\nERROR --> F1AP : Memory allocation failure in BuildTagConfig");
return RFAILED;
}
}
CU_ALLOC(phrConfig->choice.setup, sizeof(struct PHR_Config));
if(!phrConfig->choice.setup)
{
- DU_LOG("\nF1AP : Memory allocation failure in BuildPhrConfig");
+ DU_LOG("\nERROR --> F1AP : Memory allocation failure in BuildPhrConfig");
return RFAILED;
}
sizeof(struct SchedulingRequestConfig__schedulingRequestToAddModList));
if(!schedulingRequestConfig->schedulingRequestToAddModList)
{
- DU_LOG("\nF1AP : Memory allocation failure in BuildSchedulingReqConfig");
+ DU_LOG("\nERROR --> F1AP : Memory allocation failure in BuildSchedulingReqConfig");
return RFAILED;
}
CU_ALLOC(schReqList->list.array, schReqList->list.size);
if(!schReqList->list.array)
{
- DU_LOG("\nF1AP : Memory allocation failure in BuildSchedulingReqConfig");
+ DU_LOG("\nERROR --> F1AP : Memory allocation failure in BuildSchedulingReqConfig");
return RFAILED;
}
CU_ALLOC(schReqList->list.array[idx], sizeof(struct SchedulingRequestToAddMod));
if(!schReqList->list.array[idx])
{
- DU_LOG("\nF1AP : Memory allocation failure in BuildSchedulingReqConfig");
+ DU_LOG("\nERROR --> F1AP : Memory allocation failure in BuildSchedulingReqConfig");
return RFAILED;
}
}
CU_ALLOC(schReqList->list.array[idx]->sr_ProhibitTimer, sizeof(long));
if(!schReqList->list.array[idx]->sr_ProhibitTimer)
{
- DU_LOG("\nF1AP : Memory allocation failure in BuildSchedulingReqConfig");
+ DU_LOG("\nERROR --> F1AP : Memory allocation failure in BuildSchedulingReqConfig");
return RFAILED;
}
*(schReqList->list.array[idx]->sr_ProhibitTimer) = SR_PROHIBIT_TMR;
CU_ALLOC(macCellGrpCfg->schedulingRequestConfig, sizeof(struct SchedulingRequestConfig));
if(!macCellGrpCfg->schedulingRequestConfig)
{
- DU_LOG("\nF1AP : Memory allocation failure in BuildMacCellGrpCfg");
+ DU_LOG("\nERROR --> F1AP : Memory allocation failure in BuildMacCellGrpCfg");
return RFAILED;
}
if(BuildSchedulingReqConfig(macCellGrpCfg->schedulingRequestConfig) != ROK)
{
- DU_LOG("\nF1AP : BuildSchedulingReqConfig failed");
+ DU_LOG("\nERROR --> F1AP : BuildSchedulingReqConfig failed");
return RFAILED;
}
CU_ALLOC(macCellGrpCfg->bsr_Config, sizeof(struct BSR_Config));
if(!macCellGrpCfg->bsr_Config)
{
- DU_LOG("\nF1AP : Memory allocation failure in BuildMacCellGrpCfg");
+ DU_LOG("\nERROR --> F1AP : Memory allocation failure in BuildMacCellGrpCfg");
return RFAILED;
}
if(BuildBsrConfig(macCellGrpCfg->bsr_Config) != ROK)
{
- DU_LOG("\nF1AP : BuildBsrConfig failed");
+ DU_LOG("\nERROR --> F1AP : BuildBsrConfig failed");
return RFAILED;
}
CU_ALLOC(macCellGrpCfg->tag_Config, sizeof(struct TAG_Config));
if(!macCellGrpCfg->tag_Config)
{
- DU_LOG("\nF1AP : Memory allocation failure in BuildMacCellGrpCfg");
+ DU_LOG("\nERROR --> F1AP : Memory allocation failure in BuildMacCellGrpCfg");
return RFAILED;
}
if(BuildTagConfig(macCellGrpCfg->tag_Config) != ROK)
{
- DU_LOG("\nF1AP : BuildTagConfig failed");
+ DU_LOG("\nERROR --> F1AP : BuildTagConfig failed");
return RFAILED;
}
CU_ALLOC(macCellGrpCfg->phr_Config, sizeof(struct MAC_CellGroupConfig__phr_Config));
if(!macCellGrpCfg->phr_Config)
{
- DU_LOG("\nF1AP : Memory allocation failure in BuildMacCellGrpCfg");
+ DU_LOG("\nERROR --> F1AP : Memory allocation failure in BuildMacCellGrpCfg");
return RFAILED;
}
if(BuildPhrConfig(macCellGrpCfg->phr_Config) != ROK)
{
- DU_LOG("\nF1AP : BuildPhrConfig failed");
+ DU_LOG("\nERROR --> F1AP : BuildPhrConfig failed");
return RFAILED;
}
CU_ALLOC(rlcConfig->choice.am, sizeof(struct RLC_Config__am));
if(!rlcConfig->choice.am)
{
- DU_LOG("\nF1AP : Memory allocation failure in BuildRlcConfig");
+ DU_LOG("\nERROR --> F1AP : Memory allocation failure in BuildRlcConfig");
return RFAILED;
}
CU_ALLOC(rlcConfig->choice.am->ul_AM_RLC.sn_FieldLength, sizeof(SN_FieldLengthAM_t));
if(!rlcConfig->choice.am->ul_AM_RLC.sn_FieldLength)
{
- DU_LOG("\nF1AP : Memory allocation failure in BuildRlcConfig");
+ DU_LOG("\nERROR --> F1AP : Memory allocation failure in BuildRlcConfig");
return RFAILED;
}
*(rlcConfig->choice.am->ul_AM_RLC.sn_FieldLength) = SN_FIELD_LEN;
CU_ALLOC(rlcConfig->choice.am->dl_AM_RLC.sn_FieldLength, sizeof(SN_FieldLengthAM_t));
if(!rlcConfig->choice.am->dl_AM_RLC.sn_FieldLength)
{
- DU_LOG("\nF1AP : Memory allocation failure in BuildRlcConfig");
+ DU_LOG("\nERROR --> F1AP : Memory allocation failure in BuildRlcConfig");
return RFAILED;
}
*(rlcConfig->choice.am->dl_AM_RLC.sn_FieldLength) = SN_FIELD_LEN;
CU_ALLOC(macLcConfig->ul_SpecificParameters, sizeof(struct LogicalChannelConfig__ul_SpecificParameters));
if(!macLcConfig->ul_SpecificParameters)
{
- DU_LOG("\nF1AP : Memory allocation failure in BuildMacLCConfig");
+ DU_LOG("\nERROR --> F1AP : Memory allocation failure in BuildMacLCConfig");
return RFAILED;
}
CU_ALLOC(macLcConfig->ul_SpecificParameters->logicalChannelGroup, sizeof(long));
if(!macLcConfig->ul_SpecificParameters->logicalChannelGroup)
{
- DU_LOG("\nF1AP : Memory allocation failure in BuildMacLCConfig");
+ DU_LOG("\nERROR --> F1AP : Memory allocation failure in BuildMacLCConfig");
return RFAILED;
}
*(macLcConfig->ul_SpecificParameters->logicalChannelGroup) = LC_GRP;
CU_ALLOC(macLcConfig->ul_SpecificParameters->schedulingRequestID, sizeof(SchedulingRequestId_t));
if(!macLcConfig->ul_SpecificParameters->schedulingRequestID)
{
- DU_LOG("\nF1AP : Memory allocation failure in BuildMacLCConfig");
+ DU_LOG("\nERROR --> F1AP : Memory allocation failure in BuildMacLCConfig");
return RFAILED;
}
*(macLcConfig->ul_SpecificParameters->schedulingRequestID) = SCH_REQ_ID;
CU_ALLOC(rlcBearerList->list.array, rlcBearerList->list.size);
if(!rlcBearerList->list.array)
{
- DU_LOG("\nF1AP : Memory allocation failure in BuildRlcBearerToAddModList");
+ DU_LOG("\nERROR --> F1AP : Memory allocation failure in BuildRlcBearerToAddModList");
return RFAILED;
}
CU_ALLOC(rlcBearerList->list.array[idx], sizeof(struct RLC_BearerConfig));
if(!rlcBearerList->list.array[idx])
{
- DU_LOG("\nF1AP : Memory allocation failure in BuildRlcBearerToAddModList");
+ DU_LOG("\nERROR --> F1AP : Memory allocation failure in BuildRlcBearerToAddModList");
return RFAILED;
}
}
CU_ALLOC(rlcBearerList->list.array[idx]->servedRadioBearer, sizeof(struct RLC_BearerConfig__servedRadioBearer));
if(!rlcBearerList->list.array[idx]->servedRadioBearer)
{
- DU_LOG("\nF1AP : Memory allocation failure in BuildRlcBearerToAddModList");
+ DU_LOG("\nERROR --> F1AP : Memory allocation failure in BuildRlcBearerToAddModList");
return RFAILED;
}
CU_ALLOC(rlcBearerList->list.array[idx]->rlc_Config, sizeof(struct RLC_Config));
if(!rlcBearerList->list.array[idx]->rlc_Config)
{
- DU_LOG("\nF1AP : Memory allocation failure in BuildRlcBearerToAddModList");
+ DU_LOG("\nERROR --> F1AP : Memory allocation failure in BuildRlcBearerToAddModList");
return RFAILED;
}
if(BuildRlcConfig(rlcBearerList->list.array[idx]->rlc_Config) != ROK)
{
- DU_LOG("\nF1AP : BuildRlcConfig failed");
+ DU_LOG("\nERROR --> F1AP : BuildRlcConfig failed");
return RFAILED;
}
CU_ALLOC(rlcBearerList->list.array[idx]->mac_LogicalChannelConfig, sizeof(struct LogicalChannelConfig));
if(!rlcBearerList->list.array[idx]->mac_LogicalChannelConfig)
{
- DU_LOG("\nF1AP : Memory allocation failure in BuildRlcBearerToAddModList");
+ DU_LOG("\nERROR --> F1AP : Memory allocation failure in BuildRlcBearerToAddModList");
return RFAILED;
}
if(BuildMacLCConfig(rlcBearerList->list.array[idx]->mac_LogicalChannelConfig) != ROK)
{
- DU_LOG("\nF1AP : BuildMacLCConfig failed");
+ DU_LOG("\nERROR --> F1AP : BuildMacLCConfig failed");
return RFAILED;
}
CU_ALLOC(cellGrpCfg.rlc_BearerToAddModList, sizeof(struct CellGroupConfigRrc__rlc_BearerToAddModList));
if(!cellGrpCfg.rlc_BearerToAddModList)
{
- DU_LOG("\nF1AP : Memory allocation failure in CellGrpConfig");
+ DU_LOG("\nERROR --> F1AP : Memory allocation failure in CellGrpConfig");
break;
}
if(BuildRlcBearerToAddModList(cellGrpCfg.rlc_BearerToAddModList) != ROK)
{
- DU_LOG("\nF1AP : fillCellGrpCfg failed");
+ DU_LOG("\nERROR --> F1AP : fillCellGrpCfg failed");
break;
}
CU_ALLOC(cellGrpCfg.mac_CellGroupConfig, sizeof(MAC_CellGroupConfig_t));
if(!cellGrpCfg.mac_CellGroupConfig)
{
- DU_LOG("\nF1AP : Memory allocation failure in fillCellGrpCfg");
+ DU_LOG("\nERROR --> F1AP : Memory allocation failure in fillCellGrpCfg");
break;
}
if(BuildMacCellGrpCfg(cellGrpCfg.mac_CellGroupConfig) != ROK)
{
- DU_LOG("\nF1AP : BuildMacCellGrpCfg failed");
+ DU_LOG("\nERROR --> F1AP : BuildMacCellGrpCfg failed");
break;
}
CU_ALLOC(cellGrpCfg.physicalCellGroupConfig, sizeof(PhysicalCellGroupConfig_t));
if(!cellGrpCfg.physicalCellGroupConfig)
{
- DU_LOG("\nF1AP : Memory allocation failure in BuildDuToCuRrcContainer");
+ DU_LOG("\nERROR --> F1AP : Memory allocation failure in BuildDuToCuRrcContainer");
break;
}
if(BuildPhyCellGrpCfg(cellGrpCfg.physicalCellGroupConfig) != ROK)
{
- DU_LOG("\nF1AP : BuildPhyCellGrpCfg failed");
+ DU_LOG("\nERROR --> F1AP : BuildPhyCellGrpCfg failed");
break;
}
CU_ALLOC(cellGrpCfg.spCellConfig, sizeof(SpCellConfig_t));
if(!cellGrpCfg.spCellConfig)
{
- DU_LOG("\nF1AP : Memory allocation failure in BuildDuToCuRrcContainer");
+ DU_LOG("\nERROR --> F1AP : Memory allocation failure in BuildDuToCuRrcContainer");
break;
}
if(BuildSpCellCfg(cellGrpCfg.spCellConfig) != ROK)
{
- DU_LOG("\nF1AP : BuildSpCellCfg failed");
+ DU_LOG("\nERROR --> F1AP : BuildSpCellCfg failed");
break;
}
/* Encode results */
if(encRetVal.encoded == ENCODE_FAIL)
{
- DU_LOG( "\n F1AP : Could not encode DuToCuRrcContainer (at %s)\n",\
+ DU_LOG( "\nERROR --> F1AP : Could not encode DuToCuRrcContainer (at %s)\n",\
encRetVal.failed_type ? encRetVal.failed_type->name : "unknown");
break;
}
else
{
- DU_LOG("\n F1AP : Created APER encoded buffer for DuToCuRrcContainer\n");
+ DU_LOG("\nDEBUG --> F1AP : Created APER encodedbuffer for DuToCuRrcContainer\n");
for(int i=0; i< encBufSize; i++)
{
- printf("%x",encBuf[i]);
+ DU_LOG("%x",encBuf[i]);
}
}
CU_ALLOC(cellGrp->buf, cellGrp->size);
if(!cellGrp->buf)
{
- DU_LOG("\nF1AP : Memory allocation failed in BuildDuToCuRrcContainer");
+ DU_LOG("\nERROR --> F1AP : Memory allocation failed in BuildDuToCuRrcContainer");
break;
}
memcpy(cellGrp->buf, encBuf, cellGrp->size);
CU_ALLOC(featureSets->featureSetsDownlinkPerCC, sizeof(struct FeatureSets__featureSetsDownlinkPerCC));
if(!featureSets->featureSetsDownlinkPerCC)
{
- DU_LOG("\nMemory allocation failed in fillFeatureSets");
+ DU_LOG("\nERROR --> F1AP : Memory allocation failed in fillFeatureSets");
return RFAILED;
}
CU_ALLOC(featureSets->featureSetsDownlinkPerCC->list.array, featureSets->featureSetsDownlinkPerCC->list.size);
if(!featureSets->featureSetsDownlinkPerCC->list.array)
{
- DU_LOG("\nMemory allocation failed in fillFeatureSets");
+ DU_LOG("\nERROR --> F1AP : Memory allocation failed in fillFeatureSets");
return RFAILED;
}
CU_ALLOC(featureSets->featureSetsDownlinkPerCC->list.array[idx], sizeof(struct FeatureSetDownlinkPerCC));
if(!featureSets->featureSetsDownlinkPerCC->list.array[idx])
{
- DU_LOG("\nMemory allocation failed in fillFeatureSets");
+ DU_LOG("\nERROR --> F1AP : Memory allocation failed in fillFeatureSets");
return RFAILED;
}
}
CU_ALLOC(featureSets->featureSetsDownlinkPerCC->list.array[idx]->supportedModulationOrderDL, sizeof(ModulationOrder_t));
if(!featureSets->featureSetsDownlinkPerCC->list.array[idx]->supportedModulationOrderDL)
{
- DU_LOG("\nMemory allocation failed in fillFeatureSets");
+ DU_LOG("\nERROR --> F1AP : Memory allocation failed in fillFeatureSets");
return RFAILED;
}
*(featureSets->featureSetsDownlinkPerCC->list.array[idx]->supportedModulationOrderDL) = ModulationOrder_qam64;
CU_ALLOC(featureSets->featureSetsUplinkPerCC, sizeof(struct FeatureSets__featureSetsUplinkPerCC));
if(!featureSets->featureSetsUplinkPerCC)
{
- DU_LOG("\nMemory allocation failed in fillFeatureSets");
+ DU_LOG("\nERROR --> F1AP : Memory allocation failed in fillFeatureSets");
return RFAILED;
}
CU_ALLOC(featureSets->featureSetsUplinkPerCC->list.array, featureSets->featureSetsUplinkPerCC->list.size);
if(!featureSets->featureSetsUplinkPerCC->list.array)
{
- DU_LOG("\nMemory allocation failed in fillFeatureSets");
+ DU_LOG("\nERROR --> F1AP : Memory allocation failed in fillFeatureSets");
return RFAILED;
}
CU_ALLOC(featureSets->featureSetsUplinkPerCC->list.array[idx], sizeof(struct FeatureSetUplinkPerCC));
if(!featureSets->featureSetsUplinkPerCC->list.array[idx])
{
- DU_LOG("\nMemory allocation failed in fillFeatureSets");
+ DU_LOG("\nERROR --> F1AP : Memory allocation failed in fillFeatureSets");
return RFAILED;
}
}
CU_ALLOC(featureSets->featureSetsUplinkPerCC->list.array[idx]->supportedModulationOrderUL, sizeof(ModulationOrder_t));
if(!featureSets->featureSetsUplinkPerCC->list.array[idx]->supportedModulationOrderUL)
{
- DU_LOG("\nMemory allocation failed in fillFeatureSets");
+ DU_LOG("\nERROR --> F1AP : Memory allocation failed in fillFeatureSets");
return RFAILED;
}
*(featureSets->featureSetsUplinkPerCC->list.array[idx]->supportedModulationOrderUL) = ModulationOrder_qam16;
CU_ALLOC(ueNrCap.rf_Parameters.supportedBandListNR.list.array, ueNrCap.rf_Parameters.supportedBandListNR.list.size);
if(!ueNrCap.rf_Parameters.supportedBandListNR.list.array)
{
- DU_LOG("\nMemory allocation failed in fillUeCapRatCont");
+ DU_LOG("\nERROR --> F1AP : Memory allocation failed in fillUeCapRatCont");
ret = RFAILED;
break;
}
CU_ALLOC(ueNrCap.featureSets, sizeof(struct FeatureSets));
if(!ueNrCap.featureSets)
{
- DU_LOG("\nMemory allocation failed in fillUeCapRatCont");
+ DU_LOG("\nERROR --> F1AP : Memory allocation failed in fillUeCapRatCont");
ret = RFAILED;
break;
}
if(fillFeatureSets(ueNrCap.featureSets) != ROK)
{
- DU_LOG("\nfillDLFeatureSets() failed ");
+ DU_LOG("\nERROR --> fillDLFeatureSets() failed ");
ret = RFAILED;
break;
}
/* Encode results */
if(encRetVal.encoded == ENCODE_FAIL)
{
- DU_LOG( "\n F1AP : Could not encode UE Capability RAT Container (at %s)\n",\
+ DU_LOG( "\nERROR --> F1AP : Could not encode UE Capability RAT Container (at %s)\n",\
encRetVal.failed_type ? encRetVal.failed_type->name : "unknown");
break;
}
else
{
- DU_LOG("\n F1AP : Created APER encoded buffer for UE Capability RAT Container\n");
+ DU_LOG("\nDEBUG --> F1AP : Created APER encodedbuffer for UE Capability RAT Container\n");
for(int i=0; i< encBufSize; i++)
{
- printf("%x",encBuf[i]);
+ DU_LOG("%x",encBuf[i]);
}
}
CU_ALLOC(ueCapRatContBuf->buf, ueCapRatContBuf->size);
if(!ueCapRatContBuf->buf)
{
- DU_LOG("\nF1AP : Memory allocation failed in fillUeCapabilityContainer");
+ DU_LOG("\nERROR --> F1AP : Memory allocation failed in fillUeCapabilityContainer");
break;
}
memcpy(ueCapRatContBuf->buf, encBuf, ueCapRatContBuf->size);
CU_ALLOC(ueCapablityList.list.array, ueCapablityList.list.size);
if(!ueCapablityList.list.array)
{
- DU_LOG("\nMemory allocation failed in fillUeCapRatContList");
+ DU_LOG("\nERROR --> Memory allocation failed in fillUeCapRatContList");
ret = RFAILED;
break;
}
CU_ALLOC(ueCapablityList.list.array[idx], sizeof(UE_CapabilityRAT_Container_t));
if(ueCapablityList.list.array[idx] == NULLP)
{
- DU_LOG("\nMemory allocation failed in fillUeCapRatContList");
+ DU_LOG("\nERROR --> Memory allocation failed in fillUeCapRatContList");
ret = RFAILED;
break;
}
/* Encode results */
if(encRetVal.encoded == ENCODE_FAIL)
{
- DU_LOG( "\n F1AP : Could not encode UE Capability RAT Container (at %s)\n",\
+ DU_LOG( "\nERROR --> F1AP : Could not encode UE Capability RAT Container (at %s)\n",\
encRetVal.failed_type ? encRetVal.failed_type->name : "unknown");
break;
}
else
{
- DU_LOG("\n F1AP : Created APER encoded buffer for UE Capability RAT Container\n");
+ DU_LOG("\nDEBUG --> F1AP : Created APER encodedbuffer for UE Capability RAT Container\n");
for(int i=0; i< encBufSize; i++)
{
- printf("%x",encBuf[i]);
+ DU_LOG("%x",encBuf[i]);
}
}
CU_ALLOC(ueCapablityListBuf->buf, ueCapablityListBuf->size);
if(!ueCapablityListBuf->buf)
{
- DU_LOG("\nF1AP : Memory allocation failed in fillUeCapabilityContainer");
+ DU_LOG("\nERROR --> F1AP : Memory allocation failed in fillUeCapabilityContainer");
break;
}
memcpy(ueCapablityListBuf->buf, encBuf, ueCapablityListBuf->size);
CU_ALLOC(rrcMsg->uE_CapabilityRAT_ContainerList, sizeof(UE_CapabilityRAT_ContainerList_t));
if(!rrcMsg->uE_CapabilityRAT_ContainerList)
{
- DU_LOG(" F1AP : Memory allocation for CUtoDURRCInformation_ExtIEs failed");
+ DU_LOG("\nERROR --> F1AP : Memory allocation for CUtoDURRCInformation_ExtIEs failed");
return RFAILED;
}
ret = fillUeCapRatContList(rrcMsg->uE_CapabilityRAT_ContainerList);
if(rrcMsg->iE_Extensions->list.array == NULLP)
{
- DU_LOG(" F1AP : Memory allocation for CUtoDURRCInformation_ExtIEs failed");
+ DU_LOG("\nERROR --> F1AP : Memory allocation for CUtoDURRCInformation_ExtIEs failed");
ret = RFAILED;
}
}
break;
default:
- DU_LOG("\nF1AP:Invalid Event type %ld at FreeCuToDuInfo()", \
+ DU_LOG("\nERROR --> F1AP : Invalid Event type %ld at FreeCuToDuInfo()", \
rrcMsg->iE_Extensions->list.array[idx]->id);
break;
}
uint8_t ret1;
while(true)
{
- DU_LOG("\n F1AP : Building UE Context Setup Request\n");
+ DU_LOG("\nINFO --> F1AP : Building UE Context Setup Request\n");
CU_ALLOC(f1apMsg, sizeof(F1AP_PDU_t));
if(f1apMsg == NULLP)
{
- DU_LOG(" F1AP : Memory allocation for F1AP-PDU failed");
+ DU_LOG("\nERROR --> F1AP : Memory allocation for F1AP-PDU failed");
break;
}
CU_ALLOC(f1apMsg->choice.initiatingMessage, sizeof(InitiatingMessage_t));
if(f1apMsg->choice.initiatingMessage == NULLP)
{
- DU_LOG(" F1AP : Memory allocation for F1AP-PDU failed");
+ DU_LOG("\nERROR --> F1AP : Memory allocation for F1AP-PDU failed");
break;
}
if(ueSetReq->protocolIEs.list.array == NULLP)
{
- DU_LOG(" F1AP : Memory allocation for UE Context SetupRequest failed");
+ DU_LOG("\nERROR --> F1AP : Memory allocation for UE Context SetupRequest failed");
break;
}
ueSetReq->protocolIEs.list.array[idx]->value.choice.RRCContainer.size);
if(!ueSetReq->protocolIEs.list.array[idx]->value.choice.RRCContainer.buf)
{
- DU_LOG(" F1AP : Memory allocation for BuildAndSendUeContextSetupReq failed");
+ DU_LOG("\nERROR --> F1AP : Memory allocation for BuildAndSendUeContextSetupReq failed");
break;
}
memset(ueSetReq->protocolIEs.list.array[idx]->value.choice.RRCContainer.buf, 0, bufLen);
ueSetReq->protocolIEs.list.array[idx]->value.choice.BitRate.size);
if(!ueSetReq->protocolIEs.list.array[idx]->value.choice.BitRate.buf)
{
- DU_LOG(" F1AP : Failed to allocate memory for Bit Rate in BuildAndSendUeContextSetupReq()");
+ DU_LOG("\nERROR --> F1AP : Failed to allocate memory for Bit Rate in BuildAndSendUeContextSetupReq()");
break;
}
memset(ueSetReq->protocolIEs.list.array[idx]->value.choice.BitRate.buf, 0, bufLen);
/* Encode results */
if(encRetVal.encoded == ENCODE_FAIL)
{
- DU_LOG( "\n F1AP : Could not encode UE Context Setup Request structure (at %s)\n",\
+ DU_LOG( "\nERROR --> F1AP : Could not encode UE Context Setup Request structure (at %s)\n",\
encRetVal.failed_type ? encRetVal.failed_type->name : "unknown");
break;
}
else
{
- DU_LOG("\n F1AP : Created APER encoded buffer for UE Context Setup Request\n");
+ DU_LOG("\nDEBUG --> F1AP : Created APER encodedbuffer for UE Context Setup Request\n");
for(int i=0; i< encBufSize; i++)
{
- printf("%x",encBuf[i]);
+ DU_LOG("%x",encBuf[i]);
}
}
/* Sending msg */
if(SendF1APMsg(CU_APP_MEM_REG,CU_POOL) != ROK)
{
- DU_LOG("\n F1AP : Sending UE Context Setup Request Failed");
+ DU_LOG("\nERROR --> F1AP : Sending UE Context Setup Request Failed");
break;
}
ret = ROK;
CU_ALLOC(rrcContainer, rrcContLen)
if(!rrcContainer)
{
- DU_LOG("\nCU_STUB: Failed to allocated memory in procUlRrcMsg");
+ DU_LOG("\nERROR --> F1AP : Failed to allocated memory in procUlRrcMsg");
return RFAILED;
}
memcpy(rrcContainer, ulRrcMsg->protocolIEs.list.array[idx]->value.choice.RRCContainer.buf,\
}
default:
- DU_LOG("\n Invalid Event %ld", ulRrcMsg->protocolIEs.list.array[idx]->id);
+ DU_LOG("\nERROR --> F1AP : Invalid Event %ld", ulRrcMsg->protocolIEs.list.array[idx]->id);
break;
}
}
rrcMsgType = setDlRRCMsgType();
if(rrcMsgType == REGISTRATION_ACCEPT)
{
- DU_LOG("\nF1AP: Sending DL RRC MSG for RRC Registration Accept");
+ DU_LOG("\nINFO --> F1AP: Sending DL RRC MSG for RRC Registration Accept");
ret = BuildAndSendDLRRCMessageTransfer(srbId, rrcMsgType);
}
if(rrcMsgType == UE_CONTEXT_SETUP_REQ)
{
- DU_LOG("\nF1AP: Sending Ue Context Setup Req");
+ DU_LOG("\nINFO --> F1AP: Sending Ue Context Setup Req");
ret = BuildAndSendUeContextSetupReq(cuUeF1apId, duUeF1apId,\
rrcContLen, rrcContainer);
}
rrcMsgType = setDlRRCMsgType();
if(rrcMsgType == RRC_RECONFIG)
{
- DU_LOG("\nF1AP: Sending DL RRC MSG for RRC Reconfig");
+ DU_LOG("\nINFO --> F1AP: Sending DL RRC MSG for RRC Reconfig");
BuildAndSendDLRRCMessageTransfer(srbId, rrcMsgType);
}
}
F1AP_PDU_t *f1apMsg = NULL;
ResetAcknowledge_t *f1ResetAck = NULLP;
asn_enc_rval_t encRetVal;
- DU_LOG("\nF1AP : Building F1 Reset Acknowledgment \n");
+ DU_LOG("\nINFO --> F1AP : Building F1 Reset Acknowledgment \n");
do{
/* Allocate the memory for F1ResetRequest_t */
CU_ALLOC(f1apMsg, sizeof(F1AP_PDU_t));
if(f1apMsg == NULLP)
{
- DU_LOG("\nF1AP : Memory allocation for F1AP-PDU failed");
+ DU_LOG("\nERROR --> F1AP : Memory allocation for F1AP-PDU failed");
break;
}
CU_ALLOC(f1apMsg->choice.successfulOutcome, sizeof(SuccessfulOutcome_t));
if(f1apMsg->choice.successfulOutcome == NULLP)
{
- DU_LOG("\nF1AP : Memory allocation for F1AP-PDU failed");
+ DU_LOG("\nERROR --> F1AP : Memory allocation for F1AP-PDU failed");
break;
}
CU_ALLOC(f1ResetAck->protocolIEs.list.array, f1ResetAck->protocolIEs.list.size );
if(f1ResetAck->protocolIEs.list.array == NULLP)
{
- DU_LOG("\nF1AP : Memory allocation for F1ResetAckIEs failed");
+ DU_LOG("\nERROR --> F1AP : Memory allocation for F1ResetAckIEs failed");
break;
}
/* Check encode results */
if(encRetVal.encoded == ENCODE_FAIL)
{
- DU_LOG("\nF1AP : Could not encode F1ResetAck structure (at %s)\n",\
+ DU_LOG("\nERROR --> F1AP : Could not encode F1ResetAck structure (at %s)\n",\
encRetVal.failed_type ? encRetVal.failed_type->name : "unknown");
break;
}
else
{
- DU_LOG("\nF1AP : Created APER encoded buffer for F1ResetAck \n");
+ DU_LOG("\nDEBUG --> F1AP : Created APER encodedbuffer for F1ResetAck \n");
for(int i=0; i< encBufSize; i++)
{
- printf("%x",encBuf[i]);
+ DU_LOG("%x",encBuf[i]);
}
}
/* Sending msg */
if(SendF1APMsg(CU_APP_MEM_REG, CU_POOL) != ROK)
{
- DU_LOG("\nF1AP : Sending F1 Reset Response failed");
+ DU_LOG("\nERROR --> F1AP : Sending F1 Reset Response failed");
break;
}
CU_ALLOC(ulInfo->list.array,ulInfo->list.size);
if(ulInfo->list.array == NULLP)
{
- DU_LOG("\nF1AP : Memory allocation failed in BuildUlTnlInfoforDrb2");
+ DU_LOG("\nERROR --> F1AP : Memory allocation failed in BuildUlTnlInfoforDrb2");
return RFAILED;
}
for(arrIdx=0; arrIdx<ulCnt; arrIdx++)
CU_ALLOC(ulInfo->list.array[arrIdx],sizeof(ULUPTNLInformation_ToBeSetup_Item_t));
if(ulInfo->list.array[arrIdx] == NULLP)
{
- DU_LOG("\nF1AP : Memory allocation failed in BuildUlTnlInfoforDrb2");
+ DU_LOG("\nERROR --> F1AP : Memory allocation failed in BuildUlTnlInfoforDrb2");
return RFAILED;
}
}
sizeof(GTPTunnel_t));
if(ulInfo->list.array[arrIdx]->uLUPTNLInformation.choice.gTPTunnel == NULLP)
{
- DU_LOG("\nF1AP : Memory allocation failed in BuildUlTnlInfoforDrb2");
+ DU_LOG("\nERROR --> F1AP : Memory allocation failed in BuildUlTnlInfoforDrb2");
return RFAILED;
}
ulInfo->list.array[arrIdx]->uLUPTNLInformation.choice.gTPTunnel->\
if(ulInfo->list.array[arrIdx]->uLUPTNLInformation.choice.gTPTunnel->\
transportLayerAddress.buf == NULLP)
{
- DU_LOG("\nF1AP : Memory allocation failed in BuildUlTnlInfoforDrb2");
+ DU_LOG("\nERROR --> F1AP : Memory allocation failed in BuildUlTnlInfoforDrb2");
return RFAILED;
}
if(ulInfo->list.array[arrIdx]->uLUPTNLInformation.choice.gTPTunnel->gTP_TEID.buf\
== NULLP)
{
- DU_LOG("\nF1AP : Memory allocation failed in BuildUlTnlInfoforDrb2");
+ DU_LOG("\nERROR --> F1AP : Memory allocation failed in BuildUlTnlInfoforDrb2");
return RFAILED;
}
ulInfo->list.array[arrIdx]->uLUPTNLInformation.choice.gTPTunnel->\
CU_ALLOC(drbItem->qoSInformation.choice.eUTRANQoS, sizeof(EUTRANQoS_t));
if(drbItem->qoSInformation.choice.eUTRANQoS)
{
- DU_LOG("\nF1AP : Memory allocation failed in FillDrb2Item");
+ DU_LOG("\nERROR --> F1AP : Memory allocation failed in FillDrb2Item");
return RFAILED;
}
drbItem->qoSInformation.choice.eUTRANQoS->qCI = QCI;
CU_ALLOC(drbItem->qoSInformation.choice.choice_extension,sizeof(QoSInformation_ExtIEs_t));
if(drbItem->qoSInformation.choice.choice_extension == NULLP)
{
- DU_LOG("\nF1AP : Memory allocation failed in FillDrb2Item");
+ DU_LOG("\nERROR --> F1AP : Memory allocation failed in FillDrb2Item");
return RFAILED;
}
ret = BuildQOSInfo(&drbItem->qoSInformation.choice.choice_extension->value.choice.DRB_Information.dRB_QoS);
if(ret != ROK)
{
- DU_LOG("\nF1AP : BuildQOSInfo failed");
+ DU_LOG("\nERROR --> F1AP : BuildQOSInfo failed");
return RFAILED;
}
choice_extension->value.choice.DRB_Information.sNSSAI);
if(ret != ROK)
{
- DU_LOG("\nF1AP : BuildSNSSAI failed");
+ DU_LOG("\nERROR --> F1AP : BuildSNSSAI failed");
return RFAILED;
}
choice_extension->value.choice.DRB_Information.flows_Mapped_To_DRB_List);
if(ret != ROK)
{
- DU_LOG("\nF1AP : BuildFlowsMap failed");
+ DU_LOG("\nERROR --> F1AP : BuildFlowsMap failed");
return RFAILED;
}
}
ret = BuildUlTnlInfoforDrb2(&drbItem->uLUPTNLInformation_ToBeSetup_List);
if(ret != ROK)
{
- DU_LOG("\nF1AP : BuildUlTnlInfoforDrb2 failed");
+ DU_LOG("\nERROR --> F1AP : BuildUlTnlInfoforDrb2 failed");
return RFAILED;
}
CU_ALLOC(drbItem->uLConfiguration,sizeof(ULConfiguration_t));
if(drbItem->uLConfiguration == NULLP)
{
- DU_LOG("\nF1AP : Memory allocation failed in FillDrb2Item");
+ DU_LOG("\nERROR --> F1AP : Memory allocation failed in FillDrb2Item");
return RFAILED;
}
drbItem->uLConfiguration->uLUEConfiguration = ULUEConfiguration_no_data;
if(FillDrb2Item(&(drbItemIe->value.choice.DRBs_ToBeSetupMod_Item)) != ROK)
{
- DU_LOG("\nF1AP : FillDrb2Item failed");
+ DU_LOG("\nERROR --> F1AP : FillDrb2Item failed");
return RFAILED;
}
return ROK;
CU_ALLOC(drbSet->list.array, drbSet->list.size);
if(drbSet->list.array == NULLP)
{
- DU_LOG("\nF1AP : Memory allocation failed in BuildDrbToBeSetupModList");
+ DU_LOG("\nERROR --> F1AP : Memory allocation failed in BuildDrbToBeSetupModList");
return RFAILED;
}
for(arrIdx=0; arrIdx<drbCnt; arrIdx++)
CU_ALLOC(drbSet->list.array[arrIdx], sizeof(DRBs_ToBeSetupMod_ItemIEs_t));
if(drbSet->list.array[arrIdx] == NULLP)
{
- DU_LOG("\nF1AP : Memory allocation failed in BuildDrbToBeSetupModList");
+ DU_LOG("\nERROR --> F1AP : Memory allocation failed in BuildDrbToBeSetupModList");
return RFAILED;
}
}
ret = FillDrbItemList(drbSet->list.array[arrIdx]);
if(ret != ROK)
{
- DU_LOG("\nF1AP : FillDrbItemList failed");
+ DU_LOG("\nERROR --> F1AP : FillDrbItemList failed");
}
return ret;
UEContextModificationRequest_t *ueContextModifyReq = NULLP;
asn_enc_rval_t encRetVal;
- DU_LOG("\nF1AP : Building Ue context modification request\n");
+ DU_LOG("\nINFO --> F1AP : Building Ue context modification request\n");
while(1)
{
CU_ALLOC(f1apMsg, sizeof(F1AP_PDU_t));
if(f1apMsg == NULLP)
{
- DU_LOG("\nF1AP : Memory allocation for F1AP-PDU failed Ue context modification");
+ DU_LOG("\nERROR --> F1AP : Memory allocation for F1AP-PDU failed Ue context modification");
break;
}
CU_ALLOC(f1apMsg->choice.initiatingMessage, sizeof(InitiatingMessage_t));
if(f1apMsg->choice.initiatingMessage == NULLP)
{
- DU_LOG("\nF1AP : Memory allocation for F1AP-PDU failed Ue context modification");
+ DU_LOG("\nERROR --> F1AP : Memory allocation for F1AP-PDU failed Ue context modification");
break;
}
f1apMsg->choice.initiatingMessage->procedureCode = ProcedureCode_id_UEContextModification;
CU_ALLOC(ueContextModifyReq->protocolIEs.list.array, ueContextModifyReq->protocolIEs.list.size);
if(ueContextModifyReq->protocolIEs.list.array == NULLP)
{
- DU_LOG("\nF1AP : Memory allocation for UE context modifcation Request failed");
+ DU_LOG("\nERROR --> F1AP : Memory allocation for UE context modifcation Request failed");
break;
}
CU_ALLOC(ueContextModifyReq->protocolIEs.list.array[ieIdx], sizeof(UEContextModificationRequest_t));
if(ueContextModifyReq->protocolIEs.list.array[ieIdx] == NULLP)
{
- DU_LOG("\nF1AP : Memory allocation for UE context modifcation Request failed");
+ DU_LOG("\nERROR --> F1AP : Memory allocation for UE context modifcation Request failed");
break;
}
}
/* Encode results */
if(encRetVal.encoded == ENCODE_FAIL)
{
- DU_LOG("\nF1AP : Could not encode ueContextModifyReq structure (at %s)\n",\
+ DU_LOG("\nERROR --> F1AP : Could not encode ueContextModifyReq structure (at %s)\n",\
encRetVal.failed_type ? encRetVal.failed_type->name : "unknown");
break;
}
else
{
- DU_LOG("\nF1AP : Created APER encoded buffer for ueContextModifyReq\n");
+ DU_LOG("\nDEBUG --> F1AP : Created APER encodedbuffer for ueContextModifyReq\n");
for(ieIdx=0; ieIdx< encBufSize; ieIdx++)
{
- printf("%x",encBuf[ieIdx]);
+ DU_LOG("%x",encBuf[ieIdx]);
}
}
if(SendF1APMsg(CU_APP_MEM_REG, CU_POOL) != ROK)
{
- DU_LOG("\nF1AP : Sending Ue context modification request failed");
+ DU_LOG("\nERROR --> F1AP : Sending Ue context modification request failed");
break;
}
asn_dec_rval_t rval; /* Decoder return value */
F1AP_PDU_t f1apasnmsg ;
- DU_LOG("\nF1AP : Received F1AP message buffer");
+ DU_LOG("\nINFO --> F1AP : Received F1AP message buffer");
ODU_PRINT_MSG(mBuf, 0,0);
/* Copy mBuf into char array to decode it */
if(recvBuf == NULLP)
{
- DU_LOG("\nF1AP : Memory allocation failed");
+ DU_LOG("\nERROR --> F1AP : Memory allocation failed");
return;
}
if(ODU_COPY_MSG_TO_FIX_BUF(mBuf, 0, recvBufLen, (Data *)recvBuf, ©Cnt) != ROK)
{
- DU_LOG("\nF1AP : Failed while copying %d", copyCnt);
+ DU_LOG("\nERROR --> F1AP : Failed while copying %d", copyCnt);
return;
}
- printf("\nF1AP : Received flat buffer to be decoded : ");
+ DU_LOG("\nDEBUG --> F1AP : Received flat buffer to be decoded : ");
for(i=0; i< recvBufLen; i++)
{
- printf("%x",recvBuf[i]);
+ DU_LOG("%x",recvBuf[i]);
}
/* Decoding flat buffer into F1AP messsage */
if(rval.code == RC_FAIL || rval.code == RC_WMORE)
{
- DU_LOG("\nF1AP : ASN decode failed");
+ DU_LOG("\nERROR --> F1AP : ASN decode failed");
return;
}
- printf("\n");
+ DU_LOG("\n");
xer_fprint(stdout, &asn_DEF_F1AP_PDU, f1apMsg);
switch(f1apMsg->present)
{
case InitiatingMessage__value_PR_Reset:
{
- DU_LOG("\nF1AP : F1 reset request received ");
+ DU_LOG("\nINFO --> F1AP : F1 reset request received ");
BuildAndSendF1ResetAck();
break;
}
case InitiatingMessage__value_PR_F1SetupRequest:
{
- DU_LOG("\nF1AP : F1 setup request received");
+ DU_LOG("\nINFO --> F1AP : F1 setup request received");
BuildAndSendF1SetupRsp();
break;
}
case InitiatingMessage__value_PR_GNBDUConfigurationUpdate:
{
- DU_LOG("\nF1AP : GNB-DU config update received");
+ DU_LOG("\nINFO --> F1AP : GNB-DU config update received");
BuildAndSendDUUpdateAck();
- DU_LOG("\nF1AP : Sending F1 reset request");
+ DU_LOG("\nINFO --> F1AP : Sending F1 reset request");
BuildAndSendF1ResetReq();
break;
}
case InitiatingMessage__value_PR_InitialULRRCMessageTransfer:
{
- DU_LOG("\nF1AP : Received InitialULRRCMessageTransfer");
+ DU_LOG("\nINFO --> F1AP : Received InitialULRRCMessageTransfer");
procInitULRRCMsg(f1apMsg);
break;
}
case InitiatingMessage__value_PR_ULRRCMessageTransfer:
{
- DU_LOG("\nF1AP : Received ULRRCMessageTransfer");
+ DU_LOG("\nINFO --> F1AP : Received ULRRCMessageTransfer");
procUlRrcMsg(f1apMsg);
break;
}
case InitiatingMessage__value_PR_RRCDeliveryReport:
{
- DU_LOG("\nF1AP : Received RRC delivery report");
+ DU_LOG("\nINFO --> F1AP : Received RRC delivery report");
break;
}
default:
{
- DU_LOG("\nF1AP : Invalid type of intiating message [%d]",f1apMsg->choice.initiatingMessage->value.present);
+ DU_LOG("\nERROR --> F1AP : Invalid type of intiating message [%d]",\
+ f1apMsg->choice.initiatingMessage->value.present);
return;
}
}/* End of switch(initiatingMessage) */
{
case SuccessfulOutcome__value_PR_ResetAcknowledge:
{
- DU_LOG("\nF1Reset Acknowledgement is received successfully ");
+ DU_LOG("\nINFO --> F1Reset Acknowledgement is received successfully ");
break;
}
case SuccessfulOutcome__value_PR_UEContextSetupResponse:
{
- DU_LOG("\nF1AP : UE ContextSetupResponse received");
+ DU_LOG("\nINFO --> F1AP : UE ContextSetupResponse received");
f1apMsgDb.dlRrcMsgCount++; /* keeping DL RRC Msg Count */
break;
}
default:
{
- DU_LOG("\nF1AP : Invalid type of successful outcome message [%d]",\
+ DU_LOG("\nERROR --> F1AP : Invalid type of successful outcome message [%d]",\
f1apMsg->choice.successfulOutcome->value.present);
return;
}
}
default:
{
- DU_LOG("\nF1AP : Invalid type of f1apMsg->present [%d]",f1apMsg->present);
+ DU_LOG("\nERROR --> F1AP : Invalid type of f1apMsg->present [%d]",f1apMsg->present);
return;
}
}/* End of switch(f1apMsg->present) */
#include "cu_stub_egtp.h"
#include "du_log.h"
+#ifdef O1_ENABLE
+
+#include "Config.h"
+
+#endif
+
#define CU_ID 1
#define CU_NAME "ORAN_OAM_CU"
-#define DU_IP_V4_ADDR "192.168.130.81"
-#define CU_IP_V4_ADDR "192.168.130.82"
+
#define DU_IP_V6_ADDR "0000:0000:0000:0000:0000:0000:0000:0001"
#define CU_IP_V6_ADDR "0000:0000:0000:0000:0000:0000:0000:0011"
+
+#ifndef O1_ENABLE
+
+#define DU_IP_V4_ADDR "192.168.130.81"
+#define CU_IP_V4_ADDR "192.168.130.82"
#define DU_PORT 38472
#define CU_PORT 38472
+
+#endif
+
#define DU_EGTP_PORT 39001
#define CU_EGTP_PORT 39002
#define RRC_VER 0
#define PLMN_MNC1 8
#define PLMN_MNC2 0
+#ifdef O1_ENABLE
+
+extern StartupConfig g_cfg;
+
+#endif
+
+
/*******************************************************************
*
* @brief Handles SCTP notification
void init_log()
{
- openlog("CU_STUB",LOG_CONS | LOG_PID | LOG_NDELAY, LOG_LOCAL1);
+ openlog("CU_STUB",LOG_CONS | LOG_PID | LOG_NDELAY, LOG_LOCAL1);
}
/*******************************************************************
*
pthread_attr_t attr;
init_log();
- DU_LOG("\nStarting CU_STUB\n");
+ DU_LOG("\nINFO --> CU_STUB : Starting CU_STUB\n");
/* Start thread to receive console input */
pthread_attr_init(&attr);
retVal = pthread_create(&conThrdId, &attr, cuConsoleHandler, NULLP);
if(retVal != 0)
{
- DU_LOG("\nCU_STUB: Thread creation failed. Cause %d", retVal);
+ DU_LOG("\nERROR --> CU_STUB : Thread creation failed. Cause %d", retVal);
}
pthread_attr_destroy(&attr);
{
uint32_t ipv4_du, ipv4_cu;
- DU_LOG("\nReading CU configurations");
+ DU_LOG("\nDEBUG --> CU_STUB : Reading CU configurations");
+
+#ifdef O1_ENABLE
+ if( getStartupConfig(&g_cfg) != ROK )
+ {
+ RETVALUE(RFAILED);
+ }
+ DU_LOG("\nReading CU configurations---");
+ DU_LOG("\nReading CU configurations g_cfg.DU_IPV4_Addr=%s", g_cfg.DU_IPV4_Addr);
+ DU_LOG("\nReading CU configurations g_cfg.CU_IPV4_Addr=%s", g_cfg.CU_IPV4_Addr);
+ cmInetAddr((S8*)g_cfg.DU_IPV4_Addr, &ipv4_du);
+ cmInetAddr((S8*)g_cfg.CU_IPV4_Addr, &ipv4_cu);
+ cuCfgParams.sctpParams.duPort = g_cfg.DU_Port;
+ cuCfgParams.sctpParams.cuPort = g_cfg.CU_Port;
+#else
cmInetAddr((S8*)DU_IP_V4_ADDR, &ipv4_du);
cmInetAddr((S8*)CU_IP_V4_ADDR, &ipv4_cu);
-
+ cuCfgParams.sctpParams.duPort = DU_PORT;
+ cuCfgParams.sctpParams.cuPort = CU_PORT;
+#endif
+
cuCfgParams.cuId = CU_ID;
strcpy(cuCfgParams.cuName, CU_NAME);
/* DU IP Address and Port*/
cuCfgParams.sctpParams.duIpAddr.ipV4Addr = ipv4_du;
cuCfgParams.sctpParams.duIpAddr.ipV6Pres = false;
- cuCfgParams.sctpParams.duPort = DU_PORT;
/* CU IP Address and Port*/
cuCfgParams.sctpParams.cuIpAddr.ipV4Addr = ipv4_cu;
cuCfgParams.sctpParams.cuIpAddr.ipV6Pres = false;
- cuCfgParams.sctpParams.cuPort = CU_PORT;
/*PLMN*/
cuCfgParams.plmn.mcc[0] = PLMN_MCC0;
if((ch = getchar()) == 'd')
{
/* Start Pumping data from CU to DU */
- DU_LOG("\nEGTP: Sending DL User Data");
+ DU_LOG("\nDEBUG --> EGTP: Sending DL User Data");
cuEgtpDatReq();
}
}
***************************************************************************/
S16 egtpActvInit()
{
- DU_LOG("\n\nEGTP : Initializing");
+ DU_LOG("\n\nDEBUG --> EGTP : Initializing");
memset (&egtpCb, 0, sizeof(EgtpGlobalCb));
protType = CM_INET_PROTO_UDP;
return ROK;
ret = cuEgtpCfgReq();
if(ret != ROK)
{
- DU_LOG("\nEGTP : Configuration failed");
+ DU_LOG("\nERROR --> EGTP : Configuration failed");
return (ret);
}
ret = cuEgtpSrvOpenReq();
if(ret != ROK)
{
- DU_LOG("\nEGTP : Transport server open request failed");
+ DU_LOG("\nERROR --> EGTP : Transport server open request failed");
return (ret);
}
ret = cuEgtpTnlMgmtReq(tnlEvt);
if(ret != ROK)
{
- DU_LOG("\n EGTP : Tunnel management request failed");
+ DU_LOG("\nERROR --> EGTP : Tunnel management request failed");
return RFAILED;
}
if(ret != ROK)
{
- DU_LOG("\nEGTP : TeId hash list initialization failed");
+ DU_LOG("\nERROR --> EGTP : TeId hash list initialization failed");
return RFAILED;
}
else
{
- DU_LOG("\nEGTP : Configuration successful");
+ DU_LOG("\nINFO --> EGTP : Configuration successful");
}
return ROK;
uint8_t ret;
- DU_LOG("\nEGTP : Received open server request");
+ DU_LOG("\nINFO --> EGTP : Received open server request");
sockType = CM_INET_DGRAM;
if((ret = (cmInetSocket(sockType, &(egtpCb.recvTptSrvr.sockFd), protType))) != ROK)
{
- DU_LOG("\nEGTP : Failed to open UDP socket");
+ DU_LOG("\nERROR --> EGTP : Failed to open UDP socket");
return RFAILED;
}
ret = cmInetBind(&(egtpCb.recvTptSrvr.sockFd), &(egtpCb.recvTptSrvr.addr));
if(ret != ROK)
{
- DU_LOG("\nEGTP : Failed to bind socket");
+ DU_LOG("\nERROR --> EGTP : Failed to bind socket");
return RFAILED;
}
if(ret = (cmInetSocket(sockType, &(egtpCb.dstCb.sendTptSrvr.sockFd), protType)) != ROK)
{
- DU_LOG("\nEGTP : Failed to open UDP socket");
+ DU_LOG("\nERROR --> EGTP : Failed to open UDP socket");
return RFAILED;
}
ret = cmInetBind(&(egtpCb.dstCb.sendTptSrvr.sockFd), &(egtpCb.dstCb.sendTptSrvr.addr));
if(ret != ROK)
{
- DU_LOG("\nEGTP : Failed to bind socket");
+ DU_LOG("\nERROR --> EGTP : Failed to bind socket");
return RFAILED;
}
/* TODO: set socket options */
- DU_LOG("\nEGTP : Receiver socket[%d] and Sender socket[%d] open", egtpCb.recvTptSrvr.sockFd.fd, egtpCb.dstCb.sendTptSrvr.sockFd.fd);
+ DU_LOG("\nINFO --> EGTP : Receiver socket[%d] and Sender socket[%d] open", egtpCb.recvTptSrvr.sockFd.fd,\
+ egtpCb.dstCb.sendTptSrvr.sockFd.fd);
return ROK;
} /* cuEgtpSrvOpenReq */
{
S8 ret;
- DU_LOG("\nEGTP : Received tunnel management request");
+ DU_LOG("\nINFO --> EGTP : Received tunnel management request");
switch(tnlEvt.action)
{
case EGTP_TNL_MGMT_ADD:
}
default:
{
- DU_LOG("\nEGTP : Invalid tunnel management action[%d]", tnlEvt.action);
+ DU_LOG("\nERROR --> EGTP : Invalid tunnel management action[%d]", tnlEvt.action);
ret = RFAILED;
}
}
EgtpMsgHdr preDefHdr; /* pre-define header for this tunnel */
- DU_LOG("\nEGTP : Tunnel addition : LocalTeid[%d] Remote Teid[%d]", tnlEvt.lclTeid, tnlEvt.remTeid);
+ DU_LOG("\nINFO --> EGTP : Tunnel addition : LocalTeid[%d] Remote Teid[%d]", tnlEvt.lclTeid, tnlEvt.remTeid);
CU_ALLOC(teidCb, (Size)sizeof(EgtpTeIdCb));
if(teidCb == NULLP)
{
- DU_LOG("\nEGTP : Memory allocation failed");
+ DU_LOG("\nERROR --> EGTP : Memory allocation failed");
return RFAILED;
}
ret = cmHashListInsert(&(egtpCb.dstCb.teIdLst), (PTR)teidCb, (uint8_t *)&(teidCb->teId), sizeof(uint32_t));
if(ret != ROK)
{
- DU_LOG("\nEGTP : Failed to insert in hash list");
+ DU_LOG("\nERROR --> EGTP : Failed to insert in hash list");
CU_FREE(teidCb, (Size)sizeof(EgtpTeIdCb));
return RFAILED;
}
S16 ret;
EgtpTeIdCb *teidCb = NULLP;
- printf("\nTunnel modification : LocalTeid[%d] Remote Teid[%d]", tnlEvt.lclTeid, tnlEvt.remTeid);
+ DU_LOG("\nDEBUG --> CU_STUB : Tunnel modification : LocalTeid[%d] Remote Teid[%d]", tnlEvt.lclTeid, tnlEvt.remTeid);
cmHashListFind(&(egtpCb.dstCb.teIdLst), (uint8_t *)&(tnlEvt.teId), sizeof(uint32_t), 0, (PTR *)&teidCb);
if(teidCb == NULLP)
{
- printf("\nTunnel id not found");
+ DU_LOG("\nDEBUG --> CU_STUBTunnel id not found");
return RFAILED;
}
{
EgtpTeIdCb *teidCb = NULLP;
- DU_LOG("\nEGTP : Tunnel deletion : Local Teid[%d] Remote Teid[%d]", tnlEvt.lclTeid, tnlEvt.remTeid);
+ DU_LOG("\nDEBUG --> EGTP : Tunnel deletion : Local Teid[%d] Remote Teid[%d]", tnlEvt.lclTeid, tnlEvt.remTeid);
cmHashListFind(&(egtpCb.dstCb.teIdLst), (uint8_t *)&(tnlEvt.lclTeid), sizeof(uint32_t), 0, (PTR *)&teidCb);
if(teidCb == NULLP)
{
- DU_LOG("\nEGTP : Tunnel id[%d] not configured", tnlEvt.lclTeid);
+ DU_LOG("\nERROR --> EGTP : Tunnel id[%d] not configured", tnlEvt.lclTeid);
return RFAILED;
}
ODU_REM_PRE_MSG(&extHdrType, mBuf);
}
- DU_LOG("\nEGTP : Message Buffer after decoding header ");
+ DU_LOG("\nDEBUG --> EGTP : Message Buffer after decoding header ");
ODU_PRINT_MSG(mBuf, 0, 0);
return ROK;
/* Send Message to peer */
while(cnt < 200)
{
- DU_LOG("\nEGTP : Sending message[%d]", cnt+1);
+ DU_LOG("\nDEBUG --> EGTP : Sending message[%d]", cnt+1);
cuEgtpSendMsg(egtpMsg.msg);
cnt++;
}
{
if(ODU_ADD_POST_MSG_MULT((Data *)data, datSize, mBuf) != ROK)
{
- DU_LOG("\nEGTP : ODU_ADD_POST_MSG_MULT failed");
+ DU_LOG("\nERROR --> EGTP : ODU_ADD_POST_MSG_MULT failed");
ODU_PUT_MSG_BUF(mBuf);
return RFAILED;
}
}
else
{
- DU_LOG("\nEGTP : Failed to allocate memory");
+ DU_LOG("\nERROR --> EGTP : Failed to allocate memory");
return RFAILED;
}
cmHashListFind(&(egtpCb.dstCb.teIdLst), (uint8_t *)&(egtpMsg->msgHdr.teId), sizeof(uint32_t), 0, (PTR *)&teidCb);
if(teidCb == NULLP)
{
- DU_LOG("\nEGTP : Tunnel id[%d] not configured", egtpMsg->msgHdr.teId);
+ DU_LOG("\nERROR --> EGTP : Tunnel id[%d] not configured", egtpMsg->msgHdr.teId);
return (LCM_REASON_INVALID_PAR_VAL);
}
ODU_ADD_PRE_MSG_MULT(&teidCb->preEncodedHdr.hdr[hdrLen], (EGTP_MAX_HDR_LEN - hdrLen), egtpMsg->msg);
- DU_LOG("\nEGTP : Sending message buffer");
+ DU_LOG("\nDEBUG --> EGTP : Sending message buffer");
ODU_PRINT_MSG(egtpMsg->msg, 0, 0);
return ROK;
ret = cmInetSendMsg(&(egtpCb.dstCb.sendTptSrvr.sockFd), &dstAddr, &info, mBuf, &txLen, CM_INET_NO_FLAG);
if(ret != ROK && ret != RWOULDBLOCK)
{
- DU_LOG("\nEGTP : Message send failure");
+ DU_LOG("\nERROR --> EGTP : Message send failure");
return RFAILED;
}
- DU_LOG("\nEGTP : Message Sent");
+ DU_LOG("\nDEBUG --> EGTP : Message Sent");
return ROK;
}
***************************************************************************/
S16 sctpActvInit()
{
- DU_LOG("\n\nSCTP : Initializing");
+ DU_LOG("\n\nDEBUG --> SCTP : Initializing");
connUp = FALSE;
assocId = 0;
nonblocking = FALSE;
if((ret = cmInetSocket(socket_type, &f1Params.lstnSockFd, IPPROTO_SCTP) != ROK))
{
- DU_LOG("\nSCTP : Socket[%d] coudnt open for listening", f1Params.lstnSockFd.fd);
+ DU_LOG("\nERROR --> SCTP : Socket[%d] coudnt open for listening", f1Params.lstnSockFd.fd);
}
else if((ret = cmInetSctpBindx(&f1Params.lstnSockFd, &f1Params.localAddrLst, f1Params.srcPort)) != ROK)
{
- DU_LOG("\nSCTP: Binding failed at CU");
+ DU_LOG("\nERROR --> SCTP: Binding failed at CU");
}
else if((ret = sctpAccept(&f1Params.lstnSockFd, &f1Params.peerAddr, &f1Params.sockFd)) != ROK)
{
- DU_LOG("\nSCTP: Unable to accept the connection at CU");
+ DU_LOG("\nERROR --> SCTP: Unable to accept the connection at CU");
}
else if(sctpSockPoll() != ROK)
{
- DU_LOG("\nSCTP: Polling failed to start at CU");
+ DU_LOG("\nERROR --> SCTP: Polling failed to start at CU");
}
return (ret);
}
ret = cmInetListen(lstnSock_Fd, 1);
if (ret != ROK)
{
- DU_LOG("\nSCTP : Listening on socket failed");
+ DU_LOG("\nERROR --> SCTP : Listening on socket failed");
cmInetClose(lstnSock_Fd);
return RFAILED;
}
- DU_LOG("\nSCTP : Connecting");
+ DU_LOG("\nINFO --> SCTP : Connecting");
while(!connUp)
{
}
else if(ret != ROK)
{
- DU_LOG("\nSCTP : Failed to accept connection");
+ DU_LOG("\nERROR --> SCTP : Failed to accept connection");
return RFAILED;
}
else
break;
}
}
- DU_LOG("\nSCTP : Connection established");
+ DU_LOG("\nINFO --> SCTP : Connection established");
return ROK;
}
switch(ntfy->header.nType)
{
case CM_INET_SCTP_ASSOC_CHANGE :
- DU_LOG("\nSCTP : Assoc change notification received");
+ DU_LOG("\nINFO --> SCTP : Assoc change notification received");
switch(ntfy->u.assocChange.state)
{
case CM_INET_SCTP_COMM_UP:
- DU_LOG("Event : COMMUNICATION UP");
+ DU_LOG("DEBUG --> Event : COMMUNICATION UP");
connUp = TRUE;
break;
case CM_INET_SCTP_COMM_LOST:
- DU_LOG("Event : COMMUNICATION LOST");
+ DU_LOG("DEBUG --> Event : COMMUNICATION LOST");
connUp = FALSE;
break;
case CM_INET_SCTP_RESTART:
- DU_LOG("Event : SCTP RESTART");
+ DU_LOG("DEBUG --> Event : SCTP RESTART");
connUp = FALSE;
break;
case CM_INET_SCTP_SHUTDOWN_COMP: /* association gracefully shutdown */
- DU_LOG("Event : SHUTDOWN COMPLETE");
+ DU_LOG("DEBUG --> Event : SHUTDOWN COMPLETE");
connUp = FALSE;
break;
case CM_INET_SCTP_CANT_STR_ASSOC:
- DU_LOG("Event : CANT START ASSOC");
+ DU_LOG("DEBUG --> Event : CANT START ASSOC");
connUp = FALSE;
break;
default:
- DU_LOG("\nInvalid event");
+ DU_LOG("\nERROR --> Invalid event");
break;
}
break;
case CM_INET_SCTP_PEER_ADDR_CHANGE :
- DU_LOG("\nSCTP : Peer Address Change notificarion received");
+ DU_LOG("\nINFO --> SCTP : Peer Address Change notificarion received");
/* Need to add handler */
break;
case CM_INET_SCTP_REMOTE_ERROR :
- DU_LOG("\nSCTP : Remote Error notification received");
+ DU_LOG("\nINFO --> SCTP : Remote Error notification received");
break;
case CM_INET_SCTP_SEND_FAILED :
- DU_LOG("\nSCTP : Send Failed notification received\n");
+ DU_LOG("\nINFO --> SCTP : Send Failed notification received\n");
break;
case CM_INET_SCTP_SHUTDOWN_EVENT : /* peer socket gracefully closed */
- DU_LOG("\nSCTP : Shutdown Event notification received\n");
+ DU_LOG("\nINFO --> SCTP : Shutdown Event notification received\n");
connUp = FALSE;
exit(0);
break;
case CM_INET_SCTP_ADAPTATION_INDICATION :
- DU_LOG("\nSCTP : Adaptation Indication received\n");
+ DU_LOG("\nINFO --> SCTP : Adaptation Indication received\n");
break;
case CM_INET_SCTP_PARTIAL_DELIVERY_EVENT:
- DU_LOG("\nSCTP : Partial Delivery Event received\n");
+ DU_LOG("\nINFO --> SCTP : Partial Delivery Event received\n");
break;
default:
- DU_LOG("\nSCTP : Invalid notification type\n");
+ DU_LOG("\nERROR --> SCTP : Invalid notification type\n");
break;
}
{
if((ret = processPolling(&f1PollParams, &f1Params.sockFd, timeoutPtr, &memInfo)) != ROK)
{
- DU_LOG("\nSCTP : Failed to RecvMsg for F1 at CU\n");
+ DU_LOG("\nERROR --> SCTP : Failed to RecvMsg for F1 at CU\n");
}
/* Receiving EGTP data */
ret = cmInetRecvMsg(&(egtpCb.recvTptSrvr.sockFd), &egtpFromAddr, &memInfo, &egtpBuf, &egtpBufLen, CM_INET_NO_FLAG);
if(ret == ROK && egtpBuf != NULLP)
{
- DU_LOG("\nEGTP : Received message \n");
+ DU_LOG("\nINFO --> EGTP : Received message \n");
ODU_PRINT_MSG(egtpBuf, 0 ,0);
cuEgtpHdlRecvMsg(egtpBuf);
ret = sctpNtfyHdlr(&pollParams->ntfy);
if(ret != ROK)
{
- DU_LOG("\nSCTP : Failed to process sctp notify msg\n");
+ DU_LOG("\nERROR --> SCTP : Failed to process sctp notify msg\n");
}
}
else if(connUp & (pollParams->port == f1Params.destPort))
if(ret != ROK && ret != RWOULDBLOCK)
{
- DU_LOG("\nSCTP : Send message failed");
+ DU_LOG("\nERROR --> SCTP : Send message failed");
return RFAILED;
}
#include "BWP-DownlinkCommon.h"
#include "BWP-UplinkCommon.h"
+#ifdef O1_ENABLE
+
+#include "Config.h"
+extern StartupConfig g_cfg;
+
+#endif
+
DuCfgParams duCfgParam;
char encBuf[ENC_BUF_MAX_LEN];
uint8_t slot = 0;
uint8_t symbol =0;
- memset(duCfgParam.macCellCfg.tddCfg.slotCfg, 0, sizeof(duCfgParam.macCellCfg.tddCfg.slotCfg[0][0]*\
- MAXIMUM_TDD_PERIODICITY*MAX_SYMB_PER_SLOT));
+ memset(duCfgParam.macCellCfg.tddCfg.slotCfg, 0, sizeof(duCfgParam.macCellCfg.tddCfg.slotCfg[slot][symbol]* \
+ MAX_TDD_PERIODICITY_SLOTS*MAX_SYMB_PER_SLOT));
- //Filling the DL Slots
- for(slot =0; slot < NUM_DL_SLOTS; slot++)
+ //Filling the DL Slots and initializing flexi slot
+ for(slot = 0; slot <= NUM_DL_SLOTS; slot++)
{
for(symbol =0; symbol < MAX_SYMB_PER_SLOT; symbol++)
{
duCfgParam.macCellCfg.tddCfg.slotCfg[slot][symbol] = DL_SLOT;
}
}
-
- //Filling the Flexi Slot
- for(symbol =0; symbol < NUM_DL_SYMBOLS; symbol++)
- {
- duCfgParam.macCellCfg.tddCfg.slotCfg[GUARD_SLOT_IDX][symbol] = DL_SLOT;
- }
- duCfgParam.macCellCfg.tddCfg.slotCfg[GUARD_SLOT_IDX][symbol] = GUARD_SLOT;
- symbol++;
- duCfgParam.macCellCfg.tddCfg.slotCfg[GUARD_SLOT_IDX][symbol] = UL_SLOT;
-
- //Filling the UL Slot
- for(slot = GUARD_SLOT_IDX + 1; slot < MAXIMUM_TDD_PERIODICITY; slot++)
+
+ //Filling UL Slots
+ for(slot = NUM_DL_SLOTS+1; slot <= NUM_DL_SLOTS+NUM_UL_SLOTS; slot++)
{
- for(symbol =0; symbol < MAX_SYMB_PER_SLOT; symbol++)
- {
+ for(symbol = 0; symbol < MAX_SYMB_PER_SLOT; symbol++)
duCfgParam.macCellCfg.tddCfg.slotCfg[slot][symbol] = UL_SLOT;
- }
- }
+ }
+ //Updating Flexi Slot
+ slot = NUM_DL_SLOTS;
+ duCfgParam.macCellCfg.tddCfg.slotCfg[slot][12] = FLEXI_SLOT;
+ duCfgParam.macCellCfg.tddCfg.slotCfg[slot][13] = UL_SLOT;
}
#endif
* ****************************************************************/
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] = DU_PORT; /* DU Port idx 0 38472 */
duPort[E2_INTERFACE] = RIC_PORT; /* RIC Port idx 1 38482 */
-
+#endif
return ROK;
}
MibParams mib;
Sib1Params sib1;
+#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 = CU_PORT;
+ duCfgParam.sctpParams.ricPort = RIC_PORT;
+#endif
+
fillDuPort(duCfgParam.sctpParams.duPort);
/* F1 DU IP Address and Port*/
/* F1 CU IP Address and Port*/
duCfgParam.sctpParams.cuIpAddr.ipV4Addr = ipv4_cu;
- duCfgParam.sctpParams.cuPort = CU_PORT;
/* Fill RIC Params */
duCfgParam.sctpParams.ricIpAddr.ipV4Addr = ipv4_ric;
- duCfgParam.sctpParams.ricPort = RIC_PORT;
+
/* EGTP Parameters */
duCfgParam.egtpParams.localIp.ipV4Pres = TRUE;
duCfgParam.egtpParams.localIp.ipV4Addr = ipv4_du;
/* MACROS */
#define DU_INST 0
#define DU_ID 1
+
+#ifndef O1_ENABLE
+
#define DU_IP_V4_ADDR "192.168.130.81"
#define CU_IP_V4_ADDR "192.168.130.82"
#define RIC_IP_V4_ADDR "192.168.130.80"
#define DU_PORT 38472
#define CU_PORT 38472
#define RIC_PORT 36422 /* using X2 port since E2 port not defined */
+
+#endif
+
#define DU_EGTP_PORT 39001
#define CU_EGTP_PORT 39002
#define NR_PCI 1
#define NR_CELL_ID 1
#define NR_NUMEROLOGY 0
+
#define DU_NAME "ORAN_OAM_DU"
#define CELL_TYPE SMALL
#define DUPLEX_MODE DUP_MODE_FDD
+
+#ifdef NR_TDD
+#define DUPLEX_MODE DUP_MODE_TDD
+#endif
+
#define DU_TAC 1
#define PLMN_MCC0 3
#define PLMN_MCC1 1
}
static void signal_segv(int signum, siginfo_t * info, void *ptr)
{
- static const char *si_codes[3] = { "", "SEGV_MAPERR", "SEGV_ACCERR" };
- int sz;
- int i;
- ucontext_t *ucontext = (ucontext_t *) ptr;
+ static const char *si_codes[3] = { "", "SEGV_MAPERR", "SEGV_ACCERR" };
+ int sz;
+ int i;
+ ucontext_t *ucontext = (ucontext_t *) ptr;
#ifdef XEON_SPECIFIC_CHANGES
#else
- int *p32 = (int *) 0x2fff0000;
+ int *p32 = (int *) 0x2fff0000;
#endif
- void *buffer[100];
- char **strings;
+ void *buffer[100];
+ char **strings;
- printf("segv ooops @ %p\n", info->si_addr);
- my_buffer2[0] = 1;
+ printf("\nsegv ooops @ %p\n", info->si_addr);
+ my_buffer2[0] = 1;
- printf("Segmentation Fault!\n");
- printf("info.si_signo = %d\n", signum);
- printf("info.si_errno = %d\n", info->si_errno);
- printf("info.si_code = %d (%s)\n", info->si_code, si_codes[info->si_code]);
- printf("info.si_addr = %p\n", info->si_addr);
+ printf("\nSegmentation Fault!\n");
+ printf("\ninfo.si_signo = %d\n", signum);
+ printf("\ninfo.si_errno = %d\n", info->si_errno);
+ printf("\ninfo.si_code = %d (%s)\n", info->si_code, si_codes[info->si_code]);
+ printf("\ninfo.si_addr = %p\n", info->si_addr);
- memcpy(&my_uc_mcontext, &ucontext->uc_mcontext, sizeof(struct sigcontext));
+ memcpy(&my_uc_mcontext, &ucontext->uc_mcontext, sizeof(struct sigcontext));
- i = 0;
+ i = 0;
#ifndef RGL_SPECIFIC_CHANGES
- printf("reg[%02d] = 0x" REGFORMAT, i++, (unsigned int)ucontext->uc_mcontext.arm_r0);
- printf("reg[%02d] = 0x" REGFORMAT, i++, (unsigned int)ucontext->uc_mcontext.arm_r1);
- printf("reg[%02d] = 0x" REGFORMAT, i++, (unsigned int)ucontext->uc_mcontext.arm_r2);
- printf("reg[%02d] = 0x" REGFORMAT, i++, (unsigned int)ucontext->uc_mcontext.arm_r3);
- printf("reg[%02d] = 0x" REGFORMAT, i++, (unsigned int)ucontext->uc_mcontext.arm_r4);
- printf("reg[%02d] = 0x" REGFORMAT, i++, (unsigned int)ucontext->uc_mcontext.arm_r5);
- printf("reg[%02d] = 0x" REGFORMAT, i++, (unsigned int)ucontext->uc_mcontext.arm_r6);
- printf("reg[%02d] = 0x" REGFORMAT, i++, (unsigned int)ucontext->uc_mcontext.arm_r7);
- printf("reg[%02d] = 0x" REGFORMAT, i++, (unsigned int)ucontext->uc_mcontext.arm_r8);
- printf("reg[%02d] = 0x" REGFORMAT, i++, (unsigned int)ucontext->uc_mcontext.arm_r9);
- printf("reg[%02d] = 0x" REGFORMAT, i++, (unsigned int)ucontext->uc_mcontext.arm_r10);
- printf("reg[%02d] = 0x" REGFORMAT, i++, (unsigned int)ucontext->uc_mcontext.arm_fp);
- printf("reg[%02d] = 0x" REGFORMAT, i++, (unsigned int)ucontext->uc_mcontext.arm_ip);
- printf("reg[sp] = 0x" REGFORMAT, (unsigned int)ucontext->uc_mcontext.arm_sp);
- printf("reg[lr] = 0x" REGFORMAT, (unsigned int)ucontext->uc_mcontext.arm_lr);
- printf("reg[pc] = 0x" REGFORMAT, (unsigned int)ucontext->uc_mcontext.arm_pc);
- printf("reg[cpsr] = 0x" REGFORMAT, (unsigned int)ucontext->uc_mcontext.arm_cpsr);
-#endif
-
- printf("Stack trace (non-dedicated):\n");
-
- sz = backtrace(buffer, 50);
- strings = backtrace_symbols(buffer, sz);
- for (i = 0; i < sz; ++i)
- printf("%s\n", strings[i]);
-
- printf("End of stack trace.");
+ printf("\nreg[%02d] = 0x" REGFORMAT, i++, (unsigned int)ucontext->uc_mcontext.arm_r0);
+ printf("\nreg[%02d] = 0x" REGFORMAT, i++, (unsigned int)ucontext->uc_mcontext.arm_r1);
+ printf("\nreg[%02d] = 0x" REGFORMAT, i++, (unsigned int)ucontext->uc_mcontext.arm_r2);
+ printf("\nreg[%02d] = 0x" REGFORMAT, i++, (unsigned int)ucontext->uc_mcontext.arm_r3);
+ printf("\nreg[%02d] = 0x" REGFORMAT, i++, (unsigned int)ucontext->uc_mcontext.arm_r4);
+ printf("\nreg[%02d] = 0x" REGFORMAT, i++, (unsigned int)ucontext->uc_mcontext.arm_r5);
+ printf("\nreg[%02d] = 0x" REGFORMAT, i++, (unsigned int)ucontext->uc_mcontext.arm_r6);
+ printf("\nreg[%02d] = 0x" REGFORMAT, i++, (unsigned int)ucontext->uc_mcontext.arm_r7);
+ printf("\nreg[%02d] = 0x" REGFORMAT, i++, (unsigned int)ucontext->uc_mcontext.arm_r8);
+ printf("\nreg[%02d] = 0x" REGFORMAT, i++, (unsigned int)ucontext->uc_mcontext.arm_r9);
+ printf("\nreg[%02d] = 0x" REGFORMAT, i++, (unsigned int)ucontext->uc_mcontext.arm_r10);
+ printf("\nreg[%02d] = 0x" REGFORMAT, i++, (unsigned int)ucontext->uc_mcontext.arm_fp);
+ printf("\nreg[%02d] = 0x" REGFORMAT, i++, (unsigned int)ucontext->uc_mcontext.arm_ip);
+ printf("\nreg[sp] = 0x" REGFORMAT, (unsigned int)ucontext->uc_mcontext.arm_sp);
+ printf("\nreg[lr] = 0x" REGFORMAT, (unsigned int)ucontext->uc_mcontext.arm_lr);
+ printf("\nreg[pc] = 0x" REGFORMAT, (unsigned int)ucontext->uc_mcontext.arm_pc);
+ printf("\nreg[cpsr] = 0x" REGFORMAT, (unsigned int)ucontext->uc_mcontext.arm_cpsr);
+#endif
+
+ printf("\nStack trace (non-dedicated):\n");
+
+ sz = backtrace(buffer, 50);
+ strings = backtrace_symbols(buffer, sz);
+ for (i = 0; i < sz; ++i)
+ printf("%s\n", strings[i]);
+
+ printf("\nEnd of stack trace\n");
#ifdef XEON_SPECIFIC_CHANGES
#else
- p32[0] = 1;
-#endif
-
- /* Lets first print our debug information */
- printf("Before dumping our Debug info\n");
- mtStopHndlr();
- printf("After dumping our Debug info\n");
-
- /* Disable the signal and make the enodeb to dump. This will make
- * eNB to generate the core with dumping the ccpu log
- */
- {
- char *abc = NULL;
- mtDelSigals();
- *abc = 100;
- }
- /* End printing debug information */
- exit(1);
- /*while (1);*/
+ p32[0] = 1;
+#endif
+
+ /* Lets first print our debug information */
+ printf("\nBefore dumping our Debug info\n");
+ mtStopHndlr();
+ printf("\nAfter dumping our Debug info\n");
+
+ /* Disable the signal and make the enodeb to dump. This will make
+ * eNB to generate the core with dumping the ccpu log
+ */
+ {
+ char *abc = NULL;
+ mtDelSigals();
+ *abc = 100;
+ }
+ /* End printing debug information */
+ exit(1);
+ /*while (1);*/
}
#endif
/*** TBD: IMPORTANT ***
pthread_t tmpRegTidMap[20];
uint8_t stopBtInfo;
- S16 SGlobMemInfoShow(void);
+S16 SGlobMemInfoShow(void);
#endif /* SS_LOCKLESS_MEMORY */
#ifdef L2_L3_SPLIT
/* mt003.301 Modifications - Moved to ss_gen.x */
#ifdef TENB_T2K3K_SPECIFIC_CHANGES
Void *mtTskHdlrT2kL2 ARGS((Void*));
- void mtSigSegvHndlr ARGS((void));
- void mtSigUsr2Hndlr ARGS((void));
+void mtSigSegvHndlr ARGS((void));
+void mtSigUsr2Hndlr ARGS((void));
#endif
static S16 ssdSetPthreadAttr ARGS ((S32 tskPrior, pthread_attr_t *attr));
#endif
/* mt033.201 - addition of local function to print the statistics such as
-* (size vs. numAttempts) and (allocations vs. deallocations)
-*/
+ * (size vs. numAttempts) and (allocations vs. deallocations)
+ */
#ifdef SSI_DEBUG_LEVEL1
static S16 SPrintRegMemStats ARGS((Region region));
#endif /* SSI_DEBUG_LEVEL1 */
#ifdef SS_THR_REG_MAP
S32 ssCheckAndAddMemoryRegionMap ARGS((pthread_t threadId,
- Region region));
+ Region region));
S32 ssCheckAndDelMemoryRegionMap ARGS((pthread_t threadId));
#endif /* SS_THR_REG_MAP */
\f
{
SS_DFLT_REGION, SS_MAX_POOLS_PER_REG - 1,
{
- { SS_POOL_DYNAMIC, MT_POOL_0_DSIZE },
- { SS_POOL_DYNAMIC, MT_POOL_1_DSIZE },
- { SS_POOL_DYNAMIC, MT_POOL_2_DSIZE },
- { SS_POOL_DYNAMIC, MT_POOL_3_DSIZE },
+ { SS_POOL_DYNAMIC, MT_POOL_0_DSIZE },
+ { SS_POOL_DYNAMIC, MT_POOL_1_DSIZE },
+ { SS_POOL_DYNAMIC, MT_POOL_2_DSIZE },
+ { SS_POOL_DYNAMIC, MT_POOL_3_DSIZE },
{ SS_POOL_DYNAMIC, MT_POOL_4_DSIZE },
- { SS_POOL_STATIC, 0 }
+ { SS_POOL_STATIC, 0 }
}
}
#ifdef INTEL_WLS
,
- {
- SS_DFLT_REGION + 1, SS_MAX_POOLS_PER_REG - 1,
{
- { SS_POOL_DYNAMIC, MT_POOL_0_DSIZE },
- { SS_POOL_DYNAMIC, MT_POOL_1_DSIZE },
- { SS_POOL_DYNAMIC, MT_POOL_2_DSIZE },
- { SS_POOL_DYNAMIC, MT_POOL_3_DSIZE },
- { SS_POOL_STATIC, 0 }
+ SS_DFLT_REGION + 1, SS_MAX_POOLS_PER_REG - 1,
+ {
+ { SS_POOL_DYNAMIC, MT_POOL_0_DSIZE },
+ { SS_POOL_DYNAMIC, MT_POOL_1_DSIZE },
+ { SS_POOL_DYNAMIC, MT_POOL_2_DSIZE },
+ { SS_POOL_DYNAMIC, MT_POOL_3_DSIZE },
+ { SS_POOL_STATIC, 0 }
+ }
}
- }
#endif /* INTEL_WLS */
#ifdef SS_LOCKLESS_MEMORY
,
- {
- SS_DFLT_REGION + 1, SS_MAX_POOLS_PER_REG - 1,
{
- { SS_POOL_DYNAMIC, MT_POOL_0_DSIZE },
- { SS_POOL_DYNAMIC, MT_POOL_1_DSIZE },
- { SS_POOL_DYNAMIC, MT_POOL_2_DSIZE },
- { SS_POOL_DYNAMIC, MT_POOL_3_DSIZE },
- { SS_POOL_DYNAMIC, MT_POOL_4_DSIZE },
- { SS_POOL_STATIC, 0 }
- }
- },
- {
- SS_DFLT_REGION + 2, SS_MAX_POOLS_PER_REG - 1,
+ SS_DFLT_REGION + 1, SS_MAX_POOLS_PER_REG - 1,
+ {
+ { SS_POOL_DYNAMIC, MT_POOL_0_DSIZE },
+ { SS_POOL_DYNAMIC, MT_POOL_1_DSIZE },
+ { SS_POOL_DYNAMIC, MT_POOL_2_DSIZE },
+ { SS_POOL_DYNAMIC, MT_POOL_3_DSIZE },
+ { SS_POOL_DYNAMIC, MT_POOL_4_DSIZE },
+ { SS_POOL_STATIC, 0 }
+ }
+ },
{
- { SS_POOL_DYNAMIC, MT_POOL_0_DSIZE },
- { SS_POOL_DYNAMIC, MT_POOL_1_DSIZE },
- { SS_POOL_DYNAMIC, MT_POOL_2_DSIZE },
- { SS_POOL_DYNAMIC, MT_POOL_3_DSIZE },
- { SS_POOL_DYNAMIC, MT_POOL_4_DSIZE },
- { SS_POOL_STATIC, 0 }
- }
- },
- {
- SS_DFLT_REGION + 3, SS_MAX_POOLS_PER_REG - 1,
+ SS_DFLT_REGION + 2, SS_MAX_POOLS_PER_REG - 1,
+ {
+ { SS_POOL_DYNAMIC, MT_POOL_0_DSIZE },
+ { SS_POOL_DYNAMIC, MT_POOL_1_DSIZE },
+ { SS_POOL_DYNAMIC, MT_POOL_2_DSIZE },
+ { SS_POOL_DYNAMIC, MT_POOL_3_DSIZE },
+ { SS_POOL_DYNAMIC, MT_POOL_4_DSIZE },
+ { SS_POOL_STATIC, 0 }
+ }
+ },
{
- { SS_POOL_DYNAMIC, MT_POOL_0_DSIZE },
- { SS_POOL_DYNAMIC, MT_POOL_1_DSIZE },
- { SS_POOL_DYNAMIC, MT_POOL_2_DSIZE },
- { SS_POOL_DYNAMIC, MT_POOL_3_DSIZE },
- { SS_POOL_DYNAMIC, MT_POOL_4_DSIZE },
- { SS_POOL_STATIC, 0 }
- }
- },
- {
- SS_DFLT_REGION + 4, SS_MAX_POOLS_PER_REG - 1,
+ SS_DFLT_REGION + 3, SS_MAX_POOLS_PER_REG - 1,
+ {
+ { SS_POOL_DYNAMIC, MT_POOL_0_DSIZE },
+ { SS_POOL_DYNAMIC, MT_POOL_1_DSIZE },
+ { SS_POOL_DYNAMIC, MT_POOL_2_DSIZE },
+ { SS_POOL_DYNAMIC, MT_POOL_3_DSIZE },
+ { SS_POOL_DYNAMIC, MT_POOL_4_DSIZE },
+ { SS_POOL_STATIC, 0 }
+ }
+ },
{
- { SS_POOL_DYNAMIC, MT_POOL_0_DSIZE },
- { SS_POOL_DYNAMIC, MT_POOL_1_DSIZE },
- { SS_POOL_DYNAMIC, MT_POOL_2_DSIZE },
- { SS_POOL_DYNAMIC, MT_POOL_3_DSIZE },
- { SS_POOL_DYNAMIC, MT_POOL_4_DSIZE },
- { SS_POOL_STATIC, 0 }
- }
- },
- {
- SS_DFLT_REGION + 5, SS_MAX_POOLS_PER_REG - 1,
+ SS_DFLT_REGION + 4, SS_MAX_POOLS_PER_REG - 1,
+ {
+ { SS_POOL_DYNAMIC, MT_POOL_0_DSIZE },
+ { SS_POOL_DYNAMIC, MT_POOL_1_DSIZE },
+ { SS_POOL_DYNAMIC, MT_POOL_2_DSIZE },
+ { SS_POOL_DYNAMIC, MT_POOL_3_DSIZE },
+ { SS_POOL_DYNAMIC, MT_POOL_4_DSIZE },
+ { SS_POOL_STATIC, 0 }
+ }
+ },
{
- { SS_POOL_DYNAMIC, MT_POOL_0_DSIZE },
- { SS_POOL_DYNAMIC, MT_POOL_1_DSIZE },
- { SS_POOL_DYNAMIC, MT_POOL_2_DSIZE },
- { SS_POOL_DYNAMIC, MT_POOL_3_DSIZE },
- { SS_POOL_DYNAMIC, MT_POOL_4_DSIZE },
- { SS_POOL_STATIC, 0 }
- }
- },
- {
- SS_DFLT_REGION + 6, SS_MAX_POOLS_PER_REG - 1,
+ SS_DFLT_REGION + 5, SS_MAX_POOLS_PER_REG - 1,
+ {
+ { SS_POOL_DYNAMIC, MT_POOL_0_DSIZE },
+ { SS_POOL_DYNAMIC, MT_POOL_1_DSIZE },
+ { SS_POOL_DYNAMIC, MT_POOL_2_DSIZE },
+ { SS_POOL_DYNAMIC, MT_POOL_3_DSIZE },
+ { SS_POOL_DYNAMIC, MT_POOL_4_DSIZE },
+ { SS_POOL_STATIC, 0 }
+ }
+ },
{
- { SS_POOL_DYNAMIC, MT_POOL_0_DSIZE },
- { SS_POOL_DYNAMIC, MT_POOL_1_DSIZE },
- { SS_POOL_DYNAMIC, MT_POOL_2_DSIZE },
- { SS_POOL_DYNAMIC, MT_POOL_3_DSIZE },
- { SS_POOL_DYNAMIC, MT_POOL_4_DSIZE },
- { SS_POOL_STATIC, 0 }
+ SS_DFLT_REGION + 6, SS_MAX_POOLS_PER_REG - 1,
+ {
+ { SS_POOL_DYNAMIC, MT_POOL_0_DSIZE },
+ { SS_POOL_DYNAMIC, MT_POOL_1_DSIZE },
+ { SS_POOL_DYNAMIC, MT_POOL_2_DSIZE },
+ { SS_POOL_DYNAMIC, MT_POOL_3_DSIZE },
+ { SS_POOL_DYNAMIC, MT_POOL_4_DSIZE },
+ { SS_POOL_STATIC, 0 }
+ }
}
- }
#endif /* SS_LOCKLESS_MEMORY */
};
#ifdef SS_LOCKLESS_MEMORY
MtDynMemCfg mtDynMemoCfg =
{
- SS_MAX_REGS, /* number of regions */
- {
- {
- SS_DFLT_REGION, /* region id */
- MT_MAX_BKTS, /* number of buckets */
- {
- /* block size, no. of blocks, Upper threshold, lower threshold */
- {SS_BLK_RELEASE_THRESHOLD, SS_BLK_ACQUIRE_THRESHOLD},
- {SS_BLK_RELEASE_THRESHOLD, SS_BLK_ACQUIRE_THRESHOLD},
- {SS_BLK_RELEASE_THRESHOLD, SS_BLK_ACQUIRE_THRESHOLD},
- {SS_BLK_RELEASE_THRESHOLD, SS_BLK_ACQUIRE_THRESHOLD},
- {SS_BLK_RELEASE_THRESHOLD, SS_BLK_ACQUIRE_THRESHOLD}
- }
- },
- {
- SS_DFLT_REGION + 1, /* region id */
- MT_MAX_BKTS, /* number of buckets */
- {
- /* block size, no. of blocks, Upper threshold, lower threshold */
- {SS_BLK_RELEASE_THRESHOLD, SS_BLK_ACQUIRE_THRESHOLD},
- {SS_BLK_RELEASE_THRESHOLD, SS_BLK_ACQUIRE_THRESHOLD},
- {SS_BLK_RELEASE_THRESHOLD, SS_BLK_ACQUIRE_THRESHOLD},
- {SS_BLK_RELEASE_THRESHOLD, SS_BLK_ACQUIRE_THRESHOLD},
- {SS_BLK_RELEASE_THRESHOLD, SS_BLK_ACQUIRE_THRESHOLD}
- }
- },
- {
- SS_DFLT_REGION + 2, /* region id */
- MT_MAX_BKTS, /* number of buckets */
- {
- /* block size, no. of blocks, Upper threshold, lower threshold */
- {SS_BLK_RELEASE_THRESHOLD, SS_BLK_ACQUIRE_THRESHOLD},
- {SS_BLK_RELEASE_THRESHOLD, SS_BLK_ACQUIRE_THRESHOLD},
- {SS_BLK_RELEASE_THRESHOLD, SS_BLK_ACQUIRE_THRESHOLD},
- {SS_BLK_RELEASE_THRESHOLD, SS_BLK_ACQUIRE_THRESHOLD},
- {SS_BLK_RELEASE_THRESHOLD, SS_BLK_ACQUIRE_THRESHOLD}
- }
- },
+ SS_MAX_REGS, /* number of regions */
+ {
+ {
+ SS_DFLT_REGION, /* region id */
+ MT_MAX_BKTS, /* number of buckets */
+ {
+ /* block size, no. of blocks, Upper threshold, lower threshold */
+ {SS_BLK_RELEASE_THRESHOLD, SS_BLK_ACQUIRE_THRESHOLD},
+ {SS_BLK_RELEASE_THRESHOLD, SS_BLK_ACQUIRE_THRESHOLD},
+ {SS_BLK_RELEASE_THRESHOLD, SS_BLK_ACQUIRE_THRESHOLD},
+ {SS_BLK_RELEASE_THRESHOLD, SS_BLK_ACQUIRE_THRESHOLD},
+ {SS_BLK_RELEASE_THRESHOLD, SS_BLK_ACQUIRE_THRESHOLD}
+ }
+ },
+ {
+ SS_DFLT_REGION + 1, /* region id */
+ MT_MAX_BKTS, /* number of buckets */
+ {
+ /* block size, no. of blocks, Upper threshold, lower threshold */
+ {SS_BLK_RELEASE_THRESHOLD, SS_BLK_ACQUIRE_THRESHOLD},
+ {SS_BLK_RELEASE_THRESHOLD, SS_BLK_ACQUIRE_THRESHOLD},
+ {SS_BLK_RELEASE_THRESHOLD, SS_BLK_ACQUIRE_THRESHOLD},
+ {SS_BLK_RELEASE_THRESHOLD, SS_BLK_ACQUIRE_THRESHOLD},
+ {SS_BLK_RELEASE_THRESHOLD, SS_BLK_ACQUIRE_THRESHOLD}
+ }
+ },
+ {
+ SS_DFLT_REGION + 2, /* region id */
+ MT_MAX_BKTS, /* number of buckets */
+ {
+ /* block size, no. of blocks, Upper threshold, lower threshold */
+ {SS_BLK_RELEASE_THRESHOLD, SS_BLK_ACQUIRE_THRESHOLD},
+ {SS_BLK_RELEASE_THRESHOLD, SS_BLK_ACQUIRE_THRESHOLD},
+ {SS_BLK_RELEASE_THRESHOLD, SS_BLK_ACQUIRE_THRESHOLD},
+ {SS_BLK_RELEASE_THRESHOLD, SS_BLK_ACQUIRE_THRESHOLD},
+ {SS_BLK_RELEASE_THRESHOLD, SS_BLK_ACQUIRE_THRESHOLD}
+ }
+ },
{
- SS_DFLT_REGION + 3, /* region id */
- MT_MAX_BKTS, /* number of buckets */
- {
- /* block size, no. of blocks, Upper threshold, lower threshold */
- {SS_BLK_RELEASE_THRESHOLD, SS_BLK_ACQUIRE_THRESHOLD},
- {SS_BLK_RELEASE_THRESHOLD, SS_BLK_ACQUIRE_THRESHOLD},
- {SS_BLK_RELEASE_THRESHOLD, SS_BLK_ACQUIRE_THRESHOLD},
- {SS_BLK_RELEASE_THRESHOLD, SS_BLK_ACQUIRE_THRESHOLD},
- {SS_BLK_RELEASE_THRESHOLD, SS_BLK_ACQUIRE_THRESHOLD}
- }
- },
+ SS_DFLT_REGION + 3, /* region id */
+ MT_MAX_BKTS, /* number of buckets */
+ {
+ /* block size, no. of blocks, Upper threshold, lower threshold */
+ {SS_BLK_RELEASE_THRESHOLD, SS_BLK_ACQUIRE_THRESHOLD},
+ {SS_BLK_RELEASE_THRESHOLD, SS_BLK_ACQUIRE_THRESHOLD},
+ {SS_BLK_RELEASE_THRESHOLD, SS_BLK_ACQUIRE_THRESHOLD},
+ {SS_BLK_RELEASE_THRESHOLD, SS_BLK_ACQUIRE_THRESHOLD},
+ {SS_BLK_RELEASE_THRESHOLD, SS_BLK_ACQUIRE_THRESHOLD}
+ }
+ },
+ {
+ SS_DFLT_REGION + 4, /* region id */
+ MT_MAX_BKTS, /* number of buckets */
+ {
+ /* block size, no. of blocks, Upper threshold, lower threshold */
+ {SS_BLK_RELEASE_THRESHOLD, SS_BLK_ACQUIRE_THRESHOLD},
+ {SS_BLK_RELEASE_THRESHOLD, SS_BLK_ACQUIRE_THRESHOLD},
+ {SS_BLK_RELEASE_THRESHOLD, SS_BLK_ACQUIRE_THRESHOLD},
+ {SS_BLK_RELEASE_THRESHOLD, SS_BLK_ACQUIRE_THRESHOLD},
+ {SS_BLK_RELEASE_THRESHOLD, SS_BLK_ACQUIRE_THRESHOLD}
+ }
+ },
+ {
+ SS_DFLT_REGION + 5, /* region id */
+ MT_MAX_BKTS, /* number of buckets */
+ {
+ /* block size, no. of blocks, Upper threshold, lower threshold */
+ {SS_BLK_RELEASE_THRESHOLD, SS_BLK_ACQUIRE_THRESHOLD},
+ {SS_BLK_RELEASE_THRESHOLD, SS_BLK_ACQUIRE_THRESHOLD},
+ {SS_BLK_RELEASE_THRESHOLD, SS_BLK_ACQUIRE_THRESHOLD},
+ {SS_BLK_RELEASE_THRESHOLD, SS_BLK_ACQUIRE_THRESHOLD},
+ {SS_BLK_RELEASE_THRESHOLD, SS_BLK_ACQUIRE_THRESHOLD}
+ }
+ },
{
- SS_DFLT_REGION + 4, /* region id */
- MT_MAX_BKTS, /* number of buckets */
- {
- /* block size, no. of blocks, Upper threshold, lower threshold */
- {SS_BLK_RELEASE_THRESHOLD, SS_BLK_ACQUIRE_THRESHOLD},
- {SS_BLK_RELEASE_THRESHOLD, SS_BLK_ACQUIRE_THRESHOLD},
- {SS_BLK_RELEASE_THRESHOLD, SS_BLK_ACQUIRE_THRESHOLD},
- {SS_BLK_RELEASE_THRESHOLD, SS_BLK_ACQUIRE_THRESHOLD},
- {SS_BLK_RELEASE_THRESHOLD, SS_BLK_ACQUIRE_THRESHOLD}
- }
- },
- {
- SS_DFLT_REGION + 5, /* region id */
- MT_MAX_BKTS, /* number of buckets */
- {
- /* block size, no. of blocks, Upper threshold, lower threshold */
- {SS_BLK_RELEASE_THRESHOLD, SS_BLK_ACQUIRE_THRESHOLD},
- {SS_BLK_RELEASE_THRESHOLD, SS_BLK_ACQUIRE_THRESHOLD},
- {SS_BLK_RELEASE_THRESHOLD, SS_BLK_ACQUIRE_THRESHOLD},
- {SS_BLK_RELEASE_THRESHOLD, SS_BLK_ACQUIRE_THRESHOLD},
- {SS_BLK_RELEASE_THRESHOLD, SS_BLK_ACQUIRE_THRESHOLD}
- }
- },
- {
- SS_DFLT_REGION + 6, /* region id */
- MT_MAX_BKTS, /* number of buckets */
- {
- /* block size, no. of blocks, Upper threshold, lower threshold */
- {SS_BLK_RELEASE_THRESHOLD, SS_BLK_ACQUIRE_THRESHOLD},
- {SS_BLK_RELEASE_THRESHOLD, SS_BLK_ACQUIRE_THRESHOLD},
- {SS_BLK_RELEASE_THRESHOLD, SS_BLK_ACQUIRE_THRESHOLD},
- {SS_BLK_RELEASE_THRESHOLD, SS_BLK_ACQUIRE_THRESHOLD},
- {SS_BLK_RELEASE_THRESHOLD, SS_BLK_ACQUIRE_THRESHOLD}
- }
- }
+ SS_DFLT_REGION + 6, /* region id */
+ MT_MAX_BKTS, /* number of buckets */
+ {
+ /* block size, no. of blocks, Upper threshold, lower threshold */
+ {SS_BLK_RELEASE_THRESHOLD, SS_BLK_ACQUIRE_THRESHOLD},
+ {SS_BLK_RELEASE_THRESHOLD, SS_BLK_ACQUIRE_THRESHOLD},
+ {SS_BLK_RELEASE_THRESHOLD, SS_BLK_ACQUIRE_THRESHOLD},
+ {SS_BLK_RELEASE_THRESHOLD, SS_BLK_ACQUIRE_THRESHOLD},
+ {SS_BLK_RELEASE_THRESHOLD, SS_BLK_ACQUIRE_THRESHOLD}
+ }
+ }
#if ((defined (SPLIT_RLC_DL_TASK)) && (!defined (L2_L3_SPLIT)))
- ,
- {
- SS_DFLT_REGION + 7, /* region id */
- MT_MAX_BKTS, /* number of buckets */
- {
- /* block size, no. of blocks, Upper threshold, lower threshold */
- {SS_BLK_RELEASE_THRESHOLD, SS_BLK_ACQUIRE_THRESHOLD},
- {SS_BLK_RELEASE_THRESHOLD, SS_BLK_ACQUIRE_THRESHOLD},
- {SS_BLK_RELEASE_THRESHOLD, SS_BLK_ACQUIRE_THRESHOLD},
- {SS_BLK_RELEASE_THRESHOLD, SS_BLK_ACQUIRE_THRESHOLD}
- }
- }
-#endif
- }
+ ,
+ {
+ SS_DFLT_REGION + 7, /* region id */
+ MT_MAX_BKTS, /* number of buckets */
+ {
+ /* block size, no. of blocks, Upper threshold, lower threshold */
+ {SS_BLK_RELEASE_THRESHOLD, SS_BLK_ACQUIRE_THRESHOLD},
+ {SS_BLK_RELEASE_THRESHOLD, SS_BLK_ACQUIRE_THRESHOLD},
+ {SS_BLK_RELEASE_THRESHOLD, SS_BLK_ACQUIRE_THRESHOLD},
+ {SS_BLK_RELEASE_THRESHOLD, SS_BLK_ACQUIRE_THRESHOLD}
+ }
+ }
+#endif
+ }
};
{MT_BKT_4_DSIZE, MT_BKT_4_NUMBLKS, SS_DFLT_MEM_BLK_SET_SIZE}
#else
{1024, 12800 /* MT_BKT_0_NUMBLKS */, SS_DFLT_MEM_BLK_SET_SIZE},
- {1664, 12800 /* MT_BKT_1_NUMBLKS */, SS_DFLT_MEM_BLK_SET_SIZE},
- {4096, 3840 /* MT_BKT_2_NUMBLKS*/, SS_DFLT_MEM_BLK_SET_SIZE},
- {MT_BKT_3_DSIZE, 12800 /* MT_BKT_3_NUMBLKS */, SS_DFLT_MEM_BLK_SET_SIZE}
+ {1664, 12800 /* MT_BKT_1_NUMBLKS */, SS_DFLT_MEM_BLK_SET_SIZE},
+ {4096, 3840 /* MT_BKT_2_NUMBLKS*/, SS_DFLT_MEM_BLK_SET_SIZE},
+ {MT_BKT_3_DSIZE, 12800 /* MT_BKT_3_NUMBLKS */, SS_DFLT_MEM_BLK_SET_SIZE}
#endif
}
};
MtMemCfg mtMemoCfg =
{
#ifdef RY_ENBS5SHM
- SS_MAX_REGS - 1, /* number of regions */
+ SS_MAX_REGS - 1, /* number of regions */
#else
#ifndef XEON_SPECIFIC_CHANGES
- SS_MAX_REGS, /* number of regions */
+ SS_MAX_REGS, /* number of regions */
#else
- 2,
+ 2,
#endif
#endif
- {
- {
- SS_DFLT_REGION, /* region id */
- MT_MAX_BKTS, /* number of buckets */
- MT_HEAP_SIZE, /* heap size */
+ {
{
+ SS_DFLT_REGION, /* region id */
+ MT_MAX_BKTS, /* number of buckets */
+ MT_HEAP_SIZE, /* heap size */
+ {
#ifndef XEON_SPECIFIC_CHANGES
- {MT_BKT_0_DSIZE, MT_BKT_0_STATIC_NUMBLKS}, /* block size, no. of blocks */
- {MT_BKT_1_DSIZE, MT_BKT_1_STATIC_NUMBLKS}, /* block size, no. of blocks */
- {MT_BKT_2_DSIZE, MT_BKT_2_STATIC_NUMBLKS}, /* block size, no. of blocks */
- {MT_BKT_3_DSIZE, MT_BKT_3_STATIC_NUMBLKS}, /* block size, no. of blocks */
- {MT_BKT_4_DSIZE, MT_BKT_4_STATIC_NUMBLKS}
+ {MT_BKT_0_DSIZE, MT_BKT_0_STATIC_NUMBLKS}, /* block size, no. of blocks */
+ {MT_BKT_1_DSIZE, MT_BKT_1_STATIC_NUMBLKS}, /* block size, no. of blocks */
+ {MT_BKT_2_DSIZE, MT_BKT_2_STATIC_NUMBLKS}, /* block size, no. of blocks */
+ {MT_BKT_3_DSIZE, MT_BKT_3_STATIC_NUMBLKS}, /* block size, no. of blocks */
+ {MT_BKT_4_DSIZE, MT_BKT_4_STATIC_NUMBLKS}
#else
- {256, 491520}, /* 60 pages of 2M*/
- {512, 12288}, /* 3 pages of 2M */
- {2048, 99328}, /* 97 Pages of 2M */
- {8192, 75008}, /* 293 Pages of 2M */
- {16384, 4096} /* 32 pages of 2M */
+ {256, 491520}, /* 60 pages of 2M*/
+ {512, 12288}, /* 3 pages of 2M */
+ {2048, 99328}, /* 97 Pages of 2M */
+ {8192, 75008}, /* 293 Pages of 2M */
+ {16384, 4096} /* 32 pages of 2M */
#endif
- }
- },
+ }
+ },
#ifdef INTEL_WLS
#ifndef SS_LOCKLESS_MEMORY
- {
- SS_DFLT_REGION + 1, /* region id */
- MT_MAX_BKTS, /* number of buckets */
- /*MT_HEAP_SIZE 7194304 */ 10485760, /* heap size */
{
- //{MT_BKT_0_DSIZE, MT_BKT_0_STATIC_NUMBLKS}, /* block size, no. of blocks */
- //{MT_BKT_1_DSIZE, MT_BKT_1_STATIC_NUMBLKS}, /* block size, no. of blocks */
- //{MT_BKT_2_DSIZE, MT_BKT_2_STATIC_NUMBLKS}, /* block size, no. of blocks */
- //{MT_BKT_3_DSIZE, MT_BKT_3_STATIC_NUMBLKS} /* block size, no. of blocks */
- {128, 500000},
- {256, 500000},
- {2048, 200000},
- {4096, 40960},
- {18432, 10240}
- }
- },
+ SS_DFLT_REGION + 1, /* region id */
+ MT_MAX_BKTS, /* number of buckets */
+ /*MT_HEAP_SIZE 7194304 */ 10485760, /* heap size */
+ {
+ //{MT_BKT_0_DSIZE, MT_BKT_0_STATIC_NUMBLKS}, /* block size, no. of blocks */
+ //{MT_BKT_1_DSIZE, MT_BKT_1_STATIC_NUMBLKS}, /* block size, no. of blocks */
+ //{MT_BKT_2_DSIZE, MT_BKT_2_STATIC_NUMBLKS}, /* block size, no. of blocks */
+ //{MT_BKT_3_DSIZE, MT_BKT_3_STATIC_NUMBLKS} /* block size, no. of blocks */
+ {128, 500000},
+ {256, 500000},
+ {2048, 200000},
+ {4096, 40960},
+ {18432, 10240}
+ }
+ },
#endif /* SS_LOCKLESS_MEMORY */
#endif /* INTEL_WLS */
#ifdef SS_LOCKLESS_MEMORY
- {
- SS_DFLT_REGION + 1, /* region id */
- MT_MAX_BKTS, /* number of buckets */
- MT_HEAP_SIZE, /* heap size */
{
- {MT_BKT_0_DSIZE, MT_BKT_0_STATIC_NUMBLKS}, /* block size, no. of blocks */
- {MT_BKT_1_DSIZE, MT_BKT_1_STATIC_NUMBLKS}, /* block size, no. of blocks */
- {MT_BKT_2_DSIZE, MT_BKT_2_STATIC_NUMBLKS}, /* block size, no. of blocks */
- {MT_BKT_3_DSIZE, MT_BKT_3_STATIC_NUMBLKS}, /* block size, no. of blocks */
- {MT_BKT_4_DSIZE, MT_BKT_4_STATIC_NUMBLKS} /* block size, no. of blocks */
- }
- },
- {
- SS_DFLT_REGION + 2, /* region id */
- MT_MAX_BKTS, /* number of buckets */
- MT_HEAP_SIZE, /* heap size */
+ SS_DFLT_REGION + 1, /* region id */
+ MT_MAX_BKTS, /* number of buckets */
+ MT_HEAP_SIZE, /* heap size */
+ {
+ {MT_BKT_0_DSIZE, MT_BKT_0_STATIC_NUMBLKS}, /* block size, no. of blocks */
+ {MT_BKT_1_DSIZE, MT_BKT_1_STATIC_NUMBLKS}, /* block size, no. of blocks */
+ {MT_BKT_2_DSIZE, MT_BKT_2_STATIC_NUMBLKS}, /* block size, no. of blocks */
+ {MT_BKT_3_DSIZE, MT_BKT_3_STATIC_NUMBLKS}, /* block size, no. of blocks */
+ {MT_BKT_4_DSIZE, MT_BKT_4_STATIC_NUMBLKS} /* block size, no. of blocks */
+ }
+ },
{
- {MT_BKT_0_DSIZE, MT_BKT_0_STATIC_NUMBLKS}, /* block size, no. of blocks */
- {MT_BKT_1_DSIZE, MT_BKT_1_STATIC_NUMBLKS}, /* block size, no. of blocks */
- {MT_BKT_2_DSIZE, MT_BKT_2_STATIC_NUMBLKS}, /* block size, no. of blocks */
- {MT_BKT_3_DSIZE, MT_BKT_3_STATIC_NUMBLKS}, /* block size, no. of blocks */
- {MT_BKT_4_DSIZE, MT_BKT_4_STATIC_NUMBLKS} /* block size, no. of blocks */
- }
- },
- {
- SS_DFLT_REGION + 3, /* region id */
- MT_MAX_BKTS, /* number of buckets */
- MT_HEAP_SIZE, /* heap size */
+ SS_DFLT_REGION + 2, /* region id */
+ MT_MAX_BKTS, /* number of buckets */
+ MT_HEAP_SIZE, /* heap size */
+ {
+ {MT_BKT_0_DSIZE, MT_BKT_0_STATIC_NUMBLKS}, /* block size, no. of blocks */
+ {MT_BKT_1_DSIZE, MT_BKT_1_STATIC_NUMBLKS}, /* block size, no. of blocks */
+ {MT_BKT_2_DSIZE, MT_BKT_2_STATIC_NUMBLKS}, /* block size, no. of blocks */
+ {MT_BKT_3_DSIZE, MT_BKT_3_STATIC_NUMBLKS}, /* block size, no. of blocks */
+ {MT_BKT_4_DSIZE, MT_BKT_4_STATIC_NUMBLKS} /* block size, no. of blocks */
+ }
+ },
+ {
+ SS_DFLT_REGION + 3, /* region id */
+ MT_MAX_BKTS, /* number of buckets */
+ MT_HEAP_SIZE, /* heap size */
+ {
+ {MT_BKT_0_DSIZE, MT_BKT_0_STATIC_NUMBLKS}, /* block size, no. of blocks */
+ {MT_BKT_1_DSIZE, MT_BKT_1_STATIC_NUMBLKS}, /* block size, no. of blocks */
+ {MT_BKT_2_DSIZE, MT_BKT_2_STATIC_NUMBLKS}, /* block size, no. of blocks */
+ {MT_BKT_3_DSIZE, MT_BKT_3_STATIC_NUMBLKS}, /* block size, no. of blocks */
+ {MT_BKT_4_DSIZE, MT_BKT_4_STATIC_NUMBLKS} /* block size, no. of blocks */
+ }
+ },
+ {
+ SS_DFLT_REGION + 4, /* region id */
+ MT_MAX_BKTS, /* number of buckets */
+ MT_HEAP_SIZE, /* heap size */
+ {
+ {MT_BKT_0_DSIZE, MT_BKT_0_STATIC_NUMBLKS}, /* block size, no. of blocks */
+ {MT_BKT_1_DSIZE, MT_BKT_1_STATIC_NUMBLKS}, /* block size, no. of blocks */
+ {MT_BKT_2_DSIZE, MT_BKT_2_STATIC_NUMBLKS}, /* block size, no. of blocks */
+ {MT_BKT_3_DSIZE, MT_BKT_3_STATIC_NUMBLKS}, /* block size, no. of blocks */
+ {MT_BKT_4_DSIZE, MT_BKT_4_STATIC_NUMBLKS} /* block size, no. of blocks */
+ }
+ },
+ {
+ SS_DFLT_REGION + 5, /* region id */
+ MT_MAX_BKTS, /* number of buckets */
+ MT_HEAP_SIZE, /* heap size */
+ {
+ {MT_BKT_0_DSIZE, MT_BKT_0_STATIC_NUMBLKS}, /* block size, no. of blocks */
+ {MT_BKT_1_DSIZE, MT_BKT_1_STATIC_NUMBLKS}, /* block size, no. of blocks */
+ {MT_BKT_2_DSIZE, MT_BKT_2_STATIC_NUMBLKS}, /* block size, no. of blocks */
+ {MT_BKT_3_DSIZE, MT_BKT_3_STATIC_NUMBLKS}, /* block size, no. of blocks */
+ {MT_BKT_4_DSIZE, MT_BKT_4_STATIC_NUMBLKS} /* block size, no. of blocks */
+ }
+ },
{
- {MT_BKT_0_DSIZE, MT_BKT_0_STATIC_NUMBLKS}, /* block size, no. of blocks */
- {MT_BKT_1_DSIZE, MT_BKT_1_STATIC_NUMBLKS}, /* block size, no. of blocks */
- {MT_BKT_2_DSIZE, MT_BKT_2_STATIC_NUMBLKS}, /* block size, no. of blocks */
- {MT_BKT_3_DSIZE, MT_BKT_3_STATIC_NUMBLKS}, /* block size, no. of blocks */
- {MT_BKT_4_DSIZE, MT_BKT_4_STATIC_NUMBLKS} /* block size, no. of blocks */
+ SS_DFLT_REGION + 5, /* region id */
+ MT_MAX_BKTS, /* number of buckets */
+ MT_HEAP_SIZE, /* heap size */
+ {
+ {MT_BKT_0_DSIZE, MT_BKT_0_STATIC_NUMBLKS}, /* block size, no. of blocks */
+ {MT_BKT_1_DSIZE, MT_BKT_1_STATIC_NUMBLKS}, /* block size, no. of blocks */
+ {MT_BKT_2_DSIZE, MT_BKT_2_STATIC_NUMBLKS}, /* block size, no. of blocks */
+ {MT_BKT_3_DSIZE, MT_BKT_3_STATIC_NUMBLKS}, /* block size, no. of blocks */
+ {MT_BKT_4_DSIZE, MT_BKT_4_STATIC_NUMBLKS} /* block size, no. of blocks */
+ }
}
- },
- {
- SS_DFLT_REGION + 4, /* region id */
- MT_MAX_BKTS, /* number of buckets */
- MT_HEAP_SIZE, /* heap size */
- {
- {MT_BKT_0_DSIZE, MT_BKT_0_STATIC_NUMBLKS}, /* block size, no. of blocks */
- {MT_BKT_1_DSIZE, MT_BKT_1_STATIC_NUMBLKS}, /* block size, no. of blocks */
- {MT_BKT_2_DSIZE, MT_BKT_2_STATIC_NUMBLKS}, /* block size, no. of blocks */
- {MT_BKT_3_DSIZE, MT_BKT_3_STATIC_NUMBLKS}, /* block size, no. of blocks */
- {MT_BKT_4_DSIZE, MT_BKT_4_STATIC_NUMBLKS} /* block size, no. of blocks */
- }
- },
- {
- SS_DFLT_REGION + 5, /* region id */
- MT_MAX_BKTS, /* number of buckets */
- MT_HEAP_SIZE, /* heap size */
- {
- {MT_BKT_0_DSIZE, MT_BKT_0_STATIC_NUMBLKS}, /* block size, no. of blocks */
- {MT_BKT_1_DSIZE, MT_BKT_1_STATIC_NUMBLKS}, /* block size, no. of blocks */
- {MT_BKT_2_DSIZE, MT_BKT_2_STATIC_NUMBLKS}, /* block size, no. of blocks */
- {MT_BKT_3_DSIZE, MT_BKT_3_STATIC_NUMBLKS}, /* block size, no. of blocks */
- {MT_BKT_4_DSIZE, MT_BKT_4_STATIC_NUMBLKS} /* block size, no. of blocks */
- }
- },
- {
- SS_DFLT_REGION + 5, /* region id */
- MT_MAX_BKTS, /* number of buckets */
- MT_HEAP_SIZE, /* heap size */
- {
- {MT_BKT_0_DSIZE, MT_BKT_0_STATIC_NUMBLKS}, /* block size, no. of blocks */
- {MT_BKT_1_DSIZE, MT_BKT_1_STATIC_NUMBLKS}, /* block size, no. of blocks */
- {MT_BKT_2_DSIZE, MT_BKT_2_STATIC_NUMBLKS}, /* block size, no. of blocks */
- {MT_BKT_3_DSIZE, MT_BKT_3_STATIC_NUMBLKS}, /* block size, no. of blocks */
- {MT_BKT_4_DSIZE, MT_BKT_4_STATIC_NUMBLKS} /* block size, no. of blocks */
- }
- }
#endif /* SS_LOCKLESS_MEMORY */
- STATIC_MEM_CFG
- }
+ STATIC_MEM_CFG
+ }
};
/* mt003.301 Modifications - File Based task registration made
* common for both MULTICORE and NON-MULTICORE
#ifdef NTL_LIB
void mtSetNtlHdl(unsigned int hdl)
{
- osCp.ntl.hdl = hdl;
+ osCp.ntl.hdl = hdl;
}
unsigned int mtGetNtlHdl()
{
- return(osCp.ntl.hdl);
+ return(osCp.ntl.hdl);
}
#endif /* NTL_LIB */
{
uint8_t i;
void *hdl;
- #define WLS_DEVICE_NAME "wls0"
-
+#define WLS_DEVICE_NAME "wls0"
+
char *my_argv[] = {"gnodeb", "-c3", "--proc-type=auto", "--file-prefix", WLS_DEVICE_NAME, "--iova-mode=pa"};
- printf("Calling rte_eal_init: ");
+ printf("\nCalling rte_eal_init: ");
for (i = 0; i < RTE_DIM(my_argv); i++)
{
- printf("%s ", my_argv[i]);
+ printf("%s ", my_argv[i]);
}
printf("\n");
if (rte_eal_init(RTE_DIM(my_argv), my_argv) < 0)
- rte_panic("Cannot init EAL\n");
+ rte_panic("\nCannot init EAL\n");
#ifdef XEON_SPECIFIC_CHANGES
if(!osCp.wls.intf)
{
- printf("Could not open WLS Interface \n");
- return (0);
+ printf("\nCould not open WLS Interface \n");
+ return (0);
}
return (1);
#ifndef API_MAIN
\f
/*
-*
-* Fun: main
-*
-* Desc: This function is the entry point for the final binary. It
-* calls SInit() in the common code. It can be replaced by a
-* user function if required (SInit() must still be called).
-*
-* Ret: none on success
-* exit on failure
-*
-* Notes:
-*
-* File: mt_ss.c
-*
-*/
-int main
+ *
+ * Fun: main
+ *
+ * Desc: This function is the entry point for the final binary. It
+ * calls SInit() in the common code. It can be replaced by a
+ * user function if required (SInit() must still be called).
+ *
+ * Ret: none on success
+ * exit on failure
+ *
+ * Notes:
+ *
+ * File: mt_ss.c
+ *
+ */
+ int main
(
-int argc, /* argument count */
-char **argv /* argument vector */
-)
+ int argc, /* argument count */
+ char **argv /* argument vector */
+ )
{
#ifdef XEON_MULTIPLE_CELL_CHANGES
#if defined (INTEL_WLS) || defined (SS_USE_WLS_MEM)
if(!SOpenWlsIntf())
- return (0);
+ return (0);
#endif /* INTEL_WLS */
msArgc = argc;
msArgv = argv;
/* mt003.301 Modifications */
if( ROK != SInit())
- {
- printf("\n SInit failed, SSI could not start \n");
- /* pthread_exit(NULLP);*/ /* Commented to Come out of Main thread*/
+ {
+ printf("\n SInit failed, SSI could not start \n");
+ /* pthread_exit(NULLP);*/ /* Commented to Come out of Main thread*/
- return (0);
- }
+ return (0);
+ }
/*mt010.301 cleanup part exposed to user*/
SFini();
return (0);
#else
\f
/*
-*
-* Fun: ssMain
-*
-* Desc: This function is the entry point for the final binary. It
-* calls SInit() in the common code. It can be replaced by a
-* user function if required (SInit() must still be called).
-*
-* Ret: none on success
-* exit on failure
-*
-* Notes:
-*
-* File: mt_ss.c
-*
-*/
-int ssMain
+ *
+ * Fun: ssMain
+ *
+ * Desc: This function is the entry point for the final binary. It
+ * calls SInit() in the common code. It can be replaced by a
+ * user function if required (SInit() must still be called).
+ *
+ * Ret: none on success
+ * exit on failure
+ *
+ * Notes:
+ *
+ * File: mt_ss.c
+ *
+ */
+ int ssMain
(
-int argc, /* argument count */
-char **argv /* argument vector */
-)
+ int argc, /* argument count */
+ char **argv /* argument vector */
+ )
{
#endif
/*
-* initialization functions
-*/
+ * initialization functions
+ */
/*
-*
-* Fun: Initialize OS control point
-*
-* Desc: This function initializes MTSS-specific information
-* in the OS control point.
-*
-* Ret: ROK - ok
-*
-* Notes:
-*
-* File: mt_ss.c
-*
-*/
+ *
+ * Fun: Initialize OS control point
+ *
+ * Desc: This function initializes MTSS-specific information
+ * in the OS control point.
+ *
+ * Ret: ROK - ok
+ *
+ * Notes:
+ *
+ * File: mt_ss.c
+ *
+ */
S16 ssdInitGen(void)
{
struct sigaction act;
#endif
- /*mt014.301 : 4GMX release related changes*/
+ /*mt014.301 : 4GMX release related changes*/
#ifdef SS_4GMX_UCORE
uarmInit();
#endif
-/* mt005.301 : Cavium changes */
+ /* mt005.301 : Cavium changes */
#ifdef SS_SEUM_CAVIUM
- /* set group mask for the core */
- cvmx_pow_set_group_mask(cvmx_get_core_num(), SS_CVMX_GRP_MASK);
+ /* set group mask for the core */
+ cvmx_pow_set_group_mask(cvmx_get_core_num(), SS_CVMX_GRP_MASK);
#endif /* SS_SEUM_CAVIUM */
osCp.dep.sysTicks = 0;
#ifndef NOCMDLINE
/* parse command line */
mtGetOpts();
- /* mt003.301 Additions */
- if(fileBasedMemCfg == TRUE && memConfigured == FALSE)
- {
- printf("\n File Based Memory configuration failed \n");
- return RFAILED;
- }
+ /* mt003.301 Additions */
+ if(fileBasedMemCfg == TRUE && memConfigured == FALSE)
+ {
+ printf("\n File Based Memory configuration failed \n");
+ return RFAILED;
+ }
#endif
#ifndef RGL_SPECIFIC_CHANGES /* ANOOP :: This ssdInitMemInfo() was present in 2.1 */
/*Initialize SIGSEGV Signal */
#ifdef TENB_T2K3K_SPECIFIC_CHANGES
#if 1
- memset(&sa, 0, sizeof(struct sigaction));
- sigemptyset(&sa.sa_mask);
- sa.sa_sigaction = signal_segv;
- sa.sa_flags = SA_SIGINFO;
+ memset(&sa, 0, sizeof(struct sigaction));
+ sigemptyset(&sa.sa_mask);
+ sa.sa_sigaction = signal_segv;
+ sa.sa_flags = SA_SIGINFO;
#ifndef XEON_SPECIFIC_CHANGES
- sigaction(SIGSEGV, &sa, NULL);
+ sigaction(SIGSEGV, &sa, NULL);
- memset(&sa, 0, sizeof(struct sigaction));
- sigemptyset(&sa.sa_mask);
- sa.sa_sigaction = signal_segv;
- sa.sa_flags = SA_SIGINFO;
+ memset(&sa, 0, sizeof(struct sigaction));
+ sigemptyset(&sa.sa_mask);
+ sa.sa_sigaction = signal_segv;
+ sa.sa_flags = SA_SIGINFO;
- sigaction(SIGILL, &sa, NULL);
+ sigaction(SIGILL, &sa, NULL);
#else
- if(sigaction(SIGILL, &sa, NULL) != 0)
- {
- printf("Failed to process sigaction for the SIGILL\n");
- return RFAILED;
- }
- if(sigaction(SIGSEGV, &sa, NULL) != 0)
- {
- printf("Failed to process sigaction for the SIGSEGV\n");
- return RFAILED;
- }
- if(sigaction(SIGABRT, &sa, NULL) != 0)
- {
- printf("Failed to process sigaction for the SIGABRT\n");
- return RFAILED;
- }
- if(sigaction(SIGTERM, &sa, NULL) != 0)
- {
- printf("Failed to process sigaction for the SIGTERM\n");
- return RFAILED;
- }
- if(sigaction(SIGHUP, &sa, NULL) != 0)
- {
- printf("Failed to process sigaction for the SIGHUP\n");
- return RFAILED;
- }
+ if(sigaction(SIGILL, &sa, NULL) != 0)
+ {
+ printf("\nFailed to process sigaction for the SIGILL\n");
+ return RFAILED;
+ }
+ if(sigaction(SIGSEGV, &sa, NULL) != 0)
+ {
+ printf("\nFailed to process sigaction for the SIGSEGV\n");
+ return RFAILED;
+ }
+ if(sigaction(SIGABRT, &sa, NULL) != 0)
+ {
+ printf("\nFailed to process sigaction for the SIGABRT\n");
+ return RFAILED;
+ }
+ if(sigaction(SIGTERM, &sa, NULL) != 0)
+ {
+ printf("\nFailed to process sigaction for the SIGTERM\n");
+ return RFAILED;
+ }
+ if(sigaction(SIGHUP, &sa, NULL) != 0)
+ {
+ printf("\nFailed to process sigaction for the SIGHUP\n");
+ return RFAILED;
+ }
#endif
#else
signal (SIGSEGV, mtSigSegvHndlr);
\f
/*
-*
-* Fun: De-initialize OS control point
-*
-* Desc: This function reverses the initialization in ssdInitGen().
-*
-* Ret: ROK - ok
-*
-* Notes:
-*
-* File: mt_ss.c
-*
-*/
+ *
+ * Fun: De-initialize OS control point
+ *
+ * Desc: This function reverses the initialization in ssdInitGen().
+ *
+ * Ret: ROK - ok
+ *
+ * Notes:
+ *
+ * File: mt_ss.c
+ *
+ */
Void ssdDeinitGen(void)
{
#ifdef SS_LOCKLESS_MEMORY
#ifdef USE_MALLOC
/*
-*
-* Fun: ssPutDynMemBlkSet
-*
-* Desc: Returns the set of dynamic Blocks into the global region
-*
-*
-* Ret: ROK - successful,
-* RFAILED - unsuccessful.
-*
-* Notes:
-*
-* File: cm_mem.c
-*
-*/
+ *
+ * Fun: ssPutDynMemBlkSet
+ *
+ * Desc: Returns the set of dynamic Blocks into the global region
+ *
+ *
+ * Ret: ROK - successful,
+ * RFAILED - unsuccessful.
+ *
+ * Notes:
+ *
+ * File: cm_mem.c
+ *
+ */
S16 ssPutDynMemBlkSet
(
-uint8_t bktIdx, /* Index to bucket list */
-CmMmBlkSetElement *dynMemSetElem /* Memory set element which is needs to be
- added to global region */
-)
+ uint8_t bktIdx, /* Index to bucket list */
+ CmMmBlkSetElement *dynMemSetElem /* Memory set element which is needs to be
+ added to global region */
+ )
{
CmMmGlobRegCb *globReg;
CmMmGlobalBktCb *bktCb;
}
/*
-*
-* Fun: ssGetDynMemBlkSet
-*
-* Desc: Gets the set of dynamic memory blocks from the global region
-*
-*
-* Ret: ROK - successful,
-* RFAILED - unsuccessful.
-*
-* Notes:
-*
-* File: cm_mem.c
-*
-*/
+ *
+ * Fun: ssGetDynMemBlkSet
+ *
+ * Desc: Gets the set of dynamic memory blocks from the global region
+ *
+ *
+ * Ret: ROK - successful,
+ * RFAILED - unsuccessful.
+ *
+ * Notes:
+ *
+ * File: cm_mem.c
+ *
+ */
S16 ssGetDynMemBlkSet
(
-uint8_t bktIdx, /* Index to bucket list */
-CmMmBlkSetElement *dynMemSetElem /* Memory set element which is updated
- with new set values */
-)
+ uint8_t bktIdx, /* Index to bucket list */
+ CmMmBlkSetElement *dynMemSetElem /* Memory set element which is updated
+ with new set values */
+ )
{
CmMmGlobRegCb *globReg;
#else
/*
-*
-* Fun: ssPutDynMemBlkSet
-*
-* Desc: Returns the set of dynamic Blocks into the global region
-*
-*
-* Ret: ROK - successful,
-* RFAILED - unsuccessful.
-*
-* Notes:
-*
-* File: cm_mem.c
-*
-*/
+ *
+ * Fun: ssPutDynMemBlkSet
+ *
+ * Desc: Returns the set of dynamic Blocks into the global region
+ *
+ *
+ * Ret: ROK - successful,
+ * RFAILED - unsuccessful.
+ *
+ * Notes:
+ *
+ * File: cm_mem.c
+ *
+ */
S16 ssPutDynMemBlkSet
(
-uint8_t bktIdx, /* Index to bucket list */
-CmMmBlkSetElement *dynMemSetElem, /* Memory set element which is needs to be
- added to global region */
-uint32_t doNotBlockForLock /* Boolean whether to block for lock or not */
-)
+ uint8_t bktIdx, /* Index to bucket list */
+ CmMmBlkSetElement *dynMemSetElem, /* Memory set element which is needs to be
+ added to global region */
+ uint32_t doNotBlockForLock /* Boolean whether to block for lock or not */
+ )
{
CmMmGlobRegCb *globReg;
CmMmGlobalBktCb *bktCb;
lstNode = cmLListFirst(&(bktCb->listFreeBktSet));
if(lstNode == NULLP)
{
- SUnlock(&(bktCb->bucketLock));
- return RFAILED;
+ SUnlock(&(bktCb->bucketLock));
+ return RFAILED;
}
cmLListDelFrm(&(bktCb->listFreeBktSet), lstNode);
}
/*
-*
-* Fun: ssGetDynMemBlkSet
-*
-* Desc: Gets the set of dynamic memory blocks from the global region
-*
-*
-* Ret: ROK - successful,
-* RFAILED - unsuccessful.
-*
-* Notes: The parameter doNotBlockForLock specifies whether to block for lock
-* or not
-*
-* File: cm_mem.c
-*
-*/
+ *
+ * Fun: ssGetDynMemBlkSet
+ *
+ * Desc: Gets the set of dynamic memory blocks from the global region
+ *
+ *
+ * Ret: ROK - successful,
+ * RFAILED - unsuccessful.
+ *
+ * Notes: The parameter doNotBlockForLock specifies whether to block for lock
+ * or not
+ *
+ * File: cm_mem.c
+ *
+ */
S16 ssGetDynMemBlkSet
(
-uint8_t bktIdx, /* Index to bucket list */
-CmMmBlkSetElement *dynMemSetElem, /* Memory set element which is updated
- with new set values */
-uint32_t doNotBlockForLock /* Boolean whether to block for lock or not */
-)
+ uint8_t bktIdx, /* Index to bucket list */
+ CmMmBlkSetElement *dynMemSetElem, /* Memory set element which is updated
+ with new set values */
+ uint32_t doNotBlockForLock /* Boolean whether to block for lock or not */
+ )
{
CmMmGlobRegCb *globReg;
CmMmGlobalBktCb *bktCb;
if(lstNode == NULLP)
{
- SUnlock(&(bktCb->bucketLock));
- return RFAILED;
+ SUnlock(&(bktCb->bucketLock));
+ return RFAILED;
}
/* Delete the node from the valid linked list and copy the values of the
if(gDynMemAlrm[bktIdx])
{
- // printf ("under memory bktCb->listValidBktSet.count %d bktIdx %d\n",bktCb->listValidBktSet.count ,bktIdx);
- SLock(&(bktCb->bucketLock));
- if(bktCb->listValidBktSet.count > 25)
- {
- gDynMemAlrm[bktIdx] = FALSE;
- // printf ("recoverd bktCb->listValidBktSet.count %d bktIdx %d\n",bktCb->listValidBktSet.count ,bktIdx);
- }
- SUnlock(&(bktCb->bucketLock));
- return RFAILED;
+ // printf ("\nunder memory bktCb->listValidBktSet.count %d bktIdx %d\n",bktCb->listValidBktSet.count ,bktIdx);
+ SLock(&(bktCb->bucketLock));
+ if(bktCb->listValidBktSet.count > 25)
+ {
+ gDynMemAlrm[bktIdx] = FALSE;
+ // printf ("\nrecoverd bktCb->listValidBktSet.count %d bktIdx %d\n",bktCb->listValidBktSet.count ,bktIdx);
+ }
+ SUnlock(&(bktCb->bucketLock));
+ return RFAILED;
}
else
{
- if(memoryCheckCounter++ >= NUM_CALLS_TO_CHECK_MEM_DYN_AGAIN)
- {
- // printf ("CHECK bktCb->listValidBktSet.count %d bktIdx %d\n",bktCb->listValidBktSet.count ,bktIdx);
- SLock(&(bktCb->bucketLock));
- if(bktCb->listValidBktSet.count < 15 )
- gDynMemAlrm[bktIdx] = TRUE;
- memoryCheckCounter = 0;
- SUnlock(&(bktCb->bucketLock));
- }
+ if(memoryCheckCounter++ >= NUM_CALLS_TO_CHECK_MEM_DYN_AGAIN)
+ {
+ // printf ("\nCHECK bktCb->listValidBktSet.count %d bktIdx %d\n",bktCb->listValidBktSet.count ,bktIdx);
+ SLock(&(bktCb->bucketLock));
+ if(bktCb->listValidBktSet.count < 15 )
+ gDynMemAlrm[bktIdx] = TRUE;
+ memoryCheckCounter = 0;
+ SUnlock(&(bktCb->bucketLock));
+ }
}
return ROK;
}
#ifdef SS_USE_ICC_MEMORY
/*
-*
-* Fun: Initialize region/pool tables
-*
-* Desc: This function initializes MTSS-specific information
-* in the region/pool tables and configures the common
-* memory manager for use.
-*
-* Ret: ROK - ok
-*
-* Notes:
-*
-* File: mt_ss.c
-*
-*/
+ *
+ * Fun: Initialize region/pool tables
+ *
+ * Desc: This function initializes MTSS-specific information
+ * in the region/pool tables and configures the common
+ * memory manager for use.
+ *
+ * Ret: ROK - ok
+ *
+ * Notes:
+ *
+ * File: mt_ss.c
+ *
+ */
Void * ssGetIccHdl(Region region)
{
CmMmDynRegCb *dynRegCb;
{
return (NULLP);
}
-
+
dynRegCb = (CmMmDynRegCb *)osCp.dynRegionTbl[region].regCb;
return (dynRegCb->iccHdl);
bktMemStrtAddr += mtDynMemSz[i].reqdSz;
}
- printf("Global Memory Info: \n");
+ printf("\nGlobal Memory Info: \n");
for (i = 0 ; i < mtGlobMemoCfg.numBkts ; i++)
{
printf("mtDynMemSz[%d]: [0x%016lx]\n", i, (unsigned long int)mtDynMemSz[i].startAddr);
}
osCp.wls.allocAddr = WLS_Alloc(osCp.wls.intf,
#ifdef INTEL_L1_V19_10
- WLS_MEMORY_SIZE);
+ WLS_MEMORY_SIZE);
#else
(reqdMemSz + (4 * 1024 * 1024)));
#endif
long int pageSize[1], hugePageSize;
#endif
uint32_t numHugePg;
- #define DIV_ROUND_OFFSET(X,Y) ( X/Y + ((X%Y)?1:0) )
+#define DIV_ROUND_OFFSET(X,Y) ( X/Y + ((X%Y)?1:0) )
uint8_t *regMemStrtAddr = (uint8_t *)osCp.wls.allocAddr;
if(type == 0) //Global
{
if(ptr < mtRegMemSz[0].startAddr || ptr >=
- (mtRegMemSz[mtGlobMemoCfg.numBkts].startAddr + mtGlobMemoCfg.heapSize))
+ (mtRegMemSz[mtGlobMemoCfg.numBkts].startAddr + mtGlobMemoCfg.heapSize))
{
- printf("****INVALID PTR in Global Region: ptr:%p start:%p end:%p***\n", ptr, mtRegMemSz[0].startAddr, mtRegMemSz[mtGlobMemoCfg.numBkts].startAddr);
- *tryPtr = 0;
+ printf("\n****INVALID PTR in Global Region: ptr:%p start:%p end:%p***\n", ptr, mtRegMemSz[0].startAddr, mtRegMemSz[mtGlobMemoCfg.numBkts].startAddr);
+ *tryPtr = 0;
}
}
else
{
if(ptr > mtRegMemSz[0].startAddr && ptr <= mtRegMemSz[mtGlobMemoCfg.numBkts].startAddr )
{
- printf("****INVALID PTR in Static Region: ptr:%p start:%p end:%p***\n", ptr, mtRegMemSz[0].startAddr, mtRegMemSz[mtGlobMemoCfg.numBkts].startAddr);
- *tryPtr = 0;
+ printf("\n****INVALID PTR in Static Region: ptr:%p start:%p end:%p***\n", ptr, mtRegMemSz[0].startAddr, mtRegMemSz[mtGlobMemoCfg.numBkts].startAddr);
+ *tryPtr = 0;
}
}
regMemStrtAddr += reqdSz;
#ifdef T2K_MEM_LEAK_DBG
{ /* Since region 1 onwards are used for non wls */
- regMemLeakInfo.regStartAddr[i] = (uint64_t)mtRegMemSz[i].startAddr;
- regMemLeakInfo.numActvRegions++;
+ regMemLeakInfo.regStartAddr[i] = (uint64_t)mtRegMemSz[i].startAddr;
+ regMemLeakInfo.numActvRegions++;
}
#endif /* T2K_MEM_LEAK_DBG */
}
for (j = 0; j < region->numBkts; j++)
{
- reqdMemSz += region->bkt[j].blkSize * region->bkt[j].numBlks;
- mtRegMemSz[i].reqdSz += region->bkt[j].blkSize * region->bkt[j].numBlks;
+ reqdMemSz += region->bkt[j].blkSize * region->bkt[j].numBlks;
+ mtRegMemSz[i].reqdSz += region->bkt[j].blkSize * region->bkt[j].numBlks;
}
}
osCp.wls.allocAddr = WLS_Alloc(osCp.wls.intf, (512 *1024 * 1024));
for (j = 0; j < region->numBkts; j++)
{
- reqdMemSz += region->bkt[j].blkSize * region->bkt[j].numBlks;
- mtRegMemSz[i].reqdSz += region->bkt[j].blkSize * region->bkt[j].numBlks;
+ reqdMemSz += region->bkt[j].blkSize * region->bkt[j].numBlks;
+ mtRegMemSz[i].reqdSz += region->bkt[j].blkSize * region->bkt[j].numBlks;
}
}
\f
\f
/*
-*
-* Fun: Initialize region/pool tables
-*
-* Desc: This function initializes MTSS-specific information
-* in the region/pool tables and configures the common
-* memory manager for use.
-*
-* Ret: ROK - ok
-*
-* Notes:
-*
-* File: mt_ss.c
-*
-*/
+ *
+ * Fun: Initialize region/pool tables
+ *
+ * Desc: This function initializes MTSS-specific information
+ * in the region/pool tables and configures the common
+ * memory manager for use.
+ *
+ * Ret: ROK - ok
+ *
+ * Notes:
+ *
+ * File: mt_ss.c
+ *
+ */
S16 ssdInitMem(void)
{
/* mt018.201 - added local variable */
Size memSize =0;
#endif
#endif /* SS_LOCKLESS_MEMORY */
-
+
/* Use the default SSI memory manager if the ICC memory manager is not
* avilable. If ICC memory manager is avilable, it will be used for
dynRegCb = (CmMmDynRegCb *)calloc(1, sizeof(CmMmDynRegCb));
if(dynRegCb == NULLP)
{
- return RFAILED;
+ return RFAILED;
}
for(k = 0; k < mtDynMemoCfg.region[i].numBkts; k++)
{
- dynRegCb->bktSize[k] = mtGlobMemoCfg.bkt[k].blkSize;
+ dynRegCb->bktSize[k] = mtGlobMemoCfg.bkt[k].blkSize;
}
dynRegCb->region = i;
cmMmDynRegInit(dynRegCb);
- printf("iccHdl = %lx\n", (PTR)dynRegCb->iccHdl);
+ printf("\niccHdl = %lx\n", (PTR)dynRegCb->iccHdl);
sleep(1);
}
- /* ysIccHdl = dynRegCb->iccHdl; */
+ /* ysIccHdl = dynRegCb->iccHdl; */
#else
/* Initialize the global region first */
memSize = (mtGlobMemoCfg.bkt[i].blkSize * mtGlobMemoCfg.bkt[i].numBlks);
#if !defined (INTEL_WLS) && defined (SS_USE_WLS_MEM)
globReg->bktTbl[i].startAddr = (Data *)mtDynMemSz[i].startAddr;
- printf("Starting Address of Bkt Entry [%d]: [0x%016lx], memSize[%d]\n", i, (unsigned long int)globReg->bktTbl[i].startAddr, memSize);
+ printf("\nStarting Address of Bkt Entry [%d]: [0x%016lx], memSize[%d]\n", i, (unsigned long int)globReg->bktTbl[i].startAddr, memSize);
#else
#ifndef INTEL_WLS
globReg->bktTbl[i].startAddr = (Data *)calloc(memSize, sizeof(Data));
#endif
if(globReg->bktTbl[i].startAddr == NULLP)
{
- return RFAILED;
+ return RFAILED;
}
globReg->bktTbl[i].poolId = i;
globReg->bktTbl[i].size = mtGlobMemoCfg.bkt[i].blkSize;
dynRegCb = (CmMmDynRegCb *)calloc(1, sizeof(CmMmDynRegCb));
if(dynRegCb == NULLP)
{
- return RFAILED;
+ return RFAILED;
}
for(k = 0; k < mtDynMemoCfg.region[i].numBkts; k++)
{
- if((mtDynMemoCfg.region[i].bkt[k].blkSetRelThreshold <
- mtDynMemoCfg.region[i].bkt[k].blkSetAcquireThreshold) ||
- (mtDynMemoCfg.region[i].bkt[k].blkSetAcquireThreshold == 0) ||
- (mtDynMemoCfg.region[i].bkt[k].blkSetRelThreshold == 0))
- {
+ if((mtDynMemoCfg.region[i].bkt[k].blkSetRelThreshold <
+ mtDynMemoCfg.region[i].bkt[k].blkSetAcquireThreshold) ||
+ (mtDynMemoCfg.region[i].bkt[k].blkSetAcquireThreshold == 0) ||
+ (mtDynMemoCfg.region[i].bkt[k].blkSetRelThreshold == 0))
+ {
#ifdef XEON_SPECIFIC_CHANGES
- free(dynRegCb);
+ free(dynRegCb);
#endif
- return RFAILED;
- }
- dynRegCb->bktTbl[k].poolId = k;
- dynRegCb->bktTbl[k].size = mtGlobMemoCfg.bkt[k].blkSize;
- dynRegCb->bktTbl[k].blkSetRelThreshold = mtDynMemoCfg.region[i].bkt[k].blkSetRelThreshold;
- dynRegCb->bktTbl[k].blkSetAcquireThreshold = mtDynMemoCfg.region[i].bkt[k].blkSetAcquireThreshold;
- dynRegCb->bktTbl[k].bucketSetSize = mtGlobMemoCfg.bkt[k].bucketSetSize;
- if(dynRegCb->bktMaxBlkSize < dynRegCb->bktTbl[k].size)
- {
- dynRegCb->bktMaxBlkSize = dynRegCb->bktTbl[k].size;
- }
+ return RFAILED;
+ }
+ dynRegCb->bktTbl[k].poolId = k;
+ dynRegCb->bktTbl[k].size = mtGlobMemoCfg.bkt[k].blkSize;
+ dynRegCb->bktTbl[k].blkSetRelThreshold = mtDynMemoCfg.region[i].bkt[k].blkSetRelThreshold;
+ dynRegCb->bktTbl[k].blkSetAcquireThreshold = mtDynMemoCfg.region[i].bkt[k].blkSetAcquireThreshold;
+ dynRegCb->bktTbl[k].bucketSetSize = mtGlobMemoCfg.bkt[k].bucketSetSize;
+ if(dynRegCb->bktMaxBlkSize < dynRegCb->bktTbl[k].size)
+ {
+ dynRegCb->bktMaxBlkSize = dynRegCb->bktTbl[k].size;
+ }
}
dynRegCb->region = i;
dynRegCb->numBkts = mtDynMemoCfg.region[i].numBkts;
#endif /* SS_LOCKLESS_MEMORY */
#ifdef T2K_MEM_LEAK_DBG
- uint8_t reg =0;
- /* Initailize mem leak tool memorys for debguing */
- regMemLeakInfo.numActvRegions=0;
- for(reg=0; reg <SS_MAX_REGS; reg++)
- {
- regMemLeakInfo.gMemLeakInfo[reg] = malloc(sizeof(T2kMeamLeakInfo)*T2K_MEM_LEAK_INFO_TABLE_SIZE);
- memset(regMemLeakInfo.gMemLeakInfo[reg],0x0,
- sizeof(T2kMeamLeakInfo)*T2K_MEM_LEAK_INFO_TABLE_SIZE);
- regMemLeakInfo.regStartAddr[reg] = 0;
-
-
- regMemLeakInfo.regStartAddr[reg] = 0;
- if (pthread_mutex_init(&(regMemLeakInfo.memLock[reg]), NULL) != 0)
- {
- printf("\n mutex init failed\n");
- return RFAILED;
- }
- }
+ uint8_t reg =0;
+ /* Initailize mem leak tool memorys for debguing */
+ regMemLeakInfo.numActvRegions=0;
+ for(reg=0; reg <SS_MAX_REGS; reg++)
+ {
+ regMemLeakInfo.gMemLeakInfo[reg] = malloc(sizeof(T2kMeamLeakInfo)*T2K_MEM_LEAK_INFO_TABLE_SIZE);
+ memset(regMemLeakInfo.gMemLeakInfo[reg],0x0,
+ sizeof(T2kMeamLeakInfo)*T2K_MEM_LEAK_INFO_TABLE_SIZE);
+ regMemLeakInfo.regStartAddr[reg] = 0;
+
+
+ regMemLeakInfo.regStartAddr[reg] = 0;
+ if (pthread_mutex_init(&(regMemLeakInfo.memLock[reg]), NULL) != 0)
+ {
+ printf("\n mutex init failed\n");
+ return RFAILED;
+ }
+ }
#endif
#ifdef INTEL_WLS
/* Now allocate WLS memory */
if (mtCMMRegCb[i] == NULLP)
{
sprintf(errMsg,"\n ssdInitMem(): Could not allocated memory \
- for the Region:%d control block\n",i);
+ for the Region:%d control block\n",i);
SPrint(errMsg);
- for (k = 0; k < i; k++)
- {
- cmMmRegDeInit(mtCMMRegCb[k]);
- free(mtCMMRegCfg[k]->vAddr);
- free(mtCMMRegCb[k]);
+ for (k = 0; k < i; k++)
+ {
+ cmMmRegDeInit(mtCMMRegCb[k]);
+ free(mtCMMRegCfg[k]->vAddr);
+ free(mtCMMRegCb[k]);
free(mtCMMRegCfg[k]);
- }
- return RFAILED;
+ }
+ return RFAILED;
}
mtCMMRegCfg[i] = (CmMmRegCfg *)calloc(1, sizeof(CmMmRegCfg));
mtCMMRegCfg[i]->size = region->heapsize;
for (j = 0; j < region->numBkts; j++)
{
-/* mt033.201 - addition for including the header size while computing the total size */
+ /* mt033.201 - addition for including the header size while computing the total size */
#ifdef SSI_DEBUG_LEVEL1
- mtCMMRegCfg[i]->size += (region->bkt[j].blkSize + sizeof(CmMmBlkHdr)) *\
- (region->bkt[j].numBlks);
+ mtCMMRegCfg[i]->size += (region->bkt[j].blkSize + sizeof(CmMmBlkHdr)) *\
+ (region->bkt[j].numBlks);
#else
- mtCMMRegCfg[i]->size += region->bkt[j].blkSize * region->bkt[j].numBlks;
+ mtCMMRegCfg[i]->size += region->bkt[j].blkSize * region->bkt[j].numBlks;
#endif /* SSI_DEBUG_LEVEL1 */
}
#ifdef INTEL_WLS
mtCMMRegCfg[i]->vAddr = (Data *)mtRegMemSz[i].startAddr;
#else
mtCMMRegCfg[i]->vAddr = (Data *)calloc(mtCMMRegCfg[i]->size,
- sizeof(Data));
+ sizeof(Data));
#endif
#ifdef XEON_SPECIFIC_CHANGES
CM_LOG_DEBUG(CM_LOG_ID_MT, "Static Region-->Bkt[%d] Addr:[%p] RegionId=[%d] Size=[%d] \n",
- i, mtCMMRegCfg[i]->vAddr, region->regionId, mtCMMRegCfg[i]->size);
+ i, mtCMMRegCfg[i]->vAddr, region->regionId, mtCMMRegCfg[i]->size);
#endif
#ifdef TENB_RTLIN_CHANGES
mlock(mtCMMRegCfg[i]->vAddr, mtCMMRegCfg[i]->size*sizeof(Data));
if (mtCMMRegCfg[i]->vAddr == NULLP)
{
- sprintf(errMsg,"\n ssdInitMem(): Could not allocate memory \
- for the Region:%d \n",i);
- SPrint(errMsg);
- for (k = 0; k < i; k++)
- {
- cmMmRegDeInit(mtCMMRegCb[k]);
- free(mtCMMRegCfg[k]->vAddr);
- free(mtCMMRegCb[k]);
- free(mtCMMRegCfg[k]);
- }
- free(mtCMMRegCb[i]);
- free(mtCMMRegCfg[i]);
- return RFAILED;
+ sprintf(errMsg,"\n ssdInitMem(): Could not allocate memory \
+ for the Region:%d \n",i);
+ SPrint(errMsg);
+ for (k = 0; k < i; k++)
+ {
+ cmMmRegDeInit(mtCMMRegCb[k]);
+ free(mtCMMRegCfg[k]->vAddr);
+ free(mtCMMRegCb[k]);
+ free(mtCMMRegCfg[k]);
+ }
+ free(mtCMMRegCb[i]);
+ free(mtCMMRegCfg[i]);
+ return RFAILED;
}
for (j = 0; j < region->numBkts; j++)
{
- mtCMMRegCfg[i]->bktCfg[j].size = region->bkt[j].blkSize;
- mtCMMRegCfg[i]->bktCfg[j].numBlks = region->bkt[j].numBlks;
+ mtCMMRegCfg[i]->bktCfg[j].size = region->bkt[j].blkSize;
+ mtCMMRegCfg[i]->bktCfg[j].numBlks = region->bkt[j].numBlks;
}
/* initialize the CMM */
#ifdef SS_LOCKLESS_MEMORY
if (cmMmStatRegInit(region->regionId, mtCMMRegCb[i], mtCMMRegCfg[i]) != ROK)
#else
- if (cmMmRegInit(region->regionId, mtCMMRegCb[i], mtCMMRegCfg[i]) != ROK)
+ if (cmMmRegInit(region->regionId, mtCMMRegCb[i], mtCMMRegCfg[i]) != ROK)
#endif /* SS_LOCKLESS_MEMORY */
- {
- for (k = 0; k < i; k++)
- {
- cmMmRegDeInit(mtCMMRegCb[k]);
- free(mtCMMRegCfg[k]->vAddr);
- free(mtCMMRegCb[k]);
- free(mtCMMRegCfg[k]);
- }
- free(mtCMMRegCfg[i]->vAddr);
- free(mtCMMRegCb[i]);
- free(mtCMMRegCfg[i]);
- return RFAILED;
- }
+ {
+ for (k = 0; k < i; k++)
+ {
+ cmMmRegDeInit(mtCMMRegCb[k]);
+ free(mtCMMRegCfg[k]->vAddr);
+ free(mtCMMRegCb[k]);
+ free(mtCMMRegCfg[k]);
+ }
+ free(mtCMMRegCfg[i]->vAddr);
+ free(mtCMMRegCb[i]);
+ free(mtCMMRegCfg[i]);
+ return RFAILED;
+ }
/* initialize the STREAMS module */
/* mt019.201: STREAMS module will only apply to DFLT_REGION */
if (region->regionId == 0)
{
- if (ssStrmCfg(region->regionId, region->regionId) != ROK)
- {
- for (k = 0; k < i; k++)
- {
- cmMmRegDeInit(mtCMMRegCb[k]);
- free(mtCMMRegCfg[k]->vAddr);
- free(mtCMMRegCb[k]);
- free(mtCMMRegCfg[k]);
- }
- cmMmRegDeInit(mtCMMRegCb[i]);
- free(mtCMMRegCfg[i]->vAddr);
- free(mtCMMRegCb[i]);
- free(mtCMMRegCfg[i]);
- return RFAILED;
- }
+ if (ssStrmCfg(region->regionId, region->regionId) != ROK)
+ {
+ for (k = 0; k < i; k++)
+ {
+ cmMmRegDeInit(mtCMMRegCb[k]);
+ free(mtCMMRegCfg[k]->vAddr);
+ free(mtCMMRegCb[k]);
+ free(mtCMMRegCfg[k]);
+ }
+ cmMmRegDeInit(mtCMMRegCb[i]);
+ free(mtCMMRegCfg[i]->vAddr);
+ free(mtCMMRegCb[i]);
+ free(mtCMMRegCfg[i]);
+ return RFAILED;
+ }
}
}
-/* mt001.301 : Additions */
+ /* mt001.301 : Additions */
#ifdef SS_MEM_LEAK_STS
cmInitMemLeakMdl();
#endif /* SS_MEM_LEAK_STS */
\f
/*
-*
-* Fun: De-initialize region/pool tables
-*
-* Desc: This function reverses the initialization in ssdInitMem().
-*
-* Ret: ROK - ok
-*
-* Notes:
-*
-* File: mt_ss.c
-*
-*/
-Void ssdDeinitMem(void)
-{
- /* mt018.201 - added local variables */
- uint8_t i;
-
- /* mt008.301 Additions */
-#ifdef SS_MEM_LEAK_STS
- cmDeinitMemLeakMdl();
-#endif /* SS_MEM_LEAK_STS */
+ *
+ * Fun: De-initialize region/pool tables
+ *
+ * Desc: This function reverses the initialization in ssdInitMem().
+ *
+ * Ret: ROK - ok
+ *
+ * Notes:
+ *
+ * File: mt_ss.c
+ *
+ */
+Void ssdDeinitMem(void)
+{
+ /* mt018.201 - added local variables */
+ uint8_t i;
+
+ /* mt008.301 Additions */
+#ifdef SS_MEM_LEAK_STS
+ cmDeinitMemLeakMdl();
+#endif /* SS_MEM_LEAK_STS */
for (i = 0; i < mtMemoCfg.numRegions; i++)
{
\f
/*
-*
-* Fun: Initialize task table
-*
-* Desc: This function initializes MTSS-specific information
-* in the task table.
-*
-* Ret: ROK - ok
-*
-* Notes:
-*
-* File: mt_ss.c
-*
-*/
+ *
+ * Fun: Initialize task table
+ *
+ * Desc: This function initializes MTSS-specific information
+ * in the task table.
+ *
+ * Ret: ROK - ok
+ *
+ * Notes:
+ *
+ * File: mt_ss.c
+ *
+ */
S16 ssdInitTsk(void)
{
-/* mt001.301 : Additions */
-/*mt013.301 :Added SS_AFFINITY_SUPPORT */
+ /* mt001.301 : Additions */
+ /*mt013.301 :Added SS_AFFINITY_SUPPORT */
#if defined(SS_MULTICORE_SUPPORT) ||defined(SS_AFFINITY_SUPPORT)
uint32_t tskInd = 0;
#endif /* SS_MULTICORE_SUPPORT || SS_AFFINITY_SUPPORT */
-/*mt013.301 :Added SS_AFFINITY_SUPPORT */
+ /*mt013.301 :Added SS_AFFINITY_SUPPORT */
#if defined(SS_MULTICORE_SUPPORT) || defined(SS_AFFINITY_SUPPORT)
/* initialize system task information */
for (tskInd = 0; tskInd < SS_MAX_STSKS; tskInd++)
\f
/*
-*
-* Fun: Deinitialize task table
-*
-* Desc: This function reverses the initialization perfomed in
-* ssdInitTsk().
-*
-* Ret: ROK - ok
-*
-* Notes:
-*
-* File: mt_ss.c
-*
-*/
+ *
+ * Fun: Deinitialize task table
+ *
+ * Desc: This function reverses the initialization perfomed in
+ * ssdInitTsk().
+ *
+ * Ret: ROK - ok
+ *
+ * Notes:
+ *
+ * File: mt_ss.c
+ *
+ */
Void ssdDeinitTsk(void)
{
\f
#ifdef SS_DRVR_SUPPORT
/*
-*
-* Fun: Initialize driver task table
-*
-* Desc: This function initializes MTSS-specific information
-* in the driver task table.
-*
-* Ret: ROK - ok
-*
-* Notes:
-*
-* File: mt_ss.c
-*
-*/
+ *
+ * Fun: Initialize driver task table
+ *
+ * Desc: This function initializes MTSS-specific information
+ * in the driver task table.
+ *
+ * Ret: ROK - ok
+ *
+ * Notes:
+ *
+ * File: mt_ss.c
+ *
+ */
S16 ssdInitDrvr(void)
{
S16 i;
}
#endif
- /*mt014.301 : 4GMX release related changes*/
+ /*mt014.301 : 4GMX release related changes*/
#ifdef SS_4GMX_UCORE
uarmDrvrInit();
#endif
\f
/*
-*
-* Fun: Deinitialize driver information
-*
-* Desc: This function reverses the initialization performed in
-* ssdInitDrvr().
-*
-* Ret: ROK - ok
-*
-* Notes:
-*
-* File: mt_ss.c
-*
-*/
+ *
+ * Fun: Deinitialize driver information
+ *
+ * Desc: This function reverses the initialization performed in
+ * ssdInitDrvr().
+ *
+ * Ret: ROK - ok
+ *
+ * Notes:
+ *
+ * File: mt_ss.c
+ *
+ */
Void ssdDeinitDrvr(void)
{
- /* mt008.301: Terminate the Driver Task on exit */
- while(pthread_cancel(osCp.dep.isTskHdlrTID));
+ /* mt008.301: Terminate the Driver Task on exit */
+ while(pthread_cancel(osCp.dep.isTskHdlrTID));
#ifdef L2_L3_SPLIT
- TL_Close(AppContext.hUAII);
- if (clusterMode == RADIO_CLUSTER_MODE)
- {
+ TL_Close(AppContext.hUAII);
+ if (clusterMode == RADIO_CLUSTER_MODE)
+ {
TL_Close(AppContext.hUAII_second);
- }
+ }
#endif
return;
\f
/*
-*
-* Fun: Initialize timer table
-*
-* Desc: This function initializes MTSS-specific information
-* in the timer table.
-*
-* Ret: ROK - ok
-*
-* Notes:
-*
-* File: mt_ss.c
-*
-*/
+ *
+ * Fun: Initialize timer table
+ *
+ * Desc: This function initializes MTSS-specific information
+ * in the timer table.
+ *
+ * Ret: ROK - ok
+ *
+ * Notes:
+ *
+ * File: mt_ss.c
+ *
+ */
S16 ssdInitTmr(void)
{
pthread_attr_t attr;
struct sched_param param_sched;
- /* mt010.21: addition */
+ /* mt010.21: addition */
S32 i;
#ifdef SS_MULTICORE_SUPPORT
SsSTskEntry *sTsk;
osCp.dep.tmrTqCp.tmrLen = SS_MAX_TMRS;
- /* mt010.21: addition */
+ /* mt010.21: addition */
osCp.dep.tmrTqCp.nxtEnt = 0;
for (i=0; i< SS_MAX_TMRS; i++)
{
#endif
if ((pthread_create(&osCp.dep.tmrHdlrTID, &attr, mtTmrHdlr, NULLP)) != 0)
{
- /* mt020.201 - Addition for destroying thread attribute object attr */
- pthread_attr_destroy(&attr);
+ /* mt020.201 - Addition for destroying thread attribute object attr */
+ pthread_attr_destroy(&attr);
- return RFAILED;
+ return RFAILED;
}
#ifdef SS_THR_REG_MAP
threadCreated = ssCheckAndAddMemoryRegionMap(osCp.dep.tmrHdlrTID,
- sTsk->region);
+ sTsk->region);
}
#endif /* SS_THR_REG_MAP */
#ifdef SS_MEM_WL_DEBUG
\f
/*
-*
-* Fun: Deinitialize timer table
-*
-* Desc: This function reverses the initialization performed in
-* ssdInitTmr().
-*
-* Ret: ROK - ok
-*
-* Notes:
-*
-* File: mt_ss.c
-*
-*/
+ *
+ * Fun: Deinitialize timer table
+ *
+ * Desc: This function reverses the initialization performed in
+ * ssdInitTmr().
+ *
+ * Ret: ROK - ok
+ *
+ * Notes:
+ *
+ * File: mt_ss.c
+ *
+ */
Void ssdDeinitTmr(void)
{
#ifdef SS_MULTICORE_SUPPORT
#if (ERRCLASS & ERRCLS_DEBUG)
MTLOGERROR(ERRCLS_DEBUG, EMT008, (ErrVal) ret,
- "Could not lock system task table");
+ "Could not lock system task table");
#endif
return;
}
SUnlock(&osCp.sTskTblLock);
#endif /* SS_MULTICORE_SUPPORT */
- /* mt008.301: Terminate the timer thread on exit */
- while(pthread_cancel(osCp.dep.tmrHdlrTID));
- return;
+ /* mt008.301: Terminate the timer thread on exit */
+ while(pthread_cancel(osCp.dep.tmrHdlrTID));
+ return;
}
\f
/*
-*
-* Fun: ssdInitLog
-*
-* Desc: Pre-tst() initialization.
-*
-* Ret: ROK - ok
-*
-* Notes:
-*
-* File: mt_ss.c
-*
-*/
+ *
+ * Fun: ssdInitLog
+ *
+ * Desc: Pre-tst() initialization.
+ *
+ * Ret: ROK - ok
+ *
+ * Notes:
+ *
+ * File: mt_ss.c
+ *
+ */
S16 ssdInitLog(void)
{
-/* mt027.201 - Modification to fix warnings with no STDIN and STDOUT */
+ /* mt027.201 - Modification to fix warnings with no STDIN and STDOUT */
#ifdef CONAVL
#ifndef CONRD
S32 flags;
#endif /* CONRD */
#endif /* CONAVL */
-/* mt008.301: ssdInitFinal changed to ssdInitLog */
+ /* mt008.301: ssdInitFinal changed to ssdInitLog */
#ifdef CONAVL
osCp.dep.conInFp = (FILE *) stdin;
osCp.dep.conOutFp = (FILE *) stdout;
-/* added compile time flag CONRD: mt017.21 */
+ /* added compile time flag CONRD: mt017.21 */
#ifndef CONRD
#ifndef CONSTDIO
fd = fileno(osCp.dep.conInFp);
if ((tcgetattr(fd, &tio)) != 0)
{
- printf("Error: disable canonical input processing\n");
+ printf("\nError: disable canonical input processing\n");
return RFAILED;
}
tio.c_cc[VTIME] = 0;
if ((tcsetattr(fd, TCSANOW, &tio)) != 0)
{
- printf("Error: while tcsetattr() processing\n");
+ printf("\nError: while tcsetattr() processing\n");
return RFAILED;
}
flags &= ~O_NONBLOCK;
if (fcntl(fd, F_SETFL, flags) == -1)
{
- printf("Error: while fcntl processing\n");
+ printf("\nError: while fcntl processing\n");
return RFAILED;
}
/* mt020.201 - Addition for destroying thread attribute object attr */
pthread_attr_destroy(&attr);
- printf("Error: Logging Thread creation failed \n");
+ printf("\nError: Logging Thread creation failed \n");
return RFAILED;
}
\f
/*
-*
-* Fun: ssdDeinitLog
-*
-* Desc: This function reverses the initialization performed in
-* ssdInitLog().
-*
-* Ret: ROK - ok
-*
-* Notes:
-*
-* File: mt_ss.c
-*
-*/
+ *
+ * Fun: ssdDeinitLog
+ *
+ * Desc: This function reverses the initialization performed in
+ * ssdInitLog().
+ *
+ * Ret: ROK - ok
+ *
+ * Notes:
+ *
+ * File: mt_ss.c
+ *
+ */
/* mt008.301: ssdDeinitFinal changed to ssdDeinitLog */
Void ssdDeinitLog(void)
{
-/* mt008.301: ssdDeinitFinal changed to ssdDeinitLog */
+ /* mt008.301: ssdDeinitFinal changed to ssdDeinitLog */
#ifdef CONAVL
#ifndef CONRD
- /* mt008.301: Terminate the console reader on exit */
- while(pthread_cancel(osCp.dep.conHdlrTID));
+ /* mt008.301: Terminate the console reader on exit */
+ while(pthread_cancel(osCp.dep.conHdlrTID));
#endif /* CONRD */
#endif /* CONVAL */
#endif /* SS_WATCHDOG_IPV6 */
if(bind(osCp.wdCp.globWd.sock, (struct sockaddr *)&tmpaddr, sizeof(struct sockaddr)) != 0
-)
+ )
{
sprintf(prntBuf,"ssdInitWatchDog: bind failed errno [%d]\n", errno);
SPrint(prntBuf);
}
#ifdef SS_MULTIPLE_PROCS
-S16 ssdWatchDgActvTmr
+ S16 ssdWatchDgActvTmr
(
-ProcId proc,
-Ent ent,
-Inst inst
-)
+ ProcId proc,
+ Ent ent,
+ Inst inst
+ )
#else
S16 ssdWatchDgActvTmr(Void)
#endif /* SS_MULTIPLE_PROCS */
return ROK;
}
-Void ssdWatchDgTmrEvt
+ Void ssdWatchDgTmrEvt
(
-PTR cb, /* control block */
-S16 event /* timer number */
-)
+ PTR cb, /* control block */
+ S16 event /* timer number */
+ )
{
-/* mt003.301 Fixed warings */
+ /* mt003.301 Fixed warings */
#ifdef DEBUGP
DateTime dt;
#endif /* DEBUGP */
{
case SS_TMR_HRTBT:
#ifdef DEBUGP
- SPrint("Timer Heartbeat Request Expired");
- SGetDateTime(&dt);
- sprintf(prntBuf," Time: %02d:%02d:%02d\n",dt.hour,dt.min, dt.sec);
- SPrint(prntBuf);
-#endif
- restartTmr=TRUE;
-
- SLock(&osCp.wdCp.wdLock);
- for(i=0; i < osCp.wdCp.globWd.numNodes; i++)
- {
- if(osCp.wdCp.globWd.wdsta[i].status == 0)
- {
- sprintf(prntBuf, "Node [ %s ] Down. Calling user callback\n", inet_ntoa(osCp.wdCp.globWd.wdsta[i].addr));
- SPrint(prntBuf);
- if(osCp.wdCp.globWd.callback != 0)
- {
- osCp.wdCp.globWd.callback(osCp.wdCp.globWd.data);
- }
- }
- }
- SUnlock(&osCp.wdCp.wdLock);
-
- if(!osCp.wdCp.globWd.watchdogStop)
- {
- ssdStartWatchDgTmr(NULLP, SS_TMR_HRTBT, osCp.wdCp.globWd.timeout);
- ssdSndHrtBtMsg(restartTmr, SS_WD_HB_REQ);
- }
- break;
+ SPrint("Timer Heartbeat Request Expired");
+ SGetDateTime(&dt);
+ sprintf(prntBuf," Time: %02d:%02d:%02d\n",dt.hour,dt.min, dt.sec);
+ SPrint(prntBuf);
+#endif
+ restartTmr=TRUE;
+
+ SLock(&osCp.wdCp.wdLock);
+ for(i=0; i < osCp.wdCp.globWd.numNodes; i++)
+ {
+ if(osCp.wdCp.globWd.wdsta[i].status == 0)
+ {
+ sprintf(prntBuf, "Node [ %s ] Down. Calling user callback\n", inet_ntoa(osCp.wdCp.globWd.wdsta[i].addr));
+ SPrint(prntBuf);
+ if(osCp.wdCp.globWd.callback != 0)
+ {
+ osCp.wdCp.globWd.callback(osCp.wdCp.globWd.data);
+ }
+ }
+ }
+ SUnlock(&osCp.wdCp.wdLock);
+
+ if(!osCp.wdCp.globWd.watchdogStop)
+ {
+ ssdStartWatchDgTmr(NULLP, SS_TMR_HRTBT, osCp.wdCp.globWd.timeout);
+ ssdSndHrtBtMsg(restartTmr, SS_WD_HB_REQ);
+ }
+ break;
default:
- break;
+ break;
}
}
-Void ssdStartWatchDgTmr
+ Void ssdStartWatchDgTmr
(
-void *cb,
-S16 event,
-uint16_t wait
-)
+ void *cb,
+ S16 event,
+ uint16_t wait
+ )
{
CmTmrArg arg;
int i;
#endif
- /* mt003.301 Modifications */
+ /* mt003.301 Modifications */
#ifdef DEBUGP
SGetDateTime(&dt);
sprintf(prntBuf," Time: %02d:%02d:%02d\n",dt.hour,dt.min, dt.sec);
return;
}
-Void ssdStopWatchDgTmr
+ Void ssdStopWatchDgTmr
(
-void *cb,
-S16 event
-)
+ void *cb,
+ S16 event
+ )
{
CmTmrArg arg;
#ifdef DEBUGP
int i;
#endif
- /* mt003.301 Modifications */
+ /* mt003.301 Modifications */
#ifdef DEBUGP
SGetDateTime(&dt);
sprintf(prntBuf," Time: %02d:%02d:%02d\n",dt.hour,dt.min, dt.sec);
return;
}
-S16 ssdSndHrtBtMsg
+ S16 ssdSndHrtBtMsg
(
-Bool restart,
-uint32_t type
-)
+ Bool restart,
+ uint32_t type
+ )
{
S16 ret = ROK;
#ifdef DEBUGP
{
if(osCp.wdCp.globWd.wdsta[n].addr.s_addr == 0)
{
- continue;
+ continue;
}
/* Identify the destination node */
if(err == -1)
{
#ifdef DEBUGP
- sprintf(prntBuf,"ssdSndHrtBtMsg: HB to node [%s:%d] failed status[%d]\n",
- inet_ntoa(tmpaddr.sin_addr), tmpaddr.sin_port, errno);
- SPrint(prntBuf);
+ sprintf(prntBuf,"ssdSndHrtBtMsg: HB to node [%s:%d] failed status[%d]\n",
+ inet_ntoa(tmpaddr.sin_addr), tmpaddr.sin_port, errno);
+ SPrint(prntBuf);
#endif /* DEBUGP */
}
else
{
#ifdef DEBUGP
- sprintf(prntBuf,"ssdSndHrtBtMsg: HB to node [%s:%d] sent[%d]\n", inet_ntoa(tmpaddr.sin_addr), tmpaddr.sin_port, err);
- SPrint(prntBuf);
+ sprintf(prntBuf,"ssdSndHrtBtMsg: HB to node [%s:%d] sent[%d]\n", inet_ntoa(tmpaddr.sin_addr), tmpaddr.sin_port, err);
+ SPrint(prntBuf);
#endif /* DEBUGP */
}
}
/* mt022.201 - Modification to fix problem when NOCMDLINE is defined */
#ifndef NOCMDLINE
/*
-*
-* Fun: mtGetOpts
-*
-* Desc: This function gets command line options.
-*
-* Ret:
-*
-* Notes:
-*
-* File: mt_ss.c
-*
-*/
+ *
+ * Fun: mtGetOpts
+ *
+ * Desc: This function gets command line options.
+ *
+ * Ret:
+ *
+ * Notes:
+ *
+ * File: mt_ss.c
+ *
+ */
static Void mtGetOpts(void)
{
S32 argc;
FILE *memOpt; /* memory options file pointer */
Txt pBuf[128];
uint8_t i;
-/* mt007.301 : Fix related to file based mem config on 64 bit machine */
+ /* mt007.301 : Fix related to file based mem config on 64 bit machine */
PTR numReg;
PTR numBkts;
PTR bktSz = NULLP;
switch (ret)
{
#ifndef NOFILESYS
-/* mt001.301 : Additions */
+ /* mt001.301 : Additions */
#ifdef SS_MEM_LEAK_STS
- case 'm':
- cmMemOpenMemLkFile(msOptArg);
- break;
-#endif
- case 'o':
- osCp.dep.fileOutFp = fopen(msOptArg, "w");
- break;
- case 'f':
- fileBasedMemCfg = TRUE;
- memOpt = fopen(msOptArg, "r");
-
- /* if file does not exist or could not be opened then use the
- * default memory configuration as defined in mt_ss.h
- */
- if (memOpt == (FILE *) NULLP)
- {
- sprintf(pBuf, "\nMTSS: Memory configuration file: %s could not\
- be opened, using default mem configuration\n", msOptArg);
- SPrint(pBuf);
- break;
- }
- i = 0;
- while (fgets((Txt *)line, 256, memOpt) != NULLP)
- {
- if(line[0] == '#' || line[0] < '0' || line[0] > '9') /* Comment line or non numeric character, so skip it and read next line */
- continue;
- if(error == TRUE)
- break;
- switch (i)
- {
- case 0: /*** INPUT: Number of regions ***/
- sscanf(line, "%ld", (long *) &numReg);
- mtMemoCfg.numRegions = numReg;
- if(mtMemoCfg.numRegions > SS_MAX_REGS)
- {
- printf("\n No. of regions are > SS_MAX_REGS:%d \n",SS_MAX_REGS);
- error = TRUE;
- break;
- }
- i++;
- break;
- case 1: /*** INPUT: Number of buckets and number of Pools ***/
- sscanf(line, "%ld %ld", (long *) &numBkts, (long *) &numPools);
- if(numBkts > MT_MAX_BKTS)
- {
- printf("\n No. of buckets are > MT_MAX_BKTS :%d \n",MT_MAX_BKTS);
- error = TRUE;
- break;
- }
- if(numPools > SS_MAX_POOLS_PER_REG)
- {
- printf("\n No. of pools are > SS_MAX_POOLS_PER_REG:%d \n",SS_MAX_POOLS_PER_REG);
- error = TRUE;
- break;
- }
- /*
- * Delay updation from local variable to global
- * structure of number of regions and heap data to
- * counter error conditions present above.
- */
- for(idx = 0; idx < cfgNumRegs; idx++)
- {
- mtMemoCfg.region[idx].numBkts = numBkts;
- cfgRegInfo[idx].region = idx;
- cfgRegInfo[idx].numPools = numPools;
- /*
- * Initialize the pool info as static type with size zero
- */
- for(poolIdx = 0; poolIdx < numPools; poolIdx++)
- {
- cfgRegInfo[idx].pools[poolIdx].type = SS_POOL_STATIC;
- cfgRegInfo[idx].pools[poolIdx].size = 0;
- }
- }
- i++;
- break;
- case 2: /*** INPUT: Bucket Id and size of the bucket ***/
- if(bktUpdtCnt < numBkts) /* more set of bucket can be added */
- {
- sscanf(line, "%ld %ld",(long *)&bktIdx, (long *) &bktSz);
- }
- if(bktIdx >= numBkts)
- {
- printf("\n Invalid Bucket Id, may be >= the No. of buckets:%ld\n",numBkts);
- error = TRUE;
- break;
-
- }
- mtBktInfo[bktIdx].blkSize = bktSz;
- bktUpdtCnt++;
- if(bktUpdtCnt == numBkts)
- {
- i++; /*done reading bkt info, start reading individual region info*/
- bktUpdtCnt = 0;
- }
- break;
- case 3: /*** INPUT: Region Id (ranges from 0 to numRegions-1) **/
- sscanf(line,"%ld",(long *) ®Id);
- if(regId >= mtMemoCfg.numRegions)
- {
- printf("\n Invalid Region Id, may be >= the No. of regions:%d\n",mtMemoCfg.numRegions);
+ case 'm':
+ cmMemOpenMemLkFile(msOptArg);
+ break;
+#endif
+ case 'o':
+ osCp.dep.fileOutFp = fopen(msOptArg, "w");
+ break;
+ case 'f':
+ fileBasedMemCfg = TRUE;
+ memOpt = fopen(msOptArg, "r");
+
+ /* if file does not exist or could not be opened then use the
+ * default memory configuration as defined in mt_ss.h
+ */
+ if (memOpt == (FILE *) NULLP)
+ {
+ sprintf(pBuf, "\nMTSS: Memory configuration file: %s could not\
+ be opened, using default mem configuration\n", msOptArg);
+ SPrint(pBuf);
+ break;
+ }
+ i = 0;
+ while (fgets((Txt *)line, 256, memOpt) != NULLP)
+ {
+ if(line[0] == '#' || line[0] < '0' || line[0] > '9') /* Comment line or non numeric character, so skip it and read next line */
+ continue;
+ if(error == TRUE)
+ break;
+ switch (i)
+ {
+ case 0: /*** INPUT: Number of regions ***/
+ sscanf(line, "%ld", (long *) &numReg);
+ mtMemoCfg.numRegions = numReg;
+ if(mtMemoCfg.numRegions > SS_MAX_REGS)
+ {
+ printf("\n No. of regions are > SS_MAX_REGS:%d \n",SS_MAX_REGS);
+ error = TRUE;
+ break;
+ }
+ i++;
+ break;
+ case 1: /*** INPUT: Number of buckets and number of Pools ***/
+ sscanf(line, "%ld %ld", (long *) &numBkts, (long *) &numPools);
+ if(numBkts > MT_MAX_BKTS)
+ {
+ printf("\n No. of buckets are > MT_MAX_BKTS :%d \n",MT_MAX_BKTS);
+ error = TRUE;
+ break;
+ }
+ if(numPools > SS_MAX_POOLS_PER_REG)
+ {
+ printf("\n No. of pools are > SS_MAX_POOLS_PER_REG:%d \n",SS_MAX_POOLS_PER_REG);
+ error = TRUE;
+ break;
+ }
+ /*
+ * Delay updation from local variable to global
+ * structure of number of regions and heap data to
+ * counter error conditions present above.
+ */
+ for(idx = 0; idx < cfgNumRegs; idx++)
+ {
+ mtMemoCfg.region[idx].numBkts = numBkts;
+ cfgRegInfo[idx].region = idx;
+ cfgRegInfo[idx].numPools = numPools;
+ /*
+ * Initialize the pool info as static type with size zero
+ */
+ for(poolIdx = 0; poolIdx < numPools; poolIdx++)
+ {
+ cfgRegInfo[idx].pools[poolIdx].type = SS_POOL_STATIC;
+ cfgRegInfo[idx].pools[poolIdx].size = 0;
+ }
+ }
+ i++;
+ break;
+ case 2: /*** INPUT: Bucket Id and size of the bucket ***/
+ if(bktUpdtCnt < numBkts) /* more set of bucket can be added */
+ {
+ sscanf(line, "%ld %ld",(long *)&bktIdx, (long *) &bktSz);
+ }
+ if(bktIdx >= numBkts)
+ {
+ printf("\n Invalid Bucket Id, may be >= the No. of buckets:%ld\n",numBkts);
+ error = TRUE;
+ break;
+
+ }
+ mtBktInfo[bktIdx].blkSize = bktSz;
+ bktUpdtCnt++;
+ if(bktUpdtCnt == numBkts)
+ {
+ i++; /*done reading bkt info, start reading individual region info*/
+ bktUpdtCnt = 0;
+ }
+ break;
+ case 3: /*** INPUT: Region Id (ranges from 0 to numRegions-1) **/
+ sscanf(line,"%ld",(long *) ®Id);
+ if(regId >= mtMemoCfg.numRegions)
+ {
+ printf("\n Invalid Region Id, may be >= the No. of regions:%d\n",mtMemoCfg.numRegions);
#ifndef XEON_SPECIFIC_CHANGES
- error = TRUE;
+ error = TRUE;
#endif
- break;
- }
- mtMemoCfg.region[regId].regionId = regId;
- i++;
- break;
- case 4: /*** INPUT: BktId (ranges from 0 to numBkts-1), No. of blks ***/
- if(bktUpdtCnt < numBkts)
- {
- sscanf(line, "%ld %ld",(long *)&bktIdx, (long *)&bktNum);
- if(bktIdx >= numBkts)
- {
- printf("\n Invalid Bucket Id, may be >= the No. of buckets:%ld\n",numBkts);
- error = TRUE;
- break;
-
- }
- if(bktIdx < MT_MAX_BKTS)
- {
- mtMemoCfg.region[regId].bkt[bktIdx].blkSize = mtBktInfo[bktIdx].blkSize;
- mtMemoCfg.region[regId].bkt[bktIdx].numBlks = bktNum;
- cfgRegInfo[regId].pools[bktIdx].type = SS_POOL_DYNAMIC;
- cfgRegInfo[regId].pools[bktIdx].size = mtBktInfo[bktIdx].blkSize - (sizeof(SsMblk)+sizeof(SsDblk));
- }
- bktUpdtCnt++;
- if(bktUpdtCnt == numBkts)
- {
- i++;
- bktUpdtCnt = 0;
- }
- }
- break;
- case 5: /* INPUT: Heapsize ***/
- sscanf(line, "%ld", (long *) &heapSz);
- mtMemoCfg.region[regId].heapsize = heapSz;
- regUpdtCnt++;
- if(regUpdtCnt != mtMemoCfg.numRegions)
- {
- i = 3;
- }
- else
- {
- i++;
- }
- break;
+ break;
+ }
+ mtMemoCfg.region[regId].regionId = regId;
+ i++;
+ break;
+ case 4: /*** INPUT: BktId (ranges from 0 to numBkts-1), No. of blks ***/
+ if(bktUpdtCnt < numBkts)
+ {
+ sscanf(line, "%ld %ld",(long *)&bktIdx, (long *)&bktNum);
+ if(bktIdx >= numBkts)
+ {
+ printf("\n Invalid Bucket Id, may be >= the No. of buckets:%ld\n",numBkts);
+ error = TRUE;
+ break;
+
+ }
+ if(bktIdx < MT_MAX_BKTS)
+ {
+ mtMemoCfg.region[regId].bkt[bktIdx].blkSize = mtBktInfo[bktIdx].blkSize;
+ mtMemoCfg.region[regId].bkt[bktIdx].numBlks = bktNum;
+ cfgRegInfo[regId].pools[bktIdx].type = SS_POOL_DYNAMIC;
+ cfgRegInfo[regId].pools[bktIdx].size = mtBktInfo[bktIdx].blkSize - (sizeof(SsMblk)+sizeof(SsDblk));
+ }
+ bktUpdtCnt++;
+ if(bktUpdtCnt == numBkts)
+ {
+ i++;
+ bktUpdtCnt = 0;
+ }
+ }
+ break;
+ case 5: /* INPUT: Heapsize ***/
+ sscanf(line, "%ld", (long *) &heapSz);
+ mtMemoCfg.region[regId].heapsize = heapSz;
+ regUpdtCnt++;
+ if(regUpdtCnt != mtMemoCfg.numRegions)
+ {
+ i = 3;
+ }
+ else
+ {
+ i++;
+ }
+ break;
#ifdef SS_LOCKLESS_MEMORY
- case 6:
- sscanf(line, "%ld", (long *) &numBkts);
- mtGlobMemoCfg.numBkts = numBkts;
+ case 6:
+ sscanf(line, "%ld", (long *) &numBkts);
+ mtGlobMemoCfg.numBkts = numBkts;
#ifndef XEON_SPECIFIC_CHANGES
- mtDynMemoCfg.numRegions = mtMemoCfg.numRegions;
+ mtDynMemoCfg.numRegions = mtMemoCfg.numRegions;
#endif
#ifdef XEON_SPECIFIC_CHANGES
- CM_LOG_DEBUG(CM_LOG_ID_MT, "numRegions = %d numBkts = %d\n",
- mtDynMemoCfg.numRegions, mtGlobMemoCfg.numBkts);
- for(idx = 0; idx < mtDynMemoCfg.numRegions; idx++)
+ CM_LOG_DEBUG(CM_LOG_ID_MT, "numRegions = %d numBkts = %d\n",
+ mtDynMemoCfg.numRegions, mtGlobMemoCfg.numBkts);
+ for(idx = 0; idx < mtDynMemoCfg.numRegions; idx++)
#else
- for(idx = 0; idx < mtMemoCfg.numRegions; idx++)
+ for(idx = 0; idx < mtMemoCfg.numRegions; idx++)
#endif
- {
- mtDynMemoCfg.region[idx].regionId = idx;
- mtDynMemoCfg.region[idx].numBkts = numBkts;
- }
-
- bktUpdtCnt = 0;
- i++;
- break;
-
- case 7:
- if(bktUpdtCnt < numBkts)
- {
- sscanf(line, "%ld %ld %ld %ld %ld %ld", (long *) &bktIdx,
- (long *) &bktSz, (long *) &bktNum,
- (long *) &bktSetSize, (long *) &bktRelThr,
- (long *) &bktAqurThr);
- /* Klock work fix ccpu00148484 */
- if(bktIdx < SS_MAX_POOLS_PER_REG)
- {
- mtGlobMemoCfg.bkt[bktIdx].blkSize = bktSz;
- mtGlobMemoCfg.bkt[bktIdx].numBlks = bktNum;
- mtGlobMemoCfg.bkt[bktIdx].bucketSetSize = bktSetSize;
+ {
+ mtDynMemoCfg.region[idx].regionId = idx;
+ mtDynMemoCfg.region[idx].numBkts = numBkts;
+ }
+
+ bktUpdtCnt = 0;
+ i++;
+ break;
+
+ case 7:
+ if(bktUpdtCnt < numBkts)
+ {
+ sscanf(line, "%ld %ld %ld %ld %ld %ld", (long *) &bktIdx,
+ (long *) &bktSz, (long *) &bktNum,
+ (long *) &bktSetSize, (long *) &bktRelThr,
+ (long *) &bktAqurThr);
+ /* Klock work fix ccpu00148484 */
+ if(bktIdx < SS_MAX_POOLS_PER_REG)
+ {
+ mtGlobMemoCfg.bkt[bktIdx].blkSize = bktSz;
+ mtGlobMemoCfg.bkt[bktIdx].numBlks = bktNum;
+ mtGlobMemoCfg.bkt[bktIdx].bucketSetSize = bktSetSize;
#ifdef XEON_SPECIFIC_CHANGES
- CM_LOG_DEBUG(CM_LOG_ID_MT, "Pool [%d] blkSize %d numBlks %d bucketSetSize %d\n",
- bktUpdtCnt, mtGlobMemoCfg.bkt[bktIdx].blkSize,
- mtGlobMemoCfg.bkt[bktIdx].numBlks, mtGlobMemoCfg.bkt[bktIdx].bucketSetSize);
+ CM_LOG_DEBUG(CM_LOG_ID_MT, "Pool [%d] blkSize %d numBlks %d bucketSetSize %d\n",
+ bktUpdtCnt, mtGlobMemoCfg.bkt[bktIdx].blkSize,
+ mtGlobMemoCfg.bkt[bktIdx].numBlks, mtGlobMemoCfg.bkt[bktIdx].bucketSetSize);
- if(bktIdx >= SS_MAX_POOLS_PER_REG)
- {
- printf("\nNo. of Buckets/pools are > SS_MAX_POOLS_PER_REG:%d\n",SS_MAX_POOLS_PER_REG);
- error = TRUE;
- break;
- }
+ if(bktIdx >= SS_MAX_POOLS_PER_REG)
+ {
+ printf("\nNo. of Buckets/pools are > SS_MAX_POOLS_PER_REG:%d\n",SS_MAX_POOLS_PER_REG);
+ error = TRUE;
+ break;
+ }
#endif
- for(idx = 0; idx < mtMemoCfg.numRegions; idx++)
- {
- mtDynMemoCfg.region[idx].bkt[bktIdx].blkSetRelThreshold = bktRelThr;
- mtDynMemoCfg.region[idx].bkt[bktIdx].blkSetAcquireThreshold = bktAqurThr;
+ for(idx = 0; idx < mtMemoCfg.numRegions; idx++)
+ {
+ mtDynMemoCfg.region[idx].bkt[bktIdx].blkSetRelThreshold = bktRelThr;
+ mtDynMemoCfg.region[idx].bkt[bktIdx].blkSetAcquireThreshold = bktAqurThr;
#ifdef XEON_SPECIFIC_CHANGES
- CM_LOG_DEBUG(CM_LOG_ID_MT, "Pool [%d] blkSetRelThreshold %d blkSetAcquireThreshold %d\n",
- bktUpdtCnt, mtDynMemoCfg.region[idx].bkt[bktIdx].blkSetRelThreshold,
- mtDynMemoCfg.region[idx].bkt[bktIdx].blkSetAcquireThreshold);
+ CM_LOG_DEBUG(CM_LOG_ID_MT, "Pool [%d] blkSetRelThreshold %d blkSetAcquireThreshold %d\n",
+ bktUpdtCnt, mtDynMemoCfg.region[idx].bkt[bktIdx].blkSetRelThreshold,
+ mtDynMemoCfg.region[idx].bkt[bktIdx].blkSetAcquireThreshold);
#endif
- }
- }
- bktUpdtCnt++;
- }
+ }
+ }
+ bktUpdtCnt++;
+ }
#ifdef XEON_SPECIFIC_CHANGES
- if(bktUpdtCnt == numBkts)
- {
- i=8;
- }
- break;
-
- case 8: /* INPUT: Global Heapsize ***/
- sscanf(line, "%ld", (long *) &heapSz);
- mtGlobMemoCfg.heapSize = heapSz;
- CM_LOG_DEBUG(CM_LOG_ID_MT, "Global Heap size = %d\n", mtGlobMemoCfg.heapSize);
+ if(bktUpdtCnt == numBkts)
+ {
+ i=8;
+ }
+ break;
+
+ case 8: /* INPUT: Global Heapsize ***/
+ sscanf(line, "%ld", (long *) &heapSz);
+ mtGlobMemoCfg.heapSize = heapSz;
+ CM_LOG_DEBUG(CM_LOG_ID_MT, "Global Heap size = %d\n", mtGlobMemoCfg.heapSize);
#endif
- break;
+ break;
#endif
- }
- }
- if(error == TRUE)
- {
- memConfigured = FALSE;
- }
- else
- {
- memConfigured = TRUE;
- }
- fclose (memOpt);
- break;
+ }
+ }
+ if(error == TRUE)
+ {
+ memConfigured = FALSE;
+ }
+ else
+ {
+ memConfigured = TRUE;
+ }
+ fclose (memOpt);
+ break;
#endif
- case 's':
-/* mt028.201: modification: multiple procs support related changes */
+ case 's':
+ /* mt028.201: modification: multiple procs support related changes */
#ifndef SS_MULTIPLE_PROCS
#ifdef ENB_RELAY
- osCp.procId = PID_STK((ProcId) strtol(msOptArg, NULLP, 0));
+ osCp.procId = PID_STK((ProcId) strtol(msOptArg, NULLP, 0));
#else
- osCp.procId = (ProcId) strtol(msOptArg, NULLP, 0);
+ osCp.procId = (ProcId) strtol(msOptArg, NULLP, 0);
#endif
#else /* SS_MULTIPLE_PROCS */
- {
- ProcId procId;
+ {
+ ProcId procId;
#ifdef ENB_RELAY
- procId = PID_STK((ProcId) strtol(msOptArg, NULLP, 0));
+ procId = PID_STK((ProcId) strtol(msOptArg, NULLP, 0));
#else
- procId = (ProcId) strtol(msOptArg, NULLP, 0);
+ procId = (ProcId) strtol(msOptArg, NULLP, 0);
#endif
- SAddProcIdLst(1, &procId);
- }
+ SAddProcIdLst(1, &procId);
+ }
#endif /* SS_MULTIPLE_PROCS */
- break;
+ break;
- case 'c':
- osCp.configFilePath = msOptArg;
- break;
+ case 'c':
+ osCp.configFilePath = msOptArg;
+ break;
- case '?':
- /* fall through */
+ case '?':
+ /* fall through */
- default:
- break;
+ default:
+ break;
}
}
\f
/*
-*
-* Fun: SGetOpt
-*
-* Desc: Get options from command line
-*
-* Ret: option - success
-* '?' - fail
-* EOF - end of options
-*
-* Notes: Handles command lines like the following
-*
-* if opts = "abc:d"
-* then command line should look like this...
-* -a foo -b foo1 -c -d foo
-*
-* code usage:
-*
-* while ((ret = SGetOpt(msArgc, msArgv, "ls")) != EOF )
-* {
-* switch(ret)
-* {
-* case 'l':
-* nloops = atoi(msArgv[msOptInd]);
-* break;
-* case 's':
-* state1 = atoi(msArgv[msOptInd]);
-* case '?':
-* default:
-* break;
-* }
-* }
-*
-* File: mt_ss.c
-*
-*/
-S16 SGetOpt
+ *
+ * Fun: SGetOpt
+ *
+ * Desc: Get options from command line
+ *
+ * Ret: option - success
+ * '?' - fail
+ * EOF - end of options
+ *
+ * Notes: Handles command lines like the following
+ *
+ * if opts = "abc:d"
+ * then command line should look like this...
+ * -a foo -b foo1 -c -d foo
+ *
+ * code usage:
+ *
+ * while ((ret = SGetOpt(msArgc, msArgv, "ls")) != EOF )
+ * {
+ * switch(ret)
+ * {
+ * case 'l':
+ * nloops = atoi(msArgv[msOptInd]);
+ * break;
+ * case 's':
+ * state1 = atoi(msArgv[msOptInd]);
+ * case '?':
+ * default:
+ * break;
+ * }
+ * }
+ *
+ * File: mt_ss.c
+ *
+ */
+ S16 SGetOpt
(
-int argc, /* argument count */
-char **argv, /* argument value */
-char *opts /* options */
-)
+ int argc, /* argument count */
+ char **argv, /* argument value */
+ char *opts /* options */
+ )
{
/* mt020.201 - Removed for no command line */
#ifndef NOCMDLINE
sp = 1;
if (sp == 1)
{
- /*mt013.301 : Changes as per coding standards*/
+ /*mt013.301 : Changes as per coding standards*/
if (msOptInd >= (S16) argc || argv[msOptInd][0] == '\0')
{
- return (EOF);
+ return (EOF);
}
else
{
- if (!strcmp(argv[msOptInd], "--"))
- {
- msOptInd++;
- return (EOF);
- }
- else if (argv[msOptInd][0] != '-')
- {
- msOptInd++;
- return ('?');
- }
+ if (!strcmp(argv[msOptInd], "--"))
+ {
+ msOptInd++;
+ return (EOF);
+ }
+ else if (argv[msOptInd][0] != '-')
+ {
+ msOptInd++;
+ return ('?');
+ }
}
}
{
if (argv[msOptInd][++sp] == '\0')
{
- msOptInd++;
- sp = 1;
+ msOptInd++;
+ sp = 1;
}
return ('?');
if (argv[msOptInd][sp+1] != '\0') msOptArg = &argv[msOptInd++][sp+1];
else
{
- if (++msOptInd >= (S16) argc)
- {
- sp = 1;
- return ('?');
- }
- else msOptArg = argv[msOptInd++];
-
- sp = 1;
+ if (++msOptInd >= (S16) argc)
+ {
+ sp = 1;
+ return ('?');
+ }
+ else msOptArg = argv[msOptInd++];
+
+ sp = 1;
}
}
else
{
if (argv[msOptInd][++sp] == '\0')
{
- sp = 1;
- msOptInd++;
+ sp = 1;
+ msOptInd++;
}
msOptArg = NULLP;
\f
/*
-*
-* Fun: ssdStart
-*
-* Desc: This function starts system services execution; the
-* permanent tasks are started and the system enters a
-* ready state.
-*
-* Ret: Void
-*
-* Notes:
-*
-* File: mt_ss.c
-*
-*/
+ *
+ * Fun: ssdStart
+ *
+ * Desc: This function starts system services execution; the
+ * permanent tasks are started and the system enters a
+ * ready state.
+ *
+ * Ret: Void
+ *
+ * Notes:
+ *
+ * File: mt_ss.c
+ *
+ */
Void ssdStart(void)
{
S16 i;
\f
/*
-* indirect interface functions to system services service user
-*/
+ * indirect interface functions to system services service user
+ */
\f
/*
-*
-* Fun: ssdAttachTTsk
-*
-* Desc: This function sends the initial tick message to a TAPA
-* task if the task is a permanent task.
-*
-* Ret: ROK - ok
-*
-* Notes:
-*
-* File: mt_ss.c
-*
-*/
-S16 ssdAttachTTsk
+ *
+ * Fun: ssdAttachTTsk
+ *
+ * Desc: This function sends the initial tick message to a TAPA
+ * task if the task is a permanent task.
+ *
+ * Ret: ROK - ok
+ *
+ * Notes:
+ *
+ * File: mt_ss.c
+ *
+ */
+ S16 ssdAttachTTsk
(
-SsTTskEntry *tTsk /* pointer to TAPA task entry */
-)
+ SsTTskEntry *tTsk /* pointer to TAPA task entry */
+ )
{
Buffer *mBuf;
SsMsgInfo *mInfo;
if (ret != ROK)
{
#if (ERRCLASS & ERRCLS_DEBUG)
- MTLOGERROR(ERRCLS_DEBUG, EMT001, ret, "SGetMsg() failed");
+ MTLOGERROR(ERRCLS_DEBUG, EMT001, ret, "SGetMsg() failed");
#endif
- return RFAILED;
+ return RFAILED;
}
mInfo = (SsMsgInfo *)mBuf->b_rptr;
mInfo->eventInfo.event = SS_EVNT_PERMTICK;
/* set up post structure */
-/* mt028.201: modification: multiple procs support related changes */
+ /* mt028.201: modification: multiple procs support related changes */
#ifndef SS_MULTIPLE_PROCS
mInfo->pst.dstProcId = SFndProcId();
mInfo->pst.srcProcId = SFndProcId();
mInfo->pst.srcInst = tTsk->inst;
ret = ssDmndQPutLast(&tTsk->sTsk->dQ, mBuf,
- (tTsk->tskPrior * SS_MAX_MSG_PRI) + PRIOR3);
+ (tTsk->tskPrior * SS_MAX_MSG_PRI) + PRIOR3);
if (ret != ROK)
{
- SPutMsg(mBuf);
+ SPutMsg(mBuf);
#if (ERRCLASS & ERRCLS_DEBUG)
- MTLOGERROR(ERRCLS_DEBUG, EMT002, ret,
- "Could not write to demand queue");
+ MTLOGERROR(ERRCLS_DEBUG, EMT002, ret,
+ "Could not write to demand queue");
#endif
- return RFAILED;
+ return RFAILED;
}
}
\f
/*
-*
-* Fun: ssdDetachTTsk
-*
-* Desc: Does nothing.
-*
-* Ret: ROK - ok
-*
-* Notes:
-*
-* File: mt_ss.c
-*
-*/
-S16 ssdDetachTTsk
+ *
+ * Fun: ssdDetachTTsk
+ *
+ * Desc: Does nothing.
+ *
+ * Ret: ROK - ok
+ *
+ * Notes:
+ *
+ * File: mt_ss.c
+ *
+ */
+ S16 ssdDetachTTsk
(
-SsTTskEntry *tTsk /* pointer to TAPA task entry */
-)
+ SsTTskEntry *tTsk /* pointer to TAPA task entry */
+ )
{
return ROK;
\f
/*
-*
-* Fun: ssdCreateSTsk
-*
-* Desc: This function creates a system task. A thread is started
-* on the system task handler function defined later.
-*
-* Ret: ROK - ok
-*
-* Notes:
-*
-* File: mt_ss.c
-*
-*/
-S16 ssdCreateSTsk
+ *
+ * Fun: ssdCreateSTsk
+ *
+ * Desc: This function creates a system task. A thread is started
+ * on the system task handler function defined later.
+ *
+ * Ret: ROK - ok
+ *
+ * Notes:
+ *
+ * File: mt_ss.c
+ *
+ */
+ S16 ssdCreateSTsk
(
-SsSTskEntry *sTsk /* pointer to system task entry */
-)
+ SsSTskEntry *sTsk /* pointer to system task entry */
+ )
{
S16 ret;
pthread_attr_t attr;
#ifdef SS_SINGLE_THREADED
-/* mt001.301 : Additions */
+ /* mt001.301 : Additions */
#ifndef SS_WATCHDOG
#ifdef SS_MULTICORE_SUPPORT
if (osCp.numSTsks > 1)
#else
- if (osCp.numSTsks > 0)
+ if (osCp.numSTsks > 0)
#endif /* SS_MULTICORE_SUPPORT */
#else
#ifdef SS_MULTICORE_SUPPORT
- if (osCp.numSTsks > 3)
+ if (osCp.numSTsks > 3)
#else
- if (osCp.numSTsks > 2)
+ if (osCp.numSTsks > 2)
#endif /* SS_MULTICORE_SUPPORT */
#endif /* SS_WATCHDOG */
- {
- return ROK;
- }
+ {
+ return ROK;
+ }
#endif
pthread_attr_init(&attr);
ssdSetPthreadAttr(sTsk->tskPrior, &attr);
- printf("Creating thread here %s %d\n", __FILE__, __LINE__);
+ printf("\nCreating thread here %s %d\n", __FILE__, __LINE__);
#ifdef TENB_T2K3K_SPECIFIC_CHANGES
if (sTsk->tskPrior == 0)
{
- printf("Creating RT thread #######################\n");
+ printf("\nCreating RT thread #######################\n");
#ifdef SS_THR_REG_MAP
/* When the thread is created, we check for the memory mapping table if
* threadId can be placed in thread memory map table. If it is not able to place
while(threadCreated == FALSE)
{
#endif
- ret = pthread_create(&sTsk->dep.tId, &attr, mtTskHdlr, (Ptr)sTsk);
- if (ret != 0)
- {
- DU_LOG("\nDU APP : Failed to create thread. Cause[%d]",ret);
- pthread_attr_destroy(&attr);
+ ret = pthread_create(&sTsk->dep.tId, &attr, mtTskHdlr, (Ptr)sTsk);
+ if (ret != 0)
+ {
+ DU_LOG("\nDU APP : Failed to create thread. Cause[%d]",ret);
+ pthread_attr_destroy(&attr);
#if (ERRCLASS & ERRCLS_DEBUG)
- MTLOGERROR(ERRCLS_DEBUG, EMT004, ERRZERO, "Could not create thread");
+ MTLOGERROR(ERRCLS_DEBUG, EMT004, ERRZERO, "Could not create thread");
#endif
- return RFAILED;
- }
+ return RFAILED;
+ }
#ifdef SS_THR_REG_MAP
- threadCreated = ssCheckAndAddMemoryRegionMap(sTsk->dep.tId,
- sTsk->region);
+ threadCreated = ssCheckAndAddMemoryRegionMap(sTsk->dep.tId,
+ sTsk->region);
}
#endif
}
while(threadCreated == FALSE)
{
#endif
- ret = pthread_create(&sTsk->dep.tId, &attr, mtTskHdlr, (Ptr)sTsk);
- if (ret != 0)
- {
+ ret = pthread_create(&sTsk->dep.tId, &attr, mtTskHdlr, (Ptr)sTsk);
+ if (ret != 0)
+ {
- /* mt020.201 - Addition for destroying thread attribute object attr */
- pthread_attr_destroy(&attr);
+ /* mt020.201 - Addition for destroying thread attribute object attr */
+ pthread_attr_destroy(&attr);
#if (ERRCLASS & ERRCLS_DEBUG)
- MTLOGERROR(ERRCLS_DEBUG, EMT004, ERRZERO, "Could not create thread");
+ MTLOGERROR(ERRCLS_DEBUG, EMT004, ERRZERO, "Could not create thread");
#endif
- return RFAILED;
- }
+ return RFAILED;
+ }
#ifdef SS_THR_REG_MAP
- threadCreated = ssCheckAndAddMemoryRegionMap(sTsk->dep.tId,
- sTsk->region);
+ threadCreated = ssCheckAndAddMemoryRegionMap(sTsk->dep.tId,
+ sTsk->region);
}
#endif
}
-/*mt013.301 :Added SS_AFFINITY_SUPPORT */
+ /*mt013.301 :Added SS_AFFINITY_SUPPORT */
#if defined(SS_MULTICORE_SUPPORT) ||defined(SS_AFFINITY_SUPPORT)
{
- static uint32_t stLwpId = 3;
- sTsk->dep.lwpId = ++stLwpId;
+ static uint32_t stLwpId = 3;
+ sTsk->dep.lwpId = ++stLwpId;
}
#endif /* SS_MULTICORE_SUPPORT || SS_AFFINITY_SUPPORT */
}
-int SCreatePThread
+ int SCreatePThread
(
-pthread_t* tid,
-pthread_attr_t* attr,
-void *(*start_routine) (void *),
-void* arg
-)
+ pthread_t* tid,
+ pthread_attr_t* attr,
+ void *(*start_routine) (void *),
+ void* arg
+ )
{
int retVal = 0;
#ifdef SS_THR_REG_MAP
}
threadArg->argument = arg;
threadArg->start_routine = start_routine;
-
- printf("Creating thread here %s %d\n", __FILE__, __LINE__);
+
+ printf("\nCreating thread here %s %d\n", __FILE__, __LINE__);
{
#ifdef SS_THR_REG_MAP
/* When the thread is created, we check for the memory mapping table if
while(threadCreated == FALSE)
{
#endif
- /*pthreadCreateHdlr */
- if (((retVal = pthread_create(tid, attr, pthreadCreateHdlr, threadArg))) != 0)
- {
+ /*pthreadCreateHdlr */
+ if (((retVal = pthread_create(tid, attr, pthreadCreateHdlr, threadArg))) != 0)
+ {
- return (retVal);
- }
+ return (retVal);
+ }
#ifdef SS_THR_REG_MAP
- threadCreated = ssCheckAndAddMemoryRegionMap(*tid, SS_MAX_REGS - 1);
+ threadCreated = ssCheckAndAddMemoryRegionMap(*tid, SS_MAX_REGS - 1);
}
#endif
}
/*
-*
-* Fun: Set Pthread Attributes
-*
-* Desc: This function is used to set various explicit
-* pthread attributes like, priority scheduling,etc
-*
-* Ret: ROK - ok
-*
-* Notes:
-*
-* File: mt_ss.c
-*
-*/
-
-static S16 ssdSetPthreadAttr
+ *
+ * Fun: Set Pthread Attributes
+ *
+ * Desc: This function is used to set various explicit
+ * pthread attributes like, priority scheduling,etc
+ *
+ * Ret: ROK - ok
+ *
+ * Notes:
+ *
+ * File: mt_ss.c
+ *
+ */
+
+ static S16 ssdSetPthreadAttr
(
-S32 tskPrior,
-pthread_attr_t *attr
-)
+ S32 tskPrior,
+ pthread_attr_t *attr
+ )
{
struct sched_param param;
/* TODO:: This can be avoided by reducing the priority
* of iccserv thread in l1_master.sh*/
#ifdef L2_L3_SPLIT
- if (clusterMode == RADIO_CLUSTER_MODE)
- {
- if(tskPrior == PRIOR1)
- {/* DL RLC */
- param.sched_priority = 91;
- }
- }
+ if (clusterMode == RADIO_CLUSTER_MODE)
+ {
+ if(tskPrior == PRIOR1)
+ {/* DL RLC */
+ param.sched_priority = 91;
+ }
+ }
#endif
#endif
- printf("Set priority %u\n", param.sched_priority);
+ printf("\nSet priority %u\n", param.sched_priority);
/* Set Scheduler to explicit, without this non of the below
pthread attr works */
#if defined(SS_MULTICORE_SUPPORT) ||defined(SS_AFFINITY_SUPPORT)
/*
-*
-* Fun: Get the current core/cpu affinity for a thread/lwp
-*
-* Desc: This function is used to get the current processor/core
-* affinity for a a system task (thread/lwp). It sets the
-* affinity based on the mode supplied by the caller.
-*
-* Ret: ROK - ok
-* RFAILED - failed, general (optional)
-*
-* Notes:
-*
-* File: ss_task.c
-*
-*/
-S16 ssdGetAffinity
+ *
+ * Fun: Get the current core/cpu affinity for a thread/lwp
+ *
+ * Desc: This function is used to get the current processor/core
+ * affinity for a a system task (thread/lwp). It sets the
+ * affinity based on the mode supplied by the caller.
+ *
+ * Ret: ROK - ok
+ * RFAILED - failed, general (optional)
+ *
+ * Notes:
+ *
+ * File: ss_task.c
+ *
+ */
+ S16 ssdGetAffinity
(
-SSTskId *tskId, /* filled in with system task ID */
-uint32_t *coreId /* the core/processor id to which the affinity is set */
-)
+ SSTskId *tskId, /* filled in with system task ID */
+ uint32_t *coreId /* the core/processor id to which the affinity is set */
+ )
{
uint32_t tskInd;
{
if (osCp.sTskTbl[tskInd].tskId == *tskId)
{
- tId = osCp.sTskTbl[tskInd].dep.tId;
- break;
+ tId = osCp.sTskTbl[tskInd].dep.tId;
+ break;
} /* end if */
} /* end for */
/* if tskId is not found in the tskTbl */
if (tskInd == SS_MAX_STSKS)
{
- MTLOGERROR(ERRCLS_DEBUG, EMT036, ERRZERO, "Invalid system task Id\n");
- return RFAILED;
+ MTLOGERROR(ERRCLS_DEBUG, EMT036, ERRZERO, "Invalid system task Id\n");
+ return RFAILED;
}
CPU_ZERO( &cpuSet);
/* set thread affinity for linux */
- if (pthread_getaffinity_np(tId, sizeof(cpuSet), &cpuSet) < 0)
- {
+ if (pthread_getaffinity_np(tId, sizeof(cpuSet), &cpuSet) < 0)
+ {
#if (ERRCLASS & ERRCLS_DEBUG)
- MTLOGERROR(ERRCLS_DEBUG, EMT037, ERRZERO, "Could not get thread affinity\n");
+ MTLOGERROR(ERRCLS_DEBUG, EMT037, ERRZERO, "Could not get thread affinity\n");
#endif
- return RFAILED;
- } /* end if pthread_setaffinity fails */
+ return RFAILED;
+ } /* end if pthread_setaffinity fails */
for (cpuInd = 0; cpuInd <CPU_SETSIZE; cpuInd++)
{
- if (CPU_ISSET (cpuInd, & cpuSet))
- {
- *coreId = cpuInd;
- break;
- } /* end if */
+ if (CPU_ISSET (cpuInd, & cpuSet))
+ {
+ *coreId = cpuInd;
+ break;
+ } /* end if */
} /* end for */
#else
{
if (osCp.sTskTbl[tskInd].tskId == *tskId)
{
- lwpId = osCp.sTskTbl[tskInd].dep.lwpId;
- break;
+ lwpId = osCp.sTskTbl[tskInd].dep.lwpId;
+ break;
} /* end if */
} /* end for */
/* if tskId is not found in the tskTbl */
if (tskInd == SS_MAX_STSKS)
{
- MTLOGERROR(ERRCLS_DEBUG, EMT036, ERRZERO, "Invalid system task Id\n");
- return RFAILED;
+ MTLOGERROR(ERRCLS_DEBUG, EMT036, ERRZERO, "Invalid system task Id\n");
+ return RFAILED;
}
/* set thread affinity for Solaris */
/*
-*
-* Fun: Set the core/cpu affinity for a thread/lwp
-*
-* Desc: This function is used to set processor/core affinity for a
-* a system task (thread/lwp). It sets the affinity based on the
-* mode supplied by the caller.
-*
-* Ret: ROK - ok
-* RFAILED - failed, general (optional)
-*
-* Notes:
-*
-* File: ss_task.c
-*
-*/
-S16 ssdSetAffinity
+ *
+ * Fun: Set the core/cpu affinity for a thread/lwp
+ *
+ * Desc: This function is used to set processor/core affinity for a
+ * a system task (thread/lwp). It sets the affinity based on the
+ * mode supplied by the caller.
+ *
+ * Ret: ROK - ok
+ * RFAILED - failed, general (optional)
+ *
+ * Notes:
+ *
+ * File: ss_task.c
+ *
+ */
+ S16 ssdSetAffinity
(
-SSTskId *tskId, /* filled in with system task ID */
-uint32_t coreId /* the core/processor id to which the affinity has to be set */
-)
+ SSTskId *tskId, /* filled in with system task ID */
+ uint32_t coreId /* the core/processor id to which the affinity has to be set */
+ )
{
uint32_t tskInd = 0;
#ifdef SS_LINUX
for (tskInd = 0; tskInd < SS_MAX_STSKS; tskInd++)
{
- /* Here tskId can not be used as index as the task may be terminated if
- there is a TERM even for that tsk, thus breaking the task Id numbering
- sequence */
+ /* Here tskId can not be used as index as the task may be terminated if
+ there is a TERM even for that tsk, thus breaking the task Id numbering
+ sequence */
if (osCp.sTskTbl[tskInd].tskId == *tskId)
{
- tId = osCp.sTskTbl[tskInd].dep.tId;
- break;
+ tId = osCp.sTskTbl[tskInd].dep.tId;
+ break;
} /* end if */
} /* end for */
/* if tskId is not found in the tskTbl */
if (tskInd == SS_MAX_STSKS)
{
- MTLOGERROR(ERRCLS_DEBUG, EMT036, ERRZERO, "Invalid system task Id\n");
- return RFAILED;
+ MTLOGERROR(ERRCLS_DEBUG, EMT036, ERRZERO, "Invalid system task Id\n");
+ return RFAILED;
}
/* initialize the cpu mask */
/* comment: modify to use tskId as lwpId to avoid the loop and the new lwpId variable in dep */
if (osCp.sTskTbl[tskInd].tskId == *tskId)
{
- lwpId = osCp.sTskTbl[tskInd].dep.lwpId;
- break;
+ lwpId = osCp.sTskTbl[tskInd].dep.lwpId;
+ break;
} /* end if */
} /* end for */
\f
/*
-*
-* Fun: ssdDestroySTsk
-*
-* Desc: This function destroys a system task. A terminate
-* event message is sent to the thread function.
-*
-* Ret: ROK - ok
-*
-* Notes:
-*
-* File: mt_ss.c
-*
-*/
-S16 ssdDestroySTsk
+ *
+ * Fun: ssdDestroySTsk
+ *
+ * Desc: This function destroys a system task. A terminate
+ * event message is sent to the thread function.
+ *
+ * Ret: ROK - ok
+ *
+ * Notes:
+ *
+ * File: mt_ss.c
+ *
+ */
+ S16 ssdDestroySTsk
(
-SsSTskEntry *sTsk /* pointer to system task entry */
-)
+ SsSTskEntry *sTsk /* pointer to system task entry */
+ )
{
Buffer *mBuf;
SsMsgInfo *mInfo;
#if (ERRCLASS & ERRCLASS_DEBUG)
MTLOGERROR(ERRCLS_DEBUG, EMT006, ERRZERO,
- "Could not write to demand queue");
+ "Could not write to demand queue");
#endif
return RFAILED;
}
/* mt023.201 - Added SThreadYield function to yield CPU
-*
-* Fun: SThreadYield
-*
-* Desc: This function defers thread execution to any other ready
-* thread.
-*
-* Ret: ROK - ok
-* RFAILED - failure
-*
-* Notes:
-*
-* File: mt_ss.c
-*
-*/
-S16 SThreadYield(void)
-{
-
-
-/* mt024.201 - seperated Linux and other UNIX implementations
- */
-#ifdef SS_LINUX
- {
- struct timeval tw;
+ *
+ * Fun: SThreadYield
+ *
+ * Desc: This function defers thread execution to any other ready
+ * thread.
+ *
+ * Ret: ROK - ok
+ * RFAILED - failure
+ *
+ * Notes:
+ *
+ * File: mt_ss.c
+ *
+ */
+S16 SThreadYield(void)
+{
+
+
+ /* mt024.201 - seperated Linux and other UNIX implementations
+ */
+#ifdef SS_LINUX
+ {
+ struct timeval tw;
/* Set sleep value to 0 to yield CPU */
tw.tv_sec=0;
\f
/*
-*
-* Fun: Register timer
-*
-* Desc: This function is used to register a timer
-* function for the service user. System services
-* will invoke the timer activation function
-* passed to it at the specified intervals.
-*
-* Ret: ROK - ok
-*
-* Notes: Timing is handled by the common timers. The
-* ticks are handled by a thread that uses
-* nanosleep() and thus timing precision will not
-* be very accurate.
-*
-* File: mt_ss.c
-*
-*/
-S16 ssdRegTmr
+ *
+ * Fun: Register timer
+ *
+ * Desc: This function is used to register a timer
+ * function for the service user. System services
+ * will invoke the timer activation function
+ * passed to it at the specified intervals.
+ *
+ * Ret: ROK - ok
+ *
+ * Notes: Timing is handled by the common timers. The
+ * ticks are handled by a thread that uses
+ * nanosleep() and thus timing precision will not
+ * be very accurate.
+ *
+ * File: mt_ss.c
+ *
+ */
+ S16 ssdRegTmr
(
-SsTmrEntry *tmr /* pointer to timer entry */
-)
+ SsTmrEntry *tmr /* pointer to timer entry */
+ )
{
CmTmrArg arg;
\f
/*
-*
-* Fun: Deregister timer
-*
-* Desc: This function is used to deregister a timer function.
-*
-* Ret: ROK - ok
-*
-* Notes:
-*
-* File: mt_ss.c
-*
-*/
-S16 ssdDeregTmr
+ *
+ * Fun: Deregister timer
+ *
+ * Desc: This function is used to deregister a timer function.
+ *
+ * Ret: ROK - ok
+ *
+ * Notes:
+ *
+ * File: mt_ss.c
+ *
+ */
+ S16 ssdDeregTmr
(
-SsTmrEntry *tmr /* pointer to timer entry */
-)
+ SsTmrEntry *tmr /* pointer to timer entry */
+ )
{
CmTmrArg arg;
\f
/*
-*
-* Fun: Critical error
-*
-* Desc: This function is called when a critical error occurs.
-*
-* Ret: ROK - ok
-*
-* Notes:
-*
-* File: mt_ss.c
-*
-*/
-S16 ssdError
+ *
+ * Fun: Critical error
+ *
+ * Desc: This function is called when a critical error occurs.
+ *
+ * Ret: ROK - ok
+ *
+ * Notes:
+ *
+ * File: mt_ss.c
+ *
+ */
+ S16 ssdError
(
-Seq seq, /* sequence number */
-Reason reason /* reset reason */
-)
+ Seq seq, /* sequence number */
+ Reason reason /* reset reason */
+ )
{
S16 i;
pthread_t tId;
/* set up the message to display */
sprintf(errBuf, "\n\nFATAL ERROR - taskid = %x, errno = %d,"
- "reason = %d\n\n", (uint8_t)tId, seq, reason);
+ "reason = %d\n\n", (uint8_t)tId, seq, reason);
SPrint(errBuf);
for (i = 0; i < SS_MAX_STSKS; i++)
{
if (osCp.sTskTbl[i].used
- && !pthread_equal(osCp.sTskTbl[i].dep.tId, tId))
+ && !pthread_equal(osCp.sTskTbl[i].dep.tId, tId))
{
- pthread_kill(osCp.sTskTbl[i].dep.tId, SIGKILL);
+ pthread_kill(osCp.sTskTbl[i].dep.tId, SIGKILL);
}
}
\f
/*
-*
-* Fun: Log error
-*
-* Desc: This function is called to log an error.
-*
-* Ret: ROK - ok
-*
-* Notes:
-*
-* File: mt_ss.c
-*
-*/
-Void ssdLogError
+ *
+ * Fun: Log error
+ *
+ * Desc: This function is called to log an error.
+ *
+ * Ret: ROK - ok
+ *
+ * Notes:
+ *
+ * File: mt_ss.c
+ *
+ */
+ Void ssdLogError
(
-Ent ent, /* Calling layer's entity id */
-Inst inst, /* Calling layer's instance id */
-ProcId procId, /* Calling layer's processor id */
-Txt *file, /* file name where error occured */
-S32 line, /* line in file where error occured */
-ErrCls errCls, /* error class */
-ErrCode errCode, /* layer unique error code */
-ErrVal errVal, /* error value */
-Txt *errDesc /* description of error */
-)
+ Ent ent, /* Calling layer's entity id */
+ Inst inst, /* Calling layer's instance id */
+ ProcId procId, /* Calling layer's processor id */
+ Txt *file, /* file name where error occured */
+ S32 line, /* line in file where error occured */
+ ErrCls errCls, /* error class */
+ ErrCode errCode, /* layer unique error code */
+ ErrVal errVal, /* error value */
+ Txt *errDesc /* description of error */
+ )
{
#ifndef DEBUGNOEXIT
S16 i;
switch(errCls)
{
case ERRCLS_ADD_RES:
- errClsMsg = "ERRCLS_ADD_RES";
- break;
+ errClsMsg = "ERRCLS_ADD_RES";
+ break;
case ERRCLS_INT_PAR:
- errClsMsg = "ERRCLS_INT_PAR";
- break;
+ errClsMsg = "ERRCLS_INT_PAR";
+ break;
case ERRCLS_DEBUG:
- errClsMsg = "ERRCLS_DEBUG";
- break;
+ errClsMsg = "ERRCLS_DEBUG";
+ break;
-/* mt028.201 : Addition - ERRCLS_FTHA changes */
+ /* mt028.201 : Addition - ERRCLS_FTHA changes */
case ERRCLS_FTHA:
- errClsMsg = "ERRCLS_FTHA";
- break;
+ errClsMsg = "ERRCLS_FTHA";
+ break;
default:
- errClsMsg = "INVALID ERROR CLASS!";
- break;
+ errClsMsg = "INVALID ERROR CLASS!";
+ break;
}
-/*mt009.301 Fixed 64BIT compilation warnings*/
+ /*mt009.301 Fixed 64BIT compilation warnings*/
#ifdef ALIGN_64BIT
sprintf(errBuf,
- "\nmtss(posix): sw error: ent: %03d inst: %03d proc id: %03d \n"
- "file: %s line: %03d errcode: %05d errcls: %s\n"
- "errval: %05d errdesc: %s\n",
- ent, inst, procId, file, line, errCode, errClsMsg, errVal, errDesc);
+ "\nmtss(posix): sw error: ent: %03d inst: %03d proc id: %03d \n"
+ "file: %s line: %03d errcode: %05d errcls: %s\n"
+ "errval: %05d errdesc: %s\n",
+ ent, inst, procId, file, line, errCode, errClsMsg, errVal, errDesc);
#else
sprintf(errBuf,
- "\nmtss(posix): sw error: ent: %03d inst: %03d proc id: %03d \n"
- "file: %s line: %03ld errcode: %05ld errcls: %s\n"
- "errval: %05ld errdesc: %s\n",
- ent, inst, procId, file, line, errCode, errClsMsg, errVal, errDesc);
+ "\nmtss(posix): sw error: ent: %03d inst: %03d proc id: %03d \n"
+ "file: %s line: %03ld errcode: %05ld errcls: %s\n"
+ "errval: %05ld errdesc: %s\n",
+ ent, inst, procId, file, line, errCode, errClsMsg, errVal, errDesc);
#endif
SDisplay(0, errBuf);
-/* mt001.301 : Additions */
+ /* mt001.301 : Additions */
#ifdef SS_LOGGER_SUPPORT
SWrtLogBuf(errBuf);
#endif /* SS_LOGGER_SUPPORT */
/* debug errors halt the system */
if (errCls == ERRCLS_DEBUG)
{
-/* mt001.301 : Additions */
+ /* mt001.301 : Additions */
#ifdef SS_LOGGER_SUPPORT
- SCleanUp();
+ SCleanUp();
#endif /* SS_LOGGER_SUPPORT */
/* delete all system tasks */
for (i = 0; i < SS_MAX_STSKS; i++)
{
- if (osCp.sTskTbl[i].used
- && !pthread_equal(osCp.sTskTbl[i].dep.tId, tId))
- {
- pthread_kill(osCp.sTskTbl[i].dep.tId, SIGKILL);
- }
+ if (osCp.sTskTbl[i].used
+ && !pthread_equal(osCp.sTskTbl[i].dep.tId, tId))
+ {
+ pthread_kill(osCp.sTskTbl[i].dep.tId, SIGKILL);
+ }
}
#ifdef ENB_RELAY
\f
/*
-*
-* Fun: Register driver task
-*
-* Desc: This function is called to register the handlers for a
-* driver task.
-*
-* Ret: ROK - ok
-*
-* Notes:
-*
-* File: mt_ss.c
-*
-*/
-S16 ssdRegDrvrTsk
+ *
+ * Fun: Register driver task
+ *
+ * Desc: This function is called to register the handlers for a
+ * driver task.
+ *
+ * Ret: ROK - ok
+ *
+ * Notes:
+ *
+ * File: mt_ss.c
+ *
+ */
+ S16 ssdRegDrvrTsk
(
-SsDrvrTskEntry *drvrTsk /* driver task entry */
-)
+ SsDrvrTskEntry *drvrTsk /* driver task entry */
+ )
{
}
/* mt001.30 : Additions */
/*
-*
-* Fun: Deregister driver task
-*
-* Desc: This function is called to deregister the handlers for a
-* driver task.
-*
-* Ret: ROK - ok
-*
-* Notes:
-*
-* File: mt_ss.c
-*
-*/
-S16 ssdDeregDrvrTsk
+ *
+ * Fun: Deregister driver task
+ *
+ * Desc: This function is called to deregister the handlers for a
+ * driver task.
+ *
+ * Ret: ROK - ok
+ *
+ * Notes:
+ *
+ * File: mt_ss.c
+ *
+ */
+ S16 ssdDeregDrvrTsk
(
-SsDrvrTskEntry *drvrTsk /* driver task entry */
-)
+ SsDrvrTskEntry *drvrTsk /* driver task entry */
+ )
{
* mt003.301 Additions - SDeRegTTsk fix
*/
#ifdef SS_MULTIPLE_PROCS
-S16 ssdProcTTskTerm
+ S16 ssdProcTTskTerm
(
-ProcId procIdx,
-SsTTskEntry *tTsk,
-SsIdx idx
-)
+ ProcId procIdx,
+ SsTTskEntry *tTsk,
+ SsIdx idx
+ )
#else /*SS_MULTIPLE_PROCS*/
-S16 ssdProcTTskTerm
+ S16 ssdProcTTskTerm
(
-SsTTskEntry *tTsk,
-SsIdx idx
-)
+ SsTTskEntry *tTsk,
+ SsIdx idx
+ )
#endif /*SS_MULTIPLE_PROCS*/
{
#ifdef SS_MULTIPLE_PROCS
Inst inst;
SsSTskEntry *sTsk;
S16 n;
- S16 ret;
+ S16 ret;
ent = tTsk->ent;
inst = tTsk->inst;
- /* We check the sTsk element; if it is not NULLP, the
- * task is attached. So we have to detach it before
- * deregistering the task.
- */
+ /* We check the sTsk element; if it is not NULLP, the
+ * task is attached. So we have to detach it before
+ * deregistering the task.
+ */
ret = SLock(&osCp.sTskTblLock);
if (ret != ROK)
{
- MTLOGERROR(ERRCLS_DEBUG, EMTXXX, ERRZERO, "Could not lock system task table");
- return RFAILED;
+ MTLOGERROR(ERRCLS_DEBUG, EMTXXX, ERRZERO, "Could not lock system task table");
+ return RFAILED;
}
- SS_ACQUIRE_ALL_SEMA(&osCp.tTskTblSem, ret);
+ SS_ACQUIRE_ALL_SEMA(&osCp.tTskTblSem, ret);
if (ret != ROK)
{
#if (ERRCLASS & ERRCLS_DEBUG)
if ( SUnlock(&osCp.sTskTblLock) != ROK)
{
#if (ERRCLASS & ERRCLS_DEBUG)
- MTLOGERROR(ERRCLS_DEBUG, EMTXXX, ERRZERO, "Could not Unlock system task table");
- return RFAILED;
+ MTLOGERROR(ERRCLS_DEBUG, EMTXXX, ERRZERO, "Could not Unlock system task table");
+ return RFAILED;
#endif
}
{
#ifndef USE_MEMCAL
(Void)(*(tTsk->initTsk))(proc, ent, inst,
- DFLT_REGION,
- NRM_TERM,
- &(osCp.tTskTbl[idx].xxCb));
+ DFLT_REGION,
+ NRM_TERM,
+ &(osCp.tTskTbl[idx].xxCb));
#else
(Void)(*(tTsk->initTsk))(proc, ent, inst,
- SS_STATIC_REGION,
- NRM_TERM,
- &(osCp.tTskTbl[idx].xxCb));
+ SS_STATIC_REGION,
+ NRM_TERM,
+ &(osCp.tTskTbl[idx].xxCb));
#endif /* USE_MEMCAL */
}
#endif /* SS_MULTIPLE_PROCS */
for (n = 0; n < SS_MAX_TTSKS; n++)
{
- if (sTsk->tTsks[n] == idx)
- {
- sTsk->tTsks[n] = SS_INVALID_IDX;
- sTsk->numTTsks--;
- break;
- }
+ if (sTsk->tTsks[n] == idx)
+ {
+ sTsk->tTsks[n] = SS_INVALID_IDX;
+ sTsk->numTTsks--;
+ break;
+ }
}
- /* call the implementation to detach the task */
- ssdDetachTTsk(tTsk);
- /* 100178 */
- sTsk->dep.ent = ENTNC;
- sTsk->dep.inst = INSTNC;
+ /* call the implementation to detach the task */
+ ssdDetachTTsk(tTsk);
+ /* 100178 */
+ sTsk->dep.ent = ENTNC;
+ sTsk->dep.inst = INSTNC;
}
- /* Now we empty the entry for this task and update the table
- * information
- */
+ /* Now we empty the entry for this task and update the table
+ * information
+ */
#ifdef SS_MULTIPLE_PROCS
- osCp.tTskIds[procIdx][ent][inst] = SS_TSKNC;
+ osCp.tTskIds[procIdx][ent][inst] = SS_TSKNC;
#else /* SS_MULTIPLE_PROCS */
- osCp.tTskIds[ent][inst] = SS_TSKNC;
+ osCp.tTskIds[ent][inst] = SS_TSKNC;
#endif /* SS_MULTIPLE_PROCS */
- tTsk->used = FALSE;
+ tTsk->used = FALSE;
#ifdef SS_MULTIPLE_PROCS
- tTsk->proc = PROCNC;
+ tTsk->proc = PROCNC;
#endif /* SS_MULTIPLE_PROCS */
- tTsk->ent = ENTNC;
- tTsk->inst = INSTNC;
- tTsk->tskType = TTUND;
- tTsk->initTsk = NULLP;
- tTsk->actvTsk = NULLP;
- tTsk->sTsk = NULLP;
+ tTsk->ent = ENTNC;
+ tTsk->inst = INSTNC;
+ tTsk->tskType = TTUND;
+ tTsk->initTsk = NULLP;
+ tTsk->actvTsk = NULLP;
+ tTsk->sTsk = NULLP;
- tTsk->nxt = osCp.nxtTTskEntry;
- osCp.nxtTTskEntry = idx;
- osCp.numTTsks--;
+ tTsk->nxt = osCp.nxtTTskEntry;
+ osCp.nxtTTskEntry = idx;
+ osCp.numTTsks--;
#ifdef SS_MULTIPLE_PROCS
- /* mark the control block for this task as invalid */
- osCp.tTskTbl[idx].xxCb = NULLP;
+ /* mark the control block for this task as invalid */
+ osCp.tTskTbl[idx].xxCb = NULLP;
#endif
SS_RELEASE_ALL_SEMA(&osCp.tTskTblSem);
#if (ERRCLASS & ERRCLS_DEBUG)
MTLOGERROR(ERRCLS_DEBUG, EMTXXX, ERRZERO, "Could not Unlock system task table");
#endif
- return RFAILED;
+ return RFAILED;
}
- return ROK;
+ return ROK;
}
//#ifndef SPLIT_RLC_DL_TASK
Void ysMtTskHdlr(Void);
Void ysMtPollPhyMsg(uint8_t region);
Void ysMtRcvPhyMsg(Void);
-Void *mtTskHdlrT2kL2
+ Void *mtTskHdlrT2kL2
(
-Ptr tskPtr /* pointer to task entry */
-)
+ Ptr tskPtr /* pointer to task entry */
+ )
{
S16 ret;
/* wait for SS to come up */
/* It is required to block on this semaphore before starting actual processing of
- the thread becasue the creator of this thread might want to cance it without
- doing any processing. When this semaphore is released, means the creator gives
- the go ahead for actual processing and we should never come back to this point */
+ the thread becasue the creator of this thread might want to cance it without
+ doing any processing. When this semaphore is released, means the creator gives
+ the go ahead for actual processing and we should never come back to this point */
while ((ret = sem_wait(&osCp.dep.ssStarted) != ROK) && (errno == EINTR))
continue;
while(1)
{
ysMtPollPhyMsg(0); /* blocks, waiting for messages for L2
- * (processes L1 msgs) */
- }
+ * (processes L1 msgs) */
+ }
- return (NULLP);
+ return (NULLP);
}
#else
Void ysMtTskHdlr(Void);
Void YsPhyRecvMsg();
-Void *mtTskHdlrT2kL2
+ Void *mtTskHdlrT2kL2
(
-Ptr tskPtr /* pointer to task entry */
-)
+ Ptr tskPtr /* pointer to task entry */
+ )
{
S16 ret;
SsSTskEntry *sTsk;
/* wait for SS to come up */
/* It is required to block on this semaphore before starting actual processing of
- the thread becasue the creator of this thread might want to cance it without
- doing any processing. When this semaphore is released, means the creator gives
- the go ahead for actual processing and we should never come back to this point */
+ the thread becasue the creator of this thread might want to cance it without
+ doing any processing. When this semaphore is released, means the creator gives
+ the go ahead for actual processing and we should never come back to this point */
while ((ret = sem_wait(&osCp.dep.ssStarted) != ROK) && (errno == EINTR))
continue;
YsPhyRecvMsg();
#else
ysMtTskHdlr(); /* blocks, waiting for messages for L2
- * (processes L1 msgs) */
+ * (processes L1 msgs) */
#endif
/* get a message from the demand queue */
/* RT Processing */
ret = mtTskHdlMsg(sTsk);
if (ret != ROK)
{
- /* exit the for loop here */
- break;
+ /* exit the for loop here */
+ break;
}
#if defined(SPLIT_RLC_DL_TASK) && defined(RLC_MAC_STA_RSP_RBUF)
- rgBatchProc();
+ rgBatchProc();
#endif
}
}
\f
/*
-*
-* Fun: Task handler
-*
-* Desc: This is the system task handler function. It blocks on
-* the system task's demand queue. On receiving a message,
-* it identifies the target TAPA task, verifies that the
-* TAPA task belongs to this system task and if so, calls
-* the activation function of that TAPA task with the
-* received message. The task activation function or the
-* timer activation function may be called.
-*
-* Ret: (thread function)
-*
-* Notes:
-*
-* File: mt_ss.c
-*
-*/
-Void *mtTskHdlr
+ *
+ * Fun: Task handler
+ *
+ * Desc: This is the system task handler function. It blocks on
+ * the system task's demand queue. On receiving a message,
+ * it identifies the target TAPA task, verifies that the
+ * TAPA task belongs to this system task and if so, calls
+ * the activation function of that TAPA task with the
+ * received message. The task activation function or the
+ * timer activation function may be called.
+ *
+ * Ret: (thread function)
+ *
+ * Notes:
+ *
+ * File: mt_ss.c
+ *
+ */
+ Void *mtTskHdlr
(
-Ptr tskPtr /* pointer to task entry */
-)
+ Ptr tskPtr /* pointer to task entry */
+ )
{
S16 ret = ROK;
SsSTskEntry *sTsk;
ret = ssDmndQWait(&sTsk->dQ);
#endif
if (ret != ROK)
- continue;
+ continue;
ret = mtTskHdlMsg(sTsk);
if (ret != ROK)
{
- break;
+ break;
}
}
\f
/*
-*
-* Fun: Task handler
-*
-* Desc: This is the system task handler function. It blocks on
-* the system task's demand queue. On receiving a message,
-* it identifies the target TAPA task, verifies that the
-* TAPA task belongs to this system task and if so, calls
-* the activation function of that TAPA task with the
-* received message. The task activation function or the
-* timer activation function may be called.
-*
-* Ret: (thread function)
-*
-* Notes:
-*
-* File: mt_ss.c
-*
-*/
-S16 mtTskHdlMsg
+ *
+ * Fun: Task handler
+ *
+ * Desc: This is the system task handler function. It blocks on
+ * the system task's demand queue. On receiving a message,
+ * it identifies the target TAPA task, verifies that the
+ * TAPA task belongs to this system task and if so, calls
+ * the activation function of that TAPA task with the
+ * received message. The task activation function or the
+ * timer activation function may be called.
+ *
+ * Ret: (thread function)
+ *
+ * Notes:
+ *
+ * File: mt_ss.c
+ *
+ */
+ S16 mtTskHdlMsg
(
-SsSTskEntry *sTsk
-)
+ SsSTskEntry *sTsk
+ )
{
S16 i =0;
S16 ret =0;
#endif
SsMsgInfo *mInfo=NULLP;
Pst nPst;
-/* mt028.201: modification: multiple procs support related changes */
+ /* mt028.201: modification: multiple procs support related changes */
#ifndef SS_MULTIPLE_PROCS
#ifdef SS_MT_TMR
PAIFTMRS16 tmrActvFnMt = NULLP;
PAIFTMRS16 tmrActvFn =NULLP;
uint16_t procIdIdx =0;
#endif /* SS_MULTIPLE_PROCS */
- /* mt003.301 Modifications */
+ /* mt003.301 Modifications */
#ifdef SS_THREAD_PROFILE
- EpcTime et1,et2;
+ EpcTime et1,et2;
#endif /* SS_THREAD_PROFILE */
#if (ERRCLASS & ERRCLS_DEBUG)
MTLOGERROR(ERRCLS_DEBUG, EMT007, (ErrVal) ret,
- "Could not lock system task entry");
+ "Could not lock system task entry");
#endif
SPutMsg(mBuf);
return ROK;
}
-/* mt034.201 */
+ /* mt034.201 */
#ifdef SS_PERF
do
{
#ifdef SS_MEM_WL_DEBUG
mtTskBuffer1 = mBuf2;
if(mBuf2)
- mtTskBuffer2 = mBuf2->b_next;
+ mtTskBuffer2 = mBuf2->b_next;
if(mInfo == 0x5050505)
{
- stopBtInfo = TRUE;
- SGlobMemInfoShow();
- cmAnalyseBtInfo((PTR) mBuf,4);
- SGlobMemInfoShow();
- printf("\n In trouble .... \n");
+ stopBtInfo = TRUE;
+ SGlobMemInfoShow();
+ cmAnalyseBtInfo((PTR) mBuf,4);
+ SGlobMemInfoShow();
+ printf("\n In trouble .... \n");
}
else if (mInfo == 0x2020202)
{
- stopBtInfo = TRUE;
- cmAnalyseBtInfo((PTR) mBuf,1);
- printf("\n In trouble .... \n");
+ stopBtInfo = TRUE;
+ cmAnalyseBtInfo((PTR) mBuf,1);
+ printf("\n In trouble .... \n");
}
#endif /* SS_MEM_WL_DEBUG */
switch (mInfo->eventInfo.event)
{
- /* this is a termination event, we die */
- case SS_EVNT_TERM:
- /* release the message */
- SPutMsg(mBuf);
+ /* this is a termination event, we die */
+ case SS_EVNT_TERM:
+ /* release the message */
+ SPutMsg(mBuf);
- /* Unlock the system task entry and lock the system
- * task table to clean our entry up.
- */
- SUnlock(&sTsk->lock);
+ /* Unlock the system task entry and lock the system
+ * task table to clean our entry up.
+ */
+ SUnlock(&sTsk->lock);
- ret = SLock(&osCp.sTskTblLock);
- if (ret != ROK)
- {
+ ret = SLock(&osCp.sTskTblLock);
+ if (ret != ROK)
+ {
#if (ERRCLASS & ERRCLS_DEBUG)
- MTLOGERROR(ERRCLS_DEBUG, EMT008, (ErrVal) ret,
- "Could not lock system task table");
-#endif
- /* what to do here? */
- return ROK;
- }
-
- /* clean up the system task entry */
- sTsk->used = FALSE;
- sTsk->tskPrior = 0;
- /* mt003.301 Modifications - SDeRegTTsk */
- /* sTsk->numTTsks = 0; */
- SDestroyLock(&sTsk->lock);
- ssDestroyDmndQ(&sTsk->dQ);
-
- /* lock for current executing TAPA task ID */
-
- /* make this entry available in the system task table */
- sTsk->nxt = osCp.nxtSTskEntry;
- for (i = 0; i < SS_MAX_STSKS; i++)
- {
- if (sTsk == &osCp.sTskTbl[i])
- {
- osCp.nxtSTskEntry = i;
- break;
- }
- }
-
- osCp.numSTsks--;
-
- /* unlock the system task table */
- SUnlock(&osCp.sTskTblLock);
-
- return RFAILED;
-
-
- /* this is a data message or a permanent task keep-alive message */
- case SS_EVNT_DATA:
- case SS_EVNT_PERMTICK:
- /* message to a task. find the destination task */
-/* mt028.201: modification: multiple procs support related changes */
+ MTLOGERROR(ERRCLS_DEBUG, EMT008, (ErrVal) ret,
+ "Could not lock system task table");
+#endif
+ /* what to do here? */
+ return ROK;
+ }
+
+ /* clean up the system task entry */
+ sTsk->used = FALSE;
+ sTsk->tskPrior = 0;
+ /* mt003.301 Modifications - SDeRegTTsk */
+ /* sTsk->numTTsks = 0; */
+ SDestroyLock(&sTsk->lock);
+ ssDestroyDmndQ(&sTsk->dQ);
+
+ /* lock for current executing TAPA task ID */
+
+ /* make this entry available in the system task table */
+ sTsk->nxt = osCp.nxtSTskEntry;
+ for (i = 0; i < SS_MAX_STSKS; i++)
+ {
+ if (sTsk == &osCp.sTskTbl[i])
+ {
+ osCp.nxtSTskEntry = i;
+ break;
+ }
+ }
+
+ osCp.numSTsks--;
+
+ /* unlock the system task table */
+ SUnlock(&osCp.sTskTblLock);
+
+ return RFAILED;
+
+
+ /* this is a data message or a permanent task keep-alive message */
+ case SS_EVNT_DATA:
+ case SS_EVNT_PERMTICK:
+ /* message to a task. find the destination task */
+ /* mt028.201: modification: multiple procs support related changes */
#ifdef SS_MULTIPLE_PROCS
- procIdIdx = SGetProcIdIdx(mInfo->pst.dstProcId);
+ procIdIdx = SGetProcIdIdx(mInfo->pst.dstProcId);
- if (procIdIdx == SS_INV_PROCID_IDX)
- {
- SPutMsg(mBuf);
- break;
- }
+ if (procIdIdx == SS_INV_PROCID_IDX)
+ {
+ SPutMsg(mBuf);
+ break;
+ }
- idx = osCp.tTskIds[procIdIdx][mInfo->pst.dstEnt][mInfo->pst.dstInst];
+ idx = osCp.tTskIds[procIdIdx][mInfo->pst.dstEnt][mInfo->pst.dstInst];
#else /* SS_MULTIPLE_PROCS */
- idx = osCp.tTskIds[mInfo->pst.dstEnt][mInfo->pst.dstInst];
+ idx = osCp.tTskIds[mInfo->pst.dstEnt][mInfo->pst.dstInst];
#endif /* SS_MULTIPLE_PROCS */
- /* verify that it hasn't been deregistered */
- if (idx == SS_TSKNC)
- {
- SPutMsg(mBuf);
- break;
- }
-
- /* verify that this system task is still running it */
- tTsk = &osCp.tTskTbl[idx];
- if (tTsk->sTsk != sTsk)
- {
- SPutMsg(mBuf);
- break;
- }
-
- /* set the current executing TAPA task ID */
- sTsk->dep.ent = mInfo->pst.dstEnt;
- sTsk->dep.inst = mInfo->pst.dstInst;
-
- /* copy the Pst structure into a local duplicate */
- for (i = 0; i < (S16) sizeof(Pst); i++)
- *(((uint8_t *)(&nPst)) + i) = *(((uint8_t *)&mInfo->pst) + i);
-
- /* Give the message to the task activation function. If
- * its a normal data message, we pass it, if this is a
- * keep-alive message for a permanent task then we pass
- * NULLP in place of the message to the task activation
- * function.
- */
- if (mInfo->eventInfo.event == SS_EVNT_DATA)
- {
+ /* verify that it hasn't been deregistered */
+ if (idx == SS_TSKNC)
+ {
+ SPutMsg(mBuf);
+ break;
+ }
+
+ /* verify that this system task is still running it */
+ tTsk = &osCp.tTskTbl[idx];
+ if (tTsk->sTsk != sTsk)
+ {
+ SPutMsg(mBuf);
+ break;
+ }
+
+ /* set the current executing TAPA task ID */
+ sTsk->dep.ent = mInfo->pst.dstEnt;
+ sTsk->dep.inst = mInfo->pst.dstInst;
+
+ /* copy the Pst structure into a local duplicate */
+ for (i = 0; i < (S16) sizeof(Pst); i++)
+ *(((uint8_t *)(&nPst)) + i) = *(((uint8_t *)&mInfo->pst) + i);
+
+ /* Give the message to the task activation function. If
+ * its a normal data message, we pass it, if this is a
+ * keep-alive message for a permanent task then we pass
+ * NULLP in place of the message to the task activation
+ * function.
+ */
+ if (mInfo->eventInfo.event == SS_EVNT_DATA)
+ {
#ifndef RGL_SPECIFIC_CHANGES
#ifdef SS_TSKLOG_ENABLE
- uint32_t t = MacGetTick();
+ uint32_t t = MacGetTick();
#endif
#endif
- /* mt003.301 Modifications */
+ /* mt003.301 Modifications */
#if SS_THREAD_PROFILE
- tTsk->curEvent = nPst.event;
- SGetEpcTime(&et1);
+ tTsk->curEvent = nPst.event;
+ SGetEpcTime(&et1);
#endif /* SS_THREAD_PROFILE */
- tTsk->actvTsk(&nPst, mBuf);
+ tTsk->actvTsk(&nPst, mBuf);
#ifndef RGL_SPECIFIC_CHANGES
#ifdef SS_TSKLOG_ENABLE
- SStopTask(t,PID_SSI_TSK);
+ SStopTask(t,PID_SSI_TSK);
#endif
#endif
#if SS_THREAD_PROFILE
- SGetEpcTime(&et2);
- tTsk->curEvtTime = (uint32_t)(et2 - et1);
- tTsk->totTime += (uint64_t)tTsk->curEvtTime;
+ SGetEpcTime(&et2);
+ tTsk->curEvtTime = (uint32_t)(et2 - et1);
+ tTsk->totTime += (uint64_t)tTsk->curEvtTime;
#endif /* SS_THREAD_PROFILE */
- }
- else
- {
+ }
+ else
+ {
#if (ERRCLASS & ERRCLS_DEBUG)
- /* this message should only come to a permanent task */
- if (tTsk->tskType != SS_TSK_PERMANENT)
- {
- MTLOGERROR(ERRCLS_DEBUG, EMT009, ERRZERO, "Logic failure");
- break;
- }
-#endif
- tTsk->actvTsk(&nPst, NULLP);
-
- /* We need to re-send this message back to ourselves so
- * the permanent task continues to run.
- */
- /* Check if this task got deregistered or detached
- * by the activation function; if so, there's nothing
- * more to do here, otherwise go ahead.
- */
- ret = ROK;
- if (tTsk->used == TRUE && tTsk->sTsk != NULLP)
- {
- ret = ssDmndQPutLast(&tTsk->sTsk->dQ, mBuf,
- ((tTsk->tskPrior) * SS_MAX_MSG_PRI) +
- mInfo->pst.prior);
- }
-
- /* failure here is a real problem */
- if (ret != ROK)
- {
+ /* this message should only come to a permanent task */
+ if (tTsk->tskType != SS_TSK_PERMANENT)
+ {
+ MTLOGERROR(ERRCLS_DEBUG, EMT009, ERRZERO, "Logic failure");
+ break;
+ }
+#endif
+ tTsk->actvTsk(&nPst, NULLP);
+
+ /* We need to re-send this message back to ourselves so
+ * the permanent task continues to run.
+ */
+ /* Check if this task got deregistered or detached
+ * by the activation function; if so, there's nothing
+ * more to do here, otherwise go ahead.
+ */
+ ret = ROK;
+ if (tTsk->used == TRUE && tTsk->sTsk != NULLP)
+ {
+ ret = ssDmndQPutLast(&tTsk->sTsk->dQ, mBuf,
+ ((tTsk->tskPrior) * SS_MAX_MSG_PRI) +
+ mInfo->pst.prior);
+ }
+
+ /* failure here is a real problem */
+ if (ret != ROK)
+ {
#if (ERRCLASS & ERRCLS_DEBUG)
- MTLOGERROR(ERRCLS_DEBUG, EMT010, ERRZERO,
- "Could not write to demand queue");
+ MTLOGERROR(ERRCLS_DEBUG, EMT010, ERRZERO,
+ "Could not write to demand queue");
#endif
- SPutMsg(mBuf);
- }
- }
+ SPutMsg(mBuf);
+ }
+ }
- /* unset the current executing TAPA task ID */
- sTsk->dep.ent = ENTNC;
- sTsk->dep.inst = INSTNC;
- break;
+ /* unset the current executing TAPA task ID */
+ sTsk->dep.ent = ENTNC;
+ sTsk->dep.inst = INSTNC;
+ break;
- case SS_EVNT_TIMER:
- /* timer event. find the timer entry */
- idx = mInfo->eventInfo.u.tmr.tmrIdx;
+ case SS_EVNT_TIMER:
+ /* timer event. find the timer entry */
+ idx = mInfo->eventInfo.u.tmr.tmrIdx;
- /* lock the timer table, coz we're going to peek in it */
- ret = SLock(&osCp.tmrTblLock);
- if (ret != ROK)
- {
+ /* lock the timer table, coz we're going to peek in it */
+ ret = SLock(&osCp.tmrTblLock);
+ if (ret != ROK)
+ {
#if (ERRCLASS & ERRCLS_DEBUG)
- MTLOGERROR(ERRCLS_DEBUG, EMT011, (ErrVal) ret,
- "Could not lock timer table");
-#endif
- SPutMsg(mBuf);
- break;
- }
-
- /* Verify that this timer entry is still around and that it
- * belongs to our task.
- */
- if (osCp.tmrTbl[idx].used == FALSE
-/* mt028.201: modification: multiple procs support related changes */
+ MTLOGERROR(ERRCLS_DEBUG, EMT011, (ErrVal) ret,
+ "Could not lock timer table");
+#endif
+ SPutMsg(mBuf);
+ break;
+ }
+
+ /* Verify that this timer entry is still around and that it
+ * belongs to our task.
+ */
+ if (osCp.tmrTbl[idx].used == FALSE
+ /* mt028.201: modification: multiple procs support related changes */
#ifdef SS_MULTIPLE_PROCS
- || osCp.tmrTbl[idx].ownerProc != mInfo->pst.dstProcId
+ || osCp.tmrTbl[idx].ownerProc != mInfo->pst.dstProcId
#endif /* SS_MULTIPLE_PROCS */
- || osCp.tmrTbl[idx].ownerEnt != mInfo->pst.dstEnt
- || osCp.tmrTbl[idx].ownerInst != mInfo->pst.dstInst)
- {
- SUnlock(&osCp.tmrTblLock);
- SPutMsg(mBuf);
- break;
- }
-
- /* mt005.21: addition */
- /* set the current executing TAPA task ID */
- sTsk->dep.ent = mInfo->pst.dstEnt;
- sTsk->dep.inst = mInfo->pst.dstInst;
+ || osCp.tmrTbl[idx].ownerEnt != mInfo->pst.dstEnt
+ || osCp.tmrTbl[idx].ownerInst != mInfo->pst.dstInst)
+ {
+ SUnlock(&osCp.tmrTblLock);
+ SPutMsg(mBuf);
+ break;
+ }
+
+ /* mt005.21: addition */
+ /* set the current executing TAPA task ID */
+ sTsk->dep.ent = mInfo->pst.dstEnt;
+ sTsk->dep.inst = mInfo->pst.dstInst;
#ifndef SS_MULTIPLE_PROCS
#ifdef SS_MT_TMR
- /*mt006.301 Adding Initializing the tmrActvFnMt*/
- tmrActvFnMt = NULLP;
- if (osCp.tmrTbl[idx].ssTmrActvFn.mtFlag == TRUE)
- {
- tmrActvFnMt = osCp.tmrTbl[idx].ssTmrActvFn.actvFnc.tmrActvFnMt;
- }
- else
+ /*mt006.301 Adding Initializing the tmrActvFnMt*/
+ tmrActvFnMt = NULLP;
+ if (osCp.tmrTbl[idx].ssTmrActvFn.mtFlag == TRUE)
+ {
+ tmrActvFnMt = osCp.tmrTbl[idx].ssTmrActvFn.actvFnc.tmrActvFnMt;
+ }
+ else
#endif
#endif
- {
- tmrActvFn = osCp.tmrTbl[idx].ssTmrActvFn.actvFnc.tmrActvFn;
- }
+ {
+ tmrActvFn = osCp.tmrTbl[idx].ssTmrActvFn.actvFnc.tmrActvFn;
+ }
- /* unlock the timer table */
- SUnlock(&osCp.tmrTblLock);
+ /* unlock the timer table */
+ SUnlock(&osCp.tmrTblLock);
- /* activate the timer function */
-/* mt028.201: modification: multiple procs support related changes */
+ /* activate the timer function */
+ /* mt028.201: modification: multiple procs support related changes */
#ifndef SS_MULTIPLE_PROCS
#ifdef SS_MT_TMR
- if (tmrActvFnMt)
- {
- tmrActvFnMt(osCp.tmrTbl[idx].ownerEnt,
- osCp.tmrTbl[idx].ownerInst);
- }
- else
-#endif
- {
- tmrActvFn();
- }
+ if (tmrActvFnMt)
+ {
+ tmrActvFnMt(osCp.tmrTbl[idx].ownerEnt,
+ osCp.tmrTbl[idx].ownerInst);
+ }
+ else
+#endif
+ {
+ tmrActvFn();
+ }
#else
- tmrActvFn(osCp.tmrTbl[idx].ownerProc, osCp.tmrTbl[idx].ownerEnt,
- osCp.tmrTbl[idx].ownerInst);
+ tmrActvFn(osCp.tmrTbl[idx].ownerProc, osCp.tmrTbl[idx].ownerEnt,
+ osCp.tmrTbl[idx].ownerInst);
#endif /* SS_MULTIPLE_PROCS */
- /*mt005.21: addition */
- /* unset the current executing TAPA task ID */
- sTsk->dep.ent = ENTNC;
- sTsk->dep.inst = INSTNC;
+ /*mt005.21: addition */
+ /* unset the current executing TAPA task ID */
+ sTsk->dep.ent = ENTNC;
+ sTsk->dep.inst = INSTNC;
- /* return the message buffer */
- SPutMsg(mBuf);
- break;
- /*
- * mt003.301 - SDeRegTTsk fix
- */
- case SS_EVNT_TTSK_TERM:
+ /* return the message buffer */
+ SPutMsg(mBuf);
+ break;
+ /*
+ * mt003.301 - SDeRegTTsk fix
+ */
+ case SS_EVNT_TTSK_TERM:
#ifdef SS_MULTIPLE_PROCS
- procIdIdx = SGetProcIdIdx(mInfo->pst.dstProcId);
+ procIdIdx = SGetProcIdIdx(mInfo->pst.dstProcId);
- if (procIdIdx == SS_INV_PROCID_IDX)
- {
- SPutMsg(mBuf);
- break;
- }
+ if (procIdIdx == SS_INV_PROCID_IDX)
+ {
+ SPutMsg(mBuf);
+ break;
+ }
- idx = osCp.tTskIds[procIdIdx][mInfo->pst.dstEnt][mInfo->pst.dstInst];
+ idx = osCp.tTskIds[procIdIdx][mInfo->pst.dstEnt][mInfo->pst.dstInst];
#else /* SS_MULTIPLE_PROCS */
- idx = osCp.tTskIds[mInfo->pst.dstEnt][mInfo->pst.dstInst];
+ idx = osCp.tTskIds[mInfo->pst.dstEnt][mInfo->pst.dstInst];
#endif /* SS_MULTIPLE_PROCS */
- /* verify that it hasn't been deregistered */
- if (idx == SS_TSKNC)
- {
- SPutMsg(mBuf);
- break;
- }
-
- /* verify that this system task is still running it */
- tTsk = &osCp.tTskTbl[idx];
- if (tTsk->sTsk != sTsk)
- {
- SPutMsg(mBuf);
- break;
- }
+ /* verify that it hasn't been deregistered */
+ if (idx == SS_TSKNC)
+ {
+ SPutMsg(mBuf);
+ break;
+ }
+
+ /* verify that this system task is still running it */
+ tTsk = &osCp.tTskTbl[idx];
+ if (tTsk->sTsk != sTsk)
+ {
+ SPutMsg(mBuf);
+ break;
+ }
#ifdef SS_MULTIPLE_PROCS
- ssdProcTTskTerm(procIdIdx, tTsk, idx);
+ ssdProcTTskTerm(procIdIdx, tTsk, idx);
#else
- ssdProcTTskTerm(tTsk, idx);
+ ssdProcTTskTerm(tTsk, idx);
#endif
- SPutMsg(mBuf);
- break;
+ SPutMsg(mBuf);
+ break;
- default:
+ default:
#if (ERRCLASS & ERRCLS_DEBUG)
- MTLOGERROR(ERRCLS_DEBUG, EMT012, (ErrVal) ret,
- "Illegal event");
+ MTLOGERROR(ERRCLS_DEBUG, EMT012, (ErrVal) ret,
+ "Illegal event");
#endif
- break;
+ break;
}
#ifdef SS_PERF
- mBuf = mBuf2;
+ mBuf = mBuf2;
} while (mBuf != NULLP);
#endif
Bool g_usettitmr;
/*
-* Fun: mtTmrHdlrPublic
-*/
+ * Fun: mtTmrHdlrPublic
+ */
Void mtTmrHdlrPublic()
{
if (SLock(&osCp.tmrTblLock) != ROK)
\f
/*
-*
-* Fun: mtTmrHdlr
-*
-* Desc: The timer handler thread function. Counts time
-* and invokes the common timer function on each
-* tick.
-*
-* Ret: (thread function)
-*
-* Notes:
-*
-* File: mt_ss.c
-*
-*/
+ *
+ * Fun: mtTmrHdlr
+ *
+ * Desc: The timer handler thread function. Counts time
+ * and invokes the common timer function on each
+ * tick.
+ *
+ * Ret: (thread function)
+ *
+ * Notes:
+ *
+ * File: mt_ss.c
+ *
+ */
/*mt041.201 Modified SSI tick handling in mtTmrHdlr() */
-static Void *mtTmrHdlr
+ static Void *mtTmrHdlr
(
-void *parm /* unused */
-)
+ void *parm /* unused */
+ )
{
-/*mt004.301-addede new region*/
-/* mt010.301 Removed SS_FAP portion and
- * enabled oroginal code in function mtTmrHdlr */
+ /*mt004.301-addede new region*/
+ /* mt010.301 Removed SS_FAP portion and
+ * enabled oroginal code in function mtTmrHdlr */
struct timespec ts;
uint32_t time_int;
if (gettimeofday(&tv1, NULL) == -1)
{
#if (ERRCLASS & ERRCLS_DEBUG)
- MTLOGERROR(ERRCLS_DEBUG, EMT014, (ErrVal) errno,
- "Error in clock_gettime");
+ MTLOGERROR(ERRCLS_DEBUG, EMT014, (ErrVal) errno,
+ "Error in clock_gettime");
#endif
}
for (; ;)
{
#if 1
- if (g_usettitmr)
- {
+ if (g_usettitmr)
+ {
#ifndef STUB_TTI_HANDLING_5GTF
- printf("Returning from mtTmrHdlr()\n");
- return NULL;
+ printf("\nReturning from mtTmrHdlr()\n");
+ return NULL;
#endif
- }
+ }
#endif
- /* mt039.201 changes for nanosleep */
+ /* mt039.201 changes for nanosleep */
/* sleep for MT_TICK_CNT milli seconds */
ts.tv_nsec = (MT_TICK_CNT - err_in_usec) * 1000;
while ((ret = nanosleep (&ts, &tsN) != ROK) && (errno == EINTR))
{
- ts.tv_nsec = tsN.tv_nsec;
- tsN.tv_nsec = 0;
- continue;
+ ts.tv_nsec = tsN.tv_nsec;
+ tsN.tv_nsec = 0;
+ continue;
}
if (gettimeofday(&tv2,NULL) == -1)
{
#if (ERRCLASS & ERRCLS_DEBUG)
- MTLOGERROR(ERRCLS_DEBUG, EMT015, (ErrVal) errno,
- "Error in clock_gettime");
+ MTLOGERROR(ERRCLS_DEBUG, EMT015, (ErrVal) errno,
+ "Error in clock_gettime");
#endif
}
- /*mt013.301 : changed check while calculating timer to fix
- * diffrence between MTSS time and real unix time
- */
- if ((tv2.tv_sec == tv1.tv_sec)&&(tv2.tv_usec > tv1.tv_usec))
- {
- time_int = (tv2.tv_usec - tv1.tv_usec);
- }
- else if (tv2.tv_sec > tv1.tv_sec)
- {
- time_int = ((tv2.tv_sec - tv1.tv_sec)*1000000) + (tv2.tv_usec - tv1.tv_usec);
- }
- else /* ts2 < ts1, this will not happen in normal scenario */
- {
- /* to make sure cnt = 1 */
- err_in_usec = 0;
- time_int = MT_TICK_CNT;
- }
-
- oldTicks = osCp.dep.sysTicks;
- osCp.dep.sysTicks += (time_int/(MT_TICK_CNT - err_in_usec));
- err_in_usec = (time_int % (MT_TICK_CNT - err_in_usec));
- newTicks = osCp.dep.sysTicks;
- tv1.tv_usec = tv2.tv_usec;
- tv1.tv_sec = tv2.tv_sec;
-
- cnt = newTicks - oldTicks;
-
- while(err_in_usec >= MT_TICK_CNT)
- {
- cnt++;
- err_in_usec -= MT_TICK_CNT;
- }
- if( cnt >= MT_MAX_TICK_CNT_VAL)
- cnt = MT_MIN_TICK_CNT_VAL;
- /* call the common timer tick handler */
- for (i = 0; i < cnt; i++)
- {
- /* mt008.301: cmPrcTmr is guarded with a lock */
- /* lock the timer table */
- if (SLock(&osCp.tmrTblLock) != ROK)
- {
+ /*mt013.301 : changed check while calculating timer to fix
+ * diffrence between MTSS time and real unix time
+ */
+ if ((tv2.tv_sec == tv1.tv_sec)&&(tv2.tv_usec > tv1.tv_usec))
+ {
+ time_int = (tv2.tv_usec - tv1.tv_usec);
+ }
+ else if (tv2.tv_sec > tv1.tv_sec)
+ {
+ time_int = ((tv2.tv_sec - tv1.tv_sec)*1000000) + (tv2.tv_usec - tv1.tv_usec);
+ }
+ else /* ts2 < ts1, this will not happen in normal scenario */
+ {
+ /* to make sure cnt = 1 */
+ err_in_usec = 0;
+ time_int = MT_TICK_CNT;
+ }
+
+ oldTicks = osCp.dep.sysTicks;
+ osCp.dep.sysTicks += (time_int/(MT_TICK_CNT - err_in_usec));
+ err_in_usec = (time_int % (MT_TICK_CNT - err_in_usec));
+ newTicks = osCp.dep.sysTicks;
+ tv1.tv_usec = tv2.tv_usec;
+ tv1.tv_sec = tv2.tv_sec;
+
+ cnt = newTicks - oldTicks;
+
+ while(err_in_usec >= MT_TICK_CNT)
+ {
+ cnt++;
+ err_in_usec -= MT_TICK_CNT;
+ }
+ if( cnt >= MT_MAX_TICK_CNT_VAL)
+ cnt = MT_MIN_TICK_CNT_VAL;
+ /* call the common timer tick handler */
+ for (i = 0; i < cnt; i++)
+ {
+ /* mt008.301: cmPrcTmr is guarded with a lock */
+ /* lock the timer table */
+ if (SLock(&osCp.tmrTblLock) != ROK)
+ {
#if (ERRCLASS & ERRCLS_DEBUG)
- MTLOGERROR(ERRCLS_DEBUG, EMT016, ERRZERO, "Could not lock timer table");
+ MTLOGERROR(ERRCLS_DEBUG, EMT016, ERRZERO, "Could not lock timer table");
#endif
- continue;
- }
- cmPrcTmr(&osCp.dep.tmrTqCp, osCp.dep.tmrTq, mtTimeout);
- /* unlock the timer table */
- SUnlock(&osCp.tmrTblLock);
- }
+ continue;
+ }
+ cmPrcTmr(&osCp.dep.tmrTqCp, osCp.dep.tmrTq, mtTimeout);
+ /* unlock the timer table */
+ SUnlock(&osCp.tmrTblLock);
+ }
}
/* mt009.21: addition */
\f
/*
-*
-* Fun: mtTimeout
-*
-* Desc: Process timer event. Called from the common timer
-* code when a timeout occurs.
-*
-* Ret: Void
-*
-* Notes:
-*
-* File: mt_ss.c
-*
-*/
-Void mtTimeout
+ *
+ * Fun: mtTimeout
+ *
+ * Desc: Process timer event. Called from the common timer
+ * code when a timeout occurs.
+ *
+ * Ret: Void
+ *
+ * Notes:
+ *
+ * File: mt_ss.c
+ *
+ */
+ Void mtTimeout
(
-PTR tCb, /* control block */
-S16 evnt /* event */
-)
+ PTR tCb, /* control block */
+ S16 evnt /* event */
+ )
{
Buffer *mBuf;
SsMsgInfo *mInfo;
#ifndef TENB_RTLIN_CHANGES
S16 ret;
#endif
-/* mt028.201: modification: multiple procs support related changes */
+ /* mt028.201: modification: multiple procs support related changes */
#ifdef SS_MULTIPLE_PROCS
uint16_t procIdIdx;
#endif /* SS_MULTIPLE_PROCS */
return;
}
-/* mt008.301 Deletion: tmrTbl Lock is moved to mtTmrHdlr */
+ /* mt008.301 Deletion: tmrTbl Lock is moved to mtTmrHdlr */
/* Hmmmm, the timer might have been deleted while we've been
if (SGetMsg(SS_DFLT_REGION, SS_DFLT_POOL, &mBuf) != ROK)
#else
#ifdef RGL_SPECIFIC_CHANGES
- if (SGetMsg((SS_DFLT_REGION), SS_DFLT_POOL, &mBuf) != ROK)
+ if (SGetMsg((SS_DFLT_REGION), SS_DFLT_POOL, &mBuf) != ROK)
#else
- if (SGetMsg((osCp.sTskTbl[0].region), SS_DFLT_POOL, &mBuf) != ROK)
+ if (SGetMsg((osCp.sTskTbl[0].region), SS_DFLT_POOL, &mBuf) != ROK)
#endif
#endif
- {
+ {
#if (ERRCLASS & ERRCLS_DEBUG)
- MTLOGERROR(ERRCLS_DEBUG, EMT017, ERRZERO, "Could not get message");
+ MTLOGERROR(ERRCLS_DEBUG, EMT017, ERRZERO, "Could not get message");
#endif
- return;
- }
+ return;
+ }
mInfo = (SsMsgInfo *)mBuf->b_rptr;
mInfo->eventInfo.event = SS_EVNT_TIMER;
mInfo->pst.dstInst = tEnt->ownerInst;
mInfo->pst.srcEnt = tEnt->ownerEnt;
mInfo->pst.srcInst = tEnt->ownerInst;
-/* mt028.201: modification: multiple procs support related changes */
+ /* mt028.201: modification: multiple procs support related changes */
#ifndef SS_MULTIPLE_PROCS
mInfo->pst.dstProcId = SFndProcId();
mInfo->pst.srcProcId = SFndProcId();
/* find the owner TAPA task */
-/* mt028.201: modification: multiple procs support related changes */
+ /* mt028.201: modification: multiple procs support related changes */
#ifdef SS_MULTIPLE_PROCS
procIdIdx = SGetProcIdIdx(tEnt->ownerProc);
idx = osCp.tTskIds[procIdIdx][tEnt->ownerEnt][tEnt->ownerInst];
}
/* Klock work fix ccpu00148484 */
/* write the timer message to the queue of the destination task */
- /* mt008.301 : check sTsk before putting into it's DQ */
+ /* mt008.301 : check sTsk before putting into it's DQ */
if (tTsk->sTsk == NULLP)
{
#ifndef TENB_RTLIN_CHANGES
#if (ERRCLASS & ERRCLS_DEBUG)
MTLOGERROR(ERRCLS_DEBUG, EMT019, ERRZERO,
- "Could not write to demand queue");
+ "Could not write to demand queue");
#endif
return;
mInfo->region = tTsk->sTsk->region;
#endif /* SS_LOCKLESS_MEMORY */
if (ssDmndQPutLast(&tTsk->sTsk->dQ, mBuf,
- (tTsk->tskPrior * SS_MAX_MSG_PRI) + PRIOR0) != ROK)
+ (tTsk->tskPrior * SS_MAX_MSG_PRI) + PRIOR0) != ROK)
{
#ifndef TENB_RTLIN_CHANGES
SS_RELEASE_SEMA(&osCp.tTskTblSem);
#if (ERRCLASS & ERRCLS_DEBUG)
MTLOGERROR(ERRCLS_DEBUG, EMT019, ERRZERO,
- "Could not write to demand queue");
+ "Could not write to demand queue");
#endif
return;
}
-/* Fix for ccpu00130657 */
+ /* Fix for ccpu00130657 */
#ifdef TENB_T2K3K_SPECIFIC_CHANGES
if (tTsk->sTsk->tskPrior == PRIOR0)
{
#ifdef INTEL_WLS
- WLS_WakeUp(mtGetWlsHdl());
+ WLS_WakeUp(mtGetWlsHdl());
#else
tlPost(NULLP);
#endif
\f
#ifdef CONAVL
/*
-*
-* Fun: mtConHdlr
-*
-* Desc: This thread reads the console and hands over any
-* data read to a user function.
-*
-* Ret: (thread function)
-*
-* Notes:
-*
-* File: mt_ss.c
-*
-*/
-static Void *mtConHdlr
+ *
+ * Fun: mtConHdlr
+ *
+ * Desc: This thread reads the console and hands over any
+ * data read to a user function.
+ *
+ * Ret: (thread function)
+ *
+ * Notes:
+ *
+ * File: mt_ss.c
+ *
+ */
+ static Void *mtConHdlr
(
-Ptr parm /* unused */
-)
+ Ptr parm /* unused */
+ )
{
int fd;
Data data;
{
if ((read(fd, &data, 1)) != 1)
{
- continue;
+ continue;
}
#ifndef L2_L3_SPLIT
#ifdef SS_DRVR_SUPPORT
/*
-*
-* Fun: Interrupt service task handler
-*
-* Desc: This is the interrupt service task handler. It blocks
-* on a pipe from which it reads an isFlag structure. The
-* structure indicates which interrupt service task is to
-* be executed. The thread identifies the task, calls the
-* isTsk function and sends itself a message to repeat
-* this operation until it receives a message to cease.
-*
-* Ret: ROK - ok
-*
-* Notes:
-*
-* File: mt_ss.c
-*
-*/
- /* mt009.21: addition */
-static Void *mtIsTskHdlr
+ *
+ * Fun: Interrupt service task handler
+ *
+ * Desc: This is the interrupt service task handler. It blocks
+ * on a pipe from which it reads an isFlag structure. The
+ * structure indicates which interrupt service task is to
+ * be executed. The thread identifies the task, calls the
+ * isTsk function and sends itself a message to repeat
+ * this operation until it receives a message to cease.
+ *
+ * Ret: ROK - ok
+ *
+ * Notes:
+ *
+ * File: mt_ss.c
+ *
+ */
+/* mt009.21: addition */
+ static Void *mtIsTskHdlr
(
-Ptr tskPtr /* pointer to task entry */
-)
+ Ptr tskPtr /* pointer to task entry */
+ )
{
#if (ERRCLASS & ERRCLS_DEBUG)
int ret;
{
if (read(osCp.dep.isFildes[0], &isFlag, sizeof(isFlag)) != sizeof(isFlag))
{
- continue;
+ continue;
}
switch (isFlag.action)
{
- case MT_IS_SET:
- osCp.drvrTskTbl[isFlag.id].dep.flag = TRUE;
+ case MT_IS_SET:
+ osCp.drvrTskTbl[isFlag.id].dep.flag = TRUE;
- /* call the interrupt service task activation function */
- osCp.drvrTskTbl[isFlag.id].isTsk(isFlag.id);
+ /* call the interrupt service task activation function */
+ osCp.drvrTskTbl[isFlag.id].isTsk(isFlag.id);
- /* send self a message to keep doing this */
- isFlag.action = MT_IS_RESET;
+ /* send self a message to keep doing this */
+ isFlag.action = MT_IS_RESET;
#if (ERRCLASS & ERRCLS_DEBUG)
- ret = write(osCp.dep.isFildes[1], &isFlag, sizeof(isFlag));
- if (ret != sizeof(isFlag))
- {
- MTLOGERROR(ERRCLS_DEBUG, EMT020, ERRZERO,
- "write() to pipe failed");
- }
+ ret = write(osCp.dep.isFildes[1], &isFlag, sizeof(isFlag));
+ if (ret != sizeof(isFlag))
+ {
+ MTLOGERROR(ERRCLS_DEBUG, EMT020, ERRZERO,
+ "write() to pipe failed");
+ }
#else
- write(osCp.dep.isFildes[1], &isFlag, sizeof(isFlag));
+ write(osCp.dep.isFildes[1], &isFlag, sizeof(isFlag));
#endif
- break;
+ break;
- case MT_IS_UNSET:
- osCp.drvrTskTbl[isFlag.id].dep.flag = FALSE;
- break;
+ case MT_IS_UNSET:
+ osCp.drvrTskTbl[isFlag.id].dep.flag = FALSE;
+ break;
- case MT_IS_RESET:
- if (osCp.drvrTskTbl[isFlag.id].dep.flag)
- {
- /* call the interrupt service task activation function */
- osCp.drvrTskTbl[isFlag.id].isTsk(isFlag.id);
+ case MT_IS_RESET:
+ if (osCp.drvrTskTbl[isFlag.id].dep.flag)
+ {
+ /* call the interrupt service task activation function */
+ osCp.drvrTskTbl[isFlag.id].isTsk(isFlag.id);
#if (ERRCLASS & ERRCLS_DEBUG)
- /* send self a message to do this again */
- ret = write(osCp.dep.isFildes[1], &isFlag, sizeof(isFlag));
-
- if (ret != sizeof(isFlag))
- {
- MTLOGERROR(ERRCLS_DEBUG, EMT021, ERRZERO,
- "write() to pipe failed");
- }
+ /* send self a message to do this again */
+ ret = write(osCp.dep.isFildes[1], &isFlag, sizeof(isFlag));
+
+ if (ret != sizeof(isFlag))
+ {
+ MTLOGERROR(ERRCLS_DEBUG, EMT021, ERRZERO,
+ "write() to pipe failed");
+ }
#else
- write(osCp.dep.isFildes[1], &isFlag, sizeof(isFlag));
+ write(osCp.dep.isFildes[1], &isFlag, sizeof(isFlag));
#endif
- }
- break;
+ }
+ break;
- default:
- /* where did THIS come from?? */
- break;
+ default:
+ /* where did THIS come from?? */
+ break;
}
}
- /* mt009.21: addition */
- return ( (Void *) NULLP);
+ /* mt009.21: addition */
+ return ( (Void *) NULLP);
/* not reached */
}
/*mt010.301 Fix for core when run with -o option and when killed with SIGINT*/
\f
/*
-*
-* Fun: mtIntSigHndlr
-*
-* Desc: Exit function, shuts down.
-*
-* Ret: Void
-*
-* Notes:
-*
-* File: mt_ss.c
-*
-*/
+ *
+ * Fun: mtIntSigHndlr
+ *
+ * Desc: Exit function, shuts down.
+ *
+ * Ret: Void
+ *
+ * Notes:
+ *
+ * File: mt_ss.c
+ *
+ */
Void mtIntSigHndlr(int arg)
{
/*mt010.301 Fix for core when run with -o option and when killed with SIGINT*/
/*
-*
-* Fun: mtExitClnup
-*
-* Desc: function, shuts down.
-*
-* Ret: Void
-*
-* Notes:
-*
-* File: mt_ss.c
-*
-*/
+ *
+ * Fun: mtExitClnup
+ *
+ * Desc: function, shuts down.
+ *
+ * Ret: Void
+ *
+ * Notes:
+ *
+ * File: mt_ss.c
+ *
+ */
Void mtExitClnup(void)
{
Ticks ticks;
}
/*
-*
-* Fun: SDisplay
-*
-* Desc: This function displays a string to a given output
-* channel.
-*
-* Ret: ROK - ok
-*
-* Notes: Buffer should be null terminated.
-*
-* channel 0 is reserved for backwards compatibility
-* with SPrint
-*
-* File: mt_ss.c
-*
-*/
-S16 SDisplay
+ *
+ * Fun: SDisplay
+ *
+ * Desc: This function displays a string to a given output
+ * channel.
+ *
+ * Ret: ROK - ok
+ *
+ * Notes: Buffer should be null terminated.
+ *
+ * channel 0 is reserved for backwards compatibility
+ * with SPrint
+ *
+ * File: mt_ss.c
+ *
+ */
+ S16 SDisplay
(
-S16 chan, /* channel */
-Txt *buf /* buffer */
-)
+ S16 chan, /* channel */
+ Txt *buf /* buffer */
+ )
{
-/* mt020.201 - Fixed typo */
+ /* mt020.201 - Fixed typo */
#if (ERRCLASS & ERRCLS_INT_PAR)
if (buf == NULLP)
{
#endif
#endif
- /* mt012.301 :FIX for LOG RELATED ISSUE */
+ /* mt012.301 :FIX for LOG RELATED ISSUE */
#ifdef CONAVL
if(chan==1)
{
- printf("%s",buf);
+ printf("%s",buf);
}
else
{
- if (osCp.dep.conOutFp) fwrite(buf, strlen(buf), 1, osCp.dep.conOutFp);
+ if (osCp.dep.conOutFp) fwrite(buf, strlen(buf), 1, osCp.dep.conOutFp);
}
#endif
/*mt010.301 */
/*
-*
-* Fun: SFini
-*
-* Desc: function, shuts down.
-*
-* Ret: Void
-*
-* Notes:
-*
-* File: mt_ss.c
-*
-*/
+ *
+ * Fun: SFini
+ *
+ * Desc: function, shuts down.
+ *
+ * Ret: Void
+ *
+ * Notes:
+ *
+ * File: mt_ss.c
+ *
+ */
S16 SFini(void)
{
pause();
if(osCp.dep.sigEvnt==TRUE)
{
- mtExitClnup();
+ mtExitClnup();
}
}
}
\f
/*
-*
-* Fun: Set date and time
-*
-* Desc: This function is used to set the calendar
-* date and time.
-*
-* Ret: ROK - ok
-*
-* Notes: Unimplemented
-*
-* File: mt_ss.c
-*
-*/
-S16 SSetDateTime
+ *
+ * Fun: Set date and time
+ *
+ * Desc: This function is used to set the calendar
+ * date and time.
+ *
+ * Ret: ROK - ok
+ *
+ * Notes: Unimplemented
+ *
+ * File: mt_ss.c
+ *
+ */
+ S16 SSetDateTime
(
-REG1 DateTime *dt /* date and time */
-)
+ REG1 DateTime *dt /* date and time */
+ )
{
UNUSED(dt);
\f
/*
-*
-* Fun: Get date and time
-*
-* Desc: This function is used to determine the calendar
-* date and time. This information may be used for
-* some management functions.
-*
-* Ret: ROK - ok
-* RFAILED - error
-*
-* Notes:
-*
-* File: mt_ss.c
-*
-*/
-S16 SGetDateTime
+ *
+ * Fun: Get date and time
+ *
+ * Desc: This function is used to determine the calendar
+ * date and time. This information may be used for
+ * some management functions.
+ *
+ * Ret: ROK - ok
+ * RFAILED - error
+ *
+ * Notes:
+ *
+ * File: mt_ss.c
+ *
+ */
+ S16 SGetDateTime
(
-REG1 DateTime *dt /* date and time */
-)
+ REG1 DateTime *dt /* date and time */
+ )
{
/*-- mt035.201 : SSI enhancements for micro second in datetime struct --*/
/* time_t tt; --*/
#endif
-/*-- mt035.201 --*/
+ /*-- mt035.201 --*/
/*--
- time(&tt);
- localtime_r(&tt, &tme);
- --*/
+ time(&tt);
+ localtime_r(&tt, &tme);
+ --*/
#ifndef SS_LINUX
- clock_gettime(CLOCK_REALTIME, &ptime);
+ clock_gettime(CLOCK_REALTIME, &ptime);
#else
- gettimeofday(&ptime, NULL);
+ gettimeofday(&ptime, NULL);
#endif
localtime_r(&ptime.tv_sec, &tme);
}
/*
-* Get time from epoch in milliseconds
-*
-* Fun: Get time from epoch in milliseconds
-*
-* Desc: This function is used to get the time from epoch in milli seconds.
-* This information may be used for calculating a layer's activation function
-* execution time used for thread profiling.
-*
-* Ret: ROK - ok
-* RFAILED - error
-*
-* Notes:
-*
-* File: mt_ss.c
-*/
+ * Get time from epoch in milliseconds
+ *
+ * Fun: Get time from epoch in milliseconds
+ *
+ * Desc: This function is used to get the time from epoch in milli seconds.
+ * This information may be used for calculating a layer's activation function
+ * execution time used for thread profiling.
+ *
+ * Ret: ROK - ok
+ * RFAILED - error
+ *
+ * Notes:
+ *
+ * File: mt_ss.c
+ */
/* mt003.301 Modifications */
-S16 SGetEpcTime
+ S16 SGetEpcTime
(
-EpcTime *et /* date and time */
-)
+ EpcTime *et /* date and time */
+ )
{
-/* mt003.301 Modifications */
-static uint64_t now;
- uint64_t to_sec = 1000000;
- uint64_t to_nsec = 1000;
+ /* mt003.301 Modifications */
+ static uint64_t now;
+ uint64_t to_sec = 1000000;
+ uint64_t to_nsec = 1000;
#ifndef SS_LINUX
struct timespec ptime;
#else
#ifndef SS_LINUX
- clock_gettime(CLOCK_REALTIME, &ptime);
+ clock_gettime(CLOCK_REALTIME, &ptime);
#else
- gettimeofday(&ptime, NULL);
+ gettimeofday(&ptime, NULL);
#endif /* SS_LINUX */
- now = (ptime.tv_sec * to_sec);
+ now = (ptime.tv_sec * to_sec);
#ifndef SS_LINUX
now += (ptime.tv_nsec / to_nsec);
#else /* SS_LINUX */
- now += (ptime.tv_usec);
+ now += (ptime.tv_usec);
#endif /* SS_LINUX */
- now = (now / to_nsec);
+ now = (now / to_nsec);
*et = now;
\f
/*
-*
-* Fun: Get system time
-*
-* Desc: This function is used to determine the system time.
-*
-* Ret: ROK - ok
-*
-* Notes: osCp.dep.sysTicks is updated by the timer thread.
-*
-* File: mt_ss.c
-*
-*/
-S16 SGetSysTime
+ *
+ * Fun: Get system time
+ *
+ * Desc: This function is used to determine the system time.
+ *
+ * Ret: ROK - ok
+ *
+ * Notes: osCp.dep.sysTicks is updated by the timer thread.
+ *
+ * File: mt_ss.c
+ *
+ */
+ S16 SGetSysTime
(
-Ticks *sysTime /* system time */
-)
+ Ticks *sysTime /* system time */
+ )
{
/* mt021.201 - Addition of SGetRefTime function */
/*
-*
-* Fun: Get referenced time
-*
-* Desc: This function is used to determine the time in seconds
-* and microseconds from a reference time. The reference
-* time is expressed in seconds from UTC EPOC, January 1,
-* 1970.
-*
-* Ret: ROK - ok
-* RFAILED - fail
-*
-* Notes: Macros are defined for reference times:
-* SS_REFTIME_01_01_1970
-* SS_REFTIME_01_01_2002
-*
-* File: mt_ss.c
-*
-*/
-S16 SGetRefTime
+ *
+ * Fun: Get referenced time
+ *
+ * Desc: This function is used to determine the time in seconds
+ * and microseconds from a reference time. The reference
+ * time is expressed in seconds from UTC EPOC, January 1,
+ * 1970.
+ *
+ * Ret: ROK - ok
+ * RFAILED - fail
+ *
+ * Notes: Macros are defined for reference times:
+ * SS_REFTIME_01_01_1970
+ * SS_REFTIME_01_01_2002
+ *
+ * File: mt_ss.c
+ *
+ */
+ S16 SGetRefTime
(
-uint32_t refTime, /* reference time */
-uint32_t *sec,
-uint32_t *usec
-)
+ uint32_t refTime, /* reference time */
+ uint32_t *sec,
+ uint32_t *usec
+ )
{
#ifndef SS_LINUX
#ifndef SS_LINUX
- clock_gettime(CLOCK_REALTIME, &ptime);
+ clock_gettime(CLOCK_REALTIME, &ptime);
#else
- gettimeofday(&ptime, NULL);
+ gettimeofday(&ptime, NULL);
#endif
#if (ERRCLASS & ERRCLS_INT_PAR)
*usec = ptime.tv_usec;
#endif
- return ROK;
+ return ROK;
}
\f
/*
-*
-* Fun: Get Random Number
-*
-* Desc: Invoked by layer when a pseudorandom number is required.
-*
-* Ret: ROK - ok
-*
-* Notes: Suggested approach uses shuffled Linear Congruential
-* Operators as described in Byte magazine October
-* 1984; "Generating and Testing Pseudorandom Numbers"
-*
-* File: mt_ss.c
-*
-*/
-S16 SRandom
+ *
+ * Fun: Get Random Number
+ *
+ * Desc: Invoked by layer when a pseudorandom number is required.
+ *
+ * Ret: ROK - ok
+ *
+ * Notes: Suggested approach uses shuffled Linear Congruential
+ * Operators as described in Byte magazine October
+ * 1984; "Generating and Testing Pseudorandom Numbers"
+ *
+ * File: mt_ss.c
+ *
+ */
+ S16 SRandom
(
-Random *value /* random number */
-)
+ Random *value /* random number */
+ )
{
#if (ERRCLASS & ERRCLS_INT_PAR)
if (value == NULLP)
{
- /* mt011.21: addition */
+ /* mt011.21: addition */
MTLOGERROR(ERRCLS_INT_PAR, EMT028, (ErrVal)0 , "Null pointer");
return RFAILED;
}
\f
/*
-*
-* Fun: Exit Task
-*
-* Desc: This function exits from a task.
-*
-* Ret: ROK - ok
-*
-* Notes: Currently does nothing.
-*
-* File: mt_ss.c
-*
-*/
+ *
+ * Fun: Exit Task
+ *
+ * Desc: This function exits from a task.
+ *
+ * Ret: ROK - ok
+ *
+ * Notes: Currently does nothing.
+ *
+ * File: mt_ss.c
+ *
+ */
S16 SExitTsk(void)
{
\f
/*
-*
-* Fun: Exit Interrupt
-*
-* Desc: This function exits from an interrupt.
-*
-* Ret: ROK - ok
-*
-* Notes: Currently does nothing.
-*
-* File: mt_ss.c
-*
-*/
+ *
+ * Fun: Exit Interrupt
+ *
+ * Desc: This function exits from an interrupt.
+ *
+ * Ret: ROK - ok
+ *
+ * Notes: Currently does nothing.
+ *
+ * File: mt_ss.c
+ *
+ */
S16 SExitInt(void)
{
\f
/*
-*
-* Fun: Hold Interrupt
-*
-* Desc: This function prohibits interrupts from being enabled until
-* release interrupt. This function should be called when
-* interrupts are disabled and prior to any call to system
-* services either by entry to an interrupt service routine or
-* by explicit call to disable interrupt.
-*
-* Ret: ROK - ok
-*
-* Notes: Currently does nothing
-*
-* File: mt_ss.c
-*
-*/
+ *
+ * Fun: Hold Interrupt
+ *
+ * Desc: This function prohibits interrupts from being enabled until
+ * release interrupt. This function should be called when
+ * interrupts are disabled and prior to any call to system
+ * services either by entry to an interrupt service routine or
+ * by explicit call to disable interrupt.
+ *
+ * Ret: ROK - ok
+ *
+ * Notes: Currently does nothing
+ *
+ * File: mt_ss.c
+ *
+ */
S16 SHoldInt(void)
{
\f
/*
-*
-* Fun: Release Interrupt
-*
-* Desc: This function allows interrupts to be enabled.
-*
-* Ret: ROK - ok
-*
-* Notes: Currently does nothing.
-*
-* File: mt_ss.c
-*
-*/
+ *
+ * Fun: Release Interrupt
+ *
+ * Desc: This function allows interrupts to be enabled.
+ *
+ * Ret: ROK - ok
+ *
+ * Notes: Currently does nothing.
+ *
+ * File: mt_ss.c
+ *
+ */
S16 SRelInt(void)
{
\f
/*
-*
-* Fun: SEnbInt
-*
-* Desc: Enable interrupts
-*
-* Ret: ROK on success
-* RFAILED on error
-*
-* Notes: Currently does nothing.
-*
-* File: mt_ss.c
-*
-*/
+ *
+ * Fun: SEnbInt
+ *
+ * Desc: Enable interrupts
+ *
+ * Ret: ROK on success
+ * RFAILED on error
+ *
+ * Notes: Currently does nothing.
+ *
+ * File: mt_ss.c
+ *
+ */
inline S16 SEnbInt(void)
{
\f
/*
-*
-* Fun: SDisInt
-*
-* Desc: Disable interrupts
-*
-* Ret: ROK on success
-* RFAILED on error
-*
-* Notes: Currently does nothing.
-*
-* File: mt_ss.c
-*
-*/
+ *
+ * Fun: SDisInt
+ *
+ * Desc: Disable interrupts
+ *
+ * Ret: ROK on success
+ * RFAILED on error
+ *
+ * Notes: Currently does nothing.
+ *
+ * File: mt_ss.c
+ *
+ */
inline S16 SDisInt(void)
{
\f
/*
-*
-* Fun: Get Vector
-*
-* Desc: This function gets the function address stored at the
-* specified interrupt vector.
-*
-* Ret: ROK - ok
-*
-* Notes: Currently does nothing.
-*
-* File: mt_ss.c
-*
-*/
-S16 SGetVect
+ *
+ * Fun: Get Vector
+ *
+ * Desc: This function gets the function address stored at the
+ * specified interrupt vector.
+ *
+ * Ret: ROK - ok
+ *
+ * Notes: Currently does nothing.
+ *
+ * File: mt_ss.c
+ *
+ */
+ S16 SGetVect
(
-VectNmb vectNmb, /* vector number */
-PIF *vectFnct /* vector function */
-)
+ VectNmb vectNmb, /* vector number */
+ PIF *vectFnct /* vector function */
+ )
{
\f
/*
-*
-* Fun: Put Vector
-*
-* Desc: This function installs the specified function at the
-* specified interrupt vector.
-*
-* Ret: ROK - ok
-*
-* Notes: Currently does nothing.
-*
-* File: mt_ss.c
-*
-*/
-S16 SPutVect
+ *
+ * Fun: Put Vector
+ *
+ * Desc: This function installs the specified function at the
+ * specified interrupt vector.
+ *
+ * Ret: ROK - ok
+ *
+ * Notes: Currently does nothing.
+ *
+ * File: mt_ss.c
+ *
+ */
+ S16 SPutVect
(
-VectNmb vectNmb, /* vector number */
-PIF vectFnct /* vector function */
-)
+ VectNmb vectNmb, /* vector number */
+ PIF vectFnct /* vector function */
+ )
{
#ifndef SS_MULTIPLE_PROCS
\f
/*
-*
-* Fun: SGetEntInst
-*
-* Desc: This function gets the current entity and instance.
-*
-* Ret: ROK - ok
-* RFAILED - failed, general (optional)
-*
-* Notes: This function may be called by the OS or Layer 1
-* hardware drivers.
-*
-* File: mt_ss.c
-*
-*/
-S16 SGetEntInst
+ *
+ * Fun: SGetEntInst
+ *
+ * Desc: This function gets the current entity and instance.
+ *
+ * Ret: ROK - ok
+ * RFAILED - failed, general (optional)
+ *
+ * Notes: This function may be called by the OS or Layer 1
+ * hardware drivers.
+ *
+ * File: mt_ss.c
+ *
+ */
+ S16 SGetEntInst
(
-Ent *ent, /* entity */
-Inst *inst /* instance */
-)
+ Ent *ent, /* entity */
+ Inst *inst /* instance */
+ )
{
S16 i;
S16 ret;
{
if (pthread_equal(osCp.sTskTbl[i].dep.tId, tId))
{
- sTsk = &osCp.sTskTbl[i];
- break;
+ sTsk = &osCp.sTskTbl[i];
+ break;
}
}
if (sTsk != NULLP)
{
- *ent = sTsk->dep.ent;
- *inst = sTsk->dep.inst;
+ *ent = sTsk->dep.ent;
+ *inst = sTsk->dep.inst;
}
SUnlock(&osCp.sTskTblLock);
\f
/*
-*
-* Fun: SSetEntInst
-*
-* Desc: This function sets the current entity and instance.
-*
-* Ret: ROK - ok
-*
-* Notes:
-*
-* File: mt_ss.c
-*
-*/
-S16 SSetEntInst
+ *
+ * Fun: SSetEntInst
+ *
+ * Desc: This function sets the current entity and instance.
+ *
+ * Ret: ROK - ok
+ *
+ * Notes:
+ *
+ * File: mt_ss.c
+ *
+ */
+ S16 SSetEntInst
(
-Ent ent, /* entity */
-Inst inst /* instance */
-)
+ Ent ent, /* entity */
+ Inst inst /* instance */
+ )
{
S16 i;
S16 ret;
{
if (pthread_equal(osCp.sTskTbl[i].dep.tId, tId))
{
- sTsk = &osCp.sTskTbl[i];
- break;
+ sTsk = &osCp.sTskTbl[i];
+ break;
}
}
if (sTsk != NULLP)
{
- sTsk->dep.ent = ent;
- sTsk->dep.inst = inst;
+ sTsk->dep.ent = ent;
+ sTsk->dep.inst = inst;
}
SUnlock(&osCp.sTskTblLock);
#ifdef SS_DRVR_SUPPORT
\f
/*
-*
-* Fun: SSetIntPend
-*
-* Desc: Set interrupt pending flag
-*
-* Ret: ROK on success
-* RFAILED on error
-*
-* Notes:
-*
-* File: mt_ss.c
-*
-*/
-inline S16 SSetIntPend
+ *
+ * Fun: SSetIntPend
+ *
+ * Desc: Set interrupt pending flag
+ *
+ * Ret: ROK on success
+ * RFAILED on error
+ *
+ * Notes:
+ *
+ * File: mt_ss.c
+ *
+ */
+ inline S16 SSetIntPend
(
-uint16_t id, /* driver task identifier */
-Bool flag /* flag */
-)
+ uint16_t id, /* driver task identifier */
+ Bool flag /* flag */
+ )
{
MtIsFlag isFlag;
#ifdef SS_LOCKLESS_MEMORY
/*
-*
-* Fun: SGlobMemInfoShow
-*
-* Desc: This function displays the memory usage information
-* for the destined region. It will show the usage of
-* each configured bucket and the heap for the specified region.
-*
-* Ret: ROK OK
-* RFAILED Region not registered
-*
-* File: mt_ss.c
-*
-*/
+ *
+ * Fun: SGlobMemInfoShow
+ *
+ * Desc: This function displays the memory usage information
+ * for the destined region. It will show the usage of
+ * each configured bucket and the heap for the specified region.
+ *
+ * Ret: ROK OK
+ * RFAILED Region not registered
+ *
+ * File: mt_ss.c
+ *
+ */
S16 SGlobMemInfoShow(Void)
{
uint16_t idx;
Txt prntBuf[100];
CmMmGlobRegCb *globReg;
-
+
globReg = osCp.globRegCb;
SDisplay(0, prntBuf);
sprintf(prntBuf, "====================================================\n");
SDisplay(0, prntBuf);
-
+
for (idx = 0; idx < globReg->numBkts; idx++)
{
#ifdef XEON_SPECIFIC_CHANGES
sprintf(prntBuf, "%2u %12lu %12lu %8lu %9lu\n",
- idx, globReg->bktTbl[idx].size, globReg->bktTbl[idx].bucketSetSize, globReg->bktTbl[idx].listValidBktSet.count, globReg->bktTbl[idx].listFreeBktSet.count);
+ idx, globReg->bktTbl[idx].size, globReg->bktTbl[idx].bucketSetSize, globReg->bktTbl[idx].listValidBktSet.count, globReg->bktTbl[idx].listFreeBktSet.count);
#else
#ifndef ALIGN_64BIT
sprintf(prntBuf, "%2u %12lu %8lu %9lu\n",
- idx, globReg->bktTbl[idx].bucketSetSize, globReg->bktTbl[idx].listValidBktSet.count, globReg->bktTbl[idx].listFreeBktSet.count);
+ idx, globReg->bktTbl[idx].bucketSetSize, globReg->bktTbl[idx].listValidBktSet.count, globReg->bktTbl[idx].listFreeBktSet.count);
#else
sprintf(prntBuf, "%2u %12u %8u %9u\n",
- idx, globReg->bktTbl[idx].bucketSetSize, globReg->bktTbl[idx].listValidBktSet.count, globReg->bktTbl[idx].listFreeBktSet.count);
+ idx, globReg->bktTbl[idx].bucketSetSize, globReg->bktTbl[idx].listValidBktSet.count, globReg->bktTbl[idx].listFreeBktSet.count);
#endif
#endif
SDisplay(0, prntBuf);
#endif /* SS_LOCKLESS_MEMORY */
/*
-Bool IsMemoryThresholdHit(Region reg, Pool pool)
-{
- if((mtCMMRegCb[reg]->bktTbl[pool].numAlloc * 100 )/mtCMMRegCb[reg]->bktTbl[pool].numBlks > 70)
- {
- MSPD_DBG("Threshold reached reg(%d) pool(%d) numAllc(%d) numBlks(%d)\n",
- reg,
- pool,
- mtCMMRegCb[reg]->bktTbl[pool].numAlloc,
- mtCMMRegCb[reg]->bktTbl[pool].numBlks);
- return (TRUE);
- }
- return (FALSE);
-}
-*/
+ Bool IsMemoryThresholdHit(Region reg, Pool pool)
+ {
+ if((mtCMMRegCb[reg]->bktTbl[pool].numAlloc * 100 )/mtCMMRegCb[reg]->bktTbl[pool].numBlks > 70)
+ {
+ MSPD_DBG("Threshold reached reg(%d) pool(%d) numAllc(%d) numBlks(%d)\n",
+ reg,
+ pool,
+ mtCMMRegCb[reg]->bktTbl[pool].numAlloc,
+ mtCMMRegCb[reg]->bktTbl[pool].numBlks);
+ return (TRUE);
+ }
+ return (FALSE);
+ }
+ */
/* mt022.201 - Addition of SRegInfoShow function */
/*
-*
-* Fun: SRegInfoShow
-*
-* Desc: This function displays the memory usage information
-* for the destined region. It will show the usage of
-* each configured bucket and the heap for the specified region.
-*
-* Ret: ROK OK
-* RFAILED Region not registered
-*
-* Notes: A Sample Output from the function
-* Bucket Memory: region 1
-* ====================================================
-* Bucket Number of Blks configured Size Allocated
-* ====================================================
-* 0 1 16 1
-* 1 1 32 0
-* 2 1 80 0
-* 3 1 256 0
-* 4 1 320 0
-*
-* ---------------
-* Heap Memory: region 1
-* Heap Size: 0
-* Heap Allocated: 0
-* Heap Segmented blocks: 0
-*
-*
-* File: mt_ss.c
-*
-*/
-S16 SRegInfoShow
+ *
+ * Fun: SRegInfoShow
+ *
+ * Desc: This function displays the memory usage information
+ * for the destined region. It will show the usage of
+ * each configured bucket and the heap for the specified region.
+ *
+ * Ret: ROK OK
+ * RFAILED Region not registered
+ *
+ * Notes: A Sample Output from the function
+ * Bucket Memory: region 1
+ * ====================================================
+ * Bucket Number of Blks configured Size Allocated
+ * ====================================================
+ * 0 1 16 1
+ * 1 1 32 0
+ * 2 1 80 0
+ * 3 1 256 0
+ * 4 1 320 0
+ *
+ * ---------------
+ * Heap Memory: region 1
+ * Heap Size: 0
+ * Heap Allocated: 0
+ * Heap Segmented blocks: 0
+ *
+ *
+ * File: mt_ss.c
+ *
+ */
+ S16 SRegInfoShow
(
-Region region,
-uint32_t *availmem
-)
+ Region region,
+ uint32_t *availmem
+ )
{
uint16_t idx;
Txt prntBuf[100];
#ifdef TENB_T2K3K_SPECIFIC_CHANGES
#ifdef ALIGN_64BIT
sprintf((char *)prntBuf, "%2u %8u %5u %8u %8u\n",
- idx, mtCMMRegCb[region]->bktTbl[idx].numBlks,
- mtCMMRegCb[region]->bktTbl[idx].size,
- mtCMMRegCb[region]->bktTbl[idx].numAlloc,
- mtCMMRegCb[region]->bktTbl[idx].maxAlloc);
+ idx, mtCMMRegCb[region]->bktTbl[idx].numBlks,
+ mtCMMRegCb[region]->bktTbl[idx].size,
+ mtCMMRegCb[region]->bktTbl[idx].numAlloc,
+ mtCMMRegCb[region]->bktTbl[idx].maxAlloc);
#else
sprintf((char *)prntBuf, "%2u %8lu %5lu %8lu %8lu\n",
- idx, mtCMMRegCb[region]->bktTbl[idx].numBlks,
- mtCMMRegCb[region]->bktTbl[idx].size,
- mtCMMRegCb[region]->bktTbl[idx].numAlloc,
- mtCMMRegCb[region]->bktTbl[idx].maxAlloc);
+ idx, mtCMMRegCb[region]->bktTbl[idx].numBlks,
+ mtCMMRegCb[region]->bktTbl[idx].size,
+ mtCMMRegCb[region]->bktTbl[idx].numAlloc,
+ mtCMMRegCb[region]->bktTbl[idx].maxAlloc);
#endif
#else
-/*mt009.301 Fixed 64BIT compilation warnings*/
+ /*mt009.301 Fixed 64BIT compilation warnings*/
#ifdef ALIGN_64BIT
sprintf(prntBuf, "%2u %8u %5u %8u\n",
- idx, mtCMMRegCb[region]->bktTbl[idx].numBlks,
- mtCMMRegCb[region]->bktTbl[idx].size,
- mtCMMRegCb[region]->bktTbl[idx].numAlloc);
+ idx, mtCMMRegCb[region]->bktTbl[idx].numBlks,
+ mtCMMRegCb[region]->bktTbl[idx].size,
+ mtCMMRegCb[region]->bktTbl[idx].numAlloc);
#else
sprintf(prntBuf, "%2u %8lu %5lu %8lu\n",
- idx, mtCMMRegCb[region]->bktTbl[idx].numBlks,
- mtCMMRegCb[region]->bktTbl[idx].size,
- mtCMMRegCb[region]->bktTbl[idx].numAlloc);
+ idx, mtCMMRegCb[region]->bktTbl[idx].numBlks,
+ mtCMMRegCb[region]->bktTbl[idx].size,
+ mtCMMRegCb[region]->bktTbl[idx].numAlloc);
#endif
#endif /* not TENB_RTLIN_CHANGES */
SDisplay(0, prntBuf);
*availmem = *availmem + (mtCMMRegCb[region]->bktTbl[idx].size * \
- (mtCMMRegCb[region]->bktTbl[idx].numBlks - \
- mtCMMRegCb[region]->bktTbl[idx].numAlloc));
+ (mtCMMRegCb[region]->bktTbl[idx].numBlks - \
+ mtCMMRegCb[region]->bktTbl[idx].numAlloc));
}
sprintf(prntBuf, "\n---------------\n");
SDisplay(0, prntBuf);
sprintf(prntBuf, "Heap Memory: region %d\n", region);
SDisplay(0, prntBuf);
-/*mt009.301 Fixed 64BIT compilation warnings*/
+ /*mt009.301 Fixed 64BIT compilation warnings*/
#ifdef ALIGN_64BIT
sprintf(prntBuf, "Heap Size: %u\n", mtCMMRegCb[region]->heapSize);
#else
sprintf(prntBuf, "Heap Size: %lu\n", mtCMMRegCb[region]->heapSize);
#endif
SDisplay(0, prntBuf);
-/*mt009.301 Fixed 64BIT compilation warnings*/
+ /*mt009.301 Fixed 64BIT compilation warnings*/
#ifdef ALIGN_64BIT
sprintf(prntBuf, "Heap Allocated: %u\n",
- (mtCMMRegCb[region]->heapSize - mtCMMRegCb[region]->heapCb.avlSize));
+ (mtCMMRegCb[region]->heapSize - mtCMMRegCb[region]->heapCb.avlSize));
#else
sprintf(prntBuf, "Heap Allocated: %lu\n",
- (mtCMMRegCb[region]->heapSize - mtCMMRegCb[region]->heapCb.avlSize));
+ (mtCMMRegCb[region]->heapSize - mtCMMRegCb[region]->heapCb.avlSize));
#endif
SDisplay(0, prntBuf);
*availmem = *availmem + mtCMMRegCb[region]->heapCb.avlSize;
#if (ERRCLASS & ERRCLS_DEBUG)
sprintf(prntBuf, "Heap Segmented blocks: %d\n",
- mtCMMRegCb[region]->heapCb.numFragBlk);
+ mtCMMRegCb[region]->heapCb.numFragBlk);
SDisplay(0, prntBuf);
#endif
uint32_t SMemMidThreshold[SSI_MAX_REG_THRESHOLD][SSI_MAX_BKT_THRESHOLD] = {{0}};
uint32_t SMemLowThreshold[SSI_MAX_REG_THRESHOLD][SSI_MAX_BKT_THRESHOLD] = {{0}};
-static Void SInitMemThreshold
+ static Void SInitMemThreshold
(
-Region region,
-uint8_t maxBkt
-)
+ Region region,
+ uint8_t maxBkt
+ )
{
uint8_t idx = 0;
for (idx = 0; (idx < maxBkt && idx < mtCMMRegCb[region]->numBkts); idx++)
SMemMaxThreshold[region][idx] = (mtCMMRegCb[region]->bktTbl[idx].numBlks*95)/100;
SMemMidThreshold[region][idx] = (mtCMMRegCb[region]->bktTbl[idx].numBlks*85)/100;
SMemLowThreshold[region][idx] = (mtCMMRegCb[region]->bktTbl[idx].numBlks*80)/100;
- printf("REGION:%d, BKT:%d max:%d mid:%d low:%d\n", region, idx, SMemMaxThreshold[region][idx], SMemMidThreshold[region][idx], SMemLowThreshold[region][idx]);
+ printf("\nREGION:%d, BKT:%d max:%d mid:%d low:%d\n", region, idx, SMemMaxThreshold[region][idx], SMemMidThreshold[region][idx], SMemLowThreshold[region][idx]);
}
}
-S16 SRegReachedMemThreshold
+ S16 SRegReachedMemThreshold
(
-Region region,
-uint8_t maxBkt
-)
+ Region region,
+ uint8_t maxBkt
+ )
{
uint8_t idx = 0;
uint8_t memStatus = 3;
{
if(mtCMMRegCb[region]->bktTbl[idx].numAlloc >= SMemMaxThreshold[region][idx])
{
- memStatus = 0;
- break;
+ memStatus = 0;
+ break;
}
else if((mtCMMRegCb[region]->bktTbl[idx].numAlloc >= SMemMidThreshold[region][idx]) && (memStatus >1))
{
- memStatus = 1;
+ memStatus = 1;
}
else if((mtCMMRegCb[region]->bktTbl[idx].numAlloc >= SMemLowThreshold[region][idx]) && (memStatus >2))
{
- memStatus = 2;
+ memStatus = 2;
}
}
return (memStatus);
#endif
/* mt033.201 - addition of API to return the memory statistical data */
/*
-*
-* Fun: SGetRegInfo
-*
-* Desc: This function returns the memory usage information
-* for the destined region. It will return the usage of
-* each configured bucket and the heap for the specified region.
-*
-* Ret: ROK OK
-* RFAILED Region not registered
-*
-* Notes:
-*
-* File: mt_ss.c
-*
-*/
-S16 SGetRegInfo
+ *
+ * Fun: SGetRegInfo
+ *
+ * Desc: This function returns the memory usage information
+ * for the destined region. It will return the usage of
+ * each configured bucket and the heap for the specified region.
+ *
+ * Ret: ROK OK
+ * RFAILED Region not registered
+ *
+ * Notes:
+ *
+ * File: mt_ss.c
+ *
+ */
+ S16 SGetRegInfo
(
-Region region,
-SsMemDbgInfo *dbgInfo
-)
+ Region region,
+ SsMemDbgInfo *dbgInfo
+ )
{
uint32_t idx;
dbgInfo->bktDbgTbl[idx].numAlloc = mtCMMRegCb[region]->bktTbl[idx].numAlloc;
dbgInfo->availmem += (mtCMMRegCb[region]->bktTbl[idx].size * \
- (mtCMMRegCb[region]->bktTbl[idx].numBlks - \
- mtCMMRegCb[region]->bktTbl[idx].numAlloc));
+ (mtCMMRegCb[region]->bktTbl[idx].numBlks - \
+ mtCMMRegCb[region]->bktTbl[idx].numAlloc));
}
dbgInfo->region = region;
dbgInfo->heapSize = mtCMMRegCb[region]->heapSize;
dbgInfo->heapAlloc = (mtCMMRegCb[region]->heapSize - \
- mtCMMRegCb[region]->heapCb.avlSize);
+ mtCMMRegCb[region]->heapCb.avlSize);
dbgInfo->availmem += mtCMMRegCb[region]->heapCb.avlSize;
return ROK;
}
-S16 SGetRegPoolInfo
+ S16 SGetRegPoolInfo
(
-uint8_t *numRegion,
-uint8_t *numPool
-)
+ uint8_t *numRegion,
+ uint8_t *numPool
+ )
{
/* Send number of Region available */
*numRegion = mtMemoCfg.numRegions;
* for the destined region. It will show the total memory
* used for static and dynamic memory if typeFlag is
* SS_MEM_BKT_ALLOC_PROFILE. It will show the number of
-* memory block allocated for a particular size if typeFlag
-* is SS_MEM_BLK_SIZE_PROFILE from the hash list by
-* calling SRegPrintMemStats.
-*
-* Ret: ROK
-*
-* Notes:
-*
-* File: mt_ss.c
-*
-*/
-S16 SPrintRegMemStatusInfo
+ * memory block allocated for a particular size if typeFlag
+ * is SS_MEM_BLK_SIZE_PROFILE from the hash list by
+ * calling SRegPrintMemStats.
+ *
+ * Ret: ROK
+ *
+ * Notes:
+ *
+ * File: mt_ss.c
+ *
+ */
+ S16 SPrintRegMemStatusInfo
(
-Region region,
-uint8_t typeFlag
-)
+ Region region,
+ uint8_t typeFlag
+ )
{
Txt prntBuf[150];
uint32_t idx;
SDisplay(0, prntBuf);
for (idx = 0; idx < mtCMMRegCb[region]->numBkts; idx++)
{
-/*mt009.301 Fixed 64BIT compilation warnings*/
+ /*mt009.301 Fixed 64BIT compilation warnings*/
#ifdef ALIGN_64BIT
- sprintf(prntBuf, "%2u %8u %8u\n", idx,
- mtCMMRegCb[region]->bktTbl[idx].staticMemUsed,
- mtCMMRegCb[region]->bktTbl[idx].dynamicMemUsed);
+ sprintf(prntBuf, "%2u %8u %8u\n", idx,
+ mtCMMRegCb[region]->bktTbl[idx].staticMemUsed,
+ mtCMMRegCb[region]->bktTbl[idx].dynamicMemUsed);
#else
- sprintf(prntBuf, "%2lu %8lu %8lu\n", idx,
- mtCMMRegCb[region]->bktTbl[idx].staticMemUsed,
- mtCMMRegCb[region]->bktTbl[idx].dynamicMemUsed);
-#endif
- SDisplay(0, prntBuf);
- /* update the total count */
- statMemSize += mtCMMRegCb[region]->bktTbl[idx].staticMemUsed;
- dynMemSize += mtCMMRegCb[region]->bktTbl[idx].dynamicMemUsed;
+ sprintf(prntBuf, "%2lu %8lu %8lu\n", idx,
+ mtCMMRegCb[region]->bktTbl[idx].staticMemUsed,
+ mtCMMRegCb[region]->bktTbl[idx].dynamicMemUsed);
+#endif
+ SDisplay(0, prntBuf);
+ /* update the total count */
+ statMemSize += mtCMMRegCb[region]->bktTbl[idx].staticMemUsed;
+ dynMemSize += mtCMMRegCb[region]->bktTbl[idx].dynamicMemUsed;
}
/* from buckets */
-/*mt009.301 Fixed 64BIT compilation warnings*/
+ /*mt009.301 Fixed 64BIT compilation warnings*/
#ifdef ALIGN_64BIT
sprintf(prntBuf, "Total Static Memory allocated from buckets: %u\n", statMemSize);
SDisplay(0, prntBuf);
/* from heap */
sprintf(prntBuf, "\n\nAllocated Memory profile from Heap of region: %d \n", region);
SDisplay(0, prntBuf);
-/*mt009.301 Fixed 64BIT compilation warnings*/
+ /*mt009.301 Fixed 64BIT compilation warnings*/
#ifdef ALIGN_64BIT
sprintf(prntBuf, "STATIC MEMORY: %u DYNAMIC MEMORY:%u \n",
- mtCMMRegCb[region]->heapCb.staticHeapMemUsed, mtCMMRegCb[region]->heapCb.dynamicHeapMemUsed);
+ mtCMMRegCb[region]->heapCb.staticHeapMemUsed, mtCMMRegCb[region]->heapCb.dynamicHeapMemUsed);
#else
sprintf(prntBuf, "STATIC MEMORY: %lu DYNAMIC MEMORY:%lu \n",
- mtCMMRegCb[region]->heapCb.staticHeapMemUsed, mtCMMRegCb[region]->heapCb.dynamicHeapMemUsed);
+ mtCMMRegCb[region]->heapCb.staticHeapMemUsed, mtCMMRegCb[region]->heapCb.dynamicHeapMemUsed);
#endif
SDisplay(0, prntBuf);
}
}
/*
-*
-* Fun: SPrintRegMemStats
-*
-* Desc: This function displays the memory usage information for
-* the destined region. It will show the number of memory
-* block allocated for a particular size from the hash list.
-*
-* Ret: ROK
-*
-* Notes:
-*
-* File: mt_ss.c
-*
-*/
+ *
+ * Fun: SPrintRegMemStats
+ *
+ * Desc: This function displays the memory usage information for
+ * the destined region. It will show the number of memory
+ * block allocated for a particular size from the hash list.
+ *
+ * Ret: ROK
+ *
+ * Notes:
+ *
+ * File: mt_ss.c
+ *
+ */
static S16 SPrintRegMemStats(Region region)
{
CmMmHashListCp *hashListCp;
sprintf(prntBuf, "\n\nSize Vs. NumAttempts and Alloc/Dealloc profile of region %d\n", region);
SDisplay(0, prntBuf);
sprintf(prntBuf, "Maximum Entries: %u Current Entries: %u\n",
- hashListCp->numOfbins, hashListCp->numOfEntries);
+ hashListCp->numOfbins, hashListCp->numOfEntries);
SDisplay(0, prntBuf);
sprintf(prntBuf, "===================================\n");
SDisplay(0, prntBuf);
SDisplay(0, prntBuf);
for (idx = 0, cntEnt=0; (cntEnt < hashListCp->numOfEntries) &&
- (idx < CMM_STAT_HASH_TBL_LEN); idx++)
+ (idx < CMM_STAT_HASH_TBL_LEN); idx++)
{
if (hashListCp->hashList[idx].numAttempts)
{
- cntEnt++;
-/*mt009.301 Fixed 64BIT compilation warnings*/
+ cntEnt++;
+ /*mt009.301 Fixed 64BIT compilation warnings*/
#ifdef ALIGN_64BIT
- sprintf(prntBuf, "%8u %8u\n", hashListCp->hashList[idx].size,
- hashListCp->hashList[idx].numAttempts);
+ sprintf(prntBuf, "%8u %8u\n", hashListCp->hashList[idx].size,
+ hashListCp->hashList[idx].numAttempts);
#else
- sprintf(prntBuf, "%8lu %8lu\n", hashListCp->hashList[idx].size,
- hashListCp->hashList[idx].numAttempts);
+ sprintf(prntBuf, "%8lu %8lu\n", hashListCp->hashList[idx].size,
+ hashListCp->hashList[idx].numAttempts);
#endif
- SDisplay(0, prntBuf);
+ SDisplay(0, prntBuf);
}
}
/* Print the statistics of total number of alloc/de-alloc attempts in each bucket of this region */
for (idx = 0; idx < mtCMMRegCb[region]->numBkts; idx++)
{
-/*mt009.301 Fixed 64BIT compilation warnings*/
+ /*mt009.301 Fixed 64BIT compilation warnings*/
#ifdef ALIGN_64BIT
sprintf(prntBuf, "%4u %8u %8u\n", idx,
- mtCMMRegCb[region]->bktTbl[idx].numAllocAttempts,
- mtCMMRegCb[region]->bktTbl[idx].numDeallocAttempts);
+ mtCMMRegCb[region]->bktTbl[idx].numAllocAttempts,
+ mtCMMRegCb[region]->bktTbl[idx].numDeallocAttempts);
#else
sprintf(prntBuf, "%4lu %8lu %8lu\n", idx,
- mtCMMRegCb[region]->bktTbl[idx].numAllocAttempts,
- mtCMMRegCb[region]->bktTbl[idx].numDeallocAttempts);
+ mtCMMRegCb[region]->bktTbl[idx].numAllocAttempts,
+ mtCMMRegCb[region]->bktTbl[idx].numDeallocAttempts);
#endif
SDisplay(0, prntBuf);
}
sprintf(prntBuf, "\nAllocation/De-allocation profile in Heap\n");
SDisplay(0, prntBuf);
-/*mt009.301 Fixed 64BIT compilation warnings*/
+ /*mt009.301 Fixed 64BIT compilation warnings*/
#ifdef ALIGN_64BIT
sprintf(prntBuf, "Num of Alloc Attempts: %u Num of De-alloc Attempts: %u\n",
- mtCMMRegCb[region]->heapCb.numAllocAttempts,
- mtCMMRegCb[region]->heapCb.numDeallocAttempts);
+ mtCMMRegCb[region]->heapCb.numAllocAttempts,
+ mtCMMRegCb[region]->heapCb.numDeallocAttempts);
#else
sprintf(prntBuf, "Num of Alloc Attempts: %lu Num of De-alloc Attempts: %lu\n",
- mtCMMRegCb[region]->heapCb.numAllocAttempts,
- mtCMMRegCb[region]->heapCb.numDeallocAttempts);
+ mtCMMRegCb[region]->heapCb.numAllocAttempts,
+ mtCMMRegCb[region]->heapCb.numDeallocAttempts);
#endif
SDisplay(0, prntBuf);
sprintf(prntBuf, "\n");
}
/*
-*
-* Fun: SRegMemErrHdlr
-*
-* Desc: This function handles the errors returned from the memory
-* related functions. Customers are suggested to modify this
-* API according to their specific requirement.
-*
-* Ret: ROK OK
-*
-* Notes:
-*
-* File: mt_ss.c
-*
-*/
-Void SRegMemErrHdlr
+ *
+ * Fun: SRegMemErrHdlr
+ *
+ * Desc: This function handles the errors returned from the memory
+ * related functions. Customers are suggested to modify this
+ * API according to their specific requirement.
+ *
+ * Ret: ROK OK
+ *
+ * Notes:
+ *
+ * File: mt_ss.c
+ *
+ */
+ Void SRegMemErrHdlr
(
-Region region,
-Data *ptr,
-S16 errCode
-)
+ Region region,
+ Data *ptr,
+ S16 errCode
+ )
{
Txt prntBuf[150];
}
/*
-*
-* Fun: SPrintRegMemProfile
-*
-* Desc: This function displays the memory profile information
-* for the destined region. This function prints for:
-* 1) each memory bucket-Block address, size, size for which it is allocated, free/allocated, static/dynamic
-* 2) heap - memory block address, size, requested size, free/allocated, static/dynamic
-*
-* Ret: ROK OK
-*
-* Notes:
-*
-* File: mt_ss.c
-*
-*/
-S16 SPrintRegMemProfile
+ *
+ * Fun: SPrintRegMemProfile
+ *
+ * Desc: This function displays the memory profile information
+ * for the destined region. This function prints for:
+ * 1) each memory bucket-Block address, size, size for which it is allocated, free/allocated, static/dynamic
+ * 2) heap - memory block address, size, requested size, free/allocated, static/dynamic
+ *
+ * Ret: ROK OK
+ *
+ * Notes:
+ *
+ * File: mt_ss.c
+ *
+ */
+ S16 SPrintRegMemProfile
(
-Region region
-)
+ Region region
+ )
{
CmMmHeapCb *heapCb;
CmMmRegCb *regCb;
for (idx = 0; idx < regCb->numBkts; idx++)
{
-/*mt009.301 Fixed 64BIT compilation warnings*/
+ /*mt009.301 Fixed 64BIT compilation warnings*/
#ifdef ALIGN_64BIT
sprintf(prntBuf, "\nBucket number:%4u of Size:%u Num of Blocks: %u\n",
- idx, regCb->bktTbl[idx].size, regCb->bktTbl[idx].numBlks);
+ idx, regCb->bktTbl[idx].size, regCb->bktTbl[idx].numBlks);
#else
sprintf(prntBuf, "\nBucket number:%4lu of Size:%lu Num of Blocks: %lu\n",
- idx, regCb->bktTbl[idx].size, regCb->bktTbl[idx].numBlks);
+ idx, regCb->bktTbl[idx].size, regCb->bktTbl[idx].numBlks);
#endif
SDisplay(0, prntBuf);
offsetToNxtBlk = regCb->bktTbl[idx].size + sizeof(CmMmBlkHdr);
for (blkCnt=0, curBktBlk = (CmMmBlkHdr *)(regCb->bktTbl[idx].bktStartPtr);
- ((curBktBlk) && (blkCnt < regCb->bktTbl[idx].numBlks));
- curBktBlk = (CmMmBlkHdr *)((Data *)curBktBlk + offsetToNxtBlk), blkCnt++)
+ ((curBktBlk) && (blkCnt < regCb->bktTbl[idx].numBlks));
+ curBktBlk = (CmMmBlkHdr *)((Data *)curBktBlk + offsetToNxtBlk), blkCnt++)
{
-/*mt009.301 Fixed 64BIT compilation warnings*/
+ /*mt009.301 Fixed 64BIT compilation warnings*/
#ifdef ALIGN_64BIT
- sprintf(prntBuf, "%6u %8p", blkCnt, (void *)curBktBlk);
+ sprintf(prntBuf, "%6u %8p", blkCnt, (void *)curBktBlk);
#else
- sprintf(prntBuf, "%6lu %8p", blkCnt, (void *)curBktBlk);
+ sprintf(prntBuf, "%6lu %8p", blkCnt, (void *)curBktBlk);
#endif
- SDisplay(0, prntBuf);
- /* check if it is a sane block, elxe jump to next block */
- if (cmMmRegIsBlkSane(curBktBlk) != ROK)
- {
- sprintf(prntBuf, " Trampled \n");
- SDisplay(0, prntBuf);
+ SDisplay(0, prntBuf);
+ /* check if it is a sane block, elxe jump to next block */
+ if (cmMmRegIsBlkSane(curBktBlk) != ROK)
+ {
+ sprintf(prntBuf, " Trampled \n");
+ SDisplay(0, prntBuf);
- continue;
- }
+ continue;
+ }
- if (CMM_IS_STATIC(curBktBlk->memFlags))
- {
-/*mt009.301 Fixed 64BIT compilation warnings*/
+ if (CMM_IS_STATIC(curBktBlk->memFlags))
+ {
+ /*mt009.301 Fixed 64BIT compilation warnings*/
#ifdef ALIGN_64BIT
- sprintf(prntBuf, " Allocated Static %8u\n", curBktBlk->requestedSize);
+ sprintf(prntBuf, " Allocated Static %8u\n", curBktBlk->requestedSize);
#else
- sprintf(prntBuf, " Allocated Static %8lu\n", curBktBlk->requestedSize);
+ sprintf(prntBuf, " Allocated Static %8lu\n", curBktBlk->requestedSize);
#endif
- SDisplay(0, prntBuf);
- }
- else if (CMM_IS_DYNAMIC(curBktBlk->memFlags))
- {
-/*mt009.301 Fixed 64BIT compilation warnings*/
+ SDisplay(0, prntBuf);
+ }
+ else if (CMM_IS_DYNAMIC(curBktBlk->memFlags))
+ {
+ /*mt009.301 Fixed 64BIT compilation warnings*/
#ifdef ALIGN_64BIT
- sprintf(prntBuf, " Allocated Dynamic %8u\n", curBktBlk->requestedSize);
+ sprintf(prntBuf, " Allocated Dynamic %8u\n", curBktBlk->requestedSize);
#else
- sprintf(prntBuf, " Allocated Dynamic %8lu\n", curBktBlk->requestedSize);
+ sprintf(prntBuf, " Allocated Dynamic %8lu\n", curBktBlk->requestedSize);
#endif
- SDisplay(0, prntBuf);
- }
- else if (CMM_IS_FREE(curBktBlk->memFlags))
- {
-/*mt009.301 Fixed 64BIT compilation warnings*/
+ SDisplay(0, prntBuf);
+ }
+ else if (CMM_IS_FREE(curBktBlk->memFlags))
+ {
+ /*mt009.301 Fixed 64BIT compilation warnings*/
#ifdef ALIGN_64BIT
- sprintf(prntBuf, " Free %8u\n", curBktBlk->requestedSize);
+ sprintf(prntBuf, " Free %8u\n", curBktBlk->requestedSize);
#else
- sprintf(prntBuf, " Free %8lu\n", curBktBlk->requestedSize);
-#endif
- SDisplay(0, prntBuf);
- }
- else
- {
- sprintf(prntBuf, " Trampled \n");
- SDisplay(0, prntBuf);
- }
+ sprintf(prntBuf, " Free %8lu\n", curBktBlk->requestedSize);
+#endif
+ SDisplay(0, prntBuf);
+ }
+ else
+ {
+ sprintf(prntBuf, " Trampled \n");
+ SDisplay(0, prntBuf);
+ }
}
}
/* traverse the entire heap to output the heap profile */
hdrSize = sizeof(CmHEntry);
for (blkCnt=0, curHBlk = (CmHEntry *)heapCb->vStart;
- ((curHBlk) && (curHBlk < (CmHEntry *)heapCb->vEnd)); blkCnt++)
+ ((curHBlk) && (curHBlk < (CmHEntry *)heapCb->vEnd)); blkCnt++)
{
-/*mt009.301 Fixed 64BIT compilation warnings*/
+ /*mt009.301 Fixed 64BIT compilation warnings*/
#ifdef ALIGN_64BIT
sprintf(prntBuf, "%6u %8p", blkCnt, (void *)curHBlk);
#else
/* check if it is a sane block, elxe jump to next block */
if (cmMmRegIsBlkSane((CmMmBlkHdr *)curHBlk) != ROK)
{
- sprintf(prntBuf, " Trampled \n");
- SDisplay(0, prntBuf);
-
- sprintf(prntBuf, "Trampled block encountered: Stopping heap profile\n");
- SDisplay(0, prntBuf);
-
- /*
- * To go to next block in the heap we do not have any offset value
- * other than curHBlk->size. As the block is already trampled
- * we cannot rely on this size. So it is better to stop here unless there
- * exists any other mechanism(?) to know the offset to next block.
- */
- return ROK;
+ sprintf(prntBuf, " Trampled \n");
+ SDisplay(0, prntBuf);
+
+ sprintf(prntBuf, "Trampled block encountered: Stopping heap profile\n");
+ SDisplay(0, prntBuf);
+
+ /*
+ * To go to next block in the heap we do not have any offset value
+ * other than curHBlk->size. As the block is already trampled
+ * we cannot rely on this size. So it is better to stop here unless there
+ * exists any other mechanism(?) to know the offset to next block.
+ */
+ return ROK;
}
-/*mt009.301 Fixed 64BIT compilation warnings*/
+ /*mt009.301 Fixed 64BIT compilation warnings*/
#ifdef ALIGN_64BIT
sprintf(prntBuf, " %8u", curHBlk->size);
#else
if (CMM_IS_STATIC(curHBlk->memFlags))
{
-/*mt009.301 Fixed 64BIT compilation warnings*/
+ /*mt009.301 Fixed 64BIT compilation warnings*/
#ifdef ALIGN_64BIT
- sprintf(prntBuf, " Allocated Static %8u\n", curHBlk->requestedSize);
+ sprintf(prntBuf, " Allocated Static %8u\n", curHBlk->requestedSize);
#else
- sprintf(prntBuf, " Allocated Static %8lu\n", curHBlk->requestedSize);
+ sprintf(prntBuf, " Allocated Static %8lu\n", curHBlk->requestedSize);
#endif
- SDisplay(0, prntBuf);
+ SDisplay(0, prntBuf);
}
else if (CMM_IS_DYNAMIC(curHBlk->memFlags))
{
-/*mt009.301 Fixed 64BIT compilation warnings*/
+ /*mt009.301 Fixed 64BIT compilation warnings*/
#ifdef ALIGN_64BIT
- sprintf(prntBuf, " Allocated Dynamic %8u\n", curHBlk->requestedSize);
+ sprintf(prntBuf, " Allocated Dynamic %8u\n", curHBlk->requestedSize);
#else
- sprintf(prntBuf, " Allocated Dynamic %8lu\n", curHBlk->requestedSize);
+ sprintf(prntBuf, " Allocated Dynamic %8lu\n", curHBlk->requestedSize);
#endif
- SDisplay(0, prntBuf);
+ SDisplay(0, prntBuf);
}
else if (CMM_IS_FREE(curHBlk->memFlags))
{
-/*mt009.301 Fixed 64BIT compilation warnings*/
+ /*mt009.301 Fixed 64BIT compilation warnings*/
#ifdef ALIGN_64BIT
- sprintf(prntBuf, " Free %8u\n", curHBlk->requestedSize);
+ sprintf(prntBuf, " Free %8u\n", curHBlk->requestedSize);
#else
- sprintf(prntBuf, " Free %8lu\n", curHBlk->requestedSize);
+ sprintf(prntBuf, " Free %8lu\n", curHBlk->requestedSize);
#endif
- SDisplay(0, prntBuf);
+ SDisplay(0, prntBuf);
}
else
{
- sprintf(prntBuf, " Trampled \n");
- SDisplay(0, prntBuf);
+ sprintf(prntBuf, " Trampled \n");
+ SDisplay(0, prntBuf);
}
/* goto next block in the heap */
curHBlk = (CmHEntry *)((Data *)curHBlk + hdrSize + curHBlk->size);
/*-- mt035.201 : Added new API for timestamp --*/
/*--
-*
-* Fun: Get TimeStamp
-*
-* Desc: This function is used to Get TimeStamp in micro seconds
-*
-* Ret: ROK - ok
-* RFAILED - error
-*
-* Notes:
-*
-* File: mt_ss.c
-*
---*/
-S16 SGetTimeStamp
+ *
+ * Fun: Get TimeStamp
+ *
+ * Desc: This function is used to Get TimeStamp in micro seconds
+ *
+ * Ret: ROK - ok
+ * RFAILED - error
+ *
+ * Notes:
+ *
+ * File: mt_ss.c
+ *
+ --*/
+ S16 SGetTimeStamp
(
-S8 *ts
-)
+ S8 *ts
+ )
{
#ifndef SS_LINUX
#ifndef SS_LINUX
- clock_gettime(CLOCK_REALTIME, &ptime);
+ clock_gettime(CLOCK_REALTIME, &ptime);
#else
- gettimeofday(&ptime, NULL);
+ gettimeofday(&ptime, NULL);
#endif
/* Obtain the time of day, and convert it to a tm struct. --*/
/* Klock work fix ccpu00148484 */
if(ptm != NULLP)
{
- /* Format the date and time, down to a single second. --*/
- strftime (time_string, sizeof (time_string), "%a %b %d %Y %H:%M:%S", ptm);
+ /* Format the date and time, down to a single second. --*/
+ strftime (time_string, sizeof (time_string), "%a %b %d %Y %H:%M:%S", ptm);
}
/* Compute microseconds. --*/
/* Print the formatted time, in seconds, followed by a decimal point
and the microseconds. --*/
-/*mt009.301 Fixed 64BIT compilation warnings*/
+ /*mt009.301 Fixed 64BIT compilation warnings*/
#ifdef ALIGN_64BIT
sprintf(ts, "%s.%03d", time_string, microseconds);
#else
}
/*-- mt037.201 : Added new API for SGetSystemTsk --*/
/*
-*
-* Fun: Get SGetSystemTsk
-*
-* Desc: This function is used to Get sytem task id
-*
-* Ret: task id
-*
-* Notes:
-*
-* File: mt_ss.c
-*
---*/
+ *
+ * Fun: Get SGetSystemTsk
+ *
+ * Desc: This function is used to Get sytem task id
+ *
+ * Ret: task id
+ *
+ * Notes:
+ *
+ * File: mt_ss.c
+ *
+ --*/
uint32_t SGetSystemTsk(Void)
{
#ifdef SS_MULTICORE_SUPPORT
/*
-*
-* Fun: Add Timer thread into system task table
-*
-* Desc: This function is used to add the system task
-* associated with Timer thread.
-*
-* Ret: None
-*
-* Notes:
-*
-* File: mt_ss.c
-*
---*/
+ *
+ * Fun: Add Timer thread into system task table
+ *
+ * Desc: This function is used to add the system task
+ * associated with Timer thread.
+ *
+ * Ret: None
+ *
+ * Notes:
+ *
+ * File: mt_ss.c
+ *
+ --*/
static SsSTskEntry* ssdAddTmrSTsk(Void)
{
SsSTskEntry *sTsk;
#if (ERRCLASS & ERRCLS_DEBUG)
MTLOGERROR(ERRCLS_DEBUG, EMT039, (ErrVal) ret,
- "Could not lock system task table");
+ "Could not lock system task table");
#endif
return (sTsk);
if ( SUnlock(&osCp.sTskTblLock) != ROK)
{
#if (ERRCLASS & ERRCLS_DEBUG)
- MTLOGERROR(ERRCLS_DEBUG, EMT040, ERRZERO,
- "Could not give the Semaphore");
- return (sTsk);
+ MTLOGERROR(ERRCLS_DEBUG, EMT040, ERRZERO,
+ "Could not give the Semaphore");
+ return (sTsk);
#endif
}
if ( SUnlock(&osCp.sTskTblLock) != ROK)
{
#if (ERRCLASS & ERRCLS_DEBUG)
- MTLOGERROR(ERRCLS_DEBUG, EMT042, ERRZERO,
- "Could not give the Semaphore");
- return (NULLP);
+ MTLOGERROR(ERRCLS_DEBUG, EMT042, ERRZERO,
+ "Could not give the Semaphore");
+ return (NULLP);
#endif
}
#if (ERRCLASS & ERRCLS_DEBUG)
MTLOGERROR(ERRCLS_DEBUG, EMT043, (ErrVal) ret,
- "Could not initialize demand queue");
+ "Could not initialize demand queue");
#endif
return (NULLP);
if ( SUnlock(&osCp.sTskTblLock) != ROK)
{
#if (ERRCLASS & ERRCLS_DEBUG)
- MTLOGERROR(ERRCLS_DEBUG, EMT044, ERRZERO,
- "Could not give the Semaphore");
- return (NULLP);
+ MTLOGERROR(ERRCLS_DEBUG, EMT044, ERRZERO,
+ "Could not give the Semaphore");
+ return (NULLP);
#endif
}
#if (ERRCLASS & ERRCLS_DEBUG)
MTLOGERROR(ERRCLS_DEBUG, EMT045, (ErrVal) ret,
- "Could not initialize system task entry lock");
+ "Could not initialize system task entry lock");
#endif
return (NULLP);
/* unlock the system task table */
- if ( SUnlock(&osCp.sTskTblLock) != ROK)
- {
+ if ( SUnlock(&osCp.sTskTblLock) != ROK)
+ {
#if (ERRCLASS & ERRCLS_DEBUG)
- MTLOGERROR(ERRCLS_DEBUG, EMT046, ERRZERO,
- "Could not give the Semaphore");
- return (NULLP);
+ MTLOGERROR(ERRCLS_DEBUG, EMT046, ERRZERO,
+ "Could not give the Semaphore");
+ return (NULLP);
#endif
- }
+ }
return (sTsk);
}
/* mt003.301 Readwrite lock and recursive mutex additions */
#ifdef SS_LOCK_SUPPORT
/*
-*
-* Fun: ssdInitLockNew
-*
-* Desc: This function is used to initialise lock/mutex
-*
-* Ret: ROK OK
-*
-* Notes:
-*
-* File: mt_ss.c
-*
-*/
+ *
+ * Fun: ssdInitLockNew
+ *
+ * Desc: This function is used to initialise lock/mutex
+ *
+ * Ret: ROK OK
+ *
+ * Notes:
+ *
+ * File: mt_ss.c
+ *
+ */
S16 ssdInitLockNew(SLockInfo *lockId,uint8_t lockType)
{
#ifdef SS_REC_LOCK_SUPPORT
- pthread_mutexattr_t attr;
+ pthread_mutexattr_t attr;
#endif /* SS_REC_LOCK_SUPPORT */
Txt prntBuf[PRNTSZE];
S16 retVal = ROK;
{
#ifdef SS_RDWR_LOCK_SUPPORT
case SRDWRLOCK :
- {
- if((retVal = pthread_rwlock_init((&(lockId->l.rdWrLockId)), NULLP)) != ROK)
- {
- sprintf(prntBuf, "\n\n ssdInitLockNew(): Initialization of read write lock failed,Error# retVal %d\n", retVal);
- SDisplay(0, prntBuf);
- return RFAILED;
- }
- break;
- }
+ {
+ if((retVal = pthread_rwlock_init((&(lockId->l.rdWrLockId)), NULLP)) != ROK)
+ {
+ sprintf(prntBuf, "\n\n ssdInitLockNew(): Initialization of read write lock failed,Error# retVal %d\n", retVal);
+ SDisplay(0, prntBuf);
+ return RFAILED;
+ }
+ break;
+ }
#endif /* SS_RDWR_LOCK_SUPPORT */
#ifdef SS_REC_LOCK_SUPPORT
- case SMUTEXRECUR:
- {
- retVal = pthread_mutexattr_init(&attr);
-
- if(retVal != 0)
- {
- sprintf(prntBuf,"\n ssdInitLockNew(): mutexattr init failed,Error# %d \n",retVal);
- SPrint(prntBuf);
- return RFAILED;
- }
+ case SMUTEXRECUR:
+ {
+ retVal = pthread_mutexattr_init(&attr);
+
+ if(retVal != 0)
+ {
+ sprintf(prntBuf,"\n ssdInitLockNew(): mutexattr init failed,Error# %d \n",retVal);
+ SPrint(prntBuf);
+ return RFAILED;
+ }
#ifdef SS_LINUX
- retVal = pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE_NP);
+ retVal = pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE_NP);
#else
- retVal = pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE);
-#endif
- if(retVal != 0)
- {
- sprintf(prntBuf,"\n ssdInitLockNew(): mutexattr settype failed,Error# %d \n",retVal);
- pthread_mutexattr_destroy(&attr);
- SPrint(prntBuf);
- return RFAILED;
- }
- retVal = pthread_mutex_init((pthread_mutex_t *)&(lockId->l.recurLock), &attr);
- if(retVal != 0)
- {
- sprintf(prntBuf,"\n ssdInitLockNew(): mutex init failed,Error# %d \n",retVal);
- pthread_mutexattr_destroy(&attr);
- SPrint(prntBuf);
- return RFAILED;
- }
- break;
- }
+ retVal = pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE);
+#endif
+ if(retVal != 0)
+ {
+ sprintf(prntBuf,"\n ssdInitLockNew(): mutexattr settype failed,Error# %d \n",retVal);
+ pthread_mutexattr_destroy(&attr);
+ SPrint(prntBuf);
+ return RFAILED;
+ }
+ retVal = pthread_mutex_init((pthread_mutex_t *)&(lockId->l.recurLock), &attr);
+ if(retVal != 0)
+ {
+ sprintf(prntBuf,"\n ssdInitLockNew(): mutex init failed,Error# %d \n",retVal);
+ pthread_mutexattr_destroy(&attr);
+ SPrint(prntBuf);
+ return RFAILED;
+ }
+ break;
+ }
#endif /* SS_REC_LOCK_SUPPORT */
default :
- {
- sprintf(prntBuf, "\n\n ssdInitLockNew(): Invalid lock type %d\n", lockType);
- SDisplay(0, prntBuf);
- return RFAILED;
- }
+ {
+ sprintf(prntBuf, "\n\n ssdInitLockNew(): Invalid lock type %d\n", lockType);
+ SDisplay(0, prntBuf);
+ return RFAILED;
+ }
}
return ROK;
}
/*
-*
-* Fun: ssdLockNew
-*
-* Desc: This function is used to aquire the read write lock
-*
-* Ret: ROK OK
-*
-* Notes:
-*
-* File: mt_ss.c
-*
-*/
+ *
+ * Fun: ssdLockNew
+ *
+ * Desc: This function is used to aquire the read write lock
+ *
+ * Ret: ROK OK
+ *
+ * Notes:
+ *
+ * File: mt_ss.c
+ *
+ */
S16 ssdLockNew(SLockInfo *lockId,uint8_t lockType)
{
{
#ifdef SS_RDWR_LOCK_SUPPORT
case SRDLOCK :
- {
- if((retVal = pthread_rwlock_rdlock(&(lockId->l.rdWrLockId))) != ROK)
- {
- sprintf(prntBuf, "\n\n ssdLockNew(): Failed to aquire the read lock,Error# %d\n", retVal);
- SDisplay(0, prntBuf);
- return RFAILED;
- }
- break;
- }
+ {
+ if((retVal = pthread_rwlock_rdlock(&(lockId->l.rdWrLockId))) != ROK)
+ {
+ sprintf(prntBuf, "\n\n ssdLockNew(): Failed to aquire the read lock,Error# %d\n", retVal);
+ SDisplay(0, prntBuf);
+ return RFAILED;
+ }
+ break;
+ }
case SWRLOCK :
- {
- if((retVal = pthread_rwlock_wrlock(&(lockId->l.rdWrLockId))) != ROK)
- {
- sprintf(prntBuf, "\n\n ssdLockNew(): Failed to aquire the write lock,Error# %d\n", retVal);
- SDisplay(0, prntBuf);
- return RFAILED;
- }
- break;
- }
+ {
+ if((retVal = pthread_rwlock_wrlock(&(lockId->l.rdWrLockId))) != ROK)
+ {
+ sprintf(prntBuf, "\n\n ssdLockNew(): Failed to aquire the write lock,Error# %d\n", retVal);
+ SDisplay(0, prntBuf);
+ return RFAILED;
+ }
+ break;
+ }
case STRYRDLOCK :
- {
- if((retVal = pthread_rwlock_tryrdlock(&(lockId->l.rdWrLockId))) != ROK)
- {
- sprintf(prntBuf, "\n\n ssdLockNew(): Failed to aquire the read lock,Error# %d\n", retVal);
- SDisplay(0, prntBuf);
- return RFAILED;
- }
- break;
- }
+ {
+ if((retVal = pthread_rwlock_tryrdlock(&(lockId->l.rdWrLockId))) != ROK)
+ {
+ sprintf(prntBuf, "\n\n ssdLockNew(): Failed to aquire the read lock,Error# %d\n", retVal);
+ SDisplay(0, prntBuf);
+ return RFAILED;
+ }
+ break;
+ }
case STRYWRLOCK:
- {
- if((retVal = pthread_rwlock_trywrlock(&(lockId->l.rdWrLockId))) != ROK)
- {
- sprintf(prntBuf, "\n\n ssdLockNew(): Failed to aquire the read lock,Error# %d\n", retVal);
- SDisplay(0, prntBuf);
- return RFAILED;
- }
- break;
- }
+ {
+ if((retVal = pthread_rwlock_trywrlock(&(lockId->l.rdWrLockId))) != ROK)
+ {
+ sprintf(prntBuf, "\n\n ssdLockNew(): Failed to aquire the read lock,Error# %d\n", retVal);
+ SDisplay(0, prntBuf);
+ return RFAILED;
+ }
+ break;
+ }
#endif /* SS_RDWR_LOCK_SUPPORT */
#ifdef SS_REC_LOCK_SUPPORT
- case SMUTEXRECUR:
- {
- if((retVal = pthread_mutex_lock(&(lockId->l.recurLock)) != ROK))
- {
- sprintf(prntBuf, "\n\n ssdLockNew(): Failed to aquire the recursive mutex,Error# %d\n", retVal);
- SDisplay(0, prntBuf);
- return RFAILED;
- }
- break;
- }
+ case SMUTEXRECUR:
+ {
+ if((retVal = pthread_mutex_lock(&(lockId->l.recurLock)) != ROK))
+ {
+ sprintf(prntBuf, "\n\n ssdLockNew(): Failed to aquire the recursive mutex,Error# %d\n", retVal);
+ SDisplay(0, prntBuf);
+ return RFAILED;
+ }
+ break;
+ }
#endif /* SS_REC_LOCK_SUPPORT */
default :
- {
- sprintf(prntBuf, "\n\n ssdLockNew(): Invalid lock type %d\n", lockType);
- SDisplay(0, prntBuf);
- return RFAILED;
- }
+ {
+ sprintf(prntBuf, "\n\n ssdLockNew(): Invalid lock type %d\n", lockType);
+ SDisplay(0, prntBuf);
+ return RFAILED;
+ }
}
return ROK;
/*
-*
-* Fun: ssdUnlockNew
-*
-* Desc: This function is used to Unlock the read write lock
-*
-* Ret: ROK OK
-*
-* Notes:
-*
-* File: mt_ss.c
-*
-*/
+ *
+ * Fun: ssdUnlockNew
+ *
+ * Desc: This function is used to Unlock the read write lock
+ *
+ * Ret: ROK OK
+ *
+ * Notes:
+ *
+ * File: mt_ss.c
+ *
+ */
S16 ssdUnlockNew(SLockInfo *lockId,uint8_t lockType)
{
{
#ifdef SS_RDWR_LOCK_SUPPORT
case SRDWRLOCK :
- {
- if((retVal = pthread_rwlock_unlock(&(lockId->l.rdWrLockId))) != ROK)
- {
- sprintf(prntBuf, "\n\n ssdUnLockNew(): Failed to unlock the lock,Error# %d\n", retVal);
- SDisplay(0, prntBuf);
- return RFAILED;
- }
- break;
- }
+ {
+ if((retVal = pthread_rwlock_unlock(&(lockId->l.rdWrLockId))) != ROK)
+ {
+ sprintf(prntBuf, "\n\n ssdUnLockNew(): Failed to unlock the lock,Error# %d\n", retVal);
+ SDisplay(0, prntBuf);
+ return RFAILED;
+ }
+ break;
+ }
#endif /* SS_RDWR_LOCK_SUPPORT */
#ifdef SS_REC_LOCK_SUPPORT
- case SMUTEXRECUR:
- {
- if((retVal = pthread_mutex_unlock(&(lockId->l.recurLock)) != ROK))
- {
- sprintf(prntBuf, "\n\n ssdUnLockNew(): Failed to aquire the recursive mutex,Error# %d\n", retVal);
- SDisplay(0, prntBuf);
- return RFAILED;
- }
- break;
- }
+ case SMUTEXRECUR:
+ {
+ if((retVal = pthread_mutex_unlock(&(lockId->l.recurLock)) != ROK))
+ {
+ sprintf(prntBuf, "\n\n ssdUnLockNew(): Failed to aquire the recursive mutex,Error# %d\n", retVal);
+ SDisplay(0, prntBuf);
+ return RFAILED;
+ }
+ break;
+ }
#endif /* SS_REC_LOCK_SUPPORT */
default :
- {
- sprintf(prntBuf, "\n\n ssdUnlockNew(): Invalid lock type %d\n", lockType);
- SDisplay(0, prntBuf);
- return RFAILED;
- }
+ {
+ sprintf(prntBuf, "\n\n ssdUnlockNew(): Invalid lock type %d\n", lockType);
+ SDisplay(0, prntBuf);
+ return RFAILED;
+ }
}
return ROK;
}
/*
-*
-* Fun: ssdDestroyLockNew
-*
-* Desc: This function is used to destroy the read write lock
-*
-* Ret: ROK OK
-*
-* Notes:
-*
-* File: mt_ss.c
-*
-*/
+ *
+ * Fun: ssdDestroyLockNew
+ *
+ * Desc: This function is used to destroy the read write lock
+ *
+ * Ret: ROK OK
+ *
+ * Notes:
+ *
+ * File: mt_ss.c
+ *
+ */
S16 ssdDestroyLockNew(SLockInfo *lockId,uint8_t lockType)
{
Txt prntBuf[PRNTSZE];
{
#ifdef SS_RDWR_LOCK_SUPPORT
case SRDWRLOCK :
- {
- if((retVal = pthread_rwlock_destroy(&(lockId->l.rdWrLockId))) != ROK)
- {
- sprintf(prntBuf, "\n\n ssdDestroyLockNew(): Failed to destroy the lock,Error# %d\n", retVal);
- SDisplay(0, prntBuf);
- return RFAILED;
- }
- break;
- }
+ {
+ if((retVal = pthread_rwlock_destroy(&(lockId->l.rdWrLockId))) != ROK)
+ {
+ sprintf(prntBuf, "\n\n ssdDestroyLockNew(): Failed to destroy the lock,Error# %d\n", retVal);
+ SDisplay(0, prntBuf);
+ return RFAILED;
+ }
+ break;
+ }
#endif /* SS_RDWR_LOCK_SUPPORT */
#ifdef SS_REC_LOCK_SUPPORT
- case SMUTEXRECUR:
- {
- if((retVal = pthread_mutex_destroy(&(lockId->l.recurLock)) != ROK))
- {
- sprintf(prntBuf, "\n\n ssdDestroyLockNew(): Failed to destroy the mutex,Error# %d\n", retVal);
- SDisplay(0, prntBuf);
- return RFAILED;
- }
- break;
- }
+ case SMUTEXRECUR:
+ {
+ if((retVal = pthread_mutex_destroy(&(lockId->l.recurLock)) != ROK))
+ {
+ sprintf(prntBuf, "\n\n ssdDestroyLockNew(): Failed to destroy the mutex,Error# %d\n", retVal);
+ SDisplay(0, prntBuf);
+ return RFAILED;
+ }
+ break;
+ }
#endif /* SS_REC_LOCK_SUPPORT */
default :
- {
- sprintf(prntBuf, "\n\n ssdDestroyLockNew(): Invalid lock type %d\n", lockType);
- SDisplay(0, prntBuf);
- return RFAILED;
- }
+ {
+ sprintf(prntBuf, "\n\n ssdDestroyLockNew(): Invalid lock type %d\n", lockType);
+ SDisplay(0, prntBuf);
+ return RFAILED;
+ }
}
return ROK;
}
**/
S16 ssInitRcvWork(void)
{
- pthread_attr_t attr;
- pthread_t thread;
+ pthread_attr_t attr;
+ pthread_t thread;
- /* set the required attributes */
- pthread_attr_init(&attr);
- pthread_attr_setstacksize(&attr, (size_t)MT_ISTASK_STACK);
- pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM);
- pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
+ /* set the required attributes */
+ pthread_attr_init(&attr);
+ pthread_attr_setstacksize(&attr, (size_t)MT_ISTASK_STACK);
+ pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM);
+ pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
- /* Create a new thread to receive the work queue messages */
- if ((pthread_create(&thread, &attr, workRcvTsk, NULLP)) != 0)
- {
- pthread_attr_destroy(&attr);
+ /* Create a new thread to receive the work queue messages */
+ if ((pthread_create(&thread, &attr, workRcvTsk, NULLP)) != 0)
+ {
+ pthread_attr_destroy(&attr);
- return RFAILED;
- }
+ return RFAILED;
+ }
- pthread_attr_destroy(&attr);
+ pthread_attr_destroy(&attr);
- return ROK;
+ return ROK;
}/* ssInitRcvWork */
static void *workRcvTsk(Ptr ptr)
{
- cvmx_wqe_t *workPtr;
- Buffer *mBuf, *rcvdBuf;
- SsMsgInfo *minfoPtr;
- S16 ret;
- struct timespec ts;
- Pst pst;
-
+ cvmx_wqe_t *workPtr;
+ Buffer *mBuf, *rcvdBuf;
+ SsMsgInfo *minfoPtr;
+ S16 ret;
+ struct timespec ts;
+ Pst pst;
- for (;;)
- {
- /* get the work if its avilable */
- workPtr = cvmx_pow_work_request_sync(CVMX_POW_NO_WAIT);
- if ( workPtr == NULLP )
- {
- /* If there is no work then sleep for 10 usec */
- ts.tv_sec = 0;
- ts.tv_nsec = 500000;
+ for (;;)
+ {
+ /* get the work if its avilable */
+ workPtr = cvmx_pow_work_request_sync(CVMX_POW_NO_WAIT);
- nanosleep(&ts, NULLP);
- continue;
- }
+ if ( workPtr == NULLP )
+ {
+ /* If there is no work then sleep for 10 usec */
+ ts.tv_sec = 0;
+ ts.tv_nsec = 500000;
- switch(workPtr->tag)
- {
- /* Switch over according to the tag value */
- case SS_CVMX_MBUF_TAG:
-
- rcvdBuf = (Buffer*)workPtr->packet_ptr.ptr;
-
- /* Convert the physical address to Pointers */
- ret = SConvPhyPtr(&rcvdBuf);
- if (ret != ROK)
- {
- /* mt011.301: Cavium 32 bit changes */
- cvmx_fpa_free(workPtr, SS_CVMX_WQE_POOL, 0);
- continue;
- }
-
- /* Copy the buffer to this region */
- ret = SCpyFpaMsg(rcvdBuf, SS_DFLT_REGION, SS_DFLT_POOL, &mBuf);
- if( ret != ROK )
- {
- /* mt011.301: Cavium 32 bit changes */
- cvmx_fpa_free(workPtr, SS_CVMX_WQE_POOL, 0);
- continue;
- }
-
- /* mt011.301: Cavium 32 bit changes */
- cvmx_fpa_free(workPtr, SS_CVMX_WQE_POOL, 0);
-
- minfoPtr = (SsMsgInfo*)mBuf->b_rptr;
-
- /* Get the post strucutre and Post the message */
- if ( minfoPtr != NULLP)
- {
- SMemCpy( &pst, &minfoPtr->pst, sizeof(Pst));
-
- (Void)SPstTsk(&pst, mBuf);
- }
- /* Free the buffer allocated if it cannot be sent */
- else
- {
- SPutMsg(mBuf);
- }
- break;
+ nanosleep(&ts, NULLP);
+ continue;
+ }
- default:
- {
- /* Invalid tag value, drop the work */
- /* mt011.301: Cavium 32 bit changes */
- cvmx_fpa_free(workPtr, SS_CVMX_WQE_POOL, 0);
- continue;
- }
- break;
- }
+ switch(workPtr->tag)
+ {
+ /* Switch over according to the tag value */
+ case SS_CVMX_MBUF_TAG:
+
+ rcvdBuf = (Buffer*)workPtr->packet_ptr.ptr;
+
+ /* Convert the physical address to Pointers */
+ ret = SConvPhyPtr(&rcvdBuf);
+ if (ret != ROK)
+ {
+ /* mt011.301: Cavium 32 bit changes */
+ cvmx_fpa_free(workPtr, SS_CVMX_WQE_POOL, 0);
+ continue;
+ }
+
+ /* Copy the buffer to this region */
+ ret = SCpyFpaMsg(rcvdBuf, SS_DFLT_REGION, SS_DFLT_POOL, &mBuf);
+ if( ret != ROK )
+ {
+ /* mt011.301: Cavium 32 bit changes */
+ cvmx_fpa_free(workPtr, SS_CVMX_WQE_POOL, 0);
+ continue;
+ }
+
+ /* mt011.301: Cavium 32 bit changes */
+ cvmx_fpa_free(workPtr, SS_CVMX_WQE_POOL, 0);
+
+ minfoPtr = (SsMsgInfo*)mBuf->b_rptr;
+
+ /* Get the post strucutre and Post the message */
+ if ( minfoPtr != NULLP)
+ {
+ SMemCpy( &pst, &minfoPtr->pst, sizeof(Pst));
+
+ (Void)SPstTsk(&pst, mBuf);
+ }
+ /* Free the buffer allocated if it cannot be sent */
+ else
+ {
+ SPutMsg(mBuf);
+ }
+ break;
+
+ default:
+ {
+ /* Invalid tag value, drop the work */
+ /* mt011.301: Cavium 32 bit changes */
+ cvmx_fpa_free(workPtr, SS_CVMX_WQE_POOL, 0);
+ continue;
+ }
+ break;
+ }
- }
+ }
} /* workRcvTsk */
#endif /* SS_SEUM_CAVIUM */
if(SS_INVALID_THREAD_REG_MAP != SS_GET_THREAD_MEM_REGION())
{
- printf("not able to get different Id for main thread\n");
+ printf("\nnot able to get different Id for main thread\n");
exit(1);
}
/* Here the default region is added as we dont have any region associated with
#else
SS_GET_THREAD_MEM_REGION() =
#endif
- DFLT_REGION;
+ DFLT_REGION;
}
/*
* File: mt_ss.c
*
*/
-S32 ssCheckAndAddMemoryRegionMap
+ S32 ssCheckAndAddMemoryRegionMap
(
-pthread_t threadId, /* Thread Id of system task */
-Region region /* Region associated with thread */
-)
+ pthread_t threadId, /* Thread Id of system task */
+ Region region /* Region associated with thread */
+ )
{
static uint32_t createdThreads;
static pthread_t createdThreadIds[SS_MAX_THREAD_CREATE_RETRY];
* contains 0xFF, that mapping entry is free
*/
if(SS_INVALID_THREAD_REG_MAP !=
- osCp.threadMemoryRegionMap[((threadId >> SS_MEM_THREAD_ID_SHIFT) % SS_MAX_THREAD_REGION_MAP)])
+ osCp.threadMemoryRegionMap[((threadId >> SS_MEM_THREAD_ID_SHIFT) % SS_MAX_THREAD_REGION_MAP)])
{
/* Klock work fix ccpu00148484 */
if(!(createdThreads < SS_MAX_THREAD_CREATE_RETRY))
{
- printf("failed in index = %ld\n", ((threadId >> SS_MEM_THREAD_ID_SHIFT) % SS_MAX_THREAD_REGION_MAP));
- printf("Not able to get the different thread ID, exiting\n");
- exit(1);
+ printf("\nfailed in index = %ld\n", ((threadId >> SS_MEM_THREAD_ID_SHIFT) % SS_MAX_THREAD_REGION_MAP));
+ printf("\nNot able to get the different thread ID, exiting\n");
+ exit(1);
}
createdThreadIds[createdThreads++] = threadId;
return (FALSE);
*/
osCp.threadMemoryRegionMap[((threadId >> SS_MEM_THREAD_ID_SHIFT) % SS_MAX_THREAD_REGION_MAP)] = region;
#ifdef XEON_SPECIFIC_CHANGES
- printf("ThreadId %ld, Thread Idx %d, Region %d\n", threadId,
- ((threadId >> SS_MEM_THREAD_ID_SHIFT) %
- SS_MAX_THREAD_REGION_MAP), region);
+ printf("\nThreadId %ld, Thread Idx %d, Region %d\n", threadId,
+ ((threadId >> SS_MEM_THREAD_ID_SHIFT) %
+ SS_MAX_THREAD_REGION_MAP), region);
#endif
for(indx = 0; indx < createdThreads; indx++)
{
#ifdef XEON_SPECIFIC_CHANGES
- printf("Sending pthred Cancel to thread Id %d \n",createdThreadIds[indx]);
+ printf("\nSending pthred Cancel to thread Id %d \n",createdThreadIds[indx]);
#endif
pthread_cancel(createdThreadIds[indx]);
}
* File: mt_ss.c
*
*/
-S32 ssCheckAndDelMemoryRegionMap
+ S32 ssCheckAndDelMemoryRegionMap
(
-pthread_t threadId /* Thread Id of system task */
-)
+ pthread_t threadId /* Thread Id of system task */
+ )
{
* contains 0xFF, that mapping entry is free
*/
if(SS_INVALID_THREAD_REG_MAP ==
- osCp.threadMemoryRegionMap[((threadId >> SS_MEM_THREAD_ID_SHIFT) % SS_MAX_THREAD_REGION_MAP)])
+ osCp.threadMemoryRegionMap[((threadId >> SS_MEM_THREAD_ID_SHIFT) % SS_MAX_THREAD_REGION_MAP)])
{
#ifndef ALIGN_64BIT
- printf("Invalid Thread ID (%ld)\n", (uint32_t)threadId);
+ printf("\nInvalid Thread ID (%ld)\n", (uint32_t)threadId);
#else
- printf("Invalid Thread ID (%d)\n", (uint32_t)threadId);
+ printf("\nInvalid Thread ID (%d)\n", (uint32_t)threadId);
#endif
return RFAILED;
}
#endif
#ifdef SS_TSKLOG_ENABLE
/*
-*
-* Fun: SStartTask
-*
-* Desc: This function will return current time through input parameter.
-*
-* Ret: ROK - ok
-* RFAILED - failed, general (optional)
-*
-*
-* File: pt_ss.c
-*
-*/
-S16 SStartTask
+ *
+ * Fun: SStartTask
+ *
+ * Desc: This function will return current time through input parameter.
+ *
+ * Ret: ROK - ok
+ * RFAILED - failed, general (optional)
+ *
+ *
+ * File: pt_ss.c
+ *
+ */
+ S16 SStartTask
(
-volatile uint32_t *startTime,
-uint32_t taskId
-)
+ volatile uint32_t *startTime,
+ uint32_t taskId
+ )
{
#ifdef MSPD_MLOG_NEW
*startTime = GetTIMETICK();
}
\f
/*
-*
-* Fun: SStopTask
-*
-* Desc: This function will return current time through input parameter.
-* and take the difference of start time provided as input parameter
-* and current time.
-*
-* Ret: ROK - ok
-* RFAILED - failed, general (optional)
-*
-*
-* File: pt_ss.c
-*
-*/
-S16 SStopTask
+ *
+ * Fun: SStopTask
+ *
+ * Desc: This function will return current time through input parameter.
+ * and take the difference of start time provided as input parameter
+ * and current time.
+ *
+ * Ret: ROK - ok
+ * RFAILED - failed, general (optional)
+ *
+ *
+ * File: pt_ss.c
+ *
+ */
+ S16 SStopTask
(
-volatile uint32_t startTime,
-uint32_t taskId
-)
+ volatile uint32_t startTime,
+ uint32_t taskId
+ )
{
/*uint32_t stopTime;*/
switch(taskId)
case PID_RECPREQ_PROC:
#ifdef CA_PHY
#ifndef LTE_TDD
- MLogTask(0, taskId, RESOURCE_LARM, startTime, GetTIMETICK());
+ MLogTask(0, taskId, RESOURCE_LARM, startTime, GetTIMETICK());
#else
- MLogTask(taskId, RESOURCE_LARM, startTime, GetTIMETICK());
+ MLogTask(taskId, RESOURCE_LARM, startTime, GetTIMETICK());
#endif
#else
- MLogTask(taskId, RESOURCE_LARM, startTime, GetTIMETICK());
+ MLogTask(taskId, RESOURCE_LARM, startTime, GetTIMETICK());
#endif
- break;
+ break;
}
return ROK;
}
#else
-S16 SStartTask
+ S16 SStartTask
(
-volatile uint32_t * startTime,
-uint32_t taskId
-)
+ volatile uint32_t * startTime,
+ uint32_t taskId
+ )
{
*startTime = 0;
return ROK;
}
-S16 SStopTask
+ S16 SStopTask
(
-volatile uint32_t startTime,
-uint32_t taskId
-)
+ volatile uint32_t startTime,
+ uint32_t taskId
+ )
{
return ROK;
}
#endif /*#ifdef SS_TSKLOG_ENABLE */
#ifdef TENB_T2K3K_SPECIFIC_CHANGES
/** @details
-* This primitive is used to calculate the CPU Utilization per Core
-* for Intel T2200
-*
-* @param [in] Void
-*
-* @return Void - function is always success
-*/
-Void UpdateSocCpuInfo
+ * This primitive is used to calculate the CPU Utilization per Core
+ * for Intel T2200
+ *
+ * @param [in] Void
+ *
+ * @return Void - function is always success
+ */
+ Void UpdateSocCpuInfo
(
-CmCpuStatsInfo *cpuInfo,
-uint8_t idx
-)
+ CmCpuStatsInfo *cpuInfo,
+ uint8_t idx
+ )
{
FILE *mipsFd;
S8 mipsStr[MIPS_STRING_LEN];
/* Get the free mips available value from the file */
if(NULLP == fgets(mipsStr, 24, mipsFd))
{
- printf("fgets to get the free mips available failed\n");
+ printf("\nfgets to get the free mips available failed\n");
fclose(mipsFd);
return;
}
{
if(strPart != NULLP)
{
- l2FreeCpu = atoi(strPart);
- l2CpuUsed = 100 - l2FreeCpu;
- cpuInfo->cpuUtil[0].totCpuUtil += l2CpuUsed;
- cpuInfo->cpuUtil[0].maxCpuUtil = GET_CPU_MAX((cpuInfo->cpuUtil[0].maxCpuUtil), l2CpuUsed);
- cpuInfo->cpuUtil[0].numSamples++;
+ l2FreeCpu = atoi(strPart);
+ l2CpuUsed = 100 - l2FreeCpu;
+ cpuInfo->cpuUtil[0].totCpuUtil += l2CpuUsed;
+ cpuInfo->cpuUtil[0].maxCpuUtil = GET_CPU_MAX((cpuInfo->cpuUtil[0].maxCpuUtil), l2CpuUsed);
+ cpuInfo->cpuUtil[0].numSamples++;
}
}
if(idx == CM_L3_CPU_UTIL)
strPart = strtok(NULLP, " ");
if(strPart != NULLP)
{
- l3FreeCpu = atoi(strPart);
- l3CpuUsed = 100 - l3FreeCpu;
- cpuInfo->cpuUtil[0].totCpuUtil += l3CpuUsed;
- cpuInfo->cpuUtil[0].maxCpuUtil = GET_CPU_MAX((cpuInfo->cpuUtil[0].maxCpuUtil), l3CpuUsed);
- cpuInfo->cpuUtil[0].numSamples++;
+ l3FreeCpu = atoi(strPart);
+ l3CpuUsed = 100 - l3FreeCpu;
+ cpuInfo->cpuUtil[0].totCpuUtil += l3CpuUsed;
+ cpuInfo->cpuUtil[0].maxCpuUtil = GET_CPU_MAX((cpuInfo->cpuUtil[0].maxCpuUtil), l3CpuUsed);
+ cpuInfo->cpuUtil[0].numSamples++;
}
}
if(idx == CM_L2_CPU_UTIL)
#endif /* TENB_T2K3K_SPECIFIC_CHANGES */
#ifdef SS_MULTICORE_SUPPORT
/*
-*
-* Fun: Add Timer thread into system task table
-*
-* Desc: This function is used to add the system task
-* associated with Timer thread.
-*
-* Ret: None
-*
-* Notes:
-*
-* File: mt_ss.c
-*
---*/
+ *
+ * Fun: Add Timer thread into system task table
+ *
+ * Desc: This function is used to add the system task
+ * associated with Timer thread.
+ *
+ * Ret: None
+ *
+ * Notes:
+ *
+ * File: mt_ss.c
+ *
+ --*/
static SsSTskEntry* ssdReAddTmrSTsk(
-uint8_t idx
-)
+ uint8_t idx
+ )
{
SsSTskEntry *sTsk;
S16 ret;
#if (ERRCLASS & ERRCLS_DEBUG)
MTLOGERROR(ERRCLS_DEBUG, EMT039, (ErrVal) ret,
- "Could not lock system task table");
+ "Could not lock system task table");
#endif
return (sTsk);
if ( SUnlock(&osCp.sTskTblLock) != ROK)
{
#if (ERRCLASS & ERRCLS_DEBUG)
- MTLOGERROR(ERRCLS_DEBUG, EMT042, ERRZERO,
- "Could not give the Semaphore");
- return (NULLP);
+ MTLOGERROR(ERRCLS_DEBUG, EMT042, ERRZERO,
+ "Could not give the Semaphore");
+ return (NULLP);
#endif
}
#if (ERRCLASS & ERRCLS_DEBUG)
MTLOGERROR(ERRCLS_DEBUG, EMT043, (ErrVal) ret,
- "Could not initialize demand queue");
+ "Could not initialize demand queue");
#endif
return (NULLP);
if ( SUnlock(&osCp.sTskTblLock) != ROK)
{
#if (ERRCLASS & ERRCLS_DEBUG)
- MTLOGERROR(ERRCLS_DEBUG, EMT044, ERRZERO,
- "Could not give the Semaphore");
- return (NULLP);
+ MTLOGERROR(ERRCLS_DEBUG, EMT044, ERRZERO,
+ "Could not give the Semaphore");
+ return (NULLP);
#endif
}
#if (ERRCLASS & ERRCLS_DEBUG)
MTLOGERROR(ERRCLS_DEBUG, EMT045, (ErrVal) ret,
- "Could not initialize system task entry lock");
+ "Could not initialize system task entry lock");
#endif
return (NULLP);
/* unlock the system task table */
- if ( SUnlock(&osCp.sTskTblLock) != ROK)
- {
+ if ( SUnlock(&osCp.sTskTblLock) != ROK)
+ {
#if (ERRCLASS & ERRCLS_DEBUG)
- MTLOGERROR(ERRCLS_DEBUG, EMT046, ERRZERO,
- "Could not give the Semaphore");
- return (NULLP);
+ MTLOGERROR(ERRCLS_DEBUG, EMT046, ERRZERO,
+ "Could not give the Semaphore");
+ return (NULLP);
#endif
- }
+ }
return (sTsk);
}
\f
/*
-*
-* Fun: Initialize timer table
-*
-* Desc: This function initializes MTSS-specific information
-* in the timer table.
-*
-* Ret: ROK - ok
-*
-* Notes:
-*
-* File: mt_ss.c
-*
-*/
+ *
+ * Fun: Initialize timer table
+ *
+ * Desc: This function initializes MTSS-specific information
+ * in the timer table.
+ *
+ * Ret: ROK - ok
+ *
+ * Notes:
+ *
+ * File: mt_ss.c
+ *
+ */
S16 ssdReInitTmr(void)
{
pthread_attr_t attr;
if(ret != ROK)
{
#if (ERRCLASS & ERRCLS_DEBUG)
- MTLOGERROR(ERRCLS_DEBUG, EMT046, ERRZERO,
- "Could not give the Semaphore");
+ MTLOGERROR(ERRCLS_DEBUG, EMT046, ERRZERO,
+ "Could not give the Semaphore");
#endif
- return RFAILED;
+ return RFAILED;
}
#endif
osCp.dep.tmrTqCp.tmrLen = SS_MAX_TMRS;
- /* mt010.21: addition */
+ /* mt010.21: addition */
#ifdef SS_MULTICORE_SUPPORT
sTsk = ssdReAddTmrSTsk(0);
#endif
if ((pthread_create(&osCp.dep.tmrHdlrTID, &attr, mtTmrHdlr, NULLP)) != 0)
{
- /* mt020.201 - Addition for destroying thread attribute object attr */
- pthread_attr_destroy(&attr);
+ /* mt020.201 - Addition for destroying thread attribute object attr */
+ pthread_attr_destroy(&attr);
- return RFAILED;
+ return RFAILED;
}
#ifdef SS_THR_REG_MAP
threadCreated = ssCheckAndAddMemoryRegionMap(osCp.dep.tmrHdlrTID,
- sTsk->region);
+ sTsk->region);
}
#endif /* SS_THR_REG_MAP */
#ifdef SS_MEM_WL_DEBUG
}
/**********************************************************************
- End of file
-**********************************************************************/
+ End of file
+ **********************************************************************/
{
int i;
- printf("Backtrace for thread Id (%lu) total threads = %d\n", (unsigned long) pthread_self(), osCp.numSTsks);
+ printf("\nBacktrace for thread Id (%lu) total threads = %d\n", (unsigned long) pthread_self(), osCp.numSTsks);
ysPrntBkTrace();
for(i = 0; i < osCp.numSTsks; i++)
{
Void mtSigUsr2Hndlr()
{
- printf("Backtrace for thread Id (%lu) cause:SIGUSR2(%d)\n",(unsigned long) pthread_self(),SIGUSR2);
+ printf("\nBacktrace for thread Id (%lu) cause:SIGUSR2(%d)\n",(unsigned long) pthread_self(),SIGUSR2);
pthread_mutex_lock(&dumpingLock);
ysPrntBkTrace();
if(newNextFreeIdx == 0 || newNextFreeIdx >= MAX_MEM_ALLOCATIONS)
{
- printf("Something wrong in GetNextFreeIdx newNextIdx = %ld\n",newNextFreeIdx);
+ printf("\nSomething wrong in GetNextFreeIdx newNextIdx = %ld\n",newNextFreeIdx);
}
memAllocInfo->nextFreeIdx = newNextFreeIdx;
CRASH_ENB
#endif
- printf("Freeing wrong ptr stored = %p trying to free %p freeing size (%ld)"
+ printf("\nFreeing wrong ptr stored = %p trying to free %p freeing size (%ld)"
"allocated size(%ld) from %s:%ld\n",
memAllocInfo->allocations[idx].ptr,
ptr,
memAllocInfo->allocations[idx].size,
file,
line);
- printf("Allocation was done from %s:%ld\n",memAllocInfo->allocations[idx].file, memAllocInfo->allocations[idx].lineNo);
- printf("***********************************************************\n");
+ printf("\nAllocation was done from %s:%ld\n",memAllocInfo->allocations[idx].file, memAllocInfo->allocations[idx].lineNo);
+ printf("\n***********************************************************\n");
CRASH_ENB
}
StaticMemLeakFileArr[3] == NULL)
{
int *p = 0;
- printf("Could not open files for Static Mem Leak detection logging :( crashing...\n");
+ printf("\nCould not open files for Static Mem Leak detection logging :( crashing...\n");
*p = 100;
}
#endif
/*size = tmpSize - 4;*/
{
- /*printf("ptr = %p *ptr = %p\n",ptr,*ptr);*/
+ /*printf("\nptr = %p *ptr = %p\n",ptr,*ptr);*/
#ifdef XEON_SPECIFIC_CHANGES
pthread_mutex_lock(&(memLock));
#endif
/* store the index in the memory allocated itself */
/**((uint32_t*)*((uint32_t*)allocatedPtr)) = idx;*/
*((uint32_t*)allocatedPtr) = idx;
- /*printf("region = %d idx = %d ptr = %p *ptr = %p actual = %p allocated = %p content = %d\n",region, idx, ptr, *ptr, actualPtr, allocatedPtr, *((uint32_t*)allocatedPtr));*/
+ /*printf("\nregion = %d idx = %d ptr = %p *ptr = %p actual = %p allocated = %p content = %d\n",region, idx, ptr, *ptr, actualPtr, allocatedPtr, *((uint32_t*)allocatedPtr));*/
LogForStaticMemLeak(&SMemLeakInfo[region],
file,
(Void) SPutDBuf(minfo1->region, minfo1->pool, newblk);
newblk = curblk;
}
- printf("Failed to get the buffer of size %s %d\n", __FILE__, __LINE__);
+ printf("\nFailed to get the buffer of size %s %d\n", __FILE__, __LINE__);
(Void) SPutMsg(*dstBuf);
return (ROUTRES);
}
#ifndef SS_DBUF_REFLOCK_DISABLE
if((SInitLock (&(dptr->dBufLock), SS_LOCK_MUTEX)) != 0)
{
- printf("Falied to destroy lock\n");
+ printf("\nFalied to destroy lock\n");
}
#endif
ret = SUnlock(&dptr->dBufLock) ;
if((SDestroyLock(&dptr->dBufLock)) != 0)
{
- printf("Falied to destroy lock\n");
+ printf("\nFalied to destroy lock\n");
}
#endif
/* free buffer to region */
idx -= sCnt;
/* deallocate the sBuf here */
tmp = sBuf->b_cont;
- /* printf("SMovPartMsg() sBuf is completely copied sBuf->b_cont(%p)\n", sBuf->b_cont); */
+ /* printf("\nSMovPartMsg() sBuf is completely copied sBuf->b_cont(%p)\n", sBuf->b_cont); */
(Void)SPutDBuf(sMinfo->region, sMinfo->pool, sBuf);
srcBuf->b_cont = sBuf = tmp;
}
#ifndef SS_DBUF_REFLOCK_DISABLE
if((SInitLock (&(dptr->dBufLock), SS_LOCK_MUTEX)) != 0)
{
- printf("Falied to destroy lock\n");
+ printf("\nFalied to destroy lock\n");
}
#endif
ret = SUnlock(&dptr->dBufLock) ;
if((SDestroyLock(&dptr->dBufLock)) != 0)
{
- printf("Falied to destroy lock\n");
+ printf("\nFalied to destroy lock\n");
}
#endif
#ifdef SS_HISTOGRAM_SUPPORT
#ifndef SS_DBUF_REFLOCK_DISABLE
if((SInitLock (&(dptr->dBufLock), SS_LOCK_MUTEX)) != 0)
{
- printf("Falied to destroy lock\n");
+ printf("\nFalied to destroy lock\n");
}
#endif
minfo->len = totalLen;
minfo->endptr = newblk;
- //printf("Mbuf PTR = %x, DBlk PTR = %x, PTR = %x\n", *mBuf, newblk, ptr);
+ //printf("\nMbuf PTR = %x, DBlk PTR = %x, PTR = %x\n", *mBuf, newblk, ptr);
return ROK;
}
#endif /* INTEL_WLS */
if(tmp)
{
- // printf("SResetMBuf The write & read ptr is %p %p %p %p \n", tmp->b_wptr, tmp->b_rptr, tmp->b_datap->db_base, tmp->b_datap->db_lim );
+ // printf("\nSResetMBuf The write & read ptr is %p %p %p %p \n", tmp->b_wptr, tmp->b_rptr, tmp->b_datap->db_base, tmp->b_datap->db_lim );
// tmp->b_wptr = tmp->b_rptr = tmp->b_datap->db_base;
tmp->b_wptr = tmp->b_rptr = (tmp->b_datap->db_base + 5);
tmp->b_datap->db_ref = 1;
#ifndef SS_DBUF_REFLOCK_DISABLE
if((SInitLock (&(dptr->dBufLock), SS_LOCK_MUTEX)) != 0)
{
- printf("Falied to destroy lock\n");
+ printf("\nFalied to destroy lock\n");
}
#endif
minfo->len = totalLen;
minfo->endptr = newblk;
- //printf("Mbuf PTR = %x, DBlk PTR = %x, PTR = %x\n", *mBuf, newblk, ptr);
+ //printf("\nMbuf PTR = %x, DBlk PTR = %x, PTR = %x\n", *mBuf, newblk, ptr);
return ROK;
}
SsRngInfoTbl[id].n_read = 0;
#ifndef ALIGN_64BIT
- printf("Ring Buffer Created with id =%ld rSize:%ld eSize:%ld %lx\n",id,ring->size,ring->type,(PTR)ring);
+ printf("\nRing Buffer Created with id =%ld rSize:%ld eSize:%ld %lx\n",id,ring->size,ring->type,(PTR)ring);
#else
- printf("Ring Buffer Created with id =%d rSize:%d eSize:%d %lx\n",id,ring->size,ring->type,(PTR)ring);
+ printf("\nRing Buffer Created with id =%d rSize:%d eSize:%d %lx\n",id,ring->size,ring->type,(PTR)ring);
#endif
return ROK;
}
"Attach Request in Invalid Ring ID");
#endif
#ifndef ALIGN_64BIT
- printf("Attach Request in Invalid Ring State %ld id%ld \n",
+ printf("\nAttach Request in Invalid Ring State %ld id%ld \n",
SsRngInfoTbl[id].rngState,id);
#else
- printf("Attach Request in Invalid Ring State %d id%d \n",
+ printf("\nAttach Request in Invalid Ring State %d id%d \n",
SsRngInfoTbl[id].rngState,id);
#endif
return RFAILED;
}
else
{
- printf("Free Ring FULL id %d!!! \n",ringId);
+ printf("\nFree Ring FULL id %d!!! \n",ringId);
SsRngInfoTbl[ringId].pktDrop++;
ret1 = RFAILED;
}
--- /dev/null
+/*******************************************************************************
+################################################################################
+# Copyright (c) [2020] [HCL Technologies Ltd.] #
+# #
+# Licensed under the Apache License, Version 2.0 (the "License"); #
+# you may not use this file except in compliance with the License. #
+# You may obtain a copy of the License at #
+# #
+# http://www.apache.org/licenses/LICENSE-2.0 #
+# #
+# Unless required by applicable law or agreed to in writing, software #
+# distributed under the License is distributed on an "AS IS" BASIS, #
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. #
+# See the License for the specific language governing permissions and #
+# limitations under the License. #
+################################################################################
+*******************************************************************************/
+
+/* This file contains methods of InitConfig and Interfaces to
+ YANG modules */
+
+#include "InitConfig.hpp"
+#include<string>
+#include <string.h>
+using namespace std;
+
+
+/* Default constructor */
+InitConfig::InitConfig()
+{
+}
+
+
+/* Destructor */
+InitConfig::~InitConfig()
+{
+}
+
+/*******************************************************************
+ *
+ * @brief Initialize Configuration
+ *
+ * @details
+ *
+ * Function : init
+ *
+ * Functionality:
+ * - Initialize Configuration
+ *
+ * @params[in] Reference to S_Session
+ * @return bool
+ *
+ ******************************************************************/
+
+bool InitConfig::init(sysrepo::S_Session sess)
+{
+ O1_LOG("\nInitConfig::init started ");
+ mSess = sess;
+ getInterfaceConfig(sess);
+ return true;
+}
+
+/*******************************************************************
+ *
+ * @brief Get running Interface Configuration
+ *
+ * @details
+ *
+ * Function : getCurrInterfaceConfig
+ *
+ * Functionality:
+ * - Get running Interface Configuration
+ *
+ * @params[in] Reference of StartupConfig
+ * @return bool
+ *
+ ******************************************************************/
+
+bool InitConfig::getCurrInterfaceConfig(StartupConfig & cfg)
+{
+ //O1_LOG("\n InitConfig::getCurrInterfaceConfig entry");
+ InitConfig::InterfaceMap::iterator it;
+ for (it=mInterfaceList.begin(); it != mInterfaceList.end(); it++)
+ {
+ //O1_LOG("\n InitConfig::getCurrInterfaceConfig iterator");
+ switch (it->first)
+ {
+ case Interface::ODU :
+ if(it->second.first != "0")
+ strcpy(cfg.DU_IPV4_Addr, it->second.first.c_str());
+ else
+ strcpy(cfg.DU_IPV4_Addr, DEFAULT_DU_IPV4_ADDR);
+ //O1_LOG("\n InitConfig::getCurrInterfaceConfig cfg.DU_IPV4_Addr = \
+ %s", cfg.DU_IPV4_Addr);
+
+ if(it->second.second != 0)
+ cfg.DU_Port = (uint16_t)it->second.second;
+ else
+ cfg.DU_Port = (uint16_t) DEFAULT_DU_PORT;
+ //O1_LOG("\n InitConfig::getCurrInterfaceConfig cfg.DU_Port = %d", \
+ cfg.DU_Port);
+ break;
+
+ case Interface::OCU :
+
+ if(it->second.first != "0")
+ strcpy(cfg.CU_IPV4_Addr, it->second.first.c_str());
+ else
+ strcpy(cfg.CU_IPV4_Addr, DEFAULT_CU_IPV4_ADDR);
+
+ //O1_LOG("\n InitConfig::getCurrInterfaceConfig cfg.CU_IPV4_Addr = \
+ %s", cfg.CU_IPV4_Addr);
+
+ if(it->second.second != 0)
+ cfg.CU_Port = (uint16_t) it->second.second;
+ else
+ cfg.CU_Port = (uint16_t) DEFAULT_CU_PORT;
+
+ //O1_LOG("\n InitConfig::getCurrInterfaceConfig cfg.CU_Port = %d", \
+ cfg.CU_Port);
+ break;
+
+ case Interface::RIC :
+
+ if(it->second.first != "0")
+ strcpy(cfg.RIC_IPV4_Addr, it->second.first.c_str());
+ else
+ strcpy(cfg.RIC_IPV4_Addr, DEFAULT_RIC_IPV4_ADDR);
+
+ //O1_LOG("\n InitConfig::getCurrInterfaceConfig cfg.RIC_IPV4_Addr = \
+ %s", cfg.RIC_IPV4_Addr);
+
+ if(it->second.second != 0)
+ cfg.RIC_Port = (uint16_t) it->second.second;
+ else
+ cfg.RIC_Port = (uint16_t) DEFAULT_RIC_PORT;
+
+ //O1_LOG("\n InitConfig::getCurrInterfaceConfig cfg.RIC_Port = %d", \
+ cfg.RIC_Port);
+ break;
+
+ default :
+ O1_LOG("\nno matching interface");
+ break;
+ }
+ }
+ return true;
+}
+
+/*******************************************************************
+ *
+ * @brief Get Interface Configuration
+ *
+ * @details
+ *
+ * Function : getInterfaceConfig
+ *
+ * Functionality:
+ * - Get running Interface Configuration
+ *
+ * @params[in] Reference of S_Session
+ * @return reference of InterfaceMap
+ *
+ ******************************************************************/
+InitConfig::InterfaceMap InitConfig::getInterfaceConfig(sysrepo::S_Session sess)
+{
+ O1_LOG("\nInitConfig::getInterfaceConfig started");
+ mInterfaceList.insert(std::make_pair(Interface::ODU, \
+ getInterfaceData(sess,Interface::ODU)));
+ mInterfaceList.insert(std::make_pair(Interface::OCU, \
+ getInterfaceData(sess,Interface::OCU)));
+ mInterfaceList.insert(std::make_pair(Interface::RIC, \
+ getInterfaceData(sess,Interface::RIC)));
+ return mInterfaceList;
+}
+
+/*******************************************************************
+ *
+ * @brief Get Interface Data
+ *
+ * @details
+ *
+ * Function : getInterfaceData
+ *
+ * Functionality:
+ * - Get running Interface Data
+ *
+ * @params[in] Reference of S_Session and Interface
+ * @return reference of Address
+ *
+ ******************************************************************/
+InitConfig::Address InitConfig::getInterfaceData(sysrepo::S_Session sess, \
+ Interface inf)
+{
+ O1_LOG("\nInitConfig::getInterfaceData started");
+ string sInf = interfaceToString(inf);
+ return std::make_pair(getData(sess, getInterfaceXpath(sInf, IP_ADDRESS)), \
+ atoi(getData(sess, getInterfaceXpath(sInf, PORT)).c_str()));
+}
+
+/*******************************************************************
+ *
+ * @brief create xpath for interfaces
+ *
+ * @details
+ *
+ * Function : getInterfaceXpath
+ *
+ * Functionality:
+ * - create xpath for interfaces
+ *
+ * @params[in] String of sInf and String of param
+ * @return pointer to xpath
+ *
+ ******************************************************************/
+char * InitConfig::getInterfaceXpath( string sInf, string param)
+{
+ sprintf(xpath, "%s/interfaces/interface[interface-name='%s']/%s", \
+ INTERFACE_MODULE_NAME_ORAN, sInf.c_str(),param.c_str());
+ return xpath;
+}
+
+/*******************************************************************
+ *
+ * @brief Get data of the xpath
+ *
+ * @details
+ *
+ * Function : getData
+ *
+ * Functionality:
+ * - get data of the xpath
+ *
+ * @params[in] reference of S_Session and pointer to xpath
+ * @return value against the xpath
+ *
+ ******************************************************************/
+
+string InitConfig::getData(sysrepo::S_Session sess,char* xpath)
+{
+ //O1_LOG("\nInitConfig::getData of xpath = %s", \
+ xpath); //enable for debugging only
+ try
+ {
+ auto value = sess->get_item(xpath);
+ if (value == nullptr)
+ {
+ //O1_LOG("\nget_item value are null for xpath = %s", \
+ xpath); //enable for debugging only
+ return "0";
+ }
+ string mVal = value->val_to_string();
+ return mVal;
+
+ }
+ catch (...)
+ {
+ //O1_LOG("\nInitConfig::getData exception occured for block xpath= %s", \
+ xpath); //enable for debugging only
+ return "0";
+ }
+}
+
+/*******************************************************************
+ *
+ * @brief Convert interface value to string
+ *
+ * @details
+ *
+ * Function : interfaceToString
+ *
+ * Functionality:
+ * - Convert interface value to string
+ *
+ * @params[in] reference to Interface
+ * @return string value of Interface
+ *
+ ******************************************************************/
+string InitConfig::interfaceToString(Interface inf)
+{
+ string interface;
+ switch (inf)
+ {
+ case Interface::ODU :
+ interface = "odu";
+ break;
+ case Interface::OCU :
+ interface = "ocu";
+ break;
+ case Interface::RIC :
+ interface = "ric";
+ break;
+ default :
+ O1_LOG("\n\n no matching interface ");
+ break;
+ }
+ return interface;
+
+}
+
+
+/*******************************************************************
+ *
+ * @brief Print Interface configuration
+ *
+ * @details
+ *
+ * Function : printInterfaceConfig
+ *
+ * Functionality:
+ * - Print Interface configuration
+ *
+ * @params[in] void
+ * @return bool
+ *
+ ******************************************************************/
+bool InitConfig::printInterfaceConfig()
+{
+ InitConfig::InterfaceMap::iterator it;
+ for (it=mInterfaceList.begin(); it != mInterfaceList.end(); it++)
+ {
+ O1_LOG("\ninterface [%s] : \n \t IP = %s \n \t Port = %d", \
+ interfaceToString(it->first).c_str(), it->second.first.c_str(), \
+ it->second.second);
+ }
+ return true;
+}
+
+/**********************************************************************
+ End of file
+**********************************************************************/
--- /dev/null
+/*******************************************************************************
+################################################################################
+# Copyright (c) [2020] [HCL Technologies Ltd.] #
+# #
+# Licensed under the Apache License, Version 2.0 (the "License"); #
+# you may not use this file except in compliance with the License. #
+# You may obtain a copy of the License at #
+# #
+# http://www.apache.org/licenses/LICENSE-2.0 #
+# #
+# Unless required by applicable law or agreed to in writing, software #
+# distributed under the License is distributed on an "AS IS" BASIS, #
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. #
+# See the License for the specific language governing permissions and #
+# limitations under the License. #
+################################################################################
+*******************************************************************************/
+
+/* This file contains InitConfig class header*/
+
+#ifndef __INIT_CONFIG_HPP__
+#define __INIT_CONFIG_HPP__
+
+#include <utility>
+#include <string>
+#include <iostream>
+#include "sysrepo-cpp/Session.hpp"
+#include <map>
+#include "Singleton.hpp"
+#include "Config.h"
+
+#include "GlobalDefs.hpp"
+#define IP_ADDRESS "interface-address"
+#define PORT "port"
+#define INTERFACE_MODULE_NAME_ORAN "/o-ran-sc-odu-interface-v1:odu"
+#define MAX_XPATH 100
+#define NETCONF_STARTUP_CFG "/etc/netconf_startup.cfg"
+
+#define DEFAULT_DU_IPV4_ADDR "192.168.130.81"
+#define DEFAULT_DU_PORT 38472
+
+#define DEFAULT_CU_IPV4_ADDR "192.168.130.82"
+#define DEFAULT_CU_PORT 38472
+
+#define DEFAULT_RIC_IPV4_ADDR "192.168.130.80"
+#define DEFAULT_RIC_PORT 36422
+
+enum class Interface
+{ ODU,
+ OCU,
+ RIC
+};
+
+
+class InitConfig : public Singleton<InitConfig>
+{
+
+ friend Singleton<InitConfig>;
+
+ public:
+
+ //member variable
+ typedef std::pair<std::string, uint16_t> Address;
+ typedef std::map<Interface, Address> InterfaceMap;
+
+ InitConfig();
+ ~InitConfig();
+ bool init(sysrepo::S_Session sess);
+ bool getCurrInterfaceConfig(StartupConfig & cfg);
+
+ private:
+
+ InterfaceMap mInterfaceList;
+ char xpath[MAX_XPATH];
+ sysrepo::S_Session mSess;
+ //string mVal;
+ /* function to get the data of Interfaces param*/
+ InterfaceMap getInterfaceConfig(sysrepo::S_Session sess);
+ Address getInterfaceData(sysrepo::S_Session sess, Interface inf);
+ char * getInterfaceXpath( std::string sInf, std::string param);
+ std::string getData(sysrepo::S_Session sess,char* xpath);
+ std::string interfaceToString(Interface inf);
+ bool printInterfaceConfig();
+ bool writeInterfaceConfig();
+
+};
+
+#endif
+
+/**********************************************************************
+ End of file
+**********************************************************************/
/* This file contains methods of Session/Connection creation and Subscription to
YANG modules */
+#include <stdio.h>
+#include <stdlib.h>
+#include "sysrepo.h"
#include "SessionHandler.hpp"
+#include "InitConfig.hpp"
+#include <iostream>
-
+using namespace std;
/* Default constructor */
SessionHandler::SessionHandler()
{
{
try
{
+ O1_LOG("\nO1 SessionHandler : Initialization done");
mConn = createConnection();
+ O1_LOG("\nO1 SessionHandler : Initialization done");
mSess = createSession(mConn);
mSub = createSubscribe(mSess);
O1_LOG("\nO1 SessionHandler : Initialization done");
+ //InitConfig initConf;
+ InitConfig::instance().init(mSess);
return true;
}
catch( const std::exception& e )
#include "TcpServer.hpp"
#include "Alarm.hpp"
#include "AlarmManager.hpp"
+#include "Config.h"
#include "GlobalDefs.hpp"
#include <iostream>
#include <cstdio>
#include <netinet/in.h>
#include <netdb.h>
#include <arpa/inet.h>
+#include "InitConfig.hpp"
using std::map;
using std::pair;
}
-/**********************************************************************
- Description : Read the data from the connected client application
- Params[In] : fd - File descriptor
- Return : int - No of bytes read
-**********************************************************************/
+/*******************************************************************
+ *
+ * @brief Read the data from the connected client application
+ *
+ * @details
+ *
+ * Function : readMessage
+ *
+ * Functionality:
+ * - Reads the data from the connected client application
+ *
+ * @params[in] File descriptor
+ * @return No. of bytes read
+ *
+ ******************************************************************/
int TcpServer::readMessage(int fd)
{
- AlarmRecord alrmRec;
- bzero(&alrmRec,sizeof(alrmRec));
- int nbytes = read (fd, &alrmRec, sizeof(alrmRec));
+ AlarmRecord *alrmRec = NULL;
+ char recvBuf[BUFLEN];
+ Alarm alrm;
+ bzero(&recvBuf,sizeof(recvBuf));
+
+ int nbytes = read (fd, &recvBuf, sizeof(recvBuf));
+
if (nbytes > 0)
{
- Alarm alrm;
- uint16_t alrmId;
- O1_LOG("\nO1 TcpServer :\nAction %d\nalarm ID %s\n%d\n%s\n%d\n%s\n%s\nbytes %d",
- alrmRec.msgHeader.action,
- alrmRec.alarmId,
- alrmRec.perceivedSeverity,
- alrmRec.additionalText,
- alrmRec.eventType,
- alrmRec.specificProblem,
- alrmRec.additionalInfo,
+ MsgHeader *msgHdr = (MsgHeader*)recvBuf;
+
+ O1_LOG("\nO1 TcpServer :\nBuf size %ld", sizeof(recvBuf));
+ O1_LOG("\nO1 TcpServer :\nMsgType %d",msgHdr->msgType);
+ O1_LOG("\nO1 TcpServer :\nAction %d",msgHdr->action);
+
+ if ( msgHdr->msgType == ALARM ){
+ uint16_t alrmId;
+ alrmRec = (AlarmRecord*) recvBuf;
+ O1_LOG("\nO1 TcpServer :\nAction %d\nalarm ID %s\n%d\n%s\n%d\n%s\n%s\nbytes %d",
+ alrmRec->msgHeader.action,
+ alrmRec->alarmId,
+ alrmRec->perceivedSeverity,
+ alrmRec->additionalText,
+ alrmRec->eventType,
+ alrmRec->specificProblem,
+ alrmRec->additionalInfo,
nbytes
);
- /*Fill the alarm structure */
- sscanf(alrmRec.alarmId,"%hu",&alrmId);
- alrm.setAlarmId(alrmId);
- alrm.setPerceivedSeverity(alrmRec.perceivedSeverity);
- alrm.setAdditionalText(alrmRec.additionalText);
- alrm.setEventType(alrmRec.eventType);
- alrm.setSpecificProblem(alrmRec.specificProblem);
- alrm.setAdditionalInfo(alrmRec.additionalInfo);
+ /*Fill the alarm structure */
+ sscanf(alrmRec->alarmId,"%hu",&alrmId);
+ alrm.setAlarmId(alrmId);
+ alrm.setPerceivedSeverity(alrmRec->perceivedSeverity);
+ alrm.setAdditionalText(alrmRec->additionalText);
+ alrm.setEventType(alrmRec->eventType);
+ alrm.setSpecificProblem(alrmRec->specificProblem);
+ alrm.setAdditionalInfo(alrmRec->additionalInfo);
+ }
- switch(alrmRec.msgHeader.action)
+ switch(msgHdr->action)
{
- case RAISE:
+ case RAISE_ALARM:
if(AlarmManager::instance().raiseAlarm(alrm))
{
- O1_LOG("\nO1 TcpServer : Alarm raised for alarm Id %s", alrmRec.alarmId);
+ O1_LOG("\nO1 TcpServer : Alarm raised for alarm Id %s", alrmRec->alarmId);
}
else
{
- O1_LOG("\nO1 TcpServer : Error in raising alarm for alrm Id %s", alrmRec.alarmId);
+ O1_LOG("\nO1 TcpServer : Error in raising alarm for alrm Id %s", alrmRec->alarmId);
}
break;
- case CLEAR:
+ case CLEAR_ALARM:
if(AlarmManager::instance().clearAlarm(alrm))
{
- O1_LOG("\nO1 TcpServer : Alarm cleared for alarm Id %s", alrmRec.alarmId);
+ O1_LOG("\nO1 TcpServer : Alarm cleared for alarm Id %s", alrmRec->alarmId);
}
else
{
- O1_LOG("\nO1 TcpServer : Error in clearing alarm for alarm Id %s", alrmRec.alarmId);
+ O1_LOG("\nO1 TcpServer : Error in clearing alarm for alarm Id %s", alrmRec->alarmId);
}
break;
+ case GET_STARTUP_CONFIG:
+ {
+ StartupConfig cfg;
+ InitConfig::instance().getCurrInterfaceConfig(cfg);
+ O1_LOG("\nO1 TcpServer : cfg.DU_IPV4_Addr [%s]", cfg.DU_IPV4_Addr);
+ O1_LOG("\nO1 TcpServer : cfg.DU_Port [%d]", cfg.DU_Port);
+ O1_LOG("\nO1 TcpServer : cfg.CU_IPV4_Addr [%s]", cfg.CU_IPV4_Addr);
+ O1_LOG("\nO1 TcpServer : cfg.CU_Port [%d]", cfg.CU_Port);
+ O1_LOG("\nO1 TcpServer : cfg.RIC_IPV4_Addr [%s]", cfg.RIC_IPV4_Addr);
+ O1_LOG("\nO1 TcpServer : cfg.RIC_Port [%d]", cfg.RIC_Port);
+ if (write (fd, &cfg, sizeof(cfg)) < 0)
+ {
+ O1_LOG("\nO1 TcpServer : Error sending startup configuration \n");
+ }
+ break;
+ }
default:
O1_LOG("\nO1 TcpServer : No action performed");
break;
}
-/**********************************************************************
- Description : Open a TCP socket and bind on the port
- Params[In] : None
- Return : O1::SUCCESS - socket open and bind successful
- O1::FAILURE - socket open and bind failed
-**********************************************************************/
+/*******************************************************************
+ *
+ * @brief Open a TCP socket and bind on the port
+ *
+ * @details
+ *
+ * Function : makeSocket
+ *
+ * Functionality:
+ * - Opens a TCP socket and bind on the port
+ *
+ * @params[in] void
+ * @return O1:SUCCESS - success
+ * O1:FAILURE - failure
+ ******************************************************************/
int TcpServer::makeSocket()
{
struct sockaddr_in name;
}
-/**********************************************************************
- Description : Start TCP server in thread
- Params[In] : None
- Return : true - task launched in pthread successfully
- false - task failed to launch
-**********************************************************************/
+/*******************************************************************
+ *
+ * @brief Start TCP server in thread
+ *
+ * @details
+ *
+ * Function : start
+ *
+ * Functionality:
+ * - Start TCP server in thread
+ *
+ * @params[in] void
+ * @return true - success
+ * false - failure
+ ******************************************************************/
bool TcpServer::start()
{
return (pthread_create(&mThreadId, NULL, task, this) == 0);
}
-/**********************************************************************
- Description : A TCP server to handle multiple connection using
- select multiplexing
- Params[In] : None
- Return : true - task launched in pthread successfully
- false - task failed to launch
-**********************************************************************/
+/*******************************************************************
+ *
+ * @brief A TCP server to handle multiple connection
+ *
+ * @details
+ *
+ * Function : run
+ *
+ * Functionality:
+ * - A TCP server to handle multiple connection
+ * Uses select multiplexing
+ *
+ * @params[in] void
+ * @return true - success
+ * false - failure
+ ******************************************************************/
bool TcpServer::run()
{
}
-/**********************************************************************
- Description : Static function for launching a TCP server instance
- in a thread
- Params[In] : TcpServer instance
- Return : NULL
-**********************************************************************/
+/*******************************************************************
+ *
+ * @brief Static function for launching a TCP server instance
+ * in a thread
+ *
+ * @details
+ *
+ * Function : task
+ *
+ * Functionality:
+ * - Static function for launching a TCP server instance
+ * in a thread
+ *
+ * @params[in] TcpServer instance
+ * @return void
+ ******************************************************************/
void* TcpServer::task(void *args)
{
TcpServer *tcpServer = (TcpServer*)args;
}
-/**********************************************************************
- Description : Wait for the thread to complete in the parent process
- Params[In] : None
- Return : true - pthread join success
- false - pthread join failed
-**********************************************************************/
+/*******************************************************************
+ *
+ * @brief Wait for the thread to complete in the parent process
+ *
+ * @details
+ *
+ * Function : wait
+ *
+ * Functionality:
+ * - Waits for the thread to complete in the parent process
+ *
+ * @params[in] void
+ * @return true : success
+ * false : failure
+ ******************************************************************/
bool TcpServer::wait()
{
return (pthread_join(mThreadId,NULL) == 0);
#include <pthread.h>
using std::string;
+#define BUFLEN 512
class TcpServer
{
#define __ALARM_H__
#include <string.h>
+#include "CommonMessages.h"
#define ALRM_ID_SIZE 10
#define OBJ_INST_SIZE 15
#define TEXT_SIZE 50
TIME_DOMAIN_VIOLATION = 11
}EventType;
-typedef enum
-{
- CLEAR = 0,
- RAISE = 1
-}AlarmAction;
-
-typedef struct
-{
- AlarmAction action;
-}MsgHeader;
typedef struct
{
#include "TcpClient.h"
-/**********************************************************************
- Description : Raise an alarm by sending alarm info to O1 module over
- TCP socket with action set to RAISE
- Params[In] : Alarm information
- Return : ROK - success
- RFAILED - failure
-**********************************************************************/
+/*******************************************************************
+ *
+ * @brief Raise an alarm
+ *
+ * @details
+ *
+ * Function : raiseAlarm
+ *
+ * Functionality:
+ * - Raise an alarm by sending alarm info to O1 module over
+ * TCP socket with action set to RAISE
+ *
+ * @params[in] alarm information
+ * @return ROK - success
+ * RFAILED - failure
+ ******************************************************************/
uint8_t raiseAlarm(AlarmRecord* alrm)
{
if (openSocket(TCP_SERVER_IP,TCP_PORT) == RFAILED)
{
return RFAILED;
}
- alrm->msgHeader.action = RAISE;
+ alrm->msgHeader.msgType = ALARM;
+ alrm->msgHeader.action = RAISE_ALARM;
if (sendData(alrm,sizeof(AlarmRecord)) < 0 )
{
closeSocket();
return ROK;
}
-/**********************************************************************
- Description : Clears an alarm raised earlier by sending the alrm
- information to O1 module over TCP socket with action
- set to CLEAR
- Params[In] : Alarm information
- Return : ROK - success
- RFAILED - failure
-**********************************************************************/
+/*******************************************************************
+ *
+ * @brief Clear an alarm
+ *
+ * @details
+ *
+ * Function : clearAlarm
+ *
+ * Functionality:
+ * - Clears an alarm raised earlier by sending the alrm
+ * information to O1 module over TCP socket with action
+ * set to CLEAR
+ *
+ * @params[in] alarm information
+ * @return ROK - success
+ * RFAILED - failure
+ ******************************************************************/
uint8_t clearAlarm(AlarmRecord* alrm)
{
if (openSocket(TCP_SERVER_IP,TCP_PORT) == RFAILED)
{
return RFAILED;
}
- alrm->msgHeader.action = CLEAR;
+ alrm->msgHeader.msgType = ALARM;
+ alrm->msgHeader.action = CLEAR_ALARM;
if (sendData(alrm,sizeof(AlarmRecord)) < 0)
{
closeSocket();
}
-/**********************************************************************
- Description : Fill the cell specific alarm parmeters and generate
- the alarm
- Params[In] : alarm Id, cell Id
- Return : ROK - success
- RFAILED - failure
-**********************************************************************/
+/*******************************************************************
+ *
+ * @brief Raise a cell specific alarm
+ *
+ * @details
+ *
+ * Function : raiseCellAlrm
+ *
+ * Functionality:
+ * - Fills the cell specific alarm parmeters and generate
+ * the alarm
+ *
+ * @params[in] alarm Id, cell Id
+ * @return ROK - success
+ * RFAILED - failure
+ ******************************************************************/
uint8_t raiseCellAlrm(uint16_t alrmId, uint16_t cellId)
{
char buff[BUFF_SIZE];
return raiseAlarm(&alrm);
}
-/**********************************************************************
- Description : Clear the cell alarm
- Params[In] : alarm Id
- Return : ROK - success
- RFAILED - failure
-**********************************************************************/
+/*******************************************************************
+ *
+ * @brief Clear the cell alarm
+ *
+ * @details
+ *
+ * Function : clearCellAlrm
+ *
+ * Functionality:
+ * - Clears the cell specific alarm using alarm id
+ *
+ * @params[in] alarm Id
+ * @return ROK - success
+ * RFAILED - failure
+ ******************************************************************/
uint8_t clearCellAlrm(uint16_t alrmId)
{
AlarmRecord alrm;
--- /dev/null
+/*******************************************************************************
+################################################################################
+# Copyright (c) [2020] [HCL Technologies Ltd.] #
+# #
+# Licensed under the Apache License, Version 2.0 (the "License"); #
+# you may not use this file except in compliance with the License. #
+# You may obtain a copy of the License at #
+# #
+# http://www.apache.org/licenses/LICENSE-2.0 #
+# #
+# Unless required by applicable law or agreed to in writing, software #
+# distributed under the License is distributed on an "AS IS" BASIS, #
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. #
+# See the License for the specific language governing permissions and #
+# limitations under the License. #
+################################################################################
+*******************************************************************************/
+
+/* This file contains definitions of common message structures */
+
+#ifndef __COMMON_MESSAGES_H__
+#define __COMMON_MESSAGES_H__
+
+
+typedef enum
+{
+ RAISE_ALARM,
+ CLEAR_ALARM,
+ GET_STARTUP_CONFIG
+}MsgAction;
+
+typedef enum
+{
+ ALARM,
+ CONFIGURATION
+}MsgType;
+
+typedef struct
+{
+ MsgType msgType;
+ MsgAction action;
+}MsgHeader;
+
+#endif
+
+/**********************************************************************
+ End of file
+**********************************************************************/
--- /dev/null
+/*******************************************************************************
+################################################################################
+# Copyright (c) [2020] [HCL Technologies Ltd.] #
+# #
+# Licensed under the Apache License, Version 2.0 (the "License"); #
+# you may not use this file except in compliance with the License. #
+# You may obtain a copy of the License at #
+# #
+# http://www.apache.org/licenses/LICENSE-2.0 #
+# #
+# Unless required by applicable law or agreed to in writing, software #
+# distributed under the License is distributed on an "AS IS" BASIS, #
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. #
+# See the License for the specific language governing permissions and #
+# limitations under the License. #
+################################################################################
+*******************************************************************************/
+
+/* This file contains definitions of startup configuration structure */
+
+#include "Config.h"
+#include "ssi.h"
+#include "GlobalDefs.h"
+#include "TcpClient.h"
+
+StartupConfig g_cfg;
+
+/*******************************************************************
+ *
+ * @brief Get the startup config from Netconf
+ *
+ * @details
+ *
+ * Function : getStartupConfig
+ *
+ * Functionality:
+ * - Get the start up IP and port for DU,CU and RIC
+ *
+ * @params[in] pointer to StartupConfig
+ * @return ROK - success
+ * RFAILED - failure
+ ******************************************************************/
+uint8_t getStartupConfig(StartupConfig *cfg)
+{
+ O1_LOG("\nCONFIG : getStartupConfig ------ \n");
+ MsgHeader msg;
+ msg.msgType = CONFIGURATION;
+ msg.action = GET_STARTUP_CONFIG;
+ if (openSocket(TCP_SERVER_IP,TCP_PORT) == RFAILED)
+ {
+ return RFAILED;
+ }
+ if (sendData(&msg,sizeof(msg)) < 0 )
+ {
+ closeSocket();
+ return RFAILED;
+ }
+ if (receiveData(cfg, sizeof(StartupConfig)) < 0)
+ {
+ closeSocket();
+ return RFAILED;
+ }
+ O1_LOG("\nCONFIG : ip du %s\n",cfg->DU_IPV4_Addr );
+ O1_LOG("\nCONFIG : ip cu %s\n",cfg->CU_IPV4_Addr );
+ O1_LOG("\nCONFIG : ip ric %s\n",cfg->RIC_IPV4_Addr );
+ O1_LOG("\nCONFIG : port cu %hu\n",cfg->CU_Port);
+ O1_LOG("\nCONFIG : port du %hu\n",cfg->DU_Port);
+ O1_LOG("\nCONFIG : port ric %hu\n",cfg->RIC_Port);
+
+ closeSocket();
+ return ROK;
+}
+
+
+/**********************************************************************
+ End of file
+**********************************************************************/
--- /dev/null
+/*******************************************************************************
+################################################################################
+# Copyright (c) [2020] [HCL Technologies Ltd.] #
+# #
+# Licensed under the Apache License, Version 2.0 (the "License"); #
+# you may not use this file except in compliance with the License. #
+# You may obtain a copy of the License at #
+# #
+# http://www.apache.org/licenses/LICENSE-2.0 #
+# #
+# Unless required by applicable law or agreed to in writing, software #
+# distributed under the License is distributed on an "AS IS" BASIS, #
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. #
+# See the License for the specific language governing permissions and #
+# limitations under the License. #
+################################################################################
+*******************************************************************************/
+
+/* This file contains definitions of startup configuration structure */
+
+#ifndef __CONFIG_H__
+#define __CONFIG_H__
+
+#include <stdint.h>
+#include <CommonMessages.h>
+
+#define IPV4_LEN 16
+#define PORT_LEN 10
+
+typedef struct
+{
+ char DU_IPV4_Addr[IPV4_LEN];
+ char CU_IPV4_Addr[IPV4_LEN];
+ char RIC_IPV4_Addr[IPV4_LEN];
+ uint16_t CU_Port;
+ uint16_t DU_Port;
+ uint16_t RIC_Port;
+}StartupConfig;
+
+uint8_t getStartupConfig();
+
+#endif
+
+/**********************************************************************
+ End of file
+**********************************************************************/
--- /dev/null
+/*******************************************************************************
+################################################################################
+# Copyright (c) [2020] [HCL Technologies Ltd.] #
+# #
+# Licensed under the Apache License, Version 2.0 (the "License"); #
+# you may not use this file except in compliance with the License. #
+# You may obtain a copy of the License at #
+# #
+# http://www.apache.org/licenses/LICENSE-2.0 #
+# #
+# Unless required by applicable law or agreed to in writing, software #
+# distributed under the License is distributed on an "AS IS" BASIS, #
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. #
+# See the License for the specific language governing permissions and #
+# limitations under the License. #
+################################################################################
+*******************************************************************************/
+
+/* This file contains definitions of common message structures */
+
+#ifndef __MESSAGE_H__
+#define __MESSAGE_H__
+
+#include <string.h>
+
+typedef enum
+{
+ RAISE_ALARM,
+ CLEAR_ALARM,
+ GET_STARTUP_CONFIG
+}MsgAction;
+
+typedef enum
+{
+ ALARM,
+ CONFIGURATION
+}MsgType;
+
+typedef struct
+{
+ MsgType msgType;
+ MsgAction action;
+}MsgHeader;
+
+#endif
+
+/**********************************************************************
+ End of file
+**********************************************************************/
static const char* s_hostName = NULL;
-/**********************************************************************
- Description : Initilize the sockadd_in structure
- Params[In] : None
- Return : ROK - success
- RFAILED - failure
-**********************************************************************/
+/*******************************************************************
+ *
+ * @brief Initilize the sockadd_in structure
+ *
+ * @details
+ *
+ * Function : initSockaddr
+ *
+ * Functionality:
+ * - Initilizes the sockadd_in structure
+ *
+ * @params[in] void
+ * @return ROK - success
+ * RFAILED - failure
+ ******************************************************************/
static uint8_t initSockaddr()
{
}
-/**********************************************************************
- Description : Open a TCP socket
- Params[In] : hostName, port
- Return : ROK - success
- RFAILED - failure
-**********************************************************************/
+/*******************************************************************
+ *
+ * @brief Open a TCP socket
+ *
+ * @details
+ *
+ * Function : openSocket
+ *
+ * Functionality:
+ * - Opens a TCP socket
+ *
+ * @params[in] hostname, port
+ * @return ROK - success
+ * RFAILED - failure
+ ******************************************************************/
uint8_t openSocket(const char* hostName, const uint16_t port)
{
/* Create the socket. */
}
-/**********************************************************************
- Description : Send the message on TCP socket
- Params[In] : message, size of the message
- Return : Number of bytes sent
-**********************************************************************/
+/*******************************************************************
+ *
+ * @brief Send message over TCP socket
+ *
+ * @details
+ *
+ * Function : sendData
+ *
+ * Functionality:
+ * - Sends message over TCP socket
+ *
+ * @params[in] message, size of the message
+ * @return Number of bytes sent
+ *
+ ******************************************************************/
int sendData(void* data, const int size)
{
int nbytes = write (s_sock, data, size);
return nbytes;
}
-/**********************************************************************
- Description : Close the TCP socket
- Params[In] : None
- Return : ROK - success
- RFAILED - failure
-**********************************************************************/
+/*******************************************************************
+ *
+ * @brief Recieve message over TCP socket
+ *
+ * @details
+ *
+ * Function : receiveData
+ *
+ * Functionality:
+ * - Recieves message over TCP socket
+ *
+ * @params[in] message, size of the message
+ * @return Number of bytes received
+ *
+ ******************************************************************/
+int receiveData(void* data, const int size)
+{
+ int nbytes = read (s_sock, data, size);
+ if (nbytes < 0)
+ {
+ O1_LOG("\nO1 TcpClient : Error reading. %d bytes sent", nbytes);
+ }
+ return nbytes;
+}
+
+/*******************************************************************
+ *
+ * @brief Close the TCP socket
+ *
+ * @details
+ *
+ * Function : closeSocket
+ *
+ * Functionality:
+ * - Closes the TCP socket
+ *
+ * @params[in] message, size of the message
+ * @return ROK - success
+ * RFAILED - failure
+ ******************************************************************/
uint8_t closeSocket()
{
if( close(s_sock) != 0 )
uint8_t openSocket(const char*, const uint16_t);
int sendData(void*, const int);
+int receiveData(void* data, const int size);
uint8_t closeSocket();
#endif
MAC_ALLOC(fapiParamRsp, sizeof(fapi_param_resp_t));
if(!fapiParamRsp)
{
- DU_LOG("PHY STUB: Memory allocation failed");
+ DU_LOG("\nERROR --> PHY STUB: Memory allocation failed");
return RFAILED;
}
fillMsgHeader(&fapiParamRsp->header, FAPI_PARAM_RESPONSE, msgLen);
fapiParamRsp->error_code = MSG_OK;
- DU_LOG("\nPHY_STUB: Sending Param Request to Lower Mac");
+ DU_LOG("\nINFO --> PHY_STUB: Sending Param Request to Lower Mac");
procPhyMessages(fapiParamRsp->header.msg_id, sizeof(fapi_param_resp_t), (void *)fapiParamRsp);
MAC_FREE(fapiParamRsp, sizeof(fapi_param_resp_t));
#endif
MAC_ALLOC(fapiConfigRsp, sizeof(fapi_config_resp_t));
if(!fapiConfigRsp)
{
- DU_LOG("PHY STUB: Memory allocation failed");
+ DU_LOG("\nERROR --> PHY STUB: Memory allocation failed");
return RFAILED;
}
memset(fapiConfigRsp, 0, sizeof(fapi_config_resp_t));
msgLen = sizeof(fapi_config_resp_t) - sizeof(fapi_msg_t);
fillMsgHeader(&fapiConfigRsp->header, FAPI_CONFIG_RESPONSE, msgLen);
- DU_LOG("\nPHY_STUB: Sending Config Response to Lower Mac");
+ DU_LOG("\nINFO --> PHY_STUB: Sending Config Response to Lower Mac");
procPhyMessages(fapiConfigRsp->header.msg_id, \
sizeof(fapi_config_resp_t), (void *)fapiConfigRsp);
void l1HdlParamReq(uint32_t msgLen, void *msg)
{
#ifdef INTEL_FAPI
- DU_LOG("\nPHY_STUB: Received Param Request in PHY");
+ DU_LOG("\nINFO --> PHY_STUB: Received Param Request in PHY");
/* Build and send PARAM RESPONSE */
if(l1BldAndSndParamRsp(msg)!= ROK)
{
- DU_LOG("\nPHY_STUB: Failed Sending Param Response");
+ DU_LOG("\nERROR --> PHY_STUB: Failed Sending Param Response");
}
MAC_FREE(msg, sizeof(fapi_param_req_t));
#endif
p_fapi_api_queue_elem_t configReqElem = (p_fapi_api_queue_elem_t)msg;
fapi_config_req_t *configReq = (fapi_config_req_t *)(configReqElem +1);
- DU_LOG("\nPHY_STUB: Received Config Request in PHY");
+ DU_LOG("\nINFO --> PHY_STUB: Received Config Request in PHY");
/* Handling CONFIG RESPONSE */
if(l1BldAndSndConfigRsp(configReq)!= ROK)
{
- printf("\nPHY_STUB: Failed Sending config Response");
+ DU_LOG("\nERROR --> PHY_STUB: Failed Sending config Response");
}
MAC_FREE(msg, msgLen);
MAC_ALLOC(crcInd, sizeof(fapi_crc_ind_t));
if(!crcInd)
{
- printf("\nPHY_STUB: Memory allocation failed for CRC Indication Message");
+ DU_LOG("\nERROR --> PHY_STUB: Memory allocation failed for CRC Indication Message");
return RFAILED;
}
memset(crcInd, 0, sizeof(fapi_crc_ind_t));
sizeof(fapi_crc_ind_t) - sizeof(fapi_msg_t));
/* Sending RACH indication to MAC */
- DU_LOG("\nPHY STUB: Sending CRC Indication to MAC");
+ DU_LOG("\nINFO --> PHY STUB: Sending CRC Indication to MAC");
procPhyMessages(crcInd->header.msg_id, sizeof(fapi_crc_ind_t), (void *)crcInd);
MAC_FREE(crcInd, sizeof(fapi_crc_ind_t));
#endif
MAC_ALLOC(rxDataInd, sizeof(fapi_rx_data_indication_t));
if(!rxDataInd)
{
- printf("\nPHY_STUB: Memory allocation failed for Rx Data Indication");
+ DU_LOG("\nERROR --> PHY_STUB: Memory allocation failed for Rx Data Indication");
return RFAILED;
}
memset(rxDataInd, 0, sizeof(fapi_rx_data_indication_t));
MAC_ALLOC(pduInfo->pduData, pduInfo->pdu_length);
if(!pduInfo->pduData)
{
- printf("\nPHY_STUB: Memory allocation failed for Rx Data Pdu");
+ DU_LOG("\nERROR --> PHY_STUB: Memory allocation failed for Rx Data Pdu");
return RFAILED;
}
memset(pduInfo->pduData, 0, pduInfo->pdu_length);
{
case MSG_TYPE_MSG3:
{
- DU_LOG("\nPHY_STUB: Forming MSG3 PDU ");
+ DU_LOG("\nDEBUG --> PHY_STUB: Forming MSG3 PDU ");
/* For Initial RRC setup Request,
MAC subheader format is R/R/LCId (1byte)
LCId is CCCH(0)
}
case MSG_TYPE_SHORT_BSR:
{
- DU_LOG("\nPHY_STUB: Forming SHORT BSR PDU ");
+ DU_LOG("\nDEBUG --> PHY_STUB: Forming SHORT BSR PDU ");
uint8_t lcgId = 0;
uint8_t bufferSizeIdx = 6;
case MSG_TYPE_MSG5:
{
- DU_LOG("\nPHY_STUB: Forming MSG5 PDU");
+ DU_LOG("\nDEBUG --> PHY_STUB: Forming MSG5 PDU");
uint8_t msg5PduLen = 33;
/* For RRC setup complete
MAC subheader format is R/F/LCId/L (2/3 bytes)
case MSG_TYPE_SECURITY_MODE_COMPLETE:
{
- DU_LOG("\nPHY_STUB: Forming SECURITY MODE COMPLETE PDU");
+ DU_LOG("\nDEBUG --> PHY_STUB: Forming SECURITY MODE COMPLETE PDU");
uint8_t pduLen = 12;
/* For security mode complete where RRC Container is dummy
MAC subheader format is R/F/LCId/L (2/3 bytes)
case MSG_TYPE_REGISTRATION_COMPLETE:
{
- DU_LOG("\nPHY_STUB: Forming RRC REGISTRATION COMPLETE PDU");
+ DU_LOG("\nDEBUG --> PHY_STUB: Forming RRC REGISTRATION COMPLETE PDU");
uint8_t pduLen = 12;
/* For rrc reconfig complete where RRC Container is dummy
MAC subheader format is R/F/LCId/L (2/3 bytes)
}
case MSG_TYPE_RRC_RECONFIG_COMPLETE:
{
- DU_LOG("\nPHY_STUB: Forming RRC RECONFIGURATION COMPLETE PDU");
+ DU_LOG("\nDEBUG --> PHY_STUB: Forming RRC RECONFIGURATION COMPLETE PDU");
uint8_t pduLen = 14;
/* For rrc reconfig complete where RRC Container is dummy
MAC subheader format is R/F/LCId/L (2/3 bytes)
fillMsgHeader(&rxDataInd->header, FAPI_RX_DATA_INDICATION, msgLen);
/* Sending Rx data indication to MAC */
- DU_LOG("\nPHY STUB: Sending Rx data Indication to MAC");
+ DU_LOG("\nINFO --> PHY STUB: Sending Rx data Indication to MAC");
procPhyMessages(rxDataInd->header.msg_id, sizeof(fapi_rx_data_indication_t), (void *)rxDataInd);
if(pduInfo->pdu_length)
MAC_ALLOC(rachInd, sizeof(fapi_rach_indication_t));
if(!rachInd)
{
- printf("\nPHY_STUB: Memory allocation failed for Rach Indication Message");
+ DU_LOG("\nERROR --> PHY_STUB: Memory allocation failed for Rach Indication Message");
return RFAILED;
}
memset(rachInd, 0, sizeof(fapi_rach_indication_t));
sizeof(fapi_rach_indication_t) - sizeof(fapi_msg_t));
/* Sending RACH indication to MAC */
- DU_LOG("\nPHY STUB: Sending RACH Indication to MAC");
+ DU_LOG("\nINFO --> PHY STUB: Sending RACH Indication to MAC");
procPhyMessages(rachInd->header.msg_id, sizeof(fapi_rach_indication_t), (void *)rachInd);
MAC_FREE(rachInd, sizeof(fapi_rach_indication_t));
#endif
MAC_ALLOC(slotIndMsg, sizeof(fapi_slot_ind_t));
if(!slotIndMsg)
{
- DU_LOG("\nPHY_STUB: Memory allocation failed for slot Indication Message");
+ DU_LOG("\nERROR --> PHY_STUB: Memory allocation failed for slot Indication Message");
return RFAILED;
}
else
slotIndMsg->slot = slotValue;
#ifdef ODU_SLOT_IND_DEBUG_LOG
- DU_LOG("\n\nPHY_STUB: SLOT indication [%d:%d]",sfnValue,slotValue);
+ DU_LOG("\n\nDEBUG --> PHY_STUB: SLOT indication [%d:%d]",sfnValue,slotValue);
#endif
/* increment for the next TTI */
slotValue++;
}
else
{
- DU_LOG("\nPHY_STUB: Received Start Req in PHY State %d", lwrMacCb.phyState);
+ DU_LOG("\nINFO --> PHY_STUB: Received Start Req in PHY State %d", lwrMacCb.phyState);
MAC_FREE(msg, msgLen);
return RFAILED;
}
#ifdef ODU_SLOT_IND_DEBUG_LOG
if(dlTtiReq->nPdus == 0)
{
- DU_LOG("\nPHY_STUB: No PDU in DL TTI Request");
+ DU_LOG("\nDEBUG --> PHY_STUB: No PDU in DL TTI Request");
}
else
{
- DU_LOG("\nPHY STUB: DL TTI Request at sfn=%d slot=%d",dlTtiReq->sfn,dlTtiReq->slot);
+ DU_LOG("\nDEBUG --> PHY STUB: DL TTI Request at sfn=%d slot=%d",dlTtiReq->sfn,dlTtiReq->slot);
}
#endif
{
if(dlTtiReq->pdus[pduCount].pduType == 3) //SSB_PDU_TYPE
{
- DU_LOG("\nPHY_STUB: SSB PDU");
+ DU_LOG("\nINFO --> PHY_STUB: SSB PDU");
}
else if(dlTtiReq->pdus[pduCount].pduType == 0)
{
- DU_LOG("\nPHY_STUB: PDCCH PDU");
+ DU_LOG("\nINFO --> PHY_STUB: PDCCH PDU");
if(dlTtiReq->pdus[pduCount].pdu.pdcch_pdu.\
coreSetType == 1)
{
}
else if(dlTtiReq->pdus[pduCount].pduType == 1)
{
- DU_LOG("\nPHY_STUB: PDSCH PDU");
+ DU_LOG("\nINFO --> PHY_STUB: PDSCH PDU");
}
}
p_fapi_api_queue_elem_t txDataElem = (p_fapi_api_queue_elem_t)msg;
fapi_tx_data_req_t *txDataReq = (fapi_tx_data_req_t *)(txDataElem +1);
- DU_LOG("\nPHY STUB: TX DATA Request at sfn=%d slot=%d",txDataReq->sfn,txDataReq->slot);
+ DU_LOG("\nINFO --> PHY STUB: TX DATA Request at sfn=%d slot=%d",txDataReq->sfn,txDataReq->slot);
if(dlDedMsg)
{
- DU_LOG("\nPHY_STUB: TxDataPdu for DED MSG sent");
+ DU_LOG("\nINFO --> PHY_STUB: TxDataPdu for DED MSG sent");
dlDedMsg = false;
}
MAC_FREE(msg, msgLen);
case UCI_IND_PUCCH_F2F3F4:
break;
default:
- DU_LOG("\nPHY_STUB: Invalid Pdu Type %d", uciPdu->pduType);
+ DU_LOG("\nERROR --> PHY_STUB: Invalid Pdu Type %d", uciPdu->pduType);
break;
}
return ret;
MAC_ALLOC(uciInd, sizeof(fapi_uci_indication_t));
if(!uciInd)
{
- printf("\nPHY_STUB: Memory allocation failed for UCI Indication");
+ DU_LOG("\nERROR --> PHY_STUB: Memory allocation failed for UCI Indication");
return RFAILED;
}
memset(uciInd, 0, sizeof(fapi_uci_indication_t));
fillMsgHeader(&uciInd->header, FAPI_UCI_INDICATION, msgLen);
/* Sending UCI indication to MAC */
- DU_LOG("\nPHY STUB: Sending UCI Indication to MAC");
+ DU_LOG("\nINFO --> PHY STUB: Sending UCI Indication to MAC");
procPhyMessages(uciInd->header.msg_id, sizeof(fapi_uci_indication_t), (void *)uciInd);
}
MAC_FREE(uciInd, sizeof(fapi_uci_indication_t));
#ifdef ODU_SLOT_IND_DEBUG_LOG
if(numPdus == 0)
{
- DU_LOG("\nPHY STUB: No PDU received in UL TTI Req");
+ DU_LOG("\nINFO --> PHY STUB: No PDU received in UL TTI Req");
}
else
{
- DU_LOG("\nPHY STUB: Received UL TTI Request");
+ DU_LOG("\nINFO --> PHY STUB: Received UL TTI Request");
}
#endif
{
if(ulTtiReq->pdus[numPdus-1].pduType == 0)
{
- DU_LOG("\nPHY STUB: PRACH PDU");
+ DU_LOG("\nINFO --> PHY STUB: PRACH PDU");
}
if(ulTtiReq->pdus[numPdus-1].pduType == 1)
{
- DU_LOG("\nPHY STUB: PUSCH PDU");
+ DU_LOG("\nINFO --> PHY STUB: PUSCH PDU");
l1BuildAndSendRxDataInd(ulTtiReq->slot, ulTtiReq->sfn, \
ulTtiReq->pdus[numPdus-1].pdu.pusch_pdu);
}
if(ulTtiReq->pdus[numPdus-1].pduType == 2)
{
- DU_LOG("\nPHY STUB: PUCCH PDU");
+ DU_LOG("\nINFO --> PHY STUB: PUCCH PDU");
fapi_ul_tti_req_t ulTtiSlotInd;
memset(&ulTtiSlotInd, 0, sizeof(fapi_ul_tti_req_t));
ulTtiSlotInd.slot = ulTtiReq->slot;
MAC_ALLOC(stopIndMsg, sizeof(fapi_stop_ind_t));
if(!stopIndMsg)
{
- DU_LOG("\nPHY_STUB: Memory allocation failed for stop Indication Message");
+ DU_LOG("\nERROR --> PHY_STUB: Memory allocation failed for stop Indication Message");
return RFAILED;
}
else
{
fillMsgHeader(&stopIndMsg->header, FAPI_STOP_INDICATION, msgLen);
- DU_LOG("\n\nPHY_STUB: Processing Stop indication to MAC");
+ DU_LOG("\n\nINFO --> PHY_STUB: Processing Stop indication to MAC");
procPhyMessages(stopIndMsg->header.msg_id,\
sizeof(fapi_stop_ind_t), (void*)stopIndMsg);
MAC_FREE(stopIndMsg, sizeof(fapi_stop_ind_t));
if(lwrMacCb.phyState == PHY_STATE_RUNNING)
{
l1HdlSlotIndicaion(TRUE);
- DU_LOG("\nPHY_STUB: Slot Indication is stopped successfully");
+ DU_LOG("\nINFO --> PHY_STUB: Slot Indication is stopped successfully");
l1BuildAndSendStopInd();
MAC_FREE(msg, msgLen);
}
else
{
- DU_LOG("\nPHY_STUB: Received Stop Req in PHY State %d", lwrMacCb.phyState);
+ DU_LOG("\nINFO --> PHY_STUB: Received Stop Req in PHY State %d", lwrMacCb.phyState);
MAC_FREE(msg, msgLen);
return RFAILED;
}
MAC_ALLOC(rxDataInd, sizeof(fapi_rx_data_indication_t));
if(!rxDataInd)
{
- printf("\nPHY_STUB: Memory allocation failed for Rx Data Indication for msg5");
+ DU_LOG("\nERROR --> PHY_STUB: Memory allocation failed for Rx Data Indication for msg5");
return RFAILED;
}
memset(rxDataInd, 0, sizeof(fapi_rx_data_indication_t));
MAC_ALLOC(pduInfo->pduData, pduInfo->pdu_length);
if(!pduInfo->pduData)
{
- printf("\nPHY_STUB: Memory allocation failed for Rx Data Pdu");
+ DU_LOG("\nERROR --> PHY_STUB: Memory allocation failed for Rx Data Pdu");
return RFAILED;
}
fillMsgHeader(&rxDataInd->header, FAPI_RX_DATA_INDICATION, msgLen);
/* Sending Rx data indication to MAC */
- DU_LOG("\nPHY STUB: Sending Rx data Indication to MAC");
+ DU_LOG("\nINFO --> PHY STUB: Sending Rx data Indication to MAC");
procPhyMessages(rxDataInd->header.msg_id, sizeof(fapi_rx_data_indication_t), (void *)rxDataInd);
if(pduInfo->pdu_length)
{
if(ulDciReq->pdus[numPdus-1].pduType == 0)
{
- DU_LOG("\nPHY STUB: Received UL DCI Request for PDCCH PDU");
+ DU_LOG("\nINFO --> PHY STUB: Received UL DCI Request for PDCCH PDU");
//l1BuildAndSendMsg5(ulDciReq->sfn, ulDciReq->slot);
//msg5Sent = true;
}
MAC_ALLOC(rxDataInd, sizeof(fapi_rx_data_indication_t));
if(!rxDataInd)
{
- printf("\nERROR --> PHY_STUB: Memory allocation failed for Rx Data Indication");
+ DU_LOG("\nERROR --> PHY_STUB: Memory allocation failed for Rx Data Indication");
return RFAILED;
}
memset(rxDataInd, 0, sizeof(fapi_rx_data_indication_t));
MAC_ALLOC(pduInfo->pduData, pduInfo->pdu_length);
if(!pduInfo->pduData)
{
- printf("\nERROR --> PHY_STUB: Memory allocation failed for Rx Data Pdu");
+ DU_LOG("\nERROR --> PHY_STUB: Memory allocation failed for Rx Data Pdu");
return RFAILED;
}
l1HdlUlDciReq(msgLen, msg);
break;
default:
- DU_LOG("\nPHY_STUB: Invalid message type[%x] received at PHY", msgType);
+ DU_LOG("\nERROR --> PHY_STUB: Invalid message type[%x] received at PHY", msgType);
break;
#endif
}
if(sctpSend(mBuf) != ROK)
{
- DU_LOG("\nE2AP : SCTP Send for E2 failed");
+ DU_LOG("\nERROR --> E2AP : SCTP Send for E2 failed");
ODU_PUT_MSG_BUF(mBuf);
return RFAILED;
}
}
else
{
- DU_LOG("\nE2AP : ODU_ADD_POST_MSG_MULT failed");
+ DU_LOG("\nERROR --> E2AP : ODU_ADD_POST_MSG_MULT failed");
ODU_PUT_MSG_BUF(mBuf);
return RFAILED;
}
}
else
{
- DU_LOG("\nE2AP : Failed to allocate memory");
+ DU_LOG("\nERROR --> E2AP : Failed to allocate memory");
return RFAILED;
}
uint8_t elementCnt;
- DU_LOG("\nE2AP : Building E2 Setup Response\n");
+ DU_LOG("\nINFO --> E2AP : Building E2 Setup Response\n");
RIC_ALLOC(e2apMsg, sizeof(E2AP_PDU_t));
if(e2apMsg == NULLP)
{
- DU_LOG("\nE2AP : Memory allocation for E2AP-PDU failed");
+ DU_LOG("\nERROR --> E2AP : Memory allocation for E2AP-PDU failed");
return RFAILED;
}
e2apMsg->present = E2AP_PDU_PR_successfulOutcome;
RIC_ALLOC(e2apMsg->choice.successfulOutcome, sizeof(SuccessfulOutcomeE2_t));
if(e2apMsg->choice.successfulOutcome == NULLP)
{
- DU_LOG("\nE2AP : Memory allocation for E2AP-PDU failed");
+ DU_LOG("\nERROR --> E2AP : Memory allocation for E2AP-PDU failed");
RIC_FREE(e2apMsg, sizeof(E2AP_PDU_t));
return RFAILED;
}
e2SetupRsp->protocolIEs.list.size);
if(e2SetupRsp->protocolIEs.list.array == NULLP)
{
- DU_LOG("\nE2AP : Memory allocation for E2ResponseIEs failed");
+ DU_LOG("\nERROR --> E2AP : Memory allocation for E2ResponseIEs failed");
RIC_FREE(e2apMsg->choice.successfulOutcome, sizeof(SuccessfulOutcomeE2_t));
RIC_FREE(e2apMsg, sizeof(E2AP_PDU_t));
return RFAILED;
/* Check encode results */
if(encRetVal.encoded == ENCODE_FAIL)
{
- DU_LOG("\nE2AP : Could not encode E2SetupResponse structure (at %s)\n",\
+ DU_LOG("\nERROR --> E2AP : Could not encode E2SetupResponse structure (at %s)\n",\
encRetVal.failed_type ? encRetVal.failed_type->name : "unknown");
return RFAILED;
}
else
{
- DU_LOG("\nE2AP : Created APER encoded buffer for E2SetupResponse\n");
+ DU_LOG("\nDEBUG --> E2AP : Created APER encoded buffer for E2SetupResponse\n");
for(int i=0; i< encBufSize; i++)
{
- printf("%x",encBuf[i]);
+ DU_LOG("%x",encBuf[i]);
}
}
if(SendE2APMsg(RIC_APP_MEM_REG, RIC_POOL) != ROK)
{
- DU_LOG("\nE2AP : Sending E2 Setup Response failed");
+ DU_LOG("\nERROR --> E2AP : Sending E2 Setup Response failed");
return RFAILED;
}
subsDetails->ricAction_ToBeSetup_List.list.size);
if(subsDetails->ricAction_ToBeSetup_List.list.array == NULLP)
{
- DU_LOG("\nE2AP : Memory allocation for RICactionToBeSetup Items failed");
+ DU_LOG("\nERROR --> E2AP : Memory allocation for RICactionToBeSetup Items failed");
return RFAILED;
}
RIC_ALLOC(subsDetails->ricAction_ToBeSetup_List.list.array[0],\
asn_enc_rval_t encRetVal; /* Encoder return value */
ricSubsStatus = TRUE;
- DU_LOG("\nE2AP : Building RIC Subscription Request\n");
+ DU_LOG("\nINFO --> E2AP : Building RIC Subscription Request\n");
RIC_ALLOC(e2apRicMsg, sizeof(E2AP_PDU_t));
if(e2apRicMsg == NULLP)
{
- DU_LOG("\nE2AP : Memory allocation for E2AP-PDU failed");
+ DU_LOG("\nERROR --> E2AP : Memory allocation for E2AP-PDU failed");
return RFAILED;
}
RIC_ALLOC(e2apRicMsg->choice.initiatingMessage, sizeof(InitiatingMessageE2_t));
if(e2apRicMsg->choice.initiatingMessage == NULLP)
{
- DU_LOG("\nE2AP : Memory allocation for E2AP-PDU failed");
+ DU_LOG("\nERROR --> E2AP : Memory allocation for E2AP-PDU failed");
RIC_FREE(e2apRicMsg, sizeof(E2AP_PDU_t));
return RFAILED;
}
ricSubscriptionReq->protocolIEs.list.size);
if(ricSubscriptionReq->protocolIEs.list.array == NULLP)
{
- DU_LOG("\nE2AP : Memory allocation for RICSubscriptionRequestIEs failed");
+ DU_LOG("\nERROR --> E2AP : Memory allocation for RICSubscriptionRequestIEs failed");
RIC_FREE(e2apRicMsg->choice.initiatingMessage, sizeof(InitiatingMessageE2_t));
RIC_FREE(e2apRicMsg, (Size)sizeof(E2AP_PDU_t));
return RFAILED;
encBuf);
if(encRetVal.encoded == ENCODE_FAIL)
{
- DU_LOG("\nE2AP : Could not encode RicSubscriptionRequest structure (at %s)\n",\
+ DU_LOG("\nERROR --> E2AP : Could not encode RicSubscriptionRequest structure (at %s)\n",\
encRetVal.failed_type ? encRetVal.failed_type->name : "unknown");
return RFAILED;
}
else
{
- DU_LOG("\nE2AP : Created APER encoded buffer for RicSubscriptionRequest\n");
+ DU_LOG("\nDEBUG --> E2AP : Created APER encoded buffer for RicSubscriptionRequest\n");
for(int i=0; i< encBufSize; i++)
{
- printf("%x",encBuf[i]);
+ DU_LOG("%x",encBuf[i]);
}
}
/* Sending msg */
if(SendE2APMsg(RIC_APP_MEM_REG, RIC_POOL) != ROK)
{
- DU_LOG("\nE2AP : Sending RIC subscription Request failed");
+ DU_LOG("\nERROR --> E2AP : Sending RIC subscription Request failed");
return RFAILED;
}
asn_dec_rval_t rval; /* Decoder return value */
E2AP_PDU_t e2apasnmsg ;
- DU_LOG("\nE2AP : Received E2AP message buffer");
+ DU_LOG("\nINFO --> E2AP : Received E2AP message buffer");
ODU_PRINT_MSG(mBuf, 0,0);
/* Copy mBuf into char array to decode it */
if(recvBuf == NULLP)
{
- DU_LOG("\nE2AP : Memory allocation failed");
+ DU_LOG("\nERROR --> E2AP : Memory allocation failed");
return;
}
if(ODU_COPY_MSG_TO_FIX_BUF(mBuf, 0, recvBufLen, (Data *)recvBuf, ©Cnt) != ROK)
{
- DU_LOG("\nE2AP : Failed while copying %d", copyCnt);
+ DU_LOG("\nERROR --> E2AP : Failed while copying %d", copyCnt);
return;
}
- printf("\nE2AP : Received flat buffer to be decoded : ");
+ DU_LOG("\nDEBUG --> E2AP : Received flat buffer to be decoded : ");
for(i=0; i< recvBufLen; i++)
{
- printf("%x",recvBuf[i]);
+ DU_LOG("%x",recvBuf[i]);
}
/* Decoding flat buffer into E2AP messsage */
if(rval.code == RC_FAIL || rval.code == RC_WMORE)
{
- DU_LOG("\nE2AP : ASN decode failed");
+ DU_LOG("\nERROR --> E2AP : ASN decode failed");
return;
}
- printf("\n");
+ DU_LOG("\n");
xer_fprint(stdout, &asn_DEF_E2AP_PDU, e2apMsg);
switch(e2apMsg->present)
{
case InitiatingMessageE2__value_PR_E2setupRequest:
{
- DU_LOG("\nE2AP : E2 setup request received");
+ DU_LOG("\nINFO --> E2AP : E2 setup request received");
BuildAndSendE2SetupRsp();
break;
}
case InitiatingMessageE2__value_PR_RICindication:
{
- DU_LOG("\nE2AP : RIC Indication Acknowledged");
+ DU_LOG("\nINFO --> E2AP : RIC Indication Acknowledged");
break;
}
default:
{
- DU_LOG("\nE2AP : Invalid type of intiating message [%d]",e2apMsg->choice.initiatingMessage->value.present);
+ DU_LOG("\nERROR --> E2AP : Invalid type of intiating message [%d]",e2apMsg->choice.initiatingMessage->value.present);
return;
}
}/* End of switch(initiatingMessage) */
{
case SuccessfulOutcomeE2__value_PR_RICsubscriptionResponse:
{
- DU_LOG("\nE2AP : RICsubscriptionResponse Msg Acknowledged");
+ DU_LOG("\nINFO --> E2AP : RICsubscriptionResponse Msg Acknowledged");
break;
}
default:
{
- DU_LOG("\nE2AP : Invalid type of successfulOutcome message [%d]",e2apMsg->choice.successfulOutcome->value.present);
+ DU_LOG("\nERROR --> E2AP : Invalid type of successfulOutcome message [%d]",e2apMsg->choice.successfulOutcome->value.present);
return;
}
break;
}
default:
{
- DU_LOG("\nE2AP : Invalid type message type ");
+ DU_LOG("\nERROR --> E2AP : Invalid type message type ");
return;
}
#include "ric_stub_sctp.h"
#include "du_log.h"
+#ifdef O1_ENABLE
+#include "Config.h"
+#endif
+
#define RIC_ID 1
#define RIC_NAME "ORAN_OAM_RIC"
-#define DU_IP_V4_ADDR "192.168.130.81"
-#define RIC_IP_V4_ADDR "192.168.130.80"
+
#define DU_IP_V6_ADDR "0000:0000:0000:0000:0000:0000:0000:0001"
#define RIC_IP_V6_ADDR "0000:0000:0000:0000:0000:0000:0000:0011"
+
+#ifndef O1_ENABLE
+
+#define DU_IP_V4_ADDR "192.168.130.81"
+#define RIC_IP_V4_ADDR "192.168.130.80"
#define DU_PORT 36422
#define RIC_PORT 36422
+
+#endif
+
#define RRC_VER 0
#define EXT_RRC_VER 5
#define PLMN_MCC0 3
#define PLMN_MNC1 8
#define PLMN_MNC2 0
+#ifdef O1_ENABLE
+
+extern StartupConfig g_cfg;
+
+#endif
+
/*******************************************************************
*
* @brief Handles SCTP notification
{
init_log();
- DU_LOG("\nStarting RIC_STUB");
+ DU_LOG("\nINFO --> RIC : Starting RIC_STUB");
/* Read RIC configurations */
readRicCfg();
{
uint32_t ipv4_du, ipv4_ric;
- DU_LOG("\nReading RIC configurations");
+ DU_LOG("\nINFO --> RIC : Reading RIC configurations");
+#ifdef O1_ENABLE
+ if( getStartupConfig(&g_cfg) != ROK )
+ {
+ RETVALUE(RFAILED);
+ }
+ cmInetAddr((S8*)g_cfg.DU_IPV4_Addr, &ipv4_du);
+ cmInetAddr((S8*)g_cfg.RIC_IPV4_Addr, &ipv4_ric);
+
+ ricCfgParams.sctpParams.duPort = g_cfg.RIC_Port;
+ ricCfgParams.sctpParams.ricPort = g_cfg.RIC_Port;
+#else
cmInetAddr((S8*)DU_IP_V4_ADDR, &ipv4_du);
cmInetAddr((S8*)RIC_IP_V4_ADDR, &ipv4_ric);
-
+
+ ricCfgParams.sctpParams.duPort = DU_PORT;
+ ricCfgParams.sctpParams.ricPort = RIC_PORT;
+#endif
+
ricCfgParams.ricId = RIC_ID;
strcpy(ricCfgParams.ricName, RIC_NAME);
/* DU IP Address and Port*/
ricCfgParams.sctpParams.duIpAddr.ipV4Addr = ipv4_du;
ricCfgParams.sctpParams.duIpAddr.ipV6Pres = false;
- ricCfgParams.sctpParams.duPort = DU_PORT;
/* RIC IP Address and Port*/
ricCfgParams.sctpParams.ricIpAddr.ipV4Addr = ipv4_ric;
ricCfgParams.sctpParams.ricIpAddr.ipV6Pres = false;
- ricCfgParams.sctpParams.ricPort = RIC_PORT;
/*PLMN*/
ricCfgParams.plmn.mcc[0] = PLMN_MCC0;
if((ret = cmInetSocket(socket_type, &ricParams.lstnSockFd, IPPROTO_SCTP) != ROK))
{
- DU_LOG("\nSCTP : Socket[%d] coudnt open for listening", ricParams.lstnSockFd.fd);
+ DU_LOG("\nERROR --> SCTP : Socket[%d] coudnt open for listening", ricParams.lstnSockFd.fd);
}
else if((ret = cmInetSctpBindx(&ricParams.lstnSockFd, &ricParams.localAddrLst, ricParams.srcPort)) != ROK)
{
- DU_LOG("\nSCTP: Binding failed at RIC");
+ DU_LOG("\nERROR --> SCTP: Binding failed at RIC");
}
else if((ret = sctpAccept(&ricParams.lstnSockFd, &ricParams.peerAddr, &ricParams.sockFd)) != ROK)
{
- DU_LOG("\nSCTP: Unable to accept the connection at RIC");
+ DU_LOG("\nERROR --> SCTP: Unable to accept the connection at RIC");
}
else if(sctpSockPoll() != ROK)
{
- DU_LOG("\nSCTP: Polling failed to start at RIC");
+ DU_LOG("\nERROR --> SCTP: Polling failed to start at RIC");
}
return (ret);
}
ret = cmInetListen(lstnSock_Fd, 1);
if (ret != ROK)
{
- DU_LOG("\nSCTP : Listening on socket failed");
+ DU_LOG("\nERROR --> SCTP : Listening on socket failed");
cmInetClose(lstnSock_Fd);
return RFAILED;
}
- DU_LOG("\nSCTP : Connecting");
+ DU_LOG("\nINFO --> SCTP : Connecting");
while(!connUp)
{
}
else if(ret != ROK)
{
- DU_LOG("\nSCTP : Failed to accept connection");
+ DU_LOG("\nERROR --> SCTP : Failed to accept connection");
return RFAILED;
}
else
break;
}
}
- DU_LOG("\nSCTP : Connection established");
+ DU_LOG("\nINFO --> SCTP : Connection established");
return ROK;
}
switch(ntfy->header.nType)
{
case CM_INET_SCTP_ASSOC_CHANGE :
- DU_LOG("\nSCTP : Assoc change notification received");
+ DU_LOG("\nINFO --> SCTP : Assoc change notification received");
switch(ntfy->u.assocChange.state)
{
case CM_INET_SCTP_COMM_UP:
- DU_LOG("Event : COMMUNICATION UP");
+ DU_LOG("\nINFO --> Event : COMMUNICATION UP");
connUp = TRUE;
break;
case CM_INET_SCTP_COMM_LOST:
- DU_LOG("Event : COMMUNICATION LOST");
+ DU_LOG("\nINFO --> Event : COMMUNICATION LOST");
connUp = FALSE;
break;
case CM_INET_SCTP_RESTART:
- DU_LOG("Event : SCTP RESTART");
+ DU_LOG("\nINFO --> Event : SCTP RESTART");
connUp = FALSE;
break;
case CM_INET_SCTP_SHUTDOWN_COMP: /* association gracefully shutdown */
- DU_LOG("Event : SHUTDOWN COMPLETE");
+ DU_LOG("\nINFO --> Event : SHUTDOWN COMPLETE");
connUp = FALSE;
break;
case CM_INET_SCTP_CANT_STR_ASSOC:
- DU_LOG("Event : CANT START ASSOC");
+ DU_LOG("\nINFO --> Event : CANT START ASSOC");
connUp = FALSE;
break;
default:
- DU_LOG("\nInvalid event");
+ DU_LOG("\nERROR --> Invalid event");
break;
}
break;
case CM_INET_SCTP_PEER_ADDR_CHANGE :
- DU_LOG("\nSCTP : Peer Address Change notificarion received");
+ DU_LOG("\nINFO --> SCTP : Peer Address Change notificarion received");
/* Need to add handler */
break;
case CM_INET_SCTP_REMOTE_ERROR :
- DU_LOG("\nSCTP : Remote Error notification received");
+ DU_LOG("\nINFO --> SCTP : Remote Error notification received");
break;
case CM_INET_SCTP_SEND_FAILED :
- DU_LOG("\nSCTP : Send Failed notification received\n");
+ DU_LOG("\nINFO --> SCTP : Send Failed notification received\n");
break;
case CM_INET_SCTP_SHUTDOWN_EVENT : /* peer socket gracefully closed */
- DU_LOG("\nSCTP : Shutdown Event notification received\n");
+ DU_LOG("\nINFO --> SCTP : Shutdown Event notification received\n");
connUp = FALSE;
exit(0);
break;
case CM_INET_SCTP_ADAPTATION_INDICATION :
- DU_LOG("\nSCTP : Adaptation Indication received\n");
+ DU_LOG("\nINFO --> SCTP : Adaptation Indication received\n");
break;
case CM_INET_SCTP_PARTIAL_DELIVERY_EVENT:
- DU_LOG("\nSCTP : Partial Delivery Event received\n");
+ DU_LOG("\nINFO --> SCTP : Partial Delivery Event received\n");
break;
default:
- DU_LOG("\nSCTP : Invalid notification type\n");
+ DU_LOG("\nERROR --> SCTP : Invalid notification type\n");
break;
}
CM_INET_FD_ZERO(&e2PollParams.readFd);
- DU_LOG("\nSCTP : Polling started at RIC\n");
+ DU_LOG("\nINFO --> SCTP : Polling started at RIC\n");
while(1)
{
if((ret = processPolling(&e2PollParams, &ricParams.sockFd, timeoutPtr, &memInfo)) != ROK)
{
- DU_LOG("\nSCTP : Failed to RecvMsg for E2 at RIC \n");
+ DU_LOG("\nERROR --> SCTP : Failed to RecvMsg for E2 at RIC \n");
}
};
return (ret);
ret = sctpNtfyHdlr(&pollParams->ntfy);
if(ret != ROK)
{
- DU_LOG("\nSCTP : Failed to process sctp notify msg\n");
+ DU_LOG("\nERROR --> SCTP : Failed to process sctp notify msg\n");
}
}
else if(connUp & (pollParams->port == ricParams.destPort))
if(ret != ROK && ret != RWOULDBLOCK)
{
- DU_LOG("\nSCTP : Send message failed");
+ DU_LOG("\nERROR --> SCTP : Send message failed");
return RFAILED;
}