On Wed, Mar 13, 2019 at 03:04:29PM +0800, Hangbin Liu wrote:
When we add a port to team via teamdctl, some drivers do not support
changing mac address after dev opened, which would lead to the failure
of port_obj_create(). The call path looks like below for LACP mode:
- port_obj_create()
- port_priv_init_all()
- lacp_port_added()
- lacp_port_set_mac()
Currently, we only destroy the port object if adding port fails. But the
port is still enslaved to team in kernel. IP link command shows the port
is a team_slave, but teamdctl state shows nothing. This may make users
confused.
Fix it by removing the port if adding fails.
v2: also calls teamd_port_remove in port_obj_remove()
Reported-by: Vladimir Benes <vbenes(a)redhat.com>
Signed-off-by: Hangbin Liu <liuhangbin(a)gmail.com>
Hi Jiri,
Would you please help review this patch?
Thanks
Hangbin