From 3330932565e15a749fd5dd5039cdea2862ca51cc Mon Sep 17 00:00:00 2001 From: sphoorthi Date: Thu, 25 Mar 2021 17:55:23 +0530 Subject: [PATCH 1/1] Deleted the rlog folder Change-Id: Ibfbb9447526455cdf042a2c1dc702fd7c0f9ac55 Signed-off-by: sphoorthi --- build/common/compile.mak | 2 +- build/common/rl.mak | 67 -- build/odu/makefile | 2 - src/5gnrmac/rg.h | 2 - src/5gnrrlc/kw.h | 7 +- src/5gnrrlc/kw.x | 4 +- src/5gnrrlc/kw_cfg_dl.c | 139 ++-- src/5gnrrlc/kw_cfg_ul.c | 59 +- src/5gnrrlc/kw_dl.h | 2 +- src/5gnrrlc/kw_dl.x | 4 +- src/5gnrrlc/kw_dl_ex_ms.c | 29 +- src/5gnrrlc/kw_env.h | 4 +- src/5gnrrlc/kw_err.h | 2 +- src/5gnrrlc/kw_id.c | 2 +- src/5gnrrlc/kw_lim.c | 2 +- src/5gnrrlc/kw_lmm.c | 71 +- src/5gnrrlc/kw_ptli.c | 4 +- src/5gnrrlc/kw_ptui.c | 11 +- src/5gnrrlc/kw_tmm_dl.c | 2 +- src/5gnrrlc/kw_tmm_ul.c | 2 +- src/5gnrrlc/kw_udx.x | 2 +- src/5gnrrlc/kw_udx_dl.c | 35 +- src/5gnrrlc/kw_udx_ptdl.c | 2 +- src/5gnrrlc/kw_udx_ptul.c | 2 +- src/5gnrrlc/kw_udx_ul.c | 25 +- src/5gnrrlc/kw_uim.c | 2 +- src/5gnrrlc/kw_ul.h | 2 +- src/5gnrrlc/kw_ul.x | 4 +- src/5gnrrlc/kw_ul_ex_ms.c | 14 +- src/5gnrrlc/kw_umm_dl.c | 2 +- src/5gnrrlc/kw_umm_ul.c | 2 +- src/5gnrrlc/kw_utl_dl.c | 2 +- src/5gnrrlc/kw_utl_ul.c | 2 +- src/5gnrsch/rg_sch.c | 2 - src/5gnrsch/rg_sch_cfg.c | 65 +- src/5gnrsch/rg_sch_cmn.c | 2 - src/5gnrsch/rg_sch_dbm.c | 2 - src/5gnrsch/rg_sch_dhm.c | 2 - src/5gnrsch/rg_sch_drx.c | 2 - src/5gnrsch/rg_sch_gom.c | 2 - src/5gnrsch/rg_sch_hdfdd.c | 2 - src/5gnrsch/rg_sch_l2m.c | 5 - src/5gnrsch/rg_sch_lmm.c | 2 - src/5gnrsch/rg_sch_mga.c | 2 - src/5gnrsch/rg_sch_pwr.c | 2 - src/5gnrsch/rg_sch_ram.c | 2 - src/5gnrsch/rg_sch_sc1.c | 2 - src/5gnrsch/rg_sch_tmr.c | 2 - src/5gnrsch/rg_sch_tom.c | 2 - src/5gnrsch/rg_sch_uhm.c | 3 +- src/5gnrsch/rg_sch_utl.c | 2 - src/cm/envopt.h | 2 +- src/cm/gen.h | 1123 +------------------------- src/cm/lkw.c | 2 +- src/cm/lkw.x | 2 +- src/rlog/rl_common.c | 70 -- src/rlog/rl_common.h | 116 --- src/rlog/rl_interface.h | 217 ----- src/rlog/rl_platform.c | 126 --- src/rlog/rl_platform.h | 46 -- src/rlog/rl_postproc.cpp | 747 ----------------- src/rlog/rl_rlog.c | 1926 -------------------------------------------- src/rlog/rl_rlog.h | 189 ----- src/rlog/rl_soc.c | 168 ---- src/rlog/rl_soc.h | 50 -- 65 files changed, 249 insertions(+), 5151 deletions(-) delete mode 100755 build/common/rl.mak delete mode 100644 src/rlog/rl_common.c delete mode 100755 src/rlog/rl_common.h delete mode 100755 src/rlog/rl_interface.h delete mode 100644 src/rlog/rl_platform.c delete mode 100755 src/rlog/rl_platform.h delete mode 100644 src/rlog/rl_postproc.cpp delete mode 100644 src/rlog/rl_rlog.c delete mode 100755 src/rlog/rl_rlog.h delete mode 100644 src/rlog/rl_soc.c delete mode 100755 src/rlog/rl_soc.h diff --git a/build/common/compile.mak b/build/common/compile.mak index 9ff5c9316..1e94aa04c 100644 --- a/build/common/compile.mak +++ b/build/common/compile.mak @@ -75,7 +75,7 @@ xCPP_OPTS+=-g -pipe -pedantic -Wall -Werror -Wno-comment -Wshadow \ -Wcast-qual -fno-strict-aliasing -fsigned-char -lstdc++ # Include path settings -I_OPTS+=-I$(SRC_DIR) -I$(ROOT_DIR)/src/cm -I$(ROOT_DIR)/src/mt -I$(ROOT_DIR)/src/rlog -I$(ROOT_DIR)/src/wls_lib +I_OPTS+=-I$(SRC_DIR) -I$(ROOT_DIR)/src/cm -I$(ROOT_DIR)/src/mt -I$(ROOT_DIR)/src/wls_lib I_OPTS+=$(PLTFRM_INCLUDES) .SUFFIXES:.c .o diff --git a/build/common/rl.mak b/build/common/rl.mak deleted file mode 100755 index b2285e008..000000000 --- a/build/common/rl.mak +++ /dev/null @@ -1,67 +0,0 @@ -################################################################################ -# Copyright (c) [2017-2019] [Radisys] # -# # -# 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. # -################################################################################ -# -include ../common/rsys_fancy.mak -COLOR=$(COLOR_GREEN) - -#-------------------------------------------------------------# -#Makefile for RL -#-------------------------------------------------------------# -MOD_FLAGS=-UUSE_RLOG_DATA_TYPES - -SRC_DIR=$(ROOT_DIR)/src/rlog -CM_DIR =$(ROOT_DIR)/src/cm - -# Product sources------------------------------------------------------- -C_SRCS=$(SRC_DIR)/rl_rlog.c $(SRC_DIR)/rl_common.c $(SRC_DIR)/rl_platform.c $(SRC_DIR)/rl_soc.c -rlPOSTPROCSRCS=$(SRC_DIR)/rl_common.c $(SRC_DIR)/rl_postproc.cpp - -# Product includes ------------------------------------------------------- -HDR_FILES=$(SRC_DIR)/rl_common.h $(SRC_DIR)/rl_rlog.h $(SRC_DIR)/rl_interface.h \ - $(SRC_DIR)/rl_platform.h -HDR_FILES+=$(wildcard $(CM_DIR)/*.) - -# Object files ------------------------------------ -C_OBJS_WO_LOG=$(patsubst $(SRC_DIR)/%.c,$(OBJ_DIR)/%.o,$(C_SRCS)) - -#-------------------------------------------------------------# -#Makefile for RL -#-------------------------------------------------------------# -rlPOSTPROCOPTS=-DSS_LINUX -DUSE_RLOG_DATA_TYPES - -lib:$(LIB_DIR)/librl.a - -include $(COM_BUILD_DIR)/compile.mak - -#-------------------------------------------------------------# -#Linker macros -#-------------------------------------------------------------# -$(LIB_DIR)/librl.a:$(C_OBJS_WO_LOG) - @echo -e "Creating Archive $(COLOR) $@ $(REVERT_COLOR)" - $(Q)$(AR) -cr $(OBJ_DIR)/librl.a $(C_OBJS) - @echo -e "$(COLOR)Building the binary logging post processor$(REVERT_COLOR)" - $(Q)g++ $(rlPOSTPROCOPTS) $(rlPOSTPROCSRCS) -o $(OBJ_DIR)/rlogapp - -#-------------------------------------------------------------# -#Clean macros -#-------------------------------------------------------------# -clean: - @echo -e "$(COLOR_RED)Clearing binary logging$(REVERT_COLOR)" - $(Q)rm -f $(LIB_DIR)/librl.a $(C_OBJS_WO_LOG) - -#********************************************************************** -# End of file -#********************************************************************** diff --git a/build/odu/makefile b/build/odu/makefile index c165fbcdd..86707979c 100644 --- a/build/odu/makefile +++ b/build/odu/makefile @@ -202,7 +202,6 @@ du: $(Q)$(MAKE) -f $(COM_BUILD_DIR)/mac.mak OBJ_DIR=$(OBJ_ROOT)/odu LIB_DIR=$(LIB_ROOT)/odu LOG_DIR=$(LOG_ROOT)/odu CC='$(CC1)' $(Q)$(MAKE) -f $(COM_BUILD_DIR)/sch.mak OBJ_DIR=$(OBJ_ROOT)/odu LIB_DIR=$(LIB_ROOT)/odu LOG_DIR=$(LOG_ROOT)/odu CC='$(CC1)' $(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)' @@ -223,7 +222,6 @@ clean_odu: $(Q)$(MAKE) -f $(COM_BUILD_DIR)/mac.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)/sch.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)/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)' diff --git a/src/5gnrmac/rg.h b/src/5gnrmac/rg.h index bf58326dd..16355d3d2 100755 --- a/src/5gnrmac/rg.h +++ b/src/5gnrmac/rg.h @@ -36,8 +36,6 @@ #ifndef __RGH__ #define __RGH__ -#include "rl_interface.h" -#include "rl_common.h" #ifdef L2_OPTMZ diff --git a/src/5gnrrlc/kw.h b/src/5gnrrlc/kw.h index f23f1deb9..58a6447b5 100755 --- a/src/5gnrrlc/kw.h +++ b/src/5gnrrlc/kw.h @@ -18,8 +18,8 @@ /********************************************************************20** - Name: LTE RLC file - + Name: NR RLC file + Type: C include file Desc: This file contain the hash definations for RLC @@ -33,11 +33,8 @@ #ifndef __KWH__ #define __KWH__ -#include "rl_interface.h" -#include "rl_common.h" #include "du_log.h" -#define RLCLAYERNAME "LTE RLC" /* Layer Name */ #define EKWxxx 1 #define EMG099 1 diff --git a/src/5gnrrlc/kw.x b/src/5gnrrlc/kw.x index 7c6f62b86..b9ef809b0 100755 --- a/src/5gnrrlc/kw.x +++ b/src/5gnrrlc/kw.x @@ -18,12 +18,12 @@ /********************************************************************20** - Name: LTE RLC file + Name: NR RLC file Type: C include file Desc: This file contains all the data structures and - prototypes for LTE RLC. + prototypes for RLC. File: kw.x diff --git a/src/5gnrrlc/kw_cfg_dl.c b/src/5gnrrlc/kw_cfg_dl.c index 8c9da76d5..14ef406b8 100755 --- a/src/5gnrrlc/kw_cfg_dl.c +++ b/src/5gnrrlc/kw_cfg_dl.c @@ -18,7 +18,7 @@ /********************************************************************20** - Name: LTE RLC - Configuration Manager file + Name: NR RLC - Configuration Manager file Type: C source file @@ -36,9 +36,6 @@ File: kw_cfg_dl.c *********************************************************************21*/ -static const char* RLOG_MODULE_NAME="CFG"; -static int RLOG_MODULE_ID=2048; -static int RLOG_FILE_ID=191; /** @file kw_cfg_dl.c @brief RLC Downlink Configuration Module @@ -321,8 +318,7 @@ static S16 rlcAddToDlL2Meas(RlcCb *gCb, RlcDlRbCb *rlcRbCb,uint8_t cellId,uint8_ static S16 rlcCfgFillDlRbCb(RlcCb *gCb,RlcDlRbCb *rbCb,RlcDlUeCb *ueCb,RlcEntCfgInfo *entCfg) { - RLOG_ARG3(L_DEBUG,DBG_RBID,entCfg->rbId, - "rlcCfgFillRbCb(ueId(%d),cellId(%d) rbType(%d))", + DU_LOG("\nDEBUG --> RLC_DL : rlcCfgFillRbCb(ueId(%d),cellId(%d) rbType(%d))", rbCb->rlcId.ueId, rbCb->rlcId.cellId, entCfg->rbType); @@ -401,8 +397,7 @@ static S16 rlcCfgFillDlRbCb(RlcCb *gCb,RlcDlRbCb *rbCb,RlcDlUeCb *ueCb,RlcEntCfg } default: { - RLOG_ARG2(L_ERROR,DBG_RBID,entCfg->rbId, - "Invalid RB Mode ueId(%d),cellId(%d)", + DU_LOG("\nERROR --> RLC_DL : Invalid RB Mode ueId(%d),cellId(%d)", rbCb->rlcId.ueId, rbCb->rlcId.cellId); return RFAILED; @@ -438,8 +433,7 @@ RlcEntCfgInfo *entCfg if (rbCb->mode != entCfg->entMode) { - RLOG_ARG4(L_ERROR,DBG_RBID,rbCb->rlcId.rbId, - "RB Mode Mismatch : exp [%d] rcv [%d] UEID:%d CELLID:%d", + DU_LOG("\nERROR --> RLC_DL : RB Mode Mismatch : exp [%d] rcv [%d] UEID:%d CELLID:%d", rbCb->mode, entCfg->entMode, rbCb->rlcId.ueId, @@ -548,8 +542,7 @@ RlcEntCfgCfmInfo *entCfm RlcDlRbCb *rlcRbCb; /* KW RB Control Block */ uint8_t reason; /* Rb Identifier */ - RLOG_ARG3(L_DEBUG,DBG_RBID,entCfg->rbId, - "rlcCfgAddRb(cellId(%d),UEID:%d cfgType(%d))", + DU_LOG("\nDEBUG --> RLC_DL : rlcCfgAddRb(cellId(%d),UEID:%d cfgType(%d))", cellId, ueId, entCfg->cfgType); @@ -559,8 +552,7 @@ RlcEntCfgCfmInfo *entCfm /* Fill entCfm structure */ RLC_CFG_FILL_CFG_CFM(entCfm, entCfg->rbId, entCfg->rbType, CKW_CFG_CFM_NOK, CKW_CFG_REAS_CELL_UNKWN); - RLOG_ARG1(L_ERROR,DBG_RBID,entCfg->rbId, - "Add DLRb,CellId is 0 for UEID:%d", + DU_LOG("\nERROR --> RLC_DL : Add DLRb,CellId is 0 for UEID:%d", ueId); return RFAILED; } @@ -581,8 +573,7 @@ RlcEntCfgCfmInfo *entCfm RLC_CFG_FILL_CFG_CFM(entCfm, entCfg->rbId, entCfg->rbType, CKW_CFG_CFM_NOK, CKW_CFG_REAS_RB_UNKWN); - RLOG_ARG3(L_ERROR,DBG_RBID,entCfg->rbId, - "Invalid RbId ,Max is [%d] CELLID:%d UEID:%d", + DU_LOG("\nERROR --> RLC_DL : Invalid RbId ,Max is [%d] CELLID:%d UEID:%d", RLC_MAX_RB_PER_CELL, cellId, ueId); @@ -605,8 +596,7 @@ RlcEntCfgCfmInfo *entCfm RLC_CFG_FILL_CFG_CFM(entCfm, entCfg->rbId, entCfg->rbType, CKW_CFG_CFM_NOK, CKW_CFG_REAS_RB_PRSNT); - RLOG_ARG2(L_WARNING, DBG_CELLID,cellId, - "RbId [%d] already exists UEID:%d", + DU_LOG("\nERROR --> RLC_DL : RbId [%d] already exists UEID:%d", entCfg->rbId, ueId); return RFAILED; @@ -621,8 +611,7 @@ RlcEntCfgCfmInfo *entCfm RLC_CFG_FILL_CFG_CFM(entCfm, entCfg->rbId, entCfg->rbType, CKW_CFG_CFM_NOK, CKW_CFG_REAS_CELL_CREAT_FAIL); - RLOG_ARG2(L_ERROR,DBG_CELLID,cellId, - "cellCb Creation failed RBID:%d UEID:%d", + DU_LOG("\nERROR --> RLC_DL : cellCb Creation failed RBID:%d UEID:%d", entCfg->rbId, ueId); return RFAILED; @@ -632,8 +621,7 @@ RlcEntCfgCfmInfo *entCfm /* Validate LChId */ if(entCfg->lCh[0].lChId <= 0) { - RLOG_ARG3(L_ERROR,DBG_LCID,entCfg->lCh[0].lChId , - "Invalid LcId CELLID:%d UEID:%d RBID:%d", + DU_LOG("\nERROR --> RLC_DL : Invalid LcId CELLID:%d UEID:%d RBID:%d", cellId, ueId, entCfg->rbId); @@ -647,8 +635,7 @@ RlcEntCfgCfmInfo *entCfm RLC_ALLOC(gCb,rlcRbCb, sizeof (RlcDlRbCb)); if (!rlcRbCb) { - RLOG_ARG2(L_FATAL,DBG_UEID,ueId, - "Memory allocation failed for rbId:%d CELLID:%d", + DU_LOG("\nERROR --> RLC_DL : Memory allocation failed for rbId:%d CELLID:%d", entCfg->rbId, ueId); /* Fill entCfm structure */ @@ -678,8 +665,7 @@ RlcEntCfgCfmInfo *entCfm /* Fill entCfm structure */ RLC_CFG_FILL_CFG_CFM(entCfm, entCfg->rbId, entCfg->rbType, CKW_CFG_CFM_NOK, CKW_CFG_REAS_RB_UNKWN); - RLOG_ARG2(L_ERROR,DBG_RBID, entCfg->rbId, - "Invalid RbId for RbType[%d] UEID:%d", + DU_LOG("\nERROR --> RLC_DL : Invalid RbId for RbType[%d] UEID:%d", entCfg->rbType, ueId); return RFAILED; @@ -702,8 +688,7 @@ RlcEntCfgCfmInfo *entCfm /* Fill entCfm structure */ RLC_CFG_FILL_CFG_CFM(entCfm, entCfg->rbId, entCfg->rbType, CKW_CFG_CFM_NOK, CKW_CFG_REAS_RB_PRSNT); - RLOG_ARG2(L_WARNING, DBG_UEID, ueId, - "CellId[%u]:rbId [%d] already exists", + DU_LOG("\nERROR --> RLC_DL : CellId[%u]:rbId [%d] already exists", cellId, entCfg->rbId); return RFAILED; @@ -717,8 +702,7 @@ RlcEntCfgCfmInfo *entCfm /* Fill entCfm structure */ RLC_CFG_FILL_CFG_CFM(entCfm, entCfg->rbId, entCfg->rbType, CKW_CFG_CFM_NOK, CKW_CFG_REAS_UE_CREAT_FAIL); - RLOG_ARG2(L_WARNING, DBG_CELLID,cellId, - "UeId [%u]:ueCb Creation Failed RBID:%d", + DU_LOG("\nERROR --> RLC_DL : UeId [%u]:ueCb Creation Failed RBID:%d", ueId, entCfg->rbId); return RFAILED; @@ -743,8 +727,7 @@ RlcEntCfgCfmInfo *entCfm /* Fill entCfm structure */ RLC_CFG_FILL_CFG_CFM(entCfm, entCfg->rbId, entCfg->rbType,CKW_CFG_CFM_NOK, CKW_CFG_REAS_RB_CREAT_FAIL); - RLOG_ARG2(L_FATAL,DBG_UEID,ueId, - "Memory allocation failed RBID:%d CELLID:%d", + DU_LOG("\nERROR --> RLC_DL : Memory allocation failed RBID:%d CELLID:%d", entCfg->rbId, cellId); return RFAILED; @@ -796,8 +779,7 @@ RlcEntCfgCfmInfo *entCfm /* Delete RB CB created */ RLC_FREE(gCb,rlcRbCb, sizeof(RlcDlRbCb)); - RLOG_ARG2(L_ERROR,DBG_RBID, entCfg->rbId, - "Filling of RbCb failed UEID:%d CELLID:%d", + DU_LOG("\nERROR --> RLC_DL : Filling of RbCb failed UEID:%d CELLID:%d", ueId, cellId); return RFAILED; @@ -865,8 +847,7 @@ RlcEntCfgCfmInfo *entCfm RlcDlUeCb *ueCb; /* Ue Control Block */ uint8_t ret; - RLOG_ARG3(L_DEBUG,DBG_UEID,ueId, - "rlcCfgReCfgRb(cellId(%d), cfgType(%d)) RBID:%d", + DU_LOG("\nDEBUG --> RLC_DL : rlcCfgReCfgRb(cellId(%d), cfgType(%d)) RBID:%d", cellId, entCfg->cfgType,entCfg->rbId); @@ -878,8 +859,7 @@ RlcEntCfgCfmInfo *entCfm /* Fill entCfm structure */ RLC_CFG_FILL_CFG_CFM(entCfm, entCfg->rbId, entCfg->rbType, CKW_CFG_CFM_NOK, CKW_CFG_REAS_RB_UNKWN); - RLOG_ARG3(L_ERROR,DBG_RBID,entCfg->rbId, - "Invalid RbId , Max is [%d] UEID:%d CELLID:%d", + DU_LOG("\nERROR --> RLC_DL : Invalid RbId , Max is [%d] UEID:%d CELLID:%d", RLC_MAX_RB_PER_CELL, ueId, cellId); @@ -892,8 +872,7 @@ RlcEntCfgCfmInfo *entCfm /* Fill entCfm structure */ RLC_CFG_FILL_CFG_CFM(entCfm, entCfg->rbId, entCfg->rbType, CKW_CFG_CFM_NOK, CKW_CFG_REAS_CELL_UNKWN); - RLOG_ARG3(L_ERROR,DBG_CELLID,cellId, - "CellCb not found ueId:%d RBID:%d CELLID:%d", + DU_LOG("\nERROR --> RLC_DL : CellCb not found ueId:%d RBID:%d CELLID:%d", ueId, entCfg->rbId, cellId); @@ -908,8 +887,7 @@ RlcEntCfgCfmInfo *entCfm /* Fill entCfm structure */ RLC_CFG_FILL_CFG_CFM(entCfm, entCfg->rbId, entCfg->rbType, CKW_CFG_CFM_NOK, CKW_CFG_REAS_RB_UNKWN); - RLOG_ARG2(L_ERROR,DBG_UEID,ueId, - "CELLID:%d RBID:%d not found", + DU_LOG("\nERROR --> RLC_DL : CELLID:%d RBID:%d not found", cellId, entCfg->rbId); return RFAILED; @@ -931,8 +909,7 @@ RlcEntCfgCfmInfo *entCfm CKW_CFG_CFM_NOK, ret); - RLOG_ARG2(L_ERROR,DBG_UEID,ueId, - "CELLID:%u RBID:%d updation failed", + DU_LOG("\nERROR --> RLC_DL : CELLID:%u RBID:%d updation failed", cellId, entCfg->rbId); memcpy(rbCb, &tRbCb, sizeof(RlcDlRbCb)); @@ -947,8 +924,7 @@ RlcEntCfgCfmInfo *entCfm /* Fill entCfm structure */ RLC_CFG_FILL_CFG_CFM(entCfm, entCfg->rbId, entCfg->rbType, CKW_CFG_CFM_NOK, CKW_CFG_REAS_RB_UNKWN); - RLOG_ARG3(L_ERROR,DBG_UEID,ueId, - "CELLID:%d Invalid RBID:%d for RbType[%d]", + DU_LOG("\nERROR --> RLC_DL : CELLID:%d Invalid RBID:%d for RbType[%d]", cellId, entCfg->rbId, entCfg->rbType); @@ -961,8 +937,7 @@ RlcEntCfgCfmInfo *entCfm /* Fill entCfm structure */ RLC_CFG_FILL_CFG_CFM(entCfm, entCfg->rbId, entCfg->rbType, CKW_CFG_CFM_NOK, CKW_CFG_REAS_UE_UNKWN); - RLOG_ARG2(L_ERROR,DBG_CELLID, cellId, - "UEID:%d UeCb not found RBID:%d", + DU_LOG("\nERROR --> RLC_DL : UEID:%d UeCb not found RBID:%d", ueId, entCfg->rbId); return (ret); @@ -976,8 +951,7 @@ RlcEntCfgCfmInfo *entCfm /* Fill entCfm structure */ RLC_CFG_FILL_CFG_CFM(entCfm, entCfg->rbId, entCfg->rbType, CKW_CFG_CFM_NOK, CKW_CFG_REAS_RB_UNKWN); - RLOG_ARG2(L_ERROR, DBG_UEID,ueId, - "CELLID:%d RBID:%d not found", + DU_LOG("\nERROR --> RLC_DL : CELLID:%d RBID:%d not found", cellId, entCfg->rbId); return (ret); @@ -995,8 +969,7 @@ RlcEntCfgCfmInfo *entCfm /* Fill entCfm structure */ RLC_CFG_FILL_CFG_CFM(entCfm, entCfg->rbId, entCfg->rbType, CKW_CFG_CFM_NOK, ret); - RLOG_ARG2(L_ERROR,DBG_UEID,ueId, - "CELLID:%d RBID:%d updation failed", + DU_LOG("\nERROR --> RLC_DL : CELLID:%d RBID:%d updation failed", cellId, entCfg->rbId); memcpy(rbCb, &tRbCb, sizeof(RlcDlRbCb)); @@ -1056,8 +1029,7 @@ RlcEntCfgCfmInfo *entCfm RlcDlCellCb *cellCb; /* UE Control Block */ RlcDlRbCb *rlcRbCb; /* KW RB Control Block */ - RLOG_ARG3(L_DEBUG,DBG_UEID,ueId, - "rlcCfgDelRb(RBID(%d), cellId(%d), cfgType(%d))", + DU_LOG("\nDEBUG --> RLC_DL : rlcCfgDelRb(RBID(%d), cellId(%d), cfgType(%d))", entCfg->rbId, cellId, entCfg->cfgType); @@ -1072,8 +1044,7 @@ RlcEntCfgCfmInfo *entCfm /* Fill entCfm structure */ RLC_CFG_FILL_CFG_CFM(entCfm, entCfg->rbId, entCfg->rbType, CKW_CFG_CFM_NOK, CKW_CFG_REAS_RB_UNKWN); - RLOG_ARG3(L_ERROR,DBG_RBID,entCfg->rbId , - "Invalid RbId, Max is [%d] UEID:%d CELLID:%d", + DU_LOG("\nERROR --> RLC_DL : Invalid RbId, Max is [%d] UEID:%d CELLID:%d", RLC_MAX_RB_PER_CELL, ueId, cellId); @@ -1086,8 +1057,7 @@ RlcEntCfgCfmInfo *entCfm /* Fill entCfm structure */ RLC_CFG_FILL_CFG_CFM(entCfm, entCfg->rbId, entCfg->rbType, CKW_CFG_CFM_NOK, CKW_CFG_REAS_RB_UNKWN); - RLOG_ARG2(L_ERROR,DBG_CELLID,cellId, - "CellCb not found UEID:%d RBID:%d", + DU_LOG("\nERROR --> RLC_DL : CellCb not found UEID:%d RBID:%d", ueId, entCfg->rbId); return (ret); @@ -1101,8 +1071,7 @@ RlcEntCfgCfmInfo *entCfm /* Fill entCfm structure */ RLC_CFG_FILL_CFG_CFM(entCfm, entCfg->rbId, entCfg->rbType, CKW_CFG_CFM_NOK, CKW_CFG_REAS_RB_UNKWN); - RLOG_ARG2(L_ERROR, DBG_UEID,ueId, - "CellId[%u]:RbId[%d] not found", + DU_LOG("\nERROR --> RLC_DL : CellId[%u]:RbId[%d] not found", cellId, entCfg->rbId); return (ret); @@ -1124,8 +1093,7 @@ RlcEntCfgCfmInfo *entCfm /* Fill entCfm structure */ RLC_CFG_FILL_CFG_CFM(entCfm, entCfg->rbId, entCfg->rbType, CKW_CFG_CFM_NOK, CKW_CFG_REAS_RB_UNKWN); - RLOG_ARG3(L_ERROR,DBG_RBID, entCfg->rbId, - "Invalid RbId for RbType[%d] UEID:%d CELLID:%d", + DU_LOG("\nERROR --> RLC_DL : Invalid RbId for RbType[%d] UEID:%d CELLID:%d", entCfg->rbType, ueId, cellId); @@ -1139,8 +1107,7 @@ RlcEntCfgCfmInfo *entCfm /* Fill entCfm structure */ RLC_CFG_FILL_CFG_CFM(entCfm, entCfg->rbId, entCfg->rbType, CKW_CFG_CFM_NOK, CKW_CFG_REAS_UE_UNKWN); - RLOG_ARG2(L_ERROR,DBG_CELLID, cellId, - "UeId [%d]: UeCb not found RBID:%d", + DU_LOG("\nERROR --> RLC_DL : UeId [%d]: UeCb not found RBID:%d", ueId, entCfg->rbId); return (ret); @@ -1154,8 +1121,7 @@ RlcEntCfgCfmInfo *entCfm /* Fill entCfm structure */ RLC_CFG_FILL_CFG_CFM(entCfm, entCfg->rbId, entCfg->rbType, CKW_CFG_CFM_NOK, CKW_CFG_REAS_RB_UNKWN); - RLOG_ARG2(L_ERROR, DBG_UEID,ueId, - "CellId[%u]:RbId[%d] not found", + DU_LOG("\nERROR --> RLC_DL : CellId[%u]:RbId[%d] not found", cellId, entCfg->rbId); return (ret); @@ -1240,8 +1206,7 @@ RlcEntCfgCfmInfo *entCfm RlcDlRbCb *rbCb; /* RB Control Block */ CmLteRlcId rlcId; /* RLC Identifier */ - RLOG_ARG3(L_DEBUG,DBG_RBID,entCfg->rbId, - "rlcCfgReEstDlRb(ueId(%d), cellId(%d), cfgType(%d))", + DU_LOG("\nDEBUG --> RLC_DL : rlcCfgReEstDlRb(ueId(%d), cellId(%d), cfgType(%d))", ueId, cellId, entCfg->cfgType); @@ -1258,8 +1223,7 @@ RlcEntCfgCfmInfo *entCfm /* Fill entCfm structure */ RLC_CFG_FILL_CFG_CFM(entCfm, entCfg->rbId, rlcId.rbType, CKW_CFG_CFM_NOK, CKW_CFG_REAS_RB_UNKWN); - RLOG_ARG2(L_ERROR, DBG_UEID,ueId, - "CellId[%u]:RbId[%d] not found", + DU_LOG("\nERROR --> RLC_DL : CellId[%u]:RbId[%d] not found", cellId, entCfg->rbId); return RFAILED; @@ -1330,8 +1294,7 @@ RlcEntCfgCfmInfo *entCfm S16 ret; /* Return Value */ RlcDlUeCb *ueCb; /* UE Control Block */ - RLOG_ARG3(L_DEBUG,DBG_RBID,entCfg->rbId, - "rlcCfgDelUe(ueId(%d), cellId(%d), cfgType(%d))", + DU_LOG("\nDEBUG --> RLC_DL : rlcCfgDelUe(ueId(%d), cellId(%d), cfgType(%d))", ueId, cellId, entCfg->cfgType); @@ -1344,8 +1307,7 @@ RlcEntCfgCfmInfo *entCfm /* Fill entCfm structure */ RLC_CFG_FILL_CFG_CFM(entCfm, entCfg->rbId, entCfg->rbType, CKW_CFG_CFM_NOK, CKW_CFG_REAS_UE_UNKWN); - RLOG_ARG2(L_ERROR,DBG_RBID,entCfg->rbId, - "ueId(%d), cellId(%d)", + DU_LOG("\nERROR --> RLC_DL : ueId(%d), cellId(%d)", ueId, cellId); return RFAILED; @@ -1358,8 +1320,7 @@ RlcEntCfgCfmInfo *entCfm /* Fill entCfm structure */ RLC_CFG_FILL_CFG_CFM(entCfm, entCfg->rbId, entCfg->rbType, CKW_CFG_CFM_NOK, CKW_CFG_REAS_UE_UNKWN); - RLOG_ARG2(L_ERROR,DBG_CELLID, cellId, - "UEID:%d UeCb not found RBID:%d", + DU_LOG("\nERROR --> RLC_DL : UEID:%d UeCb not found RBID:%d", ueId, entCfg->rbId); return RFAILED; @@ -1411,8 +1372,7 @@ RlcEntCfgCfmInfo *entCfm RlcDlCellCb *cellCb; /* UE Control Block */ uint8_t rbId; /* RB Identifier */ - RLOG_ARG2(L_DEBUG,DBG_RBID,entCfg->rbId, - "rlcCfgDelCell( cellId(%d), cfgType(%d)", + DU_LOG("\nDEBUG --> RLC_DL : rlcCfgDelCell( cellId(%d), cfgType(%d)", cellId, entCfg->cfgType); @@ -1425,8 +1385,7 @@ RlcEntCfgCfmInfo *entCfm /* Fill entCfm structure */ RLC_CFG_FILL_CFG_CFM(entCfm, rbId, entCfg->rbType, CKW_CFG_CFM_NOK, CKW_CFG_REAS_CELL_UNKWN); - RLOG_ARG1(L_DEBUG,DBG_RBID,entCfg->rbId, - "cellId is 0 (%d) ", + DU_LOG("\nERROR --> RLC_DL : cellId is 0 (%d) ", cellId); return RFAILED; } @@ -1438,8 +1397,7 @@ RlcEntCfgCfmInfo *entCfm /* Fill entCfm structure */ RLC_CFG_FILL_CFG_CFM(entCfm, rbId, entCfg->rbType, CKW_CFG_CFM_NOK, CKW_CFG_REAS_CELL_UNKWN); - RLOG_ARG1(L_ERROR, DBG_CELLID,cellId, - "CellCb not found for RBID:%d", + DU_LOG("\nERROR --> RLC_DL : CellCb not found for RBID:%d", entCfg->rbId); return RFAILED; } @@ -1485,15 +1443,14 @@ CmStatus *status ) { RlcDlUeCb *ueCb; -/*kw004.201 Adding of Missing Trace in LTE RLC PDCP*/ +/*kw004.201 Adding of Missing Trace in RLC PDCP*/ if ( (ueInfo->ueId == newUeInfo->ueId) && (ueInfo->cellId == newUeInfo->cellId)) { status->reason = CKW_CFG_REAS_SAME_UEID; status->status = CKW_CFG_CFM_NOK; - RLOG_ARG2(L_ERROR,DBG_CELLID,ueInfo->cellId, - "Old UeId[%d] same as new UeId[%d]", + DU_LOG("\nERROR --> RLC_DL : Old UeId[%d] same as new UeId[%d]", ueInfo->ueId, newUeInfo->ueId); return RFAILED; @@ -1501,8 +1458,7 @@ CmStatus *status if(ROK == rlcDbmFetchDlUeCb(gCb,newUeInfo->ueId, newUeInfo->cellId, &ueCb)) { - RLOG_ARG1(L_ERROR, DBG_CELLID, newUeInfo->cellId, - "NewUeId[%d]:ueCb already exists", + DU_LOG("\nERROR --> RLC_DL : NewUeId[%d]:ueCb already exists", newUeInfo->ueId); status->reason = CKW_CFG_REAS_UE_EXISTS; status->status = CKW_CFG_CFM_NOK; @@ -1512,8 +1468,7 @@ CmStatus *status if(ROK != rlcDbmFetchDlUeCb(gCb,ueInfo->ueId, ueInfo->cellId, &ueCb)) { - RLOG_ARG1(L_ERROR,DBG_CELLID,ueInfo->cellId, - "UeId [%d]: UeCb not found", + DU_LOG("\nERROR --> RLC_DL : UeId [%d]: UeCb not found", ueInfo->ueId); status->reason = CKW_CFG_REAS_UE_UNKWN; status->status = CKW_CFG_CFM_NOK; @@ -1525,8 +1480,7 @@ CmStatus *status #endif if(ROK != cmHashListDelete(&(gCb->u.dlCb->ueLstCp), (PTR) ueCb)) { - RLOG_ARG1(L_ERROR,DBG_CELLID,ueInfo->cellId, - "UeId[%u] HashList Deletion Failed", + DU_LOG("\nERROR --> RLC_DL : UeId[%u] HashList Deletion Failed", ueInfo->ueId); status->reason = CKW_CFG_REAS_UE_CREAT_FAIL; status->status = CKW_CFG_CFM_NOK; @@ -1542,8 +1496,7 @@ CmStatus *status (uint16_t) sizeof(CmLteRnti))) { - RLOG_ARG1(L_ERROR,DBG_CELLID,newUeInfo->cellId, - "UeId[%u] HashList Insertion Failed", + DU_LOG("\nERROR --> RLC_DL : UeId[%u] HashList Insertion Failed", newUeInfo->ueId); status->reason = CKW_CFG_REAS_UE_CREAT_FAIL; status->status = CKW_CFG_CFM_NOK; diff --git a/src/5gnrrlc/kw_cfg_ul.c b/src/5gnrrlc/kw_cfg_ul.c index f7a0f2e38..7f919cd38 100755 --- a/src/5gnrrlc/kw_cfg_ul.c +++ b/src/5gnrrlc/kw_cfg_ul.c @@ -18,7 +18,7 @@ /********************************************************************20** - Name: LTE RLC - Configuration Manager file + Name: NR RLC - Configuration Manager file Type: C source file @@ -31,9 +31,6 @@ File: kw_cfg_ul.c *********************************************************************21*/ -static const char* RLOG_MODULE_NAME="CFG"; -static int RLOG_MODULE_ID=2048; -static int RLOG_FILE_ID=192; /** @file kw_cfg_ul.c @brief RLC Uplink Configuration Module **/ @@ -309,8 +306,7 @@ static S16 rlcAddToUlL2Meas(RlcCb *gCb, RlcUlRbCb *rlcRbCb,uint8_t cellId,uint8_ static S16 rlcCfgFillUlRbCb(RlcCb *gCb,RlcUlRbCb *rbCb,RlcUlUeCb *ueCb,RlcEntCfgInfo *entCfg) { - RLOG_ARG3(L_DEBUG,DBG_UEID,rbCb->rlcId.ueId, - "rlcCfgFillRbCb(cellId(%d), rbId(%d), rbType(%d))", + DU_LOG("\nDEBUG --> RLC_UL : rlcCfgFillRbCb(cellId(%d), rbId(%d), rbType(%d))", rbCb->rlcId.cellId, entCfg->rbId, entCfg->rbType); @@ -376,8 +372,7 @@ static S16 rlcCfgFillUlRbCb(RlcCb *gCb,RlcUlRbCb *rbCb,RlcUlUeCb *ueCb,RlcEntCfg } default: { - RLOG_ARG2(L_ERROR,DBG_UEID,rbCb->rlcId.ueId, - "INVALID RB Mode cellId(%d), rbId(%d)", + DU_LOG("\nERROR --> RLC_UL : INVALID RB Mode cellId(%d), rbId(%d)", rbCb->rlcId.cellId, entCfg->rbId); return RFAILED; @@ -486,8 +481,7 @@ S16 rlcValidateRbCfgParams(RlcCb *gCb,CmLteRnti ueId,CmLteCellId cellId,RlcEntCf (cfgToValidate->m.umInfo.ul.snLen != RLC_UM_CFG_6BIT_SN_LEN) && (cfgToValidate->m.umInfo.ul.snLen != RLC_UM_CFG_12BIT_SN_LEN)) { - RLOG_ARG2(L_ERROR,DBG_UEID,ueId, - "CellId[%u]:UM Mode RB[%d],Invalid SN Len[%d]", + DU_LOG("\nERROR --> RLC_UL : UM Mode RB[%d],Invalid SN Len[%d]", cfgToValidate->rbId, cfgToValidate->m.umInfo.ul.snLen); status->reason = CKW_CFG_REAS_INVALID_SNLEN; @@ -579,8 +573,7 @@ RlcUlCfgTmpData *cfgTmpData ) { - RLOG_ARG2(L_DEBUG,DBG_UEID,cfgTmpData->ueId, - "cellId(%d), cfgType(%d)", + DU_LOG("\nDEBUG --> RLC_UL : cellId(%d), cfgType(%d)", cfgTmpData->cellId, cfgToValidate->cfgType); @@ -609,8 +602,7 @@ RlcUlCfgTmpData *cfgTmpData RLC_ALLOC(gCb,cfgTmpData->cellCb, sizeof(RlcUlCellCb)); if(!cfgTmpData->cellCb) { - RLOG_ARG1(L_FATAL,DBG_UEID,cfgTmpData->ueId, - "Memory allocation failure CELLID:%d", + DU_LOG("\nERROR --> RLC_UL : Memory allocation failure CELLID:%d", cfgTmpData->cellId); cfgEntData->entUlCfgCfm.status.reason = CKW_CFG_REAS_CELL_CREAT_FAIL; return RFAILED; @@ -643,8 +635,7 @@ RlcUlCfgTmpData *cfgTmpData RLC_ALLOC(gCb,cfgTmpData->ueCb, sizeof(RlcUlUeCb)); if(!cfgTmpData->ueCb) { - RLOG_ARG1(L_FATAL,DBG_UEID,cfgTmpData->ueId, - "Memory allocation failure CELLID:%d", + DU_LOG("\nERROR --> RLC_UL : Memory allocation failure CELLID:%d", cfgTmpData->cellId); cfgEntData->entUlCfgCfm.status.reason = CKW_CFG_REAS_UE_CREAT_FAIL; return RFAILED; @@ -712,8 +703,7 @@ RlcUlCfgTmpData *cfgTmpData rlcDbmFetchUlCellCb(gCb,cfgTmpData->cellId, &cfgTmpData->cellCb); if(!cfgTmpData->cellCb) { - RLOG_ARG1(L_ERROR, DBG_CELLID,cfgTmpData->cellId, - "CellCb not found UEID:%d", + DU_LOG("\nERROR --> RLC_UL : CellCb not found UEID:%d", cfgTmpData->ueId); /*how can a modify request come for a cell which does not exist*/ cfgEntData->entUlCfgCfm.status.reason = CKW_CFG_REAS_CELL_UNKWN; @@ -734,8 +724,7 @@ RlcUlCfgTmpData *cfgTmpData rlcDbmFetchUlUeCb(gCb,cfgTmpData->ueId, cfgTmpData->cellId, &cfgTmpData->ueCb); if(!cfgTmpData->ueCb) { - RLOG_ARG1(L_ERROR,DBG_CELLID, cfgTmpData->cellId, - "UeId [%d]: UeCb not found", + DU_LOG("\nERROR --> RLC_UL : UeId [%d]: UeCb not found", cfgTmpData->ueId); cfgEntData->entUlCfgCfm.status.reason = CKW_CFG_REAS_UE_UNKWN; return RFAILED; @@ -971,16 +960,14 @@ RlcUlCfgTmpData *cfgTmpData ) { - RLOG_ARG2(L_DEBUG,DBG_UEID,cfgTmpData->ueId, - "cellId(%d), cfgType(%d)", + DU_LOG("\nDEBUG --> RLC_UL : cellId(%d), cfgType(%d)", cfgTmpData->cellId,cfgToValidate->cfgType); /* Check for ueId is present or not */ if ( cfgTmpData->ueId == 0 ) { cfgEntData->entUlCfgCfm.status.reason = CKW_CFG_REAS_UE_UNKWN; - RLOG_ARG1(L_ERROR,DBG_UEID,cfgTmpData->ueId, - "UeId is 0 for CELLID;%d", + DU_LOG("\nERROR --> RLC_UL : UeId is 0 for CELLID;%d", cfgTmpData->cellId); return RFAILED; } @@ -988,8 +975,7 @@ RlcUlCfgTmpData *cfgTmpData /* Fetch Ue Cb */ if(ROK != rlcDbmFetchUlUeCb(gCb,cfgTmpData->ueId, cfgTmpData->cellId, &cfgTmpData->ueCb)) { - RLOG_ARG1(L_ERROR,DBG_CELLID, cfgTmpData->cellId, - "UeId [%d]: UeCb not found", + DU_LOG("\nERROR --> RLC_UL : UeId [%d]: UeCb not found", cfgTmpData->ueId); cfgEntData->entUlCfgCfm.status.reason = CKW_CFG_REAS_UE_UNKWN; return RFAILED; @@ -1048,7 +1034,7 @@ RlcUlCfgTmpData *cfgTmpData ) { - RLOG_ARG1(L_DEBUG,DBG_CELLID,cellId ,"cfgType(%d)", + DU_LOG("\nDEBUG --> RLC_UL : cfgType(%d)", cfgToValidate->cfgType); cfgTmpData->cellCb = NULLP; @@ -1057,7 +1043,7 @@ RlcUlCfgTmpData *cfgTmpData if ( cellId == 0 ) { cfgEntData->entUlCfgCfm.status.reason = CKW_CFG_REAS_CELL_UNKWN; - RLOG_ARG0(L_ERROR,DBG_CELLID,cellId , "CellId is 0"); + DU_LOG("\nERROR --> RLC_UL : CellId is 0"); return RFAILED; } @@ -1066,7 +1052,7 @@ RlcUlCfgTmpData *cfgTmpData if (!cfgTmpData->cellCb) { cfgEntData->entUlCfgCfm.status.reason = CKW_CFG_REAS_CELL_UNKWN; - RLOG_ARG0(L_ERROR, DBG_CELLID,cellId, "CellCb not found"); + DU_LOG("\nERROR --> RLC_UL : CellCb not found"); return RFAILED; } return ROK; @@ -1115,8 +1101,7 @@ RlcUlEntTmpData *cfgEntData { CmLteRlcId rlcId; /* RLC Identifier */ - RLOG_ARG2(L_DEBUG, DBG_UEID,ueId, - "cellId(%d) RBID:%d", + DU_LOG("\nDEBUG --> RLC_UL : cellId(%d) RBID:%d", cellId, cfgToValidate->rbId); @@ -1129,8 +1114,7 @@ RlcUlEntTmpData *cfgEntData rlcDbmFetchUlRbCbByRbId(gCb,&rlcId, &cfgEntData->rbCb); if (cfgEntData->rbCb == NULLP) { - RLOG_ARG2(L_WARNING, DBG_UEID,ueId, - "CellId [%u]: rbId [%d] not found", + DU_LOG("\nERROR --> RLC_UL : CellId [%u]: rbId [%d] not found", cellId, cfgToValidate->rbId); cfgEntData->entUlCfgCfm.status.reason = CKW_CFG_REAS_RB_UNKWN; @@ -1228,8 +1212,7 @@ RlcUlCfgTmpData *cfgTmpData if(ROK == rlcDbmFetchUlUeCb(gCb,newUeInfo->ueId, newUeInfo->cellId, &ueCb)) { - RLOG_ARG1(L_ERROR, DBG_CELLID, newUeInfo->cellId, - "NewUeId[%d]:ueCb already exists", + DU_LOG("\nERROR --> RLC_UL : NewUeId[%d]:ueCb already exists", newUeInfo->ueId); CFM_STATUS.reason = CKW_CFG_REAS_UE_EXISTS; CFM_STATUS.status = CKW_CFG_CFM_NOK; @@ -1239,8 +1222,7 @@ RlcUlCfgTmpData *cfgTmpData if(ROK != rlcDbmFetchUlUeCb(gCb,ueInfo->ueId, ueInfo->cellId, &cfgTmpData->ueCb)) { - RLOG_ARG1(L_ERROR,DBG_CELLID, ueInfo->cellId, - "UeId [%d]: UeCb not found", + DU_LOG("\nERROR --> RLC_UL : UeId [%d]: UeCb not found", ueInfo->ueId); CFM_STATUS.reason = CKW_CFG_REAS_UE_UNKWN; CFM_STATUS.status = CKW_CFG_CFM_NOK; @@ -1286,8 +1268,7 @@ RlcUlCfgTmpData *cfgTmpData (uint16_t) sizeof(CmLteRnti))) { - RLOG_ARG1(L_ERROR,DBG_CELLID,newUeInfo->cellId, - "UeId[%u] HashList Insertion Failed", + DU_LOG("\nERROR --> RLC_UL : UeId[%u] HashList Insertion Failed", newUeInfo->ueId); } diff --git a/src/5gnrrlc/kw_dl.h b/src/5gnrrlc/kw_dl.h index 45fcc2fc8..6fe855078 100755 --- a/src/5gnrrlc/kw_dl.h +++ b/src/5gnrrlc/kw_dl.h @@ -18,7 +18,7 @@ /********************************************************************20** - Name: LTE RLC file for downlink and non real time tasks + Name: NR RLC file for downlink and non real time tasks Type: C include file diff --git a/src/5gnrrlc/kw_dl.x b/src/5gnrrlc/kw_dl.x index 239f76884..e686fae2b 100755 --- a/src/5gnrrlc/kw_dl.x +++ b/src/5gnrrlc/kw_dl.x @@ -18,12 +18,12 @@ /********************************************************************20** - Name: LTE RLC file + Name: NR RLC file Type: C include file Desc: This file contains all the data structures and - prototypes for LTE RLC. + prototypes for RLC. File: kw_dl.x diff --git a/src/5gnrrlc/kw_dl_ex_ms.c b/src/5gnrrlc/kw_dl_ex_ms.c index dadd9de29..16492a237 100755 --- a/src/5gnrrlc/kw_dl_ex_ms.c +++ b/src/5gnrrlc/kw_dl_ex_ms.c @@ -18,19 +18,16 @@ /********************************************************************20** - Name: LTE-RLC Layer - System Services Interface Functions + Name: NR RLC Layer - System Services Interface Functions Type: C file Desc: C source code for the interface to System Services - of LTE-RLC + of NR RLC File: kw_dl_ex_ms.c *********************************************************************21*/ -static const char* RLOG_MODULE_NAME="RLC_DL"; -static int RLOG_MODULE_ID=2048; -static int RLOG_FILE_ID=195; /** @filekw_dl_ex_ms.c @brief RLC System Services Interface @@ -110,16 +107,16 @@ S16 rlcDlInitExt() * Activates Initialization * * @b Description: - * This function is invoked by system services to initialize the LTE-RLC + * This function is invoked by system services to initialize the NR RLC * layer. This is an entry point used by LTE_RLC layer to initialize its * global variables, before becoming operational. * * Allowable values for parameters are specified in ssi.h. * - * @param[in] ent - Specify the entity id of the LTE-RLC task. - * @param[in] inst - Specify the entity id of the LTE-RLC task. + * @param[in] ent - Specify the entity id of the NR RLC task. + * @param[in] inst - Specify the entity id of the NR RLC task. * @param[in] region - Specifies the memory region from which - * LTE-RLC should allocate structures and buffers. + * NR RLC should allocate structures and buffers. * @param[in] reason - Specifies the reason for calling this * initialization function. * @@ -200,7 +197,7 @@ Reason reason /* reason */ * Activation Task * * @b Description: - * Processes events received for MLTE-RLC layer via System Services from + * Processes events received for NR RLC layer via System Services from * other layers. * * @param[in] pst - Pst Structure @@ -280,7 +277,7 @@ Buffer *mBuf /* message buffer */ ODU_PUT_MSG_BUF(mBuf); if (pst->dstInst < MAX_RLC_INSTANCES) { - RLOG1(L_ERROR,"Received Invalid Event[%d] from SM", + DU_LOG("\nERROR --> RLC_DL : Received Invalid Event[%d] from SM", pst->event); } ret = RFAILED; @@ -362,7 +359,7 @@ Buffer *mBuf /* message buffer */ ODU_PUT_MSG_BUF(mBuf); if (pst->dstInst < MAX_RLC_INSTANCES) { - RLOG1(L_ERROR,"Received Invalid Event[%d] from RLC UL", + DU_LOG("\nERROR --> RLC_DL : Received Invalid Event[%d] from RLC UL", pst->event); } ret = RFAILED; @@ -412,7 +409,7 @@ Buffer *mBuf /* message buffer */ ODU_PUT_MSG_BUF(mBuf); if (pst->dstInst < MAX_RLC_INSTANCES) { - RLOG1(L_ERROR,"Received Invalid Event[%d] from RRC", + DU_LOG("\nERROR --> RLC_DL : Received Invalid Event[%d] from RRC", pst->event); } ret = RFAILED; @@ -462,7 +459,7 @@ Buffer *mBuf /* message buffer */ ODU_PUT_MSG_BUF(mBuf); if (pst->dstInst < MAX_RLC_INSTANCES) { - RLOG1(L_ERROR,"Received Invalid Event[%d] from PDCP", + DU_LOG("\nERROR --> RLC_DL : Received Invalid Event[%d] from PDCP", pst->event); } ret = RFAILED; @@ -513,7 +510,7 @@ Buffer *mBuf /* message buffer */ ODU_PUT_MSG_BUF(mBuf); if (pst->dstInst < MAX_RLC_INSTANCES) { - RLOG1(L_ERROR,"Received Invalid Event[%d] from MAC", + DU_LOG("\nERROR --> RLC_DL : Received Invalid Event[%d] from MAC", pst->event); } ret = RFAILED; @@ -573,7 +570,7 @@ Buffer *mBuf /* message buffer */ if (pst->dstInst < MAX_RLC_INSTANCES) { /*RlcCb *tRlcCb = RLC_GET_RLCCB(pst->dstInst);*/ - RLOG1(L_ERROR, "Received Invalid Source Entity[%d]", + DU_LOG("\nERROR --> RLC_DL : Received Invalid Source Entity[%d]", pst->event); } ODU_PUT_MSG_BUF(mBuf); diff --git a/src/5gnrrlc/kw_env.h b/src/5gnrrlc/kw_env.h index e2295a405..c14fd1f17 100755 --- a/src/5gnrrlc/kw_env.h +++ b/src/5gnrrlc/kw_env.h @@ -18,11 +18,11 @@ /********************************************************************20** - Name: LTE RLC file + Name: NR RLC file Type: C include file - Desc: This file contains the constants required for LTE-RLC. + Desc: This file contains the constants required for NR RLC. The defines in this file need to be changed by the customer to reflect the software architecture needed to run under the target system hardware architecture. diff --git a/src/5gnrrlc/kw_err.h b/src/5gnrrlc/kw_err.h index cbfb06da6..718a3dadf 100755 --- a/src/5gnrrlc/kw_err.h +++ b/src/5gnrrlc/kw_err.h @@ -18,7 +18,7 @@ /********************************************************************20** - Name: LTE RLC file + Name: NR RLC file Type: C include file diff --git a/src/5gnrrlc/kw_id.c b/src/5gnrrlc/kw_id.c index a27196d31..bb026340f 100755 --- a/src/5gnrrlc/kw_id.c +++ b/src/5gnrrlc/kw_id.c @@ -18,7 +18,7 @@ /********************************************************************20** - Name: LTE-RLC Layer + Name: NR RLC Layer Type: C source file diff --git a/src/5gnrrlc/kw_lim.c b/src/5gnrrlc/kw_lim.c index 595ae9c77..d5f863cb2 100755 --- a/src/5gnrrlc/kw_lim.c +++ b/src/5gnrrlc/kw_lim.c @@ -18,7 +18,7 @@ /********************************************************************20** - Name: LTE-RLC Layer - Lower Interface Functions + Name: NR RLC Layer - Lower Interface Functions Type: C file diff --git a/src/5gnrrlc/kw_lmm.c b/src/5gnrrlc/kw_lmm.c index 5500bec46..25a5429c1 100755 --- a/src/5gnrrlc/kw_lmm.c +++ b/src/5gnrrlc/kw_lmm.c @@ -18,7 +18,7 @@ /********************************************************************20** - Name: LTE - RLC - Layer Manager file + Name: NR RLC - Layer Manager file Type: C source file @@ -38,9 +38,6 @@ File: kw_lmm.c *********************************************************************21*/ -static const char* RLOG_MODULE_NAME="LMM"; -static int RLOG_MODULE_ID=2048; -static int RLOG_FILE_ID=197; /** @file kw_lmm.c @brief RLC Layer Manager Module **/ @@ -133,7 +130,7 @@ static S16 rlcLmmGenCfg(RlcCb *gCb,RlcGenCfg *cfg) if(cfg->maxUe > RLC_MAX_UE) { #if (ERRCLASS & ERRCLS_INT_PAR) - RLOG2(L_ERROR, "Invalid maxUe : Max [%lu] Received [%lu]", + DU_LOG("\nERROR --> RLC : Invalid maxUe : Max [%lu] Received [%lu]", RLC_MAX_UE, cfg->maxUe); #endif /* ERRCLASS & ERRCLS_INT_PAR */ @@ -143,7 +140,7 @@ static S16 rlcLmmGenCfg(RlcCb *gCb,RlcGenCfg *cfg) if(cfg->maxKwuSaps > RLC_MAX_KWUSAPS) { #if (ERRCLASS & ERRCLS_INT_PAR) - RLOG2(L_ERROR, "Invalid maxKwuSaps : Max [%lu] Received [%lu]", + DU_LOG("\nERROR --> RLC : Invalid maxKwuSaps : Max [%lu] Received [%lu]", RLC_MAX_KWUSAPS, cfg->maxKwuSaps); #endif /* ERRCLASS & ERRCLS_INT_PAR */ @@ -153,7 +150,7 @@ static S16 rlcLmmGenCfg(RlcCb *gCb,RlcGenCfg *cfg) if(cfg->maxUdxSaps > RLC_MAX_UDXSAPS) { #if (ERRCLASS & ERRCLS_INT_PAR) - RLOG2(L_ERROR, "Invalid maxUduSaps : Max [%lu] Received [%lu]", + DU_LOG("\nERROR --> RLC : Invalid maxUduSaps : Max [%lu] Received [%lu]", RLC_MAX_UDXSAPS, cfg->maxUdxSaps); #endif /* ERRCLASS & ERRCLS_INT_PAR */ @@ -184,7 +181,7 @@ static S16 rlcLmmGenCfg(RlcCb *gCb,RlcGenCfg *cfg) RLC_ALLOC(gCb,gCb->u.dlCb, sizeof (RlcDlCb)); if (gCb->u.dlCb == NULLP) { - RLOG0(L_FATAL,"Memory Allocation failed"); + DU_LOG("\nERROR --> RLC : Memory Allocation failed"); return (LCM_REASON_MEM_NOAVAIL); } @@ -198,7 +195,7 @@ static S16 rlcLmmGenCfg(RlcCb *gCb,RlcGenCfg *cfg) if(gCb->u.dlCb->rlcKwuDlSap == NULLP) { RLC_FREE(gCb,gCb->u.dlCb, sizeof (RlcDlCb)); - RLOG0(L_FATAL,"Memory Allocation failed"); + DU_LOG("\nERROR --> RLC : Memory Allocation failed"); return (LCM_REASON_MEM_NOAVAIL); } #endif /* ERRCLASS & ERRCLS_INT_PAR */ @@ -214,7 +211,7 @@ static S16 rlcLmmGenCfg(RlcCb *gCb,RlcGenCfg *cfg) { RLC_FREE(gCb,gCb->u.dlCb->rlcKwuDlSap, rlcSapSize); RLC_FREE(gCb,gCb->u.dlCb, sizeof (RlcDlCb)); - RLOG0(L_FATAL,"Memory Allocation failed"); + DU_LOG("\nERROR --> RLC : Memory Allocation failed"); return (LCM_REASON_MEM_NOAVAIL); } #endif /* ERRCLASS & ERRCLS_INT_PAR */ @@ -244,7 +241,7 @@ static S16 rlcLmmGenCfg(RlcCb *gCb,RlcGenCfg *cfg) RLC_FREE(gCb,gCb->u.dlCb->rlcKwuDlSap, rlcSapSize); RLC_FREE(gCb,gCb->u.dlCb->rguDlSap, rguSapSize); RLC_FREE(gCb,gCb->u.dlCb, sizeof (RlcDlCb)); - RLOG0(L_FATAL,"RLC DL Initialization failed"); + DU_LOG("\nERROR --> RLC_DL : RLC DL Initialization failed"); return (LCM_REASON_MEM_NOAVAIL); } @@ -285,7 +282,7 @@ static S16 rlcLmmGenCfg(RlcCb *gCb,RlcGenCfg *cfg) RLC_ALLOC(gCb,gCb->u.ulCb, sizeof (RlcUlCb)); if (gCb->u.ulCb == NULLP) { - RLOG0(L_FATAL,"Memory Allocation failed"); + DU_LOG("\nERROR --> RLC : Memory Allocation failed"); return (LCM_REASON_MEM_NOAVAIL); } @@ -299,7 +296,7 @@ static S16 rlcLmmGenCfg(RlcCb *gCb,RlcGenCfg *cfg) if(gCb->u.ulCb->rlcKwuUlSap == NULLP) { RLC_FREE(gCb,gCb->u.ulCb, sizeof (RlcUlCb)); - RLOG0(L_FATAL,"Memory Allocation failed"); + DU_LOG("\nERROR --> RLC : Memory Allocation failed"); return (LCM_REASON_MEM_NOAVAIL); } #endif /* ERRCLASS & ERRCLS_INT_PAR */ @@ -317,7 +314,7 @@ static S16 rlcLmmGenCfg(RlcCb *gCb,RlcGenCfg *cfg) { RLC_FREE(gCb,gCb->u.ulCb->rlcKwuUlSap, rlcSapSize); RLC_FREE(gCb,gCb->u.ulCb, sizeof (RlcUlCb)); - RLOG0(L_FATAL,"Memory Allocation failed"); + DU_LOG("\nERROR --> RLC : Memory Allocation failed"); return (LCM_REASON_MEM_NOAVAIL); } #endif /* ERRCLASS & ERRCLS_INT_PAR */ @@ -346,7 +343,7 @@ static S16 rlcLmmGenCfg(RlcCb *gCb,RlcGenCfg *cfg) RLC_FREE(gCb,gCb->u.ulCb->rlcKwuUlSap, rlcSapSize); RLC_FREE(gCb,gCb->u.ulCb->rguUlSap, rlcSapSize); RLC_FREE(gCb,gCb->u.ulCb, sizeof (RlcUlCb)); - RLOG0(L_FATAL,"RLC DL Initialization failed"); + DU_LOG("\nERROR --> RLC_DL : RLC DL Initialization failed"); } /* Register the timer */ @@ -368,7 +365,7 @@ static S16 rlcLmmGenCfg(RlcCb *gCb,RlcGenCfg *cfg) else { #if (ERRCLASS & ERRCLS_INT_PAR) - RLOG0(L_ERROR, "Received Invalid RLC Mode"); + DU_LOG("\nERROR --> RLC : Received Invalid RLC Mode"); #endif /* ERRCLASS & ERRCLS_INT_PAR */ return (LCM_REASON_INVALID_PAR_VAL); @@ -471,7 +468,7 @@ Header *hdr break; default: #if (ERRCLASS & ERRCLS_INT_PAR) - RLOG0(L_ERROR, "Received Invalid Message Type"); + DU_LOG("\nERROR --> RLC : Received Invalid Message Type"); if(!gCb) { fflush(stdout); @@ -580,7 +577,7 @@ uint8_t RlcMiRlcConfigReq (Pst *pst,RlcMngmt *cfg) return (RFAILED); } - RLOG1(L_DEBUG, "RlcMiRlcConfigReq elmId(%d)", cfg->hdr.elmId.elmnt); + DU_LOG("\nDEBUG --> RLC : RlcMiRlcConfigReq elmId(%d)", cfg->hdr.elmId.elmnt); switch(cfg->hdr.elmId.elmnt) { @@ -718,7 +715,7 @@ uint8_t RlcMiLkwCntrlReq(Pst *pst, RlcMngmt *cntrl) rlcLmmSendCfm(tRlcCb,pst, cntrl, TCNTRL, &cntrl->hdr); return (RFAILED); } - RLOG1(L_DEBUG, "RlcMiLkwCntrlReq(elmId(%d))", cntrl->hdr.elmId.elmnt); + DU_LOG("\nDEBUG --> RLC : RlcMiLkwCntrlReq(elmId(%d))", cntrl->hdr.elmId.elmnt); /* In normal cases, LCM_REASON_NOT_APPL is returned in cfm. * In all error cases appropriate reason is returned @@ -808,7 +805,7 @@ S16 RlcMiLkwStaReq(Pst *pst,RlcMngmt *sta) return (RFAILED); } - RLOG1(L_DEBUG, "Status request for elmId(%d))", sta->hdr.elmId.elmnt); + DU_LOG("\nDEBUG --> RLC : Status request for elmId(%d))", sta->hdr.elmId.elmnt); reason = LCM_REASON_NOT_APPL; @@ -930,7 +927,7 @@ S16 RlcMiLkwStsReq (Pst *pst, Action action,RlcMngmt *sts) return (RFAILED); } - RLOG2(L_DEBUG, "RlcMiLkwStsReq(elmId(%d),action(%d))", + DU_LOG("\nDEBUG --> RLC : RlcMiLkwStsReq(elmId(%d),action(%d))", action, sts->hdr.elmId.elmnt); @@ -1084,7 +1081,7 @@ S16 RlcMiLkwL2MeasReq(Pst *pst, RlcL2MeasReqEvt *measReqEvt) #if (ERRCLASS & ERRCLS_ADD_RES) /* KW_FIX */ if(measEvt == NULLP) { - RLOG0(L_FATAL,"Memory Allocation failed"); + DU_LOG("\nERROR --> RLC : Memory Allocation failed"); return RFAILED; } #endif @@ -1247,7 +1244,7 @@ static S16 rlcLmmCfgKwuSap(RlcCb *gCb,RlcSapCfg *cfg) /* Check for reconfiguration */ if (rlcKwuSapCb->state != RLC_SAP_NOT_CFG) { - RLOG2(L_ERROR,"RLC Mode [%d] : Invalid rlckwuSap State [%d]", + DU_LOG("\nERROR --> RLC : RLC Mode [%d] : Invalid rlckwuSap State [%d]", gCb->genCfg.rlcMode, rlcKwuSapCb->state); /* reconfiguration not allowed */ return (LCM_REASON_RECONFIG_FAIL); @@ -1297,7 +1294,7 @@ static S16 rlcLmmCfgCkwSap(RlcCb *gCb,RlcSapCfg *cfg) /* Check for reconfiguration */ if(ckwSap->state != RLC_SAP_NOT_CFG) { - RLOG1(L_ERROR,"Invalid rlckwuSap State [%d]",ckwSap->state); + DU_LOG("\nERROR --> RLC : Invalid rlckwuSap State [%d]",ckwSap->state); return (LCM_REASON_RECONFIG_FAIL); } #endif /* ERRCLASS & ERRCLS_INT_PAR */ @@ -1341,7 +1338,7 @@ static S16 rlcLmmCfgUdxSap(RlcCb *gCb,RlcSapCfg *cfg) /* Check for reconfiguration */ if(udxDlSap->state != RLC_SAP_NOT_CFG) { - RLOG1(L_ERROR,"Invalid udxDlSap State [%d]",udxDlSap->state); + DU_LOG("\nERROR --> RLC : Invalid udxDlSap State [%d]",udxDlSap->state); return (LCM_REASON_RECONFIG_FAIL); } #endif /* ERRCLASS & ERRCLS_INT_PAR */ @@ -1357,7 +1354,7 @@ static S16 rlcLmmCfgUdxSap(RlcCb *gCb,RlcSapCfg *cfg) /* Check for reconfiguration */ if(udxUlSap->state != RLC_SAP_NOT_CFG) { - RLOG1(L_ERROR,"Invalid udxUlSap State [%d]", udxUlSap->state); + DU_LOG("\nERROR --> RLC : Invalid udxUlSap State [%d]", udxUlSap->state); return (LCM_REASON_RECONFIG_FAIL); } #endif /* ERRCLASS & ERRCLS_INT_PAR */ @@ -1407,7 +1404,7 @@ static S16 rlcLmmCfgRguSap(RlcCb *gCb,RlcSapCfg *cfg) /* Check for reconfiguration */ if(rguSap->state != RLC_SAP_NOT_CFG) { - RLOG2(L_ERROR,"RLC Mode [%d]: Invalid rguSap State [%d]", + DU_LOG("\nERROR --> RLC : RLC Mode [%d]: Invalid rguSap State [%d]", gCb->genCfg.rlcMode, rguSap->state); return (LCM_REASON_RECONFIG_FAIL); } @@ -1744,7 +1741,7 @@ static S16 rlcLmmUdxSapCntrl(RlcCb *gCb,RlcMngmt *cntrl) /* validate SAP */ if(UDX_SAP.state == RLC_SAP_NOT_CFG) { - RLOG0(L_ERROR,"udxUlSap not configured yet"); + DU_LOG("\nERROR --> RLC : udxUlSap not configured yet"); return (LCM_REASON_INVALID_STATE); } #endif /* ERRCLASS & ERRCLS_INT_PAR */ @@ -1816,7 +1813,7 @@ static S16 rlcLmmLSapCntrl(RlcCb *gCb,RlcMngmt *cntrl) /* validate SAP */ if(rguSap->state == RLC_SAP_NOT_CFG) { - RLOG1(L_ERROR,"RLC Mode [%d]:rguSap not configured yet", gCb->genCfg.rlcMode); + DU_LOG("\nERROR --> RLC : RLC Mode [%d]:rguSap not configured yet", gCb->genCfg.rlcMode); return (LCM_REASON_INVALID_STATE); } #endif /* ERRCLASS & ERRCLS_INT_PAR */ @@ -2142,7 +2139,7 @@ S16 rlcLmmSendTrc(RlcCb *gCb,Event event,Buffer *mBuf) MsgLen tempCnt; Pst pst; - RLOG2(L_DEBUG, "rlcLmmSendTrc(): Trace for event=%d, gCb->trcLen=%d", + DU_LOG("\nDEBUG --> RLC : rlcLmmSendTrc(): Trace for event=%d, gCb->trcLen=%d", event, gCb->trcLen); @@ -2164,7 +2161,7 @@ S16 rlcLmmSendTrc(RlcCb *gCb,Event event,Buffer *mBuf) != ROK) { /* rg005.201 removed SPutSBuf on error */ - RLOG0(L_ERROR,"SCpyMsgMsg Failed"); + DU_LOG("\nERROR --> RLC : SCpyMsgMsg Failed"); return RFAILED; } /* Send Trace Indication to Layer manager */ @@ -2176,7 +2173,7 @@ S16 rlcLmmSendTrc(RlcCb *gCb,Event event,Buffer *mBuf) /* Get the length of the recvd message buffer */ if (SFndLenMsg(mBuf, &bufLen) != ROK) { - RLOG0(L_ERROR,"SFndLenMsg Failed"); + DU_LOG("\nERROR --> RLC : SFndLenMsg Failed"); return RFAILED; } /* Check if the recvd buffer size is less than request trace len */ @@ -2187,7 +2184,7 @@ S16 rlcLmmSendTrc(RlcCb *gCb,Event event,Buffer *mBuf) if (SCpyMsgMsg(mBuf, pst.region, pst.pool, &dstMbuf) != ROK) { - RLOG0(L_ERROR,"SCpyMsgMsg Failed"); + DU_LOG("\nERROR --> RLC : SCpyMsgMsg Failed"); return RFAILED; } @@ -2205,7 +2202,7 @@ S16 rlcLmmSendTrc(RlcCb *gCb,Event event,Buffer *mBuf) { (Void) SPutSMem(RLC_GET_MEM_REGION(gCb), RLC_GET_MEM_POOL(gCb)); - RLOG0(L_FATAL,"Memory Allocation failed"); + DU_LOG("\nERROR --> RLC : Memory Allocation failed"); return (LCM_REASON_MEM_NOAVAIL); } #endif /* ERRCLASS & ERRCLS_INT_PAR */ @@ -2213,19 +2210,19 @@ S16 rlcLmmSendTrc(RlcCb *gCb,Event event,Buffer *mBuf) /* Copy trcLen nos of bytes from the recvd message */ if (SCpyMsgFix(mBuf,0,gCb->trcLen,tempBuf,&tempCnt) != ROK) { - RLOG0(L_ERROR,"SCpyMsgFix Failed"); + DU_LOG("\nERROR --> RLC : SCpyMsgFix Failed"); return RFAILED; } if (SGetMsg(pst.region, pst.pool, &dstMbuf) != ROK) { - RLOG0(L_FATAL,"Memory Allocation failed"); + DU_LOG("\nERROR --> RLC : Memory Allocation failed"); return RFAILED; } /* Copy the tempBuf data to dst mBuf */ if (SCpyFixMsg(tempBuf,dstMbuf,0,gCb->trcLen,&tempCnt) != ROK) { - RLOG0(L_ERROR,"SCpyMsgFix Failed"); + DU_LOG("\nERROR --> RLC : SCpyMsgFix Failed"); return RFAILED; } diff --git a/src/5gnrrlc/kw_ptli.c b/src/5gnrrlc/kw_ptli.c index 6ef1197c5..261ac789f 100755 --- a/src/5gnrrlc/kw_ptli.c +++ b/src/5gnrrlc/kw_ptli.c @@ -18,11 +18,11 @@ /********************************************************************20** - Name: LTE-RLC Layer - Lower Interface + Name: NR RLC Layer - Lower Interface Type: C file - Desc: C source code for the lower interface of LTE-RLC + Desc: C source code for the lower interface of NR RLC File: kw_ptli.c diff --git a/src/5gnrrlc/kw_ptui.c b/src/5gnrrlc/kw_ptui.c index 2ddd20291..840d46028 100755 --- a/src/5gnrrlc/kw_ptui.c +++ b/src/5gnrrlc/kw_ptui.c @@ -18,18 +18,15 @@ /********************************************************************20** - Name: LTE-RLC Layer - Upper Interface + Name: NR RLC Layer - Upper Interface Type: C file - Desc: C source code for the upper interface of LTE-RLC + Desc: C source code for the upper interface of NR RLC File: kw_ptui.c *********************************************************************21*/ -static const char* RLOG_MODULE_NAME="UIM"; -static int RLOG_MODULE_ID=2048; -static int RLOG_FILE_ID=199; /** @file kw_ptui.c @brief RLC Upper Interface @@ -406,7 +403,7 @@ SuId suId, CmLteRlcId rlcId ) { - RLOG0(L_DEBUG, "In RlcUiKwuReEstCmpInd"); + DU_LOG("\nINFO --> RLC : In RlcUiKwuReEstCmpInd"); /* jump to specific primitive depending on configured selector */ (*kwUiKwuReEstCmpIndMt[pst->selector])(pst, suId, rlcId); @@ -712,7 +709,7 @@ S16 rlcDlBatchProcSplit(Void) } else { - RLOG0(L_ERROR, "mBuf is NULL"); + DU_LOG("\nERROR --> RLC : mBuf is NULL"); if(datReq->mBuf) cmUnpkKwuDatReq(rlcProcDlData, &datReq->pst, datReq->mBuf); diff --git a/src/5gnrrlc/kw_tmm_dl.c b/src/5gnrrlc/kw_tmm_dl.c index 1b7aae7a0..55cc0b802 100755 --- a/src/5gnrrlc/kw_tmm_dl.c +++ b/src/5gnrrlc/kw_tmm_dl.c @@ -18,7 +18,7 @@ /********************************************************************** - Name: LTE-RLC Layer + Name: NR RLC Layer Type: C file diff --git a/src/5gnrrlc/kw_tmm_ul.c b/src/5gnrrlc/kw_tmm_ul.c index 754849b8c..20e11f561 100755 --- a/src/5gnrrlc/kw_tmm_ul.c +++ b/src/5gnrrlc/kw_tmm_ul.c @@ -18,7 +18,7 @@ /********************************************************************** - Name: LTE-RLC Layer + Name: NR RLC Layer Type: C file diff --git a/src/5gnrrlc/kw_udx.x b/src/5gnrrlc/kw_udx.x index 5d0b87015..d63c6b113 100755 --- a/src/5gnrrlc/kw_udx.x +++ b/src/5gnrrlc/kw_udx.x @@ -18,7 +18,7 @@ /********************************************************************** - Name: LTE RLC layer + Name: NR RLC layer Type: C include file diff --git a/src/5gnrrlc/kw_udx_dl.c b/src/5gnrrlc/kw_udx_dl.c index fb2a464d0..8a2790055 100755 --- a/src/5gnrrlc/kw_udx_dl.c +++ b/src/5gnrrlc/kw_udx_dl.c @@ -18,7 +18,7 @@ /********************************************************************** - Name: LTE RLC layer + Name: NR RLC layer Type: C include file @@ -27,9 +27,6 @@ File: kw_udx_dl.c **********************************************************************/ -static const char* RLOG_MODULE_NAME="UDX"; -static int RLOG_MODULE_ID=262144; -static int RLOG_FILE_ID=203; /* header include files (.h) */ #include "common_def.h" @@ -121,7 +118,7 @@ SpId spId /* Update the State */ udxSap->state = RLC_SAP_BND; - RLOG1(L_INFO, "UDX SAP state [%d]", udxSap->state); + DU_LOG("\nINFO --> RLC_DL : UDX SAP state [%d]", udxSap->state); break; } /* SAP is already bound */ @@ -139,7 +136,7 @@ SpId spId RLC_SEND_SAPID_ALARM(tRlcCb, spId, LKW_EVENT_UDX_BND_REQ, LCM_CAUSE_INV_PAR_VAL); - RLOG0(L_ERROR, "UDX SAP already Bound"); + DU_LOG("\nERROR --> RLC_DL : UDX SAP already Bound"); rlcDlUdxBndCfm(&(udxSap->pst), udxSap->suId, CM_BND_NOK); } break; @@ -151,7 +148,7 @@ SpId spId RLC_SEND_SAPID_ALARM(tRlcCb,spId, LKW_EVENT_CKW_BND_REQ, LCM_CAUSE_INV_STATE); #endif /* ERRCLASS & ERRCLS_INT_PAR */ - RLOG0(L_ERROR, "Invalid UDX SAP State in Bind Req"); + DU_LOG("\nERROR --> RLC_DL : Invalid UDX SAP State in Bind Req"); rlcDlUdxBndCfm(&(udxSap->pst), udxSap->suId, CM_BND_NOK); break; } @@ -191,7 +188,7 @@ Reason reason tRlcCb = RLC_GET_RLCCB(pst->dstInst); - RLOG2(L_DEBUG,"Unbind Req for spId[%d], reason[%d]", + DU_LOG("\nDEBUG --> RLC_DL : Unbind Req for spId[%d], reason[%d]", spId, reason); UNUSED(reason); /* disable upper sap (CKW) */ @@ -258,7 +255,7 @@ RlcCfgInfo *cfg #if (ERRCLASS & ERRCLS_ADD_RES) if (cfgCfm == NULLP) { - RLOG0(L_FATAL,"Memory Allocation Failed."); + DU_LOG("\nERROR --> RLC_DL : Memory Allocation Failed."); /* kw002.201 Freeing from proper region */ /* RLC_PST_FREE(pst->region, pst->pool, cfg, sizeof(RlcCfgInfo)); */ return RFAILED; @@ -284,7 +281,7 @@ RlcCfgInfo *cfg if (rlcCfgAddDlRb(tRlcCb,cfg->ueId, cfg->cellId,\ entCfg, entCfgCfm) != ROK) { - RLOG_ARG1(L_ERROR,DBG_RBID,cfg->entCfg[idx].rbId,"Addition Failed due to[%d]", + DU_LOG("\nERROR --> RLC_DL : Addition Failed due to[%d]", entCfgCfm->status.reason); } } @@ -298,7 +295,7 @@ RlcCfgInfo *cfg if (rlcCfgReCfgDlRb(tRlcCb,cfg->ueId, cfg->cellId,\ entCfg, entCfgCfm) != ROK) { - RLOG_ARG1(L_ERROR,DBG_RBID,cfg->entCfg[idx].rbId,"ReCfg Failed due to[%d]", + DU_LOG("\nERROR --> RLC_DL : ReCfg Failed due to[%d]", entCfgCfm->status.reason); } } @@ -313,7 +310,7 @@ RlcCfgInfo *cfg if (rlcCfgDelDlRb(tRlcCb,cfg->ueId, cfg->cellId,\ entCfg, entCfgCfm) != ROK) { - RLOG_ARG1(L_ERROR,DBG_RBID,cfg->entCfg[idx].rbId,"Deletion Failed due to[%d]", + DU_LOG("\nERROR --> RLC_DL : Deletion Failed due to[%d]", entCfgCfm->status.reason); } } @@ -336,7 +333,7 @@ RlcCfgInfo *cfg if (rlcCfgReEstDlRb(tRlcCb,cfg->ueId, cfg->cellId, sndReEst,entCfg, entCfgCfm) != ROK) { - RLOG_ARG1(L_ERROR,DBG_RBID,cfg->entCfg[idx].rbId,"Reest Failed due to[%d]", + DU_LOG("\nERROR --> RLC_DL : Reest Failed due to[%d]", entCfgCfm->status.reason); } } @@ -349,7 +346,7 @@ RlcCfgInfo *cfg if (rlcCfgDelDlUe(tRlcCb,cfg->ueId, cfg->cellId, entCfg, entCfgCfm) != ROK) { - RLOG_ARG1(L_ERROR,DBG_UEID,cfg->ueId,"deletion Failed due to[%d]", + DU_LOG("\nERROR --> RLC_DL : deletion Failed due to[%d]", entCfgCfm->status.reason); } break; @@ -359,7 +356,7 @@ RlcCfgInfo *cfg if (rlcCfgDelDlCell(tRlcCb,cfg->cellId,entCfg,entCfgCfm) != ROK ) { - RLOG_ARG1(L_ERROR,DBG_CELLID,cfg->cellId,"deletion Failed due to[%d]", + DU_LOG("\nERROR --> RLC_DL : deletion Failed due to[%d]", entCfgCfm->status.reason); } break; @@ -369,7 +366,7 @@ RlcCfgInfo *cfg { RLC_CFG_FILL_CFG_CFM(entCfgCfm, entCfg->rbId, entCfg->rbType,\ CKW_CFG_CFM_NOK, CKW_CFG_REAS_INVALID_CFG); - RLOG0(L_ERROR, "Invalid CfgType"); + DU_LOG("\nERROR --> RLC_DL : Invalid CfgType"); } } } @@ -439,7 +436,7 @@ CkwUeInfo *newUeInfo if (rlcCfgDlUeIdChng(tRlcCb, ueInfo, newUeInfo, &status) != ROK) { - RLOG_ARG1(L_ERROR,DBG_CELLID,newUeInfo->cellId,"Failure due to[%d]", + DU_LOG("\nERROR --> RLC_DL : Failure due to[%d]", status.reason); } rlcDlUdxUeIdChgCfm(&(tRlcCb->u.dlCb->udxDlSap[spId].pst), @@ -479,7 +476,7 @@ RlcUdxDlStaPdu *pStaPdu rlcDbmFetchDlRbCbByRbId(tRlcCb, rlcId, &rbCb); /* Fetch DBM RbCb */ if (!rbCb) { - RLOG_ARG2(L_ERROR, DBG_UEID,rlcId->ueId, "CellId [%u]:RbId[%d] not found", + DU_LOG("\nERROR --> RLC_DL : CellId [%u]:RbId[%d] not found", rlcId->cellId,rlcId->rbId); RLC_FREE_SHRABL_BUF(pst->region, pst->pool, @@ -534,7 +531,7 @@ RlcUdxStaPdu *pStaPdu rlcDbmFetchDlRbCbByRbId(tRlcCb, rlcId, &rbCb); if (!rbCb) { - RLOG_ARG2(L_ERROR, DBG_UEID,rlcId->ueId, "CellId [%u]:RbId[%d] not found", + DU_LOG("\nERROR --> RLC_DL : CellId [%u]:RbId[%d] not found", rlcId->cellId,rlcId->rbId); return RFAILED; } diff --git a/src/5gnrrlc/kw_udx_ptdl.c b/src/5gnrrlc/kw_udx_ptdl.c index f1011aeba..536a245d2 100755 --- a/src/5gnrrlc/kw_udx_ptdl.c +++ b/src/5gnrrlc/kw_udx_ptdl.c @@ -18,7 +18,7 @@ /************************************************************************ - Name: LTE-RLC ULDL Interface + Name: NR RLC ULDL Interface Type: C source file diff --git a/src/5gnrrlc/kw_udx_ptul.c b/src/5gnrrlc/kw_udx_ptul.c index c6e6cca50..0e1bdd335 100755 --- a/src/5gnrrlc/kw_udx_ptul.c +++ b/src/5gnrrlc/kw_udx_ptul.c @@ -18,7 +18,7 @@ /************************************************************************ - Name: LTE-RLC ULDL Interface + Name: NR RLC ULDL Interface Type: C source file diff --git a/src/5gnrrlc/kw_udx_ul.c b/src/5gnrrlc/kw_udx_ul.c index 8e210d90d..34d7330d5 100755 --- a/src/5gnrrlc/kw_udx_ul.c +++ b/src/5gnrrlc/kw_udx_ul.c @@ -18,7 +18,7 @@ /********************************************************************** - Name: LTE RLC layer + Name: NR RLC layer Type: C include file @@ -27,9 +27,6 @@ File: kw_udx_ul.c **********************************************************************/ -static const char* RLOG_MODULE_NAME="UDX"; -static int RLOG_MODULE_ID=262144; -static int RLOG_FILE_ID=204; /** @file kw_udx_ul.c @brief UDX Uplink Module @@ -122,7 +119,7 @@ uint8_t status #if (ERRCLASS & ERRCLS_INT_PAR) if (tRlcCb->init.cfgDone != TRUE) { - RLOG0(L_FATAL, "General configuration not done"); + DU_LOG("\nERROR --> RLC_UL : General configuration not done"); RLC_SEND_SAPID_ALARM(tRlcCb,suId, LKW_EVENT_LI_BND_CFM, LCM_CAUSE_INV_STATE); @@ -131,7 +128,7 @@ uint8_t status if (suId < 0) { - RLOG0(L_ERROR, "Invalid suId"); + DU_LOG("\nERROR --> RLC_UL : Invalid suId"); RLC_SEND_SAPID_ALARM(tRlcCb,suId, LKW_EVENT_LI_BND_CFM, LCM_CAUSE_INV_SUID); @@ -225,7 +222,7 @@ RlcCfgCfmInfo *cfmInfo #if (ERRCLASS & ERRCLS_INT_PAR) if (suId < 0) { - RLOG0(L_ERROR, "Invalid suId"); + DU_LOG("\nERROR --> RLC_UL : Invalid suId"); RLC_SEND_SAPID_ALARM(tRlcCb,suId, LKW_EVENT_LI_BND_CFM, LCM_CAUSE_INV_SUID); RLC_FREE_SHRABL_BUF(pst->region, @@ -238,7 +235,7 @@ RlcCfgCfmInfo *cfmInfo if(ROK != rlcDbmFindUlTransaction(tRlcCb,cfmInfo->transId, &cfgTmpData)) { - RLOG0(L_ERROR, "Invalid transId"); + DU_LOG("\nERROR --> RLC_UL : Invalid transId"); RLC_FREE_SHRABL_BUF(pst->region, pst->pool, cfmInfo, @@ -259,7 +256,7 @@ RlcCfgCfmInfo *cfmInfo #if (ERRCLASS & ERRCLS_ADD_RES) if (cfgCfm == NULLP) { - RLOG0(L_FATAL, "Memory Allocation failed."); + DU_LOG("\nERROR --> RLC_UL : Memory Allocation failed."); RLC_FREE_SHRABL_BUF(pst->region, pst->pool, cfmInfo, @@ -331,14 +328,14 @@ CmStatus status #if (ERRCLASS & ERRCLS_INT_PAR) if (suId < 0) { - RLOG0(L_ERROR, "Invalid suId"); + DU_LOG("\nERROR --> RLC_UL : Invalid suId"); return RFAILED; } #endif /* ERRCLASS & ERRCLS_INT_PAR */ if(ROK != rlcDbmFindUlTransaction(tRlcCb, transId, &cfgTmpData)) { - RLOG0(L_ERROR, "Invalid transId"); + DU_LOG("\nERROR --> RLC_UL : Invalid transId"); return (RFAILED); } @@ -396,7 +393,7 @@ CmLteRlcId *rlcId rlcDbmFetchUlRbCbByRbId(tRlcCb, rlcId, &rbCb); if (rbCb == NULLP) { - RLOG_ARG2(L_ERROR, DBG_UEID,rlcId->ueId, "CellId [%u]:RbId[%d] not found", + DU_LOG("\nERROR --> RLC_UL : CellId [%u]:RbId[%d] not found", rlcId->cellId,rlcId->rbId); return RFAILED; } @@ -482,7 +479,7 @@ RlcCfgCfmInfo *cfgCfm { RLC_CFG_FILL_CFG_CFM(entCfgCfm, entCfg->rbId, entCfg->rbType, CKW_CFG_CFM_NOK, CKW_CFG_REAS_INVALID_DIR); - RLOG_ARG2(L_ERROR,DBG_UEID,cfg->ueId,"RBID[%d] direction[%d] is invalid", + DU_LOG("\nDEBUG --> RLC_UL : RBID[%d] direction[%d] is invalid", entCfg->rbId,entCfg->dir); } break; @@ -553,7 +550,7 @@ RlcCfgCfmInfo *cfgCfm RLC_CFG_FILL_CFG_CFM(entCfgCfm, entCfg->rbId, entCfg->rbType, CKW_CFG_CFM_NOK, CKW_CFG_REAS_INVALID_CFG); - RLOG0(L_ERROR,"Invalid configuration type"); + DU_LOG("\nERROR --> RLC_UL : Invalid configuration type"); } } } diff --git a/src/5gnrrlc/kw_uim.c b/src/5gnrrlc/kw_uim.c index 5eb9e2b72..39eb20995 100755 --- a/src/5gnrrlc/kw_uim.c +++ b/src/5gnrrlc/kw_uim.c @@ -18,7 +18,7 @@ /********************************************************************20** - Name: LTE-RLC Layer - Upper Interface Functions + Name: NR RLC Layer - Upper Interface Functions Type: C file diff --git a/src/5gnrrlc/kw_ul.h b/src/5gnrrlc/kw_ul.h index 832103c42..00ec5d0bc 100755 --- a/src/5gnrrlc/kw_ul.h +++ b/src/5gnrrlc/kw_ul.h @@ -18,7 +18,7 @@ /********************************************************************20** - Name: LTE RLC file for uplink and non real time tasks + Name: NR RLC file for uplink and non real time tasks Type: C include file diff --git a/src/5gnrrlc/kw_ul.x b/src/5gnrrlc/kw_ul.x index f2e4e731a..7367ee833 100755 --- a/src/5gnrrlc/kw_ul.x +++ b/src/5gnrrlc/kw_ul.x @@ -18,12 +18,12 @@ /********************************************************************20** - Name: LTE RLC file for uplink and non real time tasks + Name: NR RLC file for uplink and non real time tasks Type: C include file Desc: This file contains all the data structures and - prototypes for LTE RLC in the uplink. + prototypes for RLC in the uplink. File: kw_ul.x diff --git a/src/5gnrrlc/kw_ul_ex_ms.c b/src/5gnrrlc/kw_ul_ex_ms.c index 003ff9805..05d850f3e 100755 --- a/src/5gnrrlc/kw_ul_ex_ms.c +++ b/src/5gnrrlc/kw_ul_ex_ms.c @@ -18,12 +18,12 @@ /********************************************************************20** - Name: LTE-RLC Layer - System Services Interface Functions + Name: NR RLC Layer - System Services Interface Functions Type: C file Desc: C source code for the interface to System Services - of LTE-RLC + of NR RLC File: kw_ul_ex_ms.c @@ -96,16 +96,16 @@ S16 rlcUlInitExt() * Activates Initialization * * @b Description: - * This function is invoked by system services to initialize the LTE-RLC + * This function is invoked by system services to initialize the NR RLC * layer. This is an entry point used by LTE_RLC layer to initialize its * global variables, before becoming operational. * * Allowable values for parameters are specified in ssi.h. * - * @param[in] ent - Specify the entity id of the LTE-RLC task. - * @param[in] inst - Specify the entity id of the LTE-RLC task. + * @param[in] ent - Specify the entity id of the NR RLC task. + * @param[in] inst - Specify the entity id of the NR RLC task. * @param[in] region - Specifies the memory region from which - * LTE-RLC should allocate structures and buffers. + * NR RLC should allocate structures and buffers. * @param[in] reason - Specifies the reason for calling this * initialization function. * @@ -176,7 +176,7 @@ Reason reason /* reason */ * Activation Task * * @b Description: - * Processes events received for MLTE-RLC layer via System Services from + * Processes events received for NR RLC layer via System Services from * other layers. * * @param[in] pst - Pst Structure diff --git a/src/5gnrrlc/kw_umm_dl.c b/src/5gnrrlc/kw_umm_dl.c index 557b0baa0..430adca40 100755 --- a/src/5gnrrlc/kw_umm_dl.c +++ b/src/5gnrrlc/kw_umm_dl.c @@ -18,7 +18,7 @@ /********************************************************************** - Name: LTE-RLC Layer + Name: NR RLC Layer Type: C file diff --git a/src/5gnrrlc/kw_umm_ul.c b/src/5gnrrlc/kw_umm_ul.c index a1c88a322..a7f4d80fc 100755 --- a/src/5gnrrlc/kw_umm_ul.c +++ b/src/5gnrrlc/kw_umm_ul.c @@ -18,7 +18,7 @@ /********************************************************************** - Name: LTE-RLC Layer + Name: NR RLC Layer Type: C file diff --git a/src/5gnrrlc/kw_utl_dl.c b/src/5gnrrlc/kw_utl_dl.c index 7a21f277e..8d1cc6784 100755 --- a/src/5gnrrlc/kw_utl_dl.c +++ b/src/5gnrrlc/kw_utl_dl.c @@ -18,7 +18,7 @@ /********************************************************************** - Name: LTE-RLC Layer + Name: NR RLC Layer Type: C file diff --git a/src/5gnrrlc/kw_utl_ul.c b/src/5gnrrlc/kw_utl_ul.c index 6e86951b2..f3ce80f2e 100755 --- a/src/5gnrrlc/kw_utl_ul.c +++ b/src/5gnrrlc/kw_utl_ul.c @@ -18,7 +18,7 @@ /********************************************************************** - Name: LTE-RLC Layer + Name: NR RLC Layer Type: C file diff --git a/src/5gnrsch/rg_sch.c b/src/5gnrsch/rg_sch.c index a6cf334f4..f0420259b 100755 --- a/src/5gnrsch/rg_sch.c +++ b/src/5gnrsch/rg_sch.c @@ -44,8 +44,6 @@ #include "rg_sch.h" #include "rg_sch_err.h" #include "rg_sch_cmn.h" -#include "rl_interface.h" -#include "rl_common.h" /* header/extern include files (.x) */ #include "tfu.x" /* TFU types */ diff --git a/src/5gnrsch/rg_sch_cfg.c b/src/5gnrsch/rg_sch_cfg.c index 2bbecc2d1..cab0b4c37 100755 --- a/src/5gnrsch/rg_sch_cfg.c +++ b/src/5gnrsch/rg_sch_cfg.c @@ -32,9 +32,6 @@ @brief This module handles the configuration of SCH by RRC and RRM. */ -static const char* RLOG_MODULE_NAME="MAC"; -static int RLOG_FILE_ID=186; -static int RLOG_MODULE_ID=4096; /* header include files -- defines (.h) */ #include "common_def.h" @@ -47,8 +44,6 @@ static int RLOG_MODULE_ID=4096; #include "rg_sch.h" #include "rg_sch_err.h" #include "rg_sch_cmn.h" -#include "rl_interface.h" -#include "rl_common.h" /* header/extern include files (.x) */ #include "tfu.x" /* TFU types */ @@ -1027,7 +1022,7 @@ RgSchErrInfo *errInfo if (((*cell) == NULLP) || ((*cell)->cellId != ueCfg->cellId)) { - RLOG_ARG1(L_ERROR,DBG_CRNTI,ueCfg->crnti,"Cell does not exist %d", + DU_LOG("\nERROR --> SCH : Cell does not exist %d", ueCfg->cellId); return RFAILED; } @@ -1037,14 +1032,14 @@ RgSchErrInfo *errInfo * in configuration is not amongst the C-RNTI'smanaged by scheduler */ if ((rgSCHRamVldtUeCfg(*cell, ueCfg)) != ROK) { - RLOG_ARG1(L_ERROR,DBG_CRNTI,ueCfg->crnti,"CELLID:%d Preamble Id configuration" + DU_LOG("\nERROR --> SCH : CELLID:%d Preamble Id configuration" "failed ",ueCfg->cellId); return RFAILED; } /* Check if Ue already configured */ if (rgSCHDbmGetUeCb(*cell, ueCfg->crnti) != NULLP) { - RLOG_ARG1(L_ERROR,DBG_CRNTI,ueCfg->crnti,"CELLID:%d UEID already exists", + DU_LOG("\nERROR --> SCH : CELLID:%d UEID already exists", ueCfg->cellId); return RFAILED; } @@ -1052,7 +1047,7 @@ RgSchErrInfo *errInfo if ((ueCfg->txMode.pres == TRUE) && ((ueCfg->txMode.txModeEnum < RGR_UE_TM_1) || (ueCfg->txMode.txModeEnum > RGR_UE_TM_7))) { - RLOG_ARG2(L_ERROR,DBG_CRNTI,ueCfg->crnti,"CELLID:%d Invalid transmission mode for" + DU_LOG("\nERROR --> SCH : CELLID:%d Invalid transmission mode for" " UE is %d", ueCfg->cellId,(uint8_t)ueCfg->txMode.txModeEnum); return RFAILED; } @@ -1060,7 +1055,7 @@ RgSchErrInfo *errInfo /* Validate UE Category */ if (ueCfg->ueCatEnum > CM_LTE_UE_CAT_8) { - RLOG_ARG2(L_ERROR,DBG_CRNTI,ueCfg->crnti,"CELLID:%d Invalid category for UE %d", + DU_LOG("\nERROR --> SCH : CELLID:%d Invalid category for UE %d", ueCfg->cellId,(uint8_t)ueCfg->ueCatEnum); return RFAILED; } @@ -1080,7 +1075,7 @@ RgSchErrInfo *errInfo if ((ueCfg->txMode.pres == TRUE) && (ueCfg->txMode.txModeEnum > RGR_UE_TM_1)) { - RLOG_ARG2(L_ERROR,DBG_CRNTI,ueCfg->crnti,"CELLID:%d Invalid transmission mode for" + DU_LOG("\nERROR --> SCH : CELLID:%d Invalid transmission mode for" " UE (%d) for the configured Cell Antenna Ports",ueCfg->cellId, (uint8_t)ueCfg->txMode.txModeEnum); return RFAILED; @@ -1089,7 +1084,7 @@ RgSchErrInfo *errInfo if ((rgSCHCfgVldtUeCqiModeCfg(*cell, &ueCfg->ueDlCqiCfg)) != ROK) { - RLOG_ARG1(L_ERROR,DBG_CRNTI,ueCfg->crnti, "CELLID:%d Invalid CQI Mode configuration", + DU_LOG("\nERROR --> SCH : CELLID:%d Invalid CQI Mode configuration", ueCfg->cellId); return RFAILED; } @@ -1097,21 +1092,21 @@ RgSchErrInfo *errInfo /* Validate Max Uplink HARQ transmission value */ if (ueCfg->ueUlHqCfg.maxUlHqTx < RGSCH_MIN_HQ_TX) { - RLOG_ARG2(L_ERROR,DBG_CRNTI,ueCfg->crnti,"CELLID:%d Invalid Uplink HARQ config for " + DU_LOG("\nERROR --> SCH : CELLID:%d Invalid Uplink HARQ config for " "UE %d",ueCfg->cellId,ueCfg->ueUlHqCfg.maxUlHqTx); return RFAILED; } if (rgSCHCfgVldtUePwrCfg(*cell, &ueCfg->ueUlPwrCfg) != ROK) { - RLOG_ARG1(L_ERROR,DBG_CRNTI,ueCfg->crnti,"CELLID:%d Invalid PUSCH Group power" + DU_LOG("\nERROR --> SCH : CELLID:%d Invalid PUSCH Group power" " configuration",ueCfg->cellId); return RFAILED; } if (rgSCHCfgVldtUeMeasGapAckNakRepCfg(*cell, ueCfg) != ROK) { - RLOG_ARG1(L_ERROR,DBG_CRNTI,ueCfg->crnti,"CELLID:%d Invalid MeasGap/AckNackRep" + DU_LOG("\nERROR --> SCH : CELLID:%d Invalid MeasGap/AckNackRep" " configuration",ueCfg->cellId); return RFAILED; } @@ -1123,7 +1118,7 @@ RgSchErrInfo *errInfo ||(ueCfg->ueSpsCfg.spsRnti == RGSCH_SI_RNTI) ||(ueCfg->ueSpsCfg.spsRnti == RGSCH_P_RNTI)) { - RLOG_ARG1(L_ERROR,DBG_CRNTI,ueCfg->crnti,"CELLID:%d Invalid SPS RNTI " + DU_LOG("\nERROR --> SCH : CELLID:%d Invalid SPS RNTI " " in DL SPS Config",ueCfg->cellId); return RFAILED; } @@ -1132,7 +1127,7 @@ RgSchErrInfo *errInfo { if (rgSCHCfgVldtUeDlSpsCfg(*cell, &ueCfg->ueSpsCfg.dlSpsCfg) != ROK) { - RLOG_ARG1(L_ERROR,DBG_CRNTI,ueCfg->crnti,"CELLID:%d Invalid DL SPS configuration" + DU_LOG("\nERROR --> SCH : CELLID:%d Invalid DL SPS configuration" " for the UE",ueCfg->cellId); return RFAILED; } @@ -1142,7 +1137,7 @@ RgSchErrInfo *errInfo /* Validated Periodic CQI/PMI, RI , SRS and SR related UeCfg */ if ( ROK != rgSCHCfgVldtCqiSrSrsUeCfg(*cell, ueCfg, errInfo)) { - RLOG_ARG1(L_ERROR,DBG_CRNTI,ueCfg->crnti,"CELLID:%d Invalid Periodic CQI/SR/SRS" + DU_LOG("\nERROR --> SCH : CELLID:%d Invalid Periodic CQI/SR/SRS" "configuration",ueCfg->cellId); return RFAILED; } @@ -1151,7 +1146,7 @@ RgSchErrInfo *errInfo /* Validate DRX specific parameters */ if ( ROK != rgSCHCfgVldtDrxUeCfg(*cell, &(ueCfg->ueDrxCfg))) { - RLOG_ARG1(L_ERROR,DBG_CRNTI,ueCfg->crnti,"CELLID:%d Invalid DRX configuration", + DU_LOG("\nERROR --> SCH : CELLID:%d Invalid DRX configuration", ueCfg->cellId); return RFAILED; } @@ -1161,7 +1156,7 @@ RgSchErrInfo *errInfo #ifdef RGR_CQI_REPT if (ueCfg->ueCqiReptCfg.numColltdCqiRept > RGR_CQIRPTS_MAXN) { - RLOG_ARG2(L_ERROR,DBG_CRNTI,ueCfg->crnti,"CELLID:%d Invalid numColltdCqiRept," + DU_LOG("\nERROR --> SCH : CELLID:%d Invalid numColltdCqiRept," "MAX supported %d",RGR_CQIRPTS_MAXN,ueCfg->cellId); return RFAILED; } @@ -1173,7 +1168,7 @@ RgSchErrInfo *errInfo { if ( ROK != rgSCHCfgVldtEmtcUeCfg(*cell, &(ueCfg->emtcUeCfg))) { - RLOG_ARG2(L_ERROR,DBG_CRNTI,ueCfg->crnti,"CELLID:%d Invalid EMTC UE configurationfor crnti:%d", + DU_LOG("\nERROR --> SCH : CELLID:%d Invalid EMTC UE configurationfor crnti:%d", ueCfg->cellId, ueCfg->crnti); return RFAILED; } @@ -1225,7 +1220,7 @@ RgSchErrInfo *errInfo if (((*cell) == NULLP) || ((*cell)->cellId != cellRecfg->cellId)) { - RLOG_ARG0(L_ERROR,DBG_CELLID,cellRecfg->cellId,"Cell control block does not exist"); + DU_LOG("\nERROR --> SCH : Cell control block does not exist"); return RFAILED; } @@ -1234,7 +1229,7 @@ RgSchErrInfo *errInfo ((cellRecfg->dlHqRecfg.maxDlHqTx < RGSCH_MIN_HQ_TX) || (cellRecfg->dlHqRecfg.maxMsg4HqTx < RGSCH_MIN_HQ_TX))) { - RLOG_ARG2(L_ERROR,DBG_CELLID,cellRecfg->cellId,"Invalid Downlink HARQ configuration:" + DU_LOG("\nERROR --> SCH : Invalid Downlink HARQ configuration:" " maxDlHqTx %d maxMsg4HqTx %d", cellRecfg->dlHqRecfg.maxDlHqTx, cellRecfg->dlHqRecfg.maxMsg4HqTx); return RFAILED; @@ -1243,7 +1238,7 @@ RgSchErrInfo *errInfo ((cellRecfg->cfiRecfg.cfi < RGSCH_MIN_CFI_VAL) || (cellRecfg->cfiRecfg.cfi > RGSCH_MAX_CFI_VAL))) { - RLOG_ARG1(L_ERROR,DBG_CELLID,cellRecfg->cellId,"Invalid CFI configuration %d", + DU_LOG("\nERROR --> SCH : Invalid CFI configuration %d", cellRecfg->cfiRecfg.cfi); return RFAILED; } @@ -1257,7 +1252,7 @@ RgSchErrInfo *errInfo (cellRecfg->pucchRecfg.deltaShift > RGSCH_PUCCH_MAXVAL_DS)) || (cellRecfg->pucchRecfg.cyclicShift > RGSCH_PUCCH_MAXVAL_CS)) { - RLOG_ARG4(L_ERROR,DBG_CELLID,cellRecfg->cellId,"Invalid PUCCH configuration: " + DU_LOG("\nERROR --> SCH : Invalid PUCCH configuration: " "N2_RB %d N1_PUCCH %d deltaShift %d cyclicShift %d", cellRecfg->pucchRecfg.resourceSize, cellRecfg->pucchRecfg.n1PucchAn, @@ -1270,7 +1265,7 @@ RgSchErrInfo *errInfo { if (cellRecfg->srsRecfg.isSrsCfgSetup && cellRecfg->srsRecfg.srsBwEnum > RGR_SRS_BWCFG_7) { - RLOG_ARG1(L_ERROR,DBG_CELLID,cellRecfg->cellId,"Invalid SRS configuration: " + DU_LOG("\nERROR --> SCH : Invalid SRS configuration: " "srsBw %d", (uint8_t)cellRecfg->srsRecfg.srsBwEnum); return RFAILED; } @@ -1283,7 +1278,7 @@ RgSchErrInfo *errInfo if(cellRecfg->srsRecfg.isSrsCfgSetup && cellRecfg->srsRecfg.srsSubFrameCfg > 14) #endif { - RLOG_ARG0(L_ERROR,DBG_CELLID,cellRecfg->cellId,"Invalid Subframe configuration "); + DU_LOG("\nERROR --> SCH : Invalid Subframe configuration "); return RFAILED; } #endif @@ -1302,12 +1297,12 @@ RgSchErrInfo *errInfo (cellRecfg->rachRecfg.prachResource > (*cell)->bwCfg.ulTotalBw - RGSCH_NUM_RA_RB)) { - RLOG_ARG3(L_ERROR,DBG_CELLID,cellRecfg->cellId,"Invalid RACH configuration:" + DU_LOG("\nERROR --> SCH : Invalid RACH configuration:" " preamble Fmt %d raWinSize %d maxMsg3Tx %d", cellRecfg->rachRecfg.preambleFormat, cellRecfg->rachRecfg.raWinSize, cellRecfg->rachRecfg.maxMsg3Tx); - RLOG_ARG2(L_ERROR,DBG_CELLID,cellRecfg->cellId,"Invalid RACH configuration:" + DU_LOG("\nERROR --> SCH : Invalid RACH configuration:" "numRaPreamble %d sizeRaPreambleGrpA %d", cellRecfg->rachRecfg.numRaPreamble, cellRecfg->rachRecfg.sizeRaPreambleGrpA); @@ -1320,7 +1315,7 @@ RgSchErrInfo *errInfo { if ((rgSCHCfgVldtRgrCellSiCfg(inst, &(cellRecfg->siReCfg))) != ROK) { - RLOG_ARG0(L_ERROR,DBG_CELLID,cellRecfg->cellId,"Validation for SI" + DU_LOG("\nERROR --> SCH : Validation for SI" "Re-configuration failed"); return RFAILED; } @@ -1340,7 +1335,7 @@ RgSchErrInfo *errInfo (RGR_ENABLE == cellRecfg->rgrLteAdvCfg.sfrCfg.status)) || ((*cell)->lteAdvCb.sfrCfg.status == RGR_ENABLE))) { - RLOG_ARG0(L_ERROR,DBG_CELLID,cellRecfg->cellId,"DSFR is enbaled" + DU_LOG("\nERROR --> SCH : DSFR is enbaled" "Without enabling SFR"); return RFAILED; } @@ -1348,7 +1343,7 @@ RgSchErrInfo *errInfo if ((rgSCHCfgVldtRgrCellLteAdvCfg(inst, &(cellRecfg->rgrLteAdvCfg), (*cell)->bwCfg.dlTotalBw)) != ROK) { - RLOG_ARG0(L_ERROR,DBG_CELLID,cellRecfg->cellId,"Validation for Lte Adv" + DU_LOG("\nERROR --> SCH : Validation for Lte Adv" "Re-configuration failed"); return RFAILED; } @@ -1360,13 +1355,13 @@ RgSchErrInfo *errInfo { if (cellRecfg->csgParamCfg.minDlResNonCsg > 100) { - RLOG_ARG0(L_ERROR,DBG_CELLID,cellRecfg->cellId,"Invalid Configuration " + DU_LOG("\nERROR --> SCH : Invalid Configuration " "of minimum DL resources for NON-CSG"); return RFAILED; } if (cellRecfg->csgParamCfg.minUlResNonCsg > 100) { - RLOG_ARG0(L_ERROR,DBG_CELLID,cellRecfg->cellId,"Invalid Configuration " + DU_LOG("\nERROR --> SCH : Invalid Configuration " "of minimum UL resources for NON-CSG"); return RFAILED; } @@ -1414,7 +1409,7 @@ RgSchErrInfo *err RgrUePrdDlCqiCfg *pCqiCfg; #endif - RLOG0(L_INFO, "SCELL recfg received from APP \n"); + DU_LOG("\nINFO --> SCH : SCELL recfg received from APP \n"); RGSCHDBGINFONEW(inst, (rgSchPBuf(inst), "--------------------------------------------------------------------\n" diff --git a/src/5gnrsch/rg_sch_cmn.c b/src/5gnrsch/rg_sch_cmn.c index 2a6cf68be..a4f1406d5 100755 --- a/src/5gnrsch/rg_sch_cmn.c +++ b/src/5gnrsch/rg_sch_cmn.c @@ -44,8 +44,6 @@ #include "rg_sch_inf.h" #include "rg_sch.h" #include "rg_sch_cmn.h" -#include "rl_interface.h" -#include "rl_common.h" /* header/extern include files (.x) */ #include "tfu.x" /* TFU types */ diff --git a/src/5gnrsch/rg_sch_dbm.c b/src/5gnrsch/rg_sch_dbm.c index 801c192ad..cd1534f98 100755 --- a/src/5gnrsch/rg_sch_dbm.c +++ b/src/5gnrsch/rg_sch_dbm.c @@ -50,8 +50,6 @@ #include "rg_sch_inf.x" #include "rg_sch.x" #include "rg_sch_cmn.x" -#include "rl_interface.h" -#include "rl_common.h" /* local defines */ diff --git a/src/5gnrsch/rg_sch_dhm.c b/src/5gnrsch/rg_sch_dhm.c index a2ef1731f..bf93a4f22 100755 --- a/src/5gnrsch/rg_sch_dhm.c +++ b/src/5gnrsch/rg_sch_dhm.c @@ -44,8 +44,6 @@ #include "rg_sch_inf.h" /* typedefs for Scheduler */ #include "rg_sch.h" #include "rg_sch_cmn.h" -#include "rl_interface.h" -#include "rl_common.h" /* header/extern include files (.x) */ #include "lrg.x" diff --git a/src/5gnrsch/rg_sch_drx.c b/src/5gnrsch/rg_sch_drx.c index 267c0d104..0cdfccf89 100755 --- a/src/5gnrsch/rg_sch_drx.c +++ b/src/5gnrsch/rg_sch_drx.c @@ -47,8 +47,6 @@ #include "rg_sch.h" #include "rg_sch_err.h" #include "rg_sch_cmn.h" -#include "rl_interface.h" -#include "rl_common.h" /* header/extern include files (.x) */ #include "tfu.x" /* TFU types */ diff --git a/src/5gnrsch/rg_sch_gom.c b/src/5gnrsch/rg_sch_gom.c index 40c4b1aa2..5dee41a76 100755 --- a/src/5gnrsch/rg_sch_gom.c +++ b/src/5gnrsch/rg_sch_gom.c @@ -43,8 +43,6 @@ invoked by RRM towards MAC. #include "rg_sch_inf.h" #include "rg_sch.h" #include "rg_sch_err.h" -#include "rl_interface.h" -#include "rl_common.h" /* header/extern include files (.x) */ #include "lrg.x" diff --git a/src/5gnrsch/rg_sch_hdfdd.c b/src/5gnrsch/rg_sch_hdfdd.c index 93948f1ac..09d1c487d 100755 --- a/src/5gnrsch/rg_sch_hdfdd.c +++ b/src/5gnrsch/rg_sch_hdfdd.c @@ -45,8 +45,6 @@ #include "rgm.h" #include "rg_sch.h" #include "rg_sch_cmn.h" -#include "rl_interface.h" -#include "rl_common.h" /* header/extern include files (.x) */ #include "tfu.x" /* RGU types */ diff --git a/src/5gnrsch/rg_sch_l2m.c b/src/5gnrsch/rg_sch_l2m.c index 4e2be55d0..d69e38805 100755 --- a/src/5gnrsch/rg_sch_l2m.c +++ b/src/5gnrsch/rg_sch_l2m.c @@ -43,8 +43,6 @@ #include "rg_sch_cmn.h" #include "rg_sch_inf.h" /* typedefs for Scheduler */ #include "rg_sch_err.h" -#include "rl_interface.h" -#include "rl_common.h" /* header/extern include files (.x) */ #include "tfu.x" /* TFU types */ @@ -58,9 +56,6 @@ uint32_t dlPrbCnt; #ifdef LTE_L2_MEAS -static const char* RLOG_MODULE_NAME="MAC"; -static int RLOG_MODULE_ID=4096; -static int RLOG_FILE_ID=166; static S16 rgSchL2mInsertMeasCb ARGS(( RgSchCellCb *cell, diff --git a/src/5gnrsch/rg_sch_lmm.c b/src/5gnrsch/rg_sch_lmm.c index 783459bf5..6e1a089cc 100755 --- a/src/5gnrsch/rg_sch_lmm.c +++ b/src/5gnrsch/rg_sch_lmm.c @@ -48,8 +48,6 @@ #ifdef LTE_L2_MEAS #include "rg_sch_cmn.h" /* typedefs for Scheduler */ #endif -#include "rl_interface.h" -#include "rl_common.h" /* header/extern include files (.x) */ #include "rgr.x" /* RGR Interface includes */ diff --git a/src/5gnrsch/rg_sch_mga.c b/src/5gnrsch/rg_sch_mga.c index cfd0ce788..d57979c42 100755 --- a/src/5gnrsch/rg_sch_mga.c +++ b/src/5gnrsch/rg_sch_mga.c @@ -42,8 +42,6 @@ #include "rg_sch_err.h" #include "rg_sch.h" #include "rg_sch_cmn.h" -#include "rl_interface.h" -#include "rl_common.h" /* header/extern include files (.x) */ #include "tfu.x" /* RGU types */ diff --git a/src/5gnrsch/rg_sch_pwr.c b/src/5gnrsch/rg_sch_pwr.c index fd58f6a94..b4f3c21cf 100755 --- a/src/5gnrsch/rg_sch_pwr.c +++ b/src/5gnrsch/rg_sch_pwr.c @@ -52,8 +52,6 @@ #include "rg_sch_inf.x" /* typedefs for Scheduler */ #include "rg_sch.x" /* typedefs for Scheduler */ #include "rg_sch_cmn.x" -#include "rl_interface.h" -#include "rl_common.h" /* Current specs have 23 dBm as max tx power capability for UEs */ diff --git a/src/5gnrsch/rg_sch_ram.c b/src/5gnrsch/rg_sch_ram.c index d1c2cfb2d..ed7e0025c 100755 --- a/src/5gnrsch/rg_sch_ram.c +++ b/src/5gnrsch/rg_sch_ram.c @@ -46,8 +46,6 @@ #include "rg_sch_err.h" /* Scheduler error defines */ #include "rg_sch.h" /* Scheduler defines */ #include "rg_sch_cmn.h" -#include "rl_interface.h" -#include "rl_common.h" /* header/extern include files (.x) */ diff --git a/src/5gnrsch/rg_sch_sc1.c b/src/5gnrsch/rg_sch_sc1.c index e34e61b98..e8442bd8f 100755 --- a/src/5gnrsch/rg_sch_sc1.c +++ b/src/5gnrsch/rg_sch_sc1.c @@ -45,8 +45,6 @@ #include "rg_sch.h" #include "rg_sch_cmn.h" #include "rg_sch_sc1.h" -#include "rl_interface.h" -#include "rl_common.h" /* header/extern include files (.x) */ #include "tfu.x" /* RGU types */ diff --git a/src/5gnrsch/rg_sch_tmr.c b/src/5gnrsch/rg_sch_tmr.c index 50d59bfc5..34f5c39a2 100755 --- a/src/5gnrsch/rg_sch_tmr.c +++ b/src/5gnrsch/rg_sch_tmr.c @@ -41,8 +41,6 @@ #include "rg_sch_err.h" /* defines and macros for MAC */ #include "rg_sch_inf.h" /* defines and macros for MAC */ #include "rg_sch.h" /* defines and macros for MAC */ -#include "rl_interface.h" -#include "rl_common.h" /* header/extern include files (.x) */ diff --git a/src/5gnrsch/rg_sch_tom.c b/src/5gnrsch/rg_sch_tom.c index 1824267b1..68d065de9 100755 --- a/src/5gnrsch/rg_sch_tom.c +++ b/src/5gnrsch/rg_sch_tom.c @@ -44,8 +44,6 @@ invoked by PHY towards scheduler. #include "rg_sch_inf.h" /* defines and macros for MAC */ #include "rg_sch.h" /* defines and macros for MAC */ #include "rg_sch_cmn.h" /* typedefs for MAC */ -#include "rl_interface.h" -#include "rl_common.h" /* header/extern include files (.x) */ diff --git a/src/5gnrsch/rg_sch_uhm.c b/src/5gnrsch/rg_sch_uhm.c index 895d550da..770b4ada4 100755 --- a/src/5gnrsch/rg_sch_uhm.c +++ b/src/5gnrsch/rg_sch_uhm.c @@ -774,8 +774,7 @@ S16 rgSCHUhmGetAvlHqProc(RgSchCellCb *cell,RgSchUeCb *ue,RgSchUlHqProcCb **hqP if (NULLP == tmp) { - //RLOG_ARG3(L_ERROR,DBG_CELLID,cell->cellId, - // "rgSCHUhmGetAvlHqProc free %ld inUse %ld ue %d" + //DU_LOG("rgSCHUhmGetAvlHqProc free %ld inUse %ld ue %d" // , hqE->free.count, hqE->inUse.count, ue->ueId); //DU_LOG("5GTF_ERROR rgSCHUhmGetAvlHqProc cellId %d %ld inUse %ld ue %d" //, cell->cellId, hqE->free.count, hqE->inUse.count, ue->ueId); diff --git a/src/5gnrsch/rg_sch_utl.c b/src/5gnrsch/rg_sch_utl.c index cdeee4009..e9a89231c 100755 --- a/src/5gnrsch/rg_sch_utl.c +++ b/src/5gnrsch/rg_sch_utl.c @@ -44,8 +44,6 @@ #include "rg_sch.h" #include "rg_sch_cmn.h" #include "rgm.h" -#include "rl_interface.h" -#include "rl_common.h" /* header/extern include files (.x) */ #include "tfu.x" /* TFU types */ diff --git a/src/cm/envopt.h b/src/cm/envopt.h index 42995737e..bb79c4609 100755 --- a/src/cm/envopt.h +++ b/src/cm/envopt.h @@ -889,7 +889,7 @@ #endif /* RG */ /**************************************************************************** - LTE-RLC Section + NR RLC Section ****************************************************************************/ #ifdef KW diff --git a/src/cm/gen.h b/src/cm/gen.h index 14572e50e..c03b263f4 100755 --- a/src/cm/gen.h +++ b/src/cm/gen.h @@ -35,26 +35,6 @@ /* defines */ #define RTLIN_DUMP_DEBUG printf -/* bndCfg.bufOwnshp for xxBndReq */ - -#define SUOWN 0 /* service user (upper layer) owns buffers */ -#define SPOWN 1 /* service provider (lower layer) owns buffers */ - -/* bndCfg.flcTyp for xxBndReq */ - -#define FLCNOTALLOW 0 /* flow control not allowed */ -#define FLCALLOW 1 /* flow control allowed */ - -/* bndCfg.wdw for xxBndReq */ - -#define WDWNOTALLOW 0 /* window not allowed */ - -/* state values (e.g., for an interface) */ - -#define STATE_DISCONNECTED 0x00 /* disconnected state */ -#define STATE_CONNECTING 0x01 /* connecting state */ -#define STATE_CONNECTED 0x02 /* connected state */ -#define STATE_DISCONNECTING 0x03 /* disconnecting state */ /* Protocol Address Structure related defines ..*/ #define MAX_PROTADDR_LEN 16 /* Right now defined for IP, IPX @@ -79,586 +59,17 @@ #define MF_SIZE_TKNSTR 132 /* token string size - regular */ #define MF_SIZE_TKNSTRE 255 /* token string size - extra large */ #define MF_SIZE_TKNBITS 7 /* token bits size */ -#define TP_SIZE_TKNSTR 8 /* token string size */ - -/* gen_h_001.main_133 --- size for extension container, MA_LIMIT_EXTCONT */ -#define MA_MF_EXTCONT_SIZE 20 -/* defines for type of service class */ - -#define FRMRLY 1 /* frame relay */ -#define MACINT 2 /* mac interface */ - -/* defines for ISUP and B-ISUP */ - - -/* subsystem field */ - -#define SSF_INTER 0 /* international subsystem field */ -#define SSF_NAT 2 /* national subsystem field */ - -#define PRI_ZERO 0 /* priority 0 - lowest */ -#define PRI_ONE 1 /* priority 1 */ -#define PRI_TWO 2 /* priority 2 */ - -/* direction of suspend */ - -#define FROM_LWR 1 /* direction from lower */ -#define FROM_UPR 2 /* direction from upper */ -#define MOD15 0x0f /* modulo 15 mask */ #define NOTUSED 0 /* not used */ -#define DIR_OUT 1 -#define DIR_INC 2 - -#define PRESALLOW 0 -#define PRESREST 1 -#define MFROK 0 -#define MFRFAILED 1 -#define MFREOM 2 - /* defines for ATM */ #ifndef CMFILE_REORG_1 -/* special vcc's */ - -#define ATMVPI_SIG 0 /* Q.93B signalling */ -#define ATMVCI_SIG 5 /* Q.93B signalling */ - -#define ATMVPI_ILMI 0 /* ILMI address registration */ -#define ATMVCI_ILMI 16 /* ILMI address registration */ - -/* loss priority */ - -#define ATMLP_HIGH 0 /* high priority */ -#define ATMLP_LOW 1 /* low priority */ - -/* congestion indication */ - -#define ATMCI_NOCONG 0 /* not congested */ -#define ATMCI_CONG 1 /* congested */ - -/* reception status */ - -#define ATMRS_NOERROR 0 /* no error */ -#define ATMRS_ERROR 1 /* error */ - -/* establishement */ - -#define AM_E_DEMAND 0x00 /* demand */ - -/* quality of service classes */ - -#define ATMQOS_CLASS0 0 /* QoS class 0 -unspecified QoS class*/ -#define ATMQOS_CLASS1 1 /* QoS class 1 */ -#define ATMQOS_CLASS2 2 /* QoS class 2 */ -#define ATMQOS_CLASS3 3 /* QoS class 3 */ -#define ATMQOS_CLASS4 4 /* QoS class 4 */ - -/* ATM traffic descriptor octet group identifiers */ - -#define AM_ATD_FPCR_ID0 0x82 /* forward peak cell rate id, CLP = 0 */ -#define AM_ATD_BPCR_ID0 0x83 /* backward peak cell rate id, CLP = 0 */ -#define AM_ATD_FPCR_ID1 0x84 /* forward peak cell rate id, CLP = 0+1 */ -#define AM_ATD_BPCR_ID1 0x85 /* backward peak cell rate id, CLP = 0+1 */ -#define AM_ATD_FSCR_ID0 0x88 /* forward sust. cell rate id, CLP = 0 */ -#define AM_ATD_BSCR_ID0 0x89 /* backward sust. cell rate id, CLP = 0 */ -#define AM_ATD_FSCR_ID1 0x90 /* forward sust. cell rate id, CLP = 0+1 */ -#define AM_ATD_BSCR_ID1 0x91 /* backward sust. cell rate id, CLP = 0+1 */ -#define AM_ATD_FMBS_ID0 0xa0 /* forward mean burst size id, CLP = 0 */ -#define AM_ATD_BMBS_ID0 0xa1 /* backward mean burst size id, CLP = 0 */ -#define AM_ATD_FMBS_ID1 0xb0 /* forward mean burst size id, CLP = 0+1 */ -#define AM_ATD_BMBS_ID1 0xb1 /* backward mean burst size id, CLP = 0+1 */ -#define AM_ATD_BSTEFFRTIND 0xbe /* best effort indicator */ -#define AM_ATD_TFCMGMTOPTID 0xbf /* traffic management options id */ - -/* number of stop bits */ - -#define AM_NSB_UNUSED 0x00 /* none specified */ -#define AM_NSB_1 0x01 /* 1 stop bit */ -#define AM_NSB_15 0x02 /* 1.5 stop bits */ -#define AM_NSB_2 0x03 /* 2 stop bits */ - -/* crankback blocked transit type */ - -#define AM_CBTT_BLKSUCCEND 0x02 /* call or party has been blocked at the - * succeeding end of this interface */ -#define AM_CBTT_BLKNODE 0x03 /* blocked node */ -#define AM_CBTT_BLKLINK 0x04 /* blocked link */ -#define AM_CBTT_BLKBYDSUCC 0xff /* call or party has been blocked at or - * beyond the succeeding node, AINI */ - -/* Specific Crankback level for AINI */ -#define AM_AINI_CBLVL 0xff /* Crankback level for AINI */ - -/* crankback cause indicator */ - -#define AM_CBCAUSE_IND 0x85 /* crankback cause indicator */ - -/* Cranckback and general cause values */ - -#define AM_CV_INVCAUSEVAL 0 /* invalid cause value - proprietary */ -#define AM_CV_UNALLOCNMB 1 /* unallocated (unassigned) number */ -#define AM_CV_NOROUTTRANSNET 2 /* no route to transit network */ -#define AM_CV_NOROUTDST 3 /* no route to destination */ -#define AM_CV_VCCUNACPT 10 /* UNI 3.0: VPCI/VCI unacceptable */ -#define AM_CV_NORMCALLCLR 16 /* UNI 3.1: normal call clearing */ -#define AM_CV_USRBUSY 17 /* user busy */ -#define AM_CV_NOUSRRSP 18 /* no user response */ -#define AM_CV_NOANSUSR 19 /* no answer from user */ -#define AM_CV_CALLREJ 21 /* call rejected */ -#define AM_CV_NMBCHNG 22 /* number changed */ -#define AM_CV_CALLREJCLIR 23 /* user rejects all calls with CLIR */ -#define AM_CV_DSTOUTORD 27 /* destination out of order */ -#define AM_CV_INVNMBFORM 28 /* invalid number format */ -#define AM_CV_RSPSTATENQ 30 /* response to STATUS ENQUIRY */ -#define AM_CV_NORMUNSPEC 31 /* normal unspecified */ -#define AM_CV_PNDADDPTYREQ 32 /* PNNI: too many pending add party requests */ -#define AM_CV_CHNGINPGL 34 /* PNNI: Call cleared due to change in PGL */ -#define AM_CV_REQVCCUNAVAIL 35 /* requested VPCI/VCI unavailable */ -#define AM_CV_VCCFAIL 36 /* UNI 3.1: VPCI/VCI assignment failure */ -#define AM_CV_RATEUNAVAIL1 37 /* UNI 3.1: user cell rate unavailable */ -#define AM_CV_NETOUTORD 38 /* network out of order */ -#define AM_CV_TMPFAIL 41 /* Temporary failure */ -#define AM_CV_ACCINFODISC 43 /* access info discarded */ -#define AM_CV_NOVCCAVAIL 45 /* no VPCI/VCI unavailable */ -#define AM_CV_RESAIL 47 /* resources unavailable, unspecified */ -#define AM_CV_QOSUNAVAIL 49 /* Quality of Service unavailable */ -#define AM_CV_RATEUNAVAIL 51 /* UNI 3.0: user cell rate unavailable */ -#define AM_CV_REQPVPCVCCUNAV 53 /* PNNI: Requested Called party soft PVPC/PVCC not available */ -#define AM_CV_BCAPNOTAUTH 57 /* bearer capability not authorized */ -#define AM_CV_BCAPUNAVAIL 58 /* bearer capability not available */ -#define AM_CV_SRVUNAVAIL 63 /* Service or option unavailable */ -#define AM_CV_BCAPNOTIMPL 65 /* bearer capability not implemented */ -#define AM_CV_COMBUNSUPP 73 /* unsupported comb. of traffic parameters */ -#define AM_CV_AALPARMUNSUPP1 78 /* UNI 3.1: AAL paramteres cannot be supported */ -#define AM_CV_INVCALLREF 81 /* invalid call reference */ -#define AM_CV_CHANNOTEXST 82 /* identified channel does not exist */ -#define AM_CV_DSTNOTCOMP 88 /* incompatible destination */ -#define AM_CV_INVENDPTREF 89 /* invalid endpoint reference */ -#define AM_CV_INVTRANSNET 91 /* invalid transit network selection */ -#define AM_CV_MANYADDPTYREQ 92 /* too many add party requests */ -#define AM_CV_AALPARMUNSUPP 93 /* UNI 3.0:AAL paramteres cannot be supported */ -#define AM_CV_INFOELMSSG 96 /* mandatory info element is missing */ -#define AM_CV_MSGTYPNOTIMPL 97 /* message type not implemented */ -#define AM_CV_INFOELNOTIMPL 99 /* info element not implemented */ -#define AM_CV_INVINFOEL 100 /* invalid info element */ -#define AM_CV_MSGNOTCOMP 101 /* msg type not compatible with call st */ -#define AM_CV_TMRRCVRY 102 /* recovery on timer expiry */ -#define AM_CV_INVMSGLEN 104 /* incorrect message length */ -#define AM_CV_PROTERR 111 /* protocol error, unspecified */ -#define AM_CV_OPTELMERR 127 /* opt info el content error (non-std) */ -#define AM_CV_NOROUTNEXTNODE 128 /* next node unreachable */ -#define AM_CV_DTLNOTMYNODE 160 /* DTL Transit not my node ID */ - -/* AAL type */ - -#define AM_AALTYP_0 0x00 /* AAL for voice */ -#define AM_AALTYP_1 0x01 /* AAL type 1 */ -#define AM_AALTYP_2 0x02 /* AAL type 2 */ -#define AM_AALTYP_34 0x03 /* AAL type 3/4 */ -#define AM_AALTYP_5 0x05 /* AAL type 5 */ -#define AM_AALTYP_USR 0x10 /* user defined AAL */ - -/* AAL type 1 - identifiers */ -#define AM_AAL1_ID_STYPE 0x85 /* AAL Subtype ID */ -#define AM_AAL1_ID_CBR 0x86 /* CBR Rate ID */ -#define AM_AAL1_ID_MULT 0x87 /* Multiplier Identifier */ -#define AM_AAL1_ID_SCFRM 0x88 /* Source Clock Freq. Recovery Method Id */ -#define AM_AAL1_ID_ECM 0x89 /* Error correction Method Id */ -#define AM_AAL1_ID_SDTB 0x8A /* Structured Data Transfer Blocksize Id */ -#define AM_AAL1_ID_PFC 0x8B /* Partially filled cells Id */ - -/* AAL type 1 subtypes */ -#define AM_AAL1_STYPE_NULL 0x00 /* Null/Empty */ -#define AM_AAL1_STYPE_VOICE 0x01 /* Voice-band based on 64 kbit/s */ -#define AM_AAL1_STYPE_SCKT 0x02 /* Synchronous circuit Emulation */ -#define AM_AAL1_STYPE_ACKT 0x03 /* Asynchronous circuit Emulation */ -#define AM_AAL1_STYPE_HQAUD 0x04 /* High Quality Audio */ -#define AM_AAL1_STYPE_VIDEO 0x05 /* Video */ - -/* AAL type 1 CBR rates */ -#define AM_AAL1_CBR_64 0x01 /* 64 kbit/s */ -#define AM_AAL1_CBR_1544 0x04 /* 1544 kbit/s (DS1) */ -#define AM_AAL1_CBR_6312 0x05 /* 6312 kbit/s (DS2) */ -#define AM_AAL1_CBR_32064 0x06 /* 32064 kbit/s */ -#define AM_AAL1_CBR_44736 0x07 /* 44736 kbit/s (DS3) */ -#define AM_AAL1_CBR_97728 0x08 /* 97728 kbit/s */ -#define AM_AAL1_CBR_2048 0x10 /* 2048 kbit/s (E1) */ -#define AM_AAL1_CBR_8448 0x11 /* 8448 kbit/s (E2) */ -#define AM_AAL1_CBR_34368 0x12 /* 34368 kbit/s (E3) */ -#define AM_AAL1_CBR_139264 0x13 /* 139264 kbit/s */ -#define AM_AAL1_CBR_nx64 0x40 /* n x 64 kbit/s */ -#define AM_AAL1_CBR_nx8 0x41 /* n x 8 kbit/s */ - -/* AAL type 1 Clock recovery types */ -#define AM_AAL1_SCFRM_NULL 0x00 /* Null */ -#define AM_AAL1_SCFRM_SRTS 0x01 /* Synchronous Residual Time Stamp */ -#define AM_AAL1_SCFRM_ACR 0x02 /* Adaptive clock Recovery */ - -/* AAL type 1 Error Correction types */ -#define AM_AAL1_ECM_NULL 0x00 /* NULL */ -#define AM_AAL1_ECM_FEC 0x01 /* Interleaved FEC */ -#define AM_AAL1_ECM_DSST 0x02 /* For delay sensitive signal transport */ - -/* AAL type 1 Structured Data Transfer */ -#define AM_AAL1_SDTB_NULL 0x00 /* NULL */ -#define AM_AAL1_SDTB_SDT 0x01 /* Structured Data Transfer */ - -/* AAL type 5 & 3/4 - identifiers */ -#define AM_AAL5_ID_FMSDU 0x8c /* forward maximum CPCS SDU size id */ -#define AM_AAL5_ID_BMSDU 0x81 /* backward maximum CPCS SDU size id */ -#define AM_AAL5_ID_MIDRNG 0x82 /* Mid Range Id */ -#define AM_AAL5_ID_MODE 0x83 /* mode identifier */ -#define AM_AAL5_ID_SSCS 0x84 /* SSCS type identifier */ - -/* AAL type 5 & 3/4 - mode of operation */ - -#define AM_AAL5_MODE_MSG 0x01 /* message mode */ -#define AM_AAL5_MODE_STREAM 0x02 /* streaming mode */ - -/* AAL type 5 - SSCS type */ - -#define AM_AAL5_SSCS_NULL 0x00 /* null SSCS */ -#define AM_AAL5_SSCS_SSCOP_A 0x01 /* SSCOP assured mode SSCS */ -#define AM_AAL5_SSCS_SSCOP_N 0x02 /* SSCOP non-assured mode SSCS */ -#define AM_AAL5_SSCS_FR 0x04 /* frame relay SSCS */ - -/* bearer class */ - -#define AM_BCOB_A 0x01 /* bearer class A */ -#define AM_BCOB_C 0x03 /* bearer class C */ -#define AM_BCOB_X 0x10 /* bearer class X */ - -/* timing requirement */ - -#define AM_TMGREQ_NOIND 0 /* no indication */ -#define AM_TMGREQ_ETOEREQ 1 /* end-to-end timing required */ -#define AM_TMGREQ_ETOENOTREQ 2 /* end-to-end timing not required */ - -/* traffic type */ - -#define AM_TFCTYP_NOIND 0 /* no indication */ -#define AM_TFCTYP_CBR 1 /* constant bit rate */ -#define AM_TFCTYP_VBR 2 /* variable bit rate */ - -/* user plane connection configuration */ - -#define AM_CONCFG_PTPT 0 /* point to point */ -#define AM_CONCFG_PTMPT 1 /* point to multipoint */ - -/* susceptability to clipping */ - -#define AM_SUSCLP_NO 0 /* not susceptible to clipping */ -#define AM_SUSCLP_YES 1 /* susceptible to clipping */ - -/* layer 1 identity */ - -#define AM_L1_IDENT 0x01 /* layer 1 identity */ - -/* layer 2 identity */ - -#define AM_L2_IDENT 0x02 /* layer 2 identity */ - -/* layer 3 identity */ - -#define AM_L3_IDENT 0x03 /* layer 3 identity */ - -/* user information layer 1 */ - -#define AM_UIL1_CCITTV110 0x01 /* CCITT Standardized Rate Adaptation V.110/X.30. */ -#define AM_UIL1_G711ULAW 0x02 /* Reccomendation G.711 u-Law */ -#define AM_UIL1_G711ALAW 0x03 /* Recommendation G.711 A-Law */ -#define AM_UIL1_G721ADCPM 0x04 /* Recommendation G.721 32 kbit/s ADCPM and */ - /* Recommendation I.460 */ -#define AM_UIL1_G722G725 0x05 /* Recommendation G.722 and G.725 - 7kHz Audio */ -#define AM_UIL1_H261 0x06 /* Recommendation H.261 - 384 kbit/s Video */ -#define AM_UIL1_NONCCITT 0x07 /* Non-CCITT standardized Rate adaptation */ -#define AM_UIL1_CCITTV120 0x08 /* CCITT Standardized Rate Adaptation V.120 */ -#define AM_UIL1_CCITTX31 0x09 /* CCITT Standardized Rate Adaptation X.31 HDLC */ - -/* user information layer 2 protocol */ - -#define AM_UIL2_BASIC 0x01 /* basic mode - ISO 1745 */ -#define AM_UIL2_Q921 0x02 /* CCITT Recommendation Q.921 */ -#define AM_UIL2_X25SLP 0x06 /* CCITT Recommendation X.25, single link */ -#define AM_UIL2_X25MLP 0x07 /* CCITT Recommendation X.25, multi link */ -#define AM_UIL2_T71 0x08 /* extended LAPB for half duplex, */ - /* CCITT Recommendation T.71 */ -#define AM_UIL2_HDLCARM 0x09 /* HDLC ARM - ISO 4335 */ -#define AM_UIL2_HDLCNRM 0x0a /* HDLC NRM - ISO 4335 */ -#define AM_UIL2_HDLCABM 0x0b /* HDLC ABM - ISO 4335 */ -#define AM_UIL2_LANLLC 0x0c /* LAN LLC - ISO 8802/2 */ -#define AM_UIL2_X75SLP 0x0d /* CCITT Recommendation X.75, single link */ -#define AM_UIL2_Q922 0x0e /* CCITT Recommendation Q.922 */ -#define AM_UIL2_USRSPEC 0x10 /* CCITT User specified */ -#define AM_UIL2_T90 0x11 /* CCITT T.90 */ - -/* Layer 2/3 Operation Mode */ -#define AM_LOLYR_OPR_NORM 0x01 /* Normal mode of operation */ -#define AM_LOLYR_OPR_EXT 0x02 /* Extended mode of operation */ - -/* user information layer 3 protocol */ - -#define AM_UIL3_Q931 0x02 /* CCITT Recommendation Q.931 */ -#define AM_UIL3_T90 0x05 /* CCITT T.90 */ -#define AM_UIL3_X25PLP 0x06 /* CCITT Recommendation X.25, packet layer */ -#define AM_UIL3_ISO8208 0x07 /* ISO 8208 */ -#define AM_UIL3_ISO8348 0x08 /* ISO 8348 */ -#define AM_UIL3_ISO8473 0x09 /* ISO 8473 */ -#define AM_UIL3_T70 0x0a /* CCITT Recommendation T.70 */ -#define AM_UIL3_ISO9577 0x0b /* ISO/IEC TR 9577 */ -#define AM_UIL3_USRSPEC 0x10 /* CCITT User specified */ - -/* presentation method of protocol profile */ - -#define AM_PM_VAL1 0x01 /* value 1 */ - -/* information transfer mode */ - -#define AM_TM_CIRCUIT 0x00 /* circuit mode */ -#define AM_TM_PACKET 0x02 /* packet mode */ - -/* information transfer capability */ - -#define AM_ITC_SPEECH 0x00 /* speech */ -#define AM_ITC_UNRDIG 0x08 /* unrestricted digital information */ -#define AM_ITC_RESDIG 0x09 /* restricted digital information */ -#define AM_ITC_A31KHZ 0x10 /* 3.1kHz audio */ -#define AM_ITC_A7KHZ 0x11 /* 7 kHz audio */ -#define AM_ITC_A15KHZ 0x12 /* 15 kHz audio */ -#define AM_ITC_VIDEO 0x18 /* video */ - -/* information transfer rate */ - -#define AM_ITR_PKT 0x00 /* packet mode */ -#define AM_ITR_64KBIT 0x10 /* circuit mode - 64 kbits */ -#define AM_ITR_2X64KBIT 0x11 /* circuit mode - 2 X 64 kbits */ -#define AM_ITR_384KBIT 0x13 /* circuit mode - 384 kbits */ -#define AM_ITR_1472KBIT 0x14 /* circuit mode - 1472 kbits */ -#define AM_ITR_1536KBIT 0x15 /* circuit mode - 1536 kbits */ -#define AM_ITR_1920KBIT 0x17 /* circuit mode - 1920 kbits */ -#define AM_ITR_MULIRATE 0x18 /* circuit mode - multi rate */ - -/* symmetry */ - -#define AM_S_BISYM 0x00 /* bidirectional symmetry */ - -/* structure */ - -#define AM_S_DEF 0x00 /* default */ -#define AM_S_8KHZINTEG 0x01 /* 8 khz integrity */ -#define AM_S_SDUINTEG 0x04 /* service data unit integrity */ -#define AM_S_UNSTRUCT 0x07 /* unstructured */ - -/* intermediate rate */ - -#define AM_IR_NONE 0x00 /* none specified */ -#define AM_IR_8KBIT 0x01 /* 8 kbits */ -#define AM_IR_16KBIT 0x02 /* 16 kbits */ -#define AM_IR_32KBIT 0x03 /* 32 kbits */ - -/* negotiation */ - -#define AM_N_IBNOTPOSS 0x00 /* inband not possible */ -#define AM_N_IBPOSS 0x01 /* inband possible */ - - /* negotiation indicator */ - -#define AM_N_OBNOTPOSS 0x00 /* outband not possible */ -#define AM_N_OBPOSS 0x01 /* outband possible */ - -/* synchronous/asynchronous */ - -#define AM_SA_SYNC 0x00 /* synchronous */ -#define AM_SA_ASYNC 0x01 /* asynchronous */ - -/* assignor/assignee */ - -#define AM_AA_ORGASGNEE 0x00 /* originator is assignee */ -#define AM_AA_ORGASGNOR 0x01 /* originator is assignor */ - -/* duplex mode */ - -#define AM_DUPMODE_HALF 0x00 /* half duplex */ -#define AM_DUPMODE_FULL 0x01 /* full duplex */ - -/* mode of operation */ - -#define AM_MOO_BITTRANS 0x00 /* bit transparent */ -#define AM_MOO_PROTSEN 0x01 /* protocol sensitive */ - -/* multiple frame establishment */ - -#define AM_MFE_NOTSUP 0x00 /* not supported */ -#define AM_MFE_SUP 0x01 /* supported */ - -/* logical link identifier */ - -#define AM_LLI_DEF 0x00 /* default */ -#define AM_LLI_FULLNEG 0x01 /* full protocol negotiation */ - -/* inband/outband negotiation */ - -#define AM_ION_USRINFO 0x00 /* negotiation with user info messages */ -#define AM_ION_LL0 0x01 /* negotiation in band using logical link 0 */ - -/* narrow band coding standards */ - -#define AM_CSTD_CCITT 0x00 /* CCITT standards */ -#define AM_CSTD_INT 0x01 /* Other International Standards */ -#define AM_CSTD_NAT 0x02 /* National Standard */ -#define AM_CSTD_NET 0x03 /* Network Standard */ - -/* coding standard */ - -#define AM_CODESTD_CCITT 0 /* ITU-TS (CCITT) standardized */ -#define AM_CODESTD_NET 3 /* ATM Forum specific */ - -/* location */ - -#define AM_LOCN_USER 0x00 /* user */ -#define AM_LOCN_PRVNETLOC 0x01 /* private network serving local user */ -#define AM_LOCN_PUBNETLOC 0x02 /* public network serving local user */ -#define AM_LOCN_TRNSNET 0x03 /* transit network */ -#define AM_LOCN_PUBNETRMT 0x04 /* public network serving remote user */ -#define AM_LOCN_PRVNETRMT 0x05 /* private network serving remote user */ -#define AM_LOCN_INTNET 0x07 /* international network */ -#define AM_LOCN_NETINTWRK 0x0a /* network beyond interworking point */ - -/* extended high layer characteristics */ - -#define AM_XHLCI_TEL 0x01 /* Telephony - Recommendation G.711 */ -#define AM_XHLCI_FAXG4 0x04 /* Facsimile Group 4 - Recommendation T.62 */ -#define AM_XHLCI_DAPFAXG4 0x21 /* Doc App Profile for Facsimile Group 4 */ - /* Recommendation T.503 */ -#define AM_XHLCI_DAPMIXED 0x24 /* Doc App Profile for Facsimile Group 4 */ - /* Recommendation T.501 */ -#define AM_XHLCI_DAPPROC 0x28 /* Doc App Profile for Facsimile Group 4 */ - /* Recommendation T.502 */ -#define AM_XHLCI_TELETEX 0x31 /* Teletex - Recommendation T.62/T.70 */ -#define AM_XHLCI_DAPVIDEO 0x32 /* Doc App Profile for Facsimile Group 4 */ - /* Recommendation T.503 */ -#define AM_XHLCI_TELEX 0x35 /* Telex */ -#define AM_XHLCI_MHS 0x38 /* Message Handling System */ - /* Recommendation X.400 */ -#define AM_XHLCI_OSIAPP 0x41 /* OSI Application - Recommendation X.200 */ -#define AM_XHLCI_MAINT 0x5e /* Maintenance */ -#define AM_XHLCI_MNGMT 0x5f /* Management */ -#define AM_XHLCI_VIDTEL 0x60 /* Videotelephony (F.xyz and AV.242) */ -#define AM_XHLCI_RESERVE 0xff /* Reserved */ - - -/* ATM Traffic Descriptor tagging */ - -#define AM_ATD_TAGNOTREQ 0 /* tagging not requested */ -#define AM_ATD_TAGREQ 1 /* tagging requested */ - -/* ATM Traffic Descriptor Frame discard */ - -#define AM_ATD_NOFRMDISC 0 /* frame discard not allowed */ -#define AM_ATD_FRMDISC 1 /* frame discard allowed */ - -/* ATM Traffic Descriptor ABR specific token identifier */ - -#define AM_ATD_ABR_FMCR_ID 0x92 /* Forward ABR minimum cell rate identifier */ -#define AM_ATD_ABR_BMCR_ID 0x93 /* Forward ABR minimum cell rate identifier */ - -/* crankback level indicator */ - -#define AM_CBLEVEL_IND 0x81 /* crankback level indicator */ - -/* succeeding end block indicator */ - -#define AM_ENDBLK_IND 0x82 /* succeeding end block indicator */ - -/* blocked node indicator */ - -#define AM_BLKNODE_IND 0x83 /* blocked node indicator */ - -/* blocked link indicator */ - -#define AM_BLKLINK_IND 0x84 /* blocked link indicator */ - -/* connection level id */ - -#define AM_CONLEVEL_ID 0x81 /* connection level id */ - -/* connection level */ - -#define AM_CONLEVEL_VCC 0x01 /* virtual channel connection */ -#define AM_CONLEVEL_VPC 0x02 /* virtual path connection */ - -/* VPI/VCI selection type */ - -#define AM_VPCSEL_ANY 0x00 /* any VPI/VCI */ -#define AM_VPCSEL_REQ 0x02 /* required VPI/VCI */ -#define AM_VPCSEL_ASSGN 0x04 /* assigned VPI/VCI */ - -/* VPI id */ - -#define AM_VPI_ID 0x81 /* VPI id */ - -/* VCI id */ - -#define AM_VCI_ID 0x82 /* VCI id */ - -/* shaping indicator */ - -#define AM_SHAPIND_NOREQ 0x00 /* no user requirement */ -#define AM_SHAPIND_NOAGG 0x01 /* no aggregation of user and OAM cells */ - -/* payload types */ - -#define ATMPT_USR 0 /* user cells */ -#define ATMPT_RM 1 /* RM cells */ -#define ATMPT_OAM 2 /* OAM cells */ - -/* values for lnkNmb parameter */ - -#define AMT_CON_LNK_UNUSED 0xffff /* link number field not significant */ - - -/* defines for LAN emulation */ - /* MAC address length */ #define MACADDRLEN 6 /* 48 bit MAC address length */ -/* LANE and MAC header length */ - -#define LANE_HDR_LEN 2 /* 2 octet LANE header length */ -#define LANE_MACHDR_LEN 14 /* 802.3 (DA/SA/Len), 802.5 (AC/FC/DA/SA) */ - -/* Additional broadband repeat indicators */ - -#define AM_REPIND_Q2763_1 0x00 /* reserved for use by Rec. Q.2763 */ -#define AM_REPIND_Q2763_2i 0x01 /* reserved for use by Rec. Q.2763 */ - -/* values for AC/FC fields - to be ignored */ - -#define LANE_HDR_8025_AC 0x00 /* no significance */ -#define LANE_HDR_8025_FC 0x40 /* LLC frame, priority 0 */ - -/* value for pad octets */ - -#define LANE_PAD 0x00 /* pad octets */ - -/* source routed frame types */ - -#define LANE_FRAMETYPE_NSR 0x00 /* not source routed */ -#define LANE_FRAMETYPE_SRF 0x01 /* specifically routed frame */ -#define LANE_FRAMETYPE_ARE 0x02 /* all routes explorer frame */ -#define LANE_FRAMETYPE_STE 0x03 /* spanning tree explorer frame */ -#define LANE_FRAMETYPE_ERR 0x04 /* illegal frame type */ - -/* next hop types for SRF frames */ - -#define LANE_NEXTHOP_NONE 0x00 /* no hop */ -#define LANE_NEXTHOP_LAST 0x01 /* last hop */ -#define LANE_NEXTHOP_MORE 0x02 /* more hops */ - /* maximum sizes for typedef arrays */ #define MAX_LANNAME 32 /* size of LAN name string */ @@ -667,202 +78,15 @@ #define MAX_TLV_LEN 4 /* max length of value in TLV entry */ #define MAX_TLV_TBL 16 /* size of TLV table */ -/* marker (special LEC id) */ - -#define LANE_MARKER_CTRL 0xff00 /* control frame marker */ - -/* LAN emulation protocol */ - -#define LANE_PROTOCOL 0x01 /* LAN Emulation protocol */ - -/* LAN emulation protocol version */ - -#define LANE_VERSION 0x01 /* LAN Emulation protocol version */ - -/* op code type */ - -#define LANE_OPCODE_TYPE_REQ 0x00 /* request frame */ -#define LANE_OPCODE_TYPE_RSP 0x01 /* response frame */ - -/* op code name */ - -#define LANE_OPCODE_CFGREQ 0x0001 /* configuration request frame */ -#define LANE_OPCODE_CFGRSP 0x0101 /* configuration response frame */ -#define LANE_OPCODE_JOINREQ 0x0002 /* join request frame */ -#define LANE_OPCODE_JOINRSP 0x0102 /* join response frame */ -#define LANE_OPCODE_READYQUERY 0x0003 /* ready query frame */ -#define LANE_OPCODE_READYIND 0x0103 /* ready indication frame */ -#define LANE_OPCODE_REGREQ 0x0004 /* register request frame */ -#define LANE_OPCODE_REGRSP 0x0104 /* register response frame */ -#define LANE_OPCODE_UNREGREQ 0x0005 /* unregister request frame */ -#define LANE_OPCODE_UNREGRSP 0x0105 /* unregister response frame */ -#define LANE_OPCODE_ARPREQ 0x0006 /* configuration request frame */ -#define LANE_OPCODE_ARPRSP 0x0106 /* configuration response frame */ -#define LANE_OPCODE_FLUSHREQ 0x0007 /* flush request frame */ -#define LANE_OPCODE_FLUSHRSP 0x0107 /* flush response frame */ -#define LANE_OPCODE_NARPREQ 0x0008 /* negative ARP request frame */ -#define LANE_OPCODE_TOPCHREQ 0x0009 /* topology change request frame */ - -/* status */ - -#define LANE_STA_SUCCESS 0 /* success */ -#define LANE_STA_UNSUPPVER 1 /* version not supported */ -#define LANE_STA_INVPARAM 2 /* invalid request parameters */ -#define LANE_STA_DUPLANDST 4 /* duplicate LAN destination */ -#define LANE_STA_DUPATMADDR 5 /* duplicate ATM address */ -#define LANE_STA_RESAIL 6 /* insufficient resources to grant request */ -#define LANE_STA_NOACCESS 7 /* access denied */ -#define LANE_STA_INVLECID 8 /* invalid requestor-LECID */ -#define LANE_STA_INVLANDST 9 /* invalid LAN destination */ -#define LANE_STA_INVATMADDR 10 /* invalid ATM address */ -#define LANE_STA_NOCFG 20 /* no configuration */ -#define LANE_STA_LECSERR 21 /* LECS error */ -#define LANE_STA_INFOUNAVAIL 22 /* insufficient information */ - -/* non-standard status values, for internal use */ - -#define LANE_STA_INVCTRL 0x0f00 /* invalid control frame - unspecified */ - -/* flag values */ - -#define LANE_FLAG_RMTADDR 0x0001 /* remote address (unreg LAN dst) */ -#define LANE_FLAG_PROXY 0x0080 /* LEC acts as proxy */ -#define LANE_FLAG_TOPCH 0x0100 /* topology change */ - -/* tag values for LAN destination type */ - -#define LANE_TAG_NOTPRSNT 0x0000 /* not present */ -#define LANE_TAG_MACADDR 0x0001 /* MAC address */ -#define LANE_TAG_RD 0x0002 /* route designator */ - -/* LAN type */ - -#define LANE_LANTYPE_UNSPECIFIED 0x00 /* unspecified */ -#define LANE_LANTYPE_8023 0x01 /* IEEE 802.3/Ethernet */ -#define LANE_LANTYPE_8025 0x02 /* IEEE 802.5/Token Ring */ - -/* min frame size - values */ - -#define LANE_MIN_DATA_8023 62 /* minimum AAL SDU size for IEEE 802.3 data */ -#define LANE_MIN_DATA_8025 16 /* minimum AAL SDU size for IEEE 802.5 data */ -#define LANE_MIN_CTRL 108 /* minimum AAL SDU size for control frame */ - -/* max frame size - index */ - -#define LANE_MTU_IDX_UNSPECIFIED 0x00 /* unspecified */ -#define LANE_MTU_IDX_ENET 0x01 /* 1516 octets IEEE 802.3 */ -#define LANE_MTU_IDX_TR_4 0x02 /* 4544 octets IEEE 802.5 4Mbps */ -#define LANE_MTU_IDX_RFC1626 0x03 /* 9234 octets RFC 1626 */ -#define LANE_MTU_IDX_TR_16 0x04 /* 18190 octets IEEE 802.5 16Mbps */ - -/* max frame size - values */ - -#define LANE_MTU_VAL_UNSPECIFIED 0 /* unspecified */ -#define LANE_MTU_VAL_ENET 1516 /* 1516 octets IEEE 802.3 */ -#define LANE_MTU_VAL_TR_4 4544 /* 4544 octets IEEE 802.5 4Mbps */ -#define LANE_MTU_VAL_RFC1626 9234 /* 9234 octets RFC 1626 */ -#define LANE_MTU_VAL_TR_16 18190 /* 18190 octets IEEE 802.5 16Mbps */ - -/* VCC nature */ - -#define VCC_NATURE_PVC 0 /* permanent virtual circuit */ -#define VCC_NATURE_SVC 1 /* switched virtual circuit */ -#define VCC_NATURE_PVC_SVC 2 /* mixed PVC/SVC */ - -/* VCC type (values from LEC MIB) */ - -#define LANE_VCC_TYPE_CTRL_DIR 0 /* control direct VCC */ -#define LANE_VCC_TYPE_CTRL_DIST 1 /* control distribute VCC */ -#define LANE_VCC_TYPE_MCAST_SND_8023 2 /* multicast send VCC for 802.3 */ -#define LANE_VCC_TYPE_MCAST_FWD_8023 3 /* multicast forward VCC for 802.3 */ -#define LANE_VCC_TYPE_MCAST_SND_8025 4 /* multicast send VCC for 802.5 */ -#define LANE_VCC_TYPE_MCAST_FWD_8025 5 /* multicast forward VCC for 802.5 */ -#define LANE_VCC_TYPE_DATA_DIR_8023 6 /* data direct VCC for 802.3 */ -#define LANE_VCC_TYPE_DATA_DIR_8025 7 /* data direct VCC for 802.5 */ -#define LANE_VCC_TYPE_UNKNOWN 8 /* unclassified VCC */ -#define LANE_VCC_TYPE_CFG_DIR 9 /* cfg direct VCC */ - -/* LAN destination proxy class */ - -#define LANE_CLASS_LOCAL 0 /* local LAN destination */ -#define LANE_CLASS_PROXY 1 /* proxy LAN destination */ - -/* LAN destination mode (type) */ - -#define LANE_LDMODE_UCAST_MACADDR 0 /* unicast MAC address */ -#define LANE_LDMODE_MCAST_MACADDR 1 /* multicast MAC address */ -#define LANE_LDMODE_MCAST_ALLGRP 2 /* all group addresses */ -#define LANE_LDMODE_MACADDR 3 /* MAC address */ -#define LANE_LDMODE_RD 4 /* route descriptor */ -#define LANE_LDMODE_UCAST_ALLUNI 5 /* all unicast addresses */ - -/* configuration mode */ - -#define LANE_CFGMODE_AUTO 0 /* auto cfg (use LECS ATM addr) */ -#define LANE_CFGMODE_MANUAL 1 /* manual cfg (use LES ATM addr) */ - -/* ATM Forum OUI - 3 octets */ - -#define OUI_ATMF 0x00a03e /* ATM Forum OUI */ - -/* LAN Emulation Protocol Ids - 2 octets */ - -#define LANE_PID_CTRL 0x0001 /* control VCCs */ -#define LANE_PID_DATA_DIR_8023 0x0002 /* data direct VCCs for IEEE 802.3 */ -#define LANE_PID_DATA_DIR_8025 0x0003 /* data direct VCCs for IEEE 802.5 */ -#define LANE_PID_MCAST_8023 0x0004 /* multicast VCCs for IEEE 802.3 */ -#define LANE_PID_MCAST_8025 0x0005 /* multicast VCCs for IEEE 802.5 */ - -/* LAN Emulation standard TLV types - 4 octets */ - -#define LANE_TLV_C7 0x00a03e01 /* control timer */ -#define LANE_TLV_C10 0x00a03e02 /* max unknown frame count */ -#define LANE_TLV_C11 0x00a03e03 /* max unknown frame timer */ -#define LANE_TLV_C12 0x00a03e04 /* VCC aging timer */ -#define LANE_TLV_C13 0x00a03e05 /* max retry count */ -#define LANE_TLV_C17 0x00a03e06 /* ARP long (cache) timer */ -#define LANE_TLV_C18 0x00a03e07 /* ARP short (fwd delay) timer */ -#define LANE_TLV_C20 0x00a03e08 /* ARP Request timer */ -#define LANE_TLV_C21 0x00a03e09 /* Flush Request timer */ -#define LANE_TLV_C22 0x00a03e0a /* path switching delay */ -#define LANE_TLV_C23 0x00a03e0b /* local segment id */ -#define LANE_TLV_C24 0x00a03e0c /* mcast snd VCC type */ -#define LANE_TLV_C25 0x00a03e0d /* mcast snd VCC SCR */ -#define LANE_TLV_C26 0x00a03e0e /* mcast snd VCC PCR */ -#define LANE_TLV_C28 0x00a03e0f /* Ready Ind timer */ #endif /* CMFILE_REORG_1 */ - - -/* structure */ - -#define S_DEF 0x00 /* default */ -#define S_8KHZINTEG 0x01 /* 8 khz integrity */ -#define S_SDUINTEG 0x04 /* service data unit integrity */ -#define S_UNSTRUCT 0x07 /* unstructured */ - -/* define for TCAP string size */ -/* gen_h_001.main_128 - redefined value of MAX_ST_STRING to 256 */ -#define MAX_ST_STRING 256 /* longest string */ - - /* defines for SPstTsk */ #define SEL_LC_NEW 0 /* loosely coupled interface - new */ #define SEL_LC_OLD 1 /* loosely coupled interface - old */ -/* defines for system service entity processor, region and pool id's */ - -#define OWNPROCID 0 /* own processor id */ -#define SP_POOL 0x00 /* service provider pool id */ -#define SU_POOL 0x00 /* service user pool id */ - -/* defines for stack manager region and pool id's */ - -#define SMREGION 1 /* stack manager region id */ -#define SMPOOL 0 /* stack manager pool id */ /* defines */ @@ -872,6 +96,7 @@ #define TCNTRL 2 /* control */ #define TSTS 3 /* statistics */ #define TSSTA 4 /* solicited status */ +#if 0 #define TUSTA 5 /* unsolicited status */ #define TTRC 6 /* trace */ #define TACNT 7 /* billing */ @@ -885,17 +110,19 @@ #define TMIB 15 /* mib req */ /* gen_h_001.main_124 RRC 2.0 Release*/ #define TAUDT 16 /* Audit req */ - +#endif + /* Mngmt.hdr.elmId.elmnt */ #define STGEN 1 /* general */ +#define STSID 8 /* system id */ +#if 0 #define STTSAP 2 /* transport SAP */ #define STNSAP 3 /* network SAP */ #define STLLSAP 4 /* logical link SAP */ #define STDLSAP 5 /* data link SAP */ #define STMSAP 6 /* MAC SAP */ #define STPSAP 7 /* physical SAP */ -#define STSID 8 /* system id */ #define STHG 9 /* hunt Group */ #define STROUT 10 /* route */ #define STDLC 11 /* data link connection */ @@ -957,7 +184,6 @@ #define STPNPG 63 /* PNNI PEER GROUP */ #define STLINK 64 /* ATM Physical Link */ #define STINFOGRP 65 /* information group */ - #define STNISAP 66 /* FR-ATM network interworking sap */ #define STSISAP 67 /* FR-ATM service interworking sap */ #define STPROF 68 /* FR-ATM aal connection's profile */ @@ -966,7 +192,6 @@ #define STADDR 71 /* address */ #define STSRVC 72 /* service registry */ #define STCIPSAP 73 /* PLOA's CIPSAP */ - /* define for Envelope Function EFadr mapping */ #define STEVEFADR 74 /* EV EFadr to SAP mapping */ @@ -979,7 +204,6 @@ /* used by PQ for TDM Configuration */ #define STTDM 78 /* TDM Configuration */ - /* Used by LES */ #define STLECSMPOATLV 79 /* LECS MPOA TLV entry */ @@ -994,7 +218,6 @@ #define STGRDLSAP 87 /* data link sap group */ #define STALLSAP 88 /* all upper/lower SAPs */ #define STPEERSAP 89 /* configure peer sap */ - /* Used by V5 */ #define STVINTERFACE 83 /* V5 Interface */ #define STVPORT 84 /* V5 port */ @@ -1005,8 +228,6 @@ more PVC on the fly */ #define STCIPARP 87 /* PLOA Cfg. request to configure some extra IP-ATM binding on the fly */ - - /* used by Q.93B for AalConParam of signaling channels */ #define STSIGCONPARAM 90 /* config Signaling connection parameters */ #define STDELSIGPARAM 91 /* Delete Signaling connection parameters */ @@ -1015,7 +236,6 @@ #define STVPROC 92 /* Configure virtual node */ #define STPPROC 93 /* Configure physical node */ #define STASSOC 94 /* Configire association between vnodes */ - /* and layers */ /* used by TCAP over TCP/IP */ #define STSERVER 95 /* configure TCP/UDP server */ @@ -1029,7 +249,6 @@ #define STSMS 101 /* PLOA LANE Selective M-cast Server */ #define STSMSGRP 102 /* PLOA SMS Multicast Group */ #define STSMSLEC 103 /* PLOA LEC Associated with SMS */ - /* used by PLOA - PPPoA */ #define STMASAP 104 /* POOA MASAP - PPPoA upper SAP */ @@ -1048,7 +267,6 @@ #define STNHSEXTNS 114 /* PLOA NHS */ #define STNHSEGRCACHE 115 /* PLOA NHS */ #define STNHSVENDATA 116 /* PLOA NHS */ - /* used by H.323 Control */ #define STSSAP 117 /* H.323 Session SAP element */ #define ST323ENT 118 /* H323 entity element */ @@ -1077,7 +295,6 @@ #define STSRVCTYPE 129 /* service type */ #define STSRVCCONNINFO 130 /* service connection info */ #define STAALPROFILE 131 /* AAL[x] profiles; x = 1, 2, 34, 5 */ - /* used by MPLS-LDP (+CR) */ #define STPEER 132 /* LDP Peer */ #define STFEC 133 /* MPLS FEC */ @@ -1096,7 +313,6 @@ #define STGRSNTSAP 144 /* SNT Group */ #define STPATH 145 /* AAL2 path */ #define STDPC 146 /* DPC - MTP3B */ - /* used by Annex G */ #define STBE 147 #define STGRBESAP 148 @@ -1129,7 +345,6 @@ #define STDELNW 163 /* delete network */ #define STDELTSAP 164 /* delete transport sap */ #define STDELNSAP 165 /* delete network sap */ - /* new elements for 3GPP-RLC */ #define STCRSAP 166 /* RLC Control SAP */ #define STRLSAP 167 /* RLC Data SAP */ @@ -1153,6 +368,7 @@ /* new elements for LAPDm */ #define STLSAP 178 #define STRRSAP 179 + /*gen_h_001.main_127 - incremented values*/ /* gen_h_001.main_123 - Add new elements for 3GPP-PDCP */ #define STCTSAP 180 /* PDCP Control SAP */ @@ -1164,73 +380,41 @@ #define STPDCPENT 182 /* PDCP Entity */ /*-- gen_h_001.main_130 --*/ #define STINST 183 /* IuUP Instance */ - +#endif /* gen_h_001.main_134 - lte rlc 2.1 */ -/* elements for LTE-RLC SAPs */ +/* elements for NR RLC SAPs */ #define STCKWSAP 184 /*!< RLC Control SAP element. */ #define STKWUSAP 185 /*!< RLC Data SAP element. */ #define STRGUSAP 186 /*!< RLC MAC SAP element. */ /* elements for LTE-PDCP SAPs */ -#define STCPJSAP 187 /*!< PDCP control SAP element. */ -#define STPJUSAP 188 /*!< PDCP control SAP element. */ #ifdef RM_INTF #define STRMUSAP 189 /*!< LTE RRM control SAP element. */ #define STRGMSAP 190 #endif -#define STNLUSAP 191 /*!< eNB APP and SON module SAP */ - /* Mngmt.t.cntrl.action, Mngmt.hdr.elmId.elmntInst1 */ #define AENA 1 /* enable */ #define ADISIMM 2 /* disable - immediately */ #define ADISGRC 3 /* disable - gracefully */ #define ARST 4 /* reset */ -#define ADGN 5 /* diagnose */ -#define AADD 6 /* add */ #define ADEL 7 /* delete */ -#define AINH 8 /* inhibit */ -#define AUNINH 9 /* uninhibit */ -#define ASPRST 10 /* signalling point restart */ -#define AACTLNKSET 11 /* activate link set */ -#define ADEACTLNKSET 12 /* deactivate link set */ -#define AVAL 13 /* validate circuit */ -#define AFLCON 14 /* flow control on */ -#define AFLCOFF 15 /* flow control off */ -#define ACLEAR 16 /* clear */ -#define ASTRTLL 17 /* start local loop */ -#define AENDLL 18 /* end local loop */ -#define ACTION_DROP 19 /* action - drop */ -#define ACTION_NO_DROP 20 /* action - no drop */ -#define ABND_ENA 21 /* bind and enable */ -#define ARSTVCC 22 /* restart a virtual channel connection */ -#define ARSTVPC 23 /* restart a virtual path connection */ - -/* actions for LsaCntrlReq (q.2140) */ - -#define AFORCE_PRV 24 /* Force Proving */ -#define AFORCE_EM 25 /* Force Emergency */ -#define ACLR_FORCE_MD 26 /* Clear Force Mode */ -#define ACTION_LPO 27 /* Local Processor Outage */ -#define ACTION_LPR 28 /* Local Processor Recovered */ -#define APRV_UNS 29 /* Proving Unsuccessful Response */ - #define ABND 30 /* bind */ #define AUBND 31 /* disable + unbind */ #define AUBND_DIS AUBND /* unbound disable */ - /* actions for mtp3 */ - +#if 0 #define ADELROUT 32 /* delete rout control block */ #define ADELLNKSET 33 /* delete all linkset control blocks, link control blocks for a given linkset id */ #define ADELCMBLNKSET 34 /* delete linkset control block for a given combined linkset id */ #define ADELLNK 35 /* delete link control block */ +#endif #define ASHUTDOWN 36 /* shutdown the layer */ +#if 0 #define ATRAP 37 /* trap */ #define AGEN_STA 38 /* generate status indications -MSOC */ - /* actions for fault tolerance */ #define AGO_ACT 38 /* go active */ #define AGO_SBY 39 /* go standby */ @@ -1248,7 +432,6 @@ #define ADEACTLNKSET_L2 51 /* deactivate link set: all links should be deactivated only at L2 level */ #define AGEN_MSG 52 /* message generation control action */ - /* For PLOA */ #define ASNDTRIGG 53 /* Generate Flow detection trigger */ @@ -1262,7 +445,6 @@ #define ASRVMSG_ON 59 /* Turn on service message capability */ #define ASRVMSG_OFF 60 /* Turn off service message capability */ #define ARESTART 61 /* Restart Interface/Channel */ - /* For TCR 0004.01 */ #define AMODIFY 62 /* Modify trace length */ @@ -1280,7 +462,6 @@ /* For SIP */ #define AADD_ASSOC_TPTSRV 70 /* Add transport server association */ #define ADEL_ASSOC_TPTSRV 71 /* Delete transport server association */ - /* for SCCP congestion control (sccp3.2) */ #define ACONG 72 /* congestion cntrl - start sending SSC */ /* For OAM */ @@ -1293,7 +474,6 @@ #define ASTRTPMLL 78 /* OAM Start PM Loopback of FMC's */ #define AENDPMLL 79 /* OAM End Performance Generation */ #define ARSTPM 80 /* OAM Reset counters of PM block */ - #define AMODABORT 81 /* Abort Modification Request */ #define AADD_ASSOC_ENDP 82 #define ADEL_ASSOC_ENDP 83 @@ -1311,7 +491,6 @@ #define ASTOP_LNK_AUDIT 95 #define ASTOP_LNKSET_AUDIT 96 #define ASTOP_RTE_AUDIT 97 - /* gen_h_001.main_125 - Addition - SUA support*/ #ifdef LSPV2_8 #define AADD_ASP 86 @@ -1319,7 +498,6 @@ #define ADEL_ASPSSN 88 #define ADEL_ASPCPC 89 #endif - /* Added for NBAP to support SCT(SCTP) as lower interface */ #define AEOPENR 100 #define AECLOSER 101 @@ -1329,7 +507,7 @@ #define AHBEAT_DIS_ASSOC 105 #define AHBEAT_ENB_DSTADDR 106 #define AHBEAT_DIS_DSTADDR 107 - +#endif /* Mngmt.t.cntrl.subAction */ #define SAELMNT 1 /* specified element */ @@ -1337,74 +515,11 @@ #define SAUSTA 3 /* unsolicited status generation */ #define SATRC 4 /* trace generation */ #define SADBG 5 /* debugging */ -#ifdef SS_DIAG -/* gen_h_001.main_142:Added subaction SALOG */ -#define SALOG 6 /* logging */ -#endif - -/* grouping criteria's will be filled in subaction fields */ - -#define SAGR_DSTPROCID 6 /* group on dstProcId */ -#define SAGR_ROUTE 7 /* group on routes */ -#define SAGR_PRIORITY 8 /* group on priority */ -#define SAENA_PEER_SAP 9 /* enable peer sap */ -#define SADIS_PEER_SAP 10 /* disable peer sap */ -#define SAAUD 11 /* Audit */ -/* For GCP 1.2 */ -#define SADNS 12 /* Enable /Disable DNS Access*/ - -/* for SCCP traffic limitation mechanism and error report (sccp3.2) */ -#define SATRFLIM 13 /* traffic limitation mechanism */ -#define SAREPORT 14 /* sccp error perfroamce report */ - -#define SAGR_GENERIC_MAX 20 /* max on subactions to be defined in gen.h */ - -/* Subactions required for H.323 user layer (HU) */ -#define HU_RUNREQ 12 /* run a test case */ -#define HU_PROCEEDREQ 13 /* resume operation with a test case */ - -/* Mngmt.t.mib.opCode */ -#define MIBOPCODEBASE 1000 /* Base for non standard opCode values */ -#define MIB_REQUEST_GET 0 /* GET request for reading mib variable*/ -#define MIB_REQUEST_GET_NEXT 1 /* GET-NEXT request to read - lexicographically next mib variable*/ -#define MIB_REQUEST_SET 3 /* Assign mib variable a value */ - -/* Mngmt.t.mib.status */ -#define MIBSTATUSBASE 1000 /* Base for non standard status values */ -#define MIB_SUCCESS 0 /* Mib request successfully completed */ -#define MIB_NOSUCHNAME 2 /* no such name */ -#define MIB_INVALID_IDX (MIBSTATUSBASE + 1) /* Index to the row-column - * of mib table invalid */ -#define MIB_INVALID_OPCODE (MIBSTATUSBASE + 3) /* OpCode is not one of the - * above defined*/ -#define MIB_END_ALL_TABLES (MIBSTATUSBASE + 4) /* End of the table reached - * in get next */ -#define MIB_SUCCESS_NEXT_AVL_OBJ (MIBSTATUSBASE + 6) /* returning object from - * a different table than - * before */ - -/* Mngmt.t.trc.evnt */ - -#define TL1FRMRX 0 /* layer 1 - frame received */ -#define TL1FRMTX 1 /* layer 1 - frame transmitted */ -#define TL2FRMRX 2 /* layer 2 - frame received */ -#define TL2FRMTX 3 /* layer 2 - frame transmitted */ -#define TL2TMR 4 /* layer 2 - timer expired */ -#define TL3PKTRX 5 /* layer 3 - frame received */ -#define TL3PKTTX 6 /* layer 3 - frame transmitted */ -#define TL3TMR 7 /* layer 3 - timer expired */ -#define TL7FRMRX 8 /* layer 7 - frame received */ -#define TL7FRMTX 9 /* layer 7 - frame transmitted */ -#define TL7TMR 10 /* layer 7 - timer expired */ -#define TL5MSGTX 11 /* layer 5 - message transmitted */ -#define TL5MSGRX 12 /* layer 5 - message received */ - /* defines for MxxStsReq */ #define ZEROSTS 0 /* zero statistics counters */ #define NOZEROSTS 1 /* dont zero statistics counters */ - +#if 0 /* defines for MxxCfgReq */ #define THRSHA 0 /* 00% resources available */ @@ -1420,6 +535,7 @@ /* to call packets */ #define LSAP 1 /* Link Level SAP Type */ #define XTSAP 2 /* Transport SAP Type */ +#endif #ifdef IGNORE #undef IGNORE @@ -1428,186 +544,23 @@ #define IGNORE 0 /* Ignore SAP Type */ #endif /* IGNORE */ -#define X25LINK 0 /* X25 Link */ -#define X75LINK 1 /* X75 Link */ - -#define USER 0 /* acts as user */ -#define NETWORK 1 /* acts as network */ -#define SYM_USER 2 /* acts as symmetrical user */ - -/* defines for MxxStaInd */ - -#define ENTR_CONG 1 /* event - entering congst */ -#define EXIT_CONG 2 /* event - exiting congest */ -#define PROT_ST_UP 3 /* event - link up */ -#define PROT_ST_DN 4 /* event - link down */ -#define PROT_ERR 5 /* event - protocol error */ -#define INV_REM 6 /* event - invalid remove */ -#define LINK_ALIGNED 7 /* event - mtp 2 - link alignment */ -#define ALIGN_LOST 8 /* event - mtp 2 - alignment lost */ -#define ELEC_DOWN 9 /* event - scc - electrical interface down */ -#define ELEC_UP 10 /* event - scc - electrical interface up */ -#define REG_DOWN 11 /* event - mos - memory region down */ -#define REG_UP 12 /* event - mos - memory region up */ -#define INH_DEN 13 /* event - link inhibit denied */ -#define INH_ACK 14 /* event - link inhibited */ -#define UNINHED 15 /* event - link uninhibited */ -#define UNINH_DEN 16 /* event - link uninhibit denied */ -#define CONG_LVL_1 17 /* event - congestion level 1 */ -#define CONG_LVL_2 18 /* event - congestion level 2 */ -#define CIR_OUT_ORD 19 /* event - cirquit out of order */ -#define CIRMGT_NORESP 20 /* event - no response to cirquit management message */ -#define CIR_INVAL 21 /* event - invalid circuit */ -#define CIR_VAL_FAIL 22 /* event - circuit validation failure */ -#define CIR_VAL_SUCC 23 /* event - circuit validation success */ -#define CIC_INVAL 24 /* event - invalid cic code */ -#define CONT_FAIL 25 /* event - continuity failed */ -#define CIR_UNEQUIP 49 /* event - circuit unequipped */ -#define RMT_BLKD 50 /* event - link remotely blocked */ -#define RMT_UNBLKD 51 /* event - link remotely unblocked */ -#define CIR_IN_SERV 52 /* event - circuit back in service */ -#define TERM_INIT_FAIL 53 /* event - terminal initialization failed */ -#define ERROR_LOG 54 /* event - software error logged */ - -#define INV_EVENT (ERROR_LOG + 1) /* event - invalid */ - -/* ss7 switch defines */ - -/* #define SW_TST 0 switch - test */ -#define SW_CCITT 1 /* switch - ccitt */ -#define SW_ITU 1 /* switch - itu-t */ -#define SW_CCITT88 1 /* switch - ccitt 88 */ -#define SW_ANSI 2 /* switch - ansi */ -#define SW_ANSI88 2 /* switch - ansi 88 */ -#define SW_ANSI92 3 /* switch - ansi 92*/ -#define SW_CCITT92 4 /* switch - ccitt 92 */ -#define SW_SINGTEL 4 /* switch - singapore telecom */ -#define SW_Q767 5 /* switch - int'l isup q.767 */ -#define SW_CHINA 6 /* switch - china */ -/* for sccp3.2 */ -#define SW_JAPAN 7 /* switch - japan */ - #ifndef CMFILE_REORG_1 /* defines for Q.93B */ /* parameter values that are at management and at upper interface */ - -/* switch defines */ - -#define SW_ATMF_UNI30 0 /* switch - ATM Forum UNI v3.0 */ -#define SW_ATMF_UNI31 1 /* switch - ATM Forum UNI v3.1 */ -#define SW_IISP_UNI30 2 /* switch - Interim Inter-Switch Signalling Protocol */ -#define SW_IISP_UNI31 3 /* switch - Interim Inter-Switch Signalling Protocol */ -#define SW_Q2931 4 /* switch - ITU - 2931 */ -#define SW_ATMF_SIG_PNNI 5 /* switch - ATM Forum PNNI Signalling */ -#define SW_ATMF_UNI40 6 /* switch - ATM Forum UNI v4.0 */ -#define SW_ATMF_SIG_AINI 7 /* switch - ATM Forum AINI Signalling */ -#define SW_INVALID 0xff /* switch - invalid value */ - -/* information element id's */ - -#define AM_ME_ETOETRANSDLY 0x42 /* End-to-End Transit Delay */ -#define AM_ME_CONNNMB 0x4c /* Connected number */ -#define AM_ME_CONNSAD 0x4d /* Connected Subaddress */ -#define AM_ME_TFCDESC 0x59 /* ATM Traffic Descriptor */ -#define AM_ME_BHILYRINFO 0x5d /* Broadband High Layer Info */ -#define AM_ME_BLOLYRINFO 0x5f /* Broadband Low Layer Info */ -#define AM_ME_CDPTYNMB 0x70 /* Called Party Number */ -#define AM_ME_CDPTYSAD 0x71 /* Called Party Sub Address */ -#define AM_ME_CDPTYSOFTPVC 0xe0 /* Called party soft PVPC/PVCC */ -#define AM_ME_CRANKBACK 0xe1 /* Crankback */ -#define AM_ME_DSGTRANLST 0xe2 /* Designated Transit list */ -#define AM_ME_CGPTYSOFTPVC 0xe3 /* Calling party soft PVPC/PVCC */ -#define AM_ME_MINACCTFCDESC 0x81 /* Minimum Acceptable Tfc. Desc. */ -#define AM_ME_ALTTFCDESC 0x82 /* Alternative ATM Tfc. Desc. */ -#define AM_ME_ABRSETUPPARAM 0x84 /* ABR Setup Parameters */ -#define AM_ME_ABRADDPARAM 0xe4 /* ABR Additional Parameters */ -#define AM_ME_EXTQOSPARAM 0xec /* Extended Qos Parameter */ - -/* information element idx's */ - -#define AM_MEI_TFCDESC 0x06 /* ATM Traffic Descriptor */ -#define AM_MEI_BHILYRINFO 0x09 /* Broadband High Layer Info */ -#define AM_MEI_BLOLYRINFO 0x0b /* Broadband Low Layer Info */ -#define AM_MEI_CDPTYNMB 0x12 /* Called Party Number */ -#define AM_MEI_CDPTYSAD 0x13 /* Called Party Sub Address */ -#define AM_MEI_CRANKBACK 0x1f /* Crankback */ -#define AM_MEI_CDPTYSOFTPVC 0x20 /* Called Party Soft PVPC/PVCC */ -#define AM_MEI_CONNNMB 0x21 /* Connected number */ -#define AM_MEI_CONNSAD 0x22 /* Connected sub address */ -#define AM_MEI_DSGTRANLST 0x23 /* Designated Transit List */ -#define AM_MEI_CGPTYSOFTPVC 0x34 /* Calling Party Soft PVPC/PVCC */ -#define AM_UNKNOWN 0xfe /* message type unknown */ - /* addressing related defines */ -/* numbering plan identification */ - -#define AM_NMBPLN_UNK 0x00 /* unknown */ -#define AM_NMBPLN_ISDN 0x01 /* ISDN/telephony numbering plan (E.164) */ -#define AM_NMBPLN_NSAP 0x02 /* ISO NSAP */ -#define AM_NMBPLN_PVT 0x09 /* private */ - - -/* ATM address types */ - -#define ATMADDR_TYPE_E164 AM_NMBPLN_ISDN /* E.164 format */ -#define ATMADDR_TYPE_AESA AM_NMBPLN_NSAP /* ATM forum AESA format */ - /* maximum size of VCC table */ #define MAX_ATMVCCTBL_SZ 16 /* maximum number of ATM addresses in the ATM address table */ #define MAX_ATMADDRTBL_SZ 4 - -/* type of number */ - -#define AM_TYPNMB_UNK 0x00 /* unknown */ -#define AM_TYPNMB_INT 0x01 /* international */ -#define AM_TYPNMB_NAT 0x02 /* national */ -#define AM_TYPNMB_NSP 0x03 /* network specific */ -#define AM_TYPNMB_SUB 0x04 /* subscriber number */ -#define AM_TYPNMB_ABR 0x06 /* abbreviated */ - -/* screening indicator */ - -#define AM_SCRIND_USRNOTSCR 0x00 /* user provided, not screened */ -#define AM_SCRIND_USRVERPASS 0x01 /* user provided, verified and passed */ -#define AM_SCRIND_USRVERFAIL 0x02 /* user provided, verified and failed */ -#define AM_SCRIND_NET 0x03 /* network provided */ - -/* presentation indicator */ - -#define AM_PRSIND_ALLOW 0x00 /* presentation allowed */ -#define AM_PRSIND_RESTRICT 0x01 /* presentation restricted */ -#define AM_PRSIND_NOTAVAIL 0x02 /* number not available */ - -/* odd/even indicator */ - -#define AM_OEIND_EVEN 0x00 /* even */ -#define AM_OEIND_ODD 0x01 /* odd */ - -/* type of subaddress */ - -#define AM_TYPSAD_NSAP 0x00 /* NSAP */ -#define AM_TYPSAD_USER 0x01 /* user specified - ATM Endsystem addr */ -#define AM_TYPSAD_USERSPEC 0x02 /* user specified */ /* authority and format identifiers for OSI NSAP addresses */ - -/* AFI for individual address */ -#define AFI_DCC 0x39 /* BCD format for ISO DCC */ -#define AFI_ICD 0x47 /* BCD format for ISO ICD */ -#define AFI_E164 0x45 /* BCD format for E.164 */ - -/* AFI for group addresses */ -#define AFI_GRP_DCC 0xBD /* BCD format for ISO DCC */ -#define AFI_GRP_ICD 0xC5 /* BCD format for ISO ICD */ -#define AFI_GRP_E164 0xC3 /* BCD format for E.164 */ - +#if 0 /* low layer information - layer 2 id */ #define AM_LLI_L2ID 2 /* layer 2 id */ @@ -1704,7 +657,6 @@ #define AM_EQP_ORG_USR 0x00 /* originating user */ #define AM_EQP_ORG_INTNET 0x01 /* intermediate network */ - /* ABR Setup parameter identifiers */ #define AM_ASP_FAICR_ID 0xC2 /* forward ABR initial cell rate identifier */ @@ -1733,11 +685,12 @@ #define AM_ATC_ABR 0x0C /* ABR */ #define AM_ATC_RTVBRCLR 0x13 /* Real time VBR with CLR commitment on CLP=0+1 */ +#endif /* defines for UME */ #define UM_MAXLEN_OBJ_ID 34 /* max length of an object-id */ - +#if 0 /* PNNI qos class definitions */ #define PN_QOS_CLASS_UBR 0 /* unspecified */ @@ -1749,11 +702,13 @@ /* maximum number of ports per neighbor -- change if you expect more */ #define PN_MAX_PORTS_NBR 5 +#endif /* Peer group and node identifier length */ #define PN_PGID_LEN 14 #define PN_NODEID_LEN 22 +#if 0 /* maximum number of qos classes */ #define PN_NUM_QOS_CLASSES 5 @@ -1778,7 +733,7 @@ #define AM_OTD_ETOEF5_0 0X00 /* 0% of FPCR/BPCR (CLP=0+1) */ #define AM_OTD_ETOEF5_01 0x01 /* 0.1% of FPCR/BPCR (CLP=0+1) */ #define AM_OTD_ETOEF5_1 0x04 /* 1% of FPCR/BPCR (CLP=0+1) */ - +#endif #endif /* CMFILE_REORG_1 */ /* degines for management confirms */ @@ -1805,10 +760,11 @@ #define LCM_REASON_INVALID_PAR_VAL 13 /* invalid parameter value */ #define LCM_REASON_QINIT_FAIL 15 /* queue initialization failed */ #define LCM_REASON_NEG_CFM 16 /* negative confirmation */ +#define LCM_REASON_HASHING_FAILED 20 /* Hashing failed */ +#if 0 #define LCM_REASON_UPDTMR_EXPIRED 17 /* update timer expired */ #define LCM_REASON_MISC_FAILURE 18 /* miscellaneous failures */ #define LCM_REASON_EXCEED_CONF_VAL 19 /* Exceeds configured value */ -#define LCM_REASON_HASHING_FAILED 20 /* Hashing failed */ #define LCM_REASON_PEERCFG_NOT_DONE 21 /* swft -peer sap not configured */ #define LCM_REASON_PRTLYRCFG_NOT_DONE 22 /* swft -portable lyr not configured */ /* common Distributed FT/HA related failure reasons */ @@ -1821,8 +777,7 @@ #define LCM_REASON_INV_DIST_QUAL 29 /* Inv. qual. of dist type*/ #define LCM_REASON_NAK_RCVD 30 /* Got a nak failure */ #define LCM_REASON_TIMEOUT 31 /* Got a timeout failure */ -#define LCM_REASON_PURE_FTHA 32 /* A req for Dist FTHA is recv - * by a Pure FTHA mod */ +#define LCM_REASON_PURE_FTHA 32 /* A req for Dist FTHA is recv by a Pure FTHA mod */ #define LCM_REASON_DIST_FTHA 33 /* A req for Pure FTHA is recv * by a Dist FTHA mod */ #define LCM_REASON_INV_KEY 34 /* Invalid key */ @@ -1841,13 +796,13 @@ #define LCM_REASON_DFL_SPC_DEL_NOT_ALLOWED 44 /* control request has got default spcs that configured in the network */ #define LCM_REASON_NOTHING_TO_DELETE 45 /* control request has got zero spcs to delete */ #define LCM_REASON_SPC_ALREADY_DELETED 46 /* spc's are already deleted */ - #define LCM_REASON_LYR_SPECIFIC 256 /* protocol specific reasons */ /* gen_h_001.main_125- Addition - SUA support*/ #define LCM_REASON_ASP_CONFIG 47 /* ASP Configuration Error */ /* gen_h_001.main_142:Added new error type*/ #define LCM_REASON_ULLOCK_INIT_FAILED 48 /* UL Lock creation Error */ +#endif /* category */ #define LCM_CATEGORY_PROTOCOL 1 /* protocol related */ @@ -1862,24 +817,27 @@ /* events */ #define LCM_EVENT_UI_INV_EVT 1 /* upper interface invalid event */ +#define LCM_EVENT_BND_FAIL 8 /* Bind failure */ +#define LCM_EVENT_BND_OK 11 /* bind ok */ +#define LCM_EVENT_SMEM_ALLOC_FAIL 12 /* static memory alloc fail */ +#define LCM_EVENT_DMEM_ALLOC_FAIL 13 /* Dynamic mmemory alloc fail */ + +#if 0 #define LCM_EVENT_LI_INV_EVT 2 /* lower interface invalid event */ #define LCM_EVENT_PI_INV_EVT 3 /* peer interface invalid event */ #define LCM_EVENT_INV_EVT 4 /* general invalid event */ #define LCM_EVENT_INV_STATE 5 /* invalid internal state */ #define LCM_EVENT_INV_TMR_EVT 6 /* invalid timer event */ #define LCM_EVENT_MI_INV_EVT 7 /* mngmnt interface invalid event */ -#define LCM_EVENT_BND_FAIL 8 /* Bind failure */ #define LCM_EVENT_NAK 9 /* destination naked a request */ #define LCM_EVENT_TIMEOUT 10 /* timeout when waiting for reply */ -#define LCM_EVENT_BND_OK 11 /* bind ok */ -#define LCM_EVENT_SMEM_ALLOC_FAIL 12 /* static memory alloc fail */ -#define LCM_EVENT_DMEM_ALLOC_FAIL 13 /* Dynamic mmemory alloc fail */ /*Alarms for distributed FTHA environment*/ #define LCM_EVENT_SEQERR 14 /* seq error (standby) */ #define LCM_EVENT_OOM 15 /* board mem threshold exceeded */ #define LCM_EVENT_UPDMSG_ERR 16 /* update message decode error */ #define LCM_EVENT_HTBT_EXP 17 /* Heartbeat timer expiry */ #define LCM_EVENT_TRANSLATION_FAILURE 18 /* primitive translation failure */ +#endif /*gen_h_001.main_137:Moved Events for alarm indication at various Dns Events to lso.h*/ #define LCM_EVENT_LYR_SPECIFIC 256 /* protocol specific events */ @@ -1896,11 +854,12 @@ #define LCM_CAUSE_MGMT_INITIATED 8 /* mgmt initiated */ #define LCM_CAUSE_INV_STATE 9 /* Invalid state */ #define LCM_CAUSE_TMR_EXPIRED 10 /* Invalid state */ -#define LCM_CAUSE_INV_MSG_LENGTH 11 /* Invalid state */ #define LCM_CAUSE_PROT_NOT_ACTIVE 12 /* protocol layer not active */ #define LCM_CAUSE_INV_PAR_VAL 13 /* invalid parameter value */ #define LCM_CAUSE_NEG_CFM 14 /* negative confirmation */ #define LCM_CAUSE_MEM_ALLOC_FAIL 15 /* memory allocation failure */ +#if 0 +#define LCM_CAUSE_INV_MSG_LENGTH 11 /* Invalid state */ #define LCM_CAUSE_HASH_FAIL 16 /* hashing failure */ #define LCM_CAUSE_VERSION_MISMATCH 17 /* interface version mismatch */ #define LCM_CAUSE_SWVER_NAVAIL 18 /* intf ver not found */ @@ -1908,8 +867,10 @@ #define LCM_CAUSE_INV_ACTION 20 /* Invalid Control Action */ /* gen_h_001.main_129 - defined new cause */ #define LCM_CAUSE_NETWK_INITIATED 21 /* user initiated */ +#endif #define LCM_CAUSE_LYR_SPECIFIC 256 /* protocol specific causes */ +#if 0 /* Interface identifier names for rolling upgrade. Each of the product * * interface is given a unique number */ /* Layer management interface identifiers */ @@ -2132,20 +1093,8 @@ #define HWPIF 272 /* eGTP-C PSF peer interface ID */ /* gen_h_001.main_141: Added the interface version for PSF DIAMETER */ #define JCPIF 273 /* PSF DIAMETER peer interface ID */ +#endif -/* Maximum no.of interfaces a product a support on the upper/lower interface */ -#define MAX_INTF 2 /* Max intf to a usr/prov */ - -/* defines for SCCP ISNI and INS routing */ -#define MAX_ISNI_NID 0x07 /* Maximum no. of NIDs is ISNI */ -#define MAX_INS_NID 0x02 /* Maximum no. of NIDs in INS */ - - -/* defines for mode */ - -#define LOOPBACK_MODE 0 /* loopback mode */ -#define TESTING_MODE 1 /* testing mode */ -#define HARDWARE_MODE 2 /* hardware mode */ /* bind status */ #define CM_BND_OK 1 /* bind request OK */ diff --git a/src/cm/lkw.c b/src/cm/lkw.c index 5ea39ab7d..25ebfd0be 100755 --- a/src/cm/lkw.c +++ b/src/cm/lkw.c @@ -18,7 +18,7 @@ /********************************************************************20** - Name: LTE-RLC Layer + Name: NR RLC Layer Type: C source file diff --git a/src/cm/lkw.x b/src/cm/lkw.x index a7199c74d..4a7a14db0 100755 --- a/src/cm/lkw.x +++ b/src/cm/lkw.x @@ -359,7 +359,7 @@ typedef struct rlcL2MeasCfmEvt #endif /* LTE_L2_MEAS */ -/* Control primitives towards LTE RLC */ +/* Control primitives towards NR RLC */ /* Pointer functions to pack/unpack primitives */ typedef uint8_t (*RlcConfigReq) ARGS((Pst *pst, RlcMngmt *cfg)); typedef uint8_t (*RlcConfigCfm) ARGS((Pst *pst, RlcMngmt *cfgCfm)); diff --git a/src/rlog/rl_common.c b/src/rlog/rl_common.c deleted file mode 100644 index 3c12c2439..000000000 --- a/src/rlog/rl_common.c +++ /dev/null @@ -1,70 +0,0 @@ -/******************************************************************************* -################################################################################ -# Copyright (c) [2017-2019] [Radisys] # -# # -# 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. # -################################################################################ -*******************************************************************************/ - -/********************************************************************20** - - Name: Radisys Logging Framework - Type: C source file - Desc: This file contains logging framework implementation. - File: rl_common.c - -*********************************************************************21*/ -/**************************************************************************** -@ description: This is common source file for postprocessor and log library. -*****************************************************************************/ - -#include -#include "stdint.h" -#include "rl_common.h" -/* String representation of Log Levels */ -const char* g_logStr[L_MAX_LOG_LEVEL] = -{ - "ALWAYS", - "FATAL", - "ERROR", - "WARNING", - "EVENT", - "INFO", - "DEBUG" -}; - -const char* g_splStr[DBG_MAX_IDs] = -{ - "CELLID", - "PEERID", - "ENBID", - "MME", - "CRNTI", - "UEIDX", - "UEID", - "RBID", - "LCID", - "LCGID", - "TRNSID" -}; - -void hextostr(char* p, PSTR h, int hexlen) -{ - int i; - for(i=0; i -extern FILE* g_fp; -void logLev0(PSTR strLogLevel, PSTR modName, PSTR file, int lineno, PSTR fmtStr, ...); -void logLev1(PSTR strLogLevel, PSTR modName, PSTR file, int lineno, PSTR fmtStr, uint32_t arg1, ...); -void logLev2(PSTR strLogLevel, PSTR modName, PSTR file, int lineno, PSTR fmtStr, uint32_t arg1, uint32_t arg2, ...); -void logLev3(PSTR strLogLevel, PSTR modName, PSTR file, int lineno, PSTR fmtStr, uint32_t, uint32_t, uint32_t, ...); -void logLev4(PSTR strLogLevel, PSTR modName, PSTR file, int lineno, PSTR fmtStr, uint32_t, uint32_t, uint32_t, uint32_t, ...); -void logLevN(int logLevel, const char* modName, const char* file, int lineno, const char* fmtStr, ...); -void logLevE(PSTR strLogLevel, PSTR modName, PSTR file, int lineno, PSTR fmtStr, R_SPL_ARG splType, - uint32_t splVal, uint32_t arg1, uint32_t arg2, uint32_t arg3, uint32_t arg4, ...); -void logLevH(PSTR strLogLevel, PSTR modName, PSTR file, int lineno, PSTR fmtStr, PSTR hexdump, int hexlen, ...); -void logLevS(PSTR strLogLevel, PSTR modName, PSTR file, int lineno, PSTR fmtStr, PSTR str, ...); -#else -void logLevH( LOGID logId, R_LOG_LEVEL logLevel, PSTR hex, int hexlen, ...); -void logLev0( LOGID logId, R_LOG_LEVEL logLevel, ...); -void logLev1( LOGID logId, R_LOG_LEVEL logLevel, uint32_t arg1, ...); -void logLev2( LOGID logId, R_LOG_LEVEL logLevel, uint32_t arg1, uint32_t arg2, ...); -void logLev3( LOGID logId, R_LOG_LEVEL logLevel, uint32_t arg1, uint32_t arg2, uint32_t arg3, ...); -void logLev4( LOGID logId, R_LOG_LEVEL logLevel, uint32_t arg1, uint32_t arg2, uint32_t arg3, uint32_t arg4, ...); -void logLevE(LOGID logId, R_LOG_LEVEL logLevel, R_SPL_ARG splType, uint32_t splVal, -uint32_t arg1, uint32_t arg2, uint32_t arg3, uint32_t arg4, ...); -void logLevS( LOGID logId, R_LOG_LEVEL logLevel, const char* str, ...); -#endif - -void hextostr(char* p, PSTR h, int hexlen); - -extern int g_logLevel; -extern uint32_t g_modMask; -extern const char* g_logStr[L_MAX_LOG_LEVEL]; -extern const char* g_splStr[DBG_MAX_IDs]; - -#define RLOG_SEGFAULT_STR "Segmentation Fault Occurred\n%s" - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -#endif /* __RLOG_COMMON_H__ */ diff --git a/src/rlog/rl_interface.h b/src/rlog/rl_interface.h deleted file mode 100755 index 51e0ab6c8..000000000 --- a/src/rlog/rl_interface.h +++ /dev/null @@ -1,217 +0,0 @@ -/******************************************************************************* -################################################################################ -# Copyright (c) [2017-2019] [Radisys] # -# # -# 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. # -################################################################################ -*******************************************************************************/ - -/********************************************************************20** - - Name: Radisys Logging Framework - Type: C include file - Desc: This file contains logging framework include file. - File: rl_interface.h -*********************************************************************21*/ -/////////////////////////////////////////////////////////////////////////////// -// @ description: This is header file is used by applications who want to -// define LOG Macros. This file can be refered for integrating log library -// into any application. API's defined in the file should be used by the -// program to modify data at runtime. -/////////////////////////////////////////////////////////////////////////////// - -#ifndef __RL_INTERFACE_H__ - -#include "rl_common.h" - -/////////////////////////////////////////////////////////////////////////////// -// This API is used to set logging directory path. If set after the log -// initialization API, next file creation will happen in this directory -void rlSetLogPath(const char* logDir); - -/////////////////////////////////////////////////////////////////////////////// -// This API needs to be called after configuring all the required parameters -// by using below APIs. This API initializes logging framework. -// Log MACRO's should be used only after calling this API. -void rlInitLog(uint8_t type); - -/////////////////////////////////////////////////////////////////////////////// -// This initializes log file name. Log file name should be exclusive of -// extension. As framework appends ".bin" in case of binary file and ".txt" in -// case of plain text logging. If file name is "stdout" and TEXT logging is -// enabled, logs will be printed in console. Run time file name can be changed -// and will be applicable when next file is created. -void rlSetLogFile(const char* fileName); - -/////////////////////////////////////////////////////////////////////////////// -// This API is used to set remote logging port, where post-processor application -// (rlogapp) is used to connect on this port in order to receive live binary logs. -// This API can be used only during initialization time. -void rlSetLogPort(uint32_t port); - -/////////////////////////////////////////////////////////////////////////////// -// Use this API to set log level. This API supports run time modification of -// log level. -void rlSetLogLevel(R_LOG_LEVEL logLevel); - -/////////////////////////////////////////////////////////////////////////////// -// This API toggles the module mask. If logging for this module is already -// enabled, it will be disabled. If it's not enabled, it will enable. Zero -// input will disable logging mask for all modules. -void rlSetModuleMask(uint32_t modMask); - -/////////////////////////////////////////////////////////////////////////////// -// This API is used to set log file size limit for single file. -void rlSetLogFileSizeLimit(uint32_t maxFileSize); - -/////////////////////////////////////////////////////////////////////////////// -// This API sets the limit of number of log files that can be created by -// logging framework. -void rlSetNumOfLogFiles(uint8_t nMaxFiles); - -/////////////////////////////////////////////////////////////////////////////// -// This API is used to set circular buffer size for each thread. Based on the -// number of threads in the system this size needs to be chosen. Recommended -// minimum 100Kb buffer size. -void rlSetCircularBufferSize(uint32_t bufSize); - -/////////////////////////////////////////////////////////////////////////////// -// This API enables or disables remote logging application connection to see -// live binary logs. -void rlSetRemoteLoggingFlag(S32 flag); - -/////////////////////////////////////////////////////////////////////////////// -// To change or modify logging level using console, console input needs to be -// passed to this function. -int rlHandleConInput(char ch); - -/////////////////////////////////////////////////////////////////////////////// -// This API enables or disables core file generation based on the input flag -// value. 1 Enables core dump and 0 disables generating core dump. -void rlEnableDisableCore(S32 enable_core); - -/////////////////////////////////////////////////////////////////////////////// -// This API enables Bufferd IO, to disable frequent file operation -void rlEnaBleBufferedIO(void); - -/////////////////////////////////////////////////////////////////////////////// -// This API updates the RLOG Tti count baed on this time stamp will be updated -void rlUpdateRlogTti(void); - -/////////////////////////////////////////////////////////////////////////////// -// This API reset the RLOG rate control count and enable logging every 10 ms -void rlResetLogRateLmt(void); - -/////////////////////////////////////////////////////////////////////////////// -// This API reset the RLOG rate control count and enable logging every 10 ms -void rlResetLogRateLmt(void); - -/////////////////////////////////////////////////////////////////////////////// -// This API Start the limit the number of logs loggd into circular buffer every -// 10ms -void rlStartLogCountLimit(void); - -/////////////////////////////////////////////////////////////////////////////// -// This API stops restriciton of limiting number of logs every 10 ms -void rlStopLogCountLimit(void); - - -#ifdef WR_DBG_CIRLOG - -#include "rl_redirect.h" - -#else - -#if defined(RLOG_ENABLE_TEXT_LOGGING) - -#define FMTSTR "[%d-%d-%d %d:%d:%d.%03d][%s]%s:%d\n%s:" -#define FMTSTR_S "[%d-%d-%d %d:%d:%d.%03d][%s]%s:%d\n%s:%s:%ld:" - -#define LOG_ARG0(_level, _fmtStr) \ -if( _level < g_logLevel || g_modMask & RLOG_MODULE_ID)\ -{ \ - logLev0(g_logStr[_level],RLOG_MODULE_NAME, __FILE__,__LINE__, FMTSTR _fmtStr "\n\n", RLOG_FILE_ID); \ -} - -#define LOG_ARGN(_N, _level, _fmtStr, ...) \ -if( _level < g_logLevel || g_modMask & RLOG_MODULE_ID)\ -{ \ - logLev##_N(g_logStr[_level],RLOG_MODULE_NAME, __FILE__,__LINE__, FMTSTR _fmtStr "\n\n", ##__VA_ARGS__ , RLOG_FILE_ID); \ -} - -#define LOG_SPL(_level, _splenum, _splArg, _fmtStr, ...) \ -if( _level < g_logLevel || g_modMask & RLOG_MODULE_ID)\ -{ \ - logLevE(g_logStr[_level],RLOG_MODULE_NAME, __FILE__,__LINE__, FMTSTR_S _fmtStr "\n\n", _splenum,_splArg, ##__VA_ARGS__, RLOG_FILE_ID); \ -} - -#define LOG_ARGX(_level, _fmtStr, ...) \ -if( _level < g_logLevel || g_modMask & RLOG_MODULE_ID)\ -{ \ - logLevN(_level,RLOG_MODULE_NAME, __FILE__,__LINE__, _fmtStr "\n\n", __VA_ARGS__, RLOG_FILE_ID); \ -} - -#define RLOG0(_level, _lstr) LOG_ARG0(_level, _lstr) -#define RLOG1(_level, _lstr, _arg1) LOG_ARGN(1, _level, _lstr, _arg1) -#define RLOG2(_level, _lstr, _arg1, _arg2) LOG_ARGN(2, _level, _lstr, _arg1, _arg2) -#define RLOG3(_level, _lstr, _arg1, _arg2, _arg3) LOG_ARGN(3, _level, _lstr, _arg1, _arg2, _arg3) -#define RLOG4(_level, _lstr, _arg1, _arg2, _arg3, _arg4)LOG_ARGN(4, _level, _lstr, _arg1, _arg2, _arg3, _arg4) - -#else /* BINARY LOGGING */ - -#define LOG_ARG0(_level, _fmtStr) \ -if( _level < g_logLevel || g_modMask & RLOG_MODULE_ID)\ -{ \ - logLev0(_LOGID, _level, __FILE__,__LINE__, _fmtStr, RLOG_FILE_ID, RLOG_MODULE_NAME); \ -} - -#define LOG_ARGN(_N, _level, _fmtStr, ...) \ -if( _level < g_logLevel || g_modMask & RLOG_MODULE_ID)\ -{ \ - logLev##_N(_LOGID, _level, ##__VA_ARGS__, __FILE__,__LINE__, _fmtStr, RLOG_FILE_ID, RLOG_MODULE_NAME); \ -} - -#define LOG_SPL(_level, _splenum, _splArg, _fmtStr, ...) \ -if( _level < g_logLevel || g_modMask & RLOG_MODULE_ID)\ -{ \ - logLevE(_LOGID,_level,_splenum, _splArg, ##__VA_ARGS__, __FILE__,__LINE__, _fmtStr, RLOG_FILE_ID, RLOG_MODULE_NAME); \ -} - -#define RLOG0(_level, _lstr) LOG_ARG0(_level, _lstr) -#define RLOG1(_level, _lstr, _arg1) LOG_ARGN(1, _level, _lstr, _arg1) -#define RLOG2(_level, _lstr, _arg1, _arg2) LOG_ARGN(2, _level, _lstr, _arg1, _arg2) -#define RLOG3(_level, _lstr, _arg1, _arg2, _arg3) LOG_ARGN(3, _level, _lstr, _arg1, _arg2, _arg3) -#define RLOG4(_level, _lstr, _arg1, _arg2, _arg3, _arg4)LOG_ARGN(4, _level, _lstr, _arg1, _arg2, _arg3, _arg4) - -#endif /* if defined(RLOG_ENABLE_TEXT_LOGGING) */ - -#define RLOG_STR(_level, _lstr, _strarg) LOG_ARGN(S, _level, _lstr, _strarg) -#define RLOG_HEX(_level, _lstr, _hexdata, _hexlen) LOG_ARGN(H, _level, _lstr, _hexdata, _hexlen) - -#define RLOG_ARG0(_level, _splenum, _splArg, _lstr) \ - LOG_SPL(_level, _splenum, _splArg, _lstr, 0, 0, 0, 0) - -#define RLOG_ARG1(_level, _splenum, _splArg, _lstr, _arg1) \ - LOG_SPL(_level, _splenum, _splArg, _lstr, _arg1, 0, 0, 0) - -#define RLOG_ARG2(_level, _splenum, _splArg, _lstr, _arg1, _arg2) \ - LOG_SPL(_level, _splenum, _splArg, _lstr, _arg1, _arg2, 0, 0) - -#define RLOG_ARG3(_level, _splenum, _splArg, _lstr, _arg1, _arg2, _arg3) \ - LOG_SPL(_level, _splenum, _splArg, _lstr, _arg1, _arg2, _arg3, 0) - -#define RLOG_ARG4(_level, _splenum, _splArg, _lstr, _arg1, _arg2, _arg3, _arg4) \ - LOG_SPL(_level, _splenum, _splArg, _lstr, _arg1, _arg2, _arg3, _arg4) - -#endif /* WR_DBG_CIRLOG */ -#endif /* __RLOG_INTERFACE_H__*/ diff --git a/src/rlog/rl_platform.c b/src/rlog/rl_platform.c deleted file mode 100644 index 6aa39c75b..000000000 --- a/src/rlog/rl_platform.c +++ /dev/null @@ -1,126 +0,0 @@ -/******************************************************************************* -################################################################################ -# Copyright (c) [2017-2019] [Radisys] # -# # -# 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. # -################################################################################ -*******************************************************************************/ - -/********************************************************************20** - - Name: Radisys Logging Framework - Type: C source file - Desc: This file contains logging framework implementation. - File: rl_rlog.c - -*********************************************************************21*/ -/************************************************************************** -@ description: This is source file which has implementaion of logging -framework. -****************************************************************************/ - -#include"stdint.h" -#include "rl_interface.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "rl_rlog.h" -#include "rl_platform.h" - -/* VARIABLE DECLARATION SECTION */ - -/* Thread-specific data key visible to all threads */ -static pthread_key_t g_threadkey; - -pthread_mutex_t g_logmutex; -THREAD_DATA* g_pCirList[RLOG_MAX_THREADS]; -void* rlAlloc(size_t mem_size) -{ - return malloc(mem_size); -} - -void rlFree(void* pMem) -{ - free(pMem); -} - -void* rlCalloc(size_t mem_size) -{ - return calloc(mem_size, 1); -} - -void rlSetThreadSpecificData(const void *pThrData) -{ - int retVal = pthread_setspecific(g_threadkey, pThrData); - - if( retVal!=0 ) { - fprintf(stderr, "Failed to associate the value with the key or invalid key"); - _exit(0); - } -} - -#ifdef RLOG_USE_CIRCULAR_BUFFER -/******************************************************************************************* -@param[in] pThreadData - Thread specific data -@brief This function is called whenever thread is being destroyed. This function will delete -thread specific data allocated during thread registration. -********************************************************************************************/ -void deInitThread(void* pThreadData) -{ - - THREAD_DATA* pThrData = (THREAD_DATA*)(pThreadData); - - if( pThreadData == NULL ) - return; - - /* lock the mutex, to make sure no one is accessing this buffer */ - pthread_mutex_lock(&g_logmutex); - - g_pCirList[pThrData->listIndex] = NULL; - - if( pThrData->logBuff != NULL ) - rlFree(pThrData->logBuff); - - rlFree(pThreadData); - - /* unlock the mutex */ - pthread_mutex_unlock(&g_logmutex); -} -#endif - -void* rlGetThreadSpecData(void) -{ - return (void*) pthread_getspecific(g_threadkey); -} - -void rlInitPlatformSpecific(void) -{ -#ifdef RLOG_USE_CIRCULAR_BUFFER - pthread_key_create(&g_threadkey, &deInitThread); -#endif -} - -/********************************************************************** - End of file - **********************************************************************/ diff --git a/src/rlog/rl_platform.h b/src/rlog/rl_platform.h deleted file mode 100755 index f90f4c582..000000000 --- a/src/rlog/rl_platform.h +++ /dev/null @@ -1,46 +0,0 @@ -/******************************************************************************* -################################################################################ -# Copyright (c) [2017-2019] [Radisys] # -# # -# 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. # -################################################################################ -*******************************************************************************/ - -/********************************************************************20** - - Name: Radisys Logging Framework - Type: C include file - Desc: This file contains logging framework include file. - File: rl_interface.h - -*********************************************************************21*/ -/*************************************************************************** -@ description: This is header file is used for platform specific -implementaion. -****************************************************************************/ - -#ifndef __RL_PLATFORME_H__ - -void* rlAlloc(size_t memSize); -void rlFree(void* pMem); -void* rlCalloc(size_t memSize); -void deInitThread(void* pThreadData); -void* rlGetThreadSpecData(void); -void rlSetThreadSpecificData(const void *pThrData); -void rlInitPlatformSpecific(void); - -#endif /* __RL_PLATFORME_H__ */ - -/********************************************************************** - End of file -**********************************************************************/ diff --git a/src/rlog/rl_postproc.cpp b/src/rlog/rl_postproc.cpp deleted file mode 100644 index fa17d28f9..000000000 --- a/src/rlog/rl_postproc.cpp +++ /dev/null @@ -1,747 +0,0 @@ -/******************************************************************************* -################################################################################ -# Copyright (c) [2017-2019] [Radisys] # -# # -# 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. # -################################################################################ -*******************************************************************************/ - -/********************************************************************20** - - Name: Radisys Logging Framework - Type: C++ source file - Desc: This file contains logging framework implementation. - File: postproc.cpp - -*********************************************************************21*/ -/////////////////////////////////////////////////////////////////////////////// -// @ description: This is source file contains the implementaion of binary log -// postprocessor and has ability to connect to remote node and print live logs. -/////////////////////////////////////////////////////////////////////////////// - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "rl_interface.h" -#include "rl_rlog.h" - -#define TEST_MODE - -namespace cmdlinearg { -int g_port = 0; -std::string g_sFileDb; /* File DB */ -std::string g_sLogDb; /* Log DB */ -std::string g_sOutFile; /* Output file */ -std::string g_sBinLogFile; /* Input binary log file */ -std::string g_ipAddr; -} - -typedef struct -{ - int lineno; - std::string modName; - std::string file; - std::string logStr; - -} LOG_INFO; - -static struct option long_options[] = -{ - {"port", required_argument, 0, 'p'}, - {"logdb", required_argument, 0, 'l'}, - {"ofile", required_argument, 0, 'o'}, - {"blog", required_argument, 0, 'b'}, - {"ipaddr", required_argument, 0, 'i'}, - {0, 0, 0, 0} -}; - -std::map g_mFileInfo; -std::map g_mLogInfo; -FILE* g_fp=stderr; -uint32_t g_ttiCount = 0; -time_t g_basetimeSec; - -void readCmdLineArgs(int argc,char **argv); -void printLogTime(LOGTIME & ltime); -void loadLogDb(); -void printUsage(); -void logHexDump(ARGDATA & log); -bool invalidLogId(LOGID logId); -void openLogFile(const char* file); -void logLevN(LOGDATA & log, LOG_INFO & logInfo, const char* fmtStr, ...); -void logLevS(LOGDATA & log, LOG_INFO & logInfo, const char* fmtStr, const char *logStr); -void logString(ARGDATA & log); -void logIntArg(ARG4DATA* log); -void logArgSpl(SPL_ARGDATA* log); -void processLogs(int fd, bool (*fpReadLog)(int, ARGDATA &)); - -bool readRemoteLogs(int sockfd, ARGDATA & log); -bool readFileLogs(int fd, ARGDATA & log); -int openBinLogFile(); -int connectToLogServer(); - -/////////////////////////////////////////////////////////////////////////////////////////////////// -// @arg[in] argc - Number of arguments -// @arg[in] argv - Command line arguments -// This is main functions, which calls a function to parse command line arguments. Then it loads -// log metadata into memory. And then based on if its remote logging or binary log file parsing -// passes apropriate function pointer to read and convert logs. -/////////////////////////////////////////////////////////////////////////////////////////////////// -int main(int argc, char* argv[]) -{ - readCmdLineArgs(argc, argv); - loadLogDb(); - - if( !cmdlinearg::g_sBinLogFile.empty() ) - { - if( !cmdlinearg::g_sOutFile.empty() ) - { - openLogFile(cmdlinearg::g_sOutFile.c_str()); - - processLogs(openBinLogFile(), readFileLogs); - fclose(g_fp); - } - } - - if( cmdlinearg::g_port != 0 ) { - - if( !cmdlinearg::g_sOutFile.empty() ) { - openLogFile(cmdlinearg::g_sOutFile.c_str()); - } - - - processLogs(connectToLogServer(), readRemoteLogs); - - fclose(g_fp); - } - return 0; -} - -/////////////////////////////////////////////////////////////////////////////////////////////////// -// @param[in] file - Input log file name -// This function opens the log file in write mode. -/////////////////////////////////////////////////////////////////////////////////////////////////// -void openLogFile(const char* file) -{ - g_fp = fopen(file, "w+"); - - if( g_fp == NULL ) - { - fprintf(stderr, "Failed to open log file %s\n", file); - _exit(0); - } - - fprintf(stderr, "Log Output will be written in %s\n", file); -} - -uint32_t swap_uint32( uint32_t val ) -{ - val = ((val << 8) & 0xFF00FF00 ) | ((val >> 8) & 0xFF00FF ); - return (val << 16) | (val >> 16); -} - - -unsigned long EndianSwap32(unsigned long x) -{ - unsigned long y=0; - y += (x & 0x000000FF)<<24; - y += (x & 0xFF000000)>>24; - y += (x & 0x0000FF00)<<8; - y += (x & 0x00FF0000)>>8; - return y; -} - -void print_hex(const char* str, const uint8_t *p, int len) -{ - fprintf(stderr, "%s HEX \n", str); - for(int i=0; iai_family, res->ai_addr->sa_data, addrstr, 100); - - switch(res->ai_family) - { - case AF_INET: - ptr = &((struct sockaddr_in *) res->ai_addr)->sin_addr; - serv_addr.sin_addr = ((struct sockaddr_in *) res->ai_addr)->sin_addr; - sockServAddr = &serv_addr; - ai_family = res->ai_family; - serv_addr.sin_family = res->ai_family; - serv_addr.sin_port = htons(cmdlinearg::g_port); - size = sizeof(serv_addr); - break; - case AF_INET6: - ptr = &((struct sockaddr_in6 *) res->ai_addr)->sin6_addr; - sockServAddr = &serv_addr6; - /* Copy IPv6 address(16bytes) into the destination */ - memcpy((unsigned char*)serv_addr6.sin6_addr.s6_addr, (unsigned char *) - &((struct sockaddr_in6 *) res->ai_addr)->sin6_addr, 16); - ai_family = res->ai_family; - serv_addr6.sin6_family = res->ai_family; - serv_addr6.sin6_port = htons(cmdlinearg::g_port); - size = sizeof(serv_addr6); - break; - default: - sockServAddr = NULL; - break; - } - - if(ptr != NULL) - { - inet_ntop(res->ai_family, ptr, addrstr, 100); - printf ("IPv%d address: %s (%s)\n", res->ai_family == PF_INET6 ? 6 : 4, - addrstr, res->ai_canonname); - } - res = res->ai_next; - } - - if(sockServAddr == NULL || size == 0) - { - fprintf(stderr, "Not able to parse server address\n"); - _exit(0); - } - - if( (sockfd = socket(ai_family, SOCK_STREAM,0)) < 0 ) { - fprintf(stderr, "Failed to create socket\n"); - _exit(0); - } - - if( connect(sockfd, (const sockaddr*)sockServAddr, size) < 0 ) { - perror("ERROR Connecting"); - _exit(0); - } - - if(result != NULL) - { - freeaddrinfo(result); - } - return sockfd; -} - -/////////////////////////////////////////////////////////////////////////////////////////////////// -// @param[in] sockfd - Socket file descriptor -// @paramp[in] log - Log data buffer -// This function reads the log header and remaining log from socket descriptor. Will return false -// if socket operation fails. -/////////////////////////////////////////////////////////////////////////////////////////////////// -bool readRemoteLogs(int sockfd, ARGDATA & log) -{ - int len; - - while( (len = recv(sockfd, (void*)&log.logData, RLOG_FIXED_LENGTH_BUFFER_SIZE, MSG_WAITALL)) == 0 ); - if( len < 0 ) { - return false; - } - - - return true; -} - -/////////////////////////////////////////////////////////////////////////////////////////////////// -// @param[in] fd - input file descriptor -// @param[out] log - Log header -// This function will read the log header and returns success if able to read. -/////////////////////////////////////////////////////////////////////////////////////////////////// -bool readFileLogs(int fd, ARGDATA & log) -{ - int len = read(fd, (void*)&log.logData, sizeof(LOGDATA)); - - if( len <= 0 ) { - return false; - } - -#ifdef RLOG_MULTI_CIRCULAR_BUFFER - if( log.logData.len && read(fd, (void*)log.buf, log.logData.len) <= 0 ) { - return false; - } -#else - uint16_t size = RLOG_FIXED_LENGTH_BUFFER_SIZE - sizeof(LOGDATA); -// if( log.logData.len && read(fd, (void*)log.buf, size) <= 0 ) { - if( read(fd, (void*)log.buf, size) <= 0 ) { - return false; - } -#endif - - return true; -} - -/////////////////////////////////////////////////////////////////////////////////////////////////// -// @param[in] log1 - LOG -// @param[in] log2 - Second Log -// This function compares the TTI of two consecutive logs. -/////////////////////////////////////////////////////////////////////////////////////////////////// -bool cmp_tti(ARGDATA & log1, ARGDATA & log2) -{ - return log2.logData.logTime.ms_tti > log1.logData.logTime.ms_tti ? true : false; -} - -/////////////////////////////////////////////////////////////////////////////////////////////////// -// @param[in] log - Log data -// This function calculates the time based on TTI & time reference associated with it. And thne -// calls the function to print logs in aprpriate text format. -/////////////////////////////////////////////////////////////////////////////////////////////////// -void printLog(ARGDATA & log) -{ - - if( invalidLogId(log.logData.logId) ) - return; - - switch( log.logData.argType ) - { - case LOG_ARG_INT: - logIntArg((ARG4DATA*)&log); - break; - - case LOG_ARG_STR: - logString(log); - break; - - case LOG_ARG_HEX: - logHexDump(log); - break; - - case LOG_ARG_SPL: - logArgSpl((SPL_ARGDATA*)&log); - break; - } -} - -/////////////////////////////////////////////////////////////////////////////////////////////////// -// @param[in] fd - File or socket descriptor -// @param[in] fpReadLog - Function pointer which reads either file or socket based log -// This function reads the binary log file and does sorting of logs based on TTI and then calls the -// function to print it -/////////////////////////////////////////////////////////////////////////////////////////////////// -void processLogs(int fd, bool (*fpReadLog)(int, ARGDATA &)) -{ - ARGDATA log; - bool bSortingRequired = false, bStartBuffering = false; - std::list logList; - - while((*fpReadLog)(fd, log)) - { - if( log.logData.logId == L_TIME_DELIMITER ) - { - bStartBuffering = (bStartBuffering == false) ? true : false; - if( bStartBuffering == true ) { - bSortingRequired = true; - continue; - } - } - - if( bStartBuffering ) { - logList.push_back(log); - continue; - } - - if( bSortingRequired ) { - logList.sort(cmp_tti); - std::for_each(logList.begin(), logList.end(), printLog); - logList.clear(); - bSortingRequired = false; - bStartBuffering = false; - continue; - } - - printLog(log); - } - - /* connection was closed due to some error, but we still have some logs */ - if( bStartBuffering && !logList.empty() ) - { - logList.sort(cmp_tti); - std::for_each(logList.begin(), logList.end(), printLog); - } - - close(fd); -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -// @param[in] log - LOG Data -// This function convert binary log with integer data type into text format. -/////////////////////////////////////////////////////////////////////////////////////////////////// -void logIntArg(ARG4DATA* log) -{ -#ifdef TEST_MODE -// printf("LOG ARG: INT, LEVEL: %s\n", g_logStr[log->logData.logLevel]); -#endif - - LOG_INFO & logInfo = g_mLogInfo[log->logData.logId]; - logLevN(log->logData,logInfo,logInfo.logStr.c_str(),log->arg1,log->arg2,log->arg3,log->arg4); -} - -/////////////////////////////////////////////////////////////////////////////////////////////////// -// @param[in] log - LOG Data -// This function converts binary log containg string into text format. -/////////////////////////////////////////////////////////////////////////////////////////////////// -void logString(ARGDATA & log) -{ -#ifdef TEST_MODE -// printf("LOG ID %ld LOG ARG STRING, LEVEL: %s\n", log.logData.logId, g_logStr[log.logData.logLevel]); -#endif - - LOG_INFO & logInfo = g_mLogInfo[log.logData.logId]; - logLevS(log.logData, logInfo, logInfo.logStr.c_str(), log.buf); -} - -/////////////////////////////////////////////////////////////////////////////////////////////////// -// @param[in] log - LOG Data -// This function converts binary log containg hex dump into readable text format. -/////////////////////////////////////////////////////////////////////////////////////////////////// -void logHexDump(ARGDATA & log) -{ -#ifdef TEST_MODE -// printf("LOG ARG HEX, LEVEL: %s\n", g_logStr[log.logData.logLevel]); -#endif - - LOG_INFO & logInfo = g_mLogInfo[log.logData.logId]; - - char szHex[MAX_LOG_BUF_SIZE*3]; - hextostr(szHex, log.buf, log.logData.len); - - logLevN(log.logData, logInfo, logInfo.logStr.c_str(), szHex); -} - -/////////////////////////////////////////////////////////////////////////////////////////////////// -// @param[in] log - LOG Data -// @param[in] logInfo - Log information structure reference -// @param[in] fmtStr - Formatted string -// This function prints log into console or log file. -/////////////////////////////////////////////////////////////////////////////////////////////////// -void logLevN(LOGDATA & log, LOG_INFO & logInfo, const char* fmtStr, ...) -{ - va_list argList; - const char* file = logInfo.file.c_str(); - - printLogTime(log.logTime); - fprintf(g_fp, "[%s]%s:%d\n%s:", logInfo.modName.c_str(), file, logInfo.lineno, g_logStr[log.logLevel]); - - va_start(argList,fmtStr); - vfprintf(g_fp, fmtStr, argList); - va_end(argList); -} - -/////////////////////////////////////////////////////////////////////////////////////////////////// -// @param[in] log - LOG Data -// @param[in] logInfo - Log information structure reference -// @param[in] fmtStr - Formatted string -// This function prints string log into console or log file. -/////////////////////////////////////////////////////////////////////////////////////////////////// -void logLevS(LOGDATA & log, LOG_INFO & logInfo, const char* fmtStr, const char* logStr) -{ - const char* file = logInfo.file.c_str(); - std::string argStr(logStr, log.len); - printLogTime(log.logTime); - fprintf(g_fp, "[%s]%s:%d\n%s:", logInfo.modName.c_str(), file, logInfo.lineno, g_logStr[log.logLevel]); - fprintf(g_fp, fmtStr, argStr.c_str()); -} - -/////////////////////////////////////////////////////////////////////////////////////////////////// -// @param[in] log - LOG Data -// @param[in] logInfo - Log information structure reference -// @param[in] fmtStr - Formatted string -// This function prints log into console or log file. -/////////////////////////////////////////////////////////////////////////////////////////////////// -void logLevSpl(SPL_ARGDATA* log, LOG_INFO & logInfo, const char* fmtStr, ...) -{ - va_list argList; - const char* file = logInfo.file.c_str(); - - printLogTime(log->logData.logTime); - fprintf(g_fp, "[%s]%s:%d\n%s:%s:%d:", logInfo.modName.c_str(), file, logInfo.lineno, g_logStr[log->logData.logLevel], g_splStr[log->splEnum], log->splArg); - - va_start(argList,fmtStr); - vfprintf(g_fp, fmtStr, argList); - va_end(argList); -} - -/////////////////////////////////////////////////////////////////////////////////////////////////// -// @param[in] log - LOG Data -// This function converts binary log with special arguments into text format. -/////////////////////////////////////////////////////////////////////////////////////////////////// -void logArgSpl(SPL_ARGDATA* log) -{ -#ifdef TEST_MODE -// printf("LOG ARG SPL, LEVEL: %s\n", g_logStr[log->logData.logLevel]); -#endif - LOG_INFO & logInfo = g_mLogInfo[log->logData.logId]; - const char* file = logInfo.file.c_str(); - - logLevSpl(log, logInfo, logInfo.logStr.c_str(),log->arg1, log->arg2, log->arg3, log->arg4); -} - -/////////////////////////////////////////////////////////////////////////////////////////////////// -// @param[in] ltime - Log time -// This function prints log time using standard c formating function fprintf -/////////////////////////////////////////////////////////////////////////////////////////////////// -void printLogTime(LOGTIME & ltime) -{ - struct tm* tm; - time_t curTimeSec; - uint32_t secElapsedFromBeg; - uint32_t ttiNum; - uint32_t miliseconds; - - ttiNum = ltime.ms_tti; - secElapsedFromBeg = ttiNum/1000; - miliseconds = ttiNum%1000; - curTimeSec = g_basetimeSec + secElapsedFromBeg; - - /* Obtain the time of day, and convert it to a tm struct. --*/ - tm = localtime (&curTimeSec); - - if(NULL != tm) - { - fprintf(g_fp,"[%d-%d-%d %d:%d:%d.%03d]", tm->tm_mday, tm->tm_mon+1, tm->tm_year+1900, - tm->tm_hour, tm->tm_min,tm->tm_sec,miliseconds); - } -} - -/////////////////////////////////////////////////////////////////////////////////////////////////// -// @param[in] logId - Log id which is unique to each log -// This function checks if the given log id is valid based on the logdb information loaded into -// memory. -/////////////////////////////////////////////////////////////////////////////////////////////////// -bool invalidLogId(LOGID logId) -{ - /* if this is a time reference this is valid log */ - if( g_mLogInfo.find(logId) == g_mLogInfo.end() ) - { - if(logId != L_TIME_REFERENCE) - { - fprintf(stderr, "Invalid log id %d\n",logId); - } - return true; - } - return false; -} - -/////////////////////////////////////////////////////////////////////////////////////////////////// -// This function parse and reads the logdb file. Extracts the information and stores into map data -// structure. -/////////////////////////////////////////////////////////////////////////////////////////////////// -void loadLogDb() -{ - std::ifstream logdb(cmdlinearg::g_sLogDb.c_str()); - - if(logdb.is_open() == false) { - fprintf(stderr, "Failed to open file %s\n", cmdlinearg::g_sLogDb.c_str()); - _exit(0); - } - - LOGID logId; LOG_INFO logInfo; - std::string line; - std::string & lstr = logInfo.logStr; - - while( getline(logdb, line) ) - { - std::istringstream iss(line); - int pos = 0, newpos=0; - - logId = atol( line.substr(pos, newpos=line.find(';', pos)).c_str() ); - - pos = newpos+1; - logInfo.lineno = atol( line.substr(pos, (newpos=line.find(';', pos)) - pos).c_str() ); - - pos = newpos+1; - logInfo.modName = line.substr(pos, (newpos=line.find(';', pos)) - pos); - - pos = newpos+3; - logInfo.file = line.substr(pos, (newpos=line.find('\"', pos)) - pos); - - pos=line.find('\"',newpos+1) + 1; - logInfo.logStr = line.substr(pos, (newpos=line.find_last_of("\"", pos)) - pos); - lstr.erase(std::remove(lstr.begin(),lstr.end(),'\"')++,lstr.end()); - - -#ifdef TEST_MODE_0 - std::cout << "LOG Id:" << logId << " FILE:" << logInfo.file << " lineno:" << logInfo.lineno; - std::cout << " MOD Name: " << logInfo.modName << std::endl; - std::cout << "LOG STR:[" << logInfo.logStr << "]" << std::endl; -#endif - - logInfo.logStr+= "\n\n"; - - g_mLogInfo[logId] = logInfo; - } - - logdb.close(); - - logInfo.file = "NULL"; - logInfo.lineno = 0; - logInfo.modName = "RLOG"; - logInfo.logStr = RLOG_SEGFAULT_STR; - g_mLogInfo[L_SIGSEGV] = logInfo; - -} - -/////////////////////////////////////////////////////////////////////////////////////////////////// -// @arg[in] argc - Number of arguments -// @arg[in] argv - Command line arguments -// This function parses the command line input parameters. -/////////////////////////////////////////////////////////////////////////////////////////////////// -void readCmdLineArgs(int argc,char **argv) -{ - using namespace cmdlinearg; - /* getopt_long stores the option index here */ - int c, option_index = 0; - - while( (c = getopt_long(argc, argv, "p:f:l:o:b:i:", long_options,&option_index)) != -1 ) - { - switch(c) - { - case 'p': - std::cout<<"option -p with value = " << optarg << std::endl; - cmdlinearg::g_port = atoi(optarg); - break; - case 'f': - std::cout<<"option -f with value = "<< optarg << std::endl; - cmdlinearg::g_sFileDb = optarg; - break; - case 'l': - std::cout<<"option -l with value = "<< optarg << std::endl; - cmdlinearg::g_sLogDb = optarg; - break; - case 'o': - std::cout<<"option -o with value = " << optarg << std::endl; - cmdlinearg::g_sOutFile = optarg; - break; - case 'b': - std::cout<<"option -b with value = " << optarg << std::endl; - cmdlinearg::g_sBinLogFile = optarg; - break; - case 'i': - std::cout<<"option -i with value = " << optarg << std::endl; - cmdlinearg::g_ipAddr = optarg; - break; - defult: - std::cout << "Invalid arguments" << std::endl; - exit(0); - } - } - -// if( g_port == 0 && g_sBinLogFile.empty() ) -// printUsage(); - -} - -/////////////////////////////////////////////////////////////////////////////////////////////////// -// This functin prints the binary log application usage. -/////////////////////////////////////////////////////////////////////////////////////////////////// -void printUsage() -{ - printf("Usage: postproc [-f ] [-l ] [-b | -p ] [-o ] \n"); - printf("\t[--filedb | -p ]\n"); - printf("\t[--logdb | -l ]\n"); - printf("\t[--binlog | -b ]\n"); - printf("\t[--ofile | -o ]\n"); - printf("\t[--port | -p ]\n"); - _exit(0); -} - -/********************************************************************** - End of file -**********************************************************************/ diff --git a/src/rlog/rl_rlog.c b/src/rlog/rl_rlog.c deleted file mode 100644 index d43526b5d..000000000 --- a/src/rlog/rl_rlog.c +++ /dev/null @@ -1,1926 +0,0 @@ -/******************************************************************************* -################################################################################ -# Copyright (c) [2017-2019] [Radisys] # -# # -# 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. # -################################################################################ -*******************************************************************************/ - -/********************************************************************20** - - Name: Radisys Logging Framework - Type: C source file - Desc: This file contains logging framework implementation. - File: rl_rlog.c - -*********************************************************************21*/ -/********************************************************************** - @ description: This is source file which has implementaion of logging - framework. -************************************************************************/ - -#include "envopt.h" -#include "envdep.h" -#include "stdint.h" -#include "rl_interface.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "rl_rlog.h" -#include "rl_platform.h" -#include "gen.h" -#include "ssi.h" -#include "ss_msg.h" -#include "ss_task.h" - -#include "gen.x" -#include "ssi.x" - -#include "ss_queue.h" -#include "ss_queue.x" -#include "ss_task.x" -#include "ss_msg.x" -#include "cm_inet.h" -#include "cm_inet.x" - -#include "rl_interface.h" -#include "rl_soc.h" -char g_fileName[MAX_FILENAME_LEN]; -char g_logDir[MAX_FILENAME_LEN]; -char g_fileList[RLOG_MAX_FILES][MAX_FILENAME_LEN]; -#ifdef RLOG_USE_CIRCULAR_BUFFER -static THREAD_DATA *g_pSingCirBuff = NULL; -static uint16_t g_prevLogOffset=0; -#endif -#ifndef RLOG_ENABLE_TEXT_LOGGING -static volatile uint32_t g_rlogPositionIndex=0; -uint32_t gIpType = CM_IPV4ADDR_TYPE; -#endif - -/////////////////////////////////////////////////////////////////////////////////////////////////// -// Default variable initilization -/////////////////////////////////////////////////////////////////////////////////////////////////// - -/* global file pointer */ -FILE* g_fp = NULL; - -/* L2 Logging */ -#ifndef RLOG_ENABLE_TEXT_LOGGING - -Data *g_l2rlogBuf = NULLP; -Data *g_l2LogBufStartPtr = NULLP; -Data *g_l2LogBufBasePtr = NULLP; -Data *g_logBufRcvdFromL2 = NULLP; -Data *g_l2LogBaseBuff = NULLP; -uint32_t g_logBufLenRcvdFromL2 = 0; -uint32_t g_l2LogBufLen = 0; -uint32_t startL2Logging = 0; -uint32_t g_l2logBuffPos = 0; -/* end */ -#endif /* Binary Logging */ - -/* number of times log function is called */ -int g_nWrites = 0; - -/* Socke descriptor if remote client is connected */ -int g_nCliSocket = 0; - -/* Default log level Error */ -#ifdef DISABLE_RLOG -int g_logLevel = 1; -#else -int g_logLevel = L_MAX_LOG_LEVEL; -#endif -/* MAX Log Files 1 */ -uint8_t g_nMaxLogFiles = 1; - -/* Max File Size limit for each log file */ -uint32_t g_uiMaxFileSizeLimit = MAX_FILE_SIZE; - -/* Default circular buffer size 100Kb*/ -uint32_t g_cirMaxBufferSize = RLOG_MAX_CIRBUF_SIZE; - -/* Default mask for each module is disabled */ -uint32_t g_modMask = 0; -/* Remote Logging port */ -static uint32_t g_nLogPort = RLOG_REMOTE_LOGGING_PORT; - -/* Current File Number index */ -int g_nCurrFileIdx = 0; - -/* Remote logging flag */ -static uint8_t g_bRemoteLoggingDisabled=1; - -/* Global file descriptor for L2 & L3 */ -static int g_fd; - -/* L2 Buffer */ -char g_l2Buf[RLOG_MAX_CIRBUF_SIZE]; - -#ifdef RLOG_USE_CIRCULAR_BUFFER -/* List of thread data pointers */ -THREAD_DATA* g_pCirList[RLOG_MAX_THREADS]; - -/* Number of threads registered */ -static int g_nThreadsRegistered; - -/* Mutex to protect circular buffers */ -pthread_mutex_t g_logmutex, g_condmutex; -pthread_cond_t g_cond; - -uint8_t g_writeCirBuf = 0; - -static int thread_signalled; -#endif - -/* TTI Count */ -static uint32_t numTtiTicks; -/* Console input handling parameters */ -static int g_kIdx, g_action, g_storeKeys; -static char g_keyBuf[32]; - -/* Standard C library, timezone */ -char *tzname[2]; -/////////////////////////////////////////////////////////////////////////////// -// FUNCTION DECLARATIONS // -/////////////////////////////////////////////////////////////////////////////// -#if defined(RLOG_ENABLE_TEXT_LOGGING) -static struct tm* getTime(int* microseconds); -static void getLogTimeStr(char* ts); -#else -#endif -void initGlbDataAtL2(void); -void createNewLogFile(void); -void createL2LogFile(void); -void* rLogServer(void* arg); -void closeConnection(int sockfd); -void storeTimeDelimeter(FILE* fp); -void rlCatchSegViolation(int sig); -void flushData(int sig); -void* cirBufReaderThread(void* arg); -void readCircularBuffers(void); -void userAction(void); -void handleSigIO(int sig); -void rlPrintConfiguration(void); -THREAD_DATA* rlRegisterThread(const char* taskName); -void (*rlSigHandler)(int); -/* L2 Logging */ -void rlInitL2Log(void); -uint32_t g_rlogWriteCount = 0; -uint32_t g_maxRlogCount = 50; -uint32_t g_logsDropCnt = 0; -RLLogCntLmt g_rlLogCntLimit = RL_LOG_COUNT_LIMIT_STOP; - -#ifndef RLOG_ENABLE_TEXT_LOGGING -void readL2LogBuff(void); -S16 rlValidateL2LogBuf(void); -void rlSetL2LogBuf(uint8_t *l2LogBuf,uint32_t l2logLen); -void rlResetL2LogBuf(void); -#endif - - -#ifndef RLOG_ENABLE_TEXT_LOGGING -EndianType getCPU_Endian(Void); -void storeFileHeader(FILE* fp); -void saveLogDataFromCpul(const void* buf, uint16_t len); -void saveLogData(const void* buf, uint16_t len, uint32_t g_rlogWritePosIndex); -void sendToPostProcessor(const void* buf, uint16_t len); -void getLogTimeStr(char* ts); -#endif -/////////////////////////////////////////////////////////////////////////////////////////////////// -// @param[in] modMask - bit mask for any particular module. -// Sets or clears bit for the particular module. If mask value is zero all bits are cleared. -/////////////////////////////////////////////////////////////////////////////////////////////////// -void rlSetModuleMask(uint32_t modMask) -{ - g_modMask = (modMask == 0 ) ? 0 : (g_modMask ^ modMask); -} - -/////////////////////////////////////////////////////////////////////////////////////////////////// -// @param[in] - maxFileSize - Maximum file size in MB. -// @brief This function sets the limit to log file size. -/////////////////////////////////////////////////////////////////////////////////////////////////// -void rlSetLogFileSizeLimit(uint32_t maxFileSize) -{ - g_uiMaxFileSizeLimit = (maxFileSize == 0) ? MAX_FILE_SIZE : maxFileSize*1048576; -} - -/////////////////////////////////////////////////////////////////////////////////////////////////// -// -// -/////////////////////////////////////////////////////////////////////////////////////////////////// -void rlSetNumOfLogFiles(uint8_t nMaxFiles) -{ - if( nMaxFiles > RLOG_MAX_FILES || nMaxFiles == 0 ) { - g_nMaxLogFiles = RLOG_MAX_FILES; - return; - } - - g_nMaxLogFiles = nMaxFiles; -} - -/////////////////////////////////////////////////////////////////////////////////////////////////// -// -// @brief 1-> enable remote logging, 0-> disable remote logging -/////////////////////////////////////////////////////////////////////////////////////////////////// -void rlSetRemoteLoggingFlag(S32 flag) -{ - g_bRemoteLoggingDisabled = !flag; -} - -/////////////////////////////////////////////////////////////////////////////////////////////////// -// @param[in] port - Server port -// @brief Use this API to configure port for remote logging application. -/////////////////////////////////////////////////////////////////////////////////////////////////// -void rlSetLogPort(uint32_t port) -{ - g_nLogPort = port; -} - -/////////////////////////////////////////////////////////////////////////////////////////////////// -// @param[in] enable_core - 1 Enables core file generation 0 - disable -// This enables or disables core file generation -/////////////////////////////////////////////////////////////////////////////////////////////////// -void rlEnableDisableCore(S32 enable_core) -{ - struct rlimit core_limits; - core_limits.rlim_cur = core_limits.rlim_max = enable_core ? RLIM_INFINITY : 0; - setrlimit(RLIMIT_CORE, &core_limits); -} - -/////////////////////////////////////////////////////////////////////////////////////////////////// -// -// -/////////////////////////////////////////////////////////////////////////////////////////////////// -void rlSetLogPath(const char* logDir) -{ - strncpy(g_logDir, logDir, MAX_FILENAME_LEN); -} - -/////////////////////////////////////////////////////////////////////////////////////////////////// -// -// -/////////////////////////////////////////////////////////////////////////////////////////////////// -void rlSetLogFile(const char* fileName) -{ - strncpy(g_fileName, fileName, MAX_FILENAME_LEN); -} - -/////////////////////////////////////////////////////////////////////////////////////////////////// -// -// -/////////////////////////////////////////////////////////////////////////////////////////////////// -void rlSetLogLevel(R_LOG_LEVEL logLevel) -{ - g_logLevel = logLevel + 1; -} - -/////////////////////////////////////////////////////////////////////////////////////////////////// -// @param[in] bufSize - Circulaer buffer size in multiples of 1Kb or 1024 bytes. -// This function is called to set circular buffer size for each thread. -/////////////////////////////////////////////////////////////////////////////////////////////////// -void rlSetCircularBufferSize(uint32_t bufSize) -{ - g_cirMaxBufferSize = bufSize*1024; - g_cirMaxBufferSize = (g_cirMaxBufferSize/50) * 50; -} - -/////////////////////////////////////////////////////////////////////////////////////////////////// -// -// -/////////////////////////////////////////////////////////////////////////////////////////////////// -void rlPrintConfiguration(void) -{ - fprintf(stderr, "Log File:\t\t[%s]\n", g_fileName); - fprintf(stderr, "Log level:\t\t[%s]\n", g_logStr[g_logLevel-1]); -#ifndef ALIGN_64BIT - fprintf(stderr, "Module Mask:\t\t[%ld]\n", g_modMask); - fprintf(stderr, "File Size Limit:\t[%ld]\n", g_uiMaxFileSizeLimit); -#else - fprintf(stderr, "Module Mask:\t\t[%d]\n", g_modMask); - fprintf(stderr, "File Size Limit:\t[%d]\n", g_uiMaxFileSizeLimit); -#endif - fprintf(stderr, "Maximum Log Files:\t[%d]\n", g_nMaxLogFiles); - fprintf(stderr, "Time Zone:\t\t[%s]\n", tzname[0]); - -#ifdef RLOG_ENABLE_TEXT_LOGGING - fprintf(stderr, "Binary Logging:\t\t[Disabled]\n"); - fprintf(stderr, "Remote Logging:\t\t[Disabled]\n"); - fprintf(stderr, "Console Logging:\t[%s]\n", (g_fp==stderr) ? "Enabled" : "Disabled" ); -#else - fprintf(stderr, "Console Logging:\t[Disabled]\n"); - fprintf(stderr, "Binary Logging:\t\t[Enabled]\n"); - fprintf(stderr, "Remote Logging:\t\t[%s]\n", g_bRemoteLoggingDisabled ? "Disabled" : "Enabled"); -#ifndef ALIGN_64BIT - fprintf(stderr, "Remote Logging Port:\t[%ld]\n", g_nLogPort); -#else - fprintf(stderr, "Remote Logging Port:\t[%d]\n", g_nLogPort); -#endif -#ifdef RLOG_USE_CIRCULAR_BUFFER - fprintf(stderr, "Circular Buffer:\t[Enabled]\n"); -#ifndef ALIGN_64BIT - fprintf(stderr, "Circular BufferSize:\t[Actual:%ld][Derived:%ld]\n", - g_cirMaxBufferSize/1024, g_cirMaxBufferSize); -#else - fprintf(stderr, "Circular BufferSize:\t[Actual:%d][Derived:%d]\n", - g_cirMaxBufferSize/1024, g_cirMaxBufferSize); -#endif -#else - fprintf(stderr, "Circular Buffer:\t[Disabled]\n"); -#endif /* RLOG_USE_CIRCULAR_BUFFER */ -#endif /* RLOG_ENABLE_TEXT_LOGGING */ - -} - -#ifdef RLOG_USE_CIRCULAR_BUFFER - -#ifdef RLOG_USE_TTI_LOGGING -#define CHECK_FILE_SIZE if( ++g_nWrites == 200 ) \ -{ \ - g_nWrites = 0; \ - logLev1(L_TIME_REFERENCE, L_ALWAYS, (uint32_t)time(NULL));\ -} -#else -#define CHECK_FILE_SIZE -#endif /* RLOG_USE_TTI_LOGGING */ - -#else /* RLOG_USE_CIRCULAR_BUFFER */ - -#ifdef RLOG_USE_TTI_LOGGING -#define CHECK_FILE_SIZE if( ++g_nWrites == 200 ) \ -{ \ - if( g_fp && ftell(g_fp) > g_uiMaxFileSizeLimit ) { \ - createNewLogFile(); \ - }\ - g_nWrites = 0; \ - logLev1(L_TIME_REFERENCE, L_ALWAYS, (uint32_t)time(NULL));\ -} -#else -#define CHECK_FILE_SIZE if( ++g_nWrites == 200 ) \ -{ \ - if( g_fp && ( (uint32_t)(ftell(g_fp)) > g_uiMaxFileSizeLimit) ) { \ - createNewLogFile(); \ - }\ - g_nWrites = 0; \ -} -#endif /* RLOG_USE_TTI_LOGGING */ -#endif /* RLOG_USE_CIRCULAR_BUFFER */ - - -#ifdef RLOG_USE_CIRCULAR_BUFFER - -#define CHECK_CIRFILE_SIZE if( g_fp && ftell(g_fp) > g_uiMaxFileSizeLimit ) \ - createNewLogFile(); - -/////////////////////////////////////////////////////////////////////////////////////////////////// -// @param[in] tasName - Name of registering thread / task -// This function registers the thread for writing logs. It creates thread specific buffers. -/////////////////////////////////////////////////////////////////////////////////////////////////// -THREAD_DATA* rlRegisterThread(const char* taskName) -{ - THREAD_DATA* pThrData = (THREAD_DATA*) rlCalloc(sizeof(THREAD_DATA)); - - if( pThrData == NULL ) { - fprintf(stderr, "Failed to allocate memory for thread %s\n", taskName); - _exit(0); - } - - pthread_mutex_lock(&g_logmutex); - - /* Allocate circular buffer */ - pThrData->logBuff = (uint8_t*) rlAlloc(g_cirMaxBufferSize); - - if( pThrData->logBuff == NULL ) { -#ifndef ALIGN_64BIT - fprintf(stderr, "Failed to allocate memory [%ld] for thread %s\n",g_cirMaxBufferSize, taskName); -#else - fprintf(stderr, "Failed to allocate memory [%d] for thread %s\n",g_cirMaxBufferSize, taskName); -#endif - _exit(0); - } - - /* store task name */ - strcpy(pThrData->szTaskName, taskName); - - //rlSetThreadSpecificData(pThrData); - - pThrData->listIndex = g_nThreadsRegistered++; - - /* Store this pointerin global list, to access it later */ - g_pCirList[pThrData->listIndex] = pThrData; - - pthread_mutex_unlock(&g_logmutex); - -#ifdef RLOG_DEBUG_MODE -#ifndef ALIGN_64BIT - fprintf(stderr, "rlRegisterThread: allocated CIRCULAR BUFFER of size [%ld]\n", g_cirMaxBufferSize); -#else - fprintf(stderr, "rlRegisterThread: allocated CIRCULAR BUFFER of size [%d]\n", g_cirMaxBufferSize); -#endif - fprintf(stderr, "rlRegisterThread: Total registered threads [%d]\n", g_nThreadsRegistered); -#endif - - return pThrData; -} - -/////////////////////////////////////////////////////////////////////////////////////////////////// -// @param[in] arg - Thread argument -// This thread wakes up periodically and transfer logs from thread specific buffer into file system. -// If buffer is going to be full, this thread is signalled asynchrounously to read buffered logs. -/////////////////////////////////////////////////////////////////////////////////////////////////// -void* cirBufReaderThread(void* arg) -{ - struct timespec timeout; - int retCode; - -#ifdef RLOG_DEBUG_MODE - fprintf(stderr, "Circular Buffer Reader thread started\n"); -#endif - - while(1) - { - /*this thread is not active and waiting to timeout */ - thread_signalled = 0; - - /* set the thread timeout */ - timeout.tv_sec = time(NULL) + RLOG_CIRBUF_READ_INTERVAL; - timeout.tv_nsec = 0; - - /* wait for 120 seconds time interval to read buffer */ - retCode = pthread_cond_timedwait(&g_cond, &g_condmutex, &timeout); - - /* this means, this thread is already active, no need to give any other signal to wake up */ - thread_signalled = 1; - -#ifdef RLOG_DEBUG_MODE - //if(retCode == 0) fprintf(stderr, "cirBufReaderThread: I am signalled to read data\n"); -#endif - - /* If someone has given signal or there is timeout */ - if( retCode == 0 || retCode == ETIMEDOUT ){ - readCircularBuffers(); - continue; - } - - readCircularBuffers(); - -#ifdef RLOG_DEBUG_MODE - fprintf(stderr, "System is exiting ??"); - perror("cirBufReaderThread"); -#endif - break; - } - - return NULL; -} - -/////////////////////////////////////////////////////////////////////////////////////////////////// -// -// -/////////////////////////////////////////////////////////////////////////////////////////////////// -void readCircularBuffers() -{ - uint32_t i, writerPos; - - /* Check if process is L2. If L2 then return from here */ - if (SFndProcId() == TENB_L2_PROC_ID) - { - return; - } - - g_writeCirBuf = 1; - /* Before reading circular buffers, store delimiter */ - //storeTimeDelimeter(g_fp); - - /* lock the mutex */ - pthread_mutex_lock(&g_logmutex); - - for(i=0; i < g_nThreadsRegistered; i++) - { - THREAD_DATA* pThrData = g_pCirList[i]; - - if( pThrData == NULL ) - continue; - - writerPos = pThrData->logBufLen; - -#ifdef RLOG_DEBUG_MODE - //fprintf(stderr, "Thread [%ld] WritePos:[%ld] ReadPos:[%ld]\n", i+1, writerPos, pThrData->logReadPos); -#endif - - if( pThrData->logReadPos < writerPos ) - { - /* Calculate the delta data to be read from buffer */ - int dataLen = writerPos - pThrData->logReadPos; - - /* Write the data into file */ - if( fwrite(pThrData->logBuff+pThrData->logReadPos,1, dataLen, g_fp) == -1 ) - { -#ifdef RLOG_DEBUG_MODE - fprintf(stderr, "Failed to write data len %d\n", dataLen); -#endif - createNewLogFile(); - continue; - } - /* reset log read position to last known position */ - pThrData->logReadPos = writerPos; - } - else if ( pThrData->logReadPos > writerPos ) - { - /* Calculate the remaining data left in the buffer */ - int dataLen = g_cirMaxBufferSize - pThrData->logReadPos; - - /* Write from last know position till end */ - if( fwrite(pThrData->logBuff+pThrData->logReadPos, 1, dataLen, g_fp) == -1 ) - { -#ifdef RLOG_DEBUG_MODE - fprintf(stderr, "Failed to write data len %d\n", dataLen); -#endif - createNewLogFile(); - continue; - } - - /* Write from 0 to len position */ - if( fwrite(pThrData->logBuff, 1, writerPos, g_fp) == -1 ) - { -#ifdef RLOG_DEBUG_MODE - fprintf(stderr, "Failed to write data len %d\n", dataLen); -#endif - createNewLogFile(); - continue; - } - - /* reset log read position to last known position */ - pThrData->logReadPos = writerPos; - } - } - - /* unlock the mutex */ - pthread_mutex_unlock(&g_logmutex); - - /* after reading circular buffers also store delimiter */ - //storeTimeDelimeter(g_fp); - - CHECK_CIRFILE_SIZE - - g_writeCirBuf = 0; -} - -#endif - -#ifndef RLOG_ENABLE_TEXT_LOGGING -/////////////////////////////////////////////////////////////////////////////////////////////////// -// -// -/////////////////////////////////////////////////////////////////////////////////////////////////// -EndianType getCPU_Endian(Void) -{ - unsigned short x; - unsigned char c; - - x = 0x0001; - c = *(unsigned char *)(&x); - - return ( c == 0x01 ) ? little_endian : big_endian; -} - -/////////////////////////////////////////////////////////////////////////////////////////////////// -// -// -/////////////////////////////////////////////////////////////////////////////////////////////////// -void storeFileHeader(FILE* fp) -{ - FILE_HEADER fileHdr; - - memset(&fileHdr, 0, sizeof(FILE_HEADER)); - - fileHdr.endianType = getCPU_Endian(); - fileHdr.dummy32 = 2818049; - fileHdr.END_MARKER = 0xFFFF; - strncpy(fileHdr.szTimeZone, tzname[0], RLOG_TIME_ZONE_LEN); - - fileHdr.time_sec = time(NULL); - if( fwrite((const void*)&fileHdr, 1, sizeof(FILE_HEADER), fp) == -1 ) - { -#ifdef RLOG_DEBUG_MODE - fprintf(stderr, "Failed to write file header\n"); -#endif - createNewLogFile(); - } -} -#endif - -/////////////////////////////////////////////////////////////////////////////////////////////////// -// @param[in] fileName - Log File Name -// @brief This function creates a log file. If log file name is stdout & text logging is enabled, -// file pointer is initialized to standard output. This function also creates thread on which -// remote application can connect & receive binary logs. If circular buffer is enabled, it creates -// thread key, which is used to store & retrieve thread specific buffers and data. -/////////////////////////////////////////////////////////////////////////////////////////////////// -void rlInitLog(uint8_t type) -{ -#ifdef SS_RBUF - /* Initilize the signal handler */ - rlSigHandler = &rlCatchSegViolation; -#else - signal(SIGSEGV, rlCatchSegViolation); - signal(SIGBUS, rlCatchSegViolation); - signal(SIGINT, flushData); -#endif -/* set rate limit count for L3 Logs */ - g_maxRlogCount = RLOG_LIMIT_L3_COUNT; - -#ifdef RLOG_DEBUG_MODE - rlPrintConfiguration(); -#endif /* RLOG_DEBUG_MODE */ - -#if RLOG_ALLOW_CONSOLE_LOGS - if( !strcmp(g_fileName, "stdout")) { - g_fp = stderr; - return; - } -#endif - -#ifndef RLOG_ENABLE_TEXT_LOGGING - { - printf("\n IP Type before reader thread spawn [%d]\n",type); - /* Allocate circular buffer */ - gIpType = type; - pthread_t tid; - if( pthread_create(&tid, NULL, &rLogServer, NULL) != 0 ) { - fprintf(stderr, "Failed to initialize log server thread\n"); - _exit(0); - } - } - - rlInitPlatformSpecific(); - -#ifdef RLOG_USE_CIRCULAR_BUFFER - { - pthread_t tid; - pthread_mutex_init(&g_logmutex, NULL); - if( pthread_create(&tid, NULL, &cirBufReaderThread, NULL) != 0 ) { - fprintf(stderr, "Failed to initialize log server thread\n"); - _exit(0); - } -/* Initialize single circular buffer for all threads */ - g_pSingCirBuff = rlRegisterThread("DUMMY"); -} - -#endif -#endif - - createNewLogFile(); -} - - -////////////////////////////////////////////////////////////////////////// -// @Function : rlInitL2Log -// @Discription : This will be trigigered from cl init function to -// allocate buffer from shared memory and to intialize -// the buffer -// @in : void -// @out : void -////////////////////////////////////////////////////////////////////////// -void rlInitL2Log(void) -{ - -/* set rate limit count for L3 Logs */ - g_maxRlogCount = RLOG_LIMIT_L2_COUNT; - -#ifndef RLOG_ENABLE_TEXT_LOGGING -/* Initialise memory to write logs in L2. This is soc specific - function present in soc file. */ - rlInitL2SocSpecific(); - -#else - -/* This is used to initialize global variable at L2 */ - initGlbDataAtL2(); - createL2LogFile(); - -#endif /* Binary Logging */ -} - - -#ifndef RLOG_ENABLE_TEXT_LOGGING -/////////////////////////////////////////////////////////////////////////////////////////////////// -// @param[in] arg - Input thread argument - IP Address type. -// @brief This is log server thread which listens on configred port. This allows user to connect to -// log server and view log data live. -/////////////////////////////////////////////////////////////////////////////////////////////////// -void* rLogServer(void* arg) -{ - CmInetCmnSockAddr serv_addr; - CmInetCmnSockAddr cli_addr; - int sockfd; - int newsockfd; - int clilen = 0; - int domain = AF_INET; - memset(&serv_addr, 0, sizeof(serv_addr)); - - - if(gIpType == CM_IPV4ADDR_TYPE) - { -#ifndef ALIGN_64BIT - printf("Initializing RLOG for IPV4- %ld\n",gIpType); -#else - printf("Initializing RLOG for IPV4- %d\n",gIpType); -#endif - clilen = serv_addr.len = sizeof(struct sockaddr_in); - domain = AF_INET; - serv_addr.type = CM_IPV4ADDR_TYPE; - serv_addr.u.addr.sin_family = AF_INET; - serv_addr.u.addr.sin_addr.s_addr = INADDR_ANY; - serv_addr.u.addr.sin_port = htons(g_nLogPort); - } - else - { -#ifndef ALIGN_64BIT - printf("Initializing RLOG for IPV6 - %ld\n",gIpType); -#else - printf("Initializing RLOG for IPV6 - %d\n",gIpType); -#endif -#ifdef IPV6_SUPPORTED - if(gIpType == CM_IPV6ADDR_TYPE) - { - clilen = serv_addr.len = sizeof(struct sockaddr_in6); - domain = AF_INET6; - serv_addr.type = CM_IPV6ADDR_TYPE; - serv_addr.u.addr6.sin6_family = AF_INET6; - serv_addr.u.addr6.sin6_addr = in6addr_any; - serv_addr.u.addr6.sin6_port = htons(g_nLogPort); - } -#endif - } - if( (sockfd = socket(domain, SOCK_STREAM, 0)) < 0 ) { - fprintf(stderr, "RLOG: Failed to create socket\n"); - _exit(0); - } - - if( bind(sockfd, (struct sockaddr*)&(serv_addr.u),serv_addr.len) < 0 ) { - fprintf(stderr, "RLOG: Error in Binding\n"); - perror("RLOG"); - _exit(0); - } - - listen(sockfd, 5); - - while(1) - { - newsockfd = accept(sockfd, (struct sockaddr*)&(cli_addr.u), (socklen_t *) &clilen); - if( newsockfd < 0 ) { - fprintf(stderr, "RLOG: Error on accept\n"); - perror("RLOG"); - return 0; - } - - /* If remote logging is disabled or there is already 1 client connected */ - if( g_bRemoteLoggingDisabled || g_nCliSocket ) { - /* close the new connection and proceed */ - closeConnection(newsockfd); - continue; - } - - g_nCliSocket = newsockfd; - } - - return 0; -} - -/////////////////////////////////////////////////////////////////////////////////////////////////// -// -// -/////////////////////////////////////////////////////////////////////////////////////////////////// -void closeConnection(int sockfd) -{ - shutdown(sockfd, SHUT_RDWR); - close(sockfd); -} - -#endif - -/////////////////////////////////////////////////////////////////////////////////////////////////// -// -// -/////////////////////////////////////////////////////////////////////////////////////////////////// -void handleSigIO(int sig) -{ - char ch; - - if( read(0, &ch, 1) <= 0 ) - return; - - rlHandleConInput(ch); -} - -/////////////////////////////////////////////////////////////////////////////////////////////////// -// -// -/////////////////////////////////////////////////////////////////////////////////////////////////// -int rlHandleConInput(char ch) -{ - if( ch == RLOG_CTRL_L ) { - g_storeKeys = 1; - g_action = RLOG_SET_LOGLEVEL; - fprintf(stderr, "\nEnter new log level:"); - return 1; - } - - if( ch == RLOG_CTRL_Y ) { - g_storeKeys = 1; - g_action = RLOG_SET_MODMASK; - fprintf(stderr, "\nEnter module number:"); - return 1; - } - - if( ch == RLOG_ENTER_KEY && g_action ) { - g_keyBuf[g_kIdx] = '\0'; - userAction(); - return 1; - } - - if( g_storeKeys ) { - g_keyBuf[g_kIdx] = ch; - g_kIdx +=1; - } - - return 0; -} - -/////////////////////////////////////////////////////////////////////////////////////////////////// -// -// -/////////////////////////////////////////////////////////////////////////////////////////////////// -void userAction() -{ - unsigned int val = atol(g_keyBuf); - - switch( g_action ) - { - case RLOG_SET_LOGLEVEL: - { - if( val >= L_MAX_LOG_LEVEL ) - fprintf(stderr, "Invalid log level\n"); - else - { - if( val > L_FATAL ) - { - rlSetLogLevel((R_LOG_LEVEL)val); - fprintf(stderr, "New Log level is %s\n", g_logStr[val]); - } - else - fprintf(stderr, "Log level below L_ERROR is not allowed\n"); - } - } - break; - - case RLOG_SET_MODMASK: - { - rlSetModuleMask(val); - fprintf(stderr, "Toggled log mask %d\n", val); - } - break; - } - - g_action = 0; - g_kIdx= 0; - g_storeKeys = 0; -} - -/////////////////////////////////////////////////////////////////////////////////////////////////// -// -// -/////////////////////////////////////////////////////////////////////////////////////////////////// -void rlCatchSegViolation(int sig) -{ - int i, nStrLen, nDepth; - - void *stackTraceBuf[RLOG_MAX_STACK_DEPTH]; - const char* sFileNames[RLOG_MAX_STACK_DEPTH]; - const char* sFunctions[RLOG_MAX_STACK_DEPTH]; - - char **strings; char buf[RLOG_MAX_STACK_DEPTH*128]={0}; -#ifdef T2K_MEM_LEAK_DBG - DumpT2kMemLeakInfoToFile(); -#endif -#ifdef SSI_STATIC_MEM_LEAK_DETECTION - DumpStaticMemLeakFiles(); -#endif - - nDepth = backtrace(stackTraceBuf, RLOG_MAX_STACK_DEPTH); - - - strings = (char**) backtrace_symbols(stackTraceBuf, nDepth); - - for(i = 0, nStrLen=0; i < nDepth; i++) - { - sFunctions[i] = (strings[i]); - sFileNames[i] = "unknown file"; - -#ifndef RLOG_ENABLE_TEXT_LOGGING - logLevS(L_SIGSEGV, L_FATAL, strings[i]); -#endif - printf("BT[%d] : len [%ld]: %s\n",i, (PTR)strlen(sFunctions[i]),strings[i]); - sprintf(buf+nStrLen, " in Function %s (from %s)\n", sFunctions[i], sFileNames[i]); - nStrLen += strlen(sFunctions[i]) + strlen(sFileNames[i]) + 15; - } - -#ifdef RLOG_ENABLE_TEXT_LOGGING - logLevS(g_logStr[L_FATAL], "RLOG", "NULL", 0, FMTSTR RLOG_SEGFAULT_STR, buf); - fflush(g_fp); -#else - logLevS(L_SIGSEGV, L_FATAL, buf); -#endif - - flushData(SIGSEGV); -} - -/////////////////////////////////////////////////////////////////////////////////////////////////// -// -// -/////////////////////////////////////////////////////////////////////////////////////////////////// -void flushData(int sig) -{ -#ifdef RLOG_USE_CIRCULAR_BUFFER - readCircularBuffers(); -#endif - g_rlogWriteCount = 0; - - fclose(g_fp); - - if(SIGSEGV == sig) - { - signal(sig, SIG_DFL); - kill(getpid(), sig); - } - else - { - exit(0); - } - - return; -} - -/////////////////////////////////////////////////////////////////////////////////////////////////// -// -// -/////////////////////////////////////////////////////////////////////////////////////////////////// - -#ifdef RLOG_ENABLE_TEXT_LOGGING - -#define TIME_PARAMS tm->tm_mday, tm->tm_mon+1, tm->tm_year+1900,tm->tm_hour, tm->tm_min,tm->tm_sec,microseconds - -/////////////////////////////////////////////////////////////////////////////////////////////////// -// -// -/////////////////////////////////////////////////////////////////////////////////////////////////// -void logLevS(PSTR strLogLevel, PSTR modName, PSTR file, int lineno, PSTR fmtStr, PSTR str, ...) -{ - int microseconds=0; - - struct tm* tm = getTime(µseconds); - if (tm) fprintf(g_fp, fmtStr, TIME_PARAMS, modName, file, lineno, strLogLevel, str); - - CHECK_FILE_SIZE -} - -/////////////////////////////////////////////////////////////////////////////////////////////////// -// -// -/////////////////////////////////////////////////////////////////////////////////////////////////// -void logLevH(PSTR strLogLevel, PSTR modName, PSTR file, int lineno, PSTR fmtStr, PSTR hexdump, int hexlen, ...) -{ - int microseconds=0; - char szHex[MAX_LOG_BUF_SIZE*3]; - - struct tm* tm = getTime(µseconds); - hextostr(szHex, hexdump, hexlen); - if (tm) fprintf(g_fp, fmtStr, TIME_PARAMS, modName, file, lineno, strLogLevel, szHex); - - CHECK_FILE_SIZE -} - -/////////////////////////////////////////////////////////////////////////////////////////////////// -// -// -/////////////////////////////////////////////////////////////////////////////////////////////////// -void logLevE(PSTR strLogLevel, PSTR modName, PSTR file, int lineno, PSTR fmtStr, R_SPL_ARG splType, - uint32_t splVal, uint32_t arg1, uint32_t arg2, uint32_t arg3, uint32_t arg4, ...) -{ - int microseconds=0; - - struct tm* tm = getTime(µseconds); - if (tm) fprintf(g_fp, fmtStr, TIME_PARAMS, modName, file, lineno, strLogLevel, g_splStr[splType], splVal, - arg1, arg2, arg3, arg4); - - CHECK_FILE_SIZE -} -/////////////////////////////////////////////////////////////////////////////////////////////////// -// -// -/////////////////////////////////////////////////////////////////////////////////////////////////// -void logLev0(PSTR strLogLevel, PSTR modName, PSTR file, int lineno, PSTR fmtStr, ...) -{ - int microseconds=0; - - struct tm* tm = getTime(µseconds); - if (tm) fprintf(g_fp, fmtStr, TIME_PARAMS, modName, file, lineno, strLogLevel); - - CHECK_FILE_SIZE -} - -/////////////////////////////////////////////////////////////////////////////////////////////////// -// -// -/////////////////////////////////////////////////////////////////////////////////////////////////// -void logLev1(PSTR strLogLevel, PSTR modName, PSTR file, int lineno, PSTR fmtStr, uint32_t arg1, ...) -{ - int microseconds=0; - - struct tm* tm = getTime(µseconds); - if (tm) fprintf(g_fp, fmtStr, TIME_PARAMS, modName, file, lineno, strLogLevel, arg1); - - CHECK_FILE_SIZE -} - -/////////////////////////////////////////////////////////////////////////////////////////////////// -// -// -/////////////////////////////////////////////////////////////////////////////////////////////////// -void logLev2(PSTR strLogLevel, PSTR modName, PSTR file, int lineno, PSTR fmtStr, uint32_t arg1, uint32_t arg2, ...) -{ - int microseconds=0; - - struct tm* tm = getTime(µseconds); - if (tm) fprintf(g_fp, fmtStr, TIME_PARAMS, modName, file, lineno, strLogLevel, arg1, arg2); - - CHECK_FILE_SIZE -} - -/////////////////////////////////////////////////////////////////////////////////////////////////// -// -// -/////////////////////////////////////////////////////////////////////////////////////////////////// -void logLev3(PSTR strLogLevel, PSTR modName, PSTR file, int lineno, PSTR fmtStr, - uint32_t arg1, uint32_t arg2, uint32_t arg3, ...) -{ - int microseconds=0; - - struct tm* tm = getTime(µseconds); - if (tm) fprintf(g_fp, fmtStr, TIME_PARAMS, modName, file, lineno, strLogLevel, arg1, arg2, arg3); - - CHECK_FILE_SIZE -} - -/////////////////////////////////////////////////////////////////////////////////////////////////// -// -// -/////////////////////////////////////////////////////////////////////////////////////////////////// -void logLev4(PSTR strLogLevel, PSTR modName, PSTR file, int lineno, PSTR fmtStr, - uint32_t arg1, uint32_t arg2, uint32_t arg3, uint32_t arg4, ...) -{ - int microseconds=0; - - struct tm* tm = getTime(µseconds); - if (tm) fprintf(g_fp, fmtStr, TIME_PARAMS, modName, file, lineno, strLogLevel, arg1, arg2, arg3, arg4); - - CHECK_FILE_SIZE -} - -/////////////////////////////////////////////////////////////////////////////////////////////////// -// -// -/////////////////////////////////////////////////////////////////////////////////////////////////// -void logLevN(int logLevel, const char* modName, const char* file, int lineno, const char* fmtStr, ...) -{ - va_list argList; - char szTime[RLOG_MAX_TIME_STAMP]; - char szLog1[MAX_LOG_LEN], szLog2[MAX_LOG_LEN]; - - getLogTimeStr(szTime); - snprintf(szLog1, MAX_LOG_LEN, "[%s][%s]%s:%d\n%s:", szTime, modName, file, lineno, g_logStr[logLevel]); - - va_start(argList,fmtStr); - vsnprintf(szLog2, MAX_LOG_LEN, fmtStr, argList); - va_end(argList); - - fprintf(g_fp, "%s%s",szLog1, szLog2); - - CHECK_FILE_SIZE -} -#else /* BINARY LOGGING */ - -#define RLOG_SAVE_TIME(_logTime) _logTime.ms_tti=numTtiTicks; - -void saveLogDataFromCpul(const void* buf, uint16_t len) -{ -#ifdef RLOG_USE_CIRCULAR_BUFFER - THREAD_DATA* p = (THREAD_DATA*) g_pSingCirBuff; - - if( (p->logBufLen+len) > g_cirMaxBufferSize ) - { - S32 tempLen = g_cirMaxBufferSize - p->logBufLen; - S32 remlen = len-tempLen; - if ((tempLen < 0) || (remlen < 0)) - { - return; - } - if(remlen == 0) - { - g_rlogPositionIndex = 0; - g_prevLogOffset = 0; - } - else - { - g_rlogPositionIndex = remlen/50; - } - - /* we are unlikely to hit this condition, but to prevent corruption of binary logs */ - /* we cannot write the data, if we write, data will be corrected forever */ - if( remlen > p->logReadPos ) - { - fprintf(stderr, "cannot write data.retune buffer parameters\n"); - return; - } - if( (p->logReadPos - remlen) < RLOG_READ_POS_THRESHOLD && !thread_signalled ) - { - pthread_cond_signal(&g_cond); /* this will wakeup thread */ - } - - - /* Copy data till end of the buffer */ - memcpy(p->logBuff+p->logBufLen, buf, tempLen); - /* Copy remaining data from the start of buffer */ - memcpy(p->logBuff, ((const uint8_t *)buf)+tempLen, remlen); - /* Store buffer length position */ - p->logBufLen = len-tempLen; - } - else - { - /* if reader is far behind and writer is reaching reader position, diff < 5Kb */ - /* its time to wakeup thread if reader has not read much of data */ - if( p->logReadPos > p->logBufLen && (p->logReadPos - p->logBufLen) < RLOG_READ_POS_THRESHOLD && !thread_signalled ) - pthread_cond_signal(&g_cond); /* this will wakeup thread */ - - g_rlogPositionIndex += (len/50); - memcpy(p->logBuff+p->logBufLen, buf, len); - p->logBufLen += len; - } -#else - /* Directly write received buffer in cpuh log file */ - if( fwrite((const void*)buf, 1, len, g_fp) == -1 ) - { -#ifdef RLOG_DEBUG_MODE - fprintf(stderr, "Failed to write log data in file\n"); - perror("LOG"); -#endif - createNewLogFile(); - } -#endif - -} - -void saveLogData(const void* buf, uint16_t len, uint32_t g_rlogWritePosIndex) -{ - - ++g_rlogWriteCount ; - - if((1 == g_writeCirBuf) || - ((g_rlLogCntLimit == RL_LOG_COUNT_LIMIT_START) && - (g_rlogWriteCount > g_maxRlogCount)) || - (len > RLOG_FIXED_LENGTH_BUFFER_SIZE)) - { - g_rlogPositionIndex --; - g_logsDropCnt++; - return; - } - - /* check for if L2 is going to store logs */ - if (SFndProcId() == TENB_L2_PROC_ID) - { - if((g_l2LogBufLen + RLOG_FIXED_LENGTH_BUFFER_SIZE) < L2LOG_BUFF_BLOCK_SIZE - sizeof(g_l2LogBufLen) ) - { - /* copying logs in shared buffer */ - memcpy(g_l2LogBufStartPtr, buf, len); - - g_l2LogBufStartPtr += RLOG_FIXED_LENGTH_BUFFER_SIZE; - /* increasing total log length with L2 log length */ - g_l2LogBufLen += RLOG_FIXED_LENGTH_BUFFER_SIZE; - } - return; - } -#ifdef RLOG_USE_CIRCULAR_BUFFER - uint32_t logWritePointerPosition; - THREAD_DATA* p = (THREAD_DATA*) g_pSingCirBuff; - - /* if buffer is about to full, write till end and continue writing from begining */ - if( ((g_rlogWritePosIndex+1) * RLOG_FIXED_LENGTH_BUFFER_SIZE) > g_cirMaxBufferSize ) - { - /* setting this flag to 1 to avoid other threads - to write in same circular buffer */ - g_writeCirBuf = 1; - /* Start globalPositionIndex again */ - g_rlogPositionIndex = 0; - - /* if reader has not read initial data, minmum buffer size should be 100Kb */ - if( p->logReadPos < RLOG_READ_POS_THRESHOLD && !thread_signalled ) { - pthread_cond_signal(&g_cond); /* this will wakeup thread */ - } - - /* we are unlikely to hit this condition, but to prevent corruption of binary logs */ - /* we cannot write the data, if we write, data will be corrected forever */ - if( RLOG_FIXED_LENGTH_BUFFER_SIZE > p->logReadPos ) { - fprintf(stderr, "cannot write data.retune buffer parameters\n"); - return; - } - - /* Copy data from the start of buffer */ - memcpy(p->logBuff, buf, len); - /* Store buffer length position */ - p->logBufLen = RLOG_FIXED_LENGTH_BUFFER_SIZE; - g_prevLogOffset = 0; - /* setting this flag to 0 so that other threads - will start writing in circular buffer */ - g_writeCirBuf = 0; - } - else - { - /* if reader is far behind and writer is reaching reader position, diff < 5Kb */ - /* its time to wakeup thread if reader has not read much of data */ - if( p->logReadPos > p->logBufLen && (p->logReadPos - p->logBufLen) < RLOG_READ_POS_THRESHOLD ) - pthread_cond_signal(&g_cond); /* this will wakeup thread */ - - logWritePointerPosition = (g_rlogWritePosIndex * RLOG_FIXED_LENGTH_BUFFER_SIZE) + g_prevLogOffset; - - memcpy(p->logBuff+logWritePointerPosition, buf, len); - p->logBufLen += RLOG_FIXED_LENGTH_BUFFER_SIZE; - } -#else /* !RLOG_USE_CIRCULAR_BUFFER */ - if( fwrite((const void*)buf, 1, RLOG_FIXED_LENGTH_BUFFER_SIZE, g_fp) == -1 ) - { -#ifdef RLOG_DEBUG_MODE - fprintf(stderr, "Failed to write log data in file\n"); - perror("LOG"); -#endif - createNewLogFile(); - } -#endif /* RLOG_USE_CIRCULAR_BUFFER */ - - CHECK_FILE_SIZE - - /* If post processor connected send logs */ - if( g_nCliSocket && send(g_nCliSocket, buf, RLOG_FIXED_LENGTH_BUFFER_SIZE, 0 ) == -1 ) { - closeConnection(g_nCliSocket); - g_nCliSocket = 0; - } - -#ifdef RLOG_DEBUG_MODE_2 - { - static int maxlen = 0; - if(len > maxlen) { - maxlen = len; - fprintf(stderr, "MAX BUFFER SIZE is binary mode is [%d]\n", maxlen); - } - } -#endif - -} - -void sendToPostProcessor(const void* buf, uint16_t len) -{ - if( send(g_nCliSocket, buf, len, 0 ) == -1 ) { - perror("ERROR Sending"); - closeConnection(g_nCliSocket); - g_nCliSocket = 0; - } -} -void logLevS( LOGID logId, R_LOG_LEVEL logLevel, const char* str, ...) -{ - ARGDATA arg; uint16_t bufsize; - - - RLOG_SAVE_TIME(arg.logData.logTime); - - arg.logData.logId = logId; - arg.logData.argType = LOG_ARG_STR; - arg.logData.logLevel = logLevel; - arg.logData.numOfArgs = 1; - arg.logData.len = strlen(str); - - memcpy(arg.buf, (const void*)str, arg.logData.len); - bufsize = sizeof(LOGDATA)+arg.logData.len; - - saveLogData((const void*)&arg, bufsize,g_rlogPositionIndex++); -} - -void logLevH( LOGID logId, R_LOG_LEVEL logLevel, PSTR hex, int hexlen, ...) -{ - ARGDATA arg; - int bufsize; - - RLOG_SAVE_TIME(arg.logData.logTime); - - arg.logData.logId = logId; - arg.logData.argType = LOG_ARG_HEX; - arg.logData.logLevel = logLevel; - arg.logData.numOfArgs = 1; - arg.logData.len = hexlen; - - memcpy(arg.buf, (const void*)hex, hexlen); - bufsize = sizeof(LOGDATA)+arg.logData.len; - - saveLogData((const void*)&arg, bufsize,g_rlogPositionIndex++); -} -void logLevE(LOGID logId, R_LOG_LEVEL logLevel, R_SPL_ARG splType, uint32_t splVal, uint32_t arg1, uint32_t arg2, - uint32_t arg3, uint32_t arg4, ...) -{ - SPL_ARGDATA arg; - int bufsize; - - RLOG_SAVE_TIME(arg.logData.logTime); - - arg.logData.logId = logId; - arg.logData.argType = LOG_ARG_SPL; - arg.logData.logLevel = logLevel; - if( arg1 ) { - arg.logData.numOfArgs = (arg2 == 0 ) ? 1 : (arg3==0 ? 2 : (arg4==0 ? 3 : 4)); - } else { - arg.logData.numOfArgs = 0; - } - - arg.logData.len = sizeof(u_int8_t) + sizeof(uint32_t) + (sizeof(uint32_t)*arg.logData.numOfArgs); - - arg.splEnum = splType; - arg.splArg = splVal; - arg.arg1 = arg1; - arg.arg2 = arg2; - arg.arg3 = arg3; - arg.arg4 = arg4; - - bufsize = sizeof(LOGDATA)+arg.logData.len; - - saveLogData((const void*)&arg, bufsize,g_rlogPositionIndex++); -} - -void logLev0( LOGID logId, R_LOG_LEVEL logLevel, ...) -{ - //LOGDATA logData; - ARG4DATA arg; - - RLOG_SAVE_TIME(arg.logData.logTime); - - arg.logData.logId = logId; - arg.logData.argType = LOG_ARG_STR; - arg.logData.logLevel = logLevel; - arg.logData.numOfArgs = 0; - arg.logData.len = 0; - - saveLogData((const void*)&arg, sizeof(LOGDATA),g_rlogPositionIndex++); -} - -void logLev1( LOGID logId, R_LOG_LEVEL logLevel, uint32_t arg1, ...) -{ - ARG4DATA arg; - int bufsize; - - RLOG_SAVE_TIME(arg.logData.logTime); - - arg.logData.logId = logId; - arg.logData.argType = LOG_ARG_INT; - arg.logData.logLevel = logLevel; - arg.logData.numOfArgs = 1; - arg.logData.len = sizeof(uint32_t); - - arg.arg1 = arg1; - bufsize = sizeof(LOGDATA)+arg.logData.len; - - saveLogData((const void*)&arg, bufsize,g_rlogPositionIndex++); -} -void logLev2( LOGID logId, R_LOG_LEVEL logLevel, uint32_t arg1, uint32_t arg2, ...) -{ - ARG4DATA arg; - int bufsize; - - RLOG_SAVE_TIME(arg.logData.logTime); - - arg.logData.logId = logId; - arg.logData.argType = LOG_ARG_INT; - arg.logData.logLevel = logLevel; - arg.logData.numOfArgs = 2; - arg.logData.len = 2 * sizeof(uint32_t); - - arg.arg1 = arg1; - arg.arg2 = arg2; - - bufsize = sizeof(LOGDATA)+arg.logData.len; - - saveLogData((const void*)&arg, bufsize,g_rlogPositionIndex++); -} -void logLev3( LOGID logId, R_LOG_LEVEL logLevel, uint32_t arg1, uint32_t arg2, uint32_t arg3, ...) -{ - ARG4DATA arg; - int bufsize; - - RLOG_SAVE_TIME(arg.logData.logTime); - - arg.logData.logId = logId; - arg.logData.argType = LOG_ARG_INT; - arg.logData.logLevel = logLevel; - arg.logData.numOfArgs = 3; - arg.logData.len = 3 * sizeof(uint32_t); - - arg.arg1 = arg1; - arg.arg2 = arg2; - arg.arg3 = arg3; - - bufsize = sizeof(LOGDATA)+arg.logData.len; - - saveLogData((const void*)&arg, bufsize,g_rlogPositionIndex++); -} -void logLev4( LOGID logId, R_LOG_LEVEL logLevel, uint32_t arg1, uint32_t arg2, uint32_t arg3, uint32_t arg4, ...) -{ - ARG4DATA arg; - - RLOG_SAVE_TIME(arg.logData.logTime); - - arg.logData.logId = logId; - arg.logData.argType = LOG_ARG_INT; - arg.logData.logLevel = logLevel; - arg.logData.numOfArgs = 4; - arg.logData.len = 4 * sizeof(uint32_t); - - arg.arg1 = arg1; - arg.arg2 = arg2; - arg.arg3 = arg3; - arg.arg4 = arg4; - - saveLogData((const void*)&arg, sizeof(ARG4DATA),g_rlogPositionIndex++); -} - -#endif /* BINARY LOGGING */ - -#if defined(RLOG_ENABLE_TEXT_LOGGING) -struct tm* getTime(int* microseconds) -{ -#ifndef SS_LINUX - struct timespec ptime; -#else - struct timeval ptime; -#endif - -#ifndef SS_LINUX - clock_gettime(CLOCK_REALTIME, &ptime); - *microseconds = ptime.tv_nsec / 1000; -#else - gettimeofday(&ptime, NULL); - *microseconds = ptime.tv_usec; -#endif - - /* Obtain the time of day, and convert it to a tm struct. --*/ - return localtime (&ptime.tv_sec); -} -#elif !defined(RLOG_USE_TTI_LOGGING) -static void getLogTime(LOGTIME* logTime) -{ -#ifndef SS_LINUX - struct timespec ptime; -#else - struct timeval ptime; -#endif - -#ifndef SS_LINUX - clock_gettime(CLOCK_REALTIME, &ptime); - logTime->ms_tti = ptime.tv_nsec / 1000; -#else - gettimeofday(&ptime, NULL); - logTime->ms_tti = ptime.tv_usec/1000; -#endif - - logTime->tv_sec = ptime.tv_sec; -} - -#endif - -void getLogTimeStr(char* ts) -{ -#ifndef SS_LINUX - struct timespec ptime; -#else - struct timeval ptime; -#endif - struct tm* tm; - int microseconds; - -#ifndef SS_LINUX - clock_gettime(CLOCK_REALTIME, &ptime); - microseconds = ptime.tv_nsec / 1000; -#else - gettimeofday(&ptime, NULL); - microseconds = ptime.tv_usec/1000; -#endif - - /* Obtain the time of day, and convert it to a tm struct. --*/ - tm = localtime (&ptime.tv_sec); - - if (tm) sprintf(ts,"%d_%d_%d_%d_%d_%d.%03d", tm->tm_year+1900, tm->tm_mon+1, tm->tm_mday, - tm->tm_hour, tm->tm_min,tm->tm_sec,microseconds); -} -/////////////////////////////////////////////////////////////////////////////////////////////////// -// -// -/////////////////////////////////////////////////////////////////////////////////////////////////// - -void rlEnaBleBufferedIO(void) -{ - setvbuf (g_fp, NULL, _IOFBF, 1024 ); -} - -void createNewLogFile() -{ - FILE *fp, *prev_fp = g_fp; - char curTime[RLOG_MAX_TIME_STAMP]; int fd; - char *temptr; - /* Fix for CR ccpu00143040 */ - DIR *dir = NULLP; - - /* get current time, when file is created */ - getLogTimeStr(curTime); - temptr = strchr(curTime, '.'); - if (temptr != NULLP) - { - *temptr = 0; - } - /* Fix for CR ccpu00143040 */ - dir = opendir(g_logDir); - if ( dir == NULLP ) - { - mkdir(g_logDir, O_RDWR); - } - else - { - closedir(dir); - } - /* remove old file from system */ - if( g_fileList[g_nCurrFileIdx][0] != '\0' ) - unlink(g_fileList[g_nCurrFileIdx]); - -#ifdef RLOG_ENABLE_TEXT_LOGGING - /* create file name, Example-> dbglog_2013_08_11_15_30_00 */ - snprintf(g_fileList[g_nCurrFileIdx],MAX_FILENAME_LEN, "%s/%s_%s.txt",g_logDir, g_fileName, curTime ); - fp = fopen(g_fileList[g_nCurrFileIdx], "w+"); -#else - snprintf(g_fileList[g_nCurrFileIdx],MAX_FILENAME_LEN, "%s/%s_%s.bin",g_logDir, g_fileName, curTime ); - fp = fopen(g_fileList[g_nCurrFileIdx], "ab+"); -#endif - - if( fp == NULL ) { - fprintf(stderr, "Failed to open log file %s\n", g_fileList[g_nCurrFileIdx]); - return; - } - - fd = fileno(fp); - - g_fp = fp; - g_fd = fd; - - if( fcntl(g_fd, F_SETFL, fcntl(g_fd, F_GETFL, 0) | O_NONBLOCK | O_ASYNC ) == -1 ) { - fprintf(stderr, "RLOG: Cannot enable Buffer IO or make file non-blocking\n"); - } - -#ifdef RLOG_ENABLE_TEXT_LOGGING - setvbuf ( fp , NULL, _IOLBF, 1024 ); -#else - setvbuf ( fp , NULL, _IONBF, 1024 ); -#endif - -#ifndef RLOG_ENABLE_TEXT_LOGGING - storeFileHeader(fp); -#endif - - if( prev_fp != NULL ) - fclose(prev_fp); - - if( ++g_nCurrFileIdx == g_nMaxLogFiles ) - g_nCurrFileIdx = 0; - -#ifndef RLOG_ENABLE_TEXT_LOGGING -#ifdef RLOG_USE_TTI_LOGGING - logLev1(L_TIME_REFERENCE, L_ALWAYS, (uint32_t)time(NULL)); -#endif -#endif -} - -void createL2LogFile() -{ - FILE *fp, *prev_fp = g_fp; - int fd; - char file[MAX_FILENAME_LEN]; - - strncpy(g_logDir, "/root/", MAX_FILENAME_LEN); - strncpy(g_fileName, "dbglog_l2", MAX_FILENAME_LEN); - snprintf(file, sizeof(file), "%s/%s.txt", g_logDir, g_fileName); - - fp = fopen(file, "w+"); - if( fp == NULL) { - printf("Failed to open file %s", file); - _exit(0); - } - - printf("Created L2 bin file FD=%s\n", g_fileName); - - setvbuf (fp , NULL, _IONBF, 1024 ); - - fd = fileno(fp); - - g_fp = fp; - g_fd = fd; - - if( fcntl(g_fd, F_SETFL, fcntl(g_fd, F_GETFL, 0) | O_NONBLOCK | O_ASYNC ) == -1 ) { - fprintf(stderr, "RLOG: Cannot enable Buffer IO or make file non-blocking\n"); - } - - setvbuf ( fp , NULL, _IOLBF, 1024 ); - - if( prev_fp != NULL ) - fclose(prev_fp); - - if( ++g_nCurrFileIdx == g_nMaxLogFiles ) - g_nCurrFileIdx = 0; - - -} - -////////////////////////////////////////////////////////////////////////// -// @Function : rlUdateRlogTti -// @Discription : This function will be called every 10 ms whenever -// application layer update the tti count -// @in : void -// @out : void -////////////////////////////////////////////////////////////////////////// -void rlUpdateRlogTti(Void) -{ -#ifndef RLOG_ENABLE_TEXT_LOGGING -#ifdef RLOG_USE_TTI_LOGGING - logLev1(L_TIME_TTI_UPDT, L_ALWAYS, (uint32_t)time(NULL)); -#endif -#endif -} - -/* This function processes log buffer received from L2 - mBuf is Received from L2 through SPstTsk. This function - extracts buffer pointer and logLen and then these logs - written to L3 log buffer/file. - This function is called in application layer when EVTL2LOGBUF - event is recieved from ssi -*/ - -#ifdef ANSI -Void rlProcessLogBufFromL2 -( - void *mBuf - ) -#else -Void rlProcessLogBufFromL2(mBuf) - void *mBuf; -#endif -{ -#ifndef RLOG_ENABLE_TEXT_LOGGING - uint32_t logLength; - Data* logPtr; - startL2Logging = 1; - if(mBuf == NULL) - { - printf("NULL MBUF received \n"); - return; - } - /* Get Buffer pointer and length. This is SOC specific function which - will extract Log-Buffer pointer and length from mBuf */ - rlGetL2LogBufPtr(mBuf, &logLength,&logPtr); - rlSetL2LogBuf(logPtr,logLength); - readL2LogBuff(); -#endif - return; -} - -/* This function will get tick from RLC/CL and will process logs - according to tick threshold. Tick threshold is SOC specific */ -Void rlProcessTicks(void) -{ - static uint32_t rlogTickCount; - numTtiTicks++; - if(++rlogTickCount >= RLOGTICKSCNTTOPRCL2LOGS) - { - rlogTickCount = 0; - rlResetLogRateLmt(); /* Resetting rlog write count to 0 */ - - /* Tick count reached configured ticks to send L2 logs, - Send existing log buffer to Application and create - new log buffer to write logs */ - if (SFndProcId() == TENB_L2_PROC_ID) - { -#ifndef RLOG_ENABLE_TEXT_LOGGING - processL2LogBuff(); /* This processing of log buffer is done on L2 only - This is SOC specific function and use to send - log buffers to L3 and reset buffer pointer to - write logs */ -#else - /* Write functions specific to Text logging in cpul */ -#endif - } - else - { - /* L3 specific functions */ - } - } - return; -} - -#ifndef RLOG_ENABLE_TEXT_LOGGING -////////////////////////////////////////////////////////////////////////// -// @Function : readL2LogBuff -// @Description : This function first validates received Log Buffer and -// length from L2 and then writes L2 log buffer into L3 -// circular buffer. After reading it invalidates cache and -// also resets global Log buffer pointer and lenth variable. -// @in : void -// @out : void -////////////////////////////////////////////////////////////////////////// - -Void readL2LogBuff(void) -{ - /* Validate global buffer pointer and length */ - uint8_t ret; - ret = rlValidateL2LogBuf(); - if(ret != ROK) - { - printf(" Validation failed for log buffer/len \n"); - return; - } - g_writeCirBuf = 1; - saveLogDataFromCpul(g_logBufRcvdFromL2 , g_logBufLenRcvdFromL2 ); - /* TODO: Write SOC Specific function to invalidate cache */ - rlInvalidateL2LogsInCache(g_logBufRcvdFromL2 - sizeof(g_logBufLenRcvdFromL2) , (g_logBufLenRcvdFromL2 + sizeof(g_logBufLenRcvdFromL2))); - rlResetL2LogBuf(); - g_writeCirBuf = 0; - return; -} - -////////////////////////////////////////////////////////////////////////// -// @Function : rlStopLogCountLimit -// @Description : This function validates L2 Log buffer,length, and start -// L2 logging flag. -// @in : void -// @out : void -////////////////////////////////////////////////////////////////////////// - -#ifdef ANSI -S16 rlValidateL2LogBuf(void) -#else -S16 rlValidateL2LogBuf(void) -#endif -{ - S16 ret = ROK; - if(g_logBufRcvdFromL2 == NULL) - { - printf("Log-Buffer received from L2 is NULL \n"); - ret = RFAILED; - } - if(g_logBufLenRcvdFromL2 == 0) - { - printf("Log-Buffer Length received from L2 is 0 \n"); - ret = RFAILED; - } - if(startL2Logging == 0) - { - printf("startL2Logging flag is still inactive \n"); - ret = RFAILED; - } - - return(ret); -} - -////////////////////////////////////////////////////////////////////////// -// @Function : rlStopLogCountLimit -// @Description : This function set global log Buffer pointer & length -// @in : l2LogBuf - Log Buffer to be set in global pointer -// l2LogLen - Log length to be set in global lenth -// @out : void -////////////////////////////////////////////////////////////////////////// - -#ifdef ANSI -void rlSetL2LogBuf -( -uint8_t *l2LogBuf, -uint32_t l2logLen -) -#else -void rlSetL2LogBuf(l2LogBuf,l2logLen) -uint8_t *l2LogBuf; -uint32_t l2logLen; -#endif -{ - g_logBufRcvdFromL2 = l2LogBuf; - g_logBufLenRcvdFromL2 = l2logLen; -} - -////////////////////////////////////////////////////////////////////////// -// @Function : rlStopLogCountLimit -// @Description : This function flushes global log Buffer pointer & length -// @in : void -// @out : void -////////////////////////////////////////////////////////////////////////// - -#ifdef ANSI -void rlResetL2LogBuf -( -void -) -#else -void rlResetL2LogBuf(void) -#endif -{ - g_logBufRcvdFromL2 = NULL; - g_logBufLenRcvdFromL2 = 0; -} - -#endif - -////////////////////////////////////////////////////////////////////////// -// @Function : rlStartLogCountLimit -// @Discription : This function will be called by EnbApp after Cell is UP. -// This function start the log cnt limit. i.e Number of logs -// getting logged into curcular will be restricted to 100 logs. -// @in : void -// @out : void -////////////////////////////////////////////////////////////////////////// - -void rlStartLogCountLimit(Void) -{ - g_rlogWriteCount = 0; - g_rlLogCntLimit = RL_LOG_COUNT_LIMIT_START; - printf("Start Log Restriction\n"); -} - -////////////////////////////////////////////////////////////////////////// -// @Function : rlStopLogCountLimit -// @Discription : This function will be called by EnbApp after Cell Shutdown -// is triggered. This will enable to get all logs of shutdown. -// This function stops the log cnt limit. i.e Restricition on -// Number of logs getting logged into curcular will be removed -// @in : void -// @out : void -////////////////////////////////////////////////////////////////////////// - -void rlStopLogCountLimit(Void) -{ - printf("Stop Log Restriction\n"); - g_rlLogCntLimit = RL_LOG_COUNT_LIMIT_STOP; -} - -////////////////////////////////////////////////////////////////////////// -// @Function : rlResetLogRateLmt -// @Discription : This function will be called every 10 ms whenever -// application layer update the tti count. To reset the -// log rate control. And Enable logging for next 10 ms -// @in : void -// @out : void -////////////////////////////////////////////////////////////////////////// - -void rlResetLogRateLmt(void) -{ - g_rlogWriteCount = 0; - g_logsDropCnt = 0; -} - -void initGlbDataAtL2(void) -{ - strncpy(g_logDir, "/root/", MAX_FILENAME_LEN); -} - -/********************************************************************** - End of file -**********************************************************************/ diff --git a/src/rlog/rl_rlog.h b/src/rlog/rl_rlog.h deleted file mode 100755 index a9c53ba9b..000000000 --- a/src/rlog/rl_rlog.h +++ /dev/null @@ -1,189 +0,0 @@ -/******************************************************************************* -################################################################################ -# Copyright (c) [2017-2019] [Radisys] # -# # -# 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. # -################################################################################ -*******************************************************************************/ - -/********************************************************************20** - - Name: Radisys Logging Framework - Type: C include file - Desc: This file contains logging framework include file for library. - File: rl.h - -*********************************************************************21*/ -/**************************************************************************** -@ description: This is header file is used by logging framework module. This -file should not be included by any other application. This is internal -header file logging framework. -*****************************************************************************/ - -#ifndef __RL_H__ -#define __RL_H__ - -#include -#include -#include -#include -#include -#include -#include -#include "rl_common.h" - -#define MAX_FILE_SIZE 3145728 /* 3MB */ -#define MAX_LOG_LEN 256 -#define MAX_FILENAME_LEN 300 -#define LOG_TIME_LEN 64 -#define MAX_LOG_BUF_SIZE 5000 -#define RLOG_MAX_CIRBUF_SIZE (1024*100) -#define RLOG_REMOTE_LOGGING_PORT 9099 -#define RLOG_MAX_FILES 5 -#define RLOG_MAX_TIME_STAMP 80 -#define RLOG_MAX_TAX_NAME 16 -#define RLOG_FIFO_FILE "/tmp/l2logs" -#define RLOG_CIRBUF_READ_INTERVAL 1 /* 60 seconds read interval */ -#define RLOG_MAX_THREADS 16 -#define RLOG_TIME_ZONE_LEN 8 -#define RLOG_MAX_STACK_DEPTH 24 -#define RLOG_MAX_BACKTRACE_BUFSZ 2048 -#define RLOG_READ_POS_THRESHOLD 300 -#define RLOG_FIXED_LENGTH_BUFFER_SIZE 50 -#define RLOGTICKSCNTTOPRCL2LOGS 10 - -/* Console handling */ -#define RLOG_CTRL_L 12 -#define RLOG_CTRL_Y 25 -#define RLOG_ENTER_KEY 10 -#define RLOG_SET_LOGLEVEL 1 -#define RLOG_SET_MODMASK 2 - -/*L2 Logging */ -#define PROCESS_L2LOG_TTI 10 - -typedef enum { -LOG_ARG_INT, -LOG_ARG_STR, -LOG_ARG_HEX, -LOG_ARG_SPL -} LOG_ARG_TYPE; - -typedef enum rlLogCntLmt -{ - RL_LOG_COUNT_LIMIT_START = 1, - RL_LOG_COUNT_LIMIT_STOP -}RLLogCntLmt; - -#ifndef RLOG_ENABLE_TEXT_LOGGING - -typedef enum -{ - L_TIME_REFERENCE=0, - L_TIME_DELIMITER, - L_SIGSEGV, - L_TIME_TTI_UPDT -} LOGID_TYPE; - -typedef struct -{ - time_t tv_sec; - uint32_t ms_tti; -} __attribute__ ((__packed__)) LOGTIME; - -typedef struct -{ - LOGID logId; /* 4 bytes | 32 bits */ - LOGTIME logTime; /* 8 bytes */ - unsigned int argType :2; - unsigned int logLevel :3; - unsigned int numOfArgs :3; - uint16_t len; -} __attribute__ ((__packed__)) LOGDATA; - -typedef struct -{ - LOGDATA logData; - char buf[MAX_LOG_BUF_SIZE]; -} __attribute__ ((__packed__)) ARGDATA; - -typedef struct -{ - LOGDATA logData; - uint32_t arg1; - uint32_t arg2; - uint32_t arg3; - uint32_t arg4; - char unusedByte[19]; /* To make it as 50 byte */ -} __attribute__ ((__packed__)) ARG4DATA; - -typedef struct -{ - LOGDATA logData; - uint8_t splEnum; - uint32_t splArg; - uint32_t arg1; - uint32_t arg2; - uint32_t arg3; - uint32_t arg4; - char unusedByte[14]; /* To make it as 50 byte */ -} __attribute__ ((__packed__)) SPL_ARGDATA; - -typedef enum _endian {little_endian, big_endian} EndianType; - -typedef struct -{ - uint16_t version; - uint32_t dummy32; - uint8_t endianType; - char szTimeZone[RLOG_TIME_ZONE_LEN+1]; - uint16_t END_MARKER; - time_t time_sec; -} __attribute__ ((__packed__)) FILE_HEADER; - -#endif /* RLOG_ENABLE_TEXT_LOGGING */ - -typedef struct { - - char szTaskName[RLOG_MAX_TAX_NAME]; - uint8_t* logBuff; /* LOG Buffer */ - uint32_t logBufLen; /* Data Written till now */ - uint32_t logReadPos; /* Reader thread position */ - uint8_t listIndex; /* Index to global list */ - -} THREAD_DATA; - -void readL2LogBuff(void); -void processL2LogBuff(void); -S16 sendL2LogBuftoL3(void); -void rlInitL2Log(void); -/* Extern for soc specific file */ -void rlProcessLogBufFromL2(void *mBuf); -void rlInitL2SocSpecific(void); -//void processL2LogBuff(void); -void rlProcessTicks(void); -void rlGetL2LogBufPtr (void *mBuf, uint32_t *logLen,uint8_t **logPtr); -void rlInvalidateL2LogsInCache(uint8_t *ptr,uint32_t len); - -uint8_t *g_l2rlogBuf; /* buffer pointer for shared memory allocation */ -uint8_t *g_l2LogBufStartPtr; /* buffer pointer where logs has to be written */ -uint8_t *g_l2LogBufBasePtr; /* Base pointer for log buffer */ -uint8_t *g_logBufRcvdFromL2; /* Buffer pointer received from L2 at L3*/ -uint8_t *g_l2LogBaseBuff; /* Base log buffer received at L3 */ -uint32_t g_l2LogBufLen; /* Log Buffer length written at L2 */ -uint32_t startL2Logging; /* flag to start processing of L2 logs */ -uint32_t g_l2logBuffPos; /* Log Buffer block which is in use for L2 logging */ -uint8_t g_writeCirBuf; /* Flag to indicate whether to write logs or not */ -//Pst g_rlog_pst; - -#endif /* __RL_H__*/ diff --git a/src/rlog/rl_soc.c b/src/rlog/rl_soc.c deleted file mode 100644 index 5f2752276..000000000 --- a/src/rlog/rl_soc.c +++ /dev/null @@ -1,168 +0,0 @@ -/******************************************************************************* -################################################################################ -# Copyright (c) [2017-2019] [Radisys] # -# # -# 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. # -################################################################################ -*******************************************************************************/ - -/********************************************************************20** - - Name: Radisys Logging Framework - Type: C source file - Desc: This file contains logging framework implementation. - File: rl_soc.c - -*********************************************************************21*/ -/********************************************************************** - @ description: This source file has SOC specific functions required for - logging framework -************************************************************************/ -#include "envopt.h" -#include "envdep.h" -#include"stdint.h" -#include "rl_interface.h" -#include "rl_rlog.h" -#include "rl_platform.h" - -#include "gen.h" -#include "ssi.h" -#include "ss_msg.h" -#include "ss_task.h" -#include "gen.x" -#include "ssi.x" -#include "ss_queue.h" -#include "ss_queue.x" -#include "ss_task.x" -#include "ss_msg.x" -#include "cm_inet.h" -#include "cm_inet.x" - -#include "rl_soc.h" - -////////////////////////////////////////////////////////////////////////// -// @Function : rlInitL2Log -// @Description : This will be trigigered from cl init function to -// allocate buffer from shared memory and to intialize -// the buffer -// @in : void -// @out : void -////////////////////////////////////////////////////////////////////////// - -void rlInitL2SocSpecific(void) -{ -#ifndef RLOG_ENABLE_TEXT_LOGGING - - if (SGetStaticBuffer(0, /* region - value does not matter in this case */ - 0, /* pool - value does not matter in this case */ - &g_l2rlogBuf, - L2LOG_BUFF_BLOCK_SIZE, /* Buffer size to be allocated */ - 0) != ROK) /* Memory type is SS_SHARABLE_MEMORY */ - { - printf("Memory allocation failed for g_l2rlogBuf!!!\n"); - /* kill binary */ - } - memset(g_l2rlogBuf, 0, L2LOG_BUFF_SIZE); - - g_l2LogBufBasePtr = g_l2rlogBuf; - g_l2LogBufStartPtr = g_l2rlogBuf + sizeof(g_l2LogBufLen); - -#endif - return; -} - -////////////////////////////////////////////////////////////////////////// -// @Function : processL2LogBuff -// @Description : This function will get triggered after every 10 tti -// and this will reset log buffers for L2 and also sends log -// buffer to L3 which was collected -// @in : void -// @out : void -////////////////////////////////////////////////////////////////////////// - -void processL2LogBuff(void) -{ -#ifndef RLOG_ENABLE_TEXT_LOGGING - if(g_l2LogBufLen > 0) - { - Data *l2rlogBuf_post; - - /* Log buffer position in flat buffer. If position is last wrap to first buffer */ - if (g_l2logBuffPos++ >=4) - { - g_l2logBuffPos = 0; - } - - g_writeCirBuf = 1; /* This will avoid contention while switching log buffers */ - - l2rlogBuf_post = g_l2LogBufBasePtr; /* copy logBufferPointer for later use */ - /* Set L2 Log Buffer length in first 4 bytes of flat buffer */ - *((uint32_t*) g_l2LogBufBasePtr) = g_l2LogBufLen; /* Set L2 Log Buffer length in - first 4 bytes of flat buffer */ - - /* Re-setting pointer so that L2 will use this to write logs */ - g_l2LogBufBasePtr = g_l2rlogBuf + (g_l2logBuffPos * L2LOG_BUFF_BLOCK_SIZE) ; - g_l2LogBufStartPtr = g_l2LogBufBasePtr + sizeof(g_l2LogBufLen); - - g_l2LogBufLen = 0; - - g_writeCirBuf = 0; /* This will avoid contention while switching log buffers */ - - } -#endif - return; -} - -////////////////////////////////////////////////////////////////////////// -// @Function : rlGetL2LogBufPtr -// @Description : This function reads LogBufPointer and Length of log Buffer -// and stores pointer and length variable so that these -// values can be used while reading L2 Log Buffer -// @in : mBuf - Log Buffer -// @out : logLen - Length of log Buffer -// logPtr - Address of log Buffer -////////////////////////////////////////////////////////////////////////// - -void rlGetL2LogBufPtr -( - void *mBuf, - uint32_t *logLen, - Data **logPtr -) -{ - /* Get Buffer pointer and length */ - *logPtr = ((Data *)mBuf) + sizeof(logLen); - *logLen = *((uint32_t *) mBuf); -} - -////////////////////////////////////////////////////////////////////////// -// @Function : rlInvalidateL2LogsInCache -// @Description : Dummy function which is not used for this SOC. -// -// @in : ptr - starting address to be invalidated. -// len - Length to be invalidated. -// @out : void -////////////////////////////////////////////////////////////////////////// - -void rlInvalidateL2LogsInCache -( - Data *ptr, - uint32_t len -) -{ - return; -} - -/********************************************************************** - End of file -***********************************************************************/ diff --git a/src/rlog/rl_soc.h b/src/rlog/rl_soc.h deleted file mode 100755 index dae83ca7f..000000000 --- a/src/rlog/rl_soc.h +++ /dev/null @@ -1,50 +0,0 @@ -/******************************************************************************* -################################################################################ -# Copyright (c) [2017-2019] [Radisys] # -# # -# 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. # -################################################################################ -*******************************************************************************/ - -/********************************************************************20** - - Name: Radisys Logging Framework - Type: C source file - Desc: This file contains logging framework implementation. - File: rl_soc.c - -*********************************************************************21*/ -/********************************************************************** - @ description: This source file has SOC specific functions required for - logging framework -************************************************************************/ - -#define L2LOG_BUFF_SIZE 10000 -#define L2LOG_BUFF_BLOCK_SIZE L2LOG_BUFF_SIZE/4 -#define RLOGTICKSCNTTOPRCL2LOGS 10 -#define TENB_L2_PROC_ID 1 -#define RLOG_LIMIT_L2_COUNT 100 -#define RLOG_LIMIT_L3_COUNT 500 - -void rlInitL2SocSpecific(void); -void processL2LogBuff(void); -void rlGetL2LogBufPtr(void *mBuf,uint32_t *logLen,Data **logPtr); -void rlInvalidateL2LogsInCache(Data *ptr,uint32_t len); - -void rlInitL2SocSpecific(void); -void processL2LogBuff(void); -void rlGetL2LogBufPtr(void *mBuf,uint32_t *logLen,Data **logPtr); - -/********************************************************************** - End of file -**********************************************************************/ -- 2.16.6