-
Notifications
You must be signed in to change notification settings - Fork 402
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
iox-#2157 Replace uint32_t with uint64_t for payload size #2158
iox-#2157 Replace uint32_t with uint64_t for payload size #2158
Conversation
d74f57d
to
b2d89f3
Compare
@kozakusek commit message is fine. Now the more tedious work starts to make it work on all platforms :) |
It seems the code is not formatted with clang-format. You can use |
39b82b1
to
ffddb0a
Compare
@elBoberido the biggest issue I see now is that
And another thnig, should this be mentioned as an API breaking change? |
@kozakusek I did a stupid mistake when I put Yes, this should indeed be mentioned as a breaking change. I think it is more of an ABI breaking change since the API should still be source compatible. |
1b2c4b5
to
f0c5be5
Compare
So one last thing before I open this for review - should I add a unit test for memory chunks > 4GB? |
Unfortunately the CI seems to not reliably have that much memory. AFAIR we already had to deactivate on test which required > 4GB. I need to check what changed maybe it is possible to mock a few things and test at least the algorithm. |
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## master #2158 +/- ##
=======================================
Coverage 80.17% 80.18%
=======================================
Files 421 421
Lines 16346 16364 +18
Branches 2265 2268 +3
=======================================
+ Hits 13105 13121 +16
- Misses 2431 2432 +1
- Partials 810 811 +1
Flags with carried forward coverage won't be shown. Click here to find out more.
|
f0c5be5
to
805e201
Compare
Cleaned up the mess in examples and tests. |
CI looks good. Thanks. Will have a look at the changes the next days. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will continue tomorrow, it's already quite late. Just had a look at the C binding and the release notes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not yet fully done. I have saved some of the critical files for tomorrow :)
Btw, please don't squash commits from now on since this will make the review harder and there are subtle thinks to look at.
iceoryx_posh/include/iceoryx_posh/roudi/introspection_types.hpp
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since this affects a lot of files and from the comments from @elBoberido I saw that there are maybe even more places where we overlooked to change an uint32_t
to an uint64_t
. This could result in weird unsigned integer overflow bugs.
Therefore, I would add a test that verifies that payloads larger than 4GB are actually supported. Those tests shall be added to:
iceoryx_posh/test/integrationtests/test_client_server.cpp
iceoryx_posh/test/integrationtests/test_publish_subscriber_communication.cpp
I would introduce a test struct like:
struct LargeData {
uint8_t payload[4294967296 + 100]; // + 100 to be 100 bytes above the original limit
};
And use it for the typed communication. Also we need to adjust the roudi config to support those large structs. I think this should work in the test setup
RouDi_GTest(MinimalRouDiConfigBuilder().payloadChunkSize(4294967296 + 100).payloadChunkCount(2).create());
I would test both cases, one with the typed API and one with the untyped API. If this is too complex or time-consuming, I would also accept just a test with one of the APIs.
Addition:
- @elBoberido made me aware that the CI is unable to handle this. I would still welcome those tests so that I can run them locally and for the CI we have to disable them.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please also update chunk_header.md
regarding the uint32_t->uint64_t change
e2a433c
to
fb700fe
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. Maybe a few performance improvements for the new tests but they are not that important since we don't run them in the CI.
More important though would be to add the new option to the cmake options. This shouldn't take much time and you can just copy&paste from an existing options.
iceoryx_posh/test/integrationtests/test_publisher_subscriber_communication.cpp
Outdated
Show resolved
Hide resolved
iceoryx_posh/test/integrationtests/test_publisher_subscriber_communication.cpp
Outdated
Show resolved
Hide resolved
@elfenpiff @gpalmer-latai please also have a final look @kozakusek looks good. Thanks for the contributions. Btw, there is a developer meetup on each first Tuesday of the month. Would be great to hear more about your use case. |
It seems like it would be a good idea for you to take some credit for your contribution by updating the copyright headers: https://github.com/eclipse-iceoryx/iceoryx/blob/master/iceoryx_posh/source/mepoo/mem_pool.cpp#L3 Basically put your individual name as @elBoberido has if you signed the eclipse agreement as an individual contributor, or if you are doing this for work purposes and your company cares to claim your IP, you can put their name as well. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left a few suggestions about more extension testing/error messaging, but overall this looks great to me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have some remarks, but they are purely optional. If you have to touch the PR again, it would be nice if you would incorporate them, otherwise just merge the PR.
Well |
That' s also how I handle it. It must be something more complex than something a trained ferret could have done 😆 |
dabb702
to
ba5178c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. Every request was implemented. I'm going to merge once the CI is finished. Thanks very much for your contribution and patience. Hope to see you in the developer meetup :)
Pre-Review Checklist for the PR Author
iox-123-this-is-a-branch
)iox-#123 commit text
)task-list-completed
)iceoryx_hoofs
are added to./clang-tidy-diff-scans.txt
Notes for Reviewer
Checklist for the PR Reviewer
iceoryx_hoofs
have been added to./clang-tidy-diff-scans.txt
Post-review Checklist for the PR Author
References