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 -----
  • November
  • 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

February 2023

  • 1 participants
  • 2601 discussions
Change in osmo-pcu[master]: pcu_l1_if_phy: flexible phy access
by dexter 15 Feb '23

15 Feb '23
dexter has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-pcu/+/31341 ) Change subject: pcu_l1_if_phy: flexible phy access ...................................................................... pcu_l1_if_phy: flexible phy access At the moment we have three different platform specific PHY interfaces, which can be selected using a compile time option. Since those three all are intended to be used on embedded platforms this works fine. However, in the future we plan to add E1 phy support (PHY/CCU is attached via an E1 line), which shall not be a compiletime distinction. It might be also thinkable that we might even add multiple E1 phys in the future, so multiple phy implementations must be able to co-exist. This patch adds a generic interface that allows for the creation of PHY modules that are able to register themselves so that they can be selected dynamically. The "legacy" PHY implementations are not intended to co-exist next to other PHYs, so it is possible to register them as "solitary" modules (only one at a time, via compiletime option). For the moment only "solitary" modules. The selection mechanism will be introduced with the first resident PHY implementation (Ericsson E1 CCU support) Change-Id: I8692d1bd5d137a17cf596ee2914722f419c9978d Related: OS#5198 --- M src/Makefile.am M src/gprs_pcu.h M src/gprs_rlcmac_sched.cpp M src/osmo-bts-litecell15/lc15_l1_if.c M src/osmo-bts-oc2g/oc2g_l1_if.c M src/osmo-bts-sysmo/sysmo_l1_if.c M src/osmobts_sock.c M src/pcu_l1_if.cpp A src/pcu_l1_if_phy.c M src/pcu_l1_if_phy.h M src/pcu_main.cpp 11 files changed, 231 insertions(+), 58 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/41/31341/1 diff --git a/src/Makefile.am b/src/Makefile.am index e747d74..682c4d9 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -54,6 +54,7 @@ gprs_ms_storage.cpp \ gprs_pcu.c \ pcu_l1_if.cpp \ + pcu_l1_if_phy.c \ pcu_vty.c \ pcu_vty_functions.cpp \ mslot_class.c \ diff --git a/src/gprs_pcu.h b/src/gprs_pcu.h index a9e40ea..da17aae 100644 --- a/src/gprs_pcu.h +++ b/src/gprs_pcu.h @@ -32,6 +32,8 @@ #include "neigh_cache.h" +#include <pcu_l1_if_phy.h> + #define LLC_CODEL_DISABLE 0 #define LLC_CODEL_USE_DEFAULT (-1) @@ -134,6 +136,8 @@ struct si_cache *si_cache; /* ARFC+BSIC -> CGI PS cache */ struct osmo_timer_list update_stats_timer; /* Used to update some time_cc stats periodically */ + + struct l1if_phy phy; }; diff --git a/src/gprs_rlcmac_sched.cpp b/src/gprs_rlcmac_sched.cpp index 314fd58..4d07e06 100644 --- a/src/gprs_rlcmac_sched.cpp +++ b/src/gprs_rlcmac_sched.cpp @@ -487,11 +487,14 @@ const unsigned num_tbfs = pdch->num_tbfs(GPRS_RLCMAC_DL_TBF) + pdch->num_tbfs(GPRS_RLCMAC_UL_TBF); bool skip_idle = (num_tbfs == 0); -#ifdef ENABLE_DIRECT_PHY - /* In DIRECT_PHY mode we want to always submit something to L1 in - * TRX0, since BTS is not preparing dummy bursts on idle TS for us */ - skip_idle = skip_idle && trx != 0; -#endif + + /* Direct PHY access */ + if (the_pcu->phy.l1if_pdch_req) { + /* In DIRECT_PHY mode we want to always submit something to L1 in + * TRX0, since BTS is not preparing dummy bursts on idle TS for us */ + skip_idle = skip_idle && trx != 0; + } + if (!skip_idle && (msg = sched_dummy())) { /* increase counter */ gsmtap_cat = PCU_GSMTAP_C_DL_DUMMY; diff --git a/src/osmo-bts-litecell15/lc15_l1_if.c b/src/osmo-bts-litecell15/lc15_l1_if.c index 053844f..4c91c17 100644 --- a/src/osmo-bts-litecell15/lc15_l1_if.c +++ b/src/osmo-bts-litecell15/lc15_l1_if.c @@ -132,7 +132,7 @@ } /* connect PDTCH */ -int l1if_connect_pdch(void *obj, uint8_t ts) +static int l1if_connect_pdch(void *obj, uint8_t ts) { struct lc15l1_hdl *fl1h = obj; struct msgb *msg = l1p_msgb_alloc(); @@ -323,8 +323,8 @@ } /* send packet data request to L1 */ -int l1if_pdch_req(void *obj, uint8_t ts, int is_ptcch, uint32_t fn, - uint16_t arfcn, uint8_t block_nr, uint8_t *data, uint8_t len) +static int l1if_pdch_req(void *obj, uint8_t ts, int is_ptcch, uint32_t fn, + uint16_t arfcn, uint8_t block_nr, uint8_t *data, uint8_t len) { struct lc15l1_hdl *fl1h = obj; struct msgb *msg; @@ -362,7 +362,7 @@ return 0; } -void *l1if_open_pdch(uint8_t trx_no, uint32_t hlayer1, struct gsmtap_inst *gsmtap) +static void *l1if_open_pdch(uint8_t trx_no, uint32_t hlayer1, struct gsmtap_inst *gsmtap) { struct lc15l1_hdl *fl1h; int rc; @@ -391,7 +391,7 @@ return fl1h; } -int l1if_close_pdch(void *obj) +static int l1if_close_pdch(void *obj) { struct lc15l1_hdl *fl1h = obj; if (fl1h) @@ -399,3 +399,22 @@ talloc_free(fl1h); return 0; } + +static void init_phy(void *ctx) +{ + return; +} + +static void use_phy(struct l1if_phy *phy) +{ + phy->l1if_open_pdch = &l1if_open_pdch; + phy->l1if_connect_pdch = &l1if_connect_pdch; + phy->l1if_pdch_req = &l1if_pdch_req; + phy->l1if_close_pdch = &l1if_close_pdch; +} + +static __attribute__((constructor)) void on_dso_load(void) +{ + static const uint8_t name[] = "LC15BTS"; + pcu_l1if_phy_register(name, &er_ccu_init, &er_ccu_use, true); +} diff --git a/src/osmo-bts-oc2g/oc2g_l1_if.c b/src/osmo-bts-oc2g/oc2g_l1_if.c index 1ea0b26..8d74adc 100644 --- a/src/osmo-bts-oc2g/oc2g_l1_if.c +++ b/src/osmo-bts-oc2g/oc2g_l1_if.c @@ -133,7 +133,7 @@ } /* connect PDTCH */ -int l1if_connect_pdch(void *obj, uint8_t ts) +static int l1if_connect_pdch(void *obj, uint8_t ts) { struct oc2gl1_hdl *fl1h = obj; struct msgb *msg = l1p_msgb_alloc(); @@ -322,8 +322,8 @@ } /* send packet data request to L1 */ -int l1if_pdch_req(void *obj, uint8_t ts, int is_ptcch, uint32_t fn, - uint16_t arfcn, uint8_t block_nr, uint8_t *data, uint8_t len) +static int l1if_pdch_req(void *obj, uint8_t ts, int is_ptcch, uint32_t fn, + uint16_t arfcn, uint8_t block_nr, uint8_t *data, uint8_t len) { struct oc2gl1_hdl *fl1h = obj; struct msgb *msg; @@ -367,7 +367,7 @@ return 0; } -void *l1if_open_pdch(uint8_t trx_no, uint32_t hlayer1, struct gsmtap_inst *gsmtap) +static void *l1if_open_pdch(uint8_t trx_no, uint32_t hlayer1, struct gsmtap_inst *gsmtap) { struct oc2gl1_hdl *fl1h; int rc; @@ -396,7 +396,7 @@ return fl1h; } -int l1if_close_pdch(void *obj) +static int l1if_close_pdch(void *obj) { struct oc2gl1_hdl *fl1h = obj; if (fl1h) @@ -404,3 +404,22 @@ talloc_free(fl1h); return 0; } + +static void init_phy(void *ctx) +{ + return; +} + +static void use_phy(struct l1if_phy *phy) +{ + phy->l1if_open_pdch = &l1if_open_pdch; + phy->l1if_connect_pdch = &l1if_connect_pdch; + phy->l1if_pdch_req = &l1if_pdch_req; + phy->l1if_close_pdch = &l1if_close_pdch; +} + +static __attribute__((constructor)) void on_dso_load(void) +{ + static const uint8_t name[] = "OC2GBTS"; + pcu_l1if_phy_register(name, &er_ccu_init, &er_ccu_use, true); +} diff --git a/src/osmo-bts-sysmo/sysmo_l1_if.c b/src/osmo-bts-sysmo/sysmo_l1_if.c index 31028f5..1172f51 100644 --- a/src/osmo-bts-sysmo/sysmo_l1_if.c +++ b/src/osmo-bts-sysmo/sysmo_l1_if.c @@ -115,7 +115,7 @@ } /* connect PDTCH */ -int l1if_connect_pdch(void *obj, uint8_t ts) +static int l1if_connect_pdch(void *obj, uint8_t ts) { struct femtol1_hdl *fl1h = obj; struct msgb *msg = l1p_msgb_alloc(); @@ -308,8 +308,8 @@ } /* send packet data request to L1 */ -int l1if_pdch_req(void *obj, uint8_t ts, int is_ptcch, uint32_t fn, - uint16_t arfcn, uint8_t block_nr, uint8_t *data, uint8_t len) +static int l1if_pdch_req(void *obj, uint8_t ts, int is_ptcch, uint32_t fn, + uint16_t arfcn, uint8_t block_nr, uint8_t *data, uint8_t len) { struct femtol1_hdl *fl1h = obj; struct msgb *msg; @@ -347,7 +347,7 @@ return 0; } -void *l1if_open_pdch(uint8_t trx_no, uint32_t hlayer1, struct gsmtap_inst *gsmtap) +static void *l1if_open_pdch(uint8_t trx_no, uint32_t hlayer1, struct gsmtap_inst *gsmtap) { struct femtol1_hdl *fl1h; int rc; @@ -373,7 +373,7 @@ return fl1h; } -int l1if_close_pdch(void *obj) +static int l1if_close_pdch(void *obj) { struct femtol1_hdl *fl1h = obj; if (fl1h) @@ -381,3 +381,23 @@ talloc_free(fl1h); return 0; } + +static void init_phy(void *ctx) +{ + return; +} + +static void use_phy(struct l1if_phy *phy) +{ + phy->l1if_open_pdch = &l1if_open_pdch; + phy->l1if_connect_pdch = &l1if_connect_pdch; + phy->l1if_pdch_req = &l1if_pdch_req; + phy->l1if_close_pdch = &l1if_close_pdch; +} + +static __attribute__((constructor)) void on_dso_load(void) +{ + static const uint8_t name[] = "SYSMODSP"; + pcu_l1if_phy_register(name, &er_ccu_init, &er_ccu_use, true); +} + diff --git a/src/osmobts_sock.c b/src/osmobts_sock.c index 282e33f..eb9007b 100644 --- a/src/osmobts_sock.c +++ b/src/osmobts_sock.c @@ -109,12 +109,11 @@ llist_for_each_entry(bts, &the_pcu->bts_list, list) { /* disable all slots, kick all TBFs */ for (trx = 0; trx < 8; trx++) { -#ifdef ENABLE_DIRECT_PHY - if (bts->trx[trx].fl1h) { - l1if_close_pdch(bts->trx[trx].fl1h); + /* Direct PHY access */ + if (the_pcu->phy.l1if_close_pdch && bts->trx[trx].fl1h) { + the_pcu->phy.l1if_close_pdch(bts->trx[trx].fl1h); bts->trx[trx].fl1h = NULL; } -#endif for (ts = 0; ts < 8; ts++) if (pdch_is_enabled(&bts->trx[trx].pdch[ts])) pdch_disable(&bts->trx[trx].pdch[ts]); diff --git a/src/pcu_l1_if.cpp b/src/pcu_l1_if.cpp index 62f02d9..86c4fb4 100644 --- a/src/pcu_l1_if.cpp +++ b/src/pcu_l1_if.cpp @@ -211,16 +211,16 @@ void pcu_l1if_tx_pdtch(msgb *msg, struct gprs_rlcmac_bts *bts, uint8_t trx, uint8_t ts, uint16_t arfcn, uint32_t fn, uint8_t block_nr) { -#ifdef ENABLE_DIRECT_PHY - if (bts->trx[trx].fl1h) { + /* Direct PHY access */ + if (the_pcu->phy.l1if_pdch_req && bts->trx[trx].fl1h) { if (!msg) /* Simply skip sending idle frames to L1 */ return; - l1if_pdch_req(bts->trx[trx].fl1h, ts, 0, fn, arfcn, block_nr, + the_pcu->phy.l1if_pdch_req(bts->trx[trx].fl1h, ts, 0, fn, arfcn, block_nr, msg->data, msg->len); msgb_free(msg); return; } -#endif + if (!msg) { pcu_tx_data_req(bts, trx, ts, PCU_IF_SAPI_PDTCH, arfcn, fn, block_nr, NULL, 0); @@ -239,14 +239,15 @@ { if (data_len && the_pcu->gsmtap_categ_mask & (1 << PCU_GSMTAP_C_DL_PTCCH)) gsmtap_send(the_pcu->gsmtap, arfcn, ts, GSMTAP_CHANNEL_PTCCH, 0, fn, 0, 0, data, data_len); -#ifdef ENABLE_DIRECT_PHY - if (bts->trx[trx].fl1h) { + + /* Direct PHY access */ + if (the_pcu->phy.l1if_pdch_req && bts->trx[trx].fl1h) { if (!data_len) /* Simply skip sending idle frames to L1 */ return; - l1if_pdch_req(bts->trx[trx].fl1h, ts, 1, fn, arfcn, block_nr, data, data_len); + the_pcu->phy.l1if_pdch_req(bts->trx[trx].fl1h, ts, 1, fn, arfcn, block_nr, data, data_len); return; } -#endif + if (!data_len) { pcu_tx_data_req(bts, trx, ts, PCU_IF_SAPI_PTCCH, arfcn, fn, block_nr, NULL, 0); return; @@ -564,11 +565,13 @@ const unsigned num_tbfs = pdch->num_tbfs(GPRS_RLCMAC_DL_TBF) + pdch->num_tbfs(GPRS_RLCMAC_UL_TBF); bool skip_idle = (num_tbfs == 0); -#ifdef ENABLE_DIRECT_PHY + /* Direct PHY access */ + if (the_pcu->phy.l1if_pdch_req) { /* In DIRECT_PHY mode we want to always submit something to L1 in * TRX0, since BTS is not preparing dummy bursts on idle TS for us: */ skip_idle = skip_idle && trx != 0; -#endif + } + if (skip_idle) { pcu_l1if_tx_ptcch(bts, trx, ts, bts->trx[trx].arfcn, fn, block_nr, NULL, 0); @@ -859,25 +862,26 @@ bts->trx[trx_nr].arfcn = info_ind->trx[trx_nr].arfcn; if ((info_ind->flags & PCU_IF_FLAG_SYSMO) && info_ind->trx[trx_nr].hlayer1) { -#ifdef ENABLE_DIRECT_PHY - LOGP(DL1IF, LOGL_DEBUG, " TRX %d hlayer1=%x\n", trx_nr, - info_ind->trx[trx_nr].hlayer1); + /* Direct PHY access */ + if (the_pcu->phy.l1if_open_pdch) { + LOGP(DL1IF, LOGL_DEBUG, " TRX %d hlayer1=%x\n", trx_nr, + info_ind->trx[trx_nr].hlayer1); if (!bts->trx[trx_nr].fl1h) - bts->trx[trx_nr].fl1h = l1if_open_pdch( + bts->trx[trx_nr].fl1h = the_pcu->phy.l1if_open_pdch( trx_nr, info_ind->trx[trx_nr].hlayer1, the_pcu->gsmtap); - if (!bts->trx[trx_nr].fl1h) { - LOGP(DL1IF, LOGL_FATAL, "Failed to open direct " - "DSP access for PDCH.\n"); + if (!bts->trx[trx_nr].fl1h) { + LOGP(DL1IF, LOGL_FATAL, "Failed to open direct " + "DSP access for PDCH.\n"); + exit(0); + } + } else { + LOGP(DL1IF, LOGL_FATAL, "Compiled without direct DSP " + "access for PDCH, but enabled at " + "BTS. Please deactivate it!\n"); exit(0); } -#else - LOGP(DL1IF, LOGL_FATAL, "Compiled without direct DSP " - "access for PDCH, but enabled at " - "BTS. Please deactivate it!\n"); - exit(0); -#endif } for (ts_nr = 0; ts_nr < ARRAY_SIZE(bts->trx[0].pdch); ts_nr++) { @@ -886,12 +890,8 @@ if ((info_ind->trx[trx_nr].pdch_mask & (1 << ts_nr))) { /* FIXME: activate dynamically at RLCMAC */ if (!pdch->is_enabled()) { -#ifdef ENABLE_DIRECT_PHY - if ((info_ind->flags & - PCU_IF_FLAG_SYSMO)) - l1if_connect_pdch( - bts->trx[trx_nr].fl1h, ts_nr); -#endif + if (the_pcu->phy.l1if_connect_pdch && (info_ind->flags & PCU_IF_FLAG_SYSMO)) + the_pcu->phy.l1if_connect_pdch(bts->trx[trx_nr].fl1h, ts_nr); pcu_tx_act_req(bts, pdch, 1); pdch->enable(); } diff --git a/src/pcu_l1_if_phy.c b/src/pcu_l1_if_phy.c new file mode 100644 index 0000000..21f2598 --- /dev/null +++ b/src/pcu_l1_if_phy.c @@ -0,0 +1,97 @@ +#include <stdint.h> +#include <stdlib.h> +#include <string.h> +#include <inttypes.h> +#include <errno.h> +#include <osmocom/core/application.h> +#include <osmocom/core/linuxlist.h> +#include <osmocom/core/talloc.h> +#include <osmocom/core/logging.h> +#include <pcu_l1_if_phy.h> + +LLIST_HEAD(phy_list); + +struct l1if_phy_entry { + struct llist_head list; + + /* Unique name to identify the phy */ + const uint8_t *name; + + /* Callback function to populate the function pointer in struct l1if_phy */ + void (*use_phy_cb)(struct l1if_phy * phy); + + /* Callback to perform early initialization steps, such as VTY */ + void (*init_phy_cb)(void *ctx); + + /* Flag to mark the phy as "solitary". When the flag is set, the phy will be selected automatically on startup + * by pcu_l1if_phy_init(). It is therefore also not possible to select the PHY later. The setting is intended + * with PHY implementations for embedded platforms, which require a compile time option. + * (e.g. osmo-bts-sysmo). */ + bool solitary; +}; + +/* Register PHY: This function is called by the on_dso_load constructor of the phy specific implementation. It + * registers two callback functions. The init_phy_cb function is executed on startup. It may contain VTY initialzations + * or other code that is required to be executed in the early startup phase before the config file is parsed. The use + * callback must populate the callbacks in struct l1if_phy and may run further initialization code. Each PHY must be + * registered under an unique name string so that the registration entry can be identiefied later. */ +void pcu_l1if_phy_register(const uint8_t *name, void (*init_phy_cb)(void *ctx), + void (*use_phy_cb)(struct l1if_phy * phy), bool solitary) +{ + struct l1if_phy_entry *l1if_phy_entry; + + l1if_phy_entry = talloc_zero(NULL, struct l1if_phy_entry); + l1if_phy_entry->name = name; + l1if_phy_entry->init_phy_cb = init_phy_cb; + l1if_phy_entry->use_phy_cb = use_phy_cb; + l1if_phy_entry->solitary = solitary; + llist_add(&l1if_phy_entry->list, &phy_list); +} + +static phy_show(void) +{ + struct l1if_phy_entry *l1if_phy_entry; + bool first = true; + LOGP(DLGLOBAL, LOGL_NOTICE, "Compiled in PHY support for:"); + + llist_for_each_entry(l1if_phy_entry, &phy_list, list) { + LOGPC(DLGLOBAL, LOGL_NOTICE, "%s%s", first ? " " : " ,", l1if_phy_entry->name); + first = false; + } + LOGPC(DLGLOBAL, LOGL_NOTICE, "\n"); +} + +/* This is executed from pcu_main.cpp in the early startup phase (see also comment above) */ +void pcu_l1if_phy_init(void *ctx, struct l1if_phy *phy) +{ + struct l1if_phy_entry *l1if_phy_entry; + + memset(phy, 0, sizeof(*phy)); + + phy_show(); + llist_for_each_entry(l1if_phy_entry, &phy_list, list) { + l1if_phy_entry->init_phy_cb(ctx); + if (l1if_phy_entry->solitary) { + LOGP(DLGLOBAL, LOGL_ERROR, "Using PHY: %s (solitary)\n", l1if_phy_entry->name); + l1if_phy_entry->use_phy_cb(phy); + } + } +} + +/* Use a specific phy. This will activate a spcified PHY so that it can be used. (see also comment above) */ +int pcu_l1if_phy_use(struct l1if_phy *phy, const uint8_t *name) +{ + struct l1if_phy_entry *l1if_phy_entry; + + llist_for_each_entry(l1if_phy_entry, &phy_list, list) { + if (strcmp(l1if_phy_entry->name, name) == 0) { + LOGP(DLGLOBAL, LOGL_ERROR, "Using PHY: %s\n", l1if_phy_entry->name); + l1if_phy_entry->use_phy_cb(phy); + return 0; + } + } + + LOGP(DLGLOBAL, LOGL_ERROR, "Unknown PHY: %s", name); + memset(phy, 0, sizeof(*phy)); + return -EINVAL; +} diff --git a/src/pcu_l1_if_phy.h b/src/pcu_l1_if_phy.h index f25bf7b..3985386 100644 --- a/src/pcu_l1_if_phy.h +++ b/src/pcu_l1_if_phy.h @@ -2,8 +2,16 @@ #include <stdint.h> -void *l1if_open_pdch(uint8_t trx_no, uint32_t hlayer1, struct gsmtap_inst *gsmtap); -int l1if_connect_pdch(void *obj, uint8_t ts); -int l1if_pdch_req(void *obj, uint8_t ts, int is_ptcch, uint32_t fn, uint16_t arfcn, uint8_t block_nr, uint8_t *data, - uint8_t len); -int l1if_close_pdch(void *obj); +struct gsmtap_inst; +struct l1if_phy { + void *(*l1if_open_pdch)(uint8_t trx_no, uint32_t hlayer1, struct gsmtap_inst * gsmtap); + int (*l1if_connect_pdch)(void *obj, uint8_t ts); + int (*l1if_pdch_req)(void *obj, uint8_t ts, int is_ptcch, uint32_t fn, uint16_t arfcn, uint8_t block_nr, + uint8_t *data, uint8_t len); + int (*l1if_close_pdch)(void *obj); +}; + +void pcu_l1if_phy_register(const uint8_t *name, void (*init_phy_cb)(void *ctx), + void (*use_phy_cb)(struct l1if_phy * phy), bool solitary); +void pcu_l1if_phy_init(void *ctx, struct l1if_phy *phy); +int pcu_l1if_phy_use(struct l1if_phy *phy, const uint8_t *name); diff --git a/src/pcu_main.cpp b/src/pcu_main.cpp index 901ee6c..bfa40dc 100644 --- a/src/pcu_main.cpp +++ b/src/pcu_main.cpp @@ -33,6 +33,7 @@ extern "C" { #include "pcu_vty.h" #include "coding_scheme.h" +#include "pcu_l1_if_phy.h" #include <osmocom/gprs/gprs_bssgp.h> #include <osmocom/gprs/gprs_ns2.h> #include <osmocom/vty/telnet_interface.h> @@ -250,6 +251,8 @@ osmo_cpu_sched_vty_init(tall_pcu_ctx); logging_vty_add_deprecated_subsys(tall_pcu_ctx, "bssgp"); + pcu_l1if_phy_init(tall_pcu_ctx, &the_pcu->phy); + handle_options(argc, argv); if ((!!spoof_mcc) + (!!spoof_mnc) == 1) { fprintf(stderr, "--mcc and --mnc must be specified " -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/31341 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: I8692d1bd5d137a17cf596ee2914722f419c9978d Gerrit-Change-Number: 31341 Gerrit-PatchSet: 1 Gerrit-Owner: dexter <pmaier(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
Change in osmo-bsc[master]: fsms: use configurable timers instead of T23042
by osmith 15 Feb '23

