Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is a mix of a bug report and a RFC, the bug report is that I had some problems with packets being dropped on the receiving side because of wrong checksums, and while investigating that I found some unaligned memory access warnings, which seemed to be the cause of the wrong checksums.
The RFC part is how I tried to fix that, but it is only lightly tested this and I am not sure that this is the better way to solve the issue for the project. I tried to keep the code as similar as I could to the original, so any deviation from the original "spirit" could be detected "at a glance".
I am thinking that adding (and using) the complete "get_unaligned + endianess conversion" calls (for example, https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/include/asm-generic/unaligned.h#n60) could be a good idea, but opinions are welcome.