Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion rules/libteam.mk
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# libteam packages

LIBTEAM_VERSION = 1.28-1
LIBTEAM_VERSION = 1.30-1

export LIBTEAM_VERSION

Expand Down
4 changes: 2 additions & 2 deletions src/libteam/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ $(addprefix $(DEST)/, $(MAIN_TARGET)): $(DEST)/% :
rm -rf ./libteam
git clone https://github.com/jpirko/libteam.git
pushd ./libteam
git checkout -b teamd -f 8c7614abf5993d92e332a800f244bdebd7c9a2c8
git checkout -b teamd -f c7237377dead39ae4a711297203bacf7edb9fa41

# Apply patch series
stg init
Expand All @@ -25,7 +25,7 @@ $(addprefix $(DEST)/, $(MAIN_TARGET)): $(DEST)/% :
# Obtain debian packaging
git clone https://salsa.debian.org/debian/libteam.git tmp
pushd ./tmp
git checkout -f 7188c361 # v1.28-1
git checkout -f debian/1.30-1
popd

mv tmp/debian libteam/
Expand Down
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
From 10602c2b1184aa0c6907b5a7f06fcba8a7141148 Mon Sep 17 00:00:00 2001
From: Shuotian Cheng <shuche@microsoft.com>
Date: Mon, 27 Feb 2017 14:21:09 -0800
Subject: [PATCH 1/8] libteam: Temporarily remove redundant debug messages
From fa8c4604e739abde29278b403a1a1d502337c21b Mon Sep 17 00:00:00 2001
From: Pavel Shirshov <pavelsh@microsoft.com>
Date: Tue, 3 Mar 2020 12:47:32 -0800
Subject: [PATCH] libteam: Temporarily remove redundant debug messages

---
teamd/teamd_runner_lacp.c | 2 --
1 file changed, 2 deletions(-)

diff --git a/teamd/teamd_runner_lacp.c b/teamd/teamd_runner_lacp.c
index d292d69..7c91aed 100644
index ec01237..2d5a823 100644
--- a/teamd/teamd_runner_lacp.c
+++ b/teamd/teamd_runner_lacp.c
@@ -929,8 +929,6 @@ static void lacp_port_actor_update(struct lacp_port *lacp_port)
state |= INFO_STATE_DEFAULTED;
if (teamd_port_count(lacp_port->ctx) > 0)
state |= INFO_STATE_AGGREGATION;
- teamd_log_dbg("%s: lacp info state: 0x%02X.", lacp_port->tdport->ifname,
- state);
- teamd_log_dbg(lacp_port->ctx, "%s: lacp info state: 0x%02X.",
- lacp_port->tdport->ifname, state);
lacp_port->actor.state = state;
}

--
2.7.4
2.17.1.windows.2

Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
From 0ce56490a44191c4b17a75cc21aa6a5bdc535f1d Mon Sep 17 00:00:00 2001
From: yorke <[email protected]>
Date: Mon, 3 Jun 2019 11:58:19 +0800
Subject: [PATCH 2/8] [teamd] lacp runner will send lacp update right after it
received SIGINT signal From: Pavel Shirshov <[email protected]>
Date: Wed, 20 Sep 2017 00:34:07 +0000
From 9e697b0c9fbd01f024acfea8aa25334816425c2b Mon Sep 17 00:00:00 2001
From: Pavel Shirshov <[email protected]>
Date: Tue, 3 Mar 2020 12:50:23 -0800
Subject: [PATCH] [teamd] lacp runner will send lacp update right after it
received SIGINT signal

Signed-off-by: yorke <[email protected]>
---
teamd/teamd.c | 1 +
teamd/teamd.h | 3 +++
Expand All @@ -14,7 +12,7 @@ Signed-off-by: yorke <[email protected]>
4 files changed, 28 insertions(+)

