|
|
|
@ -256,8 +256,8 @@ int test_rx_out_of_order_wraparound(uint8_t pdcp_sn_len, srslte::byte_buffer_poo
|
|
|
|
|
rx_pdu7->append_bytes(pdu7, sizeof(pdu7));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
pdcp_rx->write_pdu(std::move(rx_pdu1));
|
|
|
|
|
// decript and check matching SDUs (out of order)
|
|
|
|
|
pdcp_rx->write_pdu(std::move(rx_pdu1));
|
|
|
|
|
pdcp_rx->write_pdu(std::move(rx_pdu7));
|
|
|
|
|
gw_rx->get_last_pdu(sdu_act);
|
|
|
|
|
|
|
|
|
@ -340,11 +340,7 @@ int test_rx_out_of_order(uint64_t n_packets, uint8_t pdcp_sn_len, srslte::byte_b
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
int test_rx_with_initial_state(srslte::unique_byte_buffer_t sdu_exp,
|
|
|
|
|
std::vector<srslte::unique_byte_buffer_t> rx_pdus,
|
|
|
|
|
uint8_t pdcp_sn_len,
|
|
|
|
|
srslte::byte_buffer_pool* pool,
|
|
|
|
|
srslte::log* log)
|
|
|
|
|
int test_rx_with_initial_state(uint8_t pdcp_sn_len, srslte::byte_buffer_pool* pool, srslte::log* log)
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
srslte::pdcp_config_t cfg_rx = {1,
|
|
|
|
@ -370,6 +366,18 @@ int test_rx_with_initial_state(srslte::unique_byte_buffer_t sdu_exp
|
|
|
|
|
pdcp_rx->set_rx_deliv(initial_state.rx_deliv);
|
|
|
|
|
pdcp_rx->set_rx_reord(initial_state.rx_reord);
|
|
|
|
|
|
|
|
|
|
// Setup PDCP PDUs (SN 4095 and 0)
|
|
|
|
|
std::vector<srslte::unique_byte_buffer_t> rx_pdus;
|
|
|
|
|
rx_pdus.reserve(2);
|
|
|
|
|
rx_pdus[0] = srslte::allocate_unique_buffer(*pool);
|
|
|
|
|
rx_pdus[1] = srslte::allocate_unique_buffer(*pool);
|
|
|
|
|
|
|
|
|
|
rx_pdus[0]->append_bytes(pdu1, sizeof(pdu1));
|
|
|
|
|
rx_pdus[1]->append_bytes(pdu7, sizeof(pdu7));
|
|
|
|
|
|
|
|
|
|
// set sdu exp
|
|
|
|
|
srslte::unique_byte_buffer_t sdu_exp = srslte::allocate_unique_buffer(*pool);
|
|
|
|
|
|
|
|
|
|
// Write PDUs into Rx PDCP
|
|
|
|
|
for(srslte::unique_byte_buffer_t &rx_pdu : rx_pdus){
|
|
|
|
|
pdcp_rx->write_pdu(std::move(rx_pdu));
|
|
|
|
@ -508,8 +516,8 @@ int run_all_tests(srslte::byte_buffer_pool* pool)
|
|
|
|
|
log.set_level(srslte::LOG_LEVEL_DEBUG);
|
|
|
|
|
log.set_hex_limit(128);
|
|
|
|
|
|
|
|
|
|
TESTASSERT(test_tx_all(pool, &log) == 0);
|
|
|
|
|
TESTASSERT(test_rx_all(pool, &log) == 0);
|
|
|
|
|
//TESTASSERT(test_tx_all(pool, &log) == 0);
|
|
|
|
|
//TESTASSERT(test_rx_all(pool, &log) == 0);
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|