]> git.proxmox.com Git - mirror_ovs.git/commit - ofproto/bond.c
lacp: Avoid packet drop on LACP bond after link up
authorNitin Katiyar <nitin.katiyar@ericsson.com>
Sun, 9 Jun 2019 14:17:45 +0000 (14:17 +0000)
committerBen Pfaff <blp@ovn.org>
Mon, 10 Jun 2019 16:12:02 +0000 (09:12 -0700)
commita8448cb170e3bbe0ca73c7c72aead11b4ec77e29
tree4ff49dfe89adb3231a981a1bd631fffc1ab07a0c
parentc94e2d64f05e81b21aa1e027d5c00db8bf2dd91d
lacp: Avoid packet drop on LACP bond after link up

Problem:
========
The OVS state machine that enables and disables bond slaves runs in
the OVS main thread. The OVS code that processes received LACP packets
runs in a different thread. Until now, when the latter processes a LACP
PDU that should enable a slave, the slave was only enabled when the
main thread was able to run the state machine. In some cases this led
to delays of up to 350ms when the main thread was busy or not scheduled,
which led to corresponding delays in which packets were dropped due to
the bond-admissibility check.

Fix:
====
When a LACP PDU is received, evaluate whether LACP slave can be enabled
(slave_may_enable()) and set LACP slave's may_enable from the datapath
thread itself. When may_enable = TRUE, it means L1 state is UP and
LACP-SYNC is done and it is waiting for the main thread to enable the
slave. Relax the check in bond_check_admissibility() to check for both
"enable" and "may_enable" of the LACP slave. This would avoid dropping
of packets until the main thread enables the slave from bundle_run().

Signed-off-by: Manohar Krishnappa Chidambaraswamy <manukc@gmail.com>
Co-authored-by: Manohar Krishnappa Chidambaraswamy <manukc@gmail.com>
Signed-off-by: Nitin Katiyar <nitin.katiyar@ericsson.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
lib/lacp.c
lib/lacp.h
ofproto/bond.c
ofproto/ofproto-dpif-xlate.c