Skip to content

libteam: new package#28045

Merged
BKPepe merged 1 commit intoopenwrt:masterfrom
LGA1150:libteam
Jan 8, 2026
Merged

libteam: new package#28045
BKPepe merged 1 commit intoopenwrt:masterfrom
LGA1150:libteam

Conversation

@LGA1150
Copy link
Contributor

@LGA1150 LGA1150 commented Dec 10, 2025

📦 Package Details

Maintainer: none (new package)

Description:
libteam is a userspace tool to configure Linux network teaming.

This depends on openwrt/openwrt#21120


🧪 Run Testing Details

  • OpenWrt Version: SNAPSHOT r32276-d11b77db5e
  • OpenWrt Target/Subtarget: mediatek/mt7622
  • OpenWrt Device: Xiaomi Redmi Router AX6S

✅ Formalities

  • I have reviewed the CONTRIBUTING.md file for detailed contributing guidelines.

If your PR contains a patch:

  • It can be applied using git am
  • It has been refreshed to avoid offsets, fuzzes, etc., using
    make package/<your-package>/refresh V=s
  • It is structured in a way that it is potentially upstreamable
    (e.g., subject line, commit description, etc.)
    We must try to upstream patches to reduce maintenance burden.

@LGA1150 LGA1150 marked this pull request as ready for review December 10, 2025 05:45
Copy link
Member

@GeorgeSapkin GeorgeSapkin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add package description.

Based on gut feeling, is it a better match for the routing repo?

Last tag is from 2 years ago. Is this being maintained?

Please rename your commit to: libteam: add new package

@LGA1150
Copy link
Contributor Author

LGA1150 commented Dec 11, 2025

Please add package description.

Done

Based on gut feeling, is it a better match for the routing repo?

I don't think so. This is a utility/library to control the Team link aggregation device, and unrelated to routing.

Last tag is from 2 years ago. Is this being maintained?

This project is maintained by @jpirko

Please rename your commit to: libteam: add new package

Done

@LGA1150 LGA1150 requested a review from GeorgeSapkin December 11, 2025 01:43
@jpirko
Copy link

jpirko commented Dec 11, 2025

Last tag is from 2 years ago. Is this being maintained?

This project is maintained by @jpirko

Low traffic at this point, I will probably do release soon.

Copy link
Member

@BKPepe BKPepe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a quick look. Shouldn't this package enable at least some kernel config, which you added to the main repo?

# CONFIG_NET_TEAM_MODE_ACTIVEBACKUP is not set
# CONFIG_NET_TEAM_MODE_BROADCAST is not set
# CONFIG_NET_TEAM_MODE_LOADBALANCE is not set
# CONFIG_NET_TEAM_MODE_RANDOM is not set
# CONFIG_NET_TEAM_MODE_ROUNDROBIN is not set

Without this enabled, this is not going to work, right?

Comment on lines +125 to +129
$(eval $(call BuildPackage,libteam))
$(eval $(call BuildPackage,libteamdctl))
$(eval $(call BuildPackage,teamd))
$(eval $(call BuildPackage,teamdctl))
$(eval $(call BuildPackage,teamnl))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You added 5 packages, but in the commit description and in the commit itself, you mentioned only one. Please try to describe a little bit more in your commit why do we need to have 5 packages, what is the size, etc. I think (maybe...) you splitted it into so many packages and it is not necessary.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From Project Wiki and HOWTO

  • libteam.so is a wrapper library to interface the Team Netlink API.
  • teamd is a service/daemon to control a team netdev using the libteam library.
  • teamdctl is a utility to alter teamd configuration at runtime.
  • libteamdctl.so is a library used by teamdctl
  • teamnl is an alternative to teamd.

apk size on cortex-a53:

18703 libteam5-1.32-r1.apk
 6250 libteamdctl0-1.32-r1.apk
48211 teamd-1.32-r1.apk
 8970 teamdctl-1.32-r1.apk
 6010 teamnl-1.32-r1.apk

Then I noticed all uncompressed ELF sizes (not just libteam, but other packages also) are multiple of 64KiB. Is that normal?

> ll /usr/bin/team*
-rwxr-xr-x    1 root     root        131449 Dec 16 17:29 /usr/bin/teamd*
-rwxr-xr-x    1 root     root         65499 Dec 16 17:29 /usr/bin/teamdctl*
-rwxr-xr-x    1 root     root         65499 Dec 16 17:29 /usr/bin/teamnl*

> ll /usr/lib/libteam*
lrwxrwxrwx    1 root     root            16 Dec 16 17:29 /usr/lib/libteam.so.5 -> libteam.so.5.6.2*
-rwxr-xr-x    1 root     root         65539 Dec 16 17:29 /usr/lib/libteam.so.5.6.2*
lrwxrwxrwx    1 root     root            20 Dec 16 17:29 /usr/lib/libteamdctl.so.0 -> libteamdctl.so.0.1.6*
-rwxr-xr-x    1 root     root         65539 Dec 16 17:29 /usr/lib/libteamdctl.so.0.1.6*

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think there has been a misunderstanding here. I was asking why we actually need 5 different packages, because when I look at https://repology.org/, I only see the libteam package there, not the others.

