|
|
@ -96,35 +96,26 @@ uint32_t rlc_tm::get_bearer()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// PDCP interface
|
|
|
|
// PDCP interface
|
|
|
|
void rlc_tm::write_sdu(byte_buffer_t *sdu)
|
|
|
|
void rlc_tm::write_sdu(byte_buffer_t *sdu, bool blocking)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (!tx_enabled) {
|
|
|
|
if (!tx_enabled) {
|
|
|
|
byte_buffer_pool::get_instance()->deallocate(sdu);
|
|
|
|
byte_buffer_pool::get_instance()->deallocate(sdu);
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (sdu) {
|
|
|
|
if (sdu) {
|
|
|
|
ul_queue.write(sdu);
|
|
|
|
if (blocking) {
|
|
|
|
log->info_hex(sdu->msg, sdu->N_bytes, "%s Tx SDU, queue size=%d, bytes=%d",
|
|
|
|
ul_queue.write(sdu);
|
|
|
|
rrc->get_rb_name(lcid).c_str(), ul_queue.size(), ul_queue.size_bytes());
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
log->warning("NULL SDU pointer in write_sdu()\n");
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void rlc_tm::write_sdu_nb(byte_buffer_t *sdu)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
if (!tx_enabled) {
|
|
|
|
|
|
|
|
byte_buffer_pool::get_instance()->deallocate(sdu);
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if (sdu) {
|
|
|
|
|
|
|
|
if (ul_queue.try_write(sdu)) {
|
|
|
|
|
|
|
|
log->info_hex(sdu->msg, sdu->N_bytes, "%s Tx SDU, queue size=%d, bytes=%d",
|
|
|
|
log->info_hex(sdu->msg, sdu->N_bytes, "%s Tx SDU, queue size=%d, bytes=%d",
|
|
|
|
rrc->get_rb_name(lcid).c_str(), ul_queue.size(), ul_queue.size_bytes());
|
|
|
|
rrc->get_rb_name(lcid).c_str(), ul_queue.size(), ul_queue.size_bytes());
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
log->debug_hex(sdu->msg, sdu->N_bytes, "[Dropped SDU] %s Tx SDU, queue size=%d, bytes=%d",
|
|
|
|
if (ul_queue.try_write(sdu)) {
|
|
|
|
|
|
|
|
log->info_hex(sdu->msg, sdu->N_bytes, "%s Tx SDU, queue size=%d, bytes=%d",
|
|
|
|
|
|
|
|
rrc->get_rb_name(lcid).c_str(), ul_queue.size(), ul_queue.size_bytes());
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
log->debug_hex(sdu->msg, sdu->N_bytes, "[Dropped SDU] %s Tx SDU, queue size=%d, bytes=%d",
|
|
|
|
rrc->get_rb_name(lcid).c_str(), ul_queue.size(), ul_queue.size_bytes());
|
|
|
|
rrc->get_rb_name(lcid).c_str(), ul_queue.size(), ul_queue.size_bytes());
|
|
|
|
pool->deallocate(sdu);
|
|
|
|
pool->deallocate(sdu);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
log->warning("NULL SDU pointer in write_sdu()\n");
|
|
|
|
log->warning("NULL SDU pointer in write_sdu()\n");
|
|
|
|