enb,nr: fix GTPU handler to forward UL PDUs

master
Andre Puschmann 3 years ago
parent bc4388a78c
commit 426e876047

@ -31,7 +31,8 @@ struct gtpu_args_t {
class gtpu_interface_pdcp
{
public:
virtual void write_pdu(uint16_t rnti, uint32_t bearer_id, srsran::unique_byte_buffer_t pdu) = 0;
// PDCP will only know LCIDs, translation to EPS bearer id will be done by gtpu_pdcp_adapter
virtual void write_pdu(uint16_t rnti, uint32_t lcid, srsran::unique_byte_buffer_t pdu) = 0;
};
// GTPU interface for RRC

@ -10,6 +10,7 @@
*
*/
#include "srsran/interfaces/enb_gtpu_interfaces.h"
#include "srsran/interfaces/enb_pdcp_interfaces.h"
#include "srsran/interfaces/enb_rrc_interface_types.h"
@ -93,7 +94,8 @@ public:
class x2_interface : public rrc_nr_interface_rrc,
public rrc_eutra_interface_rrc_nr,
public stack_nr_interface_stack_eutra,
public pdcp_interface_gtpu
public pdcp_interface_gtpu, // allow GTPU to access PDCP in DL direction
public gtpu_interface_pdcp // allow PDCP to access GTPU in UL direction
{};
} // namespace srsenb

@ -119,6 +119,9 @@ public:
rrc.sgnb_addition_complete(eutra_rnti, nr_rnti);
}
// gtpu_interface_pdcp
void write_pdu(uint16_t rnti, uint32_t lcid, srsran::unique_byte_buffer_t pdu);
private:
static const int STACK_MAIN_THREAD_PRIO = 4;
// thread loop

@ -110,6 +110,15 @@ public:
return nr_stack->get_buffered_pdus(rnti, lcid);
}
// gtpu_interface_pdcp
void write_pdu(uint16_t rnti, uint32_t bearer_id, srsran::unique_byte_buffer_t pdu)
{
if (eutra_stack == nullptr) {
return;
}
eutra_stack->write_pdu(rnti, bearer_id, std::move(pdu));
}
private:
enb_stack_lte* eutra_stack = nullptr;
gnb_stack_nr* nr_stack = nullptr;

@ -281,4 +281,10 @@ void enb_stack_lte::run_thread()
}
}
void enb_stack_lte::write_pdu(uint16_t rnti, uint32_t lcid, srsran::unique_byte_buffer_t pdu)
{
// call GTPU adapter to map to EPS bearer
gtpu_adapter->write_pdu(rnti, lcid, std::move(pdu));
}
} // namespace srsenb

@ -80,7 +80,7 @@ int gnb_stack_nr::init(const srsenb::stack_args_t& args_,
}
rlc.init(&pdcp, &rrc, &mac, task_sched.get_timer_handler());
pdcp.init(&rlc, &rrc, nullptr);
pdcp.init(&rlc, &rrc, x2_);
if (rrc.init(rrc_cfg_, phy, &mac, &rlc, &pdcp, nullptr, nullptr, x2_) != SRSRAN_SUCCESS) {
stack_logger.error("Couldn't initialize RRC");

Loading…
Cancel
Save