[PATCH] vhost-user: enable asym capabilities for user backend

Rajesh Mudimadugula posted 1 patch 4 months, 3 weeks ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20250626122451.908205-1-rmudimadugul@marvell.com
Maintainers: "Gonglei (Arei)" <arei.gonglei@huawei.com>, Zhenwei Pi <pizhenwei@bytedance.com>, "Michael S. Tsirkin" <mst@redhat.com>, Stefano Garzarella <sgarzare@redhat.com>
backends/cryptodev-vhost-user.c | 3 +++
1 file changed, 3 insertions(+)
[PATCH] vhost-user: enable asym capabilities for user backend
Posted by Rajesh Mudimadugula 4 months, 3 weeks ago
This patch enables and advertises asym capabilties
for backend user application.

Signed-off-by: Rajesh Mudimadugula <rmudimadugul@marvell.com>
---
 backends/cryptodev-vhost-user.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/backends/cryptodev-vhost-user.c b/backends/cryptodev-vhost-user.c
index cb04e68b02..f9dec14a4a 100644
--- a/backends/cryptodev-vhost-user.c
+++ b/backends/cryptodev-vhost-user.c
@@ -230,6 +230,9 @@ static void cryptodev_vhost_user_init(
     backend->conf.max_size = UINT64_MAX;
     backend->conf.max_cipher_key_len = VHOST_USER_MAX_CIPHER_KEY_LEN;
     backend->conf.max_auth_key_len = VHOST_USER_MAX_AUTH_KEY_LEN;
+    backend->conf.crypto_services |=
+	    1u << QCRYPTODEV_BACKEND_SERVICE_TYPE_AKCIPHER;
+    backend->conf.akcipher_algo = 1u << VIRTIO_CRYPTO_AKCIPHER_RSA;
 }
 
 static int64_t cryptodev_vhost_user_crypto_create_session(
-- 
2.34.1
Re: [PATCH] vhost-user: enable asym capabilities for user backend
Posted by Michael S. Tsirkin 4 months ago
On Thu, Jun 26, 2025 at 12:24:51PM +0000, Rajesh Mudimadugula wrote:
> This patch enables and advertises asym capabilties
> for backend user application.
> 
> Signed-off-by: Rajesh Mudimadugula <rmudimadugul@marvell.com>

You want to CC all maintainers really.
The commit log also should include motivation for each change,
not just repeat what the patch does.
As a nit, format it using an imperative mood:
"...enable and advertise..."

> ---
>  backends/cryptodev-vhost-user.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/backends/cryptodev-vhost-user.c b/backends/cryptodev-vhost-user.c
> index cb04e68b02..f9dec14a4a 100644
> --- a/backends/cryptodev-vhost-user.c
> +++ b/backends/cryptodev-vhost-user.c
> @@ -230,6 +230,9 @@ static void cryptodev_vhost_user_init(
>      backend->conf.max_size = UINT64_MAX;
>      backend->conf.max_cipher_key_len = VHOST_USER_MAX_CIPHER_KEY_LEN;
>      backend->conf.max_auth_key_len = VHOST_USER_MAX_AUTH_KEY_LEN;
> +    backend->conf.crypto_services |=
> +	    1u << QCRYPTODEV_BACKEND_SERVICE_TYPE_AKCIPHER;
> +    backend->conf.akcipher_algo = 1u << VIRTIO_CRYPTO_AKCIPHER_RSA;
>  }
>  
>  static int64_t cryptodev_vhost_user_crypto_create_session(
> -- 
> 2.34.1