Change in osmo-pcu[master]: pdch: PktResReq: Avoid releasing ULC entry if expecting something els...

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
Wed Oct 13 01:32:46 UTC 2021


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

Change subject: pdch: PktResReq: Avoid releasing ULC entry if expecting something else on UL
......................................................................

pdch: PktResReq: Avoid releasing ULC entry if expecting something else on UL

Let's only release PDCH ULC entry if it was indeed what we expected.
In other case, time it out.

Move the case in the switch statement to the start to easy function
readibility (early return style).

Change-Id: I3d8749acca8e7859295d73cce556b2083169f726
---
M src/pdch.cpp
1 file changed, 8 insertions(+), 8 deletions(-)

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



diff --git a/src/pdch.cpp b/src/pdch.cpp
index 807ce45..a503a55 100644
--- a/src/pdch.cpp
+++ b/src/pdch.cpp
@@ -638,6 +638,14 @@
 		}
 
 		switch (item->type) {
+		case PDCH_ULC_NODE_TBF_USF:
+			/* Is it actually valid for an MS to send a PKT Res Req during USF? */
+			ul_tbf = item->tbf_usf.ul_tbf;
+			LOGPDCH(this, DRLCMAC, LOGL_NOTICE, "FN=%u PKT RESOURCE REQ: "
+				"Unexpectedly received, waiting USF of %s\n",
+				fn, tbf_name(item->tbf_usf.ul_tbf));
+			 /* Ignore it, let common path expire related ULC entry */
+			goto return_unref;
 		case PDCH_ULC_NODE_SBA:
 			sba = item->sba.sba;
 			LOGPDCH(this, DRLCMAC, LOGL_DEBUG, "FN=%u PKT RESOURCE REQ: "
@@ -675,14 +683,6 @@
 			ul_tbf->n_reset(N3103);
 			pdch_ulc_release_node(ulc, item);
 			break;
-		case PDCH_ULC_NODE_TBF_USF:
-			/* Is it actually valid for an MS to send a PKT Res Req during USF? */
-			ul_tbf = item->tbf_usf.ul_tbf;
-			LOGPDCH(this, DRLCMAC, LOGL_NOTICE, "FN=%u PKT RESOURCE REQ: "
-				"Unexpectedly received, waiting USF of %s\n",
-				fn, tbf_name(item->tbf_usf.ul_tbf));
-			pdch_ulc_release_node(ulc, item);
-			break;
 		default:
 			OSMO_ASSERT(0);
 		}

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

Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Change-Id: I3d8749acca8e7859295d73cce556b2083169f726
Gerrit-Change-Number: 25748
Gerrit-PatchSet: 2
Gerrit-Owner: pespin <pespin at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: dexter <pmaier at sysmocom.de>
Gerrit-Reviewer: fixeria <vyanitskiy at sysmocom.de>
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/20211013/d042e8b9/attachment.htm>


More information about the gerrit-log mailing list