Signed-off-by: barveankit <anbarve@radisys.com>
Change-Id: I717cfda2b815bb1218a081c41abaa594f8a366d6
Signed-off-by: barveankit <anbarve@radisys.com>
* ****************************************************************/
uint8_t BuildDRBSetup(uint32_t duId, CuUeCb *ueCb, DRBs_ToBeSetup_List_t *drbSet)
{
* ****************************************************************/
uint8_t BuildDRBSetup(uint32_t duId, CuUeCb *ueCb, DRBs_ToBeSetup_List_t *drbSet)
{
uint8_t idx = 0, extIeIdx = 0;
uint8_t elementCnt = 0, drbCnt = 0;
uint8_t BuildQOSInforet = 0,BuildSNSSAIret = 0;
uint8_t idx = 0, extIeIdx = 0;
uint8_t elementCnt = 0, drbCnt = 0;
uint8_t BuildQOSInforet = 0,BuildSNSSAIret = 0;
+ snssaiIdx = (idx% cuCb.numSnssaiSupported);
if(ueCb->state != UE_HANDOVER_IN_PROGRESS)
BuildSNSSAIret = BuildSNSSAI(&ueCb->drbList[ueCb->numDrb], &drbSetItem->qoSInformation.choice.\
if(ueCb->state != UE_HANDOVER_IN_PROGRESS)
BuildSNSSAIret = BuildSNSSAI(&ueCb->drbList[ueCb->numDrb], &drbSetItem->qoSInformation.choice.\
- choice_extension->value.choice.DRB_Information.sNSSAI, cuCb.snssaiList[0], FALSE);
+ choice_extension->value.choice.DRB_Information.sNSSAI, cuCb.snssaiList[snssaiIdx], FALSE);
else
BuildSNSSAIret = BuildSNSSAI(&ueCb->drbList[idx], &drbSetItem->qoSInformation.choice.\
else
BuildSNSSAIret = BuildSNSSAI(&ueCb->drbList[idx], &drbSetItem->qoSInformation.choice.\
- choice_extension->value.choice.DRB_Information.sNSSAI, cuCb.snssaiList[0], TRUE);
+ choice_extension->value.choice.DRB_Information.sNSSAI, NULLP, TRUE);
if(BuildSNSSAIret != ROK)
{
DU_LOG("\nERROR --> F1AP : Failed to build SNSSAI Info in BuildDRBSetup");
if(BuildSNSSAIret != ROK)
{
DU_LOG("\nERROR --> F1AP : Failed to build SNSSAI Info in BuildDRBSetup");
void *cuConsoleHandler(void *args)
{
char ch;
void *cuConsoleHandler(void *args)
{
char ch;
+ uint32_t teId = 0;
+ uint32_t duId;
uint8_t ret = ROK;
uint8_t cnt = 0;
uint8_t ret = ROK;
uint8_t cnt = 0;
+ EgtpTeIdCb *teidCb = NULLP;
/* 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).
/* 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).
* NUM_TUNNEL_TO_PUMP_DATA = 9, NUM_DL_PACKETS = 1.
* totalDataPacket = totalNumOfTestFlow * NUM_TUNNEL_TO_PUMP_DATA * NUM_DL_PACKETS
* totalDataPacket = [500*9*1] */
* 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 = 5;
+ int32_t totalNumOfTestFlow = 2;
while(totalNumOfTestFlow)
{
while(totalNumOfTestFlow)
{
- for(teId = 1; teId <= NUM_TUNNEL_TO_PUMP_DATA; teId++)
+ for(duId = 1; duId<=MAX_DU_SUPPORTED; duId++)
- 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(duId %d, teId:%d)\n", duId, teId);
+ cmHashListFind(&(egtpCb.dstCb[duId-1].teIdLst), (uint8_t *)&(teId), sizeof(uint32_t), 0, (PTR *)&teidCb);
+ if(teidCb)
- DU_LOG("\nERROR --> EGTP: Issue with teid=%d\n",teId);
- break;
+ cnt =0;
+ while(cnt < NUM_DL_PACKETS)
+ {
+ ret = cuEgtpDatReq(duId, 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++;
+ }
- /* TODO : sleep(1) will be removed later once we will be able to
- * support the continuous data pack transfer */
- sleep(1);
- cnt++;
}
}
totalNumOfTestFlow--;
}
}
totalNumOfTestFlow--;
* RFAILED - failure
*
* ****************************************************************/
* RFAILED - failure
*
* ****************************************************************/
-uint16_t cuEgtpDatReq(uint8_t teId)
+uint16_t cuEgtpDatReq(uint32_t duId, uint8_t teId)
- uint8_t ret = ROK, cnt = 0, duId =0;
+ uint8_t ret = ROK, cnt = 0;
EgtpMsg egtpMsg;
egtpMsg.msgHdr.teId = teId;
EgtpMsg egtpMsg;
egtpMsg.msgHdr.teId = teId;
DU_LOG("\nERROR --> EGTP : DRB not created");
return RFAILED ;
}
DU_LOG("\nERROR --> EGTP : DRB not created");
return RFAILED ;
}
- for(duId = 1; duId<=egtpCb.numDu; duId++)
+ /* Build Application message that is supposed to come from app to egtp */
+ ret = BuildAppMsg(duId, &egtpMsg);
+ if(ret != ROK)
- /* Build Application message that is supposed to come from app to egtp */
- ret = BuildAppMsg(duId, &egtpMsg);
- if(ret != ROK)
- {
- DU_LOG("\nERROR --> EGTP : Failed to build App Msg");
- return RFAILED;
- }
+ DU_LOG("\nERROR --> EGTP : Failed to build App Msg");
+ return RFAILED;
+ }
- /* Encode EGTP header to build final EGTP message */
- ret = BuildEgtpMsg(duId, &egtpMsg);
- if(ret != ROK)
- {
- DU_LOG("\nERROR --> EGTP : Failed to build EGTP Msg");
- return RFAILED;
- }
- cuEgtpSendMsg(duId, egtpMsg.msg);
- ODU_PUT_MSG_BUF(egtpMsg.msg);
+ /* Encode EGTP header to build final EGTP message */
+ ret = BuildEgtpMsg(duId, &egtpMsg);
+ if(ret != ROK)
+ {
+ DU_LOG("\nERROR --> EGTP : Failed to build EGTP Msg");
+ return RFAILED;
+ cuEgtpSendMsg(duId, egtpMsg.msg);
+ ODU_PUT_MSG_BUF(egtpMsg.msg);
#define MIN_TEID 1 /*[Spec 29.281,Sec 5.1]: All Zero TEIDs are never assigned for setting up GTP-U Tunnel*/
#define MAX_TEID MAX_NUM_DRB * MAX_NUM_UE /*[Spec 29.281]: Max limit is not mentioned but as per GTP-U Header Format, TEID occupies 4 octets */
#define MIN_TEID 1 /*[Spec 29.281,Sec 5.1]: All Zero TEIDs are never assigned for setting up GTP-U Tunnel*/
#define MAX_TEID MAX_NUM_DRB * MAX_NUM_UE /*[Spec 29.281]: Max limit is not mentioned but as per GTP-U Header Format, TEID occupies 4 octets */
-#define NUM_TUNNEL_TO_PUMP_DATA 9
+#define NUM_TUNNEL_TO_PUMP_DATA 4
#define NUM_DL_PACKETS 1
uint8_t sockType;
#define NUM_DL_PACKETS 1
uint8_t sockType;
S16 cuEgtpTnlDel(uint32_t duId,EgtpTnlEvt tnlEvt);
S16 cuEgtpEncodeHdr(uint8_t *preEncodedHdr, EgtpMsgHdr *preDefHdr, uint8_t *hdrIdx);
S16 cuEgtpHdlRecvMsg(Buffer *mBuf);
S16 cuEgtpTnlDel(uint32_t duId,EgtpTnlEvt tnlEvt);
S16 cuEgtpEncodeHdr(uint8_t *preEncodedHdr, EgtpMsgHdr *preDefHdr, uint8_t *hdrIdx);
S16 cuEgtpHdlRecvMsg(Buffer *mBuf);
-uint16_t cuEgtpDatReq(uint8_t teId);
+uint16_t cuEgtpDatReq(uint32_t duId, uint8_t teId);
S16 BuildAppMsg(uint32_t duId, EgtpMsg *egtpMsg);
S16 BuildEgtpMsg(uint32_t duId, EgtpMsg *egtpMsg);
S16 cuEgtpSendMsg(uint32_t duId, Buffer *mBuf);
S16 BuildAppMsg(uint32_t duId, EgtpMsg *egtpMsg);
S16 BuildEgtpMsg(uint32_t duId, EgtpMsg *egtpMsg);
S16 cuEgtpSendMsg(uint32_t duId, Buffer *mBuf);
GET_UE_ID(puschPdu.rnti, ueId);
if(phyDb.ueDb.ueCb[ueId-1].isCFRA)
{
GET_UE_ID(puschPdu.rnti, ueId);
if(phyDb.ueDb.ueCb[ueId-1].isCFRA)
{
- /* In CF-RA in case of handover, RRC Reconfiguration Complete is sent
- * by UE once RAR is received from DU */
- phyDb.ueDb.ueCb[ueId-1].ueId = ueId;
- phyDb.ueDb.ueCb[ueId-1].crnti = puschPdu.rnti;
- phyDb.ueDb.ueCb[ueId-1].msgRrcReconfigComp = true;
- type = MSG_TYPE_RRC_RECONFIG_COMPLETE;
+ if(!phyDb.ueDb.ueCb[ueId-1].msgRrcReconfigComp)
+ {
+ /* In CF-RA in case of handover, RRC Reconfiguration Complete is sent
+ * by UE once RAR is received from DU */
+ phyDb.ueDb.ueCb[ueId-1].ueId = ueId;
+ phyDb.ueDb.ueCb[ueId-1].crnti = puschPdu.rnti;
+ phyDb.ueDb.ueCb[ueId-1].msgRrcReconfigComp = true;
+ type = MSG_TYPE_RRC_RECONFIG_COMPLETE;
+ }
+ else
+ return ROK;
type = MSG_TYPE_RRC_RECONFIG_COMPLETE;
}
else
type = MSG_TYPE_RRC_RECONFIG_COMPLETE;
}
else
}
MAC_ALLOC(rxDataInd, sizeof(fapi_rx_data_indication_t));
}
MAC_ALLOC(rxDataInd, sizeof(fapi_rx_data_indication_t));