<SCH_CORE>22</SCH_CORE>
<SCTP_CORE>25</SCTP_CORE>
<LOWER_MAC_CORE>21</LOWER_MAC_CORE>
+ <NFAPI_UDP_P7_CORE>23</NFAPI_UDP_P7_CORE>
</THREAD_AFFINITY>
<GNB_ID>1</GNB_ID>
<DU_ID>1</DU_ID>
<SCH_CORE>22</SCH_CORE>
<SCTP_CORE>25</SCTP_CORE>
<LOWER_MAC_CORE>21</LOWER_MAC_CORE>
+ <NFAPI_UDP_P7_CORE>23</NFAPI_UDP_P7_CORE>
</THREAD_AFFINITY>
<GNB_ID>1</GNB_ID>
<DU_ID>1</DU_ID>
# macro for output file name and makefile name
#
-PLTFRM_FLAGS=-UMSPD -DODU -DINTEL_FAPI -UODU_MEMORY_DEBUG_LOG -DDEBUG_ASN_PRINT -UDEBUG_PRINT -DERROR_PRINT -USTART_DL_UL_DATA -UNR_DRX -UCALL_FLOW_DEBUG_LOG -UODU_SLOT_IND_DEBUG_LOG -DNFAPI_ENABLED -UTHREAD_AFFINITY
+PLTFRM_FLAGS=-UMSPD -DODU -DINTEL_FAPI -UODU_MEMORY_DEBUG_LOG -DDEBUG_ASN_PRINT -UDEBUG_PRINT -DERROR_PRINT -USTART_DL_UL_DATA -UNR_DRX -UCALL_FLOW_DEBUG_LOG -UODU_SLOT_IND_DEBUG_LOG -UTHREAD_AFFINITY
ifeq ($(MODE),TDD)
PLTFRM_FLAGS += -DNR_TDD
ifeq ($(NODE),TEST_STUB)
PLTFRM_FLAGS+=-DODU_TEST_STUB
endif
-
ifeq ($(PHY), INTEL_L1)
PLTFRM_FLAGS+=-DSS_USE_WLS_MEM -DINTEL_WLS_MEM -DDEBUG_MODE -DINTEL_L1_V20_03_ONWARDS
ifeq ($(PHY_MODE),TIMER)
PLTFRM_FLAGS+=-DO1_ENABLE
endif
+ifeq ($(NFAPI_ENABLE),YES)
+ PLTFRM_FLAGS+=-DNFAPI_ENABLED
+endif
+
# The include options get merged with the options needed by
# # the called makefiles and hence we export these to make them
# # available to them.
$(Q)$(MAKE) -j -f $(COM_BUILD_DIR)/mt.mak OBJ_DIR=$(OBJ_ROOT)/odu LIB_DIR=$(LIB_ROOT)/odu LOG_DIR=$(LOG_ROOT)/odu CC='$(CC1)'
ifneq ($(PHY), INTEL_L1)
+ifneq ($(NFAPI_ENABLE),YES)
$(Q)$(MAKE) -j -f $(COM_BUILD_DIR)/phy_stub.mak OBJ_DIR=$(OBJ_ROOT)/odu LIB_DIR=$(LIB_ROOT)/odu LOG_DIR=$(LOG_ROOT)/odu CC='$(CC1)'
endif
+endif
ifeq ($(O1_ENABLE),YES)
$(Q)$(MAKE) -j -f $(COM_BUILD_DIR)/o1.mak OBJ_DIR=$(OBJ_ROOT)/odu LIB_DIR=$(LIB_ROOT)/odu LOG_DIR=$(LOG_ROOT)/odu CC='$(CCPP1)'
$(Q)$(MAKE) -j -f $(COM_BUILD_DIR)/ves.mak OBJ_DIR=$(OBJ_ROOT)/odu LIB_DIR=$(LIB_ROOT)/odu LOG_DIR=$(LOG_ROOT)/odu CC='$(CCPP1)'
$(Q)$(MAKE) -j -f $(COM_BUILD_DIR)/mt.mak clean OBJ_DIR=$(OBJ_ROOT)/odu LIB_DIR=$(LIB_ROOT)/odu LOG_DIR=$(LOG_ROOT)/odu CC='$(CC1)'
ifneq ($(PHY), INTEL_L1)
+ifneq ($(NFAPI_ENABLE),YES)
$(Q)$(MAKE) -j -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)'
endif
+endif
ifeq ($(O1_ENABLE),YES)
$(Q)$(MAKE) -j -f $(COM_BUILD_DIR)/o1.mak clean OBJ_DIR=$(OBJ_ROOT)/odu LIB_DIR=$(LIB_ROOT)/odu LOG_DIR=$(LOG_ROOT)/odu CC='$(CCPP1)'
$(Q)$(MAKE) -j -f $(COM_BUILD_DIR)/ves.mak clean OBJ_DIR=$(OBJ_ROOT)/odu LIB_DIR=$(LIB_ROOT)/odu LOG_DIR=$(LOG_ROOT)/odu CC='$(CCPP1)'
#include "nr5g_fapi_internal.h"\r
#include "fapi_vendor_extension.h"\r
#endif\r
-#ifndef INTEL_WLS_MEM\r
+#if !(defined(NFAPI_ENABLED) || defined (INTEL_WLS_MEM))\r
#include "lwr_mac_phy_stub_inf.h"\r
#endif\r
#ifdef NFAPI_ENABLED\r
break;\r
}\r
\r
-#ifndef INTEL_WLS_MEM\r
+#if !(defined(NFAPI_ENABLED) || defined (INTEL_WLS_MEM))\r
case ENTPHYSTUB:\r
{\r
strcpy(sourceTask,"PHY");\r
break;\r
}\r
\r
-#ifndef INTEL_WLS_MEM\r
+#if !(defined(NFAPI_ENABLED) || defined (INTEL_WLS_MEM))\r
case ENTPHYSTUB:\r
{\r
switch(pst->event)\r
{
uint8_t ret = ROK;
#ifdef INTEL_FAPI
+#ifndef NFAPI_ENABLED
uint32_t msgLen =0;
+#endif
p_fapi_api_queue_elem_t currMsg = NULLP;
#ifdef CALL_FLOW_DEBUG_LOG
addWlsBlockToFree(currMsg, msgLen, (lwrMacCb.phySlotIndCntr-1));
if(currMsg->p_next == NULLP)
{
- DU_LOG("\nERROR --> LWR MAC : There cannot be only one block to send");
- return RFAILED;
+ DU_LOG("\nERROR --> LWR MAC : There cannot be only one block to send");
+ return RFAILED;
}
/* Sending first block */
ret = WLS_Put(wlsHdlr, WLS_VA2PA(wlsHdlr, currMsg), msgLen, currMsg->msg_type, WLS_SG_FIRST);
if(ret != 0)
{
- DU_LOG("\nERROR --> LWR MAC : Failure in sending message to PHY");
- return RFAILED;
+ DU_LOG("\nERROR --> LWR MAC : Failure in sending message to PHY");
+ return RFAILED;
}
currMsg = currMsg->p_next;
while(currMsg)
{
- /* Sending the next msg */
- msgLen = currMsg->msg_len + sizeof(fapi_api_queue_elem_t);
- addWlsBlockToFree(currMsg, msgLen, (lwrMacCb.phySlotIndCntr-1));
- if(currMsg->p_next != NULLP)
- {
- ret = WLS_Put(wlsHdlr, WLS_VA2PA(wlsHdlr, currMsg), msgLen, currMsg->msg_type, WLS_SG_NEXT);
- if(ret != 0)
- {
- DU_LOG("\nERROR --> LWR MAC : Failure in sending message to PHY");
- return RFAILED;
- }
- currMsg = currMsg->p_next;
- }
- else
- {
- /* Sending last msg */
- ret = WLS_Put(wlsHdlr, WLS_VA2PA(wlsHdlr, currMsg), msgLen, currMsg->msg_type, WLS_SG_LAST);
- if(ret != 0)
- {
- DU_LOG("\nERROR --> LWR MAC : Failure in sending message to PHY");
- return RFAILED;
- }
- currMsg = NULLP;
- }
+ /* Sending the next msg */
+ msgLen = currMsg->msg_len + sizeof(fapi_api_queue_elem_t);
+ addWlsBlockToFree(currMsg, msgLen, (lwrMacCb.phySlotIndCntr-1));
+ if(currMsg->p_next != NULLP)
+ {
+ ret = WLS_Put(wlsHdlr, WLS_VA2PA(wlsHdlr, currMsg), msgLen, currMsg->msg_type, WLS_SG_NEXT);
+ if(ret != 0)
+ {
+ DU_LOG("\nERROR --> LWR MAC : Failure in sending message to PHY");
+ return RFAILED;
+ }
+ currMsg = currMsg->p_next;
+ }
+ else
+ {
+ /* Sending last msg */
+ ret = WLS_Put(wlsHdlr, WLS_VA2PA(wlsHdlr, currMsg), msgLen, currMsg->msg_type, WLS_SG_LAST);
+ if(ret != 0)
+ {
+ DU_LOG("\nERROR --> LWR MAC : Failure in sending message to PHY");
+ return RFAILED;
+ }
+ currMsg = NULLP;
+ }
}
}
#else
+#ifndef NFAPI_ENABLED
p_fapi_api_queue_elem_t nextMsg = NULLP;
/* FAPI header and vendor specific msgs are freed here. Only
nextMsg = currMsg->p_next;
msgLen = currMsg->msg_len + sizeof(fapi_api_queue_elem_t);
if((currMsg->msg_type != FAPI_VENDOR_MSG_HEADER_IND) && \
- (currMsg->msg_type != FAPI_VENDOR_MESSAGE))
+ (currMsg->msg_type != FAPI_VENDOR_MESSAGE))
{
- l1ProcessFapiRequest(currMsg->msg_type, msgLen, currMsg);
+ l1ProcessFapiRequest(currMsg->msg_type, msgLen, currMsg);
}
else
{
- LWR_MAC_FREE(currMsg, msgLen);
+ LWR_MAC_FREE(currMsg, msgLen);
}
currMsg = nextMsg;
}
#endif
+#endif
#endif
return ret;
}
--- /dev/null
+/*******************************************************************************
+################################################################################
+# 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. #
+################################################################################
+*******************************************************************************/
+
+/* This file is the entry point for UDP P7 */
+
+#include "common_def.h"
+
+/**************************************************************************
+ * @brief Task Initiation callback function.
+ *
+ * @details
+ *
+ * Function : udpP7ActvInit
+ *
+ * Functionality:
+ * This function is supplied as one of parameters during UDP P7
+ * task registration. SSI will invoke this function once, after
+ * it creates and attaches this TAPA Task to a system task.
+ *
+ * @param[in] Ent entity, the entity ID of this task.
+ * @param[in] Inst inst, the instance ID of this task.
+ * @param[in] Region region, the region ID registered for memory
+ * usage of this task.
+ * @param[in] Reason reason.
+ * @return ROK - success
+ * RFAILED - failure
+ ***************************************************************************/
+uint8_t udpP7ActvInit(Ent entity, Inst inst, Region region, Reason reason)
+{
+ return ROK;
+}
+
+/**************************************************************************
+ * @brief Task Activation callback function.
+ *
+ * @details
+ *
+ * Function : udpP7ActvTsk
+ *
+ * Functionality:
+ * Primitives invoked by UDP P7 users/providers through
+ * a loosely coupled interface arrive here by means of
+ * SSI's message handling. This API is registered with
+ * SSI during the Task Registration of DU APP.
+ *
+ * @param[in] Pst *pst, Post structure of the primitive.
+ * @param[in] Buffer *mBuf, Packed primitive parameters in the
+ * buffer.
+ * @return ROK - success
+ * RFAILED - failure
+ *
+ ***************************************************************************/
+uint8_t udpP7ActvTsk(Pst *pst, Buffer *mBuf)
+{
+ uint8_t ret = ROK;
+ return ret;
+}
#define ENTUZ 0xd2 /* S1AP User */
/* ssi_h_001.main_134 : Adtion for eGTP protocol */
#define ENTEG 0xd3 /* EGTP Layer */
-#ifndef INTEL_WLS_MEM
+#if !(defined(NFAPI_ENABLED) || defined (INTEL_WLS_MEM))
#define ENTPHYSTUB 0xd4
#else
-#define ENTEU 0xd4 /* EGTP USER */
+#ifdef NFAPI_ENABLED
+#define ENTUDP7 0xd4 /* UDP P7 */
+#endif
#endif
/* ssi_h_001.main_135 : addition of LTE related entities */
#define ENTLWRMAC 0xd5 /* LTE-PHY */
#endif
}
+#ifdef NFAPI_ENABLED
+ if ((!xmlStrcmp(cur->name, (const xmlChar *)"NFAPI_UDP_P7_CORE")) && (cur->ns == ns))
+ {
+ threads->udpP7CoreId = atoi((char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
+#ifdef THREAD_AFFINITY
+ ODU_SET_THREAD_AFFINITY(&threads->udpP7STskId, SS_AFFINITY_MODE_EXCL, threads->udpP7CoreId, 0);
+#endif
+ }
+#endif
+
cur = cur -> next;
}
return ROK;
DU_LOG("RLC-DL and MAC CORE ID %d\n", duCfgParam.threadInfo.rlcMacCoreId);
DU_LOG("SCH CORE ID %d\n", duCfgParam.threadInfo.schCoreId);
DU_LOG("Lower MAC CORE ID %d\n", duCfgParam.threadInfo.lwrMacCoreId);
+#ifdef NFAPI_ENABLED
+ DU_LOG("UDP P7 CORE ID %d\n", duCfgParam.threadInfo.udpP7CoreId);
+#endif
DU_LOG("MAX NUM DRB %d\n", duCfgParam.maxNumDrb);
uint8_t schCoreId;
SSTskId lwrMacSTskId;
uint8_t lwrMacCoreId;
+ SSTskId udpP7STskId;
+ uint8_t udpP7CoreId;
}ThreadInfo;
typedef struct duCfgParams
uint8_t schActvInit(Ent, Inst, Region, Reason);
uint8_t lwrMacActvTsk(Pst *, Buffer *);
uint8_t lwrMacActvInit(Ent, Inst, Region, Reason);
-#ifndef INTEL_WLS_MEM
+#if !(defined(NFAPI_ENABLED) || defined (INTEL_WLS_MEM))
uint8_t phyStubActvTsk(Pst *, Buffer *);
uint8_t phyStubActvInit(Ent, Inst, Region, Reason);
+#else
+#ifdef NFAPI_ENABLED
+uint8_t udpP7ActvTsk(Pst *, Buffer *);
+uint8_t udpP7ActvInit(Ent, Inst, Region, Reason);
+#endif
#endif
/* Global variable */
return ROK;
}
-#ifndef INTEL_WLS_MEM
+#if !(defined(NFAPI_ENABLED) || defined (INTEL_WLS_MEM))
/*******************************************************************
*
* @brief Initializes Phy stub slot indication generator task
sysTskId);
return ROK;
}
+#else
+#ifdef NFAPI_ENABLED
+/*******************************************************************
+ *
+ * @brief Initializes UDP P7 task
+ *
+ * @details
+ *
+ * Function : udpP7Init
+ *
+ * Functionality:
+ * - Registers and attaches TAPA tasks for UDP P7
+ *
+ * @params[in] system task ID
+ * @return ROK - success
+ * RFAILED - failure
+ *
+ * ****************************************************************/
+uint8_t udpP7Init(SSTskId sysTskId)
+{
+ /* Register UDP P7 TAPA Task */
+ if(ODU_REG_TTSK((Ent)ENTUDP7, (Inst)0, (Ttype)TTNORM, (Prior)PRIOR0,
+ udpP7ActvInit, (ActvTsk)udpP7ActvTsk) != ROK)
+ {
+ return RFAILED;
+ }
+ /* Attach UDP P7 TAPA Task */
+ if (ODU_ATTACH_TTSK((Ent)ENTUDP7, (Inst)0, sysTskId)!= ROK)
+ {
+ return RFAILED;
+ }
+
+ DU_LOG("\nINFO --> DU_APP : UDP P7 TAPA task created and registered to %d sys task",
+ sysTskId);
+ return ROK;
+}
+#endif
#endif
/*******************************************************************
uint8_t commonInit()
{
/* Declare system task Ids */
+#if !(defined(NFAPI_ENABLED) || defined (INTEL_WLS_MEM))
SSTskId phyStubSlotIndSTskId;
+#endif
pthread_attr_t attr;
return RFAILED;
}
-#ifndef INTEL_WLS_MEM
+/*UDP P7 Socket thread is required for NFAPI. Following conditions are framed as below:
+ * 1. If NFAPI is enabled and
+ * i. INTEL_L1 is not used then PHY thread is not created as PNF will be replacing PHY.
+ * ii. INTEL_L1 is used then also we need UDP socket for P7 coomunication.
+ * 2. In case of NFAPI is disabled
+ * i. INTEL_L1 is not used then we need PHY thread
+ * ii. INTEL_L1 is used as PHY then neither of PHY nor UDPP7 thread is required*/
+#if !(defined(NFAPI_ENABLED) || defined (INTEL_WLS_MEM))
/* system task for phy stub's slot indication generator thread */
if(ODU_CREATE_TASK(PRIOR0, &phyStubSlotIndSTskId) != ROK)
{
DU_LOG("\nERROR --> DU_APP : System Task creation for Phy stub slot indication generator failed. MAX STSK [%d]", SS_MAX_STSKS);
return RFAILED;
}
-
+#else
+#ifdef NFAPI_ENABLED
+ /* system task for UDP-P7 thread */
+ if(ODU_CREATE_TASK(PRIOR0, &duCfgParam.threadInfo.udpP7STskId) != ROK)
+ {
+ DU_LOG("\nERROR --> DU_APP : System Task creation for UDP P7 Interface failed. MAX STSK [%d]", SS_MAX_STSKS);
+ return RFAILED;
+ }
+#endif
#endif
/* Create TAPA tasks */
return RFAILED;
}
-#ifndef INTEL_WLS_MEM
+#if !(defined(NFAPI_ENABLED) || defined (INTEL_WLS_MEM))
if(phyStubInit(phyStubSlotIndSTskId) != ROK)
{
DU_LOG("\nERROR --> DU_APP : PHY stub slot indication Tapa Task initialization failed");
return RFAILED;
}
+#else
+#ifdef NFAPI_ENABLED
+ if(udpP7Init(duCfgParam.threadInfo.udpP7STskId) != ROK)
+ {
+ DU_LOG("\nERROR --> DU_APP : UDP P7 Tapa Task initialization failed");
+ return RFAILED;
+ }
+#endif
#endif
-
return ROK;
}
{ SS_POOL_STATIC, 0 }
}
}
+#else
+#ifdef NFAPI_ENABLED
+ ,
+ {
+ SS_DFLT_REGION + 8, SS_MAX_POOLS_PER_REG - 1,
+ {
+ { SS_POOL_DYNAMIC, MT_POOL_0_DSIZE },
+ { SS_POOL_DYNAMIC, MT_POOL_1_DSIZE },
+ { SS_POOL_DYNAMIC, MT_POOL_2_DSIZE },
+ { SS_POOL_DYNAMIC, MT_POOL_3_DSIZE },
+ { SS_POOL_DYNAMIC, MT_POOL_4_DSIZE },
+ { SS_POOL_STATIC, 0 }
+ }
+ }
+#endif
#endif
#endif /* SS_LOCKLESS_MEMORY */
{SS_BLK_RELEASE_THRESHOLD, SS_BLK_ACQUIRE_THRESHOLD}
}
}
+#else
+#ifdef NFAPI_ENABLED
+ ,
+ {
+ SS_DFLT_REGION + 8, /* region id */
+ MT_MAX_BKTS, /* number of buckets */
+ {
+ /* block size, no. of blocks, Upper threshold, lower threshold */
+ {SS_BLK_RELEASE_THRESHOLD, SS_BLK_ACQUIRE_THRESHOLD},
+ {SS_BLK_RELEASE_THRESHOLD, SS_BLK_ACQUIRE_THRESHOLD},
+ {SS_BLK_RELEASE_THRESHOLD, SS_BLK_ACQUIRE_THRESHOLD},
+ {SS_BLK_RELEASE_THRESHOLD, SS_BLK_ACQUIRE_THRESHOLD},
+ {SS_BLK_RELEASE_THRESHOLD, SS_BLK_ACQUIRE_THRESHOLD}
+ }
+ }
+#endif
#endif
#if ((defined (SPLIT_RLC_DL_TASK)) && (!defined (L2_L3_SPLIT)))
,
{MT_BKT_4_DSIZE, MT_BKT_4_STATIC_NUMBLKS} /* block size, no. of blocks */
}
}
+#else
+#ifdef NFAPI_ENABLED
+ ,
+ {
+ SS_DFLT_REGION + 8, /* region id */
+ MT_MAX_BKTS, /* number of buckets */
+ MT_HEAP_SIZE, /* heap size */
+ {
+ {MT_BKT_0_DSIZE, MT_BKT_0_STATIC_NUMBLKS}, /* block size, no. of blocks */
+ {MT_BKT_1_DSIZE, MT_BKT_1_STATIC_NUMBLKS}, /* block size, no. of blocks */
+ {MT_BKT_2_DSIZE, MT_BKT_2_STATIC_NUMBLKS}, /* block size, no. of blocks */
+ {MT_BKT_3_DSIZE, MT_BKT_3_STATIC_NUMBLKS}, /* block size, no. of blocks */
+ {MT_BKT_4_DSIZE, MT_BKT_4_STATIC_NUMBLKS} /* block size, no. of blocks */
+ }
+ }
+#endif
#endif
#endif /* SS_LOCKLESS_MEMORY */
STATIC_MEM_CFG
#ifndef INTEL_WLS_MEM
#define SS_MAX_STSKS 9
#else
-#define SS_MAX_STSKS 8
+#ifdef NFAPI_ENABLED
+#define SS_MAX_STSKS 9
+#else
+#define SS_MAX_STSKS 8
+#endif
#endif
#endif
#endif /* SS_MULTICORE_SUPPORT */
Buffer *tmp = NULLP; /* buffer ptr */
Data *cptr =NULLP;
/* ss012.13: Addition */
+#ifdef DEBUG_PRINT
Data reg =0;
-
+#endif
if (mBuf == NULLP)
for (qlen = 0, tmp = mBuf->b_cont; tmp; qlen++)
tmp = tmp->b_cont;
mlen = ((SsMsgInfo*)(mBuf->b_rptr))->len;
+#ifdef DEBUG_PRINT
reg = ((SsMsgInfo*)(mBuf->b_rptr))->region;
+#endif
/*ss013.301: Fixed Warnings for 32/64 bit compilation*/
#ifdef DEBUG_PRINT
sprintf(prntBuf,"\nmsg: qlen: %04d mlen: %04d %02d-->%02d region: %02d\n",