From patchwork Sat Oct 8 08:37:41 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zhangfei Gao X-Patchwork-Id: 613382 Delivered-To: patch@linaro.org Received: by 2002:a17:522:c983:b0:460:3032:e3c4 with SMTP id kr3csp765379pvb; Sat, 8 Oct 2022 01:38:49 -0700 (PDT) X-Google-Smtp-Source: AMsMyM49Yud4sBQKZYNAfTjUjPbQKiJI1SFWq+Ig9MGRhSds1/iga9NyqMTQgEGHhm8uCYKjniz9 X-Received: by 2002:a05:6000:184e:b0:22e:4612:496d with SMTP id c14-20020a056000184e00b0022e4612496dmr5688188wri.91.1665218328806; Sat, 08 Oct 2022 01:38:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1665218328; cv=none; d=google.com; s=arc-20160816; b=sf8DqaGgdLvq1alDRPKe/RZ9DgDu2WoNGWzn2VJDNEKmg8Mfzb1CHs7MXc3WXraMXW 21zS5zOXtc2YndvUGfGvZpD5N16Jneg8Vx0xOax+L2tnQyscLvddb7g2UpBjWGQYSaEM ahD4kM0STljwBFd5enUaitb3BhJtJSx+BkG1BGgLlyPd7Alk0EbSGdULD00cFwGX61te OFBMyzWUs/kQZJEGH1hssGZa9KbJdSF9X6ZfSuWSaKfk9xcRG0D0Iy2zPiId7L5xkNU4 43DiNB1mo9pzHAdgIuwg5EycqbowZxRz6P0QhANIjsvtAE3y4h+kgZyA4fu7wPMXplSp hJFg== 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=+/haNPWatod3MjWbSogUWyplF22bQkGBXrJBqQawGtQ=; b=um0YHS56Uy7ELnYq01Wx2uWz8Dd/wp6Qlf4GpiVbe9F9tRoFKQXyY9erGk4ahOaFn2 mDu8Teaa3FOV5GOr5VaLzi1LaWD+Y2TJ4qC5/AvEWabrtFUUB3EaMZkNeEqI35qrt/10 kL5A3QD12uZ5bgsKXSiaFT4jMZsjo1BifjyKQ+xaZqSooZdJ8evxlahbb9Mwoj5A110T aPMuc05CBklb7kI6EHF26X6PxOB2GbSZzg0vC3VCy+GT6c0uH7um0FpooFwuZ8ZVsqu/ SUcd/phFwjPy+eYyhMVF71jUlYI15Y+yESDWdd68LFLnZiGk9XlvRZVXWZhV9MYEHz6J 2aoQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=gK+uw+Ba; 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 f12-20020a5d58ec000000b0022e5d659bb6si3011016wrd.514.2022.10.08.01.38.48; Sat, 08 Oct 2022 01:38:48 -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=gK+uw+Ba; 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 26C3340146; Sat, 8 Oct 2022 10:38:48 +0200 (CEST) Received: from mail-pf1-f171.google.com (mail-pf1-f171.google.com [209.85.210.171]) by mails.dpdk.org (Postfix) with ESMTP id EFEB340042 for ; Sat, 8 Oct 2022 10:38:46 +0200 (CEST) Received: by mail-pf1-f171.google.com with SMTP id d10so6792680pfh.6 for ; Sat, 08 Oct 2022 01:38:46 -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=+/haNPWatod3MjWbSogUWyplF22bQkGBXrJBqQawGtQ=; b=gK+uw+Ba1jVFMXIVEQKnwrM5KULiJxPP9ScN8hPKpGcLjJ3MG1wbocWFu8h/2rY+BH MSvtfSD0X/rw4kUmLZsS2Sie7YP0aYHokmob9BH9AwdUTntsKdsrs56bhxkoC8NSqW/A uuq42NlwocsVe6wD//8c/T8pe8WI+uVqw/AxlZHWkouAjP5OCLZg+gKeu+ZsDPU7ot4V wT5sY6Zj7JH5gIF0NLy3lSyq0xWH9brus07zdhKX1hH6u8nEqgAIOWZTYK5Tr7Nc8M4z Y9a/wiMkSYE57JyyXDgassePYuhC5FHUzRehQ+rvoZ7jpsxsucTOWPVCcIH6hrG/44kv Osuw== 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=+/haNPWatod3MjWbSogUWyplF22bQkGBXrJBqQawGtQ=; b=g2asSBeA1Q82O6iG618/ZLogcxCItThKxKf5uTIrmCGv39hp4J2/gckZx5cG8Xe+F+ MnnKgRBFiN0L0+O8FNZhb7lbE3Opgpl7c6DCf9rNF1eBCQJhEFsYNK6hKvt5Qli4F7Xz hmQMOd/IIqJa6XdiF3gymINnUhPqye2NQNd90qx4hUdohriTb8FGorNN3GarERKeYkkM 1LiNJPdudiORkcdS9xdEM6JqxVVlxmUonQQxXLPv8FTkxBlb5XGoOHYDhAfrSJGLVhis we+P73NiiMweOvALR6q1XZSKZuoeBAQxGezJH6fecGNJA5cTP2JvuHSFrLMBqqSuVGGA UXGw== X-Gm-Message-State: ACrzQf1ti7TuzB6MxNYry5c5exw8Fs7rt12i7q/aTLUmAstQFPcDcXLp 5v5rxe4P1Wn/mXgbapw3ePnOoA== X-Received: by 2002:a63:5762:0:b0:43c:c1b5:3e75 with SMTP id h34-20020a635762000000b0043cc1b53e75mr7874114pgm.380.1665218326066; Sat, 08 Oct 2022 01:38:46 -0700 (PDT) Received: from localhost.localdomain ([194.5.48.65]) by smtp.gmail.com with ESMTPSA id n1-20020a17090a2bc100b0020a0571b354sm2644371pje.57.2022.10.08.01.38.41 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sat, 08 Oct 2022 01:38:45 -0700 (PDT) From: Zhangfei Gao To: Akhil Goyal , Declan Doherty , Fan Zhang , Ashish Gupta , Ray Kinsella Cc: dev@dpdk.org, acc@openeuler.org, Zhangfei Gao Subject: [PATCH resend v3 0/6] crypto/uadk: introduce uadk crypto driver Date: Sat, 8 Oct 2022 16:37:41 +0800 Message-Id: <20221008083747.6559-1-zhangfei.gao@linaro.org> X-Mailer: git-send-email 2.36.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 resend: Rebase on next/for-main, which just merged 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 patch. 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 | 74 ++ drivers/crypto/meson.build | 1 + drivers/crypto/uadk/meson.build | 36 + drivers/crypto/uadk/uadk_crypto_pmd.c | 1145 +++++++++++++++++++++++ drivers/crypto/uadk/version.map | 3 + 10 files changed, 1329 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