Skip to content

Commit 3f4de49

Browse files
[libteam] Send updates as soon as we need to update the LACP partner about changes (#2955)
1 parent 6ca35b5 commit 3f4de49

File tree

2 files changed

+40
-0
lines changed

2 files changed

+40
-0
lines changed
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
From 0e0ee4a68b118d540d9ef5836a55483fcfb8771b Mon Sep 17 00:00:00 2001
2+
From: Pavel Shirshov <[email protected]>
3+
Date: Wed, 29 May 2019 19:15:20 +0000
4+
Subject: [PATCH] Send LACP PDU immediately if our state changed
5+
6+
---
7+
teamd/teamd_runner_lacp.c | 8 ++++----
8+
1 file changed, 4 insertions(+), 4 deletions(-)
9+
10+
diff --git a/teamd/teamd_runner_lacp.c b/teamd/teamd_runner_lacp.c
11+
index 19592c5..a505284 100644
12+
--- a/teamd/teamd_runner_lacp.c
13+
+++ b/teamd/teamd_runner_lacp.c
14+
@@ -1049,8 +1049,7 @@ static int lacp_port_set_state(struct lacp_port *lacp_port,
15+
return err;
16+
17+
lacp_port_actor_update(lacp_port);
18+
- if (lacp_port->periodic_on)
19+
- return 0;
20+
+
21+
return lacpdu_send(lacp_port);
22+
}
23+
24+
@@ -1160,9 +1159,10 @@ static int lacpdu_process(struct lacp_port *lacp_port, struct lacpdu* lacpdu)
25+
if (err)
26+
return err;
27+
28+
+ lacp_port_actor_update(lacp_port);
29+
+
30+
/* Check if the other side has correct info about us */
31+
- if (!lacp_port->periodic_on &&
32+
- memcmp(&lacpdu->partner, &lacp_port->actor,
33+
+ if (memcmp(&lacpdu->partner, &lacp_port->actor,
34+
sizeof(struct lacpdu_info))) {
35+
err = lacpdu_send(lacp_port);
36+
if (err)
37+
--
38+
2.7.4
39+

src/libteam/series

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,4 @@
88
0011-libteam-resynchronize-ifinfo-after-lost-RTNLGRP_LINK-.patch
99
0012-teamd-do-not-process-lacpdu-before-the-port-ifinfo-i.patch
1010
0013-teamd-lacp-port-admin-down-recv-not-processing.patch
11+
0014-Send-LACP-PDU-immediately-if-our-state-changed.patch

0 commit comments

Comments
 (0)