From patchwork Fri Dec 11 14:26:46 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Numan Siddique X-Patchwork-Id: 1414918 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org (client-ip=140.211.166.136; helo=silver.osuosl.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=ovn.org Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4CstQg3wH4z9sR4 for ; Sat, 12 Dec 2020 01:27:07 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 93BDE2E0ED; Fri, 11 Dec 2020 14:27:03 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id mD8PiAKSTnM6; Fri, 11 Dec 2020 14:27:01 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by silver.osuosl.org (Postfix) with ESMTP id 19D4F2E0DE; Fri, 11 Dec 2020 14:27:01 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 065F4C0FA7; Fri, 11 Dec 2020 14:27:01 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@lists.linuxfoundation.org Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by lists.linuxfoundation.org (Postfix) with ESMTP id E80EDC013B for ; Fri, 11 Dec 2020 14:26:59 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id BC8C92E0E4 for ; Fri, 11 Dec 2020 14:26:59 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id rzwgh0bAjnlH for ; Fri, 11 Dec 2020 14:26:57 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from relay8-d.mail.gandi.net (relay8-d.mail.gandi.net [217.70.183.201]) by silver.osuosl.org (Postfix) with ESMTPS id E4E172E0DE for ; Fri, 11 Dec 2020 14:26:56 +0000 (UTC) X-Originating-IP: 116.75.127.92 Received: from nusiddiq.home.org.com (unknown [116.75.127.92]) (Authenticated sender: numans@ovn.org) by relay8-d.mail.gandi.net (Postfix) with ESMTPSA id 78A391BF206; Fri, 11 Dec 2020 14:26:54 +0000 (UTC) From: numans@ovn.org To: dev@openvswitch.org Date: Fri, 11 Dec 2020 19:56:46 +0530 Message-Id: <20201211142646.1462213-1-numans@ovn.org> X-Mailer: git-send-email 2.28.0 MIME-Version: 1.0 Subject: [ovs-dev] [PATCH ovn 1/2] Add missing documentation for router policy and ecmp sym reply stage. X-BeenThere: ovs-dev@openvswitch.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ovs-dev-bounces@openvswitch.org Sender: "dev" From: Numan Siddique Fixes: df4f37ea7f82("Policy-based routing (PBR) in OVN.) Fixes: a123ef0fb8fd("Support packet metadata marking for logical router policies.") Fixes: 4fdca656857d("Add ECMP symmetric replies.") Signed-off-by: Numan Siddique --- northd/ovn-northd.8.xml | 86 ++++++++++++++++++++++++++++++++++++----- 1 file changed, 77 insertions(+), 9 deletions(-) diff --git a/northd/ovn-northd.8.xml b/northd/ovn-northd.8.xml index 8bbe577b69..d86f36ea63 100644 --- a/northd/ovn-northd.8.xml +++ b/northd/ovn-northd.8.xml @@ -2714,7 +2714,25 @@ icmp6 { -

Ingress Table 7: IPv6 ND RA option processing

+

Ingress Table 7: ECMP symmetric reply processing

+
    +
  • + If ECMP routes with symmetric reply are configured in the + OVN_Northbound database for a gateway router, a + priority-100 flow is added for each router port on which symmetric + replies are configured. The matching logic for these ports essentially + reverses the configured logic of the ECMP route. So for instance, a + route with a destination routing policy will instead match if the + source IP address matches the static route's prefix. The flow uses + the action ct_commit { ct_label.ecmp_reply_eth = eth.src;" + " ct_label.ecmp_reply_port = K;}; next; to commit + the connection and storing eth.src and the ECMP + reply port binding tunnel key K in the + ct_label. +
  • +
+ +

Ingress Table 8: IPv6 ND RA option processing

  • @@ -2744,7 +2762,7 @@ reg0[5] = put_nd_ra_opts(options);next;
-

Ingress Table 8: IPv6 ND RA responder

+

Ingress Table 9: IPv6 ND RA responder

This table implements IPv6 ND RA responder for the IPv6 ND RA replies @@ -2789,7 +2807,7 @@ output; -

Ingress Table 9: IP Routing

+

Ingress Table 10: IP Routing

A packet that arrives at this table is an IP packet that should be @@ -2952,7 +2970,7 @@ select(reg8[16..31], MID1, MID2, ...); -

Ingress Table 10: IP_ROUTING_ECMP

+

Ingress Table 11: IP_ROUTING_ECMP

This table implements the second part of IP routing for ECMP routes @@ -3004,7 +3022,57 @@ outport = P; -

Ingress Table 12: ARP/ND Resolution

+

Ingress Table 12: Router policies

+

+ This table adds flows for the logical router policies configured + on the logical router. Please see the + OVN_Northbound database Logical_Router_Policy + table documentation in ovn-nb for supported actions. +

+ +
    +
  • +

    + For each router policy configured on the logical router, a + logical flow is added with specified priority, match and + actions. +

    +
  • + +
  • +

    + If the policy action is reroute, then the logical + flow is added with the following actions: +

    + +
    +[xx]reg0 = H;
    +eth.src = E;
    +outport = P;
    +flags.loopback = 1;
    +next;
    +        
    + +

    + where H is the nexthop defined in the + router policy, E is the ethernet address of the + logical router port from which the nexthop is + reachable and P is the logical router port from + which the nexthop is reachable. +

    +
  • + +
  • +

    + If a router policy has the option pkt_mark=m + set and if the action is not drop, then the action also + includes pkt.mark = m to mark the packet + with the marker m. +

    +
  • +
+ +

Ingress Table 13: ARP/ND Resolution

Any packet that reaches this table is an IP packet whose next-hop @@ -3190,7 +3258,7 @@ outport = P; -

Ingress Table 13: Check packet length

+

Ingress Table 14: Check packet length

For distributed logical routers with distributed gateway port configured @@ -3220,7 +3288,7 @@ REGBIT_PKT_LARGER = check_pkt_larger(L); next; and advances to the next table.

-

Ingress Table 14: Handle larger packets

+

Ingress Table 15: Handle larger packets

For distributed logical routers with distributed gateway port configured @@ -3281,7 +3349,7 @@ icmp6 { and advances to the next table.

-

Ingress Table 15: Gateway Redirect

+

Ingress Table 16: Gateway Redirect

For distributed logical routers where one of the logical router @@ -3321,7 +3389,7 @@ icmp6 { -

Ingress Table 16: ARP Request

+

Ingress Table 17: ARP Request

In the common case where the Ethernet destination has been resolved, this