Skip to content

Commit

Permalink
[libteam] Send updates as soon as we need to update the LACP partner …
Browse files Browse the repository at this point in the history
…about changes (sonic-net#2955)
  • Loading branch information
pavel-shirshov authored and yxieca committed May 30, 2019
1 parent abc25df commit 3954e08
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
From 0e0ee4a68b118d540d9ef5836a55483fcfb8771b Mon Sep 17 00:00:00 2001
From: Pavel Shirshov <[email protected]>
Date: Wed, 29 May 2019 19:15:20 +0000
Subject: [PATCH] Send LACP PDU immediately if our state changed

---
teamd/teamd_runner_lacp.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/teamd/teamd_runner_lacp.c b/teamd/teamd_runner_lacp.c
index 19592c5..a505284 100644
--- a/teamd/teamd_runner_lacp.c
+++ b/teamd/teamd_runner_lacp.c
@@ -1049,8 +1049,7 @@ static int lacp_port_set_state(struct lacp_port *lacp_port,
return err;

lacp_port_actor_update(lacp_port);
- if (lacp_port->periodic_on)
- return 0;
+
return lacpdu_send(lacp_port);
}

@@ -1160,9 +1159,10 @@ static int lacpdu_process(struct lacp_port *lacp_port, struct lacpdu* lacpdu)
if (err)
return err;

+ lacp_port_actor_update(lacp_port);
+
/* Check if the other side has correct info about us */
- if (!lacp_port->periodic_on &&
- memcmp(&lacpdu->partner, &lacp_port->actor,
+ if (memcmp(&lacpdu->partner, &lacp_port->actor,
sizeof(struct lacpdu_info))) {
err = lacpdu_send(lacp_port);
if (err)
--
2.7.4

1 change: 1 addition & 0 deletions src/libteam/series
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@
0011-libteam-resynchronize-ifinfo-after-lost-RTNLGRP_LINK-.patch
0012-teamd-do-not-process-lacpdu-before-the-port-ifinfo-i.patch
0013-teamd-lacp-port-admin-down-recv-not-processing.patch
0014-Send-LACP-PDU-immediately-if-our-state-changed.patch

0 comments on commit 3954e08

Please sign in to comment.