[PATCH v4 3/4] build: select deprecated libraries

Morten Brørup mb at smartsharesystems.com
Fri Jun 23 13:32:54 CEST 2023


> From: Bruce Richardson [mailto:bruce.richardson at intel.com]
> Sent: Friday, 23 June 2023 13.19
> 
> On Fri, Jun 23, 2023 at 01:15:00PM +0200, Morten Brørup wrote:
> > > From: Bruce Richardson [mailto:bruce.richardson at intel.com]
> > > Sent: Friday, 23 June 2023 13.04
> > >
> > > On Fri, Jun 23, 2023 at 11:35:29AM +0200, David Marchand wrote:
> > > > Hello Bruce,
> > > >
> > > > On Thu, Jun 22, 2023 at 10:43 AM Bruce Richardson
> > > > <bruce.richardson at intel.com> wrote:
> > > > >
> > > > > On Wed, Jun 21, 2023 at 07:00:57PM +0200, David Marchand wrote:
> > > > > > 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 at redhat.com>
> > > > >
> > > > > This gives us a single on/off value for the deprecated libs. So if you
> > > > > wants to build only a single deprecated lib, you need to turn on this
> > > > > option and then use "disable_libs/enable_libs" option to then
> selectively
> > > > > pick which of the deprecated libs you actually want. Is that the
> expected
> > > > > behaviour? Just checking that we don't want this to be a list too.
> > > >
> > > > Yes, I wanted a single unified filtering stage.
> > > >
> > > > But I think your suggestion is easier to use.
> > >
> > > Slightly easier for the simple case.
> > >
> > > >
> > > > - That would make it simpler for people who simply want to enable kni,
> > > > as you mentionned before:
> > > > $ meson setup plop -Denable_deprecated_libs=kni
> > > >
> > > > But I would make this list not overlap with the disable/enable_libs
> > > > options evaluation.
> > > > Otherwise, in the case of a enable_libs user, the user would have to
> > > > set kni in both lists, which is not that great:
> > > > $ meson setup plop -Denable_deprecated_libs=kni -Denable_libs=kni,vhost
> > > >
> > > > Instead, I would make it so the config is done as:
> > > > $ meson setup plop -Denable_deprecated_libs=kni -Denable_libs=vhost
> > > >
> > > > Is this what you had in mind?
> > > >
> > > I'm not sure myself what I had in mind, just asking if it had been
> > > considered as much as anything else.
> > >
> > > Having them not-overlap would seem to be necessary to provide a meaningful
> > > interface.
> > >
> > > >
> > > > - I don't have a usage for this, but if we go with separating
> > > > deprecated and "normal" optional libs filtering, should I introduce a
> > > > disable_deprecated_libs too?
> > > >
> > >
> > > That would give us *way* to many options. I think for the sake of
> simplicity
> > > we probably are as well to just go with what you are proposing in this
> set.
> > > Since we only have two deprecated libraries - and hopefully never many
> more -
> > > the benefit of the list for that setting is probably minimal. I'm keen to
> > > avoid too much complexity if we can manage it.
> >
> > I strongly agree with Bruce about avoiding too many options. Here's an idea:
> >
> > How about just having the disable/enable_libs options, and by default omit
> the deprecated libs.
> >
> > Then, the deprecated libs can be enabled by using the enable_libs option.
> >
> 
> That was the original suggestion and implementation. The trouble is that
> if you specify, for example, -Denable_libs=kni, you have just disabled
> every other optional library in DPDK, since the enable_libs option switches
> DPDK to "allowlist"-only mode.

OK. Hmmm.... Perhaps we can accept that, using this argument:

If you are in a situation where you are using some deprecated libs, you probably also know exactly which other optional libs you are using. So you must specify the full list on enable_libs.

I won't object if anyone disagrees with this idea. I'm only trying to keep it simple. :-)

> 
> > Do we have special treatment for deprecated drivers?
> >
> Its the best solution we have come up with so far to work around the above
> problem.
> 
> /Bruce


More information about the dev mailing list