pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-uecups/+/27736 )
Change subject: main.c: Fix typo in comment
......................................................................
main.c: Fix typo in comment
Change-Id: I6fb65b0468ebab8c35bb918f1d04d62b641edf69
---
M daemon/main.c
1 file changed, 1 insertion(+), 1 deletion(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-uecups refs/changes/36/27736/1
diff --git a/daemon/main.c b/daemon/main.c
index 788ed70..39d60e6 100644
--- a/daemon/main.c
+++ b/daemon/main.c
@@ -370,7 +370,7 @@
child_terminated(d, fdsi->ssi_pid, fdsi->ssi_status);
/* it is known that classic signals coalesce: If you get multiple signals of the
- * same type before a process is scheduled, the subsequent signaals are dropped. This
+ * same type before a process is scheduled, the subsequent signals are dropped. This
* makes sense for SIGINT or something like this, but for SIGCHLD carrying the PID of
* the terminated process, it doesn't really. Linux had the chance to fix this when
* introducing signalfd() - but the developers decided not to fix it. So the signalfd_siginfo
--
To view, visit https://gerrit.osmocom.org/c/osmo-uecups/+/27736
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-uecups
Gerrit-Branch: master
Gerrit-Change-Id: I6fb65b0468ebab8c35bb918f1d04d62b641edf69
Gerrit-Change-Number: 27736
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: newchange
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-uecups/+/27737 )
Change subject: main: Remove duplicate call to child_terminated()
......................................................................
main: Remove duplicate call to child_terminated()
The same pid will be handled below tyhrough waitpid. This can be seen
when running PGW_Tests:
"""
20220411134309656 DUECUPS main.c:343 SIGCHLD receive from pid 24; status=0
20220411134309656 DUECUPS main.c:95 r=172.18.18.202:9999<->l=172.18.18.20:4268: JSON Tx '{"program_term_ind": {"exit_code": 0, "pid": 24}}'
20220411134309656 DUECUPS main.c:343 SIGCHLD receive from pid 24; status=0
"""
Change-Id: I348b91097fe9bf78b2c7e33d4f3eaf316618068e
---
M daemon/main.c
1 file changed, 0 insertions(+), 2 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-uecups refs/changes/37/27737/1
diff --git a/daemon/main.c b/daemon/main.c
index 39d60e6..328d074 100644
--- a/daemon/main.c
+++ b/daemon/main.c
@@ -367,8 +367,6 @@
OSMO_ASSERT(fdsi->ssi_signo == SIGCHLD);
- child_terminated(d, fdsi->ssi_pid, fdsi->ssi_status);
-
/* it is known that classic signals coalesce: If you get multiple signals of the
* same type before a process is scheduled, the subsequent signals are dropped. This
* makes sense for SIGINT or something like this, but for SIGCHLD carrying the PID of
--
To view, visit https://gerrit.osmocom.org/c/osmo-uecups/+/27737
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-uecups
Gerrit-Branch: master
Gerrit-Change-Id: I348b91097fe9bf78b2c7e33d4f3eaf316618068e
Gerrit-Change-Number: 27737
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: newchange
fixeria has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/27721 )
Change subject: scheduler: rts_tchh_fn(): use a lookup table for FACCH/H
......................................................................
scheduler: rts_tchh_fn(): use a lookup table for FACCH/H
Unlike TCH/F, TCH/H imposes some additional requirements on the FACCH
transmission, so that a signalling block can be transmitted only at
specific TDMA frame numbers defined in 3GPP TS 45.002, table 1.
This is why in rts_tchh_fn() we need to check the given TDMA frame
number and tell rts_tch_common() whether FACCH/H is permitted or
not. The check is based on a magic formula, which I find a bit
hard to read and understand. Let's better use a lookup table.
Change-Id: I3dba243e5a1b7c8008ef0178ea18ed885256c50d
Related: SYS#5916, OS#5518
---
M src/common/scheduler.c
1 file changed, 11 insertions(+), 2 deletions(-)
Approvals:
Jenkins Builder: Verified
laforge: Looks good to me, but someone else must approve
pespin: Looks good to me, but someone else must approve
fixeria: Looks good to me, approved
diff --git a/src/common/scheduler.c b/src/common/scheduler.c
index 99ab597..96189ef 100644
--- a/src/common/scheduler.c
+++ b/src/common/scheduler.c
@@ -996,12 +996,21 @@
return rts_tch_common(l1ts, br, true);
}
+/* FACCH/H channel mapping for Downlink (see 3GPP TS 45.002, table 1).
+ * This mapping is valid for both FACCH/H(0) and FACCH/H(1). */
+static const uint8_t sched_tchh_dl_facch_map[26] = {
+ [4] = 1, /* FACCH/H(0): B0(4,6,8,10,13,15) */
+ [5] = 1, /* FACCH/H(1): B0(5,7,9,11,14,16) */
+ [13] = 1, /* FACCH/H(0): B1(13,15,17,19,21,23) */
+ [14] = 1, /* FACCH/H(1): B1(14,16,18,20,22,24) */
+ [21] = 1, /* FACCH/H(0): B2(21,23,0,2,4,6) */
+ [22] = 1, /* FACCH/H(1): B2(22,24,1,3,5,7) */
+};
/* RTS for half rate traffic frame */
static int rts_tchh_fn(const struct l1sched_ts *l1ts, const struct trx_dl_burst_req *br)
{
- /* the FN 4/5, 13/14, 21/22 defines that FACCH may be included. */
- return rts_tch_common(l1ts, br, ((br->fn % 26) >> 2) & 1);
+ return rts_tch_common(l1ts, br, sched_tchh_dl_facch_map[br->fn % 26]);
}
/* set multiframe scheduler to given pchan */
--
To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/27721
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: I3dba243e5a1b7c8008ef0178ea18ed885256c50d
Gerrit-Change-Number: 27721
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: merged
Attention is currently required from: pespin.
fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/27720 )
Change subject: scheduler: remove redundant OSMO_ASSERT() statements
......................................................................
Patch Set 1: Code-Review+2
(1 comment)
Patchset:
PS1:
> That's precisely the point of the asserts, to describe and check that "guaranteed" situation, so tha […]
Yes, I agree with the concept in general. But on the other hand we should not put assert()s everywhere to address every possible failure vector. In this context it's hard to imagine why would somebody change bts_model_l1sap_down() to call this function on receipt of a different prim type, given that it's clear from the function name what kind of the input it expects...
--
To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/27720
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: I6a01bba7b5eb337ae1552c442d74447565c52e25
Gerrit-Change-Number: 27720
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Mon, 11 Apr 2022 13:37:23 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Comment-In-Reply-To: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: comment
Attention is currently required from: fixeria.
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/27722 )
Change subject: osmo-bts-trx: rx_tchh_fn(): use a lookup table for FACCH/H
......................................................................
Patch Set 1:
(1 comment)
File src/osmo-bts-trx/sched_lchan_tchh.c:
https://gerrit.osmocom.org/c/osmo-bts/+/27722/comment/e4415baf_66b40148
PS1, Line 85: int fn_is_odd = (((bi->fn + 26 - 10) % 26) >> 2) & 1;
> I am not a big fan of this kind of functions, sorry. This statement: […]
It may be self explaining to you after having read the specs, I can tell you it's not safe explaining to me, at least without further investigation. Having fn_is_facch() is self explanatory. Just sharing my view here.
--
To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/27722
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: I7c4e3befdd33bef4d89a04a4c7cb1a2d4078c156
Gerrit-Change-Number: 27722
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Comment-Date: Mon, 11 Apr 2022 13:34:56 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: fixeria <vyanitskiy(a)sysmocom.de>
Comment-In-Reply-To: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: comment
osmith has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bsc-nat/+/27711 )
Change subject: Make subscr_conn_get_next_id RAN specific
......................................................................
Make subscr_conn_get_next_id RAN specific
Instead of having RAN/CN as parameter, make the function a bit simpler
and only allow RAN. The motivation for this change is, that for MGW a
similar function is required, and it was recommended in code review to
rather duplicate the short function instead of making it more complex.
I'm dropping the CN part here since it wasn't used anyway, and if used
in the future, the function could be duplicated for CN as well.
Related: SYS#5560
Change-Id: I77b0ef33f94c401d24f38eb8d79e1007234e0ab4
---
M include/osmocom/bsc_nat/subscr_conn.h
M src/osmo-bsc-nat/bsc_nat_fsm.c
M src/osmo-bsc-nat/subscr_conn.c
3 files changed, 5 insertions(+), 12 deletions(-)
Approvals:
Jenkins Builder: Verified
pespin: Looks good to me, but someone else must approve
fixeria: Looks good to me, approved
diff --git a/include/osmocom/bsc_nat/subscr_conn.h b/include/osmocom/bsc_nat/subscr_conn.h
index 7de3f0f..02a0019 100644
--- a/include/osmocom/bsc_nat/subscr_conn.h
+++ b/include/osmocom/bsc_nat/subscr_conn.h
@@ -36,7 +36,7 @@
} ran;
};
-int subscr_conn_get_next_id(enum bsc_nat_net net);
+int subscr_conn_get_next_id_ran();
struct subscr_conn *subscr_conn_alloc(struct msc *msc, struct bsc *bsc, uint32_t id_cn, uint32_t id_ran);
diff --git a/src/osmo-bsc-nat/bsc_nat_fsm.c b/src/osmo-bsc-nat/bsc_nat_fsm.c
index 22413ef..2a32c9d 100644
--- a/src/osmo-bsc-nat/bsc_nat_fsm.c
+++ b/src/osmo-bsc-nat/bsc_nat_fsm.c
@@ -200,7 +200,7 @@
goto error;
}
- subscr_conn = subscr_conn_alloc(msc, bsc, subscr_conn_get_next_id(BSC_NAT_NET_CN), prim->u.connect.conn_id);
+ subscr_conn = subscr_conn_alloc(msc, bsc, subscr_conn_get_next_id_ran(), prim->u.connect.conn_id);
LOGP(DMAIN, LOGL_DEBUG, "Fwd via %s\n", talloc_get_name(subscr_conn));
diff --git a/src/osmo-bsc-nat/subscr_conn.c b/src/osmo-bsc-nat/subscr_conn.c
index 02afb7d..a94287c 100644
--- a/src/osmo-bsc-nat/subscr_conn.c
+++ b/src/osmo-bsc-nat/subscr_conn.c
@@ -26,15 +26,9 @@
#include <osmocom/bsc_nat/subscr_conn.h>
#include <osmocom/bsc_nat/logging.h>
-/* Get the next available id in either CN or RAN. */
-int subscr_conn_get_next_id(enum bsc_nat_net net)
+int subscr_conn_get_next_id_ran()
{
- uint32_t *id;
-
- if (net == BSC_NAT_NET_RAN)
- id = &g_bsc_nat->ran.subscr_conn_id_next;
- else
- id = &g_bsc_nat->cn.subscr_conn_id_next;
+ uint32_t *id = &g_bsc_nat->ran.subscr_conn_id_next;
for (int i = 0; i < 0xFFFFFF; i++) {
struct subscr_conn *subscr_conn;
@@ -43,8 +37,7 @@
*id = (*id + 1) & 0xffffff;
llist_for_each_entry(subscr_conn, &g_bsc_nat->subscr_conns, list) {
- if ((net == BSC_NAT_NET_RAN && subscr_conn->ran.id == *id)
- || (net == BSC_NAT_NET_CN && subscr_conn->cn.id == *id)) {
+ if (*id == subscr_conn->ran.id) {
already_used = true;
break;
}
--
To view, visit https://gerrit.osmocom.org/c/osmo-bsc-nat/+/27711
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-bsc-nat
Gerrit-Branch: master
Gerrit-Change-Id: I77b0ef33f94c401d24f38eb8d79e1007234e0ab4
Gerrit-Change-Number: 27711
Gerrit-PatchSet: 3
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: merged