<p>laforge <strong>submitted</strong> this change.</p><p><a href="https://gerrit.osmocom.org/c/osmo-bsc/+/18599">View Change</a></p><div style="white-space:pre-wrap">Approvals:
laforge: Looks good to me, approved
Jenkins Builder: Verified
</div><pre style="font-family: monospace,monospace; white-space: pre-wrap;">abis_nm: rework warnings about unknown / not supported features<br><br>The reported feature vector may contain new features the BSC is<br>not aware of. Report each of them individually as NOTICE.<br><br>It's normal when some BTS feature is considered as not supported<br>by the BSC, but a BTS reports that it is - do not log this.<br><br>Change-Id: I2f925bcdb010cb10d074bf7c82619e3ae1f8818b<br>---<br>M src/osmo-bsc/abis_nm.c<br>1 file changed, 14 insertions(+), 5 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/src/osmo-bsc/abis_nm.c b/src/osmo-bsc/abis_nm.c</span><br><span>index b377c4a..30d6fa3 100644</span><br><span>--- a/src/osmo-bsc/abis_nm.c</span><br><span>+++ b/src/osmo-bsc/abis_nm.c</span><br><span>@@ -594,11 +594,20 @@</span><br><span> </span><br><span> memcpy(bts->_features_data, TLVP_VAL(tp, NM_ATT_MANUF_ID), len);</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">- for (i = 0; i < _NUM_BTS_FEAT; i++) {</span><br><span style="color: hsl(0, 100%, 40%);">- if (osmo_bts_has_feature(&bts->features, i) != osmo_bts_has_feature(&bts->model->features, i)) {</span><br><span style="color: hsl(0, 100%, 40%);">- LOGPMO(&bts->mo, DNM, LOGL_NOTICE, "Feature '%s' reported via OML does not match statically "</span><br><span style="color: hsl(0, 100%, 40%);">- "set feature: %u != %u. Please fix.\n", get_value_string(osmo_bts_features_descs, i),</span><br><span style="color: hsl(0, 100%, 40%);">- osmo_bts_has_feature(&bts->features, i), osmo_bts_has_feature(&bts->model->features, i));</span><br><span style="color: hsl(120, 100%, 40%);">+ /* Check each BTS feature in the reported vector */</span><br><span style="color: hsl(120, 100%, 40%);">+ for (i = 0; i < len * 8; i++) {</span><br><span style="color: hsl(120, 100%, 40%);">+ bool Frep = osmo_bts_has_feature(&bts->features, i);</span><br><span style="color: hsl(120, 100%, 40%);">+ if (i >= _NUM_BTS_FEAT && Frep) {</span><br><span style="color: hsl(120, 100%, 40%);">+ LOGPMO(&bts->mo, DNM, LOGL_NOTICE, "Get Attributes Response: "</span><br><span style="color: hsl(120, 100%, 40%);">+ "unknown feature 0x%02x. Consider upgrading osmo-bsc.\n", i);</span><br><span style="color: hsl(120, 100%, 40%);">+ continue;</span><br><span style="color: hsl(120, 100%, 40%);">+ }</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+ bool Fexp = osmo_bts_has_feature(&bts->model->features, i);</span><br><span style="color: hsl(120, 100%, 40%);">+ if (!Frep && Fexp) {</span><br><span style="color: hsl(120, 100%, 40%);">+ LOGPMO(&bts->mo, DNM, LOGL_NOTICE, "Get Attributes Response: "</span><br><span style="color: hsl(120, 100%, 40%);">+ "reported feature '%s' is not supported, while we thought it is.\n",</span><br><span style="color: hsl(120, 100%, 40%);">+ get_value_string(osmo_bts_features_descs, i));</span><br><span> }</span><br><span> }</span><br><span> }</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/c/osmo-bsc/+/18599">change 18599</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.osmocom.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.osmocom.org/c/osmo-bsc/+/18599"/><meta itemprop="name" content="View Change"/></div></div>
<div style="display:none"> Gerrit-Project: osmo-bsc </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: I2f925bcdb010cb10d074bf7c82619e3ae1f8818b </div>
<div style="display:none"> Gerrit-Change-Number: 18599 </div>
<div style="display:none"> Gerrit-PatchSet: 8 </div>
<div style="display:none"> Gerrit-Owner: fixeria <vyanitskiy@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins Builder </div>
<div style="display:none"> Gerrit-Reviewer: laforge <laforge@osmocom.org> </div>
<div style="display:none"> Gerrit-MessageType: merged </div>