1 /*******************************************************************************
2 ################################################################################
3 # Copyright (c) [2017-2019] [Radisys] #
5 # Licensed under the Apache License, Version 2.0 (the "License"); #
6 # you may not use this file except in compliance with the License. #
7 # You may obtain a copy of the License at #
9 # http://www.apache.org/licenses/LICENSE-2.0 #
11 # Unless required by applicable law or agreed to in writing, software #
12 # distributed under the License is distributed on an "AS IS" BASIS, #
13 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. #
14 # See the License for the specific language governing permissions and #
15 # limitations under the License. #
16 ################################################################################
17 *******************************************************************************/
19 /********************************************************************20**
21 Name: LTE-RLC Layer - Upper Interface
25 Desc: C source code for the upper interface of LTE-RLC
29 *********************************************************************21*/
30 static const char* RLOG_MODULE_NAME="UIM";
31 static int RLOG_MODULE_ID=2048;
32 static int RLOG_FILE_ID=199;
35 @brief RLC Upper Interface
39 /* header (.h) include files */
40 #include "envopt.h" /* environment options */
41 #include "envdep.h" /* environment dependent */
42 #include "envind.h" /* environment independent */
44 #include "gen.h" /* general */
45 #include "ssi.h" /* system services */
46 #include "cm5.h" /* common timer defines */
47 #include "cm_tkns.h" /* common tokens defines */
48 #include "cm_mblk.h" /* common memory allocation library defines */
49 #include "cm_llist.h" /* common link list defines */
50 #include "cm_hash.h" /* common hash list defines */
51 #include "cm_lte.h" /* common LTE defines */
52 #include "lkw.h" /* LKW defines */
53 #include "ckw.h" /* CKW defines */
54 #include "kwu.h" /* KWU defines */
55 #include "rgu.h" /* RGU defines */
58 #include "kw_env.h" /* RLC environment options */
59 #include "kw.h" /* RLC defines */
61 /* extern (.x) include files */
62 #include "gen.x" /* general */
63 #include "ssi.x" /* system services */
65 #include "cm5.x" /* common timer library */
66 #include "cm_tkns.x" /* common tokens */
67 #include "cm_mblk.x" /* common memory allocation */
68 #include "cm_llist.x" /* common link list */
69 #include "cm_hash.x" /* common hash list */
70 #include "cm_lte.x" /* common LTE includes */
71 #include "cm_lib.x" /* common memory allocation library */
72 #include "lkw.x" /* LKW */
73 #include "ckw.x" /* CKW */
74 #include "kwu.x" /* KWU */
75 #include "rgu.x" /* RGU */
76 #if defined(MAC_RLC_UL_RBUF) || (defined(L2_L3_SPLIT) && defined(ICC_RECV_TSK_RBUF)) || defined(SS_RBUF)
81 #if defined(L2_L3_SPLIT) && defined(ICC_RECV_TSK_RBUF)
82 #include "mt_plat_t33.h"
83 #include "mt_plat_t33.x"
107 #endif /* __cplusplus */
110 /*********************************************************************
111 * Forward Declartion for KWU Porting Functions
112 ********************************************************************/
113 #if defined(PDCP_RLC_DL_RBUF) || defined(SS_RBUF)
114 PUBLIC S16 kwDlBatchProc ARGS ((Void));
115 PUBLIC S16 kwUtlDlFreeRlcRBuf ARGS((Void));
116 EXTERN void kwUtlDlBatchProcHqStaInd ARGS ((Void));
117 EXTERN Void kwUtlFreeDlMem ARGS((Void));
118 EXTERN SsRngBufCnt rngCb;
119 EXTERN S16 kwUtlDlBatchProcPkts ARGS((Void));
122 #if (defined(L2_L3_SPLIT) && defined(ICC_RECV_TSK_RBUF))
123 PUBLIC S16 kwDlBatchProcSplit ARGS((Void));
127 /*********************************************************************
128 * Primitives for KWU interface
129 ********************************************************************/
131 /* KWU Bind Confirm primitive */
133 PUBLIC KwuBndCfm kwUiKwuBndCfmMt[] =
136 cmPkKwuBndCfm, /* 0 - loosely coupled */
137 #endif /* LCKWUIKWU */
139 NhLiKwuBndCfm, /* 1 - tightly coupled, RRC */
143 PjLiKwuBndCfm, /* 2 - tightly coupled, PDCP */
148 cmPkKwuBndCfm, /* 3 - light weight loosely coupled */
149 #endif /* LCKWUIKWU */
153 /* KWU Data Indication primitive */
155 PUBLIC KwuDatInd kwUiKwuDatIndMt[] =
158 cmPkKwuDatInd, /* 0 - loosely coupled */
159 #endif /* LCKWUIKWU */
161 NhLiKwuDatInd, /* 1 - tightly coupled, RRC */
166 PjLiKwuDatInd, /* 2 - tightly coupled, PDCP */
170 cmPkKwuDatInd, /* 3 - light weight loosely coupled */
171 #endif /* LCKWUIKWU */
177 PUBLIC KwuDatCfm kwUiKwuDatCfmMt[] =
180 cmPkKwuDatCfm, /* 0 - loosely coupled */
181 #endif /* LCKWUIKWU */
183 PjLiKwuDatCfm, /* 2 - tightly coupled, PDCP */
187 cmPkKwuDatCfm, /* 3 - light weight loosely coupled */
188 #endif /* LCKWUIKWU */
192 /* KWU AM Status Indication primitive */
194 PUBLIC KwuStaInd kwUiKwuStaIndMt[] =
197 cmPkKwuStaInd, /* 0 - loosely coupled */
198 #endif /* LCKWUIKWU */
200 PjLiKwuStaInd, /* 2 - tightly coupled, PDCP */
204 cmPkKwuStaInd, /* 3 - light weight loosely coupled */
205 #endif /* LCKWUIKWU */
209 PUBLIC KwuReEstCmpInd kwUiKwuReEstCmpIndMt[] =
212 cmPkKwuReEstCmpInd, /* 0 - loosely coupled */
213 #endif /* LCKWUIKWU */
215 PjLiKwuReEstCmpInd, /* 2 - tightly coupled, PDCP */
220 cmPkKwuReEstCmpInd, /* 3 - light weight loosely coupled */
221 #endif /* LCKWUIKWU */
225 /* kw005.201 added support for L2 measurement */
226 PUBLIC KwuDiscSduCfm kwUiKwuDiscSduCfmMt[] =
229 cmPkKwuDiscSduCfm, /* 0 - loosely coupled */
230 #endif /* LCKWUIKWU */
232 PjLiKwuDiscSduCfm, /* 2 - tightly coupled, PDCP */
236 cmPkKwuDiscSduCfm, /* 3 - light weight loosely coupled */
240 PUBLIC KwuFlowCntrlInd kwUiKwuFlowCntrlIndMt[] =
243 cmPkKwuFlowCntrlInd, /* 0 - loosely coupled */
244 #endif /* LCKWUIKWU */
246 PjLiKwuFlowCntrlInd, /* 2 - tightly coupled, PDCP */
249 cmPkKwuFlowCntrlInd, /* 3 - light weight loosely coupled */
250 #endif /* LCKWUIKWU */
253 PUBLIC KwuDatAckInd kwUiKwuDatAckIndMt[] =
256 cmPkKwuDatAckInd, /* 0 - loosely coupled */
257 #endif /* LCKWUIKWU */
259 PjLiKwuDatAckInd, /* 2 - tightly coupled, PDCP */
263 cmPkKwuDatAckInd, /* 3 - light weight loosely coupled, portable */
267 #endif /* LTE_L2_MEAS */
268 /* KWU AM Data confirm primitive */
273 /****************************************************************************
274 * KWU Interface Mt functions
275 ***************************************************************************/
\f
280 * Handler for confirming the bind request received from KWU
285 * This function send the bind confirm primitive to the RLC user,
286 * when it receives a bind request from its service user.
288 * @param[in] pst Post structure
289 * @param[in] suId Service user SAP ID
290 * @param[in] status Status of Confirmation
297 PUBLIC S16 KwUiKwuBndCfm
299 Pst *pst, /* post structure */
300 SuId suId, /* Service User Id */
301 U8 status /* Status */
304 PUBLIC S16 KwUiKwuBndCfm(pst, suId, status)
305 Pst *pst; /* post structure */
306 SuId suId; /* Service User Id */
307 U8 status; /* Status */
312 /* jump to specific primitive depending on configured selector */
313 (*kwUiKwuBndCfmMt[pst->selector])(pst, suId, status);
317 } /* end of KwUiKwuBndCfm */
324 * Handler for sending the data(SDU) from upper layer.
328 * This function is used to transfer a SDU received from the peer
329 * RLC entity to the service user(RRC/PDCP).
331 * @param[in] pst Post structure
332 * @param[in] suId Service User SAP ID
333 * @param[in] datIndInfo Data Request Information
334 * @param[in] mBuf Data Buffer (SDU)
341 PUBLIC S16 KwUiKwuDatInd
344 KwuDatIndInfo *datInd,
348 PUBLIC S16 KwUiKwuDatInd(pst, datInd, mBuf)
350 KwuDatIndInfo *datInd;
356 /* jump to specific primitive depending on configured selector */
357 (*kwUiKwuDatIndMt[pst->selector])(pst, datInd, mBuf);
361 } /* end of KwUiKwuDatInd */
363 PUBLIC int rlcDatCfmsSent = 0;
370 * Handler for sending the data confirmation to upper layer.
374 * This function is used to send a confirmation to the service
375 * user about the data received by the peer RLC entity.
377 * @param[in] pst Post structure
378 * @param[in] suId Service User SAP ID
379 * @param[in] datCfmInfo Data Confirmation Information
386 PUBLIC S16 KwUiKwuDatCfm
390 KwuDatCfmInfo *datCfm
393 PUBLIC S16 KwUiKwuDatCfm(pst, suId, datCfm)
396 KwuDatCfmInfo *datCfm;
402 /* jump to specific primitive depending on configured selector */
403 (*kwUiKwuDatCfmMt[pst->selector])(pst, suId, datCfm);
407 } /* end of KwUiKwuDatCfm */
414 * Handler for sending the Status Indication to the upper layer.
418 * This function is used only by RLC AM entity.It send status
419 * indication to the upper layer about the maximum number of
420 * re-transmissions reached for a RLC AM entity.
422 * @param[in] pst Post structure
423 * @param[in] suId Service User SAP ID
424 * @param[in] staInd RLC Entity Id
431 PUBLIC S16 KwUiKwuStaInd
435 KwuStaIndInfo *staInd
438 PUBLIC S16 KwUiKwuStaInd(pst, suId, staInd)
441 KwuStaIndInfo *staInd;
446 /* jump to specific primitive depending on configured selector */
447 (*kwUiKwuStaIndMt[pst->selector])(pst, suId, staInd);
451 } /* end of KwUiKwuStaInd */
458 * Handler for sending the Status Indication to the upper layer.
462 * This function is used only by RLC AM entity.It send status
463 * indication to the upper layer about the maximum number of
464 * re-transmissions reached for a RLC AM entity.
466 * @param[in] pst Post structure
467 * @param[in] suId Service User SAP ID
468 * @param[in] staInd RLC Entity Id
475 PUBLIC S16 KwUiKwuReEstCmpInd
482 PUBLIC S16 KwUiKwuReEstCmpInd(pst, suId, rlcId)
488 TRC3(KwUiKwuReEstCmpInd)
489 RLOG0(L_DEBUG, "In KwUiKwuReEstCmpInd");
491 /* jump to specific primitive depending on configured selector */
492 (*kwUiKwuReEstCmpIndMt[pst->selector])(pst, suId, rlcId);
496 } /* end of KwUiKwuReEstCmpInd */
497 /* kw005.201 added support for L2 Measurement */
503 * Handler for sending the Sdu Disc Cfm to the upper layer.
507 * This function confirms the discard of an SDU .
509 * @param[in] pst Post structure
510 * @param[in] suId Service User SAP ID
511 * @param[in] discCfm Disc information.
518 PUBLIC S16 KwUiKwuDiscSduCfm
522 KwuDiscSduInfo *discCfm
525 PUBLIC S16 KwUiKwuDiscSduCfm(pst, suId, discCfm)
528 KwuDiscSduInfo *discCfm;
531 TRC3(KwUiKwuDiscSduCfm)
533 /* jump to specific primitive depending on configured selector */
534 (*kwUiKwuDiscSduCfmMt[pst->selector])(pst, suId, discCfm);
538 } /* end of KwUiKwuDiscSduCfm */
544 * Handler for sending Flow indication to the upper layer.
548 * This function indicates to PDCP if packets need to be stopped or
549 * started for a particular RB
551 * @param[in] pst Post structure
552 * @param[in] suId Service User SAP ID
553 * @param[in] flowCntrlIndInfo Flow control information.
560 PUBLIC S16 KwUiKwuFlowCntrlInd
564 KwuFlowCntrlIndInfo *flowCntrlIndInfo
567 PUBLIC S16 KwUiKwuFlowCntrlInd(pst, suId, flowCntrlIndInfo)
570 KwuFlowCntrlIndInfo *flowCntrlIndInfo;
573 TRC3(KwUiKwuFlowCntrlInd)
575 /* jump to specific primitive depending on configured selector */
576 (*kwUiKwuFlowCntrlIndMt[pst->selector])(pst, suId, flowCntrlIndInfo);
580 } /* end of KwUiKwuFlowCntrlInd */
587 * Handler for sending the Data ack indication to the upper layer.
591 * This function confirms the succesfull transmission of SDU
593 * @param[in] pst Post structure
594 * @param[in] suId Service User SAP ID
595 * @param[in] datAckInd DatAckInd
602 PUBLIC S16 KwUiKwuDatAckInd
606 KwuDatAckInfo *datAckInd
609 PUBLIC S16 KwUiKwuDatAckInd(pst, suId, datAckInd)
612 KwuDatAckInfo *datAckInd;
615 TRC3(KwUiKwuDatAckInd)
617 /* jump to specific primitive depending on configured selector */
618 (*kwUiKwuDatAckIndMt[pst->selector])(pst, suId, datAckInd);
622 } /* end of KwUiKwuDatAckInd */
623 #endif /* LTE_L2_MEAS */
628 /*********************************************************************
629 * Primitives for CKW interface
630 ********************************************************************/
632 /* CKW Bind Confirm primitive */
634 PUBLIC CkwBndCfm kwUiCkwBndCfmMt[] =
637 cmPkCkwBndCfm, /* 0 - loosely coupled */
638 #endif /* LCCKUICKW */
640 NhLiCkwBndCfm, /* 1 - tightly coupled, RRC */
644 /* CKW Configuration confirm primitive */
646 PUBLIC CkwCfgCfm kwUiCkwCfgCfmMt[] =
649 cmPkCkwCfgCfm, /* 0 - loosely coupled */
650 #endif /* LCKWUICKW */
652 NhLiCkwCfgCfm, /* 1 - tightly coupled, RRC */
656 PUBLIC CkwUeIdChgCfm kwUiCkwUeIdChgCfmMt[] =
659 cmPkCkwUeIdChgCfm, /* 0 - loosely coupled */
660 #endif /* LCKWUICKW */
662 NhLiCkwUeIdChgCfm, /* 1 - tightly coupled, RRC */
668 /****************************************************************************
669 * CKW Interface Mt functions
670 ***************************************************************************/
675 * Handler for confirming the bind request received from CKW
680 * This function send the bind confirm primitive to the RLC user,
681 * when it receives a bind request from its service user.
683 * @param[in] pst - Post structure
684 * @param[in] suId - Service user SAP ID
685 * @param[in] status - Status
691 PUBLIC S16 KwUiCkwBndCfm
693 Pst *pst, /* post structure */
694 SuId suId, /* Service User Id */
695 U8 status /* Status */
698 PUBLIC S16 KwUiCkwBndCfm(pst, suId, status)
699 Pst *pst; /* post structure */
700 SuId suId; /* Service User Id */
701 U8 status; /* Status */
706 /* jump to specific primitive depending on configured selector */
707 (*kwUiCkwBndCfmMt[pst->selector])(pst, suId, status);
711 } /* end of KwUiCkwBndCfm */
718 * Handler for sending a configuration confirm to RRC.
722 * This function is used by RLC user to send a configuration
723 * confirmation to RRC after configuring(add/delete/modify)
726 * @param[in] pst Post structure
727 * @param[in] transId Transaction Id
728 * @param[in] cfmInfo Config Confirmation Info
735 PUBLIC S16 KwUiCkwCfgCfm
737 Pst *pst, /* post structure */
738 SuId suId, /* Service User Id */
739 CkwCfgCfmInfo *cfmInfo /* Configuration Confirm */
742 PUBLIC S16 KwUiCkwCfgCfm(pst, suId, cfmInfo)
743 Pst *pst; /* post structure */
744 SuId suId; /* Service User Id */
745 CkwCfgCfmInfo *cfmInfo; /* Configuration Confirm */
750 /* jump to specific primitive depending on configured selector */
751 (*kwUiCkwCfgCfmMt[pst->selector])(pst, suId, cfmInfo);
755 } /* end of KwUiCkwCfgCfm */
762 * Handler for sending a configuration for UE ID change.
766 * This function is used by RLC to send a configuration
767 * confirm for UE ID change.
769 * @param[in] pst Post structure
770 * @param[in] suId Service User Id
771 * @param[in] transId Transaction Id
772 * @param[in] cfmInfo Config Confirmation Info
779 PUBLIC S16 KwUiCkwUeIdChgCfm
781 Pst *pst, /* post structure */
782 SuId suId, /* Service User Id */
788 PUBLIC S16 KwUiCkwUeIdChgCfm(pst, suId, transId,ueInfo,status)
789 Pst *pst; /* post structure */
790 SuId suId; /* Service User Id */
796 TRC3(KwUiCkwUeIdChgCfm)
798 /* jump to specific primitive depending on configured selector */
799 (*kwUiCkwUeIdChgCfmMt[pst->selector])(pst, suId, transId, ueInfo, status);
803 } /* end of KwUiCkwCfgCfm */
806 #if (defined(L2_L3_SPLIT) && defined(ICC_RECV_TSK_RBUF))
811 * kwDlBatchProcSplit- process rbug messages
817 PUBLIC S16 kwDlBatchProcSplit
822 PUBLIC S16 kwDlBatchProcSplit()
827 /* Read from Ring Buffer and process PDCP packets */
828 Void *elmIndx = NULLP;
829 RxmBufReq *datReq = NULLP;
833 U8 rngBufDeqIndx = 0;
837 rngBufDeqMaxCnt = SS_RNG_MAX_DLPDCP_TO_DLRLC_DQ_CNT;
838 #ifdef TENB_T2K3K_SPECIFIC_CHANGES
839 rngBufCurrCnt = SGetNumElemInRng(SS_RNG_BUF_RX_TO_DLRLC);
840 if ( rngBufCurrCnt > (3 * SS_RNG_MAX_DLPDCP_TO_DLRLC_DQ_CNT))
842 if ( rngBufCurrCnt > (6 * SS_RNG_MAX_DLPDCP_TO_DLRLC_DQ_CNT))
844 /* Restablishment scenario */
845 rngBufDeqMaxCnt = (4 * SS_RNG_MAX_DLPDCP_TO_DLRLC_DQ_CNT);
849 rngBufDeqMaxCnt = (3 * SS_RNG_MAX_DLPDCP_TO_DLRLC_DQ_CNT)/2;
853 elmIndx = SRngGetRIndx(SS_RNG_BUF_RX_TO_DLRLC);
854 while(NULLP != elmIndx)
856 datReq = (RxmBufReq *)elmIndx;
857 if(datReq->mBuf != NULLP)
859 cmUnpkKwuDatReq(KwUiKwuDatReq, &datReq->pst, datReq->mBuf);
863 RLOG0(L_ERROR, "mBuf is NULL");
865 cmUnpkKwuDatReq(KwUiKwuDatReq, &datReq->pst, datReq->mBuf);
868 SsRngInfoTbl[SS_RNG_BUF_RX_TO_DLRLC].nPktProc++;//Number of pkt processed in tti
869 datReq->mBuf = NULLP;
870 SRngIncrRIndx(SS_RNG_BUF_RX_TO_DLRLC);
872 if(rngBufDeqIndx >= rngBufDeqMaxCnt)
885 if((elmIndx = SRngGetRIndx(SS_RNG_BUF_RX_TO_DLRLC)) == NULLP)
895 #if defined(PDCP_RLC_DL_RBUF) || defined(SS_RBUF)
897 PUBLIC S16 kwDlBatchProc
902 PUBLIC S16 kwDlBatchProc()
906 /* Read from Ring Buffer and process PDCP packets */
908 U8 rngBufDeqIndx = 0;
910 #ifdef TENB_T2K3K_SPECIFIC_CHANGES
913 /* Memory regions different for BRCM and Intel */
914 /*dstProcId,srcProcId,dstEnt,dstInst,srcEnt,srcInst,prior,route,event,region,pool,selector*/
916 PRIVATE Pst rlcDlRbfuPst ={1,1,ENTKW,1,ENTPJ,1,PRIOR0,RTESPEC,KWU_EVT_DAT_REQ,1,1,0,0};
918 PRIVATE Pst rlcDlRbfuPst ={1,1,ENTKW,1,ENTPJ,1,PRIOR0,RTESPEC,KWU_EVT_DAT_REQ,2,1,0,0};
920 Void *elmIndx = NULLP;
921 KwuDatReqDetl *kwuDatReqDetl = NULLP;
922 KwuDatReqInfo datReq;
924 rngBufDeqMaxCnt = SS_RNG_MAX_DLPDCP_TO_DLRLC_DQ_CNT;
925 #ifdef TENB_T2K3K_SPECIFIC_CHANGES
926 rngBufCurrCnt = SGetNumElemInRng(SS_RNG_BUF_DLPDCP_TO_DLRLC);
927 if ( rngBufCurrCnt > (3 * SS_RNG_MAX_DLPDCP_TO_DLRLC_DQ_CNT))
929 if ( rngBufCurrCnt > (5 * SS_RNG_MAX_DLPDCP_TO_DLRLC_DQ_CNT))
931 /* Restablishment scenario */
932 rngBufDeqMaxCnt = (4 * SS_RNG_MAX_DLPDCP_TO_DLRLC_DQ_CNT);
936 rngBufDeqMaxCnt = (2 * SS_RNG_MAX_DLPDCP_TO_DLRLC_DQ_CNT);
940 elmIndx = SRngGetRIndx(SS_RNG_BUF_DLPDCP_TO_DLRLC);
941 while(NULLP != elmIndx)
943 kwuDatReqDetl = (KwuDatReqDetl *)elmIndx;
944 datReq.rlcId = kwuDatReqDetl->rlcId;
945 datReq.sduId = kwuDatReqDetl->sduId;
946 datReq.lcType = kwuDatReqDetl->lcType;
947 SsRngInfoTbl[SS_RNG_BUF_DLPDCP_TO_DLRLC].nPktProc++;;//Number of pkt processed in tti
948 if(kwuDatReqDetl->mBuf != NULLP)
950 KwUiKwuDatReq(&rlcDlRbfuPst, kwuDatReqDetl->spId, &datReq, kwuDatReqDetl->mBuf);
952 SRngIncrRIndx(SS_RNG_BUF_DLPDCP_TO_DLRLC);
955 if(rngBufDeqIndx >= rngBufDeqMaxCnt)
959 elmIndx = (Void *)SRngGetRIndx(SS_RNG_BUF_DLPDCP_TO_DLRLC);
967 PUBLIC S16 kwUtlDlBatchProcPkts
972 PUBLIC S16 kwUtlDlBatchProcPkts
979 kwUtlDlBatchProcHqStaInd();
988 PUBLIC S16 kwUtlDlFreeRlcRBuf
993 PUBLIC S16 kwUtlDlFreeRlcRBuf
997 /* Read from Ring Buffer and process PDCP packets */
998 Void *elmIndx = NULLP;
999 KwuDatReqDetl *kwuDatReqDetl = NULLP;
1000 /* Free SS_RNG_BUF_DLPDCP_TO_DLRLC */
1001 elmIndx = SRngGetRIndx(SS_RNG_BUF_DLPDCP_TO_DLRLC);
1002 while(NULLP != elmIndx)
1004 kwuDatReqDetl = (KwuDatReqDetl *)elmIndx;
1005 SRngIncrRIndx(SS_RNG_BUF_DLPDCP_TO_DLRLC);
1006 SsRngInfoTbl[SS_RNG_BUF_DLPDCP_TO_DLRLC].nPktProc++;
1007 SPutMsg(kwuDatReqDetl->mBuf);
1009 kwuDatReqDetl = NULLP;
1010 if((elmIndx = SRngGetRIndx(SS_RNG_BUF_DLPDCP_TO_DLRLC)) == NULLP)
1020 #endif /* __cplusplus */
1021 /********************************************************************30**
1023 **********************************************************************/