Commit 388b5102 authored by sumit's avatar sumit Committed by Marwan Hammouda

t_reassembly timer as clp and also provision as per 38.821 7.2.2.1 when harq...

t_reassembly timer as clp and also provision as per 38.821 7.2.2.1 when harq is enabled, scheduling_offset yet to be added
parent f851cb2d
...@@ -110,6 +110,11 @@ extern "C" ...@@ -110,6 +110,11 @@ extern "C"
#define CONFIG_HLP_SYNC_REF "Sync Reference in Sidelink\n" #define CONFIG_HLP_SYNC_REF "Sync Reference in Sidelink\n"
#define CONFIG_HLP_NID1 "Set NID1 value in Sidelink\n" #define CONFIG_HLP_NID1 "Set NID1 value in Sidelink\n"
#define CONFIG_HLP_NID2 "Set NID2 value in Sidelink\n" #define CONFIG_HLP_NID2 "Set NID2 value in Sidelink\n"
#define CONFIG_HLP_NTN_TRS "softmodem params for ntn t-Reassembly timer"
#define CONFIG_HLP_NTN_TRS_OFFSET "softmodem params for ntn t-Reassembly timer offset in ms"
#define CONFIG_HLP_NTN_TRD "softmodem params for ntn t-Reordering timer"
#define CONFIG_HLP_NTN_TRD_OFFSET "softmodem params for ntn t-Reordering timer offset in ms"
#define CONFIG_HLP_NTN_RTD "softmodem params for ntn round trip delay ms"
/*-----------------------------------------------------------------------------------------------------------------------------------------------------*/ /*-----------------------------------------------------------------------------------------------------------------------------------------------------*/
/* command line parameters common to eNodeB and UE */ /* command line parameters common to eNodeB and UE */
...@@ -147,6 +152,12 @@ extern "C" ...@@ -147,6 +152,12 @@ extern "C"
#define NID2 softmodem_params.nid2 #define NID2 softmodem_params.nid2
#define REORDER_THREAD_DISABLE softmodem_params.reorder_thread_disable #define REORDER_THREAD_DISABLE softmodem_params.reorder_thread_disable
#define NTN_TRS softmodem_params.ntn_trs
#define NTN_TRS_OFFSET softmodem_params.ntn_trs_offset
#define NTN_TRD softmodem_params.ntn_trd
#define NTN_TRD_OFFSET softmodem_params.ntn_trd_offset
#define NTN_RTD softmodem_params.ntn_rtd
#define DEFAULT_RFCONFIG_FILE "/usr/local/etc/syriq/ue.band7.tm1.PRB100.NR40.dat"; #define DEFAULT_RFCONFIG_FILE "/usr/local/etc/syriq/ue.band7.tm1.PRB100.NR40.dat";
extern int usrp_tx_thread; extern int usrp_tx_thread;
...@@ -193,6 +204,11 @@ extern int usrp_tx_thread; ...@@ -193,6 +204,11 @@ extern int usrp_tx_thread;
{"disable-stats", CONFIG_HLP_STATS_DISABLE, PARAMFLAG_BOOL, .iptr=&stats_disabled, .defintval=0, TYPE_INT, 0}, \ {"disable-stats", CONFIG_HLP_STATS_DISABLE, PARAMFLAG_BOOL, .iptr=&stats_disabled, .defintval=0, TYPE_INT, 0}, \
{"nid1", CONFIG_HLP_NID1, 0, .iptr=&NID1, .defintval=10, TYPE_INT, 0}, \ {"nid1", CONFIG_HLP_NID1, 0, .iptr=&NID1, .defintval=10, TYPE_INT, 0}, \
{"nid2", CONFIG_HLP_NID2, 0, .iptr=&NID2, .defintval=1, TYPE_INT, 0}, \ {"nid2", CONFIG_HLP_NID2, 0, .iptr=&NID2, .defintval=1, TYPE_INT, 0}, \
{"ntn-trs", CONFIG_HLP_NTN_TRS, 0, .u8ptr=&NTN_TRS, .defintval=15, TYPE_UINT8, 0}, \
{"ntn-trs-offset", CONFIG_HLP_NTN_TRS_OFFSET,0, .u16ptr=&NTN_TRS_OFFSET, .defintval=0, TYPE_UINT16, 0}, \
{"ntn-trd", CONFIG_HLP_NTN_TRD, 0, .u8ptr=&NTN_TRD, .defintval=36, TYPE_UINT8, 0}, \
{"ntn-trd-offset", CONFIG_HLP_NTN_TRD_OFFSET,0, .u16ptr=&NTN_TRD_OFFSET, .defintval=0, TYPE_UINT16, 0}, \
{"ntn-rtd", CONFIG_HLP_NTN_RTD, 0, .u16ptr=&NTN_RTD, .defintval=0, TYPE_UINT16, 0}, \
} }
// clang-format on // clang-format on
...@@ -242,6 +258,11 @@ extern int usrp_tx_thread; ...@@ -242,6 +258,11 @@ extern int usrp_tx_thread;
{ .s5 = { NULL } }, \ { .s5 = { NULL } }, \
{ .s5 = { NULL } }, \ { .s5 = { NULL } }, \
{ .s5 = { NULL } }, \ { .s5 = { NULL } }, \
{ .s5 = { NULL } }, \
{ .s5 = { NULL } }, \
{ .s5 = { NULL } }, \
{ .s5 = { NULL } }, \
{ .s5 = { NULL } }, \
} }
// clang-format on // clang-format on
...@@ -354,6 +375,11 @@ typedef struct { ...@@ -354,6 +375,11 @@ typedef struct {
int sync_ref; int sync_ref;
int nid1; int nid1;
int nid2; int nid2;
uint8_t ntn_trs;
uint16_t ntn_trs_offset;
uint8_t ntn_trd;
uint16_t ntn_trd_offset;
uint16_t ntn_rtd;
} softmodem_params_t; } softmodem_params_t;
extern uint64_t get_softmodem_optmask(void); extern uint64_t get_softmodem_optmask(void);
......
...@@ -763,9 +763,30 @@ static void add_drb_um(int rnti, int drb_id, const NR_RLC_BearerConfig_t *rlc_Be ...@@ -763,9 +763,30 @@ static void add_drb_um(int rnti, int drb_id, const NR_RLC_BearerConfig_t *rlc_Be
switch (r->present) { switch (r->present) {
case NR_RLC_Config_PR_um_Bi_Directional: { case NR_RLC_Config_PR_um_Bi_Directional: {
//printf("\n\n\n\n ENB_NAS_USE_TUN %ld enb_flag %d\n\n\n\n",ENB_NAS_USE_TUN, enb_flag);
struct NR_RLC_Config__um_Bi_Directional *um; struct NR_RLC_Config__um_Bi_Directional *um;
um = r->choice.um_Bi_Directional; um = r->choice.um_Bi_Directional;
t_reassembly = decode_t_reassembly(um->dl_UM_RLC.t_Reassembly); // FOLLOWING TO BE USED WHEN HARQ IS DISABLED
{
t_reassembly = decode_t_reassembly(um->dl_UM_RLC.t_Reassembly); // THIS WILL COLLECT THE VALUE FROM ENUM CORRESPONDING
// TO THE INDEX PROVIDED FROM CLP
t_reassembly = t_reassembly + get_softmodem_params()->ntn_trs_offset; // THIS WILL ADD THE OFFSET VALUE PROVIDED FROM CLP
}
// FOLLOWING TO BE USED WHEN HARQ IS ENABLED DO AS 7.2.2.1 FROM 38.821
/*
{
if(ENB_NAS_USE_TUN) // IF THE FUNCTION IS CALLED BY GNB
{
t_reassembly = t_reassembly + (get_softmodem_params()->ntn_rtd)*NR_MAX_DLSCH_HARQ_PROCESSES;
}
else // IF THE FUNCTION IS CALLED BY UE
{
t_reassembly = t_reassembly + (get_softmodem_params()->ntn_rtd)*NR_MAX_ULSCH_HARQ_PROCESSES;
}
}
*/
if (*um->dl_UM_RLC.sn_FieldLength != *um->ul_UM_RLC.sn_FieldLength) { if (*um->dl_UM_RLC.sn_FieldLength != *um->ul_UM_RLC.sn_FieldLength) {
LOG_E(RLC, "%s:%d:%s: fatal\n", __FILE__, __LINE__, __FUNCTION__); LOG_E(RLC, "%s:%d:%s: fatal\n", __FILE__, __LINE__, __FUNCTION__);
exit(1); exit(1);
......
...@@ -352,7 +352,8 @@ static void nr_drb_config(struct NR_RLC_Config *rlc_Config, NR_RLC_Config_PR rlc ...@@ -352,7 +352,8 @@ static void nr_drb_config(struct NR_RLC_Config *rlc_Config, NR_RLC_Config_PR rlc
rlc_Config->choice.um_Bi_Directional->dl_UM_RLC.sn_FieldLength = rlc_Config->choice.um_Bi_Directional->dl_UM_RLC.sn_FieldLength =
calloc(1, sizeof(*rlc_Config->choice.um_Bi_Directional->dl_UM_RLC.sn_FieldLength)); calloc(1, sizeof(*rlc_Config->choice.um_Bi_Directional->dl_UM_RLC.sn_FieldLength));
*rlc_Config->choice.um_Bi_Directional->dl_UM_RLC.sn_FieldLength = NR_SN_FieldLengthUM_size12; *rlc_Config->choice.um_Bi_Directional->dl_UM_RLC.sn_FieldLength = NR_SN_FieldLengthUM_size12;
rlc_Config->choice.um_Bi_Directional->dl_UM_RLC.t_Reassembly = NR_T_Reassembly_ms15; //rlc_Config->choice.um_Bi_Directional->dl_UM_RLC.t_Reassembly = NR_T_Reassembly_ms15;
rlc_Config->choice.um_Bi_Directional->dl_UM_RLC.t_Reassembly = get_softmodem_params()->ntn_trs; // GETTING ENUM INDEX OF T_REASSEMBLY TIMER FROM THE CL
break; break;
case NR_RLC_Config_PR_am: case NR_RLC_Config_PR_am:
// RLC AM Bearer configuration // RLC AM Bearer configuration
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment