Compare commits
11 Commits
0039015be8
...
19b27f8e76
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
19b27f8e76 | ||
|
|
7884361172 | ||
|
|
5206ccebc8 | ||
|
|
d61b1150f8 | ||
|
|
8da2dae04f | ||
|
|
b7a2430070 | ||
|
|
7a8846a70a | ||
|
|
2796419f41 | ||
|
|
28bf82f7d1 | ||
|
|
36afc15049 | ||
|
|
8b8ae222a0 |
@ -0,0 +1,54 @@
|
||||
From 61efd6de2fbb8ee077863ee5a355ac3dfd9365b9 Mon Sep 17 00:00:00 2001
|
||||
From: Xin Long <lucien.xin@gmail.com>
|
||||
Date: Tue, 1 Sep 2020 13:59:27 +0800
|
||||
Subject: [PATCH] Revert "teamd: Disregard current state when considering port
|
||||
enablement"
|
||||
|
||||
This reverts commit deadb5b715227429a1879b187f5906b39151eca9.
|
||||
|
||||
As Patrick noticed, with that commit, teamd_port_check_enable()
|
||||
would set the team port to the new state unconditionally, which
|
||||
triggers another change message from kernel to userspace, then
|
||||
teamd_port_check_enable() is called again to set the team port
|
||||
to the new state.
|
||||
|
||||
This would go around and around to update the team port state,
|
||||
and even cause teamd to consume 100% cpu.
|
||||
|
||||
As the issue caused by that commit is serious, it has to be
|
||||
reverted. As for the issued fixed by that commit, I would
|
||||
propose a new fix later.
|
||||
|
||||
Signed-off-by: Jiri Pirko <jiri@nvidia.com>
|
||||
---
|
||||
teamd/teamd_per_port.c | 8 ++++++--
|
||||
1 file changed, 6 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/teamd/teamd_per_port.c b/teamd/teamd_per_port.c
|
||||
index 166da57..d429753 100644
|
||||
--- a/teamd/teamd_per_port.c
|
||||
+++ b/teamd/teamd_per_port.c
|
||||
@@ -442,14 +442,18 @@ int teamd_port_check_enable(struct teamd_context *ctx,
|
||||
bool should_enable, bool should_disable)
|
||||
{
|
||||
bool new_enabled_state;
|
||||
+ bool curr_enabled_state;
|
||||
int err;
|
||||
|
||||
if (!teamd_port_present(ctx, tdport))
|
||||
return 0;
|
||||
+ err = teamd_port_enabled(ctx, tdport, &curr_enabled_state);
|
||||
+ if (err)
|
||||
+ return err;
|
||||
|
||||
- if (should_enable)
|
||||
+ if (!curr_enabled_state && should_enable)
|
||||
new_enabled_state = true;
|
||||
- else if (should_disable)
|
||||
+ else if (curr_enabled_state && should_disable)
|
||||
new_enabled_state = false;
|
||||
else
|
||||
return 0;
|
||||
--
|
||||
2.33.0
|
||||
|
||||
Binary file not shown.
BIN
libteam-1.30.tar.gz
Normal file
BIN
libteam-1.30.tar.gz
Normal file
Binary file not shown.
34
libteam-fix-error-options-in-doc.patch
Normal file
34
libteam-fix-error-options-in-doc.patch
Normal file
@ -0,0 +1,34 @@
|
||||
From ce8bc85cbca8abe4928c25d2eb8e302e0577308f Mon Sep 17 00:00:00 2001
|
||||
From: yixiangzhike <yixiangzhike007@163.com>
|
||||
Date: Thu, 8 Sep 2022 19:30:36 +0800
|
||||
Subject: [PATCH] fix error options in doc
|
||||
|
||||
---
|
||||
man/teamd.8 | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/man/teamd.8 b/man/teamd.8
|
||||
index 3d27eae..59ddbfc 100644
|
||||
--- a/man/teamd.8
|
||||
+++ b/man/teamd.8
|
||||
@@ -31,7 +31,7 @@ teamd \(em team network device control daemon
|
||||
.IR address ]
|
||||
.br
|
||||
.B teamd
|
||||
-.BR \-h | \-V
|
||||
+.BR \-h | \-v
|
||||
.SH DESCRIPTION
|
||||
.PP
|
||||
teamd is a daemon to control a given team network device, during runtime,
|
||||
@@ -44,7 +44,7 @@ libteam project.
|
||||
.B "\-h, \-\-help"
|
||||
Print help text to console and exit.
|
||||
.TP
|
||||
-.B "\-V, \-\-version"
|
||||
+.B "\-v, \-\-version"
|
||||
Print version information to console and exit.
|
||||
.TP
|
||||
.B "\-d, \-\-daemonize"
|
||||
--
|
||||
2.27.0
|
||||
|
||||
30
libteam.spec
30
libteam.spec
@ -1,16 +1,19 @@
|
||||
Name: libteam
|
||||
Version: 1.27
|
||||
Release: 12
|
||||
Version: 1.30
|
||||
Release: 3
|
||||
Summary: User-space counterpart library for team network
|
||||
License: LGPLv2+
|
||||
URL: http://www.libteam.org
|
||||
Source: http://www.libteam.org/files/libteam-%{version}.tar.gz
|
||||
|
||||
Patch0: libteam-fix-error-options-in-doc.patch
|
||||
Patch1: backport-revert-teamd-Disregard-current-state-when-considerin.patch
|
||||
|
||||
BuildRequires: gcc jansson-devel libdaemon-devel libnl3-devel
|
||||
BuildRequires: swig python2-devel dbus-devel systemd doxygen
|
||||
|
||||
Provides: teamd = %{version}-%{release}
|
||||
Provides: teamd%{?_isa} = %{version}-%{release}
|
||||
Provides: teamd = %{version}-%{release} teamd%{?_isa} = %{version}-%{release}
|
||||
Obsoletes: teamd < %{version}-%{release}
|
||||
|
||||
%description
|
||||
This package is the user-space counterpart for the team network
|
||||
@ -19,8 +22,8 @@ driver, and provides an API to control them.
|
||||
%package devel
|
||||
Summary : The devel for %{name}
|
||||
Requires: %{name} = %{version}-%{release}
|
||||
Provides: teamd-devel = %{version}-%{release}
|
||||
Provides: teamd-devel%{?_isa} = %{version}-%{release}
|
||||
Provides: teamd-devel = %{version}-%{release} teamd-devel%{?_isa} = %{version}-%{release}
|
||||
Obsoletes: teamd-devel < %{version}-%{release}
|
||||
|
||||
%description devel
|
||||
Libraries and header files for libteam development
|
||||
@ -136,6 +139,21 @@ popd
|
||||
%{_mandir}/man8/teamnl.8*
|
||||
|
||||
%changelog
|
||||
* Wed Oct 11 2023 fuanan <fuanan3@h-partners.com> - 1.30-3
|
||||
- fix an issue about teamd is using 100% cpu usage (of 1 core)
|
||||
|
||||
* Fri Sep 9 2022 yixiangzhike <yixiangzhike007@163.com> - 1.30-2
|
||||
- fix error options in doc
|
||||
|
||||
* Tue Aug 04 2020 shanzhikun <shanzhikun@huawei.com> - 1.30-1
|
||||
- upgrade libteam to 1.30.
|
||||
|
||||
* Tue Jan 14 2020 openEuler Buildteam <buildteam@openeuler.org> - 1.27-14
|
||||
- Delete unneeded obsoletes with isa
|
||||
|
||||
* Fri Dec 27 2019 openEuler Buildteam <buildteam@openeuler.org> - 1.27-13
|
||||
- Add oboselets
|
||||
|
||||
* Wed Dec 25 2019 openEuler Buildteam <buildteam@openeuler.org> - 1.27-12
|
||||
- Add provides of libteam-doc
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user