mbox series

[0/8] cryptodev: hide internal strutures

Message ID 20210829125139.2173235-1-gakhil@marvell.com (mailing list archive)
Headers
Series cryptodev: hide internal strutures |

Message

Akhil Goyal Aug. 29, 2021, 12:51 p.m. UTC
  Structures rte_cryptodev and rte_cryptodev_data are not
supposed to be directly used by the application. These
are made public as they are used by inline datapath
public APIs.
This patchset, creates a new rte_cryptodev_core.h file
which helps in defining a data structure to hold datapath
APIs in a flat array based on the device identifier which
is filled by the PMD.
The patchset updates all crypto PMDs to use the new
framework and hence the internal structs are made hidden.

Similar series for ethdev and eventdev are also floated on ML.
http://patches.dpdk.org/project/dpdk/list/?series=18382
http://patches.dpdk.org/project/dpdk/list/?series=18422


Akhil Goyal (8):
  cryptodev: separate out internal structures
  cryptodev: move inline APIs into separate structure
  cryptodev: add helper functions for new datapath interface
  cryptodev: use new API for datapath functions
  drivers/crypto: use new framework for datapath
  crypto/scheduler: rename enq-deq functions
  crypto/scheduler: update for new datapath framework
  cryptodev: move device specific structures

 drivers/crypto/aesni_gcm/aesni_gcm_pmd.c      |  10 +-
 drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c    |  11 +-
 drivers/crypto/armv8/rte_armv8_pmd.c          |  11 +-
 drivers/crypto/bcmfs/bcmfs_sym_pmd.c          |  11 +-
 drivers/crypto/caam_jr/caam_jr.c              |  11 +-
 drivers/crypto/ccp/ccp_dev.c                  |   1 +
 drivers/crypto/ccp/rte_ccp_pmd.c              |  11 +-
 drivers/crypto/cnxk/cn10k_cryptodev_ops.c     |   8 +-
 drivers/crypto/cnxk/cn10k_cryptodev_ops.h     |   3 +
 drivers/crypto/cnxk/cn10k_ipsec.c             |   1 +
 drivers/crypto/cnxk/cn9k_cryptodev_ops.c      |   9 +-
 drivers/crypto/cnxk/cn9k_cryptodev_ops.h      |   3 +
 .../crypto/cnxk/cnxk_cryptodev_capabilities.c |   1 +
 drivers/crypto/cnxk/cnxk_cryptodev_sec.c      |   1 +
 drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c   |  12 +-
 drivers/crypto/dpaa_sec/dpaa_sec.c            |  11 +-
 drivers/crypto/kasumi/rte_kasumi_pmd.c        |  11 +-
 drivers/crypto/mlx5/mlx5_crypto.c             |  11 +-
 drivers/crypto/mvsam/rte_mrvl_pmd.c           |  11 +-
 drivers/crypto/nitrox/nitrox_sym.c            |  11 +-
 drivers/crypto/nitrox/nitrox_sym_reqmgr.c     |   1 +
 drivers/crypto/null/null_crypto_pmd.c         |  11 +-
 .../crypto/octeontx/otx_cryptodev_hw_access.c |   1 +
 drivers/crypto/octeontx/otx_cryptodev_ops.c   |  16 +-
 drivers/crypto/octeontx/otx_cryptodev_ops.h   |   5 +
 .../crypto/octeontx2/otx2_cryptodev_mbox.c    |   1 +
 drivers/crypto/octeontx2/otx2_cryptodev_ops.c |  11 +-
 drivers/crypto/openssl/rte_openssl_pmd.c      |  11 +-
 drivers/crypto/qat/qat_asym_pmd.c             |  11 +-
 drivers/crypto/qat/qat_sym_pmd.c              |  10 +-
 drivers/crypto/scheduler/scheduler_failover.c |  35 +-
 .../crypto/scheduler/scheduler_multicore.c    |  32 +-
 .../scheduler/scheduler_pkt_size_distr.c      |  34 +-
 .../crypto/scheduler/scheduler_roundrobin.c   |  34 +-
 drivers/crypto/snow3g/rte_snow3g_pmd.c        |  11 +-
 drivers/crypto/virtio/virtio_cryptodev.c      |  10 +-
 drivers/crypto/virtio/virtio_cryptodev.h      |   2 +
 drivers/crypto/virtio/virtio_rxtx.c           |   2 +
 drivers/crypto/zuc/rte_zuc_pmd.c              |  11 +-
 lib/cryptodev/cryptodev_pmd.c                 |  33 ++
 lib/cryptodev/cryptodev_pmd.h                 | 323 +++++++++++++++++-
 lib/cryptodev/meson.build                     |   4 +-
 lib/cryptodev/rte_cryptodev.c                 |  43 ++-
 lib/cryptodev/rte_cryptodev.h                 | 308 +++++------------
 lib/cryptodev/rte_cryptodev_core.h            |  43 +++
 lib/cryptodev/version.map                     |   8 +
 46 files changed, 854 insertions(+), 316 deletions(-)
 create mode 100644 lib/cryptodev/rte_cryptodev_core.h
  

