Mon, Feb 03, 2020 at 04:54:35PM CET, lucien.xin(a)gmail.com wrote:
On Mon, Feb 3, 2020 at 7:07 PM Jiri Pirko <jiri(a)resnulli.us>
wrote:
>
> From: Jiri Pirko <jiri(a)mellanox.com>
>
> In teamd the messages from kernel are processed in order:
> options
> ifinfo
> ports
>
> However, kernel sends the messages in a different order. See:
> team_upper_dev_link() which generates ifinfo notification
> __team_port_change_port_added() which generates ports notification
> __team_options_change_check() which generates options notification
>
> So there is a chance that the teamd processed only the port without
> options and right after that it processes ifinfo.
>
> Fix this by introducing teamd_port_enabled_check() which does not log
> error and ignore the port in case this call fails. This is safe
> as this is going to be handled by future
> link_watch_enabled_option_changed() call.
>
> Signed-off-by: Jiri Pirko <jiri(a)mellanox.com>
> Fixes: 5f351666409f ("teamd: add port_master_ifindex_changed for
link_watch_port_watch_ops")
> Tested-by: Stepan Blyshchak <stepanb(a)mellanox.com>
Reviewed-by: Xin Long <lucien.xin(a)gmail.com>
applied, thanks!