[v8 1/5] vhost: skip crypto op fetch before vring init

2025-02-27 Thread Gowrishankar Muthukrishnan
Until virtio avail ring is initialized (by VHOST_USER_SET_VRING_ADDR), worker thread should not try to fetch crypto op, which would lead to memory fault. Fixes: 939066d96563 ("vhost/crypto: add public function implementation") Cc: sta...@dpdk.org Signed-off-by: Gowrishankar Muthukrish

RE: [EXTERNAL] Re: [v6 1/5] vhost: skip crypto op fetch before vring init

2025-02-27 Thread Gowrishankar Muthukrishnan
vc_req->dev = vcrypto->dev; vc_req->vq = vq; Thanks, Gowrishankar

[v8 2/5] vhost: update vhost_user crypto session parameters

2025-02-27 Thread Gowrishankar Muthukrishnan
. Hence, it would break parsing vhost_user messages. This patch addresses both of the above problems. Signed-off-by: Gowrishankar Muthukrishnan Acked-by: Akhil Goyal --- lib/vhost/vhost_crypto.c | 12 ++-- lib/vhost/vhost_user.h | 33 + 2 files changed, 35

[v8 0/5] vhost: add RSA support

2025-02-27 Thread Gowrishankar Muthukrishnan
This patch series supports asymmetric RSA in vhost crypto library. It also includes changes to improve vhost crypto library: * support newer QEMU versions. * fix broken vhost_crypto example application. * stabilize crypto fastpath operations. Gowrishankar Muthukrishnan (5): vhost: skip

[v8 3/5] examples/vhost_crypto: fix user callbacks

2025-02-27 Thread Gowrishankar Muthukrishnan
In order to handle new vhost user connection, use new_connection and destroy_connection callbacks. Fixes: f5188211c721 ("examples/vhost_crypto: add sample application") Cc: sta...@dpdk.org Signed-off-by: Gowrishankar Muthukrishnan Acked-by: Akhil Goyal --- examples/vhost_crypto/

[v9 4/6] examples/vhost_crypto: fix user callbacks

2025-02-28 Thread Gowrishankar Muthukrishnan
In order to handle new vhost user connection, use new_connection and destroy_connection callbacks. Fixes: f5188211c721 ("examples/vhost_crypto: add sample application") Cc: sta...@dpdk.org Signed-off-by: Gowrishankar Muthukrishnan Acked-by: Akhil Goyal --- examples/vhost_crypto/

[v9 1/6] vhost: fix thread safety checks for vhost crypto data req

2025-02-28 Thread Gowrishankar Muthukrishnan
not recognise this inherited lock and stops compilation. This patch explicitly uses vhost_virtqueue where ever required and fulfills thread safety checks. Signed-off-by: Gowrishankar Muthukrishnan --- lib/vhost/vhost_crypto.c | 76 ++-- 1 file changed, 41 inserti

[v9 2/6] vhost: skip crypto op fetch before vring init

2025-02-28 Thread Gowrishankar Muthukrishnan
Until virtio avail ring is initialized (by VHOST_USER_SET_VRING_ADDR), worker thread should not try to fetch crypto op, which would lead to memory fault. Fixes: 939066d96563 ("vhost/crypto: add public function implementation") Cc: sta...@dpdk.org Signed-off-by: Gowrishankar Muthukrish

[v9 3/6] vhost: update vhost_user crypto session parameters

2025-02-28 Thread Gowrishankar Muthukrishnan
. Hence, it would break parsing vhost_user messages. This patch addresses both of the above problems. Signed-off-by: Gowrishankar Muthukrishnan Acked-by: Akhil Goyal --- lib/vhost/vhost_crypto.c | 12 ++-- lib/vhost/vhost_user.h | 33 + 2 files changed, 35

[v9 0/6] vhost: add RSA support

2025-02-28 Thread Gowrishankar Muthukrishnan
This patch series supports asymmetric RSA in vhost crypto library. It also includes changes to improve vhost crypto library: * support newer QEMU versions. * fix broken vhost_crypto example application. * stabilize crypto fastpath operations. v9: - new patch 1/6 Gowrishankar Muthukrishnan (6

[v9 5/6] vhost: support asymmetric RSA crypto ops

2025-02-28 Thread Gowrishankar Muthukrishnan
Support asymmetric RSA crypto operations in vhost-user. Signed-off-by: Gowrishankar Muthukrishnan Acked-by: Akhil Goyal --- doc/guides/rel_notes/release_25_03.rst | 3 + lib/vhost/vhost_crypto.c | 484 +++-- lib/vhost/virtio_crypto.h | 67

[v9 6/6] examples/vhost_crypto: support asymmetric crypto

2025-02-28 Thread Gowrishankar Muthukrishnan
Support asymmetric crypto operations. Signed-off-by: Gowrishankar Muthukrishnan Acked-by: Akhil Goyal --- doc/guides/sample_app_ug/vhost_crypto.rst | 5 +++ examples/vhost_crypto/main.c | 50 +-- 2 files changed, 43 insertions(+), 12 deletions(-) diff --git a

RE: [EXTERNAL] Re: [v6 1/5] vhost: skip crypto op fetch before vring init

2025-02-28 Thread Gowrishankar Muthukrishnan
any other changes are required, we can assist going forward. We also believe this software backend needs to be reliable and hence can help test required virtio functionalities. Thanks, Gowrishankar Regards, Gowrishankar > Maxime

RE: [EXTERNAL] Re: [v6 1/5] vhost: skip crypto op fetch before vring init

2025-02-28 Thread Gowrishankar Muthukrishnan
x27;t see little point > in having > in the first place..) and adjust annotations. > Yes I thought about it initially, but then I had thought vhost_crypto_process_one_req() is only static and called with locks held. Anyway, I have come up with one additional patch in series to fix it specifically. Thanks for your suggestion. Regards, Gowrishankar > > -- > David Marchand

