On Thu, Apr 30, 2009 at 10:18 PM, Theo de Raadt <dera...@cvs.openbsd.org>
wrote:
> Again, you have not said what you want to do.

Er, sorry, I thought that email applied regardless.

> Do you want the kernel to do crypto faster, or do you want userland to
> do crypto fast.

The kernel to do crypto faster, hence the email subject line. :)
ipsec in particular is an interest of mine.

> If you want to do ipsec or something like that, in the kernel, then
> you have either soft crypto or hardware crypto.  In the soft crypto
> case it does the work right away (but only on limited size buffers)
> before it surrenders and gives other things a chance to run.

Looking at esp_output, if it has any crypto work to do, it calls
crypto_dispatch.  crypto_dispatch checks if there's a crypto workq
(which is created unconditionally by init_crypto, which is called
unconditionally main), then it dispatches the crypto request to the
workq using workq_add_task.  My understanding (seemingly backed up by
Ted's demonstration) is that crypto_invoke will be executed in the
crypto worker thread, not in the caller's thread.

Am I still missing something?

Reply via email to