|
|
@ -90,14 +90,14 @@ bool rlc_am::configure(const rlc_config_t& cfg_)
|
|
|
|
|
|
|
|
|
|
|
|
void rlc_am::stop()
|
|
|
|
void rlc_am::stop()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
RlcDebug("Stopped bearer %s", rb_name.c_str());
|
|
|
|
RlcDebug("Stopped bearer");
|
|
|
|
tx_base->stop();
|
|
|
|
tx_base->stop();
|
|
|
|
rx_base->stop();
|
|
|
|
rx_base->stop();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void rlc_am::reestablish()
|
|
|
|
void rlc_am::reestablish()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
RlcDebug("Reestablished bearer %s", rb_name.c_str());
|
|
|
|
RlcDebug("Reestablished bearer");
|
|
|
|
tx_base->reestablish(); // calls stop and enables tx again
|
|
|
|
tx_base->reestablish(); // calls stop and enables tx again
|
|
|
|
rx_base->reestablish(); // calls only stop
|
|
|
|
rx_base->reestablish(); // calls only stop
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -221,13 +221,12 @@ int rlc_am::rlc_am_base_tx::write_sdu(unique_byte_buffer_t sdu)
|
|
|
|
uint32_t nof_bytes = sdu->N_bytes;
|
|
|
|
uint32_t nof_bytes = sdu->N_bytes;
|
|
|
|
srsran::error_type<unique_byte_buffer_t> ret = tx_sdu_queue.try_write(std::move(sdu));
|
|
|
|
srsran::error_type<unique_byte_buffer_t> ret = tx_sdu_queue.try_write(std::move(sdu));
|
|
|
|
if (ret) {
|
|
|
|
if (ret) {
|
|
|
|
RlcHexInfo(msg_ptr, nof_bytes, "%s Tx SDU (%d B, tx_sdu_queue_len=%d)", rb_name, nof_bytes, tx_sdu_queue.size());
|
|
|
|
RlcHexInfo(msg_ptr, nof_bytes, "Tx SDU (%d B, tx_sdu_queue_len=%d)", nof_bytes, tx_sdu_queue.size());
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
// in case of fail, the try_write returns back the sdu
|
|
|
|
// in case of fail, the try_write returns back the sdu
|
|
|
|
RlcHexWarning(ret.error()->msg,
|
|
|
|
RlcHexWarning(ret.error()->msg,
|
|
|
|
ret.error()->N_bytes,
|
|
|
|
ret.error()->N_bytes,
|
|
|
|
"[Dropped SDU] %s Tx SDU (%d B, tx_sdu_queue_len=%d)",
|
|
|
|
"[Dropped SDU] Tx SDU (%d B, tx_sdu_queue_len=%d)",
|
|
|
|
rb_name,
|
|
|
|
|
|
|
|
ret.error()->N_bytes,
|
|
|
|
ret.error()->N_bytes,
|
|
|
|
tx_sdu_queue.size());
|
|
|
|
tx_sdu_queue.size());
|
|
|
|
return SRSRAN_ERROR;
|
|
|
|
return SRSRAN_ERROR;
|
|
|
@ -248,7 +247,7 @@ void rlc_am::rlc_am_base_tx::set_bsr_callback(bsr_callback_t callback)
|
|
|
|
*******************************************************/
|
|
|
|
*******************************************************/
|
|
|
|
void rlc_am::rlc_am_base_rx::write_pdu(uint8_t* payload, const uint32_t nof_bytes)
|
|
|
|
void rlc_am::rlc_am_base_rx::write_pdu(uint8_t* payload, const uint32_t nof_bytes)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
RlcInfo("Rx PDU -- N bytes %d", nof_bytes);
|
|
|
|
RlcInfo("Rx PDU - N bytes %d", nof_bytes);
|
|
|
|
if (nof_bytes < 1) {
|
|
|
|
if (nof_bytes < 1) {
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|