aboutsummaryrefslogtreecommitdiff
path: root/include/sysemu
diff options
context:
space:
mode:
authorGonglei <arei.gonglei@huawei.com>2016-10-28 16:33:29 +0800
committerMichael S. Tsirkin <mst@redhat.com>2016-11-01 19:21:08 +0200
commitd6634ac09abf20d890fd094773f125ee0ff0b1cb (patch)
tree1d7a92f2a248141b8404d5a7eaf67c1c40ea9f6c /include/sysemu
parent04b9b37edda85964cca033a48dcc0298036782f2 (diff)
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>
Diffstat (limited to 'include/sysemu')
-rw-r--r--include/sysemu/cryptodev.h13
1 files changed, 7 insertions, 6 deletions
diff --git a/include/sysemu/cryptodev.h b/include/sysemu/cryptodev.h
index e66bd4b3c0..84526c0d35 100644
--- a/include/sysemu/cryptodev.h
+++ b/include/sysemu/cryptodev.h
@@ -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 */