RE: [PATCH 1/1 v7] Add Crypto API User Interface Support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

>> I don't understand what you are referring to here. Let's assume that operation is submitted synchronously to >>cryptodev, cryptodev in turn will submit to the underlying driver. If the underlying driver is software based, >>it will completed synchronous and return without calling wait_for_completion. If the underlying driver is >>hardware based or asynchronous, it will wait for completion via the callback function signaling the event wait >>object. Now, let's assume that operation is submitted asynchronously to cryptodev, crypto in turn will submit >>to the underlying driver. If the underlying driver is software based and completed, it just return. If the >>underlying driver is asynchronous such as hardware, it will return immediately without waiting. CryptoDev will >>call the AIO callback function when the crypto driver call cryptodev callback function. Therefore, what is the >>issue?
>>
>With async driver crypto_ablkcipher_encrypt() (and other crypto
>processing functions)  will return immediately (with
>-EINPROGRESS return value in case of HIFN driver for example),
>but your code will wait for request completion at
>wait_for_completion_interruptible() point.

[Loc Ho]
Yes... This is the exact behavior that we wanted for synchronous user space application. As Linux CryptoDev support two interfaces - asynchronous and synchronous. If the user space application wants its operations to be synchronous (by calling vector write), then Linux CryptoDev musts complete the required operation synchronously. An example of this type of application is the current OpenSSL. If the application wants to take full capabilities of the Linux CryptoDev, then it should use AIO interface instead. In this case, we will return immediately as well. When the operation is completely, Linux CryptoDev will perform the necessary step to notify the caller (via AIO framework).

-Loc
--
To unsubscribe from this list: send the line "unsubscribe linux-crypto" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel]     [Gnu Classpath]     [Gnu Crypto]     [DM Crypt]     [Netfilter]     [Bugtraq]

  Powered by Linux