Attention is currently required from: daniel, laforge.
fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-netif/+/35072?usp=email )
Change subject: Introduce generic osmo_stream_{cli,srv}_get_fd() API
......................................................................
Patch Set 3: Code-Review+1
--
To view, visit https://gerrit.osmocom.org/c/libosmo-netif/+/35072?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmo-netif
Gerrit-Branch: master
Gerrit-Change-Id: Ib0737f21150f6ac8d524b92c7ddb098f2afdeaab
Gerrit-Change-Number: 35072
Gerrit-PatchSet: 3
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel <dwillmann(a)sysmocom.de>
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Attention: daniel <dwillmann(a)sysmocom.de>
Gerrit-Comment-Date: Tue, 21 Nov 2023 19:26:09 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
Attention is currently required from: daniel, fixeria.
laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-netif/+/35072?usp=email )
Change subject: Introduce generic osmo_stream_{cli,srv}_get_fd() API
......................................................................
Patch Set 2:
(2 comments)
File src/stream_cli.c:
https://gerrit.osmocom.org/c/libosmo-netif/+/35072/comment/1b1d7c50_9bab7d38
PS1, Line 214: to modify
> I guess I meant to say that this comment is not actually related to this function, because the `*cli […]
Done
https://gerrit.osmocom.org/c/libosmo-netif/+/35072/comment/d6d3a9e0_70e3d1f8
PS1, Line 215: File descriptor
> `... […]
Done
--
To view, visit https://gerrit.osmocom.org/c/libosmo-netif/+/35072?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmo-netif
Gerrit-Branch: master
Gerrit-Change-Id: Ib0737f21150f6ac8d524b92c7ddb098f2afdeaab
Gerrit-Change-Number: 35072
Gerrit-PatchSet: 2
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel <dwillmann(a)sysmocom.de>
Gerrit-CC: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Attention: daniel <dwillmann(a)sysmocom.de>
Gerrit-Comment-Date: Tue, 21 Nov 2023 19:25:31 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: laforge <laforge(a)osmocom.org>
Comment-In-Reply-To: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-MessageType: comment
Attention is currently required from: daniel, laforge.
Hello Jenkins Builder, daniel,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/libosmo-netif/+/35072?usp=email
to look at the new patch set (#3).
The following approvals got outdated and were removed:
Verified+1 by Jenkins Builder
Change subject: Introduce generic osmo_stream_{cli,srv}_get_fd() API
......................................................................
Introduce generic osmo_stream_{cli,srv}_get_fd() API
The old osmo_stream_{cli,srv}_get_ofd() API only works for streams
in OSMO_FD mode. However, it is legitimate for an application
wanting to get low-level access to the file descriptor, for example
to issue some {get,set}sockopt() calls on it.
Change-Id: Ib0737f21150f6ac8d524b92c7ddb098f2afdeaab
Related: OS#5753
---
M include/osmocom/netif/stream.h
M src/stream_cli.c
M src/stream_srv.c
3 files changed, 45 insertions(+), 6 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmo-netif refs/changes/72/35072/3
--
To view, visit https://gerrit.osmocom.org/c/libosmo-netif/+/35072?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmo-netif
Gerrit-Branch: master
Gerrit-Change-Id: Ib0737f21150f6ac8d524b92c7ddb098f2afdeaab
Gerrit-Change-Number: 35072
Gerrit-PatchSet: 3
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel <dwillmann(a)sysmocom.de>
Gerrit-CC: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Attention: daniel <dwillmann(a)sysmocom.de>
Gerrit-MessageType: newpatchset
Attention is currently required from: laforge.
fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-netif/+/35072?usp=email )
Change subject: Introduce generic osmo_stream_{cli,srv}_get_fd() API
......................................................................
Patch Set 1:
(1 comment)
File src/stream_cli.c:
https://gerrit.osmocom.org/c/libosmo-netif/+/35072/comment/560981c4_9b387fcc
PS1, Line 214: to modify
> well, I am turning the function from a static function into a public API, and at the same time I'm f […]
I guess I meant to say that this comment is not actually related to this function, because the `*cli` argument is const and you're are actually not modifying it. Sorry for confusion :)
--
To view, visit https://gerrit.osmocom.org/c/libosmo-netif/+/35072?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmo-netif
Gerrit-Branch: master
Gerrit-Change-Id: Ib0737f21150f6ac8d524b92c7ddb098f2afdeaab
Gerrit-Change-Number: 35072
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel <dwillmann(a)sysmocom.de>
Gerrit-CC: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Comment-Date: Tue, 21 Nov 2023 19:24:03 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: laforge <laforge(a)osmocom.org>
Comment-In-Reply-To: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-MessageType: comment
Attention is currently required from: daniel, laforge.
Hello Jenkins Builder, daniel,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/libosmo-netif/+/35072?usp=email
to look at the new patch set (#2).
The following approvals got outdated and were removed:
Code-Review+1 by daniel, Verified+1 by Jenkins Builder
Change subject: Introduce generic osmo_stream_{cli,srv}_get_fd() API
......................................................................
Introduce generic osmo_stream_{cli,srv}_get_fd() API
The old osmo_stream_{cli,srv}_get_ofd() API only works for streams
in OSMO_FD mode. However, it is legitimate for an application
wanting to get low-level access to the file descriptor, for example
to issue some {get,set}sockopt() calls on it.
Change-Id: Ib0737f21150f6ac8d524b92c7ddb098f2afdeaab
Related: OS#5753
---
M include/osmocom/netif/stream.h
M src/stream_cli.c
M src/stream_srv.c
3 files changed, 45 insertions(+), 6 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmo-netif refs/changes/72/35072/2
--
To view, visit https://gerrit.osmocom.org/c/libosmo-netif/+/35072?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmo-netif
Gerrit-Branch: master
Gerrit-Change-Id: Ib0737f21150f6ac8d524b92c7ddb098f2afdeaab
Gerrit-Change-Number: 35072
Gerrit-PatchSet: 2
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel <dwillmann(a)sysmocom.de>
Gerrit-CC: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Attention: daniel <dwillmann(a)sysmocom.de>
Gerrit-MessageType: newpatchset
Attention is currently required from: arehbein, daniel, pespin.
laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-netif/+/35069?usp=email )
Change subject: stream_{cli,srv}: Add support for SCTP in OSMO_IO mode
......................................................................
Patch Set 3:
(1 comment)
Patchset:
PS3:
> Just to clarify, the expectation is that `msgb_sctp_{ppid,stream}()` will be set prior to calling th […]
yes, that is the expectation.
--
To view, visit https://gerrit.osmocom.org/c/libosmo-netif/+/35069?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmo-netif
Gerrit-Branch: master
Gerrit-Change-Id: I6cf5bad5f618e71c80017960c38009b089dbd6a1
Gerrit-Change-Number: 35069
Gerrit-PatchSet: 3
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: arehbein <arehbein(a)sysmocom.de>
Gerrit-Reviewer: daniel <dwillmann(a)sysmocom.de>
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: arehbein <arehbein(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: daniel <dwillmann(a)sysmocom.de>
Gerrit-Comment-Date: Tue, 21 Nov 2023 19:23:39 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: daniel <dwillmann(a)sysmocom.de>
Gerrit-MessageType: comment
laforge has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-netif/+/35071?usp=email )
Change subject: stream_srv: osmo_stream_srv_get_ofd() works only in OSMO_FD mode
......................................................................
stream_srv: osmo_stream_srv_get_ofd() works only in OSMO_FD mode
The corresponding client function osmo_stream_cli_get_ofd()
already contained an OSMO_ASSERT, but the server side was missing
this so far. The 'ofd' member only has meaning in the context
of OSMO_FD, so calling that function from generic code is wrong!
Change-Id: I50df259040e011135a31fe1aee231eba430fa94a
Fixes: Change-Id I2f52c7107c392b6f4b0bf2a84f8c873c084a200c
Related: OS#5753
---
M src/stream_srv.c
1 file changed, 17 insertions(+), 0 deletions(-)
Approvals:
daniel: Looks good to me, approved
fixeria: Looks good to me, but someone else must approve
arehbein: Looks good to me, but someone else must approve
Jenkins Builder: Verified
diff --git a/src/stream_srv.c b/src/stream_srv.c
index 1370e42..36e21cc 100644
--- a/src/stream_srv.c
+++ b/src/stream_srv.c
@@ -834,6 +834,7 @@
struct osmo_fd *
osmo_stream_srv_get_ofd(struct osmo_stream_srv *conn)
{
+ OSMO_ASSERT(conn->mode == OSMO_STREAM_MODE_OSMO_FD);
return &conn->ofd;
}
--
To view, visit https://gerrit.osmocom.org/c/libosmo-netif/+/35071?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmo-netif
Gerrit-Branch: master
Gerrit-Change-Id: I50df259040e011135a31fe1aee231eba430fa94a
Gerrit-Change-Number: 35071
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: arehbein <arehbein(a)sysmocom.de>
Gerrit-Reviewer: daniel <dwillmann(a)sysmocom.de>
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-MessageType: merged
Attention is currently required from: fixeria.
laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-netif/+/35072?usp=email )
Change subject: Introduce generic osmo_stream_{cli,srv}_get_fd() API
......................................................................
Patch Set 1:
(1 comment)
File src/stream_cli.c:
https://gerrit.osmocom.org/c/libosmo-netif/+/35072/comment/1ba29dbd_50cf8de2
PS1, Line 214: to modify
> unrelated?
well, I am turning the function from a static function into a public API, and at the same time I'm fixing its documentation (which is now more relevant for public API). I wouldn't call that unrelated.
--
To view, visit https://gerrit.osmocom.org/c/libosmo-netif/+/35072?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmo-netif
Gerrit-Branch: master
Gerrit-Change-Id: Ib0737f21150f6ac8d524b92c7ddb098f2afdeaab
Gerrit-Change-Number: 35072
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel <dwillmann(a)sysmocom.de>
Gerrit-CC: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Comment-Date: Tue, 21 Nov 2023 19:19:27 +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: arehbein.
laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-sccp/+/35073?usp=email )
Change subject: port from osmo_stream_*_get_ofd() to osmo_stream_srv_get_fd()
......................................................................
Patch Set 1:
(1 comment)
File src/osmo_ss7_asp.c:
https://gerrit.osmocom.org/c/libosmo-sccp/+/35073/comment/648f800c_3ee87f72
PS1, Line 738: rc = ipa_msg_recv_buffered(ofd->fd, &msg, &asp->pending_msg);
> I think `if (fd < 0) ... […]
seem y rationale below. All we use the fd for is the SLS selection, basically "throwing the dice to get a number between 0 .. 15"
--
To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/35073?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmo-sccp
Gerrit-Branch: master
Gerrit-Change-Id: I12c66badfb4bdfdfe71f1716de960d353d3548b1
Gerrit-Change-Number: 35073
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: arehbein <arehbein(a)sysmocom.de>
Gerrit-Reviewer: daniel <dwillmann(a)sysmocom.de>
Gerrit-Attention: arehbein <arehbein(a)sysmocom.de>
Gerrit-Comment-Date: Tue, 21 Nov 2023 19:17:48 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: arehbein <arehbein(a)sysmocom.de>
Gerrit-MessageType: comment
Attention is currently required from: arehbein.
laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-sccp/+/35073?usp=email )
Change subject: port from osmo_stream_*_get_ofd() to osmo_stream_srv_get_fd()
......................................................................
Patch Set 1:
(1 comment)
File src/osmo_ss7_asp.c:
https://gerrit.osmocom.org/c/libosmo-sccp/+/35073/comment/3820fecd_d0282112
PS1, Line 915: return ipa_rx_msg(asp, msg, fd & 0xf);
> probably very problematic without a check `if (fd < 0)` ... […]
no, not problematic at all. All we're doing here is choosing the SLS (link selector within a linkset). That's basically a "random" number between 0..15 (hence the 0xF). We're just abusing the property that file descriptors lower 4 bits are presumably "reasonably distributed" so that we get some spread over different SLS.
I would argue fd < 0 can never happen in the first place, as the function is only called in a context where the file dscriptor is long initialized, as we're alreay reading data.
But let's assume the fd would be negative: All we'd do is tale the lower 4 bits of -1 (0xF) and use that as SLS. Nothing wrong with that.
--
To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/35073?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmo-sccp
Gerrit-Branch: master
Gerrit-Change-Id: I12c66badfb4bdfdfe71f1716de960d353d3548b1
Gerrit-Change-Number: 35073
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: arehbein <arehbein(a)sysmocom.de>
Gerrit-Reviewer: daniel <dwillmann(a)sysmocom.de>
Gerrit-Attention: arehbein <arehbein(a)sysmocom.de>
Gerrit-Comment-Date: Tue, 21 Nov 2023 19:16:26 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: arehbein <arehbein(a)sysmocom.de>
Gerrit-MessageType: comment