From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id C1EC942D8C; Thu, 29 Jun 2023 14:44:20 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9B3A040EDB; Thu, 29 Jun 2023 14:44:20 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mails.dpdk.org (Postfix) with ESMTP id 86DE7406B7 for ; Thu, 29 Jun 2023 14:44:19 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1688042659; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=6Jw00XHYmIbVuG+3/nzY8vOdHKSycU8DbglxNOHrvfE=; b=hbY6Js4I3/kklNqWJCYgUnFG6Esn5T92lickfRyPdjRPgpw1hmTys8qu8jlmjRZTrgiFQn DyxECdflimjlYjTBkpju/fWVmAB9bVe+HnWV21viHEI/27Gpat0G/M+6t6z5T9u+Boyk9b 9HcHcixtvdLYdfnw0bhTLCdKVKuOVM4= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-150-5K-fAHtUO1G_0Uvs6ShjoA-1; Thu, 29 Jun 2023 08:44:17 -0400 X-MC-Unique: 5K-fAHtUO1G_0Uvs6ShjoA-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 9DDB6185A7A4; Thu, 29 Jun 2023 12:44:16 +0000 (UTC) Received: from RHTPC1VM0NT (unknown [10.22.32.232]) by smtp.corp.redhat.com (Postfix) with ESMTPS id AAA284087C6A; Thu, 29 Jun 2023 12:44:15 +0000 (UTC) From: Aaron Conole To: David Marchand Cc: dev@dpdk.org, thomas@monjalon.net, bluca@debian.org, tredaelli@redhat.com, i.maximets@ovn.org, james.r.harris@intel.com, mohammed@hawari.fr, Michael Santana , Bruce Richardson , Dave Young Subject: Re: [PATCH v5 1/2] build: select deprecated libraries References: <20211117112847.7362-6-david.marchand@redhat.com> <20230628132004.340074-1-david.marchand@redhat.com> <20230628132004.340074-2-david.marchand@redhat.com> Date: Thu, 29 Jun 2023 08:44:15 -0400 In-Reply-To: <20230628132004.340074-2-david.marchand@redhat.com> (David Marchand's message of "Wed, 28 Jun 2023 15:20:03 +0200") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.2 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain 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 David Marchand writes: > Rework deprecated libraries selection by introducing a new configuration > option. > > This breaks existing configurations that were relying on disable_libs='' > for enabling deprecated libraries. > On the other hand, it will make enabling optional libraries more > straightforward by taking the deprecated libraries out of the picture. > > Signed-off-by: David Marchand > --- > Changes since v4: > - changed the option to a list of libraries instead of a global on/off > knob, > - moved all deprecated libs checks under a single block for readability, Looks nice. I guess we can also update guides/prog_guide/kernel_nic_interface.rst guides/prog_guide/flow_classify_lib.rst with something like the following: diff --git a/doc/guides/prog_guide/flow_classify_lib.rst b/doc/guides/prog_guide/flow_classify_lib.rst index ad2e10ec26..c2706b8d46 100644 --- a/doc/guides/prog_guide/flow_classify_lib.rst +++ b/doc/guides/prog_guide/flow_classify_lib.rst @@ -10,8 +10,9 @@ Flow Classification Library See :doc:`../rel_notes/deprecation`. It is disabled by default in the DPDK build. - To re-enable the library, remove 'flow_classify' from the "disable_libs" - meson option when configuring a build. + To re-enable the library, tell meson to enable 'flow_classify' as part of + the deprecated libraries meson + option ``-Denable_deprecated_libs=flow_classify``. DPDK provides a Flow Classification library that provides the ability to classify an input packet by matching it against a set of Flow rules. diff --git a/doc/guides/prog_guide/kernel_nic_interface.rst b/doc/guides/prog_guide/kernel_nic_interface.rst index 392e5df75f..1097ecc695 100644 --- a/doc/guides/prog_guide/kernel_nic_interface.rst +++ b/doc/guides/prog_guide/kernel_nic_interface.rst @@ -18,7 +18,8 @@ Kernel NIC Interface .. note:: KNI is disabled by default in the DPDK build. - To re-enable the library, remove 'kni' from the "disable_libs" meson option when configuring a build. + To re-enable the library, tell meson to enable 'kni' as part of the + deprecated libraries meson option ``-Denable_deprecated_libs=kni``. The DPDK Kernel NIC Interface (KNI) allows userspace applications access to the Linux* control plane. --- > --- > .ci/linux-build.sh | 2 +- > devtools/test-meson-builds.sh | 8 ++++---- > lib/meson.build | 28 ++++++++++++++++++++-------- > meson_options.txt | 4 +++- > 4 files changed, 28 insertions(+), 14 deletions(-) > > diff --git a/.ci/linux-build.sh b/.ci/linux-build.sh > index 45f2729996..e0b62bac90 100755 > --- a/.ci/linux-build.sh > +++ b/.ci/linux-build.sh > @@ -97,7 +97,7 @@ if [ "$MINI" = "true" ]; then > OPTS="$OPTS -Denable_drivers=net/null" > OPTS="$OPTS -Ddisable_libs=*" > else > - OPTS="$OPTS -Ddisable_libs=" > + OPTS="$OPTS -Denable_deprecated_libs=*" > fi > OPTS="$OPTS -Dlibdir=lib" > > diff --git a/devtools/test-meson-builds.sh b/devtools/test-meson-builds.sh > index 84b907d2ea..c41659d28b 100755 > --- a/devtools/test-meson-builds.sh > +++ b/devtools/test-meson-builds.sh > @@ -120,10 +120,10 @@ config () # > return > fi > options= > - # deprecated libs may be disabled by default, so for complete builds ensure > - # no libs are disabled > - if ! echo $* | grep -q -- 'disable_libs' ; then > - options="$options -Ddisable_libs=" > + # deprecated libs are disabled by default, so for complete builds > + # enable them > + if ! echo $* | grep -q -- 'enable_deprecated_libs' ; then > + options="$options -Denable_deprecated_libs=*" > fi > if echo $* | grep -qw -- '--default-library=shared' ; then > options="$options -Dexamples=all" > diff --git a/lib/meson.build b/lib/meson.build > index fac2f52cad..73afd90b38 100644 > --- a/lib/meson.build > +++ b/lib/meson.build > @@ -93,6 +93,15 @@ dpdk_libs_deprecated += [ > 'kni', > ] > > +enable_deprecated_libs = [] > +foreach l:run_command(list_dir_globs, get_option('enable_deprecated_libs'), > + check: true).stdout().split() > + if not dpdk_libs_deprecated.contains(l) > + continue > + endif > + enable_deprecated_libs += l > +endforeach > + > disabled_libs = [] > opt_disabled_libs = run_command(list_dir_globs, get_option('disable_libs'), > check: true).stdout().split() > @@ -137,16 +146,19 @@ foreach l:libraries > deps += ['eal'] > endif > > - if disabled_libs.contains(l) > - build = false > - reason = 'explicitly disabled via build config' > - if dpdk_libs_deprecated.contains(l) > - reason += ' (deprecated lib)' > - endif > - else > - if dpdk_libs_deprecated.contains(l) > + if dpdk_libs_deprecated.contains(l) > + if not enable_deprecated_libs.contains(l) > + build = false > + reason = 'not in enabled deprecated libraries build config' > + else > warning('Enabling deprecated library, "@0@"'.format(l)) > endif > + elif disabled_libs.contains(l) > + build = false > + reason = 'explicitly disabled via build config' > + endif > + > + if build > subdir(l) > endif > if name != l > diff --git a/meson_options.txt b/meson_options.txt > index 82c8297065..839d4266c6 100644 > --- a/meson_options.txt > +++ b/meson_options.txt > @@ -10,7 +10,7 @@ option('disable_apps', type: 'string', value: '', description: > 'Comma-separated list of apps to explicitly disable.') > option('disable_drivers', type: 'string', value: '', description: > 'Comma-separated list of drivers to explicitly disable.') > -option('disable_libs', type: 'string', value: 'flow_classify,kni', description: > +option('disable_libs', type: 'string', value: '', description: > 'Comma-separated list of libraries to explicitly disable. [NOTE: not all libs can be disabled]') > option('drivers_install_subdir', type: 'string', value: 'dpdk/pmds-', description: > 'Subdirectory of libdir where to install PMDs. Defaults to using a versioned subdirectory.') > @@ -18,6 +18,8 @@ option('enable_docs', type: 'boolean', value: false, description: > 'build documentation') > option('enable_apps', type: 'string', value: '', description: > 'Comma-separated list of apps to build. If unspecified, build all apps.') > +option('enable_deprecated_libs', type: 'string', value: '', description: > + 'Comma-separated list of deprecated libraries to explicitly enable.') > option('enable_drivers', type: 'string', value: '', description: > 'Comma-separated list of drivers to build. If unspecified, build all drivers.') > option('enable_driver_sdk', type: 'boolean', value: false, description: