rrc - make t304 configurable via rr.conf

master
Francisco 4 years ago committed by Francisco Paisana
parent c6b9c12ba2
commit 15484e9472

@ -47,21 +47,22 @@ struct rrc_meas_cfg_t {
// Cell/Sector configuration
struct cell_cfg_t {
uint32_t rf_port;
uint32_t cell_id;
uint16_t tac;
uint32_t pci;
uint16_t root_seq_idx;
uint32_t dl_earfcn;
double dl_freq_hz;
uint32_t ul_earfcn;
double ul_freq_hz;
int target_pucch_sinr_db;
int target_pusch_sinr_db;
uint32_t initial_dl_cqi;
bool enable_phr_handling;
std::vector<scell_cfg_t> scell_list;
rrc_meas_cfg_t meas_cfg;
uint32_t rf_port;
uint32_t cell_id;
uint16_t tac;
uint32_t pci;
uint16_t root_seq_idx;
uint32_t dl_earfcn;
double dl_freq_hz;
uint32_t ul_earfcn;
double ul_freq_hz;
int target_pucch_sinr_db;
int target_pusch_sinr_db;
uint32_t initial_dl_cqi;
bool enable_phr_handling;
asn1::rrc::mob_ctrl_info_s::t304_e_ t304;
std::vector<scell_cfg_t> scell_list;
rrc_meas_cfg_t meas_cfg;
};
typedef std::vector<cell_cfg_t> cell_list_t;

@ -466,6 +466,12 @@ int opt_number_to_enum(EnumType& enum_val, bool& presence_flag, Setting& root, c
return parse_opt_field(enum_val, root, name, number_to_enum<EnumType>, &presence_flag);
}
template <typename EnumType>
int default_number_to_enum(EnumType& enum_val, Setting& root, const char* name, typename EnumType::options default_val)
{
return parse_default_field(enum_val, root, name, EnumType(default_val), number_to_enum<EnumType>);
}
} // namespace asn1_parsers
} // namespace srsenb

@ -65,6 +65,7 @@ cell_list =
// target_pusch_sinr = -1;
// target_pucch_sinr = -1;
// allowed_meas_bw = 6;
// t304 = 2000; // in msec. possible values: 50, 100, 150, 200, 500, 1000, 2000
// CA cells
scell_list = (

@ -44,6 +44,17 @@ using namespace asn1::rrc;
namespace srsenb {
template <typename T>
bool contains_value(T value, const std::initializer_list<T>& list)
{
for (auto& v : list) {
if (v == value) {
return true;
}
}
return false;
}
bool sib_is_present(const sched_info_list_l& l, sib_type_e sib_num)
{
for (uint32_t i = 0; i < l.size(); i++) {
@ -754,6 +765,8 @@ static int parse_cell_list(all_args_t* args, rrc_cfg_t* rrc_cfg, Setting& root)
HANDLEPARSERCODE(parse_default_field(cell_cfg.enable_phr_handling, cellroot, "enable_phr_handling", false));
parse_default_field(cell_cfg.meas_cfg.allowed_meas_bw, cellroot, "allowed_meas_bw", 6u);
srsran_assert(srsran::is_lte_cell_nof_prb(cell_cfg.meas_cfg.allowed_meas_bw), "Invalid measurement Bandwidth");
HANDLEPARSERCODE(asn1_parsers::default_number_to_enum(
cell_cfg.t304, cellroot, "t304", asn1::rrc::mob_ctrl_info_s::t304_opts::ms2000));
if (cellroot.exists("ho_active") and cellroot["ho_active"]) {
HANDLEPARSERCODE(parse_meas_cell_list(&cell_cfg.meas_cfg, cellroot["meas_cell_list"]));

@ -491,7 +491,7 @@ void rrc::ue::rrc_mobility::fill_mobility_reconf_common(asn1::rrc::dl_dcch_msg_s
recfg_r8.mob_ctrl_info_present = true;
auto& mob_info = recfg_r8.mob_ctrl_info;
mob_info.target_pci = target_cell.cell_cfg.pci;
mob_info.t304.value = mob_ctrl_info_s::t304_opts::ms2000; // TODO: make it reconfigurable
mob_info.t304 = target_cell.cell_cfg.t304;
mob_info.new_ue_id.from_number(rrc_ue->rnti);
mob_info.rr_cfg_common.pusch_cfg_common = target_cell.sib2.rr_cfg_common.pusch_cfg_common;
mob_info.rr_cfg_common.prach_cfg.root_seq_idx = target_cell.sib2.rr_cfg_common.prach_cfg.root_seq_idx;

@ -247,6 +247,9 @@ void gtpu_tunnel_manager::set_tunnel_priority(uint32_t before_teid, uint32_t aft
before_tun.rx_timer = task_sched.get_unique_timer();
before_tun.rx_timer.set(gtpu_args->indirect_tunnel_timeout_msec, [this, before_teid](uint32_t tid) {
// Note: This will self-destruct the callback object
logger.info("Forwarding tunnel " TEID_IN_FMT "being closed after timeout=%d msec",
before_teid,
gtpu_args->indirect_tunnel_timeout_msec);
remove_tunnel(before_teid);
});
before_tun.rx_timer.run();

@ -155,8 +155,10 @@ void test_gtpu_tunnel_manager()
uint32_t sgw_addr = ntohl(sgw_sockaddr.sin_addr.s_addr);
const uint32_t drb1_lcid = 3;
srsran::task_scheduler task_sched;
gtpu_args_t gtpu_args = {};
gtpu_tunnel_manager tunnels(&task_sched, srslog::fetch_basic_logger("GTPU"));
tunnels.init(gtpu_args, nullptr);
TESTASSERT(tunnels.find_tunnel(0) == nullptr);
TESTASSERT(tunnels.find_rnti_lcid_tunnels(0x46, drb1_lcid).empty());
TESTASSERT(tunnels.find_rnti_tunnels(0x46) == nullptr);
@ -324,7 +326,7 @@ int test_gtpu_direct_tunneling(tunnel_test_event event)
TESTASSERT(tenb_pdcp.last_sdu == nullptr);
if (event == tunnel_test_event::wait_end_marker_timeout) {
// TEST: EndMarker does not reach TeNB, but there is a timeout that will resume the new GTPU tunnel
for (size_t i = 0; i < 1000; ++i) {
for (size_t i = 0; i < gtpu_args.indirect_tunnel_timeout_msec + 1; ++i) {
task_sched.tic();
}
} else {

Loading…
Cancel
Save