Change in osmo-pcu[master]: Move tbf ul_ack_state to osmocom FSM

pespin gerrit-no-reply at lists.osmocom.org
Mon Aug 23 16:28:31 UTC 2021


pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/25108 )

Change subject: Move tbf ul_ack_state to osmocom FSM
......................................................................

Move tbf ul_ack_state to osmocom FSM

Related: OS#2709
Change-Id: Icf23bf5a4b85fbcbf1542cebceb76b9ba7185d30
---
M src/Makefile.am
M src/encoding.cpp
M src/encoding.h
M src/gprs_rlcmac_sched.cpp
M src/pdch.cpp
M src/tbf.cpp
M src/tbf.h
M src/tbf_dl.cpp
M src/tbf_ul.cpp
M src/tbf_ul.h
A src/tbf_ul_ack_fsm.c
A src/tbf_ul_ack_fsm.h
M tests/tbf/TbfTest.cpp
M tests/tbf/TbfTest.err
M tests/types/TypesTest.cpp
M tests/types/TypesTest.err
16 files changed, 489 insertions(+), 173 deletions(-)

Approvals:
  Jenkins Builder: Verified
  pespin: Looks good to me, approved
  osmith: Looks good to me, but someone else must approve



diff --git a/src/Makefile.am b/src/Makefile.am
index 1a2ea97..08b3309 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -60,6 +60,7 @@
 	tbf.cpp \
 	tbf_fsm.c \
 	tbf_ul.cpp \
+	tbf_ul_ack_fsm.c \
 	tbf_ul_ass_fsm.c \
 	tbf_dl.cpp \
 	tbf_dl_ass_fsm.c \
@@ -102,6 +103,7 @@
 	tbf.h \
 	tbf_fsm.h \
 	tbf_ul.h \
+	tbf_ul_ack_fsm.h \
 	tbf_ul_ass_fsm.h \
 	tbf_dl.h \
 	tbf_dl_ass_fsm.h \
diff --git a/src/encoding.cpp b/src/encoding.cpp
index f945161..30b0ee1 100644
--- a/src/encoding.cpp
+++ b/src/encoding.cpp
@@ -1106,9 +1106,8 @@
 	bitvec_write_field(dest, &wp, 0, 1); // 0: don't have REL 5
 };
 
