Attention is currently required from: osmith, neels, laforge, fixeria, dexter.
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/29751 )
Change subject: RFC: Introduce support for MGW-pinning per BTS
......................................................................
Patch Set 1:
(2 comments)
File src/osmo-bsc/bts_vty.c:
https://gerrit.osmocom.org/c/osmo-bsc/+/29751/comment/415cafd1_2229fcb2
PS1, Line 3006: <0-255>
> Looks like there is no way to unpin a BTS from specific MGW from the VTY. […]
Ack
https://gerrit.osmocom.org/c/osmo-bsc/+/29751/comment/fc2c195e_cf3adbf3
PS1, Line 3010: available
> missing \n
Ack
--
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/29751
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: I9a7a5af72795faed0d12d9d73b59951b6a0e9c7d
Gerrit-Change-Number: 29751
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Attention: osmith <osmith(a)sysmocom.de>
Gerrit-Attention: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Attention: dexter <pmaier(a)sysmocom.de>
Gerrit-Comment-Date: Fri, 14 Oct 2022 09:38:58 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-MessageType: comment
Attention is currently required from: osmith, neels, laforge, pespin, dexter.
fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/29751 )
Change subject: RFC: Introduce support for MGW-pinning per BTS
......................................................................
Patch Set 1:
(2 comments)
File src/osmo-bsc/bts_vty.c:
https://gerrit.osmocom.org/c/osmo-bsc/+/29751/comment/7d99b455_10fec82a
PS1, Line 3006: <0-255>
Looks like there is no way to unpin a BTS from specific MGW from the VTY.
I would expect 'no mgw pool-target' or 'mgw pool-target any' to exist for this purpose.
https://gerrit.osmocom.org/c/osmo-bsc/+/29751/comment/771c3ee5_68081fb3
PS1, Line 3010: available
missing \n
--
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/29751
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: I9a7a5af72795faed0d12d9d73b59951b6a0e9c7d
Gerrit-Change-Number: 29751
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Attention: osmith <osmith(a)sysmocom.de>
Gerrit-Attention: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: dexter <pmaier(a)sysmocom.de>
Gerrit-Comment-Date: Fri, 14 Oct 2022 02:05:22 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
Attention is currently required from: msuraev.
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-sgsn/+/29676 )
Change subject: GMM: permit E_GMM_COMMON_PROC_SUCCESS in normal state
......................................................................
Patch Set 4: Code-Review+1
--
To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/29676
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-sgsn
Gerrit-Branch: master
Gerrit-Change-Id: Ia97b50aac6c665812ddca9010de7f97b17b78bd5
Gerrit-Change-Number: 29676
Gerrit-PatchSet: 4
Gerrit-Owner: msuraev <msuraev(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: keith <keith(a)rhizomatica.org>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: msuraev <msuraev(a)sysmocom.de>
Gerrit-Comment-Date: Thu, 13 Oct 2022 21:58:38 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
Attention is currently required from: pespin.
Hello Jenkins Builder, laforge, pespin, keith,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/osmo-sgsn/+/29676
to look at the new patch set (#4).
Change subject: GMM: permit E_GMM_COMMON_PROC_SUCCESS in normal state
......................................................................
GMM: permit E_GMM_COMMON_PROC_SUCCESS in normal state
The FSM might be moved out of ST_GMM_COMMON_PROC_INIT state either
by E_GMM_ATTACH_SUCCESS or by E_GMM_COMMON_PROC_SUCCESS events
which are not mutually exclusive. Hence the later event will arrive when we're already in
the ST_GMM_REGISTERED_NORMAL state.
Let's have both events permitted to keep the logs clean from useless error.
Related: OS#5349
Change-Id: Ia97b50aac6c665812ddca9010de7f97b17b78bd5
---
M src/sgsn/gprs_gmm_fsm.c
1 file changed, 6 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-sgsn refs/changes/76/29676/4
--
To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/29676
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-sgsn
Gerrit-Branch: master
Gerrit-Change-Id: Ia97b50aac6c665812ddca9010de7f97b17b78bd5
Gerrit-Change-Number: 29676
Gerrit-PatchSet: 4
Gerrit-Owner: msuraev <msuraev(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: keith <keith(a)rhizomatica.org>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: newpatchset
Attention is currently required from: pespin.
msuraev has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-sgsn/+/29676 )
Change subject: GMM: permit E_GMM_COMMON_PROC_SUCCESS in normal state
......................................................................
Patch Set 3:
(1 comment)
File src/sgsn/gprs_gmm_fsm.c:
https://gerrit.osmocom.org/c/osmo-sgsn/+/29676/comment/8635759a_5d08f961
PS3, Line 85: E_GMM_ATTACH_SUCCESS instead of E_GMM_COMMON_PROC_SUCCESS than we'll receive the latter here:
> typo: then […]
Done
--
To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/29676
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-sgsn
Gerrit-Branch: master
Gerrit-Change-Id: Ia97b50aac6c665812ddca9010de7f97b17b78bd5
Gerrit-Change-Number: 29676
Gerrit-PatchSet: 3
Gerrit-Owner: msuraev <msuraev(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: keith <keith(a)rhizomatica.org>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Thu, 13 Oct 2022 19:07:29 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: comment
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bsc/+/29751 )
Change subject: RFC: Introduce support for MGW-pinning per BTS
......................................................................
RFC: Introduce support for MGW-pinning per BTS
This feature allows pinning each BTS to a specific MGW from the
configured pool. The pinning can be soft or hard (strict). If strict
pinning is not set, the configured MGW is selected with priority, but
other MGWs can still be selected during each call setup if the
preferred MGW is found not available at that time, hence avoiding denial
of service for the entire BTS if that MGW goes down.
If strict mode is selected, the call will be refused if the configured
preferred MGW is not available at the time the call is set up.
It is useful to use this feature when Osmux is configured between
the BTS and the BSC and an MGW pool is in use. This way the BSC is
capable of grouping all the calls of a BTS towards one MGW, hence taking
advantage of the Osmux trunking optimizations to reduce link data usage
(AMR payload of several concurrent calls ending up sharing the same
underlaying UPD packet).
Furthermore, this allows the operator to intelligently spread load over
the MGW pool in order to avoid ending up with more than 256 concurrent
Osmux circuits on any of the co-located MGWs in the pool (maximum supported
at the moment).
Related: SYS#5987
Change-Id: I9a7a5af72795faed0d12d9d73b59951b6a0e9c7d
---
M include/osmocom/bsc/bts.h
M src/osmo-bsc/bsc_subscr_conn_fsm.c
M src/osmo-bsc/bts.c
M src/osmo-bsc/bts_vty.c
4 files changed, 91 insertions(+), 1 deletion(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/51/29751/1
diff --git a/include/osmocom/bsc/bts.h b/include/osmocom/bsc/bts.h
index b690652..d71d18f 100644
--- a/include/osmocom/bsc/bts.h
+++ b/include/osmocom/bsc/bts.h
@@ -580,6 +580,10 @@
/* exclude the BTS from the global RF Lock handling */
int excl_from_rf_lock;
+ /* MGW specificities for this BTS: */
+ int mgw_pool_target; /* Pin to specific MGW. -1 = wildcard */
+ bool mgw_pool_target_strict; /* Only allow pinned MGW */
+
/* supported codecs beside FR */
struct bts_codec_conf codec;
diff --git a/src/osmo-bsc/bsc_subscr_conn_fsm.c b/src/osmo-bsc/bsc_subscr_conn_fsm.c
index 21988ce..2a4e387 100644
--- a/src/osmo-bsc/bsc_subscr_conn_fsm.c
+++ b/src/osmo-bsc/bsc_subscr_conn_fsm.c
@@ -621,6 +621,62 @@
return true;
}
+static struct mgcp_client *select_mgw(struct gsm_subscriber_connection *conn, struct gsm_lchan *for_lchan)
+{
+ struct mgcp_client_pool_member *mgcp_pmemb;
+ struct mgcp_client *mgcp_client;
+ struct gsm_bts *bts = for_lchan->ts->trx->bts;
+
+ /* If BTS is not pinned to a given MGW, let regular allocation which
+ * spreads load over available MGWs: */
+ if (bts->mgw_pool_target == -1)
+ goto pick_any;
+
+ /* BTS is pinned to an MGW, retrieve pointer to it: */
+ mgcp_pmemb = mgcp_client_pool_find_member_by_nr(conn->network->mgw.mgw_pool, bts->mgw_pool_target);
+ if (!mgcp_pmemb) {
+ if (!bts->mgw_pool_target_strict) {
+ LOGPFSML(conn->fi, LOGL_NOTICE,
+ "mgw pool-target %u not found! selecting another one.\n", bts->mgw_pool_target);
+ goto pick_any;
+ } else {
+ LOGPFSML(conn->fi, LOGL_ERROR, "mgw pool-target %u not found!\n", bts->mgw_pool_target);
+ return NULL;
+ }
+ }
+ if (mgcp_client_pool_member_is_blocked(mgcp_pmemb)) {
+ if (!bts->mgw_pool_target_strict) {
+ LOGPFSML(conn->fi, LOGL_NOTICE,
+ "mgw pool-target %u is administratively blocked! selecting another one.\n",
+ bts->mgw_pool_target);
+ goto pick_any;
+ } else {
+ LOGPFSML(conn->fi, LOGL_ERROR, "mgw pool-target %u is administratively blocked!\n",
+ bts->mgw_pool_target);
+ return NULL;
+ }
+ }
+
+ mgcp_client = mgcp_client_pool_member_get(mgcp_pmemb);
+ if (!mgcp_client) {
+ if (!bts->mgw_pool_target_strict) {
+ LOGPFSML(conn->fi, LOGL_NOTICE,
+ "mgw pool-target %u is not connected! selecting another one.\n",
+ bts->mgw_pool_target);
+ goto pick_any;
+ } else {
+ LOGPFSML(conn->fi, LOGL_ERROR, "mgw pool-target %u is not connected!\n",
+ bts->mgw_pool_target);
+ return NULL;
+ }
+ }
+ return mgcp_client;
+
+pick_any:
+ mgcp_client = mgcp_client_pool_get(conn->network->mgw.mgw_pool);
+ return mgcp_client;
+}
+
/* Make sure a conn->user_plane.mgw_endpoint is allocated with the proper mgw endpoint name. For
* SCCPlite, pass in msc_assigned_cic the CIC received upon BSSMAP Assignment Command or BSSMAP Handover
* Request form the MSC (which is only stored in conn->user_plane after success). Ignored for AoIP. */
@@ -640,7 +696,7 @@
if (gscon_is_sccplite(conn) || gscon_is_aoip(conn)) {
/* Get MGCP client from pool */
- mgcp_client = mgcp_client_pool_get(conn->network->mgw.mgw_pool);
+ mgcp_client = select_mgw(conn, for_lchan);
if (!mgcp_client) {
LOGPFSML(conn->fi, LOGL_ERROR,
"cannot ensure MGW endpoint -- no MGW configured, check configuration!\n");
diff --git a/src/osmo-bsc/bts.c b/src/osmo-bsc/bts.c
index b7d3c3c..8d4b8c8 100644
--- a/src/osmo-bsc/bts.c
+++ b/src/osmo-bsc/bts.c
@@ -331,6 +331,9 @@
INIT_LLIST_HEAD(&bts->oml_fail_rep);
INIT_LLIST_HEAD(&bts->chan_rqd_queue);
+ /* Don't pin the BTS to any MGW by default: */
+ bts->mgw_pool_target = -1;
+
/* Enable all codecs by default. These get reset to a more fine grained selection IF a
* 'codec-support' config appears in the config file (see bsc_vty.c). */
bts->codec = (struct bts_codec_conf){
diff --git a/src/osmo-bsc/bts_vty.c b/src/osmo-bsc/bts_vty.c
index 0e14284..3bb0375 100644
--- a/src/osmo-bsc/bts_vty.c
+++ b/src/osmo-bsc/bts_vty.c
@@ -3000,6 +3000,25 @@
return CMD_WARNING;
}
+DEFUN_USRATTR(cfg_bts_mgw_pool_target,
+ cfg_bts_mgw_pool_target_cmd,
+ X(BSC_VTY_ATTR_NEW_LCHAN),
+ "mgw pool-target <0-255> [strict]",
+ "MGW configuration for this specific BTS\n"
+ "Pin BTS to use a single MGW in the pool\n"
+ "Reference Number of the MGW (in the config) to pin to\n"
+ "Strictly prohibit use of other MGWs if the pinned one is not available")
+{
+ struct gsm_bts *bts = vty->index;
+ int mgw_nr = atoi(argv[0]);
+ bool strict = argc > 1;
+
+ bts->mgw_pool_target = mgw_nr;
+ bts->mgw_pool_target_strict = strict;
+
+ return CMD_SUCCESS;
+}
+
#define TNUM_STR "T-number, optionally preceded by 't' or 'T'\n"
DEFUN_ATTR(cfg_bts_t3113_dynamic, cfg_bts_t3113_dynamic_cmd,
"timer-dynamic TNNNN",
@@ -4552,6 +4571,13 @@
VTY_NEWLINE);
}
+ if (bts->mgw_pool_target > -1) {
+ vty_out(vty, " mgw pool-target %u%s%s",
+ bts->mgw_pool_target,
+ bts->mgw_pool_target_strict ? " strict" : "",
+ VTY_NEWLINE);
+ }
+
config_write_bts_gprs(vty, bts);
if (bts->excl_from_rf_lock)
@@ -4814,6 +4840,7 @@
install_element(BTS_NODE, &cfg_bts_amr_hr_hyst3_cmd);
install_element(BTS_NODE, &cfg_bts_amr_hr_start_mode_cmd);
install_element(BTS_NODE, &cfg_bts_osmux_cmd);
+ install_element(BTS_NODE, &cfg_bts_mgw_pool_target_cmd);
install_element(BTS_NODE, &cfg_bts_pcu_sock_cmd);
install_element(BTS_NODE, &cfg_bts_acc_rotate_cmd);
install_element(BTS_NODE, &cfg_bts_acc_rotate_quantum_cmd);
--
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/29751
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: I9a7a5af72795faed0d12d9d73b59951b6a0e9c7d
Gerrit-Change-Number: 29751
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: newchange
Attention is currently required from: neels, fixeria, msuraev.
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/28997 )
Change subject: Add osmo_sock_get_name_multiaddr_buf()
......................................................................
Patch Set 14:
(1 comment)
Patchset:
PS14:
> It's more consistent with existing multiaddr API: we already have separate functions like osmo_sock_ […]
osmo_sock_init2_multiaddr was needed because the previous API didn't allow for passing such parameters, so it could not be reused.
I don't see why it is the case for this API.
If you reuse the same API the caller, usch as libosmo-netif patch you shared, doesn't need to care and we don't need to update it.
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/28997
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: If76595ebd1cf26ba904887a36c4cc14a1b5c4521
Gerrit-Change-Number: 28997
Gerrit-PatchSet: 14
Gerrit-Owner: msuraev <msuraev(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de>
Gerrit-CC: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Attention: msuraev <msuraev(a)sysmocom.de>
Gerrit-Comment-Date: Thu, 13 Oct 2022 18:34:09 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: pespin <pespin(a)sysmocom.de>
Comment-In-Reply-To: msuraev <msuraev(a)sysmocom.de>
Gerrit-MessageType: comment
Attention is currently required from: msuraev.
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-sgsn/+/29676 )
Change subject: GMM: permit E_GMM_COMMON_PROC_SUCCESS in normal state
......................................................................
Patch Set 3:
(1 comment)
File src/sgsn/gprs_gmm_fsm.c:
https://gerrit.osmocom.org/c/osmo-sgsn/+/29676/comment/378fc193_98b3e767
PS3, Line 85: E_GMM_ATTACH_SUCCESS instead of E_GMM_COMMON_PROC_SUCCESS than we'll receive the latter here:
typo: then
If possible start all comment lines with "*" as seen in previous comments in the same file.
--
To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/29676
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-sgsn
Gerrit-Branch: master
Gerrit-Change-Id: Ia97b50aac6c665812ddca9010de7f97b17b78bd5
Gerrit-Change-Number: 29676
Gerrit-PatchSet: 3
Gerrit-Owner: msuraev <msuraev(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: keith <keith(a)rhizomatica.org>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: msuraev <msuraev(a)sysmocom.de>
Gerrit-Comment-Date: Thu, 13 Oct 2022 18:31:27 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment