lists.osmocom.org
Sign In Sign Up
Manage this list Sign In Sign Up

Keyboard Shortcuts

Thread View

  • j: Next unread message
  • k: Previous unread message
  • j a: Jump to all threads
  • j l: Jump to MailingList overview

gerrit-log

Thread Start a new thread
Download
Threads by month
  • ----- 2026 -----
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2025 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2024 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2023 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2022 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
gerrit-log@lists.osmocom.org

March 2023

  • 1 participants
  • 3642 discussions
[S] Change in osmo-bsc[master]: vty: msc / codec-list: forbid invalid codec versions
by neels 04 Mar '23

04 Mar '23
neels has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/31611 ) ( 2 is the latest approved patch-set. No files were changed between the latest approved patch-set and the submitted one. )Change subject: vty: msc / codec-list: forbid invalid codec versions ...................................................................... vty: msc / codec-list: forbid invalid codec versions Change-Id: I421c306aa22dfdad0f30c6ba8b482e1eff188a8e --- M src/osmo-bsc/bsc_vty.c M tests/msc.vty 2 files changed, 26 insertions(+), 10 deletions(-) Approvals: laforge: Looks good to me, approved fixeria: Looks good to me, but someone else must approve pespin: Looks good to me, but someone else must approve Jenkins Builder: Verified diff --git a/src/osmo-bsc/bsc_vty.c b/src/osmo-bsc/bsc_vty.c index a860770..20d57db 100644 --- a/src/osmo-bsc/bsc_vty.c +++ b/src/osmo-bsc/bsc_vty.c @@ -2742,6 +2742,13 @@ else if (strncmp("fr", argv[i], 2) == 0) tmp[i].hr = 0; + /* forbid invalid versions */ + if (tmp[i].ver < 1 || tmp[i].ver > 7 + || (tmp[i].hr && tmp[i].ver == 2)) { + vty_out(vty, "'%s' is not a valid codec version%s", argv[i], VTY_NEWLINE); + return CMD_WARNING; + } + /* prevent duplicate entries */ for (j = 0; j < i; j++) { if (gsm_audio_support_cmp(&tmp[j], &tmp[i]) == 0) { diff --git a/tests/msc.vty b/tests/msc.vty index 8cbcb83..74eca2a 100644 --- a/tests/msc.vty +++ b/tests/msc.vty @@ -62,49 +62,49 @@ ... OsmoBSC(config-msc)# codec-list fr0 fr1 +'fr0' is not a valid codec version OsmoBSC(config-msc)# show running-config ... msc 0 ... - codec-list fr0 fr1 + codec-list hr1 hr3 fr1 fr2 fr3 ... -OsmoBSC(config-msc)# # ERROR: fr0 should be rejected OsmoBSC(config-msc)# codec-list hr0 hr1 +'hr0' is not a valid codec version OsmoBSC(config-msc)# show running-config ... msc 0 ... - codec-list hr0 hr1 + codec-list hr1 hr3 fr1 fr2 fr3 ... -OsmoBSC(config-msc)# # ERROR: hr0 should be rejected OsmoBSC(config-msc)# codec-list fr8 fr9 +'fr8' is not a valid codec version OsmoBSC(config-msc)# show running-config ... msc 0 ... - codec-list fr8 fr9 + codec-list hr1 hr3 fr1 fr2 fr3 ... -OsmoBSC(config-msc)# # ERROR: fr8 and fr9 should be rejected OsmoBSC(config-msc)# codec-list hr8 hr9 +'hr8' is not a valid codec version OsmoBSC(config-msc)# show running-config ... msc 0 ... - codec-list hr8 hr9 + codec-list hr1 hr3 fr1 fr2 fr3 ... -OsmoBSC(config-msc)# # ERROR: hr8 and hr9 should be rejected OsmoBSC(config-msc)# codec-list fr2 hr2 +'hr2' is not a valid codec version OsmoBSC(config-msc)# show running-config ... msc 0 ... - codec-list fr2 hr2 + codec-list hr1 hr3 fr1 fr2 fr3 ... -OsmoBSC(config-msc)# # TODO: should hr2 be rejected OsmoBSC(config-msc)# codec-list fr1 fr2 fr3 fr4 OsmoBSC(config-msc)# show running-config -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/31611 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: I421c306aa22dfdad0f30c6ba8b482e1eff188a8e Gerrit-Change-Number: 31611 Gerrit-PatchSet: 4 Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
[M] Change in osmo-bsc[master]: vty: msc / codec-list: forbid duplicate entries
by neels 04 Mar '23

04 Mar '23
neels has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/31610 ) ( 2 is the latest approved patch-set. No files were changed between the latest approved patch-set and the submitted one. )Change subject: vty: msc / codec-list: forbid duplicate entries ...................................................................... vty: msc / codec-list: forbid duplicate entries Change-Id: Ifdc9e04bf1d623da65bfb8a2fddea765601f6d9b --- M include/osmocom/bsc/gsm_data.h M src/osmo-bsc/bsc_vty.c M src/osmo-bsc/gsm_data.c M tests/msc.vty 4 files changed, 57 insertions(+), 23 deletions(-) Approvals: fixeria: Looks good to me, but someone else must approve pespin: Looks good to me, approved Jenkins Builder: Verified diff --git a/include/osmocom/bsc/gsm_data.h b/include/osmocom/bsc/gsm_data.h index 8c4dcce..b2aa590 100644 --- a/include/osmocom/bsc/gsm_data.h +++ b/include/osmocom/bsc/gsm_data.h @@ -984,6 +984,8 @@ ver : 7; }; +int gsm_audio_support_cmp(const struct gsm_audio_support *a, const struct gsm_audio_support *b); + extern void talloc_ctx_init(void *ctx_root); enum gsm_bts_type parse_btstype(const char *arg); diff --git a/src/osmo-bsc/bsc_vty.c b/src/osmo-bsc/bsc_vty.c index e0a7a95..a860770 100644 --- a/src/osmo-bsc/bsc_vty.c +++ b/src/osmo-bsc/bsc_vty.c @@ -2711,42 +2711,50 @@ " (fr3: AMR-FR, hr3: AMR-HR, fr2: GSM-EFR, fr1: GSM-FR, hr1: GSM-HR)\n") { struct bsc_msc_data *data = bsc_msc_data(vty); + struct gsm_audio_support tmp[ARRAY_SIZE(data->audio_support)]; int i; - /* check all given arguments first */ - for (i = 0; i < argc; i++) { - /* check for hrX or frX */ - if (strlen(argv[i]) != 3 - || argv[i][1] != 'r' - || (argv[i][0] != 'h' && argv[i][0] != 'f') - || argv[i][2] < '0' - || argv[i][2] > '9') - goto error; - } - + /* Nr of arguments must fit in the array */ if (argc > ARRAY_SIZE(data->audio_support)) { vty_out(vty, "Too many items in 'msc' / 'codec-list': %d. There can be at most %zu entries.%s", argc, ARRAY_SIZE(data->audio_support), VTY_NEWLINE); return CMD_ERR_EXEED_ARGC_MAX; } - data->audio_length = argc; + /* check all given arguments first */ + for (i = 0; i < argc; i++) { + int j; - for (i = 0; i < argc; ++i) { - data->audio_support[i].ver = atoi(argv[i] + 2); + /* check for hrX or frX */ + if (strlen(argv[i]) != 3 + || argv[i][1] != 'r' + || (argv[i][0] != 'h' && argv[i][0] != 'f') + || argv[i][2] < '0' + || argv[i][2] > '9') { + vty_out(vty, "Codec name must be hrX or frX. Was '%s'%s", argv[i], VTY_NEWLINE); + return CMD_WARNING; + } + /* store in tmp[] first, to not overwrite data->audio_support[] in case of error */ + tmp[i].ver = atoi(argv[i] + 2); if (strncmp("hr", argv[i], 2) == 0) - data->audio_support[i].hr = 1; + tmp[i].hr = 1; else if (strncmp("fr", argv[i], 2) == 0) - data->audio_support[i].hr = 0; + tmp[i].hr = 0; + + /* prevent duplicate entries */ + for (j = 0; j < i; j++) { + if (gsm_audio_support_cmp(&tmp[j], &tmp[i]) == 0) { + vty_out(vty, "duplicate entry in 'msc' / 'codec-support': %s%s", argv[i], VTY_NEWLINE); + return CMD_WARNING; + } + } } - return CMD_SUCCESS; + memcpy(data->audio_support, tmp, sizeof(data->audio_support)); + data->audio_length = argc; -error: - vty_out(vty, "Codec name must be hrX or frX. Was '%s'%s", - argv[i], VTY_NEWLINE); - return CMD_WARNING; + return CMD_SUCCESS; } #define LEGACY_STR "This command has no effect, it is kept to support legacy config files\n" diff --git a/src/osmo-bsc/gsm_data.c b/src/osmo-bsc/gsm_data.c index 1562ea8..a682a32 100644 --- a/src/osmo-bsc/gsm_data.c +++ b/src/osmo-bsc/gsm_data.c @@ -1042,3 +1042,18 @@ return -EINVAL; } } + +int gsm_audio_support_cmp(const struct gsm_audio_support *a, const struct gsm_audio_support *b) +{ + int rc; + if (a == b) + return 0; + if (!a) + return -1; + if (!b) + return 1; + rc = OSMO_CMP(a->hr, b->hr); + if (rc) + return rc; + return OSMO_CMP(a->ver, b->ver); +} diff --git a/tests/msc.vty b/tests/msc.vty index af4c33e..8cbcb83 100644 --- a/tests/msc.vty +++ b/tests/msc.vty @@ -53,13 +53,13 @@ ... OsmoBSC(config-msc)# codec-list fr1 fr1 +duplicate entry in 'msc' / 'codec-support': fr1 OsmoBSC(config-msc)# show running-config ... msc 0 ... - codec-list fr1 fr1 + codec-list hr1 hr3 fr1 fr2 fr3 ... -OsmoBSC(config-msc)# # ERROR: duplicate entries make no sense OsmoBSC(config-msc)# codec-list fr0 fr1 OsmoBSC(config-msc)# show running-config -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/31610 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: Ifdc9e04bf1d623da65bfb8a2fddea765601f6d9b Gerrit-Change-Number: 31610 Gerrit-PatchSet: 4 Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
[M] Change in osmo-bsc[master]: simplify storage of bsc_msc_data->audio_support
by neels 04 Mar '23

04 Mar '23
neels has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/31609 ) Change subject: simplify storage of bsc_msc_data->audio_support ...................................................................... simplify storage of bsc_msc_data->audio_support Make it a plain array, no dynamic allocation needed. Change-Id: I625cedc4bb040d649fd6e1794ba468f4c6ad6adc --- M include/osmocom/bsc/bsc_msc_data.h M src/osmo-bsc/bsc_vty.c M src/osmo-bsc/codec_pref.c M src/osmo-bsc/osmo_bsc_msc.c M tests/codec_pref/codec_pref_test.c M tests/msc.vty 6 files changed, 87 insertions(+), 130 deletions(-) Approvals: laforge: Looks good to me, but someone else must approve neels: Looks good to me, approved Jenkins Builder: Verified diff --git a/include/osmocom/bsc/bsc_msc_data.h b/include/osmocom/bsc/bsc_msc_data.h index 3568716..47bdf12 100644 --- a/include/osmocom/bsc/bsc_msc_data.h +++ b/include/osmocom/bsc/bsc_msc_data.h @@ -133,8 +133,13 @@ /* audio codecs */ struct gsm48_multi_rate_conf amr_conf; bool amr_octet_aligned; - struct gsm_audio_support **audio_support; + + /* Practically, there can be only 5 entries in osmo-bsc: FR1 FR2 FR3 HR1 HR3. Historically, osmo-bsc allowed + * *any* number of entries -- we should not break too strictly on old cfg files. Theoretically, there should be + * room for FR1 to FR7 plus HR1 to HR7 less HR2. Let's just give ample room for all these aspects: */ + struct gsm_audio_support audio_support[16]; int audio_length; + enum bsc_lcls_mode lcls_mode; bool lcls_codec_mismatch_allow; diff --git a/src/osmo-bsc/bsc_vty.c b/src/osmo-bsc/bsc_vty.c index bba84e2..e0a7a95 100644 --- a/src/osmo-bsc/bsc_vty.c +++ b/src/osmo-bsc/bsc_vty.c @@ -2550,10 +2550,10 @@ if (i != 0) vty_out(vty, " "); - if (msc->audio_support[i]->hr) - vty_out(vty, "hr%u", msc->audio_support[i]->ver); + if (msc->audio_support[i].hr) + vty_out(vty, "hr%u", msc->audio_support[i].ver); else - vty_out(vty, "fr%u", msc->audio_support[i]->ver); + vty_out(vty, "fr%u", msc->audio_support[i].ver); } vty_out(vty, "%s", VTY_NEWLINE); @@ -2724,27 +2724,21 @@ goto error; } - /* free the old list... if it exists */ - if (data->audio_support) { - talloc_free(data->audio_support); - data->audio_support = NULL; - data->audio_length = 0; + if (argc > ARRAY_SIZE(data->audio_support)) { + vty_out(vty, "Too many items in 'msc' / 'codec-list': %d. There can be at most %zu entries.%s", + argc, ARRAY_SIZE(data->audio_support), VTY_NEWLINE); + return CMD_ERR_EXEED_ARGC_MAX; } - /* create a new array */ - data->audio_support = - talloc_zero_array(bsc_gsmnet, struct gsm_audio_support *, argc); data->audio_length = argc; for (i = 0; i < argc; ++i) { - data->audio_support[i] = talloc_zero(data->audio_support, - struct gsm_audio_support); - data->audio_support[i]->ver = atoi(argv[i] + 2); + data->audio_support[i].ver = atoi(argv[i] + 2); if (strncmp("hr", argv[i], 2) == 0) - data->audio_support[i]->hr = 1; + data->audio_support[i].hr = 1; else if (strncmp("fr", argv[i], 2) == 0) - data->audio_support[i]->hr = 0; + data->audio_support[i].hr = 0; } return CMD_SUCCESS; diff --git a/src/osmo-bsc/codec_pref.c b/src/osmo-bsc/codec_pref.c index 2c90831..31b5215 100644 --- a/src/osmo-bsc/codec_pref.c +++ b/src/osmo-bsc/codec_pref.c @@ -335,7 +335,7 @@ * indeed available with the current BTS and MSC configuration */ for (i = 0; i < msc->audio_length; i++) { /* Pick a permitted speech value from the global codec configuration list */ - perm_spch = audio_support_to_gsm88(msc->audio_support[i]); + perm_spch = audio_support_to_gsm88(&msc->audio_support[i]); /* Determine if the result is a half or full rate codec */ rc = full_rate_from_perm_spch(&full_rate, perm_spch); @@ -406,7 +406,7 @@ for (i = 0; i < msc->audio_length; i++) { /* Pick a permitted speech value from the global codec configuration list */ - perm_spch = audio_support_to_gsm88(msc->audio_support[i]); + perm_spch = audio_support_to_gsm88(&msc->audio_support[i]); /* Check this permitted speech value against the BTS specific parameters. * if the BTS does not support the codec, try the next one */ @@ -421,8 +421,8 @@ /* AMR (HR/FR version 3) is the only codec that requires a codec * configuration (S0-S15). Determine the current configuration and update * the cfg flag. */ - if (msc->audio_support[i]->ver == 3) - scl->codec[scl->len].cfg = gen_bss_supported_amr_s15_s0(msc, bts, msc->audio_support[i]->hr); + if (msc->audio_support[i].ver == 3) + scl->codec[scl->len].cfg = gen_bss_supported_amr_s15_s0(msc, bts, msc->audio_support[i].hr); scl->len++; } diff --git a/src/osmo-bsc/osmo_bsc_msc.c b/src/osmo-bsc/osmo_bsc_msc.c index 4d5d5b2..08a2466 100644 --- a/src/osmo-bsc/osmo_bsc_msc.c +++ b/src/osmo-bsc/osmo_bsc_msc.c @@ -207,7 +207,6 @@ struct bsc_msc_data *osmo_msc_data_alloc(struct gsm_network *net, int nr) { struct bsc_msc_data *msc_data; - unsigned int i; /* check if there is already one */ msc_data = osmo_msc_data_find(net, nr); @@ -251,24 +250,16 @@ /* Allow the full set of possible codecs by default */ msc_data->audio_length = 5; - msc_data->audio_support = - talloc_zero_array(msc_data, struct gsm_audio_support *, - msc_data->audio_length); - for (i = 0; i < msc_data->audio_length; i++) { - msc_data->audio_support[i] = - talloc_zero(msc_data->audio_support, - struct gsm_audio_support); - } - msc_data->audio_support[0]->ver = 1; - msc_data->audio_support[0]->hr = 0; - msc_data->audio_support[1]->ver = 1; - msc_data->audio_support[1]->hr = 1; - msc_data->audio_support[2]->ver = 2; - msc_data->audio_support[2]->hr = 0; - msc_data->audio_support[3]->ver = 3; - msc_data->audio_support[3]->hr = 0; - msc_data->audio_support[4]->ver = 3; - msc_data->audio_support[4]->hr = 1; + msc_data->audio_support[0].ver = 1; + msc_data->audio_support[0].hr = 0; + msc_data->audio_support[1].ver = 1; + msc_data->audio_support[1].hr = 1; + msc_data->audio_support[2].ver = 2; + msc_data->audio_support[2].hr = 0; + msc_data->audio_support[3].ver = 3; + msc_data->audio_support[3].hr = 0; + msc_data->audio_support[4].ver = 3; + msc_data->audio_support[4].hr = 1; osmo_fd_setup(&msc_data->mgcp_ipa.ofd, -1, OSMO_FD_READ, &bsc_sccplite_mgcp_proxy_cb, msc_data, 0); msc_data->mgcp_ipa.local_addr = NULL; /* = INADDR(6)_ANY */ diff --git a/tests/codec_pref/codec_pref_test.c b/tests/codec_pref/codec_pref_test.c index 5f4c831..920352c 100644 --- a/tests/codec_pref/codec_pref_test.c +++ b/tests/codec_pref/codec_pref_test.c @@ -30,27 +30,8 @@ void *ctx = NULL; -#define MSC_AUDIO_SUPPORT_MAX 5 #define N_CONFIG_VARIANTS 9 -/* Make sure that there is some memory to put our test configuration. */ -static void init_msc_config(struct bsc_msc_data *msc) -{ - unsigned int i; - - msc->audio_support = talloc_zero_array(ctx, struct gsm_audio_support *, MSC_AUDIO_SUPPORT_MAX); - msc->audio_length = MSC_AUDIO_SUPPORT_MAX; - for (i = 0; i < MSC_AUDIO_SUPPORT_MAX; i++) { - msc->audio_support[i] = talloc_zero(msc->audio_support, struct gsm_audio_support); - } -} - -/* Free memory that we have used for the test configuration. */ -static void free_msc_config(struct bsc_msc_data *msc) -{ - talloc_free(msc->audio_support); -} - /* The speech codec list is sent by the MS and lists the voice codec settings * that the MS is able to support. The BSC must select one of this codecs * depending on what the MSC is able to support. The following function @@ -215,74 +196,74 @@ switch (config_no) { case 0: /* FR1 only */ - msc->audio_support[0]->ver = 1; - msc->audio_support[0]->hr = 0; + msc->audio_support[0].ver = 1; + msc->audio_support[0].hr = 0; msc->audio_length = 1; break; case 1: /* HR1 only */ - msc->audio_support[0]->ver = 1; - msc->audio_support[0]->hr = 1; + msc->audio_support[0].ver = 1; + msc->audio_support[0].hr = 1; msc->audio_length = 1; break; case 2: /* FR2 only */ - msc->audio_support[0]->ver = 2; - msc->audio_support[0]->hr = 0; + msc->audio_support[0].ver = 2; + msc->audio_support[0].hr = 0; msc->audio_length = 1; break; case 3: /* FR3 only */ - msc->audio_support[0]->ver = 3; - msc->audio_support[0]->hr = 0; + msc->audio_support[0].ver = 3; + msc->audio_support[0].hr = 0; msc->audio_length = 1; break; case 4: /* HR3 only */ - msc->audio_support[0]->ver = 3; - msc->audio_support[0]->hr = 1; + msc->audio_support[0].ver = 3; + msc->audio_support[0].hr = 1; msc->audio_length = 1; break; case 5: /* FR1 and HR1 */ - msc->audio_support[0]->ver = 1; - msc->audio_support[0]->hr = 0; - msc->audio_support[1]->ver = 1; - msc->audio_support[1]->hr = 1; + msc->audio_support[0].ver = 1; + msc->audio_support[0].hr = 0; + msc->audio_support[1].ver = 1; + msc->audio_support[1].hr = 1; msc->audio_length = 2; break; case 6: /* FR1, FR2 and HR1 */ - msc->audio_support[0]->ver = 1; - msc->audio_support[0]->hr = 0; - msc->audio_support[1]->ver = 2; - msc->audio_support[1]->hr = 0; - msc->audio_support[2]->ver = 1; - msc->audio_support[2]->hr = 1; + msc->audio_support[0].ver = 1; + msc->audio_support[0].hr = 0; + msc->audio_support[1].ver = 2; + msc->audio_support[1].hr = 0; + msc->audio_support[2].ver = 1; + msc->audio_support[2].hr = 1; msc->audio_length = 3; break; case 7: /* FR1, FR3 and HR3 */ - msc->audio_support[0]->ver = 1; - msc->audio_support[0]->hr = 0; - msc->audio_support[1]->ver = 3; - msc->audio_support[1]->hr = 0; - msc->audio_support[2]->ver = 3; - msc->audio_support[2]->hr = 1; + msc->audio_support[0].ver = 1; + msc->audio_support[0].hr = 0; + msc->audio_support[1].ver = 3; + msc->audio_support[1].hr = 0; + msc->audio_support[2].ver = 3; + msc->audio_support[2].hr = 1; msc->audio_length = 3; break; case 8: /* FR1, FR2, FR3, HR1 and HR3 */ - msc->audio_support[0]->ver = 1; - msc->audio_support[0]->hr = 0; - msc->audio_support[1]->ver = 2; - msc->audio_support[1]->hr = 0; - msc->audio_support[2]->ver = 3; - msc->audio_support[2]->hr = 0; - msc->audio_support[3]->ver = 1; - msc->audio_support[3]->hr = 1; - msc->audio_support[4]->ver = 3; - msc->audio_support[4]->hr = 1; + msc->audio_support[0].ver = 1; + msc->audio_support[0].hr = 0; + msc->audio_support[1].ver = 2; + msc->audio_support[1].hr = 0; + msc->audio_support[2].ver = 3; + msc->audio_support[2].hr = 0; + msc->audio_support[3].ver = 1; + msc->audio_support[3].hr = 1; + msc->audio_support[4].ver = 3; + msc->audio_support[4].hr = 1; msc->audio_length = 5; break; } @@ -394,10 +375,10 @@ printf(" * BSS: audio support settings (%u items):\n", msc->audio_length); for (i = 0; i < msc->audio_length; i++) - if (msc->audio_support[i]->hr) - printf(" audio_support[%u]=HR%u\n", i, msc->audio_support[i]->ver); + if (msc->audio_support[i].hr) + printf(" audio_support[%u]=HR%u\n", i, msc->audio_support[i].ver); else - printf(" audio_support[%u]=FR%u\n", i, msc->audio_support[i]->ver); + printf(" audio_support[%u]=FR%u\n", i, msc->audio_support[i].ver); printf(" * BTS: audio support settings:\n"); printf(" (GSM-FR implicitly supported)\n"); @@ -426,8 +407,6 @@ printf("============== test_one_to_one ==============\n\n"); - init_msc_config(&msc_local); - for (i = 0; i < N_CONFIG_VARIANTS; i++) { make_msc_config(&msc_local, i); make_scl_config(&scl_ms, i); @@ -436,8 +415,6 @@ rc = test_match_codec_pref(&ct_msc, &scl_ms, &msc_local, &bts_local); OSMO_ASSERT(rc == 0); } - - free_msc_config(&msc_local); } /* Network supports all combinations, MS varies */ @@ -452,8 +429,6 @@ printf("============== test_ms ==============\n\n"); - init_msc_config(&msc_local); - make_msc_config(&msc_local, 8); make_ct_config(&ct_msc, 8); make_bts_config(&bts_local, 8); @@ -462,8 +437,6 @@ rc = test_match_codec_pref(&ct_msc, &scl_ms, &msc_local, &bts_local); OSMO_ASSERT(rc == 0); } - - free_msc_config(&msc_local); } /* BSS and MS support all combinations, MSC varies */ @@ -478,8 +451,6 @@ printf("============== test_ct ==============\n\n"); - init_msc_config(&msc_local); - make_msc_config(&msc_local, 8); make_scl_config(&scl_ms, 8); make_bts_config(&bts_local, 8); @@ -488,8 +459,6 @@ rc = test_match_codec_pref(&ct_msc, &scl_ms, &msc_local, &bts_local); OSMO_ASSERT(rc == 0); } - - free_msc_config(&msc_local); } /* MSC and MS support all combinations, BSS varies */ @@ -504,8 +473,6 @@ printf("============== test_msc ==============\n\n"); - init_msc_config(&msc_local); - make_ct_config(&ct_msc, 8); make_scl_config(&scl_ms, 8); make_bts_config(&bts_local, 8); @@ -514,8 +481,6 @@ rc = test_match_codec_pref(&ct_msc, &scl_ms, &msc_local, &bts_local); OSMO_ASSERT(rc == 0); } - - free_msc_config(&msc_local); } /* Some mixed configurations that are supposed to work */ @@ -529,8 +494,6 @@ printf("============== test_selected_working ==============\n\n"); - init_msc_config(&msc_local); - make_scl_config(&scl_ms, 6); make_ct_config(&ct_msc, 5); make_msc_config(&msc_local, 7); @@ -572,8 +535,6 @@ make_bts_config(&bts_local, 1); rc = test_match_codec_pref(&ct_msc, &scl_ms, &msc_local, &bts_local); OSMO_ASSERT(rc == 0); - - free_msc_config(&msc_local); } /* Some mixed configurations that can not work */ @@ -587,8 +548,6 @@ printf("============== test_selected_non_working ==============\n\n"); - init_msc_config(&msc_local); - make_scl_config(&scl_ms, 1); make_ct_config(&ct_msc, 5); make_msc_config(&msc_local, 7); @@ -630,8 +589,6 @@ make_bts_config(&bts_local, 7); rc = test_match_codec_pref(&ct_msc, &scl_ms, &msc_local, &bts_local); OSMO_ASSERT(rc == -1); - - free_msc_config(&msc_local); } /* Try execute bss_supp_codec_list(), display input and output parameters */ @@ -644,10 +601,10 @@ printf(" * BSS: audio support settings (%u items):\n", msc->audio_length); for (i = 0; i < msc->audio_length; i++) - if (msc->audio_support[i]->hr) - printf(" audio_support[%u]=HR%u\n", i, msc->audio_support[i]->ver); + if (msc->audio_support[i].hr) + printf(" audio_support[%u]=HR%u\n", i, msc->audio_support[i].ver); else - printf(" audio_support[%u]=FR%u\n", i, msc->audio_support[i]->ver); + printf(" audio_support[%u]=FR%u\n", i, msc->audio_support[i].ver); printf(" * BTS: audio support settings:\n"); printf(" (GSM-FR implicitly supported)\n"); @@ -660,7 +617,7 @@ printf(" * result: speech codec list (%u items):\n", scl.len); for (i = 0; i < scl.len; i++) { printf(" codec[%u]->type=%s", i, gsm0808_speech_codec_type_name(scl.codec[i].type)); - if (msc->audio_support[i]->ver == 3) + if (msc->audio_support[i].ver == 3) printf(" S15-S0=%04x", scl.codec[i].cfg); printf("\n"); } @@ -676,8 +633,6 @@ uint8_t k; printf("============== test_gen_bss_supp_codec_list_cfgs ==============\n\n"); - init_msc_config(&msc_local); - for (i = 0; i < N_CONFIG_VARIANTS; i++) { for (k = 0; k < N_CONFIG_VARIANTS; k++) { make_msc_config(&msc_local, i); @@ -686,8 +641,6 @@ test_gen_bss_supported_codec_list(&msc_local, &bts_local); } } - - free_msc_config(&msc_local); } static const struct log_info_cat log_categories[] = { diff --git a/tests/msc.vty b/tests/msc.vty index 56a3fe2..af4c33e 100644 --- a/tests/msc.vty +++ b/tests/msc.vty @@ -114,3 +114,6 @@ codec-list fr1 fr2 fr3 fr4 ... OsmoBSC(config-msc)# # TODO: should fr4 thru fr7 be rejected + +OsmoBSC(config-msc)# codec-list fr1 fr1 fr1 fr1 fr1 fr1 fr1 fr1 fr1 fr1 fr1 fr1 fr1 fr1 fr1 fr1 fr1 +Too many items in 'msc' / 'codec-list': 17. There can be at most 16 entries. -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/31609 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: I625cedc4bb040d649fd6e1794ba468f4c6ad6adc Gerrit-Change-Number: 31609 Gerrit-PatchSet: 4 Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de> Gerrit-CC: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
[S] Change in osmo-bsc[master]: ensure correct phys_chan_config doc string count on VTY
by neels 04 Mar '23

04 Mar '23
neels has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/31645 ) Change subject: ensure correct phys_chan_config doc string count on VTY ...................................................................... ensure correct phys_chan_config doc string count on VTY Add a static assert, and comments indicating the importance of the two value_string arrays defining pchans on the VTY matching up. Change-Id: I8118bec35400f7f00ca9ae43b603059ed701fa25 --- M src/osmo-bsc/gsm_data.c 1 file changed, 18 insertions(+), 1 deletion(-) Approvals: laforge: Looks good to me, but someone else must approve neels: Looks good to me, approved pespin: Looks good to me, but someone else must approve Jenkins Builder: Verified diff --git a/src/osmo-bsc/gsm_data.c b/src/osmo-bsc/gsm_data.c index a682a32..427aad5 100644 --- a/src/osmo-bsc/gsm_data.c +++ b/src/osmo-bsc/gsm_data.c @@ -189,6 +189,7 @@ { GSM_PCHAN_CCCH_SDCCH4_CBCH, "CCCH+SDCCH4+CBCH" }, { GSM_PCHAN_SDCCH8_SACCH8C_CBCH, "SDCCH8+CBCH" }, { GSM_PCHAN_OSMO_DYN, "TCH/F_TCH/H_SDCCH8_PDCH" }, + /* When adding items here, you must also add matching items to gsm_pchant_descs[]! */ { 0, NULL } }; @@ -208,7 +209,9 @@ { 0, NULL } }; -const struct value_string gsm_pchant_descs[13] = { +/* VTY command descriptions. These have to be in the same order as gsm_pchant_names[], so that the automatic VTY command + * composition in bts_trx_vty_init() works out. */ +const struct value_string gsm_pchant_descs[] = { { GSM_PCHAN_NONE, "Physical Channel not configured" }, { GSM_PCHAN_CCCH, "FCCH + SCH + BCCH + CCCH (Comb. IV)" }, { GSM_PCHAN_CCCH_SDCCH4, @@ -225,6 +228,8 @@ { 0, NULL } }; +osmo_static_assert(ARRAY_SIZE(gsm_pchant_names) == ARRAY_SIZE(gsm_pchant_descs), _pchan_vty_docs); + const char *gsm_pchan_name(enum gsm_phys_chan_config c) { return get_value_string(gsm_pchant_names, c); -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/31645 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: I8118bec35400f7f00ca9ae43b603059ed701fa25 Gerrit-Change-Number: 31645 Gerrit-PatchSet: 2 Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
[M] Change in osmo-bsc[master]: VTY,CTRL: add pchan dynamic/{osmocom,ipaccess}
by neels 04 Mar '23

04 Mar '23
neels has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/31615 ) Change subject: VTY,CTRL: add pchan dynamic/{osmocom,ipaccess} ...................................................................... VTY,CTRL: add pchan dynamic/{osmocom,ipaccess} We already use "OSMO_DYN" as C name for "fully dynamic" timeslot config, when working with osmo-bsc.cfg I dearly miss this short name, it is a pain / has become ridiculous to write 'tch/f_tch/h_sdcch8_pdch'. Introduce 'dynamic/osmocom' and 'dynamic/ipaccess' as default names for our dynamic timeslots on VTY and CTRL. The old 'tch/f_tch/h_sdcch8_pdch' and 'tch/f_pdch' are still supported. Change-Id: I37719edd867c777d1ce944b8e2f1efffac38f00e --- M TODO-RELEASE M doc/examples/osmo-bsc/osmo-bsc-4trx.cfg M doc/manuals/chapters/bts.adoc M doc/manuals/chapters/interf_meas.adoc M src/osmo-bsc/bts.c M src/osmo-bsc/gsm_data.c M tests/ctrl_test_runner.py M tests/timeslot.vty 8 files changed, 100 insertions(+), 63 deletions(-) Approvals: laforge: Looks good to me, but someone else must approve neels: Looks good to me, approved pespin: Looks good to me, but someone else must approve Jenkins Builder: Verified diff --git a/TODO-RELEASE b/TODO-RELEASE index d0852fc..6f680a6 100644 --- a/TODO-RELEASE +++ b/TODO-RELEASE @@ -7,3 +7,5 @@ # If any interfaces have been added since the last public release: c:r:a + 1. # If any interfaces have been removed or changed since the last public release: c:r:0. #library what description / commit summary line + osmo-bsc VTY Timeslot phys_chan_config will now write back with new dynamic timeslot names: 'DYNAMIC/OSMOCOM' instead of 'TCH/F_TCH/H_SDCCH8_PDCH' and 'DYNAMIC/IPACCESS' instead of 'TCH/F_PDCH' + osmo-bsc CTRL CTRL commands like 'bts.N.channel-load' will now respond with new dynamic timeslot names: 'DYNAMIC/OSMOCOM' instead of 'TCH/F_TCH/H_SDCCH8_PDCH' and 'DYNAMIC/IPACCESS' instead of 'TCH/F_PDCH' diff --git a/doc/examples/osmo-bsc/osmo-bsc-4trx.cfg b/doc/examples/osmo-bsc/osmo-bsc-4trx.cfg index dbebdb2..786813a 100644 --- a/doc/examples/osmo-bsc/osmo-bsc-4trx.cfg +++ b/doc/examples/osmo-bsc/osmo-bsc-4trx.cfg @@ -46,22 +46,22 @@ phys_chan_config SDCCH8+CBCH hopping enabled 0 timeslot 2 - phys_chan_config TCH/F_TCH/H_SDCCH8_PDCH + phys_chan_config DYNAMIC/OSMOCOM hopping enabled 0 timeslot 3 - phys_chan_config TCH/F_TCH/H_SDCCH8_PDCH + phys_chan_config DYNAMIC/OSMOCOM hopping enabled 0 timeslot 4 - phys_chan_config TCH/F_TCH/H_SDCCH8_PDCH + phys_chan_config DYNAMIC/OSMOCOM hopping enabled 0 timeslot 5 - phys_chan_config TCH/F_TCH/H_SDCCH8_PDCH + phys_chan_config DYNAMIC/OSMOCOM hopping enabled 0 timeslot 6 - phys_chan_config TCH/F_TCH/H_SDCCH8_PDCH + phys_chan_config DYNAMIC/OSMOCOM hopping enabled 0 timeslot 7 - phys_chan_config TCH/F_TCH/H_SDCCH8_PDCH + phys_chan_config DYNAMIC/OSMOCOM hopping enabled 0 trx 1 rf_locked 0 @@ -71,28 +71,28 @@ max_power_red 20 rsl e1 tei 1 timeslot 0 - phys_chan_config TCH/F_TCH/H_SDCCH8_PDCH + phys_chan_config DYNAMIC/OSMOCOM hopping enabled 0 timeslot 1 - phys_chan_config TCH/F_TCH/H_SDCCH8_PDCH + phys_chan_config DYNAMIC/OSMOCOM hopping enabled 0 timeslot 2 - phys_chan_config TCH/F_TCH/H_SDCCH8_PDCH + phys_chan_config DYNAMIC/OSMOCOM hopping enabled 0 timeslot 3 - phys_chan_config TCH/F_TCH/H_SDCCH8_PDCH + phys_chan_config DYNAMIC/OSMOCOM hopping enabled 0 timeslot 4 - phys_chan_config TCH/F_TCH/H_SDCCH8_PDCH + phys_chan_config DYNAMIC/OSMOCOM hopping enabled 0 timeslot 5 - phys_chan_config TCH/F_TCH/H_SDCCH8_PDCH + phys_chan_config DYNAMIC/OSMOCOM hopping enabled 0 timeslot 6 - phys_chan_config TCH/F_TCH/H_SDCCH8_PDCH + phys_chan_config DYNAMIC/OSMOCOM hopping enabled 0 timeslot 7 - phys_chan_config TCH/F_TCH/H_SDCCH8_PDCH + phys_chan_config DYNAMIC/OSMOCOM hopping enabled 0 trx 2 rf_locked 0 @@ -102,28 +102,28 @@ max_power_red 20 rsl e1 tei 2 timeslot 0 - phys_chan_config TCH/F_TCH/H_SDCCH8_PDCH + phys_chan_config DYNAMIC/OSMOCOM hopping enabled 0 timeslot 1 - phys_chan_config TCH/F_TCH/H_SDCCH8_PDCH + phys_chan_config DYNAMIC/OSMOCOM hopping enabled 0 timeslot 2 - phys_chan_config TCH/F_TCH/H_SDCCH8_PDCH + phys_chan_config DYNAMIC/OSMOCOM hopping enabled 0 timeslot 3 - phys_chan_config TCH/F_TCH/H_SDCCH8_PDCH + phys_chan_config DYNAMIC/OSMOCOM hopping enabled 0 timeslot 4 - phys_chan_config TCH/F_TCH/H_SDCCH8_PDCH + phys_chan_config DYNAMIC/OSMOCOM hopping enabled 0 timeslot 5 - phys_chan_config TCH/F_TCH/H_SDCCH8_PDCH + phys_chan_config DYNAMIC/OSMOCOM hopping enabled 0 timeslot 6 - phys_chan_config TCH/F_TCH/H_SDCCH8_PDCH + phys_chan_config DYNAMIC/OSMOCOM hopping enabled 0 timeslot 7 - phys_chan_config TCH/F_TCH/H_SDCCH8_PDCH + phys_chan_config DYNAMIC/OSMOCOM hopping enabled 0 trx 3 rf_locked 0 @@ -133,28 +133,28 @@ max_power_red 20 rsl e1 tei 3 timeslot 0 - phys_chan_config TCH/F_TCH/H_SDCCH8_PDCH + phys_chan_config DYNAMIC/OSMOCOM hopping enabled 0 timeslot 1 - phys_chan_config TCH/F_TCH/H_SDCCH8_PDCH + phys_chan_config DYNAMIC/OSMOCOM hopping enabled 0 timeslot 2 - phys_chan_config TCH/F_TCH/H_SDCCH8_PDCH + phys_chan_config DYNAMIC/OSMOCOM hopping enabled 0 timeslot 3 - phys_chan_config TCH/F_TCH/H_SDCCH8_PDCH + phys_chan_config DYNAMIC/OSMOCOM hopping enabled 0 timeslot 4 - phys_chan_config TCH/F_TCH/H_SDCCH8_PDCH + phys_chan_config DYNAMIC/OSMOCOM hopping enabled 0 timeslot 5 - phys_chan_config TCH/F_TCH/H_SDCCH8_PDCH + phys_chan_config DYNAMIC/OSMOCOM hopping enabled 0 timeslot 6 - phys_chan_config TCH/F_TCH/H_SDCCH8_PDCH + phys_chan_config DYNAMIC/OSMOCOM hopping enabled 0 timeslot 7 - phys_chan_config TCH/F_TCH/H_SDCCH8_PDCH + phys_chan_config DYNAMIC/OSMOCOM hopping enabled 0 msc 0 allow-emergency allow diff --git a/doc/manuals/chapters/bts.adoc b/doc/manuals/chapters/bts.adoc index 177d1c5..d119acc 100644 --- a/doc/manuals/chapters/bts.adoc +++ b/doc/manuals/chapters/bts.adoc @@ -296,7 +296,7 @@ .Dynamic timeslot support by various BTS models [cols="50%,25%,25%"] |=== -| |`TCH/F_TCH/H_SDCCH8_PDCH` |`TCH/F_PDCH` +| |`DYNAMIC/OSMOCOM` |`DYNAMIC/IPACCESS` |ip.access nanoBTS |- |supported |Ericsson RBS |supported |- |sysmoBTS using _osmo-bts-sysmo_ |supported |supported @@ -311,11 +311,13 @@ NOTE: Same as for dedicated PDCH timeslots, you need to enable GPRS and operate a PCU, SGSN and GGSN to provide the actual data service. -==== Osmocom Style Dynamic Timeslots (TCH/F_TCH/H_SDCCH8_PDCH) +==== Osmocom Style Dynamic Timeslots (DYNAMIC/OSMOCOM) -Timeslots of the `TCH/F_TCH/H_SDCCH8_PDCH` type dynamically switch between TCH/F, +`DYNAMIC/OSMOCOM` is an alias for `TCH/F_TCH/H_SDCCH8_PDCH`. + +Timeslots of the `DYNAMIC/OSMOCOM` type dynamically switch between TCH/F, TCH/H, SDCCH8 and PDCH, depending on the channel kind requested by the MSC. The RSL -messaging for `TCH/F_TCH/H_SDCCH8_PDCH` timeslots is compatible with Ericsson RBS. +messaging for these timeslots is compatible with Ericsson RBS. BTS models supporting this timeslot kind are shown in <<dyn_ts_compat>>. @@ -334,10 +336,12 @@ In OsmoNITB, disabling TCH/F on Osmocom dynamic timeslots is the default. In OsmoBSC, the default is to allow both. -==== ip.access Style Dynamic Timeslots (TCH/F_PDCH) +==== ip.access Style Dynamic Timeslots (DYNAMIC/IPACCESS) -Timeslots of the `TCH/F_PDCH` type dynamically switch between TCH/F and PDCH. -The RSL messaging for `TCH/F_PDCH` timeslots is compatible with ip.access +`DYNAMIC/IPACCESS` is an alias for `TCH/F_PDCH`. + +Timeslots of the `DYNAMIC/IPACCESS` type dynamically switch between TCH/F and PDCH. +The RSL messaging for `DYNAMIC/IPACCESS` timeslots is compatible with ip.access nanoBTS. BTS models supporting this timeslot kind are shown in <<dyn_ts_compat>>. @@ -350,7 +354,7 @@ ==== Dynamic Timeslot Configuration Examples -This is an extract of an `osmo-bsc`` config file. A timeslot configuration with +This is an extract of an `osmo-bsc` config file. A timeslot configuration with five Osmocom style dynamic timeslots and one dedicated PDCH may look like this: ---- @@ -362,20 +366,20 @@ timeslot 1 phys_chan_config SDCCH8 timeslot 2 - phys_chan_config TCH/F_TCH/H_SDCCH8_PDCH + phys_chan_config DYNAMIC/OSMOCOM timeslot 3 - phys_chan_config TCH/F_TCH/H_SDCCH8_PDCH + phys_chan_config DYNAMIC/OSMOCOM timeslot 4 - phys_chan_config TCH/F_TCH/H_SDCCH8_PDCH + phys_chan_config DYNAMIC/OSMOCOM timeslot 5 - phys_chan_config TCH/F_TCH/H_SDCCH8_PDCH + phys_chan_config DYNAMIC/OSMOCOM timeslot 6 - phys_chan_config TCH/F_TCH/H_SDCCH8_PDCH + phys_chan_config DYNAMIC/OSMOCOM timeslot 7 phys_chan_config PDCH ---- -With the ip.access nanoBTS, only `TCH/F_PDCH` dynamic timeslots are supported, +With the ip.access nanoBTS, only `DYNAMIC/IPACCESS` dynamic timeslots are supported, and hence a nanoBTS configuration may look like this: ---- @@ -387,15 +391,15 @@ timeslot 1 phys_chan_config SDCCH8 timeslot 2 - phys_chan_config TCH/F_PDCH + phys_chan_config DYNAMIC/IPACCESS timeslot 3 - phys_chan_config TCH/F_PDCH + phys_chan_config DYNAMIC/IPACCESS timeslot 4 - phys_chan_config TCH/F_PDCH + phys_chan_config DYNAMIC/IPACCESS timeslot 5 - phys_chan_config TCH/F_PDCH + phys_chan_config DYNAMIC/IPACCESS timeslot 6 - phys_chan_config TCH/F_PDCH + phys_chan_config DYNAMIC/IPACCESS timeslot 7 phys_chan_config PDCH ---- diff --git a/doc/manuals/chapters/interf_meas.adoc b/doc/manuals/chapters/interf_meas.adoc index 518a6e5..47c524f 100644 --- a/doc/manuals/chapters/interf_meas.adoc +++ b/doc/manuals/chapters/interf_meas.adoc @@ -63,7 +63,7 @@ NOTE: Currently osmo-bsc makes no use of PDCH interference reports, neither they get forwarded to the BSC co-located PCU over the PCUIF. -For dynamic timeslots (`TCH/F_TCH/H_SDCCH/8_PDCH` and `TCH/F_PDCH`), the +For dynamic timeslots (`DYNAMIC/OSMOCOM` and `DYNAMIC/IPACCESS`), the following expectations apply: * when in TCH/F mode: no interference reports, because the only sub-channel is active; diff --git a/src/osmo-bsc/bts.c b/src/osmo-bsc/bts.c index ab3e6a0..80332eb 100644 --- a/src/osmo-bsc/bts.c +++ b/src/osmo-bsc/bts.c @@ -1633,11 +1633,11 @@ "", 60, 0 }, [BTS_STAT_CHAN_TCH_F_PDCH_USED] = \ { "chan_tch_f_pdch:used", - "Number of TCH/F_PDCH channels used", + "Number of DYNAMIC/IPACCESS channels used", "", 60, 0 }, [BTS_STAT_CHAN_TCH_F_PDCH_TOTAL] = \ { "chan_tch_f_pdch:total", - "Number of TCH/F_PDCH channels total", + "Number of DYNAMIC/IPACCESS channels total", "", 60, 0 }, [BTS_STAT_CHAN_CCCH_SDCCH4_CBCH_USED] = \ { "chan_ccch_sdcch4_cbch:used", @@ -1657,11 +1657,11 @@ "", 60, 0 }, [BTS_STAT_CHAN_OSMO_DYN_USED] = \ { "chan_osmo_dyn:used", - "Number of TCH/F_TCH/H_SDCCH8_PDCH channels used", + "Number of DYNAMIC/OSMOCOM channels used", "", 60, 0 }, [BTS_STAT_CHAN_OSMO_DYN_TOTAL] = \ { "chan_osmo_dyn:total", - "Number of TCH/F_TCH/H_SDCCH8_PDCH channels total", + "Number of DYNAMIC/OSMOCOM channels total", "", 60, 0 }, [BTS_STAT_T3122] = \ { "T3122", diff --git a/src/osmo-bsc/gsm_data.c b/src/osmo-bsc/gsm_data.c index 427aad5..afedb22 100644 --- a/src/osmo-bsc/gsm_data.c +++ b/src/osmo-bsc/gsm_data.c @@ -184,10 +184,14 @@ { GSM_PCHAN_TCH_H, "TCH/H" }, { GSM_PCHAN_SDCCH8_SACCH8C, "SDCCH8" }, { GSM_PCHAN_PDCH, "PDCH" }, - { GSM_PCHAN_TCH_F_PDCH, "TCH/F_PDCH" }, + { GSM_PCHAN_TCH_F_PDCH, "DYNAMIC/IPACCESS" }, { GSM_PCHAN_UNKNOWN, "UNKNOWN" }, { GSM_PCHAN_CCCH_SDCCH4_CBCH, "CCCH+SDCCH4+CBCH" }, { GSM_PCHAN_SDCCH8_SACCH8C_CBCH, "SDCCH8+CBCH" }, + { GSM_PCHAN_OSMO_DYN, "DYNAMIC/OSMOCOM" }, + /* make get_string_value() return GSM_PCHAN_TCH_F_PDCH for both "DYNAMIC/IPACCESS" and "TCH/F_PDCH" */ + { GSM_PCHAN_TCH_F_PDCH, "TCH/F_PDCH" }, + /* make get_string_value() return GSM_PCHAN_OSMO_DYN for both "DYNAMIC/OSMOCOM" and "TCH/F_TCH/H_SDCCH8_PDCH" */ { GSM_PCHAN_OSMO_DYN, "TCH/F_TCH/H_SDCCH8_PDCH" }, /* When adding items here, you must also add matching items to gsm_pchant_descs[]! */ { 0, NULL } @@ -220,11 +224,19 @@ { GSM_PCHAN_TCH_H, "2 TCH/H + 2 FACCH/H + 2 SACCH (Comb. II)" }, { GSM_PCHAN_SDCCH8_SACCH8C, "8 SDCCH + 4 SACCH (Comb. VII)" }, { GSM_PCHAN_PDCH, "Packet Data Channel for GPRS/EDGE" }, - { GSM_PCHAN_TCH_F_PDCH, "Dynamic TCH/F or GPRS PDCH" }, + { GSM_PCHAN_TCH_F_PDCH, "Dynamic TCH/F or GPRS PDCH" + " (dynamic/ipaccess is an alias for tch/f_pdch)" }, { GSM_PCHAN_UNKNOWN, "Unknown / Unsupported channel combination" }, { GSM_PCHAN_CCCH_SDCCH4_CBCH, "FCCH + SCH + BCCH + CCCH + CBCH + 3 SDCCH + 2 SACCH (Comb. V)" }, { GSM_PCHAN_SDCCH8_SACCH8C_CBCH, "7 SDCCH + 4 SACCH + CBCH (Comb. VII)" }, - { GSM_PCHAN_OSMO_DYN, "Dynamic TCH/F or TCH/H or SDCCH/8 or GPRS PDCH" }, + { GSM_PCHAN_OSMO_DYN, "Dynamic TCH/F or TCH/H or SDCCH/8 or GPRS PDCH" + " (dynamic/osmocom is an alias for tch/f_tch/h_sdcch8_pdch)" }, + /* These duplicate entries are needed to provide a description for both the DYNAMIC/... aliases and their + * explicit versions 'TCH/F_PDCH' / 'TCH/F_TCH/H_SDCCH8_PDCH', see bts_trx_vty_init() */ + { GSM_PCHAN_TCH_F_PDCH, "Dynamic TCH/F or GPRS PDCH" + " (dynamic/ipaccess is an alias for tch/f_pdch)" }, + { GSM_PCHAN_OSMO_DYN, "Dynamic TCH/F or TCH/H or SDCCH/8 or GPRS PDCH" + " (dynamic/osmocom is an alias for tch/f_tch/h_sdcch8_pdch)" }, { 0, NULL } }; diff --git a/tests/ctrl_test_runner.py b/tests/ctrl_test_runner.py index 587f9e2..e889992 100755 --- a/tests/ctrl_test_runner.py +++ b/tests/ctrl_test_runner.py @@ -233,8 +233,8 @@ self.assertEqual(r['mtype'], 'GET_REPLY') self.assertEqual(r['value'], 'CCCH+SDCCH4,0,0 TCH/F,0,0 TCH/H,0,0 SDCCH8,0,0' - + ' TCH/F_PDCH,0,0 CCCH+SDCCH4+CBCH,0,0' - + ' SDCCH8+CBCH,0,0 TCH/F_TCH/H_SDCCH8_PDCH,0,0') + + ' DYNAMIC/IPACCESS,0,0 CCCH+SDCCH4+CBCH,0,0' + + ' SDCCH8+CBCH,0,0 DYNAMIC/OSMOCOM,0,0') def testBtsOmlConnectionState(self): """Check OML state. It will not be connected""" diff --git a/tests/timeslot.vty b/tests/timeslot.vty index 0a2f01c..8d0c70b 100644 --- a/tests/timeslot.vty +++ b/tests/timeslot.vty @@ -7,7 +7,7 @@ OsmoBSC(config-net-bts-trx-ts)# list ... - phys_chan_config (none|ccch|ccch+sdcch4|tch/f|tch/h|sdcch8|pdch|tch/f_pdch|unknown|ccch+sdcch4+cbch|sdcch8+cbch|tch/f_tch/h_sdcch8_pdch) + phys_chan_config (none|ccch|ccch+sdcch4|tch/f|tch/h|sdcch8|pdch|dynamic/ipaccess|unknown|ccch+sdcch4+cbch|sdcch8+cbch|dynamic/osmocom|tch/f_pdch|tch/f_tch/h_sdcch8_pdch) training_sequence_code <0-7> hopping enabled (0|1) hopping sequence-number <0-63> @@ -28,11 +28,13 @@ tch/h 2 TCH/H + 2 FACCH/H + 2 SACCH (Comb. II) sdcch8 8 SDCCH + 4 SACCH (Comb. VII) pdch Packet Data Channel for GPRS/EDGE - tch/f_pdch Dynamic TCH/F or GPRS PDCH + dynamic/ipaccess Dynamic TCH/F or GPRS PDCH (dynamic/ipaccess is an alias for tch/f_pdch) unknown Unknown / Unsupported channel combination ccch+sdcch4+cbch FCCH + SCH + BCCH + CCCH + CBCH + 3 SDCCH + 2 SACCH (Comb. V) sdcch8+cbch 7 SDCCH + 4 SACCH + CBCH (Comb. VII) - tch/f_tch/h_sdcch8_pdch Dynamic TCH/F or TCH/H or SDCCH/8 or GPRS PDCH + dynamic/osmocom Dynamic TCH/F or TCH/H or SDCCH/8 or GPRS PDCH (dynamic/osmocom is an alias for tch/f_tch/h_sdcch8_pdch) + tch/f_pdch Dynamic TCH/F or GPRS PDCH (dynamic/ipaccess is an alias for tch/f_pdch) + tch/f_tch/h_sdcch8_pdch Dynamic TCH/F or TCH/H or SDCCH/8 or GPRS PDCH (dynamic/osmocom is an alias for tch/f_tch/h_sdcch8_pdch) OsmoBSC(config-net-bts-trx-ts)# phys_chan_config none OsmoBSC(config-net-bts-trx-ts)# show running-config @@ -67,5 +69,5 @@ trx 0 ... timeslot 0 - phys_chan_config TCH/F_TCH/H_SDCCH8_PDCH + phys_chan_config DYNAMIC/OSMOCOM ... -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/31615 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: I37719edd867c777d1ce944b8e2f1efffac38f00e Gerrit-Change-Number: 31615 Gerrit-PatchSet: 8 Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
[M] Change in osmo-bsc[master]: simplify storage of bsc_msc_data->audio_support
by neels 04 Mar '23

04 Mar '23
Attention is currently required from: pespin, fixeria. neels has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/31609 ) Change subject: simplify storage of bsc_msc_data->audio_support ...................................................................... Patch Set 3: Code-Review+2 (1 comment) Patchset: PS3: there's an early +1 from fixeria and another from laforge, that makes +2 -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/31609 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: I625cedc4bb040d649fd6e1794ba468f4c6ad6adc Gerrit-Change-Number: 31609 Gerrit-PatchSet: 3 Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de> Gerrit-CC: pespin <pespin(a)sysmocom.de> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Comment-Date: Sat, 04 Mar 2023 22:43:35 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
[L] Change in libosmocore[master]: fix gsm0808_sc_cfg <-> gsm48_mr_cfg conversion
by neels 04 Mar '23

04 Mar '23
Attention is currently required from: pespin, fixeria, dexter. neels has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/29475 ) Change subject: fix gsm0808_sc_cfg <-> gsm48_mr_cfg conversion ...................................................................... Patch Set 4: (1 comment) Patchset: PS4: one reason to hold this back is that with this patch, we have deprecation warnings in the osmo-bsc compilation (which annoy e.g. in vim :clist). so maybe best to merge only when osmo-bsc behavior is also fixed -- this affects osmo-bsc.cfg behavior, documentation etc, so not sure when i'll get to submit such, first have other patch series that are more urgent to receive care and merge -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/29475 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I900fda192742fa8f6dd54e9131ef1704b14cc41a Gerrit-Change-Number: 29475 Gerrit-PatchSet: 4 Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-CC: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Attention: dexter <pmaier(a)sysmocom.de> Gerrit-Comment-Date: Sat, 04 Mar 2023 22:42:04 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Gerrit-MessageType: comment
1 0
0 0
[L] Change in libosmocore[master]: fix gsm0808_sc_cfg <-> gsm48_mr_cfg conversion
by neels 04 Mar '23

