Attention is currently required from: laforge, pespin. jolly 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 5: (4 comments) Commit Message: https://gerrit.osmocom.org/c/libosmocore/+/40584/comment/b4a76037_8b68c451?usp=email : PS3, Line 17: This change ensures that newly received data is appended to the existing > This is still confusing to me, because you are still using the term "pending > buffer" twice. […] Done File src/core/osmo_io.c: https://gerrit.osmocom.org/c/libosmocore/+/40584/comment/e6b64bd4_78726884?usp=email : PS3, Line 178: struct msgb *iofd_msgb_alloc2(struct osmo_io_fd *iofd, size_t size) > I agree with @[email protected] here. […] Yes the pending buffer that is created with given size is always larger than the msgb_size configured by the user. It cannot be smaller, because it is created when a regular pending buffer (of msgb_size) is too small to append subsequent received data. https://gerrit.osmocom.org/c/libosmocore/+/40584/comment/5332c687_6661cb75?usp=email : 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. […] The larger buffer is only used for segentation process. The data that is sent to the user will have the length that the user requested as segment size. This less or equal the msgb_size that the user configured. https://gerrit.osmocom.org/c/libosmocore/+/40584/comment/5334a098_81e901c4?usp=email : PS3, Line 344: memcpy(msgb_put(iofd->pending, msgb_length(msg)), msgb_data(msg), msgb_length(msg)); > How? The fist memcopy is used, if the pending buffer must be enlarged. […] Done -- 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: 5 Gerrit-Owner: jolly <[email protected]> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <[email protected]> Gerrit-Reviewer: pespin <[email protected]> Gerrit-Attention: laforge <[email protected]> Gerrit-Attention: pespin <[email protected]> Gerrit-Comment-Date: Mon, 28 Jul 2025 10:19:02 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: jolly <[email protected]> Comment-In-Reply-To: laforge <[email protected]> Comment-In-Reply-To: pespin <[email protected]>
