[ovs-git] [ovn-org/ovn] 13e94f: northd: fix symmetric ECMP reply flows documentation

Vladislav Odintsov noreply at github.com
Mon Nov 22 21:32:45 UTC 2021


  Branch: refs/heads/main
  Home:   https://github.com/ovn-org/ovn
  Commit: 13e94f4c62e87a3c67966aabbe4860aaeeabbd3a
      https://github.com/ovn-org/ovn/commit/13e94f4c62e87a3c67966aabbe4860aaeeabbd3a
  Author: Vladislav Odintsov <odivlad at gmail.com>
  Date:   2021-11-22 (Mon, 22 Nov 2021)

  Changed paths:
    M northd/ovn-northd.8.xml

  Log Message:
  -----------
  northd: fix symmetric ECMP reply flows documentation

This patch fixes a flow priority which is added in IP Defrag table and
adds priority value for symmetric ECMP reply flow in IP Routing table.

Fixes: 384a7c6 (northd: Refactor Logical Flows for routers with DNAT/Load Balancers)
Signed-off-by: Vladislav Odintsov <odivlad at gmail.com>
Signed-off-by: Numan Siddique <numans at ovn.org>


  Commit: 9ce81519d3240dbf03ecf086a7ee92b695e9d0fb
      https://github.com/ovn-org/ovn/commit/9ce81519d3240dbf03ecf086a7ee92b695e9d0fb
  Author: Vladislav Odintsov <odivlad at gmail.com>
  Date:   2021-11-22 (Mon, 22 Nov 2021)

  Changed paths:
    M ic/ovn-ic.c
    M lib/ovn-util.h
    M ovn-ic-sb.ovsschema
    M ovn-ic-sb.xml
    M ovn-nb.xml
    M tests/ovn-ic.at

  Log Message:
  -----------
  ic: maintain route origin - connected/static

This patch adds ability to save route's origin while IC learning.
Directly connected routes are saved in IC SB DB with "connected"
origin column value.
Static routes have "static" value in origin column.

This logic would be used in next patch to compute priority
for lr_in_ip_routing stage lflows.

Signed-off-by: Vladislav Odintsov <odivlad at gmail.com>
Acked-by: Numan Siddique <numans at ovn.org>
Signed-off-by: Numan Siddique <numans at ovn.org>


  Commit: b0d9f4608e4b057f48bf0f49a56dab989beeca50
      https://github.com/ovn-org/ovn/commit/b0d9f4608e4b057f48bf0f49a56dab989beeca50
  Author: Vladislav Odintsov <odivlad at gmail.com>
  Date:   2021-11-22 (Mon, 22 Nov 2021)

  Changed paths:
    M northd/northd.c
    M northd/ovn-northd.8.xml
    M tests/ovn-northd.at

  Log Message:
  -----------
  northd: make connected routes have higher priority than static

With this patch routes to connected networks have higher
priority than static routes with same ip_prefix.

This brings commonly-used behaviour for routes lookup order:
1: longest prefix match
2: metric

The metric has next lookup order:
1: connected routes
2: static routes

Earlier static and connected routes with same ip_prefix had
the same priority, so it was impossible to predict which one
is used for routing decision.

Each route's prefix length has its own 'slot' in lflow prios.
Now prefix length space is calculated using next information:
to calculate route's priority prefixlen multiplied by 3
+ route origin offset (0 - source-based route; 1 - static route;
2 - directly-connected route2).

Also, enlarge prio for generic records in lr_in_ip_routing stage
by 10000.

Signed-off-by: Vladislav Odintsov <odivlad at gmail.com>
Signed-off-by: Numan Siddique <numans at ovn.org>


  Commit: 1655a6c146cab4518ed5086df6c6f5e46cc35a2d
      https://github.com/ovn-org/ovn/commit/1655a6c146cab4518ed5086df6c6f5e46cc35a2d
  Author: Vladislav Odintsov <odivlad at gmail.com>
  Date:   2021-11-22 (Mon, 22 Nov 2021)

  Changed paths:
    M lib/ovn-util.c
    M northd/northd.c
    M northd/ovn-northd.8.xml
    M ovn-nb.ovsschema
    M ovn-nb.xml
    M tests/ovn-ic.at
    M tests/ovn-nbctl.at
    M tests/ovn-northd.at
    M tests/ovn.at
    M utilities/ovn-nbctl.c

  Log Message:
  -----------
  northd, utils: support for RouteTables in LRs

This patch extends Logical Router's routing functionality.
Now user may create multiple routing tables within a Logical Router
and assign them to Logical Router Ports.

