From: Jay Zhou <jianjay.zhou@huawei.com>
To: <dev@dpdk.org>
Cc: <pablo.de.lara.guarch@intel.com>, <roy.fan.zhang@intel.com>,
<thomas@monjalon.net>, <arei.gonglei@huawei.com>,
<xin.zeng@intel.com>, <weidong.huang@huawei.com>,
<wangxinxin.wang@huawei.com>, <longpeng2@huawei.com>,
<jianjay.zhou@huawei.com>
Subject: [PATCH v9 00/11] crypto: add virtio poll mode driver
Date: Sun, 15 Apr 2018 16:51:17 +0800 [thread overview]
Message-ID: <cover.1523781007.git.jianjay.zhou@huawei.com> (raw)
In-Reply-To: <cover.1522747556.git.jianjay.zhou@huawei.com>
This patch series introduce virtio crypto poll mode driver.
Since it is limited by the vhost crypto backend of the virtio-crypto,
this patch series only supports a limited subset of crypto services.
Only the following algorithms are tested:
Cipher algorithms:
- RTE_CRYPTO_CIPHER_AES_CBC (128-bit, 192-bit and 256-bit keys)
Cipher then hash algorithms:
- RTE_CRYPTO_CIPHER_AES_CBC with RTE_CRYPTO_AUTH_SHA1_HMAC
The qemu side has supported vhost crypto and the vhost user crypto server
side patches had been merged into dpdk-next-virtio too.
Firstly run DPDK vhost crypto sample as a server side and build QEMU with
vhost crypto enabled.
QEMU can then be started using the following parameters:
qemu-system-x86_64 \
[...] \
-chardev socket,id=charcrypto0,path=/path/to/your/socket \
-object cryptodev-vhost-user,id=cryptodev0,chardev=charcrypto0 \
-device virtio-crypto-pci,id=crypto0,cryptodev=cryptodev0
[...]
Bind the uio_generic driver for the virtio-crypto device.
For example, 0000:00:04.0 is the domain, bus, device and function
number of the virtio-crypto device:
modprobe uio_pci_generic
echo -n 0000:00:04.0 > /sys/bus/pci/drivers/virtio-pci/unbind
echo "1af4 1054" > /sys/bus/pci/drivers/uio_pci_generic/new_id
The front-end virtio crypto PMD driver can be installed:
cd to the top-level DPDK directory
sed -i 's,\(CONFIG_RTE_LIBRTE_PMD_VIRTIO_CRYPTO\)=n,\1=y,' config/common_base
make config T=x86_64-native-linuxapp-gcc
make install T=x86_64-native-linuxapp-gcc
The unit test cases can be compiled as below:
cd to the top-level DPDK directory
export RTE_TARGET=x86_64-native-linuxapp-gcc
export RTE_SDK=`pwd`
cd to test/test
make
./test (MUST reserve enough huge pages memory)
type the command "cryptodev_virtio_autotest" to test
The result should be like this:
RTE>>cryptodev_virtio_autotest
+ ------------------------------------------------------- +
+ Test Suite : Crypto VIRTIO Unit Test Suite
+ ------------------------------------------------------- +
0) TestCase AES-128-CBC Encryption PASS
1) TestCase AES-128-CBC Decryption PASS
2) TestCase AES-192-CBC Encryption PASS
3) TestCase AES-192-CBC Decryption PASS
4) TestCase AES-256-CBC Encryption PASS
5) TestCase AES-256-CBC Decryption PASS
6) TestCase AES-256-CBC OOP Encryption PASS
7) TestCase AES-256-CBC OOP Decryption PASS
+ TestCase [ 0] : test_AES_cipheronly_virtio_all succeeded
+ ------------------------------------------------------- +
+ Test Suite Summary
+ Tests Total : 1
+ Tests Skipped : 0
+ Tests Executed : 1
+ Tests Unsupported: 0
+ Tests Passed : 1
+ Tests Failed : 0
+ ------------------------------------------------------- +
Test OK
The performance can be tested as below:
reserve enough huge pages
cd to the top-level DPDK directory
export RTE_TARGET=x86_64-native-linuxapp-gcc
export RTE_SDK=`pwd`
cd to app/test-crypto-perf
type the command "make" to compile
run the tests with the following command:
./dpdk-test-crypto-perf -l 0,1 -- --devtype crypto_virtio \
--ptest throughput --optype cipher-then-auth --cipher-algo aes-cbc \
--cipher-op encrypt --cipher-key-sz 16 --auth-algo sha1-hmac \
--auth-op generate --auth-key-sz 64 --digest-sz 12 \
--total-ops 100000000 --burst-sz 64 --buffer-sz 2048
Please help to review, thanks!
Changes in v9:
- fix compilation error when CONFIG_RTE_LIBRTE_PMD_VIRTIO_CRYPTO=y
and CONFIG_RTE_BUILD_SHARED_LIB=y
Changes in v8:
- using the virtio_crypto.h in compat lib instead of
the linux header file
- add meson build
Changes in v7:
- add detailed commit messages [Pablo]
Changes in v6:
- split the patches in a more functional way [Pablo]
Changes in v5:
- rebased on the newest dpdk-next-crypto
Changes in v4:
- using dynamic logging [Pablo]
- elaborate on the core code [Pablo]
- delete algorithms which can not be tested [Pablo]
- rebased on dpdk-next-crypto [Pablo]
- fix doc compilation error [Pablo]
- add release note for this PMD [Pablo]
- add R-b from Fan Zhang
- fix some typos
Changes in v3:
- set up capabilities for virtio crypto PMD [Fan]
- delete AES-CTR unit test cases since vhost_user crypto backend does not
support [Fan]
- fix a variable uninitialized in virtio_crypto_queue_setup() [Xin, Fan]
- fix a bug in virtqueue_dequeue_burst_rx()
Changes in v2:
- using pre-allocated mempool instead of rte_malloc to improve performance [Fan]
- split the patch into a patchset [Fan]
- using linux/virtio_crypto.h instead of creating a copy of the file [Fan]
- update doc/guides/cryptodevs for describing virtio crypto PMD [Fan]
- update copyright
- delete virtio legacy mode code since virtio-crypto conforms to virtio-1.0
- refine the function and variable names
- fix errors and warnings reported by checkpatch
Jay Zhou (11):
crypto/virtio: add virtio crypto PMD
crypto/virtio: support virtio device init
crypto/virtio: support basic PMD ops
crypto/virtio: support session related ops
crypto/virtio: support crypto enqueue/dequeue burst API
crypto/virtio: support stats related ops
crypto/virtio: support AES-CBC
crypto/virtio: support HMAC-SHA1
crypto/virtio: build with meson
test/crypto: add function tests for virtio crypto PMD
doc: add virtio crypto PMD guide
MAINTAINERS | 6 +
config/common_base | 14 +
doc/guides/cryptodevs/features/virtio.ini | 26 +
doc/guides/cryptodevs/index.rst | 1 +
doc/guides/cryptodevs/virtio.rst | 117 ++
doc/guides/rel_notes/release_18_05.rst | 7 +
drivers/crypto/Makefile | 1 +
drivers/crypto/meson.build | 2 +-
drivers/crypto/virtio/Makefile | 32 +
drivers/crypto/virtio/meson.build | 12 +
.../virtio/rte_pmd_virtio_crypto_version.map | 3 +
drivers/crypto/virtio/virtio_crypto_algs.h | 27 +
drivers/crypto/virtio/virtio_crypto_capabilities.h | 51 +
drivers/crypto/virtio/virtio_cryptodev.c | 1504 ++++++++++++++++++++
drivers/crypto/virtio/virtio_cryptodev.h | 62 +
drivers/crypto/virtio/virtio_logs.h | 91 ++
drivers/crypto/virtio/virtio_pci.c | 462 ++++++
drivers/crypto/virtio/virtio_pci.h | 252 ++++
drivers/crypto/virtio/virtio_ring.h | 137 ++
drivers/crypto/virtio/virtio_rxtx.c | 515 +++++++
drivers/crypto/virtio/virtqueue.c | 43 +
drivers/crypto/virtio/virtqueue.h | 171 +++
mk/rte.app.mk | 1 +
test/test/test_cryptodev.c | 48 +
test/test/test_cryptodev.h | 1 +
test/test/test_cryptodev_aes_test_vectors.h | 24 +-
test/test/test_cryptodev_blockcipher.c | 9 +-
test/test/test_cryptodev_blockcipher.h | 1 +
28 files changed, 3610 insertions(+), 10 deletions(-)
create mode 100644 doc/guides/cryptodevs/features/virtio.ini
create mode 100644 doc/guides/cryptodevs/virtio.rst
create mode 100644 drivers/crypto/virtio/Makefile
create mode 100644 drivers/crypto/virtio/meson.build
create mode 100644 drivers/crypto/virtio/rte_pmd_virtio_crypto_version.map
create mode 100644 drivers/crypto/virtio/virtio_crypto_algs.h
create mode 100644 drivers/crypto/virtio/virtio_crypto_capabilities.h
create mode 100644 drivers/crypto/virtio/virtio_cryptodev.c
create mode 100644 drivers/crypto/virtio/virtio_cryptodev.h
create mode 100644 drivers/crypto/virtio/virtio_logs.h
create mode 100644 drivers/crypto/virtio/virtio_pci.c
create mode 100644 drivers/crypto/virtio/virtio_pci.h
create mode 100644 drivers/crypto/virtio/virtio_ring.h
create mode 100644 drivers/crypto/virtio/virtio_rxtx.c
create mode 100644 drivers/crypto/virtio/virtqueue.c
create mode 100644 drivers/crypto/virtio/virtqueue.h
--
1.8.3.1
next prev parent reply other threads:[~2018-04-15 8:51 UTC|newest]
Thread overview: 76+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-03 9:43 [PATCH v6 00/10] crypto: add virtio poll mode driver Jay Zhou
2018-04-03 9:43 ` [PATCH v6 01/10] crypto/virtio: add virtio crypto PMD Jay Zhou
2018-04-04 12:56 ` De Lara Guarch, Pablo
2018-04-04 13:52 ` Zhoujian (jay)
2018-04-03 9:43 ` [PATCH v6 02/10] crypto/virtio: support virtio device init Jay Zhou
2018-04-03 9:43 ` [PATCH v6 03/10] crypto/virtio: support basic PMD ops Jay Zhou
2018-04-03 9:43 ` [PATCH v6 04/10] crypto/virtio: support session related ops Jay Zhou
2018-04-03 9:43 ` [PATCH v6 05/10] crypto/virtio: support crypto enqueue/dequeue burst API Jay Zhou
2018-04-03 9:43 ` [PATCH v6 06/10] crypto/virtio: support stats related ops Jay Zhou
2018-04-03 9:43 ` [PATCH v6 07/10] crypto/virtio: support AES-CBC Jay Zhou
2018-04-03 9:43 ` [PATCH v6 08/10] crypto/virtio: support HMAC-SHA1 Jay Zhou
2018-04-03 9:43 ` [PATCH v6 09/10] test/crypto: add function tests for virtio crypto PMD Jay Zhou
2018-04-03 9:43 ` [PATCH v6 10/10] doc: add virtio crypto PMD guide Jay Zhou
2018-04-04 17:03 ` [PATCH v7 00/10] crypto: add virtio poll mode driver Jay Zhou
2018-04-04 17:03 ` [PATCH v7 01/10] crypto/virtio: add virtio crypto PMD Jay Zhou
2018-04-04 17:03 ` [PATCH v7 02/10] crypto/virtio: support virtio device init Jay Zhou
2018-04-04 17:03 ` [PATCH v7 03/10] crypto/virtio: support basic PMD ops Jay Zhou
2018-04-04 17:03 ` [PATCH v7 04/10] crypto/virtio: support session related ops Jay Zhou
2018-04-04 17:03 ` [PATCH v7 05/10] crypto/virtio: support crypto enqueue/dequeue burst API Jay Zhou
2018-04-04 17:03 ` [PATCH v7 06/10] crypto/virtio: support stats related ops Jay Zhou
2018-04-04 17:03 ` [PATCH v7 07/10] crypto/virtio: support AES-CBC Jay Zhou
2018-04-04 17:03 ` [PATCH v7 08/10] crypto/virtio: support HMAC-SHA1 Jay Zhou
2018-04-04 17:03 ` [PATCH v7 09/10] test/crypto: add function tests for virtio crypto PMD Jay Zhou
2018-04-04 17:03 ` [PATCH v7 10/10] doc: add virtio crypto PMD guide Jay Zhou
2018-04-14 9:34 ` [PATCH v8 00/11] crypto: add virtio poll mode driver Jay Zhou
2018-04-14 9:34 ` [PATCH v8 01/11] crypto/virtio: add virtio crypto PMD Jay Zhou
2018-04-14 9:34 ` [PATCH v8 02/11] crypto/virtio: support virtio device init Jay Zhou
2018-04-14 9:34 ` [PATCH v8 03/11] crypto/virtio: support basic PMD ops Jay Zhou
2018-04-14 9:34 ` [PATCH v8 04/11] crypto/virtio: support session related ops Jay Zhou
2018-04-14 9:34 ` [PATCH v8 05/11] crypto/virtio: support crypto enqueue/dequeue burst API Jay Zhou
2018-04-14 9:34 ` [PATCH v8 06/11] crypto/virtio: support stats related ops Jay Zhou
2018-04-14 9:34 ` [PATCH v8 07/11] crypto/virtio: support AES-CBC Jay Zhou
2018-04-14 9:34 ` [PATCH v8 08/11] crypto/virtio: support HMAC-SHA1 Jay Zhou
2018-04-14 9:34 ` [PATCH v8 09/11] crypto/virtio: build with meson Jay Zhou
2018-04-14 9:34 ` [PATCH v8 10/11] test/crypto: add function tests for virtio crypto PMD Jay Zhou
2018-04-14 9:34 ` [PATCH v8 11/11] doc: add virtio crypto PMD guide Jay Zhou
2018-04-15 8:51 ` Jay Zhou [this message]
2018-04-15 8:51 ` [PATCH v9 01/11] crypto/virtio: add virtio crypto PMD Jay Zhou
2018-04-15 8:51 ` [PATCH v9 02/11] crypto/virtio: support virtio device init Jay Zhou
2018-04-15 8:51 ` [PATCH v9 03/11] crypto/virtio: support basic PMD ops Jay Zhou
2018-04-15 8:51 ` [PATCH v9 04/11] crypto/virtio: support session related ops Jay Zhou
2018-04-15 8:51 ` [PATCH v9 05/11] crypto/virtio: support crypto enqueue/dequeue burst API Jay Zhou
2018-04-15 8:51 ` [PATCH v9 06/11] crypto/virtio: support stats related ops Jay Zhou
2018-04-15 8:51 ` [PATCH v9 07/11] crypto/virtio: support AES-CBC Jay Zhou
2018-04-15 8:51 ` [PATCH v9 08/11] crypto/virtio: support HMAC-SHA1 Jay Zhou
2018-04-15 8:51 ` [PATCH v9 09/11] crypto/virtio: build with meson Jay Zhou
2018-04-15 12:09 ` De Lara Guarch, Pablo
2018-04-16 0:56 ` Zhoujian (jay)
2018-04-15 8:51 ` [PATCH v9 10/11] test/crypto: add function tests for virtio crypto PMD Jay Zhou
2018-04-15 8:51 ` [PATCH v9 11/11] doc: add virtio crypto PMD guide Jay Zhou
2018-04-16 2:21 ` [PATCH v10 00/10] crypto: add virtio poll mode driver Jay Zhou
2018-04-16 2:21 ` [PATCH v10 01/10] crypto/virtio: add virtio crypto PMD Jay Zhou
2018-04-16 14:15 ` De Lara Guarch, Pablo
2018-04-16 15:18 ` Zhoujian (jay)
2018-04-16 2:21 ` [PATCH v10 02/10] crypto/virtio: support virtio device init Jay Zhou
2018-04-16 2:21 ` [PATCH v10 03/10] crypto/virtio: support basic PMD ops Jay Zhou
2018-04-16 2:21 ` [PATCH v10 04/10] crypto/virtio: support session related ops Jay Zhou
2018-04-16 2:21 ` [PATCH v10 05/10] crypto/virtio: support crypto enqueue/dequeue burst API Jay Zhou
2018-04-16 2:21 ` [PATCH v10 06/10] crypto/virtio: support stats related ops Jay Zhou
2018-04-16 2:21 ` [PATCH v10 07/10] crypto/virtio: support AES-CBC Jay Zhou
2018-04-16 2:21 ` [PATCH v10 08/10] crypto/virtio: support HMAC-SHA1 Jay Zhou
2018-04-16 2:21 ` [PATCH v10 09/10] test/crypto: add function tests for virtio crypto PMD Jay Zhou
2018-04-16 2:21 ` [PATCH v10 10/10] doc: add virtio crypto PMD guide Jay Zhou
2018-04-17 9:23 ` [PATCH v11 00/10] crypto: add virtio poll mode driver Jay Zhou
2018-04-17 9:23 ` [PATCH v11 01/10] crypto/virtio: add virtio crypto PMD Jay Zhou
2018-04-17 9:23 ` [PATCH v11 02/10] crypto/virtio: support virtio device init Jay Zhou
2018-04-17 9:23 ` [PATCH v11 03/10] crypto/virtio: support basic PMD ops Jay Zhou
2018-04-17 9:23 ` [PATCH v11 04/10] crypto/virtio: support session related ops Jay Zhou
2018-04-17 9:23 ` [PATCH v11 05/10] crypto/virtio: support crypto enqueue/dequeue burst API Jay Zhou
2018-04-17 9:23 ` [PATCH v11 06/10] crypto/virtio: support stats related ops Jay Zhou
2018-04-17 9:23 ` [PATCH v11 07/10] crypto/virtio: support AES-CBC Jay Zhou
2018-04-17 9:23 ` [PATCH v11 08/10] crypto/virtio: support HMAC-SHA1 Jay Zhou
2018-04-17 9:23 ` [PATCH v11 09/10] test/crypto: add function tests for virtio crypto PMD Jay Zhou
2018-04-17 9:23 ` [PATCH v11 10/10] doc: add virtio crypto PMD guide Jay Zhou
2018-04-18 10:00 ` [PATCH v11 00/10] crypto: add virtio poll mode driver De Lara Guarch, Pablo
2018-04-18 13:07 ` Zhoujian (jay)
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=cover.1523781007.git.jianjay.zhou@huawei.com \
--to=jianjay.zhou@huawei.com \
--cc=arei.gonglei@huawei.com \
--cc=dev@dpdk.org \
--cc=longpeng2@huawei.com \
--cc=pablo.de.lara.guarch@intel.com \
--cc=roy.fan.zhang@intel.com \
--cc=thomas@monjalon.net \
--cc=wangxinxin.wang@huawei.com \
--cc=weidong.huang@huawei.com \
--cc=xin.zeng@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 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.