From patchwork Fri Oct 21 08:38:12 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zhangfei Gao X-Patchwork-Id: 617146 Delivered-To: patch@linaro.org Received: by 2002:a17:522:c983:b0:460:3032:e3c4 with SMTP id kr3csp825358pvb; Fri, 21 Oct 2022 01:44:47 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5SE5pqfTaM+IZKbAGucfXscQWSvV+pb52ZSEO/vzXCamBGH408sTikEl2WEU66saIsB1m7 X-Received: by 2002:a5d:494a:0:b0:235:4b14:4c7e with SMTP id r10-20020a5d494a000000b002354b144c7emr5896023wrs.174.1666341887246; Fri, 21 Oct 2022 01:44:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666341887; cv=none; d=google.com; s=arc-20160816; b=iRI71ZEOCauoGyD5p412pXFkGCTfXpMwrZ1VZJ2wfVUNkST1W22kC+ZyrND0yORMnU ZhFkPlmP9n8knW6auLmVd4Btjq9VlGxe7A1oW6hGRKSi5JLAws15pXLXHaOJeIIXOOEx PM+DPghHmqdNth3VWgqAXyW+fh2EAFN1NgDNQHeUX5lZYceHxWlBwncj/zlSE8TtcIQp UJomzssyV/CVGNVn5glvxGoIulNGx5Kfz0a0TKVYthucjHIsPqCqB+BvFyhLKq18DneP LC4y+RUIDEN2s4JMQNY93yryu6rOJ6rdJDiLoGdb8nkJCPgWKiaYKfFjwplO36XjMPNq 1wdA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:message-id:date:subject:cc:to:from:dkim-signature; bh=sxyxLikbF8MAAGkCUQkSLl3zUBXDVDPr/kHn3bNt7lY=; b=EMrafrK1nifwDG3iJf8VCCr+CR4jJeKXXcGgVlNXQSouxTpNZHiYz+u+pT2MVPwFTo y71++8FbMlDK9v6G54lvBt3YYJjlR90xCU+L6zL34eJo+A8B4FZAoUMBz1Y88l+GT0OI ++hED/u1ZIFT+zBFdpFpoSVBKT9wDz8WHbzuHQfXycwb3jhfio+8ztdjEGzwpQdM+NS0 r2ZZPOoY4ubDZK4dsZs1X5QJp9X5XL8yiYsGX2NR0vbuXDJKPac7Yz5hjUbVLC/NrmTN irsNWbispb+9yyCQP3LhG6c5VDJxijf7sL1YnFoITKS0qd8yxkg72yAzgbYsVZ09743i kV/w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=sviWqeCD; spf=pass (google.com: domain of dev-bounces@dpdk.org designates 217.70.189.124 as permitted sender) smtp.mailfrom=dev-bounces@dpdk.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from mails.dpdk.org (mails.dpdk.org. [217.70.189.124]) by mx.google.com with ESMTP id cl4-20020a5d5f04000000b0022f0c739ea7si15126217wrb.250.2022.10.21.01.44.47; Fri, 21 Oct 2022 01:44:47 -0700 (PDT) Received-SPF: pass (google.com: domain of dev-bounces@dpdk.org designates 217.70.189.124 as permitted sender) client-ip=217.70.189.124; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=sviWqeCD; spf=pass (google.com: domain of dev-bounces@dpdk.org designates 217.70.189.124 as permitted sender) smtp.mailfrom=dev-bounces@dpdk.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D04B742BAC; Fri, 21 Oct 2022 10:44:46 +0200 (CEST) Received: from mail-wr1-f44.google.com (mail-wr1-f44.google.com [209.85.221.44]) by mails.dpdk.org (Postfix) with ESMTP id 49E8942B91 for ; Fri, 21 Oct 2022 10:44:45 +0200 (CEST) Received: by mail-wr1-f44.google.com with SMTP id n12so3678477wrp.10 for ; Fri, 21 Oct 2022 01:44:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=sxyxLikbF8MAAGkCUQkSLl3zUBXDVDPr/kHn3bNt7lY=; b=sviWqeCDrHoWcxWv1OQ8U81mHpgytNN3O+J1AhgX88tWTv+tAmjFbGwV3jadv7OHXH nd06AtuBc6LHjeprRS8dsQfDfBNCNC6PhSMYCSdMj2LUUXg6GXHKcTdGZvl9QKVKZd6V Ry+YsauuWUgPfKQrvxqYM5KTBz1be4kfUScfGCd5VWRBhKXs8DN84Suy+0reLpWtp9ws +kuZ4I8kjasxCTUWRMTSMZdQ9GABD+QqIO34rGgGCq+8NED+6ETIkvJiq0O7cEahLMMy 3/PHKtArn46Y3TsXtLITlyI3BU0udr1Yr2olUCAWceKd/ThlFBZeVbRhcqsxo9QKX7/0 izBw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=sxyxLikbF8MAAGkCUQkSLl3zUBXDVDPr/kHn3bNt7lY=; b=Yk3Yf6ACqImYmnLX8GyaZ8z3sdlmNu62gympNYpJHm8qlRB6Y3U/Iah5JnnVIjNM9k urpZ4oTpHduZjkzrO5DzK4UeLT4UbL0BOt70gtrRk0o/A++o8JK9uA/RZ2Gumnnp5DNA UHsvmHSLpM6Msdwos03OVcCvcf9Ky0B9JTfEa0s4V8zR8T4w2ayjlz4PXauuA2CwXw47 js8uAIZmeuQiKJ1fKAG2lKoFiJLBs86vJuXtIqP10WxdOPPZN/DSYHQVs7Jg7cRa7Bta dzA/ZBRa2yb+pEwuQVVmVNHdhVJXWg+TnqG8ini87NOwqVYvQ82zGRts9X1xQNZUxTi0 0Lpw== X-Gm-Message-State: ACrzQf2Uq1orB68XRGoPH6KZA/4Hi8td1UbJ7mNfDRLz9+DJZhjY2KU7 HQ/m+A+O2rQs1m1Qk/jnZ+C/GA== X-Received: by 2002:a5d:5850:0:b0:22e:46e9:2a8a with SMTP id i16-20020a5d5850000000b0022e46e92a8amr11597623wrf.636.1666341885039; Fri, 21 Oct 2022 01:44:45 -0700 (PDT) Received: from localhost.localdomain ([213.146.143.36]) by smtp.gmail.com with ESMTPSA id c15-20020adfe74f000000b0022cd59331b2sm17755453wrn.95.2022.10.21.01.44.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 21 Oct 2022 01:44:44 -0700 (PDT) From: Zhangfei Gao To: Akhil Goyal , Declan Doherty , Fan Zhang , Ashish Gupta , Ray Kinsella , "thomas@monjalon.net" Cc: dev@dpdk.org, acc@openeuler.org, Zhangfei Gao Subject: [PATCH v5 0/6] crypto/uadk: introduce uadk crypto driver Date: Fri, 21 Oct 2022 16:38:12 +0800 Message-Id: <20221021083818.1821116-1-zhangfei.gao@linaro.org> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 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 Introduce a new crypto PMD for hardware accelerators based on UADK [1]. UADK is a framework for user applications to access hardware accelerators. UADK relies on IOMMU SVA (Shared Virtual Address) feature, which share the same page table between IOMMU and MMU. Thereby user application can directly use virtual address for device dma, which enhances the performance as well as easy usability. [1] https://github.com/Linaro/uadk Test: sudo dpdk-test --vdev=crypto_uadk (--log-level=6) RTE>>cryptodev_uadk_autotest RTE>>quit Update in v5 Patch 1 fixes the build issue when uadk is installed to a specific folder And update doc accordingly Update in v4: Akril suggest dpdk use pkg-config, So Enable uadk support x86 local build, and support pkg-config. Use pkg-config feature for the uadk crypto pmd. Add build uadk library steps in doc Test on both x86 and arm. x86 can build and install, but can not test since no device. Resend v3: Rebase on next/for-main, which just merged the series "cryptodev: rework session framework". Update in v3: Split patches according to Akhil's suggestions Please split the patches as below. 1. introduce driver - create files with meson.build and with probe/remove and device ops defined but not implemented. You do not need to write empty functions. Add basic documentation also which defines what the driver is. You can explain the build dependency here. 2. define queue structs and setup/remove APIs 3. Add data path 4. implement cipher op. Add capabilities and documentation of what is supported in each of the patches. Add feature flags etc. 5. implement auth, add capabilities and documentation 6. test app changes. Update in v2: Change uadk_supported_platform to uadk_crypto_version, which matches better than platform. enum uadk_crypto_version { UADK_CRYPTO_V2, UADK_CRYPTO_V3, }; Update in v1, compared with rfc Suggested from Akhil Goyal Only consider crypto PMD first Split patch into small (individually compiled) patches. Update MAINTAINERS and doc/guides/cryptodevs/features/uadk.ini Zhangfei Gao (6): crypto/uadk: introduce uadk crypto driver crypto/uadk: support basic operations crypto/uadk: support enqueue/dequeue operations crypto/uadk: support cipher algorithms crypto/uadk: support auth algorithms test/crypto: add cryptodev_uadk_autotest MAINTAINERS | 6 + app/test/test_cryptodev.c | 7 + app/test/test_cryptodev.h | 1 + doc/guides/cryptodevs/features/uadk.ini | 55 ++ doc/guides/cryptodevs/index.rst | 1 + doc/guides/cryptodevs/uadk.rst | 94 ++ drivers/crypto/meson.build | 1 + drivers/crypto/uadk/meson.build | 30 + drivers/crypto/uadk/uadk_crypto_pmd.c | 1141 +++++++++++++++++++++++ drivers/crypto/uadk/version.map | 3 + 10 files changed, 1339 insertions(+) create mode 100644 doc/guides/cryptodevs/features/uadk.ini create mode 100644 doc/guides/cryptodevs/uadk.rst create mode 100644 drivers/crypto/uadk/meson.build create mode 100644 drivers/crypto/uadk/uadk_crypto_pmd.c create mode 100644 drivers/crypto/uadk/version.map