From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by smtp.lore.kernel.org (Postfix) with ESMTP id 610DCC433EF for ; Thu, 19 May 2022 10:23:07 +0000 (UTC) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 62F1540222; Thu, 19 May 2022 12:23:06 +0200 (CEST) Received: from mga06.intel.com (mga06b.intel.com [134.134.136.31]) by mails.dpdk.org (Postfix) with ESMTP id 33FBF40156 for ; Thu, 19 May 2022 12:23:04 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1652955785; x=1684491785; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=t7cpOTXVVcyidfBFkJ6wnlBfCAOUw1P5Ps6aM7dwFbU=; b=DmZd6RsDdRmWJWWlukadfJfJfm5vLuHbfEA7dcOa303Bz+kKU6K/RpUR k6OgvbbcQvm/36HpsHyCa1BgTjB4H1p4zvMF8LizH/73Lm6ARPiMJKreh WSCE3rz1Z1S6zFp4wAhuk40zk7e43iYCQFNBTfDc4VGNKzpHQkbQj67xN WVTsf7M7VwYmrZjq4F5wVS1Hf1Bsz008hM6+Rr6xqV4bGfyLDV9OZ5K3n +6TZiAkWfNrRfaIiEh4pmLMjg2FaPM4ZPbDT0vz4xLsnVOQAIHv8K7wH5 zquuaLGja2YAwWSyKgm3hBmjpPzCk4psVg/MTOZI3VTIidfXR6eW2eecu Q==; X-IronPort-AV: E=McAfee;i="6400,9594,10351"; a="332756705" X-IronPort-AV: E=Sophos;i="5.91,237,1647327600"; d="scan'208";a="332756705" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 May 2022 03:23:02 -0700 X-IronPort-AV: E=Sophos;i="5.91,237,1647327600"; d="scan'208";a="598484463" Received: from bricha3-mobl.ger.corp.intel.com ([10.55.133.25]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-SHA; 19 May 2022 03:23:00 -0700 Date: Thu, 19 May 2022 11:22:57 +0100 From: Bruce Richardson To: "Zhang, Roy Fan" Cc: Ferruh Yigit , "Ji, Kai" , "dev@dpdk.org" Subject: Re: [dpdk-dev v2 1/2] build: add in option for qat use intel ipsec-mb lib Message-ID: References: <20220407152931.8771-1-roy.fan.zhang@intel.com> <20220517141652.53769-1-kai.ji@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org On Thu, May 19, 2022 at 10:14:14AM +0100, Zhang, Roy Fan wrote: > > -----Original Message----- > > From: Richardson, Bruce > > Sent: Wednesday, May 18, 2022 11:33 AM > > To: Ferruh Yigit > > Cc: Ji, Kai ; dev@dpdk.org; Zhang, Roy Fan > > > > Subject: Re: [dpdk-dev v2 1/2] build: add in option for qat use intel ipsec-mb > > lib > > > > On Wed, May 18, 2022 at 11:26:27AM +0100, Ferruh Yigit wrote: > > > On 5/18/2022 9:04 AM, Bruce Richardson wrote: > > > > On Tue, May 17, 2022 at 10:16:51PM +0800, Kai Ji wrote: > > > > > Add in build option for QAT pmd use intel ipsec-mb lib > > > > > instead openssl for precompute partial hash & aes. > > > > > > > > > > Signed-off-by: Kai Ji > > > > > --- > > > > > drivers/common/qat/meson.build | 12 ++++++++++++ > > > > > meson_options.txt | 2 ++ > > > > > 2 files changed, 14 insertions(+) > > > > > > > > > > diff --git a/drivers/common/qat/meson.build > > b/drivers/common/qat/meson.build > > > > > index b7027f3164..d6eaff3e0e 100644 > > > > > --- a/drivers/common/qat/meson.build > > > > > +++ b/drivers/common/qat/meson.build > > > > > @@ -35,6 +35,18 @@ if qat_crypto and not libcrypto.found() > > > > > 'missing dependency, libcrypto') > > > > > endif > > > > > +if get_option('qat_libipsecmb') > > > > > + IMB_required_ver = '1.0.0' > > > > > + libipsecmb = cc.find_library('IPSec_MB', required: false) > > > > > + if not lib.found() > > > > > + build = false > > > > > + reason = 'missing dependency, "libIPSec_MB"' > > > > > + else > > > > > + ext_deps += libipsecmb > > > > > + dpdk_conf.set('RTE_QAT_LIBIPSECMB', true) > > > > > + endif > > > > > +endif > > > > > + > > > > > > > > In general it's not a good idea for individual drivers to add top-level > > > > meson.build options. If every driver does this for all its options we will > > > > have an unmanageable set of hundreds of options. Unfortunately, > > though, I > > > > don't see a really good way to replace this with something other than a > > > > build option - I assume it's not just good enough to check which of the > > > > dependencies is found/not-found? Is there some way that this can be a > > > > generic option, that may be applicable to other drivers? Could the option > > > > be instead to prioritize FIPs compatibility? > > > > > > > > > > +1 to not have top level meson option for a driver. > > > > > > Will it work to give priority to intel-ipsec-mb lib, like when ipsec-mb > > > library exists use it, else use openssl? > > > > Looking at the patch a bit more, is there a reason why this cannot be made > > a run-time option when both libraries are available? > > Hi Bruce, > > Thanks for the review. > Are you suggesting adding a EAL option to the QAT PMD? > I was thinking you can add a driver option, to allow switching from the default if both openssl and ipsec-mb were available to be compiled in.