dexter has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmocore/+/32579 )
Change subject: select: speed up osmo_fd_is_registered
......................................................................
select: speed up osmo_fd_is_registered
osmo_fd_is_registered works by iterating the osmo_fds list and comparing
the supplied fd to all fds in that list until it finds a match. This can
be costly, so lets first check if the fd is even registered in any list
at all before moving on.
Unfortunately we still have to do the list iteration since the list in
which the fd is registered might not necessarly be the osmo_fds list.
Related: OS#5983
Change-Id: I1ce894da39e3f2329c88666a5dda594b8bce4228
---
M src/core/select.c
1 file changed, 22 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/79/32579/1
diff --git a/src/core/select.c b/src/core/select.c
index 69fa763..c2c78c2 100644
--- a/src/core/select.c
+++ b/src/core/select.c
@@ -139,6 +139,10 @@
bool osmo_fd_is_registered(struct osmo_fd *fd)
{
struct osmo_fd *entry;
+
+ if (!fd->list.next || fd->list.next == LLIST_POISON1)
+ return false;
+
llist_for_each_entry(entry, &osmo_fds, list) {
if (entry == fd) {
return true;
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/32579
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I1ce894da39e3f2329c88666a5dda594b8bce4228
Gerrit-Change-Number: 32579
Gerrit-PatchSet: 1
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-MessageType: newchange
Attention is currently required from: fixeria, msuraev.
Hello Jenkins Builder, laforge, fixeria,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/pysim/+/30075
to look at the new patch set (#5).
Change subject: pySim-shell: fix compatibility problem with cmd2 >= 2.3.0 (bg)
......................................................................
pySim-shell: fix compatibility problem with cmd2 >= 2.3.0 (bg)
cmd2.fg and cmd2.bg have been deprecated in cmd2 2.3.0 and removed
in cmd2 2.4.0. Let's work around this by a version check.
Related upstream commits:
(See also: https://github.com/python-cmd2/cmd2)
Commit f57b08672af97f9d973148b6c30d74fe4e712d14
Author: Kevin Van Brunt <kmvanbrunt(a)gmail.com>
Date: Mon Oct 11 15:20:46 2021 -0400
and
Commit f217861feae45a0a1abb56436e68c5dd859d64c0
Author: Kevin Van Brunt <kmvanbrunt(a)gmail.com>
Date: Wed Feb 16 13:34:13 2022 -0500
Change-Id: I9fd32c0fd8f6d40e00a318602af97c288605e8e5
---
M pySim-shell.py
1 file changed, 52 insertions(+), 16 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/75/30075/5
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/30075
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: I9fd32c0fd8f6d40e00a318602af97c288605e8e5
Gerrit-Change-Number: 30075
Gerrit-PatchSet: 5
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-CC: laforge <laforge(a)osmocom.org>
Gerrit-CC: msuraev <msuraev(a)sysmocom.de>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Attention: msuraev <msuraev(a)sysmocom.de>
Gerrit-MessageType: newpatchset
Attention is currently required from: markb, fixeria.
Hello markb, Jenkins Builder, laforge, fixeria,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/pysim/+/32533
to look at the new patch set (#3).
Change subject: pySim-shell: fix compatibility problem with cmd2 >= 2.0.0 (include_ipy)
......................................................................
pySim-shell: fix compatibility problem with cmd2 >= 2.0.0 (include_ipy)
In version 2.0.0, the use_ipython parameter in the Cmd constructor is
renamed to include_ipy. There are still plenty of older cmd2
installations around, so let's work around this using a version check.
See also: https://github.com/python-cmd2/cmd2
Commit: 2397280cad072a27a51f5ec1cc64908039d14bd1
Author: Kevin Van Brunt <kmvanbrunt(a)gmail.com>
Date: 2021-03-26 18:56:33
This commit is based on pySim gerrit changes:
Ifce40410587c85ae932774144b9548b154ee8ad0
I19d28276e73e7024f64ed693c3b5e37c1344c687
Change-Id: Ibc0e18b002a03ed17933be4d0b4f4e86ad99c26e
---
M pySim-shell.py
M requirements.txt
2 files changed, 30 insertions(+), 1 deletion(-)
git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/33/32533/3
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/32533
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: Ibc0e18b002a03ed17933be4d0b4f4e86ad99c26e
Gerrit-Change-Number: 32533
Gerrit-PatchSet: 3
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: markb <markboldyrev(a)gmail.com>
Gerrit-CC: laforge <laforge(a)osmocom.org>
Gerrit-Attention: markb <markboldyrev(a)gmail.com>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-MessageType: newpatchset
Attention is currently required from: fixeria, msuraev.
dexter has posted comments on this change. ( https://gerrit.osmocom.org/c/pysim/+/30075 )
Change subject: pySim-shell: fix compatibility problem with cmd2 >= 2.3.0 (bg)
......................................................................
Patch Set 5:
(1 comment)
File contrib/jenkins.sh:
https://gerrit.osmocom.org/c/pysim/+/30075/comment/57a377cd_76fe2ce8
PS4, Line 41: E0611: No name 'Fg' in module 'cmd2' (no-name-in-module)
> better use inline `pylint: ... […]
I have now removed the pylint statements again. Unfortunately I have trouble getting the inline pylint pragmas working. I have left a comment in my first patch: I38efe4702277ee092a5542d7d659df08cb0adeff - when I found the error there I will add pylint pragmas for the other patches.
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/30075
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: I9fd32c0fd8f6d40e00a318602af97c288605e8e5
Gerrit-Change-Number: 30075
Gerrit-PatchSet: 5
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-CC: laforge <laforge(a)osmocom.org>
Gerrit-CC: msuraev <msuraev(a)sysmocom.de>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Attention: msuraev <msuraev(a)sysmocom.de>
Gerrit-Comment-Date: Wed, 03 May 2023 09:53:43 +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: fixeria.
dexter has posted comments on this change. ( https://gerrit.osmocom.org/c/pysim/+/32532 )
Change subject: pySim-shell: fix compatibility problem with cmd2 >= 2.0.0 (Settable)
......................................................................
Patch Set 12:
(2 comments)
This change is ready for review.
Patchset:
PS12:
@fixeria: This patch should now be fixed. I have tested it with 1.5 and 2.0.0. I also followed your suggestion to use inline pylint pragmas but pylint seems to ignore them. Maybe you have an idea here.
File pySim-shell.py:
https://gerrit.osmocom.org/c/pysim/+/32532/comment/11a5db4c_23e9ac80
PS12, Line 162: # pylint: disable=E1121
I have tested this also with too-many-function-args but it seems not to be recognized by pylint. As far as I understand the documentation this pylint pragma woul dbe valid for the entire block. I am running out of ideas here, maybe we should not indent using spaces?
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/32532
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: I38efe4702277ee092a5542d7d659df08cb0adeff
Gerrit-Change-Number: 32532
Gerrit-PatchSet: 12
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-CC: laforge <laforge(a)osmocom.org>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Comment-Date: Wed, 03 May 2023 09:50:18 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
pespin has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-gprs/+/32571 )
Change subject: llc: Fix N(U) wrongly reset during LLGM-ASSIGN.req
......................................................................
llc: Fix N(U) wrongly reset during LLGM-ASSIGN.req
Change-Id: Ifd6d59703cc2d267fc37595a1ad47e326ebd2a30
---
M src/llc/llc_llgmm.c
1 file changed, 20 insertions(+), 3 deletions(-)
Approvals:
Jenkins Builder: Verified
pespin: Looks good to me, approved
diff --git a/src/llc/llc_llgmm.c b/src/llc/llc_llgmm.c
index cd8c189..5834041 100644
--- a/src/llc/llc_llgmm.c
+++ b/src/llc/llc_llgmm.c
@@ -153,16 +153,24 @@
/* If TLLI old == TLLI_UNASSIGNED was assigned to LLME, then this is
* TLLI assignmemt according to 8.3.1 */
llme->old_tlli = TLLI_UNASSIGNED;
- llme->tlli = new_tlli;
llme->state = OSMO_GPRS_LLC_LLMS_ASSIGNED;
/* 8.5.3.1 For all LLE's */
for (i = 0; i < ARRAY_SIZE(llme->lle); i++) {
struct gprs_llc_lle *l = &llme->lle[i];
- l->vu_send = l->vu_recv = 0;
- l->retrans_ctr = 0;
l->state = OSMO_GPRS_LLC_LLES_ASSIGNED_ADM;
+ if (llme->tlli != new_tlli) {
+ /* Only reset state if the new tlli is really changing.
+ * During GMM attachment, the TLLI is already known and
+ * used by LLC (LLME allocated on the fly), and hence it
+ * is expected to keep using previous state with the
+ * same TLLI from here onwards.
+ */
+ l->vu_send = l->vu_recv = 0;
+ l->retrans_ctr = 0;
+ }
/* FIXME Set parameters according to table 9 */
}
+ llme->tlli = new_tlli;
}
} else if (old_tlli != TLLI_UNASSIGNED && new_tlli != TLLI_UNASSIGNED) {
/* TLLI Change 8.3.2 */
--
To view, visit https://gerrit.osmocom.org/c/libosmo-gprs/+/32571
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmo-gprs
Gerrit-Branch: master
Gerrit-Change-Id: Ifd6d59703cc2d267fc37595a1ad47e326ebd2a30
Gerrit-Change-Number: 32571
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: merged