[ovs-dev] [PATCH v4 ovn 0/5] introduce BFD support in ovn-controller

Numan Siddique numans at ovn.org
Mon Dec 21 10:26:48 UTC 2020


On Sat, Dec 19, 2020 at 3:29 PM Lorenzo Bianconi
<lorenzo.bianconi at redhat.com> wrote:
>
> Introduce BFD protocol in ovn-controller according to RFC5880 [0]
> We added BFD implementation in ovn since layered protocols usually request to
> enable it on ovn entities (e.g. logical router ports) while ovs implementation
> relies on physical entities (e.g. ovs interfaces).
> Moreover we would establish a BFD session between a given ovn-port and
> multiple peers (1:n relation). A typical use-case is reported in [1].
> In the current implementation Asynchronous mode is fully supported, while Demand
> mode is supported only on rx side.
>
> [0] - https://tools.ietf.org/html/rfc5880
> [1] - https://bugzilla.redhat.com/show_bug.cgi?id=1847570
>

Hi Lorenzo,

Thanks for v4.

I quickly tried out few things. And see the following issues.

1. I created a BFD entry like last time and I didn't associate the BFD
to any router policies.
    I was expecting that ovn-controller will not send any BFD packets
if the status is 'admin_down'.
   I am not sure if you understood what I meant in my previous
discussion. I think ovn-controller should
   not even consider running BFD if the status is admin_down. When a
BFD row is associated to a logical
   router static route, ovn-northd can clear the admin_down status and
the ovn-controller can then run the
   BFD protocol.

2. When I ran the command, ovn-nbctl set bfd . min_rx=5000, OVN SB is
not synced with the updated min_rx/min_tx.
    I would suggest enhancing the test case in ovn-northd.at to cover
all such cases.

3. I deleted the BFD row in NB DB  and I still see that ovn-controller
is running the BFD protocol. If I re create the BFD with
   the same configuration, I notice that ovn-controller is sending
double the packets. May be ovn-controller doesn't clear
   the bfd_monitor_map properly.

4. If I stop bfdd-beacon, then  the state goes down as expected. But
when I restart bfdd-beacon again,
   then the state of the bfd never goes up.

5. If I unassociate the BFD from the logical router static route, then
the state of the BFD is still up.
    (ovn-nbctl clear logical_router_static_router <uuid> bfd)

Can you please make sure that all these scenarios are covered in the
test cases ?

Maybe system-ovn.at can capture the packets on the 'server' namespace
(where bfdd-becon is run)

I would suggest to cover the below test cases
  - When the BFD is admin_down, make sure that no BFD packets are
received by the server namespace.
  - When the NB DB BFD is deleted, make sure that no BFD packets are
received by the server namespace.
  - Disassociate the BFD from logical router static route and make
sure that the ovn-controller no longer runs
    BFD and the status is set to admin_down.
  - ovn-northd.at test case is enhanced to create multiple NB DB BFD
rows and make sure that they are
    synced properly in SB DB. And any updates to min_rx/min_tx  etc
are also synced properly.


Thanks
Numan


> Changes since v3:
> - fix 100% cpu utilization if min_tx/min_rx are 0
> - improve unit tests
> - move system tests in patch 5
> - set admin_down as default state if no static route is associated to
>   the BFD session
> - fix possible memory leak in bfd_monitor_destroy()
>
> Changes since v2:
> - introduce weak reference in Logical_Router_Static_Route table to
>   the related BFD table
> - remove idl_index for BFD table and perform lookup using local map
> - remove unnecessary filed in bfd_entry struct
> - add external_ids column in BFD nb/sb table
> - make status info not mandatory configuring BFD table in nb db
>
> Changes since v1:
> - rebase ontop of ovn master
> - rename handle_bfd_msg action in handle_bfd_msg()
> - add ovn-northd unit-tests
> - improve commit logs
> - remove global BFD control check
> - introduce BFD support for ovn static routes
>
> Lorenzo Bianconi (5):
>   controller: introduce BFD tx path in ovn-controller
>   action: introduce handle_bfd_msg() action
>   controller: bfd: introduce BFD state machine
>   bfp: support demand mode on rx side
>   ovn: integrate bfd for static routes
>
>  NEWS                        |   3 +
>  controller/ovn-controller.c |   1 +
>  controller/pinctrl.c        | 606 +++++++++++++++++++++++++++++++++++-
>  controller/pinctrl.h        |   2 +
>  include/ovn/actions.h       |   7 +
>  lib/actions.c               |  27 ++
>  lib/ovn-l7.h                |  19 ++
>  northd/ovn-northd.8.xml     |  21 ++
>  northd/ovn-northd.c         | 219 ++++++++++++-
>  ovn-nb.ovsschema            |  28 +-
>  ovn-nb.xml                  |  73 +++++
>  ovn-sb.ovsschema            |  27 +-
>  ovn-sb.xml                  |  78 +++++
>  tests/atlocal.in            |   3 +
>  tests/ovn-nbctl.at          |   8 +-
>  tests/ovn-northd.at         |  21 ++
>  tests/ovn.at                |   4 +
>  tests/system-ovn.at         | 104 +++++++
>  utilities/ovn-trace.c       |   2 +
>  19 files changed, 1241 insertions(+), 12 deletions(-)
>
> --
> 2.29.2
>
> _______________________________________________
> dev mailing list
> dev at openvswitch.org
> https://mail.openvswitch.org/mailman/listinfo/ovs-dev
>


More information about the dev mailing list