From f17e77f391fde85b244003eff7476e3908a87cf5 Mon Sep 17 00:00:00 2001 From: Andre Puschmann Date: Fri, 14 Jan 2022 13:54:01 +0100 Subject: [PATCH] gnb,rrc: add GTPU interface to RRC --- srsgnb/hdr/stack/rrc/rrc_nr.h | 2 ++ srsgnb/src/stack/gnb_stack_nr.cc | 2 +- srsgnb/src/stack/rrc/rrc_nr.cc | 2 ++ srsgnb/src/stack/rrc/test/rrc_nr_core_test.cc | 5 +++-- srsgnb/src/stack/rrc/test/rrc_nr_test.cc | 15 +++++++++------ 5 files changed, 17 insertions(+), 9 deletions(-) diff --git a/srsgnb/hdr/stack/rrc/rrc_nr.h b/srsgnb/hdr/stack/rrc/rrc_nr.h index 353176025..0534144a0 100644 --- a/srsgnb/hdr/stack/rrc/rrc_nr.h +++ b/srsgnb/hdr/stack/rrc/rrc_nr.h @@ -56,6 +56,7 @@ public: rlc_interface_rrc* rlc, pdcp_interface_rrc* pdcp, ngap_interface_rrc_nr* ngap_, + gtpu_interface_rrc* gtpu_, enb_bearer_manager& bearer_mapper_, rrc_eutra_interface_rrc_nr* rrc_eutra_); @@ -128,6 +129,7 @@ private: rlc_interface_rrc* rlc = nullptr; pdcp_interface_rrc* pdcp = nullptr; ngap_interface_rrc_nr* ngap = nullptr; + gtpu_interface_rrc* gtpu = nullptr; rrc_eutra_interface_rrc_nr* rrc_eutra = nullptr; enb_bearer_manager* bearer_mapper = nullptr; diff --git a/srsgnb/src/stack/gnb_stack_nr.cc b/srsgnb/src/stack/gnb_stack_nr.cc index 6aee7373b..fdff1c649 100644 --- a/srsgnb/src/stack/gnb_stack_nr.cc +++ b/srsgnb/src/stack/gnb_stack_nr.cc @@ -95,7 +95,7 @@ int gnb_stack_nr::init(const gnb_stack_args_t& args_, rlc.init(&pdcp, &rrc, &mac, task_sched.get_timer_handler()); - if (rrc.init(rrc_cfg_, phy, &mac, &rlc, &pdcp, ngap.get(), *bearer_manager, x2_) != SRSRAN_SUCCESS) { + if (rrc.init(rrc_cfg_, phy, &mac, &rlc, &pdcp, ngap.get(), gtpu.get(), *bearer_manager, x2_) != SRSRAN_SUCCESS) { stack_logger.error("Couldn't initialize RRC"); return SRSRAN_ERROR; } diff --git a/srsgnb/src/stack/rrc/rrc_nr.cc b/srsgnb/src/stack/rrc/rrc_nr.cc index 03c153008..de5fbfc9e 100644 --- a/srsgnb/src/stack/rrc/rrc_nr.cc +++ b/srsgnb/src/stack/rrc/rrc_nr.cc @@ -39,6 +39,7 @@ int rrc_nr::init(const rrc_nr_cfg_t& cfg_, rlc_interface_rrc* rlc_, pdcp_interface_rrc* pdcp_, ngap_interface_rrc_nr* ngap_, + gtpu_interface_rrc* gtpu_, enb_bearer_manager& bearer_mapper_, rrc_eutra_interface_rrc_nr* rrc_eutra_) { @@ -47,6 +48,7 @@ int rrc_nr::init(const rrc_nr_cfg_t& cfg_, rlc = rlc_; pdcp = pdcp_; ngap = ngap_; + gtpu = gtpu_; bearer_mapper = &bearer_mapper_; rrc_eutra = rrc_eutra_; diff --git a/srsgnb/src/stack/rrc/test/rrc_nr_core_test.cc b/srsgnb/src/stack/rrc/test/rrc_nr_core_test.cc index 14d0f2bd0..41a71b783 100644 --- a/srsgnb/src/stack/rrc/test/rrc_nr_core_test.cc +++ b/srsgnb/src/stack/rrc/test/rrc_nr_core_test.cc @@ -160,8 +160,9 @@ void test_rrc_sa_ngap_integration(ngap_args_t ngap_args) set_derived_nr_cell_params(rrc_cfg_nr.is_standalone, rrc_cfg_nr.cell_list[0]); srsran_assert(check_rrc_nr_cfg_valid(rrc_cfg_nr) == SRSRAN_SUCCESS, "Invalid RRC NR configuration"); - TESTASSERT(rrc_obj.init(rrc_cfg_nr, &phy_obj, &mac_obj, &rlc_obj, &pdcp_obj, &ngap_obj, bearer_mapper, nullptr) == - SRSRAN_SUCCESS); + TESTASSERT( + rrc_obj.init(rrc_cfg_nr, &phy_obj, &mac_obj, &rlc_obj, &pdcp_obj, &ngap_obj, >pu_obj, bearer_mapper, nullptr) == + SRSRAN_SUCCESS); sched_nr_ue_cfg_t uecfg = get_default_ue_cfg(1); uecfg.phy_cfg.pdcch = rrc_cfg_nr.cell_list[0].phy_cell.pdcch; diff --git a/srsgnb/src/stack/rrc/test/rrc_nr_test.cc b/srsgnb/src/stack/rrc/test/rrc_nr_test.cc index 313cb40f1..8720ae719 100644 --- a/srsgnb/src/stack/rrc/test/rrc_nr_test.cc +++ b/srsgnb/src/stack/rrc/test/rrc_nr_test.cc @@ -64,8 +64,9 @@ void test_sib_generation() set_derived_nr_cell_params(rrc_cfg_nr.is_standalone, rrc_cfg_nr.cell_list[0]); srsran_assert(check_rrc_nr_cfg_valid(rrc_cfg_nr) == SRSRAN_SUCCESS, "Invalid RRC NR configuration"); - TESTASSERT(rrc_obj.init(rrc_cfg_nr, &phy_obj, &mac_obj, &rlc_obj, &pdcp_obj, nullptr, bearer_mapper, nullptr) == - SRSRAN_SUCCESS); + TESTASSERT( + rrc_obj.init(rrc_cfg_nr, &phy_obj, &mac_obj, &rlc_obj, &pdcp_obj, nullptr, nullptr, bearer_mapper, nullptr) == + SRSRAN_SUCCESS); const sched_nr_interface::cell_cfg_t& nrcell = mac_obj.nr_cells.at(0); @@ -119,8 +120,9 @@ int test_rrc_setup() srsran::string_to_mnc("01", &rrc_cfg_nr.mnc); set_derived_nr_cell_params(rrc_cfg_nr.is_standalone, rrc_cfg_nr.cell_list[0]); srsran_assert(check_rrc_nr_cfg_valid(rrc_cfg_nr) == SRSRAN_SUCCESS, "Invalid RRC NR configuration"); - TESTASSERT(rrc_obj.init(rrc_cfg_nr, &phy_obj, &mac_obj, &rlc_obj, &pdcp_obj, nullptr, bearer_mapper, nullptr) == - SRSRAN_SUCCESS); + TESTASSERT( + rrc_obj.init(rrc_cfg_nr, &phy_obj, &mac_obj, &rlc_obj, &pdcp_obj, nullptr, nullptr, bearer_mapper, nullptr) == + SRSRAN_SUCCESS); for (uint32_t n = 0; n < 2; ++n) { uint32_t timeout = 5500; @@ -163,8 +165,9 @@ void test_rrc_sa_connection() set_derived_nr_cell_params(rrc_cfg_nr.is_standalone, rrc_cfg_nr.cell_list[0]); srsran_assert(check_rrc_nr_cfg_valid(rrc_cfg_nr) == SRSRAN_SUCCESS, "Invalid RRC NR configuration"); - TESTASSERT(rrc_obj.init(rrc_cfg_nr, &phy_obj, &mac_obj, &rlc_obj, &pdcp_obj, &ngap_obj, bearer_mapper, nullptr) == - SRSRAN_SUCCESS); + TESTASSERT( + rrc_obj.init(rrc_cfg_nr, &phy_obj, &mac_obj, &rlc_obj, &pdcp_obj, &ngap_obj, nullptr, bearer_mapper, nullptr) == + SRSRAN_SUCCESS); sched_nr_ue_cfg_t uecfg = get_default_ue_cfg(1); uecfg.phy_cfg.pdcch = rrc_cfg_nr.cell_list[0].phy_cell.pdcch;