>attachment is the scripts,
># ip netns exec ns1 ./team1.sh
># ping 192.168.11.3
>the issue is team0 cannot switch to veth2, even if the veth0 has no carrier.
>> This should be definitelly fixed in user part.
>now it can disable/enable it in lw_ethtool_event_watch_port_changed()
>when receive event from kernel, but at the beginning, the first event from
>adding port will not going to team_port_en_option_set, as new_link_up
>== common_ppriv->link_up in lw_ethtool_event_watch_port_changed().
>maybe it should be fixed there ?
considering this issue only happens when adding ports,
I found two places to fix it:
lw_ethtool_port_added() and link_watch_event_watch_port_added()
I prefer in lw_ethtool_port_added(), as only when using ethtool link_watch it
has this issue.
@@ -156,6 +156,9 @@ static int lw_ethtool_port_added(struct teamd_context *ctx,
teamd_log_err("Failed to register event watch.");
+ if (!team_is_port_link_up(tdport->team_port))
+ team_set_port_enabled(ctx->th, tdport->ifindex, false);
what do you think ?
I also noticed another issue (not related to this one), at the first time
port_changed event is triggered, right after port_added event, there
is always a err log:
veth2: Failed to find "enabled" option.
lw_ethtool_event_watch_port_changed -> ...
teamd_port_check_enable -> teamd_port_enabled
it's because at that time, no 'enabled' option is set in userspace yet.
do you think it's also a bug ?