diff options
author | Nitin Katiyar <nitin.katiyar@ericsson.com> | 2019-06-09 14:17:45 +0000 |
---|---|---|
committer | Ben Pfaff <blp@ovn.org> | 2019-06-10 09:12:02 -0700 |
commit | a8448cb170e3bbe0ca73c7c72aead11b4ec77e29 (patch) | |
tree | 4ff49dfe89adb3231a981a1bd631fffc1ab07a0c /lib/lacp.h | |
parent | c94e2d64f05e81b21aa1e027d5c00db8bf2dd91d (diff) | |
download | openvswitch-a8448cb170e3bbe0ca73c7c72aead11b4ec77e29.tar.gz |
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>
Diffstat (limited to 'lib/lacp.h')
-rw-r--r-- | lib/lacp.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/lacp.h b/lib/lacp.h index f35cff56a..0dfaef05c 100644 --- a/lib/lacp.h +++ b/lib/lacp.h @@ -46,7 +46,7 @@ struct lacp *lacp_ref(const struct lacp *); void lacp_configure(struct lacp *, const struct lacp_settings *); bool lacp_is_active(const struct lacp *); -void lacp_process_packet(struct lacp *, const void *slave, +bool lacp_process_packet(struct lacp *, const void *slave, const struct dp_packet *packet); enum lacp_status lacp_status(const struct lacp *); |