Hello Jenkins Builder,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/osmocom-bb/+/34514?usp=email
to look at the new patch set (#2).
The following approvals got outdated and were removed:
Verified+1 by Jenkins Builder
Change subject: modem: grr: implement RACH.req retransmission
......................................................................
modem: grr: implement RACH.req retransmission
Sometimes sending one Access Burst is not enough, so we need to repeat
sending it a few more more times changing the 3 LSBs randomly. This
is what we already do in the mobile app, but not in the modem app.
* Rename GRR_EV_RACH_{REQ,CNF} to GRR_EV_CHAN_ACCESS_{REQ,CNF}.
* Rename VTY command 'grr tx-chan-req' to 'grr start-chan-access'.
* Add an intermediate state GRR_ST_PACKET_ACCESS.
** The GRR_EV_CHAN_ACCESS_REQ transitions to this state.
** One RACH.req gets transmitted when entering this state.
** The GRR_EV_CHAN_ACCESS_CNF confirms transmission of a RACH.req.
** Upon the timeout (300 ms) expiry, a loop state transition happens.
** After 3 loop-transitions, transition to GRR_ST_PACKET_NOT_READY.
Change-Id: Iab6d9147f6e0aeb99239affacf318a3897fd6ffe
Related: libosmo-gprs.git If0de3ed86b1e2897d70183f3b0f4fbfd7d2bda80
Related: OS#5500, OS#6131
---
M src/host/layer23/include/osmocom/bb/modem/grr.h
M src/host/layer23/src/modem/grr.c
M src/host/layer23/src/modem/rlcmac.c
M src/host/layer23/src/modem/vty.c
4 files changed, 189 insertions(+), 78 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/14/34514/2
--
To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/34514?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-Change-Id: Iab6d9147f6e0aeb99239affacf318a3897fd6ffe
Gerrit-Change-Number: 34514
Gerrit-PatchSet: 2
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-MessageType: newpatchset
Attention is currently required from: fixeria.
Hello Jenkins Builder,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/libosmo-gprs/+/34512?usp=email
to look at the new patch set (#2).
The following approvals got outdated and were removed:
Verified-1 by Jenkins Builder
Change subject: rlcmac: deal with RACH retransmissions (drop rach_req_ra)
......................................................................
rlcmac: deal with RACH retransmissions (drop rach_req_ra)
The RA value does change during RACH retransmissions, so we cannot
expect a specific value in gprs_rlcmac_handle_ccch_imm_ass_ul_tbf()
anymore. Offload checking it to the lower layers.
* Rename submit_rach_req() to submit_packet_access_req().
* Get rid of gen_chan_req(), indicate only the access cause.
Ideally, we should also rename the OSMO_GPRS_RLCMAC_L1CTL_RACH
to something like OSMO_GPRS_RLCMAC_L1CTL_PKT_CHAN_ACCESS, but
let's better do this separately.
Change-Id: If0de3ed86b1e2897d70183f3b0f4fbfd7d2bda80
Related: osmocom-bb.git Iab6d9147f6e0aeb99239affacf318a3897fd6ffe
Related: OS#5500, OS#6131
---
M include/osmocom/gprs/rlcmac/tbf_ul_ass_fsm.h
M src/rlcmac/rlcmac.c
M src/rlcmac/tbf_ul_ass_fsm.c
M tests/rlcmac/rlcmac_prim_test.err
4 files changed, 57 insertions(+), 40 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmo-gprs refs/changes/12/34512/2
--
To view, visit https://gerrit.osmocom.org/c/libosmo-gprs/+/34512?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmo-gprs
Gerrit-Branch: master
Gerrit-Change-Id: If0de3ed86b1e2897d70183f3b0f4fbfd7d2bda80
Gerrit-Change-Number: 34512
Gerrit-PatchSet: 2
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-MessageType: newpatchset
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bsc/+/34511?usp=email )
Change subject: sccplite: Support multiple MGW in MGW pool
......................................................................
sccplite: Support multiple MGW in MGW pool
Before this patch, the MGW was selected at startup, and the MGCP data
was always forwarded to that same MGW.
If several MGW were configured in the MGW pool, then osmo-bsc would
select any of those from the pool, and start configured the BTS-side
connection on an endpoint in that MGW. However, when the MSC submitted
the MGCP encapsulated in IPA to the BSC, the BSC would always forward
the MGCP message to that same MGW selected at startup.
As a result, multiple MGWs configured with osmo-bsc using SCCPlite was
broken.
This commit fixes support for multiple MGWs by looking up the already
selected MGW (to setup the BTS-side conn on the endpoint), based on the
CIC (MGCP Endpoint) which was provided by the MSC upon AssignReq.
Related: OS#6189
Depends: libosmocore.git Change-Id Iee361d740845257fa62c9093e30e8079fa933827
Depends: osmo-mgw.git Change-Id I18d7bdf650c0ec87ae16ed4944aed9f495400137
Change-Id: Ia106a21b7692eb5b2ac3b5ac2b358bedbc3b9da6
---
M TODO-RELEASE
M src/osmo-bsc/osmo_bsc_mgcp.c
M src/osmo-bsc/osmo_bsc_msc.c
3 files changed, 144 insertions(+), 19 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/11/34511/1
diff --git a/TODO-RELEASE b/TODO-RELEASE
index d0852fc..7a7ec22 100644
--- a/TODO-RELEASE
+++ b/TODO-RELEASE
@@ -7,3 +7,4 @@
# 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
+libosmocore > 1.9.0 working (compiling) OSMO_SOCKADDR_STR_FMT_ARGS_NOT_NULL
diff --git a/src/osmo-bsc/osmo_bsc_mgcp.c b/src/osmo-bsc/osmo_bsc_mgcp.c
index 1b8e089..de11f44 100644
--- a/src/osmo-bsc/osmo_bsc_mgcp.c
+++ b/src/osmo-bsc/osmo_bsc_mgcp.c
@@ -2,6 +2,7 @@
* SCCPlite MGCP handling
*
* (C) 2018 by Harald Welte <laforge(a)gnumonks.org>
+ * (C) 2023 by sysmocom s.f.m.c. GmbH <info(a)sysmocom.de>
* All Rights Reserved
*
* This program is free software; you can redistribute it and/or modify
@@ -19,6 +20,15 @@
*
*/
+#include <string.h>
+
+#include <osmocom/core/utils.h>
+#include <osmocom/core/msgb.h>
+#include <osmocom/core/socket.h>
+#include <osmocom/core/sockaddr_str.h>
+#include <osmocom/mgcp_client/mgcp_client_endpoint_fsm.h>
+#include <osmocom/mgcp_client/mgcp_client.h>
+
#include <osmocom/bsc/bsc_msc_data.h>
#include <osmocom/bsc/osmo_bsc.h>
#include <osmocom/bsc/gsm_data.h>
@@ -46,22 +56,121 @@
return osmo_msc_data_find(bsc_gsmnet, msc_nr);
}
+/* negative on error, filled buf size upon success */
+static int parse_local_endpoint_name(char *buf, size_t buf_len, const char *data)
+{
+ char line[1024];
+ char *epstart, *sep;
+ const char *start = data;
+ char *eol = strpbrk(start, "\r\n");
+ if (!eol)
+ return -1;
+
+ if (eol - start > sizeof(line))
+ return -1;
+ memcpy(line, start, eol - start);
+ line[eol - start] = '\0';
+
+ if (!(epstart = strchr(line, ' ')))
+ return -1;
+ epstart++;
+ /* epstart now points to trans */
+
+ if (!(epstart = strchr(epstart, ' ')))
+ return -1;
+ epstart++;
+ /* epstart now points to endpoint */
+ if (!(sep = strchr(epstart, '@')))
+ return -1;
+ if (sep - epstart >= buf_len)
+ return -1;
+
+ *sep = '\0';
+ osmo_strlcpy(buf, epstart, buf_len);
+ return 0;
+}
+
/* We received an IPA-encapsulated MGCP message from a MSC. Transfers msg ownership. */
int bsc_sccplite_rx_mgcp(struct osmo_ss7_asp *asp, struct msgb *msg)
{
struct bsc_msc_data *msc;
+ struct gsm_subscriber_connection *conn;
+ char rcv_ep_local_name[1024];
+ struct osmo_sockaddr_str osa_str = {};
+ struct osmo_sockaddr osa = {};
+ socklen_t dest_len;
+ struct mgcp_client *mgcp_cli = NULL;
int rc;
LOGP(DMSC, LOGL_NOTICE, "%s: Received IPA-encapsulated MGCP: %s\n",
osmo_ss7_asp_get_name(asp), msg->l2h);
- msc = msc_from_asp(asp);
- if (msc) {
- /* we don't have a write queue here as we simply expect the socket buffers
- * to be large enough to deal with whatever small/infrequent MGCP messages */
- rc = send(msc->mgcp_ipa.ofd.fd, msgb_l2(msg), msgb_l2len(msg), 0);
- } else
- rc = 0;
+ msc = msc_from_asp(asp);
+ if (!msc) {
+ rc = 0;
+ goto free_msg_ret;
+ }
+
+ rc = parse_local_endpoint_name(rcv_ep_local_name, sizeof(rcv_ep_local_name), (const char *)msg->l2h);
+ if (rc < 0) {
+ LOGP(DMSC, LOGL_ERROR, "(%s:) Received IPA-encapsulated MGCP: Failed to parse CIC\n",
+ osmo_ss7_asp_get_name(asp));
+ goto free_msg_ret;
+ }
+
+ /* Lookup which conn attached to the MSC holds an MGW endpoint the same
+ * Endpoint Number as the one provided in the MGCP msg we received from
+ * MSC. Sine CIC are unique per MSC, that's the same MGW in the pool
+ * where we have to forward the MGCP message. */
+ llist_for_each_entry(conn, &bsc_gsmnet->subscr_conns, entry) {
+ const char *ep_local_name;
+ if (conn->sccp.msc != msc)
+ continue; /* Only conns belonging to this MSC */
+ if (!conn->user_plane.mgw_endpoint)
+ continue;
+ ep_local_name = osmo_mgcpc_ep_local_name(conn->user_plane.mgw_endpoint);
+ LOGPFSMSL(conn->fi, DMSC, LOGL_NOTICE, "ep_local_name='%s' vs rcv_ep_local_name='%s'\n", ep_local_name, rcv_ep_local_name);
+ if (!ep_local_name)
+ continue;
+ if (strcmp(ep_local_name, rcv_ep_local_name) != 0)
+ continue;
+ mgcp_cli = osmo_mgcpc_ep_client(conn->user_plane.mgw_endpoint);
+ if (!mgcp_cli)
+ continue;
+ break;
+ }
+
+ if (!mgcp_cli) {
+ LOGP(DMSC, LOGL_ERROR, "(%s:) Received IPA-encapsulated MGCP: Failed to find associated MGW\n",
+ osmo_ss7_asp_get_name(asp));
+ rc = 0;
+ goto free_msg_ret;
+ }
+
+ rc = osmo_sockaddr_str_from_str(&osa_str, mgcp_client_remote_addr_str(mgcp_cli),
+ mgcp_client_remote_port(mgcp_cli));
+ if (rc < 0) {
+ LOGP(DMSC, LOGL_ERROR, "(%s:) Received IPA-encapsulated MGCP: Failed to parse MGCP address %s:%u\n",
+ osmo_ss7_asp_get_name(asp), mgcp_client_remote_addr_str(mgcp_cli), mgcp_client_remote_port(mgcp_cli));
+ goto free_msg_ret;
+ }
+
+ LOGP(DMSC, LOGL_NOTICE, "%s: Forwarding IPA-encapsulated MGCP to MGW at " OSMO_SOCKADDR_STR_FMT "\n",
+ osmo_ss7_asp_get_name(asp), OSMO_SOCKADDR_STR_FMT_ARGS_NOT_NULL(&osa_str));
+
+ rc = osmo_sockaddr_str_to_sockaddr(&osa_str, &osa.u.sas);
+ if (rc < 0) {
+ LOGP(DMSC, LOGL_ERROR, "(%s:) Received IPA-encapsulated MGCP: Failed to parse MGCP address " OSMO_SOCKADDR_STR_FMT "\n",
+ osmo_ss7_asp_get_name(asp), OSMO_SOCKADDR_STR_FMT_ARGS_NOT_NULL(&osa_str));
+ goto free_msg_ret;
+ }
+ dest_len = osmo_sockaddr_size(&osa);
+
+ /* we don't have a write queue here as we simply expect the socket buffers
+ * to be large enough to deal with whatever small/infrequent MGCP messages */
+ rc = sendto(msc->mgcp_ipa.ofd.fd, msgb_l2(msg), msgb_l2len(msg), 0, &osa.u.sa, dest_len);
+
+free_msg_ret:
msgb_free(msg);
return rc;
}
diff --git a/src/osmo-bsc/osmo_bsc_msc.c b/src/osmo-bsc/osmo_bsc_msc.c
index dfba2de..2425592 100644
--- a/src/osmo-bsc/osmo_bsc_msc.c
+++ b/src/osmo-bsc/osmo_bsc_msc.c
@@ -376,26 +376,15 @@
int osmo_bsc_msc_init(struct bsc_msc_data *msc)
{
- struct gsm_network *net = msc->network;
- struct mgcp_client *mgcp_cli;
int rc;
/* Everything below refers to SCCP-Lite MSC connections only. */
if (msc_is_aoip(msc))
return 0;
- /* Note: MGW is preselected here at startup, which means currently
- * osmo-bsc configured for SCCPLite doesn't support MGW pools with more
- * than 1 MGW.
- */
- mgcp_cli = mgcp_client_pool_get(net->mgw.mgw_pool);
- OSMO_ASSERT(mgcp_cli);
rc = osmo_sock_init2_ofd(&msc->mgcp_ipa.ofd, AF_UNSPEC, SOCK_DGRAM, IPPROTO_UDP,
msc->mgcp_ipa.local_addr, msc->mgcp_ipa.local_port,
- mgcp_client_remote_addr_str(mgcp_cli),
- mgcp_client_remote_port(mgcp_cli),
- OSMO_SOCK_F_BIND | OSMO_SOCK_F_CONNECT);
- mgcp_client_pool_put(mgcp_cli);
+ NULL, 0, OSMO_SOCK_F_BIND);
if (rc < 0) {
LOGP(DMSC, LOGL_ERROR, "msc %u: Could not create/connect/bind MGCP proxy socket: %d\n",
msc->nr, rc);
--
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/34511?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: Ia106a21b7692eb5b2ac3b5ac2b358bedbc3b9da6
Gerrit-Change-Number: 34511
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: newchange
Attention is currently required from: arehbein.
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/31882?usp=email )
Change subject: Make BSSGP timers configurable
......................................................................
Patch Set 2:
(1 comment)
Patchset:
PS2:
Again, the timers should be per-BTS configurable and probably on a separate tdef group of it own.
--
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/31882?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: Id4779f033b5eb1742462d4efc28a0398645acfe6
Gerrit-Change-Number: 31882
Gerrit-PatchSet: 2
Gerrit-Owner: arehbein <arehbein(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: arehbein <arehbein(a)sysmocom.de>
Gerrit-Comment-Date: Fri, 22 Sep 2023 16:53:17 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
Attention is currently required from: arehbein.
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/31880?usp=email )
Change subject: Make NSE timing data configurable
......................................................................
Patch Set 2:
(5 comments)
Patchset:
PS2:
Again this should be per BTS.
File include/osmocom/bsc/bts.h:
https://gerrit.osmocom.org/c/osmo-bsc/+/31880/comment/81c13d98_bee9d723
PS2, Line 326: #define GSM_BTS_TDEF_ID_TNS_BLOCK_NEG29 (-29)
Better leave some space in the number series so that we can later on add similar timers next to the existing ones.
File src/osmo-bsc/bts_ipaccess_nanobts_omlattr.c:
https://gerrit.osmocom.org/c/osmo-bsc/+/31880/comment/cb9190bc_b2e5811e
PS2, Line 187: struct osmo_tdef *tdefs = bts->network->T_defs;
Again, this needs to be per BTS.
File src/osmo-bsc/bts_vty.c:
https://gerrit.osmocom.org/c/osmo-bsc/+/31880/comment/bf555dbd_2e2108c9
PS2, Line 76: static const int gprs_ns_timer_tdef_data[][2] = {
AFAICT this is only used in cfg_bts_gprs_ns_timer_cmd, so it can be moved there.
https://gerrit.osmocom.org/c/osmo-bsc/+/31880/comment/63253556_aa03e90e
PS2, Line 1627: int idx = get_string_value(gprs_ns_timer_strs, argv[0]);
so you are converting to an index here once, and in line 1637 again. This looks ptoentially wrong. Why isn't this get_string_value providing the interesting idx directly?
--
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/31880?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: Ie46ec5cb7095bc1dfe3effd0e76d6ccfd6bd2f3f
Gerrit-Change-Number: 31880
Gerrit-PatchSet: 2
Gerrit-Owner: arehbein <arehbein(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: arehbein <arehbein(a)sysmocom.de>
Gerrit-Comment-Date: Fri, 22 Sep 2023 16:50:54 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
Attention is currently required from: arehbein.
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/31878?usp=email )
Change subject: Make RLC timing data configurable
......................................................................
Patch Set 2: Code-Review-1
(4 comments)
File include/osmocom/bsc/gsm_data.h:
https://gerrit.osmocom.org/c/osmo-bsc/+/31878/comment/a61bd56e_ec5da31f
PS2, Line 50: #define GSM_N3101_STRICT_LOWER_BOUND 8UL
STRICT_LOWER_BOUND means simply "MIN" ? :D
File src/osmo-bsc/bts_ipaccess_nanobts_omlattr.c:
https://gerrit.osmocom.org/c/osmo-bsc/+/31878/comment/e034c27c_d4b4cc66
PS2, Line 234: struct osmo_tdef *tdefs = bts->network->T_defs;
Nope! this should be per BTS.
File src/osmo-bsc/net_init.c:
https://gerrit.osmocom.org/c/osmo-bsc/+/31878/comment/8374a212_e60bc359
PS2, Line 51: { .T = 3142, .default_val = 20,
I know tons of parameters are already added here, but we should not continue adding BTS-specific parameters here, it just doesn't make sense. Some of them even may not be configurable on other BTS types.
So we really need to add a osmo_tdef group per bts object. You can have a look at asp->cfg.T_defs_lm in libosmo-sccp/src/osmo_ss7_asp.c:673 to find out how to add a T_def instance per object (as opposed to a single structure per process like the gsm_network_T_defs here). Basically:
"""
asp->cfg.T_defs_lm = talloc_memdup(asp, ss7_asp_lm_timer_defaults,
sizeof(ss7_asp_lm_timer_defaults));
osmo_tdefs_reset(asp->cfg.T_defs_lm);
"""
BTW, when doing so, also create different T_Def groups, like done in this same file here (see bsc_tdef_group below).
File tests/nanobts_omlattr/nanobts_omlattr_test.c:
https://gerrit.osmocom.org/c/osmo-bsc/+/31878/comment/3ef734d5_8dabb0d1
PS2, Line 228: 0x02, 0x00, 0x02, 0xa3, 0x00, 0x09,
why is this changing? are you changing the default values?
--
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/31878?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: I2c24110d8c977d6cc74c3c8e77bcc709ad9d2675
Gerrit-Change-Number: 31878
Gerrit-PatchSet: 2
Gerrit-Owner: arehbein <arehbein(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: arehbein <arehbein(a)sysmocom.de>
Gerrit-Comment-Date: Fri, 22 Sep 2023 16:42:33 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment