Revert "[Epic-ID: ODUHIGH-576][Task-ID: ODUHIGH-579] | Databse Creation" 84/12484/3
authorSangeeta Vaidhyanathan <svaidhya@radisys.com>
Mon, 22 Apr 2024 08:00:40 +0000 (08:00 +0000)
committerSangeeta Vaidhyanathan <svaidhya@radisys.com>
Mon, 22 Apr 2024 10:04:06 +0000 (10:04 +0000)
This reverts commit 5f7e53d8154a1c526845f7b384ee4325e6bc642f.

Reason for revert: Wrongly Uploaded in Master Branch

Change-Id: Ie3209ecfb44ba1ff07c48ecca525415d29c3b3c7
Signed-off-by: svaidhya <svaidhya@radisys.com>
src/5gnrmac/lwr_mac_nfapi.h [deleted file]
src/du_app/du_sctp.c
src/du_app/du_sctp.h

diff --git a/src/5gnrmac/lwr_mac_nfapi.h b/src/5gnrmac/lwr_mac_nfapi.h
deleted file mode 100644 (file)
index 199f5bb..0000000
+++ /dev/null
@@ -1,85 +0,0 @@
- /*******************************************************************************
- ################################################################################
- #   Copyright (c) [2017-2019] [Radisys]                                        #
- #                                                                              #
- #   Licensed under the Apache License, Version 2.0 (the "License");            #
- #   you may not use this file except in compliance with the License.           #
- #   You may obtain a copy of the License at                                    #
- #                                                                              #
- #       http://www.apache.org/licenses/LICENSE-2.0                             #
- #                                                                              #
- #   Unless required by applicable law or agreed to in writing, software        #
- #   distributed under the License is distributed on an "AS IS" BASIS,          #
- #   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   #
- #   See the License for the specific language governing permissions and        #
- #   limitations under the License.                                             #
- ################################################################################
- *******************************************************************************/
-
- #ifndef _LWR_MAC_NFAPI_H_
- #define _LWR_MAC_NFAPI_H_
-
-#include "nfapi_interface.h"
-
-typedef struct nfapiTransportInfo
-{
-   uint32_t         assocId;
-   uint8_t          srcIpv4Address[4];   /*Src :: PNF Address Details*/
-   uint16_t         srcIpv4Port;          
-   uint8_t          destIpv4Address[4];  /*Dest :: VNF Address Details*/
-   uint16_t         destIpv4Port;
-   CmInetFd         sockFd;           /* Socket file descriptor */
-   CmInetNetAddrLst addrLst;      /* Refers to the destinaiton Addr Lst in CmInetNetAddrLst format */
-   CmInetNetAddr    ipNetAddr;    /* Refers to the destination Addr in CmInetNet Addr format */
-   
-   /*TODO: later also add the IPV6 support*/
-
-}NfapiTransportInfo;
-
-typedef struct nfapiTimingInfo
-{
-   uint32_t  dl_tti_offset;
-   uint32_t  ul_tti_offset;
-   uint32_t  ul_dci_offset;
-   uint32_t  tx_data_offset;
-   uint16_t  timingWindow;
-   uint8_t   timingInfoMode;
-
-}NfapiTimingInfo;
-
-typedef struct nfapiPnfConfig
-{
-   nFapi_pnf_state  pnfState;
-   uint16_t         max_phys;
-   NfapiTimingInfo  vnfTimingCfg;
-}NfapiPnfConfig;
-
-typedef struct nfapiSyncInfo
-{
-    uint8_t   phyId;
-    uint8_t   inSync;
-    uint32_t  prev_t1;
-    uint32_t  prev_t2;
-    uint32_t  prev_t3;
-    uint8_t       sfn;
-    uint8_t       slot;
-    NfapiSyncInfo *next;
-}NfapiSyncInfo;
-
-typedef struct nfapiP7VnfInfo
-{
-   uint32_t      sfnStartTime;
-   uint32_t      slotStartTime;
-   NfapiSyncInfo *p7SyncInfo;
-}NfapiP7VnfInfo;
-
-typedef struct nfapiVnfDb
-{
-   NfapiTransportInfo  p5TransInfo;
-   NfapiTransportInfo  p7TransInfo;
-   NfapiPnfConfig      pnfConfig;
-   NfapiSyncInfo       vnfSynchInfo;
-   NfapiP7VnfInfo      vnfP7Info;   
-}NfapiVnfDb;
-
- #endif
index f4c7499..374ab50 100644 (file)
@@ -222,6 +222,7 @@ uint8_t duSctpCfgReq(SctpParams sctpCfg)
    f1Params.destPort             = sctpCfg.cuPort;
    f1Params.itfState             = DU_SCTP_DOWN;
    f1Params.srcPort              = sctpCfg.duPort[F1_INTERFACE];
