DPDK patches and discussions
 help / color / mirror / Atom feed
From: Declan Doherty <declan.doherty@intel.com>
To: Pablo de Lara <pablo.de.lara.guarch@intel.com>,
	zbigniew.bodek@caviumnetworks.com,
	jerin.jacob@caviumnetworks.com, akhil.goyal@nxp.com,
	hemant.agrawal@nxp.com, fiona.trahe@intel.com,
	john.griffin@intel.com, deepak.k.jain@intel.com
Cc: dev@dpdk.org
Subject: Re: [dpdk-dev] [PATCH v4 00/12] Device independent crypto sessions
Date: Wed, 5 Jul 2017 16:21:47 +0100	[thread overview]
Message-ID: <791ee2d6-2a22-3e7e-0643-748860b18442@intel.com> (raw)
In-Reply-To: <20170705052620.34223-1-pablo.de.lara.guarch@intel.com>

On 05/07/2017 6:26 AM, Pablo de Lara wrote:
> Currently, the cryptodev library requires the session mempools to be created inside each device.
> This can be a waste of memory, as several devices with the same driver could be using the same session.
>
> This patchset makes changes in the library to allow session to contain multiple driver private data, so it can be used by multiple devices (no need to be the same driver).
>
>                                   SESSION MEMPOOL <---|---> DEVICE INSTANCES
>                                  --------------------------------------------
>
> .-------------.      .----------------------------.
> |   Crypto    |.     |         mempool obj        |
> | sym-session |<--.  | .--------------------------+
> |   mempool   ||  |  | | rte_cryptodev_session    |             .-------------.
> `-------------'|  |  | |                          |             |   DEVICE    |
>  `-----|-------'  |  | |                          |             |  INSTANCE   |
>        |          `-----                          |             | - device id |
>        +------------>| | - private data[type idx] |          .--| - session   |
>        |             `-+=================|..|====='          |  |   mempool   |
>        |                                 |  |                |  `-------------'
>        |                                 |  |                |
>        |     .----------------------.    |  |                |  .-------------.
>        +---->|      mempool obj     |    |  |   .--------.   |  |   DEVICE    |
>        |     | .--------------------+    |  |   | DRIVER |   |  |  INSTANCE   |
>        |     | | PMD's private data |<---+------| - type |<--+--|             |
>        |     +-+====================+       |   `--------'      |     ...     |
>        |                                    |                   |             |
>        |                                    |                   `-------------'
>        |                                    |
>        |     .----------------------.       |                   .-------------.
>        `---->|      mempool obj     |       |   .--------.      |   DEVICE    |
>              | .--------------------+       |   | DRIVER |      |  INSTANCE   |
>              | | PMD's private data |<------+---| - type |<-----|             |
>              `-+===================='           `--------'      |     ...     |
>                                                                 |             |
>                                                                 `-------------'
> Crypto sym-session mempool
>
>    Mempool created to store rte_cryptodev_session objects as well as
>    private data for supported device types.
>
>    This mempool replaces existing session mempools in device
>    instances to ease session management and improve consistency
>    (especially if the session is intended to be used for operations
>    performed on different devices).
>
> rte_crypto_session
>
>    New rte_cryptodev_session structure is taken from crypto session
>    mempool and can store more than one PMD's private data object (one
>    for each device type supported by sesion).
>
>    Crypto operations will use device type id (unique for each driver) to
>    retrieve private data from rte_crypto_session right for the device
>    type they are performed on.
>
> This patchset was based on the changes proposed in RFC
> (http://dpdk.org/ml/archives/dev/2017-May/065259.html)
>
> This patchset depends on:
> http://dpdk.org/dev/patchwork/patch/26156/
>
> Changes in v4:
>
> - Introduced new rte_cryptodev_sym_session_clear() function,
>   which frees device private session data.
>   This needs to be called before calling rte_cryptodev_sym_session_free().
>
> - Rebased on top of dpdk-next-crypto
>
> Changes in v3:
>
> - Removed internal PMD's session initialize function
>
> - Created session mempool in the right socket in
>   the sample apps
>
> - Get two objects (header and private data) from mempool
>   when using sessionless operations, to get a complete
>   session
>
> - Fixed commit message (check-git-log failed)
>
> - Added note of removed session_mp from rte_cryptodev_config
>   in documentation
>
> - Fixed minor issues in documentation
>
>
> Changes in v2:
>
> - Split the patch in multiple smaller patches to
>   facilitate the review
>
> - Removed new API to create the session mempool,
>   since mempool can be created directly withe mempool_create
>
> - Session headers and device private sessions can be
>   allocated from different mempools, for better memory
>   efficiency.
>
> - Added a cover letter (partially extracted from RFC)
>   for better clarification on the intention of this patchset
>
> Pablo de Lara (5):
>   cryptodev: remove unused cryptodev session structure
>   cryptodev: move session init out of session pool creation
>   cryptodev: add mempool pointer in queue pair setup
>   cryptodev: remove session init internal function
>   doc: add new crypto session information
>
> Slawomir Mrozowicz (7):
>   cryptodev: add private session size retrieval function
>   cryptodev: do not create session mempool internally
>   cryptodev: change attach session to queue pair API
>   cryptodev: remove device id from crypto session
>   cryptodev: remove driver id from session
>   cryptodev: remove mempool from session
>   cryptodev: support device independent sessions
>
>  app/test-crypto-perf/cperf.h                       |   5 +-
>  app/test-crypto-perf/cperf_ops.c                   |  21 +-
>  app/test-crypto-perf/cperf_ops.h                   |   1 +
>  app/test-crypto-perf/cperf_test_latency.c          |  12 +-
>  app/test-crypto-perf/cperf_test_latency.h          |   5 +-
>  app/test-crypto-perf/cperf_test_throughput.c       |  12 +-
>  app/test-crypto-perf/cperf_test_throughput.h       |   5 +-
>  app/test-crypto-perf/cperf_test_verify.c           |  12 +-
>  app/test-crypto-perf/cperf_test_verify.h           |   5 +-
>  app/test-crypto-perf/main.c                        |  85 ++++-
>  doc/guides/prog_guide/cryptodev_lib.rst            |  61 ++-
>  doc/guides/prog_guide/img/cryptodev_sym_sess.svg   | 418 ++++++++++++++++++---
>  doc/guides/rel_notes/release_17_08.rst             |  19 +
>  drivers/crypto/aesni_gcm/aesni_gcm_pmd.c           |  51 ++-
>  drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c       |  49 ++-
>  drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c         |  43 ++-
>  drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops.c     |  50 ++-
>  drivers/crypto/armv8/rte_armv8_pmd.c               |  39 +-
>  drivers/crypto/armv8/rte_armv8_pmd_ops.c           |  49 ++-
>  drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c        |  66 +++-
>  drivers/crypto/kasumi/rte_kasumi_pmd.c             |  42 ++-
>  drivers/crypto/kasumi/rte_kasumi_pmd_ops.c         |  51 ++-
>  drivers/crypto/null/null_crypto_pmd.c              |  43 ++-
>  drivers/crypto/null/null_crypto_pmd_ops.c          |  51 ++-
>  drivers/crypto/openssl/rte_openssl_pmd.c           |  41 +-
>  drivers/crypto/openssl/rte_openssl_pmd_ops.c       |  52 ++-
>  drivers/crypto/qat/qat_crypto.c                    |  93 +++--
>  drivers/crypto/qat/qat_crypto.h                    |  19 +-
>  drivers/crypto/qat/qat_qp.c                        |   2 +-
>  drivers/crypto/qat/rte_qat_cryptodev.c             |   1 -
>  drivers/crypto/scheduler/scheduler_failover.c      |  45 +--
>  .../crypto/scheduler/scheduler_pkt_size_distr.c    |  18 -
>  drivers/crypto/scheduler/scheduler_pmd_ops.c       |  78 ++--
>  drivers/crypto/scheduler/scheduler_pmd_private.h   |   4 -
>  drivers/crypto/scheduler/scheduler_roundrobin.c    |  41 --
>  drivers/crypto/snow3g/rte_snow3g_pmd.c             |  43 ++-
>  drivers/crypto/snow3g/rte_snow3g_pmd_ops.c         |  51 ++-
>  drivers/crypto/zuc/rte_zuc_pmd.c                   |  39 +-
>  drivers/crypto/zuc/rte_zuc_pmd_ops.c               |  51 ++-
>  examples/ipsec-secgw/ipsec-secgw.c                 |  41 +-
>  examples/ipsec-secgw/ipsec.c                       |   8 +-
>  examples/ipsec-secgw/ipsec.h                       |   3 +-
>  examples/l2fwd-crypto/main.c                       |  77 +++-
>  lib/librte_cryptodev/rte_cryptodev.c               | 252 ++++++-------
>  lib/librte_cryptodev/rte_cryptodev.h               | 122 +++---
>  lib/librte_cryptodev/rte_cryptodev_pmd.h           |  60 ++-
>  lib/librte_cryptodev/rte_cryptodev_version.map     |   4 +
>  test/test/test_cryptodev.c                         | 388 ++++++++++++++-----
>  test/test/test_cryptodev_blockcipher.c             |  18 +-
>  test/test/test_cryptodev_blockcipher.h             |   1 +
>  test/test/test_cryptodev_perf.c                    | 216 ++++++++---
>  51 files changed, 2008 insertions(+), 955 deletions(-)
>

Series Acked-by: Declan Doherty <declan.doherty@intel.com>

  parent reply	other threads:[~2017-07-05 15:21 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-26 18:45 [dpdk-dev] [PATCH] cryptodev: make crypto session device independent Michal Jastrzebski
2017-06-30 17:09 ` [dpdk-dev] [PATCH v2 00/11] Device independent crypto sessions Pablo de Lara
2017-06-30 17:09   ` [dpdk-dev] [PATCH v2 01/11] cryptodev: remove unused cryptodev session structure Pablo de Lara
2017-06-30 17:09   ` [dpdk-dev] [PATCH v2 02/11] cryptodev: move session init out of session pool creation Pablo de Lara
2017-06-30 17:09   ` [dpdk-dev] [PATCH v2 03/11] cryptodev: add private session size retrieval function Pablo de Lara
2017-06-30 17:09   ` [dpdk-dev] [PATCH v2 04/11] cryptodev: do not create session mempool internally Pablo de Lara
2017-06-30 17:09   ` [dpdk-dev] [PATCH v2 05/11] cryptodev: change attach session to queue pair API Pablo de Lara
2017-06-30 17:09   ` [dpdk-dev] [PATCH v2 06/11] cryptodev: remove dev_id from crypto session Pablo de Lara
2017-06-30 17:09   ` [dpdk-dev] [PATCH v2 07/11] cryptodev: remove driver id from session Pablo de Lara
2017-06-30 17:09   ` [dpdk-dev] [PATCH v2 08/11] cryptodev: remove mempool " Pablo de Lara
2017-06-30 17:09   ` [dpdk-dev] [PATCH v2 09/11] cryptodev: support device independent sessions Pablo de Lara
2017-06-30 17:09   ` [dpdk-dev] [PATCH v2 10/11] cryptodev: add mempool pointer in queue pair setup Pablo de Lara
2017-06-30 17:09   ` [dpdk-dev] [PATCH v2 11/11] doc: add new crypto session information Pablo de Lara
2017-07-02 20:15     ` Mcnamara, John
2017-07-02 15:57   ` [dpdk-dev] [PATCH v3 00/12] Device independent crypto sessions Pablo de Lara
2017-07-02 15:57     ` [dpdk-dev] [PATCH v3 01/12] cryptodev: remove unused cryptodev session structure Pablo de Lara
2017-07-02 15:57     ` [dpdk-dev] [PATCH v3 02/12] cryptodev: move session init out of session pool creation Pablo de Lara
2017-07-02 15:57     ` [dpdk-dev] [PATCH v3 03/12] cryptodev: add private session size retrieval function Pablo de Lara
2017-07-02 15:57     ` [dpdk-dev] [PATCH v3 04/12] cryptodev: do not create session mempool internally Pablo de Lara
2017-07-02 15:57     ` [dpdk-dev] [PATCH v3 05/12] cryptodev: change attach session to queue pair API Pablo de Lara
2017-07-02 15:57     ` [dpdk-dev] [PATCH v3 06/12] cryptodev: remove device id from crypto session Pablo de Lara
2017-07-02 15:57     ` [dpdk-dev] [PATCH v3 07/12] cryptodev: remove driver id from session Pablo de Lara
2017-07-02 15:57     ` [dpdk-dev] [PATCH v3 08/12] cryptodev: remove mempool " Pablo de Lara
2017-07-02 15:57     ` [dpdk-dev] [PATCH v3 09/12] cryptodev: support device independent sessions Pablo de Lara
2017-07-02 15:57     ` [dpdk-dev] [PATCH v3 10/12] cryptodev: add mempool pointer in queue pair setup Pablo de Lara
2017-07-02 15:57     ` [dpdk-dev] [PATCH v3 11/12] cryptodev: remove session init internal function Pablo de Lara
2017-07-02 15:57     ` [dpdk-dev] [PATCH v3 12/12] doc: add new crypto session information Pablo de Lara
2017-07-03 11:18       ` Mcnamara, John
2017-07-05  5:26     ` [dpdk-dev] [PATCH v4 00/12] Device independent crypto sessions Pablo de Lara
2017-07-05  5:26       ` [dpdk-dev] [PATCH v4 01/12] cryptodev: remove unused cryptodev session structure Pablo de Lara
2017-07-05  5:26       ` [dpdk-dev] [PATCH v4 02/12] cryptodev: move session init out of session pool creation Pablo de Lara
2017-07-05  5:26       ` [dpdk-dev] [PATCH v4 03/12] cryptodev: add private session size retrieval function Pablo de Lara
2017-07-05  5:26       ` [dpdk-dev] [PATCH v4 04/12] cryptodev: do not create session mempool internally Pablo de Lara
2017-07-05  5:26       ` [dpdk-dev] [PATCH v4 05/12] cryptodev: change attach session to queue pair API Pablo de Lara
2017-07-05  5:26       ` [dpdk-dev] [PATCH v4 06/12] cryptodev: remove device id from crypto session Pablo de Lara
2017-07-05  5:26       ` [dpdk-dev] [PATCH v4 07/12] cryptodev: remove driver id from session Pablo de Lara
2017-07-05  5:26       ` [dpdk-dev] [PATCH v4 08/12] cryptodev: remove mempool " Pablo de Lara
2017-07-05  5:26       ` [dpdk-dev] [PATCH v4 09/12] cryptodev: support device independent sessions Pablo de Lara
2017-07-05  5:26       ` [dpdk-dev] [PATCH v4 10/12] cryptodev: add mempool pointer in queue pair setup Pablo de Lara
2017-07-05  5:26       ` [dpdk-dev] [PATCH v4 11/12] cryptodev: remove session init internal function Pablo de Lara
2017-07-05  5:26       ` [dpdk-dev] [PATCH v4 12/12] doc: add new crypto session information Pablo de Lara
2017-07-05 15:21       ` Declan Doherty [this message]
2017-07-05 16:26       ` [dpdk-dev] [PATCH v4 00/12] Device independent crypto sessions Akhil Goyal
2017-07-06 11:05       ` De Lara Guarch, Pablo

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=791ee2d6-2a22-3e7e-0643-748860b18442@intel.com \
    --to=declan.doherty@intel.com \
    --cc=akhil.goyal@nxp.com \
    --cc=deepak.k.jain@intel.com \
    --cc=dev@dpdk.org \
    --cc=fiona.trahe@intel.com \
    --cc=hemant.agrawal@nxp.com \
    --cc=jerin.jacob@caviumnetworks.com \
    --cc=john.griffin@intel.com \
    --cc=pablo.de.lara.guarch@intel.com \
    --cc=zbigniew.bodek@caviumnetworks.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).