Attention is currently required from: laforge, daniel.
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/32758 )
Change subject: osmo_io: Improve handling and documentation of segmentation_cb
......................................................................
Patch Set 4:
(2 comments)
File src/core/osmo_io.c:
https://gerrit.osmocom.org/c/libosmocore/+/32758/comment/87a153a7_ec2362d1
PS3, Line 249: } else if (pending_len < 0) {
> Then I'd have to use -pending_len down in the memcpy which I like much less. […]
Ok I see the root of the confusion now I think, "pending_len" as positive is not really the pending_len, but rather "extra_len" to be stored in the next message.
So probably changing the name of the variable to "extra_len" or alike should make all this code much understandable imho. What do you think?
File src/core/osmo_io.c:
https://gerrit.osmocom.org/c/libosmocore/+/32758/comment/3b32912e_94a6b8e6
PS4, Line 256: memcpy(msgb_data(msg_pending), msgb_data(msg) + len, pending_len);
see, "pending_len" is not really the "pending length to be filled for next message" here.
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/32758
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I6a0eebb8d4490f09a3cc6eb97d4ff47b4a8fd377
Gerrit-Change-Number: 32758
Gerrit-PatchSet: 4
Gerrit-Owner: daniel <dwillmann(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-CC: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Attention: daniel <dwillmann(a)sysmocom.de>
Gerrit-Comment-Date: Fri, 19 May 2023 09:47:19 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: pespin <pespin(a)sysmocom.de>
Comment-In-Reply-To: daniel <dwillmann(a)sysmocom.de>
Gerrit-MessageType: comment
Attention is currently required from: laforge, pespin.
daniel has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/32758 )
Change subject: osmo_io: Improve handling and documentation of segmentation_cb
......................................................................
Patch Set 4:
(2 comments)
Commit Message:
https://gerrit.osmocom.org/c/libosmocore/+/32758/comment/b0d74305_7a2f55de
PS3, Line 9: int
> in
Done
File src/core/osmo_io.c:
https://gerrit.osmocom.org/c/libosmocore/+/32758/comment/4e9186b7_e6fc402c
PS3, Line 249: } else if (pending_len < 0) {
> ok, maybe the ting here is that you should declare: […]
Then I'd have to use -pending_len down in the memcpy which I like much less.
You have three cases which I tried to explain in the comments:
* You receive exactly one complete message, simply return the whole msgb
* You receive an incomplete message, save the whole msgb for later
* You receive more than one message, return the first message and save the rest (pending_len) for later
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/32758
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I6a0eebb8d4490f09a3cc6eb97d4ff47b4a8fd377
Gerrit-Change-Number: 32758
Gerrit-PatchSet: 4
Gerrit-Owner: daniel <dwillmann(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-CC: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Fri, 19 May 2023 09:17:43 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: laforge <laforge(a)osmocom.org>
Comment-In-Reply-To: pespin <pespin(a)sysmocom.de>
Comment-In-Reply-To: daniel <dwillmann(a)sysmocom.de>
Gerrit-MessageType: comment
Attention is currently required from: laforge, pespin.
Hello Jenkins Builder, laforge,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/libosmocore/+/32758
to look at the new patch set (#4).
Change subject: osmo_io: Improve handling and documentation of segmentation_cb
......................................................................
osmo_io: Improve handling and documentation of segmentation_cb
The read length is not needed in the segmentation callback, msgb
already has all the necessary information, the parameter previously was
just msgb_length(msg).
Also handle negative return values (except -EAGAIN) of the callback as
errors which cause the msg to be dropped. -EAGAIN will defer the msg.
Change-Id: I6a0eebb8d4490f09a3cc6eb97d4ff47b4a8fd377
---
M include/osmocom/core/osmo_io.h
M src/core/osmo_io.c
2 files changed, 45 insertions(+), 11 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/58/32758/4
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/32758
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I6a0eebb8d4490f09a3cc6eb97d4ff47b4a8fd377
Gerrit-Change-Number: 32758
Gerrit-PatchSet: 4
Gerrit-Owner: daniel <dwillmann(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-CC: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: newpatchset
Attention is currently required from: laforge, pespin.
Hello Jenkins Builder, laforge,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/libosmocore/+/32759
to look at the new patch set (#5).
Change subject: osmo_io: Support detecting non-blocking connect()
......................................................................
osmo_io: Support detecting non-blocking connect()
libosmo-netif does a non blocking connect(), which as per definition of
the socket API is signalled from the OS to the user by marking the file
descriptor writable.
osmo_io needs to signal this somehow. Previously osmo_io would only call
the write_cb if actual data has been sent. This patch changes the behaviour
so that calling osmo_iofd_write_enable() will call write_cb() on a writable
socket even if the write queue is empty.
Change-Id: I893cbc3becd5e125f2f06b3654578aed0aacadf3
---
M src/core/osmo_io.c
M src/core/osmo_io_poll.c
M tests/osmo_io/osmo_io_test.ok
3 files changed, 28 insertions(+), 2 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/59/32759/5
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/32759
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I893cbc3becd5e125f2f06b3654578aed0aacadf3
Gerrit-Change-Number: 32759
Gerrit-PatchSet: 5
Gerrit-Owner: daniel <dwillmann(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-CC: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: newpatchset
Attention is currently required from: laforge, pespin.
daniel has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/32759 )
Change subject: osmo_io: Support detecting non-blocking connect()
......................................................................
Patch Set 5:
(1 comment)
Commit Message:
https://gerrit.osmocom.org/c/libosmocore/+/32759/comment/4731615e_121737db
PS4, Line 9: non blocking connect() which is signalled by
: marking the fd writable.
> "non-blocking connect(), which as per definition of the socket API is signaled from OS to user by ma […]
Ack
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/32759
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I893cbc3becd5e125f2f06b3654578aed0aacadf3
Gerrit-Change-Number: 32759
Gerrit-PatchSet: 5
Gerrit-Owner: daniel <dwillmann(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-CC: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Fri, 19 May 2023 09:17:43 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: laforge <laforge(a)osmocom.org>
Gerrit-MessageType: comment
laforge has submitted this change. ( https://gerrit.osmocom.org/c/pysim/+/32533 )
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
1 file changed, 29 insertions(+), 1 deletion(-)
Approvals:
fixeria: Looks good to me, but someone else must approve
Jenkins Builder: Verified
laforge: Looks good to me, approved
diff --git a/pySim-shell.py b/pySim-shell.py
index fab5d09..ae783c6 100755
--- a/pySim-shell.py
+++ b/pySim-shell.py
@@ -135,8 +135,13 @@
CUSTOM_CATEGORY = 'pySim Commands'
def __init__(self, card, rs, sl, ch, script=None):
+ if version.parse(cmd2.__version__) < version.parse("2.0.0"):
+ kwargs = {'use_ipython': True}
+ else:
+ kwargs = {'include_ipy': True}
+
super().__init__(persistent_history_file='~/.pysim_shell_history', allow_cli_args=False,
- use_ipython=True, auto_load_commands=False, startup_script=script)
+ auto_load_commands=False, startup_script=script, **kwargs)
self.intro = style('Welcome to pySim-shell!', fg=fg.red)
self.default_category = 'pySim-shell built-in commands'
self.card = None
--
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: 7
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: markb <markboldyrev(a)gmail.com>
Gerrit-MessageType: merged