Comments

Akhil Goyal Sept. 6, 2021, 6:29 p.m. UTC | #1
Hi All,

Please review this series as soon as possible.
Would like to merge this series as early as possible so that we have
Lesser conflicts for other series.

Thanks and Regards,
Akhil

> -----Original Message-----
> From: Akhil Goyal <gakhil@marvell.com>
> Sent: Sunday, August 29, 2021 6:22 PM
> To: dev@dpdk.org
> Cc: Anoob Joseph <anoobj@marvell.com>; radu.nicolau@intel.com;
> declan.doherty@intel.com; hemant.agrawal@nxp.com; matan@nvidia.com;
> konstantin.ananyev@intel.com; thomas@monjalon.net;
> roy.fan.zhang@intel.com; asomalap@amd.com; ruifeng.wang@arm.com;
> ajit.khaparde@broadcom.com; pablo.de.lara.guarch@intel.com;
> fiona.trahe@intel.com; Ankur Dwivedi <adwivedi@marvell.com>; Michael
> Shamis <michaelsh@marvell.com>; Nagadheeraj Rottela
> <rnagadheeraj@marvell.com>; jianjay.zhou@huawei.com; Jerin Jacob
> Kollanukkaran <jerinj@marvell.com>; Akhil Goyal <gakhil@marvell.com>
> Subject: [PATCH 0/8] cryptodev: hide internal strutures
> 
> Structures rte_cryptodev and rte_cryptodev_data are not
> supposed to be directly used by the application. These
> are made public as they are used by inline datapath
> public APIs.
> This patchset, creates a new rte_cryptodev_core.h file
> which helps in defining a data structure to hold datapath
> APIs in a flat array based on the device identifier which
> is filled by the PMD.
> The patchset updates all crypto PMDs to use the new
> framework and hence the internal structs are made hidden.
> 
> Similar series for ethdev and eventdev are also floated on ML.
> http://patches.dpdk.org/project/dpdk/list/?series=18382
> http://patches.dpdk.org/project/dpdk/list/?series=18422
> 
> 
> Akhil Goyal (8):
>   cryptodev: separate out internal structures
>   cryptodev: move inline APIs into separate structure
>   cryptodev: add helper functions for new datapath interface
>   cryptodev: use new API for datapath functions
>   drivers/crypto: use new framework for datapath
>   crypto/scheduler: rename enq-deq functions
>   crypto/scheduler: update for new datapath framework
>   cryptodev: move device specific structures
> 
>  drivers/crypto/aesni_gcm/aesni_gcm_pmd.c      |  10 +-
>  drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c    |  11 +-
>  drivers/crypto/armv8/rte_armv8_pmd.c          |  11 +-
>  drivers/crypto/bcmfs/bcmfs_sym_pmd.c          |  11 +-
>  drivers/crypto/caam_jr/caam_jr.c              |  11 +-
>  drivers/crypto/ccp/ccp_dev.c                  |   1 +
>  drivers/crypto/ccp/rte_ccp_pmd.c              |  11 +-
>  drivers/crypto/cnxk/cn10k_cryptodev_ops.c     |   8 +-
>  drivers/crypto/cnxk/cn10k_cryptodev_ops.h     |   3 +
>  drivers/crypto/cnxk/cn10k_ipsec.c             |   1 +
>  drivers/crypto/cnxk/cn9k_cryptodev_ops.c      |   9 +-
>  drivers/crypto/cnxk/cn9k_cryptodev_ops.h      |   3 +
>  .../crypto/cnxk/cnxk_cryptodev_capabilities.c |   1 +
>  drivers/crypto/cnxk/cnxk_cryptodev_sec.c      |   1 +
>  drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c   |  12 +-
>  drivers/crypto/dpaa_sec/dpaa_sec.c            |  11 +-
>  drivers/crypto/kasumi/rte_kasumi_pmd.c        |  11 +-
>  drivers/crypto/mlx5/mlx5_crypto.c             |  11 +-
>  drivers/crypto/mvsam/rte_mrvl_pmd.c           |  11 +-
>  drivers/crypto/nitrox/nitrox_sym.c            |  11 +-
>  drivers/crypto/nitrox/nitrox_sym_reqmgr.c     |   1 +
>  drivers/crypto/null/null_crypto_pmd.c         |  11 +-
>  .../crypto/octeontx/otx_cryptodev_hw_access.c |   1 +
>  drivers/crypto/octeontx/otx_cryptodev_ops.c   |  16 +-
>  drivers/crypto/octeontx/otx_cryptodev_ops.h   |   5 +
>  .../crypto/octeontx2/otx2_cryptodev_mbox.c    |   1 +
>  drivers/crypto/octeontx2/otx2_cryptodev_ops.c |  11 +-
>  drivers/crypto/openssl/rte_openssl_pmd.c      |  11 +-
>  drivers/crypto/qat/qat_asym_pmd.c             |  11 +-
>  drivers/crypto/qat/qat_sym_pmd.c              |  10 +-
>  drivers/crypto/scheduler/scheduler_failover.c |  35 +-
>  .../crypto/scheduler/scheduler_multicore.c    |  32 +-
>  .../scheduler/scheduler_pkt_size_distr.c      |  34 +-
>  .../crypto/scheduler/scheduler_roundrobin.c   |  34 +-
>  drivers/crypto/snow3g/rte_snow3g_pmd.c        |  11 +-
>  drivers/crypto/virtio/virtio_cryptodev.c      |  10 +-
>  drivers/crypto/virtio/virtio_cryptodev.h      |   2 +
>  drivers/crypto/virtio/virtio_rxtx.c           |   2 +
>  drivers/crypto/zuc/rte_zuc_pmd.c              |  11 +-
>  lib/cryptodev/cryptodev_pmd.c                 |  33 ++
>  lib/cryptodev/cryptodev_pmd.h                 | 323 +++++++++++++++++-
>  lib/cryptodev/meson.build                     |   4 +-
>  lib/cryptodev/rte_cryptodev.c                 |  43 ++-
>  lib/cryptodev/rte_cryptodev.h                 | 308 +++++------------
>  lib/cryptodev/rte_cryptodev_core.h            |  43 +++
>  lib/cryptodev/version.map                     |   8 +
>  46 files changed, 854 insertions(+), 316 deletions(-)
>  create mode 100644 lib/cryptodev/rte_cryptodev_core.h
> 
> --
> 2.25.1
  
