From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm1-f67.google.com (mail-wm1-f67.google.com [209.85.128.67]) by dpdk.org (Postfix) with ESMTP id 4FDBA1B4FB for ; Wed, 24 Apr 2019 11:19:23 +0200 (CEST) Received: by mail-wm1-f67.google.com with SMTP id w15so3954704wmc.3 for ; Wed, 24 Apr 2019 02:19:23 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:subject:from:to:date:in-reply-to :references:content-transfer-encoding:user-agent:mime-version; bh=OXnvLAwJ1Lofy0vVX065Q/KDSxSCd0rx2o5tyZE18w4=; b=EF0DVcmuKdZ/SW0qY4SMIEUjXmUK9hjwSMGP6/laiLGSa861o3/0sYns07SjUsAYHO kP5hmN9XFKUG8HaP4AV6eS5Hd+ZckBZre28ZgPoIOsobmZclNbyDi2F7xEpdEc4KQ8WG VQmm0QCF8RaXaa7aNMMnM8NORuMU5qV7/yivLhtLqaG3ValnV+F/PXlXcGw2t2TkvX8z B9qCj8EfJDWXRqBTt6HBFiNMNI1VfmGm1rjSx1NcsQIuJWutHe264gHZCFXq6yoQn7Pu MeLc2tdLfCG7TQE+Gyhfs+LKu8uXRZ6nVbBTzez/AQamNtDojRXjusVMhzOr5DupDsSH raow== X-Gm-Message-State: APjAAAWJsaVEKc4uQcvvKNoGekWevRpuEGuJTUKxfA60WHtm5vxeW/Y4 FtnHuhrZdVZKlvE4447ag6YJYcP7WCo= X-Google-Smtp-Source: APXvYqyZneJ7URB35w/p658X1hfGlGVoAFRAkjEz9oYwO/o7/qTbUBEZ9RVRXkcpKMGz+Vjj6UZqrw== X-Received: by 2002:a1c:b189:: with SMTP id a131mr5673028wmf.107.1556097562835; Wed, 24 Apr 2019 02:19:22 -0700 (PDT) Received: from localhost ([88.98.246.218]) by smtp.gmail.com with ESMTPSA id a6sm19378693wrp.49.2019.04.24.02.19.21 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 24 Apr 2019 02:19:21 -0700 (PDT) Message-ID: <8b22d3442a857ddf747d38de63c57e5d68f7b1e9.camel@debian.org> From: Luca Boccassi To: Bruce Richardson , pablo.de.lara.guarch@intel.com, dev@dpdk.org Date: Wed, 24 Apr 2019 10:19:20 +0100 In-Reply-To: <20190423154357.29877-2-bruce.richardson@intel.com> References: <20190423154357.29877-1-bruce.richardson@intel.com> <20190423154357.29877-2-bruce.richardson@intel.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.30.5-1 MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH v2 1/3] crypto/aesni_gcm: add dependency version check 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, 24 Apr 2019 09:19:23 -0000 On Tue, 2019-04-23 at 16:43 +0100, Bruce Richardson wrote: > The aesni_mb driver and the aesni_gcm driver both require the same > version > of the IPSec_MB library, but only the former has a check of the > library > found by meson to see if it's the correct version. Add a similar > check to > the aesni_gcm library's meson.build file, so that the auto-detection > of > dependencies works correctly. >=20 > Signed-off-by: Bruce Richardson < > bruce.richardson@intel.com > > > --- > drivers/crypto/aesni_gcm/meson.build | 11 +++++++++++ > 1 file changed, 11 insertions(+) >=20 > diff --git a/drivers/crypto/aesni_gcm/meson.build > b/drivers/crypto/aesni_gcm/meson.build > index 70f57ad73..7183cfcba 100644 > --- a/drivers/crypto/aesni_gcm/meson.build > +++ b/drivers/crypto/aesni_gcm/meson.build > @@ -1,11 +1,22 @@ > # SPDX-License-Identifier: BSD-3-Clause > # Copyright(c) 2018 Intel Corporation > =20 > +IMB_required_ver =3D '0.52.0' > lib =3D cc.find_library('IPSec_MB', required: false) > if not lib.found() > build =3D false > else > ext_deps +=3D lib Shouldn't this be moved into a new else branch after the version check? > + > + # version comes with quotes, so we split based on " and take > the middle > + imb_ver =3D cc.get_define('IMB_VERSION_STR', > + prefix : '#include').split('"')[1] > + > + if (imb_ver =3D=3D '') or (imb_ver.version_compare('<' + > IMB_required_ver)) > + message('IPSec_MB version >=3D @0@ is required, found > version @1@'.format( > + IMB_required_ver, imb_ver)) > + build =3D false > + endif > endif > =20 > allow_experimental_apis =3D true >=20 --=20 Kind regards, Luca Boccassi From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id 42FBBA05D3 for ; Wed, 24 Apr 2019 11:19:26 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 16FF81B4FB; Wed, 24 Apr 2019 11:19:25 +0200 (CEST) Received: from mail-wm1-f67.google.com (mail-wm1-f67.google.com [209.85.128.67]) by dpdk.org (Postfix) with ESMTP id 4FDBA1B4FB for ; Wed, 24 Apr 2019 11:19:23 +0200 (CEST) Received: by mail-wm1-f67.google.com with SMTP id w15so3954704wmc.3 for ; Wed, 24 Apr 2019 02:19:23 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:subject:from:to:date:in-reply-to :references:content-transfer-encoding:user-agent:mime-version; bh=OXnvLAwJ1Lofy0vVX065Q/KDSxSCd0rx2o5tyZE18w4=; b=EF0DVcmuKdZ/SW0qY4SMIEUjXmUK9hjwSMGP6/laiLGSa861o3/0sYns07SjUsAYHO kP5hmN9XFKUG8HaP4AV6eS5Hd+ZckBZre28ZgPoIOsobmZclNbyDi2F7xEpdEc4KQ8WG VQmm0QCF8RaXaa7aNMMnM8NORuMU5qV7/yivLhtLqaG3ValnV+F/PXlXcGw2t2TkvX8z B9qCj8EfJDWXRqBTt6HBFiNMNI1VfmGm1rjSx1NcsQIuJWutHe264gHZCFXq6yoQn7Pu MeLc2tdLfCG7TQE+Gyhfs+LKu8uXRZ6nVbBTzez/AQamNtDojRXjusVMhzOr5DupDsSH raow== X-Gm-Message-State: APjAAAWJsaVEKc4uQcvvKNoGekWevRpuEGuJTUKxfA60WHtm5vxeW/Y4 FtnHuhrZdVZKlvE4447ag6YJYcP7WCo= X-Google-Smtp-Source: APXvYqyZneJ7URB35w/p658X1hfGlGVoAFRAkjEz9oYwO/o7/qTbUBEZ9RVRXkcpKMGz+Vjj6UZqrw== X-Received: by 2002:a1c:b189:: with SMTP id a131mr5673028wmf.107.1556097562835; Wed, 24 Apr 2019 02:19:22 -0700 (PDT) Received: from localhost ([88.98.246.218]) by smtp.gmail.com with ESMTPSA id a6sm19378693wrp.49.2019.04.24.02.19.21 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 24 Apr 2019 02:19:21 -0700 (PDT) Message-ID: <8b22d3442a857ddf747d38de63c57e5d68f7b1e9.camel@debian.org> From: Luca Boccassi To: Bruce Richardson , pablo.de.lara.guarch@intel.com, dev@dpdk.org Date: Wed, 24 Apr 2019 10:19:20 +0100 In-Reply-To: <20190423154357.29877-2-bruce.richardson@intel.com> References: <20190423154357.29877-1-bruce.richardson@intel.com> <20190423154357.29877-2-bruce.richardson@intel.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.30.5-1 MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH v2 1/3] crypto/aesni_gcm: add dependency version check 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Message-ID: <20190424091920.hiSXnEnEkNXOxuTUha2-eMU4wBk-ZfQdjU05DQu6b1A@z> On Tue, 2019-04-23 at 16:43 +0100, Bruce Richardson wrote: > The aesni_mb driver and the aesni_gcm driver both require the same > version > of the IPSec_MB library, but only the former has a check of the > library > found by meson to see if it's the correct version. Add a similar > check to > the aesni_gcm library's meson.build file, so that the auto-detection > of > dependencies works correctly. >=20 > Signed-off-by: Bruce Richardson < > bruce.richardson@intel.com > > > --- > drivers/crypto/aesni_gcm/meson.build | 11 +++++++++++ > 1 file changed, 11 insertions(+) >=20 > diff --git a/drivers/crypto/aesni_gcm/meson.build > b/drivers/crypto/aesni_gcm/meson.build > index 70f57ad73..7183cfcba 100644 > --- a/drivers/crypto/aesni_gcm/meson.build > +++ b/drivers/crypto/aesni_gcm/meson.build > @@ -1,11 +1,22 @@ > # SPDX-License-Identifier: BSD-3-Clause > # Copyright(c) 2018 Intel Corporation > =20 > +IMB_required_ver =3D '0.52.0' > lib =3D cc.find_library('IPSec_MB', required: false) > if not lib.found() > build =3D false > else > ext_deps +=3D lib Shouldn't this be moved into a new else branch after the version check? > + > + # version comes with quotes, so we split based on " and take > the middle > + imb_ver =3D cc.get_define('IMB_VERSION_STR', > + prefix : '#include').split('"')[1] > + > + if (imb_ver =3D=3D '') or (imb_ver.version_compare('<' + > IMB_required_ver)) > + message('IPSec_MB version >=3D @0@ is required, found > version @1@'.format( > + IMB_required_ver, imb_ver)) > + build =3D false > + endif > endif > =20 > allow_experimental_apis =3D true >=20 --=20 Kind regards, Luca Boccassi