Skip to content

Commit

Permalink
ovn-sb: Introduce Advertised_ and Learned_Route.
Browse files Browse the repository at this point in the history
These two tables will be used in the future to coordinate routing
information between northd and ovn-controller.
Northd will insert routes that should be advertised to the outside
fabric to Advertised_Route.
Ovn-controller will insert routes that have been learned from the
outside fabric to Learned_Route.

Signed-off-by: Felix Huettner <[email protected]>
Signed-off-by: Dumitru Ceara <[email protected]>
  • Loading branch information
felixhuettner authored and dceara committed Dec 16, 2024
1 parent 31d4120 commit 200744b
Show file tree
Hide file tree
Showing 2 changed files with 107 additions and 2 deletions.
39 changes: 37 additions & 2 deletions ovn-sb.ovsschema
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "OVN_Southbound",
"version": "20.37.0",
"cksum": "1950136776 31493",
"version": "20.38.0",
"cksum": "3113335473 33491",
"tables": {
"SB_Global": {
"columns": {
Expand Down Expand Up @@ -617,6 +617,41 @@
"type": {"key": "string", "value": "string",
"min": 0, "max": "unlimited"}}},
"indexes": [["chassis"]],
"isRoot": true},
"Advertised_Route": {
"columns": {
"datapath": {"type": {"key": {"type": "uuid",
"refTable": "Datapath_Binding",
"refType": "strong"}}},
"logical_port": {"type": {"key": {"type": "uuid",
"refTable": "Port_Binding",
"refType": "strong"}}},
"ip_prefix": {"type": "string"},
"tracked_port": {"type": {"key": {"type": "uuid",
"refTable": "Port_Binding",
"refType": "strong"},
"min": 0,
"max": 1}},
"external_ids": {
"type": {"key": "string", "value": "string",
"min": 0, "max": "unlimited"}}},
"indexes": [["datapath", "logical_port",
"ip_prefix", "tracked_port"]],
"isRoot": true},
"Learned_Route": {
"columns": {
"datapath": {"type": {"key": {"type": "uuid",
"refTable": "Datapath_Binding",
"refType": "strong"}}},
"logical_port": {"type": {"key": {"type": "uuid",
"refTable": "Port_Binding",
"refType": "strong"}}},
"ip_prefix": {"type": "string"},
"nexthop": {"type": "string"},
"external_ids": {
"type": {"key": "string", "value": "string",
"min": 0, "max": "unlimited"}}},
"indexes": [["datapath", "logical_port", "ip_prefix", "nexthop"]],
"isRoot": true}
}
}
70 changes: 70 additions & 0 deletions ovn-sb.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5218,4 +5218,74 @@ tcp.flags = RST;
The set of variable values for a given chassis.
</column>
</table>

<table name="Advertised_Route">
<p>
Each record represents a route that should be exported from ovn to the
outside network fabric.
It is populated by <code>ovn-northd</code> based on the addresses,
routes and NAT Entries of a
<code>OVN_Northbound.Logical_Router_Port</code>.
</p>

<column name="datapath">
The datapath belonging to the
<code>OVN_Northbound.Logical_Router</code> that this route is valid
for.
</column>

<column name="logical_port">
This is the <ref table="Port_Binding"/> that the router will send packets
out that are received for the below prefix.
</column>

<column name="ip_prefix">
IP prefix of this route (e.g. 192.168.100.0/24).
</column>

<column name="tracked_port">
In combination with a host <code>ip_prefix</code> this tracks the port
OVN will forward the packets for this destination to.
If set the <ref table="Advertised_Route" column="ip_prefix"/> will always
contain a /32 (for ipv4) or /128 (for ipv6) prefix.

An announcing chassis can use this information to check if this
destination is local and adjust the route priorities based on that.
</column>

<column name="external_ids">
See <em>External IDs</em> at the beginning of this document.
</column>
</table>

<table name="Learned_Route">
<p>
Each record represents a route that learned by ovn using some dynamic
routing logic outside of ovn.
It is populated by <code>ovn-controller</code> with routes it learns
locally.
</p>

<column name="datapath">
The datapath belonging to the
<code>OVN_Northbound.Logical_Router</code> that this route is valid
for.
</column>

<column name="logical_port">
This is the <ref table="Port_Binding"/> that the route was learned on.
</column>

<column name="ip_prefix">
IP prefix of this route (e.g. 192.168.100.0/24).
</column>

<column name="nexthop">
This is the nexthop ip we learned from outside of OVN.
</column>

<column name="external_ids">
See <em>External IDs</em> at the beginning of this document.
</column>
</table>
</database>

0 comments on commit 200744b

Please sign in to comment.