Fri, Apr 03, 2020 at 02:24:05AM CEST, pavel.contrib(a)gmail.com wrote:
When a member port is enslaved into a port channel
immediately after the port channel was created,
it is possible to get member port ifinfo structure
not initialized for the member port because of a race
condition.
The race condition here occurs because order of
following events is not strict:
- adding the member port to the port channel;
- creating ifinfo structure for the member port.
The error message "Failed to link port with ifinfo" is
thrown when a member port is tried to be added to the
team handler's port list before ifinfo structure was
initialized.
To fix this situation ifinfo_find_create() is used
to search member ports ifinfo structure in
ifinfo_link_with_port().
Signed-off-by: Shuotian Cheng <shuche(a)microsoft.com>
Signed-off-by: Pavel Shirshov <pavel.contrib(a)gmail.com>
Applied, thanks!