DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Morten Brørup" <mb@smartsharesystems.com>
To: "David Marchand" <david.marchand@redhat.com>,
	"Bruce Richardson" <bruce.richardson@intel.com>
Cc: "Thomas Monjalon" <thomas@monjalon.net>, "dev" <dev@dpdk.org>,
	"Luca Boccassi" <bluca@debian.org>,
	"Timothy Redaelli" <tredaelli@redhat.com>,
	"Ilya Maximets" <i.maximets@ovn.org>,
	"Jim Harris" <james.r.harris@intel.com>, <mohammed@hawari.fr>
Subject: RE: [PATCH 5/5] build: select optional libraries
Date: Fri, 7 Jan 2022 17:13:04 +0100	[thread overview]
Message-ID: <98CBD80474FA8B44BF855DF32C47DC35D86DED@smartserver.smartshare.dk> (raw)
In-Reply-To: <CAJFAV8wVPuH+S129L3tL3HPaR=+ZidLE6GKFR1g5BBY+Wih_AQ@mail.gmail.com>

> From: David Marchand [mailto:david.marchand@redhat.com]
> Sent: Wednesday, 17 November 2021 12.27
> 
> On Wed, Nov 17, 2021 at 11:47 AM Bruce Richardson
> <bruce.richardson@intel.com> wrote:
> >
> > On Tue, Nov 16, 2021 at 06:25:28PM +0100, Thomas Monjalon wrote:
> > > 10/11/2021 18:34, Bruce Richardson:
> > > > On Wed, Nov 10, 2021 at 05:48:14PM +0100, David Marchand wrote:
> > > > > There is currently no way to know which libraries are optional.
> > > > > Introduce a enable_libs option (close to what we have for
> drivers) so
> > > > > that packagers or projects consuming DPDK can more easily
> select the
> > > > > optional libraries that matter to them and disable other
> optional
> > > > > libraries.
> > > > >
> > > > > Note: the enabled_libs variable is renamed for sake of
> consistency.
> > > > >
> > > > > Signed-off-by: David Marchand <david.marchand@redhat.com>
> > > > > ---
> > > > This is the only patch of this set I would have some concerns
> about. I'm
> > > > just not sure that it makes sense to have this option for
> libraries
> > > > compared to drivers.
> > > >
> > > > Specifically:
> > > > * We have over 200 drivers in DPDK (rough count using find), of
> which 2 are
> > > >   mandatory, and therefore specifying just 1 or 2 that you want
> can make
> > > >   sense.
> > > > * On the other hand, we have 53 libraries, of which only 7 or so
> (after
> > > >   this patchset) are optional. This means that use of the term
> > > >   "enable_libs" is misleading - at least to me - in that it's
> only a very
> > > >   small proportion of the libs which would be affected by that
> flag
> > > >   (compared to 99% of the drivers)
> > >
> > > The options are described like this:
> > >
> > > option('disable_libs', type: 'string', value: '', description:
> > >        'Comma-separated list of libraries to explicitly disable.
> [NOTE: not all libs can be disabled]')
> > > +option('enable_libs', type: 'string', value: '', description:
> > > +       'Comma-separated list of libraries to explicitly enable.')
> > >
> > > I feel we should mention it is enabling optional libraries,
> > > and the default is to enable all.
> > >
> > > > * Also, while the number of mandatory drivers is unlikely to
> change much
> > > >   (since there are only 2), it should be fairly safe to do builds
> using
> > > >   "--enable-drivers". On the other hand, the list of libraries
> affected by
> > > >   "--enable-libs" is likely to change, so short of each user
> naming each
> > > >   and every lib they use (and each library those depend on), to
> the list,
> > > >   it's quite possible that any --enable-libs use could lead to a
> broken
> > > >   build in future if a library changes from mandatory to
> optional.
> > >
> > > In order to be safe, the user can list all required libs,
> > > including non-optional ones.
> > >
> >
> > Yes, they can, but that is the part I'm concerned about. It should
> not be
> > expected for users to know what all libraries should be needed and
> > dependencies between them. The list of mandatory libraries is quite
> long.
> >
> > > > Overall, I'm just concerned that this flag is premature, and
> would prefer
> > > > to keep it just to the disable option until we are confident that
> out
> > > > "optional library" list is relatively settled.
> > >
> > > I see it the opposite way:
> > > Someone who does not wish to deliver extra libs could use this
> option
> > > to list the required libs, so not-required libs will disappear from
> > > the build once they are declared optional in future releases.
> > >
> >
> > Yes, though as-above, I'm concerned about the difficulty of building
> up
> > such a list. However, if this option is only for "expert" and
> > distro-packaging use, then I suppose it's reasonable. Perhaps we
> should add
> > a warning to the doc line too, noting that it's only recommended for
> > advanced users.
> >
> 
> Ok, we still need some discussion.
> I'll just respin for Thomas to merge patches that are ready.

This patch is a step in the right direction. Thank you.

Adding my opinion to the discussion will be a long rant from a grumpy old minimalist (working on dedicated network appliances, not Linux distros), so here goes:

The goal should be making all non-core libraries optional. And off the top of my head, these are the only core libraries:
EAL, mbuf, mempool, ring.

And yes, that also means that not even the simplest example applications can compile with only the core libraries. However, the ability to build a minimal dpdk.so should not depend on what is required to be able to build any example applications. In other words: If an example application cannot be built due to an omitted library, then do not build that application.

E.g. an Ethernet bridge application does not need any IP or routing libraries, so they are not core libraries.

I consider the mbuf library and the libraries it uses (i.e. mempool and ring) core libraries, because the core purpose of DPDK is to provide a data plane library, and all DPDK data plane application use mbufs. :-)

BTW, I also consider the ethdev library extremely bloated, with Flow, Metering, Traffic Management and ever more being added into one big monolithic library instead of separate libraries or modules.


  reply	other threads:[~2022-01-07 16:13 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 [this message]
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
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=98CBD80474FA8B44BF855DF32C47DC35D86DED@smartserver.smartshare.dk \
    --to=mb@smartsharesystems.com \
    --cc=bluca@debian.org \
    --cc=bruce.richardson@intel.com \
    --cc=david.marchand@redhat.com \
    --cc=dev@dpdk.org \
    --cc=i.maximets@ovn.org \
    --cc=james.r.harris@intel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).