RE: [EXTERNAL] [PATCH] vhost/crypto: fix build with asserts

2025-03-05 Thread Gowrishankar Muthukrishnan
> > Fixes: d1b484bf1876 ("vhost/crypto: support asymmetric RSA") > > Signed-off-by: David Marchand Tested-by: Gowrishankar Muthukrishnan

RE: [EXTERNAL] [PATCH] vhost/crypto: fix locking

2025-03-05 Thread Gowrishankar Muthukrishnan
t; Fixes: 88c73b5434e6 ("vhost/crypto: fix thread safety check") > > Signed-off-by: David Marchand Tested-by: Gowrishankar Muthukrishnan Thanks, Gowrishankar

[PATCH] crypto/openssl: validate incorrect signature in verify op

2025-02-16 Thread Gowrishankar Muthukrishnan
Return correct error status when incorrect signature is used in RSA verify op. Fixes: d7bd42f6db19 ("crypto/openssl: update RSA routine with 3.0 EVP API") Cc: sta...@dpdk.org Signed-off-by: Gowrishankar Muthukrishnan --- drivers/crypto/openssl/rte_openssl_pmd.c | 3 +++ 1 file

[PATCH] crypto/cnxk: fix status code in asymmetric operation

2025-02-16 Thread Gowrishankar Muthukrishnan
Return error code in an asymmetric operation status when none of the known conditions met. Fixes: d29c4e0a4bea ("crypto/cnxk: fix ECDH public key verification") Signed-off-by: Gowrishankar Muthukrishnan --- drivers/crypto/cnxk/cn9k_cryptodev_ops.c | 2 ++ 1 file changed, 2 insertion

[v1] app/crypto-perf: add RSA support

2025-02-21 Thread Gowrishankar Muthukrishnan
From: Akhil Goyal Add RSA support in crypto-perf application. Signed-off-by: Akhil Goyal --- app/test-crypto-perf/cperf_ops.c | 68 app/test-crypto-perf/cperf_options.h | 4 + app/test-crypto-perf/cperf_options_parsing.c | 38 +++- app/test-crypto-perf/cperf_te

[PATCH] test/crypto: add negative test for RSA verify op

2025-02-21 Thread Gowrishankar Muthukrishnan
Add negative test for RSA verify operation to check if incorrect signature is validated. Signed-off-by: Gowrishankar Muthukrishnan --- app/test/test_cryptodev_asym.c | 27 +-- 1 file changed, 25 insertions(+), 2 deletions(-) diff --git a/app/test/test_cryptodev_asym.c b

[v3 1/6] crypto/virtio: add asymmetric RSA support

2025-02-21 Thread Gowrishankar Muthukrishnan
Asymmetric RSA operations (SIGN, VERIFY, ENCRYPT and DECRYPT) are supported in virtio PMD. Signed-off-by: Gowrishankar Muthukrishnan --- Depends-on: series-34674 ("vhost: add RSA support") v3: - fast path optimizations. --- .../virtio/virtio_crypto_capabilities.h | 19 + driv

[v3 0/6] crypto/virtio: enhancements for RSA and vDPA

2025-02-21 Thread Gowrishankar Muthukrishnan
This patch series enhances virtio crypto PMD to: * support RSA * support packed virtio ring * support vDPA backend v3: - vDPA backend code majorly sourced from virtio net. Gowrishankar Muthukrishnan (6): crypto/virtio: add asymmetric RSA support crypto/virtio: refactor queue operations

[v3 4/6] crypto/virtio: add vDPA backend

2025-02-21 Thread Gowrishankar Muthukrishnan
Add vDPA backend to virtio_user crypto. Signed-off-by: Gowrishankar Muthukrishnan --- drivers/crypto/virtio/meson.build | 7 + drivers/crypto/virtio/virtio_cryptodev.c | 57 +- drivers/crypto/virtio/virtio_cryptodev.h | 3 + drivers/crypto/virtio/virtio_logs.h

[v3 2/6] crypto/virtio: refactor queue operations

2025-02-21 Thread Gowrishankar Muthukrishnan
Move existing control queue operations into a common place that would be shared with other virtio type of devices. Signed-off-by: Gowrishankar Muthukrishnan --- drivers/crypto/virtio/meson.build | 1 + drivers/crypto/virtio/virtio_crypto_algs.h | 2 +- drivers/crypto/virtio

[v3 6/6] test/crypto: add tests for virtio user PMD