15 Feb '23
Attention is currently required from: neels, laforge, fixeria. osmith has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/30307 ) Change subject: fsms: use configurable timers instead of T23042 ...................................................................... Patch Set 1: (6 comments) Commit Message: https://gerrit.osmocom.org/c/osmo-bsc/+/30307/comment/1156e685_d66e64ce PS1, Line 9: It looks like T23042 was a placeholder for timers to be filled in later, > let me assure you that i invented this number explicitly as a placeholder, please don't even conside […] Done https://gerrit.osmocom.org/c/osmo-bsc/+/30307/comment/2eaca29f_8e587504 PS1, Line 15: Previous timeout for the states was 5s. > ", from using the default of 5 for undefined timers. […] Done https://gerrit.osmocom.org/c/osmo-bsc/+/30307/comment/09504657_187787b0 PS1, Line 20: ll > "immediately" Done https://gerrit.osmocom.org/c/osmo-bsc/+/30307/comment/9da957d7_5a6768ba PS1, Line 28: * Use new X29, 10s (5s from X5 + 5s from X6) > I think the right thing here is to remove this timeout; this needs no timeout at all because we can […] Done in https://gerrit.osmocom.org/c/osmo-bsc/+/31339 https://gerrit.osmocom.org/c/osmo-bsc/+/30307/comment/4a020455_2c8e37e5 PS1, Line 46: * Use new X30, 5s I've added two TTCN-3 tests that let OsmoBSC go into the code paths where 1) the RSL CRCX isn't answered and 2) the MGCP MDCX is not answered. In both cases, the three second timer T3101 for LCHAN_ST_WAIT_RLL_RTP_ESTABLISH caused the handover to fail. 1) https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/31338 2) https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/31336 > Then if I'm correct we should see during that test a log error like "HO_EV_LCHAN_ERROR not permitted" in state HO_ST_WAIT_LCHAN_ESTABLISHED. To my surprise this did not show up. The reason is: .allstate_event_mask = 0 | S(HO_EV_CONN_RELEASING) | S(HO_EV_LCHAN_ERROR) , I've added a separate patch to remove T23042 for HO_ST_WAIT_LCHAN_ESTABLISHED: https://gerrit.osmocom.org/c/osmo-bsc/+/31340 File src/osmo-bsc/net_init.c: https://gerrit.osmocom.org/c/osmo-bsc/+/30307/comment/6a81a359_ef93db4d PS1, Line 77: { .T = -30, .default_val = 5, .desc = "Timeout for establishing new lchan at the end of handover" }, > (if X30 needs to stay, i'd put a desc = "Timeout for establishing MGW endpoint for handover target l […] not needed -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/30307 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: Id0d4d0788f609f3272fc81c80a754383dde25c16 Gerrit-Change-Number: 30307 Gerrit-PatchSet: 1 Gerrit-Owner: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de> Gerrit-CC: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-CC: laforge <laforge(a)osmocom.org> Gerrit-Attention: neels <nhofmeyr(a)sysmocom.de> Gerrit-Attention: laforge <laforge(a)osmocom.org> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Comment-Date: Wed, 15 Feb 2023 15:40:00 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: neels <nhofmeyr(a)sysmocom.de> Comment-In-Reply-To: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-MessageType: comment
1 0
0 0
Change in osmo-bsc[master]: ho: remove timeout for HO_ST_WAIT_LCHAN_ACTIVE
by osmith 15 Feb '23

