Attention is currently required from: jolly.

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 3:

(5 comments)

Commit Message:

https://gerrit.osmocom.org/c/libosmocore/+/40584/comment/0f6c0276_c46f912e?usp=email
 :
PS3, Line 17: This change ensures that newly received data is appended to the 
existing
First you say we don't want to reuse the pending buffer, but here you say "This 
change ensures that newly received data is appended to the existing pending 
buffer", which seems to be the opposite of what you first stated?


File src/core/osmo_io.c:

https://gerrit.osmocom.org/c/libosmocore/+/40584/comment/d76babb4_0c35e494?usp=email
 :
PS3, Line 177: /*! convenience wrapper to call msgb_alloc with parameters from 
osmo_io_fd (with extra size) */
"with extra size" here doesn't apply anymore?


https://gerrit.osmocom.org/c/libosmocore/+/40584/comment/30485a7d_e24dd494?usp=email
 :
PS3, Line 178: struct msgb *iofd_msgb_alloc2(struct osmo_io_fd *iofd, size_t 
size)
This is probably breaking the promise that msgb passed to the app are at least 
of a certain size configured by the user.


https://gerrit.osmocom.org/c/libosmocore/+/40584/comment/a19b37dd_247f0cc8?usp=email
 :
PS3, Line 335:   * If the pending message is not large enough, create a larger 
message. */
I may be wrong, but I'd expect user to configure iofd with a max_size big 
enough to allow whatever size is needed?


https://gerrit.osmocom.org/c/libosmocore/+/40584/comment/fa6c86b2_162a97d0?usp=email
 :
PS3, Line 344:          memcpy(msgb_put(iofd->pending, msgb_length(msg)), 
msgb_data(msg), msgb_length(msg));
Can we avoid 2 memcpys (here and above) in the specific code path?



--
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: 3
Gerrit-Owner: jolly <andr...@eversberg.eu>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <lafo...@osmocom.org>
Gerrit-Reviewer: pespin <pes...@sysmocom.de>
Gerrit-Attention: jolly <andr...@eversberg.eu>
Gerrit-Comment-Date: Tue, 22 Jul 2025 14:44:19 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No

Reply via email to