aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/lacp/input.c
AgeCommit message (Collapse)AuthorFilesLines
2022-03-09stats: refactorDamjan Marion1-7/+7
Type: refactor Change-Id: Ifd533a095d979dc55bfbe5fac7e0b7510a4d900c Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-05-13lacp: Prohibiting bonding with remote having different key than 1st memberSteven Luong1-4/+2
After forming the bonding with 1st remote member, Subsequent member must have the same key in order to join the same bonding group. Type: fix Signed-off-by: Steven Luong <sluong@cisco.com> Change-Id: I9ff6d6c083a5b6a26beedbd7181d5a120cb5710b
2020-07-28bonding lacp: replace slave string with memberSteven Luong1-56/+56
- Replace textual string slave with member except APIs. - For APIs, mark the existing APIs as deprecated and introduce new APIs - While introducing sw_bond_interface_dump, add the optional filter by sw_if_index and enhance the testcases to make use of it. Type: improvement Signed-off-by: Steven Luong <sluong@cisco.com> Change-Id: Ib6626c514e45350308aeeda0decb70f3aba2f63e
2020-05-12lacp: missing endian conversions for trace packet formatSteven Luong1-2/+2
Fix a couple endian conversions for displaying Marker Protocol packet in the trace Type: fix Signed-off-by: Steven Luong <sluong@cisco.com> Change-Id: I746a67fb6143b5ad52bc4af9604ff8760dbdec9b
2020-05-07lacp: fix regarding vm arg for vlib_time_now callsElias Rudberg1-9/+6
Use thread-specific vlib_main_t *vm pointers to avoid problems with different threads accessing the same vlib_main_t data structure. This avoids assertion failure when vlib_time_now() is called with a vm corresponding to a different thread. Type: fix Signed-off-by: Elias Rudberg <elias.rudberg@bahnhof.net> Change-Id: I359596ecff86e03d57aa8d2330f77bf9a913485f
2019-12-13bonding: Add /if/lacp/<bond-sw_if_index>/<slave-sw_if_index>/partner-stateSteven Luong1-0/+10
We already had /if/lacp/<bond-sw_if_index>/<slave-sw_if_index>/state in the stats segment. Add also the partner-state to be complete. Change to populate stats segment with the states at startup, after processing an lacp pdu, and after timer expiration. Unit test --------- sudo vpp_get_stats dump | grep /if/lacp 63.00 /if/lacp/3/1/state 61.00 /if/lacp/3/1/partner-state 63.00 /if/lacp/3/2/state 61.00 /if/lacp/3/2/partner-state Type: feature Signed-off-by: Steven Luong <sluong@cisco.com> Change-Id: Ib7b8e1183d572bb6e422a846aaa2b7b3559a0dc7
2019-10-24lacp: add actor steady state check prior to skip processing lacp pduSteven Luong1-3/+1
In a rare event, we may be skipping processing lacp pdu's when the it is not in steady state. Type: fix Signed-off-by: Steven Luong <sluong@cisco.com> Change-Id: I3595d22dbff8a97dce9fb4d4452d2051bcf6f523
2019-05-16init / exit function orderingDave Barach1-6/+6
The vlib init function subsystem now supports a mix of procedural and formally-specified ordering constraints. We should eliminate procedural knowledge wherever possible. The following schemes are *roughly* equivalent: static clib_error_t *init_runs_first (vlib_main_t *vm) { clib_error_t *error; ... do some stuff... if ((error = vlib_call_init_function (init_runs_next))) return error; ... } VLIB_INIT_FUNCTION (init_runs_first); and static clib_error_t *init_runs_first (vlib_main_t *vm) { ... do some stuff... } VLIB_INIT_FUNCTION (init_runs_first) = { .runs_before = VLIB_INITS("init_runs_next"), }; The first form will [most likely] call "init_runs_next" on the spot. The second form means that "init_runs_first" runs before "init_runs_next," possibly much earlier in the sequence. Please DO NOT construct sets of init functions where A before B actually means A *right before* B. It's not necessary - simply combine A and B - and it leads to hugely annoying debugging exercises when trying to switch from ad-hoc procedural ordering constraints to formal ordering constraints. Change-Id: I5e4353503bf43b4acb11a45fb33c79a5ade8426c Signed-off-by: Dave Barach <dave@barachs.net>
2019-04-03lacp: passive mode support [VPP-1551]Steven Luong1-2/+13
By definition, passive mode means the node does not start sending lacp pdu until it first hears from the partner or remote. - Rename ptx machine's BEGIN state to NO_PERIODIC state. - Put periodic machine in NO_PERIDOIC state when the interface is enabled for lacp. ptx machine will transition out of NO_PERIODIC state when the local node hears from the remote or when the local node is configured for active mode. - Also add send and receive statistics for debugging. Change-Id: I747953b9595ed31328b2f4f3e7a8d15d01e04d7f Signed-off-by: Steven Luong <sluong@cisco.com>
2018-04-23lacp: partner may time us out if fast-rate is configured [VPP-1247]Steven1-0/+2
We should be sending LACP PDU every second if the partner has LACP_TIMEOUT flag set which means it will time us out in 3 seconds. Add interface name for lacp trace Change-Id: If7d816c062d03e80cc0dd7d10dba0b76ace0664a Signed-off-by: Steven <sluong@cisco.com>
2018-03-21bond: Add bonding driver and LACP protocolSteven1-0/+359
Add bonding driver to support creation of bond interface which composes of multiple slave interfaces. The slave interfaces could be physical interfaces, or just any virtual interfaces. For example, memif interfaces. The syntax to create a bond interface is create bond mode <lacp | xor | acitve-backup | broadcast | round-robin> To enslave an interface to the bond interface, enslave interface TenGigabitEthernet6/0/0 to BondEthernet0 Please see src/plugins/lacp/lacp_doc.md for more examples and additional options. LACP is a control plane protocol which manages and monitors the status of the slave interfaces. The protocol is part of 802.3ad standard. This patch implements LACPv1. LACPv2 is not supported. To enable LACP on the bond interface, specify "mode lacp" when the bond interface is created. The syntax to enslave a slave interface is the same as other bonding modes. Change-Id: I06581d3b87635972f9f0e1ec50b67560fc13e26c Signed-off-by: Steven <sluong@cisco.com>