import libteam-1.29-1.el8

This commit is contained in:
CentOS Sources 2020-04-28 05:40:45 -04:00 committed by Andrew Lukoshko
parent 48520f0dc2
commit 54bf29ca13
15 changed files with 69 additions and 597 deletions

2
.gitignore vendored
View File

@ -1 +1 @@
SOURCES/libteam-1.28.tar.gz
SOURCES/libteam-1.29.tar.gz

View File

@ -1 +1 @@
c3429d0b29ae78dd1d4899dab6fe9f13af26ff7d SOURCES/libteam-1.28.tar.gz
2dbdd6769c61381f84a31553bc5502a60376e33b SOURCES/libteam-1.29.tar.gz

View File

@ -1,30 +0,0 @@
From f36c191da3d65a4744582b2eb09fa297dd85f9ae Mon Sep 17 00:00:00 2001
From: Hangbin Liu <liuhangbin@gmail.com>
Date: Fri, 22 Feb 2019 16:27:46 +0800
Subject: [PATCH 5/6] man: fix runner.min_ports default value
It should be 1 instead of 0.
Reported-by: LiLiang <liali@redhat.com>
Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
Signed-off-by: Jiri Pirko <jiri@mellanox.com>
---
man/teamd.conf.5 | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/man/teamd.conf.5 b/man/teamd.conf.5
index 9bdf46a..5b0f3e9 100644
--- a/man/teamd.conf.5
+++ b/man/teamd.conf.5
@@ -240,7 +240,7 @@ Specifies the minimum number of ports that must be active before asserting carri
.RS 7
.PP
Default:
-.BR "0"
+.BR "1"
.RE
.TP
.BR "runner.agg_select_policy " (string)
--
2.18.1

View File

@ -0,0 +1,55 @@
From 337bae54278a112bab9d99e05ee7ec825b12c646 Mon Sep 17 00:00:00 2001
Message-Id: <337bae54278a112bab9d99e05ee7ec825b12c646.1566966529.git.lucien.xin@gmail.com>
From: Hangbin Liu <liuhangbin@gmail.com>
Date: Wed, 24 Jul 2019 17:02:21 +0800
Subject: [PATCH] man teamd.conf: update some parameter default values
Update default runner.name to roundrobin, default runner.tx_hash array
to ["eth", "ipv4", "ipv6"], default runner.fast_rate to false.
Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
Signed-off-by: Jiri Pirko <jiri@mellanox.com>
---
man/teamd.conf.5 | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/man/teamd.conf.5 b/man/teamd.conf.5
index 9090b4a..350ffc9 100644
--- a/man/teamd.conf.5
+++ b/man/teamd.conf.5
@@ -42,6 +42,9 @@ To do passive load balancing, runner only sets up BPF hash function which will d
.PP
.BR "lacp "\(em
Implements 802.3ad LACP protocol. Can use same Tx port selection possibilities as loadbalance runner.
+.PP
+Default:
+.BR "roundrobin"
.RE
.TP
.BR "notify_peers.count " (int)
@@ -182,6 +185,10 @@ Uses source and destination SCTP ports.
.PP
.BR "l4 "\(em
Uses source and destination TCP and UDP and SCTP ports.
+.PP
+Default:
+.B
+["eth", "ipv4", "ipv6"]
.RE
.TP
.BR "runner.tx_balancer.name " (string)
@@ -217,6 +224,11 @@ Default:
Option specifies the rate at which our link partner is asked to transmit LACPDU packets. If this is
.BR "true"
then packets will be sent once per second. Otherwise they will be sent every 30 seconds.
+.RS 7
+.PP
+Default:
+.BR "false"
+.RE
.TP
.BR "runner.tx_hash " (array)
Same as for load balance runner.
--
2.18.1

View File

@ -1,68 +0,0 @@
From c8b356a3cd363af10d71e21a4fb7dc26cf90b5bc Mon Sep 17 00:00:00 2001
From: Hangbin Liu <liuhangbin@gmail.com>
Date: Mon, 7 Jan 2019 15:58:49 +0800
Subject: [PATCH 2/6] teamd: config: update local prio to kernel
Team port's priority will affect the active port selection. Update the
local config is not enough. We also need to update kernel configs.
Reported-by: Liang Li <liali@redhat.com>
Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
Signed-off-by: Jiri Pirko <jiri@mellanox.com>
---
teamd/teamd_config.c | 32 ++++++++++++++++++++++++++++++++
1 file changed, 32 insertions(+)
diff --git a/teamd/teamd_config.c b/teamd/teamd_config.c
index 94158ce..69b25de 100644
--- a/teamd/teamd_config.c
+++ b/teamd/teamd_config.c
@@ -155,6 +155,31 @@ errout:
return err;
}
+static int teamd_config_port_set(struct teamd_context *ctx, const char *port_name,
+ json_t *port_obj)
+{
+ struct teamd_port *tdport;
+ json_t *config;
+ int tmp, err;
+
+ tdport = teamd_get_port_by_ifname(ctx, port_name);
+ if (!tdport)
+ return -ENODEV;
+
+ config = json_object_get(port_obj, "prio");
+ if (json_is_integer(config)) {
+ tmp = json_integer_value(config);
+ err = team_set_port_priority(ctx->th, tdport->ifindex, tmp);
+ if (err) {
+ teamd_log_err("%s: Failed to set \"priority\".",
+ tdport->ifname);
+ return err;
+ }
+ }
+
+ return 0;
+}
+
int teamd_config_port_update(struct teamd_context *ctx, const char *port_name,
const char *json_port_cfg_str)
{
@@ -184,6 +209,13 @@ int teamd_config_port_update(struct teamd_context *ctx, const char *port_name,
if (err)
teamd_log_err("%s: Failed to update existing config "
"port object", port_name);
+ else {
+ err = teamd_config_port_set(ctx, port_name, port_new_obj);
+ if (err)
+ teamd_log_err("%s: Failed to update config to kernel",
+ port_name);
+ }
+
new_port_decref:
json_decref(port_new_obj);
return err;
--
2.18.1

View File

@ -1,74 +0,0 @@
From 8c7614abf5993d92e332a800f244bdebd7c9a2c8 Mon Sep 17 00:00:00 2001
Message-Id: <8c7614abf5993d92e332a800f244bdebd7c9a2c8.1562149642.git.lucien.xin@gmail.com>
From: Xin Long <lucien.xin@gmail.com>
Date: Tue, 2 Jul 2019 19:33:56 +0800
Subject: [PATCH] teamd: improve the error output for non-integer port prio
This patch is to improve the error log when users pass
a non-integer value to set port's prio. After that, we
can remove the error output for teamd_config_port_set
failure from teamd_config_port_update.
Signed-off-by: Xin Long <lucien.xin@gmail.com>
Signed-off-by: Jiri Pirko <jiri@mellanox.com>
---
teamd/teamd_config.c | 30 +++++++++++++++---------------
1 file changed, 15 insertions(+), 15 deletions(-)
diff --git a/teamd/teamd_config.c b/teamd/teamd_config.c
index 1bf85ac..610ad5f 100644
--- a/teamd/teamd_config.c
+++ b/teamd/teamd_config.c
@@ -167,17 +167,19 @@ static int teamd_config_port_set(struct teamd_context *ctx, const char *port_nam
return 0;
config = json_object_get(port_obj, "prio");
- if (json_is_integer(config)) {
- tmp = json_integer_value(config);
- err = team_set_port_priority(ctx->th, tdport->ifindex, tmp);
- if (err) {
- teamd_log_err("%s: Failed to set \"priority\".",
- tdport->ifname);
- return err;
- }
+ if (!json_is_integer(config)) {
+ teamd_log_err("%s: Failed to get integer for \"priority\".",
+ tdport->ifname);
+ return -ENOENT;
}
- return 0;
+ tmp = json_integer_value(config);
+ err = team_set_port_priority(ctx->th, tdport->ifindex, tmp);
+ if (err)
+ teamd_log_err("%s: Failed to update \"priority\" to kernel",
+ tdport->ifname);
+
+ return err;
}
int teamd_config_port_update(struct teamd_context *ctx, const char *port_name,
@@ -206,16 +208,14 @@ int teamd_config_port_update(struct teamd_context *ctx, const char *port_name,
/* replace existing object content */
json_object_clear(port_obj);
err = json_object_update(port_obj, port_new_obj);
- if (err)
+ if (err) {
teamd_log_err("%s: Failed to update existing config "
"port object", port_name);
- else {
- err = teamd_config_port_set(ctx, port_name, port_new_obj);
- if (err)
- teamd_log_err("%s: Failed to update config to kernel",
- port_name);
+ goto new_port_decref;
}
+ err = teamd_config_port_set(ctx, port_name, port_new_obj);
+
new_port_decref:
json_decref(port_new_obj);
return err;
--
2.18.1

View File

@ -1,74 +0,0 @@
From 54f137c10579bf97800c61ebb13e732aa1d843e6 Mon Sep 17 00:00:00 2001
From: Hangbin Liu <liuhangbin@gmail.com>
Date: Fri, 8 Mar 2019 19:28:55 +0800
Subject: [PATCH 6/6] teamd: lacp: update port state according to partner's
sync bit
According to 6.4.15 of IEEE 802.1AX-2014, Figure 6-22, the state that the
port is selected moves MUX state from DETACHED to ATTACHED.
But ATTACHED state does not mean that the port can send and receive user
frames. COLLECTING_DISTRIBUTION state is the state that the port can send
and receive user frames. To move MUX state from ATTACHED to
COLLECTING_DISTRIBUTION, the partner state should be sync as well as the
port selected.
In function lacp_port_actor_update(), only INFO_STATE_SYNCHRONIZATION
should be set to the actor.state when the port is selected.
INFO_STATE_COLLECTING and INFO_STATE_DISTRIBUTING should be set to false
with ATTACHED mode and set to true when INFO_STATE_SYNCHRONIZATION of
partner.state is set.
In function lacp_port_should_be_{enabled, disabled}(), we also need to
check the INFO_STATE_SYNCHRONIZATION bit of partner.state.
Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
Signed-off-by: Jiri Pirko <jiri@mellanox.com>
---
teamd/teamd_runner_lacp.c | 16 +++++++++++-----
1 file changed, 11 insertions(+), 5 deletions(-)
diff --git a/teamd/teamd_runner_lacp.c b/teamd/teamd_runner_lacp.c
index 555aa06..d292d69 100644
--- a/teamd/teamd_runner_lacp.c
+++ b/teamd/teamd_runner_lacp.c
@@ -333,7 +333,8 @@ static int lacp_port_should_be_enabled(struct lacp_port *lacp_port)
struct lacp *lacp = lacp_port->lacp;
if (lacp_port_selected(lacp_port) &&
- lacp_port->agg_lead == lacp->selected_agg_lead)
+ lacp_port->agg_lead == lacp->selected_agg_lead &&
+ lacp_port->partner.state & INFO_STATE_SYNCHRONIZATION)
return true;
return false;
}
@@ -343,7 +344,8 @@ static int lacp_port_should_be_disabled(struct lacp_port *lacp_port)
struct lacp *lacp = lacp_port->lacp;
if (!lacp_port_selected(lacp_port) ||
- lacp_port->agg_lead != lacp->selected_agg_lead)
+ lacp_port->agg_lead != lacp->selected_agg_lead ||
+ !(lacp_port->partner.state & INFO_STATE_SYNCHRONIZATION))
return true;
return false;
}
@@ -914,9 +916,13 @@ static void lacp_port_actor_update(struct lacp_port *lacp_port)
if (lacp_port->lacp->cfg.fast_rate)
state |= INFO_STATE_LACP_TIMEOUT;
if (lacp_port_selected(lacp_port) &&
- lacp_port_agg_selected(lacp_port))
- state |= INFO_STATE_SYNCHRONIZATION |
- INFO_STATE_COLLECTING | INFO_STATE_DISTRIBUTING;
+ lacp_port_agg_selected(lacp_port)) {
+ state |= INFO_STATE_SYNCHRONIZATION;
+ state &= ~(INFO_STATE_COLLECTING | INFO_STATE_DISTRIBUTING);
+ if (lacp_port->partner.state & INFO_STATE_SYNCHRONIZATION)
+ state |= INFO_STATE_COLLECTING |
+ INFO_STATE_DISTRIBUTING;
+ }
if (lacp_port->state == PORT_STATE_EXPIRED)
state |= INFO_STATE_EXPIRED;
if (lacp_port->state == PORT_STATE_DEFAULTED)
--
2.18.1

View File

@ -1,38 +0,0 @@
From 5f355301b7cafbb51b036ad1e5af38e79d4330d6 Mon Sep 17 00:00:00 2001
From: Hangbin Liu <liuhangbin@gmail.com>
Date: Fri, 11 Jan 2019 09:57:10 +0800
Subject: [PATCH 3/6] teamd: lw: arp_ping: only check arp reply message
Currently we check both arp request and reply message for arp_ping link
watch. But if we enabled validate_active and validate_inactive at the
same time, we will receive the other slave's arp request as the switch
broadcasts arp request message. i.e. slave1 receives arp request from
slave2 and vice versa.
Then the arp check will pass even the target is unreachable. Fix it by
only check arp reply message.
Reported-by: LiLiang <liali@redhat.com>
Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
Signed-off-by: Jiri Pirko <jiri@mellanox.com>
---
teamd/teamd_lw_arp_ping.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/teamd/teamd_lw_arp_ping.c b/teamd/teamd_lw_arp_ping.c
index 01cd6e1..81806f0 100644
--- a/teamd/teamd_lw_arp_ping.c
+++ b/teamd/teamd_lw_arp_ping.c
@@ -336,7 +336,8 @@ static int lw_ap_receive(struct lw_psr_port_priv *psr_ppriv)
if (ap.ah.ar_hrd != htons(ll_my.sll_hatype) ||
ap.ah.ar_pro != htons(ETH_P_IP) ||
ap.ah.ar_hln != ll_my.sll_halen ||
- ap.ah.ar_pln != 4) {
+ ap.ah.ar_pln != 4 ||
+ ap.ah.ar_op != htons(ARPOP_REPLY)) {
return 0;
}
--
2.18.1

View File

@ -1,35 +0,0 @@
From 6bf0e87387878654186bcf7287e0eda59b1c2f2c Mon Sep 17 00:00:00 2001
From: Hangbin Liu <liuhangbin@gmail.com>
Date: Thu, 21 Feb 2019 17:37:46 +0800
Subject: [PATCH 4/6] teamd: lw: nsna_ping: only send ns on enabled port
We forget to check forced_send when using nsna_ping link_watch.
Ns is sent from all ports, which cause switch mac flapping. Some
reply packets are delivered to disabled port and dropped directly.
Fix it by checking forced_send and only send ns on enabled port.
Reported-by: LiLiang <liali@redhat.com>
Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
Signed-off-by: Jiri Pirko <jiri@mellanox.com>
---
teamd/teamd_lw_nsna_ping.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/teamd/teamd_lw_nsna_ping.c b/teamd/teamd_lw_nsna_ping.c
index 127d950..82371c4 100644
--- a/teamd/teamd_lw_nsna_ping.c
+++ b/teamd/teamd_lw_nsna_ping.c
@@ -203,6 +203,9 @@ static int lw_nsnap_send(struct lw_psr_port_priv *psr_ppriv)
struct sockaddr_in6 sendto_addr;
struct ns_packet nsp;
+ if (!(psr_ppriv->common.forced_send))
+ return 0;
+
err = teamd_getsockname_hwaddr(psr_ppriv->sock, &ll_my,
sizeof(nsp.hwaddr));
if (err)
--
2.18.1

View File

@ -1,62 +0,0 @@
From 0f1b2fac03361c5d2bac34e4b19922c60c5c06c6 Mon Sep 17 00:00:00 2001
From: Hangbin Liu <liuhangbin@gmail.com>
Date: Wed, 13 Mar 2019 15:04:29 +0800
Subject: [PATCH 1/3] teamd: remove port if adding fails
When we add a port to team via teamdctl, some drivers do not support
changing mac address after dev opened, which would lead to the failure
of port_obj_create(). The call path looks like below for LACP mode:
- port_obj_create()
- port_priv_init_all()
- lacp_port_added()
- lacp_port_set_mac()
Currently, we only destroy the port object if adding port fails. But the
port is still enslaved to team in kernel. IP link command shows the port
is a team_slave, but teamdctl state shows nothing. This may make users
confused.
Fix it by removing the port if adding fails.
v2: also calls teamd_port_remove in port_obj_remove()
Reported-by: Vladimir Benes <vbenes@redhat.com>
Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
Signed-off-by: Jiri Pirko <jiri@mellanox.com>
---
teamd/teamd_per_port.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/teamd/teamd_per_port.c b/teamd/teamd_per_port.c
index 09d1dc7..f98a90d 100644
--- a/teamd/teamd_per_port.c
+++ b/teamd/teamd_per_port.c
@@ -42,6 +42,8 @@ struct port_obj {
};
#define _port(port_obj) (&(port_obj)->port)
+static int teamd_port_remove(struct teamd_context *ctx,
+ struct teamd_port *tdport);
int teamd_port_priv_create_and_get(void **ppriv, struct teamd_port *tdport,
const struct teamd_port_priv *pp,
@@ -203,6 +205,7 @@ static int port_obj_create(struct teamd_context *ctx,
teamd_event_port_removed:
teamd_event_port_removed(ctx, tdport);
list_del:
+ teamd_port_remove(ctx, tdport);
port_obj_destroy(ctx, port_obj);
port_obj_free(port_obj);
return err;
@@ -214,6 +217,7 @@ static void port_obj_remove(struct teamd_context *ctx,
struct teamd_port *tdport = _port(port_obj);
teamd_event_port_removed(ctx, tdport);
+ teamd_port_remove(ctx, tdport);
port_obj_destroy(ctx, port_obj);
port_obj_free(port_obj);
}
--
2.18.1

View File

@ -1,52 +0,0 @@
From 2bf8652cce4303d3ae79dff8bdef10dfae27439b Mon Sep 17 00:00:00 2001
Message-Id: <2bf8652cce4303d3ae79dff8bdef10dfae27439b.1562149639.git.lucien.xin@gmail.com>
From: Xin Long <lucien.xin@gmail.com>
Date: Tue, 2 Jul 2019 19:30:43 +0800
Subject: [PATCH] teamd: return 0 if tdport doesn't exist in
teamd_config_port_set
This issue can be reproduced by doing:
# ip link add dummy1 type dummy
# teamd -t team0 -c '{"runner": {"name": "activebackup"}}' -d
# teamdctl team0 port config update dummy1 '{"prio": -10}'
# ip link set dummy0 master team0
and the error shows:
libteamdctl: usock: Error message received: "ConfigUpdateFail"
libteamdctl: usock: Error message content: "Failed to update config."
command call failed (Invalid argument)
It's a regression caused by Commit c8b356a3cd36 ("teamd: config: update
local prio to kernel") where it requires the tdport has to exist when
a tdport config is being updated. However teamd supports for the port
config going first before the port being enslaved.
This issue breaks how NM-team starts a team device. Here to fix it by
returning 0 even if the tdport doesn't exist in teamd_config_port_set.
Reported-by: Radek Vykydal <rvykydal@redhat.com>
Fixes: c8b356a3cd36 ("teamd: config: update local prio to kernel")
Signed-off-by: Xin Long <lucien.xin@gmail.com>
Signed-off-by: Jiri Pirko <jiri@mellanox.com>
---
teamd/teamd_config.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/teamd/teamd_config.c b/teamd/teamd_config.c
index 34fef1f..1bf85ac 100644
--- a/teamd/teamd_config.c
+++ b/teamd/teamd_config.c
@@ -164,7 +164,7 @@ static int teamd_config_port_set(struct teamd_context *ctx, const char *port_nam
tdport = teamd_get_port_by_ifname(ctx, port_name);
if (!tdport)
- return -ENODEV;
+ return 0;
config = json_object_get(port_obj, "prio");
if (json_is_integer(config)) {
--
2.18.1

View File

@ -1,42 +0,0 @@
From 4dc3a7a042c88193f0371a33f1043919843e6447 Mon Sep 17 00:00:00 2001
From: Xin Long <lucien.xin@gmail.com>
Date: Mon, 1 Apr 2019 16:15:24 +0800
Subject: [PATCH 2/3] teamd: tdport has to exist if item->per_port is set in
__find_by_item_path
The issue can be reproduced by:
# teamd -c '{"device":"team0", "runner":{"name":"lacp"}}' &
# teamdctl team0 state item set runner.aggregator.selected true
teamd process will abort in lacp_port_state_aggregator_selected_set()
as gsc->info.tdport was set to NULL in teamd_state_item_value_set()
The item 'runner.aggregator.selected' is of per_port = true, and it
shouldn't allow to call its setter/getter().
This patch is to add the check for it in __find_by_item_path() called
by teamd_state_item_value_get/set().
Fixes: 6c00aaf02553 ("teamd: add support for state item write operation")
Signed-off-by: Xin Long <lucien.xin@gmail.com>
Signed-off-by: Jiri Pirko <jiri@mellanox.com>
---
teamd/teamd_state.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/teamd/teamd_state.c b/teamd/teamd_state.c
index ab64db9..0714880 100644
--- a/teamd/teamd_state.c
+++ b/teamd/teamd_state.c
@@ -333,6 +333,7 @@ static int __find_by_item_path(struct teamd_state_val_item **p_item,
list_for_each_node_entry(item, &ctx->state_val_list, list) {
/* item->subpath[0] == '.' */
if (!strcmp(item->subpath + 1, subpath) &&
+ (!item->per_port || tdport) &&
(!item->tdport || item->tdport == tdport)) {
*p_item = item;
*p_tdport = tdport;
--
2.18.1

View File

@ -1,76 +0,0 @@
From 90e5279ce0241838d5687739b3bc795235b7d53b Mon Sep 17 00:00:00 2001
From: Xin Long <lucien.xin@gmail.com>
Date: Mon, 15 Apr 2019 16:56:35 +0800
Subject: [PATCH 3/3] teamd: use enabled option_changed to sync enabled to
link_up for lb runner
LiLiang found an issue that after adding two ports into a team device with
lb mode their enabled option sometimes is false.
It was caused by the unexpected events order:
0. team_port_add() in kernel.
1. port_change event A1 sent to userspace.
2. option_change event B1 sent to userspace.
3. port_change event A2 sent to userspace IF port is up now.
4. process port_change event A1 and set port's enabled option 'false'.
5. option_change event B2 sent to userspace.
6. process option_change event B1 and sync enabled option (value = 1).
7. process port_change event A2 and do nothing as enabled option is 1.
8. process option_change event B2 and sync enabled option (value = 0).
In kernel, when the port is still down after dev_open(), which happens more
often since it changed to use netif_oper_up() to check the state instead of
netif_carrier_ok(), the event A2 in Step 3 can be sent at any moment. When
it's ahead of Step 4, Step 7 won't set enabled option to 1 as Step 8 comes
late.
As the port up event can be triggered by dev_watchdog at anytime in kernel,
the port_change and option_change events order can not be controlled. What
can only be done here is to correct it at Step 8, to sync enabled option to
link_up.
So this patch is to add enabled option_changed for lb mode to do this sync.
Reported-by: LiLiang <liali@redhat.com>
Signed-off-by: Xin Long <lucien.xin@gmail.com>
Signed-off-by: Jiri Pirko <jiri@mellanox.com>
---
teamd/teamd_runner_loadbalance.c | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/teamd/teamd_runner_loadbalance.c b/teamd/teamd_runner_loadbalance.c
index b9bfc13..a581472 100644
--- a/teamd/teamd_runner_loadbalance.c
+++ b/teamd/teamd_runner_loadbalance.c
@@ -109,12 +109,27 @@ static int lb_event_watch_port_hwaddr_changed(struct teamd_context *ctx,
return err;
}
+static int lb_event_watch_enabled_option_changed(struct teamd_context *ctx,
+ struct team_option *option,
+ void *priv)
+{
+ struct teamd_port *tdport;
+
+ tdport = teamd_get_port(ctx, team_get_option_port_ifindex(option));
+ if (!tdport)
+ return 0;
+
+ return lb_event_watch_port_link_changed(ctx, tdport, priv);
+}
+
static const struct teamd_event_watch_ops lb_port_watch_ops = {
.hwaddr_changed = lb_event_watch_hwaddr_changed,
.port_hwaddr_changed = lb_event_watch_port_hwaddr_changed,
.port_added = lb_event_watch_port_added,
.port_removed = lb_event_watch_port_removed,
.port_link_changed = lb_event_watch_port_link_changed,
+ .option_changed = lb_event_watch_enabled_option_changed,
+ .option_changed_match_name = "enabled",
};
static int lb_init(struct teamd_context *ctx, void *priv)
--
2.18.1

View File

@ -1,31 +0,0 @@
From 6e67aa89a746ff98d4b4f4fa3c778aa31d4d2c7f Mon Sep 17 00:00:00 2001
From: Hangbin Liu <liuhangbin@gmail.com>
Date: Mon, 17 Dec 2018 16:58:34 +0800
Subject: [PATCH 1/6] teamnl: update help message
Update help message so people could know we support port name directly.
Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
Signed-off-by: Jiri Pirko <jiri@mellanox.com>
---
utils/teamnl.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/utils/teamnl.c b/utils/teamnl.c
index e8de7e2..c53345d 100644
--- a/utils/teamnl.c
+++ b/utils/teamnl.c
@@ -521,7 +521,9 @@ static void print_help(const char *argv0) {
printf(
"%s [options] teamdevname command [command args]\n"
- "\t-h --help Show this help\n",
+ "\t-h --help Show this help\n"
+ "\t-p --port_name team slave port name\n"
+ "\t-a --array_index team option array index\n",
argv0);
printf("Commands:\n");
for (i = 0; i < CMD_TYPE_COUNT; i++) {
--
2.18.1

View File

@ -1,22 +1,12 @@
Name: libteam
Version: 1.28
Release: 4%{?dist}
Version: 1.29
Release: 1%{?dist}
Summary: Library for controlling team network device
Group: System Environment/Libraries
License: LGPLv2+
URL: http://www.libteam.org
Source: http://www.libteam.org/files/libteam-%{version}.tar.gz
Patch1: libteam-teamnl-update-help-message.patch
Patch2: libteam-teamd-config-update-local-prio-to-kernel.patch
Patch3: libteam-teamd-lw-arp_ping-only-check-arp-reply-message.patch
Patch4: libteam-teamd-lw-nsna_ping-only-send-ns-on-enabled-port.patch
Patch5: libteam-man-fix-runner.min_ports-default-value.patch
Patch6: libteam-teamd-lacp-update-port-state-according-to-partner-s-.patch
Patch7: libteam-teamd-remove-port-if-adding-fails.patch
Patch8: libteam-teamd-tdport-has-to-exist-if-item-per_port-is-set-in.patch
Patch9: libteam-teamd-use-enabled-option_changed-to-sync-enabled-to-.patch
Patch10: libteam-teamd-return-0-if-tdport-doesn-t-exist-in-teamd_conf.patch
Patch11: libteam-teamd-improve-the-error-output-for-non-integer-port-.patch
Patch1: libteam-man-teamd.conf-update-some-parameter-default-values.patch
BuildRequires: jansson-devel
BuildRequires: libdaemon-devel
BuildRequires: libnl3-devel
@ -175,6 +165,15 @@ cd binding/python
%{_sysconfdir}/sysconfig/network-scripts/ifdown-TeamPort
%changelog
* Mon Oct 14 2019 Xin Long <lxin@redhat.com> - 1.29-1
- man teamd.conf: update some parameter default values [1732587]
- 1.29 release
- teamd: add port_master_ifindex_changed for link_watch_port_watch_ops
- initscripts: fix if/fi align
- teamd: fix a json object memleak in get_port_obj() [1767685]
- libteam: set netlink event socket as non-blocking [1684389]
- libteam: double NETLINK_RCVBUF to fix -ENOMEM error
- teamd: add a default value 1000 for link_watch.interval
* Mon Jul 15 2019 Xin Long <lxin@redhat.com> - 1.28-4
- gating: run VM with more RAM [1722449]
* Wed Jul 03 2019 Xin Long <lxin@redhat.com> - 1.28-3