2025-02-21 Thread Gowrishankar Muthukrishnan
Reuse virtio_crypto tests for testing virtio_crypto_user PMD. Signed-off-by: Gowrishankar Muthukrishnan --- app/test/test_cryptodev.c | 7 +++ app/test/test_cryptodev.h | 1 + app/test/test_cryptodev_asym.c | 15 +++ 3 files changed, 23 insertions(+) diff --git a

[v3 5/6] test/crypto: add asymmetric tests for virtio PMD

2025-02-21 Thread Gowrishankar Muthukrishnan
Add asymmetric tests for Virtio PMD. Signed-off-by: Gowrishankar Muthukrishnan --- app/test/test_cryptodev_asym.c | 28 1 file changed, 28 insertions(+) diff --git a/app/test/test_cryptodev_asym.c b/app/test/test_cryptodev_asym.c index 9b5f3c545e..ac47be724f 100644

[v3 4/5] vhost: support asymmetric RSA crypto ops

2025-02-21 Thread Gowrishankar Muthukrishnan
Support asymmetric RSA crypto operations in vhost-user. Signed-off-by: Gowrishankar Muthukrishnan --- v3: - TLV decode optimization for fast path. - virtio_crypto.h changes moved from virtio PMD patch series into this series as asymmetric support starts essentially from library. --- lib

[v3 1/5] vhost: skip crypto op fetch before vring init

2025-02-21 Thread Gowrishankar Muthukrishnan
Until virtio avail ring is initialized (by VHOST_USER_SET_VRING_ADDR), worker thread should not try to fetch crypto op, which would lead to memory fault. Fixes: 939066d9656 ("vhost/crypto: add public function implementation") Cc: sta...@dpdk.org Signed-off-by: Gowrishankar Mut

[v3 5/5] examples/vhost_crypto: support asymmetric crypto

2025-02-21 Thread Gowrishankar Muthukrishnan
Support asymmetric crypto operations. Signed-off-by: Gowrishankar Muthukrishnan --- examples/vhost_crypto/main.c | 50 +++- 1 file changed, 38 insertions(+), 12 deletions(-) diff --git a/examples/vhost_crypto/main.c b/examples/vhost_crypto/main.c index

[v3 3/5] examples/vhost_crypto: fix user callbacks

2025-02-21 Thread Gowrishankar Muthukrishnan
In order to handle new vhost user connection, use new_connection and destroy_connection callbacks. Fixes: f5188211c721 ("examples/vhost_crypto: add sample application") Cc: sta...@dpdk.org Signed-off-by: Gowrishankar Muthukrishnan --- v3: - decoupled from v2 single patch. ---

[v3 0/5] vhost: add RSA support

2025-02-21 Thread Gowrishankar Muthukrishnan
in v2. - stabilized vhost crypto lib and example app. Gowrishankar Muthukrishnan (5): vhost: skip crypto op fetch before vring init vhost: update vhost_user crypto session parameters examples/vhost_crypto: fix user callbacks vhost: support asymmetric RSA crypto ops examples/vhost_crypto

[v3 2/5] vhost: update vhost_user crypto session parameters

2025-02-21 Thread Gowrishankar Muthukrishnan
parsing vhost_user message. This patch addresses both of the above problems. Signed-off-by: Gowrishankar Muthukrishnan --- v3: - decoupled originally from v2 series single patch. --- lib/vhost/vhost_crypto.c | 12 ++-- lib/vhost/vhost_user.h | 33 + 2

[PATCH v2] crypto/openssl: validate incorrect signature in verify op

2025-02-21 Thread Gowrishankar Muthukrishnan
Return correct error status when incorrect signature is used in RSA verify op. Fixes: d7bd42f6db19 ("crypto/openssl: update RSA routine with 3.0 EVP API") Cc: sta...@dpdk.org Signed-off-by: Gowrishankar Muthukrishnan --- v2: - added comments. --- drivers/crypto/openssl/rte_openssl_

[v3 3/6] crypto/virtio: add packed ring support

2025-02-21 Thread Gowrishankar Muthukrishnan
Add packed ring support. Signed-off-by: Gowrishankar Muthukrishnan --- drivers/crypto/virtio/virtio_cryptodev.c | 125 +++ drivers/crypto/virtio/virtio_cryptodev.h | 13 +- drivers/crypto/virtio/virtio_cvq.c | 103 +- drivers/crypto/virtio/virtio_pci.h | 25 ++ drivers

[v4 3/6] crypto/virtio: add packed ring support

2025-02-22 Thread Gowrishankar Muthukrishnan
Add packed ring support. Signed-off-by: Gowrishankar Muthukrishnan --- Depends-on: series-34682 ("vhost: add RSA support") --- drivers/crypto/virtio/virtio_cryptodev.c | 125 +++ drivers/crypto/virtio/virtio_cryptodev.h | 13 +- drivers/crypto/virtio/virtio_cvq.c

[v4 1/6] crypto/virtio: add asymmetric RSA support

2025-02-22 Thread Gowrishankar Muthukrishnan
Asymmetric RSA operations (SIGN, VERIFY, ENCRYPT and DECRYPT) are supported in virtio PMD. Signed-off-by: Gowrishankar Muthukrishnan --- Depends-on: series-34682 ("vhost: add RSA support") --- .../virtio/virtio_crypto_capabilities.h | 19 + drivers/crypto/virtio/virtio_c