+   f1Params.recvMsgSet           = ROK;
    memset (&f1Params.sockFd, -1, sizeof(CmInetFd));
    fillDestNetAddr(&f1Params.destIpNetAddr, &f1Params.destIpAddr);
    fillAddrLst(&f1Params.destAddrLst, &f1Params.destIpAddr);
@@ -232,6 +233,7 @@ uint8_t duSctpCfgReq(SctpParams sctpCfg)
    ricParams.destPort            = sctpCfg.ricPort;
    ricParams.itfState            = DU_SCTP_DOWN;
    ricParams.srcPort             = sctpCfg.duPort[E2_INTERFACE];
+   ricParams.recvMsgSet          = ROK;
    memset (&ricParams.sockFd, -1, sizeof(CmInetFd));
    fillDestNetAddr(&ricParams.destIpNetAddr, &ricParams.destIpAddr);
    fillAddrLst(&ricParams.destAddrLst, &ricParams.destIpAddr);
@@ -690,14 +692,14 @@ uint8_t sctpNtfyHdlr(CmInetSctpNotification *ntfy, uint8_t *itfState, uint8_t in
  * @params[in]  Params required for polling
  * @params[in]  SockFd for file descriptor
  * @params[in]  timeoutPtr indicates the timeout value
- * @params[in]  MemInfo
+ * @params[in]  MemInfo, recvMsgSet
  *
  * @return ROK     - success
  *         RFAILED - failure
  *
  * ****************************************************************/
 
-uint8_t  processPolling(sctpSockPollParams *pollParams, CmInetFd *sockFd, uint32_t *timeoutPtr, CmInetMemInfo *memInfo)
+uint8_t  processPolling(sctpSockPollParams *pollParams, CmInetFd *sockFd, uint32_t *timeoutPtr, CmInetMemInfo *memInfo, bool recvMsgSet)
 {
    uint8_t ret = ROK;
    CM_INET_FD_SET(sockFd, &pollParams->readFd);
@@ -710,6 +712,8 @@ uint8_t  processPolling(sctpSockPollParams *pollParams, CmInetFd *sockFd, uint32
       if(ret != ROK)
       {
          DU_LOG("\nERROR   -->  SCTP: Failed to receive sctp msg for sockFd[%d]\n", sockFd->fd);
+         recvMsgSet = RFAILED;
       }
       else
       {
@@ -758,7 +762,7 @@ uint8_t  processPolling(sctpSockPollParams *pollParams, CmInetFd *sockFd, uint32
          }
       }
   }
-  return ret;
+  return ROK;
 }
 /*******************************************************************
  *
@@ -809,14 +813,14 @@ uint8_t sctpSockPoll()
    {
       if(f1Params.itfState)
       {
-         if((ret = processPolling(&f1PollParams, &f1Params.sockFd, timeout_Ptr, &memInfo)) != ROK)
+         if((ret = processPolling(&f1PollParams, &f1Params.sockFd, timeout_Ptr, &memInfo, f1Params.recvMsgSet)) != ROK)
          {
             DU_LOG("\nERROR  -->  SCTP : Failed to RecvMsg for F1\n");
          }
       }
       if(ricParams.itfState)
       {
-         if((ret = processPolling(&e2PollParams, &ricParams.sockFd, timeout_Ptr, &memInfo)) != ROK)
+         if((ret = processPolling(&e2PollParams, &ricParams.sockFd, timeout_Ptr, &memInfo, ricParams.recvMsgSet)) != ROK)
          {
             DU_LOG("\nERROR  -->  SCTP : Failed to RecvMsg for E2\n");
          }
index 0b5d36f..94e0c0c 100644 (file)
@@ -53,6 +53,7 @@ typedef struct
    uint16_t              destPort;         /* Refers to the destination port of F1/E2 */
    uint16_t              srcPort;          /* Refers to respective src port of DU */
    uint32_t              assocId;          
+   bool             recvMsgSet;
    F1IpAddr         destIpAddr;       /* Refers to te destination Ip Address */
    CmInetFd         sockFd;           /* Socket file descriptor */
    CmInetNetAddrLst destAddrLst;      /* Refers to the destinaiton Addr Lst in CmInetNetAddrLst format */
@@ -76,7 +77,7 @@ uint8_t establishReq(DuSctpDestCb *paramPtr);
 uint8_t duSctpAssocReq(uint8_t itfType);
 uint8_t duFillSctpPst(Pst *pst, Event event);
 uint8_t sctpSetSockOpts(CmInetFd *sock_Fd);
-uint8_t processPolling(sctpSockPollParams *pollParams, CmInetFd *sockFd, uint32_t *timeoutPtr, CmInetMemInfo *memInfo);
+uint8_t processPolling(sctpSockPollParams *pollParams, CmInetFd *sockFd, uint32_t *timeoutPtr, CmInetMemInfo *memInfo, bool recvMsgSet);
 uint8_t sctpSockPoll();
 
 #endif