mbox

[v4,0/4] cryptodev: add symmetric crypto data-path APIs

Message ID 20200703124942.29171-1-roy.fan.zhang@intel.com (mailing list archive)
Headers

Message

Fan Zhang July 3, 2020, 12:49 p.m. UTC
This patch adds symmetric crypto data-path APIs for Cryptodev. Direct
symmetric crypto data-path APIs are a set of APIs that provide
more HW friendly enqueue/dequeue data-path functions as an alternative
approach to ``rte_cryptodev_enqueue_burst`` and
``rte_cryptodev_dequeue_burst``. The APIs are designed for external
libraries/applications that want to use Cryptodev as symmetric crypto
data-path accelerator but not necessarily mbuf data-path centric. With
the APIs the cycle cost spent on conversion from their data structure to
DPDK cryptodev operations/mbufs can be reduced, and the dependency on DPDK
crypto operation mempool can be relieved.

It is expected that the user can develop close-to-native performance
symmetric crypto data-path implementations with the functions provided
in this patchset.

Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
Signed-off-by: Piotr Bronowski <piotrx.bronowski@intel.com>

v4:
- Added missed patch.

v3:
- Instead of QAT only API, moved the API to cryptodev.
- Added cryptodev feature flags.

v2:
- Used a structure to simplify parameters.
- Added unit tests.
- Added documentation.

Fan Zhang (4):
  cryptodev: add symmetric crypto data-path APIs
  crypto/qat: add support to direct data-path APIs
  test/crypto: add unit-test for cryptodev direct APIs
  doc: add cryptodev direct APIs guide

 app/test/test_cryptodev.c                     | 353 +++++++++-
 app/test/test_cryptodev.h                     |   6 +
 app/test/test_cryptodev_blockcipher.c         |  50 +-
 doc/guides/prog_guide/cryptodev_lib.rst       | 266 +++++++
 doc/guides/rel_notes/release_20_08.rst        |   8 +
 drivers/common/qat/Makefile                   |   2 +
 drivers/common/qat/qat_qp.c                   |   4 +-
 drivers/common/qat/qat_qp.h                   |   3 +
 drivers/crypto/qat/meson.build                |   1 +
 drivers/crypto/qat/qat_sym.c                  |   1 -
 drivers/crypto/qat/qat_sym_job.c              | 661 ++++++++++++++++++
 drivers/crypto/qat/qat_sym_job.h              |  12 +
 drivers/crypto/qat/qat_sym_pmd.c              |   7 +-
 lib/librte_cryptodev/rte_crypto_sym.h         |  48 ++
 lib/librte_cryptodev/rte_cryptodev.c          |  22 +
 lib/librte_cryptodev/rte_cryptodev.h          | 173 ++++-
 lib/librte_cryptodev/rte_cryptodev_pmd.h      |  12 +-
 .../rte_cryptodev_version.map                 |   4 +
 18 files changed, 1587 insertions(+), 46 deletions(-)
 create mode 100644 drivers/crypto/qat/qat_sym_job.c
 create mode 100644 drivers/crypto/qat/qat_sym_job.h