Attention is currently required from: laforge, lynxis lazus.
Hello Jenkins Builder, laforge,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/osmo-sgsn/+/39294?usp=email
to look at the new patch set (#4).
The following approvals got outdated and were removed:
Code-Review+1 by laforge, Verified+1 by Jenkins Builder
Change subject: Assign MME GroupId/Code to remote MMEs
......................................................................
Assign MME GroupId/Code to remote MMEs
In preparation to route SGSN Context Req/Resp/Ack the SGSN
need to route GTP messages based on the MME GroupId and MME Code.
Change-Id: I881aeba904fb6ca815842d36e466a2459ad81913
---
M include/osmocom/sgsn/gtp_mme.h
M src/sgsn/gtp_mme.c
M src/sgsn/sgsn_vty.c
3 files changed, 61 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-sgsn refs/changes/94/39294/4
--
To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/39294?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newpatchset
Gerrit-Project: osmo-sgsn
Gerrit-Branch: master
Gerrit-Change-Id: I881aeba904fb6ca815842d36e466a2459ad81913
Gerrit-Change-Number: 39294
Gerrit-PatchSet: 4
Gerrit-Owner: lynxis lazus <lynxis(a)fe80.eu>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-CC: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-CC: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Attention: lynxis lazus <lynxis(a)fe80.eu>
Attention is currently required from: lynxis lazus.
fixeria has posted comments on this change by lynxis lazus. ( https://gerrit.osmocom.org/c/osmo-sgsn/+/39294?usp=email )
Change subject: Assign MME GroupId/Code to remote MMEs
......................................................................
Patch Set 3:
(1 comment)
File src/sgsn/gtp_mme.c:
https://gerrit.osmocom.org/c/osmo-sgsn/+/39294/comment/0b22db0a_3999d25c?us… :
PS3, Line 138: osmo_gummei_cmp
Shouldn't you check `gummei_valid` before invoking `osmo_gummei_cmp()`? Otherwise you're comparing the given GUMMEI against a garbage or zero-initialized field? Even worse, this function will still yield a result even though the operator did `no gummei` via the VTY...
--
To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/39294?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: osmo-sgsn
Gerrit-Branch: master
Gerrit-Change-Id: I881aeba904fb6ca815842d36e466a2459ad81913
Gerrit-Change-Number: 39294
Gerrit-PatchSet: 3
Gerrit-Owner: lynxis lazus <lynxis(a)fe80.eu>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-CC: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-CC: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: lynxis lazus <lynxis(a)fe80.eu>
Gerrit-Comment-Date: Mon, 17 Feb 2025 20:27:24 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Attention is currently required from: csaba.sipos, domi, fixeria, laforge.
pespin has posted comments on this change by csaba.sipos. ( https://gerrit.osmocom.org/c/osmo-bsc/+/39416?usp=email )
Change subject: nokia_site: Add object_identity, object_state and object_identity_state attributes
......................................................................
Patch Set 22:
(1 comment)
Patchset:
PS22:
> Is there anything missing on our end to get this merged?
Just waiting for somebody else to +2 it.
--
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/39416?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: Id9f819b0649ba3c247db72d7d738e49c72388dc3
Gerrit-Change-Number: 39416
Gerrit-PatchSet: 22
Gerrit-Owner: csaba.sipos <metro4(a)freemail.hu>
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-CC: domi <domi(a)tomcsanyi.net>
Gerrit-Attention: csaba.sipos <metro4(a)freemail.hu>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Attention: domi <domi(a)tomcsanyi.net>
Gerrit-Comment-Date: Mon, 17 Feb 2025 20:18:07 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: csaba.sipos <metro4(a)freemail.hu>
Attention is currently required from: domi, fixeria, laforge.
csaba.sipos has posted comments on this change by csaba.sipos. ( https://gerrit.osmocom.org/c/osmo-bsc/+/39416?usp=email )
Change subject: nokia_site: Add object_identity, object_state and object_identity_state attributes
......................................................................
Patch Set 22:
(1 comment)
Patchset:
PS22:
Is there anything missing on our end to get this merged?
--
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/39416?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: Id9f819b0649ba3c247db72d7d738e49c72388dc3
Gerrit-Change-Number: 39416
Gerrit-PatchSet: 22
Gerrit-Owner: csaba.sipos <metro4(a)freemail.hu>
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-CC: domi <domi(a)tomcsanyi.net>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Attention: domi <domi(a)tomcsanyi.net>
Gerrit-Comment-Date: Mon, 17 Feb 2025 20:15:13 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-upf/+/39568?usp=email )
Change subject: Introduce hashtable to look up gtp_tundev by local TEID
......................................................................
Introduce hashtable to look up gtp_tundev by local TEID
Use this hashtable while looking up for tunend based on
<access.local.teid, access.remote.teid, access.remote.addr>.
This kind of look up is used every time a session is added or removed,
which means potentially thousands of tunend sessions were being iterated
linerarly every time.
For simplification (easier/quicker hashtable key generation), reduce the
whole key presented above to a more general one based on
"access.local.teid". This is usually enough since we are anyways
allocating local TEIDs globally per tunnel without caring about remote
address.
Change-Id: Ib12ecc8ce87175071c52c0ed2217a29d901f0f05
---
M include/osmocom/upf/upf_gtp.h
M src/osmo-upf/upf_gtp.c
2 files changed, 10 insertions(+), 2 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-upf refs/changes/68/39568/1
diff --git a/include/osmocom/upf/upf_gtp.h b/include/osmocom/upf/upf_gtp.h
index b4cd3df..1162861 100644
--- a/include/osmocom/upf/upf_gtp.h
+++ b/include/osmocom/upf/upf_gtp.h
@@ -24,6 +24,7 @@
#pragma once
#include <osmocom/core/linuxlist.h>
+#include <osmocom/core/hashtable.h>
#include <osmocom/core/select.h>
#include <osmocom/core/logging.h>
@@ -55,6 +56,8 @@
/* list of struct upf_gtp_tunend */
struct llist_head tunnels;
+ /* hashtable of (struct upf_gtp_tunen) with key desc.access.local.teid */
+ DECLARE_HASHTABLE(tunnels_by_local_f_teid, 10);
};
/* Description of a GTP encapsulation / decapsulation.
diff --git a/src/osmo-upf/upf_gtp.c b/src/osmo-upf/upf_gtp.c
index 528937b..4cbebcd 100644
--- a/src/osmo-upf/upf_gtp.c
+++ b/src/osmo-upf/upf_gtp.c
@@ -134,6 +134,7 @@
.gtpv1.ofd.fd = -1,
};
INIT_LLIST_HEAD(&dev->tunnels);
+ hash_init(dev->tunnels_by_local_f_teid);
osmo_sockaddr_str_from_str(&addr_conv, local_addr, PORT_GTP0_U);
@@ -318,7 +319,8 @@
}
struct upf_gtp_tunend {
- struct llist_head entry;
+ struct llist_head entry; /* item in (struct upf_gtp_dev)->tunnels */
+ struct hlist_node node_by_local_f_teid; /* item in g_upf->gtp.pdrs_by_local_f_teid */
struct upf_gtp_dev *dev;
struct upf_tunend desc;
@@ -349,6 +351,7 @@
{
if (tun->active)
upf_gtp_tunend_deactivate(tun);
+ hash_del(&tun->node_by_local_f_teid);
llist_del(&tun->entry);
return 0;
}
@@ -369,6 +372,7 @@
.dev = dev,
.desc = *desc,
};
+ hash_add(dev->tunnels_by_local_f_teid, &tun->node_by_local_f_teid, tun->desc.access.local.teid);
llist_add(&tun->entry, &dev->tunnels);
talloc_set_destructor(tun, upf_gtp_tunend_destruct);
return tun;
@@ -425,7 +429,8 @@
{
struct upf_gtp_tunend *tun;
tunend_validate(tunend);
- llist_for_each_entry(tun, &dev->tunnels, entry) {
+
+ hash_for_each_possible(dev->tunnels_by_local_f_teid, tun, node_by_local_f_teid, tunend->access.local.teid) {
if (upf_gtp_tunend_cmp(tunend, &tun->desc))
continue;
return tun;
--
To view, visit https://gerrit.osmocom.org/c/osmo-upf/+/39568?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: osmo-upf
Gerrit-Branch: master
Gerrit-Change-Id: Ib12ecc8ce87175071c52c0ed2217a29d901f0f05
Gerrit-Change-Number: 39568
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
fixeria has submitted this change. ( https://gerrit.osmocom.org/c/erlang/osmo-s1gw/+/39556?usp=email )
Change subject: s1ap_proxy: catch exceptions in handle_pdu/2
......................................................................
s1ap_proxy: catch exceptions in handle_pdu/2
We do have a try-catch block in handle_pdu_bin/2 that does catch
exceptions happening in decode_pdu/1, but does not catch anything
else. For instance, if something goes wrong in handle_pdu/2,
the whole process will be terminated, among with all the linked
E-RAB FSMs. This should definitely be avoided.
Change-Id: Ib1e6674f5b85557866c7beaea710ea903e4eeaca
---
M src/s1ap_proxy.erl
1 file changed, 7 insertions(+), 1 deletion(-)
Approvals:
pespin: Looks good to me, but someone else must approve
laforge: Looks good to me, but someone else must approve
fixeria: Looks good to me, approved
Jenkins Builder: Verified
diff --git a/src/s1ap_proxy.erl b/src/s1ap_proxy.erl
index 56e5dee..0cef81e 100644
--- a/src/s1ap_proxy.erl
+++ b/src/s1ap_proxy.erl
@@ -215,7 +215,7 @@
try decode_pdu(OrigData) of
{ok, PDU} ->
?LOG_DEBUG("Rx S1AP PDU: ~p", [PDU]),
- case handle_pdu(PDU, S0) of
+ try handle_pdu(PDU, S0) of
{{Action, NewPDU}, S1} ->
{ok, NewData} = encode_pdu(NewPDU),
?LOG_DEBUG("Tx (~p) S1AP PDU: ~p", [Action, NewPDU]),
@@ -232,6 +232,12 @@
s1gw_metrics:ctr_inc(?S1GW_CTR_S1AP_PROXY_OUT_PKT_FWD_ALL),
s1gw_metrics:ctr_inc(?S1GW_CTR_S1AP_PROXY_OUT_PKT_FWD_UNMODIFIED),
{{forward, OrigData}, S1}
+ catch
+ Exception:Reason:StackTrace ->
+ ?LOG_ERROR("An exception occurred: ~p, ~p, ~p", [Exception, Reason, StackTrace]),
+ s1gw_metrics:ctr_inc(?S1GW_CTR_S1AP_PROXY_EXCEPTION),
+ s1gw_metrics:ctr_inc(?S1GW_CTR_S1AP_PROXY_OUT_PKT_FWD_UNMODIFIED),
+ {{forward, OrigData}, S0} %% XXX: proxy as-is or drop?
end;
{error, {asn1, Error}} ->
?LOG_ERROR("S1AP PDU decoding failed: ~p", [Error]),
--
To view, visit https://gerrit.osmocom.org/c/erlang/osmo-s1gw/+/39556?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: merged
Gerrit-Project: erlang/osmo-s1gw
Gerrit-Branch: master
Gerrit-Change-Id: Ib1e6674f5b85557866c7beaea710ea903e4eeaca
Gerrit-Change-Number: 39556
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>
Attention is currently required from: pespin.
fixeria has posted comments on this change by fixeria. ( https://gerrit.osmocom.org/c/erlang/osmo-s1gw/+/39556?usp=email )
Change subject: s1ap_proxy: catch exceptions in handle_pdu/2
......................................................................
Patch Set 1: Code-Review+2
(1 comment)
File src/s1ap_proxy.erl:
https://gerrit.osmocom.org/c/erlang/osmo-s1gw/+/39556/comment/3056dcff_e2e0… :
PS1, Line 240: {{forward, OrigData}, S0} %% XXX: proxy as-is or drop?
> ... once processing of packets is split into multiple steps (parsing, processing, transmitting)
If you carefully look at the code, you'll see that it's already done in three steps:
* `decode_pdu/1` - parsing/decoding,
* `handle_pdu/2` - processing (patching),
* `encode_pdu/1` and return - encoding and sending.
> ... the best would be to look at the parsed message type and answer accordingly eg. rejecting the request?
The message type is already known here, as well as the criticality, so we can improve this aspect in follow-up patches. For now I simply want to address one specific problem: crashing process and loosing all E-RABs if something goes wrong in `handle_pdu/2`.
--
To view, visit https://gerrit.osmocom.org/c/erlang/osmo-s1gw/+/39556?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: erlang/osmo-s1gw
Gerrit-Branch: master
Gerrit-Change-Id: Ib1e6674f5b85557866c7beaea710ea903e4eeaca
Gerrit-Change-Number: 39556
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, 17 Feb 2025 17:19:01 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Comment-In-Reply-To: pespin <pespin(a)sysmocom.de>