[ovs-dev] [PATCH ovn v2 3/4] ovn-northd: Fix logical router pipeline table IDs in documentation.

Han Zhou hzhou at ovn.org
Mon Jan 20 22:56:24 UTC 2020


The table IDs in comments and man page are out of date.
They were not updated after adding new tables to the pipeline.
This patch fixes comments by using macros, and it also updates the
table IDs in the man page.

Signed-off-by: Han Zhou <hzhou at ovn.org>
---
 northd/ovn-northd.8.xml |  4 ++--
 northd/ovn-northd.c     | 26 +++++++++++++-------------
 2 files changed, 15 insertions(+), 15 deletions(-)

diff --git a/northd/ovn-northd.8.xml b/northd/ovn-northd.8.xml
index 4b227ca..b0ee73e 100644
--- a/northd/ovn-northd.8.xml
+++ b/northd/ovn-northd.8.xml
@@ -1907,7 +1907,7 @@ icmp6 {
       and tracking before sending it to the next table.
     </p>
 
-    <h3>Ingress Table 3: UNSNAT</h3>
+    <h3>Ingress Table 5: UNSNAT</h3>
 
     <p>
       This is for already established connections' reverse traffic.
@@ -1916,7 +1916,7 @@ icmp6 {
       unSNATted here.
     </p>
 
-    <p>Ingress Table 3: UNSNAT on Gateway Routers</p>
+    <p>Ingress Table 5: UNSNAT on Gateway Routers</p>
 
     <ul>
       <li>
diff --git a/northd/ovn-northd.c b/northd/ovn-northd.c
index 4ac9668..a967f35 100644
--- a/northd/ovn-northd.c
+++ b/northd/ovn-northd.c
@@ -8646,8 +8646,8 @@ build_lrouter_flows(struct hmap *datapaths, struct hmap *ports,
         sset_destroy(&all_ips);
     }
 
-    /* Logical router ingress table 5 and 6: IPv6 Router Adv (RA) options and
-     * response. */
+    /* Logical router ingress table ND_RA_OPTIONS & ND_RA_RESPONSE: IPv6 Router
+     * Adv (RA) options and response. */
     HMAP_FOR_EACH (op, key_node, ports) {
         if (!op->nbrp || op->nbrp->peer || !op->peer) {
             continue;
@@ -8733,8 +8733,8 @@ build_lrouter_flows(struct hmap *datapaths, struct hmap *ports,
         }
     }
 
-    /* Logical router ingress table 5, 6: RS responder, by default goto next.
-     * (priority 0)*/
+    /* Logical router ingress table ND_RA_OPTIONS & ND_RA_RESPONSE: RS
+     * responder, by default goto next. (priority 0)*/
     HMAP_FOR_EACH (od, key_node, datapaths) {
         if (!od->nbr) {
             continue;
@@ -8744,7 +8744,7 @@ build_lrouter_flows(struct hmap *datapaths, struct hmap *ports,
         ovn_lflow_add(lflows, od, S_ROUTER_IN_ND_RA_RESPONSE, 0, "1", "next;");
     }
 
-    /* Logical router ingress table 7: IP Routing.
+    /* Logical router ingress table IP_ROUTING: IP Routing.
      *
      * A packet that arrives at this table is an IP packet that should be
      * routed to the address in 'ip[46].dst'. This table sets outport to
@@ -8833,7 +8833,7 @@ build_lrouter_flows(struct hmap *datapaths, struct hmap *ports,
         }
     }
 
-    /* Logical router ingress table 8: Policy.
+    /* Logical router ingress table POLICY: Policy.
      *
      * A packet that arrives at this table is an IP packet that should be
      * permitted/denied/rerouted to the address in the rule's nexthop.
@@ -8861,7 +8861,7 @@ build_lrouter_flows(struct hmap *datapaths, struct hmap *ports,
 
     /* XXX destination unreachable */
 
-    /* Local router ingress table 9: ARP Resolution.
+    /* Local router ingress table ARP_RESOLVE: ARP Resolution.
      *
      * Multicast packets already have the outport set so just advance to next
      * table (priority 500). */
@@ -8874,7 +8874,7 @@ build_lrouter_flows(struct hmap *datapaths, struct hmap *ports,
                       "ip4.mcast", "next;");
     }
 
-    /* Local router ingress table 9: ARP Resolution.
+    /* Local router ingress table ARP_RESOLVE: ARP Resolution.
      *
      * Any unicast packet that reaches this table is an IP packet whose
      * next-hop IP address is in reg0. (ip4.dst is the final destination.)
@@ -9196,13 +9196,13 @@ build_lrouter_flows(struct hmap *datapaths, struct hmap *ports,
                       "get_nd(outport, xxreg0); next;");
     }
 
-    /* Local router ingress table 10: Check packet length.
+    /* Local router ingress table CHK_PKT_LEN: Check packet length.
      *
      * Any IPv4 packet with outport set to the distributed gateway
      * router port, check the packet length and store the result in the
      * 'REGBIT_PKT_LARGER' register bit.
      *
-     * Local router ingress table 11: Handle larger packets.
+     * Local router ingress table LARGER_PKTS: Handle larger packets.
      *
      * Any IPv4 packet with outport set to the distributed gateway
      * router port and the 'REGBIT_PKT_LARGER' register bit is set,
@@ -9277,7 +9277,7 @@ build_lrouter_flows(struct hmap *datapaths, struct hmap *ports,
         }
     }
 
-    /* Logical router ingress table 12: Gateway redirect.
+    /* Logical router ingress table GW_REDIRECT: Gateway redirect.
      *
      * For traffic with outport equal to the l3dgw_port
      * on a distributed router, this table redirects a subset
@@ -9320,7 +9320,7 @@ build_lrouter_flows(struct hmap *datapaths, struct hmap *ports,
         ovn_lflow_add(lflows, od, S_ROUTER_IN_GW_REDIRECT, 0, "1", "next;");
     }
 
-    /* Local router ingress table 13: ARP request.
+    /* Local router ingress table ARP_REQUEST: ARP request.
      *
      * In the common case where the Ethernet destination has been resolved,
      * this table outputs the packet (priority 0).  Otherwise, it composes
@@ -9384,7 +9384,7 @@ build_lrouter_flows(struct hmap *datapaths, struct hmap *ports,
         ovn_lflow_add(lflows, od, S_ROUTER_IN_ARP_REQUEST, 0, "1", "output;");
     }
 
-    /* Logical router egress table 1: Delivery (priority 100-110).
+    /* Logical router egress table DELIVERY: Delivery (priority 100-110).
      *
      * Priority 100 rules deliver packets to enabled logical ports.
      * Priority 110 rules match multicast packets and update the source
-- 
2.1.0



More information about the dev mailing list