15 Feb '23
osmith has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bsc/+/31339 ) Change subject: ho: remove timeout for HO_ST_WAIT_LCHAN_ACTIVE ...................................................................... ho: remove timeout for HO_ST_WAIT_LCHAN_ACTIVE Remove placeholder timer T23042. Neels wrote: > I think the right thing here is to remove this timeout; this needs > no timeout at all because we can rely on the lchan_fsm to either > return HO_EV_LCHAN_ACTIVE or HO_EV_LCHAN_ERROR after the usual > timeouts set for lchan activation. IOW since it is internal to > osmo-bsc one of the two events is guaranteed to occur. > > If we superimpose a timer on top of the lchan timeouts, configuring > larger lchan activation timeouts becomes complex, because the user > has to take care to also allow a larger timeout for the same > procedure during HO. Related: OS#5787 Change-Id: Ibf740aaa9bddc2de85cf8087ad90bab47aac12c2 --- M src/osmo-bsc/handover_fsm.c 1 file changed, 0 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/39/31339/1 diff --git a/src/osmo-bsc/handover_fsm.c b/src/osmo-bsc/handover_fsm.c index 0d888e0..fe8adc9 100644 --- a/src/osmo-bsc/handover_fsm.c +++ b/src/osmo-bsc/handover_fsm.c @@ -193,7 +193,6 @@ } static const struct osmo_tdef_state_timeout ho_fsm_timeouts[32] = { - [HO_ST_WAIT_LCHAN_ACTIVE] = { .T = 23042 }, [HO_ST_WAIT_MGW_ENDPOINT_TO_MSC] = { .T = 23042 }, [HO_ST_WAIT_RR_HO_DETECT] = { .T = 23042 }, [HO_ST_WAIT_RR_HO_COMPLETE] = { .T = 23042 }, -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/31339 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: Ibf740aaa9bddc2de85cf8087ad90bab47aac12c2 Gerrit-Change-Number: 31339 Gerrit-PatchSet: 1 Gerrit-Owner: osmith <osmith(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
Change in osmo-bsc[master]: fsms: use configurable timers instead of T23042
by osmith 15 Feb '23

