Introduce infrastructure for plugging providers and add feature to ovn-controller to add and remove ports on the integration bridge as directed by CMS through Logical_Switch_Port options.
Traditionally it has been the CMSs responsibility to create Virtual Interfaces (VIFs) as part of instance (Container, Pod, Virtual Machine etc.) life cycle, and subsequently manage plug/unplug operations on the Open vSwitch integration bridge. With the advent of NICs connected to multiple distinct CPUs we can have a topology where the instance runs on one host and Open vSwitch and OVN runs on a different host, the smartnic control plane CPU. The host facing interfaces will be visible to Open vSwitch and OVN as representor ports. The actions necessary for plugging and unplugging the representor port in Open vSwitch running on the smartnic control plane CPU would be the same for every CMS. Hardware or platform specific details for initialization and lookup of representor ports is provided by an plugging provider hosted inside or outside the core OVN repository, and linked at OVN build time. RFC1 -> RFC2: - Introduce the plug-provider interface, remove hardware/platform dependent code. - Add ovsport module. - Integrate with binding module. - Split into multiple patches. RFC2 -> v1: - Extend build system, `--with-plug-provider`. - Check for required data in b_ctx_in and lbinding data structures. - Split consider_plug_lport into update and create processsing functions. - Consider unplug on release where relevant. - Add ovn-controller `--enable-dummy-plug` option for testing. - Consistent function naming and move ovsport module to controller/. - Rename plug-test.c -> plug-dummy.c. - Add functional- and unit- tests. v1 -> v2: - Move update to controller/binding.h from patch 6 -> patch 5. - Fix lint problems reported by 0-day Robot. v2 -> v3: - Fix build system extension for plug provider. - Implement DDlog version of northd change. - Rebase on tip. Previous discussion: - RFC1: https://patchwork.ozlabs.org/project/ovn/patch/20210509140305.1910796-1-frode.nord...@canonical.com/ - RFC2: https://patchwork.ozlabs.org/project/ovn/cover/20210805145013.3033919-1-frode.nord...@gmail.com/ Frode Nordahl (7): ovn-sb: Add plugged_by column to Port_Binding. northd-ddlog: Handle Port_Binding:plugged_by. controller: Move OVS port functions to new module. patch: Consume ovsport functions. lib: Add infrastructure for plugging providers. ovn-controller: Prepare plugging infrastructure. binding: Consider plugging of ports on CMS request. acinclude.m4 | 34 ++++ configure.ac | 1 + controller/automake.mk | 4 +- controller/binding.c | 269 +++++++++++++++++++++++++++- controller/binding.h | 1 + controller/ovn-controller.c | 25 +++ controller/ovsport.c | 256 +++++++++++++++++++++++++++ controller/ovsport.h | 60 +++++++ controller/patch.c | 39 +--- lib/automake.mk | 12 +- lib/plug-dummy.c | 144 +++++++++++++++ lib/plug-dummy.h | 33 ++++ lib/plug-provider.h | 109 ++++++++++++ lib/plug.c | 342 ++++++++++++++++++++++++++++++++++++ lib/plug.h | 101 +++++++++++ lib/test-plug.c | 80 +++++++++ northd/ovn-northd.c | 31 ++++ northd/ovn_northd.dl | 68 ++++++- ovn-nb.xml | 38 ++++ ovn-sb.ovsschema | 10 +- ovn-sb.xml | 15 ++ tests/automake.mk | 4 +- tests/ovn-controller.at | 31 ++++ tests/ovn-macros.at | 2 +- tests/ovn-northd.at | 47 +++++ tests/ovn-plug.at | 8 + 26 files changed, 1711 insertions(+), 53 deletions(-) create mode 100644 controller/ovsport.c create mode 100644 controller/ovsport.h create mode 100644 lib/plug-dummy.c create mode 100644 lib/plug-dummy.h create mode 100644 lib/plug-provider.h create mode 100644 lib/plug.c create mode 100644 lib/plug.h create mode 100644 lib/test-plug.c create mode 100644 tests/ovn-plug.at -- 2.32.0 _______________________________________________ dev mailing list d...@openvswitch.org https://mail.openvswitch.org/mailman/listinfo/ovs-dev