pespin has submitted this change. ( https://gerrit.osmocom.org/c/libosmocore/+/31904 )
(
1 is the latest approved patch-set.
No files were changed between the latest approved patch-set and the submitted one.
)Change subject: configure.ac: Fix logic enabling osmo_fd fd checks
......................................................................
configure.ac: Fix logic enabling osmo_fd fd checks
The logic testing the and setting the define was inverted, which made it
enabled by default.
Take the chance to rename the enable flag to be "ofd" instead of
"bsc-fd" (since anyway the flag was broken).
Change-Id: I81112fa1f6ce1a8e5fe85468241ad385ed8805d3
---
M configure.ac
1 file changed, 18 insertions(+), 3 deletions(-)
Approvals:
fixeria: Looks good to me, approved
Jenkins Builder: Verified
diff --git a/configure.ac b/configure.ac
index 108c0a1..478da9b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -296,13 +296,13 @@
AC_ARG_ENABLE(bsc_fd_check,
[AS_HELP_STRING(
- [--enable-bsc-fd-check],
+ [--enable-ofd-check],
[Instrument osmo_fd_register to check that the fd is registered]
)],
[fd_check=$enableval], [fd_check="no"])
-if test x"$fd_check" = x"no"
+if test x"$fd_check" = x"yes"
then
- AC_DEFINE([OSMO_FD_CHECK],[1],[Instrument the osmo_fd_register])
+ AC_DEFINE([OSMO_FD_CHECK], [1], [Instrument the osmo_fd_register])
fi
AC_ARG_ENABLE([force_io_select],
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/31904
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I81112fa1f6ce1a8e5fe85468241ad385ed8805d3
Gerrit-Change-Number: 31904
Gerrit-PatchSet: 2
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: merged
pespin has submitted this change. ( https://gerrit.osmocom.org/c/libosmocore/+/31905 )
(
1 is the latest approved patch-set.
No files were changed between the latest approved patch-set and the submitted one.
)Change subject: configure.ac: Fix typo in enable flag description
......................................................................
configure.ac: Fix typo in enable flag description
Change-Id: Ida390c50379a429a4b42434e32954eeb832a11ff
---
M configure.ac
1 file changed, 10 insertions(+), 1 deletion(-)
Approvals:
fixeria: Looks good to me, approved
Jenkins Builder: Verified
diff --git a/configure.ac b/configure.ac
index 478da9b..5e17c7a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -312,7 +312,7 @@
)],
[force_io_select=$enableval], [force_io_select="no"])
AS_IF([test "x$force_io_select" = "xyes"], [
- AC_DEFINE([FORCE_IO_SELECT], [1], [Force the use of select() instaed of poll()])
+ AC_DEFINE([FORCE_IO_SELECT], [1], [Force the use of select() instead of poll()])
])
AC_ARG_ENABLE(msgfile,
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/31905
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: Ida390c50379a429a4b42434e32954eeb832a11ff
Gerrit-Change-Number: 31905
Gerrit-PatchSet: 2
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: merged
pespin has submitted this change. ( https://gerrit.osmocom.org/c/libosmocore/+/31903 )
Change subject: select.c: osmo_fd_unregister(): Avoid assert hit with old buggy users of the API
......................................................................
select.c: osmo_fd_unregister(): Avoid assert hit with old buggy users of the API
Change-Id: If77b84d603a42a216d550d9708eb62f645634a61
---
M src/core/select.c
1 file changed, 24 insertions(+), 3 deletions(-)
Approvals:
Jenkins Builder: Verified
osmith: Looks good to me, but someone else must approve
fixeria: Looks good to me, approved
diff --git a/src/core/select.c b/src/core/select.c
index 67b0fd3..c60cd8e 100644
--- a/src/core/select.c
+++ b/src/core/select.c
@@ -223,13 +223,25 @@
* osmo_fd_is_registered() */
unregistered_count++;
llist_del(&fd->list);
- OSMO_ASSERT(fd->fd >= 0);
- OSMO_ASSERT(fd->fd <= maxfd);
- osmo_fd_lookup.table[fd->fd] = NULL;
#ifndef FORCE_IO_SELECT
g_poll.num_registered--;
#endif /* FORCE_IO_SELECT */
+ if (OSMO_UNLIKELY(fd->fd < 0 || fd->fd > maxfd)) {
+ /* Some old users used to incorrectly set fd = -1 *before* calling osmo_unregister().
+ * Hence, in order to keep backward compatibility it's not possible to assert() here.
+ * Instead, print an error message since this is actually a bug in the API user. */
+#ifdef OSMO_FD_CHECK
+ osmo_panic("osmo_fd_unregister(fd=%u) out of expected range (0..%u), fix your code!!!\n",
+ fd->fd, maxfd);
+#else
+ fprintf(stderr, "osmo_fd_unregister(fd=%u) out of expected range (0..%u), fix your code!!!\n",
+ fd->fd, maxfd);
+ return;
+#endif
+ }
+
+ osmo_fd_lookup.table[fd->fd] = NULL;
/* If existent, free any statistical data */
osmo_stats_tcp_osmo_fd_unregister(fd);
}
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/31903
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: If77b84d603a42a216d550d9708eb62f645634a61
Gerrit-Change-Number: 31903
Gerrit-PatchSet: 4
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: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: merged
Attention is currently required from: laforge, pespin, daniel.
fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/31903 )
Change subject: select.c: osmo_fd_unregister(): Avoid assert hit with old buggy users of the API
......................................................................
Patch Set 4: Code-Review+2
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/31903
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: If77b84d603a42a216d550d9708eb62f645634a61
Gerrit-Change-Number: 31903
Gerrit-PatchSet: 4
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: 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-Attention: daniel <dwillmann(a)sysmocom.de>
Gerrit-Comment-Date: Tue, 14 Mar 2023 12:33:22 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
Attention is currently required from: pespin.
fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/31902 )
Change subject: select.c: Clarify osmo_fd_unregister() can only be called on registered osmo_fds
......................................................................
Patch Set 2: Code-Review+2
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/31902
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I5e397e121f2fe2254c7f4b474e6eefd7aebe7a83
Gerrit-Change-Number: 31902
Gerrit-PatchSet: 2
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Tue, 14 Mar 2023 12:32:40 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
Attention is currently required from: pespin.
fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmocom-bb/+/31654 )
Change subject: modem: move GRR specific code into its own file
......................................................................
Patch Set 3:
(1 comment)
Patchset:
PS1:
> To me all this is not really grr, grr would be between LLC and RLC/MAC. […]
Naming is hard. GRR in this case is not a layer itself, it's more like a collection of Radio Resource related routines, which have grown up into quite some amount of code, making it hard to read/modify `app_modem.c`. We can always rename it later, for now I would prefer to get this patch merged as-is.
--
To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/31654
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-Change-Id: I25caa0bd01e3d090803512f5b13cad58439f44f8
Gerrit-Change-Number: 31654
Gerrit-PatchSet: 3
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Tue, 14 Mar 2023 12:19:51 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: comment
Attention is currently required from: laforge, pespin, fixeria, daniel.
osmith has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/31903 )
Change subject: select.c: osmo_fd_unregister(): Avoid assert hit with old buggy users of the API
......................................................................
Patch Set 4: Code-Review+1
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/31903
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: If77b84d603a42a216d550d9708eb62f645634a61
Gerrit-Change-Number: 31903
Gerrit-PatchSet: 4
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: 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-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Attention: daniel <dwillmann(a)sysmocom.de>
Gerrit-Comment-Date: Tue, 14 Mar 2023 12:18:10 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
Attention is currently required from: laforge, pespin, fixeria, daniel.
Hello osmith, Jenkins Builder, laforge, fixeria, daniel,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/libosmocore/+/31903
to look at the new patch set (#4).
Change subject: select.c: osmo_fd_unregister(): Avoid assert hit with old buggy users of the API
......................................................................
select.c: osmo_fd_unregister(): Avoid assert hit with old buggy users of the API
Change-Id: If77b84d603a42a216d550d9708eb62f645634a61
---
M src/core/select.c
1 file changed, 24 insertions(+), 3 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/03/31903/4
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/31903
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: If77b84d603a42a216d550d9708eb62f645634a61
Gerrit-Change-Number: 31903
Gerrit-PatchSet: 4
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: 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-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Attention: daniel <dwillmann(a)sysmocom.de>
Gerrit-MessageType: newpatchset