Attention is currently required from: arehbein, daniel, dexter, fixeria, pespin.
Hello Jenkins Builder, daniel, dexter, fixeria,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/libosmo-netif/+/34445?usp=email
to look at the new patch set (#4).
The following approvals got outdated and were removed:
Verified+1 by Jenkins Builder
Change subject: ipa: Don't break strict aliasing rule
......................................................................
ipa: Don't break strict aliasing rule
Somehow gcc doesn't always warn about this rule being broken.
We are breaking the strict aliasing rule here and libosmo-netif
currently does not make use of the '-fno-strict-aliasing' flag.
It's possible that this has also been causing nondeterministic
timestamps in libosmo-netif stream tests every once in a while.
Related: OS#6164, OS#5753
Change-Id: Ibed543cdfcdda8c0256ce7d8818ff96d6d46e9b0
---
M include/osmocom/netif/ipa.h
1 file changed, 25 insertions(+), 1 deletion(-)
git pull ssh://gerrit.osmocom.org:29418/libosmo-netif refs/changes/45/34445/4
--
To view, visit https://gerrit.osmocom.org/c/libosmo-netif/+/34445?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmo-netif
Gerrit-Branch: master
Gerrit-Change-Id: Ibed543cdfcdda8c0256ce7d8818ff96d6d46e9b0
Gerrit-Change-Number: 34445
Gerrit-PatchSet: 4
Gerrit-Owner: arehbein <arehbein(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel <dwillmann(a)sysmocom.de>
Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-CC: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: arehbein <arehbein(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Attention: daniel <dwillmann(a)sysmocom.de>
Gerrit-Attention: dexter <pmaier(a)sysmocom.de>
Gerrit-MessageType: newpatchset
Attention is currently required from: arehbein, dexter, pespin.
fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/34444?usp=email )
Change subject: write_queue: Enable updating max_length field
......................................................................
Patch Set 4: Code-Review+1
(1 comment)
File src/core/write_queue.c:
https://gerrit.osmocom.org/c/libosmocore/+/34444/comment/8710d00b_82692e84
PS4, Line 165: dropped_msgs++;
> No need to increment the var N times, simply: […]
It's not going to work if you do this after the while-loop, because the `queue->current_length` would always be less or equal to `len`. I see nothing wrong with incrementing the variable.
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/34444?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: Ibfe51a2faf29f8ae160a9c330c9af0d09b5a9002
Gerrit-Change-Number: 34444
Gerrit-PatchSet: 4
Gerrit-Owner: arehbein <arehbein(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: arehbein <arehbein(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: dexter <pmaier(a)sysmocom.de>
Gerrit-Comment-Date: Mon, 18 Sep 2023 17:21:36 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Comment-In-Reply-To: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: comment
Attention is currently required from: arehbein, daniel, dexter, fixeria, pespin.
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-netif/+/34445?usp=email )
Change subject: ipa: Don't break strict aliasing rule
......................................................................
Patch Set 3:
(1 comment)
File include/osmocom/netif/ipa.h:
https://gerrit.osmocom.org/c/libosmo-netif/+/34445/comment/6ae8140c_85bea39a
PS3, Line 29: } __attribute__ ((packed));
Can you try the unnamed struct version inside the macro which I mention? I'd prefer that one if that works.
--
To view, visit https://gerrit.osmocom.org/c/libosmo-netif/+/34445?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmo-netif
Gerrit-Branch: master
Gerrit-Change-Id: Ibed543cdfcdda8c0256ce7d8818ff96d6d46e9b0
Gerrit-Change-Number: 34445
Gerrit-PatchSet: 3
Gerrit-Owner: arehbein <arehbein(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel <dwillmann(a)sysmocom.de>
Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-CC: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: arehbein <arehbein(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Attention: daniel <dwillmann(a)sysmocom.de>
Gerrit-Attention: dexter <pmaier(a)sysmocom.de>
Gerrit-Comment-Date: Mon, 18 Sep 2023 17:13:34 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
Attention is currently required from: daniel, dexter, fixeria, pespin.
arehbein has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-netif/+/34445?usp=email )
Change subject: ipa: Don't break strict aliasing rule
......................................................................
Patch Set 2:
(2 comments)
File include/osmocom/netif/ipa.h:
https://gerrit.osmocom.org/c/libosmo-netif/+/34445/comment/817e0602_645e0b44
PS2, Line 26: #warning "OSMO_IPA_MSGB_CB breaks the strict aliasing rule. Don't use unless -fno-strict-aliasing flag is enabled!"
> I just tried to build libosmo-netif completely and I don't see any warning nor error.
I'm not sure if getting no warning from gcc is always equivalent with gcc not making use of, say strict aliasing optimizations. I wouldn't trust gcc that far. I have used the second solution you suggested above.
File include/osmocom/netif/ipa.h:
https://gerrit.osmocom.org/c/libosmo-netif/+/34445/comment/e47f3910_a116c0ab
PS1, Line 21: osmo_ipa_msgb_cb
> Is this warning going to show up when compiling any files including this header and not necessarily […]
(not a problem anymore, since the newest patch version is aliasing with a union in a legal way)
--
To view, visit https://gerrit.osmocom.org/c/libosmo-netif/+/34445?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmo-netif
Gerrit-Branch: master
Gerrit-Change-Id: Ibed543cdfcdda8c0256ce7d8818ff96d6d46e9b0
Gerrit-Change-Number: 34445
Gerrit-PatchSet: 2
Gerrit-Owner: arehbein <arehbein(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel <dwillmann(a)sysmocom.de>
Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-CC: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Attention: daniel <dwillmann(a)sysmocom.de>
Gerrit-Attention: dexter <pmaier(a)sysmocom.de>
Gerrit-Comment-Date: Mon, 18 Sep 2023 17:13:23 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: arehbein <arehbein(a)sysmocom.de>
Comment-In-Reply-To: fixeria <vyanitskiy(a)sysmocom.de>
Comment-In-Reply-To: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: comment
Attention is currently required from: daniel, dexter, fixeria.
Hello Jenkins Builder, daniel, dexter, fixeria,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/libosmo-netif/+/34445?usp=email
to look at the new patch set (#3).
The following approvals got outdated and were removed:
Verified+1 by Jenkins Builder
Change subject: ipa: Don't break strict aliasing rule
......................................................................
ipa: Don't break strict aliasing rule
Somehow gcc doesn't always warn about this rule being broken.
We are breaking the strict aliasing rule here and libosmo-netif
currently does not make use of the '-fno-strict-aliasing' flag.
It's possible that this has also been causing nondeterministic
timestamps in libosmo-netif stream tests every once in a while.
Related: OS#6164, OS#5753
Change-Id: Ibed543cdfcdda8c0256ce7d8818ff96d6d46e9b0
---
M include/osmocom/netif/ipa.h
1 file changed, 24 insertions(+), 2 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmo-netif refs/changes/45/34445/3
--
To view, visit https://gerrit.osmocom.org/c/libosmo-netif/+/34445?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmo-netif
Gerrit-Branch: master
Gerrit-Change-Id: Ibed543cdfcdda8c0256ce7d8818ff96d6d46e9b0
Gerrit-Change-Number: 34445
Gerrit-PatchSet: 3
Gerrit-Owner: arehbein <arehbein(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel <dwillmann(a)sysmocom.de>
Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-CC: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Attention: daniel <dwillmann(a)sysmocom.de>
Gerrit-Attention: dexter <pmaier(a)sysmocom.de>
Gerrit-MessageType: newpatchset
Attention is currently required from: dexter, fixeria.
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/34444?usp=email )
Change subject: write_queue: Enable updating max_length field
......................................................................
Patch Set 4:
(3 comments)
File src/core/write_queue.c:
https://gerrit.osmocom.org/c/libosmocore/+/34444/comment/1375ee89_5241c1c9
PS4, Line 153: * \returns Number of messages dropped.
I'd return an int, so we can add error codes later on. "ssize_t" maybe, so add possibility of a bigger count.
https://gerrit.osmocom.org/c/libosmocore/+/34444/comment/d53f9bd1_38d2bfdf
PS4, Line 157: size_t osmo_wqueue_update_maxlen(struct osmo_wqueue *queue, size_t len)
Let's call this "osmo_wqueue_set_maxlen()".
queue->max_length is a unsigned int iirc, so why using size_t len above?
https://gerrit.osmocom.org/c/libosmocore/+/34444/comment/c1a4393b_6779c349
PS4, Line 165: dropped_msgs++;
No need to increment the var N times, simply:
if (queue->current_length > len)
return queue->current_length - len;
else
return 0;
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/34444?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: Ibfe51a2faf29f8ae160a9c330c9af0d09b5a9002
Gerrit-Change-Number: 34444
Gerrit-PatchSet: 4
Gerrit-Owner: arehbein <arehbein(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Attention: dexter <pmaier(a)sysmocom.de>
Gerrit-Comment-Date: Mon, 18 Sep 2023 15:56:14 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
Attention is currently required from: dexter, fixeria, pespin.
arehbein has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/34444?usp=email )
Change subject: write_queue: Enable updating max_length field
......................................................................
Patch Set 4:
(2 comments)
File src/core/write_queue.c:
https://gerrit.osmocom.org/c/libosmocore/+/34444/comment/612963d2_25e0991b
PS3, Line 161: queue->current_length > queue->max_length
> This condition can never be true because you're updating the `queue->max_length` after the loop, not […]
Done
File tests/write_queue/wqueue_test.c:
https://gerrit.osmocom.org/c/libosmocore/+/34444/comment/3dca4dd2_33cd74ca
PS3, Line 98: OSMO_ASSERT
> Somehow this `assert()` does not assert at all, no matter how I change the expected value. […]
Ah heck, I fixed it locally for the previous test code I added before uploading and somehow managed to recode this error right again *facepalms*. Thanks
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/34444?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: Ibfe51a2faf29f8ae160a9c330c9af0d09b5a9002
Gerrit-Change-Number: 34444
Gerrit-PatchSet: 4
Gerrit-Owner: arehbein <arehbein(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: dexter <pmaier(a)sysmocom.de>
Gerrit-Comment-Date: Mon, 18 Sep 2023 15:53:13 +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: arehbein, dexter, fixeria, pespin.
Hello Jenkins Builder, dexter, fixeria, pespin,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/libosmocore/+/34444?usp=email
to look at the new patch set (#4).
The following approvals got outdated and were removed:
Code-Review-1 by fixeria, Verified+1 by Jenkins Builder
Change subject: write_queue: Enable updating max_length field
......................................................................
write_queue: Enable updating max_length field
Dequeue and free any excess messages, in case the new queue length
is shorter than the old.
Related: OS#5774
Change-Id: Ibfe51a2faf29f8ae160a9c330c9af0d09b5a9002
---
M include/osmocom/core/write_queue.h
M src/core/libosmocore.map
M src/core/write_queue.c
M tests/write_queue/wqueue_test.c
4 files changed, 87 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/44/34444/4
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/34444?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: Ibfe51a2faf29f8ae160a9c330c9af0d09b5a9002
Gerrit-Change-Number: 34444
Gerrit-PatchSet: 4
Gerrit-Owner: arehbein <arehbein(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: arehbein <arehbein(a)sysmocom.de>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: dexter <pmaier(a)sysmocom.de>
Gerrit-MessageType: newpatchset