[ovs-git] [openvswitch/ovs] a8448c: lacp: Avoid packet drop on LACP bond after link up

Ben Pfaff noreply at github.com
Mon Jun 10 16:12:19 UTC 2019


  Branch: refs/heads/master
  Home:   https://github.com/openvswitch/ovs
  Commit: a8448cb170e3bbe0ca73c7c72aead11b4ec77e29
      https://github.com/openvswitch/ovs/commit/a8448cb170e3bbe0ca73c7c72aead11b4ec77e29
  Author: Nitin Katiyar <nitin.katiyar at ericsson.com>
  Date:   2019-06-10 (Mon, 10 Jun 2019)

  Changed paths:
    M lib/lacp.c
    M lib/lacp.h
    M ofproto/bond.c
    M ofproto/ofproto-dpif-xlate.c

  Log Message:
  -----------
  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 at gmail.com>
Co-authored-by: Manohar Krishnappa Chidambaraswamy <manukc at gmail.com>
Signed-off-by: Nitin Katiyar <nitin.katiyar at ericsson.com>
Signed-off-by: Ben Pfaff <blp at ovn.org>


  Commit: b3e8cd6b36a2db4f47223bc5dea580a1f5b4ebff
      https://github.com/openvswitch/ovs/commit/b3e8cd6b36a2db4f47223bc5dea580a1f5b4ebff
  Author: Nitin Katiyar <nitin.katiyar at ericsson.com>
  Date:   2019-06-10 (Mon, 10 Jun 2019)

  Changed paths:
    M lib/lacp.c
    M lib/lacp.h
    M ofproto/ofproto-dpif.c

  Log Message:
  -----------
  lacp: Don't send or receive PDUs when carrier state of slave is down

Fortville NICs (or their drivers) can get into an inconsistent state,
in which the NIC can actually transmit and receive packets even
though they report "PHY down". In such a state, OVS can exchange and
process LACP messages and enable a LACP slave. However, further packet
exchange over the slave fails because OVS sees that the PHY is down.

This commit fixes the problem by making OVS ignore received LACP PDUs
and suppress transmitting LACP PDUs when carrier is down. In addition,
when a LACP PDU is received with carrier down, this commit triggers
rechecking the carrier status (by incrementing the connectivity sequence
number) to ensure that it is updated as quickly as possible.

Signed-off-by: Manohar Krishnappa Chidambaraswamy <manukc at gmail.com>
Co-authored-by: Manohar Krishnappa Chidambaraswamy <manukc at gmail.com>
Signed-off-by: Nitin Katiyar <nitin.katiyar at ericsson.com>
Signed-off-by: Ben Pfaff <blp at ovn.org>


Compare: https://github.com/openvswitch/ovs/compare/c94e2d64f05e...b3e8cd6b36a2


More information about the git mailing list