Attention is currently required from: fixeria.
falconia has posted comments on this change by fixeria. ( https://gerrit.osmocom.org/c/osmo-bts/+/38723?usp=email )
Change subject: osmo-bts-trx: fix scheduling of DL FACCH/H for TCH/H4.8 and TCH/H2.4
......................................................................
Patch Set 1: Code-Review+1
--
To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/38723?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: Idb753fa5c87dc79e9ad19e550680de6f462eed69
Gerrit-Change-Number: 38723
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: falconia <falcon(a)freecalypso.org>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Comment-Date: Fri, 08 Nov 2024 21:50:01 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmocom-bb/+/38724?usp=email )
Change subject: trxcon/l1sched: fix decoding of DL FACCH/H for TCH/H4.8 and TCH/H2.4
......................................................................
trxcon/l1sched: fix decoding of DL FACCH/H for TCH/H4.8 and TCH/H2.4
The mapping sched_tchh_dl_csd_map[] is valid for DL TCH/H4.8 and
TCH/H2.4, but not for DL FACCH/H. We need to use a separate
lookup table sched_tchh_dl_facch_map[] for DL FACCH/H.
Change-Id: I17df806185dc620999c4c2b9ed83a18cc8b2e0bf
Fixes: a93785bf4 ("trxcon/l1sched: implement CSD scheduling support")
Related: OS#4396, OS#6618
---
M src/host/trxcon/src/sched_lchan_tchh.c
1 file changed, 8 insertions(+), 4 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/24/38724/1
diff --git a/src/host/trxcon/src/sched_lchan_tchh.c b/src/host/trxcon/src/sched_lchan_tchh.c
index d684976..ecd9847 100644
--- a/src/host/trxcon/src/sched_lchan_tchh.c
+++ b/src/host/trxcon/src/sched_lchan_tchh.c
@@ -310,8 +310,6 @@
/* Data (CSD) is interleaved over 22 bursts */
if ((*mask & 0x3fffff) != 0x3fffff)
return 0;
- if (!sched_tchh_dl_csd_map[bi->fn % 26])
- return 0; /* CSD: skip decoding attempt, need 2 more bursts */
break;
default:
/* Speech is interleaved over 4 bursts */
@@ -372,14 +370,20 @@
/* CSD (TCH/H4.8): 6.0 kbit/s radio interface rate */
case GSM48_CMODE_DATA_6k0:
/* FACCH/H does not steal TCH/H4.8 frames, but only disturbs some bits */
- decode_hr_facch(lchan);
+ if (sched_tchh_dl_facch_map[bi->fn % 26])
+ decode_hr_facch(lchan);
+ if (!sched_tchh_dl_csd_map[bi->fn % 26])
+ return 0;
rc = gsm0503_tch_hr48_decode(&tch_data[0], BUFPOS(bursts_p, 0),
&n_errors, &n_bits_total);
break;
/* CSD (TCH/H2.4): 3.6 kbit/s radio interface rate */
case GSM48_CMODE_DATA_3k6:
/* FACCH/H does not steal TCH/H2.4 frames, but only disturbs some bits */
- decode_hr_facch(lchan);
+ if (sched_tchh_dl_facch_map[bi->fn % 26])
+ decode_hr_facch(lchan);
+ if (!sched_tchh_dl_csd_map[bi->fn % 26])
+ return 0;
rc = gsm0503_tch_hr24_decode(&tch_data[0], BUFPOS(bursts_p, 0),
&n_errors, &n_bits_total);
break;
--
To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/38724?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-Change-Id: I17df806185dc620999c4c2b9ed83a18cc8b2e0bf
Gerrit-Change-Number: 38724
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bts/+/38723?usp=email )
Change subject: osmo-bts-trx: fix scheduling of DL FACCH/H for TCH/H4.8 and TCH/H2.4
......................................................................
osmo-bts-trx: fix scheduling of DL FACCH/H for TCH/H4.8 and TCH/H2.4
The mapping sched_tchh_dl_csd_map[] is valid for DL TCH/H4.8 and
TCH/H2.4, but not for DL FACCH/H. We already use a separate
lookup table sched_tchh_dl_facch_map[] when sending RTS.ind for
DL FACCH/H, so no additional checks are added in this commit.
Change-Id: Idb753fa5c87dc79e9ad19e550680de6f462eed69
Fixes: 95407f3f6 ("osmo-bts-trx: implement CSD scheduling support")
Related: OS#1572, OS#6618
---
M src/osmo-bts-trx/sched_lchan_tchh.c
1 file changed, 14 insertions(+), 12 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/23/38723/1
diff --git a/src/osmo-bts-trx/sched_lchan_tchh.c b/src/osmo-bts-trx/sched_lchan_tchh.c
index 6027072..01ac155 100644
--- a/src/osmo-bts-trx/sched_lchan_tchh.c
+++ b/src/osmo-bts-trx/sched_lchan_tchh.c
@@ -420,12 +420,6 @@
memmove(BUFPOS(bursts_p, 0), BUFPOS(bursts_p, 2), 20 * BPLEN);
memset(BUFPOS(bursts_p, 20), 0, 2 * BPLEN);
- /* for half-rate CSD we dequeue every 4th burst */
- if (chan_state->rsl_cmode == RSL_CMOD_SPD_DATA) {
- if (!sched_tchh_dl_csd_map[br->fn % 26])
- goto send_burst;
- }
-
/* dequeue a TCH and/or a FACCH message to be transmitted */
tch_dl_dequeue(l1ts, br, &msg_tch, &msg_facch);
@@ -529,17 +523,25 @@
break;
/* CSD (TCH/H4.8): 6.0 kbit/s radio interface rate */
case GSM48_CMODE_DATA_6k0:
- if (msg_tch == NULL)
- msg_tch = tch_dummy_msgb(4 * 60, 0x01);
- gsm0503_tch_hr48_encode(BUFPOS(bursts_p, 0), msgb_l2(msg_tch));
+ /* for half-rate CSD we run the encoder every 4th burst (like for TCH/F)
+ * because the interleaving is done as specified for the TCH/F9.6 */
+ if (sched_tchh_dl_csd_map[br->fn % 26]) {
+ if (msg_tch == NULL)
+ msg_tch = tch_dummy_msgb(4 * 60, 0x01);
+ gsm0503_tch_hr48_encode(BUFPOS(bursts_p, 0), msgb_l2(msg_tch));
+ }
if (msg_facch != NULL)
gsm0503_tch_hr_facch_encode(BUFPOS(bursts_p, 0), msgb_l2(msg_facch));
break;
/* CSD (TCH/H2.4): 3.6 kbit/s radio interface rate */
case GSM48_CMODE_DATA_3k6:
- if (msg_tch == NULL)
- msg_tch = tch_dummy_msgb(4 * 36, 0x01);
- gsm0503_tch_hr24_encode(BUFPOS(bursts_p, 0), msgb_l2(msg_tch));
+ /* for half-rate CSD we run the encoder every 4th burst (like for TCH/F)
+ * because the interleaving is done as specified for the TCH/F9.6 */
+ if (sched_tchh_dl_csd_map[br->fn % 26]) {
+ if (msg_tch == NULL)
+ msg_tch = tch_dummy_msgb(4 * 36, 0x01);
+ gsm0503_tch_hr24_encode(BUFPOS(bursts_p, 0), msgb_l2(msg_tch));
+ }
if (msg_facch != NULL)
gsm0503_tch_hr_facch_encode(BUFPOS(bursts_p, 0), msgb_l2(msg_facch));
break;
--
To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/38723?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: Idb753fa5c87dc79e9ad19e550680de6f462eed69
Gerrit-Change-Number: 38723
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
Attention is currently required from: osmith, pespin.
Hello Jenkins Builder, osmith, pespin,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/38696?usp=email
to look at the new patch set (#5).
The following approvals got outdated and were removed:
Code-Review+1 by pespin, Verified+1 by Jenkins Builder
Change subject: bts: add TC_data_facch_*: test FACCH/[FH] on data channels
......................................................................
bts: add TC_data_facch_*: test FACCH/[FH] on data channels
So far we have been testing the actual traffic on TCH/[FH] in data
mode (CSD), but not FACCH/[FH]. Add separate testcases for that.
Half-rate variants of the new testcases crash osmo-bts-trx, so
comment them out in the control section until the problem is fixed.
Change-Id: I2098ccd651fc2a81f62e70be64af386ab0ca6148
Related: OS#6618
---
M bts/BTS_Tests.ttcn
M bts/expected-results.xml
2 files changed, 133 insertions(+), 3 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/96/38696/5
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/38696?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newpatchset
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I2098ccd651fc2a81f62e70be64af386ab0ca6148
Gerrit-Change-Number: 38696
Gerrit-PatchSet: 5
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: osmith <osmith(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmo-sigtran/+/38719?usp=email )
Change subject: sigtran: Add API osmo_ss7_as_select_asp()
......................................................................
sigtran: Add API osmo_ss7_as_select_asp()
This API is required by osmo-bsc, since when in SCCPLite configuration,
it needs to access the IPA conn of the AS towards the MSC in order to
inject MGCP and CTRL protocols over the IPA multiplex.
This API may need to be revisited (i.e. deprecated and a new one
created) once we want to fully support loadshare, where message contents
such as OPC,DPC,SLS need to be taken into account internally in
libosmo-sigtran.
That new version may well be kept private though, since the API here
presented is good enough for osmo-bsc IPA multiplex injection.
This is anyway kind of chicken-and-egg problem, because we want to have
an API osmo-bsc can use in first place before moving the whole
osmo_ss7_as struct as private so that we can modify it to implement
proper AS loadsharing.
Related: SYS#6602
Change-Id: I8b866b45ac4a24238c55171d25e11b9625e8f50c
---
M TODO-RELEASE
M include/osmocom/sigtran/osmo_ss7.h
M src/osmo_ss7_as.c
M src/xua_as_fsm.c
4 files changed, 92 insertions(+), 39 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmo-sigtran refs/changes/19/38719/1
diff --git a/TODO-RELEASE b/TODO-RELEASE
index 261567c..08978d4 100644
--- a/TODO-RELEASE
+++ b/TODO-RELEASE
@@ -13,4 +13,4 @@
libosmo-sigtran Make private osmo_ss7_route
libosmo-sigtran add API osmo_ss7_instance_get_id(), osmo_ss7_instance_get_name(), osmo_ss7_instance_get_pc_fmt(), osmo_ss7_instance_get_primary_pc(), osmo_ss7_get_sccp()
libosmo-sigtran add API osmo_ss7_instances_llist_entry()
-libosmo-sigtran add API osmo_ss7_as_get_asp_protocol()
+libosmo-sigtran add API osmo_ss7_as_get_asp_protocol(), osmo_ss7_as_select_asp()
diff --git a/include/osmocom/sigtran/osmo_ss7.h b/include/osmocom/sigtran/osmo_ss7.h
index 83956d8..361e715 100644
--- a/include/osmocom/sigtran/osmo_ss7.h
+++ b/include/osmocom/sigtran/osmo_ss7.h
@@ -274,6 +274,7 @@
void osmo_ss7_as_destroy(struct osmo_ss7_as *as);
bool osmo_ss7_as_has_asp(const struct osmo_ss7_as *as,
const struct osmo_ss7_asp *asp);
+struct osmo_ss7_asp *osmo_ss7_as_select_asp(struct osmo_ss7_as *as);
bool osmo_ss7_as_down(const struct osmo_ss7_as *as);
bool osmo_ss7_as_active(const struct osmo_ss7_as *as);
bool osmo_ss7_as_tmode_compatible_xua(struct osmo_ss7_as *as, uint32_t m3ua_tmt);
diff --git a/src/osmo_ss7_as.c b/src/osmo_ss7_as.c
index 5af7098..d4510fc 100644
--- a/src/osmo_ss7_as.c
+++ b/src/osmo_ss7_as.c
@@ -222,3 +222,89 @@
return true;
return as->fi->state == XUA_AS_S_DOWN;
}
+
+static struct osmo_ss7_asp *ss7_as_select_asp_override(struct osmo_ss7_as *as)
+{
+ struct osmo_ss7_asp *asp;
+ unsigned int i;
+
+ /* FIXME: proper selection of the ASP based on the SLS! */
+ for (i = 0; i < ARRAY_SIZE(as->cfg.asps); i++) {
+ asp = as->cfg.asps[i];
+ if (asp && osmo_ss7_asp_active(asp))
+ break;
+ }
+ return asp;
+}
+
+static struct osmo_ss7_asp *ss7_as_select_asp_roundrobin(struct osmo_ss7_as *as)
+{
+ struct osmo_ss7_asp *asp;
+ unsigned int i;
+ unsigned int first_idx;
+
+ first_idx = (as->cfg.last_asp_idx_sent + 1) % ARRAY_SIZE(as->cfg.asps);
+ i = first_idx;
+ do {
+ asp = as->cfg.asps[i];
+ if (asp && osmo_ss7_asp_active(asp))
+ break;
+ i = (i + 1) % ARRAY_SIZE(as->cfg.asps);
+ } while (i != first_idx);
+ as->cfg.last_asp_idx_sent = i;
+
+ return asp;
+}
+
+static struct osmo_ss7_asp *ss7_as_select_asp_broadcast(struct osmo_ss7_as *as)
+{
+ struct osmo_ss7_asp *asp;
+ struct osmo_ss7_asp *asp_found = NULL;
+ unsigned int cnt = 0;
+
+ for (unsigned int i = 0; i < ARRAY_SIZE(as->cfg.asps); i++) {
+ asp = as->cfg.asps[i];
+ if (!asp || !osmo_ss7_asp_active(asp))
+ continue;
+ asp_found = asp;
+ cnt++;
+ if (cnt > 1)
+ break; /* Early return above: */
+ }
+ return cnt == 1 ? asp_found : NULL;
+}
+
+/*! Select an AS to transmit a message, according to AS configuration and ASP availability.
+ * \param[in] as Application Server.
+ * \returns asp to send the message to, NULL if no possible asp found
+ *
+ * This function returns NULL too if multiple ASPs would be selected, ie. AS is
+ * configured in broadcast mode and more than one ASP is configured.
+ */
+struct osmo_ss7_asp *osmo_ss7_as_select_asp(struct osmo_ss7_as *as)
+{
+ struct osmo_ss7_asp *asp = NULL;
+
+ switch (as->cfg.mode) {
+ case OSMO_SS7_AS_TMOD_OVERRIDE:
+ asp = ss7_as_select_asp_override(as);
+ break;
+ case OSMO_SS7_AS_TMOD_LOADSHARE:
+ /* TODO: actually use the SLS value to ensure same SLS goes
+ * through same ASP. Not strictly required by M3UA RFC, but
+ * would fit the overall principle. */
+ case OSMO_SS7_AS_TMOD_ROUNDROBIN:
+ asp = ss7_as_select_asp_roundrobin(as);
+ break;
+ case OSMO_SS7_AS_TMOD_BCAST:
+ return ss7_as_select_asp_broadcast(as);
+ case _NUM_OSMO_SS7_ASP_TMOD:
+ OSMO_ASSERT(false);
+ }
+
+ if (!asp) {
+ LOGPFSM(as->fi, "No selectable ASP in AS\n");
+ return NULL;
+ }
+ return asp;
+}
diff --git a/src/xua_as_fsm.c b/src/xua_as_fsm.c
index dff0d06..29d31a9 100644
--- a/src/xua_as_fsm.c
+++ b/src/xua_as_fsm.c
@@ -97,39 +97,6 @@
return -1;
}
-static struct osmo_ss7_asp *xua_as_select_asp_override(struct osmo_ss7_as *as)
-{
- struct osmo_ss7_asp *asp;
- unsigned int i;
-
- /* FIXME: proper selection of the ASP based on the SLS! */
- for (i = 0; i < ARRAY_SIZE(as->cfg.asps); i++) {
- asp = as->cfg.asps[i];
- if (asp && osmo_ss7_asp_active(asp))
- break;
- }
- return asp;
-}
-
-static struct osmo_ss7_asp *xua_as_select_asp_roundrobin(struct osmo_ss7_as *as)
-{
- struct osmo_ss7_asp *asp;
- unsigned int i;
- unsigned int first_idx;
-
- first_idx = (as->cfg.last_asp_idx_sent + 1) % ARRAY_SIZE(as->cfg.asps);
- i = first_idx;
- do {
- asp = as->cfg.asps[i];
- if (asp && osmo_ss7_asp_active(asp))
- break;
- i = (i + 1) % ARRAY_SIZE(as->cfg.asps);
- } while (i != first_idx);
- as->cfg.last_asp_idx_sent = i;
-
- return asp;
-}
-
int xua_as_transmit_msg_broadcast(struct osmo_ss7_as *as, struct msgb *msg)
{
struct osmo_ss7_asp *asp;
@@ -157,13 +124,12 @@
switch (as->cfg.mode) {
case OSMO_SS7_AS_TMOD_OVERRIDE:
- asp = xua_as_select_asp_override(as);
- break;
case OSMO_SS7_AS_TMOD_LOADSHARE:
- /* TODO: actually use the SLS value to ensure same SLS goes through same ASP. Not
- * strictly required by M3UA RFC, but would fit the overall principle. */
+ /* TODO: OSMO_SS7_AS_TMOD_LOADSHARE: actually use the SLS value
+ * to ensure same SLS goes through same ASP. Not strictly
+ * required by M3UA RFC, but would fit the overall principle. */
case OSMO_SS7_AS_TMOD_ROUNDROBIN:
- asp = xua_as_select_asp_roundrobin(as);
+ asp = osmo_ss7_as_select_asp(as);
break;
case OSMO_SS7_AS_TMOD_BCAST:
return xua_as_transmit_msg_broadcast(as, msg);
--
To view, visit https://gerrit.osmocom.org/c/libosmo-sigtran/+/38719?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: libosmo-sigtran
Gerrit-Branch: master
Gerrit-Change-Id: I8b866b45ac4a24238c55171d25e11b9625e8f50c
Gerrit-Change-Number: 38719
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Hello Jenkins Builder,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/libosmo-sigtran/+/38664?usp=email
to look at the new patch set (#5).
The following approvals got outdated and were removed:
Verified+1 by Jenkins Builder
Change subject: sigtran: Make osmo_ss7_instance struct private
......................................................................
sigtran: Make osmo_ss7_instance struct private
Change-Id: I4562fe21535c5aa468ac0e3831d505bf08b336ec
---
M TODO-RELEASE
M include/osmocom/sigtran/osmo_ss7.h
M src/Makefile.am
M src/osmo_ss7.c
A src/osmo_ss7_instance.c
M src/sccp_scoc.c
M src/sccp_scrc.c
M src/sccp_vty.c
A src/ss7_instance.h
M src/ss7_internal.h
10 files changed, 695 insertions(+), 614 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmo-sigtran refs/changes/64/38664/5
--
To view, visit https://gerrit.osmocom.org/c/libosmo-sigtran/+/38664?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newpatchset
Gerrit-Project: libosmo-sigtran
Gerrit-Branch: master
Gerrit-Change-Id: I4562fe21535c5aa468ac0e3831d505bf08b336ec
Gerrit-Change-Number: 38664
Gerrit-PatchSet: 5
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder