[v2,0/3] Use Intel IPSec MB library in Wireless PMDs
mbox series

Message ID 1578915625-237451-1-git-send-email-pablo.de.lara.guarch@intel.com
Headers show
Series
  • Use Intel IPSec MB library in Wireless PMDs
Related show

Message

Pablo de Lara Jan. 13, 2020, 11:40 a.m. UTC
The three Intel SW Crypto PMDs supporting SNOW3G, ZUC and KASUMI link against libSSO libraries.
The Intel IPSec Multi-buffer library recently integrated the code from these libraries, in version v0.53.
This library can be downloaded from https://github.com/intel/intel-ipsec-mb.

KASUMI, SNOW3G and ZUC PMDs have been modified to use this single library,
which is already used in the AESNI MB and AESNI GCM PMDs,
reducing the number of external dependencies in the crypto PMDs.

Changes in v2:
- Updated ZUC PMD to support future AVX512 and AVX2 implementations.

Pablo de Lara (3):
  crypto/zuc: use IPSec library
  crypto/kasumi: use IPSec library
  crypto/snow3g: use IPSec library

 devtools/test-build.sh                     | 16 ++----
 doc/guides/cryptodevs/kasumi.rst           | 62 ++++++++++++----------
 doc/guides/cryptodevs/snow3g.rst           | 58 +++++++++++---------
 doc/guides/cryptodevs/zuc.rst              | 52 ++++++++++--------
 doc/guides/rel_notes/release_20_02.rst     | 17 ++++++
 drivers/crypto/kasumi/Makefile             | 26 +++++----
 drivers/crypto/kasumi/kasumi_pmd_private.h | 12 +++--
 drivers/crypto/kasumi/meson.build          | 24 ++++++---
 drivers/crypto/kasumi/rte_kasumi_pmd.c     | 79 +++++++++++++++------------
 drivers/crypto/kasumi/rte_kasumi_pmd_ops.c |  8 ++-
 drivers/crypto/snow3g/Makefile             | 29 ++++++----
 drivers/crypto/snow3g/meson.build          | 21 ++++++--
 drivers/crypto/snow3g/rte_snow3g_pmd.c     | 85 ++++++++++++++++++------------
 drivers/crypto/snow3g/rte_snow3g_pmd_ops.c |  8 ++-
 drivers/crypto/snow3g/snow3g_pmd_private.h | 14 +++--
 drivers/crypto/zuc/Makefile                | 28 ++++++----
 drivers/crypto/zuc/meson.build             | 24 ++++++---
 drivers/crypto/zuc/rte_zuc_pmd.c           | 51 +++++++++++++-----
 drivers/crypto/zuc/rte_zuc_pmd_ops.c       |  2 +
 drivers/crypto/zuc/zuc_pmd_private.h       |  6 ++-
 mk/rte.app.mk                              |  6 +--
 21 files changed, 395 insertions(+), 233 deletions(-)

Comments

Ali Alnubani Jan. 13, 2020, 2:17 p.m. UTC | #1
Hi,

> -----Original Message-----
> From: dev <dev-bounces@dpdk.org> On Behalf Of Pablo de Lara
> Sent: Monday, January 13, 2020 1:40 PM
> To: akhil.goyal@nxp.com; declan.doherty@intel.com
> Cc: dev@dpdk.org; Pablo de Lara <pablo.de.lara.guarch@intel.com>
> Subject: [dpdk-dev] [PATCH v2 0/3] Use Intel IPSec MB library in Wireless
> PMDs
> 
> The three Intel SW Crypto PMDs supporting SNOW3G, ZUC and KASUMI link
> against libSSO libraries.
> The Intel IPSec Multi-buffer library recently integrated the code from these
> libraries, in version v0.53.
> This library can be downloaded from
<removed>
> 
> KASUMI, SNOW3G and ZUC PMDs have been modified to use this single
> library, which is already used in the AESNI MB and AESNI GCM PMDs,
> reducing the number of external dependencies in the crypto PMDs.
> 
> Changes in v2:
> - Updated ZUC PMD to support future AVX512 and AVX2 implementations.
> 
> Pablo de Lara (3):
>   crypto/zuc: use IPSec library
>   crypto/kasumi: use IPSec library
>   crypto/snow3g: use IPSec library
> 
>  devtools/test-build.sh                     | 16 ++----
>  doc/guides/cryptodevs/kasumi.rst           | 62 ++++++++++++----------
>  doc/guides/cryptodevs/snow3g.rst           | 58 +++++++++++---------
>  doc/guides/cryptodevs/zuc.rst              | 52 ++++++++++--------
>  doc/guides/rel_notes/release_20_02.rst     | 17 ++++++
>  drivers/crypto/kasumi/Makefile             | 26 +++++----
>  drivers/crypto/kasumi/kasumi_pmd_private.h | 12 +++--
>  drivers/crypto/kasumi/meson.build          | 24 ++++++---
>  drivers/crypto/kasumi/rte_kasumi_pmd.c     | 79 +++++++++++++++---------
> ---
>  drivers/crypto/kasumi/rte_kasumi_pmd_ops.c |  8 ++-
>  drivers/crypto/snow3g/Makefile             | 29 ++++++----
>  drivers/crypto/snow3g/meson.build          | 21 ++++++--
>  drivers/crypto/snow3g/rte_snow3g_pmd.c     | 85 ++++++++++++++++++---
> ---------
>  drivers/crypto/snow3g/rte_snow3g_pmd_ops.c |  8 ++-
> drivers/crypto/snow3g/snow3g_pmd_private.h | 14 +++--
>  drivers/crypto/zuc/Makefile                | 28 ++++++----
>  drivers/crypto/zuc/meson.build             | 24 ++++++---
>  drivers/crypto/zuc/rte_zuc_pmd.c           | 51 +++++++++++++-----
>  drivers/crypto/zuc/rte_zuc_pmd_ops.c       |  2 +
>  drivers/crypto/zuc/zuc_pmd_private.h       |  6 ++-
>  mk/rte.app.mk                              |  6 +--
>  21 files changed, 395 insertions(+), 233 deletions(-)
> 
> --
> 2.7.5

I see the following build failure when applying the patchset:
"""
../../root/dpdk/drivers/crypto/zuc/rte_zuc_pmd.c:225:51: error: cast from 'uint8_t **' (aka 'unsigned char **') to 'const void **' must have all intermediate pointers const qualified to be safe [-Werror,-Wcast-qual]
        IMB_ZUC_EEA3_N_BUFFER(qp->mb_mgr, (const void **)cipher_keys,
                                                         ^
../../root/dpdk/drivers/crypto/zuc/rte_zuc_pmd.c:226:19: error: cast from 'uint8_t **' (aka 'unsigned char **') to 'const void **' must have all intermediate pointers const qualified to be safe [-Werror,-Wcast-qual]
                        (const void **)iv, (const void **)src, (void **)dst,
                                       ^
../../root/dpdk/drivers/crypto/zuc/rte_zuc_pmd.c:226:38: error: cast from 'uint8_t **' (aka 'unsigned char **') to 'const void **' must have all intermediate pointers const qualified to be safe [-Werror,-Wcast-qual]
                        (const void **)iv, (const void **)src, (void **)dst,
                                                          ^
3 errors generated.
"""

It reproduces with meson on Fedora 31 and clang (version 9.0.0).
I'm using intel-ipsec-mb version 0.53.

Regards,
Ali
Pablo de Lara Jan. 16, 2020, 8:36 a.m. UTC | #2
Hi,

