Change in osmo-pcu[master]: ul_tbf: Simplify function rcv_data_block_acknowledged

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
Thu May 13 11:37:26 UTC 2021


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

Change subject: ul_tbf: Simplify function rcv_data_block_acknowledged
......................................................................

ul_tbf: Simplify function rcv_data_block_acknowledged

Let's avoid different code paths in the loop based on is_tlli_invalid.
Instead, always do the proper storing of the block, and if later on the
corner case is found (no TLLI received while in Content Resolution
process) when checking tlli related stuff, then simply invalidate the
block.

Related: OS#1940
Change-Id: I77afaa617d7ce045c0f6d994fc0d8e03fe69de53
---
M src/tbf_ul.cpp
1 file changed, 6 insertions(+), 14 deletions(-)

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



diff --git a/src/tbf_ul.cpp b/src/tbf_ul.cpp
index 272d8b3..e92a920 100644
--- a/src/tbf_ul.cpp
+++ b/src/tbf_ul.cpp
@@ -420,7 +420,6 @@
 		int num_chunks;
 		uint8_t *rlc_data;
 		rdbi = &rlc->block_info[block_idx];
-		bool need_rlc_data = false;
 
 		LOGPTBFUL(this, LOGL_DEBUG,
 			  "Got %s RLC data block: CV=%d, BSN=%d, SPB=%d, PI=%d, E=%d, TI=%d, bitoffs=%d\n",
@@ -435,23 +434,12 @@
 			LOGPTBFUL(this, LOGL_DEBUG, "BSN %d out of window %d..%d (it's normal)\n",
 				  rdbi->bsn,
 				  m_window.v_q(), m_window.mod_sns(m_window.v_q() + ws - 1));
+			continue;
 		} else if (m_window.is_received(rdbi->bsn)) {
 			LOGPTBFUL(this, LOGL_DEBUG,
 				  "BSN %d already received\n", rdbi->bsn);
-		} else {
-			need_rlc_data = true;
-		}
-
-		if (!is_tlli_valid()) {
-			if (!rdbi->ti) {
-				LOGPTBFUL(this, LOGL_NOTICE, "Missing TLLI within UL DATA.\n");
-				continue;
-			}
-			need_rlc_data = true;
-		}
-
-		if (!need_rlc_data)
 			continue;
+		}
 
 		/* Store block and meta info to BSN buffer */
 
@@ -513,6 +501,10 @@
 				m_window.invalidate_bsn(rdbi->bsn);
 				continue;
 			}
+		} else if (!is_tlli_valid()) {
+			LOGPTBFUL(this, LOGL_NOTICE, "Missing TLLI within UL DATA.\n");
+			m_window.invalidate_bsn(rdbi->bsn);
+			continue;
 		}
 
 		m_window.receive_bsn(rdbi->bsn);

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

Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Change-Id: I77afaa617d7ce045c0f6d994fc0d8e03fe69de53
Gerrit-Change-Number: 24210
Gerrit-PatchSet: 2
Gerrit-Owner: pespin <pespin at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
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/20210513/0c4f7362/attachment.htm>


More information about the gerrit-log mailing list