All of lore.kernel.org
 help / color / mirror / Atom feed
From: Aaron Conole <aconole@redhat.com>
To: David Marchand <david.marchand@redhat.com>
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 <maicolgabriel@hotmail.com>,
	 Bruce Richardson <bruce.richardson@intel.com>,
	Dave Young <dave@youngcopy.com>
Subject: Re: [PATCH v5 1/2] build: select deprecated libraries
Date: Thu, 29 Jun 2023 08:44:15 -0400	[thread overview]
Message-ID: <f7tbkgymo9s.fsf@redhat.com> (raw)
In-Reply-To: <20230628132004.340074-2-david.marchand@redhat.com> (David Marchand's message of "Wed, 28 Jun 2023 15:20:03 +0200")

David Marchand <david.marchand@redhat.com> 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 <david.marchand@redhat.com>
> ---
> 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 () # <dir> <builddir> <meson options>
>  		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-<VERSION>', 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:


  reply	other threads:[~2023-06-29 12:44 UTC|newest]

Thread overview: 70+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-10 16:48 [PATCH 0/5] Extend optional libraries list David Marchand
2021-11-10 16:48 ` [PATCH 1/5] ci: test build with minimum configuration David Marchand
2021-11-16 17:06   ` Thomas Monjalon
2021-11-16 20:39     ` David Marchand
2021-11-16 21:47       ` Thomas Monjalon
2021-11-10 16:48 ` [PATCH 2/5] build: make GRO/GSO optional David Marchand
2021-11-16 17:11   ` Thomas Monjalon
2021-11-10 16:48 ` [PATCH 3/5] build: make metrics libraries optional David Marchand
2021-11-16 17:12   ` Thomas Monjalon
2021-11-10 16:48 ` [PATCH 4/5] build: make pdump optional David Marchand
2021-11-16 17:14   ` Thomas Monjalon
2021-11-10 16:48 ` [PATCH 5/5] build: select optional libraries David Marchand
2021-11-10 17:34   ` Bruce Richardson
2021-11-16 17:25     ` Thomas Monjalon
2021-11-17 10:47       ` Bruce Richardson
2021-11-17 11:27         ` David Marchand
2022-01-07 16:13           ` Morten Brørup
2022-01-07 16:47             ` Stephen Hemminger
2021-11-10 17:34 ` [PATCH 0/5] Extend optional libraries list Bruce Richardson
2021-11-17 11:28 ` [PATCH v2 " David Marchand
2021-11-17 11:28   ` [PATCH v2 1/5] ci: test minimum configuration David Marchand
2021-11-17 11:50     ` Thomas Monjalon
2021-11-17 13:38     ` Aaron Conole
2021-11-17 11:28   ` [PATCH v2 2/5] build: make GRO/GSO optional David Marchand
2021-11-17 11:28   ` [PATCH v2 3/5] build: make metrics libraries optional David Marchand
2021-11-17 11:28   ` [PATCH v2 4/5] build: make pdump optional David Marchand
2021-11-17 11:28   ` [PATCH v2 5/5] build: select optional libraries David Marchand
2023-06-16  7:14     ` [PATCH v3] " David Marchand
2023-06-16  9:42       ` Bruce Richardson
2023-06-19  8:00         ` David Marchand
2023-06-19 14:11       ` David Marchand
2023-06-19 14:26         ` Bruce Richardson
2023-06-20  8:31           ` David Marchand
2023-06-20  8:35             ` Bruce Richardson
2023-06-20  8:38               ` David Marchand
2023-06-20  8:44                 ` Bruce Richardson
2023-06-20  8:48                   ` David Marchand
2023-06-20  9:03                     ` Bruce Richardson
2023-06-20 14:33                       ` Thomas Monjalon
2023-06-20 14:40                         ` Bruce Richardson
2023-06-20 15:01                         ` Bruce Richardson
2023-06-21  9:54                           ` David Marchand
2023-06-21 10:49                             ` Bruce Richardson
2023-06-21 11:35                               ` Morten Brørup
2023-06-22  9:27                             ` Juraj Linkeš
2023-06-21 17:00     ` [PATCH v4 0/4] Select " David Marchand
2023-06-21 17:00       ` [PATCH v4 1/4] kni: move IOVA build check David Marchand
2023-06-22  8:37         ` Bruce Richardson
2023-06-21 17:00       ` [PATCH v4 2/4] build: rename enabled libraries list David Marchand
2023-06-22  8:38         ` Bruce Richardson
2023-06-21 17:00       ` [PATCH v4 3/4] build: select deprecated libraries David Marchand
2023-06-22  8:43         ` Bruce Richardson
2023-06-22  8:50           ` Bruce Richardson
2023-06-23  9:35           ` David Marchand
2023-06-23 11:04             ` Bruce Richardson
2023-06-23 11:15               ` Morten Brørup
2023-06-23 11:19                 ` Bruce Richardson
2023-06-23 11:32                   ` Morten Brørup
2023-06-28 12:10                     ` David Marchand
2023-06-21 17:00       ` [PATCH v4 4/4] build: select optional libraries David Marchand
2023-06-22  8:49         ` Bruce Richardson
2023-06-22  9:09       ` [PATCH v4 0/4] Select " Bruce Richardson
2023-06-22 16:41         ` Thomas Monjalon
2023-06-28 13:20     ` [PATCH v5 0/2] " David Marchand
2023-06-28 13:20       ` [PATCH v5 1/2] build: select deprecated libraries David Marchand
2023-06-29 12:44         ` Aaron Conole [this message]
2023-06-28 13:20       ` [PATCH v5 2/2] build: select optional libraries David Marchand
2023-06-28 14:48       ` [PATCH v5 0/2] Select " Morten Brørup
2023-07-17 12:54         ` Bruce Richardson
2021-11-17 11:52   ` [PATCH v2 0/5] Extend optional libraries list 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=f7tbkgymo9s.fsf@redhat.com \
    --to=aconole@redhat.com \
    --cc=bluca@debian.org \
    --cc=bruce.richardson@intel.com \
    --cc=dave@youngcopy.com \
    --cc=david.marchand@redhat.com \
    --cc=dev@dpdk.org \
    --cc=i.maximets@ovn.org \
    --cc=james.r.harris@intel.com \
    --cc=maicolgabriel@hotmail.com \
    --cc=mohammed@hawari.fr \
    --cc=thomas@monjalon.net \
    --cc=tredaelli@redhat.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.