> -----Original Message-----
> From: Ali Alnubani <alialnu@mellanox.com>
> Sent: Monday, January 13, 2020 2:18 PM
> To: De Lara Guarch, Pablo <pablo.de.lara.guarch@intel.com>;
> akhil.goyal@nxp.com; Doherty, Declan <declan.doherty@intel.com>
> Cc: dev@dpdk.org
> Subject: RE: [dpdk-dev] [PATCH v2 0/3] Use Intel IPSec MB library in Wireless
> PMDs
> 
> Hi,
> 
> > -----Original Message-----
> > From: dev <dev-bounces@dpdk.org> On Behalf Of Pablo de Lara
> > Sent: Monday, January 13, 2020 1:40 PM
> > To: akhil.goyal@nxp.com; declan.doherty@intel.com
> > Cc: dev@dpdk.org; Pablo de Lara <pablo.de.lara.guarch@intel.com>
> > Subject: [dpdk-dev] [PATCH v2 0/3] Use Intel IPSec MB library in
> > Wireless PMDs
> >
> > The three Intel SW Crypto PMDs supporting SNOW3G, ZUC and KASUMI link
> > against libSSO libraries.
> > The Intel IPSec Multi-buffer library recently integrated the code from
> > these libraries, in version v0.53.
> > This library can be downloaded from
> <removed>
> >
> > KASUMI, SNOW3G and ZUC PMDs have been modified to use this single
> > library, which is already used in the AESNI MB and AESNI GCM PMDs,
> > reducing the number of external dependencies in the crypto PMDs.
> >
> > Changes in v2:
> > - Updated ZUC PMD to support future AVX512 and AVX2 implementations.
> >
> > Pablo de Lara (3):
> >   crypto/zuc: use IPSec library
> >   crypto/kasumi: use IPSec library
> >   crypto/snow3g: use IPSec library
> >
> >  devtools/test-build.sh                     | 16 ++----
> >  doc/guides/cryptodevs/kasumi.rst           | 62 ++++++++++++----------
> >  doc/guides/cryptodevs/snow3g.rst           | 58 +++++++++++---------
> >  doc/guides/cryptodevs/zuc.rst              | 52 ++++++++++--------
> >  doc/guides/rel_notes/release_20_02.rst     | 17 ++++++
> >  drivers/crypto/kasumi/Makefile             | 26 +++++----
> >  drivers/crypto/kasumi/kasumi_pmd_private.h | 12 +++--
> >  drivers/crypto/kasumi/meson.build          | 24 ++++++---
> >  drivers/crypto/kasumi/rte_kasumi_pmd.c     | 79 +++++++++++++++---------
> > ---
> >  drivers/crypto/kasumi/rte_kasumi_pmd_ops.c |  8 ++-
> >  drivers/crypto/snow3g/Makefile             | 29 ++++++----
> >  drivers/crypto/snow3g/meson.build          | 21 ++++++--
> >  drivers/crypto/snow3g/rte_snow3g_pmd.c     | 85 ++++++++++++++++++---
> > ---------
> >  drivers/crypto/snow3g/rte_snow3g_pmd_ops.c |  8 ++-
> > drivers/crypto/snow3g/snow3g_pmd_private.h | 14 +++--
> >  drivers/crypto/zuc/Makefile                | 28 ++++++----
> >  drivers/crypto/zuc/meson.build             | 24 ++++++---
> >  drivers/crypto/zuc/rte_zuc_pmd.c           | 51 +++++++++++++-----
> >  drivers/crypto/zuc/rte_zuc_pmd_ops.c       |  2 +
> >  drivers/crypto/zuc/zuc_pmd_private.h       |  6 ++-
> >  mk/rte.app.mk                              |  6 +--
> >  21 files changed, 395 insertions(+), 233 deletions(-)
> >
> > --
> > 2.7.5
> 
> I see the following build failure when applying the patchset:
> """
> ../../root/dpdk/drivers/crypto/zuc/rte_zuc_pmd.c:225:51: error: cast from
> 'uint8_t **' (aka 'unsigned char **') to 'const void **' must have all intermediate
> pointers const qualified to be safe [-Werror,-Wcast-qual]
>         IMB_ZUC_EEA3_N_BUFFER(qp->mb_mgr, (const void **)cipher_keys,
>                                                          ^
> ../../root/dpdk/drivers/crypto/zuc/rte_zuc_pmd.c:226:19: error: cast from
> 'uint8_t **' (aka 'unsigned char **') to 'const void **' must have all intermediate
> pointers const qualified to be safe [-Werror,-Wcast-qual]
>                         (const void **)iv, (const void **)src, (void **)dst,
>                                        ^
> ../../root/dpdk/drivers/crypto/zuc/rte_zuc_pmd.c:226:38: error: cast from
> 'uint8_t **' (aka 'unsigned char **') to 'const void **' must have all intermediate
> pointers const qualified to be safe [-Werror,-Wcast-qual]
>                         (const void **)iv, (const void **)src, (void **)dst,
>                                                           ^
> 3 errors generated.
> """
> 
> It reproduces with meson on Fedora 31 and clang (version 9.0.0).
> I'm using intel-ipsec-mb version 0.53.

Thanks for reporting this issue. By the time I sent the patchset, I saw no compilation errors.
Will send a v3 fixing this and addressing Bruce's comments.

Thanks,
Pablo

> 
> Regards,
> Ali