Attention is currently required from: fixeria.
laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-msc/+/28108 )
Change subject: switch sqlite3 to single-threaded mode
......................................................................
Patch Set 3:
(1 comment)
Patchset:
PS3:
> IMO, it would make more sense to switch from libdbi to libsqlite3 first, and then set sqlite3 specif […]
This should be a rather small uncontroversial change that is expected to significantly reduce CPU utilization of osmo-msc. We might even want to backport it to earlier tagged releases.
The migration to libsqlite3 is much more risky and prone to introduction of errors, and likely cannot be merged very quickly.
--
To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/28108
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-Change-Id: I5bbea90d28b6d73b64b9e5124ff59304b90a8a75
Gerrit-Change-Number: 28108
Gerrit-PatchSet: 3
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-CC: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Comment-Date: Sun, 15 May 2022 07:58:06 +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: laforge.
fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-msc/+/28113 )
Change subject: sms_queue: Annotate each function with some comment
......................................................................
Patch Set 2: Code-Review+1
--
To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/28113
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-Change-Id: I6d239369cabdf1703eba7f3606b46b95cbbb1ea7
Gerrit-Change-Number: 28113
Gerrit-PatchSet: 2
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Comment-Date: Sat, 14 May 2022 23:39:44 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
Attention is currently required from: laforge.
fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-msc/+/28108 )
Change subject: switch sqlite3 to single-threaded mode
......................................................................
Patch Set 3:
(1 comment)
Patchset:
PS3:
IMO, it would make more sense to switch from libdbi to libsqlite3 first, and then set sqlite3 specific options.
--
To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/28108
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-Change-Id: I5bbea90d28b6d73b64b9e5124ff59304b90a8a75
Gerrit-Change-Number: 28108
Gerrit-PatchSet: 3
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-CC: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Comment-Date: Sat, 14 May 2022 23:36:10 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-msc/+/28107 )
Change subject: call rate_ctr_init() to make rate counters work properly
......................................................................
call rate_ctr_init() to make rate counters work properly
The existing rate counters per-minute/hour/day values were never
computed as the related timer was never started...
Change-Id: I27282051a6da5d1e1a25981712fbe4c4a6378dea
---
M src/osmo-msc/msc_main.c
1 file changed, 1 insertion(+), 0 deletions(-)
Approvals:
Jenkins Builder: Verified
pespin: Looks good to me, but someone else must approve
fixeria: Looks good to me, approved
diff --git a/src/osmo-msc/msc_main.c b/src/osmo-msc/msc_main.c
index 9657c71..b5496fb 100644
--- a/src/osmo-msc/msc_main.c
+++ b/src/osmo-msc/msc_main.c
@@ -576,6 +576,7 @@
osmo_fsm_log_addr(true);
osmo_stats_init(tall_msc_ctx);
+ rate_ctr_init(tall_msc_ctx);
/* For --version, vty_init() must be called before handling options */
vty_init(&msc_vty_info);
--
To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/28107
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-Change-Id: I27282051a6da5d1e1a25981712fbe4c4a6378dea
Gerrit-Change-Number: 28107
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <laforge(a)osmocom.org>
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: laforge.
Hello Jenkins Builder, pespin,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/osmo-msc/+/28108
to look at the new patch set (#3).
Change subject: switch sqlite3 to single-threaded mode
......................................................................
switch sqlite3 to single-threaded mode
Looking at 'perf top' of osmo-msc under load shows that there's a
significant amount of time spent in terms of locking (mutex,...)
which is useless as osmo-msc is a single-threaded application.
Unfortunately libdbi doesn't provide a mechanism to perform
sqlite3_config(), so we have to do it directly here, introducing an
explicit build-time dependency (and linkage) to libsqlite3.
Related: OS#5559
Change-Id: I5bbea90d28b6d73b64b9e5124ff59304b90a8a75
---
M configure.ac
M contrib/osmo-msc.spec.in
M debian/control
M src/libmsc/db.c
M src/osmo-msc/Makefile.am
M tests/db_sms/Makefile.am
M tests/msc_vlr/Makefile.am
M tests/sms_queue/Makefile.am
8 files changed, 14 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/08/28108/3
--
To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/28108
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-Change-Id: I5bbea90d28b6d73b64b9e5124ff59304b90a8a75
Gerrit-Change-Number: 28108
Gerrit-PatchSet: 3
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-MessageType: newpatchset
laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-msc/+/28113 )
Change subject: sms_queue: Annotate each function with some comment
......................................................................
sms_queue: Annotate each function with some comment
It makes the code much more readable if there's at least a one-liner
documenting each function (and struct member).
Change-Id: I6d239369cabdf1703eba7f3606b46b95cbbb1ea7
---
M src/libmsc/sms_queue.c
1 file changed, 47 insertions(+), 29 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/13/28113/1
diff --git a/src/libmsc/sms_queue.c b/src/libmsc/sms_queue.c
index 6098a53..63d9631 100644
--- a/src/libmsc/sms_queue.c
+++ b/src/libmsc/sms_queue.c
@@ -43,35 +43,39 @@
#include <osmocom/vty/vty.h>
-/*
- * One pending SMS that we wait for.
- */
+/* One in-RAM record of a "pending SMS". This is not the SMS itself, but merely
+ * a pointer to the database record. It holds a reference on the vlr_subscriber
+ * and some counters. While this object exists in RAM, we are regularly attempting
+ * to deliver the related SMS. */
struct gsm_sms_pending {
- struct llist_head entry;
+ struct llist_head entry; /* gsm_sms_queue.pending_sms */
- struct vlr_subscr *vsub;
- struct msc_a *msc_a;
- unsigned long long sms_id;
- int failed_attempts;
- int resend;
+ struct vlr_subscr *vsub; /* destination subscriber for this SMS */
+ struct msc_a *msc_a; /* MSC_A associated with this SMS */
+ unsigned long long sms_id; /* unique ID (in SQL database) of this SMS */
+ int failed_attempts; /* count of failed deliver attempts so far */
+ int resend; /* should we try re-sending it (now) ? */
};
+/* (global) state of the SMS queue. */
struct gsm_sms_queue {
- struct osmo_timer_list resend_pending;
- struct osmo_timer_list push_queue;
+ struct osmo_timer_list resend_pending; /* timer triggering sms_resend_pending() */
+ struct osmo_timer_list push_queue; /* timer triggering sms_submit_pending() */
struct gsm_network *network;
- int max_fail;
- int max_pending;
- int pending;
+ int max_fail; /* maximum number of delivery failures */
+ int max_pending; /* maximum number of gsm_sms_pending in RAM */
+ int pending; /* current number of gsm_sms_pending in RAM */
- struct llist_head pending_sms;
+ struct llist_head pending_sms; /* list of gsm_sms_pending */
+ /* last MSISDN for which we read SMS from the database and created gsm_sms_pending records */
char last_msisdn[GSM23003_MSISDN_MAX_DIGITS+1];
};
static int sms_subscr_cb(unsigned int, unsigned int, void *, void *);
static int sms_sms_cb(unsigned int, unsigned int, void *, void *);
+/* look-up a 'gsm_sms_pending' for the given sms_id; return NULL if none */
static struct gsm_sms_pending *sms_find_pending(struct gsm_sms_queue *smsq,
unsigned long long sms_id)
{
@@ -85,11 +89,13 @@
return NULL;
}
+/* do we currently have a gsm_sms_pending object for the given SMS id? */
int sms_queue_sms_is_pending(struct gsm_sms_queue *smsq, unsigned long long sms_id)
{
return sms_find_pending(smsq, sms_id) != NULL;
}
+/* find the first pending SMS (in RAM) for the given subscriber */
static struct gsm_sms_pending *sms_subscriber_find_pending(
struct gsm_sms_queue *smsq,
struct vlr_subscr *vsub)
@@ -104,12 +110,14 @@
return NULL;
}
+/* do we have any pending SMS (in RAM) for the given subscriber? */
static int sms_subscriber_is_pending(struct gsm_sms_queue *smsq,
struct vlr_subscr *vsub)
{
return sms_subscriber_find_pending(smsq, vsub) != NULL;
}
+/* allocate a new gsm_sms_pending record and fill it with information from 'sms' */
static struct gsm_sms_pending *sms_pending_from(struct gsm_sms_queue *smsq,
struct gsm_sms *sms)
{
@@ -125,6 +133,7 @@
return pending;
}
+/* release a gsm_sms_pending object */
static void sms_pending_free(struct gsm_sms_pending *pending)
{
vlr_subscr_put(pending->vsub, VSUB_USE_SMS_PENDING);
@@ -132,6 +141,8 @@
talloc_free(pending);
}
+/* this sets the 'resend' flag of the gsm_sms_pending and schedules
+ * the timer for re-sending */
static void sms_pending_resend(struct gsm_sms_pending *pending)
{
struct gsm_network *net = pending->vsub->vlr->user_ctx;
@@ -148,6 +159,8 @@
osmo_timer_schedule(&smsq->resend_pending, 1, 0);
}
+/* call-back when a pending SMS has failed; try another re-send if number of
+ * attempts is < smsq->max_fail */
static void sms_pending_failed(struct gsm_sms_pending *pending, int paging_error)
{
struct gsm_network *net = pending->vsub->vlr->user_ctx;
@@ -165,10 +178,10 @@
smsq->pending -= 1;
}
-/*
- * Resend all SMS that are scheduled for a resend. This is done to
- * avoid an immediate failure.
- */
+/* Resend all SMS that are scheduled for a resend. This is done to
+ * avoid an immediate failure. This iterates over all the (in RAM)
+ * pending_sms records, checks for resend == true, reads them from the
+ * DB and attempts to send them via gsm411_send_sms() */
static void sms_resend_pending(void *_data)
{
struct gsm_sms_pending *pending, *tmp;
@@ -244,10 +257,10 @@
return NULL;
}
-/**
- * I will submit up to max_pending - pending SMS to the
- * subsystem.
- */
+/* read up to 'max_pending' pending SMS from the database and add them to the in-memory
+ * sms_queue; trigger the first delivery attempt. 'submit' in this context means
+ * "read from the database and add to the in-memory gsm_sms_queue" and is not to be
+ * confused with the SMS SUBMIT operation a MS performs when sending a MO-SMS. */
static void sms_submit_pending(void *_data)
{
struct gsm_sms_queue *smsq = _data;
@@ -309,6 +322,7 @@
continue;
}
+ /* allocate a new gsm_sms_pending object in RAM */
pending = sms_pending_from(smsq, sms);
if (!pending) {
LOGP(DLSMS, LOGL_ERROR,
@@ -326,9 +340,10 @@
LOGP(DLSMS, LOGL_DEBUG, "SMSqueue added %d messages in %d rounds\n", attempted, rounds);
}
-/**
- * Send the next SMS or trigger the queue
- */
+/* obtain the next pending SMS for given subscriber from database,
+ * create gsm_sms_pending object and attempt first delivery. If there
+ * are no SMS pending for the given subscriber, call sms_submit_pending()
+ * to read more SMS (for any subscriber) into the in-RAM pending queue */
static void sms_send_next(struct vlr_subscr *vsub)
{
struct gsm_network *net = vsub->vlr->user_ctx;
@@ -366,9 +381,7 @@
sms_submit_pending(net->sms_queue);
}
-/*
- * Kick off the queue again.
- */
+/* Trigger a call to sms_submit_pending() in one second */
int sms_queue_trigger(struct gsm_sms_queue *smsq)
{
LOGP(DLSMS, LOGL_DEBUG, "Triggering SMS queue\n");
@@ -379,6 +392,8 @@
return 0;
}
+/* initialize the sms_queue subsystem and read the first batch of SMS from
+ * the database for delivery */
int sms_queue_start(struct gsm_network *network, int max_pending)
{
struct gsm_sms_queue *sms = talloc_zero(network, struct gsm_sms_queue);
@@ -403,6 +418,7 @@
return 0;
}
+/* call-back: Given subscriber is now ready for short messages. */
static int sub_ready_for_sm(struct gsm_network *net, struct vlr_subscr *vsub)
{
struct gsm_sms *sms;
@@ -440,6 +456,7 @@
return 0;
}
+/* call-back for SS_SUBSCR signals */
static int sms_subscr_cb(unsigned int subsys, unsigned int signal,
void *handler_data, void *signal_data)
{
@@ -452,6 +469,7 @@
return sub_ready_for_sm(handler_data, vsub);
}
+/* call-back for SS_SMS signals */
static int sms_sms_cb(unsigned int subsys, unsigned int signal,
void *handler_data, void *signal_data)
{
--
To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/28113
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-Change-Id: I6d239369cabdf1703eba7f3606b46b95cbbb1ea7
Gerrit-Change-Number: 28113
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-MessageType: newchange
keith has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-mgw/+/28112 )
Change subject: Don't check rtp timestamps if we are not patching timestamps.
......................................................................
Don't check rtp timestamps if we are not patching timestamps.
If vty command rtp-patch timestamp is not in force, then
do not check, count or log timestamp allignment errors.
Change-Id: I889fce4c86cffdcbb74b17cd36ccda89c034a824
---
M src/libosmo-mgcp/mgcp_network.c
1 file changed, 3 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/12/28112/1
diff --git a/src/libosmo-mgcp/mgcp_network.c b/src/libosmo-mgcp/mgcp_network.c
index bcc6652..6843fcc 100644
--- a/src/libosmo-mgcp/mgcp_network.c
+++ b/src/libosmo-mgcp/mgcp_network.c
@@ -258,6 +258,9 @@
if (tsdelta_out)
*tsdelta_out = tsdelta;
+ if (!rtp_end->force_aligned_timing)
+ return 0;
+
timestamp_error =
ts_alignment_error(sstate, state->packet_duration, timestamp);
--
To view, visit https://gerrit.osmocom.org/c/osmo-mgw/+/28112
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-Change-Id: I889fce4c86cffdcbb74b17cd36ccda89c034a824
Gerrit-Change-Number: 28112
Gerrit-PatchSet: 1
Gerrit-Owner: keith <keith(a)rhizomatica.org>
Gerrit-MessageType: newchange
Attention is currently required from: fixeria.
Hello Jenkins Builder,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/osmocom-bb/+/28109
to look at the new patch set (#2).
Change subject: firmware/layer1: clarify L1CTL_DM_EST_REQ related logging
......................................................................
firmware/layer1: clarify L1CTL_DM_EST_REQ related logging
Change-Id: I7a7fb32eab0ab20672a47861c3b66da92bd83015
---
M src/target/firmware/layer1/l23_api.c
1 file changed, 6 insertions(+), 2 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/09/28109/2
--
To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/28109
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-Change-Id: I7a7fb32eab0ab20672a47861c3b66da92bd83015
Gerrit-Change-Number: 28109
Gerrit-PatchSet: 2
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-MessageType: newpatchset