Extract DNS hash to separate header with ARM64 support - #17
Merged
Conversation
- Create dns_hash.h with platform-optimized hash for DNS labels - Add ARM64 CRC32-C support via ACLE intrinsics (__crc32cd/cb) - Keep x86_64 SSE4.2 CRC32-C support (_mm_crc32_u64/u8) - Add FNV-1a fallback for other platforms - Remove complex 128+ byte chunking (unnecessary for DNS max 255 bytes) - Replace t1ha dependency with simpler inline implementation - Remove constructor-based random initialization Package requirements: - x86_64: SSE4.2 (-msse4.2) - aarch64: ARMv8.1+ or ARMv8-A+crc (-march=armv8-a+crc)
- Remove redundant dnhash_bloom_hash() wrapper function - Use 32-bit types consistently (hash output is 32-bit) - Extract h2 from upper bits of mixed value instead of redundant XOR - Force h2 odd for coprimality with power-of-2 filter size - Simplify index calculation by removing unnecessary casts
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.
Summary
rbldnsd_dnhash.cto reusabledns_hash.hheaderChanges
_mm_crc32_u64/u8__crc32cd/cbBuild Requirements
-msse4.2)-march=armv8-a+crc)Line count
Test plan
-msse4.2-march=armv8-a+crc