From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from huawei.com (szxga01-in.huawei.com [45.249.212.187]) by dpdk.org (Postfix) with ESMTP id 97F6637B4 for ; Sat, 31 Mar 2018 10:51:08 +0200 (CEST) Received: from DGGEMM406-HUB.china.huawei.com (unknown [172.30.72.54]) by Forcepoint Email with ESMTP id 0C2E319043113; Sat, 31 Mar 2018 16:51:04 +0800 (CST) Received: from DGGEMM424-HUB.china.huawei.com (10.1.198.41) by DGGEMM406-HUB.china.huawei.com (10.3.20.214) with Microsoft SMTP Server (TLS) id 14.3.361.1; Sat, 31 Mar 2018 16:51:04 +0800 Received: from DGGEMM505-MBS.china.huawei.com ([169.254.2.114]) by dggemm424-hub.china.huawei.com ([10.1.198.41]) with mapi id 14.03.0361.001; Sat, 31 Mar 2018 16:50:55 +0800 From: "Zhoujian (jay)" To: "dev@dpdk.org" CC: "pablo.de.lara.guarch@intel.com" , "roy.fan.zhang@intel.com" , "thomas@monjalon.net" , "Gonglei (Arei)" , "xin.zeng@intel.com" , "Huangweidong (C)" , "wangxin (U)" , longpeng Thread-Topic: [PATCH v4 0/7] crypto: add virtio poll mode driver Thread-Index: AQHTyMTMh8MYN4oJF0WVZPY3XDb2U6PqCI5Q Date: Sat, 31 Mar 2018 08:50:54 +0000 Message-ID: References: In-Reply-To: Accept-Language: zh-CN, en-US Content-Language: zh-CN X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.177.19.14] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-CFilter-Loop: Reflected Subject: Re: [dpdk-dev] [PATCH v4 0/7] crypto: add virtio poll mode driver X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Mar 2018 08:51:09 -0000 I find that my dpdk-next-crypto repo is not the newest, I'll send a new ver= sion. Sorry about that. Regards, Jay > -----Original Message----- > From: Zhoujian (jay) > Sent: Saturday, March 31, 2018 3:49 PM > To: dev@dpdk.org > Cc: pablo.de.lara.guarch@intel.com; roy.fan.zhang@intel.com; > thomas@monjalon.net; Gonglei (Arei) ; > xin.zeng@intel.com; Huangweidong (C) ; wangxin = (U) > ; longpeng ; Zhoujian (= jay) > > Subject: [PATCH v4 0/7] crypto: add virtio poll mode driver >=20 > This patch series introduce virtio crypto poll mode driver. >=20 > Since it is limited by the vhost crypto backend of the virtio-crypto, thi= s > patch series only supports a limited subset of crypto services. > Only the following algorithms are tested: >=20 > Cipher algorithms: > - RTE_CRYPTO_CIPHER_AES_CBC (128-bit, 192-bit and 256-bit keys) >=20 > Cipher then hash algorithms: > - RTE_CRYPTO_CIPHER_AES_CBC with RTE_CRYPTO_AUTH_SHA1_HMAC >=20 > The qemu side has supported vhost crypto and the vhost user crypto server > side patches had been sent to DPDK community, pls see >=20 > [PATCH v2 00/10] lib/librte_vhost: introduce new vhost user crypto backen= d > support https://dpdk.org/ml/archives/dev/2018-February/091594.html >=20 > 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: >=20 > qemu-system-x86_64 \ > [...] \ > -chardev socket,id=3Dcharcrypto0,path=3D/path/to/your/socket \ > -object cryptodev-vhost-user,id=3Dcryptodev0,chardev=3Dcharcrypto= 0 \ > -device virtio-crypto-pci,id=3Dcrypto0,cryptodev=3Dcryptodev0 > [...] >=20 > 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 >=20 > 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\)=3Dn,\1=3Dy,' > config/common_base > make config T=3Dx86_64-native-linuxapp-gcc > make install T=3Dx86_64-native-linuxapp-gcc >=20 > The unit test cases can be compiled as below: > cd to the top-level DPDK directory > export RTE_TARGET=3Dx86_64-native-linuxapp-gcc > export RTE_SDK=3D`pwd` > cd to test/test > make > ./test (MUST reserve enough huge pages memory) > type the command "cryptodev_virtio_autotest" to test >=20 > The result should be like this: > RTE>>cryptodev_virtio_autotest > + ------------------------------------------------------- + + Test Suit= e : > 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 > 8) TestCase AES-128-CTR Encryption PASS > 9) TestCase AES-128-CTR Decryption PASS > 10) TestCase AES-192-CTR Encryption PASS > 11) TestCase AES-192-CTR Decryption PASS > 12) TestCase AES-256-CTR Encryption PASS > 13) TestCase AES-256-CTR 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 >=20 > The performance can be tested as below: >=20 > reserve enough huge pages > cd to the top-level DPDK directory > export RTE_TARGET=3Dx86_64-native-linuxapp-gcc > export RTE_SDK=3D`pwd` > cd to app/test-crypto-perf > type the command "make" to compile > run the tests with the following command: >=20 > ./dpdk-test-crypto-perf -l 0,1 -- --devtype crypto_virtio \ > --ptest throughput --optype cipher-then-auth --cipher-algo aes-cb= c \ > --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 >=20 > Please help to review, thanks! >=20 > 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 >=20 > Changes in v3: > - set up capabilities for virtio crypto PMD [Fan] > - delete AES-CTR unit test cases since vhost_user crypto backend does no= t > support [Fan] > - fix a variable uninitialized in virtio_crypto_queue_setup() [Xin, Fan] > - fix a bug in virtqueue_dequeue_burst_rx() >=20 > Changes in v2: > - using pre-allocated mempool instead of rte_malloc to improve performan= ce > [Fan] > - split the patch into a patchset [Fan] > - using linux/virtio_crypto.h instead of creating a copy of the file [Fa= n] > - 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 >=20 > Jay Zhou (7): > crypto/virtio: add virtio related fundamental functions > crypto/virtio: add crypto related session structure > crypto/virtio: core code of virtio crypto PMD > crypto/virtio: add makefile > doc: add virtio crypto PMD guide > test/crypto: add function tests for virtio crypto PMD > MAINTAINERS: add myself as virtio crypto PMD maintainer >=20 > 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 | 4 + > drivers/crypto/Makefile | 1 + > drivers/crypto/virtio/Makefile | 31 + > .../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 | 1508 > ++++++++++++++++++++ > drivers/crypto/virtio/virtio_cryptodev.h | 66 + > drivers/crypto/virtio/virtio_logs.h | 91 ++ > drivers/crypto/virtio/virtio_pci.c | 460 ++++++ > drivers/crypto/virtio/virtio_pci.h | 253 ++++ > drivers/crypto/virtio/virtio_ring.h | 137 ++ > drivers/crypto/virtio/virtio_rxtx.c | 541 +++++++ > drivers/crypto/virtio/virtqueue.c | 43 + > drivers/crypto/virtio/virtqueue.h | 172 +++ > mk/rte.app.mk | 1 + > test/test/test_cryptodev.c | 49 + > 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 + > 26 files changed, 3628 insertions(+), 9 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/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 >=20 > -- > 1.8.3.1 >=20