[Epic-ID:ODUHIGH-557][Task-ID:ODUHIGH-640] Fixes related to OAI-CU integration with ODU 85/14485/1
authorsvaidhya <svaidhya@radisys.com>
Tue, 20 May 2025 08:00:51 +0000 (08:00 +0000)
committersvaidhya <svaidhya@radisys.com>
Tue, 20 May 2025 08:00:54 +0000 (08:00 +0000)
Change-Id: I0ed03974a00c2d790d8585fae286498cdec80718
Signed-off-by: svaidhya <svaidhya@radisys.com>
build/config/tdd_odu_config.xml
src/du_app/du_cfg.c
src/du_app/du_f1ap_msg_hdl.c
src/du_app/du_sctp.c
src/du_app/du_sys_info_hdl.c
src/du_app/du_sys_info_hdl.h

index 7fdfff0..f85ebc0 100644 (file)
@@ -14,8 +14,8 @@
    <DU_ID>1</DU_ID>
    <DU_NAME>ORAN OAM DU</DU_NAME>
    <MAX_NUM_DRB>29</MAX_NUM_DRB>
-   <DU_IP_V4_ADDR>192.168.130.81</DU_IP_V4_ADDR>
-   <CU_IP_V4_ADDR>192.168.130.82</CU_IP_V4_ADDR>
+   <DU_IP_V4_ADDR>127.0.0.5</DU_IP_V4_ADDR>
+   <CU_IP_V4_ADDR>127.0.0.4</CU_IP_V4_ADDR>
    <RIC_IP_V4_ADDR>192.168.130.80</RIC_IP_V4_ADDR>
    <SCTP>
       <F1_SCTP_PORT>38472</F1_SCTP_PORT>
       <MAX_DU_PORT>2</MAX_DU_PORT>
    </SCTP>
    <EGTP>
-      <LOCAL_F1_EGTP_PORT>2152</LOCAL_F1_EGTP_PORT>
-      <DEST_F1_EGTP_PORT>2152</DEST_F1_EGTP_PORT>
+      <LOCAL_F1_EGTP_PORT>2153</LOCAL_F1_EGTP_PORT>
+      <DEST_F1_EGTP_PORT>2153</DEST_F1_EGTP_PORT>
       <MIN_TEID>1</MIN_TEID>
    </EGTP>
    <SIB1_PARAMS>
       <PLMN>
          <MCC>
-            <PLMN_MCC0>3</PLMN_MCC0>
-            <PLMN_MCC1>1</PLMN_MCC1>
+            <PLMN_MCC0>0</PLMN_MCC0>
+            <PLMN_MCC1>0</PLMN_MCC1>
             <PLMN_MCC2>1</PLMN_MCC2>
          </MCC>
          <MNC>
-         <PLMN_MNC0>4</PLMN_MNC0>
-         <PLMN_MNC1>8</PLMN_MNC1>
+         <PLMN_MNC0>0</PLMN_MNC0>
+         <PLMN_MNC1>1</PLMN_MNC1>
          <PLMN_MNC2>0</PLMN_MNC2>
          </MNC>
       </PLMN>
                <CELL_ID>1</CELL_ID>
                <PLMN>
                   <MCC>
-                     <PLMN_MCC0>3</PLMN_MCC0>
-                     <PLMN_MCC1>1</PLMN_MCC1>
+                     <PLMN_MCC0>0</PLMN_MCC0>
+                     <PLMN_MCC1>0</PLMN_MCC1>
                      <PLMN_MCC2>1</PLMN_MCC2>
                   </MCC>
                   <MNC>
-                     <PLMN_MNC0>4</PLMN_MNC0>
-                     <PLMN_MNC1>8</PLMN_MNC1>
+                     <PLMN_MNC0>0</PLMN_MNC0>
+                     <PLMN_MNC1>1</PLMN_MNC1>
                      <PLMN_MNC2>0</PLMN_MNC2>
                  </MNC>
                </PLMN>
             <F1_SRVD_PLMN>
                <PLMN>
                   <MCC>
-                     <PLMN_MCC0>3</PLMN_MCC0>
-                     <PLMN_MCC1>1</PLMN_MCC1>
+                     <PLMN_MCC0>0</PLMN_MCC0>
+                     <PLMN_MCC1>0</PLMN_MCC1>
                      <PLMN_MCC2>1</PLMN_MCC2>
                   </MCC>
                   <MNC>
