Code Review
/
o-du
/
l2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
JIRA ID:[ODUHIGH-259, ODUHIGH-260]
[o-du/l2.git]
/
src
/
5gnrmac
/
mac_slot_ind.c
diff --git
a/src/5gnrmac/mac_slot_ind.c
b/src/5gnrmac/mac_slot_ind.c
index
77aee0d
..
6bc961b
100644
(file)
--- a/
src/5gnrmac/mac_slot_ind.c
+++ b/
src/5gnrmac/mac_slot_ind.c
@@
-65,6
+65,8
@@
uint8_t MacProcDlAlloc(Pst *pst, DlSchedInfo *dlSchedInfo)
dlSlot[dlSchedInfo->schSlotValue.broadcastTime.slot];
currDlSlot->dlInfo.isBroadcastPres = true;
memcpy(&currDlSlot->dlInfo.brdcstAlloc, &dlSchedInfo->brdcstAlloc, sizeof(DlBrdcstAlloc));
dlSlot[dlSchedInfo->schSlotValue.broadcastTime.slot];
currDlSlot->dlInfo.isBroadcastPres = true;
memcpy(&currDlSlot->dlInfo.brdcstAlloc, &dlSchedInfo->brdcstAlloc, sizeof(DlBrdcstAlloc));
+ currDlSlot->dlInfo.brdcstAlloc.sib1Alloc.sib1PdcchCfg.dci.pdschCfg = \
+ &currDlSlot->dlInfo.brdcstAlloc.sib1Alloc.sib1PdschCfg;
}
if(dlSchedInfo->rarAlloc != NULLP)
}
if(dlSchedInfo->rarAlloc != NULLP)
@@
-238,50
+240,47
@@
int sendSlotIndMacToSch(SlotIndInfo *slotInd)
/*******************************************************************
*
/*******************************************************************
*
- * @brief Send
slot
indication to DU APP
+ * @brief Send
cell up
indication to DU APP
*
* @details
*
*
* @details
*
- * Function : send
Slot
IndMacToDuApp
+ * Function : send
CellUp
IndMacToDuApp
*
* Functionality:
*
* Functionality:
- * Send
slot
indication to DU APP
+ * Send
cell up
indication to DU APP
*
*
- * @params[in]
Slot
indication info
+ * @params[in]
Cell Up
indication info
* @return ROK - success
* RFAILED - failure
*
* ****************************************************************/
* @return ROK - success
* RFAILED - failure
*
* ****************************************************************/
-int send
SlotIndMacToDuApp(SlotIndInfo *slotIn
d)
+int send
CellUpIndMacToDuApp(uint16_t cellI
d)
{
Pst pst;
uint16_t ret;
{
Pst pst;
uint16_t ret;
-
SlotIndInfo *slotInfo
;
+
OduCellId *oduCellId
;
/* Allocate sharable memory */
/* Allocate sharable memory */
- MAC_ALLOC_SHRABL_BUF(
slotInfo, sizeof(SlotIndInfo
));
- if(!
slotInfo
)
+ MAC_ALLOC_SHRABL_BUF(
oduCellId, sizeof(OduCellId
));
+ if(!
oduCellId
)
{
{
- DU_LOG("\nMAC :
Slot Indication memory allocation failed
");
+ DU_LOG("\nMAC :
Memory allocation failed for cell up indication
");
return RFAILED;
}
return RFAILED;
}
-
- slotInfo->cellId = slotInd->cellId;
- slotInfo->sfn = slotInd->sfn;
- slotInfo->slot = slotInd->slot;
+ oduCellId->cellId = cellId;
/* Fill Pst */
/* Fill Pst */
- FILL_PST_MAC_TO_DUAPP(pst, EVENT_MAC_
SLOT
_IND);
+ FILL_PST_MAC_TO_DUAPP(pst, EVENT_MAC_
CELL_UP
_IND);
- ret = MacDuApp
SlotInd(&pst, slotInfo
);
+ ret = MacDuApp
CellUpInd(&pst, oduCellId
);
if(ret != ROK)
{
if(ret != ROK)
{
- DU_LOG("\nMAC: Failed to send
slot
indication to DU APP");
- MAC_FREE_SHRABL_BUF(MAC_MEM_REGION, MAC_POOL,
slotInfo, sizeof(SlotIndInfo
));
+ DU_LOG("\nMAC: Failed to send
cell up
indication to DU APP");
+ MAC_FREE_SHRABL_BUF(MAC_MEM_REGION, MAC_POOL,
oduCellId, sizeof(OduCellId
));
}
return ret;
}
return ret;
-} /* send
Slot
IndMacToDuApp */
+} /* send
CellUp
IndMacToDuApp */
/*******************************************************************
*
/*******************************************************************
*
@@
-342,7
+341,7
@@
uint8_t macProcSlotInd(SlotIndInfo slotInd)
**/
uint8_t fapiMacSlotInd(Pst *pst, SlotIndInfo *slotInd)
{
**/
uint8_t fapiMacSlotInd(Pst *pst, SlotIndInfo *slotInd)
{
- uint8_t ret;
+ uint8_t ret
= ROK
;
volatile uint32_t startTime=0;
#ifdef ODU_SLOT_IND_DEBUG_LOG
volatile uint32_t startTime=0;
#ifdef ODU_SLOT_IND_DEBUG_LOG
@@
-350,12
+349,17
@@
uint8_t fapiMacSlotInd(Pst *pst, SlotIndInfo *slotInd)
#endif
/*starting Task*/
ODU_START_TASK(&startTime, PID_MAC_TTI_IND);
#endif
/*starting Task*/
ODU_START_TASK(&startTime, PID_MAC_TTI_IND);
+ gSlotCount++;
+/* When testing L2 with Intel-L1, any changes specific to
+ * timer mode testing must be guarded under INTEL_TIMER_MODE*/
+#ifndef INTEL_TIMER_MODE
/* send slot indication to scheduler */
ret = sendSlotIndMacToSch(slotInd);
if(ret != ROK)
{
DU_LOG("\nMAC : Sending of slot ind msg from MAC to SCH failed");
/* send slot indication to scheduler */
ret = sendSlotIndMacToSch(slotInd);
if(ret != ROK)
{
DU_LOG("\nMAC : Sending of slot ind msg from MAC to SCH failed");
+ MAC_FREE_SHRABL_BUF(pst->region, pst->pool, slotInd, sizeof(SlotIndInfo));
return ret;
}
return ret;
}
@@
-363,20
+367,26
@@
uint8_t fapiMacSlotInd(Pst *pst, SlotIndInfo *slotInd)
if(ret != ROK)
{
DU_LOG("\nMAC : macProcSlotInd failed");
if(ret != ROK)
{
DU_LOG("\nMAC : macProcSlotInd failed");
+ MAC_FREE_SHRABL_BUF(pst->region, pst->pool, slotInd, sizeof(SlotIndInfo));
return ret;
}
return ret;
}
+#endif
/* send slot indication to du app */
/* send slot indication to du app */
- ret = sendSlotIndMacToDuApp(slotInd);
- if(ret != ROK)
+ if(gSlotCount == 1)
{
{
- DU_LOG("\nMAC :Sending of slot ind msg from MAC to DU APP failed");
- return ret;
+ ret = sendCellUpIndMacToDuApp(slotInd->cellId);
+ if(ret != ROK)
+ {
+ DU_LOG("\nMAC :Sending of slot ind msg from MAC to DU APP failed");
+ MAC_FREE_SHRABL_BUF(pst->region, pst->pool, slotInd, sizeof(SlotIndInfo));
+ return ret;
+ }
}
/*stoping Task*/
ODU_STOP_TASK(startTime, PID_MAC_TTI_IND);
}
/*stoping Task*/
ODU_STOP_TASK(startTime, PID_MAC_TTI_IND);
-
+ MAC_FREE_SHRABL_BUF(pst->region, pst->pool, slotInd, sizeof(SlotIndInfo));
return ret;
} /* fapiMacSlotInd */
return ret;
} /* fapiMacSlotInd */