-void Encoding::write_packet_uplink_ack(
-	bitvec * dest, struct gprs_rlcmac_ul_tbf *tbf, bool is_final,
-	uint8_t rrbp)
+void write_packet_uplink_ack(struct bitvec *dest, struct gprs_rlcmac_ul_tbf *tbf,
+			     bool is_final, uint8_t rrbp)
 {
 	unsigned wp = 0;
 
diff --git a/src/encoding.h b/src/encoding.h
index 298a937..998e69a 100644
--- a/src/encoding.h
+++ b/src/encoding.h
@@ -65,10 +65,6 @@
 
 	static void encode_rbb(const char *show_rbb, bitvec *rbb);
 
-	static void write_packet_uplink_ack(
-			bitvec * dest, struct gprs_rlcmac_ul_tbf *tbf, bool is_final,
-			uint8_t rrbp);
-
 	static int write_paging_request(bitvec * dest, const struct osmo_mobile_identity *mi);
 
 	static unsigned write_repeated_page_info(bitvec * dest, unsigned& wp, uint8_t len,
@@ -119,6 +115,9 @@
 				      int8_t ta_idx, uint8_t ta_ts, bool use_egprs,
 				      uint8_t control_ack);
 
+void write_packet_uplink_ack(struct bitvec *dest, struct gprs_rlcmac_ul_tbf *tbf,
+			     bool is_final, uint8_t rrbp);
+
 void write_packet_neighbour_cell_data(RlcMacDownlink_t *block,
 		bool tfi_is_dl, uint8_t tfi, uint8_t container_id,
 		uint8_t container_idx, PNCDContainer_t *container);
diff --git a/src/gprs_rlcmac_sched.cpp b/src/gprs_rlcmac_sched.cpp
index ed81981..eb163a7 100644
--- a/src/gprs_rlcmac_sched.cpp
+++ b/src/gprs_rlcmac_sched.cpp
@@ -54,7 +54,7 @@
 		/* this trx, this ts */
 		if (!ul_tbf->is_control_ts(pdch->ts_no))
 			continue;
-		if (ul_tbf->ul_ack_state_is(GPRS_RLCMAC_UL_ACK_SEND_ACK))
+		if (tbf_ul_ack_rts(ul_tbf))
 			tbf_cand->ul_ack = ul_tbf;
 		if (tbf_dl_ass_rts(ul_tbf))
 			tbf_cand->dl_ass = ul_tbf;
@@ -173,7 +173,7 @@
 			else if (tbf == tbfs->dl_ass && tbf->direction == GPRS_RLCMAC_UL_TBF)
 				msg = tbf_dl_ass_create_rlcmac_msg(tbfs->dl_ass, fn, ts);
 			else if (tbf == tbfs->ul_ack)
-				msg = tbfs->ul_ack->create_ul_ack(fn, ts);
+				msg = tbf_ul_ack_create_rlcmac_msg(tbfs->ul_ack, fn, ts);
 			else if (tbf == tbfs->nacc) {
 				msg = ms_nacc_create_rlcmac_msg(tbf->ms(), tbf, fn, ts);
 			}
diff --git a/src/pdch.cpp b/src/pdch.cpp
index 439759f..da43bdf 100644
--- a/src/pdch.cpp
+++ b/src/pdch.cpp
@@ -344,11 +344,10 @@
 
 	/* check if this control ack belongs to packet uplink ack */
 	ul_tbf = as_ul_tbf(tbf);
-	if (ul_tbf && ul_tbf->handle_ctrl_ack(reason)) {
+	if (ul_tbf && reason == PDCH_ULC_POLL_UL_ACK && tbf_ul_ack_exp_ctrl_ack(ul_tbf, fn, ts_no)) {
+		osmo_fsm_inst_dispatch(ul_tbf->ul_ack_fsm.fi, TBF_UL_ACK_EV_RX_CTRL_ACK, NULL);
+		/* We can free since we only set polling on final UL ACK/NACK */
 		LOGPTBF(tbf, LOGL_DEBUG, "[UPLINK] END\n");
-		if (ul_tbf->ctrl_ack_to_toggle())
-			LOGPTBF(tbf, LOGL_NOTICE, "Recovered uplink ack for UL\n");
-
 		tbf_free(tbf);
 		return;
 	}
diff --git a/src/tbf.cpp b/src/tbf.cpp
index 5efbe7f..b43ffde 100644
--- a/src/tbf.cpp
+++ b/src/tbf.cpp
@@ -59,13 +59,6 @@
 
 unsigned int next_tbf_ctr_group_id = 0; /* Incrementing group id */
 
-const struct value_string gprs_rlcmac_tbf_ul_ack_state_names[] = {
-	OSMO_VALUE_STRING(GPRS_RLCMAC_UL_ACK_NONE),
-	OSMO_VALUE_STRING(GPRS_RLCMAC_UL_ACK_SEND_ACK), /* send acknowledge on next RTS */
-	OSMO_VALUE_STRING(GPRS_RLCMAC_UL_ACK_WAIT_ACK), /* wait for PACKET CONTROL ACK */
-	{ 0, NULL }
-};
-
 static const struct value_string tbf_counters_names[] = {
 	OSMO_VALUE_STRING(N3101),
 	OSMO_VALUE_STRING(N3103),
@@ -113,7 +106,6 @@
 	m_created_ts(0),
 	m_ctrs(NULL),
 	m_ms(ms),
-	ul_ack_state(GPRS_RLCMAC_UL_ACK_NONE),
 	m_egprs_enabled(false)
 {
 	/* The classes of these members do not have proper constructors yet.
@@ -568,8 +560,6 @@
 			  chan, new_poll_fn, ts);
 		break;
 	case PDCH_ULC_POLL_UL_ACK:
-		ul_ack_state = GPRS_RLCMAC_UL_ACK_WAIT_ACK;
-
 		LOGPTBFUL(this, LOGL_DEBUG, "Scheduled UL Acknowledgement polling on %s (FN=%d, TS=%d)\n",
 			  chan, new_poll_fn, ts);
 		break;
@@ -591,12 +581,7 @@
 	LOGPTBF(this, LOGL_NOTICE, "poll timeout for FN=%d, TS=%d (curr FN %d)\n",
 		poll_fn, pdch->ts_no, bts_current_frame_number(bts));
 
-	if (ul_tbf && ul_tbf->handle_ctrl_ack(reason)) {
-		if (!ul_tbf->ctrl_ack_to_toggle()) {
-			LOGPTBF(this, LOGL_NOTICE,
-				"Timeout for polling PACKET CONTROL ACK for PACKET UPLINK ACK: %s\n",
-				tbf_rlcmac_diag(this));
-		}
+	if (ul_tbf && reason == PDCH_ULC_POLL_UL_ACK && tbf_ul_ack_exp_ctrl_ack(ul_tbf, poll_fn, pdch->ts_no)) {
 		bts_do_rate_ctr_inc(bts, CTR_RLC_ACK_TIMEDOUT);
 		bts_do_rate_ctr_inc(bts, CTR_PUAN_POLL_TIMEDOUT);
 		if (state_is(TBF_ST_FINISHED)) {
@@ -605,10 +590,8 @@
 				osmo_fsm_inst_dispatch(this->state_fsm.fi, TBF_EV_MAX_N3103, NULL);
 				return;
 			}
-			/* reschedule UL ack */
-			ul_tbf->ul_ack_state = GPRS_RLCMAC_UL_ACK_SEND_ACK;
 		}
-
+		osmo_fsm_inst_dispatch(ul_tbf->ul_ack_fsm.fi, TBF_UL_ACK_EV_POLL_TIMEOUT, NULL);
 	} else if (ul_ass_state_is(TBF_UL_ASS_WAIT_ACK)) {
 		bts_do_rate_ctr_inc(bts, CTR_RLC_ASS_TIMEDOUT);
 		bts_do_rate_ctr_inc(bts, CTR_PUA_POLL_TIMEDOUT);
@@ -761,6 +744,12 @@
 	osmo_fsm_inst_update_id(tbf->state_fsm.fi, buf);
 	osmo_fsm_inst_update_id(tbf->ul_ass_fsm.fi, buf);
 	osmo_fsm_inst_update_id(tbf->dl_ass_fsm.fi, buf);
+
+	if (tbf_direction(tbf) == GPRS_RLCMAC_UL_TBF) {
+		struct gprs_rlcmac_ul_tbf *ul_tbf = as_ul_tbf(tbf);
+		osmo_fsm_inst_update_id(ul_tbf->ul_ack_fsm.fi, buf);
+	}
+
 }
 
 void gprs_rlcmac_tbf::rotate_in_list()
diff --git a/src/tbf.h b/src/tbf.h
index 358a7ad..ffd6cc2 100644
--- a/src/tbf.h
+++ b/src/tbf.h
@@ -58,14 +58,6 @@
  * TBF instance
  */
 
-enum gprs_rlcmac_tbf_ul_ack_state {
-	GPRS_RLCMAC_UL_ACK_NONE = 0,
-	GPRS_RLCMAC_UL_ACK_SEND_ACK, /* send acknowledge on next RTS */
-	GPRS_RLCMAC_UL_ACK_WAIT_ACK, /* wait for PACKET CONTROL ACK */
-};
-
-extern const struct value_string gprs_rlcmac_tbf_ul_ack_state_names[];
-
 enum gprs_rlcmac_tbf_direction {
 	GPRS_RLCMAC_DL_TBF,
 	GPRS_RLCMAC_UL_TBF
@@ -125,12 +117,10 @@
 #define GPRS_RLCMAC_FLAG_CCCH		0 /* assignment on CCCH */
 #define GPRS_RLCMAC_FLAG_PACCH		1 /* assignment on PACCH */
 #define GPRS_RLCMAC_FLAG_DL_ACK		2 /* DL TBF: At least one DL ACK/NACK was recieved since it was assigned */
-#define GPRS_RLCMAC_FLAG_TO_UL_ACK	3 /* UL TBF: Failed to receive last polled CTRL ACK confirming our UL ACK/NACK */
-#define GPRS_RLCMAC_FLAG_TO_DL_ACK	4 /* DL TBF: Failed to receive last polled DL ACK/NACK */
+#define GPRS_RLCMAC_FLAG_TO_DL_ACK	3 /* DL TBF: Failed to receive last polled DL ACK/NACK */
 #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__)
-#define TBF_SET_ACK_STATE(t, st) do { t->set_ack_state(st, __FILE__, __LINE__); } while(0)
 
 #ifdef __cplusplus
 extern "C" {
@@ -180,8 +170,6 @@
 	bool state_is_not(enum tbf_fsm_states rhs) const;
 	bool dl_ass_state_is(enum tbf_dl_ass_fsm_states rhs) const;
 	bool ul_ass_state_is(enum tbf_ul_ass_fsm_states rhs) const;
-	bool ul_ack_state_is(enum gprs_rlcmac_tbf_ul_ack_state rhs) const;
-	void set_ack_state(enum gprs_rlcmac_tbf_ul_ack_state new_state, const char *file, int line);
 	void poll_sched_set(const char *file, int line);
 	void poll_sched_unset(const char *file, int line);
 	bool check_n_clear(uint8_t state_flag);
@@ -293,7 +281,6 @@
 	struct GprsMs *m_ms;
 private:
 	void enable_egprs();
-	enum gprs_rlcmac_tbf_ul_ack_state ul_ack_state;
 	bool m_egprs_enabled;
 	struct osmo_timer_list Tarr[T_MAX];
 	uint8_t Narr[N_MAX];
@@ -315,11 +302,6 @@
 	return tbf_ul_ass_fi(this)->state == rhs;
 }
 
-inline bool gprs_rlcmac_tbf::ul_ack_state_is(enum gprs_rlcmac_tbf_ul_ack_state rhs) const
-{
-	return ul_ack_state == rhs;
-}
-
 inline bool gprs_rlcmac_tbf::state_is_not(enum tbf_fsm_states rhs) const
 {
 	return tbf_state(this) != rhs;
@@ -331,15 +313,6 @@
 	return osmo_fsm_inst_state_name(state_fsm.fi);
 }
 
-inline void gprs_rlcmac_tbf::set_ack_state(enum gprs_rlcmac_tbf_ul_ack_state new_state, const char *file, int line)
-{
-	LOGPSRC(DTBF, LOGL_DEBUG, file, line, "%s changes UL ACK state from %s to %s\n",
-		tbf_name(this),
-		get_value_string(gprs_rlcmac_tbf_ul_ack_state_names, ul_ack_state),
-		get_value_string(gprs_rlcmac_tbf_ul_ack_state_names, new_state));
-	ul_ack_state = new_state;
-}
-
 inline bool gprs_rlcmac_tbf::check_n_clear(uint8_t state_flag)
 {
 	if ((state_fsm.state_flags & (1 << state_flag))) {
diff --git a/src/tbf_dl.cpp b/src/tbf_dl.cpp
index 34c5630..905bf05 100644
--- a/src/tbf_dl.cpp
+++ b/src/tbf_dl.cpp
@@ -249,7 +249,7 @@
 	* or MULTIPLE TBF DOWNLINK ASSIGNMENT messages before contention resolution is
 	* completed on the mobile station side." */
 	if (ul_tbf && ul_tbf->m_contention_resolution_done
-	 && !ul_tbf->m_final_ack_sent) {
+	 && !tbf_ul_ack_waiting_cnf_final_ack(ul_tbf)) {
 		use_trx = ul_tbf->trx->trx_no;
 		ss = false;
 		old_ul_tbf = ul_tbf;
diff --git a/src/tbf_ul.cpp b/src/tbf_ul.cpp
index c84f373..d4f2093 100644
--- a/src/tbf_ul.cpp
+++ b/src/tbf_ul.cpp
@@ -93,6 +93,9 @@
 
 gprs_rlcmac_ul_tbf::~gprs_rlcmac_ul_tbf()
 {
+	osmo_fsm_inst_free(ul_ack_fsm.fi);
+	ul_ack_fsm.fi = NULL;
+
 	rate_ctr_group_free(m_ul_egprs_ctrs);
 	rate_ctr_group_free(m_ul_gprs_ctrs);
 	/* ~gprs_rlcmac_tbf() is called automatically upon return */
@@ -231,11 +234,15 @@
 	gprs_rlcmac_tbf(bts_, ms, GPRS_RLCMAC_UL_TBF),
 	m_rx_counter(0),
 	m_contention_resolution_done(0),
-	m_final_ack_sent(0),
 	m_ul_gprs_ctrs(NULL),
 	m_ul_egprs_ctrs(NULL)
 {
 	memset(&m_usf, USF_INVALID, sizeof(m_usf));
+
+	memset(&ul_ack_fsm, 0, sizeof(ul_ack_fsm));
+	ul_ack_fsm.tbf = this;
+	ul_ack_fsm.fi = osmo_fsm_inst_alloc(&tbf_ul_ack_fsm, this, &ul_ack_fsm, LOGL_INFO, NULL);
+
 }
 
 /*
@@ -288,26 +295,6 @@
 	return 0;
 }
 
-bool gprs_rlcmac_ul_tbf::ctrl_ack_to_toggle()
-{
-	if (check_n_clear(GPRS_RLCMAC_FLAG_TO_UL_ACK))
-		return true; /* GPRS_RLCMAC_FLAG_TO_UL_ACK was set, now cleared */
-
-	state_fsm.state_flags |= (1 << GPRS_RLCMAC_FLAG_TO_UL_ACK);
-	return false; /* GPRS_RLCMAC_FLAG_TO_UL_ACK was unset, now set */
-}
-
-bool gprs_rlcmac_ul_tbf::handle_ctrl_ack(enum pdch_ulc_tbf_poll_reason reason)
-{
-	/* check if this control ack belongs to packet uplink ack */
-	if (reason == PDCH_ULC_POLL_UL_ACK && ul_ack_state_is(GPRS_RLCMAC_UL_ACK_WAIT_ACK)) {
-		TBF_SET_ACK_STATE(this, GPRS_RLCMAC_UL_ACK_NONE);
-		return true;
-	}
-
-	return false;
-}
-
 void gprs_rlcmac_ul_tbf::contention_resolution_start()
 {
 	/* 3GPP TS 44.018 sec 11.1.2 Timers on the network side: "This timer is
@@ -339,59 +326,6 @@
 	m_contention_resolution_done = 1;
 }
 
-struct msgb *gprs_rlcmac_ul_tbf::create_ul_ack(uint32_t fn, uint8_t ts)
-{
-	int final = (state_is(TBF_ST_FINISHED));
-	struct msgb *msg;
-	int rc;
-	unsigned int rrbp = 0;
-	uint32_t new_poll_fn = 0;
-
-	if (final) {
-		if (ul_ack_state_is(GPRS_RLCMAC_UL_ACK_WAIT_ACK)) {
-			LOGPTBFUL(this, LOGL_DEBUG,
-				  "Polling is already scheduled, so we must wait for the final uplink ack...\n");
-			return NULL;
-		}
-
-		rc = check_polling(fn, ts, &new_poll_fn, &rrbp);
-		if (rc < 0)
-			return NULL;
-	}
-
-	msg = msgb_alloc(23, "rlcmac_ul_ack");
-	if (!msg)
-		return NULL;
-	bitvec *ack_vec = bitvec_alloc(23, tall_pcu_ctx);
-	if (!ack_vec) {
-		msgb_free(msg);
-		return NULL;
-	}
-	bitvec_unhex(ack_vec, DUMMY_VEC);
-	Encoding::write_packet_uplink_ack(ack_vec, this, final, rrbp);
-	bitvec_pack(ack_vec, msgb_put(msg, 23));
-	bitvec_free(ack_vec);
-
-	/* TS 44.060 7a.2.1.1: "The contention resolution is completed on
-	 * the network side when the network receives an RLC data block that
-	 * comprises the TLLI value that identifies the mobile station and the
-	 * TFI value associated with the TBF."
-	 * However, it's handier for us to mark contention resolution success
-	 * here since according to spec upon rx UL ACK is the time at which MS
-	 * realizes contention resolution succeeds. */
-	if (is_tlli_valid())
-		contention_resolution_success();
-
-	if (final) {
-		set_polling(new_poll_fn, ts, PDCH_ULC_POLL_UL_ACK);
-		/* waiting for final acknowledge */
-		m_final_ack_sent = 1;
-	} else
-		TBF_SET_ACK_STATE(this, GPRS_RLCMAC_UL_ACK_NONE);
-
-	return msg;
-}
-
 /*! \brief receive data from PDCH/L1 */
 int gprs_rlcmac_ul_tbf::rcv_data_block_acknowledged(
 	const struct gprs_rlc_data_info *rlc,
@@ -590,14 +524,7 @@
 	if (!require_ack)
 		return;
 
-	if (ul_ack_state_is(GPRS_RLCMAC_UL_ACK_NONE)) {
-		/* trigger sending at next RTS */
-		TBF_SET_ACK_STATE(this, GPRS_RLCMAC_UL_ACK_SEND_ACK);
-	} else {
-		/* already triggered */
-		LOGPTBFUL(this, LOGL_DEBUG,
-			  "Sending Ack/Nack already scheduled, no need to re-schedule\n");
-	}
+	osmo_fsm_inst_dispatch(this->ul_ack_fsm.fi, TBF_UL_ACK_EV_SCHED_ACK, NULL);
 }
 
 /* Send Uplink unit-data to SGSN. */
@@ -843,3 +770,13 @@
 {
 	return tbf->m_contention_resolution_done;
 }
+
+struct osmo_fsm_inst *tbf_ul_ack_fi(const struct gprs_rlcmac_ul_tbf *tbf)
+{
+	return tbf->ul_ack_fsm.fi;
+}
+
+void ul_tbf_contention_resolution_success(struct gprs_rlcmac_ul_tbf *tbf)
+{
+	return tbf->contention_resolution_success();
+}
diff --git a/src/tbf_ul.h b/src/tbf_ul.h
index 826062f..defdfba 100644
--- a/src/tbf_ul.h
+++ b/src/tbf_ul.h
@@ -24,6 +24,15 @@
 #include <stdbool.h>
 
 #include "tbf.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+#include <tbf_ul_ack_fsm.h>
+#ifdef __cplusplus
+}
+#endif
+
 /*
  * TBF instance
  */
@@ -54,9 +63,6 @@
 	gprs_rlcmac_ul_tbf(struct gprs_rlcmac_bts *bts, GprsMs *ms);
 	~gprs_rlcmac_ul_tbf();
 	gprs_rlc_window *window();
-	struct msgb *create_ul_ack(uint32_t fn, uint8_t ts);
-	bool ctrl_ack_to_toggle();
-	bool handle_ctrl_ack(enum pdch_ulc_tbf_poll_reason reason);
 	/* blocks were acked */
 	int rcv_data_block_acknowledged(
 		const struct gprs_rlc_data_info *rlc,
@@ -97,11 +103,12 @@
 	int32_t m_rx_counter; /* count all received blocks */
 	uint8_t m_usf[8];	/* list USFs per PDCH (timeslot), initialized to USF_INVALID */
 	uint8_t m_contention_resolution_done; /* set after done */
-	uint8_t m_final_ack_sent; /* set if we sent final ack */
 
 	struct rate_ctr_group *m_ul_gprs_ctrs;
 	struct rate_ctr_group *m_ul_egprs_ctrs;
 
+	struct tbf_ul_ass_fsm_ctx ul_ack_fsm;
+
 protected:
 	void maybe_schedule_uplink_acknack(const gprs_rlc_data_info *rlc, bool countdown_finished);
 
@@ -138,6 +145,8 @@
 struct gprs_rlcmac_ul_tbf *as_ul_tbf(struct gprs_rlcmac_tbf *tbf);
 void tbf_usf_timeout(struct gprs_rlcmac_ul_tbf *tbf);
 bool ul_tbf_contention_resolution_done(const struct gprs_rlcmac_ul_tbf *tbf);
+struct osmo_fsm_inst *tbf_ul_ack_fi(const struct gprs_rlcmac_ul_tbf *tbf);
+void ul_tbf_contention_resolution_success(struct gprs_rlcmac_ul_tbf *tbf);
 
 #define LOGPTBFUL(tbf, level, fmt, args...) LOGP(DTBFUL, level, "%s " fmt, tbf_name(tbf), ## args)
 #ifdef __cplusplus
diff --git a/src/tbf_ul_ack_fsm.c b/src/tbf_ul_ack_fsm.c
new file mode 100644
index 0000000..16ca22b
--- /dev/null
+++ b/src/tbf_ul_ack_fsm.c
@@ -0,0 +1,254 @@
+/* tbf_ul_ack_fsm.c
+ *
+ * Copyright (C) 2021 by sysmocom - s.f.m.c. GmbH <info at sysmocom.de>
+ * Author: Pau Espin Pedrol <pespin at sysmocom.de>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+ */
+
+#include <unistd.h>
+
+#include <talloc.h>
+
+#include <osmocom/core/bitvec.h>
+
+#include <tbf_ul_ack_fsm.h>
+#include <gprs_rlcmac.h>
+#include <gprs_debug.h>
+#include <gprs_ms.h>
+#include <encoding.h>
+#include <bts.h>
+#include <tbf.h>
+#include <tbf_ul.h>
+
+#include <tbf_ul_ack_fsm.h>
+
+#define X(s) (1 << (s))
+
+const struct osmo_tdef_state_timeout tbf_ul_ack_fsm_timeouts[32] = {
+	[TBF_UL_ACK_ST_NONE] = {},
+	[TBF_UL_ACK_ST_SCHED_UL_ACK] = {},
+	[TBF_UL_ACK_ST_WAIT_ACK] = {},
+};
+
+const struct value_string tbf_ul_ack_fsm_event_names[] = {
+	{ TBF_UL_ACK_EV_SCHED_ACK, "SCHED_ACK" },
+	{ TBF_UL_ACK_EV_CREATE_RLCMAC_MSG, "CREATE_RLCMAC_MSG" },
+	{ TBF_UL_ACK_EV_RX_CTRL_ACK, "RX_CTRL_ACK" },
+	{ TBF_UL_ACK_EV_POLL_TIMEOUT, "POLL_TIMEOUT" },
+	{ 0, NULL }
+};
+
+static struct msgb *create_ul_ack_nack(const struct tbf_ul_ack_fsm_ctx *ctx,
+				       const struct tbf_ul_ack_ev_create_rlcmac_msg_ctx *d,
+				       bool final)
+{
+	struct msgb *msg;
+	int rc;
+	unsigned int rrbp = 0;
+	uint32_t new_poll_fn = 0;
+	struct gprs_rlcmac_tbf *tbf = (struct gprs_rlcmac_tbf *)ctx->tbf;
+	struct GprsMs *ms = tbf_ms(tbf);
+
+	if (final) {
+		rc = tbf_check_polling(tbf, d->fn, d->ts, &new_poll_fn, &rrbp);
+		if (rc < 0)
+			return NULL;
+	}
+
+	msg = msgb_alloc(23, "rlcmac_ul_ack");
+	if (!msg)
+		return NULL;
+	struct bitvec *ack_vec = bitvec_alloc(23, tbf);
+	if (!ack_vec) {
+		msgb_free(msg);
+		return NULL;
+	}
+	bitvec_unhex(ack_vec, DUMMY_VEC);
+	write_packet_uplink_ack(ack_vec, ctx->tbf, final, rrbp);
+	bitvec_pack(ack_vec, msgb_put(msg, 23));
+	bitvec_free(ack_vec);
+
+	/* TS 44.060 7a.2.1.1: "The contention resolution is completed on
+	 * the network side when the network receives an RLC data block that
+	 * comprises the TLLI value that identifies the mobile station and the
+	 * TFI value associated with the TBF."
+	 * However, it's handier for us to mark contention resolution success
+	 * here since according to spec upon rx UL ACK is the time at which MS
+	 * realizes contention resolution succeeds. */
+	if (ms_tlli(ms) != GSM_RESERVED_TMSI)
+		ul_tbf_contention_resolution_success(ctx->tbf);
+
+	if (final)
+		tbf_set_polling(tbf, new_poll_fn, d->ts, PDCH_ULC_POLL_UL_ACK);
+
+	return msg;
+}
+
+static void st_none(struct osmo_fsm_inst *fi, uint32_t event, void *data)
+{
+	switch (event) {
+	case TBF_UL_ACK_EV_SCHED_ACK:
+		tbf_ul_ack_fsm_state_chg(fi, TBF_UL_ACK_ST_SCHED_UL_ACK);
+		break;
+	default:
+		OSMO_ASSERT(0);
+	}
+}
+
+static void st_sched_ul_ack(struct osmo_fsm_inst *fi, uint32_t event, void *data)
+{
+	struct tbf_ul_ack_fsm_ctx *ctx = (struct tbf_ul_ack_fsm_ctx *)fi->priv;
+	struct gprs_rlcmac_tbf *tbf = (struct gprs_rlcmac_tbf *)ctx->tbf;
+	struct tbf_ul_ack_ev_create_rlcmac_msg_ctx *data_ctx;
+	bool final;
+
+	switch (event) {
+	case TBF_UL_ACK_EV_SCHED_ACK:
+		LOGPTBFUL(tbf, LOGL_DEBUG,
+			  "Sending Ack/Nack already scheduled, no need to re-schedule\n");
+		break;
+	case TBF_UL_ACK_EV_CREATE_RLCMAC_MSG:
+		data_ctx = (struct tbf_ul_ack_ev_create_rlcmac_msg_ctx *)data;
+		final = tbf_state(tbf) == TBF_ST_FINISHED;
+		data_ctx->msg = create_ul_ack_nack(ctx, data_ctx, final);
+		if (!data_ctx->msg)
+			return;
+		if (final) /* poll set */
+			tbf_ul_ack_fsm_state_chg(fi, TBF_UL_ACK_ST_WAIT_ACK);
+		else
+			tbf_ul_ack_fsm_state_chg(fi, TBF_UL_ACK_ST_NONE);
+		break;
+	default:
+		OSMO_ASSERT(0);
+	}
+}
+
+static void st_wait_ctrl_ack(struct osmo_fsm_inst *fi, uint32_t event, void *data)
+{
+	struct tbf_ul_ack_fsm_ctx *ctx = (struct tbf_ul_ack_fsm_ctx *)fi->priv;
+	struct gprs_rlcmac_tbf *tbf = (struct gprs_rlcmac_tbf *)ctx->tbf;
+
+	switch (event) {
+	case TBF_UL_ACK_EV_SCHED_ACK:
+		/* ignore, we are in the middle of waiting for a response */
+		break;
+	case TBF_UL_ACK_EV_RX_CTRL_ACK:
+		tbf_ul_ack_fsm_state_chg(fi, TBF_UL_ACK_ST_NONE);
+		break;
+	case TBF_UL_ACK_EV_POLL_TIMEOUT:
+		LOGPTBF(tbf, LOGL_NOTICE,
+			"Timeout for polling PACKET CONTROL ACK for PACKET UPLINK ACK: %s\n",
+			tbf_rlcmac_diag(tbf));
+		/* Reschedule Ul Ack/NAck */
+		tbf_ul_ack_fsm_state_chg(fi, TBF_UL_ACK_ST_SCHED_UL_ACK);
+		break;
+	default:
+		OSMO_ASSERT(0);
+	}
+}
+
+static int tbf_ul_ack_fsm_timer_cb(struct osmo_fsm_inst *fi)
+{
+	switch (fi->T) {
+	default:
+		OSMO_ASSERT(0);
+	}
+	return 0;
+}
+
+static struct osmo_fsm_state tbf_ul_ack_fsm_states[] = {
+	[TBF_UL_ACK_ST_NONE] = {
+		.in_event_mask =
+			X(TBF_UL_ACK_EV_SCHED_ACK),
+		.out_state_mask =
+			X(TBF_UL_ACK_ST_SCHED_UL_ACK),
+		.name = "NONE",
+		.action = st_none,
+	},
+	[TBF_UL_ACK_ST_SCHED_UL_ACK] = {
+		.in_event_mask =
+			X(TBF_UL_ACK_EV_SCHED_ACK) |
+			X(TBF_UL_ACK_EV_CREATE_RLCMAC_MSG),
+		.out_state_mask =
+			X(TBF_UL_ACK_ST_NONE) |
+			X(TBF_UL_ACK_ST_WAIT_ACK),
+		.name = "SCHED_UL_ACK",
+		.action = st_sched_ul_ack,
+	},
+	[TBF_UL_ACK_ST_WAIT_ACK] = {
+		.in_event_mask =
+			X(TBF_UL_ACK_EV_SCHED_ACK) |
+			X(TBF_UL_ACK_EV_RX_CTRL_ACK) |
+			X(TBF_UL_ACK_EV_POLL_TIMEOUT),
+		.out_state_mask =
+			X(TBF_UL_ACK_ST_NONE) |
+			X(TBF_UL_ACK_ST_SCHED_UL_ACK),
+		.name = "WAIT_ACK",
+		.action = st_wait_ctrl_ack,
+	},
+};
+
+struct osmo_fsm tbf_ul_ack_fsm = {
+	.name = "UL_ACK_TBF",
+	.states = tbf_ul_ack_fsm_states,
+	.num_states = ARRAY_SIZE(tbf_ul_ack_fsm_states),
+	.timer_cb = tbf_ul_ack_fsm_timer_cb,
+	.log_subsys = DTBFUL,
+	.event_names = tbf_ul_ack_fsm_event_names,
+};
+
+static __attribute__((constructor)) void tbf_ul_ack_fsm_init(void)
+{
+	OSMO_ASSERT(osmo_fsm_register(&tbf_ul_ack_fsm) == 0);
+}
+
+
+struct msgb *tbf_ul_ack_create_rlcmac_msg(const struct gprs_rlcmac_tbf *tbf, uint32_t fn, uint8_t ts)
+{
+	int rc;
+	struct tbf_ul_ack_ev_create_rlcmac_msg_ctx data_ctx = {
+		.fn = fn,
+		.ts = ts,
+		.msg = NULL,
+	};
+	OSMO_ASSERT(tbf_direction(tbf) == GPRS_RLCMAC_UL_TBF);
+
+	rc = osmo_fsm_inst_dispatch(tbf_ul_ack_fi((const struct gprs_rlcmac_ul_tbf *)tbf), TBF_UL_ACK_EV_CREATE_RLCMAC_MSG, &data_ctx);
+	if (rc != 0 || !data_ctx.msg)
+		return NULL;
+	return data_ctx.msg;
+}
+
+bool tbf_ul_ack_rts(const struct gprs_rlcmac_tbf *tbf)
+{
+	struct osmo_fsm_inst *fi = tbf_ul_ack_fi((const struct gprs_rlcmac_ul_tbf *)tbf);
+	return fi->state == TBF_UL_ACK_ST_SCHED_UL_ACK;
+}
+
+/* Did we already send the Final ACK and we are waiting for its confirmation (CTRL ACK) ? */
+bool tbf_ul_ack_waiting_cnf_final_ack(const struct gprs_rlcmac_tbf* tbf)
+{
+	OSMO_ASSERT(tbf_direction(tbf) == GPRS_RLCMAC_UL_TBF);
+	struct osmo_fsm_inst *fi = tbf_ul_ack_fi((const struct gprs_rlcmac_ul_tbf *)tbf);
+	return fi->state == TBF_UL_ACK_ST_WAIT_ACK;
+}
+
+bool tbf_ul_ack_exp_ctrl_ack(const struct gprs_rlcmac_tbf *tbf, uint32_t fn, uint8_t ts)
+{
+	struct osmo_fsm_inst *fi = tbf_ul_ack_fi((const struct gprs_rlcmac_ul_tbf *)tbf);
+	return fi->state == TBF_UL_ACK_ST_WAIT_ACK;
+	/* FIXME: validate FN and TS match: && ctx->poll_fn = fn && ctx->poll_ts == ts */
+}
diff --git a/src/tbf_ul_ack_fsm.h b/src/tbf_ul_ack_fsm.h
new file mode 100644
index 0000000..aaee5a3
--- /dev/null
+++ b/src/tbf_ul_ack_fsm.h
@@ -0,0 +1,72 @@
+/* tbf_ul_ack_fsm.h
+ *
+ * Copyright (C) 2021 by sysmocom - s.f.m.c. GmbH <info at sysmocom.de>
+ * Author: Pau Espin Pedrol <pespin at sysmocom.de>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+ */
+#pragma once
+
+#include <osmocom/core/fsm.h>
+#include <osmocom/core/tdef.h>
+
+#include <gprs_pcu.h>
+
+struct gprs_rlcmac_tbf;
+struct gprs_rlcmac_ul_tbf;
+
+enum tbf_ul_ack_fsm_event {
+	TBF_UL_ACK_EV_SCHED_ACK, /* Tx UL ACK/NACK is pending */
+	TBF_UL_ACK_EV_CREATE_RLCMAC_MSG, /* Scheduler wants to gen+Tx the Ass (rej): data=tbf_ul_ack_ev_create_rlcmac_msg_ctx */
+	TBF_UL_ACK_EV_RX_CTRL_ACK, /* Received CTRL ACK answering poll set on UL ACK/NACK */
+	TBF_UL_ACK_EV_POLL_TIMEOUT, /* Pdch Ul Controller signals timeout for poll set on UL ACK/NACK */
+};
+
+enum tbf_ul_ack_fsm_states {
+	TBF_UL_ACK_ST_NONE = 0,
+	TBF_UL_ACK_ST_SCHED_UL_ACK, /* send UL ACK/NACK on next RTS */
+	TBF_UL_ACK_ST_WAIT_ACK, /* wait for PACKET CONTROL ACK */
+};
+
+struct tbf_ul_ack_fsm_ctx {
+	struct osmo_fsm_inst *fi;
+	struct gprs_rlcmac_ul_tbf *tbf; /* back pointer */
+};
+
+extern const struct osmo_tdef_state_timeout tbf_ul_ack_fsm_timeouts[32];
+/* Transition to a state, using the T timer defined in tbf_ul_ack_fsm_timeouts.
+ * The actual timeout value is in turn obtained from conn->T_defs.
+ * Assumes local variable fi exists. */
+#define tbf_ul_ack_fsm_state_chg(fi, NEXT_STATE) \
+	osmo_tdef_fsm_inst_state_chg(fi, NEXT_STATE, \
+				     tbf_ul_ack_fsm_timeouts, \
+				     the_pcu->T_defs, \
+				     -1)
+
+extern struct osmo_fsm tbf_ul_ack_fsm;
+
+
+/* passed as data in TBF_UL_ACK_EV_CREATE_RLCMAC_MSG */
+struct tbf_ul_ack_ev_create_rlcmac_msg_ctx {
+	uint32_t fn; /* FN where the created DL ctrl block is to be sent */
+	uint8_t ts; /* TS where the created DL ctrl block is to be sent */
+	struct msgb *msg; /* to be filled by FSM during event processing */
+};
+
+
+struct msgb *tbf_ul_ack_create_rlcmac_msg(const struct gprs_rlcmac_tbf *tbf, uint32_t fn, uint8_t ts);
+bool tbf_ul_ack_rts(const struct gprs_rlcmac_tbf *tbf);
+bool tbf_ul_ack_waiting_cnf_final_ack(const struct gprs_rlcmac_tbf *tbf);
+bool tbf_ul_ack_exp_ctrl_ack(const struct gprs_rlcmac_tbf *tbf, uint32_t fn, uint8_t ts);
diff --git a/tests/tbf/TbfTest.cpp b/tests/tbf/TbfTest.cpp
index 19611a7..62a2582 100644
--- a/tests/tbf/TbfTest.cpp
+++ b/tests/tbf/TbfTest.cpp
@@ -831,7 +831,8 @@
 
 	pdch->rcv_block(data_msg, 42, *fn, &meas);
 
-	struct msgb *msg1 = ul_tbf->create_ul_ack(*fn, ts_no);
+	osmo_fsm_inst_dispatch(ul_tbf->ul_ack_fsm.fi, TBF_UL_ACK_EV_SCHED_ACK, NULL);
+	struct msgb *msg1 = tbf_ul_ack_create_rlcmac_msg(ul_tbf, *fn, ts_no);
 
 	static uint8_t exp1[] = { 0x40, 0x24, 0x01, 0x0b, 0x3e, 0x24, 0x46, 0x68, 0x9c, 0x70, 0x87, 0xb0,
 				  0x06, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b
@@ -858,7 +859,8 @@
 
 	pdch->rcv_block(data_msg, 42, *fn, &meas);
 
-	msg1 = ul_tbf->create_ul_ack(*fn, ts_no);
+	osmo_fsm_inst_dispatch(ul_tbf->ul_ack_fsm.fi, TBF_UL_ACK_EV_SCHED_ACK, NULL);
+	msg1 = tbf_ul_ack_create_rlcmac_msg(ul_tbf, *fn, ts_no);
 
 	static uint8_t exp2[] = { 0x40, 0x24, 0x01, 0x0b, 0x3e, 0x24, 0x46, 0x68, 0x9c, 0x70, 0x88, 0xb0,
 				  0x06, 0x8b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b
@@ -1412,7 +1414,8 @@
 		pdch = &bts->trx[trx_no].pdch[ts_no];
 		pdch->rcv_block(&data[0], sizeof(data), *fn, &meas);
 	}
-	ul_tbf->create_ul_ack(*fn, ts_no);
+	osmo_fsm_inst_dispatch(ul_tbf->ul_ack_fsm.fi, TBF_UL_ACK_EV_SCHED_ACK, NULL);
+	tbf_ul_ack_create_rlcmac_msg(ul_tbf, *fn, ts_no);
 	memset(data, 0x2b, sizeof(data));
 	hdr3 = (struct gprs_rlc_ul_header_egprs_3 *)data;
 	hdr3->r = 0;
@@ -1440,7 +1443,7 @@
 	request_dl_rlc_block(ul_tbf, fn);
 
 	check_tbf(ul_tbf);
-	OSMO_ASSERT(ul_tbf->ul_ack_state_is(GPRS_RLCMAC_UL_ACK_NONE));
+	OSMO_ASSERT(tbf_ul_ack_fi(ul_tbf)->state == TBF_UL_ACK_ST_NONE);
 
 	ms = bts_ms_by_tlli(bts, tlli, GSM_RESERVED_TMSI);
 	OSMO_ASSERT(ms != NULL);
@@ -1494,7 +1497,8 @@
 		pdch = &bts->trx[trx_no].pdch[ts_no];
 		pdch->rcv_block(&data[0], sizeof(data), *fn, &meas);
 	}
-	ul_tbf->create_ul_ack(*fn, ts_no);
+	osmo_fsm_inst_dispatch(ul_tbf->ul_ack_fsm.fi, TBF_UL_ACK_EV_SCHED_ACK, NULL);
+	tbf_ul_ack_create_rlcmac_msg(ul_tbf, *fn, ts_no);
 	memset(data, 0x2b, sizeof(data));
 	hdr3 = (struct gprs_rlc_ul_header_egprs_3 *)data;
 	hdr3->r = 0;
@@ -1518,12 +1522,13 @@
 
 	pdch = &bts->trx[trx_no].pdch[ts_no];
 	pdch->rcv_block(&data[0], sizeof(data), *fn, &meas);
-	ul_tbf->create_ul_ack(*fn, ts_no);
+	osmo_fsm_inst_dispatch(ul_tbf->ul_ack_fsm.fi, TBF_UL_ACK_EV_SCHED_ACK, NULL);
+	tbf_ul_ack_create_rlcmac_msg(ul_tbf, *fn, ts_no);
 
 	request_dl_rlc_block(ul_tbf, fn);
 
 	check_tbf(ul_tbf);
-	OSMO_ASSERT(ul_tbf->ul_ack_state_is(GPRS_RLCMAC_UL_ACK_NONE));
+	OSMO_ASSERT(tbf_ul_ack_fi(ul_tbf)->state == TBF_UL_ACK_ST_NONE);
 
 	ms = bts_ms_by_tlli(bts, tlli, GSM_RESERVED_TMSI);
 	OSMO_ASSERT(ms != NULL);
@@ -1580,7 +1585,8 @@
 		pdch = &bts->trx[trx_no].pdch[ts_no];
 		pdch->rcv_block(&data[0], sizeof(data), *fn, &meas);
 	}
-	ul_tbf->create_ul_ack(*fn, ts_no);
+	osmo_fsm_inst_dispatch(ul_tbf->ul_ack_fsm.fi, TBF_UL_ACK_EV_SCHED_ACK, NULL);
+	tbf_ul_ack_create_rlcmac_msg(ul_tbf, *fn, ts_no);
 	memset(data, 0x2b, sizeof(data));
 	hdr3 = (struct gprs_rlc_ul_header_egprs_3 *)data;
 	hdr3->r = 0;
@@ -1608,7 +1614,7 @@
 	request_dl_rlc_block(ul_tbf, fn);
 
 	check_tbf(ul_tbf);
-	OSMO_ASSERT(ul_tbf->ul_ack_state_is(GPRS_RLCMAC_UL_ACK_NONE));
+	OSMO_ASSERT(tbf_ul_ack_fi(ul_tbf)->state == TBF_UL_ACK_ST_NONE);
 
 	ms = bts_ms_by_tlli(bts, tlli, GSM_RESERVED_TMSI);
 	OSMO_ASSERT(ms != NULL);
diff --git a/tests/tbf/TbfTest.err b/tests/tbf/TbfTest.err
index e5664ef..afc5a8f 100644
--- a/tests/tbf/TbfTest.err
+++ b/tests/tbf/TbfTest.err
@@ -27,6 +27,7 @@
 TBF{NULL}: Allocated
 UL_ASS_TBF{NONE}: Allocated
 DL_ASS_TBF{NONE}: Allocated
+UL_ACK_TBF{NONE}: Allocated
 [UL] algo A <multi> (suggested TRX: 0): Alloc start
 - Skipping TS 0, because not enabled
 - Skipping TS 1, because not enabled
@@ -1730,6 +1731,7 @@
 TBF{NULL}: Allocated
 UL_ASS_TBF{NONE}: Allocated
 DL_ASS_TBF{NONE}: Allocated
+UL_ACK_TBF{NONE}: Allocated
 [UL] algo A <single> (suggested TRX: -1): Alloc start
 - Skipping TS 0, because not enabled
 - Skipping TS 1, because not enabled
@@ -1769,7 +1771,8 @@
 TBF(UL-TFI_0){FLOW}: state_chg to FINISHED
 TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FINISHED) Scheduling Ack/Nack, because TLLI is included.
 TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FINISHED) Scheduling final Ack/Nack, because all data was received and last block has CV==0.
-TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FINISHED) changes UL ACK state from GPRS_RLCMAC_UL_ACK_NONE to GPRS_RLCMAC_UL_ACK_SEND_ACK
+UL_ACK_TBF(UL-TFI_0){NONE}: Received Event SCHED_ACK
+UL_ACK_TBF(UL-TFI_0){NONE}: state_chg to SCHED_UL_ACK
 Got 'TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FINISHED)', TA=7
 Got MS: TLLI = 0xf1223344, TA = 7
 Modifying MS object, TLLI = 0xf1223344, IMSI '' -> '0011223344'
@@ -1820,6 +1823,7 @@
 TBF{NULL}: Allocated
 UL_ASS_TBF{NONE}: Allocated
 DL_ASS_TBF{NONE}: Allocated
+UL_ACK_TBF{NONE}: Allocated
 [UL] algo A <multi> (suggested TRX: 0): Alloc start
 - Skipping TS 0, because not enabled
 - Skipping TS 1, because not enabled
@@ -1918,6 +1922,7 @@
 TBF{NULL}: Allocated
 UL_ASS_TBF{NONE}: Allocated
 DL_ASS_TBF{NONE}: Allocated
+UL_ACK_TBF{NONE}: Allocated
 [UL] algo A <multi> (suggested TRX: 0): Alloc start
 - Skipping TS 0, because not enabled
 - Skipping TS 1, because not enabled
@@ -2082,6 +2087,7 @@
 TBF{NULL}: Allocated
 UL_ASS_TBF{NONE}: Allocated
 DL_ASS_TBF{NONE}: Allocated
+UL_ACK_TBF{NONE}: Allocated
 [UL] algo A <multi> (suggested TRX: 0): Alloc start
 - Skipping TS 0, because not enabled
 - Skipping TS 1, because not enabled
@@ -2151,6 +2157,7 @@
 PDCH(bts=0,trx=0,ts=7) Detaching TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW), 1 TBFs, USFs = 02, TFIs = 00000002.
 MS(TLLI=0xf1223344, IMSI=0011223344, TA=7, 1/0,) Detaching TBF: TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW)
 ********** UL-TBF ends here **********
+UL_ACK_TBF(UL-TFI_0){NONE}: Deallocated
 TBF(UL-TFI_0){FLOW}: Deallocated
 UL_ASS_TBF(UL-TFI_0){NONE}: Deallocated
 DL_ASS_TBF(UL-TFI_0){NONE}: Deallocated
@@ -2179,6 +2186,7 @@
 TBF{NULL}: Allocated
 UL_ASS_TBF{NONE}: Allocated
 DL_ASS_TBF{NONE}: Allocated
+UL_ACK_TBF{NONE}: Allocated
 [UL] algo A <multi> (suggested TRX: 0): Alloc start
 - Skipping TS 0, because not enabled
 - Skipping TS 1, because not enabled
@@ -2264,6 +2272,7 @@
 PDCH(bts=0,trx=0,ts=7) Detaching TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW), 0 TBFs, USFs = 00, TFIs = 00000000.
 MS(TLLI=0xf1223344, IMSI=0011223344, TA=7, 1/0, DL) Detaching TBF: TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW)
 ********** UL-TBF ends here **********
+UL_ACK_TBF(UL-TFI_0){NONE}: Deallocated
 TBF(UL-TFI_0){FLOW}: Deallocated
 UL_ASS_TBF(UL-TFI_0){NONE}: Deallocated
 DL_ASS_TBF(UL-TFI_0){SEND_ASS}: Deallocated
@@ -2281,6 +2290,7 @@
 TBF{NULL}: Allocated
 UL_ASS_TBF{NONE}: Allocated
 DL_ASS_TBF{NONE}: Allocated
+UL_ACK_TBF{NONE}: Allocated
 [UL] algo A <multi> (suggested TRX: 0): Alloc start
 - Skipping TS 0, because not enabled
 - Skipping TS 1, because not enabled
@@ -2349,6 +2359,7 @@
 TBF{NULL}: Allocated
 UL_ASS_TBF{NONE}: Allocated
 DL_ASS_TBF{NONE}: Allocated
+UL_ACK_TBF{NONE}: Allocated
 [UL] algo A <multi> (suggested TRX: 0): Alloc start
 - Skipping TS 0, because not enabled
 - Skipping TS 1, because not enabled
@@ -2434,6 +2445,7 @@
 PDCH(bts=0,trx=0,ts=7) Detaching TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW), 0 TBFs, USFs = 00, TFIs = 00000000.
 MS(TLLI=0xf1223344, IMSI=0011223344, TA=7, 1/0, DL) Detaching TBF: TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW)
 ********** UL-TBF ends here **********
+UL_ACK_TBF(UL-TFI_0){NONE}: Deallocated
 TBF(UL-TFI_0){FLOW}: Deallocated
 UL_ASS_TBF(UL-TFI_0){NONE}: Deallocated
 DL_ASS_TBF(UL-TFI_0){SEND_ASS}: Deallocated
@@ -2445,6 +2457,7 @@
 TBF{NULL}: Allocated
 UL_ASS_TBF{NONE}: Allocated
 DL_ASS_TBF{NONE}: Allocated
+UL_ACK_TBF{NONE}: Allocated
 [UL] algo A <single> (suggested TRX: -1): Alloc start
 - Skipping TS 0, because not enabled
 - Skipping TS 1, because not enabled
@@ -2494,7 +2507,8 @@
 TBF(UL-TFI_0){FLOW}: state_chg to FINISHED
 TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FINISHED) Scheduling Ack/Nack, because TLLI is included.
 TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FINISHED) Scheduling final Ack/Nack, because all data was received and last block has CV==0.
-TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FINISHED) changes UL ACK state from GPRS_RLCMAC_UL_ACK_NONE to GPRS_RLCMAC_UL_ACK_SEND_ACK
+UL_ACK_TBF(UL-TFI_0){NONE}: Received Event SCHED_ACK
+UL_ACK_TBF(UL-TFI_0){NONE}: state_chg to SCHED_UL_ACK
 New MS: TLLI = 0xf1223344, TA = 7, IMSI = 0011223344, LLC = 2
 === end test_tbf_dl_flow_and_rach_single_phase ===
 === start test_tbf_dl_reuse ===
@@ -2516,6 +2530,7 @@
 TBF{NULL}: Allocated
 UL_ASS_TBF{NONE}: Allocated
 DL_ASS_TBF{NONE}: Allocated
+UL_ACK_TBF{NONE}: Allocated
 [UL] algo A <multi> (suggested TRX: 0): Alloc start
 - Skipping TS 0, because not enabled
 - Skipping TS 1, because not enabled
@@ -3691,6 +3706,7 @@
 TBF{NULL}: Allocated
 UL_ASS_TBF{NONE}: Allocated
 DL_ASS_TBF{NONE}: Allocated
+UL_ACK_TBF{NONE}: Allocated
 [UL] algo A <multi> (suggested TRX: 0): Alloc start
 - Skipping TS 0, because not enabled
 - Skipping TS 1, because not enabled
@@ -3797,6 +3813,7 @@
 TBF{NULL}: Allocated
 UL_ASS_TBF{NONE}: Allocated
 DL_ASS_TBF{NONE}: Allocated
+UL_ACK_TBF{NONE}: Allocated
 [UL] algo A <multi> (suggested TRX: 0): Alloc start
 - Skipping TS 0, because not enabled
 - Skipping TS 1, because not enabled
@@ -3868,7 +3885,8 @@
 TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) Frame 1 starts at offset 0, length=74, is_complete=0
 TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) No gaps in received block, last block: BSN=1 CV=7
 TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) Scheduling Ack/Nack, because MS is stalled.
-TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) changes UL ACK state from GPRS_RLCMAC_UL_ACK_NONE to GPRS_RLCMAC_UL_ACK_SEND_ACK
+UL_ACK_TBF(UL-TFI_0){NONE}: Received Event SCHED_ACK
+UL_ACK_TBF(UL-TFI_0){NONE}: state_chg to SCHED_UL_ACK
 PDCH(bts=0,trx=0,ts=7) Got MCS-3 RLC block: R=1, SI=1, TFI=0, CPS=5, RSB=0, rc=329
 PDCH(bts=0,trx=0,ts=7) FN=2654275 Rx UL DATA from unexpected TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS)
 TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) UL DATA TFI=0 received (V(Q)=2 .. V(R)=2)
@@ -3889,6 +3907,7 @@
 TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) Frame 1 starts at offset 0, length=74, is_complete=0
 TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) No gaps in received block, last block: BSN=2 CV=7
 TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) Scheduling Ack/Nack, because MS is stalled.
+UL_ACK_TBF(UL-TFI_0){SCHED_UL_ACK}: Received Event SCHED_ACK
 TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) Sending Ack/Nack already scheduled, no need to re-schedule
 PDCH(bts=0,trx=0,ts=7) Got MCS-3 RLC block: R=1, SI=1, TFI=0, CPS=5, RSB=0, rc=329
 PDCH(bts=0,trx=0,ts=7) FN=2654275 Rx UL DATA from unexpected TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS)
@@ -3917,6 +3936,7 @@
 TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) Frame 1 starts at offset 0, length=74, is_complete=0
 TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) No gaps in received block, last block: BSN=3 CV=7
 TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) Scheduling Ack/Nack, because MS is stalled.
+UL_ACK_TBF(UL-TFI_0){SCHED_UL_ACK}: Received Event SCHED_ACK
 TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) Sending Ack/Nack already scheduled, no need to re-schedule
 PDCH(bts=0,trx=0,ts=7) Got MCS-3 RLC block: R=1, SI=1, TFI=0, CPS=5, RSB=0, rc=329
 PDCH(bts=0,trx=0,ts=7) FN=2654275 Rx UL DATA from unexpected TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS)
@@ -3944,6 +3964,7 @@
 TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) Frame 1 starts at offset 0, length=74, is_complete=0
 TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) No gaps in received block, last block: BSN=4 CV=7
 TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) Scheduling Ack/Nack, because MS is stalled.
+UL_ACK_TBF(UL-TFI_0){SCHED_UL_ACK}: Received Event SCHED_ACK
 TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) Sending Ack/Nack already scheduled, no need to re-schedule
 PDCH(bts=0,trx=0,ts=7) Got MCS-3 RLC block: R=1, SI=1, TFI=0, CPS=5, RSB=0, rc=329
 PDCH(bts=0,trx=0,ts=7) FN=2654275 Rx UL DATA from unexpected TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS)
@@ -3965,6 +3986,7 @@
 TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) Frame 1 starts at offset 0, length=74, is_complete=0
 TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) No gaps in received block, last block: BSN=5 CV=7
 TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) Scheduling Ack/Nack, because MS is stalled.
+UL_ACK_TBF(UL-TFI_0){SCHED_UL_ACK}: Received Event SCHED_ACK
 TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) Sending Ack/Nack already scheduled, no need to re-schedule
 Got 'TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS)', TA=7
 Got MS: TLLI = 0xf1223344, TA = 7
@@ -6784,6 +6806,7 @@
 TBF{NULL}: Allocated
 UL_ASS_TBF{NONE}: Allocated
 DL_ASS_TBF{NONE}: Allocated
+UL_ACK_TBF{NONE}: Allocated
 [UL] algo A <multi> (suggested TRX: 0): Alloc start
 - Skipping TS 0, because not enabled
 - Skipping TS 1, because not enabled
@@ -6844,14 +6867,20 @@
 TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) Assembling frames: (len=37)
 TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) Frame 1 starts at offset 0, length=37, is_complete=0
 TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) No gaps in received block, last block: BSN=1 CV=7
-TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) changes UL ACK state from GPRS_RLCMAC_UL_ACK_NONE to GPRS_RLCMAC_UL_ACK_NONE
+UL_ACK_TBF(UL-TFI_0){NONE}: Received Event SCHED_ACK
+UL_ACK_TBF(UL-TFI_0){NONE}: state_chg to SCHED_UL_ACK
+UL_ACK_TBF(UL-TFI_0){SCHED_UL_ACK}: Received Event CREATE_RLCMAC_MSG
+UL_ACK_TBF(UL-TFI_0){SCHED_UL_ACK}: state_chg to NONE
 PDCH(bts=0,trx=0,ts=7) Got MCS-3 RLC block: R=1, SI=0, TFI=0, CPS=5, RSB=0, rc=329
 PDCH(bts=0,trx=0,ts=7) FN=2654275 Rx UL DATA from unexpected TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS)
 TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) UL DATA TFI=0 received (V(Q)=2 .. V(R)=2)
 TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) Got MCS-3 RLC data block: CV=7, BSN=4, SPB=0, PI=0, E=1, TI=0, bitoffs=33
 TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) BSN 4 storing in window (2..65)
 TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) data_length=37, data=00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
-TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) changes UL ACK state from GPRS_RLCMAC_UL_ACK_NONE to GPRS_RLCMAC_UL_ACK_NONE
+UL_ACK_TBF(UL-TFI_0){NONE}: Received Event SCHED_ACK
+UL_ACK_TBF(UL-TFI_0){NONE}: state_chg to SCHED_UL_ACK
+UL_ACK_TBF(UL-TFI_0){SCHED_UL_ACK}: Received Event CREATE_RLCMAC_MSG
+UL_ACK_TBF(UL-TFI_0){SCHED_UL_ACK}: state_chg to NONE
 Got 'TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS)', TA=7
 Got MS: TLLI = 0xf1223344, TA = 7
 Modifying MS object, TLLI = 0xf1223344, IMSI '' -> '0011223344'
@@ -6966,6 +6995,7 @@
 TBF{NULL}: Allocated
 UL_ASS_TBF{NONE}: Allocated
 DL_ASS_TBF{NONE}: Allocated
+UL_ACK_TBF{NONE}: Allocated
 [UL] algo A <multi> (suggested TRX: 0): Alloc start
 - Skipping TS 0, because not enabled
 - Skipping TS 1, because not enabled
@@ -7123,6 +7153,7 @@
 TBF{NULL}: Allocated
 UL_ASS_TBF{NONE}: Allocated
 DL_ASS_TBF{NONE}: Allocated
+UL_ACK_TBF{NONE}: Allocated
 [UL] algo A <single> (suggested TRX: -1): Alloc start
 - Skipping TS 0, because not enabled
 - Skipping TS 1, because not enabled
@@ -7149,6 +7180,7 @@
 TBF{NULL}: Allocated
 UL_ASS_TBF{NONE}: Allocated
 DL_ASS_TBF{NONE}: Allocated
+UL_ACK_TBF{NONE}: Allocated
 [UL] algo A <single> (suggested TRX: -1): Alloc start
 - Skipping TS 0, because not enabled
 - Skipping TS 1, because not enabled
@@ -7175,6 +7207,7 @@
 TBF{NULL}: Allocated
 UL_ASS_TBF{NONE}: Allocated
 DL_ASS_TBF{NONE}: Allocated
+UL_ACK_TBF{NONE}: Allocated
 [UL] algo A <single> (suggested TRX: -1): Alloc start
 - Skipping TS 0, because not enabled
 - Skipping TS 1, because not enabled
@@ -7201,6 +7234,7 @@
 TBF{NULL}: Allocated
 UL_ASS_TBF{NONE}: Allocated
 DL_ASS_TBF{NONE}: Allocated
+UL_ACK_TBF{NONE}: Allocated
 [UL] algo A <single> (suggested TRX: -1): Alloc start
 - Skipping TS 0, because not enabled
 - Skipping TS 1, because not enabled
@@ -7227,6 +7261,7 @@
 TBF{NULL}: Allocated
 UL_ASS_TBF{NONE}: Allocated
 DL_ASS_TBF{NONE}: Allocated
+UL_ACK_TBF{NONE}: Allocated
 [UL] algo A <single> (suggested TRX: -1): Alloc start
 - Skipping TS 0, because not enabled
 - Skipping TS 1, because not enabled
@@ -7253,6 +7288,7 @@
 TBF{NULL}: Allocated
 UL_ASS_TBF{NONE}: Allocated
 DL_ASS_TBF{NONE}: Allocated
+UL_ACK_TBF{NONE}: Allocated
 [UL] algo A <single> (suggested TRX: -1): Alloc start
 - Skipping TS 0, because not enabled
 - Skipping TS 1, because not enabled
@@ -7279,6 +7315,7 @@
 TBF{NULL}: Allocated
 UL_ASS_TBF{NONE}: Allocated
 DL_ASS_TBF{NONE}: Allocated
+UL_ACK_TBF{NONE}: Allocated
 [UL] algo A <single> (suggested TRX: -1): Alloc start
 - Skipping TS 0, because not enabled
 - Skipping TS 1, because not enabled
@@ -7305,6 +7342,7 @@
 TBF{NULL}: Allocated
 UL_ASS_TBF{NONE}: Allocated
 DL_ASS_TBF{NONE}: Allocated
+UL_ACK_TBF{NONE}: Allocated
 [UL] algo A <single> (suggested TRX: -1): Alloc start
 - Skipping TS 0, because not enabled
 - Skipping TS 1, because not enabled
@@ -7316,6 +7354,7 @@
 - Skipping TS 7, because no USF available
 [UL] algo A <single> (suggested TRX: -1): failed to allocate a TS, no USF available
 TBF(TFI=0 TLLI=0xffffffff DIR=UL STATE=NULL) Timeslot Allocation failed: trx = -1, single_slot = 1
+UL_ACK_TBF{NONE}: Deallocated
 TBF{NULL}: Deallocated
 UL_ASS_TBF{NONE}: Deallocated
 DL_ASS_TBF{NONE}: Deallocated
@@ -7351,6 +7390,7 @@
 TBF{NULL}: Allocated
 UL_ASS_TBF{NONE}: Allocated
 DL_ASS_TBF{NONE}: Allocated
+UL_ACK_TBF{NONE}: Allocated
 [UL] algo A <multi> (suggested TRX: 0): Alloc start
 - Skipping TS 0, because not enabled
 - Skipping TS 1, because not enabled
@@ -7517,7 +7557,8 @@
 TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) BSN 38 storing in window (1..192)
 TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 
 TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) Scheduling Ack/Nack, because 20 frames received.
-TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) changes UL ACK state from GPRS_RLCMAC_UL_ACK_NONE to GPRS_RLCMAC_UL_ACK_SEND_ACK
+UL_ACK_TBF(UL-TFI_0){NONE}: Received Event SCHED_ACK
+UL_ACK_TBF(UL-TFI_0){NONE}: state_chg to SCHED_UL_ACK
 PDCH(bts=0,trx=0,ts=7) Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385
 PDCH(bts=0,trx=0,ts=7) FN=2654275 Rx UL DATA from unexpected TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS)
 TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) UL DATA TFI=0 received (V(Q)=1 .. V(R)=39)
@@ -7639,6 +7680,7 @@
 TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) BSN 78 storing in window (1..192)
 TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 
 TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) Scheduling Ack/Nack, because 20 frames received.
+UL_ACK_TBF(UL-TFI_0){SCHED_UL_ACK}: Received Event SCHED_ACK
 TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) Sending Ack/Nack already scheduled, no need to re-schedule
 PDCH(bts=0,trx=0,ts=7) Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385
 PDCH(bts=0,trx=0,ts=7) FN=2654275 Rx UL DATA from unexpected TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS)
@@ -7761,6 +7803,7 @@
 TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) BSN 118 storing in window (1..192)
 TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 
 TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) Scheduling Ack/Nack, because 20 frames received.
+UL_ACK_TBF(UL-TFI_0){SCHED_UL_ACK}: Received Event SCHED_ACK
 TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) Sending Ack/Nack already scheduled, no need to re-schedule
 PDCH(bts=0,trx=0,ts=7) Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385
 PDCH(bts=0,trx=0,ts=7) FN=2654275 Rx UL DATA from unexpected TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS)
@@ -7883,8 +7926,12 @@
 TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) BSN 158 storing in window (1..192)
 TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 
 TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) Scheduling Ack/Nack, because 20 frames received.
+UL_ACK_TBF(UL-TFI_0){SCHED_UL_ACK}: Received Event SCHED_ACK
 TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) Sending Ack/Nack already scheduled, no need to re-schedule
-TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) changes UL ACK state from GPRS_RLCMAC_UL_ACK_SEND_ACK to GPRS_RLCMAC_UL_ACK_NONE
+UL_ACK_TBF(UL-TFI_0){SCHED_UL_ACK}: Received Event SCHED_ACK
+TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) Sending Ack/Nack already scheduled, no need to re-schedule
+UL_ACK_TBF(UL-TFI_0){SCHED_UL_ACK}: Received Event CREATE_RLCMAC_MSG
+UL_ACK_TBF(UL-TFI_0){SCHED_UL_ACK}: state_chg to NONE
 PDCH(bts=0,trx=0,ts=7) Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385
 PDCH(bts=0,trx=0,ts=7) FN=2654275 Rx UL DATA from unexpected TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS)
 TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) UL DATA TFI=0 received (V(Q)=1 .. V(R)=159)
@@ -8041,14 +8088,18 @@
 TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) BSN 36 storing in window (1..192)
 TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 
 TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) Scheduling Ack/Nack, because 20 frames received.
-TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) changes UL ACK state from GPRS_RLCMAC_UL_ACK_NONE to GPRS_RLCMAC_UL_ACK_SEND_ACK
+UL_ACK_TBF(UL-TFI_0){NONE}: Received Event SCHED_ACK
+UL_ACK_TBF(UL-TFI_0){NONE}: state_chg to SCHED_UL_ACK
 PDCH(bts=0,trx=0,ts=7) Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385
 PDCH(bts=0,trx=0,ts=7) FN=2654279 Rx UL DATA from unexpected TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS)
 TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) UL DATA TFI=0 received (V(Q)=1 .. V(R)=37)
 TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) Got MCS-4 RLC data block: CV=10, BSN=38, SPB=0, PI=0, E=1, TI=0, bitoffs=33
 TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) BSN 38 storing in window (1..192)
 TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 
-TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) changes UL ACK state from GPRS_RLCMAC_UL_ACK_SEND_ACK to GPRS_RLCMAC_UL_ACK_NONE
+UL_ACK_TBF(UL-TFI_0){SCHED_UL_ACK}: Received Event SCHED_ACK
+TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) Sending Ack/Nack already scheduled, no need to re-schedule
+UL_ACK_TBF(UL-TFI_0){SCHED_UL_ACK}: Received Event CREATE_RLCMAC_MSG
+UL_ACK_TBF(UL-TFI_0){SCHED_UL_ACK}: state_chg to NONE
 PDCH(bts=0,trx=0,ts=7) Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385
 PDCH(bts=0,trx=0,ts=7) FN=2654279 Rx UL DATA from unexpected TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS)
 TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) UL DATA TFI=0 received (V(Q)=1 .. V(R)=39)
@@ -8056,8 +8107,12 @@
 TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) BSN 64 storing in window (1..192)
 TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) data_length=44, data=80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 
 TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) Scheduling Ack/Nack, because some data is missing and last block has CV==0.
-TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) changes UL ACK state from GPRS_RLCMAC_UL_ACK_NONE to GPRS_RLCMAC_UL_ACK_SEND_ACK
-TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) changes UL ACK state from GPRS_RLCMAC_UL_ACK_SEND_ACK to GPRS_RLCMAC_UL_ACK_NONE
+UL_ACK_TBF(UL-TFI_0){NONE}: Received Event SCHED_ACK
+UL_ACK_TBF(UL-TFI_0){NONE}: state_chg to SCHED_UL_ACK
+UL_ACK_TBF(UL-TFI_0){SCHED_UL_ACK}: Received Event SCHED_ACK
+TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) Sending Ack/Nack already scheduled, no need to re-schedule
+UL_ACK_TBF(UL-TFI_0){SCHED_UL_ACK}: Received Event CREATE_RLCMAC_MSG
+UL_ACK_TBF(UL-TFI_0){SCHED_UL_ACK}: state_chg to NONE
 PDCH(bts=0,trx=0,ts=7) Received RTS for PDCH: FN=2654279 block_nr=10 scheduling USF=0 for TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS), expect answer on UL FN=2654283
 DL_ASS_TBF(UL-TFI_0){SEND_ASS}: Received Event CREATE_RLCMAC_MSG
 PDCH(bts=0,trx=0,ts=7) POLL scheduled at FN 2654279 + 13 = 2654292
@@ -8178,7 +8233,8 @@
 TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) BSN 97 storing in window (0..191)
 TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 
 TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) Scheduling Ack/Nack, because 20 frames received.
-TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) changes UL ACK state from GPRS_RLCMAC_UL_ACK_NONE to GPRS_RLCMAC_UL_ACK_SEND_ACK
+UL_ACK_TBF(UL-TFI_0){NONE}: Received Event SCHED_ACK
+UL_ACK_TBF(UL-TFI_0){NONE}: state_chg to SCHED_UL_ACK
 PDCH(bts=0,trx=0,ts=7) Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385
 PDCH(bts=0,trx=0,ts=7) FN=2654283 Rx UL DATA from unexpected TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS)
 TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) UL DATA TFI=0 received (V(Q)=0 .. V(R)=98)
@@ -8300,6 +8356,7 @@
 TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) BSN 117 storing in window (0..191)
 TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 
 TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) Scheduling Ack/Nack, because 20 frames received.
+UL_ACK_TBF(UL-TFI_0){SCHED_UL_ACK}: Received Event SCHED_ACK
 TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) Sending Ack/Nack already scheduled, no need to re-schedule
 PDCH(bts=0,trx=0,ts=7) Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385
 PDCH(bts=0,trx=0,ts=7) FN=2654283 Rx UL DATA from unexpected TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS)
@@ -8422,6 +8479,7 @@
 TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) BSN 137 storing in window (0..191)
 TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 
 TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) Scheduling Ack/Nack, because 20 frames received.
+UL_ACK_TBF(UL-TFI_0){SCHED_UL_ACK}: Received Event SCHED_ACK
 TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) Sending Ack/Nack already scheduled, no need to re-schedule
 PDCH(bts=0,trx=0,ts=7) Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385
 PDCH(bts=0,trx=0,ts=7) FN=2654283 Rx UL DATA from unexpected TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS)
@@ -8544,6 +8602,7 @@
 TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) BSN 157 storing in window (0..191)
 TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 
 TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) Scheduling Ack/Nack, because 20 frames received.
+UL_ACK_TBF(UL-TFI_0){SCHED_UL_ACK}: Received Event SCHED_ACK
 TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) Sending Ack/Nack already scheduled, no need to re-schedule
 PDCH(bts=0,trx=0,ts=7) Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385
 PDCH(bts=0,trx=0,ts=7) FN=2654283 Rx UL DATA from unexpected TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS)
@@ -8557,7 +8616,10 @@
 TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) Got MCS-4 RLC data block: CV=10, BSN=159, SPB=0, PI=0, E=1, TI=0, bitoffs=33
 TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) BSN 159 storing in window (0..191)
 TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 
-TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) changes UL ACK state from GPRS_RLCMAC_UL_ACK_SEND_ACK to GPRS_RLCMAC_UL_ACK_NONE
+UL_ACK_TBF(UL-TFI_0){SCHED_UL_ACK}: Received Event SCHED_ACK
+TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) Sending Ack/Nack already scheduled, no need to re-schedule
+UL_ACK_TBF(UL-TFI_0){SCHED_UL_ACK}: Received Event CREATE_RLCMAC_MSG
+UL_ACK_TBF(UL-TFI_0){SCHED_UL_ACK}: state_chg to NONE
 PDCH(bts=0,trx=0,ts=7) Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385
 PDCH(bts=0,trx=0,ts=7) FN=2654283 Rx UL DATA from unexpected TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS)
 TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) UL DATA TFI=0 received (V(Q)=0 .. V(R)=160)
