[PATCH] osmo-pcu[master]: TBF: use independent T3169

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/.

Max gerrit-no-reply at lists.osmocom.org
Tue Dec 5 11:09:51 UTC 2017


Review at  https://gerrit.osmocom.org/5180

TBF: use independent T3169

Previously T3169 was handled using generic timer which means pending
T3169 was automatically cancelled by any new timer scheduled which used
the same timer on that TBF. Make it independent so it can be explicitly
scheduled and stopped regardless of other timers. Additionally this
allows us to control whether it should be restarted if it's already
pending.

Change-Id: I7ba28b8771b12a4a924ac05937051ade47622e51
Related: OS#2407
---
M src/bts.cpp
M src/tbf.cpp
M src/tbf_ul.cpp
M tests/tbf/TbfTest.err
4 files changed, 11 insertions(+), 9 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/80/5180/1

diff --git a/src/bts.cpp b/src/bts.cpp
index 341c9d4..6f76d84 100644
--- a/src/bts.cpp
+++ b/src/bts.cpp
@@ -681,7 +681,7 @@
 			tbf->set_ta(ta);
 			tbf->set_state(GPRS_RLCMAC_FLOW);
 			tbf->state_flags |= (1 << GPRS_RLCMAC_FLAG_CCCH);
-			tbf_timer_start(tbf, 3169, m_bts.t3169, 0, "RACH (new UL-TBF)");
+			tbf->start_t3169(m_bts.t3169, 0, "RACH (new UL-TBF)", true);
 			LOGP(DRLCMAC, LOGL_DEBUG, "%s [UPLINK] START\n",
 					tbf_name(tbf));
 			LOGP(DRLCMAC, LOGL_DEBUG, "%s RX: [PCU <- BTS] RACH "
diff --git a/src/tbf.cpp b/src/tbf.cpp
index b349d5e..e7635f2 100644
--- a/src/tbf.cpp
+++ b/src/tbf.cpp
@@ -407,7 +407,7 @@
 	tbf->m_contention_resolution_done = 1;
 	tbf->set_state(GPRS_RLCMAC_ASSIGN);
 	tbf->state_flags |= (1 << GPRS_RLCMAC_FLAG_PACCH);
-	tbf_timer_start(tbf, 3169, bts->t3169, 0, "allocation (UL-TBF)");
+	tbf->start_t3169(bts->t3169, 0, "allocation (UL-TBF)", true);
 	tbf->update_ms(tlli, GPRS_RLCMAC_UL_TBF);
 	OSMO_ASSERT(tbf->ms());
 
@@ -754,7 +754,7 @@
 				     "- N3103 exceeded\n");
 				bts->pkt_ul_ack_nack_poll_failed();
 				ul_tbf->set_state(GPRS_RLCMAC_RELEASING);
-				tbf_timer_start(ul_tbf, 3169, ul_tbf->bts->bts_data()->t3169, 0, "MAX N3103 reached");
+				ul_tbf->start_t3169(ul_tbf->bts->bts_data()->t3169, 0, "MAX N3103 reached", false);
 				return;
 			}
 			/* reschedule UL ack */
@@ -1144,11 +1144,6 @@
 					"IMM.ASS confirm\n", tbf_name(dl_tbf));
 		}
 		break;
-	case 3169:
-		LOGP(DRLCMAC, LOGL_NOTICE, "%s T%d timeout during "
-			"transsmission\n", tbf_name(this), T);
-		rlcmac_diag();
-		/* fall through */
 	case 3193: /* FIXME: remove once issue with start_t3193() is resolved */
 		LOGP(DRLCMAC, LOGL_DEBUG,
 			"%s will be freed due to timeout\n", tbf_name(this));
diff --git a/src/tbf_ul.cpp b/src/tbf_ul.cpp
index 0bbb817..b63988b 100644
--- a/src/tbf_ul.cpp
+++ b/src/tbf_ul.cpp
@@ -193,7 +193,7 @@
 	unsigned int block_idx;
 
 	/* restart T3169 */
-	tbf_timer_start(this, 3169, bts_data()->t3169, 0, "acked (data)");
+	start_t3169(bts_data()->t3169, 0, "acked (data)", true);
 
 	/* Increment RX-counter */
 	this->m_rx_counter++;
diff --git a/tests/tbf/TbfTest.err b/tests/tbf/TbfTest.err
index f534c54..f09f732 100644
--- a/tests/tbf/TbfTest.err
+++ b/tests/tbf/TbfTest.err
@@ -1897,8 +1897,15 @@
 TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=FINISHED) IMSI 0011223344: moving DL TBF to new MS object
 Detaching TBF from MS object, TLLI = 0xf1223344, TBF = TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=FINISHED)
 Attaching TBF to MS object, TLLI = 0xf5667788, TBF = TBF(TFI=0 TLLI=0xf5667788 DIR=DL STATE=FINISHED)
+UL RSSI of TLLI=0xf1223344: 31 dBm
+TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) free
+TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) stopping timer T3169 [freeing TBF]
+PDCH(TS 7, TRX 0): Detaching TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW), 1 TBFs, USFs = 02, TFIs = 00000002.
+Detaching TBF from MS object, TLLI = 0xf1223344, TBF = TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW)
+********** TBF ends here **********
 Modifying MS object, TLLI = 0xf5667788, IMSI '' -> '0011223344'
 Clearing MS object, TLLI: 0xf1223344, IMSI: '0011223344'
+Destroying MS object, TLLI = 0x00000000
 TBF(TFI=0 TLLI=0xf5667788 DIR=DL STATE=FINISHED) append
 Modifying MS object, TLLI: 0xf5667788 confirmed
 New MS: TLLI = 0xf5667788, TA = 7, IMSI = 0011223344, LLC = 1

-- 
To view, visit https://gerrit.osmocom.org/5180
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I7ba28b8771b12a4a924ac05937051ade47622e51
Gerrit-PatchSet: 1
Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Owner: Max <msuraev at sysmocom.de>



More information about the gerrit-log mailing list