diff --git a/srsenb/hdr/stack/enb_stack_lte.h b/srsenb/hdr/stack/enb_stack_lte.h index 925c64f5e..94d970b63 100644 --- a/srsenb/hdr/stack/enb_stack_lte.h +++ b/srsenb/hdr/stack/enb_stack_lte.h @@ -38,6 +38,7 @@ namespace srsenb { class enb_stack_lte final : public enb_stack_base, public stack_interface_phy_lte, public stack_interface_phy_nr, + public pdcp_interface_gtpu, public srsran::thread { public: @@ -132,6 +133,10 @@ public: } void rach_detected(const rach_info_t& rach_info) override { mac_nr.rach_detected(rach_info); } + // pdcp_interface_gtpu + void write_sdu(uint16_t rnti, uint32_t lcid, srsran::unique_byte_buffer_t sdu, int pdcp_sn = -1) override; + std::map get_buffered_pdus(uint16_t rnti, uint32_t lcid) override; + private: static const int STACK_MAIN_THREAD_PRIO = 4; // thread loop diff --git a/srsenb/src/stack/enb_stack_lte.cc b/srsenb/src/stack/enb_stack_lte.cc index e936d3a79..14e231dcb 100644 --- a/srsenb/src/stack/enb_stack_lte.cc +++ b/srsenb/src/stack/enb_stack_lte.cc @@ -187,7 +187,7 @@ int enb_stack_lte::init(const stack_args_t& args_, const rrc_cfg_t& rrc_cfg_) gtpu_args.mme_addr = args.s1ap.mme_addr; gtpu_args.gtp_bind_addr = args.s1ap.gtp_bind_addr; gtpu_args.indirect_tunnel_timeout_msec = args.gtpu_indirect_tunnel_timeout_msec; - if (gtpu.init(gtpu_args, &pdcp) != SRSRAN_SUCCESS) { + if (gtpu.init(gtpu_args, this) != SRSRAN_SUCCESS) { stack_logger.error("Couldn't initialize GTPU"); return SRSRAN_ERROR; } @@ -278,4 +278,17 @@ void enb_stack_lte::run_thread() } } +void enb_stack_lte::write_sdu(uint16_t rnti, + uint32_t lcid /* to be replaced with eps_bearer_id */, + srsran::unique_byte_buffer_t sdu, + int pdcp_sn) +{ + pdcp.write_sdu(rnti, lcid, std::move(sdu), pdcp_sn); +} + +std::map enb_stack_lte::get_buffered_pdus(uint16_t rnti, uint32_t lcid) +{ + return pdcp.get_buffered_pdus(rnti, lcid); +} + } // namespace srsenb