In a gateway like the VTEP L2 gateway, physical vlans belonging to the same logical network form a "logical switch". Each logical switch has a dedicated tunnel key and will keep records of all MACs learned from the owned vlans. So user can just send packet to a "logical switch" and the gateway will figure out the output port and vlan tag automatically.
Therefore, it is not really necessary to keep record of the vlan map for each gateway physical port in the OVN_Southbound database using "gateway_ports". Thusly, this commit removes the "Gateway" table from the OVN_Southbound database. In the "Chassis" table, the "gateway_ports" column is replaced by "logical_switches" column which maps the logical switch name in the gateway to a logical port name that exists in the OVN_Northbound database's "Logical_Port" table. Signed-off-by: Alex Wang <al...@nicira.com> --- ->V3: - Realize that the Gateway table is not needed. --- ovn/ovn-sb.ovsschema | 17 ++++------------- ovn/ovn-sb.xml | 34 ++++++++++------------------------ 2 files changed, 14 insertions(+), 37 deletions(-) diff --git a/ovn/ovn-sb.ovsschema b/ovn/ovn-sb.ovsschema index f255006..0805d2a 100644 --- a/ovn/ovn-sb.ovsschema +++ b/ovn/ovn-sb.ovsschema @@ -7,12 +7,10 @@ "encaps": {"type": {"key": {"type": "uuid", "refTable": "Encap"}, "min": 1, "max": "unlimited"}}, - "gateway_ports": {"type": {"key": "string", - "value": {"type": "uuid", - "refTable": "Gateway", - "refType": "strong"}, - "min": 0, - "max": "unlimited"}}}, + "logical_switches" : {"type": {"key": "string", + "value": "string", + "min": 0, + "max": "unlimited"}}}, "isRoot": true, "indexes": [["name"]]}, "Encap": { @@ -25,13 +23,6 @@ "min": 0, "max": "unlimited"}}, "ip": {"type": "string"}}}, - "Gateway": { - "columns": {"vlan_map": {"type": {"key": {"type": "integer", - "minInteger": 0, - "maxInteger": 4095}, - "value": {"type": "string"}, - "min": 0, - "max": "unlimited"}}}}, "Pipeline": { "columns": { "logical_datapath": {"type": "uuid"}, diff --git a/ovn/ovn-sb.xml b/ovn/ovn-sb.xml index 6d74c9f..b9e9bc3 100644 --- a/ovn/ovn-sb.xml +++ b/ovn/ovn-sb.xml @@ -141,15 +141,18 @@ <group title="Gateway Configuration"> <p> A <dfn>gateway</dfn> is a chassis that forwards traffic between a - logical network and a physical VLAN. Gateways are typically dedicated - nodes that do not host VMs. + logical network and a physical VLAN. Physical VLANs belonging to + the one logical network form a <dfn>logical switch</dfn> in the + <dfn>gateway</dfn>. Gateways are typically dedicated nodes that + do not host VMs. </p> - <column name="gateway_ports"> - Maps from the name of a port attached to the OVN integration bridge - (typically a physical port or an Open vSwitch patch port) to a <ref - table="Gateway"/> record that describes the details of the gatewaying - function. + <column name="logical_switches"> + Maps from the name of a logical switch on the gateway to a logical + port name. To guarantee uniqueness, the logical port name is + formatted as the combination of <dfn>{Chassis_Name}_ + {Logical_Switch_Name}</dfn>. User needs to create a same named + logical port in the OVN_Northbound database's Logical_Port table. </column> </group> </table> @@ -181,23 +184,6 @@ </column> </table> - <table name="Gateway" title="Physical Network Gateway Ports"> - <p> - The <ref column="gateway_ports" table="Chassis"/> column in the <ref - table="Chassis"/> table refers to rows in this table to connect a chassis - port to a gateway function. Each row in this table describes the logical - networks to which a gateway port is attached. Each chassis, via - <code>ovn-controller</code>(8), adds and updates its own rows, if any - (since most chassis are not gateways), and keeps a copy of the remaining - rows to determine how to reach other chassis. - </p> - - <column name="vlan_map"> - Maps from a VLAN ID to a logical port name. Thus, each named logical - port corresponds to one VLAN on the gateway port. - </column> - </table> - <table name="Pipeline" title="Logical Network Pipeline"> <p> Each row in this table represents one logical flow. The cloud management -- 1.7.9.5 _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev