Allow users of the SDK to decide about hardware-accelerated CRC#128
Open
Allow users of the SDK to decide about hardware-accelerated CRC#128
Conversation
gyurix
reviewed
Apr 16, 2026
gyurix
left a comment
There was a problem hiding this comment.
Use case makes sense for embedders/fuzzers.
Main concern is API shape: exporting raw g_Crc_Algo in public header leaks internal policy/state as public surface. That is harder to evolve than a narrow setter/config API, and current patch does not document valid values/semantics clearly.
Diff is otherwise small and clean.
Merge readiness: 6/10. Before merge: document allowed values or replace global exposure with a smaller public control point.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
It's slightly helpful for fuzzers to be able to disable CRC checks. This was previously done in Chromium by overriding g_CrcTable, but hardware-accelerated CRC breaks that. This PR would allow Chromium to define Z7_NO_CRC_HW_FORCE to instead leave hardware acceleration dependent on g_Crc_Algo.
See also https://crrev.com/c/6619906.