Wed, Aug 08, 2018 at 10:23:11AM CEST, mengkoon(a)live.com wrote:
Hi,
When a port transitioned to "defaulted" state, the partner information is
cleared to 0, including partner.state, and subsequently, LACPDU is only transmitted once
every 30 seconds as long as port remains in default state
When a LACPDU arrives from the other side of the link, the local port transitions to
"current", and there are 2 scenarios:
1. If the received lacpdu.actor have its TIMEOUT state set, a LACPDU is transmitted,
and the LACP negotiation is completed in short time.
2. If the received lacpdu.actor does not have its TIMEOUT state set, no LACPDU is
transmitted until the current 30sec interval is up. The LACP negotiation isn't
completed, so the far end device port did not transition into "current"
Scenario 2 causes disruption to traffic teamd moved its port to "current" before
the other side, and in worst case, up to 30sec earlier.
The patch below seems to fix it by setting the TIMEOUT on lacp_port>partner.state when
port moves into "default" status. Which means the lacp_port>partner.state =
0x02 instead of 0x00
This also has an effect of making teamd transmit LACPDU every 1 sec while port is in
default state.
Or do you know if there's a better way to resolve this?
thank you
regards
The format of your patch description is wrong. Please do "git log" to
see how it is supposed to look. Please do wrap lines after 72 cols.
mk
---
teamd/teamd_runner_lacp.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
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;
Your email client crippled the patch. Please use "git format-patch" and
"git send-email". Please see "SubmittingPatches" file for the
details.
> case PORT_STATE_DISABLED:
> memset(&lacp_port->partner, 0, sizeof(lacp_port->partner));
> err = lacp_port_partner_update(lacp_port);
>--
>