neels has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/29208 )
Change subject: obs/lib/config.py: add osmo-upf
......................................................................
Patch Set 3:
This change is ready for review.
--
To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/29208
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-Change-Id: Ia65508eaf241b799b5d4b1b81eebdeaa40f4381e
Gerrit-Change-Number: 29208
Gerrit-PatchSet: 3
Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Comment-Date: Thu, 25 Aug 2022 13:58:24 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
Attention is currently required from: fixeria, msuraev.
neels has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-sccp/+/29084 )
Change subject: SIGTRAN: cache Optional Data for SCCP CR/CC/RLSD
......................................................................
Patch Set 14: Code-Review-1
(11 comments)
Patchset:
PS14:
(marked less important comments as resolved, right from the start)
File src/sccp_scoc.c:
https://gerrit.osmocom.org/c/libosmo-sccp/+/29084/comment/d07fbf8a_7ab12466
PS6, Line 583: /* Cache the optional data (if necessary) and return indication whether cache was used */
> It would create unnecessary inconvenience for the caller. […]
you are by definition fiddling with the data when dropping the optional data.
ah ok i see, you pass a bool into the encoding function instead of modifying the source message. (I think it's a good idea to modify the message to be sent, plus some other design choices that could be more clear, but i'm bike-shedding)
https://gerrit.osmocom.org/c/libosmo-sccp/+/29084/comment/e756994a_deca92c8
PS6, Line 1003: /* N. B: we've ignored CREF sending errors as there's no recovery option anyway */
> Why unrelated? It's certainly worth it to explain why in the above case we use cache while in here w […]
(would be nicer to have a separate patch for adding missing comments)
File src/sccp_scoc.c:
https://gerrit.osmocom.org/c/libosmo-sccp/+/29084/comment/a531d541_42daaa19
PS8, Line 659: break
> Yes?
drop the "break;"
File src/sccp_scoc.c:
https://gerrit.osmocom.org/c/libosmo-sccp/+/29084/comment/3c0f008d_16bdbde9
PS14, Line 594: sua
should this be m3ua? @laforge?
https://gerrit.osmocom.org/c/libosmo-sccp/+/29084/comment/a1bf4766_f1391f10
PS14, Line 653: static bool xua_opt_data_length_lim(struct sccp_connection *conn, const struct osmo_scu_prim *prim, int msg_type)
(this function is decribed as checking a length and returning a bool, but there is an actual data transmisison triggered in here. It would be good to have a clear name and API comment.)
https://gerrit.osmocom.org/c/libosmo-sccp/+/29084/comment/6d7de0c4_b74d1033
PS14, Line 675: There's no need to cache the optional data since the connection is still active at this point
(is this comment accurate? i don't understand it...
so the situation here is
A B
------> DT1
------> RLSD
right?
how about "Directly send Optional Data first, if it does not fit in the RLSD msg" )
https://gerrit.osmocom.org/c/libosmo-sccp/+/29084/comment/605c6ef9_1a395e16
PS14, Line 713: /* optional: importance */
(would be nicer to have a separate patch for adding missing comments)
https://gerrit.osmocom.org/c/libosmo-sccp/+/29084/comment/4b0eab21_2197bd12
PS14, Line 734: /* optional: importance */
(would be nicer to have a separate patch for adding missing comments)
https://gerrit.osmocom.org/c/libosmo-sccp/+/29084/comment/efb08c53_8a3dfae9
PS14, Line 789: /* optional: importance */
(would be nicer to have a separate patch for adding missing comments)
https://gerrit.osmocom.org/c/libosmo-sccp/+/29084/comment/0b91622a_b0ab061a
PS14, Line 1110: xua_opt_data_send_cache(conn, SUA_CO_CORE, xua->hdr.msg_class);
I think this is mixed up somehow.
This is about too much data in the Connection Request.
It should be:
A B
------> Conn Req (cache Optional Data)
<------ Conn Conf
------> DT1 with cached data
This code here looks like
A B
------> Conn Req
<------ DT1 with cached data (there is no cached data??)
<------ Conn Conf
--
To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/29084
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmo-sccp
Gerrit-Branch: master
Gerrit-Change-Id: I0033faf9da393418930252233ce74d62cd1cef8a
Gerrit-Change-Number: 29084
Gerrit-PatchSet: 14
Gerrit-Owner: msuraev <msuraev(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Attention: msuraev <msuraev(a)sysmocom.de>
Gerrit-Comment-Date: Wed, 24 Aug 2022 23:59:31 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Comment-In-Reply-To: neels <nhofmeyr(a)sysmocom.de>
Comment-In-Reply-To: fixeria <vyanitskiy(a)sysmocom.de>
Comment-In-Reply-To: msuraev <msuraev(a)sysmocom.de>
Gerrit-MessageType: comment
neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-upf/+/29210 )
Change subject: Allow running without a GTP dev
......................................................................
Allow running without a GTP dev
Allow running without opening a GTP dev for encapsulation/decapsulation.
Probe and open the mnl socket for talking to the GTP kernel module only
when actual GTP devices exist in the config.
A site that is only doing tunnel proxying via netfilter hence does not
require GTP support in the kernel.
Change-Id: Ibb79b3ce1906136f77a895ff6f691d72a92c9fb9
---
M include/osmocom/upf/upf_gtp.h
M src/osmo-upf/osmo_upf_main.c
M src/osmo-upf/upf_gtp.c
3 files changed, 8 insertions(+), 10 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-upf refs/changes/10/29210/1
diff --git a/include/osmocom/upf/upf_gtp.h b/include/osmocom/upf/upf_gtp.h
index a67c850..1e0df5e 100644
--- a/include/osmocom/upf/upf_gtp.h
+++ b/include/osmocom/upf/upf_gtp.h
@@ -69,7 +69,7 @@
int upf_gtp_tun_desc_cmp(const struct upf_gtp_tun_desc *a, const struct upf_gtp_tun_desc *b);
-int upf_gtp_genl_open();
+int upf_gtp_genl_ensure_open();
void upf_gtp_genl_close();
int upf_gtp_dev_open(const char *name, bool create_gtp_dev, const char *local_addr, bool listen_for_gtpv0,
diff --git a/src/osmo-upf/osmo_upf_main.c b/src/osmo-upf/osmo_upf_main.c
index b4888af..65a0e84 100644
--- a/src/osmo-upf/osmo_upf_main.c
+++ b/src/osmo-upf/osmo_upf_main.c
@@ -331,9 +331,6 @@
}
}
- if (upf_gtp_genl_open())
- return -1;
-
if (upf_gtp_devs_open())
return -1;
diff --git a/src/osmo-upf/upf_gtp.c b/src/osmo-upf/upf_gtp.c
index 6280e45..d75e8d7 100644
--- a/src/osmo-upf/upf_gtp.c
+++ b/src/osmo-upf/upf_gtp.c
@@ -183,6 +183,12 @@
dev->sgsn_mode = sgsn_mode;
+ rc = upf_gtp_genl_ensure_open();
+ if (rc) {
+ LOG_GTP_DEV(dev, LOGL_ERROR, "Cannot set up GTP device, failed to open mnl_socket\n");
+ return rc;
+ }
+
if (listen_for_gtpv0) {
rc = osmo_sock_init_osa_ofd(&dev->gtpv0.ofd, SOCK_DGRAM, 0, &dev->gtpv0.local_addr, &any,
OSMO_SOCK_F_BIND);
@@ -255,13 +261,8 @@
}
/* Open an MNL socket which allows to create and remove GTP devices (requires CAP_NET_ADMIN). */
-int upf_gtp_genl_open()
+int upf_gtp_genl_ensure_open()
{
- if (g_upf->gtp.mockup) {
- LOGP(DGTP, LOGL_NOTICE, "gtp/mockup active: not opening mnl_socket\n");
- return 0;
- }
-
/* Already open? */
if (g_upf->gtp.nl && g_upf->gtp.genl_id >= 0)
return 0;
--
To view, visit https://gerrit.osmocom.org/c/osmo-upf/+/29210
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-upf
Gerrit-Branch: master
Gerrit-Change-Id: Ibb79b3ce1906136f77a895ff6f691d72a92c9fb9
Gerrit-Change-Number: 29210
Gerrit-PatchSet: 1
Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de>
Gerrit-MessageType: newchange