On Wed, Jun 21, 2023 at 11:54 AM David Marchand <david.marchand@redhat.com> wrote:
On Tue, Jun 20, 2023 at 5:05 PM Bruce Richardson
<bruce.richardson@intel.com> wrote:
>
> On Tue, Jun 20, 2023 at 04:33:15PM +0200, Thomas Monjalon wrote:
> > 20/06/2023 11:03, Bruce Richardson:
> > > On Tue, Jun 20, 2023 at 10:48:50AM +0200, David Marchand wrote:
> > > > On Tue, Jun 20, 2023 at 10:45 AM Bruce Richardson
> > > > <bruce.richardson@intel.com> wrote:
> > > > > > > > > I notice the change in behaviour for enabling the deprecated libs. Is there
> > > > > > > > > any other change in behaviour for current users?
> > > > > > > >
> > > > > > > > The only change I see, is that this implementation breaks enabling
> > > > > > > > deprecated libs via disable_libs.
> > > > > > > > It may break existing developer build directory and maybe some
> > > > > > > > packaging scripts, this is why I am a bit puzzled.
> > > > > > > >
> > > > > > > > Relooking at the disable_libs option current implementation, it seems
> > > > > > > > backward to pass a disable_libs option when you want to build some
> > > > > > > > deprecated library.
> > > > > > > > It is more straightforward to request building libraries via
> > > > > > > > -Denable_libs=<deprecated_lib> explicitly or -Denable_libs=*
> > > > > > > > implicitly.
> > > > > > > >
> > > > > > > > But again, we may be breaking something for people who relied on this behavior.
> > > > > > > >
> > > > > > >
> > > > > > > That's what I expected, and I think that is ok. I just wanted to check that
> > > > > > > the change in behaviour was only for the deprecated libs case.
> > > > > >
> > > > > > Thomas, wdyt?
> > > > > > It requires some release note, at least.
> > > > > >
> > > > > I am assuming this is not targetting this release though, right? Assuming
> > > > > 23.11, we can put in a deprecation note informing of the change ahead of
> > > > > time too.
> > > >
> > > > I was hoping to get it in this release.
> > > > But I am fine with postponing and announcing the change beforehand.
> > > >
> > > Given the fact that we are likely changing behaviour, and the fact that the
> > > deprecated libs makes it more complicated than the drivers one (since we
> > > have always on, default on and default off cases to consider), I think it's
> > > best we don't rush this.
> >
> > I'm not sure what is the best behaviour.
> > I tend to think such options should be simple to understand
> > with only 3 cases:
> > - no option -> default
> > - enable option -> only core mandatory and listed libraries
> > - disable option -> all but the listed libraries
> > It looks simpler to forbid having both enable and disable libraries.
> >
> > Would you be open to change the behaviour of the drivers options?
> >
>
> [reducing CC list a bit]
>
> As a further follow-up, I really think we need to move slowly and more
> carefully on this. While I can see the simplicity in disallowing the two
> options to be specified, depending on how we go about choosing the
> enabling of the deprecated libs, we may want to keep support for allowing
> both.

I agree, we need more time on this topic, sorry for being pushy earlier :-).


>
> Specifically, my current concern/thinking is:
> * David points out that using the "disabled_libs" options may not make the
>   most logic sense for *enabling* deprecated libs.
> * While that is true, I think the usability of enabling them via
>   "enabled_libs" could be pretty terrible - unless we start adding more
>   complications. Specifically, if someone wants to just enable KNI in the
>   build using "enable_libs", specifying "-Denable_libs=kni" will not do
>   what they want - sure it will enable kni, but will disable dozens of
>   other parts of DPDK.
> * Therefore, I think keeping the disabling of deprecated parts of DPDK via
>   disabled_libs is easier on users - though agreed it is slightly less
>   logical. However, if we forbid using enabled and disabled options
>   together, that would mean that to switch to enabled libs style, the user
>   has to set both enabled libs, *and* clear the default disabled libs option
>   of the deprecated ones.
> * Therefore, right now I'm tending more towards something like the status
>   quo - disabling deprecated via disable option, but allowing both enable
>   and disable options together. This hasn't caused us issues with drivers
>   thus far, so I'd be hopeful for using it for libs.

Mixing enable/disable_drivers has been possible since the introduction
of enable_drivers.
Looking at the code, it is unclear the intention was to make them exclusive.
Is there no usecase for using both options in some soc configuration?
Juraj, do you have an opinion?


I seem to remember that there wasn't any intention of using them together - I think I did it this way because it was essentially "free" (i.e. the ability to use them together was an extra feature on top of what we needed).

The SoC considerations were for cross compilation between Arm microarchitectures/SoCs - use enable_drivers mainly to enable only a handful of relevant drivers for small SoC's when building on a server grade SoC. The same applies for disable_drivers - the server grade SoC where we're building may have extra dependencies that we may not want/need on the target (possibly server-grade) system. They don't need to be used in conjunction in these scenarios.
 

>
> The other alternative, is we come up with:
> * another scheme for managing deprecated libs
> * a special keyword for enabled libs to cover the default case, that one
>   can use to add on the deprecated libs, without having to call out each
>   and every other optional library.

I think a separate option to control deprecated libraries would be better.
This option would control whether the deprecation libs are part of the
optional libraries list.
The optional libraries list would then be evaluated according to
enable/disable_libs.

I'll try this to see how it behaves.


--
David Marchand