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 Hofmeyr gerrit-no-reply at lists.osmocom.orgNeels Hofmeyr has submitted this change and it was merged. ( https://gerrit.osmocom.org/10164 ) Change subject: inter-BSC HO: neighbor_ident API: drop 9bit BSIC ...................................................................... inter-BSC HO: neighbor_ident API: drop 9bit BSIC 9-bit BSIC exist in the 3GPP specs, but we don't use them anywhere. Rather remove that choice from the API and UI. Change-Id: I29b92f47da2636d3a19f073755f9382fa98f9010 --- M include/osmocom/bsc/neighbor_ident.h M src/osmo-bsc/handover_logic.c M src/osmo-bsc/neighbor_ident.c M src/osmo-bsc/neighbor_ident_vty.c M tests/handover/neighbor_ident_test.c M tests/handover/neighbor_ident_test.ok M tests/neighbor_ident.vty 7 files changed, 113 insertions(+), 257 deletions(-) Approvals: Jenkins Builder: Verified Harald Welte: Looks good to me, approved diff --git a/include/osmocom/bsc/neighbor_ident.h b/include/osmocom/bsc/neighbor_ident.h index bba18c3..17bffbc 100644 --- a/include/osmocom/bsc/neighbor_ident.h +++ b/include/osmocom/bsc/neighbor_ident.h @@ -12,19 +12,14 @@ struct neighbor_ident_list; struct gsm0808_cell_id_list2; -enum bsic_kind { - BSIC_NONE, - BSIC_6BIT, - BSIC_9BIT, -}; - #define NEIGHBOR_IDENT_KEY_ANY_BTS -1 +#define BSIC_ANY 0xff + struct neighbor_ident_key { int from_bts; /*< BTS nr 0..255 or NEIGHBOR_IDENT_KEY_ANY_BTS */ uint16_t arfcn; - enum bsic_kind bsic_kind; - uint16_t bsic; + uint8_t bsic; }; const char *neighbor_ident_key_name(const struct neighbor_ident_key *ni_key); @@ -52,10 +47,10 @@ void neighbor_ident_vty_init(struct gsm_network *net, struct neighbor_ident_list *nil); void neighbor_ident_vty_write(struct vty *vty, const char *indent, struct gsm_bts *bts); -#define NEIGHBOR_IDENT_VTY_KEY_PARAMS "arfcn <0-1023> (bsic|bsic9) (<0-511>|any)" +#define NEIGHBOR_IDENT_VTY_KEY_PARAMS "arfcn <0-1023> bsic (<0-63>|any)" #define NEIGHBOR_IDENT_VTY_KEY_DOC \ "ARFCN of neighbor cell\n" "ARFCN value\n" \ - "BSIC of neighbor cell\n" "9-bit BSIC of neighbor cell\n" "BSIC value\n" \ + "BSIC of neighbor cell\n" "BSIC value\n" \ "for all BSICs / use any BSIC in this ARFCN\n" bool neighbor_ident_vty_parse_key_params(struct vty *vty, const char **argv, struct neighbor_ident_key *key); diff --git a/src/osmo-bsc/handover_logic.c b/src/osmo-bsc/handover_logic.c index 0f664c6..028b2d4 100644 --- a/src/osmo-bsc/handover_logic.c +++ b/src/osmo-bsc/handover_logic.c @@ -400,7 +400,6 @@ struct neighbor_ident_key entry = { .from_bts = NEIGHBOR_IDENT_KEY_ANY_BTS, .arfcn = bts->c0->arfcn, - .bsic_kind = BSIC_6BIT, .bsic = bts->bsic, }; if (neighbor_ident_key_match(&entry, search_for, true)) { @@ -427,7 +426,6 @@ static struct neighbor_ident_key key; key = (struct neighbor_ident_key){ .arfcn = bts->c0->arfcn, - .bsic_kind = BSIC_6BIT, .bsic = bts->bsic, }; return &key; diff --git a/src/osmo-bsc/neighbor_ident.c b/src/osmo-bsc/neighbor_ident.c index 8a7c580..4a0cd47 100644 --- a/src/osmo-bsc/neighbor_ident.c +++ b/src/osmo-bsc/neighbor_ident.c @@ -67,18 +67,10 @@ APPEND_STR("invalid(%d)", ni_key->from_bts); APPEND_STR(" to "); - switch (ni_key->bsic_kind) { - default: - case BSIC_NONE: + if (ni_key->bsic == BSIC_ANY) APPEND_STR("ARFCN %u (any BSIC)", ni_key->arfcn); - break; - case BSIC_6BIT: + else APPEND_STR("ARFCN %u BSIC %u", ni_key->arfcn, ni_key->bsic & 0x3f); - break; - case BSIC_9BIT: - APPEND_STR("ARFCN %u BSIC %u(9bit)", ni_key->arfcn, ni_key->bsic & 0x1ff); - break; - } return buf; } @@ -104,18 +96,16 @@ } /* Return true when the entry matches the search_for requirements. - * If exact_match is false, a BSIC_NONE entry acts as wildcard to match any search_for on that ARFCN, - * and a BSIC_NONE in search_for likewise returns any one entry that matches the ARFCN; + * If exact_match is false, a BSIC_ANY entry acts as wildcard to match any search_for on that ARFCN, + * and a BSIC_ANY in search_for likewise returns any one entry that matches the ARFCN; * also a from_bts == NEIGHBOR_IDENT_KEY_ANY_BTS in either entry or search_for will match. - * If exact_match is true, only identical bsic_kind values and identical from_bts values return a match. + * If exact_match is true, only identical bsic values and identical from_bts values return a match. * Note, typically wildcard BSICs are only in entry, e.g. the user configured list, and search_for * contains a specific BSIC, e.g. as received from a Measurement Report. */ bool neighbor_ident_key_match(const struct neighbor_ident_key *entry, const struct neighbor_ident_key *search_for, bool exact_match) { - uint16_t bsic_mask; - if (exact_match && entry->from_bts != search_for->from_bts) return false; @@ -128,32 +118,13 @@ if (entry->arfcn != search_for->arfcn) return false; - switch (entry->bsic_kind) { - default: + if (exact_match && entry->bsic != search_for->bsic) return false; - case BSIC_NONE: - if (!exact_match) { - /* The neighbor identifier list entry matches any BSIC for this ARFCN. */ - return true; - } - /* Match exact entry */ - bsic_mask = 0; - break; - case BSIC_6BIT: - bsic_mask = 0x3f; - break; - case BSIC_9BIT: - bsic_mask = 0x1ff; - break; - } - if (!exact_match && search_for->bsic_kind == BSIC_NONE) { - /* The search is looking only for an ARFCN with any BSIC */ + + if (entry->bsic == BSIC_ANY || search_for->bsic == BSIC_ANY) return true; - } - if (search_for->bsic_kind == entry->bsic_kind - && (search_for->bsic & bsic_mask) == (entry->bsic & bsic_mask)) - return true; - return false; + + return entry->bsic == search_for->bsic; } static struct neighbor_ident *_neighbor_ident_get(const struct neighbor_ident_list *nil, @@ -189,20 +160,8 @@ && (key->from_bts < 0 || key->from_bts > 255)) return false; - switch (key->bsic_kind) { - case BSIC_6BIT: - if (key->bsic > 0x3f) - return false; - break; - case BSIC_9BIT: - if (key->bsic > 0x1ff) - return false; - break; - case BSIC_NONE: - break; - default: + if (key->bsic != BSIC_ANY && key->bsic > 0x3f) return false; - } return true; } diff --git a/src/osmo-bsc/neighbor_ident_vty.c b/src/osmo-bsc/neighbor_ident_vty.c index 44830ab..a38d123 100644 --- a/src/osmo-bsc/neighbor_ident_vty.c +++ b/src/osmo-bsc/neighbor_ident_vty.c @@ -52,8 +52,7 @@ struct neighbor_ident_key *key) { const char *arfcn_str = argv[0]; - const char *bsic_kind = argv[1]; - const char *bsic_str = argv[2]; + const char *bsic_str = argv[1]; OSMO_ASSERT(bts); @@ -63,16 +62,9 @@ }; if (!strcmp(bsic_str, "any")) - key->bsic_kind = BSIC_NONE; - else { - key->bsic_kind = (!strcmp(bsic_kind, "bsic9")) ? BSIC_9BIT : BSIC_6BIT; + key->bsic = BSIC_ANY; + else key->bsic = atoi(bsic_str); - if (key->bsic_kind == BSIC_6BIT && key->bsic > 0x3f) { - vty_out(vty, "%% Error: BSIC value surpasses 6-bit range: %u, use 'bsic9' instead%s", - key->bsic, VTY_NEWLINE); - return false; - } - } return true; } @@ -239,7 +231,7 @@ if (!bts || !key) return false; return key->arfcn == bts->c0->arfcn - && (key->bsic_kind == BSIC_NONE || key->bsic == bts->bsic); + && (key->bsic == BSIC_ANY || key->bsic == bts->bsic); } static int add_remote_or_local_bts(struct vty *vty, const struct gsm0808_cell_id *cell_id, @@ -431,18 +423,10 @@ #define NEIGH_BSS_WRITE(fmt, args...) do { \ vty_out(vty, "%sneighbor add " fmt " arfcn %u ", d->indent, ## args, key->arfcn); \ - switch (key->bsic_kind) { \ - default: \ - case BSIC_NONE: \ + if (key->bsic == BSIC_ANY) \ vty_out(vty, "bsic any"); \ - break; \ - case BSIC_6BIT: \ + else \ vty_out(vty, "bsic %u", key->bsic & 0x3f); \ - break; \ - case BSIC_9BIT: \ - vty_out(vty, "bsic9 %u", key->bsic & 0x1ff); \ - break; \ - } \ vty_out(vty, "%s", VTY_NEWLINE); \ } while(0) diff --git a/tests/handover/neighbor_ident_test.c b/tests/handover/neighbor_ident_test.c index b67219c..4eddd4a 100644 --- a/tests/handover/neighbor_ident_test.c +++ b/tests/handover/neighbor_ident_test.c @@ -30,13 +30,12 @@ struct neighbor_ident_list *nil; -static const struct neighbor_ident_key *k(int from_bts, uint16_t arfcn, enum bsic_kind kind, uint16_t bsic) +static const struct neighbor_ident_key *k(int from_bts, uint16_t arfcn, uint8_t bsic) { static struct neighbor_ident_key key; key = (struct neighbor_ident_key){ .from_bts = from_bts, .arfcn = arfcn, - .bsic_kind = kind, .bsic = bsic, }; return &key; @@ -187,61 +186,54 @@ printf("\n--- testing NULL neighbor_ident_list\n"); nil = NULL; - check_add(k(0, 1, BSIC_6BIT, 2), &cgi1, -ENOMEM); - check_get(k(0, 1, BSIC_6BIT, 2), false); - check_del(k(0, 1, BSIC_6BIT, 2), false); + check_add(k(0, 1, 2), &cgi1, -ENOMEM); + check_get(k(0, 1, 2), false); + check_del(k(0, 1, 2), false); printf("\n--- adding entries, test that no two identical entries are added\n"); nil = neighbor_ident_init(ctx); - check_add(k(0, 1, BSIC_6BIT, 2), &cgi1, 1); - check_get(k(0, 1, BSIC_6BIT, 2), true); - check_add(k(0, 1, BSIC_6BIT, 2), &cgi1, 1); - check_add(k(0, 1, BSIC_6BIT, 2), &cgi2, 2); - check_add(k(0, 1, BSIC_6BIT, 2), &cgi2, 2); - check_del(k(0, 1, BSIC_6BIT, 2), true); + check_add(k(0, 1, 2), &cgi1, 1); + check_get(k(0, 1, 2), true); + check_add(k(0, 1, 2), &cgi1, 1); + check_add(k(0, 1, 2), &cgi2, 2); + check_add(k(0, 1, 2), &cgi2, 2); + check_del(k(0, 1, 2), true); printf("\n--- Cannot mix cell identifier types for one entry\n"); - check_add(k(0, 1, BSIC_6BIT, 2), &cgi1, 1); - check_add(k(0, 1, BSIC_6BIT, 2), &lac1, -EINVAL); - check_del(k(0, 1, BSIC_6BIT, 2), true); + check_add(k(0, 1, 2), &cgi1, 1); + check_add(k(0, 1, 2), &lac1, -EINVAL); + check_del(k(0, 1, 2), true); neighbor_ident_free(nil); printf("\n--- BTS matching: specific BTS is stronger\n"); nil = neighbor_ident_init(ctx); - check_add(k(NEIGHBOR_IDENT_KEY_ANY_BTS, 1, BSIC_6BIT, 2), &lac1, 1); - check_add(k(3, 1, BSIC_6BIT, 2), &lac2, 2); - check_get(k(2, 1, BSIC_6BIT, 2), true); - check_get(k(3, 1, BSIC_6BIT, 2), true); - check_get(k(4, 1, BSIC_6BIT, 2), true); - check_get(k(NEIGHBOR_IDENT_KEY_ANY_BTS, 1, BSIC_6BIT, 2), true); + check_add(k(NEIGHBOR_IDENT_KEY_ANY_BTS, 1, 2), &lac1, 1); + check_add(k(3, 1, 2), &lac2, 2); + check_get(k(2, 1, 2), true); + check_get(k(3, 1, 2), true); + check_get(k(4, 1, 2), true); + check_get(k(NEIGHBOR_IDENT_KEY_ANY_BTS, 1, 2), true); neighbor_ident_free(nil); printf("\n--- BSIC matching: 6bit and 9bit are different realms, and wildcard match is weaker\n"); nil = neighbor_ident_init(ctx); - check_add(k(0, 1, BSIC_NONE, 0), &cgi1, 1); - check_add(k(0, 1, BSIC_6BIT, 2), &lac1, 1); - check_add(k(0, 1, BSIC_9BIT, 2), &lac2, 2); - check_get(k(0, 1, BSIC_6BIT, 2), true); - check_get(k(0, 1, BSIC_9BIT, 2), true); - printf("--- wildcard matches both 6bit and 9bit BSIC regardless:\n"); - check_get(k(0, 1, BSIC_6BIT, 23), true); - check_get(k(0, 1, BSIC_9BIT, 23), true); + check_add(k(0, 1, BSIC_ANY), &cgi1, 1); + check_add(k(0, 1, 2), &lac1, 1); + check_add(k(0, 1, 2), &lac2, 2); + check_get(k(0, 1, 2), true); + check_get(k(0, 1, 2), true); neighbor_ident_free(nil); printf("\n--- Value ranges\n"); nil = neighbor_ident_init(ctx); - check_add(k(0, 6, BSIC_6BIT, 1 << 6), &lac1, -ERANGE); - check_add(k(0, 9, BSIC_9BIT, 1 << 9), &lac1, -ERANGE); - check_add(k(0, 6, BSIC_6BIT, -1), &lac1, -ERANGE); - check_add(k(0, 9, BSIC_9BIT, -1), &lac1, -ERANGE); - check_add(k(NEIGHBOR_IDENT_KEY_ANY_BTS - 1, 1, BSIC_NONE, 1), &cgi2, -ERANGE); - check_add(k(256, 1, BSIC_NONE, 1), &cgi2, -ERANGE); - check_add(k(0, 0, BSIC_NONE, 0), &cgi1, 1); - check_add(k(255, 65535, BSIC_NONE, 65535), &lac1, 1); - check_add(k(0, 0, BSIC_6BIT, 0), &cgi2, 2); - check_add(k(255, 65535, BSIC_6BIT, 0x3f), &lac2, 2); - check_add(k(0, 0, BSIC_9BIT, 0), &cgi1, 1); - check_add(k(255, 65535, BSIC_9BIT, 0x1ff), &cgi2, 2); + check_add(k(0, 6, 1 << 6), &lac1, -ERANGE); + check_add(k(0, 6, BSIC_ANY - 1), &lac1, -ERANGE); + check_add(k(NEIGHBOR_IDENT_KEY_ANY_BTS - 1, 1, BSIC_ANY), &cgi2, -ERANGE); + check_add(k(256, 1, BSIC_ANY), &cgi2, -ERANGE); + check_add(k(0, 0, BSIC_ANY), &cgi1, 1); + check_add(k(255, 65535, BSIC_ANY), &lac1, 1); + check_add(k(0, 0, 0), &cgi2, 2); + check_add(k(255, 65535, 0x3f), &lac2, 2); neighbor_ident_free(nil); @@ -262,9 +254,9 @@ nil = neighbor_ident_init(ctx); - i = neighbor_ident_add(nil, k(0, 1, BSIC_6BIT, 2), &a); + i = neighbor_ident_add(nil, k(0, 1, 2), &a); printf("Added first cell identifier list (added %u) --> rc = %d\n", a.id_list_len, i); - i = neighbor_ident_add(nil, k(0, 1, BSIC_6BIT, 2), &b); + i = neighbor_ident_add(nil, k(0, 1, 2), &b); printf("Added second cell identifier list (tried to add %u) --> rc = %d\n", b.id_list_len, i); if (i != -ENOSPC) printf("ERROR: expected rc=%d\n", -ENOSPC); diff --git a/tests/handover/neighbor_ident_test.ok b/tests/handover/neighbor_ident_test.ok index 280b6f2..961a33c 100644 --- a/tests/handover/neighbor_ident_test.ok +++ b/tests/handover/neighbor_ident_test.ok @@ -1,62 +1,62 @@ --- testing NULL neighbor_ident_list -neighbor_ident_add(k(0, 1, BSIC_6BIT, 2), &cgi1) --> expect rc=-ENOMEM, got -12 +neighbor_ident_add(k(0, 1, 2), &cgi1) --> expect rc=-ENOMEM, got -12 (empty) -neighbor_ident_get(k(0, 1, BSIC_6BIT, 2)) --> NULL -neighbor_ident_del(k(0, 1, BSIC_6BIT, 2)) --> nothing deleted +neighbor_ident_get(k(0, 1, 2)) --> NULL +neighbor_ident_del(k(0, 1, 2)) --> nothing deleted (empty) --- adding entries, test that no two identical entries are added -neighbor_ident_add(k(0, 1, BSIC_6BIT, 2), &cgi1) --> expect rc=1, got 1 +neighbor_ident_add(k(0, 1, 2), &cgi1) --> expect rc=1, got 1 0: BTS 0 to ARFCN 1 BSIC 2 cell_id_list cgi[1] = { 0: 001-02-3-4 } -neighbor_ident_get(k(0, 1, BSIC_6BIT, 2)) --> entry returned +neighbor_ident_get(k(0, 1, 2)) --> entry returned cell_id_list cgi[1] = { 0: 001-02-3-4 } -neighbor_ident_add(k(0, 1, BSIC_6BIT, 2), &cgi1) --> expect rc=1, got 1 +neighbor_ident_add(k(0, 1, 2), &cgi1) --> expect rc=1, got 1 0: BTS 0 to ARFCN 1 BSIC 2 cell_id_list cgi[1] = { 0: 001-02-3-4 } -neighbor_ident_add(k(0, 1, BSIC_6BIT, 2), &cgi2) --> expect rc=2, got 2 +neighbor_ident_add(k(0, 1, 2), &cgi2) --> expect rc=2, got 2 0: BTS 0 to ARFCN 1 BSIC 2 cell_id_list cgi[2] = { 0: 001-02-3-4 1: 005-006-7-8 } -neighbor_ident_add(k(0, 1, BSIC_6BIT, 2), &cgi2) --> expect rc=2, got 2 +neighbor_ident_add(k(0, 1, 2), &cgi2) --> expect rc=2, got 2 0: BTS 0 to ARFCN 1 BSIC 2 cell_id_list cgi[2] = { 0: 001-02-3-4 1: 005-006-7-8 } -neighbor_ident_del(k(0, 1, BSIC_6BIT, 2)) --> entry deleted +neighbor_ident_del(k(0, 1, 2)) --> entry deleted (empty) --- Cannot mix cell identifier types for one entry -neighbor_ident_add(k(0, 1, BSIC_6BIT, 2), &cgi1) --> expect rc=1, got 1 +neighbor_ident_add(k(0, 1, 2), &cgi1) --> expect rc=1, got 1 0: BTS 0 to ARFCN 1 BSIC 2 cell_id_list cgi[1] = { 0: 001-02-3-4 } -neighbor_ident_add(k(0, 1, BSIC_6BIT, 2), &lac1) --> expect rc=-EINVAL, got -22 +neighbor_ident_add(k(0, 1, 2), &lac1) --> expect rc=-EINVAL, got -22 0: BTS 0 to ARFCN 1 BSIC 2 cell_id_list cgi[1] = { 0: 001-02-3-4 } -neighbor_ident_del(k(0, 1, BSIC_6BIT, 2)) --> entry deleted +neighbor_ident_del(k(0, 1, 2)) --> entry deleted (empty) --- BTS matching: specific BTS is stronger -neighbor_ident_add(k(NEIGHBOR_IDENT_KEY_ANY_BTS, 1, BSIC_6BIT, 2), &lac1) --> expect rc=1, got 1 +neighbor_ident_add(k(NEIGHBOR_IDENT_KEY_ANY_BTS, 1, 2), &lac1) --> expect rc=1, got 1 0: BTS * to ARFCN 1 BSIC 2 cell_id_list lac[1] = { 0: 123 } -neighbor_ident_add(k(3, 1, BSIC_6BIT, 2), &lac2) --> expect rc=2, got 2 +neighbor_ident_add(k(3, 1, 2), &lac2) --> expect rc=2, got 2 0: BTS * to ARFCN 1 BSIC 2 cell_id_list lac[1] = { 0: 123 @@ -66,31 +66,31 @@ 0: 456 1: 789 } -neighbor_ident_get(k(2, 1, BSIC_6BIT, 2)) --> entry returned +neighbor_ident_get(k(2, 1, 2)) --> entry returned cell_id_list lac[1] = { 0: 123 } -neighbor_ident_get(k(3, 1, BSIC_6BIT, 2)) --> entry returned +neighbor_ident_get(k(3, 1, 2)) --> entry returned cell_id_list lac[2] = { 0: 456 1: 789 } -neighbor_ident_get(k(4, 1, BSIC_6BIT, 2)) --> entry returned +neighbor_ident_get(k(4, 1, 2)) --> entry returned cell_id_list lac[1] = { 0: 123 } -neighbor_ident_get(k(NEIGHBOR_IDENT_KEY_ANY_BTS, 1, BSIC_6BIT, 2)) --> entry returned +neighbor_ident_get(k(NEIGHBOR_IDENT_KEY_ANY_BTS, 1, 2)) --> entry returned cell_id_list lac[1] = { 0: 123 } --- BSIC matching: 6bit and 9bit are different realms, and wildcard match is weaker -neighbor_ident_add(k(0, 1, BSIC_NONE, 0), &cgi1) --> expect rc=1, got 1 +neighbor_ident_add(k(0, 1, BSIC_ANY), &cgi1) --> expect rc=1, got 1 0: BTS 0 to ARFCN 1 (any BSIC) cell_id_list cgi[1] = { 0: 001-02-3-4 } -neighbor_ident_add(k(0, 1, BSIC_6BIT, 2), &lac1) --> expect rc=1, got 1 +neighbor_ident_add(k(0, 1, 2), &lac1) --> expect rc=1, got 1 0: BTS 0 to ARFCN 1 (any BSIC) cell_id_list cgi[1] = { 0: 001-02-3-4 @@ -99,58 +99,46 @@ cell_id_list lac[1] = { 0: 123 } -neighbor_ident_add(k(0, 1, BSIC_9BIT, 2), &lac2) --> expect rc=2, got 2 +neighbor_ident_add(k(0, 1, 2), &lac2) --> expect rc=2, got 3 +ERROR 0: BTS 0 to ARFCN 1 (any BSIC) cell_id_list cgi[1] = { 0: 001-02-3-4 } 1: BTS 0 to ARFCN 1 BSIC 2 - cell_id_list lac[1] = { + cell_id_list lac[3] = { 0: 123 + 1: 456 + 2: 789 } - 2: BTS 0 to ARFCN 1 BSIC 2(9bit) - cell_id_list lac[2] = { - 0: 456 - 1: 789 - } -neighbor_ident_get(k(0, 1, BSIC_6BIT, 2)) --> entry returned - cell_id_list lac[1] = { +neighbor_ident_get(k(0, 1, 2)) --> entry returned + cell_id_list lac[3] = { 0: 123 + 1: 456 + 2: 789 } -neighbor_ident_get(k(0, 1, BSIC_9BIT, 2)) --> entry returned - cell_id_list lac[2] = { - 0: 456 - 1: 789 - } ---- wildcard matches both 6bit and 9bit BSIC regardless: -neighbor_ident_get(k(0, 1, BSIC_6BIT, 23)) --> entry returned - cell_id_list cgi[1] = { - 0: 001-02-3-4 - } -neighbor_ident_get(k(0, 1, BSIC_9BIT, 23)) --> entry returned - cell_id_list cgi[1] = { - 0: 001-02-3-4 +neighbor_ident_get(k(0, 1, 2)) --> entry returned + cell_id_list lac[3] = { + 0: 123 + 1: 456 + 2: 789 } --- Value ranges -neighbor_ident_add(k(0, 6, BSIC_6BIT, 1 << 6), &lac1) --> expect rc=-ERANGE, got -34 +neighbor_ident_add(k(0, 6, 1 << 6), &lac1) --> expect rc=-ERANGE, got -34 (empty) -neighbor_ident_add(k(0, 9, BSIC_9BIT, 1 << 9), &lac1) --> expect rc=-ERANGE, got -34 +neighbor_ident_add(k(0, 6, BSIC_ANY - 1), &lac1) --> expect rc=-ERANGE, got -34 (empty) -neighbor_ident_add(k(0, 6, BSIC_6BIT, -1), &lac1) --> expect rc=-ERANGE, got -34 +neighbor_ident_add(k(NEIGHBOR_IDENT_KEY_ANY_BTS - 1, 1, BSIC_ANY), &cgi2) --> expect rc=-ERANGE, got -34 (empty) -neighbor_ident_add(k(0, 9, BSIC_9BIT, -1), &lac1) --> expect rc=-ERANGE, got -34 +neighbor_ident_add(k(256, 1, BSIC_ANY), &cgi2) --> expect rc=-ERANGE, got -34 (empty) -neighbor_ident_add(k(NEIGHBOR_IDENT_KEY_ANY_BTS - 1, 1, BSIC_NONE, 1), &cgi2) --> expect rc=-ERANGE, got -34 - (empty) -neighbor_ident_add(k(256, 1, BSIC_NONE, 1), &cgi2) --> expect rc=-ERANGE, got -34 - (empty) -neighbor_ident_add(k(0, 0, BSIC_NONE, 0), &cgi1) --> expect rc=1, got 1 +neighbor_ident_add(k(0, 0, BSIC_ANY), &cgi1) --> expect rc=1, got 1 0: BTS 0 to ARFCN 0 (any BSIC) cell_id_list cgi[1] = { 0: 001-02-3-4 } -neighbor_ident_add(k(255, 65535, BSIC_NONE, 65535), &lac1) --> expect rc=1, got 1 +neighbor_ident_add(k(255, 65535, BSIC_ANY), &lac1) --> expect rc=1, got 1 0: BTS 0 to ARFCN 0 (any BSIC) cell_id_list cgi[1] = { 0: 001-02-3-4 @@ -159,7 +147,7 @@ cell_id_list lac[1] = { 0: 123 } -neighbor_ident_add(k(0, 0, BSIC_6BIT, 0), &cgi2) --> expect rc=2, got 2 +neighbor_ident_add(k(0, 0, 0), &cgi2) --> expect rc=2, got 2 0: BTS 0 to ARFCN 0 (any BSIC) cell_id_list cgi[1] = { 0: 001-02-3-4 @@ -173,7 +161,7 @@ 0: 001-02-3-4 1: 005-006-7-8 } -neighbor_ident_add(k(255, 65535, BSIC_6BIT, 0x3f), &lac2) --> expect rc=2, got 2 +neighbor_ident_add(k(255, 65535, 0x3f), &lac2) --> expect rc=2, got 2 0: BTS 0 to ARFCN 0 (any BSIC) cell_id_list cgi[1] = { 0: 001-02-3-4 @@ -192,57 +180,6 @@ 0: 456 1: 789 } -neighbor_ident_add(k(0, 0, BSIC_9BIT, 0), &cgi1) --> expect rc=1, got 1 - 0: BTS 0 to ARFCN 0 (any BSIC) - cell_id_list cgi[1] = { - 0: 001-02-3-4 - } - 1: BTS 255 to ARFCN 65535 (any BSIC) - cell_id_list lac[1] = { - 0: 123 - } - 2: BTS 0 to ARFCN 0 BSIC 0 - cell_id_list cgi[2] = { - 0: 001-02-3-4 - 1: 005-006-7-8 - } - 3: BTS 255 to ARFCN 65535 BSIC 63 - cell_id_list lac[2] = { - 0: 456 - 1: 789 - } - 4: BTS 0 to ARFCN 0 BSIC 0(9bit) - cell_id_list cgi[1] = { - 0: 001-02-3-4 - } -neighbor_ident_add(k(255, 65535, BSIC_9BIT, 0x1ff), &cgi2) --> expect rc=2, got 2 - 0: BTS 0 to ARFCN 0 (any BSIC) - cell_id_list cgi[1] = { - 0: 001-02-3-4 - } - 1: BTS 255 to ARFCN 65535 (any BSIC) - cell_id_list lac[1] = { - 0: 123 - } - 2: BTS 0 to ARFCN 0 BSIC 0 - cell_id_list cgi[2] = { - 0: 001-02-3-4 - 1: 005-006-7-8 - } - 3: BTS 255 to ARFCN 65535 BSIC 63 - cell_id_list lac[2] = { - 0: 456 - 1: 789 - } - 4: BTS 0 to ARFCN 0 BSIC 0(9bit) - cell_id_list cgi[1] = { - 0: 001-02-3-4 - } - 5: BTS 255 to ARFCN 65535 BSIC 511(9bit) - cell_id_list cgi[2] = { - 0: 001-02-3-4 - 1: 005-006-7-8 - } --- size limits Added first cell identifier list (added 127) --> rc = 127 diff --git a/tests/neighbor_ident.vty b/tests/neighbor_ident.vty index 11227ed..692d894 100644 --- a/tests/neighbor_ident.vty +++ b/tests/neighbor_ident.vty @@ -2,13 +2,13 @@ OsmoBSC> list ... - show bts <0-255> neighbor arfcn <0-1023> (bsic|bsic9) (<0-511>|any) + show bts <0-255> neighbor arfcn <0-1023> bsic (<0-63>|any) ... OsmoBSC> enable OsmoBSC# list ... - show bts <0-255> neighbor arfcn <0-1023> (bsic|bsic9) (<0-511>|any) + show bts <0-255> neighbor arfcn <0-1023> bsic (<0-63>|any) ... OsmoBSC# configure terminal @@ -83,18 +83,18 @@ neighbor add bts <0-255> neighbor add lac <0-65535> neighbor add lac-ci <0-65535> <0-255> - neighbor add lac <0-65535> arfcn <0-1023> (bsic|bsic9) (<0-511>|any) - neighbor add lac-ci <0-65535> <0-255> arfcn <0-1023> (bsic|bsic9) (<0-511>|any) - neighbor add cgi <0-999> <0-999> <0-65535> <0-255> arfcn <0-1023> (bsic|bsic9) (<0-511>|any) + neighbor add lac <0-65535> arfcn <0-1023> bsic (<0-63>|any) + neighbor add lac-ci <0-65535> <0-255> arfcn <0-1023> bsic (<0-63>|any) + neighbor add cgi <0-999> <0-999> <0-65535> <0-255> arfcn <0-1023> bsic (<0-63>|any) neighbor del bts <0-255> - neighbor del arfcn <0-1023> (bsic|bsic9) (<0-511>|any) + neighbor del arfcn <0-1023> bsic (<0-63>|any) ... OsmoBSC(config-net-bts)# show running-config ... !neighbor add OsmoBSC(config-net-bts)# neighbor add cgi 23 42 423 5 arfcn 23 bsic 64 -% Error: BSIC value surpasses 6-bit range: 64, use 'bsic9' instead +% Unknown command. OsmoBSC(config-net-bts)# neighbor add bts 0 % Error: cannot add local BTS 0 as neighbor to BTS 0: Invalid argument @@ -135,11 +135,8 @@ OsmoBSC(config-net-bts)# neighbor add lac-ci 789 10 arfcn 423 bsic any % BTS 0 to ARFCN 423 (any BSIC) now has 1 remote BSS Cell Identifier List entry -OsmoBSC(config-net-bts)# neighbor add lac-ci 789 10 arfcn 423 bsic9 511 -% BTS 0 to ARFCN 423 BSIC 511(9bit) now has 1 remote BSS Cell Identifier List entry - -OsmoBSC(config-net-bts)# neighbor add lac-ci 789 10 arfcn 423 bsic9 1 -% BTS 0 to ARFCN 423 BSIC 1(9bit) now has 1 remote BSS Cell Identifier List entry +OsmoBSC(config-net-bts)# neighbor add lac-ci 789 10 arfcn 423 bsic 63 +% BTS 0 to ARFCN 423 BSIC 63 now has 1 remote BSS Cell Identifier List entry OsmoBSC(config-net-bts)# neighbor add lac-ci 789 10 arfcn 423 bsic 1 % BTS 0 to ARFCN 423 BSIC 1 now has 1 remote BSS Cell Identifier List entry @@ -157,8 +154,7 @@ neighbor add cgi 023 042 234 56 arfcn 23 bsic 42 neighbor add lac 456 arfcn 123 bsic 45 neighbor add lac-ci 789 10 arfcn 423 bsic any - neighbor add lac-ci 789 10 arfcn 423 bsic9 511 - neighbor add lac-ci 789 10 arfcn 423 bsic9 1 + neighbor add lac-ci 789 10 arfcn 423 bsic 63 neighbor add lac-ci 789 10 arfcn 423 bsic 1 ... !neighbor add @@ -186,8 +182,7 @@ neighbor add lac-ci 22 32 neighbor add lac 456 arfcn 123 bsic 45 neighbor add lac-ci 789 10 arfcn 423 bsic any - neighbor add lac-ci 789 10 arfcn 423 bsic9 511 - neighbor add lac-ci 789 10 arfcn 423 bsic9 1 + neighbor add lac-ci 789 10 arfcn 423 bsic 63 neighbor add lac-ci 789 10 arfcn 423 bsic 1 ... !neighbor add @@ -199,8 +194,7 @@ neighbor add lac-ci 21 31 neighbor add lac-ci 22 32 neighbor add lac-ci 789 10 arfcn 423 bsic any - neighbor add lac-ci 789 10 arfcn 423 bsic9 511 - neighbor add lac-ci 789 10 arfcn 423 bsic9 1 + neighbor add lac-ci 789 10 arfcn 423 bsic 63 neighbor add lac-ci 789 10 arfcn 423 bsic 1 ... !neighbor add @@ -211,15 +205,12 @@ ... !neighbor add neighbor add lac-ci 21 31 neighbor add lac-ci 22 32 - neighbor add lac-ci 789 10 arfcn 423 bsic9 511 - neighbor add lac-ci 789 10 arfcn 423 bsic9 1 + neighbor add lac-ci 789 10 arfcn 423 bsic 63 neighbor add lac-ci 789 10 arfcn 423 bsic 1 ... !neighbor add -OsmoBSC(config-net-bts)# neighbor del arfcn 423 bsic9 511 -% Removed remote BSS neighbor BTS 0 to ARFCN 423 BSIC 511(9bit) -OsmoBSC(config-net-bts)# neighbor del arfcn 423 bsic9 1 -% Removed remote BSS neighbor BTS 0 to ARFCN 423 BSIC 1(9bit) +OsmoBSC(config-net-bts)# neighbor del arfcn 423 bsic 63 +% Removed remote BSS neighbor BTS 0 to ARFCN 423 BSIC 63 OsmoBSC(config-net-bts)# show running-config ... !neighbor add -- To view, visit https://gerrit.osmocom.org/10164 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I29b92f47da2636d3a19f073755f9382fa98f9010 Gerrit-Change-Number: 10164 Gerrit-PatchSet: 3 Gerrit-Owner: Neels Hofmeyr <nhofmeyr at sysmocom.de> Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr <nhofmeyr at sysmocom.de> -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20180728/a300126c/attachment.htm>