15 Feb '23
Attention is currently required from: laforge, fixeria. Hello Jenkins Builder, neels, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-bsc/+/30307 to look at the new patch set (#2). Change subject: fsms: use configurable timers instead of T23042 ...................................................................... fsms: use configurable timers instead of T23042 T23042 was a placeholder for timers to be filled in later. Replace it with timers that can be configured via VTY. Previous timeout for the states was 5s, from using the default of 5 for undefined timers. * ASSIGNMENT_ST_WAIT_MGW_ENDPOINT_TO_MSC and HO_ST_WAIT_MGW_ENDPOINT_TO_MSC: * Runs gscon_connect_mgw_to_msc() on enter, which waits for one MGCP CRCX or MDCX response (or changes state immediately) * Use existing X9 ("Timeout for availability of MGW endpoint"), 5s, which is already being used by lchan_rtp_fsm for a similar purpose * HO_ST_WAIT_RR_HO_DETECT: * Handover initiation as described in 3GPP TS 04.08 § 3.4.4.1: "The network initiates the handover procedure by sending a HANDOVER COMMAND message to the mobile station on the main DCCH. It then starts timer T3103." * Use existing but unused timer T3103 ("Handover"), 5s * HO_ST_WAIT_RR_HO_COMPLETE: * Handover completion as described in 3GPP TS 04.08 § 3.4.4.3: "When receiving the HANDOVER COMPLETE message, the network stops timer T3103 and releases the old channels." * Continue using T3103 with keep_timer = true Closes: OS#5787 Change-Id: Id0d4d0788f609f3272fc81c80a754383dde25c16 --- M src/osmo-bsc/assignment_fsm.c M src/osmo-bsc/handover_fsm.c 2 files changed, 4 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/07/30307/2 -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/30307 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: Id0d4d0788f609f3272fc81c80a754383dde25c16 Gerrit-Change-Number: 30307 Gerrit-PatchSet: 2 Gerrit-Owner: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de> Gerrit-CC: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-CC: laforge <laforge(a)osmocom.org> Gerrit-Attention: laforge <laforge(a)osmocom.org> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-MessageType: newpatchset
1 0
0 0
Change in osmo-bsc[master]: ho: remove timeout for HO_ST_WAIT_LCHAN_ESTABLISHED
by osmith 15 Feb '23

15 Feb '23
osmith has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bsc/+/31340 ) Change subject: ho: remove timeout for HO_ST_WAIT_LCHAN_ESTABLISHED ...................................................................... ho: remove timeout for HO_ST_WAIT_LCHAN_ESTABLISHED Remove placeholder timer T23042. This handover fsm state waits for both RSL/RR and RTP/MGW to be complete. I've added TTCN-3 tests to ensure that both cases are covered by existing timer T3101 in lchan fsm state LCHAN_ST_WAIT_RLL_RTP_ESTABLISH, which on timeout lets the handover fail. Related: OS#5787 Related: osmo-ttcn3-hacks I30e1811f97406cff6ba794fcd6882e2bb0205087 Related: osmo-ttcn3-hacks I2f79e3ff988a4315fbef3538f02403b818fa7839 Change-Id: I53468766c3c5fad7d7e275c0f20b5c20677fe4e8 --- M src/osmo-bsc/handover_fsm.c 1 file changed, 0 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/40/31340/1 diff --git a/src/osmo-bsc/handover_fsm.c b/src/osmo-bsc/handover_fsm.c index fe8adc9..11a470f 100644 --- a/src/osmo-bsc/handover_fsm.c +++ b/src/osmo-bsc/handover_fsm.c @@ -196,7 +196,6 @@ [HO_ST_WAIT_MGW_ENDPOINT_TO_MSC] = { .T = 23042 }, [HO_ST_WAIT_RR_HO_DETECT] = { .T = 23042 }, [HO_ST_WAIT_RR_HO_COMPLETE] = { .T = 23042 }, - [HO_ST_WAIT_LCHAN_ESTABLISHED] = { .T = 23042 }, [HO_OUT_ST_WAIT_HO_COMMAND] = { .T = 7 }, [HO_OUT_ST_WAIT_CLEAR] = { .T = 8 }, }; -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/31340 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: I53468766c3c5fad7d7e275c0f20b5c20677fe4e8 Gerrit-Change-Number: 31340 Gerrit-PatchSet: 1 Gerrit-Owner: osmith <osmith(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
Change in osmo-ttcn3-hacks[master]: bsc: move as_Media arg fail_on_dlcx to pars
by osmith 15 Feb '23