04 Mar '23
Attention is currently required from: pespin, fixeria, dexter. neels has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/29475 ) Change subject: fix gsm0808_sc_cfg <-> gsm48_mr_cfg conversion ...................................................................... Patch Set 4: Code-Review+2 (2 comments) Patchset: PS4: combine votes File include/osmocom/gsm/protocol/gsm_04_08.h: https://gerrit.osmocom.org/c/libosmocore/+/29475/comment/8f3ba34e_aa82c21b PS2, Line 627: return ((uint8_t *)cfg)[1]; > You don't really need to name the union itself, it can be anonymous (just like structures). […] ah i wasn't aware of anonymous structs ... but i think it is easiest to keep the public struct unchanged -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/29475 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I900fda192742fa8f6dd54e9131ef1704b14cc41a Gerrit-Change-Number: 29475 Gerrit-PatchSet: 4 Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-CC: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Attention: dexter <pmaier(a)sysmocom.de> Gerrit-Comment-Date: Sat, 04 Mar 2023 22:39:00 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes Comment-In-Reply-To: neels <nhofmeyr(a)sysmocom.de> Comment-In-Reply-To: fixeria <vyanitskiy(a)sysmocom.de> Comment-In-Reply-To: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: comment
1 0
0 0
[M] Change in osmo-bsc[master]: drop gsm_pchan_ids, use sanitized FSM ids instead
by neels 04 Mar '23

04 Mar '23
neels has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/31633 ) Change subject: drop gsm_pchan_ids, use sanitized FSM ids instead ...................................................................... Patch Set 8: Code-Review+2 (1 comment) Patchset: PS8: combine votes -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/31633 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: Ib85b7aa4ea882ae37919dd3ea0c033e949c083e5 Gerrit-Change-Number: 31633 Gerrit-PatchSet: 8 Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Sat, 04 Mar 2023 22:35:00 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
[S] Change in osmo-bsc[master]: tweak gsm_pchan_ids[]: DYNAMIC/{OSMOCOM,IPACCESS}
by neels 04 Mar '23

04 Mar '23
neels has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/31632 ) Change subject: tweak gsm_pchan_ids[]: DYNAMIC/{OSMOCOM,IPACCESS} ...................................................................... Patch Set 8: Code-Review+2 (1 comment) Patchset: PS8: combine votes -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/31632 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: I4a540744cced466f0ca4fc605db4d0ec14ee8e87 Gerrit-Change-Number: 31632 Gerrit-PatchSet: 8 Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Sat, 04 Mar 2023 22:34:49 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 313
  • 314
  • 315
  • 316
  • 317
  • 318
  • 319
  • ...
  • 365
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.