summaryrefslogtreecommitdiff
path: root/ovn
diff options
context:
space:
mode:
authorJustin Pettit <jpettit@ovn.org>2016-05-17 06:02:53 -0700
committerJustin Pettit <jpettit@ovn.org>2016-07-12 21:14:03 -0700
commit6d9ecfa9f5d07876de41e6b1c6522a0d951ccdd3 (patch)
tree9e9f99db284cfe3178fffb69dedc77df14daff2c /ovn
parent394e883dfac2a2e7c232345ffcd1ad5de4a0686a (diff)
downloadopenvswitch-6d9ecfa9f5d07876de41e6b1c6522a0d951ccdd3.tar.gz
ovn: Remove 'default_gw' from logical router table.
With static routes, it's not necessary to have a separate default gateway parameter. This also makes configuring router ports clearer when IPv6 and IPv4 addresses may be assigned to the same port. Signed-off-by: Justin Pettit <jpettit@ovn.org> Acked-by: Ben Pfaff <blp@ovn.org>
Diffstat (limited to 'ovn')
-rw-r--r--ovn/northd/ovn-northd.c35
-rw-r--r--ovn/ovn-nb.ovsschema5
-rw-r--r--ovn/ovn-nb.xml4
3 files changed, 2 insertions, 42 deletions
diff --git a/ovn/northd/ovn-northd.c b/ovn/northd/ovn-northd.c
index d0491ea73..ed67dc5f7 100644
--- a/ovn/northd/ovn-northd.c
+++ b/ovn/northd/ovn-northd.c
@@ -262,10 +262,6 @@ struct ovn_datapath {
struct ovs_list list; /* In list of similar records. */
- /* Logical router data (digested from nbr). */
- const struct ovn_port *gateway_port;
- ovs_be32 gateway;
-
/* Logical switch data. */
struct ovn_port **router_ports;
size_t n_router_ports;
@@ -420,21 +416,6 @@ join_datapaths(struct northd_context *ctx, struct hmap *datapaths,
NULL, nbr, NULL);
ovs_list_push_back(nb_only, &od->list);
}
-
- od->gateway = 0;
- if (nbr->default_gw) {
- ovs_be32 ip;
- if (!ip_parse(nbr->default_gw, &ip) || !ip) {
- static struct vlog_rate_limit rl = VLOG_RATE_LIMIT_INIT(5, 1);
- VLOG_WARN_RL(&rl, "bad 'gateway' %s", nbr->default_gw);
- } else {
- od->gateway = ip;
- }
- }
-
- /* Set the gateway port to NULL. If there is a gateway, it will get
- * filled in as we go through the ports later. */
- od->gateway_port = NULL;
}
}
@@ -658,18 +639,6 @@ join_logical_ports(struct northd_context *ctx,
op->mac = mac;
op->od = od;
-
- /* If 'od' has a gateway and 'op' routes to it... */
- if (od->gateway && !((op->network ^ od->gateway) & op->mask)) {
- /* ...and if 'op' is a longer match than the current
- * choice... */
- const struct ovn_port *gw = od->gateway_port;
- int len = gw ? ip_count_cidr_bits(gw->mask) : 0;
- if (ip_count_cidr_bits(op->mask) > len) {
- /* ...then it's the default gateway port. */
- od->gateway_port = op;
- }
- }
}
}
}
@@ -2524,10 +2493,6 @@ build_lrouter_flows(struct hmap *datapaths, struct hmap *ports,
route = od->nbr->static_routes[i];
build_static_route_flow(lflows, od, ports, route);
}
-
- if (od->gateway && od->gateway_port) {
- add_route(lflows, od->gateway_port, 0, 0, od->gateway);
- }
}
/* XXX destination unreachable */
diff --git a/ovn/ovn-nb.ovsschema b/ovn/ovn-nb.ovsschema
index ee7c2c6eb..5102948b7 100644
--- a/ovn/ovn-nb.ovsschema
+++ b/ovn/ovn-nb.ovsschema
@@ -1,7 +1,7 @@
{
"name": "OVN_Northbound",
- "version": "3.2.0",
- "cksum": "1784604034 7539",
+ "version": "4.0.0",
+ "cksum": "2156178478 7460",
"tables": {
"Logical_Switch": {
"columns": {
@@ -105,7 +105,6 @@
"refType": "strong"},
"min": 0,
"max": "unlimited"}},
- "default_gw": {"type": {"key": "string", "min": 0, "max": 1}},
"enabled": {"type": {"key": "boolean", "min": 0, "max": 1}},
"nat": {"type": {"key": {"type": "uuid",
"refTable": "NAT",
diff --git a/ovn/ovn-nb.xml b/ovn/ovn-nb.xml
index 5542ea4a8..1eeec22a9 100644
--- a/ovn/ovn-nb.xml
+++ b/ovn/ovn-nb.xml
@@ -729,10 +729,6 @@
One or more static routes for the router.
</column>
- <column name="default_gw">
- IP address to use as default gateway, if any.
- </column>
-
<column name="enabled">
This column is used to administratively set router state. If this column
is empty or is set to <code>true</code>, the router is enabled. If this