{
Pst cfmPst;
uint16_t cellIdx;
- uint8_t ret = ROK;
+ uint8_t ret = ROK, sliceIdx = 0;
MacCellCb *macCellCb;
memset((uint8_t *)&cfmPst, 0, sizeof(Pst));
}
memcpy(macCb.macCell[cellIdx]->macCellCfg.sib1Cfg.sib1Pdu, macCellCfg->sib1Cfg.sib1Pdu, \
macCb.macCell[cellIdx]->macCellCfg.sib1Cfg.sib1PduLen);
+
+ macCb.macCell[cellIdx]->macCellCfg.numSupportedSlice = macCellCfg->numSupportedSlice;
+ MAC_ALLOC(macCb.macCell[cellIdx]->macCellCfg.snssai, macCb.macCell[cellIdx]->macCellCfg.numSupportedSlice\
+ * sizeof(Snssai*));
+ if(macCb.macCell[cellIdx]->macCellCfg.snssai == NULLP)
+ {
+ DU_LOG("\nERROR --> MAC: Memory allocation failed at MacProcCellCfgReq");
+ return RFAILED;
+ }
+
+ if(macCb.macCell[cellIdx]->macCellCfg.snssai)
+ {
+ for(sliceIdx=0; sliceIdx<macCb.macCell[cellIdx]->macCellCfg.numSupportedSlice; sliceIdx++)
+ {
+ if(macCellCfg->snssai[sliceIdx])
+ {
+ MAC_ALLOC(macCb.macCell[cellIdx]->macCellCfg.snssai[sliceIdx], sizeof(Snssai));
+ if(!macCb.macCell[cellIdx]->macCellCfg.snssai[sliceIdx])
+ {
+ DU_LOG("\nERROR --> MAC: Memory allocation failed at MacProcCellCfgReq");
+ return RFAILED;
+ }
+ memcpy(macCb.macCell[cellIdx]->macCellCfg.snssai[sliceIdx], macCellCfg->snssai[sliceIdx], sizeof(Snssai));
+ }
+ }
+ }
/* Send cell cfg to scheduler */
ret = MacSchCellCfgReq(pst, macCellCfg);
{
SchCellCfg schCellCfg;
Pst cfgPst;
- uint8_t ssbMaskIdx = 0, rsrcListIdx = 0, ret=0;
+ uint8_t ssbMaskIdx = 0, rsrcListIdx = 0, ret=0, sliceIdx=0;
memset(&cfgPst, 0, sizeof(Pst));
memset(&schCellCfg, 0, sizeof(SchCellCfg));
schCellCfg.schInitialUlBwp.puschCommon.timeDomRsrcAllocList[rsrcListIdx].symbolLength =
macCellCfg->initialUlBwp.puschCommon.timeDomRsrcAllocList[rsrcListIdx].symbolLength;
}
+
+ if(macCellCfg->snssai)
+ {
+ schCellCfg.numSliceSupport = macCellCfg->numSupportedSlice;
+ MAC_ALLOC(schCellCfg.snssai, schCellCfg.numSliceSupport * sizeof(Snssai*));
+ if(!schCellCfg.snssai)
+ {
+ DU_LOG("\nERROR --> MAC: Memory allocation failed at MacSchCellCfgReq");
+ return RFAILED;
+ }
+ for(sliceIdx=0; sliceIdx<schCellCfg.numSliceSupport; sliceIdx++)
+ {
+ if(macCellCfg->snssai[sliceIdx])
+ {
+ MAC_ALLOC(schCellCfg.snssai[sliceIdx], sizeof(Snssai));
+ if(!schCellCfg.snssai[sliceIdx])
+ {
+ DU_LOG("\nERROR --> MAC: Memory allocation failed at MacSchCellCfgReq");
+ return RFAILED;
+ }
+ memcpy(schCellCfg.snssai[sliceIdx], macCellCfg->snssai[sliceIdx], sizeof(Snssai));
+ }
+ }
+ }
+ if(macCellCfg->rrmPolicy)
+ {
+ MAC_ALLOC(schCellCfg.rrmPolicy, sizeof(SchRrmPolicy));
+ if(!schCellCfg.rrmPolicy)
+ {
+ DU_LOG("\nERROR --> MAC: Memory allocation failed at MacProcCellCfgReq");
+ return RFAILED;
+ }
+ memcpy(schCellCfg.rrmPolicy, macCellCfg->rrmPolicy, sizeof(SchRrmPolicy));
+ }
+
#ifdef NR_TDD
memcpy(&schCellCfg.tddCfg, &macCellCfg->tddCfg, sizeof(TDDCfg));
#endif
* * ****************************************************************/
uint8_t MacProcSchCellDeleteRsp(Pst *pst, SchCellDeleteRsp *schCellDelRsp)
{
- uint8_t ret = ROK;
+ uint8_t ret = ROK, sliceIdx = 0;
uint16_t cellIdx=0;
CellDeleteStatus status;
if(macCb.macCell[cellIdx]->cellId == schCellDelRsp->cellId)
{
status = SUCCESSFUL_RSP;
+ if(macCb.macCell[cellIdx]->macCellCfg.snssai)
+ {
+ for(sliceIdx = 0; sliceIdx<macCb.macCell[cellIdx]->macCellCfg.numSupportedSlice; sliceIdx++)
+ {
+ MAC_FREE(macCb.macCell[cellIdx]->macCellCfg.snssai[sliceIdx], sizeof(Snssai));
+ }
+ MAC_FREE(macCb.macCell[cellIdx]->macCellCfg.snssai, macCb.macCell[cellIdx]->macCellCfg.\
+ numSupportedSlice * sizeof(Snssai*));
+ }
MAC_FREE(macCb.macCell[cellIdx]->macCellCfg.sib1Cfg.sib1Pdu, \
macCb.macCell[cellIdx]->macCellCfg.sib1Cfg.sib1PduLen);
MAC_FREE(macCb.macCell[cellIdx], sizeof(MacCellCb));
{
if(!schLcCfg->snssai)
{
- MAC_ALLOC(schLcCfg->snssai, sizeof(SchSnssai));
+ MAC_ALLOC(schLcCfg->snssai, sizeof(Snssai));
if(!schLcCfg->snssai)
{
DU_LOG("\nERROR --> MAC : Memory alloc failed at snssai at fillLogicalChannelCfg()");
SchLcState lcState;
uint32_t bo;
uint16_t pduSessionId; /*Pdu Session Id*/
- SchSnssai *snssai; /*S-NSSAI assoc with LCID*/
+ Snssai *snssai; /*S-NSSAI assoc with LCID*/
}SchDlLcCtxt;
typedef struct schDlCb
uint8_t pbr; // prioritisedBitRate
uint8_t bsd; // bucketSizeDuration
uint16_t pduSessionId; /*Pdu Session Id*/
- SchSnssai *snssai; /*S-NSSAI assoc with LCID*/
+ Snssai *snssai; /*S-NSSAI assoc with LCID*/
}SchUlLcCtxt;
typedef struct schUlCb
{
if(ueCbLcCfg->snssai == NULLP)/*In CONFIG_MOD case, no need to allocate SNSSAI memory*/
{
- SCH_ALLOC(ueCbLcCfg->snssai, sizeof(SchSnssai));
+ SCH_ALLOC(ueCbLcCfg->snssai, sizeof(Snssai));
}
- memcpy(ueCbLcCfg->snssai, lcCfg->snssai,sizeof(SchSnssai));
+ memcpy(ueCbLcCfg->snssai, lcCfg->snssai,sizeof(Snssai));
}
}
/*In CONFIG_MOD case, no need to allocate SNSSAI memory again*/
if(ueCbLcCfg->snssai == NULLP)
{
- SCH_ALLOC(ueCbLcCfg->snssai, sizeof(SchSnssai));
+ SCH_ALLOC(ueCbLcCfg->snssai, sizeof(Snssai));
}
- memcpy(ueCbLcCfg->snssai, lcCfg->snssai,sizeof(SchSnssai));
+ memcpy(ueCbLcCfg->snssai, lcCfg->snssai,sizeof(Snssai));
}
}
}
SCH_FREE(ueCfg->schLcCfg[lcIdx].drbQos, sizeof(SchDrbQosInfo));
- SCH_FREE(ueCfg->schLcCfg[lcIdx].snssai, sizeof(SchSnssai));
+ SCH_FREE(ueCfg->schLcCfg[lcIdx].snssai, sizeof(Snssai));
}/* End of outer for loop */
return ROK;
/*Need to Free the memory allocated for S-NSSAI*/
for(ueLcIdx = 0; ueLcIdx < ueCb->ulInfo.numUlLc; ueLcIdx++)
{
- SCH_FREE(ueCb->ulInfo.ulLcCtxt[ueLcIdx].snssai, sizeof(SchSnssai));
+ SCH_FREE(ueCb->ulInfo.ulLcCtxt[ueLcIdx].snssai, sizeof(Snssai));
}
for(ueLcIdx = 0; ueLcIdx < ueCb->dlInfo.numDlLc; ueLcIdx++)
{
- SCH_FREE(ueCb->dlInfo.dlLcCtxt[ueLcIdx].snssai, sizeof(SchSnssai));
+ SCH_FREE(ueCb->dlInfo.dlLcCtxt[ueLcIdx].snssai, sizeof(Snssai));
}
memset(ueCb, 0, sizeof(SchUeCb));
}
* ****************************************************************/
void deleteSchCellCb(SchCellCb *cellCb)
{
- uint8_t idx=0;
+ uint8_t sliceIdx=0, slotIdx=0;
if(cellCb->schDlSlotInfo)
{
- for(idx=0; idx<cellCb->numSlots; idx++)
+ for(slotIdx=0; slotIdx<cellCb->numSlots; slotIdx++)
{
- if(cellCb->schDlSlotInfo[idx])
- {
- SCH_FREE(cellCb->schDlSlotInfo[idx], sizeof(SchDlSlotInfo));
- }
+ SCH_FREE(cellCb->schDlSlotInfo[slotIdx], sizeof(SchDlSlotInfo));
}
SCH_FREE(cellCb->schDlSlotInfo, cellCb->numSlots *sizeof(SchDlSlotInfo*));
}
if(cellCb->schUlSlotInfo)
{
- for(idx=0; idx<cellCb->numSlots; idx++)
+ for(slotIdx=0; slotIdx<cellCb->numSlots; slotIdx++)
{
- if(cellCb->schUlSlotInfo[idx])
- {
- SCH_FREE(cellCb->schUlSlotInfo[idx], sizeof(SchUlSlotInfo));
- }
+ SCH_FREE(cellCb->schUlSlotInfo[slotIdx], sizeof(SchUlSlotInfo));
}
SCH_FREE(cellCb->schUlSlotInfo, cellCb->numSlots * sizeof(SchUlSlotInfo*));
}
+
+ if(cellCb->cellCfg.snssai)
+ {
+ for(sliceIdx=0; sliceIdx<cellCb->cellCfg.numSliceSupport; sliceIdx++)
+ {
+ SCH_FREE(cellCb->cellCfg.snssai[sliceIdx], sizeof(Snssai));
+ }
+ SCH_FREE(cellCb->cellCfg.snssai, cellCb->cellCfg.numSliceSupport*sizeof(Snssai*));
+ }
+ SCH_FREE(cellCb->cellCfg.rrmPolicy, sizeof(SchRrmPolicy));
memset(cellCb, 0, sizeof(SchCellCb));
}
#define ODU_SET_THREAD_AFFINITY SSetAffinity
#define ODU_CREATE_TASK SCreateSTsk
+/* Slice */
+#define SD_SIZE 3
+
#ifdef NR_TDD
/* Maximum slots for max periodicity and highest numerology is 320.
* However, aligning to fapi_interface.h, setting this macro to 160 */
uint8_t mnc[3];
}Plmn;
+typedef struct snssai
+{
+ uint8_t sst;
+ uint8_t sd[SD_SIZE];
+}Snssai;
+
typedef struct oduCellId
{
uint16_t cellId;
#define MONITORING_SYMB_WITHIN_SLOT_SIZE 2 /* i.e. 2 bytes because size of monitoring symbols within slot is 14 bits */
#define MAX_NUM_DL_ALLOC 16 /* Max number of pdsch time domain downlink allocation */
#define MAX_NUM_UL_ALLOC 16 /* Max number of pusch time domain uplink allocation */
-#define SD_SIZE 3 /* Max size of Slice Differentiator in S-NSSAI */
-
#define MAX_NUM_SCELL 32
/* PUCCH Configuration Macro */
MCS_TABLE_QAM64_LOW_SE
}McsTable;
+typedef enum
+{
+ RSRC_PRB,
+ RSRC_DRB,
+ RSRC_RRC_CONNECTED_USERS
+}ResourceType;
+
typedef struct failureCause
{
CauseGrp type;
PuschConfigCommon puschCommon;
}BwpUlConfig;
+/* Single Network Slice Selection assistance Info */
+
+typedef struct policyMemberList
+{
+ Plmn plmn;
+ Snssai snssai;
+}PolicyMemberList;
+
+typedef struct rrmPolicy
+{
+ ResourceType rsrcType;
+ PolicyMemberList memberList;
+ uint8_t policyMaxRatio;
+ uint8_t policyMinRatio;
+ uint8_t policyDedicatedRatio;
+}RrmPolicy;
+
typedef struct macCellCfg
{
uint16_t cellId; /* Cell Id */
BwpDlConfig initialDlBwp; /* Initial DL BWP */
BwpUlConfig initialUlBwp; /* Initial UL BWP */
uint8_t dmrsTypeAPos; /* DMRS Type A position */
+ uint8_t numSupportedSlice; /* Total slice supporting */
+ Snssai **snssai; /* List of supporting snssai*/
+ RrmPolicy *rrmPolicy; /* RRM policy details */
}MacCellCfg;
typedef struct macCellCfgCfm
uint32_t ulBr; /* UL Bit rate */
}AmbrCfg;
-/* Single Network Slice Selection assistance Info */
-typedef struct snssai
-{
- uint8_t sst; /* Slice Type */
- uint8_t sd[SD_SIZE]; /* Slice Differentiator */
-}Snssai;
-
typedef struct nonDynFiveQi
{
uint16_t fiveQi;
#define MAX_NUM_PUCCH_P0_PER_SET 8
#define MAX_NUM_PATH_LOSS_REF_RS 4
#define MAX_NUM_DL_DATA_TO_UL_ACK 15
-#define SD_SIZE 3
#define QPSK_MODULATION 2
#define RAR_PAYLOAD_SIZE 10 /* As per spec 38.321, sections 6.1.5 and 6.2.3, RAR PDU is 8 bytes long and 2 bytes of padding */
} \
}
+typedef enum
+{
+ PRB_RSRC,
+ DRB_RSRC,
+ RRC_CONNECTED_USERS_RSRC
+}SchResourceType;
+
typedef enum
{
NO_TRANSMISSION,
SchK2TimingInfoTbl k2InfoTbl;
}SchBwpUlCfg;
+typedef struct schPolicyMemberList
+{
+ Plmn plmn;
+ Snssai snssai;
+}SchPolicyMemberList;
+
+typedef struct schRrmPolicy
+{
+ SchResourceType rsrcType;
+ SchPolicyMemberList memberList;
+ uint8_t policyMaxRatio;
+ uint8_t policyMinRatio;
+ uint8_t policyDedicatedRatio;
+}SchRrmPolicy;
+
typedef struct schCellCfg
{
uint16_t cellId; /* Cell Id */
SchRachCfg schRachCfg; /* PRACH config */
SchBwpDlCfg schInitialDlBwp; /* Initial DL BWP */
SchBwpUlCfg schInitialUlBwp; /* Initial UL BWP */
+ uint8_t numSliceSupport; /* Total num of slice support */
+ Snssai **snssai; /* List of supporting snssai*/
+ SchRrmPolicy *rrmPolicy; /* RRM policy */
#ifdef NR_TDD
TDDCfg tddCfg; /* TDD Cfg */
-#endif
+#endif
}SchCellCfg;
typedef struct schCellCfgCfm
uint32_t ulPduSessAggMaxBitRate; /* UL PDU Session Aggregate max bit rate */
}SchDrbQosInfo;
-typedef struct schSnssai
-{
- uint8_t sst;
- uint8_t sd[SD_SIZE];
-}SchSnssai;
-
/* Special cell configuration */
typedef struct schSpCellCfg
{
ConfigType configType;
uint8_t lcId;
SchDrbQosInfo *drbQos;
- SchSnssai *snssai;
+ Snssai *snssai;
SchDlLcCfg dlLcCfg;
SchUlLcCfg ulLcCfg;
}SchLcCfg;
#define CU_POOL 1
#define MAX_DU_PORT 2
#define DU_PORT 38472
-#define SD_SIZE 3 /* As per the spec 38.473, SD size must be of size(3) */
#define MAX_NUM_OF_SLICE 1024 /* As per the spec 38.473, maxnoofSliceItems = 1024*/
/*VALID Tunnel ID*/
uint16_t cuPort;
}CuSctpParams;
-/* Single Network Slice Selection assistance Info */
-typedef struct snssai
-{
- uint8_t sst; /* Slice Type */
- uint8_t sd[SD_SIZE]; /* Slice Differentiator */
-}Snssai;
-
typedef struct cuCfgParams
{
uint32_t cuId;
/* This function is used to fill up the cell configuration for CL */
uint8_t readMacCfg()
{
- uint8_t idx;
+ uint8_t idx=0, sliceIdx=0;
+ F1TaiSliceSuppLst *taiSliceSuppLst;
duCfgParam.macCellCfg.carrierId = CARRIER_IDX;
/* fill PUCCH config common */
duCfgParam.macCellCfg.initialUlBwp.pucchCommon.pucchResourceCommon = PUCCH_RSRC_COMMON;
duCfgParam.macCellCfg.initialUlBwp.pucchCommon.pucchGroupHopping = PUCCH_GROUP_HOPPING;
+
+ /* SNSSAI And RRM policy Configuration */
+ taiSliceSuppLst = &duCfgParam.srvdCellLst[0].duCellInfo.cellInfo.srvdPlmn[0].taiSliceSuppLst;
+ duCfgParam.macCellCfg.numSupportedSlice = taiSliceSuppLst->numSupportedSlices;
+ if(taiSliceSuppLst->snssai)
+ {
+ DU_ALLOC_SHRABL_BUF(duCfgParam.macCellCfg.snssai, (duCfgParam.macCellCfg.numSupportedSlice) * sizeof(Snssai*));
+ if(duCfgParam.macCellCfg.snssai == NULLP)
+ {
+ DU_LOG("\nERROR --> DU_APP: Memory allocation failed at readMacCfg");
+ return RFAILED;
+ }
+ }
+ for(sliceIdx=0; sliceIdx<taiSliceSuppLst->numSupportedSlices; sliceIdx++)
+ {
+ if(taiSliceSuppLst->snssai[sliceIdx] != NULLP)
+ {
+ DU_ALLOC_SHRABL_BUF(duCfgParam.macCellCfg.snssai[sliceIdx], sizeof(Snssai));
+ if(duCfgParam.macCellCfg.snssai[sliceIdx] == NULLP)
+ {
+ DU_LOG("\nERROR --> DU_APP: Memory allocation failed at readMacCfg");
+ return RFAILED;
+ }
+ memcpy(duCfgParam.macCellCfg.snssai[sliceIdx], taiSliceSuppLst->snssai[sliceIdx], sizeof(Snssai));
+ }
+ }
+
+ DU_ALLOC_SHRABL_BUF(duCfgParam.macCellCfg.rrmPolicy, sizeof(RrmPolicy));
+ if(duCfgParam.macCellCfg.rrmPolicy == NULLP)
+ {
+ DU_LOG("\nERROR --> DU_APP: Memory allocation failed at readMacCfg");
+ return RFAILED;
+ }
+ memset(duCfgParam.macCellCfg.rrmPolicy, 0, sizeof(RrmPolicy));
+ /* TODO Check the exact data type of resource type once will receive the
+ * information from O1 interface */
+ duCfgParam.macCellCfg.rrmPolicy->rsrcType = RSRC_PRB;
+ memcpy(&duCfgParam.macCellCfg.rrmPolicy->memberList.snssai, duCfgParam.macCellCfg.snssai[DEDICATED_SLICE_INDEX],\
+ sizeof(Snssai));
+ duCfgParam.macCellCfg.rrmPolicy->policyMaxRatio = MAX_RATIO;
+ duCfgParam.macCellCfg.rrmPolicy->policyMinRatio = MIN_RATIO;
+ duCfgParam.macCellCfg.rrmPolicy->policyDedicatedRatio = DEDICATED_RATIO;
return ROK;
}
MibParams mib;
Sib1Params sib1;
F1TaiSliceSuppLst *taiSliceSuppLst;
- RrmPolicy *rrmPolicy;
/* TODO Added these below variable for local testing, once we will receive the
* configuration from O1 we can remove these variable */
- F1Snsaai snsaai[NUM_OF_SUPPORTED_SLICE] = {{1,{2,3,4}},{5,{6,7,8}}};
- ResourceType rsrcType = PRB;
- RrmPolicyRatio policyRatio= {10,20,30};
- PolicyMemberList memberList;
-
- memset(&memberList, 0, sizeof(PolicyMemberList));
- memberList.snsaai = snsaai[DEDICATED_SLICE_INDEX];
+ Snssai snssai[NUM_OF_SUPPORTED_SLICE] = {{1,{2,3,4}},{5,{6,7,8}}};
#ifdef O1_ENABLE
if( getStartupConfig(&g_cfg) != ROK )
/* List of Supporting Slices */
for(srvdPlmnIdx=0; srvdPlmnIdx<MAX_PLMN; srvdPlmnIdx++)
{
- taiSliceSuppLst = &duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.cellInfo.srvdPlmn[srvdPlmnIdx].taiSliceSuppLst;
-
- taiSliceSuppLst->pres = true;
+ taiSliceSuppLst = &duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.cellInfo.srvdPlmn[srvdPlmnIdx].\
+ taiSliceSuppLst;
+
+ /* TODO Calculte the exact number of supported slices once will get
+ * cell configuration from O1 */
taiSliceSuppLst->numSupportedSlices = NUM_OF_SUPPORTED_SLICE;
+ if(taiSliceSuppLst->numSupportedSlices > MAX_NUM_OF_SLICE_ITEMS)
+ {
+ DU_LOG("\nERROR --> DU_APP: readCfg(): Number of supported slice [%d] is more than 1024",\
+ taiSliceSuppLst->numSupportedSlices);
+ return RFAILED;
+ }
- memset(&taiSliceSuppLst->snssai, 0, sizeof(F1Snsaai));
- for(sliceIdx=0; sliceIdx<NUM_OF_SUPPORTED_SLICE; sliceIdx++)
+ DU_ALLOC(taiSliceSuppLst->snssai, taiSliceSuppLst->numSupportedSlices*sizeof(Snssai*));
+ if(taiSliceSuppLst->snssai == NULLP)
+ {
+ DU_LOG("\nERROR --> DU_APP: readCfg():Memory allocation failed");
+ return RFAILED;
+ }
+
+ for(sliceIdx=0; sliceIdx<taiSliceSuppLst->numSupportedSlices; sliceIdx++)
{
- DU_ALLOC(taiSliceSuppLst->snssai[sliceIdx], sizeof(F1Snsaai));
+ DU_ALLOC(taiSliceSuppLst->snssai[sliceIdx], sizeof(Snssai));
if(taiSliceSuppLst->snssai[sliceIdx] == NULLP)
{
DU_LOG("\nERROR --> DU_APP: readCfg():Memory allocation failed");
return RFAILED;
}
- memcpy(taiSliceSuppLst->snssai[sliceIdx], &snsaai[sliceIdx], sizeof(F1Snsaai));
-
- /* Checking rrmPolicy Slice list available or not */
- if(!memcmp(&snsaai[sliceIdx], &memberList.snsaai, sizeof(F1Snsaai)))
- {
- rrmPolicy = &duCfgParam.srvdCellLst[srvdCellIdx].duCellInfo.cellInfo.srvdPlmn[srvdPlmnIdx].rrmPolicy;
- rrmPolicy->present = true;
- rrmPolicy->rsrcType = rsrcType;
- rrmPolicy->memberList.snsaai = memberList.snsaai;
- rrmPolicy->rrmPolicyRatio = policyRatio;
- }
+ memcpy(taiSliceSuppLst->snssai[sliceIdx], &snssai[sliceIdx], sizeof(Snssai));
}
}
/* TAC and EPSTAC */
#define MAXNUMOFUACPERPLMN 64 /* Maximum number of signalled categories per PLMN */
#define NR_RANAC 150 /* RANAC */
#define DEFAULT_CELLS 1 /* Max num of broadcast PLMN ids */
-#define NUM_OF_SUPPORTED_SLICE 2
-#define DEDICATED_SLICE_INDEX 1
#define IE_EXTENSION_LIST_COUNT 1
/* Macro definitions for MIB/SIB1 */
/*VALID Tunnel ID*/
#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 10 /*[Spec 29.281]: Max limit is not mentioned but as per GTP-U Header Format, TEID occupies 4 octets */
+
+/* Slice Ratio */
+#define MAX_RATIO 30
+#define MIN_RATIO 20
+#define DEDICATED_RATIO 10
+#define DEDICATED_SLICE_INDEX 1
+#define NUM_OF_SUPPORTED_SLICE 2
+
typedef enum
{
GNBDU,
PUSCH_MAPPING_TYPE_B,
}puschMappingType;
-typedef enum
-{
- PRB,
- DRB,
- RRC_CONNECTED_USERS
-}ResourceType;
-
typedef struct f1RrcVersion
{
char rrcVer[30]; /* Latest RRC Version */
}mode;
}F1EutraModeInfo;
-typedef struct f1Snsaai
-{
- uint8_t sst;
- uint8_t sd[SD_SIZE];
-}F1Snsaai;
-
typedef struct epIpAddr
{
char transportAddr[20]; /* Transport Layer Address */
char port[2];
}EpIpAddrPort;
-typedef struct policyMemberList
-{
- Plmn plmn;
- F1Snsaai snsaai;
-}PolicyMemberList;
-
-typedef struct rrmPolicyRatio
-{
- uint8_t policyMaxRatio;
- uint8_t policyMinRatio;
- uint8_t policyDedicatedRatio;
-}RrmPolicyRatio;
-
-typedef struct rrmPolicy
-{
- bool present;
- ResourceType rsrcType;
- PolicyMemberList memberList;
- RrmPolicyRatio rrmPolicyRatio;
-}RrmPolicy;
-
typedef struct f1TaiSliceSuppLst
{
- bool pres;
uint8_t numSupportedSlices;
- F1Snsaai *snssai[MAX_NUM_OF_SLICE_ITEMS];
+ Snssai **snssai;
}F1TaiSliceSuppLst;
typedef struct f1SrvdPlmn
Plmn plmn;
Plmn extPlmn; /* Extended available PLMN list */
F1TaiSliceSuppLst taiSliceSuppLst;
- RrmPolicy rrmPolicy;
}F1SrvdPlmn;
typedef struct f1BrdcstPlmnInfo
}
}
- elementCnt = NUM_OF_SUPPORTED_SLICE;
+ elementCnt = duCfgParam.srvdCellLst[0].duCellInfo.cellInfo.srvdPlmn[0].taiSliceSuppLst.numSupportedSlices;
idx = 0;
(*ieExtend)->list.array[idx]->id = ProtocolIE_ID_id_TAISliceSupportList;
(*ieExtend)->list.array[idx]->criticality = Criticality_ignore;
}
}
DU_FREE(servedPlmnItem->iE_Extensions->list.array[0]->extensionValue.choice.\
- SliceSupportList.list.array, sizeof(SliceSupportItem_t*));
+ SliceSupportList.list.array, servedPlmnItem->iE_Extensions->list.array[0]->\
+ extensionValue.choice.SliceSupportList.list.size);
}
DU_FREE(servedPlmnItem->iE_Extensions->list.array[0],\
sizeof(ServedPLMNs_ItemExtIEs_t));
}
ieIdx = 0;
- elementCnt = NUM_OF_SUPPORTED_SLICE;
+ elementCnt = duCfgParam.srvdCellLst[0].duCellInfo.cellInfo.srvdPlmn[0].taiSliceSuppLst.numSupportedSlices;
servedPlmn->list.array[arrayIdx]->iE_Extensions->list.array[ieIdx]->id =ProtocolIE_ID_id_TAISliceSupportList;
servedPlmn->list.array[arrayIdx]->iE_Extensions->list.array[ieIdx]->criticality = Criticality_ignore;
servedPlmn->list.array[arrayIdx]->iE_Extensions->list.array[ieIdx]->extensionValue.present = \