Change in osmo-pcu[master]: pdch: Simplify code path allocating UL TBF

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

pespin gerrit-no-reply at lists.osmocom.org
Tue Oct 19 11:41:50 UTC 2021


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

Change subject: pdch: Simplify code path allocating UL TBF
......................................................................

pdch: Simplify code path allocating UL TBF

There's no real need to pass a tlli per separate, the information is
already contained in the MS. Furthermore, when doing so, it becomes
clear the TLLI was only passed to set it again on the MS, so actually
that ms_update() can be totally dropped since it will act as a no-op.

Change-Id: Ie761c3c7c222458ab0514117ae637ad3267139a0
---
M src/pdch.cpp
M src/tbf_ul.cpp
M src/tbf_ul.h
3 files changed, 4 insertions(+), 8 deletions(-)

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



diff --git a/src/pdch.cpp b/src/pdch.cpp
index 68bc69d..7d70958 100644
--- a/src/pdch.cpp
+++ b/src/pdch.cpp
@@ -119,7 +119,7 @@
 	bts_do_rate_ctr_inc(bts, CTR_CHANNEL_REQUEST_DESCRIPTION);
 
 	/* This call will register the new TBF with the MS on success */
-	gprs_rlcmac_ul_tbf *ul_tbf = tbf_alloc_ul_pacch(bts, tbf->ms(), tbf->trx->trx_no, tbf->tlli());
+	gprs_rlcmac_ul_tbf *ul_tbf = tbf_alloc_ul_pacch(bts, tbf->ms(), tbf->trx->trx_no);
 
 	/* schedule uplink assignment or reject */
 	if (ul_tbf) {
@@ -707,7 +707,7 @@
 				ms_set_egprs_ms_class(ms, egprs_ms_class);
 		}
 
-		ul_tbf = tbf_alloc_ul_pacch(bts(), ms, trx_no(), tlli);
+		ul_tbf = tbf_alloc_ul_pacch(bts(), ms, trx_no());
 		if (!ul_tbf) {
 			handle_tbf_reject(bts(), ms, trx_no(), ts_no);
 			goto return_unref;
diff --git a/src/tbf_ul.cpp b/src/tbf_ul.cpp
index d4f2093..74b2636 100644
--- a/src/tbf_ul.cpp
+++ b/src/tbf_ul.cpp
@@ -152,8 +152,7 @@
 }
 
 /* Alloc a UL TBF to be assigned over PACCH */
-gprs_rlcmac_ul_tbf *tbf_alloc_ul_pacch(struct gprs_rlcmac_bts *bts, GprsMs *ms, int8_t use_trx,
-				 uint32_t tlli)
+gprs_rlcmac_ul_tbf *tbf_alloc_ul_pacch(struct gprs_rlcmac_bts *bts, GprsMs *ms, int8_t use_trx)
 {
 	struct gprs_rlcmac_ul_tbf *tbf;
 
@@ -165,8 +164,6 @@
 	}
 	tbf->m_contention_resolution_done = 1;
 	osmo_fsm_inst_dispatch(tbf->state_fsm.fi, TBF_EV_ASSIGN_ADD_PACCH, NULL);
-	tbf->update_ms(tlli, GPRS_RLCMAC_UL_TBF);
-	OSMO_ASSERT(tbf->ms());
 
 	return tbf;
 }
diff --git a/src/tbf_ul.h b/src/tbf_ul.h
index defdfba..0dc2336 100644
--- a/src/tbf_ul.h
+++ b/src/tbf_ul.h
@@ -126,8 +126,7 @@
 }
 
 struct gprs_rlcmac_ul_tbf *tbf_alloc_ul_tbf(struct gprs_rlcmac_bts *bts, GprsMs *ms, int8_t use_trx, bool single_slot);
-struct gprs_rlcmac_ul_tbf *tbf_alloc_ul_pacch(struct gprs_rlcmac_bts *bts, GprsMs *ms,
-					      int8_t use_trx, uint32_t tlli);
+struct gprs_rlcmac_ul_tbf *tbf_alloc_ul_pacch(struct gprs_rlcmac_bts *bts, GprsMs *ms, int8_t use_trx);
 struct gprs_rlcmac_ul_tbf *tbf_alloc_ul_ccch(struct gprs_rlcmac_bts *bts, struct GprsMs *ms);
 struct gprs_rlcmac_ul_tbf *handle_tbf_reject(struct gprs_rlcmac_bts *bts,
 	GprsMs *ms, uint8_t trx_no, uint8_t ts_no);

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

Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Change-Id: Ie761c3c7c222458ab0514117ae637ad3267139a0
Gerrit-Change-Number: 25810
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel <dwillmann at sysmocom.de>
Gerrit-Reviewer: dexter <pmaier at sysmocom.de>
Gerrit-Reviewer: fixeria <vyanitskiy at sysmocom.de>
Gerrit-Reviewer: laforge <laforge at osmocom.org>
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/20211019/edb38297/attachment.htm>


More information about the gerrit-log mailing list