osmith has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/27921 )
Change subject: Always use reported features if available
......................................................................
Always use reported features if available
Instead of sometimes checking against hardcoded BTS model features, and
sometimes against features reported at runtime (which only some BTS
models do):
* copy the hardcoded BTS model features to BTS features initially
* do all checks against BTS features
Related: SYS#5922, OS#5538
Change-Id: Idf2d933aa8b03b1f708e56a08707fe6c620a97aa
---
M src/osmo-bsc/bts.c
M src/osmo-bsc/bts_trx_vty.c
M src/osmo-bsc/system_information.c
3 files changed, 12 insertions(+), 6 deletions(-)
Approvals:
laforge: Looks good to me, but someone else must approve
fixeria: Looks good to me, but someone else must approve
osmith: Looks good to me, approved
Jenkins Builder: Verified
diff --git a/src/osmo-bsc/bts.c b/src/osmo-bsc/bts.c
index 774384f..54d9cdd 100644
--- a/src/osmo-bsc/bts.c
+++ b/src/osmo-bsc/bts.c
@@ -615,6 +615,13 @@
int gsm_set_bts_model(struct gsm_bts *bts, struct gsm_bts_model *model)
{
bts->model = model;
+
+ /* Copy hardcoded feature list from BTS model. For some BTS we support
+ * reporting features at runtime (as of writing nanobts, OsmoBTS),
+ * which will then replace this list. */
+ if (model)
+ memcpy(bts->_features_data, bts->model->_features_data, sizeof(bts->_features_data));
+
return 0;
}
@@ -683,11 +690,11 @@
int bts_gprs_mode_is_compat(struct gsm_bts *bts, enum bts_gprs_mode mode)
{
if (mode != BTS_GPRS_NONE &&
- !osmo_bts_has_feature(&bts->model->features, BTS_FEAT_GPRS)) {
+ !osmo_bts_has_feature(&bts->features, BTS_FEAT_GPRS)) {
return 0;
}
if (mode == BTS_GPRS_EGPRS &&
- !osmo_bts_has_feature(&bts->model->features, BTS_FEAT_EGPRS)) {
+ !osmo_bts_has_feature(&bts->features, BTS_FEAT_EGPRS)) {
return 0;
}
diff --git a/src/osmo-bsc/bts_trx_vty.c b/src/osmo-bsc/bts_trx_vty.c
index 39584a5..27bba2c 100644
--- a/src/osmo-bsc/bts_trx_vty.c
+++ b/src/osmo-bsc/bts_trx_vty.c
@@ -317,7 +317,7 @@
{
struct gsm_bts_trx_ts *ts = vty->index;
- if (!osmo_bts_has_feature(&ts->trx->bts->model->features, BTS_FEAT_MULTI_TSC)) {
+ if (!osmo_bts_has_feature(&ts->trx->bts->features, BTS_FEAT_MULTI_TSC)) {
vty_out(vty, "%% This BTS does not support a TSC != BCC, "
"falling back to BCC%s", VTY_NEWLINE);
ts->tsc = -1;
@@ -341,7 +341,7 @@
struct gsm_bts_trx_ts *ts = vty->index;
int enabled = atoi(argv[0]);
- if (enabled && !osmo_bts_has_feature(&ts->trx->bts->model->features, BTS_FEAT_HOPPING)) {
+ if (enabled && !osmo_bts_has_feature(&ts->trx->bts->features, BTS_FEAT_HOPPING)) {
vty_out(vty, "%% BTS model does not seem to support freq. hopping%s", VTY_NEWLINE);
/* Allow enabling frequency hopping anyway, because the BTS might not have
* connected yet (thus not sent the feature vector), so we cannot know for
diff --git a/src/osmo-bsc/system_information.c b/src/osmo-bsc/system_information.c
index 187678d..48f7453 100644
--- a/src/osmo-bsc/system_information.c
+++ b/src/osmo-bsc/system_information.c
@@ -1270,8 +1270,7 @@
si13_info.cell_opts.ext_info.ccn_active = bts->gprs.ccn.forced_vty ?
bts->gprs.ccn.active :
- osmo_bts_has_feature(&bts->model->features,
- BTS_FEAT_CCN);
+ osmo_bts_has_feature(&bts->features, BTS_FEAT_CCN);
ret = osmo_gsm48_rest_octets_si13_encode(si13->rest_octets, &si13_info);
if (ret < 0)
--
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/27921
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: Idf2d933aa8b03b1f708e56a08707fe6c620a97aa
Gerrit-Change-Number: 27921
Gerrit-PatchSet: 4
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-CC: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: merged
osmith has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/27919 )
Change subject: abis_nm: don't compare assumed/reported features
......................................................................
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(-)
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
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 https://gerrit.osmocom.org/c/osmo-bsc/+/27919
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: Ibd79bc7ef802d8e95e05d746df182ff974b78e29
Gerrit-Change-Number: 27919
Gerrit-PatchSet: 4
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: merged
Attention is currently required from: fixeria.
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/27937 )
Change subject: Use internal <osmocom/core/talloc.h> everywhere
......................................................................
Patch Set 1: Code-Review+1
(1 comment)
Patchset:
PS1:
> I was trying to build libosmocore with pseudotalloc for an embedded environment, and this patch made […]
Ok then please explain better what was failing in the commit log if possible.
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/27937
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: If40e1eefcfa88a2b376becfe057836acdd3a1cc2
Gerrit-Change-Number: 27937
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Comment-Date: Tue, 26 Apr 2022 11:19:38 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Comment-In-Reply-To: fixeria <vyanitskiy(a)sysmocom.de>
Comment-In-Reply-To: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: comment
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bsc/+/27943 )
Change subject: paging: Check C0 RSL link instead of OML link
......................................................................
paging: Check C0 RSL link instead of OML link
PAging happens over C0 RSL link, not over OML, so let's actually
validate that the C0 RSL link is up before paging instead of the OML
one.
Change-Id: I11e5bb6f952534763935aa01470e514d4af247ed
---
M src/osmo-bsc/paging.c
1 file changed, 1 insertion(+), 1 deletion(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/43/27943/1
diff --git a/src/osmo-bsc/paging.c b/src/osmo-bsc/paging.c
index 214587d..8ce3508 100644
--- a/src/osmo-bsc/paging.c
+++ b/src/osmo-bsc/paging.c
@@ -195,7 +195,7 @@
}
/* Skip paging if the bts is down. */
- if (!bts->oml_link)
+ if (!bts->c0->rsl_link_primary)
goto sched_next_iter;
/* do while loop: Try send at most first MAX_PAGE_REQ_PER_ITER paging
--
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/27943
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: I11e5bb6f952534763935aa01470e514d4af247ed
Gerrit-Change-Number: 27943
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: newchange
Attention is currently required from: pespin.
fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/27937 )
Change subject: Use internal <osmocom/core/talloc.h> everywhere
......................................................................
Patch Set 1:
(1 comment)
Patchset:
PS1:
> what's the rationale/need behind this patch?
I was trying to build libosmocore with pseudotalloc for an embedded environment, and this patch made it a bit easier. Generally we do not include <talloc.h> directly but use our own wrapper-header, so it's also for the sake of consistency.
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/27937
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: If40e1eefcfa88a2b376becfe057836acdd3a1cc2
Gerrit-Change-Number: 27937
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Tue, 26 Apr 2022 10:25:20 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: comment