[dpdk-dev] [PATCH v3 0/8] Add crypto PMD optimized for ARMv8

Hemant Agrawal hemant.agrawal at nxp.com
Mon Jan 16 07:57:12 CET 2017


Hi Zbigniew,


> -----Original Message-----
> From: Zbigniew Bodek [mailto:zbigniew.bodek at caviumnetworks.com]
> Subject: Re: [PATCH v3 0/8] Add crypto PMD optimized for ARMv8
> On 13.01.2017 09:07, Hemant Agrawal wrote:
> > On 1/4/2017 11:03 PM, zbigniew.bodek at caviumnetworks.com wrote:
> >> From: Zbigniew Bodek <zbigniew.bodek at caviumnetworks.com>
> >>
> >> Introduce crypto poll mode driver using ARMv8 cryptographic
> >> extensions. This PMD is optimized to provide performance boost for
> >> chained crypto operations processing, such as:
> >> * encryption + HMAC generation
> >> * decryption + HMAC validation.
> >> In particular, cipher only or hash only operations are not provided.
> >
> > Do you have a plan to add the crypto only, auth/hash only support into
> > this driver?
> 
> OpenSSL driver is already implementing that and it is optimized for ARMv8.
> 
[Hemant]  Agreed that openSSL driver implement it, however it will make the application little complex to initiates both driver instances and then choose the driver based on the algorithm.

> > Also, do you plan to add additional cases w.r.t supported by other
> > crypto driver?
> 
> We may do it in the future but this depends on our resource availability.
> >
> >> Performance gain can be observed in tests against OpenSSL PMD which
> >> also uses ARM crypto extensions for packets processing.
> >>
> >> Exemplary crypto performance tests comparison:
> >>
> >> cipher_hash. cipher algo: AES_CBC
> >> auth algo: SHA1_HMAC cipher key size=16.
> >> burst_size: 64 ops
> >>
> >> ARMv8 PMD improvement over OpenSSL PMD (Optimized for ARMv8 cipher
> >> only and hash only cases):
> >>
> >> Buffer
> >> Size(B)   OPS(M)      Throughput(Gbps)
> >> 64        729 %        742 %
> >> 128       577 %        592 %
> >> 256       483 %        476 %
> >> 512       336 %        351 %
> >> 768       300 %        286 %
> >> 1024      263 %        250 %
> >> 1280      225 %        229 %
> >> 1536      214 %        213 %
> >> 1792      186 %        203 %
> >> 2048      200 %        193 %
> >>
> >> The driver currently supports AES-128-CBC in combination with: SHA256
> >> HMAC and SHA1 HMAC.
> >> The core crypto functionality of this driver is provided by the
> >> external armv8_crypto library that can be downloaded from the Cavium
> >> repository:
> >> https://github.com/caviumnetworks/armv8_crypto
> >>
[Hemant] Thanks for the good work. 
Is it possible to get it hosted on a standard and neutral place? E.g. Linaro
It will make it easier for other ARM vendors to contribute. 

> >> CPU compatibility with this virtual device is detected in run-time
> >> and virtual crypto device will not be created if CPU doesn't provide
> >> AES, SHA1, SHA2 and NEON.
> >>
> >> The functionality and performance of this code can be tested using
> >> generic test application with the following commands:
> >> * cryptodev_sw_armv8_autotest
> >> * cryptodev_sw_armv8_perftest
> >> New test vectors and cases have been added to the general pool. In
> >> particular SHA1 and
> >> SHA256 HMAC for short cases were introduced.
> >> This is because low-level ARM assembly code is using different code
> >> paths for long and short data sets, so in order to test the mentioned
> >> driver correctly, two different data sets need to be provided.
> >>
> >> ---
> >> v3:
> >> * Addressed review remarks
> >> * Moved low-level assembly code to the external library
> >> * Removed SHA256 MAC cases
> >> * Various fixes: interface to the library, digest destination
> >>   and source address interpreting, missing mbuf manipulations.
> >>
> >> v2:
> >> * Fixed checkpatch warnings
> >> * Divide patches into smaller logical parts
> >>
> >> Zbigniew Bodek (8):
> >>   mk: fix build of assembly files for ARM64
> >>   lib: add cryptodev type for the upcoming ARMv8 PMD
> >>   crypto/armv8: add PMD optimized for ARMv8 processors
> >>   mk/crypto/armv8: add PMD to the build system
> >>   doc/armv8: update documentation about crypto PMD
> >>   crypto/armv8: enable ARMv8 PMD in the configuration
> >>   crypto/armv8: update MAINTAINERS entry for ARMv8 crypto
> >>   app/test: add ARMv8 crypto tests and test vectors
> >>
> >>  MAINTAINERS                                    |   6 +
> >>  app/test/test_cryptodev.c                      |  63 ++
> >>  app/test/test_cryptodev_aes_test_vectors.h     | 144 +++-
> >>  app/test/test_cryptodev_blockcipher.c          |   4 +
> >>  app/test/test_cryptodev_blockcipher.h          |   1 +
> >>  app/test/test_cryptodev_perf.c                 | 480 +++++++++++++
> >>  config/common_base                             |   6 +
> >>  doc/guides/cryptodevs/armv8.rst                |  96 +++
> >>  doc/guides/cryptodevs/index.rst                |   1 +
> >>  doc/guides/rel_notes/release_17_02.rst         |   5 +
> >>  drivers/crypto/Makefile                        |   1 +
> >>  drivers/crypto/armv8/Makefile                  |  73 ++
> >>  drivers/crypto/armv8/rte_armv8_pmd.c           | 926
> >> +++++++++++++++++++++++++
> >>  drivers/crypto/armv8/rte_armv8_pmd_ops.c       | 369 ++++++++++
> >>  drivers/crypto/armv8/rte_armv8_pmd_private.h   | 211 ++++++
> >>  drivers/crypto/armv8/rte_armv8_pmd_version.map |   3 +
> >>  lib/librte_cryptodev/rte_cryptodev.h           |   3 +
> >>  mk/arch/arm64/rte.vars.mk                      |   1 -
> >>  mk/rte.app.mk                                  |   2 +
> >>  mk/toolchain/gcc/rte.vars.mk                   |   6 +-
> >>  20 files changed, 2390 insertions(+), 11 deletions(-)  create mode
> >> 100644 doc/guides/cryptodevs/armv8.rst  create mode 100644
> >> drivers/crypto/armv8/Makefile  create mode 100644
> >> drivers/crypto/armv8/rte_armv8_pmd.c
> >>  create mode 100644 drivers/crypto/armv8/rte_armv8_pmd_ops.c
> >>  create mode 100644 drivers/crypto/armv8/rte_armv8_pmd_private.h
> >>  create mode 100644 drivers/crypto/armv8/rte_armv8_pmd_version.map
> >>
> >
> >


More information about the dev mailing list