[ISSUE] Failed to find "enabled" option.
by Xin Long
I found this err in "loadbalance" and "lacp" runner when adding ports.
It's caused by trying to set "enabled" option in .port_link_changed()
or .port_changed().
When a new port is added, the first 'port changed event' process is
earlier than CMD TEAM_CMD_OPTIONS_GET, in this CMD, all
the options are synchronized from kernel.
It means there's no 'enabled' option yet when calling port_link_changed
in the first 'port changed event' process. In lb_event_watch_port_link_changed
and lacp_event_watch_port_changed, they call teamd_port_check_enable
to set 'enabled' option. this err is triggered.
I'm not sure why teamd_port_check_enable needs to check if
'enabled' option exists. I checked the ab's .port_link_changed(),
it just sets it by calling team_set_port_enabled(), instead of
checking 'enabled' option first.
can we just use team_set_port_enabled to set it directly in
.port(_link)_changed OR improve teamd_port_check_enable
to avoid this err ?
Thanks.
4 years
[jpirko/libteam] 3d1e9e: teamd: set correct bits for standby ports
by GitHub
Branch: refs/heads/master
Home: https://github.com/jpirko/libteam
Commit: 3d1e9efa37976fce3546e343a948a582da1dd203
https://github.com/jpirko/libteam/commit/3d1e9efa37976fce3546e343a948a582...
Author: Xin Long <lucien.xin(a)gmail.com>
Date: 2017-05-08 (Mon, 08 May 2017)
Changed paths:
M teamd/teamd_runner_lacp.c
Log Message:
-----------
teamd: set correct bits for standby ports
Patrick reported an issue that Collecting & Distributing & Synchronization
bits shouldn't be set in LACPDUs for the ports associated with standby agg.
It would also cause team to work differently from bonding.
Jamie and Patrick concluded from section 5.6.1 of IEEE 802.1AX-2008:
- Standby ports MAY set Collecting and Distributing bits
- Standby ports MUST NOT set Synchronization bit
This patch is to fix it by setting these three sits only when the selected
ports associated with a selected agg.
Reported-by: Patrick Talbert <ptalbert(a)redhat.com>
Signed-off-by: Xin Long <lucien.xin(a)gmail.com>
Signed-off-by: Jiri Pirko <jiri(a)mellanox.com>
Commit: 9a9fbff3e75f78cbff76e9dbd1cfa0a05fd1f120
https://github.com/jpirko/libteam/commit/9a9fbff3e75f78cbff76e9dbd1cfa0a0...
Author: Xin Long <lucien.xin(a)gmail.com>
Date: 2017-05-08 (Mon, 08 May 2017)
Changed paths:
M teamd/teamd_lw_nsna_ping.c
Log Message:
-----------
teamd: check ipv6 packet only with the 4 bits version
Now in lw_nsnap_receive, it checks if the packet is ipv6 or not by
ip6h.ip6_vfc != 0x60. But ip6_vfc in ipv6 header is 4 bits version
and top 4 bits tclass.
The na packet from some switch may set this top 4 bits tclass. It
will cause to fail to validate the ipv6 na packet, and nsna_ping
couldn't work.
This patch is to fix it by only using the 4 bits version to check
ipv6 packet.
Reported-by: Amit Supugade <asupugad(a)redhat.com>
Signed-off-by: Xin Long <lucien.xin(a)gmail.com>
Signed-off-by: Jiri Pirko <jiri(a)mellanox.com>
Commit: 49c1de9b67a5a26f120294743d206f3a9286a314
https://github.com/jpirko/libteam/commit/49c1de9b67a5a26f120294743d206f3a...
Author: Xin Long <lucien.xin(a)gmail.com>
Date: 2017-05-08 (Mon, 08 May 2017)
Changed paths:
M teamd/teamd_lw_nsna_ping.c
Log Message:
-----------
teamd: check target host with nap.nah.nd_na_target
Now in lw_nsnap_receive, it compares ip6h.ip6_src with nsnap_ppriv->dst
to check target host.
But when target_host is set with a global addr, the na packet from some
switch may use it's link/local addr as the ip6_src addr, instead of the
global addr. It will cause to fail to validate the ipv6 na packet, and
nsna_ping couldn't work.
Since nap.nah.nd_na_target is always set with target_host, this patch is
to fix it by using nap.nah.nd_na_target to compare with nsnap_ppriv->dst
to check target host instead.
Reported-by: Amit Supugade <asupugad(a)redhat.com>
Signed-off-by: Xin Long <lucien.xin(a)gmail.com>
Signed-off-by: Jiri Pirko <jiri(a)mellanox.com>
Compare: https://github.com/jpirko/libteam/compare/ee01c00ecaac...49c1de9b67a5
6 years, 4 months
[PATCH 0/2] teamd: fix two issues for some switch when validating na packet
by Xin Long
The na packet from some switch or router exposes two issues when validating
it in lw_nsnap_receive that the following patches will fix.
Xin Long (2):
teamd: check ipv6 packet only with the 4 bits version
teamd: check target host with nap.nah.nd_na_target
teamd/teamd_lw_nsna_ping.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
--
2.1.0
6 years, 4 months
[PATCH] teamd: set correct bits for standby ports
by Xin Long
Patrick reported an issue that Collecting & Distributing & Synchronization
bits shouldn't be set in LACPDUs for the ports associated with standby agg.
It would also cause team to work differently from bonding.
Jamie and Patrick concluded from section 5.6.1 of IEEE 802.1AX-2008:
- Standby ports MAY set Collecting and Distributing bits
- Standby ports MUST NOT set Synchronization bit
This patch is to fix it by setting these three sits only when the selected
ports associated with a selected agg.
Reported-by: Patrick Talbert <ptalbert(a)redhat.com>
Signed-off-by: Xin Long <lucien.xin(a)gmail.com>
---
teamd/teamd_runner_lacp.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/teamd/teamd_runner_lacp.c b/teamd/teamd_runner_lacp.c
index 9c77fae..5601278 100644
--- a/teamd/teamd_runner_lacp.c
+++ b/teamd/teamd_runner_lacp.c
@@ -913,9 +913,10 @@ static void lacp_port_actor_update(struct lacp_port *lacp_port)
state |= INFO_STATE_LACP_ACTIVITY;
if (lacp_port->lacp->cfg.fast_rate)
state |= INFO_STATE_LACP_TIMEOUT;
- if (lacp_port_selected(lacp_port))
- state |= INFO_STATE_SYNCHRONIZATION;
- state |= INFO_STATE_COLLECTING | INFO_STATE_DISTRIBUTING;
+ if (lacp_port_selected(lacp_port) &&
+ lacp_port_agg_selected(lacp_port))
+ state |= INFO_STATE_SYNCHRONIZATION |
+ 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.1.0
6 years, 4 months