Traffic coming from Logical Router Port with assigned route_table
is checked against Logical_Router_Static_Routes with same route_table
field value and routes to connected networks. If no route_table option
is set to the LRP, routes' lookup is done agains routes with no
route_table field value ("", empty string) and against routes to
connected networks.

A new Logical Router ingress table #10 is added - IN_IP_ROUTING_PRE.
In this table packets which come from LRPs with configured
options:route_table field are checked against inport and in OVS
register 7 unique non-zero value identifying route table is written.
If no route_table is configured to LRP, 0 is written to register 7.

Then in 11th table IN_IP_ROUTING flows for routes which have non-empty
`route_table` field are prefixed in match portion with "reg7 == <id>"
where id is an uniqly-generated route_table id (if any) or zero if route
has empty route_table value.

Signed-off-by: Vladislav Odintsov <odivlad at gmail.com>
Acked-by: Numan Siddique <numans at ovn.org>
Signed-off-by: Numan Siddique <numans at ovn.org>


  Commit: cf444eddf61fe318bb7d0173af735c4f8c872284
      https://github.com/ovn-org/ovn/commit/cf444eddf61fe318bb7d0173af735c4f8c872284
  Author: Vladislav Odintsov <odivlad at gmail.com>
  Date:   2021-11-22 (Mon, 22 Nov 2021)

  Changed paths:
    M NEWS
    M ic/ovn-ic.c
    M ovn-ic-sb.ovsschema
    M ovn-ic-sb.xml
    M tests/ovn-ic.at

  Log Message:
  -----------
  ic: add support for routing tables in adv/learn routes

Previously support for multiple routing tables was added
to northd code.
This commit expands support for multiple routing tables
by adding support of advertising and learning routes with
their routing table information.

To utilize such feature, user must:
1. create Logical Router in each AZ;
2. create IC transit switch for each routing table, that
   he/she needs;
3. connect each TS with this LR;
4. assign routing table for TS's LRP
   (ovn-nbctl lrp-set-options <lrp> route_table=<>);
5. enable routes sync (turn on learning and advertising
   routes in NB_Global table);
6. create LRPs for subnets in LR, create static routes
   with supplying route_table parameter.

Note 1: routes for connected networks will be learned to
<main> routing table and if Logical Routers have more than
one Transit Switch, which interconnects them, connected
routes will be added via each transit switch port and
configured as ECMP routes.

Note 2: static routes within route tables will be advertised
and learned only if interconnecting transit switch's LRPs
have same value in options:route_table as NB:Logical_Router_Static_Route
or ICSB:Route route_table column value.

Signed-off-by: Vladislav Odintsov <odivlad at gmail.com>
Reviewed-by: Numan Siddique <numans at ovn.org>
Signed-off-by: Numan Siddique <numans at ovn.org>


  Commit: 68105f68c3f15fd1ae678f62b225730ba79a0745
      https://github.com/ovn-org/ovn/commit/68105f68c3f15fd1ae678f62b225730ba79a0745
  Author: Vladislav Odintsov <odivlad at gmail.com>
  Date:   2021-11-22 (Mon, 22 Nov 2021)

  Changed paths:
    M ic/ovn-ic.c
    M tests/ovn-ic.at
    M utilities/ovn-nbctl.c

  Log Message:
  -----------
  ic: don't learn routes which have local GW

In case we have ovn-ic-interconnected Logical_Routers
and install same ip_prefix route with GW in local AZ
in each LR in each AZ, this route would be learned in
other AZs and L3 loop is possible.
There could be next routes output:

[az1 ~]$ ovn-nbctl lr-route-list lr0
IPv4 Routes
Route Table global:
              128.0.0.0/1               169.254.1.1 dst-ip ecmp
              128.0.0.0/1             169.254.100.2 dst-ip (learned) ecmp

[az2 ~]$ ovn-nbctl lr-route-list lr0
IPv4 Routes
Route Table global:
              128.0.0.0/1               169.254.2.1 dst-ip ecmp
              128.0.0.0/1             169.254.100.1 dst-ip (learned) ecmp

So, there is a possible routing loop. Packets going
to 128.0.0.0/1 could go from AZ1 to AZ2 and on AZ2
they can be routed back.

This commit adds check for installed local (non-learned)
routes. If OVN IC route's ip_prefix, route_table are
the same with already installed non-learned NB route, such
route wouldn't be learned.

Signed-off-by: Vladislav Odintsov <odivlad at gmail.com>
Signed-off-by: Numan Siddique <numans at ovn.org>


Compare: https://github.com/ovn-org/ovn/compare/4deac4509abb...68105f68c3f1


More information about the git mailing list