mbox series

[ovs-dev,v2,0/7] Optimize load balancer hairpin logical flows.

Message ID 20201027171531.1178296-1-numans@ovn.org
Headers show
Series Optimize load balancer hairpin logical flows. | expand

Message

Numan Siddique Oct. 27, 2020, 5:15 p.m. UTC
From: Numan Siddique <numans@ovn.org>

This patch series optimizes the load balancer hairpin logical flows.
Presently, ovn-northd generates a lot of these logical flows.

Suppose there are 'm' load balancers associated to a logical switch and each load balancer
has 'n' VIPs and each VIP has 'p' backends then ovn-northd adds (m * ((n * p) + n))
hairpin logical flows.

With this patch series, ovn-northd adds just 5 hairpin logical flows.

To reduce the number of lflows, load balancer information is now pushed
to the Southbound database using a new 'Load_Balancer' table.
ovn-controller programs the OF flows required for handling the load
balancer hairpin traffic directly and new OVN actions are added to
abstract the hairpining from ovn-northd.

v1 -> v2
-----
  * Addressed the review comments from Mark Michelson.
  * Added 2 more patches to the series to have SB Load balancer support
    ovn-detrace and 'ovn-sbctl --vflows' as pointed by Dumitru Ceara.

Numan Siddique (7):
  Add new table Load_Balancer in Southbound database.
  northd: Refactor load balancer vip parsing.
  controller:  Add load balancer hairpin OF flows.
  actions: Add new actions chk_lb_hairpin, chk_lb_hairpin_reply and
    ct_snat_to_vip.
  northd: Make use of new hairpin actions.
  ovn-detrace: Add SB Load Balancer cookier handler.
  sbctl: Add Load Balancer support for vflows option.

 controller/lflow.c           | 256 +++++++++++++++
 controller/lflow.h           |   6 +-
 controller/ovn-controller.c  |  27 +-
 include/ovn/actions.h        |  15 +-
 include/ovn/logical-fields.h |   3 +
 lib/actions.c                | 116 ++++++-
 lib/automake.mk              |   4 +-
 lib/lb.c                     | 236 ++++++++++++++
 lib/lb.h                     |  77 +++++
 lib/ovn-util.c               |  28 ++
 lib/ovn-util.h               |   2 +
 northd/ovn-northd.8.xml      |  65 +++-
 northd/ovn-northd.c          | 586 ++++++++++++++---------------------
 ovn-sb.ovsschema             |  27 +-
 ovn-sb.xml                   |  82 +++++
 tests/ovn-northd.at          | 109 ++++++-
 tests/ovn.at                 | 544 ++++++++++++++++++++++++++++++--
 tests/test-ovn.c             |   3 +
 utilities/ovn-detrace.in     |  11 +-
 utilities/ovn-sbctl.c        |  58 ++++
 utilities/ovn-trace.c        |  65 +++-
 21 files changed, 1892 insertions(+), 428 deletions(-)
 create mode 100644 lib/lb.c
 create mode 100644 lib/lb.h