Skip to contentSkip to conversation

vhost-user: enable asym capabilities for user backend

PATCH In review Rajesh Mudimadugula 2 participants 2 messages Jun 26, 2025 – Jul 13, 2025

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 vhost-user: enable asym capabilities for user backend

This patch enables and advertises asym capabilties for backend user application.

---
 backends/cryptodev-vhost-user.c | 3 +++
 1 file changed, 3 insertions(+)
backends/cryptodev-vhost-user.c +3 -0
index cb04e68b02..f9dec14a4a 100644
@@ -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(
Signature · 1 line
2.34.1
#1 lore raw
Quoted 4 lines · Rajesh Mudimadugula

This patch enables and advertises asym capabilties for backend user application.

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..."

Quoted 20 lines
---
 backends/cryptodev-vhost-user.c | 3 +++
 1 file changed, 3 insertions(+)
backends/cryptodev-vhost-user.c +3 -0
index cb04e68b02..f9dec14a4a 100644
@@ -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(
Signature · 1 line
2.34.1