Skip to content
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

mac: Only use one CRC engine for Checker #183

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

david-sawatzke
Copy link
Contributor

As we have a certain crc value for a complete valid packet, additional 0 bytes lead to a predictable new crc value. Thus, for reception, we can only use a single, wide, engine and blank out the invalid bytes. Then compare it against a precomputed expected crc value for this last_be value.

To be certain that this works, add a test to verify it.

While using the test, I noticed that 16 bit support with last_be is completely broken.

64 bits also don't work with the test case, as a new packet can arrive which the old one isn't fully processed in checker, but this might not be a real issue on hardware.

This probably never worked, but it certainly doesn't work right now
We don't need 4 crc engines for checking, we can use a single one, blank
out the "invalid" data bytes and check it against a precomputed expected result
@david-sawatzke david-sawatzke changed the title Only use one CRC engine for Checker mac: Only use one CRC engine for Checker Feb 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant