@@ -247,3 +247,14 @@ large.
** Support reject action.
** Support log option.
+
+* Software L2 gateway
+
+** Support "chassis" option in Logical_Switch_Port with type of
"l2gateway".
+
+ Right now an "l2gateway" port is bound to a chassis by setting the
"chassis"
+ column of the port binding in the southbound database directly. We
should
+ support a "chassis" option in the "options" column of the
+ "Logical_Switch_Port" in the northbound database. This would bring
+ "l2gateway" into alignment with how chassis binding is done for L3
gateways
+ (a "chassis" option for Logical_Router).
@@ -224,7 +224,7 @@ consider_local_datapath(struct controller_ctx *ctx,
struct shash *lports,
}
} else if (!strcmp(binding_rec->type, "l2gateway")
&& binding_rec->chassis == chassis_rec) {
- /* A locally bound gateway port.
+ /* A locally bound L2 gateway port.
*
* ovn-controller does not bind gateway ports itself.
* Choosing a chassis for a gateway port is left
b/ovn/controller/ovn-controller.8.xml
@@ -199,24 +199,24 @@
</dd>
<dt>
- <code>external-ids:ovn-gateway-port</code> in the <code>Port</code>
+ <code>external-ids:ovn-l2gateway-port</code> in the
<code>Port</code>
table
</dt>
<dd>
<p>
The presence of this key identifies a patch port as one created
by
<code>ovn-controller</code> to connect the integration bridge and
- another bridge to implement a <code>gateway</code> logical port.
+ another bridge to implement a <code>l2gateway</code> logical
port.
Its value is the name of the logical port with <code>type</code>
- set to <code>gateway</code> that the port implements. See
+ set to <code>l3gateway</code> that the port implements. See
<code>external_ids:ovn-bridge-mappings</code>, above, for more
information.
</p>
<p>
- Each <code>gateway</code> logical port is implemented as a pair
+ Each <code>l2gateway</code> logical port is implemented as a pair
of patch ports, one in the integration bridge, one in a different
- bridge, with the same <code>external-ids:ovn-gateway-port</code>
+ bridge, with the same
<code>external-ids:ovn-l2gateway-port</code>
value.
</p>
</dd>
@@ -207,14 +207,15 @@ add_bridge_mappings(struct controller_ctx *ctx,
ld->localnet_port = binding;
patch_port_id = "ovn-localnet-port";
} else if (!strcmp(binding->type, "l2gateway")) {
- if (!binding->chassis || strcmp(chassis_id,
binding->chassis->name)) {
- /* This gateway port is not bound to this chassis, so we
should
- * not create any patch ports for it. */
+ if (!binding->chassis
+ || strcmp(chassis_id, binding->chassis->name)) {
+ /* This L2 gateway port is not bound to this chassis,
+ * so we should not create any patch ports for it. */
continue;
}
- patch_port_id = "ovn-gateway-port";
+ patch_port_id = "ovn-l2gateway-port";
} else {
- /* not a localnet or gateway port. */
+ /* not a localnet or L2 gateway port. */
continue;
}
@@ -347,7 +348,7 @@ patch_run(struct controller_ctx *ctx, const struct
ovsrec_bridge *br_int,
const struct ovsrec_port *port;
OVSREC_PORT_FOR_EACH (port, ctx->ovs_idl) {
if (smap_get(&port->external_ids, "ovn-localnet-port")
- || smap_get(&port->external_ids, "ovn-gateway-port")
+ || smap_get(&port->external_ids, "ovn-l2gateway-port")
|| smap_get(&port->external_ids, "ovn-logical-patch-port")) {
shash_add(&existing_ports, port->name, port);
}
@@ -169,8 +169,8 @@ physical_run(struct controller_ctx *ctx, enum
mf_field_id mff_ovn_geneve,
const char *localnet = smap_get(&port_rec->external_ids,
"ovn-localnet-port");
- const char *gateway = smap_get(&port_rec->external_ids,
- "ovn-gateway-port");
+ const char *l2gateway = smap_get(&port_rec->external_ids,
+ "ovn-l2gateway-port");
const char *logpatch = smap_get(&port_rec->external_ids,
"ovn-logical-patch-port");
@@ -193,9 +193,9 @@ physical_run(struct controller_ctx *ctx, enum
mf_field_id mff_ovn_geneve,
/* localnet patch ports can be handled just like VIFs. */
simap_put(&localvif_to_ofport, localnet, ofport);
break;
- } else if (is_patch && gateway) {
- /* gateway patch ports can be handled just like VIFs. */
- simap_put(&localvif_to_ofport, gateway, ofport);
+ } else if (is_patch && l2gateway) {
+ /* L2 gateway patch ports can be handled just like VIFs. */
+ simap_put(&localvif_to_ofport, l2gateway, ofport);
break;
} else if (is_patch && logpatch) {
/* Logical patch ports can be handled just like VIFs. */
@@ -275,12 +275,12 @@ physical_run(struct controller_ctx *ctx, enum
mf_field_id mff_ovn_geneve,
* OpenFlow port for the VIF. 'tun' will be NULL.
*
* The same logic handles logical patch ports, as well as
- * localnet and gateway patch ports.
+ * localnet and L2 gateway patch ports.
*
* For a container nested inside a VM and accessible via a
VLAN,
* 'tag' is the VLAN ID; otherwise 'tag' is 0.
*
- * For a localnet or gateway patch port, if a VLAN ID was
+ * For a localnet or L2 gateway patch port, if a VLAN ID was
* configured, 'tag' is set to that VLAN ID; otherwise 'tag'
is 0.
*
* - If the port is on a remote chassis, the OpenFlow port for
a
@@ -188,7 +188,7 @@
<column name="options" key="network_name">
Required. The name of the network to which the
<code>l2gateway</code>
- port is connected. The gateway, via <code>ovn-controller</code>,
+ port is connected. The L2 gateway, via
<code>ovn-controller</code>,
uses its local configuration to determine exactly how to connect
to
this network.
</column>
@@ -1380,6 +1380,14 @@ tcp.flags = RST;
connectivity to the corresponding physical network.
</dd>
+ <dt>gateway</dt>
+ <dd>
+ The physical location of the L3 gateway. To successfully
identify a
+ chassis, this column must be a <ref table="Chassis"/> record.
This is
+ populated by <code>ovn-controller</code> based on the value of
+ the <code>options:gateway-chassis</code> column in this table.
+ </dd>
+
<dt>l2gateway</dt>