mirror of https://github.com/PentHertz/srsLTE.git
enb_stack_lte: implement the PDCP interface for GTPU on the stack
this prepares for a change in which GTPU no longer writes into PDCP directly but instead uses the stack as a wrapper. For this the interface will be changed to use the EPS bearer ID instead of the LCID The stack will know which PDCP entity (EUTRA or NR) is currently associated with the EPS bearer ID and will forward the PDU accordingly.
This commit is contained in:
parent
5f9aceb8b6
commit
ebef8a4cc4
|
@ -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<uint32_t, srsran::unique_byte_buffer_t> get_buffered_pdus(uint16_t rnti, uint32_t lcid) override;
|
||||
|
||||
private:
|
||||
static const int STACK_MAIN_THREAD_PRIO = 4;
|
||||
// thread loop
|
||||
|
|
|
@ -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<uint32_t, srsran::unique_byte_buffer_t> enb_stack_lte::get_buffered_pdus(uint16_t rnti, uint32_t lcid)
|
||||
{
|
||||
return pdcp.get_buffered_pdus(rnti, lcid);
|
||||
}
|
||||
|
||||
} // namespace srsenb
|
||||
|
|
Loading…
Reference in New Issue