|
|
@ -750,7 +750,7 @@ int retx_segment_test()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
TESTASSERT(0 == rlc1.get_buffer_state());
|
|
|
|
TESTASSERT(0 == rlc1.get_buffer_state());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
/*
|
|
|
|
|
|
|
|
// Check statistics
|
|
|
|
// Check statistics
|
|
|
|
rlc_bearer_metrics_t metrics1 = rlc1.get_metrics();
|
|
|
|
rlc_bearer_metrics_t metrics1 = rlc1.get_metrics();
|
|
|
|
rlc_bearer_metrics_t metrics2 = rlc2.get_metrics();
|
|
|
|
rlc_bearer_metrics_t metrics2 = rlc2.get_metrics();
|
|
|
@ -761,17 +761,20 @@ int retx_segment_test()
|
|
|
|
TESTASSERT_EQ(15, metrics1.num_tx_sdu_bytes);
|
|
|
|
TESTASSERT_EQ(15, metrics1.num_tx_sdu_bytes);
|
|
|
|
TESTASSERT_EQ(0, metrics1.num_rx_sdu_bytes);
|
|
|
|
TESTASSERT_EQ(0, metrics1.num_rx_sdu_bytes);
|
|
|
|
TESTASSERT_EQ(0, metrics1.num_lost_sdus);
|
|
|
|
TESTASSERT_EQ(0, metrics1.num_lost_sdus);
|
|
|
|
|
|
|
|
|
|
|
|
// PDU metrics
|
|
|
|
// PDU metrics
|
|
|
|
TESTASSERT_EQ(5 + 3, metrics1.num_tx_pdus); // 3 re-transmissions
|
|
|
|
TESTASSERT_EQ(15 + 3, metrics1.num_tx_pdus); // 15 PDUs + 3 re-transmissions
|
|
|
|
TESTASSERT_EQ(2, metrics1.num_rx_pdus); // Two status PDU
|
|
|
|
TESTASSERT_EQ(2, metrics1.num_rx_pdus); // Two status PDU
|
|
|
|
TESTASSERT_EQ(38, metrics1.num_tx_pdu_bytes); // 2 Bytes * NBUFFS (header size) + NBUFFS * 3 (data) +
|
|
|
|
TESTASSERT_EQ(78, metrics1.num_tx_pdu_bytes); // 3 Bytes * 5 (5 PDUs without SO) + 10 * 5 (10 PDUs with SO)
|
|
|
|
// 3 (1 retx no SO) + 2 * 5 (2 retx with SO) = 38
|
|
|
|
// 3 (1 retx no SO) + 2 * 5 (2 retx with SO) = 78
|
|
|
|
TESTASSERT_EQ(3 + 5, metrics1.num_rx_pdu_bytes); // Two status PDU (one with a NACK)
|
|
|
|
TESTASSERT_EQ(24, metrics1.num_rx_pdu_bytes); // Two status PDU. One with just an ack (3 bytes)
|
|
|
|
|
|
|
|
// Another with 3 NACKs all with SO. (3 + 3*6 bytes)
|
|
|
|
TESTASSERT_EQ(0, metrics1.num_lost_sdus); // No lost SDUs
|
|
|
|
TESTASSERT_EQ(0, metrics1.num_lost_sdus); // No lost SDUs
|
|
|
|
|
|
|
|
|
|
|
|
// PDU metrics
|
|
|
|
// PDU metrics
|
|
|
|
TESTASSERT_EQ(0, metrics2.num_tx_sdus);
|
|
|
|
TESTASSERT_EQ(0, metrics2.num_tx_sdus);
|
|
|
|
TESTASSERT_EQ(5, metrics2.num_rx_sdus);
|
|
|
|
TESTASSERT_EQ(5, metrics2.num_rx_sdus);
|
|
|
|
|
|
|
|
/*
|
|
|
|
TESTASSERT_EQ(0, metrics2.num_tx_sdu_bytes);
|
|
|
|
TESTASSERT_EQ(0, metrics2.num_tx_sdu_bytes);
|
|
|
|
TESTASSERT_EQ(15, metrics2.num_rx_sdu_bytes); // 5 SDUs, 3 bytes each
|
|
|
|
TESTASSERT_EQ(15, metrics2.num_rx_sdu_bytes); // 5 SDUs, 3 bytes each
|
|
|
|
TESTASSERT_EQ(0, metrics2.num_lost_sdus);
|
|
|
|
TESTASSERT_EQ(0, metrics2.num_lost_sdus);
|
|
|
|