All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@redhat.com>
To: Lei He <helei.sig11@bytedance.com>
Cc: qemu-devel@nongnu.org, berrange@redhat.com,
	arei.gonglei@huawei.com, pizhenwei@bytedance.com
Subject: Re: [PATCH 0/4] Add a new backend for cryptodev
Date: Fri, 7 Oct 2022 10:25:33 -0400	[thread overview]
Message-ID: <20221007102500-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <20220919035320.84467-1-helei.sig11@bytedance.com>

On Mon, Sep 19, 2022 at 11:53:16AM +0800, Lei He wrote:
> This patch adds a new backend called LKCF to cryptodev, LKCF stands
> for Linux Kernel Cryptography Framework. If a cryptographic
> accelerator that supports LKCF is installed on the the host (you can
> see which algorithms are supported in host's LKCF by executing
> 'cat /proc/crypto'), then RSA operations can be offloaded.
> More background info can refer to: https://lwn.net/Articles/895399/,
> 'keyctl[5]' in the picture.
> 
> This patch:
> 1. Modified some interfaces of cryptodev and cryptodev-backend to
> support asynchronous requests.
> 2. Extended the DER encoder in crypto, so that we can export the
> RSA private key into PKCS#8 format and upload it to host kernel.
> 3. Added a new backend for cryptodev.
> 
> I tested the backend with a QAT card, the qps of RSA-2048-decryption
> is about 25k/s, and the main-loop becomes the bottleneck. The qps
> using OpenSSL directly is about 6k/s (with 6 vCPUs). We will support 
> IO-thread for cryptodev in another series later.
> 
> Lei He (4):
>   virtio-crypto: Support asynchronous mode
>   crypto: Support DER encodings
>   crypto: Support export akcipher to pkcs8
>   cryptodev: Add a lkcf-backend for cryptodev

Seems to fail build for me - probably a conflict applying.
Coul you pls rebase and repost? Sorry about the noise.

>  backends/cryptodev-builtin.c    |  69 +++--
>  backends/cryptodev-lkcf.c       | 620 ++++++++++++++++++++++++++++++++++++++++
>  backends/cryptodev-vhost-user.c |  51 +++-
>  backends/cryptodev.c            |  44 +--
>  backends/meson.build            |   3 +
>  crypto/akcipher.c               |  17 ++
>  crypto/der.c                    | 307 ++++++++++++++++++--
>  crypto/der.h                    | 211 +++++++++++++-
>  crypto/rsakey.c                 |  42 +++
>  crypto/rsakey.h                 |  11 +-
>  hw/virtio/virtio-crypto.c       | 324 ++++++++++++---------
>  include/crypto/akcipher.h       |  21 ++
>  include/sysemu/cryptodev.h      |  61 ++--
>  qapi/qom.json                   |   2 +
>  tests/unit/test-crypto-der.c    | 126 ++++++--
>  15 files changed, 1649 insertions(+), 260 deletions(-)
>  create mode 100644 backends/cryptodev-lkcf.c
> 
> --
> 2.11.0



  parent reply	other threads:[~2022-10-07 15:53 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-19  3:53 [PATCH 0/4] Add a new backend for cryptodev Lei He
2022-09-19  3:53 ` [PATCH 1/4] virtio-crypto: Support asynchronous mode Lei He
2022-09-19  3:53 ` [PATCH 2/4] crypto: Support DER encodings Lei He
2022-09-19  3:53 ` [PATCH 3/4] crypto: Support export akcipher to pkcs8 Lei He
2022-09-19  3:53 ` [PATCH 4/4] cryptodev: Add a lkcf-backend for cryptodev Lei He
2022-09-26  3:03 ` PING: [PATCH 0/4] Add a new backend " Lei He
2022-10-07 14:25 ` Michael S. Tsirkin [this message]
2022-10-08  9:04   ` [External] " Lei He

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20221007102500-mutt-send-email-mst@kernel.org \
    --to=mst@redhat.com \
    --cc=arei.gonglei@huawei.com \
    --cc=berrange@redhat.com \
    --cc=helei.sig11@bytedance.com \
    --cc=pizhenwei@bytedance.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.