mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 00:03:54 -06:00
cryptodev: introduce an unified wrapper for crypto operation
We use an opaque point to the VirtIOCryptoReq which can support different packets based on different algorithms. Signed-off-by: Gonglei <arei.gonglei@huawei.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
This commit is contained in:
parent
04b9b37edd
commit
d6634ac09a
3 changed files with 38 additions and 13 deletions
|
@ -278,20 +278,21 @@ int cryptodev_backend_sym_close_session(
|
|||
uint32_t queue_index, Error **errp);
|
||||
|
||||
/**
|
||||
* cryptodev_backend_sym_operation:
|
||||
* cryptodev_backend_crypto_operation:
|
||||
* @backend: the cryptodev backend object
|
||||
* @op_info: parameters needed by symmetric crypto operation
|
||||
* @opaque: pointer to a VirtIOCryptoReq object
|
||||
* @queue_index: queue index of cryptodev backend client
|
||||
* @errp: pointer to a NULL-initialized error object
|
||||
*
|
||||
* Do symmetric crypto operation, such as encryption and
|
||||
* Do crypto operation, such as encryption and
|
||||
* decryption
|
||||
*
|
||||
* Returns: 0 on success, or Negative on error
|
||||
* Returns: VIRTIO_CRYPTO_OK on success,
|
||||
* or -VIRTIO_CRYPTO_* on error
|
||||
*/
|
||||
int cryptodev_backend_sym_operation(
|
||||
int cryptodev_backend_crypto_operation(
|
||||
CryptoDevBackend *backend,
|
||||
CryptoDevBackendSymOpInfo *op_info,
|
||||
void *opaque,
|
||||
uint32_t queue_index, Error **errp);
|
||||
|
||||
#endif /* CRYPTODEV_H */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue