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
Mon Oct 11 17:56:53 UTC 2021


pespin has uploaded this change for review. ( 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, 7 insertions(+), 9 deletions(-)



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

diff --git a/src/pdch.cpp b/src/pdch.cpp
index 807ce45..a64fb85 100644
--- a/src/pdch.cpp
+++ b/src/pdch.cpp
@@ -638,6 +638,13 @@
 		}
 
 		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));
+			return; /* Ignore it */
 		case PDCH_ULC_NODE_SBA:
 			sba = item->sba.sba;
 			LOGPDCH(this, DRLCMAC, LOGL_DEBUG, "FN=%u PKT RESOURCE REQ: "
@@ -665,7 +672,6 @@
 				LOGPDCH(this, DRLCMAC, LOGL_NOTICE, "FN=%u PKT RESOURCE REQ: "
 					"Unexpected TLLI 0x%08x received vs exp 0x%08x\n",
 					fn, tlli, ul_tbf->tlli());
-				/* let common path expire the poll */
 				goto return_unref;
 			}
 			/* 3GPP TS 44.060 $ 9.3.3.3 */
@@ -675,14 +681,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: 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/20211011/e7a6e9cc/attachment.htm>


More information about the gerrit-log mailing list