/* This file is the entry point for Lower MAC */\r
\r
#include "common_def.h"\r
+#include "mac_utils.h"\r
#include "lwr_mac_fsm.h"\r
#include "lwr_mac_phy.h"\r
+#ifdef INTEL_FAPI\r
+#include "fapi.h"\r
+#include "fapi_vendor_extension.h"\r
+#endif\r
+#ifndef INTEL_WLS_MEM\r
+#include "lwr_mac_phy_stub_inf.h"\r
+#endif\r
\r
/**************************************************************************\r
* @brief Task Initiation callback function. \r
switch(pst->srcEnt)\r
{\r
case ENTLWRMAC:\r
- {\r
- switch(pst->event)\r
- {\r
+ {\r
+ switch(pst->event)\r
+ {\r
#ifdef INTEL_WLS_MEM\r
- case EVT_START_WLS_RCVR:\r
- {\r
- ODU_PUT_MSG_BUF(mBuf);\r
+ case EVT_START_WLS_RCVR:\r
+ {\r
+ ODU_PUT_MSG_BUF(mBuf);\r
\r
- /* Allocate memory for intial UL transmission */\r
- LwrMacEnqueueWlsBlock();\r
+ /* Allocate memory for intial UL transmission */\r
+ LwrMacEnqueueWlsBlock();\r
\r
- /* Start thread to receive from L1 */\r
- DU_LOG("\nINFO --> LWR MAC: Starting WLS receiver thread");\r
- LwrMacRecvPhyMsg();\r
- break;\r
- }\r
+ /* Start thread to receive from L1 */\r
+ DU_LOG("\nINFO --> LWR MAC: Starting WLS receiver thread");\r
+ LwrMacRecvPhyMsg();\r
+ break;\r
+ }\r
#endif\r
- default:\r
- {\r
- SPutMsg(mBuf);\r
- DU_LOG("\nERROR --> LWR MAC: Invalid event %d received", pst->event);\r
- ret = RFAILED;\r
- }\r
- }\r
- break;\r
- }\r
+ default:\r
+ {\r
+ SPutMsg(mBuf);\r
+ DU_LOG("\nERROR --> LWR MAC: Invalid event %d received", pst->event);\r
+ ret = RFAILED;\r
+ }\r
+ }\r
+ break;\r
+ }\r
+\r
+#ifndef INTEL_WLS_MEM\r
+ case ENTPHYSTUB:\r
+ {\r
+ switch(pst->event)\r
+ {\r
+ case EVT_PHY_STUB_SLOT_IND:\r
+ {\r
+ fapi_slot_ind_t *slotIndMsg;\r
+\r
+ CMCHKUNPK(oduUnpackPointer, (PTR *)&slotIndMsg, mBuf);\r
+ ODU_PUT_MSG_BUF(mBuf);\r
+\r
+ procPhyMessages(slotIndMsg->header.msg_id, sizeof(fapi_slot_ind_t), (void*)slotIndMsg);\r
+ MAC_FREE_SHRABL_BUF(pst->region, pst->pool, slotIndMsg, sizeof(fapi_slot_ind_t));\r
+ break;\r
+ }\r
+\r
+ case EVT_PHY_STUB_STOP_IND:\r
+ {\r
+ fapi_stop_ind_t *stopIndMsg;\r
+ CMCHKUNPK(oduUnpackPointer, (PTR *)&stopIndMsg, mBuf);\r
+ ODU_PUT_MSG_BUF(mBuf);\r
+\r
+ procPhyMessages(stopIndMsg->header.msg_id, sizeof(fapi_stop_ind_t), (void*)stopIndMsg);\r
+ MAC_FREE_SHRABL_BUF(pst->region, pst->pool, stopIndMsg, sizeof(fapi_stop_ind_t));\r
+ break;\r
+ }\r
+ default:\r
+ {\r
+ DU_LOG("\nERROR --> LWR_MAC: Invalid event %d received from PHY STUB", pst->event);\r
+ }\r
+ }\r
+ break;\r
+ }\r
+#endif\r
+\r
default:\r
- {\r
- SPutMsg(mBuf);\r
- DU_LOG("\nERROR --> LWR MAC: Message from invalid source entity %d", pst->srcEnt);\r
- ret = RFAILED;\r
- }\r
+ {\r
+ SPutMsg(mBuf);\r
+ DU_LOG("\nERROR --> LWR MAC: Message from invalid source entity %d", pst->srcEnt);\r
+ ret = RFAILED;\r
+ }\r
}\r
return ret;\r
}\r
slotInd->slot = fapiSlotInd->slot;
FILL_PST_LWR_MAC_TO_MAC(pst, EVENT_SLOT_IND_TO_MAC);
+ pst.selector = ODU_SELECTOR_LWLC;
ret = (*sendSlotIndOpts[pst.selector])(&pst, slotInd);
}
else
DU_LOG("\nINFO --> LWR_MAC: PHY has moved to configured state");
FILL_PST_LWR_MAC_TO_MAC(pst, EVENT_STOP_IND_TO_MAC);
+ pst.selector = ODU_SELECTOR_LWLC;
return (*sendStopIndOpts[pst.selector])(&pst, cellId);
}
+++ /dev/null
-void l1HdlSlotIndicaion(bool);
-uint8_t buildAndSendSlotIndication();
-uint8_t duSendEgtpSlotInd();
--- /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. #
+################################################################################
+*******************************************************************************/
+
+#define EVT_PHY_STUB_SLOT_IND 1
+#define EVT_PHY_STUB_STOP_IND 2
+
+/**********************************************************************
+ End of file
+***********************************************************************/
#define ENTUZ 0xd2 /* S1AP User */
/* ssi_h_001.main_134 : Adtion for eGTP protocol */
#define ENTEG 0xd3 /* EGTP Layer */
+#ifndef INTEL_WLS_MEM
+#define ENTPHYSTUB 0xd4
+#else
#define ENTEU 0xd4 /* EGTP USER */
+#endif
/* ssi_h_001.main_135 : addition of LTE related entities */
#define ENTLWRMAC 0xd5 /* LTE-PHY */
#define ENTMAC 0xd6 /* LTE-MAC */
uint8_t rgActvInit (Ent, Inst, Region, Reason);
uint8_t lwrMacActvTsk(Pst *, Buffer *);
uint8_t lwrMacActvInit(Ent, Inst, Region, Reason);
+#ifndef INTEL_WLS_MEM
+uint8_t phyStubActvTsk(Pst *, Buffer *);
+uint8_t phyStubActvInit(Ent, Inst, Region, Reason);
+#endif
/* Global variable */
DuCfgParams duCfgParam;
bool bringCellUp(uint16_t cellId)
{
+ duProcCfgComplete();
+ BuildAndSendF1SetupReq();
return true;
}
bool bringCellDown(uint16_t cellId)
{
+ BuildAndSendDUConfigUpdate(SERV_CELL_TO_DELETE);
return true;
}
#endif
return ROK;
}
+#ifndef INTEL_WLS_MEM
+/*******************************************************************
+ *
+ * @brief Initializes Phy stub slot indication generator task
+ *
+ * @details
+ *
+ * Function : phyStubInit
+ *
+ * Functionality:
+ * - Registers and attaches TAPA tasks for Phy stub's slot
+ * indication generator
+ *
+ * @params[in] system task ID
+ * @return ROK - success
+ * RFAILED - failure
+ *
+ * ****************************************************************/
+uint8_t phyStubInit(SSTskId sysTskId)
+{
+ /* Register PHY stub slot indication TAPA Task */
+ if(ODU_REG_TTSK((Ent)ENTPHYSTUB, (Inst)0, (Ttype)TTNORM, (Prior)PRIOR0,
+ phyStubActvInit, (ActvTsk)phyStubActvTsk) != ROK)
+ {
+ return RFAILED;
+ }
+ /* Attach Phy stub slot indication TAPA Task */
+ if (ODU_ATTACH_TTSK((Ent)ENTPHYSTUB, (Inst)0, sysTskId)!= ROK)
+ {
+ return RFAILED;
+ }
+
+ DU_LOG("\nINFO --> DU_APP : PHY stub slot indication TAPA task created and registered to %d sys task",
+ sysTskId);
+ return ROK;
+}
+#endif
+
/*******************************************************************
*
* @brief Initializes system and TAPA tasks
uint8_t commonInit()
{
/* Declare system task Ids */
- SSTskId du_app_stsk, egtp_stsk, sctp_stsk, rlc_ul_stsk, rlc_mac_cl_stsk, lwr_mac_stsk;
+ SSTskId du_app_stsk, egtp_stsk, sctp_stsk, rlc_ul_stsk, rlc_mac_cl_stsk, lwr_mac_stsk, phy_stub_slot_ind_stsk;
pthread_attr_t attr;
}
ODU_SET_THREAD_AFFINITY(&lwr_mac_stsk, SS_AFFINITY_MODE_EXCL, 21, 0);
+#ifndef INTEL_WLS_MEM
+ /* system task for phy stub's slot indication generator thread */
+ if(ODU_CREATE_TASK(PRIOR0, &phy_stub_slot_ind_stsk) != ROK)
+ {
+ DU_LOG("\nERROR --> DU_APP : System Task creation for Phy stub slot indication generator failed. MAX STSK [%d]", SS_MAX_STSKS);
+ return RFAILED;
+ }
+
+#endif
+
/* Create TAPA tasks */
if(duAppInit(du_app_stsk) != ROK)
{
return RFAILED;
}
+#ifndef INTEL_WLS_MEM
+ if(phyStubInit(phy_stub_slot_ind_stsk) != ROK)
+ {
+ DU_LOG("\nERROR --> DU_APP : PHY stub slot indication Tapa Task initialization failed");
+ return RFAILED;
+ }
+#endif
+
return ROK;
}
#include "du_ue_mgr.h"
#include "lsctp.h"
#include "legtp.h"
-#include "lphy_stub.h"
#include "du_utils.h"
#include "du_cell_mgr.h"
{ SS_POOL_STATIC, 0 }
}
}
+#ifndef INTEL_WLS_MEM
+ ,
+ {
+ SS_DFLT_REGION + 7, 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 /* SS_LOCKLESS_MEMORY */
};
{SS_BLK_RELEASE_THRESHOLD, SS_BLK_ACQUIRE_THRESHOLD}
}
}
+#ifndef INTEL_WLS_MEM
+ ,
+ {
+ SS_DFLT_REGION + 7, /* region id */
+ MT_MAX_BKTS, /* number of buckets */
+ {
+ /* block size, no. of blocks, Upper threshold, lower threshold */
+ {SS_BLK_RELEASE_THRESHOLD, SS_BLK_ACQUIRE_THRESHOLD},
+ {SS_BLK_RELEASE_THRESHOLD, SS_BLK_ACQUIRE_THRESHOLD},
+ {SS_BLK_RELEASE_THRESHOLD, SS_BLK_ACQUIRE_THRESHOLD},
+ {SS_BLK_RELEASE_THRESHOLD, SS_BLK_ACQUIRE_THRESHOLD},
+ {SS_BLK_RELEASE_THRESHOLD, SS_BLK_ACQUIRE_THRESHOLD}
+ }
+ }
+#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 */
}
}
+#ifndef INTEL_WLS_MEM
+ ,
+ {
+ SS_DFLT_REGION + 7, /* 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 /* SS_LOCKLESS_MEMORY */
STATIC_MEM_CFG
}
#define SS_MAX_STSKS 5
#endif
#else
+#ifndef INTEL_WLS_MEM
+#define SS_MAX_STSKS 8
+#else
#define SS_MAX_STSKS 7
+#endif
#endif
#endif /* SS_MULTICORE_SUPPORT */
#define NR_PCI 1
#define SLOT_DELAY 3
-uint16_t sfnValue = 0;
-uint16_t slotValue = 0;
-bool rachIndSent = false;
-bool msg3Sent = false;
-bool msg5ShortBsrSent = false;
-bool msg5Sent = false;
-bool dlDedMsg = false;
-bool msgSecurityModeComp = false;
-bool msgRrcReconfiguration = false;
-bool msgRegistrationComp = false;
+bool slotIndicationStarted;
+uint16_t sfnValue;
+uint16_t slotValue;
+bool rachIndSent;
+bool msg3Sent;
+bool msg5ShortBsrSent;
+bool msg5Sent;
+bool dlDedMsg;
+bool msgSecurityModeComp;
+bool msgRrcReconfiguration;
+bool msgRegistrationComp;
+
typedef enum
{
MSG_TYPE_MSG3,
#endif
void procPhyMessages(uint16_t msgType, uint32_t msgSize, void *msg);
void l1StartConsoleHandler();
+void l1HdlSlotIndicaion(bool);
+void GenerateTicks();
/**********************************************************************
End of file
--- /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. #
+################################################################################
+*******************************************************************************/
+
+#include "common_def.h"
+#include "phy_stub_utils.h"
+#ifdef INTEL_FAPI
+#include "fapi.h"
+#include "fapi_vendor_extension.h"
+#endif
+#include "phy_stub.h"
+
+/*******************************************************************
+*
+* @brief Initializes Phy stub slot indication generator task
+*
+* @details
+*
+* Function : phyStubActvInit
+*
+* Functionality:
+* - Initializes Phy stub slot indication generator task
+*
+* @params[in]
+* @return ROK - success
+* RFAILED - failure
+*
+* ****************************************************************/
+uint8_t phyStubActvInit(Ent ent, Inst inst, Region reg, Reason reason)
+{
+ slotIndicationStarted = false;
+ sfnValue = 0;
+ slotValue = 0;
+
+ return ROK;
+}
+
+
+/*******************************************************************
+*
+* @brief Receives messages for Phy stub slot indication generator task
+*
+* @details
+*
+* Function : phyStubActvTsk
+*
+* Functionality:
+* - Receives messages for Phy stub slot indication generator task
+*
+* @params[in]
+* @return ROK - success
+* RFAILED - failure
+*
+* ****************************************************************/
+uint8_t phyStubActvTsk(Pst *pst, Buffer *mBuf)
+{
+ DU_LOG("\nPHY_STUB: Received Event [%d]", pst->event);
+ switch(pst->srcEnt)
+ {
+ case ENTPHYSTUB:
+ {
+ switch(pst->event)
+ {
+ case EVT_PHY_START_SLOT_IND:
+ {
+ ODU_PUT_MSG_BUF(mBuf);
+ GenerateTicks();
+ }
+ }
+ }
+ }
+ return ROK;
+}
+
+/**********************************************************************
+ End of file
+ **********************************************************************/
#include "fapi.h"
#include "fapi_vendor_extension.h"
#endif
-#include "lphy_stub.h"
#include "lwr_mac_upr_inf.h"
#include "mac_utils.h"
#include "phy_stub.h"
+#include "phy_stub_utils.h"
+#include "lwr_mac_phy_stub_inf.h"
/*******************************************************************
*
void l1HdlConfigReq(uint32_t msgLen, void *msg)
{
+ rachIndSent = false;
+ msg3Sent = false;
+ msg5ShortBsrSent = false;
+ msg5Sent = false;
+ dlDedMsg = false;
+ msgSecurityModeComp = false;
+ msgRrcReconfiguration = false;
+ msgRegistrationComp = false;
+
#ifdef INTEL_FAPI
p_fapi_api_queue_elem_t configReqElem = (p_fapi_api_queue_elem_t)msg;
fapi_config_req_t *configReq = (fapi_config_req_t *)(configReqElem +1);
* ****************************************************************/
uint16_t l1BuildAndSendSlotIndication()
{
+ Pst pst;
+ Buffer *mBuf;
+
#ifdef INTEL_FAPI
fapi_slot_ind_t *slotIndMsg;
- MAC_ALLOC(slotIndMsg, sizeof(fapi_slot_ind_t));
+ MAC_ALLOC_SHRABL_BUF(slotIndMsg, sizeof(fapi_slot_ind_t));
if(!slotIndMsg)
{
DU_LOG("\nERROR --> PHY_STUB: Memory allocation failed for slot Indication Message");
slotIndMsg->slot = slotValue;
#ifdef ODU_SLOT_IND_DEBUG_LOG
- DU_LOG("\n\nDEBUG --> PHY_STUB: SLOT indication [%d:%d]",sfnValue,slotValue);
+ DU_LOG("\n\nDEBUG --> PHY_STUB: Sending Slot Indication [%d : %d] to MAC", sfnValue, slotValue);
#endif
+
/* increment for the next TTI */
slotValue++;
if(sfnValue >= MAX_SFN_VALUE && slotValue > MAX_SLOT_VALUE)
{
- sfnValue = 0;
- slotValue = 0;
+ sfnValue = 0;
+ slotValue = 0;
}
else if(slotValue > MAX_SLOT_VALUE)
{
- sfnValue++;
- slotValue = 0;
+ sfnValue++;
+ slotValue = 0;
}
fillMsgHeader(&slotIndMsg->header, FAPI_SLOT_INDICATION, \
- sizeof(fapi_slot_ind_t) - sizeof(fapi_msg_t));
- procPhyMessages(slotIndMsg->header.msg_id, sizeof(fapi_slot_ind_t), (void*)slotIndMsg);
- MAC_FREE(slotIndMsg, sizeof(fapi_slot_ind_t));
+ sizeof(fapi_slot_ind_t) - sizeof(fapi_msg_t));
+
+ memset(&pst, 0, sizeof(Pst));
+ FILL_PST_PHY_STUB_TO_LWR_MAC(pst, EVT_PHY_STUB_SLOT_IND);
+
+ ODU_GET_MSG_BUF(pst.region, pst.pool, &mBuf);
+ if(!mBuf)
+ {
+ DU_LOG("\nERROR --> PHY_STUB: Failed to allocate memory for slot indication buffer");
+ MAC_FREE_SHRABL_BUF(pst.region, pst.pool, slotIndMsg, sizeof(fapi_slot_ind_t));
+ return RFAILED;
+ }
+ CMCHKPK(oduPackPointer, (PTR)slotIndMsg, mBuf);
+ ODU_POST_TASK(&pst, mBuf);
}
#endif
return ROK;
uint16_t l1BuildAndSendStopInd()
{
#ifdef INTEL_FAPI
+ Pst pst;
+ Buffer *mBuf = NULLP;
fapi_stop_ind_t *stopIndMsg = NULLP;
uint32_t msgLen = 0;
- MAC_ALLOC(stopIndMsg, sizeof(fapi_stop_ind_t));
+ MAC_ALLOC_SHRABL_BUF(stopIndMsg, sizeof(fapi_stop_ind_t));
if(!stopIndMsg)
{
DU_LOG("\nERROR --> PHY_STUB: Memory allocation failed for stop Indication Message");
{
fillMsgHeader(&stopIndMsg->header, FAPI_STOP_INDICATION, msgLen);
DU_LOG("\n\nINFO --> PHY_STUB: Processing Stop indication to MAC");
- procPhyMessages(stopIndMsg->header.msg_id,\
- sizeof(fapi_stop_ind_t), (void*)stopIndMsg);
- MAC_FREE(stopIndMsg, sizeof(fapi_stop_ind_t));
+
+ memset(&pst, 0, sizeof(Pst));
+ FILL_PST_PHY_STUB_TO_LWR_MAC(pst, EVT_PHY_STUB_STOP_IND);
+ ODU_GET_MSG_BUF(pst.region, pst.pool, &mBuf);
+ if(!mBuf)
+ {
+ DU_LOG("\nERROR --> PHY_STUB: Failed to allocate memory for slot indication buffer");
+ MAC_FREE_SHRABL_BUF(pst.region, pst.pool, stopIndMsg, sizeof(fapi_stop_ind_t));
+ return RFAILED;
+ }
+ CMCHKPK(oduPackPointer, (PTR)stopIndMsg, mBuf);
+ ODU_POST_TASK(&pst, mBuf);
}
#endif
return ROK;
{
l1HdlSlotIndicaion(TRUE);
DU_LOG("\nINFO --> PHY_STUB: Slot Indication is stopped successfully");
- l1BuildAndSendStopInd();
MAC_FREE(msg, msgLen);
}
else
/* This file handles slot indication */
#include "common_def.h"
-#include "lphy_stub.h"
-#include "du_log.h"
+#include "phy_stub_utils.h"
+#ifdef INTEL_FAPI
+#include "fapi.h"
+#include "fapi_vendor_extension.h"
+#endif
+#include "phy_stub.h"
uint8_t l1SendUlUserData();
uint8_t l1SendStatusPdu();
* RFAILED - failure
*
* ****************************************************************/
-void *GenerateTicks(void *arg)
+void GenerateTicks()
{
#ifdef NR_TDD
int milisec = 0.5; /* 0.5ms */
#endif
struct timespec req = {0};
+ slotIndicationStarted = true;
req.tv_sec = 0;
req.tv_nsec = milisec * 1000000L;
- while(1)
+ DU_LOG("\nPHY_STUB : GenerateTicks : Starting to generate slot indications");
+
+ while(slotIndicationStarted)
{
clock_nanosleep(CLOCK_REALTIME, 0, &req, NULL);
/* Send Slot indication indication to lower mac */
l1BuildAndSendSlotIndication();
}
- return((void *)NULLP);
+
+ DU_LOG("\nINFO --> PHY_STUB : Slot indication stopped");
+
+ /* Initialize all global variables */
+ sfnValue = 0;
+ slotValue = 0;
+ rachIndSent = false;
+ msg3Sent = false;
+ msg5ShortBsrSent = false;
+ msg5Sent = false;
+ dlDedMsg = false;
+ msgSecurityModeComp = false;
+ msgRrcReconfiguration = false;
+ msgRegistrationComp = false;
+
+ /* Send Stop indication to MAC */
+ sleep(1);
+ l1BuildAndSendStopInd();
}
/*******************************************************************
* ****************************************************************/
void l1HdlSlotIndicaion(bool stopSlotInd)
{
+ Pst pst;
int ret;
+ Buffer *mBuf = NULLP;
if(!stopSlotInd)
{
- ret = pthread_create(&thread, NULL, GenerateTicks, NULL);
- if(ret)
- {
- DU_LOG("\nERROR --> PHY_STUB: Unable to create thread");
- }
+ DU_LOG("\nPHY_STUB: Sending start slot indication event to self");
+ memset(&pst, 0, sizeof(Pst));
+ FILL_PST_PHY_TO_PHY(pst, EVT_PHY_START_SLOT_IND);
+ ODU_GET_MSG_BUF(pst.region, pst.pool, &mBuf);
+ ODU_POST_TASK(&pst, mBuf);
}
else
{
- ret = pthread_cancel(thread);
- if(ret)
- {
- DU_LOG("\nERROR --> PHY_STUB: Unable to stop thread");
- }
+ slotIndicationStarted = false;
}
}
--- /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. #
+################################################################################
+*******************************************************************************/
+
+#define PHY_STUB_MEM_REGION 0
+#define PHY_STUB_POOL 0
+
+#define EVT_PHY_START_SLOT_IND 1
+
+/* Fill Pst structure for sending msg from phy stub to self */
+#define FILL_PST_PHY_TO_PHY(_pst, _event) \
+{ \
+ _pst.selector = ODU_SELECTOR_LWLC; \
+ _pst.srcEnt = ENTPHYSTUB; \
+ _pst.dstEnt = ENTPHYSTUB; \
+ _pst.dstInst = 0; \
+ _pst.srcInst = 0; \
+ _pst.dstProcId = ODU_GET_PROCID(); \
+ _pst.srcProcId = ODU_GET_PROCID(); \
+ _pst.region = PHY_STUB_MEM_REGION; \
+ _pst.pool = PHY_STUB_POOL; \
+ _pst.event = _event; \
+ _pst.route = 0; \
+ _pst.prior = 0; \
+ _pst.intfVer = 0; \
+}
+
+/* Fill Pst structure for sending msg from PHY stub to Lower MAC */
+#define FILL_PST_PHY_STUB_TO_LWR_MAC(_pst, _event) \
+{ \
+ _pst.selector = ODU_SELECTOR_LWLC; \
+ _pst.srcEnt = ENTPHYSTUB; \
+ _pst.dstEnt = ENTLWRMAC; \
+ _pst.dstInst = 0; \
+ _pst.srcInst = 0; \
+ _pst.dstProcId = ODU_GET_PROCID(); \
+ _pst.srcProcId = ODU_GET_PROCID(); \
+ _pst.region = PHY_STUB_MEM_REGION; \
+ _pst.pool = PHY_STUB_POOL; \
+ _pst.event = _event; \
+ _pst.route = 0; \
+ _pst.prior = 0; \
+ _pst.intfVer = 0; \
+}
+/**********************************************************************
+ End of file
+ **********************************************************************/