Currently AGGREGATION flag is only set when there is a change in port state.
Adding a 2nd port should cause the AGGREGATION flag of the first port to be
changed to 'Yes' and removing the last but one port should cause the
AGGREGATION flag of the remaining port to be changed to 'No'.
A simple fix is set AGGREGATION flag before sending LACP frames based on
the number of ports in the team.
Signed-off-by: Sridhar Samudrala <sridhar.samudrala(a)intel.com>
---
teamd/teamd_runner_lacp.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/teamd/teamd_runner_lacp.c b/teamd/teamd_runner_lacp.c
index 09899ce..4f46ebf 100644
--- a/teamd/teamd_runner_lacp.c
+++ b/teamd/teamd_runner_lacp.c
@@ -1034,6 +1034,11 @@ static int lacpdu_send(struct lacp_port *lacp_port)
lacpdu.actor = lacp_port->actor;
lacpdu.partner = lacp_port->partner;
+ if (teamd_port_count(lacp_port->ctx) > 1)
+ lacp_port->actor.state |= INFO_STATE_AGGREGATION;
+ else
+ lacp_port->actor.state &= ~INFO_STATE_AGGREGATION;
+
err = teamd_sendto(lacp_port->sock, &lacpdu, sizeof(lacpdu), 0,
(struct sockaddr *) &ll_slow, sizeof(ll_slow));
return err;
--
2.1.0