15 Feb '23
osmith has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/31337 ) Change subject: bsc: move as_Media arg fail_on_dlcx to pars ...................................................................... bsc: move as_Media arg fail_on_dlcx to pars Prepare to use fail_on_dlcx in a new test case. Instead of dragging the parameter through lots of function calls, just add it to pars. Related: OS#5787 Change-Id: I6f0c4ce543724cc6f18bae9fc2b480f5818db8b7 --- M bsc/BSC_Tests.ttcn M bsc/MSC_ConnectionHandler.ttcn 2 files changed, 16 insertions(+), 10 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/37/31337/1 diff --git a/bsc/BSC_Tests.ttcn b/bsc/BSC_Tests.ttcn index 96428ff..352a12e 100644 --- a/bsc/BSC_Tests.ttcn +++ b/bsc/BSC_Tests.ttcn @@ -6878,7 +6878,7 @@ f_create_mgcp_expect(ExpectCriteria:{omit,omit,omit}); f_MscConnHdlr_init(g_pars.media_nr, "127.0.0.2", "127.0.0.3", FR_AMR); - activate(as_Media(fail_on_dlcx := false)); + activate(as_Media()); BSSAP.send(ts_BSSAP_Conn_Req(g_pars.sccp_addr_bsc, g_pars.sccp_addr_msc, f_gen_handover_req())); @@ -6968,7 +6968,7 @@ f_create_mgcp_expect(ExpectCriteria:{omit,omit,omit}); f_MscConnHdlr_init(g_pars.media_nr, "127.0.0.2", "127.0.0.3", FR_AMR); - activate(as_Media(fail_on_dlcx := false)); + activate(as_Media()); BSSAP.send(ts_BSSAP_Conn_Req(g_pars.sccp_addr_bsc, g_pars.sccp_addr_msc, f_gen_handover_req())); @@ -7022,6 +7022,8 @@ var MSC_ConnHdlr vc_conn; var TestHdlrParams pars := f_gen_test_hdlr_pars(); + pars.fail_on_dlcx := false; + f_init(1, true); f_sleep(1.0); @@ -11556,7 +11558,7 @@ /* we should now have a COMPL_L3 at the MSC */ f_create_mgcp_expect(ExpectCriteria:{omit,omit,omit}); - activate(as_Media_mgw(fail_on_dlcx := false)); + activate(as_Media_mgw()); var RslChannelNr chan_nr := { u := { ch0 := RSL_CHAN_NR_Bm_ACCH }, tn := 1 }; f_rslem_register(0, chan_nr); @@ -11604,6 +11606,8 @@ var TestHdlrParams pars := f_gen_test_hdlr_pars(); var MSC_ConnHdlr vc_conn; + pars.fail_on_dlcx := false; + f_init(1, true); f_sleep(1.0); diff --git a/bsc/MSC_ConnectionHandler.ttcn b/bsc/MSC_ConnectionHandler.ttcn index ed9c13b..aa54225 100644 --- a/bsc/MSC_ConnectionHandler.ttcn +++ b/bsc/MSC_ConnectionHandler.ttcn @@ -442,7 +442,7 @@ /* altstep for handling of MGCP media related commands. Activated by as_Media() to test * MGW level media handling */ -altstep as_Media_mgw(boolean norepeat := false, boolean fail_on_dlcx := true) runs on MSC_ConnHdlr { +altstep as_Media_mgw(boolean norepeat := false) runs on MSC_ConnHdlr { var MgcpCommand mgcp_cmd; var template MgcpResponse mgcp_resp; var MGCP_RecvFrom mrf; @@ -496,20 +496,20 @@ } } - [fail_on_dlcx and g_pars.aoip] MGCP.receive(tr_DLCX) { + [g_pars.fail_on_dlcx and g_pars.aoip] MGCP.receive(tr_DLCX) { setverdict(fail, "Unexpected DLCX received"); } - [fail_on_dlcx and not g_pars.aoip] MGCP_MULTI.receive(tr_MGCP_RecvFrom_any(msg_dlcx)) { + [g_pars.fail_on_dlcx and not g_pars.aoip] MGCP_MULTI.receive(tr_MGCP_RecvFrom_any(msg_dlcx)) { setverdict(fail, "Unexpected DLCX received"); } } /* Altsteps for handling of media related commands. Can be activated by a given * test case if it expects to see media related handling (i.e. voice calls) */ -altstep as_Media(boolean fail_on_dlcx := true) runs on MSC_ConnHdlr { +altstep as_Media() runs on MSC_ConnHdlr { [] as_Media_ipacc(); - [] as_Media_mgw(fail_on_dlcx := fail_on_dlcx); + [] as_Media_mgw(); } type port Coord_PT message @@ -759,7 +759,8 @@ boolean expect_ho_fail, boolean expect_ho_fail_lchan_est, boolean inter_bsc_ho_in__ho_req_in_initial_sccp_cr, - boolean ignore_mgw_mdcx + boolean ignore_mgw_mdcx, + boolean fail_on_dlcx }; /* Note: Do not use valueof() to get a value of this template, use @@ -806,7 +807,8 @@ expect_ho_fail := false, expect_ho_fail_lchan_est := false, inter_bsc_ho_in__ho_req_in_initial_sccp_cr := true, - ignore_mgw_mdcx := false + ignore_mgw_mdcx := false, + fail_on_dlcx := true } function f_create_chan_and_exp(template (present) PDU_BSSAP exp_l3_compl := ?) -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/31337 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I6f0c4ce543724cc6f18bae9fc2b480f5818db8b7 Gerrit-Change-Number: 31337 Gerrit-PatchSet: 1 Gerrit-Owner: osmith <osmith(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
Change in osmo-ttcn3-hacks[master]: bsc: TC_ho_in_fail_ipa_crcx_timeout: new test
by osmith 15 Feb '23

