Attention is currently required from: pespin.
daniel has posted comments on this change by pespin. ( https://gerrit.osmocom.org/c/osmo-mgw/+/39720?usp=email )
Change subject: mgw: Add backpointer from pdata to req to have context available
......................................................................
Patch Set 1: Code-Review+1
--
To view, visit https://gerrit.osmocom.org/c/osmo-mgw/+/39720?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-Change-Id: I464258ca1a8817d58ae5c5426dfc3b7cee6763d3
Gerrit-Change-Number: 39720
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel <dwillmann(a)sysmocom.de>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Mon, 10 Mar 2025 10:41:33 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Attention is currently required from: pespin.
daniel has posted comments on this change by pespin. ( https://gerrit.osmocom.org/c/osmo-mgw/+/39719?usp=email )
Change subject: mgw: Move cfg pointer from pdata to rq
......................................................................
Patch Set 1: Code-Review+2
--
To view, visit https://gerrit.osmocom.org/c/osmo-mgw/+/39719?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-Change-Id: Ie64fb6250cc84f1e7737b5c1cf5cca314c7020ed
Gerrit-Change-Number: 39719
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel <dwillmann(a)sysmocom.de>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Mon, 10 Mar 2025 10:40:42 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Attention is currently required from: pespin.
daniel has posted comments on this change by pespin. ( https://gerrit.osmocom.org/c/osmo-mgw/+/39718?usp=email )
Change subject: mgw: Move struct mgcp_request_data definition to header file
......................................................................
Patch Set 1: Code-Review+2
--
To view, visit https://gerrit.osmocom.org/c/osmo-mgw/+/39718?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-Change-Id: I1b2831874c1aaad054ad19bf87646062ba9d4da4
Gerrit-Change-Number: 39718
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel <dwillmann(a)sysmocom.de>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Mon, 10 Mar 2025 10:39:41 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Attention is currently required from: pespin.
daniel has posted comments on this change by pespin. ( https://gerrit.osmocom.org/c/osmo-mgw/+/39717?usp=email )
Change subject: mgw: Store Command as enum in struct mgcp_request_data
......................................................................
Patch Set 1: Code-Review+1
--
To view, visit https://gerrit.osmocom.org/c/osmo-mgw/+/39717?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-Change-Id: I2d4b5ddb93376b59413b34c9668c41157ab05497
Gerrit-Change-Number: 39717
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel <dwillmann(a)sysmocom.de>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Mon, 10 Mar 2025 10:38:39 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Attention is currently required from: pespin.
daniel has posted comments on this change by pespin. ( https://gerrit.osmocom.org/c/osmo-mgw/+/39716?usp=email )
Change subject: mgw: Delay osmux trunk setup to point where it is really needed
......................................................................
Patch Set 1: Code-Review+2
--
To view, visit https://gerrit.osmocom.org/c/osmo-mgw/+/39716?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-Change-Id: I27f7355ee99f1781fc2034a23c7cca756fb203d2
Gerrit-Change-Number: 39716
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel <dwillmann(a)sysmocom.de>
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Mon, 10 Mar 2025 10:36:02 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Attention is currently required from: pespin.
daniel has posted comments on this change by pespin. ( https://gerrit.osmocom.org/c/osmo-mgw/+/39715?usp=email )
Change subject: mgw: Validate CallID before updating endp->x_osmo_ign
......................................................................
Patch Set 1: Code-Review+1
--
To view, visit https://gerrit.osmocom.org/c/osmo-mgw/+/39715?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-Change-Id: Ia41f7383171bb24f48297456935c633536aa7b05
Gerrit-Change-Number: 39715
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel <dwillmann(a)sysmocom.de>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Mon, 10 Mar 2025 10:33:21 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Attention is currently required from: laforge, pespin.
daniel has posted comments on this change by pespin. ( https://gerrit.osmocom.org/c/libosmo-sigtran/+/39711?usp=email )
Change subject: ASP loadsharing: vty: Add cmd 'show cs7 instance <0-15> as binding-table name AS_NAME'
......................................................................
Patch Set 2: Code-Review+1
--
To view, visit https://gerrit.osmocom.org/c/libosmo-sigtran/+/39711?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: libosmo-sigtran
Gerrit-Branch: master
Gerrit-Change-Id: Ia2e16b541b229805be23971957f5f7edecf61ed1
Gerrit-Change-Number: 39711
Gerrit-PatchSet: 2
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel <dwillmann(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Mon, 10 Mar 2025 10:27:36 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
pespin has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-sigtran/+/39707?usp=email )
Change subject: ASP loadsharing: Normal ASP distribution regardless of active state
......................................................................
ASP loadsharing: Normal ASP distribution regardless of active state
Before this patch, the normal ASP for a given loadshare eSLS entry (seed)
would only be filled in with active ASPs.
That means that if eg. N ASPs are configured but only 1 is successfully
activated upon startup and a lot of traffic happens, the full eSLS will
be filled with that ASP, and as a result all traffic will be sent to
that ASP, with the exception during the time that ASP is inactive.
Instead, we want to populate the eSLS table with Normal ASP field
properly distributed over all ASPs. If a given ASP is not active at that
time, then simply pick an Alternative ASP during that time.
Change-Id: I2064fe89bac2d3bd86fee544a64ab21417e1c368
---
M src/osmo_ss7_as.c
M src/ss7_as.h
2 files changed, 46 insertions(+), 10 deletions(-)
Approvals:
laforge: Looks good to me, but someone else must approve
Jenkins Builder: Verified
osmith: Looks good to me, but someone else must approve
pespin: Looks good to me, approved
diff --git a/src/osmo_ss7_as.c b/src/osmo_ss7_as.c
index 35a2650..525f394 100644
--- a/src/osmo_ss7_as.c
+++ b/src/osmo_ss7_as.c
@@ -304,6 +304,33 @@
return asp;
}
+/* Pick an ASP serving AS in a round-robin fashion.
+ * During Loadshare eSLS table generation we want to pick Normal ASP
+ * in a distributed fashion, regardless of active state (Alternative ASP will
+ * be picked up temporarily later on if needed).
+ * Moreover, we must use a different index from the "active"
+ * ss7_as_select_asp_roundrobin() below, in order to avoid tainting the
+ * distribution. */
+static struct osmo_ss7_asp *ss7_as_assign_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_assigned + 1) % ARRAY_SIZE(as->cfg.asps);
+ i = first_idx;
+ do {
+ asp = as->cfg.asps[i];
+ if (asp)
+ break;
+ i = (i + 1) % ARRAY_SIZE(as->cfg.asps);
+ } while (i != first_idx);
+ as->cfg.last_asp_idx_assigned = i;
+
+ return asp;
+}
+
+/* Pick an active ASP serving AS in a round-robin fashion, to send a message to. */
static struct osmo_ss7_asp *ss7_as_select_asp_roundrobin(struct osmo_ss7_as *as)
{
struct osmo_ss7_asp *asp;
@@ -397,17 +424,24 @@
/* No current ASP available, try to find a new current ASP: */
- /* No normal route selected yet: */
+ /* No normal route assigned yet: */
if (!aeslse->normal_asp) {
- asp = ss7_as_select_asp_roundrobin(as);
- /* Either a normal route was selected or none found: */
+ /* Establish a Normal ASP, regardless of active state: */
+ asp = ss7_as_assign_asp_roundrobin(as);
+ /* No ASP found for Normal ASP, regardless of state... */
+ if (!asp)
+ return NULL;
aeslse->normal_asp = asp;
- if (asp)
- LOGPAS(as, DLSS7, LOGL_DEBUG, "Tx Loadshare: OPC=%u=%s,SLS=%u -> eSLS=%u: "
- "picked Normal ASP '%s' round-robin style\n",
- mtp->opc, osmo_ss7_pointcode_print(as->inst, mtp->opc),
- mtp->sls, as_ext_sls, asp->cfg.name);
- return asp;
+ LOGPAS(as, DLSS7, LOGL_DEBUG, "Tx Loadshare: OPC=%u=%s,SLS=%u -> eSLS=%u: "
+ "picked Normal ASP '%s' round-robin style\n",
+ mtp->opc, osmo_ss7_pointcode_print(as->inst, mtp->opc),
+ mtp->sls, as_ext_sls, aeslse->normal_asp->cfg.name);
+ if (osmo_ss7_asp_active(aeslse->normal_asp)) {
+ /* Found active Normal Route: */
+ return aeslse->normal_asp;
+ }
+ /* Normal ASP was assigned, but it is not active, fall-through
+ * below to attempt transmission through Alternative ASP: */
}
/* Normal ASP unavailable and no alternative ASP (or unavailable too).
diff --git a/src/ss7_as.h b/src/ss7_as.h
index c4dfdf6..13592e9 100644
--- a/src/ss7_as.h
+++ b/src/ss7_as.h
@@ -108,7 +108,9 @@
} pc_override;
struct osmo_ss7_asp *asps[16];
- uint8_t last_asp_idx_sent; /* used for load-sharing traffic mode (round robin implementation) */
+ /* used for load-sharing traffic mode (round robin implementation) */
+ uint8_t last_asp_idx_assigned;
+ uint8_t last_asp_idx_sent;
struct {
/* How many bits from ITU SLS field (starting from least-significant-bit)
--
To view, visit https://gerrit.osmocom.org/c/libosmo-sigtran/+/39707?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: merged
Gerrit-Project: libosmo-sigtran
Gerrit-Branch: master
Gerrit-Change-Id: I2064fe89bac2d3bd86fee544a64ab21417e1c368
Gerrit-Change-Number: 39707
Gerrit-PatchSet: 2
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
pespin has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-sigtran/+/39708?usp=email )
Change subject: AS loadsharing: Normal route distribution regardless of active state
......................................................................
AS loadsharing: Normal route distribution regardless of active state
Before this patch, the normal route for a given loadshare eSLS entry (seed)
would only be filled in with available routes.
That means that if eg. N routes are configured but only 1 is really
available upon startup and a lot of traffic happens, the full eSLS will
be filled with that route, and as a result all traffic on that combined
linkset will be sent through that route.
Instead, we want to populate the eSLS table with Normal Route field
properly distributed over all routes. If a given route is not active at
that time, then simply pick an Alternative Route during that time.
Change-Id: I6daf114416c69c84bdc3042efcaf2918f91c2e87
---
M src/osmo_ss7_combined_linkset.c
M src/ss7_combined_linkset.h
2 files changed, 54 insertions(+), 29 deletions(-)
Approvals:
osmith: Looks good to me, but someone else must approve
laforge: Looks good to me, but someone else must approve
pespin: Looks good to me, approved
Jenkins Builder: Verified
diff --git a/src/osmo_ss7_combined_linkset.c b/src/osmo_ss7_combined_linkset.c
index a741aba..b4cd914 100644
--- a/src/osmo_ss7_combined_linkset.c
+++ b/src/osmo_ss7_combined_linkset.c
@@ -151,11 +151,17 @@
}
/* Update round robin state */
- if (rt == clset->last_route_roundrobin) {
- ss7_llist_round_robin(&clset->routes, &clset->last_route_roundrobin, struct osmo_ss7_route, list);
+ if (rt == clset->last_route_roundrobin_ass) {
+ ss7_llist_round_robin(&clset->routes, &clset->last_route_roundrobin_ass, struct osmo_ss7_route, list);
/* If there's only one left, remove state: */
- if (rt == clset->last_route_roundrobin)
- clset->last_route_roundrobin = NULL;
+ if (rt == clset->last_route_roundrobin_ass)
+ clset->last_route_roundrobin_ass = NULL;
+ }
+ if (rt == clset->last_route_roundrobin_tx) {
+ ss7_llist_round_robin(&clset->routes, &clset->last_route_roundrobin_tx, struct osmo_ss7_route, list);
+ /* If there's only one left, remove state: */
+ if (rt == clset->last_route_roundrobin_tx)
+ clset->last_route_roundrobin_tx = NULL;
}
llist_del(&rt->list);
@@ -195,25 +201,37 @@
return NULL;
}
+/* Pick a Route from Combined Linkset in a round-robin fashion.
+ * During Loadshare eSLS table generation we want to pick Normal Route
+ * in a distributed fashion, regardless of active state (Alternative Route will
+ * be picked up temporarily later on if needed).
+ * Moreover, we must use a different index from the "active"
+ * ss7_combined_linkset_select_route_roundrobin() below, in order to avoid tainting
+ * the distribution.
+ */
+static struct osmo_ss7_route *ss7_combined_linkset_assign_route_roundrobin(struct osmo_ss7_combined_linkset *clset)
+{
+ struct osmo_ss7_route *rt;
+
+ for (unsigned int i = 0; i < clset->num_routes; i++) {
+ rt = ss7_llist_round_robin(&clset->routes, &clset->last_route_roundrobin_ass, struct osmo_ss7_route, list);
+ if (rt)
+ return rt;
+ }
+ return NULL;
+}
+
+/* Pick an available route from Combined Linkset in a round-robin fashion, to send a message through. */
static struct osmo_ss7_route *ss7_combined_linkset_select_route_roundrobin(struct osmo_ss7_combined_linkset *clset)
{
struct osmo_ss7_route *rt;
- struct osmo_ss7_route *rt_found = NULL;
- unsigned int i = 0;
- while (i < clset->num_routes) {
- i++;
- rt = ss7_llist_round_robin(&clset->routes, &clset->last_route_roundrobin, struct osmo_ss7_route, list);
- if (ss7_route_is_available(rt)) {
- rt_found = rt;
- break;
- }
+ for (unsigned int i = 0; i < clset->num_routes; i++) {
+ rt = ss7_llist_round_robin(&clset->routes, &clset->last_route_roundrobin_tx, struct osmo_ss7_route, list);
+ if (rt && ss7_route_is_available(rt))
+ return rt;
}
-
- if (!rt_found)
- return NULL;
-
- return rt_found;
+ return NULL;
}
struct osmo_ss7_route *
@@ -256,18 +274,24 @@
/* No normal route selected yet: */
if (!eslse->normal_rt) {
- rt = ss7_combined_linkset_select_route_roundrobin(clset);
- /* Either a normal route was selected or none found: */
+ /* Establish a Normal Route, regardless of available state: */
+ rt = ss7_combined_linkset_assign_route_roundrobin(clset);
+ /* No route found for Normal Route, regardless of state... */
+ if (!rt)
+ return NULL;
eslse->normal_rt = rt;
- if (rt) {
- LOGPCLSET(clset, DLSS7, LOGL_DEBUG, "RT loookup: OPC=%u=%s,DPC=%u=%s,SLS=%u -> eSLS=%u: "
- "picked Normal Route via '%s' round-robin style\n",
- rtlabel->opc, osmo_ss7_pointcode_print(inst, rtlabel->opc),
- rtlabel->dpc, osmo_ss7_pointcode_print2(inst, rtlabel->dpc),
- rtlabel->sls, esls,
- rt->dest.as ? rt->dest.as->cfg.name : "<linkset>");
+ LOGPCLSET(clset, DLSS7, LOGL_DEBUG, "RT loookup: OPC=%u=%s,DPC=%u=%s,SLS=%u -> eSLS=%u: "
+ "picked Normal Route via '%s' round-robin style\n",
+ rtlabel->opc, osmo_ss7_pointcode_print(inst, rtlabel->opc),
+ rtlabel->dpc, osmo_ss7_pointcode_print2(inst, rtlabel->dpc),
+ rtlabel->sls, esls,
+ rt->dest.as ? rt->dest.as->cfg.name : "<linkset>");
+ if (ss7_route_is_available(eslse->normal_rt)) {
+ /* Found available Normal Route: */
+ return eslse->normal_rt;
}
- return rt;
+ /* Normal Route was assigned, but it is not active, fall-through
+ * below to attempt transmission through Alternative Route: */
}
/* Normal route unavailable and no alternative route (or unavailable too).
diff --git a/src/ss7_combined_linkset.h b/src/ss7_combined_linkset.h
index b79810b..432ebd7 100644
--- a/src/ss7_combined_linkset.h
+++ b/src/ss7_combined_linkset.h
@@ -33,7 +33,8 @@
/*! list of \ref osmo_ss7_route */
struct llist_head routes;
unsigned int num_routes;
- void *last_route_roundrobin;
+ void *last_route_roundrobin_ass;
+ void *last_route_roundrobin_tx;
struct {
uint32_t pc;
--
To view, visit https://gerrit.osmocom.org/c/libosmo-sigtran/+/39708?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: merged
Gerrit-Project: libosmo-sigtran
Gerrit-Branch: master
Gerrit-Change-Id: I6daf114416c69c84bdc3042efcaf2918f91c2e87
Gerrit-Change-Number: 39708
Gerrit-PatchSet: 2
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>