aboutsummaryrefslogtreecommitdiffstats
path: root/src/tbf_dl_ass_fsm.c
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2024-07-31 18:26:56 +0200
committerPau Espin Pedrol <pespin@sysmocom.de>2024-07-31 18:37:22 +0200
commit8734f1765ddcae61ebb0aa8fc0f8abdba875c669 (patch)
tree1dac5e23746352eaf61d50c382156d1e6cfd9f81 /src/tbf_dl_ass_fsm.c
parent4b5a92196db31150ca0f3c0c1ec8fb07e45ecf10 (diff)
X2001 timeout: Update UL TBF's dl_ass_fsm stateHEADpespin/timermaster
X2001 is the timer triggered after 2 seconds when a DL TBF is being assigned but the assignment never completes. A DL TBF can be PACCH-assigned using either: * Another DL TBF (usually the same object when upgrading to multislot) * A UL TBF. The active UL/DL TBF doing the assignment of thew new DL TBF is the one holding the assignment state in its tbf.dl_ass_fsm. That FSM is checked by the scheduler to figure out whether a Pkt DL Ass needs to be transmitted. if the new DL TBF being assigned was freed due to X2001, then the tbf.dl_ass_fsm of the TBF doing the assignment was not updating, meaning it was trying to send Pkt DL Ass by the scheduler, but it was erroring (properly) by a check in create_packet_dl_assign() validating a DL TBF (the oen being assigned) exists in the MS. Change-Id: I42cc264b1b77bf8d91ec01a18d8985e182a20024
Diffstat (limited to 'src/tbf_dl_ass_fsm.c')
-rw-r--r--src/tbf_dl_ass_fsm.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/tbf_dl_ass_fsm.c b/src/tbf_dl_ass_fsm.c
index d811b711..1b6d97b1 100644
--- a/src/tbf_dl_ass_fsm.c
+++ b/src/tbf_dl_ass_fsm.c
@@ -42,6 +42,7 @@ static const struct value_string tbf_dl_ass_fsm_event_names[] = {
{ TBF_DL_ASS_EV_CREATE_RLCMAC_MSG, "CREATE_RLCMAC_MSG" },
{ TBF_DL_ASS_EV_RX_ASS_CTRL_ACK, "RX_ASS_CTRL_ACK" },
{ TBF_DL_ASS_EV_ASS_POLL_TIMEOUT, "ASS_POLL_TIMEOUT" },
+ { TBF_DL_ASS_EV_ABORT, "ABORT" },
{ 0, NULL }
};
@@ -163,6 +164,10 @@ static void st_send_ass(struct osmo_fsm_inst *fi, uint32_t event, void *data)
return;
tbf_dl_ass_fsm_state_chg(fi, TBF_DL_ASS_WAIT_ACK);
break;
+ case TBF_DL_ASS_EV_ABORT:
+ /* Cancel pending schedule for Pkt Ul Ass: */
+ tbf_dl_ass_fsm_state_chg(fi, TBF_DL_ASS_NONE);
+ break;
default:
OSMO_ASSERT(0);
}
@@ -183,6 +188,9 @@ static void st_wait_ack(struct osmo_fsm_inst *fi, uint32_t event, void *data)
/* Reschedule Pkt Dl Ass */
tbf_dl_ass_fsm_state_chg(fi, TBF_DL_ASS_SEND_ASS);
break;
+ case TBF_DL_ASS_EV_ABORT:
+ tbf_dl_ass_fsm_state_chg(fi, TBF_DL_ASS_NONE);
+ break;
default:
OSMO_ASSERT(0);
}
@@ -208,7 +216,8 @@ static struct osmo_fsm_state tbf_dl_ass_fsm_states[] = {
.onenter = st_none_on_enter,
},
[TBF_DL_ASS_SEND_ASS] = {
- .in_event_mask = X(TBF_DL_ASS_EV_CREATE_RLCMAC_MSG),
+ .in_event_mask = X(TBF_DL_ASS_EV_CREATE_RLCMAC_MSG) |
+ X(TBF_DL_ASS_EV_ABORT),
.out_state_mask =
X(TBF_DL_ASS_WAIT_ACK) |
X(TBF_DL_ASS_NONE),
@@ -218,7 +227,8 @@ static struct osmo_fsm_state tbf_dl_ass_fsm_states[] = {
[TBF_DL_ASS_WAIT_ACK] = {
.in_event_mask =
X(TBF_DL_ASS_EV_RX_ASS_CTRL_ACK) |
- X(TBF_DL_ASS_EV_ASS_POLL_TIMEOUT),
+ X(TBF_DL_ASS_EV_ASS_POLL_TIMEOUT) |
+ X(TBF_DL_ASS_EV_ABORT),
.out_state_mask =
X(TBF_DL_ASS_NONE) |
X(TBF_DL_ASS_SEND_ASS),