From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) by dpdk.org (Postfix) with ESMTP id 2F34A1B4D6 for ; Wed, 19 Dec 2018 14:08:33 +0100 (CET) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 878C921D09; Wed, 19 Dec 2018 08:08:32 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Wed, 19 Dec 2018 08:08:32 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding:content-type; s=mesmtp; bh=jf1Df0pJtsgBZq8TswvlZNeBCKw4z97M/eLb9oR1Amc=; b=TDCuNqNG/d6k XHN4S5fOXWD594kTQiCUIGa7xK2X9j3WP6gQ3isCyF+wd429ch3BcXwdc8k9D0oU Bs65xjrJ1NY7y1Q+RvexHjqAnf/q+UJN1StuIt3EmNlxEkBJq4rAtZhty02iPjwC 5s53ORkbGaVxyNpxJEwG1ahJKi5T0dI= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; bh=jf1Df0pJtsgBZq8TswvlZNeBCKw4z97M/eLb9oR1A mc=; b=jRUmhiZaEw+m7/dkPZ5UiQOjk26Ihezts7+sZJi41LR/3TUGztKONRzqz ui7s1AheTBj9wLmEjzDXPvUragMkKigyMwHl1gxPCsZQWGN1V+lgI/3fAE/VMNWW DB3tZFAvIKri5KUx0WuKgMRW/5u6XeUUYrl5zlF6bMh+3YsIgHvW6jxSGeZTTRXM eKNM4448rGqopflC2+tX00pcnTce91YLl+Yngu9kW5aGBLZBIvfRYE+bviyz3LjY f6/Xx6sIddoE9zL89gYh3Sd/2bS165VaSKH8Vp3FF4BfswFQiA/rFQTAkNMdrHCY u1cHQUMtob5yIjpLwl4Pbz7Clinig== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedtkedrudejtddghedtucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfquhhtnecuuegrihhlohhuthemucef tddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvffufffkjg hfggfgtgesthfuredttddtvdenucfhrhhomhepvfhhohhmrghsucfoohhnjhgrlhhonhcu oehthhhomhgrshesmhhonhhjrghlohhnrdhnvghtqeenucffohhmrghinheplhhisgdrmh hknecukfhppeejjedrudefgedrvddtfedrudekgeenucfrrghrrghmpehmrghilhhfrhho mhepthhhohhmrghssehmohhnjhgrlhhonhdrnhgvthenucevlhhushhtvghrufhiiigvpe dt X-ME-Proxy: Received: from xps.localnet (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id 2081DE405D; Wed, 19 Dec 2018 08:08:31 -0500 (EST) From: Thomas Monjalon To: Fan Zhang Cc: dev@dpdk.org, akhil.goyal@nxp.com, Lukasz Krakowiak Date: Wed, 19 Dec 2018 14:08:30 +0100 Message-ID: <2126399.7T9Zi8FxJ9@xps> In-Reply-To: <20181211122917.18713-1-roy.fan.zhang@intel.com> References: <20181123140413.52154-1-roy.fan.zhang@intel.com> <20181211122917.18713-1-roy.fan.zhang@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" 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:08:33 -0000 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 += -lrte_eal -lrte_mbuf -lrte_mempool -lrte_ring > LDLIBS += -lrte_cryptodev > LDLIBS += -lrte_bus_vdev > > -# library source files > -SRCS-$(CONFIG_RTE_LIBRTE_PMD_AESNI_MB) += rte_aesni_mb_pmd.c > -SRCS-$(CONFIG_RTE_LIBRTE_PMD_AESNI_MB) += rte_aesni_mb_pmd_ops.c > +IMB_HDR = /usr/include/intel-ipsec-mb.h > + > +# Detect library version > +IMB_VERSION = $(shell grep -e "IMB_VERSION_STR" $(IMB_HDR) | cut -d'"' -f2) > +IMB_VERSION_NUM = $(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) += rte_aesni_mb_pmd.c > + SRCS-$(CONFIG_RTE_LIBRTE_PMD_AESNI_MB) += rte_aesni_mb_pmd_ops.c > +else > + ifeq ($(shell expr $(IMB_VERSION_NUM) \>= 0x3400), 1) > + # files for a new version of IMB > + SRCS-$(CONFIG_RTE_LIBRTE_PMD_AESNI_MB) += rte_aesni_mb_pmd_next.c > + SRCS-$(CONFIG_RTE_LIBRTE_PMD_AESNI_MB) += rte_aesni_mb_pmd_ops_next.c > + else > + # files for older version of IMB > + SRCS-$(CONFIG_RTE_LIBRTE_PMD_AESNI_MB) += rte_aesni_mb_pmd.c > + SRCS-$(CONFIG_RTE_LIBRTE_PMD_AESNI_MB) += 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 = '0.52.0' > lib = cc.find_library('IPSec_MB', required: false) > if not lib.found() > build = false > @@ -8,5 +8,15 @@ else > ext_deps += lib > endif > > -sources = files('rte_aesni_mb_pmd.c', 'rte_aesni_mb_pmd_ops.c') > +imb_version = cc.get_define('IMB_VERSION_STR', > + prefix : '#include') > + > +if imb_version.version_compare('>=' + IPSec_MB_ver_0_52) > + message('Build for a new version of library IPSec_MB[' + imb_version + ']') > + sources = 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 = files('rte_aesni_mb_pmd.c', 'rte_aesni_mb_pmd_ops.c') > +endif > + > deps += ['bus_vdev'] 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' This patch is a total mess which must be explained, tested and split in several patches. I drop it from the merge to master and update all related AES patches to "Changes Requested" in patchwork.