numam-dpdk/drivers/net/bonding
Weifeng Li 0bf68c660e net/bonding: change state machine to defaulted
A dpdk bonding 802.3ad network as follows:
+----------+                        +-----------+
|dpdk lacp |bond1.1 <------> bond2.1|switch lacp|
|          |bond1.2 <------> bond2.2|           |
+----------+                        +-----------+
If a fiber optic go wrong about single pass during normal running like
this:
bond1.2 -----> bond2.2 ok
bond1.2 <--x-- bond2.2 error: bond1.2 receive no LACPDU Some packets
			      from switch to dpdk will choose bond2.2
			      and lost.

DPDK lacp state machine will transits to the expired state if no LACPDU
is received before the current_while_timer expires. But if no LACPDU is
received before the current_while_timer expires again, DPDK lacp state
machine has no change. Bond2.2 can not change to inactive depend on the
received LACPDU.
According to IEEE 802.3ad, if no lacpdu is received before the
current_while_timer expires again, the state machine should transits
from expired to defaulted. Bond2.2 will change to inactive depend on the
LACPDU with defaulted state.

This patch adds a state machine change from expired to defaulted when no
lacpdu is received before the current_while_timer expires again
according to IEEE 802.3ad:
If no LACPDU is received before the current_while timer expires again,
the state machine transits to the DEFAULTED state. The record Default
function overwrites the current operational parameters for the Partner
with administratively configured values. This allows configuration of
aggregations and individual links when no protocol partner is present,
while still permitting an active partner to override default settings.
The update_Default_Selected function sets the Selected variable FALSE
if the Link Aggregation Group has changed. Since all operational
parameters are now set to locally administered values there can be no
disagreement as to the Link Aggregation Group, so the Matched variable
is set TRUE.

The relevant description is in the chapter 43.4.12 of the link below:
https://ieeexplore.ieee.org/stamp/stamp.jsp?tp=&arnumber=850426

Signed-off-by: Weifeng Li <liweifeng96@126.com>
Acked-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
2020-07-21 13:54:54 +02:00
..
eth_bond_8023ad_private.h net/bonding: change state machine to defaulted 2020-07-21 13:54:54 +02:00
eth_bond_private.h rename private header files 2019-10-27 22:03:06 +01:00
Makefile build: disable experimental API check internally 2020-04-14 16:22:34 +02:00
meson.build build: disable experimental API check internally 2020-04-14 16:22:34 +02:00
rte_eth_bond_8023ad.c net/bonding: change state machine to defaulted 2020-07-21 13:54:54 +02:00
rte_eth_bond_8023ad.h replace packed attributes 2020-04-16 18:16:46 +02:00
rte_eth_bond_alb.c rename private header files 2019-10-27 22:03:06 +01:00
rte_eth_bond_alb.h
rte_eth_bond_api.c net/bonding: fix MAC address when switching active port 2020-07-17 18:21:21 +02:00
rte_eth_bond_args.c rename private header files 2019-10-27 22:03:06 +01:00
rte_eth_bond_flow.c rename private header files 2019-10-27 22:03:06 +01:00
rte_eth_bond_pmd.c net/bonding: fix MAC address when one port resets 2020-07-17 18:21:21 +02:00
rte_eth_bond.h
rte_pmd_bond_version.map build: align symbols with global ABI version 2019-11-20 23:05:39 +01:00