15 Feb '23
osmith has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/31338 ) Change subject: bsc: TC_ho_in_fail_ipa_crcx_timeout: new test ...................................................................... bsc: TC_ho_in_fail_ipa_crcx_timeout: new test Verify that OsmoBSC runs into a timeout and aborts the handover if the IPA CRCX is not answered by the BTS. This test ensures it still works after removing a redundant timer, as discussed here: https://gerrit.osmocom.org/c/osmo-bsc/+/30307/1#message-9e02be4de78c03ed25b… Related: OS#5787 Change-Id: I2f79e3ff988a4315fbef3538f02403b818fa7839 --- M bsc/BSC_Tests.ttcn M bsc/MSC_ConnectionHandler.ttcn 2 files changed, 17 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/38/31338/1 diff --git a/bsc/BSC_Tests.ttcn b/bsc/BSC_Tests.ttcn index 352a12e..9a2718a 100644 --- a/bsc/BSC_Tests.ttcn +++ b/bsc/BSC_Tests.ttcn @@ -7053,6 +7053,17 @@ f_shutdown_helper(ho := true); } +testcase TC_ho_in_fail_ipa_crcx_timeout() runs on test_CT { + var TestHdlrParams pars := f_gen_test_hdlr_pars(); + + pars.ignore_ipa_media := true; + pars.expect_ho_fail_lchan_est := true; + pars.fail_on_dlcx := false; + + f_tc_ho_into_this_bsc_main(pars); + f_shutdown_helper(ho := true); +} + /* An incoming inter-BSC HO can either issue the Handover Request message attached to the initial SCCP N-Connect (as in * the other tests we have so far), or the first CR can be "empty" with the BSSAP request following later. Test the * empty N-Connect case. */ @@ -12361,6 +12372,7 @@ execute( TC_ho_in_fail_no_detect() ); execute( TC_ho_in_fail_no_detect2() ); execute( TC_ho_in_fail_mgw_mdcx_timeout() ); + execute( TC_ho_in_fail_ipa_crcx_timeout() ); execute( TC_ho_into_this_bsc_sccp_cr_without_bssap() ); execute( TC_ho_neighbor_config_1() ); diff --git a/bsc/MSC_ConnectionHandler.ttcn b/bsc/MSC_ConnectionHandler.ttcn index aa54225..b3e6af6 100644 --- a/bsc/MSC_ConnectionHandler.ttcn +++ b/bsc/MSC_ConnectionHandler.ttcn @@ -508,7 +508,7 @@ /* Altsteps for handling of media related commands. Can be activated by a given * test case if it expects to see media related handling (i.e. voice calls) */ altstep as_Media() runs on MSC_ConnHdlr { - [] as_Media_ipacc(); + [not g_pars.ignore_ipa_media] as_Media_ipacc(); [] as_Media_mgw(); } @@ -760,7 +760,8 @@ boolean expect_ho_fail_lchan_est, boolean inter_bsc_ho_in__ho_req_in_initial_sccp_cr, boolean ignore_mgw_mdcx, - boolean fail_on_dlcx + boolean fail_on_dlcx, + boolean ignore_ipa_media }; /* Note: Do not use valueof() to get a value of this template, use @@ -808,7 +809,8 @@ expect_ho_fail_lchan_est := false, inter_bsc_ho_in__ho_req_in_initial_sccp_cr := true, ignore_mgw_mdcx := false, - fail_on_dlcx := true + fail_on_dlcx := true, + ignore_ipa_media := false } function f_create_chan_and_exp(template (present) PDU_BSSAP exp_l3_compl := ?) -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/31338 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I2f79e3ff988a4315fbef3538f02403b818fa7839 Gerrit-Change-Number: 31338 Gerrit-PatchSet: 1 Gerrit-Owner: osmith <osmith(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
Change in osmo-ttcn3-hacks[master]: Cosmetic: library/MGCP_CodecPort: remove FIXME
by osmith 15 Feb '23

15 Feb '23
osmith has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/31335 ) Change subject: Cosmetic: library/MGCP_CodecPort: remove FIXME ...................................................................... Cosmetic: library/MGCP_CodecPort: remove FIXME The line below is exactly as it should be according to the FIXME, so remove it. Change-Id: If14438edce4437cd30efc3b2520aa43b90e9e16b --- M library/MGCP_CodecPort.ttcn 1 file changed, 0 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/35/31335/1 diff --git a/library/MGCP_CodecPort.ttcn b/library/MGCP_CodecPort.ttcn index 8614eef..8819fd8 100644 --- a/library/MGCP_CodecPort.ttcn +++ b/library/MGCP_CodecPort.ttcn @@ -74,10 +74,6 @@ pout.remPort := pin.remPort; pout.locName := pin.locName; pout.locPort := pin.locPort; - /* FIXME: This should actually be the below: - pout.msg := dec_MgcpMessage(oct2char(pin.msg)); - see - https://www.eclipse.org/forums/index.php/t/1088893/ - */ pout.msg := dec_MgcpMessage(oct2char(pin.msg)); } with { extension "prototype(fast)" }; -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/31335 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: If14438edce4437cd30efc3b2520aa43b90e9e16b Gerrit-Change-Number: 31335 Gerrit-PatchSet: 1 Gerrit-Owner: osmith <osmith(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
Change in osmo-ttcn3-hacks[master]: bsc: TC_ho_in_fail_mgw_mdcx_timeout: new test
by osmith 15 Feb '23

15 Feb '23
osmith has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/31336 ) Change subject: bsc: TC_ho_in_fail_mgw_mdcx_timeout: new test ...................................................................... bsc: TC_ho_in_fail_mgw_mdcx_timeout: new test Verify that OsmoBSC runs into a timeout and aborts the handover if the MDCX is not answered by the MGW. This test ensures it still works after removing a redundant timer, as discussed here: https://gerrit.osmocom.org/c/osmo-bsc/+/30307/1#message-9e02be4de78c03ed25b… Related: OS#5787 Change-Id: I30e1811f97406cff6ba794fcd6882e2bb0205087 --- M bsc/BSC_Tests.ttcn M bsc/MSC_ConnectionHandler.ttcn 2 files changed, 32 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/36/31336/1 diff --git a/bsc/BSC_Tests.ttcn b/bsc/BSC_Tests.ttcn index 439b234..96428ff 100644 --- a/bsc/BSC_Tests.ttcn +++ b/bsc/BSC_Tests.ttcn @@ -6344,6 +6344,12 @@ } } + if (g_pars.expect_ho_fail_lchan_est) { + BSSAP.receive(tr_BSSMAP_HandoverFailure); + setverdict(pass); + return; + } + /* The RSL Emulation magically accepts the Chan Activ behind the scenes. */ /* we're sure that the channel activation is done now, verify the parameters in it */ @@ -6460,6 +6466,9 @@ f_ho_into_this_bsc(id, oldToNewBSSIEs); if (g_pars.expect_ho_fail) { f_perform_clear_no_lchan(); + } else if (g_pars.expect_ho_fail_lchan_est) { + BSSAP.receive(tr_BSSMAP_ClearRequest); + f_perform_clear_no_lchan(); } else { f_perform_clear(exp_rr_rel_tmpl := exp_rr_rel_tmpl); } @@ -6485,6 +6494,9 @@ if (pars.expect_ho_fail) { f_ctrs_bsc_and_bts_add(0, "handover:failed"); f_ctrs_bsc_and_bts_add(0, "interbsc_ho_in:failed"); + } else if (pars.expect_ho_fail_lchan_est) { + f_ctrs_bsc_and_bts_add(0, "handover:error"); + f_ctrs_bsc_and_bts_add(0, "interbsc_ho_in:error"); } else { f_ctrs_bsc_and_bts_add(0, "handover:completed"); f_ctrs_bsc_and_bts_add(0, "interbsc_ho_in:completed"); @@ -7029,6 +7041,16 @@ f_shutdown_helper(ho := true); } +testcase TC_ho_in_fail_mgw_mdcx_timeout() runs on test_CT { + var TestHdlrParams pars := f_gen_test_hdlr_pars(); + + pars.ignore_mgw_mdcx := true; + pars.expect_ho_fail_lchan_est := true; + + f_tc_ho_into_this_bsc_main(pars); + f_shutdown_helper(ho := true); +} + /* An incoming inter-BSC HO can either issue the Handover Request message attached to the initial SCCP N-Connect (as in * the other tests we have so far), or the first CR can be "empty" with the BSSAP request following later. Test the * empty N-Connect case. */ @@ -12334,6 +12356,7 @@ execute( TC_ho_in_fail_msc_clears_after_ho_detect() ); execute( TC_ho_in_fail_no_detect() ); execute( TC_ho_in_fail_no_detect2() ); + execute( TC_ho_in_fail_mgw_mdcx_timeout() ); execute( TC_ho_into_this_bsc_sccp_cr_without_bssap() ); execute( TC_ho_neighbor_config_1() ); diff --git a/bsc/MSC_ConnectionHandler.ttcn b/bsc/MSC_ConnectionHandler.ttcn index 13fe723..ed9c13b 100644 --- a/bsc/MSC_ConnectionHandler.ttcn +++ b/bsc/MSC_ConnectionHandler.ttcn @@ -476,7 +476,7 @@ } } - [g_pars.aoip] MGCP.receive(tr_MDCX) -> value mgcp_cmd { + [g_pars.aoip and not g_pars.ignore_mgw_mdcx] MGCP.receive(tr_MDCX) -> value mgcp_cmd { mgcp_resp := f_rx_mdcx(mgcp_cmd); MGCP.send(mgcp_resp); if(norepeat == false) { @@ -484,7 +484,8 @@ } } - [not g_pars.aoip] MGCP_MULTI.receive(tr_MGCP_RecvFrom_any(msg_mdcx)) -> value mrf { + [not g_pars.aoip and not g_pars.ignore_mgw_mdcx] + MGCP_MULTI.receive(tr_MGCP_RecvFrom_any(msg_mdcx)) -> value mrf { mgcp_resp := f_rx_mdcx(mrf.msg.command); msg_resp := { response := mgcp_resp @@ -756,7 +757,9 @@ uint3_t expect_tsc optional, BSSMAP_IE_CellIdentifier cell_id_source, boolean expect_ho_fail, - boolean inter_bsc_ho_in__ho_req_in_initial_sccp_cr + boolean expect_ho_fail_lchan_est, + boolean inter_bsc_ho_in__ho_req_in_initial_sccp_cr, + boolean ignore_mgw_mdcx }; /* Note: Do not use valueof() to get a value of this template, use @@ -801,7 +804,9 @@ expect_tsc := omit, cell_id_source := valueof(ts_CellID_LAC_CI(1, 1)), expect_ho_fail := false, - inter_bsc_ho_in__ho_req_in_initial_sccp_cr := true + expect_ho_fail_lchan_est := false, + inter_bsc_ho_in__ho_req_in_initial_sccp_cr := true, + ignore_mgw_mdcx := false } function f_create_chan_and_exp(template (present) PDU_BSSAP exp_l3_compl := ?) -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/31336 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I30e1811f97406cff6ba794fcd6882e2bb0205087 Gerrit-Change-Number: 31336 Gerrit-PatchSet: 1 Gerrit-Owner: osmith <osmith(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
Change in osmo-ttcn3-hacks[master]: Cosmetic: fix various typos
by osmith 15 Feb '23

