From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tomasz Duszynski Subject: Re: [PATCH v2 1/4] crypto/mrvl: add mrvl crypto pmd driver Date: Fri, 6 Oct 2017 09:24:20 +0200 Message-ID: <20171006072420.GC11828@tdu> References: <1506418805-12117-1-git-send-email-tdu@semihalf.com> <1506594212-15803-1-git-send-email-tdu@semihalf.com> <1506594212-15803-2-git-send-email-tdu@semihalf.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: Tomasz Duszynski , "dev@dpdk.org" , "mw@semihalf.com" , "dima@marvell.com" , "nsamsono@marvell.com" , "Jianbo.liu@linaro.org" , Jacek Siuda To: "De Lara Guarch, Pablo" Return-path: Received: from mail-lf0-f53.google.com (mail-lf0-f53.google.com [209.85.215.53]) by dpdk.org (Postfix) with ESMTP id 849B81B254 for ; Fri, 6 Oct 2017 09:24:22 +0200 (CEST) Received: by mail-lf0-f53.google.com with SMTP id d10so17059218lfg.11 for ; Fri, 06 Oct 2017 00:24:22 -0700 (PDT) Content-Disposition: inline In-Reply-To: List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Thu, Oct 05, 2017 at 03:01:33PM +0000, De Lara Guarch, Pablo wrote: > Hi Tomasz, > > > -----Original Message----- > > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Tomasz Duszynski > > Sent: Thursday, September 28, 2017 11:23 AM > > To: dev@dpdk.org > > Cc: mw@semihalf.com; dima@marvell.com; nsamsono@marvell.com; > > Jianbo.liu@linaro.org; Tomasz Duszynski ; Jacek Siuda > > > > Subject: [dpdk-dev] [PATCH v2 1/4] crypto/mrvl: add mrvl crypto pmd > > driver > > > > Add support for the Marvell Security Crypto Accelerator EIP197. > > Driver is based on external, publicly available, Marvell MUSDK > > library that provides access to the hardware with minimum overhead > > and high performance. > > > > Driver comes with support for the following features: > > > > * Symmetric crypto > > * Sym operation chaining > > * AES CBC (128) > > * AES CBC (192) > > * AES CBC (256) > > * AES CTR (128) > > * AES CTR (192) > > * AES CTR (256) > > * 3DES CBC > > * 3DES CTR > > * MD5 > > * MD5 HMAC > > * SHA1 > > * SHA1 HMAC > > * SHA256 > > * SHA256 HMAC > > * SHA384 > > * SHA384 HMAC > > * SHA512 > > * SHA512 HMAC > > * AES GCM (128) > > > > Driver was engineered cooperatively by Semihalf and Marvell teams. > > > > Semihalf: > > Jacek Siuda > > Tomasz Duszynski > > > > Marvell: > > Dmitri Epshtein > > Natalie Samsonov > > > > Signed-off-by: Jacek Siuda > > Signed-off-by: Tomasz Duszynski > > If the guys in Marvell has contributed with the code, > they should sign off too. Up to you. > > There is a script to test compilation (devtools/test-build.sh). > You should also modify it to include the dependency with LIBMUSDK. > ACK > ... > > > diff --git a/drivers/crypto/mrvl/rte_mrvl_pmd.c > > b/drivers/crypto/mrvl/rte_mrvl_pmd.c > > new file mode 100644 > > index 0000000..63f8daa > > --- /dev/null > > +++ b/drivers/crypto/mrvl/rte_mrvl_pmd.c > > ... > > > + > > +/* Register the driver in constructor. */ > > +RTE_PMD_REGISTER_VDEV(CRYPTODEV_NAME_MRVL_PMD, > > cryptodev_mrvl_pmd_drv); > > +RTE_PMD_REGISTER_ALIAS(CRYPTODEV_NAME_MRVL_PMD, > > cryptodev_mrvl_pmd); > > You can remove this alias, as this is a new PMD, > we should be using the primary convention "crypto_mrvl". > ACK > > > +RTE_PMD_REGISTER_PARAM_STRING(CRYPTODEV_NAME_MRVL_PMD, > > + "max_nb_queue_pairs=3D " > > + "max_nb_sessions=3D " > > + "socket_id=3D"); > > +RTE_PMD_REGISTER_CRYPTO_DRIVER(cryptodev_mrvl_pmd_drv, > > cryptodev_driver_id); > > diff --git a/drivers/crypto/mrvl/rte_mrvl_pmd_ops.c > > b/drivers/crypto/mrvl/rte_mrvl_pmd_ops.c > > new file mode 100644 > > index 0000000..f7374f8 > > --- /dev/null > > +++ b/drivers/crypto/mrvl/rte_mrvl_pmd_ops.c > > ... > > > + */ > > +static const struct rte_cryptodev_capabilities > > + mrvl_crypto_pmd_capabilities[] =3D { > > + { /* MD5 HMAC */ > > + .op =3D RTE_CRYPTO_OP_TYPE_SYMMETRIC, > > + {.sym =3D { > > + .xform_type =3D RTE_CRYPTO_SYM_XFORM_AUTH, > > + {.auth =3D { > > + .algo =3D RTE_CRYPTO_AUTH_MD5_HMAC, > > + .block_size =3D 64, > > + .key_size =3D { > > + .min =3D 64, > > + .max =3D 64, > > + .increment =3D 0 > > + }, > > + .digest_size =3D { > > + .min =3D 16, > > + .max =3D 16, > > + .increment =3D 0 > > + }, > > + .aad_size =3D { 0 } > > You can remove this aad_size, as it is only applicable to AEAD algorithms= (GCM in your case). > ACK > > + }, } > > + }, } > > + }, > > ... > > > + { /* SHA1 HMAC */ > > + .op =3D RTE_CRYPTO_OP_TYPE_SYMMETRIC, > > + {.sym =3D { > > + .xform_type =3D > > RTE_CRYPTO_SYM_XFORM_AUTH, > > + {.auth =3D { > > + .algo =3D > > RTE_CRYPTO_AUTH_SHA1_HMAC, > > + .block_size =3D 64, > > + .key_size =3D { > > + .min =3D 16, > > + .max =3D 128, > > + .increment =3D 0 > > If min and max values are different, increment cannot be 0. ACK Thanks for comments. -- - Tomasz Duszy=C5=84ski