@@ -397,6 +397,10 @@ output;
<h2>Logical Router Datapaths</h2>
+ <p>
+ This is only enabled logical router.
+ </p>
+
I suggest this alternative wording:
"Logical router datapaths will only exist for <ref table="Logical_Router"
db="OVN_Northbound"/> rows in the <ref db="OVN_Northbound"/> database that
do not have <ref column="enabled" table="Logical_Router"
db="OVN_Northbound"/> set to <code>false</code>."
<h3>Ingress Table 0: L2 Admission Control</h3>
<p>
@@ -1312,6 +1312,12 @@ lport_is_up(const struct nbrec_logical_port *lport)
}
static bool
+lrouter_is_enabled(const struct nbrec_logical_router *lrouter)
+{
+ return !lrouter->enabled || *lrouter->enabled;
+}
+
+static bool
has_stateful_acl(struct ovn_datapath *od)
{
for (size_t i = 0; i < od->nbs->n_acls; i++) {
@@ -1793,6 +1799,10 @@ build_lrouter_flows(struct hmap *datapaths, struct
hmap *ports,
continue;
}
+ if (!lrouter_is_enabled(od->nbr)) {
+ continue;
+ }
+
This patch has to check this in several places. I think it could be
simplified to only check it in one place.
ovn-northd only iterates the Logical_Router table in OVN_Northbound in a
single place. Could you just ignore the Logical_Router row in that one
place instead?
diff --git a/ovn/ovn-nb.ovsschema b/ovn/ovn-nb.ovsschema
@@ -1,7 +1,7 @@
{
"name": "OVN_Northbound",
"version": "2.0.2",
- "cksum": "4289495412 4436",
+ "cksum": "1227843805 4513",
"tables": {
"Logical_Switch": {
"columns": {