All of lore.kernel.org
 help / color / mirror / Atom feed
From: Joachim Wiberg <troglobit@gmail.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH v2 1/1] package/libteam: new package
Date: Mon, 19 Jul 2021 09:53:51 +0200	[thread overview]
Message-ID: <87o8ayviwg.fsf@gmail.com> (raw)
In-Reply-To: <20210717170411.GW12203@scaer>


Hi Yann!

On Sat, Jul 17, 2021 at 19:04, "Yann E. MORIN" <yann.morin.1998@free.fr> wrote:
> On 2021-07-15 10:34 +0200, Joachim Wiberg spake thusly:
>> [snip]
>> Team devices require the following kernel config, the most common modes
>> have been included to be enabled when this package is selected:
>>     CONFIG_NET_TEAM=y
> This also needs NETDEVICES and NET_CORE. Arguably, those two will most
> probably be selected, but still...

Ah, thanks or course!

>>     CONFIG_NET_TEAM_MODE_ACTIVEBACKUP=y
>>     CONFIG_NET_TEAM_MODE_LOADBALANCE=y
> Is it really necessary to select those last two?

I think least one mode should be enabled, but then I'm just focusing
too much on my particular use-case (active-backup).

> Load-balancing requires BPF, too, to load the BPF function that will do
> the port selection.

True, so that one goes without saying.

> But I would really just leave it up to the user to enable whatever mode
> they need/want; just enforce CONFIG_NET_TEAM=y (and NETDEVICES and
> NET_CORE, of course).

Hmm, OK you're right.  We shouldn't guess what the user needs and this
being an advanced component make that pretty clear.  Thank you!

>> [snop]
>> +++ b/package/libteam/Config.in
>> @@ -0,0 +1,26 @@
>> +config BR2_PACKAGE_LIBTEAM
>> +	bool "libteam"
>> +	depends on BR2_USE_MMU # fork()
>> +	select BR2_PACKAGE_JANSSON
>> +	select BR2_PACKAGE_LIBDAEMON
>> +	select BR2_PACKAGE_LIBNL
>> +	select BR2_PACKAGE_LIBNL_TOOLS
> As noted by Yegor previopusly, you need to propagate the dependencies of
> the packags you select;
>     depends on BR2_TOOLCHAIN_HAS_THREADS  # libnl
>     depends on !BR2_STATIC_LIBS  # libnl-tools
>     select BR2_PACKAGE_LIBNL
>     select BR2_PACKAGE_LIBNL_TOOLS

Ahaa, now I'm finally starting to understand! :)

>> +comment "libnl tools needs a toolchain w/ dynamic library"
> This is not libnl, but libteam (the comment is about this package).

Got it, that makes much more sense.  I really didn't get it
the first time around.  Sorry for the mess.

>> +	depends on BR2_STATIC_LIBS
> The comment should also depend on MMU, so that it is not visible when
> MMU is not enabled.

OK, fixing.

>> +comment "libnl needs a toolchain w/ threads"
>> +	depends on !BR2_TOOLCHAIN_HAS_THREADS
> Ditto, this is libteam, and it should also depend on MMU.

Just read through a ton of other Config.in's, and I think I've got
it now how depe?dencies and the user-friendly comment helper work.

>> [snip]
>> +LIBTEAM_VERSION = 1.31
>> +LIBTEAM_SITE = $(call github,jpirko,libteam,v$(LIBTEAM_VERSION))
>> +LIBTEAM_AUTORECONF = YES
>> +LIBTEAM_LICENSE = LGPL-2.1+
>> +LIBTEAM_LICENSE_FILES = COPYING
>> +LIBTEAM_INSTALL_STAGING = YES
>> +LIBTEAM_DEPENDENCIES = host-pkgconf jansson libdaemon libnl
> Pet-peeve of mine, about the ordering:
> This is enforced nowhere, is decribed nowhere, but it follows quite a
> logical ordering and grouping:

Thank you for taking the time to explain, it does indeed make sense,
I will fix that too in v3.

Cheers
 /Joachim

      reply	other threads:[~2021-07-19  7:53 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-15  8:34 [Buildroot] [PATCH v2 0/1] Add support for teamd/libteam Joachim Wiberg
2021-07-15  8:34 ` [Buildroot] [PATCH v2 1/1] package/libteam: new package Joachim Wiberg
2021-07-17 17:04   ` Yann E. MORIN
2021-07-19  7:53     ` Joachim Wiberg [this message]

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=87o8ayviwg.fsf@gmail.com \
    --to=troglobit@gmail.com \
    --cc=buildroot@busybox.net \
    /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.