Attention is currently required from: jolly.
pespin has posted comments on this change by jolly. ( https://gerrit.osmocom.org/c/libosmocore/+/40491?usp=email )
Change subject: Add multiple messages buffers to struct iofd_msghdr
......................................................................
Patch Set 3: Code-Review-1
(4 comments)
Patchset:
PS3:
I'm not sure I'm understanding this commit. You are adding arrays but only using the first one despite configuring the global variable to something != 1?
This shouldn't be submitted like this alone imho.
File src/core/osmo_io.c:
https://gerrit.osmocom.org/c/libosmocore/+/40491/comment/f5d41077_e8478105?… :
PS3, Line 165: hdr->msg_max = (g_io_backend == OSMO_IO_BACKEND_IO_URING) ? g_io_uring_iov : 1;
this info should be obtained from osmo_io_fd struct.
https://gerrit.osmocom.org/c/libosmocore/+/40491/comment/b77abd4b_03d9c085?… :
PS3, Line 406: struct msgb *msg = msghdr->msg[0];
why is this and below always [0]?
File src/core/osmo_io_internal.h:
https://gerrit.osmocom.org/c/libosmocore/+/40491/comment/b2a486b1_a188b6b3?… :
PS3, Line 140: int msg_max;
this field should probably be in struct osmo_iofd.
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/40491?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I4fb1067de4615cc22cc6caf99b481491e7f2ef92
Gerrit-Change-Number: 40491
Gerrit-PatchSet: 3
Gerrit-Owner: jolly <andreas(a)eversberg.eu>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: jolly <andreas(a)eversberg.eu>
Gerrit-Comment-Date: Fri, 04 Jul 2025 13:54:10 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Attention is currently required from: jolly.
pespin has posted comments on this change by jolly. ( https://gerrit.osmocom.org/c/libosmocore/+/40491?usp=email )
Change subject: Add multiple messages buffers to struct iofd_msghdr
......................................................................
Patch Set 3:
(1 comment)
File src/core/osmo_io_uring.c:
https://gerrit.osmocom.org/c/libosmocore/+/40491/comment/c32b5dec_2317b491?… :
PS3, Line 110: g_io_uring_iov = atoi(env);
afaict this is not some information which is needed really early in the startup of the program, before logging, etc. (the reason why we have an envvar to set the osmo_io backend), hence I think this new config shouldn't be an envvar, but rather some config to set using an API on a given osmo_iofd or similar, which then the app developer can tweak based on socket requirements.
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/40491?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I4fb1067de4615cc22cc6caf99b481491e7f2ef92
Gerrit-Change-Number: 40491
Gerrit-PatchSet: 3
Gerrit-Owner: jolly <andreas(a)eversberg.eu>
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: jolly <andreas(a)eversberg.eu>
Gerrit-Comment-Date: Fri, 04 Jul 2025 13:49:11 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Attention is currently required from: jolly.
pespin has posted comments on this change by jolly. ( https://gerrit.osmocom.org/c/libosmocore/+/40584?usp=email )
Change subject: osmo-io: Append received message to pending message segment
......................................................................
Patch Set 1: Code-Review-1
(2 comments)
Commit Message:
https://gerrit.osmocom.org/c/libosmocore/+/40584/comment/035600be_08802272?… :
PS1, Line 9: If there is pending data of an incomplete segmented message, received
Would you mind rewriting this?
The way it is written makes it not really clear what the previous state was, what the patch changes, etc.
Specially since you say some stuff will be done in a later patch. So I'm not sure if you are breaking previously working stuff or what.
File src/core/osmo_io.c:
https://gerrit.osmocom.org/c/libosmocore/+/40584/comment/436bb2b9_175cb01d?… :
PS1, Line 303: msg_pending = iofd_msgb_alloc2(iofd, extra_len);
afaiu this is wrong. You are confusing the received_len with the size of the msgb.
What you'd want to pass here is, in the event that "expected_len > iofd->msgb_alloc.size" (which shouldn't happen imho, and in that case it would be a bug of the user of osmo_iodf when configuring it based on protocol expectancies):
iofd_msgb_alloc2(iofd, expected_len - iofd->msgb_alloc.size);
In any case, this would also break the assumption on the user that the msgbs obtained are of a certain configured length.
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/40584?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I08df9736ccc5e9a7df61ca6dcf94629ee010752f
Gerrit-Change-Number: 40584
Gerrit-PatchSet: 1
Gerrit-Owner: jolly <andreas(a)eversberg.eu>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: jolly <andreas(a)eversberg.eu>
Gerrit-Comment-Date: Fri, 04 Jul 2025 13:45:40 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Attention is currently required from: jolly.
pespin has posted comments on this change by jolly. ( https://gerrit.osmocom.org/c/libosmocore/+/40490?usp=email )
Change subject: Submit all SQEs to kernel if they don't fit in the io_uring
......................................................................
Patch Set 3: Code-Review-1
(1 comment)
File src/core/osmo_io_uring.c:
https://gerrit.osmocom.org/c/libosmocore/+/40490/comment/88a3ad63_028b3dfa?… :
PS3, Line 139: sqe = io_uring_get_sqe(&g_ring.ring);
I bet this can still probably return NULL since between call to io_uring_submit() and this line the kernel may not have had time to process any sqe in the queue.
hence probably the OSMO_ASSERT(sqe) below will potentially be false at some point.
Feel free to tell me I'm wrong, I'm just assuming the behavior/API here.
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/40490?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I476d9db285a1d257a4a5d43ee45ee0116c7d7009
Gerrit-Change-Number: 40490
Gerrit-PatchSet: 3
Gerrit-Owner: jolly <andreas(a)eversberg.eu>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: jolly <andreas(a)eversberg.eu>
Gerrit-Comment-Date: Fri, 04 Jul 2025 13:37:03 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Attention is currently required from: jolly.
pespin has posted comments on this change by jolly. ( https://gerrit.osmocom.org/c/libosmocore/+/40489?usp=email )
Change subject: Allow io_uring_submit batching just ahead of poll/select
......................................................................
Patch Set 1:
(1 comment)
Patchset:
PS1:
Several comments:
* Do we really want to have this configurable over envvar? what's the reasoning? to be able to temporarily spot failures and compare?
* It probably makes sense to change the patch to do the following, to avoid calling io_uring_submit() every loop iteration unconditionally:
* in rubmit_rx, submit_tx, etc, if we had to call io_uring_submit() then set some new global var "io_uring_submit_needed" to true.
* during the poll loop iteration, only call io_uring_submit() if the var was set to true, and set it to false again.
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/40489?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: Id34fe2ced32c63d15b14810e145744f7509064cc
Gerrit-Change-Number: 40489
Gerrit-PatchSet: 1
Gerrit-Owner: jolly <andreas(a)eversberg.eu>
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: laforge <laforge(a)osmocom.org>
Gerrit-CC: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: jolly <andreas(a)eversberg.eu>
Gerrit-Comment-Date: Fri, 04 Jul 2025 13:34:28 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmo-sigtran/+/40586?usp=email )
Change subject: vty: Make sure user doesn't configure AS in ASP role with a non-local PC as routing-key
......................................................................
vty: Make sure user doesn't configure AS in ASP role with a non-local PC as routing-key
AS in ASP mode doesn't expect to route incomign traffic to other nodes.
They are expected to announce its routing-key (local PC) to the SG so it
knows how to reach it and in turn announce (un)availability to other
SG/ASPs in the network.
Change-Id: Ibbf990fd8dcbdc67ebc4118597b34a5767320cf6
---
M src/ss7_as_vty.c
1 file changed, 9 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmo-sigtran refs/changes/86/40586/1
diff --git a/src/ss7_as_vty.c b/src/ss7_as_vty.c
index 0b0ddc1..7a01e46 100644
--- a/src/ss7_as_vty.c
+++ b/src/ss7_as_vty.c
@@ -581,6 +581,15 @@
struct osmo_ss7_as *as = vty->index;
vty->node = L_CS7_NODE;
vty->index = as->inst;
+
+ /* Config sanity checks: */
+
+ /* AS in ASP role should be configured with a local PC which they can
+ * then announce using RKM: */
+ if (ss7_as_get_local_role(as) == OSMO_SS7_ASP_ROLE_ASP &&
+ !osmo_ss7_pc_is_local(as->inst, as->cfg.routing_key.pc))
+ vty_out(vty, "%% AS with local role ASP should have a local PC configured in its routing-key. Fix your config!%s", VTY_NEWLINE);
+
return 0;
}
--
To view, visit https://gerrit.osmocom.org/c/libosmo-sigtran/+/40586?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: Ibbf990fd8dcbdc67ebc4118597b34a5767320cf6
Gerrit-Change-Number: 40586
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmo-sigtran/+/40585?usp=email )
Change subject: Make helper function available as internal ss7_as API
......................................................................
Make helper function available as internal ss7_as API
This API will be used in more places starting with follow-up commit.
Change-Id: I818efd9e864fe0bd624a2ff1cba5ccd1d49939c5
---
M src/ss7_as.c
M src/ss7_as.h
M src/xua_as_fsm.c
3 files changed, 23 insertions(+), 21 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmo-sigtran refs/changes/85/40585/1
diff --git a/src/ss7_as.c b/src/ss7_as.c
index 16da09f..b4eb439 100644
--- a/src/ss7_as.c
+++ b/src/ss7_as.c
@@ -274,6 +274,27 @@
return cnt;
}
+/* Determine which role (SG/ASP/IPSP) we operate in.
+ * return enum osmo_ss7_asp_role on success, negative otherwise. */
+int ss7_as_get_local_role(const struct osmo_ss7_as *as)
+{
+ unsigned int i;
+
+ /* this is a bit tricky. "osmo_ss7_as" has no configuration of a role,
+ * only the ASPs have. As they all must be of the same role, let's simply
+ * find the first one and return its role */
+ for (i = 0; i < ARRAY_SIZE(as->cfg.asps); i++) {
+ struct osmo_ss7_asp *asp = as->cfg.asps[i];
+
+ if (!asp)
+ continue;
+
+ return asp->cfg.role;
+ }
+ /* No ASPs associated to this AS yet? */
+ return -1;
+}
+
/*! Determine if given AS is in the active state.
* \param[in] as Application Server.
* \returns true in case as is active; false otherwise. */
diff --git a/src/ss7_as.h b/src/ss7_as.h
index fe1d86b..be10f48 100644
--- a/src/ss7_as.h
+++ b/src/ss7_as.h
@@ -133,6 +133,7 @@
unsigned int osmo_ss7_as_count_asp(const struct osmo_ss7_as *as);
int ss7_as_add_asp(struct osmo_ss7_as *as, struct osmo_ss7_asp *asp);
+int ss7_as_get_local_role(const struct osmo_ss7_as *as);
void ss7_as_loadshare_binding_table_reset(struct osmo_ss7_as *as);
#define LOGPAS(as, subsys, level, fmt, args ...) \
diff --git a/src/xua_as_fsm.c b/src/xua_as_fsm.c
index 7d8e302..7afcb6d 100644
--- a/src/xua_as_fsm.c
+++ b/src/xua_as_fsm.c
@@ -150,26 +150,6 @@
return sent;
}
-/* determine which role (SG/ASP/IPSP) we operate in */
-static int get_local_role(struct osmo_ss7_as *as)
-{
- unsigned int i;
-
- /* this is a bit tricky. "osmo_ss7_as" has no configuration of a role,
- * only the ASPs have. As they all must be of the same role, let's simply
- * find the first one and return its role */
- for (i = 0; i < ARRAY_SIZE(as->cfg.asps); i++) {
- struct osmo_ss7_asp *asp = as->cfg.asps[i];
-
- if (!asp)
- continue;
-
- return asp->cfg.role;
- }
- /* we don't have any ASPs in this AS? Strange */
- return -1;
-}
-
static struct msgb *xua_as_encode_msg(const struct osmo_ss7_as *as, struct xua_msg *xua)
{
switch (as->cfg.proto) {
@@ -537,7 +517,7 @@
bool became_available = (old_state != XUA_AS_S_ACTIVE && fi->state == XUA_AS_S_ACTIVE);
bool became_unavailable = (old_state == XUA_AS_S_ACTIVE && fi->state != XUA_AS_S_ACTIVE);
- int role = get_local_role(xafp->as);
+ int role = ss7_as_get_local_role(xafp->as);
switch (role) {
case OSMO_SS7_ASP_ROLE_ASP:
--
To view, visit https://gerrit.osmocom.org/c/libosmo-sigtran/+/40585?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: I818efd9e864fe0bd624a2ff1cba5ccd1d49939c5
Gerrit-Change-Number: 40585
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Attention is currently required from: daniel, laforge.
pespin has posted comments on this change by pespin. ( https://gerrit.osmocom.org/c/osmo-bsc/+/40562?usp=email )
Change subject: bsc: Make sure MSC PC is added to sccp-addressbook
......................................................................
Patch Set 2:
(1 comment)
Patchset:
PS2:
ping
--
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/40562?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: I57dca92eb5f482e9017d9b19cd7f8feebd9e2721
Gerrit-Change-Number: 40562
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: daniel <dwillmann(a)sysmocom.de>
Gerrit-Comment-Date: Fri, 04 Jul 2025 11:57:26 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No