From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by dpdk.org (Postfix) with ESMTP id 44F5D1B900 for ; Wed, 19 Dec 2018 14:48:22 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 19 Dec 2018 05:48:21 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,372,1539673200"; d="scan'208";a="131266658" Received: from irsmsx103.ger.corp.intel.com ([163.33.3.157]) by fmsmga001.fm.intel.com with ESMTP; 19 Dec 2018 05:48:20 -0800 Received: from irsmsx101.ger.corp.intel.com ([169.254.1.237]) by IRSMSX103.ger.corp.intel.com ([169.254.3.157]) with mapi id 14.03.0415.000; Wed, 19 Dec 2018 13:48:19 +0000 From: "Zhang, Roy Fan" To: Thomas Monjalon CC: "dev@dpdk.org" , "akhil.goyal@nxp.com" , "Krakowiak, LukaszX" , "Yigit, Ferruh" Thread-Topic: [dpdk-dev] [PATCH v2] crypto/aesni_mb: use architure independent marcos Thread-Index: AQHUl5v9G+qBuFXqqkaClNORN7LlH6WGELSQ Date: Wed, 19 Dec 2018 13:48:18 +0000 Message-ID: <9F7182E3F746AB4EA17801C148F3C6043351E29B@IRSMSX101.ger.corp.intel.com> References: <20181123140413.52154-1-roy.fan.zhang@intel.com> <20181211122917.18713-1-roy.fan.zhang@intel.com> <2126399.7T9Zi8FxJ9@xps> In-Reply-To: <2126399.7T9Zi8FxJ9@xps> Accept-Language: en-IE, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ctpclassification: CTP_NT x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiZjcxNGZmNDAtM2RiMy00Yzg4LWI0MjctMTVmNDA1OTczYWU5IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiQ1dpVmcrU2tcL0JCVmZCT3E4R29KengyZ09iczZpWnlwMjdzeWFhTnNXUUY4SUQ0MXlKVEphRkkwbDkyeGQwM2QifQ== dlp-product: dlpe-windows dlp-version: 11.0.400.15 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] crypto/aesni_mb: use architure independent marcos 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: Wed, 19 Dec 2018 13:48:22 -0000 Hi Thomas, Sorry the patch caused the problem. I have tested the patch with intel-ipsec-mb 0.50/0.52 library with make and= did not find problem. Once switching between versions of ipsec-mb, a necessary "make uninstall" h= as to be done to clear old in /usr. However I didn't test meson in 0.50, sorry about that. The purpose of the patch is to fit the changes made to the latest intel-ips= ec-mb code with newly introduced API. Using the new APIs (macros) newly introduced have the benefit of way easier= maintenance effort for different architectures and massively reduce the co= de size. However using the new APIs only will cause the inconsistence compatibility = to the user who uses older APIs.=20 Ferruh and I had the talk and come with the solution to prepare both old an= d new code for 19.02, and make the compiler selects which files to be compi= led based on the detected ipsec-mb version. We also planned to make a depre= cation notice for 19.05 to drop the support of older version of ipsec-mb li= brary, along with replacing the *_new* files with the existing one. Regards, Fan > -----Original Message----- > From: Thomas Monjalon [mailto:thomas@monjalon.net] > Sent: Wednesday, December 19, 2018 1:09 PM > To: Zhang, Roy Fan > Cc: dev@dpdk.org; akhil.goyal@nxp.com; Krakowiak, LukaszX > > Subject: Re: [dpdk-dev] [PATCH v2] crypto/aesni_mb: use architure > independent marcos >=20 > 11/12/2018 13:29, Fan Zhang: > > From: Lukasz Krakowiak > > > > This patch updates the aesni_mb to use IMB_* arch independent macros > > to reduce the code size and future maintaining effort. > > > > Signed-off-by: Fan Zhang > > Signed-off-by: Lukasz Krakowiak > > --- > > v2: > > - making the PMD compatible with both new intel-ipsec-mb version 0.52 > > and older > > - fixed a bug > > > > drivers/crypto/aesni_mb/Makefile | 24 +- > > drivers/crypto/aesni_mb/meson.build | 14 +- > > drivers/crypto/aesni_mb/rte_aesni_mb_pmd_next.c | 1237 > ++++++++++++++++++++ > > .../crypto/aesni_mb/rte_aesni_mb_pmd_ops_next.c | 681 > +++++++++++ > > drivers/crypto/aesni_mb/rte_aesni_mb_pmd_private.h | 52 +- > > 5 files changed, 1998 insertions(+), 10 deletions(-) create mode > > 100755 drivers/crypto/aesni_mb/rte_aesni_mb_pmd_next.c > > create mode 100755 > > drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops_next.c > > > > diff --git a/drivers/crypto/aesni_mb/Makefile > > b/drivers/crypto/aesni_mb/Makefile > > index 806a95eb8..24630a6ca 100644 > > --- a/drivers/crypto/aesni_mb/Makefile > > +++ b/drivers/crypto/aesni_mb/Makefile > > @@ -22,8 +22,26 @@ LDLIBS +=3D -lrte_eal -lrte_mbuf -lrte_mempool > > -lrte_ring LDLIBS +=3D -lrte_cryptodev LDLIBS +=3D -lrte_bus_vdev > > > > -# library source files > > -SRCS-$(CONFIG_RTE_LIBRTE_PMD_AESNI_MB) +=3D rte_aesni_mb_pmd.c > > -SRCS-$(CONFIG_RTE_LIBRTE_PMD_AESNI_MB) +=3D > rte_aesni_mb_pmd_ops.c > > +IMB_HDR =3D /usr/include/intel-ipsec-mb.h > > + > > +# Detect library version > > +IMB_VERSION =3D $(shell grep -e "IMB_VERSION_STR" $(IMB_HDR) | cut > > +-d'"' -f2) IMB_VERSION_NUM =3D $(shell grep -e "IMB_VERSION_NUM" > > +$(IMB_HDR) | cut -d' ' -f3) > > + > > +ifeq ($(IMB_VERSION),) > > + # files for older version of IMB > > + SRCS-$(CONFIG_RTE_LIBRTE_PMD_AESNI_MB) +=3D > rte_aesni_mb_pmd.c > > + SRCS-$(CONFIG_RTE_LIBRTE_PMD_AESNI_MB) +=3D > rte_aesni_mb_pmd_ops.c > > +else > > + ifeq ($(shell expr $(IMB_VERSION_NUM) \>=3D 0x3400), 1) > > + # files for a new version of IMB > > + SRCS-$(CONFIG_RTE_LIBRTE_PMD_AESNI_MB) +=3D > rte_aesni_mb_pmd_next.c > > + SRCS-$(CONFIG_RTE_LIBRTE_PMD_AESNI_MB) +=3D > rte_aesni_mb_pmd_ops_next.c > > + else > > + # files for older version of IMB > > + SRCS-$(CONFIG_RTE_LIBRTE_PMD_AESNI_MB) +=3D > rte_aesni_mb_pmd.c > > + SRCS-$(CONFIG_RTE_LIBRTE_PMD_AESNI_MB) +=3D > rte_aesni_mb_pmd_ops.c > > + endif > > +endif > > > > include $(RTE_SDK)/mk/rte.lib.mk > > diff --git a/drivers/crypto/aesni_mb/meson.build > > b/drivers/crypto/aesni_mb/meson.build > > index aae0995e5..490f68eaf 100644 > > --- a/drivers/crypto/aesni_mb/meson.build > > +++ b/drivers/crypto/aesni_mb/meson.build > > @@ -1,6 +1,6 @@ > > # SPDX-License-Identifier: BSD-3-Clause # Copyright(c) 2018 Intel > > Corporation > > - > > +IPSec_MB_ver_0_52 =3D '0.52.0' > > lib =3D cc.find_library('IPSec_MB', required: false) if not > > lib.found() > > build =3D false > > @@ -8,5 +8,15 @@ else > > ext_deps +=3D lib > > endif > > > > -sources =3D files('rte_aesni_mb_pmd.c', 'rte_aesni_mb_pmd_ops.c') > > +imb_version =3D cc.get_define('IMB_VERSION_STR', > > + prefix : '#include') > > + > > +if imb_version.version_compare('>=3D' + IPSec_MB_ver_0_52) > > + message('Build for a new version of library IPSec_MB[' + imb_version > + ']') > > + sources =3D files('rte_aesni_mb_pmd_next.c', > > +'rte_aesni_mb_pmd_ops_next.c') else > > + message('Build for older version of library IPSec_MB[' + imb_version > + ']') > > + sources =3D files('rte_aesni_mb_pmd.c', 'rte_aesni_mb_pmd_ops.c') > > +endif > > + > > deps +=3D ['bus_vdev'] >=20 > I don't know what you are trying to do, but I know it is not explained. > Adding files "*_next.c" looks to be a bad idea. > And worst: it does not compile with meson: > drivers/crypto/aesni_mb/meson.build:11:0: ERROR: Could not get > define 'IMB_VERSION_STR' >=20 > This patch is a total mess which must be explained, tested and split in s= everal > patches. > I drop it from the merge to master and update all related AES patches to > "Changes Requested" in patchwork. >=20 >=20