Change in osmo-bsc[master]: abis_nm: rework warnings about unknown / not supported features

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/.

laforge gerrit-no-reply at lists.osmocom.org
Wed Apr 7 16:41:22 UTC 2021


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

Change subject: abis_nm: rework warnings about unknown / not supported features
......................................................................

abis_nm: rework warnings about unknown / not supported features

The reported feature vector may contain new features the BSC is
not aware of.  Report each of them individually as NOTICE.

It's normal when some BTS feature is considered as not supported
by the BSC, but a BTS reports that it is - do not log this.

Change-Id: I2f925bcdb010cb10d074bf7c82619e3ae1f8818b
---
M src/osmo-bsc/abis_nm.c
1 file changed, 14 insertions(+), 5 deletions(-)

Approvals:
  laforge: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/src/osmo-bsc/abis_nm.c b/src/osmo-bsc/abis_nm.c
index b377c4a..30d6fa3 100644
--- a/src/osmo-bsc/abis_nm.c
+++ b/src/osmo-bsc/abis_nm.c
@@ -594,11 +594,20 @@
 
 		memcpy(bts->_features_data, TLVP_VAL(tp, NM_ATT_MANUF_ID), len);
 
-		for (i = 0; i < _NUM_BTS_FEAT; i++) {
-			if (osmo_bts_has_feature(&bts->features, i) != osmo_bts_has_feature(&bts->model->features, i)) {
-				LOGPMO(&bts->mo, DNM, LOGL_NOTICE, "Feature '%s' reported via OML does not match statically "
-				       "set feature: %u != %u. Please fix.\n", get_value_string(osmo_bts_features_descs, i),
-				       osmo_bts_has_feature(&bts->features, i), osmo_bts_has_feature(&bts->model->features, i));
+		/* Check each BTS feature in the reported vector */
+		for (i = 0; i < len * 8; i++) {
+			bool Frep = osmo_bts_has_feature(&bts->features, i);
+			if (i >= _NUM_BTS_FEAT && Frep) {
+				LOGPMO(&bts->mo, DNM, LOGL_NOTICE, "Get Attributes Response: "
+				       "unknown feature 0x%02x. Consider upgrading osmo-bsc.\n", i);
+				continue;
+			}
+
+			bool Fexp = osmo_bts_has_feature(&bts->model->features, i);
+			if (!Frep && Fexp) {
+				LOGPMO(&bts->mo, DNM, LOGL_NOTICE, "Get Attributes Response: "
+				       "reported feature '%s' is not supported, while we thought it is.\n",
+				       get_value_string(osmo_bts_features_descs, i));
 			}
 		}
 	}

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

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: I2f925bcdb010cb10d074bf7c82619e3ae1f8818b
Gerrit-Change-Number: 18599
Gerrit-PatchSet: 8
Gerrit-Owner: fixeria <vyanitskiy at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
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/20210407/63610667/attachment.htm>


More information about the gerrit-log mailing list