Make WaitIndication T3172 configurable

Tbftest expectatins need to change because 5000/20 = 250 < 255, hence
the message is now sent as units of 20ms instead of seconds.

Related: OS#3928
Change-Id: I48b34b94b1a5dfb046a3a6cf8a0d944a7c9b6754
changes/08/23908/1
Pau Espin 2 years ago
parent 54742f287c
commit 2ab840a1fa
  1. 3
      src/bts.cpp
  2. 14
      src/encoding.cpp
  3. 4
      src/encoding.h
  4. 4
      src/tbf.cpp
  5. 2
      tests/tbf/TbfTest.cpp
  6. 2
      tests/tbf/TbfTest.err

@ -76,8 +76,9 @@ void bts_trx_free_all_tbf(struct gprs_rlcmac_trx *trx)
}
static struct osmo_tdef T_defs_bts[] = {
{ .T=3142, .default_val=20, .unit=OSMO_TDEF_S, .desc="Wait Indication used in Imm Ass Reject during TBF Establishment (s)", .val=0, .min_val = 0, .max_val = 255 }, /* TS 44.018 10.5.2.43 */
{ .T=3142, .default_val=20, .unit=OSMO_TDEF_S, .desc="Wait Indication used in Imm Ass Reject during TBF Establishment (CCCH) (s)", .val=0, .min_val = 0, .max_val = 255 }, /* TS 44.018 10.5.2.43, TS 44.060 7.1.3.2.1 (T3172) */
{ .T=3169, .default_val=5, .unit=OSMO_TDEF_S, .desc="Reuse of USF and TFI(s) after the MS uplink TBF assignment is invalid (s)", .val=0 },
{ .T=3172, .default_val=5000,.unit=OSMO_TDEF_MS, .desc="Wait Indication used in Imm Ass Reject during TBF Establishment (PACCH) (s)", .val=0, .min_val = 0, .max_val = 255000 }, /* TS 44.060 7.1.3.2.1 */
{ .T=3191, .default_val=5, .unit=OSMO_TDEF_S, .desc="Reuse of TFI(s) after sending (1) last RLC Data Block on TBF(s), or (2) PACKET TBF RELEASE for an MBMS radio bearer (s)", .val=0 },
{ .T=3193, .default_val=100, .unit=OSMO_TDEF_MS, .desc="Reuse of TFI(s) after reception of final PACKET DOWNLINK ACK/NACK from MS for TBF (ms)", .val=0 },
{ .T=3195, .default_val=5, .unit=OSMO_TDEF_S, .desc="Reuse of TFI(s) upon no response from the MS (radio failure or cell change) for TBF/MBMS radio bearer (s)", .val=0 },

@ -1711,7 +1711,7 @@ void Encoding::rlc_data_to_dl_append_egprs_li_padding(
* 8.1.2.5 Establishment of uplink TBF
*/
void Encoding::write_packet_access_reject(
bitvec * dest, uint32_t tlli)
bitvec * dest, uint32_t tlli, unsigned long t3172_ms)
{
unsigned wp = 0;
@ -1725,9 +1725,15 @@ void Encoding::write_packet_access_reject(
bitvec_write_field(dest, &wp, 0x0, 1); // TLLI / G-RNTI : bit (32)
bitvec_write_field(dest, &wp, tlli, 32); // CONTENTION_RESOLUTION_TLLI
bitvec_write_field(dest, &wp, 1, 1); // WAIT_INDICATION size in seconds
/* TODO: make it configurable */
bitvec_write_field(dest, &wp, 5, 8); // WAIT_INDICATION value
bitvec_write_field(dest, &wp, 0, 1); // WAIT_INDICATION size in seconds
/* WAIT_INDICATION, WAIT_INDICATION_SIZE */
if (t3172_ms / 20 <= 255) { /* In units of 20 milliseconds */
bitvec_write_field(dest, &wp, t3172_ms/20, 8);
bitvec_write_field(dest, &wp, 1, 1);
} else { /* value too big to fit in ms, do it in seconds */
bitvec_write_field(dest, &wp, t3172_ms/1000, 8);
bitvec_write_field(dest, &wp, 0, 1);
}
}
void write_packet_neighbour_cell_data(RlcMacDownlink_t *block,

@ -78,8 +78,8 @@ public:
static void encode_rbb(const char *show_rbb, uint8_t *rbb);
static void write_packet_access_reject(
bitvec * dest, uint32_t tlli);
static void write_packet_access_reject(bitvec * dest, uint32_t tlli,
unsigned long t3172_ms);
static void write_packet_uplink_ack(
bitvec * dest, struct gprs_rlcmac_ul_tbf *tbf, bool is_final,

@ -955,8 +955,8 @@ struct msgb *gprs_rlcmac_tbf::create_packet_access_reject()
bitvec_unhex(packet_access_rej, DUMMY_VEC);
Encoding::write_packet_access_reject(
packet_access_rej, tlli());
Encoding::write_packet_access_reject(packet_access_rej, tlli(),
osmo_tdef_get(bts->T_defs_bts, 3172, OSMO_TDEF_MS, -1));
bts_do_rate_ctr_inc(bts, CTR_PKT_ACCESS_REJ);

@ -3264,7 +3264,7 @@ void test_packet_access_rej_epdan()
the_pcu = gprs_pcu_alloc(tall_pcu_ctx);
struct gprs_rlcmac_bts *bts = bts_alloc(the_pcu, 0);
uint32_t tlli = 0xffeeddcc;
static uint8_t exp[] = { 0x40, 0x84, 0x7f, 0xf7, 0x6e, 0xe6, 0x41, 0x4b,
static uint8_t exp[] = { 0x40, 0x84, 0x7f, 0xf7, 0x6e, 0xe6, 0x7e, 0xab,
0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b,
0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b
};

@ -7615,7 +7615,7 @@ TBF(TFI=0 TLLI=0xffffffff DIR=DL STATE=NULL EGPRS) changes DL ASS state from GPR
TBF(TFI=0 TLLI=0xffffffff DIR=DL STATE=NULL EGPRS) changes state from NULL to FLOW
The MS object cannot fully confirm an unexpected TLLI: 0xffeeddcc, partly confirmed
TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) appending 100 bytes
packet reject: 40 84 7f f7 6e e6 41 4b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b
packet reject: 40 84 7f f7 6e e6 7e ab 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b
=== end test_packet_access_rej_epdan ===
=== start test_packet_access_rej_prr ===
MS requests Uplink resource on CCCH/RACH: ra=0x70 (8 bit) Fn=2654167 qta=31

Loading…
Cancel
Save