Message ID | 20180808102533.2886-1-mengkoon@live.com (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | teamd/teamd_runner_lacp: lacp_port_set_state | expand |
Hi Jiri, Can review if this patch is suitable or suggest alternative patch? To clarify, this issue happens when the remote side is configured with LACP slow, which causes no immediate LACPDU sent by teamd when it transits a port from "defaulted" to "current" thanks Meng Koon Lim
Hi Jiri, Appreciate if you can review this thanks Meng Koon Lim
Please review and provide feedback on this patch thank you
Wed, Aug 08, 2018 at 12:25:33PM CEST, mengkoon@live.com wrote: >if new state is PORT_STATE_DEFAULTED, set lacp_port->partner.state >to 0x02 > >This ensures LACPDU is sent to update the far side when local >local port transitions from default to current > >Currently, local port moves from default to current without >sending LACPDU until 30sec later. This causes traffic disruption >because far side has not completed negotiation > >Using 0x02 also cause LACPDU to be sent every 1 sec as long as >port remains in defaulted state and LACP mode used is "active" Sorry for delay. This patch looks nice. Please re-send with signed off tag, like: Signed-off-by: MK Lim <mengkoon@live.com> Thanks!
diff --git a/teamd/teamd_runner_lacp.c b/teamd/teamd_runner_lacp.c index 7b8f0a7..555aa06 100644 --- a/teamd/teamd_runner_lacp.c +++ b/teamd/teamd_runner_lacp.c @@ -965,7 +965,12 @@ static int lacp_port_set_state(struct lacp_port *lacp_port, case PORT_STATE_DEFAULTED: teamd_loop_callback_disable(lacp_port->ctx, LACP_TIMEOUT_CB_NAME, lacp_port); - /* fall through */ + memset(&lacp_port->partner, 0, sizeof(lacp_port->partner)); + lacp_port->partner.state |= INFO_STATE_LACP_TIMEOUT; + err = lacp_port_partner_update(lacp_port); + if (err) + return err; + break; case PORT_STATE_DISABLED: memset(&lacp_port->partner, 0, sizeof(lacp_port->partner)); err = lacp_port_partner_update(lacp_port);