mirror of https://github.com/PentHertz/srsLTE.git
Fix test header and queue_capacity check in RLC notifications.
Also, remove unecessary nullptr initializaion and fixup some newlines.
This commit is contained in:
parent
de90b4753f
commit
de669d214a
|
@ -152,7 +152,7 @@ private:
|
||||||
|
|
||||||
// TX SDU buffers
|
// TX SDU buffers
|
||||||
byte_buffer_queue tx_sdu_queue;
|
byte_buffer_queue tx_sdu_queue;
|
||||||
unique_byte_buffer_t tx_sdu = nullptr;
|
unique_byte_buffer_t tx_sdu;
|
||||||
|
|
||||||
bool tx_enabled = false;
|
bool tx_enabled = false;
|
||||||
|
|
||||||
|
|
|
@ -384,7 +384,7 @@ int rlc_am_lte::rlc_am_lte_tx::write_sdu(unique_byte_buffer_t sdu)
|
||||||
if (info_count != 0) {
|
if (info_count != 0) {
|
||||||
log->error("PDCP SDU info alreay exists\n");
|
log->error("PDCP SDU info alreay exists\n");
|
||||||
return SRSLTE_ERROR;
|
return SRSLTE_ERROR;
|
||||||
} else if (info_count > pdcp_info_queue_capacity) {
|
} else if (undelivered_sdu_info_queue.size() >= pdcp_info_queue_capacity) {
|
||||||
log->error("PDCP SDU info exceeds maximum queue capacity\n");
|
log->error("PDCP SDU info exceeds maximum queue capacity\n");
|
||||||
return SRSLTE_ERROR;
|
return SRSLTE_ERROR;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,21 +1,12 @@
|
||||||
/*
|
/**
|
||||||
* Copyright 2013-2020 Software Radio Systems Limited
|
|
||||||
*
|
*
|
||||||
* This file is part of srsLTE.
|
* \section COPYRIGHT
|
||||||
*
|
*
|
||||||
* srsLTE is free software: you can redistribute it and/or modify
|
* Copyright 2013-2021 Software Radio Systems Limited
|
||||||
* it under the terms of the GNU Affero General Public License as
|
|
||||||
* published by the Free Software Foundation, either version 3 of
|
|
||||||
* the License, or (at your option) any later version.
|
|
||||||
*
|
*
|
||||||
* srsLTE is distributed in the hope that it will be useful,
|
* By using this file, you agree to the terms and conditions set
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* forth in the LICENSE file which can be found at the top level of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* the distribution.
|
||||||
* GNU Affero General Public License for more details.
|
|
||||||
*
|
|
||||||
* A copy of the GNU Affero General Public License can be found in
|
|
||||||
* the LICENSE file in the top-level directory of this distribution
|
|
||||||
* and at http://www.gnu.org/licenses/.
|
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -59,7 +50,6 @@ class rrc_tester : public srsue::rrc_interface_rlc
|
||||||
// Simple test of a single TX PDU and an imediate ACK
|
// Simple test of a single TX PDU and an imediate ACK
|
||||||
int simple_sdu_notify_test()
|
int simple_sdu_notify_test()
|
||||||
{
|
{
|
||||||
|
|
||||||
srslte::byte_buffer_pool* pool = srslte::byte_buffer_pool::get_instance();
|
srslte::byte_buffer_pool* pool = srslte::byte_buffer_pool::get_instance();
|
||||||
pdcp_tester pdcp;
|
pdcp_tester pdcp;
|
||||||
rrc_tester rrc;
|
rrc_tester rrc;
|
||||||
|
@ -110,7 +100,6 @@ int simple_sdu_notify_test()
|
||||||
// Both PDUs are ACKed in the same status PDU.
|
// Both PDUs are ACKed in the same status PDU.
|
||||||
int two_pdus_notify_test()
|
int two_pdus_notify_test()
|
||||||
{
|
{
|
||||||
|
|
||||||
srslte::byte_buffer_pool* pool = srslte::byte_buffer_pool::get_instance();
|
srslte::byte_buffer_pool* pool = srslte::byte_buffer_pool::get_instance();
|
||||||
pdcp_tester pdcp;
|
pdcp_tester pdcp;
|
||||||
rrc_tester rrc;
|
rrc_tester rrc;
|
||||||
|
@ -174,7 +163,6 @@ int two_pdus_notify_test()
|
||||||
// The PDU is ACKed imediatly.
|
// The PDU is ACKed imediatly.
|
||||||
int two_sdus_notify_test()
|
int two_sdus_notify_test()
|
||||||
{
|
{
|
||||||
|
|
||||||
srslte::byte_buffer_pool* pool = srslte::byte_buffer_pool::get_instance();
|
srslte::byte_buffer_pool* pool = srslte::byte_buffer_pool::get_instance();
|
||||||
pdcp_tester pdcp;
|
pdcp_tester pdcp;
|
||||||
rrc_tester rrc;
|
rrc_tester rrc;
|
||||||
|
@ -236,7 +224,6 @@ int two_sdus_notify_test()
|
||||||
// The PDU is ACKed imediatly.
|
// The PDU is ACKed imediatly.
|
||||||
int three_sdus_notify_test()
|
int three_sdus_notify_test()
|
||||||
{
|
{
|
||||||
|
|
||||||
srslte::byte_buffer_pool* pool = srslte::byte_buffer_pool::get_instance();
|
srslte::byte_buffer_pool* pool = srslte::byte_buffer_pool::get_instance();
|
||||||
pdcp_tester pdcp;
|
pdcp_tester pdcp;
|
||||||
rrc_tester rrc;
|
rrc_tester rrc;
|
||||||
|
@ -306,10 +293,10 @@ int three_sdus_notify_test()
|
||||||
|
|
||||||
return SRSLTE_SUCCESS;
|
return SRSLTE_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Test notification of an RTXED SDU.
|
// Test notification of an RTXED SDU.
|
||||||
int rtxed_sdu_notify_test()
|
int rtxed_sdu_notify_test()
|
||||||
{
|
{
|
||||||
|
|
||||||
srslte::byte_buffer_pool* pool = srslte::byte_buffer_pool::get_instance();
|
srslte::byte_buffer_pool* pool = srslte::byte_buffer_pool::get_instance();
|
||||||
pdcp_tester pdcp;
|
pdcp_tester pdcp;
|
||||||
rrc_tester rrc;
|
rrc_tester rrc;
|
||||||
|
@ -444,7 +431,6 @@ int two_sdus_out_of_order_ack_notify_test()
|
||||||
// Test out-of-order ack of a single SDU transmitted over 2 PDUs.
|
// Test out-of-order ack of a single SDU transmitted over 2 PDUs.
|
||||||
int two_pdus_out_of_order_ack_notify_test()
|
int two_pdus_out_of_order_ack_notify_test()
|
||||||
{
|
{
|
||||||
|
|
||||||
srslte::byte_buffer_pool* pool = srslte::byte_buffer_pool::get_instance();
|
srslte::byte_buffer_pool* pool = srslte::byte_buffer_pool::get_instance();
|
||||||
pdcp_tester pdcp;
|
pdcp_tester pdcp;
|
||||||
rrc_tester rrc;
|
rrc_tester rrc;
|
||||||
|
@ -502,6 +488,7 @@ int two_pdus_out_of_order_ack_notify_test()
|
||||||
|
|
||||||
return SRSLTE_SUCCESS;
|
return SRSLTE_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
int main(int argc, char** argv)
|
int main(int argc, char** argv)
|
||||||
{
|
{
|
||||||
srslte::byte_buffer_pool::get_instance();
|
srslte::byte_buffer_pool::get_instance();
|
||||||
|
|
Loading…
Reference in New Issue