[v4 0/6] crypto/virtio: enhancements for RSA and vDPA

2025-02-22 Thread Gowrishankar Muthukrishnan
This patch series enhances virtio crypto PMD to: * support RSA * support packed virtio ring * support vDPA backend v4: - CI issue fixed. Depends-on: series-34682 ("vhost: add RSA support") Gowrishankar Muthukrishnan (6): crypto/virtio: add asymmetric RSA support crypto/virtio

[v4 2/5] vhost: update vhost_user crypto session parameters

2025-02-22 Thread Gowrishankar Muthukrishnan
parsing vhost_user message. This patch addresses both of the above problems. Signed-off-by: Gowrishankar Muthukrishnan --- lib/vhost/vhost_crypto.c | 12 ++-- lib/vhost/vhost_user.h | 33 + 2 files changed, 35 insertions(+), 10 deletions(-) diff --git a/lib

[v4 6/6] test/crypto: add tests for virtio user PMD

2025-02-22 Thread Gowrishankar Muthukrishnan
Reuse virtio_crypto tests for testing virtio_crypto_user PMD. Signed-off-by: Gowrishankar Muthukrishnan --- app/test/test_cryptodev.c | 7 +++ app/test/test_cryptodev.h | 1 + app/test/test_cryptodev_asym.c | 15 +++ 3 files changed, 23 insertions(+) diff --git a

[v4 5/5] examples/vhost_crypto: support asymmetric crypto

2025-02-22 Thread Gowrishankar Muthukrishnan
Support asymmetric crypto operations. Signed-off-by: Gowrishankar Muthukrishnan --- examples/vhost_crypto/main.c | 50 +++- 1 file changed, 38 insertions(+), 12 deletions(-) diff --git a/examples/vhost_crypto/main.c b/examples/vhost_crypto/main.c index

[v4 4/6] crypto/virtio: add vDPA backend

2025-02-22 Thread Gowrishankar Muthukrishnan
Add vDPA backend to virtio_user crypto. Signed-off-by: Gowrishankar Muthukrishnan --- Depends-on: series-34682 ("vhost: add RSA support") v4: - fixed CI issue. --- drivers/crypto/virtio/meson.build | 7 + drivers/crypto/virtio/virtio_cryptodev.c | 57 +- driv

[v4 5/6] test/crypto: add asymmetric tests for virtio PMD

2025-02-22 Thread Gowrishankar Muthukrishnan
Add asymmetric tests for Virtio PMD. Signed-off-by: Gowrishankar Muthukrishnan --- app/test/test_cryptodev_asym.c | 28 1 file changed, 28 insertions(+) diff --git a/app/test/test_cryptodev_asym.c b/app/test/test_cryptodev_asym.c index 9b5f3c545e..ac47be724f 100644

[v4 2/6] crypto/virtio: refactor queue operations

2025-02-22 Thread Gowrishankar Muthukrishnan
Move existing control queue operations into a common place that would be shared with other virtio type of devices. Signed-off-by: Gowrishankar Muthukrishnan --- Depends-on: series-34682 ("vhost: add RSA support") --- drivers/crypto/virtio/meson.build | 1 + drivers/cry

[v4 0/5] vhost: add RSA support

2025-02-22 Thread Gowrishankar Muthukrishnan
This patch series supports asymmetric RSA in vhost crypto library. It also includes changes to improve vhost crypto library: * support newer QEMU versions. * fix broken vhost_crypto example application. * stabilize crypto fastpath operations. v4: - fixed CI issues. Gowrishankar Muthukrishnan

[v4 1/5] vhost: skip crypto op fetch before vring init

2025-02-22 Thread Gowrishankar Muthukrishnan
Until virtio avail ring is initialized (by VHOST_USER_SET_VRING_ADDR), worker thread should not try to fetch crypto op, which would lead to memory fault. Fixes: 939066d96563 ("vhost/crypto: add public function implementation") Cc: sta...@dpdk.org Signed-off-by: Gowrishankar Mut

[v4 4/5] vhost: support asymmetric RSA crypto ops

2025-02-22 Thread Gowrishankar Muthukrishnan
Support asymmetric RSA crypto operations in vhost-user. Signed-off-by: Gowrishankar Muthukrishnan --- v4: - fixed CI issue. --- lib/vhost/vhost_crypto.c | 486 +++--- lib/vhost/virtio_crypto.h | 67 ++ 2 files changed, 518 insertions(+), 35 deletions

[v4 3/5] examples/vhost_crypto: fix user callbacks

2025-02-22 Thread Gowrishankar Muthukrishnan
In order to handle new vhost user connection, use new_connection and destroy_connection callbacks. Fixes: f5188211c721 ("examples/vhost_crypto: add sample application") Cc: sta...@dpdk.org Signed-off-by: Gowrishankar Muthukrishnan --- examples/vhost_crypto/main.c | 4 ++-- 1 file

[v5 0/5] vhost: add RSA support

2025-02-24 Thread Gowrishankar Muthukrishnan
This patch series supports asymmetric RSA in vhost crypto library. It also includes changes to improve vhost crypto library: * support newer QEMU versions. * fix broken vhost_crypto example application. * stabilize crypto fastpath operations. v5: - added docs. Gowrishankar Muthukrishnan (5

[v5 1/5] vhost: skip crypto op fetch before vring init

2025-02-24 Thread Gowrishankar Muthukrishnan
Until virtio avail ring is initialized (by VHOST_USER_SET_VRING_ADDR), worker thread should not try to fetch crypto op, which would lead to memory fault. Fixes: 939066d96563 ("vhost/crypto: add public function implementation") Cc: sta...@dpdk.org Signed-off-by: Gowrishankar Muthukrish

[v5 2/5] vhost: update vhost_user crypto session parameters

2025-02-24 Thread Gowrishankar Muthukrishnan
. Hence, it would break parsing vhost_user messages. This patch addresses both of the above problems. Signed-off-by: Gowrishankar Muthukrishnan Acked-by: Akhil Goyal --- v5: - updated patch description for QEMU version. --- lib/vhost/vhost_crypto.c | 12 ++-- lib/vhost/vhost_user.h | 33

[v5 3/5] examples/vhost_crypto: fix user callbacks

2025-02-24 Thread Gowrishankar Muthukrishnan
In order to handle new vhost user connection, use new_connection and destroy_connection callbacks. Fixes: f5188211c721 ("examples/vhost_crypto: add sample application") Cc: sta...@dpdk.org Signed-off-by: Gowrishankar Muthukrishnan Acked-by: Akhil Goyal --- examples/vhost_crypto/

[v5 4/5] vhost: support asymmetric RSA crypto ops

2025-02-24 Thread Gowrishankar Muthukrishnan
Support asymmetric RSA crypto operations in vhost-user. Signed-off-by: Gowrishankar Muthukrishnan Acked-by: Akhil Goyal --- v5: - release notes --- doc/guides/rel_notes/release_25_03.rst | 3 + lib/vhost/vhost_crypto.c | 486 +++-- lib/vhost/virtio_crypto.h

[v5 5/5] examples/vhost_crypto: support asymmetric crypto

2025-02-24 Thread Gowrishankar Muthukrishnan
Support asymmetric crypto operations. Signed-off-by: Gowrishankar Muthukrishnan Acked-by: Akhil Goyal --- v5: - doc update --- doc/guides/sample_app_ug/vhost_crypto.rst | 5 +++ examples/vhost_crypto/main.c | 50 +-- 2 files changed, 43 insertions(+), 12

[v2 1/2] crypto/openssl: validate incorrect signature in verify op

2025-02-22 Thread Gowrishankar Muthukrishnan
Return correct error status when incorrect signature is used in RSA verify op. Fixes: d7bd42f6db19 ("crypto/openssl: update RSA routine with 3.0 EVP API") Cc: sta...@dpdk.org Signed-off-by: Gowrishankar Muthukrishnan --- v2: - clubbed with test patch --- drivers/cryp

[v2 2/2] test/crypto: add negative test for RSA verify op

2025-02-22 Thread Gowrishankar Muthukrishnan
Add negative test for RSA verify operation to check if incorrect signature is validated. Signed-off-by: Gowrishankar Muthukrishnan --- v2: - no changes, but added openssl pmd patch for CI. --- app/test/test_cryptodev_asym.c | 27 +-- 1 file changed, 25 insertions(+), 2

RE: [EXTERNAL] Re: [v5 1/5] vhost: skip crypto op fetch before vring init

2025-02-26 Thread Gowrishankar Muthukrishnan
> Ack. Except for vq->enabled, next version of this patch would carry these checks. Current virtio crypto for vhost_user does not request SET_VRING_ENABLE, so this flag would not be set. Thanks, Gowrishankar > You can have a look at rte_vhost_dequeue_burst for example. > > > avail_idx = *((volatile uint16_t *)&vq->avail->idx); > > start_idx = vq->last_used_idx; > > count = avail_idx - start_idx;

[v6 4/5] vhost: support asymmetric RSA crypto ops

2025-02-26 Thread Gowrishankar Muthukrishnan
Support asymmetric RSA crypto operations in vhost-user. Signed-off-by: Gowrishankar Muthukrishnan Acked-by: Akhil Goyal --- doc/guides/rel_notes/release_25_03.rst | 3 + lib/vhost/vhost_crypto.c | 486 +++-- lib/vhost/virtio_crypto.h | 67

[v6 5/5] examples/vhost_crypto: support asymmetric crypto

2025-02-26 Thread Gowrishankar Muthukrishnan
Support asymmetric crypto operations. Signed-off-by: Gowrishankar Muthukrishnan Acked-by: Akhil Goyal --- doc/guides/sample_app_ug/vhost_crypto.rst | 5 +++ examples/vhost_crypto/main.c | 50 +-- 2 files changed, 43 insertions(+), 12 deletions(-) diff --git a

[v5 4/6] crypto/virtio: add vDPA backend

2025-02-26 Thread Gowrishankar Muthukrishnan
Add vDPA backend to virtio_user crypto. Signed-off-by: Gowrishankar Muthukrishnan --- drivers/crypto/virtio/meson.build | 7 + drivers/crypto/virtio/virtio_cryptodev.c | 57 +- drivers/crypto/virtio/virtio_cryptodev.h | 3 + drivers/crypto/virtio/virtio_logs.h

[v5 6/6] test/crypto: add tests for virtio user PMD

2025-02-26 Thread Gowrishankar Muthukrishnan
Reuse virtio_crypto tests for testing virtio_crypto_user PMD. Signed-off-by: Gowrishankar Muthukrishnan --- app/test/test_cryptodev.c | 7 +++ app/test/test_cryptodev.h | 1 + app/test/test_cryptodev_asym.c | 15 +++ 3 files changed, 23 insertions(+) diff --git a

[v5 5/6] test/crypto: add asymmetric tests for virtio PMD

2025-02-26 Thread Gowrishankar Muthukrishnan
Add asymmetric tests for Virtio PMD. Signed-off-by: Gowrishankar Muthukrishnan --- app/test/test_cryptodev_asym.c | 28 1 file changed, 28 insertions(+) diff --git a/app/test/test_cryptodev_asym.c b/app/test/test_cryptodev_asym.c index 9b5f3c545e..ac47be724f 100644

[v5 2/6] crypto/virtio: refactor queue operations

2025-02-26 Thread Gowrishankar Muthukrishnan
Move existing control queue operations into a common place that would be shared with other virtio type of devices. Signed-off-by: Gowrishankar Muthukrishnan --- drivers/crypto/virtio/meson.build | 1 + drivers/crypto/virtio/virtio_crypto_algs.h | 2 +- drivers/crypto/virtio

[v6 2/5] vhost: update vhost_user crypto session parameters

2025-02-26 Thread Gowrishankar Muthukrishnan
. Hence, it would break parsing vhost_user messages. This patch addresses both of the above problems. Signed-off-by: Gowrishankar Muthukrishnan Acked-by: Akhil Goyal --- lib/vhost/vhost_crypto.c | 12 ++-- lib/vhost/vhost_user.h | 33 + 2 files changed, 35

[v6 1/5] vhost: skip crypto op fetch before vring init

2025-02-26 Thread Gowrishankar Muthukrishnan
Until virtio avail ring is initialized (by VHOST_USER_SET_VRING_ADDR), worker thread should not try to fetch crypto op, which would lead to memory fault. Fixes: 939066d96563 ("vhost/crypto: add public function implementation") Cc: sta...@dpdk.org Signed-off-by: Gowrishankar Muthukrish

[v6 3/5] examples/vhost_crypto: fix user callbacks

2025-02-26 Thread Gowrishankar Muthukrishnan
In order to handle new vhost user connection, use new_connection and destroy_connection callbacks. Fixes: f5188211c721 ("examples/vhost_crypto: add sample application") Cc: sta...@dpdk.org Signed-off-by: Gowrishankar Muthukrishnan Acked-by: Akhil Goyal --- examples/vhost_crypto/

[v6 0/5] vhost: add RSA support

2025-02-26 Thread Gowrishankar Muthukrishnan
This patch series supports asymmetric RSA in vhost crypto library. It also includes changes to improve vhost crypto library: * support newer QEMU versions. * fix broken vhost_crypto example application. * stabilize crypto fastpath operations. Gowrishankar Muthukrishnan (5): vhost: skip

[v5 0/6] crypto/virtio: enhancements for RSA and vDPA

2025-02-26 Thread Gowrishankar Muthukrishnan
This patch series enhances virtio crypto PMD to: * support RSA * support packed virtio ring * support vDPA backend Depends-on: patch-152109 ("vhost: support asymmetric RSA crypto ops") Gowrishankar Muthukrishnan (6): crypto/virtio: add asymmetric RSA support crypto/virtio: refa

[v5 1/6] crypto/virtio: add asymmetric RSA support

2025-02-26 Thread Gowrishankar Muthukrishnan
Asymmetric RSA operations (SIGN, VERIFY, ENCRYPT and DECRYPT) are supported in virtio PMD. Signed-off-by: Gowrishankar Muthukrishnan --- Depends-on: patch-152109 ("vhost: support asymmetric RSA crypto ops") v5: - fixed asym enqueue xmit func for correct head idx. - release not

[v5 3/6] crypto/virtio: add packed ring support

2025-02-26 Thread Gowrishankar Muthukrishnan
Add packed ring support. Signed-off-by: Gowrishankar Muthukrishnan --- drivers/crypto/virtio/virtio_cryptodev.c | 125 +++ drivers/crypto/virtio/virtio_cryptodev.h | 13 +- drivers/crypto/virtio/virtio_cvq.c | 103 +- drivers/crypto/virtio/virtio_pci.h | 25 ++ drivers

RE: [EXTERNAL] Re: [v6 1/5] vhost: skip crypto op fetch before vring init

2025-02-27 Thread Gowrishankar Muthukrishnan
eq() once implemented. > Ack. Thanks, Gowrishankar.

[v7 4/5] vhost: support asymmetric RSA crypto ops

2025-02-27 Thread Gowrishankar Muthukrishnan
Support asymmetric RSA crypto operations in vhost-user. Signed-off-by: Gowrishankar Muthukrishnan Acked-by: Akhil Goyal --- doc/guides/rel_notes/release_25_03.rst | 3 + lib/vhost/vhost_crypto.c | 486 +++-- lib/vhost/virtio_crypto.h | 67

[v7 0/5] vhost: add RSA support

2025-02-27 Thread Gowrishankar Muthukrishnan
This patch series supports asymmetric RSA in vhost crypto library. It also includes changes to improve vhost crypto library: * support newer QEMU versions. * fix broken vhost_crypto example application. * stabilize crypto fastpath operations. Gowrishankar Muthukrishnan (5): vhost: skip

[v7 1/5] vhost: skip crypto op fetch before vring init

2025-02-27 Thread Gowrishankar Muthukrishnan
Until virtio avail ring is initialized (by VHOST_USER_SET_VRING_ADDR), worker thread should not try to fetch crypto op, which would lead to memory fault. Fixes: 939066d96563 ("vhost/crypto: add public function implementation") Cc: sta...@dpdk.org Signed-off-by: Gowrishankar Muthukrish

[v7 5/5] examples/vhost_crypto: support asymmetric crypto

2025-02-27 Thread Gowrishankar Muthukrishnan
Support asymmetric crypto operations. Signed-off-by: Gowrishankar Muthukrishnan Acked-by: Akhil Goyal --- doc/guides/sample_app_ug/vhost_crypto.rst | 5 +++ examples/vhost_crypto/main.c | 50 +-- 2 files changed, 43 insertions(+), 12 deletions(-) diff --git a

[v7 2/5] vhost: update vhost_user crypto session parameters

2025-02-27 Thread Gowrishankar Muthukrishnan
. Hence, it would break parsing vhost_user messages. This patch addresses both of the above problems. Signed-off-by: Gowrishankar Muthukrishnan Acked-by: Akhil Goyal --- lib/vhost/vhost_crypto.c | 12 ++-- lib/vhost/vhost_user.h | 33 + 2 files changed, 35

[v7 3/5] examples/vhost_crypto: fix user callbacks

2025-02-27 Thread Gowrishankar Muthukrishnan
In order to handle new vhost user connection, use new_connection and destroy_connection callbacks. Fixes: f5188211c721 ("examples/vhost_crypto: add sample application") Cc: sta...@dpdk.org Signed-off-by: Gowrishankar Muthukrishnan Acked-by: Akhil Goyal --- examples/vhost_crypto/

[PATCH] test/crypto: fix return value in RSA verify test

2025-05-10 Thread Gowrishankar Muthukrishnan
This patch fixes incorrect return value when RSA negative test scenario is validated. Coverity-issue: 457463 Fixes: 9682e8246ae ("test/crypto: add negative case for RSA verification") Signed-off-by: Gowrishankar Muthukrishnan --- app/test/test_cryptodev_asym.c | 1 + 1 file

[PATCH] crypto/virtio: fix DER encoding of RSA public key

2025-05-10 Thread Gowrishankar Muthukrishnan
As per RFC 8017, RSA public key in ASN.1 should have only modulus and exponent values. Add a separate encoding function to follow this standard. Fixes: 6fe6a7f7bcf ("crypto/virtio: add asymmetric RSA support") Signed-off-by: Gowrishankar Muthukrishnan --- drivers/cry

[PATCH] crypto/virtio: fix DER encoding for positive RSA param

2025-05-10 Thread Gowrishankar Muthukrishnan
As per RFC 8017, RSA parameter needs to be positive integer. This patch fixes TLV encoding function appropriately. Fixes: 6fe6a7f7bcf ("crypto/virtio: add asymmetric RSA support") Signed-off-by: Gowrishankar Muthukrishnan --- drivers/crypto/virtio/virtio_crypto

[PATCH] test/crypto: fix RSA decrypt op validation

2025-05-10 Thread Gowrishankar Muthukrishnan
. Fixes: 5ae36995f10 ("test/crypto: move RSA enqueue/dequeue into functions") Cc: sta...@dpdk.org Signed-off-by: Gowrishankar Muthukrishnan --- app/test/test_cryptodev_asym.c | 21 + 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/app/test/test_cryptodev_as

[PATCH v2] test/crypto: increment dequeue timeout

2025-05-14 Thread Gowrishankar Muthukrishnan
Increment dequeue timeout to allow implementations taking longer cycles. Signed-off-by: Gowrishankar Muthukrishnan --- v2: - no changes. only for CI. --- app/test/test_cryptodev_asym.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/test/test_cryptodev_asym.c b/app/test

RE: [PATCH] test/crypto: fix RSA decrypt op validation

2025-05-28 Thread Gowrishankar Muthukrishnan
Recheck unit test failure for openssl 1.1.1 in some distros. Recheck-request: iol-unit-amd64-testing -- Gowrishankar > > Following RSA encrypt op, same plaintext buffer is used as output buffer for > decrypt op, hence comparing plaintext buffer against same buffer pointer in > cryp

[PATCH] test/crypto: test vectors for additional ECDH groups

2025-05-28 Thread Gowrishankar Muthukrishnan
Add test vectors for ECDH groups 19, 20 and 21. Signed-off-by: Gowrishankar Muthukrishnan --- app/test/test_cryptodev_asym.c | 39 ++- app/test/test_cryptodev_ecdh_test_vectors.h | 344 +++ app/test/test_cryptodev_ecdsa_test_vectors.h | 6 + 3 files changed

[PATCH] crypto/virtio: check for invalid IOVA address

2025-05-15 Thread Gowrishankar Muthukrishnan
This change fixes coverity issue on overflowed constant. Bad phys address should be checked before using it in descriptor. Coverity issue: 457462, 457465 Fixes: 10702138f1a ("crypto/virtio: support asymmetric RSA") Signed-off-by: Gowrishankar Muthukrishnan --- drivers/cry

[PATCH] crypto/cnxk: fix uninitialized scalar variable

2025-05-15 Thread Gowrishankar Muthukrishnan
This change fixes an uninitialized local variable as reported in coverity issue 445390. Coverity-issue: 445390 Fixes: a8ebe94f8cc ("crypto/cnxk: support EdDSA") Cc: sta...@dpdk.org Signed-off-by: Gowrishankar Muthukrishnan --- drivers/crypto/cnxk/cnxk_ae.h | 2 +- 1 file changed, 1

[PATCH] test/crypto: fix return value in RSA test

2025-05-15 Thread Gowrishankar Muthukrishnan
This patch fixes incorrect return value when RSA negative test scenario is validated. Coverity-issue: 457463 Fixes: 9682e8246ae ("test/crypto: add negative case for RSA verification") Signed-off-by: Gowrishankar Muthukrishnan --- app/test/test_cryptodev_asym.c | 1 + 1 file

[PATCH] vhost/crypto: fix uninitialized variable

2025-05-15 Thread Gowrishankar Muthukrishnan
Fix uninitialized variable as reported in coverity scan. Coverity-issue: 457449 Fixes: d1b484bf187 ("vhost/crypto: support asymmetric RSA") Signed-off-by: Gowrishankar Muthukrishnan --- lib/vhost/vhost_crypto.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a

[PATCH] crypto/cnxk: fix out-of-bounds access

2025-05-15 Thread Gowrishankar Muthukrishnan
Fix coverity issue on out-of-bounds access. Coverity-issue: 403166, 403171, 403172 Fixes: 5686b573e4b ("crypto/cnxk: support SM2") Cc: sta...@dpdk.org Signed-off-by: Gowrishankar Muthukrishnan --- drivers/crypto/cnxk/cnxk_ae.h | 9 + 1 file changed, 9 insertions(+) di

RE: [PATCH] crypto/cnxk: fix uninitialized scalar variable

2025-05-15 Thread Gowrishankar Muthukrishnan
Dispatcher unit test failed which is unrelated to this patch and looks like infrastructure issue. Recheck-request: loongarch-unit-testing -- Gowrishankar > This change fixes an uninitialized local variable as reported in coverity > issue > 445390. > > Coverity-issue:

RE: [PATCH] test/crypto: fix RSA decrypt op validation

2025-06-18 Thread Gowrishankar Muthukrishnan
Hi Kai Ji, > > Hi Gowrishankar, > > Thanks for reach out, I don't have those environments setup on my end, but > Ubuntu 20.04 and RHEL8 are old but still common LTS packages. > Are you able to dump the actual msg buffer ? > RSA_private_decrypt fails and return co

RE: [PATCH] test/crypto: fix RSA decrypt op validation

2025-06-19 Thread Gowrishankar Muthukrishnan
() would additionally need private exponent rsa->d, assuming that d is already part of RSA session, to derive kdk used in implicit rejection. We did not have it in CRT test vectors today. I'll send patch to fix these. Thanks, Gowrishankar > > Hi Kai Ji, > > > > Hi Gowris

[PATCH 3/3] test/crypto: fix RSA decrypt op validation

2025-06-20 Thread Gowrishankar Muthukrishnan
. Fixes: 5ae36995f10f ("test/crypto: move RSA enqueue/dequeue into functions") Cc: sta...@dpdk.org Signed-off-by: Gowrishankar Muthukrishnan --- app/test/test_cryptodev_asym.c | 21 + 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/app/test/test_cryptodev_as

[PATCH 1/3] crypto/openssl: include private exponent in RSA session

2025-06-20 Thread Gowrishankar Muthukrishnan
enssl: add RSA and mod asym operations") Cc: sta...@dpdk.org Signed-off-by: Gowrishankar Muthukrishnan --- drivers/crypto/openssl/rte_openssl_pmd_ops.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/crypto/openssl/rte_openssl_pmd_ops.c b/drivers/cryp

[PATCH 2/3] test/crypto: fix RSA test vector as per RFC 8017

2025-06-20 Thread Gowrishankar Muthukrishnan
As per RFC 8017 (A.1.2), RSA private key should be represented with both exponent and CRT forms of data for inter operability. Fixes: a379799cbaaf ("test/crypto: add RSA key type CRT") Cc: sta...@dpdk.org Signed-off-by: Gowrishankar Muthukrishnan --- app/test/test_crypto

RE: [PATCH] test/crypto: fix RSA decrypt op validation

2025-06-12 Thread Gowrishankar Muthukrishnan
, for openssl PMD ? If required, I can start filing a Bugzilla as well. Thanks, Gowrishankar > > Following RSA encrypt op, same plaintext buffer is used as output buffer for > decrypt op, hence comparing plaintext buffer against same buffer pointer in > crypto op always succeed irresp

<    4   5   6   7   8   9