From a58b6d261a194bfa29381c8b4e0afdc43666109d Mon Sep 17 00:00:00 2001 From: svaidhya Date: Fri, 16 Aug 2024 16:54:08 +0530 Subject: [PATCH] [Bug-ID: ODUHIGH-624]: UL AM Config and DL AM Config to be swapped in UE Create/Reconfg API (F1AP-RLC Interface) Change-Id: If29590255fa21c509268b7c9492c4d719aced317 Signed-off-by: svaidhya --- src/5gnrrlc/rlc_msg_hdl.c | 18 ++++++++++-------- src/cm/du_app_rlc_inf.h | 4 ++-- src/du_app/du_f1ap_msg_hdl.c | 32 ++++++++++++++++---------------- src/du_app/du_ue_mgr.c | 32 ++++++++++++++++---------------- 4 files changed, 44 insertions(+), 42 deletions(-) diff --git a/src/5gnrrlc/rlc_msg_hdl.c b/src/5gnrrlc/rlc_msg_hdl.c index 38f0456fa..a88f89cd0 100644 --- a/src/5gnrrlc/rlc_msg_hdl.c +++ b/src/5gnrrlc/rlc_msg_hdl.c @@ -224,19 +224,21 @@ uint8_t fillLcCfg(RlcCb *gCb, RlcEntCfgInfo *rlcUeCfg, RlcBearerCfg *duRlcUeCfg) case RLC_MODE_AM: { /* DL AM INFO */ - rlcUeCfg->m.amInfo.dl.snLen = duRlcUeCfg->u.amCfg->dlAmCfg.snLenDl; - rlcUeCfg->m.amInfo.dl.pollRetxTmr = duRlcUeCfg->u.amCfg->dlAmCfg.pollRetxTmr; - rlcUeCfg->m.amInfo.dl.pollPdu = duRlcUeCfg->u.amCfg->dlAmCfg.pollPdu; - rlcUeCfg->m.amInfo.dl.pollByte = duRlcUeCfg->u.amCfg->dlAmCfg.pollByte; - rlcUeCfg->m.amInfo.dl.maxRetx = duRlcUeCfg->u.amCfg->dlAmCfg.maxRetxTh; + /*Reversal storage becuase gNB's RLC tx side(DL) will be polling and Rx entity(UL) + * will be sending status*/ + rlcUeCfg->m.amInfo.dl.snLen = duRlcUeCfg->u.amCfg->ulAmCfg.snLenDl; + rlcUeCfg->m.amInfo.dl.pollRetxTmr = duRlcUeCfg->u.amCfg->ulAmCfg.pollRetxTmr; + rlcUeCfg->m.amInfo.dl.pollPdu = duRlcUeCfg->u.amCfg->ulAmCfg.pollPdu; + rlcUeCfg->m.amInfo.dl.pollByte = duRlcUeCfg->u.amCfg->ulAmCfg.pollByte; + rlcUeCfg->m.amInfo.dl.maxRetx = duRlcUeCfg->u.amCfg->ulAmCfg.maxRetxTh; /* UL AM INFO */ lChRbIdx++; //lChRbIdx = 1, indicates UL AM rlcUeCfg->lCh[lChRbIdx].lChId = duRlcUeCfg->lcId; rlcUeCfg->lCh[lChRbIdx].type = duRlcUeCfg->lcType; - rlcUeCfg->m.amInfo.ul.snLen = duRlcUeCfg->u.amCfg->ulAmCfg.snLenUl; - rlcUeCfg->m.amInfo.ul.staProhTmr = duRlcUeCfg->u.amCfg->ulAmCfg.statProhTmr; - rlcUeCfg->m.amInfo.ul.reAsmblTmr = duRlcUeCfg->u.amCfg->ulAmCfg.reAssemTmr; + rlcUeCfg->m.amInfo.ul.snLen = duRlcUeCfg->u.amCfg->dlAmCfg.snLenUl; + rlcUeCfg->m.amInfo.ul.staProhTmr = duRlcUeCfg->u.amCfg->dlAmCfg.statProhTmr; + rlcUeCfg->m.amInfo.ul.reAsmblTmr = duRlcUeCfg->u.amCfg->dlAmCfg.reAssemTmr; break; } case RLC_MODE_UM: diff --git a/src/cm/du_app_rlc_inf.h b/src/cm/du_app_rlc_inf.h index 1fb938a7d..9aa065cc9 100644 --- a/src/cm/du_app_rlc_inf.h +++ b/src/cm/du_app_rlc_inf.h @@ -131,7 +131,7 @@ typedef struct ulAmCfg int8_t reAssemTmr; /* T_reassembling Timer in msec*/ int16_t statProhTmr; /* T_status_prohibit Timer in msec*/ -}UlAmCfg; +}DlAmCfg; typedef struct dlAmCfg { @@ -141,7 +141,7 @@ typedef struct dlAmCfg int32_t pollByte; /* Poll_Byte in bytes. */ uint8_t maxRetxTh; /* Max_Retx_Threshold */ -}DlAmCfg; +}UlAmCfg; typedef struct dlUmCfg { diff --git a/src/du_app/du_f1ap_msg_hdl.c b/src/du_app/du_f1ap_msg_hdl.c index a4f1416fa..e8f1e52ee 100644 --- a/src/du_app/du_f1ap_msg_hdl.c +++ b/src/du_app/du_f1ap_msg_hdl.c @@ -3304,11 +3304,11 @@ uint8_t BuildRlcConfigAm(AmBearerCfg *amCfg, struct RLC_Config *rlcConfig) } else { - *(rlcConfig->choice.am->ul_AM_RLC.sn_FieldLength) = covertAmSnLenFromIntEnumToRrcEnum(amCfg->dlAmCfg.snLenDl); - rlcConfig->choice.am->ul_AM_RLC.t_PollRetransmit = covertPollRetxTmrValueToEnum(amCfg->dlAmCfg.pollRetxTmr); - rlcConfig->choice.am->ul_AM_RLC.pollPDU = covertPollPduValueToEnum(amCfg->dlAmCfg.pollPdu); - rlcConfig->choice.am->ul_AM_RLC.pollByte = covertPollByteValueToEnum(amCfg->dlAmCfg.pollByte); - rlcConfig->choice.am->ul_AM_RLC.maxRetxThreshold = covertMaxRetxValueToEnum(amCfg->dlAmCfg.maxRetxTh); + *(rlcConfig->choice.am->ul_AM_RLC.sn_FieldLength) = covertAmSnLenFromIntEnumToRrcEnum(amCfg->ulAmCfg.snLenDl); + rlcConfig->choice.am->ul_AM_RLC.t_PollRetransmit = covertPollRetxTmrValueToEnum(amCfg->ulAmCfg.pollRetxTmr); + rlcConfig->choice.am->ul_AM_RLC.pollPDU = covertPollPduValueToEnum(amCfg->ulAmCfg.pollPdu); + rlcConfig->choice.am->ul_AM_RLC.pollByte = covertPollByteValueToEnum(amCfg->ulAmCfg.pollByte); + rlcConfig->choice.am->ul_AM_RLC.maxRetxThreshold = covertMaxRetxValueToEnum(amCfg->ulAmCfg.maxRetxTh); } /* Fill AM DL configuraion */ @@ -3329,9 +3329,9 @@ uint8_t BuildRlcConfigAm(AmBearerCfg *amCfg, struct RLC_Config *rlcConfig) } else /* Fill AM configuration from DU database */ { - *(rlcConfig->choice.am->dl_AM_RLC.sn_FieldLength) = covertAmSnLenFromIntEnumToRrcEnum(amCfg->ulAmCfg.snLenUl); - rlcConfig->choice.am->dl_AM_RLC.t_Reassembly = convertReasmblTmrValueToEnum(amCfg->ulAmCfg.reAssemTmr); - rlcConfig->choice.am->dl_AM_RLC.t_StatusProhibit = convertProhibitTmrValueToEnum(amCfg->ulAmCfg.statProhTmr); + *(rlcConfig->choice.am->dl_AM_RLC.sn_FieldLength) = covertAmSnLenFromIntEnumToRrcEnum(amCfg->dlAmCfg.snLenUl); + rlcConfig->choice.am->dl_AM_RLC.t_Reassembly = convertReasmblTmrValueToEnum(amCfg->dlAmCfg.reAssemTmr); + rlcConfig->choice.am->dl_AM_RLC.t_StatusProhibit = convertProhibitTmrValueToEnum(amCfg->dlAmCfg.statProhTmr); } return ROK; } @@ -10143,20 +10143,20 @@ void extractRlcAmCfg(AmBearerCfg *amCfgToSet, struct RLC_Config__am *rlcAmCfg) /* UL AM */ if(rlcAmCfg->dl_AM_RLC.sn_FieldLength) { - amCfgToSet->ulAmCfg.snLenUl = covertAmSnLenFromRrcEnumToIntEnum(*(rlcAmCfg->dl_AM_RLC.sn_FieldLength)); + amCfgToSet->dlAmCfg.snLenUl = covertAmSnLenFromRrcEnumToIntEnum(*(rlcAmCfg->dl_AM_RLC.sn_FieldLength)); /*TODO: Check the timer value when sent by real CU */ - amCfgToSet->ulAmCfg.reAssemTmr = convertReasmblTmrEnumToValue(rlcAmCfg->dl_AM_RLC.t_Reassembly); - amCfgToSet->ulAmCfg.statProhTmr = convertProhibitTmrEnumToValue(rlcAmCfg->dl_AM_RLC.t_StatusProhibit); + amCfgToSet->dlAmCfg.reAssemTmr = convertReasmblTmrEnumToValue(rlcAmCfg->dl_AM_RLC.t_Reassembly); + amCfgToSet->dlAmCfg.statProhTmr = convertProhibitTmrEnumToValue(rlcAmCfg->dl_AM_RLC.t_StatusProhibit); } /* DL AM */ if(rlcAmCfg->ul_AM_RLC.sn_FieldLength) { - amCfgToSet->dlAmCfg.snLenDl = covertAmSnLenFromRrcEnumToIntEnum(*(rlcAmCfg->ul_AM_RLC.sn_FieldLength)); - amCfgToSet->dlAmCfg.pollRetxTmr = covertPollRetxTmrEnumToValue(rlcAmCfg->ul_AM_RLC.t_PollRetransmit); - amCfgToSet->dlAmCfg.pollPdu = covertPollPduEnumToValue(rlcAmCfg->ul_AM_RLC.pollPDU); - amCfgToSet->dlAmCfg.pollByte = covertPollByteEnumToValue(rlcAmCfg->ul_AM_RLC.pollByte); - amCfgToSet->dlAmCfg.maxRetxTh = covertMaxRetxEnumToValue(rlcAmCfg->ul_AM_RLC.maxRetxThreshold); + amCfgToSet->ulAmCfg.snLenDl = covertAmSnLenFromRrcEnumToIntEnum(*(rlcAmCfg->ul_AM_RLC.sn_FieldLength)); + amCfgToSet->ulAmCfg.pollRetxTmr = covertPollRetxTmrEnumToValue(rlcAmCfg->ul_AM_RLC.t_PollRetransmit); + amCfgToSet->ulAmCfg.pollPdu = covertPollPduEnumToValue(rlcAmCfg->ul_AM_RLC.pollPDU); + amCfgToSet->ulAmCfg.pollByte = covertPollByteEnumToValue(rlcAmCfg->ul_AM_RLC.pollByte); + amCfgToSet->ulAmCfg.maxRetxTh = covertMaxRetxEnumToValue(rlcAmCfg->ul_AM_RLC.maxRetxThreshold); } } } diff --git a/src/du_app/du_ue_mgr.c b/src/du_app/du_ue_mgr.c index c3e2d1d92..9b93c420d 100644 --- a/src/du_app/du_ue_mgr.c +++ b/src/du_app/du_ue_mgr.c @@ -1457,16 +1457,16 @@ uint8_t updateDuMacUeCfg(uint16_t cellId, uint8_t gnbDuUef1apId, uint16_t crnti, void fillDefaultAmInfo(AmBearerCfg *amCfg) { /* DL AM */ - amCfg->dlAmCfg.snLenDl = AM_SIZE_12; - amCfg->dlAmCfg.pollRetxTmr = T_POLL_RETRANSMIT_VAL; - amCfg->dlAmCfg.pollPdu = POLL_PDU_VAL; - amCfg->dlAmCfg.pollByte = POLL_BYTE_VAL; - amCfg->dlAmCfg.maxRetxTh = MAX_RETX_THRESHOLD_VAL; + amCfg->ulAmCfg.snLenDl = AM_SIZE_12; + amCfg->ulAmCfg.pollRetxTmr = T_POLL_RETRANSMIT_VAL; + amCfg->ulAmCfg.pollPdu = POLL_PDU_VAL; + amCfg->ulAmCfg.pollByte = POLL_BYTE_VAL; + amCfg->ulAmCfg.maxRetxTh = MAX_RETX_THRESHOLD_VAL; /* UL AM */ - amCfg->ulAmCfg.snLenUl = AM_SIZE_12; - amCfg->ulAmCfg.reAssemTmr = T_REASSEMBLY_VAL; - amCfg->ulAmCfg.statProhTmr = T_STATUS_PROHIBHIT_VAL; + amCfg->dlAmCfg.snLenUl = AM_SIZE_12; + amCfg->dlAmCfg.reAssemTmr = T_REASSEMBLY_VAL; + amCfg->dlAmCfg.statProhTmr = T_STATUS_PROHIBHIT_VAL; } /****************************************************************** @@ -2362,16 +2362,16 @@ uint8_t fillRlcCfgToAddMod(DuRlcBearerCfg *lcCfg, DuRlcBearerCfg *f1UeDbLcCfg) return RFAILED; } /* DL AM */ - lcCfg->rlcBearerCfg.u.amCfg->dlAmCfg.snLenDl = f1UeDbLcCfg->rlcBearerCfg.u.amCfg->dlAmCfg.snLenDl; - lcCfg->rlcBearerCfg.u.amCfg->dlAmCfg.pollRetxTmr = f1UeDbLcCfg->rlcBearerCfg.u.amCfg->dlAmCfg.pollRetxTmr; - lcCfg->rlcBearerCfg.u.amCfg->dlAmCfg.pollPdu = f1UeDbLcCfg->rlcBearerCfg.u.amCfg->dlAmCfg.pollPdu; - lcCfg->rlcBearerCfg.u.amCfg->dlAmCfg.pollByte = f1UeDbLcCfg->rlcBearerCfg.u.amCfg->dlAmCfg.pollByte; - lcCfg->rlcBearerCfg.u.amCfg->dlAmCfg.maxRetxTh = f1UeDbLcCfg->rlcBearerCfg.u.amCfg->dlAmCfg.maxRetxTh; + lcCfg->rlcBearerCfg.u.amCfg->ulAmCfg.snLenDl = f1UeDbLcCfg->rlcBearerCfg.u.amCfg->ulAmCfg.snLenDl; + lcCfg->rlcBearerCfg.u.amCfg->ulAmCfg.pollRetxTmr = f1UeDbLcCfg->rlcBearerCfg.u.amCfg->ulAmCfg.pollRetxTmr; + lcCfg->rlcBearerCfg.u.amCfg->ulAmCfg.pollPdu = f1UeDbLcCfg->rlcBearerCfg.u.amCfg->ulAmCfg.pollPdu; + lcCfg->rlcBearerCfg.u.amCfg->ulAmCfg.pollByte = f1UeDbLcCfg->rlcBearerCfg.u.amCfg->ulAmCfg.pollByte; + lcCfg->rlcBearerCfg.u.amCfg->ulAmCfg.maxRetxTh = f1UeDbLcCfg->rlcBearerCfg.u.amCfg->ulAmCfg.maxRetxTh; /* UL AM */ - lcCfg->rlcBearerCfg.u.amCfg->ulAmCfg.snLenUl = f1UeDbLcCfg->rlcBearerCfg.u.amCfg->ulAmCfg.snLenUl; - lcCfg->rlcBearerCfg.u.amCfg->ulAmCfg.reAssemTmr = f1UeDbLcCfg->rlcBearerCfg.u.amCfg->ulAmCfg.reAssemTmr; - lcCfg->rlcBearerCfg.u.amCfg->ulAmCfg.statProhTmr = f1UeDbLcCfg->rlcBearerCfg.u.amCfg->ulAmCfg.statProhTmr; + lcCfg->rlcBearerCfg.u.amCfg->dlAmCfg.snLenUl = f1UeDbLcCfg->rlcBearerCfg.u.amCfg->dlAmCfg.snLenUl; + lcCfg->rlcBearerCfg.u.amCfg->dlAmCfg.reAssemTmr = f1UeDbLcCfg->rlcBearerCfg.u.amCfg->dlAmCfg.reAssemTmr; + lcCfg->rlcBearerCfg.u.amCfg->dlAmCfg.statProhTmr = f1UeDbLcCfg->rlcBearerCfg.u.amCfg->dlAmCfg.statProhTmr; break; } case RLC_UM_BI_DIRECTIONAL : -- 2.16.6