-                     <PLMN_MNC0>4</PLMN_MNC0>
-                     <PLMN_MNC1>8</PLMN_MNC1>
+                     <PLMN_MNC0>0</PLMN_MNC0>
+                     <PLMN_MNC1>1</PLMN_MNC1>
                      <PLMN_MNC2>0</PLMN_MNC2>
                   </MNC>
                </PLMN>
                <EXT_PLMN>
                   <MCC>
-                     <PLMN_MCC0>3</PLMN_MCC0>
-                     <PLMN_MCC1>1</PLMN_MCC1>
+                     <PLMN_MCC0>0</PLMN_MCC0>
+                     <PLMN_MCC1>0</PLMN_MCC1>
                      <PLMN_MCC2>1</PLMN_MCC2>
                   </MCC>
                   <MNC>
-                     <PLMN_MNC0>4</PLMN_MNC0>
-                     <PLMN_MNC1>8</PLMN_MNC1>
+                     <PLMN_MNC0>0</PLMN_MNC0>
+                     <PLMN_MNC1>1</PLMN_MNC1>
                      <PLMN_MNC2>0</PLMN_MNC2>
                   </MNC>
                </EXT_PLMN>
          <F1_BRDCST_PLMN_INFO>
             <PLMN>
                <MCC>
-                  <PLMN_MCC0>3</PLMN_MCC0>
-                  <PLMN_MCC1>1</PLMN_MCC1>
+                  <PLMN_MCC0>0</PLMN_MCC0>
+                  <PLMN_MCC1>0</PLMN_MCC1>
                   <PLMN_MCC2>1</PLMN_MCC2>
                </MCC>
                <MNC>
-                  <PLMN_MNC0>4</PLMN_MNC0>
-                  <PLMN_MNC1>8</PLMN_MNC1>
+                  <PLMN_MNC0>0</PLMN_MNC0>
+                  <PLMN_MNC1>1</PLMN_MNC1>
                   <PLMN_MNC2>0</PLMN_MNC2>
                </MNC>
             </PLMN>
             <EXT_PLMN>
                <MCC>
-                  <PLMN_MCC0>3</PLMN_MCC0>
-                  <PLMN_MCC1>1</PLMN_MCC1>
+                  <PLMN_MCC0>0</PLMN_MCC0>
+                  <PLMN_MCC1>0</PLMN_MCC1>
                   <PLMN_MCC2>1</PLMN_MCC2>
                </MCC>
                <MNC>
-                  <PLMN_MNC0>4</PLMN_MNC0>
-                  <PLMN_MNC1>8</PLMN_MNC1>
+                  <PLMN_MNC0>0</PLMN_MNC0>
+                  <PLMN_MNC1>1</PLMN_MNC1>
                   <PLMN_MNC2>0</PLMN_MNC2>
                </MNC>
             </EXT_PLMN>
    <MAC_CELL_CFG>
       <CELL_ID>1</CELL_ID>
       <CARRIER_CFG>
-         <DL_BW>100</DL_BW>
+         <DL_BW>273</DL_BW>
          <NR_DL_ARFCN>623400</NR_DL_ARFCN>
-         <UL_BW>100</UL_BW>
+         <UL_BW>273</UL_BW>
          <NR_UL_ARFCN>623400</NR_UL_ARFCN>
-         <NUM_TX_ANT>1</NUM_TX_ANT>
-         <NUM_RX_ANT>1</NUM_RX_ANT>
+         <NUM_TX_ANT>2</NUM_TX_ANT>
+         <NUM_RX_ANT>2</NUM_RX_ANT>
       </CARRIER_CFG>
       <CELL_CFG>
          <MAC_OP_STATE>0</MAC_OP_STATE><!--OP_DISABLED-->
          <PLMN_INFO>
             <PLMN>
                <MCC>
-                  <PLMN_MCC0>3</PLMN_MCC0>
-                  <PLMN_MCC1>1</PLMN_MCC1>
+                  <PLMN_MCC0>0</PLMN_MCC0>
+                  <PLMN_MCC1>0</PLMN_MCC1>
                   <PLMN_MCC2>1</PLMN_MCC2>
                </MCC>
                <MNC>
-                  <PLMN_MNC0>4</PLMN_MNC0>
-                  <PLMN_MNC1>8</PLMN_MNC1>
+                  <PLMN_MNC0>0</PLMN_MNC0>
+                  <PLMN_MNC1>1</PLMN_MNC1>
                   <PLMN_MNC2>0</PLMN_MNC2>
                </MNC>
             </PLMN>
          <RRM_POLICY_MEMBER_LIST>
             <PLMN>
                <MCC>
