[dpdk-dev] [PATCH v2 1/3] crypto/zuc: use IPSec library
Bruce Richardson
bruce.richardson at intel.com
Mon Jan 13 13:46:14 CET 2020
On Mon, Jan 13, 2020 at 12:45:14PM +0000, Bruce Richardson wrote:
> On Mon, Jan 13, 2020 at 11:40:23AM +0000, Pablo de Lara wrote:
> > Link against Intel IPSec Multi-buffer library, which
> > added support for ZUC-EEA3 and ZUC-EIA3 from version v0.53,
> > moving from libSSO ZUC library.
> >
> > Signed-off-by: Pablo de Lara <pablo.de.lara.guarch at intel.com>
> > ---
> > devtools/test-build.sh | 6 ++--
> > doc/guides/cryptodevs/zuc.rst | 52 ++++++++++++++++++++--------------
> > doc/guides/rel_notes/release_20_02.rst | 7 +++++
> > drivers/crypto/zuc/Makefile | 28 +++++++++++-------
> > drivers/crypto/zuc/meson.build | 24 ++++++++++++----
> > drivers/crypto/zuc/rte_zuc_pmd.c | 51 ++++++++++++++++++++++++---------
> > drivers/crypto/zuc/rte_zuc_pmd_ops.c | 2 ++
> > drivers/crypto/zuc/zuc_pmd_private.h | 6 +++-
> > mk/rte.app.mk | 2 +-
> > 9 files changed, 120 insertions(+), 58 deletions(-)
> >
>
> <snip>
>
> > diff --git a/drivers/crypto/zuc/meson.build b/drivers/crypto/zuc/meson.build
> > index b231de0..b7098a3 100644
> > --- a/drivers/crypto/zuc/meson.build
> > +++ b/drivers/crypto/zuc/meson.build
> > @@ -1,14 +1,26 @@
> > # SPDX-License-Identifier: BSD-3-Clause
> > -# Copyright(c) 2018 Intel Corporation
> > +# Copyright(c) 2018-2019 Intel Corporation
> >
> > -lib = cc.find_library('sso_zuc', required: false)
> > -if not lib.found() or not cc.has_header('sso_zuc.h')
> > +IMB_required_ver = '0.53.0'
> > +lib = cc.find_library('IPSec_MB', required: false)
> > +if not lib.found()
> > build = false
> > - reason = 'missing dependency, "libsso_zuc"'
> > - subdir_done()
> > + reason = 'missing dependency, "libIPSec_MB"'
> > +else
> > + ext_deps += lib
> > +
> > + # version comes with quotes, so we split based on " and take the middle
> > + imb_ver = cc.get_define('IMB_VERSION_STR',
> > + prefix : '#include<intel-ipsec-mb.h>').split('"')[1]
> > +
> > + if (imb_ver == '') or (imb_ver.version_compare('<' + IMB_required_ver))
> > + message('IPSec_MB version >= @0@ is required, found version @1@'.format(
> > + IMB_required_ver, imb_ver))
> > + build = false
>
> Rather than/As well as printing a message here, you also need to provide a
> reason when setting build = false, so the summary at the end can report why
> the driver is not being built.
>
> > + endif
> > +
> > endif
> >
> > allow_experimental_apis = true
> > -ext_deps += lib
>
> If you drop the line after the else above, you can keep this line and
> shrink the diff by 2 lines. :-)
>
> /Bruce
BTW: Same comments apply to other two patches in the set.
/Bruce
More information about the dev
mailing list