From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id E5E781B43A for ; Sun, 17 Jun 2018 15:25:14 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 17 Jun 2018 06:25:13 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.51,234,1526367600"; d="scan'208";a="237883969" Received: from irsmsx152.ger.corp.intel.com ([163.33.192.66]) by fmsmga005.fm.intel.com with ESMTP; 17 Jun 2018 06:25:11 -0700 Received: from irsmsx108.ger.corp.intel.com ([169.254.11.139]) by IRSMSX152.ger.corp.intel.com ([163.33.192.66]) with mapi id 14.03.0319.002; Sun, 17 Jun 2018 14:25:11 +0100 From: "De Lara Guarch, Pablo" To: Shally Verma CC: "Trahe, Fiona" , "akhil.goyal@nxp.com" , "dev@dpdk.org" , "pathreya@caviumnetworks.com" , Sunila Sahu , Ashish Gupta Thread-Topic: [PATCH v3 5/6] crypto/openssl: add asym crypto support Thread-Index: AQHT7NwQJS1xOYB9VUuOTltSRnz3NqRkm6rg Date: Sun, 17 Jun 2018 13:25:10 +0000 Message-ID: References: <1526450713-17299-1-git-send-email-shally.verma@caviumnetworks.com> <1526450713-17299-6-git-send-email-shally.verma@caviumnetworks.com> In-Reply-To: <1526450713-17299-6-git-send-email-shally.verma@caviumnetworks.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiY2NhYWYxM2ItMzNiYS00YTc1LTlkMTgtZmMyYzEyMjNkNjg3IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoibzNiVVwvSnpOdDJ4dnM0U0tmQTNFSHRLWkJndlRhdGRWN2R1N28zbWYzOWx6VERsaGFodkFWbHFNejRhdzRTcHMifQ== x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.0.200.100 dlp-reaction: no-action x-originating-ip: [163.33.239.180] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH v3 5/6] crypto/openssl: add asym crypto support 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: Sun, 17 Jun 2018 13:25:15 -0000 > -----Original Message----- > From: Shally Verma [mailto:shally.verma@caviumnetworks.com] > Sent: Wednesday, May 16, 2018 7:05 AM > To: De Lara Guarch, Pablo > Cc: Trahe, Fiona ; akhil.goyal@nxp.com; > dev@dpdk.org; pathreya@caviumnetworks.com; Sunila Sahu > ; Ashish Gupta > > Subject: [PATCH v3 5/6] crypto/openssl: add asym crypto support >=20 > Add asymmetric crypto operation support in openssl PMD. > Current list of supported asym xforms: > * RSA > * DSA > * Deffie-hellman > * Modular Operations >=20 > changes from v2: > - Update the pmd capability as per new capability structure >=20 > changes from v1: > - resolve new line error in dod/guides/cryptodevs/openssl.rst >=20 > Signed-off-by: Shally Verma > Signed-off-by: Sunila Sahu > Signed-off-by: Ashish Gupta > --- > doc/guides/cryptodevs/features/openssl.ini | 11 + > doc/guides/cryptodevs/openssl.rst | 1 + > drivers/crypto/openssl/rte_openssl_pmd.c | 377 +++++++++++++++++= +++- > drivers/crypto/openssl/rte_openssl_pmd_ops.c | 395 > ++++++++++++++++++++++- > drivers/crypto/openssl/rte_openssl_pmd_private.h | 29 ++ > 5 files changed, 801 insertions(+), 12 deletions(-) >=20 > diff --git a/doc/guides/cryptodevs/features/openssl.ini > b/doc/guides/cryptodevs/features/openssl.ini > index 691565865..bef5c7f79 100644 > --- a/doc/guides/cryptodevs/features/openssl.ini > +++ b/doc/guides/cryptodevs/features/openssl.ini > @@ -7,6 +7,7 @@ > Symmetric crypto =3D Y > Sym operation chaining =3D Y > Mbuf scatter gather =3D Y > +Asymmetric crypto =3D Y >=20 > ; > ; Supported crypto algorithms of the 'openssl' crypto driver. > @@ -49,3 +50,13 @@ AES GCM (256) =3D Y > AES CCM (128) =3D Y > AES CCM (192) =3D Y > AES CCM (256) =3D Y > + > +; > +; Supported Asymmetric algorithms of the 'openssl' crypto driver. > +; > +[Asymmetric] > +RSA =3D Y > +DSA =3D Y > +Modular Exponentiation =3D Y > +Modular Inversion =3D Y > +Deffie-hellman =3D Y You need to add these parameters in default.ini file, otherwise they are not shown when building the documentation. > diff --git a/doc/guides/cryptodevs/openssl.rst > b/doc/guides/cryptodevs/openssl.rst > index 427fc807c..4f90be888 100644 > --- a/doc/guides/cryptodevs/openssl.rst > +++ b/doc/guides/cryptodevs/openssl.rst > @@ -80,6 +80,7 @@ crypto processing. >=20 > Test name is cryptodev_openssl_autotest. > For performance test cryptodev_openssl_perftest can be used. > +For asymmetric crypto operations testing, run > +cryptodev_openssl_asym_autotest >=20 > To verify real traffic l2fwd-crypto example can be used with this comman= d: >=20 > diff --git a/drivers/crypto/openssl/rte_openssl_pmd.c > b/drivers/crypto/openssl/rte_openssl_pmd.c > index f584d0d6f..527e42773 100644 > --- a/drivers/crypto/openssl/rte_openssl_pmd.c > +++ b/drivers/crypto/openssl/rte_openssl_pmd.c ... > + } > + dh_key->priv_key =3D BN_bin2bn(op->priv_key.data, > + op->priv_key.length, > + dh_key->priv_key); As on the previous patch, I am getting a compilation issue: drivers/crypto/openssl/rte_openssl_pmd.c:1711:9: error: dereferencing pointer to incomplete type 'DH {aka struct dh_st}' dh_key->priv_key =3D BN_bin2bn(op->priv_key.data, ... > diff --git a/drivers/crypto/openssl/rte_openssl_pmd_ops.c > b/drivers/crypto/openssl/rte_openssl_pmd_ops.c > index 1cb87d59a..76f7410cb 100644 > --- a/drivers/crypto/openssl/rte_openssl_pmd_ops.c > +++ b/drivers/crypto/openssl/rte_openssl_pmd_ops.c ... > struct rte_cryptodev_ops openssl_pmd_ops =3D { > .dev_configure =3D openssl_pmd_config, > .dev_start =3D openssl_pmd_start, > @@ -750,8 +1138,11 @@ struct rte_cryptodev_ops openssl_pmd_ops =3D { > .queue_pair_count =3D openssl_pmd_qp_count, >=20 > .session_get_size =3D openssl_pmd_session_get_size, > + .asym_session_get_size =3D > openssl_pmd_asym_session_get_size, > .session_configure =3D openssl_pmd_session_configure, > - .session_clear =3D openssl_pmd_session_clear > + .asym_session_configure =3D > openssl_pmd_asym_session_configure, > + .session_clear =3D openssl_pmd_session_clear, > + .asym_session_clear =3D openssl_pmd_asym_session_clear > }; I think session_get_size, session_configure and session_clear should be ren= amed to sym_session_*, to avoid confusion. Could you add another patch renaming = these? Thanks, Pablo