From: Maxime Coquelin <maxime.coquelin@redhat.com>
To: Fan Zhang <roy.fan.zhang@intel.com>, dev@dpdk.org
Cc: jianjay.zhou@huawei.com, jianfeng.tan@intel.com,
pawelx.wodkowski@intel.com, Jens Freimann <jfreiman@redhat.com>
Subject: Re: [dpdk-dev] [PATCH v6 0/8] vhost: introduce vhost crypto backend
Date: Thu, 5 Apr 2018 11:48:41 +0200 [thread overview]
Message-ID: <73c715b9-24d9-3fdc-770c-9b2de7703c95@redhat.com> (raw)
In-Reply-To: <0056f003-4c46-1ac7-c039-da60f72b1680@redhat.com>
On 04/05/2018 10:26 AM, Maxime Coquelin wrote:
>
>
> On 04/04/2018 04:24 PM, Fan Zhang wrote:
>> This patchset adds crypto backend suppport to vhost library
>> including a proof-of-concept sample application. The implementation
>> follows the virtio-crypto specification and have been tested
>> with qemu 2.11.50 (with several patches applied, detailed later)
>> with Fedora 24 running in the frontend.
>>
>> The vhost_crypto library acts as a "bridge" method that translate
>> the virtio-crypto crypto requests to DPDK crypto operations, so it
>> is purely software implementation. However it does require the user
>> to provide the DPDK Cryptodev ID so it knows how to handle the
>> virtio-crypto session creation and deletion mesages.
>>
>> Currently the implementation supports AES-CBC-128 and HMAC-SHA1
>> cipher only/chaining modes and does not support sessionless mode
>> yet. The guest can use standard virtio-crypto driver to set up
>> session and sends encryption/decryption requests to backend. The
>> vhost-crypto sample application provided in this patchset will
>> do the actual crypto work.
>>
>> The following steps are involved to enable vhost-crypto support.
>>
>> In the host:
>> 1. Download the qemu source code.
>>
>> 2. Recompile your qemu with vhost-crypto option enabled.
>>
>> 3. Apply this patchset to latest DPDK code and recompile DPDK.
>>
>> 4. Compile and run vhost-crypto sample application.
>>
>> ./examples/vhost_crypto/build/vhost-crypto -l 11,12 -w 0000:86:01.0 \
>> --socket-mem 2048,2048
>>
>> Where 0000:86:01.0 is the QAT PCI address. You may use AES-NI-MB if it is
>> not available. The sample application requires 2 lcores: 1 master and 1
>> worker. The application will create a UNIX socket file
>> /tmp/vhost_crypto1.socket.
>>
>> 5. Start your qemu application. Here is my command:
>>
>> qemu/x86_64-softmmu/qemu-system-x86_64 -machine accel=kvm -cpu host \
>> -smp 2 -m 1G -hda ~/path-to-your/image.qcow \
>> -object
>> memory-backend-file,id=mem,size=1G,mem-path=/dev/hugepages,share=on \
>> -mem-prealloc -numa node,memdev=mem -chardev \
>> socket,id=charcrypto0,path=/tmp/vhost_crypto1.socket \
>> -object cryptodev-vhost-user,id=cryptodev0,chardev=charcrypto0 \
>> -device virtio-crypto-pci,id=crypto0,cryptodev=cryptodev0
>>
>> 6. Once guest is booted. The Linux virtio_crypto kernel module is
>> loaded by
>> default. You shall see the following logs in your demsg:
>>
>> [ 17.611044] virtio_crypto: loading out-of-tree module taints kernel.
>> [ 17.611083] virtio_crypto: module verification failed: signature
>> and/or ...
>> [ 17.611723] virtio_crypto virtio0: max_queues: 1,
>> max_cipher_key_len: ...
>> [ 17.612156] virtio_crypto virtio0: will run requests pump with
>> realtime ...
>> [ 18.376100] virtio_crypto virtio0: Accelerator is ready
>>
>> The virtio_crypto driver in the guest is now up and running.
>>
>> 7. The rest steps can be as same as the Testing section in
>> https://wiki.qemu.org/Features/VirtioCrypto
>>
>> 8. It is possible to use DPDK Virtio Crypto PMD
>> (https://dpdk.org/dev/patchwork/patch/36921/) in the guest to work with
>> this patchset to achieve optimal performance.
>>
>> v6:
>> - Changed commit message
>> - removed rte prefix in handler prototype
>>
>> v5:
>> - removed external ops register API.
>> - patch cleaned.
>>
>> v4:
>> - Changed external vhost backend ops register API.
>> - Fixed a bug.
>>
>> v3:
>> - Changed external vhost backend private data and message handling
>> - Added experimental tag to rte_vhost_crypto_set_zero_copy()
>>
>> v2:
>> - Moved vhost_crypto_data_req data from crypto op to source mbuf.
>> - Removed ZERO-COPY flag from config option and make it run-timely
>> changeable.
>> - Guest-polling mode possible.
>> - Simplified vring descriptor access procedure.
>> - Work with both LKCF and DPDK Virtio-Crypto PMD guest drivers.
>>
>> Fan Zhang (8):
>> lib/librte_vhost: add vhost user message handlers
>> lib/librte_vhost: add virtio-crypto user message structure
>> lib/librte_vhost: add session message handler
>> lib/librte_vhost: add request handler
>> lib/librte_vhost: add public function implementation
>> lib/librte_vhost: update makefile
>> examples/vhost_crypto: add vhost crypto sample application
>> doc: update for vhost crypto support
>>
>> doc/guides/prog_guide/vhost_lib.rst | 25 +
>> doc/guides/rel_notes/release_18_05.rst | 5 +
>> doc/guides/sample_app_ug/index.rst | 1 +
>> doc/guides/sample_app_ug/vhost_crypto.rst | 82 ++
>> examples/vhost_crypto/Makefile | 32 +
>> examples/vhost_crypto/main.c | 541 ++++++++++++
>> examples/vhost_crypto/meson.build | 14 +
>> lib/librte_vhost/Makefile | 6 +-
>> lib/librte_vhost/meson.build | 8 +-
>> lib/librte_vhost/rte_vhost_crypto.h | 109 +++
>> lib/librte_vhost/rte_vhost_version.map | 11 +
>> lib/librte_vhost/vhost.c | 2 +-
>> lib/librte_vhost/vhost.h | 53 +-
>> lib/librte_vhost/vhost_crypto.c | 1312
>> +++++++++++++++++++++++++++++
>> lib/librte_vhost/vhost_user.c | 33 +-
>> lib/librte_vhost/vhost_user.h | 35 +-
>> 16 files changed, 2256 insertions(+), 13 deletions(-)
>> create mode 100644 doc/guides/sample_app_ug/vhost_crypto.rst
>> create mode 100644 examples/vhost_crypto/Makefile
>> create mode 100644 examples/vhost_crypto/main.c
>> create mode 100644 examples/vhost_crypto/meson.build
>> create mode 100644 lib/librte_vhost/rte_vhost_crypto.h
>> create mode 100644 lib/librte_vhost/vhost_crypto.c
>>
>
> Applied to dpdk-next-virtio/master.
Sorry, but I had to revert because it fails to build with older
Kernels:
fatal error: linux/virtio_crypto.h: No such file or directory
Please fix it, fix the typo, and take the opportunity to rebase the
series on top of dpdk-next-virtio/master.
Note that you were also missing _rte_experimental in front of
some of the new APIs.
Thanks in advance,
Maxime
> Fan, I had quite a few conflicts to solve due to vDPA series.
>
> Can you please a trial of vhost crypto usecase and confirm this is all
> good?
>
> Thanks,
> Maxime
next prev parent reply other threads:[~2018-04-05 9:48 UTC|newest]
Thread overview: 70+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-26 9:51 [dpdk-dev] [PATCH v3 00/10] lib/librte_vhost: introduce new vhost user crypto backend support Fan Zhang
2018-03-26 9:51 ` [dpdk-dev] [PATCH v3 01/10] lib/librte_vhost: add external " Fan Zhang
2018-03-29 2:11 ` Tan, Jianfeng
2018-03-29 4:17 ` Liu, Changpeng
2018-03-26 9:51 ` [dpdk-dev] [PATCH v3 02/10] lib/librte_vhost: add virtio-crypto user message structure Fan Zhang
2018-03-26 9:51 ` [dpdk-dev] [PATCH v3 03/10] lib/librte_vhost: add session message handler Fan Zhang
2018-03-26 9:51 ` [dpdk-dev] [PATCH v3 04/10] lib/librte_vhost: add request handler Fan Zhang
2018-03-26 9:51 ` [dpdk-dev] [PATCH v3 05/10] lib/librte_vhost: add head file Fan Zhang
2018-03-26 9:51 ` [dpdk-dev] [PATCH v3 06/10] lib/librte_vhost: add public function implementation Fan Zhang
2018-03-26 9:51 ` [dpdk-dev] [PATCH v3 07/10] lib/librte_vhost: update version map Fan Zhang
2018-03-26 9:51 ` [dpdk-dev] [PATCH v3 08/10] lib/librte_vhost: update makefile Fan Zhang
2018-03-26 9:51 ` [dpdk-dev] [PATCH v3 09/10] examples/vhost_crypto: add vhost crypto sample application Fan Zhang
2018-03-26 9:51 ` [dpdk-dev] [PATCH v3 10/10] doc: update prog guide and sample app guide Fan Zhang
2018-03-29 12:52 ` [dpdk-dev] [PATCH v4 0/8] vhost: intdroduce vhost user crypto backend Fan Zhang
2018-03-29 12:52 ` [dpdk-dev] [PATCH v4 1/8] lib/librte_vhost: add external backend support Fan Zhang
2018-03-29 13:47 ` Wodkowski, PawelX
2018-04-01 19:53 ` Zhang, Roy Fan
2018-04-03 13:44 ` Maxime Coquelin
2018-04-03 13:55 ` Zhang, Roy Fan
2018-04-03 14:42 ` Tan, Jianfeng
2018-04-03 14:48 ` Wodkowski, PawelX
2018-03-29 12:52 ` [dpdk-dev] [PATCH v4 2/8] lib/librte_vhost: add virtio-crypto user message structure Fan Zhang
2018-03-29 12:52 ` [dpdk-dev] [PATCH v4 3/8] lib/librte_vhost: add session message handler Fan Zhang
2018-03-29 15:02 ` Tan, Jianfeng
2018-04-03 15:09 ` Zhang, Roy Fan
2018-03-29 12:52 ` [dpdk-dev] [PATCH v4 4/8] lib/librte_vhost: add request handler Fan Zhang
2018-03-29 12:52 ` [dpdk-dev] [PATCH v4 5/8] lib/librte_vhost: add public function implementation Fan Zhang
2018-03-29 12:52 ` [dpdk-dev] [PATCH v4 6/8] lib/librte_vhost: update makefile Fan Zhang
2018-03-29 12:52 ` [dpdk-dev] [PATCH v4 7/8] examples/vhost_crypto: add vhost crypto sample application Fan Zhang
2018-03-29 12:52 ` [dpdk-dev] [PATCH v4 8/8] doc: update for vhost crypto support Fan Zhang
2018-04-04 10:08 ` [dpdk-dev] [PATCH v5 0/8] vhost: introduce vhost crypto backend Fan Zhang
2018-04-04 10:08 ` [dpdk-dev] [PATCH v5 1/8] lib/librte_vhost: add external backend support Fan Zhang
2018-04-04 14:08 ` Maxime Coquelin
2018-04-04 10:08 ` [dpdk-dev] [PATCH v5 2/8] lib/librte_vhost: add virtio-crypto user message structure Fan Zhang
2018-04-04 10:08 ` [dpdk-dev] [PATCH v5 3/8] lib/librte_vhost: add session message handler Fan Zhang
2018-04-04 10:08 ` [dpdk-dev] [PATCH v5 4/8] lib/librte_vhost: add request handler Fan Zhang
2018-04-04 10:08 ` [dpdk-dev] [PATCH v5 5/8] lib/librte_vhost: add public function implementation Fan Zhang
2018-04-04 10:09 ` [dpdk-dev] [PATCH v5 6/8] lib/librte_vhost: update makefile Fan Zhang
2018-04-04 10:09 ` [dpdk-dev] [PATCH v5 7/8] examples/vhost_crypto: add vhost crypto sample application Fan Zhang
2018-04-04 10:09 ` [dpdk-dev] [PATCH v5 8/8] doc: update for vhost crypto support Fan Zhang
2018-04-04 14:24 ` [dpdk-dev] [PATCH v6 0/8] vhost: introduce vhost crypto backend Fan Zhang
2018-04-04 14:24 ` [dpdk-dev] [PATCH v6 1/8] lib/librte_vhost: add vhost user message handlers Fan Zhang
2018-04-04 14:24 ` [dpdk-dev] [PATCH v6 2/8] lib/librte_vhost: add virtio-crypto user message structure Fan Zhang
2018-04-04 14:24 ` [dpdk-dev] [PATCH v6 3/8] lib/librte_vhost: add session message handler Fan Zhang
2018-04-04 14:25 ` [dpdk-dev] [PATCH v6 4/8] lib/librte_vhost: add request handler Fan Zhang
2018-04-05 8:22 ` Maxime Coquelin
2018-04-04 14:25 ` [dpdk-dev] [PATCH v6 5/8] lib/librte_vhost: add public function implementation Fan Zhang
2018-04-04 14:25 ` [dpdk-dev] [PATCH v6 6/8] lib/librte_vhost: update makefile Fan Zhang
2018-04-04 14:25 ` [dpdk-dev] [PATCH v6 7/8] examples/vhost_crypto: add vhost crypto sample application Fan Zhang
2018-04-04 14:25 ` [dpdk-dev] [PATCH v6 8/8] doc: update for vhost crypto support Fan Zhang
2018-04-04 16:46 ` Zhoujian (jay)
2018-04-04 15:37 ` [dpdk-dev] [PATCH v6 0/8] vhost: introduce vhost crypto backend Maxime Coquelin
2018-04-04 16:50 ` Zhoujian (jay)
2018-04-04 19:32 ` Maxime Coquelin
2018-04-05 8:26 ` Maxime Coquelin
2018-04-05 9:48 ` Maxime Coquelin [this message]
2018-04-05 16:01 ` [dpdk-dev] [PATCH v7 " Fan Zhang
2018-04-05 16:01 ` [dpdk-dev] [PATCH v7 1/8] lib/librte_vhost: add vhost user message handlers Fan Zhang
2018-04-05 16:01 ` [dpdk-dev] [PATCH v7 2/8] lib/librte_vhost: add virtio-crypto user message structure Fan Zhang
2018-04-05 16:01 ` [dpdk-dev] [PATCH v7 3/8] lib/librte_vhost: add session message handler Fan Zhang
2018-04-05 16:01 ` [dpdk-dev] [PATCH v7 4/8] lib/librte_vhost: add request handler Fan Zhang
2018-04-05 16:01 ` [dpdk-dev] [PATCH v7 5/8] lib/librte_vhost: add public function implementation Fan Zhang
2018-04-05 16:01 ` [dpdk-dev] [PATCH v7 6/8] lib/librte_vhost: update makefile Fan Zhang
2018-04-05 16:01 ` [dpdk-dev] [PATCH v7 7/8] examples/vhost_crypto: add vhost crypto sample application Fan Zhang
2018-04-15 14:34 ` Thomas Monjalon
2018-04-15 17:35 ` Thomas Monjalon
2018-04-16 7:27 ` Maxime Coquelin
2018-04-05 16:01 ` [dpdk-dev] [PATCH v7 8/8] doc: update for vhost crypto support Fan Zhang
2018-04-05 19:28 ` [dpdk-dev] [PATCH v7 0/8] vhost: introduce vhost crypto backend Maxime Coquelin
2018-04-05 19:40 ` Maxime Coquelin
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=73c715b9-24d9-3fdc-770c-9b2de7703c95@redhat.com \
--to=maxime.coquelin@redhat.com \
--cc=dev@dpdk.org \
--cc=jfreiman@redhat.com \
--cc=jianfeng.tan@intel.com \
--cc=jianjay.zhou@huawei.com \
--cc=pawelx.wodkowski@intel.com \
--cc=roy.fan.zhang@intel.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).