}
else
{
- DU_LOG("\nERROR --> MAC: Failed at macMuxPdu()");
+ DU_LOG("\nERROR --> MAC: Failed at fillMsg4Pdu()");
}
}
return RFAILED;
}
}
+ else
+ {
+ RLC_FREE_SHRABL_BUF(pst.region, pst.pool, dlRrcMsgRsp, sizeof(RlcDlRrcMsgRsp));
+ }
+
} /* For Data per UE */
RLC_FREE_SHRABL_BUF(RLC_MEM_REGION_DL, RLC_POOL, datReqInfo, sizeof(RguDDatReqInfo));
DU_LOG("\nDEBUG --> SCH : Received SR");
ueCb = schGetUeCb(cellCb, uciInd->crnti);
+
+ if(ueCb->state == SCH_UE_STATE_INACTIVE)
+ {
+ DU_LOG("\nERROR --> SCH : Crnti %d is inactive", uciInd->crnti);
+ return ROK;
+ }
if(uciInd->numSrBits)
{
bool isPrachOccasion;
FreePrbBlock *freePrbBlock = NULLP;
CmLList *freePrbNode = NULLP;
- SchPrbAlloc *prbAlloc = &cell->schUlSlotInfo[slotTime.slot]->prbAlloc;
+ SchPrbAlloc *prbAlloc = NULLP;
+ if(cell == NULLP)
+ {
+ DU_LOG("\nERROR --> SCH : allocatePrbUl(): Received cellCb is null");
+ return RFAILED;
+ }
+
+ prbAlloc = &cell->schUlSlotInfo[slotTime.slot]->prbAlloc;
/* If startPrb is set to MAX_NUM_RB, it means startPrb is not known currently.
* Search for an appropriate location in PRB grid and allocate requested resources */
if(*startPrb == MAX_NUM_RB)
uint8_t dataType = 0;
uint16_t freqStart = 0;
+ if(cell == NULLP)
+ {
+ DU_LOG("\nERROR --> SCH : schPrachResAlloc(): Received cellCb is null");
+ return RFAILED;
+ }
+
/* If this slot is not a PRACH occassion, return */
if(!schCheckPrachOcc(cell, prachOccasionTimingInfo))
return;
if(( cellCb->ueCb[ueId-1].crnti == ueDelete->crnti) && ( cellCb->ueCb[ueId-1].state == SCH_UE_STATE_ACTIVE))
{
deleteSchUeCb(&cellCb->ueCb[ueId-1]);
-
+ ueIdToDel = ueId;
/* Remove UE from ueToBeScheduled list */
node = cellCb->ueToBeScheduled.first;
while(node)
if(ueId == ueIdToDel)
{
SCH_FREE(node->node, sizeof(uint8_t));
- cmLListDelFrm(&cellCb->ueToBeScheduled, node);
+ deleteNodeFromLList(&cellCb->ueToBeScheduled, node);
break;
}
node = next;
next = node->next;
SCH_FREE(node->node, sizeof(uint8_t));
cmLListDelFrm(&cellCb->ueToBeScheduled, node);
+ SCH_FREE(node, sizeof(CmLList));
node = next;
}
if(SGetSBuf(region, pool, ptr, size) == ROK)
{
#ifdef ODU_MEMORY_DEBUG_LOG
- printf("\nCM_ALLOC=== SGetSBufNewForDebug %s +%d, %s, %d, %p\n",\
+ if (strncmp(func,"cmInetRecvMsg",sizeof("cmInetRecvMsg")))
+ {
+ printf("\nCM_ALLOC=== SGetSBufNewForDebug %s +%d, %s, %d, %p\n",\
file, line, func, size, *ptr);
+ }
#endif
return ROK;
}
if(SPutSBuf(region, pool, ptr, size) == ROK)
{
#ifdef ODU_MEMORY_DEBUG_LOG
- printf("\nCM_FREE=== SPutSBufNewForDebug %s +%d, %s, %d, %p\n",\
+ if (strncmp(func,"cmInetRecvMsg",sizeof("cmInetRecvMsg")))
+ {
+ printf("\nCM_FREE=== SPutSBufNewForDebug %s +%d, %s, %d, %p\n",\
file, line, func, size, ptr);
+ }
#endif
return ROK;
}
#endif /* __cplusplus */
/*MCELL changes*/
#ifdef LTE_PAL_ENB
-#define L2_STATS_MAX_CELLS 5
+#define L2_STATS_MAX_CELLS 1
#else
-#define L2_STATS_MAX_CELLS 5
+#define L2_STATS_MAX_CELLS 1
#endif
#ifndef XEON_SPECIFIC_CHANGES
-#define L2_STATS_MAX_UES 300
+#define L2_STATS_MAX_UES 10
#define L2_STATS_MAX_RNTIS 500
#else
#define L2_STATS_MAX_UES TENB_MAX_UE_SUPPORTED /* ANOOP changed */
uint8_t ret = ROK;
uint8_t cnt = 0;
+ /* This variable is taken for sending specific number of downlink data packet.
+ * Presently the code is supporting total 4500 data packets trasfer for 3 UEs only with sleep(1).
+ * If you wants to pump data for 3 UE change the following macro values
+ * NUM_TUNNEL_TO_PUMP_DATA = 9, NUM_DL_PACKETS = 1.
+ * totalDataPacket = totalNumOfTestFlow * NUM_TUNNEL_TO_PUMP_DATA * NUM_DL_PACKETS
+ * totalDataPacket = [500*9*1] */
+ int32_t totalNumOfTestFlow = 500;
+
while(true)
{
/* Send DL user data to CU when user enters 'd' on console */
cnt++;
}
#else
- for(teId = 1; teId <= NUM_TUNNEL_TO_PUMP_DATA; teId++)
+ while(totalNumOfTestFlow)
{
- DU_LOG("\nDEBUG --> EGTP: Sending DL User Data(teId:%d)\n",teId);
- cnt =0;
- while(cnt < NUM_DL_PACKETS)
+ for(teId = 1; teId <= NUM_TUNNEL_TO_PUMP_DATA; teId++)
{
- ret = cuEgtpDatReq(teId);
- if(ret != ROK)
+ DU_LOG("\nDEBUG --> EGTP: Sending DL User Data(teId:%d)\n",teId);
+ cnt =0;
+ while(cnt < NUM_DL_PACKETS)
{
- DU_LOG("\nERROR --> EGTP: Issue with teid=%d\n",teId);
- break;
+ ret = cuEgtpDatReq(teId);
+ if(ret != ROK)
+ {
+ DU_LOG("\nERROR --> EGTP: Issue with teid=%d\n",teId);
+ break;
+ }
+ /* TODO : sleep(1) will be removed later once we will be able to
+ * support the continuous data pack transfer */
+ sleep(1);
+ cnt++;
}
- cnt++;
}
+ totalNumOfTestFlow--;
}
#endif
continue;
SPutSBuf(CU_APP_MEM_REG, CU_POOL, \
(Data *)_datPtr, _size);
-
typedef struct ipAddr
{
Bool ipV4Pres;
S16 cuEgtpHdlRecvMsg(Buffer *mBuf)
{
/*Decoding of EGTP message header */
+
cuEgtpDecodeHdr(mBuf);
-
+
/* Start Pumping data from CU to DU */
//return (cuEgtpDatReq());
return RFAILED;
}
- if(duCb.actvCellLst[cellIdx]->numActvUes)
- {
- DU_LOG("\nERROR --> DU APP : duSendCellDeletReq(): Active UEs still present in cellId[%d].\
- Failed to delete cell", cellId);
- return RFAILED;
- }
-
if(duBuildAndSendMacCellStop(cellId) == RFAILED)
{
DU_LOG("\nERROR --> DU APP : duSendCellDeletReq(): Failed to build and send cell stop request to MAC for\
return RFAILED;
}
- DU_LOG("\nDEBUG --> EGTP : Message Sent");
-
return ROK;
}
//ODU_PRINT_MSG(recvBuf, 0 ,0);
egtpHdlRecvData(recvBuf);
gDlDataRcvdCnt++;
+
}
}
uint8_t duProcGnbDuCfgUpdAckMsg(uint8_t transId)
{
uint8_t ieIdx=0, arrIdx=0,ret=ROK;
- uint8_t ueId =0 , ueIdx =0;
+ uint8_t ueId =0 , ueIdx =0, totalActiveUe = 0;
uint16_t cellId =0, cellIdx =0, crnti=0;
CmLList *f1apPduNode = NULLP;
ReservedF1apPduInfo *f1apPduInfo =NULLP;
ret = duSendCellDeletReq(cellId);
if(ret == RFAILED)
{
- DU_LOG("ERROR --> DU_APP : duProcGnbDuCfgUpdAckMsg(): Failed to send cell delete\
+ DU_LOG("\nERROR --> DU_APP : duProcGnbDuCfgUpdAckMsg(): Failed to send cell delete\
request for cellId[%d]", cellId);
}
}
else
{
- for(ueIdx = 0; ueIdx < duCb.actvCellLst[cellIdx]->numActvUes; ueIdx++)
+ totalActiveUe = duCb.actvCellLst[cellIdx]->numActvUes;
+ while(totalActiveUe)
{
+ if(duCb.actvCellLst[cellIdx]->ueCb[ueIdx].ueState != UE_ACTIVE)
+ {
+ ueIdx++;
+ continue;
+ }
+
crnti = duCb.actvCellLst[cellIdx]->ueCb[ueIdx].crnti;
GET_UE_IDX(crnti,ueId);
+ /* Sending Ue Context release request only for maximum supporting UEs */
ret = BuildAndSendUeContextReleaseReq(cellId, ueId);
if(ret == RFAILED)
{
- DU_LOG("ERROR --> DU_APP : duProcGnbDuCfgUpdAckMsg(): Failed to build and send UE delete\
+ DU_LOG("\nERROR --> DU_APP : duProcGnbDuCfgUpdAckMsg(): Failed to build and send UE delete\
request for cellId[%d]", cellId);
}
+ ueIdx++;
+ totalActiveUe--;
}
}
}
else
{
- DU_LOG("ERROR --> DU_APP : duProcGnbDuCfgUpdAckMsg(): CellId [%d] not found", cellId);
+ DU_LOG("\nERROR --> DU_APP : duProcGnbDuCfgUpdAckMsg(): CellId [%d] not found", cellId);
ret = RFAILED;
}
break;
break;
}while(true);
- if(ret == ROK)
+ if(ret == ROK && (duCb.actvCellLst[cellId-1]->numActvUes == 0))
{
duCb.actvCellLst[cellId-1]->cellStatus = DELETION_IN_PROGRESS;
ret = duSendCellDeletReq(cellId);
{
for(cellIdx = 0; cellIdx < duCb.numActvCells; cellIdx++)
{
- for(ueIdx = 0; ueIdx < duCb.actvCellLst[cellIdx]->numActvUes; ueIdx++)
+ for(ueIdx = 0; ueIdx < MAX_NUM_UE; ueIdx++)
{
if((duCb.actvCellLst[cellIdx]->ueCb[ueIdx].gnbDuUeF1apId == gnbDuUeF1apId)&&\
(duCb.actvCellLst[cellIdx]->ueCb[ueIdx].gnbCuUeF1apId == gnbCuUeF1apId))
}
if(!ueIdxFound)
{
- DU_LOG("\nERROR --> F1AP: DuUeCb is not found at procF1UeContextSetupReq()");
+ DU_LOG("\nERROR --> F1AP: DuUeCb is not found at procF1UeContextReleaseCommand()");
ret = RFAILED;
}
egtpMsg.msgHdr.extHdr.pdcpNmb.pres = FALSE;
egtpMsg.msgHdr.teId = 1;
egtpMsg.msg = mBuf;
-
+
egtpHdlDatInd(egtpMsg);
return ROK;
cellId = duCb.actvCellLst[duUeCb->f1UeDb->cellIdx]->cellId;
crnti = duUeCb->crnti;
+ GET_UE_IDX(crnti, ueIdx);
+
/* Send DL RRC msg for RRC release */
if(duUeCb->f1UeDb->dlRrcMsg)
{
if(duUeCb->f1UeDb->dlRrcMsg->rrcMsgPdu != NULLP)
{
- ret = duBuildAndSendDlRrcMsgToRlc(cellId, duCb.actvCellLst[duUeCb->f1UeDb->cellIdx]->ueCb[ueIdx].rlcUeCfg,\
+ ret = duBuildAndSendDlRrcMsgToRlc(cellId, duCb.actvCellLst[duUeCb->f1UeDb->cellIdx]->ueCb[ueIdx-1].rlcUeCfg,\
duUeCb->f1UeDb->dlRrcMsg);
if(ret == RFAILED)
{
void l1StartConsoleHandler();
void l1HdlSlotIndicaion(bool);
void GenerateTicks();
-uint8_t l1SendUlUserData(uint8_t drbId);
+uint8_t l1SendUlUserData(uint8_t drbId, uint8_t ueIdx);
uint8_t l1SendStatusPdu();
uint16_t l1BuildAndSendSlotIndication();
uint16_t l1BuildAndSendStopInd();
* RFAILED - failure
*
* ****************************************************************/
-uint8_t l1SendUlUserData(uint8_t drbId)
+uint8_t l1SendUlUserData(uint8_t drbId, uint8_t ueIdx)
{
uint8_t cnt = 0;
fapi_rx_data_indication_t *rxDataInd;
/* TODO : Fill pduInfo using PUSCH PDU. Currently hardcoding */
pduInfo = &rxDataInd->pdus[idx];
- pduInfo->handle = 100;
- pduInfo->rnti = 100;
+ pduInfo->handle = ueIdx + ODU_START_CRNTI;
+ pduInfo->rnti = ueIdx + ODU_START_CRNTI;
pduInfo->harqId = 1;
/* Since user data size = 50bytes and 2 bytes of MAC header and 3 byte of RLC header,
* setting tbsize = 56 from Table 5.1.3.2-1 spec 38.214 */
char ch, ch1;
uint8_t drbIdx = 0, lcgIdx = 0, ueIdx = 0;
LcgBufferSize lcgBS[MAX_NUM_LOGICAL_CHANNEL_GROUPS];
+ /* The below variable is taken for sending specific number of UL Packets
+ * For sendind 4500 Ul packets for three UEs the calculation of
+ * [counter * NUM_DRB_TO_PUMP_DATA * MAX_NUM_UE * NUM_UL_PACKETS] must be equal to 4500 */
+ uint32_t counter=500;
while(true)
{
ch = getchar();
if(ch == 'd')
{
- /* Start Pumping data from PHY stub to DU */
- for(drbIdx = 0; drbIdx < NUM_DRB_TO_PUMP_DATA; drbIdx++) //Number of DRB times the loop will run
+ while(counter)
{
- DU_LOG("\nDEBUG --> PHY STUB: Sending UL User Data[DrbId:%d]",drbIdx);
- l1SendUlUserData(drbIdx);
+ /* Start Pumping data from PHY stub to DU */
+ for(drbIdx = 0; drbIdx < NUM_DRB_TO_PUMP_DATA; drbIdx++) //Number of DRB times the loop will run
+ {
+ for(ueIdx=0; ueIdx<MAX_NUM_UE; ueIdx++)
+ {
+ DU_LOG("\nDEBUG --> PHY STUB: Sending UL User Data[DrbId:%d] for UEId %d\n",drbIdx,ueIdx);
+ l1SendUlUserData(drbIdx,ueIdx);
+ /* TODO :- sleep(1) will be removed once we will be able to
+ * send continuous data packet */
+ sleep(1);
+ }
+ }
+ counter--;
}
}
else if(ch =='c')