Skip to content

Commit 7988deb

Browse files
hzheng5lguohan
authored andcommitted
[teamd] fix lacp fallback mode in teamd v1.28 (#3572)
In teamd v1.28, the port can only be enabled if sync bit is set in recveived LACPDU from partner by the following commit "teamd: lacp: update port state according to partner's sync bit" (jpirko/libteam@54f137c) However, lacp fallback feature needs to enable port even if partner LACPDU is not received within a given period and fallback cfg is enabled. To fix the lacp fallback breakage, we have to bypass the sync bit check in lacp fallback mode. Signed-off-by: Haiyang Zheng <[email protected]>
1 parent 2694e66 commit 7988deb

File tree

1 file changed

+32
-16
lines changed

1 file changed

+32
-16
lines changed

src/libteam/patch/0003-libteam-Add-fallback-support-for-single-member-port-.patch

+32-16
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,16 @@
1-
From 9b40af58575a89d06be51cfbb5a2265a59826110 Mon Sep 17 00:00:00 2001
2-
From: yorke <[email protected]>
3-
Date: Mon, 3 Jun 2019 12:02:36 +0800
4-
Subject: [PATCH 3/8] [libteam] Add fallback support for single-member-port LAG
5-
From: Haiyang Zheng <[email protected]> Date: Fri, 15 Dec
6-
2017 21:07:53 -0800
1+
commit f475746f56602a40861b8d94eac5f0979c4703f3
2+
Author: yorke <[email protected]>
3+
Date: Mon Jun 3 12:02:36 2019 +0800
74

8-
Signed-off-by: yorke <[email protected]>
9-
---
10-
teamd/teamd_runner_lacp.c | 42 ++++++++++++++++++++++++++++++++++++++++--
11-
1 file changed, 40 insertions(+), 2 deletions(-)
5+
From 9b40af58575a89d06be51cfbb5a2265a59826110 Mon Sep 17 00:00:00 2001
6+
Subject: [PATCH 3/8] [libteam] Add fallback support for single-member-port LAG
7+
From: Haiyang Zheng <[email protected]> Date: Fri, 15 Dec
8+
2017 21:07:53 -0800
9+
10+
Signed-off-by: yorke <[email protected]>
1211

1312
diff --git a/teamd/teamd_runner_lacp.c b/teamd/teamd_runner_lacp.c
14-
index 4dbd015..9836824 100644
13+
index 4dbd015..f8a9e16 100644
1514
--- a/teamd/teamd_runner_lacp.c
1615
+++ b/teamd/teamd_runner_lacp.c
1716
@@ -138,6 +138,8 @@ struct lacp {
@@ -71,7 +70,27 @@ index 4dbd015..9836824 100644
7170
return false;
7271
return true;
7372
}
74-
@@ -1502,6 +1525,16 @@ static int lacp_state_fast_rate_get(struct teamd_context *ctx,
73+
@@ -334,7 +357,8 @@ static int lacp_port_should_be_enabled(struct lacp_port *lacp_port)
74+
75+
if (lacp_port_selected(lacp_port) &&
76+
lacp_port->agg_lead == lacp->selected_agg_lead &&
77+
- lacp_port->partner.state & INFO_STATE_SYNCHRONIZATION)
78+
+ (lacp_port->partner.state & INFO_STATE_SYNCHRONIZATION ||
79+
+ is_lacp_fallback_eligible(lacp_port)))
80+
return true;
81+
return false;
82+
}
83+
@@ -345,7 +369,8 @@ static int lacp_port_should_be_disabled(struct lacp_port *lacp_port)
84+
85+
if (!lacp_port_selected(lacp_port) ||
86+
lacp_port->agg_lead != lacp->selected_agg_lead ||
87+
- !(lacp_port->partner.state & INFO_STATE_SYNCHRONIZATION))
88+
+ (!(lacp_port->partner.state & INFO_STATE_SYNCHRONIZATION) &&
89+
+ !is_lacp_fallback_eligible(lacp_port)))
90+
return true;
91+
return false;
92+
}
93+
@@ -1502,6 +1527,16 @@ static int lacp_state_fast_rate_get(struct teamd_context *ctx,
7594
return 0;
7695
}
7796

@@ -88,7 +107,7 @@ index 4dbd015..9836824 100644
88107
static int lacp_state_select_policy_get(struct teamd_context *ctx,
89108
struct team_state_gsc *gsc,
90109
void *priv)
91-
@@ -1529,6 +1562,11 @@ static const struct teamd_state_val lacp_state_vals[] = {
110+
@@ -1529,6 +1564,11 @@ static const struct teamd_state_val lacp_state_vals[] = {
92111
.getter = lacp_state_fast_rate_get,
93112
},
94113
{
@@ -100,6 +119,3 @@ index 4dbd015..9836824 100644
100119
.subpath = "select_policy",
101120
.type = TEAMD_STATE_ITEM_TYPE_STRING,
102121
.getter = lacp_state_select_policy_get,
103-
--
104-
2.7.4
105-

0 commit comments

Comments
 (0)