[ovs-dev] [PATCH ovn v4 1/2] northd: Optimize ct nat for load balancer traffic.

Han Zhou hzhou at ovn.org
Thu May 6 06:15:51 UTC 2021


On Thu, Apr 22, 2021 at 6:25 AM <numans at ovn.org> wrote:
>
> From: Numan Siddique <numans at ovn.org>
>
> For a load balancer traffic destined to VIP, we do the below actions
> related to conntrack in the ingress logical switch pipeline.
>   1.  Send the packet to conntrack - ct()
>   2a. if ct.new then ct_lb(backends)
>   2b. if ct.est then ct(nat)
>
> The step 2b is unnecessary and can be removed to avoid another
> recirculation.
>
> This patch improves this by doing the below.
>
> For a load balancer traffic destined to VIP, we will now do
>   1.   ct(nat)
>   2a.  if ct.new - ct_lb(backends)
>   2b.  if ct.est, no further action related to conntrack.
>
> For non load balancer connection traffic, we will now do
>   1.  ct(nat)
>   2a. if ct.new then ct(commit)
>   2b  if ct.est, no further action related to conntrack.
>
> The same improvement is done for the egress logical switch
> pipeline.  The stages - ls_in_lb and ls_out_lb are removed
> since these stages are no longer needed.
>
> Signed-off-by: Numan Siddique <numans at ovn.org>
> ---
> v3 -> v4
> ----
>   * Fixed the failing test case.
>
> v2 -> v3
> ----
>   * Addressed review comments from Mark G.
>
> v1 -> v2
> ----
>   * No changes.
>
>  northd/ovn-northd.8.xml | 152 ++++++++++++-----------
>  northd/ovn-northd.c     | 160 +++++++++---------------
>  northd/ovn_northd.dl    | 186 +++++++++++-----------------
>  tests/ovn-northd.at     | 261 ++++++++++++++++++++++++++++++----------
>  tests/ovn.at            | 183 ++++++++++++++--------------
>  tests/system-ovn.at     |   2 +-
>  6 files changed, 501 insertions(+), 443 deletions(-)
>
...

> diff --git a/northd/ovn_northd.dl b/northd/ovn_northd.dl
> index 4558dbdb59..2f5d36c599 100644
> --- a/northd/ovn_northd.dl
> +++ b/northd/ovn_northd.dl
...
>
> -/* 'REGBIT_CONNTRACK_DEFRAG' is set to let the pre-stateful table send
> +/* 'rEGBIT_CONNTRACK_NAT' is set to let the pre-stateful table send

nit: although rEGBIT_xxx is the real variable name, it would be better to
follow the pattern that in comments it is always upper case, i.e.
REGBIT_xxx.

Acked-by: Han Zhou <hzhou at ovn.org>


More information about the dev mailing list