bypass PDCP for SRB0 processing chain

master
Andre Puschmann 6 years ago
parent 218f136254
commit 0ef96f789b

@ -220,6 +220,7 @@ class rrc_interface_rlc
public: public:
virtual void max_retx_attempted() = 0; virtual void max_retx_attempted() = 0;
virtual std::string get_rb_name(uint32_t lcid) = 0; virtual std::string get_rb_name(uint32_t lcid) = 0;
virtual void write_pdu(uint32_t lcid, srslte::unique_byte_buffer_t pdu) = 0;
}; };
@ -284,6 +285,7 @@ public:
virtual void change_lcid(uint32_t old_lcid, uint32_t new_lcid) = 0; virtual void change_lcid(uint32_t old_lcid, uint32_t new_lcid) = 0;
virtual bool has_bearer(uint32_t lcid) = 0; virtual bool has_bearer(uint32_t lcid) = 0;
virtual bool has_data(const uint32_t lcid) = 0; virtual bool has_data(const uint32_t lcid) = 0;
virtual void write_sdu(uint32_t lcid, srslte::unique_byte_buffer_t sdu, bool blocking = true) = 0;
}; };
// RLC interface for PDCP // RLC interface for PDCP

@ -183,7 +183,11 @@ void rlc_tm::write_pdu(uint8_t *payload, uint32_t nof_bytes)
buf->N_bytes = nof_bytes; buf->N_bytes = nof_bytes;
buf->set_timestamp(); buf->set_timestamp();
num_rx_bytes += nof_bytes; num_rx_bytes += nof_bytes;
if (rrc->get_rb_name(lcid) == "SRB0") {
rrc->write_pdu(lcid, std::move(buf));
} else {
pdcp->write_pdu(lcid, std::move(buf)); pdcp->write_pdu(lcid, std::move(buf));
}
} else { } else {
log->error("Fatal Error: Couldn't allocate buffer in rlc_tm::write_pdu().\n"); log->error("Fatal Error: Couldn't allocate buffer in rlc_tm::write_pdu().\n");
} }

@ -2153,7 +2153,7 @@ void rrc::send_ul_ccch_msg(const asn1::rrc::ul_ccch_msg_s& msg)
uint32_t lcid = RB_ID_SRB0; uint32_t lcid = RB_ID_SRB0;
log_rrc_message(get_rb_name(lcid).c_str(), Tx, pdcp_buf.get(), msg); log_rrc_message(get_rb_name(lcid).c_str(), Tx, pdcp_buf.get(), msg);
pdcp->write_sdu(lcid, std::move(pdcp_buf)); rlc->write_sdu(lcid, std::move(pdcp_buf));
} }
void rrc::send_ul_dcch_msg(uint32_t lcid, const asn1::rrc::ul_dcch_msg_s& msg) void rrc::send_ul_dcch_msg(uint32_t lcid, const asn1::rrc::ul_dcch_msg_s& msg)

Loading…
Cancel
Save