Change in osmo-pcu[master]: pdch.cpp: Avoid resetting (egprs_)ms_class to unknown if not found in...

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
Fri Jul 17 10:33:15 UTC 2020


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

Change subject: pdch.cpp: Avoid resetting (egprs_)ms_class to unknown if not found in MS RadioAccCap
......................................................................

pdch.cpp: Avoid resetting (egprs_)ms_class to unknown if not found in MS RadioAccCap

If the information is not found in the message, 0 (unknown MS class)
will be returned. If the MS already had some previous information on the
MS class, let's not lose it by setting it back to 0.

Take the opportunity to drop related log lines which are no needed,
since set_(egprs_)ms_class() functions already log the value changes.

Change-Id: Icd52209fd4395d78dc770e7869d1b1fe45a18ca0
---
M src/pdch.cpp
M tests/tbf/TbfTest.err
2 files changed, 6 insertions(+), 19 deletions(-)

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



diff --git a/src/pdch.cpp b/src/pdch.cpp
index 98d7678..3436e5b 100644
--- a/src/pdch.cpp
+++ b/src/pdch.cpp
@@ -588,20 +588,13 @@
 		}
 		if (request->Exist_MS_Radio_Access_capability2) {
 			uint8_t ms_class, egprs_ms_class;
-			ms_class = Decoding::get_ms_class_by_capability(
-				&request->MS_Radio_Access_capability2);
-			ms->set_ms_class(ms_class);
-			egprs_ms_class =
-				Decoding::get_egprs_ms_class_by_capability(
-					&request->MS_Radio_Access_capability2);
-			ms->set_egprs_ms_class(egprs_ms_class);
+			ms_class = Decoding::get_ms_class_by_capability(&request->MS_Radio_Access_capability2);
+			egprs_ms_class = Decoding::get_egprs_ms_class_by_capability(&request->MS_Radio_Access_capability2);
+			if (ms_class)
+				ms->set_ms_class(ms_class);
+			if (egprs_ms_class)
+				ms->set_egprs_ms_class(egprs_ms_class);
 		}
-		if (!ms->ms_class())
-			LOGP(DRLCMAC, LOGL_NOTICE, "MS does not give us a class.\n");
-		if (ms->egprs_ms_class())
-			LOGP(DRLCMAC, LOGL_INFO,
-				"MS supports EGPRS multislot class %d.\n",
-				ms->egprs_ms_class());
 
 		ul_tbf = tbf_alloc_ul(bts_data(), ms, trx_no(), tlli);
 		if (!ul_tbf) {
diff --git a/tests/tbf/TbfTest.err b/tests/tbf/TbfTest.err
index 6eb86cf..800d4f8 100644
--- a/tests/tbf/TbfTest.err
+++ b/tests/tbf/TbfTest.err
@@ -3111,7 +3111,6 @@
 Modifying MS object, TLLI = 0x00000000, TA 220 -> 7
 Modifying MS object, TLLI = 0x00000000, MS class 0 -> 1
 Modifying MS object, TLLI = 0x00000000, EGPRS MS class 0 -> 1
-MS supports EGPRS multislot class 1.
 ********** UL-TBF starts here **********
 Allocating UL TBF: MS_CLASS=1/1
 TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL EGPRS) Enabled EGPRS, mode EGPRS
@@ -3202,7 +3201,6 @@
 Modifying MS object, TLLI = 0x00000000, TA 220 -> 7
 Modifying MS object, TLLI = 0x00000000, MS class 0 -> 1
 Modifying MS object, TLLI = 0x00000000, EGPRS MS class 0 -> 1
-MS supports EGPRS multislot class 1.
 ********** UL-TBF starts here **********
 Allocating UL TBF: MS_CLASS=1/1
 TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL EGPRS) Enabled EGPRS, mode EGPRS
@@ -5840,7 +5838,6 @@
 Modifying MS object, TLLI = 0x00000000, TA 220 -> 7
 Modifying MS object, TLLI = 0x00000000, MS class 0 -> 1
 Modifying MS object, TLLI = 0x00000000, EGPRS MS class 0 -> 1
-MS supports EGPRS multislot class 1.
 ********** UL-TBF starts here **********
 Allocating UL TBF: MS_CLASS=1/1
 TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL EGPRS) Enabled EGPRS, mode EGPRS
@@ -6004,7 +6001,6 @@
 Modifying MS object, TLLI = 0x00000000, TA 220 -> 7
 Modifying MS object, TLLI = 0x00000000, MS class 0 -> 1
 Modifying MS object, TLLI = 0x00000000, EGPRS MS class 0 -> 1
-MS supports EGPRS multislot class 1.
 ********** UL-TBF starts here **********
 Allocating UL TBF: MS_CLASS=1/1
 TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL EGPRS) Enabled EGPRS, mode EGPRS
@@ -6329,7 +6325,6 @@
 Modifying MS object, TLLI = 0x00000000, TA 220 -> 7
 Modifying MS object, TLLI = 0x00000000, MS class 0 -> 1
 Modifying MS object, TLLI = 0x00000000, EGPRS MS class 0 -> 1
-MS supports EGPRS multislot class 1.
 ********** UL-TBF starts here **********
 Allocating UL TBF: MS_CLASS=1/1
 TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL EGPRS) Enabled EGPRS, mode EGPRS
@@ -7910,7 +7905,6 @@
 MS requests UL TBF in packet resource request of single block, but there is no resource request scheduled!
 Modifying MS object, TLLI = 0x00000000, MS class 0 -> 11
 Modifying MS object, TLLI = 0x00000000, EGPRS MS class 0 -> 11
-MS supports EGPRS multislot class 11.
 ********** UL-TBF starts here **********
 Allocating UL TBF: MS_CLASS=11/11
 [UL] Slot Allocation (Algorithm A) for class 11

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

Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Change-Id: Icd52209fd4395d78dc770e7869d1b1fe45a18ca0
Gerrit-Change-Number: 19195
Gerrit-PatchSet: 2
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-Reviewer: pespin <pespin at sysmocom.de>
Gerrit-CC: neels <nhofmeyr at sysmocom.de>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20200717/76f7da55/attachment.htm>


More information about the gerrit-log mailing list