15 Feb '23
osmith has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/31334 ) Change subject: Cosmetic: fix various typos ...................................................................... Cosmetic: fix various typos Change-Id: Ia6a587d872b410059713f41d09ba082bac835a6b --- M bts/BTS_Tests.ttcn M library/MGCP_Emulation.ttcn M library/S1AP_Emulation.ttcn M library/SGsAP_Emulation.ttcn M library/rua/RUA_Emulation.ttcn 5 files changed, 7 insertions(+), 7 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/34/31334/1 diff --git a/bts/BTS_Tests.ttcn b/bts/BTS_Tests.ttcn index 696a10e..1859eed 100644 --- a/bts/BTS_Tests.ttcn +++ b/bts/BTS_Tests.ttcn @@ -7380,7 +7380,7 @@ /* ... and expect the DISC on the Um side */ alt { [] as_l1_exp_lapdm(tr_LAPDm_DISC(tc.sapi, cr_MT_CMD, true)) { - /* FIXME: send a UA in resposne to the DISC */ + /* FIXME: send a UA in response to the DISC */ } } diff --git a/library/MGCP_Emulation.ttcn b/library/MGCP_Emulation.ttcn index 9a92b9c..53aae1b 100644 --- a/library/MGCP_Emulation.ttcn +++ b/library/MGCP_Emulation.ttcn @@ -293,7 +293,7 @@ msg := { response := resp }; - /* If this is the resposne to a pending CRCX, extract Endpoint and store in table */ + /* If this is the response to a pending CRCX, extract Endpoint and store in table */ if (f_trans_id_was_pending(resp.line.trans_id)) { f_ep_table_add(vc_conn, f_mgcp_ep(msg)); } @@ -304,7 +304,7 @@ /* MGCP from client in Multi Conn mode */ [p.multi_conn_mode] MGCP_CLIENT_MULTI.receive(MGCP_SendTo:?) -> value mst sender vc_conn { - /* If this is the resposne to a pending CRCX, extract Endpoint and store in table */ + /* If this is the response to a pending CRCX, extract Endpoint and store in table */ if (f_trans_id_was_pending(mst.msg.response.line.trans_id)) { f_ep_table_add(vc_conn, f_mgcp_ep(mst.msg)); } @@ -418,7 +418,7 @@ return ret; } -/* Function that can be used as create_cb and will usse the expect table */ +/* Function that can be used as create_cb and will use the expect table */ function ExpectedCreateCallback(MgcpCommand cmd, charstring id) runs on MGCP_Emulation_CT return MGCP_ConnHdlr { var MGCP_ConnHdlr ret := null; diff --git a/library/S1AP_Emulation.ttcn b/library/S1AP_Emulation.ttcn index d09b499..0ecbd99 100644 --- a/library/S1AP_Emulation.ttcn +++ b/library/S1AP_Emulation.ttcn @@ -485,7 +485,7 @@ inout S1APEM_register; } with { extension "internal" }; -/* Function that can be used as create_cb and will usse the expect table */ +/* Function that can be used as create_cb and will use the expect table */ function ExpectedCreateCallback(S1AP_PDU msg, hexstring imsi, charstring id) runs on S1AP_Emulation_CT return S1AP_ConnHdlr { var S1AP_ConnHdlr ret := null; diff --git a/library/SGsAP_Emulation.ttcn b/library/SGsAP_Emulation.ttcn index 6cd1052..b860fe2 100644 --- a/library/SGsAP_Emulation.ttcn +++ b/library/SGsAP_Emulation.ttcn @@ -415,7 +415,7 @@ inout SGsAPEM_register, SGsAPEM_reset_vlr, SGsAPEM_reset_mme; } with { extension "internal" }; -/* Function that can be used as create_cb and will usse the expect table */ +/* Function that can be used as create_cb and will use the expect table */ function ExpectedCreateCallback(PDU_SGsAP msg, hexstring imsi, charstring id) runs on SGsAP_Emulation_CT return SGsAP_ConnHdlr { var SGsAP_ConnHdlr ret := null; diff --git a/library/rua/RUA_Emulation.ttcn b/library/rua/RUA_Emulation.ttcn index 2d6291d..40eb3b7 100644 --- a/library/rua/RUA_Emulation.ttcn +++ b/library/rua/RUA_Emulation.ttcn @@ -365,7 +365,7 @@ T.start; alt { [] RUA.receive(tr_RUA_ConnectionlessTransfer(decmatch tr_RANAP_ResetAck)) { - log("RUA-RANAP: Received RESET-ACK in resposne to RESET, we're reay to go!"); + log("RUA-RANAP: Received RESET-ACK in response to RESET, we're reay to go!"); } [] as_reset_ack(); [] RUA.receive { repeat; } -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/31334 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: Ia6a587d872b410059713f41d09ba082bac835a6b Gerrit-Change-Number: 31334 Gerrit-PatchSet: 1 Gerrit-Owner: osmith <osmith(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 137
  • 138
  • 139
  • 140
  • 141
  • 142
  • 143
  • ...
  • 261
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.