|
|
|
@ -222,7 +222,7 @@ int test_tx_all(srslte::byte_buffer_pool* pool, srslte::log* log)
|
|
|
|
|
srslte::unique_byte_buffer_t pdu_exp_sn0_len18 = allocate_unique_buffer(*pool);
|
|
|
|
|
memcpy(pdu_exp_sn0_len18->msg, pdu4, PDU4_LEN);
|
|
|
|
|
pdu_exp_sn0_len18->N_bytes = PDU4_LEN;
|
|
|
|
|
//TESTASSERT(test_tx(1, srslte::PDCP_SN_LEN_18, std::move(pdu_exp_sn0_len18), pool, log) == 0);
|
|
|
|
|
TESTASSERT(test_tx(1, srslte::PDCP_SN_LEN_18, std::move(pdu_exp_sn0_len18), pool, log) == 0);
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
* TX Test 5: PDCP Entity with SN LEN = 18
|
|
|
|
@ -254,14 +254,14 @@ int test_tx_all(srslte::byte_buffer_pool* pool, srslte::log* log)
|
|
|
|
|
* RX Test: PDCP Entity with SN LEN = 12 and 18. Tested 4097 packets received without losses.
|
|
|
|
|
* PDCP entity configured with EIA2 and EEA2
|
|
|
|
|
*/
|
|
|
|
|
int test_rx_in_sequence(uint32_t n_packets, srslte::byte_buffer_pool* pool, srslte::log* log)
|
|
|
|
|
int test_rx_in_sequence(uint32_t n_packets, uint8_t pdcp_sn_len, srslte::byte_buffer_pool* pool, srslte::log* log)
|
|
|
|
|
{
|
|
|
|
|
srslte::pdcp_entity_nr pdcp_tx;
|
|
|
|
|
srslte::pdcp_entity_nr pdcp_rx;
|
|
|
|
|
srslte::srslte_pdcp_config_t cfg_tx = {
|
|
|
|
|
1, srslte::PDCP_RB_IS_DRB, SECURITY_DIRECTION_UPLINK, SECURITY_DIRECTION_DOWNLINK, srslte::PDCP_SN_LEN_12};
|
|
|
|
|
1, srslte::PDCP_RB_IS_DRB, SECURITY_DIRECTION_UPLINK, SECURITY_DIRECTION_DOWNLINK, pdcp_sn_len};
|
|
|
|
|
srslte::srslte_pdcp_config_t cfg_rx = {
|
|
|
|
|
1, srslte::PDCP_RB_IS_DRB, SECURITY_DIRECTION_DOWNLINK, SECURITY_DIRECTION_UPLINK, srslte::PDCP_SN_LEN_12};
|
|
|
|
|
1, srslte::PDCP_RB_IS_DRB, SECURITY_DIRECTION_DOWNLINK, SECURITY_DIRECTION_UPLINK, pdcp_sn_len};
|
|
|
|
|
|
|
|
|
|
rlc_dummy rlc_tx(log);
|
|
|
|
|
rrc_dummy rrc_tx(log);
|
|
|
|
@ -319,7 +319,8 @@ int run_all_tests(srslte::byte_buffer_pool* pool)
|
|
|
|
|
log.set_hex_limit(128);
|
|
|
|
|
|
|
|
|
|
TESTASSERT(test_tx_all(pool, &log) == 0);
|
|
|
|
|
TESTASSERT(test_rx_in_sequence(4097, pool, &log) == 0);
|
|
|
|
|
TESTASSERT(test_rx_in_sequence(4097, srslte::PDCP_SN_LEN_12, pool, &log) == 0);
|
|
|
|
|
TESTASSERT(test_rx_in_sequence(262145, srslte::PDCP_SN_LEN_18, pool, &log) == 0);
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|