For example, in Debian, some of these tools are packaged as libteam-utils, while elsewhere they appear as libteam-tools. I would prefer not to reinvent the wheel here; I think we should follow what is done in other GNU/Linux distributions so we don't fragment it further or create something non-standard. :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Debian is a desktop distro, while OpenWrt is not. We have size constraints.

teamd and teamnl are mutually exclusive, so I think it's better to split them. ALT Linux does that too.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If these two are mutually exclusive, they should be marked as such either through PROVIDES or CONFLICTS.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If these two are mutually exclusive, they should be marked as such either through PROVIDES or CONFLICTS.

They are not mutually exclusive. I don't understand why anyone got that impression. User can happily use teamd and teamnl on the same team driver instance.

Copy link
Contributor Author

@LGA1150 LGA1150 Dec 22, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jpirko @GeorgeSapkin
By mutually exclusive, I mean users can only use either of them to control a single team device. The manpage of teamnl reads:

Note that it makes no sense to use this tool to change options on team device controlled by a teamd instance.

Users can still install both of them if they have multiple team devices.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jpirko @GeorgeSapkin By mutually exclusive, I mean users can only use either of them to control a single team device. The manpage of teamnl reads:

Note that it makes no sense to use this tool to change options on team device controlled by a teamd instance.

Users can still install both of them if they have multiple team devices.

  1. It is perfectly fine to use teamnl RO for low-level diagnostic purposes on a team instance with teamd running.
  2. I can imagine to use it for writing for in some debugging scenarios.
    That is why I believe saying "mutually exclusive" is wrong.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jpirko I see. Thanks for the clarification. So it still makes sense to split it into packages, as teamnl is mainly for debugging purposes.

@LGA1150
Copy link
Contributor Author

LGA1150 commented Dec 17, 2025

Just a quick look. Shouldn't this package enable at least some kernel config, which you added to the main repo?

# CONFIG_NET_TEAM_MODE_ACTIVEBACKUP is not set
# CONFIG_NET_TEAM_MODE_BROADCAST is not set
# CONFIG_NET_TEAM_MODE_LOADBALANCE is not set
# CONFIG_NET_TEAM_MODE_RANDOM is not set
# CONFIG_NET_TEAM_MODE_ROUNDROBIN is not set

Without this enabled, this is not going to work, right?

Users can choose one of them by installing kmod-team-mode-*

@BKPepe
Copy link
Member

BKPepe commented Dec 17, 2025

I realize users can install it separately if they are aware of it. However, shouldn't the behavior be that installing any package from your Makefile automatically triggers a dependency on the kernel package?

@LGA1150
Copy link
Contributor Author

LGA1150 commented Dec 22, 2025

I realize users can install it separately if they are aware of it. However, shouldn't the behavior be that installing any package from your Makefile automatically triggers a dependency on the kernel package?

Should I enable all of them or just one? teamd's default mode is roundrobin, and teamnl does not have a default mode.

@jpirko
Copy link

jpirko commented Dec 22, 2025

I realize users can install it separately if they are aware of it. However, shouldn't the behavior be that installing any package from your Makefile automatically triggers a dependency on the kernel package?

Should I enable all of them or just one? teamd's default mode is roundrobin, and teamnl does not have a default mode.

I would recommend all of them. The memory footprint is tiny for all of them, saving it does not top the possible bad user experience trying to make for example "lacp" (quite common case) work without kernel module.

Copy link

@jpirko jpirko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From perspective of libteam, this looks fine. Note I know very little about OpenWRT :) Thanks!

libteam is a userspace tool to configure Linux network teaming.

This consists of 5 packages:
- libteam.so is a wrapper library to interface the Team Netlink API.
- teamd is a service/daemon to control a team netdev using the libteam library.
- teamdctl is a utility to alter teamd configuration at runtime.
- libteamdctl.so is a library used by teamdctl.
- teamnl is a utility mainly for debugging.

Signed-off-by: Qingfang Deng <dqfext@gmail.com>
@LGA1150 LGA1150 requested a review from BKPepe January 8, 2026 07:59
@BKPepe BKPepe merged commit 0f233bd into openwrt:master Jan 8, 2026
12 checks passed
@LGA1150 LGA1150 deleted the libteam branch January 9, 2026 01:50
@BKPepe
Copy link
Member

BKPepe commented Jan 9, 2026

After merging, it looks like this one is failing according to buildbots:

Package libteamdctl is missing dependencies for the following libraries:
libdbus-1.so.3
libzmq.so.5

See: https://downloads.openwrt.org/snapshots/faillogs/aarch64_cortex-a53/packages/libteam/compile.txt

@LGA1150
Copy link
Contributor Author

LGA1150 commented Jan 9, 2026

Looks like automake automatically picked up buildbots' dbus and zmq library. They need to be explicitly disabled.

@LGA1150
Copy link
Contributor Author

LGA1150 commented Jan 12, 2026

#28326

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants