tbf: Drop unuseful flag GPRS_RLCMAC_FLAG_TO_DL_ASS

The flag is only used to print some non interesting stuff, let's drop it
in order to simplify code. We can add later whatever we want in the new
shiny FSM.

Change-Id: I13f92f058c219f230d57b3c00b8ae1d187603813
changes/61/25061/3
Pau Espin 2 years ago
parent 49a2f404e8
commit 5bc6560efc
  1. 2
      src/pdch.cpp
  2. 6
      src/tbf.cpp
  3. 1
      src/tbf.h
  4. 5
      src/tbf_dl_ass_fsm.c
  5. 18
      tests/tbf/TbfTest.err

@ -371,8 +371,6 @@ void gprs_rlcmac_pdch::rcv_control_ack(Packet_Control_Acknowledgement_t *packet,
osmo_fsm_inst_dispatch(new_tbf->state_fsm.fi, TBF_EV_ASSIGN_ACK_PACCH, NULL);
/* stop pending assignment timer */
new_tbf->t_stop(T0, "control acked (DL-TBF)");
if (new_tbf->check_n_clear(GPRS_RLCMAC_FLAG_TO_DL_ASS))
LOGPTBF(new_tbf, LOGL_NOTICE, "Recovered downlink assignment\n");
tbf_assign_control_ts(new_tbf);
return;

@ -630,12 +630,6 @@ void gprs_rlcmac_tbf::poll_timeout(struct gprs_rlcmac_pdch *pdch, uint32_t poll_
/* Signal timeout to FSM to reschedule UL assignment */
osmo_fsm_inst_dispatch(this->ul_ass_fsm.fi, TBF_UL_ASS_EV_ASS_POLL_TIMEOUT, NULL);
} else if (dl_ass_state_is(TBF_DL_ASS_WAIT_ACK)) {
if (!(state_fsm.state_flags & (1 << GPRS_RLCMAC_FLAG_TO_DL_ASS))) {
LOGPTBF(this, LOGL_NOTICE,
"Timeout for polling PACKET CONTROL ACK for PACKET DOWNLINK ASSIGNMENT: %s\n",
tbf_rlcmac_diag(this));
state_fsm.state_flags |= (1 << GPRS_RLCMAC_FLAG_TO_DL_ASS);
}
bts_do_rate_ctr_inc(bts, CTR_RLC_ASS_TIMEDOUT);
bts_do_rate_ctr_inc(bts, CTR_PDA_POLL_TIMEDOUT);
if (n_inc(N3105)) {

@ -131,7 +131,6 @@ enum tbf_counters { /* TBF counters from 3GPP TS 44.060 §13.4 */
#define GPRS_RLCMAC_FLAG_DL_ACK 3 /* downlink acknowledge received */
#define GPRS_RLCMAC_FLAG_TO_UL_ACK 4
#define GPRS_RLCMAC_FLAG_TO_DL_ACK 5
#define GPRS_RLCMAC_FLAG_TO_DL_ASS 6
#define GPRS_RLCMAC_FLAG_TO_MASK 0xf0 /* timeout bits */
#define T_START(tbf, t, T, r, f) tbf->t_start(t, T, r, f, __FILE__, __LINE__)

@ -182,11 +182,16 @@ static void st_send_ass(struct osmo_fsm_inst *fi, uint32_t event, void *data)
static void st_wait_ack(struct osmo_fsm_inst *fi, uint32_t event, void *data)
{
struct tbf_dl_ass_fsm_ctx *ctx = (struct tbf_dl_ass_fsm_ctx *)fi->priv;
switch (event) {
case TBF_DL_ASS_EV_RX_ASS_CTRL_ACK:
tbf_dl_ass_fsm_state_chg(fi, TBF_DL_ASS_NONE);
break;
case TBF_DL_ASS_EV_ASS_POLL_TIMEOUT:
LOGPTBF(ctx->tbf, LOGL_NOTICE,
"Timeout for polling PACKET CONTROL ACK for PACKET DOWNLINK ASSIGNMENT: %s\n",
tbf_rlcmac_diag(ctx->tbf));
/* Reschedule Pkt Dl Ass */
tbf_dl_ass_fsm_state_chg(fi, TBF_DL_ASS_SEND_ASS);
break;

@ -4261,9 +4261,9 @@ Detected FN jump! 8 -> 112
PDCH(bts=0,trx=0,ts=4) Expiring FN=112 but previous FN=13 is still reserved!
PDCH(bts=0,trx=0,ts=4) Timeout for registered POLL (FN=13): TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS)
TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) poll timeout for FN=13, TS=4 (curr FN 112)
TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) Timeout for polling PACKET CONTROL ACK for PACKET DOWNLINK ASSIGNMENT: |Assignment was on PACCH|No downlink ACK received yet|
TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) N3105 0 => 1 (< MAX 8)
DL_ASS_TBF(DL-TFI_0){WAIT_ACK}: Received Event ASS_POLL_TIMEOUT
TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) Timeout for polling PACKET CONTROL ACK for PACKET DOWNLINK ASSIGNMENT: |Assignment was on PACCH|No downlink ACK received yet|
DL_ASS_TBF(DL-TFI_0){WAIT_ACK}: state_chg to SEND_ASS
PDCH(bts=0,trx=0,ts=4) Expiring FN=112 but previous FN=17 is still reserved!
PDCH(bts=0,trx=0,ts=4) Timeout for registered POLL (FN=17): TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS)
@ -4521,9 +4521,9 @@ Detected FN jump! 8 -> 91
PDCH(bts=0,trx=0,ts=4) Expiring FN=91 but previous FN=13 is still reserved!
PDCH(bts=0,trx=0,ts=4) Timeout for registered POLL (FN=13): TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS)
TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) poll timeout for FN=13, TS=4 (curr FN 91)
TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) Timeout for polling PACKET CONTROL ACK for PACKET DOWNLINK ASSIGNMENT: |Assignment was on PACCH|No downlink ACK received yet|
TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) N3105 0 => 1 (< MAX 8)
DL_ASS_TBF(DL-TFI_0){WAIT_ACK}: Received Event ASS_POLL_TIMEOUT
TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) Timeout for polling PACKET CONTROL ACK for PACKET DOWNLINK ASSIGNMENT: |Assignment was on PACCH|No downlink ACK received yet|
DL_ASS_TBF(DL-TFI_0){WAIT_ACK}: state_chg to SEND_ASS
PDCH(bts=0,trx=0,ts=4) Expiring FN=91 but previous FN=17 is still reserved!
PDCH(bts=0,trx=0,ts=4) Timeout for registered POLL (FN=17): TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS)
@ -4737,9 +4737,9 @@ Detected FN jump! 8 -> 69
PDCH(bts=0,trx=0,ts=4) Expiring FN=69 but previous FN=13 is still reserved!
PDCH(bts=0,trx=0,ts=4) Timeout for registered POLL (FN=13): TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS)
TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) poll timeout for FN=13, TS=4 (curr FN 69)
TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) Timeout for polling PACKET CONTROL ACK for PACKET DOWNLINK ASSIGNMENT: |Assignment was on PACCH|No downlink ACK received yet|
TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) N3105 0 => 1 (< MAX 8)
DL_ASS_TBF(DL-TFI_0){WAIT_ACK}: Received Event ASS_POLL_TIMEOUT
TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) Timeout for polling PACKET CONTROL ACK for PACKET DOWNLINK ASSIGNMENT: |Assignment was on PACCH|No downlink ACK received yet|
DL_ASS_TBF(DL-TFI_0){WAIT_ACK}: state_chg to SEND_ASS
PDCH(bts=0,trx=0,ts=4) Expiring FN=69 but previous FN=17 is still reserved!
PDCH(bts=0,trx=0,ts=4) Timeout for registered POLL (FN=17): TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS)
@ -4937,9 +4937,9 @@ Detected FN jump! 8 -> 60
PDCH(bts=0,trx=0,ts=4) Expiring FN=60 but previous FN=13 is still reserved!
PDCH(bts=0,trx=0,ts=4) Timeout for registered POLL (FN=13): TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS)
TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) poll timeout for FN=13, TS=4 (curr FN 60)
TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) Timeout for polling PACKET CONTROL ACK for PACKET DOWNLINK ASSIGNMENT: |Assignment was on PACCH|No downlink ACK received yet|
TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) N3105 0 => 1 (< MAX 8)
DL_ASS_TBF(DL-TFI_0){WAIT_ACK}: Received Event ASS_POLL_TIMEOUT
TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) Timeout for polling PACKET CONTROL ACK for PACKET DOWNLINK ASSIGNMENT: |Assignment was on PACCH|No downlink ACK received yet|
DL_ASS_TBF(DL-TFI_0){WAIT_ACK}: state_chg to SEND_ASS
PDCH(bts=0,trx=0,ts=4) Expiring FN=60 but previous FN=17 is still reserved!
PDCH(bts=0,trx=0,ts=4) Timeout for registered POLL (FN=17): TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS)
@ -5121,9 +5121,9 @@ Detected FN jump! 8 -> 52
PDCH(bts=0,trx=0,ts=4) Expiring FN=52 but previous FN=13 is still reserved!
PDCH(bts=0,trx=0,ts=4) Timeout for registered POLL (FN=13): TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS)
TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) poll timeout for FN=13, TS=4 (curr FN 52)
TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) Timeout for polling PACKET CONTROL ACK for PACKET DOWNLINK ASSIGNMENT: |Assignment was on PACCH|No downlink ACK received yet|
TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) N3105 0 => 1 (< MAX 8)
DL_ASS_TBF(DL-TFI_0){WAIT_ACK}: Received Event ASS_POLL_TIMEOUT
TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) Timeout for polling PACKET CONTROL ACK for PACKET DOWNLINK ASSIGNMENT: |Assignment was on PACCH|No downlink ACK received yet|
DL_ASS_TBF(DL-TFI_0){WAIT_ACK}: state_chg to SEND_ASS
PDCH(bts=0,trx=0,ts=4) Expiring FN=52 but previous FN=17 is still reserved!
PDCH(bts=0,trx=0,ts=4) Timeout for registered POLL (FN=17): TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS)
@ -5281,9 +5281,9 @@ Detected FN jump! 8 -> 39
PDCH(bts=0,trx=0,ts=4) Expiring FN=39 but previous FN=13 is still reserved!
PDCH(bts=0,trx=0,ts=4) Timeout for registered POLL (FN=13): TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS)
TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) poll timeout for FN=13, TS=4 (curr FN 39)
TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) Timeout for polling PACKET CONTROL ACK for PACKET DOWNLINK ASSIGNMENT: |Assignment was on PACCH|No downlink ACK received yet|
TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) N3105 0 => 1 (< MAX 8)
DL_ASS_TBF(DL-TFI_0){WAIT_ACK}: Received Event ASS_POLL_TIMEOUT
TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) Timeout for polling PACKET CONTROL ACK for PACKET DOWNLINK ASSIGNMENT: |Assignment was on PACCH|No downlink ACK received yet|
DL_ASS_TBF(DL-TFI_0){WAIT_ACK}: state_chg to SEND_ASS
PDCH(bts=0,trx=0,ts=4) Expiring FN=39 but previous FN=17 is still reserved!
PDCH(bts=0,trx=0,ts=4) Timeout for registered POLL (FN=17): TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS)
@ -5450,9 +5450,9 @@ Detected FN jump! 8 -> 34
PDCH(bts=0,trx=0,ts=4) Expiring FN=34 but previous FN=13 is still reserved!
PDCH(bts=0,trx=0,ts=4) Timeout for registered POLL (FN=13): TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS)
TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) poll timeout for FN=13, TS=4 (curr FN 34)
TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) Timeout for polling PACKET CONTROL ACK for PACKET DOWNLINK ASSIGNMENT: |Assignment was on PACCH|No downlink ACK received yet|
TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) N3105 0 => 1 (< MAX 8)
DL_ASS_TBF(DL-TFI_0){WAIT_ACK}: Received Event ASS_POLL_TIMEOUT
TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) Timeout for polling PACKET CONTROL ACK for PACKET DOWNLINK ASSIGNMENT: |Assignment was on PACCH|No downlink ACK received yet|
DL_ASS_TBF(DL-TFI_0){WAIT_ACK}: state_chg to SEND_ASS
PDCH(bts=0,trx=0,ts=4) Expiring FN=34 but previous FN=17 is still reserved!
PDCH(bts=0,trx=0,ts=4) Timeout for registered POLL (FN=17): TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS)
@ -5610,9 +5610,9 @@ Detected FN jump! 8 -> 30
PDCH(bts=0,trx=0,ts=4) Expiring FN=30 but previous FN=13 is still reserved!
PDCH(bts=0,trx=0,ts=4) Timeout for registered POLL (FN=13): TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS)
TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) poll timeout for FN=13, TS=4 (curr FN 30)
TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) Timeout for polling PACKET CONTROL ACK for PACKET DOWNLINK ASSIGNMENT: |Assignment was on PACCH|No downlink ACK received yet|
TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) N3105 0 => 1 (< MAX 8)
DL_ASS_TBF(DL-TFI_0){WAIT_ACK}: Received Event ASS_POLL_TIMEOUT
TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) Timeout for polling PACKET CONTROL ACK for PACKET DOWNLINK ASSIGNMENT: |Assignment was on PACCH|No downlink ACK received yet|
DL_ASS_TBF(DL-TFI_0){WAIT_ACK}: state_chg to SEND_ASS
PDCH(bts=0,trx=0,ts=4) Expiring FN=30 but previous FN=17 is still reserved!
PDCH(bts=0,trx=0,ts=4) Timeout for registered POLL (FN=17): TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS)
@ -5759,9 +5759,9 @@ Detected FN jump! 8 -> 26
PDCH(bts=0,trx=0,ts=4) Expiring FN=26 but previous FN=13 is still reserved!
PDCH(bts=0,trx=0,ts=4) Timeout for registered POLL (FN=13): TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS)
TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) poll timeout for FN=13, TS=4 (curr FN 26)
TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) Timeout for polling PACKET CONTROL ACK for PACKET DOWNLINK ASSIGNMENT: |Assignment was on PACCH|No downlink ACK received yet|
TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) N3105 0 => 1 (< MAX 8)
DL_ASS_TBF(DL-TFI_0){WAIT_ACK}: Received Event ASS_POLL_TIMEOUT
TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) Timeout for polling PACKET CONTROL ACK for PACKET DOWNLINK ASSIGNMENT: |Assignment was on PACCH|No downlink ACK received yet|
DL_ASS_TBF(DL-TFI_0){WAIT_ACK}: state_chg to SEND_ASS
PDCH(bts=0,trx=0,ts=4) Expiring FN=26 but previous FN=17 is still reserved!
PDCH(bts=0,trx=0,ts=4) Timeout for registered POLL (FN=17): TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS)

Loading…
Cancel
Save