@@ -8662,6 +8724,7 @@
 TBF{NULL}: Allocated
 UL_ASS_TBF{NONE}: Allocated
 DL_ASS_TBF{NONE}: Allocated
+UL_ACK_TBF{NONE}: Allocated
 [UL] algo A <multi> (suggested TRX: 0): Alloc start
 - Skipping TS 0, because not enabled
 - Skipping TS 1, because not enabled
@@ -8707,6 +8770,7 @@
 TBF{NULL}: Allocated
 UL_ASS_TBF{NONE}: Allocated
 DL_ASS_TBF{NONE}: Allocated
+UL_ACK_TBF{NONE}: Allocated
 [UL] algo A <multi> (suggested TRX: 0): Alloc start
 - Skipping TS 0, because not enabled
 - Skipping TS 1, because not enabled
@@ -8759,6 +8823,7 @@
 TBF{NULL}: Allocated
 UL_ASS_TBF{NONE}: Allocated
 DL_ASS_TBF{NONE}: Allocated
+UL_ACK_TBF{NONE}: Allocated
 [UL] algo A <multi> (suggested TRX: 0): Alloc start
 - Skipping TS 0, because not enabled
 - Skipping TS 1, because not enabled
@@ -8811,6 +8876,7 @@
 TBF{NULL}: Allocated
 UL_ASS_TBF{NONE}: Allocated
 DL_ASS_TBF{NONE}: Allocated
+UL_ACK_TBF{NONE}: Allocated
 [UL] algo A <multi> (suggested TRX: 0): Alloc start
 - Skipping TS 0, because not enabled
 - Skipping TS 1, because not enabled
@@ -8863,6 +8929,7 @@
 TBF{NULL}: Allocated
 UL_ASS_TBF{NONE}: Allocated
 DL_ASS_TBF{NONE}: Allocated
+UL_ACK_TBF{NONE}: Allocated
 [UL] algo A <multi> (suggested TRX: 0): Alloc start
 - Skipping TS 0, because not enabled
 - Skipping TS 1, because not enabled
@@ -8915,6 +8982,7 @@
 TBF{NULL}: Allocated
 UL_ASS_TBF{NONE}: Allocated
 DL_ASS_TBF{NONE}: Allocated
+UL_ACK_TBF{NONE}: Allocated
 [UL] algo A <multi> (suggested TRX: 0): Alloc start
 - Skipping TS 0, because not enabled
 - Skipping TS 1, because not enabled
@@ -8967,6 +9035,7 @@
 TBF{NULL}: Allocated
 UL_ASS_TBF{NONE}: Allocated
 DL_ASS_TBF{NONE}: Allocated
+UL_ACK_TBF{NONE}: Allocated
 [UL] algo A <multi> (suggested TRX: 0): Alloc start
 - Skipping TS 0, because not enabled
 - Skipping TS 1, because not enabled
@@ -9019,6 +9088,7 @@
 TBF{NULL}: Allocated
 UL_ASS_TBF{NONE}: Allocated
 DL_ASS_TBF{NONE}: Allocated
+UL_ACK_TBF{NONE}: Allocated
 [UL] algo A <multi> (suggested TRX: 0): Alloc start
 - Skipping TS 0, because not enabled
 - Skipping TS 1, because not enabled
@@ -9030,6 +9100,7 @@
 - Skipping TS 7, because no USF available
 [UL] algo A <multi> (suggested TRX: 0): failed to allocate a TS, no USF available
 TBF(TFI=0 TLLI=0xffeeddd3 DIR=UL STATE=NULL EGPRS) Timeslot Allocation failed: trx = 0, single_slot = 0
+UL_ACK_TBF{NONE}: Deallocated
 TBF{NULL}: Deallocated
 UL_ASS_TBF{NONE}: Deallocated
 DL_ASS_TBF{NONE}: Deallocated
@@ -9037,6 +9108,7 @@
 TBF{NULL}: Allocated
 UL_ASS_TBF{NONE}: Allocated
 DL_ASS_TBF{NONE}: Allocated
+UL_ACK_TBF{NONE}: Allocated
 MS(TLLI=0xffeeddd3, IMSI=, TA=7, 11/11,) Attaching UL TBF: TBF(TFI=0 TLLI=0xffeeddd3 DIR=UL STATE=NULL)
 TBF{NULL}: Received Event ASSIGN_ADD_PACCH
 TBF(TFI=0 TLLI=0xffeeddd3 DIR=UL STATE=NULL) set ass. type PACCH [prev CCCH:0, PACCH:0]
@@ -9066,6 +9138,7 @@
 TBF{NULL}: Allocated
 UL_ASS_TBF{NONE}: Allocated
 DL_ASS_TBF{NONE}: Allocated
+UL_ACK_TBF{NONE}: Allocated
 MS(TLLI=0xffeeddcc, IMSI=, TA=220, 0/0,) Attaching UL TBF: TBF(TFI=0 TLLI=0xffeeddcc DIR=UL STATE=NULL)
 TBF{NULL}: Received Event ASSIGN_ADD_PACCH
 TBF(TFI=0 TLLI=0xffeeddcc DIR=UL STATE=NULL) set ass. type PACCH [prev CCCH:0, PACCH:0]
@@ -9082,6 +9155,7 @@
 MS(TLLI=0xffeeddcc, IMSI=, TA=220, 0/0,) Detaching TBF: TBF(TFI=0 TLLI=0xffeeddcc DIR=UL STATE=ASSIGN)
 MS(TLLI=0xffeeddcc, IMSI=, TA=220, 0/0,) Destroying MS object
 ********** UL-TBF ends here **********
+UL_ACK_TBF{NONE}: Deallocated
 TBF{ASSIGN}: Deallocated
 UL_ASS_TBF{NONE}: Deallocated
 DL_ASS_TBF{NONE}: Deallocated
diff --git a/tests/types/TypesTest.cpp b/tests/types/TypesTest.cpp
index a975761..3834acb 100644
--- a/tests/types/TypesTest.cpp
+++ b/tests/types/TypesTest.cpp
@@ -698,7 +698,7 @@
 	win->reset_state();
 	win->set_ws(256);
 
-	Encoding::write_packet_uplink_ack(dest, tbf, false, 0);
+	write_packet_uplink_ack(dest, tbf, false, 0);
 	extract_egprs_ul_ack_nack(tbf, dest, &ssn, &crbb_test, &rbb, false);
 	check_egprs_bitmap(tbf, ssn, &crbb_test, rbb, &rbb_size);
 	free_egprs_ul_ack_nack(&rbb, &crbb_test);
@@ -709,7 +709,7 @@
 	win->set_ws(256);
 	win->receive_bsn(1);
 
-	Encoding::write_packet_uplink_ack(dest, tbf, false, 0);
+	write_packet_uplink_ack(dest, tbf, false, 0);
 	extract_egprs_ul_ack_nack(tbf, dest, &ssn, &crbb_test, &rbb, false);
 	check_egprs_bitmap(tbf, ssn, &crbb_test, rbb, &rbb_size);
 	free_egprs_ul_ack_nack(&rbb, &crbb_test);
@@ -720,7 +720,7 @@
 	win->set_ws(128);
 	win->receive_bsn(127);
 
-	Encoding::write_packet_uplink_ack(dest, tbf, false, 0);
+	write_packet_uplink_ack(dest, tbf, false, 0);
 	extract_egprs_ul_ack_nack(tbf, dest, &ssn, &crbb_test, &rbb, false);
 	check_egprs_bitmap(tbf, ssn, &crbb_test, rbb, &rbb_size);
 	free_egprs_ul_ack_nack(&rbb, &crbb_test);
@@ -731,7 +731,7 @@
 	for (uint16_t i=1; i<384/2; i++)
 		win->receive_bsn(i*2);
 
-	Encoding::write_packet_uplink_ack(dest, tbf, false, 0);
+	write_packet_uplink_ack(dest, tbf, false, 0);
 	extract_egprs_ul_ack_nack(tbf, dest, &ssn, &crbb_test, &rbb, false);
 	check_egprs_bitmap(tbf, ssn, &crbb_test, rbb, &rbb_size);
 	free_egprs_ul_ack_nack(&rbb, &crbb_test);
diff --git a/tests/types/TypesTest.err b/tests/types/TypesTest.err
index 9cd3c7c..8c8ba94 100644
--- a/tests/types/TypesTest.err
+++ b/tests/types/TypesTest.err
@@ -8,12 +8,14 @@
 TBF{NULL}: Allocated
 UL_ASS_TBF{NONE}: Allocated
 DL_ASS_TBF{NONE}: Allocated
+UL_ACK_TBF{NONE}: Allocated
 TBF(TFI=0 TLLI=0xffffffff DIR=UL STATE=NULL) Setting Control TS 4
 TBF(TFI=0 TLLI=0xffffffff DIR=UL STATE=NULL) Allocated: trx = 0, ul_slots = 10, dl_slots = 00
 MS(TLLI=0xffffffff, IMSI=, TA=220, 1/1,) Allocating UL TBF
 TBF{NULL}: Allocated
 UL_ASS_TBF{NONE}: Allocated
 DL_ASS_TBF{NONE}: Allocated
+UL_ACK_TBF{NONE}: Allocated
 TBF(TFI=0 TLLI=0xffffffff DIR=UL STATE=NULL EGPRS) Setting Control TS 1
 TBF(TFI=0 TLLI=0xffffffff DIR=UL STATE=NULL EGPRS) Allocated: trx = 0, ul_slots = 02, dl_slots = 00
 TBF(TFI=0 TLLI=0xffffffff DIR=UL STATE=NULL EGPRS) setting EGPRS UL window size to 64, base(64) slots(1) ws_pdch(0)
@@ -22,6 +24,7 @@
 TBF{NULL}: Allocated
 UL_ASS_TBF{NONE}: Allocated
 DL_ASS_TBF{NONE}: Allocated
+UL_ACK_TBF{NONE}: Allocated
 TBF(TFI=0 TLLI=0xffffffff DIR=UL STATE=NULL EGPRS) Setting Control TS 4
 TBF(TFI=0 TLLI=0xffffffff DIR=UL STATE=NULL EGPRS) Allocated: trx = 0, ul_slots = 10, dl_slots = 00
 TBF(TFI=0 TLLI=0xffffffff DIR=UL STATE=NULL EGPRS) setting EGPRS UL window size to 64, base(64) slots(1) ws_pdch(0)

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/25108
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Change-Id: Icf23bf5a4b85fbcbf1542cebceb76b9ba7185d30
Gerrit-Change-Number: 25108
Gerrit-PatchSet: 6
Gerrit-Owner: pespin <pespin at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: osmith <osmith at sysmocom.de>
Gerrit-Reviewer: pespin <pespin at sysmocom.de>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210823/d2efdd9f/attachment.htm>


More information about the gerrit-log mailing list