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

PSA/eBPF: use slice-by-8 algorithm for CRC-32 #3688

Merged
merged 5 commits into from
Nov 12, 2022

Conversation

majchwo
Copy link
Contributor

@majchwo majchwo commented Nov 11, 2022

Previously CRC-32 was calculated using bitwise operations (bit-by-bit). This PR implements more efficient algorithm for CRC-32 using slice-by-8 algorithm. The performance gain depends on the length of an input data. For example, with 40 bytes of input data we observed about 35% reduction of CPU cycles per packet.

This work has been done in cooperation with @osinstom & @tatry.

@osinstom
Copy link
Contributor

A few PTF tests are failing, @majchwo and I will fix them soon.

@osinstom
Copy link
Contributor

@mbudiu-vmw @majchwo done.

@mihaibudiu mihaibudiu merged commit 3842e16 into p4lang:main Nov 12, 2022
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.

3 participants