falconia has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/42725?usp=email )
Change subject: nokia cosmetic: add bts_is_insite() function
......................................................................
nokia cosmetic: add bts_is_insite() function
Nokia InSite gets a different config than the larger Nokia BTS models,
and make_bts_config() function checks the BTS type to decide which
config to send. Change the BTS type check from a long 'if' line that
compares against 3 different InSite BTS type codes to bts_is_insite()
helper function that encapsulates a switch statement.
Upcoming code additions will need to check for Flexi Multiradio BTS
family in a similar manner - so be consistent.
Change-Id: I44bbcd79d9741f1df280b6b2391f04f754598035
---
M src/osmo-bsc/bts_nokia_site.c
1 file changed, 14 insertions(+), 2 deletions(-)
Approvals:
fixeria: Looks good to me, approved
Jenkins Builder: Verified
laforge: Looks good to me, but someone else must approve
pespin: Looks good to me, but someone else must approve
diff --git a/src/osmo-bsc/bts_nokia_site.c b/src/osmo-bsc/bts_nokia_site.c
index 340405e..29b1929 100644
--- a/src/osmo-bsc/bts_nokia_site.c
+++ b/src/osmo-bsc/bts_nokia_site.c
@@ -1162,12 +1162,24 @@
/* TODO: put in a separate file ? */
+static bool bts_is_insite(uint8_t bts_type)
+{
+ switch (bts_type) {
+ case 0x0E: /* InSite 900 MHz */
+ case 0x0F: /* InSite 1800 MHz */
+ case 0x10: /* InSite 1900 MHz */
+ return true;
+ default:
+ return false;
+ }
+}
+
/* build the configuration data */
static int make_bts_config(struct gsm_bts *bts, uint8_t bts_type, int n_trx, uint8_t * fu_config,
int need_hopping, int hopping_type)
{
- /* is it an InSite BTS ? */
- if (bts_type == 0x0E || bts_type == 0x0F || bts_type == 0x10) { /* TODO */
+ /* InSite BTS gets its own special config */
+ if (bts_is_insite(bts_type)) {
if (n_trx != 1) {
LOG_BTS(bts, DNM, LOGL_ERROR, "InSite has only one TRX\n");
return 0;
--
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/42725?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: merged
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: I44bbcd79d9741f1df280b6b2391f04f754598035
Gerrit-Change-Number: 42725
Gerrit-PatchSet: 1
Gerrit-Owner: falconia <falcon(a)freecalypso.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: falconia <falcon(a)freecalypso.org>
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Attention is currently required from: laforge.
falconia has posted comments on this change by falconia. ( https://gerrit.osmocom.org/c/osmo-bsc/+/42725?usp=email )
Change subject: nokia cosmetic: add bts_is_insite() function
......................................................................
Patch Set 1:
(1 comment)
Patchset:
PS1:
> I think I'd prefer something like @if (nokia_bts_type(bts) == NOKIA_BTS_INSITE)@ as it would scale m […]
Right now we have the following situation:
* Out of supported and tested models, MetroSite and UltraSite require one handling (currently treated as default), InSite requires different handling (was there from the beginning) and Flexi MR requires third handling, added with my third patch in this series.
* After Flexi MR, there is Multiradio 10, the last model to support E1 Abis via add-on card. I don't have an MR10 system unit yet, but I see plenty of them on ebay, and I plan on buying one for testing. It works with the same radio modules as plain Flexi MR. I expect MR10 to require the same handling in osmo-bsc as plain FMR, and my third patch in this series currently assumes so.
* In between UltraSite and Flexi MR there is also Flexi EDGE, intermediate evolutionary step. However, I and A2GC are essentially skipping Flexi EDGE, going directly to Flexi MR or MR10. It is not clear whether or not anyone else will ever invest time and money into acquiring Flexi EDGE hw and putting it together just to test osmo-bsc on it - hence it may remain forever in unknown state.
* After MR10, all newer models are IP Abis only. Csaba and I are looking into the possibility of implementing IP Abis support on Flexi MR and MR10, using hw in my lab, as a stepping stone toward subsequent IP-only models - but nothing is certain with this idea.
Going back to your idea of a `nokia_bts_type(bts)` function that distills Nokia's own BTS model ID codes into a smaller set of `NOKIA_BTS_*` return values that capture different handling required in osmo-bsc, right now I would feel a little uneasy defining and implementing such grouping: we don't know if Flexi EDGE should be handled like Metro/UltraSite or like Flexi MR, and the use of exactly the same handling between MR and MR10 remains to be tested on the latter.
Since you said this issue is not a blocker, if I don't see any further comments in the next couple of days, I'll CR+2 to myself (based on CR+1 from you and @pespin@sysmocom.de) and merge.
--
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/42725?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: I44bbcd79d9741f1df280b6b2391f04f754598035
Gerrit-Change-Number: 42725
Gerrit-PatchSet: 1
Gerrit-Owner: falconia <falcon(a)freecalypso.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Comment-Date: Tue, 05 May 2026 18:05:20 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: laforge <laforge(a)osmocom.org>
Attention is currently required from: fixeria, laforge.
neels has posted comments on this change by neels. ( https://gerrit.osmocom.org/c/pysim/+/41918?usp=email )
Change subject: ConfigurableParameter: do not magically overwrite the 'name' attribute
......................................................................
Patch Set 6:
(1 comment)
Commit Message:
https://gerrit.osmocom.org/c/pysim/+/41918/comment/bb8982c7_7651b9ae?usp=em… :
PS2, Line 7: Co
> > This tiny detail is just not worth even considering to spend time on. […]
I apologized out-of-band for the emotional outburst, let me repeat this here: sorry for the rant.
The automatic naming has the problem that the names have to be valid python class names. For example, "5GS-SUCI-CalcInfo" would not work as a name.
You are right, we can check in __new__() whether it is already set and only change it otherwise. Indeed that is an ok solution with even a slight advantage (in the mix of disadvantages), over my different solution, using the get_name() classmethod.
But:
* It is not necessary to create automatic names. I would rather set manual names explicitly on every subclass. I have gotten code review that the automatic naming should remain. So I've put it back in the form of the get_name() classmethod, using normal python inheritance.
* It is a bad idea to do anything hidden in a __new__() of a superclass, because "explicit is better than implicit" https://peps.python.org/pep-0020/ and it makes it hard to adjust subclass behavior in the usual pythonic inheritance. This is my opinion and you do not have to agree, even though I know I'm right =)
* My get_name() classmethod implementation has a problem that I don't like very much: callers have to call get_name() to get the automatic name. They could also just access `foo.name`, but then they will get only a manually set name. So callers have to be aware of that, which is not very good API design from my side. This is ofc not a problem whenever a name was set manually.
* When all names are set manually anyway, which is the case in my patches, the discussion has very low to actually zero relevance to the real world. That is why my opinion is that my colleagues should be aware of that, and simply trust my judgement (if i am wrong it would have no actual effect, either), so that we can work with the actually important parts of the code. This has not happened for something like a year, we are still discussing this topic of zero real world effect, and comments here even sounded to me like i were the one stopping the progress, which I would not accept to be accurate. That is why my patience has been inapproriately low on this particular aspect. Sorry about that, and I greatly appreciate that you are here to resolve this.
Back to the conclusion, I am fine with either
* removing all automatic names
* or, if you really have to, go on and put a new decision in __new__() and remove the get_name() classmethod. I can then adjust all callers on my side later.
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/41918?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: I6f631444c6addeb7ccc5f6c55b9be3dc83409169
Gerrit-Change-Number: 41918
Gerrit-PatchSet: 6
Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-CC: laforge <laforge(a)osmocom.org>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Comment-Date: Tue, 05 May 2026 17:30:56 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: neels <nhofmeyr(a)sysmocom.de>
Comment-In-Reply-To: laforge <laforge(a)osmocom.org>
Comment-In-Reply-To: fixeria <vyanitskiy(a)sysmocom.de>
Attention is currently required from: falconia.
pespin has posted comments on this change by falconia. ( https://gerrit.osmocom.org/c/osmo-bsc/+/42726?usp=email )
Change subject: nokia cosmetic: factor out BTS_CONF_COMPL handling
......................................................................
Patch Set 1: Code-Review+2
--
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/42726?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: I26e9b25ba4e68e945f7dd8a632009cc3683a322c
Gerrit-Change-Number: 42726
Gerrit-PatchSet: 1
Gerrit-Owner: falconia <falcon(a)freecalypso.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: falconia <falcon(a)freecalypso.org>
Gerrit-Comment-Date: Tue, 05 May 2026 16:32:01 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Attention is currently required from: falconia.
pespin has posted comments on this change by falconia. ( https://gerrit.osmocom.org/c/osmo-bsc/+/42725?usp=email )
Change subject: nokia cosmetic: add bts_is_insite() function
......................................................................
Patch Set 1: Code-Review+1
--
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/42725?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: I44bbcd79d9741f1df280b6b2391f04f754598035
Gerrit-Change-Number: 42725
Gerrit-PatchSet: 1
Gerrit-Owner: falconia <falcon(a)freecalypso.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: falconia <falcon(a)freecalypso.org>
Gerrit-Comment-Date: Tue, 05 May 2026 16:30:48 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes