DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Power, Ciara" <ciara.power@intel.com>
To: "Richardson, Bruce" <bruce.richardson@intel.com>,
	"dev@dpdk.org" <dev@dpdk.org>
Cc: "Dooley, Brian" <brian.dooley@intel.com>,
	"Ji, Kai" <kai.ji@intel.com>,
	"De Lara Guarch, Pablo" <pablo.de.lara.guarch@intel.com>
Subject: RE: [PATCH] common/qat: fix build errors with incompatible IPSec lib
Date: Wed, 22 Nov 2023 17:00:22 +0000	[thread overview]
Message-ID: <SN7PR11MB7639E86147CE784A7A97373AE6BAA@SN7PR11MB7639.namprd11.prod.outlook.com> (raw)
In-Reply-To: <20231122164651.1320497-1-bruce.richardson@intel.com>



> -----Original Message-----
> From: Richardson, Bruce <bruce.richardson@intel.com>
> Sent: Wednesday, November 22, 2023 4:47 PM
> To: dev@dpdk.org
> Cc: Richardson, Bruce <bruce.richardson@intel.com>; Dooley, Brian
> <brian.dooley@intel.com>; Ji, Kai <kai.ji@intel.com>; De Lara Guarch, Pablo
> <pablo.de.lara.guarch@intel.com>; Power, Ciara <ciara.power@intel.com>
> Subject: [PATCH] common/qat: fix build errors with incompatible IPSec lib
> 
> Since "find_library()" is used to find the libipsec_mb library, there is a chance
> that an incompatible library will be found e.g. when doing cross-builds. To fix
> this, we copy the logic from the crypto/ipsec_mb driver to actually do a link-
> check on the library before deciding it can be used.
> 
> Fixes: ca0ba0e48129 ("crypto/qat: default to IPsec MB for computations")
> Cc: brian.dooley@intel.com
> 
> Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
> ---
>  drivers/common/qat/meson.build | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/common/qat/meson.build
> b/drivers/common/qat/meson.build index edc793ba95..5c36fbb270 100644
> --- a/drivers/common/qat/meson.build
> +++ b/drivers/common/qat/meson.build
> @@ -43,7 +43,8 @@ else
>      IMB_required_ver = '1.4.0'
>      IMB_header = '#include<intel-ipsec-mb.h>'
>      libipsecmb = cc.find_library('IPSec_MB', required: false)
> -    if libipsecmb.found()
> +    if libipsecmb.found() and meson.version().version_compare('>=0.60') and
> cc.links(
> +            'int main(void) {return 0;}', dependencies: libipsecmb)
>          # version comes with quotes, so we split based on " and take the middle
>          imb_ver = cc.get_define('IMB_VERSION_STR',
>              prefix : IMB_header).split('"')[1]
> --
> 2.40.1

Thanks Bruce,

Acked-by: Ciara Power <ciara.power@intel.com>

  reply	other threads:[~2023-11-22 17:00 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-22 16:46 Bruce Richardson
2023-11-22 17:00 ` Power, Ciara [this message]
2023-11-23  0:12   ` Thomas Monjalon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=SN7PR11MB7639E86147CE784A7A97373AE6BAA@SN7PR11MB7639.namprd11.prod.outlook.com \
    --to=ciara.power@intel.com \
    --cc=brian.dooley@intel.com \
    --cc=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=kai.ji@intel.com \
    --cc=pablo.de.lara.guarch@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).