On Fri, Sep 11, 2015 at 09:46:45AM +0200, Jiri Pirko wrote:
Fri, Sep 11, 2015 at 01:14:09AM CEST, sridhar.samudrala(a)intel.com
wrote:
>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.
INFO_STATE_AGGREGATION is set in lacp_port_actor_update. Why that is not
enough?
It seems we only do that if the state of a port changes.
920 static int lacp_port_set_state(struct lacp_port *lacp_port,
921 enum lacp_port_state new_state)
922 {
923 int err;
924
*925 if (new_state == lacp_port->state)
926 return 0;
fbl
>
>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
>
_______________________________________________
libteam mailing list
libteam(a)lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/libteam