osmith submitted this change.

View Change

Approvals: fixeria: Looks good to me, but someone else must approve pespin: Looks good to me, but someone else must approve osmith: Looks good to me, approved Jenkins Builder: Verified
abis_nm: don't compare assumed/reported features

Just log all reported features, instead of comparing them against an
expected set of features and logging mismatches. The point of reporting
features from the BTS at runtime is that the BSC can support various BTS
versions with various feature sets.

Related: SYS#5922, OS#5538
Change-Id: Ibd79bc7ef802d8e95e05d746df182ff974b78e29
---
M src/osmo-bsc/abis_nm.c
1 file changed, 8 insertions(+), 12 deletions(-)

diff --git a/src/osmo-bsc/abis_nm.c b/src/osmo-bsc/abis_nm.c
index f7882ac..a4976c0 100644
--- a/src/osmo-bsc/abis_nm.c
+++ b/src/osmo-bsc/abis_nm.c
@@ -601,21 +601,17 @@

memcpy(bts->_features_data, TLVP_VAL(tp, NM_ATT_MANUF_ID), len);

- /* Check each BTS feature in the reported vector */
+ /* Log 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);
+ if (!osmo_bts_has_feature(&bts->features, 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",
- osmo_bts_features_name(i));
- }
+ if (i >= _NUM_BTS_FEAT)
+ LOGPMO(&bts->mo, DNM, LOGL_NOTICE, "Get Attributes Response: unknown feature 0x%02x is"
+ " supported\n", i);
+ else
+ LOGPMO(&bts->mo, DNM, LOGL_NOTICE, "Get Attributes Response: feature '%s' is"
+ " supported\n", osmo_bts_features_name(i));
}
}


To view, visit change 27919. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: Ibd79bc7ef802d8e95e05d746df182ff974b78e29
Gerrit-Change-Number: 27919
Gerrit-PatchSet: 4
Gerrit-Owner: osmith <osmith@sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy@sysmocom.de>
Gerrit-Reviewer: laforge <laforge@osmocom.org>
Gerrit-Reviewer: osmith <osmith@sysmocom.de>
Gerrit-Reviewer: pespin <pespin@sysmocom.de>
Gerrit-MessageType: merged