[PATCH net-next v2 0/7] Decouple receive and transmit enablement in team driver

Marc Harvey posted 7 patches 14 hours ago
drivers/net/team/team_core.c                       | 241 +++++++++++++++++---
drivers/net/team/team_mode_loadbalance.c           |   8 +-
drivers/net/team/team_mode_random.c                |   4 +-
drivers/net/team/team_mode_roundrobin.c            |   2 +-
include/linux/if_team.h                            |  63 +++---
tools/testing/selftests/drivers/net/team/Makefile  |   4 +
tools/testing/selftests/drivers/net/team/config    |   4 +
.../drivers/net/team/decoupled_enablement.sh       | 249 +++++++++++++++++++++
.../testing/selftests/drivers/net/team/options.sh  |  99 +++++++-
.../testing/selftests/drivers/net/team/team_lib.sh | 115 ++++++++++
.../drivers/net/team/teamd_activebackup.sh         | 207 +++++++++++++++++
.../drivers/net/team/transmit_failover.sh          | 151 +++++++++++++
tools/testing/selftests/net/lib.sh                 |  13 ++
13 files changed, 1090 insertions(+), 70 deletions(-)
[PATCH net-next v2 0/7] Decouple receive and transmit enablement in team driver
Posted by Marc Harvey 14 hours ago
Allow independent control over receive and transmit enablement states
for aggregated ports in the team driver.

The motivation is that IEE 802.3ad LACP "independent control" can't
be implemented for the team driver currently. This was added to the
bonding driver in commit 240fd405528b ("bonding: Add independent
control state machine").

This series also has a few patches that add tests to show that the old
coupled enablement still works and that the new decoupled enablement
works as intended (4, 5, and 7).

There are three patches with small fixes as well, with the goal of
making the final decouplement patch clearer (1, 2, and 3).

Signed-off-by: Marc Harvey <marcharvey@google.com>
---
Changes in v2:
- Patch 4 and 5: Fix shellcheck errors and warnings, use iperf3
  instead of netcat+pv, fix dependency checking.
- Patch 7: Fix shellcheck errors and warnings, fix dependency
  checking.
- Link to v1: https://lore.kernel.org/all/20260331053353.2504254-1-marcharvey@google.com/

---
Marc Harvey (7):
      net: team: Annotate reads and writes for mixed lock accessed values
      net: team: Remove unused team_mode_op, port_enabled
      net: team: Rename port_disabled team mode op to port_tx_disabled
      selftests: net: Add tests for failover of team-aggregated ports
      selftests: net: Add test for enablement of ports with teamd
      net: team: Decouple rx and tx enablement in the team driver
      selftests: net: Add tests for team driver decoupled tx and rx control

 drivers/net/team/team_core.c                       | 241 +++++++++++++++++---
 drivers/net/team/team_mode_loadbalance.c           |   8 +-
 drivers/net/team/team_mode_random.c                |   4 +-
 drivers/net/team/team_mode_roundrobin.c            |   2 +-
 include/linux/if_team.h                            |  63 +++---
 tools/testing/selftests/drivers/net/team/Makefile  |   4 +
 tools/testing/selftests/drivers/net/team/config    |   4 +
 .../drivers/net/team/decoupled_enablement.sh       | 249 +++++++++++++++++++++
 .../testing/selftests/drivers/net/team/options.sh  |  99 +++++++-
 .../testing/selftests/drivers/net/team/team_lib.sh | 115 ++++++++++
 .../drivers/net/team/teamd_activebackup.sh         | 207 +++++++++++++++++
 .../drivers/net/team/transmit_failover.sh          | 151 +++++++++++++
 tools/testing/selftests/net/lib.sh                 |  13 ++
 13 files changed, 1090 insertions(+), 70 deletions(-)
---
base-commit: f1359c240191e686614847905fc861cbda480b47
change-id: 20260401-teaming-driver-internal-83f2f0074d68

Best regards,
-- 
Marc Harvey <marcharvey@google.com>
Re: [PATCH net-next v2 0/7] Decouple receive and transmit enablement in team driver
Posted by Jakub Kicinski 5 hours ago
On Wed, 01 Apr 2026 06:05:24 +0000 Marc Harvey wrote:
> Allow independent control over receive and transmit enablement states
> for aggregated ports in the team driver.
> 
> The motivation is that IEE 802.3ad LACP "independent control" can't
> be implemented for the team driver currently. This was added to the
> bonding driver in commit 240fd405528b ("bonding: Add independent
> control state machine").
> 
> This series also has a few patches that add tests to show that the old
> coupled enablement still works and that the new decoupled enablement
> works as intended (4, 5, and 7).
> 
> There are three patches with small fixes as well, with the goal of
> making the final decouplement patch clearer (1, 2, and 3).

Closer but the activebackup test times out (45sec is the default ksft
timeout, I think). How long does it take when you run it?

# selftests: drivers/net/team: teamd_activebackup.sh
# Setting up two-link aggregation for runner activebackup
# Conf files are /tmp/tmp.XyCJqts2JC and /tmp/tmp.kI77XQxR63
# This program is not intended to be run as root.
# This program is not intended to be run as root.
# Created team devices
# PING fd00::2 (fd00::2) 56 data bytes
# 64 bytes from fd00::2: icmp_seq=1 ttl=64 time=0.027 ms
# 
# --- fd00::2 ping statistics ---
# 1 packets transmitted, 1 received, 0% packet loss, time 0ms
# rtt min/avg/max/mdev = 0.027/0.027/0.027/0.000 msPacket count for test_team2 was 138
# Packet count for eth0 was 0
# Packet count for eth1 was 124
# Packet count for eth0 was 124
# Packet count for eth1 was 0
# TEST: teamd active backup runner test                               [ OK ]
# Tearing down two-link aggregation
# Failed to kill daemon: Timer expired
#
not ok 1 selftests: drivers/net/team: teamd_activebackup.sh # TIMEOUT 45 seconds
Re: [PATCH net-next v2 0/7] Decouple receive and transmit enablement in team driver
Posted by Marc Harvey 3 hours ago
On Wed, Apr 1, 2026 at 7:57 AM Jakub Kicinski <kuba@kernel.org> wrote:
>
> On Wed, 01 Apr 2026 06:05:24 +0000 Marc Harvey wrote:
> > Allow independent control over receive and transmit enablement states
> > for aggregated ports in the team driver.
> >
> > The motivation is that IEE 802.3ad LACP "independent control" can't
> > be implemented for the team driver currently. This was added to the
> > bonding driver in commit 240fd405528b ("bonding: Add independent
> > control state machine").
> >
> > This series also has a few patches that add tests to show that the old
> > coupled enablement still works and that the new decoupled enablement
> > works as intended (4, 5, and 7).
> >
> > There are three patches with small fixes as well, with the goal of
> > making the final decouplement patch clearer (1, 2, and 3).
>
> Closer but the activebackup test times out (45sec is the default ksft
> timeout, I think). How long does it take when you run it?

Very strange, for me the script finishes in seconds (even with the
netdev CI recreation steps). It seems like the teardown, specifically
the graceful killing the teamd daemon, is timing out in your
environment. I don't think we need a graceful teardown, so I can just
replace this with pkill in v3.