Change in osmo-pcu[master]: tbf: log keep_open condition status

laforge gerrit-no-reply at lists.osmocom.org
Wed Mar 3 07:29:51 UTC 2021


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

Change subject: tbf: log keep_open condition status
......................................................................

tbf: log keep_open condition status

Change-Id: I069e84926aaa8f13b23c3ea4083b4c68dbc6cff2
---
M src/tbf_dl.cpp
M tests/tbf/TbfTest.err
2 files changed, 11 insertions(+), 1 deletion(-)

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



diff --git a/src/tbf_dl.cpp b/src/tbf_dl.cpp
index 88bab7d..2896378 100644
--- a/src/tbf_dl.cpp
+++ b/src/tbf_dl.cpp
@@ -1352,13 +1352,21 @@
 {
 	int keep_time_frames;
 	unsigned long dl_tbf_idle_msec;
+	int since_last_drain;
+	bool keep;
 
 	dl_tbf_idle_msec = osmo_tdef_get(the_pcu->T_defs, -2031, OSMO_TDEF_MS, -1);
 	if (dl_tbf_idle_msec == 0)
 		return false;
 
 	keep_time_frames = msecs_to_frames(dl_tbf_idle_msec);
-	return frames_since_last_drain(fn) <= keep_time_frames;
+	since_last_drain = frames_since_last_drain(fn);
+	keep = since_last_drain <= keep_time_frames;
+
+	if (since_last_drain >= 0)
+		LOGPTBFDL(this, LOGL_DEBUG, "Keep idle TBF open: %d/%d -> %s\n",
+			  since_last_drain, keep_time_frames, keep ? "yes" : "no");
+	return keep;
 }
 
 /*
diff --git a/tests/tbf/TbfTest.err b/tests/tbf/TbfTest.err
index 6a2c541..1b0739f 100644
--- a/tests/tbf/TbfTest.err
+++ b/tests/tbf/TbfTest.err
@@ -432,6 +432,7 @@
 TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW) downlink (V(A)==21 .. V(S)==21) mcs_mode_restrict=EGPRS
 TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW) Sending new dummy block at BSN 21, CS=CS-1
 TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW) Empty chunk, added LLC dummy command of size 19, drained_since=0
+TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW) Keep idle TBF open: 0/43 -> yes
 TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW) Complete DL frame, len=19
 TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW) data block (BSN 21, CS-1): 4d 43 c0 01 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 
 TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW) need_padding 0 spb_status 0 spb 0 (BSN1 21 BSN2 -1)
@@ -448,6 +449,7 @@
 TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW) downlink (V(A)==22 .. V(S)==22) mcs_mode_restrict=EGPRS
 TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW) Sending new dummy block at BSN 22, CS=CS-1
 TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW) Empty chunk, added LLC dummy command of size 19, drained_since=108
+TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW) Keep idle TBF open: 108/43 -> no
 TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW) Complete DL frame, len=19
 TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW) changes state from FLOW to FINISHED
 TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FINISHED) data block (BSN 22, CS-1): 4d 43 c0 01 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 

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

Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Change-Id: I069e84926aaa8f13b23c3ea4083b4c68dbc6cff2
Gerrit-Change-Number: 23196
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy at sysmocom.de>
Gerrit-Reviewer: laforge <laforge at osmocom.org>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210303/b5ed3e23/attachment.htm>


More information about the gerrit-log mailing list