Change in osmo-gsm-tester[master]: configure fixed ARFCN per bts

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

neels gerrit-no-reply at lists.osmocom.org
Thu Dec 3 23:56:22 UTC 2020


neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-gsm-tester/+/21511 )


Change subject: configure fixed ARFCN per bts
......................................................................

configure fixed ARFCN per bts

Remove ARFCNs as a concept from resource pool, assign a fixed ARFCN to
each BTS and TRX in the resource pools.

Using ARFCNs on specific bands as resources was an idea that is hard to
implement, because specific BTS dictate selection of bands which
influences which ARFCNs can be picked. That means reserving ARFCN
resources is only possible after reserving specific BTS resources, but
the tester is currently not capable of such two-stage resolution.

Writing handover tests, I got the problem that both BTS in a scenario
attempt to use the same ARFCN.

The by far easiest solution is to assign one fixed ARFCN to each BTS and
TRX. If ever needed, a scenario modifier can still configure different
ARFCNs.

(Due to uncertainty about OC2G operation stability, I prefer to leave
OC2G on ARFCN 50, as it happened to end up being configured before this
patch.)

Change-Id: I0a6c60544226f4261f9106013478d6a27fc39f38
---
M selftest/resource_test/conf/resources.conf
M selftest/resource_test/resource_test.ok
M selftest/resource_test/resource_test.py
M selftest/suite_test/resources.conf
M src/osmo_gsm_tester/core/schema.py
M src/osmo_gsm_tester/obj/bts_nanobts.py
M src/osmo_gsm_tester/obj/bts_oc2g.py
M sysmocom/resources.conf.prod
M sysmocom/resources.conf.rnd
9 files changed, 27 insertions(+), 177 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/11/21511/1

diff --git a/selftest/resource_test/conf/resources.conf b/selftest/resource_test/conf/resources.conf
index 84d0ab9..71d8ee0 100644
--- a/selftest/resource_test/conf/resources.conf
+++ b/selftest/resource_test/conf/resources.conf
@@ -43,28 +43,6 @@
   - 'a5_0'
   - 'a5_1'
 
-arfcn:
-  - arfcn: 512
-    band: GSM-1800
-  - arfcn: 514
-    band: GSM-1800
-  - arfcn: 516
-    band: GSM-1800
-  - arfcn: 518
-    band: GSM-1800
-  - arfcn: 520
-    band: GSM-1800
-  - arfcn: 540
-    band: GSM-1900
-  - arfcn: 542
-    band: GSM-1900
-  - arfcn: 544
-    band: GSM-1900
-  - arfcn: 546
-    band: GSM-1900
-  - arfcn: 548
-    band: GSM-1900
-
 modem:
 - label: sierra_1
   path: '/sierra_1'
diff --git a/selftest/resource_test/resource_test.ok b/selftest/resource_test/resource_test.ok
index 5f7d5f6..64cf39b 100644
--- a/selftest/resource_test/resource_test.ok
+++ b/selftest/resource_test/resource_test.ok
@@ -19,37 +19,7 @@
  'suites_dir': ['[PATH]/selftest/resource_test/conf/suite_test'],
  'trial_dir': '[PATH]/selftest/resource_test/conf/trial'}
 *** all resources:
-{'arfcn': [{'_hash': 'e620569450f8259b3f0212ec19c285dd07df063c',
-            'arfcn': '512',
-            'band': 'GSM-1800'},
-           {'_hash': '022621e513c5a5bf33b77430a1e9c886be676fa1',
-            'arfcn': '514',
-            'band': 'GSM-1800'},
-           {'_hash': '3199abf375a1dd899e554e9d63a552e06d7f38bf',
-            'arfcn': '516',
-            'band': 'GSM-1800'},
-           {'_hash': '57aa7bd1da62495f2857ae6b859193dd592a0a02',
-            'arfcn': '518',
-            'band': 'GSM-1800'},
-           {'_hash': '53dd2e2682b736f427abd2ce59a9a50ca8130678',
-            'arfcn': '520',
-            'band': 'GSM-1800'},
-           {'_hash': '31687a5e6d5140a4b3877606ca5f18244f11d706',
-            'arfcn': '540',
-            'band': 'GSM-1900'},
-           {'_hash': '1def43a5c88a83cdb21279eacab0679ea08ffaf3',
-            'arfcn': '542',
-            'band': 'GSM-1900'},
-           {'_hash': '1d6e3b08a3861fd4d748f111295ec5a93ecd3d23',
-            'arfcn': '544',
-            'band': 'GSM-1900'},
-           {'_hash': '8fb36927de15466fcdbee01f7f65704c312cb36c',
-            'arfcn': '546',
-            'band': 'GSM-1900'},
-           {'_hash': 'dc9ce027a257da087f31a5bc1ee6b4abd2637369',
-            'arfcn': '548',
-            'band': 'GSM-1900'}],
- 'bts': [{'_hash': 'd2aa7c1124943de352351b650ca0c751784da6b6',
+{'bts': [{'_hash': 'd2aa7c1124943de352351b650ca0c751784da6b6',
           'addr': '10.42.42.114',
           'band': 'GSM-1800',
           'ciphers': ['a5_0', 'a5_1'],
@@ -116,13 +86,6 @@
 *** end: all resources
 
 - request some resources
---- testowner: Verifying 2 x arfcn (candidates: 10)
---- testowner: DBG: Picked - _hash: e620569450f8259b3f0212ec19c285dd07df063c
-  arfcn: '512'
-  band: GSM-1800
-- _hash: 022621e513c5a5bf33b77430a1e9c886be676fa1
-  arfcn: '514'
-  band: GSM-1800
 --- testowner: Verifying 2 x bts (candidates: 3)
 --- testowner: DBG: Picked - _hash: d2aa7c1124943de352351b650ca0c751784da6b6
   addr: 10.42.42.114
@@ -169,13 +132,6 @@
   label: sierra_2
   path: /sierra_2
 --- testowner: DBG: FileWatch: scheduling watch for directory [PATH]/selftest/resource_test/conf/test_work/state_dir
---- testowner: Reserving 2 x arfcn (candidates: 10)
---- testowner: DBG: Picked - _hash: e620569450f8259b3f0212ec19c285dd07df063c
-  arfcn: '512'
-  band: GSM-1800
-- _hash: 022621e513c5a5bf33b77430a1e9c886be676fa1
-  arfcn: '514'
-  band: GSM-1800
 --- testowner: Reserving 2 x bts (candidates: 3)
 --- testowner: DBG: Picked - _hash: d2aa7c1124943de352351b650ca0c751784da6b6
   addr: 10.42.42.114
@@ -223,15 +179,6 @@
   path: /sierra_2
 --- testowner: DBG: FileWatch: unscheduling watch <ObservedWatch: path=[PATH]/selftest/resource_test/conf/test_work/state_dir, is_recursive=False>
 ~~~ currently reserved:
-arfcn:
-- _hash: e620569450f8259b3f0212ec19c285dd07df063c
-  _reserved_by: testowner-123-1490837279
-  arfcn: '512'
-  band: GSM-1800
-- _hash: 022621e513c5a5bf33b77430a1e9c886be676fa1
-  _reserved_by: testowner-123-1490837279
-  arfcn: '514'
-  band: GSM-1800
 bts:
 - _hash: d2aa7c1124943de352351b650ca0c751784da6b6
   _reserved_by: testowner-123-1490837279
@@ -286,15 +233,7 @@
 ~~~ end: currently reserved
 
 ~~~ with modifiers:
-resources(testowner)={'arfcn': [{'_hash': 'e620569450f8259b3f0212ec19c285dd07df063c',
-            '_reserved_by': 'testowner-123-1490837279',
-            'arfcn': '512',
-            'band': 'GSM-1800'},
-           {'_hash': '022621e513c5a5bf33b77430a1e9c886be676fa1',
-            '_reserved_by': 'testowner-123-1490837279',
-            'arfcn': '514',
-            'band': 'GSM-1800'}],
- 'bts': [{'_hash': 'd2aa7c1124943de352351b650ca0c751784da6b6',
+resources(testowner)={'bts': [{'_hash': 'd2aa7c1124943de352351b650ca0c751784da6b6',
           '_reserved_by': 'testowner-123-1490837279',
           'addr': '10.42.42.114',
           'band': 'GSM-1800',
@@ -345,24 +284,19 @@
 3rd subset should not match, pass
 4th subset should not match, pass
 *** concurrent allocation:
---- testowner1: Verifying 2 x arfcn (candidates: 10)
 --- testowner1: Verifying 2 x bts (candidates: 3)
 --- testowner1: Verifying 1 x ip_address (candidates: 5)
 --- testowner1: Verifying 2 x modem (candidates: 4)
---- testowner1: Reserving 2 x arfcn (candidates: 10)
 --- testowner1: Reserving 2 x bts (candidates: 3)
 --- testowner1: Reserving 1 x ip_address (candidates: 5)
 --- testowner1: Reserving 2 x modem (candidates: 4)
 - 2nd instance reserve() start
---- testowner2: Verifying 2 x arfcn (candidates: 10)
 --- testowner2: Verifying 2 x bts (candidates: 3)
 --- testowner2: Verifying 1 x ip_address (candidates: 5)
 --- testowner2: Verifying 2 x modem (candidates: 4)
---- testowner2: Reserving 2 x arfcn (candidates: 8)
 --- testowner2: Reserving 2 x bts (candidates: 1)
 --- testowner2: Unable to reserve resources, too many currently reserved. Waiting until some are available again
 - 1st instance free()
---- testowner2: Reserving 2 x arfcn (candidates: 10)
 --- testowner2: Reserving 2 x bts (candidates: 3)
 --- testowner2: Reserving 1 x ip_address (candidates: 5)
 --- testowner2: Reserving 2 x modem (candidates: 4)
diff --git a/selftest/resource_test/resource_test.py b/selftest/resource_test/resource_test.py
index 13cce97..f793a42 100755
--- a/selftest/resource_test/resource_test.py
+++ b/selftest/resource_test/resource_test.py
@@ -81,7 +81,6 @@
 want = {
        'ip_address': [ { 'times': 1 } ],
        'bts': [ { 'type': 'osmo-bts-sysmo', 'times': 1 , 'ciphers': ['a5_1']}, { 'type': 'osmo-bts-trx', 'times': 1 } ],
-       'arfcn': [ { 'band': 'GSM-1800', 'times': 2 } ],
        'modem': [ { 'times': 2 , 'ciphers': ['a5_0', 'a5_1']} ],
      }
 modifiers = {
diff --git a/selftest/suite_test/resources.conf b/selftest/suite_test/resources.conf
index bd121cb..ff6fc9e 100644
--- a/selftest/suite_test/resources.conf
+++ b/selftest/suite_test/resources.conf
@@ -70,29 +70,6 @@
   - nominal_power: 12
     max_power_red: 1
 
-arfcn:
-  - arfcn: 512
-    band: GSM-1800
-  - arfcn: 514
-    band: GSM-1800
-  - arfcn: 516
-    band: GSM-1800
-  - arfcn: 518
-    band: GSM-1800
-  - arfcn: 520
-    band: GSM-1800
-
-  - arfcn: 540
-    band: GSM-1900
-  - arfcn: 542
-    band: GSM-1900
-  - arfcn: 544
-    band: GSM-1900
-  - arfcn: 546
-    band: GSM-1900
-  - arfcn: 548
-    band: GSM-1900
-
 modem:
 - label: m7801
   path: '/wavecom_0'
diff --git a/src/osmo_gsm_tester/core/schema.py b/src/osmo_gsm_tester/core/schema.py
index d56d6ec..89c4494 100644
--- a/src/osmo_gsm_tester/core/schema.py
+++ b/src/osmo_gsm_tester/core/schema.py
@@ -375,12 +375,10 @@
         util.run_python_file_method(module_name, 'on_register_schemas', False)
 
 
-_RESOURCE_TYPES = ['ip_address', 'arfcn']
+_RESOURCE_TYPES = ['ip_address',]
 
 _RESOURCES_SCHEMA = {
         'ip_address[].addr': IPV4,
-        'arfcn[].arfcn': INT,
-        'arfcn[].band': BAND,
     }
 
 _CONFIG_SCHEMA = {}
diff --git a/src/osmo_gsm_tester/obj/bts_nanobts.py b/src/osmo_gsm_tester/obj/bts_nanobts.py
index 03730a6..25efc7f 100644
--- a/src/osmo_gsm_tester/obj/bts_nanobts.py
+++ b/src/osmo_gsm_tester/obj/bts_nanobts.py
@@ -65,16 +65,6 @@
 
     def conf_for_bsc(self):
         values = self.conf_for_bsc_prepare()
-        # Hack until we have proper ARFCN resource allocation support (OS#2230)
-        band = values.get('band')
-        trx_list = values.get('trx_list')
-        if band == 'GSM-1900':
-            for trx_i in range(len(trx_list)):
-                config.overlay(trx_list[trx_i], { 'arfcn' : str(531 + trx_i * 2) })
-        elif band == 'GSM-900':
-            for trx_i in range(len(trx_list)):
-                config.overlay(trx_list[trx_i], { 'arfcn' : str(50 + trx_i * 2) })
-
         config.overlay(values, { 'osmobsc_bts_type': 'nanobts' })
 
         self.dbg(conf=values)
diff --git a/src/osmo_gsm_tester/obj/bts_oc2g.py b/src/osmo_gsm_tester/obj/bts_oc2g.py
index 2d55637..7761ce3 100644
--- a/src/osmo_gsm_tester/obj/bts_oc2g.py
+++ b/src/osmo_gsm_tester/obj/bts_oc2g.py
@@ -78,12 +78,6 @@
 
     def conf_for_bsc(self):
         values = self.conf_for_bsc_prepare()
-        # Hack until we have proper ARFCN resource allocation support (OS#2230)
-        band = values.get('band')
-        trx_list = values.get('trx_list')
-        if band == 'GSM-900':
-            for trx_i in range(len(trx_list)):
-                config.overlay(trx_list[trx_i], { 'arfcn' : str(50 + trx_i * 2) })
         self.dbg(conf=values)
         return values
 
diff --git a/sysmocom/resources.conf.prod b/sysmocom/resources.conf.prod
index 01a03f1..a53d4ce 100644
--- a/sysmocom/resources.conf.prod
+++ b/sysmocom/resources.conf.prod
@@ -23,6 +23,8 @@
   ipa_unit_id: 1
   addr: 10.42.42.114
   band: GSM-1800
+  trx_list:
+  - arfcn: 868
   direct_pcu: true
   ciphers: [a5_0, a5_1, a5_3]
 
@@ -31,6 +33,8 @@
   ipa_unit_id: 6
   addr: 10.42.42.50
   band: GSM-1800
+  trx_list:
+  - arfcn: 870
   ciphers: [a5_0, a5_1, a5_3]
   osmo_trx:
     type: uhd
@@ -46,6 +50,8 @@
   ipa_unit_id: 12
   addr: 10.42.42.54
   band: GSM-1800
+  trx_list:
+  - arfcn: 872
   ciphers: [a5_0, a5_1, a5_3]
   osmo_trx:
     type: uhd
@@ -60,6 +66,8 @@
   ipa_unit_id: 11
   addr: 10.42.42.53
   band: GSM-1800
+  trx_list:
+  - arfcn: 874
   ciphers: [a5_0, a5_1, a5_3]
   osmo_trx:
     type: lms
@@ -76,6 +84,8 @@
   ipa_unit_id: 15
   addr: 10.42.42.53
   band: GSM-1800
+  trx_list:
+  - arfcn: 876
   ciphers: [a5_0, a5_1]
   osmo_trx:
     type: lms
@@ -96,6 +106,7 @@
         type: 'intellinet'
         device: '10.42.42.250'
         port: '5'
+      arfcn: 878
   osmo_trx:
     type: sc5
     launch_trx: true
@@ -111,6 +122,7 @@
   trx_list:
   - hw_addr: 00:0c:90:2e:80:1e
     net_device: enp2s0
+    arfcn: 880
 
 - label: NanoBTS-ONW-1900
   type: nanobts
@@ -122,6 +134,7 @@
         type: 'intellinet'
         device: '10.42.42.250'
         port: '1'
+      arfcn: 533
 
 - label: NanoBTS-ONW-900
   type: nanobts
@@ -134,23 +147,29 @@
         type: 'intellinet'
         device: '10.42.42.250'
         port: '2'
+      arfcn: 54
     - addr: 10.42.42.122
       power_supply:
         type: 'intellinet'
         device: '10.42.42.250'
         port: '3'
+      arfcn: 52
 
 - label: OsmoBTS Virtual
   type: osmo-bts-virtual
   ipa_unit_id: 13
   addr: 10.42.42.55
   band: GSM-1800
+  trx_list:
+  - arfcn: 882
 
 - label: OC-2G
   type: osmo-bts-oc2g
   ipa_unit_id: 14
   addr: 10.42.42.100
   band: GSM-900
+  trx_list:
+  - arfcn: 50
   direct_pcu: true
   ciphers: [a5_0, a5_1, a5_3]
 
@@ -175,28 +194,6 @@
     ssh_user: jenkins
     ssh_addr: 10.42.42.117
 
-arfcn:
-  - arfcn: 512
-    band: GSM-1800
-  - arfcn: 514
-    band: GSM-1800
-  - arfcn: 516
-    band: GSM-1800
-  - arfcn: 518
-    band: GSM-1800
-  - arfcn: 520
-    band: GSM-1800
-  - arfcn: 540
-    band: GSM-1900
-  - arfcn: 542
-    band: GSM-1900
-  - arfcn: 544
-    band: GSM-1900
-  - arfcn: 546
-    band: GSM-1900
-  - arfcn: 548
-    band: GSM-1900
-
 modem:
 - label: sierra_1st
   path: '/sys/devices/pci0000:00/0000:00:12.2/usb1/1-5/1-5.2/1-5.2.2'
diff --git a/sysmocom/resources.conf.rnd b/sysmocom/resources.conf.rnd
index 4ce39d1..d9a6720 100644
--- a/sysmocom/resources.conf.rnd
+++ b/sysmocom/resources.conf.rnd
@@ -19,6 +19,8 @@
   band: GSM-1800
   direct_pcu: true
   ciphers: [a5_0, a5_1, a5_3]
+  trx_list:
+  - arfcn: 868
 
 - label: Ettus B200
   type: osmo-bts-trx
@@ -34,6 +36,8 @@
     trx_ip: 127.0.0.1
     dev_args: "type=b200,serial=30A9FFB"
   ciphers: [a5_0, a5_1, a5_3]
+  trx_list:
+  - arfcn: 870
 
 - label: NanoBTS-ONW-1900
   type: nanobts
@@ -45,28 +49,7 @@
         type: 'sispm'
         device: '01:01:55:2e:b6'
         port: '1'
-
-arfcn:
-  - arfcn: 512
-    band: GSM-1800
-  - arfcn: 514
-    band: GSM-1800
-  - arfcn: 516
-    band: GSM-1800
-  - arfcn: 518
-    band: GSM-1800
-  - arfcn: 520
-    band: GSM-1800
-  - arfcn: 540
-    band: GSM-1900
-  - arfcn: 542
-    band: GSM-1900
-  - arfcn: 544
-    band: GSM-1900
-  - arfcn: 546
-    band: GSM-1900
-  - arfcn: 548
-    band: GSM-1900
+      arfcn: 533
 
 modem:
 - label: sierra_1st

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

Gerrit-Project: osmo-gsm-tester
Gerrit-Branch: master
Gerrit-Change-Id: I0a6c60544226f4261f9106013478d6a27fc39f38
Gerrit-Change-Number: 21511
Gerrit-PatchSet: 1
Gerrit-Owner: neels <nhofmeyr at sysmocom.de>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20201203/32c57c53/attachment.htm>


More information about the gerrit-log mailing list