From patchwork Thu Sep 28 09:52:54 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gowrishankar Muthukrishnan X-Patchwork-Id: 203 Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 8C75A4265E; Thu, 28 Sep 2023 11:53:21 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6260B402E2; Thu, 28 Sep 2023 11:53:21 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by mails.dpdk.org (Postfix) with ESMTP id E99184025F for ; Thu, 28 Sep 2023 11:53:19 +0200 (CEST) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 38S8h2Dp020119; Thu, 28 Sep 2023 02:53:19 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : mime-version : content-transfer-encoding : content-type; s=pfpt0220; bh=nlHyM0koYjSqxMoH8yFrx2NyQVKy99D1e+1G3p6RbFs=; b=hXEzdTp59YX4qkXb8bWbEboQMthcTESVsSY9a0w2ZhtlHiBnl0hzTqLbOkuAwHLLF/ac MaroVjJhdPkYuvjgdsj2nGSF+rO/ZrqW81ANbBAABmyFykQSEL4QVwqCmDTQXNmf5m95 fbQZ4og+8pfK3UU0KXCOalyzJJqQ/F9HK93W8Sz/zRKNabAjnoxmTJxpAm+pr5SbjkV3 3reYmZsqvbyhbu6wpjYAX8fwpD4155GOofu3rBXP1iyvlFCvrqcEEOp6+Zt5kat8P34s Id7dkmVLG+MFBIlvzaQoRfUoMs38IjUSP7HBz+ofmQRdqFWtFueFijkg/5L3636v57ED 0A== Received: from dc5-exch02.marvell.com ([199.233.59.182]) by mx0a-0016f401.pphosted.com (PPS) with ESMTPS id 3tcu1qtdfr-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Thu, 28 Sep 2023 02:53:18 -0700 Received: from DC5-EXCH01.marvell.com (10.69.176.38) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server (TLS) id 15.0.1497.48; Thu, 28 Sep 2023 02:53:17 -0700 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server id 15.0.1497.48 via Frontend Transport; Thu, 28 Sep 2023 02:53:17 -0700 Received: from BG-LT91401.marvell.com (BG-LT91401.marvell.com [10.28.168.34]) by maili.marvell.com (Postfix) with ESMTP id 76EA95C68EF; Thu, 28 Sep 2023 02:53:13 -0700 (PDT) From: Gowrishankar Muthukrishnan To: CC: , Akhil Goyal , Fan Zhang , Kai Ji , Arkadiusz Kusztal , Maxime Coquelin , Chenbo Xia , Jay Zhou , Gowrishankar Muthukrishnan Subject: [RFC 0/6] vhost: add asymmetric crypto support Date: Thu, 28 Sep 2023 15:22:54 +0530 Message-ID: <20230928095300.1353-1-gmuthukrishn@marvell.com> X-Mailer: git-send-email 2.21.0 MIME-Version: 1.0 X-Proofpoint-GUID: Cr0OgH7mblQxBTYnNepyWwIfWK81oIoy X-Proofpoint-ORIG-GUID: Cr0OgH7mblQxBTYnNepyWwIfWK81oIoy X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.267,Aquarius:18.0.980,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-09-28_07,2023-09-27_01,2023-05-22_02 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org This series of patches add asymmetric crypto support in vhost library and virtio PMD. Only RSA algorithm is enabled as a first step. To verify functionality in QEMU, you would need: https://github.com/qemu/qemu/commit/5c33f9783ace0b5e077060b220978d94fecb3e81 There is VirtIO specification change proposed for RSA support, and this series apply it at required places. https://lists.oasis-open.org/archives/virtio-comment/202305/msg00341.html In case, qemu crashes, check disabling VHOST_USER_PROTOCOL_F_CONFIG in virtio pmd, when the device starts. This issue was seen with older qemu but I'll check a bit closer. Gowrishankar Muthukrishnan (6): cryptodev: move RSA padding information into xform cryptodev: fix RSA xform for ASN.1 syntax vhost: add asymmetric RSA support crypto/virtio: add asymmetric RSA support examples/vhost_crypto: add asymmetric support app/test: add asymmetric tests for virtio pmd app/test/test_cryptodev_asym.c | 40 +- app/test/test_cryptodev_rsa_test_vectors.h | 28 + drivers/common/cpt/cpt_ucode_asym.h | 4 +- drivers/crypto/cnxk/cnxk_ae.h | 13 +- drivers/crypto/octeontx/otx_cryptodev_ops.c | 4 +- drivers/crypto/openssl/openssl_pmd_private.h | 1 + drivers/crypto/openssl/rte_openssl_pmd.c | 4 +- drivers/crypto/openssl/rte_openssl_pmd_ops.c | 1 + drivers/crypto/qat/qat_asym.c | 17 +- .../virtio/virtio_crypto_capabilities.h | 19 + drivers/crypto/virtio/virtio_cryptodev.c | 388 ++++++++++-- drivers/crypto/virtio/virtio_rxtx.c | 233 +++++++- examples/fips_validation/main.c | 52 +- examples/vhost_crypto/main.c | 50 +- lib/cryptodev/cryptodev_pmd.h | 6 + lib/cryptodev/rte_crypto_asym.h | 8 +- lib/vhost/rte_vhost_crypto.h | 14 +- lib/vhost/vhost.c | 11 +- lib/vhost/vhost.h | 1 + lib/vhost/vhost_crypto.c | 551 ++++++++++++++++-- lib/vhost/vhost_user.c | 4 + lib/vhost/vhost_user.h | 34 +- lib/vhost/virtio_crypto.h | 87 ++- 23 files changed, 1375 insertions(+), 195 deletions(-)