-                  <PLMN_MCC0>3</PLMN_MCC0>
-                  <PLMN_MCC1>1</PLMN_MCC1>
+                  <PLMN_MCC0>0</PLMN_MCC0>
+                  <PLMN_MCC1>0</PLMN_MCC1>
                   <PLMN_MCC2>1</PLMN_MCC2>
                </MCC>
                <MNC>
-                  <PLMN_MNC0>4</PLMN_MNC0>
-                  <PLMN_MNC1>8</PLMN_MNC1>
+                  <PLMN_MNC0>0</PLMN_MNC0>
+                  <PLMN_MNC1>1</PLMN_MNC1>
                   <PLMN_MNC2>0</PLMN_MNC2>
                </MNC>
             </PLMN>
index 6e2d844..7bd1de8 100644 (file)
@@ -1333,7 +1333,11 @@ uint8_t fillDuSrvdCellSysInfo(F1DuSysInfo *sysInfo)
    sysInfo->mibLen = encBufSize;
 
    /* GNB DU System Info SIB1 msg */
+#ifdef OAI_TESTING
+   BuildSib1MsgForF1AP();
+#else
    BuildSib1Msg();
+#endif
    DU_ALLOC(sysInfo->sib1Msg, encBufSize);
    if(!(sysInfo->sib1Msg))
    {
@@ -2349,6 +2353,12 @@ uint8_t parseSib1CellCfg(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, Sib1CellCfg
       cur = cur -> next;
    }
 
+#ifdef OAI_TESTING
+   BuildSib1Msg();
+   DU_ALLOC_SHRABL_BUF(sib1CellCfg->sib1Pdu,encBufSize);
+   memcpy(sib1CellCfg->sib1Pdu, encBuf,encBufSize);
+   sib1CellCfg->sib1PduLen = encBufSize;
+#else
    sib1CellCfg->sib1PduLen = duCfgParam.srvdCellLst[0].duSysInfo.sib1Len;
    if(sib1CellCfg->sib1PduLen > 0)
    {
@@ -2360,6 +2370,7 @@ uint8_t parseSib1CellCfg(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, Sib1CellCfg
       }
       memcpy(sib1CellCfg->sib1Pdu, duCfgParam.srvdCellLst[0].duSysInfo.sib1Msg, sib1CellCfg->sib1PduLen);
    }
+#endif
    return ROK;
 }
 
index 637e73a..180f3cf 100644 (file)
@@ -550,7 +550,7 @@ uint8_t fillNrTddInfo(TDD_Info_t *tddInfo)
 
       freqInfo->freqBandListNr.list.array[freqBandListIdx]->freqBandIndicatorNr = duCfgParam.srvdCellLst[0].duCellInfo.\
       f1Mode.mode.tdd.nrFreqInfo.freqBand[0].nrFreqBand;
-
+#ifndef OAI_TESTING
       freqInfo->freqBandListNr.list.array[freqBandListIdx]->supportedSULBandList.list.count = elementCnt;
       freqInfo->freqBandListNr.list.array[freqBandListIdx]->supportedSULBandList.list.size = freqInfo->freqBandListNr.list.array[freqBandListIdx]->\
       supportedSULBandList.list.count * sizeof(SupportedSULFreqBandItem_t*);
@@ -576,8 +576,8 @@ uint8_t fillNrTddInfo(TDD_Info_t *tddInfo)
          freqInfo->freqBandListNr.list.array[freqBandListIdx]->supportedSULBandList.list.array[supportedBandIdx]->freqBandIndicatorNr =\
          duCfgParam.srvdCellLst[0].duCellInfo.f1Mode.mode.tdd.nrFreqInfo.freqBand[0].sulBand[0];
       }
+#endif
    }
-
    tddInfo->transmission_Bandwidth.nRSCS = duCfgParam.srvdCellLst[0].duCellInfo.f1Mode.mode.tdd.nrFreqInfo.sulInfo.sulTxBw.nrScs;
    tddInfo->transmission_Bandwidth.nRNRB = duCfgParam.srvdCellLst[0].duCellInfo.f1Mode.mode.tdd.nrFreqInfo.sulInfo.sulTxBw.nrb;
 
index 374ab50..fb299b8 100644 (file)
@@ -871,7 +871,7 @@ uint8_t sctpSend(Buffer *mBuf, uint8_t itfType)
 #ifdef CALL_FLOW_DEBUG_LOG
       DU_LOG("\nCall Flow: ENTSCTP -> CU : EVENT_F1AP_MSG_TO_CU\n");
 #endif