diff --git a/teamd/teamd.c b/teamd/teamd.c
index 6c47312..58d4fc8 100644
index e035ac5..dc46a62 100644
--- a/teamd/teamd.c
+++ b/teamd/teamd.c
@@ -392,6 +392,7 @@ static int teamd_run_loop_run(struct teamd_context *ctx)
Expand All @@ -26,7 +24,7 @@ index 6c47312..58d4fc8 100644
if (err)
return err;
diff --git a/teamd/teamd.h b/teamd/teamd.h
index 01bd022..e71a5dc 100644
index f94c918..01ebc84 100644
--- a/teamd/teamd.h
+++ b/teamd/teamd.h
@@ -193,11 +193,14 @@ struct teamd_event_watch_ops {
Expand Down Expand Up @@ -69,7 +67,7 @@ index 65aa46a..221803e 100644
struct teamd_port *tdport)
{
diff --git a/teamd/teamd_runner_lacp.c b/teamd/teamd_runner_lacp.c
index 7c91aed..4dbd015 100644
index 2d5a823..7592b01 100644
--- a/teamd/teamd_runner_lacp.c
+++ b/teamd/teamd_runner_lacp.c
@@ -1421,6 +1421,16 @@ static int lacp_event_watch_port_changed(struct teamd_context *ctx,
Expand Down Expand Up @@ -98,5 +96,5 @@ index 7c91aed..4dbd015 100644

static int lacp_carrier_init(struct teamd_context *ctx, struct lacp *lacp)
--
2.7.4
2.17.1.windows.2

Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
commit f475746f56602a40861b8d94eac5f0979c4703f3
Author: yorke <[email protected]>
Date: Mon Jun 3 12:02:36 2019 +0800
From 4696acb51172dbe486d175073bdce8c94817f422 Mon Sep 17 00:00:00 2001
From: Pavel Shirshov <[email protected]>
Date: Tue, 3 Mar 2020 12:52:28 -0800
Subject: [PATCH] [libteam] Add fallback support for single-member-port LAG

From 9b40af58575a89d06be51cfbb5a2265a59826110 Mon Sep 17 00:00:00 2001
Subject: [PATCH 3/8] [libteam] Add fallback support for single-member-port LAG
From: Haiyang Zheng <[email protected]> Date: Fri, 15 Dec
2017 21:07:53 -0800

Signed-off-by: yorke <[email protected]>
---
teamd/teamd_runner_lacp.c | 48 +++++++++++++++++++++++++++++++++++----
1 file changed, 44 insertions(+), 4 deletions(-)

diff --git a/teamd/teamd_runner_lacp.c b/teamd/teamd_runner_lacp.c
index 4dbd015..f8a9e16 100644
index 7592b01..2062bf2 100644
--- a/teamd/teamd_runner_lacp.c
+++ b/teamd/teamd_runner_lacp.c
@@ -138,6 +138,8 @@ struct lacp {
Expand All @@ -24,12 +22,12 @@ index 4dbd015..f8a9e16 100644
enum lacp_agg_select_policy agg_select_policy;
@@ -272,6 +274,11 @@ static int lacp_load_config(struct teamd_context *ctx, struct lacp *lacp)
lacp->cfg.fast_rate = LACP_CFG_DFLT_FAST_RATE;
teamd_log_dbg("Using fast_rate \"%d\".", lacp->cfg.fast_rate);
teamd_log_dbg(ctx, "Using fast_rate \"%d\".", lacp->cfg.fast_rate);

+ err = teamd_config_bool_get(ctx, &lacp->cfg.fallback, "$.runner.fallback");
+ if (err)
+ lacp->cfg.fallback = LACP_CFG_DFLT_FALLBACK;
+ teamd_log_dbg("Using fallback \"%d\".", lacp->cfg.fallback);
+ teamd_log_dbg(ctx, "Using fallback \"%d\".", lacp->cfg.fallback);
+
err = teamd_config_int_get(ctx, &tmp, "$.runner.min_ports");
if (err) {
Expand All @@ -45,7 +43,7 @@ index 4dbd015..f8a9e16 100644
+ */
+static bool is_lacp_fallback_eligible(struct lacp_port *lacp_port)
+{
+ teamd_log_dbg("%s fallback eligible state \"%d \" cfg \"%d\".",
+ teamd_log_dbg(lacp_port->ctx, "%s fallback eligible state \"%d \" cfg \"%d\".",
+ lacp_port->tdport->ifname, lacp_port->state,
+ lacp_port->lacp->cfg.fallback);
+ return lacp_port->state == PORT_STATE_DEFAULTED &&
Expand Down Expand Up @@ -107,15 +105,18 @@ index 4dbd015..f8a9e16 100644
static int lacp_state_select_policy_get(struct teamd_context *ctx,
struct team_state_gsc *gsc,
void *priv)
@@ -1529,6 +1564,11 @@ static const struct teamd_state_val lacp_state_vals[] = {
@@ -1528,6 +1563,11 @@ static const struct teamd_state_val lacp_state_vals[] = {
.type = TEAMD_STATE_ITEM_TYPE_BOOL,
.getter = lacp_state_fast_rate_get,
},
{
+ {
+ .subpath = "fallback",
+ .type = TEAMD_STATE_ITEM_TYPE_BOOL,
+ .getter = lacp_state_fallback_get,
+ },
+ {
{
.subpath = "select_policy",
.type = TEAMD_STATE_ITEM_TYPE_STRING,
.getter = lacp_state_select_policy_get,
--
2.17.1.windows.2

Original file line number Diff line number Diff line change
@@ -1,17 +1,14 @@
From e18cbe5a6c76366923a8ace830c89056a1542745 Mon Sep 17 00:00:00 2001
From: yorke <[email protected]>
Date: Mon, 3 Jun 2019 12:06:00 +0800
Subject: [PATCH 4/8] Skip setting the same hwaddr to lag port to avoid
disrupting From: Jipan Yang <[email protected]> Date: Sun,
24 Feb 2019 00:04:15 -0800
From 09af7e3106720c871cdbadff9f661685aa1bdb16 Mon Sep 17 00:00:00 2001
From: Pavel Shirshov <[email protected]>
Date: Tue, 3 Mar 2020 12:54:09 -0800
Subject: [PATCH] Skip setting the same hwaddr to lag port to avoid disrupting

Signed-off-by: yorke <[email protected]>
---
teamd/teamd.c | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/teamd/teamd.c b/teamd/teamd.c
index 58d4fc8..9dc85b5 100644
index dc46a62..bf42347 100644
--- a/teamd/teamd.c
+++ b/teamd/teamd.c
@@ -834,7 +834,15 @@ static int teamd_set_hwaddr(struct teamd_context *ctx)
Expand All @@ -22,7 +19,7 @@ index 58d4fc8..9dc85b5 100644
+
+ if(!memcmp(hwaddr, ctx->hwaddr, hwaddr_len)) {
+ err = 0;
+ teamd_log_dbg("Skip setting same hwaddr string: \"%s\".", hwaddr_str);
+ teamd_log_dbg(ctx, "Skip setting same hwaddr string: \"%s\".", hwaddr_str);
+ }
+ else{
+ err = team_hwaddr_set(ctx->th, ctx->ifindex, hwaddr, hwaddr_len);
Expand All @@ -32,5 +29,5 @@ index 58d4fc8..9dc85b5 100644
ctx->hwaddr_explicit = true;
free_hwaddr:
--
2.7.4
2.17.1.windows.2

Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
From 39e5b0a15bf276dffa6b8c61594ee945248a4e27 Mon Sep 17 00:00:00 2001
From: yorke <[email protected]>
Date: Mon, 3 Jun 2019 12:32:33 +0800
Subject: [PATCH 5/8] Increase default buffer size from 98304 to 983040
From: Pavel Shirshov <[email protected]>
https://github.com/Azure/sonic-buildimage/pull/2822
From fcb9932bdb9212e9b18302de4ffb4d64003e93ab Mon Sep 17 00:00:00 2001
From: Pavel Shirshov <[email protected]>
Date: Tue, 3 Mar 2020 12:55:50 -0800
Subject: [PATCH] Increase default buffer size from 98304 to 983040

Signed-off-by: yorke <[email protected]>
---
libteam/libteam.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
Expand All @@ -27,5 +24,5 @@ index 9c9c93a..2cc80ca 100644
/**
* @param th libteam library context
--
2.7.4
2.17.1.windows.2

Original file line number Diff line number Diff line change
@@ -1,20 +1,18 @@
From f1eec95dd0475591897a781eba15d8d8ce370a6a Mon Sep 17 00:00:00 2001
From: yorke <[email protected]>
Date: Mon, 3 Jun 2019 13:21:07 +0800
Subject: [PATCH 6/8] [teamd]: Administratively shutdown port channel has
member ports in deselected state and traffic is not forwarded From:
phanindra-tv https://github.com/Azure/sonic-buildimage/pull/2882
From b188ed48f9ea6873a2c9263d5e036a3634c0f4ba Mon Sep 17 00:00:00 2001
From: Pavel Shirshov <[email protected]>
Date: Tue, 3 Mar 2020 12:59:09 -0800
Subject: [PATCH] [teamd]: Administratively shutdown port channel has member
ports in deselected state and traffic is not forwarded

Signed-off-by: yorke <[email protected]>
---
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 9836824..7bf3700 100644
index 2062bf2..fa732ba 100644
--- a/teamd/teamd_runner_lacp.c
+++ b/teamd/teamd_runner_lacp.c
@@ -1101,12 +1101,17 @@ static int lacpdu_recv(struct lacp_port *lacp_port)
@@ -1103,12 +1103,17 @@ static int lacpdu_recv(struct lacp_port *lacp_port)
struct lacpdu lacpdu;
struct sockaddr_ll ll_from;
int err;
Expand All @@ -33,5 +31,5 @@ index 9836824..7bf3700 100644
return 0;

--
2.7.4
2.17.1.windows.2

Original file line number Diff line number Diff line change
@@ -1,20 +1,17 @@
From b82da0dc94ca34b039396328a8c2fcb61aa73c0f Mon Sep 17 00:00:00 2001
From: yorke <[email protected]>
Date: Mon, 3 Jun 2019 13:27:26 +0800
Subject: [PATCH 7/8] Send LACP PDU immediately if our state changed From:
Pavel Shirshov <[email protected]> Date: Wed, 29 May 2019 19:15:20
+0000
From 780cc967a5544d3ab6f43cba4076b5e0dbb48395 Mon Sep 17 00:00:00 2001
From: Pavel Shirshov <[email protected]>
Date: Tue, 3 Mar 2020 13:01:14 -0800
Subject: [PATCH] Send LACP PDU immediately if our state changed

Signed-off-by: yorke <[email protected]>
---
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 7bf3700..4016b15 100644
index fa732ba..55abe88 100644
--- a/teamd/teamd_runner_lacp.c
+++ b/teamd/teamd_runner_lacp.c
@@ -1017,8 +1017,7 @@ static int lacp_port_set_state(struct lacp_port *lacp_port,
@@ -1019,8 +1019,7 @@ static int lacp_port_set_state(struct lacp_port *lacp_port,
return err;

lacp_port_actor_update(lacp_port);
Expand All @@ -24,7 +21,7 @@ index 7bf3700..4016b15 100644
return lacpdu_send(lacp_port);
}

@@ -1136,9 +1135,10 @@ static int lacpdu_recv(struct lacp_port *lacp_port)
@@ -1138,9 +1137,10 @@ static int lacpdu_recv(struct lacp_port *lacp_port)
if (err)
return err;

Expand All @@ -38,5 +35,5 @@ index 7bf3700..4016b15 100644
err = lacpdu_send(lacp_port);
if (err)
--
2.7.4
2.17.1.windows.2

Loading