This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
arvind.sirsikar gerrit-no-reply at lists.osmocom.orgReview at https://gerrit.osmocom.org/861 EGPRS: add test case to show EPDAN bug This patch adds a test case test_tbf_egprs_epdan which expects a current bug with EPDAN for Interpretation of the bitmap explained in section 9.1.8.2.4 in 44.060 version 7.27.0 Release 7. the specification explains that A bit within the uncompressed bitmap whose corresponding BSN is not within the transmit window shall be ignored. But current PCU implementation ignores EPDAN The test's expectation is corrected along with the bug fix in a subsequent commit Change-Id: If32b67f5c05707155281128b776a90a1e3d587b2 Related: OS#1789 --- M src/rlc.h M tests/tbf/TbfTest.cpp 2 files changed, 126 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/61/861/1 diff --git a/src/rlc.h b/src/rlc.h index b693418..2baf134 100644 --- a/src/rlc.h +++ b/src/rlc.h @@ -302,6 +302,9 @@ const uint16_t v_a() const; const int16_t distance() const; + void set_v_s(int); + void set_v_a(int); + /* Methods to manage reception */ int resend_needed(); int mark_for_resend(); @@ -509,6 +512,16 @@ return m_v_s; } +inline void gprs_rlc_dl_window::set_v_s(int v_s) +{ + m_v_s = v_s; +} + +inline void gprs_rlc_dl_window::set_v_a(int v_a) +{ + m_v_a = v_a; +} + inline const uint16_t gprs_rlc_dl_window::v_s_mod(int offset) const { return mod_sns(m_v_s + offset); diff --git a/tests/tbf/TbfTest.cpp b/tests/tbf/TbfTest.cpp index 3e17d8f..5be5686 100644 --- a/tests/tbf/TbfTest.cpp +++ b/tests/tbf/TbfTest.cpp @@ -26,6 +26,7 @@ #include "pcu_utils.h" #include "gprs_bssgp_pcu.h" #include "pcu_l1_if.h" +#include "decoding.h" extern "C" { #include "pcu_vty.h" @@ -2016,6 +2017,117 @@ printf("=== end %s ===\n", __func__); } +/* + * This test simulates the section 9.1.8.2.4 of 44.060 + * version 7.27.0 Release 7. which explains the Interpretation of the bitmap + * as a bit within the uncompressed bitmap whose BSN is not within the transmit + * window shall be ignored. Which fails because of existing bug. This test case + * expects the same bug. which shall be fixed in subsequent patch + */ +static void egprs_tbf_epdan_outof_rx_window(BTS *the_bts, int mcs) +{ + unsigned i; + uint8_t ms_class = 11; + uint8_t egprs_ms_class = 11; + uint32_t fn = 2654167; /* 17,25,9 */ + uint8_t trx_no; + int num_blocks; + uint32_t tlli = 0xffeeddcc; + uint8_t rbb[64/8]; + gprs_rlcmac_dl_tbf *dl_tbf; + int ts_no = 7; + bitvec *block; + uint8_t bits_data[RLC_EGPRS_MAX_WS/8]; + bitvec bits; + int bsn_begin, bsn_end; + EGPRS_PD_AckNack_t *ack_nack; + RlcMacUplink_t ul_control_block; + gprs_rlcmac_bts *bts; + + /* + * Over the Air message captured. The same has been used + * used to simulate the EPDAN out of window scenario. During + * over the air testing, v_a was 1176, vs was 1288, max sns was 2048 + * and window size of 480. same has been used below + */ + uint8_t data_msg[23] = {0x40, 0x20, 0x0b, 0xff, 0xd1, + 0x61, 0x00, 0x3e, 0x0e, 0x51, 0x9f, + 0xff, 0xff, 0xfb, 0x80, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; + + bts = the_bts->bts_data(); + + bts->initial_mcs_dl = mcs; + + dl_tbf = create_dl_tbf(the_bts, ms_class, egprs_ms_class, &trx_no); + dl_tbf->update_ms(tlli, GPRS_RLCMAC_DL_TBF); + + dl_tbf->m_window.set_v_s(1288); + dl_tbf->m_window.set_v_a(1176); + dl_tbf->m_window.set_sns(2048); + dl_tbf->m_window.set_ws(480); + dl_tbf->m_window.m_v_b.mark_unacked(1176); + dl_tbf->m_window.m_v_b.mark_unacked(1177); + dl_tbf->m_window.m_v_b.mark_unacked(1287); + dl_tbf->m_window.m_v_b.mark_unacked(1286); + + OSMO_ASSERT(dl_tbf->state_is(GPRS_RLCMAC_FLOW)); + + block = bitvec_alloc(23); + + bitvec_unpack(block, data_msg); + + bits.data = bits_data; + bits.data_len = sizeof(bits_data); + bits.cur_bit = 0; + + decode_gsm_rlcmac_uplink(block, &ul_control_block); + + ack_nack = &ul_control_block.u.Egprs_Packet_Downlink_Ack_Nack; + + OSMO_ASSERT(dl_tbf->m_window.m_v_b.is_unacked(1176)); + OSMO_ASSERT(dl_tbf->m_window.m_v_b.is_unacked(1177)); + OSMO_ASSERT(dl_tbf->m_window.m_v_b.is_unacked(1287)); + OSMO_ASSERT(dl_tbf->m_window.m_v_b.is_unacked(1286)); + + num_blocks = Decoding::decode_egprs_acknack_bits( + &ack_nack->EGPRS_AckNack.Desc, &bits, + &bsn_begin, &bsn_end, &dl_tbf->m_window); + + dl_tbf->rcvd_dl_ack( + ack_nack->EGPRS_AckNack.Desc.FINAL_ACK_INDICATION, + bsn_begin, &bits); + + OSMO_ASSERT(dl_tbf->m_window.m_v_b.is_unacked(1176)); + OSMO_ASSERT(dl_tbf->m_window.m_v_b.is_unacked(1177)); + OSMO_ASSERT(dl_tbf->m_window.m_v_b.is_unacked(1287)); + OSMO_ASSERT(dl_tbf->m_window.m_v_b.is_unacked(1286)); + + bitvec_free(block); + tbf_free(dl_tbf); +} + +static void test_tbf_egprs_epdan(void) +{ + BTS the_bts; + gprs_rlcmac_bts *bts; + uint8_t ts_no = 4; + int i; + + printf("=== start %s ===\n", __func__); + + bts = the_bts.bts_data(); + + setup_bts(&the_bts, ts_no); + bts->dl_tbf_idle_msec = 200; + bts->egprs_enabled = 1; + /* ARQ II */ + bts->dl_arq_type = EGPRS_ARQ2; + + egprs_tbf_epdan_outof_rx_window(&the_bts, 4); + + printf("=== end %s ===\n", __func__); +} static void test_tbf_egprs_two_phase_spb(void) { @@ -2695,6 +2807,7 @@ test_tbf_puan_urbb_len(); test_tbf_update_ws(); test_tbf_li_decoding(); + test_tbf_egprs_epdan(); if (getenv("TALLOC_REPORT_FULL")) talloc_report_full(tall_pcu_ctx, stderr); -- To view, visit https://gerrit.osmocom.org/861 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If32b67f5c05707155281128b776a90a1e3d587b2 Gerrit-PatchSet: 1 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: arvind.sirsikar <arvind.sirsikar at radisys.com>