Fan Zhang Sept. 13, 2021, 2:09 p.m. UTC | #2
> -----Original Message-----
> From: Akhil Goyal <gakhil@marvell.com>
> Sent: Sunday, August 29, 2021 1:52 PM
> To: dev@dpdk.org
> Cc: anoobj@marvell.com; Nicolau, Radu <radu.nicolau@intel.com>; Doherty,
> Declan <declan.doherty@intel.com>; hemant.agrawal@nxp.com;
> matan@nvidia.com; Ananyev, Konstantin <konstantin.ananyev@intel.com>;
> thomas@monjalon.net; Zhang, Roy Fan <roy.fan.zhang@intel.com>;
> asomalap@amd.com; ruifeng.wang@arm.com;
> ajit.khaparde@broadcom.com; De Lara Guarch, Pablo
> <pablo.de.lara.guarch@intel.com>; Trahe, Fiona <fiona.trahe@intel.com>;
> adwivedi@marvell.com; michaelsh@marvell.com;
> rnagadheeraj@marvell.com; jianjay.zhou@huawei.com; jerinj@marvell.com;
> Akhil Goyal <gakhil@marvell.com>
> Subject: [PATCH 0/8] cryptodev: hide internal strutures
> 
> Structures rte_cryptodev and rte_cryptodev_data are not
> supposed to be directly used by the application. These
> are made public as they are used by inline datapath
> public APIs.
> This patchset, creates a new rte_cryptodev_core.h file
> which helps in defining a data structure to hold datapath
> APIs in a flat array based on the device identifier which
> is filled by the PMD.
> The patchset updates all crypto PMDs to use the new
> framework and hence the internal structs are made hidden.
> 
> Similar series for ethdev and eventdev are also floated on ML.
> http://patches.dpdk.org/project/dpdk/list/?series=18382
> http://patches.dpdk.org/project/dpdk/list/?series=18422
> 
> 
> Akhil Goyal (8):
>   cryptodev: separate out internal structures
>   cryptodev: move inline APIs into separate structure
>   cryptodev: add helper functions for new datapath interface
>   cryptodev: use new API for datapath functions
>   drivers/crypto: use new framework for datapath
>   crypto/scheduler: rename enq-deq functions
>   crypto/scheduler: update for new datapath framework
>   cryptodev: move device specific structures
> 
>  drivers/crypto/aesni_gcm/aesni_gcm_pmd.c      |  10 +-
>  drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c    |  11 +-
>  drivers/crypto/armv8/rte_armv8_pmd.c          |  11 +-
>  drivers/crypto/bcmfs/bcmfs_sym_pmd.c          |  11 +-
>  drivers/crypto/caam_jr/caam_jr.c              |  11 +-
>  drivers/crypto/ccp/ccp_dev.c                  |   1 +
>  drivers/crypto/ccp/rte_ccp_pmd.c              |  11 +-
>  drivers/crypto/cnxk/cn10k_cryptodev_ops.c     |   8 +-
>  drivers/crypto/cnxk/cn10k_cryptodev_ops.h     |   3 +
>  drivers/crypto/cnxk/cn10k_ipsec.c             |   1 +
>  drivers/crypto/cnxk/cn9k_cryptodev_ops.c      |   9 +-
>  drivers/crypto/cnxk/cn9k_cryptodev_ops.h      |   3 +
>  .../crypto/cnxk/cnxk_cryptodev_capabilities.c |   1 +
>  drivers/crypto/cnxk/cnxk_cryptodev_sec.c      |   1 +
>  drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c   |  12 +-
>  drivers/crypto/dpaa_sec/dpaa_sec.c            |  11 +-
>  drivers/crypto/kasumi/rte_kasumi_pmd.c        |  11 +-
>  drivers/crypto/mlx5/mlx5_crypto.c             |  11 +-
>  drivers/crypto/mvsam/rte_mrvl_pmd.c           |  11 +-
>  drivers/crypto/nitrox/nitrox_sym.c            |  11 +-
>  drivers/crypto/nitrox/nitrox_sym_reqmgr.c     |   1 +
>  drivers/crypto/null/null_crypto_pmd.c         |  11 +-
>  .../crypto/octeontx/otx_cryptodev_hw_access.c |   1 +
>  drivers/crypto/octeontx/otx_cryptodev_ops.c   |  16 +-
>  drivers/crypto/octeontx/otx_cryptodev_ops.h   |   5 +
>  .../crypto/octeontx2/otx2_cryptodev_mbox.c    |   1 +
>  drivers/crypto/octeontx2/otx2_cryptodev_ops.c |  11 +-
>  drivers/crypto/openssl/rte_openssl_pmd.c      |  11 +-
>  drivers/crypto/qat/qat_asym_pmd.c             |  11 +-
>  drivers/crypto/qat/qat_sym_pmd.c              |  10 +-
>  drivers/crypto/scheduler/scheduler_failover.c |  35 +-
>  .../crypto/scheduler/scheduler_multicore.c    |  32 +-
>  .../scheduler/scheduler_pkt_size_distr.c      |  34 +-
>  .../crypto/scheduler/scheduler_roundrobin.c   |  34 +-
>  drivers/crypto/snow3g/rte_snow3g_pmd.c        |  11 +-
>  drivers/crypto/virtio/virtio_cryptodev.c      |  10 +-
>  drivers/crypto/virtio/virtio_cryptodev.h      |   2 +
>  drivers/crypto/virtio/virtio_rxtx.c           |   2 +
>  drivers/crypto/zuc/rte_zuc_pmd.c              |  11 +-
>  lib/cryptodev/cryptodev_pmd.c                 |  33 ++
>  lib/cryptodev/cryptodev_pmd.h                 | 323 +++++++++++++++++-
>  lib/cryptodev/meson.build                     |   4 +-
>  lib/cryptodev/rte_cryptodev.c                 |  43 ++-
>  lib/cryptodev/rte_cryptodev.h                 | 308 +++++------------
>  lib/cryptodev/rte_cryptodev_core.h            |  43 +++
>  lib/cryptodev/version.map                     |   8 +
>  46 files changed, 854 insertions(+), 316 deletions(-)
>  create mode 100644 lib/cryptodev/rte_cryptodev_core.h
> 
> --
> 2.25.1

Series-tested-by: Rebecca Troy <rebecca.troy@intel.com>
Series-acked-by: Fan Zhang <roy.fan.zhang@intel.com>