From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by dpdk.org (Postfix) with ESMTP id AED321B1AB for ; Thu, 5 Oct 2017 17:01:37 +0200 (CEST) Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga105.fm.intel.com with ESMTP; 05 Oct 2017 08:01:36 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.42,481,1500966000"; d="scan'208";a="159786883" Received: from irsmsx105.ger.corp.intel.com ([163.33.3.28]) by fmsmga006.fm.intel.com with ESMTP; 05 Oct 2017 08:01:35 -0700 Received: from irsmsx108.ger.corp.intel.com ([169.254.11.167]) by irsmsx105.ger.corp.intel.com ([169.254.7.75]) with mapi id 14.03.0319.002; Thu, 5 Oct 2017 16:01:34 +0100 From: "De Lara Guarch, Pablo" To: Tomasz Duszynski , "dev@dpdk.org" CC: "mw@semihalf.com" , "dima@marvell.com" , "nsamsono@marvell.com" , "Jianbo.liu@linaro.org" , Jacek Siuda Thread-Topic: [dpdk-dev] [PATCH v2 1/4] crypto/mrvl: add mrvl crypto pmd driver Thread-Index: AQHTOEQK0YEvDiu3jkagU0raxsEZAqLVXhOw Date: Thu, 5 Oct 2017 15:01:33 +0000 Message-ID: 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> In-Reply-To: <1506594212-15803-2-git-send-email-tdu@semihalf.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiZTk3YzA5ZTktNWZhYi00NzhiLWIwMWEtZThlOWVkMWVkYWNhIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE2LjUuOS4zIiwiVHJ1c3RlZExhYmVsSGFzaCI6IkZrSElLZ1NZN2NBMktCUzR4WVE0NHhuTkdtK3lDWE56SFNxMTdnb0d4N0U9In0= x-ctpclassification: CTP_IC dlp-product: dlpe-windows dlp-version: 11.0.0.116 dlp-reaction: no-action x-originating-ip: [163.33.239.182] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH v2 1/4] crypto/mrvl: add mrvl crypto pmd driver X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Oct 2017 15:01:38 -0000 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 >=20 > 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. >=20 > Driver comes with support for the following features: >=20 > * 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) >=20 > Driver was engineered cooperatively by Semihalf and Marvell teams. >=20 > Semihalf: > Jacek Siuda > Tomasz Duszynski >=20 > Marvell: > Dmitri Epshtein > Natalie Samsonov >=20 > 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. ... > 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". > +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). > + }, } > + }, } > + }, ... > + { /* 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.