-      ret = cmInetSctpSendMsg(&f1Params.sockFd, &f1Params.destIpNetAddr, f1Params.destPort, &memInfo, mBuf, &len, 0, FALSE, 0, 0/*SCT_PROTID_NONE*/, RWOULDBLOCK);
+      ret = cmInetSctpSendMsg(&f1Params.sockFd, &f1Params.destIpNetAddr, f1Params.destPort, &memInfo, mBuf, &len, 0, FALSE, 0, 62, RWOULDBLOCK);
    }
 
    if(itfType == E2_INTERFACE)
index 3c7eff2..9da52d7 100644 (file)
@@ -2386,6 +2386,153 @@ uint8_t BuildUeTimerAndConstants(UE_TimersAndConstants_t *ue_TimersAndConstants)
    return ROK; 
 }
 
+#ifdef OAI_TESTING
+uint8_t BuildSib1MsgForF1AP()
+{
+   SIB1_t                   *sib1Msg;
+   CellAccessRelatedInfo_t  *cellAccessInfo;
+   uint8_t                  elementCnt;
+   uint8_t                  ret1;
+   asn_enc_rval_t           encRetVal; 
+   uint8_t                  ret = RFAILED;
+
+   do
+   {
+      DU_ALLOC(sib1Msg, sizeof(SIB1_t));
+
+      elementCnt = ODU_VALUE_ONE;
+
+      /* Cell Selection Info */
+#if 0
+      DU_ALLOC(sib1Msg->cellSelectionInfo, sizeof(struct SIB1__cellSelectionInfo));
+      if(!sib1Msg->cellSelectionInfo)
+      {
+         DU_LOG("\nERROR  -->  DU APP: SIB1 Cell Selection Info memory allocation failed");
+         break;
+      }
+
+      sib1Msg->cellSelectionInfo->q_RxLevMin = 0;
+
+      DU_ALLOC(sib1Msg->cellSelectionInfo->q_RxLevMinSUL, sizeof(Q_RxLevMin_t));
+      if(!sib1Msg->cellSelectionInfo->q_RxLevMinSUL)
+      {
+         DU_LOG("\nERROR  -->  DU APP: BuildSib1Msg(): Memory allocation failed for q_RxLevMinSUL");
+         break;
+      }
+      *(sib1Msg->cellSelectionInfo->q_RxLevMinSUL) = -50;
+
+      DU_ALLOC(sib1Msg->cellSelectionInfo->q_QualMin, sizeof(Q_QualMin_t));
+      if(!sib1Msg->cellSelectionInfo->q_QualMin)
+      {
+         DU_LOG("\nERROR  -->  DU APP: BuildSib1Msg(): Memory allocation failed for q_QualMin");
+         break;
+      }
+      *(sib1Msg->cellSelectionInfo->q_QualMin) = -30;
+#endif 
+      /* PLMN list */
+      cellAccessInfo = &sib1Msg->cellAccessRelatedInfo;
+      cellAccessInfo->plmn_IdentityList.list.count = elementCnt;
+      cellAccessInfo->plmn_IdentityList.list.size = elementCnt * sizeof(PLMN_IdentityInfo_t *);
+
+      ret1 =  BuildPlmnList(cellAccessInfo);
+      if(ret1 != ROK)
+      {
+         break;
+      }
+      /* Connection Establish Failure Control */
+      DU_ALLOC(sib1Msg->connEstFailureControl, sizeof(ConnEstFailureControl_t));
+      if(!sib1Msg->connEstFailureControl)
+      {
+         DU_LOG("\nERROR  -->  DU APP: sib1Msg->connEstFailureControl memory allocation failure");
+         break;
+      }
+      sib1Msg->connEstFailureControl->connEstFailCount = duCfgParam.sib1Params.connEstFailCnt;
+      sib1Msg->connEstFailureControl->connEstFailOffsetValidity = duCfgParam.sib1Params.connEstFailOffValidity;
+      
+      DU_ALLOC(sib1Msg->connEstFailureControl->connEstFailOffset, sizeof(long));
+      if(!sib1Msg->connEstFailureControl->connEstFailOffset)
+      {
+         DU_LOG("\nERROR  -->  DU APP: BuildSib1Msg(): Memory allocation failed for connEstFailOffset");
+         break;
+      }
+      *(sib1Msg->connEstFailureControl->connEstFailOffset) = duCfgParam.sib1Params.connEstFailOffset;
+
+      /* SI Scheduling Info */
+      DU_ALLOC(sib1Msg->si_SchedulingInfo, sizeof(SI_SchedulingInfo_t));
+      if(!sib1Msg->si_SchedulingInfo)
+      {
+         DU_LOG("\nERROR  -->  DU APP: sib1Msg->si_SchedulingInfo memory allocation failure");
+         break;
+      } 
+      elementCnt = ODU_VALUE_ONE;
+      sib1Msg->si_SchedulingInfo->schedulingInfoList.list.count = elementCnt;
+      sib1Msg->si_SchedulingInfo->schedulingInfoList.list.size = elementCnt *
+         sizeof(struct SchedulingInfo *);
+      ret1 = BuildSiSchedInfoList(&sib1Msg->si_SchedulingInfo->schedulingInfoList);
+      if(ret1 != ROK)
+      {
+         break;
+      }
+      sib1Msg->si_SchedulingInfo->si_WindowLength = duCfgParam.sib1Params.siSchedInfo.winLen;
+
+      /* Serving Cell Config Common */
+      DU_ALLOC(sib1Msg->servingCellConfigCommon, sizeof(ServingCellConfigCommonSIB_t));
+      if(!sib1Msg->servingCellConfigCommon)
+      {
+         DU_LOG("\nERROR  -->  DU APP: sib1Msg->servingCellConfigCommon memory allocation failure");
+         break;
+      }
+      ret1 =  BuildServCellCfgCommonSib(sib1Msg->servingCellConfigCommon);
+      if(ret1 != ROK)
+      {
+         break;
+      }
+      DU_ALLOC(sib1Msg->ue_TimersAndConstants, sizeof(UE_TimersAndConstants_t));
+      ret1 = BuildUeTimerAndConstants(sib1Msg->ue_TimersAndConstants);
+#if 0
+      DU_ALLOC(sib1Msg->uac_BarringInfo, sizeof(struct SIB1__uac_BarringInfo));
+      DU_ALLOC(sib1Msg->uac_BarringInfo->uac_BarringPerPLMN_List, sizeof(struct UAC_BarringPerPLMN_List));
+      sib1Msg->uac_BarringInfo->uac_BarringPerPLMN_List->list.count = 1;
+      sib1Msg->uac_BarringInfo->uac_BarringPerPLMN_List->list.size = sizeof(struct UAC_BarringPerPLMN *);
+     DU_ALLOC(sib1Msg->uac_BarringInfo->uac_BarringPerPLMN_List->list.array,sib1Msg->uac_BarringInfo->uac_BarringPerPLMN_List->list.size);
+     DU_ALLOC(sib1Msg->uac_BarringInfo->uac_BarringPerPLMN_List->list.array[0], sizeof(struct UAC_BarringPerPLMN));
+    sib1Msg->uac_BarringInfo->uac_BarringPerPLMN_List->list.array[0]->plmn_IdentityIndex = 0;
+
+    DU_ALLOC(sib1Msg->useFullResumeID, sizeof(long));
+    *sib1Msg->useFullResumeID = 0;
+#endif
+    xer_fprint(stdout, &asn_DEF_SIB1, sib1Msg);
+
+      /* Encode the F1SetupRequest type as APER */
+      memset(encBuf, 0, ENC_BUF_MAX_LEN);
+      encBufSize = 0;
+      encRetVal = uper_encode(&asn_DEF_SIB1, 0, sib1Msg, PrepFinalEncBuf,\
+            encBuf);
+      printf("\nencbufSize: %d\n", encBufSize);
+      if(encRetVal.encoded == -1)
+      {
+         DU_LOG("\nERROR  -->  DU APP : Could not encode SIB1 structure (at %s)\n",\
+               encRetVal.failed_type ?
+               encRetVal.failed_type->name :
+               "unknown");
+         break;
+      }
+#ifdef DEBUG_ASN_PRINT
+      for(int i=0; i< encBufSize; i++)
+      {
+         printf("%x\t",encBuf[i]);
+      }
+      printf("\n");
+#endif
+      
+      ret = ROK;
+      break; 
+   }while(true);
+
+   FreeSib1Msg(sib1Msg);
+   return ret;
+}
+#endif
 /*******************************************************************
  *
  * @brief Builds SIB message in Served Cell Info
index ba0b330..456dfe4 100644 (file)
@@ -32,6 +32,9 @@
 uint8_t BuildMibPdu();
 uint8_t BuildMibMsg();
 uint8_t BuildSib1Msg();
+#ifdef OAI_TESTING
+uint8_t BuildSib1MsgForF1AP();
+#endif
 uint8_t BuildBwpDlCommon(BWP_DownlinkCommon_t *bwp);
 uint8_t BuildBwpUlCommon(BWP_UplinkCommon_t *bwp);
 uint8_t BuildTddUlDlCfgComm(TDD_UL_DL_ConfigCommon_t *tddCfg);