lib,pdcp_nr: added options to select re-ordering timer

master
Pedro Alvarez 3 years ago
parent 1fecae9b5a
commit 3620308940

@ -93,7 +93,8 @@ enum class pdcp_t_reordering_t {
ms2250 = 2250,
ms2500 = 2500,
ms2750 = 2750,
ms3000 = 3000
ms3000 = 3000,
infinity = -1
};
// Taken from PDCP-Config (TS 38.331 version 15.2.1)
@ -113,7 +114,7 @@ enum class pdcp_discard_timer_t {
ms500 = 500,
ms750 = 750,
ms1500 = 1500,
infinity = 0
infinity = -1
};
class pdcp_config_t

@ -236,14 +236,119 @@ srsran::pdcp_config_t make_drb_pdcp_config_t(const uint8_t bearer_id, bool is_ue
}
}
pdcp_t_reordering_t t_reordering = pdcp_t_reordering_t::ms500;
pdcp_t_reordering_t t_reordering = pdcp_t_reordering_t::infinity;
if (pdcp_cfg.t_reordering_present) {
switch (pdcp_cfg.t_reordering.to_number()) {
case 0:
t_reordering = pdcp_t_reordering_t::ms0;
break;
default:
case 1:
t_reordering = pdcp_t_reordering_t::ms1;
break;
case 2:
t_reordering = pdcp_t_reordering_t::ms2;
break;
case 4:
t_reordering = pdcp_t_reordering_t::ms4;
break;
case 5:
t_reordering = pdcp_t_reordering_t::ms5;
break;
case 8:
t_reordering = pdcp_t_reordering_t::ms8;
break;
case 10:
t_reordering = pdcp_t_reordering_t::ms10;
break;
case 15:
t_reordering = pdcp_t_reordering_t::ms15;
break;
case 20:
t_reordering = pdcp_t_reordering_t::ms20;
break;
case 30:
t_reordering = pdcp_t_reordering_t::ms30;
break;
case 40:
t_reordering = pdcp_t_reordering_t::ms40;
break;
case 50:
t_reordering = pdcp_t_reordering_t::ms50;
break;
case 60:
t_reordering = pdcp_t_reordering_t::ms60;
break;
case 80:
t_reordering = pdcp_t_reordering_t::ms80;
break;
case 100:
t_reordering = pdcp_t_reordering_t::ms100;
break;
case 120:
t_reordering = pdcp_t_reordering_t::ms120;
break;
case 140:
t_reordering = pdcp_t_reordering_t::ms140;
break;
case 160:
t_reordering = pdcp_t_reordering_t::ms160;
break;
case 180:
t_reordering = pdcp_t_reordering_t::ms180;
break;
case 200:
t_reordering = pdcp_t_reordering_t::ms200;
break;
case 220:
t_reordering = pdcp_t_reordering_t::ms220;
break;
case 240:
t_reordering = pdcp_t_reordering_t::ms240;
break;
case 260:
t_reordering = pdcp_t_reordering_t::ms260;
break;
case 280:
t_reordering = pdcp_t_reordering_t::ms280;
break;
case 300:
t_reordering = pdcp_t_reordering_t::ms300;
break;
case 500:
t_reordering = pdcp_t_reordering_t::ms500;
break;
case 750:
t_reordering = pdcp_t_reordering_t::ms750;
break;
case 1000:
t_reordering = pdcp_t_reordering_t::ms1000;
break;
case 1250:
t_reordering = pdcp_t_reordering_t::ms1250;
break;
case 1500:
t_reordering = pdcp_t_reordering_t::ms1500;
break;
case 1750:
t_reordering = pdcp_t_reordering_t::ms1750;
break;
case 2000:
t_reordering = pdcp_t_reordering_t::ms2000;
break;
case 2250:
t_reordering = pdcp_t_reordering_t::ms2250;
break;
case 2500:
t_reordering = pdcp_t_reordering_t::ms2500;
break;
case 2750:
t_reordering = pdcp_t_reordering_t::ms2750;
break;
case 3000:
t_reordering = pdcp_t_reordering_t::ms3000;
break;
default:
t_reordering = pdcp_t_reordering_t::ms50;
}
}

@ -64,6 +64,12 @@ bool pdcp_entity_nr::configure(const pdcp_config_t& cnfg_)
reordering_timer.set(static_cast<uint32_t>(cfg.t_reordering), *reordering_fnc);
}
active = true;
logger.info("%s PDCP-NR entity configured. SN_LEN=%d, Discard timer %d, Re-ordering timer %d, RAT=%s",
rb_name,
cfg.sn_len,
cfg.discard_timer,
cfg.t_reordering,
to_string(cfg.rat));
return true;
}

Loading…
Cancel
Save