Change in osmo-pcu[master]: Free all MS TBFs when receiving GPRS Suspension Request

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 Sep 22 14:00:38 UTC 2020


pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-pcu/+/20245 )


Change subject: Free all MS TBFs when receiving GPRS Suspension Request
......................................................................

Free all MS TBFs when receiving GPRS Suspension Request

Otherwise, if there's DL data queued in the PCU for TBFs related to the
MS sending the GPRS Suspension Request, then the PCU will continue
sending DL data and nobody will

Otherwise the TBFs are kept, and hence PCU will continue reserving resources and
DL data queued will still be sent over the air, despite the MS not
listening anymore on the PDCH.

Change-Id: I4ae1c3706b2ed6e4d271cd16f7cd7f8937b84836
---
M src/pcu_l1_if.cpp
1 file changed, 17 insertions(+), 0 deletions(-)



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

diff --git a/src/pcu_l1_if.cpp b/src/pcu_l1_if.cpp
index 21eacfd..535fb70 100644
--- a/src/pcu_l1_if.cpp
+++ b/src/pcu_l1_if.cpp
@@ -49,6 +49,8 @@
 #include <osmocom/pcu/pcuif_proto.h>
 #include <bts.h>
 #include <pdch.h>
+#include <tbf_ul.h>
+#include <tbf_dl.h>
 
 // FIXME: move this, when changed from c++ to c.
 extern "C" {
@@ -730,7 +732,11 @@
 
 static int pcu_rx_susp_req(struct gsm_pcu_if_susp_req *susp_req)
 {
+	BTS *bts = BTS::main_bts();
 	struct bssgp_bvc_ctx *bctx = gprs_bssgp_pcu_current_bctx();
+	GprsMs *ms;
+	struct gprs_rlcmac_dl_tbf *dl_tbf;
+	struct gprs_rlcmac_ul_tbf *ul_tbf;
 	struct gprs_ra_id ra_id;
 
 	gsm48_parse_ra(&ra_id, susp_req->ra_id);
@@ -738,6 +744,17 @@
 	LOGP(DL1IF, LOGL_INFO, "GPRS Suspend request received: TLLI=0x%08x RAI=%s\n",
 		susp_req->tlli, osmo_rai_name(&ra_id));
 
+	if ((ms = bts->ms_store().get_ms(susp_req->tlli))) {
+		/* We need to catch both pointers here since MS may become freed
+		   after first tbf_free(dl_tbf) if only DL TBF was available */
+		dl_tbf = ms->dl_tbf();
+		ul_tbf = ms->ul_tbf();
+		if (dl_tbf)
+			tbf_free(dl_tbf);
+		if (ul_tbf)
+			tbf_free(ul_tbf);
+	}
+
 	if (!bctx)
 		return -1;
 

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

Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Change-Id: I4ae1c3706b2ed6e4d271cd16f7cd7f8937b84836
Gerrit-Change-Number: 20245
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin at sysmocom.de>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20200922/10be3311/attachment.htm>


More information about the gerrit-log mailing list