bypass PDCP for SRB0 processing chain

This commit is contained in:
Andre Puschmann 2019-06-20 15:24:04 +02:00
parent 218f136254
commit 0ef96f789b
3 changed files with 8 additions and 2 deletions

View File

@ -220,6 +220,7 @@ class rrc_interface_rlc
public:
virtual void max_retx_attempted() = 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 bool has_bearer(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

View File

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

View File

@ -2153,7 +2153,7 @@ void rrc::send_ul_ccch_msg(const asn1::rrc::ul_ccch_msg_s& msg)
uint32_t lcid = RB_ID_SRB0;
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)