Attention is currently required from: jolly, laforge.
pespin has posted comments on this change by jolly. ( https://gerrit.osmocom.org/c/libosmocore/+/40584?usp=email )
Change subject: Avoid reusing pending buffer; append incoming data instead
......................................................................
Patch Set 4:
(3 comments)
Commit Message:
https://gerrit.osmocom.org/c/libosmocore/+/40584/comment/7d712385_94a8c125?… :
PS3, Line 17: This change ensures that newly received data is appended to the existing
> Maybe I should state that I don't want to reuse the pending buffer for the read operation. […]
This is still confusing to me, because you are still using the term "pending buffer" twice.
IIUC on the second one you mean "to the buffer where next read will be done by the kernel"?
File src/core/osmo_io.c:
https://gerrit.osmocom.org/c/libosmocore/+/40584/comment/cf285de9_509310cd?… :
PS3, Line 178: struct msgb *iofd_msgb_alloc2(struct osmo_io_fd *iofd, size_t size)
> The application should only care about the length of data in the buffer not the size.
I disagree. Apps may want to make sure a msgb allocated is of at least a certain size, so that they can reuse the msgb with zero-copy by appending/prepending to it, etc.
If you say you garantee the msgb recevied by the user is of at least osmo_iofd msgb_size configured by the user, then I'm fine, otherwise we need to revisit this.
https://gerrit.osmocom.org/c/libosmocore/+/40584/comment/1afc42ee_da26b476?… :
PS3, Line 335: * If the pending message is not large enough, create a larger message. */
> The application should only care about the length of data in the buffer not the size.
My understanding is that since user expects no segment bigger than the configured msgb_size, then we should read() only up to the maximum msgb_size configured. Hence it can never happen that we read more than the size of the msgb.
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/40584?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I08df9736ccc5e9a7df61ca6dcf94629ee010752f
Gerrit-Change-Number: 40584
Gerrit-PatchSet: 4
Gerrit-Owner: jolly <andreas(a)eversberg.eu>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: jolly <andreas(a)eversberg.eu>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Comment-Date: Wed, 23 Jul 2025 13:59:59 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: jolly <andreas(a)eversberg.eu>
Comment-In-Reply-To: pespin <pespin(a)sysmocom.de>
Attention is currently required from: jolly, laforge.
pespin has posted comments on this change by jolly. ( https://gerrit.osmocom.org/c/libosmocore/+/40489?usp=email )
Change subject: Allow io_uring_submit batching just ahead of poll/select
......................................................................
Patch Set 4: Code-Review-1
(6 comments)
Patchset:
PS4:
Fine with having the extra envvar for now (I guess we'll want to remove it later on once we figure out this new approach is good).
Marking -1 because the optimization to skip calling io_uring if not needed was not yet added. See comments attached.
File src/core/osmo_io_uring.c:
https://gerrit.osmocom.org/c/libosmocore/+/40489/comment/2c959aae_fcaa711d?… :
PS4, Line 187: io_uring_submit(&g_ring.ring);
else
g_io_uring_submit_needed = true;
https://gerrit.osmocom.org/c/libosmocore/+/40489/comment/5232545f_41388f48?… :
PS4, Line 330: io_uring_submit(&g_ring.ring);
else
g_io_uring_submit_needed = true;
https://gerrit.osmocom.org/c/libosmocore/+/40489/comment/cf237e81_db669c01?… :
PS4, Line 431: io_uring_submit(&g_ring.ring);
else
g_io_uring_submit_needed = true;
https://gerrit.osmocom.org/c/libosmocore/+/40489/comment/a42061d3_c42803d3?… :
PS4, Line 480: if (OSMO_LIKELY(!g_io_uring_batch))
else
g_io_uring_submit_needed = true;
(and yes, you probably want to have this as a static inline function to avoid logic duplication: io_uring_submit_needed()).
https://gerrit.osmocom.org/c/libosmocore/+/40489/comment/1d96d8f0_ed7dcc1a?… :
PS4, Line 554: io_uring_submit(&g_ring.ring);
if (OSMO_LIKELY(g_io_uring_submit_needed))
io_uring_submit(&g_ring.ring);
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/40489?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: Id34fe2ced32c63d15b14810e145744f7509064cc
Gerrit-Change-Number: 40489
Gerrit-PatchSet: 4
Gerrit-Owner: jolly <andreas(a)eversberg.eu>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-CC: laforge <laforge(a)osmocom.org>
Gerrit-Attention: jolly <andreas(a)eversberg.eu>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Comment-Date: Wed, 23 Jul 2025 13:54:52 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
pespin has submitted this change. ( https://gerrit.osmocom.org/c/libosmocore/+/40724?usp=email )
Change subject: linuxlist.h: add llist_last_entry_or_null macro
......................................................................
linuxlist.h: add llist_last_entry_or_null macro
Related: OS#6705
Change-Id: Iaa5c8900434fe327a9c8b072182624a7fbfb369c
---
M include/osmocom/core/linuxlist.h
1 file changed, 10 insertions(+), 0 deletions(-)
Approvals:
Jenkins Builder: Verified
laforge: Looks good to me, but someone else must approve
pespin: Looks good to me, approved
diff --git a/include/osmocom/core/linuxlist.h b/include/osmocom/core/linuxlist.h
index 2fc3fa7..8c8b1bc 100644
--- a/include/osmocom/core/linuxlist.h
+++ b/include/osmocom/core/linuxlist.h
@@ -254,6 +254,16 @@
#define llist_first_entry_or_null(ptr, type, member) \
(!llist_empty(ptr) ? llist_first_entry(ptr, type, member) : NULL)
+/*! Get the last element from a list, or NULL.
+ * \param ptr the list head to take the element from.
+ * \param type the type of the struct this is embedded in.
+ * \param member the name of the list_head within the struct.
+ *
+ * Note that if the list is empty, it returns NULL.
+ */
+#define llist_last_entry_or_null(ptr, type, member) \
+ (!llist_empty(ptr) ? llist_last_entry(ptr, type, member) : NULL)
+
/*! Iterate over a linked list.
* \param pos the llist_head to use as a loop counter.
* \param head the head of the list over which to iterate.
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/40724?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: merged
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: Iaa5c8900434fe327a9c8b072182624a7fbfb369c
Gerrit-Change-Number: 40724
Gerrit-PatchSet: 1
Gerrit-Owner: jolly <andreas(a)eversberg.eu>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/40729?usp=email )
Change subject: ngap: Fix deviation in ASN1 from TS 38.413 version 17.5.0
......................................................................
ngap: Fix deviation in ASN1 from TS 38.413 version 17.5.0
I originally copied the ASN1 files from https://forge.etsi.org/rep/int/5g-core/ngap.git
directory ttcn/LibNGAP/lib/asn1, commit fa43d01e202379a969e991a9454d9c6c6930b5b5.
Apparently one file contained a deviation from the 3GPP content and it
was also fixed in ngap.git in 47e7239dd80f2f12a4cbcdd7977ca0a32356f3be.
I found out this problem when trying to use this ASN1 file to generate
new libfftranscode, which then failed to properly decode
DownlinkNASTransport due to the deviation.
Change-Id: I7d127998ea162a392f3381ebb1d198ad3c783a56
---
M library/ngap/NGAP_PDU_Descriptions.asn
1 file changed, 1 insertion(+), 1 deletion(-)
Approvals:
pespin: Looks good to me, approved
fixeria: Looks good to me, but someone else must approve
Jenkins Builder: Verified
diff --git a/library/ngap/NGAP_PDU_Descriptions.asn b/library/ngap/NGAP_PDU_Descriptions.asn
index d8dbd98..dcf4704 100644
--- a/library/ngap/NGAP_PDU_Descriptions.asn
+++ b/library/ngap/NGAP_PDU_Descriptions.asn
@@ -266,7 +266,7 @@
InitiatingMessage ::= SEQUENCE {
procedureCode NGAP-ELEMENTARY-PROCEDURE.&procedureCode ({NGAP-ELEMENTARY-PROCEDURES}),
criticality NGAP-ELEMENTARY-PROCEDURE.&criticality ({NGAP-ELEMENTARY-PROCEDURES}{@procedureCode}),
- value NGAP-ELEMENTARY-PROCEDURE.&InitiatingMessage ({NGAP-ELEMENTARY-PROCEDURES}{@procedureCode}) OPTIONAL
+ value NGAP-ELEMENTARY-PROCEDURE.&InitiatingMessage ({NGAP-ELEMENTARY-PROCEDURES}{@procedureCode})
}
SuccessfulOutcome ::= SEQUENCE {
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/40729?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: merged
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I7d127998ea162a392f3381ebb1d198ad3c783a56
Gerrit-Change-Number: 40729
Gerrit-PatchSet: 2
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Attention is currently required from: laforge.
pespin has posted comments on this change by laforge. ( https://gerrit.osmocom.org/c/docker-playground/+/40734?usp=email )
Change subject: titan: upgrade to libfftranscode 0.6 (updated NGAP ASN.1 to V17.5.0)
......................................................................
Patch Set 1:
(1 comment)
Patchset:
PS1:
> @pespin@sysmocom. […]
I manually tested it still worked fine with successful tests, but it was still failing with the specific error I found, but now after looking at libfftranscode I know it's most probably due to the fact that the struct that had to be decoded/encoded was not a PDU struct but a IEs one.
Hence a new API would be needed to decode/encode that. I decided to use the native ttcn3 APER dec/enc instead in order to avoid havign to add more APIs, which worked fine.
Still, a lot of stuff has changed since NGAP revision 16 to 17, so I think it makes sense to have an updated one in case we want to test something with it.
--
To view, visit https://gerrit.osmocom.org/c/docker-playground/+/40734?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: docker-playground
Gerrit-Branch: master
Gerrit-Change-Id: I56034ef75cd6cca88fc9d353e097086bce6d639c
Gerrit-Change-Number: 40734
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Comment-Date: Wed, 23 Jul 2025 13:29:57 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: laforge <laforge(a)osmocom.org>