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
This commit is contained in:
Neels Hofmeyr 2020-11-28 19:54:43 +01:00
parent f07114f9e2
commit ecce402f43
10 changed files with 30 additions and 179 deletions

View File

@ -43,28 +43,6 @@ bts:
- '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'

View File

@ -19,37 +19,7 @@ cnf -: DBG: MAIN CONFIG:
'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 @@ cnf -: DBG: MAIN CONFIG:
*** 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 @@ cnf -: DBG: MAIN CONFIG:
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 @@ cnf -: DBG: MAIN CONFIG:
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 @@ modem:
~~~ 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 @@ resources(testowner)={'arfcn': [{'_hash': 'e620569450f8259b3f0212ec19c285dd07df0
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)

View File

@ -81,7 +81,6 @@ print('- request some resources')
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 = {

View File

@ -70,29 +70,6 @@ bts:
- 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'

View File

@ -375,12 +375,10 @@ def generate_schemas():
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 = {}

View File

@ -65,16 +65,6 @@ class NanoBts(bts.Bts):
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)

View File

@ -78,12 +78,6 @@ class OsmoBtsOC2G(bts_osmo.OsmoBts):
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

View File

@ -37,7 +37,6 @@ bsc_bts:
trx_list:
- nominal_power: 23
max_power_red: 0
arfcn: 868
timeslot_list:
- phys_chan_config: CCCH+SDCCH4
- phys_chan_config: SDCCH8
@ -49,7 +48,6 @@ bsc_bts:
- phys_chan_config: PDCH
- nominal_power: 23
max_power_red: 0
arfcn: 872
timeslot_list:
- phys_chan_config: TCH/F
- phys_chan_config: SDCCH8

View File

@ -23,6 +23,8 @@ bts:
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,9 @@ bts:
ipa_unit_id: 6
addr: 10.42.42.50
band: GSM-1800
trx_list:
- arfcn: 850
- arfcn: 852
ciphers: [a5_0, a5_1, a5_3]
osmo_trx:
type: uhd
@ -46,6 +51,9 @@ bts:
ipa_unit_id: 12
addr: 10.42.42.54
band: GSM-1800
trx_list:
- arfcn: 854
- arfcn: 856
ciphers: [a5_0, a5_1, a5_3]
osmo_trx:
type: uhd
@ -60,6 +68,8 @@ bts:
ipa_unit_id: 11
addr: 10.42.42.53
band: GSM-1800
trx_list:
- arfcn: 858
ciphers: [a5_0, a5_1, a5_3]
osmo_trx:
type: lms
@ -76,6 +86,8 @@ bts:
ipa_unit_id: 15
addr: 10.42.42.53
band: GSM-1800
trx_list:
- arfcn: 860
ciphers: [a5_0, a5_1]
osmo_trx:
type: lms
@ -96,6 +108,7 @@ bts:
type: 'intellinet'
device: '10.42.42.250'
port: '5'
arfcn: 862
osmo_trx:
type: sc5
launch_trx: true
@ -111,6 +124,7 @@ bts:
trx_list:
- hw_addr: 00:0c:90:2e:80:1e
net_device: enp2s0
arfcn: 864
- label: NanoBTS-ONW-1900
type: nanobts
@ -122,6 +136,8 @@ bts:
type: 'intellinet'
device: '10.42.42.250'
port: '1'
arfcn: 533
- arfcn: 535
- label: NanoBTS-ONW-900
type: nanobts
@ -134,23 +150,29 @@ bts:
type: 'intellinet'
device: '10.42.42.250'
port: '2'
arfcn: 52
- addr: 10.42.42.122
power_supply:
type: 'intellinet'
device: '10.42.42.250'
port: '3'
arfcn: 54
- 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 +197,6 @@ enb:
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'

View File

@ -19,6 +19,8 @@ bts:
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 @@ bts:
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 @@ bts:
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