-
Notifications
You must be signed in to change notification settings - Fork 203
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
Remove cryptodev from the kernel and make it a loadable module #26
Comments
Hi Olivier, If it's not in GENERIC I'm all for it. The impact on the code base needs to be assessed, at least OpenVPN uses cryptodev. Cheers, |
Hello Franco, I've checked https://github.com/freebsd/freebsd/blob/master/sys/amd64/conf/GENERIC and only crypto is loaded, not cryptodev. I don't think that OpenVPN requires cryptodev, it uses OpenSSL's evp engine which is capable of using the AES-NI instructions without using the aesni module. If OpenSSL finds cryptodev and aesni is loaded, then it will use cryptodev and slow things down. Without aesni:
After having loaded it, along with cryptodev
When testing OpenVPN, I didn't notice any change in performance, only in CPU use
Without aesni
With module
I'm told one advantage of being able to load the aesni.ko module is for ipsec and that shouldn't require cryptodev either, at least not when using AES-NI. |
Some background information: |
I'm just gonna leave this here... https://redmine.pfsense.org/issues/5976 |
Cool :). I'm not registered to access their tools, so I couldn't see if that had already been done. |
No, not yet. This ticket was added a couple of days after you suggested it here. :) |
@oparoz will you build your own kernel or do you want my test build? |
I build my own, but maybe post yours in the forum so that people are made aware of this change? It's quite badly documented in FreeBSD land imho. |
Looking at these 2 commits: I see one problem, but maybe it's solved elsewhere. You still need to load crypto along with aesni per example, just not cryptodev. |
I was hoping that best case it was auto-loaded, worst case to be loaded manually. As it turns out it's required by IPSEC so it stays in the kernel, see last commit. |
Ah, good 👍 :) |
So, by removing cryptodev from the kernel, people on recent X86 hardware will benefit from better encryption speed.
Thoughts?
The text was updated successfully, but these errors were encountered: